diff options
author | 2014-07-04 16:12:08 +0000 | |
---|---|---|
committer | 2014-07-04 16:12:08 +0000 | |
commit | 50b8b4d12d3828eef15079704fdc9586de75c7ef (patch) | |
tree | 3e223cee342e42199f2de9b6bcbb50544b658366 /mdoc_macro.c | |
parent | 977b1ebb8e08cb6933cea2f78ab50687dcd69da7 (diff) | |
download | mandoc-50b8b4d12d3828eef15079704fdc9586de75c7ef.tar.gz mandoc-50b8b4d12d3828eef15079704fdc9586de75c7ef.tar.zst mandoc-50b8b4d12d3828eef15079704fdc9586de75c7ef.zip |
Clean up messages regarding excess arguments:
* Downgrade ".Bf -emphasis Em" from FATAL to WARNING.
* Mention the macros, the arguments, and the fallbacks.
* Hierarchical naming.
Diffstat (limited to 'mdoc_macro.c')
-rw-r--r-- | mdoc_macro.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/mdoc_macro.c b/mdoc_macro.c index a4a4da01..2ccb5d8a 100644 --- a/mdoc_macro.c +++ b/mdoc_macro.c @@ -1,4 +1,4 @@ -/* $Id: mdoc_macro.c,v 1.135 2014/07/02 20:19:11 schwarze Exp $ */ +/* $Id: mdoc_macro.c,v 1.136 2014/07/04 16:12:08 schwarze Exp $ */ /* * Copyright (c) 2008-2012 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2010, 2012, 2013 Ingo Schwarze <schwarze@openbsd.org> @@ -769,11 +769,12 @@ blk_exp_close(MACRO_PROT_ARGS) later = n; } - if ( ! (MDOC_CALLABLE & mdoc_macros[tok].flags)) { - /* FIXME: do this in validate */ - if (buf[*pos]) - mdoc_pmsg(mdoc, line, ppos, MANDOCERR_ARGSLOST); - + if ( ! (MDOC_PARSED & mdoc_macros[tok].flags)) { + if ('\0' != buf[*pos]) + mandoc_vmsg(MANDOCERR_ARG_SKIP, + mdoc->parse, line, ppos, + "%s %s", mdoc_macronames[tok], + buf + *pos); if ( ! rew_sub(MDOC_BODY, mdoc, tok, line, ppos)) return(0); return(rew_sub(MDOC_BLOCK, mdoc, tok, line, ppos)); |