1: /*
2: * A clist structure is the head
3: * of a linked list queue of characters.
4: * The characters are stored in 4-word
5: * blocks containing a link and 6 characters.
6: * The routines getc and putc (m45.s or m40.s)
7: * manipulate these structures.
8: */
9: struct clist
10: {
11: int c_cc; /* character count */
12: int c_cf; /* pointer to first block */
13: int c_cl; /* pointer to last block */
14: };
15:
16: /*
17: * A tty structure is needed for
18: * each UNIX character device that
19: * is used for normal terminal IO.
20: * The routines in tty.c handle the
21: * common code associated with
22: * these structures.
23: * The definition and device dependent
24: * code is in each driver. (kl.c dc.c dh.c)
25: */
26: struct tty
27: {
28: struct clist t_rawq; /* input chars right off device */
29: struct clist t_canq; /* input chars after erase and kill */
30: struct clist t_outq; /* output list to device */
31: int t_flags; /* mode, settable by stty call */
32: int *t_addr; /* device address (register or startup fcn) */
33: char t_delct; /* number of delimiters in raw q */
34: char t_col; /* printing column of device */
35: char t_erase; /* erase character */
36: char t_kill; /* kill character */
37: char t_state; /* internal state, not visible externally */
38: char t_char; /* character temporary */
39: int t_speeds; /* output+input line speed */
40: int t_dev; /* device name */
41: };
42:
43: char partab[]; /* ASCII table: parity, character class */
44:
45: #define TTIPRI 10
46: #define TTOPRI 20
47:
48: #define CERASE '#' /* default special characters */
49: #define CEOT 004
50: #define CKILL '@'
51: #define CQUIT 034 /* FS, cntl shift L */
52: #define CINTR 0177 /* DEL */
53:
54: /* limits */
55: #define TTHIWAT 50
56: #define TTLOWAT 30
57: #define TTYHOG 256
58:
59: /* modes */
60: #define HUPCL 01
61: #define XTABS 02
62: #define LCASE 04
63: #define ECHO 010
64: #define CRMOD 020
65: #define RAW 040
66: #define ODDP 0100
67: #define EVENP 0200
68: #define NLDELAY 001400
69: #define TBDELAY 006000
70: #define CRDELAY 030000
71: #define VTDELAY 040000
72:
73: /* Hardware bits */
74: #define DONE 0200
75: #define IENABLE 0100
76:
77: /* Internal state bits */
78: #define TIMEOUT 01 /* Delay timeout in progress */
79: #define WOPEN 02 /* Waiting for open to complete */
80: #define ISOPEN 04 /* Device is open */
81: #define SSTART 010 /* Has special start routine at addr */
82: #define CARR_ON 020 /* Software copy of carrier-present */
83: #define BUSY 040 /* Output in progress */
84: #define ASLEEP 0100 /* Wakeup when output done */
Defined variables
Defined struct's
clist
defined in line
9; used 12 times
tty
defined in line
26; used 92 times
- in /usr/source/s2/ps.c line
20(2)
- in /usr/sys/dmr/dc.c line
39(2),
105(2),
140(2),
169(2),
181(2),
219(2)
- in /usr/sys/dmr/dh.c line
23(2),
73(2),
104(2),
133(2),
159(2),
173-175(4),
210(2),
231-235(4)
- in /usr/sys/dmr/dhdm.c line
14(2),
34(2),
54(2),
70(2)
- in /usr/sys/dmr/dhfdm.c line
11-15(4)
- in /usr/sys/dmr/kl.c line
23(2),
35(2),
69(2),
88(2),
99(2),
113(2)
- in /usr/sys/dmr/tty.c line
133-135(4),
172-174(4),
196-200(4),
256-259(4),
297-300(4),
424(2),
442-445(4),
473-475(4),
489-491(4)
Defined macros
BUSY
defined in line
83; used 3 times
CEOT
defined in line
49; used 1 times
CINTR
defined in line
52; used 2 times
CKILL
defined in line
50; used 3 times
CQUIT
defined in line
51; used 1 times
CRMOD
defined in line
64; used 3 times
DONE
defined in line
74; used 4 times
ECHO
defined in line
63; used 4 times
EVENP
defined in line
67; used 4 times
HUPCL
defined in line
60; used 3 times
LCASE
defined in line
62; used 4 times
ODDP
defined in line
66; used 4 times
RAW
defined in line
65; used 5 times
WOPEN
defined in line
79; used 8 times
XTABS
defined in line
61; used 2 times
Usage of this include