summaryrefslogtreecommitdiffstats
path: root/mandocdb.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2014-04-03 16:27:28 +0000
committerIngo Schwarze <schwarze@openbsd.org>2014-04-03 16:27:28 +0000
commit2fcbd1967fefe0ad3a462b25726a0cbd7483bfd7 (patch)
treec8f9947254533e84d7cb3d73144e09e7da1da2b4 /mandocdb.c
parentfdd608127e8ead8ff552fb6cdd590a74c4397d6d (diff)
downloadmandoc-2fcbd1967fefe0ad3a462b25726a0cbd7483bfd7.tar.gz
Rename the -W option to -p (mnemonics: picky, print to stderr):
That letter was already chosen by espie@ for OpenBSD 2.7, so avoid being gratuitiously different more than a decade later. Accept -v for backward compatibility with espie@'s makewhatis, even though it does nothing right now.
Diffstat (limited to 'mandocdb.c')
-rw-r--r--mandocdb.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/mandocdb.c b/mandocdb.c
index cfc71398..46b6c3b0 100644
--- a/mandocdb.c
+++ b/mandocdb.c
@@ -357,7 +357,7 @@ main(int argc, char *argv[])
path_arg = NULL;
op = OP_DEFAULT;
- while (-1 != (ch = getopt(argc, argv, "aC:Dd:nQT:tu:W")))
+ while (-1 != (ch = getopt(argc, argv, "aC:Dd:npQT:tu:v")))
switch (ch) {
case ('a'):
use_all = 1;
@@ -378,6 +378,9 @@ main(int argc, char *argv[])
case ('n'):
nodb = 1;
break;
+ case ('p'):
+ warnings = 1;
+ break;
case ('Q'):
mparse_options |= MPARSE_QUICK;
break;
@@ -400,8 +403,8 @@ main(int argc, char *argv[])
path_arg = optarg;
op = OP_DELETE;
break;
- case ('W'):
- warnings = 1;
+ case ('v'):
+ /* Compatibility with espie@'s makewhatis. */
break;
default:
goto usage;
@@ -506,10 +509,10 @@ out:
ohash_delete(&mlinks);
return(exitcode);
usage:
- fprintf(stderr, "usage: %s [-aDnQW] [-C file] [-Tutf8]\n"
- " %s [-aDnQW] [-Tutf8] dir ...\n"
- " %s [-DnQW] [-Tutf8] -d dir [file ...]\n"
- " %s [-DnW] -u dir [file ...]\n"
+ fprintf(stderr, "usage: %s [-aDnpQ] [-C file] [-Tutf8]\n"
+ " %s [-aDnpQ] [-Tutf8] dir ...\n"
+ " %s [-DnpQ] [-Tutf8] -d dir [file ...]\n"
+ " %s [-Dnp] -u dir [file ...]\n"
" %s [-Q] -t file ...\n",
progname, progname, progname,
progname, progname);