summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2014-06-20 16:11:42 +0000
committerIngo Schwarze <schwarze@openbsd.org>2014-06-20 16:11:42 +0000
commit6b6c88dfdce932cd2de0f3b003a8bf31558b0fbe (patch)
treec0a1093a122c19822e24d12db713f2b18b745987
parenta4a99ead8f4064682c6de4025c80bc6c740371d7 (diff)
downloadmandoc-6b6c88dfdce932cd2de0f3b003a8bf31558b0fbe.tar.gz
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@
-rw-r--r--main.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/main.c b/main.c
index 64100318..00cdfb76 100644
--- a/main.c
+++ b/main.c
@@ -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)