]>
Commit | Line | Data |
---|---|---|
1 | /* | |
2 | ******************************************************************************* | |
3 | * | |
4 | * Copyright (C) 1999-2005, International Business Machines | |
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 | /* character properties */ | |
28 | typedef struct { | |
29 | uint32_t code; | |
30 | int32_t numericValue; /* see numericType */ | |
31 | uint32_t denominator; /* 0: no value */ | |
32 | uint8_t generalCategory, numericType, exponent; | |
33 | } Props; | |
34 | ||
35 | /* global flags */ | |
36 | extern UBool beVerbose, haveCopyright; | |
37 | ||
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 | ||
60 | extern void | |
61 | exitStore(void); | |
62 | ||
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 | ||
75 | extern void | |
76 | generateData(const char *dataDir, UBool csource); | |
77 | ||
78 | /* props2.c */ | |
79 | U_CFUNC void | |
80 | initAdditionalProperties(void); | |
81 | ||
82 | U_CFUNC void | |
83 | exitAdditionalProperties(void); | |
84 | ||
85 | U_CFUNC void | |
86 | generateAdditionalProperties(char *filename, const char *suffix, UErrorCode *pErrorCode); | |
87 | ||
88 | U_CFUNC int32_t | |
89 | writeAdditionalData(FILE *f, uint8_t *p, int32_t capacity, int32_t indexes[16]); | |
90 | ||
91 | #endif |