diff options
author | Neil Booth <neil@daikokuya.demon.co.uk> | 2002-06-10 17:20:30 +0000 |
---|---|---|
committer | Neil Booth <neil@gcc.gnu.org> | 2002-06-10 17:20:30 +0000 |
commit | afb03408e0b8683bced2c82adfe6c7d4524a9845 (patch) | |
tree | 3647064a5aa3fefaeb653cfe1fe72a31f0f47578 /gcc/cpptrad.c | |
parent | 2754d3c5acdcddf405360d38a9c071c0280c06ce (diff) | |
download | gcc-afb03408e0b8683bced2c82adfe6c7d4524a9845.zip gcc-afb03408e0b8683bced2c82adfe6c7d4524a9845.tar.gz gcc-afb03408e0b8683bced2c82adfe6c7d4524a9845.tar.bz2 |
cpphash.h (_cpp_read_logical_line_trad, [...]): Update prototypes.
* cpphash.h (_cpp_read_logical_line_trad,
_cpp_expansions_different_trad): Update prototypes.
* cpplex.c (continue_after_nul): New.
* cppmain.c: Include cpphash.h.
(scan_translation_unit_trad): New.
(cpp_preprocess_file): Call it.
* cpptrad.c (_cpp_read_logical_line_trad): Take new parameter
overlay.
(_cpp_expansions_different_trad): Update prototype.
From-SVN: r54446
Diffstat (limited to 'gcc/cpptrad.c')
-rw-r--r-- | gcc/cpptrad.c | 27 |
1 files changed, 17 insertions, 10 deletions
diff --git a/gcc/cpptrad.c b/gcc/cpptrad.c index 4a76f96..18d5adb 100644 --- a/gcc/cpptrad.c +++ b/gcc/cpptrad.c @@ -298,15 +298,18 @@ restore_buff (pfile) /* Reads a logical line into the output buffer. Returns TRUE if there is more text left in the buffer. */ bool -_cpp_read_logical_line_trad (pfile) +_cpp_read_logical_line_trad (pfile, overlay) cpp_reader *pfile; + int overlay; { cpp_buffer *buffer; - unsigned int first_line; + unsigned int first_line = 0; - restore_buff (pfile); - - first_line = pfile->line = pfile->trad_line; + if (overlay) + { + restore_buff (pfile); + first_line = pfile->line = pfile->trad_line; + } buffer = pfile->buffer; if (buffer->cur == buffer->rlimit) @@ -330,10 +333,14 @@ _cpp_read_logical_line_trad (pfile) scan_out_logical_line (pfile, NULL); buffer->cur = CUR (pfile->context); - pfile->trad_line = pfile->line; - pfile->line = first_line; - _cpp_overlay_buffer (pfile, pfile->trad_out_base, - pfile->trad_out_cur - pfile->trad_out_base); + if (overlay) + { + pfile->trad_line = pfile->line; + pfile->line = first_line; + _cpp_overlay_buffer (pfile, pfile->trad_out_base, + pfile->trad_out_cur - pfile->trad_out_base); + } + return true; } @@ -855,7 +862,7 @@ canonicalize_text (dest, src, len, pquote) than in the form of their whitespace. */ bool _cpp_expansions_different_trad (macro1, macro2) - cpp_macro *macro1, *macro2; + const cpp_macro *macro1, *macro2; { uchar *p1 = xmalloc (macro1->count + macro2->count); uchar *p2 = p1 + macro1->count; |