diff --git a/icu4c/source/test/cintltst/cbididat.c b/icu4c/source/test/cintltst/cbididat.c index 3f2bc11a4b3..a73f3a74655 100644 --- a/icu4c/source/test/cintltst/cbididat.c +++ b/icu4c/source/test/cintltst/cbididat.c @@ -1,6 +1,6 @@ /******************************************************************** * COPYRIGHT: - * Copyright (c) 1997-2006, International Business Machines Corporation and + * Copyright (c) 1997-2007, International Business Machines Corporation and * others. All Rights Reserved. ********************************************************************/ /* file name: cbididat.c @@ -18,13 +18,13 @@ #include "cbiditst.h" const char * const -dirPropNames[dirPropCount]={ +dirPropNames[U_CHAR_DIRECTION_COUNT]={ "L", "R", "EN", "ES", "ET", "AN", "CS", "B", "S", "WS", "ON", "LRE", "LRO", "AL", "RLE", "RLO", "PDF", "NSM", "BN" }; UChar -charFromDirProp[dirPropCount]={ +charFromDirProp[U_CHAR_DIRECTION_COUNT]={ /* L R EN ES ET AN CS B S WS ON */ 0x61, 0x5d0, 0x30, 0x2f, 0x25, 0x660, 0x2c, 0xa, 0x9, 0x20, 0x26, /* LRE LRO AL RLE RLO PDF NSM BN */ diff --git a/icu4c/source/test/cintltst/cbiditst.c b/icu4c/source/test/cintltst/cbiditst.c index 70d98f4aceb..8b707a098a4 100644 --- a/icu4c/source/test/cintltst/cbiditst.c +++ b/icu4c/source/test/cintltst/cbiditst.c @@ -1,6 +1,6 @@ /******************************************************************** * COPYRIGHT: - * Copyright (c) 1997-2006, International Business Machines Corporation and + * Copyright (c) 1997-2007, International Business Machines Corporation and * others. All Rights Reserved. ********************************************************************/ /* file name: cbiditst.cpp @@ -2028,7 +2028,7 @@ getBiDiObject(void) { #define MAKE_ITEMS(val) val, #val static const struct { - uint32_t value; + UBiDiReorderingMode value; const char* description; } modes[] = { @@ -2037,7 +2037,11 @@ modes[] = { { MAKE_ITEMS(UBIDI_REORDER_NUMBERS_SPECIAL) }, { MAKE_ITEMS(UBIDI_REORDER_INVERSE_FOR_NUMBERS_SPECIAL) }, { MAKE_ITEMS(UBIDI_REORDER_INVERSE_NUMBERS_AS_L) } -}, +}; +static const struct { + uint32_t value; + const char* description; +} options[] = { { MAKE_ITEMS(UBIDI_OPTION_INSERT_MARKS) }, { MAKE_ITEMS(0) } @@ -2615,7 +2619,8 @@ testReorderingMode() { UBiDi *pBiDi = NULL, *pBiDi2 = NULL, *pBiDi3 = NULL; UErrorCode rc; int tc, mode, option, level; - uint32_t modeValue, modeBack, optionValue, optionBack; + uint32_t modeBack, optionValue, optionBack; + UBiDiReorderingMode modeValue; int32_t srcLen, destLen, index; const char *expectedChars; UBool testOK = TRUE; diff --git a/icu4c/source/test/cintltst/cbiditst.h b/icu4c/source/test/cintltst/cbiditst.h index ba2e090ca80..afaffb27d48 100644 --- a/icu4c/source/test/cintltst/cbiditst.h +++ b/icu4c/source/test/cintltst/cbiditst.h @@ -1,6 +1,6 @@ /******************************************************************** * COPYRIGHT: - * Copyright (c) 1997-2006, International Business Machines Corporation and + * Copyright (c) 1997-2007, International Business Machines Corporation and * others. All Rights Reserved. ********************************************************************/ /* file name: cbiditst.h @@ -32,34 +32,31 @@ extern "C" { is easier with the same names for the BiDi types in the code as there. See UCharDirection in uchar.h . */ -enum { - L= U_LEFT_TO_RIGHT, - R= U_RIGHT_TO_LEFT, - EN= U_EUROPEAN_NUMBER, - ES= U_EUROPEAN_NUMBER_SEPARATOR, - ET= U_EUROPEAN_NUMBER_TERMINATOR, - AN= U_ARABIC_NUMBER, - CS= U_COMMON_NUMBER_SEPARATOR, - B= U_BLOCK_SEPARATOR, - S= U_SEGMENT_SEPARATOR, - WS= U_WHITE_SPACE_NEUTRAL, - ON= U_OTHER_NEUTRAL, - LRE=U_LEFT_TO_RIGHT_EMBEDDING, - LRO=U_LEFT_TO_RIGHT_OVERRIDE, - AL= U_RIGHT_TO_LEFT_ARABIC, - RLE=U_RIGHT_TO_LEFT_EMBEDDING, - RLO=U_RIGHT_TO_LEFT_OVERRIDE, - PDF=U_POP_DIRECTIONAL_FORMAT, - NSM=U_DIR_NON_SPACING_MARK, - BN= U_BOUNDARY_NEUTRAL, - dirPropCount -}; +#define L U_LEFT_TO_RIGHT +#define R U_RIGHT_TO_LEFT +#define EN U_EUROPEAN_NUMBER +#define ES U_EUROPEAN_NUMBER_SEPARATOR +#define ET U_EUROPEAN_NUMBER_TERMINATOR +#define AN U_ARABIC_NUMBER +#define CS U_COMMON_NUMBER_SEPARATOR +#define B U_BLOCK_SEPARATOR +#define S U_SEGMENT_SEPARATOR +#define WS U_WHITE_SPACE_NEUTRAL +#define ON U_OTHER_NEUTRAL +#define LRE U_LEFT_TO_RIGHT_EMBEDDING +#define LRO U_LEFT_TO_RIGHT_OVERRIDE +#define AL U_RIGHT_TO_LEFT_ARABIC +#define RLE U_RIGHT_TO_LEFT_EMBEDDING +#define RLO U_RIGHT_TO_LEFT_OVERRIDE +#define PDF U_POP_DIRECTIONAL_FORMAT +#define NSM U_DIR_NON_SPACING_MARK +#define BN U_BOUNDARY_NEUTRAL extern const char * const -dirPropNames[dirPropCount]; +dirPropNames[U_CHAR_DIRECTION_COUNT]; extern UChar -charFromDirProp[dirPropCount]; +charFromDirProp[U_CHAR_DIRECTION_COUNT]; typedef struct { const uint8_t *text; diff --git a/icu4c/source/test/cintltst/cmsccoll.c b/icu4c/source/test/cintltst/cmsccoll.c index 33156b87164..f827237e9f1 100644 --- a/icu4c/source/test/cintltst/cmsccoll.c +++ b/icu4c/source/test/cintltst/cmsccoll.c @@ -40,7 +40,7 @@ #define MAX_TOKEN_LEN 16 -typedef int tst_strcoll(void *collator, const int object, +typedef UCollationResult tst_strcoll(void *collator, const int object, const UChar *source, const int sLen, const UChar *target, const int tLen); @@ -153,7 +153,7 @@ const static char shifted[][20] = { }; const static UCollationResult shiftedTert[] = { - 0, + UCOL_EQUAL, UCOL_EQUAL, UCOL_EQUAL, UCOL_LESS, @@ -2035,20 +2035,18 @@ static void TestCase(void) const static UCollationResult caseTestResults[][9] = { - { UCOL_LESS, UCOL_LESS, UCOL_LESS, 0, UCOL_LESS, UCOL_LESS, 0, 0, UCOL_LESS }, - { UCOL_GREATER, UCOL_LESS, UCOL_LESS, 0, UCOL_LESS, UCOL_LESS, 0, 0, UCOL_GREATER }, - { UCOL_LESS, UCOL_LESS, UCOL_LESS, 0, UCOL_GREATER, UCOL_LESS, 0, 0, UCOL_LESS }, - { UCOL_GREATER, UCOL_LESS, UCOL_GREATER, 0, UCOL_LESS, UCOL_LESS, 0, 0, UCOL_GREATER } - + { UCOL_LESS, UCOL_LESS, UCOL_LESS, UCOL_EQUAL, UCOL_LESS, UCOL_LESS, UCOL_EQUAL, UCOL_EQUAL, UCOL_LESS }, + { UCOL_GREATER, UCOL_LESS, UCOL_LESS, UCOL_EQUAL, UCOL_LESS, UCOL_LESS, UCOL_EQUAL, UCOL_EQUAL, UCOL_GREATER }, + { UCOL_LESS, UCOL_LESS, UCOL_LESS, UCOL_EQUAL, UCOL_GREATER, UCOL_LESS, UCOL_EQUAL, UCOL_EQUAL, UCOL_LESS }, + { UCOL_GREATER, UCOL_LESS, UCOL_GREATER, UCOL_EQUAL, UCOL_LESS, UCOL_LESS, UCOL_EQUAL, UCOL_EQUAL, UCOL_GREATER } }; const static UColAttributeValue caseTestAttributes[][2] = { - { UCOL_LOWER_FIRST, UCOL_OFF}, - { UCOL_UPPER_FIRST, UCOL_OFF}, - { UCOL_LOWER_FIRST, UCOL_ON}, - { UCOL_UPPER_FIRST, UCOL_ON} - + { UCOL_LOWER_FIRST, UCOL_OFF}, + { UCOL_UPPER_FIRST, UCOL_OFF}, + { UCOL_LOWER_FIRST, UCOL_ON}, + { UCOL_UPPER_FIRST, UCOL_ON} }; int32_t i,j,k; UErrorCode status = U_ZERO_ERROR; diff --git a/icu4c/source/test/cintltst/utmstest.c b/icu4c/source/test/cintltst/utmstest.c index 93c0c330deb..88cf5a01569 100644 --- a/icu4c/source/test/cintltst/utmstest.c +++ b/icu4c/source/test/cintltst/utmstest.c @@ -1,6 +1,6 @@ /* **************************************************************************** - * Copyright (c) 1997-2006, International Business Machines Corporation and * + * Copyright (c) 1997-2007, International Business Machines Corporation and * * others. All Rights Reserved. * **************************************************************************** */ @@ -65,11 +65,11 @@ static int64_t ranMax; static void initRandom(int64_t min, int64_t max) { uint64_t interval = max - min; - + ranMin = min; ranMax = max; ranInt = 0; - + if (interval < U_INT64_MIN) { ranInt = interval; } @@ -78,70 +78,70 @@ static void initRandom(int64_t min, int64_t max) static int64_t randomInRange(void) { int64_t value; - + if (ranInt != 0) { value = randomInt64() % ranInt; - + if (value < 0) { value = -value; } - + value += ranMin; } else { do { value = randomInt64(); } while (value < ranMin || value > ranMax); } - + return value; } - -static void roundTripTest(int64_t value, int32_t scale) + +static void roundTripTest(int64_t value, UDateTimeScale scale) { UErrorCode status = U_ZERO_ERROR; int64_t rt = utmscale_toInt64(utmscale_fromInt64(value, scale, &status), scale, &status); - + if (rt != value) { log_err("Round-trip error: time scale = %d, value = %lld, round-trip = %lld.\n", scale, value, rt); } } -static void toLimitTest(int64_t toLimit, int64_t fromLimit, int32_t scale) +static void toLimitTest(int64_t toLimit, int64_t fromLimit, UDateTimeScale scale) { UErrorCode status = U_ZERO_ERROR; int64_t result = utmscale_toInt64(toLimit, scale, &status); - + if (result != fromLimit) { log_err("toLimit failure: scale = %d, toLimit = %lld , utmscale_toInt64(toLimit, scale, &status) = %lld, fromLimit = %lld.\n", scale, toLimit, result, fromLimit); } } -static void epochOffsetTest(int64_t epochOffset, int64_t units, int32_t scale) +static void epochOffsetTest(int64_t epochOffset, int64_t units, UDateTimeScale scale) { UErrorCode status = U_ZERO_ERROR; int64_t universal = 0; int64_t universalEpoch = epochOffset * units; int64_t local = utmscale_toInt64(universalEpoch, scale, &status); - + if (local != 0) { log_err("utmscale_toInt64(epochOffset, scale, &status): scale = %d epochOffset = %lld, result = %lld.\n", scale, epochOffset, local); } - + local = utmscale_toInt64(0, scale, &status); - + if (local != -epochOffset) { log_err("utmscale_toInt64(0, scale): scale = %d, result = %lld.\n", scale, local); } - + universal = utmscale_fromInt64(-epochOffset, scale, &status); - + if (universal != 0) { log_err("from(-epochOffest, scale): scale = %d, epochOffset = %lld, result = %lld.\n", scale, epochOffset, universal); } - + universal = utmscale_fromInt64(0, scale, &status); - + if (universal != universalEpoch) { log_err("utmscale_fromInt64(0, scale): scale = %d, result = %lld.\n", scale, universal); } @@ -153,10 +153,10 @@ static void TestEpochOffsets(void) int32_t scale; for (scale = 0; scale < UDTS_MAX_SCALE; scale += 1) { - int64_t units = utmscale_getTimeScaleValue(scale, UTSV_UNITS_VALUE, &status); - int64_t epochOffset = utmscale_getTimeScaleValue(scale, UTSV_EPOCH_OFFSET_VALUE, &status); - - epochOffsetTest(epochOffset, units, scale); + int64_t units = utmscale_getTimeScaleValue((UDateTimeScale)scale, UTSV_UNITS_VALUE, &status); + int64_t epochOffset = utmscale_getTimeScaleValue((UDateTimeScale)scale, UTSV_EPOCH_OFFSET_VALUE, &status); + + epochOffsetTest(epochOffset, units, (UDateTimeScale)scale); } } @@ -166,11 +166,11 @@ static void TestFromLimits(void) int32_t scale; for (scale = 0; scale < UDTS_MAX_SCALE; scale += 1) { - int64_t fromMin = utmscale_getTimeScaleValue(scale, UTSV_FROM_MIN_VALUE, &status); - int64_t fromMax = utmscale_getTimeScaleValue(scale, UTSV_FROM_MAX_VALUE, &status); - - roundTripTest(fromMin, scale); - roundTripTest(fromMax, scale); + int64_t fromMin = utmscale_getTimeScaleValue((UDateTimeScale)scale, UTSV_FROM_MIN_VALUE, &status); + int64_t fromMax = utmscale_getTimeScaleValue((UDateTimeScale)scale, UTSV_FROM_MAX_VALUE, &status); + + roundTripTest(fromMin, (UDateTimeScale)scale); + roundTripTest(fromMax, (UDateTimeScale)scale); } } @@ -180,13 +180,13 @@ static void TestToLimits(void) int32_t scale; for (scale = 0; scale < UDTS_MAX_SCALE; scale += 1) { - int64_t fromMin = utmscale_getTimeScaleValue(scale, UTSV_FROM_MIN_VALUE, &status); - int64_t fromMax = utmscale_getTimeScaleValue(scale, UTSV_FROM_MAX_VALUE, &status); - int64_t toMin = utmscale_getTimeScaleValue(scale, UTSV_TO_MIN_VALUE, &status); - int64_t toMax = utmscale_getTimeScaleValue(scale, UTSV_TO_MAX_VALUE, &status); - - toLimitTest(toMin, fromMin, scale); - toLimitTest(toMax, fromMax, scale); + int64_t fromMin = utmscale_getTimeScaleValue((UDateTimeScale)scale, UTSV_FROM_MIN_VALUE, &status); + int64_t fromMax = utmscale_getTimeScaleValue((UDateTimeScale)scale, UTSV_FROM_MAX_VALUE, &status); + int64_t toMin = utmscale_getTimeScaleValue((UDateTimeScale)scale, UTSV_TO_MIN_VALUE, &status); + int64_t toMax = utmscale_getTimeScaleValue((UDateTimeScale)scale, UTSV_TO_MAX_VALUE, &status); + + toLimitTest(toMin, fromMin, (UDateTimeScale)scale); + toLimitTest(toMax, fromMax, (UDateTimeScale)scale); } } @@ -195,54 +195,54 @@ static void TestFromInt64(void) int32_t scale; int64_t result; UErrorCode status = U_ZERO_ERROR; - + result = utmscale_fromInt64(0, -1, &status); if (status != U_ILLEGAL_ARGUMENT_ERROR) { log_err("utmscale_fromInt64(0, -1, status) did not set status to U_ILLEGAL_ARGUMENT_ERROR.\n"); } - + for (scale = 0; scale < UDTS_MAX_SCALE; scale += 1) { int64_t fromMin, fromMax; - + status = U_ZERO_ERROR; - fromMin = utmscale_getTimeScaleValue(scale, UTSV_FROM_MIN_VALUE, &status); - fromMax = utmscale_getTimeScaleValue(scale, UTSV_FROM_MAX_VALUE, &status); - + fromMin = utmscale_getTimeScaleValue((UDateTimeScale)scale, UTSV_FROM_MIN_VALUE, &status); + fromMax = utmscale_getTimeScaleValue((UDateTimeScale)scale, UTSV_FROM_MAX_VALUE, &status); + status = U_ZERO_ERROR; - result = utmscale_fromInt64(0, scale, &status); + result = utmscale_fromInt64(0, (UDateTimeScale)scale, &status); if (status == U_ILLEGAL_ARGUMENT_ERROR) { log_err("utmscale_fromInt64(0, %d, &status) generated U_ILLEGAL_ARGUMENT_ERROR.\n", scale); } - + status = U_ZERO_ERROR; - result = utmscale_fromInt64(fromMin, scale, &status); + result = utmscale_fromInt64(fromMin, (UDateTimeScale)scale, &status); if (status == U_ILLEGAL_ARGUMENT_ERROR) { log_err("utmscale_fromInt64(fromMin, %d, &status) generated U_ILLEGAL_ARGUMENT_ERROR.\n", scale); } - - if (fromMin > U_INT64_MIN) { + + if (fromMin > U_INT64_MIN) { status = U_ZERO_ERROR; - result = utmscale_fromInt64(fromMin - 1, scale, &status); + result = utmscale_fromInt64(fromMin - 1, (UDateTimeScale)scale, &status); if (status != U_ILLEGAL_ARGUMENT_ERROR) { log_err("utmscale_fromInt64(fromMin - 1, %d, &status) did not generate U_ILLEGAL_ARGUMENT_ERROR.\n", scale); } } - + status = U_ZERO_ERROR; - result = utmscale_fromInt64(fromMax, scale, &status); + result = utmscale_fromInt64(fromMax, (UDateTimeScale)scale, &status); if (status == U_ILLEGAL_ARGUMENT_ERROR) { log_err("utmscale_fromInt64(fromMax, %d, &status) generated U_ILLEGAL_ARGUMENT_ERROR.\n", scale); } - + if (fromMax < U_INT64_MAX) { status = U_ZERO_ERROR; - result = utmscale_fromInt64(fromMax + 1, scale, &status); + result = utmscale_fromInt64(fromMax + 1, (UDateTimeScale)scale, &status); if (status != U_ILLEGAL_ARGUMENT_ERROR) { log_err("utmscale_fromInt64(fromMax + 1, %d, &status) didn't generate U_ILLEGAL_ARGUMENT_ERROR.\n", scale); } } } - + status = U_ZERO_ERROR; result = utmscale_fromInt64(0, UDTS_MAX_SCALE, &status); if (status != U_ILLEGAL_ARGUMENT_ERROR) { @@ -255,55 +255,55 @@ static void TestToInt64(void) int32_t scale; int64_t result; UErrorCode status = U_ZERO_ERROR; - + result = utmscale_toInt64(0, -1, &status); if (status != U_ILLEGAL_ARGUMENT_ERROR) { log_err("utmscale_toInt64(0, -1, &status) did not generate U_ILLEGAL_ARGUMENT_ERROR.\n"); } - + for (scale = 0; scale < UDTS_MAX_SCALE; scale += 1) { int64_t toMin, toMax; - + status = U_ZERO_ERROR; toMin = utmscale_getTimeScaleValue(scale, UTSV_TO_MIN_VALUE, &status); toMax = utmscale_getTimeScaleValue(scale, UTSV_TO_MAX_VALUE, &status); status = U_ZERO_ERROR; - result = utmscale_toInt64(0, scale, &status); + result = utmscale_toInt64(0, (UDateTimeScale)scale, &status); if (status == U_ILLEGAL_ARGUMENT_ERROR) { log_err("utmscale_toInt64(0, %d, &status) generated U_ILLEGAL_ARGUMENT_ERROR.\n", scale); } - + status = U_ZERO_ERROR; - result = utmscale_toInt64(toMin, scale, &status); + result = utmscale_toInt64(toMin, (UDateTimeScale)scale, &status); if (status == U_ILLEGAL_ARGUMENT_ERROR) { log_err("utmscale_toInt64(toMin, %d, &status) generated U_ILLEGAL_ARGUMENT_ERROR.\n", scale); } - + if (toMin > U_INT64_MIN) { status = U_ZERO_ERROR; - result = utmscale_toInt64(toMin - 1, scale, &status); + result = utmscale_toInt64(toMin - 1, (UDateTimeScale)scale, &status); if (status != U_ILLEGAL_ARGUMENT_ERROR) { log_err("utmscale_toInt64(toMin - 1, %d, &status) did not generate U_ILLEGAL_ARGUMENT_ERROR.\n", scale); } } - + status = U_ZERO_ERROR; - result = utmscale_toInt64(toMax, scale, &status); + result = utmscale_toInt64(toMax, (UDateTimeScale)scale, &status); if (status == U_ILLEGAL_ARGUMENT_ERROR) { log_err("utmscale_toInt64(toMax, %d, &status) generated U_ILLEGAL_ARGUMENT_ERROR.\n", scale); } - + if (toMax < U_INT64_MAX) { status = U_ZERO_ERROR; - result = utmscale_toInt64(toMax + 1, scale, &status); + result = utmscale_toInt64(toMax + 1, (UDateTimeScale)scale, &status); if (status != U_ILLEGAL_ARGUMENT_ERROR) { log_err("utmscale_toInt64(toMax + 1, %d, &status) did not generate U_ILLEGAL_ARGUMENT_ERROR.\n", scale); } } } - + status = U_ZERO_ERROR; result = utmscale_toInt64(0, UDTS_MAX_SCALE, &status); if (status != U_ILLEGAL_ARGUMENT_ERROR) { @@ -328,18 +328,18 @@ static void TestMonkey(void) { int32_t scale; UErrorCode status = U_ZERO_ERROR; - + for (scale = 0; scale < UDTS_MAX_SCALE; scale += 1) { - int64_t fromMin = utmscale_getTimeScaleValue(scale, UTSV_FROM_MIN_VALUE, &status); - int64_t fromMax = utmscale_getTimeScaleValue(scale, UTSV_FROM_MAX_VALUE, &status); + int64_t fromMin = utmscale_getTimeScaleValue((UDateTimeScale)scale, UTSV_FROM_MIN_VALUE, &status); + int64_t fromMax = utmscale_getTimeScaleValue((UDateTimeScale)scale, UTSV_FROM_MAX_VALUE, &status); int32_t i; - + initRandom(fromMin, fromMax); - + for (i = 0; i < LOOP_COUNT; i += 1) { int64_t value = randomInRange(); - - roundTripTest(value, scale); + + roundTripTest(value, (UDateTimeScale)scale); } } } diff --git a/icu4c/source/tools/gentest/gentest.c b/icu4c/source/tools/gentest/gentest.c index 8c044b50a4e..9225377d3e4 100644 --- a/icu4c/source/tools/gentest/gentest.c +++ b/icu4c/source/tools/gentest/gentest.c @@ -1,7 +1,7 @@ /* ******************************************************************************* * -* Copyright (C) 1999-2006, International Business Machines +* Copyright (C) 1999-2007, International Business Machines * Corporation and others. All Rights Reserved. * ******************************************************************************* @@ -80,7 +80,7 @@ main(int argc, char* argv[]) { "\toptions:\n" "\t\t-h or -? or --help this usage text\n" "\t\t-d or --destdir destination directory, followed by the path\n" - "\t\t-r or --genres generate resource file testtable32.txt instead of UData test \n", + "\t\t-r or --genres generate resource file testtable32.txt instead of UData test \n" "\t\t-j or --javastuff generate Java source for DebugUtilities. \n", argv[0]); return argc<0 ? U_ILLEGAL_ARGUMENT_ERROR : U_ZERO_ERROR; @@ -139,14 +139,14 @@ createData(const char* outputDirectory, UErrorCode *errorCode) { static int outputJavaStuff(const char* progname, const char *outputDir) { - int32_t i,t,count; + int32_t i,t,count; char file[512]; FILE *out; uprv_strcpy(file,outputDir); if(*outputDir && /* don't put a trailing slash if outputDir is empty */ - file[strlen(file)-1]!=U_FILE_SEP_CHAR) { - uprv_strcat(file,U_FILE_SEP_STRING); + file[strlen(file)-1]!=U_FILE_SEP_CHAR) { + uprv_strcat(file,U_FILE_SEP_STRING); } uprv_strcat(file,"DebugUtilitiesData.java"); out = fopen(file, "w"); @@ -154,93 +154,93 @@ outputJavaStuff(const char* progname, const char *outputDir) { printf("%s: Generating %s\n", progname, file); if(out == NULL) { fprintf(stderr, "%s: Couldn't create resource test file %s\n", - progname, file); + progname, file); return 1; } - + fprintf(out, "/** Copyright (C) 2007, International Business Machines Corporation and Others. All Rights Reserved. **/\n\n"); fprintf(out, "/* NOTE: this file is AUTOMATICALLY GENERATED by gentest. */\n\n"); - fprintf(out, "package com.ibm.icu.dev.test.util;\n\n"); - fprintf(out, "public class DebugUtilitiesData extends Object {\n"); - fprintf(out, " public static final String ICU4C_VERSION=\"%s\";\n", U_ICU_VERSION); - for(t=0;t