From 044764c2d25699e39c7fff5f15bbed4438c3caa8 Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Tue, 20 Jan 2015 21:16:51 +0000 Subject: 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 --- main.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'main.c') 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 * Copyright (c) 2010-2012, 2014, 2015 Ingo Schwarze @@ -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: -- cgit v1.2.3-56-ge451