source@mandoc.bsd.lv
 help / color / mirror / Atom feed
* mdocml: MANDOCERR_NOARGS reported three completely unrelated classes of
@ 2014-07-03 21:23 schwarze
  0 siblings, 0 replies; only message in thread
From: schwarze @ 2014-07-03 21:23 UTC (permalink / raw)
  To: source

Log Message:
-----------
MANDOCERR_NOARGS reported three completely unrelated classes of problems.
Split the roff(7) parts out of it and report the request names for these cases.

Modified Files:
--------------
    mdocml:
        mandoc.h
        read.c
        roff.c

Revision Data
-------------
Index: mandoc.h
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/mandoc.h,v
retrieving revision 1.130
retrieving revision 1.131
diff -Lmandoc.h -Lmandoc.h -u -p -r1.130 -r1.131
--- mandoc.h
+++ mandoc.h
@@ -83,7 +83,9 @@ enum	mandocerr {
 	MANDOCERR_NF_SKIP, /* fill mode already disabled, skipping .nf */
 	MANDOCERR_LINESCOPE, /* line scope broken: macro breaks macro */
 
-	/* related to missing macro arguments */
+	/* related to missing arguments */
+	MANDOCERR_REQ_EMPTY, /* skipping empty request: request */
+	MANDOCERR_COND_EMPTY, /* conditional request controls empty scope */
 	MANDOCERR_MACRO_EMPTY, /* skipping empty macro: macro */
 	MANDOCERR_ARGCWARN, /* argument count wrong */
 	MANDOCERR_DISPTYPE, /* missing display type */
Index: roff.c
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/roff.c,v
retrieving revision 1.215
retrieving revision 1.216
diff -Lroff.c -Lroff.c -u -p -r1.215 -r1.216
--- roff.c
+++ roff.c
@@ -917,7 +917,8 @@ roff_block(ROFF_ARGS)
 
 	if (ROFF_ig != tok) {
 		if ('\0' == *cp) {
-			mandoc_msg(MANDOCERR_NOARGS, r->parse, ln, ppos, NULL);
+			mandoc_msg(MANDOCERR_REQ_EMPTY, r->parse,
+			    ln, ppos, roffs[tok].name);
 			return(ROFF_IGN);
 		}
 
@@ -1285,7 +1286,8 @@ roff_cond(ROFF_ARGS)
 	 */
 
 	if ('\0' == (*bufp)[pos])
-		mandoc_msg(MANDOCERR_NOARGS, r->parse, ln, ppos, NULL);
+		mandoc_msg(MANDOCERR_COND_EMPTY, r->parse,
+		    ln, ppos, roffs[tok].name);
 
 	r->last->endspan = 1;
 
Index: read.c
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/read.c,v
retrieving revision 1.57
retrieving revision 1.58
diff -Lread.c -Lread.c -u -p -r1.57 -r1.58
--- read.c
+++ read.c
@@ -128,6 +128,8 @@ static	const char * const	mandocerrs[MAN
 	"line scope broken",
 
 	/* related to missing macro arguments */
+	"skipping empty request",
+	"conditional request controls empty scope",
 	"skipping empty macro",
 	"argument count wrong",
 	"missing display type",
--
 To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-07-03 21:23 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-03 21:23 mdocml: MANDOCERR_NOARGS reported three completely unrelated classes of schwarze

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).