summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@cvs.openbsd.org>2014-06-20 16:11:04 +0000
committerIngo Schwarze <schwarze@cvs.openbsd.org>2014-06-20 16:11:04 +0000
commit57ca508fe900b5cb680e47a3250ae79b7a5b29a9 (patch)
tree53047986a20a9a832681cdc55a488a30b2e3d47c /usr.bin
parent20a9400dd843f72846ed33936f03cf1c25b5a1d0 (diff)
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@
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/mandoc/main.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/mandoc/main.c b/usr.bin/mandoc/main.c
index e62efcb5e18..b0b35319bed 100644
--- a/usr.bin/mandoc/main.c
+++ b/usr.bin/mandoc/main.c
@@ -1,4 +1,4 @@
-/* $Id: main.c,v 1.90 2014/04/20 16:44:44 schwarze Exp $ */
+/* $Id: main.c,v 1.91 2014/06/20 16:11:03 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010, 2011, 2012, 2014 Ingo Schwarze <schwarze@openbsd.org>
@@ -409,7 +409,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)