This source file includes following definitions.
- uc_combining_class_long_name
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26 #include <config.h>
27
28
29 #include "unictype.h"
30
31 #include <stdlib.h>
32
33 static const signed char u_combining_class_index_part1[10] =
34 {
35 0,
36 1,
37 -1,
38 -1,
39 -1,
40 -1,
41 -1,
42 2,
43 3,
44 4
45 };
46 static const signed char u_combining_class_index_part2[241 - 200] =
47 {
48 5,
49 -1,
50 6,
51 -1,
52 -1,
53 -1,
54 -1,
55 -1,
56 -1,
57 -1,
58 -1,
59 -1,
60 -1,
61 -1,
62 7,
63 -1,
64 8,
65 -1,
66 9,
67 -1,
68 10,
69 -1,
70 11,
71 -1,
72 12,
73 -1,
74 13,
75 -1,
76 14,
77 -1,
78 15,
79 -1,
80 16,
81 17,
82 18,
83 -1,
84 -1,
85 -1,
86 -1,
87 -1,
88 19
89 };
90
91 static const char u_combining_class_long_name[20][21] =
92 {
93 "Not Reordered",
94 "Overlay",
95 "Nukta",
96 "Kana Voicing",
97 "Virama",
98 "Attached Below Left",
99 "Attached Below",
100 "Attached Above",
101 "Attached Above Right",
102 "Below Left",
103 "Below",
104 "Below Right",
105 "Left",
106 "Right",
107 "Above Left",
108 "Above",
109 "Above Right",
110 "Double Below",
111 "Double Above",
112 "Iota Subscript"
113 };
114
115 const char *
116 uc_combining_class_long_name (int ccc)
117 {
118 if (ccc >= 0)
119 {
120 int index;
121
122 if (ccc < 10)
123 index = u_combining_class_index_part1[ccc];
124 else if (ccc >= 200 && ccc < 241)
125 index = u_combining_class_index_part2[ccc - 200];
126 else
127 return NULL;
128
129 if (index >= 0)
130 {
131 if (index < sizeof (u_combining_class_long_name) / sizeof (u_combining_class_long_name[0]))
132 return u_combining_class_long_name[index];
133 else
134 abort ();
135 }
136 }
137 return NULL;
138 }