Annotation of sys/compat/ibcs2/ibcs2_termios.h, Revision 1.1.1.1
1.1 nbrk 1: /* $OpenBSD: ibcs2_termios.h,v 1.2 1996/08/02 20:35:15 niklas Exp $ */
2: /* $NetBSD: ibcs2_termios.h,v 1.3 1994/10/26 02:53:07 cgd Exp $ */
3:
4: /*
5: * Copyright (c) 1994 Scott Bartram
6: * All rights reserved.
7: *
8: * Redistribution and use in source and binary forms, with or without
9: * modification, are permitted provided that the following conditions
10: * are met:
11: * 1. Redistributions of source code must retain the above copyright
12: * notice, this list of conditions and the following disclaimer.
13: * 2. Redistributions in binary form must reproduce the above copyright
14: * notice, this list of conditions and the following disclaimer in the
15: * documentation and/or other materials provided with the distribution.
16: * 3. All advertising materials mentioning features or use of this software
17: * must display the following acknowledgement:
18: * This product includes software developed by Scott Bartram.
19: * 4. The name of the author may not be used to endorse or promote products
20: * derived from this software without specific prior written permission
21: *
22: * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
23: * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
24: * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
25: * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
26: * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
27: * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
28: * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
29: * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
30: * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
31: * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32: */
33:
34: #ifndef _IBCS2_TERMIOS_H
35: #define _IBCS2_TERMIOS_H 1
36:
37: #include <compat/ibcs2/ibcs2_types.h>
38:
39: #define IBCS2_NCC 8
40: #define IBCS2_NCCS 13
41:
42: typedef u_short ibcs2_tcflag_t;
43: typedef u_char ibcs2_cc_t;
44: typedef u_long ibcs2_speed_t;
45:
46: struct ibcs2_termio {
47: u_short c_iflag;
48: u_short c_oflag;
49: u_short c_cflag;
50: u_short c_lflag;
51: char c_line;
52: u_char c_cc[IBCS2_NCC];
53: };
54:
55: struct ibcs2_termios {
56: ibcs2_tcflag_t c_iflag;
57: ibcs2_tcflag_t c_oflag;
58: ibcs2_tcflag_t c_cflag;
59: ibcs2_tcflag_t c_lflag;
60: char c_line;
61: ibcs2_cc_t c_cc[IBCS2_NCCS];
62: char c_ispeed;
63: char c_ospeed;
64: };
65:
66: #define IBCS2_VINTR 0
67: #define IBCS2_VQUIT 1
68: #define IBCS2_VERASE 2
69: #define IBCS2_VKILL 3
70: #define IBCS2_VEOF 4
71: #define IBCS2_VEOL 5
72: #define IBCS2_VEOL2 6
73: #define IBCS2_VMIN 4
74: #define IBCS2_VTIME 5
75: #define IBCS2_VSWTCH 7
76: #define IBCS2_VSUSP 10
77: #define IBCS2_VSTART 11
78: #define IBCS2_VSTOP 12
79:
80: #define IBCS2_CNUL 0
81: #define IBCS2_CDEL 0377
82: #define IBCS2_CESC '\\'
83: #define IBCS2_CINTR 0177
84: #define IBCS2_CQUIT 034
85: #define IBCS2_CERASE '#'
86: #define IBCS2_CKILL '@'
87: #define IBCS2_CSTART 021
88: #define IBCS2_CSTOP 023
89: #define IBCS2_CSWTCH 032
90: #define IBCS2_CNSWTCH 0
91: #define IBCS2_CSUSP 032
92:
93: #define IBCS2_IGNBRK 0000001
94: #define IBCS2_BRKINT 0000002
95: #define IBCS2_IGNPAR 0000004
96: #define IBCS2_PARMRK 0000010
97: #define IBCS2_INPCK 0000020
98: #define IBCS2_ISTRIP 0000040
99: #define IBCS2_INLCR 0000100
100: #define IBCS2_IGNCR 0000200
101: #define IBCS2_ICRNL 0000400
102: #define IBCS2_IUCLC 0001000
103: #define IBCS2_IXON 0002000
104: #define IBCS2_IXANY 0004000
105: #define IBCS2_IXOFF 0010000
106: #define IBCS2_IMAXBEL 0020000
107: #define IBCS2_DOSMODE 0100000
108:
109: #define IBCS2_OPOST 0000001
110: #define IBCS2_OLCUC 0000002
111: #define IBCS2_ONLCR 0000004
112: #define IBCS2_OCRNL 0000010
113: #define IBCS2_ONOCR 0000020
114: #define IBCS2_ONLRET 0000040
115: #define IBCS2_OFILL 0000100
116: #define IBCS2_OFDEL 0000200
117: #define IBCS2_NLDLY 0000400
118: #define IBCS2_NL0 0000000
119: #define IBCS2_NL1 0000400
120: #define IBCS2_CRDLY 0003000
121: #define IBCS2_CR0 0000000
122: #define IBCS2_CR1 0001000
123: #define IBCS2_CR2 0002000
124: #define IBCS2_CR3 0003000
125: #define IBCS2_TABDLY 0014000
126: #define IBCS2_TAB0 0000000
127: #define IBCS2_TAB1 0004000
128: #define IBCS2_TAB2 0010000
129: #define IBCS2_TAB3 0014000
130: #define IBCS2_BSDLY 0020000
131: #define IBCS2_BS0 0000000
132: #define IBCS2_BS1 0020000
133: #define IBCS2_VTDLY 0040000
134: #define IBCS2_VT0 0000000
135: #define IBCS2_VT1 0040000
136: #define IBCS2_FFDLY 0100000
137: #define IBCS2_FF0 0000000
138: #define IBCS2_FF1 0100000
139:
140: #define IBCS2_CBAUD 0000017
141: #define IBCS2_CSIZE 0000060
142: #define IBCS2_CS5 0000000
143: #define IBCS2_CS6 0000020
144: #define IBCS2_CS7 0000040
145: #define IBCS2_CS8 0000060
146: #define IBCS2_CSTOPB 0000100
147: #define IBCS2_CREAD 0000200
148: #define IBCS2_PARENB 0000400
149: #define IBCS2_PARODD 0001000
150: #define IBCS2_HUPCL 0002000
151: #define IBCS2_CLOCAL 0004000
152: #define IBCS2_RCV1EN 0010000
153: #define IBCS2_XMT1EN 0020000
154: #define IBCS2_LOBLK 0040000
155: #define IBCS2_XCLUDE 0100000
156:
157: #define IBCS2_ISIG 0000001
158: #define IBCS2_ICANON 0000002
159: #define IBCS2_XCASE 0000004
160: #define IBCS2_ECHO 0000010
161: #define IBCS2_ECHOE 0000020
162: #define IBCS2_ECHOK 0000040
163: #define IBCS2_ECHONL 0000100
164: #define IBCS2_NOFLSH 0000200
165: #define IBCS2_IEXTEN 0000400
166: #define IBCS2_TOSTOP 0001000
167:
168: #define IBCS2_XIOC (('i'<<24)|('X'<<16))
169: #define IBCS2_XCGETA (IBCS2_XIOC|1)
170: #define IBCS2_XCSETA (IBCS2_XIOC|2)
171: #define IBCS2_XCSETAW (IBCS2_XIOC|3)
172: #define IBCS2_XCSETAF (IBCS2_XIOC|4)
173:
174: #define IBCS2_OXIOC ('x'<<8)
175: #define IBCS2_OXCGETA (IBCS2_OXIOC|1)
176: #define IBCS2_OXCSETA (IBCS2_OXIOC|2)
177: #define IBCS2_OXCSETAW (IBCS2_OXIOC|3)
178: #define IBCS2_OXCSETAF (IBCS2_OXIOC|4)
179:
180: #define IBCS2_TIOC ('T'<<8)
181: #define IBCS2_TCGETA (IBCS2_TIOC|1)
182: #define IBCS2_TCSETA (IBCS2_TIOC|2)
183: #define IBCS2_TCSETAW (IBCS2_TIOC|3)
184: #define IBCS2_TCSETAF (IBCS2_TIOC|4)
185: #define IBCS2_TCSBRK (IBCS2_TIOC|5)
186: #define IBCS2_TCXONC (IBCS2_TIOC|6)
187: #define IBCS2_TCFLSH (IBCS2_TIOC|7)
188:
189: #define IBCS2_TCGETSC (IBCS2_TIOC|34)
190: #define IBCS2_TCSETSC (IBCS2_TIOC|35)
191:
192: #define IBCS2_TIOCSWINSZ (IBCS2_TIOC|103)
193: #define IBCS2_TIOCGWINSZ (IBCS2_TIOC|104)
194: #define IBCS2_TIOCSPGRP (IBCS2_TIOC|118)
195: #define IBCS2_TIOCGPGRP (IBCS2_TIOC|119)
196:
197: #define IBCS2_TCSANOW IBCS2_XCSETA
198: #define IBCS2_TCSADRAIN IBCS2_XCSETAW
199: #define IBCS2_TCSAFLUSH IBCS2_XCSETAF
200: #define IBCS2_TCSADFLUSH IBCS2_XCSETAF
201:
202: #define IBCS2_TCIFLUSH 0
203: #define IBCS2_TCOFLUSH 1
204: #define IBCS2_TCIOFLUSH 2
205:
206: #define IBCS2_TCOOFF 0
207: #define IBCS2_TCOON 1
208: #define IBCS2_TCIOFF 2
209: #define IBCS2_TCION 3
210:
211: #define IBCS2_B0 0
212: #define IBCS2_B50 1
213: #define IBCS2_B75 2
214: #define IBCS2_B110 3
215: #define IBCS2_B134 4
216: #define IBCS2_B150 5
217: #define IBCS2_B200 6
218: #define IBCS2_B300 7
219: #define IBCS2_B600 8
220: #define IBCS2_B1200 9
221: #define IBCS2_B1800 10
222: #define IBCS2_B2400 11
223: #define IBCS2_B4800 12
224: #define IBCS2_B9600 13
225: #define IBCS2_B19200 14
226: #define IBCS2_B38400 15
227:
228: struct ibcs2_winsize {
229: u_short ws_row;
230: u_short ws_col;
231: u_short ws_xpixel;
232: u_short ws_ypixel;
233: };
234:
235: #endif /* _IBCS2_H_ */
236:
CVSweb