27 #define MAX_ELEM_LEN 64 28 #define MAX_LOCALE_LENGTH 256 31 #error _pctype should not be defined 43 #define LOCK_LOCALE _mlock(_SETLOCALE_LOCK); 44 #define UNLOCK_LOCALE _munlock(_SETLOCALE_LOCK); 46 #define MSVCRT_LEADBYTE 0x8000 47 #define MSVCRT_C1_DEFINED 0x200 53 "american english",
"enu",
54 "american-english",
"enu",
55 "english-american",
"enu",
63 "french-belgian",
"frb",
66 "french-canadian",
"frc",
68 "chinese-simplified",
"chs",
69 "chinese-traditional",
"cht",
70 "dutch-belgian",
"nlb",
74 "french-swiss",
"frs",
76 "german-swiss",
"des",
77 "italian-swiss",
"its",
78 "german-austrian",
"dea",
80 "portuguese-brazil",
"ptb",
81 "spanish-mexican",
"esm",
82 "norwegian-bokmal",
"nor",
83 "norwegian-nynorsk",
"non",
84 "spanish-modern",
"esn" 103 #define FOUND_LANGUAGE 0x4 104 #define FOUND_COUNTRY 0x2 105 #define FOUND_CODEPAGE 0x1 116 #define CONTINUE_LOOKING TRUE 117 #define STOP_LOOKING FALSE 146 unsigned int flags = 0;
156 TRACE(
":Found language: %s->%s\n",
res->search_language,
buff);
169 TRACE(
"Found country:%s->%s\n",
res->search_country,
buff);
181 TRACE(
"Found codepage:%s->%s\n",
res->search_codepage,
buff);
199 TRACE(
":found exact locale match\n");
205 extern int atoi(
const char *);
212 const char *
cp, *region;
225 search.search_country[0] =
'\0';
230 search.search_country[
cp-region-1] =
'\0';
234 search.search_codepage[0] =
'\0';
236 if(!
search.search_country[0] && !
search.search_codepage[0])
256 if (
search.search_codepage[0]) {
360 return data->locinfo;
370 return data->mbcinfo;
389 "LC_COLLATE=%s;LC_CTYPE=%s;LC_MONETARY=%s;LC_NUMERIC=%s;LC_TIME=%s",
396 return current_lc_all;
405 static wchar_t fake[] = {
406 'E',
'n',
'g',
'l',
'i',
's',
'h',
'_',
'U',
'n',
'i',
't',
'e',
'd',
' ',
407 'S',
't',
'a',
't',
'e',
's',
'.',
'1',
'2',
'5',
'2',0 };
425 size =
cur->str.names.short_mon[0]-
cur->str.names.short_wday[0];
458 size =
cur->str.names.am-
cur->str.names.short_mon[0];
464 for(
i=0;
i<12;
i++) {
490 for(
i=0;
i<
sizeof(
cur->str.str)/
sizeof(
cur->str.str[0]);
i++)
499 for(
i=0;
i<
sizeof(
cur->str.str)/
sizeof(
cur->str.str[0]);
i++) {
514 FIXME(
"(lcid %x, flags %x, %s(%d), %p(%d), %x, %d), partial stub!\n",
528 FIXME(
"(lcid %x, flags %x, %s(%d), %p(%d), %x, %d), partial stub!\n",
538 const char *src2,
int len2 )
540 FIXME(
"(lcid %x, flags %x, %s(%d), %s(%d), partial stub\n",
550 const wchar_t *src2,
int len2 )
552 FIXME(
"(lcid %x, flags %x, %s(%d), %s(%d), partial stub\n",
573 unsigned char letter =
c;
592 FIXME(
"(unk %x, type %x, wstr %p(%d), %p) partial stub\n",
724 static const DWORD time_data[] = {
741 static const char collate[] =
"COLLATE=";
742 static const char ctype[] =
"CTYPE=";
743 static const char monetary[] =
"MONETARY=";
744 static const char numeric[] =
"NUMERIC=";
745 static const char time[] =
"TIME=";
746 static const char cloc_short_date[] =
"MM/dd/yy";
747 static const wchar_t cloc_short_dateW[] = {
'M',
'M',
'/',
'd',
'd',
'/',
'y',
'y',0};
748 static const char cloc_long_date[] =
"dddd, MMMM dd, yyyy";
749 static const wchar_t cloc_long_dateW[] = {
'd',
'd',
'd',
'd',
',',
' ',
'M',
'M',
'M',
'M',
' ',
'd',
'd',
',',
' ',
'y',
'y',
'y',
'y',0};
750 static const char cloc_time[] =
"HH:mm:ss";
751 static const wchar_t cloc_timeW[] = {
'H',
'H',
':',
'm',
'm',
':',
's',
's',0};
754 LCID lcid[6] = { 0 }, lcid_tmp;
755 unsigned short cp[6] = { 0 };
788 }
else if(!
memcmp(
locale, monetary,
sizeof(monetary)-1)) {
790 locale +=
sizeof(monetary)-1;
791 }
else if(!
memcmp(
locale, numeric,
sizeof(numeric)-1)) {
793 locale +=
sizeof(numeric)-1;
814 if(!
p || *(
p+1)!=
'L' || *(
p+2)!=
'C' || *(
p+3)!=
'_')
904 for(
i=1;
i<257;
i++) {
924 for(
i=0;
i<256;
i++) {
938 for(
i=0;
i<256;
i++) {
1001 i =
i/2 + (
buf[
i-2]==
'0'?0:1);
1003 for(
i=0;
buf[
i+1]==
';';
i+=2)
1168 i =
i/2 + (
buf[
i-2]==
'0'?0:1);
1170 for(
i=0;
buf[
i+1]==
';';
i+=2)
1207 for(
i=0;
i<
sizeof(time_data)/
sizeof(time_data[0]);
i++) {
1209 size +=
sizeof(cloc_short_date) +
sizeof(cloc_short_dateW);
1211 size +=
sizeof(cloc_long_date) +
sizeof(cloc_long_dateW);
1238 for(
i=0;
i<
sizeof(time_data)/
sizeof(time_data[0]);
i++) {
1242 ret +=
sizeof(cloc_short_date);
1245 ret +=
sizeof(cloc_long_date);
1248 ret +=
sizeof(cloc_time);
1254 for(
i=0;
i<
sizeof(time_data)/
sizeof(time_data[0]);
i++) {
1258 ret +=
sizeof(cloc_short_dateW);
1261 ret +=
sizeof(cloc_long_dateW);
1263 ret +=
sizeof(cloc_timeW);
1436 if(!
data->have_locale) {
1452 if(
data->have_locale) {
unsigned int *CDECL ___unguarded_readlc_active_add_func(void)
static short search(int val, const short *table, int size)
BOOL WINAPI GetCPInfo(UINT CodePage, LPCPINFO CodePageInfo)
#define LOCALE_IDEFAULTANSICODEPAGE
#define MAKELCID(lgid, srtid)
#define LOCALE_SABBREVMONTHNAME12
struct lconv *CDECL localeconv(void)
#define LOCALE_SMONGROUPING
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
#define LOCALE_SABBREVDAYNAME2
#define LOCALE_SABBREVMONTHNAME1
#define LOCALE_SISO639LANGNAME
#define LOCALE_SMONTHNAME5
#define LOCALE_SENGLANGUAGE
#define LOCALE_IPOSSYMPRECEDES
#define LOCALE_SABBREVMONTHNAME6
#define LOCALE_SENGCOUNTRY
void *__cdecl _Gettnames(void)
#define LOCALE_SMONTHNAME2
ACPI_SIZE strlen(const char *String)
#define LOCALE_SABBREVDAYNAME4
char *CDECL _Getdays(void)
#define LOCALE_SABBREVCTRYNAME
INT WINAPI GetLocaleInfoA(LCID lcid, LCTYPE lctype, LPSTR buffer, INT len)
#define LOCALE_SABBREVDAYNAME7
#define LOCALE_SABBREVDAYNAME1
#define LOCALE_INEGSYMPRECEDES
static char * construct_lc_all(MSVCRT_pthreadlocinfo locinfo)
MSVCRT_pthreadlocinfo get_locinfo(void)
#define LOCALE_SMONTHNAME6
int CDECL ___lc_collate_cp_func(void)
BOOL CDECL __crtGetStringTypeW(DWORD unk, DWORD type, wchar_t *buffer, int len, WORD *out)
#define LOCALE_SABBREVMONTHNAME7
int * lconv_intl_refcount
char *CDECL setlocale(int category, const char *locale)
#define cmp(status, error)
#define LOCALE_SABBREVMONTHNAME3
int CDECL _configthreadlocale(int type)
static BOOL update_threadlocinfo_category(LCID lcid, unsigned short cp, MSVCRT__locale_t loc, int category)
#define LOCALE_SMONTHNAME8
MSVCRT__locale_t CDECL MSVCRT__get_current_locale(void)
#define LOCALE_IPOSSEPBYSPACE
int CDECL __crtLCMapStringA(LCID lcid, DWORD mapflags, const char *src, int srclen, char *dst, int dstlen, unsigned int codepage, int xflag)
#define LOCALE_SABBREVMONTHNAME8
int CDECL __crtCompareStringW(LCID lcid, DWORD flags, const wchar_t *src1, int len1, const wchar_t *src2, int len2)
static const char *const _country_synonyms[]
void free_locinfo(MSVCRT_pthreadlocinfo locinfo)
INT WINAPI GetLocaleInfoW(LCID lcid, LCTYPE lctype, LPWSTR buffer, INT len)
#define sprintf(buf, format,...)
GLenum GLuint GLenum GLsizei const GLchar * buf
#define LOCALE_SABBREVDAYNAME3
wchar_t *CDECL _wsetlocale(int category, const wchar_t *locale)
#define LOCALE_SABBREVMONTHNAME5
#define LOCALE_SMONTHNAME1
int CDECL __crtGetLocaleInfoW(LCID lcid, LCTYPE type, wchar_t *buffer, int len)
#define LOCALE_NOUSEROVERRIDE
BOOL WINAPI GetStringTypeA(LCID locale, DWORD type, LPCSTR src, INT count, LPWORD chartype)
#define LOCALE_SABBREVMONTHNAME10
unsigned int CDECL ___lc_codepage_func(void)
#define LOCALE_SINTLSYMBOL
#define LOCALE_SABBREVDAYNAME6
INT WINAPI LCMapStringW(LCID lcid, DWORD flags, LPCWSTR src, INT srclen, LPWSTR dst, INT dstlen)
MSVCRT_pthreadmbcinfo mbcinfo
const unsigned short * _pctype
#define _ENABLE_PER_THREAD_LOCALE
#define LOCALE_SABBREVMONTHNAME4
wint_t CDECL MSVCRT_btowc(int c)
static BOOL CALLBACK find_best_locale_proc(HMODULE hModule, LPCSTR type, LPCSTR name, WORD LangID, LONG_PTR lParam)
#define LOCALE_SMONTHNAME4
LCID WINAPI GetSystemDefaultLCID(void)
static int compare_info(LCID lcid, DWORD flags, char *buff, const char *cmp, BOOL exact)
struct MSVCRT_lconv * lconv
unsigned int __lc_codepage
int CDECL __lconv_init(void)
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
INT WINAPI CompareStringA(LCID lcid, DWORD flags, LPCSTR str1, INT len1, LPCSTR str2, INT len2)
INT WINAPI CompareStringW(LCID lcid, DWORD flags, LPCWSTR str1, INT len1, LPCWSTR str2, INT len2)
struct MSVCRT___lc_time_data * lc_time_curr
#define LOCALE_SMONDECIMALSEP
#define LOCALE_SMONTHNAME11
static void swap_pointers(void **p1, void **p2)
MSVCRT_pthreadmbcinfo get_mbcinfo(void)
#define LOCALE_SMONTHOUSANDSEP
#define LOCALE_SMONTHNAME10
void CDECL MSVCRT__free_locale(MSVCRT__locale_t locale)
MSVCRT_ulong lc_handle[6]
void __init_global_locale()
#define LOCALE_SABBREVLANGNAME
BOOL WINAPI GetStringTypeW(DWORD type, LPCWSTR src, INT count, LPWORD chartype)
int __cdecl _setmbcp(int)
char *CDECL _Getmonths(void)
static DWORD LPDWORD LPCSTR DWORD srclen
#define LOCALE_SPOSITIVESIGN
#define LOCALE_SABBREVMONTHNAME2
MSVCRT__locale_t CDECL MSVCRT__create_locale(int category, const char *locale)
unsigned int CDECL ___setlc_active_func(void)
unsigned char _mbctype[257]
#define MSVCRT_LC_NUMERIC
unsigned int lc_collate_cp
LCID *CDECL ___lc_handle_func(void)
BOOL WINAPI EnumResourceLanguagesA(HMODULE hmod, LPCSTR type, LPCSTR name, ENUMRESLANGPROCA lpfun, LONG_PTR lparam)
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
#define LOCALE_INEGSIGNPOSN
#define LOCALE_IINTLCURRDIGITS
int MSVCRT___lc_collate_cp
void free_mbcinfo(MSVCRT_pthreadmbcinfo mbcinfo)
#define LOCALE_SMONTHNAME3
#define InterlockedDecrement
#define LOCALE_SNEGATIVESIGN
#define LOCALE_SSHORTDATE
int CDECL __crtLCMapStringW(LCID lcid, DWORD mapflags, const wchar_t *src, int srclen, wchar_t *dst, int dstlen, unsigned int codepage, int xflag)
#define memcpy(s1, s2, n)
HMODULE WINAPI DECLSPEC_HOTPATCH GetModuleHandleA(LPCSTR lpModuleName)
const unsigned short _ctype[257]
thread_data_t * msvcrt_get_thread_data(void)
struct MSVCRT_threadlocaleinfostruct::@1663 lc_category[6]
#define LOCALE_IDEFAULTCODEPAGE
static unsigned char charmax
#define MAX_LOCALE_LENGTH
static const wchar_t void * locale
MSVCRT_pthreadlocinfo locinfo
#define LOCALE_SABBREVMONTHNAME9
BOOL WINAPI IsValidCodePage(UINT CodePage)
#define LOCALE_SABBREVMONTHNAME11
#define LOCALE_ICURRDIGITS
#define InterlockedIncrement
int _setmbcp_l(int, LCID, MSVCRT_pthreadmbcinfo)
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
#define LOCALE_SISO3166CTRYNAME
#define LOCALE_SABBREVDAYNAME5
LCID MSVCRT___lc_handle[LC_MAX - LC_MIN+1]
unsigned int __setlc_active
struct __lc_time_data MSVCRT___lc_time_data
#define _Analysis_assume_
#define LOCALE_SMONTHNAME9
#define LOCALE_SMONTHNAME12
const unsigned short ** __p__pctype(void)
#define MultiByteToWideChar
#define LOCALE_IPOSSIGNPOSN
#define _DISABLE_PER_THREAD_LOCALE
char * strchr(const char *String, int ch)
static void remap_synonym(char *name)
int CDECL __crtCompareStringA(LCID lcid, DWORD flags, const char *src1, int len1, const char *src2, int len2)
#define LOCALE_INEGSEPBYSPACE
char * strcpy(char *DstString, const char *SrcString)
#define LOCALE_SMONTHNAME7
int strcmp(const char *String1, const char *String2)
const unsigned short *__cdecl __pctype_func(void)
LCID MSVCRT_locale_to_LCID(const char *locale, unsigned short *codepage)
unsigned int __unguarded_readlc_active
MSVCRT__locale_t global_locale
GLuint GLuint GLsizei GLenum type
_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
#define LOCALE_STIMEFORMAT
#define MSVCRT_LC_COLLATE
static unsigned char buff[32768]
#define MSVCRT_LC_MONETARY
INT WINAPI LCMapStringA(LCID lcid, DWORD flags, LPCSTR src, INT srclen, LPSTR dst, INT dstlen)