diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2014-07-30 23:38:52 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2014-07-30 23:38:52 +0000 |
commit | 94b5e78c3c72288a055e1760e2dcebb95873c0a0 (patch) | |
tree | 2c4a527fb2fd995a9a527185e4c9b5ebb7174025 | |
parent | d04c6341b9459e49c141ef24f7c7b8956dd53c31 (diff) | |
download | mandoc-94b5e78c3c72288a055e1760e2dcebb95873c0a0.tar.gz |
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.
-rw-r--r-- | mandoc.h | 1 | ||||
-rw-r--r-- | mdoc_validate.c | 16 | ||||
-rw-r--r-- | read.c | 1 |
3 files changed, 5 insertions, 13 deletions
@@ -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(); } @@ -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", |