ReactOS 0.4.15-dev-5666-gc548b97
lang.c File Reference
#include <k32.h>
#include <debug.h>
#include "lcformat_private.h"
Include dependency graph for lang.c:

Go to the source code of this file.

Classes

struct  locale_name
 
struct  registry_value
 
struct  enum_locale_ex_data
 
struct  ENUMLANGUAGEGROUP_CALLBACKS
 
struct  ENUMLANGUAGEGROUPLOCALE_CALLBACKS
 
struct  geoinfo_t
 
struct  ENUMSYSTEMCODEPAGES_CALLBACKS
 
struct  ENUM_UILANG_CALLBACK
 

Macros

#define NDEBUG
 
#define REG_SZ   1
 
#define NLSRC_OFFSET   5000 /* FIXME */
 
#define LOCALE_LOCALEINFOFLAGSMASK
 

Enumerations

enum  locationkind { LOCATION_NATION = 0 , LOCATION_REGION , LOCATION_BOTH }
 

Functions

 DEBUG_CHANNEL (nls)
 
int wine_fold_string (int flags, const WCHAR *src, int srclen, WCHAR *dst, int dstlen)
 
int wine_get_sortkey (int flags, const WCHAR *src, int srclen, char *dst, int dstlen)
 
int wine_compare_string (int flags, const WCHAR *str1, int len1, const WCHAR *str2, int len2)
 
UINT GetLocalisedText (IN UINT uID, IN LPWSTR lpszDest, IN UINT cchDest)
 
static void strcpynAtoW (WCHAR *dst, const char *src, size_t n)
 
static UINT get_lcid_codepage (LCID lcid)
 
static LCID convert_default_lcid (LCID lcid, LCTYPE lctype)
 
static BOOL is_genitive_name_supported (LCTYPE lctype)
 
static HANDLE create_registry_key (void)
 
LANGID WINAPI GetUserDefaultLangID (void)
 
LANGID WINAPI GetSystemDefaultLangID (void)
 
LCID WINAPI GetUserDefaultLCID (void)
 
LCID WINAPI GetSystemDefaultLCID (void)
 
LANGID WINAPI GetUserDefaultUILanguage (void)
 
LANGID WINAPI GetSystemDefaultUILanguage (void)
 
static INT get_registry_locale_info (struct registry_value *registry_value, LPWSTR buffer, INT len)
 
INT WINAPI GetLocaleInfoA (LCID lcid, LCTYPE lctype, LPSTR buffer, INT len)
 
static int get_value_base_by_lctype (LCTYPE lctype)
 
static struct registry_valueget_locale_registry_value (DWORD lctype)
 
INT WINAPI GetLocaleInfoW (LCID lcid, LCTYPE lctype, LPWSTR buffer, INT len)
 
BOOL WINAPI SetLocaleInfoA (LCID lcid, LCTYPE lctype, LPCSTR data)
 
BOOL WINAPI SetLocaleInfoW (LCID lcid, LCTYPE lctype, LPCWSTR data)
 
LCID WINAPI GetThreadLocale (void)
 
BOOL WINAPI SetThreadLocale (LCID lcid)
 
LCID WINAPI ConvertDefaultLocale (LCID lcid)
 
BOOL WINAPI IsValidLocale (LCID lcid, DWORD flags)
 
static BOOL CALLBACK enum_lang_proc_a (HMODULE hModule, LPCSTR type, LPCSTR name, WORD LangID, LONG_PTR lParam)
 
static BOOL CALLBACK enum_lang_proc_w (HMODULE hModule, LPCWSTR type, LPCWSTR name, WORD LangID, LONG_PTR lParam)
 
BOOL WINAPI EnumSystemLocalesA (LOCALE_ENUMPROCA lpfnLocaleEnum, DWORD dwFlags)
 
BOOL WINAPI EnumSystemLocalesW (LOCALE_ENUMPROCW lpfnLocaleEnum, DWORD dwFlags)
 
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)
 
DWORD WINAPI VerLanguageNameA (DWORD wLang, LPSTR szLang, DWORD nSize)
 
DWORD WINAPI VerLanguageNameW (DWORD wLang, LPWSTR szLang, DWORD nSize)
 
BOOL WINAPI GetStringTypeW (DWORD type, LPCWSTR src, INT count, LPWORD chartype)
 
BOOL WINAPI GetStringTypeExW (LCID locale, DWORD type, LPCWSTR src, INT count, LPWORD chartype)
 
BOOL WINAPI GetStringTypeA (LCID locale, DWORD type, LPCSTR src, INT count, LPWORD chartype)
 
BOOL WINAPI GetStringTypeExA (LCID locale, DWORD type, LPCSTR src, INT count, LPWORD chartype)
 
INT WINAPI LCMapStringEx (LPCWSTR name, DWORD flags, LPCWSTR src, INT srclen, LPWSTR dst, INT dstlen, LPNLSVERSIONINFO version, LPVOID reserved, LPARAM lparam)
 
INT WINAPI LCMapStringW (LCID lcid, DWORD flags, LPCWSTR src, INT srclen, LPWSTR dst, INT dstlen)
 
INT WINAPI LCMapStringA (LCID lcid, DWORD flags, LPCSTR src, INT srclen, LPSTR dst, INT dstlen)
 
INT WINAPI FoldStringA (DWORD dwFlags, LPCSTR src, INT srclen, LPSTR dst, INT dstlen)
 
INT WINAPI FoldStringW (DWORD dwFlags, LPCWSTR src, INT srclen, LPWSTR dst, INT dstlen)
 
INT WINAPI CompareStringEx (LPCWSTR locale, DWORD flags, LPCWSTR str1, INT len1, LPCWSTR str2, INT len2, LPNLSVERSIONINFO version, LPVOID reserved, LPARAM lParam)
 
INT WINAPI CompareStringW (LCID lcid, DWORD flags, LPCWSTR str1, INT len1, LPCWSTR str2, INT len2)
 
INT WINAPI CompareStringA (LCID lcid, DWORD flags, LPCSTR str1, INT len1, LPCSTR str2, INT len2)
 
static HANDLE NLS_RegOpenKey (HANDLE hRootKey, LPCWSTR szKeyName)
 
static BOOL NLS_RegEnumValue (HANDLE hKey, UINT ulIndex, LPWSTR szValueName, ULONG valueNameSize, LPWSTR szValueData, ULONG valueDataSize)
 
static BOOL NLS_RegGetDword (HANDLE hKey, LPCWSTR szValueName, DWORD *lpVal)
 
static BOOL NLS_GetLanguageGroupName (LGRPID lgrpid, LPWSTR szName, ULONG nameSize)
 
static BOOL NLS_EnumSystemLanguageGroups (ENUMLANGUAGEGROUP_CALLBACKS *lpProcs)
 
BOOL WINAPI EnumSystemLanguageGroupsA (LANGUAGEGROUP_ENUMPROCA pLangGrpEnumProc, DWORD dwFlags, LONG_PTR lParam)
 
BOOL WINAPI EnumSystemLanguageGroupsW (LANGUAGEGROUP_ENUMPROCW pLangGrpEnumProc, DWORD dwFlags, LONG_PTR lParam)
 
BOOL WINAPI IsValidLanguageGroup (LGRPID lgrpid, DWORD dwFlags)
 
static BOOL NLS_EnumLanguageGroupLocales (ENUMLANGUAGEGROUPLOCALE_CALLBACKS *lpProcs)
 
BOOL WINAPI EnumLanguageGroupLocalesA (LANGGROUPLOCALE_ENUMPROCA pLangGrpLcEnumProc, LGRPID lgrpid, DWORD dwFlags, LONG_PTR lParam)
 
BOOL WINAPI EnumLanguageGroupLocalesW (LANGGROUPLOCALE_ENUMPROCW pLangGrpLcEnumProc, LGRPID lgrpid, DWORD dwFlags, LONG_PTR lParam)
 
static BOOL NLS_EnumSystemCodePages (ENUMSYSTEMCODEPAGES_CALLBACKS *lpProcs)
 
BOOL WINAPI EnumSystemCodePagesW (CODEPAGE_ENUMPROCW lpCodePageEnumProc, DWORD dwFlags)
 
BOOL WINAPI EnumSystemCodePagesA (CODEPAGE_ENUMPROCA lpCodePageEnumProc, DWORD dwFlags)
 
BOOL WINAPI EnumSystemGeoID (GEOCLASS geoclass, GEOID parent, GEO_ENUMPROC enumproc)
 
BOOL WINAPI InvalidateNLSCache (void)
 
GEOID WINAPI GetUserGeoID (GEOCLASS GeoClass)
 
BOOL WINAPI SetUserGeoID (GEOID GeoID)
 
static BOOL CALLBACK enum_uilang_proc_a (HMODULE hModule, LPCSTR type, LPCSTR name, WORD LangID, LONG_PTR lParam)
 
static BOOL CALLBACK enum_uilang_proc_w (HMODULE hModule, LPCWSTR type, LPCWSTR name, WORD LangID, LONG_PTR lParam)
 
BOOL WINAPI EnumUILanguagesA (UILANGUAGE_ENUMPROCA pUILangEnumProc, DWORD dwFlags, LONG_PTR lParam)
 
BOOL WINAPI EnumUILanguagesW (UILANGUAGE_ENUMPROCW pUILangEnumProc, DWORD dwFlags, LONG_PTR lParam)
 
static int NLS_GetGeoFriendlyName (GEOID Location, LPWSTR szFriendlyName, int cchData)
 
static const struct geoinfo_tget_geoinfo_dataptr (GEOID geoid)
 
INT WINAPI GetGeoInfoW (GEOID geoid, GEOTYPE geotype, LPWSTR data, int data_len, LANGID lang)
 
INT WINAPI GetGeoInfoA (GEOID geoid, GEOTYPE geotype, LPSTR data, int data_len, LANGID lang)
 

Variables

HMODULE kernel32_handle
 
static const WCHAR szLocaleKeyName []
 
static const WCHAR szLangGroupsKeyName []
 
static LCID lcid_LC_COLLATE
 
static LCID lcid_LC_CTYPE
 
static LCID lcid_LC_MONETARY
 
static LCID lcid_LC_NUMERIC
 
static LCID lcid_LC_TIME
 
static LCID lcid_LC_PAPER
 
static LCID lcid_LC_MEASUREMENT
 
static LCID lcid_LC_TELEPHONE
 
static const WCHAR iCalendarTypeW [] = {'i','C','a','l','e','n','d','a','r','T','y','p','e',0}
 
static const WCHAR iCountryW [] = {'i','C','o','u','n','t','r','y',0}
 
static const WCHAR iCurrDigitsW [] = {'i','C','u','r','r','D','i','g','i','t','s',0}
 
static const WCHAR iCurrencyW [] = {'i','C','u','r','r','e','n','c','y',0}
 
static const WCHAR iDateW [] = {'i','D','a','t','e',0}
 
static const WCHAR iDigitsW [] = {'i','D','i','g','i','t','s',0}
 
static const WCHAR iFirstDayOfWeekW [] = {'i','F','i','r','s','t','D','a','y','O','f','W','e','e','k',0}
 
static const WCHAR iFirstWeekOfYearW [] = {'i','F','i','r','s','t','W','e','e','k','O','f','Y','e','a','r',0}
 
static const WCHAR iLDateW [] = {'i','L','D','a','t','e',0}
 
static const WCHAR iLZeroW [] = {'i','L','Z','e','r','o',0}
 
static const WCHAR iMeasureW [] = {'i','M','e','a','s','u','r','e',0}
 
static const WCHAR iNegCurrW [] = {'i','N','e','g','C','u','r','r',0}
 
static const WCHAR iNegNumberW [] = {'i','N','e','g','N','u','m','b','e','r',0}
 
static const WCHAR iPaperSizeW [] = {'i','P','a','p','e','r','S','i','z','e',0}
 
static const WCHAR iTLZeroW [] = {'i','T','L','Z','e','r','o',0}
 
static const WCHAR iTimePrefixW [] = {'i','T','i','m','e','P','r','e','f','i','x',0}
 
static const WCHAR iTimeW [] = {'i','T','i','m','e',0}
 
static const WCHAR s1159W [] = {'s','1','1','5','9',0}
 
static const WCHAR s2359W [] = {'s','2','3','5','9',0}
 
static const WCHAR sCountryW [] = {'s','C','o','u','n','t','r','y',0}
 
static const WCHAR sCurrencyW [] = {'s','C','u','r','r','e','n','c','y',0}
 
static const WCHAR sDateW [] = {'s','D','a','t','e',0}
 
static const WCHAR sDecimalW [] = {'s','D','e','c','i','m','a','l',0}
 
static const WCHAR sGroupingW [] = {'s','G','r','o','u','p','i','n','g',0}
 
static const WCHAR sLanguageW [] = {'s','L','a','n','g','u','a','g','e',0}
 
static const WCHAR sListW [] = {'s','L','i','s','t',0}
 
static const WCHAR sLongDateW [] = {'s','L','o','n','g','D','a','t','e',0}
 
static const WCHAR sMonDecimalSepW [] = {'s','M','o','n','D','e','c','i','m','a','l','S','e','p',0}
 
static const WCHAR sMonGroupingW [] = {'s','M','o','n','G','r','o','u','p','i','n','g',0}
 
static const WCHAR sMonThousandSepW [] = {'s','M','o','n','T','h','o','u','s','a','n','d','S','e','p',0}
 
static const WCHAR sNativeDigitsW [] = {'s','N','a','t','i','v','e','D','i','g','i','t','s',0}
 
static const WCHAR sNegativeSignW [] = {'s','N','e','g','a','t','i','v','e','S','i','g','n',0}
 
static const WCHAR sPositiveSignW [] = {'s','P','o','s','i','t','i','v','e','S','i','g','n',0}
 
static const WCHAR sShortDateW [] = {'s','S','h','o','r','t','D','a','t','e',0}
 
static const WCHAR sThousandW [] = {'s','T','h','o','u','s','a','n','d',0}
 
static const WCHAR sTimeFormatW [] = {'s','T','i','m','e','F','o','r','m','a','t',0}
 
static const WCHAR sTimeW [] = {'s','T','i','m','e',0}
 
static const WCHAR sYearMonthW [] = {'s','Y','e','a','r','M','o','n','t','h',0}
 
static const WCHAR NumShapeW [] = {'N','u','m','s','h','a','p','e',0}
 
static struct registry_value registry_values []
 
static RTL_CRITICAL_SECTION cache_section = { NULL, -1, 0, 0, 0, 0 }
 
static const struct geoinfo_t geoinfodata []
 

Macro Definition Documentation

◆ LOCALE_LOCALEINFOFLAGSMASK

#define LOCALE_LOCALEINFOFLAGSMASK
Value:
LOCALE_RETURN_NUMBER|LOCALE_RETURN_GENITIVE_NAMES)
#define LOCALE_USE_CP_ACP
Definition: winnls.h:20
#define LOCALE_NOUSEROVERRIDE
Definition: winnls.h:19
#define LOCALE_RETURN_GENITIVE_NAMES
Definition: winnls.h:24

Definition at line 48 of file lang.c.

◆ NDEBUG

#define NDEBUG

Definition at line 26 of file lang.c.

◆ NLSRC_OFFSET

#define NLSRC_OFFSET   5000 /* FIXME */

Definition at line 44 of file lang.c.

◆ REG_SZ

#define REG_SZ   1

Definition at line 35 of file lang.c.

Enumeration Type Documentation

◆ locationkind

Enumerator
LOCATION_NATION 
LOCATION_REGION 
LOCATION_BOTH 

Definition at line 2787 of file lang.c.

2787 {
2788 LOCATION_NATION = 0,
2791};
@ LOCATION_REGION
Definition: lang.c:2789
@ LOCATION_BOTH
Definition: lang.c:2790
@ LOCATION_NATION
Definition: lang.c:2788

Function Documentation

◆ CompareStringA()

INT WINAPI CompareStringA ( LCID  lcid,
DWORD  flags,
LPCSTR  str1,
INT  len1,
LPCSTR  str2,
INT  len2 
)

Definition at line 2303 of file lang.c.

2305{
2306 WCHAR *buf1W = NtCurrentTeb()->StaticUnicodeBuffer;
2307 WCHAR *buf2W = buf1W + 130;
2308 LPWSTR str1W, str2W;
2309 INT len1W = 0, len2W = 0, ret;
2310 UINT locale_cp = CP_ACP;
2311
2312 if (!str1 || !str2)
2313 {
2315 return 0;
2316 }
2317 if (len1 < 0) len1 = strlen(str1);
2318 if (len2 < 0) len2 = strlen(str2);
2319
2320 if (!(flags & LOCALE_USE_CP_ACP)) locale_cp = get_lcid_codepage( lcid );
2321
2322 if (len1)
2323 {
2324 if (len1 <= 130) len1W = MultiByteToWideChar(locale_cp, 0, str1, len1, buf1W, 130);
2325 if (len1W)
2326 str1W = buf1W;
2327 else
2328 {
2329 len1W = MultiByteToWideChar(locale_cp, 0, str1, len1, NULL, 0);
2330 str1W = HeapAlloc(GetProcessHeap(), 0, len1W * sizeof(WCHAR));
2331 if (!str1W)
2332 {
2334 return 0;
2335 }
2336 MultiByteToWideChar(locale_cp, 0, str1, len1, str1W, len1W);
2337 }
2338 }
2339 else
2340 {
2341 len1W = 0;
2342 str1W = buf1W;
2343 }
2344
2345 if (len2)
2346 {
2347 if (len2 <= 130) len2W = MultiByteToWideChar(locale_cp, 0, str2, len2, buf2W, 130);
2348 if (len2W)
2349 str2W = buf2W;
2350 else
2351 {
2352 len2W = MultiByteToWideChar(locale_cp, 0, str2, len2, NULL, 0);
2353 str2W = HeapAlloc(GetProcessHeap(), 0, len2W * sizeof(WCHAR));
2354 if (!str2W)
2355 {
2356 if (str1W != buf1W) HeapFree(GetProcessHeap(), 0, str1W);
2358 return 0;
2359 }
2360 MultiByteToWideChar(locale_cp, 0, str2, len2, str2W, len2W);
2361 }
2362 }
2363 else
2364 {
2365 len2W = 0;
2366 str2W = buf2W;
2367 }
2368
2369 ret = CompareStringEx(NULL, flags, str1W, len1W, str2W, len2W, NULL, NULL, 0);
2370
2371 if (str1W != buf1W) HeapFree(GetProcessHeap(), 0, str1W);
2372 if (str2W != buf2W) HeapFree(GetProcessHeap(), 0, str2W);
2373 return ret;
2374}
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
#define ERROR_NOT_ENOUGH_MEMORY
Definition: dderror.h:7
#define NULL
Definition: types.h:112
#define GetProcessHeap()
Definition: compat.h:736
#define ERROR_INVALID_PARAMETER
Definition: compat.h:101
#define CP_ACP
Definition: compat.h:109
#define SetLastError(x)
Definition: compat.h:752
#define HeapAlloc
Definition: compat.h:733
#define HeapFree(x, y, z)
Definition: compat.h:735
#define MultiByteToWideChar
Definition: compat.h:110
GLbitfield flags
Definition: glext.h:7161
#define NtCurrentTeb
static UINT get_lcid_codepage(LCID lcid)
Definition: lang.c:264
INT WINAPI CompareStringEx(LPCWSTR locale, DWORD flags, LPCWSTR str1, INT len1, LPCWSTR str2, INT len2, LPNLSVERSIONINFO version, LPVOID reserved, LPARAM lParam)
Definition: lang.c:2232
unsigned int UINT
Definition: ndis.h:50
int32_t INT
Definition: typedefs.h:58
int ret
__wchar_t WCHAR
Definition: xmlstorage.h:180
WCHAR * LPWSTR
Definition: xmlstorage.h:184

