diff options
author | Zack Weinberg <zack@wolery.cumb.org> | 2000-03-14 06:34:11 +0000 |
---|---|---|
committer | Zack Weinberg <zack@gcc.gnu.org> | 2000-03-14 06:34:11 +0000 |
commit | 168d3732aa67159489982b879ce29147ed94a4ac (patch) | |
tree | 193e65c2271a732229c4e6fa06aba75d25b7e835 /gcc/cpphash.h | |
parent | 194ae3f644daec5af81b93bbf627275756852728 (diff) | |
download | gcc-168d3732aa67159489982b879ce29147ed94a4ac.zip gcc-168d3732aa67159489982b879ce29147ed94a4ac.tar.gz gcc-168d3732aa67159489982b879ce29147ed94a4ac.tar.bz2 |
cppfiles.c: Include mkdeps.h.
* cppfiles.c: Include mkdeps.h.
(find_include_file, read_include_file): Remove _cpp_ prefix
from name, make static.
(_cpp_execute_include): New function, broken out of
do_include.
* cpplib.c: Don't include mkdeps.h.
(struct directive): Remove type field. Reorder entries. The
function takes only one argument.
(struct if_stack): Make type field an int.
(directive_table): Rename to dtable. Generate it, the
prototypes of the directive handlers, and the enum for the
directive numbers, from a template macro.
(do_ifndef, do_include_next, do_import): New functions.
(do_define, do_include, do_endif, do_ifdef, do_if, do_else,
do_undef, do_line, do_elif, do_error, do_pragma, do_warning,
do_ident, do_assert, do_unassert, do_sccs): Take only one
argument.
(do_sccs): Define always, but alter behavior based on
SCCS_DIRECTIVE.
(_cpp_handle_directive, consider_directive_while_skipping):
Restructure for new directive table layout.
(pass_thru_directive): Take a directive number, not a pointer
to a struct directive.
(parse_include): New function, broken out of do_include.
(do_include, do_import, do_include_next): Use parse_include
and _cpp_execute_include.
(do_elif, do_else): Test for T_ELSE specifically when checking
for #elif/#else after #else.
(parse_ifdef): New function, broken out of do_ifdef.
(validate_else): Expect a name arg without a leading #.
(if_directive_name): Delete.
(cpp_define, cpp_assert, cpp_undef, cpp_unassert): Call
directive handlers with only one argument.
* cpphash.h: Update prototypes.
(enum node_type): Remove entries for directives.
* Makefile.in: Update dependencies.
From-SVN: r32519
Diffstat (limited to 'gcc/cpphash.h')
-rw-r--r-- | gcc/cpphash.h | 28 |
1 files changed, 4 insertions, 24 deletions
diff --git a/gcc/cpphash.h b/gcc/cpphash.h index 4468d42..704cab4 100644 --- a/gcc/cpphash.h +++ b/gcc/cpphash.h @@ -83,28 +83,9 @@ struct definition It does not contain control words like "#define", which are recognized by a separate piece of code. */ -/* different flavors of hash nodes --- also used in keyword table */ +/* different flavors of hash nodes */ enum node_type { - T_DEFINE = 1, /* `#define' */ - T_INCLUDE, /* `#include' */ - T_INCLUDE_NEXT, /* `#include_next' */ - T_IMPORT, /* `#import' */ - T_IFDEF, /* `#ifdef' */ - T_IFNDEF, /* `#ifndef' */ - T_IF, /* `#if' */ - T_ELSE, /* `#else' */ - T_PRAGMA, /* `#pragma' */ - T_ELIF, /* `#elif' */ - T_UNDEF, /* `#undef' */ - T_LINE, /* `#line' */ - T_ERROR, /* `#error' */ - T_WARNING, /* `#warning' */ - T_ENDIF, /* `#endif' */ - T_SCCS, /* `#sccs' */ - T_IDENT, /* `#ident' */ - T_ASSERT, /* `#assert' */ - T_UNASSERT, /* `#unassert', */ T_SPECLINE, /* `__LINE__' */ T_DATE, /* `__DATE__' */ T_FILE, /* `__FILE__' */ @@ -292,10 +273,9 @@ extern void _cpp_dump_macro_hash PARAMS ((cpp_reader *)); /* In cppfiles.c */ extern void _cpp_simplify_pathname PARAMS ((char *)); -extern int _cpp_find_include_file PARAMS ((cpp_reader *, const char *, - struct file_name_list *, - IHASH **, int *)); -extern int _cpp_read_include_file PARAMS ((cpp_reader *, int, IHASH *)); +extern void _cpp_execute_include PARAMS ((cpp_reader *, char *, + unsigned int, int, + struct file_name_list *)); extern void _cpp_init_include_hash PARAMS ((cpp_reader *)); /* In cppexp.c */ |