]>
Commit | Line | Data |
---|---|---|
b75a7d8f A |
1 | /* |
2 | ******************************************************************************* | |
3 | * | |
374ca955 | 4 | * Copyright (C) 1999-2004, International Business Machines |
b75a7d8f A |
5 | * Corporation and others. All Rights Reserved. |
6 | * | |
7 | ******************************************************************************* | |
8 | * file name: genprops.h | |
9 | * encoding: US-ASCII | |
10 | * tab size: 8 (not used) | |
11 | * indentation:4 | |
12 | * | |
13 | * created on: 1999dec13 | |
14 | * created by: Markus W. Scherer | |
15 | */ | |
16 | ||
17 | #ifndef __GENPROPS_H__ | |
18 | #define __GENPROPS_H__ | |
19 | ||
20 | #include "unicode/utypes.h" | |
21 | #include "utrie.h" | |
22 | ||
23 | /* file definitions */ | |
24 | #define DATA_NAME "uprops" | |
25 | #define DATA_TYPE "icu" | |
26 | ||
27 | /* special casing data */ | |
28 | typedef struct { | |
29 | uint32_t code; | |
30 | UBool isComplex; | |
31 | UChar lowerCase[32], upperCase[32], titleCase[32]; | |
32 | } SpecialCasing; | |
33 | ||
34 | /* case folding data */ | |
35 | typedef struct { | |
36 | uint32_t code, simple; | |
37 | char status; | |
38 | UChar full[32]; | |
39 | } CaseFolding; | |
40 | ||
41 | /* character properties */ | |
42 | typedef struct { | |
43 | uint32_t code, lowerCase, upperCase, titleCase, mirrorMapping; | |
44 | int32_t numericValue; /* see numericType */ | |
45 | uint32_t denominator; /* 0: no value */ | |
46 | uint8_t generalCategory, bidi, isMirrored, numericType; | |
47 | SpecialCasing *specialCasing; | |
48 | CaseFolding *caseFolding; | |
49 | } Props; | |
50 | ||
51 | /* global flags */ | |
52 | extern UBool beVerbose, haveCopyright; | |
53 | ||
54 | /* name tables */ | |
55 | extern const char *const | |
56 | bidiNames[]; | |
57 | ||
58 | extern const char *const | |
59 | genCategoryNames[]; | |
60 | ||
61 | /* properties vectors in props2.c */ | |
62 | extern uint32_t *pv; | |
63 | ||
64 | /* prototypes */ | |
65 | U_CFUNC void | |
66 | writeUCDFilename(char *basename, const char *filename, const char *suffix); | |
67 | ||
68 | U_CFUNC UBool | |
69 | isToken(const char *token, const char *s); | |
70 | ||
71 | U_CFUNC int32_t | |
72 | getTokenIndex(const char *const tokens[], int32_t countTokens, const char *s); | |
73 | ||
74 | extern void | |
75 | setUnicodeVersion(const char *v); | |
76 | ||
77 | extern void | |
78 | initStore(void); | |
79 | ||
80 | extern uint32_t | |
81 | makeProps(Props *p); | |
82 | ||
83 | extern void | |
84 | addProps(uint32_t c, uint32_t props); | |
85 | ||
86 | extern uint32_t | |
87 | getProps(uint32_t c); | |
88 | ||
89 | extern void | |
90 | repeatProps(uint32_t first, uint32_t last, uint32_t props); | |
91 | ||
374ca955 | 92 | U_CFUNC uint32_t U_EXPORT2 |
b75a7d8f A |
93 | getFoldedPropsValue(UNewTrie *trie, UChar32 start, int32_t offset); |
94 | ||
95 | extern void | |
96 | addCaseSensitive(UChar32 first, UChar32 last); | |
97 | ||
98 | extern void | |
99 | generateData(const char *dataDir); | |
100 | ||
101 | /* props2.c */ | |
102 | U_CFUNC void | |
103 | initAdditionalProperties(void); | |
104 | ||
105 | U_CFUNC void | |
106 | generateAdditionalProperties(char *filename, const char *suffix, UErrorCode *pErrorCode); | |
107 | ||
108 | U_CFUNC int32_t | |
109 | writeAdditionalData(uint8_t *p, int32_t capacity, int32_t indexes[16]); | |
110 | ||
111 | #endif | |
112 |