2005-12-27 Roland McGrath <roland@redhat.com>
[glibc-ports.git] / sysdeps / unix / sysv / aix / bits / termios.h
blobb178d9c1b3f7f4d63880aff3dcc0a116e2c4a67c
1 /* termios type and macro definitions. AIX version.
2 Copyright (C) 1999, 2000 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, write to the Free
17 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
18 02111-1307 USA. */
20 #ifndef _TERMIOS_H
21 # error "Never include <bits/termios.h> directly; use <termios.h> instead."
22 #endif
24 typedef unsigned char cc_t;
25 typedef unsigned int speed_t;
26 typedef unsigned int tcflag_t;
28 #define NCCS 16
29 struct termios
31 tcflag_t c_iflag; /* input mode flags */
32 tcflag_t c_oflag; /* output mode flags */
33 tcflag_t c_cflag; /* control mode flags */
34 tcflag_t c_lflag; /* local mode flags */
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 VSTART 7
46 #define VSTOP 8
47 #define VSUSP 9
48 #define VMIN 4
49 #define VTIME 5
50 #define VEOL2 6
51 #define VDSUSP 10
52 #define VREPRINT 11
53 #define VDISCARD 12
54 #define VWERSE 13
55 #define VWERASE VWERSE
56 #define VLNEXT 14
57 #define VSTRT VSTART
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 IXON 0001000
70 #define IXOFF 0002000
71 #define IUCLC 0004000
72 #define IXANY 0010000
73 #define IMAXBEL 0200000
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 #if defined __USE_MISC || defined __USE_XOPEN
85 # define CRDLY 0001400
86 # define CR0 0000000
87 # define CR1 0000400
88 # define CR2 0001000
89 # define CR3 0001400
90 # define TABDLY 0006000
91 # define TAB0 0000000
92 # define TAB1 0002000
93 # define TAB2 0004000
94 # define TAB3 0006000
95 # define BSDLY 0010000
96 # define BS0 0000000
97 # define BS1 0010000
98 # define FFDLY 0020000
99 # define FF0 0000000
100 # define FF1 0020000
101 # define NLDLY 0040000
102 # define NL0 0000000
103 # define NL1 0040000
104 #endif
106 #define VTDLY 0100000
107 #define VT0 0000000
108 #define VT1 0100000
110 /* c_cflag bit meaning */
111 #ifdef __USE_MISC
112 # define CBAUD 0000017
113 #endif
114 #define B0 0000000 /* hang up */
115 #define B50 0000001
116 #define B75 0000002
117 #define B110 0000003
118 #define B134 0000004
119 #define B150 0000005
120 #define B200 0000006
121 #define B300 0000007
122 #define B600 0000010
123 #define B1200 0000011
124 #define B1800 0000012
125 #define B2400 0000013
126 #define B4800 0000014
127 #define B9600 0000015
128 #define B19200 0000016
129 #define B38400 0000017
130 #ifdef __USE_MISC
131 # define EXTA B19200
132 # define EXTB B38400
133 #endif
134 #define CSIZE 0000060
135 #define CS5 0000000
136 #define CS6 0000020
137 #define CS7 0000040
138 #define CS8 0000060
139 #define CSTOPB 0000100
140 #define CREAD 0000200
141 #define PARENB 0000400
142 #define PARODD 0001000
143 #define HUPCL 0002000
144 #define CLOCAL 0004000
145 #ifdef __USE_MISC
146 # define CIBAUD 000003600000 /* input baud rate (not used) */
147 # define CRTSCTS 020000000000 /* flow control */
148 #endif
150 /* c_lflag bits */
151 #define ISIG 0000001
152 #define ICANON 0000002
153 #if defined __USE_MISC || defined __USE_XOPEN
154 # define XCASE 0000004
155 #endif
156 #define ECHO 0000010
157 #define ECHOE 0000020
158 #define ECHOK 0000040
159 #define ECHONL 0000100
160 #define NOFLSH 0000200
161 #define TOSTOP 0200000
162 #ifdef __USE_MISC
163 # define ECHOCTL 0400000
164 # define ECHOPRT 01000000
165 # define ECHOKE 02000000
166 # define FLUSHO 004000000
167 # define PENDIN 04000000000
168 #endif
169 #define IEXTEN 010000000
171 /* tcflow() and TCXONC use these */
172 #define TCOOFF 0
173 #define TCOON 1
174 #define TCIOFF 2
175 #define TCION 3
177 /* tcflush() and TCFLSH use these */
178 #define TCIFLUSH 0
179 #define TCOFLUSH 1
180 #define TCIOFLUSH 2
182 /* tcsetattr uses these */
183 #define TCSANOW 0
184 #define TCSADRAIN 1
185 #define TCSAFLUSH 2
188 #define _IOT_termios /* Hurd ioctl type field. */ \
189 _IOT (_IOTS (cflag_t), 4, _IOTS (cc_t), NCCS, _IOTS (speed_t), 2)