Module: wine Branch: master Commit: 0d5648b46383319a0a3c18c0d96755d13eadf003 URL: https://source.winehq.org/git/wine.git/?a=commit;h=0d5648b46383319a0a3c18c0d...
Author: Alex Henrie alexhenrie24@gmail.com Date: Sun May 27 21:05:53 2018 -0600
include: Add wmemcmp to wchar.h.
Signed-off-by: Alex Henrie alexhenrie24@gmail.com Signed-off-by: Piotr Caban piotr@codeweavers.com Signed-off-by: Alexandre Julliard julliard@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 4618c60..984bd31 100644 --- a/include/msvcrt/wchar.h +++ b/include/msvcrt/wchar.h @@ -484,6 +484,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