SHELL32: use lstrcmpiW in preference to strcasecmp

Mike McCormack mike at codeweavers.com
Sat Mar 5 06:23:41 CST 2005


ChangeLog:
* use lstrcmpiW in preference to strcasecmp
-------------- next part --------------
Index: dlls/shell32/dialogs.c
===================================================================
RCS file: /home/wine/wine/dlls/shell32/dialogs.c,v
retrieving revision 1.23
diff -u -p -r1.23 dialogs.c
--- dlls/shell32/dialogs.c	15 Feb 2005 21:51:07 -0000	1.23
+++ dlls/shell32/dialogs.c	5 Mar 2005 12:20:52 -0000
@@ -283,7 +283,7 @@ void FillList (HWND hCb, char *pszLatest
 
         if (NULL != pszLatest)
             {
-            if (!strcasecmp (pszCmd, pszLatest))
+            if (!lstrcmpiA(pszCmd, pszLatest))
                 {
                 /*
                 sprintf (szDbgMsg, "Found existing (%d).\n", Nix) ;
Index: dlls/shell32/folders.c
===================================================================
RCS file: /home/wine/wine/dlls/shell32/folders.c,v
retrieving revision 1.55
diff -u -p -r1.55 folders.c
--- dlls/shell32/folders.c	14 Jan 2005 16:02:20 -0000	1.55
+++ dlls/shell32/folders.c	5 Mar 2005 12:20:52 -0000
@@ -328,7 +328,7 @@ static HRESULT WINAPI IExtractIconW_fnGe
 
 	      found = TRUE;
 	    }
-	    else if (!strcasecmp(sTemp, "lnkfile"))
+	    else if (!lstrcmpiA(sTemp, "lnkfile"))
 	    {
 	      /* extract icon from shell shortcut */
 	      IShellFolder* dsf;
Index: dlls/shell32/shellpath.c
===================================================================
RCS file: /home/wine/wine/dlls/shell32/shellpath.c,v
retrieving revision 1.98
diff -u -p -r1.98 shellpath.c
--- dlls/shell32/shellpath.c	14 Feb 2005 11:07:55 -0000	1.98
+++ dlls/shell32/shellpath.c	5 Mar 2005 12:20:53 -0000
@@ -365,7 +365,7 @@ static BOOL PathIsExeA (LPCSTR lpszPath)
 	TRACE("path=%s\n",lpszPath);
 
 	for(i=0; lpszExtensions[i]; i++)
-	  if (!strcasecmp(lpszExtension,lpszExtensions[i])) return TRUE;
+	  if (!lstrcmpiA(lpszExtension,lpszExtensions[i])) return TRUE;
 
 	return FALSE;
 }
Index: dlls/shell32/shlfolder.c
===================================================================
RCS file: /home/wine/wine/dlls/shell32/shlfolder.c,v
retrieving revision 1.94
diff -u -p -r1.94 shlfolder.c
--- dlls/shell32/shlfolder.c	16 Dec 2004 14:42:31 -0000	1.94
+++ dlls/shell32/shlfolder.c	5 Mar 2005 12:20:53 -0000
@@ -422,7 +422,7 @@ HRESULT SHELL32_GetItemAttributes (IShel
 	if (SFGAO_LINK & *pdwAttributes) {
 	    char ext[MAX_PATH];
 
-	    if (!_ILGetExtension(pidl, ext, MAX_PATH) || strcasecmp(ext, "lnk"))
+	    if (!_ILGetExtension(pidl, ext, MAX_PATH) || lstrcmpiA(ext, "lnk"))
 		*pdwAttributes &= ~SFGAO_LINK;
 	}
     } else {
@@ -469,7 +469,7 @@ HRESULT SHELL32_CompareIDs (IShellFolder
     /* test for name of pidl */
     _ILSimpleGetText (pidl1, szTemp1, MAX_PATH);
     _ILSimpleGetText (pidl2, szTemp2, MAX_PATH);
-    nReturn = strcasecmp (szTemp1, szTemp2);
+    nReturn = lstrcmpiA (szTemp1, szTemp2);
     if (nReturn < 0)
         return MAKE_HRESULT( SEVERITY_SUCCESS, 0, (WORD)-1 );
     else if (nReturn > 0)
Index: dlls/shell32/shlview.c
===================================================================
RCS file: /home/wine/wine/dlls/shell32/shlview.c,v
retrieving revision 1.110
diff -u -p -r1.110 shlview.c
--- dlls/shell32/shlview.c	14 Feb 2005 11:06:48 -0000	1.110
+++ dlls/shell32/shlview.c	5 Mar 2005 12:20:53 -0000
@@ -454,7 +454,7 @@ static INT CALLBACK ShellView_ListViewCo
         {
             _ILGetFileAttributes(pItemIdList1, strName1, MAX_PATH);
             _ILGetFileAttributes(pItemIdList2, strName2, MAX_PATH);
-            nDiff = strcasecmp(strName1, strName2);
+            nDiff = lstrcmpiA(strName1, strName2);
         }
         /* Sort by FileName: Folder or Files can be sorted */
         else if(pSortInfo->nHeaderID == LISTVIEW_COLUMN_NAME || bIsBothFolder)
@@ -462,7 +462,7 @@ static INT CALLBACK ShellView_ListViewCo
             /* Sort by Text */
             _ILSimpleGetText(pItemIdList1, strName1, MAX_PATH);
             _ILSimpleGetText(pItemIdList2, strName2, MAX_PATH);
-            nDiff = strcasecmp(strName1, strName2);
+            nDiff = lstrcmpiA(strName1, strName2);
         }
         /* Sort by File Size, Only valid for Files */
         else if(pSortInfo->nHeaderID == LISTVIEW_COLUMN_SIZE)
@@ -475,7 +475,7 @@ static INT CALLBACK ShellView_ListViewCo
             /* Sort by Type */
             _ILGetFileType(pItemIdList1, strName1, MAX_PATH);
             _ILGetFileType(pItemIdList2, strName2, MAX_PATH);
-            nDiff = strcasecmp(strName1, strName2);
+            nDiff = lstrcmpiA(strName1, strName2);
         }
     }
     /*  If the Date, FileSize, FileType, Attrib was the same, sort by FileName */
@@ -484,7 +484,7 @@ static INT CALLBACK ShellView_ListViewCo
     {
         _ILSimpleGetText(pItemIdList1, strName1, MAX_PATH);
         _ILSimpleGetText(pItemIdList2, strName2, MAX_PATH);
-        nDiff = strcasecmp(strName1, strName2);
+        nDiff = lstrcmpiA(strName1, strName2);
     }
 
     if(!pSortInfo->bIsAscending)


More information about the wine-patches mailing list