1: /*
2: * @(#)tt.h 3.16 1/1/94
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: #ifdef pdp11
68: char *tt_strings; /* string buffer on stack (see main.c) */
69: #else
70: char tt_strings[1024]; /* string buffer */
71: #endif
72: char *tt_strp; /* pointer for it */
73:
74: struct tt_str {
75: char *ts_str;
76: int ts_n;
77: };
78:
79: struct tt_str *tttgetstr();
80: struct tt_str *ttxgetstr(); /* tgetstr() and expand delays */
81:
82: int tttputc();
83: #define tttputs(s, n) tputs((s)->ts_str, (n), tttputc)
84: #define ttxputs(s) ttwrite((s)->ts_str, (s)->ts_n)
85:
86: /*
87: * Buffered output without stdio.
88: * These variables have different meanings from the ww_ob* variabels.
89: * But I'm too lazy to think up different names.
90: */
91: #define TTOBSIZ 512
92: #ifdef pdp11
93: char *tt_ob;
94: #else
95: char tt_ob[TTOBSIZ];
96: #endif
97: char *tt_obp;
98: char *tt_obe;
99: #define ttputc(c) (tt_obp < tt_obe ? (*tt_obp++ = (c)) \
100: : (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
95; used 5 times
tt_obp
defined in line
97; used 30 times
Defined struct's
tt
defined in line
14; used 2 times
tt_str
defined in line
74; used 98 times
Defined macros
ttputc
defined in line
99; used 16 times
Usage of this include