Commit | Line | Data |
---|---|---|
0edd06b4 KT |
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 */ |