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 | eea7a417f94cca4382928d176498141c7b113250 (patch) | |
tree | d55214e3d949f5d481f9cad87eeb40964dae673d /mdoc_macro.c | |
parent | 01c92e6ac259f38d13175f7f9d76233713fff535 (diff) | |
download | mandoc-eea7a417f94cca4382928d176498141c7b113250.tar.gz mandoc-eea7a417f94cca4382928d176498141c7b113250.tar.zst mandoc-eea7a417f94cca4382928d176498141c7b113250.zip |
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 | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/mdoc_macro.c b/mdoc_macro.c index da836a74..a4a4da01 100644 --- a/mdoc_macro.c +++ b/mdoc_macro.c @@ -1,4 +1,4 @@ -/* $Id: mdoc_macro.c,v 1.134 2014/07/02 11:43:20 schwarze Exp $ */ +/* $Id: mdoc_macro.c,v 1.135 2014/07/02 20:19:11 schwarze Exp $ */ /* * Copyright (c) 2008-2012 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2010, 2012, 2013 Ingo Schwarze <schwarze@openbsd.org> @@ -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) |