* [PATCH] empty bodies are OK in list items
@ 2010-07-01 23:45 Ingo Schwarze
2010-07-02 10:27 ` Kristaps Dzonsons
0 siblings, 1 reply; 2+ messages in thread
From: Ingo Schwarze @ 2010-07-01 23:45 UTC (permalink / raw)
To: tech
Hi,
here is a minor tweak:
For -hang, -ohang, -inset, -diag and -item lists,
empty bodies are OK, they do not even warrant a warning.
See e.g. OpenBSD options(4) "option NKMEMPAGES*" for a nice
example.
OK?
Yours,
Ingo
Index: mdoc_validate.c
===================================================================
RCS file: /cvs/src/usr.bin/mandoc/mdoc_validate.c,v
retrieving revision 1.63
diff -u -p -r1.63 mdoc_validate.c
--- mdoc_validate.c 27 Jun 2010 21:54:42 -0000 1.63
+++ mdoc_validate.c 1 Jul 2010 23:38:29 -0000
@@ -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,13 +1075,13 @@ 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):
--
To unsubscribe send an email to tech+unsubscribe@mdocml.bsd.lv
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] empty bodies are OK in list items
2010-07-01 23:45 [PATCH] empty bodies are OK in list items Ingo Schwarze
@ 2010-07-02 10:27 ` Kristaps Dzonsons
0 siblings, 0 replies; 2+ messages in thread
From: Kristaps Dzonsons @ 2010-07-02 10:27 UTC (permalink / raw)
To: tech
> here is a minor tweak:
> For -hang, -ohang, -inset, -diag and -item lists,
> empty bodies are OK, they do not even warrant a warning.
>
> See e.g. OpenBSD options(4) "option NKMEMPAGES*" for a nice
> example.
Ingo,
ok kristaps@.
I think that Joerg also brought this up some time ago.
Kristaps
--
To unsubscribe send an email to tech+unsubscribe@mdocml.bsd.lv
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-07-02 10:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-07-01 23:45 [PATCH] empty bodies are OK in list items Ingo Schwarze
2010-07-02 10:27 ` Kristaps Dzonsons
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).