msvcrt: Remove MSVCRT_pthreadmbcinfo type.
Signed-off-by: Piotr Caban <piotr@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
d5c0458bd1
commit
d496099c74
|
@ -656,7 +656,7 @@ pthreadlocinfo CDECL get_locinfo(void) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* INTERNAL: returns pthreadmbcinfo struct */
|
/* INTERNAL: returns pthreadmbcinfo struct */
|
||||||
MSVCRT_pthreadmbcinfo CDECL get_mbcinfo(void) {
|
pthreadmbcinfo CDECL get_mbcinfo(void) {
|
||||||
thread_data_t *data = msvcrt_get_thread_data();
|
thread_data_t *data = msvcrt_get_thread_data();
|
||||||
update_thread_locale(data);
|
update_thread_locale(data);
|
||||||
return data->mbcinfo;
|
return data->mbcinfo;
|
||||||
|
@ -1139,8 +1139,8 @@ void free_locinfo(pthreadlocinfo locinfo)
|
||||||
MSVCRT_free(locinfo);
|
MSVCRT_free(locinfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* INTERNAL: frees MSVCRT_pthreadmbcinfo struct */
|
/* INTERNAL: frees pthreadmbcinfo struct */
|
||||||
void free_mbcinfo(MSVCRT_pthreadmbcinfo mbcinfo)
|
void free_mbcinfo(pthreadmbcinfo mbcinfo)
|
||||||
{
|
{
|
||||||
if(!mbcinfo)
|
if(!mbcinfo)
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -88,7 +88,7 @@ static const unsigned char mbctombb_932_kana[] = {
|
||||||
|
|
||||||
static MSVCRT_wchar_t msvcrt_mbc_to_wc_l(unsigned int ch, MSVCRT__locale_t locale)
|
static MSVCRT_wchar_t msvcrt_mbc_to_wc_l(unsigned int ch, MSVCRT__locale_t locale)
|
||||||
{
|
{
|
||||||
MSVCRT_pthreadmbcinfo mbcinfo;
|
pthreadmbcinfo mbcinfo;
|
||||||
MSVCRT_wchar_t chW;
|
MSVCRT_wchar_t chW;
|
||||||
char mbch[2];
|
char mbch[2];
|
||||||
int n_chars;
|
int n_chars;
|
||||||
|
@ -210,9 +210,9 @@ int CDECL ___mb_cur_max_l_func(MSVCRT__locale_t locale)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
MSVCRT_threadmbcinfo* create_mbcinfo(int cp, LCID lcid, MSVCRT_threadmbcinfo *old_mbcinfo)
|
threadmbcinfo* create_mbcinfo(int cp, LCID lcid, threadmbcinfo *old_mbcinfo)
|
||||||
{
|
{
|
||||||
MSVCRT_threadmbcinfo *mbcinfo;
|
threadmbcinfo *mbcinfo;
|
||||||
int newcp;
|
int newcp;
|
||||||
CPINFO cpi;
|
CPINFO cpi;
|
||||||
BYTE *bytes;
|
BYTE *bytes;
|
||||||
|
@ -229,7 +229,7 @@ MSVCRT_threadmbcinfo* create_mbcinfo(int cp, LCID lcid, MSVCRT_threadmbcinfo *ol
|
||||||
return old_mbcinfo;
|
return old_mbcinfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
mbcinfo = MSVCRT_malloc(sizeof(MSVCRT_threadmbcinfo));
|
mbcinfo = MSVCRT_malloc(sizeof(threadmbcinfo));
|
||||||
if(!mbcinfo)
|
if(!mbcinfo)
|
||||||
return NULL;
|
return NULL;
|
||||||
mbcinfo->refcount = 1;
|
mbcinfo->refcount = 1;
|
||||||
|
@ -385,7 +385,7 @@ MSVCRT_threadmbcinfo* create_mbcinfo(int cp, LCID lcid, MSVCRT_threadmbcinfo *ol
|
||||||
int CDECL _setmbcp(int cp)
|
int CDECL _setmbcp(int cp)
|
||||||
{
|
{
|
||||||
thread_data_t *data = msvcrt_get_thread_data();
|
thread_data_t *data = msvcrt_get_thread_data();
|
||||||
MSVCRT_threadmbcinfo *mbcinfo;
|
threadmbcinfo *mbcinfo;
|
||||||
|
|
||||||
mbcinfo = create_mbcinfo(cp, -1, get_mbcinfo());
|
mbcinfo = create_mbcinfo(cp, -1, get_mbcinfo());
|
||||||
if(!mbcinfo)
|
if(!mbcinfo)
|
||||||
|
@ -619,7 +619,7 @@ unsigned char* CDECL _mbsninc(const unsigned char* str, MSVCRT_size_t num)
|
||||||
MSVCRT_size_t CDECL _mbsnlen_l(const unsigned char *str,
|
MSVCRT_size_t CDECL _mbsnlen_l(const unsigned char *str,
|
||||||
MSVCRT_size_t maxsize, MSVCRT__locale_t locale)
|
MSVCRT_size_t maxsize, MSVCRT__locale_t locale)
|
||||||
{
|
{
|
||||||
MSVCRT_pthreadmbcinfo mbcinfo;
|
pthreadmbcinfo mbcinfo;
|
||||||
MSVCRT_size_t i = 0, len = 0;
|
MSVCRT_size_t i = 0, len = 0;
|
||||||
|
|
||||||
if(!locale)
|
if(!locale)
|
||||||
|
@ -903,7 +903,7 @@ unsigned char* CDECL _mbsnbcpy(unsigned char* dst, const unsigned char* src, MSV
|
||||||
*/
|
*/
|
||||||
int CDECL _mbscmp_l(const unsigned char* str, const unsigned char* cmp, MSVCRT__locale_t locale)
|
int CDECL _mbscmp_l(const unsigned char* str, const unsigned char* cmp, MSVCRT__locale_t locale)
|
||||||
{
|
{
|
||||||
MSVCRT_pthreadmbcinfo mbcinfo;
|
pthreadmbcinfo mbcinfo;
|
||||||
|
|
||||||
if (!str || !cmp) return INT_MAX;
|
if (!str || !cmp) return INT_MAX;
|
||||||
|
|
||||||
|
@ -941,7 +941,7 @@ int CDECL _mbscmp(const unsigned char* str, const unsigned char* cmp, MSVCRT__lo
|
||||||
*/
|
*/
|
||||||
int CDECL _mbsnbicoll_l(const unsigned char *str1, const unsigned char *str2, MSVCRT_size_t len, MSVCRT__locale_t locale)
|
int CDECL _mbsnbicoll_l(const unsigned char *str1, const unsigned char *str2, MSVCRT_size_t len, MSVCRT__locale_t locale)
|
||||||
{
|
{
|
||||||
MSVCRT_pthreadmbcinfo mbcinfo;
|
pthreadmbcinfo mbcinfo;
|
||||||
|
|
||||||
if(!locale)
|
if(!locale)
|
||||||
mbcinfo = get_mbcinfo();
|
mbcinfo = get_mbcinfo();
|
||||||
|
@ -987,7 +987,7 @@ int CDECL _mbsicoll(const unsigned char* str, const unsigned char* cmp)
|
||||||
*/
|
*/
|
||||||
int CDECL _mbsnbcoll_l(const unsigned char *str1, const unsigned char *str2, MSVCRT_size_t len, MSVCRT__locale_t locale)
|
int CDECL _mbsnbcoll_l(const unsigned char *str1, const unsigned char *str2, MSVCRT_size_t len, MSVCRT__locale_t locale)
|
||||||
{
|
{
|
||||||
MSVCRT_pthreadmbcinfo mbcinfo;
|
pthreadmbcinfo mbcinfo;
|
||||||
|
|
||||||
if(!locale)
|
if(!locale)
|
||||||
mbcinfo = get_mbcinfo();
|
mbcinfo = get_mbcinfo();
|
||||||
|
@ -1326,7 +1326,7 @@ unsigned char* CDECL _mbsrchr(const unsigned char* s, unsigned int x)
|
||||||
unsigned char* CDECL _mbstok_s_l(unsigned char *str, const unsigned char *delim,
|
unsigned char* CDECL _mbstok_s_l(unsigned char *str, const unsigned char *delim,
|
||||||
unsigned char **ctx, MSVCRT__locale_t locale)
|
unsigned char **ctx, MSVCRT__locale_t locale)
|
||||||
{
|
{
|
||||||
MSVCRT_pthreadmbcinfo mbcinfo;
|
pthreadmbcinfo mbcinfo;
|
||||||
unsigned int c;
|
unsigned int c;
|
||||||
|
|
||||||
if(!MSVCRT_CHECK_PMT(delim != NULL)) return NULL;
|
if(!MSVCRT_CHECK_PMT(delim != NULL)) return NULL;
|
||||||
|
@ -1426,7 +1426,7 @@ unsigned int CDECL _mbbtombc(unsigned int c)
|
||||||
*/
|
*/
|
||||||
int CDECL _ismbbkana_l(unsigned int c, MSVCRT__locale_t locale)
|
int CDECL _ismbbkana_l(unsigned int c, MSVCRT__locale_t locale)
|
||||||
{
|
{
|
||||||
MSVCRT_pthreadmbcinfo mbcinfo;
|
pthreadmbcinfo mbcinfo;
|
||||||
|
|
||||||
if(locale)
|
if(locale)
|
||||||
mbcinfo = locale->mbcinfo;
|
mbcinfo = locale->mbcinfo;
|
||||||
|
@ -1640,7 +1640,7 @@ int CDECL _ismbckata(unsigned int c)
|
||||||
*/
|
*/
|
||||||
int CDECL _ismbblead_l(unsigned int c, MSVCRT__locale_t locale)
|
int CDECL _ismbblead_l(unsigned int c, MSVCRT__locale_t locale)
|
||||||
{
|
{
|
||||||
MSVCRT_pthreadmbcinfo mbcinfo;
|
pthreadmbcinfo mbcinfo;
|
||||||
|
|
||||||
if(!locale)
|
if(!locale)
|
||||||
mbcinfo = get_mbcinfo();
|
mbcinfo = get_mbcinfo();
|
||||||
|
@ -1663,7 +1663,7 @@ int CDECL _ismbblead(unsigned int c)
|
||||||
*/
|
*/
|
||||||
int CDECL _ismbbtrail_l(unsigned int c, MSVCRT__locale_t locale)
|
int CDECL _ismbbtrail_l(unsigned int c, MSVCRT__locale_t locale)
|
||||||
{
|
{
|
||||||
MSVCRT_pthreadmbcinfo mbcinfo;
|
pthreadmbcinfo mbcinfo;
|
||||||
|
|
||||||
if(!locale)
|
if(!locale)
|
||||||
mbcinfo = get_mbcinfo();
|
mbcinfo = get_mbcinfo();
|
||||||
|
@ -2723,7 +2723,7 @@ unsigned int CDECL _mbctokata(unsigned int c)
|
||||||
*/
|
*/
|
||||||
int CDECL _ismbcl0_l(unsigned int c, MSVCRT__locale_t locale)
|
int CDECL _ismbcl0_l(unsigned int c, MSVCRT__locale_t locale)
|
||||||
{
|
{
|
||||||
MSVCRT_pthreadmbcinfo mbcinfo;
|
pthreadmbcinfo mbcinfo;
|
||||||
|
|
||||||
if(!locale)
|
if(!locale)
|
||||||
mbcinfo = get_mbcinfo();
|
mbcinfo = get_mbcinfo();
|
||||||
|
@ -2752,7 +2752,7 @@ int CDECL _ismbcl0(unsigned int c)
|
||||||
*/
|
*/
|
||||||
int CDECL _ismbcl1_l(unsigned int c, MSVCRT__locale_t locale)
|
int CDECL _ismbcl1_l(unsigned int c, MSVCRT__locale_t locale)
|
||||||
{
|
{
|
||||||
MSVCRT_pthreadmbcinfo mbcinfo;
|
pthreadmbcinfo mbcinfo;
|
||||||
|
|
||||||
if(!locale)
|
if(!locale)
|
||||||
mbcinfo = get_mbcinfo();
|
mbcinfo = get_mbcinfo();
|
||||||
|
@ -2781,7 +2781,7 @@ int CDECL _ismbcl1(unsigned int c)
|
||||||
*/
|
*/
|
||||||
int CDECL _ismbcl2_l(unsigned int c, MSVCRT__locale_t locale)
|
int CDECL _ismbcl2_l(unsigned int c, MSVCRT__locale_t locale)
|
||||||
{
|
{
|
||||||
MSVCRT_pthreadmbcinfo mbcinfo;
|
pthreadmbcinfo mbcinfo;
|
||||||
|
|
||||||
if(!locale)
|
if(!locale)
|
||||||
mbcinfo = get_mbcinfo();
|
mbcinfo = get_mbcinfo();
|
||||||
|
|
|
@ -121,7 +121,7 @@ typedef struct __lc_time_data {
|
||||||
char data[1];
|
char data[1];
|
||||||
} __lc_time_data;
|
} __lc_time_data;
|
||||||
|
|
||||||
typedef struct MSVCRT_threadmbcinfostruct {
|
typedef struct threadmbcinfostruct {
|
||||||
int refcount;
|
int refcount;
|
||||||
int mbcodepage;
|
int mbcodepage;
|
||||||
int ismbcodepage;
|
int ismbcodepage;
|
||||||
|
@ -129,14 +129,12 @@ typedef struct MSVCRT_threadmbcinfostruct {
|
||||||
unsigned short mbulinfo[6];
|
unsigned short mbulinfo[6];
|
||||||
unsigned char mbctype[257];
|
unsigned char mbctype[257];
|
||||||
unsigned char mbcasemap[256];
|
unsigned char mbcasemap[256];
|
||||||
} MSVCRT_threadmbcinfo;
|
} threadmbcinfo;
|
||||||
|
|
||||||
typedef struct MSVCRT_threadmbcinfostruct *MSVCRT_pthreadmbcinfo;
|
|
||||||
|
|
||||||
typedef struct MSVCRT_localeinfo_struct
|
typedef struct MSVCRT_localeinfo_struct
|
||||||
{
|
{
|
||||||
pthreadlocinfo locinfo;
|
pthreadlocinfo locinfo;
|
||||||
MSVCRT_pthreadmbcinfo mbcinfo;
|
pthreadmbcinfo mbcinfo;
|
||||||
} MSVCRT__locale_tstruct, *MSVCRT__locale_t;
|
} MSVCRT__locale_tstruct, *MSVCRT__locale_t;
|
||||||
|
|
||||||
typedef struct MSVCRT__onexit_table_t
|
typedef struct MSVCRT__onexit_table_t
|
||||||
|
@ -194,7 +192,7 @@ struct __thread_data {
|
||||||
void *unk4[3];
|
void *unk4[3];
|
||||||
EXCEPTION_POINTERS *xcptinfo;
|
EXCEPTION_POINTERS *xcptinfo;
|
||||||
int fpecode;
|
int fpecode;
|
||||||
MSVCRT_pthreadmbcinfo mbcinfo;
|
pthreadmbcinfo mbcinfo;
|
||||||
pthreadlocinfo locinfo;
|
pthreadlocinfo locinfo;
|
||||||
int locale_flags;
|
int locale_flags;
|
||||||
int unk5[1];
|
int unk5[1];
|
||||||
|
@ -934,11 +932,11 @@ extern MSVCRT__locale_t MSVCRT_locale;
|
||||||
MSVCRT__locale_t CDECL get_current_locale_noalloc(MSVCRT__locale_t locale) DECLSPEC_HIDDEN;
|
MSVCRT__locale_t CDECL get_current_locale_noalloc(MSVCRT__locale_t locale) DECLSPEC_HIDDEN;
|
||||||
void CDECL free_locale_noalloc(MSVCRT__locale_t locale) DECLSPEC_HIDDEN;
|
void CDECL free_locale_noalloc(MSVCRT__locale_t locale) DECLSPEC_HIDDEN;
|
||||||
pthreadlocinfo CDECL get_locinfo(void) DECLSPEC_HIDDEN;
|
pthreadlocinfo CDECL get_locinfo(void) DECLSPEC_HIDDEN;
|
||||||
MSVCRT_pthreadmbcinfo CDECL get_mbcinfo(void) DECLSPEC_HIDDEN;
|
pthreadmbcinfo CDECL get_mbcinfo(void) DECLSPEC_HIDDEN;
|
||||||
void __cdecl MSVCRT__free_locale(MSVCRT__locale_t);
|
void __cdecl MSVCRT__free_locale(MSVCRT__locale_t);
|
||||||
MSVCRT_threadmbcinfo* create_mbcinfo(int, LCID, MSVCRT_threadmbcinfo*) DECLSPEC_HIDDEN;
|
threadmbcinfo* create_mbcinfo(int, LCID, threadmbcinfo*) DECLSPEC_HIDDEN;
|
||||||
void free_locinfo(pthreadlocinfo) DECLSPEC_HIDDEN;
|
void free_locinfo(pthreadlocinfo) DECLSPEC_HIDDEN;
|
||||||
void free_mbcinfo(MSVCRT_pthreadmbcinfo) DECLSPEC_HIDDEN;
|
void free_mbcinfo(pthreadmbcinfo) DECLSPEC_HIDDEN;
|
||||||
int __cdecl __crtLCMapStringA(LCID, DWORD, const char*, int, char*, int, unsigned int, int) DECLSPEC_HIDDEN;
|
int __cdecl __crtLCMapStringA(LCID, DWORD, const char*, int, char*, int, unsigned int, int) DECLSPEC_HIDDEN;
|
||||||
|
|
||||||
int __cdecl MSVCRT__write(int,const void*,unsigned int);
|
int __cdecl MSVCRT__write(int,const void*,unsigned int);
|
||||||
|
|
Loading…
Reference in New Issue