diff options
author | neil <neil@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-05-17 20:16:48 +0000 |
---|---|---|
committer | neil <neil@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-05-17 20:16:48 +0000 |
commit | 0bb657046056b7eb4f07247102f7178955569f48 (patch) | |
tree | 06c8cca4d252c4189a9e560a900afba199add8fc /gcc/cpphash.h | |
parent | 9f3643d19552a7736160ffa7a06b5c006f2bedf0 (diff) | |
download | gcc-0bb657046056b7eb4f07247102f7178955569f48.tar.gz |
* Makefile.in: Update for cpptrad.c.
* cpphash.h (struct cpp_buffer): New members for buffer
overlays.
(struct cpp_reader): New members for traditional output.
(_cpp_read_logical_line, _cpp_overlay_buffer): New.
* cppinit.c (cpp_create_reader): Set trad_line.
(cpp_destroy): Free trad_out_base if used.
(cpp_read_main_file): Overlay an empty buffer if traditional.
(cpp_finish_options): Don't do builtins.
(COMMAND_LINE_OPTIONS): Add -traditional-cpp.
(cpp_handle_option): Handle it.
* cpplex.c (continue_after_nul): New.
(_cpp_lex_direct): Use handle_nul.
* cpplib.h (struct cpp_options): New traditional option.
* cpptrad.c: New file.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@53568 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cpphash.h')
-rw-r--r-- | gcc/cpphash.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc/cpphash.h b/gcc/cpphash.h index 3d82316372a..dcbb4fc1ae6 100644 --- a/gcc/cpphash.h +++ b/gcc/cpphash.h @@ -245,6 +245,9 @@ struct cpp_buffer /* 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; + + /* Used for buffer overlays by cpptrad.c. */ + const uchar *saved_cur, *saved_rlimit, *saved_line_base; }; /* A cpp_reader encapsulates the "state" of a pre-processor run. @@ -355,6 +358,11 @@ struct cpp_reader /* Whether cpplib owns the hashtable. */ unsigned char our_hashtable; + + /* Traditional preprocessing output buffer. */ + uchar *trad_out_base, *trad_out_limit; + uchar *trad_out_cur; + unsigned int trad_line; }; /* Character classes. Based on the more primitive macros in safe-ctype.h. @@ -447,6 +455,11 @@ extern void _cpp_do_file_change PARAMS ((cpp_reader *, enum lc_reason, unsigned int, unsigned int)); extern void _cpp_pop_buffer PARAMS ((cpp_reader *)); +/* In cpptrad.c. */ +extern bool _cpp_read_logical_line_trad PARAMS ((cpp_reader *)); +extern void _cpp_overlay_buffer PARAMS ((cpp_reader *pfile, const uchar *, + size_t)); + /* Utility routines and macros. */ #define DSC(str) (const uchar *)str, sizeof str - 1 #define xnew(T) (T *) xmalloc (sizeof(T)) |