diff options
author | mestre <mestre@cvs.openbsd.org> | 2016-03-07 12:07:58 +0000 |
---|---|---|
committer | mestre <mestre@cvs.openbsd.org> | 2016-03-07 12:07:58 +0000 |
commit | bc31d3ab9380405749109f50c712a4ff98a7b573 (patch) | |
tree | 757450abe6a8a34b28ea9250a9edb99e061a025c /games/morse | |
parent | 6b01e9e6ca0144f4e1dca633ed40522da3b9ff79 (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/morse')
-rw-r--r-- | games/morse/morse.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/games/morse/morse.c b/games/morse/morse.c index ae246ad67e0..f703b5c8434 100644 --- a/games/morse/morse.c +++ b/games/morse/morse.c @@ -1,4 +1,4 @@ -/* $OpenBSD: morse.c,v 1.21 2016/01/19 23:21:26 sthen Exp $ */ +/* $OpenBSD: morse.c,v 1.22 2016/03/07 12:07:56 mestre Exp $ */ /* * Copyright (c) 1988, 1993 @@ -142,9 +142,10 @@ main(int argc, char *argv[]) case 's': sflag = 1; break; - case '?': case 'h': + case 'h': default: - fprintf(stderr, "usage: morse [-d | -s] [string ...]\n"); + fprintf(stderr, "usage: %s [-d | -s] [string ...]\n", + getprogname()); return 1; } argc -= optind; |