xref: /titanic_52/usr/src/head/sgtty.h (revision e802abbda8c322f24d47835734f4a793ef15ddc8)
1 /*
2  * CDDL HEADER START
3  *
4  * The contents of this file are subject to the terms of the
5  * Common Development and Distribution License, Version 1.0 only
6  * (the "License").  You may not use this file except in compliance
7  * with the License.
8  *
9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10  * or http://www.opensolaris.org/os/licensing.
11  * See the License for the specific language governing permissions
12  * and limitations under the License.
13  *
14  * When distributing Covered Code, include this CDDL HEADER in each
15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16  * If applicable, add the following below this CDDL HEADER, with the
17  * fields enclosed by brackets "[]" replaced with your own identifying
18  * information: Portions Copyright [yyyy] [name of copyright owner]
19  *
20  * CDDL HEADER END
21  */
22 /*	Copyright (c) 1988 AT&T	*/
23 /*	  All Rights Reserved  	*/
24 
25 
26 #ifndef _SGTTY_H
27 #define	_SGTTY_H
28 
29 #pragma ident	"%Z%%M%	%I%	%E% SMI"	/* SVr4.0 1.3.1.3 */
30 
31 #ifdef	__cplusplus
32 extern "C" {
33 #endif
34 
35 /*
36  * Modes
37  */
38 #define	HUPCL	01
39 #ifndef _SYS_IOCTL_H
40 #define	XTABS	02
41 #define	LCASE	04
42 #define	ECHO	010
43 #define	CRMOD	020
44 #define	RAW	040
45 #define	ODDP	0100
46 #define	EVENP	0200
47 #define	ANYP	0300
48 #define	NLDELAY	001400
49 #define	TBDELAY	002000
50 #define	CRDELAY	030000
51 #define	VTDELAY	040000
52 #define	BSDELAY 0100000
53 #define	ALLDELAY 0177400
54 
55 /*
56  * Delay algorithms
57  */
58 #define	CR0	0
59 #define	CR1	010000
60 #define	CR2	020000
61 #define	CR3	030000
62 #define	NL0	0
63 #define	NL1	000400
64 #define	NL2	001000
65 #define	NL3	001400
66 #define	TAB0	0
67 #define	TAB1	002000
68 #endif /* _SYS_IOCTL_H */
69 #define	NOAL	004000
70 #ifndef _SYS_IOCTL_H
71 #define	FF0	0
72 #define	FF1	040000
73 #define	BS0	0
74 #define	BS1	0100000
75 #endif /* _SYS_IOCTL_H */
76 
77 #ifndef _SYS_TTOLD_H
78 
79 /*
80  * Structure for stty and gtty system calls.
81  */
82 struct sgttyb {
83 	char	sg_ispeed;		/* input speed */
84 	char	sg_ospeed;		/* output speed */
85 	char	sg_erase;		/* erase character */
86 	char	sg_kill;		/* kill character */
87 	int	sg_flags;		/* mode flags */
88 };
89 
90 /* BSD local special chars. Structure for TIOCSLTC/TIOCGLTC */
91 struct ltchars {
92 	char	t_suspc;	/* stop process signal */
93 	char	t_dsuspc;	/* delayed stop process signal */
94 	char	t_rprntc;	/* reprint line */
95 	char	t_flushc;	/* flush output (toggles) */
96 	char	t_werasc;	/* word erase */
97 	char	t_lnextc;	/* literal next character */
98 };
99 
100 /*
101  * Speeds
102  */
103 #define	B0	0
104 #define	B50	1
105 #define	B75	2
106 #define	B110	3
107 #define	B134	4
108 #define	B150	5
109 #define	B200	6
110 #define	B300	7
111 #define	B600	8
112 #define	B1200	9
113 #define	B1800	10
114 #define	B2400	11
115 #define	B4800	12
116 #define	B9600	13
117 #define	EXTA	14
118 #define	EXTB	15
119 
120 /*
121  *	ioctl arguments
122  */
123 #define	FIOCLEX		(('f'<<8)|1)
124 #define	FIONCLEX	(('f'<<8)|2)
125 #define	TIOCHPCL	(('t'<<8)|2)
126 #define	TIOCGETP	(('t'<<8)|8)
127 #define	TIOCSETP	(('t'<<8)|9)
128 #define	TIOCEXCL	(('t'<<8)|13)
129 #define	TIOCNXCL	(('t'<<8)|14)
130 
131 #endif	/* _SYS_TTOLD_H */
132 
133 #ifdef	__cplusplus
134 }
135 #endif
136 
137 #endif	/* _SGTTY_H */
138