2 *******************************************************************************
4 * Copyright (C) 2000-2003, International Business Machines
5 * Corporation and others. All Rights Reserved.
7 *******************************************************************************
8 * file name: ucol_elm.h
10 * tab size: 8 (not used)
14 * created by: Vladimir Weinstein
16 * This program reads the Franctional UCA table and generates
17 * internal format for UCA table as well as inverse UCA table.
18 * It then writes binary files containing the data: ucadata.dat
21 #ifndef UCOL_UCAELEMS_H
22 #define UCOL_UCAELEMS_H
24 #include "unicode/utypes.h"
26 #if !UCONFIG_NO_COLLATION
45 UChar prefixChars
[128];
50 uint32_t cSize
; /* Number of characters in sequence - for contraction */
51 uint32_t noOfCEs
; /* Number of collation elements */
52 uint32_t CEs
[128]; /* These are collation elements - there could be more than one - in case of expansion */
53 uint32_t mapCE
; /* This is the value element maps in original table */
54 uint32_t sizePrim
[128];
55 uint32_t sizeSec
[128];
56 uint32_t sizeTer
[128];
63 uint32_t *endExpansionCE
;
70 } MaxJamoExpansionTable
;
73 uint32_t *endExpansionCE
;
74 uint8_t *expansionCESize
;
80 /*CompactEIntArray *mapping; */
82 ExpansionTable
*expansions
;
83 struct CntTable
*contractions
;
84 UCATableHeader
*image
;
85 UColOptionSet
*options
;
86 MaxExpansionTable
*maxExpansions
;
87 MaxJamoExpansionTable
*maxJamoExpansions
;
91 UHashtable
*prefixLookup
;
94 U_CAPI tempUCATable
* U_EXPORT2
uprv_uca_initTempTable(UCATableHeader
*image
, UColOptionSet
*opts
, const UCollator
*UCA
, UColCETags initTag
, UColCETags supplementaryInitTag
, UErrorCode
*status
);
95 U_CAPI tempUCATable
* U_EXPORT2
uprv_uca_cloneTempTable(tempUCATable
*t
, UErrorCode
*status
);
96 U_CAPI
void U_EXPORT2
uprv_uca_closeTempTable(tempUCATable
*t
);
97 U_CAPI
uint32_t U_EXPORT2
uprv_uca_addAnElement(tempUCATable
*t
, UCAElements
*element
, UErrorCode
*status
);
98 U_CAPI UCATableHeader
* U_EXPORT2
uprv_uca_assembleTable(tempUCATable
*t
, UErrorCode
*status
);
99 U_CAPI
int32_t U_EXPORT2
100 uprv_uca_canonicalClosure(tempUCATable
*t
, UErrorCode
*status
);
103 #define paddedsize(something) ((something)+((((something)%4)!=0)?(4-(something)%4):0))
104 #define headersize (paddedsize(sizeof(UCATableHeader))+paddedsize(sizeof(UColOptionSet)))
108 #endif /* #if !UCONFIG_NO_COLLATION */