diff options
author | Neil Booth <neil@daikokuya.demon.co.uk> | 2002-01-03 21:43:09 +0000 |
---|---|---|
committer | Neil Booth <neil@gcc.gnu.org> | 2002-01-03 21:43:09 +0000 |
commit | 5d8ebbd862cb31e73a3a3c9f16adc274cc6ef924 (patch) | |
tree | 3504047f1de0b4702b0d0d4991c780df4a3aad89 /gcc/cppfiles.c | |
parent | 518c131126e5829ed7e911b3421327ebef4dfb00 (diff) | |
download | gcc-5d8ebbd862cb31e73a3a3c9f16adc274cc6ef924.zip gcc-5d8ebbd862cb31e73a3a3c9f16adc274cc6ef924.tar.gz gcc-5d8ebbd862cb31e73a3a3c9f16adc274cc6ef924.tar.bz2 |
cpperror.c: Update comments and copyright.
* cpperror.c: Update comments and copyright.
* cppexp.c, cppfiles.c, cpphash.c, cpphash.h, cppinit.c,
cpplex.c, cpplib.c, cpplib.h, cppmacro.c, cppmain.c: Similarly.
From-SVN: r48522
Diffstat (limited to 'gcc/cppfiles.c')
-rw-r--r-- | gcc/cppfiles.c | 30 |
1 files changed, 13 insertions, 17 deletions
diff --git a/gcc/cppfiles.c b/gcc/cppfiles.c index 11fc325..b60e4eb 100644 --- a/gcc/cppfiles.c +++ b/gcc/cppfiles.c @@ -1,6 +1,6 @@ /* Part of CPP library. (include file handling) Copyright (C) 1986, 1987, 1989, 1992, 1993, 1994, 1995, 1998, - 1999, 2000, 2001 Free Software Foundation, Inc. + 1999, 2000, 2001, 2002 Free Software Foundation, Inc. Written by Per Bothner, 1994. Based on CCCP program by Paul Rubin, June 1986 Adapted to ANSI C, Richard Stallman, Jan 1987 @@ -212,7 +212,6 @@ _cpp_fake_include (pfile, fname) Returns an include_file structure with an open file descriptor on success, or NULL on failure. */ - static struct include_file * open_file (pfile, filename) cpp_reader *pfile; @@ -276,7 +275,6 @@ open_file (pfile, filename) stack, unless there are errors, or the file is not re-included because of e.g. multiple-include guards. Returns true if a buffer is stacked. */ - static bool stack_include_file (pfile, inc) cpp_reader *pfile; @@ -351,7 +349,6 @@ stack_include_file (pfile, inc) and block devices. FIXME: Flush file cache and try again if we run out of memory. */ - static int read_include_file (pfile, inc) cpp_reader *pfile; @@ -467,6 +464,7 @@ read_include_file (pfile, inc) return 1; } +/* Drop INC's buffer from memory, if we are unlikely to need it again. */ static void purge_cache (inc) struct include_file *inc; @@ -524,8 +522,7 @@ cpp_included (pfile, fname) un-openable), in which case an error code will be in errno. If there is no include path to use it returns NO_INCLUDE_PATH, otherwise an include_file structure. If this request originates - from a #include_next directive, set INCLUDE_NEXT to true. */ - + from a directive of TYPE #include_next, set INCLUDE_NEXT to true. */ static struct include_file * find_include_file (pfile, header, type) cpp_reader *pfile; @@ -612,6 +609,7 @@ _cpp_report_missing_guards (pfile) (PTR) &banner); } +/* Callback function for splay_tree_foreach(). */ static int report_missing_guard (n, b) splay_tree_node n; @@ -633,7 +631,9 @@ report_missing_guard (n, b) return 0; } -/* Create a dependency, or issue an error message as appropriate. */ +/* Create a dependency for file FNAME, or issue an error message as + appropriate. ANGLE_BRACKETS is non-zero if the file was bracketed + like <..>. */ static void handle_missing_header (pfile, fname, angle_brackets) cpp_reader *pfile; @@ -679,8 +679,9 @@ handle_missing_header (pfile, fname, angle_brackets) cpp_error_from_errno (pfile, fname); } -/* Handles #include-family directives, and the command line -imacros - and -include. Returns true if a buffer was stacked. */ +/* Handles #include-family directives (distinguished by TYPE), + including HEADER, and the command line -imacros and -include. + Returns true if a buffer was stacked. */ bool _cpp_execute_include (pfile, header, type) cpp_reader *pfile; @@ -746,8 +747,8 @@ _cpp_read_file (pfile, fname) return stack_include_file (pfile, f); } -/* Do appropriate cleanup when a file buffer is popped off the input - stack. Push the next -include file, if any remain. */ +/* Do appropriate cleanup when a file INC's buffer is popped off the + input stack. Push the next -include file, if any remain. */ bool _cpp_pop_file_buffer (pfile, inc) cpp_reader *pfile; @@ -841,7 +842,6 @@ search_from (pfile, type) such as DOS. The format of the file name map file is just a series of lines with two tokens on each line. The first token is the name to map, and the second token is the actual name to use. */ - struct file_name_map { struct file_name_map *map_next; @@ -852,8 +852,7 @@ struct file_name_map #define FILE_NAME_MAP_FILE "header.gcc" /* Read a space delimited string of unlimited length from a stdio - file. */ - + file F. */ static char * read_filename_string (ch, f) int ch; @@ -884,7 +883,6 @@ read_filename_string (ch, f) } /* This structure holds a linked list of file name maps, one per directory. */ - struct file_name_map_list { struct file_name_map_list *map_list_next; @@ -893,7 +891,6 @@ struct file_name_map_list }; /* Read the file name map file for DIRNAME. */ - static struct file_name_map * read_name_map (pfile, dirname) cpp_reader *pfile; @@ -1069,7 +1066,6 @@ remove_component_p (path) Guarantees no trailing slashes. All transforms reduce the length of the string. Returns PATH. errno is 0 if no error occurred; nonzero if an error occurred when using stat () or lstat (). */ - char * _cpp_simplify_pathname (path) char *path; |