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