]> git.ipfire.org Git - thirdparty/glibc.git/blame - sysdeps/unix/sysv/linux/powerpc/bits/termios.h
Update.
[thirdparty/glibc.git] / sysdeps / unix / sysv / linux / powerpc / bits / termios.h
CommitLineData
4cca6b86
UD
1/* Copyright (C) 1997 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
3
4 The GNU C Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public License as
6 published by the Free Software Foundation; either version 2 of the
7 License, or (at your option) any later version.
8
9 The GNU C Library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Library General Public License for more details.
13
14 You should have received a copy of the GNU Library General Public
15 License along with the GNU C Library; see the file COPYING.LIB. If not,
16 write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17 Boston, MA 02111-1307, USA. */
18
f4017d20
UD
19#ifndef _TERMIOS_H
20# error "Never include <bits/termios.h> directly; use <termios.h> instead."
21#endif
4cca6b86
UD
22
23typedef unsigned char cc_t;
24typedef unsigned int speed_t;
25typedef unsigned int tcflag_t;
26
27/*
28 * termios type and macro definitions. Be careful about adding stuff
29 * to this file since it's used in GNU libc and there are strict rules
30 * concerning namespace pollution.
31 */
32
e61abf83 33#define NCCS 32
4cca6b86
UD
34struct termios {
35 tcflag_t c_iflag; /* input mode flags */
36 tcflag_t c_oflag; /* output mode flags */
37 tcflag_t c_cflag; /* control mode flags */
38 tcflag_t c_lflag; /* local mode flags */
4cca6b86 39 cc_t c_line; /* line discipline (== c_cc[19]) */
e61abf83 40 cc_t c_cc[NCCS]; /* control characters */
4cca6b86
UD
41 speed_t c_ispeed; /* input speed */
42 speed_t c_ospeed; /* output speed */
43};
44
45/* c_cc characters */
46#define VINTR 0
47#define VQUIT 1
48#define VERASE 2
49#define VKILL 3
50#define VEOF 4
51#define VMIN 5
52#define VEOL 6
53#define VTIME 7
54#define VEOL2 8
55#define VSWTC 9
56
57#define VWERASE 10
58#define VREPRINT 11
59#define VSUSP 12
60#define VSTART 13
61#define VSTOP 14
62#define VLNEXT 15
63#define VDISCARD 16
64
65/* c_iflag bits */
66#define IGNBRK 0000001
67#define BRKINT 0000002
68#define IGNPAR 0000004
69#define PARMRK 0000010
70#define INPCK 0000020
71#define ISTRIP 0000040
72#define INLCR 0000100
73#define IGNCR 0000200
74#define ICRNL 0000400
75#define IXON 0001000
76#define IXOFF 0002000
f4017d20 77#if !defined KERNEL || defined __USE_BSD
4cca6b86
UD
78 /* POSIX.1 doesn't want these... */
79# define IXANY 0004000
80# define IUCLC 0010000
81# define IMAXBEL 0020000
82#endif
83
84/* c_oflag bits */
85#define OPOST 0000001
86#define ONLCR 0000002
87#define OLCUC 0000004
88
89#define OCRNL 0000010
90#define ONOCR 0000020
91#define ONLRET 0000040
92
93#define OFILL 00000100
94#define OFDEL 00000200
95#define NLDLY 00001400
96#define NL0 00000000
97#define NL1 00000400
98#define NL2 00001000
99#define NL3 00001400
100#define TABDLY 00006000
101#define TAB0 00000000
102#define TAB1 00002000
103#define TAB2 00004000
104#define TAB3 00006000
105#define CRDLY 00030000
106#define CR0 00000000
107#define CR1 00010000
108#define CR2 00020000
109#define CR3 00030000
110#define FFDLY 00040000
111#define FF0 00000000
112#define FF1 00040000
113#define BSDLY 00100000
114#define BS0 00000000
115#define BS1 00100000
116#define VTDLY 00200000
117#define VT0 00000000
118#define VT1 00200000
119#define XTABS 01000000 /* Hmm.. Linux/i386 considers this part of TABDLY.. */
120
121/* c_cflag bit meaning */
122#define CBAUD 0000377
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
139#define EXTA B19200
140#define EXTB B38400
141#define CBAUDEX 0000020
142#define B57600 00020
143#define B115200 00021
144#define B230400 00022
145#define B460800 00023
146
147#define CSIZE 00001400
148#define CS5 00000000
149#define CS6 00000400
150#define CS7 00001000
151#define CS8 00001400
152
153#define CSTOPB 00002000
154#define CREAD 00004000
155#define PARENB 00010000
156#define PARODD 00020000
157#define HUPCL 00040000
158
159#define CLOCAL 00100000
160#define CRTSCTS 020000000000 /* flow control */
161
162/* c_lflag bits */
163#define ISIG 0x00000080
164#define ICANON 0x00000100
165#define XCASE 0x00004000
166#define ECHO 0x00000008
167#define ECHOE 0x00000002
168#define ECHOK 0x00000004
169#define ECHONL 0x00000010
170#define NOFLSH 0x80000000
171#define TOSTOP 0x00400000
172#define ECHOCTL 0x00000040
173#define ECHOPRT 0x00000020
174#define ECHOKE 0x00000001
175#define FLUSHO 0x00800000
176#define PENDIN 0x20000000
177#define IEXTEN 0x00000400
178
179/* Values for the ACTION argument to `tcflow'. */
180#define TCOOFF 0
181#define TCOON 1
182#define TCIOFF 2
183#define TCION 3
184
185/* Values for the QUEUE_SELECTOR argument to `tcflush'. */
186#define TCIFLUSH 0
187#define TCOFLUSH 1
188#define TCIOFLUSH 2
189
190/* Values for the OPTIONAL_ACTIONS argument to `tcsetattr'. */
191#define TCSANOW 0
192#define TCSADRAIN 1
193#define TCSAFLUSH 2
194
195struct sgttyb {
196 char sg_ispeed;
197 char sg_ospeed;
198 char sg_erase;
199 char sg_kill;
200 short sg_flags;
201};
202
203struct tchars {
204 char t_intrc;
205 char t_quitc;
206 char t_startc;
207 char t_stopc;
208 char t_eofc;
209 char t_brkc;
210};
211
212struct ltchars {
213 char t_suspc;
214 char t_dsuspc;
215 char t_rprntc;
216 char t_flushc;
217 char t_werasc;
218 char t_lnextc;
219};
220
4cca6b86
UD
221/* Used for packet mode */
222#define TIOCPKT_DATA 0
223#define TIOCPKT_FLUSHREAD 1
224#define TIOCPKT_FLUSHWRITE 2
225#define TIOCPKT_STOP 4
226#define TIOCPKT_START 8
227#define TIOCPKT_NOSTOP 16
228#define TIOCPKT_DOSTOP 32
229
230struct winsize {
231 unsigned short ws_row;
232 unsigned short ws_col;
233 unsigned short ws_xpixel;
234 unsigned short ws_ypixel;
235};
236
237#define NCC 10
238struct termio {
239 unsigned short c_iflag; /* input mode flags */
240 unsigned short c_oflag; /* output mode flags */
241 unsigned short c_cflag; /* control mode flags */
242 unsigned short c_lflag; /* local mode flags */
243 unsigned char c_line; /* line discipline */
244 unsigned char c_cc[NCC]; /* control characters */
245};
246
247/* c_cc characters */
248#define _VINTR 0
249#define _VQUIT 1
250#define _VERASE 2
251#define _VKILL 3
252#define _VEOF 4
253#define _VMIN 5
254#define _VEOL 6
255#define _VTIME 7
256#define _VEOL2 8
257#define _VSWTC 9
258
259/* modem lines */
260#define TIOCM_LE 0x001
261#define TIOCM_DTR 0x002
262#define TIOCM_RTS 0x004
263#define TIOCM_ST 0x008
264#define TIOCM_SR 0x010
265#define TIOCM_CTS 0x020
266#define TIOCM_CAR 0x040
267#define TIOCM_RNG 0x080
268#define TIOCM_DSR 0x100
269#define TIOCM_CD TIOCM_CAR
270#define TIOCM_RI TIOCM_RNG
271
272/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
273#define TIOCSER_TEMT 0x01 /* Transmitter physically empty */
274
275/* line disciplines */
276#define N_TTY 0
277#define N_SLIP 1
278#define N_MOUSE 2
279#define N_PPP 3