summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorAaron Campbell <aaron@cvs.openbsd.org>1999-07-23 13:56:19 +0000
committerAaron Campbell <aaron@cvs.openbsd.org>1999-07-23 13:56:19 +0000
commit51c6fa9940e0c85f6172702c97383b7198c4e216 (patch)
treef15fd05a88d052964b5d84f0e67e3e6a2261e1a0 /usr.bin
parent193275208f104d335682d80b870dd63dacf3c79f (diff)
- Make error msgs more consistent with other usr.bin/ utils.
- Use warn() instead of an fprintf().
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/head/head.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.bin/head/head.c b/usr.bin/head/head.c
index 8636cb7c37d..9f44b376c07 100644
--- a/usr.bin/head/head.c
+++ b/usr.bin/head/head.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: head.c,v 1.4 1999/07/23 13:14:32 aaron Exp $ */
+/* $OpenBSD: head.c,v 1.5 1999/07/23 13:56:18 aaron Exp $ */
/*
* Copyright (c) 1980, 1987 Regents of the University of California.
@@ -41,7 +41,7 @@ char copyright[] =
#ifndef lint
/*static char sccsid[] = "from: @(#)head.c 5.5 (Berkeley) 6/1/90";*/
-static char rcsid[] = "$OpenBSD: head.c,v 1.4 1999/07/23 13:14:32 aaron Exp $";
+static char rcsid[] = "$OpenBSD: head.c,v 1.5 1999/07/23 13:56:18 aaron Exp $";
#endif /* not lint */
#include <stdio.h>
@@ -89,9 +89,9 @@ main(argc, argv)
if (p) {
if ((linecnt == LONG_MIN || linecnt == LONG_MAX) &&
errno == ERANGE)
- err(1, "invalid line count: %s", p);
+ err(1, "illegal line count -- %s", p);
else if (linecnt <= 0 || *inval)
- errx(1, "invalid line count: %s", p);
+ errx(1, "illegal line count -- %s", p);
}
/* setlinebuf(stdout); */
@@ -102,7 +102,7 @@ main(argc, argv)
}
else {
if (!freopen(*argv, "r", stdin)) {
- fprintf(stderr, "head: can't read %s.\n", *argv++);
+ warn("%s", *argv++);
continue;
}
if (argc > 1) {