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