]> git.saurik.com Git - apple/icu.git/blob - icuSources/tools/gencase/gencase.h
ICU-6.2.15.tar.gz
[apple/icu.git] / icuSources / tools / gencase / gencase.h
1 /*
2 *******************************************************************************
3 *
4 * Copyright (C) 2004, International Business Machines
5 * Corporation and others. All Rights Reserved.
6 *
7 *******************************************************************************
8 * file name: gencase.h
9 * encoding: US-ASCII
10 * tab size: 8 (not used)
11 * indentation:4
12 *
13 * created on: 2004aug28
14 * created by: Markus W. Scherer
15 */
16
17 #ifndef __GENCASE_H__
18 #define __GENCASE_H__
19
20 #include "unicode/utypes.h"
21 #include "utrie.h"
22 #include "ucase.h"
23
24 U_CDECL_BEGIN
25
26 /* gencase ------------------------------------------------------------------ */
27
28 #define UGENCASE_EXC_SHIFT 16
29 #define UGENCASE_EXC_MASK 0xffff0000
30
31 /* special casing data */
32 typedef struct {
33 UChar32 code;
34 UBool isComplex;
35 UChar lowerCase[32], upperCase[32], titleCase[32];
36 } SpecialCasing;
37
38 /* case folding data */
39 typedef struct {
40 UChar32 code, simple;
41 char status;
42 UChar full[32];
43 } CaseFolding;
44
45 /* case mapping properties */
46 typedef struct {
47 UChar32 code, lowerCase, upperCase, titleCase;
48 SpecialCasing *specialCasing;
49 CaseFolding *caseFolding;
50 uint8_t gc, cc;
51 } Props;
52
53 /* global flags */
54 extern UBool beVerbose, haveCopyright;
55
56 /* properties vectors in gencase.c */
57 extern uint32_t *pv;
58
59 /* prototypes */
60 U_CFUNC void
61 writeUCDFilename(char *basename, const char *filename, const char *suffix);
62
63 U_CFUNC UBool
64 isToken(const char *token, const char *s);
65
66 extern void
67 setUnicodeVersion(const char *v);
68
69 extern void
70 setProps(Props *p);
71
72 U_CFUNC uint32_t U_EXPORT2
73 getFoldedPropsValue(UNewTrie *trie, UChar32 start, int32_t offset);
74
75 extern void
76 addCaseSensitive(UChar32 first, UChar32 last);
77
78 extern void
79 makeCaseClosure(void);
80
81 extern void
82 makeExceptions(void);
83
84 extern void
85 generateData(const char *dataDir);
86
87 U_CDECL_END
88
89 #endif