-/* $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>
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 */
-/* $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>
int i, cols;
enum mdoc_list lt;
struct mdoc_node *nbl, *nit, *nch;
- enum mandocerr er;
nit = mdoc->last;
if (MDOC_BLOCK != nit->type)
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();
}
-/* $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>
"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",