Debian Codegraph @

lib/unictype.in.h

raw
1 /* Unicode character classification and properties.
2 Copyright (C) 2002, 2005-2026 Free Software Foundation, Inc.
3
4 This file is free software: you can redistribute it and/or modify
5 it under the terms of the GNU Lesser General Public License as
6 published by the Free Software Foundation; either version 2.1 of the
7 License, or (at your option) any later version.
8
9 This file is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU Lesser General Public License for more details.
13
14 You should have received a copy of the GNU Lesser General Public License
15 along with this program. If not, see <https://www.gnu.org/licenses/>. */
16
17 #ifndef _UNICTYPE_H
18 #define _UNICTYPE_H
19
20 #include "unitypes.h"
21
22 /* Get bool. */
23 #include <stdbool.h>
24
25 /* Get size_t. */
26 #include <stddef.h>
27
28 #if @HAVE_UNISTRING_WOE32DLL_H@
29 # include <unistring/woe32dll.h>
30 #else
31 # define LIBUNISTRING_DLL_VARIABLE
32 #endif
33
34 #ifdef __cplusplus
35 extern "C" {
36 #endif
37
38 /* ========================================================================= */
39
40 /* Field 1 of Unicode Character Database: Character name.
41 See "uniname.h". */
42
43 /* ========================================================================= */
44
45 /* Field 2 of Unicode Character Database: General category. */
46
47 /* Data type denoting a General category value. This is not just a bitmask,
48 but rather a bitmask and a pointer to the lookup table, so that programs
49 that use only the predefined bitmasks (i.e. don't combine bitmasks with &
50 and |) don't have a link-time dependency towards the big general table. */
51 typedef struct
52 {
53 uint32_t bitmask : 31;
54 /*bool*/ unsigned int generic : 1;
55 union
56 {
57 const void *table; /* when generic is 0 */
58 bool (*lookup_fn) (ucs4_t uc, uint32_t bitmask); /* when generic is 1 */
59 } lookup;
60 }
61 uc_general_category_t;
62
63 /* Bits and bit masks denoting General category values. UnicodeData-3.2.0.html
64 says a 32-bit integer will always suffice to represent them.
65 These bit masks can only be used with the uc_is_general_category_withtable
66 function. */
67 enum
68 {
69 UC_CATEGORY_MASK_L = 0x0000001f,
70 UC_CATEGORY_MASK_LC = 0x00000007,
71 UC_CATEGORY_MASK_Lu = 0x00000001,
72 UC_CATEGORY_MASK_Ll = 0x00000002,
73 UC_CATEGORY_MASK_Lt = 0x00000004,
74 UC_CATEGORY_MASK_Lm = 0x00000008,
75 UC_CATEGORY_MASK_Lo = 0x00000010,
76 UC_CATEGORY_MASK_M = 0x000000e0,
77 UC_CATEGORY_MASK_Mn = 0x00000020,
78 UC_CATEGORY_MASK_Mc = 0x00000040,
79 UC_CATEGORY_MASK_Me = 0x00000080,
80 UC_CATEGORY_MASK_N = 0x00000700,
81 UC_CATEGORY_MASK_Nd = 0x00000100,
82 UC_CATEGORY_MASK_Nl = 0x00000200,
83 UC_CATEGORY_MASK_No = 0x00000400,
84 UC_CATEGORY_MASK_P = 0x0003f800,
85 UC_CATEGORY_MASK_Pc = 0x00000800,
86 UC_CATEGORY_MASK_Pd = 0x00001000,
87 UC_CATEGORY_MASK_Ps = 0x00002000,
88 UC_CATEGORY_MASK_Pe = 0x00004000,
89 UC_CATEGORY_MASK_Pi = 0x00008000,
90 UC_CATEGORY_MASK_Pf = 0x00010000,
91 UC_CATEGORY_MASK_Po = 0x00020000,
92 UC_CATEGORY_MASK_S = 0x003c0000,
93 UC_CATEGORY_MASK_Sm = 0x00040000,
94 UC_CATEGORY_MASK_Sc = 0x00080000,
95 UC_CATEGORY_MASK_Sk = 0x00100000,
96 UC_CATEGORY_MASK_So = 0x00200000,
97 UC_CATEGORY_MASK_Z = 0x01c00000,
98 UC_CATEGORY_MASK_Zs = 0x00400000,
99 UC_CATEGORY_MASK_Zl = 0x00800000,
100 UC_CATEGORY_MASK_Zp = 0x01000000,
101 UC_CATEGORY_MASK_C = 0x3e000000,
102 UC_CATEGORY_MASK_Cc = 0x02000000,
103 UC_CATEGORY_MASK_Cf = 0x04000000,
104 UC_CATEGORY_MASK_Cs = 0x08000000,
105 UC_CATEGORY_MASK_Co = 0x10000000,
106 UC_CATEGORY_MASK_Cn = 0x20000000
107 };
108
109 /* Predefined General category values. */
110 extern @GNULIB_UNICTYPE_CATEGORY_L_DLL_VARIABLE@ const uc_general_category_t UC_CATEGORY_L;
111 extern @GNULIB_UNICTYPE_CATEGORY_LC_DLL_VARIABLE@ const uc_general_category_t UC_CATEGORY_LC;
112 extern @GNULIB_UNICTYPE_CATEGORY_LU_DLL_VARIABLE@ const uc_general_category_t UC_CATEGORY_Lu;
113 extern @GNULIB_UNICTYPE_CATEGORY_LL_DLL_VARIABLE@ const uc_general_category_t UC_CATEGORY_Ll;
114 extern @GNULIB_UNICTYPE_CATEGORY_LT_DLL_VARIABLE@ const uc_general_category_t UC_CATEGORY_Lt;
115 extern @GNULIB_UNICTYPE_CATEGORY_LM_DLL_VARIABLE@ const uc_general_category_t UC_CATEGORY_Lm;
116 extern @GNULIB_UNICTYPE_CATEGORY_LO_DLL_VARIABLE@ const uc_general_category_t UC_CATEGORY_Lo;
117 extern @GNULIB_UNICTYPE_CATEGORY_M_DLL_VARIABLE@ const uc_general_category_t UC_CATEGORY_M;
118 extern @GNULIB_UNICTYPE_CATEGORY_MN_DLL_VARIABLE@ const uc_general_category_t UC_CATEGORY_Mn;
119 extern @GNULIB_UNICTYPE_CATEGORY_MC_DLL_VARIABLE@ const uc_general_category_t UC_CATEGORY_Mc;
120 extern @GNULIB_UNICTYPE_CATEGORY_ME_DLL_VARIABLE@ const uc_general_category_t UC_CATEGORY_Me;
121 extern @GNULIB_UNICTYPE_CATEGORY_N_DLL_VARIABLE@ const uc_general_category_t UC_CATEGORY_N;
122 extern @GNULIB_UNICTYPE_CATEGORY_ND_DLL_VARIABLE@ const uc_general_category_t UC_CATEGORY_Nd;
123 extern @GNULIB_UNICTYPE_CATEGORY_NL_DLL_VARIABLE@ const uc_general_category_t UC_CATEGORY_Nl;
124 extern @GNULIB_UNICTYPE_CATEGORY_NO_DLL_VARIABLE@ const uc_general_category_t UC_CATEGORY_No;
125 extern @GNULIB_UNICTYPE_CATEGORY_P_DLL_VARIABLE@ const uc_general_category_t UC_CATEGORY_P;
126 extern @GNULIB_UNICTYPE_CATEGORY_PC_DLL_VARIABLE@ const uc_general_category_t UC_CATEGORY_Pc;
127 extern @GNULIB_UNICTYPE_CATEGORY_PD_DLL_VARIABLE@ const uc_general_category_t UC_CATEGORY_Pd;
128 extern @GNULIB_UNICTYPE_CATEGORY_PS_DLL_VARIABLE@ const uc_general_category_t UC_CATEGORY_Ps;
129 extern @GNULIB_UNICTYPE_CATEGORY_PE_DLL_VARIABLE@ const uc_general_category_t UC_CATEGORY_Pe;
130 extern @GNULIB_UNICTYPE_CATEGORY_PI_DLL_VARIABLE@ const uc_general_category_t UC_CATEGORY_Pi;
131 extern @GNULIB_UNICTYPE_CATEGORY_PF_DLL_VARIABLE@ const uc_general_category_t UC_CATEGORY_Pf;
132 extern @GNULIB_UNICTYPE_CATEGORY_PO_DLL_VARIABLE@ const uc_general_category_t UC_CATEGORY_Po;
133 extern @GNULIB_UNICTYPE_CATEGORY_S_DLL_VARIABLE@ const uc_general_category_t UC_CATEGORY_S;
134 extern @GNULIB_UNICTYPE_CATEGORY_SM_DLL_VARIABLE@ const uc_general_category_t UC_CATEGORY_Sm;
135 extern @GNULIB_UNICTYPE_CATEGORY_SC_DLL_VARIABLE@ const uc_general_category_t UC_CATEGORY_Sc;
136 extern @GNULIB_UNICTYPE_CATEGORY_SK_DLL_VARIABLE@ const uc_general_category_t UC_CATEGORY_Sk;
137 extern @GNULIB_UNICTYPE_CATEGORY_SO_DLL_VARIABLE@ const uc_general_category_t UC_CATEGORY_So;
138 extern @GNULIB_UNICTYPE_CATEGORY_Z_DLL_VARIABLE@ const uc_general_category_t UC_CATEGORY_Z;
139 extern @GNULIB_UNICTYPE_CATEGORY_ZS_DLL_VARIABLE@ const uc_general_category_t UC_CATEGORY_Zs;
140 extern @GNULIB_UNICTYPE_CATEGORY_ZL_DLL_VARIABLE@ const uc_general_category_t UC_CATEGORY_Zl;
141 extern @GNULIB_UNICTYPE_CATEGORY_ZP_DLL_VARIABLE@ const uc_general_category_t UC_CATEGORY_Zp;
142 extern @GNULIB_UNICTYPE_CATEGORY_C_DLL_VARIABLE@ const uc_general_category_t UC_CATEGORY_C;
143 extern @GNULIB_UNICTYPE_CATEGORY_CC_DLL_VARIABLE@ const uc_general_category_t UC_CATEGORY_Cc;
144 extern @GNULIB_UNICTYPE_CATEGORY_CF_DLL_VARIABLE@ const uc_general_category_t UC_CATEGORY_Cf;
145 extern @GNULIB_UNICTYPE_CATEGORY_CS_DLL_VARIABLE@ const uc_general_category_t UC_CATEGORY_Cs;
146 extern @GNULIB_UNICTYPE_CATEGORY_CO_DLL_VARIABLE@ const uc_general_category_t UC_CATEGORY_Co;
147 extern @GNULIB_UNICTYPE_CATEGORY_CN_DLL_VARIABLE@ const uc_general_category_t UC_CATEGORY_Cn;
148 /* Non-public. */
149 extern const uc_general_category_t _UC_CATEGORY_NONE;
150
151 /* Alias names for predefined General category values. */
152 #define UC_LETTER UC_CATEGORY_L
153 #define UC_CASED_LETTER UC_CATEGORY_LC
154 #define UC_UPPERCASE_LETTER UC_CATEGORY_Lu
155 #define UC_LOWERCASE_LETTER UC_CATEGORY_Ll
156 #define UC_TITLECASE_LETTER UC_CATEGORY_Lt
157 #define UC_MODIFIER_LETTER UC_CATEGORY_Lm
158 #define UC_OTHER_LETTER UC_CATEGORY_Lo
159 #define UC_MARK UC_CATEGORY_M
160 #define UC_NON_SPACING_MARK UC_CATEGORY_Mn
161 #define UC_COMBINING_SPACING_MARK UC_CATEGORY_Mc
162 #define UC_ENCLOSING_MARK UC_CATEGORY_Me
163 #define UC_NUMBER UC_CATEGORY_N
164 #define UC_DECIMAL_DIGIT_NUMBER UC_CATEGORY_Nd
165 #define UC_LETTER_NUMBER UC_CATEGORY_Nl
166 #define UC_OTHER_NUMBER UC_CATEGORY_No
167 #define UC_PUNCTUATION UC_CATEGORY_P
168 #define UC_CONNECTOR_PUNCTUATION UC_CATEGORY_Pc
169 #define UC_DASH_PUNCTUATION UC_CATEGORY_Pd
170 #define UC_OPEN_PUNCTUATION UC_CATEGORY_Ps /* a.k.a. UC_START_PUNCTUATION */
171 #define UC_CLOSE_PUNCTUATION UC_CATEGORY_Pe /* a.k.a. UC_END_PUNCTUATION */
172 #define UC_INITIAL_QUOTE_PUNCTUATION UC_CATEGORY_Pi
173 #define UC_FINAL_QUOTE_PUNCTUATION UC_CATEGORY_Pf
174 #define UC_OTHER_PUNCTUATION UC_CATEGORY_Po
175 #define UC_SYMBOL UC_CATEGORY_S
176 #define UC_MATH_SYMBOL UC_CATEGORY_Sm
177 #define UC_CURRENCY_SYMBOL UC_CATEGORY_Sc
178 #define UC_MODIFIER_SYMBOL UC_CATEGORY_Sk
179 #define UC_OTHER_SYMBOL UC_CATEGORY_So
180 #define UC_SEPARATOR UC_CATEGORY_Z
181 #define UC_SPACE_SEPARATOR UC_CATEGORY_Zs
182 #define UC_LINE_SEPARATOR UC_CATEGORY_Zl
183 #define UC_PARAGRAPH_SEPARATOR UC_CATEGORY_Zp
184 #define UC_OTHER UC_CATEGORY_C
185 #define UC_CONTROL UC_CATEGORY_Cc
186 #define UC_FORMAT UC_CATEGORY_Cf
187 #define UC_SURROGATE UC_CATEGORY_Cs /* all of them are invalid characters */
188 #define UC_PRIVATE_USE UC_CATEGORY_Co
189 #define UC_UNASSIGNED UC_CATEGORY_Cn /* some of them are invalid characters */
190
191 /* Return the union of two general categories.
192 This corresponds to the unions of the two sets of characters. */
193 extern uc_general_category_t
194 uc_general_category_or (uc_general_category_t category1,
195 uc_general_category_t category2);
196
197 /* Return the intersection of two general categories as bit masks.
198 This *does*not* correspond to the intersection of the two sets of
199 characters. */
200 extern uc_general_category_t
201 uc_general_category_and (uc_general_category_t category1,
202 uc_general_category_t category2);
203
204 /* Return the intersection of a general category with the complement of a
205 second general category, as bit masks.
206 This *does*not* correspond to the intersection with complement, when
207 viewing the categories as sets of characters. */
208 extern uc_general_category_t
209 uc_general_category_and_not (uc_general_category_t category1,
210 uc_general_category_t category2);
211
212 /* Return the name of a general category. */
213 extern const char *
214 uc_general_category_name (uc_general_category_t category)
215 _UC_ATTRIBUTE_PURE;
216
217 /* Return the long name of a general category. */
218 extern const char *
219 uc_general_category_long_name (uc_general_category_t category)
220 _UC_ATTRIBUTE_PURE;
221
222 /* Return the general category given by name, e.g. "Lu", or by long name,
223 e.g. "Uppercase Letter". */
224 extern uc_general_category_t
225 uc_general_category_byname (const char *category_name)
226 _UC_ATTRIBUTE_PURE;
227
228 /* Return the general category of a Unicode character. */
229 extern uc_general_category_t
230 uc_general_category (ucs4_t uc)
231 _UC_ATTRIBUTE_PURE;
232
233 /* Test whether a Unicode character belongs to a given category.
234 The CATEGORY argument can be the combination of several predefined
235 general categories. */
236 extern bool
237 uc_is_general_category (ucs4_t uc, uc_general_category_t category)
238 _UC_ATTRIBUTE_PURE;
239 /* Likewise. This function uses a big table comprising all categories. */
240 extern bool
241 uc_is_general_category_withtable (ucs4_t uc, uint32_t bitmask)
242 _UC_ATTRIBUTE_CONST;
243
244 /* ========================================================================= */
245
246 /* Field 3 of Unicode Character Database: Canonical combining class. */
247
248 /* The possible results of uc_combining_class (0..255) are described in
249 UCD.html. The list here is not definitive; more values can be added
250 in future versions. */
251 enum
252 {
253 UC_CCC_NR = 0, /* Not Reordered */
254 UC_CCC_OV = 1, /* Overlay */
255 UC_CCC_NK = 7, /* Nukta */
256 UC_CCC_KV = 8, /* Kana Voicing */
257 UC_CCC_VR = 9, /* Virama */
258 UC_CCC_ATBL = 200, /* Attached Below Left */
259 UC_CCC_ATB = 202, /* Attached Below */
260 UC_CCC_ATA = 214, /* Attached Above */
261 UC_CCC_ATAR = 216, /* Attached Above Right */
262 UC_CCC_BL = 218, /* Below Left */
263 UC_CCC_B = 220, /* Below */
264 UC_CCC_BR = 222, /* Below Right */
265 UC_CCC_L = 224, /* Left */
266 UC_CCC_R = 226, /* Right */
267 UC_CCC_AL = 228, /* Above Left */
268 UC_CCC_A = 230, /* Above */
269 UC_CCC_AR = 232, /* Above Right */
270 UC_CCC_DB = 233, /* Double Below */
271 UC_CCC_DA = 234, /* Double Above */
272 UC_CCC_IS = 240 /* Iota Subscript */
273 };
274
275 /* Return the canonical combining class of a Unicode character. */
276 extern int
277 uc_combining_class (ucs4_t uc)
278 _UC_ATTRIBUTE_CONST;
279
280 /* Return the name of a canonical combining class. */
281 extern const char *
282 uc_combining_class_name (int ccc)
283 _UC_ATTRIBUTE_CONST;
284
285 /* Return the long name of a canonical combining class. */
286 extern const char *
287 uc_combining_class_long_name (int ccc)
288 _UC_ATTRIBUTE_CONST;
289
290 /* Return the canonical combining class given by name, e.g. "BL", or by long
291 name, e.g. "Below Left". */
292 extern int
293 uc_combining_class_byname (const char *ccc_name)
294 _UC_ATTRIBUTE_PURE;
295
296 /* ========================================================================= */
297
298 /* Field 4 of Unicode Character Database: Bidi class.
299 Before Unicode 4.0, this field was called "Bidirectional category". */
300
301 enum
302 {
303 UC_BIDI_L, /* Left-to-Right */
304 UC_BIDI_LRE, /* Left-to-Right Embedding */
305 UC_BIDI_LRO, /* Left-to-Right Override */
306 UC_BIDI_R, /* Right-to-Left */
307 UC_BIDI_AL, /* Right-to-Left Arabic */
308 UC_BIDI_RLE, /* Right-to-Left Embedding */
309 UC_BIDI_RLO, /* Right-to-Left Override */
310 UC_BIDI_PDF, /* Pop Directional Format */
311 UC_BIDI_EN, /* European Number */
312 UC_BIDI_ES, /* European Number Separator */
313 UC_BIDI_ET, /* European Number Terminator */
314 UC_BIDI_AN, /* Arabic Number */
315 UC_BIDI_CS, /* Common Number Separator */
316 UC_BIDI_NSM, /* Non-Spacing Mark */
317 UC_BIDI_BN, /* Boundary Neutral */
318 UC_BIDI_B, /* Paragraph Separator */
319 UC_BIDI_S, /* Segment Separator */
320 UC_BIDI_WS, /* Whitespace */
321 UC_BIDI_ON, /* Other Neutral */
322 UC_BIDI_LRI, /* Left-to-Right Isolate */
323 UC_BIDI_RLI, /* Right-to-Left Isolate */
324 UC_BIDI_FSI, /* First Strong Isolate */
325 UC_BIDI_PDI /* Pop Directional Isolate */
326 };
327
328 /* Return the name of a bidi class. */
329 extern const char *
330 uc_bidi_class_name (int bidi_class)
331 _UC_ATTRIBUTE_CONST;
332 /* Same; obsolete function name. */
333 extern const char *
334 uc_bidi_category_name (int category)
335 _UC_ATTRIBUTE_CONST;
336
337 /* Return the long name of a bidi class. */
338 extern const char *
339 uc_bidi_class_long_name (int bidi_class)
340 _UC_ATTRIBUTE_CONST;
341
342 /* Return the bidi class given by name, e.g. "LRE", or by long name, e.g.
343 "Left-to-Right Embedding". */
344 extern int
345 uc_bidi_class_byname (const char *bidi_class_name)
346 _UC_ATTRIBUTE_PURE;
347 /* Same; obsolete function name. */
348 extern int
349 uc_bidi_category_byname (const char *category_name)
350 _UC_ATTRIBUTE_PURE;
351
352 /* Return the bidi class of a Unicode character. */
353 extern int
354 uc_bidi_class (ucs4_t uc)
355 _UC_ATTRIBUTE_CONST;
356 /* Same; obsolete function name. */
357 extern int
358 uc_bidi_category (ucs4_t uc)
359 _UC_ATTRIBUTE_CONST;
360
361 /* Test whether a Unicode character belongs to a given bidi class. */
362 extern bool
363 uc_is_bidi_class (ucs4_t uc, int bidi_class)
364 _UC_ATTRIBUTE_CONST;
365 /* Same; obsolete function name. */
366 extern bool
367 uc_is_bidi_category (ucs4_t uc, int category)
368 _UC_ATTRIBUTE_CONST;
369
370 /* ========================================================================= */
371
372 /* Field 5 of Unicode Character Database: Character decomposition mapping.
373 See "uninorm.h". */
374
375 /* ========================================================================= */
376
377 /* Field 6 of Unicode Character Database: Decimal digit value. */
378
379 /* Return the decimal digit value of a Unicode character. */
380 extern int
381 uc_decimal_value (ucs4_t uc)
382 _UC_ATTRIBUTE_CONST;
383
384 /* ========================================================================= */
385
386 /* Field 7 of Unicode Character Database: Digit value. */
387
388 /* Return the digit value of a Unicode character. */
389 extern int
390 uc_digit_value (ucs4_t uc)
391 _UC_ATTRIBUTE_CONST;
392
393 /* ========================================================================= */
394
395 /* Field 8 of Unicode Character Database: Numeric value. */
396
397 /* Return the numeric value of a Unicode character. */
398 typedef struct
399 {
400 int numerator;
401 int denominator;
402 }
403 uc_fraction_t;
404 extern uc_fraction_t
405 uc_numeric_value (ucs4_t uc)
406 _UC_ATTRIBUTE_CONST;
407
408 /* ========================================================================= */
409
410 /* Field 9 of Unicode Character Database: Mirrored. */
411
412 /* Return the mirrored character of a Unicode character UC in *PUC. */
413 extern bool
414 uc_mirror_char (ucs4_t uc, ucs4_t *puc);
415
416 /* ========================================================================= */
417
418 /* Field 10 of Unicode Character Database: Unicode 1.0 Name.
419 Not available in this library. */
420
421 /* ========================================================================= */
422
423 /* Field 11 of Unicode Character Database: ISO 10646 comment.
424 Not available in this library. */
425
426 /* ========================================================================= */
427
428 /* Field 12, 13, 14 of Unicode Character Database: Uppercase mapping,
429 lowercase mapping, titlecase mapping. See "unicase.h". */
430
431 /* ========================================================================= */
432
433 /* Field 2 of the file ArabicShaping.txt in the Unicode Character Database. */
434
435 /* Possible joining types. */
436 enum
437 {
438 UC_JOINING_TYPE_U, /* Non_Joining */
439 UC_JOINING_TYPE_T, /* Transparent */
440 UC_JOINING_TYPE_C, /* Join_Causing */
441 UC_JOINING_TYPE_L, /* Left_Joining */
442 UC_JOINING_TYPE_R, /* Right_Joining */
443 UC_JOINING_TYPE_D /* Dual_Joining */
444 };
445
446 /* Return the name of a joining type. */
447 extern const char *
448 uc_joining_type_name (int joining_type)
449 _UC_ATTRIBUTE_CONST;
450
451 /* Return the long name of a joining type. */
452 extern const char *
453 uc_joining_type_long_name (int joining_type)
454 _UC_ATTRIBUTE_CONST;
455
456 /* Return the joining type given by name, e.g. "D", or by long name, e.g.
457 "Dual Joining". */
458 extern int
459 uc_joining_type_byname (const char *joining_type_name)
460 _UC_ATTRIBUTE_PURE;
461
462 /* Return the joining type of a Unicode character. */
463 extern int
464 uc_joining_type (ucs4_t uc)
465 _UC_ATTRIBUTE_CONST;
466
467 /* ========================================================================= */
468
469 /* Field 3 of the file ArabicShaping.txt in the Unicode Character Database. */
470
471 /* Possible joining groups.
472 This enumeration may be extended in the future. */
473 enum
474 {
475 UC_JOINING_GROUP_NONE, /* No_Joining_Group */
476 UC_JOINING_GROUP_AIN, /* Ain */
477 UC_JOINING_GROUP_ALAPH, /* Alaph */
478 UC_JOINING_GROUP_ALEF, /* Alef */
479 UC_JOINING_GROUP_BEH, /* Beh */
480 UC_JOINING_GROUP_BETH, /* Beth */
481 UC_JOINING_GROUP_BURUSHASKI_YEH_BARREE, /* Burushaski_Yeh_Barree */
482 UC_JOINING_GROUP_DAL, /* Dal */
483 UC_JOINING_GROUP_DALATH_RISH, /* Dalath_Rish */
484 UC_JOINING_GROUP_E, /* E */
485 UC_JOINING_GROUP_FARSI_YEH, /* Farsi_Yeh */
486 UC_JOINING_GROUP_FE, /* Fe */
487 UC_JOINING_GROUP_FEH, /* Feh */
488 UC_JOINING_GROUP_FINAL_SEMKATH, /* Final_Semkath */
489 UC_JOINING_GROUP_GAF, /* Gaf */
490 UC_JOINING_GROUP_GAMAL, /* Gamal */
491 UC_JOINING_GROUP_HAH, /* Hah */
492 UC_JOINING_GROUP_HE, /* He */
493 UC_JOINING_GROUP_HEH, /* Heh */
494 UC_JOINING_GROUP_HEH_GOAL, /* Heh_Goal */
495 UC_JOINING_GROUP_HETH, /* Heth */
496 UC_JOINING_GROUP_KAF, /* Kaf */
497 UC_JOINING_GROUP_KAPH, /* Kaph */
498 UC_JOINING_GROUP_KHAPH, /* Khaph */
499 UC_JOINING_GROUP_KNOTTED_HEH, /* Knotted_Heh */
500 UC_JOINING_GROUP_LAM, /* Lam */
501 UC_JOINING_GROUP_LAMADH, /* Lamadh */
502 UC_JOINING_GROUP_MEEM, /* Meem */
503 UC_JOINING_GROUP_MIM, /* Mim */
504 UC_JOINING_GROUP_NOON, /* Noon */
505 UC_JOINING_GROUP_NUN, /* Nun */
506 UC_JOINING_GROUP_NYA, /* Nya */
507 UC_JOINING_GROUP_PE, /* Pe */
508 UC_JOINING_GROUP_QAF, /* Qaf */
509 UC_JOINING_GROUP_QAPH, /* Qaph */
510 UC_JOINING_GROUP_REH, /* Reh */
511 UC_JOINING_GROUP_REVERSED_PE, /* Reversed_Pe */
512 UC_JOINING_GROUP_SAD, /* Sad */
513 UC_JOINING_GROUP_SADHE, /* Sadhe */
514 UC_JOINING_GROUP_SEEN, /* Seen */
515 UC_JOINING_GROUP_SEMKATH, /* Semkath */
516 UC_JOINING_GROUP_SHIN, /* Shin */
517 UC_JOINING_GROUP_SWASH_KAF, /* Swash_Kaf */
518 UC_JOINING_GROUP_SYRIAC_WAW, /* Syriac_Waw */
519 UC_JOINING_GROUP_TAH, /* Tah */
520 UC_JOINING_GROUP_TAW, /* Taw */
521 UC_JOINING_GROUP_TEH_MARBUTA, /* Teh_Marbuta */
522 UC_JOINING_GROUP_TEH_MARBUTA_GOAL, /* Teh_Marbuta_Goal */
523 UC_JOINING_GROUP_TETH, /* Teth */
524 UC_JOINING_GROUP_WAW, /* Waw */
525 UC_JOINING_GROUP_YEH, /* Yeh */
526 UC_JOINING_GROUP_YEH_BARREE, /* Yeh_Barree */
527 UC_JOINING_GROUP_YEH_WITH_TAIL, /* Yeh_With_Tail */
528 UC_JOINING_GROUP_YUDH, /* Yudh */
529 UC_JOINING_GROUP_YUDH_HE, /* Yudh_He */
530 UC_JOINING_GROUP_ZAIN, /* Zain */
531 UC_JOINING_GROUP_ZHAIN, /* Zhain */
532 UC_JOINING_GROUP_ROHINGYA_YEH, /* Rohingya_Yeh */
533 UC_JOINING_GROUP_STRAIGHT_WAW, /* Straight_Waw */
534 UC_JOINING_GROUP_MANICHAEAN_ALEPH, /* Manichaean_Aleph */
535 UC_JOINING_GROUP_MANICHAEAN_BETH, /* Manichaean_Beth */
536 UC_JOINING_GROUP_MANICHAEAN_GIMEL, /* Manichaean_Gimel */
537 UC_JOINING_GROUP_MANICHAEAN_DALETH, /* Manichaean_Daleth */
538 UC_JOINING_GROUP_MANICHAEAN_WAW, /* Manichaean_Waw */
539 UC_JOINING_GROUP_MANICHAEAN_ZAYIN, /* Manichaean_Zayin */
540 UC_JOINING_GROUP_MANICHAEAN_HETH, /* Manichaean_Heth */
541 UC_JOINING_GROUP_MANICHAEAN_TETH, /* Manichaean_Teth */
542 UC_JOINING_GROUP_MANICHAEAN_YODH, /* Manichaean_Yodh */
543 UC_JOINING_GROUP_MANICHAEAN_KAPH, /* Manichaean_Kaph */
544 UC_JOINING_GROUP_MANICHAEAN_LAMEDH, /* Manichaean_Lamedh */
545 UC_JOINING_GROUP_MANICHAEAN_DHAMEDH, /* Manichaean_Dhamedh */
546 UC_JOINING_GROUP_MANICHAEAN_THAMEDH, /* Manichaean_Thamedh */
547 UC_JOINING_GROUP_MANICHAEAN_MEM, /* Manichaean_Mem */
548 UC_JOINING_GROUP_MANICHAEAN_NUN, /* Manichaean_Nun */
549 UC_JOINING_GROUP_MANICHAEAN_SAMEKH, /* Manichaean_Aleph */
550 UC_JOINING_GROUP_MANICHAEAN_AYIN, /* Manichaean_Ayin */
551 UC_JOINING_GROUP_MANICHAEAN_PE, /* Manichaean_Pe */
552 UC_JOINING_GROUP_MANICHAEAN_SADHE, /* Manichaean_Sadhe */
553 UC_JOINING_GROUP_MANICHAEAN_QOPH, /* Manichaean_Qoph */
554 UC_JOINING_GROUP_MANICHAEAN_RESH, /* Manichaean_Resh */
555 UC_JOINING_GROUP_MANICHAEAN_TAW, /* Manichaean_Taw */
556 UC_JOINING_GROUP_MANICHAEAN_ONE, /* Manichaean_One */
557 UC_JOINING_GROUP_MANICHAEAN_FIVE, /* Manichaean_Five */
558 UC_JOINING_GROUP_MANICHAEAN_TEN, /* Manichaean_Ten */
559 UC_JOINING_GROUP_MANICHAEAN_TWENTY, /* Manichaean_Twenty */
560 UC_JOINING_GROUP_MANICHAEAN_HUNDRED, /* Manichaean_Hundred */
561 UC_JOINING_GROUP_AFRICAN_FEH, /* African_Feh */
562 UC_JOINING_GROUP_AFRICAN_QAF, /* African_Qaf */
563 UC_JOINING_GROUP_AFRICAN_NOON, /* African_Noon */
564 UC_JOINING_GROUP_MALAYALAM_NGA, /* Malayalam_Nga */
565 UC_JOINING_GROUP_MALAYALAM_JA, /* Malayalam_Ja */
566 UC_JOINING_GROUP_MALAYALAM_NYA, /* Malayalam_Nya */
567 UC_JOINING_GROUP_MALAYALAM_TTA, /* Malayalam_Tta */
568 UC_JOINING_GROUP_MALAYALAM_NNA, /* Malayalam_Nna */
569 UC_JOINING_GROUP_MALAYALAM_NNNA, /* Malayalam_Nnna */
570 UC_JOINING_GROUP_MALAYALAM_BHA, /* Malayalam_Bha */
571 UC_JOINING_GROUP_MALAYALAM_RA, /* Malayalam_Ra */
572 UC_JOINING_GROUP_MALAYALAM_LLA, /* Malayalam_Lla */
573 UC_JOINING_GROUP_MALAYALAM_LLLA, /* Malayalam_Llla */
574 UC_JOINING_GROUP_MALAYALAM_SSA, /* Malayalam_Ssa */
575 UC_JOINING_GROUP_HANIFI_ROHINGYA_PA, /* Hanifi_Rohingya_Pa */
576 UC_JOINING_GROUP_HANIFI_ROHINGYA_KINNA_YA, /* Hanifi_Rohingya_Kinna_Ya */
577 UC_JOINING_GROUP_THIN_YEH, /* Thin_Yeh */
578 UC_JOINING_GROUP_VERTICAL_TAIL, /* Vertical_Tail */
579 UC_JOINING_GROUP_KASHMIRI_YEH, /* Kashmiri_Yeh */
580 UC_JOINING_GROUP_THIN_NOON /* Thin_Noon */
581 };
582
583 /* Return the name of a joining group. */
584 extern const char *
585 uc_joining_group_name (int joining_group)
586 _UC_ATTRIBUTE_CONST;
587
588 /* Return the joining group given by name, e.g. "Teh_Marbuta". */
589 extern int
590 uc_joining_group_byname (const char *joining_group_name)
591 _UC_ATTRIBUTE_PURE;
592
593 /* Return the joining group of a Unicode character. */
594 extern int
595 uc_joining_group (ucs4_t uc)
596 _UC_ATTRIBUTE_CONST;
597
598 /* ========================================================================= */
599
600 /* Common API for properties. */
601
602 /* Data type denoting a property. This is not just a number, but rather a
603 pointer to the test functions, so that programs that use only few of the
604 properties don't have a link-time dependency towards all the tables. */
605 typedef struct
606 {
607 bool (*test_fn) (ucs4_t uc);
608 }
609 uc_property_t;
610
611 /* Predefined properties. */
612 /* General. */
613 extern @GNULIB_UNICTYPE_PROPERTY_WHITE_SPACE_DLL_VARIABLE@ const uc_property_t UC_PROPERTY_WHITE_SPACE;
614 extern @GNULIB_UNICTYPE_PROPERTY_ALPHABETIC_DLL_VARIABLE@ const uc_property_t UC_PROPERTY_ALPHABETIC;
615 extern @GNULIB_UNICTYPE_PROPERTY_OTHER_ALPHABETIC_DLL_VARIABLE@ const uc_property_t UC_PROPERTY_OTHER_ALPHABETIC;
616 extern @GNULIB_UNICTYPE_PROPERTY_NOT_A_CHARACTER_DLL_VARIABLE@ const uc_property_t UC_PROPERTY_NOT_A_CHARACTER;
617 extern @GNULIB_UNICTYPE_PROPERTY_DEFAULT_IGNORABLE_CODE_POINT_DLL_VARIABLE@ const uc_property_t UC_PROPERTY_DEFAULT_IGNORABLE_CODE_POINT;
618 extern @GNULIB_UNICTYPE_PROPERTY_OTHER_DEFAULT_IGNORABLE_CODE_POINT_DLL_VARIABLE@ const uc_property_t UC_PROPERTY_OTHER_DEFAULT_IGNORABLE_CODE_POINT;
619 extern @GNULIB_UNICTYPE_PROPERTY_DEPRECATED_DLL_VARIABLE@ const uc_property_t UC_PROPERTY_DEPRECATED;
620 extern @GNULIB_UNICTYPE_PROPERTY_LOGICAL_ORDER_EXCEPTION_DLL_VARIABLE@ const uc_property_t UC_PROPERTY_LOGICAL_ORDER_EXCEPTION;
621 extern @GNULIB_UNICTYPE_PROPERTY_VARIATION_SELECTOR_DLL_VARIABLE@ const uc_property_t UC_PROPERTY_VARIATION_SELECTOR;
622 extern @GNULIB_UNICTYPE_PROPERTY_PRIVATE_USE_DLL_VARIABLE@ const uc_property_t UC_PROPERTY_PRIVATE_USE;
623 extern @GNULIB_UNICTYPE_PROPERTY_UNASSIGNED_CODE_VALUE_DLL_VARIABLE@ const uc_property_t UC_PROPERTY_UNASSIGNED_CODE_VALUE;
624 /* Case. */
625 extern @GNULIB_UNICTYPE_PROPERTY_UPPERCASE_DLL_VARIABLE@ const uc_property_t UC_PROPERTY_UPPERCASE;
626 extern @GNULIB_UNICTYPE_PROPERTY_OTHER_UPPERCASE_DLL_VARIABLE@ const uc_property_t UC_PROPERTY_OTHER_UPPERCASE;
627 extern @GNULIB_UNICTYPE_PROPERTY_LOWERCASE_DLL_VARIABLE@ const uc_property_t UC_PROPERTY_LOWERCASE;
628 extern @GNULIB_UNICTYPE_PROPERTY_OTHER_LOWERCASE_DLL_VARIABLE@ const uc_property_t UC_PROPERTY_OTHER_LOWERCASE;
629 extern @GNULIB_UNICTYPE_PROPERTY_TITLECASE_DLL_VARIABLE@ const uc_property_t UC_PROPERTY_TITLECASE;
630 extern @GNULIB_UNICTYPE_PROPERTY_CASED_DLL_VARIABLE@ const uc_property_t UC_PROPERTY_CASED;
631 extern @GNULIB_UNICTYPE_PROPERTY_CASE_IGNORABLE_DLL_VARIABLE@ const uc_property_t UC_PROPERTY_CASE_IGNORABLE;
632 extern @GNULIB_UNICTYPE_PROPERTY_CHANGES_WHEN_LOWERCASED_DLL_VARIABLE@ const uc_property_t UC_PROPERTY_CHANGES_WHEN_LOWERCASED;
633 extern @GNULIB_UNICTYPE_PROPERTY_CHANGES_WHEN_UPPERCASED_DLL_VARIABLE@ const uc_property_t UC_PROPERTY_CHANGES_WHEN_UPPERCASED;
634 extern @GNULIB_UNICTYPE_PROPERTY_CHANGES_WHEN_TITLECASED_DLL_VARIABLE@ const uc_property_t UC_PROPERTY_CHANGES_WHEN_TITLECASED;
635 extern @GNULIB_UNICTYPE_PROPERTY_CHANGES_WHEN_CASEFOLDED_DLL_VARIABLE@ const uc_property_t UC_PROPERTY_CHANGES_WHEN_CASEFOLDED;
636 extern @GNULIB_UNICTYPE_PROPERTY_CHANGES_WHEN_CASEMAPPED_DLL_VARIABLE@ const uc_property_t UC_PROPERTY_CHANGES_WHEN_CASEMAPPED;
637 extern @GNULIB_UNICTYPE_PROPERTY_SOFT_DOTTED_DLL_VARIABLE@ const uc_property_t UC_PROPERTY_SOFT_DOTTED;
638 /* Identifiers. */
639 extern @GNULIB_UNICTYPE_PROPERTY_ID_START_DLL_VARIABLE@ const uc_property_t UC_PROPERTY_ID_START;
640 extern @GNULIB_UNICTYPE_PROPERTY_OTHER_ID_START_DLL_VARIABLE@ const uc_property_t UC_PROPERTY_OTHER_ID_START;
641 extern @GNULIB_UNICTYPE_PROPERTY_ID_CONTINUE_DLL_VARIABLE@ const uc_property_t UC_PROPERTY_ID_CONTINUE;
642 extern @GNULIB_UNICTYPE_PROPERTY_OTHER_ID_CONTINUE_DLL_VARIABLE@ const uc_property_t UC_PROPERTY_OTHER_ID_CONTINUE;
643 extern @GNULIB_UNICTYPE_PROPERTY_XID_START_DLL_VARIABLE@ const uc_property_t UC_PROPERTY_XID_START;
644 extern @GNULIB_UNICTYPE_PROPERTY_XID_CONTINUE_DLL_VARIABLE@ const uc_property_t UC_PROPERTY_XID_CONTINUE;
645 extern @GNULIB_UNICTYPE_PROPERTY_ID_COMPAT_MATH_START_DLL_VARIABLE@ const uc_property_t UC_PROPERTY_ID_COMPAT_MATH_START;
646 extern @GNULIB_UNICTYPE_PROPERTY_ID_COMPAT_MATH_CONTINUE_DLL_VARIABLE@ const uc_property_t UC_PROPERTY_ID_COMPAT_MATH_CONTINUE;
647 extern @GNULIB_UNICTYPE_PROPERTY_PATTERN_WHITE_SPACE_DLL_VARIABLE@ const uc_property_t UC_PROPERTY_PATTERN_WHITE_SPACE;
648 extern @GNULIB_UNICTYPE_PROPERTY_PATTERN_SYNTAX_DLL_VARIABLE@ const uc_property_t UC_PROPERTY_PATTERN_SYNTAX;
649 /* Shaping and rendering. */
650 extern @GNULIB_UNICTYPE_PROPERTY_JOIN_CONTROL_DLL_VARIABLE@ const uc_property_t UC_PROPERTY_JOIN_CONTROL;
651 extern @GNULIB_UNICTYPE_PROPERTY_GRAPHEME_BASE_DLL_VARIABLE@ const uc_property_t UC_PROPERTY_GRAPHEME_BASE;
652 extern @GNULIB_UNICTYPE_PROPERTY_GRAPHEME_EXTEND_DLL_VARIABLE@ const uc_property_t UC_PROPERTY_GRAPHEME_EXTEND;
653 extern @GNULIB_UNICTYPE_PROPERTY_OTHER_GRAPHEME_EXTEND_DLL_VARIABLE@ const uc_property_t UC_PROPERTY_OTHER_GRAPHEME_EXTEND;
654 extern @GNULIB_UNICTYPE_PROPERTY_GRAPHEME_LINK_DLL_VARIABLE@ const uc_property_t UC_PROPERTY_GRAPHEME_LINK;
655 extern @GNULIB_UNICTYPE_PROPERTY_MODIFIER_COMBINING_MARK_DLL_VARIABLE@ const uc_property_t UC_PROPERTY_MODIFIER_COMBINING_MARK;
656 /* Bidi. */
657 extern @GNULIB_UNICTYPE_PROPERTY_BIDI_CONTROL_DLL_VARIABLE@ const uc_property_t UC_PROPERTY_BIDI_CONTROL;
658 extern @GNULIB_UNICTYPE_PROPERTY_BIDI_LEFT_TO_RIGHT_DLL_VARIABLE@ const uc_property_t UC_PROPERTY_BIDI_LEFT_TO_RIGHT;
659 extern @GNULIB_UNICTYPE_PROPERTY_BIDI_HEBREW_RIGHT_TO_LEFT_DLL_VARIABLE@ const uc_property_t UC_PROPERTY_BIDI_HEBREW_RIGHT_TO_LEFT;
660 extern @GNULIB_UNICTYPE_PROPERTY_BIDI_ARABIC_RIGHT_TO_LEFT_DLL_VARIABLE@ const uc_property_t UC_PROPERTY_BIDI_ARABIC_RIGHT_TO_LEFT;
661 extern @GNULIB_UNICTYPE_PROPERTY_BIDI_EUROPEAN_DIGIT_DLL_VARIABLE@ const uc_property_t UC_PROPERTY_BIDI_EUROPEAN_DIGIT;
662 extern @GNULIB_UNICTYPE_PROPERTY_BIDI_EUR_NUM_SEPARATOR_DLL_VARIABLE@ const uc_property_t UC_PROPERTY_BIDI_EUR_NUM_SEPARATOR;
663 extern @GNULIB_UNICTYPE_PROPERTY_BIDI_EUR_NUM_TERMINATOR_DLL_VARIABLE@ const uc_property_t UC_PROPERTY_BIDI_EUR_NUM_TERMINATOR;
664 extern @GNULIB_UNICTYPE_PROPERTY_BIDI_ARABIC_DIGIT_DLL_VARIABLE@ const uc_property_t UC_PROPERTY_BIDI_ARABIC_DIGIT;
665 extern @GNULIB_UNICTYPE_PROPERTY_BIDI_COMMON_SEPARATOR_DLL_VARIABLE@ const uc_property_t UC_PROPERTY_BIDI_COMMON_SEPARATOR;
666 extern @GNULIB_UNICTYPE_PROPERTY_BIDI_BLOCK_SEPARATOR_DLL_VARIABLE@ const uc_property_t UC_PROPERTY_BIDI_BLOCK_SEPARATOR;
667 extern @GNULIB_UNICTYPE_PROPERTY_BIDI_SEGMENT_SEPARATOR_DLL_VARIABLE@ const uc_property_t UC_PROPERTY_BIDI_SEGMENT_SEPARATOR;
668 extern @GNULIB_UNICTYPE_PROPERTY_BIDI_WHITESPACE_DLL_VARIABLE@ const uc_property_t UC_PROPERTY_BIDI_WHITESPACE;
669 extern @GNULIB_UNICTYPE_PROPERTY_BIDI_NON_SPACING_MARK_DLL_VARIABLE@ const uc_property_t UC_PROPERTY_BIDI_NON_SPACING_MARK;
670 extern @GNULIB_UNICTYPE_PROPERTY_BIDI_BOUNDARY_NEUTRAL_DLL_VARIABLE@ const uc_property_t UC_PROPERTY_BIDI_BOUNDARY_NEUTRAL;
671 extern @GNULIB_UNICTYPE_PROPERTY_BIDI_PDF_DLL_VARIABLE@ const uc_property_t UC_PROPERTY_BIDI_PDF;
672 extern @GNULIB_UNICTYPE_PROPERTY_BIDI_EMBEDDING_OR_OVERRIDE_DLL_VARIABLE@ const uc_property_t UC_PROPERTY_BIDI_EMBEDDING_OR_OVERRIDE;
673 extern @GNULIB_UNICTYPE_PROPERTY_BIDI_OTHER_NEUTRAL_DLL_VARIABLE@ const uc_property_t UC_PROPERTY_BIDI_OTHER_NEUTRAL;
674 /* Numeric. */
675 extern @GNULIB_UNICTYPE_PROPERTY_HEX_DIGIT_DLL_VARIABLE@ const uc_property_t UC_PROPERTY_HEX_DIGIT;
676 extern @GNULIB_UNICTYPE_PROPERTY_ASCII_HEX_DIGIT_DLL_VARIABLE@ const uc_property_t UC_PROPERTY_ASCII_HEX_DIGIT;
677 /* CJK. */
678 extern @GNULIB_UNICTYPE_PROPERTY_IDEOGRAPHIC_DLL_VARIABLE@ const uc_property_t UC_PROPERTY_IDEOGRAPHIC;
679 extern @GNULIB_UNICTYPE_PROPERTY_UNIFIED_IDEOGRAPH_DLL_VARIABLE@ const uc_property_t UC_PROPERTY_UNIFIED_IDEOGRAPH;
680 extern @GNULIB_UNICTYPE_PROPERTY_RADICAL_DLL_VARIABLE@ const uc_property_t UC_PROPERTY_RADICAL;
681 extern @GNULIB_UNICTYPE_PROPERTY_IDS_UNARY_OPERATOR_DLL_VARIABLE@ const uc_property_t UC_PROPERTY_IDS_UNARY_OPERATOR;
682 extern @GNULIB_UNICTYPE_PROPERTY_IDS_BINARY_OPERATOR_DLL_VARIABLE@ const uc_property_t UC_PROPERTY_IDS_BINARY_OPERATOR;
683 extern @GNULIB_UNICTYPE_PROPERTY_IDS_TRINARY_OPERATOR_DLL_VARIABLE@ const uc_property_t UC_PROPERTY_IDS_TRINARY_OPERATOR;
684 /* Emoji. */
685 extern @GNULIB_UNICTYPE_PROPERTY_EMOJI_DLL_VARIABLE@ const uc_property_t UC_PROPERTY_EMOJI;
686 extern @GNULIB_UNICTYPE_PROPERTY_EMOJI_PRESENTATION_DLL_VARIABLE@ const uc_property_t UC_PROPERTY_EMOJI_PRESENTATION;
687 extern @GNULIB_UNICTYPE_PROPERTY_EMOJI_MODIFIER_DLL_VARIABLE@ const uc_property_t UC_PROPERTY_EMOJI_MODIFIER;
688 extern @GNULIB_UNICTYPE_PROPERTY_EMOJI_MODIFIER_BASE_DLL_VARIABLE@ const uc_property_t UC_PROPERTY_EMOJI_MODIFIER_BASE;
689 extern @GNULIB_UNICTYPE_PROPERTY_EMOJI_COMPONENT_DLL_VARIABLE@ const uc_property_t UC_PROPERTY_EMOJI_COMPONENT;
690 extern @GNULIB_UNICTYPE_PROPERTY_EXTENDED_PICTOGRAPHIC_DLL_VARIABLE@ const uc_property_t UC_PROPERTY_EXTENDED_PICTOGRAPHIC;
691 /* Misc. */
692 extern @GNULIB_UNICTYPE_PROPERTY_ZERO_WIDTH_DLL_VARIABLE@ const uc_property_t UC_PROPERTY_ZERO_WIDTH;
693 extern @GNULIB_UNICTYPE_PROPERTY_SPACE_DLL_VARIABLE@ const uc_property_t UC_PROPERTY_SPACE;
694 extern @GNULIB_UNICTYPE_PROPERTY_NON_BREAK_DLL_VARIABLE@ const uc_property_t UC_PROPERTY_NON_BREAK;
695 extern @GNULIB_UNICTYPE_PROPERTY_ISO_CONTROL_DLL_VARIABLE@ const uc_property_t UC_PROPERTY_ISO_CONTROL;
696 extern @GNULIB_UNICTYPE_PROPERTY_FORMAT_CONTROL_DLL_VARIABLE@ const uc_property_t UC_PROPERTY_FORMAT_CONTROL;
697 extern @GNULIB_UNICTYPE_PROPERTY_PREPENDED_CONCATENATION_MARK_DLL_VARIABLE@ const uc_property_t UC_PROPERTY_PREPENDED_CONCATENATION_MARK;
698 extern @GNULIB_UNICTYPE_PROPERTY_DASH_DLL_VARIABLE@ const uc_property_t UC_PROPERTY_DASH;
699 extern @GNULIB_UNICTYPE_PROPERTY_HYPHEN_DLL_VARIABLE@ const uc_property_t UC_PROPERTY_HYPHEN;
700 extern @GNULIB_UNICTYPE_PROPERTY_PUNCTUATION_DLL_VARIABLE@ const uc_property_t UC_PROPERTY_PUNCTUATION;
701 extern @GNULIB_UNICTYPE_PROPERTY_LINE_SEPARATOR_DLL_VARIABLE@ const uc_property_t UC_PROPERTY_LINE_SEPARATOR;
702 extern @GNULIB_UNICTYPE_PROPERTY_PARAGRAPH_SEPARATOR_DLL_VARIABLE@ const uc_property_t UC_PROPERTY_PARAGRAPH_SEPARATOR;
703 extern @GNULIB_UNICTYPE_PROPERTY_QUOTATION_MARK_DLL_VARIABLE@ const uc_property_t UC_PROPERTY_QUOTATION_MARK;
704 extern @GNULIB_UNICTYPE_PROPERTY_SENTENCE_TERMINAL_DLL_VARIABLE@ const uc_property_t UC_PROPERTY_SENTENCE_TERMINAL;
705 extern @GNULIB_UNICTYPE_PROPERTY_TERMINAL_PUNCTUATION_DLL_VARIABLE@ const uc_property_t UC_PROPERTY_TERMINAL_PUNCTUATION;
706 extern @GNULIB_UNICTYPE_PROPERTY_CURRENCY_SYMBOL_DLL_VARIABLE@ const uc_property_t UC_PROPERTY_CURRENCY_SYMBOL;
707 extern @GNULIB_UNICTYPE_PROPERTY_MATH_DLL_VARIABLE@ const uc_property_t UC_PROPERTY_MATH;
708 extern @GNULIB_UNICTYPE_PROPERTY_OTHER_MATH_DLL_VARIABLE@ const uc_property_t UC_PROPERTY_OTHER_MATH;
709 extern @GNULIB_UNICTYPE_PROPERTY_PAIRED_PUNCTUATION_DLL_VARIABLE@ const uc_property_t UC_PROPERTY_PAIRED_PUNCTUATION;
710 extern @GNULIB_UNICTYPE_PROPERTY_LEFT_OF_PAIR_DLL_VARIABLE@ const uc_property_t UC_PROPERTY_LEFT_OF_PAIR;
711 extern @GNULIB_UNICTYPE_PROPERTY_COMBINING_DLL_VARIABLE@ const uc_property_t UC_PROPERTY_COMBINING;
712 extern @GNULIB_UNICTYPE_PROPERTY_COMPOSITE_DLL_VARIABLE@ const uc_property_t UC_PROPERTY_COMPOSITE;
713 extern @GNULIB_UNICTYPE_PROPERTY_DECIMAL_DIGIT_DLL_VARIABLE@ const uc_property_t UC_PROPERTY_DECIMAL_DIGIT;
714 extern @GNULIB_UNICTYPE_PROPERTY_NUMERIC_DLL_VARIABLE@ const uc_property_t UC_PROPERTY_NUMERIC;
715 extern @GNULIB_UNICTYPE_PROPERTY_DIACRITIC_DLL_VARIABLE@ const uc_property_t UC_PROPERTY_DIACRITIC;
716 extern @GNULIB_UNICTYPE_PROPERTY_EXTENDER_DLL_VARIABLE@ const uc_property_t UC_PROPERTY_EXTENDER;
717 extern @GNULIB_UNICTYPE_PROPERTY_IGNORABLE_CONTROL_DLL_VARIABLE@ const uc_property_t UC_PROPERTY_IGNORABLE_CONTROL;
718 extern @GNULIB_UNICTYPE_PROPERTY_REGIONAL_INDICATOR_DLL_VARIABLE@ const uc_property_t UC_PROPERTY_REGIONAL_INDICATOR;
719
720 /* Return the property given by name, e.g. "White space". */
721 extern uc_property_t
722 uc_property_byname (const char *property_name);
723
724 /* Test whether a property is valid. */
725 #define uc_property_is_valid(property) ((property).test_fn != NULL)
726
727 /* Test whether a Unicode character has a given property. */
728 extern bool
729 uc_is_property (ucs4_t uc, uc_property_t property);
730 extern bool uc_is_property_white_space (ucs4_t uc)
731 _UC_ATTRIBUTE_CONST;
732 extern bool uc_is_property_alphabetic (ucs4_t uc)
733 _UC_ATTRIBUTE_CONST;
734 extern bool uc_is_property_other_alphabetic (ucs4_t uc)
735 _UC_ATTRIBUTE_CONST;
736 extern bool uc_is_property_not_a_character (ucs4_t uc)
737 _UC_ATTRIBUTE_CONST;
738 extern bool uc_is_property_default_ignorable_code_point (ucs4_t uc)
739 _UC_ATTRIBUTE_CONST;
740 extern bool uc_is_property_other_default_ignorable_code_point (ucs4_t uc)
741 _UC_ATTRIBUTE_CONST;
742 extern bool uc_is_property_deprecated (ucs4_t uc)
743 _UC_ATTRIBUTE_CONST;
744 extern bool uc_is_property_logical_order_exception (ucs4_t uc)
745 _UC_ATTRIBUTE_CONST;
746 extern bool uc_is_property_variation_selector (ucs4_t uc)
747 _UC_ATTRIBUTE_CONST;
748 extern bool uc_is_property_private_use (ucs4_t uc)
749 _UC_ATTRIBUTE_CONST;
750 extern bool uc_is_property_unassigned_code_value (ucs4_t uc)
751 _UC_ATTRIBUTE_CONST;
752 extern bool uc_is_property_uppercase (ucs4_t uc)
753 _UC_ATTRIBUTE_CONST;
754 extern bool uc_is_property_other_uppercase (ucs4_t uc)
755 _UC_ATTRIBUTE_CONST;
756 extern bool uc_is_property_lowercase (ucs4_t uc)
757 _UC_ATTRIBUTE_CONST;
758 extern bool uc_is_property_other_lowercase (ucs4_t uc)
759 _UC_ATTRIBUTE_CONST;
760 extern bool uc_is_property_titlecase (ucs4_t uc)
761 _UC_ATTRIBUTE_CONST;
762 extern bool uc_is_property_cased (ucs4_t uc)
763 _UC_ATTRIBUTE_CONST;
764 extern bool uc_is_property_case_ignorable (ucs4_t uc)
765 _UC_ATTRIBUTE_CONST;
766 extern bool uc_is_property_changes_when_lowercased (ucs4_t uc)
767 _UC_ATTRIBUTE_CONST;
768 extern bool uc_is_property_changes_when_uppercased (ucs4_t uc)
769 _UC_ATTRIBUTE_CONST;
770 extern bool uc_is_property_changes_when_titlecased (ucs4_t uc)
771 _UC_ATTRIBUTE_CONST;
772 extern bool uc_is_property_changes_when_casefolded (ucs4_t uc)
773 _UC_ATTRIBUTE_CONST;
774 extern bool uc_is_property_changes_when_casemapped (ucs4_t uc)
775 _UC_ATTRIBUTE_CONST;
776 extern bool uc_is_property_soft_dotted (ucs4_t uc)
777 _UC_ATTRIBUTE_CONST;
778 extern bool uc_is_property_id_start (ucs4_t uc)
779 _UC_ATTRIBUTE_CONST;
780 extern bool uc_is_property_other_id_start (ucs4_t uc)
781 _UC_ATTRIBUTE_CONST;
782 extern bool uc_is_property_id_continue (ucs4_t uc)
783 _UC_ATTRIBUTE_CONST;
784 extern bool uc_is_property_other_id_continue (ucs4_t uc)
785 _UC_ATTRIBUTE_CONST;
786 extern bool uc_is_property_xid_start (ucs4_t uc)
787 _UC_ATTRIBUTE_CONST;
788 extern bool uc_is_property_xid_continue (ucs4_t uc)
789 _UC_ATTRIBUTE_CONST;
790 extern bool uc_is_property_id_compat_math_start (ucs4_t uc)
791 _UC_ATTRIBUTE_CONST;
792 extern bool uc_is_property_id_compat_math_continue (ucs4_t uc)
793 _UC_ATTRIBUTE_CONST;
794 extern bool uc_is_property_pattern_white_space (ucs4_t uc)
795 _UC_ATTRIBUTE_CONST;
796 extern bool uc_is_property_pattern_syntax (ucs4_t uc)
797 _UC_ATTRIBUTE_CONST;
798 extern bool uc_is_property_join_control (ucs4_t uc)
799 _UC_ATTRIBUTE_CONST;
800 extern bool uc_is_property_grapheme_base (ucs4_t uc)
801 _UC_ATTRIBUTE_CONST;
802 extern bool uc_is_property_grapheme_extend (ucs4_t uc)
803 _UC_ATTRIBUTE_CONST;
804 extern bool uc_is_property_other_grapheme_extend (ucs4_t uc)
805 _UC_ATTRIBUTE_CONST;
806 extern bool uc_is_property_grapheme_link (ucs4_t uc)
807 _UC_ATTRIBUTE_CONST;
808 extern bool uc_is_property_modifier_combining_mark (ucs4_t uc)
809 _UC_ATTRIBUTE_CONST;
810 extern bool uc_is_property_bidi_control (ucs4_t uc)
811 _UC_ATTRIBUTE_CONST;
812 extern bool uc_is_property_bidi_left_to_right (ucs4_t uc)
813 _UC_ATTRIBUTE_CONST;
814 extern bool uc_is_property_bidi_hebrew_right_to_left (ucs4_t uc)
815 _UC_ATTRIBUTE_CONST;
816 extern bool uc_is_property_bidi_arabic_right_to_left (ucs4_t uc)
817 _UC_ATTRIBUTE_CONST;
818 extern bool uc_is_property_bidi_european_digit (ucs4_t uc)
819 _UC_ATTRIBUTE_CONST;
820 extern bool uc_is_property_bidi_eur_num_separator (ucs4_t uc)
821 _UC_ATTRIBUTE_CONST;
822 extern bool uc_is_property_bidi_eur_num_terminator (ucs4_t uc)
823 _UC_ATTRIBUTE_CONST;
824 extern bool uc_is_property_bidi_arabic_digit (ucs4_t uc)
825 _UC_ATTRIBUTE_CONST;
826 extern bool uc_is_property_bidi_common_separator (ucs4_t uc)
827 _UC_ATTRIBUTE_CONST;
828 extern bool uc_is_property_bidi_block_separator (ucs4_t uc)
829 _UC_ATTRIBUTE_CONST;
830 extern bool uc_is_property_bidi_segment_separator (ucs4_t uc)
831 _UC_ATTRIBUTE_CONST;
832 extern bool uc_is_property_bidi_whitespace (ucs4_t uc)
833 _UC_ATTRIBUTE_CONST;
834 extern bool uc_is_property_bidi_non_spacing_mark (ucs4_t uc)
835 _UC_ATTRIBUTE_CONST;
836 extern bool uc_is_property_bidi_boundary_neutral (ucs4_t uc)
837 _UC_ATTRIBUTE_CONST;
838 extern bool uc_is_property_bidi_pdf (ucs4_t uc)
839 _UC_ATTRIBUTE_CONST;
840 extern bool uc_is_property_bidi_embedding_or_override (ucs4_t uc)
841 _UC_ATTRIBUTE_CONST;
842 extern bool uc_is_property_bidi_other_neutral (ucs4_t uc)
843 _UC_ATTRIBUTE_CONST;
844 extern bool uc_is_property_hex_digit (ucs4_t uc)
845 _UC_ATTRIBUTE_CONST;
846 extern bool uc_is_property_ascii_hex_digit (ucs4_t uc)
847 _UC_ATTRIBUTE_CONST;
848 extern bool uc_is_property_ideographic (ucs4_t uc)
849 _UC_ATTRIBUTE_CONST;
850 extern bool uc_is_property_unified_ideograph (ucs4_t uc)
851 _UC_ATTRIBUTE_CONST;
852 extern bool uc_is_property_radical (ucs4_t uc)
853 _UC_ATTRIBUTE_CONST;
854 extern bool uc_is_property_ids_unary_operator (ucs4_t uc)
855 _UC_ATTRIBUTE_CONST;
856 extern bool uc_is_property_ids_binary_operator (ucs4_t uc)
857 _UC_ATTRIBUTE_CONST;
858 extern bool uc_is_property_ids_trinary_operator (ucs4_t uc)
859 _UC_ATTRIBUTE_CONST;
860 extern bool uc_is_property_emoji (ucs4_t uc)
861 _UC_ATTRIBUTE_CONST;
862 extern bool uc_is_property_emoji_presentation (ucs4_t uc)
863 _UC_ATTRIBUTE_CONST;
864 extern bool uc_is_property_emoji_modifier (ucs4_t uc)
865 _UC_ATTRIBUTE_CONST;
866 extern bool uc_is_property_emoji_modifier_base (ucs4_t uc)
867 _UC_ATTRIBUTE_CONST;
868 extern bool uc_is_property_emoji_component (ucs4_t uc)
869 _UC_ATTRIBUTE_CONST;
870 extern bool uc_is_property_extended_pictographic (ucs4_t uc)
871 _UC_ATTRIBUTE_CONST;
872 extern bool uc_is_property_zero_width (ucs4_t uc)
873 _UC_ATTRIBUTE_CONST;
874 extern bool uc_is_property_space (ucs4_t uc)
875 _UC_ATTRIBUTE_CONST;
876 extern bool uc_is_property_non_break (ucs4_t uc)
877 _UC_ATTRIBUTE_CONST;
878 extern bool uc_is_property_iso_control (ucs4_t uc)
879 _UC_ATTRIBUTE_CONST;
880 extern bool uc_is_property_format_control (ucs4_t uc)
881 _UC_ATTRIBUTE_CONST;
882 extern bool uc_is_property_prepended_concatenation_mark (ucs4_t uc)
883 _UC_ATTRIBUTE_CONST;
884 extern bool uc_is_property_dash (ucs4_t uc)
885 _UC_ATTRIBUTE_CONST;
886 extern bool uc_is_property_hyphen (ucs4_t uc)
887 _UC_ATTRIBUTE_CONST;
888 extern bool uc_is_property_punctuation (ucs4_t uc)
889 _UC_ATTRIBUTE_CONST;
890 extern bool uc_is_property_line_separator (ucs4_t uc)
891 _UC_ATTRIBUTE_CONST;
892 extern bool uc_is_property_paragraph_separator (ucs4_t uc)
893 _UC_ATTRIBUTE_CONST;
894 extern bool uc_is_property_quotation_mark (ucs4_t uc)
895 _UC_ATTRIBUTE_CONST;
896 extern bool uc_is_property_sentence_terminal (ucs4_t uc)
897 _UC_ATTRIBUTE_CONST;
898 extern bool uc_is_property_terminal_punctuation (ucs4_t uc)
899 _UC_ATTRIBUTE_CONST;
900 extern bool uc_is_property_currency_symbol (ucs4_t uc)
901 _UC_ATTRIBUTE_CONST;
902 extern bool uc_is_property_math (ucs4_t uc)
903 _UC_ATTRIBUTE_CONST;
904 extern bool uc_is_property_other_math (ucs4_t uc)
905 _UC_ATTRIBUTE_CONST;
906 extern bool uc_is_property_paired_punctuation (ucs4_t uc)
907 _UC_ATTRIBUTE_CONST;
908 extern bool uc_is_property_left_of_pair (ucs4_t uc)
909 _UC_ATTRIBUTE_CONST;
910 extern bool uc_is_property_combining (ucs4_t uc)
911 _UC_ATTRIBUTE_CONST;
912 extern bool uc_is_property_composite (ucs4_t uc)
913 _UC_ATTRIBUTE_CONST;
914 extern bool uc_is_property_decimal_digit (ucs4_t uc)
915 _UC_ATTRIBUTE_CONST;
916 extern bool uc_is_property_numeric (ucs4_t uc)
917 _UC_ATTRIBUTE_CONST;
918 extern bool uc_is_property_diacritic (ucs4_t uc)
919 _UC_ATTRIBUTE_CONST;
920 extern bool uc_is_property_extender (ucs4_t uc)
921 _UC_ATTRIBUTE_CONST;
922 extern bool uc_is_property_ignorable_control (ucs4_t uc)
923 _UC_ATTRIBUTE_CONST;
924 extern bool uc_is_property_regional_indicator (ucs4_t uc)
925 _UC_ATTRIBUTE_CONST;
926
927 /* ========================================================================= */
928
929 /* Other attributes. */
930
931 /* ------------------------------------------------------------------------- */
932
933 /* Indic_Conjunct_Break (InCB): from the file DerivedCoreProperties.txt
934 in the Unicode Character Database. */
935
936 /* Possible values of the Indic_Conjunct_Break attribute.
937 This enumeration may be extended in the future. */
938 enum
939 {
940 UC_INDIC_CONJUNCT_BREAK_NONE, /* None */
941 UC_INDIC_CONJUNCT_BREAK_CONSONANT, /* Consonant */
942 UC_INDIC_CONJUNCT_BREAK_LINKER, /* Linker */
943 UC_INDIC_CONJUNCT_BREAK_EXTEND /* Extend */
944 };
945
946 /* Return the name of an Indic_Conjunct_Break value. */
947 extern const char *
948 uc_indic_conjunct_break_name (int indic_conjunct_break)
949 _UC_ATTRIBUTE_CONST;
950
951 /* Return the Indic_Conjunct_Break value given by name, e.g. "Consonant". */
952 extern int
953 uc_indic_conjunct_break_byname (const char *indic_conjunct_break_name)
954 _UC_ATTRIBUTE_PURE;
955
956 /* Return the Indic_Conjunct_Break attribute of a Unicode character. */
957 extern int
958 uc_indic_conjunct_break (ucs4_t uc)
959 _UC_ATTRIBUTE_CONST;
960
961 /* ========================================================================= */
962
963 /* Subdivision of the Unicode characters into scripts. */
964
965 typedef struct
966 {
967 unsigned int code : 21;
968 unsigned int start : 1;
969 unsigned int end : 1;
970 }
971 uc_interval_t;
972 typedef struct
973 {
974 unsigned int nintervals;
975 const uc_interval_t *intervals;
976 const char *name;
977 }
978 uc_script_t;
979
980 /* Return the script of a Unicode character. */
981 extern const uc_script_t *
982 uc_script (ucs4_t uc)
983 _UC_ATTRIBUTE_CONST;
984
985 /* Return the script given by name, e.g. "HAN". */
986 extern const uc_script_t *
987 uc_script_byname (const char *script_name)
988 _UC_ATTRIBUTE_PURE;
989
990 /* Test whether a Unicode character belongs to a given script. */
991 extern bool
992 uc_is_script (ucs4_t uc, const uc_script_t *script)
993 _UC_ATTRIBUTE_PURE;
994
995 /* Get the list of all scripts. */
996 extern void
997 uc_all_scripts (const uc_script_t **scripts, size_t *count);
998
999 /* ========================================================================= */
1000
1001 /* Subdivision of the Unicode character range into blocks. */
1002
1003 typedef struct
1004 {
1005 ucs4_t start;
1006 ucs4_t end;
1007 const char *name;
1008 }
1009 uc_block_t;
1010
1011 /* Return the block a character belongs to. */
1012 extern const uc_block_t *
1013 uc_block (ucs4_t uc)
1014 _UC_ATTRIBUTE_CONST;
1015
1016 /* Test whether a Unicode character belongs to a given block. */
1017 extern bool
1018 uc_is_block (ucs4_t uc, const uc_block_t *block)
1019 _UC_ATTRIBUTE_PURE;
1020
1021 /* Get the list of all blocks. */
1022 extern void
1023 uc_all_blocks (const uc_block_t **blocks, size_t *count);
1024
1025 /* ========================================================================= */
1026
1027 /* Properties taken from language standards. */
1028
1029 /* Test whether a Unicode character is considered whitespace in ISO C 99. */
1030 extern bool
1031 uc_is_c_whitespace (ucs4_t uc)
1032 _UC_ATTRIBUTE_CONST;
1033
1034 /* Test whether a Unicode character is considered whitespace in Java. */
1035 extern bool
1036 uc_is_java_whitespace (ucs4_t uc)
1037 _UC_ATTRIBUTE_CONST;
1038
1039 enum
1040 {
1041 UC_IDENTIFIER_START, /* valid as first or subsequent character */
1042 UC_IDENTIFIER_VALID, /* valid as subsequent character only */
1043 UC_IDENTIFIER_INVALID, /* not valid */
1044 UC_IDENTIFIER_IGNORABLE /* ignorable (Java only) */
1045 };
1046
1047 /* Return the categorization of a Unicode character w.r.t. the ISO C 99
1048 identifier syntax. */
1049 extern int
1050 uc_c_ident_category (ucs4_t uc)
1051 _UC_ATTRIBUTE_CONST;
1052
1053 /* Return the categorization of a Unicode character w.r.t. the Java
1054 identifier syntax. */
1055 extern int
1056 uc_java_ident_category (ucs4_t uc)
1057 _UC_ATTRIBUTE_CONST;
1058
1059 /* ========================================================================= */
1060
1061 /* Like ISO C <ctype.h> and <wctype.h>. These functions are deprecated,
1062 because this set of functions was designed with ASCII in mind and cannot
1063 reflect the more diverse reality of the Unicode character set. But they
1064 can be a quick-and-dirty porting aid when migrating from wchar_t APIs
1065 to Unicode strings. */
1066
1067 /* Test for any character for which 'uc_is_alpha' or 'uc_is_digit' is true. */
1068 extern bool
1069 uc_is_alnum (ucs4_t uc)
1070 _UC_ATTRIBUTE_CONST;
1071
1072 /* Test for any character for which 'uc_is_upper' or 'uc_is_lower' is true,
1073 or any character that is one of a locale-specific set of characters for
1074 which none of 'uc_is_cntrl', 'uc_is_digit', 'uc_is_punct', or 'uc_is_space'
1075 is true. */
1076 extern bool
1077 uc_is_alpha (ucs4_t uc)
1078 _UC_ATTRIBUTE_CONST;
1079
1080 /* Test for any control character. */
1081 extern bool
1082 uc_is_cntrl (ucs4_t uc)
1083 _UC_ATTRIBUTE_CONST;
1084
1085 /* Test for any character that corresponds to a decimal-digit character. */
1086 extern bool
1087 uc_is_digit (ucs4_t uc)
1088 _UC_ATTRIBUTE_CONST;
1089
1090 /* Test for any character for which 'uc_is_print' is true and 'uc_is_space'
1091 is false. */
1092 extern bool
1093 uc_is_graph (ucs4_t uc)
1094 _UC_ATTRIBUTE_CONST;
1095
1096 /* Test for any character that corresponds to a lowercase letter or is one
1097 of a locale-specific set of characters for which none of 'uc_is_cntrl',
1098 'uc_is_digit', 'uc_is_punct', or 'uc_is_space' is true. */
1099 extern bool
1100 uc_is_lower (ucs4_t uc)
1101 _UC_ATTRIBUTE_CONST;
1102
1103 /* Test for any printing character. */
1104 extern bool
1105 uc_is_print (ucs4_t uc)
1106 _UC_ATTRIBUTE_CONST;
1107
1108 /* Test for any printing character that is one of a locale-specific set of
1109 characters for which neither 'uc_is_space' nor 'uc_is_alnum' is true. */
1110 extern bool
1111 uc_is_punct (ucs4_t uc)
1112 _UC_ATTRIBUTE_CONST;
1113
1114 /* Test for any character that corresponds to a locale-specific set of
1115 characters for which none of 'uc_is_alnum', 'uc_is_graph', or 'uc_is_punct'
1116 is true. */
1117 extern bool
1118 uc_is_space (ucs4_t uc)
1119 _UC_ATTRIBUTE_CONST;
1120
1121 /* Test for any character that corresponds to an uppercase letter or is one
1122 of a locale-specific set of character for which none of 'uc_is_cntrl',
1123 'uc_is_digit', 'uc_is_punct', or 'uc_is_space' is true. */
1124 extern bool
1125 uc_is_upper (ucs4_t uc)
1126 _UC_ATTRIBUTE_CONST;
1127
1128 /* Test for any character that corresponds to a hexadecimal-digit
1129 character. */
1130 extern bool
1131 uc_is_xdigit (ucs4_t uc)
1132 _UC_ATTRIBUTE_CONST;
1133
1134 /* GNU extension. */
1135 /* Test for any character that corresponds to a standard blank character or
1136 a locale-specific set of characters for which 'uc_is_alnum' is false. */
1137 extern bool
1138 uc_is_blank (ucs4_t uc)
1139 _UC_ATTRIBUTE_CONST;
1140
1141 /* ========================================================================= */
1142
1143 #ifdef __cplusplus
1144 }
1145 #endif
1146
1147 #endif /* _UNICTYPE_H */