summaryrefslogtreecommitdiff
path: root/more.h
diff options
context:
space:
mode:
authorJakob Kaivo <jkk@ung.org>2020-07-14 16:36:13 -0400
committerJakob Kaivo <jkk@ung.org>2020-07-14 16:36:13 -0400
commitc494561b43b264223b7a8f800221b7e87dbb67eb (patch)
treee069e36a4b51c0065cfae489f722708ee1401081 /more.h
parent527e45ab5cc919caea9bfee9af1cf3da83028420 (diff)
split tty specific stuff out to tty.c
Diffstat (limited to 'more.h')
-rw-r--r--more.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/more.h b/more.h
new file mode 100644
index 0000000..440aa15
--- /dev/null
+++ b/more.h
@@ -0,0 +1,19 @@
+#define _XOPEN_SOURCE 700
+#include <stdio.h>
+
+struct more_tty {
+ FILE *tty;
+ int lines;
+ int columns;
+};
+
+struct morefile {
+ FILE *f;
+ FILE *backing;
+ size_t topline;
+ fpos_t *lines;
+ size_t nlines;
+ size_t mark[26];
+};
+
+struct more_tty more_open_tty(int lines);