1 /* $NetBSD: svr4_termios.h,v 1.6 2005/12/11 12:20:26 christos Exp $ */
2
3 /*-
4 * Copyright (c) 1994 The NetBSD Foundation, Inc.
5 * All rights reserved.
6 *
7 * This code is derived from software contributed to The NetBSD Foundation
8 * by Christos Zoulas.
9 *
10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions
12 * are met:
13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer.
15 * 2. Redistributions in binary form must reproduce the above copyright
16 * notice, this list of conditions and the following disclaimer in the
17 * documentation and/or other materials provided with the distribution.
18 * 3. All advertising materials mentioning features or use of this software
19 * must display the following acknowledgement:
20 * This product includes software developed by the NetBSD
21 * Foundation, Inc. and its contributors.
22 * 4. Neither the name of The NetBSD Foundation nor the names of its
23 * contributors may be used to endorse or promote products derived
24 * from this software without specific prior written permission.
25 *
26 * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
27 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
28 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
29 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
30 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
31 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
32 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
33 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
34 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
35 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
36 * POSSIBILITY OF SUCH DAMAGE.
37 */
38
39 #ifndef _SVR4_TERMIOS_H_
40 #define _SVR4_TERMIOS_H_
41
42 #define SVR4_POSIX_VDISABLE 0
43 #define SVR4_NCC 8
44 #define SVR4_NCCS 19
45
46 typedef u_long svr4_tcflag_t;
47 typedef u_char svr4_cc_t;
48 typedef u_long svr4_speed_t;
49
50 struct svr4_termios {
51 svr4_tcflag_t c_iflag;
52 svr4_tcflag_t c_oflag;
53 svr4_tcflag_t c_cflag;
54 svr4_tcflag_t c_lflag;
55 svr4_cc_t c_cc[SVR4_NCCS];
56 };
57
58 struct svr4_termio {
59 u_short c_iflag;
60 u_short c_oflag;
61 u_short c_cflag;
62 u_short c_lflag;
63 char c_line;
64 u_char c_cc[SVR4_NCC];
65 };
66
67 /* control characters */
68 #define SVR4_VINTR 0
69 #define SVR4_VQUIT 1
70 #define SVR4_VERASE 2
71 #define SVR4_VKILL 3
72 #define SVR4_VEOF 4
73 #define SVR4_VEOL 5
74 #define SVR4_VEOL2 6
75 #define SVR4_VMIN 4
76 #define SVR4_VTIME 5
77 #define SVR4_VSWTCH 7
78 #define SVR4_VSTART 8
79 #define SVR4_VSTOP 9
80 #define SVR4_VSUSP 10
81 #define SVR4_VDSUSP 11
82 #define SVR4_VREPRINT 12
83 #define SVR4_VDISCARD 13
84 #define SVR4_VWERASE 14
85 #define SVR4_VLNEXT 15
86
87 /* Input modes */
88 #define SVR4_IGNBRK 00000001
89 #define SVR4_BRKINT 00000002
90 #define SVR4_IGNPAR 00000004
91 #define SVR4_PARMRK 00000010
92 #define SVR4_INPCK 00000020
93 #define SVR4_ISTRIP 00000040
94 #define SVR4_INLCR 00000100
95 #define SVR4_IGNCR 00000200
96 #define SVR4_ICRNL 00000400
97 #define SVR4_IUCLC 00001000
98 #define SVR4_IXON 00002000
99 #define SVR4_IXANY 00004000
100 #define SVR4_IXOFF 00010000
101 #define SVR4_IMAXBEL 00020000
102 #define SVR4_DOSMODE 00100000
103
104 /* Output modes */
105 #define SVR4_OPOST 00000001
106 #define SVR4_OLCUC 00000002
107 #define SVR4_ONLCR 00000004
108 #define SVR4_OCRNL 00000010
109 #define SVR4_ONOCR 00000020
110 #define SVR4_ONLRET 00000040
111 #define SVR4_OFILL 00000100
112 #define SVR4_OFDEL 00000200
113 #define SVR4_NLDLY 00000400
114 #define SVR4_NL0 00000000
115 #define SVR4_NL1 00000400
116 #define SVR4_CRDLY 00003000
117 #define SVR4_CR0 00000000
118 #define SVR4_CR1 00001000
119 #define SVR4_CR2 00002000
120 #define SVR4_CR3 00003000
121 #define SVR4_TABDLY 00014000
122 #define SVR4_TAB0 00000000
123 #define SVR4_TAB1 00004000
124 #define SVR4_TAB2 00010000
125 #define SVR4_TAB3 00014000
126 #define SVR4_XTABS 00014000
127 #define SVR4_BSDLY 00020000
128 #define SVR4_BS0 00000000
129 #define SVR4_BS1 00020000
130 #define SVR4_VTDLY 00040000
131 #define SVR4_VT0 00000000
132 #define SVR4_VT1 00040000
133 #define SVR4_FFDLY 00100000
134 #define SVR4_FF0 00000000
135 #define SVR4_FF1 00100000
136 #define SVR4_PAGEOUT 00200000
137 #define SVR4_WRAP 00400000
138
139 /* Control modes */
140 #define SVR4_CBAUD 00000017
141 #define SVR4_CSIZE 00000060
142 #define SVR4_CS5 00000000
143 #define SVR4_CS6 00000200
144 #define SVR4_CS7 00000040
145 #define SVR4_CS8 00000006
146 #define SVR4_CSTOPB 00000100
147 #define SVR4_CREAD 00000200
148 #define SVR4_PARENB 00000400
149 #define SVR4_PARODD 00001000
150 #define SVR4_HUPCL 00002000
151 #define SVR4_CLOCAL 00004000
152 #define SVR4_RCV1EN 00010000
153 #define SVR4_XMT1EN 00020000
154 #define SVR4_LOBLK 00040000
155 #define SVR4_XCLUDE 00100000
156 #define SVR4_CIBAUD 03600000
157 #define SVR4_PAREXT 04000000
158
159 /* line discipline modes */
160 #define SVR4_ISIG 00000001
161 #define SVR4_ICANON 00000002
162 #define SVR4_XCASE 00000004
163 #define SVR4_ECHO 00000010
164 #define SVR4_ECHOE 00000020
165 #define SVR4_ECHOK 00000040
166 #define SVR4_ECHONL 00000100
167 #define SVR4_NOFLSH 00000200
168 #define SVR4_TOSTOP 00000400
169 #define SVR4_ECHOCTL 00001000
170 #define SVR4_ECHOPRT 00002000
171 #define SVR4_ECHOKE 00004000
172 #define SVR4_DEFECHO 00010000
173 #define SVR4_FLUSHO 00020000
174 #define SVR4_PENDIN 00040000
175 #define SVR4_IEXTEN 00100000
176
177 #define SVR4_TIOC ('T' << 8)
178
179 #define SVR4_TCGETA (SVR4_TIOC| 1)
180 #define SVR4_TCSETA (SVR4_TIOC| 2)
181 #define SVR4_TCSETAW (SVR4_TIOC| 3)
182 #define SVR4_TCSETAF (SVR4_TIOC| 4)
183 #define SVR4_TCSBRK (SVR4_TIOC| 5)
184 #define SVR4_TCXONC (SVR4_TIOC| 6)
185 #define SVR4_TCFLSH (SVR4_TIOC| 7)
186 #define SVR4_TIOCKBON (SVR4_TIOC| 8)
187 #define SVR4_TIOCKBOF (SVR4_TIOC| 9)
188 #define SVR4_KBENABLED (SVR4_TIOC|10)
189 #define SVR4_TCGETS (SVR4_TIOC|13)
190 #define SVR4_TCSETS (SVR4_TIOC|14)
191 #define SVR4_TCSETSW (SVR4_TIOC|15)
192 #define SVR4_TCSETSF (SVR4_TIOC|16)
193 #define SVR4_TCDSET (SVR4_TIOC|32)
194 #define SVR4_RTS_TOG (SVR4_TIOC|33)
195 #define SVR4_TCGETSC (SVR4_TIOC|34)
196 #define SVR4_TCSETSC (SVR4_TIOC|35)
197 #define SVR4_TCMOUSE (SVR4_TIOC|36)
198 #define SVR4_TIOCGWINSZ (SVR4_TIOC|104)
199 #define SVR4_TIOCSWINSZ (SVR4_TIOC|103)
200
201 struct svr4_winsize {
202 u_short ws_row;
203 u_short ws_col;
204 u_short ws_xpixel;
205 u_short ws_ypixel;
206 };
207
208 #define SVR4_B0 0
209 #define SVR4_B50 1
210 #define SVR4_B75 2
211 #define SVR4_B110 3
212 #define SVR4_B134 4
213 #define SVR4_B150 5
214 #define SVR4_B200 6
215 #define SVR4_B300 7
216 #define SVR4_B600 8
217 #define SVR4_B1200 9
218 #define SVR4_B1800 10
219 #define SVR4_B2400 11
220 #define SVR4_B4800 12
221 #define SVR4_B9600 13
222 #define SVR4_B19200 14
223 #define SVR4_B38400 15
224 #define SVR4_B57600 16
225 #define SVR4_B76800 17
226 #define SVR4_B115200 18
227 #define SVR4_B153600 19
228 #define SVR4_B230400 20
229 #define SVR4_B307200 21
230 #define SVR4_B460800 22
231
232 #endif /* !_SVR4_TERMIOS_H_ */
Cache object: 1de876ceca7b6612747b2420f8d949a1
|