From a10ec99a9e84c08949262ab8bf8bb8037daebec6 Mon Sep 17 00:00:00 2001 From: Jan-Simon Pendry Date: Fri, 1 Apr 1994 14:42:09 -0800 Subject: [PATCH 1/1] fix error message. prettyness police SCCS-vsn: usr.bin/cmp/special.c 8.2 --- usr/src/usr.bin/cmp/special.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/usr/src/usr.bin/cmp/special.c b/usr/src/usr.bin/cmp/special.c index 236e6ab44c..2dbacbf83b 100644 --- a/usr/src/usr.bin/cmp/special.c +++ b/usr/src/usr.bin/cmp/special.c @@ -6,31 +6,33 @@ */ #ifndef lint -static char sccsid[] = "@(#)special.c 8.1 (Berkeley) %G%"; +static char sccsid[] = "@(#)special.c 8.2 (Berkeley) %G%"; #endif /* not lint */ #include -#include + +#include #include #include #include + #include "extern.h" void c_special(fd1, file1, skip1, fd2, file2, skip2) int fd1, fd2; char *file1, *file2; - register off_t skip1, skip2; + off_t skip1, skip2; { - register int ch1, ch2; - register off_t byte, line; + int ch1, ch2; + off_t byte, line; FILE *fp1, *fp2; int dfound; if ((fp1 = fdopen(fd1, "r")) == NULL) - err("%s: %s", file1, strerror(errno)); + err(ERR_EXIT, "%s", file1); if ((fp2 = fdopen(fd2, "r")) == NULL) - err("%s: %s", file1, strerror(errno)); + err(ERR_EXIT, "%s", file2); while (skip1--) if (getc(fp1) == EOF) @@ -57,9 +59,9 @@ c_special(fd1, file1, skip1, fd2, file2, skip2) } eof: if (ferror(fp1)) - err("%s: %s", file1, strerror(errno)); + err(ERR_EXIT, "%s", file1); if (ferror(fp2)) - err("%s: %s", file2, strerror(errno)); + err(ERR_EXIT, "%s", file2); if (feof(fp1)) { if (!feof(fp2)) eofmsg(file1); @@ -67,5 +69,5 @@ eof: if (ferror(fp1)) if (feof(fp2)) eofmsg(file2); if (dfound) - exit(1); + exit(DIFF_EXIT); } -- 2.20.1