[hackers] [scc] Add file name in file error reports || Roberto E. Vargas Caballero
commit e8b4caf9a047bd46d53cd9dc6c61575204c47d65
Author: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
AuthorDate: Wed Aug 12 17:32:56 2015 +0200
Commit: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
CommitDate: Wed Aug 12 17:37:36 2015 +0200
Add file name in file error reports
diff --git a/cc1/lex.c b/cc1/lex.c
index 2c8dd39..3aaba68 100644
--- a/cc1/lex.c
+++ b/cc1/lex.c
_AT_@ -45,9 +45,10 @@ ilex(char *fname)
fp = stdin;
fname = "<stdin>";
} else {
- if ((fp = fopen(fname, "r")) == NULL)
- die("error opening output:%s", strerror(errno));
- fname = fname;
+ if ((fp = fopen(fname, "r")) == NULL) {
+ die("error opening input '%s':%s",
+ fname, strerror(errno));
+ }
}
allocinput(fname, fp);
*input->begin = '\0';
Received on Wed Aug 12 2015 - 17:43:18 CEST
This archive was generated by hypermail 2.3.0
: Wed Aug 12 2015 - 17:48:18 CEST