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

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

unix.superglobalmegacorp.com

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