summaryrefslogtreecommitdiff
path: root/tty.h
diff options
context:
space:
mode:
authorJohn Hawthorn <john.hawthorn@gmail.com>2014-09-15 00:07:18 -0700
committerJohn Hawthorn <john.hawthorn@gmail.com>2014-09-15 00:07:18 -0700
commit8ddf546d8e36fca6b147b78621df31800b081e60 (patch)
tree430dd95a4731445c7cf931abaa7d26f21c907686 /tty.h
parent6bace05aece734fd1efbfa7c46040f4e6fad2d86 (diff)
Truncate matches at terminal width
Diffstat (limited to 'tty.h')
-rw-r--r--tty.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/tty.h b/tty.h
index ad21e8e..0586977 100644
--- a/tty.h
+++ b/tty.h
@@ -8,10 +8,12 @@ typedef struct{
FILE *fout;
struct termios original_termios;
int fgcolor;
+ size_t maxwidth;
} tty_t;
void tty_reset(tty_t *tty);
void tty_init(tty_t *tty, const char *tty_filename);
+void tty_getwinsz(tty_t *tty);
char tty_getchar(tty_t *tty);
void tty_setfg(tty_t *tty, int fg);
@@ -45,4 +47,6 @@ void tty_setcol(tty_t *tty, int col);
void tty_printf(tty_t *tty, const char *fmt, ...);
void tty_flush(tty_t *tty);
+size_t tty_getwidth(tty_t *tty);
+
#endif