summaryrefslogtreecommitdiff
path: root/games/cribbage
diff options
context:
space:
mode:
authormestre <mestre@cvs.openbsd.org>2016-03-07 12:07:58 +0000
committermestre <mestre@cvs.openbsd.org>2016-03-07 12:07:58 +0000
commitbc31d3ab9380405749109f50c712a4ff98a7b573 (patch)
tree757450abe6a8a34b28ea9250a9edb99e061a025c /games/cribbage
parent6b01e9e6ca0144f4e1dca633ed40522da3b9ff79 (diff)
- General changes:
- Remove -? from getopt(3) options, but still keep (or add) -h where applicable - Replace hardcoded program strings by getprogname(3) - Specific changes: - atc(6): this used -? and -u for usage(), remove both from game and manpage - bcd(6): use __progname instead of getprogname(3), no need to include stdlib.h - hunt(6): replace fputs(3) by fprintf(3) OK tb@ after his suggestions
Diffstat (limited to 'games/cribbage')
-rw-r--r--games/cribbage/crib.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/games/cribbage/crib.c b/games/cribbage/crib.c
index 6e04b4bddfa..e45fbd2c335 100644
--- a/games/cribbage/crib.c
+++ b/games/cribbage/crib.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: crib.c,v 1.22 2016/01/07 16:00:32 tb Exp $ */
+/* $OpenBSD: crib.c,v 1.23 2016/03/07 12:07:56 mestre Exp $ */
/* $NetBSD: crib.c,v 1.7 1997/07/10 06:47:29 mikel Exp $ */
/*-
@@ -47,7 +47,7 @@ main(int argc, char *argv[])
if (pledge("stdio rpath tty proc exec", NULL) == -1)
err(1, "pledge");
- while ((ch = getopt(argc, argv, "emqr")) != -1)
+ while ((ch = getopt(argc, argv, "ehmqr")) != -1)
switch (ch) {
case 'e':
explain = TRUE;
@@ -61,9 +61,10 @@ main(int argc, char *argv[])
case 'r':
rflag = TRUE;
break;
- case '?':
+ case 'h':
default:
- (void) fprintf(stderr, "usage: cribbage [-emqr]\n");
+ (void) fprintf(stderr, "usage: %s [-emqr]\n",
+ getprogname());
return 1;
}