From f4a9f9cde33985a44c79e2b1ef37628cb426c3f4 Mon Sep 17 00:00:00 2001 From: Timo Kreuzer Date: Sun, 5 May 2024 16:15:30 +0300 Subject: [PATCH] [CRT][NTDLL][MSVCRT] Add _swprintf implementation --- dll/ntdll/def/ntdll.spec | 2 +- dll/win32/msvcrt/msvcrt.spec | 2 +- sdk/lib/crt/printf/_swprintf.c | 13 +++++++++++++ sdk/lib/crt/printf/printf.cmake | 1 + 4 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 sdk/lib/crt/printf/_swprintf.c diff --git a/dll/ntdll/def/ntdll.spec b/dll/ntdll/def/ntdll.spec index aa1cf0ca734..6a98679791b 100644 --- a/dll/ntdll/def/ntdll.spec +++ b/dll/ntdll/def/ntdll.spec @@ -1801,7 +1801,7 @@ @ cdecl _strlwr(str) @ cdecl _strnicmp(str str long) @ cdecl _strupr(str) -@ stub -version=0x600+ _swprintf +@ cdecl -version=0x600+ _swprintf(ptr str) @ cdecl -version=0x502 _tolower(long) @ cdecl -version=0x502 _toupper(long) @ cdecl _ui64toa(double ptr long) diff --git a/dll/win32/msvcrt/msvcrt.spec b/dll/win32/msvcrt/msvcrt.spec index ba28cc7c350..b6c10d0f308 100644 --- a/dll/win32/msvcrt/msvcrt.spec +++ b/dll/win32/msvcrt/msvcrt.spec @@ -1035,7 +1035,7 @@ @ cdecl -version=0x600+ _strupr_s_l(str long ptr) @ cdecl -version=0x600+ _strxfrm_l(ptr str long ptr) @ cdecl _swab(str str long) -@ stub -version=0x600+ _swprintf +@ cdecl -version=0x600+ _swprintf(ptr str) @ stub -version=0x600+ _swprintf_c @ stub -version=0x600+ _swprintf_c_l @ stub -version=0x600+ _swprintf_p_l diff --git a/sdk/lib/crt/printf/_swprintf.c b/sdk/lib/crt/printf/_swprintf.c new file mode 100644 index 00000000000..67e3588eb13 --- /dev/null +++ b/sdk/lib/crt/printf/_swprintf.c @@ -0,0 +1,13 @@ +/* + * COPYRIGHT: GNU GPL, see COPYING in the top level directory + * PROJECT: ReactOS crt library + * FILE: lib/sdk/crt/printf/_swprintf.c + * PURPOSE: Implementation of _swprintf + * PROGRAMMER: Timo Kreuzer + */ + +#define _sxprintf _swprintf +#define USE_COUNT 0 +#define _UNICODE + +#include "_sxprintf.c" diff --git a/sdk/lib/crt/printf/printf.cmake b/sdk/lib/crt/printf/printf.cmake index 7b68b88e360..c217160b5bb 100644 --- a/sdk/lib/crt/printf/printf.cmake +++ b/sdk/lib/crt/printf/printf.cmake @@ -2,6 +2,7 @@ list(APPEND LIBCNTPR_PRINTF_SOURCE printf/_snprintf.c printf/_snwprintf.c + printf/_swprintf.c printf/_vscprintf.c printf/_vscwprintf.c printf/_vsnprintf.c