Fix some error messages

There's many more to go.
This commit is contained in:
sin
2014-11-17 16:22:01 +00:00
parent cb7cbde722
commit af8e38f5fa
5 changed files with 9 additions and 14 deletions

6
comm.c
View File

@@ -44,7 +44,7 @@ main(int argc, char *argv[])
if (argv[i][0] == '-')
argv[i] = "/dev/fd/0";
if (!(fp[i] = fopen(argv[i], "r")))
eprintf("comm: '%s':", argv[i]);
eprintf("fopen %s:", argv[i]);
}
for (;;) {
@@ -94,9 +94,9 @@ nextline(char *buf, int n, FILE *f, char *name)
{
buf = fgets(buf, n, f);
if (!buf && !feof(f))
eprintf("comm: '%s':", name);
eprintf("%s: read error:", name);
if (buf && !strchr(buf, '\n'))
eprintf("comm: '%s': line too long.\n", name);
eprintf("%s: line too long\n", name);
return buf;
}