Upload Tizen:Base source
[external/eglibc.git] / sysdeps / unix / sysv / linux / sparc / bits / termios.h
1 /* termios type and macro definitions.  Linux/SPARC version.
2    Copyright (C) 1993-1997, 2000, 2005, 2010 Free Software Foundation, Inc.
3    This file is part of the GNU C Library.
4
5    The GNU C Library is free software; you can redistribute it and/or
6    modify it under the terms of the GNU Lesser General Public
7    License as published by the Free Software Foundation; either
8    version 2.1 of the License, or (at your option) any later version.
9
10    The GNU C Library is distributed in the hope that it will be useful,
11    but WITHOUT ANY WARRANTY; without even the implied warranty of
12    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13    Lesser General Public License for more details.
14
15    You should have received a copy of the GNU Lesser General Public
16    License along with the GNU C Library; if not, write to the Free
17    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
18    02111-1307 USA.  */
19
20 #ifndef _TERMIOS_H
21 # error "Never include <bits/termios.h> directly; use <termios.h> instead."
22 #endif
23
24 typedef unsigned char cc_t;
25 typedef unsigned int speed_t;
26 typedef unsigned int tcflag_t;
27
28 #define NCCS 17
29 struct termios
30   {
31     tcflag_t c_iflag;           /* input mode flags */
32     tcflag_t c_oflag;           /* output mode flags */
33     tcflag_t c_cflag;           /* control mode flags */
34     tcflag_t c_lflag;           /* local mode flags */
35     cc_t c_line;                /* line discipline */
36     cc_t c_cc[NCCS];            /* control characters */
37   };
38
39 /* c_cc characters */
40 #define VINTR    0
41 #define VQUIT    1
42 #define VERASE   2
43 #define VKILL    3
44 #define VEOF     4
45 #define VEOL     5
46 #define VEOL2    6
47 #define VSWTC    7
48 #define VSTART   8
49 #define VSTOP    9
50 #define VSUSP    10
51 #define VDSUSP   11             /* SunOS POSIX nicety I do believe... */
52 #define VREPRINT 12
53 #define VDISCARD 13
54 #define VWERASE  14
55 #define VLNEXT   15
56
57 /* User apps assume vmin/vtime is shared with eof/eol */
58 #define VMIN     VEOF
59 #define VTIME    VEOL
60
61 /* c_iflag bits */
62 #define IGNBRK  0x00000001
63 #define BRKINT  0x00000002
64 #define IGNPAR  0x00000004
65 #define PARMRK  0x00000008
66 #define INPCK   0x00000010
67 #define ISTRIP  0x00000020
68 #define INLCR   0x00000040
69 #define IGNCR   0x00000080
70 #define ICRNL   0x00000100
71 #define IUCLC   0x00000200
72 #define IXON    0x00000400
73 #define IXANY   0x00000800
74 #define IXOFF   0x00001000
75 #define IMAXBEL 0x00002000
76 #define IUTF8   0x00004000
77
78 /* c_oflag bits */
79 #define OPOST   0x00000001
80 #define OLCUC   0x00000002
81 #define ONLCR   0x00000004
82 #define OCRNL   0x00000008
83 #define ONOCR   0x00000010
84 #define ONLRET  0x00000020
85 #define OFILL   0x00000040
86 #define OFDEL   0x00000080
87 #if defined __USE_MISC || defined __USE_XOPEN
88 # define NLDLY  0x00000100
89 # define   NL0  0x00000000
90 # define   NL1  0x00000100
91 # define CRDLY  0x00000600
92 # define   CR0  0x00000000
93 # define   CR1  0x00000200
94 # define   CR2  0x00000400
95 # define   CR3  0x00000600
96 # define TABDLY 0x00001800
97 # define   TAB0 0x00000000
98 # define   TAB1 0x00000800
99 # define   TAB2 0x00001000
100 # define   TAB3 0x00001800
101 # define BSDLY  0x00002000
102 # define   BS0  0x00000000
103 # define   BS1  0x00002000
104 #define FFDLY   0x00008000
105 #define   FF0   0x00000000
106 #define   FF1   0x00008000
107 #endif
108 #define VTDLY   0x00004000
109 #define   VT0   0x00000000
110 #define   VT1   0x00004000
111 #define PAGEOUT 0x00010000      /* SUNOS specific */
112 #define WRAP    0x00020000      /* SUNOS specific */
113
114 #ifdef __USE_MISC
115 # define   XTABS        0x00001800
116 #endif
117
118 /* c_cflag bit meaning */
119 #ifdef __USE_MISC
120 # define CBAUD  0x0000100f
121 #endif
122 #define  B0     0x00000000      /* hang up */
123 #define  B50    0x00000001
124 #define  B75    0x00000002
125 #define  B110   0x00000003
126 #define  B134   0x00000004
127 #define  B150   0x00000005
128 #define  B200   0x00000006
129 #define  B300   0x00000007
130 #define  B600   0x00000008
131 #define  B1200  0x00000009
132 #define  B1800  0x0000000a
133 #define  B2400  0x0000000b
134 #define  B4800  0x0000000c
135 #define  B9600  0x0000000d
136 #define  B19200 0x0000000e
137 #define  B38400 0x0000000f
138 #ifdef __USE_MISC
139 # define EXTA    B19200
140 # define EXTB    B38400
141 #endif
142 #define  CSIZE  0x00000030
143 #define   CS5   0x00000000
144 #define   CS6   0x00000010
145 #define   CS7   0x00000020
146 #define   CS8   0x00000030
147 #define CSTOPB  0x00000040
148 #define CREAD   0x00000080
149 #define PARENB  0x00000100
150 #define PARODD  0x00000200
151 #define HUPCL   0x00000400
152 #define CLOCAL  0x00000800
153 #ifdef __USE_MISC
154 # define CBAUDEX 0x00001000
155 #endif
156 #define  B57600  0x00001001
157 #define  B115200 0x00001002
158 #define  B230400 0x00001003
159 #define  B460800 0x00001004
160 #define  B76800  0x00001005
161 #define  B153600 0x00001006
162 #define  B307200 0x00001007
163 #define  B614400 0x00001008
164 #define  B921600 0x00001009
165 #define  B500000 0x0000100a
166 #define  B576000 0x0000100b
167 #define B1000000 0x0000100c
168 #define B1152000 0x0000100d
169 #define B1500000 0x0000100e
170 #define B2000000 0x0000100f
171 #define __MAX_BAUD B2000000
172
173 #ifdef __USE_MISC
174 # define CIBAUD  0x100f0000     /* input baud rate (not used) */
175 # define CMSPAR  0x40000000     /* mark or space (stick) parity */
176 # define CRTSCTS 0x80000000     /* flow control */
177 #endif
178
179 /* c_lflag bits */
180 #define ISIG    0x00000001
181 #define ICANON  0x00000002
182 #if defined __USE_MISC || defined __USE_XOPEN
183 # define XCASE  0x00000004
184 #endif
185 #define ECHO    0x00000008
186 #define ECHOE   0x00000010
187 #define ECHOK   0x00000020
188 #define ECHONL  0x00000040
189 #define NOFLSH  0x00000080
190 #define TOSTOP  0x00000100
191 #ifdef __USE_MISC
192 # define ECHOCTL        0x00000200
193 # define ECHOPRT        0x00000400
194 # define ECHOKE         0x00000800
195 # define DEFECHO        0x00001000      /* SUNOS thing, what is it? */
196 # define FLUSHO         0x00002000
197 # define PENDIN         0x00004000
198 #endif
199 #define IEXTEN  0x00008000
200 #ifdef __USE_BSD
201 # define EXTPROC 0x00010000
202 #endif
203
204 /* modem lines */
205 #define TIOCM_LE        0x001
206 #define TIOCM_DTR       0x002
207 #define TIOCM_RTS       0x004
208 #define TIOCM_ST        0x008
209 #define TIOCM_SR        0x010
210 #define TIOCM_CTS       0x020
211 #define TIOCM_CAR       0x040
212 #define TIOCM_RNG       0x080
213 #define TIOCM_DSR       0x100
214 #define TIOCM_CD        TIOCM_CAR
215 #define TIOCM_RI        TIOCM_RNG
216
217 /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
218 #define TIOCSER_TEMT    0x01    /* Transmitter physically empty */
219
220
221 /* tcflow() and TCXONC use these */
222 #define TCOOFF          0
223 #define TCOON           1
224 #define TCIOFF          2
225 #define TCION           3
226
227 /* tcflush() and TCFLSH use these */
228 #define TCIFLUSH        0
229 #define TCOFLUSH        1
230 #define TCIOFLUSH       2
231
232 /* tcsetattr uses these */
233 #define TCSANOW         0
234 #define TCSADRAIN       1
235 #define TCSAFLUSH       2