diff options
author | Zack Weinberg <zack@wolery.cumb.org> | 2000-05-02 16:09:12 +0000 |
---|---|---|
committer | Zack Weinberg <zack@gcc.gnu.org> | 2000-05-02 16:09:12 +0000 |
commit | c56c2073a6268960931acd0b852b6186d4bde179 (patch) | |
tree | 90422d7ae261276adf06a32d02442c9b52f52170 /gcc/cppfiles.c | |
parent | 753e6cf1b64ccc2e8f7946d4a7a010f82ff99c31 (diff) | |
download | gcc-c56c2073a6268960931acd0b852b6186d4bde179.zip gcc-c56c2073a6268960931acd0b852b6186d4bde179.tar.gz gcc-c56c2073a6268960931acd0b852b6186d4bde179.tar.bz2 |
cpplib.h (CPP_POP, [...]): Delete.
* cpplib.h (CPP_POP, parse_cleanup_t): Delete.
(cpp_buffer): Remove cleanup, seen_eof, manual_pop members.
* cppfiles.c (file_cleanup): Delete.
* cpphash.c (macro_cleanup): Delete.
(collect_objlike_expansion, collect_funlike_expansion,
macarg, scan_arguments): Remove CPP_POP case.
* cpplex.c (null_cleanup): Delete.
(cpp_pop_buffer): Do the work that was done in the cleanups
here. Call _cpp_unwind_if_stack from here.
(_cpp_expand_to_buffer, cpp_scan_buffer_nooutput,
cpp_scan_buffer): Run until we see CPP_EOF and the top of
stack is the buffer _below_ the one we stacked.
(cpp_get_token): Always pop an exhausted buffer. Return
CPP_EOF unless it's a macro buffer. Don't call _cpp_handle_eof.
* cpplib.c (skip_if_group): Don't call cpp_get_token to
increment the line number.
(_cpp_handle_eof): Rename to _cpp_unwind_if_stack.
* fix-header.c (read_scan_file) [parsing getchar()]: Run until
we see CPP_EOF and the top of stack is the buffer _below_ the
one we stacked.
* scan-decls.c: Likewise.
From-SVN: r33611
Diffstat (limited to 'gcc/cppfiles.c')
-rw-r--r-- | gcc/cppfiles.c | 22 |
1 files changed, 1 insertions, 21 deletions
diff --git a/gcc/cppfiles.c b/gcc/cppfiles.c index 8fb2e0e..5ec9d14 100644 --- a/gcc/cppfiles.c +++ b/gcc/cppfiles.c @@ -42,7 +42,6 @@ static struct file_name_list *actual_directory PARAMS ((cpp_reader *, const char *)); static unsigned int hash_IHASH PARAMS ((const void *)); static int eq_IHASH PARAMS ((const void *, const void *)); -static int file_cleanup PARAMS ((cpp_buffer *, cpp_reader *)); static int find_include_file PARAMS ((cpp_reader *, const char *, struct file_name_list *, IHASH **, int *)); @@ -194,24 +193,6 @@ make_IHASH (name, fname, path, hash, slot) return ih; } -static int -file_cleanup (pbuf, pfile) - cpp_buffer *pbuf; - cpp_reader *pfile; -{ - if (pbuf->buf) - free ((PTR) pbuf->buf); - if (pfile->system_include_depth) - pfile->system_include_depth--; - if (pfile->potential_control_macro) - { - pbuf->ihash->control_macro = pfile->potential_control_macro; - pfile->potential_control_macro = 0; - } - pfile->input_stack_listing_current = 0; - return 0; -} - /* Centralize calls to open(2) here. This provides a hook for future changes which might, e.g. look for and open a precompiled version of the header. It also means all the magic currently associated @@ -639,7 +620,7 @@ _cpp_execute_include (pfile, fname, len, no_reinclude, search_start) if (read_include_file (pfile, fd, ihash)) { if (angle_brackets) - pfile->system_include_depth++; /* Decremented in file_cleanup. */ + pfile->system_include_depth++; } } @@ -771,7 +752,6 @@ read_include_file (pfile, fd, ihash) fp->system_header_p = ihash->foundhere->sysp; fp->lineno = 1; fp->line_base = fp->buf; - fp->cleanup = file_cleanup; /* The ->actual_dir field is only used when ignore_srcdir is not in effect; see do_include */ |