2
*******************************************************************************
4
* Copyright (C) 2002, International Business Machines
5
* Corporation and others. All Rights Reserved.
7
*******************************************************************************
10
* tab size: 8 (not used)
13
* created on: 2002feb24
14
* created by: Markus W. Scherer
16
* Constants for mostly non-core Unicode character properties
17
* stored in uprops.dat.
23
/* indexes[] entries */
26
UPROPS_EXCEPTIONS_INDEX,
27
UPROPS_EXCEPTIONS_TOP_INDEX,
29
UPROPS_ADDITIONAL_TRIE_INDEX,
30
UPROPS_ADDITIONAL_VECTORS_INDEX,
31
UPROPS_ADDITIONAL_VECTORS_COLUMNS_INDEX,
33
UPROPS_RESERVED_INDEX,
38
/* definitions for the main properties words */
40
/* general category shift==0 0 (5 bits) */
41
UPROPS_EXCEPTION_SHIFT=5, /* 5 (1 bit) */
42
UPROPS_BIDI_SHIFT, /* 6 (5 bits) */
43
UPROPS_MIRROR_SHIFT=UPROPS_BIDI_SHIFT+5, /* 11 (1 bit) */
44
UPROPS_NUMERIC_TYPE_SHIFT, /* 12 (3 bits) */
45
UPROPS_RESERVED_SHIFT=UPROPS_NUMERIC_TYPE_SHIFT+3, /* 15 (5 bits) */
46
UPROPS_VALUE_SHIFT=20, /* 20 */
48
UPROPS_EXCEPTION_BIT=1UL<<UPROPS_EXCEPTION_SHIFT,
49
UPROPS_VALUE_BITS=32-UPROPS_VALUE_SHIFT,
51
UPROPS_MIN_VALUE=-(1L<<(UPROPS_VALUE_BITS-1)),
52
UPROPS_MAX_VALUE=(1L<<(UPROPS_VALUE_BITS-1))-1,
53
UPROPS_MAX_EXCEPTIONS_COUNT=1L<<UPROPS_VALUE_BITS
56
/* number of properties vector words */
57
#define UPROPS_VECTOR_WORDS 2
60
* Properties in vector word 0
62
* 31..24 DerivedAge version major/minor one nibble each
64
* 17..15 East Asian Width
69
/* derived age: one nibble each for major and minor version numbers */
70
#define UPROPS_AGE_MASK 0xff000000
71
#define UPROPS_AGE_SHIFT 24
73
#define UPROPS_EA_WIDTH_MASK 0x00038000
74
#define UPROPS_EA_WIDTH_SHIFT 15
76
#define UPROPS_BLOCK_MASK 0x00007f80
77
#define UPROPS_BLOCK_SHIFT 7
79
#define UPROPS_SCRIPT_MASK 0x0000007f
82
* Properties in vector word 1
83
* Each bit encodes one binary property.
84
* The following constants represent the bit number, use 1<<UPROPS_XYZ.
85
* UPROPS_BINARY_1_TOP<=32!
87
* Keep this list of property enums in sync with
88
* propListNames[] in icu/source/tools/genprops/props2.c!
96
UPROPS_QUOTATION_MARK,
97
UPROPS_TERMINAL_PUNCTUATION,
100
UPROPS_ASCII_HEX_DIGIT,
101
UPROPS_OTHER_ALPHABETIC,
105
UPROPS_OTHER_LOWERCASE,
106
UPROPS_OTHER_UPPERCASE,
107
UPROPS_NONCHARACTER_CODE_POINT,
108
UPROPS_OTHER_GRAPHEME_EXTEND,
109
UPROPS_GRAPHEME_LINK,
110
UPROPS_IDS_BINARY_OPERATOR,
111
UPROPS_IDS_TRINARY_OPERATOR,
113
UPROPS_UNIFIED_IDEOGRAPH,
114
UPROPS_OTHER_DEFAULT_IGNORABLE_CODE_POINT,
117
UPROPS_LOGICAL_ORDER_EXCEPTION,
119
/* derivedPropListNames[] in genprops/props2.c, not easily derivable */
127
* Get a properties vector word for a code point.
128
* Implemented in uchar.c for uprops.c.
129
* @return 0 if no data or illegal argument
132
u_getUnicodeProperties(UChar32 c, int32_t column);
134
/* ### TODO check with PropertyValueAliases.txt and move to uchar.h, @draft ICU 2.x */
136
* East Asian Widths constants.
137
* Keep in sync with names list in genprops/props2.c.
148
typedef enum UEAWidthCode UEAWidthCode;