diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1998-07-20 19:46:16 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1998-07-20 19:46:16 +0000 |
commit | 17f9c2693f6fe75c8d45e2d7d5fa32758b9bfd43 (patch) | |
tree | d129107b9b08d948ccc28cdea5640f843aa110cf /usr.bin/sort | |
parent | a355de2e3ef06e2b59ecaaa287062dace7ec0c2f (diff) |
fix usage correctly
Diffstat (limited to 'usr.bin/sort')
-rw-r--r-- | usr.bin/sort/sort.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/usr.bin/sort/sort.c b/usr.bin/sort/sort.c index 6882b70035b..5be58698a71 100644 --- a/usr.bin/sort/sort.c +++ b/usr.bin/sort/sort.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sort.c,v 1.7 1998/07/20 19:14:37 mickey Exp $ */ +/* $OpenBSD: sort.c,v 1.8 1998/07/20 19:46:15 deraadt Exp $ */ /*- * Copyright (c) 1993 @@ -46,7 +46,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)sort.c 8.1 (Berkeley) 6/6/93"; #else -static char rcsid[] = "$OpenBSD: sort.c,v 1.7 1998/07/20 19:14:37 mickey Exp $"; +static char rcsid[] = "$OpenBSD: sort.c,v 1.8 1998/07/20 19:46:15 deraadt Exp $"; #endif #endif /* not lint */ @@ -176,7 +176,8 @@ main(argc, argv) /* accept -y for backwards compat. */ break; case '?': - default: usage(""); + default: + usage(NULL); } } @@ -307,10 +308,11 @@ static void usage(msg) char *msg; { + extern char *__progname; if (msg) (void)fprintf(stderr, "sort: %s\n", msg); - (void)fprintf(stderr, "usage: [-T dir] [-o output] [-cmubdfinr] " - "[-t char] [-R char] [-k keydef] ... [files]\n"); + (void)fprintf(stderr, "usage: %s [-T dir] [-o output] [-cmubdfinr] " + "[-t char] [-R char] [-k keydef] ... [files]\n", __progname); exit(2); } |