summaryrefslogtreecommitdiff
path: root/usr.bin/mandoc
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@cvs.openbsd.org>2010-07-02 17:41:06 +0000
committerIngo Schwarze <schwarze@cvs.openbsd.org>2010-07-02 17:41:06 +0000
commitc2a5bb9f1ad76a9f75eb56c84bf3ae7fb32dbda2 (patch)
tree743b18970489c735b8c9337f1e277b462f7d71b6 /usr.bin/mandoc
parent3e0af5ec85e0fe2f9cb51541466d2567ea534a8f (diff)
Not only for -tag lists, but for -hang, -ohang, -inset, -diag,
and -item list as well, empty bodies are OK, they do not even warrant a warning, much less the error they were throwing. According to kristaps, joerg@ also brought this up some time ago. ok kristaps@ jmc@
Diffstat (limited to 'usr.bin/mandoc')
-rw-r--r--usr.bin/mandoc/mdoc_validate.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/usr.bin/mandoc/mdoc_validate.c b/usr.bin/mandoc/mdoc_validate.c
index 3fb8d30cb56..bdd143a3ff2 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.63 2010/06/27 21:54:42 schwarze Exp $ */
+/* $Id: mdoc_validate.c,v 1.64 2010/07/02 17:41:05 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@bsd.lv>
*
@@ -1067,9 +1067,6 @@ post_it(POST_ARGS)
if (NULL == mdoc->last->head->child)
if ( ! mdoc_nmsg(mdoc, mdoc->last, MANDOCERR_NOARGS))
return(0);
- if (NULL == mdoc->last->body->child)
- if ( ! mdoc_nmsg(mdoc, mdoc->last, MANDOCERR_NOBODY))
- return(0);
break;
case (LIST_bullet):
/* FALLTHROUGH */
@@ -1078,14 +1075,14 @@ post_it(POST_ARGS)
case (LIST_enum):
/* FALLTHROUGH */
case (LIST_hyphen):
+ if (NULL == mdoc->last->body->child)
+ if ( ! mdoc_nmsg(mdoc, mdoc->last, MANDOCERR_NOBODY))
+ return(0);
/* FALLTHROUGH */
case (LIST_item):
if (mdoc->last->head->child)
if ( ! mdoc_nmsg(mdoc, mdoc->last, MANDOCERR_ARGSLOST))
return(0);
- if (NULL == mdoc->last->body->child)
- if ( ! mdoc_nmsg(mdoc, mdoc->last, MANDOCERR_NOBODY))
- return(0);
break;
case (LIST_column):
cols = -1;