Zebediah Figura : ntdll: Implement wcsnlen().
Alexandre Julliard
julliard at winehq.org
Mon Jan 31 15:55:17 CST 2022
Module: wine
Branch: master
Commit: a524ab500434df3b9c4c5b10010b0f6fe571e859
URL: https://source.winehq.org/git/wine.git/?a=commit;h=a524ab500434df3b9c4c5b10010b0f6fe571e859
Author: Zebediah Figura <zfigura at codeweavers.com>
Date: Sat Jan 29 20:39:55 2022 -0600
ntdll: Implement wcsnlen().
Signed-off-by: Zebediah Figura <zfigura at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/ntdll/ntdll.spec | 1 +
dlls/ntdll/wcstring.c | 11 +++++++++++
2 files changed, 12 insertions(+)
diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec
index bd8e1f5efe6..afb945d4665 100644
--- a/dlls/ntdll/ntdll.spec
+++ b/dlls/ntdll/ntdll.spec
@@ -1609,6 +1609,7 @@
@ cdecl wcsncat(wstr wstr long)
@ cdecl wcsncmp(wstr wstr long)
@ cdecl wcsncpy(ptr wstr long)
+@ cdecl wcsnlen(ptr long)
@ cdecl wcspbrk(wstr wstr)
@ cdecl wcsrchr(wstr long)
@ cdecl wcsspn(wstr wstr)
diff --git a/dlls/ntdll/wcstring.c b/dlls/ntdll/wcstring.c
index a727e4defac..9422e4f676c 100644
--- a/dlls/ntdll/wcstring.c
+++ b/dlls/ntdll/wcstring.c
@@ -251,6 +251,17 @@ LPWSTR __cdecl wcsncpy( LPWSTR s1, LPCWSTR s2, size_t n )
}
+/*********************************************************************
+ * wcsnlen (NTDLL.@)
+ */
+size_t __cdecl wcsnlen( const WCHAR *str, size_t len )
+{
+ const WCHAR *s = str;
+ for (s = str; len && *s; s++, len--) ;
+ return s - str;
+}
+
+
/*********************************************************************
* wcspbrk (NTDLL.@)
*/
More information about the wine-cvs
mailing list