in particular reporting the macro names involved.
-/* $Id: mandoc.h,v 1.129 2014/07/02 13:10:45 schwarze Exp $ */
+/* $Id: mandoc.h,v 1.130 2014/07/02 20:19:11 schwarze Exp $ */
/*
* Copyright (c) 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010-2014 Ingo Schwarze <schwarze@openbsd.org>
MANDOCERR_LINESCOPE, /* line scope broken: macro breaks macro */
/* related to missing macro arguments */
- MANDOCERR_MACROEMPTY, /* skipping empty macro */
+ MANDOCERR_MACRO_EMPTY, /* skipping empty macro: macro */
MANDOCERR_ARGCWARN, /* argument count wrong */
MANDOCERR_DISPTYPE, /* missing display type */
MANDOCERR_LISTFIRST, /* list type must come first */
-/* $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>
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))
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)
-/* $Id: mdoc_validate.c,v 1.222 2014/07/02 19:55:10 schwarze Exp $ */
+/* $Id: mdoc_validate.c,v 1.223 2014/07/02 20:19:11 schwarze Exp $ */
/*
* Copyright (c) 2008-2012 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010-2014 Ingo Schwarze <schwarze@openbsd.org>
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);
}