Referenced by __crtCompareStringA(), _Locale_strcmp_auxA(), check_format(), COMCTL32_ChrCmpHelperA(), compare_line(), compare_string2(), FPropContainsProp(), get_env(), IntlStrEqWorkerA(), lstrcmpA(), lstrcmpiA(), SHLWAPI_ChrCmpHelperA(), StrCmpNA(), StrCmpNIA(), StrIsIntlEqualA(), test_CompareStringA(), test_encoders(), test_sh_new_link_info(), and UrlIsA().

◆ CompareStringEx()

INT WINAPI CompareStringEx ( LPCWSTR  locale,
DWORD  flags,
LPCWSTR  str1,
INT  len1,
LPCWSTR  str2,
INT  len2,
LPNLSVERSIONINFO  version,
LPVOID  reserved,
LPARAM  lParam 
)

Definition at line 2232 of file lang.c.

2234{
2237 DWORD semistub_flags = NORM_LINGUISTIC_CASING|LINGUISTIC_IGNORECASE|0x10000000;
2238 /* 0x10000000 is related to diacritics in Arabic, Japanese, and Hebrew */
2239 INT ret;
2240 static int once;
2241
2242 if (version) FIXME("unexpected version parameter\n");
2243 if (reserved) FIXME("unexpected reserved value\n");
2244 if (lParam) FIXME("unexpected lParam\n");
2245
2246 if (!str1 || !str2)
2247 {
2249 return 0;
2250 }
2251
2252 if (flags & ~(supported_flags|semistub_flags))
2253 {
2255 return 0;
2256 }
2257
2258 if (flags & semistub_flags)
2259 {
2260 if (!once++)
2261 FIXME("semi-stub behavior for flag(s) 0x%x\n", flags & semistub_flags);
2262 }
2263
2264 if (len1 < 0) len1 = strlenW(str1);
2265 if (len2 < 0) len2 = strlenW(str2);
2266
2267 ret = wine_compare_string(flags, str1, len1, str2, len2);
2268
2269 if (ret) /* need to translate result */
2270 return (ret < 0) ? CSTR_LESS_THAN : CSTR_GREATER_THAN;
2271 return CSTR_EQUAL;
2272}
#define FIXME(fmt,...)
Definition: debug.h:111
LPARAM lParam
Definition: combotst.c:139
static const WCHAR version[]
Definition: asmname.c:66
r reserved
Definition: btrfs.c:3006
unsigned long DWORD
Definition: ntddk_ex.h:95
int wine_compare_string(int flags, const WCHAR *str1, int len1, const WCHAR *str2, int len2)
Definition: sortkey.c:358
#define strlenW(s)
Definition: unicode.h:28
#define ERROR_INVALID_FLAGS
Definition: winerror.h:583
#define NORM_IGNORECASE
Definition: winnls.h:176
#define SORT_STRINGSORT
Definition: winnls.h:183
#define LINGUISTIC_IGNORECASE
Definition: winnls.h:181
#define NORM_IGNOREKANATYPE
Definition: winnls.h:177
#define NORM_LINGUISTIC_CASING
Definition: winnls.h:182
#define CSTR_EQUAL
Definition: winnls.h:456
#define NORM_IGNORENONSPACE
Definition: winnls.h:178
#define NORM_IGNORESYMBOLS
Definition: winnls.h:179
#define NORM_IGNOREWIDTH
Definition: winnls.h:180
#define CSTR_LESS_THAN
Definition: winnls.h:455
#define CSTR_GREATER_THAN
Definition: winnls.h:457

Referenced by CompareStringA(), CompareStringW(), and InitFunctionPointers().

◆ CompareStringW()

◆ convert_default_lcid()

static LCID convert_default_lcid ( LCID  lcid,
LCTYPE  lctype 
)
static

Definition at line 519 of file lang.c.

520{
521 if (lcid == LOCALE_SYSTEM_DEFAULT ||
522 lcid == LOCALE_USER_DEFAULT ||
523 lcid == LOCALE_NEUTRAL)
524 {
525 LCID default_id = 0;
526
527 switch(lctype & 0xffff)
528 {
529 case LOCALE_SSORTNAME:
530 default_id = lcid_LC_COLLATE;
531 break;
532
536 case LOCALE_IDEFAULTEBCDICCODEPAGE:
539 default_id = lcid_LC_CTYPE;
540 break;
541
543 case LOCALE_ICURRENCY:
545 case LOCALE_INEGCURR:
552 case LOCALE_SCURRENCY:
557 case LOCALE_SNATIVECURRNAME:
558 default_id = lcid_LC_MONETARY;
559 break;
560
561 case LOCALE_IDIGITS:
562 case LOCALE_IDIGITSUBSTITUTION:
563 case LOCALE_ILZERO:
565 case LOCALE_SDECIMAL:
566 case LOCALE_SGROUPING:
567 //case LOCALE_SNAN:
570 //case LOCALE_SNEGINFINITY:
571 //case LOCALE_SPOSINFINITY:
573 case LOCALE_STHOUSAND:
574 default_id = lcid_LC_NUMERIC;
575 break;
576
578 case LOCALE_ICENTURY:
579 case LOCALE_IDATE:
580 case LOCALE_IDAYLZERO:
583 case LOCALE_ILDATE:
584 case LOCALE_IMONLZERO:
586 case LOCALE_ITIME:
588 case LOCALE_ITLZERO:
589 case LOCALE_S1159:
590 case LOCALE_S2359:
611 case LOCALE_SDATE:
612 case LOCALE_SDAYNAME1:
613 case LOCALE_SDAYNAME2:
614 case LOCALE_SDAYNAME3:
615 case LOCALE_SDAYNAME4:
616 case LOCALE_SDAYNAME5:
617 case LOCALE_SDAYNAME6:
618 case LOCALE_SDAYNAME7:
619 //case LOCALE_SDURATION:
620 case LOCALE_SLONGDATE:
635 //case LOCALE_SSHORTESTDAYNAME1:
636 //case LOCALE_SSHORTESTDAYNAME2:
637 //case LOCALE_SSHORTESTDAYNAME3:
638 //case LOCALE_SSHORTESTDAYNAME4:
639 //case LOCALE_SSHORTESTDAYNAME5:
640 //case LOCALE_SSHORTESTDAYNAME6:
641 //case LOCALE_SSHORTESTDAYNAME7:
642 case LOCALE_STIME:
644 case LOCALE_SYEARMONTH:
645 default_id = lcid_LC_TIME;
646 break;
647
648 case LOCALE_IPAPERSIZE:
649 default_id = lcid_LC_PAPER;
650 break;
651
652 case LOCALE_IMEASURE:
653 default_id = lcid_LC_MEASUREMENT;
654 break;
655
656 case LOCALE_ICOUNTRY:
657 default_id = lcid_LC_TELEPHONE;
658 break;
659 }
660 if (default_id) lcid = default_id;
661 }
662 return ConvertDefaultLocale( lcid );
663}
static LCID lcid_LC_MONETARY
Definition: lang.c:145
static LCID lcid_LC_TIME
Definition: lang.c:147
static LCID lcid_LC_NUMERIC
Definition: lang.c:146
static LCID lcid_LC_COLLATE
Definition: lang.c:143
static LCID lcid_LC_CTYPE
Definition: lang.c:144
static LCID lcid_LC_MEASUREMENT
Definition: lang.c:149
static LCID lcid_LC_TELEPHONE
Definition: lang.c:150
static LCID lcid_LC_PAPER
Definition: lang.c:148
LCID WINAPI ConvertDefaultLocale(LCID lcid)
Definition: lang.c:1506
#define LOCALE_NEUTRAL
#define LOCALE_USER_DEFAULT
#define LOCALE_SYSTEM_DEFAULT
DWORD LCID
Definition: nls.h:13
#define LOCALE_SABBREVMONTHNAME10
Definition: winnls.h:113
#define LOCALE_SMONTHNAME12
Definition: winnls.h:102
#define LOCALE_ICURRDIGITS
Definition: winnls.h:54
#define LOCALE_IDEFAULTCODEPAGE
Definition: winnls.h:37
#define LOCALE_SMONTHNAME5
Definition: winnls.h:95
#define LOCALE_SDATE
Definition: winnls.h:58
#define LOCALE_SDAYNAME5
Definition: winnls.h:81
#define LOCALE_SABBREVMONTHNAME9
Definition: winnls.h:112
#define LOCALE_SABBREVMONTHNAME11
Definition: winnls.h:114
#define LOCALE_SABBREVDAYNAME5
Definition: winnls.h:88
#define LOCALE_SABBREVDAYNAME2
Definition: winnls.h:85
#define LOCALE_INEGSEPBYSPACE
Definition: winnls.h:124
#define LOCALE_SABBREVMONTHNAME2
Definition: winnls.h:105
#define LOCALE_INEGSIGNPOSN
Definition: winnls.h:120
#define LOCALE_IDEFAULTUNIXCODEPAGE
Definition: winnls.h:174
#define LOCALE_SMONTHNAME13
Definition: winnls.h:103
#define LOCALE_SGROUPING
Definition: winnls.h:44
#define LOCALE_SMONTHNAME3
Definition: winnls.h:93
#define LOCALE_ICOUNTRY
Definition: winnls.h:30
#define LOCALE_SDECIMAL
Definition: winnls.h:42
#define LOCALE_SMONTHNAME11
Definition: winnls.h:101
#define LOCALE_SMONTHNAME8
Definition: winnls.h:98
#define LOCALE_IDATE
Definition: winnls.h:63
#define LOCALE_SMONTHNAME4
Definition: winnls.h:94
#define LOCALE_FONTSIGNATURE
Definition: winnls.h:125
#define LOCALE_SABBREVMONTHNAME13
Definition: winnls.h:116
#define LOCALE_IFIRSTWEEKOFYEAR
Definition: winnls.h:76
#define LOCALE_SDAYNAME1
Definition: winnls.h:77
#define LOCALE_IMEASURE
Definition: winnls.h:41
#define LOCALE_SLONGDATE
Definition: winnls.h:61
#define LOCALE_SMONTHNAME7
Definition: winnls.h:97
#define LOCALE_IINTLCURRDIGITS
Definition: winnls.h:55
#define LOCALE_S1159
Definition: winnls.h:71
#define LOCALE_SSHORTDATE
Definition: winnls.h:60
#define LOCALE_IPOSSYMPRECEDES
Definition: winnls.h:121
#define LOCALE_IDAYLZERO
Definition: winnls.h:69
#define LOCALE_SABBREVMONTHNAME4
Definition: winnls.h:107
#define LOCALE_SPOSITIVESIGN
Definition: winnls.h:117
#define LOCALE_SABBREVDAYNAME4
Definition: winnls.h:87
#define LOCALE_SMONDECIMALSEP
Definition: winnls.h:51
#define LOCALE_ITIME
Definition: winnls.h:65
#define LOCALE_ICURRENCY
Definition: winnls.h:56
#define LOCALE_SMONTHNAME1
Definition: winnls.h:91
#define LOCALE_SABBREVMONTHNAME3
Definition: winnls.h:106
#define LOCALE_ITLZERO
Definition: winnls.h:68
#define LOCALE_INEGSYMPRECEDES
Definition: winnls.h:123
#define LOCALE_SMONTHOUSANDSEP
Definition: winnls.h:52
#define LOCALE_SDAYNAME7
Definition: winnls.h:83
#define LOCALE_IPOSSIGNPOSN
Definition: winnls.h:119
#define LOCALE_SDAYNAME2
Definition: winnls.h:78
#define LOCALE_SABBREVMONTHNAME1
Definition: winnls.h:104
#define LOCALE_IOPTIONALCALENDAR
Definition: winnls.h:74
#define LOCALE_IDIGITS
Definition: winnls.h:45
#define LOCALE_STHOUSAND
Definition: winnls.h:43
#define LOCALE_IDEFAULTANSICODEPAGE
Definition: winnls.h:38
#define LOCALE_SABBREVDAYNAME6
Definition: winnls.h:89
#define LOCALE_SMONTHNAME2
Definition: winnls.h:92
#define LOCALE_STIMEFORMAT
Definition: winnls.h:62
#define LOCALE_SABBREVDAYNAME1
Definition: winnls.h:84
#define LOCALE_IFIRSTDAYOFWEEK
Definition: winnls.h:75
#define LOCALE_SABBREVMONTHNAME6
Definition: winnls.h:109
#define LOCALE_SMONTHNAME6
Definition: winnls.h:96
#define LOCALE_STIME
Definition: winnls.h:59
#define LOCALE_INEGNUMBER
Definition: winnls.h:47
#define LOCALE_SNEGATIVESIGN
Definition: winnls.h:118
#define LOCALE_SDAYNAME3
Definition: winnls.h:79
#define LOCALE_S2359
Definition: winnls.h:72
#define LOCALE_SNATIVEDIGITS
Definition: winnls.h:48
#define LOCALE_SABBREVDAYNAME3
Definition: winnls.h:86
#define LOCALE_ILZERO
Definition: winnls.h:46
#define LOCALE_SABBREVMONTHNAME5
Definition: winnls.h:108
#define LOCALE_SABBREVMONTHNAME7
Definition: winnls.h:110
#define LOCALE_ICALENDARTYPE
Definition: winnls.h:73
#define LOCALE_SINTLSYMBOL
Definition: winnls.h:50
#define LOCALE_SABBREVMONTHNAME8
Definition: winnls.h:111
#define LOCALE_SMONGROUPING
Definition: winnls.h:53
#define LOCALE_SDAYNAME4
Definition: winnls.h:80
#define LOCALE_SCURRENCY
Definition: winnls.h:49
#define LOCALE_SMONTHNAME10
Definition: winnls.h:100
#define LOCALE_INEGCURR
Definition: winnls.h:57
#define LOCALE_ILDATE
Definition: winnls.h:64
#define LOCALE_SMONTHNAME9
Definition: winnls.h:99
#define LOCALE_IPOSSEPBYSPACE
Definition: winnls.h:122
#define LOCALE_ICENTURY
Definition: winnls.h:67
#define LOCALE_IMONLZERO
Definition: winnls.h:70
#define LOCALE_SABBREVMONTHNAME12
Definition: winnls.h:115
#define LOCALE_IDEFAULTMACCODEPAGE
Definition: winnls.h:39
#define LOCALE_SDAYNAME6
Definition: winnls.h:82
#define LOCALE_ITIMEMARKPOSN
Definition: winnls.h:66
#define LOCALE_SABBREVDAYNAME7
Definition: winnls.h:90

Referenced by GetLocaleInfoW().

◆ ConvertDefaultLocale()

LCID WINAPI ConvertDefaultLocale ( LCID  lcid)

Definition at line 1506 of file lang.c.

1507{
1508 LANGID langid;
1509
1510 switch (lcid)
1511 {
1512 case LOCALE_INVARIANT:
1513 /* keep as-is */
1514 break;
1516 lcid = GetSystemDefaultLCID();
1517 break;
1519 case LOCALE_NEUTRAL:
1520 lcid = GetUserDefaultLCID();
1521 break;
1522 default:
1523 /* Replace SUBLANG_NEUTRAL with SUBLANG_DEFAULT */
1524 langid = LANGIDFROMLCID(lcid);
1526 {
1528 lcid = MAKELCID(langid, SORTIDFROMLCID(lcid));
1529 }
1530 }
1531 return lcid;
1532}
LCID WINAPI GetUserDefaultLCID(void)
Definition: lang.c:772
LCID WINAPI GetSystemDefaultLCID(void)
Definition: lang.c:791
LANGID langid
Definition: msctf.idl:605
#define LOCALE_INVARIANT
#define SORTIDFROMLCID(lcid)
#define MAKELCID(lgid, srtid)
#define MAKELANGID(p, s)
Definition: nls.h:15
#define SUBLANGID(l)
Definition: nls.h:17
#define LANGIDFROMLCID(l)
Definition: nls.h:18
#define SUBLANG_NEUTRAL
Definition: nls.h:167
#define SUBLANG_DEFAULT
Definition: nls.h:168
#define PRIMARYLANGID(l)
Definition: nls.h:16
WORD LANGID
Definition: typedefs.h:81

Referenced by convert_default_lcid(), GetLocalisedText(), LHashValOfNameSysA(), NLS_IsUnicodeOnlyLcid(), ScriptRecordDigitSubstitution(), SetThreadLocale(), test_ConvertDefaultLocale(), VarBoolFromStr(), and VarBstrFromBool().

◆ create_registry_key()

static HANDLE create_registry_key ( void  )
inlinestatic

Definition at line 698 of file lang.c.

