ICU-865 os/390 porting for timezone

X-SVN-Rev: 3913
This commit is contained in:
George Rhoten 2001-03-06 02:39:47 +00:00
parent 6312cc8e02
commit 8a59268b64
2 changed files with 12 additions and 1 deletions

View File

@ -271,4 +271,15 @@ u_versionToString(UVersionInfo versionArray, char *versionString);
U_CAPI void U_EXPORT2
u_getVersion(UVersionInfo versionArray);
/* Define U_UPPER_ORDINAL */
#if U_CHARSET_FAMILY==U_ASCII_FAMILY
# define U_UPPER_ORDINAL(x) ((x)-'A')
#elif U_CHARSET_FAMILY==U_EBCDIC_FAMILY
# define U_UPPER_ORDINAL(x) (((x) < 'J') ? ((x)-'A') : \
(((x) < 'S') ? ((x)-'J'+9) : \
(((x)-'S'+18))
#else
# error Unknown charset family!
#endif
#endif

View File

@ -483,7 +483,7 @@ TimeZone::createAvailableIDs(const char* country, int32_t& numIDs) {
uint16_t intcode = 0;
if (country != NULL && *country != 0) {
intcode = ((country[0] - 'A') << 5) + (country[1] - 'A');
intcode = (U_UPPER_ORDINAL(country[0]) << 5) + U_UPPER_ORDINAL(country[1]);
}
for (;;) {