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