diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2014-07-02 20:19:11 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2014-07-02 20:19:11 +0000 |
commit | 02c50c123f386b824e755e7f6334792530c88411 (patch) | |
tree | e1563af95c08fd153266f539d7fa5524f1c6ae36 /mdoc_macro.c | |
parent | fdc95e0f088e210664eb7459003c922102fc748e (diff) | |
download | mandoc-02c50c123f386b824e755e7f6334792530c88411.tar.gz |
Improve and test the messages about empty macros,
in particular reporting the macro names involved.
Diffstat (limited to 'mdoc_macro.c')
-rw-r--r-- | mdoc_macro.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/mdoc_macro.c b/mdoc_macro.c index 36aa8b82..21ab591d 100644 --- a/mdoc_macro.c +++ b/mdoc_macro.c @@ -919,8 +919,9 @@ in_line(MACRO_PROT_ARGS) return(0); } else if ( ! nc && 0 == cnt) { mdoc_argv_free(arg); - mdoc_pmsg(mdoc, line, ppos, - MANDOCERR_MACROEMPTY); + mandoc_msg(MANDOCERR_MACRO_EMPTY, + mdoc->parse, line, ppos, + mdoc_macronames[tok]); } if ( ! mdoc_macro(mdoc, ntok, line, la, pos, buf)) @@ -1005,7 +1006,8 @@ in_line(MACRO_PROT_ARGS) return(0); } else if ( ! nc && 0 == cnt) { mdoc_argv_free(arg); - mdoc_pmsg(mdoc, line, ppos, MANDOCERR_MACROEMPTY); + mandoc_msg(MANDOCERR_MACRO_EMPTY, mdoc->parse, + line, ppos, mdoc_macronames[tok]); } if ( ! nl) |