mirror of
https://github.com/reactos/reactos.git
synced 2026-06-01 08:50:24 +08:00
[LIBCNTPR] Implement NT version of iswctype
Passes all ntdll wine tests.
This commit is contained in:
21
sdk/lib/crt/string/iswctype_nt.c
Normal file
21
sdk/lib/crt/string/iswctype_nt.c
Normal 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;
|
||||
}
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user