]> git.eshelyaron.com Git - emacs.git/commit
Improve etags I/O error reporting
authorPaul Eggert <eggert@cs.ucla.edu>
Sun, 24 May 2015 21:20:09 +0000 (14:20 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Sun, 24 May 2015 21:20:09 +0000 (14:20 -0700)
commit379d77dfa3a03083517114e1ce32bb72137aea05
tree74104c55d057e646d3ea10c1e05ae1400fe6b613
parent3441b0cc61d88edb921bbf27462f3f961e794b4d
Improve etags I/O error reporting

* lib-src/etags.c:
Don't include sys/types.h and sys/stat.h; no longer needed.
(infilename): New static var.
(process_file_name): Don't call 'stat'.  Instead, just open the
file for reading and report any errors.  Don't bother making
a copy of the file argument; it's not needed.  Be more careful to
use the failing errno when reporting an error.
Quote the real name better (though no perfectly)
when passing it to the shell.
(reset_input): New function, which reports I/O errors.
All uses of 'rewind' changed to use this function.
(perhaps_more_input): New function, which also checks for
I/O errors.  All uses of 'feof' changed to use this function.
(analyze_regex): Report an error if fclose fails.
(readline_internal): Report an error if getc fails.
(etags_mktmp): Return an error if close fails.
lib-src/etags.c