]> git.ipfire.org Git - thirdparty/glibc.git/blame - sysdeps/unix/sysv/linux/bits/termios.h
(CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
[thirdparty/glibc.git] / sysdeps / unix / sysv / linux / bits / termios.h
CommitLineData
d2f5be2a 1/* termios type and macro definitions. Linux version.
a334319f 2 Copyright (C) 1993,1994,1995,1996,1997,1998,1999,2003
416be7f0 3 Free Software Foundation, Inc.
54d79e99 4 This file is part of the GNU C Library.
d2f5be2a 5
54d79e99 6 The GNU C Library is free software; you can redistribute it and/or
41bdb6e2
AJ
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.
d2f5be2a 10
54d79e99
UD
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
41bdb6e2 14 Lesser General Public License for more details.
d2f5be2a 15
41bdb6e2
AJ
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. */
d2f5be2a 20
f4017d20
UD
21#ifndef _TERMIOS_H
22# error "Never include <bits/termios.h> directly; use <termios.h> instead."
23#endif
33a934a3 24
df4ef2ab
UD
25typedef unsigned char cc_t;
26typedef unsigned int speed_t;
27typedef unsigned int tcflag_t;
28
29#define NCCS 32
30struct termios
31 {
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 */
38 speed_t c_ispeed; /* input speed */
39 speed_t c_ospeed; /* output speed */
416be7f0
RM
40#define _HAVE_STRUCT_TERMIOS_C_ISPEED 1
41#define _HAVE_STRUCT_TERMIOS_C_OSPEED 1
df4ef2ab
UD
42 };
43
44/* c_cc characters */
45#define VINTR 0
46#define VQUIT 1
47#define VERASE 2
48#define VKILL 3
49#define VEOF 4
50#define VTIME 5
51#define VMIN 6
52#define VSWTC 7
53#define VSTART 8
54#define VSTOP 9
55#define VSUSP 10
56#define VEOL 11
57#define VREPRINT 12
58#define VDISCARD 13
59#define VWERASE 14
60#define VLNEXT 15
61#define VEOL2 16
62
63/* c_iflag bits */
64#define IGNBRK 0000001
65#define BRKINT 0000002
66#define IGNPAR 0000004
67#define PARMRK 0000010
68#define INPCK 0000020
69#define ISTRIP 0000040
70#define INLCR 0000100
71#define IGNCR 0000200
72#define ICRNL 0000400
73#define IUCLC 0001000
74#define IXON 0002000
75#define IXANY 0004000
76#define IXOFF 0010000
77#define IMAXBEL 0020000
a6f205b5 78#define IUTF8 0040000
df4ef2ab
UD
79
80/* c_oflag bits */
81#define OPOST 0000001
82#define OLCUC 0000002
83#define ONLCR 0000004
84#define OCRNL 0000010
85#define ONOCR 0000020
86#define ONLRET 0000040
87#define OFILL 0000100
88#define OFDEL 0000200
e918a7fe 89#if defined __USE_MISC || defined __USE_XOPEN
9756dfe1
UD
90# define NLDLY 0000400
91# define NL0 0000000
92# define NL1 0000400
93# define CRDLY 0003000
94# define CR0 0000000
95# define CR1 0001000
96# define CR2 0002000
97# define CR3 0003000
98# define TABDLY 0014000
99# define TAB0 0000000
100# define TAB1 0004000
101# define TAB2 0010000
102# define TAB3 0014000
103# define BSDLY 0020000
104# define BS0 0000000
105# define BS1 0020000
106# define FFDLY 0100000
107# define FF0 0000000
108# define FF1 0100000
109#endif
110
df4ef2ab
UD
111#define VTDLY 0040000
112#define VT0 0000000
113#define VT1 0040000
9756dfe1 114
dfbad9c8 115#ifdef __USE_MISC
9756dfe1
UD
116# define XTABS 0014000
117#endif
df4ef2ab
UD
118
119/* c_cflag bit meaning */
dfbad9c8 120#ifdef __USE_MISC
9756dfe1
UD
121# define CBAUD 0010017
122#endif
df4ef2ab
UD
123#define B0 0000000 /* hang up */
124#define B50 0000001
125#define B75 0000002
126#define B110 0000003
127#define B134 0000004
128#define B150 0000005
129#define B200 0000006
130#define B300 0000007
131#define B600 0000010
132#define B1200 0000011
133#define B1800 0000012
134#define B2400 0000013
135#define B4800 0000014
136#define B9600 0000015
137#define B19200 0000016
138#define B38400 0000017
dfbad9c8 139#ifdef __USE_MISC
9756dfe1
UD
140# define EXTA B19200
141# define EXTB B38400
142#endif
df4ef2ab
UD
143#define CSIZE 0000060
144#define CS5 0000000
145#define CS6 0000020
146#define CS7 0000040
147#define CS8 0000060
148#define CSTOPB 0000100
149#define CREAD 0000200
150#define PARENB 0000400
151#define PARODD 0001000
152#define HUPCL 0002000
153#define CLOCAL 0004000
dfbad9c8 154#ifdef __USE_MISC
9756dfe1
UD
155# define CBAUDEX 0010000
156#endif
49a71f92
UD
157#define B57600 0010001
158#define B115200 0010002
159#define B230400 0010003
160#define B460800 0010004
161#define B500000 0010005
162#define B576000 0010006
163#define B921600 0010007
164#define B1000000 0010010
165#define B1152000 0010011
166#define B1500000 0010012
167#define B2000000 0010013
168#define B2500000 0010014
169#define B3000000 0010015
170#define B3500000 0010016
171#define B4000000 0010017
6999d70e 172#define __MAX_BAUD B4000000
dfbad9c8 173#ifdef __USE_MISC
9756dfe1
UD
174# define CIBAUD 002003600000 /* input baud rate (not used) */
175# define CRTSCTS 020000000000 /* flow control */
176#endif
df4ef2ab
UD
177
178/* c_lflag bits */
179#define ISIG 0000001
180#define ICANON 0000002
e918a7fe 181#if defined __USE_MISC || defined __USE_XOPEN
9756dfe1
UD
182# define XCASE 0000004
183#endif
df4ef2ab
UD
184#define ECHO 0000010
185#define ECHOE 0000020
186#define ECHOK 0000040
187#define ECHONL 0000100
188#define NOFLSH 0000200
189#define TOSTOP 0000400
dfbad9c8 190#ifdef __USE_MISC
9756dfe1
UD
191# define ECHOCTL 0001000
192# define ECHOPRT 0002000
193# define ECHOKE 0004000
194# define FLUSHO 0010000
195# define PENDIN 0040000
196#endif
df4ef2ab
UD
197#define IEXTEN 0100000
198
199/* tcflow() and TCXONC use these */
200#define TCOOFF 0
201#define TCOON 1
202#define TCIOFF 2
203#define TCION 3
204
205/* tcflush() and TCFLSH use these */
206#define TCIFLUSH 0
207#define TCOFLUSH 1
208#define TCIOFLUSH 2
209
210/* tcsetattr uses these */
211#define TCSANOW 0
212#define TCSADRAIN 1
213#define TCSAFLUSH 2
214
d2f5be2a
UD
215
216#define _IOT_termios /* Hurd ioctl type field. */ \
217 _IOT (_IOTS (cflag_t), 4, _IOTS (cc_t), NCCS, _IOTS (speed_t), 2)