aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/tag.h
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2015-07-28 18:38:55 +0000
committerIngo Schwarze <schwarze@openbsd.org>2015-07-28 18:38:55 +0000
commit12f4fdd4872dac294b89bcf984492bc88dca0b5e (patch)
tree73028812770ae85474acade6b6690624f79313f8 /tag.h
parentd7a1c33838e142532c49cdda9ea67e18aad92683 (diff)
downloadmandoc-12f4fdd4872dac294b89bcf984492bc88dca0b5e.tar.gz
mandoc-12f4fdd4872dac294b89bcf984492bc88dca0b5e.tar.zst
mandoc-12f4fdd4872dac294b89bcf984492bc88dca0b5e.zip
Remove the hack of scrolling forward and backward with +G1G that
many (jmc@, millert@, espie@, deraadt@) considered revolting. Instead, when using a pager, since we are using a temporary file for tags anyway, use another temporary file for the formatted page(s), as suggested by millert@ and similar to what the traditional BSD man(1) did, except that we use only one single temporary output file rather than one for each formatted manual page, such that searching (both with / and :t) works across all the displayed files.
Diffstat (limited to 'tag.h')
-rw-r--r--tag.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/tag.h b/tag.h
index 34a7eee2..0cf5c90b 100644
--- a/tag.h
+++ b/tag.h
@@ -1,4 +1,4 @@
-/* $Id: tag.h,v 1.4 2015/07/25 14:28:59 schwarze Exp $ */
+/* $Id: tag.h,v 1.5 2015/07/28 18:38:55 schwarze Exp $ */
/*
* Copyright (c) 2015 Ingo Schwarze <schwarze@openbsd.org>
*
@@ -15,9 +15,16 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
+struct tag_files {
+ char ofn[20];
+ char tfn[20];
+ int ofd;
+ int tfd;
+};
+
__BEGIN_DECLS
-char *tag_init(void);
+struct tag_files *tag_init(void);
void tag_put(const char *, int, size_t);
void tag_write(void);
void tag_unlink(void);