Replace FSF snail mail address with URLs.
[glibc.git] / sysdeps / unix / sysv / sysv_termio.h
blobc11586287a42bb9b2b06fdfd9715168dbdc5eb31
1 /* Copyright (C) 1992, 1997 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
4 The GNU C Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
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 Lesser General Public License for more details.
14 You should have received a copy of the GNU Lesser General Public
15 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
18 /* In various parts of this file we define the System V values for
19 things as _SYSV_<whatever>. Those are the values that System V
20 uses for termio, and also (SVR4) termios. Not necessarily the
21 same as the GNU termios that the library user sees. */
23 /* Number of elements of c_cc. termio only. */
24 #define _SYSV_NCC 8
26 #define _SYSV_VINTR 0
27 #define _SYSV_VQUIT 1
28 #define _SYSV_VERASE 2
29 #define _SYSV_VKILL 3
30 #define _SYSV_VEOF 4
31 /* This field means VEOF if ICANON, VMIN if not. */
32 #define _SYSV_VMIN 4
33 #define _SYSV_VEOL 5
34 /* This field means VEOL if ICANON, VTIME if not. */
35 #define _SYSV_VTIME 5
36 #define _SYSV_VEOL2 6
38 /* Flags in c_iflag. */
39 #define _SYSV_IGNBRK 1
40 #define _SYSV_BRKINT 2
41 #define _SYSV_IGNPAR 4
42 #define _SYSV_PARMRK 8
43 #define _SYSV_INPCK 0x10
44 #define _SYSV_ISTRIP 0x20
45 #define _SYSV_INLCR 0x40
46 #define _SYSV_IGNCR 0x80
47 #define _SYSV_ICRNL 0x100
48 #define _SYSV_IUCLC 0x200
49 #define _SYSV_IXON 0x400
50 #define _SYSV_IXANY 0x800
51 #define _SYSV_IXOFF 0x1000
52 #define _SYSV_IMAXBEL 0x2000
54 /* Flags in c_cflag. */
55 #define _SYSV_CBAUD 0xf
56 #define _SYSV_CIBAUD 0xf0000 /* termios only. */
57 #define _SYSV_IBSHIFT 16
58 /* Values for CBAUD and CIBAUD. */
59 #define _SYSV_B0 0
60 #define _SYSV_B50 1
61 #define _SYSV_B75 2
62 #define _SYSV_B110 3
63 #define _SYSV_B134 4
64 #define _SYSV_B150 5
65 #define _SYSV_B200 6
66 #define _SYSV_B300 7
67 #define _SYSV_B600 8
68 #define _SYSV_B1200 9
69 #define _SYSV_B1800 10
70 #define _SYSV_B2400 11
71 #define _SYSV_B4800 12
72 #define _SYSV_B9600 13
73 #define _SYSV_B19200 14
74 #define _SYSV_B38400 15
76 #define _SYSV_CS5 0
77 #define _SYSV_CS6 0x10
78 #define _SYSV_CS7 0x20
79 #define _SYSV_CS8 0x30
80 #define _SYSV_CSIZE 0x30
81 #define _SYSV_CSTOPB 0x40
82 #define _SYSV_CREAD 0x80
83 #define _SYSV_PARENB 0x100
84 #define _SYSV_PARODD 0x200
85 #define _SYSV_HUPCL 0x400
86 #define _SYSV_CLOCAL 0x800
88 /* Flags in c_lflag. */
89 #define _SYSV_ISIG 1
90 #define _SYSV_ICANON 2
91 #define _SYSV_ECHO 8
92 #define _SYSV_ECHOE 0x10
93 #define _SYSV_ECHOK 0x20
94 #define _SYSV_ECHONL 0x40
95 #define _SYSV_NOFLSH 0x80
96 #define _SYSV_TOSTOP 0x100
97 #define _SYSV_ECHOCTL 0x200
98 #define _SYSV_ECHOPRT 0x400
99 #define _SYSV_ECHOKE 0x800
100 #define _SYSV_FLUSHO 0x2000
101 #define _SYSV_PENDIN 0x4000
102 #define _SYSV_IEXTEN 0x8000
104 /* Flags in c_oflag. */
105 #define _SYSV_OPOST 1
106 #define _SYSV_OLCUC 2
107 #define _SYSV_ONLCR 4
108 #define _SYSV_NLDLY 0x100
109 #define _SYSV_NL0 0
110 #define _SYSV_NL1 0x100
111 #define _SYSV_CRDLY 0x600
112 #define _SYSV_CR0 0
113 #define _SYSV_CR1 0x200
114 #define _SYSV_CR2 0x400
115 #define _SYSV_CR3 0x600
116 #define _SYSV_TABDLY 0x1800
117 #define _SYSV_TAB0 0
118 #define _SYSV_TAB1 0x0800
119 #define _SYSV_TAB2 0x1000
120 /* TAB3 is an obsolete name for XTABS. But we provide it since some
121 programs expect it to exist. */
122 #define _SYSV_TAB3 0x1800
123 #define _SYSV_XTABS 0x1800
124 #define _SYSV_BSDLY 0x2000
125 #define _SYSV_BS0 0
126 #define _SYSV_BS1 0x2000
127 #define _SYSV_VTDLY 0x4000
128 #define _SYSV_VT0 0
129 #define _SYSV_VT1 0x4000
130 #define _SYSV_FFDLY 0x8000
131 #define _SYSV_FF0 0
132 #define _SYSV_FF1 0x8000
134 /* ioctl's. */
136 #define _TCGETA 0x5401
137 #define _TCSETA 0x5402
138 #define _TCSETAW 0x5403
139 #define _TCSETAF 0x5404
140 #define _TCSBRK 0x5405
141 #define _TCXONC 0x5406
142 #define _TCFLSH 0x5407
143 #define _TIOCGPGRP 0x7414
144 #define _TIOCSPGRP 0x7415
146 struct __sysv_termio
148 unsigned short c_iflag;
149 unsigned short c_oflag;
150 unsigned short c_cflag;
151 unsigned short c_lflag;
152 char c_line;
153 unsigned char c_cc[_SYSV_NCC];