1: /*
2: * @(#)tt.h 3.15 9/20/85
3: */
4:
5: /*
6: * Copyright (c) 1983 Regents of the University of California,
7: * All rights reserved. Redistribution permitted subject to
8: * the terms of the Berkeley Software License Agreement.
9: */
10:
11: /*
12: * Interface structure for the terminal drivers.
13: */
14: struct tt {
15: /* startup and cleanup */
16: int (*tt_init)();
17: int (*tt_end)();
18:
19: /* terminal functions */
20: int (*tt_move)();
21: int (*tt_insline)();
22: int (*tt_delline)();
23: int (*tt_delchar)();
24: int (*tt_write)(); /* write a whole block */
25: int (*tt_putc)(); /* write one character */
26: int (*tt_clreol)();
27: int (*tt_clreos)();
28: int (*tt_clear)();
29: int (*tt_setinsert)(); /* set insert mode */
30: int (*tt_setmodes)(); /* set display modes */
31:
32: /* internal variables */
33: char tt_modes; /* the current display modes */
34: char tt_nmodes; /* the new modes for next write */
35: char tt_insert; /* currently in insert mode */
36: char tt_ninsert; /* insert mode on next write */
37: int tt_row; /* cursor row */
38: int tt_col; /* cursor column */
39:
40: /* terminal info */
41: int tt_nrow; /* number of display rows */
42: int tt_ncol; /* number of display columns */
43: char tt_hasinsert; /* has insert character */
44: char tt_availmodes; /* the display modes supported */
45: char tt_wrap; /* has auto wrap around */
46: char tt_retain; /* can retain below (db flag) */
47:
48: /* the frame characters */
49: short *tt_frame;
50: };
51: struct tt tt;
52:
53: /*
54: * List of terminal drivers.
55: */
56: struct tt_tab {
57: char *tt_name;
58: int tt_len;
59: int (*tt_func)();
60: };
61: struct tt_tab tt_tab[];
62:
63: /*
64: * Clean interface to termcap routines.
65: * Too may t's.
66: */
67: char tt_strings[1024]; /* string buffer */
68: char *tt_strp; /* pointer for it */
69:
70: struct tt_str {
71: char *ts_str;
72: int ts_n;
73: };
74:
75: struct tt_str *tttgetstr();
76: struct tt_str *ttxgetstr(); /* tgetstr() and expand delays */
77:
78: int tttputc();
79: #define tttputs(s, n) tputs((s)->ts_str, (n), tttputc)
80: #define ttxputs(s) ttwrite((s)->ts_str, (s)->ts_n)
81:
82: /*
83: * Buffered output without stdio.
84: * These variables have different meanings from the ww_ob* variabels.
85: * But I'm too lazy to think up different names.
86: */
87: char tt_ob[512];
88: char *tt_obp;
89: char *tt_obe;
90: #define ttputc(c) (tt_obp < tt_obe ? (*tt_obp++ = (c)) \
91: : (ttflush(), *tt_obp++ = (c)))
Defined variables
tt
defined in line
51; used 244 times
- in /usr/src/ucb/window/ttf100.c line
34-35(2)
- in /usr/src/ucb/window/ttgeneric.c line
84,
92,
125-141(5),
147-163(13),
170-191(15),
197-211(8),
218-224(3),
235-236(2),
246-248(6),
261-275(5),
282,
344-352(5),
358-378(18)
- in /usr/src/ucb/window/tth19.c line
51-54(3),
66,
89,
109-117(10),
124-139(12),
145-162(7),
177-178(2),
189-191(6),
236-257(19)
- in /usr/src/ucb/window/tth29.c line
46-57(5),
64-65(2)
- in /usr/src/ucb/window/ttinit.c line
72-73(2)
- in /usr/src/ucb/window/tttvi925.c line
33-34(2)
- in /usr/src/ucb/window/wwclreol.c line
105-110(3)
- in /usr/src/ucb/window/wwdelchar.c line
83-87(3)
- in /usr/src/ucb/window/wwdump.c line
21-26(4),
36-41(4),
49-54(4),
62-67(5),
76-81(5)
- in /usr/src/ucb/window/wwend.c line
17-22(7)
- in /usr/src/ucb/window/wwflush.c line
18-20(2)
- in /usr/src/ucb/window/wwframe.c line
212
- in /usr/src/ucb/window/wwinit.c line
73-77(5)
- in /usr/src/ucb/window/wwinschar.c line
84-91(7)
- in /usr/src/ucb/window/wwredraw.c line
19
- in /usr/src/ucb/window/wwscroll.c line
88(2),
97-101(4),
113-118(5)
- in /usr/src/ucb/window/wwsuspend.c line
25
- in /usr/src/ucb/window/wwupdate.c line
27,
58-59(2),
84,
90,
105-129(17),
135-136(2)
tt_ob
defined in line
87; used 5 times
tt_obp
defined in line
88; used 30 times
Defined struct's
tt
defined in line
14; used 2 times
tt_str
defined in line
70; used 98 times
Defined macros
ttputc
defined in line
90; used 16 times
Usage of this include