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)
340static int charset_cmp(
const void *
name,
const void *
entry )
352 char charset_name[16];
356 for (
i =
j = 0;
name[
i] &&
j <
sizeof(charset_name)-1;
i++)
361 sizeof(charset_names)/
sizeof(charset_names[0]),
362 sizeof(charset_names[0]), charset_cmp );
387#if (WINVER >= 0x0600)
403 if (
data->win_name[0] &&
471 return (
data->matches < 4);
485 static const WCHAR sepW[] = {
'-',
'_',
'.',
'@',0};
486 static const WCHAR winsepW[] = {
'-',
'_',0};
487 static const WCHAR posixW[] = {
'P',
'O',
'S',
'I',
'X',0};
488 static const WCHAR cW[] = {
'C',0};
489 static const WCHAR latinW[] = {
'l',
'a',
't',
'i',
'n',0};
490 static const WCHAR latnW[] = {
'-',
'L',
'a',
't',
'n',0};
499 name->win_name[0] = 0;
563 name->codepage = find_charset(
name->charset );
567 if (
name->charset)
goto done;
600 switch(lctype & 0xffff)
602 case LOCALE_SSORTNAME:
609 case LOCALE_IDEFAULTEBCDICCODEPAGE:
630 case LOCALE_SNATIVECURRNAME:
635 case LOCALE_IDIGITSUBSTITUTION:
717 case LOCALE_SYEARMONTH:
721 case LOCALE_IPAPERSIZE:
733 if (default_id)
lcid = default_id;
745 switch(lctype & 0xffff)
773 static const WCHAR cplW[] = {
'C',
'o',
'n',
't',
'r',
'o',
'l',
' ',
'P',
'a',
'n',
'e',
'l',0};
774 static const WCHAR intlW[] = {
'I',
'n',
't',
'e',
'r',
'n',
'a',
't',
'i',
'o',
'n',
'a',
'l',0};
782 attr.RootDirectory = hkey;
786 attr.SecurityQualityOfService =
NULL;
792 attr.RootDirectory = cpl_key;
807 static const WCHAR formatW[] = {
'%',
'0',
'8',
'x',0 };
813 count =
sizeof(bufferW);
820 TRACE(
"updating registry, locale %s changed %s -> %08x\n",
827 for (
i = 0;
i < nb_values;
i++)
830 sizeof(bufferW)/
sizeof(
WCHAR) );
845 static const WCHAR acpW[] = {
'A',
'C',
'P',0};
846 static const WCHAR oemcpW[] = {
'O',
'E',
'M',
'C',
'P',0};
847 static const WCHAR maccpW[] = {
'M',
'A',
'C',
'C',
'P',0};
848 static const WCHAR localeW[] = {
'L',
'o',
'c',
'a',
'l',
'e',0};
849 static const WCHAR lc_ctypeW[] = {
'L',
'C',
'_',
'C',
'T',
'Y',
'P',
'E',0 };
850 static const WCHAR lc_monetaryW[] = {
'L',
'C',
'_',
'M',
'O',
'N',
'E',
'T',
'A',
'R',
'Y',0 };
851 static const WCHAR lc_numericW[] = {
'L',
'C',
'_',
'N',
'U',
'M',
'E',
'R',
'I',
'C',0 };
852 static const WCHAR lc_timeW[] = {
'L',
'C',
'_',
'T',
'I',
'M',
'E',0 };
853 static const WCHAR lc_measurementW[] = {
'L',
'C',
'_',
'M',
'E',
'A',
'S',
'U',
'R',
'E',
'M',
'E',
'N',
'T',0 };
854 static const WCHAR lc_telephoneW[] = {
'L',
'C',
'_',
'T',
'E',
'L',
'E',
'P',
'H',
'O',
'N',
'E',0 };
855 static const WCHAR lc_paperW[] = {
'L',
'C',
'_',
'P',
'A',
'P',
'E',
'R',0};
860 } update_cp_values[] = {
865 static const LCTYPE lc_messages_values[] = {
869 static const LCTYPE lc_monetary_values[] = {
878 static const LCTYPE lc_numeric_values[] = {
882 LOCALE_IDIGITSUBSTITUTION,
888 static const LCTYPE lc_time_values[] = {
906 static const LCTYPE lc_paper_values[] = { LOCALE_IPAPERSIZE };
918 sizeof(lc_messages_values)/
sizeof(lc_messages_values[0]) );
920 sizeof(lc_monetary_values)/
sizeof(lc_monetary_values[0]) );
922 sizeof(lc_numeric_values)/
sizeof(lc_numeric_values[0]) );
924 sizeof(lc_time_values)/
sizeof(lc_time_values[0]) );
926 sizeof(lc_measurement_values)/
sizeof(lc_measurement_values[0]) );
928 sizeof(lc_telephone_values)/
sizeof(lc_telephone_values[0]) );
930 sizeof(lc_paper_values)/
sizeof(lc_paper_values[0]) );
934 static const WCHAR codepageW[] =
935 {
'\\',
'R',
'e',
'g',
'i',
's',
't',
'r',
'y',
'\\',
'M',
'a',
'c',
'h',
'i',
'n',
'e',
'\\',
'S',
'y',
's',
't',
'e',
'm',
'\\',
936 'C',
'u',
'r',
'r',
'e',
'n',
't',
'C',
'o',
'n',
't',
'r',
'o',
'l',
'S',
'e',
't',
'\\',
937 'C',
'o',
'n',
't',
'r',
'o',
'l',
'\\',
'N',
'l',
's',
'\\',
'C',
'o',
'd',
'e',
'p',
'a',
'g',
'e',0};
945 while (codepageW[
len])
951 while (codepageW[
len] && codepageW[
len] !=
'\\')
len++;
956 for (
i = 0;
i <
sizeof(update_cp_values)/
sizeof(update_cp_values[0]);
i++)
959 bufferW,
sizeof(bufferW)/
sizeof(
WCHAR) );
980static const char* get_mac_locale(
void)
982 static char mac_locale[50];
986 CFLocaleRef
locale = CFLocaleCopyCurrent();
987 CFStringRef
lang = CFLocaleGetValue(
locale, kCFLocaleLanguageCode );
988 CFStringRef
country = CFLocaleGetValue(
locale, kCFLocaleCountryCode );
989 CFStringRef locale_string;
994 locale_string = CFStringCreateCopy(
NULL,
lang);
996 CFStringGetCString(locale_string, mac_locale,
sizeof(mac_locale), kCFStringEncodingUTF8);
997 strcat(mac_locale,
".UTF-8");
1000 CFRelease(locale_string);
1010static BOOL has_env(
const char*
name)
1052 if (!has_env(
"LC_ALL" ) &&
1054 (!has_env( category_name ) &&
1057 const char*
override = get_mac_locale();
1062 static char messages_locale[50];
1064 if (!messages_locale[0])
1066 CFArrayRef preferred_langs = CFLocaleCopyPreferredLanguages();
1067 if (preferred_langs && CFArrayGetCount( preferred_langs ))
1069 CFStringRef preferred_lang = CFArrayGetValueAtIndex( preferred_langs, 0 );
1070 CFDictionaryRef
components = CFLocaleCreateComponentsFromLocaleIdentifier(
NULL, preferred_lang );
1073 CFStringRef
lang = CFDictionaryGetValue(
components, kCFLocaleLanguageCode );
1076 CFStringRef locale_string;
1080 locale = CFLocaleCopyCurrent();
1087 locale_string = CFStringCreateCopy(
NULL,
lang );
1088 CFStringGetCString( locale_string, messages_locale,
sizeof(messages_locale), kCFStringEncodingUTF8 );
1089 strcat( messages_locale,
".UTF-8" );
1091 CFRelease( locale_string );
1096 if (preferred_langs)
1097 CFRelease( preferred_langs );
1100 if (messages_locale[0])
1101 override = messages_locale;
1133 TRACE(
"got lcid %04x (%d matches) for LC_CTYPE=%s\n",
1136#define GET_UNIX_LOCALE(cat) do \
1137 if ((locale = get_locale( cat, #cat ))) \
1139 strcpynAtoW( buffer, locale, sizeof(buffer)/sizeof(WCHAR) ); \
1140 if (!strcmpW( buffer, ctype_buff )) lcid_##cat = lcid_LC_CTYPE; \
1142 parse_locale_name( buffer, &locale_name ); \
1143 lcid_##cat = locale_name.lcid; \
1144 TRACE( "got lcid %04x (%d matches) for " #cat "=%s\n", \
1145 locale_name.lcid, locale_name.matches, debugstr_a(locale) ); \
1157#ifdef LC_MEASUREMENT
1164#undef GET_UNIX_LOCALE
1259 if (
flags & MUI_LANGUAGE_ID)
1303 if (
flags & ~(MUI_LANGUAGE_NAME | MUI_LANGUAGE_ID | MUI_MACHINE_LANGUAGE_SETTINGS))
1308 if ((
flags & MUI_LANGUAGE_NAME) && (
flags & MUI_LANGUAGE_ID))
1340#if (WINVER >= 0x0600)
1348 if (
flags & ~(MUI_LANGUAGE_NAME | MUI_LANGUAGE_ID))
1353 if ((
flags & MUI_LANGUAGE_NAME) && (
flags & MUI_LANGUAGE_ID))
1407#if (WINVER >= 0x0600)
1424 TRACE(
"found lcid %x for %s, matches %d\n",
1434 WARN(
"locale %s not recognized, defaulting to %s\n",
1639 if ((
lctype & LOCALE_RETURN_NUMBER) ||
1715 if (lcflags & LOCALE_RETURN_NUMBER)
1740 if (
ret != -1)
return ret;
1761 for (
i = 0;
i < (
lctype & 0x0f);
i++)
p += *
p + 1;
1763 if (lcflags & LOCALE_RETURN_NUMBER)
ret =
sizeof(
UINT)/
sizeof(
WCHAR);
1767 for (
i = 1;
i <= *
p;
i++)
if (!
p[
i])
break;
1787 if (lcflags & LOCALE_RETURN_NUMBER)
1804 TRACE(
"(lcid=0x%x,lctype=0x%x,%p,%d) returning number %d\n",
1812 TRACE(
"(lcid=0x%x,lctype=0x%x,%p,%d) returning %d %s\n",
1818#if (WINVER >= 0x0600)
1829 if (!
lcid)
return 0;
1844 case LOCALE_SPARENT:
1861 TRACE(
"IsValidLocaleName not implemented (lpLocaleName=%s)\n",
debugstr_w(lpLocaleName));
1926 static const WCHAR intlW[] = {
'i',
'n',
't',
'l',0 };
1965 WCHAR *lpD, *lpM, *lpY;
2172 if (
table->info.def_char & 0xff00)
2231 static const WCHAR utf7[] = {
'U',
'n',
'i',
'c',
'o',
'd',
'e',
' ',
'(',
'U',
'T',
'F',
'-',
'7',
')',0};
2241 static const WCHAR utf8[] = {
'U',
'n',
'i',
'c',
'o',
'd',
'e',
' ',
'(',
'U',
'T',
'F',
'-',
'8',
')',0};
2286 if (!lpfnCodePageEnum(
buffer ))
break;
2311 *--
p =
'0' + (
page % 10);
2314 if (!lpfnCodePageEnum(
p ))
break;
2354 static const signed char base64_decoding_table[] =
2356 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2357 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2358 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 62, -1, -1, -1, 63,
2359 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, -1, -1, -1, -1, -1, -1,
2360 -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
2361 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, -1, -1, -1, -1, -1,
2362 -1, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
2363 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, -1, -1, -1, -1, -1
2369 DWORD byte_pair = 0;
2372 while (
src < source_end)
2377 if (
src >= source_end)
2391 signed char sextet = *
src;
2408 sextet = base64_decoding_table[sextet];
2418 byte_pair = (byte_pair << 6) | sextet;
2431 while (
src < source_end);
2542 TRACE(
"cp %d %s -> %s, ret = %d\n",
2555 static const BOOL directly_encodable_table[] =
2557 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0,
2558 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2559 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1,
2560 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1,
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, 0, 0, 0, 0, 0,
2563 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2564 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
2567 return codepoint <= 0x7A ? directly_encodable_table[codepoint] :
FALSE;
2604 static const char base64_encoding_table[] =
2605 "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
2610 while (
src < source_end)
2629 DWORD byte_pair = 0;
2636 byte_pair = (byte_pair << 16) | *
src;
2654 byte_pair <<= (6 -
offset);
2717 if (defchar ||
used)
2726 if (defchar ||
used)
2742 defchar,
used ? &used_tmp :
NULL );
2747 if (defchar ||
used)
2771 defchar,
used ? &used_tmp :
NULL );
2785 TRACE(
"cp %d %s -> %s, ret = %d\n",
2859 TRACE(
"(0x%04x) stub - returning success\n",
langid);
2946 TRACE(
"found lcid %x for %s, matches %d\n",
2960 return lpfnLocaleEnum(
buf );
2966 static const WCHAR formatW[] = {
'%',
'0',
'8',
'x',0};
2970 return lpfnLocaleEnum(
buf );
3031 (
LPWSTR)&neutral,
sizeof(neutral) /
sizeof(
WCHAR) ))
3100 static const unsigned char type2_map[16] =
3137 WARN(
"CT_CTYPE3: semi-stub.\n");
3141 WORD type1, type3 = 0;
3160 if ((
c>=0xFF21)&&(
c<=0xFF3A)) type3 |=
C3_ALPHA;
3161 if ((
c>=0xFF41)&&(
c<=0xFF5A)) type3 |=
C3_ALPHA;
3168 if ((
c>=0xFF65)&&(
c<=0xFF9F)) type3 |=
C3_ALPHA;
3171 *chartype++ = type3;
3223 FIXME(
"For locale %04x using current ANSI code page\n",
locale);
3284 if ((0x30A1 <= wch && wch <= 0x30F3) ||
3285 wch == 0x30F4 || wch == 0x30F5 || wch == 0x30FD || wch == 0x30FE)
3308 if ((0x3041 <= wch && wch <= 0x3093) ||
3309 wch == 3094 || wch == 0x3095 || wch == 0x309D || wch == 0x309E)
3320typedef WCHAR FULL2HALF_ENTRY[3];
3321static const FULL2HALF_ENTRY full2half_table[] =
3323#define DEFINE_FULL2HALF(full, half1, half2) { full, half1, half2 },
3325#undef DEFINE_FULL2HALF
3327#define GET_FULL(table, index) ((table)[index][0])
3328#define GET_HALF1(table, index) ((table)[index][1])
3329#define GET_HALF2(table, index) ((table)[index][2])
3332typedef WCHAR DAKUTEN_ENTRY[3];
3333static const DAKUTEN_ENTRY dakuten_table[] =
3335#define DEFINE_DAKUTEN(voiced, single1, single2, half1, half2) { voiced, single1, single2 },
3337#undef DEFINE_DAKUTEN
3339#define GET_VOICED(table, index) ((table)[index][0])
3340#define GET_SINGLE1(table, index) ((table)[index][1])
3341#define GET_SINGLE2(table, index) ((table)[index][2])
3347 const FULL2HALF_ENTRY *table1 = full2half_table;
3354 map_to_katakana(&ch, 1, &ch, 1);
3356 map_to_hiragana(&ch, 1, &ch, 1);
3365 if (0xFF01 <= ch && ch <= 0xFF5E)
3373 for (
i = count1 - 1;
i >= 0; --
i)
3375 if (GET_FULL(table1,
i) != ch)
3378 if (GET_HALF2(table1,
i) == 0)
3381 dst[
pos] = GET_HALF1(table1,
i);
3389 dst[
pos++] = GET_HALF1(table1,
i);
3390 dst[
pos ] = GET_HALF2(table1,
i);
3412 const FULL2HALF_ENTRY *table1 = full2half_table;
3413 const DAKUTEN_ENTRY *table2 = dakuten_table;
3428 if (0x21 <= ch && ch <= 0x7E)
3443 for (
i = count1 - 1;
i >= 0; --
i)
3445 if (GET_HALF1(table1,
i) != ch)
3448 if (GET_HALF2(table1,
i) == 0)
3451 dst[
pos] = GET_FULL(table1,
i);
3455 if (
srclen <= 1 || GET_HALF2(table1,
i) !=
src[1])
3462 dst[
pos] = GET_FULL(table1,
i);
3470 for (
i = count2 - 1;
i >= 0; --
i)
3472 if (GET_SINGLE1(table2,
i) != ch)
3475 if (
srclen <= 1 || GET_SINGLE2(table2,
i) !=
src[1])
3482 dst[
pos] = GET_VOICED(table2,
i);
3526typedef struct tagWCHAR_PAIR
3529} WCHAR_PAIR, *PWCHAR_PAIR;
3532static const WCHAR_PAIR s_sim2tra[] =
3534#define DEFINE_SIM2TRA(from, to) { from, to },
3536#undef DEFINE_SIM2TRA
3540static const WCHAR_PAIR s_tra2sim[] =
3542#define DEFINE_TRA2SIM(from, to) { from, to },
3544#undef DEFINE_TRA2SIM
3548static int compare_wchar_pair(
const void *
x,
const void *
y)
3550 const WCHAR_PAIR *
a =
x;
3551 const WCHAR_PAIR *
b =
y;
3552 if (
a->from <
b->from)
3554 if (
a->from >
b->from)
3559static WCHAR find_wchar_pair(
const WCHAR_PAIR *pairs,
size_t count,
WCHAR ch)
3561 PWCHAR_PAIR found =
bsearch(&ch, pairs,
count,
sizeof(WCHAR_PAIR), compare_wchar_pair);
3680 flags &= ~LCMAP_LOWERCASE;
3686 flags &= ~LCMAP_UPPERCASE;
3754 if (!once++)
FIXME(
"unsupported lparam %Ix\n",
handle);
3765 TRACE(
"(%s,0x%08lx,%s,%d,%p,%d)\n",
3768 flags &= ~LOCALE_USE_CP_ACP;
3811 TRACE(
"(0x%04x,0x%08x,%s,%d,%p,%d)\n",
3839 INT ret = 0, srclenW, dstlenW;
3870 goto map_string_exit;
3877 goto map_string_exit;
3883 goto map_string_exit;
3888 goto map_string_exit;
3894 goto map_string_exit;
3927 INT ret = 0, srclenW = 0;
3943 goto FoldStringA_exit;
3959 goto FoldStringA_exit;
4046 if (
flags & ~(supported_flags|semistub_flags))
4052 if (
flags & semistub_flags)
4055 FIXME(
"semi-stub behavior for flag(s) 0x%x\n",
flags & semistub_flags);
4058 if (len1 < 0) len1 =
strlenW(str1);
4059 if (len2 < 0) len2 =
strlenW(str2);
4090 WCHAR *buf2W = buf1W + 130;
4092 INT len1W = 0, len2W = 0,
ret;
4100 if (len1 < 0) len1 =
strlen(str1);
4101 if (len2 < 0) len2 =
strlen(str2);
4159#if (WINVER >= 0x0600)
4172 if (len1 < 0) len1 =
strlenW(str1);
4173 if (len2 < 0) len2 =
strlenW(str2);
4202 if ((str1 ==
NULL) && (str2 ==
NULL))
return 0;
4203 if (str1 ==
NULL)
return -1;
4204 if (str2 ==
NULL)
return 1;
4231 if ((str1 ==
NULL) && (str2 ==
NULL))
return 0;
4232 if (str1 ==
NULL)
return -1;
4233 if (str2 ==
NULL)
return 1;
4250 if ((str1 ==
NULL) && (str2 ==
NULL))
return 0;
4251 if (str1 ==
NULL)
return -1;
4252 if (str2 ==
NULL)
return 1;
4269 if ((str1 ==
NULL) && (str2 ==
NULL))
return 0;
4270 if (str1 ==
NULL)
return -1;
4271 if (str2 ==
NULL)
return 1;
4284 extern void CDECL __wine_init_codepages(
const union cptable *ansi_cp,
const union cptable *oem_cp,
4287 UINT ansi_cp = 1252, oem_cp = 437, mac_cp = 10000,
unix_cp;
4293 if (!has_env(
"LANG"))
4295 const char* mac_locale = get_mac_locale();
4297 setenv(
"LANG", mac_locale, 1 );
4299 TRACE(
"setting LANG to '%s'\n", mac_locale );
4304 TRACE(
"Mac locale %s is not supported by the C library\n",
debugstr_a(mac_locale) );
4344 TRACE(
"ansi=%03d oem=%03d mac=%03d unix=%03d\n",
4392 info->NameLength > valueNameSize ||
4393 info->DataLength > valueDataSize)
4401 szValueName[
info->NameLength /
sizeof(
WCHAR)] =
'\0';
4403 szValueData[
info->DataLength /
sizeof(
WCHAR)] =
'\0';
4450 ULONG iResourceIndex = lgrpid & 0xf;
4454 for (
i = 0;
i < iResourceIndex;
i++)
4455 lpResEntry += *lpResEntry + 1;
4457 if (*lpResEntry < nameSize)
4460 szName[*lpResEntry] =
'\0';
4482 WCHAR szNumber[10], szValue[4];
4510 FIXME(
"NLS registry key not found. Please apply the default registry file 'wine.inf'\n");
4515 szValue,
sizeof(szValue) ))
4517 BOOL bInstalled = szValue[0] ==
'1';
4521 bInstalled ?
"" :
"not ");
4525 WCHAR szGrpName[48];
4528 szGrpName[0] =
'\0';
4531 bContinue = lpProcs->
procW( lgrpid, szNumber, szGrpName, lpProcs->
dwFlags,
4535 char szNumberA[
sizeof(szNumber)/
sizeof(
WCHAR)];
4536 char szGrpNameA[48];
4545 bContinue = lpProcs->
procA( lgrpid, szNumberA, szGrpNameA, lpProcs->
dwFlags,
4586 procs.
procA = pLangGrpEnumProc;
4607 procs.
procW = pLangGrpEnumProc;
4629 static const WCHAR szFormat[] = {
'%',
'x',
'\0' };
4630 WCHAR szValueName[16], szValue[2];
4642 sprintfW( szValueName, szFormat, lgrpid );
4648 if (szValue[0] ==
'1')
4678 static const WCHAR szAlternateSortsKeyName[] = {
4679 'A',
'l',
't',
'e',
'r',
'n',
'a',
't',
'e',
' ',
'S',
'o',
'r',
't',
's',
'\0'
4681 WCHAR szNumber[10], szValue[4];
4702 WARN(
"NLS registry key not found. Please apply the default registry file 'wine.inf'\n");
4707 szValue,
sizeof(szValue) ))
4712 lgrpid, lgrpid == lpProcs->
lgrpid ?
"" :
"not ");
4714 if (lgrpid == lpProcs->
lgrpid)
4726 bContinue = lpProcs->
procW( lgrpid,
lcid, szNumber, lpProcs->
lParam );
4729 char szNumberA[
sizeof(szNumber)/
sizeof(
WCHAR)];
4733 bContinue = lpProcs->
procA( lgrpid,
lcid, szNumberA, lpProcs->
lParam );
4844 static const WCHAR geoW[] = {
'G',
'e',
'o',0};
4845 static const WCHAR nationW[] = {
'N',
'a',
't',
'i',
'o',
'n',0};
4848 HANDLE hkey, hSubkey = 0;
4852 count =
sizeof(bufferW);
4866 FIXME(
"GEOCLASS_REGION not handled yet\n");
4871 if (hSubkey)
NtClose(hSubkey);
4880 static const WCHAR geoW[] = {
'G',
'e',
'o',0};
4881 static const WCHAR nationW[] = {
'N',
'a',
't',
'i',
'o',
'n',0};
4882 static const WCHAR formatW[] = {
'%',
'i',0};
4891 attr.RootDirectory = hkey;
4893 attr.Attributes = 0;
4895 attr.SecurityQualityOfService =
NULL;
4937 static const WCHAR formatW[] = {
'%',
'0',
'8',
'x',0};
4954 if(!pUILangEnumProc) {
4963 enum_uilang.
u.
procA = pUILangEnumProc;
4983 if(!pUILangEnumProc) {
4992 enum_uilang.
u.
procW = pUILangEnumProc;
5018 { 2, {
'A',
'G',0}, {
'A',
'T',
'G',0}, 10039880, 28 },
5019 { 3, {
'A',
'F',0}, {
'A',
'F',
'G',0}, 47614, 4 },
5020 { 4, {
'D',
'Z',0}, {
'D',
'Z',
'A',0}, 42487, 12 },
5021 { 5, {
'A',
'Z',0}, {
'A',
'Z',
'E',0}, 47611, 31 },
5022 { 6, {
'A',
'L',0}, {
'A',
'L',
'B',0}, 47610, 8 },
5023 { 7, {
'A',
'M',0}, {
'A',
'R',
'M',0}, 47611, 51 },
5024 { 8, {
'A',
'D',0}, {
'A',
'N',
'D',0}, 47610, 20 },
5025 { 9, {
'A',
'O',0}, {
'A',
'G',
'O',0}, 42484, 24 },
5026 { 10, {
'A',
'S',0}, {
'A',
'S',
'M',0}, 26286, 16 },
5027 { 11, {
'A',
'R',0}, {
'A',
'R',
'G',0}, 31396, 32 },
5028 { 12, {
'A',
'U',0}, {
'A',
'U',
'S',0}, 10210825, 36 },
5029 { 14, {
'A',
'T',0}, {
'A',
'U',
'T',0}, 10210824, 40 },
5030 { 17, {
'B',
'H',0}, {
'B',
'H',
'R',0}, 47611, 48 },
5031 { 18, {
'B',
'B',0}, {
'B',
'R',
'B',0}, 10039880, 52 },
5032 { 19, {
'B',
'W',0}, {
'B',
'W',
'A',0}, 10039883, 72 },
5033 { 20, {
'B',
'M',0}, {
'B',
'M',
'U',0}, 23581, 60 },
5034 { 21, {
'B',
'E',0}, {
'B',
'E',
'L',0}, 10210824, 56 },
5035 { 22, {
'B',
'S',0}, {
'B',
'H',
'S',0}, 10039880, 44 },
5036 { 23, {
'B',
'D',0}, {
'B',
'G',
'D',0}, 47614, 50 },
5037 { 24, {
'B',
'Z',0}, {
'B',
'L',
'Z',0}, 27082, 84 },
5038 { 25, {
'B',
'A',0}, {
'B',
'I',
'H',0}, 47610, 70 },
5039 { 26, {
'B',
'O',0}, {
'B',
'O',
'L',0}, 31396, 68 },
5040 { 27, {
'M',
'M',0}, {
'M',
'M',
'R',0}, 47599, 104 },
5041 { 28, {
'B',
'J',0}, {
'B',
'E',
'N',0}, 42483, 204 },
5042 { 29, {
'B',
'Y',0}, {
'B',
'L',
'R',0}, 47609, 112 },
5043 { 30, {
'S',
'B',0}, {
'S',
'L',
'B',0}, 20900, 90 },
5044 { 32, {
'B',
'R',0}, {
'B',
'R',
'A',0}, 31396, 76 },
5045 { 34, {
'B',
'T',0}, {
'B',
'T',
'N',0}, 47614, 64 },
5046 { 35, {
'B',
'G',0}, {
'B',
'G',
'R',0}, 47609, 100 },
5047 { 37, {
'B',
'N',0}, {
'B',
'R',
'N',0}, 47599, 96 },
5048 { 38, {
'B',
'I',0}, {
'B',
'D',
'I',0}, 47603, 108 },
5049 { 39, {
'C',
'A',0}, {
'C',
'A',
'N',0}, 23581, 124 },
5050 { 40, {
'K',
'H',0}, {
'K',
'H',
'M',0}, 47599, 116 },
5051 { 41, {
'T',
'D',0}, {
'T',
'C',
'D',0}, 42484, 148 },
5052 { 42, {
'L',
'K',0}, {
'L',
'K',
'A',0}, 47614, 144 },
5053 { 43, {
'C',
'G',0}, {
'C',
'O',
'G',0}, 42484, 178 },
5054 { 44, {
'C',
'D',0}, {
'C',
'O',
'D',0}, 42484, 180 },
5055 { 45, {
'C',
'N',0}, {
'C',
'H',
'N',0}, 47600, 156 },
5056 { 46, {
'C',
'L',0}, {
'C',
'H',
'L',0}, 31396, 152 },
5057 { 49, {
'C',
'M',0}, {
'C',
'M',
'R',0}, 42484, 120 },
5058 { 50, {
'K',
'M',0}, {
'C',
'O',
'M',0}, 47603, 174 },
5059 { 51, {
'C',
'O',0}, {
'C',
'O',
'L',0}, 31396, 170 },
5060 { 54, {
'C',
'R',0}, {
'C',
'R',
'I',0}, 27082, 188 },
5061 { 55, {
'C',
'F',0}, {
'C',
'A',
'F',0}, 42484, 140 },
5062 { 56, {
'C',
'U',0}, {
'C',
'U',
'B',0}, 10039880, 192 },
5063 { 57, {
'C',
'V',0}, {
'C',
'P',
'V',0}, 42483, 132 },
5064 { 59, {
'C',
'Y',0}, {
'C',
'Y',
'P',0}, 47611, 196 },
5065 { 61, {
'D',
'K',0}, {
'D',
'N',
'K',0}, 10039882, 208 },
5066 { 62, {
'D',
'J',0}, {
'D',
'J',
'I',0}, 47603, 262 },
5067 { 63, {
'D',
'M',0}, {
'D',
'M',
'A',0}, 10039880, 212 },
5068 { 65, {
'D',
'O',0}, {
'D',
'O',
'M',0}, 10039880, 214 },
5069 { 66, {
'E',
'C',0}, {
'E',
'C',
'U',0}, 31396, 218 },
5070 { 67, {
'E',
'G',0}, {
'E',
'G',
'Y',0}, 42487, 818 },
5071 { 68, {
'I',
'E',0}, {
'I',
'R',
'L',0}, 10039882, 372 },
5072 { 69, {
'G',
'Q',0}, {
'G',
'N',
'Q',0}, 42484, 226 },
5073 { 70, {
'E',
'E',0}, {
'E',
'S',
'T',0}, 10039882, 233 },
5074 { 71, {
'E',
'R',0}, {
'E',
'R',
'I',0}, 47603, 232 },
5075 { 72, {
'S',
'V',0}, {
'S',
'L',
'V',0}, 27082, 222 },
5076 { 73, {
'E',
'T',0}, {
'E',
'T',
'H',0}, 47603, 231 },
5077 { 75, {
'C',
'Z',0}, {
'C',
'Z',
'E',0}, 47609, 203 },
5078 { 77, {
'F',
'I',0}, {
'F',
'I',
'N',0}, 10039882, 246 },
5079 { 78, {
'F',
'J',0}, {
'F',
'J',
'I',0}, 20900, 242 },
5080 { 80, {
'F',
'M',0}, {
'F',
'S',
'M',0}, 21206, 583 },
5081 { 81, {
'F',
'O',0}, {
'F',
'R',
'O',0}, 10039882, 234 },
5082 { 84, {
'F',
'R',0}, {
'F',
'R',
'A',0}, 10210824, 250 },
5083 { 86, {
'G',
'M',0}, {
'G',
'M',
'B',0}, 42483, 270 },
5084 { 87, {
'G',
'A',0}, {
'G',
'A',
'B',0}, 42484, 266 },
5085 { 88, {
'G',
'E',0}, {
'G',
'E',
'O',0}, 47611, 268 },
5086 { 89, {
'G',
'H',0}, {
'G',
'H',
'A',0}, 42483, 288 },
5087 { 90, {
'G',
'I',0}, {
'G',
'I',
'B',0}, 47610, 292 },
5088 { 91, {
'G',
'D',0}, {
'G',
'R',
'D',0}, 10039880, 308 },
5089 { 93, {
'G',
'L',0}, {
'G',
'R',
'L',0}, 23581, 304 },
5090 { 94, {
'D',
'E',0}, {
'D',
'E',
'U',0}, 10210824, 276 },
5091 { 98, {
'G',
'R',0}, {
'G',
'R',
'C',0}, 47610, 300 },
5092 { 99, {
'G',
'T',0}, {
'G',
'T',
'M',0}, 27082, 320 },
5093 { 100, {
'G',
'N',0}, {
'G',
'I',
'N',0}, 42483, 324 },
5094 { 101, {
'G',
'Y',0}, {
'G',
'U',
'Y',0}, 31396, 328 },
5095 { 103, {
'H',
'T',0}, {
'H',
'T',
'I',0}, 10039880, 332 },
5096 { 104, {
'H',
'K',0}, {
'H',
'K',
'G',0}, 47600, 344 },
5097 { 106, {
'H',
'N',0}, {
'H',
'N',
'D',0}, 27082, 340 },
5098 { 108, {
'H',
'R',0}, {
'H',
'R',
'V',0}, 47610, 191 },
5099 { 109, {
'H',
'U',0}, {
'H',
'U',
'N',0}, 47609, 348 },
5100 { 110, {
'I',
'S',0}, {
'I',
'S',
'L',0}, 10039882, 352 },
5101 { 111, {
'I',
'D',0}, {
'I',
'D',
'N',0}, 47599, 360 },
5102 { 113, {
'I',
'N',0}, {
'I',
'N',
'D',0}, 47614, 356 },
5103 { 114, {
'I',
'O',0}, {
'I',
'O',
'T',0}, 39070, 86 },
5104 { 116, {
'I',
'R',0}, {
'I',
'R',
'N',0}, 47614, 364 },
5105 { 117, {
'I',
'L',0}, {
'I',
'S',
'R',0}, 47611, 376 },
5106 { 118, {
'I',
'T',0}, {
'I',
'T',
'A',0}, 47610, 380 },
5107 { 119, {
'C',
'I',0}, {
'C',
'I',
'V',0}, 42483, 384 },
5108 { 121, {
'I',
'Q',0}, {
'I',
'R',
'Q',0}, 47611, 368 },
5109 { 122, {
'J',
'P',0}, {
'J',
'P',
'N',0}, 47600, 392 },
5110 { 124, {
'J',
'M',0}, {
'J',
'A',
'M',0}, 10039880, 388 },
5111 { 125, {
'S',
'J',0}, {
'S',
'J',
'M',0}, 10039882, 744 },
5112 { 126, {
'J',
'O',0}, {
'J',
'O',
'R',0}, 47611, 400 },
5113 { 127, {
'X',
'X',0}, {
'X',
'X',0}, 161832256 },
5114 { 129, {
'K',
'E',0}, {
'K',
'E',
'N',0}, 47603, 404 },
5115 { 130, {
'K',
'G',0}, {
'K',
'G',
'Z',0}, 47590, 417 },
5116 { 131, {
'K',
'P',0}, {
'P',
'R',
'K',0}, 47600, 408 },
5117 { 133, {
'K',
'I',0}, {
'K',
'I',
'R',0}, 21206, 296 },
5118 { 134, {
'K',
'R',0}, {
'K',
'O',
'R',0}, 47600, 410 },
5119 { 136, {
'K',
'W',0}, {
'K',
'W',
'T',0}, 47611, 414 },
5120 { 137, {
'K',
'Z',0}, {
'K',
'A',
'Z',0}, 47590, 398 },
5121 { 138, {
'L',
'A',0}, {
'L',
'A',
'O',0}, 47599, 418 },
5122 { 139, {
'L',
'B',0}, {
'L',
'B',
'N',0}, 47611, 422 },
5123 { 140, {
'L',
'V',0}, {
'L',
'V',
'A',0}, 10039882, 428 },
5124 { 141, {
'L',
'T',0}, {
'L',
'T',
'U',0}, 10039882, 440 },
5125 { 142, {
'L',
'R',0}, {
'L',
'B',
'R',0}, 42483, 430 },
5126 { 143, {
'S',
'K',0}, {
'S',
'V',
'K',0}, 47609, 703 },
5127 { 145, {
'L',
'I',0}, {
'L',
'I',
'E',0}, 10210824, 438 },
5128 { 146, {
'L',
'S',0}, {
'L',
'S',
'O',0}, 10039883, 426 },
5129 { 147, {
'L',
'U',0}, {
'L',
'U',
'X',0}, 10210824, 442 },
5130 { 148, {
'L',
'Y',0}, {
'L',
'B',
'Y',0}, 42487, 434 },
5131 { 149, {
'M',
'G',0}, {
'M',
'D',
'G',0}, 47603, 450 },
5132 { 151, {
'M',
'O',0}, {
'M',
'A',
'C',0}, 47600, 446 },
5133 { 152, {
'M',
'D',0}, {
'M',
'D',
'A',0}, 47609, 498 },
5134 { 154, {
'M',
'N',0}, {
'M',
'N',
'G',0}, 47600, 496 },
5135 { 156, {
'M',
'W',0}, {
'M',
'W',
'I',0}, 47603, 454 },
5136 { 157, {
'M',
'L',0}, {
'M',
'L',
'I',0}, 42483, 466 },
5137 { 158, {
'M',
'C',0}, {
'M',
'C',
'O',0}, 10210824, 492 },
5138 { 159, {
'M',
'A',0}, {
'M',
'A',
'R',0}, 42487, 504 },
5139 { 160, {
'M',
'U',0}, {
'M',
'U',
'S',0}, 47603, 480 },
5140 { 162, {
'M',
'R',0}, {
'M',
'R',
'T',0}, 42483, 478 },
5141 { 163, {
'M',
'T',0}, {
'M',
'L',
'T',0}, 47610, 470 },
5142 { 164, {
'O',
'M',0}, {
'O',
'M',
'N',0}, 47611, 512 },
5143 { 165, {
'M',
'V',0}, {
'M',
'D',
'V',0}, 47614, 462 },
5144 { 166, {
'M',
'X',0}, {
'M',
'E',
'X',0}, 27082, 484 },
5145 { 167, {
'M',
'Y',0}, {
'M',
'Y',
'S',0}, 47599, 458 },
5146 { 168, {
'M',
'Z',0}, {
'M',
'O',
'Z',0}, 47603, 508 },
5147 { 173, {
'N',
'E',0}, {
'N',
'E',
'R',0}, 42483, 562 },
5148 { 174, {
'V',
'U',0}, {
'V',
'U',
'T',0}, 20900, 548 },
5149 { 175, {
'N',
'G',0}, {
'N',
'G',
'A',0}, 42483, 566 },
5150 { 176, {
'N',
'L',0}, {
'N',
'L',
'D',0}, 10210824, 528 },
5151 { 177, {
'N',
'O',0}, {
'N',
'O',
'R',0}, 10039882, 578 },
5152 { 178, {
'N',
'P',0}, {
'N',
'P',
'L',0}, 47614, 524 },
5153 { 180, {
'N',
'R',0}, {
'N',
'R',
'U',0}, 21206, 520 },
5154 { 181, {
'S',
'R',0}, {
'S',
'U',
'R',0}, 31396, 740 },
5155 { 182, {
'N',
'I',0}, {
'N',
'I',
'C',0}, 27082, 558 },
5156 { 183, {
'N',
'Z',0}, {
'N',
'Z',
'L',0}, 10210825, 554 },
5157 { 184, {
'P',
'S',0}, {
'P',
'S',
'E',0}, 47611, 275 },
5158 { 185, {
'P',
'Y',0}, {
'P',
'R',
'Y',0}, 31396, 600 },
5159 { 187, {
'P',
'E',0}, {
'P',
'E',
'R',0}, 31396, 604 },
5160 { 190, {
'P',
'K',0}, {
'P',
'A',
'K',0}, 47614, 586 },
5161 { 191, {
'P',
'L',0}, {
'P',
'O',
'L',0}, 47609, 616 },
5162 { 192, {
'P',
'A',0}, {
'P',
'A',
'N',0}, 27082, 591 },
5163 { 193, {
'P',
'T',0}, {
'P',
'R',
'T',0}, 47610, 620 },
5164 { 194, {
'P',
'G',0}, {
'P',
'N',
'G',0}, 20900, 598 },
5165 { 195, {
'P',
'W',0}, {
'P',
'L',
'W',0}, 21206, 585 },
5166 { 196, {
'G',
'W',0}, {
'G',
'N',
'B',0}, 42483, 624 },
5167 { 197, {
'Q',
'A',0}, {
'Q',
'A',
'T',0}, 47611, 634 },
5168 { 198, {
'R',
'E',0}, {
'R',
'E',
'U',0}, 47603, 638 },
5169 { 199, {
'M',
'H',0}, {
'M',
'H',
'L',0}, 21206, 584 },
5170 { 200, {
'R',
'O',0}, {
'R',
'O',
'U',0}, 47609, 642 },
5171 { 201, {
'P',
'H',0}, {
'P',
'H',
'L',0}, 47599, 608 },
5172 { 202, {
'P',
'R',0}, {
'P',
'R',
'I',0}, 10039880, 630 },
5173 { 203, {
'R',
'U',0}, {
'R',
'U',
'S',0}, 47609, 643 },
5174 { 204, {
'R',
'W',0}, {
'R',
'W',
'A',0}, 47603, 646 },
5175 { 205, {
'S',
'A',0}, {
'S',
'A',
'U',0}, 47611, 682 },
5176 { 206, {
'P',
'M',0}, {
'S',
'P',
'M',0}, 23581, 666 },
5177 { 207, {
'K',
'N',0}, {
'K',
'N',
'A',0}, 10039880, 659 },
5178 { 208, {
'S',
'C',0}, {
'S',
'Y',
'C',0}, 47603, 690 },
5179 { 209, {
'Z',
'A',0}, {
'Z',
'A',
'F',0}, 10039883, 710 },
5180 { 210, {
'S',
'N',0}, {
'S',
'E',
'N',0}, 42483, 686 },
5181 { 212, {
'S',
'I',0}, {
'S',
'V',
'N',0}, 47610, 705 },
5182 { 213, {
'S',
'L',0}, {
'S',
'L',
'E',0}, 42483, 694 },
5183 { 214, {
'S',
'M',0}, {
'S',
'M',
'R',0}, 47610, 674 },
5184 { 215, {
'S',
'G',0}, {
'S',
'G',
'P',0}, 47599, 702 },
5185 { 216, {
'S',
'O',0}, {
'S',
'O',
'M',0}, 47603, 706 },
5186 { 217, {
'E',
'S',0}, {
'E',
'S',
'P',0}, 47610, 724 },
5187 { 218, {
'L',
'C',0}, {
'L',
'C',
'A',0}, 10039880, 662 },
5188 { 219, {
'S',
'D',0}, {
'S',
'D',
'N',0}, 42487, 736 },
5189 { 220, {
'S',
'J',0}, {
'S',
'J',
'M',0}, 10039882, 744 },
5190 { 221, {
'S',
'E',0}, {
'S',
'W',
'E',0}, 10039882, 752 },
5191 { 222, {
'S',
'Y',0}, {
'S',
'Y',
'R',0}, 47611, 760 },
5192 { 223, {
'C',
'H',0}, {
'C',
'H',
'E',0}, 10210824, 756 },
5193 { 224, {
'A',
'E',0}, {
'A',
'R',
'E',0}, 47611, 784 },
5194 { 225, {
'T',
'T',0}, {
'T',
'T',
'O',0}, 10039880, 780 },
5195 { 227, {
'T',
'H',0}, {
'T',
'H',
'A',0}, 47599, 764 },
5196 { 228, {
'T',
'J',0}, {
'T',
'J',
'K',0}, 47590, 762 },
5197 { 231, {
'T',
'O',0}, {
'T',
'O',
'N',0}, 26286, 776 },
5198 { 232, {
'T',
'G',0}, {
'T',
'G',
'O',0}, 42483, 768 },
5199 { 233, {
'S',
'T',0}, {
'S',
'T',
'P',0}, 42484, 678 },
5200 { 234, {
'T',
'N',0}, {
'T',
'U',
'N',0}, 42487, 788 },
5201 { 235, {
'T',
'R',0}, {
'T',
'U',
'R',0}, 47611, 792 },
5202 { 236, {
'T',
'V',0}, {
'T',
'U',
'V',0}, 26286, 798 },
5203 { 237, {
'T',
'W',0}, {
'T',
'W',
'N',0}, 47600, 158 },
5204 { 238, {
'T',
'M',0}, {
'T',
'K',
'M',0}, 47590, 795 },
5205 { 239, {
'T',
'Z',0}, {
'T',
'Z',
'A',0}, 47603, 834 },
5206 { 240, {
'U',
'G',0}, {
'U',
'G',
'A',0}, 47603, 800 },
5207 { 241, {
'U',
'A',0}, {
'U',
'K',
'R',0}, 47609, 804 },
5208 { 242, {
'G',
'B',0}, {
'G',
'B',
'R',0}, 10039882, 826 },
5209 { 244, {
'U',
'S',0}, {
'U',
'S',
'A',0}, 23581, 840 },
5210 { 245, {
'B',
'F',0}, {
'B',
'F',
'A',0}, 42483, 854 },
5211 { 246, {
'U',
'Y',0}, {
'U',
'R',
'Y',0}, 31396, 858 },
5212 { 247, {
'U',
'Z',0}, {
'U',
'Z',
'B',0}, 47590, 860 },
5213 { 248, {
'V',
'C',0}, {
'V',
'C',
'T',0}, 10039880, 670 },
5214 { 249, {
'V',
'E',0}, {
'V',
'E',
'N',0}, 31396, 862 },
5215 { 251, {
'V',
'N',0}, {
'V',
'N',
'M',0}, 47599, 704 },
5216 { 252, {
'V',
'I',0}, {
'V',
'I',
'R',0}, 10039880, 850 },
5217 { 253, {
'V',
'A',0}, {
'V',
'A',
'T',0}, 47610, 336 },
5218 { 254, {
'N',
'A',0}, {
'N',
'A',
'M',0}, 10039883, 516 },
5219 { 257, {
'E',
'H',0}, {
'E',
'S',
'H',0}, 42487, 732 },
5220 { 258, {
'X',
'X',0}, {
'X',
'X',0}, 161832256 },
5221 { 259, {
'W',
'S',0}, {
'W',
'S',
'M',0}, 26286, 882 },
5222 { 260, {
'S',
'Z',0}, {
'S',
'W',
'Z',0}, 10039883, 748 },
5223 { 261, {
'Y',
'E',0}, {
'Y',
'E',
'M',0}, 47611, 887 },
5224 { 263, {
'Z',
'M',0}, {
'Z',
'M',
'B',0}, 47603, 894 },
5225 { 264, {
'Z',
'W',0}, {
'Z',
'W',
'E',0}, 47603, 716 },
5226 { 269, {
'C',
'S',0}, {
'S',
'C',
'G',0}, 47610, 891 },
5227 { 270, {
'M',
'E',0}, {
'M',
'N',
'E',0}, 47610, 499 },
5228 { 271, {
'R',
'S',0}, {
'S',
'R',
'B',0}, 47610, 688 },
5229 { 273, {
'C',
'W',0}, {
'C',
'U',
'W',0}, 10039880, 531 },
5230 { 276, {
'S',
'S',0}, {
'S',
'S',
'D',0}, 42487, 728 },
5231 { 300, {
'A',
'I',0}, {
'A',
'I',
'A',0}, 10039880, 660 },
5232 { 301, {
'A',
'Q',0}, {
'A',
'T',
'A',0}, 39070, 10 },
5233 { 302, {
'A',
'W',0}, {
'A',
'B',
'W',0}, 10039880, 533 },
5234 { 303, {
'X',
'X',0}, {
'X',
'X',0}, 39070 },
5235 { 304, {
'X',
'X',0}, {
'X',
'X',0}, 10210825 },
5236 { 305, {
'X',
'X',0}, {
'X',
'X',0}, 161832256 },
5237 { 306, {
'B',
'V',0}, {
'B',
'V',
'T',0}, 39070, 74 },
5238 { 307, {
'K',
'Y',0}, {
'C',
'Y',
'M',0}, 10039880, 136 },
5239 { 308, {
'X',
'X',0}, {
'X',
'X',0}, 10210824, 0,
LOCATION_BOTH },
5240 { 309, {
'C',
'X',0}, {
'C',
'X',
'R',0}, 12, 162 },
5241 { 310, {
'X',
'X',0}, {
'X',
'X',0}, 27114 },
5242 { 311, {
'C',
'C',0}, {
'C',
'C',
'K',0}, 10210825, 166 },
5243 { 312, {
'C',
'K',0}, {
'C',
'O',
'K',0}, 26286, 184 },
5244 { 313, {
'X',
'X',0}, {
'X',
'X',0}, 10210825 },
5245 { 314, {
'X',
'X',0}, {
'X',
'X',0}, 114 },
5246 { 315, {
'F',
'K',0}, {
'F',
'L',
'K',0}, 31396, 238 },
5247 { 317, {
'G',
'F',0}, {
'G',
'U',
'F',0}, 31396, 254 },
5248 { 318, {
'P',
'F',0}, {
'P',
'Y',
'F',0}, 26286, 258 },
5249 { 319, {
'T',
'F',0}, {
'A',
'T',
'F',0}, 39070, 260 },
5250 { 321, {
'G',
'P',0}, {
'G',
'L',
'P',0}, 10039880, 312 },
5251 { 322, {
'G',
'U',0}, {
'G',
'U',
'M',0}, 21206, 316 },
5252 { 323, {
'X',
'X',0}, {
'X',
'X',0}, 39070 },
5253 { 324, {
'G',
'G',0}, {
'G',
'G',
'Y',0}, 308, 831 },
5254 { 325, {
'H',
'M',0}, {
'H',
'M',
'D',0}, 39070, 334 },
5255 { 326, {
'X',
'X',0}, {
'X',
'X',0}, 161832256 },
5256 { 327, {
'X',
'X',0}, {
'X',
'X',0}, 161832256 },
5257 { 328, {
'J',
'E',0}, {
'J',
'E',
'Y',0}, 308, 832 },
5258 { 329, {
'X',
'X',0}, {
'X',
'X',0}, 161832256 },
5259 { 330, {
'M',
'Q',0}, {
'M',
'T',
'Q',0}, 10039880, 474 },
5260 { 331, {
'Y',
'T',0}, {
'M',
'Y',
'T',0}, 47603, 175 },
5261 { 332, {
'M',
'S',0}, {
'M',
'S',
'R',0}, 10039880, 500 },
5262 { 333, {
'A',
'N',0}, {
'A',
'N',
'T',0}, 10039880, 530,
LOCATION_BOTH },
5263 { 334, {
'N',
'C',0}, {
'N',
'C',
'L',0}, 20900, 540 },
5264 { 335, {
'N',
'U',0}, {
'N',
'I',
'U',0}, 26286, 570 },
5265 { 336, {
'N',
'F',0}, {
'N',
'F',
'K',0}, 10210825, 574 },
5266 { 337, {
'M',
'P',0}, {
'M',
'N',
'P',0}, 21206, 580 },
5267 { 338, {
'X',
'X',0}, {
'X',
'X',0}, 161832256 },
5268 { 339, {
'P',
'N',0}, {
'P',
'C',
'N',0}, 26286, 612 },
5269 { 340, {
'X',
'X',0}, {
'X',
'X',0}, 337 },
5270 { 341, {
'X',
'X',0}, {
'X',
'X',0}, 337 },
5271 { 342, {
'G',
'S',0}, {
'S',
'G',
'S',0}, 39070, 239 },
5272 { 343, {
'S',
'H',0}, {
'S',
'H',
'N',0}, 42483, 654 },
5273 { 346, {
'X',
'X',0}, {
'X',
'X',0}, 337 },
5274 { 347, {
'T',
'K',0}, {
'T',
'K',
'L',0}, 26286, 772 },
5275 { 348, {
'X',
'X',0}, {
'X',
'X',0}, 39070 },
5276 { 349, {
'T',
'C',0}, {
'T',
'C',
'A',0}, 10039880, 796 },
5277 { 351, {
'V',
'G',0}, {
'V',
'G',
'B',0}, 10039880, 92 },
5278 { 352, {
'W',
'F',0}, {
'W',
'L',
'F',0}, 26286, 876 },
5279 { 742, {
'X',
'X',0}, {
'X',
'X',0}, 39070, 0,
LOCATION_REGION },
5280 { 2129, {
'X',
'X',0}, {
'X',
'X',0}, 39070, 0,
LOCATION_REGION },
5281 { 10541, {
'X',
'X',0}, {
'X',
'X',0}, 39070, 0,
LOCATION_REGION },
5282 { 15126, {
'I',
'M',0}, {
'I',
'M',
'N',0}, 10039882, 833 },
5283 { 19618, {
'M',
'K',0}, {
'M',
'K',
'D',0}, 47610, 807 },
5284 { 20900, {
'X',
'X',0}, {
'X',
'X',0}, 27114, 0,
LOCATION_REGION },
5285 { 21206, {
'X',
'X',0}, {
'X',
'X',0}, 27114, 0,
LOCATION_REGION },
5286 { 21242, {
'X',
'X',0}, {
'X',
'X',0}, 161832256 },
5287 { 23581, {
'X',
'X',0}, {
'X',
'X',0}, 10026358, 0,
LOCATION_REGION },
5288 { 26286, {
'X',
'X',0}, {
'X',
'X',0}, 27114, 0,
LOCATION_REGION },
5289 { 27082, {
'X',
'X',0}, {
'X',
'X',0}, 161832257, 0,
LOCATION_REGION },
5290 { 27114, {
'X',
'X',0}, {
'X',
'X',0}, 39070, 0,
LOCATION_REGION },
5291 { 30967, {
'S',
'X',0}, {
'S',
'X',
'M',0}, 10039880, 534 },
5292 { 31396, {
'X',
'X',0}, {
'X',
'X',0}, 161832257, 0,
LOCATION_REGION },
5293 { 31706, {
'M',
'F',0}, {
'M',
'A',
'F',0}, 10039880, 663 },
5294 { 39070, {
'X',
'X',0}, {
'X',
'X',0}, 39070, 0,
LOCATION_REGION },
5295 { 42483, {
'X',
'X',0}, {
'X',
'X',0}, 742, 0,
LOCATION_REGION },
5296 { 42484, {
'X',
'X',0}, {
'X',
'X',0}, 742, 0,
LOCATION_REGION },
5297 { 42487, {
'X',
'X',0}, {
'X',
'X',0}, 742, 0,
LOCATION_REGION },
5298 { 47590, {
'X',
'X',0}, {
'X',
'X',0}, 2129, 0,
LOCATION_REGION },
5299 { 47599, {
'X',
'X',0}, {
'X',
'X',0}, 2129, 0,
LOCATION_REGION },
5300 { 47600, {
'X',
'X',0}, {
'X',
'X',0}, 2129, 0,
LOCATION_REGION },
5301 { 47603, {
'X',
'X',0}, {
'X',
'X',0}, 742, 0,
LOCATION_REGION },
5302 { 47609, {
'X',
'X',0}, {
'X',
'X',0}, 10541, 0,
LOCATION_REGION },
5303 { 47610, {
'X',
'X',0}, {
'X',
'X',0}, 10541, 0,
LOCATION_REGION },
5304 { 47611, {
'X',
'X',0}, {
'X',
'X',0}, 2129, 0,
LOCATION_REGION },
5305 { 47614, {
'X',
'X',0}, {
'X',
'X',0}, 2129, 0,
LOCATION_REGION },
5306 { 7299303, {
'T',
'L',0}, {
'T',
'L',
'S',0}, 47599, 626 },
5307 { 10026358, {
'X',
'X',0}, {
'X',
'X',0}, 39070, 0,
LOCATION_REGION },
5308 { 10028789, {
'A',
'X',0}, {
'A',
'L',
'A',0}, 10039882, 248 },
5309 { 10039880, {
'X',
'X',0}, {
'X',
'X',0}, 161832257, 0,
LOCATION_REGION },
5310 { 10039882, {
'X',
'X',0}, {
'X',
'X',0}, 10541, 0,
LOCATION_REGION },
5311 { 10039883, {
'X',
'X',0}, {
'X',
'X',0}, 742, 0,
LOCATION_REGION },
5312 { 10210824, {
'X',
'X',0}, {
'X',
'X',0}, 10541, 0,
LOCATION_REGION },
5313 { 10210825, {
'X',
'X',0}, {
'X',
'X',0}, 27114, 0,
LOCATION_REGION },
5314 { 161832015, {
'B',
'L',0}, {
'B',
'L',
'M',0}, 10039880, 652 },
5315 { 161832256, {
'U',
'M',0}, {
'U',
'M',
'I',0}, 27114, 581 },
5316 { 161832257, {
'X',
'X',0}, {
'X',
'X',0}, 10026358, 0,
LOCATION_REGION },
5326} ENUMSYSTEMCODEPAGES_CALLBACKS;
5329static BOOL NLS_EnumSystemCodePages(ENUMSYSTEMCODEPAGES_CALLBACKS *lpProcs)
5342 switch (lpProcs->dwFlags)
5352 hKey =
NLS_RegOpenKey(0,
L"\\Registry\\Machine\\SYSTEM\\CurrentControlSet\\Control\\NLS\\CodePage");
5355 WARN(
"NLS_RegOpenKey() failed\n");
5362 szValue,
sizeof(szValue)))
5369 bContinue = lpProcs->procW(szNumber);
5373 char szNumberA[
sizeof(szNumber)/
sizeof(
WCHAR)];
5376 bContinue = lpProcs->procA(szNumberA);
5382 }
else bContinue =
FALSE;
5404 ENUMSYSTEMCODEPAGES_CALLBACKS procs;
5409 procs.procW = lpCodePageEnumProc;
5412 return NLS_EnumSystemCodePages(lpCodePageEnumProc ? &procs :
NULL);
5426 ENUMSYSTEMCODEPAGES_CALLBACKS procs;
5430 procs.procA = lpCodePageEnumProc;
5434 return NLS_EnumSystemCodePages(lpCodePageEnumProc ? &procs :
NULL);
5442NLS_GetGeoFriendlyName(
GEOID Location,
LPWSTR szFriendlyName,
int cchData)
5461 return strlenW(szFriendlyName) + 1;
5479 if (geoid ==
ptr->id)
5483 if (
ptr->id > geoid)
5503 TRACE(
"%d %d %p %d %d\n", geoid, geotype,
data, data_len,
lang);
5514 return NLS_GetGeoFriendlyName(geoid,
data, data_len,
lang);
5516 return NLS_GetGeoFriendlyName(geoid,
data, data_len);
5541 FIXME(
"type %d is not supported\n", geotype);
5545 WARN(
"unrecognized type %d\n", geotype);
5551 static const WCHAR fmtW[] = {
'%',
'd',0};
5557 if (!
data || !data_len)
5563 return data_len <
len ? 0 :
len;
5574 TRACE(
"%d %d %p %d %d\n", geoid, geotype,
data, data_len,
lang);
5586 if (!
data || !data_len) {
5596 return data_len <
len ? 0 :
len;
5617 TRACE(
"(%d, %d, %p)\n", geoclass,
parent, enumproc);
5641 if (!enumproc(
ptr->id))
5653 TRACE(
"%p, %d\n", localename, buffersize);
5665 FIXME(
"%x %p %d %p %d\n", NormForm, lpSrcString, cwSrcLength, lpDstString, cwDstLength);
5675 FIXME(
"%x %p %d\n", NormForm, lpString, cwLength);
5694 delta /= (firsttime ?
DAMP : 2);
5695 delta += delta/numpoints;
5707 LPWSTR lpASCIICharStr,
INT cchASCIIChar)
5709 static const WCHAR prefixW[] = {
'x',
'n',
'-',
'-'};
5712 INT i, label_start, label_end, norm_len, out_label,
out = 0;
5714 TRACE(
"%x %p %d %p %d\n",
dwFlags, lpUnicodeCharStr, cchUnicodeChar,
5715 lpASCIICharStr, cchASCIIChar);
5726 cchUnicodeChar, norm_str, norm_len);
5732 for(label_start=0; label_start<norm_len;) {
5734 INT delta = 0,
b = 0,
h;
5737 for(
i=label_start;
i<norm_len && norm_str[
i]!=
'.' &&
5738 norm_str[
i]!=0x3002 && norm_str[
i]!=
'\0';
i++)
5739 if(norm_str[
i] < 0x80)
5743 if(
b == label_end-label_start) {
5744 if(label_end < norm_len)
5746 if(!lpASCIICharStr) {
5748 }
else if(
out+
b <= cchASCIIChar) {
5756 label_start = label_end+1;
5760 if(!lpASCIICharStr) {
5762 }
else if(
out+5+
b <= cchASCIIChar) {
5763 memcpy(lpASCIICharStr+
out, prefixW,
sizeof(prefixW));
5765 for(
i=label_start;
i<label_end;
i++)
5766 if(norm_str[
i] < 0x80)
5767 lpASCIICharStr[
out++] = norm_str[
i];
5768 lpASCIICharStr[
out++] =
'-';
5777 for(
h=
b;
h<label_end-label_start;) {
5780 for(
i=label_start;
i<label_end;
i++) {
5781 if(norm_str[
i]>=
n &&
m>norm_str[
i])
5784 delta += (
m-
n)*(
h+1);
5787 for(
i=label_start;
i<label_end;
i++) {
5788 if(norm_str[
i] <
n) {
5790 }
else if(norm_str[
i] ==
n) {
5794 if(!lpASCIICharStr) {
5796 }
else if(
out+1 <= cchASCIIChar) {
5797 lpASCIICharStr[
out++] = disp<=
'z'-
'a' ?
5798 'a'+disp :
'0'+disp-
'z'+
'a'-1;
5817 if(
out-out_label > 63) {
5823 if(label_end < norm_len) {
5824 if(!lpASCIICharStr) {
5826 }
else if(
out+1 <= cchASCIIChar) {
5827 lpASCIICharStr[
out++] = norm_str[label_end] ?
'.' : 0;
5834 label_start = label_end+1;
5845 LPWSTR lpNameprepCharStr,
INT cchNameprepChar)
5858 WCHAR buf[64], *map_str, norm_str[64], ch;
5859 DWORD i, map_len, norm_len,
mask, label_start, label_end,
out = 0;
5860 BOOL have_bidi_ral, prohibit_bidi_ral, ascii_only;
5862 TRACE(
"%x %p %d %p %d\n",
dwFlags, lpUnicodeCharStr, cchUnicodeChar,
5863 lpNameprepCharStr, cchNameprepChar);
5865 if(
dwFlags & ~(IDN_ALLOW_UNASSIGNED|IDN_USE_STD3_ASCII_RULES)) {
5870 if(!lpUnicodeCharStr || cchUnicodeChar<-1) {
5875 if(cchUnicodeChar == -1)
5876 cchUnicodeChar =
strlenW(lpUnicodeCharStr)+1;
5877 if(!cchUnicodeChar || (cchUnicodeChar==1 && lpUnicodeCharStr[0]==0)) {
5882 for(label_start=0; label_start<cchUnicodeChar;) {
5884 for(
i=label_start;
i<cchUnicodeChar;
i++) {
5885 ch = lpUnicodeCharStr[
i];
5887 if(
i!=cchUnicodeChar-1 && !ch) {
5892 if(!ch || ch==
'.' || ch==0x3002 || ch==0xff0e || ch==0xff61)
5900 if((
dwFlags&IDN_USE_STD3_ASCII_RULES) == 0)
5902 if((ch>=
'a' && ch<=
'z') || (ch>=
'A' && ch<=
'Z')
5903 || (ch>=
'0' && ch<=
'9') || ch==
'-')
5911 if(label_start==label_end && ch) {
5916 if((
dwFlags&IDN_USE_STD3_ASCII_RULES) && (lpUnicodeCharStr[label_start]==
'-' ||
5917 lpUnicodeCharStr[label_end-1]==
'-')) {
5924 if(label_end-label_start > 63) {
5928 if(label_end < cchUnicodeChar)
5931 if(!lpNameprepCharStr) {
5932 out += label_end-label_start;
5933 }
else if(
out+label_end-label_start <= cchNameprepChar) {
5934 memcpy(lpNameprepCharStr+
out, lpUnicodeCharStr+label_start,
5935 (label_end-label_start)*
sizeof(
WCHAR));
5936 if(lpUnicodeCharStr[label_end-1] > 0x7f)
5937 lpNameprepCharStr[
out+label_end-label_start-1] =
'.';
5938 out += label_end-label_start;
5944 label_start = label_end;
5949 for(
i=label_start;
i<label_end;
i++) {
5950 ch = lpUnicodeCharStr[
i];
5954 if(!
ptr[0]) map_len++;
5955 else if(!
ptr[1]) map_len++;
5956 else if(!
ptr[2]) map_len += 2;
5957 else if(
ptr[0]!=0xffff ||
ptr[1]!=0xffff ||
ptr[2]!=0xffff) map_len += 3;
5959 if(map_len*
sizeof(
WCHAR) >
sizeof(
buf)) {
5969 for(
i=label_start;
i<label_end;
i++) {
5970 ch = lpUnicodeCharStr[
i];
5975 map_str[map_len++] = ch;
5977 map_str[map_len++] =
ptr[0];
5979 map_str[map_len++] =
ptr[0];
5980 map_str[map_len++] =
ptr[1];
5981 }
else if(
ptr[0]!=0xffff ||
ptr[1]!=0xffff ||
ptr[2]!=0xffff) {
5982 map_str[map_len++] =
ptr[0];
5983 map_str[map_len++] =
ptr[1];
5984 map_str[map_len++] =
ptr[2];
5989 norm_str,
sizeof(norm_str)/
sizeof(
WCHAR)-1);
5998 if(label_end < cchUnicodeChar) {
5999 norm_str[norm_len++] = lpUnicodeCharStr[label_end] ?
'.' : 0;
6003 if(!lpNameprepCharStr) {
6005 }
else if(
out+norm_len <= cchNameprepChar) {
6013 have_bidi_ral = prohibit_bidi_ral =
FALSE;
6015 if((
dwFlags&IDN_ALLOW_UNASSIGNED) == 0)
6017 for(
i=0;
i<norm_len;
i++) {
6027 if(
flags & BIDI_RAL)
6028 have_bidi_ral =
TRUE;
6030 prohibit_bidi_ral =
TRUE;
6036 if((
flags & BIDI_RAL) == 0)
6037 prohibit_bidi_ral =
TRUE;
6039 ch = norm_str[norm_len-1];
6041 if((
flags & BIDI_RAL) == 0)
6042 prohibit_bidi_ral =
TRUE;
6045 if(have_bidi_ral && prohibit_bidi_ral) {
6050 label_start = label_end;
6060 LPWSTR lpUnicodeCharStr,
INT cchUnicodeChar)
6064 INT i, label_start, label_end, out_label,
out = 0;
6067 TRACE(
"%x %p %d %p %d\n",
dwFlags, lpASCIICharStr, cchASCIIChar,
6068 lpUnicodeCharStr, cchUnicodeChar);
6070 for(label_start=0; label_start<cchASCIIChar;) {
6074 for(
i=label_start;
i<cchASCIIChar;
i++) {
6075 ch = lpASCIICharStr[
i];
6077 if(ch>0x7f || (
i!=cchASCIIChar-1 && !ch)) {
6087 if((
dwFlags&IDN_USE_STD3_ASCII_RULES) == 0)
6089 if((ch>=
'a' && ch<=
'z') || (ch>=
'A' && ch<=
'Z')
6090 || (ch>=
'0' && ch<=
'9') || ch==
'-')
6098 if(label_start==label_end && ch) {
6103 if((
dwFlags&IDN_USE_STD3_ASCII_RULES) && (lpASCIICharStr[label_start]==
'-' ||
6104 lpASCIICharStr[label_end-1]==
'-')) {
6108 if(label_end-label_start > 63) {
6113 if(label_end-label_start<4 ||
6114 tolowerW(lpASCIICharStr[label_start])!=
'x' ||
6115 tolowerW(lpASCIICharStr[label_start+1])!=
'n' ||
6116 lpASCIICharStr[label_start+2]!=
'-' || lpASCIICharStr[label_start+3]!=
'-') {
6117 if(label_end < cchASCIIChar)
6120 if(!lpUnicodeCharStr) {
6121 out += label_end-label_start;
6122 }
else if(
out+label_end-label_start <= cchUnicodeChar) {
6123 memcpy(lpUnicodeCharStr+
out, lpASCIICharStr+label_start,
6124 (label_end-label_start)*
sizeof(
WCHAR));
6125 out += label_end-label_start;
6131 label_start = label_end;
6135 if(delim == label_start+3)
6137 if(!lpUnicodeCharStr) {
6138 out += delim-label_start-4;
6139 }
else if(
out+delim-label_start-4 <= cchUnicodeChar) {
6140 memcpy(lpUnicodeCharStr+
out, lpASCIICharStr+label_start+4,
6141 (delim-label_start-4)*
sizeof(
WCHAR));
6142 out += delim-label_start-4;
6147 if(
out != out_label)
6150 for(
i=delim;
i<label_end;) {
6154 ch =
i<label_end ?
tolowerW(lpASCIICharStr[
i++]) : 0;
6155 if((ch<
'a' || ch>
'z') && (ch<
'0' || ch>
'9')) {
6159 digit = ch<=
'9' ? ch-
'0'+
'z'-
'a'+1 : ch-
'a';
6170 if((
dwFlags&IDN_ALLOW_UNASSIGNED)==0 &&
6175 if(!lpUnicodeCharStr) {
6177 }
else if(
out+1 <= cchASCIIChar) {
6179 lpUnicodeCharStr+out_label+
pos,
6181 lpUnicodeCharStr[out_label+
pos] =
n;
6190 if(
out-out_label > 63) {
6195 if(label_end < cchASCIIChar) {
6196 if(!lpUnicodeCharStr) {
6198 }
else if(
out+1 <= cchUnicodeChar) {
6199 lpUnicodeCharStr[
out++] = lpASCIICharStr[label_end];
6205 label_start = label_end+1;
6220 debugstr_w(language), languagelen, muipath, muipathlen, enumerator);
static BOOL CALLBACK enum_locale_ex_proc(HMODULE module, LPCWSTR type, LPCWSTR name, WORD lang, LONG_PTR lparam)
BOOL WINAPI EnumSystemLocalesEx(LOCALE_ENUMPROCEX proc, DWORD flags, LPARAM lparam, LPVOID reserved)
INT WINAPI GetLocaleInfoEx(LPCWSTR locale, LCTYPE info, LPWSTR buffer, INT len)
int WINAPI LCIDToLocaleName(_In_ LCID Locale, _Out_writes_opt_(cchName) LPWSTR lpName, _In_ int cchName, _In_ DWORD dwFlags)
static BOOL CALLBACK find_locale_id_callback(_In_ HMODULE hModule, _In_ LPCWSTR type, _In_ LPCWSTR name, _In_ LANGID lang, _In_ LPARAM lParam)
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[]
LCID WINAPI LocaleNameToLCID(_In_ LPCWSTR lpName, _In_ DWORD dwFlags)
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 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)
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
static int map_to_fullwidth(const USHORT *table, const WCHAR *src, int srclen, WCHAR *dst, int dstlen)
static int map_remove_ignored(DWORD flags, const WCHAR *src, int srclen, WCHAR *dst, int dstlen)
static int map_to_halfwidth(const USHORT *table, const WCHAR *src, int srclen, WCHAR *dst, int dstlen)
static void map_byterev(const WCHAR *src, int len, WCHAR *dst)
static int lcmap_string(const struct sortguid *sortid, DWORD flags, const WCHAR *src, int srclen, WCHAR *dst, int dstlen)
INT WINAPI DECLSPEC_HOTPATCH CompareStringOrdinal(const WCHAR *str1, INT len1, const WCHAR *str2, INT len2, BOOL ignore_case)
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
GLint GLint GLint GLint GLint x
GLuint GLuint GLsizei count
GLuint GLuint GLsizei GLenum type
GLint GLint GLint GLint GLint GLint y
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)
_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)
#define MAKEINTRESOURCE(i)
static const WCHAR szName[]
#define strncmpiW(s1, s2, n)
#define strtoulW(s1, s2, b)
#define strpbrkW(str, accept)
_Check_return_ char *__cdecl getenv(_In_z_ const char *_VarName)
#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::@511 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[]
wchar_t tm const _CrtWcstime_Writes_and_advances_ptr_ count wchar_t ** out
_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)
enum _NORM_FORM NORM_FORM
#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
_In_ DWORD _In_ int _In_ int cchDest
#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)