[LIBCNTPR] Implement NT version of iswctype

Passes all ntdll wine tests.
This commit is contained in:
Timo Kreuzer
2025-07-31 09:35:17 +03:00
parent 5cbb2c9a4c
commit 090129bb1d
2 changed files with 23 additions and 1 deletions

View File

@@ -0,0 +1,21 @@
/*
* PROJECT: ReactOS NT CRT library
* LICENSE: MIT (https://spdx.org/licenses/MIT)
* PURPOSE: Implementation of iswctype
* COPYRIGHT: Copyright 2025 Timo Kreuzer <timo.kreuzer@reactos.org>
*/
#include <ctype.h>
extern const unsigned short _wctype[];
_Check_return_
int
__cdecl
iswctype(wint_t _C, wctype_t _Type)
{
if (_C <= 0xFF)
return (_wctype[_C + 1] & _Type);
return 0;
}

View File

@@ -3,7 +3,6 @@ list(APPEND LIBCNTPR_STRING_SOURCE
string/_splitpath.c
string/_wsplitpath.c
string/ctype.c
string/iswctype.c
string/is_wctype.c
string/scanf.c
string/strcspn.c
@@ -91,6 +90,7 @@ list(APPEND CRT_STRING_SOURCE
string/_wcslwr_s.c
string/_wsplitpath_s.c
string/atof.c
string/iswctype.c
string/mbstowcs_s.c
string/strcoll.c
string/strdup.c
@@ -111,6 +111,7 @@ list(APPEND CRT_STRING_ASM_SOURCE
)
list(APPEND LIBCNTPR_STRING_SOURCE
string/iswctype_nt.c
string/mbstowcs_nt.c
string/tolower_nt.c
string/toupper_nt_mb.c