Skip to content

Commit 080ac7b

Browse files
committed
[LIBCNTPR] Implement NT version of towupper
1 parent ba14c5f commit 080ac7b

File tree

3 files changed

+23
-0
lines changed

3 files changed

+23
-0
lines changed

sdk/lib/crt/string/ctype.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -895,6 +895,7 @@ wint_t __cdecl towlower(wint_t c)
895895
return(c);
896896
}
897897

898+
#ifndef _LIBCNT_
898899
/*
899900
* @implemented
900901
*/
@@ -904,5 +905,6 @@ wint_t __cdecl towupper(wint_t c)
904905
return (c + upalpha);
905906
return(c);
906907
}
908+
#endif /* _LIBCNT_ */
907909

908910
/* EOF */

sdk/lib/crt/string/string.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ list(APPEND CRT_STRING_ASM_SOURCE
112112

113113
list(APPEND LIBCNTPR_STRING_SOURCE
114114
string/mbstowcs_nt.c
115+
string/towupper_nt.c
115116
string/wcstombs_nt.c
116117
)
117118

sdk/lib/crt/string/towupper_nt.c

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
/*
2+
* PROJECT: ReactOS NT CRT library
3+
* LICENSE: MIT (https://spdx.org/licenses/MIT)
4+
* PURPOSE: Implementation of towupper
5+
* COPYRIGHT: Copyright 2025 Timo Kreuzer <[email protected]>
6+
*/
7+
8+
#define WIN32_NO_STATUS
9+
#include <windef.h>
10+
#include <ndk/rtlfuncs.h>
11+
12+
_Check_return_
13+
_CRTIMP
14+
wint_t
15+
__cdecl
16+
towupper(
17+
_In_ wint_t _C)
18+
{
19+
return RtlUpcaseUnicodeChar((WCHAR)_C);
20+
}

0 commit comments

Comments
 (0)