Alexandre Julliard : msvcrt: Add a few more *_func functions to replace the __p_* ones.
Alexandre Julliard
julliard at winehq.org
Tue Dec 16 08:40:28 CST 2008
Module: wine
Branch: master
Commit: b19913ac7083e4100f50b4f471e19453bf7e99b2
URL: http://source.winehq.org/git/wine.git/?a=commit;h=b19913ac7083e4100f50b4f471e19453bf7e99b2
Author: Alexandre Julliard <julliard at winehq.org>
Date: Mon Dec 15 16:03:32 2008 +0100
msvcrt: Add a few more *_func functions to replace the __p_* ones.
---
dlls/msvcr71/msvcr71.spec | 10 +++++-----
dlls/msvcrt/ctype.c | 8 ++------
dlls/msvcrt/file.c | 2 +-
dlls/msvcrt/locale.c | 8 --------
dlls/msvcrt/mbcs.c | 5 ++---
dlls/msvcrt/msvcrt.h | 6 ++++++
dlls/msvcrt/msvcrt.spec | 13 +++++++++----
dlls/msvcrtd/msvcrtd.spec | 2 ++
include/msvcrt/stdlib.h | 4 ++--
9 files changed, 29 insertions(+), 29 deletions(-)
diff --git a/dlls/msvcr71/msvcr71.spec b/dlls/msvcr71/msvcr71.spec
index f02052b..330cc42 100644
--- a/dlls/msvcr71/msvcr71.spec
+++ b/dlls/msvcr71/msvcr71.spec
@@ -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
diff --git a/dlls/msvcrt/ctype.c b/dlls/msvcrt/ctype.c
index 7b8c1fa..39d13ea 100644
--- a/dlls/msvcrt/ctype.c
+++ b/dlls/msvcrt/ctype.c
@@ -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;
}
diff --git a/dlls/msvcrt/file.c b/dlls/msvcrt/file.c
index 888f90c..76c4ea7 100644
--- a/dlls/msvcrt/file.c
+++ b/dlls/msvcrt/file.c
@@ -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");
}
diff --git a/dlls/msvcrt/locale.c b/dlls/msvcrt/locale.c
index 1d27eaf..e0ddb94 100644
--- a/dlls/msvcrt/locale.c
+++ b/dlls/msvcrt/locale.c
@@ -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.
diff --git a/dlls/msvcrt/mbcs.c b/dlls/msvcrt/mbcs.c
index 22cfea0..d1a84e7 100644
--- a/dlls/msvcrt/mbcs.c
+++ b/dlls/msvcrt/mbcs.c
@@ -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;
}
diff --git a/dlls/msvcrt/msvcrt.h b/dlls/msvcrt/msvcrt.h
index 2b2934e..1105125 100644
--- a/dlls/msvcrt/msvcrt.h
+++ b/dlls/msvcrt/msvcrt.h
@@ -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);
diff --git a/dlls/msvcrt/msvcrt.spec b/dlls/msvcrt/msvcrt.spec
index 31a56b4..dcbebfc 100644
--- a/dlls/msvcrt/msvcrt.spec
+++ b/dlls/msvcrt/msvcrt.spec
@@ -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
diff --git a/dlls/msvcrtd/msvcrtd.spec b/dlls/msvcrtd/msvcrtd.spec
index 0b8e8f0..d000f33 100644
--- a/dlls/msvcrtd/msvcrtd.spec
+++ b/dlls/msvcrtd/msvcrtd.spec
@@ -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
diff --git a/include/msvcrt/stdlib.h b/include/msvcrt/stdlib.h
index 65c61a2..42495c2 100644
--- a/include/msvcrt/stdlib.h
+++ b/include/msvcrt/stdlib.h
@@ -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)
More information about the wine-cvs
mailing list