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