source@mandoc.bsd.lv
 help / color / mirror / Atom feed
From: schwarze@mdocml.bsd.lv
To: source@mdocml.bsd.lv
Subject: mdocml: Remove the useless FATAL error "argument count wrong, violates
Date: Wed, 30 Jul 2014 19:38:53 -0400 (EDT)	[thread overview]
Message-ID: <201407302338.s6UNcrYA017596@krisdoz.my.domain> (raw)

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

                 reply	other threads:[~2014-07-30 23:38 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201407302338.s6UNcrYA017596@krisdoz.my.domain \
    --to=schwarze@mdocml.bsd.lv \
    --cc=source@mdocml.bsd.lv \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).