Update.
[glibc.git] / sysdeps / unix / sysv / linux / termbits.h
blob8224ac5403d66cb45110dc7e1659011cee782bc5
1 /* termios type and macro definitions. Linux version.
2 Copyright (C) 1993, 1994, 1995, 1996, 1997 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 Library General Public License as
7 published by the Free Software Foundation; either version 2 of the
8 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 Library General Public License for more details.
15 You should have received a copy of the GNU Library General Public
16 License along with the GNU C Library; see the file COPYING.LIB. If not,
17 write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 Boston, MA 02111-1307, USA. */
20 #ifndef _TERMBITS_H
21 #define _TERMBITS_H 1
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_line; /* line discipline */
35 cc_t c_cc[NCCS]; /* control characters */
36 speed_t c_ispeed; /* input speed */
37 speed_t c_ospeed; /* output speed */
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 VTIME 5
47 #define VMIN 6
48 #define VSWTC 7
49 #define VSTART 8
50 #define VSTOP 9
51 #define VSUSP 10
52 #define VEOL 11
53 #define VREPRINT 12
54 #define VDISCARD 13
55 #define VWERASE 14
56 #define VLNEXT 15
57 #define VEOL2 16
59 /* c_iflag bits */
60 #define IGNBRK 0000001
61 #define BRKINT 0000002
62 #define IGNPAR 0000004
63 #define PARMRK 0000010
64 #define INPCK 0000020
65 #define ISTRIP 0000040
66 #define INLCR 0000100
67 #define IGNCR 0000200
68 #define ICRNL 0000400
69 #define IUCLC 0001000
70 #define IXON 0002000
71 #define IXANY 0004000
72 #define IXOFF 0010000
73 #define IMAXBEL 0020000
75 /* c_oflag bits */
76 #define OPOST 0000001
77 #define OLCUC 0000002
78 #define ONLCR 0000004
79 #define OCRNL 0000010
80 #define ONOCR 0000020
81 #define ONLRET 0000040
82 #define OFILL 0000100
83 #define OFDEL 0000200
84 #define NLDLY 0000400
85 #define NL0 0000000
86 #define NL1 0000400
87 #define CRDLY 0003000
88 #define CR0 0000000
89 #define CR1 0001000
90 #define CR2 0002000
91 #define CR3 0003000
92 #define TABDLY 0014000
93 #define TAB0 0000000
94 #define TAB1 0004000
95 #define TAB2 0010000
96 #define TAB3 0014000
97 #define XTABS 0014000
98 #define BSDLY 0020000
99 #define BS0 0000000
100 #define BS1 0020000
101 #define VTDLY 0040000
102 #define VT0 0000000
103 #define VT1 0040000
104 #define FFDLY 0100000
105 #define FF0 0000000
106 #define FF1 0100000
108 /* c_cflag bit meaning */
109 #define CBAUD 0010017
110 #define B0 0000000 /* hang up */
111 #define B50 0000001
112 #define B75 0000002
113 #define B110 0000003
114 #define B134 0000004
115 #define B150 0000005
116 #define B200 0000006
117 #define B300 0000007
118 #define B600 0000010
119 #define B1200 0000011
120 #define B1800 0000012
121 #define B2400 0000013
122 #define B4800 0000014
123 #define B9600 0000015
124 #define B19200 0000016
125 #define B38400 0000017
126 #define EXTA B19200
127 #define EXTB B38400
128 #define CSIZE 0000060
129 #define CS5 0000000
130 #define CS6 0000020
131 #define CS7 0000040
132 #define CS8 0000060
133 #define CSTOPB 0000100
134 #define CREAD 0000200
135 #define PARENB 0000400
136 #define PARODD 0001000
137 #define HUPCL 0002000
138 #define CLOCAL 0004000
139 #define CBAUDEX 0010000
140 #define B57600 0010001
141 #define B115200 0010002
142 #define B230400 0010003
143 #define B460800 0010004
144 #define CIBAUD 002003600000 /* input baud rate (not used) */
145 #define CRTSCTS 020000000000 /* flow control */
147 /* c_lflag bits */
148 #define ISIG 0000001
149 #define ICANON 0000002
150 #define XCASE 0000004
151 #define ECHO 0000010
152 #define ECHOE 0000020
153 #define ECHOK 0000040
154 #define ECHONL 0000100
155 #define NOFLSH 0000200
156 #define TOSTOP 0000400
157 #define ECHOCTL 0001000
158 #define ECHOPRT 0002000
159 #define ECHOKE 0004000
160 #define FLUSHO 0010000
161 #define PENDIN 0040000
162 #define IEXTEN 0100000
164 /* tcflow() and TCXONC use these */
165 #define TCOOFF 0
166 #define TCOON 1
167 #define TCIOFF 2
168 #define TCION 3
170 /* tcflush() and TCFLSH use these */
171 #define TCIFLUSH 0
172 #define TCOFLUSH 1
173 #define TCIOFLUSH 2
175 /* tcsetattr uses these */
176 #define TCSANOW 0
177 #define TCSADRAIN 1
178 #define TCSAFLUSH 2
181 #define _IOT_termios /* Hurd ioctl type field. */ \
182 _IOT (_IOTS (cflag_t), 4, _IOTS (cc_t), NCCS, _IOTS (speed_t), 2)
184 #endif /* termbits.h */