ICU-3515 trying to please AIX compiler by renaming constants

X-SVN-Rev: 14353
This commit is contained in:
Vladimir Weinstein 2004-01-16 16:40:30 +00:00
parent 8e623db1d4
commit 0e23771cdc
2 changed files with 10 additions and 10 deletions

View File

@ -1033,7 +1033,7 @@ ucol_cleanup(void)
// CONSTANTS
static const uint32_t
NON_CJK_OFFSET = 0x110000,
MAX_INPUT = 0x220001; // 2 * Unicode range + 2
UCOL_MAX_INPUT = 0x220001; // 2 * Unicode range + 2
/**
* Precomputed by constructor
@ -1092,7 +1092,7 @@ static UChar32 swapCJK(UChar32 i) {
U_CAPI uint32_t U_EXPORT2
uprv_uca_getImplicitFromRaw(UChar32 cp) {
/*
if (cp < 0 || cp > MAX_INPUT) {
if (cp < 0 || cp > UCOL_MAX_INPUT) {
throw new IllegalArgumentException("Code point out of range " + Utility.hex(cp));
}
*/
@ -1192,7 +1192,7 @@ uprv_uca_getRawFromImplicit(uint32_t implicit) {
result = (((b0 * medialCount) + b1) * medialCount + b2) * final4Count + b3 + min4Boundary;
}
// final check
if (result < 0 || result > MAX_INPUT) return -1;
if (result < 0 || result > UCOL_MAX_INPUT) return -1;
return result;
}
@ -1262,7 +1262,7 @@ static void initImplicitConstants(int minPrimary, int maxPrimary,
min4Boundary = min3ByteCoverage;
// Now expand out the multiplier for the 4 bytes, and redo.
int32_t totalNeeded = MAX_INPUT - min4Boundary;
int32_t totalNeeded = UCOL_MAX_INPUT - min4Boundary;
int32_t neededPerPrimaryByte = divideAndRoundUp(totalNeeded, primaries4count);
//if (DEBUG) System.out.println("neededPerPrimaryByte: " + neededPerPrimaryByte);
int32_t neededPerFinalByte = divideAndRoundUp(neededPerPrimaryByte, medialCount * medialCount);

View File

@ -4169,14 +4169,14 @@ static void TestPinyinProblem(void) {
genericLocaleStarter("zh__PINYIN", test, sizeof(test)/sizeof(test[0]));
}
#define MAX_INPUT 0x220001
#define TST_UCOL_MAX_INPUT 0x220001
#define topByte 0xFF000000;
#define bottomByte 0xFF;
#define fourBytes 0xFFFFFFFF;
static void showImplicit(UChar32 i) {
if (i >= 0 && i <= MAX_INPUT) {
if (i >= 0 && i <= TST_UCOL_MAX_INPUT) {
log_verbose("%08X\t%08X\n", i, uprv_uca_getImplicitFromRaw(i));
}
}
@ -4200,7 +4200,7 @@ static void TestImplicitGeneration(void) {
uprv_uca_getRawFromImplicit(0xE20303E7);
for (i = 0; i <= MAX_INPUT; ++i) {
for (i = 0; i <= TST_UCOL_MAX_INPUT; ++i) {
current = uprv_uca_getImplicitFromRaw(i) & fourBytes;
/* check that it round-trips AND that all intervening ones are illegal*/
@ -4234,9 +4234,9 @@ static void TestImplicitGeneration(void) {
}
last = current;
}
showImplicit(MAX_INPUT-2);
showImplicit(MAX_INPUT-1);
showImplicit(MAX_INPUT);
showImplicit(TST_UCOL_MAX_INPUT-2);
showImplicit(TST_UCOL_MAX_INPUT-1);
showImplicit(TST_UCOL_MAX_INPUT);
}
#define TEST(x) addTest(root, &x, "tscoll/cmsccoll/" # x)