mirror of
https://github.com/reactos/wine.git
synced 2024-11-28 14:10:32 +00:00
msvcrt: Add a few more *_func functions to replace the __p_* ones.
This commit is contained in:
parent
bcfd7dd3ff
commit
b19913ac70
@ -90,10 +90,10 @@
|
||||
@ cdecl __RTDynamicCast(ptr long ptr ptr long) msvcrt.__RTDynamicCast
|
||||
@ cdecl __RTtypeid(ptr) msvcrt.__RTtypeid
|
||||
@ cdecl __STRINGTOLD(ptr ptr str long) msvcrt.__STRINGTOLD
|
||||
@ stub ___lc_codepage_func
|
||||
@ stub ___lc_collate_cp_func
|
||||
@ stub ___lc_handle_func
|
||||
@ stub ___mb_cur_max_func
|
||||
@ cdecl ___lc_codepage_func() msvcrt.___lc_codepage_func
|
||||
@ cdecl ___lc_collate_cp_func() msvcrt.___lc_collate_cp_func
|
||||
@ cdecl ___lc_handle_func() msvcrt.___lc_handle_func
|
||||
@ cdecl ___mb_cur_max_func() msvcrt.___mb_cur_max_func
|
||||
@ cdecl ___setlc_active_func() msvcrt.___setlc_active_func
|
||||
@ cdecl ___unguarded_readlc_active_add_func() msvcrt.___unguarded_readlc_active_add_func
|
||||
@ extern __argc msvcrt.__argc
|
||||
@ -150,7 +150,7 @@
|
||||
@ cdecl __p__winminor() msvcrt.__p__winminor
|
||||
@ cdecl __p__winver() msvcrt.__p__winver
|
||||
@ cdecl __p__wpgmptr() msvcrt.__p__wpgmptr
|
||||
@ cdecl __pctype_func() msvcrt.__p__pctype
|
||||
@ cdecl __pctype_func() msvcrt.__pctype_func
|
||||
@ extern __pioinfo msvcrt.__pioinfo
|
||||
@ stub __pwctype_func
|
||||
@ cdecl __pxcptinfoptrs() msvcrt.__pxcptinfoptrs
|
||||
|
@ -60,14 +60,10 @@ WORD MSVCRT_current_ctype[257];
|
||||
*/
|
||||
WORD* MSVCRT__pctype = MSVCRT_current_ctype + 1;
|
||||
|
||||
/* mbctype data */
|
||||
extern int MSVCRT___mb_cur_max;
|
||||
extern LCID MSVCRT_current_lc_all_lcid;
|
||||
|
||||
/*********************************************************************
|
||||
* __p__pctype (MSVCRT.@)
|
||||
* __pctype_func (MSVCRT.@)
|
||||
*/
|
||||
WORD** CDECL __p__pctype(void)
|
||||
WORD** CDECL MSVCRT___pctype_func(void)
|
||||
{
|
||||
return &MSVCRT__pctype;
|
||||
}
|
||||
|
@ -2309,7 +2309,7 @@ MSVCRT_wint_t CDECL MSVCRT_fgetwc(MSVCRT_FILE* file)
|
||||
}
|
||||
|
||||
c = MSVCRT_fgetc(file);
|
||||
if ((*__p___mb_cur_max() > 1) && MSVCRT_isleadbyte(c))
|
||||
if ((MSVCRT___mb_cur_max > 1) && MSVCRT_isleadbyte(c))
|
||||
{
|
||||
FIXME("Treat Multibyte characters\n");
|
||||
}
|
||||
|
@ -52,14 +52,6 @@ HANDLE MSVCRT___lc_handle[MSVCRT_LC_MAX - MSVCRT_LC_MIN + 1] = { 0 };
|
||||
#define LOCK_LOCALE _mlock(_SETLOCALE_LOCK);
|
||||
#define UNLOCK_LOCALE _munlock(_SETLOCALE_LOCK);
|
||||
|
||||
/* ctype data modified when the locale changes */
|
||||
extern WORD MSVCRT__ctype [257];
|
||||
extern WORD MSVCRT_current_ctype[257];
|
||||
extern WORD* MSVCRT__pctype;
|
||||
|
||||
/* mbctype data modified when the locale changes */
|
||||
extern int MSVCRT___mb_cur_max;
|
||||
|
||||
#define MSVCRT_LEADBYTE 0x8000
|
||||
|
||||
/* Friendly country strings & iso codes for synonym support.
|
||||
|
@ -33,7 +33,6 @@ unsigned char MSVCRT_mbctype[257] = { 0 };
|
||||
static int g_mbcp_is_multibyte = 0;
|
||||
|
||||
int MSVCRT___mb_cur_max = 1;
|
||||
extern int MSVCRT___lc_collate_cp;
|
||||
|
||||
/* It seems that the data about valid trail bytes is not available from kernel32
|
||||
* so we have to store is here. The format is the same as for lead bytes in CPINFO */
|
||||
@ -144,9 +143,9 @@ unsigned char* CDECL __p__mbctype(void)
|
||||
}
|
||||
|
||||
/*********************************************************************
|
||||
* __p___mb_cur_max(MSVCRT.@)
|
||||
* ___mb_cur_max_func(MSVCRT.@)
|
||||
*/
|
||||
int* CDECL __p___mb_cur_max(void)
|
||||
int* CDECL MSVCRT____mb_cur_max_func(void)
|
||||
{
|
||||
return &MSVCRT___mb_cur_max;
|
||||
}
|
||||
|
@ -113,6 +113,12 @@ typedef struct __thread_data thread_data_t;
|
||||
extern thread_data_t *msvcrt_get_thread_data(void);
|
||||
|
||||
extern int MSVCRT___lc_codepage;
|
||||
extern int MSVCRT___lc_collate_cp;
|
||||
extern int MSVCRT___mb_cur_max;
|
||||
extern LCID MSVCRT_current_lc_all_lcid;
|
||||
extern WORD MSVCRT__ctype [257];
|
||||
extern WORD MSVCRT_current_ctype[257];
|
||||
extern WORD* MSVCRT__pctype;
|
||||
|
||||
void msvcrt_set_errno(int);
|
||||
|
||||
|
@ -84,6 +84,12 @@
|
||||
@ cdecl __RTDynamicCast(ptr long ptr ptr long) MSVCRT___RTDynamicCast
|
||||
@ cdecl __RTtypeid(ptr) MSVCRT___RTtypeid
|
||||
@ cdecl __STRINGTOLD(ptr ptr str long)
|
||||
@ stub ___lc_codepage_func
|
||||
@ stub ___lc_collate_cp_func
|
||||
@ stub ___lc_handle_func
|
||||
@ cdecl ___mb_cur_max_func() MSVCRT____mb_cur_max_func
|
||||
@ cdecl ___setlc_active_func() MSVCRT____setlc_active_func
|
||||
@ cdecl ___unguarded_readlc_active_add_func() MSVCRT____unguarded_readlc_active_add_func
|
||||
@ extern __argc MSVCRT___argc
|
||||
@ extern __argv MSVCRT___argv
|
||||
@ extern __badioinfo MSVCRT___badioinfo
|
||||
@ -110,7 +116,7 @@
|
||||
@ cdecl __p___argc()
|
||||
@ cdecl __p___argv()
|
||||
@ cdecl __p___initenv()
|
||||
@ cdecl __p___mb_cur_max()
|
||||
@ cdecl __p___mb_cur_max() MSVCRT____mb_cur_max_func
|
||||
@ cdecl __p___wargv()
|
||||
@ cdecl __p___winitenv()
|
||||
@ cdecl __p__acmdln()
|
||||
@ -125,7 +131,7 @@
|
||||
@ stub __p__mbcasemap #()
|
||||
@ cdecl __p__mbctype()
|
||||
@ cdecl __p__osver()
|
||||
@ cdecl __p__pctype()
|
||||
@ cdecl __p__pctype() MSVCRT___pctype_func
|
||||
@ cdecl __p__pgmptr()
|
||||
@ stub __p__pwctype #()
|
||||
@ cdecl __p__timezone() MSVCRT___p__timezone
|
||||
@ -136,11 +142,11 @@
|
||||
@ cdecl __p__winminor()
|
||||
@ cdecl __p__winver()
|
||||
@ cdecl __p__wpgmptr()
|
||||
@ cdecl __pctype_func() MSVCRT___pctype_func
|
||||
@ extern __pioinfo MSVCRT___pioinfo
|
||||
@ stub __pxcptinfoptrs #()
|
||||
@ cdecl __set_app_type(long) MSVCRT___set_app_type
|
||||
@ extern __setlc_active MSVCRT___setlc_active
|
||||
@ cdecl ___setlc_active_func() MSVCRT____setlc_active_func
|
||||
@ cdecl __setusermatherr(ptr) MSVCRT___setusermatherr
|
||||
@ cdecl __threadhandle() kernel32.GetCurrentThread
|
||||
@ cdecl __threadid() kernel32.GetCurrentThreadId
|
||||
@ -148,7 +154,6 @@
|
||||
@ cdecl __unDName(ptr str long ptr ptr long)
|
||||
@ cdecl __unDNameEx(ptr str long ptr ptr ptr long)
|
||||
@ extern __unguarded_readlc_active MSVCRT___unguarded_readlc_active
|
||||
@ cdecl ___unguarded_readlc_active_add_func() MSVCRT____unguarded_readlc_active_add_func
|
||||
@ extern __wargv MSVCRT___wargv
|
||||
@ cdecl __wgetmainargs(ptr ptr ptr long ptr)
|
||||
@ extern __winitenv MSVCRT___winitenv
|
||||
|
@ -100,6 +100,7 @@
|
||||
@ cdecl __RTDynamicCast(ptr long ptr ptr long) msvcrt.__RTDynamicCast
|
||||
@ cdecl __RTtypeid(ptr) msvcrt.__RTtypeid
|
||||
@ cdecl __STRINGTOLD(ptr ptr str long) msvcrt.__STRINGTOLD
|
||||
@ cdecl ___mb_cur_max_func() msvcrt.___mb_cur_max_func
|
||||
@ extern __argc msvcrt.__argc
|
||||
@ extern __argv msvcrt.__argv
|
||||
@ extern __badioinfo msvcrt.__badioinfo
|
||||
@ -151,6 +152,7 @@
|
||||
@ cdecl __p__winminor() msvcrt.__p__winminor
|
||||
@ cdecl __p__winver() msvcrt.__p__winver
|
||||
@ cdecl __p__wpgmptr() msvcrt.__p__wpgmptr
|
||||
@ cdecl __pctype_func() msvcrt.__pctype_func
|
||||
@ extern __pioinfo msvcrt.__pioinfo
|
||||
@ cdecl __pxcptinfoptrs() msvcrt.__pxcptinfoptrs
|
||||
@ cdecl __set_app_type(long) msvcrt.__set_app_type
|
||||
|
@ -90,7 +90,7 @@ extern char*** __p___argv(void);
|
||||
extern wchar_t*** __p___wargv(void);
|
||||
extern char*** __p__environ(void);
|
||||
extern wchar_t*** __p__wenviron(void);
|
||||
extern int* __p___mb_cur_max(void);
|
||||
extern int* ___mb_cur_max_func(void);
|
||||
extern unsigned long* __doserrno(void);
|
||||
extern unsigned int* __p__fmode(void);
|
||||
/* FIXME: We need functions to access these:
|
||||
@ -102,7 +102,7 @@ extern unsigned int* __p__fmode(void);
|
||||
#define __wargv (*__p___wargv())
|
||||
#define _environ (*__p__environ())
|
||||
#define _wenviron (*__p__wenviron())
|
||||
#define __mb_cur_max (*__p___mb_cur_max())
|
||||
#define __mb_cur_max (*___mb_cur_max_func())
|
||||
#define _doserrno (*__doserrno())
|
||||
#define _fmode (*_fmode)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user