Alex Henrie : include: Add wmemcmp to wchar.h.
Module: wine Branch: stable Commit: 9e0fda70363fba0c8f73dfca6ad3dca52368847f URL: https://source.winehq.org/git/wine.git/?a=commit;h=9e0fda70363fba0c8f73dfca6... Author: Alex Henrie <alexhenrie24(a)gmail.com> Date: Sun May 27 21:05:53 2018 -0600 include: Add wmemcmp to wchar.h. Signed-off-by: Alex Henrie <alexhenrie24(a)gmail.com> Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit 0d5648b46383319a0a3c18c0d96755d13eadf003) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- include/msvcrt/wchar.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/include/msvcrt/wchar.h b/include/msvcrt/wchar.h index 8f184e7..0bf684d 100644 --- a/include/msvcrt/wchar.h +++ b/include/msvcrt/wchar.h @@ -483,6 +483,17 @@ static inline wchar_t *wmemchr(const wchar_t *s, wchar_t c, size_t n) return NULL; } +static inline int wmemcmp(const wchar_t *s1, const wchar_t *s2, size_t n) +{ + size_t i; + for (i = 0; i < n; i++) + { + if (s1[i] > s2[i]) return 1; + if (s1[i] < s2[i]) return -1; + } + return 0; +} + #ifdef __cplusplus } #endif
participants (1)
-
Alexandre Julliard