ed: Correct error message when open file
"input/output" error was to general and could create confusion. All the other ed implementations give a "cannot open input file"
This commit is contained in:
parent
c5e28b5fe9
commit
b2ef7e73e0
4
ed.c
4
ed.c
@ -609,8 +609,8 @@ doread(char *fname)
|
|||||||
|
|
||||||
if (fp)
|
if (fp)
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
if (!(fp = fopen(fname, "r")))
|
if ((fp = fopen(fname, "r")) == NULL)
|
||||||
error("input/output error");
|
error("cannot open input file");
|
||||||
|
|
||||||
curln = line2;
|
curln = line2;
|
||||||
for (cnt = 0; (n = getline(&s, &len, fp)) > 0; cnt += (size_t)n) {
|
for (cnt = 0; (n = getline(&s, &len, fp)) > 0; cnt += (size_t)n) {
|
||||||
|
Loading…
Reference in New Issue
Block a user