wine/dlls/comctl32 string.c
Alexandre Julliard
julliard at wine.codeweavers.com
Thu Nov 3 13:31:59 CST 2005
ChangeSet ID: 21095
CVSROOT: /opt/cvs-commit
Module name: wine
Changes by: julliard at winehq.org 2005/11/03 13:31:59
Modified files:
dlls/comctl32 : string.c
Log message:
Dmitry Timoshkov <dmitry at codeweavers.com>
Use Win32 APIs for string comparison.
Patch: http://cvs.winehq.org/patch.py?id=21095
Old revision New revision Changes Path
1.7 1.8 +13 -8 wine/dlls/comctl32/string.c
Index: wine/dlls/comctl32/string.c
diff -u -p wine/dlls/comctl32/string.c:1.7 wine/dlls/comctl32/string.c:1.8
--- wine/dlls/comctl32/string.c:1.7 3 Nov 2005 19:31:59 -0000
+++ wine/dlls/comctl32/string.c 3 Nov 2005 19:31:59 -0000
@@ -40,6 +40,11 @@
WINE_DEFAULT_DEBUG_CHANNEL(commctrl);
+INT WINAPI StrCmpNA(LPCSTR, LPCSTR, INT);
+INT WINAPI StrCmpNW(LPCWSTR, LPCWSTR, INT);
+INT WINAPI StrCmpNIA(LPCSTR, LPCSTR, INT);
+INT WINAPI StrCmpNIW(LPCWSTR, LPCWSTR, INT);
+
/*************************************************************************
* COMCTL32_ChrCmpHelperA
*
@@ -180,7 +185,7 @@ LPSTR WINAPI StrChrA(LPCSTR lpszStr, WOR
* Internal implementation of StrStrA/StrStrIA
*/
static LPSTR COMCTL32_StrStrHelperA(LPCSTR lpszStr, LPCSTR lpszSearch,
- int (*pStrCmpFn)(LPCSTR,LPCSTR,size_t))
+ INT (WINAPI *pStrCmpFn)(LPCSTR,LPCSTR,INT))
{
size_t iLen;
@@ -204,7 +209,7 @@ static LPSTR COMCTL32_StrStrHelperA(LPCS
* Internal implementation of StrStrW/StrStrIW
*/
static LPWSTR COMCTL32_StrStrHelperW(LPCWSTR lpszStr, LPCWSTR lpszSearch,
- int (*pStrCmpFn)(LPCWSTR,LPCWSTR,int))
+ INT (WINAPI *pStrCmpFn)(LPCWSTR,LPCWSTR,INT))
{
int iLen;
@@ -238,7 +243,7 @@ LPSTR WINAPI StrStrIA(LPCSTR lpszStr, LP
{
TRACE("(%s,%s)\n", debugstr_a(lpszStr), debugstr_a(lpszSearch));
- return COMCTL32_StrStrHelperA(lpszStr, lpszSearch, strncasecmp);
+ return COMCTL32_StrStrHelperA(lpszStr, lpszSearch, StrCmpNIA);
}
/**************************************************************************
@@ -267,7 +272,7 @@ LPWSTR WINAPI StrStrIW(LPCWSTR lpszStr,
{
TRACE("(%s,%s)\n", debugstr_w(lpszStr), debugstr_w(lpszSearch));
- return COMCTL32_StrStrHelperW(lpszStr, lpszSearch, strncmpiW);
+ return COMCTL32_StrStrHelperW(lpszStr, lpszSearch, StrCmpNIW);
}
/**************************************************************************
@@ -381,7 +386,7 @@ INT WINAPI StrCmpNA(LPCSTR lpszStr, LPCS
* An integer less than, equal to or greater than 0, indicating that
* lpszStr is less than, the same, or greater than lpszComp.
*/
-int WINAPI StrCmpNIA(LPCSTR lpszStr, LPCSTR lpszComp, int iLen)
+INT WINAPI StrCmpNIA(LPCSTR lpszStr, LPCSTR lpszComp, INT iLen)
{
INT iRet;
@@ -396,7 +401,7 @@ int WINAPI StrCmpNIA(LPCSTR lpszStr, LPC
*
* See StrCmpNIA.
*/
-INT WINAPI StrCmpNIW(LPCWSTR lpszStr, LPCWSTR lpszComp, int iLen)
+INT WINAPI StrCmpNIW(LPCWSTR lpszStr, LPCWSTR lpszComp, INT iLen)
{
INT iRet;
@@ -504,7 +509,7 @@ LPSTR WINAPI StrStrA(LPCSTR lpszStr, LPC
{
TRACE("(%s,%s)\n", debugstr_a(lpszStr), debugstr_a(lpszSearch));
- return COMCTL32_StrStrHelperA(lpszStr, lpszSearch, strncmp);
+ return COMCTL32_StrStrHelperA(lpszStr, lpszSearch, StrCmpNA);
}
/**************************************************************************
@@ -516,7 +521,7 @@ LPWSTR WINAPI StrStrW(LPCWSTR lpszStr, L
{
TRACE("(%s,%s)\n", debugstr_w(lpszStr), debugstr_w(lpszSearch));
- return COMCTL32_StrStrHelperW(lpszStr, lpszSearch, strncmpW);
+ return COMCTL32_StrStrHelperW(lpszStr, lpszSearch, StrCmpNW);
}
/*************************************************************************
More information about the wine-cvs
mailing list