xref: /titanic_41/usr/src/uts/common/sys/eucioctl.h (revision 7c478bd95313f5f23a4c958a745db2134aa03244)
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) 1984, 1986, 1987, 1988, 1989 AT&T	*/
23 /*	  All Rights Reserved  	*/
24 
25 
26 #ifndef _SYS_EUCIOCTL_H
27 #define	_SYS_EUCIOCTL_H
28 
29 #pragma ident	"%Z%%M%	%I%	%E% SMI"	/* SVr4.0 1.4	*/
30 
31 #ifdef	__cplusplus
32 extern "C" {
33 #endif
34 
35 /*
36  * /usr/include/sys/eucioctl.h:
37  *
38  *	Header for EUC width information to LD modules.
39  */
40 
41 #ifndef EUC_IOC
42 #define	EUC_IOC		(('E' | 128) << 8)
43 #endif
44 #define	EUC_WSET	(EUC_IOC | 1)
45 #define	EUC_WGET	(EUC_IOC | 2)
46 #define	EUC_MSAVE	(EUC_IOC | 3)
47 #define	EUC_MREST	(EUC_IOC | 4)
48 #define	EUC_IXLOFF	(EUC_IOC | 5)
49 #define	EUC_IXLON	(EUC_IOC | 6)
50 #define	EUC_OXLOFF	(EUC_IOC | 7)
51 #define	EUC_OXLON	(EUC_IOC | 8)
52 
53 /*
54  * This structure should really be the same one as defined in "euc.h",
55  * but we want to minimize the number of bytes sent downstream to each
56  * module -- this should make it 8 bytes -- therefore, we take only the
57  * info we need.  The major assumptions here are that no EUC character
58  * set has a character width greater than 255 bytes, and that no EUC
59  * character consumes more than 255 screen columns.  Let me know if this
60  * is an unsafe assumption...
61  */
62 
63 struct eucioc {
64 	unsigned char eucw[4];
65 	unsigned char scrw[4];
66 };
67 typedef struct eucioc	eucioc_t;
68 
69 /*
70  * The following defines are for LD modules to broadcast the state of
71  * their "icanon" bit.
72  *
73  * The message type is M_CTL; message block 1 has a data block containing
74  * an "iocblk"; EUC_BCAST is put into the "ioc_cmd" field.  The "b_cont"
75  * of the first message block points to a second message block.  The second
76  * message block is type M_DATA; it contains 1 byte that is either EUC_B_RAW
77  * or EUC_B_CANON depending on the state of the "icanon" bit.  EUC line
78  * disciplines should take care to broadcast this information when they are
79  * in multibyte character mode.
80  */
81 
82 #define	EUC_BCAST	EUC_IOC|16
83 
84 #define	EUC_B_CANON	'\177'
85 #define	EUC_B_RAW	'\001'	/* MUST be non-zero! */
86 
87 #ifdef	__cplusplus
88 }
89 #endif
90 
91 #endif	/* _SYS_EUCIOCTL_H */
92