diff options
author | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2014-08-08 15:38:47 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2014-08-08 15:38:47 +0000 |
commit | 63a7eef49d5fde2cc7e33a8f8772963a9cff6289 (patch) | |
tree | 41833cc7426a5976bd6c7dd02ed793ade92c2944 /usr.bin/mandoc | |
parent | fd0aeebddb9570313cb786279f837089aa0462c7 (diff) |
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 'usr.bin/mandoc')
-rw-r--r-- | usr.bin/mandoc/mandoc.h | 3 | ||||
-rw-r--r-- | usr.bin/mandoc/mdoc_validate.c | 18 | ||||
-rw-r--r-- | usr.bin/mandoc/read.c | 3 |
3 files changed, 8 insertions, 16 deletions
diff --git a/usr.bin/mandoc/mandoc.h b/usr.bin/mandoc/mandoc.h index 3763a33cb0b..bf6cfb5022d 100644 --- a/usr.bin/mandoc/mandoc.h +++ b/usr.bin/mandoc/mandoc.h @@ -1,4 +1,4 @@ -/* $Id: mandoc.h,v 1.90 2014/08/08 15:26:28 schwarze Exp $ */ +/* $Id: mandoc.h,v 1.91 2014/08/08 15:38:46 schwarze Exp $ */ /* * Copyright (c) 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2010-2014 Ingo Schwarze <schwarze@openbsd.org> @@ -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/usr.bin/mandoc/mdoc_validate.c b/usr.bin/mandoc/mdoc_validate.c index 19706ca03e5..21a6ebbd26f 100644 --- a/usr.bin/mandoc/mdoc_validate.c +++ b/usr.bin/mandoc/mdoc_validate.c @@ -1,4 +1,4 @@ -/* $Id: mdoc_validate.c,v 1.153 2014/08/08 15:26:28 schwarze Exp $ */ +/* $Id: mdoc_validate.c,v 1.154 2014/08/08 15:38:46 schwarze Exp $ */ /* * Copyright (c) 2008-2012 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2010-2014 Ingo Schwarze <schwarze@openbsd.org> @@ -1206,7 +1206,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) @@ -1257,16 +1256,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/usr.bin/mandoc/read.c b/usr.bin/mandoc/read.c index bba7c9f3c8c..bad2eec70a7 100644 --- a/usr.bin/mandoc/read.c +++ b/usr.bin/mandoc/read.c @@ -1,4 +1,4 @@ -/* $Id: read.c,v 1.51 2014/08/08 15:26:28 schwarze Exp $ */ +/* $Id: read.c,v 1.52 2014/08/08 15:38:46 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2010-2014 Ingo Schwarze <schwarze@openbsd.org> @@ -199,7 +199,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", |