diff options
author | 2014-07-02 20:18:42 +0000 | |
---|---|---|
committer | 2014-07-02 20:18:42 +0000 | |
commit | 307e5a07e070c4f18627e539e104b00ce208d3ee (patch) | |
tree | 1220dc064f4953b225dc8a2215a7a7b7068c909d /usr.bin/mandoc/mdoc_macro.c | |
parent | When .Sm is called without an argument, groff toggles the spacing mode, (diff) | |
download | wireguard-openbsd-307e5a07e070c4f18627e539e104b00ce208d3ee.tar.xz wireguard-openbsd-307e5a07e070c4f18627e539e104b00ce208d3ee.zip |
Improve and test the messages about empty macros,
in particular reporting the macro names involved.
Diffstat (limited to 'usr.bin/mandoc/mdoc_macro.c')
-rw-r--r-- | usr.bin/mandoc/mdoc_macro.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/usr.bin/mandoc/mdoc_macro.c b/usr.bin/mandoc/mdoc_macro.c index 77edabfb633..97ed9daab10 100644 --- a/usr.bin/mandoc/mdoc_macro.c +++ b/usr.bin/mandoc/mdoc_macro.c @@ -1,4 +1,4 @@ -/* $Id: mdoc_macro.c,v 1.91 2014/07/02 11:42:56 schwarze Exp $ */ +/* $Id: mdoc_macro.c,v 1.92 2014/07/02 20:18:42 schwarze Exp $ */ /* * Copyright (c) 2008-2012 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2010, 2012, 2013 Ingo Schwarze <schwarze@openbsd.org> @@ -915,8 +915,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)) @@ -1001,7 +1002,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) |