summaryrefslogtreecommitdiffstats
path: root/usr.bin/mandoc/mandocdb.c
diff options
context:
space:
mode:
authorschwarze <schwarze@openbsd.org>2014-04-03 16:26:53 +0000
committerschwarze <schwarze@openbsd.org>2014-04-03 16:26:53 +0000
commita10a1a6fc507993c8f3ba92c935d06fc57ec6392 (patch)
treee3e1daf5eb7c645400f8ee2addbca39ffa4ee673 /usr.bin/mandoc/mandocdb.c
parentUpdate Copyright notice; ok otto@ beck@ deraadt@. (diff)
downloadwireguard-openbsd-a10a1a6fc507993c8f3ba92c935d06fc57ec6392.tar.xz
wireguard-openbsd-a10a1a6fc507993c8f3ba92c935d06fc57ec6392.zip
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 'usr.bin/mandoc/mandocdb.c')
-rw-r--r--usr.bin/mandoc/mandocdb.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/usr.bin/mandoc/mandocdb.c b/usr.bin/mandoc/mandocdb.c
index 45d04251fd0..1313372f435 100644
--- a/usr.bin/mandoc/mandocdb.c
+++ b/usr.bin/mandoc/mandocdb.c
@@ -1,4 +1,4 @@
-/* $Id: mandocdb.c,v 1.82 2014/04/03 15:37:14 schwarze Exp $ */
+/* $Id: mandocdb.c,v 1.83 2014/04/03 16:26:53 schwarze Exp $ */
/*
* Copyright (c) 2011, 2012 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2011, 2012, 2013, 2014 Ingo Schwarze <schwarze@openbsd.org>
@@ -349,7 +349,7 @@ mandocdb(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;
@@ -370,6 +370,9 @@ mandocdb(int argc, char *argv[])
case ('n'):
nodb = 1;
break;
+ case ('p'):
+ warnings = 1;
+ break;
case ('Q'):
mparse_options |= MPARSE_QUICK;
break;
@@ -392,8 +395,8 @@ mandocdb(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;
@@ -498,10 +501,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);