diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2010-10-11 15:46:19 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2010-10-11 15:46:19 +0000 |
commit | 7113944571eb8954664d41200813db1a1d5e1d02 (patch) | |
tree | dc941af8fb58f579fd168371c1b821bc96c83d77 /mdoc_validate.c | |
parent | b729779f70beff4550eea216b4be1c930d814079 (diff) | |
download | mandoc-7113944571eb8954664d41200813db1a1d5e1d02.tar.gz mandoc-7113944571eb8954664d41200813db1a1d5e1d02.tar.zst mandoc-7113944571eb8954664d41200813db1a1d5e1d02.zip |
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.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/mdoc_validate.c b/mdoc_validate.c index e147a684..0553c045 100644 --- a/mdoc_validate.c +++ b/mdoc_validate.c @@ -1,4 +1,4 @@ -/* $Id: mdoc_validate.c,v 1.120 2010/10/11 13:24:33 kristaps Exp $ */ +/* $Id: mdoc_validate.c,v 1.121 2010/10/11 15:46:19 kristaps Exp $ */ /* * Copyright (c) 2008, 2009, 2010 Kristaps Dzonsons <kristaps@bsd.lv> * @@ -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) |