summaryrefslogtreecommitdiffstats
path: root/main.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2015-01-20 21:16:51 +0000
committerIngo Schwarze <schwarze@openbsd.org>2015-01-20 21:16:51 +0000
commit222b2747ea0806609b71ff5fa9a4c6f21ddc3c46 (patch)
tree056a00f20a99a44fa9017101a00d94f962a4d8fd /main.c
parent7b1d8d6cb19169cc19bdb9708793a3cbedf63b81 (diff)
downloadmandoc-222b2747ea0806609b71ff5fa9a4c6f21ddc3c46.tar.gz
Split the -Werror message level into -Werror (broken manual, probably
using mandoc is better than using groff) and -Wunsupp (manual using unsupported low-level roff(7) feature, probably using groff is better than using mandoc). Once this feature is complete, it is intended to help porting, making the decision whether to USE_GROFF easier. As a first step, distinguish four classes of roff(7) requests: 1. Supported (currently 24 requests) 2. Currently ignored because unimportant (120) -> no message 3. Ignored for good because insecure (14) -> -Werror 4. Currently unsupported (68) -> these trigger the new -Wunsupp messages
Diffstat (limited to 'main.c')
-rw-r--r--main.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/main.c b/main.c
index 6c818252..16d7ee0d 100644
--- a/main.c
+++ b/main.c
@@ -889,14 +889,15 @@ static int
woptions(struct curparse *curp, char *arg)
{
char *v, *o;
- const char *toks[6];
+ const char *toks[7];
toks[0] = "stop";
toks[1] = "all";
toks[2] = "warning";
toks[3] = "error";
- toks[4] = "fatal";
- toks[5] = NULL;
+ toks[4] = "unsupp";
+ toks[5] = "fatal";
+ toks[6] = NULL;
while (*arg) {
o = arg;
@@ -913,6 +914,9 @@ woptions(struct curparse *curp, char *arg)
curp->wlevel = MANDOCLEVEL_ERROR;
break;
case 4:
+ curp->wlevel = MANDOCLEVEL_UNSUPP;
+ break;
+ case 5:
curp->wlevel = MANDOCLEVEL_BADARG;
break;
default: