]>
Commit | Line | Data |
---|---|---|
b75a7d8f A |
1 | /* |
2 | ******************************************************************************* | |
3 | * | |
73c04bcf | 4 | * Copyright (C) 1999-2005, 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 | ||
b75a7d8f A |
27 | /* character properties */ |
28 | typedef struct { | |
73c04bcf | 29 | uint32_t code; |
b75a7d8f A |
30 | int32_t numericValue; /* see numericType */ |
31 | uint32_t denominator; /* 0: no value */ | |
73c04bcf | 32 | uint8_t generalCategory, numericType, exponent; |
b75a7d8f A |
33 | } Props; |
34 | ||
35 | /* global flags */ | |
36 | extern UBool beVerbose, haveCopyright; | |
37 | ||
b75a7d8f A |
38 | extern const char *const |
39 | genCategoryNames[]; | |
40 | ||
41 | /* properties vectors in props2.c */ | |
42 | extern uint32_t *pv; | |
43 | ||
44 | /* prototypes */ | |
45 | U_CFUNC void | |
46 | writeUCDFilename(char *basename, const char *filename, const char *suffix); | |
47 | ||
48 | U_CFUNC UBool | |
49 | isToken(const char *token, const char *s); | |
50 | ||
51 | U_CFUNC int32_t | |
52 | getTokenIndex(const char *const tokens[], int32_t countTokens, const char *s); | |
53 | ||
54 | extern void | |
55 | setUnicodeVersion(const char *v); | |
56 | ||
57 | extern void | |
58 | initStore(void); | |
59 | ||
73c04bcf A |
60 | extern void |
61 | exitStore(void); | |
62 | ||
b75a7d8f A |
63 | extern uint32_t |
64 | makeProps(Props *p); | |
65 | ||
66 | extern void | |
67 | addProps(uint32_t c, uint32_t props); | |
68 | ||
69 | extern uint32_t | |
70 | getProps(uint32_t c); | |
71 | ||
72 | extern void | |
73 | repeatProps(uint32_t first, uint32_t last, uint32_t props); | |
74 | ||
b75a7d8f | 75 | extern void |
73c04bcf | 76 | generateData(const char *dataDir, UBool csource); |
b75a7d8f A |
77 | |
78 | /* props2.c */ | |
79 | U_CFUNC void | |
80 | initAdditionalProperties(void); | |
81 | ||
73c04bcf A |
82 | U_CFUNC void |
83 | exitAdditionalProperties(void); | |
84 | ||
b75a7d8f A |
85 | U_CFUNC void |
86 | generateAdditionalProperties(char *filename, const char *suffix, UErrorCode *pErrorCode); | |
87 | ||
88 | U_CFUNC int32_t | |
73c04bcf | 89 | writeAdditionalData(FILE *f, uint8_t *p, int32_t capacity, int32_t indexes[16]); |
b75a7d8f A |
90 | |
91 | #endif |