699{
700 static const WCHAR cplW[] = {'C','o','n','t','r','o','l',' ','P','a','n','e','l',0};
701 static const WCHAR intlW[] = {'I','n','t','e','r','n','a','t','i','o','n','a','l',0};
704 HANDLE cpl_key, hkey = 0;
705
706 if (RtlOpenCurrentUser( KEY_ALL_ACCESS, &hkey ) != STATUS_SUCCESS) return 0;
707
708 attr.Length = sizeof(attr);
709 attr.RootDirectory = hkey;
710 attr.ObjectName = &nameW;
711 attr.Attributes = 0;
712 attr.SecurityDescriptor = NULL;
713 attr.SecurityQualityOfService = NULL;
714 RtlInitUnicodeString( &nameW, cplW );
715
716 if (!NtCreateKey( &cpl_key, KEY_ALL_ACCESS, &attr, 0, NULL, 0, NULL ))
717 {
718 NtClose( attr.RootDirectory );
719 attr.RootDirectory = cpl_key;
720 RtlInitUnicodeString( &nameW, intlW );
721 if (NtCreateKey( &hkey, KEY_ALL_ACCESS, &attr, 0, NULL, 0, NULL )) hkey = 0;
722 }
723 NtClose( attr.RootDirectory );
724 return hkey;
725}
static const WCHAR nameW[]
Definition: main.c:46
NTSYSAPI NTSTATUS NTAPI RtlOpenCurrentUser(_In_ ACCESS_MASK DesiredAccess, _Out_ PHANDLE KeyHandle)
#define KEY_ALL_ACCESS
Definition: nt_native.h:1041
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
NTSTATUS NTAPI NtClose(IN HANDLE Handle)
Definition: obhandle.c:3402
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)
Definition: ntapi.c:240
#define STATUS_SUCCESS
Definition: shellext.h:65
Definition: cookie.c:202

Referenced by get_registry_locale_info(), GetUserGeoID(), SetLocaleInfoW(), and SetUserGeoID().

◆ DEBUG_CHANNEL()

DEBUG_CHANNEL ( nls  )

◆ enum_lang_proc_a()

static BOOL CALLBACK enum_lang_proc_a ( HMODULE  hModule,
LPCSTR  type,
LPCSTR  name,
WORD  LangID,
LONG_PTR  lParam 
)
static

Definition at line 1560 of file lang.c.

1562{
1563 LOCALE_ENUMPROCA lpfnLocaleEnum = (LOCALE_ENUMPROCA)lParam;
1564 char buf[20];
1565
1566 sprintf(buf, "%08x", (UINT)LangID);
1567 return lpfnLocaleEnum( buf );
1568}
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
#define sprintf(buf, format,...)
Definition: sprintf.c:55
_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
Definition: wdfusb.h:1083
BOOL(CALLBACK * LOCALE_ENUMPROCA)(LPSTR)
Definition: winnls.h:537

Referenced by EnumSystemLocalesA().

◆ enum_lang_proc_w()

static BOOL CALLBACK enum_lang_proc_w ( HMODULE  hModule,
LPCWSTR  type,
LPCWSTR  name,
WORD  LangID,
LONG_PTR  lParam 
)
static

Definition at line 1570 of file lang.c.

1572{
1573 static const WCHAR formatW[] = {'%','0','8','x',0};
1574 LOCALE_ENUMPROCW lpfnLocaleEnum = (LOCALE_ENUMPROCW)lParam;
1575 WCHAR buf[20];
1576 sprintfW( buf, formatW, (UINT)LangID );
1577 return lpfnLocaleEnum( buf );
1578}
#define sprintfW
Definition: unicode.h:58
BOOL(CALLBACK * LOCALE_ENUMPROCW)(LPWSTR)
Definition: winnls.h:538

Referenced by EnumSystemLocalesW().

◆ enum_locale_ex_proc()

static BOOL CALLBACK enum_locale_ex_proc ( HMODULE  module,
LPCWSTR  type,
LPCWSTR  name,
WORD  lang,
LONG_PTR  lparam 
)
static

Definition at line 1625 of file lang.c.

1627{
1629 WCHAR buffer[256];
1630 DWORD neutral;
1631 unsigned int flags;
1632
1636 LOCALE_INEUTRAL | LOCALE_NOUSEROVERRIDE | LOCALE_RETURN_NUMBER,
1637 (LPWSTR)&neutral, sizeof(neutral) / sizeof(WCHAR) ))
1638 neutral = 0;
1641 if (data->flags && !(data->flags & flags)) return TRUE;
1642 return data->proc( buffer, flags, data->lparam );
1643}
#define ARRAY_SIZE(a)
Definition: main.h:24
#define TRUE
Definition: types.h:120
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
GLuint buffer
Definition: glext.h:5915
INT WINAPI GetLocaleInfoW(LCID lcid, LCTYPE lctype, LPWSTR buffer, INT len)
Definition: lang.c:1102
static UINT WPARAM LPARAM lparam
Definition: combo.c:716
#define SORT_DEFAULT
static const WCHAR lang[]
Definition: wbemdisp.c:287
#define LOCALE_NEUTRALDATA
Definition: winnls.h:210
#define LOCALE_SNAME
Definition: winnls.h:130
#define LOCALE_SPECIFICDATA
Definition: winnls.h:211
#define LOCALE_INEUTRAL
Definition: winnls.h:156
#define LOCALE_WINDOWS
Definition: winnls.h:206

Referenced by EnumSystemLocalesEx().

◆ enum_uilang_proc_a()

static BOOL CALLBACK enum_uilang_proc_a ( HMODULE  hModule,
LPCSTR  type,
LPCSTR  name,
WORD  LangID,
LONG_PTR  lParam 
)
static

Definition at line 3431 of file lang.c.

3433{
3435 char buf[20];
3436
3437 sprintf(buf, "%08x", (UINT)LangID);
3438 return enum_uilang->u.procA( buf, enum_uilang->param );
3439}
union ENUM_UILANG_CALLBACK::@451 u
LONG_PTR param
Definition: lang.c:3428
UILANGUAGE_ENUMPROCA procA
Definition: lang.c:3424

Referenced by EnumUILanguagesA().

◆ enum_uilang_proc_w()

static BOOL CALLBACK enum_uilang_proc_w ( HMODULE  hModule,
LPCWSTR  type,
LPCWSTR  name,
WORD  LangID,
LONG_PTR  lParam 
)
static

Definition at line 3441 of file lang.c.

3443{
3444 static const WCHAR formatW[] = {'%','0','8','x',0};
3446 WCHAR buf[20];
3447
3448 sprintfW( buf, formatW, (UINT)LangID );
3449 return enum_uilang->u.procW( buf, enum_uilang->param );
3450}
UILANGUAGE_ENUMPROCW procW
Definition: lang.c:3425

Referenced by EnumUILanguagesW().

◆ EnumLanguageGroupLocalesA()

BOOL WINAPI EnumLanguageGroupLocalesA ( LANGGROUPLOCALE_ENUMPROCA  pLangGrpLcEnumProc,
LGRPID  lgrpid,
DWORD  dwFlags,
LONG_PTR  lParam 
)

Definition at line 3119 of file lang.c.

3121{
3123
3124 TRACE("(%p,0x%08X,0x%08X,0x%08lX)\n", pLangGrpLcEnumProc, lgrpid, dwFlags, lParam);
3125
3126 callbacks.procA = pLangGrpLcEnumProc;
3127 callbacks.procW = NULL;
3128 callbacks.dwFlags = dwFlags;
3129 callbacks.lgrpid = lgrpid;
3130 callbacks.lParam = lParam;
3131
3132 return NLS_EnumLanguageGroupLocales( pLangGrpLcEnumProc ? &callbacks : NULL );
3133}
static BOOL NLS_EnumLanguageGroupLocales(ENUMLANGUAGEGROUPLOCALE_CALLBACKS *lpProcs)
Definition: lang.c:2700
#define TRACE(s)
Definition: solgame.cpp:4
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1176
static int callbacks
Definition: xmllint.c:838

Referenced by InitFunctionPointers(), and test_digit_substitution().

◆ EnumLanguageGroupLocalesW()

BOOL WINAPI EnumLanguageGroupLocalesW ( LANGGROUPLOCALE_ENUMPROCW  pLangGrpLcEnumProc,
LGRPID  lgrpid,
DWORD  dwFlags,
LONG_PTR  lParam 
)

Definition at line 3140 of file lang.c.

3142{
3144
3145 TRACE("(%p,0x%08X,0x%08X,0x%08lX)\n", pLangGrpLcEnumProc, lgrpid, dwFlags, lParam);
3146
3147 callbacks.procA = NULL;
3148 callbacks.procW = pLangGrpLcEnumProc;
3149 callbacks.dwFlags = dwFlags;
3150 callbacks.lgrpid = lgrpid;
3151 callbacks.lParam = lParam;
3152
3153 return NLS_EnumLanguageGroupLocales( pLangGrpLcEnumProc ? &callbacks : NULL );
3154}

◆ EnumSystemCodePagesA()

BOOL WINAPI EnumSystemCodePagesA ( CODEPAGE_ENUMPROCA  lpCodePageEnumProc,
DWORD  dwFlags 
)

Definition at line 3257 of file lang.c.

3261{
3263
3264 TRACE("(%p,0x%08X)\n", lpCodePageEnumProc, dwFlags);
3265
3266 procs.procA = lpCodePageEnumProc;
3267 procs.procW = NULL;
3268 procs.dwFlags = dwFlags;
3269
3270 return NLS_EnumSystemCodePages(lpCodePageEnumProc ? &procs : NULL);
3271}
static BOOL NLS_EnumSystemCodePages(ENUMSYSTEMCODEPAGES_CALLBACKS *lpProcs)
Definition: lang.c:3165
CODEPAGE_ENUMPROCA procA
Definition: lang.c:3159
CODEPAGE_ENUMPROCW procW
Definition: lang.c:3160

◆ EnumSystemCodePagesW()

BOOL WINAPI EnumSystemCodePagesW ( CODEPAGE_ENUMPROCW  lpCodePageEnumProc,
DWORD  dwFlags 
)

Definition at line 3235 of file lang.c.

3239{
3241
3242 TRACE("(%p,0x%08X)\n", lpCodePageEnumProc, dwFlags);
3243
3244 procs.procA = NULL;
3245 procs.procW = lpCodePageEnumProc;
3246 procs.dwFlags = dwFlags;
3247
3248 return NLS_EnumSystemCodePages(lpCodePageEnumProc ? &procs : NULL);
3249}

Referenced by InitCodePagesList().

◆ EnumSystemGeoID()

BOOL WINAPI EnumSystemGeoID ( GEOCLASS  geoclass,
GEOID  parent,
GEO_ENUMPROC  enumproc 
)

Definition at line 3287 of file lang.c.

3288{
3289 INT i;
3290
3291 TRACE("(%d, %d, %p)\n", geoclass, parent, enumproc);
3292
3293 if (!enumproc) {
3295 return FALSE;
3296 }
3297
3298 if (geoclass != GEOCLASS_NATION && geoclass != GEOCLASS_REGION) {
3300 return FALSE;
3301 }
3302
3303 for (i = 0; i < sizeof(geoinfodata)/sizeof(struct geoinfo_t); i++) {
3304 const struct geoinfo_t *ptr = &geoinfodata[i];
3305
3306 if (geoclass == GEOCLASS_NATION && (ptr->kind == LOCATION_REGION))
3307 continue;
3308
3309 if (geoclass == GEOCLASS_REGION && (ptr->kind == LOCATION_NATION))
3310 continue;
3311
3312 if (parent && ptr->parent != parent)
3313 continue;
3314
3315 if (!enumproc(ptr->id))
3316 return TRUE;
3317 }
3318
3319 return TRUE;
3320}
#define FALSE
Definition: types.h:117
r parent
Definition: btrfs.c:3010
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
Definition: glfuncs.h:248
static const struct geoinfo_t geoinfodata[]
Definition: lang.c:2802
static PVOID ptr
Definition: dispmode.c:27
@ GEOCLASS_REGION
Definition: winnls.h:556
@ GEOCLASS_NATION
Definition: winnls.h:555

Referenced by CreateLocationsList(), and InitFunctionPointers().

◆ EnumSystemLanguageGroupsA()

BOOL WINAPI EnumSystemLanguageGroupsA ( LANGUAGEGROUP_ENUMPROCA  pLangGrpEnumProc,
DWORD  dwFlags,
LONG_PTR  lParam 
)

Definition at line 2603 of file lang.c.

2605{
2607
2608 TRACE("(%p,0x%08X,0x%08lX)\n", pLangGrpEnumProc, dwFlags, lParam);
2609
2610 procs.procA = pLangGrpEnumProc;
2611 procs.procW = NULL;
2612 procs.dwFlags = dwFlags;
2613 procs.lParam = lParam;
2614
2615 return NLS_EnumSystemLanguageGroups( pLangGrpEnumProc ? &procs : NULL);
2616}
static BOOL NLS_EnumSystemLanguageGroups(ENUMLANGUAGEGROUP_CALLBACKS *lpProcs)
Definition: lang.c:2504
LANGUAGEGROUP_ENUMPROCW procW
Definition: lang.c:2498
LANGUAGEGROUP_ENUMPROCA procA
Definition: lang.c:2497

Referenced by InitFunctionPointers().

◆ EnumSystemLanguageGroupsW()

BOOL WINAPI EnumSystemLanguageGroupsW ( LANGUAGEGROUP_ENUMPROCW  pLangGrpEnumProc,
DWORD  dwFlags,
LONG_PTR  lParam 
)

Definition at line 2623 of file lang.c.

2625{
2627
2628 TRACE("(%p,0x%08X,0x%08lX)\n", pLangGrpEnumProc, dwFlags, lParam);
2629
2630 procs.procA = NULL;
2631 procs.procW = pLangGrpEnumProc;
2632 procs.dwFlags = dwFlags;
2633 procs.lParam = lParam;
2634
2635 return NLS_EnumSystemLanguageGroups( pLangGrpEnumProc ? &procs : NULL);
2636}

◆ EnumSystemLocalesA()

BOOL WINAPI EnumSystemLocalesA ( LOCALE_ENUMPROCA  lpfnLocaleEnum,
DWORD  dwFlags 
)

Definition at line 1593 of file lang.c.

1594{
1595 TRACE("(%p,%08x)\n", lpfnLocaleEnum, dwFlags);
1598 (LONG_PTR)lpfnLocaleEnum);
1599 return TRUE;
1600}
BOOL WINAPI EnumResourceLanguagesA(HMODULE hmod, LPCSTR type, LPCSTR name, ENUMRESLANGPROCA lpfun, LONG_PTR lparam)
Definition: res.c:428
static BOOL CALLBACK enum_lang_proc_a(HMODULE hModule, LPCSTR type, LPCSTR name, WORD LangID, LONG_PTR lParam)
Definition: lang.c:1560
HMODULE kernel32_handle
Definition: dllmain.c:26
__int3264 LONG_PTR
Definition: mstsclib_h.h:276
#define RT_STRING
Definition: pedump.c:368
#define LOCALE_ILANGUAGE
Definition: winnls.h:25
const char * LPCSTR
Definition: xmlstorage.h:183
char * LPSTR
Definition: xmlstorage.h:182

Referenced by __GetLCID().

◆ EnumSystemLocalesEx()

BOOL WINAPI EnumSystemLocalesEx ( LOCALE_ENUMPROCEX  proc,
DWORD  flags,
LPARAM  lparam,
LPVOID  reserved 
)

Definition at line 1648 of file lang.c.

1649{
1651
1652 if (reserved)
1653 {
1655 return FALSE;
1656 }
1657 data.proc = proc;
1658 data.flags = flags;
1659 data.lparam = lparam;
1663 return TRUE;
1664}
BOOL WINAPI EnumResourceLanguagesW(HMODULE hmod, LPCWSTR type, LPCWSTR name, ENUMRESLANGPROCW lpfun, LONG_PTR lparam)
Definition: res.c:480
static BOOL CALLBACK enum_locale_ex_proc(HMODULE module, LPCWSTR type, LPCWSTR name, WORD lang, LONG_PTR lparam)
Definition: lang.c:1625
static HANDLE proc()
Definition: pdb.c:34
#define MAKEINTRESOURCE
Definition: winuser.h:591
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185

Referenced by InitFunctionPointers().

◆ EnumSystemLocalesW()

BOOL WINAPI EnumSystemLocalesW ( LOCALE_ENUMPROCW  lpfnLocaleEnum,
DWORD  dwFlags 
)

Definition at line 1608 of file lang.c.

1609{
1610 TRACE("(%p,%08x)\n", lpfnLocaleEnum, dwFlags);
1613 (LONG_PTR)lpfnLocaleEnum);
1614 return TRUE;
1615}
static BOOL CALLBACK enum_lang_proc_w(HMODULE hModule, LPCWSTR type, LPCWSTR name, WORD LangID, LONG_PTR lParam)
Definition: lang.c:1570

Referenced by CreateLanguagesList(), CreateSortList(), EnumRfc1766_create(), InitLanguagesList(), and IsSortPageNeeded().

◆ EnumUILanguagesA()

BOOL WINAPI EnumUILanguagesA ( UILANGUAGE_ENUMPROCA  pUILangEnumProc,
DWORD  dwFlags,
LONG_PTR  lParam 
)

Definition at line 3455 of file lang.c.

3456{
3457 ENUM_UILANG_CALLBACK enum_uilang;
3458
3459 TRACE("%p, %x, %lx\n", pUILangEnumProc, dwFlags, lParam);
3460
3461 if(!pUILangEnumProc) {
3463 return FALSE;
3464 }
3465 if(dwFlags) {
3467 return FALSE;
3468 }
3469
3470 enum_uilang.u.procA = pUILangEnumProc;
3471 enum_uilang.flags = dwFlags;
3472 enum_uilang.param = lParam;
3473
3476 (LONG_PTR)&enum_uilang);
3477 return TRUE;
3478}
static BOOL CALLBACK enum_uilang_proc_a(HMODULE hModule, LPCSTR type, LPCSTR name, WORD LangID, LONG_PTR lParam)
Definition: lang.c:3431

Referenced by InitFunctionPointers().

◆ EnumUILanguagesW()

BOOL WINAPI EnumUILanguagesW ( UILANGUAGE_ENUMPROCW  pUILangEnumProc,
DWORD  dwFlags,
LONG_PTR  lParam 
)

Definition at line 3483 of file lang.c.

