diff options
Diffstat (limited to 'libcpp/include')
-rw-r--r-- | libcpp/include/cpplib.h | 13 | ||||
-rw-r--r-- | libcpp/include/mkdeps.h | 7 | ||||
-rw-r--r-- | libcpp/include/symtab.h | 5 |
3 files changed, 16 insertions, 9 deletions
diff --git a/libcpp/include/cpplib.h b/libcpp/include/cpplib.h index 7f20104..cf701b5 100644 --- a/libcpp/include/cpplib.h +++ b/libcpp/include/cpplib.h @@ -538,23 +538,18 @@ extern cpp_reader *cpp_create_reader (enum c_lang, struct ht *, command line options). */ extern void cpp_set_lang (cpp_reader *, enum c_lang); -/* Add a dependency TARGET. Quote it for "make" if QUOTE. Can be - called any number of times before cpp_read_main_file(). If no - targets have been added before cpp_read_main_file(), then the - default target is used. */ -extern void cpp_add_dependency_target (cpp_reader *, const char *, int); - /* Set the include paths. */ extern void cpp_set_include_chains (cpp_reader *, cpp_dir *, cpp_dir *, int); -/* Call these to get pointers to the options and callback structures - for a given reader. These pointers are good until you call - cpp_finish on that reader. You can either edit the callbacks +/* Call these to get pointers to the options, callback, and deps + structures for a given reader. These pointers are good until you + call cpp_finish on that reader. You can either edit the callbacks through the pointer returned from cpp_get_callbacks, or set them with cpp_set_callbacks. */ extern cpp_options *cpp_get_options (cpp_reader *); extern cpp_callbacks *cpp_get_callbacks (cpp_reader *); extern void cpp_set_callbacks (cpp_reader *, cpp_callbacks *); +extern struct deps *cpp_get_deps (cpp_reader *); /* This function reads the file, but does not start preprocessing. It returns the name of the original file; this is the same as the diff --git a/libcpp/include/mkdeps.h b/libcpp/include/mkdeps.h index b5f9a05..56ffdaf 100644 --- a/libcpp/include/mkdeps.h +++ b/libcpp/include/mkdeps.h @@ -34,6 +34,13 @@ extern struct deps *deps_init (void); /* Destroy a deps buffer. */ extern void deps_free (struct deps *); +/* Add a set of "vpath" directories. The second argument is a colon- + separated list of pathnames, like you would set Make's VPATH + variable to. If a dependency or target name begins with any of + these pathnames (and the next path element is not "..") that + pathname is stripped off. */ +extern void deps_add_vpath (struct deps *, const char *); + /* Add a target (appears on left side of the colon) to the deps list. Takes a boolean indicating whether to quote the target for MAKE. */ extern void deps_add_target (struct deps *, const char *, int); diff --git a/libcpp/include/symtab.h b/libcpp/include/symtab.h index 85e285b..d11e4ef 100644 --- a/libcpp/include/symtab.h +++ b/libcpp/include/symtab.h @@ -71,6 +71,11 @@ extern void ht_destroy (hash_table *); extern hashnode ht_lookup (hash_table *, const unsigned char *, size_t, enum ht_lookup_option); +extern hashnode ht_lookup_with_hash (hash_table *, const unsigned char *, + size_t, unsigned int, + enum ht_lookup_option); +#define HT_HASHSTEP(r, c) ((r) * 67 + ((c) - 113)); +#define HT_HASHFINISH(r, len) ((r) + (len)) /* For all nodes in TABLE, make a callback. The callback takes TABLE->PFILE, the node, and a PTR, and the callback sequence stops |