aboutsummaryrefslogtreecommitdiffstatshomepage
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
commit044764c2d25699e39c7fff5f15bbed4438c3caa8 (patch)
tree7055c1815599d43a170b96db93f48ad9c499d3b7 /main.c
parent72e22512ed66a8fcb8179518b188df77ad2db85a (diff)
downloadmandoc-044764c2d25699e39c7fff5f15bbed4438c3caa8.tar.gz
mandoc-044764c2d25699e39c7fff5f15bbed4438c3caa8.tar.zst
mandoc-044764c2d25699e39c7fff5f15bbed4438c3caa8.zip
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.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/main.c b/main.c
index 30e076f2..d1f9ff92 100644
--- a/main.c
+++ b/main.c
@@ -1,4 +1,4 @@
-/* $Id: main.c,v 1.216 2015/01/16 21:15:05 schwarze Exp $ */
+/* $Id: main.c,v 1.217 2015/01/20 21:16:51 schwarze Exp $ */
/*
* Copyright (c) 2008-2012 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010-2012, 2014, 2015 Ingo Schwarze <schwarze@openbsd.org>
@@ -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: