xref: /illumos-gate/usr/src/uts/common/sys/ldterm.h (revision b4203d75)
17c478bd9Sstevel@tonic-gate /*
27c478bd9Sstevel@tonic-gate  * CDDL HEADER START
37c478bd9Sstevel@tonic-gate  *
47c478bd9Sstevel@tonic-gate  * The contents of this file are subject to the terms of the
57c478bd9Sstevel@tonic-gate  * Common Development and Distribution License, Version 1.0 only
67c478bd9Sstevel@tonic-gate  * (the "License").  You may not use this file except in compliance
77c478bd9Sstevel@tonic-gate  * with the License.
87c478bd9Sstevel@tonic-gate  *
97c478bd9Sstevel@tonic-gate  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
107c478bd9Sstevel@tonic-gate  * or http://www.opensolaris.org/os/licensing.
117c478bd9Sstevel@tonic-gate  * See the License for the specific language governing permissions
127c478bd9Sstevel@tonic-gate  * and limitations under the License.
137c478bd9Sstevel@tonic-gate  *
147c478bd9Sstevel@tonic-gate  * When distributing Covered Code, include this CDDL HEADER in each
157c478bd9Sstevel@tonic-gate  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
167c478bd9Sstevel@tonic-gate  * If applicable, add the following below this CDDL HEADER, with the
177c478bd9Sstevel@tonic-gate  * fields enclosed by brackets "[]" replaced with your own identifying
187c478bd9Sstevel@tonic-gate  * information: Portions Copyright [yyyy] [name of copyright owner]
197c478bd9Sstevel@tonic-gate  *
207c478bd9Sstevel@tonic-gate  * CDDL HEADER END
217c478bd9Sstevel@tonic-gate  */
227c478bd9Sstevel@tonic-gate /*
237c478bd9Sstevel@tonic-gate  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
247c478bd9Sstevel@tonic-gate  * Use is subject to license terms.
257c478bd9Sstevel@tonic-gate  */
267c478bd9Sstevel@tonic-gate 
277c478bd9Sstevel@tonic-gate /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
28*b4203d75SMarcel Telka /*	  All Rights Reserved	*/
297c478bd9Sstevel@tonic-gate 
307c478bd9Sstevel@tonic-gate 
317c478bd9Sstevel@tonic-gate #ifndef _SYS_LDTERM_H
327c478bd9Sstevel@tonic-gate #define	_SYS_LDTERM_H
337c478bd9Sstevel@tonic-gate 
347c478bd9Sstevel@tonic-gate #ifdef	__cplusplus
357c478bd9Sstevel@tonic-gate extern "C" {
367c478bd9Sstevel@tonic-gate #endif
377c478bd9Sstevel@tonic-gate 
387c478bd9Sstevel@tonic-gate #define	IBSIZE	16		/* "standard" input data block size */
397c478bd9Sstevel@tonic-gate #define	OBSIZE	64		/* "standard" output data block size */
407c478bd9Sstevel@tonic-gate #define	EBSIZE	16		/* "standard" echo data block size */
417c478bd9Sstevel@tonic-gate 
427c478bd9Sstevel@tonic-gate #ifndef MIN
437c478bd9Sstevel@tonic-gate #define	MIN(a, b) (((a) < (b)) ? (a) : (b))
447c478bd9Sstevel@tonic-gate #endif
457c478bd9Sstevel@tonic-gate 
467c478bd9Sstevel@tonic-gate #define	V_MIN 		tp->t_modes.c_cc[VMIN]
477c478bd9Sstevel@tonic-gate #define	V_TIME		tp->t_modes.c_cc[VTIME]
487c478bd9Sstevel@tonic-gate #define	RAW_MODE	!(tp->t_modes.c_lflag & ICANON)
497c478bd9Sstevel@tonic-gate #define	CANON_MODE	(tp->t_modes.c_lflag & ICANON)
507c478bd9Sstevel@tonic-gate 
517c478bd9Sstevel@tonic-gate /* flow control defines */
527c478bd9Sstevel@tonic-gate #define	TTXOLO	132
537c478bd9Sstevel@tonic-gate #define	TTXOHI	180
547c478bd9Sstevel@tonic-gate #define	HIWAT	1024
557c478bd9Sstevel@tonic-gate #define	LOWAT	200
567c478bd9Sstevel@tonic-gate #define	LDCHUNK	512
577c478bd9Sstevel@tonic-gate 
587c478bd9Sstevel@tonic-gate 
597c478bd9Sstevel@tonic-gate /*
607c478bd9Sstevel@tonic-gate  * The following for EUC and also other types of codesets.
617c478bd9Sstevel@tonic-gate  */
627c478bd9Sstevel@tonic-gate 
637c478bd9Sstevel@tonic-gate #define	EUCSIZE	sizeof (struct eucioc)
647c478bd9Sstevel@tonic-gate #define	EUCIN	0	/* copying eucioc_t IN from ioctl */
657c478bd9Sstevel@tonic-gate #define	EUCOUT	1	/* copying it OUT to user format */
667c478bd9Sstevel@tonic-gate 
677c478bd9Sstevel@tonic-gate /*
687c478bd9Sstevel@tonic-gate  * One assumption made throughout this module is:  EUC characters have
697c478bd9Sstevel@tonic-gate  * a display width less than 255.  Also, assumed around, is that they
707c478bd9Sstevel@tonic-gate  * consist of < 256 bytes, but we don't worry much about that.
717c478bd9Sstevel@tonic-gate  */
727c478bd9Sstevel@tonic-gate 
737c478bd9Sstevel@tonic-gate #define	EUC_TWIDTH	255	/* Width of a TAB, as returned by */
747c478bd9Sstevel@tonic-gate 				/* "ldterm_dispwidth" */
757c478bd9Sstevel@tonic-gate #define	EUC_BSWIDTH	254	/* Width of a backspace as returned */
767c478bd9Sstevel@tonic-gate #define	EUC_NLWIDTH	253	/* newline & cr */
777c478bd9Sstevel@tonic-gate #define	EUC_CRWIDTH	252
787c478bd9Sstevel@tonic-gate 
797c478bd9Sstevel@tonic-gate #define	UNKNOWN_WIDTH	251
807c478bd9Sstevel@tonic-gate 
817c478bd9Sstevel@tonic-gate #define	EUC_MAXW	4	/* max display width and memory width, both */
827c478bd9Sstevel@tonic-gate #define	EUC_WARNCNT	20	/* # bad EUC erase attempts before hollering */
837c478bd9Sstevel@tonic-gate 
847c478bd9Sstevel@tonic-gate /* The next version will be the current LDTERM_DATA_VERSION + 1. */
857c478bd9Sstevel@tonic-gate #define	LDTERM_DATA_VERSION		1
867c478bd9Sstevel@tonic-gate 
877c478bd9Sstevel@tonic-gate /*
887c478bd9Sstevel@tonic-gate  * Supported codeset types:
897c478bd9Sstevel@tonic-gate  * When you are adding a new codeset type,  do not add any new codeset type
907c478bd9Sstevel@tonic-gate  * value that is smaller than LDTERM_CS_TYPE_MIN. You will also need to
917c478bd9Sstevel@tonic-gate  * add the new codeset type sequentially and also increase LDTERM_CS_TYPE_MAX
927c478bd9Sstevel@tonic-gate  * so that the LDTERM_CS_TYPE_MAX will be always equal to the last, new
937c478bd9Sstevel@tonic-gate  * codeset type value.
947c478bd9Sstevel@tonic-gate  *
957c478bd9Sstevel@tonic-gate  * Whenever you increase the LDTERM_CS_TYPE_MAX, you will also need to
967c478bd9Sstevel@tonic-gate  * increase the LDTERM_DATA_VERSION and also update the ldterm.c so that
977c478bd9Sstevel@tonic-gate  * ldterm will have proper version control.
987c478bd9Sstevel@tonic-gate  */
997c478bd9Sstevel@tonic-gate #define	LDTERM_CS_TYPE_MIN		1
1007c478bd9Sstevel@tonic-gate 
1017c478bd9Sstevel@tonic-gate #define	LDTERM_CS_TYPE_EUC		1
1027c478bd9Sstevel@tonic-gate #define	LDTERM_CS_TYPE_PCCS		2
1037c478bd9Sstevel@tonic-gate #define	LDTERM_CS_TYPE_UTF8		3
1047c478bd9Sstevel@tonic-gate 
1057c478bd9Sstevel@tonic-gate #define	LDTERM_CS_TYPE_MAX		3
1067c478bd9Sstevel@tonic-gate 
1077c478bd9Sstevel@tonic-gate /*
1087c478bd9Sstevel@tonic-gate  * The maximum number of bytes in a character of the codeset that
1097c478bd9Sstevel@tonic-gate  * can be handled by ldterm.
1107c478bd9Sstevel@tonic-gate  */
1117c478bd9Sstevel@tonic-gate #define	LDTERM_CS_MAX_BYTE_LENGTH	8
1127c478bd9Sstevel@tonic-gate 
1137c478bd9Sstevel@tonic-gate /*
1147c478bd9Sstevel@tonic-gate  * The maximum number of sub-codesets in a codeset that can be
1157c478bd9Sstevel@tonic-gate  * handled by ldterm.
1167c478bd9Sstevel@tonic-gate  */
1177c478bd9Sstevel@tonic-gate #define	LDTERM_CS_MAX_CODESETS		10
1187c478bd9Sstevel@tonic-gate 
1197c478bd9Sstevel@tonic-gate /* The maximum and minimum sub-codeset numbers possible in EUC codeset. */
1207c478bd9Sstevel@tonic-gate #define	LDTERM_CS_TYPE_EUC_MIN_SUBCS	0
1217c478bd9Sstevel@tonic-gate #define	LDTERM_CS_TYPE_EUC_MAX_SUBCS	3
1227c478bd9Sstevel@tonic-gate 
1237c478bd9Sstevel@tonic-gate /* The maximum and minimum sub-codeset numbers possible in PCCS codeset. */
1247c478bd9Sstevel@tonic-gate #define	LDTERM_CS_TYPE_PCCS_MIN_SUBCS	1
1257c478bd9Sstevel@tonic-gate #define	LDTERM_CS_TYPE_PCCS_MAX_SUBCS	LDTERM_CS_MAX_CODESETS
1267c478bd9Sstevel@tonic-gate 
1277c478bd9Sstevel@tonic-gate /* Some UTF-8 related values: */
1287c478bd9Sstevel@tonic-gate /* The maximum and minimum UTF-8 character subsequent byte values. */
1297c478bd9Sstevel@tonic-gate #define	LDTERM_CS_TYPE_UTF8_MIN_BYTE	0x80
1307c478bd9Sstevel@tonic-gate #define	LDTERM_CS_TYPE_UTF8_MAX_BYTE	0xbf
1317c478bd9Sstevel@tonic-gate 
1327c478bd9Sstevel@tonic-gate /* Some maximum and minimum character values in UTF-32. */
1337c478bd9Sstevel@tonic-gate #define	LDTERM_CS_TYPE_UTF8_MAX_P00	0x00ffff
1347c478bd9Sstevel@tonic-gate #define	LDTERM_CS_TYPE_UTF8_MAX_P01	0x01ffff
1357c478bd9Sstevel@tonic-gate #define	LDTERM_CS_TYPE_UTF8_MIN_CJKEXTB	0x020000
1367c478bd9Sstevel@tonic-gate #define	LDTERM_CS_TYPE_UTF8_MAX_CJKEXTB	0x02a6d6
1377c478bd9Sstevel@tonic-gate #define	LDTERM_CS_TYPE_UTF8_MIN_CJKCOMP	0x02f800
1387c478bd9Sstevel@tonic-gate #define	LDTERM_CS_TYPE_UTF8_MAX_CJKCOMP	0x02fa1d
1397c478bd9Sstevel@tonic-gate #define	LDTERM_CS_TYPE_UTF8_MIN_P14	0x0e0000
1407c478bd9Sstevel@tonic-gate #define	LDTERM_CS_TYPE_UTF8_MAX_P14	0x0e007f
1417c478bd9Sstevel@tonic-gate #define	LDTERM_CS_TYPE_UTF8_MIN_VARSEL	0x0e0100
1427c478bd9Sstevel@tonic-gate #define	LDTERM_CS_TYPE_UTF8_MAX_VARSEL	0x0e01ef
1437c478bd9Sstevel@tonic-gate #define	LDTERM_CS_TYPE_UTF8_MIN_P15	0x0f0000
1447c478bd9Sstevel@tonic-gate #define	LDTERM_CS_TYPE_UTF8_MAX_P15	0x0ffffd
1457c478bd9Sstevel@tonic-gate #define	LDTERM_CS_TYPE_UTF8_MIN_P16	0x100000
1467c478bd9Sstevel@tonic-gate #define	LDTERM_CS_TYPE_UTF8_MAX_P16	0x10fffd
1477c478bd9Sstevel@tonic-gate 
1487c478bd9Sstevel@tonic-gate /* Bit shift number and mask values for conversion from UTF-8 to UCS-4. */
1497c478bd9Sstevel@tonic-gate #define	LDTERM_CS_TYPE_UTF8_SHIFT_BITS	6
1507c478bd9Sstevel@tonic-gate #define	LDTERM_CS_TYPE_UTF8_BIT_MASK	0x3f
1517c478bd9Sstevel@tonic-gate 
1527c478bd9Sstevel@tonic-gate /*
1537c478bd9Sstevel@tonic-gate  * The following data structure is to provide codeset-specific
1547c478bd9Sstevel@tonic-gate  * information for EUC and PC originated codesets (ldterm_eucpc_data_t)
1557c478bd9Sstevel@tonic-gate  */
1567c478bd9Sstevel@tonic-gate struct _ldterm_eucpc_data {
1577c478bd9Sstevel@tonic-gate 	uchar_t	byte_length;
1587c478bd9Sstevel@tonic-gate 	uchar_t	screen_width;
1597c478bd9Sstevel@tonic-gate 	uchar_t	msb_start;
1607c478bd9Sstevel@tonic-gate 	uchar_t	msb_end;
1617c478bd9Sstevel@tonic-gate };
1627c478bd9Sstevel@tonic-gate typedef struct _ldterm_eucpc_data ldterm_eucpc_data_t;
1637c478bd9Sstevel@tonic-gate 
1647c478bd9Sstevel@tonic-gate /* ldterm codeset data information for user side. */
1657c478bd9Sstevel@tonic-gate struct _ldterm_cs_data_user {
1667c478bd9Sstevel@tonic-gate 	uchar_t	version;	/* version: 1 ~ 255 */
1677c478bd9Sstevel@tonic-gate 	uchar_t	codeset_type;
1687c478bd9Sstevel@tonic-gate 	uchar_t	csinfo_num;	/* the # of codesets */
1697c478bd9Sstevel@tonic-gate 	uchar_t	pad;
1707c478bd9Sstevel@tonic-gate 	char	locale_name[MAXNAMELEN];
1717c478bd9Sstevel@tonic-gate 	ldterm_eucpc_data_t	eucpc_data[LDTERM_CS_MAX_CODESETS];
1727c478bd9Sstevel@tonic-gate 						/* width data */
1737c478bd9Sstevel@tonic-gate };
1747c478bd9Sstevel@tonic-gate typedef struct _ldterm_cs_data_user ldterm_cs_data_user_t;
1757c478bd9Sstevel@tonic-gate 
1767c478bd9Sstevel@tonic-gate /* ldterm codeset data information for ldterm. */
1777c478bd9Sstevel@tonic-gate struct _ldterm_cs_data {
1787c478bd9Sstevel@tonic-gate 	uchar_t	version;	/* version: 1 ~ 255 */
1797c478bd9Sstevel@tonic-gate 	uchar_t	codeset_type;
1807c478bd9Sstevel@tonic-gate 	uchar_t	csinfo_num;	/* the # of codesets */
1817c478bd9Sstevel@tonic-gate 	uchar_t	pad;
1827c478bd9Sstevel@tonic-gate 	char	*locale_name;
1837c478bd9Sstevel@tonic-gate 	ldterm_eucpc_data_t	eucpc_data[LDTERM_CS_MAX_CODESETS];
1847c478bd9Sstevel@tonic-gate 						/* width data */
1857c478bd9Sstevel@tonic-gate };
1867c478bd9Sstevel@tonic-gate typedef struct _ldterm_cs_data ldterm_cs_data_t;
1877c478bd9Sstevel@tonic-gate 
1887c478bd9Sstevel@tonic-gate /*
1897c478bd9Sstevel@tonic-gate  * The following data structure is to handle Unicode codeset.
1907c478bd9Sstevel@tonic-gate  * To represent a single Unicode plane, it requires to have 16384
1917c478bd9Sstevel@tonic-gate  * 'ldterm_unicode_data_cell_t' elements.
1927c478bd9Sstevel@tonic-gate  */
1937c478bd9Sstevel@tonic-gate struct _ldterm_unicode_data_cell {
1947c478bd9Sstevel@tonic-gate 	uchar_t	u0:2;
1957c478bd9Sstevel@tonic-gate 	uchar_t	u1:2;
1967c478bd9Sstevel@tonic-gate 	uchar_t	u2:2;
1977c478bd9Sstevel@tonic-gate 	uchar_t	u3:2;
1987c478bd9Sstevel@tonic-gate };
1997c478bd9Sstevel@tonic-gate typedef struct _ldterm_unicode_data_cell ldterm_unicode_data_cell_t;
2007c478bd9Sstevel@tonic-gate 
2017c478bd9Sstevel@tonic-gate /* The following function pointers point the current codeset methods.  */
2027c478bd9Sstevel@tonic-gate typedef struct _ldterm_cs_methods {
2037c478bd9Sstevel@tonic-gate 	int (*ldterm_dispwidth)(uchar_t, void *, int);
2047c478bd9Sstevel@tonic-gate 	int (*ldterm_memwidth)(uchar_t, void *);
2057c478bd9Sstevel@tonic-gate } ldterm_cs_methods_t;
2067c478bd9Sstevel@tonic-gate 
2077c478bd9Sstevel@tonic-gate typedef struct ldterm_mod {
2087c478bd9Sstevel@tonic-gate 	struct termios t_modes;	/* Effective modes set by the provider below */
2097c478bd9Sstevel@tonic-gate 	struct termios t_amodes; /* Apparent modes for user programs */
2107c478bd9Sstevel@tonic-gate 	struct termios t_dmodes; /* Modes that driver wishes to process */
2117c478bd9Sstevel@tonic-gate 	unsigned int t_state;	/* internal state of ldterm module */
2127c478bd9Sstevel@tonic-gate 	int	t_line;		/* output line of tty */
2137c478bd9Sstevel@tonic-gate 	int	t_col;		/* output column of tty */
2147c478bd9Sstevel@tonic-gate 	int	t_rocount;	/* number of chars echoed since last output */
2157c478bd9Sstevel@tonic-gate 	int	t_rocol;	/* column in which first such char appeared */
2167c478bd9Sstevel@tonic-gate 	mblk_t	*t_message;	/* pointer to first mblk in message being */
2177c478bd9Sstevel@tonic-gate 				/* built */
2187c478bd9Sstevel@tonic-gate 	mblk_t	*t_endmsg;	/* pointer to last mblk in that message */
2197c478bd9Sstevel@tonic-gate 	size_t	t_msglen;	/* number of characters in that message */
2207c478bd9Sstevel@tonic-gate 	mblk_t	*t_echomp;	/* echoed output being assembled */
2217c478bd9Sstevel@tonic-gate 	int	t_rd_request;   /* Number of bytes requested by M_READ */
2227c478bd9Sstevel@tonic-gate 				/* during vmin/vtime read */
2237c478bd9Sstevel@tonic-gate 	int	t_iocid;	/* ID of ioctl reply being awaited */
2247c478bd9Sstevel@tonic-gate 	bufcall_id_t t_wbufcid;	/* ID of pending write-side bufcall */
2257c478bd9Sstevel@tonic-gate 	timeout_id_t t_vtid;	/* vtime timer id */
2267c478bd9Sstevel@tonic-gate 
2277c478bd9Sstevel@tonic-gate 	/*
2287c478bd9Sstevel@tonic-gate 	 * The following are for EUC and also other types of codeset
2297c478bd9Sstevel@tonic-gate 	 * processing. Please read 'euc' as 'multi-byte codeset' instead.
2307c478bd9Sstevel@tonic-gate 	 */
2317c478bd9Sstevel@tonic-gate 	uchar_t	t_codeset;	/* current code set indicator (read side) */
2327c478bd9Sstevel@tonic-gate 	uchar_t	t_eucleft;	/* bytes left to get in current char (read) */
2337c478bd9Sstevel@tonic-gate 	uchar_t	t_eucign;	/* bytes left to ignore (output post proc) */
2347c478bd9Sstevel@tonic-gate 	uchar_t	t_eucpad;	/* padding ... for eucwioc */
2357c478bd9Sstevel@tonic-gate 	eucioc_t eucwioc;	/* eucioc structure (have to use bcopy) */
2367c478bd9Sstevel@tonic-gate 	uchar_t	*t_eucp;	/* ptr to parallel array of column widths */
2377c478bd9Sstevel@tonic-gate 	mblk_t	*t_eucp_mp;	/* the m_blk that holds parallel array */
2387c478bd9Sstevel@tonic-gate 	uchar_t	t_maxeuc;	/* the max length in memory bytes of an EUC */
2397c478bd9Sstevel@tonic-gate 	int	t_eucwarn;	/* bad EUC counter */
2407c478bd9Sstevel@tonic-gate 
2417c478bd9Sstevel@tonic-gate 	/*
2427c478bd9Sstevel@tonic-gate 	 * The t_csdata, t_csmethods, t_scratch, and, t_scratch_len data
2437c478bd9Sstevel@tonic-gate 	 * fields are to support various non-EUC codesets.
2447c478bd9Sstevel@tonic-gate 	 */
2457c478bd9Sstevel@tonic-gate 	ldterm_cs_data_t	t_csdata;
2467c478bd9Sstevel@tonic-gate 	struct _ldterm_cs_methods t_csmethods;
2477c478bd9Sstevel@tonic-gate 	uchar_t			t_scratch[LDTERM_CS_MAX_BYTE_LENGTH];
2487c478bd9Sstevel@tonic-gate 	uchar_t			t_scratch_len;
2497c478bd9Sstevel@tonic-gate 
2507c478bd9Sstevel@tonic-gate 	mblk_t	*t_closeopts;	/* preallocated stroptions for close */
2517c478bd9Sstevel@tonic-gate 	mblk_t	*t_drainmsg;	/* preallocated TCSBRK drain message */
2527c478bd9Sstevel@tonic-gate } ldtermstd_state_t;
2537c478bd9Sstevel@tonic-gate 
2547c478bd9Sstevel@tonic-gate /*
2557c478bd9Sstevel@tonic-gate  * Internal state bits.
2567c478bd9Sstevel@tonic-gate  */
2577c478bd9Sstevel@tonic-gate #define	TS_XCLUDE	0x00000001	/* exclusive-use flag against open */
2587c478bd9Sstevel@tonic-gate #define	TS_TTSTOP	0x00000002	/* output stopped by ^S */
2597c478bd9Sstevel@tonic-gate #define	TS_TBLOCK	0x00000004	/* input stopped by IXOFF mode */
2607c478bd9Sstevel@tonic-gate #define	TS_QUOT		0x00000008	/* last character input was \ */
2617c478bd9Sstevel@tonic-gate #define	TS_ERASE	0x00000010	/* within a \.../ for PRTRUB */
2627c478bd9Sstevel@tonic-gate #define	TS_SLNCH	0x00000020	/* next character service routine */
2637c478bd9Sstevel@tonic-gate 					/* sees is literal */
2647c478bd9Sstevel@tonic-gate #define	TS_PLNCH	0x00000040	/* next character put routine sees */
2657c478bd9Sstevel@tonic-gate 					/* is literal */
2667c478bd9Sstevel@tonic-gate 
2677c478bd9Sstevel@tonic-gate #define	TS_TTCR		0x00000080	/* mapping NL to CR-NL */
2687c478bd9Sstevel@tonic-gate #define	TS_NOCANON	0x00000100	/* canonicalization done by somebody */
2697c478bd9Sstevel@tonic-gate 					/* below us */
2707c478bd9Sstevel@tonic-gate #define	TS_RESCAN	0x00000400	/* canonicalization mode changed, */
2717c478bd9Sstevel@tonic-gate 					/* rescan input queue */
2727c478bd9Sstevel@tonic-gate #define	TS_MREAD	0x00000800	/* timer started for vmin/vtime */
2737c478bd9Sstevel@tonic-gate #define	TS_FLUSHWAIT	0x00001000	/* waiting for flush on write side */
2747c478bd9Sstevel@tonic-gate #define	TS_MEUC		0x00010000	/* TRUE if multi-byte codesets used */
2757c478bd9Sstevel@tonic-gate #define	TS_WARNED	0x00020000	/* already warned on console */
2767c478bd9Sstevel@tonic-gate #define	TS_CLOSE	0x00040000	/* close in progress */
2777c478bd9Sstevel@tonic-gate #define	TS_IOCWAIT	0x00080000	/* waiting for reply to ioctl message */
2787c478bd9Sstevel@tonic-gate #define	TS_IFBLOCK	0x00100000	/* input flow blocked */
2797c478bd9Sstevel@tonic-gate #define	TS_OFBLOCK	0x00200000	/* output flow blocked */
2807c478bd9Sstevel@tonic-gate #define	TS_ISPTSTTY	0x00400000	/* is x/open terminal */
2817c478bd9Sstevel@tonic-gate 
2827c478bd9Sstevel@tonic-gate #ifdef	__cplusplus
2837c478bd9Sstevel@tonic-gate }
2847c478bd9Sstevel@tonic-gate #endif
2857c478bd9Sstevel@tonic-gate 
2867c478bd9Sstevel@tonic-gate #endif	/* _SYS_LDTERM_H */
287