+// Copyright (C) 2016 and later: Unicode, Inc. and others.
+// License & terms of use: http://www.unicode.org/copyright.html
/*
********************************************************************************
* Copyright (C) 2005-2016, International Business Machines
GetLocaleInfoA(lcid, LOCALE_SGROUPING, buf, 10);
fmt->Grouping = getGrouping(buf);
- fmt->lpDecimalSep = NEW_ARRAY(UChar, 6);
+ fmt->lpDecimalSep = NEW_ARRAY(wchar_t, 6);
GetLocaleInfoW(lcid, LOCALE_SDECIMAL, fmt->lpDecimalSep, 6);
- fmt->lpThousandSep = NEW_ARRAY(UChar, 6);
+ fmt->lpThousandSep = NEW_ARRAY(wchar_t, 6);
GetLocaleInfoW(lcid, LOCALE_STHOUSAND, fmt->lpThousandSep, 6);
GetLocaleInfoW(lcid, LOCALE_RETURN_NUMBER|LOCALE_INEGNUMBER, (LPWSTR) &fmt->NegativeOrder, sizeof(UINT));
GetLocaleInfoA(lcid, LOCALE_SMONGROUPING, buf, sizeof(buf));
fmt->Grouping = getGrouping(buf);
- fmt->lpDecimalSep = NEW_ARRAY(UChar, 6);
+ fmt->lpDecimalSep = NEW_ARRAY(wchar_t, 6);
GetLocaleInfoW(lcid, LOCALE_SMONDECIMALSEP, fmt->lpDecimalSep, 6);
- fmt->lpThousandSep = NEW_ARRAY(UChar, 6);
+ fmt->lpThousandSep = NEW_ARRAY(wchar_t, 6);
GetLocaleInfoW(lcid, LOCALE_SMONTHOUSANDSEP, fmt->lpThousandSep, 6);
GetLocaleInfoW(lcid, LOCALE_RETURN_NUMBER|LOCALE_INEGCURR, (LPWSTR) &fmt->NegativeOrder, sizeof(UINT));
GetLocaleInfoW(lcid, LOCALE_RETURN_NUMBER|LOCALE_ICURRENCY, (LPWSTR) &fmt->PositiveOrder, sizeof(UINT));
- fmt->lpCurrencySymbol = NEW_ARRAY(UChar, 8);
+ fmt->lpCurrencySymbol = NEW_ARRAY(wchar_t, 8);
GetLocaleInfoW(lcid, LOCALE_SCURRENCY, (LPWSTR) fmt->lpCurrencySymbol, 8);
}
}
}
- UChar stackBuffer[STACK_BUFFER_SIZE];
- UChar *buffer = stackBuffer;
+ wchar_t stackBuffer[STACK_BUFFER_SIZE];
+ wchar_t *buffer = stackBuffer;
FormatInfo formatInfo;
formatInfo = *fFormatInfo;
if (lastError == ERROR_INSUFFICIENT_BUFFER) {
int newLength = GetCurrencyFormatW(fLCID, 0, nBuffer, &formatInfo.currency, NULL, 0);
- buffer = NEW_ARRAY(UChar, newLength);
+ buffer = NEW_ARRAY(wchar_t, newLength);
buffer[0] = 0x0000;
GetCurrencyFormatW(fLCID, 0, nBuffer, &formatInfo.currency, buffer, newLength);
}
if (GetLastError() == ERROR_INSUFFICIENT_BUFFER) {
int newLength = GetNumberFormatW(fLCID, 0, nBuffer, &formatInfo.number, NULL, 0);
- buffer = NEW_ARRAY(UChar, newLength);
+ buffer = NEW_ARRAY(wchar_t, newLength);
buffer[0] = 0x0000;
GetNumberFormatW(fLCID, 0, nBuffer, &formatInfo.number, buffer, newLength);
}
}
}
- appendTo.append(buffer, (int32_t) wcslen(buffer));
+ appendTo.append((UChar *)buffer, (int32_t) wcslen(buffer));
if (buffer != stackBuffer) {
DELETE_ARRAY(buffer);