aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/main.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2014-12-31 16:52:39 +0000
committerIngo Schwarze <schwarze@openbsd.org>2014-12-31 16:52:39 +0000
commit6693ba26d594cdccc4b15bc6c9514f52965fb1fa (patch)
treea9a51bd7d10aa2b6a27c1e7e247f04806a69c62d /main.c
parent66307ac65da15f97379bece69d67ca3e5e92bbf6 (diff)
downloadmandoc-6693ba26d594cdccc4b15bc6c9514f52965fb1fa.tar.gz
mandoc-6693ba26d594cdccc4b15bc6c9514f52965fb1fa.tar.zst
mandoc-6693ba26d594cdccc4b15bc6c9514f52965fb1fa.zip
When showing more than one formatted manual page, insert horizontal lines
between pages. Suggested by Theo Buehler <theo at math dot ethz dot ch>. Even in UTF-8 output mode, do not use fancy line drawing characters such that you can easily use /^--- to skip to the next manual in your pager.
Diffstat (limited to 'main.c')
-rw-r--r--main.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/main.c b/main.c
index 2f062788..59d1b2d6 100644
--- a/main.c
+++ b/main.c
@@ -1,4 +1,4 @@
-/* $Id: main.c,v 1.209 2014/12/21 14:49:28 schwarze Exp $ */
+/* $Id: main.c,v 1.210 2014/12/31 16:52:39 schwarze Exp $ */
/*
* Copyright (c) 2008-2012 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010, 2011, 2012, 2014 Ingo Schwarze <schwarze@openbsd.org>
@@ -447,7 +447,9 @@ main(int argc, char *argv[])
if (MANDOCLEVEL_OK != rc && curp.wstop)
break;
- argc--;
+
+ if (--argc && curp.outtype <= OUTT_UTF8)
+ ascii_sepline(curp.outdata);
}
if (curp.outfree)
@@ -635,6 +637,8 @@ passthrough(const char *file, int fd, int synopsis_only)
ssize_t nw;
int print;
+ fflush(stdout);
+
if ((stream = fdopen(fd, "r")) == NULL) {
close(fd);
syscall = "fdopen";