]> git.saurik.com Git - apple/icu.git/blame - icuSources/tools/genprops/genprops.h
ICU-400.42.tar.gz
[apple/icu.git] / icuSources / tools / genprops / genprops.h
CommitLineData
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 */
28typedef 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 */
36extern UBool beVerbose, haveCopyright;
37
b75a7d8f
A
38extern const char *const
39genCategoryNames[];
40
41/* properties vectors in props2.c */
42extern uint32_t *pv;
43
44/* prototypes */
45U_CFUNC void
46writeUCDFilename(char *basename, const char *filename, const char *suffix);
47
48U_CFUNC UBool
49isToken(const char *token, const char *s);
50
51U_CFUNC int32_t
52getTokenIndex(const char *const tokens[], int32_t countTokens, const char *s);
53
54extern void
55setUnicodeVersion(const char *v);
56
57extern void
58initStore(void);
59
73c04bcf
A
60extern void
61exitStore(void);
62
b75a7d8f
A
63extern uint32_t
64makeProps(Props *p);
65
66extern void
67addProps(uint32_t c, uint32_t props);
68
69extern uint32_t
70getProps(uint32_t c);
71
72extern void
73repeatProps(uint32_t first, uint32_t last, uint32_t props);
74
b75a7d8f 75extern void
73c04bcf 76generateData(const char *dataDir, UBool csource);
b75a7d8f
A
77
78/* props2.c */
79U_CFUNC void
80initAdditionalProperties(void);
81
73c04bcf
A
82U_CFUNC void
83exitAdditionalProperties(void);
84
b75a7d8f
A
85U_CFUNC void
86generateAdditionalProperties(char *filename, const char *suffix, UErrorCode *pErrorCode);
87
88U_CFUNC int32_t
73c04bcf 89writeAdditionalData(FILE *f, uint8_t *p, int32_t capacity, int32_t indexes[16]);
b75a7d8f
A
90
91#endif