42 #define UCDATA_VERSION "2.4"
54 #define UC_MN 0x00000001
55 #define UC_MC 0x00000002
56 #define UC_ME 0x00000004
57 #define UC_ND 0x00000008
58 #define UC_NL 0x00000010
59 #define UC_NO 0x00000020
60 #define UC_ZS 0x00000040
61 #define UC_ZL 0x00000080
62 #define UC_ZP 0x00000100
63 #define UC_CC 0x00000200
64 #define UC_CF 0x00000400
65 #define UC_OS 0x00000800
66 #define UC_CO 0x00001000
67 #define UC_CN 0x00002000
68 #define UC_LU 0x00004000
69 #define UC_LL 0x00008000
70 #define UC_LT 0x00010000
71 #define UC_LM 0x00020000
72 #define UC_LO 0x00040000
73 #define UC_PC 0x00080000
74 #define UC_PD 0x00100000
75 #define UC_PS 0x00200000
76 #define UC_PE 0x00400000
77 #define UC_PO 0x00800000
78 #define UC_SM 0x01000000
79 #define UC_SC 0x02000000
80 #define UC_SK 0x04000000
81 #define UC_SO 0x08000000
82 #define UC_L 0x10000000
83 #define UC_R 0x20000000
84 #define UC_EN 0x40000000
85 #define UC_ES 0x80000000
91 #define UC_ET 0x00000001
92 #define UC_AN 0x00000002
93 #define UC_CS 0x00000004
94 #define UC_B 0x00000008
95 #define UC_S 0x00000010
96 #define UC_WS 0x00000020
97 #define UC_ON 0x00000040
101 #define UC_CM 0x00000080
102 #define UC_NB 0x00000100
103 #define UC_SY 0x00000200
104 #define UC_HD 0x00000400
105 #define UC_QM 0x00000800
106 #define UC_MR 0x00001000
107 #define UC_SS 0x00002000
109 #define UC_CP 0x00004000
114 #define UC_PI 0x00008000
115 #define UC_PF 0x00010000
122 LDAP_LUNICODE_F (
int)
123 ucisprop LDAP_P((ac_uint4 code, ac_uint4 mask1, ac_uint4 mask2));
125 #define ucisalpha(cc) ucisprop(cc, UC_LU|UC_LL|UC_LM|UC_LO|UC_LT, 0)
126 #define ucisdigit(cc) ucisprop(cc, UC_ND, 0)
127 #define ucisalnum(cc) ucisprop(cc, UC_LU|UC_LL|UC_LM|UC_LO|UC_LT|UC_ND, 0)
128 #define uciscntrl(cc) ucisprop(cc, UC_CC|UC_CF, 0)
129 #define ucisspace(cc) ucisprop(cc, UC_ZS|UC_SS, 0)
130 #define ucisblank(cc) ucisprop(cc, UC_ZS, 0)
131 #define ucispunct(cc) ucisprop(cc, UC_PD|UC_PS|UC_PE|UC_PO, UC_PI|UC_PF)
132 #define ucisgraph(cc) ucisprop(cc, UC_MN|UC_MC|UC_ME|UC_ND|UC_NL|UC_NO|\
133 UC_LU|UC_LL|UC_LT|UC_LM|UC_LO|UC_PC|UC_PD|\
134 UC_PS|UC_PE|UC_PO|UC_SM|UC_SM|UC_SC|UC_SK|\
136 #define ucisprint(cc) ucisprop(cc, UC_MN|UC_MC|UC_ME|UC_ND|UC_NL|UC_NO|\
137 UC_LU|UC_LL|UC_LT|UC_LM|UC_LO|UC_PC|UC_PD|\
138 UC_PS|UC_PE|UC_PO|UC_SM|UC_SM|UC_SC|UC_SK|\
139 UC_SO|UC_ZS, UC_PI|UC_PF)
140 #define ucisupper(cc) ucisprop(cc, UC_LU, 0)
141 #define ucislower(cc) ucisprop(cc, UC_LL, 0)
142 #define ucistitle(cc) ucisprop(cc, UC_LT, 0)
143 #define ucisxdigit(cc) ucisprop(cc, 0, UC_HD)
145 #define ucisisocntrl(cc) ucisprop(cc, UC_CC, 0)
146 #define ucisfmtcntrl(cc) ucisprop(cc, UC_CF, 0)
148 #define ucissymbol(cc) ucisprop(cc, UC_SM|UC_SC|UC_SO|UC_SK, 0)
149 #define ucisnumber(cc) ucisprop(cc, UC_ND|UC_NO|UC_NL, 0)
150 #define ucisnonspacing(cc) ucisprop(cc, UC_MN, 0)
151 #define ucisopenpunct(cc) ucisprop(cc, UC_PS, 0)
152 #define ucisclosepunct(cc) ucisprop(cc, UC_PE, 0)
153 #define ucisinitialpunct(cc) ucisprop(cc, 0, UC_PI)
154 #define ucisfinalpunct(cc) ucisprop(cc, 0, UC_PF)
156 #define uciscomposite(cc) ucisprop(cc, 0, UC_CM)
157 #define ucishex(cc) ucisprop(cc, 0, UC_HD)
158 #define ucisquote(cc) ucisprop(cc, 0, UC_QM)
159 #define ucissymmetric(cc) ucisprop(cc, 0, UC_SY)
160 #define ucismirroring(cc) ucisprop(cc, 0, UC_MR)
161 #define ucisnonbreaking(cc) ucisprop(cc, 0, UC_NB)
166 #define ucisrtl(cc) ucisprop(cc, UC_R, 0)
167 #define ucisltr(cc) ucisprop(cc, UC_L, 0)
168 #define ucisstrong(cc) ucisprop(cc, UC_L|UC_R, 0)
169 #define ucisweak(cc) ucisprop(cc, UC_EN|UC_ES, UC_ET|UC_AN|UC_CS)
170 #define ucisneutral(cc) ucisprop(cc, 0, UC_B|UC_S|UC_WS|UC_ON)
171 #define ucisseparator(cc) ucisprop(cc, 0, UC_B|UC_S)
176 #define ucismark(cc) ucisprop(cc, UC_MN|UC_MC|UC_ME, 0)
177 #define ucismodif(cc) ucisprop(cc, UC_LM, 0)
178 #define ucisletnum(cc) ucisprop(cc, UC_NL, 0)
179 #define ucisconnect(cc) ucisprop(cc, UC_PC, 0)
180 #define ucisdash(cc) ucisprop(cc, UC_PD, 0)
181 #define ucismath(cc) ucisprop(cc, UC_SM, 0)
182 #define uciscurrency(cc) ucisprop(cc, UC_SC, 0)
183 #define ucismodifsymbol(cc) ucisprop(cc, UC_SK, 0)
184 #define ucisnsmark(cc) ucisprop(cc, UC_MN, 0)
185 #define ucisspmark(cc) ucisprop(cc, UC_MC, 0)
186 #define ucisenclosing(cc) ucisprop(cc, UC_ME, 0)
187 #define ucisprivate(cc) ucisprop(cc, UC_CO, 0)
188 #define ucissurrogate(cc) ucisprop(cc, UC_OS, 0)
189 #define ucislsep(cc) ucisprop(cc, UC_ZL, 0)
190 #define ucispsep(cc) ucisprop(cc, UC_ZP, 0)
192 #define ucisidentstart(cc) ucisprop(cc, UC_LU|UC_LL|UC_LT|UC_LO|UC_NL, 0)
193 #define ucisidentpart(cc) ucisprop(cc, UC_LU|UC_LL|UC_LT|UC_LO|UC_NL|\
194 UC_MN|UC_MC|UC_ND|UC_PC|UC_CF, 0)
196 #define ucisdefined(cc) ucisprop(cc, 0, UC_CP)
197 #define ucisundefined(cc) !ucisprop(cc, 0, UC_CP)
202 #define ucishan(cc) (((cc) >= 0x4e00 && (cc) <= 0x9fff) ||\
203 ((cc) >= 0xf900 && (cc) <= 0xfaff))
204 #define ucishangul(cc) ((cc) >= 0xac00 && (cc) <= 0xd7ff)
212 LDAP_LUNICODE_F (ac_uint4) uctoupper LDAP_P((ac_uint4 code));
213 LDAP_LUNICODE_F (ac_uint4) uctolower LDAP_P((ac_uint4 code));
214 LDAP_LUNICODE_F (ac_uint4) uctotitle LDAP_P((ac_uint4 code));
227 LDAP_LUNICODE_F (
int) uccomp LDAP_P((ac_uint4 node1, ac_uint4 node2,
234 LDAP_LUNICODE_F (
int) uccomp_hangul LDAP_P((ac_uint4 *str,
int len));
240 LDAP_LUNICODE_F (
int) uccanoncomp LDAP_P((ac_uint4 *str,
int len));
253 LDAP_LUNICODE_F (
int)
254 ucdecomp LDAP_P((ac_uint4 code, ac_uint4 *num,
261 LDAP_LUNICODE_F (
int)
262 uckdecomp LDAP_P((ac_uint4 code, ac_uint4 *num,
269 LDAP_LUNICODE_F (
int)
270 ucdecomp_hangul LDAP_P((ac_uint4 code, ac_uint4 *num,
279 LDAP_LUNICODE_F (
int)
280 uccanondecomp LDAP_P((const ac_uint4 *in,
int inlen,
281 ac_uint4 **out,
int *outlen,
void *ctx));
287 LDAP_LUNICODE_F (
int)
288 uccompatdecomp LDAP_P((const ac_uint4 *in,
int inlen,
289 ac_uint4 **out,
int *outlen,
void *ctx));
301 LDAP_LUNICODE_F (ac_uint4) uccombining_class LDAP_P((ac_uint4 code));
314 LDAP_LUNICODE_F (
int)
315 ucnumber_lookup LDAP_P((ac_uint4 code, struct
ucnumber *num));
317 LDAP_LUNICODE_F (
int)
318 ucdigit_lookup LDAP_P((ac_uint4 code,
int *digit));
323 LDAP_LUNICODE_F (struct
ucnumber) ucgetnumber LDAP_P((ac_uint4 code));
324 LDAP_LUNICODE_F (
int) ucgetdigit LDAP_P((ac_uint4 code));
336 #define UCDATA_CASE 0x01
337 #define UCDATA_CTYPE 0x02
338 #define UCDATA_DECOMP 0x04
339 #define UCDATA_CMBCL 0x08
340 #define UCDATA_NUM 0x10
341 #define UCDATA_COMP 0x20
342 #define UCDATA_KDECOMP 0x40
344 #define UCDATA_ALL (UCDATA_CASE|UCDATA_CTYPE|UCDATA_DECOMP|\
345 UCDATA_CMBCL|UCDATA_NUM|UCDATA_COMP|UCDATA_KDECOMP)
350 LDAP_LUNICODE_F (
int) ucdata_load LDAP_P((
char *paths,
int mask));
351 LDAP_LUNICODE_F (
void) ucdata_unload LDAP_P((
int mask));
352 LDAP_LUNICODE_F (
int) ucdata_reload LDAP_P((
char *paths,
int mask));
354 #ifdef UCDATA_DEPRECATED
358 #define ucdata_setup(p) ucdata_load(p, UCDATA_ALL)
359 #define ucdata_cleanup() ucdata_unload(UCDATA_ALL)