2012-12-09 03:17:14 +00:00
|
|
|
#ifndef __CRT_INTERNAL_LOCALE_H
|
|
|
|
#define __CRT_INTERNAL_LOCALE_H
|
|
|
|
|
2012-12-09 03:36:14 +00:00
|
|
|
typedef struct MSVCRT_threadlocaleinfostruct {
|
|
|
|
LONG refcount;
|
|
|
|
unsigned int lc_codepage;
|
|
|
|
unsigned int lc_collate_cp;
|
|
|
|
unsigned long lc_handle[6];
|
|
|
|
LC_ID lc_id[6];
|
|
|
|
struct {
|
|
|
|
char *locale;
|
|
|
|
wchar_t *wlocale;
|
|
|
|
int *refcount;
|
|
|
|
int *wrefcount;
|
|
|
|
} lc_category[6];
|
|
|
|
int lc_clike;
|
|
|
|
int mb_cur_max;
|
|
|
|
int *lconv_intl_refcount;
|
|
|
|
int *lconv_num_refcount;
|
|
|
|
int *lconv_mon_refcount;
|
2014-05-25 10:47:48 +00:00
|
|
|
struct lconv *lconv;
|
2012-12-09 03:36:14 +00:00
|
|
|
int *ctype1_refcount;
|
|
|
|
unsigned short *ctype1;
|
|
|
|
const unsigned short *pctype;
|
|
|
|
unsigned char *pclmap;
|
|
|
|
unsigned char *pcumap;
|
|
|
|
struct __lc_time_data *lc_time_curr;
|
|
|
|
} MSVCRT_threadlocinfo;
|
|
|
|
|
|
|
|
typedef struct MSVCRT_threadmbcinfostruct {
|
|
|
|
LONG refcount;
|
|
|
|
int mbcodepage;
|
|
|
|
int ismbcodepage;
|
|
|
|
int mblcid;
|
|
|
|
unsigned short mbulinfo[6];
|
2012-12-09 11:42:02 +00:00
|
|
|
unsigned char mbctype[257];
|
2012-12-09 03:36:14 +00:00
|
|
|
char mbcasemap[256];
|
|
|
|
} MSVCRT_threadmbcinfo;
|
|
|
|
|
2014-05-25 10:47:48 +00:00
|
|
|
#define MSVCRT_lconv lconv
|
2012-12-09 03:36:14 +00:00
|
|
|
|
|
|
|
typedef struct MSVCRT_threadlocaleinfostruct *MSVCRT_pthreadlocinfo;
|
2012-12-09 03:17:14 +00:00
|
|
|
typedef struct MSVCRT_threadmbcinfostruct *MSVCRT_pthreadmbcinfo;
|
|
|
|
|
2012-12-09 03:36:14 +00:00
|
|
|
typedef struct MSVCRT_localeinfo_struct
|
|
|
|
{
|
|
|
|
MSVCRT_pthreadlocinfo locinfo;
|
|
|
|
MSVCRT_pthreadmbcinfo mbcinfo;
|
|
|
|
} MSVCRT__locale_tstruct, *MSVCRT__locale_t;
|
|
|
|
|
2012-12-09 03:17:14 +00:00
|
|
|
typedef struct __lc_time_data {
|
|
|
|
union {
|
|
|
|
char *str[43];
|
|
|
|
struct {
|
|
|
|
char *short_wday[7];
|
|
|
|
char *wday[7];
|
|
|
|
char *short_mon[12];
|
|
|
|
char *mon[12];
|
|
|
|
char *am;
|
|
|
|
char *pm;
|
|
|
|
char *short_date;
|
|
|
|
char *date;
|
|
|
|
char *time;
|
|
|
|
} names;
|
|
|
|
} str;
|
|
|
|
LCID lcid;
|
|
|
|
int unk[2];
|
|
|
|
wchar_t *wstr[43];
|
|
|
|
char data[1];
|
|
|
|
} MSVCRT___lc_time_data;
|
|
|
|
|
|
|
|
int _setmbcp_l(int, LCID, MSVCRT_pthreadmbcinfo) DECLSPEC_HIDDEN;
|
|
|
|
MSVCRT_pthreadmbcinfo get_mbcinfo(void) DECLSPEC_HIDDEN;
|
2013-04-03 22:46:22 +00:00
|
|
|
LCID MSVCRT_locale_to_LCID(const char*, unsigned short*) DECLSPEC_HIDDEN;
|
2012-12-09 03:17:14 +00:00
|
|
|
|
2012-12-09 03:36:14 +00:00
|
|
|
void __init_global_locale();
|
|
|
|
extern MSVCRT__locale_t global_locale;
|
|
|
|
#define MSVCRT_locale __get_MSVCRT_locale()
|
2012-12-09 04:06:25 +00:00
|
|
|
FORCEINLINE MSVCRT__locale_t __get_MSVCRT_locale()
|
2012-12-09 03:36:14 +00:00
|
|
|
{
|
|
|
|
if(!global_locale)
|
|
|
|
__init_global_locale();
|
|
|
|
return global_locale;
|
|
|
|
}
|
|
|
|
|
|
|
|
MSVCRT_pthreadlocinfo get_locinfo(void);
|
|
|
|
void __cdecl MSVCRT__free_locale(MSVCRT__locale_t);
|
|
|
|
void free_locinfo(MSVCRT_pthreadlocinfo);
|
|
|
|
void free_mbcinfo(MSVCRT_pthreadmbcinfo);
|
|
|
|
|
2012-12-09 03:17:14 +00:00
|
|
|
#endif //__CRT_INTERNAL_LOCALE_H
|
|
|
|
|