sbase

suckless unix tools
git clone git://git.2f30.org/sbase.git
Log | Files | Refs | README | LICENSE

commit 4ff2cf5476d3dbe8237d1ceafb65e4dc3010297c
parent 3af46a0a2b6ec54b1d3702bef97d71352fa01b32
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Fri Jan  1 17:40:32 +0100

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"

Diffstat:
ed.c | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/ed.c b/ed.c @@ -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) {