xref: /illumos-gate/usr/src/lib/iconv_modules/hi_IN/include/iscii.h (revision 1a2d662a91cee3bf82f41cd47c7ae6f3825d9db2)
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_H_
27 #define _ISCII_H_
28 
29 #include "iscii-bng.h"
30 #include "iscii-dev.h"
31 #include "iscii-gjr.h"
32 #include "iscii-gmk.h"
33 #include "iscii-knd.h"
34 #include "iscii-mlm.h"
35 #include "iscii-ori.h"
36 #include "iscii-tlg.h"
37 #include "iscii-tml.h"
38 
39 #define get_script_types(ucs, type) \
40     if ( ucs >= 0x0900 && ucs <= 0x097f ) \
41         type = DEV; \
42     else if ( ucs >= 0x0980 && ucs <= 0x09ff ) \
43         type = BNG; \
44     else if ( ucs >= 0x0a00 && ucs <= 0x0a7f ) \
45         type = GMK; \
46     else if ( ucs >= 0x0a80 && ucs <= 0x0aff ) \
47         type = GJR; \
48     else if ( ucs >= 0x0b00 && ucs <= 0x0b7f ) \
49         type = ORI; \
50     else if ( ucs >= 0x0b80 && ucs <= 0x0bff ) \
51         type = TML; \
52     else if ( ucs >= 0x0c00 && ucs <= 0x0c7f ) \
53         type = TLG; \
54     else if ( ucs >= 0x0c80 && ucs <= 0x0cff ) \
55         type = KND; \
56     else if ( ucs >= 0x0d00 && ucs <= 0x0d7f ) \
57         type = MLM; \
58     else \
59         type = NUM_ISCII;
60 
61 ISCII isc_TYPE[] = {
62     DEV, /* 0x42 */
63     BNG, /* 0x43 */
64     TML, /* 0x44 */
65     TLG, /* 0x45 */
66     NUM_ISCII,/* 0x46 */
67     ORI, /* 0x47 */
68     KND, /* 0x48 */
69     MLM, /* 0x49 */
70     GJR, /* 0x4a */
71     GMK  /* 0x4b */
72 };
73 
74 int aTRs[NUM_ISCII] = {
75     0x42, /* Devanagiri */
76     0x43, /* Bengali */
77     0x4b, /* Gurumukhi */
78     0x4a, /* Gujarati */
79     0x47, /* Oriya */
80     0x44, /* Tamil */
81     0x45, /* Telugu */
82     0x48, /* Kannada */
83     0x49 /* Malayalam */
84 };
85 
86 typedef struct _Entries {
87      Entry *entry;
88      int   items;
89 } Entries;
90 
91 Entries iscii_table[NUM_ISCII]= {
92      { Devanagari_isc, sizeof(Devanagari_isc)/sizeof(Entry) },
93      { Bengali_isc,  sizeof(Bengali_isc)/sizeof(Entry) },
94      { Gurmukhi_isc,  sizeof(Gurmukhi_isc)/sizeof(Entry) },
95      { Gujarati_isc,  sizeof(Gujarati_isc)/sizeof(Entry) },
96      { Oriya_isc,  sizeof(Oriya_isc)/sizeof(Entry) },
97      { Tamil_isc,  sizeof(Tamil_isc)/sizeof(Entry) },
98      { Telugu_isc,  sizeof(Telugu_isc)/sizeof(Entry) },
99      { Kannada_isc,  sizeof(Kannada_isc)/sizeof(Entry) },
100      { Malayalam_isc,  sizeof(Malayalam_isc)/sizeof(Entry) }
101 };
102 
103 Entries unicode_table[NUM_ISCII]= {
104      { Devanagari_uni, sizeof(Devanagari_uni)/sizeof(Entry) },
105      { Bengali_uni,  sizeof(Bengali_uni)/sizeof(Entry) },
106      { Gurmukhi_uni,  sizeof(Gurmukhi_uni)/sizeof(Entry) },
107      { Gujarati_uni,  sizeof(Gujarati_uni)/sizeof(Entry) },
108      { Oriya_uni,  sizeof(Oriya_uni)/sizeof(Entry) },
109      { Tamil_uni,  sizeof(Tamil_uni)/sizeof(Entry) },
110      { Telugu_uni,  sizeof(Telugu_uni)/sizeof(Entry) },
111      { Kannada_uni,  sizeof(Kannada_uni)/sizeof(Entry) },
112      { Malayalam_uni,  sizeof(Malayalam_uni)/sizeof(Entry) }
113 };
114 
115 int *nukta_type[NUM_ISCII] = {
116     Devanagari_nukta_type,
117     Bengali_nukta_type,
118     Gurmukhi_nukta_type,
119     NULL,
120     Oriya_nukta_type,
121     NULL,
122     NULL,
123     NULL,
124     NULL
125 };
126 
127 int *EXT_type[NUM_ISCII] = {
128     Devanagari_EXT_type,
129     NULL,
130     NULL,
131     NULL,
132     NULL,
133     NULL,
134     NULL,
135     NULL,
136     NULL
137 };
138 #endif
139