Update copyright notices with scripts/update-copyrights
[glibc.git] / ports / sysdeps / unix / sysv / linux / alpha / bits / termios.h
blob4310585563dc400cd326989faff8fece51986942
1 /* termios type and macro definitions. Linux version.
2 Copyright (C) 1993-2014 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 32
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_cc[NCCS]; /* control characters */
35 cc_t c_line; /* line discipline (== c_cc[33]) */
36 speed_t c_ispeed; /* input speed */
37 speed_t c_ospeed; /* output speed */
38 #define _HAVE_STRUCT_TERMIOS_C_ISPEED 1
39 #define _HAVE_STRUCT_TERMIOS_C_OSPEED 1
42 /* c_cc characters */
43 #define VEOF 0
44 #define VEOL 1
45 #define VEOL2 2
46 #define VERASE 3
47 #define VWERASE 4
48 #define VKILL 5
49 #define VREPRINT 6
50 #define VSWTC 7
51 #define VINTR 8
52 #define VQUIT 9
53 #define VSUSP 10
54 #define VSTART 12
55 #define VSTOP 13
56 #define VLNEXT 14
57 #define VDISCARD 15
58 #define VMIN 16
59 #define VTIME 17
61 /* c_iflag bits */
62 #define IGNBRK 0000001
63 #define BRKINT 0000002
64 #define IGNPAR 0000004
65 #define PARMRK 0000010
66 #define INPCK 0000020
67 #define ISTRIP 0000040
68 #define INLCR 0000100
69 #define IGNCR 0000200
70 #define ICRNL 0000400
71 #define IXON 0001000
72 #define IXOFF 0002000
73 #ifdef __USE_BSD
74 /* POSIX.1 doesn't want these... */
75 # define IXANY 0004000
76 # define IUCLC 0010000
77 # define IMAXBEL 0020000
78 # define IUTF8 0040000
79 #endif
81 /* c_oflag bits */
82 #define OPOST 0000001
83 #define ONLCR 0000002
84 #define OLCUC 0000004
86 #define OCRNL 0000010
87 #define ONOCR 0000020
88 #define ONLRET 0000040
90 #define OFILL 00000100
91 #define OFDEL 00000200
92 #if defined __USE_MISC || defined __USE_XOPEN
93 # define NLDLY 00001400
94 # define NL0 00000000
95 # define NL1 00000400
96 # define NL2 00001000
97 # define NL3 00001400
98 # define TABDLY 00006000
99 # define TAB0 00000000
100 # define TAB1 00002000
101 # define TAB2 00004000
102 # define TAB3 00006000
103 # define CRDLY 00030000
104 # define CR0 00000000
105 # define CR1 00010000
106 # define CR2 00020000
107 # define CR3 00030000
108 # define FFDLY 00040000
109 # define FF0 00000000
110 # define FF1 00040000
111 # define BSDLY 00100000
112 # define BS0 00000000
113 # define BS1 00100000
114 #endif
116 #define VTDLY 00200000
117 #define VT0 00000000
118 #define VT1 00200000
120 #ifdef __USE_MISC
121 # define XTABS 01000000 /* Hmm.. Linux/i386 considers this part of TABDLY.. */
122 #endif
124 /* c_cflag bit meaning */
125 #ifdef __USE_MISC
126 # define CBAUD 0000037
127 #endif
128 #define B0 0000000 /* hang up */
129 #define B50 0000001
130 #define B75 0000002
131 #define B110 0000003
132 #define B134 0000004
133 #define B150 0000005
134 #define B200 0000006
135 #define B300 0000007
136 #define B600 0000010
137 #define B1200 0000011
138 #define B1800 0000012
139 #define B2400 0000013
140 #define B4800 0000014
141 #define B9600 0000015
142 #define B19200 0000016
143 #define B38400 0000017
144 #ifdef __USE_MISC
145 # define EXTA B19200
146 # define EXTB B38400
147 # define CBAUDEX 0000000
148 #endif
149 #define B57600 00020
150 #define B115200 00021
151 #define B230400 00022
152 #define B460800 00023
153 #define B500000 00024
154 #define B576000 00025
155 #define B921600 00026
156 #define B1000000 00027
157 #define B1152000 00030
158 #define B1500000 00031
159 #define B2000000 00032
160 #define B2500000 00033
161 #define B3000000 00034
162 #define B3500000 00035
163 #define B4000000 00036
165 #define __MAX_BAUD B4000000
167 #define CSIZE 00001400
168 #define CS5 00000000
169 #define CS6 00000400
170 #define CS7 00001000
171 #define CS8 00001400
173 #define CSTOPB 00002000
174 #define CREAD 00004000
175 #define PARENB 00010000
176 #define PARODD 00020000
177 #define HUPCL 00040000
179 #define CLOCAL 00100000
180 #ifdef __USE_MISC
181 # define CMSPAR 010000000000 /* mark or space (stick) parity */
182 # define CRTSCTS 020000000000 /* flow control */
183 #endif
185 /* c_lflag bits */
186 #define ISIG 0x00000080
187 #define ICANON 0x00000100
188 #if defined __USE_MISC || defined __USE_XOPEN
189 # define XCASE 0x00004000
190 #endif
191 #define ECHO 0x00000008
192 #define ECHOE 0x00000002
193 #define ECHOK 0x00000004
194 #define ECHONL 0x00000010
195 #define NOFLSH 0x80000000
196 #define TOSTOP 0x00400000
197 #ifdef __USE_MISC
198 # define ECHOCTL 0x00000040
199 # define ECHOPRT 0x00000020
200 # define ECHOKE 0x00000001
201 # define FLUSHO 0x00800000
202 # define PENDIN 0x20000000
203 #endif
204 #define IEXTEN 0x00000400
206 /* Values for the ACTION argument to `tcflow'. */
207 #define TCOOFF 0
208 #define TCOON 1
209 #define TCIOFF 2
210 #define TCION 3
212 /* Values for the QUEUE_SELECTOR argument to `tcflush'. */
213 #define TCIFLUSH 0
214 #define TCOFLUSH 1
215 #define TCIOFLUSH 2
217 /* Values for the OPTIONAL_ACTIONS argument to `tcsetattr'. */
218 #define TCSANOW 0
219 #define TCSADRAIN 1
220 #define TCSAFLUSH 2
223 #define _IOT_termios /* Hurd ioctl type field. */ \
224 _IOT (_IOTS (cflag_t), 4, _IOTS (cc_t), NCCS, _IOTS (speed_t), 2)