summaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
authorPeter Valchev <pvalchev@cvs.openbsd.org>2001-07-15 20:54:21 +0000
committerPeter Valchev <pvalchev@cvs.openbsd.org>2001-07-15 20:54:21 +0000
commitc6bfc4d9831e977475644520cd9330afb4636216 (patch)
tree638b5f809d6ef5c641eceb2181bb2ea5e9ebe9b2 /share
parentf2ddc463bf2ef7eddddabefe54769927ccc7db5a (diff)
do not hard-code program name - sync usage() with style(9); ok millert
Diffstat (limited to 'share')
-rw-r--r--share/misc/getopt5
1 files changed, 3 insertions, 2 deletions
diff --git a/share/misc/getopt b/share/misc/getopt
index 77861ed750f..423967811f6 100644
--- a/share/misc/getopt
+++ b/share/misc/getopt
@@ -1,4 +1,4 @@
-/* $OpenBSD: getopt,v 1.3 2000/03/02 14:46:51 todd Exp $ */
+/* $OpenBSD: getopt,v 1.4 2001/07/15 20:54:20 pvalchev Exp $ */
/*
* Main/getopt(3) fragment.
*
@@ -33,6 +33,7 @@ main(argc, argv)
void
usage()
{
- (void)fprintf(stderr, "usage: program [-abc] [-f file]\n");
+ extern char *__progname;
+ (void)fprintf(stderr, "usage: %s [-abc] [-f file]\n", __progname);
exit(1);
}