Commit b19913ac authored by Alexandre Julliard's avatar Alexandre Julliard

msvcrt: Add a few more *_func functions to replace the __p_* ones.

parent bcfd7dd3
...@@ -90,10 +90,10 @@ ...@@ -90,10 +90,10 @@
@ cdecl __RTDynamicCast(ptr long ptr ptr long) msvcrt.__RTDynamicCast @ cdecl __RTDynamicCast(ptr long ptr ptr long) msvcrt.__RTDynamicCast
@ cdecl __RTtypeid(ptr) msvcrt.__RTtypeid @ cdecl __RTtypeid(ptr) msvcrt.__RTtypeid
@ cdecl __STRINGTOLD(ptr ptr str long) msvcrt.__STRINGTOLD @ cdecl __STRINGTOLD(ptr ptr str long) msvcrt.__STRINGTOLD
@ stub ___lc_codepage_func @ cdecl ___lc_codepage_func() msvcrt.___lc_codepage_func
@ stub ___lc_collate_cp_func @ cdecl ___lc_collate_cp_func() msvcrt.___lc_collate_cp_func
@ stub ___lc_handle_func @ cdecl ___lc_handle_func() msvcrt.___lc_handle_func
@ stub ___mb_cur_max_func @ cdecl ___mb_cur_max_func() msvcrt.___mb_cur_max_func
@ cdecl ___setlc_active_func() msvcrt.___setlc_active_func @ cdecl ___setlc_active_func() msvcrt.___setlc_active_func
@ cdecl ___unguarded_readlc_active_add_func() msvcrt.___unguarded_readlc_active_add_func @ cdecl ___unguarded_readlc_active_add_func() msvcrt.___unguarded_readlc_active_add_func
@ extern __argc msvcrt.__argc @ extern __argc msvcrt.__argc
...@@ -150,7 +150,7 @@ ...@@ -150,7 +150,7 @@
@ cdecl __p__winminor() msvcrt.__p__winminor @ cdecl __p__winminor() msvcrt.__p__winminor
@ cdecl __p__winver() msvcrt.__p__winver @ cdecl __p__winver() msvcrt.__p__winver
@ cdecl __p__wpgmptr() msvcrt.__p__wpgmptr @ cdecl __p__wpgmptr() msvcrt.__p__wpgmptr
@ cdecl __pctype_func() msvcrt.__p__pctype @ cdecl __pctype_func() msvcrt.__pctype_func
@ extern __pioinfo msvcrt.__pioinfo @ extern __pioinfo msvcrt.__pioinfo
@ stub __pwctype_func @ stub __pwctype_func
@ cdecl __pxcptinfoptrs() msvcrt.__pxcptinfoptrs @ cdecl __pxcptinfoptrs() msvcrt.__pxcptinfoptrs
......
...@@ -60,14 +60,10 @@ WORD MSVCRT_current_ctype[257]; ...@@ -60,14 +60,10 @@ WORD MSVCRT_current_ctype[257];
*/ */
WORD* MSVCRT__pctype = MSVCRT_current_ctype + 1; 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; return &MSVCRT__pctype;
} }
......
...@@ -2309,7 +2309,7 @@ MSVCRT_wint_t CDECL MSVCRT_fgetwc(MSVCRT_FILE* file) ...@@ -2309,7 +2309,7 @@ MSVCRT_wint_t CDECL MSVCRT_fgetwc(MSVCRT_FILE* file)
} }
c = MSVCRT_fgetc(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"); FIXME("Treat Multibyte characters\n");
} }
......
...@@ -52,14 +52,6 @@ HANDLE MSVCRT___lc_handle[MSVCRT_LC_MAX - MSVCRT_LC_MIN + 1] = { 0 }; ...@@ -52,14 +52,6 @@ HANDLE MSVCRT___lc_handle[MSVCRT_LC_MAX - MSVCRT_LC_MIN + 1] = { 0 };
#define LOCK_LOCALE _mlock(_SETLOCALE_LOCK); #define LOCK_LOCALE _mlock(_SETLOCALE_LOCK);
#define UNLOCK_LOCALE _munlock(_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 #define MSVCRT_LEADBYTE 0x8000
/* Friendly country strings & iso codes for synonym support. /* Friendly country strings & iso codes for synonym support.
......
...@@ -33,7 +33,6 @@ unsigned char MSVCRT_mbctype[257] = { 0 }; ...@@ -33,7 +33,6 @@ unsigned char MSVCRT_mbctype[257] = { 0 };
static int g_mbcp_is_multibyte = 0; static int g_mbcp_is_multibyte = 0;
int MSVCRT___mb_cur_max = 1; 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 /* 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 */ * 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) ...@@ -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; return &MSVCRT___mb_cur_max;
} }
......
...@@ -113,6 +113,12 @@ typedef struct __thread_data thread_data_t; ...@@ -113,6 +113,12 @@ typedef struct __thread_data thread_data_t;
extern thread_data_t *msvcrt_get_thread_data(void); extern thread_data_t *msvcrt_get_thread_data(void);
extern int MSVCRT___lc_codepage; 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); void msvcrt_set_errno(int);
......
...@@ -84,6 +84,12 @@ ...@@ -84,6 +84,12 @@
@ cdecl __RTDynamicCast(ptr long ptr ptr long) MSVCRT___RTDynamicCast @ cdecl __RTDynamicCast(ptr long ptr ptr long) MSVCRT___RTDynamicCast
@ cdecl __RTtypeid(ptr) MSVCRT___RTtypeid @ cdecl __RTtypeid(ptr) MSVCRT___RTtypeid
@ cdecl __STRINGTOLD(ptr ptr str long) @ 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 __argc MSVCRT___argc
@ extern __argv MSVCRT___argv @ extern __argv MSVCRT___argv
@ extern __badioinfo MSVCRT___badioinfo @ extern __badioinfo MSVCRT___badioinfo
...@@ -110,7 +116,7 @@ ...@@ -110,7 +116,7 @@
@ cdecl __p___argc() @ cdecl __p___argc()
@ cdecl __p___argv() @ cdecl __p___argv()
@ cdecl __p___initenv() @ cdecl __p___initenv()
@ cdecl __p___mb_cur_max() @ cdecl __p___mb_cur_max() MSVCRT____mb_cur_max_func
@ cdecl __p___wargv() @ cdecl __p___wargv()
@ cdecl __p___winitenv() @ cdecl __p___winitenv()
@ cdecl __p__acmdln() @ cdecl __p__acmdln()
...@@ -125,7 +131,7 @@ ...@@ -125,7 +131,7 @@
@ stub __p__mbcasemap #() @ stub __p__mbcasemap #()
@ cdecl __p__mbctype() @ cdecl __p__mbctype()
@ cdecl __p__osver() @ cdecl __p__osver()
@ cdecl __p__pctype() @ cdecl __p__pctype() MSVCRT___pctype_func
@ cdecl __p__pgmptr() @ cdecl __p__pgmptr()
@ stub __p__pwctype #() @ stub __p__pwctype #()
@ cdecl __p__timezone() MSVCRT___p__timezone @ cdecl __p__timezone() MSVCRT___p__timezone
...@@ -136,11 +142,11 @@ ...@@ -136,11 +142,11 @@
@ cdecl __p__winminor() @ cdecl __p__winminor()
@ cdecl __p__winver() @ cdecl __p__winver()
@ cdecl __p__wpgmptr() @ cdecl __p__wpgmptr()
@ cdecl __pctype_func() MSVCRT___pctype_func
@ extern __pioinfo MSVCRT___pioinfo @ extern __pioinfo MSVCRT___pioinfo
@ stub __pxcptinfoptrs #() @ stub __pxcptinfoptrs #()
@ cdecl __set_app_type(long) MSVCRT___set_app_type @ cdecl __set_app_type(long) MSVCRT___set_app_type
@ extern __setlc_active MSVCRT___setlc_active @ extern __setlc_active MSVCRT___setlc_active
@ cdecl ___setlc_active_func() MSVCRT____setlc_active_func
@ cdecl __setusermatherr(ptr) MSVCRT___setusermatherr @ cdecl __setusermatherr(ptr) MSVCRT___setusermatherr
@ cdecl __threadhandle() kernel32.GetCurrentThread @ cdecl __threadhandle() kernel32.GetCurrentThread
@ cdecl __threadid() kernel32.GetCurrentThreadId @ cdecl __threadid() kernel32.GetCurrentThreadId
...@@ -148,7 +154,6 @@ ...@@ -148,7 +154,6 @@
@ cdecl __unDName(ptr str long ptr ptr long) @ cdecl __unDName(ptr str long ptr ptr long)
@ cdecl __unDNameEx(ptr str long ptr ptr ptr long) @ cdecl __unDNameEx(ptr str long ptr ptr ptr long)
@ extern __unguarded_readlc_active MSVCRT___unguarded_readlc_active @ extern __unguarded_readlc_active MSVCRT___unguarded_readlc_active
@ cdecl ___unguarded_readlc_active_add_func() MSVCRT____unguarded_readlc_active_add_func
@ extern __wargv MSVCRT___wargv @ extern __wargv MSVCRT___wargv
@ cdecl __wgetmainargs(ptr ptr ptr long ptr) @ cdecl __wgetmainargs(ptr ptr ptr long ptr)
@ extern __winitenv MSVCRT___winitenv @ extern __winitenv MSVCRT___winitenv
......
...@@ -100,6 +100,7 @@ ...@@ -100,6 +100,7 @@
@ cdecl __RTDynamicCast(ptr long ptr ptr long) msvcrt.__RTDynamicCast @ cdecl __RTDynamicCast(ptr long ptr ptr long) msvcrt.__RTDynamicCast
@ cdecl __RTtypeid(ptr) msvcrt.__RTtypeid @ cdecl __RTtypeid(ptr) msvcrt.__RTtypeid
@ cdecl __STRINGTOLD(ptr ptr str long) msvcrt.__STRINGTOLD @ cdecl __STRINGTOLD(ptr ptr str long) msvcrt.__STRINGTOLD
@ cdecl ___mb_cur_max_func() msvcrt.___mb_cur_max_func
@ extern __argc msvcrt.__argc @ extern __argc msvcrt.__argc
@ extern __argv msvcrt.__argv @ extern __argv msvcrt.__argv
@ extern __badioinfo msvcrt.__badioinfo @ extern __badioinfo msvcrt.__badioinfo
...@@ -151,6 +152,7 @@ ...@@ -151,6 +152,7 @@
@ cdecl __p__winminor() msvcrt.__p__winminor @ cdecl __p__winminor() msvcrt.__p__winminor
@ cdecl __p__winver() msvcrt.__p__winver @ cdecl __p__winver() msvcrt.__p__winver
@ cdecl __p__wpgmptr() msvcrt.__p__wpgmptr @ cdecl __p__wpgmptr() msvcrt.__p__wpgmptr
@ cdecl __pctype_func() msvcrt.__pctype_func
@ extern __pioinfo msvcrt.__pioinfo @ extern __pioinfo msvcrt.__pioinfo
@ cdecl __pxcptinfoptrs() msvcrt.__pxcptinfoptrs @ cdecl __pxcptinfoptrs() msvcrt.__pxcptinfoptrs
@ cdecl __set_app_type(long) msvcrt.__set_app_type @ cdecl __set_app_type(long) msvcrt.__set_app_type
......
...@@ -90,7 +90,7 @@ extern char*** __p___argv(void); ...@@ -90,7 +90,7 @@ extern char*** __p___argv(void);
extern wchar_t*** __p___wargv(void); extern wchar_t*** __p___wargv(void);
extern char*** __p__environ(void); extern char*** __p__environ(void);
extern wchar_t*** __p__wenviron(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 long* __doserrno(void);
extern unsigned int* __p__fmode(void); extern unsigned int* __p__fmode(void);
/* FIXME: We need functions to access these: /* FIXME: We need functions to access these:
...@@ -102,7 +102,7 @@ extern unsigned int* __p__fmode(void); ...@@ -102,7 +102,7 @@ extern unsigned int* __p__fmode(void);
#define __wargv (*__p___wargv()) #define __wargv (*__p___wargv())
#define _environ (*__p__environ()) #define _environ (*__p__environ())
#define _wenviron (*__p__wenviron()) #define _wenviron (*__p__wenviron())
#define __mb_cur_max (*__p___mb_cur_max()) #define __mb_cur_max (*___mb_cur_max_func())
#define _doserrno (*__doserrno()) #define _doserrno (*__doserrno())
#define _fmode (*_fmode) #define _fmode (*_fmode)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment