summaryrefslogtreecommitdiff
path: root/more.h
diff options
context:
space:
mode:
authorJakob Kaivo <jkk@ung.org>2020-07-14 17:00:49 -0400
committerJakob Kaivo <jkk@ung.org>2020-07-14 17:00:49 -0400
commitfe5a38fc526c373c5cabad4f963fbd99ffb712e9 (patch)
tree4e4d46aa2c985a5ea2064902bc433c30a3999255 /more.h
parent6b8dfa2858c16b3cba4cd1e560000c47db3e50e6 (diff)
split i/o stuff out to io.c
Diffstat (limited to 'more.h')
-rw-r--r--more.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/more.h b/more.h
index 440aa15..8e6e723 100644
--- a/more.h
+++ b/more.h
@@ -7,13 +7,18 @@ struct more_tty {
int columns;
};
-struct morefile {
+struct more_file {
FILE *f;
FILE *backing;
size_t topline;
fpos_t *lines;
size_t nlines;
size_t mark[26];
+ char *buf;
+ size_t nbuf;
};
struct more_tty more_open_tty(int lines);
+struct more_file more_open(const char *path);
+void more_close(struct more_file *mf);
+ssize_t more_getline(struct more_file *mf, size_t lineno);