aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/read.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 /read.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 'read.c')
-rw-r--r--read.c22
1 files changed, 13 insertions, 9 deletions
diff --git a/read.c b/read.c
index 3b127aa1..67c0027d 100644
--- a/read.c
+++ b/read.c
@@ -1,4 +1,4 @@
-/* $Id: read.c,v 1.111 2015/01/15 04:26:40 schwarze Exp $ */
+/* $Id: read.c,v 1.112 2015/01/20 21:16:51 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010-2015 Ingo Schwarze <schwarze@openbsd.org>
@@ -80,7 +80,7 @@ static const enum mandocerr mandoclimits[MANDOCLEVEL_MAX] = {
MANDOCERR_WARNING,
MANDOCERR_WARNING,
MANDOCERR_ERROR,
- MANDOCERR_MAX,
+ MANDOCERR_UNSUPP,
MANDOCERR_MAX,
MANDOCERR_MAX
};
@@ -180,22 +180,18 @@ static const char * const mandocerrs[MANDOCERR_MAX] = {
"unexpected end of equation",
/* related to tables */
- "bad table syntax",
- "bad table option",
- "bad table layout",
"no table layout cells specified",
"no table data cells specified",
"ignore data in cell",
"data block still open",
"ignoring extra data cells",
- "ignoring macro in table",
/* related to document structure and macros */
NULL,
- "input too large",
"input stack limit exceeded, infinite loop?",
"skipping bad character",
"skipping unknown macro",
+ "skipping insecure request",
"skipping item outside list",
"skipping column outside column list",
"skipping end of block that is not open",
@@ -216,6 +212,14 @@ static const char * const mandocerrs[MANDOCERR_MAX] = {
"skipping all arguments",
"skipping excess arguments",
"divide by zero",
+
+ "unsupported feature",
+ "input too large",
+ "unsupported roff request",
+ "unsupported table syntax",
+ "unsupported table option",
+ "unsupported table layout",
+ "ignoring macro in table",
};
static const char * const mandoclevels[MANDOCLEVEL_MAX] = {
@@ -223,7 +227,7 @@ static const char * const mandoclevels[MANDOCLEVEL_MAX] = {
"RESERVED",
"WARNING",
"ERROR",
- "FATAL",
+ "UNSUPP",
"BADARG",
"SYSERR"
};
@@ -958,7 +962,7 @@ mandoc_msg(enum mandocerr er, struct mparse *m,
{
enum mandoclevel level;
- level = MANDOCLEVEL_ERROR;
+ level = MANDOCLEVEL_UNSUPP;
while (er < mandoclimits[level])
level--;