=================================================================== RCS file: /cvs/mandoc/main.c,v retrieving revision 1.176 retrieving revision 1.178 diff -u -p -r1.176 -r1.178 --- mandoc/main.c 2014/06/21 16:18:25 1.176 +++ mandoc/main.c 2014/08/10 23:54:41 1.178 @@ -1,4 +1,4 @@ -/* $Id: main.c,v 1.176 2014/06/21 16:18:25 schwarze Exp $ */ +/* $Id: main.c,v 1.178 2014/08/10 23:54:41 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons * Copyright (c) 2010, 2011, 2012, 2014 Ingo Schwarze @@ -16,10 +16,10 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#ifdef HAVE_CONFIG_H #include "config.h" -#endif +#include + #include #include #include @@ -411,14 +411,17 @@ static void mmsg(enum mandocerr t, enum mandoclevel lvl, const char *file, int line, int col, const char *msg) { + const char *mparse_msg; fprintf(stderr, "%s: %s:", progname, file); if (line) fprintf(stderr, "%d:%d:", line, col + 1); - fprintf(stderr, " %s: %s", mparse_strlevel(lvl), - mparse_strerror(t)); + fprintf(stderr, " %s", mparse_strlevel(lvl)); + + if (NULL != (mparse_msg = mparse_strerror(t))) + fprintf(stderr, ": %s", mparse_msg); if (msg) fprintf(stderr, ": %s", msg);