Alex Henrie : include: Add wmemchr to wchar.h.
Alexandre Julliard
julliard at winehq.org
Mon May 28 16:07:31 CDT 2018
Module: wine
Branch: master
Commit: e1bfd4b4cb9c05039e29ae769d1582b63ed6fe46
URL: https://source.winehq.org/git/wine.git/?a=commit;h=e1bfd4b4cb9c05039e29ae769d1582b63ed6fe46
Author: Alex Henrie <alexhenrie24 at gmail.com>
Date: Sun May 27 21:05:52 2018 -0600
include: Add wmemchr to wchar.h.
Signed-off-by: Alex Henrie <alexhenrie24 at gmail.com>
Signed-off-by: Piotr Caban <piotr at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
include/msvcrt/wchar.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/include/msvcrt/wchar.h b/include/msvcrt/wchar.h
index a679724..4618c60 100644
--- a/include/msvcrt/wchar.h
+++ b/include/msvcrt/wchar.h
@@ -476,6 +476,14 @@ size_t __cdecl wcrtomb(char*,wchar_t,mbstate_t*);
size_t __cdecl wcsrtombs(char*,const wchar_t**,size_t,mbstate_t*);
int __cdecl wctob(wint_t);
+static inline wchar_t *wmemchr(const wchar_t *s, wchar_t c, size_t n)
+{
+ const wchar_t *end;
+ for (end = s + n; s < end; s++)
+ if (*s == c) return (wchar_t*)s;
+ return NULL;
+}
+
#ifdef __cplusplus
}
#endif
More information about the wine-cvs
mailing list