summaryrefslogtreecommitdiff
path: root/gcc/cpplib.h
diff options
context:
space:
mode:
authorneil <neil@138bc75d-0d04-0410-961f-82ee72b054a4>2003-07-29 22:26:13 +0000
committerneil <neil@138bc75d-0d04-0410-961f-82ee72b054a4>2003-07-29 22:26:13 +0000
commit1824e2bdf8fefbcefbe05c7555628be245d5ce4e (patch)
tree1789dbf490b4c620a39de9335b1d8002ee48603b /gcc/cpplib.h
parentd0ef003fba634ebff00788588936004a650b0e70 (diff)
downloadgcc-1824e2bdf8fefbcefbe05c7555628be245d5ce4e.tar.gz
* Makefile.in (LIBCPP_DEPS): Add HASHTAB_H.
* cppfiles.c: Completely rewritten. * c-incpath.c (free_path, remove_duplicates, heads, tails, add_path): struct cpp_path is now struct cpp_dir. (remove_duplicates): Don't simplify path names. * c-opts.c (c_common_parse_file): cpp_read_next_file renamed cpp_stack_file. * cpphash.h: Include hashtab.h. (_cpp_file): Declare. (struct cpp_buffer): struct include_file is now struct _cpp_file, and struct cpp_path is now struct cpp_dir. Rename members. (struct cpp_reader): Similarly. New members once_only_files, file_hash, file_hash_entries, quote_ignores_source_dir, no_search_path, saw_pragma_once. Remove all_include_files and max_include_len. Make some members bool. (_cpp_mark_only_only): Renamed from _cpp_never_reread. (_cpp_stack_file): Renamed from _cpp_read_file. (_cpp_stack_include): Renamed from _cpp_execute_include. (_cpp_init_files): Renamed from _cpp_init_includes. (_cpp_cleanup_files): Renamed from _cpp_cleanup_includes. * cppinit.c (cpp_create_reader): Initialize no_search_path. Update. (cpp_read_next_file): Rename and move to cppfiles.c. (cpp_read_main_file): Update. * cpplib.c (run_directive): Update for renamed members. (do_include_common, _cpp_pop_buffer): Update. (do_import): Undeprecate #import. (do_pragma_once): Undeprecate. Use _cpp_mark_file_once_only. * cpplib.h: Remove file_name_map_list. (cpp_options): Remove map_list. (cpp_dir): Rename from cpp_path. New datatype for name_map. (cpp_set_include_chains, cpp_stack_file, cpp_included): Update. testsuite: * gcc.dg/cpp/include2.c: Only expect one message. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@69942 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cpplib.h')
-rw-r--r--gcc/cpplib.h29
1 files changed, 12 insertions, 17 deletions
diff --git a/gcc/cpplib.h b/gcc/cpplib.h
index 434e455331a..7f5cfd4edd9 100644
--- a/gcc/cpplib.h
+++ b/gcc/cpplib.h
@@ -39,10 +39,9 @@ typedef struct cpp_string cpp_string;
typedef struct cpp_hashnode cpp_hashnode;
typedef struct cpp_macro cpp_macro;
typedef struct cpp_callbacks cpp_callbacks;
-typedef struct cpp_path cpp_path;
+typedef struct cpp_dir cpp_dir;
struct answer;
-struct file_name_map_list;
/* The first three groups, apart from '=', can appear in preprocessor
expressions (+= and -= are used to indicate unary + and - resp.).
@@ -214,10 +213,6 @@ struct cpp_options
/* Characters between tab stops. */
unsigned int tabstop;
- /* Map between header names and file names, used only on DOS where
- file names are limited in length. */
- struct file_name_map_list *map_list;
-
/* The language we're preprocessing. */
enum c_lang lang;
@@ -397,12 +392,12 @@ struct cpp_callbacks
};
/* Chain of directories to look for include files in. */
-struct cpp_path
+struct cpp_dir
{
/* NULL-terminated singly-linked list. */
- struct cpp_path *next;
+ struct cpp_dir *next;
- /* NAME need not be NUL-terminated once inside cpplib. */
+ /* NAME of the directory, NUL-terminated. */
char *name;
unsigned int len;
@@ -410,9 +405,9 @@ struct cpp_path
"C" guards for C++. */
unsigned char sysp;
- /* Mapping of file names for this directory for MS-DOS and
- related platforms. */
- struct file_name_map *name_map;
+ /* Mapping of file names for this directory for MS-DOS and related
+ platforms. A NULL-terminated array of (from, to) pairs. */
+ const char **name_map;
/* The C front end uses these to recognize duplicated
directories in the search path. */
@@ -516,7 +511,7 @@ extern void cpp_set_lang (cpp_reader *, enum c_lang);
extern void cpp_add_dependency_target (cpp_reader *, const char *, int);
/* Set the include paths. */
-extern void cpp_set_include_chains (cpp_reader *, cpp_path *, cpp_path *, int);
+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
@@ -535,9 +530,9 @@ extern void cpp_set_callbacks (cpp_reader *, cpp_callbacks *);
too. If there was an error opening the file, it returns NULL. */
extern const char *cpp_read_main_file (cpp_reader *, const char *);
-/* This continues processing to a new file. It will return false if
- there was an error opening the file. */
-extern bool cpp_read_next_file (cpp_reader *, const char *);
+/* Stacks a new file. It will return false if there was an error
+ opening the file. */
+extern bool cpp_stack_file (cpp_reader *, const char *);
/* Set up built-ins like __FILE__. */
extern void cpp_init_builtins (cpp_reader *, int);
@@ -715,7 +710,7 @@ extern unsigned char *cpp_quote_string (unsigned char *, const unsigned char *,
unsigned int);
/* In cppfiles.c */
-extern int cpp_included (cpp_reader *, const char *);
+extern bool cpp_included (cpp_reader *, const char *);
extern void cpp_make_system_header (cpp_reader *, int, int);
extern void cpp_simplify_path (char *);
extern bool cpp_push_include (cpp_reader *, const char *);