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

partab defined in line 43; used 2 times

Defined struct's

clist defined in line 9; used 12 times
tty defined in line 26; used 92 times

Defined macros

ASLEEP defined in line 84; used 4 times
BUSY defined in line 83; used 3 times
CARR_ON defined in line 82; used 15 times
CEOT defined in line 49; used 1 times
CERASE defined in line 48; used 3 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
CRDELAY defined in line 70; never used
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
IENABLE defined in line 75; used 15 times
ISOPEN defined in line 80; used 8 times
LCASE defined in line 62; used 4 times
NLDELAY defined in line 68; never used
ODDP defined in line 66; used 4 times
RAW defined in line 65; used 5 times
SSTART defined in line 81; used 3 times
TBDELAY defined in line 69; never used
TIMEOUT defined in line 78; used 6 times
TTHIWAT defined in line 55; used 1 times
TTIPRI defined in line 45; used 5 times
TTLOWAT defined in line 56; used 3 times
TTOPRI defined in line 46; used 2 times
TTYHOG defined in line 57; used 1 times
VTDELAY defined in line 71; used 1 times
WOPEN defined in line 79; used 8 times
XTABS defined in line 61; used 2 times

Usage of this include

Last modified: 1975-05-14
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 1512
Valid CSS Valid XHTML 1.0 Strict