aboutsummaryrefslogtreecommitdiff
path: root/gcc/scan.h
diff options
context:
space:
mode:
authorZack Weinberg <zack@wolery.cumb.org>2000-02-10 02:23:08 +0000
committerZack Weinberg <zack@gcc.gnu.org>2000-02-10 02:23:08 +0000
commitbb52fa7f8606991a77af8ff6f0edabb8d7ffd280 (patch)
treea1c32725cdbb29b80f1f744fec3575eb7ad9997d /gcc/scan.h
parentae6f3fe9f6035dd43b0eaa153e95843325f67f08 (diff)
downloadgcc-bb52fa7f8606991a77af8ff6f0edabb8d7ffd280.zip
gcc-bb52fa7f8606991a77af8ff6f0edabb8d7ffd280.tar.gz
gcc-bb52fa7f8606991a77af8ff6f0edabb8d7ffd280.tar.bz2
cpplib.h: Provide HASHNODE typedef and forward decl of struct hashnode only.
* cpplib.h: Provide HASHNODE typedef and forward decl of struct hashnode only. Kill cpp_hashnode typedef. MACRODEF, DEFINITION, struct hashnode, struct macrodef, struct definition, scan_decls prototype, default defn of INCLUDE_LEN_FUDGE moved elsewhere. * cpphash.h: MACRODEF, DEFINITION, struct macrodef, struct definition, and struct hashnode moved here. Remove the unused 'predefined' field from struct definition. Replace the 'args' union with its sole member. All users updated (cpphash.c). Delete HASHSTEP and MAKE_POS macros, and hashf prototype. Add multiple include guard. * cpphash.c (hashf): Make static; use better algorithm; drop HASHSIZE parameter; return an unsigned int. (cpp_lookup): Drop HASH parameter. PFILE parameter is used. Calculate HASHSIZE modulus here. (cpp_install): Drop HASH parameter. Calculate HASHSIZE modulus here. (create_definition): Drop PREDEFINITION parameter. * cpplib.c (do_define): Don't calculate a hash value here. Don't pass (keyword == NULL) to create_definition. * scan.h: Prototype scan_decls here. * cppfiles.c: Move INCLUDE_LEN_FUDGE default defn here. * cppexp.c, cppfiles.c, cppinit.c, cpplib.c, fix-header.c: All callers of cpp_lookup and cpp_install updated. From-SVN: r31881
Diffstat (limited to 'gcc/scan.h')
-rw-r--r--gcc/scan.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/scan.h b/gcc/scan.h
index a2d9644..1c321f5 100644
--- a/gcc/scan.h
+++ b/gcc/scan.h
@@ -62,6 +62,9 @@ extern void recognized_function _PARAMS((const char *, int, int, const char *, i
extern void recognized_extern _PARAMS((const char *, int, const char *, int));
extern unsigned int hashstr _PARAMS((const char *, unsigned int));
+struct cpp_reader;
+extern int scan_decls _PARAMS((struct cpp_reader *, int, char **));
+
/* get_token is a simple C lexer. */
#define IDENTIFIER_TOKEN 300
#define CHAR_TOKEN 301