• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #undef NCCS
2 #define NCCS 19
3 struct termios {
4 	tcflag_t c_iflag;
5 	tcflag_t c_oflag;
6 	tcflag_t c_cflag;
7 	tcflag_t c_lflag;
8 	cc_t c_cc[NCCS];
9 	cc_t c_line;
10 	speed_t __c_ispeed;
11 	speed_t __c_ospeed;
12 };
13 
14 #define VINTR     0
15 #define VQUIT     1
16 #define VERASE    2
17 #define VKILL     3
18 #define VEOF      4
19 #define VMIN      5
20 #define VEOL      6
21 #define VTIME     7
22 #define VEOL2     8
23 #define VSWTC     9
24 #define VWERASE  10
25 #define VREPRINT 11
26 #define VSUSP    12
27 #define VSTART   13
28 #define VSTOP    14
29 #define VLNEXT   15
30 #define VDISCARD 16
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 IXON    0001000
42 #define IXOFF   0002000
43 #define IXANY   0004000
44 #define IUCLC   0010000
45 #define IMAXBEL 0020000
46 #define IUTF8   0040000
47 
48 #define OPOST  0000001
49 #define ONLCR  0000002
50 #define OLCUC  0000004
51 #define OCRNL  0000010
52 #define ONOCR  0000020
53 #define ONLRET 0000040
54 #define OFILL  0000100
55 #define OFDEL  0000200
56 #if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) || defined(_XOPEN_SOURCE)
57 #define NLDLY  0001400
58 #define NL0    0000000
59 #define NL1    0000400
60 #define NL2    0001000
61 #define NL3    0001400
62 #define TABDLY 0006000
63 #define TAB0   0000000
64 #define TAB1   0002000
65 #define TAB2   0004000
66 #define TAB3   0006000
67 #define CRDLY  0030000
68 #define CR0    0000000
69 #define CR1    0010000
70 #define CR2    0020000
71 #define CR3    0030000
72 #define FFDLY  0040000
73 #define FF0    0000000
74 #define FF1    0040000
75 #define BSDLY  0100000
76 #define BS0    0000000
77 #define BS1    0100000
78 #endif
79 
80 #define VTDLY  0200000
81 #define VT0    0000000
82 #define VT1    0200000
83 
84 #define B0       0000000
85 #define B50      0000001
86 #define B75      0000002
87 #define B110     0000003
88 #define B134     0000004
89 #define B150     0000005
90 #define B200     0000006
91 #define B300     0000007
92 #define B600     0000010
93 #define B1200    0000011
94 #define B1800    0000012
95 #define B2400    0000013
96 #define B4800    0000014
97 #define B9600    0000015
98 #define B19200   0000016
99 #define B38400   0000017
100 
101 #define B57600   00020
102 #define B115200  00021
103 #define B230400  00022
104 #define B460800  00023
105 #define B500000  00024
106 #define B576000  00025
107 #define B921600  00026
108 #define B1000000 00027
109 #define B1152000 00030
110 #define B1500000 00031
111 #define B2000000 00032
112 #define B2500000 00033
113 #define B3000000 00034
114 #define B3500000 00035
115 #define B4000000 00036
116 
117 #define CSIZE  00001400
118 #define CS5    00000000
119 #define CS6    00000400
120 #define CS7    00001000
121 #define CS8    00001400
122 #define CSTOPB 00002000
123 #define CREAD  00004000
124 #define PARENB 00010000
125 #define PARODD 00020000
126 #define HUPCL  00040000
127 #define CLOCAL 00100000
128 
129 #define ECHOE   0x00000002
130 #define ECHOK   0x00000004
131 #define ECHO    0x00000008
132 #define ECHONL  0x00000010
133 #define ISIG    0x00000080
134 #define ICANON  0x00000100
135 #define IEXTEN  0x00000400
136 #define TOSTOP  0x00400000
137 #define NOFLSH  0x80000000
138 
139 #define TCOOFF 0
140 #define TCOON  1
141 #define TCIOFF 2
142 #define TCION  3
143 
144 #define TCIFLUSH  0
145 #define TCOFLUSH  1
146 #define TCIOFLUSH 2
147 
148 #define TCSANOW   0
149 #define TCSADRAIN 1
150 #define TCSAFLUSH 2
151 
152 #if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
153 #define EXTA    0000016
154 #define EXTB    0000017
155 #define CBAUD   00377
156 #define CBAUDEX 0000020
157 #define CIBAUD  077600000
158 #define CMSPAR  010000000000
159 #define CRTSCTS 020000000000
160 
161 #define XCASE   0x00004000
162 #define ECHOCTL 0x00000040
163 #define ECHOPRT 0x00000020
164 #define ECHOKE  0x00000001
165 #define FLUSHO  0x00800000
166 #define PENDIN  0x20000000
167 #define EXTPROC 0x10000000
168 
169 #define XTABS   00006000
170 #define TIOCSER_TEMT 1
171 #endif
172