]> git.saurik.com Git - apple/icu.git/blame - icuSources/tools/genprops/genprops.h
ICU-6.2.22.tar.gz
[apple/icu.git] / icuSources / tools / genprops / genprops.h
CommitLineData
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 */
28typedef struct {
29 uint32_t code;
30 UBool isComplex;
31 UChar lowerCase[32], upperCase[32], titleCase[32];
32} SpecialCasing;
33
34/* case folding data */
35typedef struct {
36 uint32_t code, simple;
37 char status;
38 UChar full[32];
39} CaseFolding;
40
41/* character properties */
42typedef 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 */
52extern UBool beVerbose, haveCopyright;
53
54/* name tables */
55extern const char *const
56bidiNames[];
57
58extern const char *const
59genCategoryNames[];
60
61/* properties vectors in props2.c */
62extern uint32_t *pv;
63
64/* prototypes */
65U_CFUNC void
66writeUCDFilename(char *basename, const char *filename, const char *suffix);
67
68U_CFUNC UBool
69isToken(const char *token, const char *s);
70
71U_CFUNC int32_t
72getTokenIndex(const char *const tokens[], int32_t countTokens, const char *s);
73
74extern void
75setUnicodeVersion(const char *v);
76
77extern void
78initStore(void);
79
80extern uint32_t
81makeProps(Props *p);
82
83extern void
84addProps(uint32_t c, uint32_t props);
85
86extern uint32_t
87getProps(uint32_t c);
88
89extern void
90repeatProps(uint32_t first, uint32_t last, uint32_t props);
91
374ca955 92U_CFUNC uint32_t U_EXPORT2
b75a7d8f
A
93getFoldedPropsValue(UNewTrie *trie, UChar32 start, int32_t offset);
94
95extern void
96addCaseSensitive(UChar32 first, UChar32 last);
97
98extern void
99generateData(const char *dataDir);
100
101/* props2.c */
102U_CFUNC void
103initAdditionalProperties(void);
104
105U_CFUNC void
106generateAdditionalProperties(char *filename, const char *suffix, UErrorCode *pErrorCode);
107
108U_CFUNC int32_t
109writeAdditionalData(uint8_t *p, int32_t capacity, int32_t indexes[16]);
110
111#endif
112