xref: /illumos-gate/usr/src/lib/iconv_modules/hi_IN/include/iscii-common.h (revision 8a2b682e57a046b828f37bcde1776f131ef4629f)
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 (the "License").
6  * You may not use this file except in compliance with the License.
7  *
8  * You can obtain a copy of the license at src/OPENSOLARIS.LICENSE
9  * or http://www.opensolaris.org/os/licensing.
10  * See the License for the specific language governing permissions
11  * and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL HEADER in each
14  * file and include the License file at src/OPENSOLARIS.LICENSE.
15  * If applicable, add the following below this CDDL HEADER, with the
16  * fields enclosed by brackets "[]" replaced with your own identifying
17  * information: Portions Copyright [yyyy] [name of copyright owner]
18  *
19  * CDDL HEADER END
20  */
21 /*
22  * Copyright(c) 2001 Sun Microsystems, Inc.
23  * All rights reserved.
24  */
25 
26 #ifndef _ISCII_COMMON_H_
27 #define _ISCII_COMMON_H_
28 
29 #define ucs_t  unsigned long
30 
31 #define uchar unsigned char
32 
33 #define NUKTA      0
34 #define EXT        -1
35 #define HALANT     -2
36 #define DOUBLE_DANDA -3
37 
38 #define ISC_INV    0xd9  /* Consonant Invisible */
39 
40 #define ISC_halant 0xe8
41 #define ISC_nukta  0xe9
42 #define ISC_danda  0xea
43 #define ISC_atr    0xef  /* Attribute code */
44 #define ISC_ext    0xf0  /* Extension code */
45 
46 #define UNI_DOUBLE_DANDA 0x0965
47 
48 #define UNI_ZWNJ   0x200C /* Zero Width Non Joiner */
49 #define UNI_ZWJ    0x200D /* Zero Width Joiner */
50 #define UNI_INV    0x200E /* map INV to Unicode LRM, same as Apple implementation */
51 
52 #define EXT_RANGE_BEGIN  0xA1
53 #define EXT_RANGE_END    0xEE
54 #define is_valid_ext_code(v)  ((v) >= EXT_RANGE_BEGIN && (v) <= EXT_RANGE_END)
55 
56 typedef enum { DEV, BNG, GMK, GJR, ORI, TML, TLG, KND, MLM, NUM_ISCII } ISCII;
57 
58 typedef struct _entry {
59     uchar   iscii;
60     ucs_t   ucs;
61     int     count;
62 } Entry;
63 
64 
65 #endif
66