diff options
author | Aaron Campbell <aaron@cvs.openbsd.org> | 2000-11-21 13:22:41 +0000 |
---|---|---|
committer | Aaron Campbell <aaron@cvs.openbsd.org> | 2000-11-21 13:22:41 +0000 |
commit | 35a9b418fb904da4bbd23c1f0ccf7b00ee4a2eb1 (patch) | |
tree | a23882e9b099308e08e324aa2357af3835e45f6a /usr.bin/cksum/cksum.c | |
parent | 092d32600d114328fcd16c2491145e353cecd02c (diff) |
Use __progname in usage() since this may be invoked as "sum" as
well; mpech@prosoft.org.lv
Diffstat (limited to 'usr.bin/cksum/cksum.c')
-rw-r--r-- | usr.bin/cksum/cksum.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.bin/cksum/cksum.c b/usr.bin/cksum/cksum.c index 72d74ce7d5d..307d6cd031a 100644 --- a/usr.bin/cksum/cksum.c +++ b/usr.bin/cksum/cksum.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cksum.c,v 1.4 1997/06/28 22:24:24 grr Exp $ */ +/* $OpenBSD: cksum.c,v 1.5 2000/11/21 13:22:40 aaron Exp $ */ /* $NetBSD: cksum.c,v 1.7 1995/09/02 05:45:18 jtc Exp $ */ /*- @@ -47,7 +47,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)cksum.c 8.2 (Berkeley) 4/28/95"; #endif -static char rcsid[] = "$OpenBSD: cksum.c,v 1.4 1997/06/28 22:24:24 grr Exp $"; +static char rcsid[] = "$OpenBSD: cksum.c,v 1.5 2000/11/21 13:22:40 aaron Exp $"; #endif /* not lint */ #include <sys/cdefs.h> @@ -66,6 +66,8 @@ static char rcsid[] = "$OpenBSD: cksum.c,v 1.4 1997/06/28 22:24:24 grr Exp $"; void usage __P((void)); +extern char *__progname; + int main(argc, argv) int argc; @@ -76,7 +78,6 @@ main(argc, argv) char *fn; int (*cfncn) __P((int, u_int32_t *, u_int32_t *)); void (*pfncn) __P((char *, u_int32_t, u_int32_t)); - extern char *__progname; setlocale(LC_ALL, ""); @@ -134,7 +135,6 @@ main(argc, argv) void usage() { - - (void)fprintf(stderr, "usage: cksum [-o 1 | 2] [file ...]\n"); + (void)fprintf(stderr, "usage: %s [-o 1 | 2] [file ...]\n", __progname); exit(1); } |