ICU-13275 Revert the previous changes to the trunk.

X-SVN-Rev: 40262
This commit is contained in:
William Zhao 2017-07-13 23:26:06 +00:00
parent 11a9b11c56
commit 3da97c910d
2 changed files with 10 additions and 11 deletions

View File

@ -1050,7 +1050,7 @@ uprv_getWindowsTimeZone()
hr = timezone->GetTimeZone(timezoneString.GetAddressOf());
if (SUCCEEDED(hr))
{
int32_t length = static_cast<int32_t>(wcslen(timezoneString.GetRawBuffer(NULL)));
int32_t length = wcslen(timezoneString.GetRawBuffer(NULL));
char* asciiId = (char*)uprv_calloc(length + 1, sizeof(char));
if (asciiId != nullptr)
{
@ -1069,7 +1069,6 @@ uprv_getWindowsTimeZone()
U_CAPI const char* U_EXPORT2
uprv_tzname(int n)
{
n; // Avoid unreferenced parameter warning.
const char *tzid = NULL;
#if U_PLATFORM_USES_ONLY_WIN32_API
#if U_PLATFORM_HAS_WINUWP_API > 0
@ -1293,7 +1292,7 @@ u_setDataDirectory(const char *directory) {
#if (U_FILE_SEP_CHAR != U_FILE_ALT_SEP_CHAR)
{
char *p;
while((p = uprv_strchr(newDataDir, U_FILE_ALT_SEP_CHAR)) != NULL) {
while(p = uprv_strchr(newDataDir, U_FILE_ALT_SEP_CHAR)) {
*p = U_FILE_SEP_CHAR;
}
}
@ -1451,7 +1450,7 @@ static void setTimeZoneFilesDir(const char *path, UErrorCode &status) {
gTimeZoneFilesDirectory->append(path, status);
#if (U_FILE_SEP_CHAR != U_FILE_ALT_SEP_CHAR)
char *p = gTimeZoneFilesDirectory->data();
while ((p = uprv_strchr(p, U_FILE_ALT_SEP_CHAR)) != NULL) {
while (p = uprv_strchr(p, U_FILE_ALT_SEP_CHAR)) {
*p = U_FILE_SEP_CHAR;
}
#endif
@ -2391,14 +2390,14 @@ uprv_dlsym_func(void *lib, const char* sym, UErrorCode *status) {
/* null (nonexistent) implementation. */
U_INTERNAL void * U_EXPORT2
uprv_dl_open(const char * /* libName */ , UErrorCode *status) {
uprv_dl_open(const char *libName, UErrorCode *status) {
if(U_FAILURE(*status)) return NULL;
*status = U_UNSUPPORTED_ERROR;
return NULL;
}
U_INTERNAL void U_EXPORT2
uprv_dl_close(void * /* lib */, UErrorCode *status) {
uprv_dl_close(void *lib, UErrorCode *status) {
if(U_FAILURE(*status)) return;
*status = U_UNSUPPORTED_ERROR;
return;
@ -2406,7 +2405,7 @@ uprv_dl_close(void * /* lib */, UErrorCode *status) {
U_INTERNAL UVoidFunction* U_EXPORT2
uprv_dlsym_func(void * /* lib */, const char* /* sym */, UErrorCode *status) {
uprv_dlsym_func(void *lib, const char* sym, UErrorCode *status) {
if(U_SUCCESS(*status)) {
*status = U_UNSUPPORTED_ERROR;
}

View File

@ -374,7 +374,7 @@ uspoof_check2UTF8(const USpoofChecker *sc,
if (U_FAILURE(*status)) {
return 0;
}
UnicodeString idStr = UnicodeString::fromUTF8(StringPiece(id, length>=0 ? length : static_cast<int32_t>(uprv_strlen(id))));
UnicodeString idStr = UnicodeString::fromUTF8(StringPiece(id, length>=0 ? length : uprv_strlen(id)));
int32_t result = uspoof_check2UnicodeString(sc, idStr, checkResult, status);
return result;
}
@ -413,8 +413,8 @@ uspoof_areConfusableUTF8(const USpoofChecker *sc,
*status = U_ILLEGAL_ARGUMENT_ERROR;
return 0;
}
UnicodeString id1Str = UnicodeString::fromUTF8(StringPiece(id1, length1>=0? length1 : static_cast<int32_t>(uprv_strlen(id1))));
UnicodeString id2Str = UnicodeString::fromUTF8(StringPiece(id2, length2>=0? length2 : static_cast<int32_t>(uprv_strlen(id2))));
UnicodeString id1Str = UnicodeString::fromUTF8(StringPiece(id1, length1>=0? length1 : uprv_strlen(id1)));
UnicodeString id2Str = UnicodeString::fromUTF8(StringPiece(id2, length2>=0? length2 : uprv_strlen(id2)));
int32_t results = uspoof_areConfusableUnicodeString(sc, id1Str, id2Str, status);
return results;
}
@ -680,7 +680,7 @@ uspoof_getSkeletonUTF8(const USpoofChecker *sc,
return 0;
}
UnicodeString srcStr = UnicodeString::fromUTF8(StringPiece(id, length>=0 ? length : static_cast<int32_t>(uprv_strlen(id))));
UnicodeString srcStr = UnicodeString::fromUTF8(StringPiece(id, length>=0 ? length : uprv_strlen(id)));
UnicodeString destStr;
uspoof_getSkeletonUnicodeString(sc, type, srcStr, destStr, status);
if (U_FAILURE(*status)) {