aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2013-09-16 00:25:07 +0000
committerIngo Schwarze <schwarze@openbsd.org>2013-09-16 00:25:07 +0000
commit7065f8b98467bd2b3eb0b482f9cb152ebc43fbf6 (patch)
tree3333d5181e4608e4aa6d5d25ab07fc13ca6c2858
parent65b766571856f5cfee4214a504db5177a5232a3a (diff)
downloadmandoc-7065f8b98467bd2b3eb0b482f9cb152ebc43fbf6.tar.gz
mandoc-7065f8b98467bd2b3eb0b482f9cb152ebc43fbf6.tar.zst
mandoc-7065f8b98467bd2b3eb0b482f9cb152ebc43fbf6.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--mandoc.h4
-rw-r--r--mdoc_validate.c5
-rw-r--r--read.c4
3 files changed, 7 insertions, 6 deletions
diff --git a/mandoc.h b/mandoc.h
index cc4d7946..c2406e95 100644
--- a/mandoc.h
+++ b/mandoc.h
@@ -1,4 +1,4 @@
-/* $Id: mandoc.h,v 1.109 2013/08/08 20:07:47 schwarze Exp $ */
+/* $Id: mandoc.h,v 1.110 2013/09/16 00:25:07 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/mdoc_validate.c b/mdoc_validate.c
index a681d82e..8ffc3937 100644
--- a/mdoc_validate.c
+++ b/mdoc_validate.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc_validate.c,v 1.192 2013/08/05 14:36:01 schwarze Exp $ */
+/* $Id: mdoc_validate.c,v 1.193 2013/09/16 00:25:07 schwarze Exp $ */
/*
* Copyright (c) 2008-2012 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010, 2011, 2012 Ingo Schwarze <schwarze@openbsd.org>
@@ -1964,7 +1964,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/read.c b/read.c
index 0ec58ecb..511ba7dc 100644
--- a/read.c
+++ b/read.c
@@ -1,4 +1,4 @@
-/* $Id: read.c,v 1.38 2013/07/13 12:52:07 schwarze Exp $ */
+/* $Id: read.c,v 1.39 2013/09/16 00:25:07 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010, 2011, 2012, 2013 Ingo Schwarze <schwarze@openbsd.org>
@@ -106,7 +106,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",