From a9b1751368b8c68b9ffecaf639e1ea0b620025b4 Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Tue, 4 Jul 2017 14:40:31 +0000 Subject: Printing "BASE:" in messages about violations of base system conventions is confusing, simply print "STYLE:", which is intuitive and does not sound excessively alarming; suggested by jmc@, OK tedu@ jmc@. --- usr.bin/mandoc/main.c | 5 ++--- usr.bin/mandoc/mandoc.1 | 10 ++++++++-- usr.bin/mandoc/read.c | 4 ++-- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/usr.bin/mandoc/main.c b/usr.bin/mandoc/main.c index 20b6b1e4ccc..7710854ed97 100644 --- a/usr.bin/mandoc/main.c +++ b/usr.bin/mandoc/main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: main.c,v 1.201 2017/07/02 21:17:12 schwarze Exp $ */ +/* $OpenBSD: main.c,v 1.202 2017/07/04 14:40:30 schwarze Exp $ */ /* * Copyright (c) 2008-2012 Kristaps Dzonsons * Copyright (c) 2010-2012, 2014-2017 Ingo Schwarze @@ -1059,8 +1059,7 @@ mmsg(enum mandocerr t, enum mandoclevel lvl, if (line) fprintf(stderr, "%d:%d:", line, col + 1); - fprintf(stderr, " %s", - t < MANDOCERR_STYLE ? "BASE" : mparse_strlevel(lvl)); + fprintf(stderr, " %s", mparse_strlevel(lvl)); if ((mparse_msg = mparse_strerror(t)) != NULL) fprintf(stderr, ": %s", mparse_msg); diff --git a/usr.bin/mandoc/mandoc.1 b/usr.bin/mandoc/mandoc.1 index 26e2cf4a20c..abef1cd3373 100644 --- a/usr.bin/mandoc/mandoc.1 +++ b/usr.bin/mandoc/mandoc.1 @@ -1,4 +1,4 @@ -.\" $OpenBSD: mandoc.1,v 1.137 2017/07/03 17:33:01 schwarze Exp $ +.\" $OpenBSD: mandoc.1,v 1.138 2017/07/04 14:40:30 schwarze Exp $ .\" .\" Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons .\" Copyright (c) 2012, 2014-2017 Ingo Schwarze @@ -15,7 +15,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: July 3 2017 $ +.Dd $Mdocdate: July 4 2017 $ .Dt MANDOC 1 .Os .Sh NAME @@ -762,6 +762,12 @@ A convertion used in the base system of a specific operating system is not adhered to. These are not markup mistakes, and neither the quality of formatting nor portability are in danger. +Messages of the +.Cm base +level are printed with the more intuitive +.Cm style +.Ar level +tag. .El .Pp Messages of the diff --git a/usr.bin/mandoc/read.c b/usr.bin/mandoc/read.c index 6853493da5a..c7ee01560a9 100644 --- a/usr.bin/mandoc/read.c +++ b/usr.bin/mandoc/read.c @@ -1,4 +1,4 @@ -/* $OpenBSD: read.c,v 1.159 2017/07/03 17:33:01 schwarze Exp $ */ +/* $OpenBSD: read.c,v 1.160 2017/07/04 14:40:30 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons * Copyright (c) 2010-2017 Ingo Schwarze @@ -71,7 +71,7 @@ static void mparse_parse_buffer(struct mparse *, struct buf, static const enum mandocerr mandoclimits[MANDOCLEVEL_MAX] = { MANDOCERR_OK, - MANDOCERR_STYLE, + MANDOCERR_OK, MANDOCERR_WARNING, MANDOCERR_ERROR, MANDOCERR_UNSUPP, -- cgit v1.2.3