3484{
3485 ENUM_UILANG_CALLBACK enum_uilang;
3486
3487 TRACE("%p, %x, %lx\n", pUILangEnumProc, dwFlags, lParam);
3488
3489
3490 if(!pUILangEnumProc) {
3492 return FALSE;
3493 }
3494 if(dwFlags) {
3496 return FALSE;
3497 }
3498
3499 enum_uilang.u.procW = pUILangEnumProc;
3500 enum_uilang.flags = dwFlags;
3501 enum_uilang.param = lParam;
3502
3505 (LONG_PTR)&enum_uilang);
3506 return TRUE;
3507}
static BOOL CALLBACK enum_uilang_proc_w(HMODULE hModule, LPCWSTR type, LPCWSTR name, WORD LangID, LONG_PTR lParam)
Definition: lang.c:3441

◆ FoldStringA()

INT WINAPI FoldStringA ( DWORD  dwFlags,
LPCSTR  src,
INT  srclen,
LPSTR  dst,
INT  dstlen 
)

Definition at line 2141 of file lang.c.

2143{
2144 INT ret = 0, srclenW = 0;
2145 WCHAR *srcW = NULL, *dstW = NULL;
2146
2147 if (!src || !srclen || dstlen < 0 || (dstlen && !dst) || src == dst)
2148 {
2150 return 0;
2151 }
2152
2154 src, srclen, NULL, 0);
2155 srcW = HeapAlloc(GetProcessHeap(), 0, srclenW * sizeof(WCHAR));
2156
2157 if (!srcW)
2158 {
2160 goto FoldStringA_exit;
2161 }
2162
2164 src, srclen, srcW, srclenW);
2165
2166 dwFlags = (dwFlags & ~MAP_PRECOMPOSED) | MAP_FOLDCZONE;
2167
2168 ret = FoldStringW(dwFlags, srcW, srclenW, NULL, 0);
2169 if (ret && dstlen)
2170 {
2171 dstW = HeapAlloc(GetProcessHeap(), 0, ret * sizeof(WCHAR));
2172
2173 if (!dstW)
2174 {
2176 goto FoldStringA_exit;
2177 }
2178
2179 ret = FoldStringW(dwFlags, srcW, srclenW, dstW, ret);
2180 if (!WideCharToMultiByte(CP_ACP, 0, dstW, ret, dst, dstlen, NULL, NULL))
2181 {
2182 ret = 0;
2184 }
2185 }
2186
2187 HeapFree(GetProcessHeap(), 0, dstW);
2188
2189FoldStringA_exit:
2190 HeapFree(GetProcessHeap(), 0, srcW);
2191 return ret;
2192}
#define ERROR_INSUFFICIENT_BUFFER
Definition: dderror.h:10
#define WideCharToMultiByte
Definition: compat.h:111
GLenum src
Definition: glext.h:6340
GLenum GLenum dst
Definition: glext.h:6340
#define MB_COMPOSITE
Definition: unicode.h:40
INT WINAPI FoldStringW(DWORD dwFlags, LPCWSTR src, INT srclen, LPWSTR dst, INT dstlen)
Definition: lang.c:2199
static DWORD LPDWORD LPCSTR DWORD srclen
Definition: directory.c:52
static DWORD dstlen
Definition: directory.c:51
#define MAP_COMPOSITE
Definition: winnls.h:216
#define MAP_FOLDCZONE
Definition: winnls.h:213

Referenced by InitFunctionPointers().

◆ FoldStringW()

INT WINAPI FoldStringW ( DWORD  dwFlags,
LPCWSTR  src,
INT  srclen,
LPWSTR  dst,
INT  dstlen 
)

Definition at line 2199 of file lang.c.

2201{
2202 int ret;
2203
2204 switch (dwFlags & (MAP_COMPOSITE|MAP_PRECOMPOSED|MAP_EXPAND_LIGATURES))
2205 {
2206 case 0:
2207 if (dwFlags)
2208 break;
2209 /* Fall through for dwFlags == 0 */
2211 case MAP_PRECOMPOSED|MAP_EXPAND_LIGATURES:
2212 case MAP_COMPOSITE|MAP_EXPAND_LIGATURES:
2214 return 0;
2215 }
2216
2217 if (!src || !srclen || dstlen < 0 || (dstlen && !dst) || src == dst)
2218 {
2220 return 0;
2221 }
2222
2224 if (!ret)
2226 return ret;
2227}
int wine_fold_string(int flags, const WCHAR *src, int srclen, WCHAR *dst, int dstlen)
Definition: fold.c:118
#define MAP_PRECOMPOSED
Definition: winnls.h:215

Referenced by FoldStringA(), IdnToNameprepUnicode(), and InitFunctionPointers().

◆ get_geoinfo_dataptr()

static const struct geoinfo_t * get_geoinfo_dataptr ( GEOID  geoid)
static

Definition at line 3537 of file lang.c.

3538{
3539 int min, max;
3540
3541 min = 0;
3542 max = sizeof(geoinfodata)/sizeof(struct geoinfo_t)-1;
3543
3544 while (min <= max) {
3545 const struct geoinfo_t *ptr;
3546 int n = (min+max)/2;
3547
3548 ptr = &geoinfodata[n];
3549 if (geoid == ptr->id)
3550 /* we don't need empty entry */
3551 return *ptr->iso2W ? ptr : NULL;
3552
3553 if (ptr->id > geoid)
3554 max = n-1;
3555 else
3556 min = n+1;
3557 }
3558
3559 return NULL;
3560}
GLdouble n
Definition: glext.h:7729
#define min(a, b)
Definition: monoChain.cc:55
#define max(a, b)
Definition: svc.c:63

Referenced by GetGeoInfoW().

◆ get_lcid_codepage()

static UINT get_lcid_codepage ( LCID  lcid)
inlinestatic

Definition at line 264 of file lang.c.

265{
266 UINT ret;
267 if (!GetLocaleInfoW( lcid, LOCALE_IDEFAULTANSICODEPAGE|LOCALE_RETURN_NUMBER, (WCHAR *)&ret,
268 sizeof(ret)/sizeof(WCHAR) )) ret = 0;
269 return ret;
270}

Referenced by CompareStringA(), GetLocaleInfoA(), GetStringTypeA(), LCMapStringA(), and SetLocaleInfoA().

◆ get_locale_registry_value()

static struct registry_value * get_locale_registry_value ( DWORD  lctype)
static

Definition at line 1088 of file lang.c.

1089{
1090 int i;
1091 for (i=0; i < sizeof(registry_values)/sizeof(registry_values[0]); i++)
1092 if (registry_values[i].lctype == lctype)
1093 return &registry_values[i];
1094 return NULL;
1095}
static struct registry_value registry_values[]

Referenced by GetLocaleInfoW(), and SetLocaleInfoW().

◆ get_registry_locale_info()

static INT get_registry_locale_info ( struct registry_value registry_value,
LPWSTR  buffer,
INT  len 
)
static

Definition at line 890 of file lang.c.

891{
892 DWORD size;
893 INT ret;
894 HANDLE hkey;
898 static const int info_size = FIELD_OFFSET(KEY_VALUE_PARTIAL_INFORMATION, Data);
899
901
903 {
904 if (!(hkey = create_registry_key()))
905 {
907 return -1;
908 }
909
911 size = info_size + len * sizeof(WCHAR);
912
913 if (!(info = HeapAlloc( GetProcessHeap(), 0, size )))
914 {
915 NtClose( hkey );
918 return 0;
919 }
920
922
923 /* try again with a bigger buffer when we have to return the correct size */
924 if (status == STATUS_BUFFER_OVERFLOW && !buffer && size > info_size)
925 {
927 if ((new_info = HeapReAlloc( GetProcessHeap(), 0, info, size )))
928 {
929 info = new_info;
931 }
932 }
933
934 NtClose( hkey );
935
936 if (!status)
937 {
938 INT length = (size - info_size) / sizeof(WCHAR);
939 LPWSTR cached_value;
940
941 if (!length || ((WCHAR *)&info->Data)[length-1])
942 length++;
943
944 cached_value = HeapAlloc( GetProcessHeap(), 0, length * sizeof(WCHAR) );
945
946 if (!cached_value)
947 {
951 return 0;
952 }
953
954 memcpy( cached_value, info->Data, (length-1) * sizeof(WCHAR) );
955 cached_value[length-1] = 0;
957 registry_value->cached_value = cached_value;
958 }
959 else
960 {
962 {
963 ret = (size - info_size) / sizeof(WCHAR);
964 }
966 {
967 ret = -1;
968 }
969 else
970 {
972 ret = 0;
973 }
976 return ret;
977 }
978 }
979
981
982 if (buffer)
983 {
984 if (ret > len)
985 {
987 ret = 0;
988 }
989 else
990 {
992 }
993 }
994
996
997 return ret;
998}
LONG NTSTATUS
Definition: precomp.h:26
#define HeapReAlloc
Definition: compat.h:734
#define lstrcpyW
Definition: compat.h:749
#define lstrlenW
Definition: compat.h:750
GLsizeiptr size
Definition: glext.h:5919
GLuint GLsizei GLsizei * length
Definition: glext.h:6040
GLenum GLsizei len
Definition: glext.h:6722
NTSYSAPI ULONG WINAPI RtlNtStatusToDosError(NTSTATUS)
static RTL_CRITICAL_SECTION cache_section
Definition: lang.c:244
static HANDLE create_registry_key(void)
Definition: lang.c:698
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
NTSYSAPI NTSTATUS NTAPI RtlEnterCriticalSection(_In_ PRTL_CRITICAL_SECTION CriticalSection)
NTSYSAPI NTSTATUS NTAPI RtlLeaveCriticalSection(_In_ PRTL_CRITICAL_SECTION CriticalSection)
@ KeyValuePartialInformation
Definition: nt_native.h:1182
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)
#define STATUS_BUFFER_OVERFLOW
Definition: shellext.h:66
WCHAR * cached_value
Definition: lang.c:196
const WCHAR * name
Definition: lang.c:195
Definition: ps.c:97
#define FIELD_OFFSET(t, f)
Definition: typedefs.h:255
#define STATUS_OBJECT_NAME_NOT_FOUND
Definition: udferr_usr.h:149

Referenced by GetLocaleInfoW().

◆ get_value_base_by_lctype()

static int get_value_base_by_lctype ( LCTYPE  lctype)
static

Definition at line 1078 of file lang.c.

1079{
1080 return lctype == LOCALE_ILANGUAGE || lctype == LOCALE_IDEFAULTLANGUAGE ? 16 : 10;
1081}
#define LOCALE_IDEFAULTLANGUAGE
Definition: winnls.h:35

Referenced by GetLocaleInfoW().

◆ GetGeoInfoA()

INT WINAPI GetGeoInfoA ( GEOID  geoid,
GEOTYPE  geotype,
LPSTR  data,
int  data_len,
LANGID  lang 
)

Definition at line 3639 of file lang.c.

3640{
3641 WCHAR *buffW;
3642 INT len;
3643
3644 TRACE("%d %d %p %d %d\n", geoid, geotype, data, data_len, lang);
3645
3646 len = GetGeoInfoW(geoid, geotype, NULL, 0, lang);
3647 if (!len)
3648 return 0;
3649
3650 buffW = HeapAlloc(GetProcessHeap(), 0, len*sizeof(WCHAR));
3651 if (!buffW)
3652 return 0;
3653
3654 GetGeoInfoW(geoid, geotype, buffW, len, lang);
3655 len = WideCharToMultiByte(CP_ACP, 0, buffW, -1, NULL, 0, NULL, NULL);
3656 if (!data || !data_len) {
3657 HeapFree(GetProcessHeap(), 0, buffW);
3658 return len;
3659 }
3660
3661 len = WideCharToMultiByte(CP_ACP, 0, buffW, -1, data, data_len, NULL, NULL);
3662 HeapFree(GetProcessHeap(), 0, buffW);
3663
3664 if (data_len < len)
3666 return data_len < len ? 0 : len;
3667}
INT WINAPI GetGeoInfoW(GEOID geoid, GEOTYPE geotype, LPWSTR data, int data_len, LANGID lang)
Definition: lang.c:3565

Referenced by InitFunctionPointers().

◆ GetGeoInfoW()

INT WINAPI GetGeoInfoW ( GEOID  geoid,
GEOTYPE  geotype,
LPWSTR  data,
int  data_len,
LANGID  lang 
)

Definition at line 3565 of file lang.c.

3566{
3567 const struct geoinfo_t *ptr;
3568 const WCHAR *str = NULL;
3569 WCHAR buffW[12];
3570 LONG val = 0;
3571 INT len;
3572
3573 TRACE("%d %d %p %d %d\n", geoid, geotype, data, data_len, lang);
3574
3575 if (!(ptr = get_geoinfo_dataptr(geoid))) {
3577 return 0;
3578 }
3579
3580 switch (geotype) {
3581 case GEO_FRIENDLYNAME:
3582 {
3583#ifdef __REACTOS__
3584 return NLS_GetGeoFriendlyName(geoid, data, data_len, lang);
3585#else
3586 return NLS_GetGeoFriendlyName(geoid, data, data_len);
3587#endif
3588 }
3589 case GEO_NATION:
3590 val = geoid;
3591 break;
3592 case GEO_ISO_UN_NUMBER:
3593 val = ptr->uncode;
3594 break;
3595 case GEO_PARENT:
3596 val = ptr->parent;
3597 break;
3598 case GEO_ISO2:
3599 case GEO_ISO3:
3600 {
3601 str = geotype == GEO_ISO2 ? ptr->iso2W : ptr->iso3W;
3602 break;
3603 }
3604 case GEO_RFC1766:
3605 case GEO_LCID:
3606 case GEO_OFFICIALNAME:
3607 case GEO_TIMEZONES:
3609 case GEO_LATITUDE:
3610 case GEO_LONGITUDE:
3611 FIXME("type %d is not supported\n", geotype);
3613 return 0;
3614 default:
3615 WARN("unrecognized type %d\n", geotype);
3617 return 0;
3618 }
3619
3620 if (val) {
3621 static const WCHAR fmtW[] = {'%','d',0};
3622 sprintfW(buffW, fmtW, val);
3623 str = buffW;
3624 }
3625
3626 len = strlenW(str) + 1;
3627 if (!data || !data_len)
3628 return len;
3629
3630 memcpy(data, str, min(len, data_len)*sizeof(WCHAR));
3631 if (data_len < len)
3633 return data_len < len ? 0 : len;
3634}
#define WARN(fmt,...)
Definition: debug.h:112
#define ERROR_CALL_NOT_IMPLEMENTED
Definition: compat.h:102
GLuint GLfloat * val
Definition: glext.h:7180
static const struct geoinfo_t * get_geoinfo_dataptr(GEOID geoid)
Definition: lang.c:3537
static int NLS_GetGeoFriendlyName(GEOID Location, LPWSTR szFriendlyName, int cchData)
Definition: lang.c:3513
long LONG
Definition: pedump.c:60
const WCHAR * str
@ GEO_ISO3
Definition: winnls.h:566
@ GEO_OFFICIALLANGUAGES
Definition: winnls.h:572
@ GEO_OFFICIALNAME
Definition: winnls.h:570
@ GEO_TIMEZONES
Definition: winnls.h:571
@ GEO_FRIENDLYNAME
Definition: winnls.h:569
@ GEO_LONGITUDE
Definition: winnls.h:564
@ GEO_ISO_UN_NUMBER
Definition: winnls.h:573
@ GEO_PARENT
Definition: winnls.h:574
@ GEO_ISO2
Definition: winnls.h:565
@ GEO_LATITUDE
Definition: winnls.h:563
@ GEO_NATION
Definition: winnls.h:562
@ GEO_LCID
Definition: winnls.h:568
@ GEO_RFC1766
Definition: winnls.h:567

Referenced by CreateLocationsList(), GetGeoInfoA(), InitFunctionPointers(), LocationsEnumProc(), and SetUserLocaleName().

◆ GetLocaleInfoA()

INT WINAPI GetLocaleInfoA ( LCID  lcid,
LCTYPE  lctype,
LPSTR  buffer,
INT  len 
)

Definition at line 1022 of file lang.c.

