summaryrefslogtreecommitdiff
path: root/games/bcd
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/bcd
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/bcd')
-rw-r--r--games/bcd/bcd.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/games/bcd/bcd.c b/games/bcd/bcd.c
index 096d6fe8ce3..59b15bb1f84 100644
--- a/games/bcd/bcd.c
+++ b/games/bcd/bcd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bcd.c,v 1.24 2016/01/08 20:15:15 mestre Exp $ */
+/* $OpenBSD: bcd.c,v 1.25 2016/03/07 12:07:55 mestre Exp $ */
/* $NetBSD: bcd.c,v 1.6 1995/04/24 12:22:23 cgd Exp $ */
/*
@@ -115,11 +115,11 @@ int decode(char *buf);
int columns = 48;
-
int
main(int argc, char *argv[])
{
char cardline[1024];
+ extern char *__progname;
int dflag = 0;
int ch;
@@ -135,8 +135,9 @@ main(int argc, char *argv[])
columns = 80;
break;
default:
- fprintf(stderr, "usage: bcd [-l] [string ...]\n");
- fprintf(stderr, "usage: bcd -d [-l]\n");
+ fprintf(stderr, "usage: %s [-l] [string ...]\n",
+ __progname);
+ fprintf(stderr, "usage: %s -d [-l]\n", __progname);
return 1;
}
}