Rich Felker | 6315004 | 2012-07-11 04:22:13 -0400 | [diff] [blame] | 1 | struct termios |
| 2 | { |
| 3 | tcflag_t c_iflag; |
| 4 | tcflag_t c_oflag; |
| 5 | tcflag_t c_cflag; |
| 6 | tcflag_t c_lflag; |
| 7 | cc_t c_line; |
| 8 | cc_t c_cc[NCCS]; |
| 9 | speed_t __c_ispeed; |
| 10 | speed_t __c_ospeed; |
| 11 | }; |
| 12 | |
| 13 | #define VINTR 0 |
| 14 | #define VQUIT 1 |
| 15 | #define VERASE 2 |
| 16 | #define VKILL 3 |
Rich Felker | 144dc4f | 2012-11-23 17:23:38 -0500 | [diff] [blame] | 17 | #define VMIN 4 |
Rich Felker | 6315004 | 2012-07-11 04:22:13 -0400 | [diff] [blame] | 18 | #define VTIME 5 |
Rich Felker | 144dc4f | 2012-11-23 17:23:38 -0500 | [diff] [blame] | 19 | #define VEOL2 6 |
Rich Felker | 6315004 | 2012-07-11 04:22:13 -0400 | [diff] [blame] | 20 | #define VSWTC 7 |
Rich Felker | 144dc4f | 2012-11-23 17:23:38 -0500 | [diff] [blame] | 21 | #define VSWTCH 7 |
Rich Felker | 6315004 | 2012-07-11 04:22:13 -0400 | [diff] [blame] | 22 | #define VSTART 8 |
| 23 | #define VSTOP 9 |
| 24 | #define VSUSP 10 |
Rich Felker | 6315004 | 2012-07-11 04:22:13 -0400 | [diff] [blame] | 25 | #define VREPRINT 12 |
| 26 | #define VDISCARD 13 |
| 27 | #define VWERASE 14 |
| 28 | #define VLNEXT 15 |
Rich Felker | 144dc4f | 2012-11-23 17:23:38 -0500 | [diff] [blame] | 29 | #define VEOF 16 |
| 30 | #define VEOL 17 |
Rich Felker | 6315004 | 2012-07-11 04:22:13 -0400 | [diff] [blame] | 31 | |
| 32 | #define IGNBRK 0000001 |
| 33 | #define BRKINT 0000002 |
| 34 | #define IGNPAR 0000004 |
| 35 | #define PARMRK 0000010 |
| 36 | #define INPCK 0000020 |
| 37 | #define ISTRIP 0000040 |
| 38 | #define INLCR 0000100 |
| 39 | #define IGNCR 0000200 |
| 40 | #define ICRNL 0000400 |
| 41 | #define IUCLC 0001000 |
| 42 | #define IXON 0002000 |
| 43 | #define IXANY 0004000 |
| 44 | #define IXOFF 0010000 |
| 45 | #define IMAXBEL 0020000 |
Rich Felker | 144dc4f | 2012-11-23 17:23:38 -0500 | [diff] [blame] | 46 | #define IUTF8 0040000 |
Rich Felker | 6315004 | 2012-07-11 04:22:13 -0400 | [diff] [blame] | 47 | |
| 48 | #define OPOST 0000001 |
| 49 | #define OLCUC 0000002 |
| 50 | #define ONLCR 0000004 |
| 51 | #define OCRNL 0000010 |
| 52 | #define ONOCR 0000020 |
| 53 | #define ONLRET 0000040 |
| 54 | #define OFILL 0000100 |
| 55 | #define OFDEL 0000200 |
| 56 | #define NLDLY 0000400 |
| 57 | #define NL0 0000000 |
| 58 | #define NL1 0000400 |
| 59 | #define CRDLY 0003000 |
| 60 | #define CR0 0000000 |
| 61 | #define CR1 0001000 |
| 62 | #define CR2 0002000 |
| 63 | #define CR3 0003000 |
| 64 | #define TABDLY 0014000 |
| 65 | #define TAB0 0000000 |
| 66 | #define TAB1 0004000 |
| 67 | #define TAB2 0010000 |
| 68 | #define TAB3 0014000 |
| 69 | #define BSDLY 0020000 |
| 70 | #define BS0 0000000 |
| 71 | #define BS1 0020000 |
| 72 | #define FFDLY 0100000 |
| 73 | #define FF0 0000000 |
| 74 | #define FF1 0100000 |
| 75 | |
| 76 | #define VTDLY 0040000 |
| 77 | #define VT0 0000000 |
| 78 | #define VT1 0040000 |
| 79 | |
Rich Felker | 6315004 | 2012-07-11 04:22:13 -0400 | [diff] [blame] | 80 | #define B0 0000000 |
| 81 | #define B50 0000001 |
| 82 | #define B75 0000002 |
| 83 | #define B110 0000003 |
| 84 | #define B134 0000004 |
| 85 | #define B150 0000005 |
| 86 | #define B200 0000006 |
| 87 | #define B300 0000007 |
| 88 | #define B600 0000010 |
| 89 | #define B1200 0000011 |
| 90 | #define B1800 0000012 |
| 91 | #define B2400 0000013 |
| 92 | #define B4800 0000014 |
| 93 | #define B9600 0000015 |
| 94 | #define B19200 0000016 |
| 95 | #define B38400 0000017 |
| 96 | |
| 97 | #define B57600 0010001 |
| 98 | #define B115200 0010002 |
| 99 | #define B230400 0010003 |
| 100 | #define B460800 0010004 |
| 101 | #define B500000 0010005 |
| 102 | #define B576000 0010006 |
| 103 | #define B921600 0010007 |
| 104 | #define B1000000 0010010 |
| 105 | #define B1152000 0010011 |
| 106 | #define B1500000 0010012 |
| 107 | #define B2000000 0010013 |
| 108 | #define B2500000 0010014 |
| 109 | #define B3000000 0010015 |
| 110 | #define B3500000 0010016 |
| 111 | #define B4000000 0010017 |
| 112 | |
Rich Felker | 6315004 | 2012-07-11 04:22:13 -0400 | [diff] [blame] | 113 | #define CSIZE 0000060 |
| 114 | #define CS5 0000000 |
| 115 | #define CS6 0000020 |
| 116 | #define CS7 0000040 |
| 117 | #define CS8 0000060 |
| 118 | #define CSTOPB 0000100 |
| 119 | #define CREAD 0000200 |
| 120 | #define PARENB 0000400 |
| 121 | #define PARODD 0001000 |
| 122 | #define HUPCL 0002000 |
| 123 | #define CLOCAL 0004000 |
Rich Felker | 6315004 | 2012-07-11 04:22:13 -0400 | [diff] [blame] | 124 | |
| 125 | #define ISIG 0000001 |
| 126 | #define ICANON 0000002 |
| 127 | #define ECHO 0000010 |
| 128 | #define ECHOE 0000020 |
| 129 | #define ECHOK 0000040 |
| 130 | #define ECHONL 0000100 |
| 131 | #define NOFLSH 0000200 |
Rich Felker | 144dc4f | 2012-11-23 17:23:38 -0500 | [diff] [blame] | 132 | #define IEXTEN 0000400 |
Rich Felker | 144dc4f | 2012-11-23 17:23:38 -0500 | [diff] [blame] | 133 | #define TOSTOP 0100000 |
| 134 | #define ITOSTOP 0100000 |
Rich Felker | 6315004 | 2012-07-11 04:22:13 -0400 | [diff] [blame] | 135 | |
| 136 | #define TCOOFF 0 |
| 137 | #define TCOON 1 |
| 138 | #define TCIOFF 2 |
| 139 | #define TCION 3 |
| 140 | |
| 141 | #define TCIFLUSH 0 |
| 142 | #define TCOFLUSH 1 |
| 143 | #define TCIOFLUSH 2 |
| 144 | |
| 145 | #define TCSANOW 0 |
| 146 | #define TCSADRAIN 1 |
| 147 | #define TCSAFLUSH 2 |
Rich Felker | a627eb3 | 2014-01-08 19:20:55 -0500 | [diff] [blame] | 148 | |
| 149 | #if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) |
Szabolcs Nagy | ee9b590 | 2016-07-03 17:08:54 +0200 | [diff] [blame^] | 150 | #define EXTA 0000016 |
| 151 | #define EXTB 0000017 |
| 152 | #define CBAUD 0010017 |
Rich Felker | a627eb3 | 2014-01-08 19:20:55 -0500 | [diff] [blame] | 153 | #define CBAUDEX 0010000 |
Szabolcs Nagy | ee9b590 | 2016-07-03 17:08:54 +0200 | [diff] [blame^] | 154 | #define CIBAUD 002003600000 |
| 155 | #define CMSPAR 010000000000 |
| 156 | #define CRTSCTS 020000000000 |
| 157 | |
| 158 | #define XCASE 0000004 |
| 159 | #define ECHOCTL 0001000 |
| 160 | #define ECHOPRT 0002000 |
| 161 | #define ECHOKE 0004000 |
| 162 | #define FLUSHO 0020000 |
| 163 | #define PENDIN 0040000 |
Rich Felker | a627eb3 | 2014-01-08 19:20:55 -0500 | [diff] [blame] | 164 | #define EXTPROC 0200000 |
Szabolcs Nagy | ee9b590 | 2016-07-03 17:08:54 +0200 | [diff] [blame^] | 165 | |
Rich Felker | a627eb3 | 2014-01-08 19:20:55 -0500 | [diff] [blame] | 166 | #define XTABS 0014000 |
| 167 | #define TIOCSER_TEMT 1 |
| 168 | #endif |