Annotation of coherent/a/usr/include/termio.h, revision 1.1.1.1

1.1       root        1: /* (-lgl
                      2:  *     COHERENT Version 4.0
                      3:  *     Copyright (c) 1982, 1992 by Mark Williams Company.
                      4:  *     All rights reserved. May not be copied without permission.
                      5:  -lgl) */
                      6: #ifndef TERMIO_H
                      7: #define TERMIO_H
                      8: 
                      9: #if (defined _I386 || defined KERNEL)
                     10: #define USE_TERMIO
                     11: #endif
                     12: 
                     13: /*
                     14:  * WARNING:  termio.h command codes are incompatible with device drivers
                     15:  *   shipped with COHERENT 286;  sgtty.h command codes are used instead.  This
                     16:  *   header is for use principally with COHERENT 386.  If you are using custom
                     17:  *   drivers and line discipline with COHERENT 286 and need termio constants
                     18:  *   for these modules, then define USE_TERMIO before this file is included.
                     19:  */
                     20: #ifdef USE_TERMIO
                     21: 
                     22: /*
                     23:  *     Terminal Input/Output Parameters
                     24:  */
                     25: 
                     26: #define        NCC     8
                     27: 
                     28: struct termio {
                     29:        unsigned short  c_iflag;        /* input modes */
                     30:        unsigned short  c_oflag;        /* output modes */
                     31:        unsigned short  c_cflag;        /* control modes */
                     32:        unsigned short  c_lflag;        /* local modes */
                     33:                 char   c_line;         /* line discipline */
                     34:        unsigned char   c_cc[NCC];      /* control chars */
                     35: };
                     36: 
                     37: /*
                     38:  * Basic Terminal Input Control: c_iflag
                     39:  */
                     40: #define        IGNBRK  0x0001          /* Ignore break condition */
                     41: #define        BRKINT  0x0002          /* Signal interrupt on break */
                     42: #define        IGNPAR  0x0004          /* Ignore characters with parity errors */
                     43: #define        PARMRK  0x0008          /* Mark parity errors */
                     44: #define        INPCK   0x0010          /* Enable input parity check */
                     45: #define        ISTRIP  0x0020          /* Strip character */
                     46: #define        INLCR   0x0040          /* Map NL to CR on input */
                     47: #define        IGNCR   0x0080          /* Ignore CR */
                     48: #define        ICRNL   0x0100          /* Map CR to NL on input */
                     49: #define        IUCLC   0x0200          /* Map upper-case to lower-case on input */
                     50: #define        IXON    0x0400          /* Enable start/stop output control */
                     51: #define        IXANY   0x0800          /* Enable any character to restart output */
                     52: #define        IXOFF   0x1000          /* Enable start/stop input control */
                     53: 
                     54: /*
                     55:  * Basic Terminal Output Control: c_oflag
                     56:  */
                     57: #define        OPOST   0x0001          /* Postprocess output */
                     58: #define        OLCUC   0x0002          /* Map lower case to upper on output */
                     59: #define        ONLCR   0x0004          /* Map NL to CR-NL on output */
                     60: #define        OCRNL   0x0008          /* Map CR to NL on output */
                     61: #define        ONOCR   0x0010          /* No CR output at column 0 */
                     62: #define        ONLRET  0x0020          /* NL performs CR function */
                     63: #define        OFILL   0x0040          /* Use fill characters for delay */
                     64: #define        OFDEL   0x0080          /* Fill is DEL, else NUL */
                     65: #define        NLDLY   0x0100          /* Select new-line delays: */
                     66: #define        NL0     0x0000
                     67: #define        NL1     0x0100
                     68: #define        CRDLY   0x0600          /* Select carriage-return delays: */
                     69: #define        CR0     0x0000
                     70: #define        CR1     0x0200
                     71: #define        CR2     0x0400
                     72: #define        CR3     0x0600
                     73: #define        TABDLY  0x1800          /* Select horizontal-tab delays: */
                     74: #define        TAB0    0x0000
                     75: #define        TAB1    0x0800
                     76: #define        TAB2    0x1000
                     77: #define        TAB3    0x1800          
                     78: #define        BSDLY   0x2000          /* Select backspace delays: */
                     79: #define        BS0     0x0000
                     80: #define        BS1     0x2000
                     81: #define        VTDLY   0x4000          /* Select vertical-tab delays: */
                     82: #define        VT0     0x0000
                     83: #define        VT1     0x4000
                     84: #define        FFDLY   0x8000          /* Select form-feed delays: */
                     85: #define        FF0     0x0000
                     86: #define        FF1     0x8000
                     87: 
                     88: /*
                     89:  * Terminal Hardware Control: c_cflag
                     90:  */
                     91: #define        CBAUD   0x000F          /* Baud rate: */
                     92: #define        B0      0               /* Hang up */
                     93: #define        B50     1               /* 50 baud */
                     94: #define        B75     2               /* 75 baud */
                     95: #define        B110    3               /* 110 baud */
                     96: #define        B134    4               /* 134.5 baud */
                     97: #define        B150    5               /* 150 baud */
                     98: #define        B200    6               /* 200 baud */
                     99: #define        B300    7               /* 300 baud */
                    100: #define        B600    8               /* 600 baud */
                    101: #define        B1200   9               /* 1200 baud */
                    102: #define        B1800   10              /* 1800 baud */
                    103: #define        B2400   11              /* 2400 baud */
                    104: #define        B4800   12              /* 4800 baud */
                    105: #define        B9600   13              /* 9600 baud */
                    106: #define        B19200  14              /* 19200 baud */
                    107: #define        B38400  15              /* 38400 baud */
                    108: #define        EXTA    14              /* External A */
                    109: #define        EXTB    15              /* External B */
                    110: #define        CSIZE   0x0030          /* Character size: */
                    111: #define        CS5     0x0000          /* 5 bits */
                    112: #define        CS6     0x0010          /* 6 bits */
                    113: #define        CS7     0x0020          /* 7 bits */
                    114: #define        CS8     0x0030          /* 8 bits */
                    115: #define        CSTOPB  0x0040          /* Send two stop bits, else one */
                    116: #define        CREAD   0x0080          /* Enable receiver */
                    117: #define        PARENB  0x0100          /* Parity enable */
                    118: #define        PARODD  0x0200          /* Odd parity, else even */
                    119: #define        HUPCL   0x0400          /* Hang up on last close */
                    120: #define        CLOCAL  0x0800          /* Local line, else dial-up */
                    121: 
                    122: /*
                    123:  * Terminal Functions - c_lflag
                    124:  */
                    125: #define        ISIG    0x0001          /* Enable signals */
                    126: #define        ICANON  0x0002          /* Canonical input (erase and kill) */
                    127: #define        XCASE   0x0004          /* Canonical upper/lower presentation */
                    128: #define        ECHO    0x0008          /* Enable echo */
                    129: #define        ECHOE   0x0010          /* Echo erase character as BS-SP-BS */
                    130: #define        ECHOK   0x0020          /* Echo NL after kill character */
                    131: #define        ECHONL  0x0040          /* Echo NL */
                    132: #define        NOFLSH  0x0080          /* Disable flush after interrupt or quit */
                    133: 
                    134: /*
                    135:  * Offsets into Control Characters
                    136:  */
                    137: #define        VINTR   0
                    138: #define        VQUIT   1
                    139: #define        VERASE  2
                    140: #define        VKILL   3
                    141: #define        VEOF    4
                    142: #define        VEOL    5
                    143: #define        VEOL2   6
                    144: #define        VMIN    4
                    145: #define        VTIME   5
                    146: #define        VSWTCH  6
                    147: 
                    148: /*
                    149:  * Character Constants
                    150:  */
                    151: #define CEOF   0x04            /* EOT (ctrl-D) */
                    152: #define CERASE 0x08            /* BS (backspace) */
                    153: #define CESC   0x1B            /* ESC (escape) */
                    154: #define CKILL  0x15            /* ACK (ctrl-U) */
                    155: #define CQUIT  0x1C            /* FS (ctrl-\) */
                    156: #define CSTART 0x11            /* DC1 (ctrl-Q) */
                    157: #define CSTOP  0x13            /* DC3 (ctrl-S) */
                    158: #define CSWTCH 0x1A            /* EOT (ctrl-Z) */
                    159: 
                    160: /*
                    161:  * Ioctl Commands - ioctl(fno, com, &termio)
                    162:  */
                    163: 
                    164: #define        TIOC    ('T'<<8)
                    165: #define        TCGETA  (TIOC|1)        /* Get terminal parameters */
                    166: #define        TCSETA  (TIOC|2)        /* Set terminal parameters */
                    167: #define        TCSETAW (TIOC|3)        /* Wait for drain, then set parameters */
                    168: #define        TCSETAF (TIOC|4)        /* Wait for drain, flush input, set parms */
                    169: 
                    170: /*
                    171:  * Ioctl Commands - ioctl(fno, com, arg)
                    172:  */
                    173: #define        TCSBRK  (TIOC|5)        /* Send 0.25 second break */
                    174: #define        TCXONC  (TIOC|6)        /* Start/stop control
                    175:                                   arg=0 -> suspend output
                    176:                                   arg=1 -> restart suspended output
                    177:                                 */
                    178: #define        TCFLSH  (TIOC|7)        /* arg=0 -> flush input queue
                    179:                                   arg=1 -> flush output queue
                    180:                                   arg=2 -> flush both input and output queues
                    181:                                 */
                    182: #endif
                    183: #endif

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.