From 53332069783ec566a46e97e3d1a50723d604cec0 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Fri, 2 Apr 2004 19:40:31 +0000 Subject: [PATCH] Added memicmpW. --- include/wine/unicode.h | 1 + libs/unicode/string.c | 8 ++++++++ libs/unicode/wine_unicode.def | 1 + libs/unicode/wine_unicode.map | 1 + 4 files changed, 11 insertions(+) diff --git a/include/wine/unicode.h b/include/wine/unicode.h index d9a5f7a88c0..75525b6dc89 100644 --- a/include/wine/unicode.h +++ b/include/wine/unicode.h @@ -86,6 +86,7 @@ extern int wine_fold_string( int flags, const WCHAR *src, int srclen , WCHAR *ds extern int strcmpiW( const WCHAR *str1, const WCHAR *str2 ); extern int strncmpiW( const WCHAR *str1, const WCHAR *str2, int n ); +extern int memicmpW( const WCHAR *str1, const WCHAR *str2, int n ); extern WCHAR *strstrW( const WCHAR *str, const WCHAR *sub ); extern long int strtolW( const WCHAR *nptr, WCHAR **endptr, int base ); extern unsigned long int strtoulW( const WCHAR *nptr, WCHAR **endptr, int base ); diff --git a/libs/unicode/string.c b/libs/unicode/string.c index c42093c5f7a..9f94aa19280 100644 --- a/libs/unicode/string.c +++ b/libs/unicode/string.c @@ -42,6 +42,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/libs/unicode/wine_unicode.def b/libs/unicode/wine_unicode.def index c60334ddaf3..de74ec139eb 100644 --- a/libs/unicode/wine_unicode.def +++ b/libs/unicode/wine_unicode.def @@ -1,6 +1,7 @@ LIBRARY libwine_unicode.dll EXPORTS + memicmpW snprintfW sprintfW strcmpiW diff --git a/libs/unicode/wine_unicode.map b/libs/unicode/wine_unicode.map index 88e27981b7e..7a366b8e8c1 100644 --- a/libs/unicode/wine_unicode.map +++ b/libs/unicode/wine_unicode.map @@ -1,6 +1,7 @@ WINE_1.0 { global: + memicmpW; snprintfW; sprintfW; strcmpiW;