Alex Henrie : include: Add wmemcmp to wchar.h.

Alexandre Julliard julliard at winehq.org
Thu Sep 13 03:49:14 CDT 2018


Module: wine
Branch: stable
Commit: 9e0fda70363fba0c8f73dfca6ad3dca52368847f
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=9e0fda70363fba0c8f73dfca6ad3dca52368847f

Author: Alex Henrie <alexhenrie24 at gmail.com>
Date:   Sun May 27 21:05:53 2018 -0600

include: Add wmemcmp 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>
(cherry picked from commit 0d5648b46383319a0a3c18c0d96755d13eadf003)
Signed-off-by: Michael Stefaniuc <mstefani at 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




More information about the wine-cvs mailing list