]> git.ipfire.org Git - thirdparty/glibc.git/blob - sysdeps/unix/sysv/linux/termbits.h
update from main archive 960105
[thirdparty/glibc.git] / sysdeps / unix / sysv / linux / termbits.h
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.
4
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.
9
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.
14
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. */
19
20 typedef unsigned char cc_t;
21 typedef unsigned int speed_t;
22 typedef unsigned int tcflag_t;
23
24 #define NCCS 32
25 struct termios
26 {
27 tcflag_t c_iflag; /* input mode flags */
28 tcflag_t c_oflag; /* output mode flags */
29 tcflag_t c_cflag; /* control mode flags */
30 tcflag_t c_lflag; /* local mode flags */
31 cc_t c_line; /* line discipline */
32 cc_t c_cc[NCCS]; /* control characters */
33 speed_t c_ispeed; /* input speed */
34 speed_t c_ospeed; /* output speed */
35 };
36
37 /* c_cc characters */
38 #define VINTR 0
39 #define VQUIT 1
40 #define VERASE 2
41 #define VKILL 3
42 #define VEOF 4
43 #define VTIME 5
44 #define VMIN 6
45 #define VSWTC 7
46 #define VSTART 8
47 #define VSTOP 9
48 #define VSUSP 10
49 #define VEOL 11
50 #define VREPRINT 12
51 #define VDISCARD 13
52 #define VWERASE 14
53 #define VLNEXT 15
54 #define VEOL2 16
55
56 /* c_iflag bits */
57 #define IGNBRK 0000001
58 #define BRKINT 0000002
59 #define IGNPAR 0000004
60 #define PARMRK 0000010
61 #define INPCK 0000020
62 #define ISTRIP 0000040
63 #define INLCR 0000100
64 #define IGNCR 0000200
65 #define ICRNL 0000400
66 #define IUCLC 0001000
67 #define IXON 0002000
68 #define IXANY 0004000
69 #define IXOFF 0010000
70 #define IMAXBEL 0020000
71
72 /* c_oflag bits */
73 #define OPOST 0000001
74 #define OLCUC 0000002
75 #define ONLCR 0000004
76 #define OCRNL 0000010
77 #define ONOCR 0000020
78 #define ONLRET 0000040
79 #define OFILL 0000100
80 #define OFDEL 0000200
81 #define NLDLY 0000400
82 #define NL0 0000000
83 #define NL1 0000400
84 #define CRDLY 0003000
85 #define CR0 0000000
86 #define CR1 0001000
87 #define CR2 0002000
88 #define CR3 0003000
89 #define TABDLY 0014000
90 #define TAB0 0000000
91 #define TAB1 0004000
92 #define TAB2 0010000
93 #define TAB3 0014000
94 #define XTABS 0014000
95 #define BSDLY 0020000
96 #define BS0 0000000
97 #define BS1 0020000
98 #define VTDLY 0040000
99 #define VT0 0000000
100 #define VT1 0040000
101 #define FFDLY 0100000
102 #define FF0 0000000
103 #define FF1 0100000
104
105 /* c_cflag bit meaning */
106 #define CBAUD 0010017
107 #define B0 0000000 /* hang up */
108 #define B50 0000001
109 #define B75 0000002
110 #define B110 0000003
111 #define B134 0000004
112 #define B150 0000005
113 #define B200 0000006
114 #define B300 0000007
115 #define B600 0000010
116 #define B1200 0000011
117 #define B1800 0000012
118 #define B2400 0000013
119 #define B4800 0000014
120 #define B9600 0000015
121 #define B19200 0000016
122 #define B38400 0000017
123 #define EXTA B19200
124 #define EXTB B38400
125 #define CSIZE 0000060
126 #define CS5 0000000
127 #define CS6 0000020
128 #define CS7 0000040
129 #define CS8 0000060
130 #define CSTOPB 0000100
131 #define CREAD 0000200
132 #define PARENB 0000400
133 #define PARODD 0001000
134 #define HUPCL 0002000
135 #define CLOCAL 0004000
136 #define CBAUDEX 0010000
137 #define B57600 0010001
138 #define B115200 0010002
139 #define B230400 0010003
140 #define B460800 0010004
141 #define CIBAUD 002003600000 /* input baud rate (not used) */
142 #define CRTSCTS 020000000000 /* flow control */
143
144 /* c_lflag bits */
145 #define ISIG 0000001
146 #define ICANON 0000002
147 #define XCASE 0000004
148 #define ECHO 0000010
149 #define ECHOE 0000020
150 #define ECHOK 0000040
151 #define ECHONL 0000100
152 #define NOFLSH 0000200
153 #define TOSTOP 0000400
154 #define ECHOCTL 0001000
155 #define ECHOPRT 0002000
156 #define ECHOKE 0004000
157 #define FLUSHO 0010000
158 #define PENDIN 0040000
159 #define IEXTEN 0100000
160
161 /* tcflow() and TCXONC use these */
162 #define TCOOFF 0
163 #define TCOON 1
164 #define TCIOFF 2
165 #define TCION 3
166
167 /* tcflush() and TCFLSH use these */
168 #define TCIFLUSH 0
169 #define TCOFLUSH 1
170 #define TCIOFLUSH 2
171
172 /* tcsetattr uses these */
173 #define TCSANOW 0
174 #define TCSADRAIN 1
175 #define TCSAFLUSH 2
176
177
178 #define _IOT_termios /* Hurd ioctl type field. */ \
179 _IOT (_IOTS (cflag_t), 4, _IOTS (cc_t), NCCS, _IOTS (speed_t), 2)