diff options
author | Neil Booth <neil@daikokuya.demon.co.uk> | 2001-02-21 07:29:56 +0000 |
---|---|---|
committer | Neil Booth <neil@gcc.gnu.org> | 2001-02-21 07:29:56 +0000 |
commit | 373e217703ba0c771832fb8f634c98022f5be353 (patch) | |
tree | 63deedc494f43a8e08b2973548c30e790dcbbe8d /gcc/cppfiles.c | |
parent | 75beacf8857ecce10fcfdaf4e00dbe21cb56e224 (diff) | |
download | gcc-373e217703ba0c771832fb8f634c98022f5be353.zip gcc-373e217703ba0c771832fb8f634c98022f5be353.tar.gz gcc-373e217703ba0c771832fb8f634c98022f5be353.tar.bz2 |
cppfiles.c: Update comments.
* cppfiles.c: Update comments.
(_cpp_read_file): Don't check for NULL filenames any more.
* cppinit.c (cpp_start_read): Don't do canonicalization of
in_fname and out_fname. Use the passed file name exclusively.
(_cpp_handle_options): Don't treat "-" as a command line option,
but as a normal filename.
(_cpp_post_options): Canonicalize in_fname and out_fname.
* cppmain.c (printer_init): Don't check out_fname for NULL.
* c-lex.c (orig_filename): Rename cpp_filename for clarity.
(init_c_lex): Update, and use "" to represent stdin to CPP.
(yyparse): Update.
From-SVN: r39938
Diffstat (limited to 'gcc/cppfiles.c')
-rw-r--r-- | gcc/cppfiles.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/gcc/cppfiles.c b/gcc/cppfiles.c index 49b7958..25bc37d 100644 --- a/gcc/cppfiles.c +++ b/gcc/cppfiles.c @@ -174,7 +174,8 @@ _cpp_fake_include (pfile, fname) create one with a non-NULL value (regardless of success in opening the file). If the file doesn't exist or is inaccessible, this entry is flagged so we don't attempt to open it again in the - future. If the file isn't open, open it. + future. If the file isn't open, open it. The empty string is + interpreted as stdin. Returns an include_file structure with an open file descriptor on success, or NULL on failure. */ @@ -755,18 +756,13 @@ _cpp_compare_file_date (pfile, f) /* Push an input buffer and load it up with the contents of FNAME. - If FNAME is "" or NULL, read standard input. */ + If FNAME is "", read standard input. */ int _cpp_read_file (pfile, fname) cpp_reader *pfile; const char *fname; { - struct include_file *f; - - if (fname == NULL) - fname = ""; - - f = open_file (pfile, fname); + struct include_file *f = open_file (pfile, fname); if (f == NULL) { |