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:
Roberto E. Vargas Caballero 2016-01-01 17:40:32 +01:00 committed by sin
parent c5e28b5fe9
commit b2ef7e73e0

4
ed.c
View File

@ -609,8 +609,8 @@ doread(char *fname)
if (fp)
fclose(fp);
if (!(fp = fopen(fname, "r")))
error("input/output error");
if ((fp = fopen(fname, "r")) == NULL)
error("cannot open input file");
curln = line2;
for (cnt = 0; (n = getline(&s, &len, fp)) > 0; cnt += (size_t)n) {