aboutsummaryrefslogtreecommitdiff
path: root/gcc/cpphash.h
diff options
context:
space:
mode:
authorNeil Booth <neil@daikokuya.demon.co.uk>2001-03-15 07:57:13 +0000
committerNeil Booth <neil@gcc.gnu.org>2001-03-15 07:57:13 +0000
commitba133c968c260e4f4c9623630812846202b5e54f (patch)
tree8a4a56e335e3fea702888b8f8de7fa5ee14ec72e /gcc/cpphash.h
parenta3eab6194fe9c17e2609882621404955cb03c662 (diff)
downloadgcc-ba133c968c260e4f4c9623630812846202b5e54f.zip
gcc-ba133c968c260e4f4c9623630812846202b5e54f.tar.gz
gcc-ba133c968c260e4f4c9623630812846202b5e54f.tar.bz2
cpp.texi: Update documentation for -include and -imacros.
* cpp.texi: Update documentation for -include and -imacros. * cppfiles.c (struct include_file): Remove "defined" memeber. (find_or_create_entry): Make a copy of the file name, and simplify it. (open_file): Update to ensure we use the simplified filename. (stack_include_file): Don't set search_from. (cpp_included): Don't simplify the path name here. (find_include_file): New prototype. Call search_from to get the start of the "" include chain. Don't simplify the filenames here. (_cpp_execute_include): New prototype. Move diagnostics to do_include_common. Update. (_cpp_pop_file_buffer): Don't set defined. (search_from): New prototype. Use the preprocessor's cwd for files included from the command line. (read_name_map): Don't simplify the pathname here. * cpphash.h (enum include_type): New. (struct buffer): Delete search from. New search_cached. (_cpp_execute_include): Update prototype. * cppinit.c (do_includes): Use _cpp_execute_include. * cpplib.c (do_include_common): New function. (do_include, do_include_next, do_import): Use it. From-SVN: r40486
Diffstat (limited to 'gcc/cpphash.h')
-rw-r--r--gcc/cpphash.h17
1 files changed, 10 insertions, 7 deletions
diff --git a/gcc/cpphash.h b/gcc/cpphash.h
index 5d452c3..9cac65d 100644
--- a/gcc/cpphash.h
+++ b/gcc/cpphash.h
@@ -96,6 +96,9 @@ struct search_path
enum mi_state {MI_FAILED = 0, MI_OUTSIDE};
enum mi_ind {MI_IND_NONE = 0, MI_IND_NOT};
+/* #include types. */
+enum include_type {IT_INCLUDE, IT_INCLUDE_NEXT, IT_IMPORT, IT_CMDLINE};
+
typedef struct toklist toklist;
struct toklist
{
@@ -222,17 +225,16 @@ struct cpp_buffer
containing files that matches the current status. */
unsigned char include_stack_listed;
+ /* Nonzero means that the directory to start searching for ""
+ include files has been calculated and stored in "dir" below. */
+ unsigned char search_cached;
+
/* Buffer type. */
ENUM_BITFIELD (cpp_buffer_type) type : 8;
/* The directory of the this buffer's file. Its NAME member is not
allocated, so we don't need to worry about freeing it. */
struct search_path dir;
-
- /* The directory to start searching for "" include files. Is either
- "dir" above, or options.quote_include, depending upon whether -I-
- was on the command line. */
- struct search_path *search_from;
};
/* A cpp_reader encapsulates the "state" of a pre-processor run.
@@ -411,8 +413,9 @@ extern void _cpp_fake_include PARAMS ((cpp_reader *, const char *));
extern void _cpp_never_reread PARAMS ((struct include_file *));
extern char *_cpp_simplify_pathname PARAMS ((char *));
extern int _cpp_read_file PARAMS ((cpp_reader *, const char *));
-extern void _cpp_execute_include PARAMS ((cpp_reader *,
- const cpp_token *, int, int));
+extern int _cpp_execute_include PARAMS ((cpp_reader *,
+ const cpp_token *,
+ enum include_type));
extern int _cpp_compare_file_date PARAMS ((cpp_reader *,
const cpp_token *));
extern void _cpp_report_missing_guards PARAMS ((cpp_reader *));