]> git.cameronkatri.com Git - mandoc.git/commitdiff
Make empty sections and parts (SH, SS, RS) only produce a warning if it
authorKristaps Dzonsons <kristaps@bsd.lv>
Tue, 22 Mar 2011 15:30:30 +0000 (15:30 +0000)
committerKristaps Dzonsons <kristaps@bsd.lv>
Tue, 22 Mar 2011 15:30:30 +0000 (15:30 +0000)
has no children.  Noted by Brad, added to TODO by schwarze@.

TODO
index.sgml
man_validate.c

diff --git a/TODO b/TODO
index 06b90f372286191743b20408d8e6aec0500d78e1..9615a49916bb2c09070cd87cdb290527c2affad2 100644 (file)
--- 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 $
 ************************************************************************
 
 ************************************************************************
 * 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
 ************************************************************************
index d8d28fc9724135bcaa72c4b47d8b5960caa1b59d..96bf26e317d1cbe6aa984746911ad1b527298ec7 100644 (file)
@@ -40,7 +40,7 @@
 
                                        <P>
                                        <SPAN CLASS="nm">mdocml</SPAN> consists of the <A HREF="mandoc.3.html">libmandoc</A> validating
-                                       compilers and <A HREF="mandoc.1.html">mandoc</A>, which interfaces with the compiler library to format
+                                       compiler and <A HREF="mandoc.1.html">mandoc</A>, which interfaces with the compiler library to format
                                        output for UNIX terminals, XHTML, HTML, PostScript, and PDF.  It is a <A CLASS="external"
                                        HREF="http://bsd.lv/">BSD.lv</A> project.  
                                        </P>
                        <TR>
                                <TD>
                                        <DIV CLASS="foot">
-                                               Copyright &#169; 2008&#8211;2011 Kristaps Dzonsons, $Date: 2011/03/22 13:15:38 $
+                                               Copyright &#169; 2008&#8211;2011 Kristaps Dzonsons, $Date: 2011/03/22 15:30:30 $
                                        </DIV>
                                </TD>
                        </TR>
index e56415ba754d0e6a36bb021a3d7b439f428b9d97..03bb120f56422b8f3b053b5511071ea645e69ada 100644 (file)
@@ -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 <kristaps@bsd.lv>
  * Copyright (c) 2010 Ingo Schwarze <schwarze@openbsd.org>
@@ -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);
 }