summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2001-12-05 09:59:17 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2001-12-05 09:59:17 +0000
commiteeea782a64089a34cc4c879e7ece70a3fce5d652 (patch)
tree700fb18f834f37f4799b1fce50a956a2623f9dd5
parente33070deae1608f3368799ff7ff96ca43b9a3093 (diff)
at least make this more real
-rw-r--r--share/misc/getopt8
1 files changed, 4 insertions, 4 deletions
diff --git a/share/misc/getopt b/share/misc/getopt
index 423967811f6..08b7ddc2733 100644
--- a/share/misc/getopt
+++ b/share/misc/getopt
@@ -1,4 +1,4 @@
-/* $OpenBSD: getopt,v 1.4 2001/07/15 20:54:20 pvalchev Exp $ */
+/* $OpenBSD: getopt,v 1.5 2001/12/05 09:59:16 deraadt Exp $ */
/*
* Main/getopt(3) fragment.
*
@@ -6,7 +6,6 @@
*/
#include <sys/types.h>
-
#include <stdlib.h>
void usage __P((void));
@@ -18,7 +17,7 @@ main(argc, argv)
{
int ch;
- while ((ch = getopt(argc, argv, "")) != -1)
+ while ((ch = getopt(argc, argv, "abcf:")) != -1)
switch (ch) {
case '':
break;
@@ -31,9 +30,10 @@ main(argc, argv)
}
void
-usage()
+usage(void)
{
extern char *__progname;
+
(void)fprintf(stderr, "usage: %s [-abc] [-f file]\n", __progname);
exit(1);
}