date and time created 83/08/22 15:59:47 by edward
[unix-history] / usr / src / usr.bin / window / tt.h
CommitLineData
17865084 1/*
5e785082 2 * @(#)tt.h 3.6 83/08/17
17865084
EW
3 */
4
5struct tt {
6 int (*tt_init)();
e908bfac 7 int (*tt_end)();
17865084
EW
8 int (*tt_setinsert)();
9 int (*tt_setmodes)();
e908bfac 10 int (*tt_move)();
17865084
EW
11 int (*tt_insline)();
12 int (*tt_delline)();
13 int (*tt_delchar)();
14 int (*tt_write)();
15 int (*tt_putc)();
16 int (*tt_blank)();
17 int (*tt_clreol)();
18 int (*tt_clreos)();
19 int (*tt_clear)();
17865084
EW
20 int tt_nrow;
21 int tt_ncol;
093ab7e3 22 char tt_availmodes;
5e785082 23 char tt_wrap; /* has auto wrap around */
17865084
EW
24 char *tt_frame;
25};
26
27struct tt tt;
28
29struct tt_tab {
30 char *tt_name;
31 int tt_len;
32 int (*tt_func)();
33};
34
35struct tt_tab tt_tab[];
c3f80cb5
EW
36
37/*
38 * nicer interface to termcap routines
39 */
40char tt_strings[1024]; /* string buffer */
41char *tt_strp; /* pointer for it */
42
43int tt_pc(); /* just putchar() */
44int tt_sc(); /* *tt_strp++ = c */
45char *tt_xgetstr(); /* tgetstr() and expand delays */
46
47#define tt_tgetstr(s) tgetstr((s), &tt_strp)
48#define tt_tputs(s, n) tputs((s), (n), tt_pc)