33 #define strcasecmp _stricmp
40#define WINVER DLL_EXPORT_VERSION
43#define LOCALE_NAME_USER_DEFAULT NULL
54#define NLSRC_OFFSET 5000
58#define LOCALE_LOCALEINFOFLAGSMASK (LOCALE_NOUSEROVERRIDE|LOCALE_USE_CP_ACP|\
59 LOCALE_RETURN_NUMBER|LOCALE_RETURN_GENITIVE_NAMES)
60#define MB_FLAGSMASK (MB_PRECOMPOSED|MB_COMPOSITE|MB_USEGLYPHCHARS|MB_ERR_INVALID_CHARS)
61#define WC_FLAGSMASK (WC_DISCARDNS|WC_SEPCHARS|WC_DEFAULTCHAR|WC_ERR_INVALID_CHARS|\
62 WC_COMPOSITECHECK|WC_NO_BEST_FIT_CHARS)
71 '\\',
'R',
'e',
'g',
'i',
's',
't',
'r',
'y',
'\\',
'M',
'a',
'c',
'h',
'i',
'n',
'e',
'\\',
'S',
'y',
's',
't',
'e',
'm',
'\\',
72 'C',
'u',
'r',
'r',
'e',
'n',
't',
'C',
'o',
'n',
't',
'r',
'o',
'l',
'S',
'e',
't',
'\\',
73 'C',
'o',
'n',
't',
'r',
'o',
'l',
'\\',
'N',
'l',
's',
'\\',
'L',
'o',
'c',
'a',
'l',
'e',0
77 '\\',
'R',
'e',
'g',
'i',
's',
't',
'r',
'y',
'\\',
'M',
'a',
'c',
'h',
'i',
'n',
'e',
'\\',
'S',
'y',
's',
't',
'e',
'm',
'\\',
78 'C',
'u',
'r',
'r',
'e',
'n',
't',
'C',
'o',
'n',
't',
'r',
'o',
'l',
'S',
'e',
't',
'\\',
79 'C',
'o',
'n',
't',
'r',
'o',
'l',
'\\',
'N',
'l',
's',
'\\',
80 'L',
'a',
'n',
'g',
'u',
'a',
'g',
'e',
' ',
'G',
'r',
'o',
'u',
'p',
's',0
87 const char *charset_name;
126 {
"ISO88591", 28591 },
127 {
"ISO885910", 28600 },
128 {
"ISO885913", 28603 },
129 {
"ISO885914", 28604 },
130 {
"ISO885915", 28605 },
131 {
"ISO885916", 28606 },
132 {
"ISO88592", 28592 },
133 {
"ISO88593", 28593 },
134 {
"ISO88594", 28594 },
135 {
"ISO88595", 28595 },
136 {
"ISO88596", 28596 },
137 {
"ISO88597", 28597 },
138 {
"ISO88598", 28598 },
139 {
"ISO88599", 28599 },
171static const WCHAR iCalendarTypeW[] = {
'i',
'C',
'a',
'l',
'e',
'n',
'd',
'a',
'r',
'T',
'y',
'p',
'e',0};
173static const WCHAR iCurrDigitsW[] = {
'i',
'C',
'u',
'r',
'r',
'D',
'i',
'g',
'i',
't',
's',0};
177static const WCHAR iFirstDayOfWeekW[] = {
'i',
'F',
'i',
'r',
's',
't',
'D',
'a',
'y',
'O',
'f',
'W',
'e',
'e',
'k',0};
178static const WCHAR iFirstWeekOfYearW[] = {
'i',
'F',
'i',
'r',
's',
't',
'W',
'e',
'e',
'k',
'O',
'f',
'Y',
'e',
'a',
'r',0};
183static const WCHAR iNegNumberW[] = {
'i',
'N',
'e',
'g',
'N',
'u',
'm',
'b',
'e',
'r',0};
184static const WCHAR iPaperSizeW[] = {
'i',
'P',
'a',
'p',
'e',
'r',
'S',
'i',
'z',
'e',0};
186static const WCHAR iTimePrefixW[] = {
'i',
'T',
'i',
'm',
'e',
'P',
'r',
'e',
'f',
'i',
'x',0};
198static const WCHAR sMonDecimalSepW[] = {
's',
'M',
'o',
'n',
'D',
'e',
'c',
'i',
'm',
'a',
'l',
'S',
'e',
'p',0};
199static const WCHAR sMonGroupingW[] = {
's',
'M',
'o',
'n',
'G',
'r',
'o',
'u',
'p',
'i',
'n',
'g',0};
200static const WCHAR sMonThousandSepW[] = {
's',
'M',
'o',
'n',
'T',
'h',
'o',
'u',
's',
'a',
'n',
'd',
'S',
'e',
'p',0};
201static const WCHAR sNativeDigitsW[] = {
's',
'N',
'a',
't',
'i',
'v',
'e',
'D',
'i',
'g',
'i',
't',
's',0};
202static const WCHAR sNegativeSignW[] = {
's',
'N',
'e',
'g',
'a',
't',
'i',
'v',
'e',
'S',
'i',
'g',
'n',0};
203static const WCHAR sPositiveSignW[] = {
's',
'P',
'o',
's',
'i',
't',
'i',
'v',
'e',
'S',
'i',
'g',
'n',0};
204static const WCHAR sShortDateW[] = {
's',
'S',
'h',
'o',
'r',
't',
'D',
'a',
't',
'e',0};
206static const WCHAR sTimeFormatW[] = {
's',
'T',
'i',
'm',
'e',
'F',
'o',
'r',
'm',
'a',
't',0};
208static const WCHAR sYearMonthW[] = {
's',
'Y',
'e',
'a',
'r',
'M',
'o',
'n',
't',
'h',0};
258 { LOCALE_IDIGITSUBSTITUTION,
NumShapeW },
269 while (
n > 1 && *
src)
335#if (WINVER >= 0x0600)
339static int charset_cmp(
const void *
name,
const void *
entry )
351 char charset_name[16];
355 for (
i =
j = 0;
name[
i] &&
j <
sizeof(charset_name)-1;
i++)
360 sizeof(charset_names)/
sizeof(charset_names[0]),
361 sizeof(charset_names[0]), charset_cmp );
385#if (WINVER >= 0x0600)
400 if (
data->win_name[0] &&
468 return (
data->matches < 4);
481 static const WCHAR sepW[] = {
'-',
'_',
'.',
'@',0};
482 static const WCHAR winsepW[] = {
'-',
'_',0};
483 static const WCHAR posixW[] = {
'P',
'O',
'S',
'I',
'X',0};
484 static const WCHAR cW[] = {
'C',0};
485 static const WCHAR latinW[] = {
'l',
'a',
't',
'i',
'n',0};
486 static const WCHAR latnW[] = {
'-',
'L',
'a',
't',
'n',0};
495 name->win_name[0] = 0;
559 name->codepage = find_charset(
name->charset );
563 if (
name->charset)
goto done;
595 switch(lctype & 0xffff)
597 case LOCALE_SSORTNAME:
604 case LOCALE_IDEFAULTEBCDICCODEPAGE:
625 case LOCALE_SNATIVECURRNAME:
630 case LOCALE_IDIGITSUBSTITUTION:
712 case LOCALE_SYEARMONTH:
716 case LOCALE_IPAPERSIZE:
728 if (default_id)
lcid = default_id;
740 switch(lctype & 0xffff)
768 static const WCHAR cplW[] = {
'C',
'o',
'n',
't',
'r',
'o',
'l',
' ',
'P',
'a',
'n',
'e',
'l',0};
769 static const WCHAR intlW[] = {
'I',
'n',
't',
'e',
'r',
'n',
'a',
't',
'i',
'o',
'n',
'a',
'l',0};
777 attr.RootDirectory = hkey;
781 attr.SecurityQualityOfService =
NULL;
787 attr.RootDirectory = cpl_key;
802 static const WCHAR formatW[] = {
'%',
'0',
'8',
'x',0 };
808 count =
sizeof(bufferW);
815 TRACE(
"updating registry, locale %s changed %s -> %08x\n",
822 for (
i = 0;
i < nb_values;
i++)
825 sizeof(bufferW)/
sizeof(
WCHAR) );
840 static const WCHAR acpW[] = {
'A',
'C',
'P',0};
841 static const WCHAR oemcpW[] = {
'O',
'E',
'M',
'C',
'P',0};
842 static const WCHAR maccpW[] = {
'M',
'A',
'C',
'C',
'P',0};
843 static const WCHAR localeW[] = {
'L',
'o',
'c',
'a',
'l',
'e',0};
844 static const WCHAR lc_ctypeW[] = {
'L',
'C',
'_',
'C',
'T',
'Y',
'P',
'E',0 };
845 static const WCHAR lc_monetaryW[] = {
'L',
'C',
'_',
'M',
'O',
'N',
'E',
'T',
'A',
'R',
'Y',0 };
846 static const WCHAR lc_numericW[] = {
'L',
'C',
'_',
'N',
'U',
'M',
'E',
'R',
'I',
'C',0 };
847 static const WCHAR lc_timeW[] = {
'L',
'C',
'_',
'T',
'I',
'M',
'E',0 };
848 static const WCHAR lc_measurementW[] = {
'L',
'C',
'_',
'M',
'E',
'A',
'S',
'U',
'R',
'E',
'M',
'E',
'N',
'T',0 };
849 static const WCHAR lc_telephoneW[] = {
'L',
'C',
'_',
'T',
'E',
'L',
'E',
'P',
'H',
'O',
'N',
'E',0 };
850 static const WCHAR lc_paperW[] = {
'L',
'C',
'_',
'P',
'A',
'P',
'E',
'R',0};
855 } update_cp_values[] = {
860 static const LCTYPE lc_messages_values[] = {
864 static const LCTYPE lc_monetary_values[] = {
873 static const LCTYPE lc_numeric_values[] = {
877 LOCALE_IDIGITSUBSTITUTION,
883 static const LCTYPE lc_time_values[] = {
901 static const LCTYPE lc_paper_values[] = { LOCALE_IPAPERSIZE };
913 sizeof(lc_messages_values)/
sizeof(lc_messages_values[0]) );
915 sizeof(lc_monetary_values)/
sizeof(lc_monetary_values[0]) );
917 sizeof(lc_numeric_values)/
sizeof(lc_numeric_values[0]) );
919 sizeof(lc_time_values)/
sizeof(lc_time_values[0]) );
921 sizeof(lc_measurement_values)/
sizeof(lc_measurement_values[0]) );
923 sizeof(lc_telephone_values)/
sizeof(lc_telephone_values[0]) );
925 sizeof(lc_paper_values)/
sizeof(lc_paper_values[0]) );
929 static const WCHAR codepageW[] =
930 {
'\\',
'R',
'e',
'g',
'i',
's',
't',
'r',
'y',
'\\',
'M',
'a',
'c',
'h',
'i',
'n',
'e',
'\\',
'S',
'y',
's',
't',
'e',
'm',
'\\',
931 'C',
'u',
'r',
'r',
'e',
'n',
't',
'C',
'o',
'n',
't',
'r',
'o',
'l',
'S',
'e',
't',
'\\',
932 'C',
'o',
'n',
't',
'r',
'o',
'l',
'\\',
'N',
'l',
's',
'\\',
'C',
'o',
'd',
'e',
'p',
'a',
'g',
'e',0};
940 while (codepageW[
len])
946 while (codepageW[
len] && codepageW[
len] !=
'\\')
len++;
951 for (
i = 0;
i <
sizeof(update_cp_values)/
sizeof(update_cp_values[0]);
i++)
954 bufferW,
sizeof(bufferW)/
sizeof(
WCHAR) );
975static const char* get_mac_locale(
void)
977 static char mac_locale[50];
981 CFLocaleRef
locale = CFLocaleCopyCurrent();
982 CFStringRef
lang = CFLocaleGetValue(
locale, kCFLocaleLanguageCode );
983 CFStringRef
country = CFLocaleGetValue(
locale, kCFLocaleCountryCode );
984 CFStringRef locale_string;
989 locale_string = CFStringCreateCopy(
NULL,
lang);
991 CFStringGetCString(locale_string, mac_locale,
sizeof(mac_locale), kCFStringEncodingUTF8);
992 strcat(mac_locale,
".UTF-8");
995 CFRelease(locale_string);
1005static BOOL has_env(
const char*
name)
1047 if (!has_env(
"LC_ALL" ) &&
1049 (!has_env( category_name ) &&
1052 const char*
override = get_mac_locale();
1057 static char messages_locale[50];
1059 if (!messages_locale[0])
1061 CFArrayRef preferred_langs = CFLocaleCopyPreferredLanguages();
1062 if (preferred_langs && CFArrayGetCount( preferred_langs ))
1064 CFStringRef preferred_lang = CFArrayGetValueAtIndex( preferred_langs, 0 );
1065 CFDictionaryRef
components = CFLocaleCreateComponentsFromLocaleIdentifier(
NULL, preferred_lang );
1068 CFStringRef
lang = CFDictionaryGetValue(
components, kCFLocaleLanguageCode );
1071 CFStringRef locale_string;
1075 locale = CFLocaleCopyCurrent();
1082 locale_string = CFStringCreateCopy(
NULL,
lang );
1083 CFStringGetCString( locale_string, messages_locale,
sizeof(messages_locale), kCFStringEncodingUTF8 );
1084 strcat( messages_locale,
".UTF-8" );
1086 CFRelease( locale_string );
1091 if (preferred_langs)
1092 CFRelease( preferred_langs );
1095 if (messages_locale[0])
1096 override = messages_locale;
1128 TRACE(
"got lcid %04x (%d matches) for LC_CTYPE=%s\n",
1131#define GET_UNIX_LOCALE(cat) do \
1132 if ((locale = get_locale( cat, #cat ))) \
1134 strcpynAtoW( buffer, locale, sizeof(buffer)/sizeof(WCHAR) ); \
1135 if (!strcmpW( buffer, ctype_buff )) lcid_##cat = lcid_LC_CTYPE; \
1137 parse_locale_name( buffer, &locale_name ); \
1138 lcid_##cat = locale_name.lcid; \
1139 TRACE( "got lcid %04x (%d matches) for " #cat "=%s\n", \
1140 locale_name.lcid, locale_name.matches, debugstr_a(locale) ); \
1152#ifdef LC_MEASUREMENT
1159#undef GET_UNIX_LOCALE
1254 if (
flags & MUI_LANGUAGE_ID)
1298 if (
flags & ~(MUI_LANGUAGE_NAME | MUI_LANGUAGE_ID | MUI_MACHINE_LANGUAGE_SETTINGS))
1303 if ((
flags & MUI_LANGUAGE_NAME) && (
flags & MUI_LANGUAGE_ID))
1335#if (WINVER >= 0x0600)
1343 if (
flags & ~(MUI_LANGUAGE_NAME | MUI_LANGUAGE_ID))
1348 if ((
flags & MUI_LANGUAGE_NAME) && (
flags & MUI_LANGUAGE_ID))
1402#if (WINVER >= 0x0600)
1418 TRACE(
"found lcid %x for %s, matches %d\n",
1428 WARN(
"locale %s not recognized, defaulting to %s\n",
1630 if ((
lctype & LOCALE_RETURN_NUMBER) ||
1706 if (lcflags & LOCALE_RETURN_NUMBER)
1731 if (
ret != -1)
return ret;
1752 for (
i = 0;
i < (
lctype & 0x0f);
i++)
p += *
p + 1;
1754 if (lcflags & LOCALE_RETURN_NUMBER)
ret =
sizeof(
UINT)/
sizeof(
WCHAR);
1758 for (
i = 1;
i <= *
p;
i++)
if (!
p[
i])
break;
1778 if (lcflags & LOCALE_RETURN_NUMBER)
1795 TRACE(
"(lcid=0x%x,lctype=0x%x,%p,%d) returning number %d\n",
1803 TRACE(
"(lcid=0x%x,lctype=0x%x,%p,%d) returning %d %s\n",
1809#if (WINVER >= 0x0600)
1819 if (!lcid)
return 0;
1834 case LOCALE_SPARENT:
1849 TRACE(
"IsValidLocaleName not implemented (lpLocaleName=%s)\n",
debugstr_w(lpLocaleName));
1860 TRACE(
"GetUserDefaultLocaleName not implemented (lpLocaleName=%s, cchLocaleName=%d)\n",
debugstr_w(lpLocaleName), cchLocaleName);
1924 static const WCHAR intlW[] = {
'i',
'n',
't',
'l',0 };
1963 WCHAR *lpD, *lpM, *lpY;
2170 if (
table->info.def_char & 0xff00)
2229 static const WCHAR utf7[] = {
'U',
'n',
'i',
'c',
'o',
'd',
'e',
' ',
'(',
'U',
'T',
'F',
'-',
'7',
')',0};
2239 static const WCHAR utf8[] = {
'U',
'n',
'i',
'c',
'o',
'd',
'e',
' ',
'(',
'U',
'T',
'F',
'-',
'8',
')',0};
2284 if (!lpfnCodePageEnum(
buffer ))
break;
2309 *--
p =
'0' + (
page % 10);
2312 if (!lpfnCodePageEnum(
p ))
break;
2352 static const signed char base64_decoding_table[] =
2354 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2355 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2356 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 62, -1, -1, -1, 63,
2357 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, -1, -1, -1, -1, -1, -1,
2358 -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
2359 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, -1, -1, -1, -1, -1,
2360 -1, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
2361 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, -1, -1, -1, -1, -1
2367 DWORD byte_pair = 0;
2370 while (
src < source_end)
2375 if (
src >= source_end)
2389 signed char sextet = *
src;
2406 sextet = base64_decoding_table[sextet];
2416 byte_pair = (byte_pair << 6) | sextet;
2429 while (
src < source_end);
2540 TRACE(
"cp %d %s -> %s, ret = %d\n",
2553 static const BOOL directly_encodable_table[] =
2555 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0,
2556 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2557 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1,
2558 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1,
2559 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2560 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
2561 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2562 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
2565 return codepoint <= 0x7A ? directly_encodable_table[codepoint] :
FALSE;
2602 static const char base64_encoding_table[] =
2603 "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
2608 while (
src < source_end)
2627 DWORD byte_pair = 0;
2634 byte_pair = (byte_pair << 16) | *
src;
2652 byte_pair <<= (6 -
offset);
2715 if (defchar ||
used)
2724 if (defchar ||
used)
2740 defchar,
used ? &used_tmp :
NULL );
2745 if (defchar ||
used)
2769 defchar,
used ? &used_tmp :
NULL );
2783 TRACE(
"cp %d %s -> %s, ret = %d\n",
2822 TRACE(
"(0x%04X)\n", lcid);
2857 TRACE(
"(0x%04x) stub - returning success\n",
langid);
2944 TRACE(
"found lcid %x for %s, matches %d\n",
2958 return lpfnLocaleEnum(
buf );
2964 static const WCHAR formatW[] = {
'%',
'0',
'8',
'x',0};
2968 return lpfnLocaleEnum(
buf );
3028 (
LPWSTR)&neutral,
sizeof(neutral) /
sizeof(
WCHAR) ))
3097 static const unsigned char type2_map[16] =
3134 WARN(
"CT_CTYPE3: semi-stub.\n");
3138 WORD type1, type3 = 0;
3157 if ((
c>=0xFF21)&&(
c<=0xFF3A)) type3 |=
C3_ALPHA;
3158 if ((
c>=0xFF41)&&(
c<=0xFF5A)) type3 |=
C3_ALPHA;
3165 if ((
c>=0xFF65)&&(
c<=0xFF9F)) type3 |=
C3_ALPHA;
3168 *chartype++ = type3;
3220 FIXME(
"For locale %04x using current ANSI code page\n",
locale);
3281 if ((0x30A1 <= wch && wch <= 0x30F3) ||
3282 wch == 0x30F4 || wch == 0x30F5 || wch == 0x30FD || wch == 0x30FE)
3305 if ((0x3041 <= wch && wch <= 0x3093) ||
3306 wch == 3094 || wch == 0x3095 || wch == 0x309D || wch == 0x309E)
3317typedef WCHAR FULL2HALF_ENTRY[3];
3318static const FULL2HALF_ENTRY full2half_table[] =
3320#define DEFINE_FULL2HALF(full, half1, half2) { full, half1, half2 },
3322#undef DEFINE_FULL2HALF
3324#define GET_FULL(table, index) ((table)[index][0])
3325#define GET_HALF1(table, index) ((table)[index][1])
3326#define GET_HALF2(table, index) ((table)[index][2])
3329typedef WCHAR DAKUTEN_ENTRY[3];
3330static const DAKUTEN_ENTRY dakuten_table[] =
3332#define DEFINE_DAKUTEN(voiced, single1, single2, half1, half2) { voiced, single1, single2 },
3334#undef DEFINE_DAKUTEN
3336#define GET_VOICED(table, index) ((table)[index][0])
3337#define GET_SINGLE1(table, index) ((table)[index][1])
3338#define GET_SINGLE2(table, index) ((table)[index][2])
3344 const FULL2HALF_ENTRY *table1 = full2half_table;
3351 map_to_katakana(&ch, 1, &ch, 1);
3353 map_to_hiragana(&ch, 1, &ch, 1);
3362 if (0xFF01 <= ch && ch <= 0xFF5E)
3370 for (
i = count1 - 1;
i >= 0; --
i)
3372 if (GET_FULL(table1,
i) != ch)
3375 if (GET_HALF2(table1,
i) == 0)
3378 dst[
pos] = GET_HALF1(table1,
i);
3386 dst[
pos++] = GET_HALF1(table1,
i);
3387 dst[
pos ] = GET_HALF2(table1,
i);
3409 const FULL2HALF_ENTRY *table1 = full2half_table;
3410 const DAKUTEN_ENTRY *table2 = dakuten_table;
3425 if (0x21 <= ch && ch <= 0x7E)
3440 for (
i = count1 - 1;
i >= 0; --
i)
3442 if (GET_HALF1(table1,
i) != ch)
3445 if (GET_HALF2(table1,
i) == 0)
3448 dst[
pos] = GET_FULL(table1,
i);
3452 if (
srclen <= 1 || GET_HALF2(table1,
i) !=
src[1])
3459 dst[
pos] = GET_FULL(table1,
i);
3467 for (
i = count2 - 1;
i >= 0; --
i)
3469 if (GET_SINGLE1(table2,
i) != ch)
3472 if (
srclen <= 1 || GET_SINGLE2(table2,
i) !=
src[1])
3479 dst[
pos] = GET_VOICED(table2,
i);
3523typedef struct tagWCHAR_PAIR
3526} WCHAR_PAIR, *PWCHAR_PAIR;
3529static const WCHAR_PAIR s_sim2tra[] =
3531#define DEFINE_SIM2TRA(from, to) { from, to },
3533#undef DEFINE_SIM2TRA
3537static const WCHAR_PAIR s_tra2sim[] =
3539#define DEFINE_TRA2SIM(from, to) { from, to },
3541#undef DEFINE_TRA2SIM
3545static int compare_wchar_pair(
const void *
x,
const void *
y)
3547 const WCHAR_PAIR *
a =
x;
3548 const WCHAR_PAIR *
b =
y;
3549 if (
a->from <
b->from)
3551 if (
a->from >
b->from)
3556static WCHAR find_wchar_pair(
const WCHAR_PAIR *pairs,
size_t count,
WCHAR ch)
3558 PWCHAR_PAIR found =
bsearch(&ch, pairs,
count,
sizeof(WCHAR_PAIR), compare_wchar_pair);
3677 flags &= ~LCMAP_LOWERCASE;
3683 flags &= ~LCMAP_UPPERCASE;
3751 if (!once++)
FIXME(
"unsupported lparam %Ix\n",
handle);
3762 TRACE(
"(%s,0x%08lx,%s,%d,%p,%d)\n",
3765 flags &= ~LOCALE_USE_CP_ACP;
3808 TRACE(
"(0x%04x,0x%08x,%s,%d,%p,%d)\n",
3836 INT ret = 0, srclenW, dstlenW;
3867 goto map_string_exit;
3874 goto map_string_exit;
3880 goto map_string_exit;
3885 goto map_string_exit;
3891 goto map_string_exit;
3924 INT ret = 0, srclenW = 0;
3940 goto FoldStringA_exit;
3956 goto FoldStringA_exit;
4043 if (
flags & ~(supported_flags|semistub_flags))
4049 if (
flags & semistub_flags)
4052 FIXME(
"semi-stub behavior for flag(s) 0x%x\n",
flags & semistub_flags);
4055 if (len1 < 0) len1 =
strlenW(str1);
4056 if (len2 < 0) len2 =
strlenW(str2);
4087 WCHAR *buf2W = buf1W + 130;
4089 INT len1W = 0, len2W = 0,
ret;
4097 if (len1 < 0) len1 =
strlen(str1);
4098 if (len2 < 0) len2 =
strlen(str2);
4156#if (WINVER >= 0x0600)
4169 if (len1 < 0) len1 =
strlenW(str1);
4170 if (len2 < 0) len2 =
strlenW(str2);
4199 if ((str1 ==
NULL) && (str2 ==
NULL))
return 0;
4200 if (str1 ==
NULL)
return -1;
4201 if (str2 ==
NULL)
return 1;
4228 if ((str1 ==
NULL) && (str2 ==
NULL))
return 0;
4229 if (str1 ==
NULL)
return -1;
4230 if (str2 ==
NULL)
return 1;
4247 if ((str1 ==
NULL) && (str2 ==
NULL))
return 0;
4248 if (str1 ==
NULL)
return -1;
4249 if (str2 ==
NULL)
return 1;
4266 if ((str1 ==
NULL) && (str2 ==
NULL))
return 0;
4267 if (str1 ==
NULL)
return -1;
4268 if (str2 ==
NULL)
return 1;
4281 extern void CDECL __wine_init_codepages(
const union cptable *ansi_cp,
const union cptable *oem_cp,
4282 const union cptable *unix_cp );
4284 UINT ansi_cp = 1252, oem_cp = 437, mac_cp = 10000, unix_cp;
4290 if (!has_env(
"LANG"))
4292 const char* mac_locale = get_mac_locale();
4294 setenv(
"LANG", mac_locale, 1 );
4296 TRACE(
"setting LANG to '%s'\n", mac_locale );
4301 TRACE(
"Mac locale %s is not supported by the C library\n",
debugstr_a(mac_locale) );
4325 (
LPWSTR)&unix_cp,
sizeof(unix_cp)/
sizeof(
WCHAR) );
4341 TRACE(
"ansi=%03d oem=%03d mac=%03d unix=%03d\n",
4389 info->NameLength > valueNameSize ||
4390 info->DataLength > valueDataSize)
4398 szValueName[
info->NameLength /
sizeof(
WCHAR)] =
'\0';
4400 szValueData[
info->DataLength /
sizeof(
WCHAR)] =
'\0';
4447 ULONG iResourceIndex = lgrpid & 0xf;
4451 for (
i = 0;
i < iResourceIndex;
i++)
4452 lpResEntry += *lpResEntry + 1;
4454 if (*lpResEntry < nameSize)
4457 szName[*lpResEntry] =
'\0';
4479 WCHAR szNumber[10], szValue[4];
4507 FIXME(
"NLS registry key not found. Please apply the default registry file 'wine.inf'\n");
4512 szValue,
sizeof(szValue) ))
4514 BOOL bInstalled = szValue[0] ==
'1';
4518 bInstalled ?
"" :
"not ");
4522 WCHAR szGrpName[48];
4525 szGrpName[0] =
'\0';
4528 bContinue = lpProcs->
procW( lgrpid, szNumber, szGrpName, lpProcs->
dwFlags,
4532 char szNumberA[
sizeof(szNumber)/
sizeof(
WCHAR)];
4533 char szGrpNameA[48];
4542 bContinue = lpProcs->
procA( lgrpid, szNumberA, szGrpNameA, lpProcs->
dwFlags,
4583 procs.
procA = pLangGrpEnumProc;
4604 procs.
procW = pLangGrpEnumProc;
4626 static const WCHAR szFormat[] = {
'%',
'x',
'\0' };
4627 WCHAR szValueName[16], szValue[2];
4639 sprintfW( szValueName, szFormat, lgrpid );
4645 if (szValue[0] ==
'1')
4675 static const WCHAR szAlternateSortsKeyName[] = {
4676 'A',
'l',
't',
'e',
'r',
'n',
'a',
't',
'e',
' ',
'S',
'o',
'r',
't',
's',
'\0'
4678 WCHAR szNumber[10], szValue[4];
4699 WARN(
"NLS registry key not found. Please apply the default registry file 'wine.inf'\n");
4704 szValue,
sizeof(szValue) ))
4709 lgrpid, lgrpid == lpProcs->
lgrpid ?
"" :
"not ");
4711 if (lgrpid == lpProcs->
lgrpid)
4723 bContinue = lpProcs->
procW( lgrpid, lcid, szNumber, lpProcs->
lParam );
4726 char szNumberA[
sizeof(szNumber)/
sizeof(
WCHAR)];
4730 bContinue = lpProcs->
procA( lgrpid, lcid, szNumberA, lpProcs->
lParam );
4841 static const WCHAR geoW[] = {
'G',
'e',
'o',0};
4842 static const WCHAR nationW[] = {
'N',
'a',
't',
'i',
'o',
'n',0};
4845 HANDLE hkey, hSubkey = 0;
4849 count =
sizeof(bufferW);
4863 FIXME(
"GEOCLASS_REGION not handled yet\n");
4868 if (hSubkey)
NtClose(hSubkey);
4877 static const WCHAR geoW[] = {
'G',
'e',
'o',0};
4878 static const WCHAR nationW[] = {
'N',
'a',
't',
'i',
'o',
'n',0};
4879 static const WCHAR formatW[] = {
'%',
'i',0};
4888 attr.RootDirectory = hkey;
4890 attr.Attributes = 0;
4892 attr.SecurityQualityOfService =
NULL;
4934 static const WCHAR formatW[] = {
'%',
'0',
'8',
'x',0};
4951 if(!pUILangEnumProc) {
4960 enum_uilang.
u.
procA = pUILangEnumProc;
4980 if(!pUILangEnumProc) {
4989 enum_uilang.
u.
procW = pUILangEnumProc;
5015 { 2, {
'A',
'G',0}, {
'A',
'T',
'G',0}, 10039880, 28 },
5016 { 3, {
'A',
'F',0}, {
'A',
'F',
'G',0}, 47614, 4 },
5017 { 4, {
'D',
'Z',0}, {
'D',
'Z',
'A',0}, 42487, 12 },
5018 { 5, {
'A',
'Z',0}, {
'A',
'Z',
'E',0}, 47611, 31 },
5019 { 6, {
'A',
'L',0}, {
'A',
'L',
'B',0}, 47610, 8 },
5020 { 7, {
'A',
'M',0}, {
'A',
'R',
'M',0}, 47611, 51 },
5021 { 8, {
'A',
'D',0}, {
'A',
'N',
'D',0}, 47610, 20 },
5022 { 9, {
'A',
'O',0}, {
'A',
'G',
'O',0}, 42484, 24 },
5023 { 10, {
'A',
'S',0}, {
'A',
'S',
'M',0}, 26286, 16 },
5024 { 11, {
'A',
'R',0}, {
'A',
'R',
'G',0}, 31396, 32 },
5025 { 12, {
'A',
'U',0}, {
'A',
'U',
'S',0}, 10210825, 36 },
5026 { 14, {
'A',
'T',0}, {
'A',
'U',
'T',0}, 10210824, 40 },
5027 { 17, {
'B',
'H',0}, {
'B',
'H',
'R',0}, 47611, 48 },
5028 { 18, {
'B',
'B',0}, {
'B',
'R',
'B',0}, 10039880, 52 },
5029 { 19, {
'B',
'W',0}, {
'B',
'W',
'A',0}, 10039883, 72 },
5030 { 20, {
'B',
'M',0}, {
'B',
'M',
'U',0}, 23581, 60 },
5031 { 21, {
'B',
'E',0}, {
'B',
'E',
'L',0}, 10210824, 56 },
5032 { 22, {
'B',
'S',0}, {
'B',
'H',
'S',0}, 10039880, 44 },
5033 { 23, {
'B',
'D',0}, {
'B',
'G',
'D',0}, 47614, 50 },
5034 { 24, {
'B',
'Z',0}, {
'B',
'L',
'Z',0}, 27082, 84 },
5035 { 25, {
'B',
'A',0}, {
'B',
'I',
'H',0}, 47610, 70 },
5036 { 26, {
'B',
'O',0}, {
'B',
'O',
'L',0}, 31396, 68 },
5037 { 27, {
'M',
'M',0}, {
'M',
'M',
'R',0}, 47599, 104 },
5038 { 28, {
'B',
'J',0}, {
'B',
'E',
'N',0}, 42483, 204 },
5039 { 29, {
'B',
'Y',0}, {
'B',
'L',
'R',0}, 47609, 112 },
5040 { 30, {
'S',
'B',0}, {
'S',
'L',
'B',0}, 20900, 90 },
5041 { 32, {
'B',
'R',0}, {
'B',
'R',
'A',0}, 31396, 76 },
5042 { 34, {
'B',
'T',0}, {
'B',
'T',
'N',0}, 47614, 64 },
5043 { 35, {
'B',
'G',0}, {
'B',
'G',
'R',0}, 47609, 100 },
5044 { 37, {
'B',
'N',0}, {
'B',
'R',
'N',0}, 47599, 96 },
5045 { 38, {
'B',
'I',0}, {
'B',
'D',
'I',0}, 47603, 108 },
5046 { 39, {
'C',
'A',0}, {
'C',
'A',
'N',0}, 23581, 124 },
5047 { 40, {
'K',
'H',0}, {
'K',
'H',
'M',0}, 47599, 116 },
5048 { 41, {
'T',
'D',0}, {
'T',
'C',
'D',0}, 42484, 148 },
5049 { 42, {
'L',
'K',0}, {
'L',
'K',
'A',0}, 47614, 144 },
5050 { 43, {
'C',
'G',0}, {
'C',
'O',
'G',0}, 42484, 178 },
5051 { 44, {
'C',
'D',0}, {
'C',
'O',
'D',0}, 42484, 180 },
5052 { 45, {
'C',
'N',0}, {
'C',
'H',
'N',0}, 47600, 156 },
5053 { 46, {
'C',
'L',0}, {
'C',
'H',
'L',0}, 31396, 152 },
5054 { 49, {
'C',
'M',0}, {
'C',
'M',
'R',0}, 42484, 120 },
5055 { 50, {
'K',
'M',0}, {
'C',
'O',
'M',0}, 47603, 174 },
5056 { 51, {
'C',
'O',0}, {
'C',
'O',
'L',0}, 31396, 170 },
5057 { 54, {
'C',
'R',0}, {
'C',
'R',
'I',0}, 27082, 188 },
5058 { 55, {
'C',
'F',0}, {
'C',
'A',
'F',0}, 42484, 140 },
5059 { 56, {
'C',
'U',0}, {
'C',
'U',
'B',0}, 10039880, 192 },
5060 { 57, {
'C',
'V',0}, {
'C',
'P',
'V',0}, 42483, 132 },
5061 { 59, {
'C',
'Y',0}, {
'C',
'Y',
'P',0}, 47611, 196 },
5062 { 61, {
'D',
'K',0}, {
'D',
'N',
'K',0}, 10039882, 208 },
5063 { 62, {
'D',
'J',0}, {
'D',
'J',
'I',0}, 47603, 262 },
5064 { 63, {
'D',
'M',0}, {
'D',
'M',
'A',0}, 10039880, 212 },
5065 { 65, {
'D',
'O',0}, {
'D',
'O',
'M',0}, 10039880, 214 },
5066 { 66, {
'E',
'C',0}, {
'E',
'C',
'U',0}, 31396, 218 },
5067 { 67, {
'E',
'G',0}, {
'E',
'G',
'Y',0}, 42487, 818 },
5068 { 68, {
'I',
'E',0}, {
'I',
'R',
'L',0}, 10039882, 372 },
5069 { 69, {
'G',
'Q',0}, {
'G',
'N',
'Q',0}, 42484, 226 },
5070 { 70, {
'E',
'E',0}, {
'E',
'S',
'T',0}, 10039882, 233 },
5071 { 71, {
'E',
'R',0}, {
'E',
'R',
'I',0}, 47603, 232 },
5072 { 72, {
'S',
'V',0}, {
'S',
'L',
'V',0}, 27082, 222 },
5073 { 73, {
'E',
'T',0}, {
'E',
'T',
'H',0}, 47603, 231 },
5074 { 75, {
'C',
'Z',0}, {
'C',
'Z',
'E',0}, 47609, 203 },
5075 { 77, {
'F',
'I',0}, {
'F',
'I',
'N',0}, 10039882, 246 },
5076 { 78, {
'F',
'J',0}, {
'F',
'J',
'I',0}, 20900, 242 },
5077 { 80, {
'F',
'M',0}, {
'F',
'S',
'M',0}, 21206, 583 },
5078 { 81, {
'F',
'O',0}, {
'F',
'R',
'O',0}, 10039882, 234 },
5079 { 84, {
'F',
'R',0}, {
'F',
'R',
'A',0}, 10210824, 250 },
5080 { 86, {
'G',
'M',0}, {
'G',
'M',
'B',0}, 42483, 270 },
5081 { 87, {
'G',
'A',0}, {
'G',
'A',
'B',0}, 42484, 266 },
5082 { 88, {
'G',
'E',0}, {
'G',
'E',
'O',0}, 47611, 268 },
5083 { 89, {
'G',
'H',0}, {
'G',
'H',
'A',0}, 42483, 288 },
5084 { 90, {
'G',
'I',0}, {
'G',
'I',
'B',0}, 47610, 292 },
5085 { 91, {
'G',
'D',0}, {
'G',
'R',
'D',0}, 10039880, 308 },
5086 { 93, {
'G',
'L',0}, {
'G',
'R',
'L',0}, 23581, 304 },
5087 { 94, {
'D',
'E',0}, {
'D',
'E',
'U',0}, 10210824, 276 },
5088 { 98, {
'G',
'R',0}, {
'G',
'R',
'C',0}, 47610, 300 },
5089 { 99, {
'G',
'T',0}, {
'G',
'T',
'M',0}, 27082, 320 },
5090 { 100, {
'G',
'N',0}, {
'G',
'I',
'N',0}, 42483, 324 },
5091 { 101, {
'G',
'Y',0}, {
'G',
'U',
'Y',0}, 31396, 328 },
5092 { 103, {
'H',
'T',0}, {
'H',
'T',
'I',0}, 10039880, 332 },
5093 { 104, {
'H',
'K',0}, {
'H',
'K',
'G',0}, 47600, 344 },
5094 { 106, {
'H',
'N',0}, {
'H',
'N',
'D',0}, 27082, 340 },
5095 { 108, {
'H',
'R',0}, {
'H',
'R',
'V',0}, 47610, 191 },
5096 { 109, {
'H',
'U',0}, {
'H',
'U',
'N',0}, 47609, 348 },
5097 { 110, {
'I',
'S',0}, {
'I',
'S',
'L',0}, 10039882, 352 },
5098 { 111, {
'I',
'D',0}, {
'I',
'D',
'N',0}, 47599, 360 },
5099 { 113, {
'I',
'N',0}, {
'I',
'N',
'D',0}, 47614, 356 },
5100 { 114, {
'I',
'O',0}, {
'I',
'O',
'T',0}, 39070, 86 },
5101 { 116, {
'I',
'R',0}, {
'I',
'R',
'N',0}, 47614, 364 },
5102 { 117, {
'I',
'L',0}, {
'I',
'S',
'R',0}, 47611, 376 },
5103 { 118, {
'I',
'T',0}, {
'I',
'T',
'A',0}, 47610, 380 },
5104 { 119, {
'C',
'I',0}, {
'C',
'I',
'V',0}, 42483, 384 },
5105 { 121, {
'I',
'Q',0}, {
'I',
'R',
'Q',0}, 47611, 368 },
5106 { 122, {
'J',
'P',0}, {
'J',
'P',
'N',0}, 47600, 392 },
5107 { 124, {
'J',
'M',0}, {
'J',
'A',
'M',0}, 10039880, 388 },
5108 { 125, {
'S',
'J',0}, {
'S',
'J',
'M',0}, 10039882, 744 },
5109 { 126, {
'J',
'O',0}, {
'J',
'O',
'R',0}, 47611, 400 },
5110 { 127, {
'X',
'X',0}, {
'X',
'X',0}, 161832256 },
5111 { 129, {
'K',
'E',0}, {
'K',
'E',
'N',0}, 47603, 404 },
5112 { 130, {
'K',
'G',0}, {
'K',
'G',
'Z',0}, 47590, 417 },
5113 { 131, {
'K',
'P',0}, {
'P',
'R',
'K',0}, 47600, 408 },
5114 { 133, {
'K',
'I',0}, {
'K',
'I',
'R',0}, 21206, 296 },
5115 { 134, {
'K',
'R',0}, {
'K',
'O',
'R',0}, 47600, 410 },
5116 { 136, {
'K',
'W',0}, {
'K',
'W',
'T',0}, 47611, 414 },
5117 { 137, {
'K',
'Z',0}, {
'K',
'A',
'Z',0}, 47590, 398 },
5118 { 138, {
'L',
'A',0}, {
'L',
'A',
'O',0}, 47599, 418 },
5119 { 139, {
'L',
'B',0}, {
'L',
'B',
'N',0}, 47611, 422 },
5120 { 140, {
'L',
'V',0}, {
'L',
'V',
'A',0}, 10039882, 428 },
5121 { 141, {
'L',
'T',0}, {
'L',
'T',
'U',0}, 10039882, 440 },
5122 { 142, {
'L',
'R',0}, {
'L',
'B',
'R',0}, 42483, 430 },
5123 { 143, {
'S',
'K',0}, {
'S',
'V',
'K',0}, 47609, 703 },
5124 { 145, {
'L',
'I',0}, {
'L',
'I',
'E',0}, 10210824, 438 },
5125 { 146, {
'L',
'S',0}, {
'L',
'S',
'O',0}, 10039883, 426 },
5126 { 147, {
'L',
'U',0}, {
'L',
'U',
'X',0}, 10210824, 442 },
5127 { 148, {
'L',
'Y',0}, {
'L',
'B',
'Y',0}, 42487, 434 },
5128 { 149, {
'M',
'G',0}, {
'M',
'D',
'G',0}, 47603, 450 },
5129 { 151, {
'M',
'O',0}, {
'M',
'A',
'C',0}, 47600, 446 },
5130 { 152, {
'M',
'D',0}, {
'M',
'D',
'A',0}, 47609, 498 },
5131 { 154, {
'M',
'N',0}, {
'M',
'N',
'G',0}, 47600, 496 },
5132 { 156, {
'M',
'W',0}, {
'M',
'W',
'I',0}, 47603, 454 },
5133 { 157, {
'M',
'L',0}, {
'M',
'L',
'I',0}, 42483, 466 },
5134 { 158, {
'M',
'C',0}, {
'M',
'C',
'O',0}, 10210824, 492 },
5135 { 159, {
'M',
'A',0}, {
'M',
'A',
'R',0}, 42487, 504 },
5136 { 160, {
'M',
'U',0}, {
'M',
'U',
'S',0}, 47603, 480 },
5137 { 162, {
'M',
'R',0}, {
'M',
'R',
'T',0}, 42483, 478 },
5138 { 163, {
'M',
'T',0}, {
'M',
'L',
'T',0}, 47610, 470 },
5139 { 164, {
'O',
'M',0}, {
'O',
'M',
'N',0}, 47611, 512 },
5140 { 165, {
'M',
'V',0}, {
'M',
'D',
'V',0}, 47614, 462 },
5141 { 166, {
'M',
'X',0}, {
'M',
'E',
'X',0}, 27082, 484 },
5142 { 167, {
'M',
'Y',0}, {
'M',
'Y',
'S',0}, 47599, 458 },
5143 { 168, {
'M',
'Z',0}, {
'M',
'O',
'Z',0}, 47603, 508 },
5144 { 173, {
'N',
'E',0}, {
'N',
'E',
'R',0}, 42483, 562 },
5145 { 174, {
'V',
'U',0}, {
'V',
'U',
'T',0}, 20900, 548 },
5146 { 175, {
'N',
'G',0}, {
'N',
'G',
'A',0}, 42483, 566 },
5147 { 176, {
'N',
'L',0}, {
'N',
'L',
'D',0}, 10210824, 528 },
5148 { 177, {
'N',
'O',0}, {
'N',
'O',
'R',0}, 10039882, 578 },
5149 { 178, {
'N',
'P',0}, {
'N',
'P',
'L',0}, 47614, 524 },
5150 { 180, {
'N',
'R',0}, {
'N',
'R',
'U',0}, 21206, 520 },
5151 { 181, {
'S',
'R',0}, {
'S',
'U',
'R',0}, 31396, 740 },
5152 { 182, {
'N',
'I',0}, {
'N',
'I',
'C',0}, 27082, 558 },
5153 { 183, {
'N',
'Z',0}, {
'N',
'Z',
'L',0}, 10210825, 554 },
5154 { 184, {
'P',
'S',0}, {
'P',
'S',
'E',0}, 47611, 275 },
5155 { 185, {
'P',
'Y',0}, {
'P',
'R',
'Y',0}, 31396, 600 },
5156 { 187, {
'P',
'E',0}, {
'P',
'E',
'R',0}, 31396, 604 },
5157 { 190, {
'P',
'K',0}, {
'P',
'A',
'K',0}, 47614, 586 },
5158 { 191, {
'P',
'L',0}, {
'P',
'O',
'L',0}, 47609, 616 },
5159 { 192, {
'P',
'A',0}, {
'P',
'A',
'N',0}, 27082, 591 },
5160 { 193, {
'P',
'T',0}, {
'P',
'R',
'T',0}, 47610, 620 },
5161 { 194, {
'P',
'G',0}, {
'P',
'N',
'G',0}, 20900, 598 },
5162 { 195, {
'P',
'W',0}, {
'P',
'L',
'W',0}, 21206, 585 },
5163 { 196, {
'G',
'W',0}, {
'G',
'N',
'B',0}, 42483, 624 },
5164 { 197, {
'Q',
'A',0}, {
'Q',
'A',
'T',0}, 47611, 634 },
5165 { 198, {
'R',
'E',0}, {
'R',
'E',
'U',0}, 47603, 638 },
5166 { 199, {
'M',
'H',0}, {
'M',
'H',
'L',0}, 21206, 584 },
5167 { 200, {
'R',
'O',0}, {
'R',
'O',
'U',0}, 47609, 642 },
5168 { 201, {
'P',
'H',0}, {
'P',
'H',
'L',0}, 47599, 608 },
5169 { 202, {
'P',
'R',0}, {
'P',
'R',
'I',0}, 10039880, 630 },
5170 { 203, {
'R',
'U',0}, {
'R',
'U',
'S',0}, 47609, 643 },
5171 { 204, {
'R',
'W',0}, {
'R',
'W',
'A',0}, 47603, 646 },
5172 { 205, {
'S',
'A',0}, {
'S',
'A',
'U',0}, 47611, 682 },
5173 { 206, {
'P',
'M',0}, {
'S',
'P',
'M',0}, 23581, 666 },
5174 { 207, {
'K',
'N',0}, {
'K',
'N',
'A',0}, 10039880, 659 },
5175 { 208, {
'S',
'C',0}, {
'S',
'Y',
'C',0}, 47603, 690 },
5176 { 209, {
'Z',
'A',0}, {
'Z',
'A',
'F',0}, 10039883, 710 },
5177 { 210, {
'S',
'N',0}, {
'S',
'E',
'N',0}, 42483, 686 },
5178 { 212, {
'S',
'I',0}, {
'S',
'V',
'N',0}, 47610, 705 },
5179 { 213, {
'S',
'L',0}, {
'S',
'L',
'E',0}, 42483, 694 },
5180 { 214, {
'S',
'M',0}, {
'S',
'M',
'R',0}, 47610, 674 },
5181 { 215, {
'S',
'G',0}, {
'S',
'G',
'P',0}, 47599, 702 },
5182 { 216, {
'S',
'O',0}, {
'S',
'O',
'M',0}, 47603, 706 },
5183 { 217, {
'E',
'S',0}, {
'E',
'S',
'P',0}, 47610, 724 },
5184 { 218, {
'L',
'C',0}, {
'L',
'C',
'A',0}, 10039880, 662 },
5185 { 219, {
'S',
'D',0}, {
'S',
'D',
'N',0}, 42487, 736 },
5186 { 220, {
'S',
'J',0}, {
'S',
'J',
'M',0}, 10039882, 744 },
5187 { 221, {
'S',
'E',0}, {
'S',
'W',
'E',0}, 10039882, 752 },
5188 { 222, {
'S',
'Y',0}, {
'S',
'Y',
'R',0}, 47611, 760 },
5189 { 223, {
'C',
'H',0}, {
'C',
'H',
'E',0}, 10210824, 756 },
5190 { 224, {
'A',
'E',0}, {
'A',
'R',
'E',0}, 47611, 784 },
5191 { 225, {
'T',
'T',0}, {
'T',
'T',
'O',0}, 10039880, 780 },
5192 { 227, {
'T',
'H',0}, {
'T',
'H',
'A',0}, 47599, 764 },
5193 { 228, {
'T',
'J',0}, {
'T',
'J',
'K',0}, 47590, 762 },
5194 { 231, {
'T',
'O',0}, {
'T',
'O',
'N',0}, 26286, 776 },
5195 { 232, {
'T',
'G',0}, {
'T',
'G',
'O',0}, 42483, 768 },
5196 { 233, {
'S',
'T',0}, {
'S',
'T',
'P',0}, 42484, 678 },
5197 { 234, {
'T',
'N',0}, {
'T',
'U',
'N',0}, 42487, 788 },
5198 { 235, {
'T',
'R',0}, {
'T',
'U',
'R',0}, 47611, 792 },
5199 { 236, {
'T',
'V',0}, {
'T',
'U',
'V',0}, 26286, 798 },
5200 { 237, {
'T',
'W',0}, {
'T',
'W',
'N',0}, 47600, 158 },
5201 { 238, {
'T',
'M',0}, {
'T',
'K',
'M',0}, 47590, 795 },
5202 { 239, {
'T',
'Z',0}, {
'T',
'Z',
'A',0}, 47603, 834 },
5203 { 240, {
'U',
'G',0}, {
'U',
'G',
'A',0}, 47603, 800 },
5204 { 241, {
'U',
'A',0}, {
'U',
'K',
'R',0}, 47609, 804 },
5205 { 242, {
'G',
'B',0}, {
'G',
'B',
'R',0}, 10039882, 826 },
5206 { 244, {
'U',
'S',0}, {
'U',
'S',
'A',0}, 23581, 840 },
5207 { 245, {
'B',
'F',0}, {
'B',
'F',
'A',0}, 42483, 854 },
5208 { 246, {
'U',
'Y',0}, {
'U',
'R',
'Y',0}, 31396, 858 },
5209 { 247, {
'U',
'Z',0}, {
'U',
'Z',
'B',0}, 47590, 860 },
5210 { 248, {
'V',
'C',0}, {
'V',
'C',
'T',0}, 10039880, 670 },
5211 { 249, {
'V',
'E',0}, {
'V',
'E',
'N',0}, 31396, 862 },
5212 { 251, {
'V',
'N',0}, {
'V',
'N',
'M',0}, 47599, 704 },
5213 { 252, {
'V',
'I',0}, {
'V',
'I',
'R',0}, 10039880, 850 },
5214 { 253, {
'V',
'A',0}, {
'V',
'A',
'T',0}, 47610, 336 },
5215 { 254, {
'N',
'A',0}, {
'N',
'A',
'M',0}, 10039883, 516 },
5216 { 257, {
'E',
'H',0}, {
'E',
'S',
'H',0}, 42487, 732 },
5217 { 258, {
'X',
'X',0}, {
'X',
'X',0}, 161832256 },
5218 { 259, {
'W',
'S',0}, {
'W',
'S',
'M',0}, 26286, 882 },
5219 { 260, {
'S',
'Z',0}, {
'S',
'W',
'Z',0}, 10039883, 748 },
5220 { 261, {
'Y',
'E',0}, {
'Y',
'E',
'M',0}, 47611, 887 },
5221 { 263, {
'Z',
'M',0}, {
'Z',
'M',
'B',0}, 47603, 894 },
5222 { 264, {
'Z',
'W',0}, {
'Z',
'W',
'E',0}, 47603, 716 },
5223 { 269, {
'C',
'S',0}, {
'S',
'C',
'G',0}, 47610, 891 },
5224 { 270, {
'M',
'E',0}, {
'M',
'N',
'E',0}, 47610, 499 },
5225 { 271, {
'R',
'S',0}, {
'S',
'R',
'B',0}, 47610, 688 },
5226 { 273, {
'C',
'W',0}, {
'C',
'U',
'W',0}, 10039880, 531 },
5227 { 276, {
'S',
'S',0}, {
'S',
'S',
'D',0}, 42487, 728 },
5228 { 300, {
'A',
'I',0}, {
'A',
'I',
'A',0}, 10039880, 660 },
5229 { 301, {
'A',
'Q',0}, {
'A',
'T',
'A',0}, 39070, 10 },
5230 { 302, {
'A',
'W',0}, {
'A',
'B',
'W',0}, 10039880, 533 },
5231 { 303, {
'X',
'X',0}, {
'X',
'X',0}, 39070 },
5232 { 304, {
'X',
'X',0}, {
'X',
'X',0}, 10210825 },
5233 { 305, {
'X',
'X',0}, {
'X',
'X',0}, 161832256 },
5234 { 306, {
'B',
'V',0}, {
'B',
'V',
'T',0}, 39070, 74 },
5235 { 307, {
'K',
'Y',0}, {
'C',
'Y',
'M',0}, 10039880, 136 },
5236 { 308, {
'X',
'X',0}, {
'X',
'X',0}, 10210824, 0,
LOCATION_BOTH },
5237 { 309, {
'C',
'X',0}, {
'C',
'X',
'R',0}, 12, 162 },
5238 { 310, {
'X',
'X',0}, {
'X',
'X',0}, 27114 },
5239 { 311, {
'C',
'C',0}, {
'C',
'C',
'K',0}, 10210825, 166 },
5240 { 312, {
'C',
'K',0}, {
'C',
'O',
'K',0}, 26286, 184 },
5241 { 313, {
'X',
'X',0}, {
'X',
'X',0}, 10210825 },
5242 { 314, {
'X',
'X',0}, {
'X',
'X',0}, 114 },
5243 { 315, {
'F',
'K',0}, {
'F',
'L',
'K',0}, 31396, 238 },
5244 { 317, {
'G',
'F',0}, {
'G',
'U',
'F',0}, 31396, 254 },
5245 { 318, {
'P',
'F',0}, {
'P',
'Y',
'F',0}, 26286, 258 },
5246 { 319, {
'T',
'F',0}, {
'A',
'T',
'F',0}, 39070, 260 },
5247 { 321, {
'G',
'P',0}, {
'G',
'L',
'P',0}, 10039880, 312 },
5248 { 322, {
'G',
'U',0}, {
'G',
'U',
'M',0}, 21206, 316 },
5249 { 323, {
'X',
'X',0}, {
'X',
'X',0}, 39070 },
5250 { 324, {
'G',
'G',0}, {
'G',
'G',
'Y',0}, 308, 831 },
5251 { 325, {
'H',
'M',0}, {
'H',
'M',
'D',0}, 39070, 334 },
5252 { 326, {
'X',
'X',0}, {
'X',
'X',0}, 161832256 },
5253 { 327, {
'X',
'X',0}, {
'X',
'X',0}, 161832256 },
5254 { 328, {
'J',
'E',0}, {
'J',
'E',
'Y',0}, 308, 832 },
5255 { 329, {
'X',
'X',0}, {
'X',
'X',0}, 161832256 },
5256 { 330, {
'M',
'Q',0}, {
'M',
'T',
'Q',0}, 10039880, 474 },
5257 { 331, {
'Y',
'T',0}, {
'M',
'Y',
'T',0}, 47603, 175 },
5258 { 332, {
'M',
'S',0}, {
'M',
'S',
'R',0}, 10039880, 500 },
5259 { 333, {
'A',
'N',0}, {
'A',
'N',
'T',0}, 10039880, 530,
LOCATION_BOTH },
5260 { 334, {
'N',
'C',0}, {
'N',
'C',
'L',0}, 20900, 540 },
5261 { 335, {
'N',
'U',0}, {
'N',
'I',
'U',0}, 26286, 570 },
5262 { 336, {
'N',
'F',0}, {
'N',
'F',
'K',0}, 10210825, 574 },
5263 { 337, {
'M',
'P',0}, {
'M',
'N',
'P',0}, 21206, 580 },
5264 { 338, {
'X',
'X',0}, {
'X',
'X',0}, 161832256 },
5265 { 339, {
'P',
'N',0}, {
'P',
'C',
'N',0}, 26286, 612 },
5266 { 340, {
'X',
'X',0}, {
'X',
'X',0}, 337 },
5267 { 341, {
'X',
'X',0}, {
'X',
'X',0}, 337 },
5268 { 342, {
'G',
'S',0}, {
'S',
'G',
'S',0}, 39070, 239 },
5269 { 343, {
'S',
'H',0}, {
'S',
'H',
'N',0}, 42483, 654 },
5270 { 346, {
'X',
'X',0}, {
'X',
'X',0}, 337 },
5271 { 347, {
'T',
'K',0}, {
'T',
'K',
'L',0}, 26286, 772 },
5272 { 348, {
'X',
'X',0}, {
'X',
'X',0}, 39070 },
5273 { 349, {
'T',
'C',0}, {
'T',
'C',
'A',0}, 10039880, 796 },
5274 { 351, {
'V',
'G',0}, {
'V',
'G',
'B',0}, 10039880, 92 },
5275 { 352, {
'W',
'F',0}, {
'W',
'L',
'F',0}, 26286, 876 },
5276 { 742, {
'X',
'X',0}, {
'X',
'X',0}, 39070, 0,
LOCATION_REGION },
5277 { 2129, {
'X',
'X',0}, {
'X',
'X',0}, 39070, 0,
LOCATION_REGION },
5278 { 10541, {
'X',
'X',0}, {
'X',
'X',0}, 39070, 0,
LOCATION_REGION },
5279 { 15126, {
'I',
'M',0}, {
'I',
'M',
'N',0}, 10039882, 833 },
5280 { 19618, {
'M',
'K',0}, {
'M',
'K',
'D',0}, 47610, 807 },
5281 { 20900, {
'X',
'X',0}, {
'X',
'X',0}, 27114, 0,
LOCATION_REGION },
5282 { 21206, {
'X',
'X',0}, {
'X',
'X',0}, 27114, 0,
LOCATION_REGION },
5283 { 21242, {
'X',
'X',0}, {
'X',
'X',0}, 161832256 },
5284 { 23581, {
'X',
'X',0}, {
'X',
'X',0}, 10026358, 0,
LOCATION_REGION },
5285 { 26286, {
'X',
'X',0}, {
'X',
'X',0}, 27114, 0,
LOCATION_REGION },
5286 { 27082, {
'X',
'X',0}, {
'X',
'X',0}, 161832257, 0,
LOCATION_REGION },
5287 { 27114, {
'X',
'X',0}, {
'X',
'X',0}, 39070, 0,
LOCATION_REGION },
5288 { 30967, {
'S',
'X',0}, {
'S',
'X',
'M',0}, 10039880, 534 },
5289 { 31396, {
'X',
'X',0}, {
'X',
'X',0}, 161832257, 0,
LOCATION_REGION },
5290 { 31706, {
'M',
'F',0}, {
'M',
'A',
'F',0}, 10039880, 663 },
5291 { 39070, {
'X',
'X',0}, {
'X',
'X',0}, 39070, 0,
LOCATION_REGION },
5292 { 42483, {
'X',
'X',0}, {
'X',
'X',0}, 742, 0,
LOCATION_REGION },
5293 { 42484, {
'X',
'X',0}, {
'X',
'X',0}, 742, 0,
LOCATION_REGION },
5294 { 42487, {
'X',
'X',0}, {
'X',
'X',0}, 742, 0,
LOCATION_REGION },
5295 { 47590, {
'X',
'X',0}, {
'X',
'X',0}, 2129, 0,
LOCATION_REGION },
5296 { 47599, {
'X',
'X',0}, {
'X',
'X',0}, 2129, 0,
LOCATION_REGION },
5297 { 47600, {
'X',
'X',0}, {
'X',
'X',0}, 2129, 0,
LOCATION_REGION },
5298 { 47603, {
'X',
'X',0}, {
'X',
'X',0}, 742, 0,
LOCATION_REGION },
5299 { 47609, {
'X',
'X',0}, {
'X',
'X',0}, 10541, 0,
LOCATION_REGION },
5300 { 47610, {
'X',
'X',0}, {
'X',
'X',0}, 10541, 0,
LOCATION_REGION },
5301 { 47611, {
'X',
'X',0}, {
'X',
'X',0}, 2129, 0,
LOCATION_REGION },
5302 { 47614, {
'X',
'X',0}, {
'X',
'X',0}, 2129, 0,
LOCATION_REGION },
5303 { 7299303, {
'T',
'L',0}, {
'T',
'L',
'S',0}, 47599, 626 },
5304 { 10026358, {
'X',
'X',0}, {
'X',
'X',0}, 39070, 0,
LOCATION_REGION },
5305 { 10028789, {
'A',
'X',0}, {
'A',
'L',
'A',0}, 10039882, 248 },
5306 { 10039880, {
'X',
'X',0}, {
'X',
'X',0}, 161832257, 0,
LOCATION_REGION },
5307 { 10039882, {
'X',
'X',0}, {
'X',
'X',0}, 10541, 0,
LOCATION_REGION },
5308 { 10039883, {
'X',
'X',0}, {
'X',
'X',0}, 742, 0,
LOCATION_REGION },
5309 { 10210824, {
'X',
'X',0}, {
'X',
'X',0}, 10541, 0,
LOCATION_REGION },
5310 { 10210825, {
'X',
'X',0}, {
'X',
'X',0}, 27114, 0,
LOCATION_REGION },
5311 { 161832015, {
'B',
'L',0}, {
'B',
'L',
'M',0}, 10039880, 652 },
5312 { 161832256, {
'U',
'M',0}, {
'U',
'M',
'I',0}, 27114, 581 },
5313 { 161832257, {
'X',
'X',0}, {
'X',
'X',0}, 10026358, 0,
LOCATION_REGION },
5323} ENUMSYSTEMCODEPAGES_CALLBACKS;
5326static BOOL NLS_EnumSystemCodePages(ENUMSYSTEMCODEPAGES_CALLBACKS *lpProcs)
5339 switch (lpProcs->dwFlags)
5349 hKey =
NLS_RegOpenKey(0,
L"\\Registry\\Machine\\SYSTEM\\CurrentControlSet\\Control\\NLS\\CodePage");
5352 WARN(
"NLS_RegOpenKey() failed\n");
5359 szValue,
sizeof(szValue)))
5366 bContinue = lpProcs->procW(szNumber);
5370 char szNumberA[
sizeof(szNumber)/
sizeof(
WCHAR)];
5373 bContinue = lpProcs->procA(szNumberA);
5379 }
else bContinue =
FALSE;
5401 ENUMSYSTEMCODEPAGES_CALLBACKS procs;
5406 procs.procW = lpCodePageEnumProc;
5409 return NLS_EnumSystemCodePages(lpCodePageEnumProc ? &procs :
NULL);
5423 ENUMSYSTEMCODEPAGES_CALLBACKS procs;
5427 procs.procA = lpCodePageEnumProc;
5431 return NLS_EnumSystemCodePages(lpCodePageEnumProc ? &procs :
NULL);
5439NLS_GetGeoFriendlyName(
GEOID Location,
LPWSTR szFriendlyName,
int cchData)
5458 return strlenW(szFriendlyName) + 1;
5476 if (geoid ==
ptr->id)
5480 if (
ptr->id > geoid)
5500 TRACE(
"%d %d %p %d %d\n", geoid, geotype,
data, data_len,
lang);
5511 return NLS_GetGeoFriendlyName(geoid,
data, data_len,
lang);
5513 return NLS_GetGeoFriendlyName(geoid,
data, data_len);
5538 FIXME(
"type %d is not supported\n", geotype);
5542 WARN(
"unrecognized type %d\n", geotype);
5548 static const WCHAR fmtW[] = {
'%',
'd',0};
5554 if (!
data || !data_len)
5560 return data_len <
len ? 0 :
len;
5571 TRACE(
"%d %d %p %d %d\n", geoid, geotype,
data, data_len,
lang);
5583 if (!
data || !data_len) {
5593 return data_len <
len ? 0 :
len;
5614 TRACE(
"(%d, %d, %p)\n", geoclass,
parent, enumproc);
5638 if (!enumproc(
ptr->id))
5650 TRACE(
"%p, %d\n", localename, buffersize);
5662 FIXME(
"%x %p %d %p %d\n", NormForm, lpSrcString, cwSrcLength, lpDstString, cwDstLength);
5672 FIXME(
"%x %p %d\n", NormForm, lpString, cwLength);
5691 delta /= (firsttime ?
DAMP : 2);
5692 delta += delta/numpoints;
5704 LPWSTR lpASCIICharStr,
INT cchASCIIChar)
5706 static const WCHAR prefixW[] = {
'x',
'n',
'-',
'-'};
5709 INT i, label_start, label_end, norm_len, out_label,
out = 0;
5711 TRACE(
"%x %p %d %p %d\n",
dwFlags, lpUnicodeCharStr, cchUnicodeChar,
5712 lpASCIICharStr, cchASCIIChar);
5723 cchUnicodeChar, norm_str, norm_len);
5729 for(label_start=0; label_start<norm_len;) {
5731 INT delta = 0,
b = 0,
h;
5734 for(
i=label_start;
i<norm_len && norm_str[
i]!=
'.' &&
5735 norm_str[
i]!=0x3002 && norm_str[
i]!=
'\0';
i++)
5736 if(norm_str[
i] < 0x80)
5740 if(
b == label_end-label_start) {
5741 if(label_end < norm_len)
5743 if(!lpASCIICharStr) {
5745 }
else if(
out+
b <= cchASCIIChar) {
5753 label_start = label_end+1;
5757 if(!lpASCIICharStr) {
5759 }
else if(
out+5+
b <= cchASCIIChar) {
5760 memcpy(lpASCIICharStr+
out, prefixW,
sizeof(prefixW));
5762 for(
i=label_start;
i<label_end;
i++)
5763 if(norm_str[
i] < 0x80)
5764 lpASCIICharStr[
out++] = norm_str[
i];
5765 lpASCIICharStr[
out++] =
'-';
5774 for(
h=
b;
h<label_end-label_start;) {
5777 for(
i=label_start;
i<label_end;
i++) {
5778 if(norm_str[
i]>=
n &&
m>norm_str[
i])
5781 delta += (
m-
n)*(
h+1);
5784 for(
i=label_start;
i<label_end;
i++) {
5785 if(norm_str[
i] <
n) {
5787 }
else if(norm_str[
i] ==
n) {
5791 if(!lpASCIICharStr) {
5793 }
else if(
out+1 <= cchASCIIChar) {
5794 lpASCIICharStr[
out++] = disp<=
'z'-
'a' ?
5795 'a'+disp :
'0'+disp-
'z'+
'a'-1;
5814 if(
out-out_label > 63) {
5820 if(label_end < norm_len) {
5821 if(!lpASCIICharStr) {
5823 }
else if(
out+1 <= cchASCIIChar) {
5824 lpASCIICharStr[
out++] = norm_str[label_end] ?
'.' : 0;
5831 label_start = label_end+1;
5842 LPWSTR lpNameprepCharStr,
INT cchNameprepChar)
5855 WCHAR buf[64], *map_str, norm_str[64], ch;
5856 DWORD i, map_len, norm_len,
mask, label_start, label_end,
out = 0;
5857 BOOL have_bidi_ral, prohibit_bidi_ral, ascii_only;
5859 TRACE(
"%x %p %d %p %d\n",
dwFlags, lpUnicodeCharStr, cchUnicodeChar,
5860 lpNameprepCharStr, cchNameprepChar);
5862 if(
dwFlags & ~(IDN_ALLOW_UNASSIGNED|IDN_USE_STD3_ASCII_RULES)) {
5867 if(!lpUnicodeCharStr || cchUnicodeChar<-1) {
5872 if(cchUnicodeChar == -1)
5873 cchUnicodeChar =
strlenW(lpUnicodeCharStr)+1;
5874 if(!cchUnicodeChar || (cchUnicodeChar==1 && lpUnicodeCharStr[0]==0)) {
5879 for(label_start=0; label_start<cchUnicodeChar;) {
5881 for(
i=label_start;
i<cchUnicodeChar;
i++) {
5882 ch = lpUnicodeCharStr[
i];
5884 if(
i!=cchUnicodeChar-1 && !ch) {
5889 if(!ch || ch==
'.' || ch==0x3002 || ch==0xff0e || ch==0xff61)
5897 if((
dwFlags&IDN_USE_STD3_ASCII_RULES) == 0)
5899 if((ch>=
'a' && ch<=
'z') || (ch>=
'A' && ch<=
'Z')
5900 || (ch>=
'0' && ch<=
'9') || ch==
'-')
5908 if(label_start==label_end && ch) {
5913 if((
dwFlags&IDN_USE_STD3_ASCII_RULES) && (lpUnicodeCharStr[label_start]==
'-' ||
5914 lpUnicodeCharStr[label_end-1]==
'-')) {
5921 if(label_end-label_start > 63) {
5925 if(label_end < cchUnicodeChar)
5928 if(!lpNameprepCharStr) {
5929 out += label_end-label_start;
5930 }
else if(
out+label_end-label_start <= cchNameprepChar) {
5931 memcpy(lpNameprepCharStr+
out, lpUnicodeCharStr+label_start,
5932 (label_end-label_start)*
sizeof(
WCHAR));
5933 if(lpUnicodeCharStr[label_end-1] > 0x7f)
5934 lpNameprepCharStr[
out+label_end-label_start-1] =
'.';
5935 out += label_end-label_start;
5941 label_start = label_end;
5946 for(
i=label_start;
i<label_end;
i++) {
5947 ch = lpUnicodeCharStr[
i];
5951 if(!
ptr[0]) map_len++;
5952 else if(!
ptr[1]) map_len++;
5953 else if(!
ptr[2]) map_len += 2;
5954 else if(
ptr[0]!=0xffff ||
ptr[1]!=0xffff ||
ptr[2]!=0xffff) map_len += 3;
5956 if(map_len*
sizeof(
WCHAR) >
sizeof(
buf)) {
5966 for(
i=label_start;
i<label_end;
i++) {
5967 ch = lpUnicodeCharStr[
i];
5972 map_str[map_len++] = ch;
5974 map_str[map_len++] =
ptr[0];
5976 map_str[map_len++] =
ptr[0];
5977 map_str[map_len++] =
ptr[1];
5978 }
else if(
ptr[0]!=0xffff ||
ptr[1]!=0xffff ||
ptr[2]!=0xffff) {
5979 map_str[map_len++] =
ptr[0];
5980 map_str[map_len++] =
ptr[1];
5981 map_str[map_len++] =
ptr[2];
5986 norm_str,
sizeof(norm_str)/
sizeof(
WCHAR)-1);
5995 if(label_end < cchUnicodeChar) {
5996 norm_str[norm_len++] = lpUnicodeCharStr[label_end] ?
'.' : 0;
6000 if(!lpNameprepCharStr) {
6002 }
else if(
out+norm_len <= cchNameprepChar) {
6010 have_bidi_ral = prohibit_bidi_ral =
FALSE;
6012 if((
dwFlags&IDN_ALLOW_UNASSIGNED) == 0)
6014 for(
i=0;
i<norm_len;
i++) {
6024 if(
flags & BIDI_RAL)
6025 have_bidi_ral =
TRUE;
6027 prohibit_bidi_ral =
TRUE;
6033 if((
flags & BIDI_RAL) == 0)
6034 prohibit_bidi_ral =
TRUE;
6036 ch = norm_str[norm_len-1];
6038 if((
flags & BIDI_RAL) == 0)
6039 prohibit_bidi_ral =
TRUE;
6042 if(have_bidi_ral && prohibit_bidi_ral) {
6047 label_start = label_end;
6057 LPWSTR lpUnicodeCharStr,
INT cchUnicodeChar)
6061 INT i, label_start, label_end, out_label,
out = 0;
6064 TRACE(
"%x %p %d %p %d\n",
dwFlags, lpASCIICharStr, cchASCIIChar,
6065 lpUnicodeCharStr, cchUnicodeChar);
6067 for(label_start=0; label_start<cchASCIIChar;) {
6071 for(
i=label_start;
i<cchASCIIChar;
i++) {
6072 ch = lpASCIICharStr[
i];
6074 if(ch>0x7f || (
i!=cchASCIIChar-1 && !ch)) {
6084 if((
dwFlags&IDN_USE_STD3_ASCII_RULES) == 0)
6086 if((ch>=
'a' && ch<=
'z') || (ch>=
'A' && ch<=
'Z')
6087 || (ch>=
'0' && ch<=
'9') || ch==
'-')
6095 if(label_start==label_end && ch) {
6100 if((
dwFlags&IDN_USE_STD3_ASCII_RULES) && (lpASCIICharStr[label_start]==
'-' ||
6101 lpASCIICharStr[label_end-1]==
'-')) {
6105 if(label_end-label_start > 63) {
6110 if(label_end-label_start<4 ||
6111 tolowerW(lpASCIICharStr[label_start])!=
'x' ||
6112 tolowerW(lpASCIICharStr[label_start+1])!=
'n' ||
6113 lpASCIICharStr[label_start+2]!=
'-' || lpASCIICharStr[label_start+3]!=
'-') {
6114 if(label_end < cchASCIIChar)
6117 if(!lpUnicodeCharStr) {
6118 out += label_end-label_start;
6119 }
else if(
out+label_end-label_start <= cchUnicodeChar) {
6120 memcpy(lpUnicodeCharStr+
out, lpASCIICharStr+label_start,
6121 (label_end-label_start)*
sizeof(
WCHAR));
6122 out += label_end-label_start;
6128 label_start = label_end;
6132 if(delim == label_start+3)
6134 if(!lpUnicodeCharStr) {
6135 out += delim-label_start-4;
6136 }
else if(
out+delim-label_start-4 <= cchUnicodeChar) {
6137 memcpy(lpUnicodeCharStr+
out, lpASCIICharStr+label_start+4,
6138 (delim-label_start-4)*
sizeof(
WCHAR));
6139 out += delim-label_start-4;
6144 if(
out != out_label)
6147 for(
i=delim;
i<label_end;) {
6151 ch =
i<label_end ?
tolowerW(lpASCIICharStr[
i++]) : 0;
6152 if((ch<
'a' || ch>
'z') && (ch<
'0' || ch>
'9')) {
6156 digit = ch<=
'9' ? ch-
'0'+
'z'-
'a'+1 : ch-
'a';
6167 if((
dwFlags&IDN_ALLOW_UNASSIGNED)==0 &&
6172 if(!lpUnicodeCharStr) {
6174 }
else if(
out+1 <= cchASCIIChar) {
6176 lpUnicodeCharStr+out_label+
pos,
6178 lpUnicodeCharStr[out_label+
pos] =
n;
6187 if(
out-out_label > 63) {
6192 if(label_end < cchASCIIChar) {
6193 if(!lpUnicodeCharStr) {
6195 }
else if(
out+1 <= cchUnicodeChar) {
6196 lpUnicodeCharStr[
out++] = lpASCIICharStr[label_end];
6202 label_start = label_end+1;
6217 debugstr_w(language), languagelen, muipath, muipathlen, enumerator);
static BOOL CALLBACK find_locale_id_callback(_In_ HMODULE hModule, _In_ LPCWSTR type, _In_ LPCWSTR name, _In_ LANGID lang, _In_ LPARAM lParam)
char * strcat(char *DstString, const char *SrcString)
int strcmp(const char *String1, const char *String2)
ACPI_SIZE strlen(const char *String)
static const WCHAR nameW[]
#define DEBUG_CHANNEL(args)
static WCHAR * get_locale(void)
#define ERROR_NOT_ENOUGH_MEMORY
#define ERROR_INSUFFICIENT_BUFFER
#define ERROR_CALL_NOT_IMPLEMENTED
#define ERROR_INVALID_PARAMETER
static __inline const char * debugstr_an(const char *s, int n)
#define HeapFree(x, y, z)
#define WideCharToMultiByte
#define MultiByteToWideChar
#define ERROR_INVALID_NAME
static const WCHAR version[]
static const WCHAR valueW[]
BOOL WINAPI WriteProfileStringW(LPCWSTR section, LPCWSTR entry, LPCWSTR string)
BOOL WINAPI FreeResource(HGLOBAL handle)
BOOL WINAPI EnumResourceLanguagesA(HMODULE hmod, LPCSTR type, LPCSTR name, ENUMRESLANGPROCA lpfun, LONG_PTR lparam)
LPVOID WINAPI LockResource(HGLOBAL handle)
HRSRC WINAPI FindResourceExW(HMODULE hModule, LPCWSTR type, LPCWSTR name, WORD lang)
HGLOBAL WINAPI LoadResource(HINSTANCE hModule, HRSRC hRsrc)
BOOL WINAPI EnumResourceLanguagesW(HMODULE hmod, LPCWSTR type, LPCWSTR name, ENUMRESLANGPROCW lpfun, LONG_PTR lparam)
GEOID WINAPI GetUserGeoID(GEOCLASS GeoClass)
#define LOCALE_NAME_USER_DEFAULT
LCID WINAPI GetThreadLocale(void)
BOOL WINAPI SetThreadLocale(LCID lcid)
static const WCHAR iLZeroW[]
static const WCHAR sLanguageW[]
static const WCHAR iDateW[]
static LANGID get_default_sublang(LANGID lang)
static const WCHAR iMeasureW[]
static void strcpynAtoW(WCHAR *dst, const char *src, size_t n)
static BOOL NLS_EnumSystemLanguageGroups(ENUMLANGUAGEGROUP_CALLBACKS *lpProcs)
static INT adapt(INT delta, INT numpoints, BOOL firsttime)
static const WCHAR sLongDateW[]
BOOL WINAPI EnumSystemLocalesW(LOCALE_ENUMPROCW lpfnLocaleEnum, DWORD dwFlags)
static BOOL CALLBACK enum_lang_proc_w(HMODULE hModule, LPCWSTR type, LPCWSTR name, WORD LangID, LONG_PTR lParam)
static const struct geoinfo_t geoinfodata[]
LANGID WINAPI SetThreadUILanguage(LANGID langid)
INT WINAPI LCMapStringA(LCID lcid, DWORD flags, LPCSTR src, INT srclen, LPSTR dst, INT dstlen)
static BOOL utf7_can_directly_encode(WCHAR codepoint)
BOOL WINAPI GetFileMUIInfo(DWORD flags, PCWSTR path, FILEMUIINFO *info, DWORD *size)
static struct registry_value * get_locale_registry_value(DWORD lctype)
static const union cptable * unix_cptable
INT WINAPI ResolveLocaleName(LPCWSTR name, LPWSTR localename, INT len)
static const WCHAR iDigitsW[]
BOOL WINAPI IsDBCSLeadByte(BYTE testchar)
static const WCHAR iFirstDayOfWeekW[]
static UINT get_lcid_codepage(LCID lcid)
static const WCHAR sMonDecimalSepW[]
static const WCHAR sNegativeSignW[]
static LCID lcid_LC_MONETARY
BOOL WINAPI GetStringTypeA(LCID locale, DWORD type, LPCSTR src, INT count, LPWORD chartype)
static BOOL CALLBACK enum_lang_proc_a(HMODULE hModule, LPCSTR type, LPCSTR name, WORD LangID, LONG_PTR lParam)
BOOL WINAPI EnumSystemLanguageGroupsW(LANGUAGEGROUP_ENUMPROCW pLangGrpEnumProc, DWORD dwFlags, LONG_PTR lParam)
static INT get_registry_locale_info(struct registry_value *registry_value, LPWSTR buffer, INT len)
static LCID convert_default_lcid(LCID lcid, LCTYPE lctype)
static const WCHAR szLocaleKeyName[]
static const WCHAR sThousandW[]
BOOL WINAPI IsValidLanguageGroup(LGRPID lgrpid, DWORD dwFlags)
BOOL WINAPI EnumSystemCodePagesW(CODEPAGE_ENUMPROCW lpfnCodePageEnum, DWORD flags)
static BOOL CALLBACK enum_locale_ex_proc(HMODULE module, LPCWSTR type, LPCWSTR name, WORD lang, LONG_PTR lparam)
static const WCHAR iFirstWeekOfYearW[]
BOOL WINAPI EnumSystemCodePagesA(CODEPAGE_ENUMPROCA lpfnCodePageEnum, DWORD flags)
static const WCHAR szLangGroupsKeyName[]
static BOOL utf7_write_c(char *dst, int dstlen, int *index, char character)
static BOOL is_genitive_name_supported(LCTYPE lctype)
UINT GetLocalisedText(IN UINT uID, IN LPWSTR lpszDest, IN UINT cchDest)
BOOL WINAPI GetFileMUIPath(DWORD flags, PCWSTR filepath, PWSTR language, PULONG languagelen, PWSTR muipath, PULONG muipathlen, PULONGLONG enumerator)
void LOCALE_InitRegistry(void)
INT WINAPI FoldStringA(DWORD dwFlags, LPCSTR src, INT srclen, LPSTR dst, INT dstlen)
#define LOCALE_LOCALEINFOFLAGSMASK
INT WINAPI NormalizeString(NORM_FORM NormForm, LPCWSTR lpSrcString, INT cwSrcLength, LPWSTR lpDstString, INT cwDstLength)
static const WCHAR sMonGroupingW[]
static const WCHAR sTimeW[]
static RTL_CRITICAL_SECTION cache_section
LANGID WINAPI GetSystemDefaultLangID(void)
BOOL WINAPI IsValidCodePage(UINT codepage)
static BOOL get_dummy_preferred_ui_language(DWORD flags, ULONG *count, WCHAR *buffer, ULONG *size)
static BOOL NLS_EnumLanguageGroupLocales(ENUMLANGUAGEGROUPLOCALE_CALLBACKS *lpProcs)
INT WINAPI CompareStringA(LCID lcid, DWORD flags, LPCSTR str1, INT len1, LPCSTR str2, INT len2)
INT WINAPI IdnToUnicode(DWORD dwFlags, LPCWSTR lpASCIICharStr, INT cchASCIIChar, LPWSTR lpUnicodeCharStr, INT cchUnicodeChar)
int wine_get_sortkey(int flags, const WCHAR *src, int srclen, char *dst, int dstlen)
static const WCHAR iPaperSizeW[]
static const WCHAR iCurrencyW[]
static const WCHAR iCountryW[]
static LCID lcid_LC_NUMERIC
static const struct geoinfo_t * get_geoinfo_dataptr(GEOID geoid)
static const WCHAR s2359W[]
int WINAPI lstrcmpW(LPCWSTR str1, LPCWSTR str2)
INT WINAPI CompareStringW(LCID lcid, DWORD flags, LPCWSTR str1, INT len1, LPCWSTR str2, INT len2)
int wine_fold_string(int flags, const WCHAR *src, int srclen, WCHAR *dst, int dstlen)
BOOL WINAPI SetUserGeoID(GEOID GeoID)
LANGID WINAPI GetUserDefaultUILanguage(void)
static const WCHAR s1159W[]
BOOL WINAPI GetStringTypeExA(LCID locale, DWORD type, LPCSTR src, INT count, LPWORD chartype)
static const WCHAR NumShapeW[]
static const WCHAR sCurrencyW[]
DWORD WINAPI VerLanguageNameW(DWORD wLang, LPWSTR szLang, DWORD nSize)
static const WCHAR iNegNumberW[]
static int utf7_wcstombs(const WCHAR *src, int srclen, char *dst, int dstlen)
static BOOL utf7_write_w(WCHAR *dst, int dstlen, int *index, WCHAR character)
static const WCHAR iCalendarTypeW[]
BOOL WINAPI GetSystemPreferredUILanguages(DWORD flags, ULONG *count, WCHAR *buffer, ULONG *size)
static BOOL NLS_RegEnumValue(HANDLE hKey, UINT ulIndex, LPWSTR szValueName, ULONG valueNameSize, LPWSTR szValueData, ULONG valueDataSize)
static BOOL NLS_GetLanguageGroupName(LGRPID lgrpid, LPWSTR szName, ULONG nameSize)
static const WCHAR iTLZeroW[]
static const WCHAR iLDateW[]
BOOL WINAPI GetCPInfoExW(UINT codepage, DWORD dwFlags, LPCPINFOEXW cpinfo)
static LCID lcid_LC_COLLATE
INT WINAPI GetLocaleInfoA(LCID lcid, LCTYPE lctype, LPSTR buffer, INT len)
BOOL WINAPI GetCPInfo(UINT codepage, LPCPINFO cpinfo)
static const union cptable * get_codepage_table(unsigned int codepage)
static int get_value_base_by_lctype(LCTYPE lctype)
static const WCHAR iCurrDigitsW[]
static struct registry_value registry_values[]
static const WCHAR sCountryW[]
static BOOL CALLBACK enum_uilang_proc_a(HMODULE hModule, LPCSTR type, LPCSTR name, WORD LangID, LONG_PTR lParam)
INT WINAPI GetGeoInfoW(GEOID geoid, GEOTYPE geotype, LPWSTR data, int data_len, LANGID lang)
BOOL WINAPI IsValidLocaleName(LPCWSTR locale)
INT WINAPI IdnToAscii(DWORD dwFlags, LPCWSTR lpUnicodeCharStr, INT cchUnicodeChar, LPWSTR lpASCIICharStr, INT cchASCIIChar)
BOOL WINAPI EnumUILanguagesW(UILANGUAGE_ENUMPROCW pUILangEnumProc, DWORD dwFlags, LONG_PTR lParam)
int WINAPI lstrcmpA(LPCSTR str1, LPCSTR str2)
static int utf7_mbstowcs(const char *src, int srclen, WCHAR *dst, int dstlen)
static const WCHAR sGroupingW[]
BOOL WINAPI EnumSystemLocalesA(LOCALE_ENUMPROCA lpfnLocaleEnum, DWORD dwFlags)
static const WCHAR sTimeFormatW[]
static LCID lcid_LC_CTYPE
static HANDLE create_registry_key(void)
DWORD WINAPI VerLanguageNameA(DWORD wLang, LPSTR szLang, DWORD nSize)
int WINAPI lstrcmpiW(LPCWSTR str1, LPCWSTR str2)
INT WINAPI LCMapStringEx(LPCWSTR locale, DWORD flags, LPCWSTR src, INT srclen, LPWSTR dst, INT dstlen, LPNLSVERSIONINFO version, LPVOID reserved, LPARAM handle)
static BOOL NLS_RegGetDword(HANDLE hKey, LPCWSTR szValueName, DWORD *lpVal)
LANGID WINAPI GetSystemDefaultUILanguage(void)
int WINAPI lstrcmpiA(LPCSTR str1, LPCSTR str2)
static LCID lcid_LC_MEASUREMENT
BOOL WINAPI GetStringTypeW(DWORD type, LPCWSTR src, INT count, LPWORD chartype)
UINT WINAPI SetCPGlobal(UINT acp)
static const WCHAR iTimePrefixW[]
BOOL WINAPI IsValidLocale(LCID lcid, DWORD flags)
INT WINAPI GetSystemDefaultLocaleName(LPWSTR localename, INT len)
BOOL WINAPI IsDBCSLeadByteEx(UINT codepage, BYTE testchar)
INT WINAPI FoldStringW(DWORD dwFlags, LPCWSTR src, INT srclen, LPWSTR dst, INT dstlen)
BOOL WINAPI GetThreadPreferredUILanguages(DWORD flags, ULONG *count, WCHAR *buf, ULONG *size)
static HANDLE NLS_RegOpenKey(HANDLE hRootKey, LPCWSTR szKeyName)
static const WCHAR sShortDateW[]
LCID WINAPI GetUserDefaultLCID(void)
static UINT setup_unix_locales(void)
INT WINAPI CompareStringEx(LPCWSTR locale, DWORD flags, LPCWSTR str1, INT len1, LPCWSTR str2, INT len2, LPNLSVERSIONINFO version, LPVOID reserved, LPARAM lParam)
int wine_compare_string(int flags, const WCHAR *str1, int len1, const WCHAR *str2, int len2)
static const WCHAR sMonThousandSepW[]
BOOL WINAPI EnumLanguageGroupLocalesW(LANGGROUPLOCALE_ENUMPROCW pLangGrpLcEnumProc, LGRPID lgrpid, DWORD dwFlags, LONG_PTR lParam)
static LCID lcid_LC_TELEPHONE
static unsigned short get_table_entry(const unsigned short *table, WCHAR ch)
LANGID WINAPI GetUserDefaultLangID(void)
LCID WINAPI GetSystemDefaultLCID(void)
static const WCHAR iNegCurrW[]
static BOOL locale_update_registry(HKEY hkey, const WCHAR *name, LCID lcid, const LCTYPE *values, UINT nb_values)
BOOL WINAPI EnumUILanguagesA(UILANGUAGE_ENUMPROCA pUILangEnumProc, DWORD dwFlags, LONG_PTR lParam)
BOOL WINAPI GetStringTypeExW(LCID locale, DWORD type, LPCWSTR src, INT count, LPWORD chartype)
BOOL WINAPI IsNormalizedString(NORM_FORM NormForm, LPCWSTR lpString, INT cwLength)
INT WINAPI LCMapStringW(LCID lcid, DWORD flags, LPCWSTR src, INT srclen, LPWSTR dst, INT dstlen)
BOOL WINAPI SetThreadPreferredUILanguages(DWORD flags, PCZZWSTR buffer, PULONG count)
BOOL WINAPI EnumSystemGeoID(GEOCLASS geoclass, GEOID parent, GEO_ENUMPROC enumproc)
BOOL WINAPI GetCPInfoExA(UINT codepage, DWORD dwFlags, LPCPINFOEXA cpinfo)
static const union cptable * oem_cptable
BOOL WINAPI InvalidateNLSCache(void)
static BOOL CALLBACK enum_uilang_proc_w(HMODULE hModule, LPCWSTR type, LPCWSTR name, WORD LangID, LONG_PTR lParam)
static const WCHAR sDateW[]
BOOL WINAPI EnumLanguageGroupLocalesA(LANGGROUPLOCALE_ENUMPROCA pLangGrpLcEnumProc, LGRPID lgrpid, DWORD dwFlags, LONG_PTR lParam)
static const WCHAR sPositiveSignW[]
#define GET_UNIX_LOCALE(cat)
static const WCHAR sListW[]
BOOL WINAPI EnumSystemLanguageGroupsA(LANGUAGEGROUP_ENUMPROCA pLangGrpEnumProc, DWORD dwFlags, LONG_PTR lParam)
UINT WINAPI GetOEMCP(void)
INT WINAPI GetLocaleInfoW(LCID lcid, LCTYPE lctype, LPWSTR buffer, INT len)
static const union cptable * ansi_cptable
BOOL WINAPI SetLocaleInfoA(LCID lcid, LCTYPE lctype, LPCSTR data)
static const WCHAR sYearMonthW[]
static const WCHAR sNativeDigitsW[]
INT WINAPI GetGeoInfoA(GEOID geoid, GEOTYPE geotype, LPSTR data, int data_len, LANGID lang)
static const union cptable * mac_cptable
static const WCHAR iTimeW[]
static const WCHAR sDecimalW[]
static LCID lcid_LC_PAPER
LCID WINAPI ConvertDefaultLocale(LCID lcid)
BOOL WINAPI SetLocaleInfoW(LCID lcid, LCTYPE lctype, LPCWSTR data)
BOOL WINAPI EnumSystemLocalesEx(LOCALE_ENUMPROCEX proc, DWORD flags, LPARAM lparam, LPVOID reserved)
INT WINAPI IdnToNameprepUnicode(DWORD dwFlags, LPCWSTR lpUnicodeCharStr, INT cchUnicodeChar, LPWSTR lpNameprepCharStr, INT cchNameprepChar)
INT WINAPI GetUserDefaultLocaleName(LPWSTR localename, int buffersize)
static LCID lcid_LC_MESSAGES
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
GLint GLint GLint GLint GLint x
GLuint GLuint GLsizei GLenum type
GLint GLint GLint GLint GLint GLint y
GLuint GLuint GLsizei count
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLdouble GLdouble GLdouble GLdouble q
GLenum GLenum GLuint components
GLboolean GLboolean GLboolean b
GLenum GLuint GLenum GLsizei const GLchar * buf
GLboolean GLenum GLenum GLvoid * values
GLuint GLsizei GLsizei * length
GLboolean GLboolean GLboolean GLboolean a
GLubyte GLubyte GLubyte GLubyte w
GLfloat GLfloat GLfloat GLfloat h
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 * u
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
int wine_cpsymbol_wcstombs(const WCHAR *src, int srclen, char *dst, int dstlen)
const union cptable * wine_cp_enum_table(unsigned int index)
int wine_utf8_wcstombs(int flags, const WCHAR *src, int srclen, char *dst, int dstlen)
int wine_cp_wcstombs(const union cptable *table, int flags, const WCHAR *src, int srclen, char *dst, int dstlen, const char *defchar, int *used)
const union cptable * wine_cp_get_table(unsigned int codepage)
WINE_UNICODE_INLINE int wine_is_dbcs_leadbyte(const union cptable *table, unsigned char ch)
int wine_cpsymbol_mbstowcs(const char *src, int srclen, WCHAR *dst, int dstlen)
int wine_cp_mbstowcs(const union cptable *table, int flags, const char *src, int srclen, WCHAR *dst, int dstlen)
int wine_utf8_mbstowcs(int flags, const char *src, int srclen, WCHAR *dst, int dstlen)
WINE_UNICODE_INLINE unsigned short get_char_typeW(WCHAR ch)
_Check_return_ _CRTIMP int __cdecl isalnum(_In_ int _C)
_Check_return_ char *__cdecl getenv(_In_z_ const char *_VarName)
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
#define OBJ_CASE_INSENSITIVE
NTSYSAPI ULONG WINAPI RtlNtStatusToDosError(NTSTATUS)
void JapaneseEra_ClearCache(void)
BOOL WINAPI GetUserPreferredUILanguages(DWORD dwFlags, PULONG pulNumLanguages, PZZWSTR pwszLanguagesBuffer, PULONG pcchLanguagesBuffer)
#define memcpy(s1, s2, n)
#define memmove(s1, s2, n)
PSDBQUERYRESULT_VISTA PVOID DWORD * dwSize
#define sprintf(buf, format,...)
static unsigned int number
static const WCHAR localeW[]
static DWORD LPDWORD LPCSTR DWORD srclen
#define InitializeObjectAttributes(p, n, a, r, s)
const unsigned short nameprep_char_type[4432]
const unsigned short nameprep_mapping[5856]
NTSYSAPI NTSTATUS NTAPI RtlOpenCurrentUser(_In_ ACCESS_MASK DesiredAccess, _Out_ PHANDLE KeyHandle)
_Must_inspect_result_ NTSYSAPI LONG NTAPI RtlCompareUnicodeStrings(_In_reads_(String1Length) PCWCH String1, _In_ SIZE_T String1Length, _In_reads_(String2Length) PCWCH String2, _In_ SIZE_T String2Length, _In_ BOOLEAN CaseInSensitive)
NTSYSAPI NTSTATUS NTAPI RtlEnterCriticalSection(_In_ PRTL_CRITICAL_SECTION CriticalSection)
NTSYSAPI NTSTATUS NTAPI RtlLeaveCriticalSection(_In_ PRTL_CRITICAL_SECTION CriticalSection)
NTSYSAPI NTSTATUS NTAPI NtOpenKey(OUT PHANDLE KeyHandle, IN ACCESS_MASK DesiredAccess, IN POBJECT_ATTRIBUTES ObjectAttributes)
NTSYSAPI NTSTATUS NTAPI NtSetValueKey(IN HANDLE KeyHandle, IN PUNICODE_STRING ValueName, IN ULONG TitleIndex OPTIONAL, IN ULONG Type, IN PVOID Data, IN ULONG DataSize)
@ KeyValuePartialInformation
@ KeyValueFullInformation
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
NTSYSAPI NTSTATUS NTAPI NtQueryValueKey(IN HANDLE KeyHandle, IN PUNICODE_STRING ValueName, IN KEY_VALUE_INFORMATION_CLASS KeyValueInformationClass, IN PVOID KeyValueInformation, IN ULONG Length, IN PULONG ResultLength)
NTSTATUS NTAPI NtClose(IN HANDLE Handle)
NTSTATUS NTAPI NtCreateKey(OUT PHANDLE KeyHandle, IN ACCESS_MASK DesiredAccess, IN POBJECT_ATTRIBUTES ObjectAttributes, IN ULONG TitleIndex, IN PUNICODE_STRING Class OPTIONAL, IN ULONG CreateOptions, OUT PULONG Disposition OPTIONAL)
NTSTATUS NTAPI NtEnumerateValueKey(IN HANDLE KeyHandle, IN ULONG Index, IN KEY_VALUE_INFORMATION_CLASS KeyValueInformationClass, OUT PVOID KeyValueInformation, IN ULONG Length, OUT PULONG ResultLength)
#define LOCALE_USER_DEFAULT
#define SORTIDFROMLCID(lcid)
#define LOCALE_SYSTEM_DEFAULT
__GNU_EXTENSION typedef unsigned __int64 * PULONGLONG
#define MAKELCID(lgid, srtid)
_NullNull_terminated_ CONST WCHAR * PCZZWSTR
NTSTATUS NTAPI NtQueryInstallUILanguage(OUT LANGID *LanguageId)
NTSTATUS NTAPI NtQueryDefaultLocale(IN BOOLEAN UserProfile, OUT PLCID DefaultLocaleId)
NTSTATUS NTAPI NtSetDefaultUILanguage(IN LANGID LanguageId)
NTSTATUS NTAPI NtQueryDefaultUILanguage(OUT LANGID *LanguageId)
NTSTATUS NTAPI NtSetDefaultLocale(IN BOOLEAN UserProfile, IN LCID DefaultLocaleId)
static const WCHAR szName[]
#define strncmpiW(s1, s2, n)
#define strtoulW(s1, s2, b)
#define strpbrkW(str, accept)
#define SUBLANG_CHINESE_SINGAPORE
#define SUBLANG_CHINESE_MACAU
#define LANGIDFROMLCID(l)
#define SUBLANG_CHINESE_TRADITIONAL
#define SUBLANG_CHINESE_SIMPLIFIED
#define SUBLANG_CHINESE_HONGKONG
#define SUBLANG_SPANISH_MODERN
#define STATUS_BUFFER_OVERFLOW
LANGGROUPLOCALE_ENUMPROCW procW
LANGGROUPLOCALE_ENUMPROCA procA
LANGUAGEGROUP_ENUMPROCW procW
LANGUAGEGROUP_ENUMPROCA procA
union ENUM_UILANG_CALLBACK::@466 u
UILANGUAGE_ENUMPROCA procA
UILANGUAGE_ENUMPROCW procW
BYTE LeadByte[MAX_LEADBYTES]
BYTE DefaultChar[MAX_DEFAULTCHAR]
CHAR CodePageName[MAX_PATH]
WCHAR CodePageName[MAX_PATH]
#define FIELD_OFFSET(t, f)
#define RtlCopyMemory(Destination, Source, Length)
#define STATUS_OBJECT_NAME_NOT_FOUND
static const WCHAR lang[]
_Must_inspect_result_ _In_ WDFUSBDEVICE _In_opt_ WDFREQUEST _In_opt_ PWDF_REQUEST_SEND_OPTIONS _Out_writes_opt_ NumCharacters PUSHORT _Inout_ PUSHORT _In_ UCHAR _In_opt_ USHORT LangID
DWORD WINAPI GetLastError(void)
*nSize LPSTR _Inout_ LPDWORD nSize
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
#define ERROR_NO_UNICODE_TRANSLATION
#define ERROR_INVALID_FLAGS
#define LOCALE_USE_CP_ACP
#define LCMAP_LINGUISTIC_CASING
#define LOCALE_SABBREVMONTHNAME10
#define LOCALE_SMONTHNAME12
#define LOCALE_ICURRDIGITS
#define LOCALE_IDEFAULTCODEPAGE
#define LOCALE_SMONTHNAME5
#define LOCALE_SABBREVMONTHNAME9
BOOL(CALLBACK * LOCALE_ENUMPROCEX)(LPWSTR, DWORD, LPARAM)
BOOL(CALLBACK * LANGGROUPLOCALE_ENUMPROCA)(LGRPID, LCID, LPSTR, LONG_PTR)
#define LOCALE_NEUTRALDATA
#define LOCALE_SABBREVMONTHNAME11
#define LOCALE_SABBREVDAYNAME5
WINBASEAPI int WINAPI LCIDToLocaleName(_In_ LCID Locale, _Out_writes_opt_(cchName) LPWSTR lpName, _In_ int cchName, _In_ DWORD dwFlags)
#define LOCALE_SABBREVDAYNAME2
#define LOCALE_INEGSEPBYSPACE
#define LOCALE_SABBREVMONTHNAME2
#define LOCALE_INEGSIGNPOSN
#define LOCALE_IDEFAULTUNIXCODEPAGE
#define LOCALE_SMONTHNAME13
#define LOCALE_SMONTHNAME3
#define LOCALE_SSHORTTIME
#define LINGUISTIC_IGNORECASE
#define LCMAP_SIMPLIFIED_CHINESE
#define LOCALE_SMONTHNAME11
#define LOCALE_SMONTHNAME8
#define LCMAP_TRADITIONAL_CHINESE
#define LOCALE_SMONTHNAME4
#define LOCALE_FONTSIGNATURE
BOOL(CALLBACK * UILANGUAGE_ENUMPROCW)(LPWSTR, LONG_PTR)
#define LOCALE_SENGLANGUAGE
#define LOCALE_SABBREVMONTHNAME13
#define LOCALE_IFIRSTWEEKOFYEAR
#define LOCALE_SMONTHNAME7
#define NORM_IGNOREKANATYPE
#define NORM_LINGUISTIC_CASING
#define LOCALE_IINTLCURRDIGITS
#define C2_COMMONSEPARATOR
#define LOCALE_SSHORTDATE
#define GEOID_NOT_AVAILABLE
BOOL(CALLBACK * GEO_ENUMPROC)(GEOID)
BOOL(CALLBACK * LANGGROUPLOCALE_ENUMPROCW)(LGRPID, LCID, LPWSTR, LONG_PTR)
#define NORM_IGNORENONSPACE
BOOL(CALLBACK * CODEPAGE_ENUMPROCA)(LPSTR)
#define LOCALE_SPECIFICDATA
#define LOCALE_IPOSSYMPRECEDES
#define C2_EUROPESEPARATOR
#define LOCALE_SABBREVMONTHNAME4
#define LOCALE_SPOSITIVESIGN
BOOL(CALLBACK * LANGUAGEGROUP_ENUMPROCW)(LGRPID, LPWSTR, LPWSTR, DWORD, LONG_PTR)
#define NORM_IGNORESYMBOLS
#define LOCALE_IDEFAULTLANGUAGE
#define C2_EUROPETERMINATOR
#define LOCALE_SABBREVDAYNAME4
#define LOCALE_SMONDECIMALSEP
#define LOCALE_SISO639LANGNAME
#define C2_SEGMENTSEPARATOR
#define LOCALE_SMONTHNAME1
#define LOCALE_SABBREVMONTHNAME3
#define LOCALE_INEGSYMPRECEDES
BOOL(CALLBACK * LOCALE_ENUMPROCA)(LPSTR)
#define LOCALE_SMONTHOUSANDSEP
#define LOCALE_IPOSSIGNPOSN
#define LOCALE_SABBREVMONTHNAME1
#define LOCALE_NOUSEROVERRIDE
#define LOCALE_IOPTIONALCALENDAR
#define LOCALE_IDEFAULTANSICODEPAGE
#define LOCALE_SISO3166CTRYNAME
#define LOCALE_SABBREVDAYNAME6
#define LOCALE_SMONTHNAME2
#define LOCALE_STIMEFORMAT
BOOL(CALLBACK * LANGUAGEGROUP_ENUMPROCA)(LGRPID, LPSTR, LPSTR, DWORD, LONG_PTR)
#define LOCALE_SABBREVDAYNAME1
#define LOCALE_IFIRSTDAYOFWEEK
#define LOCALE_SABBREVMONTHNAME6
#define LOCALE_SMONTHNAME6
#define LOCALE_SABBREVLANGNAME
BOOL(CALLBACK * UILANGUAGE_ENUMPROCA)(LPSTR, LONG_PTR)
#define LOCALE_INEGNUMBER
#define LOCALE_SNEGATIVESIGN
#define LOCALE_SNATIVEDIGITS
#define LOCALE_SABBREVDAYNAME3
#define LOCALE_SABBREVMONTHNAME5
#define LOCALE_SABBREVMONTHNAME7
#define LOCALE_ICALENDARTYPE
#define LOCALE_SINTLSYMBOL
BOOL(CALLBACK * LOCALE_ENUMPROCW)(LPWSTR)
#define LOCALE_SABBREVMONTHNAME8
#define CSTR_GREATER_THAN
#define LOCALE_SMONGROUPING
#define LOCALE_SMONTHNAME10
#define LOCALE_SMONTHNAME9
BOOL(CALLBACK * CODEPAGE_ENUMPROCW)(LPWSTR)
#define LOCALE_IPOSSEPBYSPACE
#define C2_BLOCKSEPARATOR
#define LOCALE_SABBREVMONTHNAME12
#define LOCALE_IDEFAULTMACCODEPAGE
#define LOCALE_ITIMEMARKPOSN
#define LOCALE_RETURN_GENITIVE_NAMES
#define LOCALE_SABBREVDAYNAME7
#define MAKEINTRESOURCEW(i)
#define RtlUshortByteSwap(_x)