ICU-1988 Regenerate urename.h and hide/rename the non-API functions
X-SVN-Rev: 9193
This commit is contained in:
parent
d4f4125d79
commit
86b7c21c50
File diff suppressed because it is too large
Load Diff
@ -48,20 +48,20 @@
|
||||
#define U_ICU_VERSION_MAJOR_NUM 2
|
||||
|
||||
/** The current ICU minor version as an integer. */
|
||||
#define U_ICU_VERSION_MINOR_NUM 1
|
||||
#define U_ICU_VERSION_MINOR_NUM 2
|
||||
|
||||
/** The current ICU patchlevel version as an integer. */
|
||||
#define U_ICU_VERSION_PATCHLEVEL_NUM 0
|
||||
|
||||
/** Glued version suffix for renamers */
|
||||
#define U_ICU_VERSION_SUFFIX _2_1
|
||||
#define U_ICU_VERSION_SUFFIX _2_2
|
||||
|
||||
/** The current ICU library version as a dotted-decimal string. The patchlevel
|
||||
only appears in this string if it non-zero. */
|
||||
#define U_ICU_VERSION "2.1"
|
||||
#define U_ICU_VERSION "2.2"
|
||||
|
||||
/** The current ICU library major/minor version as a string without dots, for library name suffixes. */
|
||||
#define U_ICU_VERSION_SHORT "21"
|
||||
#define U_ICU_VERSION_SHORT "22"
|
||||
|
||||
/** An ICU version consists of up to 4 numbers from 0..255. */
|
||||
#define U_MAX_VERSION_LENGTH 4
|
||||
@ -76,7 +76,7 @@
|
||||
typedef uint8_t UVersionInfo[U_MAX_VERSION_LENGTH];
|
||||
|
||||
#if U_HAVE_NAMESPACE && defined(XP_CPLUSPLUS)
|
||||
#define U_ICU_NAMESPACE icu_2_1
|
||||
#define U_ICU_NAMESPACE icu_2_2
|
||||
namespace U_ICU_NAMESPACE { }
|
||||
namespace icu = U_ICU_NAMESPACE;
|
||||
U_NAMESPACE_USE
|
||||
|
@ -193,7 +193,7 @@ void CollationElementIterator::setText(const UnicodeString& source,
|
||||
}
|
||||
*string = 0;
|
||||
}
|
||||
init_collIterate(m_data_->iteratordata_.coll, string, length,
|
||||
uprv_init_collIterate(m_data_->iteratordata_.coll, string, length,
|
||||
&m_data_->iteratordata_);
|
||||
|
||||
m_data_->reset_ = TRUE;
|
||||
@ -237,7 +237,7 @@ void CollationElementIterator::setText(CharacterIterator& source,
|
||||
if (m_data_->isWritable && m_data_->iteratordata_.string != NULL)
|
||||
uprv_free(m_data_->iteratordata_.string);
|
||||
m_data_->isWritable = TRUE;
|
||||
init_collIterate(m_data_->iteratordata_.coll, buffer, length,
|
||||
uprv_init_collIterate(m_data_->iteratordata_.coll, buffer, length,
|
||||
&m_data_->iteratordata_);
|
||||
m_data_->reset_ = TRUE;
|
||||
}
|
||||
|
@ -121,7 +121,7 @@ inline void IInit_collIterate(const UCollator *collator, const UChar *sourceStr
|
||||
}
|
||||
|
||||
U_CAPI void U_EXPORT2
|
||||
init_collIterate(const UCollator *collator, const UChar *sourceString,
|
||||
uprv_init_collIterate(const UCollator *collator, const UChar *sourceString,
|
||||
int32_t sourceLen, collIterate *s){
|
||||
/* Out-of-line version for use from other files. */
|
||||
IInit_collIterate(collator, sourceString, sourceLen, s);
|
||||
@ -5175,7 +5175,7 @@ ucol_getVersion(const UCollator* coll,
|
||||
|
||||
/* This internal API checks whether a character is tailored or not */
|
||||
U_CAPI UBool U_EXPORT2
|
||||
isTailored(const UCollator *coll, const UChar u, UErrorCode *status) {
|
||||
ucol_isTailored(const UCollator *coll, const UChar u, UErrorCode *status) {
|
||||
uint32_t CE = UCOL_NOT_FOUND;
|
||||
const UChar *ContractionStart = NULL;
|
||||
if(U_SUCCESS(*status) && coll != NULL) {
|
||||
|
@ -689,7 +689,7 @@ uint8_t ucol_uprv_getCaseBits(const UCollator *UCA, const UChar *src, uint32_t l
|
||||
nLen = unorm_normalize(src, len, UNORM_NFKD, 0, n, 128, status);
|
||||
if(U_SUCCESS(*status)) {
|
||||
for(i = 0; i < nLen; i++) {
|
||||
init_collIterate(UCA, &n[i], 1, &s);
|
||||
uprv_init_collIterate(UCA, &n[i], 1, &s);
|
||||
order = ucol_getNextCE(UCA, &s, status);
|
||||
if(isContinuation(order)) {
|
||||
*status = U_INTERNAL_PROGRAM_ERROR;
|
||||
@ -765,7 +765,7 @@ U_CFUNC void ucol_createElements(UColTokenParser *src, tempUCATable *t, UColTokL
|
||||
/* then pick CEs out until there is no more and stuff them into expansion */
|
||||
collIterate s;
|
||||
uint32_t order = 0;
|
||||
init_collIterate(src->UCA, expOffset + src->source, 1, &s);
|
||||
uprv_init_collIterate(src->UCA, expOffset + src->source, 1, &s);
|
||||
|
||||
for(;;) {
|
||||
order = ucol_getNextCE(src->UCA, &s, status);
|
||||
@ -1034,7 +1034,7 @@ UCATableHeader *ucol_assembleTailoringTable(UColTokenParser *src, UErrorCode *st
|
||||
el.noOfCEs = 0;
|
||||
el.prefix = el.prefixChars;
|
||||
el.prefixSize = 0;
|
||||
init_collIterate(src->UCA, decomp, 1, &colIt);
|
||||
uprv_init_collIterate(src->UCA, decomp, 1, &colIt);
|
||||
while(CE != UCOL_NO_MORE_CES) {
|
||||
CE = ucol_getNextCE(src->UCA, &colIt, status);
|
||||
if(CE != UCOL_NO_MORE_CES) {
|
||||
|
@ -72,7 +72,7 @@ uprv_cnttab_open(UNewTrie *mapping, UErrorCode *status) {
|
||||
return tbl;
|
||||
}
|
||||
|
||||
ContractionTable *addATableElement(CntTable *table, uint32_t *key, UErrorCode *status) {
|
||||
static ContractionTable *addATableElement(CntTable *table, uint32_t *key, UErrorCode *status) {
|
||||
ContractionTable *el = (ContractionTable *)uprv_malloc(sizeof(ContractionTable));
|
||||
if(el == NULL) {
|
||||
*status = U_MEMORY_ALLOCATION_ERROR;
|
||||
@ -444,7 +444,7 @@ uprv_cnttab_setContraction(CntTable *table, uint32_t element, uint32_t offset, U
|
||||
return(constructContractCE(table->currentTag, element));
|
||||
}
|
||||
|
||||
ContractionTable *_cnttab_getContractionTable(CntTable *table, uint32_t element) {
|
||||
static ContractionTable *_cnttab_getContractionTable(CntTable *table, uint32_t element) {
|
||||
element &= 0xFFFFFF;
|
||||
ContractionTable *tbl = NULL;
|
||||
|
||||
@ -455,7 +455,7 @@ ContractionTable *_cnttab_getContractionTable(CntTable *table, uint32_t element)
|
||||
}
|
||||
}
|
||||
|
||||
int32_t _cnttab_findCP(ContractionTable *tbl, UChar codePoint) {
|
||||
static int32_t _cnttab_findCP(ContractionTable *tbl, UChar codePoint) {
|
||||
uint32_t position = 0;
|
||||
if(tbl == NULL) {
|
||||
return -1;
|
||||
@ -474,7 +474,7 @@ int32_t _cnttab_findCP(ContractionTable *tbl, UChar codePoint) {
|
||||
}
|
||||
}
|
||||
|
||||
uint32_t _cnttab_getCE(ContractionTable *tbl, int32_t position) {
|
||||
static uint32_t _cnttab_getCE(ContractionTable *tbl, int32_t position) {
|
||||
if(tbl == NULL) {
|
||||
return UCOL_NOT_FOUND;
|
||||
}
|
||||
|
@ -161,7 +161,7 @@ struct collIterateState {
|
||||
};
|
||||
|
||||
U_CAPI void U_EXPORT2
|
||||
init_collIterate(const UCollator *collator, const UChar *sourceString, int32_t sourceLen, collIterate *s);
|
||||
uprv_init_collIterate(const UCollator *collator, const UChar *sourceString, int32_t sourceLen, collIterate *s);
|
||||
|
||||
|
||||
struct UCollationElements
|
||||
@ -778,7 +778,7 @@ void ucol_updateInternalState(UCollator *coll);
|
||||
|
||||
U_CAPI uint32_t U_EXPORT2 ucol_getFirstCE(const UCollator *coll, UChar u, UErrorCode *status);
|
||||
U_CAPI char* U_EXPORT2 ucol_sortKeyToString(const UCollator *coll, const uint8_t *sortkey, char *buffer, uint32_t *len);
|
||||
U_CAPI UBool U_EXPORT2 isTailored(const UCollator *coll, const UChar u, UErrorCode *status);
|
||||
U_CAPI UBool U_EXPORT2 ucol_isTailored(const UCollator *coll, const UChar u, UErrorCode *status);
|
||||
|
||||
U_CAPI const InverseTableHeader* U_EXPORT2 ucol_initInverseUCA(UErrorCode *status);
|
||||
U_CAPI int32_t U_EXPORT2 ucol_inv_getNextCE(uint32_t CE, uint32_t contCE,
|
||||
|
@ -1125,9 +1125,9 @@ inline UColToken *getVirginBefore(UColTokenParser *src, UColToken *sourceToken,
|
||||
uint32_t CE, SecondCE;
|
||||
uint32_t invPos;
|
||||
if(sourceToken != NULL) {
|
||||
init_collIterate(src->UCA, src->source+((sourceToken->source)&0xFFFFFF), 1, &s);
|
||||
uprv_init_collIterate(src->UCA, src->source+((sourceToken->source)&0xFFFFFF), 1, &s);
|
||||
} else {
|
||||
init_collIterate(src->UCA, src->source+src->parsedToken.charsOffset /**charsOffset*/, 1, &s);
|
||||
uprv_init_collIterate(src->UCA, src->source+src->parsedToken.charsOffset /**charsOffset*/, 1, &s);
|
||||
}
|
||||
|
||||
baseCE = ucol_getNextCE(src->UCA, &s, status) & 0xFFFFFF3F;
|
||||
@ -1490,7 +1490,7 @@ uint32_t ucol_tok_assembleTokenList(UColTokenParser *src, UParseError *parseErro
|
||||
collIterate s;
|
||||
uint32_t CE = UCOL_NOT_FOUND, SecondCE = UCOL_NOT_FOUND;
|
||||
|
||||
init_collIterate(src->UCA, src->source+src->parsedToken.charsOffset, src->parsedToken.charsLen, &s);
|
||||
uprv_init_collIterate(src->UCA, src->source+src->parsedToken.charsOffset, src->parsedToken.charsLen, &s);
|
||||
|
||||
CE = ucol_getNextCE(src->UCA, &s, status);
|
||||
UChar *expand = s.pos;
|
||||
|
@ -65,7 +65,7 @@ ucol_openElements(const UCollator *coll,
|
||||
if (text == NULL) {
|
||||
textLength = 0;
|
||||
}
|
||||
init_collIterate(coll, text, textLength, &result->iteratordata_);
|
||||
uprv_init_collIterate(coll, text, textLength, &result->iteratordata_);
|
||||
|
||||
return result;
|
||||
}
|
||||
@ -191,7 +191,7 @@ ucol_setText( UCollationElements *elems,
|
||||
}
|
||||
|
||||
elems->isWritable = FALSE;
|
||||
init_collIterate(elems->iteratordata_.coll, text, textLength,
|
||||
uprv_init_collIterate(elems->iteratordata_.coll, text, textLength,
|
||||
&elems->iteratordata_);
|
||||
|
||||
elems->reset_ = TRUE;
|
||||
|
@ -768,10 +768,10 @@ ucol_getLocale(const UCollator *coll, ULocDataLocaleType type, UErrorCode *statu
|
||||
*/
|
||||
#ifdef U_USE_DEPRECATED_FORMAT_API
|
||||
|
||||
#if ((U_ICU_VERSION_MAJOR_NUM != 2) || (U_ICU_VERSION_MINOR_NUM !=1))
|
||||
#if ((U_ICU_VERSION_MAJOR_NUM != 2) || (U_ICU_VERSION_MINOR_NUM != 2))
|
||||
# error "ICU version has changed. Please redefine the macros under U_USE_DEPRECATED_FORMAT_API pre-processor definition"
|
||||
#else
|
||||
# define ucol_openRules_2_1(rules,rulesLength,normalizationMode,strength,status) ucol_openRules(rules,rulesLength,(UColAttributeValue)normalizationMode,strength,NULL,status)
|
||||
# define ucol_openRules_2_2(rules,rulesLength,normalizationMode,strength,status) ucol_openRules(rules,rulesLength,(UColAttributeValue)normalizationMode,strength,NULL,status)
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -528,7 +528,7 @@ udat_setSymbols( UDateFormat *format,
|
||||
*@deprecated Remove after Aug 2002
|
||||
*/
|
||||
#ifdef U_USE_DEPRECATED_FORMAT_API
|
||||
#if ((U_ICU_VERSION_MAJOR_NUM != 2) || (U_ICU_VERSION_MINOR_NUM !=1))
|
||||
#if ((U_ICU_VERSION_MAJOR_NUM != 2) || (U_ICU_VERSION_MINOR_NUM != 2))
|
||||
# error "ICU version has changed. Please redefine the macros under U_USE_DEPRECATED_FORMAT_API pre-processor definition"
|
||||
#else
|
||||
static UDateFormat*
|
||||
@ -537,7 +537,7 @@ udat_setSymbols( UDateFormat *format,
|
||||
return udat_open(UDAT_IGNORE,UDAT_IGNORE,locale,NULL,0,pattern,patternLength,status);
|
||||
}
|
||||
|
||||
# define udat_open_2_1(timeStyle,dateStyle,locale,tzId,tzIdLength,status) udat_open(timeStyle,dateStyle,locale,tzId,tzIdLength,NULL,0,status)
|
||||
# define udat_open_2_2(timeStyle,dateStyle,locale,tzId,tzIdLength,status) udat_open(timeStyle,dateStyle,locale,tzId,tzIdLength,NULL,0,status)
|
||||
#endif
|
||||
#endif
|
||||
/********************* End **********************************************/
|
||||
|
@ -655,7 +655,7 @@ unum_setSymbol(UNumberFormat *fmt,
|
||||
*/
|
||||
#ifdef U_USE_DEPRECATED_FORMAT_API
|
||||
|
||||
#if ((U_ICU_VERSION_MAJOR_NUM != 2) || (U_ICU_VERSION_MINOR_NUM !=1))
|
||||
#if ((U_ICU_VERSION_MAJOR_NUM != 2) || (U_ICU_VERSION_MINOR_NUM != 2))
|
||||
# error "ICU version has changed. Please redefine the macros under U_USE_DEPRECATED_FORMAT_API pre-processor definition"
|
||||
#else
|
||||
static UNumberFormat*
|
||||
@ -664,8 +664,8 @@ unum_setSymbol(UNumberFormat *fmt,
|
||||
return unum_open(0,pattern,patternLength,locale,NULL,status);
|
||||
}
|
||||
|
||||
# define unum_open_2_1(style,locale,status) unum_open(style, NULL, 0, locale, NULL, status)
|
||||
# define unum_applyPattern_2_1(format,localized,pattern,patternLength) unum_applyPattern(format,localized,pattern,patternLength,NULL,NULL)
|
||||
# define unum_open_2_2(style,locale,status) unum_open(style, NULL, 0, locale, NULL, status)
|
||||
# define unum_applyPattern_2_2(format,localized,pattern,patternLength) unum_applyPattern(format,localized,pattern,patternLength,NULL,NULL)
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -483,7 +483,7 @@ utrans_transIncrementalUChars(const UTransliterator* trans,
|
||||
|
||||
#ifdef U_USE_DEPRECATED_FORMAT_API
|
||||
|
||||
#if ((U_ICU_VERSION_MAJOR_NUM != 2) || (U_ICU_VERSION_MINOR_NUM !=1))
|
||||
#if ((U_ICU_VERSION_MAJOR_NUM != 2) || (U_ICU_VERSION_MINOR_NUM != 2))
|
||||
# error "ICU version has changed. Please redefine the macros under U_USE_DEPRECATED_FORMAT_API pre-processor definition"
|
||||
#else
|
||||
U_CAPI UTransliterator* U_EXPORT2
|
||||
@ -496,7 +496,7 @@ utrans_transIncrementalUChars(const UTransliterator* trans,
|
||||
return utrans_open(id,dir,rules,rulesLength,parseErr,status);
|
||||
}
|
||||
|
||||
# define utrans_open_2_1(id,dir,status) utrans_open(id,dir,NULL,0,NULL,status)
|
||||
# define utrans_open_2_2(id,dir,status) utrans_open(id,dir,NULL,0,NULL,status)
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
@ -230,7 +230,8 @@ inline uint16_t initializePatternCETable(UStringSearch *strsrch,
|
||||
strsrch->utilIter = coleiter;
|
||||
}
|
||||
else {
|
||||
init_collIterate(strsrch->collator, pattern->text, pattern->textLength,
|
||||
uprv_init_collIterate(strsrch->collator, pattern->text,
|
||||
pattern->textLength,
|
||||
&coleiter->iteratordata_);
|
||||
}
|
||||
|
||||
@ -2739,9 +2740,9 @@ U_CAPI void U_EXPORT2 usearch_setCollator( UStringSearch *strsrch,
|
||||
if (U_SUCCESS(*status)) {
|
||||
initialize(strsrch, status);
|
||||
if (U_SUCCESS(*status)) {
|
||||
init_collIterate(collator, strsrch->search->text,
|
||||
strsrch->search->textLength,
|
||||
&(strsrch->textIter->iteratordata_));
|
||||
uprv_init_collIterate(collator, strsrch->search->text,
|
||||
strsrch->search->textLength,
|
||||
&(strsrch->textIter->iteratordata_));
|
||||
strsrch->utilIter->iteratordata_.coll = collator;
|
||||
}
|
||||
}
|
||||
@ -3061,9 +3062,9 @@ U_CAPI void U_EXPORT2 usearch_reset(UStringSearch *strsrch)
|
||||
if (!sameCollAttribute) {
|
||||
initialize(strsrch, &status);
|
||||
}
|
||||
init_collIterate(strsrch->collator, strsrch->search->text,
|
||||
strsrch->search->textLength,
|
||||
&(strsrch->textIter->iteratordata_));
|
||||
uprv_init_collIterate(strsrch->collator, strsrch->search->text,
|
||||
strsrch->search->textLength,
|
||||
&(strsrch->textIter->iteratordata_));
|
||||
strsrch->search->matchedLength = 0;
|
||||
strsrch->search->matchedIndex = USEARCH_DONE;
|
||||
strsrch->search->isOverlap = FALSE;
|
||||
|
@ -1130,7 +1130,7 @@ static void testCEs(UCollator *coll, UErrorCode *status) {
|
||||
varT = (UBool)((specs & UCOL_TOK_VARIABLE_TOP) != 0);
|
||||
top_ = (UBool)((specs & UCOL_TOK_TOP) != 0);
|
||||
|
||||
init_collIterate(coll, rulesCopy+chOffset, chLen, &c);
|
||||
uprv_init_collIterate(coll, rulesCopy+chOffset, chLen, &c);
|
||||
|
||||
currCE = ucol_getNextCE(coll, &c, status);
|
||||
if(currCE == 0 && UCOL_ISTHAIPREVOWEL(*(rulesCopy+chOffset))) {
|
||||
@ -1164,7 +1164,7 @@ static void testCEs(UCollator *coll, UErrorCode *status) {
|
||||
result = ucol_inv_getNextCE(baseCE & 0xFFFFFF3F, baseContCE, &nextCE, &nextContCE, maxStrength);
|
||||
}
|
||||
if(result < 0) {
|
||||
if(isTailored(coll, *(rulesCopy+oldOffset), status)) {
|
||||
if(ucol_isTailored(coll, *(rulesCopy+oldOffset), status)) {
|
||||
log_verbose("Reset is tailored codepoint %04X, don't know how to continue, taking next test\n", *(rulesCopy+oldOffset));
|
||||
return;
|
||||
} else {
|
||||
@ -1366,12 +1366,12 @@ static void IsTailoredTest(void) {
|
||||
coll = ucol_openRules(rule, ruleLen, UCOL_OFF, UCOL_TERTIARY, NULL,&status);
|
||||
if(U_SUCCESS(status)) {
|
||||
for(i = 0; i<tailoredLen; i++) {
|
||||
if(!isTailored(coll, tailored[i], &status)) {
|
||||
if(!ucol_isTailored(coll, tailored[i], &status)) {
|
||||
log_err("%i: %04X should be tailored - it is reported as not\n", i, tailored[i]);
|
||||
}
|
||||
}
|
||||
for(i = 0; i<notTailoredLen; i++) {
|
||||
if(isTailored(coll, notTailored[i], &status)) {
|
||||
if(ucol_isTailored(coll, notTailored[i], &status)) {
|
||||
log_err("%i: %04X should not be tailored - it is reported as it is\n", i, notTailored[i]);
|
||||
}
|
||||
}
|
||||
@ -2872,7 +2872,7 @@ static void TestVariableTopSetting(void) {
|
||||
|
||||
/* before we start screaming, let's see if there is a problem with the rules */
|
||||
collIterate s;
|
||||
init_collIterate(coll, rulesCopy+oldChOffset, oldChLen, &s);
|
||||
uprv_init_collIterate(coll, rulesCopy+oldChOffset, oldChLen, &s);
|
||||
|
||||
CE = ucol_getNextCE(coll, &s, &status);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user