source@mandoc.bsd.lv
 help / color / mirror / Atom feed
* mdocml: Remove the useless FATAL error "argument count wrong, violates
@ 2014-07-30 23:38 schwarze
  0 siblings, 0 replies; only message in thread
From: schwarze @ 2014-07-30 23:38 UTC (permalink / raw)
  To: source

Log Message:
-----------
Remove the useless FATAL error "argument count wrong, violates syntax".
The last remaining instance was .It in .Bl -column with more than one
excessive .Ta.  However, simply downgrading from FATAL to ERROR, it just 
works fine, almost the same way as in groff, without any other changes.

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

Revision Data
-------------
Index: mdoc_validate.c
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/mdoc_validate.c,v
retrieving revision 1.235
retrieving revision 1.236
diff -Lmdoc_validate.c -Lmdoc_validate.c -u -p -r1.235 -r1.236
--- mdoc_validate.c
+++ mdoc_validate.c
@@ -1210,7 +1210,6 @@ post_it(POST_ARGS)
 	int		  i, cols;
 	enum mdoc_list	  lt;
 	struct mdoc_node *nbl, *nit, *nch;
-	enum mandocerr	  er;
 
 	nit = mdoc->last;
 	if (MDOC_BLOCK != nit->type)
@@ -1261,16 +1260,11 @@ post_it(POST_ARGS)
 			if (MDOC_BODY == nch->type)
 				i++;
 
-		if (i < cols)
-			er = MANDOCERR_ARGCOUNT;
-		else if (i == cols || i == cols + 1)
-			break;
-		else
-			er = MANDOCERR_SYNTARGCOUNT;
-
-		mandoc_vmsg(er, mdoc->parse, nit->line, nit->pos,
-		    "columns == %d (have %d)", cols, i);
-		return(MANDOCERR_ARGCOUNT == er);
+		if (i < cols || i > cols + 1)
+			mandoc_vmsg(MANDOCERR_ARGCOUNT,
+			    mdoc->parse, nit->line, nit->pos,
+			    "columns == %d (have %d)", cols, i);
+		break;
 	default:
 		abort();
 	}
Index: mandoc.h
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/mandoc.h,v
retrieving revision 1.146
retrieving revision 1.147
diff -Lmandoc.h -Lmandoc.h -u -p -r1.146 -r1.147
--- mandoc.h
+++ mandoc.h
@@ -163,7 +163,6 @@ enum	mandocerr {
 	MANDOCERR_TOOLARGE, /* input too large */
 	MANDOCERR_COLUMNS, /* column syntax is inconsistent */
 	MANDOCERR_BADDISP, /* NOT IMPLEMENTED: .Bd -file */
-	MANDOCERR_SYNTARGCOUNT, /* argument count wrong, violates syntax */
 	MANDOCERR_SO_PATH, /* NOT IMPLEMENTED: .so with absolute path or ".." */
 	MANDOCERR_SO_FAIL, /* .so request failed */
 	MANDOCERR_MEM, /* static buffer exhausted */
Index: read.c
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/read.c,v
retrieving revision 1.73
retrieving revision 1.74
diff -Lread.c -Lread.c -u -p -r1.73 -r1.74
--- read.c
+++ read.c
@@ -207,7 +207,6 @@ static	const char * const	mandocerrs[MAN
 	"input too large",
 	"column syntax is inconsistent",
 	"NOT IMPLEMENTED: .Bd -file",
-	"argument count wrong, violates syntax",
 	"NOT IMPLEMENTED: .so with absolute path or \"..\"",
 	".so request failed",
 	"static buffer exhausted",
--
 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-30 23:38 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-30 23:38 mdocml: Remove the useless FATAL error "argument count wrong, violates 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).