xref: /titanic_41/usr/src/uts/common/sys/ldterm.h (revision 7c478bd95313f5f23a4c958a745db2134aa03244)
1*7c478bd9Sstevel@tonic-gate /*
2*7c478bd9Sstevel@tonic-gate  * CDDL HEADER START
3*7c478bd9Sstevel@tonic-gate  *
4*7c478bd9Sstevel@tonic-gate  * The contents of this file are subject to the terms of the
5*7c478bd9Sstevel@tonic-gate  * Common Development and Distribution License, Version 1.0 only
6*7c478bd9Sstevel@tonic-gate  * (the "License").  You may not use this file except in compliance
7*7c478bd9Sstevel@tonic-gate  * with the License.
8*7c478bd9Sstevel@tonic-gate  *
9*7c478bd9Sstevel@tonic-gate  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10*7c478bd9Sstevel@tonic-gate  * or http://www.opensolaris.org/os/licensing.
11*7c478bd9Sstevel@tonic-gate  * See the License for the specific language governing permissions
12*7c478bd9Sstevel@tonic-gate  * and limitations under the License.
13*7c478bd9Sstevel@tonic-gate  *
14*7c478bd9Sstevel@tonic-gate  * When distributing Covered Code, include this CDDL HEADER in each
15*7c478bd9Sstevel@tonic-gate  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16*7c478bd9Sstevel@tonic-gate  * If applicable, add the following below this CDDL HEADER, with the
17*7c478bd9Sstevel@tonic-gate  * fields enclosed by brackets "[]" replaced with your own identifying
18*7c478bd9Sstevel@tonic-gate  * information: Portions Copyright [yyyy] [name of copyright owner]
19*7c478bd9Sstevel@tonic-gate  *
20*7c478bd9Sstevel@tonic-gate  * CDDL HEADER END
21*7c478bd9Sstevel@tonic-gate  */
22*7c478bd9Sstevel@tonic-gate /*
23*7c478bd9Sstevel@tonic-gate  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
24*7c478bd9Sstevel@tonic-gate  * Use is subject to license terms.
25*7c478bd9Sstevel@tonic-gate  */
26*7c478bd9Sstevel@tonic-gate 
27*7c478bd9Sstevel@tonic-gate /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
28*7c478bd9Sstevel@tonic-gate /*	  All Rights Reserved  	*/
29*7c478bd9Sstevel@tonic-gate 
30*7c478bd9Sstevel@tonic-gate 
31*7c478bd9Sstevel@tonic-gate #ifndef _SYS_LDTERM_H
32*7c478bd9Sstevel@tonic-gate #define	_SYS_LDTERM_H
33*7c478bd9Sstevel@tonic-gate 
34*7c478bd9Sstevel@tonic-gate #pragma ident	"%Z%%M%	%I%	%E% SMI"	/* SVr4.0 11.5	*/
35*7c478bd9Sstevel@tonic-gate 
36*7c478bd9Sstevel@tonic-gate #ifdef	__cplusplus
37*7c478bd9Sstevel@tonic-gate extern "C" {
38*7c478bd9Sstevel@tonic-gate #endif
39*7c478bd9Sstevel@tonic-gate 
40*7c478bd9Sstevel@tonic-gate #define	IBSIZE	16		/* "standard" input data block size */
41*7c478bd9Sstevel@tonic-gate #define	OBSIZE	64		/* "standard" output data block size */
42*7c478bd9Sstevel@tonic-gate #define	EBSIZE	16		/* "standard" echo data block size */
43*7c478bd9Sstevel@tonic-gate 
44*7c478bd9Sstevel@tonic-gate #ifndef MIN
45*7c478bd9Sstevel@tonic-gate #define	MIN(a, b) (((a) < (b)) ? (a) : (b))
46*7c478bd9Sstevel@tonic-gate #endif
47*7c478bd9Sstevel@tonic-gate 
48*7c478bd9Sstevel@tonic-gate #define	V_MIN 		tp->t_modes.c_cc[VMIN]
49*7c478bd9Sstevel@tonic-gate #define	V_TIME		tp->t_modes.c_cc[VTIME]
50*7c478bd9Sstevel@tonic-gate #define	RAW_MODE	!(tp->t_modes.c_lflag & ICANON)
51*7c478bd9Sstevel@tonic-gate #define	CANON_MODE	(tp->t_modes.c_lflag & ICANON)
52*7c478bd9Sstevel@tonic-gate 
53*7c478bd9Sstevel@tonic-gate /* flow control defines */
54*7c478bd9Sstevel@tonic-gate #define	TTXOLO	132
55*7c478bd9Sstevel@tonic-gate #define	TTXOHI	180
56*7c478bd9Sstevel@tonic-gate #define	HIWAT	1024
57*7c478bd9Sstevel@tonic-gate #define	LOWAT	200
58*7c478bd9Sstevel@tonic-gate #define	LDCHUNK	512
59*7c478bd9Sstevel@tonic-gate 
60*7c478bd9Sstevel@tonic-gate 
61*7c478bd9Sstevel@tonic-gate /*
62*7c478bd9Sstevel@tonic-gate  * The following for EUC and also other types of codesets.
63*7c478bd9Sstevel@tonic-gate  */
64*7c478bd9Sstevel@tonic-gate 
65*7c478bd9Sstevel@tonic-gate #define	EUCSIZE	sizeof (struct eucioc)
66*7c478bd9Sstevel@tonic-gate #define	EUCIN	0	/* copying eucioc_t IN from ioctl */
67*7c478bd9Sstevel@tonic-gate #define	EUCOUT	1	/* copying it OUT to user format */
68*7c478bd9Sstevel@tonic-gate 
69*7c478bd9Sstevel@tonic-gate /*
70*7c478bd9Sstevel@tonic-gate  * One assumption made throughout this module is:  EUC characters have
71*7c478bd9Sstevel@tonic-gate  * a display width less than 255.  Also, assumed around, is that they
72*7c478bd9Sstevel@tonic-gate  * consist of < 256 bytes, but we don't worry much about that.
73*7c478bd9Sstevel@tonic-gate  */
74*7c478bd9Sstevel@tonic-gate 
75*7c478bd9Sstevel@tonic-gate #define	EUC_TWIDTH	255	/* Width of a TAB, as returned by */
76*7c478bd9Sstevel@tonic-gate 				/* "ldterm_dispwidth" */
77*7c478bd9Sstevel@tonic-gate #define	EUC_BSWIDTH	254	/* Width of a backspace as returned */
78*7c478bd9Sstevel@tonic-gate #define	EUC_NLWIDTH	253	/* newline & cr */
79*7c478bd9Sstevel@tonic-gate #define	EUC_CRWIDTH	252
80*7c478bd9Sstevel@tonic-gate 
81*7c478bd9Sstevel@tonic-gate #define	UNKNOWN_WIDTH	251
82*7c478bd9Sstevel@tonic-gate 
83*7c478bd9Sstevel@tonic-gate #define	EUC_MAXW	4	/* max display width and memory width, both */
84*7c478bd9Sstevel@tonic-gate #define	EUC_WARNCNT	20	/* # bad EUC erase attempts before hollering */
85*7c478bd9Sstevel@tonic-gate 
86*7c478bd9Sstevel@tonic-gate /* The next version will be the current LDTERM_DATA_VERSION + 1. */
87*7c478bd9Sstevel@tonic-gate #define	LDTERM_DATA_VERSION		1
88*7c478bd9Sstevel@tonic-gate 
89*7c478bd9Sstevel@tonic-gate /*
90*7c478bd9Sstevel@tonic-gate  * Supported codeset types:
91*7c478bd9Sstevel@tonic-gate  * When you are adding a new codeset type,  do not add any new codeset type
92*7c478bd9Sstevel@tonic-gate  * value that is smaller than LDTERM_CS_TYPE_MIN. You will also need to
93*7c478bd9Sstevel@tonic-gate  * add the new codeset type sequentially and also increase LDTERM_CS_TYPE_MAX
94*7c478bd9Sstevel@tonic-gate  * so that the LDTERM_CS_TYPE_MAX will be always equal to the last, new
95*7c478bd9Sstevel@tonic-gate  * codeset type value.
96*7c478bd9Sstevel@tonic-gate  *
97*7c478bd9Sstevel@tonic-gate  * Whenever you increase the LDTERM_CS_TYPE_MAX, you will also need to
98*7c478bd9Sstevel@tonic-gate  * increase the LDTERM_DATA_VERSION and also update the ldterm.c so that
99*7c478bd9Sstevel@tonic-gate  * ldterm will have proper version control.
100*7c478bd9Sstevel@tonic-gate  */
101*7c478bd9Sstevel@tonic-gate #define	LDTERM_CS_TYPE_MIN		1
102*7c478bd9Sstevel@tonic-gate 
103*7c478bd9Sstevel@tonic-gate #define	LDTERM_CS_TYPE_EUC		1
104*7c478bd9Sstevel@tonic-gate #define	LDTERM_CS_TYPE_PCCS		2
105*7c478bd9Sstevel@tonic-gate #define	LDTERM_CS_TYPE_UTF8		3
106*7c478bd9Sstevel@tonic-gate 
107*7c478bd9Sstevel@tonic-gate #define	LDTERM_CS_TYPE_MAX		3
108*7c478bd9Sstevel@tonic-gate 
109*7c478bd9Sstevel@tonic-gate /*
110*7c478bd9Sstevel@tonic-gate  * The maximum number of bytes in a character of the codeset that
111*7c478bd9Sstevel@tonic-gate  * can be handled by ldterm.
112*7c478bd9Sstevel@tonic-gate  */
113*7c478bd9Sstevel@tonic-gate #define	LDTERM_CS_MAX_BYTE_LENGTH	8
114*7c478bd9Sstevel@tonic-gate 
115*7c478bd9Sstevel@tonic-gate /*
116*7c478bd9Sstevel@tonic-gate  * The maximum number of sub-codesets in a codeset that can be
117*7c478bd9Sstevel@tonic-gate  * handled by ldterm.
118*7c478bd9Sstevel@tonic-gate  */
119*7c478bd9Sstevel@tonic-gate #define	LDTERM_CS_MAX_CODESETS		10
120*7c478bd9Sstevel@tonic-gate 
121*7c478bd9Sstevel@tonic-gate /* The maximum and minimum sub-codeset numbers possible in EUC codeset. */
122*7c478bd9Sstevel@tonic-gate #define	LDTERM_CS_TYPE_EUC_MIN_SUBCS	0
123*7c478bd9Sstevel@tonic-gate #define	LDTERM_CS_TYPE_EUC_MAX_SUBCS	3
124*7c478bd9Sstevel@tonic-gate 
125*7c478bd9Sstevel@tonic-gate /* The maximum and minimum sub-codeset numbers possible in PCCS codeset. */
126*7c478bd9Sstevel@tonic-gate #define	LDTERM_CS_TYPE_PCCS_MIN_SUBCS	1
127*7c478bd9Sstevel@tonic-gate #define	LDTERM_CS_TYPE_PCCS_MAX_SUBCS	LDTERM_CS_MAX_CODESETS
128*7c478bd9Sstevel@tonic-gate 
129*7c478bd9Sstevel@tonic-gate /* Some UTF-8 related values: */
130*7c478bd9Sstevel@tonic-gate /* The maximum and minimum UTF-8 character subsequent byte values. */
131*7c478bd9Sstevel@tonic-gate #define	LDTERM_CS_TYPE_UTF8_MIN_BYTE	0x80
132*7c478bd9Sstevel@tonic-gate #define	LDTERM_CS_TYPE_UTF8_MAX_BYTE	0xbf
133*7c478bd9Sstevel@tonic-gate 
134*7c478bd9Sstevel@tonic-gate /* Some maximum and minimum character values in UTF-32. */
135*7c478bd9Sstevel@tonic-gate #define	LDTERM_CS_TYPE_UTF8_MAX_P00	0x00ffff
136*7c478bd9Sstevel@tonic-gate #define	LDTERM_CS_TYPE_UTF8_MAX_P01	0x01ffff
137*7c478bd9Sstevel@tonic-gate #define	LDTERM_CS_TYPE_UTF8_MIN_CJKEXTB	0x020000
138*7c478bd9Sstevel@tonic-gate #define	LDTERM_CS_TYPE_UTF8_MAX_CJKEXTB	0x02a6d6
139*7c478bd9Sstevel@tonic-gate #define	LDTERM_CS_TYPE_UTF8_MIN_CJKCOMP	0x02f800
140*7c478bd9Sstevel@tonic-gate #define	LDTERM_CS_TYPE_UTF8_MAX_CJKCOMP	0x02fa1d
141*7c478bd9Sstevel@tonic-gate #define	LDTERM_CS_TYPE_UTF8_MIN_P14	0x0e0000
142*7c478bd9Sstevel@tonic-gate #define	LDTERM_CS_TYPE_UTF8_MAX_P14	0x0e007f
143*7c478bd9Sstevel@tonic-gate #define	LDTERM_CS_TYPE_UTF8_MIN_VARSEL	0x0e0100
144*7c478bd9Sstevel@tonic-gate #define	LDTERM_CS_TYPE_UTF8_MAX_VARSEL	0x0e01ef
145*7c478bd9Sstevel@tonic-gate #define	LDTERM_CS_TYPE_UTF8_MIN_P15	0x0f0000
146*7c478bd9Sstevel@tonic-gate #define	LDTERM_CS_TYPE_UTF8_MAX_P15	0x0ffffd
147*7c478bd9Sstevel@tonic-gate #define	LDTERM_CS_TYPE_UTF8_MIN_P16	0x100000
148*7c478bd9Sstevel@tonic-gate #define	LDTERM_CS_TYPE_UTF8_MAX_P16	0x10fffd
149*7c478bd9Sstevel@tonic-gate 
150*7c478bd9Sstevel@tonic-gate /* Bit shift number and mask values for conversion from UTF-8 to UCS-4. */
151*7c478bd9Sstevel@tonic-gate #define	LDTERM_CS_TYPE_UTF8_SHIFT_BITS	6
152*7c478bd9Sstevel@tonic-gate #define	LDTERM_CS_TYPE_UTF8_BIT_MASK	0x3f
153*7c478bd9Sstevel@tonic-gate 
154*7c478bd9Sstevel@tonic-gate /*
155*7c478bd9Sstevel@tonic-gate  * The following data structure is to provide codeset-specific
156*7c478bd9Sstevel@tonic-gate  * information for EUC and PC originated codesets (ldterm_eucpc_data_t)
157*7c478bd9Sstevel@tonic-gate  */
158*7c478bd9Sstevel@tonic-gate struct _ldterm_eucpc_data {
159*7c478bd9Sstevel@tonic-gate 	uchar_t	byte_length;
160*7c478bd9Sstevel@tonic-gate 	uchar_t	screen_width;
161*7c478bd9Sstevel@tonic-gate 	uchar_t	msb_start;
162*7c478bd9Sstevel@tonic-gate 	uchar_t	msb_end;
163*7c478bd9Sstevel@tonic-gate };
164*7c478bd9Sstevel@tonic-gate typedef struct _ldterm_eucpc_data ldterm_eucpc_data_t;
165*7c478bd9Sstevel@tonic-gate 
166*7c478bd9Sstevel@tonic-gate /* ldterm codeset data information for user side. */
167*7c478bd9Sstevel@tonic-gate struct _ldterm_cs_data_user {
168*7c478bd9Sstevel@tonic-gate 	uchar_t	version;	/* version: 1 ~ 255 */
169*7c478bd9Sstevel@tonic-gate 	uchar_t	codeset_type;
170*7c478bd9Sstevel@tonic-gate 	uchar_t	csinfo_num;	/* the # of codesets */
171*7c478bd9Sstevel@tonic-gate 	uchar_t	pad;
172*7c478bd9Sstevel@tonic-gate 	char	locale_name[MAXNAMELEN];
173*7c478bd9Sstevel@tonic-gate 	ldterm_eucpc_data_t	eucpc_data[LDTERM_CS_MAX_CODESETS];
174*7c478bd9Sstevel@tonic-gate 						/* width data */
175*7c478bd9Sstevel@tonic-gate };
176*7c478bd9Sstevel@tonic-gate typedef struct _ldterm_cs_data_user ldterm_cs_data_user_t;
177*7c478bd9Sstevel@tonic-gate 
178*7c478bd9Sstevel@tonic-gate /* ldterm codeset data information for ldterm. */
179*7c478bd9Sstevel@tonic-gate struct _ldterm_cs_data {
180*7c478bd9Sstevel@tonic-gate 	uchar_t	version;	/* version: 1 ~ 255 */
181*7c478bd9Sstevel@tonic-gate 	uchar_t	codeset_type;
182*7c478bd9Sstevel@tonic-gate 	uchar_t	csinfo_num;	/* the # of codesets */
183*7c478bd9Sstevel@tonic-gate 	uchar_t	pad;
184*7c478bd9Sstevel@tonic-gate 	char	*locale_name;
185*7c478bd9Sstevel@tonic-gate 	ldterm_eucpc_data_t	eucpc_data[LDTERM_CS_MAX_CODESETS];
186*7c478bd9Sstevel@tonic-gate 						/* width data */
187*7c478bd9Sstevel@tonic-gate };
188*7c478bd9Sstevel@tonic-gate typedef struct _ldterm_cs_data ldterm_cs_data_t;
189*7c478bd9Sstevel@tonic-gate 
190*7c478bd9Sstevel@tonic-gate /*
191*7c478bd9Sstevel@tonic-gate  * The following data structure is to handle Unicode codeset.
192*7c478bd9Sstevel@tonic-gate  * To represent a single Unicode plane, it requires to have 16384
193*7c478bd9Sstevel@tonic-gate  * 'ldterm_unicode_data_cell_t' elements.
194*7c478bd9Sstevel@tonic-gate  */
195*7c478bd9Sstevel@tonic-gate struct _ldterm_unicode_data_cell {
196*7c478bd9Sstevel@tonic-gate 	uchar_t	u0:2;
197*7c478bd9Sstevel@tonic-gate 	uchar_t	u1:2;
198*7c478bd9Sstevel@tonic-gate 	uchar_t	u2:2;
199*7c478bd9Sstevel@tonic-gate 	uchar_t	u3:2;
200*7c478bd9Sstevel@tonic-gate };
201*7c478bd9Sstevel@tonic-gate typedef struct _ldterm_unicode_data_cell ldterm_unicode_data_cell_t;
202*7c478bd9Sstevel@tonic-gate 
203*7c478bd9Sstevel@tonic-gate /* The following function pointers point the current codeset methods.  */
204*7c478bd9Sstevel@tonic-gate typedef struct _ldterm_cs_methods {
205*7c478bd9Sstevel@tonic-gate 	int (*ldterm_dispwidth)(uchar_t, void *, int);
206*7c478bd9Sstevel@tonic-gate 	int (*ldterm_memwidth)(uchar_t, void *);
207*7c478bd9Sstevel@tonic-gate } ldterm_cs_methods_t;
208*7c478bd9Sstevel@tonic-gate 
209*7c478bd9Sstevel@tonic-gate typedef struct ldterm_mod {
210*7c478bd9Sstevel@tonic-gate 	struct termios t_modes;	/* Effective modes set by the provider below */
211*7c478bd9Sstevel@tonic-gate 	struct termios t_amodes; /* Apparent modes for user programs */
212*7c478bd9Sstevel@tonic-gate 	struct termios t_dmodes; /* Modes that driver wishes to process */
213*7c478bd9Sstevel@tonic-gate 	unsigned int t_state;	/* internal state of ldterm module */
214*7c478bd9Sstevel@tonic-gate 	int	t_line;		/* output line of tty */
215*7c478bd9Sstevel@tonic-gate 	int	t_col;		/* output column of tty */
216*7c478bd9Sstevel@tonic-gate 	int	t_rocount;	/* number of chars echoed since last output */
217*7c478bd9Sstevel@tonic-gate 	int	t_rocol;	/* column in which first such char appeared */
218*7c478bd9Sstevel@tonic-gate 	mblk_t	*t_message;	/* pointer to first mblk in message being */
219*7c478bd9Sstevel@tonic-gate 				/* built */
220*7c478bd9Sstevel@tonic-gate 	mblk_t	*t_endmsg;	/* pointer to last mblk in that message */
221*7c478bd9Sstevel@tonic-gate 	size_t	t_msglen;	/* number of characters in that message */
222*7c478bd9Sstevel@tonic-gate 	mblk_t	*t_echomp;	/* echoed output being assembled */
223*7c478bd9Sstevel@tonic-gate 	int	t_rd_request;   /* Number of bytes requested by M_READ */
224*7c478bd9Sstevel@tonic-gate 				/* during vmin/vtime read */
225*7c478bd9Sstevel@tonic-gate 	int	t_iocid;	/* ID of ioctl reply being awaited */
226*7c478bd9Sstevel@tonic-gate 	bufcall_id_t t_wbufcid;	/* ID of pending write-side bufcall */
227*7c478bd9Sstevel@tonic-gate 	timeout_id_t t_vtid;	/* vtime timer id */
228*7c478bd9Sstevel@tonic-gate 
229*7c478bd9Sstevel@tonic-gate 	/*
230*7c478bd9Sstevel@tonic-gate 	 * The following are for EUC and also other types of codeset
231*7c478bd9Sstevel@tonic-gate 	 * processing. Please read 'euc' as 'multi-byte codeset' instead.
232*7c478bd9Sstevel@tonic-gate 	 */
233*7c478bd9Sstevel@tonic-gate 	uchar_t	t_codeset;	/* current code set indicator (read side) */
234*7c478bd9Sstevel@tonic-gate 	uchar_t	t_eucleft;	/* bytes left to get in current char (read) */
235*7c478bd9Sstevel@tonic-gate 	uchar_t	t_eucign;	/* bytes left to ignore (output post proc) */
236*7c478bd9Sstevel@tonic-gate 	uchar_t	t_eucpad;	/* padding ... for eucwioc */
237*7c478bd9Sstevel@tonic-gate 	eucioc_t eucwioc;	/* eucioc structure (have to use bcopy) */
238*7c478bd9Sstevel@tonic-gate 	uchar_t	*t_eucp;	/* ptr to parallel array of column widths */
239*7c478bd9Sstevel@tonic-gate 	mblk_t	*t_eucp_mp;	/* the m_blk that holds parallel array */
240*7c478bd9Sstevel@tonic-gate 	uchar_t	t_maxeuc;	/* the max length in memory bytes of an EUC */
241*7c478bd9Sstevel@tonic-gate 	int	t_eucwarn;	/* bad EUC counter */
242*7c478bd9Sstevel@tonic-gate 
243*7c478bd9Sstevel@tonic-gate 	/*
244*7c478bd9Sstevel@tonic-gate 	 * The t_csdata, t_csmethods, t_scratch, and, t_scratch_len data
245*7c478bd9Sstevel@tonic-gate 	 * fields are to support various non-EUC codesets.
246*7c478bd9Sstevel@tonic-gate 	 */
247*7c478bd9Sstevel@tonic-gate 	ldterm_cs_data_t	t_csdata;
248*7c478bd9Sstevel@tonic-gate 	struct _ldterm_cs_methods t_csmethods;
249*7c478bd9Sstevel@tonic-gate 	uchar_t			t_scratch[LDTERM_CS_MAX_BYTE_LENGTH];
250*7c478bd9Sstevel@tonic-gate 	uchar_t			t_scratch_len;
251*7c478bd9Sstevel@tonic-gate 
252*7c478bd9Sstevel@tonic-gate 	mblk_t	*t_closeopts;	/* preallocated stroptions for close */
253*7c478bd9Sstevel@tonic-gate 	mblk_t	*t_drainmsg;	/* preallocated TCSBRK drain message */
254*7c478bd9Sstevel@tonic-gate } ldtermstd_state_t;
255*7c478bd9Sstevel@tonic-gate 
256*7c478bd9Sstevel@tonic-gate /*
257*7c478bd9Sstevel@tonic-gate  * Internal state bits.
258*7c478bd9Sstevel@tonic-gate  */
259*7c478bd9Sstevel@tonic-gate #define	TS_XCLUDE	0x00000001	/* exclusive-use flag against open */
260*7c478bd9Sstevel@tonic-gate #define	TS_TTSTOP	0x00000002	/* output stopped by ^S */
261*7c478bd9Sstevel@tonic-gate #define	TS_TBLOCK	0x00000004	/* input stopped by IXOFF mode */
262*7c478bd9Sstevel@tonic-gate #define	TS_QUOT		0x00000008	/* last character input was \ */
263*7c478bd9Sstevel@tonic-gate #define	TS_ERASE	0x00000010	/* within a \.../ for PRTRUB */
264*7c478bd9Sstevel@tonic-gate #define	TS_SLNCH	0x00000020	/* next character service routine */
265*7c478bd9Sstevel@tonic-gate 					/* sees is literal */
266*7c478bd9Sstevel@tonic-gate #define	TS_PLNCH	0x00000040	/* next character put routine sees */
267*7c478bd9Sstevel@tonic-gate 					/* is literal */
268*7c478bd9Sstevel@tonic-gate 
269*7c478bd9Sstevel@tonic-gate #define	TS_TTCR		0x00000080	/* mapping NL to CR-NL */
270*7c478bd9Sstevel@tonic-gate #define	TS_NOCANON	0x00000100	/* canonicalization done by somebody */
271*7c478bd9Sstevel@tonic-gate 					/* below us */
272*7c478bd9Sstevel@tonic-gate #define	TS_RESCAN	0x00000400	/* canonicalization mode changed, */
273*7c478bd9Sstevel@tonic-gate 					/* rescan input queue */
274*7c478bd9Sstevel@tonic-gate #define	TS_MREAD	0x00000800	/* timer started for vmin/vtime */
275*7c478bd9Sstevel@tonic-gate #define	TS_FLUSHWAIT	0x00001000	/* waiting for flush on write side */
276*7c478bd9Sstevel@tonic-gate #define	TS_MEUC		0x00010000	/* TRUE if multi-byte codesets used */
277*7c478bd9Sstevel@tonic-gate #define	TS_WARNED	0x00020000	/* already warned on console */
278*7c478bd9Sstevel@tonic-gate #define	TS_CLOSE	0x00040000	/* close in progress */
279*7c478bd9Sstevel@tonic-gate #define	TS_IOCWAIT	0x00080000	/* waiting for reply to ioctl message */
280*7c478bd9Sstevel@tonic-gate #define	TS_IFBLOCK	0x00100000	/* input flow blocked */
281*7c478bd9Sstevel@tonic-gate #define	TS_OFBLOCK	0x00200000	/* output flow blocked */
282*7c478bd9Sstevel@tonic-gate #define	TS_ISPTSTTY	0x00400000	/* is x/open terminal */
283*7c478bd9Sstevel@tonic-gate 
284*7c478bd9Sstevel@tonic-gate #ifdef	__cplusplus
285*7c478bd9Sstevel@tonic-gate }
286*7c478bd9Sstevel@tonic-gate #endif
287*7c478bd9Sstevel@tonic-gate 
288*7c478bd9Sstevel@tonic-gate #endif	/* _SYS_LDTERM_H */
289