From: Ingo Schwarze Date: Fri, 20 Jun 2014 16:11:42 +0000 (+0000) Subject: Prefix error messages from mandoc(1) with "mandoc: " X-Git-Tag: VERSION_1_13_1~143 X-Git-Url: https://git.cameronkatri.com/mandoc.git/commitdiff_plain/8358cc737b994d172459eaf3401807c2b0d3811c?ds=inline Prefix error messages from mandoc(1) with "mandoc: " just like almost all other utility programs do. Suggested by nick@ who wondered where messages came from when calling mandoc(1) from inside a Perl script. ok jmc@ nick@ --- diff --git a/main.c b/main.c index 75a75f11..c1497761 100644 --- a/main.c +++ b/main.c @@ -1,4 +1,4 @@ -/* $Id: main.c,v 1.173 2014/04/20 16:46:04 schwarze Exp $ */ +/* $Id: main.c,v 1.174 2014/06/20 16:11:42 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons * Copyright (c) 2010, 2011, 2012, 2014 Ingo Schwarze @@ -408,7 +408,8 @@ mmsg(enum mandocerr t, enum mandoclevel lvl, const char *file, int line, int col, const char *msg) { - fprintf(stderr, "%s:%d:%d: %s: %s", file, line, col + 1, + fprintf(stderr, "%s: %s:%d:%d: %s: %s", progname, + file, line, col + 1, mparse_strlevel(lvl), mparse_strerror(t)); if (msg)