From d1678bc67c1a9a12253410e4f89a38f715f2a499 Mon Sep 17 00:00:00 2001 From: zack Date: Tue, 2 May 2000 16:09:12 +0000 Subject: * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@33611 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/cppfiles.c | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) (limited to 'gcc/cppfiles.c') diff --git a/gcc/cppfiles.c b/gcc/cppfiles.c index 8fb2e0ee05d..5ec9d14f476 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 */ -- cgit v1.2.3