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 /mdoc_validate.c | |
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.
Diffstat (limited to 'mdoc_validate.c')
-rw-r--r-- | mdoc_validate.c | 16 |
1 files changed, 5 insertions, 11 deletions
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(); } |