/*
******************************************************************************
-* Copyright (c) 1996-2006, International Business Machines
+* Copyright (c) 1996-2007, International Business Machines
* Corporation and others. All Rights Reserved.
******************************************************************************
* File unorm.cpp
*/
#define LENGTHOF(array) (int32_t)(sizeof(array)/sizeof((array)[0]))
+U_NAMESPACE_USE
+
/*
* This new implementation of the normalization code loads its data from
* unorm.dat, which is generated with the gennorm tool.
errorCode=U_MEMORY_ALLOCATION_ERROR;
return NULL;
}
+ // Compact the set for caching.
+ set->compact();
umtx_lock(NULL);
if(nxCache[UNORM_NX_HANGUL]==NULL) {
for(i=0; uset_getSerializedRange(&sset, i, &start, &end); ++i) {
set->add(start, end);
}
+ // Compact the set for caching.
+ set->compact();
umtx_lock(NULL);
if(nxCache[options]==NULL) {
delete set;
return NULL;
}
+ // Compact the set for caching.
+ set->compact();
umtx_lock(NULL);
if(nxCache[options]==NULL) {
#endif
}
-U_CAPI UBool U_EXPORT2
+U_CFUNC UBool U_EXPORT2
unorm_internalIsFullCompositionExclusion(UChar32 c) {
#if UNORM_HARDCODE_DATA
if(auxTrie.index!=NULL) {
}
}
-U_CAPI UBool U_EXPORT2
+U_CFUNC UBool U_EXPORT2
unorm_isCanonSafeStart(UChar32 c) {
#if UNORM_HARDCODE_DATA
if(auxTrie.index!=NULL) {
sa->add(sa->set, HANGUL_BASE+HANGUL_COUNT); /* add Hangul+1 to continue with other properties */
}
-U_CAPI UNormalizationCheckResult U_EXPORT2
+U_CFUNC UNormalizationCheckResult U_EXPORT2
unorm_getQuickCheck(UChar32 c, UNormalizationMode mode) {
static const uint32_t qcMask[UNORM_MODE_COUNT]={
0, 0, _NORM_QC_NFD, _NORM_QC_NFKD, _NORM_QC_NFC, _NORM_QC_NFKC
}
}
-U_CAPI uint16_t U_EXPORT2
+U_CFUNC uint16_t U_EXPORT2
unorm_getFCD16FromCodePoint(UChar32 c) {
- UErrorCode errorCode;
uint16_t fcd;
-
+#if !UNORM_HARDCODE_DATA
+ UErrorCode errorCode;
errorCode=U_ZERO_ERROR;
+#endif
+
if(
#if !UNORM_HARDCODE_DATA
!_haveData(errorCode) ||