diff --git a/icu4c/source/tools/genrb/parse.c b/icu4c/source/tools/genrb/parse.c index dae7254b2ac..86bed258a24 100644 --- a/icu4c/source/tools/genrb/parse.c +++ b/icu4c/source/tools/genrb/parse.c @@ -1,7 +1,7 @@ /* ******************************************************************************* * -* Copyright (C) 1998-2010, International Business Machines +* Copyright (C) 1998-2011, International Business Machines * Corporation and others. All Rights Reserved. * ******************************************************************************* @@ -2025,8 +2025,7 @@ parse(UCHARBUF *buf, const char *inputDir, const char *outputDir, UErrorCode *st enum ETokenType token; ParseState state; uint32_t i; - int encLength; - char* enc; + for (i = 0; i < MAX_LOOKAHEAD + 1; i++) { ustr_init(&state.lookahead[i].value); diff --git a/icu4c/source/tools/genrb/reslist.c b/icu4c/source/tools/genrb/reslist.c index b23b41b3bc7..66d370405d1 100644 --- a/icu4c/source/tools/genrb/reslist.c +++ b/icu4c/source/tools/genrb/reslist.c @@ -1,7 +1,7 @@ /* ******************************************************************************* * -* Copyright (C) 2000-2010, International Business Machines +* Copyright (C) 2000-2011, International Business Machines * Corporation and others. All Rights Reserved. * ******************************************************************************* @@ -898,7 +898,7 @@ string_comp(const UHashTok key1, const UHashTok key2) { FALSE); } -struct SResource *string_open(struct SRBRoot *bundle, char *tag, const UChar *value, int32_t len, const struct UString* comment, UErrorCode *status) { +struct SResource *string_open(struct SRBRoot *bundle, const char *tag, const UChar *value, int32_t len, const struct UString* comment, UErrorCode *status) { struct SResource *res = res_open(bundle, tag, comment, status); if (U_FAILURE(*status)) { return NULL; @@ -966,7 +966,7 @@ struct SResource *string_open(struct SRBRoot *bundle, char *tag, const UChar *va } /* TODO: make alias_open and string_open use the same code */ -struct SResource *alias_open(struct SRBRoot *bundle, char *tag, UChar *value, int32_t len, const struct UString* comment, UErrorCode *status) { +struct SResource *alias_open(struct SRBRoot *bundle, const char *tag, UChar *value, int32_t len, const struct UString* comment, UErrorCode *status) { struct SResource *res = res_open(bundle, tag, comment, status); if (U_FAILURE(*status)) { return NULL; @@ -991,7 +991,7 @@ struct SResource *alias_open(struct SRBRoot *bundle, char *tag, UChar *value, in } -struct SResource* intvector_open(struct SRBRoot *bundle, char *tag, const struct UString* comment, UErrorCode *status) { +struct SResource* intvector_open(struct SRBRoot *bundle, const char *tag, const struct UString* comment, UErrorCode *status) { struct SResource *res = res_open(bundle, tag, comment, status); if (U_FAILURE(*status)) { return NULL; @@ -1008,7 +1008,7 @@ struct SResource* intvector_open(struct SRBRoot *bundle, char *tag, const struct return res; } -struct SResource *int_open(struct SRBRoot *bundle, char *tag, int32_t value, const struct UString* comment, UErrorCode *status) { +struct SResource *int_open(struct SRBRoot *bundle, const char *tag, int32_t value, const struct UString* comment, UErrorCode *status) { struct SResource *res = res_open(bundle, tag, comment, status); if (U_FAILURE(*status)) { return NULL; diff --git a/icu4c/source/tools/genrb/reslist.h b/icu4c/source/tools/genrb/reslist.h index 52737afd53d..f0eaeff5740 100644 --- a/icu4c/source/tools/genrb/reslist.h +++ b/icu4c/source/tools/genrb/reslist.h @@ -1,7 +1,7 @@ /* ******************************************************************************* * -* Copyright (C) 2000-2009, International Business Machines +* Copyright (C) 2000-2011, International Business Machines * Corporation and others. All Rights Reserved. * ******************************************************************************* @@ -130,7 +130,7 @@ struct SResString { int8_t fNumCharsForLength; }; -struct SResource *string_open(struct SRBRoot *bundle, char *tag, const UChar *value, int32_t len, const struct UString* comment, UErrorCode *status); +struct SResource *string_open(struct SRBRoot *bundle, const char *tag, const UChar *value, int32_t len, const struct UString* comment, UErrorCode *status); /** * Remove a string from a bundle and close (delete) it. @@ -139,21 +139,21 @@ struct SResource *string_open(struct SRBRoot *bundle, char *tag, const UChar *va */ void bundle_closeString(struct SRBRoot *bundle, struct SResource *string); -struct SResource *alias_open(struct SRBRoot *bundle, char *tag, UChar *value, int32_t len, const struct UString* comment, UErrorCode *status); +struct SResource *alias_open(struct SRBRoot *bundle, const char *tag, UChar *value, int32_t len, const struct UString* comment, UErrorCode *status); struct SResIntVector { uint32_t fCount; uint32_t *fArray; }; -struct SResource* intvector_open(struct SRBRoot *bundle, char *tag, const struct UString* comment, UErrorCode *status); +struct SResource* intvector_open(struct SRBRoot *bundle, const char *tag, const struct UString* comment, UErrorCode *status); void intvector_add(struct SResource *intvector, int32_t value, UErrorCode *status); struct SResInt { uint32_t fValue; }; -struct SResource *int_open(struct SRBRoot *bundle, char *tag, int32_t value, const struct UString* comment, UErrorCode *status); +struct SResource *int_open(struct SRBRoot *bundle, const char *tag, int32_t value, const struct UString* comment, UErrorCode *status); struct SResBinary { uint32_t fLength;