summaryrefslogtreecommitdiff
path: root/usr.bin/mandoc/read.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@cvs.openbsd.org>2017-05-16 19:05:37 +0000
committerIngo Schwarze <schwarze@cvs.openbsd.org>2017-05-16 19:05:37 +0000
commitf38e3508f1967d2d226800b68148fc2cb9ff5dbb (patch)
treeac37c36e8cf0db66dcb510848cc949312c3030b7 /usr.bin/mandoc/read.c
parent9105adfe16e53039e90772d3594b86cf741fa942 (diff)
Introduce a new mandoc(1) message level, -W style, below -W warning.
Switch -W all from meaning -W warning to meaning -W style. The meaning of -T lint does *not* change, it still implies -W warning. No messages on the new level yet, but they will come. Usually, i do not lightly make the user interface larger. But this has been planned for years, and EXIT STATUS 1 was reserved for it all the time. The message system is now stable enough to finally implement it. jmc@ regarding the concept: "really good idea"
Diffstat (limited to 'usr.bin/mandoc/read.c')
-rw-r--r--usr.bin/mandoc/read.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.bin/mandoc/read.c b/usr.bin/mandoc/read.c
index fe2aad9e198..1ea665b33b8 100644
--- a/usr.bin/mandoc/read.c
+++ b/usr.bin/mandoc/read.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: read.c,v 1.136 2017/04/29 12:43:55 schwarze Exp $ */
+/* $OpenBSD: read.c,v 1.137 2017/05/16 19:05:36 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010-2017 Ingo Schwarze <schwarze@openbsd.org>
@@ -71,7 +71,7 @@ static void mparse_parse_buffer(struct mparse *, struct buf,
static const enum mandocerr mandoclimits[MANDOCLEVEL_MAX] = {
MANDOCERR_OK,
- MANDOCERR_WARNING,
+ MANDOCERR_STYLE,
MANDOCERR_WARNING,
MANDOCERR_ERROR,
MANDOCERR_UNSUPP,
@@ -82,6 +82,7 @@ static const enum mandocerr mandoclimits[MANDOCLEVEL_MAX] = {
static const char * const mandocerrs[MANDOCERR_MAX] = {
"ok",
+ "generic style suggestion",
"generic warning",
/* related to the prologue */
@@ -237,7 +238,7 @@ static const char * const mandocerrs[MANDOCERR_MAX] = {
static const char * const mandoclevels[MANDOCLEVEL_MAX] = {
"SUCCESS",
- "RESERVED",
+ "STYLE",
"WARNING",
"ERROR",
"UNSUPP",