msvcrt: Add _iswctype_l.

Signed-off-by: Daniel Lehman <dlehman@esri.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Daniel Lehman 2017-04-03 11:52:18 -07:00 committed by Alexandre Julliard
parent 724a09abb5
commit bda232de94
11 changed files with 32 additions and 9 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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)

View File

@ -1857,6 +1857,14 @@ INT CDECL MSVCRT_iswxdigit( MSVCRT_wchar_t wc )
return isxdigitW( 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.@)
*/

View File

@ -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)

View File

@ -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