aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/main.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2019-07-14 18:16:13 +0000
committerIngo Schwarze <schwarze@openbsd.org>2019-07-14 18:16:13 +0000
commit67dcc2e5b969bc3dc00fcdd852cb6fd4ed9a2107 (patch)
treef0bd1ee5ae849c293f106884fd0c8d4d7237da63 /main.c
parent3438a5cfefb69c7f5343ce1e20296f7b635cabce (diff)
downloadmandoc-67dcc2e5b969bc3dc00fcdd852cb6fd4ed9a2107.tar.gz
mandoc-67dcc2e5b969bc3dc00fcdd852cb6fd4ed9a2107.tar.zst
mandoc-67dcc2e5b969bc3dc00fcdd852cb6fd4ed9a2107.zip
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 'main.c')
-rw-r--r--main.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/main.c b/main.c
index 09fe8939..93c08205 100644
--- a/main.c
+++ b/main.c
@@ -1,4 +1,4 @@
-/* $Id: main.c,v 1.329 2019/07/10 19:39:01 schwarze Exp $ */
+/* $Id: main.c,v 1.330 2019/07/14 18:16:13 schwarze Exp $ */
/*
* Copyright (c) 2008-2012 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010-2012, 2014-2019 Ingo Schwarze <schwarze@openbsd.org>
@@ -727,7 +727,9 @@ out:
signum = WSTOPSIG(status);
}
tag_unlink();
- }
+ } else if (curp.outtype != OUTT_LINT)
+ mandoc_msg_summary();
+
return (int)mandoc_msg_getrc();
}