diff options
author | 2010-10-23 17:04:51 +0000 | |
---|---|---|
committer | 2010-10-23 17:04:51 +0000 | |
commit | 6475d5b0f3692e574ed0b64ccd6e7db506f31eab (patch) | |
tree | e2a833abad4a8edf82b57faee5a7a49dce18cccb | |
parent | Reorder the wording where we talk about tagging kernel route table prefixes, (diff) | |
download | wireguard-openbsd-6475d5b0f3692e574ed0b64ccd6e7db506f31eab.tar.xz wireguard-openbsd-6475d5b0f3692e574ed0b64ccd6e7db506f31eab.zip |
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) |