1023{
1024 WCHAR *bufferW;
1025 INT lenW, ret;
1026
1027 TRACE( "(lcid=0x%x,lctype=0x%x,%p,%d)\n", lcid, lctype, buffer, len );
1028
1029 if (len < 0 || (len && !buffer))
1030 {
1032 return 0;
1033 }
1034 if (((lctype & ~LOCALE_LOCALEINFOFLAGSMASK) == LOCALE_SSHORTTIME) ||
1036 {
1038 return 0;
1039 }
1040
1041 if (!len) buffer = NULL;
1042
1043 if (!(lenW = GetLocaleInfoW( lcid, lctype, NULL, 0 ))) return 0;
1044
1045 if (!(bufferW = HeapAlloc( GetProcessHeap(), 0, lenW * sizeof(WCHAR) )))
1046 {
1048 return 0;
1049 }
1050 if ((ret = GetLocaleInfoW( lcid, lctype, bufferW, lenW )))
1051 {
1052 if ((lctype & LOCALE_RETURN_NUMBER) ||
1054 {
1055 /* it's not an ASCII string, just bytes */
1056 ret *= sizeof(WCHAR);
1057 if (buffer)
1058 {
1059 if (ret <= len) memcpy( buffer, bufferW, ret );
1060 else
1061 {
1063 ret = 0;
1064 }
1065 }
1066 }
1067 else
1068 {
1070 if (!(lctype & LOCALE_USE_CP_ACP)) codepage = get_lcid_codepage( lcid );
1071 ret = WideCharToMultiByte( codepage, 0, bufferW, ret, buffer, len, NULL, NULL );
1072 }
1073 }
1074 HeapFree( GetProcessHeap(), 0, bufferW );
1075 return ret;
1076}
#define LOCALE_LOCALEINFOFLAGSMASK
Definition: lang.c:48
int codepage
Definition: win_iconv.c:156
#define LOCALE_SSHORTTIME
Definition: winnls.h:163

Referenced by __GetLocaleInfoUsingACP(), __GetLocaleName(), __intGetACP(), __intGetOCP(), _Locale_monetary_create(), _Locale_n_cs_precedes(), _Locale_n_sep_by_space(), _Locale_n_sign_posn(), _Locale_numeric_create(), _Locale_p_cs_precedes(), _Locale_p_sep_by_space(), _Locale_p_sign_posn(), _Locale_time_create(), compare_info(), detect_locale(), DosGetCountryInfo(), EnumLocalesProcA(), filetime_to_str(), is_rtl(), lcid_to_rfc1766A(), lineGetTranslateCapsA(), MSVCRT__create_locale(), MSVCRT_locale_to_LCID(), NLS_EnumDateFormats(), NLS_EnumTimeFormats(), START_TEST(), test__Gettnames(), test_EM_POSFROMCHAR(), test_EM_SETCHARFORMAT(), test_EnumDateFormatsA(), test_EnumTimeFormatsA(), test_EnumTimeFormatsW(), test_firstDay(), test_GetAcceptLanguagesA(), test_GetLocaleInfoA(), test_GetLocaleInfoW(), test_hittest(), test_invariant(), test_setlocale(), test_threadcp(), test_VarAbs(), test_VarCat(), test_VarFormat(), test_VarFormatNumber(), test_VarRound(), test_wm_set_get_text(), update_threadlocinfo_category(), and VerLanguageNameA().

◆ GetLocaleInfoW()

INT WINAPI GetLocaleInfoW ( LCID  lcid,
LCTYPE  lctype,
LPWSTR  buffer,
INT  len 
)

Definition at line 1102 of file lang.c.

1103{
1104 LANGID lang_id;
1105 HRSRC hrsrc;
1106 HGLOBAL hmem;
1107 LPCWSTR lpType, lpName;
1108 INT ret;
1109 UINT lcflags;
1110 const WCHAR *p;
1111 unsigned int i;
1112
1113 if (len < 0 || (len && !buffer))
1114 {
1116 return 0;
1117 }
1118 if (lctype & LOCALE_RETURN_GENITIVE_NAMES &&
1119 !is_genitive_name_supported( lctype ))
1120 {
1122 return 0;
1123 }
1124
1125 if (!len) buffer = NULL;
1126
1127 lcid = convert_default_lcid( lcid, lctype );
1128
1129 lcflags = lctype & LOCALE_LOCALEINFOFLAGSMASK;
1130 lctype &= 0xffff;
1131
1132 TRACE( "(lcid=0x%x,lctype=0x%x,%p,%d)\n", lcid, lctype, buffer, len );
1133
1134 /* first check for overrides in the registry */
1135
1136 if (!(lcflags & LOCALE_NOUSEROVERRIDE) &&
1137 lcid == convert_default_lcid( LOCALE_USER_DEFAULT, lctype ))
1138 {
1140
1141 if (value)
1142 {
1143 if (lcflags & LOCALE_RETURN_NUMBER)
1144 {
1145 WCHAR tmp[16];
1146 ret = get_registry_locale_info( value, tmp, sizeof(tmp)/sizeof(WCHAR) );
1147 if (ret > 0)
1148 {
1149 WCHAR *end;
1151 if (*end) /* invalid number */
1152 {
1154 return 0;
1155 }
1156 ret = sizeof(UINT)/sizeof(WCHAR);
1157 if (!buffer) return ret;
1158 if (ret > len)
1159 {
1161 return 0;
1162 }
1163 memcpy( buffer, &number, sizeof(number) );
1164 }
1165 }
1167
1168 if (ret != -1) return ret;
1169 }
1170 }
1171
1172 /* now load it from kernel resources */
1173
1174 lang_id = LANGIDFROMLCID( lcid );
1175
1176 /* replace SUBLANG_NEUTRAL by SUBLANG_DEFAULT */
1177 if (SUBLANGID(lang_id) == SUBLANG_NEUTRAL)
1178 lang_id = MAKELANGID(PRIMARYLANGID(lang_id), SUBLANG_DEFAULT);
1179
1181 {
1182 lpType = MAKEINTRESOURCEW(RT_STRING);
1184 }
1185 else
1186 {
1187 lpType = MAKEINTRESOURCEW(RT_RCDATA);
1189 }
1190
1191 if (!(hrsrc = FindResourceExW( kernel32_handle, lpType, lpName, lang_id )))
1192 {
1193 SetLastError( ERROR_INVALID_FLAGS ); /* no such lctype */
1194 return 0;
1195 }
1196 if (!(hmem = LoadResource( kernel32_handle, hrsrc )))
1197 return 0;
1198
1199 p = LockResource( hmem );
1201 {
1202 for (i = 0; i < (lctype & 0x0f); i++) p += *p + 1;
1203 }
1204
1205 if (lcflags & LOCALE_RETURN_NUMBER) ret = sizeof(UINT)/sizeof(WCHAR);
1206 else if (is_genitive_name_supported( lctype ) && *p)
1207 {
1208 /* genitive form's stored after a null separator from a nominative */
1209 for (i = 1; i <= *p; i++) if (!p[i]) break;
1210
1211 if (i <= *p && (lcflags & LOCALE_RETURN_GENITIVE_NAMES))
1212 {
1213 ret = *p - i + 1;
1214 p += i;
1215 }
1216 else ret = i;
1217 }
1218 else if (lctype != LOCALE_FONTSIGNATURE)
1219 ret = *p + 1;
1220 else
1221 ret = SizeofResource(kernel32_handle, hrsrc) / sizeof(WCHAR);
1222
1223 if (!buffer) return ret;
1224
1225 if (ret > len)
1226 {
1228 return 0;
1229 }
1230
1231 if (lcflags & LOCALE_RETURN_NUMBER)
1232 {
1233 UINT number;
1234 WCHAR *end, *tmp = HeapAlloc( GetProcessHeap(), 0, (*p + 1) * sizeof(WCHAR) );
1235 if (!tmp) return 0;
1236 memcpy( tmp, p + 1, *p * sizeof(WCHAR) );
1237 tmp[*p] = 0;
1239 if (!*end)
1240 memcpy( buffer, &number, sizeof(number) );
1241 else /* invalid number */
1242 {
1244 ret = 0;
1245 }
1246 HeapFree( GetProcessHeap(), 0, tmp );
1247
1248 TRACE( "(lcid=0x%x,lctype=0x%x,%p,%d) returning number %d\n",
1249 lcid, lctype, buffer, len, number );
1250 }
1251 else
1252 {
1253 if (lctype != LOCALE_FONTSIGNATURE) p++;
1254 memcpy( buffer, p, ret * sizeof(WCHAR) );
1255 if (lctype != LOCALE_FONTSIGNATURE) buffer[ret-1] = 0;
1256
1257 TRACE( "(lcid=0x%x,lctype=0x%x,%p,%d) returning %d %s\n",
1258 lcid, lctype, buffer, len, ret, debugstr_w(buffer) );
1259 }
1260 return ret;
1261}
#define ULongToPtr(ul)
Definition: basetsd.h:92
DWORD WINAPI SizeofResource(HINSTANCE hModule, HRSRC hRsrc)
Definition: res.c:568
LPVOID WINAPI LockResource(HGLOBAL handle)
Definition: res.c:550
HRSRC WINAPI FindResourceExW(HMODULE hModule, LPCWSTR type, LPCWSTR name, WORD lang)
Definition: res.c:164
HGLOBAL WINAPI LoadResource(HINSTANCE hModule, HRSRC hRsrc)
Definition: res.c:532
GLuint GLuint end
Definition: gl.h:1545
GLfloat GLfloat p
Definition: glext.h:8902
#define debugstr_w
Definition: kernel32.h:32
static struct registry_value * get_locale_registry_value(DWORD lctype)
Definition: lang.c:1088
static INT get_registry_locale_info(struct registry_value *registry_value, LPWSTR buffer, INT len)
Definition: lang.c:890
static LCID convert_default_lcid(LCID lcid, LCTYPE lctype)
Definition: lang.c:519
static BOOL is_genitive_name_supported(LCTYPE lctype)
Definition: lang.c:670
static int get_value_base_by_lctype(LCTYPE lctype)
Definition: lang.c:1078
static unsigned int number
Definition: dsound.c:1479
#define RT_RCDATA
Definition: pedump.c:372
#define strtolW(s, e, b)
Definition: unicode.h:33
DWORD lctype
Definition: lang.c:194
Definition: pdh_main.c:94
_In_ LPCSTR lpName
Definition: winbase.h:2776
#define MAKEINTRESOURCEW(i)
Definition: winuser.h:582

Referenced by __crtGetLocaleInfoW(), _WLocale_abbrev_dayofweek(), _WLocale_abbrev_monthname(), _WLocale_am_str(), _WLocale_currency_symbol(), _WLocale_decimal_point(), _WLocale_full_dayofweek(), _WLocale_full_monthname(), _WLocale_int_curr_symbol(), _WLocale_negative_sign(), _WLocale_pm_str(), _WLocale_positive_sign(), _WLocale_thousands_sep(), AboutDlgProc(), add_cert_to_list(), add_cert_to_view(), add_date_string_to_control(), AddCommasW(), AddNewKbLayoutsByLcid(), AddNewLayout(), AllSysInfo(), CConfigParser::CacheINI(), create_utc_string(), CreateLanguagesList(), CreateLayoutIcon(), CreateSortList(), date_parse(), date_to_string(), dateobj_to_date_string(), DATETIME_GetFieldWidth(), DATETIME_ReturnTxt(), DATETIME_SetFormatW(), detect_locale(), enum_locale_ex_proc(), enum_locales_proc(), fill_language_information(), FillMonthsComboBox(), FillNumberFmt(), fnIMultiLanguage3_GetRfc1766Info(), fnIMultiLanguage_GetRfc1766Info(), format_long_date(), format_size(), FormatInteger(), GeneralPropertyPageLocalesEnumProc(), get_countrycode(), get_date_format(), get_decimal_sep(), get_input_codepage(), get_lcid_codepage(), get_locale(), GetCalendarInfoW(), GetCurrencyFormatW(), GetFileVersion(), GetLocaleInfoA(), GetNumberFormatW(), InitializeDefaultUserLocale(), InitLanguagesList(), InputList_Add(), InputList_Create(), IntGetCodePageEntry(), is_default_metric(), IsLayoutExists(), lcid_to_rfc1766W(), LocaleList_Create(), LocalesEnumProc(), MONTHCAL_LButtonDown(), MONTHCAL_PaintTitle(), MONTHCAL_SetFirstDayOfWeek(), MonthCalFirstDayOfWeek(), MonthCalReload(), MSVCRT__create_locale(), NLS_EnumCalendarInfo(), NLS_EnumDateFormats(), NLS_EnumTimeFormats(), NLS_GetLocaleNumber(), NLS_GetLocaleString(), ParseDate(), ReadChmSystem(), SaveFontSubstitutionSettings(), SaveSystemSettings(), ScriptRecordDigitSubstitution(), SetUserLocaleName(), SH_FormatInteger(), SortEnumProc(), START_TEST(), test_EnumTimeFormatsW(), test_GetLocaleInfoEx(), test_GetLocaleInfoW(), test_unicode_wm_char(), test_VarWeekdayName(), TranslateCharsetInfo(), UPDOWN_GetThousandSep(), VarBstrFromDate(), VarDateFromStr(), VarFormatCurrency(), VarFormatNumber(), VARIANT_BstrReplaceDecimal(), VARIANT_FormatDate(), VARIANT_FormatNumber(), VARIANT_GetLocalisedNumberChars(), VarMonthName(), VarWeekdayName(), VerLanguageNameW(), and WriteUserLocale().

◆ GetLocalisedText()

UINT GetLocalisedText ( IN UINT  uID,
IN LPWSTR  lpszDest,
IN UINT  cchDest 
)

Referenced by NLS_GetGeoFriendlyName().

◆ GetStringTypeA()

BOOL WINAPI GetStringTypeA ( LCID  locale,
DWORD  type,
LPCSTR  src,
INT  count,
LPWORD  chartype 
)

Definition at line 1817 of file lang.c.

1818{
1819 UINT cp;
1820 INT countW;
1821 LPWSTR srcW;
1822 BOOL ret = FALSE;
1823
1824 if(count == -1) count = strlen(src) + 1;
1825
1826 if (!(cp = get_lcid_codepage( locale )))
1827 {
1828 FIXME("For locale %04x using current ANSI code page\n", locale);
1829 cp = GetACP();
1830 }
1831
1832 countW = MultiByteToWideChar(cp, 0, src, count, NULL, 0);
1833 if((srcW = HeapAlloc(GetProcessHeap(), 0, countW * sizeof(WCHAR))))
1834 {
1835 MultiByteToWideChar(cp, 0, src, count, srcW, countW);
1836 /*
1837 * NOTE: the target buffer has 1 word for each CHARACTER in the source
1838 * string, with multibyte characters there maybe be more bytes in count
1839 * than character space in the buffer!
1840 */
1841 ret = GetStringTypeW(type, srcW, countW, chartype);
1842 HeapFree(GetProcessHeap(), 0, srcW);
1843 }
1844 return ret;
1845}
Definition: _locale.h:75
unsigned int BOOL
Definition: ntddk_ex.h:94
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
GLuint GLuint GLsizei count
Definition: gl.h:1545
BOOL WINAPI GetStringTypeW(DWORD type, LPCWSTR src, INT count, LPWORD chartype)
Definition: lang.c:1703
POINT cp
Definition: magnifier.c:59
UINT WINAPI GetACP(void)
Definition: nls.c:2307

Referenced by _Locale_ctype_create(), GetStringTypeExA(), IsCharSpaceA(), and MSVCRT__create_locale().

◆ GetStringTypeExA()

BOOL WINAPI GetStringTypeExA ( LCID  locale,
DWORD  type,
LPCSTR  src,
INT  count,
LPWORD  chartype 
)

Definition at line 1864 of file lang.c.

1865{
1866 return GetStringTypeA(locale, type, src, count, chartype);
1867}
BOOL WINAPI GetStringTypeA(LCID locale, DWORD type, LPCSTR src, INT count, LPWORD chartype)
Definition: lang.c:1817

Referenced by _isctype_l().

◆ GetStringTypeExW()

BOOL WINAPI GetStringTypeExW ( LCID  locale,
DWORD  type,
LPCWSTR  src,
INT  count,
LPWORD  chartype 
)

Definition at line 1793 of file lang.c.

1794{
1795 /* locale is ignored for Unicode */
1796 return GetStringTypeW( type, src, count, chartype );
1797}

◆ GetStringTypeW()

BOOL WINAPI GetStringTypeW ( DWORD  type,
LPCWSTR  src,
INT  count,
LPWORD  chartype 
)

Definition at line 1703 of file lang.c.

1704{
1705 static const unsigned char type2_map[16] =
1706 {
1707 C2_NOTAPPLICABLE, /* unassigned */
1708 C2_LEFTTORIGHT, /* L */
1709 C2_RIGHTTOLEFT, /* R */
1710 C2_EUROPENUMBER, /* EN */
1711 C2_EUROPESEPARATOR, /* ES */
1712 C2_EUROPETERMINATOR, /* ET */
1713 C2_ARABICNUMBER, /* AN */
1714 C2_COMMONSEPARATOR, /* CS */
1715 C2_BLOCKSEPARATOR, /* B */
1716 C2_SEGMENTSEPARATOR, /* S */
1717 C2_WHITESPACE, /* WS */
1718 C2_OTHERNEUTRAL, /* ON */
1719 C2_RIGHTTOLEFT, /* AL */
1720 C2_NOTAPPLICABLE, /* NSM */
1721 C2_NOTAPPLICABLE, /* BN */
1722 C2_OTHERNEUTRAL /* LRE, LRO, RLE, RLO, PDF */
1723 };
1724
1725 if (!src)
1726 {
1728 return FALSE;
1729 }
1730
1731 if (count == -1) count = strlenW(src) + 1;
1732 switch(type)
1733 {
1734 case CT_CTYPE1:
1735 while (count--) *chartype++ = get_char_typeW( *src++ ) & 0xfff;
1736 break;
1737 case CT_CTYPE2:
1738 while (count--) *chartype++ = type2_map[get_char_typeW( *src++ ) >> 12];
1739 break;
1740 case CT_CTYPE3:
1741 {
1742 WARN("CT_CTYPE3: semi-stub.\n");
1743 while (count--)
1744 {
1745 int c = *src;
1746 WORD type1, type3 = 0; /* C3_NOTAPPLICABLE */
1747
1748 type1 = get_char_typeW( *src++ ) & 0xfff;
1749 /* try to construct type3 from type1 */
1750 if(type1 & C1_SPACE) type3 |= C3_SYMBOL;
1751 if(type1 & C1_ALPHA) type3 |= C3_ALPHA;
1752 if ((c>=0x30A0)&&(c<=0x30FF)) type3 |= C3_KATAKANA;
1753 if ((c>=0x3040)&&(c<=0x309F)) type3 |= C3_HIRAGANA;
1754 if ((c>=0x4E00)&&(c<=0x9FAF)) type3 |= C3_IDEOGRAPH;
1755 if (c == 0x0640) type3 |= C3_KASHIDA;
1756 if ((c>=0x3000)&&(c<=0x303F)) type3 |= C3_SYMBOL;
1757
1758 if ((c>=0xD800)&&(c<=0xDBFF)) type3 |= C3_HIGHSURROGATE;
1759 if ((c>=0xDC00)&&(c<=0xDFFF)) type3 |= C3_LOWSURROGATE;
1760
1761 if ((c>=0xFF00)&&(c<=0xFF60)) type3 |= C3_FULLWIDTH;
1762 if ((c>=0xFF00)&&(c<=0xFF20)) type3 |= C3_SYMBOL;
1763 if ((c>=0xFF3B)&&(c<=0xFF40)) type3 |= C3_SYMBOL;
1764 if ((c>=0xFF5B)&&(c<=0xFF60)) type3 |= C3_SYMBOL;
1765 if ((c>=0xFF21)&&(c<=0xFF3A)) type3 |= C3_ALPHA;
1766 if ((c>=0xFF41)&&(c<=0xFF5A)) type3 |= C3_ALPHA;
1767 if ((c>=0xFFE0)&&(c<=0xFFE6)) type3 |= C3_FULLWIDTH;
1768 if ((c>=0xFFE0)&&(c<=0xFFE6)) type3 |= C3_SYMBOL;
1769
1770 if ((c>=0xFF61)&&(c<=0xFFDC)) type3 |= C3_HALFWIDTH;
1771 if ((c>=0xFF61)&&(c<=0xFF64)) type3 |= C3_SYMBOL;
1772 if ((c>=0xFF65)&&(c<=0xFF9F)) type3 |= C3_KATAKANA;
1773 if ((c>=0xFF65)&&(c<=0xFF9F)) type3 |= C3_ALPHA;
1774 if ((c>=0xFFE8)&&(c<=0xFFEE)) type3 |= C3_HALFWIDTH;
1775 if ((c>=0xFFE8)&&(c<=0xFFEE)) type3 |= C3_SYMBOL;
1776 *chartype++ = type3;
1777 }
1778 break;
1779 }
1780 default:
1782 return FALSE;
1783 }
1784 return TRUE;
1785}
unsigned short WORD
Definition: ntddk_ex.h:93
const GLubyte * c
Definition: glext.h:8905
#define C1_SPACE
Definition: unicode.h:34
#define C1_ALPHA
Definition: unicode.h:39
WINE_UNICODE_INLINE unsigned short get_char_typeW(WCHAR ch)
Definition: unicode.h:149
#define C2_ARABICNUMBER
Definition: winnls.h:255
#define C3_FULLWIDTH
Definition: winnls.h:269
#define C3_ALPHA
Definition: winnls.h:273
#define C2_OTHERNEUTRAL
Definition: winnls.h:260
#define C2_LEFTTORIGHT
Definition: winnls.h:250
#define CT_CTYPE2
Definition: winnls.h:238
#define C3_IDEOGRAPH
Definition: winnls.h:270
#define CT_CTYPE3
Definition: winnls.h:239
#define CT_CTYPE1
Definition: winnls.h:237
#define C3_HALFWIDTH
Definition: winnls.h:268
#define C2_EUROPENUMBER
Definition: winnls.h:252
#define C3_SYMBOL
Definition: winnls.h:265
#define C3_LOWSURROGATE
Definition: winnls.h:276
#define C2_COMMONSEPARATOR
Definition: winnls.h:256
#define C3_KATAKANA
Definition: winnls.h:266
#define C2_EUROPESEPARATOR
Definition: winnls.h:253
#define C2_EUROPETERMINATOR
Definition: winnls.h:254
#define C2_SEGMENTSEPARATOR
Definition: winnls.h:258
#define C3_KASHIDA
Definition: winnls.h:271
#define C2_RIGHTTOLEFT
Definition: winnls.h:251
#define C3_HIRAGANA
Definition: winnls.h:267
#define C2_WHITESPACE
Definition: winnls.h:259
#define C3_HIGHSURROGATE
Definition: winnls.h:275
#define C2_NOTAPPLICABLE
Definition: winnls.h:261
#define C2_BLOCKSEPARATOR
Definition: winnls.h:257

Referenced by __crtGetStringTypeW(), _Locale_ctype_create(), _setmbcp_l(), _WLocale_ctype(), DoWordBreakProc(), get_char_script(), GetC1Type(), GetStringType3ExW(), GetStringTypeA(), GetStringTypeExW(), IsBlankLine(), IsCharBlankW(), IsCharCntrlW(), IsCharDigitW(), IsCharPunctW(), IsCharSpaceW(), IsCharXDigitW(), isdigitW(), SampCheckPassword(), test_crtGetStringTypeW(), and test_GetStringTypeW().

◆ GetSystemDefaultLangID()

◆ GetSystemDefaultLCID()

◆ GetSystemDefaultUILanguage()

LANGID WINAPI GetSystemDefaultUILanguage ( void  )

Definition at line 830 of file lang.c.

831{
832 LANGID lang;
834 return lang;
835}
NTSTATUS NTAPI NtQueryInstallUILanguage(OUT LANGID *LanguageId)
Definition: locale.c:368

Referenced by LsaLookupPrivilegeDisplayName(), and SHGetWebFolderFilePathW().

◆ GetThreadLocale()

◆ GetUserDefaultLangID()

◆ GetUserDefaultLCID()

◆ GetUserDefaultUILanguage()

LANGID WINAPI GetUserDefaultUILanguage ( void  )

Definition at line 810 of file lang.c.

811{
812 LANGID lang;
814 return lang;
815}
NTSTATUS NTAPI NtQueryDefaultUILanguage(OUT LANGID *LanguageId)
Definition: locale.c:402

Referenced by _tWinMain(), detect_locale(), FGetComponentPath(), LsaLookupPrivilegeDisplayName(), OmNavigator_get_browserLanguage(), SHGetWebFolderFilePathW(), test_GetFileVersionInfoEx(), WinMain(), and wWinMain().

◆ GetUserGeoID()

GEOID WINAPI GetUserGeoID ( GEOCLASS  GeoClass)

Definition at line 3348 of file lang.c.

3349{
3351 static const WCHAR geoW[] = {'G','e','o',0};
3352 static const WCHAR nationW[] = {'N','a','t','i','o','n',0};
3353 WCHAR bufferW[40], *end;
3354 DWORD count;
3355 HANDLE hkey, hSubkey = 0;
3356 UNICODE_STRING keyW;
3358 RtlInitUnicodeString( &keyW, nationW );
3359 count = sizeof(bufferW);
3360
3361 if(!(hkey = create_registry_key())) return ret;
3362
3363 switch( GeoClass ){
3364 case GEOCLASS_NATION:
3365 if ((hSubkey = NLS_RegOpenKey(hkey, geoW)))
3366 {
3367 if((NtQueryValueKey(hSubkey, &keyW, KeyValuePartialInformation,
3368 bufferW, count, &count) == STATUS_SUCCESS ) && info->DataLength)
3369 ret = strtolW((LPCWSTR)info->Data, &end, 10);
3370 }
3371 break;
3372 case GEOCLASS_REGION:
3373 FIXME("GEOCLASS_REGION not handled yet\n");
3374 break;
3375 }
3376
3377 NtClose(hkey);
3378 if (hSubkey) NtClose(hSubkey);
3379 return ret;
3380}
static HANDLE NLS_RegOpenKey(HANDLE hRootKey, LPCWSTR szKeyName)
Definition: lang.c:2379
#define GEOID_NOT_AVAILABLE
Definition: winnls.h:13
DWORD GEOID
Definition: winnls.h:521

Referenced by CreateLocationsList(), and SetUserLocaleName().

◆ InvalidateNLSCache()

BOOL WINAPI InvalidateNLSCache ( void  )

Definition at line 3334 of file lang.c.

3335{
3336#ifdef __REACTOS__
3338 return TRUE;
3339#else
3340 FIXME("() stub\n");
3341 return FALSE;
3342#endif
3343}
void JapaneseEra_ClearCache(void)
Definition: japanese.c:38

◆ is_genitive_name_supported()

static BOOL is_genitive_name_supported ( LCTYPE  lctype)
static

Definition at line 670 of file lang.c.

671{
672 switch(lctype & 0xffff)
673 {
687 return TRUE;
688 default:
689 return FALSE;
690 }
691}

Referenced by GetLocaleInfoW().

◆ IsValidLanguageGroup()

BOOL WINAPI IsValidLanguageGroup ( LGRPID  lgrpid,
DWORD  dwFlags 
)

Definition at line 2651 of file lang.c.

2652{
2653 static const WCHAR szFormat[] = { '%','x','\0' };
2654 WCHAR szValueName[16], szValue[2];
2655 BOOL bSupported = FALSE, bInstalled = FALSE;
2656 HANDLE hKey;
2657
2658
2659 switch (dwFlags)
2660 {
2661 case LGRPID_INSTALLED:
2662 case LGRPID_SUPPORTED:
2663
2665
2666 sprintfW( szValueName, szFormat, lgrpid );
2667
2668 if (NLS_RegGetDword( hKey, szValueName, (LPDWORD)szValue ))
2669 {
2670 bSupported = TRUE;
2671
2672 if (szValue[0] == '1')
2673 bInstalled = TRUE;
2674 }
2675
2676 if (hKey)
2677 NtClose( hKey );
2678
2679 break;
2680 }
2681
2682 if ((dwFlags == LGRPID_SUPPORTED && bSupported) ||
2683 (dwFlags == LGRPID_INSTALLED && bInstalled))
2684 return TRUE;
2685
2686 return FALSE;
2687}
FxAutoRegKey hKey
static const WCHAR szLangGroupsKeyName[]
Definition: lang.c:58
static BOOL NLS_RegGetDword(HANDLE hKey, LPCWSTR szValueName, DWORD *lpVal)
Definition: lang.c:2432
uint32_t * LPDWORD
Definition: typedefs.h:59
#define LGRPID_INSTALLED
Definition: winnls.h:458
#define LGRPID_SUPPORTED
Definition: winnls.h:459

Referenced by InitFunctionPointers().

◆ IsValidLocale()

◆ LCMapStringA()

INT WINAPI LCMapStringA ( LCID  lcid,
DWORD  flags,
LPCSTR  src,
INT  srclen,
LPSTR  dst,
INT  dstlen 
)

Definition at line 2051 of file lang.c.

2053{
2054 WCHAR *bufW = NtCurrentTeb()->StaticUnicodeBuffer;
2055 LPWSTR srcW, dstW;
2056 INT ret = 0, srclenW, dstlenW;
2057 UINT locale_cp = CP_ACP;
2058
2059 if (!src || !srclen || dstlen < 0)
2060 {
2062 return 0;
2063 }
2064
2065 if (!(flags & LOCALE_USE_CP_ACP)) locale_cp = get_lcid_codepage( lcid );
2066
2067 srclenW = MultiByteToWideChar(locale_cp, 0, src, srclen, bufW, 260);
2068 if (srclenW)
2069 srcW = bufW;
2070 else
2071 {
2072 srclenW = MultiByteToWideChar(locale_cp, 0, src, srclen, NULL, 0);
2073 srcW = HeapAlloc(GetProcessHeap(), 0, srclenW * sizeof(WCHAR));
2074 if (!srcW)
2075 {
2077 return 0;
2078 }
2079 MultiByteToWideChar(locale_cp, 0, src, srclen, srcW, srclenW);
2080 }
2081
2082 if (flags & LCMAP_SORTKEY)
2083 {
2084 if (src == dst)
2085 {
2087 goto map_string_exit;
2088 }
2089 ret = wine_get_sortkey(flags, srcW, srclenW, dst, dstlen);
2090 if (ret == 0)
2092 else
2093 ret++;
2094 goto map_string_exit;
2095 }
2096
2097 if (flags & SORT_STRINGSORT)
2098 {
2100 goto map_string_exit;
2101 }
2102
2103 dstlenW = LCMapStringEx(NULL, flags, srcW, srclenW, NULL, 0, NULL, NULL, 0);
2104 if (!dstlenW)
2105 goto map_string_exit;
2106
2107 dstW = HeapAlloc(GetProcessHeap(), 0, dstlenW * sizeof(WCHAR));
2108 if (!dstW)
2109 {
2111 goto map_string_exit;
2112 }
2113
2114 LCMapStringEx(NULL, flags, srcW, srclenW, dstW, dstlenW, NULL, NULL, 0);
2115 ret = WideCharToMultiByte(locale_cp, 0, dstW, dstlenW, dst, dstlen, NULL, NULL);
2116 HeapFree(GetProcessHeap(), 0, dstW);
2117
2118map_string_exit:
2119 if (srcW != bufW) HeapFree(GetProcessHeap(), 0, srcW);
2120 return ret;
2121}
int wine_get_sortkey(int flags, const WCHAR *src, int srclen, char *dst, int dstlen)
Definition: sortkey.c:33
INT WINAPI LCMapStringEx(LPCWSTR name, DWORD flags, LPCWSTR src, INT srclen, LPWSTR dst, INT dstlen, LPNLSVERSIONINFO version, LPVOID reserved, LPARAM lparam)
Definition: lang.c:1889
#define LCMAP_SORTKEY
Definition: winnls.h:186

Referenced by __crtLCMapStringA(), _Locale_strxfrm(), _Locale_tolower(), _Locale_toupper(), _strxfrm_l(), compare_string3(), lcid_to_rfc1766A(), MSVCRT__create_locale(), test_GetRfc1766FromLcid(), test_LcidToRfc1766(), and test_LCMapStringA().

◆ LCMapStringEx()

INT WINAPI LCMapStringEx ( LPCWSTR  name,
DWORD  flags,
LPCWSTR  src,
INT  srclen,
LPWSTR  dst,
INT  dstlen,
LPNLSVERSIONINFO  version,
LPVOID  reserved,
LPARAM  lparam 
)

Definition at line 1889 of file lang.c.

1891{
1892 LPWSTR dst_ptr;
1893
1894 if (version) FIXME("unsupported version structure %p\n", version);
1895 if (reserved) FIXME("unsupported reserved pointer %p\n", reserved);
1896 if (lparam)
1897 {
1898 static int once;
1899 if (!once++) FIXME("unsupported lparam %lx\n", lparam);
1900 }
1901
1902 if (!src || !srclen || dstlen < 0)
1903 {
1905 return 0;
1906 }
1907
1908 /* mutually exclusive flags */
1913 {
1915 return 0;
1916 }
1917
1918 if (!dstlen) dst = NULL;
1919
1920 if (flags & LCMAP_SORTKEY)
1921 {
1922 INT ret;
1923 if (src == dst)
1924 {
1926 return 0;
1927 }
1928
1929 if (srclen < 0) srclen = strlenW(src);
1930
1931 TRACE("(%s,0x%08x,%s,%d,%p,%d)\n",
1933
1934 ret = wine_get_sortkey(flags, src, srclen, (char *)dst, dstlen);
1935 if (ret == 0)
1937 else
1938 ret++;
1939 return ret;
1940 }
1941
1942 /* SORT_STRINGSORT must be used exclusively with LCMAP_SORTKEY */
1943 if (flags & SORT_STRINGSORT)
1944 {
1946 return 0;
1947 }
1948
1949 if (srclen < 0) srclen = strlenW(src) + 1;
1950
1951 TRACE("(%s,0x%08x,%s,%d,%p,%d)\n",
1953
1954 if (!dst) /* return required string length */
1955 {
1956 INT len;
1957
1958 for (len = 0; srclen; src++, srclen--)
1959 {
1960 WCHAR wch = *src;
1961 /* tests show that win2k just ignores NORM_IGNORENONSPACE,
1962 * and skips white space and punctuation characters for
1963 * NORM_IGNORESYMBOLS.
1964 */
1966 continue;
1967 len++;
1968 }
1969 return len;
1970 }
1971
1972 if (flags & LCMAP_UPPERCASE)
1973 {
1974 for (dst_ptr = dst; srclen && dstlen; src++, srclen--)
1975 {
1976 WCHAR wch = *src;
1978 continue;
1979 *dst_ptr++ = toupperW(wch);
1980 dstlen--;
1981 }
1982 }
1983 else if (flags & LCMAP_LOWERCASE)
1984 {
1985 for (dst_ptr = dst; srclen && dstlen; src++, srclen--)
1986 {
1987 WCHAR wch = *src;
1989 continue;
1990 *dst_ptr++ = tolowerW(wch);
1991 dstlen--;
1992 }
1993 }
1994 else
1995 {
1996 if (src == dst)
1997 {
1999 return 0;
2000 }
2001 for (dst_ptr = dst; srclen && dstlen; src++, srclen--)
2002 {
2003 WCHAR wch = *src;
2005 continue;
2006 *dst_ptr++ = wch;
2007 dstlen--;
2008 }
2009 }
2010
2011 if (srclen)
2012 {
2014 return 0;
2015 }
2016
2017 return dst_ptr - dst;
2018}
#define C1_PUNCT
Definition: unicode.h:35
#define debugstr_wn
Definition: kernel32.h:33
#define toupperW(n)
Definition: unicode.h:45
#define tolowerW(n)
Definition: unicode.h:44
Definition: name.c:39
#define LCMAP_SIMPLIFIED_CHINESE
Definition: winnls.h:193
#define LCMAP_TRADITIONAL_CHINESE
Definition: winnls.h:194
#define LCMAP_HALFWIDTH
Definition: winnls.h:190
#define LCMAP_HIRAGANA
Definition: winnls.h:188
#define LCMAP_UPPERCASE
Definition: winnls.h:185
#define LCMAP_LOWERCASE
Definition: winnls.h:184
#define LCMAP_KATAKANA
Definition: winnls.h:189
#define LCMAP_FULLWIDTH
Definition: winnls.h:191

Referenced by InitFunctionPointers(), LCMapStringA(), and LCMapStringW().

◆ LCMapStringW()

INT WINAPI LCMapStringW ( LCID  lcid,
DWORD  flags,
LPCWSTR  src,
INT  srclen,
LPWSTR  dst,
INT  dstlen 
)

Definition at line 2025 of file lang.c.

2027{
2028 TRACE("(0x%04x,0x%08x,%s,%d,%p,%d)\n",
2030
2031 return LCMapStringEx(NULL, flags, src, srclen, dst, dstlen, NULL, NULL, 0);
2032}

Referenced by __crtLCMapStringW(), _WLocale_strxfrm(), _WLocale_tolower(), _WLocale_toupper(), lcid_to_rfc1766W(), LCMapStringW_wrapper(), SvchostCharLowerW(), test_LCMapStringW(), and test_tolower().

◆ NLS_EnumLanguageGroupLocales()

static BOOL NLS_EnumLanguageGroupLocales ( ENUMLANGUAGEGROUPLOCALE_CALLBACKS lpProcs)
static

Definition at line 2700 of file lang.c.

2701{
2702 static const WCHAR szAlternateSortsKeyName[] = {
2703 'A','l','t','e','r','n','a','t','e',' ','S','o','r','t','s','\0'
2704 };
2705 WCHAR szNumber[10], szValue[4];
2706 HANDLE hKey;
2707 BOOL bContinue = TRUE, bAlternate = FALSE;
2708 LGRPID lgrpid;
2709 ULONG ulIndex = 1; /* Ignore default entry of 1st key */
2710
2711 if (!lpProcs || !lpProcs->lgrpid || lpProcs->lgrpid > LGRPID_ARMENIAN)
2712 {
2714 return FALSE;
2715 }
2716
2717 if (lpProcs->dwFlags)
2718 {
2720 return FALSE;
2721 }
2722
2724
2725 if (!hKey)
2726 WARN("NLS registry key not found. Please apply the default registry file 'wine.inf'\n");
2727
2728 while (bContinue)
2729 {
2730 if (NLS_RegEnumValue( hKey, ulIndex, szNumber, sizeof(szNumber),
2731 szValue, sizeof(szValue) ))
2732 {
2733 lgrpid = strtoulW( szValue, NULL, 16 );
2734
2735 TRACE("lcid %s, grpid %d (%smatched)\n", debugstr_w(szNumber),
2736 lgrpid, lgrpid == lpProcs->lgrpid ? "" : "not ");
2737
2738 if (lgrpid == lpProcs->lgrpid)
2739 {
2740 LCID lcid;
2741
2742 lcid = strtoulW( szNumber, NULL, 16 );
2743
2744 /* FIXME: native returns extra text for a few (17/150) locales, e.g:
2745 * '00000437 ;Georgian'
2746 * At present we only pass the LCID string.
2747 */
2748
2749 if (lpProcs->procW)
2750 bContinue = lpProcs->procW( lgrpid, lcid, szNumber, lpProcs->lParam );
2751 else
2752 {
2753 char szNumberA[sizeof(szNumber)/sizeof(WCHAR)];
2754
2755 WideCharToMultiByte(CP_ACP, 0, szNumber, -1, szNumberA, sizeof(szNumberA), 0, 0);
2756
2757 bContinue = lpProcs->procA( lgrpid, lcid, szNumberA, lpProcs->lParam );
2758 }
2759 }
2760
2761 ulIndex++;
2762 }
2763 else
2764 {
2765 /* Finished enumerating this key */
2766 if (!bAlternate)
2767 {
2768 /* Enumerate alternate sorts also */
2769 hKey = NLS_RegOpenKey( hKey, szAlternateSortsKeyName );
2770 bAlternate = TRUE;
2771 ulIndex = 0;
2772 }
2773 else
2774 bContinue = FALSE; /* Finished both keys */
2775 }
2776
2777 if (!bContinue)
2778 break;
2779 }
2780
2781 if (hKey)
2782 NtClose( hKey );
2783
2784 return TRUE;
2785}
static const WCHAR szLocaleKeyName[]
Definition: lang.c:51
static BOOL NLS_RegEnumValue(HANDLE hKey, UINT ulIndex, LPWSTR szValueName, ULONG valueNameSize, LPWSTR szValueData, ULONG valueDataSize)
Definition: lang.c:2404
unsigned int ULONG
Definition: retypes.h:1
#define strtoulW(s1, s2, b)
Definition: unicode.h:41
LANGGROUPLOCALE_ENUMPROCW procW
Definition: lang.c:2693
LANGGROUPLOCALE_ENUMPROCA procA
Definition: lang.c:2692
ULONG ulIndex
Definition: symbols.c:92
DWORD LGRPID
Definition: winnls.h:520
#define LGRPID_ARMENIAN
Definition: winnls.h:476

Referenced by EnumLanguageGroupLocalesA(), and EnumLanguageGroupLocalesW().

◆ NLS_EnumSystemCodePages()

static BOOL NLS_EnumSystemCodePages ( ENUMSYSTEMCODEPAGES_CALLBACKS lpProcs)
static

Definition at line 3165 of file lang.c.

3166{
3167 WCHAR szNumber[5 + 1], szValue[MAX_PATH];
3168 HANDLE hKey;
3169 BOOL bContinue = TRUE;
3170 ULONG ulIndex = 0;
3171
3172 if (!lpProcs)
3173 {
3175 return FALSE;
3176 }
3177
3178 switch (lpProcs->dwFlags)
3179 {
3180 case CP_INSTALLED:
3181 case CP_SUPPORTED:
3182 break;
3183 default:
3185 return FALSE;
3186 }
3187
3188 hKey = NLS_RegOpenKey(0, L"\\Registry\\Machine\\SYSTEM\\CurrentControlSet\\Control\\NLS\\CodePage");
3189 if (!hKey)
3190 {
3191 WARN("NLS_RegOpenKey() failed\n");
3192 return FALSE;
3193 }
3194
3195 while (bContinue)
3196 {
3197 if (NLS_RegEnumValue(hKey, ulIndex, szNumber, sizeof(szNumber),
3198 szValue, sizeof(szValue)))
3199 {
3200 if ((lpProcs->dwFlags == CP_SUPPORTED)||
3201 ((lpProcs->dwFlags == CP_INSTALLED)&&(wcslen(szValue) > 2)))
3202 {
3203 if (lpProcs->procW)
3204 {
3205 bContinue = lpProcs->procW(szNumber);
3206 }
3207 else
3208 {
3209 char szNumberA[sizeof(szNumber)/sizeof(WCHAR)];
3210
3211 WideCharToMultiByte(CP_ACP, 0, szNumber, -1, szNumberA, sizeof(szNumberA), 0, 0);
3212 bContinue = lpProcs->procA(szNumberA);
3213 }
3214 }
3215
3216 ulIndex++;
3217
3218 } else bContinue = FALSE;
3219
3220 if (!bContinue)
3221 break;
3222 }
3223
3224 if (hKey)
3225 NtClose(hKey);
3226
3227 return TRUE;
3228}
#define MAX_PATH
Definition: compat.h:34
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
#define L(x)
Definition: ntvdm.h:50
#define CP_INSTALLED
Definition: winnls.h:199
#define CP_SUPPORTED
Definition: winnls.h:200

Referenced by EnumSystemCodePagesA(), and EnumSystemCodePagesW().

◆ NLS_EnumSystemLanguageGroups()

static BOOL NLS_EnumSystemLanguageGroups ( ENUMLANGUAGEGROUP_CALLBACKS lpProcs)
static

Definition at line 2504 of file lang.c.

2505{
2506 WCHAR szNumber[10], szValue[4];
2507 HANDLE hKey;
2508 BOOL bContinue = TRUE;
2509 ULONG ulIndex = 0;
2510
2511 if (!lpProcs)
2512 {
2514 return FALSE;
2515 }
2516
2517 switch (lpProcs->dwFlags)
2518 {
2519 case 0:
2520 /* Default to LGRPID_INSTALLED */
2521 lpProcs->dwFlags = LGRPID_INSTALLED;
2522 /* Fall through... */
2523 case LGRPID_INSTALLED:
2524 case LGRPID_SUPPORTED:
2525 break;
2526 default:
2528 return FALSE;
2529 }
2530
2532
2533 if (!hKey)
2534 FIXME("NLS registry key not found. Please apply the default registry file 'wine.inf'\n");
2535
2536 while (bContinue)
2537 {
2538 if (NLS_RegEnumValue( hKey, ulIndex, szNumber, sizeof(szNumber),
2539 szValue, sizeof(szValue) ))
2540 {
2541 BOOL bInstalled = szValue[0] == '1';
2542 LGRPID lgrpid = strtoulW( szNumber, NULL, 16 );
2543
2544 TRACE("grpid %s (%sinstalled)\n", debugstr_w(szNumber),
2545 bInstalled ? "" : "not ");
2546
2547 if (lpProcs->dwFlags == LGRPID_SUPPORTED || bInstalled)
2548 {
2549 WCHAR szGrpName[48];
2550
2551 if (!NLS_GetLanguageGroupName( lgrpid, szGrpName, sizeof(szGrpName) / sizeof(WCHAR) ))
2552 szGrpName[0] = '\0';
2553
2554 if (lpProcs->procW)
2555 bContinue = lpProcs->procW( lgrpid, szNumber, szGrpName, lpProcs->dwFlags,
2556 lpProcs->lParam );
2557 else
2558 {
2559 char szNumberA[sizeof(szNumber)/sizeof(WCHAR)];
2560 char szGrpNameA[48];
2561
2562 /* FIXME: MSDN doesn't say which code page the W->A translation uses,
2563 * or whether the language names are ever localised. Assume CP_ACP.
2564 */
2565
2566 WideCharToMultiByte(CP_ACP, 0, szNumber, -1, szNumberA, sizeof(szNumberA), 0, 0);
2567 WideCharToMultiByte(CP_ACP, 0, szGrpName, -1, szGrpNameA, sizeof(szGrpNameA), 0, 0);
2568
2569 bContinue = lpProcs->procA( lgrpid, szNumberA, szGrpNameA, lpProcs->dwFlags,
2570 lpProcs->lParam );
2571 }
2572 }
2573
2574 ulIndex++;
2575 }
2576 else
2577 bContinue = FALSE;
2578
2579 if (!bContinue)
2580 break;
2581 }
2582
2583 if (hKey)
2584 NtClose( hKey );
2585
2586 return TRUE;
2587}
static BOOL NLS_GetLanguageGroupName(LGRPID lgrpid, LPWSTR szName, ULONG nameSize)
Definition: lang.c:2453

Referenced by EnumSystemLanguageGroupsA(), and EnumSystemLanguageGroupsW().

◆ NLS_GetGeoFriendlyName()

static int NLS_GetGeoFriendlyName ( GEOID  Location,
LPWSTR  szFriendlyName,
int  cchData 
)
static

Definition at line 3513 of file lang.c.

3515{
3516 /* FIXME: move *.nls resources out of kernel32 into locale.nls */
3517 Location += NLSRC_OFFSET;
3518 Location &= 0xFFFF;
3519
3520 if (cchData == 0)
3521#ifdef __REACTOS__
3522 return GetLocalisedText(Location, NULL, 0, lang);
3523#else
3524 return GetLocalisedText(Location, NULL, 0);
3525#endif
3526
3527#ifdef __REACTOS__
3528 if (GetLocalisedText(Location, szFriendlyName, (UINT)cchData, lang))
3529#else
3530 if (GetLocalisedText(Location, szFriendlyName, (UINT)cchData))
3531#endif
3532 return strlenW(szFriendlyName) + 1;
3533
3534 return 0;
3535}
#define NLSRC_OFFSET
Definition: lang.c:44
UINT GetLocalisedText(IN UINT uID, IN LPWSTR lpszDest, IN UINT cchDest)

Referenced by GetGeoInfoW().

◆ NLS_GetLanguageGroupName()

static BOOL NLS_GetLanguageGroupName ( LGRPID  lgrpid,
LPWSTR  szName,
ULONG  nameSize 
)
static

Definition at line 2453 of file lang.c.

2454{
2455 LANGID langId;
2456 LPCWSTR szResourceName = MAKEINTRESOURCEW(((lgrpid + 0x2000) >> 4) + 1);
2457 HRSRC hResource;
2458 BOOL bRet = FALSE;
2459
2460 /* FIXME: Is it correct to use the system default langid? */
2461 langId = GetSystemDefaultLangID();
2462
2463 if (SUBLANGID(langId) == SUBLANG_NEUTRAL)
2464 langId = MAKELANGID( PRIMARYLANGID(langId), SUBLANG_DEFAULT );
2465
2466 hResource = FindResourceExW( kernel32_handle, (LPWSTR)RT_STRING, szResourceName, langId );
2467
2468 if (hResource)
2469 {
2470 HGLOBAL hResDir = LoadResource( kernel32_handle, hResource );
2471
2472 if (hResDir)
2473 {
2474 ULONG iResourceIndex = lgrpid & 0xf;
2475 LPCWSTR lpResEntry = LockResource( hResDir );
2476 ULONG i;
2477
2478 for (i = 0; i < iResourceIndex; i++)
2479 lpResEntry += *lpResEntry + 1;
2480
2481 if (*lpResEntry < nameSize)
2482 {
2483 memcpy( szName, lpResEntry + 1, *lpResEntry * sizeof(WCHAR) );
2484 szName[*lpResEntry] = '\0';
2485 bRet = TRUE;
2486 }
2487
2488 }
2489 FreeResource( hResource );
2490 }
2491 return bRet;
2492}
BOOL WINAPI FreeResource(HGLOBAL handle)
Definition: res.c:559
LANGID WINAPI GetSystemDefaultLangID(void)
Definition: lang.c:755
static const WCHAR szName[]
Definition: powrprof.c:45

Referenced by NLS_EnumSystemLanguageGroups().

◆ NLS_RegEnumValue()

static BOOL NLS_RegEnumValue ( HANDLE  hKey,
UINT  ulIndex,
LPWSTR  szValueName,
ULONG  valueNameSize,
LPWSTR  szValueData,
ULONG  valueDataSize 
)
static

Definition at line 2404 of file lang.c.

2408{
2409 BYTE buffer[80];
2411 DWORD dwLen;
2412
2414 buffer, sizeof(buffer), &dwLen ) != STATUS_SUCCESS ||
2415 info->NameLength > valueNameSize ||
2416 info->DataLength > valueDataSize)
2417 {
2418 return FALSE;
2419 }
2420
2421 TRACE("info->Name %s info->DataLength %d\n", debugstr_w(info->Name), info->DataLength);
2422
2423 memcpy( szValueName, info->Name, info->NameLength);
2424 szValueName[info->NameLength / sizeof(WCHAR)] = '\0';
2425 memcpy( szValueData, buffer + info->DataOffset, info->DataLength );
2426 szValueData[info->DataLength / sizeof(WCHAR)] = '\0';
2427
2428 TRACE("returning %s %s\n", debugstr_w(szValueName), debugstr_w(szValueData));
2429 return TRUE;
2430}
@ KeyValueFullInformation
Definition: nt_native.h:1181
NTSTATUS NTAPI NtEnumerateValueKey(IN HANDLE KeyHandle, IN ULONG Index, IN KEY_VALUE_INFORMATION_CLASS KeyValueInformationClass, OUT PVOID KeyValueInformation, IN ULONG Length, OUT PULONG ResultLength)
Definition: ntapi.c:542
unsigned char BYTE
Definition: xxhash.c:193

Referenced by NLS_EnumLanguageGroupLocales(), NLS_EnumSystemCodePages(), and NLS_EnumSystemLanguageGroups().

◆ NLS_RegGetDword()

static BOOL NLS_RegGetDword ( HANDLE  hKey,
LPCWSTR  szValueName,
DWORD lpVal 
)
static

Definition at line 2432 of file lang.c.

2433{
2434 BYTE buffer[128];
2436 DWORD dwSize = sizeof(buffer);
2437 UNICODE_STRING valueName;
2438
2439 RtlInitUnicodeString( &valueName, szValueName );
2440
2441 TRACE("%p, %s\n", hKey, debugstr_w(szValueName));
2444 info->DataLength == sizeof(DWORD))
2445 {
2446 memcpy(lpVal, info->Data, sizeof(DWORD));
2447 return TRUE;
2448 }
2449
2450 return FALSE;
2451}
PSDBQUERYRESULT_VISTA PVOID DWORD * dwSize
Definition: env.c:56

Referenced by IsValidLanguageGroup().

◆ NLS_RegOpenKey()

static HANDLE NLS_RegOpenKey ( HANDLE  hRootKey,
LPCWSTR  szKeyName 
)
static

Definition at line 2379 of file lang.c.

2381{
2382 UNICODE_STRING keyName;
2384 HANDLE hkey;
2385
2386 RtlInitUnicodeString( &keyName, szKeyName );
2387#ifdef __REACTOS__
2389#else
2390 InitializeObjectAttributes(&attr, &keyName, 0, hRootKey, NULL);
2391#endif
2392
2393 if (NtOpenKey( &hkey, KEY_READ, &attr ) != STATUS_SUCCESS)
2394 hkey = 0;
2395
2396 return hkey;
2397}
#define OBJ_CASE_INSENSITIVE
Definition: winternl.h:228
#define InitializeObjectAttributes(p, n, a, r, s)
Definition: reg.c:106
NTSYSAPI NTSTATUS NTAPI NtOpenKey(OUT PHANDLE KeyHandle, IN ACCESS_MASK DesiredAccess, IN POBJECT_ATTRIBUTES ObjectAttributes)
Definition: ntapi.c:336
#define KEY_READ
Definition: nt_native.h:1023

Referenced by GetUserGeoID(), IsValidLanguageGroup(), NLS_EnumLanguageGroupLocales(), NLS_EnumSystemCodePages(), and NLS_EnumSystemLanguageGroups().

◆ SetLocaleInfoA()

BOOL WINAPI SetLocaleInfoA ( LCID  lcid,
LCTYPE  lctype,
LPCSTR  data 
)

Definition at line 1323 of file lang.c.

1324{
1326 WCHAR *strW;
1327 DWORD len;
1328 BOOL ret;
1329
1330 if (!(lctype & LOCALE_USE_CP_ACP)) codepage = get_lcid_codepage( lcid );
1331
1332 if (!data)
1333 {
1335 return FALSE;
1336 }
1337 len = MultiByteToWideChar( codepage, 0, data, -1, NULL, 0 );
1338 if (!(strW = HeapAlloc( GetProcessHeap(), 0, len * sizeof(WCHAR) )))
1339 {
1341 return FALSE;
1342 }
1344 ret = SetLocaleInfoW( lcid, lctype, strW );
1345 HeapFree( GetProcessHeap(), 0, strW );
1346 return ret;
1347}
BOOL WINAPI SetLocaleInfoW(LCID lcid, LCTYPE lctype, LPCWSTR data)
Definition: lang.c:1355
WCHAR strW[12]
Definition: clipboard.c:2029

Referenced by test_SetLocaleInfoA(), and test_VarCat().

◆ SetLocaleInfoW()

BOOL WINAPI SetLocaleInfoW ( LCID  lcid,
LCTYPE  lctype,
LPCWSTR  data 
)

Definition at line 1355 of file lang.c.

1356{
1357 struct registry_value *value;
1358 static const WCHAR intlW[] = {'i','n','t','l',0 };
1361 HANDLE hkey;
1362
1363 lctype &= 0xffff;
1365
1366 if (!data || !value)
1367 {
1369 return FALSE;
1370 }
1371
1373 {
1375 return FALSE;
1376 }
1377
1378 TRACE("setting %x (%s) to %s\n", lctype, debugstr_w(value->name), debugstr_w(data) );
1379
1380 /* FIXME: should check that data to set is sane */
1381
1382 /* FIXME: profile functions should map to registry */
1383 WriteProfileStringW( intlW, value->name, data );
1384
1385 if (!(hkey = create_registry_key())) return FALSE;
1387 status = NtSetValueKey( hkey, &valueW, 0, REG_SZ, (PVOID)data, (strlenW(data)+1)*sizeof(WCHAR) );
1388
1390 HeapFree( GetProcessHeap(), 0, value->cached_value );
1391 value->cached_value = NULL;
1393
1395 {
1396 /* Set I-value from S value */
1397 WCHAR *lpD, *lpM, *lpY;
1398 WCHAR szBuff[2];
1399
1400 lpD = strrchrW(data, 'd');
1401 lpM = strrchrW(data, 'M');
1402 lpY = strrchrW(data, 'y');
1403
1404 if (lpD <= lpM)
1405 {
1406 szBuff[0] = '1'; /* D-M-Y */
1407 }
1408 else
1409 {
1410 if (lpY <= lpM)
1411 szBuff[0] = '2'; /* Y-M-D */
1412 else
1413 szBuff[0] = '0'; /* M-D-Y */
1414 }
1415
1416 szBuff[1] = '\0';
1417
1420 else
1422
1424
1425 WriteProfileStringW( intlW, value->name, szBuff );
1426
1428 status = NtSetValueKey( hkey, &valueW, 0, REG_SZ, szBuff, sizeof(szBuff) );
1429
1431 HeapFree( GetProcessHeap(), 0, value->cached_value );
1432 value->cached_value = NULL;
1434 }
1435
1436 NtClose( hkey );
1437
1439 return !status;
1440}
static const WCHAR valueW[]
Definition: object.c:48
BOOL WINAPI WriteProfileStringW(LPCWSTR section, LPCWSTR entry, LPCWSTR string)
Definition: profile.c:1287
#define REG_SZ
Definition: lang.c:35
NTSYSAPI NTSTATUS NTAPI NtSetValueKey(IN HANDLE KeyHandle, IN PUNICODE_STRING ValueName, IN ULONG TitleIndex OPTIONAL, IN ULONG Type, IN PVOID Data, IN ULONG DataSize)
Definition: ntapi.c:859
#define strrchrW(s, c)
Definition: unicode.h:35

Referenced by SetLocaleInfoA().

◆ SetThreadLocale()

BOOL WINAPI SetThreadLocale ( LCID  lcid)

Definition at line 1472 of file lang.c.

1473{
1474 TRACE("(0x%04X)\n", lcid);
1475
1476 lcid = ConvertDefaultLocale(lcid);
1477
1478 if (lcid != GetThreadLocale())
1479 {
1480 if (!IsValidLocale(lcid, LCID_SUPPORTED))
1481 {
1483 return FALSE;
1484 }
1485
1486 NtCurrentTeb()->CurrentLocale = lcid;
1487 }
1488 return TRUE;
1489}
LCID WINAPI GetThreadLocale(void)
Definition: lang.c:1453
BOOL WINAPI IsValidLocale(LCID lcid, DWORD flags)
Definition: lang.c:1552
#define LCID_SUPPORTED
Definition: winnls.h:202

Referenced by enum_proc(), SetTEBLangID(), SetupOpenInfFileExW(), and test_threadcp().

◆ SetUserGeoID()

BOOL WINAPI SetUserGeoID ( GEOID  GeoID)

Definition at line 3385 of file lang.c.

3386{
3387 static const WCHAR geoW[] = {'G','e','o',0};
3388 static const WCHAR nationW[] = {'N','a','t','i','o','n',0};
3389 static const WCHAR formatW[] = {'%','i',0};
3390 UNICODE_STRING nameW,keyW;
3391 WCHAR bufferW[10];
3393 HANDLE hkey;
3394
3395 if(!(hkey = create_registry_key())) return FALSE;
3396
3397 attr.Length = sizeof(attr);
3398 attr.RootDirectory = hkey;
3399 attr.ObjectName = &nameW;
3400 attr.Attributes = 0;
3401 attr.SecurityDescriptor = NULL;
3402 attr.SecurityQualityOfService = NULL;
3403 RtlInitUnicodeString( &nameW, geoW );
3404 RtlInitUnicodeString( &keyW, nationW );
3405
3406 if (NtCreateKey( &hkey, KEY_ALL_ACCESS, &attr, 0, NULL, 0, NULL ) != STATUS_SUCCESS)
3407
3408 {
3409 NtClose(attr.RootDirectory);
3410 return FALSE;
3411 }
3412
3413 sprintfW(bufferW, formatW, GeoID);
3414 NtSetValueKey(hkey, &keyW, 0, REG_SZ, bufferW, (strlenW(bufferW) + 1) * sizeof(WCHAR));
3415 NtClose(attr.RootDirectory);
3416 NtClose(hkey);
3417 return TRUE;
3418}

◆ strcpynAtoW()

static void strcpynAtoW ( WCHAR dst,
const char src,
size_t  n 
)
inlinestatic

Definition at line 248 of file lang.c.

249{
250 while (n > 1 && *src)
251 {
252 *dst++ = (unsigned char)*src++;
253 n--;
254 }
255 if (n) *dst = 0;
256}
unsigned char
Definition: typeof.h:29

◆ VerLanguageNameA()

DWORD WINAPI VerLanguageNameA ( DWORD  wLang,
LPSTR  szLang,
DWORD  nSize 
)

Definition at line 1682 of file lang.c.

1683{
1684 return GetLocaleInfoA( MAKELCID(wLang, SORT_DEFAULT), LOCALE_SENGLANGUAGE, szLang, nSize );
1685}
INT WINAPI GetLocaleInfoA(LCID lcid, LCTYPE lctype, LPSTR buffer, INT len)
Definition: lang.c:1022
*nSize LPSTR _Inout_ LPDWORD nSize
Definition: winbase.h:2062
#define LOCALE_SENGLANGUAGE
Definition: winnls.h:27

◆ VerLanguageNameW()

DWORD WINAPI VerLanguageNameW ( DWORD  wLang,
LPWSTR  szLang,
DWORD  nSize 
)

Definition at line 1693 of file lang.c.

1694{
1695 return GetLocaleInfoW( MAKELCID(wLang, SORT_DEFAULT), LOCALE_SENGLANGUAGE, szLang, nSize );
1696}

Referenced by CFileVersionInfo::GetLangName().

◆ wine_compare_string()

int wine_compare_string ( int  flags,
const WCHAR str1,
int  len1,
const WCHAR str2,
int  len2 
)

Definition at line 358 of file sortkey.c.

360{
361 int ret;
362
363 ret = compare_unicode_weights(flags, str1, len1, str2, len2);
364 if (!ret)
365 {
366 if (!(flags & NORM_IGNORENONSPACE))
367 ret = compare_diacritic_weights(flags, str1, len1, str2, len2);
368 if (!ret && !(flags & NORM_IGNORECASE))
369 ret = compare_case_weights(flags, str1, len1, str2, len2);
370 }
371 return ret;
372}
static int compare_case_weights(int flags, const WCHAR *str1, int len1, const WCHAR *str2, int len2)
Definition: sortkey.c:299
static int compare_diacritic_weights(int flags, const WCHAR *str1, int len1, const WCHAR *str2, int len2)
Definition: sortkey.c:240
static int compare_unicode_weights(int flags, const WCHAR *str1, int len1, const WCHAR *str2, int len2)
Definition: sortkey.c:159

Referenced by CompareStringEx().

◆ wine_fold_string()

int wine_fold_string ( int  flags,
const WCHAR src,
int  srclen,
WCHAR dst,
int  dstlen 
)

Definition at line 118 of file fold.c.

119{
120 WCHAR *dstbase = dst;
121 const WCHAR *expand;
122 int i;
123
124 if (srclen == -1)
125 srclen = strlenW(src) + 1; /* Include terminating NUL in count */
126
127 if (!dstlen)
128 {
129 /* Calculate the required size for dst */
130 dstlen = srclen;
131
132 if (flags & MAP_EXPAND_LIGATURES)
133 {
134 while (srclen--)
135 {
137 src++;
138 }
139 }
140 else if (flags & MAP_COMPOSITE)
141 {
142 /* FIXME */
143 }
144 else if (flags & MAP_PRECOMPOSED)
145 {
146 /* FIXME */
147 }
148 return dstlen;
149 }
150
151 if (srclen > dstlen)
152 return 0;
153
154 dstlen -= srclen;
155
156 /* Actually perform the mapping(s) specified */
157 for (i = 0; i < srclen; i++)
158 {
159 WCHAR ch = *src;
160
161 if (flags & MAP_EXPAND_LIGATURES)
162 {
163 expand = get_ligature(ch);
164 if (expand[0])
165 {
166 if (!dstlen--)
167 return 0;
168 dst[0] = expand[0];
169 if (expand[2])
170 {
171 if (!dstlen--)
172 return 0;
173 *++dst = expand[1];
174 ch = expand[2];
175 }
176 else
177 ch = expand[1];
178 dst++;
179 }
180 }
181 else if (flags & MAP_COMPOSITE)
182 {
183 /* FIXME */
184 }
185 else if (flags & MAP_PRECOMPOSED)
186 {
187 /* FIXME */
188 }
189 if (flags & MAP_FOLDDIGITS)
190 ch = to_unicode_digit(ch);
191 if (flags & MAP_FOLDCZONE)
192 ch = to_unicode_native(ch);
193
194 *dst++ = ch;
195 src++;
196 }
197 return dst - dstbase;
198}
static BOOL expand(LPINT ac, LPTSTR **arg, LPCTSTR pattern)
Definition: misc.c:214
static WCHAR to_unicode_digit(WCHAR ch)
Definition: fold.c:23
static WCHAR to_unicode_native(WCHAR ch)
Definition: fold.c:29
static const WCHAR * get_ligature(WCHAR wc)
Definition: fold.c:100
static int get_ligature_len(WCHAR wc)
Definition: fold.c:84
#define MAP_FOLDDIGITS
Definition: winnls.h:214

Referenced by FoldStringW().

◆ wine_get_sortkey()

int wine_get_sortkey ( int  flags,
const WCHAR src,
int  srclen,
char dst,
int  dstlen 
)

Definition at line 33 of file sortkey.c.

34{
35 WCHAR dummy[4]; /* no decomposition is larger than 4 chars */
36 int key_len[4];
37 char *key_ptr[4];
38 const WCHAR *src_save = src;
39 int srclen_save = srclen;
40
41 key_len[0] = key_len[1] = key_len[2] = key_len[3] = 0;
42 for (; srclen; srclen--, src++)
43 {
44 unsigned int i, decomposed_len = 1;/*wine_decompose(*src, dummy, 4);*/
45 dummy[0] = *src;
46 if (decomposed_len)
47 {
48 for (i = 0; i < decomposed_len; i++)
49 {
50 WCHAR wch = dummy[i];
51 unsigned int ce;
52
53 /* tests show that win2k just ignores NORM_IGNORENONSPACE,
54 * and skips white space and punctuation characters for
55 * NORM_IGNORESYMBOLS.
56 */
58 continue;
59
60 if (flags & NORM_IGNORECASE) wch = tolowerW(wch);
61
62 ce = collation_table[collation_table[wch >> 8] + (wch & 0xff)];
63 if (ce != (unsigned int)-1)
64 {
65 if (ce >> 16) key_len[0] += 2;
66 if ((ce >> 8) & 0xff) key_len[1]++;
67 if ((ce >> 4) & 0x0f) key_len[2]++;
68 if (ce & 1)
69 {
70 if (wch >> 8) key_len[3]++;
71 key_len[3]++;
72 }
73 }
74 else
75 {
76 key_len[0] += 2;
77 if (wch >> 8) key_len[0]++;
78 if (wch & 0xff) key_len[0]++;
79 }
80 }
81 }
82 }
83
84 if (!dstlen) /* compute length */
85 /* 4 * '\1' + 1 * '\0' + key length */
86 return key_len[0] + key_len[1] + key_len[2] + key_len[3] + 4 + 1;
87
88 if (dstlen < key_len[0] + key_len[1] + key_len[2] + key_len[3] + 4 + 1)
89 return 0; /* overflow */
90
91 src = src_save;
92 srclen = srclen_save;
93
94 key_ptr[0] = dst;
95 key_ptr[1] = key_ptr[0] + key_len[0] + 1;
96 key_ptr[2] = key_ptr[1] + key_len[1] + 1;
97 key_ptr[3] = key_ptr[2] + key_len[2] + 1;
98
99 for (; srclen; srclen--, src++)
100 {
101 unsigned int i, decomposed_len = 1;/*wine_decompose(*src, dummy, 4);*/
102 dummy[0] = *src;
103 if (decomposed_len)
104 {
105 for (i = 0; i < decomposed_len; i++)
106 {
107 WCHAR wch = dummy[i];
108 unsigned int ce;
109
110 /* tests show that win2k just ignores NORM_IGNORENONSPACE,
111 * and skips white space and punctuation characters for
112 * NORM_IGNORESYMBOLS.
113 */
115 continue;
116
117 if (flags & NORM_IGNORECASE) wch = tolowerW(wch);
118
119 ce = collation_table[collation_table[wch >> 8] + (wch & 0xff)];
120 if (ce != (unsigned int)-1)
121 {
122 WCHAR key;
123 if ((key = ce >> 16))
124 {
125 *key_ptr[0]++ = key >> 8;
126 *key_ptr[0]++ = key & 0xff;
127 }
128 /* make key 1 start from 2 */
129 if ((key = (ce >> 8) & 0xff)) *key_ptr[1]++ = key + 1;
130 /* make key 2 start from 2 */
131 if ((key = (ce >> 4) & 0x0f)) *key_ptr[2]++ = key + 1;
132 /* key 3 is always a character code */
133 if (ce & 1)
134 {
135 if (wch >> 8) *key_ptr[3]++ = wch >> 8;
136 if (wch & 0xff) *key_ptr[3]++ = wch & 0xff;
137 }
138 }
139 else
140 {
141 *key_ptr[0]++ = 0xff;
142 *key_ptr[0]++ = 0xfe;
143 if (wch >> 8) *key_ptr[0]++ = wch >> 8;
144 if (wch & 0xff) *key_ptr[0]++ = wch & 0xff;
145 }
146 }
147 }
148 }
149
150 *key_ptr[0] = '\1';
151 *key_ptr[1] = '\1';
152 *key_ptr[2] = '\1';
153 *key_ptr[3]++ = '\1';
154 *key_ptr[3] = 0;
155
156 return key_ptr[3] - dst;
157}
const unsigned int collation_table[]
Definition: collation.c:5
Definition: copy.c:22

Referenced by LCMapStringA(), and LCMapStringEx().

Variable Documentation

◆ cache_section

RTL_CRITICAL_SECTION cache_section = { NULL, -1, 0, 0, 0, 0 }
static

Definition at line 244 of file lang.c.

Referenced by get_registry_locale_info(), and SetLocaleInfoW().

◆ geoinfodata

const struct geoinfo_t geoinfodata[]
static

Definition at line 2802 of file lang.c.

Referenced by EnumSystemGeoID(), and get_geoinfo_dataptr().

◆ iCalendarTypeW

const WCHAR iCalendarTypeW[] = {'i','C','a','l','e','n','d','a','r','T','y','p','e',0}
static

Definition at line 152 of file lang.c.

◆ iCountryW

const WCHAR iCountryW[] = {'i','C','o','u','n','t','r','y',0}
static

Definition at line 153 of file lang.c.

◆ iCurrDigitsW

const WCHAR iCurrDigitsW[] = {'i','C','u','r','r','D','i','g','i','t','s',0}
static

Definition at line 154 of file lang.c.

◆ iCurrencyW

const WCHAR iCurrencyW[] = {'i','C','u','r','r','e','n','c','y',0}
static

Definition at line 155 of file lang.c.

◆ iDateW

const WCHAR iDateW[] = {'i','D','a','t','e',0}
static

Definition at line 156 of file lang.c.

◆ iDigitsW

const WCHAR iDigitsW[] = {'i','D','i','g','i','t','s',0}
static

Definition at line 157 of file lang.c.

◆ iFirstDayOfWeekW

const WCHAR iFirstDayOfWeekW[] = {'i','F','i','r','s','t','D','a','y','O','f','W','e','e','k',0}
static

Definition at line 158 of file lang.c.

◆ iFirstWeekOfYearW

const WCHAR iFirstWeekOfYearW[] = {'i','F','i','r','s','t','W','e','e','k','O','f','Y','e','a','r',0}
static

Definition at line 159 of file lang.c.

◆ iLDateW

const WCHAR iLDateW[] = {'i','L','D','a','t','e',0}
static

Definition at line 160 of file lang.c.

◆ iLZeroW

const WCHAR iLZeroW[] = {'i','L','Z','e','r','o',0}
static

Definition at line 161 of file lang.c.

◆ iMeasureW

const WCHAR iMeasureW[] = {'i','M','e','a','s','u','r','e',0}
static

Definition at line 162 of file lang.c.

◆ iNegCurrW

const WCHAR iNegCurrW[] = {'i','N','e','g','C','u','r','r',0}
static

Definition at line 163 of file lang.c.

◆ iNegNumberW

const WCHAR iNegNumberW[] = {'i','N','e','g','N','u','m','b','e','r',0}
static

Definition at line 164 of file lang.c.

◆ iPaperSizeW

const WCHAR iPaperSizeW[] = {'i','P','a','p','e','r','S','i','z','e',0}
static

Definition at line 165 of file lang.c.

◆ iTimePrefixW

const WCHAR iTimePrefixW[] = {'i','T','i','m','e','P','r','e','f','i','x',0}
static

Definition at line 167 of file lang.c.

◆ iTimeW

const WCHAR iTimeW[] = {'i','T','i','m','e',0}
static

Definition at line 168 of file lang.c.

◆ iTLZeroW

const WCHAR iTLZeroW[] = {'i','T','L','Z','e','r','o',0}
static

Definition at line 166 of file lang.c.

◆ kernel32_handle

◆ lcid_LC_COLLATE

LCID lcid_LC_COLLATE
static

Definition at line 143 of file lang.c.

Referenced by convert_default_lcid().

◆ lcid_LC_CTYPE

LCID lcid_LC_CTYPE
static

Definition at line 144 of file lang.c.

Referenced by convert_default_lcid().

◆ lcid_LC_MEASUREMENT

LCID lcid_LC_MEASUREMENT
static

Definition at line 149 of file lang.c.

Referenced by convert_default_lcid().

◆ lcid_LC_MONETARY

LCID lcid_LC_MONETARY
static

Definition at line 145 of file lang.c.

Referenced by convert_default_lcid().

◆ lcid_LC_NUMERIC

LCID lcid_LC_NUMERIC
static

Definition at line