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