41#define MAX_ELEM_LEN 64
42#define MAX_LOCALE_LENGTH 256
51#define MSVCRT_LEADBYTE 0x8000
52#define MSVCRT_C1_DEFINED 0x200
55#define LCID_CONVERSION_FLAGS LOCALE_ALLOW_NEUTRAL_NAMES
57#define LCID_CONVERSION_FLAGS 0
62 {{
"Sun",
"Mon",
"Tue",
"Wed",
"Thu",
"Fri",
"Sat",
63 "Sunday",
"Monday",
"Tuesday",
"Wednesday",
"Thursday",
"Friday",
"Saturday",
64 "Jan",
"Feb",
"Mar",
"Apr",
"May",
"Jun",
"Jul",
"Aug",
"Sep",
"Oct",
"Nov",
"Dec",
65 "January",
"February",
"March",
"April",
"May",
"June",
"July",
66 "August",
"September",
"October",
"November",
"December",
67 "AM",
"PM",
"MM/dd/yy",
"dddd, MMMM dd, yyyy",
"HH:mm:ss"}},
72#if _MSVCR_VER == 0 || _MSVCR_VER >= 100
73 {{
L"Sun",
L"Mon",
L"Tue",
L"Wed",
L"Thu",
L"Fri",
L"Sat",
74 L"Sunday",
L"Monday",
L"Tuesday",
L"Wednesday",
L"Thursday",
L"Friday",
L"Saturday",
75 L"Jan",
L"Feb",
L"Mar",
L"Apr",
L"May",
L"Jun",
L"Jul",
L"Aug",
L"Sep",
L"Oct",
L"Nov",
L"Dec",
76 L"January",
L"February",
L"March",
L"April",
L"May",
L"June",
L"July",
77 L"August",
L"September",
L"October",
L"November",
L"December",
78 L"AM",
L"PM",
L"MM/dd/yy",
L"dddd, MMMM dd, yyyy",
L"HH:mm:ss"}},
87 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
88 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
89 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
90 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
91 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27,
92 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f,
93 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37,
94 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f,
95 0x40, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67,
96 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f,
97 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77,
98 0x78, 0x79, 0x7a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f,
99 0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67,
100 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f,
101 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77,
102 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f,
103 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87,
104 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f,
105 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97,
106 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f,
107 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7,
108 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf,
109 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7,
110 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf,
111 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7,
112 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf,
113 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7,
114 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf,
115 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7,
116 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef,
117 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7,
118 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff
123 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
124 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
125 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
126 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
127 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27,
128 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f,
129 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37,
130 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f,
131 0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47,
132 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f,
133 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57,
134 0x58, 0x59, 0x5a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f,
135 0x60, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47,
136 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f,
137 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57,
138 0x58, 0x59, 0x5a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f,
139 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87,
140 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f,
141 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97,
142 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f,
143 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7,
144 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf,
145 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7,
146 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf,
147 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7,
148 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf,
149 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7,
150 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf,
151 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7,
152 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef,
153 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7,
154 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff
161static wchar_t cloc_dec_pointW[] =
L".";
165 cloc_dec_point,
empty,
empty,
empty,
empty,
empty,
empty,
empty,
empty,
empty,
176 "american english",
"en-US",
177 "american-english",
"en-US",
178 "english-american",
"en-US",
179 "english-us",
"en-US",
180 "english-usa",
"en-US",
183 "australian",
"en-AU",
184 "english-aus",
"en-AU",
186 "french-belgian",
"fr-BE",
188 "english-can",
"en-CA",
189 "french-canadian",
"fr-CA",
192 "chinese-simplified",
"zh",
193 "chinese-traditional",
"zh-HK",
198 "chinese-simplified",
"zh-CN",
199 "chinese-traditional",
"zh-TW",
203 "dutch-belgian",
"nl-BE",
204 "english-nz",
"en-NZ",
206 "english-uk",
"en-GB",
207 "french-swiss",
"fr-CH",
209 "german-swiss",
"de-CH",
210 "italian-swiss",
"it-CH",
211 "german-austrian",
"de-AT",
212 "portuguese",
"pt-BR",
213 "portuguese-brazil",
"pt-BR",
214 "spanish-mexican",
"es-MX",
215 "norwegian-bokmal",
"nb",
216 "norwegian-nynorsk",
"nn-NO",
217 "spanish-modern",
"es-ES"
239#define FOUND_SNAME 0x4
240#define FOUND_LANGUAGE 0x2
241#define FOUND_COUNTRY 0x1
251#define CONTINUE_LOOKING TRUE
252#define STOP_LOOKING FALSE
281 unsigned int flags = 0;
326 TRACE(
":found exact locale match\n");
338 const char *
cp, *region;
346 *sname_match =
data->cached_sname_match;
366 search_language_buf[region-
locale] =
'\0';
368 search_country_buf[0] =
'\0';
372 search_country_buf[
cp-region-1] =
'\0';
374 search_language_buf[
cp-
locale] =
'\0';
441 *sname_match = is_sname;
445 data->cached_cp = locale_cp;
446 data->cached_sname_match = is_sname;
495 if(!
locinfo->lc_category[cat].wrefcount)
497 *
locinfo->lc_category[cat].wrefcount = 1;
550 wcscpy( wbuf,
L"Norwegian-Nynorsk" );
595 if(
locinfo->lc_category[
i].wrefcount)
598 if(
locinfo->lconv_intl_refcount)
600 if(
locinfo->lconv_num_refcount)
602 if(
locinfo->lconv_mon_refcount)
638 return data->locinfo;
645 return data->mbcinfo;
664 "LC_COLLATE=%s;LC_CTYPE=%s;LC_MONETARY=%s;LC_NUMERIC=%s;LC_TIME=%s",
671 return current_lc_all;
760 for(
i=0;
i<12;
i++) {
769 for(
i=0;
i<12;
i++) {
797 for(
i=0;
i<12;
i++) {
806 for(
i=0;
i<12;
i++) {
881 WCHAR buf_in[32], *
in = buf_in;
883 int in_len, out_len,
r;
885 TRACE(
"(lcid %lx, flags %lx, %s(%d), %p(%d), %x, %d), partial stub!\n",
889 if (!in_len)
return 0;
935 FIXME(
"(lcid %lx, flags %lx, %s(%d), %p(%d), %x, %d), partial stub!\n",
945 const char *src2,
int len2 )
947 FIXME(
"(lcid %lx, flags %lx, %s(%d), %s(%d), partial stub\n",
957 const wchar_t *src2,
int len2 )
959 FIXME(
"(lcid %lx, flags %lx, %s(%d), %s(%d), partial stub\n",
995 FIXME(
"(unk %lx, type %lx, wstr %p(%d), %p) partial stub\n",
1034#if _MSVCR_VER >= 110
1069 if(!
locinfo->lc_category[
i].refcount
1074 if(!
locinfo->lc_category[
i].wrefcount
1076#if _MSVCR_VER >= 110
1083 if(
locinfo->lconv_num_refcount
1088#if _MSVCR_VER >= 100
1094 if(
locinfo->lconv_mon_refcount
1103#if _MSVCR_VER >= 100
1113 if(
locinfo->lconv_intl_refcount
1199#if _MSVCR_VER >= 110
1210 static const DWORD time_data[] = {
1239#if _MSVCR_VER == 0 || _MSVCR_VER >= 100
1246#if _MSVCR_VER >= 110
1247 size += (
wcslen(sname) + 1) *
sizeof(
wchar_t);
1259#if _MSVCR_VER == 0 || _MSVCR_VER >= 100
1261 cur->wstr.wstr[
i] = (
wchar_t*)&
cur->data[
ret];
1263 (
size -
ret) /
sizeof(
wchar_t)) *
sizeof(
wchar_t);
1266#if _MSVCR_VER >= 110
1267 cur->locname = (
wchar_t*)&
cur->data[
ret];
1281 static const char collate[] =
"COLLATE=";
1282 static const char ctype[] =
"CTYPE=";
1283 static const char monetary[] =
"MONETARY=";
1284 static const char numeric[] =
"NUMERIC=";
1285 static const char time[] =
"TIME=";
1288 unsigned short cp[6] = { 0 };
1290 WCHAR *locale_sname[6] = { 0 };
1291 int val, locale_len[6] = { 0 };
1294 wchar_t wbuf[256], map_buf[256];
1303 locale_sname[0] =
NULL;
1316 }
else if(!
memcmp(
locale, monetary,
sizeof(monetary)-1)) {
1318 locale +=
sizeof(monetary)-1;
1319 }
else if(!
memcmp(
locale, numeric,
sizeof(numeric)-1)) {
1321 locale +=
sizeof(numeric)-1;
1330 locale_sname[
i] =
NULL;
1343 if(!locale_found || !(locale_sname[
i] =
wcsdup(wbuf)))
1351 if(!
p || *(
p+1)!=
'L' || *(
p+2)!=
'C' || *(
p+3)!=
'_')
1362 locale_sname[0] =
wcsdup(wbuf);
1363 if(!locale_sname[0])
1371 for(
i=1;
i<6;
i++) {
1372 locale_sname[
i] =
wcsdup(locale_sname[0]);
1373 if(!locale_sname[
i])
1378 locale_len[
i] = locale_len[0];
1382 for(
i=1;
i<6;
i++) {
1385#if _MSVCR_VER >= 110
1388 if (old_locinfo->
lc_name[
i] && !locale_sname[
i])
1393 if(old_locinfo && old_locinfo->
lc_handle[
i]) {
1396 if(!locale_sname[
i])
1400 locale_sname[
i] =
NULL;
1411#if _MSVCR_VER >= 110
1413 if(old_locinfo->
lc_name[
i] && !locale_sname[
i])
1420 if(!locale_sname[
i])
1424 locale_sname[
i] =
NULL;
1429 locale_sname[
i] =
NULL;
1484 }
else if(locale_sname[
LC_CTYPE]) {
1501 if(!
locinfo->ctype1_refcount) {
1504 *
locinfo->ctype1_refcount = 1;
1517 for(
i=1;
i<257;
i++) {
1530 for(
i=0;
i<256;
i++) {
1559 if(
locinfo->lconv_intl_refcount)
1572 *
locinfo->lconv_intl_refcount = 1;
1587 if(
locinfo->lconv_mon_refcount)
1590 locinfo->lconv->int_curr_symbol = old_locinfo->
lconv->int_curr_symbol;
1591 locinfo->lconv->currency_symbol = old_locinfo->
lconv->currency_symbol;
1592 locinfo->lconv->mon_decimal_point = old_locinfo->
lconv->mon_decimal_point;
1593 locinfo->lconv->mon_thousands_sep = old_locinfo->
lconv->mon_thousands_sep;
1594 locinfo->lconv->mon_grouping = old_locinfo->
lconv->mon_grouping;
1595 locinfo->lconv->positive_sign = old_locinfo->
lconv->positive_sign;
1596 locinfo->lconv->negative_sign = old_locinfo->
lconv->negative_sign;
1597 locinfo->lconv->int_frac_digits = old_locinfo->
lconv->int_frac_digits;
1598 locinfo->lconv->frac_digits = old_locinfo->
lconv->frac_digits;
1599 locinfo->lconv->p_cs_precedes = old_locinfo->
lconv->p_cs_precedes;
1600 locinfo->lconv->p_sep_by_space = old_locinfo->
lconv->p_sep_by_space;
1601 locinfo->lconv->n_cs_precedes = old_locinfo->
lconv->n_cs_precedes;
1602 locinfo->lconv->n_sep_by_space = old_locinfo->
lconv->n_sep_by_space;
1603 locinfo->lconv->p_sign_posn = old_locinfo->
lconv->p_sign_posn;
1604 locinfo->lconv->n_sign_posn = old_locinfo->
lconv->n_sign_posn;
1605#if _MSVCR_VER >= 100
1606 locinfo->lconv->_W_int_curr_symbol = old_locinfo->
lconv->_W_int_curr_symbol;
1607 locinfo->lconv->_W_currency_symbol = old_locinfo->
lconv->_W_currency_symbol;
1608 locinfo->lconv->_W_mon_decimal_point = old_locinfo->
lconv->_W_mon_decimal_point;
1609 locinfo->lconv->_W_mon_thousands_sep = old_locinfo->
lconv->_W_mon_thousands_sep;
1610 locinfo->lconv->_W_positive_sign = old_locinfo->
lconv->_W_positive_sign;
1611 locinfo->lconv->_W_negative_sign = old_locinfo->
lconv->_W_negative_sign;
1621 if(!
locinfo->lconv_mon_refcount) {
1625 *
locinfo->lconv_mon_refcount = 1;
1667 i =
i/2 + (
buf[
i-2]==
'0'?0:1);
1669 for(
i=0;
buf[
i+1]==
';';
i+=2)
1673 locinfo->lconv->mon_grouping[
i/2+1] = 127;
1752#if _MSVCR_VER >= 100
1755 if(
i && (
locinfo->lconv->_W_int_curr_symbol =
malloc(
i *
sizeof(
wchar_t))))
1756 memcpy(
locinfo->lconv->_W_int_curr_symbol, wbuf,
i *
sizeof(
wchar_t));
1763 if(
i && (
locinfo->lconv->_W_currency_symbol =
malloc(
i *
sizeof(
wchar_t))))
1764 memcpy(
locinfo->lconv->_W_currency_symbol, wbuf,
i *
sizeof(
wchar_t));
1771 if(
i && (
locinfo->lconv->_W_mon_decimal_point =
malloc(
i *
sizeof(
wchar_t))))
1772 memcpy(
locinfo->lconv->_W_mon_decimal_point, wbuf,
i *
sizeof(
wchar_t));
1779 if(
i && (
locinfo->lconv->_W_mon_thousands_sep =
malloc(
i *
sizeof(
wchar_t))))
1780 memcpy(
locinfo->lconv->_W_mon_thousands_sep, wbuf,
i *
sizeof(
wchar_t));
1787 if(
i && (
locinfo->lconv->_W_positive_sign =
malloc(
i *
sizeof(
wchar_t))))
1788 memcpy(
locinfo->lconv->_W_positive_sign, wbuf,
i *
sizeof(
wchar_t));
1795 if(
i && (
locinfo->lconv->_W_negative_sign =
malloc(
i *
sizeof(
wchar_t))))
1796 memcpy(
locinfo->lconv->_W_negative_sign, wbuf,
i *
sizeof(
wchar_t));
1819#if _MSVCR_VER >= 100
1844 if(
locinfo->lconv_num_refcount)
1847 locinfo->lconv->decimal_point = old_locinfo->
lconv->decimal_point;
1848 locinfo->lconv->thousands_sep = old_locinfo->
lconv->thousands_sep;
1849 locinfo->lconv->grouping = old_locinfo->
lconv->grouping;
1850#if _MSVCR_VER >= 100
1851 locinfo->lconv->_W_decimal_point = old_locinfo->
lconv->_W_decimal_point;
1852 locinfo->lconv->_W_thousands_sep = old_locinfo->
lconv->_W_thousands_sep;
1862 if(!
locinfo->lconv_num_refcount) {
1866 *
locinfo->lconv_num_refcount = 1;
1890 i =
i/2 + (
buf[
i-2]==
'0'?0:1);
1892 for(
i=0;
buf[
i+1]==
';';
i+=2)
1896 locinfo->lconv->grouping[
i/2+1] = 127;
1901#if _MSVCR_VER >= 100
1904 if(
i && (
locinfo->lconv->_W_decimal_point =
malloc(
i *
sizeof(
wchar_t))))
1905 memcpy(
locinfo->lconv->_W_decimal_point, wbuf,
i *
sizeof(
wchar_t));
1912 if(
i && (
locinfo->lconv->_W_thousands_sep =
malloc(
i *
sizeof(
wchar_t))))
1913 memcpy(
locinfo->lconv->_W_thousands_sep, wbuf,
i *
sizeof(
wchar_t));
1924#if _MSVCR_VER >= 100
1946 }
else if(locale_sname[
LC_TIME]) {
1965 free(locale_sname[
i]);
1973 free(locale_sname[
i]);
2005#if _MSVCR_VER >= 110
2052 locale_flags =
data->locale_flags;
2055 data->locale_flags = locale_flags;
2068 data->locinfo = newlocinfo;
2125 return ret ? current_lc_all :
NULL;
2143 data->locale_flags &= ~LOCALE_THREAD;
2171#if _MSVCR_VER >= 120
2177 static const char str_tolower[] =
"tolower";
2178 static const char str_toupper[] =
"toupper";
BOOL WINAPI EnumSystemLocalesEx(LOCALE_ENUMPROCEX proc, DWORD flags, LPARAM lparam, LPVOID reserved)
INT WINAPI GetLocaleInfoEx(LPCWSTR locale, LCTYPE info, LPWSTR buffer, INT len)
int WINAPI LCIDToLocaleName(_In_ LCID Locale, _Out_writes_opt_(cchName) LPWSTR lpName, _In_ int cchName, _In_ DWORD dwFlags)
#define InterlockedIncrement
#define InterlockedDecrement
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
#define _strnicmp(_String1, _String2, _MaxCount)
#define WideCharToMultiByte
#define MultiByteToWideChar
LCID WINAPI LocaleNameToLCID(_In_ LPCWSTR lpName, _In_ DWORD dwFlags)
BOOL WINAPI IsValidCodePage(UINT codepage)
INT WINAPI CompareStringA(LCID lcid, DWORD flags, LPCSTR str1, INT len1, LPCSTR str2, INT len2)
INT WINAPI CompareStringW(LCID lcid, DWORD flags, LPCWSTR str1, INT len1, LPCWSTR str2, INT len2)
INT WINAPI GetLocaleInfoA(LCID lcid, LCTYPE lctype, LPSTR buffer, INT len)
BOOL WINAPI GetCPInfo(UINT codepage, LPCPINFO cpinfo)
BOOL WINAPI IsValidLocaleName(LPCWSTR locale)
BOOL WINAPI GetStringTypeW(DWORD type, LPCWSTR src, INT count, LPWORD chartype)
INT WINAPI LCMapStringW(LCID lcid, DWORD flags, LPCWSTR src, INT srclen, LPWSTR dst, INT dstlen)
INT WINAPI GetLocaleInfoW(LCID lcid, LCTYPE lctype, LPWSTR buffer, INT len)
INT WINAPI GetUserDefaultLocaleName(LPWSTR localename, int buffersize)
_ACRTIMP int __cdecl _wcsicmp(const wchar_t *, const wchar_t *)
_ACRTIMP size_t __cdecl wcslen(const wchar_t *)
_ACRTIMP int __cdecl wcscmp(const wchar_t *, const wchar_t *)
_ACRTIMP int __cdecl memcmp(const void *, const void *, size_t)
_ACRTIMP int __cdecl _wcsnicmp(const wchar_t *, const wchar_t *, size_t)
#define _DISABLE_PER_THREAD_LOCALE
_ACRTIMP int __cdecl _configthreadlocale(int)
#define _ENABLE_PER_THREAD_LOCALE
_ACRTIMP int __cdecl _setmbcp(int)
_ACRTIMP int __cdecl atoi(const char *)
_ACRTIMP char *__cdecl strchr(const char *, int)
_ACRTIMP size_t __cdecl strlen(const char *)
_ACRTIMP int __cdecl strcmp(const char *, const char *)
static wchar_t * wcsdup(const wchar_t *str)
wctrans_t __cdecl wctrans(const char *)
static const char *const _country_synonyms[]
unsigned short * MSVCRT__pctype
static BOOL category_needs_update(int cat, const threadlocinfo *locinfo, WCHAR *sname, unsigned short cp)
static struct lconv cloc_lconv
void free_mbcinfo(pthreadmbcinfo mbcinfo)
int CDECL __crtLCMapStringA(LCID lcid, DWORD mapflags, const char *src, int srclen, char *dst, int dstlen, unsigned int codepage, int xflag)
pthreadmbcinfo CDECL get_mbcinfo(void)
int CDECL __lconv_init(void)
LCID *CDECL ___lc_handle_func(void)
int MSVCRT___lc_collate_cp
static __lc_time_data * create_time_data(WCHAR *sname)
static void update_thread_locale(thread_data_t *data)
_locale_t CDECL get_current_locale_noalloc(_locale_t locale)
unsigned int MSVCRT___lc_codepage
void free_locinfo(pthreadlocinfo locinfo)
void CDECL _lock_locales(void)
static void copy_threadlocinfo_category(pthreadlocinfo locinfo, const threadlocinfo *old_locinfo, int category)
_locale_t CDECL _create_locale(int category, const char *locale)
static BOOL CALLBACK find_best_locale_proc(WCHAR *name, DWORD locale_flags, LPARAM lParam)
int CDECL __crtGetLocaleInfoW(LCID lcid, LCTYPE type, wchar_t *buffer, int len)
void CDECL _free_locale(_locale_t locale)
static BOOL remap_synonym(char *name)
static char cloc_dec_point[]
static BOOL update_threadlocinfo_category(WCHAR *sname, unsigned short cp, pthreadlocinfo locinfo, int category)
char *CDECL _Getdays(void)
static pthreadlocinfo create_locinfo(int category, const char *locale, const threadlocinfo *old_locinfo)
static int compare_info(WCHAR *name, DWORD flags, WCHAR *buff, const WCHAR *cmp, BOOL exact)
static const unsigned char cloc_cumap[256]
static char * construct_lc_all(pthreadlocinfo locinfo)
char *CDECL _Getmonths(void)
int CDECL __crtCompareStringA(LCID lcid, DWORD flags, const char *src1, int len1, const char *src2, int len2)
BOOL CDECL __crtGetStringTypeW(DWORD unk, DWORD type, wchar_t *buffer, int len, WORD *out)
LCID MSVCRT___lc_handle[LC_MAX - LC_MIN+1]
void *CDECL _Gettnames(void)
BOOL msvcrt_init_locale(void)
wchar_t *CDECL _wsetlocale(int category, const wchar_t *wlocale)
BOOL locale_to_sname(const char *locale, unsigned short *codepage, BOOL *sname_match, WCHAR *sname)
#define LCID_CONVERSION_FLAGS
__lc_time_data cloc_time_data
static const unsigned char cloc_clmap[256]
void CDECL _unlock_locales(void)
#define MAX_LOCALE_LENGTH
_locale_t CDECL _get_current_locale(void)
static void grab_locinfo(pthreadlocinfo locinfo)
static BOOL set_lc_locale_name(pthreadlocinfo locinfo, int cat, WCHAR *sname)
int CDECL __crtLCMapStringW(LCID lcid, DWORD mapflags, const wchar_t *src, int srclen, wchar_t *dst, int dstlen, unsigned int codepage, int xflag)
int CDECL ___lc_collate_cp_func(void)
pthreadlocinfo CDECL get_locinfo(void)
static BOOL init_category_name(const char *name, int len, pthreadlocinfo locinfo, int category)
void CDECL free_locale_noalloc(_locale_t locale)
unsigned int CDECL ___lc_codepage_func(void)
int CDECL __crtCompareStringW(LCID lcid, DWORD flags, const wchar_t *src1, int len1, const wchar_t *src2, int len2)
struct lconv *CDECL localeconv(void)
void CDECL _lock(int locknum)
void CDECL _unlock(int locknum)
thread_data_t *CDECL msvcrt_get_thread_data(void)
static unsigned char buff[32768]
GLuint GLuint GLsizei GLenum type
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLdouble GLdouble GLdouble r
GLenum GLuint GLenum GLsizei const GLchar * buf
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
#define MB_ERR_INVALID_CHARS
static const WCHAR emptyW[]
wchar_t **__cdecl ___lc_locale_name_func()
threadmbcinfo * create_mbcinfo(int cp, LCID lcid, threadmbcinfo *old_mbcinfo)
#define memcpy(s1, s2, n)
static DWORD LPDWORD LPCSTR DWORD srclen
#define cmp(status, error)
static short search(int val, const short *table, int size)
#define LOCALE_NAME_MAX_LENGTH
#define MAKELCID(lgid, srtid)
#define SUBLANG_NORWEGIAN_NYNORSK
#define LANGIDFROMLCID(l)
void *__cdecl _W_Gettnames()
unsigned int lc_collate_cp
struct threadlocaleinfostruct::@576 lc_category[6]
struct __lc_time_data * lc_time_curr
const unsigned char * pcumap
const unsigned char * pclmap
int * lconv_intl_refcount
__msvcrt_ulong lc_handle[6]
#define FIELD_OFFSET(t, f)
wchar_t *__cdecl _W_Getmonths()
wchar_t tm const _CrtWcstime_Writes_and_advances_ptr_ count wchar_t ** out
wchar_t *__cdecl _W_Getdays()
#define LOCALE_SABBREVMONTHNAME10
#define LOCALE_SMONTHNAME12
#define LOCALE_ICURRDIGITS
#define LOCALE_IDEFAULTCODEPAGE
#define LOCALE_SMONTHNAME5
#define LOCALE_SABBREVMONTHNAME9
#define LOCALE_SABBREVMONTHNAME11
#define LOCALE_SABBREVDAYNAME5
#define LOCALE_SABBREVDAYNAME2
#define LOCALE_INEGSEPBYSPACE
#define LOCALE_SABBREVMONTHNAME2
#define LOCALE_INEGSIGNPOSN
#define LOCALE_SMONTHNAME3
#define LOCALE_SMONTHNAME11
#define LOCALE_SMONTHNAME8
#define LOCALE_SMONTHNAME4
#define LOCALE_SENGLANGUAGE
#define LOCALE_SMONTHNAME7
#define LOCALE_IINTLCURRDIGITS
#define LOCALE_SSHORTDATE
#define LOCALE_IPOSSYMPRECEDES
#define LOCALE_SABBREVMONTHNAME4
#define LOCALE_SPOSITIVESIGN
#define LOCALE_SABBREVDAYNAME4
#define LOCALE_SMONDECIMALSEP
#define LOCALE_SISO639LANGNAME
#define LOCALE_SMONTHNAME1
#define LOCALE_SABBREVMONTHNAME3
#define LOCALE_INEGSYMPRECEDES
#define LOCALE_SMONTHOUSANDSEP
#define LOCALE_IPOSSIGNPOSN
#define LOCALE_SABBREVMONTHNAME1
#define LOCALE_NOUSEROVERRIDE
#define LOCALE_IDEFAULTANSICODEPAGE
#define LOCALE_SISO3166CTRYNAME
#define LOCALE_SABBREVDAYNAME6
#define LOCALE_SMONTHNAME2
#define LOCALE_STIMEFORMAT
#define LOCALE_SABBREVDAYNAME1
#define LOCALE_SABBREVMONTHNAME6
#define LOCALE_SMONTHNAME6
#define LOCALE_SABBREVLANGNAME
#define LOCALE_SENGCOUNTRY
#define LOCALE_SABBREVCTRYNAME
#define LOCALE_SNEGATIVESIGN
#define LOCALE_SABBREVDAYNAME3
#define LOCALE_SABBREVMONTHNAME5
#define LOCALE_SABBREVMONTHNAME7
#define LOCALE_SINTLSYMBOL
#define LOCALE_SABBREVMONTHNAME8
#define LOCALE_SMONGROUPING
#define LOCALE_SMONTHNAME10
#define LOCALE_SMONTHNAME9
#define LOCALE_IPOSSEPBYSPACE
#define LOCALE_SABBREVMONTHNAME12
#define LOCALE_SABBREVDAYNAME7
_locale_t __cdecl _wcreate_locale(int _category, const wchar_t *locale)