summaryrefslogtreecommitdiffstats
path: root/man_validate.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2011-03-22 15:30:30 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2011-03-22 15:30:30 +0000
commit95efc599afc482072cf9239b5f78898fa1ea21e1 (patch)
tree0db179a7886f6e53ad8b19aa52f00a3fc11ede80 /man_validate.c
parentbedb65e1b9182d146e4d3dce643e0c4c85d91605 (diff)
downloadmandoc-95efc599afc482072cf9239b5f78898fa1ea21e1.tar.gz
Make empty sections and parts (SH, SS, RS) only produce a warning if it
has no children. Noted by Brad, added to TODO by schwarze@.
Diffstat (limited to 'man_validate.c')
-rw-r--r--man_validate.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/man_validate.c b/man_validate.c
index 1325e776..b9e1ff51 100644
--- a/man_validate.c
+++ b/man_validate.c
@@ -323,7 +323,8 @@ check_sec(CHKARGS)
man_nmsg(m, n, MANDOCERR_SYNTARGCOUNT);
return(0);
} else if (MAN_BODY == n->type && 0 == n->nchild)
- man_nmsg(m, n, MANDOCERR_NOBODY);
+ mandoc_msg(MANDOCERR_ARGCWARN, m->parse, n->line,
+ n->pos, "want children (have none)");
return(1);
}
@@ -334,7 +335,8 @@ check_part(CHKARGS)
{
if (MAN_BODY == n->type && 0 == n->nchild)
- man_nmsg(m, n, MANDOCERR_NOBODY);
+ mandoc_msg(MANDOCERR_ARGCWARN, m->parse, n->line,
+ n->pos, "want children (have none)");
return(1);
}