# define NOMCX
# include <windows.h>
+#include <algorithm>
+
static const char *getCalendarType(int32_t type)
{
switch (type)
for (int z = 0; z < ec; z += 1) {
UnicodeString equiv = TimeZone::getEquivalentID(zoneID, z);
- if (found = uprv_getWindowsTimeZoneInfo(&tzi, equiv.getBuffer(), equiv.length())) {
+ found = uprv_getWindowsTimeZoneInfo(&tzi, equiv.getBuffer(), equiv.length());
+ if (found) {
break;
}
}
for(int i = 0; i < lcidCount; i += 1) {
UErrorCode status = U_ZERO_ERROR;
WCHAR longDateFormat[81], longTimeFormat[81], wdBuffer[256], wtBuffer[256];
+ DWORD value = 0;
int32_t calType = 0;
// NULL localeID means ICU didn't recognize this locale
GetLocaleInfoW(lcidRecords[i].lcid, LOCALE_SLONGDATE, longDateFormat, 81);
GetLocaleInfoW(lcidRecords[i].lcid, LOCALE_STIMEFORMAT, longTimeFormat, 81);
- GetLocaleInfoW(lcidRecords[i].lcid, LOCALE_RETURN_NUMBER|LOCALE_ICALENDARTYPE, (LPWSTR) calType, sizeof(int32_t));
+ GetLocaleInfoW(lcidRecords[i].lcid, LOCALE_RETURN_NUMBER|LOCALE_ICALENDARTYPE, (LPWSTR)&value, sizeof(value)/sizeof(WCHAR));
+ calType = value;
char localeID[64];
uprv_strcpy(localeID, lcidRecords[i].localeID);