summaryrefslogtreecommitdiffstats
path: root/mdoc_validate.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2010-10-11 15:46:19 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2010-10-11 15:46:19 +0000
commitdb589adcab1b561d91b7f4f4836220972ac0a979 (patch)
treeab6e0eafcc7d79665719434eaf8b29011e0d955b /mdoc_validate.c
parent2059a810480a8db91b8e50c2ef15ed9b542e2315 (diff)
downloadmandoc-db589adcab1b561d91b7f4f4836220972ac0a979.tar.gz
Use proper error for `An' multiple arguments.
Making IGNARGV be an ERROR, not a WARNING, as information is lost.
Diffstat (limited to 'mdoc_validate.c')
-rw-r--r--mdoc_validate.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/mdoc_validate.c b/mdoc_validate.c
index 97c239f7..44679b1e 100644
--- a/mdoc_validate.c
+++ b/mdoc_validate.c
@@ -893,15 +893,16 @@ pre_it(PRE_ARGS)
static int
pre_an(PRE_ARGS)
{
+ int i;
if (NULL == n->args)
return(1);
- if (n->args->argc > 1)
- if ( ! mdoc_nmsg(mdoc, n, MANDOCERR_ARGCOUNT))
+
+ for (i = 1; i < (int)n->args->argc; i++)
+ if ( ! mdoc_pmsg(mdoc, n->args->argv[i].line,
+ n->args->argv[i].pos, MANDOCERR_IGNARGV))
return(0);
- /* FIXME: this should use a different error message. */
-
if (MDOC_Split == n->args->argv[0].arg)
n->data.An.auth = AUTH_split;
else if (MDOC_Nosplit == n->args->argv[0].arg)