diff options
author | Per Bothner <pbothner@apple.com> | 2003-10-02 07:23:27 +0000 |
---|---|---|
committer | Per Bothner <bothner@gcc.gnu.org> | 2003-10-02 00:23:27 -0700 |
commit | 4dc299fbbed1b96ca647123280ffd3874666460b (patch) | |
tree | d42ac396e3c05ffb67c9335d47f0193aefee767b /gcc/fix-header.c | |
parent | a506c55cb1000de54bb5a2907e10f31113c46133 (diff) | |
download | gcc-4dc299fbbed1b96ca647123280ffd3874666460b.zip gcc-4dc299fbbed1b96ca647123280ffd3874666460b.tar.gz gcc-4dc299fbbed1b96ca647123280ffd3874666460b.tar.bz2 |
cppinit.c (cpp_read_main_file): Split into two functions: Distribute _cpp_stack_file call over the two functions.
* cppinit.c (cpp_read_main_file): Split into two functions:
Distribute _cpp_stack_file call over the two functions.
(cpp_find_main_file): New function.
Don't call _cpp_do_file_change even if working_directory flag set.
(cpp_push_main_file): New function.
* cppfiles.c (_cpp_find_failed): New helper function.
(find_file): Made non-static and renamed to _cpp_find_file.
(_cpp_stack_file): No longer needed. But note the following.
(stack_file): Made non-static and renamed to _cpp_stack_file.
* fix-header.c (cpp_read_main_file): Replace cpp_read_main_file
call with calls to cpp_find_main_file and cpp_push_main_file.
(search_path_head): If there is no current buffer, use main_file.
* cpphash.h: Update function declarations.
* cpplib.h: Update function declarations.
From-SVN: r72014
Diffstat (limited to 'gcc/fix-header.c')
-rw-r--r-- | gcc/fix-header.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/fix-header.c b/gcc/fix-header.c index 8ae3025..7fdecb5 100644 --- a/gcc/fix-header.c +++ b/gcc/fix-header.c @@ -604,8 +604,9 @@ read_scan_file (char *in_fname, int argc, char **argv) options->inhibit_errors = 1; cpp_post_options (scan_in); - if (! cpp_read_main_file (scan_in, in_fname)) + if (!cpp_find_main_file (scan_in, in_fname)) exit (FATAL_EXIT_CODE); + cpp_push_main_file (scan_in); cpp_change_file (scan_in, LC_RENAME, "<built-in>"); cpp_init_builtins (scan_in, true); @@ -669,7 +670,7 @@ read_scan_file (char *in_fname, int argc, char **argv) /* Scan the macro expansion of "getchar();". */ cpp_push_buffer (scan_in, getchar_call, sizeof(getchar_call) - 1, - /* from_stage3 */ true, 1); + /* from_stage3 */ true); for (;;) { const cpp_token *t = cpp_get_token (scan_in); |