diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2014-12-31 16:52:39 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2014-12-31 16:52:39 +0000 |
commit | 6693ba26d594cdccc4b15bc6c9514f52965fb1fa (patch) | |
tree | a9a51bd7d10aa2b6a27c1e7e247f04806a69c62d /term_ascii.c | |
parent | 66307ac65da15f97379bece69d67ca3e5e92bbf6 (diff) | |
download | mandoc-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 'term_ascii.c')
-rw-r--r-- | term_ascii.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/term_ascii.c b/term_ascii.c index 5cc6304a..df191103 100644 --- a/term_ascii.c +++ b/term_ascii.c @@ -1,4 +1,4 @@ -/* $Id: term_ascii.c,v 1.41 2014/12/19 17:12:04 schwarze Exp $ */ +/* $Id: term_ascii.c,v 1.42 2014/12/31 16:52:40 schwarze Exp $ */ /* * Copyright (c) 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2014 Ingo Schwarze <schwarze@openbsd.org> @@ -174,6 +174,20 @@ ascii_setwidth(struct termp *p, int iop, size_t width) p->rmargin = p->maxrmargin = p->defrmargin; } +void +ascii_sepline(void *arg) +{ + struct termp *p; + size_t i; + + p = (struct termp *)arg; + putchar('\n'); + for (i = 0; i < p->defrmargin; i++) + putchar('-'); + putchar('\n'); + putchar('\n'); +} + static size_t ascii_width(const struct termp *p, int c) { |