From 36e8261e773b901be346098b6fdebd0c3e2c643f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20van=20Geldorp?= Date: Fri, 16 Apr 2004 08:58:34 +0000 Subject: [PATCH] Sync to Wine-20040408: Alexandre Julliard: - Added memicmpW. svn path=/trunk/; revision=9158 --- reactos/lib/unicode/string.c | 9 +++++++++ reactos/lib/unicode/wine_unicode.def | 3 ++- reactos/lib/unicode/winehq2ros.patch | 11 ++++++----- 3 files changed, 17 insertions(+), 6 deletions(-) diff --git a/reactos/lib/unicode/string.c b/reactos/lib/unicode/string.c index b84b87316ee..6ec04ebf93f 100644 --- a/reactos/lib/unicode/string.c +++ b/reactos/lib/unicode/string.c @@ -36,6 +36,7 @@ #undef strcmpiW #undef strncmpiW #undef sprintfW +#undef snprintfW int strcmpiW( const WCHAR *str1, const WCHAR *str2 ) { @@ -56,6 +57,14 @@ int strncmpiW( const WCHAR *str1, const WCHAR *str2, int n ) return ret; } +int memicmpW( const WCHAR *str1, const WCHAR *str2, int n ) +{ + int ret = 0; + for ( ; n > 0; n--, str1++, str2++) + if ((ret = tolowerW(*str1) - tolowerW(*str2))) break; + return ret; +} + WCHAR *strstrW( const WCHAR *str, const WCHAR *sub ) { while (*str) diff --git a/reactos/lib/unicode/wine_unicode.def b/reactos/lib/unicode/wine_unicode.def index f1594d1aab2..de74ec139eb 100644 --- a/reactos/lib/unicode/wine_unicode.def +++ b/reactos/lib/unicode/wine_unicode.def @@ -1,7 +1,8 @@ LIBRARY libwine_unicode.dll EXPORTS - snprintfW=_snwprintf + memicmpW + snprintfW sprintfW strcmpiW strncmpiW diff --git a/reactos/lib/unicode/winehq2ros.patch b/reactos/lib/unicode/winehq2ros.patch index afca461e205..aa80b646de5 100644 --- a/reactos/lib/unicode/winehq2ros.patch +++ b/reactos/lib/unicode/winehq2ros.patch @@ -1,11 +1,11 @@ Index: string.c =================================================================== RCS file: /home/wine/wine/libs/unicode/string.c,v -retrieving revision 1.4 -diff -u -r1.4 string.c ---- string.c 22 Nov 2003 00:00:53 -0000 1.4 -+++ string.c 2 Jan 2004 19:09:14 -0000 -@@ -23,6 +23,20 @@ +retrieving revision 1.5 +diff -u -r1.5 string.c +--- string.c 2 Apr 2004 19:40:31 -0000 1.5 ++++ string.c 16 Apr 2004 09:07:08 -0000 +@@ -23,6 +23,21 @@ #include "wine/unicode.h" @@ -22,6 +22,7 @@ diff -u -r1.4 string.c +#undef strcmpiW +#undef strncmpiW +#undef sprintfW ++#undef snprintfW + int strcmpiW( const WCHAR *str1, const WCHAR *str2 ) {