diff options
author | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2010-10-23 17:04:52 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2010-10-23 17:04:52 +0000 |
commit | 6fca9cacc87f71d0776323dfaf74ac67a9f2d050 (patch) | |
tree | 212447b7b0605ba98a36fb8eb6465d338244b994 | |
parent | 2bfaed809a35931a3f42336b4da9fe5197e78b71 (diff) |
use proper message in case of multiple arguments to .An
from kristaps@
-rw-r--r-- | usr.bin/mandoc/mdoc_validate.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/usr.bin/mandoc/mdoc_validate.c b/usr.bin/mandoc/mdoc_validate.c index c56dfd80ac8..2e1895daabb 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.72 2010/10/23 16:40:15 schwarze Exp $ */ +/* $Id: mdoc_validate.c,v 1.73 2010/10/23 17:04:51 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010 Kristaps Dzonsons <kristaps@bsd.lv> * @@ -891,15 +891,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) |