|
|
1.1 ! root 1: #define NCC 8 ! 2: ! 3: /* control characters */ ! 4: #define VINTR 0 ! 5: #define VQUIT 1 ! 6: #define VERASE 2 ! 7: #define VKILL 3 ! 8: #define VEOF 4 ! 9: #define VEOL 5 ! 10: #define VEOL2 6 ! 11: #define VMIN 4 ! 12: #define VTIME 5 ! 13: ! 14: #define CNUL 0 ! 15: #define CDEL 0377 ! 16: /* default control chars */ ! 17: #define CESC '\\' ! 18: #define CINTR 0177 /* DEL */ ! 19: #define CQUIT 034 /* FS, cntl | */ ! 20: #define CERASE '#' ! 21: #define CKILL '@' ! 22: #define CEOF 04 /* cntl d */ ! 23: #define CSTART 021 /* cntl q */ ! 24: #define CSTOP 023 /* cntl s */ ! 25: ! 26: ! 27: /* input modes */ ! 28: #define IGNBRK 0000001 ! 29: #define BRKINT 0000002 ! 30: #define IGNPAR 0000004 ! 31: #define PARMRK 0000010 ! 32: #define INPCK 0000020 ! 33: #define ISTRIP 0000040 ! 34: #define INLCR 0000100 ! 35: #define IGNCR 0000200 ! 36: #define ICRNL 0000400 ! 37: #define IUCLC 0001000 ! 38: #define IXON 0002000 ! 39: #define IXANY 0004000 ! 40: #define IXOFF 0010000 ! 41: ! 42: /* output modes */ ! 43: #define OPOST 0000001 ! 44: #define OLCUC 0000002 ! 45: #define ONLCR 0000004 ! 46: #define OCRNL 0000010 ! 47: #define ONOCR 0000020 ! 48: #define ONLRET 0000040 ! 49: #define OFILL 0000100 ! 50: #define OFDEL 0000200 ! 51: #define NLDLY 0000400 ! 52: #define NL0 0 ! 53: #define NL1 0000400 ! 54: #define CRDLY 0003000 ! 55: #define CR0 0 ! 56: #define CR1 0001000 ! 57: #define CR2 0002000 ! 58: #define CR3 0003000 ! 59: #define TABDLY 0014000 ! 60: #define TAB0 0 ! 61: #define TAB1 0004000 ! 62: #define TAB2 0010000 ! 63: #define TAB3 0014000 ! 64: #define BSDLY 0020000 ! 65: #define BS0 0 ! 66: #define BS1 0020000 ! 67: #define VTDLY 0040000 ! 68: #define VT0 0 ! 69: #define VT1 0040000 ! 70: #define FFDLY 0100000 ! 71: #define FF0 0 ! 72: #define FF1 0100000 ! 73: ! 74: /* control modes */ ! 75: #define CBAUD 0000017 ! 76: #define B0 0 ! 77: #define B50 0000001 ! 78: #define B75 0000002 ! 79: #define B110 0000003 ! 80: #define B134 0000004 ! 81: #define B150 0000005 ! 82: #define B200 0000006 ! 83: #define B300 0000007 ! 84: #define B600 0000010 ! 85: #define B1200 0000011 ! 86: #define B1800 0000012 ! 87: #define B2400 0000013 ! 88: #define B4800 0000014 ! 89: #define B9600 0000015 ! 90: #define EXTA 0000016 ! 91: #define EXTB 0000017 ! 92: #define CSIZE 0000060 ! 93: #define CS5 0 ! 94: #define CS6 0000020 ! 95: #define CS7 0000040 ! 96: #define CS8 0000060 ! 97: #define CSTOPB 0000100 ! 98: #define CREAD 0000200 ! 99: #define PARENB 0000400 ! 100: #define PARODD 0001000 ! 101: #define HUPCL 0002000 ! 102: #define CLOCAL 0004000 ! 103: ! 104: /* line discipline 0 modes */ ! 105: #define ISIG 0000001 ! 106: #define ICANON 0000002 ! 107: #define XCASE 0000004 ! 108: #define ECHO 0000010 ! 109: #define ECHOE 0000020 ! 110: #define ECHOK 0000040 ! 111: #define ECHONL 0000100 ! 112: #define NOFLSH 0000200 ! 113: ! 114: #define SSPEED 7 /* default speed: 300 baud */ ! 115: ! 116: /* ! 117: * Ioctl control packet ! 118: */ ! 119: struct termio { ! 120: unsigned short c_iflag; /* input modes */ ! 121: unsigned short c_oflag; /* output modes */ ! 122: unsigned short c_cflag; /* control modes */ ! 123: unsigned short c_lflag; /* line discipline modes */ ! 124: char c_line; /* line discipline */ ! 125: unsigned char c_cc[NCC]; /* control chars */ ! 126: }; ! 127: #define IOCTYPE 0xff00 ! 128: ! 129: #define TIOC ('T'<<8) ! 130: #define TCGETA (TIOC|1) ! 131: #define TCSETA (TIOC|2) ! 132: #define TCSETAW (TIOC|3) ! 133: #define TCSETAF (TIOC|4) ! 134: #define TCSBRK (TIOC|5) ! 135: #define TCXONC (TIOC|6) ! 136: #define TCFLSH (TIOC|7) ! 137: #define TCDSET (TIOC|32) ! 138: ! 139: #define LDIOC ('D'<<8) ! 140: #define LDOPEN (LDIOC|0) ! 141: #define LDCLOSE (LDIOC|1) ! 142: #define LDCHG (LDIOC|2) ! 143: #define LDGETT (LDIOC|8) ! 144: #define LDSETT (LDIOC|9) ! 145: ! 146: /* ! 147: * Terminal types ! 148: */ ! 149: #define TERM_NONE 0 /* tty */ ! 150: #define TERM_TEC 1 /* TEC Scope */ ! 151: #define TERM_V61 2 /* DEC VT61 */ ! 152: #define TERM_V10 3 /* DEC VT100 */ ! 153: #define TERM_TEX 4 /* Tektronix 4023 */ ! 154: #define TERM_D40 5 /* TTY Mod 40/1 */ ! 155: #define TERM_H45 6 /* Hewlitt-Packard 45 */ ! 156: #define TERM_D42 7 /* TTY Mod 40/2B */ ! 157: ! 158: /* ! 159: * Terminal flags ! 160: */ ! 161: #define TM_NONE 0000 /* use default flags */ ! 162: #define TM_SNL 0001 /* special newline flag */ ! 163: #define TM_ANL 0002 /* auto newline on column 80 */ ! 164: #define TM_LCF 0004 /* last col of last row special */ ! 165: #define TM_CECHO 0010 /* echo terminal cursor control */ ! 166: #define TM_CINVIS 0020 /* do not send esc seq to user */ ! 167: #define TM_SET 0200 /* must be on to set/res flags */ ! 168: ! 169: /* ! 170: * structure of ioctl arg for LDGETT and LDSETT ! 171: */ ! 172: struct termcb { ! 173: char st_flgs; /* term flags */ ! 174: char st_termt; /* term type */ ! 175: char st_crow; /* gtty only - current row */ ! 176: char st_ccol; /* gtty only - current col */ ! 177: char st_vrow; /* variable row */ ! 178: char st_lrow; /* last row */ ! 179: };
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.