Daniel Lehman : msvcrt: Add _iswctype_l.
Alexandre Julliard
julliard at winehq.org
Tue Apr 4 14:54:52 CDT 2017
Module: wine
Branch: master
Commit: bda232de94d784e4cfaf5e252f76034722f8f58a
URL: http://source.winehq.org/git/wine.git/?a=commit;h=bda232de94d784e4cfaf5e252f76034722f8f58a
Author: Daniel Lehman <dlehman at esri.com>
Date: Mon Apr 3 11:52:18 2017 -0700
msvcrt: Add _iswctype_l.
Signed-off-by: Daniel Lehman <dlehman at esri.com>
Signed-off-by: Piotr Caban <piotr at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
.../api-ms-win-crt-string-l1-1-0.spec | 2 +-
dlls/msvcr100/msvcr100.spec | 2 +-
dlls/msvcr110/msvcr110.spec | 2 +-
dlls/msvcr120/msvcr120.spec | 2 +-
dlls/msvcr120_app/msvcr120_app.spec | 2 +-
dlls/msvcr80/msvcr80.spec | 2 +-
dlls/msvcr90/msvcr90.spec | 2 +-
dlls/msvcrt/msvcrt.spec | 2 +-
dlls/msvcrt/wcs.c | 8 ++++++++
dlls/ucrtbase/tests/misc.c | 15 +++++++++++++++
dlls/ucrtbase/ucrtbase.spec | 2 +-
11 files changed, 32 insertions(+), 9 deletions(-)
diff --git a/dlls/api-ms-win-crt-string-l1-1-0/api-ms-win-crt-string-l1-1-0.spec b/dlls/api-ms-win-crt-string-l1-1-0/api-ms-win-crt-string-l1-1-0.spec
index 4b08bc6..fe3ae54 100644
--- a/dlls/api-ms-win-crt-string-l1-1-0/api-ms-win-crt-string-l1-1-0.spec
+++ b/dlls/api-ms-win-crt-string-l1-1-0/api-ms-win-crt-string-l1-1-0.spec
@@ -25,7 +25,7 @@
@ stub _iswcntrl_l
@ stub _iswcsym_l
@ stub _iswcsymf_l
-@ stub _iswctype_l
+@ cdecl _iswctype_l(long long ptr) ucrtbase._iswctype_l
@ cdecl _iswdigit_l(long ptr) ucrtbase._iswdigit_l
@ stub _iswgraph_l
@ stub _iswlower_l
diff --git a/dlls/msvcr100/msvcr100.spec b/dlls/msvcr100/msvcr100.spec
index 45eb181..2c0f3c9 100644
--- a/dlls/msvcr100/msvcr100.spec
+++ b/dlls/msvcr100/msvcr100.spec
@@ -1021,7 +1021,7 @@
@ stub _iswcntrl_l
@ stub _iswcsym_l
@ stub _iswcsymf_l
-@ stub _iswctype_l
+@ cdecl _iswctype_l(long long ptr) MSVCRT__iswctype_l
@ cdecl _iswdigit_l(long ptr) MSVCRT__iswdigit_l
@ stub _iswgraph_l
@ stub _iswlower_l
diff --git a/dlls/msvcr110/msvcr110.spec b/dlls/msvcr110/msvcr110.spec
index 25fb21b..dcaa089 100644
--- a/dlls/msvcr110/msvcr110.spec
+++ b/dlls/msvcr110/msvcr110.spec
@@ -1367,7 +1367,7 @@
@ stub _iswcntrl_l
@ stub _iswcsym_l
@ stub _iswcsymf_l
-@ stub _iswctype_l
+@ cdecl _iswctype_l(long long ptr) MSVCRT__iswctype_l
@ cdecl _iswdigit_l(long ptr) MSVCRT__iswdigit_l
@ stub _iswgraph_l
@ stub _iswlower_l
diff --git a/dlls/msvcr120/msvcr120.spec b/dlls/msvcr120/msvcr120.spec
index c779528..1701c4a 100644
--- a/dlls/msvcr120/msvcr120.spec
+++ b/dlls/msvcr120/msvcr120.spec
@@ -1373,7 +1373,7 @@
@ stub _iswcntrl_l
@ stub _iswcsym_l
@ stub _iswcsymf_l
-@ stub _iswctype_l
+@ cdecl _iswctype_l(long long ptr) MSVCRT__iswctype_l
@ cdecl _iswdigit_l(long ptr) MSVCRT__iswdigit_l
@ stub _iswgraph_l
@ stub _iswlower_l
diff --git a/dlls/msvcr120_app/msvcr120_app.spec b/dlls/msvcr120_app/msvcr120_app.spec
index 8ca6c5f..023aa00 100644
--- a/dlls/msvcr120_app/msvcr120_app.spec
+++ b/dlls/msvcr120_app/msvcr120_app.spec
@@ -1238,7 +1238,7 @@
@ stub _iswcntrl_l
@ stub _iswcsym_l
@ stub _iswcsymf_l
-@ stub _iswctype_l
+@ cdecl _iswctype_l(long long ptr) msvcr120._iswctype_l
@ cdecl _iswdigit_l(long ptr) msvcr120._iswdigit_l
@ stub _iswgraph_l
@ stub _iswlower_l
diff --git a/dlls/msvcr80/msvcr80.spec b/dlls/msvcr80/msvcr80.spec
index 4b51ae1..de945d5 100644
--- a/dlls/msvcr80/msvcr80.spec
+++ b/dlls/msvcr80/msvcr80.spec
@@ -693,7 +693,7 @@
@ stub _iswcntrl_l
@ stub _iswcsym_l
@ stub _iswcsymf_l
-@ stub _iswctype_l
+@ cdecl _iswctype_l(long long ptr) MSVCRT__iswctype_l
@ cdecl _iswdigit_l(long ptr) MSVCRT__iswdigit_l
@ stub _iswgraph_l
@ stub _iswlower_l
diff --git a/dlls/msvcr90/msvcr90.spec b/dlls/msvcr90/msvcr90.spec
index 9e9f73b..8b4a77c 100644
--- a/dlls/msvcr90/msvcr90.spec
+++ b/dlls/msvcr90/msvcr90.spec
@@ -671,7 +671,7 @@
@ stub _iswcntrl_l
@ stub _iswcsym_l
@ stub _iswcsymf_l
-@ stub _iswctype_l
+@ cdecl _iswctype_l(long long ptr) MSVCRT__iswctype_l
@ cdecl _iswdigit_l(long ptr) MSVCRT__iswdigit_l
@ stub _iswgraph_l
@ stub _iswlower_l
diff --git a/dlls/msvcrt/msvcrt.spec b/dlls/msvcrt/msvcrt.spec
index ecef9b8..1a887d3 100644
--- a/dlls/msvcrt/msvcrt.spec
+++ b/dlls/msvcrt/msvcrt.spec
@@ -636,7 +636,7 @@
# stub _iswalnum_l(long ptr)
@ cdecl _iswalpha_l(long ptr) MSVCRT__iswalpha_l
# stub _iswcntrl_l(long ptr)
-# stub _iswctype_l(long long ptr)
+@ cdecl _iswctype_l(long long ptr) MSVCRT__iswctype_l
@ cdecl _iswdigit_l(long ptr) MSVCRT__iswdigit_l
# stub _iswgraph_l(long ptr)
# stub _iswlower_l(long ptr)
diff --git a/dlls/msvcrt/wcs.c b/dlls/msvcrt/wcs.c
index bd7cc20..89c4152 100644
--- a/dlls/msvcrt/wcs.c
+++ b/dlls/msvcrt/wcs.c
@@ -1858,6 +1858,14 @@ INT CDECL MSVCRT_iswxdigit( MSVCRT_wchar_t wc )
}
/*********************************************************************
+ * _iswctype_l (MSVCRT.@)
+ */
+INT CDECL MSVCRT__iswctype_l( MSVCRT_wchar_t wc, MSVCRT_wctype_t type, MSVCRT__locale_t locale )
+{
+ return (get_char_typeW(wc) & 0xffff) & type;
+}
+
+/*********************************************************************
* wcscpy_s (MSVCRT.@)
*/
INT CDECL MSVCRT_wcscpy_s( MSVCRT_wchar_t* wcDest, MSVCRT_size_t numElement, const MSVCRT_wchar_t *wcSrc)
diff --git a/dlls/ucrtbase/tests/misc.c b/dlls/ucrtbase/tests/misc.c
index 910a0f9..5a1f8dc 100644
--- a/dlls/ucrtbase/tests/misc.c
+++ b/dlls/ucrtbase/tests/misc.c
@@ -89,6 +89,7 @@ static MSVCRT_lldiv_t (CDECL *p_lldiv)(LONGLONG,LONGLONG);
static int (CDECL *p__isctype)(int,int);
static int (CDECL *p_isblank)(int);
static int (CDECL *p__isblank_l)(int,_locale_t);
+static int (CDECL *p__iswctype_l)(int,int,_locale_t);
static void test__initialize_onexit_table(void)
{
@@ -386,6 +387,7 @@ static BOOL init(void)
p__isctype = (void*)GetProcAddress(module, "_isctype");
p_isblank = (void*)GetProcAddress(module, "isblank");
p__isblank_l = (void*)GetProcAddress(module, "_isblank_l");
+ p__iswctype_l = (void*)GetProcAddress(module, "_iswctype_l");
return TRUE;
}
@@ -484,6 +486,19 @@ static void test_isblank(void)
ok(!p__isblank_l(c, NULL), "%d shouldn't be blank\n", c);
}
}
+
+ for(c = 0; c <= 0xffff; c++) {
+ if(c == '\t' || c == ' ' || c == 0x3000 || c == 0xfeff) {
+ if(c == '\t')
+ todo_wine ok(!p__iswctype_l(c, _BLANK, NULL), "tab shouldn't be blank\n");
+ else
+ ok(p__iswctype_l(c, _BLANK, NULL), "%d should be blank\n", c);
+ } else {
+ todo_wine_if(c == 0xa0) {
+ ok(!p__iswctype_l(c, _BLANK, NULL), "%d shouldn't be blank\n", c);
+ }
+ }
+ }
}
START_TEST(misc)
diff --git a/dlls/ucrtbase/ucrtbase.spec b/dlls/ucrtbase/ucrtbase.spec
index 8f1284c..9c0b807 100644
--- a/dlls/ucrtbase/ucrtbase.spec
+++ b/dlls/ucrtbase/ucrtbase.spec
@@ -512,7 +512,7 @@
@ stub _iswcntrl_l
@ stub _iswcsym_l
@ stub _iswcsymf_l
-@ stub _iswctype_l
+@ cdecl _iswctype_l(long long ptr) MSVCRT__iswctype_l
@ cdecl _iswdigit_l(long ptr) MSVCRT__iswdigit_l
@ stub _iswgraph_l
@ stub _iswlower_l
More information about the wine-cvs
mailing list