diff options
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -408,9 +408,13 @@ mmsg(enum mandocerr t, enum mandoclevel lvl, const char *file, int line, int col, const char *msg) { - fprintf(stderr, "%s: %s:%d:%d: %s: %s", progname, - file, line, col + 1, - mparse_strlevel(lvl), mparse_strerror(t)); + 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)); if (msg) fprintf(stderr, ": %s", msg); |