~ubuntu-branches/ubuntu/quantal/icu/quantal

« back to all changes in this revision

Viewing changes to source/tools/genprops/genprops.h

  • Committer: Package Import Robot
  • Author(s): Yves Arrouye
  • Date: 2002-03-03 15:31:13 UTC
  • Revision ID: package-import@ubuntu.com-20020303153113-3ssceqlq45xbmbnc
Tags: upstream-2.0-2.1pre20020303
ImportĀ upstreamĀ versionĀ 2.0-2.1pre20020303

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
*******************************************************************************
 
3
*
 
4
*   Copyright (C) 1999-2002, 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 "dat"
 
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
    int16_t decimalDigitValue, digitValue; /* -1: no value */
 
45
    int32_t numericValue; /* see numericType */
 
46
    uint32_t denominator; /* 0: no value */
 
47
    uint8_t generalCategory, canonicalCombining, bidi, isMirrored, numericType;
 
48
    SpecialCasing *specialCasing;
 
49
    CaseFolding *caseFolding;
 
50
} Props;
 
51
 
 
52
/* global flags */
 
53
extern UBool beVerbose, haveCopyright;
 
54
 
 
55
/* name tables */
 
56
extern const char *const
 
57
bidiNames[];
 
58
 
 
59
extern const char *const
 
60
genCategoryNames[];
 
61
 
 
62
/* prototypes */
 
63
U_CFUNC void
 
64
writeUCDFilename(char *basename, const char *filename, const char *suffix);
 
65
 
 
66
U_CFUNC int32_t
 
67
getTokenIndex(const char *const tokens[], int32_t countTokens, const char *s);
 
68
 
 
69
extern void
 
70
setUnicodeVersion(const char *v);
 
71
 
 
72
extern void
 
73
initStore(void);
 
74
 
 
75
extern uint32_t
 
76
makeProps(Props *p);
 
77
 
 
78
extern void
 
79
addProps(uint32_t c, uint32_t props);
 
80
 
 
81
extern void
 
82
repeatProps(uint32_t first, uint32_t last, uint32_t props);
 
83
 
 
84
U_CAPI uint32_t U_EXPORT2
 
85
getFoldedPropsValue(UNewTrie *trie, UChar32 start, int32_t offset);
 
86
 
 
87
extern void
 
88
generateData(const char *dataDir);
 
89
 
 
90
/* props2.c */
 
91
U_CFUNC void
 
92
generateAdditionalProperties(char *filename, const char *suffix, UErrorCode *pErrorCode);
 
93
 
 
94
U_CFUNC int32_t
 
95
writeAdditionalData(uint8_t *p, int32_t capacity, int32_t indexes[16]);
 
96
 
 
97
#endif
 
98