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 | 0190b5d7285fc827bbcf891fc40e4debd1150213 (patch) | |
tree | c6bc0e343a1933184f5a49bef49c49f2d5d573e3 /mdoc_validate.c | |
parent | 402f3efa27669efc0b793dbed0c7e590ee577ef3 (diff) | |
download | mandoc-0190b5d7285fc827bbcf891fc40e4debd1150213.tar.gz mandoc-0190b5d7285fc827bbcf891fc40e4debd1150213.tar.zst mandoc-0190b5d7285fc827bbcf891fc40e4debd1150213.zip |
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 | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/mdoc_validate.c b/mdoc_validate.c index 4035afa5..5cceeff5 100644 --- a/mdoc_validate.c +++ b/mdoc_validate.c @@ -1,4 +1,4 @@ -/* $Id: mdoc_validate.c,v 1.235 2014/07/30 17:06:26 schwarze Exp $ */ +/* $Id: mdoc_validate.c,v 1.236 2014/07/30 23:38:52 schwarze Exp $ */ /* * Copyright (c) 2008-2012 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2010-2014 Ingo Schwarze <schwarze@openbsd.org> @@ -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(); } |