diff options
author | neil <neil@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-02-21 07:29:56 +0000 |
---|---|---|
committer | neil <neil@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-02-21 07:29:56 +0000 |
commit | 7e555f5f60ed5adf91885c2c2b4f02687f131210 (patch) | |
tree | 63deedc494f43a8e08b2973548c30e790dcbbe8d /gcc/cppfiles.c | |
parent | 3970e8910fe5cfbdfcdb502b5e2aa2a53a92fda4 (diff) | |
download | ppe42-gcc-7e555f5f60ed5adf91885c2c2b4f02687f131210.tar.gz ppe42-gcc-7e555f5f60ed5adf91885c2c2b4f02687f131210.zip |
* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@39938 138bc75d-0d04-0410-961f-82ee72b054a4
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 49b7958e287..25bc37df1a8 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) { |