ICU-5919 Fixes for old iostream usage on an older HP-UX machine.

X-SVN-Rev: 22636
This commit is contained in:
George Rhoten 2007-09-06 19:21:55 +00:00
parent c8bb832ad8
commit b1fca97b2f
2 changed files with 4 additions and 3 deletions

View File

@ -1312,6 +1312,7 @@ VTimeZone::parse(UErrorCode& status) {
UnicodeString tzid; UnicodeString tzid;
int32_t state = INI; int32_t state = INI;
int32_t n = 0;
UBool dst = FALSE; // current zone type UBool dst = FALSE; // current zone type
UnicodeString from; // current zone from offset UnicodeString from; // current zone from offset
UnicodeString to; // current zone offset UnicodeString to; // current zone offset
@ -1336,7 +1337,7 @@ VTimeZone::parse(UErrorCode& status) {
goto cleanupParse; goto cleanupParse;
} }
for (int32_t n = 0; n < vtzlines->size(); n++) { for (n = 0; n < vtzlines->size(); n++) {
UnicodeString *line = (UnicodeString*)vtzlines->elementAt(n); UnicodeString *line = (UnicodeString*)vtzlines->elementAt(n);
int32_t valueSep = line->indexOf(COLON); int32_t valueSep = line->indexOf(COLON);
if (valueSep < 0) { if (valueSep < 0) {

View File

@ -115,8 +115,8 @@ operator>>(STD_ISTREAM& stream, UnicodeString& str)
*/ */
ucnv_toUnicode(converter, &us, uLimit, &s, sLimit, 0, !continueReading, &errorCode); ucnv_toUnicode(converter, &us, uLimit, &s, sLimit, 0, !continueReading, &errorCode);
if(U_FAILURE(errorCode)) { if(U_FAILURE(errorCode)) {
/* Something really bad happened */ /* Something really bad happened. setstate() isn't always an available API */
stream.setstate(stream.failbit); stream.clear(stream.failbit);
goto STOP_READING; goto STOP_READING;
} }
/* Was the character consumed? */ /* Was the character consumed? */