From 35e4167ecdd8989ebb6e628716d98878b5e632fd Mon Sep 17 00:00:00 2001 From: Kristaps Dzonsons Date: Tue, 22 Mar 2011 15:30:30 +0000 Subject: 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@. --- TODO | 6 +----- index.sgml | 4 ++-- man_validate.c | 8 +++++--- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/TODO b/TODO index 06b90f37..9615a499 100644 --- a/TODO +++ b/TODO @@ -1,6 +1,6 @@ ************************************************************************ * Official mandoc TODO. -* $Id: TODO,v 1.93 2011/03/19 23:36:08 schwarze Exp $ +* $Id: TODO,v 1.94 2011/03/22 15:30:30 kristaps Exp $ ************************************************************************ ************************************************************************ @@ -278,10 +278,6 @@ * error reporting issues ************************************************************************ -- empty .RS blocks in man(7) should be warnings, not errors, - see for example qemu(1); - brad@comstyle.com Sat Mar 19 00:36:56 2011 - ************************************************************************ * performance issues ************************************************************************ diff --git a/index.sgml b/index.sgml index d8d28fc9..96bf26e3 100644 --- a/index.sgml +++ b/index.sgml @@ -40,7 +40,7 @@

mdocml consists of the libmandoc validating - compilers and mandoc, which interfaces with the compiler library to format + compiler and mandoc, which interfaces with the compiler library to format output for UNIX terminals, XHTML, HTML, PostScript, and PDF. It is a BSD.lv project.

@@ -378,7 +378,7 @@
- Copyright © 2008–2011 Kristaps Dzonsons, $Date: 2011/03/22 13:15:38 $ + Copyright © 2008–2011 Kristaps Dzonsons, $Date: 2011/03/22 15:30:30 $
diff --git a/man_validate.c b/man_validate.c index e56415ba..03bb120f 100644 --- a/man_validate.c +++ b/man_validate.c @@ -1,4 +1,4 @@ -/* $Id: man_validate.c,v 1.66 2011/03/22 14:33:05 kristaps Exp $ */ +/* $Id: man_validate.c,v 1.67 2011/03/22 15:30:30 kristaps Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons * Copyright (c) 2010 Ingo Schwarze @@ -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); } -- cgit v1.2.3-56-ge451