From 94b5e78c3c72288a055e1760e2dcebb95873c0a0 Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Wed, 30 Jul 2014 23:38:52 +0000 Subject: 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. --- mandoc.h | 1 - mdoc_validate.c | 16 +++++----------- read.c | 1 - 3 files changed, 5 insertions(+), 13 deletions(-) diff --git a/mandoc.h b/mandoc.h index 922c227c..c2a60a1b 100644 --- a/mandoc.h +++ b/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 */ diff --git a/mdoc_validate.c b/mdoc_validate.c index b2bf24ed..8cb075fa 100644 --- a/mdoc_validate.c +++ b/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(); } diff --git a/read.c b/read.c index cfd641b2..eb23870d 100644 --- a/read.c +++ b/read.c @@ -207,7 +207,6 @@ static const char * const mandocerrs[MANDOCERR_MAX] = { "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", -- cgit