From 41a9aa85e255a4f2cf8d2dcab82a1a7a82429e0b Mon Sep 17 00:00:00 2001 From: neil Date: Thu, 7 Dec 2000 07:14:42 +0000 Subject: * c-common.c (parse_in): Make a cpp_reader *. * cppfiles.c (_cpp_fake_include): Remove. * cpphash.h: Similarly. * cpplib.c (do_line): Don't call _cpp_fake_include. A valid #line always creates a callback; FC_RENAME if there are no #line flags. * fix-header.c (read_scan_file): cpp_push_buffer cannot fail. The first EOF must be our get_char buffer. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@38101 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/fix-header.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'gcc/fix-header.c') diff --git a/gcc/fix-header.c b/gcc/fix-header.c index 872751257ab..281e4c411c9 100644 --- a/gcc/fix-header.c +++ b/gcc/fix-header.c @@ -649,26 +649,21 @@ read_scan_file (in_fname, argc, argv) { static const unsigned char getchar_call[] = "getchar();"; int seen_filbuf = 0; - cpp_buffer *buf = CPP_BUFFER (scan_in); - if (cpp_push_buffer (scan_in, getchar_call, - sizeof(getchar_call) - 1) == NULL) - return; /* Scan the macro expansion of "getchar();". */ + cpp_push_buffer (scan_in, getchar_call, sizeof(getchar_call) - 1); for (;;) { cpp_token t; cpp_get_token (scan_in, &t); if (t.type == CPP_EOF) - { - cpp_pop_buffer (scan_in); - if (CPP_BUFFER (scan_in) == buf) - break; - } + break; else if (cpp_ideq (&t, "_filbuf")) seen_filbuf++; } + cpp_pop_buffer (scan_in); + if (seen_filbuf) { int need_filbuf = !SEEN (fn) && !REQUIRED (fn); -- cgit v1.2.1