aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/term_ascii.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2010-06-09 08:07:13 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2010-06-09 08:07:13 +0000
commitdbcb21471c73a93f9436d4a342a5cc07d74fbf47 (patch)
treeaf1d82c5a84624d1e711a284999c60edd3fff340 /term_ascii.c
parent08669f3b61bca274d2da8109ff9079c3c9d33a6c (diff)
downloadmandoc-dbcb21471c73a93f9436d4a342a5cc07d74fbf47.tar.gz
mandoc-dbcb21471c73a93f9436d4a342a5cc07d74fbf47.tar.zst
mandoc-dbcb21471c73a93f9436d4a342a5cc07d74fbf47.zip
Have the standard manpage header and footer print on every page of -Tps
output. This is more tricky than you may think: we can't just call the header function out-of-state (i.e., before a flushln has occured) because we'd clobber our current state. Thus, we call at the beginning and dump the output into an auxiliary buffer. For the record, I don't think there's any other clean way to do this. The only other Way That Works is to copy-aside *all* termp state, zero it, and do the necessary headf/footf. This is just as complex, as memory needs to be alloc'd and free'd per margin. Unfortunately, this prohibits page numbering (the margin is only printed once), so I'll probably end up re-writing this down the line.
Diffstat (limited to 'term_ascii.c')
-rw-r--r--term_ascii.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/term_ascii.c b/term_ascii.c
index d38450e5..017aa417 100644
--- a/term_ascii.c
+++ b/term_ascii.c
@@ -1,4 +1,4 @@
-/* $Id: term_ascii.c,v 1.2 2010/06/08 15:06:01 kristaps Exp $ */
+/* $Id: term_ascii.c,v 1.3 2010/06/09 08:07:13 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se>
*
@@ -87,7 +87,6 @@ static void
ascii_letter(struct termp *p, char c)
{
- /* Just push onto the screen. */
putchar(c);
}