aboutsummaryrefslogtreecommitdiff
path: root/gcc/cpplib.h
diff options
context:
space:
mode:
authorZack Weinberg <zack@rabi.columbia.edu>1999-02-18 15:35:49 +0000
committerZack Weinberg <zack@gcc.gnu.org>1999-02-18 15:35:49 +0000
commit6de1e2a9787e105521817b86422b50bd410560fe (patch)
tree755ff3010888b5791d0cc4946b458010353a6f78 /gcc/cpplib.h
parent43c5ec700f4a849d3b49324f1789e2aee41b6dbf (diff)
downloadgcc-6de1e2a9787e105521817b86422b50bd410560fe.zip
gcc-6de1e2a9787e105521817b86422b50bd410560fe.tar.gz
gcc-6de1e2a9787e105521817b86422b50bd410560fe.tar.bz2
cpplib.c: Kill define of STDC_VALUE.
1999-02-18 18:32 -0500 Zack Weinberg <zack@rabi.columbia.edu> * cpplib.c: Kill define of STDC_VALUE. Don't include output.h or prefix.h. Change CPP_IS_MACRO_BUFFER to not refer to macro_cleanup. (GET_ENV_PATH_LIST, PATH_SEPARATOR, STANDARD_INCLUDE_DIR, predefs, SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE, CPP_WCHAR_TYPE, USER_LABEL_PREFIX, REGISTER_PREFIX, struct cpp_pending, version_string, struct default_include, include_defaults_array, path_include, cpp_options_init, dump_special_to_buffer, initialize_builtins, cpp_start_read, cpp_reader_init, nreverse_pending, push_pending, print_help, cpp_handle_option, cpp_handle_options, cpp_finish, cpp_cleanup): Move to cppinit.c. (macro_cleanup, struct arglist, collect_expansion, create_definition, compare_defs, comp_def_part, ARG_BASE, struct argdata, macarg, change_newlines, timestamp, monthnames, special_symbol, unsafe_chars, macroexpand, push_macro_expansion): Move to cpphash.c. (quote_string, check_macro_name, cpp_expand_to_buffer, output_line_command, cpp_undef): Export. (null_underflow, null_cleanup, handle_directive): Make static. * cpplib.h: Prototype now-exported functions. Adjust decls of syntax tables so we can include cpplib.h in cppinit.c. * cpphash.h: Prototype all functions exported by cpphash.c. * cppinit.c: Make syntax tables initialized data if possible (uses GCC designated-initializer extension). * cppexp.c: Make cpp_lex static. * Makefile.in: Move -D switches for the various include dirs from cpplib.o rule to cppinit.o rule. Adjust dependencies. From-SVN: r25287
Diffstat (limited to 'gcc/cpplib.h')
-rw-r--r--gcc/cpplib.h34
1 files changed, 25 insertions, 9 deletions
diff --git a/gcc/cpplib.h b/gcc/cpplib.h
index 8a33eed..a943939 100644
--- a/gcc/cpplib.h
+++ b/gcc/cpplib.h
@@ -637,11 +637,19 @@ struct definition {
} args;
};
-extern const unsigned char is_idstart[256];
-extern const unsigned char is_idchar[256];
-extern const unsigned char is_hor_space[256];
-extern const unsigned char is_space[256];
-extern const unsigned char trigraph_table[256];
+/* These tables are not really `const', but they are only modified at
+ initialization time, in a separate translation unit from the rest
+ of the library. We let the rest of the library think they are `const'
+ to get better code and some additional sanity checks. */
+#ifndef FAKE_CONST
+#define FAKE_CONST const
+#endif
+extern FAKE_CONST unsigned char is_idstart[256];
+extern FAKE_CONST unsigned char is_idchar[256];
+extern FAKE_CONST unsigned char is_hor_space[256];
+extern FAKE_CONST unsigned char is_space[256];
+extern FAKE_CONST unsigned char trigraph_table[256];
+#undef FAKE_CONST
/* Stack of conditionals currently in progress
(including both successful and failing conditionals). */
@@ -667,8 +675,9 @@ typedef struct if_stack IF_STACK_FRAME;
extern void cpp_buf_line_and_col PARAMS((cpp_buffer *, long *, long *));
extern cpp_buffer* cpp_file_buffer PARAMS((cpp_reader *));
-extern void cpp_define PARAMS ((cpp_reader*, unsigned char *));
+extern void cpp_define PARAMS ((cpp_reader *, unsigned char *));
extern void cpp_assert PARAMS ((cpp_reader *, unsigned char *));
+extern void cpp_undef PARAMS ((cpp_reader *, unsigned char *));
extern void cpp_error PVPROTO ((cpp_reader *, const char *, ...))
ATTRIBUTE_PRINTF_2;
@@ -705,6 +714,16 @@ extern int scan_decls PARAMS ((cpp_reader *, int, char **));
extern void skip_rest_of_line PARAMS ((cpp_reader *));
extern void cpp_finish PARAMS ((cpp_reader *));
+extern void quote_string PARAMS ((cpp_reader *, const char *));
+extern void cpp_expand_to_buffer PARAMS ((cpp_reader *, U_CHAR *, int));
+extern void cpp_scan_buffer PARAMS ((cpp_reader *));
+extern int check_macro_name PARAMS ((cpp_reader *, U_CHAR *, int));
+
+/* Last arg to output_line_command. */
+enum file_change_code {same_file, enter_file, leave_file};
+extern void output_line_command PARAMS ((cpp_reader *, int,
+ enum file_change_code));
+
/* From cpperror.c */
extern void cpp_fatal PVPROTO ((cpp_reader *, const char *, ...))
ATTRIBUTE_PRINTF_2;
@@ -729,9 +748,6 @@ extern int finclude PROTO ((cpp_reader *, int,
extern void deps_output PROTO ((cpp_reader *, char *, int));
extern struct include_hash *include_hash PROTO ((cpp_reader *, char *, int));
-/* cppinit.c */
-extern void initialize_char_syntax PROTO ((int));
-
#ifndef INCLUDE_LEN_FUDGE
#define INCLUDE_LEN_FUDGE 0
#endif