aboutsummaryrefslogtreecommitdiff
path: root/gcc/cpphash.h
diff options
context:
space:
mode:
authorNeil Booth <neil@daikokuya.co.uk>2002-06-19 05:40:08 +0000
committerNeil Booth <neil@gcc.gnu.org>2002-06-19 05:40:08 +0000
commit278c466207b2d592d8ea21234d6cb228b95bc246 (patch)
tree3c3d821dfd3b04ed9aaf9b7fbdf7297ca8b32a1f /gcc/cpphash.h
parent9d7b4c5a4ff06264dd94b5da29bd32ffc8e4435a (diff)
downloadgcc-278c466207b2d592d8ea21234d6cb228b95bc246.zip
gcc-278c466207b2d592d8ea21234d6cb228b95bc246.tar.gz
gcc-278c466207b2d592d8ea21234d6cb228b95bc246.tar.bz2
cpphash.h (struct cpp_reader): Make date and time strings.
* cpphash.h (struct cpp_reader): Make date and time strings. (_cpp_builtin_macro_text, _cpp_copy_replacement_text, _cpp_replacement_text_len): New. * cppinit.c (cpp_create_reader): Update. (init_builtins): Register appropriate builtins for -traditional-cpp. * cppmacro.c (new_number_token): Remove. (_cpp_builtin_macro_text): New. (builtin_macro): Use it. (cpp_macro_definition): Update to handle traditional macros. * cppmain.c (cb_line_change): Don't do column positioning for traditional output. * cpptrad.c (enum ls): Rename ls_fun_macro to ls_fun_open. New state ls_fun_close. (skip_whitespace): Fix. (maybe_start_funlike): Don't set state.parsing_args. (scan_out_logical_line): Remove duplicate error. Use lex_state rather than state.parsing_args. (push_replacement_text): Handle builtins. (_cpp_replacement_text_len, _cpp_copy_replacement_text): New. From-SVN: r54771
Diffstat (limited to 'gcc/cpphash.h')
-rw-r--r--gcc/cpphash.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/gcc/cpphash.h b/gcc/cpphash.h
index 98dfb49..ee9a47e 100644
--- a/gcc/cpphash.h
+++ b/gcc/cpphash.h
@@ -370,9 +370,9 @@ struct cpp_reader
for include files. (Altered as we get more of them.) */
unsigned int max_include_len;
- /* Date and time tokens. Calculated together if either is requested. */
- cpp_token date;
- cpp_token time;
+ /* Date and time text. Calculated together if either is requested. */
+ const uchar *date;
+ const uchar *time;
/* EOF token, and a token forcing paste avoidance. */
cpp_token avoid_paste;
@@ -475,7 +475,8 @@ extern bool _cpp_save_parameter PARAMS ((cpp_reader *, cpp_macro *,
extern bool _cpp_arguments_ok PARAMS ((cpp_reader *, cpp_macro *,
const cpp_hashnode *,
unsigned int));
-
+extern const uchar *_cpp_builtin_macro_text PARAMS ((cpp_reader *,
+ cpp_hashnode *));
/* In cpphash.c */
extern void _cpp_init_hashtable PARAMS ((cpp_reader *, hash_table *));
extern void _cpp_destroy_hashtable PARAMS ((cpp_reader *));
@@ -532,6 +533,8 @@ extern void _cpp_set_trad_context PARAMS ((cpp_reader *));
extern bool _cpp_create_trad_definition PARAMS ((cpp_reader *, cpp_macro *));
extern bool _cpp_expansions_different_trad PARAMS ((const cpp_macro *,
const cpp_macro *));
+extern uchar *_cpp_copy_replacement_text PARAMS ((const cpp_macro *, uchar *));
+extern size_t _cpp_replacement_text_len PARAMS ((const cpp_macro *));
/* Utility routines and macros. */
#define DSC(str) (const uchar *)str, sizeof str - 1