diff options
author | 2013-09-16 00:25:06 +0000 | |
---|---|---|
committer | 2013-09-16 00:25:06 +0000 | |
commit | c645d318a5843b5428514e8c453396b6e04d4f52 (patch) | |
tree | 7461dc7249ba40fd5e6f7bd3241b3b0e740f7075 | |
parent | Some missing .Pa macros in FILES sections; (diff) | |
download | wireguard-openbsd-c645d318a5843b5428514e8c453396b6e04d4f52.tar.xz wireguard-openbsd-c645d318a5843b5428514e8c453396b6e04d4f52.zip |
One of the WARNING messages has to use the word "section" twice in two
different meanings, that cannot be helped. But we can make this less
confusing by stating that the second instance refers to stuff like (2),
(3), and (9), and by adding the sections header the first instance
refers to, for example ERRORS or RETURN VALUES.
Source for confusion noticed by Jan Stary <hans at stare dot cz>,
better wording suggested by jmc@, tweaked by me.
-rw-r--r-- | usr.bin/mandoc/mandoc.h | 4 | ||||
-rw-r--r-- | usr.bin/mandoc/mdoc_validate.c | 5 | ||||
-rw-r--r-- | usr.bin/mandoc/read.c | 4 |
3 files changed, 7 insertions, 6 deletions
diff --git a/usr.bin/mandoc/mandoc.h b/usr.bin/mandoc/mandoc.h index 0e2187d6f24..6cf0d6a6382 100644 --- a/usr.bin/mandoc/mandoc.h +++ b/usr.bin/mandoc/mandoc.h @@ -1,4 +1,4 @@ -/* $Id: mandoc.h,v 1.53 2013/08/08 20:07:24 schwarze Exp $ */ +/* $Id: mandoc.h,v 1.54 2013/09/16 00:25:06 schwarze Exp $ */ /* * Copyright (c) 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2012, 2013 Ingo Schwarze <schwarze@openbsd.org> @@ -65,7 +65,7 @@ enum mandocerr { MANDOCERR_BADNAMESEC, /* bad NAME section contents */ MANDOCERR_SECOOO, /* sections out of conventional order */ MANDOCERR_SECREP, /* duplicate section name */ - MANDOCERR_SECMSEC, /* section not in conventional manual section */ + MANDOCERR_SECMSEC, /* section header suited to sections ... */ /* related to macros and nesting */ MANDOCERR_MACROOBS, /* skipping obsolete macro */ diff --git a/usr.bin/mandoc/mdoc_validate.c b/usr.bin/mandoc/mdoc_validate.c index 621eeefd56e..50afcfe0031 100644 --- a/usr.bin/mandoc/mdoc_validate.c +++ b/usr.bin/mandoc/mdoc_validate.c @@ -1,4 +1,4 @@ -/* $Id: mdoc_validate.c,v 1.110 2013/08/05 14:32:56 schwarze Exp $ */ +/* $Id: mdoc_validate.c,v 1.111 2013/09/16 00:25:06 schwarze Exp $ */ /* * Copyright (c) 2008-2012 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2010, 2011, 2012 Ingo Schwarze <schwarze@openbsd.org> @@ -1960,7 +1960,8 @@ post_sh_head(POST_ARGS) break; if (*mdoc->meta.msec == '9') break; - mdoc_nmsg(mdoc, mdoc->last, MANDOCERR_SECMSEC); + mandoc_msg(MANDOCERR_SECMSEC, mdoc->parse, + mdoc->last->line, mdoc->last->pos, buf); break; default: break; diff --git a/usr.bin/mandoc/read.c b/usr.bin/mandoc/read.c index bb85374e636..55056952660 100644 --- a/usr.bin/mandoc/read.c +++ b/usr.bin/mandoc/read.c @@ -1,4 +1,4 @@ -/* $Id: read.c,v 1.16 2013/07/13 12:51:38 schwarze Exp $ */ +/* $Id: read.c,v 1.17 2013/09/16 00:25:06 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2010, 2011, 2012, 2013 Ingo Schwarze <schwarze@openbsd.org> @@ -98,7 +98,7 @@ static const char * const mandocerrs[MANDOCERR_MAX] = { "bad NAME section contents", "sections out of conventional order", "duplicate section name", - "section not in conventional manual section", + "section header suited to sections 2, 3, and 9 only", /* related to macros and nesting */ "skipping obsolete macro", |