summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2014-07-30 23:38:52 +0000
committerIngo Schwarze <schwarze@openbsd.org>2014-07-30 23:38:52 +0000
commit94b5e78c3c72288a055e1760e2dcebb95873c0a0 (patch)
tree2c4a527fb2fd995a9a527185e4c9b5ebb7174025
parentd04c6341b9459e49c141ef24f7c7b8956dd53c31 (diff)
downloadmandoc-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.h1
-rw-r--r--mdoc_validate.c16
-rw-r--r--read.c1
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",