diff options
author | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2014-07-02 20:18:43 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2014-07-02 20:18:43 +0000 |
commit | e7f17f11387e6268e11db031b45f8ce73bcadb67 (patch) | |
tree | aedfe68534ec0b8135861572ca0d00c148bb784c /usr.bin/mandoc/mdoc_validate.c | |
parent | dc0bdce4b544aa493fd4b6572810467a95ee79c5 (diff) |
Improve and test the messages about empty macros,
in particular reporting the macro names involved.
Diffstat (limited to 'usr.bin/mandoc/mdoc_validate.c')
-rw-r--r-- | usr.bin/mandoc/mdoc_validate.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.bin/mandoc/mdoc_validate.c b/usr.bin/mandoc/mdoc_validate.c index 60564525cf3..448d756c97d 100644 --- a/usr.bin/mandoc/mdoc_validate.c +++ b/usr.bin/mandoc/mdoc_validate.c @@ -1,4 +1,4 @@ -/* $Id: mdoc_validate.c,v 1.140 2014/07/02 19:54:39 schwarze Exp $ */ +/* $Id: mdoc_validate.c,v 1.141 2014/07/02 20:18:42 schwarze Exp $ */ /* * Copyright (c) 2008-2012 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2010-2014 Ingo Schwarze <schwarze@openbsd.org> @@ -1725,7 +1725,9 @@ post_st(POST_ARGS) const char *p; if (NULL == (ch = mdoc->last->child)) { - mdoc_nmsg(mdoc, mdoc->last, MANDOCERR_MACROEMPTY); + mandoc_msg(MANDOCERR_MACRO_EMPTY, mdoc->parse, + mdoc->last->line, mdoc->last->pos, + mdoc_macronames[mdoc->last->tok]); mdoc_node_delete(mdoc, mdoc->last); return(1); } |