summaryrefslogtreecommitdiffstats
path: root/mdoc_macro.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2014-07-04 16:12:08 +0000
committerIngo Schwarze <schwarze@openbsd.org>2014-07-04 16:12:08 +0000
commit75cc39c2a41a2eef6085721de92ebcdf1b8868f6 (patch)
tree275ea256856425a64c747d838de951c32f2890c8 /mdoc_macro.c
parent604a31609737053378ee534fa32241da4a8500bf (diff)
downloadmandoc-75cc39c2a41a2eef6085721de92ebcdf1b8868f6.tar.gz
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.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/mdoc_macro.c b/mdoc_macro.c
index 21ab591d..72476679 100644
--- a/mdoc_macro.c
+++ b/mdoc_macro.c
@@ -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));