39#define WINVER DLL_EXPORT_VERSION
42#define LOCALE_NAME_USER_DEFAULT NULL
53#define NLSRC_OFFSET 5000
57#define LOCALE_LOCALEINFOFLAGSMASK (LOCALE_NOUSEROVERRIDE|LOCALE_USE_CP_ACP|\
58 LOCALE_RETURN_NUMBER|LOCALE_RETURN_GENITIVE_NAMES)
59#define MB_FLAGSMASK (MB_PRECOMPOSED|MB_COMPOSITE|MB_USEGLYPHCHARS|MB_ERR_INVALID_CHARS)
60#define WC_FLAGSMASK (WC_DISCARDNS|WC_SEPCHARS|WC_DEFAULTCHAR|WC_ERR_INVALID_CHARS|\
61 WC_COMPOSITECHECK|WC_NO_BEST_FIT_CHARS)
70 '\\',
'R',
'e',
'g',
'i',
's',
't',
'r',
'y',
'\\',
'M',
'a',
'c',
'h',
'i',
'n',
'e',
'\\',
'S',
'y',
's',
't',
'e',
'm',
'\\',
71 'C',
'u',
'r',
'r',
'e',
'n',
't',
'C',
'o',
'n',
't',
'r',
'o',
'l',
'S',
'e',
't',
'\\',
72 'C',
'o',
'n',
't',
'r',
'o',
'l',
'\\',
'N',
'l',
's',
'\\',
'L',
'o',
'c',
'a',
'l',
'e',0
76 '\\',
'R',
'e',
'g',
'i',
's',
't',
'r',
'y',
'\\',
'M',
'a',
'c',
'h',
'i',
'n',
'e',
'\\',
'S',
'y',
's',
't',
'e',
'm',
'\\',
77 'C',
'u',
'r',
'r',
'e',
'n',
't',
'C',
'o',
'n',
't',
'r',
'o',
'l',
'S',
'e',
't',
'\\',
78 'C',
'o',
'n',
't',
'r',
'o',
'l',
'\\',
'N',
'l',
's',
'\\',
79 'L',
'a',
'n',
'g',
'u',
'a',
'g',
'e',
' ',
'G',
'r',
'o',
'u',
'p',
's',0
86 const char *charset_name;
125 {
"ISO88591", 28591 },
126 {
"ISO885910", 28600 },
127 {
"ISO885913", 28603 },
128 {
"ISO885914", 28604 },
129 {
"ISO885915", 28605 },
130 {
"ISO885916", 28606 },
131 {
"ISO88592", 28592 },
132 {
"ISO88593", 28593 },
133 {
"ISO88594", 28594 },
134 {
"ISO88595", 28595 },
135 {
"ISO88596", 28596 },
136 {
"ISO88597", 28597 },
137 {
"ISO88598", 28598 },
138 {
"ISO88599", 28599 },
170static const WCHAR iCalendarTypeW[] = {
'i',
'C',
'a',
'l',
'e',
'n',
'd',
'a',
'r',
'T',
'y',
'p',
'e',0};
172static const WCHAR iCurrDigitsW[] = {
'i',
'C',
'u',
'r',
'r',
'D',
'i',
'g',
'i',
't',
's',0};
176static const WCHAR iFirstDayOfWeekW[] = {
'i',
'F',
'i',
'r',
's',
't',
'D',
'a',
'y',
'O',
'f',
'W',
'e',
'e',
'k',0};
177static const WCHAR iFirstWeekOfYearW[] = {
'i',
'F',
'i',
'r',
's',
't',
'W',
'e',
'e',
'k',
'O',
'f',
'Y',
'e',
'a',
'r',0};
182static const WCHAR iNegNumberW[] = {
'i',
'N',
'e',
'g',
'N',
'u',
'm',
'b',
'e',
'r',0};
183static const WCHAR iPaperSizeW[] = {
'i',
'P',
'a',
'p',
'e',
'r',
'S',
'i',
'z',
'e',0};
185static const WCHAR iTimePrefixW[] = {
'i',
'T',
'i',
'm',
'e',
'P',
'r',
'e',
'f',
'i',
'x',0};
197static const WCHAR sMonDecimalSepW[] = {
's',
'M',
'o',
'n',
'D',
'e',
'c',
'i',
'm',
'a',
'l',
'S',
'e',
'p',0};
198static const WCHAR sMonGroupingW[] = {
's',
'M',
'o',
'n',
'G',
'r',
'o',
'u',
'p',
'i',
'n',
'g',0};
199static const WCHAR sMonThousandSepW[] = {
's',
'M',
'o',
'n',
'T',
'h',
'o',
'u',
's',
'a',
'n',
'd',
'S',
'e',
'p',0};
200static const WCHAR sNativeDigitsW[] = {
's',
'N',
'a',
't',
'i',
'v',
'e',
'D',
'i',
'g',
'i',
't',
's',0};
201static const WCHAR sNegativeSignW[] = {
's',
'N',
'e',
'g',
'a',
't',
'i',
'v',
'e',
'S',
'i',
'g',
'n',0};
202static const WCHAR sPositiveSignW[] = {
's',
'P',
'o',
's',
'i',
't',
'i',
'v',
'e',
'S',
'i',
'g',
'n',0};
203static const WCHAR sShortDateW[] = {
's',
'S',
'h',
'o',
'r',
't',
'D',
'a',
't',
'e',0};
205static const WCHAR sTimeFormatW[] = {
's',
'T',
'i',
'm',
'e',
'F',
'o',
'r',
'm',
'a',
't',0};
207static const WCHAR sYearMonthW[] = {
's',
'Y',
'e',
'a',
'r',
'M',
'o',
'n',
't',
'h',0};
257 { LOCALE_IDIGITSUBSTITUTION,
NumShapeW },
268 while (
n > 1 && *
src)
334#if (WINVER >= 0x0600)
338static int charset_cmp(
const void *
name,
const void *
entry )
350 char charset_name[16];
354 for (
i =
j = 0;
name[
i] &&
j <
sizeof(charset_name)-1;
i++)
359 sizeof(charset_names)/
sizeof(charset_names[0]),
360 sizeof(charset_names[0]), charset_cmp );
384#if (WINVER >= 0x0600)
399 if (
data->win_name[0] &&
467 return (
data->matches < 4);
480 static const WCHAR sepW[] = {
'-',
'_',
'.',
'@',0};
481 static const WCHAR winsepW[] = {
'-',
'_',0};
482 static const WCHAR posixW[] = {
'P',
'O',
'S',
'I',
'X',0};
483 static const WCHAR cW[] = {
'C',0};
484 static const WCHAR latinW[] = {
'l',
'a',
't',
'i',
'n',0};
485 static const WCHAR latnW[] = {
'-',
'L',
'a',
't',
'n',0};
494 name->win_name[0] = 0;
558 name->codepage = find_charset(
name->charset );
562 if (
name->charset)
goto done;
594 switch(lctype & 0xffff)
596 case LOCALE_SSORTNAME:
603 case LOCALE_IDEFAULTEBCDICCODEPAGE:
624 case LOCALE_SNATIVECURRNAME:
629 case LOCALE_IDIGITSUBSTITUTION:
711 case LOCALE_SYEARMONTH:
715 case LOCALE_IPAPERSIZE:
727 if (default_id)
lcid = default_id;
739 switch(lctype & 0xffff)
767 static const WCHAR cplW[] = {
'C',
'o',
'n',
't',
'r',
'o',
'l',
' ',
'P',
'a',
'n',
'e',
'l',0};
768 static const WCHAR intlW[] = {
'I',
'n',
't',
'e',
'r',
'n',
'a',
't',
'i',
'o',
'n',
'a',
'l',0};
776 attr.RootDirectory = hkey;
780 attr.SecurityQualityOfService =
NULL;
786 attr.RootDirectory = cpl_key;
801 static const WCHAR formatW[] = {
'%',
'0',
'8',
'x',0 };
807 count =
sizeof(bufferW);
814 TRACE(
"updating registry, locale %s changed %s -> %08x\n",
821 for (
i = 0;
i < nb_values;
i++)
824 sizeof(bufferW)/
sizeof(
WCHAR) );
839 static const WCHAR acpW[] = {
'A',
'C',
'P',0};
840 static const WCHAR oemcpW[] = {
'O',
'E',
'M',
'C',
'P',0};
841 static const WCHAR maccpW[] = {
'M',
'A',
'C',
'C',
'P',0};
842 static const WCHAR localeW[] = {
'L',
'o',
'c',
'a',
'l',
'e',0};
843 static const WCHAR lc_ctypeW[] = {
'L',
'C',
'_',
'C',
'T',
'Y',
'P',
'E',0 };
844 static const WCHAR lc_monetaryW[] = {
'L',
'C',
'_',
'M',
'O',
'N',
'E',
'T',
'A',
'R',
'Y',0 };
845 static const WCHAR lc_numericW[] = {
'L',
'C',
'_',
'N',
'U',
'M',
'E',
'R',
'I',
'C',0 };
846 static const WCHAR lc_timeW[] = {
'L',
'C',
'_',
'T',
'I',
'M',
'E',0 };
847 static const WCHAR lc_measurementW[] = {
'L',
'C',
'_',
'M',
'E',
'A',
'S',
'U',
'R',
'E',
'M',
'E',
'N',
'T',0 };
848 static const WCHAR lc_telephoneW[] = {
'L',
'C',
'_',
'T',
'E',
'L',
'E',
'P',
'H',
'O',
'N',
'E',0 };
849 static const WCHAR lc_paperW[] = {
'L',
'C',
'_',
'P',
'A',
'P',
'E',
'R',0};
854 } update_cp_values[] = {
859 static const LCTYPE lc_messages_values[] = {
863 static const LCTYPE lc_monetary_values[] = {
872 static const LCTYPE lc_numeric_values[] = {
876 LOCALE_IDIGITSUBSTITUTION,
882 static const LCTYPE lc_time_values[] = {
900 static const LCTYPE lc_paper_values[] = { LOCALE_IPAPERSIZE };
912 sizeof(lc_messages_values)/
sizeof(lc_messages_values[0]) );
914 sizeof(lc_monetary_values)/
sizeof(lc_monetary_values[0]) );
916 sizeof(lc_numeric_values)/
sizeof(lc_numeric_values[0]) );
918 sizeof(lc_time_values)/
sizeof(lc_time_values[0]) );
920 sizeof(lc_measurement_values)/
sizeof(lc_measurement_values[0]) );
922 sizeof(lc_telephone_values)/
sizeof(lc_telephone_values[0]) );
924 sizeof(lc_paper_values)/
sizeof(lc_paper_values[0]) );
928 static const WCHAR codepageW[] =
929 {
'\\',
'R',
'e',
'g',
'i',
's',
't',
'r',
'y',
'\\',
'M',
'a',
'c',
'h',
'i',
'n',
'e',
'\\',
'S',
'y',
's',
't',
'e',
'm',
'\\',
930 'C',
'u',
'r',
'r',
'e',
'n',
't',
'C',
'o',
'n',
't',
'r',
'o',
'l',
'S',
'e',
't',
'\\',
931 'C',
'o',
'n',
't',
'r',
'o',
'l',
'\\',
'N',
'l',
's',
'\\',
'C',
'o',
'd',
'e',
'p',
'a',
'g',
'e',0};
939 while (codepageW[
len])
945 while (codepageW[
len] && codepageW[
len] !=
'\\')
len++;
950 for (
i = 0;
i <
sizeof(update_cp_values)/
sizeof(update_cp_values[0]);
i++)
953 bufferW,
sizeof(bufferW)/
sizeof(
WCHAR) );
974static const char* get_mac_locale(
void)
976 static char mac_locale[50];
980 CFLocaleRef
locale = CFLocaleCopyCurrent();
981 CFStringRef
lang = CFLocaleGetValue(
locale, kCFLocaleLanguageCode );
982 CFStringRef
country = CFLocaleGetValue(
locale, kCFLocaleCountryCode );
983 CFStringRef locale_string;
988 locale_string = CFStringCreateCopy(
NULL,
lang);
990 CFStringGetCString(locale_string, mac_locale,
sizeof(mac_locale), kCFStringEncodingUTF8);
991 strcat(mac_locale,
".UTF-8");
994 CFRelease(locale_string);
1004static BOOL has_env(
const char*
name)
1046 if (!has_env(
"LC_ALL" ) &&
1048 (!has_env( category_name ) &&
1051 const char*
override = get_mac_locale();
1056 static char messages_locale[50];
1058 if (!messages_locale[0])
1060 CFArrayRef preferred_langs = CFLocaleCopyPreferredLanguages();
1061 if (preferred_langs && CFArrayGetCount( preferred_langs ))
1063 CFStringRef preferred_lang = CFArrayGetValueAtIndex( preferred_langs, 0 );
1064 CFDictionaryRef
components = CFLocaleCreateComponentsFromLocaleIdentifier(
NULL, preferred_lang );
1067 CFStringRef
lang = CFDictionaryGetValue(
components, kCFLocaleLanguageCode );
1070 CFStringRef locale_string;
1074 locale = CFLocaleCopyCurrent();
1081 locale_string = CFStringCreateCopy(
NULL,
lang );
1082 CFStringGetCString( locale_string, messages_locale,
sizeof(messages_locale), kCFStringEncodingUTF8 );
1083 strcat( messages_locale,
".UTF-8" );
1085 CFRelease( locale_string );
1090 if (preferred_langs)
1091 CFRelease( preferred_langs );
1094 if (messages_locale[0])
1095 override = messages_locale;
1127 TRACE(
"got lcid %04x (%d matches) for LC_CTYPE=%s\n",
1130#define GET_UNIX_LOCALE(cat) do \
1131 if ((locale = get_locale( cat, #cat ))) \
1133 strcpynAtoW( buffer, locale, sizeof(buffer)/sizeof(WCHAR) ); \
1134 if (!strcmpW( buffer, ctype_buff )) lcid_##cat = lcid_LC_CTYPE; \
1136 parse_locale_name( buffer, &locale_name ); \
1137 lcid_##cat = locale_name.lcid; \
1138 TRACE( "got lcid %04x (%d matches) for " #cat "=%s\n", \
1139 locale_name.lcid, locale_name.matches, debugstr_a(locale) ); \
1151#ifdef LC_MEASUREMENT
1158#undef GET_UNIX_LOCALE
1243 return LCIDToLocaleName(
lcid, localename,
len, 0);
1253 if (
flags & MUI_LANGUAGE_ID)
1297 if (
flags & ~(MUI_LANGUAGE_NAME | MUI_LANGUAGE_ID | MUI_MACHINE_LANGUAGE_SETTINGS))
1302 if ((
flags & MUI_LANGUAGE_NAME) && (
flags & MUI_LANGUAGE_ID))
1334#if (WINVER >= 0x0600)
1342 if (
flags & ~(MUI_LANGUAGE_NAME | MUI_LANGUAGE_ID))
1347 if ((
flags & MUI_LANGUAGE_NAME) && (
flags & MUI_LANGUAGE_ID))
1401#if (WINVER >= 0x0600)
1417 TRACE(
"found lcid %x for %s, matches %d\n",
1427 WARN(
"locale %s not recognized, defaulting to %s\n",
1629 if ((
lctype & LOCALE_RETURN_NUMBER) ||
1705 if (lcflags & LOCALE_RETURN_NUMBER)
1730 if (
ret != -1)
return ret;
1751 for (
i = 0;
i < (
lctype & 0x0f);
i++)
p += *
p + 1;
1753 if (lcflags & LOCALE_RETURN_NUMBER)
ret =
sizeof(
UINT)/
sizeof(
WCHAR);
1757 for (
i = 1;
i <= *
p;
i++)
if (!
p[
i])
break;
1777 if (lcflags & LOCALE_RETURN_NUMBER)
1794 TRACE(
"(lcid=0x%x,lctype=0x%x,%p,%d) returning number %d\n",
1802 TRACE(
"(lcid=0x%x,lctype=0x%x,%p,%d) returning %d %s\n",
1808#if (WINVER >= 0x0600)
1818 if (!lcid)
return 0;
1833 case LOCALE_SPARENT:
1848 TRACE(
"IsValidLocaleName not implemented (lpLocaleName=%s)\n",
debugstr_w(lpLocaleName));
1859 TRACE(
"GetUserDefaultLocaleName not implemented (lpLocaleName=%s, cchLocaleName=%d)\n",
debugstr_w(lpLocaleName), cchLocaleName);
1923 static const WCHAR intlW[] = {
'i',
'n',
't',
'l',0 };
1962 WCHAR *lpD, *lpM, *lpY;
2169 if (
table->info.def_char & 0xff00)
2228 static const WCHAR utf7[] = {
'U',
'n',
'i',
'c',
'o',
'd',
'e',
' ',
'(',
'U',
'T',
'F',
'-',
'7',
')',0};
2238 static const WCHAR utf8[] = {
'U',
'n',
'i',
'c',
'o',
'd',
'e',
' ',
'(',
'U',
'T',
'F',
'-',
'8',
')',0};
2283 if (!lpfnCodePageEnum(
buffer ))
break;
2308 *--
p =
'0' + (
page % 10);
2311 if (!lpfnCodePageEnum(
p ))
break;
2351 static const signed char base64_decoding_table[] =
2353 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
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, 62, -1, -1, -1, 63,
2356 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, -1, -1, -1, -1, -1, -1,
2357 -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
2358 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, -1, -1, -1, -1, -1,
2359 -1, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
2360 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, -1, -1, -1, -1, -1
2366 DWORD byte_pair = 0;
2369 while (
src < source_end)
2374 if (
src >= source_end)
2388 signed char sextet = *
src;
2405 sextet = base64_decoding_table[sextet];
2415 byte_pair = (byte_pair << 6) | sextet;
2428 while (
src < source_end);
2539 TRACE(
"cp %d %s -> %s, ret = %d\n",
2552 static const BOOL directly_encodable_table[] =
2554 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0,
2555 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2556 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1,
2557 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1,
2558 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2559 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
2560 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2561 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
2564 return codepoint <= 0x7A ? directly_encodable_table[codepoint] :
FALSE;
2601 static const char base64_encoding_table[] =
2602 "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
2607 while (
src < source_end)
2626 DWORD byte_pair = 0;
2633 byte_pair = (byte_pair << 16) | *
src;
2651 byte_pair <<= (6 -
offset);
2714 if (defchar ||
used)
2723 if (defchar ||
used)
2739 defchar,
used ? &used_tmp :
NULL );
2744 if (defchar ||
used)
2768 defchar,
used ? &used_tmp :
NULL );
2782 TRACE(
"cp %d %s -> %s, ret = %d\n",
2821 TRACE(
"(0x%04X)\n", lcid);
2856 TRACE(
"(0x%04x) stub - returning success\n",
langid);
2943 TRACE(
"found lcid %x for %s, matches %d\n",
2957 return lpfnLocaleEnum(
buf );
2963 static const WCHAR formatW[] = {
'%',
'0',
'8',
'x',0};
2967 return lpfnLocaleEnum(
buf );
3027 (
LPWSTR)&neutral,
sizeof(neutral) /
sizeof(
WCHAR) ))
3096 static const unsigned char type2_map[16] =
3133 WARN(
"CT_CTYPE3: semi-stub.\n");
3137 WORD type1, type3 = 0;
3156 if ((
c>=0xFF21)&&(
c<=0xFF3A)) type3 |=
C3_ALPHA;
3157 if ((
c>=0xFF41)&&(
c<=0xFF5A)) type3 |=
C3_ALPHA;
3164 if ((
c>=0xFF65)&&(
c<=0xFF9F)) type3 |=
C3_ALPHA;
3167 *chartype++ = type3;
3219 FIXME(
"For locale %04x using current ANSI code page\n",
locale);
3280 if ((0x30A1 <= wch && wch <= 0x30F3) ||
3281 wch == 0x30F4 || wch == 0x30F5 || wch == 0x30FD || wch == 0x30FE)
3304 if ((0x3041 <= wch && wch <= 0x3093) ||
3305 wch == 3094 || wch == 0x3095 || wch == 0x309D || wch == 0x309E)
3316typedef WCHAR FULL2HALF_ENTRY[3];
3317static const FULL2HALF_ENTRY full2half_table[] =
3319#define DEFINE_FULL2HALF(full, half1, half2) { full, half1, half2 },
3321#undef DEFINE_FULL2HALF
3323#define GET_FULL(table, index) ((table)[index][0])
3324#define GET_HALF1(table, index) ((table)[index][1])
3325#define GET_HALF2(table, index) ((table)[index][2])
3328typedef WCHAR DAKUTEN_ENTRY[3];
3329static const DAKUTEN_ENTRY dakuten_table[] =
3331#define DEFINE_DAKUTEN(voiced, single1, single2, half1, half2) { voiced, single1, single2 },
3333#undef DEFINE_DAKUTEN
3335#define GET_VOICED(table, index) ((table)[index][0])
3336#define GET_SINGLE1(table, index) ((table)[index][1])
3337#define GET_SINGLE2(table, index) ((table)[index][2])
3343 const FULL2HALF_ENTRY *table1 = full2half_table;
3350 map_to_katakana(&ch, 1, &ch, 1);
3352 map_to_hiragana(&ch, 1, &ch, 1);
3361 if (0xFF01 <= ch && ch <= 0xFF5E)
3369 for (
i = count1 - 1;
i >= 0; --
i)
3371 if (GET_FULL(table1,
i) != ch)
3374 if (GET_HALF2(table1,
i) == 0)
3377 dst[
pos] = GET_HALF1(table1,
i);
3385 dst[
pos++] = GET_HALF1(table1,
i);
3386 dst[
pos ] = GET_HALF2(table1,
i);
3408 const FULL2HALF_ENTRY *table1 = full2half_table;
3409 const DAKUTEN_ENTRY *table2 = dakuten_table;
3424 if (0x21 <= ch && ch <= 0x7E)
3439 for (
i = count1 - 1;
i >= 0; --
i)
3441 if (GET_HALF1(table1,
i) != ch)
3444 if (GET_HALF2(table1,
i) == 0)
3447 dst[
pos] = GET_FULL(table1,
i);
3451 if (
srclen <= 1 || GET_HALF2(table1,
i) !=
src[1])
3458 dst[
pos] = GET_FULL(table1,
i);
3466 for (
i = count2 - 1;
i >= 0; --
i)
3468 if (GET_SINGLE1(table2,
i) != ch)
3471 if (
srclen <= 1 || GET_SINGLE2(table2,
i) !=
src[1])
3478 dst[
pos] = GET_VOICED(table2,
i);
3522typedef struct tagWCHAR_PAIR
3525} WCHAR_PAIR, *PWCHAR_PAIR;
3528static const WCHAR_PAIR s_sim2tra[] =
3530#define DEFINE_SIM2TRA(from, to) { from, to },
3532#undef DEFINE_SIM2TRA
3536static const WCHAR_PAIR s_tra2sim[] =
3538#define DEFINE_TRA2SIM(from, to) { from, to },
3540#undef DEFINE_TRA2SIM
3544static int compare_wchar_pair(
const void *
x,
const void *
y)
3546 const WCHAR_PAIR *
a =
x;
3547 const WCHAR_PAIR *
b =
y;
3548 if (
a->from <
b->from)
3550 if (
a->from >
b->from)
3555static WCHAR find_wchar_pair(
const WCHAR_PAIR *pairs,
size_t count,
WCHAR ch)
3557 PWCHAR_PAIR found =
bsearch(&ch, pairs,
count,
sizeof(WCHAR_PAIR), compare_wchar_pair);
3676 flags &= ~LCMAP_LOWERCASE;
3682 flags &= ~LCMAP_UPPERCASE;
3750 if (!once++)
FIXME(
"unsupported lparam %Ix\n",
handle);
3761 TRACE(
"(%s,0x%08lx,%s,%d,%p,%d)\n",
3764 flags &= ~LOCALE_USE_CP_ACP;
3807 TRACE(
"(0x%04x,0x%08x,%s,%d,%p,%d)\n",
3835 INT ret = 0, srclenW, dstlenW;
3866 goto map_string_exit;
3873 goto map_string_exit;
3879 goto map_string_exit;
3884 goto map_string_exit;
3890 goto map_string_exit;
3923 INT ret = 0, srclenW = 0;
3939 goto FoldStringA_exit;
3955 goto FoldStringA_exit;
4042 if (
flags & ~(supported_flags|semistub_flags))
4048 if (
flags & semistub_flags)
4051 FIXME(
"semi-stub behavior for flag(s) 0x%x\n",
flags & semistub_flags);
4054 if (len1 < 0) len1 =
strlenW(str1);
4055 if (len2 < 0) len2 =
strlenW(str2);
4086 WCHAR *buf2W = buf1W + 130;
4088 INT len1W = 0, len2W = 0,
ret;
4096 if (len1 < 0) len1 =
strlen(str1);
4097 if (len2 < 0) len2 =
strlen(str2);
4155#if (WINVER >= 0x0600)
4168 if (len1 < 0) len1 =
strlenW(str1);
4169 if (len2 < 0) len2 =
strlenW(str2);
4198 if ((str1 ==
NULL) && (str2 ==
NULL))
return 0;
4199 if (str1 ==
NULL)
return -1;
4200 if (str2 ==
NULL)
return 1;
4227 if ((str1 ==
NULL) && (str2 ==
NULL))
return 0;
4228 if (str1 ==
NULL)
return -1;
4229 if (str2 ==
NULL)
return 1;
4246 if ((str1 ==
NULL) && (str2 ==
NULL))
return 0;
4247 if (str1 ==
NULL)
return -1;
4248 if (str2 ==
NULL)
return 1;
4265 if ((str1 ==
NULL) && (str2 ==
NULL))
return 0;
4266 if (str1 ==
NULL)
return -1;
4267 if (str2 ==
NULL)
return 1;
4280 extern void CDECL __wine_init_codepages(
const union cptable *ansi_cp,
const union cptable *oem_cp,
4281 const union cptable *unix_cp );
4283 UINT ansi_cp = 1252, oem_cp = 437, mac_cp = 10000, unix_cp;
4289 if (!has_env(
"LANG"))
4291 const char* mac_locale = get_mac_locale();
4293 setenv(
"LANG", mac_locale, 1 );
4295 TRACE(
"setting LANG to '%s'\n", mac_locale );
4300 TRACE(
"Mac locale %s is not supported by the C library\n",
debugstr_a(mac_locale) );
4324 (
LPWSTR)&unix_cp,
sizeof(unix_cp)/
sizeof(
WCHAR) );
4340 TRACE(
"ansi=%03d oem=%03d mac=%03d unix=%03d\n",
4388 info->NameLength > valueNameSize ||
4389 info->DataLength > valueDataSize)
4397 szValueName[
info->NameLength /
sizeof(
WCHAR)] =
'\0';
4399 szValueData[
info->DataLength /
sizeof(
WCHAR)] =
'\0';
4446 ULONG iResourceIndex = lgrpid & 0xf;
4450 for (
i = 0;
i < iResourceIndex;
i++)
4451 lpResEntry += *lpResEntry + 1;
4453 if (*lpResEntry < nameSize)
4456 szName[*lpResEntry] =
'\0';
4478 WCHAR szNumber[10], szValue[4];
4506 FIXME(
"NLS registry key not found. Please apply the default registry file 'wine.inf'\n");
4511 szValue,
sizeof(szValue) ))
4513 BOOL bInstalled = szValue[0] ==
'1';
4517 bInstalled ?
"" :
"not ");
4521 WCHAR szGrpName[48];
4524 szGrpName[0] =
'\0';
4527 bContinue = lpProcs->
procW( lgrpid, szNumber, szGrpName, lpProcs->
dwFlags,
4531 char szNumberA[
sizeof(szNumber)/
sizeof(
WCHAR)];
4532 char szGrpNameA[48];
4541 bContinue = lpProcs->
procA( lgrpid, szNumberA, szGrpNameA, lpProcs->
dwFlags,
4582 procs.
procA = pLangGrpEnumProc;
4603 procs.
procW = pLangGrpEnumProc;
4625 static const WCHAR szFormat[] = {
'%',
'x',
'\0' };
4626 WCHAR szValueName[16], szValue[2];
4638 sprintfW( szValueName, szFormat, lgrpid );
4644 if (szValue[0] ==
'1')
4674 static const WCHAR szAlternateSortsKeyName[] = {
4675 'A',
'l',
't',
'e',
'r',
'n',
'a',
't',
'e',
' ',
'S',
'o',
'r',
't',
's',
'\0'
4677 WCHAR szNumber[10], szValue[4];
4698 WARN(
"NLS registry key not found. Please apply the default registry file 'wine.inf'\n");
4703 szValue,
sizeof(szValue) ))
4708 lgrpid, lgrpid == lpProcs->
lgrpid ?
"" :
"not ");
4710 if (lgrpid == lpProcs->
lgrpid)
4722 bContinue = lpProcs->
procW( lgrpid, lcid, szNumber, lpProcs->
lParam );
4725 char szNumberA[
sizeof(szNumber)/
sizeof(
WCHAR)];
4729 bContinue = lpProcs->
procA( lgrpid, lcid, szNumberA, lpProcs->
lParam );
4840 static const WCHAR geoW[] = {
'G',
'e',
'o',0};
4841 static const WCHAR nationW[] = {
'N',
'a',
't',
'i',
'o',
'n',0};
4844 HANDLE hkey, hSubkey = 0;
4848 count =
sizeof(bufferW);
4862 FIXME(
"GEOCLASS_REGION not handled yet\n");
4867 if (hSubkey)
NtClose(hSubkey);
4876 static const WCHAR geoW[] = {
'G',
'e',
'o',0};
4877 static const WCHAR nationW[] = {
'N',
'a',
't',
'i',
'o',
'n',0};
4878 static const WCHAR formatW[] = {
'%',
'i',0};
4887 attr.RootDirectory = hkey;
4889 attr.Attributes = 0;
4891 attr.SecurityQualityOfService =
NULL;
4933 static const WCHAR formatW[] = {
'%',
'0',
'8',
'x',0};
4950 if(!pUILangEnumProc) {
4959 enum_uilang.
u.
procA = pUILangEnumProc;
4979 if(!pUILangEnumProc) {
4988 enum_uilang.
u.
procW = pUILangEnumProc;
5014 { 2, {
'A',
'G',0}, {
'A',
'T',
'G',0}, 10039880, 28 },
5015 { 3, {
'A',
'F',0}, {
'A',
'F',
'G',0}, 47614, 4 },
5016 { 4, {
'D',
'Z',0}, {
'D',
'Z',
'A',0}, 42487, 12 },
5017 { 5, {
'A',
'Z',0}, {
'A',
'Z',
'E',0}, 47611, 31 },
5018 { 6, {
'A',
'L',0}, {
'A',
'L',
'B',0}, 47610, 8 },
5019 { 7, {
'A',
'M',0}, {
'A',
'R',
'M',0}, 47611, 51 },
5020 { 8, {
'A',
'D',0}, {
'A',
'N',
'D',0}, 47610, 20 },
5021 { 9, {
'A',
'O',0}, {
'A',
'G',
'O',0}, 42484, 24 },
5022 { 10, {
'A',
'S',0}, {
'A',
'S',
'M',0}, 26286, 16 },
5023 { 11, {
'A',
'R',0}, {
'A',
'R',
'G',0}, 31396, 32 },
5024 { 12, {
'A',
'U',0}, {
'A',
'U',
'S',0}, 10210825, 36 },
5025 { 14, {
'A',
'T',0}, {
'A',
'U',
'T',0}, 10210824, 40 },
5026 { 17, {
'B',
'H',0}, {
'B',
'H',
'R',0}, 47611, 48 },
5027 { 18, {
'B',
'B',0}, {
'B',
'R',
'B',0}, 10039880, 52 },
5028 { 19, {
'B',
'W',0}, {
'B',
'W',
'A',0}, 10039883, 72 },
5029 { 20, {
'B',
'M',0}, {
'B',
'M',
'U',0}, 23581, 60 },
5030 { 21, {
'B',
'E',0}, {
'B',
'E',
'L',0}, 10210824, 56 },
5031 { 22, {
'B',
'S',0}, {
'B',
'H',
'S',0}, 10039880, 44 },
5032 { 23, {
'B',
'D',0}, {
'B',
'G',
'D',0}, 47614, 50 },
5033 { 24, {
'B',
'Z',0}, {
'B',
'L',
'Z',0}, 27082, 84 },
5034 { 25, {
'B',
'A',0}, {
'B',
'I',
'H',0}, 47610, 70 },
5035 { 26, {
'B',
'O',0}, {
'B',
'O',
'L',0}, 31396, 68 },
5036 { 27, {
'M',
'M',0}, {
'M',
'M',
'R',0}, 47599, 104 },
5037 { 28, {
'B',
'J',0}, {
'B',
'E',
'N',0}, 42483, 204 },
5038 { 29, {
'B',
'Y',0}, {
'B',
'L',
'R',0}, 47609, 112 },
5039 { 30, {
'S',
'B',0}, {
'S',
'L',
'B',0}, 20900, 90 },
5040 { 32, {
'B',
'R',0}, {
'B',
'R',
'A',0}, 31396, 76 },
5041 { 34, {
'B',
'T',0}, {
'B',
'T',
'N',0}, 47614, 64 },
5042 { 35, {
'B',
'G',0}, {
'B',
'G',
'R',0}, 47609, 100 },
5043 { 37, {
'B',
'N',0}, {
'B',
'R',
'N',0}, 47599, 96 },
5044 { 38, {
'B',
'I',0}, {
'B',
'D',
'I',0}, 47603, 108 },
5045 { 39, {
'C',
'A',0}, {
'C',
'A',
'N',0}, 23581, 124 },
5046 { 40, {
'K',
'H',0}, {
'K',
'H',
'M',0}, 47599, 116 },
5047 { 41, {
'T',
'D',0}, {
'T',
'C',
'D',0}, 42484, 148 },
5048 { 42, {
'L',
'K',0}, {
'L',
'K',
'A',0}, 47614, 144 },
5049 { 43, {
'C',
'G',0}, {
'C',
'O',
'G',0}, 42484, 178 },
5050 { 44, {
'C',
'D',0}, {
'C',
'O',
'D',0}, 42484, 180 },
5051 { 45, {
'C',
'N',0}, {
'C',
'H',
'N',0}, 47600, 156 },
5052 { 46, {
'C',
'L',0}, {
'C',
'H',
'L',0}, 31396, 152 },
5053 { 49, {
'C',
'M',0}, {
'C',
'M',
'R',0}, 42484, 120 },
5054 { 50, {
'K',
'M',0}, {
'C',
'O',
'M',0}, 47603, 174 },
5055 { 51, {
'C',
'O',0}, {
'C',
'O',
'L',0}, 31396, 170 },
5056 { 54, {
'C',
'R',0}, {
'C',
'R',
'I',0}, 27082, 188 },
5057 { 55, {
'C',
'F',0}, {
'C',
'A',
'F',0}, 42484, 140 },
5058 { 56, {
'C',
'U',0}, {
'C',
'U',
'B',0}, 10039880, 192 },
5059 { 57, {
'C',
'V',0}, {
'C',
'P',
'V',0}, 42483, 132 },
5060 { 59, {
'C',
'Y',0}, {
'C',
'Y',
'P',0}, 47611, 196 },
5061 { 61, {
'D',
'K',0}, {
'D',
'N',
'K',0}, 10039882, 208 },
5062 { 62, {
'D',
'J',0}, {
'D',
'J',
'I',0}, 47603, 262 },
5063 { 63, {
'D',
'M',0}, {
'D',
'M',
'A',0}, 10039880, 212 },
5064 { 65, {
'D',
'O',0}, {
'D',
'O',
'M',0}, 10039880, 214 },
5065 { 66, {
'E',
'C',0}, {
'E',
'C',
'U',0}, 31396, 218 },
5066 { 67, {
'E',
'G',0}, {
'E',
'G',
'Y',0}, 42487, 818 },
5067 { 68, {
'I',
'E',0}, {
'I',
'R',
'L',0}, 10039882, 372 },
5068 { 69, {
'G',
'Q',0}, {
'G',
'N',
'Q',0}, 42484, 226 },
5069 { 70, {
'E',
'E',0}, {
'E',
'S',
'T',0}, 10039882, 233 },
5070 { 71, {
'E',
'R',0}, {
'E',
'R',
'I',0}, 47603, 232 },
5071 { 72, {
'S',
'V',0}, {
'S',
'L',
'V',0}, 27082, 222 },
5072 { 73, {
'E',
'T',0}, {
'E',
'T',
'H',0}, 47603, 231 },
5073 { 75, {
'C',
'Z',0}, {
'C',
'Z',
'E',0}, 47609, 203 },
5074 { 77, {
'F',
'I',0}, {
'F',
'I',
'N',0}, 10039882, 246 },
5075 { 78, {
'F',
'J',0}, {
'F',
'J',
'I',0}, 20900, 242 },
5076 { 80, {
'F',
'M',0}, {
'F',
'S',
'M',0}, 21206, 583 },
5077 { 81, {
'F',
'O',0}, {
'F',
'R',
'O',0}, 10039882, 234 },
5078 { 84, {
'F',
'R',0}, {
'F',
'R',
'A',0}, 10210824, 250 },
5079 { 86, {
'G',
'M',0}, {
'G',
'M',
'B',0}, 42483, 270 },
5080 { 87, {
'G',
'A',0}, {
'G',
'A',
'B',0}, 42484, 266 },
5081 { 88, {
'G',
'E',0}, {
'G',
'E',
'O',0}, 47611, 268 },
5082 { 89, {
'G',
'H',0}, {
'G',
'H',
'A',0}, 42483, 288 },
5083 { 90, {
'G',
'I',0}, {
'G',
'I',
'B',0}, 47610, 292 },
5084 { 91, {
'G',
'D',0}, {
'G',
'R',
'D',0}, 10039880, 308 },
5085 { 93, {
'G',
'L',0}, {
'G',
'R',
'L',0}, 23581, 304 },
5086 { 94, {
'D',
'E',0}, {
'D',
'E',
'U',0}, 10210824, 276 },
5087 { 98, {
'G',
'R',0}, {
'G',
'R',
'C',0}, 47610, 300 },
5088 { 99, {
'G',
'T',0}, {
'G',
'T',
'M',0}, 27082, 320 },
5089 { 100, {
'G',
'N',0}, {
'G',
'I',
'N',0}, 42483, 324 },
5090 { 101, {
'G',
'Y',0}, {
'G',
'U',
'Y',0}, 31396, 328 },
5091 { 103, {
'H',
'T',0}, {
'H',
'T',
'I',0}, 10039880, 332 },
5092 { 104, {
'H',
'K',0}, {
'H',
'K',
'G',0}, 47600, 344 },
5093 { 106, {
'H',
'N',0}, {
'H',
'N',
'D',0}, 27082, 340 },
5094 { 108, {
'H',
'R',0}, {
'H',
'R',
'V',0}, 47610, 191 },
5095 { 109, {
'H',
'U',0}, {
'H',
'U',
'N',0}, 47609, 348 },
5096 { 110, {
'I',
'S',0}, {
'I',
'S',
'L',0}, 10039882, 352 },
5097 { 111, {
'I',
'D',0}, {
'I',
'D',
'N',0}, 47599, 360 },
5098 { 113, {
'I',
'N',0}, {
'I',
'N',
'D',0}, 47614, 356 },
5099 { 114, {
'I',
'O',0}, {
'I',
'O',
'T',0}, 39070, 86 },
5100 { 116, {
'I',
'R',0}, {
'I',
'R',
'N',0}, 47614, 364 },
5101 { 117, {
'I',
'L',0}, {
'I',
'S',
'R',0}, 47611, 376 },
5102 { 118, {
'I',
'T',0}, {
'I',
'T',
'A',0}, 47610, 380 },
5103 { 119, {
'C',
'I',0}, {
'C',
'I',
'V',0}, 42483, 384 },
5104 { 121, {
'I',
'Q',0}, {
'I',
'R',
'Q',0}, 47611, 368 },
5105 { 122, {
'J',
'P',0}, {
'J',
'P',
'N',0}, 47600, 392 },
5106 { 124, {
'J',
'M',0}, {
'J',
'A',
'M',0}, 10039880, 388 },
5107 { 125, {
'S',
'J',0}, {
'S',
'J',
'M',0}, 10039882, 744 },
5108 { 126, {
'J',
'O',0}, {
'J',
'O',
'R',0}, 47611, 400 },
5109 { 127, {
'X',
'X',0}, {
'X',
'X',0}, 161832256 },
5110 { 129, {
'K',
'E',0}, {
'K',
'E',
'N',0}, 47603, 404 },
5111 { 130, {
'K',
'G',0}, {
'K',
'G',
'Z',0}, 47590, 417 },
5112 { 131, {
'K',
'P',0}, {
'P',
'R',
'K',0}, 47600, 408 },
5113 { 133, {
'K',
'I',0}, {
'K',
'I',
'R',0}, 21206, 296 },
5114 { 134, {
'K',
'R',0}, {
'K',
'O',
'R',0}, 47600, 410 },
5115 { 136, {
'K',
'W',0}, {
'K',
'W',
'T',0}, 47611, 414 },
5116 { 137, {
'K',
'Z',0}, {
'K',
'A',
'Z',0}, 47590, 398 },
5117 { 138, {
'L',
'A',0}, {
'L',
'A',
'O',0}, 47599, 418 },
5118 { 139, {
'L',
'B',0}, {
'L',
'B',
'N',0}, 47611, 422 },
5119 { 140, {
'L',
'V',0}, {
'L',
'V',
'A',0}, 10039882, 428 },
5120 { 141, {
'L',
'T',0}, {
'L',
'T',
'U',0}, 10039882, 440 },
5121 { 142, {
'L',
'R',0}, {
'L',
'B',
'R',0}, 42483, 430 },
5122 { 143, {
'S',
'K',0}, {
'S',
'V',
'K',0}, 47609, 703 },
5123 { 145, {
'L',
'I',0}, {
'L',
'I',
'E',0}, 10210824, 438 },
5124 { 146, {
'L',
'S',0}, {
'L',
'S',
'O',0}, 10039883, 426 },
5125 { 147, {
'L',
'U',0}, {
'L',
'U',
'X',0}, 10210824, 442 },
5126 { 148, {
'L',
'Y',0}, {
'L',
'B',
'Y',0}, 42487, 434 },
5127 { 149, {
'M',
'G',0}, {
'M',
'D',
'G',0}, 47603, 450 },
5128 { 151, {
'M',
'O',0}, {
'M',
'A',
'C',0}, 47600, 446 },
5129 { 152, {
'M',
'D',0}, {
'M',
'D',
'A',0}, 47609, 498 },
5130 { 154, {
'M',
'N',0}, {
'M',
'N',
'G',0}, 47600, 496 },
5131 { 156, {
'M',
'W',0}, {
'M',
'W',
'I',0}, 47603, 454 },
5132 { 157, {
'M',
'L',0}, {
'M',
'L',
'I',0}, 42483, 466 },
5133 { 158, {
'M',
'C',0}, {
'M',
'C',
'O',0}, 10210824, 492 },
5134 { 159, {
'M',
'A',0}, {
'M',
'A',
'R',0}, 42487, 504 },
5135 { 160, {
'M',
'U',0}, {
'M',
'U',
'S',0}, 47603, 480 },
5136 { 162, {
'M',
'R',0}, {
'M',
'R',
'T',0}, 42483, 478 },
5137 { 163, {
'M',
'T',0}, {
'M',
'L',
'T',0}, 47610, 470 },
5138 { 164, {
'O',
'M',0}, {
'O',
'M',
'N',0}, 47611, 512 },
5139 { 165, {
'M',
'V',0}, {
'M',
'D',
'V',0}, 47614, 462 },
5140 { 166, {
'M',
'X',0}, {
'M',
'E',
'X',0}, 27082, 484 },
5141 { 167, {
'M',
'Y',0}, {
'M',
'Y',
'S',0}, 47599, 458 },
5142 { 168, {
'M',
'Z',0}, {
'M',
'O',
'Z',0}, 47603, 508 },
5143 { 173, {
'N',
'E',0}, {
'N',
'E',
'R',0}, 42483, 562 },
5144 { 174, {
'V',
'U',0}, {
'V',
'U',
'T',0}, 20900, 548 },
5145 { 175, {
'N',
'G',0}, {
'N',
'G',
'A',0}, 42483, 566 },
5146 { 176, {
'N',
'L',0}, {
'N',
'L',
'D',0}, 10210824, 528 },
5147 { 177, {
'N',
'O',0}, {
'N',
'O',
'R',0}, 10039882, 578 },
5148 { 178, {
'N',
'P',0}, {
'N',
'P',
'L',0}, 47614, 524 },
5149 { 180, {
'N',
'R',0}, {
'N',
'R',
'U',0}, 21206, 520 },
5150 { 181, {
'S',
'R',0}, {
'S',
'U',
'R',0}, 31396, 740 },
5151 { 182, {
'N',
'I',0}, {
'N',
'I',
'C',0}, 27082, 558 },
5152 { 183, {
'N',
'Z',0}, {
'N',
'Z',
'L',0}, 10210825, 554 },
5153 { 184, {
'P',
'S',0}, {
'P',
'S',
'E',0}, 47611, 275 },
5154 { 185, {
'P',
'Y',0}, {
'P',
'R',
'Y',0}, 31396, 600 },
5155 { 187, {
'P',
'E',0}, {
'P',
'E',
'R',0}, 31396, 604 },
5156 { 190, {
'P',
'K',0}, {
'P',
'A',
'K',0}, 47614, 586 },
5157 { 191, {
'P',
'L',0}, {
'P',
'O',
'L',0}, 47609, 616 },
5158 { 192, {
'P',
'A',0}, {
'P',
'A',
'N',0}, 27082, 591 },
5159 { 193, {
'P',
'T',0}, {
'P',
'R',
'T',0}, 47610, 620 },
5160 { 194, {
'P',
'G',0}, {
'P',
'N',
'G',0}, 20900, 598 },
5161 { 195, {
'P',
'W',0}, {
'P',
'L',
'W',0}, 21206, 585 },
5162 { 196, {
'G',
'W',0}, {
'G',
'N',
'B',0}, 42483, 624 },
5163 { 197, {
'Q',
'A',0}, {
'Q',
'A',
'T',0}, 47611, 634 },
5164 { 198, {
'R',
'E',0}, {
'R',
'E',
'U',0}, 47603, 638 },
5165 { 199, {
'M',
'H',0}, {
'M',
'H',
'L',0}, 21206, 584 },
5166 { 200, {
'R',
'O',0}, {
'R',
'O',
'U',0}, 47609, 642 },
5167 { 201, {
'P',
'H',0}, {
'P',
'H',
'L',0}, 47599, 608 },
5168 { 202, {
'P',
'R',0}, {
'P',
'R',
'I',0}, 10039880, 630 },
5169 { 203, {
'R',
'U',0}, {
'R',
'U',
'S',0}, 47609, 643 },
5170 { 204, {
'R',
'W',0}, {
'R',
'W',
'A',0}, 47603, 646 },
5171 { 205, {
'S',
'A',0}, {
'S',
'A',
'U',0}, 47611, 682 },
5172 { 206, {
'P',
'M',0}, {
'S',
'P',
'M',0}, 23581, 666 },
5173 { 207, {
'K',
'N',0}, {
'K',
'N',
'A',0}, 10039880, 659 },
5174 { 208, {
'S',
'C',0}, {
'S',
'Y',
'C',0}, 47603, 690 },
5175 { 209, {
'Z',
'A',0}, {
'Z',
'A',
'F',0}, 10039883, 710 },
5176 { 210, {
'S',
'N',0}, {
'S',
'E',
'N',0}, 42483, 686 },
5177 { 212, {
'S',
'I',0}, {
'S',
'V',
'N',0}, 47610, 705 },
5178 { 213, {
'S',
'L',0}, {
'S',
'L',
'E',0}, 42483, 694 },
5179 { 214, {
'S',
'M',0}, {
'S',
'M',
'R',0}, 47610, 674 },
5180 { 215, {
'S',
'G',0}, {
'S',
'G',
'P',0}, 47599, 702 },
5181 { 216, {
'S',
'O',0}, {
'S',
'O',
'M',0}, 47603, 706 },
5182 { 217, {
'E',
'S',0}, {
'E',
'S',
'P',0}, 47610, 724 },
5183 { 218, {
'L',
'C',0}, {
'L',
'C',
'A',0}, 10039880, 662 },
5184 { 219, {
'S',
'D',0}, {
'S',
'D',
'N',0}, 42487, 736 },
5185 { 220, {
'S',
'J',0}, {
'S',
'J',
'M',0}, 10039882, 744 },
5186 { 221, {
'S',
'E',0}, {
'S',
'W',
'E',0}, 10039882, 752 },
5187 { 222, {
'S',
'Y',0}, {
'S',
'Y',
'R',0}, 47611, 760 },
5188 { 223, {
'C',
'H',0}, {
'C',
'H',
'E',0}, 10210824, 756 },
5189 { 224, {
'A',
'E',0}, {
'A',
'R',
'E',0}, 47611, 784 },
5190 { 225, {
'T',
'T',0}, {
'T',
'T',
'O',0}, 10039880, 780 },
5191 { 227, {
'T',
'H',0}, {
'T',
'H',
'A',0}, 47599, 764 },
5192 { 228, {
'T',
'J',0}, {
'T',
'J',
'K',0}, 47590, 762 },
5193 { 231, {
'T',
'O',0}, {
'T',
'O',
'N',0}, 26286, 776 },
5194 { 232, {
'T',
'G',0}, {
'T',
'G',
'O',0}, 42483, 768 },
5195 { 233, {
'S',
'T',0}, {
'S',
'T',
'P',0}, 42484, 678 },
5196 { 234, {
'T',
'N',0}, {
'T',
'U',
'N',0}, 42487, 788 },
5197 { 235, {
'T',
'R',0}, {
'T',
'U',
'R',0}, 47611, 792 },
5198 { 236, {
'T',
'V',0}, {
'T',
'U',
'V',0}, 26286, 798 },
5199 { 237, {
'T',
'W',0}, {
'T',
'W',
'N',0}, 47600, 158 },
5200 { 238, {
'T',
'M',0}, {
'T',
'K',
'M',0}, 47590, 795 },
5201 { 239, {
'T',
'Z',0}, {
'T',
'Z',
'A',0}, 47603, 834 },
5202 { 240, {
'U',
'G',0}, {
'U',
'G',
'A',0}, 47603, 800 },
5203 { 241, {
'U',
'A',0}, {
'U',
'K',
'R',0}, 47609, 804 },
5204 { 242, {
'G',
'B',0}, {
'G',
'B',
'R',0}, 10039882, 826 },
5205 { 244, {
'U',
'S',0}, {
'U',
'S',
'A',0}, 23581, 840 },
5206 { 245, {
'B',
'F',0}, {
'B',
'F',
'A',0}, 42483, 854 },
5207 { 246, {
'U',
'Y',0}, {
'U',
'R',
'Y',0}, 31396, 858 },
5208 { 247, {
'U',
'Z',0}, {
'U',
'Z',
'B',0}, 47590, 860 },
5209 { 248, {
'V',
'C',0}, {
'V',
'C',
'T',0}, 10039880, 670 },
5210 { 249, {
'V',
'E',0}, {
'V',
'E',
'N',0}, 31396, 862 },
5211 { 251, {
'V',
'N',0}, {
'V',
'N',
'M',0}, 47599, 704 },
5212 { 252, {
'V',
'I',0}, {
'V',
'I',
'R',0}, 10039880, 850 },
5213 { 253, {
'V',
'A',0}, {
'V',
'A',
'T',0}, 47610, 336 },
5214 { 254, {
'N',
'A',0}, {
'N',
'A',
'M',0}, 10039883, 516 },
5215 { 257, {
'E',
'H',0}, {
'E',
'S',
'H',0}, 42487, 732 },
5216 { 258, {
'X',
'X',0}, {
'X',
'X',0}, 161832256 },
5217 { 259, {
'W',
'S',0}, {
'W',
'S',
'M',0}, 26286, 882 },
5218 { 260, {
'S',
'Z',0}, {
'S',
'W',
'Z',0}, 10039883, 748 },
5219 { 261, {
'Y',
'E',0}, {
'Y',
'E',
'M',0}, 47611, 887 },
5220 { 263, {
'Z',
'M',0}, {
'Z',
'M',
'B',0}, 47603, 894 },
5221 { 264, {
'Z',
'W',0}, {
'Z',
'W',
'E',0}, 47603, 716 },
5222 { 269, {
'C',
'S',0}, {
'S',
'C',
'G',0}, 47610, 891 },
5223 { 270, {
'M',
'E',0}, {
'M',
'N',
'E',0}, 47610, 499 },
5224 { 271, {
'R',
'S',0}, {
'S',
'R',
'B',0}, 47610, 688 },
5225 { 273, {
'C',
'W',0}, {
'C',
'U',
'W',0}, 10039880, 531 },
5226 { 276, {
'S',
'S',0}, {
'S',
'S',
'D',0}, 42487, 728 },
5227 { 300, {
'A',
'I',0}, {
'A',
'I',
'A',0}, 10039880, 660 },
5228 { 301, {
'A',
'Q',0}, {
'A',
'T',
'A',0}, 39070, 10 },
5229 { 302, {
'A',
'W',0}, {
'A',
'B',
'W',0}, 10039880, 533 },
5230 { 303, {
'X',
'X',0}, {
'X',
'X',0}, 39070 },
5231 { 304, {
'X',
'X',0}, {
'X',
'X',0}, 10210825 },
5232 { 305, {
'X',
'X',0}, {
'X',
'X',0}, 161832256 },
5233 { 306, {
'B',
'V',0}, {
'B',
'V',
'T',0}, 39070, 74 },
5234 { 307, {
'K',
'Y',0}, {
'C',
'Y',
'M',0}, 10039880, 136 },
5235 { 308, {
'X',
'X',0}, {
'X',
'X',0}, 10210824, 0,
LOCATION_BOTH },
5236 { 309, {
'C',
'X',0}, {
'C',
'X',
'R',0}, 12, 162 },
5237 { 310, {
'X',
'X',0}, {
'X',
'X',0}, 27114 },
5238 { 311, {
'C',
'C',0}, {
'C',
'C',
'K',0}, 10210825, 166 },
5239 { 312, {
'C',
'K',0}, {
'C',
'O',
'K',0}, 26286, 184 },
5240 { 313, {
'X',
'X',0}, {
'X',
'X',0}, 10210825 },
5241 { 314, {
'X',
'X',0}, {
'X',
'X',0}, 114 },
5242 { 315, {
'F',
'K',0}, {
'F',
'L',
'K',0}, 31396, 238 },
5243 { 317, {
'G',
'F',0}, {
'G',
'U',
'F',0}, 31396, 254 },
5244 { 318, {
'P',
'F',0}, {
'P',
'Y',
'F',0}, 26286, 258 },
5245 { 319, {
'T',
'F',0}, {
'A',
'T',
'F',0}, 39070, 260 },
5246 { 321, {
'G',
'P',0}, {
'G',
'L',
'P',0}, 10039880, 312 },
5247 { 322, {
'G',
'U',0}, {
'G',
'U',
'M',0}, 21206, 316 },
5248 { 323, {
'X',
'X',0}, {
'X',
'X',0}, 39070 },
5249 { 324, {
'G',
'G',0}, {
'G',
'G',
'Y',0}, 308, 831 },
5250 { 325, {
'H',
'M',0}, {
'H',
'M',
'D',0}, 39070, 334 },
5251 { 326, {
'X',
'X',0}, {
'X',
'X',0}, 161832256 },
5252 { 327, {
'X',
'X',0}, {
'X',
'X',0}, 161832256 },
5253 { 328, {
'J',
'E',0}, {
'J',
'E',
'Y',0}, 308, 832 },
5254 { 329, {
'X',
'X',0}, {
'X',
'X',0}, 161832256 },
5255 { 330, {
'M',
'Q',0}, {
'M',
'T',
'Q',0}, 10039880, 474 },
5256 { 331, {
'Y',
'T',0}, {
'M',
'Y',
'T',0}, 47603, 175 },
5257 { 332, {
'M',
'S',0}, {
'M',
'S',
'R',0}, 10039880, 500 },
5258 { 333, {
'A',
'N',0}, {
'A',
'N',
'T',0}, 10039880, 530,
LOCATION_BOTH },
5259 { 334, {
'N',
'C',0}, {
'N',
'C',
'L',0}, 20900, 540 },
5260 { 335, {
'N',
'U',0}, {
'N',
'I',
'U',0}, 26286, 570 },
5261 { 336, {
'N',
'F',0}, {
'N',
'F',
'K',0}, 10210825, 574 },
5262 { 337, {
'M',
'P',0}, {
'M',
'N',
'P',0}, 21206, 580 },
5263 { 338, {
'X',
'X',0}, {
'X',
'X',0}, 161832256 },
5264 { 339, {
'P',
'N',0}, {
'P',
'C',
'N',0}, 26286, 612 },
5265 { 340, {
'X',
'X',0}, {
'X',
'X',0}, 337 },
5266 { 341, {
'X',
'X',0}, {
'X',
'X',0}, 337 },
5267 { 342, {
'G',
'S',0}, {
'S',
'G',
'S',0}, 39070, 239 },
5268 { 343, {
'S',
'H',0}, {
'S',
'H',
'N',0}, 42483, 654 },
5269 { 346, {
'X',
'X',0}, {
'X',
'X',0}, 337 },
5270 { 347, {
'T',
'K',0}, {
'T',
'K',
'L',0}, 26286, 772 },
5271 { 348, {
'X',
'X',0}, {
'X',
'X',0}, 39070 },
5272 { 349, {
'T',
'C',0}, {
'T',
'C',
'A',0}, 10039880, 796 },
5273 { 351, {
'V',
'G',0}, {
'V',
'G',
'B',0}, 10039880, 92 },
5274 { 352, {
'W',
'F',0}, {
'W',
'L',
'F',0}, 26286, 876 },
5275 { 742, {
'X',
'X',0}, {
'X',
'X',0}, 39070, 0,
LOCATION_REGION },
5276 { 2129, {
'X',
'X',0}, {
'X',
'X',0}, 39070, 0,
LOCATION_REGION },
5277 { 10541, {
'X',
'X',0}, {
'X',
'X',0}, 39070, 0,
LOCATION_REGION },
5278 { 15126, {
'I',
'M',0}, {
'I',
'M',
'N',0}, 10039882, 833 },
5279 { 19618, {
'M',
'K',0}, {
'M',
'K',
'D',0}, 47610, 807 },
5280 { 20900, {
'X',
'X',0}, {
'X',
'X',0}, 27114, 0,
LOCATION_REGION },
5281 { 21206, {
'X',
'X',0}, {
'X',
'X',0}, 27114, 0,
LOCATION_REGION },
5282 { 21242, {
'X',
'X',0}, {
'X',
'X',0}, 161832256 },
5283 { 23581, {
'X',
'X',0}, {
'X',
'X',0}, 10026358, 0,
LOCATION_REGION },
5284 { 26286, {
'X',
'X',0}, {
'X',
'X',0}, 27114, 0,
LOCATION_REGION },
5285 { 27082, {
'X',
'X',0}, {
'X',
'X',0}, 161832257, 0,
LOCATION_REGION },
5286 { 27114, {
'X',
'X',0}, {
'X',
'X',0}, 39070, 0,
LOCATION_REGION },
5287 { 30967, {
'S',
'X',0}, {
'S',
'X',
'M',0}, 10039880, 534 },
5288 { 31396, {
'X',
'X',0}, {
'X',
'X',0}, 161832257, 0,
LOCATION_REGION },
5289 { 31706, {
'M',
'F',0}, {
'M',
'A',
'F',0}, 10039880, 663 },
5290 { 39070, {
'X',
'X',0}, {
'X',
'X',0}, 39070, 0,
LOCATION_REGION },
5291 { 42483, {
'X',
'X',0}, {
'X',
'X',0}, 742, 0,
LOCATION_REGION },
5292 { 42484, {
'X',
'X',0}, {
'X',
'X',0}, 742, 0,
LOCATION_REGION },
5293 { 42487, {
'X',
'X',0}, {
'X',
'X',0}, 742, 0,
LOCATION_REGION },
5294 { 47590, {
'X',
'X',0}, {
'X',
'X',0}, 2129, 0,
LOCATION_REGION },
5295 { 47599, {
'X',
'X',0}, {
'X',
'X',0}, 2129, 0,
LOCATION_REGION },
5296 { 47600, {
'X',
'X',0}, {
'X',
'X',0}, 2129, 0,
LOCATION_REGION },
5297 { 47603, {
'X',
'X',0}, {
'X',
'X',0}, 742, 0,
LOCATION_REGION },
5298 { 47609, {
'X',
'X',0}, {
'X',
'X',0}, 10541, 0,
LOCATION_REGION },
5299 { 47610, {
'X',
'X',0}, {
'X',
'X',0}, 10541, 0,
LOCATION_REGION },
5300 { 47611, {
'X',
'X',0}, {
'X',
'X',0}, 2129, 0,
LOCATION_REGION },
5301 { 47614, {
'X',
'X',0}, {
'X',
'X',0}, 2129, 0,
LOCATION_REGION },
5302 { 7299303, {
'T',
'L',0}, {
'T',
'L',
'S',0}, 47599, 626 },
5303 { 10026358, {
'X',
'X',0}, {
'X',
'X',0}, 39070, 0,
LOCATION_REGION },
5304 { 10028789, {
'A',
'X',0}, {
'A',
'L',
'A',0}, 10039882, 248 },
5305 { 10039880, {
'X',
'X',0}, {
'X',
'X',0}, 161832257, 0,
LOCATION_REGION },
5306 { 10039882, {
'X',
'X',0}, {
'X',
'X',0}, 10541, 0,
LOCATION_REGION },
5307 { 10039883, {
'X',
'X',0}, {
'X',
'X',0}, 742, 0,
LOCATION_REGION },
5308 { 10210824, {
'X',
'X',0}, {
'X',
'X',0}, 10541, 0,
LOCATION_REGION },
5309 { 10210825, {
'X',
'X',0}, {
'X',
'X',0}, 27114, 0,
LOCATION_REGION },
5310 { 161832015, {
'B',
'L',0}, {
'B',
'L',
'M',0}, 10039880, 652 },
5311 { 161832256, {
'U',
'M',0}, {
'U',
'M',
'I',0}, 27114, 581 },
5312 { 161832257, {
'X',
'X',0}, {
'X',
'X',0}, 10026358, 0,
LOCATION_REGION },
5322} ENUMSYSTEMCODEPAGES_CALLBACKS;
5325static BOOL NLS_EnumSystemCodePages(ENUMSYSTEMCODEPAGES_CALLBACKS *lpProcs)
5338 switch (lpProcs->dwFlags)
5348 hKey =
NLS_RegOpenKey(0,
L"\\Registry\\Machine\\SYSTEM\\CurrentControlSet\\Control\\NLS\\CodePage");
5351 WARN(
"NLS_RegOpenKey() failed\n");
5358 szValue,
sizeof(szValue)))
5365 bContinue = lpProcs->procW(szNumber);
5369 char szNumberA[
sizeof(szNumber)/
sizeof(
WCHAR)];
5372 bContinue = lpProcs->procA(szNumberA);
5378 }
else bContinue =
FALSE;
5400 ENUMSYSTEMCODEPAGES_CALLBACKS procs;
5405 procs.procW = lpCodePageEnumProc;
5408 return NLS_EnumSystemCodePages(lpCodePageEnumProc ? &procs :
NULL);
5422 ENUMSYSTEMCODEPAGES_CALLBACKS procs;
5426 procs.procA = lpCodePageEnumProc;
5430 return NLS_EnumSystemCodePages(lpCodePageEnumProc ? &procs :
NULL);
5438NLS_GetGeoFriendlyName(
GEOID Location,
LPWSTR szFriendlyName,
int cchData)
5457 return strlenW(szFriendlyName) + 1;
5475 if (geoid ==
ptr->id)
5479 if (
ptr->id > geoid)
5499 TRACE(
"%d %d %p %d %d\n", geoid, geotype,
data, data_len,
lang);
5510 return NLS_GetGeoFriendlyName(geoid,
data, data_len,
lang);
5512 return NLS_GetGeoFriendlyName(geoid,
data, data_len);
5537 FIXME(
"type %d is not supported\n", geotype);
5541 WARN(
"unrecognized type %d\n", geotype);
5547 static const WCHAR fmtW[] = {
'%',
'd',0};
5553 if (!
data || !data_len)
5559 return data_len <
len ? 0 :
len;
5570 TRACE(
"%d %d %p %d %d\n", geoid, geotype,
data, data_len,
lang);
5582 if (!
data || !data_len) {
5592 return data_len <
len ? 0 :
len;
5613 TRACE(
"(%d, %d, %p)\n", geoclass,
parent, enumproc);
5637 if (!enumproc(
ptr->id))
5649 TRACE(
"%p, %d\n", localename, buffersize);
5652 return LCIDToLocaleName(userlcid, localename, buffersize, 0);
5661 FIXME(
"%x %p %d %p %d\n", NormForm, lpSrcString, cwSrcLength, lpDstString, cwDstLength);
5671 FIXME(
"%x %p %d\n", NormForm, lpString, cwLength);
5690 delta /= (firsttime ?
DAMP : 2);
5691 delta += delta/numpoints;
5703 LPWSTR lpASCIICharStr,
INT cchASCIIChar)
5705 static const WCHAR prefixW[] = {
'x',
'n',
'-',
'-'};
5708 INT i, label_start, label_end, norm_len, out_label,
out = 0;
5710 TRACE(
"%x %p %d %p %d\n",
dwFlags, lpUnicodeCharStr, cchUnicodeChar,
5711 lpASCIICharStr, cchASCIIChar);
5722 cchUnicodeChar, norm_str, norm_len);
5728 for(label_start=0; label_start<norm_len;) {
5730 INT delta = 0,
b = 0,
h;
5733 for(
i=label_start;
i<norm_len && norm_str[
i]!=
'.' &&
5734 norm_str[
i]!=0x3002 && norm_str[
i]!=
'\0';
i++)
5735 if(norm_str[
i] < 0x80)
5739 if(
b == label_end-label_start) {
5740 if(label_end < norm_len)
5742 if(!lpASCIICharStr) {
5744 }
else if(
out+
b <= cchASCIIChar) {
5752 label_start = label_end+1;
5756 if(!lpASCIICharStr) {
5758 }
else if(
out+5+
b <= cchASCIIChar) {
5759 memcpy(lpASCIICharStr+
out, prefixW,
sizeof(prefixW));
5761 for(
i=label_start;
i<label_end;
i++)
5762 if(norm_str[
i] < 0x80)
5763 lpASCIICharStr[
out++] = norm_str[
i];
5764 lpASCIICharStr[
out++] =
'-';
5773 for(
h=
b;
h<label_end-label_start;) {
5776 for(
i=label_start;
i<label_end;
i++) {
5777 if(norm_str[
i]>=
n &&
m>norm_str[
i])
5780 delta += (
m-
n)*(
h+1);
5783 for(
i=label_start;
i<label_end;
i++) {
5784 if(norm_str[
i] <
n) {
5786 }
else if(norm_str[
i] ==
n) {
5790 if(!lpASCIICharStr) {
5792 }
else if(
out+1 <= cchASCIIChar) {
5793 lpASCIICharStr[
out++] = disp<=
'z'-
'a' ?
5794 'a'+disp :
'0'+disp-
'z'+
'a'-1;
5813 if(
out-out_label > 63) {
5819 if(label_end < norm_len) {
5820 if(!lpASCIICharStr) {
5822 }
else if(
out+1 <= cchASCIIChar) {
5823 lpASCIICharStr[
out++] = norm_str[label_end] ?
'.' : 0;
5830 label_start = label_end+1;
5841 LPWSTR lpNameprepCharStr,
INT cchNameprepChar)
5854 WCHAR buf[64], *map_str, norm_str[64], ch;
5855 DWORD i, map_len, norm_len,
mask, label_start, label_end,
out = 0;
5856 BOOL have_bidi_ral, prohibit_bidi_ral, ascii_only;
5858 TRACE(
"%x %p %d %p %d\n",
dwFlags, lpUnicodeCharStr, cchUnicodeChar,
5859 lpNameprepCharStr, cchNameprepChar);
5861 if(
dwFlags & ~(IDN_ALLOW_UNASSIGNED|IDN_USE_STD3_ASCII_RULES)) {
5866 if(!lpUnicodeCharStr || cchUnicodeChar<-1) {
5871 if(cchUnicodeChar == -1)
5872 cchUnicodeChar =
strlenW(lpUnicodeCharStr)+1;
5873 if(!cchUnicodeChar || (cchUnicodeChar==1 && lpUnicodeCharStr[0]==0)) {
5878 for(label_start=0; label_start<cchUnicodeChar;) {
5880 for(
i=label_start;
i<cchUnicodeChar;
i++) {
5881 ch = lpUnicodeCharStr[
i];
5883 if(
i!=cchUnicodeChar-1 && !ch) {
5888 if(!ch || ch==
'.' || ch==0x3002 || ch==0xff0e || ch==0xff61)
5896 if((
dwFlags&IDN_USE_STD3_ASCII_RULES) == 0)
5898 if((ch>=
'a' && ch<=
'z') || (ch>=
'A' && ch<=
'Z')
5899 || (ch>=
'0' && ch<=
'9') || ch==
'-')
5907 if(label_start==label_end && ch) {
5912 if((
dwFlags&IDN_USE_STD3_ASCII_RULES) && (lpUnicodeCharStr[label_start]==
'-' ||
5913 lpUnicodeCharStr[label_end-1]==
'-')) {
5920 if(label_end-label_start > 63) {
5924 if(label_end < cchUnicodeChar)
5927 if(!lpNameprepCharStr) {
5928 out += label_end-label_start;
5929 }
else if(
out+label_end-label_start <= cchNameprepChar) {
5930 memcpy(lpNameprepCharStr+
out, lpUnicodeCharStr+label_start,
5931 (label_end-label_start)*
sizeof(
WCHAR));
5932 if(lpUnicodeCharStr[label_end-1] > 0x7f)
5933 lpNameprepCharStr[
out+label_end-label_start-1] =
'.';
5934 out += label_end-label_start;
5940 label_start = label_end;
5945 for(
i=label_start;
i<label_end;
i++) {
5946 ch = lpUnicodeCharStr[
i];
5950 if(!
ptr[0]) map_len++;
5951 else if(!
ptr[1]) map_len++;
5952 else if(!
ptr[2]) map_len += 2;
5953 else if(
ptr[0]!=0xffff ||
ptr[1]!=0xffff ||
ptr[2]!=0xffff) map_len += 3;
5955 if(map_len*
sizeof(
WCHAR) >
sizeof(
buf)) {
5965 for(
i=label_start;
i<label_end;
i++) {
5966 ch = lpUnicodeCharStr[
i];
5971 map_str[map_len++] = ch;
5973 map_str[map_len++] =
ptr[0];
5975 map_str[map_len++] =
ptr[0];
5976 map_str[map_len++] =
ptr[1];
5977 }
else if(
ptr[0]!=0xffff ||
ptr[1]!=0xffff ||
ptr[2]!=0xffff) {
5978 map_str[map_len++] =
ptr[0];
5979 map_str[map_len++] =
ptr[1];
5980 map_str[map_len++] =
ptr[2];
5985 norm_str,
sizeof(norm_str)/
sizeof(
WCHAR)-1);
5994 if(label_end < cchUnicodeChar) {
5995 norm_str[norm_len++] = lpUnicodeCharStr[label_end] ?
'.' : 0;
5999 if(!lpNameprepCharStr) {
6001 }
else if(
out+norm_len <= cchNameprepChar) {
6009 have_bidi_ral = prohibit_bidi_ral =
FALSE;
6011 if((
dwFlags&IDN_ALLOW_UNASSIGNED) == 0)
6013 for(
i=0;
i<norm_len;
i++) {
6023 if(
flags & BIDI_RAL)
6024 have_bidi_ral =
TRUE;
6026 prohibit_bidi_ral =
TRUE;
6032 if((
flags & BIDI_RAL) == 0)
6033 prohibit_bidi_ral =
TRUE;
6035 ch = norm_str[norm_len-1];
6037 if((
flags & BIDI_RAL) == 0)
6038 prohibit_bidi_ral =
TRUE;
6041 if(have_bidi_ral && prohibit_bidi_ral) {
6046 label_start = label_end;
6056 LPWSTR lpUnicodeCharStr,
INT cchUnicodeChar)
6060 INT i, label_start, label_end, out_label,
out = 0;
6063 TRACE(
"%x %p %d %p %d\n",
dwFlags, lpASCIICharStr, cchASCIIChar,
6064 lpUnicodeCharStr, cchUnicodeChar);
6066 for(label_start=0; label_start<cchASCIIChar;) {
6070 for(
i=label_start;
i<cchASCIIChar;
i++) {
6071 ch = lpASCIICharStr[
i];
6073 if(ch>0x7f || (
i!=cchASCIIChar-1 && !ch)) {
6083 if((
dwFlags&IDN_USE_STD3_ASCII_RULES) == 0)
6085 if((ch>=
'a' && ch<=
'z') || (ch>=
'A' && ch<=
'Z')
6086 || (ch>=
'0' && ch<=
'9') || ch==
'-')
6094 if(label_start==label_end && ch) {
6099 if((
dwFlags&IDN_USE_STD3_ASCII_RULES) && (lpASCIICharStr[label_start]==
'-' ||
6100 lpASCIICharStr[label_end-1]==
'-')) {
6104 if(label_end-label_start > 63) {
6109 if(label_end-label_start<4 ||
6110 tolowerW(lpASCIICharStr[label_start])!=
'x' ||
6111 tolowerW(lpASCIICharStr[label_start+1])!=
'n' ||
6112 lpASCIICharStr[label_start+2]!=
'-' || lpASCIICharStr[label_start+3]!=
'-') {
6113 if(label_end < cchASCIIChar)
6116 if(!lpUnicodeCharStr) {
6117 out += label_end-label_start;
6118 }
else if(
out+label_end-label_start <= cchUnicodeChar) {
6119 memcpy(lpUnicodeCharStr+
out, lpASCIICharStr+label_start,
6120 (label_end-label_start)*
sizeof(
WCHAR));
6121 out += label_end-label_start;
6127 label_start = label_end;
6131 if(delim == label_start+3)
6133 if(!lpUnicodeCharStr) {
6134 out += delim-label_start-4;
6135 }
else if(
out+delim-label_start-4 <= cchUnicodeChar) {
6136 memcpy(lpUnicodeCharStr+
out, lpASCIICharStr+label_start+4,
6137 (delim-label_start-4)*
sizeof(
WCHAR));
6138 out += delim-label_start-4;
6143 if(
out != out_label)
6146 for(
i=delim;
i<label_end;) {
6150 ch =
i<label_end ?
tolowerW(lpASCIICharStr[
i++]) : 0;
6151 if((ch<
'a' || ch>
'z') && (ch<
'0' || ch>
'9')) {
6155 digit = ch<=
'9' ? ch-
'0'+
'z'-
'a'+1 : ch-
'a';
6166 if((
dwFlags&IDN_ALLOW_UNASSIGNED)==0 &&
6171 if(!lpUnicodeCharStr) {
6173 }
else if(
out+1 <= cchASCIIChar) {
6175 lpUnicodeCharStr+out_label+
pos,
6177 lpUnicodeCharStr[out_label+
pos] =
n;
6186 if(
out-out_label > 63) {
6191 if(label_end < cchASCIIChar) {
6192 if(!lpUnicodeCharStr) {
6194 }
else if(
out+1 <= cchUnicodeChar) {
6195 lpUnicodeCharStr[
out++] = lpASCIICharStr[label_end];
6201 label_start = label_end+1;
6216 debugstr_w(language), languagelen, muipath, muipathlen, enumerator);
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::@469 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
#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)