summaryrefslogtreecommitdiff
path: root/usr.bin/mandoc/main.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@cvs.openbsd.org>2019-07-14 18:14:28 +0000
committerIngo Schwarze <schwarze@cvs.openbsd.org>2019-07-14 18:14:28 +0000
commitce59aae868dd237fe0462317036910a0e3c0ce7a (patch)
tree974c5bab9ef187bda0c33ab5762822c3617beb80 /usr.bin/mandoc/main.c
parent125fadb32b440e7f9d297e5842270011592a80ea (diff)
If messages are shown and output is printed without a pager, display
a heads-up on stderr at the end because otherwise, users may easily miss the messages: because messages typically occur while parsing, they typically preceed the output. This is most useful with flag combinations like "-c -W all" but may also help in some unusual error scenarios. Inconvenient ordering of output originally pointed out by espie@ for the example situation that /tmp/ is not writeable.
Diffstat (limited to 'usr.bin/mandoc/main.c')
-rw-r--r--usr.bin/mandoc/main.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.bin/mandoc/main.c b/usr.bin/mandoc/main.c
index 66d6a1173b0..894aa429916 100644
--- a/usr.bin/mandoc/main.c
+++ b/usr.bin/mandoc/main.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: main.c,v 1.231 2019/07/10 19:38:56 schwarze Exp $ */
+/* $OpenBSD: main.c,v 1.232 2019/07/14 18:14:27 schwarze Exp $ */
/*
* Copyright (c) 2008-2012 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010-2012, 2014-2019 Ingo Schwarze <schwarze@openbsd.org>
@@ -698,7 +698,9 @@ out:
signum = WSTOPSIG(status);
}
tag_unlink();
- }
+ } else if (curp.outtype != OUTT_LINT)
+ mandoc_msg_summary();
+
return (int)mandoc_msg_getrc();
}