* A clist structure is the head
* of a linked list queue of characters.
* The characters are stored in 4-word
* blocks containing a link and 6 characters.
* The routines getc and putc (m45.s or m40.s)
* manipulate these structures.
int c_cc
; /* character count */
int c_cf
; /* pointer to first block */
int c_cl
; /* pointer to last block */
* A tty structure is needed for
* each UNIX character device that
* is used for normal terminal IO.
* The routines in tty.c handle the
* common code associated with
* The definition and device dependent
* code is in each driver. (kl.c dc.c dh.c)
struct clist t_rawq
; /* input chars right off device */
struct clist t_canq
; /* input chars after erase and kill */
struct clist t_outq
; /* output list to device */
int t_flags
; /* mode, settable by stty call */
int *t_addr
; /* device address (register or startup fcn) */
char t_delct
; /* number of delimiters in raw q */
char t_col
; /* printing column of device */
char t_erase
; /* erase character */
char t_kill
; /* kill character */
char t_state
; /* internal state, not visible externally */
char t_char
; /* character temporary */
int t_speeds
; /* output+input line speed */
int t_dev
; /* device name */
char partab
[]; /* ASCII table: parity, character class */
#define CERASE '#' /* default special characters */
#define CQUIT 034 /* FS, cntl shift L */
#define CINTR 0177 /* DEL */
/* Internal state bits */
#define TIMEOUT 01 /* Delay timeout in progress */
#define WOPEN 02 /* Waiting for open to complete */
#define ISOPEN 04 /* Device is open */
#define SSTART 010 /* Has special start routine at addr */
#define CARR_ON 020 /* Software copy of carrier-present */
#define BUSY 040 /* Output in progress */
#define ASLEEP 0100 /* Wakeup when output done */