Removed trailing whitespace.

diff --git a/dlls/advapi32/eventlog.c b/dlls/advapi32/eventlog.c
index 0bd3877..25952b9 100644
--- a/dlls/advapi32/eventlog.c
+++ b/dlls/advapi32/eventlog.c
@@ -160,7 +160,7 @@
 /******************************************************************************
  * OpenEventLogA [ADVAPI32.@]
  */
-HANDLE WINAPI OpenEventLogA(LPCSTR uncname,LPCSTR source) 
+HANDLE WINAPI OpenEventLogA(LPCSTR uncname,LPCSTR source)
 {
 	FIXME("(%s,%s),stub!\n",uncname,source);
 	return 0xcafe4242;
@@ -204,7 +204,7 @@
  */
 BOOL WINAPI
 ReadEventLogW( HANDLE hEventLog, DWORD dwReadFlags, DWORD dwRecordOffset,
-                 LPVOID lpBuffer, DWORD nNumberOfBytesToRead, 
+                 LPVOID lpBuffer, DWORD nNumberOfBytesToRead,
                  DWORD *pnBytesRead, DWORD *pnMinNumberOfBytesNeeded )
 {
 	FIXME("stub\n");
@@ -269,8 +269,8 @@
  *   lpRawData   []
  */
 BOOL WINAPI
-ReportEventW( HANDLE hEventLog, WORD wType, WORD wCategory, 
-                DWORD dwEventID, PSID lpUserSid, WORD wNumStrings, 
+ReportEventW( HANDLE hEventLog, WORD wType, WORD wCategory,
+                DWORD dwEventID, PSID lpUserSid, WORD wNumStrings,
                 DWORD dwDataSize, LPCWSTR *lpStrings, LPVOID lpRawData )
 {
 	FIXME("stub\n");
diff --git a/dlls/advapi32/registry.c b/dlls/advapi32/registry.c
index 8e8ac01..9b73691 100644
--- a/dlls/advapi32/registry.c
+++ b/dlls/advapi32/registry.c
@@ -76,7 +76,7 @@
  * FIXME MAXIMUM_ALLOWED in access mask not supported by server
  */
 DWORD WINAPI RegCreateKeyExW( HKEY hkey, LPCWSTR name, DWORD reserved, LPWSTR class,
-                              DWORD options, REGSAM access, SECURITY_ATTRIBUTES *sa, 
+                              DWORD options, REGSAM access, SECURITY_ATTRIBUTES *sa,
                               LPHKEY retkey, LPDWORD dispos )
 {
     OBJECT_ATTRIBUTES attr;
@@ -105,7 +105,7 @@
  * FIXME MAXIMUM_ALLOWED in access mask not supported by server
  */
 DWORD WINAPI RegCreateKeyExA( HKEY hkey, LPCSTR name, DWORD reserved, LPSTR class,
-                              DWORD options, REGSAM access, SECURITY_ATTRIBUTES *sa, 
+                              DWORD options, REGSAM access, SECURITY_ATTRIBUTES *sa,
                               LPHKEY retkey, LPDWORD dispos )
 {
     OBJECT_ATTRIBUTES attr;
@@ -442,9 +442,9 @@
  *    security   [O] Buffer for security descriptor length
  *    modif      [O] Modification time
  *
- * - win95 allows class to be valid and class_len to be NULL 
+ * - win95 allows class to be valid and class_len to be NULL
  * - winnt returns ERROR_INVALID_PARAMETER if class is valid and class_len is NULL
- * - both allow class to be NULL and class_len to be NULL 
+ * - both allow class to be NULL and class_len to be NULL
  * (it's hard to test validity, so test !NULL instead)
  */
 DWORD WINAPI RegQueryInfoKeyW( HKEY hkey, LPWSTR class, LPDWORD class_len, LPDWORD reserved,
@@ -652,7 +652,7 @@
  *    Failure: Error code
  *
  * NOTES
- *   win95 does not care about count for REG_SZ and finds out the len by itself (js) 
+ *   win95 does not care about count for REG_SZ and finds out the len by itself (js)
  *   NT does definitely care (aj)
  */
 DWORD WINAPI RegSetValueExW( HKEY hkey, LPCWSTR name, DWORD reserved,
@@ -780,7 +780,7 @@
  *                        not required.
  *    count     [I/O] Address of data buffer size
  *
- * RETURNS 
+ * RETURNS
  *    ERROR_SUCCESS:   Success
  *    ERROR_MORE_DATA: !!! if the specified buffer is not big enough to hold the data
  * 		       buffer is left untouched. The MS-documentation is wrong (js) !!!
@@ -850,7 +850,7 @@
  *           RegQueryValueExA   [ADVAPI32.@]
  *
  * NOTES:
- * the documentation is wrong: if the buffer is too small it remains untouched 
+ * the documentation is wrong: if the buffer is too small it remains untouched
  */
 DWORD WINAPI RegQueryValueExA( HKEY hkey, LPCSTR name, LPDWORD reserved, LPDWORD type,
                                LPBYTE data, LPDWORD count )
@@ -1441,7 +1441,7 @@
 LONG WINAPI RegReplaceKeyW( HKEY hkey, LPCWSTR lpSubKey, LPCWSTR lpNewFile,
                               LPCWSTR lpOldFile )
 {
-    FIXME("(%x,%s,%s,%s): stub\n", hkey, debugstr_w(lpSubKey), 
+    FIXME("(%x,%s,%s,%s): stub\n", hkey, debugstr_w(lpSubKey),
           debugstr_w(lpNewFile),debugstr_w(lpOldFile));
     return ERROR_SUCCESS;
 }
@@ -1560,7 +1560,7 @@
  *    hHey          [I] Predefined registry handle
  *    phkResult     [I] Address of buffer for remote registry handle
  */
-LONG WINAPI RegConnectRegistryW( LPCWSTR lpMachineName, HKEY hKey, 
+LONG WINAPI RegConnectRegistryW( LPCWSTR lpMachineName, HKEY hKey,
                                    LPHKEY phkResult )
 {
     TRACE("(%s,%x,%p): stub\n",debugstr_w(lpMachineName),hKey,phkResult);
@@ -1597,7 +1597,7 @@
  *    hEvent          [I] Handle of signaled event
  *    fAsync          [I] Flag for asynchronous reporting
  */
-LONG WINAPI RegNotifyChangeKeyValue( HKEY hkey, BOOL fWatchSubTree, 
+LONG WINAPI RegNotifyChangeKeyValue( HKEY hkey, BOOL fWatchSubTree,
                                      DWORD fdwNotifyFilter, HANDLE hEvent,
                                      BOOL fAsync )
 {
diff --git a/dlls/advapi32/security.c b/dlls/advapi32/security.c
index add4879..53e0a5d 100644
--- a/dlls/advapi32/security.c
+++ b/dlls/advapi32/security.c
@@ -65,7 +65,7 @@
  * RETURNS STD
  */
 BOOL WINAPI
-OpenProcessToken( HANDLE ProcessHandle, DWORD DesiredAccess, 
+OpenProcessToken( HANDLE ProcessHandle, DWORD DesiredAccess,
                   HANDLE *TokenHandle )
 {
 	CallWin32ToNt(NtOpenProcessToken( ProcessHandle, DesiredAccess, TokenHandle ));
@@ -81,7 +81,7 @@
  *   thandle       []
  */
 BOOL WINAPI
-OpenThreadToken( HANDLE ThreadHandle, DWORD DesiredAccess, 
+OpenThreadToken( HANDLE ThreadHandle, DWORD DesiredAccess,
 		 BOOL OpenAsSelf, HANDLE *TokenHandle)
 {
 	CallWin32ToNt (NtOpenThreadToken(ThreadHandle, DesiredAccess, OpenAsSelf, TokenHandle));
@@ -192,7 +192,7 @@
                           PSID *pSid )
 {
 	CallWin32ToNt (RtlAllocateAndInitializeSid(
-		pIdentifierAuthority, nSubAuthorityCount, 
+		pIdentifierAuthority, nSubAuthorityCount,
 		nSubAuthority0, nSubAuthority1,	nSubAuthority2, nSubAuthority3,
 		nSubAuthority4, nSubAuthority5, nSubAuthority6, nSubAuthority7,
 		pSid ));
@@ -207,7 +207,7 @@
 PVOID WINAPI
 FreeSid( PSID pSid )
 {
-    	RtlFreeSid(pSid); 
+    	RtlFreeSid(pSid);
 	return NULL; /* is documented like this */
 }
 
@@ -253,7 +253,7 @@
 /******************************************************************************
  * EqualPrefixSid [ADVAPI32.@]
  */
-BOOL WINAPI EqualPrefixSid (PSID pSid1, PSID pSid2) 
+BOOL WINAPI EqualPrefixSid (PSID pSid1, PSID pSid2)
 {
 	return RtlEqualPrefixSid(pSid1, pSid2);
 }
@@ -338,7 +338,7 @@
 	######	SECURITY DESCRIPTOR FUNCTIONS	######
 	##############################################
 */
-	
+
 /******************************************************************************
  * InitializeSecurityDescriptor [ADVAPI32.@]
  *
@@ -379,7 +379,7 @@
  *
  * PARAMS
  */
-BOOL WINAPI SetSecurityDescriptorOwner( PSECURITY_DESCRIPTOR pSecurityDescriptor, 
+BOOL WINAPI SetSecurityDescriptorOwner( PSECURITY_DESCRIPTOR pSecurityDescriptor,
 				   PSID pOwner, BOOL bOwnerDefaulted)
 {
 	CallWin32ToNt (RtlSetOwnerSecurityDescriptor(pSecurityDescriptor, pOwner, bOwnerDefaulted));
@@ -393,7 +393,7 @@
 	LPBOOL GroupDefaulted)
 {
 	CallWin32ToNt (RtlGetGroupSecurityDescriptor(SecurityDescriptor, Group, (PBOOLEAN)GroupDefaulted));
-}	
+}
 /******************************************************************************
  * SetSecurityDescriptorGroup [ADVAPI32.@]
  */
@@ -426,12 +426,12 @@
 {
 	CallWin32ToNt (RtlGetDaclSecurityDescriptor(pSecurityDescriptor, (PBOOLEAN)lpbDaclPresent,
 					       pDacl, (PBOOLEAN)lpbDaclDefaulted));
-}	
+}
 
 /******************************************************************************
  *  SetSecurityDescriptorDacl			[ADVAPI32.@]
  */
-BOOL WINAPI 
+BOOL WINAPI
 SetSecurityDescriptorDacl (
 	PSECURITY_DESCRIPTOR lpsd,
 	BOOL daclpresent,
@@ -451,7 +451,7 @@
 {
 	CallWin32ToNt (RtlGetSaclSecurityDescriptor(lpsd,
 	   (PBOOLEAN)lpbSaclPresent, pSacl, (PBOOLEAN)lpbSaclDefaulted));
-}	
+}
 
 /**************************************************************************
  * SetSecurityDescriptorSacl			[ADVAPI32.@]
@@ -489,7 +489,7 @@
 		 PSECURITY_DESCRIPTOR_CONTROL pControl, LPDWORD lpdwRevision)
 {
 	CallWin32ToNt (RtlGetControlSecurityDescriptor(pSecurityDescriptor,pControl,lpdwRevision));
-}		
+}
 
 /*	##############################
 	######	ACL FUNCTIONS	######
@@ -526,7 +526,7 @@
 BOOL WINAPI
 LookupPrivilegeValueW( LPCWSTR lpSystemName, LPCWSTR lpName, LPVOID lpLuid )
 {
-    FIXME("(%s,%s,%p): stub\n",debugstr_w(lpSystemName), 
+    FIXME("(%s,%s,%p): stub\n",debugstr_w(lpSystemName),
         debugstr_w(lpName), lpLuid);
     return TRUE;
 }
@@ -555,7 +555,7 @@
  * privileges
  */
 BOOL WINAPI
-GetFileSecurityA( LPCSTR lpFileName, 
+GetFileSecurityA( LPCSTR lpFileName,
                     SECURITY_INFORMATION RequestedInformation,
                     PSECURITY_DESCRIPTOR pSecurityDescriptor,
                     DWORD nLength, LPDWORD lpnLengthNeeded )
@@ -579,12 +579,12 @@
  *   lpnLengthNeeded      []
  */
 BOOL WINAPI
-GetFileSecurityW( LPCWSTR lpFileName, 
+GetFileSecurityW( LPCWSTR lpFileName,
                     SECURITY_INFORMATION RequestedInformation,
                     PSECURITY_DESCRIPTOR pSecurityDescriptor,
                     DWORD nLength, LPDWORD lpnLengthNeeded )
 {
-  FIXME("(%s) : stub\n", debugstr_w(lpFileName) ); 
+  FIXME("(%s) : stub\n", debugstr_w(lpFileName) );
   return TRUE;
 }
 
@@ -686,11 +686,11 @@
  *   pSecurityDescriptor  []
  */
 BOOL WINAPI
-SetFileSecurityW( LPCWSTR lpFileName, 
+SetFileSecurityW( LPCWSTR lpFileName,
                     SECURITY_INFORMATION RequestedInformation,
                     PSECURITY_DESCRIPTOR pSecurityDescriptor )
 {
-  FIXME("(%s) : stub\n", debugstr_w(lpFileName) ); 
+  FIXME("(%s) : stub\n", debugstr_w(lpFileName) );
   return TRUE;
 }
 
@@ -752,7 +752,7 @@
  * LsaQueryInformationPolicy [ADVAPI32.@]
  */
 NTSTATUS WINAPI
-LsaQueryInformationPolicy( 
+LsaQueryInformationPolicy(
 	IN LSA_HANDLE PolicyHandle,
         IN POLICY_INFORMATION_CLASS InformationClass,
 	OUT PVOID *Buffer)
@@ -778,7 +778,7 @@
 		SID sid;
 	      };
 	      SID_IDENTIFIER_AUTHORITY localSidAuthority = {SECURITY_NT_AUTHORITY};
-		
+
 	      struct di * xdi = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(xdi));
 	      RtlInitUnicodeString(&(xdi->ppdi.Name), HEAP_strdupAtoW(GetProcessHeap(),0,"DOMAIN"));
 	      xdi->ppdi.Sid = &(xdi->sid);
@@ -789,8 +789,8 @@
 	      *Buffer = xdi;
 	    }
 	    break;
-	  case 	PolicyAuditLogInformation:	
-	  case 	PolicyPdAccountInformation:	
+	  case 	PolicyAuditLogInformation:
+	  case 	PolicyPdAccountInformation:
 	  case 	PolicyLsaServerRoleInformation:
 	  case 	PolicyReplicaSourceInformation:
 	  case 	PolicyDefaultQuotaInformation:
@@ -803,8 +803,8 @@
 	      return FALSE;
 	    }
 	}
-	return TRUE; 
-}			  
+	return TRUE;
+}
 
 /******************************************************************************
  * LsaLookupSids [ADVAPI32.@]
@@ -816,13 +816,13 @@
 	LONG DomainIndex;
 } LSA_TRANSLATED_NAME, *PLSA_TRANSLATED_NAME;
 
-typedef struct 
+typedef struct
 {
 	LSA_UNICODE_STRING Name;
 	PSID Sid;
 } LSA_TRUST_INFORMATION, *PLSA_TRUST_INFORMATION;
 
-typedef struct 
+typedef struct
 {
 	ULONG Entries;
 	PLSA_TRUST_INFORMATION Domains;
@@ -977,7 +977,7 @@
 BOOL WINAPI PrivilegeCheck( HANDLE ClientToken, PPRIVILEGE_SET RequiredPrivileges, LPBOOL pfResult)
 {
 	FIXME("stub %d %p %p\n", ClientToken, RequiredPrivileges, pfResult);
-	if (pfResult) 
+	if (pfResult)
 		*pfResult=TRUE;
         return TRUE;
 }
diff --git a/dlls/advapi32/service.c b/dlls/advapi32/service.c
index 55acfd2..23f4d82 100644
--- a/dlls/advapi32/service.c
+++ b/dlls/advapi32/service.c
@@ -42,7 +42,7 @@
                      DWORD dwServiceState, LPENUM_SERVICE_STATUSA lpServices,
                      DWORD cbBufSize, LPDWORD pcbBytesNeeded,
                      LPDWORD lpServicesReturned, LPDWORD lpResumeHandle )
-{	FIXME("%x type=%lx state=%lx %p %lx %p %p %p\n", hSCManager, 
+{	FIXME("%x type=%lx state=%lx %p %lx %p %p %p\n", hSCManager,
 		dwServiceType, dwServiceState, lpServices, cbBufSize,
 		pcbBytesNeeded, lpServicesReturned,  lpResumeHandle);
 	SetLastError (ERROR_ACCESS_DENIED);
@@ -57,7 +57,7 @@
                      DWORD dwServiceState, LPENUM_SERVICE_STATUSW lpServices,
                      DWORD cbBufSize, LPDWORD pcbBytesNeeded,
                      LPDWORD lpServicesReturned, LPDWORD lpResumeHandle )
-{	FIXME("%x type=%lx state=%lx %p %lx %p %p %p\n", hSCManager, 
+{	FIXME("%x type=%lx state=%lx %p %lx %p %p %p\n", hSCManager,
 		dwServiceType, dwServiceState, lpServices, cbBufSize,
 		pcbBytesNeeded, lpServicesReturned,  lpResumeHandle);
 	SetLastError (ERROR_ACCESS_DENIED);
@@ -69,14 +69,14 @@
  */
 BOOL WINAPI
 StartServiceCtrlDispatcherA( LPSERVICE_TABLE_ENTRYA servent )
-{	
+{
     LPSERVICE_MAIN_FUNCTIONA fpMain;
     HANDLE wait;
     DWORD  dwNumServiceArgs ;
     LPWSTR *lpArgVecW;
     LPSTR  *lpArgVecA;
     int i;
-	
+
     TRACE("(%p)\n", servent);
     wait = OpenSemaphoreA(SEMAPHORE_ALL_ACCESS, FALSE, "ADVAPI32_ServiceStartData");
     if(wait == 0)
@@ -93,7 +93,7 @@
 
     /* Convert the Unicode arg vectors back to ASCII */
     if(dwNumServiceArgs)
-        lpArgVecA = (LPSTR*) HeapAlloc( GetProcessHeap(), 0, 
+        lpArgVecA = (LPSTR*) HeapAlloc( GetProcessHeap(), 0,
                                    dwNumServiceArgs*sizeof(LPSTR) );
     else
         lpArgVecA = NULL;
@@ -102,7 +102,7 @@
         lpArgVecA[i]=HEAP_strdupWtoA(GetProcessHeap(), 0, lpArgVecW[i]);
 
     /* FIXME: should we blindly start all services? */
-    while (servent->lpServiceName) { 
+    while (servent->lpServiceName) {
         TRACE("%s at %p)\n", debugstr_a(servent->lpServiceName),servent);
         fpMain = servent->lpServiceProc;
 
@@ -131,12 +131,12 @@
  */
 BOOL WINAPI
 StartServiceCtrlDispatcherW( LPSERVICE_TABLE_ENTRYW servent )
-{	
+{
     LPSERVICE_MAIN_FUNCTIONW fpMain;
     HANDLE wait;
     DWORD  dwNumServiceArgs ;
     LPWSTR *lpServiceArgVectors ;
-	
+
     TRACE("(%p)\n", servent);
     wait = OpenSemaphoreA(SEMAPHORE_ALL_ACCESS, FALSE, "ADVAPI32_ServiceStartData");
     if(wait == 0)
@@ -152,7 +152,7 @@
     ReleaseSemaphore(wait, 1, NULL);
 
     /* FIXME: should we blindly start all services? */
-    while (servent->lpServiceName) { 
+    while (servent->lpServiceName) {
         TRACE("%s at %p)\n", debugstr_w(servent->lpServiceName),servent);
         fpMain = servent->lpServiceProc;
 
@@ -172,7 +172,7 @@
 RegisterServiceCtrlHandlerA( LPCSTR lpServiceName,
                              LPHANDLER_FUNCTION lpfHandler )
 {	FIXME("%s %p\n", lpServiceName, lpfHandler);
-	return 0xcacacafe;	
+	return 0xcacacafe;
 }
 
 /******************************************************************************
@@ -183,10 +183,10 @@
  *   lpfHandler    []
  */
 SERVICE_STATUS_HANDLE WINAPI
-RegisterServiceCtrlHandlerW( LPCWSTR lpServiceName, 
+RegisterServiceCtrlHandlerW( LPCWSTR lpServiceName,
                              LPHANDLER_FUNCTION lpfHandler )
 {	FIXME("%s %p\n", debugstr_w(lpServiceName), lpfHandler);
-	return 0xcacacafe;	
+	return 0xcacacafe;
 }
 
 /******************************************************************************
@@ -215,7 +215,7 @@
 SC_HANDLE WINAPI
 OpenSCManagerA( LPCSTR lpMachineName, LPCSTR lpDatabaseName,
                   DWORD dwDesiredAccess )
-{   
+{
     LPWSTR lpMachineNameW = HEAP_strdupAtoW(GetProcessHeap(),0,lpMachineName);
     LPWSTR lpDatabaseNameW = HEAP_strdupAtoW(GetProcessHeap(),0,lpDatabaseName);
     SC_HANDLE ret = OpenSCManagerW(lpMachineNameW,lpDatabaseNameW,
@@ -248,7 +248,7 @@
     HKEY hKey;
     LONG r;
 
-    TRACE("(%s,%s,0x%08lx)\n", debugstr_w(lpMachineName), 
+    TRACE("(%s,%s,0x%08lx)\n", debugstr_w(lpMachineName),
           debugstr_w(lpDatabaseName), dwDesiredAccess);
 
     /*
@@ -294,7 +294,7 @@
  * RETURNS STD
  */
 BOOL WINAPI
-ControlService( SC_HANDLE hService, DWORD dwControl, 
+ControlService( SC_HANDLE hService, DWORD dwControl,
                 LPSERVICE_STATUS lpServiceStatus )
 {
     FIXME("(%d,%ld,%p): stub\n",hService,dwControl,lpServiceStatus);
@@ -317,7 +317,7 @@
     TRACE("(%x)\n", hSCObject);
 
     RegCloseKey(hSCObject);
-    
+
     return TRUE;
 }
 
@@ -326,7 +326,7 @@
  * OpenServiceA [ADVAPI32.@]
  */
 SC_HANDLE WINAPI
-OpenServiceA( SC_HANDLE hSCManager, LPCSTR lpServiceName, 
+OpenServiceA( SC_HANDLE hSCManager, LPCSTR lpServiceName,
                 DWORD dwDesiredAccess )
 {
     LPWSTR lpServiceNameW = HEAP_strdupAtoW(GetProcessHeap(),0,lpServiceName);
@@ -387,11 +387,11 @@
  */
 SC_HANDLE WINAPI
 CreateServiceW( SC_HANDLE hSCManager, LPCWSTR lpServiceName,
-                  LPCWSTR lpDisplayName, DWORD dwDesiredAccess, 
-                  DWORD dwServiceType, DWORD dwStartType, 
+                  LPCWSTR lpDisplayName, DWORD dwDesiredAccess,
+                  DWORD dwServiceType, DWORD dwStartType,
                   DWORD dwErrorControl, LPCWSTR lpBinaryPathName,
-                  LPCWSTR lpLoadOrderGroup, LPDWORD lpdwTagId, 
-                  LPCWSTR lpDependencies, LPCWSTR lpServiceStartName, 
+                  LPCWSTR lpLoadOrderGroup, LPDWORD lpdwTagId,
+                  LPCWSTR lpDependencies, LPCWSTR lpServiceStartName,
                   LPCWSTR lpPassword )
 {
     FIXME("(%u,%s,%s,...)\n", hSCManager, debugstr_w(lpServiceName), debugstr_w(lpDisplayName));
@@ -404,11 +404,11 @@
  */
 SC_HANDLE WINAPI
 CreateServiceA( SC_HANDLE hSCManager, LPCSTR lpServiceName,
-                  LPCSTR lpDisplayName, DWORD dwDesiredAccess, 
-                  DWORD dwServiceType, DWORD dwStartType, 
+                  LPCSTR lpDisplayName, DWORD dwDesiredAccess,
+                  DWORD dwServiceType, DWORD dwStartType,
                   DWORD dwErrorControl, LPCSTR lpBinaryPathName,
-                  LPCSTR lpLoadOrderGroup, LPDWORD lpdwTagId, 
-                  LPCSTR lpDependencies, LPCSTR lpServiceStartName, 
+                  LPCSTR lpLoadOrderGroup, LPDWORD lpdwTagId,
+                  LPCSTR lpDependencies, LPCSTR lpServiceStartName,
                   LPCSTR lpPassword )
 {
     HKEY hKey;
@@ -417,7 +417,7 @@
 
     TRACE("(%u,%s,%s,...)\n", hSCManager, debugstr_a(lpServiceName), debugstr_a(lpDisplayName));
 
-    r = RegCreateKeyExA(hSCManager, lpServiceName, 0, NULL, 
+    r = RegCreateKeyExA(hSCManager, lpServiceName, 0, NULL,
                        REG_OPTION_NON_VOLATILE, dwDesiredAccess, NULL, &hKey, &dp);
     if (r!=ERROR_SUCCESS)
         return 0;
@@ -439,14 +439,14 @@
     if (r!=ERROR_SUCCESS)
         return 0;
 
-    r = RegSetValueExA(hKey, "ErrorControl", 0, REG_DWORD, 
+    r = RegSetValueExA(hKey, "ErrorControl", 0, REG_DWORD,
                            (LPVOID)&dwErrorControl, sizeof (DWORD) );
     if (r!=ERROR_SUCCESS)
         return 0;
 
     if(lpBinaryPathName)
     {
-        r = RegSetValueExA(hKey, "ImagePath", 0, REG_SZ, 
+        r = RegSetValueExA(hKey, "ImagePath", 0, REG_SZ,
                            lpBinaryPathName,strlen(lpBinaryPathName)+1 );
         if (r!=ERROR_SUCCESS)
             return 0;
@@ -454,28 +454,28 @@
 
     if(lpLoadOrderGroup)
     {
-        r = RegSetValueExA(hKey, "Group", 0, REG_SZ, 
+        r = RegSetValueExA(hKey, "Group", 0, REG_SZ,
                            lpLoadOrderGroup, strlen(lpLoadOrderGroup)+1 );
         if (r!=ERROR_SUCCESS)
             return 0;
     }
 
-    r = RegSetValueExA(hKey, "ErrorControl", 0, REG_DWORD, 
+    r = RegSetValueExA(hKey, "ErrorControl", 0, REG_DWORD,
                        (LPVOID)&dwErrorControl, sizeof (DWORD) );
     if (r!=ERROR_SUCCESS)
         return 0;
 
     if(lpDependencies)
     {
-        DWORD len = 0; 
+        DWORD len = 0;
 
         /* determine the length of a double null terminated multi string */
         do {
             len += (strlen(&lpDependencies[len])+1);
-        } while (lpDependencies[len++]); 
-        
+        } while (lpDependencies[len++]);
+
         /* FIXME: this should be unicode */
-        r = RegSetValueExA(hKey, "Dependencies", 0, REG_MULTI_SZ, 
+        r = RegSetValueExA(hKey, "Dependencies", 0, REG_MULTI_SZ,
                            lpDependencies, len );
         if (r!=ERROR_SUCCESS)
             return 0;
@@ -526,7 +526,7 @@
     TRACE("(%d,%ld,%p)\n",hService,dwNumServiceArgs,lpServiceArgVectors);
 
     if(dwNumServiceArgs)
-        lpwstr = (LPWSTR*) HeapAlloc( GetProcessHeap(), 0, 
+        lpwstr = (LPWSTR*) HeapAlloc( GetProcessHeap(), 0,
                                    dwNumServiceArgs*sizeof(LPWSTR) );
     else
         lpwstr = NULL;
@@ -615,14 +615,14 @@
         }
     }
 
-    /* 
+    /*
      * FIXME: lpServiceArgsVectors need to be stored and returned to
      *        the service when it calls StartServiceCtrlDispatcher
      *
      * Chuck these in a global (yuk) so we can pass them to
      * another process - address space separation will break this.
      */
-    
+
     r = WaitForSingleObject(data,INFINITE);
 
     if( r == WAIT_FAILED)
@@ -635,8 +635,8 @@
     ZeroMemory(&startupinfo,sizeof(STARTUPINFOA));
     startupinfo.cb = sizeof(STARTUPINFOA);
 
-    r = CreateProcessA(path, 
-                   NULL, 
+    r = CreateProcessA(path,
+                   NULL,
                    NULL,  /* process security attribs */
                    NULL,  /* thread security attribs */
                    FALSE, /* inherit handles */
@@ -655,7 +655,7 @@
 
     /* docs for StartServiceCtrlDispatcher say this should be 30 sec */
     r = WaitForSingleObject(wait,30000);
-    
+
     ReleaseSemaphore(data, 1, NULL);
 
     if( r == WAIT_FAILED)
@@ -670,7 +670,7 @@
  * PARAMS
  *   hService        []
  *   lpservicestatus []
- *   
+ *
  */
 BOOL WINAPI
 QueryServiceStatus( SC_HANDLE hService, LPSERVICE_STATUS lpservicestatus )
diff --git a/dlls/avifil32/avifile.c b/dlls/avifil32/avifile.c
index 502727c..6e3d47f 100644
--- a/dlls/avifil32/avifile.c
+++ b/dlls/avifil32/avifile.c
@@ -1,4 +1,4 @@
-/*				   
+/*
  * Copyright 1999 Marcus Meissner
  *
  * This library is free software; you can redistribute it and/or
@@ -144,14 +144,14 @@
 
 static ULONG WINAPI IAVIFile_fnAddRef(IAVIFile* iface) {
 	ICOM_THIS(IAVIFileImpl,iface);
-	
+
 	FIXME("(%p)->AddRef()\n",iface);
 	return ++(This->ref);
 }
 
 static ULONG WINAPI IAVIFile_fnRelease(IAVIFile* iface) {
 	ICOM_THIS(IAVIFileImpl,iface);
-	
+
 	FIXME("(%p)->Release()\n",iface);
 	if (!--(This->ref)) {
 		HeapFree(GetProcessHeap(),0,iface);
@@ -253,14 +253,14 @@
 
 static ULONG WINAPI IAVIStream_fnAddRef(IAVIStream*iface) {
 	ICOM_THIS(IAVIStreamImpl,iface);
-	
+
 	FIXME("(%p)->AddRef()\n",iface);
 	return ++(This->ref);
 }
 
 static ULONG WINAPI IAVIStream_fnRelease(IAVIStream* iface) {
 	ICOM_THIS(IAVIStreamImpl,iface);
-	
+
 	FIXME("(%p)->Release()\n",iface);
 	if (!--(This->ref)) {
 		HeapFree(GetProcessHeap(),0,This);
@@ -301,7 +301,7 @@
 	as->lpInputFormat = HeapAlloc(GetProcessHeap(),0,formatsize);
 	memcpy(as->lpInputFormat,format,formatsize);
 	if (as->iscompressing) {
-		int	xsize; 
+		int	xsize;
 		/* Set up the Compressor part */
 		xsize = ICCompressGetFormatSize(as->hic,as->lpInputFormat);
 		as->lpCompressFormat = HeapAlloc(GetProcessHeap(),0,xsize);
@@ -384,7 +384,7 @@
  */
 HRESULT WINAPI AVIFileCreateStreamA(PAVIFILE iface,PAVISTREAM *ppavi,AVISTREAMINFOA * psi) {
 	AVISTREAMINFOW	psiw;
-	
+
 	/* Only the szName at the end is different */
 	memcpy(&psiw,psi,sizeof(*psi)-sizeof(psi->szName));
         MultiByteToWideChar( CP_ACP, 0, psi->szName, -1,
@@ -481,7 +481,7 @@
 	as->hic = ICOpen(aco->fccType,aco->fccHandler,ICMODE_COMPRESS);
 
 	/* May happen. for instance if the codec is not able to compress */
-	if (!as->hic) 
+	if (!as->hic)
 		return AVIERR_UNSUPPORTED;
 
 	ICGetInfo(as->hic,&(as->icinfo),sizeof(ICINFO));
diff --git a/dlls/comcat/factory.c b/dlls/comcat/factory.c
index db52a1c..5e39e59 100644
--- a/dlls/comcat/factory.c
+++ b/dlls/comcat/factory.c
@@ -79,7 +79,7 @@
     if (InterlockedDecrement(&This->ref) == 0) {
 	InterlockedDecrement(&dll_ref);
     }
-    return This->ref;;
+    return This->ref;
 }
 
 /**********************************************************************
diff --git a/dlls/comctl32/animate.c b/dlls/comctl32/animate.c
index 6b6e6a6..74e0458 100644
--- a/dlls/comctl32/animate.c
+++ b/dlls/comctl32/animate.c
@@ -71,7 +71,7 @@
    int			nLoop;
    int			currFrame;
    /* tranparency info*/
-   COLORREF         	transparentColor;   
+   COLORREF         	transparentColor;
    HBRUSH           	hbrushBG;
    HBITMAP  	    	hbmPrevFrame;
 } ANIMATE_INFO;
@@ -81,8 +81,8 @@
 
 static void ANIMATE_Notify(ANIMATE_INFO* infoPtr, UINT notif)
 {
-    SendMessageA(GetParent(infoPtr->hWnd), WM_COMMAND, 
-		 MAKEWPARAM(GetDlgCtrlID(infoPtr->hWnd), notif), 
+    SendMessageA(GetParent(infoPtr->hWnd), WM_COMMAND,
+		 MAKEWPARAM(GetDlgCtrlID(infoPtr->hWnd), notif),
 		 (LPARAM)infoPtr->hWnd);
 }
 
@@ -91,19 +91,19 @@
     HRSRC 	hrsrc;
     MMIOINFO	mminfo;
     LPVOID	lpAvi;
-    
+
     hrsrc = FindResourceA(hInst, lpName, "AVI");
     if (!hrsrc)
 	return FALSE;
-    
+
     infoPtr->hRes = LoadResource(hInst, hrsrc);
     if (!infoPtr->hRes)
  	return FALSE;
-    
+
     lpAvi = LockResource(infoPtr->hRes);
     if (!lpAvi)
 	return FALSE;
-    
+
     memset(&mminfo, 0, sizeof(mminfo));
     mminfo.fccIOProc = FOURCC_MEM;
     mminfo.pchBuffer = (LPSTR)lpAvi;
@@ -122,10 +122,10 @@
 {
     infoPtr->hMMio = mmioOpenA((LPSTR)lpName, NULL,
 			       MMIO_ALLOCBUF | MMIO_READ | MMIO_DENYWRITE);
-    
+
     if (!infoPtr->hMMio)
 	return FALSE;
-    
+
     return TRUE;
 }
 
@@ -135,7 +135,7 @@
     EnterCriticalSection(&infoPtr->cs);
 
     /* should stop playing */
-    if (infoPtr->hThread) 
+    if (infoPtr->hThread)
     {
         if (!TerminateThread(infoPtr->hThread,0))
             WARN("could not destroy animation thread!\n");
@@ -197,36 +197,36 @@
 	infoPtr->indata = infoPtr->outdata = NULL;
 	infoPtr->hWnd = 0;
 	infoPtr->hMMio = 0;
-	
+
 	memset(&infoPtr->mah, 0, sizeof(infoPtr->mah));
 	memset(&infoPtr->ash, 0, sizeof(infoPtr->ash));
 	infoPtr->nFromFrame = infoPtr->nToFrame = infoPtr->nLoop = infoPtr->currFrame = 0;
     }
-    infoPtr->transparentColor = ANIMATE_COLOR_NONE;    
+    infoPtr->transparentColor = ANIMATE_COLOR_NONE;
 }
 
 static void ANIMATE_TransparentBlt(ANIMATE_INFO* infoPtr, HDC hdcDest, HDC hdcSource)
-{       
+{
     HDC hdcMask;
     HBITMAP hbmMask;
-    HBITMAP hbmOld;            
-    
+    HBITMAP hbmOld;
+
     /* create a transparency mask */
     hdcMask = CreateCompatibleDC(hdcDest);
-    hbmMask = CreateBitmap(infoPtr->inbih->biWidth, infoPtr->inbih->biHeight, 1,1,NULL);   
-    hbmOld = SelectObject(hdcMask, hbmMask);             
+    hbmMask = CreateBitmap(infoPtr->inbih->biWidth, infoPtr->inbih->biHeight, 1,1,NULL);
+    hbmOld = SelectObject(hdcMask, hbmMask);
 
     SetBkColor(hdcSource,infoPtr->transparentColor);
     BitBlt(hdcMask,0,0,infoPtr->inbih->biWidth, infoPtr->inbih->biHeight,hdcSource,0,0,SRCCOPY);
-            
+
     /* mask the source bitmap */
-    SetBkColor(hdcSource, RGB(0,0,0));          
-    SetTextColor(hdcSource, RGB(255,255,255)); 
+    SetBkColor(hdcSource, RGB(0,0,0));
+    SetTextColor(hdcSource, RGB(255,255,255));
     BitBlt(hdcSource, 0, 0, infoPtr->inbih->biWidth, infoPtr->inbih->biHeight, hdcMask, 0, 0, SRCAND);
 
     /* mask the destination bitmap */
-    SetBkColor(hdcDest, RGB(255,255,255));   
-    SetTextColor(hdcDest, RGB(0,0,0));         
+    SetBkColor(hdcDest, RGB(255,255,255));
+    SetTextColor(hdcDest, RGB(0,0,0));
     BitBlt(hdcDest, 0, 0, infoPtr->inbih->biWidth, infoPtr->inbih->biHeight, hdcMask, 0, 0, SRCAND);
 
     /* combine source and destination */
@@ -260,48 +260,48 @@
         pBitmapInfo = (LPBITMAPINFO)infoPtr->outbih;
 
         nWidth = infoPtr->outbih->biWidth;
-        nHeight = infoPtr->outbih->biHeight;  
+        nHeight = infoPtr->outbih->biHeight;
     } else
-    {  
+    {
         pBitmapData = infoPtr->indata;
         pBitmapInfo = (LPBITMAPINFO)infoPtr->inbih;
 
         nWidth = infoPtr->inbih->biWidth;
-        nHeight = infoPtr->inbih->biHeight;  
-    }  
+        nHeight = infoPtr->inbih->biHeight;
+    }
 
     if(!infoPtr->hbmPrevFrame)
     {
         infoPtr->hbmPrevFrame=CreateCompatibleBitmap(hDC, nWidth,nHeight );
     }
 
-    SetDIBits(hDC, infoPtr->hbmPrevFrame, 0, nHeight, pBitmapData, (LPBITMAPINFO)pBitmapInfo, DIB_RGB_COLORS); 
-    
+    SetDIBits(hDC, infoPtr->hbmPrevFrame, 0, nHeight, pBitmapData, (LPBITMAPINFO)pBitmapInfo, DIB_RGB_COLORS);
+
     hdcMem = CreateCompatibleDC(hDC);
     hbmOld = SelectObject(hdcMem, infoPtr->hbmPrevFrame);
 
-    /* 
-     * we need to get the transparent color even without ACS_TRANSPARENT, 
+    /*
+     * we need to get the transparent color even without ACS_TRANSPARENT,
      * because the style can be changed later on and the color should always
-     * be obtained in the first frame 
+     * be obtained in the first frame
      */
     if(infoPtr->transparentColor == ANIMATE_COLOR_NONE)
     {
         infoPtr->transparentColor = GetPixel(hdcMem,0,0);
-    } 
+    }
 
-    if(GetWindowLongA(infoPtr->hWnd, GWL_STYLE) & ACS_TRANSPARENT) 
-    { 
+    if(GetWindowLongA(infoPtr->hWnd, GWL_STYLE) & ACS_TRANSPARENT)
+    {
         HDC hdcFinal = CreateCompatibleDC(hDC);
         HBITMAP hbmFinal = CreateCompatibleBitmap(hDC,nWidth, nHeight);
         HBITMAP hbmOld2 = SelectObject(hdcFinal, hbmFinal);
         RECT rect;
-	
+
         rect.left = 0;
         rect.top = 0;
         rect.right = nWidth;
         rect.bottom = nHeight;
-        
+
         if(!infoPtr->hbrushBG)
             infoPtr->hbrushBG = GetCurrentObject(hDC, OBJ_BRUSH);
 
@@ -314,16 +314,16 @@
         DeleteObject(infoPtr->hbmPrevFrame);
         infoPtr->hbmPrevFrame = hbmFinal;
          }
-    
-    if (GetWindowLongA(infoPtr->hWnd, GWL_STYLE) & ACS_CENTER) 
+
+    if (GetWindowLongA(infoPtr->hWnd, GWL_STYLE) & ACS_CENTER)
     {
-       RECT rect;   
+       RECT rect;
 
        GetWindowRect(infoPtr->hWnd, &rect);
-       nOffsetX = ((rect.right - rect.left) - nWidth)/2; 
-       nOffsetY = ((rect.bottom - rect.top) - nHeight)/2;  
+       nOffsetX = ((rect.right - rect.left) - nWidth)/2;
+       nOffsetY = ((rect.bottom - rect.top) - nHeight)/2;
     }
-    BitBlt(hDC, nOffsetX, nOffsetY, nWidth, nHeight, hdcMem, 0, 0, SRCCOPY);    
+    BitBlt(hDC, nOffsetX, nOffsetY, nWidth, nHeight, hdcMem, 0, 0, SRCCOPY);
 
     SelectObject(hdcMem, hbmOld);
     DeleteDC(hdcMem);
@@ -340,9 +340,9 @@
 
     mmioSeek(infoPtr->hMMio, infoPtr->lpIndex[infoPtr->currFrame], SEEK_SET);
     mmioRead(infoPtr->hMMio, infoPtr->indata, infoPtr->ash.dwSuggestedBufferSize);
-    
+
     if (infoPtr->hic &&
-	fnIC.fnICDecompress(infoPtr->hic, 0, infoPtr->inbih, infoPtr->indata, 
+	fnIC.fnICDecompress(infoPtr->hic, 0, infoPtr->inbih, infoPtr->indata,
 		     infoPtr->outbih, infoPtr->outdata) != ICERR_OK) {
 	LeaveCriticalSection(&infoPtr->cs);
 	WARN("Decompression error\n");
@@ -371,7 +371,7 @@
 {
     ANIMATE_INFO*	infoPtr = (ANIMATE_INFO*)ptr_;
     HDC hDC;
-    
+
     if(!infoPtr)
     {
         WARN("animation structure undefined!\n");
@@ -379,8 +379,8 @@
     }
 
     while(1)
-    {    
-        if(GetWindowLongA(infoPtr->hWnd, GWL_STYLE) & ACS_TRANSPARENT) 
+    {
+        if(GetWindowLongA(infoPtr->hWnd, GWL_STYLE) & ACS_TRANSPARENT)
         {
             hDC = GetDC(infoPtr->hWnd);
 	    /* sometimes the animation window will be destroyed in between
@@ -388,11 +388,11 @@
             infoPtr->hbrushBG = SendMessageA(GetParent(infoPtr->hWnd),WM_CTLCOLORSTATIC,hDC, infoPtr->hWnd);
             ReleaseDC(infoPtr->hWnd,hDC);
         }
-        
+
         EnterCriticalSection(&infoPtr->cs);
         ANIMATE_DrawFrame(infoPtr);
         LeaveCriticalSection(&infoPtr->cs);
-    
+
         /* time is in microseconds, we should convert it to milliseconds */
         Sleep((infoPtr->mah.dwMicroSecPerFrame+500)/1000);
     }
@@ -419,7 +419,7 @@
     if (infoPtr->nToFrame == 0xFFFF)
 	infoPtr->nToFrame = infoPtr->mah.dwTotalFrames - 1;
 
-    TRACE("(repeat=%d from=%d to=%d);\n", 
+    TRACE("(repeat=%d from=%d to=%d);\n",
 	  infoPtr->nLoop, infoPtr->nFromFrame, infoPtr->nToFrame);
 
     if (infoPtr->nFromFrame >= infoPtr->nToFrame ||
@@ -442,9 +442,9 @@
            ERR("Could not create animation thread!\n");
            return FALSE;
     }
-	
+
     }
-	
+
     ANIMATE_Notify(infoPtr, ACN_START);
 
     return TRUE;
@@ -512,13 +512,13 @@
 
     mmioRead(infoPtr->hMMio, (LPSTR)&infoPtr->ash, sizeof(infoPtr->ash));
 
-    TRACE("ash.fccType='%c%c%c%c'\n", 		LOBYTE(LOWORD(infoPtr->ash.fccType)), 
-	                                        HIBYTE(LOWORD(infoPtr->ash.fccType)), 
-	                                        LOBYTE(HIWORD(infoPtr->ash.fccType)), 
+    TRACE("ash.fccType='%c%c%c%c'\n", 		LOBYTE(LOWORD(infoPtr->ash.fccType)),
+	                                        HIBYTE(LOWORD(infoPtr->ash.fccType)),
+	                                        LOBYTE(HIWORD(infoPtr->ash.fccType)),
 	                                        HIBYTE(HIWORD(infoPtr->ash.fccType)));
-    TRACE("ash.fccHandler='%c%c%c%c'\n",	LOBYTE(LOWORD(infoPtr->ash.fccHandler)), 
-	                                        HIBYTE(LOWORD(infoPtr->ash.fccHandler)), 
-	                                        LOBYTE(HIWORD(infoPtr->ash.fccHandler)), 
+    TRACE("ash.fccHandler='%c%c%c%c'\n",	LOBYTE(LOWORD(infoPtr->ash.fccHandler)),
+	                                        HIBYTE(LOWORD(infoPtr->ash.fccHandler)),
+	                                        LOBYTE(HIWORD(infoPtr->ash.fccHandler)),
 	                                        HIBYTE(HIWORD(infoPtr->ash.fccHandler)));
     TRACE("ash.dwFlags=%ld\n", 			infoPtr->ash.dwFlags);
     TRACE("ash.wPriority=%d\n", 		infoPtr->ash.wPriority);
@@ -531,7 +531,7 @@
     TRACE("ash.dwSuggestedBufferSize=%ld\n", 	infoPtr->ash.dwSuggestedBufferSize);
     TRACE("ash.dwQuality=%ld\n", 		infoPtr->ash.dwQuality);
     TRACE("ash.dwSampleSize=%ld\n", 		infoPtr->ash.dwSampleSize);
-    TRACE("ash.rcFrame=(%d,%d,%d,%d)\n", 	infoPtr->ash.rcFrame.top, infoPtr->ash.rcFrame.left, 
+    TRACE("ash.rcFrame=(%d,%d,%d,%d)\n", 	infoPtr->ash.rcFrame.top, infoPtr->ash.rcFrame.left,
 	  infoPtr->ash.rcFrame.bottom, infoPtr->ash.rcFrame.right);
 
     mmioAscend(infoPtr->hMMio, &mmckInfo, 0);
@@ -565,10 +565,10 @@
     mmioAscend(infoPtr->hMMio, &mmckInfo, 0);
 
     mmioAscend(infoPtr->hMMio, &mmckList, 0);
-    
+
 #if 0
     /* an AVI has 0 or 1 video stream, and to be animated should not contain
-     * an audio stream, so only one strl is allowed 
+     * an audio stream, so only one strl is allowed
      */
     mmckList.fccType = mmioFOURCC('s', 't', 'r', 'l');
     if (mmioDescend(infoPtr->hMMio, &mmckList, &mmckHead, MMIO_FINDLIST) == 0) {
@@ -589,7 +589,7 @@
 
     /* FIXME: should handle the 'rec ' LIST when present */
 
-    infoPtr->lpIndex = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, 
+    infoPtr->lpIndex = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY,
 				 infoPtr->mah.dwTotalFrames * sizeof(DWORD));
     if (!infoPtr->lpIndex) {
 	WARN("Can't alloc index array\n");
@@ -597,7 +597,7 @@
     }
 
     numFrame = insize = 0;
-    while (mmioDescend(infoPtr->hMMio, &mmckInfo, &mmckList, 0) == 0 && 
+    while (mmioDescend(infoPtr->hMMio, &mmckInfo, &mmckList, 0) == 0 &&
 	   numFrame < infoPtr->mah.dwTotalFrames) {
 	infoPtr->lpIndex[numFrame] = mmckInfo.dwDataOffset;
 	if (insize < mmckInfo.cksize)
@@ -633,7 +633,7 @@
        (infoPtr->ash.fccHandler == mmioFOURCC('R', 'L', 'E', ' ')) ||
        (infoPtr->ash.fccHandler == mmioFOURCC(0, 0, 0, 0)))
     {
-        infoPtr->hic = 0;             
+        infoPtr->hic = 0;
 	return TRUE;
     }
 
@@ -643,8 +643,8 @@
 	WARN("Can't load codec for the file\n");
 	return FALSE;
     }
-    
-    outSize = fnIC.fnICSendMessage(infoPtr->hic, ICM_DECOMPRESS_GET_FORMAT, 
+
+    outSize = fnIC.fnICSendMessage(infoPtr->hic, ICM_DECOMPRESS_GET_FORMAT,
 			    (DWORD)infoPtr->inbih, 0L);
 
     infoPtr->outbih = HeapAlloc(GetProcessHeap(), 0, outSize);
@@ -653,7 +653,7 @@
 	return FALSE;
     }
 
-    if (fnIC.fnICSendMessage(infoPtr->hic, ICM_DECOMPRESS_GET_FORMAT, 
+    if (fnIC.fnICSendMessage(infoPtr->hic, ICM_DECOMPRESS_GET_FORMAT,
 		      (DWORD)infoPtr->inbih, (DWORD)infoPtr->outbih) != ICERR_OK) {
 	WARN("Can't get output BIH\n");
 	return FALSE;
@@ -665,7 +665,7 @@
 	return FALSE;
     }
 
-    if (fnIC.fnICSendMessage(infoPtr->hic, ICM_DECOMPRESS_BEGIN, 
+    if (fnIC.fnICSendMessage(infoPtr->hic, ICM_DECOMPRESS_BEGIN,
 		      (DWORD)infoPtr->inbih, (DWORD)infoPtr->outbih) != ICERR_OK) {
 	WARN("Can't begin decompression\n");
 	return FALSE;
@@ -686,7 +686,7 @@
 	TRACE("Closing avi!\n");
 	return TRUE;
     }
-    
+
     if (!hInstance)
        hInstance = GetWindowLongA(hWnd, GWL_HINSTANCE);
 
@@ -786,7 +786,7 @@
     infoPtr->hbmPrevFrame = 0;
 
     InitializeCriticalSection(&infoPtr->cs);
-    
+
     return 0;
 }
 
@@ -810,11 +810,11 @@
 static LRESULT ANIMATE_EraseBackground(HWND hWnd, WPARAM wParam, LPARAM lParam)
 {
     RECT rect;
-    HBRUSH hBrush = 0;       
+    HBRUSH hBrush = 0;
 
-    if(GetWindowLongA(hWnd, GWL_STYLE) & ACS_TRANSPARENT) 
+    if(GetWindowLongA(hWnd, GWL_STYLE) & ACS_TRANSPARENT)
     {
-        hBrush = SendMessageA(GetParent(hWnd),WM_CTLCOLORSTATIC,(HDC)wParam, hWnd);    
+        hBrush = SendMessageA(GetParent(hWnd),WM_CTLCOLORSTATIC,(HDC)wParam, hWnd);
     }
 
     GetClientRect(hWnd, &rect);
@@ -840,27 +840,27 @@
     {
     case ACM_OPENA:
 	return ANIMATE_OpenA(hWnd, wParam, lParam);
-	
+
 	/*	case ACM_OPEN32W: FIXME!! */
 	/*	    return ANIMATE_Open32W(hWnd, wParam, lParam); */
-	
+
     case ACM_PLAY:
 	return ANIMATE_Play(hWnd, wParam, lParam);
-	
+
     case ACM_STOP:
 	return ANIMATE_Stop(hWnd, wParam, lParam);
-	
+
     case WM_NCCREATE:
 	ANIMATE_Create(hWnd, wParam, lParam);
 	return DefWindowProcA(hWnd, uMsg, wParam, lParam);
-	
+
     case WM_NCHITTEST:
 	return HTTRANSPARENT;
 
     case WM_DESTROY:
 	ANIMATE_Destroy(hWnd, wParam, lParam);
 	return DefWindowProcA(hWnd, uMsg, wParam, lParam);
-	
+
     case WM_ERASEBKGND:
 	ANIMATE_EraseBackground(hWnd, wParam, lParam);
 	break;
@@ -874,7 +874,7 @@
             infoPtr->hbrushBG = SendMessageA(GetParent(hWnd),WM_CTLCOLORSTATIC,(HDC)wParam, hWnd);
         }
 	return ANIMATE_DrawFrame(ANIMATE_GetInfoPtr(hWnd));
-	
+
     case WM_CLOSE:
 	ANIMATE_Free(ANIMATE_GetInfoPtr(hWnd));
 	return TRUE;
@@ -882,16 +882,16 @@
     case WM_PAINT:
         {
             ANIMATE_INFO* infoPtr = ANIMATE_GetInfoPtr(hWnd);
-	        
+
             /* the animation isn't playing, don't paint */
 	    if(!infoPtr->uTimer && !infoPtr->hThread)
 		/* default paint handling */
 	    	return DefWindowProcA(hWnd, uMsg, wParam, lParam);
-	    
+
             if (GetWindowLongA(hWnd, GWL_STYLE) & ACS_TRANSPARENT)
                 infoPtr->hbrushBG = SendMessageA(GetParent(hWnd), WM_CTLCOLORSTATIC,
 		                                 (HDC)wParam, hWnd);
-    
+
             if (wParam)
             {
                 EnterCriticalSection(&infoPtr->cs);
@@ -906,7 +906,7 @@
                 EnterCriticalSection(&infoPtr->cs);
                 ANIMATE_PaintFrame(infoPtr, hDC);
                 LeaveCriticalSection(&infoPtr->cs);
-    
+
 	        EndPaint(hWnd, &ps);
 	    }
         }
@@ -919,7 +919,7 @@
     default:
 	if (uMsg >= WM_USER)
 	    ERR("unknown msg %04x wp=%08x lp=%08lx\n", uMsg, wParam, lParam);
-	
+
 	return DefWindowProcA(hWnd, uMsg, wParam, lParam);
     }
     return 0;
@@ -937,7 +937,7 @@
     wndClass.hCursor       = LoadCursorA(0, IDC_ARROWA);
     wndClass.hbrBackground = (HBRUSH)(COLOR_BTNFACE + 1);
     wndClass.lpszClassName = ANIMATE_CLASSA;
- 
+
     RegisterClassA(&wndClass);
 }
 
diff --git a/dlls/comctl32/comboex.c b/dlls/comctl32/comboex.c
index fa06231..9e1fd6e 100644
--- a/dlls/comctl32/comboex.c
+++ b/dlls/comctl32/comboex.c
@@ -87,12 +87,12 @@
 
 /*
  * Special flag set in DRAWITEMSTRUCT itemState field. It is set by
- * the ComboEx version of the Combo Window Proc so that when the 
- * WM_DRAWITEM message is then passed to ComboEx, we know that this 
+ * the ComboEx version of the Combo Window Proc so that when the
+ * WM_DRAWITEM message is then passed to ComboEx, we know that this
  * particular WM_DRAWITEM message is for listbox only items. Any messasges
  * without this flag is then for the Edit control field.
  *
- * We really cannot use the ODS_COMBOBOXEDIT flag because MSDN states that 
+ * We really cannot use the ODS_COMBOBOXEDIT flag because MSDN states that
  * only version 4.0 applications will have ODS_COMBOBOXEDIT set.
  */
 #define ODS_COMBOEXLBOX		0x4000
@@ -163,7 +163,7 @@
 
 inline static CBE_ITEMDATA *get_item_data(COMBOEX_INFO *infoPtr, INT index)
 {
-    return (CBE_ITEMDATA *)SendMessageW (infoPtr->hwndCombo, CB_GETITEMDATA, 
+    return (CBE_ITEMDATA *)SendMessageW (infoPtr->hwndCombo, CB_GETITEMDATA,
 		                         (WPARAM)index, 0);
 }
 
@@ -206,14 +206,14 @@
 	if (code == CBEN_ENDEDITW) code = CBEN_ENDEDITA;
 	else if (code == CBEN_GETDISPINFOW) code = CBEN_GETDISPINFOA;
 	else if (code == CBEN_DRAGBEGINW) code = CBEN_DRAGBEGINA;
-	
+
 	ret = COMBOEX_Notify (infoPtr, code, (NMHDR *)hdr);
 
 	if (astr && hdr->ceItem.pszText == (LPWSTR)astr)
 	    hdr->ceItem.pszText = wstr;
-	
+
 	if (astr) COMCTL32_Free(astr);
-	
+
 	return ret;
     }
 }
@@ -227,7 +227,7 @@
 	return COMBOEX_Notify (infoPtr, CBEN_ENDEDITW, &neew->hdr);
     } else {
 	NMCBEENDEDITA neea;
-	
+
         memcpy (&neea.hdr, &neew->hdr, sizeof(NMHDR));
         neea.fChanged = neew->fChanged;
         neea.iNewSelection = neew->iNewSelection;
@@ -253,10 +253,10 @@
     NMCOMBOBOXEXW nmce;
     LPWSTR text, buf;
     INT len;
-    
-    if (item->pszText != LPSTR_TEXTCALLBACKW) 
+
+    if (item->pszText != LPSTR_TEXTCALLBACKW)
 	return item->pszText;
-    
+
     ZeroMemory(&nmce, sizeof(nmce));
     nmce.ceItem.mask = CBEIF_TEXT;
     COMBOEX_NotifyItem(infoPtr, CBEN_GETDISPINFOW, &nmce);
@@ -276,7 +276,7 @@
 	text = buf;
     } else
 	text = nmce.ceItem.pszText;
-    
+
     if (nmce.ceItem.mask & CBEIF_DI_SETITEM)
 	item->pszText = text;
     return text;
@@ -395,7 +395,7 @@
     }
 }
 
- 
+
 static CBE_ITEMDATA * COMBOEX_FindItem(COMBOEX_INFO *infoPtr, INT index)
 {
     CBE_ITEMDATA *item;
@@ -425,7 +425,7 @@
 {
     return infoPtr->hwndEdit;
 }
- 
+
 
 /* ***  CBEM_xxx message support  *** */
 
@@ -480,7 +480,7 @@
     if(!COMBOEX_GetItemW (infoPtr, &tmpcit)) return FALSE;
 
     if (is_textW(tmpcit.pszText) && cit->pszText)
-        WideCharToMultiByte (CP_ACP, 0, tmpcit.pszText, -1, 
+        WideCharToMultiByte (CP_ACP, 0, tmpcit.pszText, -1,
 			     cit->pszText, cit->cchTextMax, NULL, NULL);
     else if (cit->pszText) cit->pszText[0] = 0;
     else cit->pszText = (LPSTR)tmpcit.pszText;
@@ -519,7 +519,7 @@
 
     /* get zero-filled space and chain it in */
     if(!(item = (CBE_ITEMDATA *)COMCTL32_Alloc (sizeof(*item)))) return -1;
-    
+
     /* locate position to insert new item in */
     if (index == infoPtr->nb_items) {
         /* fast path for iItem = -1 */
@@ -575,7 +575,7 @@
 
     if (TRACE_ON(comboex)) COMBOEX_DumpItem (item);
 
-    SendMessageW (infoPtr->hwndCombo, CB_INSERTSTRING, 
+    SendMessageW (infoPtr->hwndCombo, CB_INSERTSTRING,
 		  (WPARAM)cit->iItem, (LPARAM)item);
 
     memset (&nmcit.ceItem, 0, sizeof(nmcit.ceItem));
@@ -601,15 +601,15 @@
 	MultiByteToWideChar (CP_ACP, 0, cit->pszText, -1, wstr, len);
 	citW.pszText = wstr;
     }
-    ret = COMBOEX_InsertItemW(infoPtr, &citW);;
-    
+    ret = COMBOEX_InsertItemW(infoPtr, &citW);
+
     if (wstr) COMCTL32_Free(wstr);
-    
+
     return ret;
 }
 
 
-static DWORD 
+static DWORD
 COMBOEX_SetExtendedStyle (COMBOEX_INFO *infoPtr, DWORD mask, DWORD style)
 {
     DWORD dwTemp;
@@ -675,7 +675,7 @@
 
     if (!(item = COMBOEX_FindItem(infoPtr, index))) return FALSE;
 
-    /* add/change stuff to the internal item structure */ 
+    /* add/change stuff to the internal item structure */
     item->mask |= cit->mask;
     if (cit->mask & CBEIF_TEXT) {
 	INT len = 0;
@@ -725,7 +725,7 @@
 	MultiByteToWideChar (CP_ACP, 0, cit->pszText, -1, wstr, len);
 	citW.pszText = wstr;
     }
-    ret = COMBOEX_SetItemW(infoPtr, &citW);;
+    ret = COMBOEX_SetItemW(infoPtr, &citW);
 
     if (wstr) COMCTL32_Free(wstr);
 
@@ -856,7 +856,7 @@
     GetWindowRect (infoPtr->hwndCombo, &cb_wrect);
     GetWindowRect (infoPtr->hwndSelf, &cbx_wrect);
     GetClientRect (infoPtr->hwndSelf, &cbx_crect);
-    /* the height of comboex as height of the combo + comboex border */ 
+    /* the height of comboex as height of the combo + comboex border */
     height = cb_wrect.bottom-cb_wrect.top
              + cbx_wrect.bottom-cbx_wrect.top
              - (cbx_crect.bottom-cbx_crect.top);
@@ -894,7 +894,7 @@
 
     /* initialize info structure */
     /* note that infoPtr is allocated zero-filled */
-    
+
     infoPtr->hwndSelf = hwnd;
     infoPtr->selected = -1;
 
@@ -933,14 +933,14 @@
     infoPtr->hwndCombo = CreateWindowW (COMBOBOX, NIL,
 			 /* following line added to match native */
                          WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_VSCROLL |
-                         CBS_NOINTEGRALHEIGHT | CBS_DROPDOWNLIST | 
+                         CBS_NOINTEGRALHEIGHT | CBS_DROPDOWNLIST |
 			 /* was base and is necessary */
 			 WS_CHILD | WS_VISIBLE | CBS_OWNERDRAWFIXED | dwComboStyle,
 			 cs->y, cs->x, cs->cx, cs->cy, hwnd,
 			 (HMENU) GetWindowLongW (hwnd, GWL_ID),
 			 GetWindowLongW (hwnd, GWL_HINSTANCE), NULL);
 
-    /* 
+    /*
      * native does the following at this point according to trace:
      *  GetWindowThreadProcessId(hwndCombo,0)
      *  GetCurrentThreadId()
@@ -949,11 +949,11 @@
      */
 
     /*
-     * Setup a property to hold the pointer to the COMBOBOXEX 
+     * Setup a property to hold the pointer to the COMBOBOXEX
      * data structure.
      */
     SetPropA(infoPtr->hwndCombo, COMBOEX_SUBCLASS_PROP, hwnd);
-    infoPtr->prevComboWndProc = (WNDPROC)SetWindowLongW(infoPtr->hwndCombo, 
+    infoPtr->prevComboWndProc = (WNDPROC)SetWindowLongW(infoPtr->hwndCombo,
 	                        GWL_WNDPROC, (LONG)COMBOEX_ComboWndProc);
     infoPtr->font = SendMessageW (infoPtr->hwndCombo, WM_GETFONT, 0, 0);
 
@@ -966,7 +966,7 @@
 	infoPtr->hwndEdit = CreateWindowExW (0, EDIT, NIL,
 		    WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | ES_AUTOHSCROLL,
 		    0, 0, 0, 0,  /* will set later */
-		    infoPtr->hwndCombo, 
+		    infoPtr->hwndCombo,
 		    (HMENU) GetWindowLongW (hwnd, GWL_ID),
 		    GetWindowLongW (hwnd, GWL_HINSTANCE),
 		    NULL);
@@ -979,11 +979,11 @@
 	 */
 
 	/*
-	 * Setup a property to hold the pointer to the COMBOBOXEX 
+	 * Setup a property to hold the pointer to the COMBOBOXEX
 	 * data structure.
 	 */
         SetPropA(infoPtr->hwndEdit, COMBOEX_SUBCLASS_PROP, hwnd);
-	infoPtr->prevEditWndProc = (WNDPROC)SetWindowLongW(infoPtr->hwndEdit, 
+	infoPtr->prevEditWndProc = (WNDPROC)SetWindowLongW(infoPtr->hwndEdit,
 				 GWL_WNDPROC, (LONG)COMBOEX_EditWndProc);
 	infoPtr->font = SendMessageW (infoPtr->hwndCombo, WM_GETFONT, 0, 0);
     }
@@ -993,7 +993,7 @@
      * all associated controls
      */
     if (!infoPtr->font) {
-	SystemParametersInfoW (SPI_GETICONTITLELOGFONT, sizeof(mylogfont), 
+	SystemParametersInfoW (SPI_GETICONTITLELOGFONT, sizeof(mylogfont),
 			       &mylogfont, 0);
 	infoPtr->font = infoPtr->defaultFont = CreateFontIndirectW (&mylogfont);
     }
@@ -1014,21 +1014,21 @@
 	  wnrc1.left, wnrc1.top, wnrc1.right, wnrc1.bottom,
 	  clrc1.left, clrc1.top, clrc1.right, clrc1.bottom,
 	  cmbwrc.left, cmbwrc.top, cmbwrc.right, cmbwrc.bottom);
-    SetWindowPos(infoPtr->hwndCombo, HWND_TOP, 
+    SetWindowPos(infoPtr->hwndCombo, HWND_TOP,
 		 0, 0, wnrc1.right-wnrc1.left, wnrc1.bottom-wnrc1.top,
 		 SWP_NOACTIVATE | SWP_NOREDRAW);
 
     GetWindowRect(infoPtr->hwndCombo, &cmbwrc);
     TRACE("CB window=(%d,%d)-(%d,%d)\n",
 	  cmbwrc.left, cmbwrc.top, cmbwrc.right, cmbwrc.bottom);
-    SetWindowPos(hwnd, HWND_TOP, 
+    SetWindowPos(hwnd, HWND_TOP,
 		 0, 0, cmbwrc.right-cmbwrc.left, cmbwrc.bottom-cmbwrc.top,
 		 SWP_NOACTIVATE | SWP_NOZORDER | SWP_NOMOVE);
 
     COMBOEX_AdjustEditPos (infoPtr);
 
     /*
-     * Create an item structure to represent the data in the 
+     * Create an item structure to represent the data in the
      * EDIT control. It is allocated zero-filled.
      */
     infoPtr->edit = (CBE_ITEMDATA *)COMCTL32_Alloc (sizeof (CBE_ITEMDATA));
@@ -1060,11 +1060,11 @@
 	SetFocus (infoPtr->hwndCombo);
 	ShowWindow (infoPtr->hwndEdit, SW_HIDE);
 	return SendMessageW (parent, WM_COMMAND, wParam, (LPARAM)infoPtr->hwndSelf);
-	
+
     case CBN_CLOSEUP:
 	SendMessageW (parent, WM_COMMAND, wParam, (LPARAM)infoPtr->hwndSelf);
 	/*
-	 * from native trace of first dropdown after typing in URL in IE4 
+	 * from native trace of first dropdown after typing in URL in IE4
 	 *  CB_GETCURSEL(Combo)
 	 *  GetWindowText(Edit)
 	 *  CB_GETCURSEL(Combo)
@@ -1074,7 +1074,7 @@
 	 *  CB_GETCURSEL(Combo)
 	 *  CB_SETCURSEL(COMBOEX, n)
 	 *  SetFocus(Combo)
-	 * the rest is supposition  
+	 * the rest is supposition
 	 */
 	ShowWindow (infoPtr->hwndEdit, SW_SHOW);
 	InvalidateRect (infoPtr->hwndCombo, 0, TRUE);
@@ -1154,7 +1154,7 @@
 	return SendMessageW (parent, WM_COMMAND, wParam, (LPARAM)infoPtr->hwndSelf);
 
     case CBN_SELENDOK:
-	/* 
+	/*
 	 * We have to change the handle since we are the control
 	 * issuing the message. IE4 depends on this.
 	 */
@@ -1188,7 +1188,7 @@
 	return 0;
 
     default:
-	/* 
+	/*
 	 * We have to change the handle since we are the control
 	 * issuing the message. IE4 depends on this.
 	 * We also need to set the focus back to the Edit control
@@ -1263,13 +1263,13 @@
 
     if (!IsWindowEnabled(infoPtr->hwndCombo)) return 0;
 
-    TRACE("DRAWITEMSTRUCT: CtlType=0x%08x CtlID=0x%08x\n", 
+    TRACE("DRAWITEMSTRUCT: CtlType=0x%08x CtlID=0x%08x\n",
 	  dis->CtlType, dis->CtlID);
-    TRACE("itemID=0x%08x itemAction=0x%08x itemState=0x%08x\n", 
+    TRACE("itemID=0x%08x itemAction=0x%08x itemState=0x%08x\n",
 	  dis->itemID, dis->itemAction, dis->itemState);
     TRACE("hWnd=0x%04x hDC=0x%04x (%d,%d)-(%d,%d) itemData=0x%08lx\n",
-	  dis->hwndItem, dis->hDC, dis->rcItem.left, 
-	  dis->rcItem.top, dis->rcItem.right, dis->rcItem.bottom, 
+	  dis->hwndItem, dis->hDC, dis->rcItem.left,
+	  dis->rcItem.top, dis->rcItem.right, dis->rcItem.bottom,
 	  dis->itemData);
 
     /* MSDN says:                                                       */
@@ -1285,13 +1285,13 @@
     /*      though the list box or combo box has the focus.             */
     if (dis->itemID == 0xffffffff) {
 	if ( ( (dis->itemAction & ODA_FOCUS) && (dis->itemState & ODS_SELECTED)) ||
-	     ( (dis->itemAction & (ODA_SELECT | ODA_DRAWENTIRE)) && (dis->itemState & ODS_FOCUS) ) ) { 
+	     ( (dis->itemAction & (ODA_SELECT | ODA_DRAWENTIRE)) && (dis->itemState & ODS_FOCUS) ) ) {
 
 	    TRACE("drawing item -1 special focus, rect=(%d,%d)-(%d,%d)\n",
 		  dis->rcItem.left, dis->rcItem.top,
 		  dis->rcItem.right, dis->rcItem.bottom);
 	}
-	else if ((dis->CtlType == ODT_COMBOBOX) && 
+	else if ((dis->CtlType == ODT_COMBOBOX) &&
 		 (dis->itemAction == ODA_DRAWENTIRE)) {
 	    /* draw of edit control data */
 
@@ -1333,7 +1333,7 @@
 		item->pszText = (LPWSTR)COMCTL32_Alloc ((len + 1)*sizeof(WCHAR));
 		if (item->pszText)
 		    GetWindowTextW(infoPtr->hwndEdit, item->pszText, len+1);
-	    
+
 	       TRACE("edit control hwndEdit=%0x, text len=%d str=%s\n",
 		     infoPtr->hwndEdit, len, debugstr_txt(item->pszText));
 	    }
@@ -1381,8 +1381,8 @@
     } else {
 	/* drawing combo/edit entry */
 	if (IsWindowVisible(infoPtr->hwndEdit)) {
-	    /* if we have an edit control, the slave the 
-             * selection state to the Edit focus state 
+	    /* if we have an edit control, the slave the
+             * selection state to the Edit focus state
 	     */
 	    if (infoPtr->flags & WCBE_EDITFOCUSED) {
 	        if (item->mask & CBEIF_SELECTEDIMAGE)
@@ -1390,7 +1390,7 @@
 		drawstate = ILD_SELECTED;
 	    }
 	} else {
-	    /* if we don't have an edit control, use 
+	    /* if we don't have an edit control, use
 	     * the requested state.
 	     */
 	    if (dis->itemState & ODS_SELECTED) {
@@ -1414,10 +1414,10 @@
 
     len = strlenW (str);
     GetTextExtentPoint32W (dis->hDC, str, len, &txtsize);
-    
+
     if (dis->itemAction & (ODA_SELECT | ODA_DRAWENTIRE)) {
 	int overlay = item->iOverlay;
-	
+
     	if (drawimage == I_IMAGECALLBACK) {
 	    NMCOMBOBOXEXW nmce;
 	    ZeroMemory(&nmce, sizeof(nmce));
@@ -1441,11 +1441,11 @@
 		item->iOverlay = nmce.ceItem.iOverlay;
 	    overlay = nmce.ceItem.iOverlay;
 	}
-    
-	if (drawimage >= 0 && 
+
+	if (drawimage >= 0 &&
 	    !(infoPtr->dwExtStyle & (CBES_EX_NOEDITIMAGE | CBES_EX_NOEDITIMAGEINDENT))) {
 	    if (overlay > 0) ImageList_SetOverlayImage (infoPtr->himl, overlay, 1);
-	    ImageList_Draw (infoPtr->himl, drawimage, dis->hDC, xbase, dis->rcItem.top, 
+	    ImageList_Draw (infoPtr->himl, drawimage, dis->hDC, xbase, dis->rcItem.top,
 			    drawstate | (overlay > 0 ? INDEXTOOVERLAYMASK(1) : 0));
 	}
 
@@ -1472,7 +1472,7 @@
 	    SetTextColor (dis->hDC, txc);
 	}
     }
-    
+
     if (dis->itemAction & ODA_FOCUS) {
 	rect.left = xbase + xioff - 1;
 	rect.right = rect.left + txtsize.cx + 2;
@@ -1508,7 +1508,7 @@
 	infoPtr->items = 0;
     }
 
-    if (infoPtr->defaultFont) 
+    if (infoPtr->defaultFont)
 	DeleteObject (infoPtr->defaultFont);
 
     /* free comboex info data */
@@ -1564,7 +1564,7 @@
 
 static LRESULT COMBOEX_Size (COMBOEX_INFO *infoPtr, INT width, INT height)
 {
-    TRACE("(width=%d, height=%d)\n", width, height); 
+    TRACE("(width=%d, height=%d)\n", width, height);
 
     MoveWindow (infoPtr->hwndCombo, 0, 0, width, height, TRUE);
 
@@ -1585,8 +1585,8 @@
 
     /* width is winpos value + border width of comboex */
     width = wp->cx
-	    + (cbx_wrect.right-cbx_wrect.left) 
-            - (cbx_crect.right-cbx_crect.left); 
+	    + (cbx_wrect.right-cbx_wrect.left)
+            - (cbx_crect.right-cbx_crect.left);
 
     TRACE("winpos=(%d,%d %dx%d) flags=0x%08x\n",
 	  wp->x, wp->y, wp->cx, wp->cy, wp->flags);
@@ -1630,7 +1630,7 @@
     RECT rect;
     LRESULT lret;
 
-    TRACE("hwnd=%x msg=%x wparam=%x lParam=%lx, info_ptr=%p\n", 
+    TRACE("hwnd=%x msg=%x wparam=%x lParam=%lx, info_ptr=%p\n",
 	  hwnd, uMsg, wParam, lParam, infoPtr);
 
     if (!infoPtr) return 0;
@@ -1642,12 +1642,12 @@
 	    /* handle (ignore) the return character */
 	    if (wParam == VK_RETURN) return 0;
 	    /* all other characters pass into the real Edit */
-	    return CallWindowProcW (infoPtr->prevEditWndProc, 
+	    return CallWindowProcW (infoPtr->prevEditWndProc,
 				   hwnd, uMsg, wParam, lParam);
 
 	case WM_ERASEBKGND:
 	    /*
-	     * The following was determined by traces of the native 
+	     * The following was determined by traces of the native
 	     */
             hDC = (HDC) wParam;
 	    obkc = SetBkColor (hDC, GetSysColor (COLOR_WINDOW));
@@ -1656,7 +1656,7 @@
 		  rect.left, rect.top, rect.right, rect.bottom);
 	    ExtTextOutW (hDC, 0, 0, ETO_OPAQUE, &rect, 0, 0, 0);
             SetBkColor (hDC, obkc);
-	    return CallWindowProcW (infoPtr->prevEditWndProc, 
+	    return CallWindowProcW (infoPtr->prevEditWndProc,
 				   hwnd, uMsg, wParam, lParam);
 
 	case WM_KEYDOWN: {
@@ -1671,7 +1671,7 @@
 		 *   GetWindowTextA(Edit,&?, 0x104)             x
 		 *   CB_GETCURSEL to Combo rets -1              x
 		 *   WM_NOTIFY to COMBOEX parent (rebar)        x
-		 *     (CBEN_ENDEDIT{A|W} 
+		 *     (CBEN_ENDEDIT{A|W}
 		 *      fChanged = FALSE                        x
 		 *      inewSelection = -1                      x
 		 *      txt="www.hoho"                          x
@@ -1700,9 +1700,9 @@
 		    ERR("item %d not found. Problem!\n", oldItem);
 		    break;
 		}
-		infoPtr->selected = oldItem;		  
+		infoPtr->selected = oldItem;
 		COMBOEX_SetEditText (infoPtr, item);
-		RedrawWindow (infoPtr->hwndCombo, 0, 0, RDW_ERASE | 
+		RedrawWindow (infoPtr->hwndCombo, 0, 0, RDW_ERASE |
 			      RDW_INVALIDATE);
 		break;
 
@@ -1712,9 +1712,9 @@
 		 *   GetWindowTextA(Edit,&?, 0x104)             x
 		 *   CB_GETCURSEL to Combo  rets -1             x
 		 *   CB_GETCOUNT to Combo  rets 0
-		 *   if >0 loop 
+		 *   if >0 loop
 		 *       CB_GETITEMDATA to match
-		 * *** above 3 lines simulated by FindItem      x  
+		 * *** above 3 lines simulated by FindItem      x
 		 *   WM_NOTIFY to COMBOEX parent (rebar)        x
 		 *     (CBEN_ENDEDIT{A|W}                       x
 		 *        fChanged = TRUE (-1)                  x
@@ -1749,20 +1749,20 @@
 		}
 
 		cbeend.iNewSelection = selected;
-		cbeend.fChanged = TRUE; 
+		cbeend.fChanged = TRUE;
 		cbeend.iWhy = CBENF_RETURN;
 		if (COMBOEX_NotifyEndEdit (infoPtr, &cbeend, edit_text)) {
 		    /* abort the change, restore previous */
 		    TRACE("Notify requested abort of change\n");
 		    COMBOEX_SetEditText (infoPtr, infoPtr->edit);
-		    RedrawWindow (infoPtr->hwndCombo, 0, 0, RDW_ERASE | 
+		    RedrawWindow (infoPtr->hwndCombo, 0, 0, RDW_ERASE |
 				  RDW_INVALIDATE);
 		    return 0;
 		}
 		oldItem = SendMessageW (infoPtr->hwndCombo,CB_GETCURSEL, 0, 0);
 		if (oldItem != -1) {
 		    /* if something is selected, then deselect it */
-		    SendMessageW (infoPtr->hwndCombo, CB_SETCURSEL, 
+		    SendMessageW (infoPtr->hwndCombo, CB_SETCURSEL,
 				  (WPARAM)-1, 0);
 		}
 		InvalidateRect (infoPtr->hwndCombo, 0, 0);
@@ -1786,13 +1786,13 @@
 
 	case WM_SETFOCUS:
 	    /* remember the focus to set state of icon */
-	    lret = CallWindowProcW (infoPtr->prevEditWndProc, 
+	    lret = CallWindowProcW (infoPtr->prevEditWndProc,
 				   hwnd, uMsg, wParam, lParam);
 	    infoPtr->flags |= WCBE_EDITFOCUSED;
 	    return lret;
 
 	case WM_KILLFOCUS:
-	    /* 
+	    /*
 	     * do NOTIFY CBEN_ENDEDIT with CBENF_KILLFOCUS
 	     */
 	    infoPtr->flags &= ~WCBE_EDITFOCUSED;
@@ -1810,7 +1810,7 @@
 	    /* fall through */
 
 	default:
-	    return CallWindowProcW (infoPtr->prevEditWndProc, 
+	    return CallWindowProcW (infoPtr->prevEditWndProc,
 				   hwnd, uMsg, wParam, lParam);
     }
     return 0;
@@ -1830,7 +1830,7 @@
     RECT rect;
     WCHAR edit_text[260];
 
-    TRACE("hwnd=%x msg=%x wparam=%x lParam=%lx, info_ptr=%p\n", 
+    TRACE("hwnd=%x msg=%x wparam=%x lParam=%lx, info_ptr=%p\n",
 	  hwnd, uMsg, wParam, lParam, infoPtr);
 
     if (!infoPtr) return 0;
@@ -1848,12 +1848,12 @@
 	     * that ComboEx knows this is listbox.
 	     */
 	    ((DRAWITEMSTRUCT *)lParam)->itemState |= ODS_COMBOEXLBOX;
-	    return CallWindowProcW (infoPtr->prevComboWndProc, 
+	    return CallWindowProcW (infoPtr->prevComboWndProc,
 				   hwnd, uMsg, wParam, lParam);
 
     case WM_ERASEBKGND:
 	    /*
-	     * The following was determined by traces of the native 
+	     * The following was determined by traces of the native
 	     */
             hDC = (HDC) wParam;
 	    obkc = SetBkColor (hDC, GetSysColor (COLOR_WINDOW));
@@ -1862,7 +1862,7 @@
 		  rect.left, rect.top, rect.right, rect.bottom);
 	    ExtTextOutW (hDC, 0, 0, ETO_OPAQUE, &rect, 0, 0, 0);
             SetBkColor (hDC, obkc);
-	    return CallWindowProcW (infoPtr->prevComboWndProc, 
+	    return CallWindowProcW (infoPtr->prevComboWndProc,
 				   hwnd, uMsg, wParam, lParam);
 
     case WM_SETCURSOR:
@@ -1877,7 +1877,7 @@
 	    nmmse.pt.y = 0;
 	    nmmse.dwHitInfo = lParam;
 	    COMBOEX_Notify (infoPtr, NM_SETCURSOR, (NMHDR *)&nmmse);
-	    return CallWindowProcW (infoPtr->prevComboWndProc, 
+	    return CallWindowProcW (infoPtr->prevComboWndProc,
 				   hwnd, uMsg, wParam, lParam);
 
     case WM_COMMAND:
@@ -1917,11 +1917,11 @@
 		InvalidateRect (infoPtr->hwndCombo, 0, 0);
 		if (focusedhwnd)
 		    SendMessageW (infoPtr->hwndCombo, WM_KILLFOCUS,
-				  (WPARAM)focusedhwnd, 0); 
+				  (WPARAM)focusedhwnd, 0);
 		return 0;
 
 	    case EN_SETFOCUS: {
-		/* 
+		/*
 		 * For EN_SETFOCUS this issues the same calls and messages
 		 *  as the native seems to do.
 		 *
@@ -1947,7 +1947,7 @@
 	        }
 
 	    case EN_CHANGE: {
-		/* 
+		/*
 		 * For EN_CHANGE this issues the same calls and messages
 		 *  as the native seems to do.
 		 */
@@ -2023,7 +2023,7 @@
 		break;
 	    }/* fall through */
     default:
-	    return CallWindowProcW (infoPtr->prevComboWndProc, 
+	    return CallWindowProcW (infoPtr->prevComboWndProc,
 				   hwnd, uMsg, wParam, lParam);
     }
     return 0;
@@ -2114,7 +2114,7 @@
 		  uMsg, wParam, lParam);
 
 /*   Combo messages OK to just forward to the regular COMBO */
-	case CB_GETCOUNT:        
+	case CB_GETCOUNT:
 	case CB_GETCURSEL:
 	case CB_GETDROPPEDSTATE:
         case CB_SETDROPPEDWIDTH:
@@ -2194,7 +2194,7 @@
     wndClass.hCursor       = LoadCursorW (0, IDC_ARROWW);
     wndClass.hbrBackground = (HBRUSH)(COLOR_WINDOW + 1);
     wndClass.lpszClassName = WC_COMBOBOXEXW;
- 
+
     RegisterClassW (&wndClass);
 }
 
diff --git a/dlls/comctl32/comctl32.h b/dlls/comctl32/comctl32.h
index d9da127..71b69fa 100644
--- a/dlls/comctl32/comctl32.h
+++ b/dlls/comctl32/comctl32.h
@@ -1,5 +1,5 @@
 /******************************************************************************
- * 
+ *
  * Common definitions (resource ids and global variables)
  *
  * Copyright 1999 Thuy Nguyen
@@ -93,7 +93,7 @@
 /* DragList icon */
 #define IDI_DRAGARROW                   150
 
-typedef struct 
+typedef struct
 {
     COLORREF clrBtnHighlight;       /* COLOR_BTNHIGHLIGHT                  */
     COLORREF clrBtnShadow;          /* COLOR_BTNSHADOW                     */
@@ -121,7 +121,7 @@
 INT  Str_GetPtrWtoA (LPCWSTR lpSrc, LPSTR lpDest, INT nMaxLen);
 BOOL Str_SetPtrAtoW (LPWSTR *lppDest, LPCSTR lpSrc);
 
-#define COMCTL32_VERSION_MINOR 0 
+#define COMCTL32_VERSION_MINOR 0
 #define WINE_FILEVERSION 5, COMCTL32_VERSION_MINOR, 0, 0
 #define WINE_FILEVERSIONSTR "5.00"
 
diff --git a/dlls/comctl32/comctl32undoc.c b/dlls/comctl32/comctl32undoc.c
index 2d843c2..2b97f91 100644
--- a/dlls/comctl32/comctl32undoc.c
+++ b/dlls/comctl32/comctl32undoc.c
@@ -273,7 +273,7 @@
 	    break;
 	}
 	nResult = (pfnCompare)(*pWork1, *pWork2, lParam);
-	TRACE("compare result=%d, dpa1.cnt=%d, dpa2.cnt=%d\n", 
+	TRACE("compare result=%d, dpa1.cnt=%d, dpa2.cnt=%d\n",
 	      nResult, nIndex, nCount);
 
 	if (nResult == 0)
@@ -522,7 +522,7 @@
      */
 
     /* open the sub key */
-    if ((err = RegOpenKeyExW( mp->extview.hKey, mp->extview.lpszSubKey, 
+    if ((err = RegOpenKeyExW( mp->extview.hKey, mp->extview.lpszSubKey,
 			      0, KEY_WRITE, &newkey))) {
 	/* not present - what to do ??? */
 	ERR("Can not open key, error=%d, attempting to create\n",
@@ -542,7 +542,7 @@
     }
     if (mp->wineFlags & WMRUF_CHANGED) {
 	mp->wineFlags &= ~WMRUF_CHANGED;
-	err = RegSetValueExA(newkey, "MRUList", 0, REG_SZ, 
+	err = RegSetValueExA(newkey, "MRUList", 0, REG_SZ,
 			     mp->realMRU, strlen(mp->realMRU) + 1);
 	if (err) {
 	    ERR("error saving MRUList, err=%d\n", err);
@@ -555,8 +555,8 @@
 	if (witem->itemFlag & WMRUIF_CHANGED) {
 	    witem->itemFlag &= ~WMRUIF_CHANGED;
 	    realname[0] = 'a' + i;
-	    err = RegSetValueExW(newkey, realname, 0, 
-				 (mp->extview.dwFlags & MRUF_BINARY_LIST) ? 
+	    err = RegSetValueExW(newkey, realname, 0,
+				 (mp->extview.dwFlags & MRUF_BINARY_LIST) ?
 				 REG_BINARY : REG_SZ,
 				 &witem->datastart, witem->size);
 	    if (err) {
@@ -601,7 +601,7 @@
 
 /**************************************************************************
  *                  FindMRUData [COMCTL32.169]
- * 
+ *
  * Searches binary list for item that matches lpData of length cbData.
  * Returns position in list order 0 -> MRU and if lpRegNum != NULL then value
  * corresponding to item's reg. name will be stored in it ('a' -> 0).
@@ -636,7 +636,7 @@
 
     for(i=0; i<mp->cursize; i++) {
 	if (mp->extview.dwFlags & MRUF_BINARY_LIST) {
-	    if (!mp->extview.lpfnCompare(lpData, &mp->array[i]->datastart, 
+	    if (!mp->extview.lpfnCompare(lpData, &mp->array[i]->datastart,
 					 cbData))
 		break;
 	}
@@ -678,7 +678,7 @@
 
 /**************************************************************************
  *              AddMRUData [COMCTL32.167]
- * 
+ *
  * Add item to MRU binary list.  If item already exists in list then it is
  * simply moved up to the top of the list and not added again.  If list is
  * full then the least recently used item is removed to make room.
@@ -718,7 +718,7 @@
     }
 
     /* Allocate space for new item and move in the data */
-    mp->array[replace] = witem = (LPWINEMRUITEM)COMCTL32_Alloc(cbData + 
+    mp->array[replace] = witem = (LPWINEMRUITEM)COMCTL32_Alloc(cbData +
 							       sizeof(WINEMRUITEM));
     witem->itemFlag |= WMRUIF_CHANGED;
     witem->size = cbData;
@@ -730,7 +730,7 @@
 	mp->realMRU[i] = mp->realMRU[i-1];
     }
     mp->realMRU[0] = replace + 'a';
-    TRACE("(%08x, %p, %ld) adding data, /%c/ now most current\n", 
+    TRACE("(%08x, %p, %ld) adding data, /%c/ now most current\n",
 	  hList, lpData, cbData, replace+'a');
     ret = replace;
 
@@ -744,7 +744,7 @@
 
 /**************************************************************************
  *              AddMRUStringW [COMCTL32.401]
- * 
+ *
  * Add item to MRU string list.  If item already exists in list them it is
  * simply moved up to the top of the list and not added again.  If list is
  * full then the least recently used item is removed to make room.
@@ -807,7 +807,7 @@
 
 /**************************************************************************
  *                  FindMRUStringA [COMCTL32.155]
- * 
+ *
  * Searches string list for item that matches lpszString.
  * Returns position in list order 0 -> MRU and if lpRegNum != NULL then value
  * corresponding to item's reg. name will be stored in it ('a' -> 0).
@@ -858,10 +858,10 @@
 					sizeof(LPVOID));
 
     /* open the sub key */
-    if ((err = RegCreateKeyExW( mp->extview.hKey, mp->extview.lpszSubKey, 
+    if ((err = RegCreateKeyExW( mp->extview.hKey, mp->extview.lpszSubKey,
 			        0,
 				emptyW,
-				REG_OPTION_NON_VOLATILE, 
+				REG_OPTION_NON_VOLATILE,
 				KEY_READ | KEY_WRITE,
                                 0,
 				&newkey,
@@ -877,7 +877,7 @@
     /* get values from key 'MRUList' */
     if (newkey) {
 	datasize = mp->extview.nMaxItems + 1;
-	if((err=RegQueryValueExA( newkey, "MRUList", 0, &type, mp->realMRU, 
+	if((err=RegQueryValueExA( newkey, "MRUList", 0, &type, mp->realMRU,
 				  &datasize))) {
 	    /* not present - set size to 1 (will become 0 later) */
 	    datasize = 1;
@@ -897,10 +897,10 @@
 		/* not present - what to do ??? */
 		ERR("Key %s not found 1\n", debugstr_w(realname));
 	    }
-	    mp->array[i] = witem = (LPWINEMRUITEM)COMCTL32_Alloc(datasize + 
+	    mp->array[i] = witem = (LPWINEMRUITEM)COMCTL32_Alloc(datasize +
 								 sizeof(WINEMRUITEM));
 	    witem->size = datasize;
-	    if(RegQueryValueExW( newkey, realname, 0, &type, 
+	    if(RegQueryValueExW( newkey, realname, 0, &type,
 				 &witem->datastart, &datasize)) {
 		/* not present - what to do ??? */
 		ERR("Key %s not found 2\n", debugstr_w(realname));
@@ -939,7 +939,7 @@
     strcpyW((LPWSTR)mp->extview.lpszSubKey, lpcml->lpszSubKey);
     mp->isUnicode = TRUE;
 
-    return CreateMRUListLazy_common(mp);   
+    return CreateMRUListLazy_common(mp);
 }
 
 /**************************************************************************
@@ -1008,7 +1008,7 @@
  *    string lists specifies full length of string.  Enumerating past the end
  *    of list returns -1.
  *    If lpBuffer == NULL or nItemPos is -ve return value is no. of items in
- *    the list. 
+ *    the list.
  */
 INT WINAPI EnumMRUListW(HANDLE hList, INT nItemPos, LPVOID lpBuffer,
 DWORD nBufferSize)
@@ -1023,16 +1023,16 @@
     desired -= 'a';
     TRACE("nItemPos=%d, desired=%d\n", nItemPos, desired);
     witem = mp->array[desired];
-    datasize = min( witem->size, nBufferSize ); 
+    datasize = min( witem->size, nBufferSize );
     memcpy( lpBuffer, &witem->datastart, datasize);
-    TRACE("(%08x, %d, %p, %ld): returning len=%d\n", 
+    TRACE("(%08x, %d, %p, %ld): returning len=%d\n",
 	  hList, nItemPos, lpBuffer, nBufferSize, datasize);
     return datasize;
 }
 
 /**************************************************************************
  *                EnumMRUListA [COMCTL32.154]
- * 
+ *
  */
 INT WINAPI EnumMRUListA(HANDLE hList, INT nItemPos, LPVOID lpBuffer,
 DWORD nBufferSize)
@@ -1049,7 +1049,7 @@
     TRACE("nItemPos=%d, desired=%d\n", nItemPos, desired);
     witem = mp->array[desired];
     if(mp->extview.dwFlags & MRUF_BINARY_LIST) {
-        datasize = min( witem->size, nBufferSize ); 
+        datasize = min( witem->size, nBufferSize );
 	memcpy( lpBuffer, &witem->datastart, datasize);
     } else {
         lenA = WideCharToMultiByte(CP_ACP, 0, (LPWSTR)&witem->datastart, -1,
@@ -1058,11 +1058,11 @@
 	WideCharToMultiByte(CP_ACP, 0, (LPWSTR)&witem->datastart, -1,
 			    lpBuffer, datasize, NULL, NULL);
     }
-    TRACE("(%08x, %d, %p, %ld): returning len=%d\n", 
+    TRACE("(%08x, %d, %p, %ld): returning len=%d\n",
 	  hList, nItemPos, lpBuffer, nBufferSize, datasize);
     return datasize;
 }
-  
+
 
 /**************************************************************************
  * Str_GetPtrA [COMCTL32.233]
@@ -1118,7 +1118,7 @@
 Str_SetPtrA (LPSTR *lppDest, LPCSTR lpSrc)
 {
     TRACE("(%p %p)\n", lppDest, lpSrc);
- 
+
     if (lpSrc) {
 	LPSTR ptr = COMCTL32_ReAlloc (*lppDest, strlen (lpSrc) + 1);
 	if (!ptr)
@@ -1191,7 +1191,7 @@
 Str_SetPtrW (LPWSTR *lppDest, LPCWSTR lpSrc)
 {
     TRACE("(%p %p)\n", lppDest, lpSrc);
- 
+
     if (lpSrc) {
 	INT len = strlenW (lpSrc) + 1;
 	LPWSTR ptr = COMCTL32_ReAlloc (*lppDest, len * sizeof(WCHAR));
@@ -1363,7 +1363,7 @@
 
 
 /**************************************************************************
- * DSA_GetItem [COMCTL32.322] 
+ * DSA_GetItem [COMCTL32.322]
  *
  * PARAMS
  *     hdsa   [I] pointer to the array control structure
@@ -1381,7 +1381,7 @@
     LPVOID pSrc;
 
     TRACE("(%p %d %p)\n", hdsa, nIndex, pDest);
-    
+
     if (!hdsa)
 	return FALSE;
     if ((nIndex < 0) || (nIndex >= hdsa->nItemCount))
@@ -1395,7 +1395,7 @@
 
 
 /**************************************************************************
- * DSA_GetItemPtr [COMCTL32.323] 
+ * DSA_GetItemPtr [COMCTL32.323]
  *
  * Retrieves a pointer to the specified item.
  *
@@ -1421,7 +1421,7 @@
 	return NULL;
 
     pSrc = (char *) hdsa->pData + (hdsa->nItemSize * nIndex);
-    
+
     TRACE("-- ret=%p\n", pSrc);
 
     return pSrc;
@@ -1429,7 +1429,7 @@
 
 
 /**************************************************************************
- * DSA_SetItem [COMCTL32.325] 
+ * DSA_SetItem [COMCTL32.325]
  *
  * Sets the contents of an item in the array.
  *
@@ -1448,12 +1448,12 @@
 {
     INT  nSize, nNewItems;
     LPVOID pDest, lpTemp;
-    
+
     TRACE("(%p %d %p)\n", hdsa, nIndex, pSrc);
 
     if ((!hdsa) || nIndex < 0)
 	return FALSE;
-      
+
     if (hdsa->nItemCount <= nIndex) {
 	/* within the old array */
 	if (hdsa->nMaxCount > nIndex) {
@@ -1473,7 +1473,7 @@
 	    hdsa->nMaxCount = nNewItems;
 	    hdsa->nItemCount = nIndex + 1;
 	    hdsa->pData = lpTemp;
-	}    
+	}
     }
 
     /* put the new entry in */
@@ -1487,7 +1487,7 @@
 
 
 /**************************************************************************
- * DSA_InsertItem [COMCTL32.324] 
+ * DSA_InsertItem [COMCTL32.324]
  *
  * PARAMS
  *     hdsa   [I] pointer to the array control structure
@@ -1504,7 +1504,7 @@
 {
     INT   nNewItems, nSize;
     LPVOID  lpTemp, lpDest;
-    
+
     TRACE("(%p %d %p)\n", hdsa, nIndex, pSrc);
 
     if ((!hdsa) || nIndex < 0)
@@ -1524,7 +1524,7 @@
 	    return -1;
 
 	hdsa->nMaxCount = nNewItems;
-	hdsa->pData = lpTemp;         
+	hdsa->pData = lpTemp;
     }
 
     /* do we need to move elements ? */
@@ -1549,7 +1549,7 @@
 
 
 /**************************************************************************
- * DSA_DeleteItem [COMCTL32.326] 
+ * DSA_DeleteItem [COMCTL32.326]
  *
  * PARAMS
  *     hdsa   [I] pointer to the array control structure
@@ -1565,7 +1565,7 @@
 {
     LPVOID lpDest,lpSrc;
     INT  nSize;
-    
+
     TRACE("(%p %d)\n", hdsa, nIndex);
 
     if (!hdsa)
@@ -1582,9 +1582,9 @@
 	       lpDest, lpSrc, nSize);
 	memmove (lpDest, lpSrc, nSize);
     }
-    
+
     hdsa->nItemCount--;
-    
+
     /* free memory ? */
     if ((hdsa->nMaxCount - hdsa->nItemCount) >= hdsa->nGrow) {
 	nSize = hdsa->nItemSize * hdsa->nItemCount;
@@ -1619,7 +1619,7 @@
 {
     TRACE("(%p)\n", hdsa);
 
-    if (!hdsa) 
+    if (!hdsa)
 	return FALSE;
     if (hdsa->pData && (!COMCTL32_Free (hdsa->pData)))
 	return FALSE;
@@ -1949,12 +1949,12 @@
 DPA_SetPtr (const HDPA hdpa, INT i, LPVOID p)
 {
     LPVOID *lpTemp;
-    
+
     TRACE("(%p %d %p)\n", hdpa, i, p);
 
     if ((!hdpa) || i < 0)
 	return FALSE;
-      
+
     if (hdpa->nItemCount <= i) {
 	/* within the old array */
 	if (hdpa->nMaxCount > i) {
@@ -1973,8 +1973,8 @@
 		return FALSE;
 
 	    hdpa->nItemCount = nNewItems;
-	    hdpa->ptrs = lpTemp;        
-	}    
+	    hdpa->ptrs = lpTemp;
+	}
     }
 
     /* put the new entry in */
@@ -2003,7 +2003,7 @@
 {
     LPVOID *lpDest, *lpSrc, lpTemp = NULL;
     INT  nSize;
-    
+
     TRACE("(%p %d)\n", hdpa, i);
 
     if ((!hdpa) || i < 0 || i >= hdpa->nItemCount)
@@ -2020,9 +2020,9 @@
 	       lpDest, lpSrc, nSize);
 	memmove (lpDest, lpSrc, nSize);
     }
-    
+
     hdpa->nItemCount --;
-    
+
     /* free memory ?*/
     if ((hdpa->nMaxCount - hdpa->nItemCount) >= hdpa->nGrow) {
 	INT nNewItems = max(hdpa->nGrow * 2, hdpa->nItemCount);
@@ -2033,7 +2033,7 @@
 	    return NULL;
 
 	hdpa->nMaxCount = nNewItems;
-	hdpa->ptrs = (LPVOID*)lpDest;         
+	hdpa->ptrs = (LPVOID*)lpDest;
     }
 
     return lpTemp;
@@ -2058,7 +2058,7 @@
 {
     TRACE("(%p)\n", hdpa);
 
-    if (!hdpa) 
+    if (!hdpa)
 	return FALSE;
 
     if (hdpa->ptrs && (!HeapFree (hdpa->hHeap, 0, hdpa->ptrs)))
@@ -2097,7 +2097,7 @@
     LPVOID t;
 
     TRACE("l=%i r=%i\n", l, r);
- 
+
     if (l==r)    /* one element is always sorted */
         return;
     if (r<l)     /* oops, got it in the wrong order */
@@ -2110,7 +2110,7 @@
     DPA_QuickSort(lpPtrs, m+1, r, pfnCompare, lParam);
 
     /* join the two sides */
-    while( (l<=m) && (m<r) ) 
+    while( (l<=m) && (m<r) )
     {
         if(pfnCompare(lpPtrs[l],lpPtrs[m+1],lParam)>0)
         {
@@ -2228,7 +2228,7 @@
 	INT  nIndex;
 
 	TRACE("linear search\n");
-	
+
 	nIndex = (nStart == -1)? 0 : nStart;
 	lpPtr = hdpa->ptrs;
 	for (; nIndex < hdpa->nItemCount; nIndex++) {
@@ -2493,7 +2493,7 @@
  * PARAMS
  *     hdpa     [I] handle to the dynamic pointer array
  *     enumProc [I]
- *     lParam   [I] 
+ *     lParam   [I]
  *
  * RETURNS
  *     none
@@ -2674,7 +2674,7 @@
         if (*lpStart != LOBYTE(wMatch)) continue;
         if (dbcs && lpStart[1] != HIBYTE(wMatch)) continue;
         lpGotIt = lpStart;
-    }    
+    }
     return (LPSTR)lpGotIt;
 }
 
@@ -2728,7 +2728,7 @@
   for(; (*lpLoop != 0); lpLoop++)
     if( strchrW(lpSet, *(WORD*)lpLoop))
       return (INT)(lpLoop-lpStr);
-  
+
   return (INT)(lpLoop-lpStr);
 }
 
diff --git a/dlls/comctl32/commctrl.c b/dlls/comctl32/commctrl.c
index 286fa69..7b36120 100644
--- a/dlls/comctl32/commctrl.c
+++ b/dlls/comctl32/commctrl.c
@@ -1,4 +1,4 @@
-/*		
+/*
  * Common controls functions
  *
  * Copyright 1997 Dimitrie O. Paun
@@ -274,7 +274,7 @@
 
 
 /***********************************************************************
- * ShowHideMenuCtl [COMCTL32.3] 
+ * ShowHideMenuCtl [COMCTL32.3]
  *
  * Shows or hides controls and updates the corresponding menu item.
  *
@@ -497,9 +497,9 @@
 HWND WINAPI
 CreateStatusWindowA (INT style, LPCSTR text, HWND parent, UINT wid)
 {
-    return CreateWindowA(STATUSCLASSNAMEA, text, style, 
+    return CreateWindowA(STATUSCLASSNAMEA, text, style,
 			   CW_USEDEFAULT, CW_USEDEFAULT,
-			   CW_USEDEFAULT, CW_USEDEFAULT, 
+			   CW_USEDEFAULT, CW_USEDEFAULT,
 			   parent, wid, 0, 0);
 }
 
@@ -561,7 +561,7 @@
     if (hUD) {
 	SendMessageA (hUD, UDM_SETBUDDY, buddy, 0);
 	SendMessageA (hUD, UDM_SETRANGE, 0, MAKELONG(maxVal, minVal));
-	SendMessageA (hUD, UDM_SETPOS, 0, MAKELONG(curVal, 0));     
+	SendMessageA (hUD, UDM_SETPOS, 0, MAKELONG(curVal, 0));
     }
 
     return hUD;
@@ -936,7 +936,7 @@
  */
 HRESULT WINAPI COMCTL32_DllInstall(BOOL bInstall, LPCWSTR cmdline)
 {
-  FIXME("(%s, %s): stub\n", bInstall?"TRUE":"FALSE", 
+  FIXME("(%s, %s): stub\n", bInstall?"TRUE":"FALSE",
 	debugstr_w(cmdline));
 
   return S_OK;
diff --git a/dlls/comctl32/datetime.c b/dlls/comctl32/datetime.c
index e620dea..7d08b2d 100644
--- a/dlls/comctl32/datetime.c
+++ b/dlls/comctl32/datetime.c
@@ -55,7 +55,7 @@
 	int haveFocus;
 	int *fieldspec;
 	RECT *fieldRect;
-	int  *buflen;		
+	int  *buflen;
 	char textbuf[256];
         POINT monthcal_pos;
 } DATETIME_INFO, *LPDATETIME_INFO;
@@ -65,12 +65,12 @@
 
 /* this list of defines is closely related to `allowedformatchars' defined
  * in datetime.c; the high nibble indicates the `base type' of the format
- * specifier. 
+ * specifier.
  * Do not change without first reading DATETIME_UseFormat.
- * 
+ *
  */
 
-#define DT_END_FORMAT      0 
+#define DT_END_FORMAT      0
 #define ONEDIGITDAY   	0x01
 #define TWODIGITDAY   	0x02
 #define THREECHARDAY  	0x03
@@ -122,7 +122,7 @@
   TRACE("%04x %08lx\n",wParam,lParam);
   if (!lParam) return GDT_NONE;
 
-  if ((dwStyle & DTS_SHOWNONE) && 
+  if ((dwStyle & DTS_SHOWNONE) &&
        (SendMessageA (infoPtr->hwndCheckbut, BM_GETCHECK, 0, 0)))
         return GDT_NONE;
 
@@ -141,7 +141,7 @@
   TRACE("%04x %08lx\n",wParam,lParam);
   if (!lParam) return 0;
 
-  if (lParam==GDT_VALID) 
+  if (lParam==GDT_VALID)
   	MONTHCAL_CopyTime (lprgSysTimeArray, &infoPtr->date);
   if (lParam==GDT_NONE) {
 	infoPtr->dateValid=FALSE;
@@ -225,20 +225,20 @@
 }
 
 
-/* 
-   Split up a formattxt in actions. 
+/*
+   Split up a formattxt in actions.
    See ms documentation for the meaning of the letter codes/'specifiers'.
 
-   Notes: 
+   Notes:
    *'dddddd' is handled as 'dddd' plus 'dd'.
-   *unrecognized formats are strings (here given the type DT_STRING; 
+   *unrecognized formats are strings (here given the type DT_STRING;
    start of the string is encoded in lower bits of DT_STRING.
    Therefore, 'string' ends finally up as '<show seconds>tring'.
 
  */
 
 
-static void 
+static void
 DATETIME_UseFormat (DATETIME_INFO *infoPtr, const char *formattxt)
 {
  int i,j,k,len;
@@ -255,20 +255,20 @@
  for (i=0; i<strlen (formattxt); i++)  {
 	TRACE ("\n%d %c:",i, formattxt[i]);
  	for (j=0; j<len; j++) {
- 		if (allowedformatchars[j]==formattxt[i]) {   
+ 		if (allowedformatchars[j]==formattxt[i]) {
 			TRACE ("%c[%d,%x]",allowedformatchars[j], *nrFields,
 							 infoPtr->fieldspec[*nrFields]);
 			if ((*nrFields==0) && (infoPtr->fieldspec[*nrFields]==0)) {
 				infoPtr->fieldspec[*nrFields]=(j<<4) +1;
 				break;
 			}
-			if (infoPtr->fieldspec[*nrFields]>>4!=j) {   
-				(*nrFields)++;	
+			if (infoPtr->fieldspec[*nrFields]>>4!=j) {
+				(*nrFields)++;
 				infoPtr->fieldspec[*nrFields]=(j<<4) +1;
 				break;
 			}
 			if ((infoPtr->fieldspec[*nrFields] & 0x0f)==maxrepetition[j]) {
-				(*nrFields)++;	
+				(*nrFields)++;
 				infoPtr->fieldspec[*nrFields]=(j<<4) +1;
 				break;
 			}
@@ -283,12 +283,12 @@
 		if ((*nrFields==0) && (infoPtr->fieldspec[*nrFields]==0)) {
 			infoPtr->fieldspec[*nrFields]=DT_STRING+k;
 			infoPtr->buflen[*nrFields]=0;
-        } else 
+        } else
 		if ((infoPtr->fieldspec[*nrFields] & DT_STRING)!=DT_STRING)  {
 			(*nrFields)++;
 			infoPtr->fieldspec[*nrFields]=DT_STRING+k;
 			infoPtr->buflen[*nrFields]=0;
-		} 
+		}
 		infoPtr->textbuf[k]=formattxt[i];
 		k++;
 		infoPtr->buflen[*nrFields]++;
@@ -306,7 +306,7 @@
 }
 
 
-static LRESULT 
+static LRESULT
 DATETIME_SetFormat (HWND hwnd, WPARAM wParam, LPARAM lParam)
 {
  DATETIME_INFO *infoPtr= DATETIME_GetInfoPtr (hwnd);
@@ -317,15 +317,15 @@
  if (!lParam) {
   	DWORD dwStyle = GetWindowLongA (hwnd, GWL_STYLE);
 
-	if (dwStyle & DTS_LONGDATEFORMAT) 
+	if (dwStyle & DTS_LONGDATEFORMAT)
 		format_item=LOCALE_SLONGDATE;
-	else if (dwStyle & DTS_TIMEFORMAT) 
+	else if (dwStyle & DTS_TIMEFORMAT)
 		format_item=LOCALE_STIMEFORMAT;
         else /* DTS_SHORTDATEFORMAT */
 		format_item=LOCALE_SSHORTDATE;
 	GetLocaleInfoA( GetSystemDefaultLCID(), format_item,format_buf,sizeof(format_buf));
 	DATETIME_UseFormat (infoPtr, format_buf);
- } 	
+ }
  else
  	DATETIME_UseFormat (infoPtr, (char *) lParam);
 
@@ -333,7 +333,7 @@
 }
 
 
-static LRESULT 
+static LRESULT
 DATETIME_SetFormatW (HWND hwnd, WPARAM wParam, LPARAM lParam)
 
 {
@@ -348,14 +348,14 @@
 	retval=DATETIME_SetFormat (hwnd, 0, (LPARAM) buf);
 	COMCTL32_Free (buf);
 	return retval;
- } 
+ }
  else
 	return DATETIME_SetFormat (hwnd, 0, 0);
 
 }
 
 
-static void 
+static void
 DATETIME_ReturnTxt (DATETIME_INFO *infoPtr, int count, char *result)
 {
  SYSTEMTIME date = infoPtr->date;
@@ -370,7 +370,7 @@
  }
 
  if (!infoPtr->fieldspec) return;
- 
+
  spec=infoPtr->fieldspec[count];
  if (spec & DT_STRING) {
 	int txtlen=infoPtr->buflen[count];
@@ -381,18 +381,18 @@
 	return;
  }
 
-		
+
  switch (spec) {
-	case DT_END_FORMAT: 
+	case DT_END_FORMAT:
 		*result=0;
 		break;
-	case ONEDIGITDAY: 
+	case ONEDIGITDAY:
 		sprintf (result,"%d",date.wDay);
 	 	break;
-	case TWODIGITDAY: 
+	case TWODIGITDAY:
 		sprintf (result,"%.2d",date.wDay);
 		break;
-	case THREECHARDAY: 
+	case THREECHARDAY:
 	        GetLocaleInfoA( LOCALE_USER_DEFAULT, LOCALE_SABBREVDAYNAME1+(date.wDayOfWeek+6)%7,
 				result,4);
 		/*sprintf (result,"%.3s",days[date.wDayOfWeek]);*/
@@ -402,83 +402,83 @@
 				buffer,sizeof(buffer));
 		strcpy  (result,buffer);
 		break;
-	case ONEDIGIT12HOUR: 
-		if (date.wHour>12) 
+	case ONEDIGIT12HOUR:
+		if (date.wHour>12)
 			sprintf (result,"%d",date.wHour-12);
-		else 
+		else
 			sprintf (result,"%d",date.wHour);
 		break;
-	case TWODIGIT12HOUR: 
-		if (date.wHour>12) 
+	case TWODIGIT12HOUR:
+		if (date.wHour>12)
 			sprintf (result,"%.2d",date.wHour-12);
-		else 
+		else
 			sprintf (result,"%.2d",date.wHour);
 		break;
-	case ONEDIGIT24HOUR: 
+	case ONEDIGIT24HOUR:
 		sprintf (result,"%d",date.wHour);
 		break;
-	case TWODIGIT24HOUR: 
+	case TWODIGIT24HOUR:
 		sprintf (result,"%.2d",date.wHour);
 		break;
-	case ONEDIGITSECOND: 
+	case ONEDIGITSECOND:
 		sprintf (result,"%d",date.wSecond);
 		break;
-	case TWODIGITSECOND: 
+	case TWODIGITSECOND:
 		sprintf (result,"%.2d",date.wSecond);
 		break;
-	case ONEDIGITMINUTE: 
+	case ONEDIGITMINUTE:
 		sprintf (result,"%d",date.wMinute);
 		break;
-	case TWODIGITMINUTE: 
+	case TWODIGITMINUTE:
 		sprintf (result,"%.2d",date.wMinute);
 		break;
-	case ONEDIGITMONTH: 
+	case ONEDIGITMONTH:
 		sprintf (result,"%d",date.wMonth);
 	 	break;
-	case TWODIGITMONTH: 
+	case TWODIGITMONTH:
 		sprintf (result,"%.2d",date.wMonth);
 		break;
-	case THREECHARMONTH: 
+	case THREECHARMONTH:
 		GetLocaleInfoA( GetSystemDefaultLCID(),LOCALE_SMONTHNAME1+date.wMonth -1,
 		  buffer,sizeof(buffer));
 		sprintf (result,"%.3s",buffer);
 		break;
-	case FULLMONTH:   
+	case FULLMONTH:
 		GetLocaleInfoA( GetSystemDefaultLCID(),LOCALE_SMONTHNAME1+date.wMonth -1,
 		  result,sizeof(result));
 		break;
-	case ONELETTERAMPM:   
-		if (date.wHour<12) 
+	case ONELETTERAMPM:
+		if (date.wHour<12)
 			strcpy (result,"A");
-		else 
+		else
 			strcpy (result,"P");
 		break;
-	case TWOLETTERAMPM:   
-		if (date.wHour<12) 
+	case TWOLETTERAMPM:
+		if (date.wHour<12)
 			strcpy (result,"AM");
-		else 
+		else
 			strcpy (result,"PM");
 		break;
-	case FORMATCALLBACK:   
+	case FORMATCALLBACK:
 		FIXME ("Not implemented\n");
 		strcpy (result,"xxx");
 		break;
-	case ONEDIGITYEAR: 
+	case ONEDIGITYEAR:
 		sprintf (result,"%d",date.wYear-10* (int) floor(date.wYear/10));
 	 	break;
-	case TWODIGITYEAR: 
+	case TWODIGITYEAR:
 		sprintf (result,"%.2d",date.wYear-100* (int) floor(date.wYear/100));
 		break;
-	case FULLYEAR:   
+	case FULLYEAR:
 		sprintf (result,"%d",date.wYear);
 		break;
     }
-	
+
 	TRACE ("arg%d=%x->[%s]\n",count,infoPtr->fieldspec[count],result);
 }
 
 
-static void 
+static void
 DATETIME_IncreaseField (DATETIME_INFO *infoPtr, int number)
 {
  SYSTEMTIME *date = &infoPtr->date;
@@ -489,53 +489,53 @@
 
  spec=infoPtr->fieldspec[number];
  if ((spec & DTHT_DATEFIELD)==0) return;
-		
+
  switch (spec) {
-	case ONEDIGITDAY: 
-	case TWODIGITDAY: 
-	case THREECHARDAY: 
+	case ONEDIGITDAY:
+	case TWODIGITDAY:
+	case THREECHARDAY:
 	case FULLDAY:
 		date->wDay++;
 		if (date->wDay>MONTHCAL_MonthLength(date->wMonth,date->wYear))
-		  date->wDay=1;	
+		  date->wDay=1;
 		break;
-	case ONEDIGIT12HOUR: 
-	case TWODIGIT12HOUR: 
-	case ONEDIGIT24HOUR: 
-	case TWODIGIT24HOUR: 
+	case ONEDIGIT12HOUR:
+	case TWODIGIT12HOUR:
+	case ONEDIGIT24HOUR:
+	case TWODIGIT24HOUR:
 		date->wHour++;
 		if (date->wHour>23) date->wHour=0;
 		break;
-	case ONEDIGITSECOND: 
-	case TWODIGITSECOND: 
+	case ONEDIGITSECOND:
+	case TWODIGITSECOND:
 		date->wSecond++;
 		if (date->wSecond>59) date->wSecond=0;
 		break;
-	case ONEDIGITMINUTE: 
-	case TWODIGITMINUTE: 
+	case ONEDIGITMINUTE:
+	case TWODIGITMINUTE:
 		date->wMinute++;
 		if (date->wMinute>59) date->wMinute=0;
 		break;
-	case ONEDIGITMONTH: 
-	case TWODIGITMONTH: 
-	case THREECHARMONTH: 
-	case FULLMONTH:   
+	case ONEDIGITMONTH:
+	case TWODIGITMONTH:
+	case THREECHARMONTH:
+	case FULLMONTH:
 		date->wMonth++;
 		if (date->wMonth>12) date->wMonth=1;
-		if (date->wDay>MONTHCAL_MonthLength(date->wMonth,date->wYear)) 
+		if (date->wDay>MONTHCAL_MonthLength(date->wMonth,date->wYear))
 			date->wDay=MONTHCAL_MonthLength(date->wMonth,date->wYear);
 		break;
-	case ONELETTERAMPM:   
-	case TWOLETTERAMPM:   
+	case ONELETTERAMPM:
+	case TWOLETTERAMPM:
 		date->wHour+=12;
 		if (date->wHour>23) date->wHour-=24;
 		break;
-	case FORMATCALLBACK:   
+	case FORMATCALLBACK:
 		FIXME ("Not implemented\n");
 		break;
-	case ONEDIGITYEAR: 
-	case TWODIGITYEAR: 
-	case FULLYEAR:   
+	case ONEDIGITYEAR:
+	case TWODIGITYEAR:
+	case FULLYEAR:
 		date->wYear++;
 		break;
 	}
@@ -543,7 +543,7 @@
 }
 
 
-static void 
+static void
 DATETIME_DecreaseField (DATETIME_INFO *infoPtr, int number)
 {
  SYSTEMTIME *date = & infoPtr->date;
@@ -554,65 +554,65 @@
 
  spec = infoPtr->fieldspec[number];
  if ((spec & DTHT_DATEFIELD)==0) return;
-		
+
  TRACE ("%x\n",spec);
 
  switch (spec) {
-	case ONEDIGITDAY: 
-	case TWODIGITDAY: 
-	case THREECHARDAY: 
+	case ONEDIGITDAY:
+	case TWODIGITDAY:
+	case THREECHARDAY:
 	case FULLDAY:
 		date->wDay--;
-		if (date->wDay<1) 
+		if (date->wDay<1)
 		  date->wDay=MONTHCAL_MonthLength(date->wMonth,date->wYear);
 		break;
-	case ONEDIGIT12HOUR: 
-	case TWODIGIT12HOUR: 
-	case ONEDIGIT24HOUR: 
-	case TWODIGIT24HOUR: 
-		if (date->wHour) 
+	case ONEDIGIT12HOUR:
+	case TWODIGIT12HOUR:
+	case ONEDIGIT24HOUR:
+	case TWODIGIT24HOUR:
+		if (date->wHour)
 			date->wHour--;
 		else
 			date->wHour=23;
 		break;
-	case ONEDIGITSECOND: 
-	case TWODIGITSECOND: 
-		if (date->wHour) 
+	case ONEDIGITSECOND:
+	case TWODIGITSECOND:
+		if (date->wHour)
 			date->wSecond--;
 		else
 			date->wHour=59;
 		break;
-	case ONEDIGITMINUTE: 
-	case TWODIGITMINUTE: 
-		if (date->wMinute) 
+	case ONEDIGITMINUTE:
+	case TWODIGITMINUTE:
+		if (date->wMinute)
 			date->wMinute--;
 		else
 			date->wMinute=59;
 		break;
-	case ONEDIGITMONTH: 
-	case TWODIGITMONTH: 
-	case THREECHARMONTH: 
-	case FULLMONTH:   
-		if (date->wMonth>1) 
+	case ONEDIGITMONTH:
+	case TWODIGITMONTH:
+	case THREECHARMONTH:
+	case FULLMONTH:
+		if (date->wMonth>1)
 			date->wMonth--;
 		else
 			date->wMonth=12;
-		if (date->wDay>MONTHCAL_MonthLength(date->wMonth,date->wYear)) 
+		if (date->wDay>MONTHCAL_MonthLength(date->wMonth,date->wYear))
 			date->wDay=MONTHCAL_MonthLength(date->wMonth,date->wYear);
 		break;
-	case ONELETTERAMPM:   
-	case TWOLETTERAMPM:   
-		if (date->wHour<12) 
+	case ONELETTERAMPM:
+	case TWOLETTERAMPM:
+		if (date->wHour<12)
 			date->wHour+=12;
 		else
 			date->wHour-=12;
 		break;
-	case FORMATCALLBACK:   
+	case FORMATCALLBACK:
 		FIXME ("Not implemented\n");
 		break;
-	case ONEDIGITYEAR: 
-	case TWODIGITYEAR: 
-	case FULLYEAR:   
+	case ONEDIGITYEAR:
+	case TWODIGITYEAR:
+	case FULLYEAR:
 		date->wYear--;
 		break;
 	}
@@ -620,7 +620,7 @@
 }
 
 
-static void 
+static void
 DATETIME_ResetFieldDown (DATETIME_INFO *infoPtr, int number)
 {
  SYSTEMTIME *date = &infoPtr->date;
@@ -631,47 +631,47 @@
 
  spec = infoPtr->fieldspec[number];
  if ((spec & DTHT_DATEFIELD)==0) return;
-		
+
 
  switch (spec) {
-	case ONEDIGITDAY: 
-	case TWODIGITDAY: 
-	case THREECHARDAY: 
+	case ONEDIGITDAY:
+	case TWODIGITDAY:
+	case THREECHARDAY:
 	case FULLDAY:
 		date->wDay = 1;
 		break;
-	case ONEDIGIT12HOUR: 
-	case TWODIGIT12HOUR: 
-	case ONEDIGIT24HOUR: 
-	case TWODIGIT24HOUR: 
-	case ONELETTERAMPM:   
-	case TWOLETTERAMPM:   
+	case ONEDIGIT12HOUR:
+	case TWODIGIT12HOUR:
+	case ONEDIGIT24HOUR:
+	case TWODIGIT24HOUR:
+	case ONELETTERAMPM:
+	case TWOLETTERAMPM:
 		date->wHour = 0;
 		break;
-	case ONEDIGITSECOND: 
-	case TWODIGITSECOND: 
+	case ONEDIGITSECOND:
+	case TWODIGITSECOND:
 		date->wSecond = 0;
 		break;
-	case ONEDIGITMINUTE: 
-	case TWODIGITMINUTE: 
+	case ONEDIGITMINUTE:
+	case TWODIGITMINUTE:
 		date->wMinute = 0;
 		break;
-	case ONEDIGITMONTH: 
-	case TWODIGITMONTH: 
-	case THREECHARMONTH: 
-	case FULLMONTH:   
+	case ONEDIGITMONTH:
+	case TWODIGITMONTH:
+	case THREECHARMONTH:
+	case FULLMONTH:
 		date->wMonth = 1;
-	case FORMATCALLBACK:   
+	case FORMATCALLBACK:
 		FIXME ("Not implemented\n");
 		break;
-	case ONEDIGITYEAR: 
-	case TWODIGITYEAR: 
-        /* FYI: On 1752/9/14 the calendar changed and England and the 
-         * American colonies changed to the Gregorian calendar. This change 
-         * involved having September 14th follow September 2nd. So no date 
+	case ONEDIGITYEAR:
+	case TWODIGITYEAR:
+        /* FYI: On 1752/9/14 the calendar changed and England and the
+         * American colonies changed to the Gregorian calendar. This change
+         * involved having September 14th follow September 2nd. So no date
          * algorithm works before that date.
          */
-	case FULLYEAR:   
+	case FULLYEAR:
 		date->wSecond = 0;
 		date->wMinute = 0;
 		date->wHour = 0;
@@ -684,7 +684,7 @@
 }
 
 
-static void 
+static void
 DATETIME_ResetFieldUp (DATETIME_INFO *infoPtr, int number)
 {
  SYSTEMTIME *date = & infoPtr->date;
@@ -695,41 +695,41 @@
 
  spec=infoPtr->fieldspec[number];
  if ((spec & DTHT_DATEFIELD)==0) return;
-		
+
  switch (spec) {
-	case ONEDIGITDAY: 
-	case TWODIGITDAY: 
-	case THREECHARDAY: 
+	case ONEDIGITDAY:
+	case TWODIGITDAY:
+	case THREECHARDAY:
 	case FULLDAY:
 		date->wDay=MONTHCAL_MonthLength(date->wMonth,date->wYear);
 		break;
-	case ONEDIGIT12HOUR: 
-	case TWODIGIT12HOUR: 
-	case ONEDIGIT24HOUR: 
-	case TWODIGIT24HOUR: 
-	case ONELETTERAMPM:   
-	case TWOLETTERAMPM:   
+	case ONEDIGIT12HOUR:
+	case TWODIGIT12HOUR:
+	case ONEDIGIT24HOUR:
+	case TWODIGIT24HOUR:
+	case ONELETTERAMPM:
+	case TWOLETTERAMPM:
 		date->wHour=23;
 		break;
-	case ONEDIGITSECOND: 
-	case TWODIGITSECOND: 
+	case ONEDIGITSECOND:
+	case TWODIGITSECOND:
 		date->wSecond=59;
 		break;
-	case ONEDIGITMINUTE: 
-	case TWODIGITMINUTE: 
+	case ONEDIGITMINUTE:
+	case TWODIGITMINUTE:
 		date->wMinute=59;
 		break;
-	case ONEDIGITMONTH: 
-	case TWODIGITMONTH: 
-	case THREECHARMONTH: 
-	case FULLMONTH:   
+	case ONEDIGITMONTH:
+	case TWODIGITMONTH:
+	case THREECHARMONTH:
+	case FULLMONTH:
 		date->wMonth=12;
-	case FORMATCALLBACK:   
+	case FORMATCALLBACK:
 		FIXME ("Not implemented\n");
 		break;
-	case ONEDIGITYEAR: 
-	case TWODIGITYEAR: 
-	case FULLYEAR:   
+	case ONEDIGITYEAR:
+	case TWODIGITYEAR:
+	case FULLYEAR:
 		date->wYear=9999;    /* Y10K problem? naaah. */
 		break;
 	}
@@ -751,14 +751,14 @@
   HBRUSH hbr;
   SIZE size;
   COLORREF oldBk, oldTextColor;
-  
+
   /* draw control edge */
   TRACE("\n");
   hbr = CreateSolidBrush(RGB(255, 255, 255));
   FillRect(hdc, rcClient, hbr);
   DrawEdge(hdc, rcClient, EDGE_SUNKEN, BF_RECT);
-  DeleteObject(hbr);   
-	
+  DeleteObject(hbr);
+
   if (infoPtr->dateValid) {
     char txt[80];
     HFONT oldFont;
@@ -825,7 +825,7 @@
   for (i=0; i<infoPtr->nrFields; i++) {
     if (PtInRect (&infoPtr->fieldRect[i], pt)) {
       retval = i;
-      TRACE("Hit in date text in field %d\n", i);           
+      TRACE("Hit in date text in field %d\n", i);
       break;
     }
  }
@@ -838,7 +838,7 @@
 static LRESULT
 DATETIME_LButtonDown (HWND hwnd, WPARAM wParam, LPARAM lParam)
 {
-  DATETIME_INFO *infoPtr = DATETIME_GetInfoPtr (hwnd);	
+  DATETIME_INFO *infoPtr = DATETIME_GetInfoPtr (hwnd);
   DWORD dwStyle = GetWindowLongA (hwnd, GWL_STYLE);
   int old, new;
   POINT pt;
@@ -867,7 +867,7 @@
     if(dwStyle & DTS_RIGHTALIGN)
       infoPtr->monthcal_pos.x = infoPtr->rcClient.right - ((infoPtr->calbutton.right -
                                 infoPtr->calbutton.left) + 145);
-    else 
+    else
       infoPtr->monthcal_pos.x = 8;
 
     infoPtr->monthcal_pos.y = infoPtr->rcClient.bottom;
@@ -881,7 +881,7 @@
         ShowWindow(infoPtr->hMonthCal, SW_SHOW);
 
     TRACE ("dt:%x mc:%x mc parent:%x, desktop:%x, mcpp:%x\n",
-              hwnd,infoPtr->hMonthCal, 
+              hwnd,infoPtr->hMonthCal,
               GetParent (infoPtr->hMonthCal),
               GetDesktopWindow (),
               GetParent (GetParent (infoPtr->hMonthCal)));
@@ -897,10 +897,10 @@
 static LRESULT
 DATETIME_LButtonUp (HWND hwnd, WPARAM wParam, LPARAM lParam)
 {
-  DATETIME_INFO *infoPtr = DATETIME_GetInfoPtr (hwnd);	
+  DATETIME_INFO *infoPtr = DATETIME_GetInfoPtr (hwnd);
 
   TRACE("\n");
-  
+
   if(infoPtr->bCalDepressed == TRUE) {
     infoPtr->bCalDepressed = FALSE;
     InvalidateRect(hwnd, &(infoPtr->calbutton), TRUE);
@@ -927,7 +927,7 @@
 static LRESULT
 DATETIME_ParentNotify (HWND hwnd, WPARAM wParam, LPARAM lParam)
 {
- DATETIME_INFO *infoPtr = DATETIME_GetInfoPtr (hwnd);	
+ DATETIME_INFO *infoPtr = DATETIME_GetInfoPtr (hwnd);
  LPNMHDR lpnmh = (LPNMHDR) lParam;
 
  TRACE ("%x,%lx\n",wParam, lParam);
@@ -941,7 +941,7 @@
 DATETIME_Notify (HWND hwnd, WPARAM wParam, LPARAM lParam)
 
 {
- DATETIME_INFO *infoPtr = DATETIME_GetInfoPtr (hwnd);	
+ DATETIME_INFO *infoPtr = DATETIME_GetInfoPtr (hwnd);
  LPNMHDR lpnmh = (LPNMHDR) lParam;
 
  TRACE ("%x,%lx\n",wParam, lParam);
@@ -951,7 +951,7 @@
 }
 
 
-static LRESULT 
+static LRESULT
 DATETIME_KeyDown (HWND hwnd, WPARAM wParam, LPARAM lParam)
 {
  DATETIME_INFO *infoPtr = DATETIME_GetInfoPtr (hwnd);
@@ -970,7 +970,7 @@
 
  switch (wParam) {
 	case VK_ADD:
-    	case VK_UP: 
+    	case VK_UP:
 		DATETIME_IncreaseField (infoPtr,FieldNum);
 		DATETIME_SendDateTimeChangeNotify (hwnd);
 		break;
@@ -987,17 +987,17 @@
 		DATETIME_ResetFieldUp(infoPtr,FieldNum);
 		DATETIME_SendDateTimeChangeNotify (hwnd);
 		break;
-	case VK_LEFT: 
+	case VK_LEFT:
 		do {
 			if (infoPtr->select==0) {
 				infoPtr->select = infoPtr->nrFields - 1;
 				wrap++;
-			} else 
+			} else
 			infoPtr->select--;
 		}
 		while ((infoPtr->fieldspec[infoPtr->select] & DT_STRING) && (wrap<2));
 		break;
-	case VK_RIGHT:	
+	case VK_RIGHT:
 		do {
 			infoPtr->select++;
 			if (infoPtr->select==infoPtr->nrFields) {
@@ -1018,7 +1018,7 @@
 static LRESULT
 DATETIME_KillFocus (HWND hwnd, WPARAM wParam, LPARAM lParam)
 {
-    DATETIME_INFO *infoPtr = DATETIME_GetInfoPtr (hwnd);	
+    DATETIME_INFO *infoPtr = DATETIME_GetInfoPtr (hwnd);
 
     TRACE ("\n");
 
@@ -1036,12 +1036,12 @@
 static LRESULT
 DATETIME_SetFocus (HWND hwnd, WPARAM wParam, LPARAM lParam)
 {
-    DATETIME_INFO *infoPtr = DATETIME_GetInfoPtr (hwnd);	
+    DATETIME_INFO *infoPtr = DATETIME_GetInfoPtr (hwnd);
 
     TRACE ("\n");
 
     if (infoPtr->haveFocus==0) {
-	DATETIME_SendSimpleNotify (hwnd, NM_SETFOCUS);	
+	DATETIME_SendSimpleNotify (hwnd, NM_SETFOCUS);
 	infoPtr->haveFocus = DTHT_GOTFOCUS;
     }
 
@@ -1055,7 +1055,7 @@
 DATETIME_SendDateTimeChangeNotify (HWND hwnd)
 
 {
- DATETIME_INFO *infoPtr = DATETIME_GetInfoPtr (hwnd);	
+ DATETIME_INFO *infoPtr = DATETIME_GetInfoPtr (hwnd);
  NMDATETIMECHANGE dtdtc;
 
  TRACE ("\n");
@@ -1123,7 +1123,7 @@
   if(dwStyle & DTS_RIGHTALIGN)
     infoPtr->monthcal_pos.x = infoPtr->rcClient.right - ((infoPtr->calbutton.right -
                                 infoPtr->calbutton.left) + 145);
-  else 
+  else
     infoPtr->monthcal_pos.x = 8;
 
   infoPtr->monthcal_pos.y = infoPtr->rcClient.bottom;
@@ -1155,10 +1155,10 @@
   SetWindowLongA (hwnd, 0, (DWORD)infoPtr);
 
   if (dwStyle & DTS_SHOWNONE) {
-    infoPtr->hwndCheckbut=CreateWindowExA (0,"button", 0, 
-         WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX, 
+    infoPtr->hwndCheckbut=CreateWindowExA (0,"button", 0,
+         WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX,
          2,2,13,13,
-         hwnd, 
+         hwnd,
          0, GetWindowLongA  (hwnd, GWL_HINSTANCE), 0);
          SendMessageA (infoPtr->hwndCheckbut, BM_SETCHECK, 1, 0);
   }
@@ -1179,10 +1179,10 @@
   DATETIME_SetFormat (hwnd, 0, 0);
 
   /* create the monthcal control */
-    infoPtr->hMonthCal = CreateWindowExA (0,"SysMonthCal32", 0, 
+    infoPtr->hMonthCal = CreateWindowExA (0,"SysMonthCal32", 0,
 	WS_BORDER | WS_POPUP | WS_CLIPSIBLINGS,
 	0, 0, 0, 0,
-	GetParent(hwnd), 
+	GetParent(hwnd),
 	0, 0, 0);
 
   /* initialize info structure */
@@ -1197,7 +1197,7 @@
 DATETIME_Destroy (HWND hwnd, WPARAM wParam, LPARAM lParam)
 {
     DATETIME_INFO *infoPtr = DATETIME_GetInfoPtr (hwnd);
-	
+
     TRACE("\n");
     COMCTL32_Free (infoPtr);
     SetWindowLongA( hwnd, 0, 0 );
@@ -1210,7 +1210,7 @@
 {
     if (!DATETIME_GetInfoPtr(hwnd) && (uMsg != WM_CREATE))
 	return DefWindowProcA( hwnd, uMsg, wParam, lParam );
-    
+
     switch (uMsg)
     {
 
@@ -1307,7 +1307,7 @@
     wndClass.hCursor       = LoadCursorA (0, IDC_ARROWA);
     wndClass.hbrBackground = (HBRUSH)(COLOR_WINDOW + 1);
     wndClass.lpszClassName = DATETIMEPICK_CLASSA;
- 
+
     RegisterClassA (&wndClass);
 }
 
diff --git a/dlls/comctl32/flatsb.c b/dlls/comctl32/flatsb.c
index a4bdb3f..12bfb01 100644
--- a/dlls/comctl32/flatsb.c
+++ b/dlls/comctl32/flatsb.c
@@ -79,10 +79,10 @@
  *
  *	Returns nonzero if successful, or zero otherwise. If index is WSB_PROP_HSTYLE,
  *	the return is nonzero if InitializeFlatSB has been called for this window, or
- *	zero otherwise. 
+ *	zero otherwise.
  *
  */
-BOOL WINAPI 
+BOOL WINAPI
 FlatSB_GetScrollProp(HWND hwnd, INT propIndex, LPINT prop)
 {
     TRACE("[%04x] propIndex=%d\n", hwnd, propIndex);
@@ -93,7 +93,7 @@
 /***********************************************************************
  *		FlatSB_SetScrollProp (COMCTL32.36)
  */
-BOOL WINAPI 
+BOOL WINAPI
 FlatSB_SetScrollProp(HWND hwnd, UINT index, INT newValue, BOOL flag)
 {
     TRACE("[%04x] index=%u newValue=%d flag=%d\n", hwnd, index, newValue, flag);
@@ -109,7 +109,7 @@
  *	bars on and off without having to write conditional code."
  *
  *	So, if we just call the standard functions until we implement
- *	the flat scroll bar functions, flat scroll bars will show up and 
+ *	the flat scroll bar functions, flat scroll bars will show up and
  *	behave properly, as though they had simply not been setup to
  *	have flat properties.
  *
@@ -120,7 +120,7 @@
 /***********************************************************************
  *		FlatSB_EnableScrollBar (COMCTL32.29)
  */
-BOOL WINAPI 
+BOOL WINAPI
 FlatSB_EnableScrollBar(HWND hwnd, int nBar, UINT flags)
 {
     return EnableScrollBar(hwnd, nBar, flags);
@@ -129,7 +129,7 @@
 /***********************************************************************
  *		FlatSB_ShowScrollBar (COMCTL32.38)
  */
-BOOL WINAPI 
+BOOL WINAPI
 FlatSB_ShowScrollBar(HWND hwnd, int nBar, BOOL fShow)
 {
     return ShowScrollBar(hwnd, nBar, fShow);
@@ -138,7 +138,7 @@
 /***********************************************************************
  *		FlatSB_GetScrollRange (COMCTL32.33)
  */
-BOOL WINAPI 
+BOOL WINAPI
 FlatSB_GetScrollRange(HWND hwnd, int nBar, LPINT min, LPINT max)
 {
     return GetScrollRange(hwnd, nBar, min, max);
@@ -147,7 +147,7 @@
 /***********************************************************************
  *		FlatSB_GetScrollInfo (COMCTL32.30)
  */
-BOOL WINAPI 
+BOOL WINAPI
 FlatSB_GetScrollInfo(HWND hwnd, int nBar, LPSCROLLINFO info)
 {
     return GetScrollInfo(hwnd, nBar, info);
@@ -156,7 +156,7 @@
 /***********************************************************************
  *		FlatSB_GetScrollPos (COMCTL32.31)
  */
-INT WINAPI 
+INT WINAPI
 FlatSB_GetScrollPos(HWND hwnd, int nBar)
 {
     return GetScrollPos(hwnd, nBar);
@@ -165,7 +165,7 @@
 /***********************************************************************
  *		FlatSB_SetScrollPos (COMCTL32.35)
  */
-INT WINAPI 
+INT WINAPI
 FlatSB_SetScrollPos(HWND hwnd, int nBar, INT pos, BOOL bRedraw)
 {
     return SetScrollPos(hwnd, nBar, pos, bRedraw);
@@ -174,7 +174,7 @@
 /***********************************************************************
  *		FlatSB_SetScrollInfo (COMCTL32.34)
  */
-INT WINAPI 
+INT WINAPI
 FlatSB_SetScrollInfo(HWND hwnd, int nBar, LPSCROLLINFO info, BOOL bRedraw)
 {
     return SetScrollInfo(hwnd, nBar, info, bRedraw);
@@ -183,7 +183,7 @@
 /***********************************************************************
  *		FlatSB_SetScrollRange (COMCTL32.37)
  */
-INT WINAPI 
+INT WINAPI
 FlatSB_SetScrollRange(HWND hwnd, int nBar, INT min, INT max, BOOL bRedraw)
 {
     return SetScrollRange(hwnd, nBar, min, max, bRedraw);
@@ -211,7 +211,7 @@
 {
     if (!FlatSB_GetInfoPtr(hwnd) && (uMsg != WM_CREATE))
 	return DefWindowProcA( hwnd, uMsg, wParam, lParam );
-    
+
     switch (uMsg)
     {
 	case WM_CREATE:
@@ -243,7 +243,7 @@
     wndClass.hCursor       = LoadCursorA (0, IDC_ARROWA);
     wndClass.hbrBackground = (HBRUSH)(COLOR_WINDOW + 1);
     wndClass.lpszClassName = FLATSB_CLASSA;
- 
+
     RegisterClassA (&wndClass);
 }
 
diff --git a/dlls/comctl32/header.c b/dlls/comctl32/header.c
index f034c06..228f214 100644
--- a/dlls/comctl32/header.c
+++ b/dlls/comctl32/header.c
@@ -42,7 +42,7 @@
 
 WINE_DEFAULT_DEBUG_CHANNEL(header);
 
-typedef struct 
+typedef struct
 {
     INT     cxy;
     HBITMAP hbm;
@@ -98,13 +98,13 @@
 }
 
 
-static INT 
+static INT
 HEADER_OrderToIndex(HWND hwnd, WPARAM wParam)
 {
     HEADER_INFO *infoPtr = HEADER_GetInfoPtr (hwnd);
     INT i,iorder = (INT)wParam;
-  
-    
+
+
     if ((iorder <0) || iorder >infoPtr->uNumItem)
       return iorder;
     for (i=0; i<infoPtr->uNumItem; i++)
@@ -162,7 +162,7 @@
 
     if (!infoPtr->bRectsValid)
     	HEADER_SetItemBounds(hwnd);
-    
+
     r = phdi->rect;
     if (r.right - r.left == 0)
 	return phdi->rect.right;
@@ -329,7 +329,7 @@
 }
 
 
-static void 
+static void
 HEADER_Refresh (HWND hwnd, HDC hdc)
 {
     HEADER_INFO *infoPtr = HEADER_GetInfoPtr (hwnd);
@@ -594,7 +594,7 @@
     INT iItem = (INT)wParam;
 
     TRACE("[iItem=%d]\n", iItem);
-    
+
     if ((iItem < 0) || (iItem >= (INT)infoPtr->uNumItem))
         return FALSE;
 
@@ -633,7 +633,7 @@
     HEADER_SetItemBounds (hwnd);
 
     InvalidateRect(hwnd, NULL, FALSE);
-    
+
     return TRUE;
 }
 
@@ -685,7 +685,7 @@
 				     phdi->pszText, phdi->cchTextMax, NULL, NULL);
 	    else
 	        *phdi->pszText = 0;
-	}	
+	}
 	else
 	    phdi->pszText = LPSTR_TEXTCALLBACKA;
     }
@@ -779,7 +779,7 @@
 }
 
 
-static LRESULT 
+static LRESULT
 HEADER_GetOrderArray(HWND hwnd, WPARAM wParam, LPARAM lParam)
 {
     int i;
@@ -793,7 +793,7 @@
     return TRUE;
 }
 
-static LRESULT 
+static LRESULT
 HEADER_SetOrderArray(HWND hwnd, WPARAM wParam, LPARAM lParam)
 {
     int i;
@@ -877,7 +877,7 @@
                         (infoPtr->uNumItem - nItem - 1) * sizeof(HEADER_ITEM));
             }
         }
-    
+
         COMCTL32_Free (oldItems);
     }
 
@@ -924,7 +924,7 @@
       }
     else
       lpItem->iOrder=nItem;
-	  
+
 
     HEADER_SetItemBounds (hwnd);
 
@@ -976,7 +976,7 @@
                         (infoPtr->uNumItem - nItem - 1) * sizeof(HEADER_ITEM));
             }
         }
-    
+
         COMCTL32_Free (oldItems);
     }
 
@@ -989,7 +989,7 @@
     if (phdi->mask & HDI_TEXT) {
 	WCHAR wide_null_char = 0;
 	if (!phdi->pszText) /* null pointer check */
-	    phdi->pszText = &wide_null_char;	
+	    phdi->pszText = &wide_null_char;
 	if (phdi->pszText != LPSTR_TEXTCALLBACKW) {
 	    len = strlenW (phdi->pszText);
 	    lpItem->pszText = COMCTL32_Alloc ((len+1)*sizeof(WCHAR));
@@ -1304,7 +1304,7 @@
     UINT  flags;
     INT   nItem;
 
-    pt.x = (INT)LOWORD(lParam); 
+    pt.x = (INT)LOWORD(lParam);
     pt.y = (INT)HIWORD(lParam);
     HEADER_InternalHitTest (hwnd, &pt, &flags, &nItem);
 
@@ -1327,13 +1327,13 @@
     INT   nItem;
     HDC   hdc;
 
-    pt.x = (INT)LOWORD(lParam); 
+    pt.x = (INT)LOWORD(lParam);
     pt.y = (INT)HIWORD(lParam);
     HEADER_InternalHitTest (hwnd, &pt, &flags, &nItem);
 
     if ((dwStyle & HDS_BUTTONS) && (flags == HHT_ONHEADER)) {
 	SetCapture (hwnd);
-	infoPtr->bCaptured = TRUE;   
+	infoPtr->bCaptured = TRUE;
 	infoPtr->bPressed  = TRUE;
 	infoPtr->iMoveItem = nItem;
 
@@ -1345,11 +1345,11 @@
 	ReleaseDC (hwnd, hdc);
 
 	TRACE("Pressed item %d!\n", nItem);
-    } 
+    }
     else if ((flags == HHT_ONDIVIDER) || (flags == HHT_ONDIVOPEN)) {
 	if (!(HEADER_SendHeaderNotify (hwnd, HDN_BEGINTRACKA, nItem,0))) {
 	    SetCapture (hwnd);
-	    infoPtr->bCaptured = TRUE;   
+	    infoPtr->bCaptured = TRUE;
 	    infoPtr->bTracking = TRUE;
 	    infoPtr->iMoveItem = nItem;
 	    infoPtr->nOldWidth = infoPtr->items[nItem].cxy;
@@ -1412,7 +1412,7 @@
 	    infoPtr->bRectsValid = FALSE;
 	    InvalidateRect(hwnd, NULL, FALSE);
 	    /* FIXME: Should some WM_NOTIFY be sent */
-	  }    
+	  }
 
 	TRACE("Released item %d!\n", infoPtr->iMoveItem);
 	infoPtr->bPressed = FALSE;
@@ -1447,7 +1447,7 @@
 			HEADER_SendHeaderNotify(hwnd, HDN_ITEMCHANGINGA, infoPtr->iMoveItem, HDI_WIDTH);
 	    HEADER_SetItemBounds (hwnd);
 	    InvalidateRect(hwnd, NULL, FALSE);
-       /*     
+       /*
 	* }
         */
     }
@@ -1536,7 +1536,7 @@
 		infoPtr->xOldTrack = pt.x + infoPtr->xTrackOffset;
 		if (infoPtr->xOldTrack < infoPtr->items[infoPtr->iMoveItem].rect.left)
 		    infoPtr->xOldTrack = infoPtr->items[infoPtr->iMoveItem].rect.left;
-		infoPtr->items[infoPtr->iMoveItem].cxy = 
+		infoPtr->items[infoPtr->iMoveItem].cxy =
 		    infoPtr->xOldTrack - infoPtr->items[infoPtr->iMoveItem].rect.left;
 		HEADER_DrawTrackLine (hwnd, hdc, infoPtr->xOldTrack);
 		ReleaseDC (hwnd, hdc);
@@ -1586,7 +1586,7 @@
 
     /* Send a WM_CONTEXTMENU message in response to the RBUTTONUP */
     SendMessageA( hwnd, WM_CONTEXTMENU, (WPARAM) hwnd, MAKELPARAM(pt.x, pt.y));
-    
+
     return bRet;
 }
 
@@ -1637,7 +1637,7 @@
     ReleaseDC (0, hdc);
 
     infoPtr->bRectsValid = FALSE;
-	
+
     if (lParam) {
         InvalidateRect(hwnd, NULL, FALSE);
     }
@@ -1680,7 +1680,7 @@
 	case HDM_GETITEMRECT:
 	    return HEADER_GetItemRect (hwnd, wParam, lParam);
 
-	case HDM_GETORDERARRAY: 
+	case HDM_GETORDERARRAY:
 	    return HEADER_GetOrderArray(hwnd, wParam, lParam);
 
 	case HDM_GETUNICODEFORMAT:
@@ -1754,7 +1754,7 @@
 
 	case WM_SIZE:
 	    return HEADER_Size (hwnd, wParam);
-	
+
         case WM_PAINT:
             return HEADER_Paint (hwnd, wParam);
 
@@ -1768,7 +1768,7 @@
             return HEADER_SetFont (hwnd, wParam, lParam);
 
         default:
-            if (msg >= WM_USER) 
+            if (msg >= WM_USER)
 		ERR("unknown msg %04x wp=%04x lp=%08lx\n",
 		     msg, wParam, lParam );
 	    return DefWindowProcA (hwnd, msg, wParam, lParam);
@@ -1789,7 +1789,7 @@
     wndClass.cbWndExtra    = sizeof(HEADER_INFO *);
     wndClass.hCursor       = LoadCursorA (0, IDC_ARROWA);
     wndClass.lpszClassName = WC_HEADERA;
- 
+
     RegisterClassA (&wndClass);
 }
 
diff --git a/dlls/comctl32/hotkey.c b/dlls/comctl32/hotkey.c
index 55aa230..6f0c43a 100644
--- a/dlls/comctl32/hotkey.c
+++ b/dlls/comctl32/hotkey.c
@@ -365,7 +365,7 @@
     wndClass.hCursor       = 0;
     wndClass.hbrBackground = 0;
     wndClass.lpszClassName = HOTKEY_CLASSA;
- 
+
     RegisterClassA (&wndClass);
 }
 
diff --git a/dlls/comctl32/imagelist.c b/dlls/comctl32/imagelist.c
index 39e943d..9697813 100644
--- a/dlls/comctl32/imagelist.c
+++ b/dlls/comctl32/imagelist.c
@@ -33,7 +33,7 @@
  *  Comments:
  *    - ImageList_Draw, ImageList_DrawEx and ImageList_GetIcon use
  *      ImageList_DrawIndirect. Since ImageList_DrawIndirect is still
- *      partially implemented, the functions mentioned above will be 
+ *      partially implemented, the functions mentioned above will be
  *      limited in functionality too.
  *
  *    - Hotspot handling still not correct. The Hotspot passed to BeginDrag
@@ -80,7 +80,7 @@
 
 
 /*************************************************************************
- * IMAGELIST_InternalExpandBitmaps [Internal] 
+ * IMAGELIST_InternalExpandBitmaps [Internal]
  *
  * Expands the bitmaps of an image list by the given number of images.
  *
@@ -127,7 +127,7 @@
     himl->hbmImage = hbmNewBitmap;
 
     if (himl->hbmMask) {
-        hbmNewBitmap = 
+        hbmNewBitmap =
             CreateBitmap (nNewWidth, cy, 1, 1, NULL);
 
         if (hbmNewBitmap == 0)
@@ -149,7 +149,7 @@
 
 
 /*************************************************************************
- * IMAGELIST_InternalDraw [Internal] 
+ * IMAGELIST_InternalDraw [Internal]
  *
  * Draws the image in the ImageList (without the mask)
  *
@@ -162,7 +162,7 @@
  *     nothing
  *
  * NOTES
- *     This function is used by ImageList_DrawIndirect, when it is 
+ *     This function is used by ImageList_DrawIndirect, when it is
  *     required to draw only the Image (without the mask) to the screen.
  *
  *     Blending and Overlays styles are accomplished by another function
@@ -175,10 +175,10 @@
 
     hImageDC = CreateCompatibleDC(0);
     hOldBitmap = SelectObject(hImageDC, pimldp->himl->hbmImage);
-    BitBlt(pimldp->hdcDst, 
+    BitBlt(pimldp->hdcDst,
         pimldp->x, pimldp->y, cx, cy,
-        hImageDC, 
-        pimldp->himl->cx * pimldp->i, 0, 
+        hImageDC,
+        pimldp->himl->cx * pimldp->i, 0,
         SRCCOPY);
 
     SelectObject(hImageDC, hOldBitmap);
@@ -187,7 +187,7 @@
 
 
 /*************************************************************************
- * IMAGELIST_InternalDrawMask [Internal] 
+ * IMAGELIST_InternalDrawMask [Internal]
  *
  * Draws the image in the ImageList with the mask
  *
@@ -200,7 +200,7 @@
  *     nothing
  *
  * NOTES
- *     This function is used by ImageList_DrawIndirect, when it is 
+ *     This function is used by ImageList_DrawIndirect, when it is
  *     required to draw the Image with the mask to the screen.
  *
  *     Blending and Overlays styles are accomplished by another function.
@@ -216,8 +216,8 @@
     COLORREF oldBkColor, oldFgColor;
     UINT fStyle = pimldp->fStyle & (~ILD_OVERLAYMASK);
 
-    /* 
-     * We need a dc and bitmap to draw on that is 
+    /*
+     * We need a dc and bitmap to draw on that is
      * not on the screen.
      */
     HDC hOffScreenDC = 0;
@@ -232,11 +232,11 @@
     /* Create a compatible DC. */
     hOffScreenDC = CreateCompatibleDC( pimldp->hdcDst );
 
-    if ( hOffScreenDC ) 
+    if ( hOffScreenDC )
     {
         hOffScreenBmp = CreateCompatibleBitmap( pimldp->hdcDst, cx, cy );
 
-        if ( hOffScreenBmp ) 
+        if ( hOffScreenBmp )
             SelectObject( hOffScreenDC, hOffScreenBmp  );
         else
             goto cleanup;
@@ -246,43 +246,43 @@
 
     hOldBitmapImage = SelectObject(hImageDC, himlLocal->hbmImage);
     hOldBitmapMask = SelectObject(hMaskDC, himlLocal->hbmMask);
-    
-    /* 
-     * Get a copy of the image for the masking operations. 
+
+    /*
+     * Get a copy of the image for the masking operations.
      * We will use the copy, and this dc for all the various
      * blitting, and then do one final blit to the screen dc.
      * This should clean up most of the flickering.
      */
-    BitBlt( hOffScreenDC, 0, 0, cx, cy, pimldp->hdcDst, pimldp->x, 
+    BitBlt( hOffScreenDC, 0, 0, cx, cy, pimldp->hdcDst, pimldp->x,
             pimldp->y, SRCCOPY);
 
-    /* 
+    /*
      * Draw the Background for the appropriate Styles
      */
-    if( bUseCustomBackground && (fStyle == ILD_NORMAL || fStyle & ILD_IMAGE 
+    if( bUseCustomBackground && (fStyle == ILD_NORMAL || fStyle & ILD_IMAGE
          || bBlendFlag) )
     {
-        
+
         hBrush = CreateSolidBrush (himlLocal->clrBk);
         hOldBrush = SelectObject (pimldp->hdcDst, hBrush);
-        
+
         PatBlt( hOffScreenDC, pimldp->x, pimldp->y, cx, cy, PATCOPY );
 
         DeleteObject (SelectObject (pimldp->hdcDst, hOldBrush));
     }
 
-    /* 
+    /*
      * Draw Image Transparently over the current background
      */
-    if(fStyle == ILD_NORMAL || (fStyle & ILD_TRANSPARENT) || 
-       ((fStyle & ILD_IMAGE) && bUseCustomBackground) || bBlendFlag) 
-    {   /* 
+    if(fStyle == ILD_NORMAL || (fStyle & ILD_TRANSPARENT) ||
+       ((fStyle & ILD_IMAGE) && bUseCustomBackground) || bBlendFlag)
+    {   /*
          * To obtain a transparent look, background color should be set
-         * to white and foreground color to black when blting the 
-         * monochrome mask. 
+         * to white and foreground color to black when blting the
+         * monochrome mask.
          */
-        
-        oldBkColor = SetBkColor( hOffScreenDC, RGB( 0xff, 0xff, 0xff ) ); 
+
+        oldBkColor = SetBkColor( hOffScreenDC, RGB( 0xff, 0xff, 0xff ) );
         oldFgColor = SetTextColor( hOffScreenDC, RGB( 0, 0, 0 ) );
 
         BitBlt( hOffScreenDC, 0, 0, cx, cy,hMaskDC, himlLocal->cx * pimldp->i,
@@ -290,18 +290,18 @@
 
         BitBlt( hOffScreenDC, 0, 0, cx, cy, hImageDC,himlLocal->cx * pimldp->i,
                 0, SRCPAINT );
-    
+
     }
-    
+
     /*
      * Draw the image when no Background is specified
      */
     else if((fStyle & ILD_IMAGE) && !bUseCustomBackground)
     {
-        BitBlt( hOffScreenDC, 0, 0, cx, cy, hImageDC, 
+        BitBlt( hOffScreenDC, 0, 0, cx, cy, hImageDC,
                 himlLocal->cx * pimldp->i, 0, SRCCOPY);
     }
-    /* 
+    /*
      * Draw the mask with or without a background
      */
     else if(fStyle & ILD_MASK)
@@ -309,32 +309,32 @@
         BitBlt( hOffScreenDC, 0, 0, cx, cy, hMaskDC, himlLocal->cx * pimldp->i,
                 0, bUseCustomBackground ? SRCCOPY : SRCAND);
     }
-    
+
     /*
      * Blit the bitmap to the screen now.
      */
     BitBlt( pimldp->hdcDst, pimldp->x, pimldp->y, cx, cy,
             hOffScreenDC, 0, 0, SRCCOPY);
 
-    
+
     SelectObject(hImageDC, hOldBitmapImage);
     SelectObject(hMaskDC, hOldBitmapMask);
-    
+
 cleanup:
-    
+
     DeleteDC(hImageDC);
     DeleteDC(hMaskDC);
-    
+
     DeleteDC( hOffScreenDC );
     DeleteObject( hOffScreenBmp );
-    
+
     return;
 }
 
 /*************************************************************************
- * IMAGELIST_InternalDrawBlend [Internal] 
+ * IMAGELIST_InternalDrawBlend [Internal]
  *
- * Draws the Blend over the current image 
+ * Draws the Blend over the current image
  *
  * PARAMS
  *     pimldp        [I] pointer to IMAGELISTDRAWPARAMS structure.
@@ -345,9 +345,9 @@
  *     nothing
  *
  * NOTES
- *     This functions is used by ImageList_DrawIndirect, when it is 
- *     required to add the blend to the current image.  
- *     
+ *     This functions is used by ImageList_DrawIndirect, when it is
+ *     required to add the blend to the current image.
+ *
  */
 static VOID
 IMAGELIST_InternalDrawBlend(IMAGELISTDRAWPARAMS *pimldp, INT cx, INT cy)
@@ -386,15 +386,15 @@
         hOldMaskBitmap = (HBITMAP) SelectObject(hMaskDC, himlLocal->hbmMask);
 
         BitBlt(hBlendMaskDC,
-            0,0, cx, cy, 
+            0,0, cx, cy,
             hMaskDC,
             himlLocal->cx * pimldp->i,0,
             0x220326); /* NOTSRCAND */
 
         BitBlt(hBlendMaskDC,
-            0,0, cx, cy, 
+            0,0, cx, cy,
             hBlendMaskDC,
-            0,0, 
+            0,0,
             NOTSRCCOPY);
 
         SelectObject(hMaskDC, hOldMaskBitmap);
@@ -408,10 +408,10 @@
     hBlendColorBrush = CreateSolidBrush(clrBlend);
     hOldBrush = (HBRUSH) SelectObject (pimldp->hdcDst, hBlendColorBrush);
 
-    BitBlt (pimldp->hdcDst, 
-        pimldp->x, pimldp->y, cx, cy, 
-        hBlendMaskDC, 
-        0, 0, 
+    BitBlt (pimldp->hdcDst,
+        pimldp->x, pimldp->y, cx, cy,
+        hBlendMaskDC,
+        0, 0,
         0xB8074A); /* PSDPxax */
 
     SelectObject(pimldp->hdcDst, hOldBrush);
@@ -424,9 +424,9 @@
 }
 
 /*************************************************************************
- * IMAGELIST_InternalDrawOverlay [Internal] 
+ * IMAGELIST_InternalDrawOverlay [Internal]
  *
- * Draws the overlay image 
+ * Draws the overlay image
  *
  * PARAMS
  *     pimldp        [I] pointer to IMAGELISTDRAWPARAMS structure.
@@ -437,12 +437,12 @@
  *     nothing
  *
  * NOTES
- *     This functions is used by ImageList_DrawIndirect, when it is 
+ *     This functions is used by ImageList_DrawIndirect, when it is
  *     required to draw the overlay
  *
- *     
+ *
  */
-static VOID 
+static VOID
 IMAGELIST_InternalDrawOverlay(IMAGELISTDRAWPARAMS *pimldp, INT cx, INT cy)
 {
     INT     nOvlIdx;
@@ -458,21 +458,21 @@
             hImageDC = CreateCompatibleDC(0);
             if (pimldp->himl->hbmMask)
             {
-                hOldBitmap = (HBITMAP) SelectObject (hImageDC, 
+                hOldBitmap = (HBITMAP) SelectObject (hImageDC,
                     pimldp->himl->hbmMask);
 
-                BitBlt (pimldp->hdcDst, 
+                BitBlt (pimldp->hdcDst,
                     pimldp->x, pimldp->y, cx, cy,
                     hImageDC, pimldp->himl->cx * nOvlIdx, 0,
                     SRCAND);
 
                 SelectObject(hImageDC, hOldBitmap);
             }
-            hOldBitmap = (HBITMAP) SelectObject (hImageDC, 
+            hOldBitmap = (HBITMAP) SelectObject (hImageDC,
                 pimldp->himl->hbmImage);
 
-            BitBlt (pimldp->hdcDst, 
-                pimldp->x, pimldp->y, cx, cy, 
+            BitBlt (pimldp->hdcDst,
+                pimldp->x, pimldp->y, cx, cy,
                 hImageDC,
                 pimldp->himl->cx * nOvlIdx, 0,
                 SRCPAINT);
@@ -539,10 +539,10 @@
         hOldBitmapMask = (HBITMAP) SelectObject(hdcMask, himl->hbmMask);
         hOldBitmapTemp = (HBITMAP) SelectObject(hdcTemp, hbmMask);
 
-        BitBlt (hdcMask, 
+        BitBlt (hdcMask,
             nStartX, 0, bmp.bmWidth, bmp.bmHeight,
-            hdcTemp, 
-            0, 0, 
+            hdcTemp,
+            0, 0,
             SRCCOPY);
 
         SelectObject(hdcTemp, hOldBitmapTemp);
@@ -550,10 +550,10 @@
 
         /* Remove the background from the image
         */
-        BitBlt (hdcImage, 
+        BitBlt (hdcImage,
             nStartX, 0, bmp.bmWidth, bmp.bmHeight,
-            hdcMask, 
-            nStartX, 0, 
+            hdcMask,
+            nStartX, 0,
             0x220326); /* NOTSRCAND */
 
         SelectObject(hdcMask, hOldBitmapMask);
@@ -594,7 +594,7 @@
 
 
 /*************************************************************************
- * ImageList_AddMasked [COMCTL32.42] 
+ * ImageList_AddMasked [COMCTL32.42]
  *
  * Adds an image or images to an image list and creates a mask from the
  * specified bitmap using the mask color.
@@ -659,9 +659,9 @@
     bkColor = (clrMask != CLR_DEFAULT) ? clrMask :
         GetPixel (hdcBitmap, 0, 0);
     SetBkColor (hdcBitmap, bkColor);
-    BitBlt (hdcMask, 
+    BitBlt (hdcMask,
         nMaskXOffset, 0, bmp.bmWidth, bmp.bmHeight,
-        hdcBitmap, 0, 0, 
+        hdcBitmap, 0, 0,
         SRCCOPY);
 
     SetBkColor(hdcBitmap, RGB(255,255,255));
@@ -676,17 +676,17 @@
         on windows where it failed (BUT ImageList_Add is OK)
         This is here in case some apps rely on this bug
     */
-    BitBlt(hdcBitmap, 
+    BitBlt(hdcBitmap,
         0, 0, bmp.bmWidth, bmp.bmHeight,
-        hdcMask, 
-        nMaskXOffset, 0, 
+        hdcMask,
+        nMaskXOffset, 0,
         0x220326); /* NOTSRCAND */
     /* Copy result to the imagelist
     */
-    BitBlt (hdcImage, 
+    BitBlt (hdcImage,
         nIndex * himl->cx, 0, bmp.bmWidth, bmp.bmHeight,
-        hdcBitmap, 
-        0, 0, 
+        hdcBitmap,
+        0, 0,
         SRCCOPY);
     /* Clean up
     */
@@ -706,7 +706,7 @@
 
 
 /*************************************************************************
- * ImageList_BeginDrag [COMCTL32.43] 
+ * ImageList_BeginDrag [COMCTL32.43]
  *
  * Creates a temporary image list that contains one image. It will be used
  * as a drag image.
@@ -774,9 +774,9 @@
 
 
 /*************************************************************************
- * ImageList_Copy [COMCTL32.44] 
+ * ImageList_Copy [COMCTL32.44]
  *
- *  Copies an image of the source image list to an image of the 
+ *  Copies an image of the source image list to an image of the
  *  destination image list. Images can be copied or swapped.
  *
  * PARAMS
@@ -800,7 +800,7 @@
 ImageList_Copy (HIMAGELIST himlDst, INT iDst,	HIMAGELIST himlSrc,
 		INT iSrc, INT uFlags)
 {
-    HDC hdcSrc, hdcDst;    
+    HDC hdcSrc, hdcDst;
 
     TRACE("iDst=%d  iSrc=%d\n", iDst, iSrc);
 
@@ -924,7 +924,7 @@
     HDC      hdc;
     INT      nCount;
     HBITMAP  hbmTemp;
-    static WORD aBitBlend25[] = 
+    static WORD aBitBlend25[] =
         {0xAA, 0x00, 0x55, 0x00, 0xAA, 0x00, 0x55, 0x00};
 
     static WORD aBitBlend50[] =
@@ -967,7 +967,7 @@
     }
     else
         himl->hbmImage = 0;
-    
+
     if ( (himl->cMaxImage > 0) && (himl->flags & ILC_MASK)) {
         himl->hbmMask = CreateBitmap (himl->cx * himl->cMaxImage, himl->cy,
 					1, 1, NULL);
@@ -996,7 +996,7 @@
 
 
 /*************************************************************************
- * ImageList_Destroy [COMCTL32.46] 
+ * ImageList_Destroy [COMCTL32.46]
  *
  * Destroys an image list.
  *
@@ -1010,7 +1010,7 @@
 
 BOOL WINAPI
 ImageList_Destroy (HIMAGELIST himl)
-{ 
+{
     if (!himl)
 	return FALSE;
 
@@ -1025,7 +1025,7 @@
         DeleteObject (himl->hbrBlend25);
     if (himl->hbrBlend50)
         DeleteObject (himl->hbrBlend50);
-        
+
     COMCTL32_Free (himl);
 
     return TRUE;
@@ -1033,7 +1033,7 @@
 
 
 /*************************************************************************
- * ImageList_DragEnter [COMCTL32.47] 
+ * ImageList_DragEnter [COMCTL32.47]
  *
  * Locks window update and displays the drag image at the given position.
  *
@@ -1077,7 +1077,7 @@
 
 
 /*************************************************************************
- * ImageList_DragLeave [COMCTL32.48] 
+ * ImageList_DragLeave [COMCTL32.48]
  *
  * Unlocks window update and hides the drag image.
  *
@@ -1110,7 +1110,7 @@
 
 
 /*************************************************************************
- * ImageList_DragMove [COMCTL32.49] 
+ * ImageList_DragMove [COMCTL32.49]
  *
  * Moves the drag image.
  *
@@ -1149,7 +1149,7 @@
 	INT origOldX, origOldY;
 	INT origRegX, origRegY;
 	INT sizeRegX, sizeRegY;
-	
+
 
 	/* calculate the update region */
 	origNewX = x - InternalDrag.dxHotspot;
@@ -1203,7 +1203,7 @@
 
 
 /*************************************************************************
- * ImageList_DragShowNolock [COMCTL32.50] 
+ * ImageList_DragShowNolock [COMCTL32.50]
  *
  * Shows or hides the drag image.
  *
@@ -1248,7 +1248,7 @@
 		    InternalDrag.himl->cx, InternalDrag.himl->cy);
     }
     SelectObject(hdcBg, InternalDrag.hbmBg);
-    
+
     if (bShow) {
 	/* save the background */
 	BitBlt(hdcBg, 0, 0, InternalDrag.himl->cx, InternalDrag.himl->cy,
@@ -1256,7 +1256,7 @@
 	/* show the image */
 	/* FIXME: this should be drawn semitransparent */
 	ImageList_Draw(InternalDrag.himl, 0, hdcDrag, x, y, ILD_NORMAL);
-    } else { 
+    } else {
 	/* hide the image */
 	BitBlt(hdcDrag, x, y, InternalDrag.himl->cx, InternalDrag.himl->cy,
 	       hdcBg, 0, 0, SRCCOPY);
@@ -1372,7 +1372,7 @@
 
 
 /*************************************************************************
- * ImageList_DrawIndirect [COMCTL32.53] 
+ * ImageList_DrawIndirect [COMCTL32.53]
  *
  * Draws an image using ...
  *
@@ -1387,8 +1387,8 @@
 BOOL WINAPI
 ImageList_DrawIndirect (IMAGELISTDRAWPARAMS *pimldp)
 {
-    INT      cx, cy;    
-    /* 
+    INT      cx, cy;
+    /*
         Do some Error Checking
     */
     if (pimldp == NULL)
@@ -1417,7 +1417,7 @@
     {
         IMAGELIST_InternalDraw(pimldp, cx, cy);
     }
-    /* 
+    /*
         Apply the blend if needed to the Image
     */
     if((pimldp->fStyle & ILD_BLEND50)
@@ -1594,7 +1594,7 @@
 
 
 /*************************************************************************
- * ImageList_GetIcon [COMCTL32.59] 
+ * ImageList_GetIcon [COMCTL32.59]
  *
  * Creates an icon from a masked image of an image list.
  *
@@ -1646,12 +1646,12 @@
 
     /*
      * CreateIconIndirect requires us to deselect the bitmaps from
-     * the DCs before calling 
+     * the DCs before calling
      */
     SelectObject(hdcSrc, hOldSrcBitmap);
     SelectObject(hdcDst, hOldDstBitmap);
 
-    hIcon = CreateIconIndirect (&ii);    
+    hIcon = CreateIconIndirect (&ii);
 
     DeleteDC (hdcSrc);
     DeleteDC (hdcDst);
@@ -1745,18 +1745,18 @@
 
     pImageInfo->hbmImage = himl->hbmImage;
     pImageInfo->hbmMask  = himl->hbmMask;
-    
+
     pImageInfo->rcImage.top    = 0;
     pImageInfo->rcImage.bottom = himl->cy;
     pImageInfo->rcImage.left   = i * himl->cx;
     pImageInfo->rcImage.right  = (i+1) * himl->cx;
-    
+
     return TRUE;
 }
 
 
 /*************************************************************************
- * ImageList_GetImageRect [COMCTL32.63] 
+ * ImageList_GetImageRect [COMCTL32.63]
  *
  * Retrieves the rectangle of the specified image in an image list.
  *
@@ -1855,7 +1855,7 @@
 
         GetIconInfo (handle, &ii);
         GetObjectA (ii.hbmColor, sizeof(BITMAP), (LPVOID)&bmp);
-        himl = ImageList_Create (bmp.bmWidth, bmp.bmHeight, 
+        himl = ImageList_Create (bmp.bmWidth, bmp.bmHeight,
                                  ILC_MASK | ILC_COLOR, 1, cGrow);
         ImageList_Add (himl, ii.hbmColor, ii.hbmMask);
         DeleteObject (ii.hbmColor);
@@ -1863,7 +1863,7 @@
     }
 
     DeleteObject (handle);
-    
+
     return himl;
 }
 
@@ -1932,7 +1932,7 @@
 
         GetIconInfo (handle, &ii);
         GetObjectA (ii.hbmMask, sizeof(BITMAP), (LPVOID)&bmp);
-        himl = ImageList_Create (bmp.bmWidth, bmp.bmHeight, 
+        himl = ImageList_Create (bmp.bmWidth, bmp.bmHeight,
                                  ILC_MASK | ILC_COLOR, 1, cGrow);
         ImageList_Add (himl, ii.hbmColor, ii.hbmMask);
         DeleteObject (ii.hbmColor);
@@ -1940,13 +1940,13 @@
     }
 
     DeleteObject (handle);
-    
+
     return himl;
 }
 
 
 /*************************************************************************
- * ImageList_Merge [COMCTL32.67] 
+ * ImageList_Merge [COMCTL32.67]
  *
  * Creates a new image list that contains a merged image from the specified
  * images of both source image lists.
@@ -2030,40 +2030,40 @@
         hdcDstImage = CreateCompatibleDC (0);
         nX1 = i1 * himl1->cx;
         nX2 = i2 * himl2->cx;
-        
+
         /* copy image */
         SelectObject (hdcSrcImage, himl1->hbmImage);
         SelectObject (hdcDstImage, himlDst->hbmImage);
-        BitBlt (hdcDstImage, 0, 0, cxDst, cyDst, 
+        BitBlt (hdcDstImage, 0, 0, cxDst, cyDst,
                   hdcSrcImage, 0, 0, BLACKNESS);
-        BitBlt (hdcDstImage, xOff1, yOff1, himl1->cx, himl1->cy, 
+        BitBlt (hdcDstImage, xOff1, yOff1, himl1->cx, himl1->cy,
                   hdcSrcImage, nX1, 0, SRCCOPY);
 
         SelectObject (hdcSrcImage, himl2->hbmMask);
-        BitBlt (hdcDstImage, xOff2, yOff2, himl2->cx, himl2->cy, 
+        BitBlt (hdcDstImage, xOff2, yOff2, himl2->cx, himl2->cy,
                   hdcSrcImage, nX2, 0, SRCAND);
 
         SelectObject (hdcSrcImage, himl2->hbmImage);
-        BitBlt (hdcDstImage, xOff2, yOff2, himl2->cx, himl2->cy, 
+        BitBlt (hdcDstImage, xOff2, yOff2, himl2->cx, himl2->cy,
                   hdcSrcImage, nX2, 0, SRCPAINT);
 
         /* copy mask */
         SelectObject (hdcSrcImage, himl1->hbmMask);
         SelectObject (hdcDstImage, himlDst->hbmMask);
-        BitBlt (hdcDstImage, 0, 0, cxDst, cyDst, 
+        BitBlt (hdcDstImage, 0, 0, cxDst, cyDst,
                   hdcSrcImage, 0, 0, WHITENESS);
-        BitBlt (hdcDstImage, xOff1, yOff1, himl1->cx, himl1->cy, 
+        BitBlt (hdcDstImage, xOff1, yOff1, himl1->cx, himl1->cy,
                   hdcSrcImage, nX1, 0, SRCCOPY);
 
         SelectObject (hdcSrcImage, himl2->hbmMask);
-        BitBlt (hdcDstImage, xOff2, yOff2, himl2->cx, himl2->cy, 
+        BitBlt (hdcDstImage, xOff2, yOff2, himl2->cx, himl2->cy,
                   hdcSrcImage, nX2, 0, SRCAND);
 
         DeleteDC (hdcSrcImage);
         DeleteDC (hdcDstImage);
 	himlDst->cCurImage = 1;
     }
-   
+
     return himlDst;
 }
 
@@ -2193,10 +2193,10 @@
  * 	ILHEAD 			ilheadstruct;
  *
  * for the color image part:
- * 	BITMAPFILEHEADER	bmfh; 
+ * 	BITMAPFILEHEADER	bmfh;
  * 	BITMAPINFOHEADER	bmih;
  * only if it has a palette:
- *	RGBQUAD		rgbs[nr_of_paletted_colors]; 
+ *	RGBQUAD		rgbs[nr_of_paletted_colors];
  *
  *	BYTE			colorbits[imagesize];
  *
@@ -2204,7 +2204,7 @@
  *	BITMAPFILEHEADER	bmfh_mask;
  *	BITMAPINFOHEADER	bmih_mask;
  * only if it has a palette (it usually does not):
- *	RGBQUAD		rgbs[nr_of_paletted_colors]; 
+ *	RGBQUAD		rgbs[nr_of_paletted_colors];
  *
  *	BYTE			maskbits[imagesize];
  *
@@ -2296,7 +2296,7 @@
         ERR("Invalid image list handle!\n");
         return FALSE;
     }
-    
+
     if ((i < -1) || (i >= himl->cCurImage)) {
         ERR("index out of range! %d\n", i);
         return FALSE;
@@ -2339,7 +2339,7 @@
                  himl->cCurImage, himl->cCurImage - 1);
         TRACE(" - Max. number of images: %d / %d (Old/New)\n",
                  himl->cMaxImage, himl->cCurImage + himl->cGrow - 1);
-        
+
         hbmNewImage =
             CreateBitmap (cxNew, himl->cy, 1, himl->uBitsPixel, NULL);
 
@@ -2354,7 +2354,7 @@
         /* copy all images and masks prior to the "removed" image */
         if (i > 0) {
             TRACE("Pre image copy: Copy %d images\n", i);
-       
+
             SelectObject (hdcSrc, himl->hbmImage);
             SelectObject (hdcDst, hbmNewImage);
             BitBlt (hdcDst, 0, 0, i * himl->cx, himl->cy,
@@ -2405,7 +2405,7 @@
 
 
 /*************************************************************************
- * ImageList_Replace [COMCTL32.70] 
+ * ImageList_Replace [COMCTL32.70]
  *
  * Replaces an image in an image list with a new image.
  *
@@ -2431,7 +2431,7 @@
         ERR("Invalid image list handle!\n");
         return FALSE;
     }
-    
+
     if ((i >= himl->cMaxImage) || (i < 0)) {
         ERR("Invalid image index!\n");
         return FALSE;
@@ -2461,10 +2461,10 @@
         /* Remove the background from the image
         */
         SelectObject (hdcImageList, himl->hbmImage);
-        StretchBlt (hdcImageList, 
+        StretchBlt (hdcImageList,
             i*himl->cx, 0, himl->cx, himl->cy,
-            hdcImage, 
-            0, 0, bmp.bmWidth, bmp.bmHeight, 
+            hdcImage,
+            0, 0, bmp.bmWidth, bmp.bmHeight,
             0x220326); /* NOTSRCAND */
     }
 
@@ -2508,8 +2508,8 @@
 	return -1;
 
     hBestFitIcon = CopyImage(
-        hIcon, IMAGE_ICON, 
-        himl->cx, himl->cy, 
+        hIcon, IMAGE_ICON,
+        himl->cx, himl->cy,
         LR_COPYFROMRESOURCE);
 
     GetIconInfo (hBestFitIcon, &ii);
@@ -2572,7 +2572,7 @@
 
 
 /*************************************************************************
- * ImageList_SetBkColor [COMCTL32.76] 
+ * ImageList_SetBkColor [COMCTL32.76]
  *
  * Sets the background color of an image list.
  *
@@ -2682,7 +2682,7 @@
 
 
 /*************************************************************************
- * ImageList_SetFilter [COMCTL32.78] 
+ * ImageList_SetFilter [COMCTL32.78]
  *
  * Sets a filter (or does something completely different)!!???
  *
@@ -2822,7 +2822,7 @@
 	/* delete 'empty' image space */
 	SetBkColor (hdcBitmap, RGB(255, 255, 255));
 	SetTextColor (hdcBitmap, RGB(0, 0, 0));
-	PatBlt (hdcBitmap,  nCopyCount * himl->cx, 0, 
+	PatBlt (hdcBitmap,  nCopyCount * himl->cx, 0,
 		  (nNewCount - nCopyCount) * himl->cx, himl->cy, BLACKNESS);
 #endif
 	DeleteObject (himl->hbmImage);
@@ -2847,7 +2847,7 @@
 	    /* delete 'empty' image space */
 	    SetBkColor (hdcBitmap, RGB(255, 255, 255));
 	    SetTextColor (hdcBitmap, RGB(0, 0, 0));
-            PatBlt (hdcBitmap,  nCopyCount * himl->cx, 0, 
+            PatBlt (hdcBitmap,  nCopyCount * himl->cx, 0,
 		      (nNewCount - nCopyCount) * himl->cx, himl->cy, BLACKNESS);
 #endif
             DeleteObject (himl->hbmMask);
@@ -2899,10 +2899,10 @@
 
 
 
-/* helper for ImageList_Write - write bitmap to pstm 
+/* helper for ImageList_Write - write bitmap to pstm
  * currently everything is written as 24 bit RGB, except masks
  */
-static BOOL 
+static BOOL
 _write_bitmap(HBITMAP hBitmap, LPSTREAM pstm, int cx, int cy)
 {
     LPBITMAPFILEHEADER bmfh;
@@ -2917,7 +2917,7 @@
 
     xdc = GetDC(0);
     GetObjectA(hBitmap, sizeof(BITMAP), (LPVOID)&bm);
-    
+
     /* XXX is this always correct? */
     icount = bm.bmWidth / cx;
     nwidth = cx << 2;
@@ -2959,21 +2959,21 @@
     bmih->biClrImportant  = 0;
 
     lpBitsOrg = (LPBYTE)LocalAlloc(LMEM_ZEROINIT, nsizeImage);
-    if(!GetDIBits(xdc, hBitmap, 0, bm.bmHeight, lpBitsOrg, 
+    if(!GetDIBits(xdc, hBitmap, 0, bm.bmHeight, lpBitsOrg,
 		  (BITMAPINFO *)bmih, DIB_RGB_COLORS))
 	goto failed;
     else {
 	int i;
 	int obpl = (((bm.bmWidth*bitCount+31) & ~31)>>3);
 	int nbpl = (((nwidth*bitCount+31) & ~31)>>3);
-        	
+
 	for(i = 0; i < nheight; i++) {
 	    int ooff = ((nheight-1-i)%cy) * obpl + ((i/cy) * nbpl);
 	    int noff = (nbpl * (nheight-1-i));
 	    memcpy(lpBits + noff, lpBitsOrg + ooff, nbpl);
 	}
     }
-    
+
     bmih->biWidth  = nwidth;
     bmih->biHeight = nheight;
 
diff --git a/dlls/comctl32/imagelist.h b/dlls/comctl32/imagelist.h
index d23166f..fe6666f 100644
--- a/dlls/comctl32/imagelist.h
+++ b/dlls/comctl32/imagelist.h
@@ -17,7 +17,7 @@
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
- 
+
 #ifndef __WINE_IMAGELIST_H
 #define __WINE_IMAGELIST_H
 
diff --git a/dlls/comctl32/ipaddress.c b/dlls/comctl32/ipaddress.c
index fd97f28..0043173 100644
--- a/dlls/comctl32/ipaddress.c
+++ b/dlls/comctl32/ipaddress.c
@@ -64,9 +64,9 @@
 static LRESULT IPADDRESS_Notify (IPADDRESS_INFO *infoPtr, UINT command)
 {
     HWND hwnd = infoPtr->Self;
-    
+
     TRACE("(command=%x)\n", command);
-    
+
     return SendMessageW (GetParent (hwnd), WM_COMMAND,
              MAKEWPARAM (GetWindowLongW (hwnd, GWL_ID), command), (LPARAM)hwnd);
 }
@@ -76,7 +76,7 @@
     NMIPADDRESS nmip;
 
     TRACE("(field=%x, value=%d)\n", field, value);
-    
+
     nmip.hdr.hwndFrom = infoPtr->Self;
     nmip.hdr.idFrom   = GetWindowLongW (infoPtr->Self, GWL_ID);
     nmip.hdr.code     = IPN_FIELDCHANGED;
@@ -88,7 +88,7 @@
                   (WPARAM)nmip.hdr.idFrom, (LPARAM)&nmip);
 
     TRACE("<-- %d\n", nmip.iValue);
-    
+
     return nmip.iValue;
 }
 
@@ -96,12 +96,12 @@
 static int IPADDRESS_GetPartIndex(IPADDRESS_INFO *infoPtr, HWND hwnd)
 {
     int i;
-    
+
     TRACE("(hwnd=%x)\n", hwnd);
-    
-    for (i = 0; i < 4; i++) 
+
+    for (i = 0; i < 4; i++)
         if (infoPtr->Part[i].EditHwnd == hwnd) return i;
-    
+
     ERR("We subclassed the wrong window! (hwnd=%x)\n", hwnd);
     return -1;
 }
@@ -114,7 +114,7 @@
     int i;
 
     TRACE("\n");
-    
+
     GetClientRect (infoPtr->Self, &rect);
     DrawEdge (hdc, &rect, EDGE_SUNKEN, BF_RECT | BF_ADJUST);
 
@@ -122,7 +122,7 @@
         GetWindowRect (infoPtr->Part[i].EditHwnd, &rcPart);
 	pt.x = rcPart.right;
 	ScreenToClient(infoPtr->Self, &pt);
-	rect.left = pt.x;	
+	rect.left = pt.x;
 	GetWindowRect (infoPtr->Part[i+1].EditHwnd, &rcPart);
 	pt.x = rcPart.left;
 	ScreenToClient(infoPtr->Self, &pt);
@@ -142,10 +142,10 @@
     WCHAR EDIT[] = { 'E', 'd', 'i', 't', 0 };
 
     TRACE("\n");
-    
+
     SetWindowLongW (hwnd, GWL_STYLE,
 		    GetWindowLongW(hwnd, GWL_STYLE) & ~WS_BORDER);
-    
+
     infoPtr = (IPADDRESS_INFO *)COMCTL32_Alloc (sizeof(IPADDRESS_INFO));
     if (!infoPtr) return -1;
     SetWindowLongW (hwnd, 0, (DWORD)infoPtr);
@@ -158,22 +158,22 @@
     edit.bottom = rcClient.bottom - 2;
 
     infoPtr->Self = hwnd;
-  
+
     for (i = 0; i < 4; i++) {
 	IPPART_INFO* part = &infoPtr->Part[i];
-	
+
 	part->LowerLimit = 0;
 	part->UpperLimit = 255;
         edit.left = rcClient.left + i*fieldsize + 6;
         edit.right = rcClient.left + (i+1)*fieldsize - 2;
         part->EditHwnd =
 		CreateWindowW (EDIT, NULL, WS_CHILD | WS_VISIBLE | ES_CENTER,
-                               edit.left, edit.top, edit.right - edit.left, 
-			       edit.bottom - edit.top, hwnd, (HMENU) 1, 
+                               edit.left, edit.top, edit.right - edit.left,
+			       edit.bottom - edit.top, hwnd, (HMENU) 1,
 			       GetWindowLongW (hwnd, GWL_HINSTANCE), NULL);
 	SetPropA(part->EditHwnd, IP_SUBCLASS_PROP, hwnd);
         part->OrigProc = (WNDPROC)
-		SetWindowLongW (part->EditHwnd, GWL_WNDPROC, 
+		SetWindowLongW (part->EditHwnd, GWL_WNDPROC,
 				(LONG)IPADDRESS_SubclassProc);
     }
 
@@ -186,7 +186,7 @@
     int i;
 
     TRACE("\n");
-    
+
     for (i = 0; i < 4; i++) {
 	IPPART_INFO* part = &infoPtr->Part[i];
         SetWindowLongW (part->EditHwnd, GWL_WNDPROC, (LONG)part->OrigProc);
@@ -203,9 +203,9 @@
     PAINTSTRUCT ps;
 
     TRACE("\n");
-    
+
     if (hdc) return IPADDRESS_Draw (infoPtr, hdc);
-  
+
     hdc = BeginPaint (infoPtr->Self, &ps);
     IPADDRESS_Draw (infoPtr, hdc);
     EndPaint (infoPtr->Self, &ps);
@@ -236,7 +236,7 @@
 
     for (i = 0; i < 4; i++) {
         ip_addr *= 256;
-        if (GetWindowTextW (infoPtr->Part[i].EditHwnd, field, 4)) 
+        if (GetWindowTextW (infoPtr->Part[i].EditHwnd, field, 4))
   	    ip_addr += atolW(field);
 	else
 	    invalid++;
@@ -267,7 +267,7 @@
 
     TRACE("\n");
 
-    for (i = 0; i < 4; i++) 
+    for (i = 0; i < 4; i++)
         SetWindowTextW (infoPtr->Part[i].EditHwnd, nil);
 }
 
@@ -297,13 +297,13 @@
 static void IPADDRESS_SetFocusToField (IPADDRESS_INFO *infoPtr, INT index)
 {
     TRACE("(index=%d)\n", index);
- 
+
     if (index > 3) {
 	for (index = 0; index < 4; index++)
 	    if (!GetWindowTextLengthW(infoPtr->Part[index].EditHwnd)) break;
     }
     if (index < 9 || index > 3) index = 0;
-	
+
     SetFocus (infoPtr->Part[index].EditHwnd);
 }
 
@@ -317,20 +317,20 @@
     TRACE("(currentfield=%d)\n", currentfield);
 
     if (currentfield < 0 || currentfield > 3) return FALSE;
-  
+
     if (!GetWindowTextW (part->EditHwnd, field, 4)) return FALSE;
-    
+
     curValue = atoiW(field);
     TRACE("  curValue=%d\n", curValue);
-    
+
     newValue = IPADDRESS_IPNotify(infoPtr, currentfield, curValue);
     TRACE("  newValue=%d\n", newValue);
 
     if (newValue < part->LowerLimit) newValue = part->LowerLimit;
     if (newValue > part->UpperLimit) newValue = part->UpperLimit;
-    
+
     if (newValue == curValue) return FALSE;
-    
+
     wsprintfW (field, fmt, newValue);
     TRACE("  field='%s'\n", debugstr_w(field));
     return SetWindowTextW (part->EditHwnd, field);
@@ -343,7 +343,7 @@
 
     if(cur >= -1 && cur < 4) {
 	IPADDRESS_ConstrainField(infoPtr, cur);
-	
+
 	if(cur < 3) {
 	    IPPART_INFO *next = &infoPtr->Part[cur + 1];
 	    int start = 0, end = 0;
@@ -357,7 +357,7 @@
 	    }
 	    return TRUE;
 	}
-		 
+
     }
     return FALSE;
 }
@@ -372,30 +372,30 @@
  *
  * alpha characters: completely ignored
  *
- * digits: accepted when field text length < 2 ignored otherwise. 
- *         when 3 numbers have been entered into the field the value 
- *         of the field is checked, if the field value exceeds the 
- *         maximum value and is changed the field remains the current 
- *         field, otherwise focus moves to the field to the right 
+ * digits: accepted when field text length < 2 ignored otherwise.
+ *         when 3 numbers have been entered into the field the value
+ *         of the field is checked, if the field value exceeds the
+ *         maximum value and is changed the field remains the current
+ *         field, otherwise focus moves to the field to the right
  *
- * tab: change focus from the current ipaddress control to the next 
- *      control in the tab order 
+ * tab: change focus from the current ipaddress control to the next
+ *      control in the tab order
  *
- * right arrow: move to the field on the right to the left most 
- *              position in that field if no text is selected, 
- *              we are in the right most position in the field, 
- *              we are not in the right most field 
+ * right arrow: move to the field on the right to the left most
+ *              position in that field if no text is selected,
+ *              we are in the right most position in the field,
+ *              we are not in the right most field
  *
- * left arrow: move to the field on the left to the right most 
- *             position in that field if no text is selected, 
- *             we are in the left most position in the current field 
- *             and we are not in the left most field 
+ * left arrow: move to the field on the left to the right most
+ *             position in that field if no text is selected,
+ *             we are in the left most position in the current field
+ *             and we are not in the left most field
  *
- * backspace: delete the character to the left of the cursor position, 
- *            if none are present move to the field on the left if 
- *            we are not in the left most field and delete the right 
- *            most digit in that field while keeping the cursor 
- *            on the right side of the field 
+ * backspace: delete the character to the left of the cursor position,
+ *            if none are present move to the field on the left if
+ *            we are not in the left most field and delete the right
+ *            most digit in that field while keeping the cursor
+ *            on the right side of the field
  */
 LRESULT CALLBACK
 IPADDRESS_SubclassProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
@@ -414,14 +414,14 @@
     if (uMsg == WM_CHAR || uMsg == WM_KEYDOWN) {
 	len = GetWindowTextLengthW (hwnd);
 	SendMessageW(hwnd, EM_GETSEL, (WPARAM)&startsel, (LPARAM)&endsel);
-    }	
+    }
     switch (uMsg) {
- 	case WM_CHAR: 
+ 	case WM_CHAR:
  	    if(isdigit(c)) {
 		if(len == 2 && startsel==endsel && endsel==len) {
 		    /* process the digit press before we check the field */
 		    int return_val = CallWindowProcW (part->OrigProc, hwnd, uMsg, wParam, lParam);
-          
+
 		    /* if the field value was changed stay at the current field */
 		    if(!IPADDRESS_ConstrainField(infoPtr, index))
 			IPADDRESS_GotoNextField (infoPtr, index, POS_DEFAULT);
@@ -429,14 +429,14 @@
 		    return return_val;
 		} else if (len == 3 && startsel==endsel && endsel==len)
 		    IPADDRESS_GotoNextField (infoPtr, index, POS_SELALL);
-		else if (len < 3) break; 
+		else if (len < 3) break;
 	    } else if(c == '.' || c == ' ') {
 		if(len && startsel==endsel && startsel != 0) {
-		    IPADDRESS_GotoNextField(infoPtr, index, POS_SELALL); 
+		    IPADDRESS_GotoNextField(infoPtr, index, POS_SELALL);
 		}
  	    } else if (c == VK_BACK) break;
 	    return 0;
-        
+
 	case WM_KEYDOWN:
 	    switch(c) {
 		case VK_RIGHT:
@@ -455,17 +455,17 @@
 		    if(startsel==endsel && startsel==0 && index > 0) {
 			IPPART_INFO *prev = &infoPtr->Part[index-1];
 			WCHAR val[10];
-			
+
 			if(GetWindowTextW(prev->EditHwnd, val, 5)) {
 			    val[lstrlenW(val) - 1] = 0;
 			    SetWindowTextW(prev->EditHwnd, val);
 			}
-				
+
 			IPADDRESS_GotoNextField(infoPtr, index - 2, POS_RIGHT);
 			return 0;
 		    }
 		    break;
-	    }		    
+	    }
 	    break;
 	case WM_KILLFOCUS:
 	    if (IPADDRESS_GetPartIndex(infoPtr, (HWND)wParam) < 0)
@@ -484,12 +484,12 @@
 IPADDRESS_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
 {
     IPADDRESS_INFO *infoPtr = IPADDRESS_GetInfoPtr (hwnd);
-  
+
     TRACE("(hwnd=0x%x msg=0x%x wparam=0x%x lparam=0x%lx)\n", hwnd, uMsg, wParam, lParam);
-  
+
     if (!infoPtr && (uMsg != WM_CREATE))
         return DefWindowProcW (hwnd, uMsg, wParam, lParam);
-  
+
     switch (uMsg)
     {
 	case WM_CREATE:
@@ -553,7 +553,7 @@
     wndClass.hCursor       = LoadCursorW (0, IDC_IBEAMW);
     wndClass.hbrBackground = GetStockObject(WHITE_BRUSH);
     wndClass.lpszClassName = WC_IPADDRESSW;
- 
+
     RegisterClassW (&wndClass);
 }
 
diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c
index ea2a7b4..88fa902 100644
--- a/dlls/comctl32/listview.c
+++ b/dlls/comctl32/listview.c
@@ -22,7 +22,7 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  *
  * NOTES
- * Listview control implementation. 
+ * Listview control implementation.
  *
  * TODO:
  *   1. No horizontal scrolling when header is larger than the client area.
@@ -34,18 +34,18 @@
  *
  * Data structure:
  *   LISTVIEW_SetItemCount : not completed for non OWNERDATA
- * 
+ *
  * Advanced functionality:
  *   LISTVIEW_GetNumberOfWorkAreas : not implemented
  *   LISTVIEW_GetHotCursor : not implemented
- *   LISTVIEW_GetISearchString : not implemented 
+ *   LISTVIEW_GetISearchString : not implemented
  *   LISTVIEW_GetBkImage : not implemented
  *   LISTVIEW_SetBkImage : not implemented
  *   LISTVIEW_GetColumnOrderArray : simple hack only
  *   LISTVIEW_SetColumnOrderArray : simple hack only
  *   LISTVIEW_Arrange : empty stub
  *   LISTVIEW_ApproximateViewRect : incomplete
- *   LISTVIEW_Scroll : not implemented 
+ *   LISTVIEW_Scroll : not implemented
  *   LISTVIEW_Update : not completed
  *
  * Known differences in message stream from native control (not known if
@@ -76,7 +76,7 @@
 
 WINE_DEFAULT_DEBUG_CHANNEL(listview);
 
-/* Some definitions for inline edit control */    
+/* Some definitions for inline edit control */
 typedef BOOL (*EditlblCallbackW)(HWND, LPWSTR, DWORD);
 typedef BOOL (*EditlblCallbackA)(HWND, LPWSTR, DWORD);
 
@@ -86,7 +86,7 @@
   DWORD          distance;     /* distance to closest item    */
   INT            iDistItem;    /* item number that is closest */
 } LV_INTHIT, *LPLV_INTHIT;
-	
+
 
 typedef struct tagEDITLABEL_ITEM
 {
@@ -166,7 +166,7 @@
 } LISTVIEW_INFO;
 
 /*
- * constants 
+ * constants
  */
 
 /* maximum size of a label */
@@ -199,7 +199,7 @@
 #define DEFAULT_LABEL_WIDTH 40
 
 /* default column width for items in list display mode */
-#define DEFAULT_COLUMN_WIDTH 96 
+#define DEFAULT_COLUMN_WIDTH 96
 
 /* Increment size of the horizontal scroll bar */
 #define LISTVIEW_SCROLL_DIV_SIZE 10
@@ -212,19 +212,19 @@
 
 /* Border for the icon caption */
 #define CAPTION_BORDER  2
-/* 
+/*
  * macros
  */
 /* retrieve the number of items in the listview */
 #define GETITEMCOUNT(infoPtr) ((infoPtr)->hdpaItems->nItemCount)
 #define HDM_INSERTITEMT(isW) ( (isW) ? HDM_INSERTITEMW : HDM_INSERTITEMA )
 
-HWND CreateEditLabelT(LPCWSTR text, DWORD style, INT x, INT y, 
-	INT width, INT height, HWND parent, HINSTANCE hinst, 
+HWND CreateEditLabelT(LPCWSTR text, DWORD style, INT x, INT y,
+	INT width, INT height, HWND parent, HINSTANCE hinst,
 	EditlblCallbackW EditLblCb, DWORD param, BOOL isW);
- 
-/* 
- * forward declarations 
+
+/*
+ * forward declarations
  */
 static LRESULT LISTVIEW_GetItemT(HWND hwnd, LPLVITEMW lpLVItem, BOOL internal, BOOL isW);
 static INT LISTVIEW_SuperHitTestItem(HWND, LPLV_INTHIT, BOOL);
@@ -325,8 +325,8 @@
 static inline LPWSTR textdupTtoW(LPCWSTR text, BOOL isW)
 {
   LPWSTR wstr = (LPWSTR)text;
-  
-  TRACE("(text=%s, isW=%d)\n", debugstr_t(text, isW), isW);  
+
+  TRACE("(text=%s, isW=%d)\n", debugstr_t(text, isW), isW);
   if (!isW && text)
   {
     INT len = MultiByteToWideChar(CP_ACP, 0, (LPCSTR)text, -1, NULL, 0);
@@ -356,7 +356,7 @@
     return bResult;
 }
 
-static inline LRESULT CallWindowProcT(WNDPROC proc, HWND hwnd, UINT uMsg, 
+static inline LRESULT CallWindowProcT(WNDPROC proc, HWND hwnd, UINT uMsg,
 		                      WPARAM wParam, LPARAM lParam, BOOL isW)
 {
   if (isW)
@@ -370,7 +370,7 @@
   pnmh->hwndFrom = self;
   pnmh->idFrom = GetWindowLongW(self, GWL_ID);
   pnmh->code = code;
-  return (BOOL)SendMessageW(GetParent(self), WM_NOTIFY, 
+  return (BOOL)SendMessageW(GetParent(self), WM_NOTIFY,
 		            (WPARAM)pnmh->idFrom, (LPARAM)pnmh);
 }
 
@@ -386,7 +386,7 @@
 }
 
 static int tabNotification[] = {
-  LVN_BEGINLABELEDITW, LVN_BEGINLABELEDITA, 
+  LVN_BEGINLABELEDITW, LVN_BEGINLABELEDITA,
   LVN_ENDLABELEDITW, LVN_ENDLABELEDITA,
   LVN_GETDISPINFOW, LVN_GETDISPINFOA,
   LVN_SETDISPINFOW, LVN_SETDISPINFOA,
@@ -405,7 +405,7 @@
 }
 
 /*
-  Send notification. depends on dispinfoW having same 
+  Send notification. depends on dispinfoW having same
   structure as dispinfoA.
   self : listview handle
   notificationCode : *Unicode* notification code
@@ -437,7 +437,7 @@
     if (!isW && infoPtr->notifyFormat == NFR_UNICODE)
         convertToUnicode = TRUE;
   }
-  
+
   if (convertToAnsi || convertToUnicode)
   {
     TRACE("   we have to convert the text to the correct format\n");
@@ -450,11 +450,11 @@
     else
       cchTempBufMax = pdi->item.cchTextMax;
 
-    pszTempBuf = HeapAlloc(GetProcessHeap(), 0, 
+    pszTempBuf = HeapAlloc(GetProcessHeap(), 0,
         (convertToUnicode ? sizeof(WCHAR) : sizeof(CHAR)) * cchTempBufMax);
     if (!pszTempBuf) return FALSE;
     if (convertToUnicode)
-      MultiByteToWideChar(CP_ACP, 0, (LPCSTR)pdi->item.pszText, -1, 
+      MultiByteToWideChar(CP_ACP, 0, (LPCSTR)pdi->item.pszText, -1,
                           pszTempBuf, cchTempBufMax);
     else
       WideCharToMultiByte(CP_ACP, 0, pdi->item.pszText, -1, (LPSTR) pszTempBuf,
@@ -464,10 +464,10 @@
     savPszText = pdi->item.pszText;
     pdi->item.pszText = pszTempBuf;
     pdi->item.cchTextMax = cchTempBufMax;
-  } 
-  
+  }
+
   bResult = notify(self, realNotifCode, (LPNMHDR)pdi);
-  
+
   if (convertToUnicode || convertToAnsi)
   { /* convert back result */
     TRACE("   returned text=%s\n", debugstr_t(pdi->item.pszText, convertToUnicode));
@@ -505,12 +505,12 @@
   char* buf = buffers[index++ % 20];
   if (lpLVItem == NULL) return "(null)";
   snprintf(buf, 256, "{mask=%x, iItem=%d, iSubItem=%d, state=%x, stateMask=%x,"
-           " pszText=%s, cchTextMax=%d, iImage=%d, lParam=%lx, iIndent=%d}", 
-	   lpLVItem->mask, lpLVItem->iItem, lpLVItem->iSubItem, 
-	   lpLVItem->state, lpLVItem->stateMask, 
+           " pszText=%s, cchTextMax=%d, iImage=%d, lParam=%lx, iIndent=%d}",
+	   lpLVItem->mask, lpLVItem->iItem, lpLVItem->iSubItem,
+	   lpLVItem->state, lpLVItem->stateMask,
 	   lpLVItem->pszText == LPSTR_TEXTCALLBACKW ? "(callback)" :
-	     debugstr_tn(lpLVItem->pszText, isW, 80), 
-	   lpLVItem->cchTextMax, lpLVItem->iImage, lpLVItem->lParam, 
+	     debugstr_tn(lpLVItem->pszText, isW, 80),
+	   lpLVItem->cchTextMax, lpLVItem->iImage, lpLVItem->lParam,
 	   lpLVItem->iIndent);
   return buf;
 }
@@ -522,10 +522,10 @@
   char* buf = buffers[index++ % 20];
   if (lpColumn == NULL) return "(null)";
   snprintf(buf, 256, "{mask=%x, fmt=%x, cx=%d,"
-           " pszText=%s, cchTextMax=%d, iSubItem=%d}", 
-	   lpColumn->mask, lpColumn->fmt, lpColumn->cx, 
+           " pszText=%s, cchTextMax=%d, iSubItem=%d}",
+	   lpColumn->mask, lpColumn->fmt, lpColumn->cx,
 	   lpColumn->mask & LVCF_TEXT ? lpColumn->pszText == LPSTR_TEXTCALLBACKW ? "(callback)" :
-	     debugstr_tn(lpColumn->pszText, isW, 80): "", 
+	     debugstr_tn(lpColumn->pszText, isW, 80): "",
 	   lpColumn->mask & LVCF_TEXT ? lpColumn->cchTextMax: 0, lpColumn->iSubItem);
   return buf;
 }
@@ -573,7 +573,7 @@
 
 static BOOL
 LISTVIEW_SendCustomDrawItemNotify (HWND hwnd, HDC hdc,
-                                   UINT iItem, UINT iSubItem, 
+                                   UINT iItem, UINT iSubItem,
                                    UINT uItemDrawState)
 {
  LISTVIEW_INFO *infoPtr;
@@ -636,20 +636,20 @@
 /*************************************************************************
  *		LISTVIEW_ProcessLetterKeys
  *
- *  Processes keyboard messages generated by pressing the letter keys 
+ *  Processes keyboard messages generated by pressing the letter keys
  *  on the keyboard.
- *  What this does is perform a case insensitive search from the 
+ *  What this does is perform a case insensitive search from the
  *  current position with the following quirks:
- *  - If two chars or more are pressed in quick succession we search 
+ *  - If two chars or more are pressed in quick succession we search
  *    for the corresponding string (e.g. 'abc').
- *  - If there is a delay we wipe away the current search string and 
+ *  - If there is a delay we wipe away the current search string and
  *    restart with just that char.
- *  - If the user keeps pressing the same character, whether slowly or 
- *    fast, so that the search string is entirely composed of this 
- *    character ('aaaaa' for instance), then we search for first item 
+ *  - If the user keeps pressing the same character, whether slowly or
+ *    fast, so that the search string is entirely composed of this
+ *    character ('aaaaa' for instance), then we search for first item
  *    that starting with that character.
- *  - If the user types the above character in quick succession, then 
- *    we must also search for the corresponding string ('aaaaa'), and 
+ *  - If the user types the above character in quick succession, then
+ *    we must also search for the corresponding string ('aaaaa'), and
  *    go to that string if there is a match.
  *
  * RETURNS
@@ -658,10 +658,10 @@
  *
  * BUGS
  *
- *  - The current implementation has a list of characters it will 
- *    accept and it ignores averything else. In particular it will 
- *    ignore accentuated characters which seems to match what 
- *    Windows does. But I'm not sure it makes sense to follow 
+ *  - The current implementation has a list of characters it will
+ *    accept and it ignores averything else. In particular it will
+ *    ignore accentuated characters which seems to match what
+ *    Windows does. But I'm not sure it makes sense to follow
  *    Windows there.
  *  - We don't sound a beep when the search fails.
  *
@@ -788,7 +788,7 @@
 }
 
 /*************************************************************************
- * LISTVIEW_UpdateHeaderSize [Internal] 
+ * LISTVIEW_UpdateHeaderSize [Internal]
  *
  * Function to resize the header control
  *
@@ -824,9 +824,9 @@
 
 /***
  * DESCRIPTION:
- * Update the scrollbars. This functions should be called whenever 
+ * Update the scrollbars. This functions should be called whenever
  * the content, size or view changes.
- * 
+ *
  * PARAMETER(S):
  * [I] HWND : window handle
  *
@@ -835,7 +835,7 @@
  */
 static VOID LISTVIEW_UpdateScroll(HWND hwnd)
 {
-  LISTVIEW_INFO *infoPtr = (LISTVIEW_INFO *)GetWindowLongW(hwnd, 0); 
+  LISTVIEW_INFO *infoPtr = (LISTVIEW_INFO *)GetWindowLongW(hwnd, 0);
   LONG lStyle = GetWindowLongW(hwnd, GWL_STYLE);
   UINT uView =  lStyle & LVS_TYPEMASK;
   INT nListHeight = infoPtr->rcList.bottom - infoPtr->rcList.top;
@@ -843,7 +843,7 @@
   SCROLLINFO scrollInfo;
 
   if (lStyle & LVS_NOSCROLL) return;
-  
+
   ZeroMemory(&scrollInfo, sizeof(SCROLLINFO));
   scrollInfo.cbSize = sizeof(SCROLLINFO);
 
@@ -882,16 +882,16 @@
 
     /* update horizontal scrollbar */
     nListWidth = infoPtr->rcList.right - infoPtr->rcList.left;
-    if (GetScrollInfo(hwnd, SB_HORZ, &scrollInfo) == FALSE 
+    if (GetScrollInfo(hwnd, SB_HORZ, &scrollInfo) == FALSE
        || GETITEMCOUNT(infoPtr) == 0)
     {
       scrollInfo.nPos = 0;
-    } 
+    }
     scrollInfo.nMin = 0;
-    scrollInfo.fMask = SIF_RANGE | SIF_POS | SIF_PAGE  ; 
+    scrollInfo.fMask = SIF_RANGE | SIF_POS | SIF_PAGE  ;
     scrollInfo.nPage = nListWidth / LISTVIEW_SCROLL_DIV_SIZE;
     scrollInfo.nMax = max(infoPtr->nItemWidth / LISTVIEW_SCROLL_DIV_SIZE, 0)-1;
-    SetScrollInfo(hwnd, SB_HORZ, &scrollInfo, TRUE); 
+    SetScrollInfo(hwnd, SB_HORZ, &scrollInfo, TRUE);
 
     /* Update the Header Control */
     scrollInfo.fMask = SIF_POS;
@@ -942,7 +942,7 @@
  * DESCRIPTION:
  * Prints a message for unsupported window styles.
  * A kind of TODO list for window styles.
- * 
+ *
  * PARAMETER(S):
  * [I] LONG : window style
  *
@@ -973,7 +973,7 @@
 /***
  * DESCRIPTION:
  * Aligns the items with the top edge of the window.
- * 
+ *
  * PARAMETER(S):
  * [I] HWND : window handle
  *
@@ -988,12 +988,12 @@
   POINT ptItem;
   RECT rcView;
   INT i, off_x=0, off_y=0;
-  
+
   if ((uView == LVS_SMALLICON) || (uView == LVS_ICON))
   {
     /* Since SetItemPosition uses upper-left of icon, and for
        style=LVS_ICON the icon is not left adjusted, get the offset */
-    if (uView == LVS_ICON) 
+    if (uView == LVS_ICON)
     {
       off_y = ICON_TOP_PADDING;
       off_x = (infoPtr->iconSpacing.cx - infoPtr->iconSize.cx) / 2;
@@ -1011,7 +1011,7 @@
           ptItem.x = off_x;
           ptItem.y += infoPtr->nItemHeight;
         }
-        
+
         LISTVIEW_SetItemPosition(hwnd, i, ptItem.x, ptItem.y);
         ptItem.x += infoPtr->nItemWidth;
         rcView.right = max(rcView.right, ptItem.x);
@@ -1038,7 +1038,7 @@
 /***
  * DESCRIPTION:
  * Aligns the items with the left edge of the window.
- * 
+ *
  * PARAMETER(S):
  * [I] HWND : window handle
  *
@@ -1053,12 +1053,12 @@
   POINT ptItem;
   RECT rcView;
   INT i, off_x=0, off_y=0;
-  
+
   if ((uView == LVS_SMALLICON) || (uView == LVS_ICON))
   {
     /* Since SetItemPosition uses upper-left of icon, and for
        style=LVS_ICON the icon is not left adjusted, get the offset */
-    if (uView == LVS_ICON) 
+    if (uView == LVS_ICON)
     {
       off_y = ICON_TOP_PADDING;
       off_x = (infoPtr->iconSpacing.cx - infoPtr->iconSize.cx) / 2;
@@ -1103,7 +1103,7 @@
 /***
  * DESCRIPTION:
  * Set the bounding rectangle of all the items.
- * 
+ *
  * PARAMETER(S):
  * [I] HWND : window handle
  * [I] LPRECT : bounding rectangle
@@ -1117,9 +1117,9 @@
   LISTVIEW_INFO *infoPtr = (LISTVIEW_INFO*)GetWindowLongW(hwnd, 0);
   BOOL bResult = FALSE;
 
-  TRACE("(hwnd=%x, left=%d, top=%d, right=%d, bottom=%d)\n", hwnd, 
+  TRACE("(hwnd=%x, left=%d, top=%d, right=%d, bottom=%d)\n", hwnd,
         lprcView->left, lprcView->top, lprcView->right, lprcView->bottom);
-  
+
   if (lprcView != NULL)
   {
     bResult = TRUE;
@@ -1135,7 +1135,7 @@
 /***
  * DESCRIPTION:
  * Retrieves the bounding rectangle of all the items.
- * 
+ *
  * PARAMETER(S):
  * [I] HWND : window handle
  * [O] LPRECT : bounding rectangle
@@ -1163,7 +1163,7 @@
       lprcView->bottom = infoPtr->rcView.bottom + ptOrigin.y;
     }
 
-    TRACE("(left=%d, top=%d, right=%d, bottom=%d)\n", 
+    TRACE("(left=%d, top=%d, right=%d, bottom=%d)\n",
           lprcView->left, lprcView->top, lprcView->right, lprcView->bottom);
   }
 
@@ -1173,7 +1173,7 @@
 /***
  * DESCRIPTION:
  * Retrieves the subitem pointer associated with the subitem index.
- * 
+ *
  * PARAMETER(S):
  * [I] HDPA : DPA handle for a specific item
  * [I] INT : index of subitem
@@ -1182,7 +1182,7 @@
  *   SUCCESS : subitem pointer
  *   FAILURE : NULL
  */
-static LISTVIEW_SUBITEM* LISTVIEW_GetSubItemPtr(HDPA hdpaSubItems, 
+static LISTVIEW_SUBITEM* LISTVIEW_GetSubItemPtr(HDPA hdpaSubItems,
                                                 INT nSubItem)
 {
   LISTVIEW_SUBITEM *lpSubItem;
@@ -1206,7 +1206,7 @@
 /***
  * DESCRIPTION:
  * Calculates the width of an item.
- * 
+ *
  * PARAMETER(S):
  * [I] HWND : window handle
  * [I] LONG : window style
@@ -1217,8 +1217,8 @@
 static INT LISTVIEW_GetItemWidth(HWND hwnd)
 {
   LISTVIEW_INFO *infoPtr = (LISTVIEW_INFO *)GetWindowLongW(hwnd, 0);
-  LONG style = GetWindowLongW(hwnd, GWL_STYLE); 
-  UINT uView = style & LVS_TYPEMASK; 
+  LONG style = GetWindowLongW(hwnd, GWL_STYLE);
+  UINT uView = style & LVS_TYPEMASK;
   INT nHeaderItemCount;
   RECT rcHeaderItem;
   INT nItemWidth = 0;
@@ -1246,11 +1246,11 @@
   else
   {
     for (i = 0; i < GETITEMCOUNT(infoPtr); i++)
-    { 
+    {
       nLabelWidth = LISTVIEW_GetLabelWidth(hwnd, i);
       nItemWidth = max(nItemWidth, nLabelWidth);
     }
-    
+
     /* default label size */
     if (GETITEMCOUNT(infoPtr) == 0)
     {
@@ -1266,7 +1266,7 @@
       {
         /* add padding */
         nItemWidth += WIDTH_PADDING;
-      
+
         if (infoPtr->himlSmall != NULL)
         {
           nItemWidth += infoPtr->iconSize.cx;
@@ -1290,10 +1290,10 @@
 /***
  * DESCRIPTION:
  * Calculates the width of a specific item.
- * 
+ *
  * PARAMETER(S):
  * [I] HWND : window handle
- * [I] LPSTR : string  
+ * [I] LPSTR : string
  *
  * RETURN:
  * Returns the width of an item width a specified string.
@@ -1345,7 +1345,7 @@
       {
         /* add padding */
         nItemWidth += WIDTH_PADDING;
-      
+
         if (infoPtr->himlSmall != NULL)
         {
           nItemWidth += infoPtr->iconSize.cx;
@@ -1358,7 +1358,7 @@
       }
     }
   }
-  
+
   return nItemWidth;
 }
 
@@ -1396,7 +1396,7 @@
 /***
  * DESCRIPTION:
  * Calculates the height of an item.
- * 
+ *
  * PARAMETER(S):
  * [I] HWND : window handle
  *
@@ -1454,18 +1454,18 @@
  * <0 : if Item 2 > Item 1
  * 0 : if Item 1 == Item 2
  */
-static INT CALLBACK LISTVIEW_CompareSelectionRanges(LPVOID range1, LPVOID range2, 
+static INT CALLBACK LISTVIEW_CompareSelectionRanges(LPVOID range1, LPVOID range2,
                                                     LPARAM flags)
 {
   int l1 = ((LISTVIEW_SELECTION*)(range1))->lower;
   int l2 = ((LISTVIEW_SELECTION*)(range2))->lower;
   int u1 = ((LISTVIEW_SELECTION*)(range1))->upper;
-  int u2 = ((LISTVIEW_SELECTION*)(range2))->upper; 
+  int u2 = ((LISTVIEW_SELECTION*)(range2))->upper;
   int rc=0;
 
   if (u1 < l2)
     rc= -1;
- 
+
   if (u2 < l1)
      rc= 1;
 
@@ -1475,11 +1475,11 @@
 /**
 * DESCRIPTION:
 * Adds a selection range.
-* 
+*
 * PARAMETER(S):
 * [I] HWND : window handle
 * [I] INT : lower item index
-* [I] INT : upper item index 
+* [I] INT : upper item index
 *
 * RETURN:
 * None
@@ -1513,7 +1513,7 @@
    index = DPA_Search(infoPtr->hdpaSelectionRanges, selection, 0,
                       LISTVIEW_CompareSelectionRanges,
                       0,0);
-   selection->upper --; 
+   selection->upper --;
    if (lowerzero)
      lowerzero=FALSE;
    else
@@ -1524,25 +1524,25 @@
      checkselection = DPA_GetPtr(infoPtr->hdpaSelectionRanges,index);
      TRACE("Merge with index %i (%lu - %lu)\n",index,checkselection->lower,
            checkselection->upper);
-     
+
      checkselection->lower = min(selection->lower,checkselection->lower);
      checkselection->upper = max(selection->upper,checkselection->upper);
-    
-     TRACE("New range (%lu - %lu)\n", checkselection->lower, 
+
+     TRACE("New range (%lu - %lu)\n", checkselection->lower,
            checkselection->upper);
 
-     COMCTL32_Free(selection);    
- 
+     COMCTL32_Free(selection);
+
      /* merge now common selection ranges in the lower group*/
      do
      {
-        checkselection->upper ++; 
+        checkselection->upper ++;
         if (checkselection->lower == 0)
           lowerzero = TRUE;
         else
           checkselection->lower --;
 
-        TRACE("search lower range (%lu - %lu)\n", checkselection->lower, 
+        TRACE("search lower range (%lu - %lu)\n", checkselection->lower,
               checkselection->upper);
 
         /* not sorted yet */
@@ -1550,7 +1550,7 @@
                                 LISTVIEW_CompareSelectionRanges, 0,
                                 0);
 
-        checkselection->upper --; 
+        checkselection->upper --;
         if (lowerzero)
           lowerzero = FALSE;
         else
@@ -1561,7 +1561,7 @@
 	  TRACE("Merge with index %i\n",mergeindex);
           checkselection2 = DPA_GetPtr(infoPtr->hdpaSelectionRanges,
                                        mergeindex);
-          checkselection->lower = min(checkselection->lower, 
+          checkselection->lower = min(checkselection->lower,
                                       checkselection2->lower);
           checkselection->upper = max(checkselection->upper,
                                       checkselection2->upper);
@@ -1578,10 +1578,10 @@
        checkselection->upper ++;
        if (checkselection->lower == 0)
          lowerzero = TRUE;
-       else 
+       else
          checkselection->lower --;
 
-       TRACE("search upper range %i (%lu - %lu)\n",index, 
+       TRACE("search upper range %i (%lu - %lu)\n",index,
              checkselection->lower, checkselection->upper);
 
        /* not sorted yet */
@@ -1590,7 +1590,7 @@
 			       LISTVIEW_CompareSelectionRanges, 0,
 			       0);
 
-       checkselection->upper --; 
+       checkselection->upper --;
        if (lowerzero)
          lowerzero = FALSE;
        else
@@ -1601,7 +1601,7 @@
 	 TRACE("Merge with index %i\n",mergeindex);
 	 checkselection2 = DPA_GetPtr(infoPtr->hdpaSelectionRanges,
 				      mergeindex);
-	 checkselection->lower = min(checkselection->lower, 
+	 checkselection->lower = min(checkselection->lower,
 				     checkselection2->lower);
 	 checkselection->upper = max(checkselection->upper,
 				     checkselection2->upper);
@@ -1615,21 +1615,21 @@
    {
 
      index = DPA_Search(infoPtr->hdpaSelectionRanges, selection, 0,
-                       LISTVIEW_CompareSelectionRanges, 0, 
+                       LISTVIEW_CompareSelectionRanges, 0,
                        DPAS_INSERTAFTER);
 
      TRACE("Insert before index %i\n",index);
      if (index == -1)
        index = 0;
-     DPA_InsertPtr(infoPtr->hdpaSelectionRanges,index,selection); 
+     DPA_InsertPtr(infoPtr->hdpaSelectionRanges,index,selection);
    }
- } 
+ }
  else
  {
    DPA_InsertPtr(infoPtr->hdpaSelectionRanges,0,selection);
  }
  /*
-  * Incase of error 
+  * Incase of error
   */
  DPA_Sort(infoPtr->hdpaSelectionRanges,LISTVIEW_CompareSelectionRanges,0);
  LISTVIEW_PrintSelectionRanges(hwnd);
@@ -1638,10 +1638,10 @@
 /**
 * DESCRIPTION:
 * check if a specified index is selected.
-* 
+*
 * PARAMETER(S):
 * [I] HWND : window handle
-* [I] INT : item index 
+* [I] INT : item index
 *
 * RETURN:
 * None
@@ -1681,7 +1681,7 @@
   LISTVIEW_SELECTION *selection;
   INT i;
   LVITEMW item;
-  
+
   TRACE("(0x%x)\n",hwnd);
 
   ZeroMemory(&item,sizeof(item));
@@ -1697,21 +1697,21 @@
         LISTVIEW_SetItemState(hwnd,i,&item);
       LISTVIEW_RemoveSelectionRange(hwnd,selection->lower,selection->upper);
     }
-  } 
+  }
   while (infoPtr->hdpaSelectionRanges->nItemCount>0);
 
   TRACE("done\n");
-  return TRUE; 
+  return TRUE;
 }
 
 /**
 * DESCRIPTION:
 * Removes a range selections.
-* 
+*
 * PARAMETER(S):
 * [I] HWND : window handle
 * [I] INT : lower item index
-* [I] INT : upper item index 
+* [I] INT : upper item index
 *
 * RETURN:
 * None
@@ -1731,11 +1731,11 @@
   index = DPA_Search(infoPtr->hdpaSelectionRanges, &removeselection, 0,
                      LISTVIEW_CompareSelectionRanges,
                      0,0);
-  
+
   if (index == -1)
     return;
 
- 
+
   checkselection = DPA_GetPtr(infoPtr->hdpaSelectionRanges,
                               index);
 
@@ -1743,14 +1743,14 @@
         checkselection->upper);
 
   /* case 1: Same */
-  if ((checkselection->upper == removeselection.upper) && 
+  if ((checkselection->upper == removeselection.upper) &&
      (checkselection->lower == removeselection.lower))
   {
     DPA_DeletePtr(infoPtr->hdpaSelectionRanges,index);
     TRACE("Case 1\n");
   }
   /* case 2: engulf */
-  else if (((checkselection->upper < removeselection.upper) && 
+  else if (((checkselection->upper < removeselection.upper) &&
       (checkselection->lower > removeselection.lower))||
      ((checkselection->upper <= removeselection.upper) &&
       (checkselection->lower > removeselection.lower)) ||
@@ -1788,7 +1788,7 @@
   {
     /* bisect the range */
     LISTVIEW_SELECTION *newselection;
-    
+
     newselection = (LISTVIEW_SELECTION *)
                           COMCTL32_Alloc(sizeof(LISTVIEW_SELECTION));
     newselection -> lower = checkselection->lower;
@@ -1804,10 +1804,10 @@
 /**
 * DESCRIPTION:
 * Updates the various indices after an item has been inserted or deleted.
-* 
+*
 * PARAMETER(S):
 * [I] HWND : window handle
-* [I] INT : item index 
+* [I] INT : item index
 * [I] INT : Direction of shift, +1 or -1.
 *
 * RETURN:
@@ -1828,7 +1828,7 @@
                      LISTVIEW_CompareSelectionRanges,
                      0,DPAS_SORTED|DPAS_INSERTAFTER);
 
-  while ((index < infoPtr->hdpaSelectionRanges->nItemCount)&&(index != -1)) 
+  while ((index < infoPtr->hdpaSelectionRanges->nItemCount)&&(index != -1))
   {
     checkselection = DPA_GetPtr(infoPtr->hdpaSelectionRanges,index);
     if ((checkselection->lower >= nItem)&&
@@ -1872,10 +1872,10 @@
 /**
  * DESCRIPTION:
  * Adds a block of selections.
- * 
+ *
  * PARAMETER(S):
  * [I] HWND : window handle
- * [I] INT : item index 
+ * [I] INT : item index
  *
  * RETURN:
  * None
@@ -1906,10 +1906,10 @@
 /***
  * DESCRIPTION:
  * Adds a single selection.
- * 
+ *
  * PARAMETER(S):
  * [I] HWND : window handle
- * [I] INT : item index 
+ * [I] INT : item index
  *
  * RETURN:
  * None
@@ -1932,13 +1932,13 @@
 /***
  * DESCRIPTION:
  * Selects or unselects an item.
- * 
+ *
  * PARAMETER(S):
  * [I] HWND : window handle
- * [I] INT : item index 
+ * [I] INT : item index
  *
  * RETURN:
- *   SELECT: TRUE 
+ *   SELECT: TRUE
  *   UNSELECT : FALSE
  */
 static BOOL LISTVIEW_ToggleSelection(HWND hwnd, INT nItem)
@@ -1970,11 +1970,11 @@
 
 /***
  * DESCRIPTION:
- * Selects items based on view coordinates. 
- * 
+ * Selects items based on view coordinates.
+ *
  * PARAMETER(S):
  * [I] HWND : window handle
- * [I] RECT : selection rectangle  
+ * [I] RECT : selection rectangle
  *
  * RETURN:
  * None
@@ -2004,13 +2004,13 @@
 /***
  * DESCRIPTION:
  * Sets a single group selection.
- * 
+ *
  * PARAMETER(S):
  * [I] HWND : window handle
- * [I] INT : item index 
+ * [I] INT : item index
  *
  * RETURN:
- * None 
+ * None
  */
 static VOID LISTVIEW_SetGroupSelection(HWND hwnd, INT nItem)
 {
@@ -2071,10 +2071,10 @@
 /***
  * DESCRIPTION:
  * Manages the item focus.
- * 
+ *
  * PARAMETER(S):
  * [I] HWND : window handle
- * [I] INT : item index 
+ * [I] INT : item index
  *
  * RETURN:
  *   TRUE : focused item changed
@@ -2095,7 +2095,7 @@
       infoPtr->nFocusedItem = -1;
       ZeroMemory(&lvItem, sizeof(lvItem));
       lvItem.stateMask = LVIS_FOCUSED;
-      ListView_SetItemState(hwnd, oldFocus, &lvItem); 
+      ListView_SetItemState(hwnd, oldFocus, &lvItem);
 
     }
 
@@ -2106,17 +2106,17 @@
     infoPtr->nFocusedItem = nItem;
     ListView_EnsureVisible(hwnd, nItem, FALSE);
   }
-  
-  return bResult; 
+
+  return bResult;
 }
 
 /***
  * DESCRIPTION:
  * Sets a single selection.
- * 
+ *
  * PARAMETER(S):
  * [I] HWND : window handle
- * [I] INT : item index 
+ * [I] INT : item index
  *
  * RETURN:
  * None
@@ -2128,7 +2128,7 @@
 
   ZeroMemory(&lvItem, sizeof(lvItem));
   lvItem.stateMask = LVIS_FOCUSED;
-  ListView_SetItemState(hwnd, infoPtr->nFocusedItem, &lvItem); 
+  ListView_SetItemState(hwnd, infoPtr->nFocusedItem, &lvItem);
 
   LISTVIEW_RemoveAllSelections(hwnd);
 
@@ -2143,10 +2143,10 @@
 /***
  * DESCRIPTION:
  * Set selection(s) with keyboard.
- * 
+ *
  * PARAMETER(S):
  * [I] HWND : window handle
- * [I] INT : item index 
+ * [I] INT : item index
  *
  * RETURN:
  *   SUCCESS : TRUE (needs to be repainted)
@@ -2165,7 +2165,7 @@
     if (lStyle & LVS_SINGLESEL)
     {
       bResult = TRUE;
-      LISTVIEW_SetSelection(hwnd, nItem); 
+      LISTVIEW_SetSelection(hwnd, nItem);
       ListView_EnsureVisible(hwnd, nItem, FALSE);
     }
     else
@@ -2173,7 +2173,7 @@
       if (wShift)
       {
         bResult = TRUE;
-        LISTVIEW_SetGroupSelection(hwnd, nItem); 
+        LISTVIEW_SetGroupSelection(hwnd, nItem);
       }
       else if (wCtrl)
       {
@@ -2182,7 +2182,7 @@
       else
       {
         bResult = TRUE;
-        LISTVIEW_SetSelection(hwnd, nItem); 
+        LISTVIEW_SetSelection(hwnd, nItem);
         ListView_EnsureVisible(hwnd, nItem, FALSE);
       }
     }
@@ -2207,7 +2207,7 @@
  * INFO:
  * LVS_EX_TRACKSELECT: An item is automatically selected when the cursor remains
  * over the item for a certain period of time.
- * 
+ *
  */
 static LRESULT LISTVIEW_MouseHover(HWND hwnd, WPARAM wParam, LPARAM lParam)
 {
@@ -2241,7 +2241,7 @@
 {
   LISTVIEW_INFO *infoPtr = (LISTVIEW_INFO *)GetWindowLongW(hwnd, 0);
   TRACKMOUSEEVENT trackinfo;
- 
+
   /* see if we are supposed to be tracking mouse hovering */
   if(infoPtr->dwExStyle & LVS_EX_TRACKSELECT) {
      /* fill in the trackinfo struct */
@@ -2260,14 +2260,14 @@
        _TrackMouseEvent(&trackinfo);
     }
   }
-  
+
   return 0;
 }
 
 /***
  * DESCRIPTION:
  * Selects an item based on coordinates.
- * 
+ *
  * PARAMETER(S):
  * [I] HWND : window handle
  * [I] POINT : mouse click ccordinates
@@ -2287,7 +2287,7 @@
   topindex = ListView_GetTopIndex(hwnd);
   if (uView == LVS_REPORT)
   {
-    bottomindex = topindex + LISTVIEW_GetCountPerColumn(hwnd) + 1;  
+    bottomindex = topindex + LISTVIEW_GetCountPerColumn(hwnd) + 1;
     bottomindex = min(bottomindex,GETITEMCOUNT(infoPtr));
   }
   else
@@ -2295,7 +2295,7 @@
     bottomindex = GETITEMCOUNT(infoPtr);
   }
 
-  for (i = topindex; i < bottomindex; i++) 
+  for (i = topindex; i < bottomindex; i++)
   {
     rcItem.left = LVIR_SELECTBOUNDS;
     if (LISTVIEW_GetItemRect(hwnd, i, &rcItem) == TRUE)
@@ -2313,7 +2313,7 @@
 /***
  * DESCRIPTION:
  * Removes a column.
- * 
+ *
  * PARAMETER(S):
  * [IO] HDPA : dynamic pointer array handle
  * [I] INT : column index (subitem index)
@@ -2339,14 +2339,14 @@
       }
     }
   }
-    
+
   return bResult;
 }
 
 /***
  * DESCRIPTION:
  * Removes a subitem at a given position.
- * 
+ *
  * PARAMETER(S):
  * [IO] HDPA : dynamic pointer array handle
  * [I] INT : subitem index
@@ -2370,7 +2370,7 @@
         /* free string */
         if (is_textW(lpSubItem->pszText))
           COMCTL32_Free(lpSubItem->pszText);
-        
+
         /* free item */
         COMCTL32_Free(lpSubItem);
 
@@ -2381,17 +2381,17 @@
       else if (lpSubItem->iSubItem > nSubItem)
         return TRUE;
     }
-  }    
-  
+  }
+
   return TRUE;
 }
 
 /***
  * DESCRIPTION:
  * Compares the item information.
- * 
+ *
  * PARAMETER(S):
- * [I] LISTVIEW_ITEM *: destination item 
+ * [I] LISTVIEW_ITEM *: destination item
  * [I] LPLVITEM : source item
  * [I] isW : TRUE if lpLVItem is Unicode, FALSE it it's ANSI
  *
@@ -2407,41 +2407,41 @@
   {
     if (lpLVItem->mask & LVIF_STATE)
     {
-      if ((lpItem->state & lpLVItem->stateMask) != 
+      if ((lpItem->state & lpLVItem->stateMask) !=
           (lpLVItem->state & lpLVItem->stateMask))
-        uChanged |= LVIF_STATE; 
+        uChanged |= LVIF_STATE;
     }
 
     if (lpLVItem->mask & LVIF_IMAGE)
     {
       if (lpItem->iImage != lpLVItem->iImage)
-        uChanged |= LVIF_IMAGE; 
+        uChanged |= LVIF_IMAGE;
     }
-  
+
     if (lpLVItem->mask & LVIF_PARAM)
     {
       if (lpItem->lParam != lpLVItem->lParam)
-        uChanged |= LVIF_PARAM; 
+        uChanged |= LVIF_PARAM;
     }
-    
+
     if (lpLVItem->mask & LVIF_INDENT)
     {
       if (lpItem->iIndent != lpLVItem->iIndent)
-        uChanged |= LVIF_INDENT; 
+        uChanged |= LVIF_INDENT;
     }
 
-    if (lpLVItem->mask & LVIF_TEXT) 
+    if (lpLVItem->mask & LVIF_TEXT)
     {
-      if (lpLVItem->pszText == LPSTR_TEXTCALLBACKW) 
+      if (lpLVItem->pszText == LPSTR_TEXTCALLBACKW)
       {
         if (lpItem->pszText != LPSTR_TEXTCALLBACKW)
-          uChanged |= LVIF_TEXT; 
+          uChanged |= LVIF_TEXT;
       }
       else
       {
         if (lpItem->pszText == LPSTR_TEXTCALLBACKW)
         {
-          uChanged |= LVIF_TEXT; 
+          uChanged |= LVIF_TEXT;
         }
 	else
 	{
@@ -2474,18 +2474,18 @@
 /***
  * DESCRIPTION:
  * Initializes item attributes.
- * 
+ *
  * PARAMETER(S):
  * [I] HWND : window handle
- * [O] LISTVIEW_ITEM *: destination item 
- * [I] LPLVITEM : source item 
+ * [O] LISTVIEW_ITEM *: destination item
+ * [I] LPLVITEM : source item
  * [I] isW : TRUE if lpLVItem is Unicode, FALSE if it's ANSI
  *
  * RETURN:
  *   SUCCCESS : TRUE
  *   FAILURE : FALSE
  */
-static BOOL LISTVIEW_InitItemT(HWND hwnd, LISTVIEW_ITEM *lpItem, 
+static BOOL LISTVIEW_InitItemT(HWND hwnd, LISTVIEW_ITEM *lpItem,
                               LPLVITEMW lpLVItem, BOOL isW)
 {
   LONG lStyle = GetWindowLongW(hwnd, GWL_STYLE);
@@ -2494,35 +2494,35 @@
   if ((lpItem != NULL) && (lpLVItem != NULL))
   {
     bResult = TRUE;
-    
+
     if (lpLVItem->mask & LVIF_STATE)
     {
       lpItem->state &= ~lpLVItem->stateMask;
       lpItem->state |= (lpLVItem->state & lpLVItem->stateMask);
     }
-    
+
     if (lpLVItem->mask & LVIF_IMAGE)
       lpItem->iImage = lpLVItem->iImage;
-  
+
     if (lpLVItem->mask & LVIF_PARAM)
       lpItem->lParam = lpLVItem->lParam;
-    
+
     if (lpLVItem->mask & LVIF_INDENT)
       lpItem->iIndent = lpLVItem->iIndent;
 
-    if (lpLVItem->mask & LVIF_TEXT) 
+    if (lpLVItem->mask & LVIF_TEXT)
     {
-      if (lpLVItem->pszText == LPSTR_TEXTCALLBACKW) 
+      if (lpLVItem->pszText == LPSTR_TEXTCALLBACKW)
       {
         if ((lStyle & LVS_SORTASCENDING) || (lStyle & LVS_SORTDESCENDING))
           return FALSE;
 
 	if (is_textW(lpItem->pszText))
           COMCTL32_Free(lpItem->pszText);
-    
+
         lpItem->pszText = LPSTR_TEXTCALLBACKW;
       }
-      else 
+      else
 	bResult = textsetptrT(&lpItem->pszText, lpLVItem->pszText, isW);
     }
   }
@@ -2547,15 +2547,15 @@
  *   SUCCCESS : TRUE
  *   FAILURE : FALSE
  */
-static BOOL LISTVIEW_InitSubItemT(HWND hwnd, LISTVIEW_SUBITEM *lpSubItem, 
+static BOOL LISTVIEW_InitSubItemT(HWND hwnd, LISTVIEW_SUBITEM *lpSubItem,
                                   LPLVITEMW lpLVItem, BOOL isW)
 {
   LONG lStyle = GetWindowLongW(hwnd, GWL_STYLE);
   BOOL bResult = FALSE;
-  
-  TRACE("(hwnd=%x, lpSubItem=%p, lpLVItem=%s, isW=%d)\n", 
+
+  TRACE("(hwnd=%x, lpSubItem=%p, lpLVItem=%s, isW=%d)\n",
 	hwnd, lpSubItem, debuglvitem_t(lpLVItem, isW), isW);
-  
+
   if ((lpSubItem != NULL) && (lpLVItem != NULL))
   {
     if (!(lpLVItem->mask & LVIF_INDENT))
@@ -2566,20 +2566,20 @@
 
       if (lpLVItem->mask & LVIF_IMAGE)
         lpSubItem->iImage = lpLVItem->iImage;
-      
-      if (lpLVItem->mask & LVIF_TEXT) 
+
+      if (lpLVItem->mask & LVIF_TEXT)
       {
-        if (lpLVItem->pszText == LPSTR_TEXTCALLBACKW) 
+        if (lpLVItem->pszText == LPSTR_TEXTCALLBACKW)
         {
           if ((lStyle & LVS_SORTASCENDING) || (lStyle & LVS_SORTDESCENDING))
             return FALSE;
 
           if (is_textW(lpSubItem->pszText))
             COMCTL32_Free(lpSubItem->pszText);
-    
+
           lpSubItem->pszText = LPSTR_TEXTCALLBACKW;
         }
-        else 
+        else
 	  bResult = textsetptrT(&lpSubItem->pszText, lpLVItem->pszText, isW);
       }
     }
@@ -2591,10 +2591,10 @@
 /***
  * DESCRIPTION:
  * Adds a subitem at a given position (column index).
- * 
+ *
  * PARAMETER(S):
  * [I] HWND : window handle
- * [I] LPLVITEM : new subitem atttributes 
+ * [I] LPLVITEM : new subitem atttributes
  * [I] isW : TRUE if lpLVItem is Unicode, FALSE if it's ANSI
  *
  * RETURN:
@@ -2611,7 +2611,7 @@
   LONG lStyle = GetWindowLongW(hwnd, GWL_STYLE);
 
   TRACE("(hwnd=%x, lpLVItem=%s, isW=%d)\n", hwnd, debuglvitem_t(lpLVItem, isW), isW);
-  
+
   if (lStyle & LVS_OWNERDATA)
     return FALSE;
 
@@ -2626,7 +2626,7 @@
 	ZeroMemory(lpSubItem, sizeof(LISTVIEW_SUBITEM));
         if (LISTVIEW_InitSubItemT(hwnd, lpSubItem, lpLVItem, isW))
         {
-          nPosition = LISTVIEW_FindInsertPosition(hdpaSubItems, 
+          nPosition = LISTVIEW_FindInsertPosition(hdpaSubItems,
                                                   lpSubItem->iSubItem);
           nItem = DPA_InsertPtr(hdpaSubItems, nPosition, lpSubItem);
           if (nItem != -1) bResult = TRUE;
@@ -2634,17 +2634,17 @@
       }
     }
   }
-  
-  /* cleanup if unsuccessful */   
+
+  /* cleanup if unsuccessful */
   if (!bResult && lpSubItem) COMCTL32_Free(lpSubItem);
-  
+
   return bResult;
 }
 
 /***
  * DESCRIPTION:
  * Finds the dpa insert position (array index).
- * 
+ *
  * PARAMETER(S):
  * [I] HWND : window handle
  * [I] INT : subitem index
@@ -2671,7 +2671,7 @@
 /***
  * DESCRIPTION:
  * Retrieves a listview subitem at a given position (column index).
- * 
+ *
  * PARAMETER(S):
  * [I] HWND : window handle
  * [I] INT : subitem index
@@ -2696,17 +2696,17 @@
         return NULL;
     }
   }
-  
+
   return NULL;
 }
 
 /***
  * DESCRIPTION:
  * Sets item attributes.
- * 
+ *
  * PARAMETER(S):
  * [I] HWND : window handle
- * [I] LPLVITEM : new item atttributes 
+ * [I] LPLVITEM : new item atttributes
  * [I] isW : TRUE if lpLVItem is Unicode, FALSE if it's ANSI
  *
  * RETURN:
@@ -2727,7 +2727,7 @@
   RECT rcItem;
 
   TRACE("(hwnd=%x, lpLVItem=%s, isW=%d)\n", hwnd, debuglvitem_t(lpLVItem, isW), isW);
-    
+
   if (lStyle & LVS_OWNERDATA)
   {
     if ((lpLVItem->iSubItem == 0)&&(lpLVItem->mask == LVIF_STATE))
@@ -2740,7 +2740,7 @@
       itm.iItem = lpLVItem->iItem;
       itm.iSubItem = 0;
       ListView_GetItemW(hwnd, &itm);
-      
+
 
       ZeroMemory(&nmlv, sizeof(NMLISTVIEW));
       nmlv.uNewState = lpLVItem->state;
@@ -2749,10 +2749,10 @@
       nmlv.lParam = itm.lParam;
       nmlv.iItem = lpLVItem->iItem;
 
-      if ((itm.state & lpLVItem->stateMask) != 
+      if ((itm.state & lpLVItem->stateMask) !=
           (lpLVItem->state & lpLVItem->stateMask))
       {
-        /* 
+        /*
          * As per MSDN LVN_ITEMCHANGING notifications are _NOT_ sent
          * by LVS_OWERNDATA list controls
          */
@@ -2831,14 +2831,14 @@
                 /*
                  * This is a fun hoop to jump to try to catch if
                  * the user is calling us directly to call focus or if
-                 * this function is being called as a result of a 
-                 * SetItemFocus call. 
+                 * this function is being called as a result of a
+                 * SetItemFocus call.
                  */
                 if (infoPtr->nFocusedItem >= 0)
                   LISTVIEW_SetItemFocus(hwnd, lpLVItem->iItem);
-              }           
+              }
             }
-            
+
             nmlv.uChanged = uChanged;
             nmlv.iItem = lpLVItem->iItem;
             nmlv.lParam = lpItem->lParam;
@@ -2865,7 +2865,7 @@
           {
             bResult = TRUE;
           }
-          
+
           if (uChanged)
           {
             rcItem.left = LVIR_BOUNDS;
@@ -2884,10 +2884,10 @@
 /***
  * DESCRIPTION:
  * Sets subitem attributes.
- * 
+ *
  * PARAMETER(S):
  * [I] HWND : window handle
- * [I] LPLVITEM : new subitem atttributes 
+ * [I] LPLVITEM : new subitem atttributes
  * [I] isW : TRUE if lpLVItem is Unicode, FALSE if it's ANSI
  *
  * RETURN:
@@ -2904,7 +2904,7 @@
   RECT rcItem;
 
   TRACE("(hwnd=%x, lpLVItem=%s, isW=%d)\n", hwnd, debuglvitem_t(lpLVItem, isW), isW);
-  
+
   if (lStyle & LVS_OWNERDATA)
     return FALSE;
 
@@ -2923,11 +2923,11 @@
             bResult = LISTVIEW_InitSubItemT(hwnd, lpSubItem, lpLVItem, isW);
           else
             bResult = LISTVIEW_AddSubItemT(hwnd, lpLVItem, isW);
-          
+
           rcItem.left = LVIR_BOUNDS;
 	  LISTVIEW_GetItemRect(hwnd, lpLVItem->iItem, &rcItem);
 	  InvalidateRect(hwnd, &rcItem, FALSE);
-        } 
+        }
       }
     }
   }
@@ -2938,10 +2938,10 @@
 /***
  * DESCRIPTION:
  * Sets item attributes.
- * 
+ *
  * PARAMETER(S):
  * [I] HWND : window handle
- * [I] LPLVITEM : new item atttributes 
+ * [I] LPLVITEM : new item atttributes
  * [I] isW : TRUE if lpLVItem is Unicode, FALSE if it's ANSI
  *
  * RETURN:
@@ -2952,7 +2952,7 @@
 {
   LISTVIEW_INFO *infoPtr = (LISTVIEW_INFO *)GetWindowLongW(hwnd, 0);
 
-  if (!lpLVItem || lpLVItem->iItem < 0 || 
+  if (!lpLVItem || lpLVItem->iItem < 0 ||
       lpLVItem->iItem>=GETITEMCOUNT(infoPtr))
     return FALSE;
   if (lpLVItem->iSubItem == 0)
@@ -2964,7 +2964,7 @@
 /***
  * DESCRIPTION:
  * Retrieves the index of the item at coordinate (0, 0) of the client area.
- * 
+ *
  * PARAMETER(S):
  * [I] HWND : window handle
  *
@@ -2981,7 +2981,7 @@
   ZeroMemory(&scrollInfo, sizeof(SCROLLINFO));
   scrollInfo.cbSize = sizeof(SCROLLINFO);
   scrollInfo.fMask = SIF_POS;
-  
+
   if (uView == LVS_LIST)
   {
     if ((lStyle & WS_HSCROLL) && GetScrollInfo(hwnd, SB_HORZ, &scrollInfo))
@@ -2992,14 +2992,14 @@
     if ((lStyle & WS_VSCROLL) && GetScrollInfo(hwnd, SB_VERT, &scrollInfo))
       nItem = scrollInfo.nPos;
   }
-  
+
   return nItem;
 }
 
 /***
  * DESCRIPTION:
  * Draws a subitem.
- * 
+ *
  * PARAMETER(S):
  * [I] HWND : window handle
  * [I] HDC : device context handle
@@ -3010,10 +3010,10 @@
  * RETURN:
  * None
  */
-static VOID LISTVIEW_DrawSubItem(HWND hwnd, HDC hdc, INT nItem, INT nSubItem, 
+static VOID LISTVIEW_DrawSubItem(HWND hwnd, HDC hdc, INT nItem, INT nSubItem,
                                  RECT rcItem, BOOL Selected)
 {
-  LISTVIEW_INFO *infoPtr = (LISTVIEW_INFO *)GetWindowLongW(hwnd, 0); 
+  LISTVIEW_INFO *infoPtr = (LISTVIEW_INFO *)GetWindowLongW(hwnd, 0);
   WCHAR szDispText[DISP_TEXT_SIZE];
   LVITEMW lvItem;
   LVCOLUMNW lvColumn;
@@ -3035,7 +3035,7 @@
   *lvItem.pszText = '\0';
   LISTVIEW_GetItemW(hwnd, &lvItem, TRUE);
   TRACE("   lvItem=%s\n", debuglvitem_t(&lvItem, TRUE));
-  
+
   ZeroMemory(&lvColumn, sizeof(lvColumn));
   lvColumn.mask = LVCF_FMT;
   LISTVIEW_GetColumnT(hwnd, nSubItem, &lvColumn, TRUE);
@@ -3050,7 +3050,7 @@
         textLeft = rcItem.left + (rcItem.right-rcItem.left-nLabelWidth)/2;
     }
   }
-    
+
 
   /* redraw the background of the item */
   rcTemp = rcItem;
@@ -3091,7 +3091,7 @@
     SetTextColor(hdc, infoPtr->clrText);
   }
 
-  ExtTextOutW(hdc, textLeft, rcItem.top, textoutOptions, 
+  ExtTextOutW(hdc, textLeft, rcItem.top, textoutOptions,
               &rcItem, lvItem.pszText, lstrlenW(lvItem.pszText), NULL);
 
   if (Selected)
@@ -3118,7 +3118,7 @@
 /***
  * DESCRIPTION:
  * Draws an item.
- * 
+ *
  * PARAMETER(S):
  * [I] HWND : window handle
  * [I] HDC : device context handle
@@ -3130,7 +3130,7 @@
  */
 static VOID LISTVIEW_DrawItem(HWND hwnd, HDC hdc, INT nItem, RECT rcItem, BOOL FullSelect, RECT* SuggestedFocus)
 {
-  LISTVIEW_INFO *infoPtr = (LISTVIEW_INFO *)GetWindowLongW(hwnd, 0); 
+  LISTVIEW_INFO *infoPtr = (LISTVIEW_INFO *)GetWindowLongW(hwnd, 0);
   WCHAR szDispText[DISP_TEXT_SIZE];
   INT nLabelWidth;
   LVITEMW lvItem;
@@ -3169,28 +3169,28 @@
   /* do indent */
   if (lvItem.iIndent>0 && infoPtr->iconSize.cx > 0)
   {
-    rcItem.left += infoPtr->iconSize.cx * lvItem.iIndent; 
+    rcItem.left += infoPtr->iconSize.cx * lvItem.iIndent;
 
     if (SuggestedFocus)
       SuggestedFocus->left += infoPtr->iconSize.cx * lvItem.iIndent;
-  } 
+  }
 
   /* state icons */
   if (infoPtr->himlState != NULL)
   {
-     UINT uStateImage = (lvItem.state & LVIS_STATEIMAGEMASK) >> 12; 
+     UINT uStateImage = (lvItem.state & LVIS_STATEIMAGEMASK) >> 12;
      if (uStateImage > 0)
      {
-       ImageList_Draw(infoPtr->himlState, uStateImage - 1, hdc, rcItem.left, 
+       ImageList_Draw(infoPtr->himlState, uStateImage - 1, hdc, rcItem.left,
                       rcItem.top, ILD_NORMAL);
      }
- 
-     rcItem.left += infoPtr->iconSize.cx; 
+
+     rcItem.left += infoPtr->iconSize.cx;
      if (SuggestedFocus)
        SuggestedFocus->left += infoPtr->iconSize.cx;
      bImage = TRUE;
   }
-  
+
   /* small icons */
   if (infoPtr->himlSmall != NULL)
   {
@@ -3198,17 +3198,17 @@
         (lvItem.iImage>=0))
     {
       ImageList_SetBkColor(infoPtr->himlSmall, CLR_NONE);
-      ImageList_Draw(infoPtr->himlSmall, lvItem.iImage, hdc, rcItem.left, 
+      ImageList_Draw(infoPtr->himlSmall, lvItem.iImage, hdc, rcItem.left,
                      rcItem.top, ILD_SELECTED);
     }
     else if (lvItem.iImage>=0)
     {
       ImageList_SetBkColor(infoPtr->himlSmall, CLR_NONE);
-      ImageList_Draw(infoPtr->himlSmall, lvItem.iImage, hdc, rcItem.left, 
+      ImageList_Draw(infoPtr->himlSmall, lvItem.iImage, hdc, rcItem.left,
                      rcItem.top, ILD_NORMAL);
     }
-    
-    rcItem.left += infoPtr->iconSize.cx; 
+
+    rcItem.left += infoPtr->iconSize.cx;
 
     if (SuggestedFocus)
       SuggestedFocus->left += infoPtr->iconSize.cx;
@@ -3221,13 +3221,13 @@
 
   if ((lvItem.state & LVIS_SELECTED) && (infoPtr->bFocus != FALSE))
   {
-    /* set item colors */ 
+    /* set item colors */
     dwBkColor = SetBkColor(hdc, GetSysColor(COLOR_HIGHLIGHT));
     dwTextColor = SetTextColor(hdc, GetSysColor(COLOR_HIGHLIGHTTEXT));
     /* set raster mode */
     nMixMode = SetROP2(hdc, R2_XORPEN);
   }
-  else if ((GetWindowLongW(hwnd, GWL_STYLE) & LVS_SHOWSELALWAYS) && 
+  else if ((GetWindowLongW(hwnd, GWL_STYLE) & LVS_SHOWSELALWAYS) &&
            (lvItem.state & LVIS_SELECTED) && (infoPtr->bFocus == FALSE))
   {
     dwBkColor = SetBkColor(hdc, GetSysColor(COLOR_3DFACE));
@@ -3254,7 +3254,7 @@
     /* set raster mode */
     nMixMode = SetROP2(hdc, R2_COPYPEN);
   }
-  
+
   nLabelWidth = ListView_GetStringWidthW(hwnd, lvItem.pszText);
   if (rcItem.left + nLabelWidth < rcItem.right)
   {
@@ -3263,8 +3263,8 @@
     if (bImage)
       rcItem.right += IMAGE_PADDING;
   }
-  
-  /* draw label */  
+
+  /* draw label */
   dwTextX = rcItem.left + 1;
   if (bImage)
     dwTextX += IMAGE_PADDING;
@@ -3280,10 +3280,10 @@
     CopyRect(&rec,&rcItem);
     rec.left = rec.right;
     rec.right = rec.left+REPORT_MARGINX;
-    ExtTextOutW(hdc, rec.left , rec.top, textoutOptions, 
+    ExtTextOutW(hdc, rec.left , rec.top, textoutOptions,
     &rec, NULL, 0, NULL);
   }
-  
+
   if (!FullSelect)
       CopyRect(SuggestedFocus,&rcItem);
 
@@ -3300,7 +3300,7 @@
 /***
  * DESCRIPTION:
  * Draws an item when in large icon display mode.
- * 
+ *
  * PARAMETER(S):
  * [I] HWND : window handle
  * [I] HDC : device context handle
@@ -3314,7 +3314,7 @@
 static VOID LISTVIEW_DrawLargeItem(HWND hwnd, HDC hdc, INT nItem, RECT rcItem,
                                    RECT *SuggestedFocus)
 {
-  LISTVIEW_INFO *infoPtr = (LISTVIEW_INFO *)GetWindowLongW(hwnd, 0); 
+  LISTVIEW_INFO *infoPtr = (LISTVIEW_INFO *)GetWindowLongW(hwnd, 0);
   WCHAR szDispText[DISP_TEXT_SIZE] = { '\0' };
   LVITEMW lvItem;
   UINT uFormat = DT_TOP | DT_CENTER | DT_WORDBREAK | DT_NOPREFIX |
@@ -3344,10 +3344,10 @@
   else
     rcTemp.right+=WIDTH_PADDING;
     /* The comment doesn't say WIDTH_PADDING applies to large icons */
-  
+
   TRACE("background rect (%d,%d)-(%d,%d)\n",
         rcTemp.left, rcTemp.top, rcTemp.right, rcTemp.bottom);
-  
+
   LISTVIEW_FillBackground(hwnd, hdc, &rcTemp);
 
 
@@ -3357,7 +3357,7 @@
    * At most one item may have the focus
    * The application may not actually be active currently
    * 1. The item is not selected in any way
-   * 2. The cursor is flying over the icon or text and the text is being 
+   * 2. The cursor is flying over the icon or text and the text is being
    *    expanded because it is not fully displayed currently.
    * 3. The item is selected and is focussed, i.e. the user has not clicked
    *    in the blank area of the window, and the window (or application?)
@@ -3372,7 +3372,7 @@
 
   if (lvItem.state & LVIS_SELECTED)
   {
-    /* set item colors */ 
+    /* set item colors */
     SetBkColor(hdc, GetSysColor(COLOR_HIGHLIGHT));
     SetTextColor(hdc, GetSysColor(COLOR_HIGHLIGHTTEXT));
     SetBkMode (hdc, OPAQUE);
@@ -3414,7 +3414,7 @@
   {
     if (lvItem.iImage >= 0)
     {
-      ImageList_Draw (infoPtr->himlNormal, lvItem.iImage, hdc, rcItem.left, 
+      ImageList_Draw (infoPtr->himlNormal, lvItem.iImage, hdc, rcItem.left,
                       rcItem.top,
                       (lvItem.state & LVIS_SELECTED) ? ILD_SELECTED : ILD_NORMAL);
     }
@@ -3442,17 +3442,17 @@
         infoPtr->rcList.right,   infoPtr->rcList.bottom,
         infoPtr->rcView.left,    infoPtr->rcView.top,
         infoPtr->rcView.right,   infoPtr->rcView.bottom);
-  
+
   InflateRect(&rcItem, -(2*CAPTION_BORDER), 0);
-  rcItem.top += infoPtr->iconSize.cy + ICON_BOTTOM_PADDING; 
+  rcItem.top += infoPtr->iconSize.cy + ICON_BOTTOM_PADDING;
 
 
-  /* draw label */  
+  /* draw label */
 
   /* I am sure of most of the uFormat values.  However I am not sure about
    * whether we need or do not need the following:
    * DT_EXTERNALLEADING, DT_INTERNAL, DT_CALCRECT, DT_NOFULLWIDTHCHARBREAK,
-   * DT_PATH_ELLIPSIS, DT_RTLREADING, 
+   * DT_PATH_ELLIPSIS, DT_RTLREADING,
    * We certainly do not need
    * DT_BOTTOM, DT_VCENTER, DT_MODIFYSTRING, DT_LEFT, DT_RIGHT, DT_PREFIXONLY,
    * DT_SINGLELINE, DT_TABSTOP, DT_EXPANDTABS
@@ -3481,7 +3481,7 @@
       FillRect(hdc, &rcItem, hBrush);
       DeleteObject(hBrush);
   }
-  /* else ? What if we are losing the focus? will we not get a complete 
+  /* else ? What if we are losing the focus? will we not get a complete
    * background?
    */
   DrawTextW (hdc, lvItem.pszText, -1, &rcItem, uFormat);
@@ -3492,10 +3492,10 @@
 /***
  * DESCRIPTION:
  * Draws listview items when in report display mode.
- * 
+ *
  * PARAMETER(S):
  * [I] HWND : window handle
- * [I] HDC : device context handle 
+ * [I] HDC : device context handle
  *
  * RETURN:
  * None
@@ -3568,13 +3568,13 @@
         LVITEMW item;
         RECT br;
 
-        TRACE("Owner Drawn\n");    
+        TRACE("Owner Drawn\n");
         dis.CtlType = ODT_LISTVIEW;
         dis.CtlID = uID;
         dis.itemID = nItem;
         dis.itemAction = ODA_DRAWENTIRE;
         dis.itemState = 0;
-       
+
         if (LISTVIEW_IsSelected(hwnd,nItem)) dis.itemState|=ODS_SELECTED;
         if (nItem==infoPtr->nFocusedItem)   dis.itemState|=ODS_FOCUS;
 
@@ -3583,11 +3583,11 @@
 
         Header_GetItemRect(infoPtr->hwndHeader, nColumnCount-1, &br);
 
-        dis.rcItem.left = -scrollOffset; 
+        dis.rcItem.left = -scrollOffset;
         dis.rcItem.right = max(dis.rcItem.left, br.right - scrollOffset);
         dis.rcItem.top = nDrawPosY;
         dis.rcItem.bottom = dis.rcItem.top + infoPtr->nItemHeight;
-       
+
         ZeroMemory(&item,sizeof(item));
         item.iItem = nItem;
         item.mask = LVIF_PARAM;
@@ -3613,7 +3613,7 @@
       ir.right = max(ir.left, br.right - REPORT_MARGINX);
       ir.top = nDrawPosY;
       ir.bottom = ir.top + infoPtr->nItemHeight;
-      
+
       CopyRect(&SuggestedFocusRect,&ir);
     }
 
@@ -3639,15 +3639,15 @@
       if (j == 0)
       {
         LISTVIEW_DrawItem(hwnd, hdc, nItem, rcItem, FullSelected,
-                          &SuggestedFocusRect); 
+                          &SuggestedFocusRect);
       }
-      else 
+      else
       {
         LISTVIEW_DrawSubItem(hwnd, hdc, nItem, j, rcItem, FullSelected);
       }
 
       if (cditemmode & CDRF_NOTIFYPOSTPAINT)
-        LISTVIEW_SendCustomDrawItemNotify(hwnd, hdc, nItem, 0, 
+        LISTVIEW_SendCustomDrawItemNotify(hwnd, hdc, nItem, 0,
 				      CDDS_ITEMPOSTPAINT);
     }
     /*
@@ -3659,8 +3659,8 @@
       if (FullSelected && LISTVIEW_GetItemState(hwnd,nItem,LVIS_SELECTED))
         rop = SetROP2(hdc, R2_XORPEN);
 
-      Rectangle(hdc, SuggestedFocusRect.left, SuggestedFocusRect.top, 
-                SuggestedFocusRect.right,SuggestedFocusRect.bottom); 
+      Rectangle(hdc, SuggestedFocusRect.left, SuggestedFocusRect.top,
+                SuggestedFocusRect.right,SuggestedFocusRect.bottom);
 
       if (rop)
         SetROP2(hdc, R2_COPYPEN);
@@ -3672,7 +3672,7 @@
 /***
  * DESCRIPTION:
  * Retrieves the number of items that can fit vertically in the client area.
- * 
+ *
  * PARAMETER(S):
  * [I] HWND : window handle
  *
@@ -3700,9 +3700,9 @@
 
 /***
  * DESCRIPTION:
- * Retrieves the number of items that can fit horizontally in the client 
+ * Retrieves the number of items that can fit horizontally in the client
  * area.
- * 
+ *
  * PARAMETER(S):
  * [I] HWND : window handle
  *
@@ -3726,9 +3726,9 @@
 
 /***
  * DESCRIPTION:
- * Retrieves the number of columns needed to display all the items when in 
+ * Retrieves the number of columns needed to display all the items when in
  * list display mode.
- * 
+ *
  * PARAMETER(S):
  * [I] HWND : window handle
  *
@@ -3748,16 +3748,16 @@
   }
 
   return nColumnCount;
-}  
-  
+}
+
 
 /***
  * DESCRIPTION:
  * Draws listview items when in list display mode.
- * 
+ *
  * PARAMETER(S):
  * [I] HWND : window handle
- * [I] HDC : device context handle 
+ * [I] HDC : device context handle
  *
  * RETURN:
  * None
@@ -3810,13 +3810,13 @@
        * Draw Focus Rect
        */
       if (LISTVIEW_GetItemState(hwnd,nItem,LVIS_FOCUSED) && infoPtr->bFocus)
-      Rectangle(hdc, FocusRect.left, FocusRect.top, 
+      Rectangle(hdc, FocusRect.left, FocusRect.top,
                 FocusRect.right,FocusRect.bottom);
 
       if (cditemmode & CDRF_NOTIFYPOSTPAINT)
-        LISTVIEW_SendCustomDrawItemNotify(hwnd, hdc, nItem, 0, 
+        LISTVIEW_SendCustomDrawItemNotify(hwnd, hdc, nItem, 0,
                                           CDDS_ITEMPOSTPAINT);
- 
+
     }
   }
 }
@@ -3824,10 +3824,10 @@
 /***
  * DESCRIPTION:
  * Draws listview items when in icon or small icon display mode.
- * 
+ *
  * PARAMETER(S):
  * [I] HWND : window handle
- * [I] HDC : device context handle 
+ * [I] HDC : device context handle
  *
  * RETURN:
  * None
@@ -3864,7 +3864,7 @@
     LISTVIEW_GetItemPosition(hwnd, i, &ptPosition);
     ptPosition.x += ptOrigin.x;
     ptPosition.y += ptOrigin.y;
-      
+
     if (ptPosition.y + infoPtr->nItemHeight > infoPtr->rcList.top)
     {
       if (ptPosition.x + infoPtr->nItemWidth > infoPtr->rcList.left)
@@ -3884,16 +3884,16 @@
             /*
              * Draw Focus Rect
              */
-            if (LISTVIEW_GetItemState(hwnd,i,LVIS_FOCUSED) && 
+            if (LISTVIEW_GetItemState(hwnd,i,LVIS_FOCUSED) &&
                 infoPtr->bFocus && !IsRectEmpty(&SuggestedFocus))
-              Rectangle(hdc, SuggestedFocus.left, SuggestedFocus.top, 
-	                SuggestedFocus.right,SuggestedFocus.bottom); 
+              Rectangle(hdc, SuggestedFocus.left, SuggestedFocus.top,
+	                SuggestedFocus.right,SuggestedFocus.bottom);
           }
         }
       }
     }
     if (cditemmode & CDRF_NOTIFYPOSTPAINT)
-        LISTVIEW_SendCustomDrawItemNotify(hwnd, hdc, i, 0, 
+        LISTVIEW_SendCustomDrawItemNotify(hwnd, hdc, i, 0,
                                           CDDS_ITEMPOSTPAINT);
   }
 }
@@ -3901,10 +3901,10 @@
 /***
  * DESCRIPTION:
  * Draws listview items.
- * 
+ *
  * PARAMETER(S):
  * [I] HWND : window handle
- * [I] HDC : device context handle 
+ * [I] HDC : device context handle
  *
  * RETURN:
  * NoneX
@@ -3934,10 +3934,10 @@
   hOldPen = SelectObject(hdc, hPen);
 
   /* select transparent brush (for drawing the focus box) */
-  SelectObject(hdc, GetStockObject(NULL_BRUSH)); 
+  SelectObject(hdc, GetStockObject(NULL_BRUSH));
 
   if (uView == LVS_LIST)
-    LISTVIEW_RefreshList(hwnd, hdc, cdmode); 
+    LISTVIEW_RefreshList(hwnd, hdc, cdmode);
   else if (uView == LVS_REPORT)
     LISTVIEW_RefreshReport(hwnd, hdc, cdmode);
   else if (uView == LVS_SMALLICON)
@@ -3948,10 +3948,10 @@
   /* unselect objects */
   SelectObject(hdc, hOldFont);
   SelectObject(hdc, hOldPen);
-  
+
   /* delete pen */
   DeleteObject(hPen);
- 
+
   if (cdmode & CDRF_NOTIFYPOSTPAINT)
       LISTVIEW_SendCustomDrawNotify(hwnd, CDDS_POSTPAINT, hdc, rect);
 
@@ -3962,7 +3962,7 @@
 /***
  * DESCRIPTION:
  * Calculates the approximate width and height of a given number of items.
- * 
+ *
  * PARAMETER(S):
  * [I] HWND : window handle
  * [I] INT : number of items
@@ -3972,7 +3972,7 @@
  * RETURN:
  * Returns a DWORD. The width in the low word and the height in high word.
  */
-static LRESULT LISTVIEW_ApproximateViewRect(HWND hwnd, INT nItemCount, 
+static LRESULT LISTVIEW_ApproximateViewRect(HWND hwnd, INT nItemCount,
                                             WORD wWidth, WORD wHeight)
 {
   LISTVIEW_INFO *infoPtr = (LISTVIEW_INFO *)GetWindowLongW(hwnd, 0);
@@ -4002,7 +4002,7 @@
         nItemCountPerColumn = wHeight / infoPtr->nItemHeight;
         if (nItemCountPerColumn == 0)
           nItemCountPerColumn = 1;
-        
+
         if (nItemCount % nItemCountPerColumn != 0)
           nColumnCount = nItemCount / nItemCountPerColumn;
         else
@@ -4017,19 +4017,19 @@
     dwViewRect = MAKELONG(wWidth, wHeight);
   }
   else if (uView == LVS_REPORT)
-    FIXME("uView == LVS_REPORT: not implemented\n"); 
+    FIXME("uView == LVS_REPORT: not implemented\n");
   else if (uView == LVS_SMALLICON)
-    FIXME("uView == LVS_SMALLICON: not implemented\n"); 
+    FIXME("uView == LVS_SMALLICON: not implemented\n");
   else if (uView == LVS_ICON)
-    FIXME("uView == LVS_ICON: not implemented\n"); 
- 
+    FIXME("uView == LVS_ICON: not implemented\n");
+
   return dwViewRect;
 }
 
 /***
  * DESCRIPTION:
  * Arranges listview items in icon display mode.
- * 
+ *
  * PARAMETER(S):
  * [I] HWND : window handle
  * [I] INT : alignment code
@@ -4040,7 +4040,7 @@
  */
 static LRESULT LISTVIEW_Arrange(HWND hwnd, INT nAlignCode)
 {
-  UINT uView = GetWindowLongW(hwnd, GWL_STYLE) & LVS_TYPEMASK; 
+  UINT uView = GetWindowLongW(hwnd, GWL_STYLE) & LVS_TYPEMASK;
   BOOL bResult = FALSE;
 
   if ((uView == LVS_ICON) || (uView == LVS_SMALLICON))
@@ -4048,16 +4048,16 @@
     switch (nAlignCode)
     {
     case LVA_ALIGNLEFT:
-      FIXME("nAlignCode=LVA_ALIGNLEFT: not implemented\n"); 
+      FIXME("nAlignCode=LVA_ALIGNLEFT: not implemented\n");
       break;
     case LVA_ALIGNTOP:
-      FIXME("nAlignCode=LVA_ALIGNTOP: not implemented\n"); 
+      FIXME("nAlignCode=LVA_ALIGNTOP: not implemented\n");
       break;
     case LVA_DEFAULT:
-      FIXME("nAlignCode=LVA_DEFAULT: not implemented\n"); 
+      FIXME("nAlignCode=LVA_DEFAULT: not implemented\n");
       break;
     case LVA_SNAPTOGRID:
-      FIXME("nAlignCode=LVA_SNAPTOGRID: not implemented\n"); 
+      FIXME("nAlignCode=LVA_SNAPTOGRID: not implemented\n");
       break;
     }
   }
@@ -4071,7 +4071,7 @@
 /***
  * DESCRIPTION:
  * Removes all listview items and subitems.
- * 
+ *
  * PARAMETER(S):
  * [I] HWND : window handle
  *
@@ -4108,9 +4108,9 @@
   if (GETITEMCOUNT(infoPtr) > 0)
   {
     INT i, j;
-    
+
     /* send LVN_DELETEALLITEMS notification */
-    /* verify if subsequent LVN_DELETEITEM notifications should be 
+    /* verify if subsequent LVN_DELETEITEM notifications should be
        suppressed */
     ZeroMemory(&nmlv, sizeof(NMLISTVIEW));
     nmlv.iItem = -1;
@@ -4127,12 +4127,12 @@
           if (lpSubItem != NULL)
           {
             /* free subitem string */
-            if (is_textW(lpSubItem->pszText)) 
+            if (is_textW(lpSubItem->pszText))
               COMCTL32_Free(lpSubItem->pszText);
-        
+
             /* free subitem */
             COMCTL32_Free(lpSubItem);
-          }    
+          }
         }
 
         lpItem = (LISTVIEW_ITEM *)DPA_GetPtr(hdpaSubItems, 0);
@@ -4149,18 +4149,18 @@
           /* free item string */
           if (is_textW(lpItem->pszText))
             COMCTL32_Free(lpItem->pszText);
-      
+
           /* free item */
           COMCTL32_Free(lpItem);
         }
-        
+
         DPA_Destroy(hdpaSubItems);
       }
     }
 
     /* reinitialize listview memory */
     bResult = DPA_DeleteAllPtrs(infoPtr->hdpaItems);
-    
+
     /* align items (set position of each item) */
     if ((uView == LVS_ICON) || (uView == LVS_SMALLICON))
     {
@@ -4173,20 +4173,20 @@
         LISTVIEW_AlignTop(hwnd);
       }
     }
-    
+
     LISTVIEW_UpdateScroll(hwnd);
 
     /* invalidate client area (optimization needed) */
     InvalidateRect(hwnd, NULL, TRUE);
   }
-  
+
   return bResult;
 }
 
 /***
  * DESCRIPTION:
  * Removes a column from the listview control.
- * 
+ *
  * PARAMETER(S):
  * [I] HWND : window handle
  * [I] INT : column index
@@ -4227,10 +4227,10 @@
 /***
  * DESCRIPTION:
  * Removes an item from the listview control.
- * 
+ *
  * PARAMETER(S):
  * [I] HWND : window handle
- * [I] INT : item index  
+ * [I] INT : item index
  *
  * RETURN:
  *   SUCCESS : TRUE
@@ -4251,15 +4251,15 @@
   LVITEMW item;
 
   TRACE("(hwnd=%x, nItem=%d)\n", hwnd, nItem);
- 
-  
+
+
   /* First, send LVN_DELETEITEM notification. */
   memset(&nmlv, 0, sizeof (NMLISTVIEW));
   nmlv.hdr.hwndFrom = hwnd;
   nmlv.hdr.idFrom = lCtrlId;
   nmlv.hdr.code = LVN_DELETEITEM;
   nmlv.iItem = nItem;
-  SendMessageW(GetParent(hwnd), WM_NOTIFY, (WPARAM)lCtrlId, 
+  SendMessageW(GetParent(hwnd), WM_NOTIFY, (WPARAM)lCtrlId,
                (LPARAM)&nmlv);
 
 
@@ -4291,23 +4291,23 @@
           /* free item string */
           if (is_textW(lpSubItem->pszText))
             COMCTL32_Free(lpSubItem->pszText);
-        
+
           /* free item */
           COMCTL32_Free(lpSubItem);
-        }    
+        }
       }
-  
+
       lpItem = (LISTVIEW_ITEM *)DPA_GetPtr(hdpaSubItems, 0);
       if (lpItem != NULL)
       {
         /* free item string */
         if (is_textW(lpItem->pszText))
           COMCTL32_Free(lpItem->pszText);
-      
+
         /* free item */
         COMCTL32_Free(lpItem);
       }
-    
+
       bResult = DPA_Destroy(hdpaSubItems);
     }
 
@@ -4327,7 +4327,7 @@
     /* refresh client area */
     InvalidateRect(hwnd, NULL, TRUE);
   }
-  
+
   return bResult;
 }
 
@@ -4376,7 +4376,7 @@
   BOOL bResult = TRUE;
 
   TRACE("(hwnd=%x, pszText=%s, nItem=%ld, isW=%d)\n", hwnd, debugstr_t(pszText, isW), nItem, isW);
-  
+
   if (!(lStyle & LVS_OWNERDATA))
   {
     if (!(hdpaSubItems = (HDPA)DPA_GetPtr(infoPtr->hdpaItems, nItem)))
@@ -4414,7 +4414,7 @@
   if(dispinfo_notifyT(hwnd, LVN_ENDLABELEDITW, &dispInfo, isW))
     if (lpItem->pszText != LPSTR_TEXTCALLBACKW && !(lStyle & LVS_OWNERDATA))
       bResult = textsetptrT(&lpItem->pszText, pszText, isW);
-  
+
   return bResult;
 }
 
@@ -4472,7 +4472,7 @@
   NMLVDISPINFOW dispInfo;
   RECT rect;
   LISTVIEW_ITEM *lpItem;
-  HWND hedit; 
+  HWND hedit;
   HINSTANCE hinst = GetWindowLongW(hwnd, GWL_HINSTANCE);
   LISTVIEW_INFO *infoPtr = (LISTVIEW_INFO *)GetWindowLongW(hwnd, 0);
   HDPA hdpaSubItems;
@@ -4480,7 +4480,7 @@
   LVITEMW lvItem;
   LISTVIEW_ITEM lvItemRef;
   LONG lStyle = GetWindowLongW(hwnd, GWL_STYLE);
- 
+
   if (~GetWindowLongW(hwnd, GWL_STYLE) & LVS_EDITLABELS)
       return FALSE;
 
@@ -4498,7 +4498,7 @@
 
     if (NULL == (lpItem = (LISTVIEW_ITEM *)DPA_GetPtr(hdpaSubItems, 0)))
   	  return 0;
-  } 
+  }
   else
   {
     LVITEMW item;
@@ -4540,15 +4540,15 @@
   rect.left = LVIR_LABEL;
   if (!LISTVIEW_GetItemRect(hwnd, nItem, &rect))
 	  return 0;
- 
-  if (!(hedit = CreateEditLabelT(szDispText , WS_VISIBLE, 
-		 rect.left-2, rect.top-1, 0, rect.bottom - rect.top+2, hwnd, hinst, 
+
+  if (!(hedit = CreateEditLabelT(szDispText , WS_VISIBLE,
+		 rect.left-2, rect.top-1, 0, rect.bottom - rect.top+2, hwnd, hinst,
 		 isW ? LISTVIEW_EndEditLabelW : (EditlblCallbackW)LISTVIEW_EndEditLabelA,
 		 nItem, isW)))
 	 return 0;
 
   infoPtr->hwndEdit = hedit;
-  SetFocus(hedit); 
+  SetFocus(hedit);
   SendMessageW(hedit, EM_SETSEL, 0, -1);
 
   return hedit;
@@ -4558,7 +4558,7 @@
 /***
  * DESCRIPTION:
  * Ensures the specified item is visible, scrolling into view if necessary.
- * 
+ *
  * PARAMETER(S):
  * [I] HWND : window handle
  * [I] INT : item index
@@ -4603,8 +4603,8 @@
           nScrollPosWidth = LISTVIEW_SCROLL_DIV_SIZE;
           rcItem.left += infoPtr->rcList.left;
         }
-        
-	/* When in LVS_REPORT view, the scroll position should 
+
+	/* When in LVS_REPORT view, the scroll position should
 	   not be updated. */
 	if (nScrollPosWidth != 0)
 	{
@@ -4612,7 +4612,7 @@
 	    scrollInfo.nPos += rcItem.left / nScrollPosWidth;
 	  else
 	    scrollInfo.nPos += rcItem.left / nScrollPosWidth - 1;
-	  
+
 	  SetScrollInfo(hwnd, SB_HORZ, &scrollInfo, TRUE);
 	}
       }
@@ -4634,7 +4634,7 @@
           nScrollPosWidth = LISTVIEW_SCROLL_DIV_SIZE;
         }
 
-	/* When in LVS_REPORT view, the scroll position should 
+	/* When in LVS_REPORT view, the scroll position should
 	   not be updated. */
 	if (nScrollPosWidth != 0)
 	{
@@ -4647,7 +4647,7 @@
 	}
       }
     }
-    
+
     if (rcItem.top < infoPtr->rcList.top)
     {
       /* scroll up */
@@ -4656,7 +4656,7 @@
       {
         if (uView == LVS_REPORT)
         {
-          rcItem.top -= infoPtr->rcList.top; 
+          rcItem.top -= infoPtr->rcList.top;
           nScrollPosHeight = infoPtr->nItemHeight;
         }
         else if ((uView == LVS_ICON) || (uView == LVS_SMALLICON))
@@ -4669,7 +4669,7 @@
           scrollInfo.nPos += rcItem.top / nScrollPosHeight;
         else
           scrollInfo.nPos += rcItem.top / nScrollPosHeight - 1;
-        
+
         SetScrollInfo(hwnd, SB_VERT, &scrollInfo, TRUE);
       }
     }
@@ -4694,21 +4694,21 @@
           scrollInfo.nPos += rcItem.bottom / nScrollPosHeight;
         else
           scrollInfo.nPos += rcItem.bottom / nScrollPosHeight + 1;
-        
+
         SetScrollInfo(hwnd, SB_VERT, &scrollInfo, TRUE);
       }
     }
   }
- 
+
   if(bRedraw)
-    InvalidateRect(hwnd,NULL,TRUE); 
+    InvalidateRect(hwnd,NULL,TRUE);
   return TRUE;
 }
 
 /***
  * DESCRIPTION:
  * Retrieves the nearest item, given a position and a direction.
- * 
+ *
  * PARAMETER(S):
  * [I] HWND : window handle
  * [I] POINT : start position
@@ -4735,7 +4735,7 @@
     LISTVIEW_GetOrigin(hwnd, &lvIntHit.ht.pt);
     lvIntHit.ht.pt.x += pt.x;
     lvIntHit.ht.pt.y += pt.y;
-    
+
     if (vkDirection == VK_DOWN)
       lvIntHit.ht.pt.y += infoPtr->nItemHeight;
     else if (vkDirection == VK_UP)
@@ -4755,22 +4755,22 @@
   }
 
   return nItem;
-}  
+}
 
 /***
  * DESCRIPTION:
  * Searches for an item with specific characteristics.
- * 
+ *
  * PARAMETER(S):
  * [I] hwnd : window handle
  * [I] nStart : base item index
  * [I] lpFindInfo : item information to look for
- * 
+ *
  * RETURN:
  *   SUCCESS : index of item
  *   FAILURE : -1
  */
-static LRESULT LISTVIEW_FindItemW(HWND hwnd, INT nStart, 
+static LRESULT LISTVIEW_FindItemW(HWND hwnd, INT nStart,
                                   LPLVFINDINFOW lpFindInfo)
 {
   LISTVIEW_INFO *infoPtr = (LISTVIEW_INFO *)GetWindowLongW(hwnd, 0);
@@ -4789,7 +4789,7 @@
     {
       lvItem.mask |= LVIF_PARAM;
     }
-    
+
     if (lpFindInfo->flags & (LVFI_STRING | LVFI_PARTIAL))
     {
       lvItem.mask |= LVIF_TEXT;
@@ -4812,7 +4812,7 @@
       {
         if (lpFindInfo->flags & LVFI_NEARESTXY)
         {
-          nItem = LISTVIEW_GetNearestItem(hwnd, ptItem, 
+          nItem = LISTVIEW_GetNearestItem(hwnd, ptItem,
                                           lpFindInfo->vkDirection);
           if (nItem != -1)
           {
@@ -4827,7 +4827,7 @@
         {
           nItem++;
         }
-        
+
         lvItem.iItem = nItem;
         lvItem.iSubItem = 0;
         if (LISTVIEW_GetItemW(hwnd, &lvItem, TRUE))
@@ -4845,13 +4845,13 @@
                 continue;
             }
           }
-          
+
           if (lvItem.mask & LVIF_PARAM)
           {
             if (lpFindInfo->lParam != lvItem.lParam)
               continue;
           }
-          
+
           return nItem;
         }
       }
@@ -4865,33 +4865,33 @@
       else
       {
         return -1;
-      }       
+      }
     }
   }
 
- return -1; 
+ return -1;
 }
 
 /***
  * DESCRIPTION:
  * Searches for an item with specific characteristics.
- * 
+ *
  * PARAMETER(S):
  * [I] hwnd : window handle
  * [I] nStart : base item index
  * [I] lpFindInfo : item information to look for
- * 
+ *
  * RETURN:
  *   SUCCESS : index of item
  *   FAILURE : -1
  */
-static LRESULT LISTVIEW_FindItemA(HWND hwnd, INT nStart, 
+static LRESULT LISTVIEW_FindItemA(HWND hwnd, INT nStart,
                                   LPLVFINDINFOA lpFindInfo)
 {
   BOOL hasText = lpFindInfo->flags & (LVFI_STRING | LVFI_PARTIAL);
   LVFINDINFOW fiw;
   LRESULT res;
-  
+
   memcpy(&fiw, lpFindInfo, sizeof(fiw));
   if (hasText) fiw.psz = textdupTtoW((LPCWSTR)lpFindInfo->psz, FALSE);
   res = LISTVIEW_FindItemW(hwnd, nStart, &fiw);
@@ -4902,7 +4902,7 @@
 /***
  * DESCRIPTION:
  * Retrieves the background color of the listview control.
- * 
+ *
  * PARAMETER(S):
  * [I] HWND : window handle
  *
@@ -4919,7 +4919,7 @@
 /***
  * DESCRIPTION:
  * Retrieves the background image of the listview control.
- * 
+ *
  * PARAMETER(S):
  * [I] HWND : window handle
  * [O] LPLVMKBIMAGE : background image attributes
@@ -4937,7 +4937,7 @@
 /***
  * DESCRIPTION:
  * Retrieves the callback mask.
- * 
+ *
  * PARAMETER(S):
  * [I] HWND : window handle
  *
@@ -4954,7 +4954,7 @@
 /***
  * DESCRIPTION:
  * Retrieves column attributes.
- * 
+ *
  * PARAMETER(S):
  * [I] HWND : window handle
  * [I] INT :  column index
@@ -4971,16 +4971,16 @@
   LISTVIEW_INFO *infoPtr = (LISTVIEW_INFO *)GetWindowLongW(hwnd, 0);
   HDITEMW hdi;
   BOOL bResult = FALSE;
-  
+
   if (lpColumn != NULL)
   {
 
-    TRACE("(hwnd=%x, col=%d, lpColumn=%s, isW=%d)\n", 
+    TRACE("(hwnd=%x, col=%d, lpColumn=%s, isW=%d)\n",
         hwnd, nItem, debuglvcolumn_t(lpColumn, isW), isW);
 
     /* initialize memory */
     ZeroMemory(&hdi, sizeof(hdi));
-    
+
     if (lpColumn->mask & LVCF_FMT)
       hdi.mask |= HDI_FORMAT;
 
@@ -5007,7 +5007,7 @@
 
     if (bResult != FALSE)
     {
-      if (lpColumn->mask & LVCF_FMT) 
+      if (lpColumn->mask & LVCF_FMT)
       {
         lpColumn->fmt = 0;
 
@@ -5027,7 +5027,7 @@
 
       if (lpColumn->mask & LVCF_WIDTH)
         lpColumn->cx = hdi.cxy;
-      
+
       if (lpColumn->mask & LVCF_IMAGE)
         lpColumn->iImage = hdi.iImage;
 
@@ -5058,14 +5058,14 @@
 /***
  * DESCRIPTION:
  * Retrieves the column width.
- * 
+ *
  * PARAMETER(S):
  * [I] HWND : window handle
  * [I] int : column index
  *
  * RETURN:
  *   SUCCESS : column width
- *   FAILURE : zero 
+ *   FAILURE : zero
  */
 static LRESULT LISTVIEW_GetColumnWidth(HWND hwnd, INT nColumn)
 {
@@ -5092,10 +5092,10 @@
 
 /***
  * DESCRIPTION:
- * In list or report display mode, retrieves the number of items that can fit 
- * vertically in the visible area. In icon or small icon display mode, 
+ * In list or report display mode, retrieves the number of items that can fit
+ * vertically in the visible area. In icon or small icon display mode,
  * retrieves the total number of visible items.
- * 
+ *
  * PARAMETER(S):
  * [I] HWND : window handle
  *
@@ -5112,7 +5112,7 @@
   {
     if (infoPtr->rcList.right > infoPtr->nItemWidth)
     {
-      nItemCount = LISTVIEW_GetCountPerRow(hwnd) * 
+      nItemCount = LISTVIEW_GetCountPerRow(hwnd) *
                    LISTVIEW_GetCountPerColumn(hwnd);
     }
   }
@@ -5155,7 +5155,7 @@
 /***
  * DESCRIPTION:
  * Retrieves the handle to the header control.
- * 
+ *
  * PARAMETER(S):
  * [I] HWND : window handle
  *
@@ -5193,11 +5193,11 @@
 /***
  * DESCRIPTION:
  * Retrieves an image list handle.
- * 
+ *
  * PARAMETER(S):
  * [I] HWND : window handle
- * [I] INT : image list identifier 
- * 
+ * [I] INT : image list identifier
+ *
  * RETURN:
  *   SUCCESS : image list handle
  *   FAILURE : NULL
@@ -5207,7 +5207,7 @@
   LISTVIEW_INFO *infoPtr = (LISTVIEW_INFO *)GetWindowLongW(hwnd, 0);
   HIMAGELIST himl = NULL;
 
-  switch (nImageList) 
+  switch (nImageList)
   {
   case LVSIL_NORMAL:
     himl = infoPtr->himlNormal;
@@ -5228,17 +5228,17 @@
 /***
  * DESCRIPTION:
  * Retrieves item attributes.
- * 
+ *
  * PARAMETER(S):
  * [I] hwnd : window handle
  * [IO] lpLVItem : item info
  * [I] internal : if true then we will use tricks that avoid copies
  *               but are not compatible with the regular interface
- * [I] isW : if TRUE, then lpLVItem is a LPLVITEMW, 
+ * [I] isW : if TRUE, then lpLVItem is a LPLVITEMW,
  *           if FALSE, the lpLVItem is a LPLVITEMA.
- * 
+ *
  * RETURN:
- *   SUCCESS : TRUE 
+ *   SUCCESS : TRUE
  *   FAILURE : FALSE
  */
 static LRESULT LISTVIEW_GetItemT(HWND hwnd, LPLVITEMW lpLVItem, BOOL internal, BOOL isW)
@@ -5259,15 +5259,15 @@
     ERR("We can't have internal non-Unicode GetItem!\n");
     return FALSE;
   }
-  
+
   /* In the following:
    * lpLVItem describes the information requested by the user
    * lpItem/lpSubItem is what we have
-   * dispInfo is a structure we use to request the missing 
+   * dispInfo is a structure we use to request the missing
    *     information from the application
    */
 
-  TRACE("(hwnd=%x, lpLVItem=%s, internal=%d, isW=%d)\n", 
+  TRACE("(hwnd=%x, lpLVItem=%s, internal=%d, isW=%d)\n",
         hwnd, debuglvitem_t(lpLVItem, isW), internal, isW);
 
   if ((lpLVItem == NULL) || (lpLVItem->iItem < 0) ||
@@ -5288,7 +5288,7 @@
 
     if ((lpLVItem->mask & LVIF_STATE)&&(lpLVItem->iSubItem == 0))
     {
-      lpLVItem->state = 0; 
+      lpLVItem->state = 0;
       if (infoPtr->nFocusedItem == lpLVItem->iItem)
         lpLVItem->state |= LVIS_FOCUSED;
       if (LISTVIEW_IsSelected(hwnd,lpLVItem->iItem))
@@ -5311,9 +5311,9 @@
     ppszText=&lpItem->pszText;
     plParam=&lpItem->lParam;
     if ((lpLVItem->mask & LVIF_STATE) && infoPtr->uCallbackMask)
-    {        
+    {
       dispInfo.item.mask |= LVIF_STATE;
-      dispInfo.item.stateMask = infoPtr->uCallbackMask; 
+      dispInfo.item.stateMask = infoPtr->uCallbackMask;
     }
   }
   else
@@ -5336,7 +5336,7 @@
     dispInfo.item.mask |= LVIF_TEXT;
     dispInfo.item.pszText = lpLVItem->pszText;
     dispInfo.item.cchTextMax = lpLVItem->cchTextMax;
-    if (dispInfo.item.pszText && lpLVItem->cchTextMax > 0) 
+    if (dispInfo.item.pszText && lpLVItem->cchTextMax > 0)
       *dispInfo.item.pszText = '\0';
     if (dispInfo.item.pszText && (*ppszText == NULL))
       *dispInfo.item.pszText = '\0';
@@ -5374,14 +5374,14 @@
 
   if (dispInfo.item.mask & LVIF_TEXT)
   {
-    if ((dispInfo.item.mask & LVIF_DI_SETITEM) && *ppszText) 
+    if ((dispInfo.item.mask & LVIF_DI_SETITEM) && *ppszText)
       textsetptrT(ppszText, dispInfo.item.pszText, isW);
-    
+
     /* If lpLVItem->pszText==dispInfo.item.pszText a copy is unnecessary, but */
     /* some apps give a new pointer in ListView_Notify so we can't be sure.  */
-    if (lpLVItem->pszText != dispInfo.item.pszText) 
+    if (lpLVItem->pszText != dispInfo.item.pszText)
         textcpynT(lpLVItem->pszText, isW, dispInfo.item.pszText, isW, lpLVItem->cchTextMax);
-    
+
   }
   else if (lpLVItem->mask & LVIF_TEXT)
   {
@@ -5398,7 +5398,7 @@
       lpLVItem->state |= (dispInfo.item.state & dispInfo.item.stateMask);
 
       lpLVItem->state &= ~LVIS_SELECTED;
-      if ((dispInfo.item.stateMask & LVIS_SELECTED) && 
+      if ((dispInfo.item.stateMask & LVIS_SELECTED) &&
           LISTVIEW_IsSelected(hwnd,dispInfo.item.iItem))
         lpLVItem->state |= LVIS_SELECTED;
     }
@@ -5407,7 +5407,7 @@
       lpLVItem->state = lpItem->state & lpLVItem->stateMask;
 
       lpLVItem->state &= ~LVIS_SELECTED;
-      if ((lpLVItem->stateMask & LVIS_SELECTED) && 
+      if ((lpLVItem->stateMask & LVIS_SELECTED) &&
           LISTVIEW_IsSelected(hwnd,lpLVItem->iItem))
          lpLVItem->state |= LVIS_SELECTED;
     }
@@ -5447,10 +5447,10 @@
 /***
  * DESCRIPTION:
  * Retrieves the number of items in the listview control.
- * 
+ *
  * PARAMETER(S):
  * [I] HWND : window handle
- * 
+ *
  * RETURN:
  * Number of items.
  */
@@ -5464,7 +5464,7 @@
 /***
  * DESCRIPTION:
  * Retrieves the rectangle enclosing the item icon and text.
- * 
+ *
  * PARAMETER(S):
  * [I] HWND : window handle
  * [I] INT : item index
@@ -5486,8 +5486,8 @@
   INT nRow;
 
   TRACE("(hwnd=%x,nItem=%d,lpRect=%p)\n", hwnd, nItem, lpRect);
-  
-  if ((nItem >= 0) && (nItem < GETITEMCOUNT(infoPtr)) && 
+
+  if ((nItem >= 0) && (nItem < GETITEMCOUNT(infoPtr)) &&
       (lpRect != NULL))
   {
     if (uView == LVS_LIST)
@@ -5519,7 +5519,7 @@
     {
       bResult = TRUE;
       lpRect->left = REPORT_MARGINX;
-      lpRect->top = ((nItem - ListView_GetTopIndex(hwnd)) * 
+      lpRect->top = ((nItem - ListView_GetTopIndex(hwnd)) *
                          infoPtr->nItemHeight) + infoPtr->rcList.top;
 
       if (!(lStyle & LVS_NOSCROLL))
@@ -5583,7 +5583,7 @@
     bResult = LISTVIEW_GetItemBoundBox(hwnd, nItem, &rcBounding);
     lpptPosition->x = rcBounding.left;
     lpptPosition->y = rcBounding.top;
-    if (uView == LVS_ICON) 
+    if (uView == LVS_ICON)
     {
        lpptPosition->y += ICON_TOP_PADDING;
        lpptPosition->x += (infoPtr->iconSpacing.cx - infoPtr->iconSize.cx) / 2;
@@ -5598,7 +5598,7 @@
  * Update the bounding rectangle around the text under a large icon.
  * This depends on whether it has the focus or not.
  * On entry the rectangle's top, left and right should be set.
- * On return the bottom will also be set and the width may have been 
+ * On return the bottom will also be set and the width may have been
  * modified.
  *
  * This appears to be weird, even in the Microsoft implementation.
@@ -5615,11 +5615,11 @@
 
     if (infoPtr->bFocus && infoPtr->nFocusedItem == nItem)
     {
-        /* We (aim to) display the full text.  In Windows 95 it appears to 
+        /* We (aim to) display the full text.  In Windows 95 it appears to
          * calculate the size assuming the specified font and then it draws
-         * the text in that region with the specified font except scaled to 
+         * the text in that region with the specified font except scaled to
          * 10 point (or the height of the system font or ...).  Thus if the
-         * window has 24 point Helvetica the highlit rectangle will be 
+         * window has 24 point Helvetica the highlit rectangle will be
          * taller than the text and if it is 7 point Helvetica then the text
          * will be clipped.
          * For now we will simply say that it is the correct size to display
@@ -5646,8 +5646,8 @@
          * 5.81?) it measures this on the basis of the selected font and then
          * draws it with the same font except in 10 point size.  This can lead
          * to more or less than the two rows appearing.
-         * Question; are we  supposed to be including DT_EXTERNALLEADING? 
-         * Question; should the width be shrunk to the space required to 
+         * Question; are we  supposed to be including DT_EXTERNALLEADING?
+         * Question; should the width be shrunk to the space required to
          * display the two lines?
          */
         rect->bottom = rect->top + 2 * infoPtr->ntmHeight;
@@ -5660,7 +5660,7 @@
 /***
  * DESCRIPTION:
  * Retrieves the bounding rectangle for a listview control item.
- * 
+ *
  * PARAMETER(S):
  * [I] HWND : window handle
  * [I] INT : item index
@@ -5674,7 +5674,7 @@
  *     LVIR_LABEL Returns the bounding rectangle of the item text.
  *     LVIR_SELECTBOUNDS Returns the union of the LVIR_ICON and LVIR_LABEL
  *	rectangles, but excludes columns in report view.
- * 
+ *
  * RETURN:
  *   SUCCESS : TRUE
  *   FAILURE : FALSE
@@ -5682,7 +5682,7 @@
  * NOTES
  *   Note that the bounding rectangle of the label in the LVS_ICON view depends
  *   upon whether the window has the focus currently and on whether the item
- *   is the one with the focus.  Ensure that the control's record of which 
+ *   is the one with the focus.  Ensure that the control's record of which
  *   item has the focus agrees with the items' records.
  */
 static LRESULT LISTVIEW_GetItemRect(HWND hwnd, INT nItem, LPRECT lprc)
@@ -5710,19 +5710,19 @@
 
     /* do indent */
     if (lvItem.iIndent>0 && infoPtr->iconSize.cx > 0)
-      nIndent = infoPtr->iconSize.cx * lvItem.iIndent; 
+      nIndent = infoPtr->iconSize.cx * lvItem.iIndent;
     else
       nIndent = 0;
   }
   else
     nIndent = 0;
- 
+
   if ((nItem >= 0) && (nItem < GETITEMCOUNT(infoPtr)) && (lprc != NULL))
   {
-      switch(lprc->left)  
-      {  
+      switch(lprc->left)
+      {
       case LVIR_ICON:
-	if (!ListView_GetItemPosition(hwnd, nItem, &ptItem)) break; 
+	if (!ListView_GetItemPosition(hwnd, nItem, &ptItem)) break;
         if (uView == LVS_ICON)
         {
           if (infoPtr->himlNormal != NULL)
@@ -5733,7 +5733,7 @@
               lprc->left = ptItem.x + ptOrigin.x;
               lprc->top = ptItem.y + ptOrigin.y;
               lprc->right = lprc->left + infoPtr->iconSize.cx;
-              lprc->bottom = (lprc->top + infoPtr->iconSize.cy + 
+              lprc->bottom = (lprc->top + infoPtr->iconSize.cy +
                               ICON_BOTTOM_PADDING + ICON_TOP_PADDING);
             }
           }
@@ -5749,14 +5749,14 @@
 
             if (infoPtr->himlState != NULL)
               lprc->left += infoPtr->iconSize.cx;
-              
+
             if (infoPtr->himlSmall != NULL)
               lprc->right = lprc->left + infoPtr->iconSize.cx;
             else
               lprc->right = lprc->left;
           }
         }
-        else 
+        else
         {
           bResult = TRUE;
           lprc->left = ptItem.x;
@@ -5767,7 +5767,7 @@
 
           if (infoPtr->himlState != NULL)
             lprc->left += infoPtr->iconSize.cx;
-            
+
           if (infoPtr->himlSmall != NULL)
             lprc->right = lprc->left + infoPtr->iconSize.cx;
           else
@@ -5799,7 +5799,7 @@
                 lprc->right = lprc->left + infoPtr->iconSpacing.cx - 1;
                 ListView_UpdateLargeItemLabelRect (hwnd, infoPtr, nItem, lprc);
               }
-            }              
+            }
           }
         }
         else if (uView == LVS_SMALLICON)
@@ -5807,16 +5807,16 @@
           if (LISTVIEW_GetOrigin(hwnd, &ptOrigin) != FALSE)
           {
             bResult = TRUE;
-            nLeftPos = lprc->left = ptItem.x + ptOrigin.x; 
+            nLeftPos = lprc->left = ptItem.x + ptOrigin.x;
             lprc->top = ptItem.y + ptOrigin.y;
             lprc->bottom = lprc->top + infoPtr->nItemHeight;
-            
+
             if (infoPtr->himlState != NULL)
               lprc->left += infoPtr->iconSize.cx;
-            
+
             if (infoPtr->himlSmall != NULL)
               lprc->left += infoPtr->iconSize.cx;
-            
+
             nLabelWidth = LISTVIEW_GetLabelWidth(hwnd, nItem);
             nLabelWidth += TRAILING_PADDING;
             if (lprc->left + nLabelWidth < nLeftPos + infoPtr->nItemWidth)
@@ -5830,8 +5830,8 @@
           bResult = TRUE;
           if (uView == LVS_REPORT)
             nLeftPos = lprc->left = ptItem.x + nIndent;
-          else 
-            nLeftPos = lprc->left = ptItem.x; 
+          else
+            nLeftPos = lprc->left = ptItem.x;
           lprc->top = ptItem.y;
           lprc->bottom = lprc->top + infoPtr->nItemHeight;
 
@@ -5877,11 +5877,11 @@
                */
               bResult = TRUE;
               icon_left = text_left = ptItem.x;
- 
+
               /* Correct ptItem to icon upper-left */
               icon_left += (infoPtr->nItemWidth - infoPtr->iconSize.cx)/2;
               ptItem.y += ICON_TOP_PADDING;
- 
+
               /* Compute the label left and right */
                nLabelWidth = LISTVIEW_GetLabelWidth(hwnd, nItem);
                text_pos_x = infoPtr->iconSpacing.cx - 2*CAPTION_BORDER - nLabelWidth;
@@ -5895,7 +5895,7 @@
                  text_left += 1;
                  text_right = text_left + infoPtr->iconSpacing.cx - 1;
                }
- 
+
               /* Compute rectangle w/o the text height */
                lprc->left = min(icon_left, text_left) + ptOrigin.x;
                lprc->right = max(icon_left + infoPtr->iconSize.cx,
@@ -5904,20 +5904,20 @@
                lprc->bottom = lprc->top + ICON_TOP_PADDING_HITABLE
                              + infoPtr->iconSize.cy + 1
                               + ICON_BOTTOM_PADDING;
- 
+
                CopyRect (&label_rect, lprc);
                label_rect.top = lprc->bottom;
                ListView_UpdateLargeItemLabelRect (hwnd, infoPtr, nItem, &label_rect);
                UnionRect (lprc, lprc, &label_rect);
             }
-          } 
+          }
         }
         else if (uView == LVS_SMALLICON)
         {
           if (LISTVIEW_GetOrigin(hwnd, &ptOrigin) != FALSE)
           {
             bResult = TRUE;
-            lprc->left = ptItem.x + ptOrigin.x; 
+            lprc->left = ptItem.x + ptOrigin.x;
             lprc->right = lprc->left;
             lprc->top = ptItem.y + ptOrigin.y;
             lprc->bottom = lprc->top + infoPtr->nItemHeight;
@@ -5939,7 +5939,7 @@
         else
         {
           bResult = TRUE;
-          lprc->left = ptItem.x; 
+          lprc->left = ptItem.x;
           if (!(infoPtr->dwExStyle&LVS_EX_FULLROWSELECT) && uView&LVS_REPORT)
             lprc->left += nIndent;
           lprc->right = lprc->left;
@@ -5971,7 +5971,7 @@
           }
         }
         break;
-        
+
       case LVIR_SELECTBOUNDS:
         if (!ListView_GetItemPosition(hwnd, nItem, &ptItem)) break;
         if (uView == LVS_ICON)
@@ -5986,25 +5986,25 @@
               lprc->right = lprc->left + infoPtr->iconSpacing.cx;
               lprc->bottom = lprc->top + infoPtr->iconSpacing.cy;
             }
-          } 
+          }
         }
         else if (uView == LVS_SMALLICON)
         {
           if (LISTVIEW_GetOrigin(hwnd, &ptOrigin) != FALSE)
           {
             bResult = TRUE;
-            nLeftPos= lprc->left = ptItem.x + ptOrigin.x;  
+            nLeftPos= lprc->left = ptItem.x + ptOrigin.x;
             lprc->top = ptItem.y + ptOrigin.y;
             lprc->bottom = lprc->top + infoPtr->nItemHeight;
-            
+
             if (infoPtr->himlState != NULL)
               lprc->left += infoPtr->iconSize.cx;
-            
+
             lprc->right = lprc->left;
-            
+
             if (infoPtr->himlSmall != NULL)
               lprc->right += infoPtr->iconSize.cx;
-            
+
 	    nLabelWidth = LISTVIEW_GetLabelWidth(hwnd, nItem);
             nLabelWidth += TRAILING_PADDING;
 	    if (lprc->right + nLabelWidth < nLeftPos + infoPtr->nItemWidth)
@@ -6017,17 +6017,17 @@
         {
           bResult = TRUE;
           if (!(infoPtr->dwExStyle&LVS_EX_FULLROWSELECT) && (uView&LVS_REPORT))
-	    nLeftPos = lprc->left = ptItem.x + nIndent; 
+	    nLeftPos = lprc->left = ptItem.x + nIndent;
           else
-	    nLeftPos = lprc->left = ptItem.x; 
+	    nLeftPos = lprc->left = ptItem.x;
           lprc->top = ptItem.y;
           lprc->bottom = lprc->top + infoPtr->nItemHeight;
 
           if (infoPtr->himlState != NULL)
             lprc->left += infoPtr->iconSize.cx;
-          
+
           lprc->right = lprc->left;
-        
+
           if (infoPtr->dwExStyle & LVS_EX_FULLROWSELECT)
           {
 	    RECT br;
@@ -6068,7 +6068,7 @@
     UINT uView = GetWindowLongW(hwnd, GWL_STYLE) & LVS_TYPEMASK;
     INT  count;
 
-    TRACE("(hwnd=%x, nItem=%d, nSubItem=%d lprc=%p)\n", hwnd, nItem, nSubItem, 
+    TRACE("(hwnd=%x, nItem=%d, nSubItem=%d lprc=%p)\n", hwnd, nItem, nSubItem,
             lprc);
 
     if (!(uView & LVS_REPORT))
@@ -6093,17 +6093,17 @@
                             lprc->left;
 
     }
-    return TRUE;    
+    return TRUE;
 }
 
 
 /***
  * DESCRIPTION:
  * Retrieves the width of a label.
- * 
+ *
  * PARAMETER(S):
  * [I] HWND : window handle
- * 
+ *
  * RETURN:
  *   SUCCESS : string width (in pixels)
  *   FAILURE : zero
@@ -6122,18 +6122,18 @@
   lvItem.cchTextMax = DISP_TEXT_SIZE;
   lvItem.pszText = szDispText;
   if (LISTVIEW_GetItemW(hwnd, &lvItem, TRUE))
-    nLabelWidth = ListView_GetStringWidthW(hwnd, lvItem.pszText); 
-    
+    nLabelWidth = ListView_GetStringWidthW(hwnd, lvItem.pszText);
+
   return nLabelWidth;
 }
 
 /***
  * DESCRIPTION:
  * Retrieves the spacing between listview control items.
- * 
+ *
  * PARAMETER(S):
  * [I] HWND : window handle
- * [I] BOOL : flag for small or large icon 
+ * [I] BOOL : flag for small or large icon
  *
  * RETURN:
  * Horizontal + vertical spacing
@@ -6161,12 +6161,12 @@
 /***
  * DESCRIPTION:
  * Retrieves the state of a listview control item.
- * 
+ *
  * PARAMETER(S):
  * [I] HWND : window handle
  * [I] INT : item index
  * [I] UINT : state mask
- * 
+ *
  * RETURN:
  * State specified by the mask.
  */
@@ -6191,14 +6191,14 @@
 
 /***
  * DESCRIPTION:
- * Retrieves the text of a listview control item or subitem. 
- * 
+ * Retrieves the text of a listview control item or subitem.
+ *
  * PARAMETER(S):
  * [I] hwnd : window handle
  * [I] nItem : item index
  * [IO] lpLVItem : item information
  * [I] isW :  TRUE if lpLVItem is Unicode
- * 
+ *
  * RETURN:
  *   SUCCESS : string length
  *   FAILURE : 0
@@ -6207,7 +6207,7 @@
 {
   LISTVIEW_INFO *infoPtr = (LISTVIEW_INFO *)GetWindowLongW(hwnd, 0);
   INT nLength = 0;
-  
+
   if (lpLVItem != NULL)
   {
     if ((nItem >= 0) && (nItem < GETITEMCOUNT(infoPtr)))
@@ -6225,12 +6225,12 @@
 /***
  * DESCRIPTION:
  * Searches for an item based on properties + relationships.
- * 
+ *
  * PARAMETER(S):
  * [I] HWND : window handle
  * [I] INT : item index
  * [I] INT : relationship flag
- * 
+ *
  * RETURN:
  *   SUCCESS : item index
  *   FAILURE : -1
@@ -6243,17 +6243,17 @@
   LVFINDINFOW lvFindInfo;
   INT nCountPerColumn;
   INT i;
-  
+
   if ((nItem >= -1) && (nItem < GETITEMCOUNT(infoPtr)))
-  { 
+  {
     ZeroMemory(&lvFindInfo, sizeof(lvFindInfo));
 
     if (uFlags & LVNI_CUT)
       uMask |= LVIS_CUT;
-    
+
     if (uFlags & LVNI_DROPHILITED)
       uMask |= LVIS_DROPHILITED;
-          
+
     if (uFlags & LVNI_FOCUSED)
       uMask |= LVIS_FOCUSED;
 
@@ -6375,11 +6375,11 @@
 /***
  * DESCRIPTION:
  * Retrieves the origin coordinates when in icon or small icon display mode.
- * 
+ *
  * PARAMETER(S):
  * [I] HWND : window handle
  * [O] LPPOINT : coordinate information
- * 
+ *
  * RETURN:
  *   SUCCESS : TRUE
  *   FAILURE : FALSE
@@ -6389,7 +6389,7 @@
   LONG lStyle = GetWindowLongW(hwnd, GWL_STYLE);
   UINT uView = lStyle & LVS_TYPEMASK;
   BOOL bResult = FALSE;
-  
+
   TRACE("(hwnd=%x, lpptOrigin=%p)\n", hwnd, lpptOrigin);
 
   if ((uView == LVS_SMALLICON) || (uView == LVS_ICON))
@@ -6402,8 +6402,8 @@
     if (lStyle & WS_HSCROLL)
     {
       scrollInfo.fMask = SIF_POS;
-      if (GetScrollInfo(hwnd, SB_HORZ, &scrollInfo) != FALSE) 
-        lpptOrigin->x = -scrollInfo.nPos * LISTVIEW_SCROLL_DIV_SIZE; 
+      if (GetScrollInfo(hwnd, SB_HORZ, &scrollInfo) != FALSE)
+        lpptOrigin->x = -scrollInfo.nPos * LISTVIEW_SCROLL_DIV_SIZE;
     }
 
     if (lStyle & WS_VSCROLL)
@@ -6412,20 +6412,20 @@
       if (GetScrollInfo(hwnd, SB_VERT, &scrollInfo) != FALSE)
         lpptOrigin->y = -scrollInfo.nPos * LISTVIEW_SCROLL_DIV_SIZE;
     }
-      
+
     bResult = TRUE;
   }
-  
+
   return bResult;
 }
 
 /***
  * DESCRIPTION:
  * Retrieves the number of items that are marked as selected.
- * 
+ *
  * PARAMETER(S):
  * [I] HWND : window handle
- * 
+ *
  * RETURN:
  * Number of items selected.
  */
@@ -6441,17 +6441,17 @@
     if (ListView_GetItemState(hwnd, i, LVIS_SELECTED) & LVIS_SELECTED)
       nSelectedCount++;
   }
-  
+
   return nSelectedCount;
 }
 
 /***
  * DESCRIPTION:
  * Retrieves item index that marks the start of a multiple selection.
- * 
+ *
  * PARAMETER(S):
  * [I] HWND : window handle
- * 
+ *
  * RETURN:
  * Index number or -1 if there is no selection mark.
  */
@@ -6466,12 +6466,12 @@
 /***
  * DESCRIPTION:
  * Retrieves the width of a string.
- * 
+ *
  * PARAMETER(S):
  * [I] hwnd : window handle
  * [I] lpszText : text string to process
  * [I] isW : TRUE if lpszText is Unicode, FALSE otherwise
- * 
+ *
  * RETURN:
  *   SUCCESS : string width (in pixels)
  *   FAILURE : zero
@@ -6500,10 +6500,10 @@
 /***
  * DESCRIPTION:
  * Retrieves the text backgound color.
- * 
+ *
  * PARAMETER(S):
  * [I] HWND : window handle
- * 
+ *
  * RETURN:
  * COLORREF associated with the the background.
  */
@@ -6517,10 +6517,10 @@
 /***
  * DESCRIPTION:
  * Retrieves the text color.
- * 
+ *
  * PARAMETER(S):
  * [I] HWND : window handle
- * 
+ *
  * RETURN:
  * COLORREF associated with the text.
  */
@@ -6534,7 +6534,7 @@
 /***
  * DESCRIPTION:
  * Determines item if a hit or closest if not
- * 
+ *
  * PARAMETER(S):
  * [I] HWND : window handle
  * [IO] LPLV_INTHIT : hit test information
@@ -6558,7 +6558,7 @@
   topindex = ListView_GetTopIndex(hwnd);
   if (uView == LVS_REPORT)
   {
-    bottomindex = topindex + LISTVIEW_GetCountPerColumn(hwnd) + 1;  
+    bottomindex = topindex + LISTVIEW_GetCountPerColumn(hwnd) + 1;
     bottomindex = min(bottomindex,GETITEMCOUNT(infoPtr));
   }
   else
@@ -6587,7 +6587,7 @@
             return i;
           }
         }
-      
+
         rcItem.left = LVIR_LABEL;
         if (LISTVIEW_GetItemRect(hwnd, i, &rcItem))
         {
@@ -6599,7 +6599,7 @@
             return i;
           }
         }
-        
+
         lpInt->ht.flags = LVHT_ONITEMSTATEICON;
         lpInt->ht.iItem = i;
         if (subitem) lpInt->ht.iSubItem = 0;
@@ -6615,7 +6615,7 @@
         xterm = rcItem.left + (rcItem.right - rcItem.left)/2 - lpInt->ht.pt.x;
         yterm = rcItem.top + (rcItem.bottom - rcItem.top)/2 - lpInt->ht.pt.y;
         dist = xterm * xterm + yterm * yterm;
-        if (dist < lpInt->distance) 
+        if (dist < lpInt->distance)
         {
           lpInt->distance = dist;
           lpInt->iDistItem = i;
@@ -6623,7 +6623,7 @@
       }
     }
   }
-     
+
   lpInt->ht.flags = LVHT_NOWHERE;
   TRACE("no hit, closest item %d, distance %ld\n", lpInt->iDistItem, lpInt->distance);
 
@@ -6660,7 +6660,7 @@
 /***
  * DESCRIPTION:
  * Determines which listview item is located at the specified position.
- * 
+ *
  * PARAMETER(S):
  * [I] HWND : window handle
  * [IO} LPLVHITTESTINFO : hit test information
@@ -6678,29 +6678,29 @@
 
   if (infoPtr->rcList.left > lpHitTestInfo->pt.x)
     lpHitTestInfo->flags = LVHT_TOLEFT;
-  else if (infoPtr->rcList.right < lpHitTestInfo->pt.x) 
+  else if (infoPtr->rcList.right < lpHitTestInfo->pt.x)
     lpHitTestInfo->flags = LVHT_TORIGHT;
   if (infoPtr->rcList.top > lpHitTestInfo->pt.y)
     lpHitTestInfo->flags |= LVHT_ABOVE;
-  else if (infoPtr->rcList.bottom < lpHitTestInfo->pt.y) 
+  else if (infoPtr->rcList.bottom < lpHitTestInfo->pt.y)
     lpHitTestInfo->flags |= LVHT_BELOW;
 
   if (lpHitTestInfo->flags == 0)
   {
-    /* NOTE (mm 20001022): We must not allow iSubItem to be touched, for 
+    /* NOTE (mm 20001022): We must not allow iSubItem to be touched, for
      * an app might pass only a structure with space up to iItem!
      * (MS Office 97 does that for instance in the file open dialog)
      */
     nItem = LISTVIEW_HitTestItem(hwnd, lpHitTestInfo, FALSE);
   }
-  
+
   return nItem;
 }
 
 /***
  * DESCRIPTION:
  * Inserts a new column.
- * 
+ *
  * PARAMETER(S):
  * [I] HWND : window handle
  * [I] INT : column index
@@ -6710,7 +6710,7 @@
  *   SUCCESS : new column index
  *   FAILURE : -1
  */
-static LRESULT LISTVIEW_InsertColumnT(HWND hwnd, INT nColumn, 
+static LRESULT LISTVIEW_InsertColumnT(HWND hwnd, INT nColumn,
                                       LPLVCOLUMNW lpColumn, BOOL isW)
 {
   LISTVIEW_INFO *infoPtr = (LISTVIEW_INFO *)GetWindowLongW(hwnd, 0);
@@ -6719,12 +6719,12 @@
 
   TRACE("(hwnd=%x, nColumn=%d, lpColumn=%p)\n",hwnd, nColumn, lpColumn);
 
-  if (lpColumn != NULL) 
+  if (lpColumn != NULL)
   {
     /* initialize memory */
     ZeroMemory(&hdi, sizeof(hdi));
 
-    if (lpColumn->mask & LVCF_FMT) 
+    if (lpColumn->mask & LVCF_FMT)
     {
       /* format member is valid */
       hdi.mask |= HDI_FORMAT;
@@ -6749,7 +6749,7 @@
           hdi.fmt |= HDF_CENTER;
         }
       }
- 
+
       if (lpColumn->fmt & LVCFMT_BITMAP_ON_RIGHT)
       {
         hdi.fmt |= HDF_BITMAP_ON_RIGHT;
@@ -6760,7 +6760,7 @@
       {
         /* ??? */
       }
-      
+
       if (lpColumn->fmt & LVCFMT_IMAGE)
       {
         hdi.fmt |= HDF_IMAGE;
@@ -6768,7 +6768,7 @@
       }
     }
 
-    if (lpColumn->mask & LVCF_WIDTH) 
+    if (lpColumn->mask & LVCF_WIDTH)
     {
       hdi.mask |= HDI_WIDTH;
       if(lpColumn->cx == LVSCW_AUTOSIZE_USEHEADER)
@@ -6777,13 +6777,13 @@
         HDITEMW hdit;
         RECT rcHeader;
         INT item_index;
-        
+
         ZeroMemory(&hdit, sizeof(hdit));
-  
+
         /* get the width of every item except the current one */
         hdit.mask = HDI_WIDTH;
         hdi.cxy = 0;
-        
+
         for(item_index = 0; item_index < (nColumn - 1); item_index++) {
           Header_GetItemW(infoPtr->hwndHeader, item_index, (LPARAM)(&hdit));
           hdi.cxy+=hdit.cxy;
@@ -6799,22 +6799,22 @@
       else
         hdi.cxy = lpColumn->cx;
     }
-  
-    if (lpColumn->mask & LVCF_TEXT) 
+
+    if (lpColumn->mask & LVCF_TEXT)
     {
       hdi.mask |= HDI_TEXT | HDI_FORMAT;
       hdi.pszText = lpColumn->pszText;
       hdi.cchTextMax = textlenT(lpColumn->pszText, isW);
       hdi.fmt |= HDF_STRING;
     }
-  
-    if (lpColumn->mask & LVCF_IMAGE) 
+
+    if (lpColumn->mask & LVCF_IMAGE)
     {
       hdi.mask |= HDI_IMAGE;
       hdi.iImage = lpColumn->iImage;
     }
 
-    if (lpColumn->mask & LVCF_ORDER) 
+    if (lpColumn->mask & LVCF_ORDER)
     {
       hdi.mask |= HDI_ORDER;
       hdi.iOrder = lpColumn->iOrder;
@@ -6823,7 +6823,7 @@
     /* insert item in header control */
     nNewColumn = SendMessageW(infoPtr->hwndHeader, HDM_INSERTITEMT(isW),
                              (WPARAM)nColumn, (LPARAM)&hdi);
-    
+
     /* Need to reset the item width when inserting a new column */
     infoPtr->nItemWidth = LISTVIEW_GetItemWidth(hwnd);
 
@@ -6843,12 +6843,12 @@
 /* Platform SDK:
     (remarks on LVITEM: LVM_INSERTITEM will insert the new item in the proper sort postion...
         if:
-          LVS_SORTXXX must be specified, 
-          LVS_OWNERDRAW is not set, 
+          LVS_SORTXXX must be specified,
+          LVS_OWNERDRAW is not set,
           <item>.pszText is not LPSTR_TEXTCALLBACK.
 
-    (LVS_SORT* flags): "For the LVS_SORTASCENDING... styles, item indices 
-    are sorted based on item text..." 
+    (LVS_SORT* flags): "For the LVS_SORTASCENDING... styles, item indices
+    are sorted based on item text..."
 */
 static INT WINAPI LISTVIEW_InsertCompare(  LPVOID first, LPVOID second,  LPARAM lParam)
 {
@@ -6863,7 +6863,7 @@
 /***
  * nESCRIPTION:
  * Inserts a new item in the listview control.
- * 
+ *
  * PARAMETER(S):
  * [I] HWND : window handle
  * [I] LPLVITEMW : item information
@@ -6883,7 +6883,7 @@
   INT nItemWidth = 0;
   LISTVIEW_ITEM *lpItem = NULL;
 
-  TRACE("(hwnd=%x, lpLVItem=%s, isW=%d)\n", 
+  TRACE("(hwnd=%x, lpLVItem=%s, isW=%d)\n",
 	hwnd, debuglvitem_t(lpLVItem, isW), isW);
 
   if (lStyle & LVS_OWNERDATA)
@@ -6914,14 +6914,14 @@
 	      {
 		/* Insert the item in the proper sort order based on the pszText
 		  member. See comments for LISTVIEW_InsertCompare() for greater detail */
-		  nItem = DPA_InsertPtr( infoPtr->hdpaItems, 
+		  nItem = DPA_InsertPtr( infoPtr->hdpaItems,
 			  GETITEMCOUNT( infoPtr ) + 1, hdpaSubItems );
 		  DPA_Sort( infoPtr->hdpaItems, LISTVIEW_InsertCompare, hwnd );
 		  nItem = DPA_GetPtrIndex( infoPtr->hdpaItems, hdpaSubItems );
 	      }
 	      else
 	      {
-                nItem = DPA_InsertPtr(infoPtr->hdpaItems, lpLVItem->iItem, 
+                nItem = DPA_InsertPtr(infoPtr->hdpaItems, lpLVItem->iItem,
                                     hdpaSubItems);
 	      }
               if (nItem != -1)
@@ -6939,16 +6939,16 @@
 		  else if (lpLVItem->stateMask & LVIS_FOCUSED)
                     LISTVIEW_SetItemFocus(hwnd, nItem);
                 }
-                
+
                 /* send LVN_INSERTITEM notification */
                 ZeroMemory(&nmlv, sizeof(NMLISTVIEW));
                 nmlv.iItem = nItem;
                 nmlv.lParam = lpItem->lParam;
 		listview_notify(hwnd, LVN_INSERTITEM, &nmlv);
-                
+
                 if ((uView == LVS_SMALLICON) || (uView == LVS_LIST))
 		{
-		  nItemWidth = LISTVIEW_CalculateWidth(hwnd, lpLVItem->iItem); 
+		  nItemWidth = LISTVIEW_CalculateWidth(hwnd, lpLVItem->iItem);
 		  if (nItemWidth > infoPtr->nItemWidth)
 		    infoPtr->nItemWidth = nItemWidth;
 		}
@@ -6961,7 +6961,7 @@
                   else
                     LISTVIEW_AlignTop(hwnd);
                 }
-                
+
                 LISTVIEW_UpdateScroll(hwnd);
                 /* refresh client area */
                 InvalidateRect(hwnd, NULL, FALSE);
@@ -6976,14 +6976,14 @@
   /* free memory if unsuccessful */
   if ((nItem == -1) && (lpItem != NULL))
     COMCTL32_Free(lpItem);
-  
+
   return nItem;
 }
 
 /***
  * DESCRIPTION:
  * Redraws a range of items.
- * 
+ *
  * PARAMETER(S):
  * [I] HWND : window handle
  * [I] INT : first item
@@ -6995,7 +6995,7 @@
  */
 static LRESULT LISTVIEW_RedrawItems(HWND hwnd, INT nFirst, INT nLast)
 {
-  LISTVIEW_INFO *infoPtr = (LISTVIEW_INFO *)GetWindowLongW(hwnd, 0); 
+  LISTVIEW_INFO *infoPtr = (LISTVIEW_INFO *)GetWindowLongW(hwnd, 0);
   BOOL bResult = FALSE;
   RECT rcItem;
   INT i;
@@ -7024,7 +7024,7 @@
 /***
  * DESCRIPTION:
  * Sets the background color.
- * 
+ *
  * PARAMETER(S):
  * [I] HWND : window handle
  * [I] COLORREF : background color
@@ -7041,7 +7041,7 @@
     infoPtr->clrBk = clrBk;
     InvalidateRect(hwnd, NULL, TRUE);
   }
-  
+
   return TRUE;
 }
 
@@ -7051,7 +7051,7 @@
  * DESCRIPTION:
  * Sets the callback mask. This mask will be used when the parent
  * window stores state information (some or all).
- * 
+ *
  * PARAMETER(S):
  * [I] HWND : window handle
  * [I] UINT : state mask
@@ -7072,32 +7072,32 @@
 /***
  * DESCRIPTION:
  * Sets the attributes of a header item.
- * 
+ *
  * PARAMETER(S):
  * [I] HWND : window handle
  * [I] INT : column index
  * [I] LPLVCOLUMNW : column attributes
- * [I] isW: if TRUE, the lpColumn is a LPLVCOLUMNW, 
+ * [I] isW: if TRUE, the lpColumn is a LPLVCOLUMNW,
  *          otherwise it is in fact a LPLVCOLUMNA
  *
  * RETURN:
  *   SUCCESS : TRUE
  *   FAILURE : FALSE
  */
-static LRESULT LISTVIEW_SetColumnT(HWND hwnd, INT nColumn, 
+static LRESULT LISTVIEW_SetColumnT(HWND hwnd, INT nColumn,
                                    LPLVCOLUMNW lpColumn, BOOL isW)
 {
   LISTVIEW_INFO *infoPtr = (LISTVIEW_INFO *)GetWindowLongW(hwnd, 0);
   BOOL bResult = FALSE;
   HDITEMW hdi, hdiget;
 
-  if ((lpColumn != NULL) && (nColumn >= 0) && 
+  if ((lpColumn != NULL) && (nColumn >= 0) &&
       (nColumn < Header_GetItemCount(infoPtr->hwndHeader)))
   {
     /* initialize memory */
     ZeroMemory(&hdi, sizeof(hdi));
 
-    if (lpColumn->mask & LVCF_FMT) 
+    if (lpColumn->mask & LVCF_FMT)
     {
       /* format member is valid */
       hdi.mask |= HDI_FORMAT;
@@ -7122,13 +7122,13 @@
         else if (lpColumn->fmt & LVCFMT_CENTER)
           hdi.fmt |= HDF_CENTER;
       }
-      
+
       if (lpColumn->fmt & LVCFMT_BITMAP_ON_RIGHT)
         hdi.fmt |= HDF_BITMAP_ON_RIGHT;
 
       if (lpColumn->fmt & LVCFMT_COL_HAS_IMAGES)
         hdi.fmt |= HDF_IMAGE;
-      
+
       if (lpColumn->fmt & LVCFMT_IMAGE)
       {
         hdi.fmt |= HDF_IMAGE;
@@ -7136,27 +7136,27 @@
       }
     }
 
-    if (lpColumn->mask & LVCF_WIDTH) 
+    if (lpColumn->mask & LVCF_WIDTH)
     {
       hdi.mask |= HDI_WIDTH;
       hdi.cxy = lpColumn->cx;
     }
-    
-    if (lpColumn->mask & LVCF_TEXT) 
+
+    if (lpColumn->mask & LVCF_TEXT)
     {
       hdi.mask |= HDI_TEXT | HDI_FORMAT;
       hdi.pszText = lpColumn->pszText;
       hdi.cchTextMax = textlenT(lpColumn->pszText, isW);
       hdi.fmt |= HDF_STRING;
     }
-  
-    if (lpColumn->mask & LVCF_IMAGE) 
+
+    if (lpColumn->mask & LVCF_IMAGE)
     {
       hdi.mask |= HDI_IMAGE;
       hdi.iImage = lpColumn->iImage;
     }
 
-    if (lpColumn->mask & LVCF_ORDER) 
+    if (lpColumn->mask & LVCF_ORDER)
     {
       hdi.mask |= HDI_ORDER;
       hdi.iOrder = lpColumn->iOrder;
@@ -7168,7 +7168,7 @@
     else
       bResult = Header_SetItemA(infoPtr->hwndHeader, nColumn, &hdi);
   }
-  
+
   return bResult;
 }
 
@@ -7217,7 +7217,7 @@
     HDITEMW hdi;
     LRESULT lret;
     LONG lStyle = GetWindowLongW(hwnd, GWL_STYLE);
-    UINT uView = lStyle & LVS_TYPEMASK; 
+    UINT uView = lStyle & LVS_TYPEMASK;
     HDC hdc;
     HFONT header_font;
     HFONT old_font;
@@ -7239,16 +7239,16 @@
 
     /* set column width only if in report or list mode */
     if ((uView != LVS_REPORT) && (uView != LVS_LIST))
-      return (FALSE);            
+      return (FALSE);
 
     TRACE("(hwnd=%x, iCol=%d, cx=%d\n", hwnd, iCol, cx);
-    
+
     /* take care of invalid cx values */
     if((uView == LVS_REPORT) && (cx < -2))
       cx = LVSCW_AUTOSIZE;
     else if (uView == LVS_LIST && (cx < 1))
       return FALSE;
- 
+
     /* resize all columns if in LVS_LIST mode */
     if(uView == LVS_LIST) {
       infoPtr->nItemWidth = cx;
@@ -7293,23 +7293,23 @@
     else if(cx == LVSCW_AUTOSIZE_USEHEADER)
     {
       header_item_count = Header_GetItemCount(infoPtr->hwndHeader);
- 
+
       /* if iCol is the last column make it fill the remainder of the controls width */
       if(iCol == (header_item_count - 1)) {
         /* get the width of every item except the current one */
         hdi.mask = HDI_WIDTH;
         cx = 0;
-        
+
         for(item_index = 0; item_index < (header_item_count - 1); item_index++) {
           Header_GetItemW(infoPtr->hwndHeader, item_index, (LPARAM)(&hdi));
           cx+=hdi.cxy;
         }
- 
+
         /* retrieve the layout of the header */
         GetWindowRect(infoPtr->hwndHeader, &rcHeader);
 
         cx = (rcHeader.right - rcHeader.left) - cx;
-      }                                  
+      }
       else
       {
         /* Despite what the MS docs say, if this is not the last
@@ -7318,26 +7318,26 @@
            and items. This is different from LVSCW_AUTOSIZE in that
            LVSCW_AUTOSIZE ignores the header string length.
            */
-           
+
         /* retrieve header font */
         header_font = SendMessageW(infoPtr->hwndHeader, WM_GETFONT, 0L, 0L);
- 
+
         /* retrieve header text */
         hdi.mask = HDI_TEXT;
         hdi.cchTextMax = sizeof(text_buffer)/sizeof(text_buffer[0]);
-        hdi.pszText = text_buffer;             
-    
+        hdi.pszText = text_buffer;
+
         Header_GetItemW(infoPtr->hwndHeader, iCol, (LPARAM)(&hdi));
- 
+
         /* determine the width of the text in the header */
         hdc = GetDC(hwnd);
         old_font = SelectObject(hdc, header_font); /* select the font into hdc */
 
         GetTextExtentPoint32W(hdc, text_buffer, lstrlenW(text_buffer), &size);
- 
-        SelectObject(hdc, old_font); /* restore the old font */    
+
+        SelectObject(hdc, old_font); /* restore the old font */
         ReleaseDC(hwnd, hdc);
- 
+
         ZeroMemory(&lvItem, sizeof(lvItem));
         lvItem.iSubItem = iCol;
         lvItem.mask = LVIF_TEXT;
@@ -7362,13 +7362,13 @@
   }
 
   /* call header to update the column change */
-  hdi.mask = HDI_WIDTH;                          
+  hdi.mask = HDI_WIDTH;
 
   hdi.cxy = cx;
   lret = Header_SetItemW(infoPtr->hwndHeader, (WPARAM)iCol, (LPARAM)&hdi);
- 
+
   InvalidateRect(hwnd, NULL, TRUE); /* force redraw of the listview */
- 
+
   return lret;
 }
 
@@ -7473,7 +7473,7 @@
 
   if (cx)
     infoPtr->iconSpacing.cx = cx;
-  else 
+  else
   {  /* if 0 then compute width */
     if (uView == LVS_ICON)
        FIXME("width computation not yet done\n");
@@ -7486,9 +7486,9 @@
   }
   if (cy)
       infoPtr->iconSpacing.cy = cy;
-  else 
+  else
   {  /* if 0 then compute height */
-    if (uView == LVS_ICON) 
+    if (uView == LVS_ICON)
        infoPtr->iconSpacing.cy = infoPtr->iconSize.cy + infoPtr->ntmHeight
                                   + ICON_BOTTOM_PADDING + ICON_TOP_PADDING + LABEL_VERT_OFFSET;
         /* FIXME.  I don't think so; I think it is based on twice the ntmHeight */
@@ -7509,10 +7509,10 @@
 /***
  * DESCRIPTION:
  * Sets image lists.
- * 
+ *
  * PARAMETER(S):
  * [I] HWND : window handle
- * [I] INT : image list type  
+ * [I] INT : image list type
  * [I] HIMAGELIST : image list handle
  *
  * RETURN:
@@ -7525,7 +7525,7 @@
   HIMAGELIST himlOld = 0;
   INT oldHeight;
 
-  switch (nType) 
+  switch (nType)
   {
   case LVSIL_NORMAL:
     himlOld = infoPtr->himlNormal;
@@ -7555,7 +7555,7 @@
 /***
  * DESCRIPTION:
  * Preallocates memory (does *not* set the actual count of items !)
- * 
+ *
  * PARAMETER(S):
  * [I] HWND : window handle
  * [I] INT   : item count (projected number of items to allocate)
@@ -7583,7 +7583,7 @@
               (dwFlags & LVSICF_NOSCROLL) ? "LVSICF_NOSCROLL" : "");
 
       /*
-       * Internally remove all the selections. 
+       * Internally remove all the selections.
        */
       do
       {
@@ -7594,7 +7594,7 @@
                                           selection->upper);
       }
       while (infoPtr->hdpaSelectionRanges->nItemCount>0);
- 
+
       precount = infoPtr->hdpaItems->nItemCount;
       topvisible = ListView_GetTopIndex(hwnd) +
                    LISTVIEW_GetCountPerColumn(hwnd) + 1;
@@ -7607,7 +7607,7 @@
       LISTVIEW_UpdateSize(hwnd);
       LISTVIEW_UpdateScroll(hwnd);
 
-      if (min(precount,infoPtr->hdpaItems->nItemCount)<topvisible) 
+      if (min(precount,infoPtr->hdpaItems->nItemCount)<topvisible)
         InvalidateRect(hwnd, NULL, TRUE);
   }
   else
@@ -7627,7 +7627,7 @@
 /***
  * DESCRIPTION:
  * Sets the position of an item.
- * 
+ *
  * PARAMETER(S):
  * [I] HWND : window handle
  * [I] INT : item index
@@ -7649,7 +7649,7 @@
   BOOL bResult = FALSE;
 
   TRACE("(hwnd=%x, nItem=%d, X=%ld, Y=%ld)\n", hwnd, nItem, nPosX, nPosY);
-  
+
   if (lStyle & LVS_OWNERDATA)
     return FALSE;
 
@@ -7664,21 +7664,21 @@
 	  POINT orig;
           bResult = TRUE;
 	  orig = lpItem->ptPosition;
-          if ((nPosX == -1) && (nPosY == -1)) 
+          if ((nPosX == -1) && (nPosY == -1))
           {
             /* This point value seems to be an undocumented feature. The
              * best guess is that it means either at the origin, or at
              * the true beginning of the list. I will assume the origin.
              */
             POINT pt1;
-            if (!LISTVIEW_GetOrigin(hwnd, &pt1)) 
+            if (!LISTVIEW_GetOrigin(hwnd, &pt1))
             {
               pt1.x = 0;
               pt1.y = 0;
             }
             nPosX = pt1.x;
             nPosY = pt1.y;
-            if (uView == LVS_ICON) 
+            if (uView == LVS_ICON)
             {
               nPosX += (infoPtr->iconSpacing.cx - infoPtr->iconSize.cx) / 2;
               nPosY += ICON_TOP_PADDING;
@@ -7693,17 +7693,17 @@
 	  {
 	    lpItem->ptPosition.y -= ICON_TOP_PADDING;
               lpItem->ptPosition.x -= (infoPtr->iconSpacing.cx - infoPtr->iconSize.cx) / 2;
-              if ((lpItem->ptPosition.y < 0) || (lpItem->ptPosition.x < 0)) 
+              if ((lpItem->ptPosition.y < 0) || (lpItem->ptPosition.x < 0))
               {
                   FIXME("failed orig (%ld,%ld), intent (%ld,%ld), is (%ld, %ld), setting neg to 0\n",
                         orig.x, orig.y, nPosX, nPosY, lpItem->ptPosition.x, lpItem->ptPosition.y);
- 
+
                   /*
                   if (lpItem->ptPosition.x < 0) lpItem->ptPosition.x = 0;
                   if (lpItem->ptPosition.y < 0) lpItem->ptPosition.y = 0;
                   */
               }
-              else 
+              else
               {
                   TRACE("orig (%ld,%ld), intent (%ld,%ld), is (%ld,%ld)\n",
                         orig.x, orig.y, nPosX, nPosY, lpItem->ptPosition.x, lpItem->ptPosition.y);
@@ -7720,7 +7720,7 @@
 /***
  * DESCRIPTION:
  * Sets the state of one or many items.
- * 
+ *
  * PARAMETER(S):
  * [I] HWND : window handle
  * [I]INT : item index
@@ -7736,7 +7736,7 @@
   BOOL bResult = TRUE;
   LVITEMW lvItem;
 
-  TRACE("(hwnd=%x, nItem=%d, lpLVItem=%s)\n", 
+  TRACE("(hwnd=%x, nItem=%d, lpLVItem=%s)\n",
 	hwnd, nItem, debuglvitem_t(lpLVItem, TRUE));
 
   ZeroMemory(&lvItem, sizeof(lvItem));
@@ -7760,7 +7760,7 @@
 /***
  * DESCRIPTION:
  * Sets the text of an item or subitem.
- * 
+ *
  * PARAMETER(S):
  * [I] hwnd : window handle
  * [I] nItem : item index
@@ -7777,9 +7777,9 @@
   BOOL bResult = FALSE;
   LVITEMW lvItem;
 
-  TRACE("(hwnd=%x, nItem=%d, lpLVItem=%s, isW=%d)\n", 
+  TRACE("(hwnd=%x, nItem=%d, lpLVItem=%s, isW=%d)\n",
 	hwnd, nItem, debuglvitem_t(lpLVItem, isW), isW);
-  
+
   if ((nItem >= 0) && (nItem < GETITEMCOUNT(infoPtr)))
   {
     ZeroMemory(&lvItem, sizeof(LVITEMW));
@@ -7790,7 +7790,7 @@
     if(isW) bResult = ListView_SetItemW(hwnd, &lvItem);
     else    bResult = ListView_SetItemA(hwnd, &lvItem);
   }
-  
+
   return bResult;
 }
 
@@ -7820,7 +7820,7 @@
 /***
  * DESCRIPTION:
  * Sets the text background color.
- * 
+ *
  * PARAMETER(S):
  * [I] HWND : window handle
  * [I] COLORREF : text background color
@@ -7834,7 +7834,7 @@
   LISTVIEW_INFO *infoPtr = (LISTVIEW_INFO *)GetWindowLongW(hwnd, 0);
 
   TRACE("(hwnd=%x, clrTextBk=%lx)\n", hwnd, clrTextBk);
-  
+
   infoPtr->clrTextBk = clrTextBk;
   InvalidateRect(hwnd, NULL, TRUE);
 
@@ -7844,10 +7844,10 @@
 /***
  * DESCRIPTION:
  * Sets the text foreground color.
- * 
+ *
  * PARAMETER(S):
  * [I] HWND : window handle
- * [I] COLORREF : text color 
+ * [I] COLORREF : text color
  *
  * RETURN:
  *   SUCCESS : TRUE
@@ -7872,7 +7872,7 @@
 /***
  * DESCRIPTION:
  * Callback internally used by LISTVIEW_SortItems()
- * 
+ *
  * PARAMETER(S):
  * [I] LPVOID : first LISTVIEW_ITEM to compare
  * [I] LPVOID : second LISTVIEW_ITEM to compare
@@ -7896,7 +7896,7 @@
 /***
  * DESCRIPTION:
  * Sorts the listview items.
- * 
+ *
  * PARAMETER(S):
  * [I] HWND : window handle
  * [I] WPARAM : application-defined value
@@ -7916,11 +7916,11 @@
     int nCount, i;
 
     TRACE("(hwnd=%x, pfnCompare=%p, lParamSort=%lx)\n", hwnd, pfnCompare, lParamSort);
-    
+
     if (lStyle & LVS_OWNERDATA) return FALSE;
 
     if (!infoPtr || !infoPtr->hdpaItems) return FALSE;
-   
+
     nCount = GETITEMCOUNT(infoPtr);
     /* if there are 0 or 1 items, there is no need to sort */
     if (nCount < 2)
@@ -7930,9 +7930,9 @@
     infoPtr->lParamSort = lParamSort;
     DPA_Sort(infoPtr->hdpaItems, LISTVIEW_CallBackCompare, hwnd);
 
-    /* Adjust selections and indices so that they are the way they should 
-     * be after the sort (otherwise, the list items move around, but 
-     * whatever is at the item's previous original position will be 
+    /* Adjust selections and indices so that they are the way they should
+     * be after the sort (otherwise, the list items move around, but
+     * whatever is at the item's previous original position will be
      * selected instead)
      */
     selectionMarkItem=(infoPtr->nSelectionMark>=0)?DPA_GetPtr(infoPtr->hdpaItems, infoPtr->nSelectionMark):NULL;
@@ -7966,7 +7966,7 @@
 /***
  * DESCRIPTION:
  * Updates an items or rearranges the listview control.
- * 
+ *
  * PARAMETER(S):
  * [I] HWND : window handle
  * [I] INT : item index
@@ -7983,7 +7983,7 @@
   RECT rc;
 
   TRACE("(hwnd=%x, nItem=%d)\n", hwnd, nItem);
-  
+
   if ((nItem >= 0) && (nItem < GETITEMCOUNT(infoPtr)))
   {
     bResult = TRUE;
@@ -8008,7 +8008,7 @@
 /***
  * DESCRIPTION:
  * Creates the listview control.
- * 
+ *
  * PARAMETER(S):
  * [I] HWND : window handle
  *
@@ -8027,9 +8027,9 @@
   ZeroMemory(infoPtr, sizeof(LISTVIEW_INFO));
 
   /* determine the type of structures to use */
-  infoPtr->notifyFormat = SendMessageW(GetParent(hwnd), WM_NOTIFYFORMAT, 
+  infoPtr->notifyFormat = SendMessageW(GetParent(hwnd), WM_NOTIFYFORMAT,
                                        (WPARAM)hwnd, (LPARAM)NF_QUERY);
-  
+
   /* initialize color information  */
   infoPtr->clrBk = GetSysColor(COLOR_WINDOW);
   infoPtr->clrText = GetSysColor(COLOR_WINDOWTEXT);
@@ -8054,20 +8054,20 @@
   infoPtr->hDefaultFont = CreateFontIndirectW(&logFont);
   infoPtr->hFont = infoPtr->hDefaultFont;
   LISTVIEW_SaveTextMetrics(hwnd);
-  
+
   /* create header */
-  infoPtr->hwndHeader =	CreateWindowW(WC_HEADERW, (LPCWSTR)NULL, 
-    WS_CHILD | HDS_HORZ | (DWORD)((LVS_NOSORTHEADER & lpcs->style)?0:HDS_BUTTONS), 
-    0, 0, 0, 0, hwnd, (HMENU)0, 
+  infoPtr->hwndHeader =	CreateWindowW(WC_HEADERW, (LPCWSTR)NULL,
+    WS_CHILD | HDS_HORZ | (DWORD)((LVS_NOSORTHEADER & lpcs->style)?0:HDS_BUTTONS),
+    0, 0, 0, 0, hwnd, (HMENU)0,
     lpcs->hInstance, NULL);
 
   /* set header unicode format */
   SendMessageW(infoPtr->hwndHeader, HDM_SETUNICODEFORMAT,(WPARAM)TRUE,(LPARAM)NULL);
 
   /* set header font */
-  SendMessageW(infoPtr->hwndHeader, WM_SETFONT, (WPARAM)infoPtr->hFont, 
+  SendMessageW(infoPtr->hwndHeader, WM_SETFONT, (WPARAM)infoPtr->hFont,
                (LPARAM)TRUE);
-  
+
   if (uView == LVS_ICON)
   {
     infoPtr->iconSize.cx = GetSystemMetrics(SM_CXICON);
@@ -8082,10 +8082,10 @@
     else
     {
       /* set HDS_HIDDEN flag to hide the header bar */
-      SetWindowLongW(infoPtr->hwndHeader, GWL_STYLE, 
+      SetWindowLongW(infoPtr->hwndHeader, GWL_STYLE,
                     GetWindowLongW(infoPtr->hwndHeader, GWL_STYLE) | HDS_HIDDEN);
     }
-      
+
 
     infoPtr->iconSize.cx = GetSystemMetrics(SM_CXSMICON);
     infoPtr->iconSize.cy = GetSystemMetrics(SM_CYSMICON);
@@ -8110,7 +8110,7 @@
   infoPtr->nItemHeight = LISTVIEW_GetItemHeight(hwnd);
 
   /* initialize the hover time to -1(indicating the default system hover time) */
-  infoPtr->dwHoverTime = -1;  
+  infoPtr->dwHoverTime = -1;
 
   return 0;
 }
@@ -8118,29 +8118,29 @@
 /***
  * DESCRIPTION:
  * Erases the background of the listview control.
- * 
+ *
  * PARAMETER(S):
  * [I] HWND : window handle
  * [I] WPARAM : device context handle
  * [I] LPARAM : not used
- * 
+ *
  * RETURN:
  *   SUCCESS : TRUE
  *   FAILURE : FALSE
  */
-static LRESULT LISTVIEW_EraseBackground(HWND hwnd, WPARAM wParam, 
+static LRESULT LISTVIEW_EraseBackground(HWND hwnd, WPARAM wParam,
                                         LPARAM lParam)
 {
   LISTVIEW_INFO *infoPtr = (LISTVIEW_INFO *)GetWindowLongW(hwnd, 0);
   BOOL bResult;
 
   TRACE("(hwnd=%x, wParam=%x, lParam=%lx)\n", hwnd, wParam, lParam);
-  
-  if (infoPtr->clrBk == CLR_NONE) 
+
+  if (infoPtr->clrBk == CLR_NONE)
   {
     bResult = SendMessageW(GetParent(hwnd), WM_ERASEBKGND, wParam, lParam);
   }
-  else 
+  else
   {
     RECT rc;
     HBRUSH hBrush = CreateSolidBrush(infoPtr->clrBk);
@@ -8160,7 +8160,7 @@
 
   TRACE("(hwnd=%x, hdc=%x, rc=%p)\n", hwnd, hdc, rc);
 
-  if (infoPtr->clrBk != CLR_NONE) 
+  if (infoPtr->clrBk != CLR_NONE)
   {
     HBRUSH hBrush = CreateSolidBrush(infoPtr->clrBk);
     FillRect(hdc, rc, hBrush);
@@ -8171,7 +8171,7 @@
 /***
  * DESCRIPTION:
  * Retrieves the listview control font.
- * 
+ *
  * PARAMETER(S):
  * [I] HWND : window handle
  *
@@ -8190,11 +8190,11 @@
 /***
  * DESCRIPTION:
  * Performs vertical scrolling.
- * 
+ *
  * PARAMETER(S):
  * [I] HWND : window handle
  * [I] INT : scroll code
- * [I] SHORT : current scroll position if scroll code is SB_THUMBPOSITION 
+ * [I] SHORT : current scroll position if scroll code is SB_THUMBPOSITION
  *             or SB_THUMBTRACK.
  * [I] HWND : scrollbar control window handle
  *
@@ -8207,7 +8207,7 @@
   LISTVIEW_INFO *infoPtr = (LISTVIEW_INFO *)GetWindowLongW(hwnd, 0);
   SCROLLINFO scrollInfo;
 
-  TRACE("(hwnd=%x, nScrollCode=%d, nCurrentPos=%d, hScrollWnd=%x)\n", 
+  TRACE("(hwnd=%x, nScrollCode=%d, nCurrentPos=%d, hScrollWnd=%x)\n",
 	hwnd, nScrollCode, nCurrentPos, hScrollWnd);
 
   SendMessageW(infoPtr->hwndEdit, WM_KILLFOCUS, 0, 0);
@@ -8225,12 +8225,12 @@
       if (scrollInfo.nPos > scrollInfo.nMin)
         scrollInfo.nPos--;
     break;
-    
+
     case SB_LINEDOWN:
       if (scrollInfo.nPos < scrollInfo.nMax)
         scrollInfo.nPos++;
       break;
-      
+
     case SB_PAGEUP:
       if (scrollInfo.nPos > scrollInfo.nMin)
       {
@@ -8240,7 +8240,7 @@
           scrollInfo.nPos = scrollInfo.nMin;
       }
       break;
-      
+
     case SB_PAGEDOWN:
       if (scrollInfo.nPos < scrollInfo.nMax)
       {
@@ -8280,18 +8280,18 @@
         InvalidateRect(hwnd, NULL, TRUE);
     }
   }
-    
+
   return 0;
 }
 
 /***
  * DESCRIPTION:
  * Performs horizontal scrolling.
- * 
+ *
  * PARAMETER(S):
  * [I] HWND : window handle
  * [I] INT : scroll code
- * [I] SHORT : current scroll position if scroll code is SB_THUMBPOSITION 
+ * [I] SHORT : current scroll position if scroll code is SB_THUMBPOSITION
  *             or SB_THUMBTRACK.
  * [I] HWND : scrollbar control window handle
  *
@@ -8304,15 +8304,15 @@
   LISTVIEW_INFO *infoPtr = (LISTVIEW_INFO *)GetWindowLongW(hwnd, 0);
   SCROLLINFO scrollInfo;
 
-  TRACE("(hwnd=%x, nScrollCode=%d, nCurrentPos=%d, hScrollWnd=%x)\n", 
+  TRACE("(hwnd=%x, nScrollCode=%d, nCurrentPos=%d, hScrollWnd=%x)\n",
 	hwnd, nScrollCode, nCurrentPos, hScrollWnd);
-  
+
   SendMessageW(infoPtr->hwndEdit, WM_KILLFOCUS, 0, 0);
 
   ZeroMemory(&scrollInfo, sizeof(SCROLLINFO));
   scrollInfo.cbSize = sizeof(SCROLLINFO);
   scrollInfo.fMask = SIF_PAGE | SIF_POS | SIF_RANGE;
- 
+
   if (GetScrollInfo(hwnd, SB_HORZ, &scrollInfo) != FALSE)
   {
     INT nOldScrollPos = scrollInfo.nPos;
@@ -8323,12 +8323,12 @@
       if (scrollInfo.nPos > scrollInfo.nMin)
         scrollInfo.nPos--;
       break;
-    
+
     case SB_LINERIGHT:
       if (scrollInfo.nPos < scrollInfo.nMax)
         scrollInfo.nPos++;
       break;
-      
+
     case SB_PAGELEFT:
       if (scrollInfo.nPos > scrollInfo.nMin)
       {
@@ -8338,7 +8338,7 @@
           scrollInfo.nPos = scrollInfo.nMin;
       }
       break;
-      
+
     case SB_PAGERIGHT:
       if (scrollInfo.nPos < scrollInfo.nMax)
       {
@@ -8375,7 +8375,7 @@
       InvalidateRect(hwnd, NULL, TRUE);
     }
   }
-    
+
   return 0;
 }
 
@@ -8428,11 +8428,11 @@
 
 /***
  * DESCRIPTION:
- * ??? 
- * 
+ * ???
+ *
  * PARAMETER(S):
  * [I] HWND : window handle
- * [I] INT : virtual key 
+ * [I] INT : virtual key
  * [I] LONG : key data
  *
  * RETURN:
@@ -8443,15 +8443,15 @@
   LISTVIEW_INFO *infoPtr = (LISTVIEW_INFO *)GetWindowLongW(hwnd, 0);
   UINT uView =  GetWindowLongW(hwnd, GWL_STYLE) & LVS_TYPEMASK;
   INT nItem = -1;
-  NMLVKEYDOWN nmKeyDown; 
+  NMLVKEYDOWN nmKeyDown;
 
   TRACE("(hwnd=%x, nVirtualKey=%d, lKeyData=%ld)\n", hwnd, nVirtualKey, lKeyData);
 
   /* send LVN_KEYDOWN notification */
-  nmKeyDown.wVKey = nVirtualKey; 
+  nmKeyDown.wVKey = nVirtualKey;
   nmKeyDown.flags = 0;
   notify(hwnd, LVN_KEYDOWN, &nmKeyDown.hdr);
-  
+
   switch (nVirtualKey)
   {
   case VK_RETURN:
@@ -8479,7 +8479,7 @@
   case VK_UP:
     nItem = ListView_GetNextItem(hwnd, infoPtr->nFocusedItem, LVNI_ABOVE);
     break;
-    
+
   case VK_RIGHT:
     nItem = ListView_GetNextItem(hwnd, infoPtr->nFocusedItem, LVNI_TORIGHT);
     break;
@@ -8492,7 +8492,7 @@
     if (uView == LVS_REPORT)
       nItem = infoPtr->nFocusedItem - LISTVIEW_GetCountPerColumn(hwnd);
     else
-      nItem = infoPtr->nFocusedItem - LISTVIEW_GetCountPerColumn(hwnd) 
+      nItem = infoPtr->nFocusedItem - LISTVIEW_GetCountPerColumn(hwnd)
                                     * LISTVIEW_GetCountPerRow(hwnd);
     if(nItem < 0) nItem = 0;
     break;
@@ -8519,7 +8519,7 @@
 /***
  * DESCRIPTION:
  * Kills the focus.
- * 
+ *
  * PARAMETER(S):
  * [I] HWND : window handle
  *
@@ -8531,7 +8531,7 @@
   LISTVIEW_INFO *infoPtr = (LISTVIEW_INFO*)GetWindowLongW(hwnd, 0);
   UINT uView =  GetWindowLongW(hwnd, GWL_STYLE) & LVS_TYPEMASK;
   INT i,nTop,nBottom;
- 
+
   TRACE("(hwnd=%x)\n", hwnd);
 
   /* send NM_KILLFOCUS notification */
@@ -8542,9 +8542,9 @@
 
   /* NEED drawing optimization ; redraw the selected items */
   if (uView & LVS_REPORT)
-  { 
+  {
     nTop = LISTVIEW_GetTopIndex(hwnd);
-    nBottom = nTop + 
+    nBottom = nTop +
               LISTVIEW_GetCountPerColumn(hwnd) + 1;
   }
   else
@@ -8569,7 +8569,7 @@
 /***
  * DESCRIPTION:
  * Processes double click messages (left mouse button).
- * 
+ *
  * PARAMETER(S):
  * [I] HWND : window handle
  * [I] WORD : key flag
@@ -8579,7 +8579,7 @@
  * RETURN:
  * Zero
  */
-static LRESULT LISTVIEW_LButtonDblClk(HWND hwnd, WORD wKey, WORD wPosX, 
+static LRESULT LISTVIEW_LButtonDblClk(HWND hwnd, WORD wKey, WORD wPosX,
                                       WORD wPosY)
 {
   LVHITTESTINFO htInfo;
@@ -8601,7 +8601,7 @@
   {
     nmlv.iItem = -1;
     nmlv.iSubItem = 0;
-  }  
+  }
   nmlv.ptAction.x = wPosX;
   nmlv.ptAction.y = wPosY;
   listview_notify(hwnd, NM_DBLCLK, &nmlv);
@@ -8617,7 +8617,7 @@
 /***
  * DESCRIPTION:
  * Processes mouse down messages (left mouse button).
- * 
+ *
  * PARAMETER(S):
  * [I] HWND : window handle
  * [I] WORD : key flag
@@ -8627,7 +8627,7 @@
  * RETURN:
  * Zero
  */
-static LRESULT LISTVIEW_LButtonDown(HWND hwnd, WORD wKey, WORD wPosX, 
+static LRESULT LISTVIEW_LButtonDown(HWND hwnd, WORD wKey, WORD wPosX,
                                     WORD wPosY)
 {
   LISTVIEW_INFO *infoPtr = (LISTVIEW_INFO *)GetWindowLongW(hwnd, 0);
@@ -8640,13 +8640,13 @@
 
   /* send NM_RELEASEDCAPTURE notification */
   hdr_notify(hwnd, NM_RELEASEDCAPTURE);
- 
+
   if (infoPtr->bFocus == FALSE)
     SetFocus(hwnd);
 
   /* set left button down flag */
   infoPtr->bLButtonDown = TRUE;
-  
+
   ptPosition.x = wPosX;
   ptPosition.y = wPosY;
   nItem = LISTVIEW_MouseSelection(hwnd, ptPosition);
@@ -8655,7 +8655,7 @@
     if (lStyle & LVS_SINGLESEL)
     {
       if ((ListView_GetItemState(hwnd, nItem, LVIS_SELECTED) & LVIS_SELECTED)
-          && infoPtr->nEditLabelItem == -1) 
+          && infoPtr->nEditLabelItem == -1)
           infoPtr->nEditLabelItem = nItem;
       else
         LISTVIEW_SetSelection(hwnd, nItem);
@@ -8705,7 +8705,7 @@
 /***
  * DESCRIPTION:
  * Processes mouse up messages (left mouse button).
- * 
+ *
  * PARAMETER(S):
  * [I] HWND : window handle
  * [I] WORD : key flag
@@ -8715,14 +8715,14 @@
  * RETURN:
  * Zero
  */
-static LRESULT LISTVIEW_LButtonUp(HWND hwnd, WORD wKey, WORD wPosX, 
+static LRESULT LISTVIEW_LButtonUp(HWND hwnd, WORD wKey, WORD wPosX,
                                   WORD wPosY)
 {
   LISTVIEW_INFO *infoPtr = (LISTVIEW_INFO *)GetWindowLongW(hwnd, 0);
 
   TRACE("(hwnd=%x, key=%hu, X=%hu, Y=%hu)\n", hwnd, wKey, wPosX, wPosY);
 
-  if (infoPtr->bLButtonDown != FALSE) 
+  if (infoPtr->bLButtonDown != FALSE)
   {
     LVHITTESTINFO lvHitTestInfo;
     NMLISTVIEW nmlv;
@@ -8763,12 +8763,12 @@
 /***
  * DESCRIPTION:
  * Creates the listview control (called before WM_CREATE).
- * 
+ *
  * PARAMETER(S):
  * [I] HWND : window handle
- * [I] WPARAM : unhandled 
+ * [I] WPARAM : unhandled
  * [I] LPARAM : widow creation info
- * 
+ *
  * RETURN:
  * Zero
  */
@@ -8780,14 +8780,14 @@
 
   /* allocate memory for info structure */
   infoPtr = (LISTVIEW_INFO *)COMCTL32_Alloc(sizeof(LISTVIEW_INFO));
-  if (infoPtr == NULL) 
+  if (infoPtr == NULL)
   {
     ERR("could not allocate info memory!\n");
     return 0;
   }
 
   SetWindowLongW(hwnd, 0, (LONG)infoPtr);
-  if ((LISTVIEW_INFO *)GetWindowLongW(hwnd, 0) != infoPtr) 
+  if ((LISTVIEW_INFO *)GetWindowLongW(hwnd, 0) != infoPtr)
   {
     ERR("pointer assignment error!\n");
     return 0;
@@ -8799,10 +8799,10 @@
 /***
  * DESCRIPTION:
  * Destroys the listview control (called after WM_DESTROY).
- * 
+ *
  * PARAMETER(S):
  * [I] HWND : window handle
- * 
+ *
  * RETURN:
  * Zero
  */
@@ -8836,22 +8836,22 @@
 /***
  * DESCRIPTION:
  * Handles notifications from children.
- * 
+ *
  * PARAMETER(S):
  * [I] HWND : window handle
  * [I] INT : control identifier
  * [I] LPNMHDR : notification information
- * 
+ *
  * RETURN:
  * Zero
  */
 static LRESULT LISTVIEW_Notify(HWND hwnd, INT nCtrlId, LPNMHDR lpnmh)
 {
   LISTVIEW_INFO *infoPtr = (LISTVIEW_INFO *)GetWindowLongW(hwnd, 0);
-  
+
   TRACE("(hwnd=%x, nCtrlId=%d, lpnmh=%p)\n", hwnd, nCtrlId, lpnmh);
-  
-  if (lpnmh->hwndFrom == infoPtr->hwndHeader) 
+
+  if (lpnmh->hwndFrom == infoPtr->hwndHeader)
   {
     /* handle notification from header control */
     if (lpnmh->code == HDN_ENDTRACKW)
@@ -8890,10 +8890,10 @@
 /***
  * DESCRIPTION:
  * Determines the type of structure to use.
- * 
+ *
  * PARAMETER(S):
  * [I] HWND : window handle of the sender
- * [I] HWND : listview window handle 
+ * [I] HWND : listview window handle
  * [I] INT : command specifying the nature of the WM_NOTIFYFORMAT
  *
  * RETURN:
@@ -8904,9 +8904,9 @@
   LISTVIEW_INFO *infoPtr = (LISTVIEW_INFO *)GetWindowLongW(hwnd, 0);
 
   TRACE("(hwndFrom=%x, hwnd=%x, nCommand=%d)\n", hwndFrom, hwnd, nCommand);
-  
+
   if (nCommand == NF_REQUERY)
-    infoPtr->notifyFormat = SendMessageW(hwndFrom, WM_NOTIFYFORMAT, 
+    infoPtr->notifyFormat = SendMessageW(hwndFrom, WM_NOTIFYFORMAT,
                                          (WPARAM)hwnd, (LPARAM)NF_QUERY);
   return 0;
 }
@@ -8914,7 +8914,7 @@
 /***
  * DESCRIPTION:
  * Paints/Repaints the listview control.
- * 
+ *
  * PARAMETER(S):
  * [I] HWND : window handle
  * [I] HDC : device context handle
@@ -8945,7 +8945,7 @@
 /***
  * DESCRIPTION:
  * Processes double click messages (right mouse button).
- * 
+ *
  * PARAMETER(S):
  * [I] HWND : window handle
  * [I] WORD : key flag
@@ -8955,12 +8955,12 @@
  * RETURN:
  * Zero
  */
-static LRESULT LISTVIEW_RButtonDblClk(HWND hwnd, WORD wKey, WORD wPosX, 
+static LRESULT LISTVIEW_RButtonDblClk(HWND hwnd, WORD wKey, WORD wPosX,
                                       WORD wPosY)
 {
   TRACE("(hwnd=%x,key=%hu,X=%hu,Y=%hu)\n", hwnd, wKey, wPosX, wPosY);
 
-  /* send NM_RELEASEDCAPTURE notification */ 
+  /* send NM_RELEASEDCAPTURE notification */
   hdr_notify(hwnd, NM_RELEASEDCAPTURE);
 
   /* send NM_RDBLCLK notification */
@@ -8972,7 +8972,7 @@
 /***
  * DESCRIPTION:
  * Processes mouse down messages (right mouse button).
- * 
+ *
  * PARAMETER(S):
  * [I] HWND : window handle
  * [I] WORD : key flag
@@ -8982,7 +8982,7 @@
  * RETURN:
  * Zero
  */
-static LRESULT LISTVIEW_RButtonDown(HWND hwnd, WORD wKey, WORD wPosX, 
+static LRESULT LISTVIEW_RButtonDown(HWND hwnd, WORD wKey, WORD wPosX,
                                     WORD wPosY)
 {
   LISTVIEW_INFO *infoPtr = (LISTVIEW_INFO *)GetWindowLongW(hwnd, 0);
@@ -8995,7 +8995,7 @@
 
   /* send NM_RELEASEDCAPTURE notification */
   hdr_notify(hwnd, NM_RELEASEDCAPTURE);
- 
+
   /* make sure the listview control window has the focus */
   if (infoPtr->bFocus == FALSE)
     SetFocus(hwnd);
@@ -9037,14 +9037,14 @@
   nmlv.ptAction.x = wPosX;
   nmlv.ptAction.y = wPosY;
   listview_notify(hwnd, NM_RCLICK, &nmlv);
-  
+
   return 0;
 }
 
 /***
  * DESCRIPTION:
  * Processes mouse up messages (right mouse button).
- * 
+ *
  * PARAMETER(S):
  * [I] HWND : window handle
  * [I] WORD : key flag
@@ -9054,14 +9054,14 @@
  * RETURN:
  * Zero
  */
-static LRESULT LISTVIEW_RButtonUp(HWND hwnd, WORD wKey, WORD wPosX, 
+static LRESULT LISTVIEW_RButtonUp(HWND hwnd, WORD wKey, WORD wPosX,
                                   WORD wPosY)
 {
   LISTVIEW_INFO *infoPtr = (LISTVIEW_INFO *)GetWindowLongW(hwnd, 0);
 
   TRACE("(hwnd=%x,key=%hu,X=%hu,Y=%hu)\n", hwnd, wKey, wPosX, wPosY);
 
-  if (infoPtr->bRButtonDown) 
+  if (infoPtr->bRButtonDown)
   {
     POINT pt;
 
@@ -9070,21 +9070,21 @@
 
     /* set button flag */
     infoPtr->bRButtonDown = FALSE;
-    
+
     /* Change to screen coordinate for WM_CONTEXTMENU */
     ClientToScreen(hwnd, &pt);
-    
+
     /* Send a WM_CONTEXTMENU message in response to the RBUTTONUP */
     SendMessageW( hwnd, WM_CONTEXTMENU, (WPARAM) hwnd, MAKELPARAM(pt.x, pt.y));
   }
-  
+
   return 0;
 }
 
 /***
  * DESCRIPTION:
- * Sets the focus.  
- * 
+ * Sets the focus.
+ *
  * PARAMETER(S):
  * [I] HWND : window handle
  * [I] HWND : window handle of previously focused window
@@ -9111,8 +9111,8 @@
 
 /***
  * DESCRIPTION:
- * Sets the font.  
- * 
+ * Sets the font.
+ *
  * PARAMETER(S):
  * [I] HWND : window handle
  * [I] HFONT : font handle
@@ -9134,13 +9134,13 @@
   if (uView == LVS_REPORT)
   {
     /* set header font */
-    SendMessageW(infoPtr->hwndHeader, WM_SETFONT, (WPARAM)hFont, 
+    SendMessageW(infoPtr->hwndHeader, WM_SETFONT, (WPARAM)hFont,
                    MAKELPARAM(fRedraw, 0));
   }
 
   /* invalidate listview control client area */
   InvalidateRect(hwnd, NULL, TRUE);
-  
+
   if (fRedraw != FALSE)
     UpdateWindow(hwnd);
 
@@ -9149,9 +9149,9 @@
 
 /***
  * DESCRIPTION:
- * Message handling for WM_SETREDRAW.  
+ * Message handling for WM_SETREDRAW.
  * For the Listview, it invalidates the entire window (the doc specifies otherwise)
- * 
+ *
  * PARAMETER(S):
  * [I] HWND   : window handle
  * [I] bRedraw: state of redraw flag
@@ -9163,7 +9163,7 @@
 {
     LRESULT lResult = DefWindowProcW(hwnd, WM_SETREDRAW, bRedraw, 0);
     if(bRedraw)
-        RedrawWindow(hwnd, NULL, 0, 
+        RedrawWindow(hwnd, NULL, 0,
             RDW_INVALIDATE | RDW_FRAME | RDW_ERASE | RDW_ALLCHILDREN | RDW_ERASENOW);
     return lResult;
 }
@@ -9172,7 +9172,7 @@
  * DESCRIPTION:
  * Resizes the listview control. This function processes WM_SIZE
  * messages.  At this time, the width and height are not used.
- * 
+ *
  * PARAMETER(S):
  * [I] HWND : window handle
  * [I] WORD : new width
@@ -9183,7 +9183,7 @@
  */
 static LRESULT LISTVIEW_Size(HWND hwnd, int Width, int Height)
 {
-  LONG lStyle = GetWindowLongW(hwnd, GWL_STYLE); 
+  LONG lStyle = GetWindowLongW(hwnd, GWL_STYLE);
   UINT uView = lStyle & LVS_TYPEMASK;
 
   TRACE("(hwnd=%x, width=%d, height=%d)\n", hwnd, Width, Height);
@@ -9199,7 +9199,7 @@
     }
 
     LISTVIEW_UpdateScroll(hwnd);
-  
+
     /* invalidate client area + erase background */
     InvalidateRect(hwnd, NULL, TRUE);
   }
@@ -9210,7 +9210,7 @@
 /***
  * DESCRIPTION:
  * Sets the size information.
- * 
+ *
  * PARAMETER(S):
  * [I] HWND : window handle
  *
@@ -9225,16 +9225,16 @@
   UINT uView = lStyle & LVS_TYPEMASK;
   RECT rcList;
   RECT rcOld;
-  
+
   TRACE("(hwnd=%x)\n", hwnd);
-  
+
   GetClientRect(hwnd, &rcList);
   CopyRect(&rcOld,&(infoPtr->rcList));
   infoPtr->rcList.left = 0;
   infoPtr->rcList.right = max(rcList.right - rcList.left, 1);
   infoPtr->rcList.top = 0;
   infoPtr->rcList.bottom = max(rcList.bottom - rcList.top, 1);
-     
+
   if (uView == LVS_LIST)
   {
     if (lStyle & WS_HSCROLL)
@@ -9263,8 +9263,8 @@
 
 /***
  * DESCRIPTION:
- * Processes WM_STYLECHANGED messages. 
- * 
+ * Processes WM_STYLECHANGED messages.
+ *
  * PARAMETER(S):
  * [I] HWND : window handle
  * [I] WPARAM : window style type (normal or extended)
@@ -9273,7 +9273,7 @@
  * RETURN:
  * Zero
  */
-static INT LISTVIEW_StyleChanged(HWND hwnd, WPARAM wStyleType, 
+static INT LISTVIEW_StyleChanged(HWND hwnd, WPARAM wStyleType,
                                  LPSTYLESTRUCT lpss)
 {
   LISTVIEW_INFO *infoPtr = (LISTVIEW_INFO *)GetWindowLongW(hwnd, 0);
@@ -9281,22 +9281,22 @@
   UINT uOldView = lpss->styleOld & LVS_TYPEMASK;
   RECT rcList = infoPtr->rcList;
 
-  TRACE("(hwnd=%x, styletype=%x, stylestruct=%p)\n", 
+  TRACE("(hwnd=%x, styletype=%x, stylestruct=%p)\n",
         hwnd, wStyleType, lpss);
 
   if (wStyleType == GWL_STYLE)
   {
     if (uOldView == LVS_REPORT)
       ShowWindow(infoPtr->hwndHeader, SW_HIDE);
- 
+
     if (((lpss->styleOld & WS_HSCROLL) != 0)&&
         ((lpss->styleNew & WS_HSCROLL) == 0))
        ShowScrollBar(hwnd, SB_HORZ, FALSE);
- 
+
     if (((lpss->styleOld & WS_VSCROLL) != 0)&&
         ((lpss->styleNew & WS_VSCROLL) == 0))
        ShowScrollBar(hwnd, SB_VERT, FALSE);
- 
+
     if (uNewView == LVS_ICON)
     {
       infoPtr->iconSize.cx = GetSystemMetrics(SM_CXICON);
@@ -9316,11 +9316,11 @@
       hl.prc = &rcList;
       hl.pwpos = &wp;
       Header_Layout(infoPtr->hwndHeader, &hl);
-      SetWindowPos(infoPtr->hwndHeader, hwnd, wp.x, wp.y, wp.cx, wp.cy, 
+      SetWindowPos(infoPtr->hwndHeader, hwnd, wp.x, wp.y, wp.cx, wp.cy,
                    wp.flags);
       if (!(LVS_NOCOLUMNHEADER & lpss->styleNew))
         ShowWindow(infoPtr->hwndHeader, SW_SHOWNORMAL);
-      
+
       infoPtr->iconSize.cx = GetSystemMetrics(SM_CXSMICON);
       infoPtr->iconSize.cy = GetSystemMetrics(SM_CYSMICON);
       infoPtr->nItemWidth = LISTVIEW_GetItemWidth(hwnd);
@@ -9350,7 +9350,7 @@
 
     /* add scrollbars if needed */
     LISTVIEW_UpdateScroll(hwnd);
-    
+
     /* invalidate client area + erase background */
     InvalidateRect(hwnd, NULL, TRUE);
 
@@ -9358,7 +9358,7 @@
     LISTVIEW_UnsupportedStyles(lpss->styleNew);
   }
 
-  /* If they change the view and we have an active edit control 
+  /* If they change the view and we have an active edit control
      we will need to kill the control since the redraw will
      misplace the edit control.
    */
@@ -9385,10 +9385,10 @@
     return DefWindowProcW( hwnd, uMsg, wParam, lParam );
   switch (uMsg)
   {
-  case LVM_APPROXIMATEVIEWRECT: 
-    return LISTVIEW_ApproximateViewRect(hwnd, (INT)wParam, 
+  case LVM_APPROXIMATEVIEWRECT:
+    return LISTVIEW_ApproximateViewRect(hwnd, (INT)wParam,
                                         LOWORD(lParam), HIWORD(lParam));
-  case LVM_ARRANGE: 
+  case LVM_ARRANGE:
     return LISTVIEW_Arrange(hwnd, (INT)wParam);
 
 /* case LVM_CREATEDRAGIMAGE: */
@@ -9404,7 +9404,7 @@
 
   case LVM_EDITLABELW:
     return LISTVIEW_EditLabelT(hwnd, (INT)wParam, TRUE);
-    
+
   case LVM_EDITLABELA:
     return LISTVIEW_EditLabelT(hwnd, (INT)wParam, FALSE);
 
@@ -9479,15 +9479,15 @@
   case LVM_GETITEMPOSITION:
     return LISTVIEW_GetItemPosition(hwnd, (INT)wParam, (LPPOINT)lParam);
 
-  case LVM_GETITEMRECT: 
+  case LVM_GETITEMRECT:
     return LISTVIEW_GetItemRect(hwnd, (INT)wParam, (LPRECT)lParam);
 
-  case LVM_GETITEMSPACING: 
+  case LVM_GETITEMSPACING:
     return LISTVIEW_GetItemSpacing(hwnd, (BOOL)wParam);
 
-  case LVM_GETITEMSTATE: 
+  case LVM_GETITEMSTATE:
     return LISTVIEW_GetItemState(hwnd, (INT)wParam, (UINT)lParam);
-    
+
   case LVM_GETITEMTEXTA:
     return LISTVIEW_GetItemTextT(hwnd, (INT)wParam, (LPLVITEMW)lParam, FALSE);
 
@@ -9507,7 +9507,7 @@
   case LVM_GETSELECTEDCOUNT:
     return LISTVIEW_GetSelectedCount(hwnd);
 
-  case LVM_GETSELECTIONMARK: 
+  case LVM_GETSELECTIONMARK:
     return LISTVIEW_GetSelectionMark(hwnd);
 
   case LVM_GETSTRINGWIDTHA:
@@ -9515,7 +9515,7 @@
 
   case LVM_GETSTRINGWIDTHW:
     return LISTVIEW_GetStringWidthT(hwnd, (LPCWSTR)lParam, TRUE);
-    
+
   case LVM_GETSUBITEMRECT:
     return LISTVIEW_GetSubItemRect(hwnd, (UINT)wParam, ((LPRECT)lParam)->top,
                                    ((LPRECT)lParam)->left, (LPRECT)lParam);
@@ -9598,7 +9598,7 @@
 
   case LVM_SETICONSPACING:
     return LISTVIEW_SetIconSpacing(hwnd, (DWORD)lParam);
-	
+
   case LVM_SETIMAGELIST:
     return (LRESULT)LISTVIEW_SetImageList(hwnd, (INT)wParam, (HIMAGELIST)lParam);
 
@@ -9608,9 +9608,9 @@
   case LVM_SETITEMW:
     return LISTVIEW_SetItemT(hwnd, (LPLVITEMW)lParam, TRUE);
 
-  case LVM_SETITEMCOUNT: 
+  case LVM_SETITEMCOUNT:
     return LISTVIEW_SetItemCount(hwnd, (INT)wParam, (DWORD)lParam);
-    
+
   case LVM_SETITEMPOSITION:
     return LISTVIEW_SetItemPosition(hwnd, (INT)wParam, (INT)LOWORD(lParam),
                                     (INT)HIWORD(lParam));
@@ -9646,7 +9646,7 @@
 
 /*	case LVM_SUBITEMHITTEST: */
 
-  case LVM_UPDATE: 
+  case LVM_UPDATE:
     return LISTVIEW_Update(hwnd, (INT)wParam);
 
   case WM_CHAR:
@@ -9657,7 +9657,7 @@
 
   case WM_CREATE:
     return LISTVIEW_Create(hwnd, (LPCREATESTRUCTW)lParam);
-    
+
   case WM_ERASEBKGND:
     return LISTVIEW_EraseBackground(hwnd, wParam, lParam);
 
@@ -9668,7 +9668,7 @@
     return LISTVIEW_GetFont(hwnd);
 
   case WM_HSCROLL:
-    return LISTVIEW_HScroll(hwnd, (INT)LOWORD(wParam), 
+    return LISTVIEW_HScroll(hwnd, (INT)LOWORD(wParam),
                             (INT)HIWORD(wParam), (HWND)lParam);
 
   case WM_KEYDOWN:
@@ -9678,14 +9678,14 @@
     return LISTVIEW_KillFocus(hwnd);
 
   case WM_LBUTTONDBLCLK:
-    return LISTVIEW_LButtonDblClk(hwnd, (WORD)wParam, LOWORD(lParam), 
+    return LISTVIEW_LButtonDblClk(hwnd, (WORD)wParam, LOWORD(lParam),
                                 HIWORD(lParam));
-    
+
   case WM_LBUTTONDOWN:
-    return LISTVIEW_LButtonDown(hwnd, (WORD)wParam, LOWORD(lParam), 
+    return LISTVIEW_LButtonDown(hwnd, (WORD)wParam, LOWORD(lParam),
                                 HIWORD(lParam));
   case WM_LBUTTONUP:
-    return LISTVIEW_LButtonUp(hwnd, (WORD)wParam, LOWORD(lParam), 
+    return LISTVIEW_LButtonUp(hwnd, (WORD)wParam, LOWORD(lParam),
                               HIWORD(lParam));
   case WM_MOUSEMOVE:
     return LISTVIEW_MouseMove (hwnd, wParam, lParam);
@@ -9705,19 +9705,19 @@
   case WM_NOTIFYFORMAT:
     return LISTVIEW_NotifyFormat(hwnd, (HWND)wParam, (INT)lParam);
 
-  case WM_PAINT: 
-    return LISTVIEW_Paint(hwnd, (HDC)wParam); 
+  case WM_PAINT:
+    return LISTVIEW_Paint(hwnd, (HDC)wParam);
 
   case WM_RBUTTONDBLCLK:
-    return LISTVIEW_RButtonDblClk(hwnd, (WORD)wParam, LOWORD(lParam), 
+    return LISTVIEW_RButtonDblClk(hwnd, (WORD)wParam, LOWORD(lParam),
                                   HIWORD(lParam));
 
   case WM_RBUTTONDOWN:
-    return LISTVIEW_RButtonDown(hwnd, (WORD)wParam, LOWORD(lParam), 
+    return LISTVIEW_RButtonDown(hwnd, (WORD)wParam, LOWORD(lParam),
                                 HIWORD(lParam));
 
   case WM_RBUTTONUP:
-    return LISTVIEW_RButtonUp(hwnd, (WORD)wParam, LOWORD(lParam), 
+    return LISTVIEW_RButtonUp(hwnd, (WORD)wParam, LOWORD(lParam),
                               HIWORD(lParam));
 
   case WM_SETFOCUS:
@@ -9726,7 +9726,7 @@
   case WM_SETFONT:
     return LISTVIEW_SetFont(hwnd, (HFONT)wParam, (WORD)lParam);
 
-  case WM_SETREDRAW: 
+  case WM_SETREDRAW:
     return LISTVIEW_SetRedraw(hwnd, (BOOL)wParam);
 
   case WM_SIZE:
@@ -9738,7 +9738,7 @@
 /*	case WM_TIMER: */
 
   case WM_VSCROLL:
-    return LISTVIEW_VScroll(hwnd, (INT)LOWORD(wParam), 
+    return LISTVIEW_VScroll(hwnd, (INT)LOWORD(wParam),
                             (INT)HIWORD(wParam), (HWND)lParam);
 
   case WM_MOUSEWHEEL:
@@ -9751,7 +9751,7 @@
   default:
     if (uMsg >= WM_USER)
     {
-      ERR("unknown msg %04x wp=%08x lp=%08lx\n", uMsg, wParam, 
+      ERR("unknown msg %04x wp=%08x lp=%08lx\n", uMsg, wParam,
           lParam);
     }
 
@@ -9765,7 +9765,7 @@
 /***
  * DESCRIPTION:
  * Registers the window class.
- * 
+ *
  * PARAMETER(S):
  * None
  *
@@ -9790,7 +9790,7 @@
 /***
  * DESCRIPTION:
  * Unregisters the window class.
- * 
+ *
  * PARAMETER(S):
  * None
  *
@@ -9805,7 +9805,7 @@
 /***
  * DESCRIPTION:
  * Handle any WM_COMMAND messages
- * 
+ *
  * PARAMETER(S):
  *
  * RETURN:
@@ -9816,8 +9816,8 @@
     {
 	case EN_UPDATE:
 	{
-	    /* 
-	     * Adjust the edit window size 
+	    /*
+	     * Adjust the edit window size
 	     */
 	    WCHAR buffer[1024];
 	    LISTVIEW_INFO *infoPtr = (LISTVIEW_INFO *)GetWindowLongW(hwnd, 0);
@@ -9845,10 +9845,10 @@
                 GetTextMetricsW(hdc, &textMetric);
                 sz.cx += (textMetric.tmMaxCharWidth * 2);
 
-		SetWindowPos ( 
+		SetWindowPos (
 		    infoPtr->hwndEdit,
-		    HWND_TOP, 
-		    0, 
+		    HWND_TOP,
+		    0,
 		    0,
 		    sz.cx,
 		    rect.bottom - rect.top,
@@ -9878,7 +9878,7 @@
  *
  * RETURN:
  */
-static LRESULT EditLblWndProcT(HWND hwnd, UINT uMsg, 
+static LRESULT EditLblWndProcT(HWND hwnd, UINT uMsg,
 	WPARAM wParam, LPARAM lParam, BOOL isW)
 {
     LISTVIEW_INFO *infoPtr = (LISTVIEW_INFO *)GetWindowLongW(GetParent(hwnd), 0);
@@ -9888,12 +9888,12 @@
 
     TRACE("(hwnd=%x, uMsg=%x, wParam=%x, lParam=%lx, isW=%d)\n",
 	  hwnd, uMsg, wParam, lParam, isW);
-    
+
     switch (uMsg)
     {
 	case WM_GETDLGCODE:
 	  return DLGC_WANTARROWS | DLGC_WANTALLKEYS;
-			
+
 	case WM_KILLFOCUS:
             if(bIgnoreKillFocus) return TRUE;
 	    break;
@@ -9923,7 +9923,7 @@
     if (einfo->EditLblCb)
     {
 	LPWSTR buffer = NULL;
-        
+
 	if (!cancel)
 	{
 	    DWORD len = isW ? GetWindowTextLengthW(hwnd) : GetWindowTextLengthA(hwnd);
@@ -9986,8 +9986,8 @@
  *
  * RETURN:
  */
-HWND CreateEditLabelT(LPCWSTR text, DWORD style, INT x, INT y, 
-	INT width, INT height, HWND parent, HINSTANCE hinst, 
+HWND CreateEditLabelT(LPCWSTR text, DWORD style, INT x, INT y,
+	INT width, INT height, HWND parent, HINSTANCE hinst,
 	EditlblCallbackW EditLblCb, DWORD param, BOOL isW)
 {
     LISTVIEW_INFO *infoPtr = (LISTVIEW_INFO *)GetWindowLongW(parent, 0);
@@ -9999,7 +9999,7 @@
     TEXTMETRICW textMetric;
 
     TRACE("(text=%s, ..., isW=%d)\n", debugstr_t(text, isW), isW);
-    
+
     if (NULL == (infoPtr->pedititem = COMCTL32_Alloc(sizeof(EDITLABEL_ITEM))))
 	return 0;
 
@@ -10021,7 +10021,7 @@
         SelectObject(hdc, hOldFont);
 
     ReleaseDC(parent, hdc);
-    if (isW) 
+    if (isW)
 	hedit = CreateWindowW(editName, text, style, x, y, sz.cx, height, parent, 0, hinst, 0);
     else
 	hedit = CreateWindowA("Edit", (LPCSTR)text, style, x, y, sz.cx, height, parent, 0, hinst, 0);
@@ -10034,7 +10034,7 @@
 
     infoPtr->pedititem->param = param;
     infoPtr->pedititem->EditLblCb = EditLblCb;
-    infoPtr->pedititem->EditWndProc = (WNDPROC) 
+    infoPtr->pedititem->EditWndProc = (WNDPROC)
 	(isW ? SetWindowLongW(hedit, GWL_WNDPROC, (LONG)EditLblWndProcW) :
                SetWindowLongA(hedit, GWL_WNDPROC, (LONG)EditLblWndProcA) );
 
diff --git a/dlls/comctl32/monthcal.c b/dlls/comctl32/monthcal.c
index ec1b87d..649044c 100644
--- a/dlls/comctl32/monthcal.c
+++ b/dlls/comctl32/monthcal.c
@@ -26,7 +26,7 @@
  *
  *
  *  FIXME: handle resources better (doesn't work now); also take care
-           of internationalization. 
+           of internationalization.
  *  FIXME: keyboard handling.
  */
 
@@ -54,7 +54,7 @@
 										/* month', wait 500 ms before going */
 										/* to the next month */
 #define MC_NEXTMONTHTIMER   1			/* Timer ID's */
-#define MC_PREVMONTHTIMER   2			
+#define MC_PREVMONTHTIMER   2
 
 typedef struct
 {
@@ -91,12 +91,12 @@
     DWORD	rangeValid;
     SYSTEMTIME	minDate;
     SYSTEMTIME	maxDate;
-		
+
     RECT rcClient;	/* rect for whole client area */
     RECT rcDraw;	/* rect for drawable portion of client area */
     RECT title;		/* rect for the header above the calendar */
     RECT titlebtnnext;	/* the `next month' button in the header */
-    RECT titlebtnprev;  /* the `prev month' button in the header */	
+    RECT titlebtnprev;  /* the `prev month' button in the header */
     RECT titlemonth;	/* the `month name' txt in the header */
     RECT titleyear;	/* the `year number' txt in the header */
     RECT wdays;		/* week days at top */
@@ -141,7 +141,7 @@
 
 
 /* make sure that time is valid */
-static int MONTHCAL_ValidateTime(SYSTEMTIME time) 
+static int MONTHCAL_ValidateTime(SYSTEMTIME time)
 {
   if(time.wMonth > 12) return FALSE;
   if(time.wDayOfWeek > 6) return FALSE;
@@ -156,7 +156,7 @@
 }
 
 
-void MONTHCAL_CopyTime(const SYSTEMTIME *from, SYSTEMTIME *to) 
+void MONTHCAL_CopyTime(const SYSTEMTIME *from, SYSTEMTIME *to)
 {
   to->wYear = from->wYear;
   to->wMonth = from->wMonth;
@@ -169,7 +169,7 @@
 }
 
 
-/* Note:Depending on DST, this may be offset by a day. 
+/* Note:Depending on DST, this may be offset by a day.
    Need to find out if we're on a DST place & adjust the clock accordingly.
    Above function assumes we have a valid data.
    Valid for year>1752;  1 <= d <= 31, 1 <= m <= 12.
@@ -182,15 +182,15 @@
 {
   year-=(month < 3);
 
-  return((year + year/4 - year/100 + year/400 + 
+  return((year + year/4 - year/100 + year/400 +
          DayOfWeekTable[month-1] + day - 1 ) % 7);
 }
 
 /* From a given point, calculate the row (weekpos), column(daypos)
    and day in the calendar. day== 0 mean the last day of tha last month
 */
-static int MONTHCAL_CalcDayFromPos(MONTHCAL_INFO *infoPtr, int x, int y, 
-				   int *daypos,int *weekpos) 
+static int MONTHCAL_CalcDayFromPos(MONTHCAL_INFO *infoPtr, int x, int y,
+				   int *daypos,int *weekpos)
 {
   int retval, firstDay;
 
@@ -202,7 +202,7 @@
 
   *daypos = (x - infoPtr->days.left ) / infoPtr->width_increment;
   *weekpos = (y - infoPtr->days.top ) / infoPtr->height_increment;
-    
+
   firstDay = (MONTHCAL_CalculateDayOfWeek(1, infoPtr->currentMonth, infoPtr->currentYear)+6 - infoPtr->firstDay)%7;
   retval = *daypos + (7 * *weekpos) - firstDay;
   return retval;
@@ -211,7 +211,7 @@
 /* day is the day of the month, 1 == 1st day of the month */
 /* sets x and y to be the position of the day */
 /* x == day, y == week where(0,0) == firstDay, 1st week */
-static void MONTHCAL_CalcDayXY(MONTHCAL_INFO *infoPtr, int day, int month, 
+static void MONTHCAL_CalcDayXY(MONTHCAL_INFO *infoPtr, int day, int month,
                                  int *x, int *y)
 {
   int firstDay, prevMonth;
@@ -227,7 +227,7 @@
     prevMonth = month - 1;
     if(prevMonth==0)
        prevMonth = 12;
-   
+
     *x = (MONTHCAL_MonthLength(prevMonth, infoPtr->currentYear) - firstDay) % 7;
     *y = 0;
     return;
@@ -240,7 +240,7 @@
 
 
 /* x: column(day), y: row(week) */
-static void MONTHCAL_CalcDayRect(MONTHCAL_INFO *infoPtr, RECT *r, int x, int y) 
+static void MONTHCAL_CalcDayRect(MONTHCAL_INFO *infoPtr, RECT *r, int x, int y)
 {
   r->left = infoPtr->days.left + x * infoPtr->width_increment;
   r->right = r->left + infoPtr->width_increment;
@@ -252,7 +252,7 @@
 /* sets the RECT struct r to the rectangle around the day and month */
 /* day is the day value of the month(1 == 1st), month is the month */
 /* value(january == 1, december == 12) */
-static inline void MONTHCAL_CalcPosFromDay(MONTHCAL_INFO *infoPtr, 
+static inline void MONTHCAL_CalcPosFromDay(MONTHCAL_INFO *infoPtr,
                                             int day, int month, RECT *r)
 {
   int x, y;
@@ -278,7 +278,7 @@
 
   x = day_rect.left;
   y = day_rect.top;
-	
+
   points[0].x = x;
   points[0].y = y - 1;
   points[1].x = x + 0.8 * infoPtr->width_increment;
@@ -287,7 +287,7 @@
   points[2].y = y;
   points[3].x = x + infoPtr->width_increment;
   points[3].y = y + 0.5 * infoPtr->height_increment;
-	
+
   points[4].x = x + infoPtr->width_increment;
   points[4].y = y + 0.9 * infoPtr->height_increment;
   points[5].x = x + 0.6 * infoPtr->width_increment;
@@ -295,7 +295,7 @@
   points[6].x = x + 0.5 * infoPtr->width_increment;
   points[6].y = y + 0.9 * infoPtr->height_increment; /* bring the bottom up just
 				a hair to fit inside the day rectangle */
-	
+
   points[7].x = x + 0.2 * infoPtr->width_increment;
   points[7].y = y + 0.8 * infoPtr->height_increment;
   points[8].x = x + 0.1 * infoPtr->width_increment;
@@ -309,7 +309,7 @@
   points[11].y = y + 0.3 * infoPtr->height_increment;
   points[12].x = x + 0.4 * infoPtr->width_increment;
   points[12].y = y + 0.2 * infoPtr->height_increment;
-  
+
   PolyBezier(hdc, points, 13);
   DeleteObject(hRedPen);
   SelectObject(hdc, hOldPen2);
@@ -329,7 +329,7 @@
 
   sprintf(buf, "%d", day);
 
-/* No need to check styles: when selection is not valid, it is set to zero. 
+/* No need to check styles: when selection is not valid, it is set to zero.
  * 1<day<31, so evertyhing's OK.
  */
 
@@ -390,7 +390,7 @@
 
 
 /* CHECKME: For `todays date', do we need to check the locale?*/
-static void MONTHCAL_Refresh(HWND hwnd, HDC hdc, PAINTSTRUCT* ps) 
+static void MONTHCAL_Refresh(HWND hwnd, HDC hdc, PAINTSTRUCT* ps)
 {
   MONTHCAL_INFO *infoPtr=MONTHCAL_GetInfoPtr(hwnd);
   RECT *rcClient=&infoPtr->rcClient;
@@ -425,7 +425,7 @@
   /* fill background */
   hbr = CreateSolidBrush (infoPtr->bk);
   FillRect(hdc, rcClient, hbr);
-  DeleteObject(hbr);       
+  DeleteObject(hbr);
 
   /* draw header */
   if(IntersectRect(&rcTemp, &(ps->rcPaint), title))
@@ -434,10 +434,10 @@
     FillRect(hdc, title, hbr);
     DeleteObject(hbr);
   }
-	
+
   /* if the previous button is pressed draw it depressed */
   if(IntersectRect(&rcTemp, &(ps->rcPaint), prev))
-  {  
+  {
     if((infoPtr->status & MC_PREVPRESSED))
         DrawFrameControl(hdc, prev, DFC_SCROLL,
   	   DFCS_SCROLLLEFT | DFCS_PUSHED |
@@ -447,7 +447,7 @@
 	   DFCS_SCROLLLEFT |(dwStyle & WS_DISABLED ? DFCS_INACTIVE : 0));
   }
 
-  /* if next button is depressed draw it depressed */	
+  /* if next button is depressed draw it depressed */
   if(IntersectRect(&rcTemp, &(ps->rcPaint), next))
   {
     if((infoPtr->status & MC_NEXTPRESSED))
@@ -466,14 +466,14 @@
   /* titlemonth->left and right are set in MONTHCAL_UpdateSize */
   titlemonth->left   = title->left;
   titlemonth->right  = title->right;
- 
+
   GetLocaleInfoA( LOCALE_USER_DEFAULT,LOCALE_SMONTHNAME1+infoPtr->currentMonth -1,
 		  buf1,sizeof(buf1));
   sprintf(buf, "%s %ld", buf1, infoPtr->currentYear);
- 
+
   if(IntersectRect(&rcTemp, &(ps->rcPaint), titlemonth))
   {
-    DrawTextA(hdc, buf, strlen(buf), titlemonth, 
+    DrawTextA(hdc, buf, strlen(buf), titlemonth,
                         DT_CENTER | DT_VCENTER | DT_SINGLELINE);
   }
 
@@ -481,7 +481,7 @@
 
 /* titlemonth left/right contained rect for whole titletxt('June  1999')
   * MCM_HitTestInfo wants month & year rects, so prepare these now.
-  *(no, we can't draw them separately; the whole text is centered) 
+  *(no, we can't draw them separately; the whole text is centered)
   */
   GetTextExtentPoint32A(hdc, buf, strlen(buf), &size);
   titlemonth->left = title->right / 2 - size.cx / 2;
@@ -489,7 +489,7 @@
   GetTextExtentPoint32A(hdc, buf1, strlen(buf1), &size);
   titlemonth->right = titlemonth->left + size.cx;
   titleyear->left = titlemonth->right;
- 
+
   /* draw month area */
   rcTemp.top=infoPtr->wdays.top;
   rcTemp.left=infoPtr->wdays.left;
@@ -501,13 +501,13 @@
     FillRect(hdc, &rcTemp, hbr);
     DeleteObject(hbr);
   }
-	
+
 /* draw line under day abbreviatons */
 
   MoveToEx(hdc, infoPtr->days.left + 3, title->bottom + textHeight + 1, NULL);
-     
+
   LineTo(hdc, rcDraw->right - 3, title->bottom + textHeight + 1);
-  
+
   prevMonth = infoPtr->currentMonth - 1;
   if(prevMonth == 0) /* if currentMonth is january(1) prevMonth is */
     prevMonth = 12;    /* december(12) of the previous year */
@@ -537,10 +537,10 @@
   }
 
 /* draw day numbers; first, the previous month */
-  
+
   firstDay = MONTHCAL_CalculateDayOfWeek(1, infoPtr->currentMonth, infoPtr->currentYear);
-  
-  day = MONTHCAL_MonthLength(prevMonth, infoPtr->currentYear)  + 
+
+  day = MONTHCAL_MonthLength(prevMonth, infoPtr->currentYear)  +
     (infoPtr->firstDay + 7  - firstDay)%7 + 1;
   if (day > MONTHCAL_MonthLength(prevMonth, infoPtr->currentYear))
     day -=7;
@@ -553,7 +553,7 @@
     MONTHCAL_CalcDayRect(infoPtr, &rcDay, i, 0);
     if(IntersectRect(&rcTemp, &(ps->rcPaint), &rcDay))
     {
-      MONTHCAL_DrawDay(hdc, infoPtr, day, prevMonth, i, 0, 
+      MONTHCAL_DrawDay(hdc, infoPtr, day, prevMonth, i, 0,
           infoPtr->monthdayState[m] & mask);
     }
 
@@ -577,7 +577,7 @@
     if(IntersectRect(&rcTemp, &(ps->rcPaint), &rcDay))
     {
 
-      MONTHCAL_DrawDay(hdc, infoPtr, day, infoPtr->currentMonth, i, 0, 
+      MONTHCAL_DrawDay(hdc, infoPtr, day, infoPtr->currentMonth, i, 0,
 	infoPtr->monthdayState[m] & mask);
 
       if((infoPtr->currentMonth==infoPtr->todaysDate.wMonth) &&
@@ -595,7 +595,7 @@
 
   j = 1; /* move to the 2nd week of the current month */
   i = 0; /* move back to sunday */
-  while(day <= MONTHCAL_MonthLength(infoPtr->currentMonth, infoPtr->currentYear)) {	
+  while(day <= MONTHCAL_MonthLength(infoPtr->currentMonth, infoPtr->currentYear)) {
     MONTHCAL_CalcDayRect(infoPtr, &rcDay, i, j);
     if(IntersectRect(&rcTemp, &(ps->rcPaint), &rcDay))
     {
@@ -604,8 +604,8 @@
 
       if((infoPtr->currentMonth==infoPtr->todaysDate.wMonth) &&
           (day==infoPtr->todaysDate.wDay) &&
-          (infoPtr->currentYear == infoPtr->todaysDate.wYear)) 
-        if(!(dwStyle & MCS_NOTODAYCIRCLE))  
+          (infoPtr->currentYear == infoPtr->todaysDate.wYear))
+        if(!(dwStyle & MCS_NOTODAYCIRCLE))
 	  MONTHCAL_CircleDay(hdc, infoPtr, day, infoPtr->currentMonth);
     }
     mask<<=1;
@@ -627,14 +627,14 @@
   while((i<7) &&(j<6)) {
     MONTHCAL_CalcDayRect(infoPtr, &rcDay, i, j);
     if(IntersectRect(&rcTemp, &(ps->rcPaint), &rcDay))
-    {   
+    {
       MONTHCAL_DrawDay(hdc, infoPtr, day, infoPtr->currentMonth + 1, i, j,
 		infoPtr->monthdayState[m] & mask);
     }
 
     mask<<=1;
     day++;
-    i++;	
+    i++;
     if(i==7) { /* past saturday, go to next week's sunday */
       i = 0;
       j++;
@@ -650,8 +650,8 @@
     int offset = 0;
     if(!(dwStyle & MCS_NOTODAYCIRCLE))  {
       /*day is the number of days from nextmonth we put on the calendar */
-      MONTHCAL_CircleDay(hdc, infoPtr, 
-			 day+MONTHCAL_MonthLength(infoPtr->currentMonth,infoPtr->currentYear), 
+      MONTHCAL_CircleDay(hdc, infoPtr,
+			 day+MONTHCAL_MonthLength(infoPtr->currentMonth,infoPtr->currentYear),
 			 infoPtr->currentMonth);
       offset+=textWidth;
     }
@@ -674,7 +674,7 @@
     SelectObject(hdc, infoPtr->hFont);
   }
 
-/*eventually draw week numbers*/   
+/*eventually draw week numbers*/
   if(dwStyle & MCS_WEEKNUMBERS)  {
     /* display weeknumbers*/
     int mindays;
@@ -682,7 +682,7 @@
     /* Rules what week to call the first week of a new year:
        LOCALE_IFIRSTWEEKOFYEAR == 0 (e.g US?):
        The week containing Jan 1 is the first week of year
-       LOCALE_IFIRSTWEEKOFYEAR == 2 (e.g. Germany): 
+       LOCALE_IFIRSTWEEKOFYEAR == 2 (e.g. Germany):
        First week of year must contain 4 days of the new year
        LOCALE_IFIRSTWEEKOFYEAR == 1  (what contries?)
        The first week of the year must contain only days of the new year
@@ -704,12 +704,12 @@
       {
 	/* calculate all those exceptions for january */
 	weeknum1=MONTHCAL_CalculateDayOfWeek(1,1,infoPtr->currentYear);
-	if ((infoPtr->firstDay +7 - weeknum1)%7 > mindays) 
+	if ((infoPtr->firstDay +7 - weeknum1)%7 > mindays)
 	    weeknum =1;
 	else
 	  {
 	    weeknum = 0;
-	    for(i=0; i<11; i++) 
+	    for(i=0; i<11; i++)
 	      weeknum+=MONTHCAL_MonthLength(i+1, infoPtr->currentYear-1);
 	    weeknum +=startofprescal+ 7;
 	    weeknum /=7;
@@ -721,7 +721,7 @@
     else
       {
 	weeknum = 0;
-	for(i=0; i<prevMonth-1; i++) 
+	for(i=0; i<prevMonth-1; i++)
 	  weeknum+=MONTHCAL_MonthLength(i+1, infoPtr->currentYear);
 	weeknum +=startofprescal+ 7;
 	weeknum /=7;
@@ -749,26 +749,26 @@
       days->top+=infoPtr->height_increment;
       days->bottom+=infoPtr->height_increment;
     }
-			
+
     MoveToEx(hdc, infoPtr->weeknums.right, infoPtr->weeknums.top + 3 , NULL);
     LineTo(hdc,   infoPtr->weeknums.right, infoPtr->weeknums.bottom );
-		
+
   }
   /* currentFont was font at entering Refresh */
 
   SetBkColor(hdc, oldBkColor);
-  SelectObject(hdc, currentFont);     
+  SelectObject(hdc, currentFont);
   SetTextColor(hdc, oldTextColor);
 }
 
 
-static LRESULT 
+static LRESULT
 MONTHCAL_GetMinReqRect(HWND hwnd, WPARAM wParam, LPARAM lParam)
 {
   MONTHCAL_INFO *infoPtr = MONTHCAL_GetInfoPtr(hwnd);
   LPRECT lpRect = (LPRECT) lParam;
   TRACE("%x %lx\n", wParam, lParam);
-	
+
   /* validate parameters */
 
   if((infoPtr==NULL) ||(lpRect == NULL) ) return FALSE;
@@ -781,7 +781,7 @@
 }
 
 
-static LRESULT 
+static LRESULT
 MONTHCAL_GetColor(HWND hwnd, WPARAM wParam, LPARAM lParam)
 {
   MONTHCAL_INFO *infoPtr = MONTHCAL_GetInfoPtr(hwnd);
@@ -807,7 +807,7 @@
 }
 
 
-static LRESULT 
+static LRESULT
 MONTHCAL_SetColor(HWND hwnd, WPARAM wParam, LPARAM lParam)
 {
   MONTHCAL_INFO *infoPtr = MONTHCAL_GetInfoPtr(hwnd);
@@ -847,13 +847,13 @@
 }
 
 
-static LRESULT 
+static LRESULT
 MONTHCAL_GetMonthDelta(HWND hwnd, WPARAM wParam, LPARAM lParam)
 {
   MONTHCAL_INFO *infoPtr = MONTHCAL_GetInfoPtr(hwnd);
 
   TRACE("%x %lx\n", wParam, lParam);
-  
+
   if(infoPtr->delta)
     return infoPtr->delta;
   else
@@ -861,24 +861,24 @@
 }
 
 
-static LRESULT 
+static LRESULT
 MONTHCAL_SetMonthDelta(HWND hwnd, WPARAM wParam, LPARAM lParam)
 {
   MONTHCAL_INFO *infoPtr = MONTHCAL_GetInfoPtr(hwnd);
   int prev = infoPtr->delta;
 
   TRACE("%x %lx\n", wParam, lParam);
-	
+
   infoPtr->delta = (int)wParam;
   return prev;
 }
 
 
-static LRESULT 
+static LRESULT
 MONTHCAL_GetFirstDayOfWeek(HWND hwnd, WPARAM wParam, LPARAM lParam)
 {
   MONTHCAL_INFO *infoPtr = MONTHCAL_GetInfoPtr(hwnd);
-	
+
   return infoPtr->firstDay;
 }
 
@@ -887,7 +887,7 @@
 /* 0 == Monday, 6 == Sunday */
 /* FIXME: this needs to be implemented properly in MONTHCAL_Refresh() */
 /* FIXME: we need more error checking here */
-static LRESULT 
+static LRESULT
 MONTHCAL_SetFirstDayOfWeek(HWND hwnd, WPARAM wParam, LPARAM lParam)
 {
   MONTHCAL_INFO *infoPtr = MONTHCAL_GetInfoPtr(hwnd);
@@ -916,7 +916,7 @@
 
 /* FIXME: fill this in */
 static LRESULT
-MONTHCAL_GetMonthRange(HWND hwnd, WPARAM wParam, LPARAM lParam) 
+MONTHCAL_GetMonthRange(HWND hwnd, WPARAM wParam, LPARAM lParam)
 {
   MONTHCAL_INFO *infoPtr = MONTHCAL_GetInfoPtr(hwnd);
 
@@ -937,7 +937,7 @@
 
 
 /* FIXME: are validated times taken from current date/time or simply
- * copied? 
+ * copied?
  * FIXME:    check whether MCM_GETMONTHRANGE shows correct result after
  *            adjusting range with MCM_SETRANGE
  */
@@ -950,7 +950,7 @@
   int prev;
 
   TRACE("%x %lx\n", wParam, lParam);
-  
+
   if(wParam & GDTR_MAX) {
     if(MONTHCAL_ValidateTime(lprgSysTimeArray[1])){
       MONTHCAL_CopyTime(&lprgSysTimeArray[1], &infoPtr->maxDate);
@@ -973,8 +973,8 @@
   prev = infoPtr->monthRange;
   infoPtr->monthRange = infoPtr->maxDate.wMonth - infoPtr->minDate.wMonth;
 
-  if(infoPtr->monthRange!=prev) { 
-	COMCTL32_ReAlloc(infoPtr->monthdayState, 
+  if(infoPtr->monthRange!=prev) {
+	COMCTL32_ReAlloc(infoPtr->monthdayState,
 		infoPtr->monthRange * sizeof(MONTHDAYSTATE));
   }
 
@@ -983,7 +983,7 @@
 
 
 /* CHECKME: At the moment, we copy ranges anyway,regardless of
- * infoPtr->rangeValid; a invalid range is simply filled with zeros in 
+ * infoPtr->rangeValid; a invalid range is simply filled with zeros in
  * SetRange.  Is this the right behavior?
 */
 
@@ -1015,12 +1015,12 @@
   TRACE("%x %lx\n", wParam, lParam);
   if(iMonths!=infoPtr->monthRange) return 0;
 
-  for(i=0; i<iMonths; i++) 
+  for(i=0; i<iMonths; i++)
     infoPtr->monthdayState[i] = dayStates[i];
   return 1;
 }
 
-static LRESULT 
+static LRESULT
 MONTHCAL_GetCurSel(HWND hwnd, WPARAM wParam, LPARAM lParam)
 {
   MONTHCAL_INFO *infoPtr = MONTHCAL_GetInfoPtr(hwnd);
@@ -1036,7 +1036,7 @@
 
 /* FIXME: if the specified date is not visible, make it visible */
 /* FIXME: redraw? */
-static LRESULT 
+static LRESULT
 MONTHCAL_SetCurSel(HWND hwnd, WPARAM wParam, LPARAM lParam)
 {
   MONTHCAL_INFO *infoPtr = MONTHCAL_GetInfoPtr(hwnd);
@@ -1057,7 +1057,7 @@
 }
 
 
-static LRESULT 
+static LRESULT
 MONTHCAL_GetMaxSelCount(HWND hwnd, WPARAM wParam, LPARAM lParam)
 {
   MONTHCAL_INFO *infoPtr = MONTHCAL_GetInfoPtr(hwnd);
@@ -1067,7 +1067,7 @@
 }
 
 
-static LRESULT 
+static LRESULT
 MONTHCAL_SetMaxSelCount(HWND hwnd, WPARAM wParam, LPARAM lParam)
 {
   MONTHCAL_INFO *infoPtr = MONTHCAL_GetInfoPtr(hwnd);
@@ -1081,7 +1081,7 @@
 }
 
 
-static LRESULT 
+static LRESULT
 MONTHCAL_GetSelRange(HWND hwnd, WPARAM wParam, LPARAM lParam)
 {
   MONTHCAL_INFO *infoPtr = MONTHCAL_GetInfoPtr(hwnd);
@@ -1100,12 +1100,12 @@
     TRACE("[min,max]=[%d %d]\n", infoPtr->minSel.wDay, infoPtr->maxSel.wDay);
     return TRUE;
   }
- 
+
   return FALSE;
 }
 
 
-static LRESULT 
+static LRESULT
 MONTHCAL_SetSelRange(HWND hwnd, WPARAM wParam, LPARAM lParam)
 {
   MONTHCAL_INFO *infoPtr = MONTHCAL_GetInfoPtr(hwnd);
@@ -1124,12 +1124,12 @@
     TRACE("[min,max]=[%d %d]\n", infoPtr->minSel.wDay, infoPtr->maxSel.wDay);
     return TRUE;
   }
- 
+
   return FALSE;
 }
 
 
-static LRESULT 
+static LRESULT
 MONTHCAL_GetToday(HWND hwnd, WPARAM wParam, LPARAM lParam)
 {
   MONTHCAL_INFO *infoPtr = MONTHCAL_GetInfoPtr(hwnd);
@@ -1145,7 +1145,7 @@
 }
 
 
-static LRESULT 
+static LRESULT
 MONTHCAL_SetToday(HWND hwnd, WPARAM wParam, LPARAM lParam)
 {
   MONTHCAL_INFO *infoPtr = MONTHCAL_GetInfoPtr(hwnd);
@@ -1170,15 +1170,15 @@
   UINT x,y;
   DWORD retval;
   int day,wday,wnum;
-  
-  
+
+
   x = lpht->pt.x;
   y = lpht->pt.y;
   retval = MCHT_NOWHERE;
-  
 
-  /* Comment in for debugging... 
-  TRACE("%d %d wd[%d %d %d %d] d[%d %d %d %d] t[%d %d %d %d] wn[%d %d %d %d]\n", x, y, 
+
+  /* Comment in for debugging...
+  TRACE("%d %d wd[%d %d %d %d] d[%d %d %d %d] t[%d %d %d %d] wn[%d %d %d %d]\n", x, y,
 	infoPtr->wdays.left, infoPtr->wdays.right,
 	infoPtr->wdays.top, infoPtr->wdays.bottom,
 	infoPtr->days.left, infoPtr->days.right,
@@ -1190,7 +1190,7 @@
   */
 
   /* are we in the header? */
-  
+
   if(PtInRect(&infoPtr->title, lpht->pt)) {
     if(PtInRect(&infoPtr->titlebtnprev, lpht->pt)) {
       retval = MCHT_TITLEBTNPREV;
@@ -1208,36 +1208,36 @@
       retval = MCHT_TITLEYEAR;
       goto done;
     }
-    
+
     retval = MCHT_TITLE;
     goto done;
   }
-  
+
   day = MONTHCAL_CalcDayFromPos(infoPtr,x,y,&wday,&wnum);
   if(PtInRect(&infoPtr->wdays, lpht->pt)) {
     retval = MCHT_CALENDARDAY;
     lpht->st.wYear  = infoPtr->currentYear;
     lpht->st.wMonth = (day < 1)? infoPtr->currentMonth -1 : infoPtr->currentMonth;
-    lpht->st.wDay   = (day < 1)? 
+    lpht->st.wDay   = (day < 1)?
       MONTHCAL_MonthLength(infoPtr->currentMonth-1,infoPtr->currentYear) -day : day;
     goto done;
   }
-  if(PtInRect(&infoPtr->weeknums, lpht->pt)) {  
-    retval = MCHT_CALENDARWEEKNUM; 
+  if(PtInRect(&infoPtr->weeknums, lpht->pt)) {
+    retval = MCHT_CALENDARWEEKNUM;
     lpht->st.wYear  = infoPtr->currentYear;
-    lpht->st.wMonth = (day < 1) ? infoPtr->currentMonth -1 : 
-      (day > MONTHCAL_MonthLength(infoPtr->currentMonth,infoPtr->currentYear)) ? 
+    lpht->st.wMonth = (day < 1) ? infoPtr->currentMonth -1 :
+      (day > MONTHCAL_MonthLength(infoPtr->currentMonth,infoPtr->currentYear)) ?
       infoPtr->currentMonth +1 :infoPtr->currentMonth;
-    lpht->st.wDay   = (day < 1 ) ? 
-      MONTHCAL_MonthLength(infoPtr->currentMonth-1,infoPtr->currentYear) -day : 
-      (day > MONTHCAL_MonthLength(infoPtr->currentMonth,infoPtr->currentYear)) ? 
+    lpht->st.wDay   = (day < 1 ) ?
+      MONTHCAL_MonthLength(infoPtr->currentMonth-1,infoPtr->currentYear) -day :
+      (day > MONTHCAL_MonthLength(infoPtr->currentMonth,infoPtr->currentYear)) ?
       day - MONTHCAL_MonthLength(infoPtr->currentMonth,infoPtr->currentYear) : day;
-    goto done;				    
+    goto done;
   }
-  if(PtInRect(&infoPtr->days, lpht->pt)) 
+  if(PtInRect(&infoPtr->days, lpht->pt))
     {
       lpht->st.wYear  = infoPtr->currentYear;
-      if ( day < 1) 
+      if ( day < 1)
 	{
 	  retval = MCHT_CALENDARDATEPREV;
 	  lpht->st.wMonth = infoPtr->currentMonth - 1;
@@ -1267,15 +1267,15 @@
       goto done;
     }
   if(PtInRect(&infoPtr->todayrect, lpht->pt)) {
-    retval = MCHT_TODAYLINK; 
+    retval = MCHT_TODAYLINK;
     goto done;
   }
-  
-  
+
+
   /* Hit nothing special? What's left must be background :-) */
-  
-  retval = MCHT_CALENDARBK;       
- done: 
+
+  retval = MCHT_CALENDARBK;
+ done:
   lpht->uHit = retval;
   return retval;
 }
@@ -1331,7 +1331,7 @@
     nmds.nmhdr.idFrom   = GetWindowLongA(hwnd, GWL_ID);
     nmds.nmhdr.code     = MCN_GETDAYSTATE;
     nmds.cDayState	= infoPtr->monthRange;
-    nmds.prgDayState	= COMCTL32_Alloc 
+    nmds.prgDayState	= COMCTL32_Alloc
                         (infoPtr->monthRange * sizeof(MONTHDAYSTATE));
 
     SendMessageA(GetParent(hwnd), WM_NOTIFY,
@@ -1348,7 +1348,7 @@
   HMENU hMenu;
   POINT menupoint;
   char buf[32];
-  
+
   hMenu = CreatePopupMenu();
   if (!LoadStringA(COMCTL32_hModule,IDM_GOTODAY,buf,sizeof(buf)))
     {
@@ -1365,7 +1365,7 @@
       infoPtr->currentMonth=infoPtr->todaysDate.wMonth;
       infoPtr->currentYear=infoPtr->todaysDate.wYear;
       InvalidateRect(hwnd, NULL, FALSE);
-    }	
+    }
   return 0;
 }
 
@@ -1381,7 +1381,7 @@
   int i;
   POINT menupoint;
   TRACE("%x %lx\n", wParam, lParam);
-	
+
   if (infoPtr->hWndYearUpDown)
     {
       infoPtr->currentYear=SendMessageA( infoPtr->hWndYearUpDown, UDM_SETPOS,   (WPARAM) 0,(LPARAM)0);
@@ -1399,7 +1399,7 @@
 	infoPtr->hWndYearEdit=0;
       InvalidateRect(hwnd, NULL, FALSE);
     }
-  
+
   ht.pt.x = (INT)LOWORD(lParam);
   ht.pt.y = (INT)HIWORD(lParam);
   hit = MONTHCAL_HitTest(hwnd, (LPARAM)&ht);
@@ -1414,7 +1414,7 @@
     InvalidateRect(hwnd, NULL, FALSE);
     return TRUE;
   }
-  if(hit == MCHT_TITLEBTNPREV){ 
+  if(hit == MCHT_TITLEBTNPREV){
     MONTHCAL_GoToPrevMonth(hwnd, infoPtr);
     infoPtr->status = MC_PREVPRESSED;
     SetTimer(hwnd, MC_PREVMONTHTIMER, MC_NEXTMONTHDELAY, 0);
@@ -1424,7 +1424,7 @@
 
   if(hit == MCHT_TITLEMONTH) {
     hMenu = CreatePopupMenu();
-    
+
     for (i=0; i<12;i++)
       {
 	GetLocaleInfoA( LOCALE_USER_DEFAULT,LOCALE_SMONTHNAME1+i,
@@ -1451,8 +1451,8 @@
 			 infoPtr->titleyear.right-infoPtr->titleyear.left,
 			 infoPtr->textHeight,
 			 hwnd,
-			 (HMENU)NULL, 
-			 (HINSTANCE)NULL, 
+			 (HMENU)NULL,
+			 (HINSTANCE)NULL,
 			 NULL);
     infoPtr->hWndYearUpDown=CreateWindowExA(0,
 			 UPDOWN_CLASSA,
@@ -1462,14 +1462,14 @@
 			 20,
 			 infoPtr->textHeight,
 			 hwnd,
-			 (HMENU)NULL, 
-			 (HINSTANCE)NULL, 
+			 (HMENU)NULL,
+			 (HINSTANCE)NULL,
 			 NULL);
     SendMessageA( infoPtr->hWndYearUpDown, UDM_SETRANGE, (WPARAM) 0, MAKELONG (9999, 1753));
     SendMessageA( infoPtr->hWndYearUpDown, UDM_SETBUDDY, (WPARAM) infoPtr->hWndYearEdit, (LPARAM)0 );
     SendMessageA( infoPtr->hWndYearUpDown, UDM_SETPOS,   (WPARAM) 0,(LPARAM)infoPtr->currentYear );
     return TRUE;
-	 
+
   }
   if(hit == MCHT_TODAYLINK) {
     infoPtr->currentMonth=infoPtr->todaysDate.wMonth;
@@ -1487,13 +1487,13 @@
     nmsc.nmhdr.code     = MCN_SELCHANGE;
     MONTHCAL_CopyTime(&nmsc.stSelStart, &infoPtr->minSel);
     MONTHCAL_CopyTime(&nmsc.stSelEnd, &infoPtr->maxSel);
-	
+
     SendMessageA(GetParent(hwnd), WM_NOTIFY,
            (WPARAM)nmsc.nmhdr.idFrom,(LPARAM)&nmsc);
 
     MONTHCAL_CopyTime(&ht.st, &selArray[0]);
     MONTHCAL_CopyTime(&ht.st, &selArray[1]);
-    MONTHCAL_SetSelRange(hwnd,0,(LPARAM) &selArray); 
+    MONTHCAL_SetSelRange(hwnd,0,(LPARAM) &selArray);
 
     /* redraw both old and new days if the selected day changed */
     if(infoPtr->curSelDay != ht.st.wDay) {
@@ -1546,7 +1546,7 @@
     InvalidateRect(hwnd, NULL, FALSE);
     return TRUE;
   }
-  if(hit == MCHT_CALENDARDATEPREV){ 
+  if(hit == MCHT_CALENDARDATEPREV){
     MONTHCAL_GoToPrevMonth(hwnd, infoPtr);
     InvalidateRect(hwnd, NULL, FALSE);
     return TRUE;
@@ -1564,14 +1564,14 @@
   nmsc.nmhdr.code     = MCN_SELECT;
   MONTHCAL_CopyTime(&nmsc.stSelStart, &infoPtr->minSel);
   MONTHCAL_CopyTime(&nmsc.stSelEnd, &infoPtr->maxSel);
-	
+
   SendMessageA(GetParent(hwnd), WM_NOTIFY,
            (WPARAM)nmsc.nmhdr.idFrom, (LPARAM)&nmsc);
-  
+
   /* redraw if necessary */
   if(redraw)
     InvalidateRect(hwnd, NULL, FALSE);
-	
+
   return 0;
 }
 
@@ -1586,7 +1586,7 @@
   if(!infoPtr) return 0;
 
   switch(wParam) {
-  case MC_NEXTMONTHTIMER: 
+  case MC_NEXTMONTHTIMER:
     redraw = TRUE;
     MONTHCAL_GoToNextMonth(hwnd, infoPtr);
     break;
@@ -1618,9 +1618,9 @@
 
   ht.pt.x = LOWORD(lParam);
   ht.pt.y = HIWORD(lParam);
-	
+
   hit = MONTHCAL_HitTest(hwnd, (LPARAM)&ht);
-  
+
   /* not on the calendar date numbers? bail out */
   TRACE("hit:%x\n",hit);
   if((hit & MCHT_CALENDARDATE) != MCHT_CALENDARDATE) return 0;
@@ -1638,23 +1638,23 @@
     i = 0;
     if(infoPtr->firstSelDay==selArray[0].wDay) i=1;
     TRACE("oldRange:%d %d %d %d\n", infoPtr->firstSelDay, selArray[0].wDay, selArray[1].wDay, i);
-    if(infoPtr->firstSelDay==selArray[1].wDay) {  
+    if(infoPtr->firstSelDay==selArray[1].wDay) {
       /* 1st time we get here: selArray[0]=selArray[1])  */
       /* if we're still at the first selected date, return */
       if(infoPtr->firstSelDay==selday) goto done;
       if(selday<infoPtr->firstSelDay) i = 0;
     }
-			
+
     if(abs(infoPtr->firstSelDay - selday) >= infoPtr->maxSelCount) {
       if(selday>infoPtr->firstSelDay)
         selday = infoPtr->firstSelDay + infoPtr->maxSelCount;
       else
         selday = infoPtr->firstSelDay - infoPtr->maxSelCount;
     }
-		
+
     if(selArray[i].wDay!=selday) {
       TRACE("newRange:%d %d %d %d\n", infoPtr->firstSelDay, selArray[0].wDay, selArray[1].wDay, i);
-			
+
       selArray[i].wDay = selday;
 
       if(selArray[0].wDay>selArray[1].wDay) {
@@ -1712,7 +1712,7 @@
 MONTHCAL_SetFocus(HWND hwnd, WPARAM wParam, LPARAM lParam)
 {
   TRACE("\n");
-  
+
   InvalidateRect(hwnd, NULL, FALSE);
 
   return 0;
@@ -1769,15 +1769,15 @@
   rcDraw->bottom = rcClient->bottom;
 
   /* recalculate the height and width increments and offsets */
-  /* FIXME: We use up all available width. This will inhibit having multiple 
-     calendars in a row, like win doesn 
+  /* FIXME: We use up all available width. This will inhibit having multiple
+     calendars in a row, like win doesn
   */
   if(dwStyle & MCS_WEEKNUMBERS)
     xdiv=8.0;
   else
     xdiv=7.0;
-  infoPtr->width_increment = (infoPtr->rcDraw.right - infoPtr->rcDraw.left) / xdiv; 
-  infoPtr->height_increment = (infoPtr->rcDraw.bottom - infoPtr->rcDraw.top) / 10.0; 
+  infoPtr->width_increment = (infoPtr->rcDraw.right - infoPtr->rcDraw.left) / xdiv;
+  infoPtr->height_increment = (infoPtr->rcDraw.bottom - infoPtr->rcDraw.top) / 10.0;
   infoPtr->left_offset = (infoPtr->rcDraw.right - infoPtr->rcDraw.left) - (infoPtr->width_increment * xdiv);
   infoPtr->top_offset = (infoPtr->rcDraw.bottom - infoPtr->rcDraw.top) - (infoPtr->height_increment * 10.0);
 
@@ -1790,7 +1790,7 @@
   /*if((rcDraw->top + 9 * infoPtr->textHeight + 5) < rcDraw->bottom) {
     rcDraw->bottom = rcDraw->top + 9 * infoPtr->textHeight + 5;
     }*/
-   
+
   /* calculate title area */
   title->top    = rcClient->top;
   title->bottom = title->top + 2 * infoPtr->height_increment;
@@ -1805,17 +1805,17 @@
   prev->right  = prev->left + (title->bottom - title->top) ;
   next->right  = title->right - 6;
   next->left   = next->right - (title->bottom - title->top);
-  
+
   /* titlemonth->left and right change based upon the current month */
   /* and are recalculated in refresh as the current month may change */
   /* without the control being resized */
   titlemonth->top    = titleyear->top    = title->top    + (infoPtr->height_increment)/2;
   titlemonth->bottom = titleyear->bottom = title->bottom - (infoPtr->height_increment)/2;
-  
+
   /* setup the dimensions of the rectangle we draw the names of the */
   /* days of the week in */
   weeknumrect->left =infoPtr->left_offset;
-  if(dwStyle & MCS_WEEKNUMBERS)  
+  if(dwStyle & MCS_WEEKNUMBERS)
     weeknumrect->right=prev->right;
   else
     weeknumrect->right=weeknumrect->left;
@@ -1823,16 +1823,16 @@
   wdays->right  = days->right  = wdays->left + 7 * infoPtr->width_increment;
   wdays->top    = title->bottom ;
   wdays->bottom = wdays->top + infoPtr->height_increment;
-  
+
   days->top    = weeknumrect->top = wdays->bottom ;
   days->bottom = weeknumrect->bottom = days->top     + 6 * infoPtr->height_increment;
-  
+
   todayrect->left   = rcClient->left;
   todayrect->right  = rcClient->right;
   todayrect->top    = days->bottom;
   todayrect->bottom = days->bottom + infoPtr->height_increment;
 
-  /* uncomment for excessive debugging 
+  /* uncomment for excessive debugging
   TRACE("dx=%d dy=%d rcC[%d %d %d %d] t[%d %d %d %d] wd[%d %d %d %d] w[%d %d %d %d] t[%d %d %d %d]\n",
 	infoPtr->width_increment,infoPtr->height_increment,
 	 rcClient->left, rcClient->right, rcClient->top, rcClient->bottom,
@@ -1841,9 +1841,9 @@
 	     days->left,     days->right,     days->top,     days->bottom,
 	todayrect->left,todayrect->right,todayrect->top,todayrect->bottom);
   */
-  
+
   /* restore the originally selected font */
-  SelectObject(hdc, currentFont);     
+  SelectObject(hdc, currentFont);
 
   ReleaseDC(hwnd, hdc);
 }
@@ -1896,7 +1896,7 @@
   MONTHCAL_CopyTime(&infoPtr->todaysDate, &infoPtr->maxDate);
   infoPtr->maxSelCount  = 7;
   infoPtr->monthRange = 3;
-  infoPtr->monthdayState = COMCTL32_Alloc 
+  infoPtr->monthdayState = COMCTL32_Alloc
                          (infoPtr->monthRange * sizeof(MONTHDAYSTATE));
   infoPtr->titlebk     = GetSysColor(COLOR_ACTIVECAPTION);
   infoPtr->titletxt    = GetSysColor(COLOR_WINDOW);
@@ -2054,7 +2054,7 @@
   wndClass.hCursor       = LoadCursorA(0, IDC_ARROWA);
   wndClass.hbrBackground = (HBRUSH)(COLOR_WINDOW + 1);
   wndClass.lpszClassName = MONTHCAL_CLASSA;
- 
+
   RegisterClassA(&wndClass);
 }
 
diff --git a/dlls/comctl32/nativefont.c b/dlls/comctl32/nativefont.c
index bc9e4f8..2202adc 100644
--- a/dlls/comctl32/nativefont.c
+++ b/dlls/comctl32/nativefont.c
@@ -123,7 +123,7 @@
     wndClass.hCursor       = LoadCursorA (0, IDC_ARROWA);
     wndClass.hbrBackground = (HBRUSH)(COLOR_WINDOW + 1);
     wndClass.lpszClassName = WC_NATIVEFONTCTLA;
- 
+
     RegisterClassA (&wndClass);
 }
 
diff --git a/dlls/comctl32/pager.c b/dlls/comctl32/pager.c
index fa4a1bb..1581dc8 100644
--- a/dlls/comctl32/pager.c
+++ b/dlls/comctl32/pager.c
@@ -44,7 +44,7 @@
     INT    nButtonSize;/* size of the pager btns */
     INT    nPos;       /* scroll position */
     INT    nWidth;     /* from child wnd's response to PGN_CALCSIZE */
-    INT    nHeight;    /* from child wnd's response to PGN_CALCSIZE */ 
+    INT    nHeight;    /* from child wnd's response to PGN_CALCSIZE */
     BOOL   bForward;   /* forward WM_MOUSEMOVE msgs to the contained wnd */
     BOOL   bCapture;   /* we have captured the mouse  */
     INT    TLbtnState; /* state of top or left btn */
@@ -63,7 +63,7 @@
 #define INITIAL_DELAY    500
 #define REPEAT_DELAY     50
 
-/* the horizontal arrows are: 
+/* the horizontal arrows are:
  *
  * 01234    01234
  * 1  *      *
@@ -72,7 +72,7 @@
  * 4***      ***
  * 5 **      **
  * 6  *      *
- * 7  
+ * 7
  *
  */
 static void
@@ -115,10 +115,10 @@
     DeleteObject( hPen );
 }
 
-/* the vertical arrows are: 
+/* the vertical arrows are:
  *
  * 01234567    01234567
- * 1******        **  
+ * 1******        **
  * 2 ****        ****
  * 3  **        ******
  * 4
@@ -175,14 +175,14 @@
         return;
 
     if ((rc.right - rc.left <= 0) || (rc.bottom - rc.top <= 0))
-        return;  
+        return;
 
     hBrush = CreateSolidBrush(clrBk);
     hOldBrush = (HBRUSH)SelectObject(hdc, hBrush);
 
     FillRect(hdc, &rc, hBrush);
 
-    if (btnState == PGF_HOT) 
+    if (btnState == PGF_HOT)
     {
        DrawEdge( hdc, &rc, BDR_RAISEDINNER, BF_RECT);
        if (horz)
@@ -190,7 +190,7 @@
        else
            PAGER_DrawVertArrow(hdc, rc, COLOR_WINDOWFRAME, topLeft);
     }
-    else if (btnState == PGF_NORMAL) 
+    else if (btnState == PGF_NORMAL)
     {
        DrawEdge (hdc, &rc, BDR_OUTER, BF_FLAT);
        if (horz)
@@ -198,7 +198,7 @@
        else
            PAGER_DrawVertArrow(hdc, rc, COLOR_WINDOWFRAME, topLeft);
     }
-    else if (btnState == PGF_DEPRESSED) 
+    else if (btnState == PGF_DEPRESSED)
     {
        DrawEdge( hdc, &rc, BDR_SUNKENOUTER, BF_RECT);
        if (horz)
@@ -206,7 +206,7 @@
        else
            PAGER_DrawVertArrow(hdc, rc, COLOR_WINDOWFRAME, topLeft);
     }
-    else if (btnState == PGF_GRAYED) 
+    else if (btnState == PGF_GRAYED)
     {
        DrawEdge (hdc, &rc, BDR_OUTER, BF_FLAT);
        if (horz)
@@ -246,7 +246,7 @@
     /* Make sure tracking is enabled so we receive a WM_MOUSELEAVE message */
     if(!(trackinfo.dwFlags & TME_LEAVE)) {
 	trackinfo.dwFlags = TME_LEAVE; /* notify upon leaving */
- 
+
 	/* call TRACKMOUSEEVENT so we receive a WM_MOUSELEAVE message */
 	/* and can properly deactivate the hot button */
 	_TrackMouseEvent(&trackinfo);
@@ -270,7 +270,7 @@
 static inline LRESULT
 PAGER_GetButtonState (HWND hwnd, WPARAM wParam, LPARAM lParam)
 {
-    PAGER_INFO *infoPtr = PAGER_GetInfoPtr (hwnd); 
+    PAGER_INFO *infoPtr = PAGER_GetInfoPtr (hwnd);
     LRESULT btnState = PGF_INVISIBLE;
     INT btn = (INT)lParam;
     TRACE("[%08x]\n", hwnd);
@@ -287,7 +287,7 @@
 static inline LRESULT
 PAGER_GetPos(HWND hwnd)
 {
-    PAGER_INFO *infoPtr = PAGER_GetInfoPtr (hwnd); 
+    PAGER_INFO *infoPtr = PAGER_GetInfoPtr (hwnd);
     TRACE("[%08x] returns %d\n", hwnd, infoPtr->nPos);
     return (LRESULT)infoPtr->nPos;
 }
@@ -295,7 +295,7 @@
 static inline LRESULT
 PAGER_GetButtonSize(HWND hwnd)
 {
-    PAGER_INFO *infoPtr = PAGER_GetInfoPtr (hwnd); 
+    PAGER_INFO *infoPtr = PAGER_GetInfoPtr (hwnd);
     TRACE("[%08x] returns %d\n", hwnd, infoPtr->nButtonSize);
     return (LRESULT)infoPtr->nButtonSize;
 }
@@ -303,7 +303,7 @@
 static inline LRESULT
 PAGER_GetBorder(HWND hwnd)
 {
-    PAGER_INFO *infoPtr = PAGER_GetInfoPtr (hwnd); 
+    PAGER_INFO *infoPtr = PAGER_GetInfoPtr (hwnd);
     TRACE("[%08x] returns %d\n", hwnd, infoPtr->nBorder);
     return (LRESULT)infoPtr->nBorder;
 }
@@ -311,13 +311,13 @@
 static inline LRESULT
 PAGER_GetBkColor(HWND hwnd)
 {
-    PAGER_INFO *infoPtr = PAGER_GetInfoPtr (hwnd); 
+    PAGER_INFO *infoPtr = PAGER_GetInfoPtr (hwnd);
     TRACE("[%08x] returns %06lx\n", hwnd, infoPtr->clrBk);
     return (LRESULT)infoPtr->clrBk;
 }
 
-static void 
-PAGER_CalcSize (HWND hwnd, INT* size, BOOL getWidth) 
+static void
+PAGER_CalcSize (HWND hwnd, INT* size, BOOL getWidth)
 {
     NMPGCALCSIZE nmpgcs;
     ZeroMemory (&nmpgcs, sizeof (NMPGCALCSIZE));
@@ -370,7 +370,7 @@
             if (infoPtr->nHeight < wndSize)
                 infoPtr->nHeight = wndSize;
 
-            TRACE("[%08x] SWP %dx%d at (%d,%d)\n", hwnd, 
+            TRACE("[%08x] SWP %dx%d at (%d,%d)\n", hwnd,
                          infoPtr->nWidth, infoPtr->nHeight,
                          0, -nPos);
             SetWindowPos(infoPtr->hwndChild, 0,
@@ -416,7 +416,7 @@
     return scrollRange;
 }
 
-static void 
+static void
 PAGER_GrayAndRestoreBtns(PAGER_INFO* infoPtr, INT scrollRange,
                          BOOL* needsResize, BOOL* needsRepaint)
 {
@@ -453,7 +453,7 @@
 }
 
 
-static void 
+static void
 PAGER_NormalizeBtns(PAGER_INFO* infoPtr, BOOL* needsRepaint)
 {
     if (infoPtr->TLbtnState & (PGF_HOT | PGF_DEPRESSED))
@@ -469,7 +469,7 @@
     }
 }
 
-static void 
+static void
 PAGER_HideGrayBtns(PAGER_INFO* infoPtr, BOOL* needsResize)
 {
     if (infoPtr->TLbtnState == PGF_GRAYED)
@@ -501,16 +501,16 @@
         PAGER_HideGrayBtns(infoPtr, &resizeClient);
 
     if (resizeClient) /* initiate NCCalcSize to resize client wnd */ {
-        SetWindowPos(hwnd, 0,0,0,0,0, 
+        SetWindowPos(hwnd, 0,0,0,0,0,
                      SWP_FRAMECHANGED | SWP_NOSIZE | SWP_NOMOVE |
                      SWP_NOZORDER | SWP_NOACTIVATE);
     }
 
     if (repaintBtns)
-        SendMessageA(hwnd, WM_NCPAINT, 0, 0); 
+        SendMessageA(hwnd, WM_NCPAINT, 0, 0);
 }
 
-static LRESULT  
+static LRESULT
 PAGER_SetPos(HWND hwnd, INT newPos, BOOL fromBtnPress)
 {
     PAGER_INFO *infoPtr = PAGER_GetInfoPtr (hwnd);
@@ -568,7 +568,7 @@
     return 1;
 }
 
-static INT 
+static INT
 PAGER_SetFixedWidth(HWND hwnd, PAGER_INFO* infoPtr)
 {
   /* Must set the non-scrollable dimension to be less than the full height/width
@@ -599,7 +599,7 @@
     return h;
 }
 
-static INT 
+static INT
 PAGER_SetFixedHeight(HWND hwnd, PAGER_INFO* infoPtr)
 {
   /* Must set the non-scrollable dimension to be less than the full height/width
@@ -658,7 +658,7 @@
             infoPtr->nPos = -1;
             PAGER_SetPos(hwnd, 0, FALSE);
         }
-        else 
+        else
         {
             PAGER_UpdateBtns(hwnd, infoPtr, scrollRange, TRUE);
             PAGER_PositionChildWnd(hwnd, infoPtr);
@@ -679,7 +679,7 @@
     TRACE("[%08x] %06lx\n", hwnd, infoPtr->clrBk);
 
     /* the native control seems to do things this way */
-    SetWindowPos(hwnd, 0,0,0,0,0, 
+    SetWindowPos(hwnd, 0,0,0,0,0,
 		 SWP_FRAMECHANGED | SWP_NOSIZE | SWP_NOMOVE |
 		 SWP_NOZORDER | SWP_NOACTIVATE);
 
@@ -734,14 +734,14 @@
         if (PAGER_IsHorizontal(hwnd)) {
             hw = PAGER_SetFixedHeight(hwnd, infoPtr);
 	    /* adjust non-scrollable dimension to fit the child */
-	    SetWindowPos(hwnd, 0, 0,0, hw, infoPtr->nHeight, 
+	    SetWindowPos(hwnd, 0, 0,0, hw, infoPtr->nHeight,
 			 SWP_FRAMECHANGED | SWP_NOMOVE | SWP_NOZORDER |
 			 SWP_NOSIZE | SWP_NOACTIVATE);
 	}
         else {
             hw = PAGER_SetFixedWidth(hwnd, infoPtr);
 	    /* adjust non-scrollable dimension to fit the child */
-	    SetWindowPos(hwnd, 0, 0,0, infoPtr->nWidth, hw, 
+	    SetWindowPos(hwnd, 0, 0,0, infoPtr->nWidth, hw,
 			 SWP_FRAMECHANGED | SWP_NOMOVE | SWP_NOZORDER |
 			 SWP_NOSIZE | SWP_NOACTIVATE);
 	}
@@ -772,8 +772,8 @@
         nmpgScroll.hdr.idFrom   = GetWindowLongA (hwnd, GWL_ID);
         nmpgScroll.hdr.code = PGN_SCROLL;
 
-        GetWindowRect(hwnd, &rcWnd);  
-        GetClientRect(hwnd, &nmpgScroll.rcParent);  
+        GetWindowRect(hwnd, &rcWnd);
+        GetClientRect(hwnd, &nmpgScroll.rcParent);
         nmpgScroll.iXpos = nmpgScroll.iYpos = 0;
         nmpgScroll.iDir = dir;
 
@@ -788,10 +788,10 @@
             nmpgScroll.iYpos = infoPtr->nPos;
         }
         nmpgScroll.iScroll -= 2*infoPtr->nButtonSize;
-  
+
         SendMessageA (GetParent(hwnd), WM_NOTIFY,
                     (WPARAM)nmpgScroll.hdr.idFrom, (LPARAM)&nmpgScroll);
-  
+
         TRACE("[%08x] PGN_SCROLL returns iScroll=%d\n", hwnd, nmpgScroll.iScroll);
 
         if (nmpgScroll.iScroll > 0)
@@ -814,12 +814,12 @@
     PAGER_INFO *infoPtr = PAGER_GetInfoPtr (hwnd);
 
     /* initiate NCCalcSize to resize client wnd and get size */
-    SetWindowPos(hwnd, 0, 0,0,0,0, 
+    SetWindowPos(hwnd, 0, 0,0,0,0,
 		 SWP_FRAMECHANGED | SWP_NOSIZE | SWP_NOMOVE |
 		 SWP_NOZORDER | SWP_NOACTIVATE);
 
-    SetWindowPos(infoPtr->hwndChild, 0, 
-		 0,0,infoPtr->nWidth,infoPtr->nHeight, 
+    SetWindowPos(infoPtr->hwndChild, 0,
+		 0,0,infoPtr->nWidth,infoPtr->nHeight,
 		 0);
 
     return DefWindowProcA (hwnd, EM_FMTLINES, 0, 0);
@@ -890,11 +890,11 @@
 
     /*
      * lParam points to a RECT struct.  On entry, the struct
-     * contains the proposed wnd rectangle for the window. 
+     * contains the proposed wnd rectangle for the window.
      * On exit, the struct should contain the screen
      * coordinates of the corresponding window's client area.
      */
-	
+
     DefWindowProcA (hwnd, WM_NCCALCSIZE, wParam, lParam);
 
     TRACE("orig rect=(%d,%d)-(%d,%d)\n",
@@ -941,7 +941,7 @@
     }
     else
     {
-	/* native does: (from trace of IE4 opening "Favorites" frame) 
+	/* native does: (from trace of IE4 opening "Favorites" frame)
 	 *        DefWindowProc
 	 *        WM_NOITFY  PGN_CALCSIZE w/ dwFlag=2
 	 *        GetWindowRect (child, &rc)
@@ -1003,7 +1003,7 @@
 	    lpRect->bottom = infoPtr->nHeight;
     }
 
-    TRACE("[%08x] client rect set to %dx%d at (%d,%d) BtnState[%d,%d]\n", 
+    TRACE("[%08x] client rect set to %dx%d at (%d,%d) BtnState[%d,%d]\n",
 	  hwnd, lpRect->right-lpRect->left, lpRect->bottom-lpRect->top,
 	  lpRect->left, lpRect->top,
 	  infoPtr->TLbtnState, infoPtr->BRbtnState);
@@ -1046,13 +1046,13 @@
     PAGER_DrawButton(hdc, infoPtr->clrBk, rcTopLeft,
                      bHorizontal, TRUE, infoPtr->TLbtnState);
     PAGER_DrawButton(hdc, infoPtr->clrBk, rcBottomRight,
-                     bHorizontal, FALSE, infoPtr->BRbtnState); 
+                     bHorizontal, FALSE, infoPtr->BRbtnState);
 
     ReleaseDC( hwnd, hdc );
     return 0;
 }
 
-static INT 
+static INT
 PAGER_HitTest (HWND hwnd, LPPOINT pt)
 {
     PAGER_INFO *infoPtr = PAGER_GetInfoPtr (hwnd);
@@ -1145,7 +1145,7 @@
     {
 	PAGER_CaptureandTrack(infoPtr, hwnd);
 
-        SendMessageA(hwnd, WM_NCPAINT, 0, 0); 
+        SendMessageA(hwnd, WM_NCPAINT, 0, 0);
     }
 
     return TRUE;
@@ -1226,7 +1226,7 @@
 	/* If in one of the buttons the capture and draw buttons */
 	if (btnrect) {
 	    TRACE("[%08x] draw btn (%d,%d)-(%d,%d), Capture %s, style %08lx\n",
-		  hwnd, btnrect->left, btnrect->top, 
+		  hwnd, btnrect->left, btnrect->top,
 		  btnrect->right, btnrect->bottom,
 		  (infoPtr->bCapture) ? "TRUE" : "FALSE",
 		  dwStyle);
@@ -1276,7 +1276,7 @@
     INT hit;
 
     TRACE("[%08x] at (%d,%d)\n", hwnd, SLOWORD(lParam), SHIWORD(lParam));
-	
+
     hit = PAGER_HitTest(hwnd, &pt);
 
     /* put btn in DEPRESSED state */
@@ -1284,17 +1284,17 @@
     {
         repaintBtns = infoPtr->TLbtnState != PGF_DEPRESSED;
         infoPtr->TLbtnState = PGF_DEPRESSED;
-        SetTimer(hwnd, TIMERID1, INITIAL_DELAY, 0); 
+        SetTimer(hwnd, TIMERID1, INITIAL_DELAY, 0);
     }
     else if (hit == HTRIGHT || hit == HTBOTTOM)
     {
         repaintBtns = infoPtr->BRbtnState != PGF_DEPRESSED;
         infoPtr->BRbtnState = PGF_DEPRESSED;
-        SetTimer(hwnd, TIMERID1, INITIAL_DELAY, 0); 
+        SetTimer(hwnd, TIMERID1, INITIAL_DELAY, 0);
     }
 
     if (repaintBtns)
-        SendMessageA(hwnd, WM_NCPAINT, 0, 0); 
+        SendMessageA(hwnd, WM_NCPAINT, 0, 0);
 
     switch(hit)
     {
@@ -1357,11 +1357,11 @@
     /* if initial timer, kill it and start the repeat timer */
     if (wParam == TIMERID1) {
 	if (PAGER_IsHorizontal(hwnd)) {
-	    dir = (infoPtr->TLbtnState & PGF_DEPRESSED) ? 
+	    dir = (infoPtr->TLbtnState & PGF_DEPRESSED) ?
 		PGF_SCROLLLEFT : PGF_SCROLLRIGHT;
 	}
 	else {
-	    dir = (infoPtr->TLbtnState & PGF_DEPRESSED) ? 
+	    dir = (infoPtr->TLbtnState & PGF_DEPRESSED) ?
 		PGF_SCROLLUP : PGF_SCROLLDOWN;
 	}
 	TRACE("[%08x] TIMERID1: style=%08lx, dir=%d\n", hwnd, dwStyle, dir);
@@ -1369,7 +1369,7 @@
 	SetTimer(hwnd, TIMERID1, REPEAT_DELAY, 0);
 	if (dwStyle & PGS_AUTOSCROLL) {
 	    PAGER_Scroll(hwnd, dir);
-	    SetWindowPos(hwnd, 0,0,0,0,0, 
+	    SetWindowPos(hwnd, 0,0,0,0,0,
 			 SWP_FRAMECHANGED | SWP_NOSIZE | SWP_NOMOVE |
 			 SWP_NOZORDER | SWP_NOACTIVATE);
 	}
@@ -1381,7 +1381,7 @@
     KillTimer(hwnd, TIMERID2);
     if (infoPtr->direction > 0) {
 	PAGER_Scroll(hwnd, infoPtr->direction);
-	SetTimer(hwnd, TIMERID2, REPEAT_DELAY, 0);	    
+	SetTimer(hwnd, TIMERID2, REPEAT_DELAY, 0);
     }
     return 0;
 }
@@ -1485,7 +1485,7 @@
 
         case PGM_RECALCSIZE:
             return PAGER_RecalcSize(hwnd);
-    
+
         case PGM_SETBKCOLOR:
             return PAGER_SetBkColor (hwnd, wParam, lParam);
 
@@ -1536,7 +1536,7 @@
             return PAGER_MouseMove (hwnd, wParam, lParam);
 
         case WM_MOUSELEAVE:
-            return PAGER_MouseLeave (hwnd, wParam, lParam);	
+            return PAGER_MouseLeave (hwnd, wParam, lParam);
 
         case WM_NCLBUTTONDOWN:
             return PAGER_NCLButtonDown (hwnd, wParam, lParam);
@@ -1552,7 +1552,7 @@
             return PAGER_EraseBackground (hwnd, wParam, lParam);
 /*
         case WM_PAINT:
-            return PAGER_Paint (hwnd, wParam); 
+            return PAGER_Paint (hwnd, wParam);
 */
         case WM_TIMER:
 	    return PAGER_Timer (hwnd, wParam);
@@ -1582,7 +1582,7 @@
     wndClass.hCursor       = LoadCursorA (0, IDC_ARROWA);
     wndClass.hbrBackground = 0;
     wndClass.lpszClassName = WC_PAGESCROLLERA;
- 
+
     RegisterClassA (&wndClass);
 }
 
diff --git a/dlls/comctl32/progress.c b/dlls/comctl32/progress.c
index 9b83fef..5f9aee3 100644
--- a/dlls/comctl32/progress.c
+++ b/dlls/comctl32/progress.c
@@ -1,4 +1,4 @@
-/*		
+/*
  * Progress control
  *
  * Copyright 1997, 2002 Dimitrie O. Paun
@@ -44,7 +44,7 @@
 
 #define UNKNOWN_PARAM(msg, wParam, lParam) WARN(       \
    "Unknown parameter(s) for message " #msg            \
-   "(%04x): wp=%04x lp=%08lx\n", msg, wParam, lParam); 
+   "(%04x): wp=%04x lp=%08lx\n", msg, wParam, lParam);
 
 /***********************************************************************
  * PROGRESS_EraseBackground
@@ -103,14 +103,14 @@
 
     /* compute extent of progress bar */
     if (dwStyle & PBS_VERTICAL) {
-        rightBar  = rect.bottom - 
+        rightBar  = rect.bottom -
                     MulDiv (infoPtr->CurVal - infoPtr->MinVal,
 	                    rect.bottom - rect.top,
 	                    infoPtr->MaxVal - infoPtr->MinVal);
         ledWidth  = MulDiv (rect.right - rect.left, 2, 3);
         rightMost = rect.top;
     } else {
-        rightBar = rect.left + 
+        rightBar = rect.left +
                    MulDiv (infoPtr->CurVal - infoPtr->MinVal,
 	                   rect.right - rect.left,
 	                   infoPtr->MaxVal - infoPtr->MinVal);
@@ -120,14 +120,14 @@
 
     /* now draw the bar */
     if (dwStyle & PBS_SMOOTH) {
-        if (dwStyle & PBS_VERTICAL) 
+        if (dwStyle & PBS_VERTICAL)
 	    rect.top = rightBar;
-        else 
+        else
 	    rect.right = rightBar;
         FillRect(hdc, &rect, hbrBar);
     } else {
         if (dwStyle & PBS_VERTICAL) {
-            while(rect.bottom > rightBar) { 
+            while(rect.bottom > rightBar) {
                 rect.top = rect.bottom - ledWidth;
                 if (rect.top < rightMost)
                     rect.top = rightMost;
@@ -135,7 +135,7 @@
                 rect.bottom = rect.top - LED_GAP;
             }
         } else {
-            while(rect.left < rightBar) { 
+            while(rect.left < rightBar) {
                 rect.right = rect.left + ledWidth;
                 if (rect.right > rightMost)
                     rect.right = rightMost;
@@ -200,7 +200,7 @@
 
     /* if nothing changes, simply return */
     if(infoPtr->MinVal == low && infoPtr->MaxVal == high) return res;
-    
+
     infoPtr->MinVal = low;
     infoPtr->MaxVal = high;
     PROGRESS_CoercePos(infoPtr);
@@ -210,7 +210,7 @@
 /***********************************************************************
  *           ProgressWindowProc
  */
-static LRESULT WINAPI ProgressWindowProc(HWND hwnd, UINT message, 
+static LRESULT WINAPI ProgressWindowProc(HWND hwnd, UINT message,
                                   WPARAM wParam, LPARAM lParam)
 {
     PROGRESS_INFO *infoPtr;
@@ -220,7 +220,7 @@
     infoPtr = (PROGRESS_INFO *)GetWindowLongW(hwnd, 0);
 
     if (!infoPtr && message != WM_CREATE)
-        return DefWindowProcW( hwnd, message, wParam, lParam ); 
+        return DefWindowProcW( hwnd, message, wParam, lParam );
 
     switch(message) {
     case WM_CREATE:
@@ -240,9 +240,9 @@
 
         /* initialize the info struct */
         infoPtr->Self = hwnd;
-        infoPtr->MinVal = 0; 
+        infoPtr->MinVal = 0;
         infoPtr->MaxVal = 100;
-        infoPtr->CurVal = 0; 
+        infoPtr->CurVal = 0;
         infoPtr->Step = 10;
         infoPtr->ColorBar = CLR_DEFAULT;
         infoPtr->ColorBk = CLR_DEFAULT;
@@ -250,7 +250,7 @@
         TRACE("Progress Ctrl creation, hwnd=%04x\n", hwnd);
         return 0;
     }
-    
+
     case WM_DESTROY:
         TRACE("Progress Ctrl destruction, hwnd=%04x\n", hwnd);
         COMCTL32_Free (infoPtr);
@@ -260,7 +260,7 @@
     case WM_ERASEBKGND:
 	PROGRESS_EraseBackground(infoPtr, wParam);
         return TRUE;
-	
+
     case WM_GETFONT:
         return (LRESULT)infoPtr->Font;
 
@@ -269,7 +269,7 @@
 
     case WM_PAINT:
         return PROGRESS_Paint (infoPtr, (HDC)wParam);
-    
+
     case PBM_DELTAPOS:
     {
 	INT oldVal;
@@ -301,7 +301,7 @@
         }
         return oldVal;
     }
-      
+
     case PBM_SETRANGE:
         if (wParam) UNKNOWN_PARAM(PBM_SETRANGE, wParam, lParam);
         return PROGRESS_SetRange (infoPtr, (int)LOWORD(lParam), (int)HIWORD(lParam));
@@ -319,7 +319,7 @@
     {
 	INT oldVal;
         if (wParam || lParam) UNKNOWN_PARAM(PBM_STEPIT, wParam, lParam);
-        oldVal = infoPtr->CurVal;   
+        oldVal = infoPtr->CurVal;
         infoPtr->CurVal += infoPtr->Step;
         if(infoPtr->CurVal > infoPtr->MaxVal)
 	    infoPtr->CurVal = infoPtr->MinVal;
@@ -335,7 +335,7 @@
 
     case PBM_SETRANGE32:
         return PROGRESS_SetRange (infoPtr, (int)wParam, (int)lParam);
-    
+
     case PBM_GETRANGE:
         if (lParam) {
             ((PPBRANGE)lParam)->iLow = infoPtr->MinVal;
@@ -359,11 +359,11 @@
 	InvalidateRect(hwnd, NULL, TRUE);
 	return 0;
 
-    default: 
-        if (message >= WM_USER) 
+    default:
+        if (message >= WM_USER)
 	    ERR("unknown msg %04x wp=%04x lp=%08lx\n", message, wParam, lParam );
-        return DefWindowProcW( hwnd, message, wParam, lParam ); 
-    } 
+        return DefWindowProcW( hwnd, message, wParam, lParam );
+    }
 }
 
 
diff --git a/dlls/comctl32/propsheet.c b/dlls/comctl32/propsheet.c
index ae3e929..60ad2cd 100644
--- a/dlls/comctl32/propsheet.c
+++ b/dlls/comctl32/propsheet.c
@@ -88,7 +88,7 @@
  * Defines and global variables
  */
 
-const WCHAR PropSheetInfoStr[] = 
+const WCHAR PropSheetInfoStr[] =
     {'P','r','o','p','e','r','t','y','S','h','e','e','t','I','n','f','o',0 };
 
 #define MAX_CAPTION_LENGTH 255
@@ -442,7 +442,7 @@
     default:
       p += lstrlenW( (LPCWSTR)p ) + 1;
       break;
-  } 
+  }
 
   /* class */
   switch ((WORD)*p)
@@ -491,14 +491,14 @@
   /*
    * Build the image list for icons
    */
-  if ((dwFlags & PSP_USEHICON) || (dwFlags & PSP_USEICONID)) 
+  if ((dwFlags & PSP_USEHICON) || (dwFlags & PSP_USEICONID))
   {
     HICON hIcon;
     int icon_cx = GetSystemMetrics(SM_CXSMICON);
     int icon_cy = GetSystemMetrics(SM_CYSMICON);
 
     if (dwFlags & PSP_USEICONID)
-      hIcon = LoadImageW(lppsp->hInstance, lppsp->u2.pszIcon, IMAGE_ICON, 
+      hIcon = LoadImageW(lppsp->hInstance, lppsp->u2.pszIcon, IMAGE_ICON,
                          icon_cx, icon_cy, LR_DEFAULTCOLOR);
     else
       hIcon = lppsp->u2.hIcon;
@@ -577,7 +577,7 @@
 
 /******************************************************************************
  *            PROPSHEET_SizeMismatch
- * 
+ *
  *     Verify that the tab control and the "largest" property sheet page dlg. template
  *     match in size.
  */
@@ -701,7 +701,7 @@
       rc.bottom = rc.top + tabRect.bottom - tabRect.top;
       psInfo->height = MulDiv((rc.bottom - rc.top),8,units.top);
   }
-  
+
   if ((rc.right - rc.left) < (tabRect.right - tabRect.left))
   {
       rc.right = rc.left + tabRect.right - tabRect.left;
@@ -778,7 +778,7 @@
       rc.bottom = rc.top + tabRect.bottom - tabRect.top;
       psInfo->height = MulDiv((rc.bottom - rc.top), 8, units.top);
   }
-  
+
   if ((rc.right - rc.left) < (tabRect.right - tabRect.left))
   {
       rc.right = rc.left + tabRect.right - tabRect.left;
@@ -828,10 +828,10 @@
 
   /*
    * Get the size of the property sheet.
-   */ 
+   */
   GetClientRect(hwndParent, &rcSheet);
 
-  /* 
+  /*
    * All buttons will be at this y coordinate.
    */
   y = rcSheet.bottom - (padding.y + buttonHeight);
@@ -867,7 +867,7 @@
       x = rcSheet.right - ((padding.x + buttonWidth) * 2);
     else
       x = rcSheet.right - (padding.x + buttonWidth);
-  
+
     SetWindowPos(hwndButton, 0, x, y, 0, 0,
                  SWP_NOSIZE | SWP_NOZORDER | SWP_NOACTIVATE);
 
@@ -884,7 +884,7 @@
   if (psInfo->hasHelp)
   {
     x = rcSheet.right - (padding.x + buttonWidth);
-  
+
     SetWindowPos(hwndButton, 0, x, y, 0, 0,
                  SWP_NOSIZE | SWP_NOZORDER | SWP_NOACTIVATE);
   }
@@ -1063,7 +1063,7 @@
 	idButton = IDCANCEL;
     }
   }
-  
+
   hwndControl = GetDlgItem(hwndDlg, idButton);
   GetWindowRect(hwndControl, &rc);
 
@@ -1325,7 +1325,7 @@
   psn.hdr.hwndFrom = hwndDlg;
   psn.hdr.idFrom   = 0;
   psn.lParam       = 0;
- 
+
   hwndPage = psInfo->proppage[psInfo->active_page].hwndPage;
 
   result = SendMessageW(hwndPage, WM_NOTIFY, 0, (LPARAM) &psn);
@@ -1364,7 +1364,7 @@
   psn.hdr.hwndFrom = hwndDlg;
   psn.hdr.idFrom   = 0;
   psn.lParam       = 0;
- 
+
   hwndPage = psInfo->proppage[psInfo->active_page].hwndPage;
 
   msgResult = SendMessageA(hwndPage, WM_NOTIFY, 0, (LPARAM) &psn);
@@ -1403,7 +1403,7 @@
   psn.hdr.hwndFrom = hwndDlg;
   psn.hdr.idFrom   = 0;
   psn.lParam       = 0;
- 
+
   hwndPage = psInfo->proppage[psInfo->active_page].hwndPage;
 
   msgResult = SendMessageW(hwndPage, WM_NOTIFY, 0, (LPARAM) &psn);
@@ -1440,7 +1440,7 @@
   psn.hdr.hwndFrom = hwndDlg;
   psn.hdr.idFrom   = 0;
   psn.lParam       = 0;
- 
+
 
   /*
    * Send PSN_KILLACTIVE to the current page.
@@ -1457,7 +1457,7 @@
    */
   psn.hdr.code = PSN_APPLY;
   psn.lParam   = lParam;
- 
+
   for (i = 0; i < psInfo->nPages; i++)
   {
     hwndPage = psInfo->proppage[i].hwndPage;
@@ -1504,13 +1504,13 @@
   psn.hdr.hwndFrom = hwndDlg;
   psn.hdr.idFrom   = 0;
   psn.lParam       = 0;
- 
+
   if (SendMessageA(hwndPage, WM_NOTIFY, 0, (LPARAM) &psn))
     return;
 
   psn.hdr.code = PSN_RESET;
   psn.lParam   = lParam;
- 
+
   for (i = 0; i < psInfo->nPages; i++)
   {
     hwndPage = psInfo->proppage[i].hwndPage;
@@ -1547,7 +1547,7 @@
   psn.hdr.hwndFrom = hwndDlg;
   psn.hdr.idFrom   = 0;
   psn.lParam       = 0;
- 
+
   SendMessageA(hwndPage, WM_NOTIFY, 0, (LPARAM) &psn);
 }
 
@@ -1649,7 +1649,7 @@
 
 
 /*************************************************************************
- * BOOL PROPSHEET_CanSetCurSel [Internal] 
+ * BOOL PROPSHEET_CanSetCurSel [Internal]
  *
  * Test whether the current page can be changed by sending a PSN_KILLACTIVE
  *
@@ -1778,7 +1778,7 @@
   if(HIWORD(lpszText))
   {
      WCHAR szTitle[256];
-     MultiByteToWideChar(CP_ACP, 0, lpszText, -1, 
+     MultiByteToWideChar(CP_ACP, 0, lpszText, -1,
 			     szTitle, sizeof szTitle);
      PROPSHEET_SetTitleW(hwndDlg, dwStyle, szTitle);
   }
@@ -1798,7 +1798,7 @@
 
   TRACE("'%s' (style %08lx)\n", debugstr_w(lpszText), dwStyle);
   if (HIWORD(lpszText) == 0) {
-    if (!LoadStringW(psInfo->ppshheader.hInstance, 
+    if (!LoadStringW(psInfo->ppshheader.hInstance,
                      LOWORD(lpszText), szTitle, sizeof(szTitle)-sizeof(WCHAR)))
       return;
     lpszText = szTitle;
@@ -2020,14 +2020,14 @@
 
      DestroyPropertySheetPage(psInfo->proppage[index].hpage);
   }
- 
+
   /* Remove the tab */
   SendMessageW(hwndTabControl, TCM_DELETEITEM, index, 0);
 
   psInfo->nPages--;
   psInfo->proppage = COMCTL32_Alloc(sizeof(PropPageInfo) * psInfo->nPages);
 
-  if (index > 0)  
+  if (index > 0)
     memcpy(&psInfo->proppage[0], &oldPages[0], index * sizeof(PropPageInfo));
 
   if (index < psInfo->nPages)
@@ -2256,16 +2256,16 @@
 
   if ( !(ppsp->dwFlags & PSP_DLGINDIRECT) && HIWORD( ppsp->u.pszTemplate ) )
   {
-      PROPSHEET_AtoW(&ppsp->u.pszTemplate, lpPropSheetPage->u.pszTemplate); 
+      PROPSHEET_AtoW(&ppsp->u.pszTemplate, lpPropSheetPage->u.pszTemplate);
   }
   if ( (ppsp->dwFlags & PSP_USEICONID) && HIWORD( ppsp->u2.pszIcon ) )
   {
-      PROPSHEET_AtoW(&ppsp->u2.pszIcon, lpPropSheetPage->u2.pszIcon); 
+      PROPSHEET_AtoW(&ppsp->u2.pszIcon, lpPropSheetPage->u2.pszIcon);
   }
 
   if ((ppsp->dwFlags & PSP_USETITLE) && HIWORD( ppsp->pszTitle ))
   {
-      PROPSHEET_AtoW(&ppsp->pszTitle, lpPropSheetPage->pszTitle); 
+      PROPSHEET_AtoW(&ppsp->pszTitle, lpPropSheetPage->pszTitle);
   }
   else if ( !(ppsp->dwFlags & PSP_USETITLE) )
       ppsp->pszTitle = NULL;
@@ -2455,7 +2455,7 @@
 BOOL WINAPI
 PROPSHEET_DialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
 {
-  TRACE("hwnd=%x msg=%x wparam=%x lparam=%lx\n", 
+  TRACE("hwnd=%x msg=%x wparam=%x lparam=%lx\n",
 	hwnd, uMsg, wParam, lParam);
 
   switch (uMsg)
@@ -2471,8 +2471,8 @@
       SetPropW(hwnd, PropSheetInfoStr, (HANDLE)psInfo);
 
       /*
-       * psInfo->hwnd is not being used by WINE code - it exists 
-       * for compatibility with "real" Windoze. The same about 
+       * psInfo->hwnd is not being used by WINE code - it exists
+       * for compatibility with "real" Windoze. The same about
        * SetWindowLong - WINE is only using the PropSheetInfoStr
        * property.
        */
@@ -2500,7 +2500,7 @@
 
         SendMessageW(hwnd, WM_SETICON, 0, hIcon);
       }
-      
+
       if (psInfo->ppshheader.dwFlags & PSH_USEHICON)
         SendMessageW(hwnd, WM_SETICON, 0, psInfo->ppshheader.u.hIcon);
 
@@ -2527,14 +2527,14 @@
         }
       }
 
-      if (psInfo->useCallback) 
-             (*(psInfo->ppshheader.pfnCallback))(hwnd, 
-					      PSCB_INITIALIZED, (LPARAM)0); 
+      if (psInfo->useCallback)
+             (*(psInfo->ppshheader.pfnCallback))(hwnd,
+					      PSCB_INITIALIZED, (LPARAM)0);
 
       idx = psInfo->active_page;
       ppshpage = (LPCPROPSHEETPAGEW)psInfo->proppage[idx].hpage;
       psInfo->active_page = -1;
- 
+
       PROPSHEET_SetCurSel(hwnd, idx, 1, psInfo->proppage[idx].hpage);
 
       /* doing TCM_SETCURSEL seems to be needed even in case of PSH_WIZARD,
@@ -2547,7 +2547,7 @@
       {
          WCHAR szText[256];
 
-         if (LoadStringW(psInfo->ppshheader.hInstance, 
+         if (LoadStringW(psInfo->ppshheader.hInstance,
                  (UINT)psInfo->ppshheader.pszCaption, szText, 255))
             PROPSHEET_SetTitleW(hwnd, psInfo->ppshheader.dwFlags, szText);
       }
@@ -2649,7 +2649,7 @@
       EnableWindow(hwndCancel, FALSE);
       if (LoadStringW(COMCTL32_hModule, IDS_CLOSE, buf, sizeof(buf)))
          SetWindowTextW(hwndOK, buf);
- 
+
       return FALSE;
     }
 
@@ -2664,7 +2664,7 @@
 
     case PSM_REBOOTSYSTEM:
     {
-      PropSheetInfo* psInfo = (PropSheetInfo*) GetPropW(hwnd, 
+      PropSheetInfo* psInfo = (PropSheetInfo*) GetPropW(hwnd,
                                                         PropSheetInfoStr);
 
       psInfo->rebootSystem = TRUE;
@@ -2674,7 +2674,7 @@
     case PSM_SETTITLEA:
       PROPSHEET_SetTitleA(hwnd, (DWORD) wParam, (LPCSTR) lParam);
       return TRUE;
-   
+
     case PSM_SETTITLEW:
       PROPSHEET_SetTitleW(hwnd, (DWORD) wParam, (LPCWSTR) lParam);
       return TRUE;
@@ -2730,7 +2730,7 @@
       return TRUE;
 
     case PSM_SETFINISHTEXTA:
-      PROPSHEET_SetFinishTextA(hwnd, (LPCSTR) lParam);        
+      PROPSHEET_SetFinishTextA(hwnd, (LPCSTR) lParam);
       return TRUE;
 
     case PSM_SETWIZBUTTONS:
@@ -2742,13 +2742,13 @@
         return FALSE;
 
     case PSM_SETFINISHTEXTW:
-        PROPSHEET_SetFinishTextW(hwnd, (LPCWSTR) lParam);        
+        PROPSHEET_SetFinishTextW(hwnd, (LPCWSTR) lParam);
         return FALSE;
 
     default:
       return FALSE;
   }
-  
+
   return FALSE;
 }
 
diff --git a/dlls/comctl32/rebar.c b/dlls/comctl32/rebar.c
index 94d934e..afe9431 100644
--- a/dlls/comctl32/rebar.c
+++ b/dlls/comctl32/rebar.c
@@ -46,7 +46,7 @@
  * TODO:
  *   - vertical placement
  *   - ComboBox and ComboBoxEx placement
- *   - center image 
+ *   - center image
  *   - Layout code.
  *   - Display code.
  *   - Some messages.
@@ -55,11 +55,11 @@
  * Changes Guy Albertelli <galberte@neo.lrun.com>
  *  rev 2,3,4
  *   - Implement initial version of row grouping, row separators,
- *     text and background colors. Support additional messages. 
+ *     text and background colors. Support additional messages.
  *     Support RBBS_BREAK. Implement ERASEBKGND and improve painting.
  *  rev 5
  *   - implement support for dragging Gripper left or right in a row. Supports
- *     WM_LBUTTONDOWN, WM_LBUTTONUP, and WM_MOUSEMOVE. Also support 
+ *     WM_LBUTTONDOWN, WM_LBUTTONUP, and WM_MOUSEMOVE. Also support
  *     RBS_BANDBORDERS.
  *  rev 6
  *   - Fix or implement notifications for RBN_HEIGHTCHANGE, RBN_CHILDSIZE.
@@ -68,7 +68,7 @@
  *
  * rev 7
  *   - Fix algorithm for _Layout and _AdjustBand.
- *   - Fix or implement RBN_ENDDRAG, RB_MOVEBAND, WM_SETREDRAW, 
+ *   - Fix or implement RBN_ENDDRAG, RB_MOVEBAND, WM_SETREDRAW,
  *     WM_STYLECHANGED, RB_MINIMIZEBAND, RBBS_VARIABLEHEIGHT, RBS_VARHEIGHT,
  *     RBBS_HIDDEN, WM_NOTIFYFORMAT, NM_NCHITTEST, WM_SETREDRAW, RBS_AUTOSIZE,
  *     WM_SETFONT, RBS_BORDERS
@@ -87,7 +87,7 @@
  *  7. Invalidate window rectangles after SetBandInfo, InsertBand, ShowBand
  *     so that repainting is correct.
  *  8. Implement RB_MAXIMIZEBAND for the "ideal=TRUE" case.
- *  9. Implement item custom draw notifications partially. Only done for 
+ *  9. Implement item custom draw notifications partially. Only done for
  *     ITEMPREPAINT and ITEMPOSTPAINT. (Used by IE4 for "Favorites" frame
  *     to draw the word "Favorites").
  * rev 8a
@@ -96,7 +96,7 @@
  *     number (0) to indicate *no* band.
  * 12. Fix CCS_VERT errors in _ForceResize, _NCCalcSize, and _NCPaint.
  * 13. Support some special cases of CCS_TOP (and therefore CCS_LEFT),
- *     CCS_BOTTOM (and therefore CCS_RIGHT) and CCS_NOPARENTALIGN. Not 
+ *     CCS_BOTTOM (and therefore CCS_RIGHT) and CCS_NOPARENTALIGN. Not
  *     at all sure whether this is all cases.
  * 14. Handle returned value for the RBN_CHILDSIZE notify.
  * 15. Implement RBBS_CHILDEDGE, and set each bands "offChild" at _Layout
@@ -121,10 +121,10 @@
  *  2. Following still not handled: RBBS_FIXEDBMP,
  *            RBBS_USECHEVRON, CCS_NORESIZE,
  *            CCS_NOMOVEX, CCS_NOMOVEY
- *  3. Following are only partially handled: 
+ *  3. Following are only partially handled:
  *            RBS_AUTOSIZE, RBBS_VARIABLEHEIGHT
  *  5. Native uses (on each draw!!) SM_CYBORDER (or SM_CXBORDER for CCS_VERT)
- *     to set the size of the separator width (the value SEP_WIDTH_SIZE 
+ *     to set the size of the separator width (the value SEP_WIDTH_SIZE
  *     in here). Should be fixed!!
  *  6. The following messages are not implemented:
  *        RB_BEGINDRAG, RB_DRAGMOVE, RB_ENDDRAG, RB_GETCOLORSCHEME,
@@ -236,7 +236,7 @@
     BOOL     bUnicode;    /* TRUE if this window is W type */
     BOOL     NtfUnicode;  /* TRUE if parent wants notify in W format */
     BOOL     DoRedraw;    /* TRUE to acutally draw bands */
-    UINT     fStatus;     /* Status flags (see below)  */ 
+    UINT     fStatus;     /* Status flags (see below)  */
     HCURSOR  hcurArrow;   /* handle to the arrow cursor */
     HCURSOR  hcurHorz;    /* handle to the EW cursor */
     HCURSOR  hcurVert;    /* handle to the NS cursor */
@@ -400,7 +400,7 @@
 {
     if( !TRACE_ON(rebar) ) return;
     TRACE("band info: ID=%u, size=%u, child=%04x, clrF=0x%06lx, clrB=0x%06lx\n",
-	  pB->wID, pB->cbSize, pB->hwndChild, pB->clrFore, pB->clrBack); 
+	  pB->wID, pB->cbSize, pB->hwndChild, pB->clrFore, pB->clrBack);
     TRACE("band info: mask=0x%08x (%s)\n", pB->fMask, REBAR_FmtMask(pB->fMask));
     if (pB->fMask & RBBIM_STYLE)
 	TRACE("band info: style=0x%08x (%s)\n", pB->fStyle, REBAR_FmtStyle(pB->fStyle));
@@ -418,7 +418,7 @@
     }
     if (pB->fMask & RBBIM_CHILDSIZE)
 	TRACE("band info: xMin=%u, yMin=%u, yChild=%u, yMax=%u, yIntgl=%u\n",
-	      pB->cxMinChild, 
+	      pB->cxMinChild,
 	      pB->cyMinChild, pB->cyChild, pB->cyMaxChild, pB->cyIntegral);
 }
 
@@ -430,7 +430,7 @@
 
     if(! TRACE_ON(rebar) ) return;
 
-    TRACE("hwnd=%04x: color=%08lx/%08lx, bands=%u, rows=%u, cSize=%ld,%ld\n", 
+    TRACE("hwnd=%04x: color=%08lx/%08lx, bands=%u, rows=%u, cSize=%ld,%ld\n",
 	  iP->hwndSelf, iP->clrText, iP->clrBk, iP->uNumBands, iP->uNumRows,
 	  iP->calcSize.cx, iP->calcSize.cy);
     TRACE("hwnd=%04x: flags=%08x, dragStart=%d,%d, dragNow=%d,%d, ihitBand=%d\n",
@@ -446,9 +446,9 @@
 	      i, pB->wID, pB->hwndChild, pB->iRow, pB->clrFore, pB->clrBack);
 	TRACE("band # %u: mask=0x%08x (%s)\n", i, pB->fMask, REBAR_FmtMask(pB->fMask));
 	if (pB->fMask & RBBIM_STYLE)
-	    TRACE("band # %u: style=0x%08x (%s)\n", 
+	    TRACE("band # %u: style=0x%08x (%s)\n",
 		  i, pB->fStyle, REBAR_FmtStyle(pB->fStyle));
-	TRACE("band # %u: uMinH=%u xHeader=%u", 
+	TRACE("band # %u: uMinH=%u xHeader=%u",
 	      i, pB->uMinHeight, pB->cxHeader);
 	if (pB->fMask & (RBBIM_SIZE | RBBIM_IDEALSIZE | RBBIM_LPARAM )) {
 	    if (pB->fMask & RBBIM_SIZE)
@@ -604,7 +604,7 @@
 		   DT_CENTER | DT_VCENTER | DT_SINGLELINE);
 	if (oldBkMode != TRANSPARENT)
 	    SetBkMode (hdc, oldBkMode);
-	if (lpBand->clrFore != CLR_NONE) 
+	if (lpBand->clrFore != CLR_NONE)
 	    SetTextColor (hdc, oldcolor);
 	SelectObject (hdc, hOldFont);
     }
@@ -635,10 +635,10 @@
     for (i = 0; i < infoPtr->uNumBands; i++) {
 	lpBand = &infoPtr->bands[i];
 
-	if (HIDDENBAND(lpBand)) continue; 
+	if (HIDDENBAND(lpBand)) continue;
 
 	/* now draw the band */
-	TRACE("[%04x] drawing band %i, flags=%08x\n", 
+	TRACE("[%04x] drawing band %i, flags=%08x\n",
 	      infoPtr->hwndSelf, i, lpBand->fDraw);
 	REBAR_DrawBand (hdc, infoPtr, lpBand);
 
@@ -649,7 +649,7 @@
 static void
 REBAR_FixVert (REBAR_INFO *infoPtr, UINT rowstart, UINT rowend,
 		   INT mcy)
-     /* Function:                                                    */ 
+     /* Function:                                                    */
      /*   Cycle through bands in row and fix height of each band.    */
      /*   Also determine whether each band has changed.              */
      /* On entry:                                                    */
@@ -718,7 +718,7 @@
     /*      a. inflate band till either all extra space used  */
     /*         or band's ->ccx reached.                       */
     /*  If any band modified, add any space left to last band */
-    /*  adjusted.                                             */ 
+    /*  adjusted.                                             */
     /*                                                        */
     /* ****************************************************** */
     lpBand = &infoPtr->bands[rowend];
@@ -771,7 +771,7 @@
     }
     if ((x >= maxx) || (last_adjusted != -1)) {
 	if (x > maxx) {
-	    ERR("Phase 1 failed, x=%d, maxx=%d, start=%u, end=%u\n", 
+	    ERR("Phase 1 failed, x=%d, maxx=%d, start=%u, end=%u\n",
 		x, maxx,  rowstart, rowend);
 	}
 	/* done, so spread extra space */
@@ -841,7 +841,7 @@
     }
     if (x >= maxx) {
 	if (x > maxx) {
-	    ERR("Phase 2 failed, x=%d, maxx=%d, start=%u, end=%u\n", 
+	    ERR("Phase 2 failed, x=%d, maxx=%d, start=%u, end=%u\n",
 		x, maxx,  rowstart, rowend);
 	}
 	/* done, so spread extra space */
@@ -909,7 +909,7 @@
 	  if (lpBand->fStatus & (HAS_IMAGE | HAS_TEXT))
 	      /* if no gripper but either image or text, then leave space */
 	      xoff = REBAR_ALWAYS_SPACE;
-	  SetRect (&lpBand->rcCapImage, 
+	  SetRect (&lpBand->rcCapImage,
 		   lpBand->rcBand.left+xoff, lpBand->rcBand.top,
 		   lpBand->rcBand.left+xoff, lpBand->rcBand.bottom);
       }
@@ -924,7 +924,7 @@
 	  SetRect (&lpBand->rcCapText,
 		   lpBand->rcCapImage.right+REBAR_POST_IMAGE, lpBand->rcBand.top+1,
 		   lpBand->rcBand.left+lpBand->cxHeader, lpBand->rcBand.bottom-1);
-	  /* update band height 
+	  /* update band height
 	  if (lpBand->uMinHeight < infoPtr->imageSize.cy + 2) {
 	      lpBand->uMinHeight = infoPtr->imageSize.cy + 2;
 	      lpBand->rcBand.bottom = lpBand->rcBand.top + lpBand->uMinHeight;
@@ -939,7 +939,7 @@
       /* text is visible */
       if (lpBand->fStatus & HAS_TEXT) {
 	  lpBand->fDraw |= DRAW_TEXT;
-	  lpBand->rcCapText.right = max(lpBand->rcCapText.left, 
+	  lpBand->rcCapText.right = max(lpBand->rcCapText.left,
 					lpBand->rcCapText.right-REBAR_POST_TEXT);
       }
 
@@ -958,7 +958,7 @@
       }
 
       /* flag if notify required and invalidate rectangle */
-      if (notify && 
+      if (notify &&
 	  ((oldChild.right-oldChild.left != lpBand->rcChild.right-lpBand->rcChild.left) ||
 	   (oldChild.bottom-oldChild.top != lpBand->rcChild.bottom-lpBand->rcChild.top))) {
 	  TRACE("Child rectangle changed for band %u\n", i);
@@ -970,9 +970,9 @@
       }
       if (lpBand->fDraw & NTF_INVALIDATE) {
 	  TRACE("invalidating (%d,%d)-(%d,%d)\n",
-		lpBand->rcBand.left, 
+		lpBand->rcBand.left,
 		lpBand->rcBand.top,
-		lpBand->rcBand.right + ((lpBand->fDraw & DRAW_RIGHTSEP) ? SEP_WIDTH_SIZE : 0), 
+		lpBand->rcBand.right + ((lpBand->fDraw & DRAW_RIGHTSEP) ? SEP_WIDTH_SIZE : 0),
 		lpBand->rcBand.bottom + ((lpBand->fDraw & DRAW_BOTTOMSEP) ? SEP_WIDTH_SIZE : 0));
 	  lpBand->fDraw &= ~NTF_INVALIDATE;
 	  work = lpBand->rcBand;
@@ -1046,7 +1046,7 @@
 		/* if no gripper but either image or text, then leave space */
 		xoff = REBAR_ALWAYS_SPACE;
 	    /* initialize Caption image rectangle  */
-	    SetRect (&lpBand->rcCapImage, 
+	    SetRect (&lpBand->rcCapImage,
 		     lpBand->rcBand.left, lpBand->rcBand.top+xoff,
 		     lpBand->rcBand.right, lpBand->rcBand.top+xoff);
 	}
@@ -1059,7 +1059,7 @@
 	    lpBand->rcCapImage.bottom += infoPtr->imageSize.cy;
 
 	    /* set initial caption text rectangle */
-	    SetRect (&lpBand->rcCapText, 
+	    SetRect (&lpBand->rcCapText,
 		     lpBand->rcBand.left, lpBand->rcCapImage.bottom+REBAR_POST_IMAGE,
 		     lpBand->rcBand.right, lpBand->rcBand.top+lpBand->cxHeader);
 	    /* update band height *
@@ -1070,7 +1070,7 @@
 	}
 	else {
 	    /* set initial caption text rectangle */
-	    SetRect (&lpBand->rcCapText, 
+	    SetRect (&lpBand->rcCapText,
 		     lpBand->rcBand.left, lpBand->rcCapImage.bottom,
 		     lpBand->rcBand.right, lpBand->rcBand.top+lpBand->cxHeader);
 	}
@@ -1097,7 +1097,7 @@
 	}
 
 	/* flag if notify required and invalidate rectangle */
-	if (notify && 
+	if (notify &&
 	    ((oldChild.right-oldChild.left != lpBand->rcChild.right-lpBand->rcChild.left) ||
 	     (oldChild.bottom-oldChild.top != lpBand->rcChild.bottom-lpBand->rcChild.top))) {
 	    TRACE("Child rectangle changed for band %u\n", i);
@@ -1109,9 +1109,9 @@
 	}
 	if (lpBand->fDraw & NTF_INVALIDATE) {
 	    TRACE("invalidating (%d,%d)-(%d,%d)\n",
-		  lpBand->rcBand.left, 
+		  lpBand->rcBand.left,
 		  lpBand->rcBand.top,
-		  lpBand->rcBand.right + ((lpBand->fDraw & DRAW_BOTTOMSEP) ? SEP_WIDTH_SIZE : 0), 
+		  lpBand->rcBand.right + ((lpBand->fDraw & DRAW_BOTTOMSEP) ? SEP_WIDTH_SIZE : 0),
 		  lpBand->rcBand.bottom + ((lpBand->fDraw & DRAW_RIGHTSEP) ? SEP_WIDTH_SIZE : 0));
 	    lpBand->fDraw &= ~NTF_INVALIDATE;
 	    work = lpBand->rcBand;
@@ -1258,7 +1258,7 @@
 	    rbcz.wID = lpBand->wID;
 	    rbcz.rcChild = lpBand->rcChild;
 	    rbcz.rcBand = lpBand->rcBand;
-	    if (infoPtr->dwStyle & CCS_VERT) 
+	    if (infoPtr->dwStyle & CCS_VERT)
 		rbcz.rcBand.top += lpBand->cxHeader;
 	    else
 		rbcz.rcBand.left += lpBand->cxHeader;
@@ -1400,7 +1400,7 @@
     }
 
     /* save height of original control */
-    if (infoPtr->dwStyle & CCS_VERT) 
+    if (infoPtr->dwStyle & CCS_VERT)
         origheight = infoPtr->calcSize.cx;
     else
         origheight = infoPtr->calcSize.cy;
@@ -1439,10 +1439,10 @@
 	lpBand->offChild.cy = ((lpBand->fStyle & RBBS_CHILDEDGE) ? 2 : 0);
 
 	/* separator from previous band */
-	cxsep = (cntonrow == 0) ? 0 : SEP_WIDTH;  
+	cxsep = (cntonrow == 0) ? 0 : SEP_WIDTH;
 
 	/* Header: includes gripper, text, image */
-	cx = lpBand->cxHeader;   
+	cx = lpBand->cxHeader;
 	if (lpBand->fStyle & RBBS_FIXEDSIZE) cx = lpBand->lcx;
 
 	if (infoPtr->dwStyle & CCS_VERT)
@@ -1484,7 +1484,7 @@
 	    cntonrow = 0;
 	}
 
-	if (mcy < lpBand->lcy + REBARSPACE(lpBand)) 
+	if (mcy < lpBand->lcy + REBARSPACE(lpBand))
 	    mcy = lpBand->lcy + REBARSPACE(lpBand);
 
 	/* if boundary rect specified then limit mcy */
@@ -1513,7 +1513,7 @@
 	    rightx = clientcx;
 	    bottomy = (lpRect) ? min(clientcy, y+cxsep+cx) : y+cxsep+cx;
 	    lpBand->rcBand.left   = x;
-	    lpBand->rcBand.right  = x + min(mcy, 
+	    lpBand->rcBand.right  = x + min(mcy,
 					    lpBand->lcy+REBARSPACE(lpBand));
 	    lpBand->rcBand.top    = min(bottomy, y + cxsep);
 	    lpBand->rcBand.bottom = bottomy;
@@ -1527,7 +1527,7 @@
 	    lpBand->rcBand.left   = min(rightx, x + cxsep);
 	    lpBand->rcBand.right  = rightx;
 	    lpBand->rcBand.top    = y;
-	    lpBand->rcBand.bottom = y + min(mcy, 
+	    lpBand->rcBand.bottom = y + min(mcy,
 					    lpBand->lcy+REBARSPACE(lpBand));
 	    lpBand->uMinHeight = lpBand->lcy;
 	    x = rightx;
@@ -1615,7 +1615,7 @@
 	REBAR_BAND *prev, *current, *walk;
 
 /* FIXME:  problem # 2 */
-	if (((infoPtr->dwStyle & CCS_VERT) ? 
+	if (((infoPtr->dwStyle & CCS_VERT) ?
 #if PROBLEM2
 	     (x < adjcx) : (y < adjcy)
 #else
@@ -1697,7 +1697,7 @@
 			    walk->rcBand.bottom += adj_rh;
 			}
 		    }
-		    if ((infoPtr->dwStyle & CCS_VERT) ? (x >= adjcx) : (y >= adjcy)) 
+		    if ((infoPtr->dwStyle & CCS_VERT) ? (x >= adjcx) : (y >= adjcy))
 		        break; /* all done */
 		}
 	    }
@@ -1761,7 +1761,7 @@
 	    lpBand = &infoPtr->bands[iband];
 	    if(HIDDENBAND(lpBand)) continue;
 	    if (lpBand->fMask & RBBS_VARIABLEHEIGHT) continue;
-	    if (((INT)lpBand->cyMaxChild < 1) || 
+	    if (((INT)lpBand->cyMaxChild < 1) ||
 		((INT)lpBand->cyIntegral < 1)) {
 		if (lpBand->cyMaxChild + lpBand->cyIntegral == 0) continue;
 		ERR("P2b band %u RBBS_VARIABLEHEIGHT set but cyMax=%d, cyInt=%d\n",
@@ -1769,9 +1769,9 @@
 		continue;
 	    }
 	    /* j is now the maximum height/width in the client area */
-	    j = ((diff / lpBand->cyIntegral) * lpBand->cyIntegral) + 
+	    j = ((diff / lpBand->cyIntegral) * lpBand->cyIntegral) +
 		ircBw(lpBand);
-	    if (j > lpBand->cyMaxChild + REBARSPACE(lpBand)) 
+	    if (j > lpBand->cyMaxChild + REBARSPACE(lpBand))
 		j = lpBand->cyMaxChild + REBARSPACE(lpBand);
 	    diff -= (j - ircBw(lpBand));
 	    if (infoPtr->dwStyle & CCS_VERT)
@@ -1827,7 +1827,7 @@
 	    p = &infoPtr->rows[i-1];
 	    mcy = 0;
 
-	    TRACE("P3 processing row %d, starting band %d, ending band %d\n", 
+	    TRACE("P3 processing row %d, starting band %d, ending band %d\n",
 		  i, p->istartband, p->iendband);
 
 	    /* Find the largest height of the bands in the row */
@@ -1839,7 +1839,7 @@
 	    }
 
 	    REBAR_AdjustBands (infoPtr, p->istartband, p->iendband,
-			       (infoPtr->dwStyle & CCS_VERT) ? 
+			       (infoPtr->dwStyle & CCS_VERT) ?
 			       clientcy : clientcx, mcy);
 	}
 
@@ -1849,7 +1849,7 @@
 				notify);
 	}
 	else {
-	    REBAR_CalcHorzBand (infoPtr, 0, infoPtr->uNumBands, 
+	    REBAR_CalcHorzBand (infoPtr, 0, infoPtr->uNumBands,
 				notify);
 	}
     }
@@ -1875,7 +1875,7 @@
 	infoPtr->calcSize.cy = y;
 	TRACE("horz, notify=%d, y=%d, origheight=%d\n",
 	      notify, y, origheight);
-	if (notify && (y != origheight)) infoPtr->fStatus |= NTF_HGHTCHG; 
+	if (notify && (y != origheight)) infoPtr->fStatus |= NTF_HGHTCHG;
     }
 
     REBAR_DumpBand (infoPtr);
@@ -1942,7 +1942,7 @@
 
     /* calculate gripper rectangle */
     if (  (!(lpBand->fStyle & RBBS_NOGRIPPER)) &&
-	  ( (lpBand->fStyle & RBBS_GRIPPERALWAYS) || 
+	  ( (lpBand->fStyle & RBBS_GRIPPERALWAYS) ||
 	    ( !(lpBand->fStyle & RBBS_FIXEDSIZE) && (nonfixed > 1)))
        ) {
 	lpBand->fStatus |= HAS_GRIPPER;
@@ -2185,7 +2185,7 @@
 
 	rect = lpBand->rcBand;
 	TRACE("%s background color=0x%06lx, band (%d,%d)-(%d,%d), clip (%d,%d)-(%d,%d)\n",
-	      (lpBand->clrBack == CLR_NONE) ? "none" : 
+	      (lpBand->clrBack == CLR_NONE) ? "none" :
 	        ((lpBand->clrBack == CLR_DEFAULT) ? "dft" : ""),
 	      GetBkColor(hdc),
 	      lpBand->rcBand.left,lpBand->rcBand.top,
@@ -2392,7 +2392,7 @@
 	    /* a one to separate each band.                                */
 	    if (i < ihitBand)
 	        LHeaderSum += (band->lcx + SEP_WIDTH);
-	    else 
+	    else
 	        RHeaderSum += (band->lcx + SEP_WIDTH);
 
 	}
@@ -2425,7 +2425,7 @@
 	  imaxdBand, LHeaderSum, RHeaderSum);
     REBAR_DumpBand (infoPtr);
 
-    if (movement < 0) {  
+    if (movement < 0) {
 
         /* ***  Drag left/up *** */
         compress = rcBlt(hitBand) - rcBlt(mindBand) -
@@ -2442,7 +2442,7 @@
 	    if (i == ihitBand) {
 		LEADJ(band, movement)
 	    }
-	    else 
+	    else
 	        movement = REBAR_Shrink (infoPtr, band, movement, i);
 	    band->ccx = rcBw(band);
 	}
@@ -2465,7 +2465,7 @@
 		first = FALSE;
 		READJ(band, movement)
 	    }
-	    else 
+	    else
 	        movement = REBAR_Shrink (infoPtr, band, movement, i);
 	    band->ccx = rcBw(band);
 	}
@@ -2477,7 +2477,7 @@
 			    FALSE);
     }
     else {
-	REBAR_CalcHorzBand (infoPtr, imindBand, imaxdBand+1, 
+	REBAR_CalcHorzBand (infoPtr, imindBand, imaxdBand+1,
 			    FALSE);
     }
 
@@ -2485,7 +2485,7 @@
 	  imindBand, imaxdBand);
     REBAR_DumpBand (infoPtr);
 
-    SetRect (&newrect, 
+    SetRect (&newrect,
 	     mindBand->rcBand.left,
 	     mindBand->rcBand.top,
 	     maxdBand->rcBand.right,
@@ -2652,7 +2652,7 @@
                                     lprbbi->lpText, lprbbi->cch, NULL, NULL ))
               lprbbi->lpText[lprbbi->cch-1] = 0;
       }
-      else 
+      else
 	*lprbbi->lpText = 0;
     }
 
@@ -2734,7 +2734,7 @@
     if ((lprbbi->fMask & RBBIM_TEXT) && (lprbbi->lpText)) {
       if (lpBand->lpText && (lpBand->fMask & RBBIM_TEXT))
 	lstrcpynW (lprbbi->lpText, lpBand->lpText, lprbbi->cch);
-      else 
+      else
 	*lprbbi->lpText = 0;
     }
 
@@ -2922,7 +2922,7 @@
 inline static LRESULT
 REBAR_GetUnicodeFormat (REBAR_INFO *infoPtr)
 {
-    TRACE("%s hwnd=0x%x\n", 
+    TRACE("%s hwnd=0x%x\n",
 	  infoPtr->bUnicode ? "TRUE" : "FALSE", infoPtr->hwndSelf);
 
     return infoPtr->bUnicode;
@@ -2940,7 +2940,7 @@
 static LRESULT
 REBAR_HitTest (REBAR_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
 {
-    LPRBHITTESTINFO lprbht = (LPRBHITTESTINFO)lParam; 
+    LPRBHITTESTINFO lprbht = (LPRBHITTESTINFO)lParam;
 
     if (!lprbht)
 	return -1;
@@ -3249,7 +3249,7 @@
 	}
 	startBand = uBand;
 	endBand = iprevBand;
-	SetRect (&newrect, 
+	SetRect (&newrect,
 		 lpBand->rcBand.left,
 		 lpBand->rcBand.top,
 		 band->rcBand.right,
@@ -3275,7 +3275,7 @@
 	}
 	startBand = iprevBand;
 	endBand = uBand;
-	SetRect (&newrect, 
+	SetRect (&newrect,
 		 band->rcBand.left,
 		 band->rcBand.top,
 		 lpBand->rcBand.right,
@@ -3290,7 +3290,7 @@
 			    FALSE);
     }
     else {
-	REBAR_CalcHorzBand (infoPtr, startBand, endBand+1, 
+	REBAR_CalcHorzBand (infoPtr, startBand, endBand+1,
 			    FALSE);
     }
 
@@ -3553,12 +3553,12 @@
 {
     BOOL bTemp = infoPtr->bUnicode;
 
-    TRACE("to %s hwnd=0x%04x, was %s\n", 
+    TRACE("to %s hwnd=0x%04x, was %s\n",
 	  ((BOOL)wParam) ? "TRUE" : "FALSE", infoPtr->hwndSelf,
 	  (bTemp) ? "TRUE" : "FALSE");
 
     infoPtr->bUnicode = (BOOL)wParam;
- 
+
    return bTemp;
 }
 
@@ -3892,7 +3892,7 @@
 
     /* get font handle for Caption Font */
     ncm.cbSize = sizeof(NONCLIENTMETRICSA);
-    SystemParametersInfoA (SPI_GETNONCLIENTMETRICS, 
+    SystemParametersInfoA (SPI_GETNONCLIENTMETRICS,
 			  ncm.cbSize, &ncm, 0);
     /* if the font is bold, set to normal */
     if (ncm.lfCaptionFont.lfWeight > FW_NORMAL) {
@@ -3952,14 +3952,14 @@
     POINTSTOPOINT(pt, shortpt);
     clpt = pt;
     ScreenToClient (infoPtr->hwndSelf, &clpt);
-    REBAR_InternalHitTest (infoPtr, &clpt, &scrap, 
+    REBAR_InternalHitTest (infoPtr, &clpt, &scrap,
 			   (INT *)&nmmouse.dwItemSpec);
     nmmouse.dwItemData = 0;
     nmmouse.pt = clpt;
     nmmouse.dwHitInfo = 0;
     if ((i = REBAR_Notify((NMHDR *) &nmmouse, infoPtr, NM_NCHITTEST))) {
 	TRACE("notify changed return value from %ld to %d\n",
-	      ret, i); 
+	      ret, i);
 	ret = (LRESULT) i;
     }
     TRACE("returning %ld, client point (%ld,%ld)\n", ret, clpt.x, clpt.y);
@@ -4101,7 +4101,7 @@
       *  Handles the WM_SETREDRAW message.
       *
       * Documentation:
-      *  According to testing V4.71 of COMCTL32 returns the 
+      *  According to testing V4.71 of COMCTL32 returns the
       *  *previous* status of the redraw flag (either 0 or -1)
       *  instead of the MSDN documented value of 0 if handled
       *
@@ -4109,7 +4109,7 @@
 {
     BOOL oldredraw = infoPtr->DoRedraw;
 
-    TRACE("set to %s, fStatus=%08x\n", 
+    TRACE("set to %s, fStatus=%08x\n",
 	  (wParam) ? "TRUE" : "FALSE", infoPtr->fStatus);
     infoPtr->DoRedraw = (BOOL) wParam;
     if (wParam) {
@@ -4152,11 +4152,11 @@
 	TRACE("win rect (%d,%d)-(%d,%d)\n",
 	      rcWin.left, rcWin.top, rcWin.right, rcWin.bottom);
 
-	if ((lParam == 0) && (rcWin.right-rcWin.left == 0) && 
+	if ((lParam == 0) && (rcWin.right-rcWin.left == 0) &&
 	    (rcWin.bottom-rcWin.top == 0)) {
 	    /* native control seems to do this */
 	    GetClientRect (GetParent(infoPtr->hwndSelf), &rcClient);
-	    TRACE("sizing rebar, message and client zero, parent client (%d,%d)\n", 
+	    TRACE("sizing rebar, message and client zero, parent client (%d,%d)\n",
 		  rcClient.right, rcClient.bottom);
 	}
 	else {
@@ -4170,7 +4170,7 @@
 
 	    /* do the actual WM_SIZE request */
 	    GetClientRect (infoPtr->hwndSelf, &rcClient);
-	    TRACE("sizing rebar from (%ld,%ld) to (%d,%d), client (%d,%d)\n", 
+	    TRACE("sizing rebar from (%ld,%ld) to (%d,%d), client (%d,%d)\n",
 		  infoPtr->calcSize.cx, infoPtr->calcSize.cy,
 		  LOWORD(lParam), HIWORD(lParam),
 		  rcClient.right, rcClient.bottom);
@@ -4190,11 +4190,11 @@
 	    /* on a WM_SIZE to zero and current client not zero and AUTOSIZE */
 	    /* native seems to use the current client rect for the size      */
 	    infoPtr->fStatus |= BAND_NEEDS_LAYOUT;
-	    TRACE("sizing rebar to client (%d,%d) size is zero but AUTOSIZE set\n", 
+	    TRACE("sizing rebar to client (%d,%d) size is zero but AUTOSIZE set\n",
 		  rcClient.right, rcClient.bottom);
 	}
 	else {
-	    TRACE("sizing rebar from (%ld,%ld) to (%d,%d), client (%d,%d)\n", 
+	    TRACE("sizing rebar from (%ld,%ld) to (%d,%d), client (%d,%d)\n",
 		  infoPtr->calcSize.cx, infoPtr->calcSize.cy,
 		  LOWORD(lParam), HIWORD(lParam),
 		  rcClient.right, rcClient.bottom);
@@ -4208,7 +4208,7 @@
 	autosize.fChanged = 0;  /* ??? */
 	autosize.rcActual = autosize.rcTarget;  /* ??? */
 	REBAR_Notify((NMHDR *) &autosize, infoPtr, RBN_AUTOSIZE);
-	TRACE("RBN_AUTOSIZE client=(%d,%d), lp=%08lx\n", 
+	TRACE("RBN_AUTOSIZE client=(%d,%d), lp=%08lx\n",
 	      autosize.rcTarget.right, autosize.rcTarget.bottom, lParam);
     }
 
@@ -4246,7 +4246,7 @@
     /* Save the new origin of this window - used by _ForceResize */
     infoPtr->origin.x = lpwp->x;
     infoPtr->origin.y = lpwp->y;
-    ret = DefWindowProcA(infoPtr->hwndSelf, WM_WINDOWPOSCHANGED, 
+    ret = DefWindowProcA(infoPtr->hwndSelf, WM_WINDOWPOSCHANGED,
 			 wParam, lParam);
     GetWindowRect(infoPtr->hwndSelf, &rc);
     TRACE("hwnd %08x new pos (%d,%d)-(%d,%d)\n",
@@ -4260,7 +4260,7 @@
 {
     REBAR_INFO *infoPtr = REBAR_GetInfoPtr (hwnd);
 
-    TRACE("hwnd=%x msg=%x wparam=%x lparam=%lx\n", 
+    TRACE("hwnd=%x msg=%x wparam=%x lparam=%lx\n",
 	  hwnd, uMsg, /* SPY_GetMsgName(uMsg), */ wParam, lParam);
     if (!infoPtr && (uMsg != WM_NCCREATE))
 	    return DefWindowProcA (hwnd, uMsg, wParam, lParam);
@@ -4462,7 +4462,7 @@
 
 /*      case WM_SYSCOLORCHANGE: supported according to ControlSpy */
 /*      "Applications that have brushes using the existing system colors
-         should delete those brushes and recreate them using the new 
+         should delete those brushes and recreate them using the new
          system colors."  per MSDN                                */
 
 /*      case WM_VKEYTOITEM:     supported according to ControlSpy */
@@ -4497,7 +4497,7 @@
     wndClass.hbrBackground = CreateSolidBrush(RGB(0,128,0));
 #endif
     wndClass.lpszClassName = REBARCLASSNAMEA;
- 
+
     RegisterClassA (&wndClass);
 
     mindragx = GetSystemMetrics (SM_CXDRAG);
diff --git a/dlls/comctl32/status.c b/dlls/comctl32/status.c
index 2df03ad..29e6df4 100644
--- a/dlls/comctl32/status.c
+++ b/dlls/comctl32/status.c
@@ -124,7 +124,7 @@
 }
 
 
-static void 
+static void
 STATUSBAR_DrawPart (HDC hdc, const STATUSWINDOWPART *part, const STATUSWINDOWINFO *infoPtr, int itemID)
 {
     RECT r = part->bound;
@@ -137,7 +137,7 @@
         border = 0;
 
     DrawEdge(hdc, &r, border, BF_RECT|BF_ADJUST);
-	
+
     if (part->style & SBT_OWNERDRAW)
 	{
 	    DRAWITEMSTRUCT dis;
@@ -150,14 +150,14 @@
 	    dis.itemData = (INT)part->text;
 	    SendMessageW (GetParent (infoPtr->Self), WM_DRAWITEM,
 		    (WPARAM)dis.CtlID, (LPARAM)&dis);
-    } 
+    }
     else
 	{
 	    if (part->hIcon)
 		{
 	        INT cy = r.bottom - r.top;
 
-	        r.left += 2; 
+	        r.left += 2;
 	        DrawIconEx (hdc, r.left, r.top, part->hIcon, cy, cy, 0, 0, DI_NORMAL);
 	        r.left += cy;
 		}
@@ -586,7 +586,7 @@
 	if (i==oldNumParts) /* Unchanged? no need to redraw! */
 	    return TRUE;
     }
-    
+
     for (i = 0; i < infoPtr->numParts; i++)
 	infoPtr->parts[i].x = parts[i];
 
@@ -625,13 +625,13 @@
 
 
 static BOOL
-STATUSBAR_SetTextT (STATUSWINDOWINFO *infoPtr, INT nPart, WORD style, 
+STATUSBAR_SetTextT (STATUSWINDOWINFO *infoPtr, INT nPart, WORD style,
 		    LPCWSTR text, BOOL isW)
 {
     STATUSWINDOWPART *part=NULL;
     BOOL changed = FALSE;
 
-    if (style & SBT_OWNERDRAW) {    
+    if (style & SBT_OWNERDRAW) {
          TRACE("part %d, text %x\n",nPart,text);
     }
     else TRACE("part %d, text %s\n", nPart, debugstr_t(text, isW));
@@ -678,7 +678,7 @@
 		return TRUE;
 	    }
 	} else {
-	    if (!changed && !part->text) 
+	    if (!changed && !part->text)
 		return TRUE;
 	}
 
@@ -898,7 +898,7 @@
 
 	    SendMessageW (lpCreate->hwndParent, WM_NOTIFY,
 			    (WPARAM)nmttc.hdr.idFrom, (LPARAM)&nmttc);
-	} 
+	}
     }
 
     if (!(dwStyle & CCS_NORESIZE)) { /* don't resize wnd if it doesn't want it ! */
@@ -911,7 +911,7 @@
     }
 
     return 0;
-    
+
 create_fail:
     TRACE("    failed!\n");
     if (infoPtr) STATUSBAR_WMDestroy(infoPtr);
@@ -1049,13 +1049,13 @@
 	return FALSE;
     }
     if (GetWindowLongW(infoPtr->Self, GWL_STYLE) & CCS_NORESIZE) return FALSE;
-    
+
     /* width and height don't apply */
     GetClientRect (GetParent(infoPtr->Self), &parent_rect);
     width = parent_rect.right - parent_rect.left;
     x = parent_rect.left;
     y = parent_rect.bottom - infoPtr->height;
-    MoveWindow (infoPtr->Self, parent_rect.left, 
+    MoveWindow (infoPtr->Self, parent_rect.left,
 		parent_rect.bottom - infoPtr->height,
 		width, infoPtr->height, TRUE);
     STATUSBAR_SetPartBounds (infoPtr);
@@ -1063,7 +1063,7 @@
 }
 
 
-static LRESULT 
+static LRESULT
 STATUSBAR_NotifyFormat (STATUSWINDOWINFO *infoPtr, HWND from, INT cmd)
 {
     if (cmd == NF_REQUERY) {
@@ -1144,7 +1144,7 @@
 	case SB_SETMINHEIGHT:
 	    return STATUSBAR_SetMinHeight (infoPtr, (INT)wParam);
 
-	case SB_SETPARTS:	
+	case SB_SETPARTS:
 	    return STATUSBAR_SetParts (infoPtr, (INT)wParam, (LPINT)lParam);
 
 	case SB_SETTEXTA:
@@ -1202,7 +1202,7 @@
 
 	case WM_NOTIFYFORMAT:
 	    return STATUSBAR_NotifyFormat(infoPtr, (HWND)wParam, (INT)lParam);
-	    
+
 	case WM_PAINT:
 	    return STATUSBAR_WMPaint (infoPtr, (HDC)wParam);
 
@@ -1251,7 +1251,7 @@
     wndClass.hCursor       = LoadCursorW (0, IDC_ARROWW);
     wndClass.hbrBackground = (HBRUSH)(COLOR_3DFACE + 1);
     wndClass.lpszClassName = STATUSCLASSNAMEW;
- 
+
     RegisterClassW (&wndClass);
 }
 
diff --git a/dlls/comctl32/tab.c b/dlls/comctl32/tab.c
index fffe488..0114b65 100644
--- a/dlls/comctl32/tab.c
+++ b/dlls/comctl32/tab.c
@@ -45,9 +45,9 @@
   INT    iImage;
   LPARAM lParam;
   RECT   rect;    /* bounding rectangle of the item relative to the
-		   * leftmost item (the leftmost item, 0, would have a 
-		   * "left" member of 0 in this rectangle) 
-                   *  
+		   * leftmost item (the leftmost item, 0, would have a
+		   * "left" member of 0 in this rectangle)
+                   *
                    * additionally the top member hold the row number
                    * and bottom is unused and should be 0 */
 } TAB_ITEM;
@@ -69,7 +69,7 @@
   INT        uFocus;          /* item which has the focus */
   TAB_ITEM*  items;           /* pointer to an array of TAB_ITEM's */
   BOOL       DoRedraw;        /* flag for redrawing when tab contents is changed*/
-  BOOL       needsScrolling;  /* TRUE if the size of the tabs is greater than 
+  BOOL       needsScrolling;  /* TRUE if the size of the tabs is greater than
 			       * the size of the control */
   BOOL	     fSizeSet;	      /* was the size of the tabs explicitly set? */
   BOOL       bUnicode;        /* Unicode control? */
@@ -87,7 +87,7 @@
 #define DISPLAY_AREA_PADDINGY   2
 #define CONTROL_BORDER_SIZEX    2
 #define CONTROL_BORDER_SIZEY    2
-#define BUTTON_SPACINGX         4 
+#define BUTTON_SPACINGX         4
 #define BUTTON_SPACINGY         4
 #define FLAT_BTN_SPACINGX       8
 #define DEFAULT_TAB_WIDTH       96
@@ -143,7 +143,7 @@
 TAB_GetCurSel (HWND hwnd)
 {
     TAB_INFO *infoPtr = TAB_GetInfoPtr(hwnd);
- 
+
     return infoPtr->iSelected;
 }
 
@@ -151,7 +151,7 @@
 TAB_GetCurFocus (HWND hwnd)
 {
     TAB_INFO *infoPtr = TAB_GetInfoPtr(hwnd);
- 
+
     return infoPtr->uFocus;
 }
 
@@ -170,7 +170,7 @@
     TAB_INFO *infoPtr = TAB_GetInfoPtr(hwnd);
   INT iItem = (INT)wParam;
   INT prevItem;
- 
+
   prevItem = -1;
   if ((iItem >= 0) && (iItem < infoPtr->uNumItem)) {
     prevItem=infoPtr->iSelected;
@@ -186,12 +186,12 @@
 {
   TAB_INFO *infoPtr = TAB_GetInfoPtr(hwnd);
   INT iItem=(INT) wParam;
- 
+
   if ((iItem < 0) || (iItem >= infoPtr->uNumItem)) return 0;
 
   if (GetWindowLongA(hwnd, GWL_STYLE) & TCS_BUTTONS) {
     FIXME("Should set input focus\n");
-  } else { 
+  } else {
     int oldFocus = infoPtr->uFocus;
     if (infoPtr->iSelected != iItem || infoPtr->uFocus == -1 ) {
       infoPtr->uFocus = iItem;
@@ -238,7 +238,7 @@
 {
   RECT tmpItemRect,clientRect;
   LONG        lStyle  = GetWindowLongA(hwnd, GWL_STYLE);
-  
+
   /* Perform a sanity check and a trivial visibility check. */
   if ( (infoPtr->uNumItem <= 0) ||
        (itemIndex >= infoPtr->uNumItem) ||
@@ -251,7 +251,7 @@
    */
   if (itemRect == NULL)
     itemRect = &tmpItemRect;
-  
+
   /* Retrieve the unmodified item rect. */
   *itemRect = infoPtr->items[itemIndex].rect;
 
@@ -286,18 +286,18 @@
   }
   else if(!(lStyle & TCS_VERTICAL) && !(lStyle & TCS_BOTTOM)) /* not TCS_BOTTOM and not TCS_VERTICAL */
   {
-    itemRect->bottom = clientRect.top + 
+    itemRect->bottom = clientRect.top +
                       infoPtr->tabHeight +
                       itemRect->top * (infoPtr->tabHeight - 2) +
                       ((lStyle & TCS_BUTTONS) ? itemRect->top * BUTTON_SPACINGY : 0);
-    itemRect->top = clientRect.top + 
+    itemRect->top = clientRect.top +
                    SELECTED_TAB_OFFSET +
                    itemRect->top * (infoPtr->tabHeight - 2) +
                    ((lStyle & TCS_BUTTONS) ? itemRect->top * BUTTON_SPACINGY : 0);
  }
 
   /*
-   * "scroll" it to make sure the item at the very left of the 
+   * "scroll" it to make sure the item at the very left of the
    * tab control is the leftmost visible tab.
    */
   if(lStyle & TCS_VERTICAL)
@@ -317,7 +317,7 @@
   } else
   {
     OffsetRect(itemRect,
-	     -infoPtr->items[infoPtr->leftmostVisible].rect.left, 
+	     -infoPtr->items[infoPtr->leftmostVisible].rect.left,
 	     0);
 
     /*
@@ -345,7 +345,7 @@
 
     /* If it also a bit higher. */
     if ((lStyle & TCS_BOTTOM) && !(lStyle & TCS_VERTICAL))
-    {      
+    {
       selectedRect->top -= 2; /* the border is thicker on the bottom */
       selectedRect->bottom += SELECTED_TAB_OFFSET;
     }
@@ -371,7 +371,7 @@
 
 static BOOL TAB_GetItemRect(HWND hwnd, WPARAM wParam, LPARAM lParam)
 {
-  return TAB_InternalGetItemRect(hwnd, TAB_GetInfoPtr(hwnd), (INT)wParam, 
+  return TAB_InternalGetItemRect(hwnd, TAB_GetInfoPtr(hwnd), (INT)wParam,
                                  (LPRECT)lParam, (LPRECT)NULL);
 }
 
@@ -381,7 +381,7 @@
  * This method is called to handle keyboard input
  */
 static LRESULT TAB_KeyUp(
-  HWND   hwnd, 
+  HWND   hwnd,
   WPARAM keyCode)
 {
   TAB_INFO* infoPtr = TAB_GetInfoPtr(hwnd);
@@ -396,7 +396,7 @@
       newItem = infoPtr->uFocus + 1;
       break;
   }
-  
+
   /*
    * If we changed to a valid item, change the selection
    */
@@ -425,9 +425,9 @@
  * it is used to update the visual state of the control.
  */
 static LRESULT TAB_FocusChanging(
-  HWND   hwnd, 
-  UINT   uMsg, 
-  WPARAM wParam, 
+  HWND   hwnd,
+  UINT   uMsg,
+  WPARAM wParam,
   LPARAM lParam)
 {
   TAB_INFO *infoPtr = TAB_GetInfoPtr(hwnd);
@@ -442,7 +442,7 @@
 				      infoPtr->uFocus,
 				      NULL,
 				      &selectedRect);
-  
+
   /*
    * If the rectangle is not completely invisible, invalidate that
    * portion of the window.
@@ -463,14 +463,14 @@
 
 static HWND TAB_InternalHitTest (
   HWND      hwnd,
-  TAB_INFO* infoPtr, 
-  POINT     pt, 
+  TAB_INFO* infoPtr,
+  POINT     pt,
   UINT*     flags)
 
 {
   RECT rect;
-  int iCount; 
-  
+  int iCount;
+
   for (iCount = 0; iCount < infoPtr->uNumItem; iCount++)
   {
     TAB_InternalGetItemRect(hwnd, infoPtr, iCount, &rect, NULL);
@@ -491,7 +491,7 @@
 {
   TAB_INFO *infoPtr = TAB_GetInfoPtr(hwnd);
   LPTCHITTESTINFO lptest = (LPTCHITTESTINFO) lParam;
-  
+
   return TAB_InternalHitTest (hwnd, infoPtr, lptest->pt, &lptest->flags);
 }
 
@@ -542,12 +542,12 @@
   if (infoPtr->hwndToolTip)
     TAB_RelayEvent (infoPtr->hwndToolTip, hwnd,
 		    WM_LBUTTONDOWN, wParam, lParam);
-  
+
   pt.x = (INT)LOWORD(lParam);
   pt.y = (INT)HIWORD(lParam);
-  
+
   newItem = TAB_InternalHitTest (hwnd, infoPtr, pt, &dummy);
-  
+
   TRACE("On Tab, item %d\n", newItem);
 
   if ((newItem != -1) && (infoPtr->iSelected != newItem))
@@ -631,7 +631,7 @@
     ** "outside" even if it is within our bounding rect if another window
     ** overlaps.  Note also that the case where the cursor stayed within our
     ** window but has moved off the hot-tracked tab will be handled by the
-    ** WM_MOUSEMOVE event. 
+    ** WM_MOUSEMOVE event.
     */
     if (!GetCursorPos(&pt) || WindowFromPoint(pt) != hwnd)
     {
@@ -776,8 +776,8 @@
  * the window rectangle given the requested display rectangle.
  */
 static LRESULT TAB_AdjustRect(
-  HWND   hwnd, 
-  WPARAM fLarger, 
+  HWND   hwnd,
+  WPARAM fLarger,
   LPRECT prc)
 {
   TAB_INFO *infoPtr = TAB_GetInfoPtr(hwnd);
@@ -857,7 +857,7 @@
  * perform the scrolling operation on the tab control.
  */
 static LRESULT TAB_OnHScroll(
-  HWND    hwnd, 
+  HWND    hwnd,
   int     nScrollCode,
   int     nPos,
   HWND    hwndScroll)
@@ -883,7 +883,7 @@
 /******************************************************************************
  * TAB_SetupScrolling
  *
- * This method will check the current scrolling state and make sure the 
+ * This method will check the current scrolling state and make sure the
  * scrolling control is displayed (or not).
  */
 static void TAB_SetupScrolling(
@@ -948,18 +948,18 @@
 					  controlPos.right - controlPos.left,
 					  controlPos.bottom - controlPos.top,
 					  hwnd,
-					  (HMENU)NULL, 
-					  (HINSTANCE)NULL, 
-					  NULL);	
+					  (HMENU)NULL,
+					  (HINSTANCE)NULL,
+					  NULL);
     }
     else
     {
-      SetWindowPos(infoPtr->hwndUpDown, 
+      SetWindowPos(infoPtr->hwndUpDown,
 		   (HWND)NULL,
 		   controlPos.left, controlPos.top,
 		   controlPos.right - controlPos.left,
 		   controlPos.bottom - controlPos.top,
-		   SWP_SHOWWINDOW | SWP_NOZORDER);		   
+		   SWP_SHOWWINDOW | SWP_NOZORDER);
     }
 
     /* Now calculate upper limit of the updown control range.
@@ -1022,8 +1022,8 @@
    * We need to get text information so we need a DC and we need to select
    * a font.
    */
-  hdc = GetDC(hwnd); 
-    
+  hdc = GetDC(hwnd);
+
   hFont = infoPtr->hFont ? infoPtr->hFont : GetStockObject (SYSTEM_FONT);
   hOldFont = SelectObject (hdc, hFont);
 
@@ -1034,7 +1034,7 @@
   GetClientRect(hwnd, &clientRect);
 
   /* if TCS_VERTICAL then swap the height and width so this code places the
-     tabs along the top of the rectangle and we can just rotate them after 
+     tabs along the top of the rectangle and we can just rotate them after
      rather than duplicate all of the below code */
   if(lStyle & TCS_VERTICAL)
   {
@@ -1066,11 +1066,11 @@
       item_height = icon_height;
 
     /*
-     * Make sure there is enough space for the letters + icon + growing the 
-     * selected item + extra space for the selected item.   
+     * Make sure there is enough space for the letters + icon + growing the
+     * selected item + extra space for the selected item.
      */
     infoPtr->tabHeight = item_height + SELECTED_TAB_OFFSET +
-	                 ((lStyle & TCS_BUTTONS) ? 2 : 1) * 
+	                 ((lStyle & TCS_BUTTONS) ? 2 : 1) *
                           VERTICAL_ITEM_PADDING;
 
     TRACE("tabH=%d, tmH=%ld, iconh=%d\n",
@@ -1110,7 +1110,7 @@
       }
 
       infoPtr->items[curItem].rect.right = infoPtr->items[curItem].rect.left +
-                                           size.cx + icon_width + 
+                                           size.cx + icon_width +
                                            num * HORIZONTAL_ITEM_PADDING;
     }
 
@@ -1137,11 +1137,11 @@
     infoPtr->items[curItem].rect.top = curItemRowCount - 1;
 
     TRACE("TextSize: %li\n", size.cx);
-    TRACE("Rect: T %i, L %i, B %i, R %i\n", 
+    TRACE("Rect: T %i, L %i, B %i, R %i\n",
 	  infoPtr->items[curItem].rect.top,
 	  infoPtr->items[curItem].rect.left,
 	  infoPtr->items[curItem].rect.bottom,
-	  infoPtr->items[curItem].rect.right);  
+	  infoPtr->items[curItem].rect.right);
 
     /*
      * The leftmost position of the next item is the rightmost position
@@ -1167,7 +1167,7 @@
 
     /* Don't need scrolling, then update infoPtr->leftmostVisible */
     if(!infoPtr->needsScrolling)
-      infoPtr->leftmostVisible = 0; 
+      infoPtr->leftmostVisible = 0;
 
     TAB_SetupScrolling(hwnd, infoPtr, &clientRect);
   }
@@ -1207,7 +1207,7 @@
           /* normalize the current rect */
 
           /* shift the item to the left side of the clientRect */
-          infoPtr->items[iItm].rect.right -= 
+          infoPtr->items[iItm].rect.right -=
             infoPtr->items[iItm].rect.left;
           infoPtr->items[iItm].rect.left = 0;
 
@@ -1224,25 +1224,25 @@
           else
             curItemLeftPos = infoPtr->items[iItm].rect.right;
       }
-          
+
       /*
        * Justify the rows
        */
       {
          while(iIndexStart < infoPtr->uNumItem)
         {
-        /* 
+        /*
          * find the indexs of the row
          */
         /* find the first item on the next row */
         for (iIndexEnd=iIndexStart;
-             (iIndexEnd < infoPtr->uNumItem) && 
+             (iIndexEnd < infoPtr->uNumItem) &&
  	       (infoPtr->items[iIndexEnd].rect.top ==
                 infoPtr->items[iIndexStart].rect.top) ;
             iIndexEnd++)
         /* intentionally blank */;
 
-        /* 
+        /*
          * we need to justify these tabs so they fill the whole given
          * client area
          *
@@ -1260,7 +1260,7 @@
            remainder = widthDiff % iCount;
            widthDiff = widthDiff / iCount;
            /* add widthDiff/iCount, or extra space/items on row, to each item on this row */
-           for (iIndex=iIndexStart,iCount=0; iIndex < iIndexEnd; 
+           for (iIndex=iIndexStart,iCount=0; iIndex < iIndexEnd;
                 iIndex++,iCount++)
            {
               infoPtr->items[iIndex].rect.left += iCount * widthDiff;
@@ -1311,7 +1311,7 @@
  *
  * This method is used to draw the interior (text and icon) of a single tab
  * into the tab control.
- */         
+ */
 static void
 TAB_DrawItemInterior
   (
@@ -1381,7 +1381,7 @@
   holdPen = SelectObject(hdc, htextPen);
 
   oldBkMode = SetBkMode(hdc, TRANSPARENT);
-  SetTextColor(hdc, (iItem == infoPtr->iHotTracked) ? 
+  SetTextColor(hdc, (iItem == infoPtr->iHotTracked) ?
                      comctl32_color.clrHighlight : comctl32_color.clrBtnText);
 
   /*
@@ -1406,19 +1406,19 @@
      */
     id = GetWindowLongA( hwnd, GWL_ID );
 
-    /* 
+    /*
      * put together the DRAWITEMSTRUCT
      */
-    dis.CtlType    = ODT_TAB;	
-    dis.CtlID      = id;		
-    dis.itemID     = iItem;		
-    dis.itemAction = ODA_DRAWENTIRE;	
+    dis.CtlType    = ODT_TAB;
+    dis.CtlID      = id;
+    dis.itemID     = iItem;
+    dis.itemAction = ODA_DRAWENTIRE;
     if ( iItem == infoPtr->iSelected )
-      dis.itemState = ODS_SELECTED;	
-    else				
-      dis.itemState = 0;		
+      dis.itemState = ODS_SELECTED;
+    else
+      dis.itemState = 0;
     dis.hwndItem = hwnd;		/* */
-    dis.hDC      = hdc;		
+    dis.hDC      = hdc;
     dis.rcItem   = *drawRect;		/* */
     dis.itemData = infoPtr->items[iItem].lParam;
 
@@ -1455,7 +1455,7 @@
      * Setup for text output
      */
     oldBkMode = SetBkMode(hdc, TRANSPARENT);
-    SetTextColor(hdc, (iItem == infoPtr->iHotTracked) ? 
+    SetTextColor(hdc, (iItem == infoPtr->iHotTracked) ?
 		 comctl32_color.clrHighlight : comctl32_color.clrBtnText);
 
     /* get the rectangle that the text fits in */
@@ -1555,14 +1555,14 @@
     /* call CreateFontIndirectA, which requires us to set the values of the logfont we pass in */
     if(lStyle & TCS_VERTICAL)
     {
-      if (!GetObjectA((infoPtr->hFont) ? 
+      if (!GetObjectA((infoPtr->hFont) ?
                 infoPtr->hFont : GetStockObject(SYSTEM_FONT),
                 sizeof(LOGFONTA),&logfont))
       {
         iPointSize = 9;
 
         lstrcpyA(logfont.lfFaceName, "Arial");
-        logfont.lfHeight = -MulDiv(iPointSize, GetDeviceCaps(hdc, LOGPIXELSY), 
+        logfont.lfHeight = -MulDiv(iPointSize, GetDeviceCaps(hdc, LOGPIXELSY),
                                     72);
         logfont.lfWeight = FW_NORMAL;
         logfont.lfItalic = 0;
@@ -1622,10 +1622,10 @@
  * TAB_DrawItem
  *
  * This method is used to draw a single tab into the tab control.
- */         
+ */
 static void TAB_DrawItem(
-  HWND hwnd, 
-  HDC  hdc, 
+  HWND hwnd,
+  HDC  hdc,
   INT  iItem)
 {
   TAB_INFO *infoPtr = TAB_GetInfoPtr(hwnd);
@@ -1651,7 +1651,7 @@
   {
     /* If you need to see what the control is doing,
      * then override these variables. They will change what
-     * fill colors are used for filling the tabs, and the 
+     * fill colors are used for filling the tabs, and the
      * corners when drawing the edge.
      */
     bkgnd = comctl32_color.clrBtnFace;
@@ -1659,14 +1659,14 @@
 
     if (lStyle & TCS_BUTTONS)
     {
-      HBRUSH hbr       = CreateSolidBrush (bkgnd);    
+      HBRUSH hbr       = CreateSolidBrush (bkgnd);
       BOOL   deleteBrush = TRUE;
 
       /* Get item rectangle */
       r = itemRect;
 
       /* Separators between flat buttons */
-      if (lStyle & TCS_FLATBUTTONS) 
+      if (lStyle & TCS_FLATBUTTONS)
       {
 	r1 = r;
 	r1.right += (FLAT_BTN_SPACINGX -2);
@@ -1729,12 +1729,12 @@
 
       /*
        * Erase the background. (Delay it but setup rectangle.)
-       * This is necessary when drawing the selected item since it is larger 
-       * than the others, it might overlap with stuff already drawn by the 
+       * This is necessary when drawing the selected item since it is larger
+       * than the others, it might overlap with stuff already drawn by the
        * other tabs
-       */     
+       */
       fillRect = r;
-      
+
       if(lStyle & TCS_VERTICAL)
       {
 	/* These are for adjusting the drawing of a Selected tab      */
@@ -1768,7 +1768,7 @@
 	  /* Draw rectangular edge around tab */
 	  DrawEdge(hdc, &r, EDGE_RAISED, BF_SOFT|BF_RIGHT|BF_TOP|BF_BOTTOM);
 
-	  /* Now erase the top corner and draw diagonal edge */ 
+	  /* Now erase the top corner and draw diagonal edge */
 	  SetBkColor(hdc, corner);
 	  r1.left = r.right - ROUND_CORNER_SIZE - 1;
 	  r1.top = r.top;
@@ -1778,7 +1778,7 @@
 	  r1.right--;
 	  DrawEdge(hdc, &r1, EDGE_RAISED, BF_SOFT|BF_DIAGONAL_ENDTOPLEFT);
 
-	  /* Now erase the bottom corner and draw diagonal edge */ 
+	  /* Now erase the bottom corner and draw diagonal edge */
 	  r1.left = r.right - ROUND_CORNER_SIZE - 1;
 	  r1.bottom = r.bottom;
 	  r1.right = r.right;
@@ -1812,7 +1812,7 @@
 	  /* Draw rectangular edge around tab */
 	  DrawEdge(hdc, &r, EDGE_RAISED, BF_SOFT|BF_LEFT|BF_TOP|BF_BOTTOM);
 
-	  /* Now erase the top corner and draw diagonal edge */ 
+	  /* Now erase the top corner and draw diagonal edge */
 	  SetBkColor(hdc, corner);
 	  r1.left = r.left;
 	  r1.top = r.top;
@@ -1822,7 +1822,7 @@
 	  r1.left++;
 	  DrawEdge(hdc, &r1, EDGE_RAISED, BF_SOFT|BF_DIAGONAL_ENDTOPRIGHT);
 
-	  /* Now erase the bottom corner and draw diagonal edge */ 
+	  /* Now erase the bottom corner and draw diagonal edge */
 	  r1.left = r.left;
 	  r1.bottom = r.bottom;
 	  r1.right = r1.left + ROUND_CORNER_SIZE + 1;
@@ -1869,7 +1869,7 @@
 	  /* Draw rectangular edge around tab */
 	  DrawEdge(hdc, &r, EDGE_RAISED, BF_SOFT|BF_LEFT|BF_BOTTOM|BF_RIGHT);
 
-	  /* Now erase the righthand corner and draw diagonal edge */ 
+	  /* Now erase the righthand corner and draw diagonal edge */
 	  SetBkColor(hdc, corner);
 	  r1.left = r.right - ROUND_CORNER_SIZE;
 	  r1.bottom = r.bottom;
@@ -1879,7 +1879,7 @@
 	  r1.bottom--;
 	  DrawEdge(hdc, &r1, EDGE_RAISED, BF_SOFT|BF_DIAGONAL_ENDBOTTOMLEFT);
 
-	  /* Now erase the lefthand corner and draw diagonal edge */ 
+	  /* Now erase the lefthand corner and draw diagonal edge */
 	  r1.left = r.left;
 	  r1.bottom = r.bottom;
 	  r1.right = r1.left + ROUND_CORNER_SIZE;
@@ -1914,7 +1914,7 @@
 	  /* Draw rectangular edge around tab */
 	  DrawEdge(hdc, &r, EDGE_RAISED, BF_SOFT|BF_LEFT|BF_TOP|BF_RIGHT);
 
-	  /* Now erase the righthand corner and draw diagonal edge */ 
+	  /* Now erase the righthand corner and draw diagonal edge */
 	  SetBkColor(hdc, corner);
 	  r1.left = r.right - ROUND_CORNER_SIZE;
 	  r1.top = r.top;
@@ -1924,7 +1924,7 @@
 	  r1.top++;
 	  DrawEdge(hdc, &r1, EDGE_RAISED, BF_SOFT|BF_DIAGONAL_ENDBOTTOMRIGHT);
 
-	  /* Now erase the lefthand corner and draw diagonal edge */ 
+	  /* Now erase the lefthand corner and draw diagonal edge */
 	  r1.left = r.left;
 	  r1.top = r.top;
 	  r1.right = r1.left + ROUND_CORNER_SIZE;
@@ -1936,7 +1936,7 @@
         }
       }
     }
-  
+
     /* This modifies r to be the text rectangle. */
     {
       HFONT hOldFont = SelectObject(hdc, infoPtr->hFont);
@@ -1962,7 +1962,7 @@
  *
  * This method is used to draw the raised border around the tab control
  * "content" area.
- */         
+ */
 static void TAB_DrawBorder (HWND hwnd, HDC hdc)
 {
   TAB_INFO *infoPtr = TAB_GetInfoPtr(hwnd);
@@ -2005,7 +2005,7 @@
  * TAB_Refresh
  *
  * This method repaints the tab control..
- */             
+ */
 static void TAB_Refresh (HWND hwnd, HDC hdc)
 {
   TAB_INFO *infoPtr = TAB_GetInfoPtr(hwnd);
@@ -2019,13 +2019,13 @@
 
   if (GetWindowLongA(hwnd, GWL_STYLE) & TCS_BUTTONS)
   {
-    for (i = 0; i < infoPtr->uNumItem; i++) 
+    for (i = 0; i < infoPtr->uNumItem; i++)
       TAB_DrawItem (hwnd, hdc, i);
   }
   else
   {
     /* Draw all the non selected item first */
-    for (i = 0; i < infoPtr->uNumItem; i++) 
+    for (i = 0; i < infoPtr->uNumItem; i++)
     {
       if (i != infoPtr->iSelected)
 	TAB_DrawItem (hwnd, hdc, i);
@@ -2059,13 +2059,13 @@
 TAB_SetRedraw (HWND hwnd, WPARAM wParam)
 {
     TAB_INFO *infoPtr = TAB_GetInfoPtr(hwnd);
-  
+
   infoPtr->DoRedraw=(BOOL) wParam;
   return 0;
 }
 
 static LRESULT TAB_EraseBackground(
-  HWND hwnd, 
+  HWND hwnd,
   HDC  givenDC)
 {
   HDC  hdc;
@@ -2258,7 +2258,7 @@
 {
   HDC hdc;
   PAINTSTRUCT ps;
-    
+
   hdc = wParam== 0 ? BeginPaint (hwnd, &ps) : (HDC)wParam;
 
   TRACE("erase %d, rect=(%d,%d)-(%d,%d)\n",
@@ -2269,7 +2269,7 @@
       TAB_EraseBackground (hwnd, hdc);
 
   TAB_Refresh (hwnd, hdc);
-    
+
   if(!wParam)
     EndPaint (hwnd, &ps);
 
@@ -2278,23 +2278,23 @@
 
 static LRESULT
 TAB_InsertItemA (HWND hwnd, WPARAM wParam, LPARAM lParam)
-{    
+{
   TAB_INFO *infoPtr = TAB_GetInfoPtr(hwnd);
   TCITEMA *pti;
   INT iItem;
   RECT rect;
-  
+
   GetClientRect (hwnd, &rect);
   TRACE("Rect: %x T %i, L %i, B %i, R %i\n", hwnd,
-        rect.top, rect.left, rect.bottom, rect.right);  
-  
+        rect.top, rect.left, rect.bottom, rect.right);
+
   pti = (TCITEMA *)lParam;
   iItem = (INT)wParam;
-  
+
   if (iItem < 0) return -1;
   if (iItem > infoPtr->uNumItem)
     iItem = infoPtr->uNumItem;
-  
+
   if (infoPtr->uNumItem == 0) {
     infoPtr->items = COMCTL32_Alloc (sizeof (TAB_ITEM));
     infoPtr->uNumItem++;
@@ -2302,21 +2302,21 @@
   }
   else {
     TAB_ITEM *oldItems = infoPtr->items;
-    
+
     infoPtr->uNumItem++;
     infoPtr->items = COMCTL32_Alloc (sizeof (TAB_ITEM) * infoPtr->uNumItem);
-    
+
     /* pre insert copy */
     if (iItem > 0) {
       memcpy (&infoPtr->items[0], &oldItems[0],
 	      iItem * sizeof(TAB_ITEM));
     }
-    
+
     /* post insert copy */
     if (iItem < infoPtr->uNumItem - 1) {
       memcpy (&infoPtr->items[iItem+1], &oldItems[iItem],
 	      (infoPtr->uNumItem - iItem - 1) * sizeof(TAB_ITEM));
-      
+
     }
 
     if (iItem <= infoPtr->iSelected)
@@ -2324,23 +2324,23 @@
 
     COMCTL32_Free (oldItems);
   }
-  
+
   infoPtr->items[iItem].mask = pti->mask;
   if (pti->mask & TCIF_TEXT)
     Str_SetPtrAtoW (&infoPtr->items[iItem].pszText, pti->pszText);
 
   if (pti->mask & TCIF_IMAGE)
     infoPtr->items[iItem].iImage = pti->iImage;
-  
+
   if (pti->mask & TCIF_PARAM)
     infoPtr->items[iItem].lParam = pti->lParam;
-  
+
   TAB_SetItemBounds(hwnd);
   if (infoPtr->uNumItem > 1)
     TAB_InvalidateTabArea(hwnd, infoPtr);
   else
     InvalidateRect(hwnd, NULL, TRUE);
-  
+
   TRACE("[%04x]: added item %d %s\n",
 	hwnd, iItem, debugstr_w(infoPtr->items[iItem].pszText));
 
@@ -2390,7 +2390,7 @@
 	      (infoPtr->uNumItem - iItem - 1) * sizeof(TAB_ITEM));
 
   }
-  
+
     if (iItem <= infoPtr->iSelected)
       infoPtr->iSelected++;
 
@@ -2403,16 +2403,16 @@
 
   if (pti->mask & TCIF_IMAGE)
     infoPtr->items[iItem].iImage = pti->iImage;
-  
+
   if (pti->mask & TCIF_PARAM)
     infoPtr->items[iItem].lParam = pti->lParam;
-  
+
   TAB_SetItemBounds(hwnd);
   if (infoPtr->uNumItem > 1)
     TAB_InvalidateTabArea(hwnd, infoPtr);
   else
     InvalidateRect(hwnd, NULL, TRUE);
-  
+
   TRACE("[%04x]: added item %d %s\n",
 	hwnd, iItem, debugstr_w(infoPtr->items[iItem].pszText));
 
@@ -2420,7 +2420,7 @@
 }
 
 
-static LRESULT 
+static LRESULT
 TAB_SetItemSize (HWND hwnd, WPARAM wParam, LPARAM lParam)
 {
   TAB_INFO *infoPtr = TAB_GetInfoPtr(hwnd);
@@ -2434,7 +2434,7 @@
     infoPtr->tabWidth = (INT)LOWORD(lParam);
     infoPtr->tabHeight = (INT)HIWORD(lParam);
     TRACE("was h=%d,w=%d, now h=%d,w=%d\n",
-	  HIWORD(lResult), LOWORD(lResult), 
+	  HIWORD(lResult), LOWORD(lResult),
 	  infoPtr->tabHeight, infoPtr->tabWidth);
   }
   infoPtr->fSizeSet = TRUE;
@@ -2442,11 +2442,11 @@
   return lResult;
 }
 
-static LRESULT 
+static LRESULT
 TAB_SetItemA (HWND hwnd, WPARAM wParam, LPARAM lParam)
 {
   TAB_INFO *infoPtr = TAB_GetInfoPtr(hwnd);
-  TCITEMA *tabItem; 
+  TCITEMA *tabItem;
   TAB_ITEM *wineItem;
   INT    iItem;
 
@@ -2464,10 +2464,10 @@
   if (tabItem->mask & TCIF_PARAM)
     wineItem->lParam = tabItem->lParam;
 
-  if (tabItem->mask & TCIF_RTLREADING) 
+  if (tabItem->mask & TCIF_RTLREADING)
     FIXME("TCIF_RTLREADING\n");
 
-  if (tabItem->mask & TCIF_STATE) 
+  if (tabItem->mask & TCIF_STATE)
     wineItem->dwState = tabItem->dwState;
 
   if (tabItem->mask & TCIF_TEXT)
@@ -2520,7 +2520,7 @@
 }
 
 
-static LRESULT 
+static LRESULT
 TAB_GetItemCount (HWND hwnd, WPARAM wParam, LPARAM lParam)
 {
    TAB_INFO *infoPtr = TAB_GetInfoPtr(hwnd);
@@ -2529,7 +2529,7 @@
 }
 
 
-static LRESULT 
+static LRESULT
 TAB_GetItemA (HWND hwnd, WPARAM wParam, LPARAM lParam)
 {
    TAB_INFO *infoPtr = TAB_GetInfoPtr(hwnd);
@@ -2545,26 +2545,26 @@
 
   wineItem = &infoPtr->items[iItem];
 
-  if (tabItem->mask & TCIF_IMAGE) 
+  if (tabItem->mask & TCIF_IMAGE)
     tabItem->iImage = wineItem->iImage;
 
-  if (tabItem->mask & TCIF_PARAM) 
+  if (tabItem->mask & TCIF_PARAM)
     tabItem->lParam = wineItem->lParam;
 
-  if (tabItem->mask & TCIF_RTLREADING) 
+  if (tabItem->mask & TCIF_RTLREADING)
     FIXME("TCIF_RTLREADING\n");
 
-  if (tabItem->mask & TCIF_STATE) 
+  if (tabItem->mask & TCIF_STATE)
     tabItem->dwState = wineItem->dwState;
 
-  if (tabItem->mask & TCIF_TEXT) 
+  if (tabItem->mask & TCIF_TEXT)
    Str_GetPtrWtoA (wineItem->pszText, tabItem->pszText, tabItem->cchTextMax);
 
   return TRUE;
 }
 
 
-static LRESULT 
+static LRESULT
 TAB_GetItemW (HWND hwnd, WPARAM wParam, LPARAM lParam)
 {
   TAB_INFO *infoPtr = TAB_GetInfoPtr(hwnd);
@@ -2599,7 +2599,7 @@
 }
 
 
-static LRESULT 
+static LRESULT
 TAB_DeleteItem (HWND hwnd, WPARAM wParam, LPARAM lParam)
 {
   TAB_INFO *infoPtr = TAB_GetInfoPtr(hwnd);
@@ -2609,23 +2609,23 @@
   if ((iItem >= 0) && (iItem < infoPtr->uNumItem))
   {
     TAB_ITEM *oldItems = infoPtr->items;
-    
+
     infoPtr->uNumItem--;
     infoPtr->items = COMCTL32_Alloc(sizeof (TAB_ITEM) * infoPtr->uNumItem);
-    
-    if (iItem > 0) 
+
+    if (iItem > 0)
       memcpy(&infoPtr->items[0], &oldItems[0], iItem * sizeof(TAB_ITEM));
-    
-    if (iItem < infoPtr->uNumItem) 
+
+    if (iItem < infoPtr->uNumItem)
       memcpy(&infoPtr->items[iItem], &oldItems[iItem + 1],
               (infoPtr->uNumItem - iItem) * sizeof(TAB_ITEM));
-    
+
     COMCTL32_Free(oldItems);
 
     /* Readjust the selected index */
     if ((iItem == infoPtr->iSelected) && (iItem > 0))
       infoPtr->iSelected--;
-      
+
     if (iItem < infoPtr->iSelected)
       infoPtr->iSelected--;
 
@@ -2642,7 +2642,7 @@
   return bResult;
 }
 
-static LRESULT 
+static LRESULT
 TAB_DeleteAllItems (HWND hwnd, WPARAM wParam, LPARAM lParam)
 {
    TAB_INFO *infoPtr = TAB_GetInfoPtr(hwnd);
@@ -2653,7 +2653,7 @@
   if (infoPtr->iHotTracked >= 0)
     KillTimer(hwnd, TAB_HOTTRACK_TIMER);
   infoPtr->iHotTracked = -1;
- 
+
   TAB_SetItemBounds(hwnd);
   TAB_InvalidateTabArea(hwnd,infoPtr);
   return TRUE;
@@ -2674,11 +2674,11 @@
 
 {
   TAB_INFO *infoPtr = TAB_GetInfoPtr(hwnd);
-  
+
   TRACE("%x %lx\n",wParam, lParam);
-  
+
   infoPtr->hFont = (HFONT)wParam;
-  
+
   TAB_SetItemBounds(hwnd);
 
   TAB_InvalidateTabArea(hwnd, infoPtr);
@@ -2745,7 +2745,7 @@
     GetClientRect(parent, &parent_rect);
     cx=LOWORD (lParam);
     cy=HIWORD (lParam);
-    if (GetWindowLongA(hwnd, GWL_STYLE) & CCS_NORESIZE) 
+    if (GetWindowLongA(hwnd, GWL_STYLE) & CCS_NORESIZE)
         uPosFlags |= (SWP_NOSIZE | SWP_NOMOVE);
 
     SetWindowPos (hwnd, 0, parent_rect.left, parent_rect.top,
@@ -2764,7 +2764,7 @@
 }
 
 
-static LRESULT 
+static LRESULT
 TAB_Create (HWND hwnd, WPARAM wParam, LPARAM lParam)
 {
   TAB_INFO *infoPtr;
@@ -2776,7 +2776,7 @@
   infoPtr = (TAB_INFO *)COMCTL32_Alloc (sizeof(TAB_INFO));
 
   SetWindowLongA(hwnd, 0, (DWORD)infoPtr);
-   
+
   infoPtr->uNumItem        = 0;
   infoPtr->uNumRows        = 0;
   infoPtr->hFont           = 0;
@@ -2784,7 +2784,7 @@
   infoPtr->hcurArrow       = LoadCursorA (0, IDC_ARROWA);
   infoPtr->iSelected       = -1;
   infoPtr->iHotTracked     = -1;
-  infoPtr->uFocus          = -1;  
+  infoPtr->uFocus          = -1;
   infoPtr->hwndToolTip     = 0;
   infoPtr->DoRedraw        = TRUE;
   infoPtr->needsScrolling  = FALSE;
@@ -2792,11 +2792,11 @@
   infoPtr->leftmostVisible = 0;
   infoPtr->fSizeSet	   = FALSE;
   infoPtr->bUnicode	   = IsWindowUnicode (hwnd);
-  
-  TRACE("Created tab control, hwnd [%04x]\n", hwnd); 
 
-  /* The tab control always has the WS_CLIPSIBLINGS style. Even 
-     if you don't specify it in CreateWindow. This is necessary in 
+  TRACE("Created tab control, hwnd [%04x]\n", hwnd);
+
+  /* The tab control always has the WS_CLIPSIBLINGS style. Even
+     if you don't specify it in CreateWindow. This is necessary in
      order for paint to work correctly. This follows windows behaviour. */
   dwStyle = GetWindowLongA(hwnd, GWL_STYLE);
   SetWindowLongA(hwnd, GWL_STYLE, dwStyle|WS_CLIPSIBLINGS);
@@ -2808,37 +2808,37 @@
 		       CW_USEDEFAULT, CW_USEDEFAULT,
 		       CW_USEDEFAULT, CW_USEDEFAULT,
 		       hwnd, 0, 0, 0);
-    
+
     /* Send NM_TOOLTIPSCREATED notification */
     if (infoPtr->hwndToolTip) {
       NMTOOLTIPSCREATED nmttc;
-      
+
       nmttc.hdr.hwndFrom = hwnd;
       nmttc.hdr.idFrom = GetWindowLongA(hwnd, GWL_ID);
       nmttc.hdr.code = NM_TOOLTIPSCREATED;
       nmttc.hwndToolTips = infoPtr->hwndToolTip;
-      
+
       SendMessageA (GetParent (hwnd), WM_NOTIFY,
 		    (WPARAM)GetWindowLongA(hwnd, GWL_ID), (LPARAM)&nmttc);
     }
-  }  
-    
+  }
+
   /*
    * We need to get text information so we need a DC and we need to select
    * a font.
    */
-  hdc = GetDC(hwnd); 
+  hdc = GetDC(hwnd);
   hOldFont = SelectObject (hdc, GetStockObject (SYSTEM_FONT));
 
   /* Use the system font to determine the initial height of a tab. */
   GetTextMetricsA(hdc, &fontMetrics);
 
   /*
-   * Make sure there is enough space for the letters + growing the 
-   * selected item + extra space for the selected item.   
+   * Make sure there is enough space for the letters + growing the
+   * selected item + extra space for the selected item.
    */
   infoPtr->tabHeight = fontMetrics.tmHeight + SELECTED_TAB_OFFSET +
-	               ((dwStyle & TCS_BUTTONS) ? 2 : 1) * 
+	               ((dwStyle & TCS_BUTTONS) ? 2 : 1) *
                         VERTICAL_ITEM_PADDING;
 
   /* Initialize the width of a tab. */
@@ -2868,10 +2868,10 @@
     }
     COMCTL32_Free (infoPtr->items);
   }
-  
-  if (infoPtr->hwndToolTip) 
+
+  if (infoPtr->hwndToolTip)
     DestroyWindow (infoPtr->hwndToolTip);
- 
+
   if (infoPtr->hwndUpDown)
     DestroyWindow(infoPtr->hwndUpDown);
 
@@ -2895,67 +2895,67 @@
     {
     case TCM_GETIMAGELIST:
       return TAB_GetImageList (hwnd, wParam, lParam);
-      
+
     case TCM_SETIMAGELIST:
       return TAB_SetImageList (hwnd, wParam, lParam);
-      
+
     case TCM_GETITEMCOUNT:
       return TAB_GetItemCount (hwnd, wParam, lParam);
-      
+
     case TCM_GETITEMA:
       return TAB_GetItemA (hwnd, wParam, lParam);
-      
+
     case TCM_GETITEMW:
       return TAB_GetItemW (hwnd, wParam, lParam);
-      
+
     case TCM_SETITEMA:
       return TAB_SetItemA (hwnd, wParam, lParam);
-      
+
     case TCM_SETITEMW:
       return TAB_SetItemW (hwnd, wParam, lParam);
-      
+
     case TCM_DELETEITEM:
       return TAB_DeleteItem (hwnd, wParam, lParam);
-      
+
     case TCM_DELETEALLITEMS:
      return TAB_DeleteAllItems (hwnd, wParam, lParam);
-     
+
     case TCM_GETITEMRECT:
      return TAB_GetItemRect (hwnd, wParam, lParam);
-      
+
     case TCM_GETCURSEL:
       return TAB_GetCurSel (hwnd);
-      
+
     case TCM_HITTEST:
       return TAB_HitTest (hwnd, wParam, lParam);
-      
+
     case TCM_SETCURSEL:
       return TAB_SetCurSel (hwnd, wParam);
-      
+
     case TCM_INSERTITEMA:
       return TAB_InsertItemA (hwnd, wParam, lParam);
-      
+
     case TCM_INSERTITEMW:
       return TAB_InsertItemW (hwnd, wParam, lParam);
-      
+
     case TCM_SETITEMEXTRA:
       FIXME("Unimplemented msg TCM_SETITEMEXTRA\n");
       return 0;
-      
+
     case TCM_ADJUSTRECT:
       return TAB_AdjustRect (hwnd, (BOOL)wParam, (LPRECT)lParam);
-      
+
     case TCM_SETITEMSIZE:
       return TAB_SetItemSize (hwnd, wParam, lParam);
-      
+
     case TCM_REMOVEIMAGE:
       FIXME("Unimplemented msg TCM_REMOVEIMAGE\n");
       return 0;
-      
+
     case TCM_SETPADDING:
       FIXME("Unimplemented msg TCM_SETPADDING\n");
       return 0;
-      
+
     case TCM_GETROWCOUNT:
       return TAB_GetRowCount(hwnd);
 
@@ -2968,27 +2968,27 @@
     case TCM_HIGHLIGHTITEM:
       FIXME("Unimplemented msg TCM_HIGHLIGHTITEM\n");
       return 0;
-      
+
     case TCM_GETTOOLTIPS:
       return TAB_GetToolTips (hwnd, wParam, lParam);
-      
+
     case TCM_SETTOOLTIPS:
       return TAB_SetToolTips (hwnd, wParam, lParam);
-      
+
     case TCM_GETCURFOCUS:
       return TAB_GetCurFocus (hwnd);
-      
+
     case TCM_SETCURFOCUS:
       return TAB_SetCurFocus (hwnd, wParam);
-      
+
     case TCM_SETMINTABWIDTH:
       FIXME("Unimplemented msg TCM_SETMINTABWIDTH\n");
       return 0;
-      
+
     case TCM_DESELECTALL:
       FIXME("Unimplemented msg TCM_DESELECTALL\n");
       return 0;
-      
+
     case TCM_GETEXTENDEDSTYLE:
       FIXME("Unimplemented msg TCM_GETEXTENDEDSTYLE\n");
       return 0;
@@ -2999,34 +2999,34 @@
 
     case WM_GETFONT:
       return TAB_GetFont (hwnd, wParam, lParam);
-      
+
     case WM_SETFONT:
       return TAB_SetFont (hwnd, wParam, lParam);
-      
+
     case WM_CREATE:
       return TAB_Create (hwnd, wParam, lParam);
-      
+
     case WM_NCDESTROY:
       return TAB_Destroy (hwnd, wParam, lParam);
-      
+
     case WM_GETDLGCODE:
       return DLGC_WANTARROWS | DLGC_WANTCHARS;
-      
+
     case WM_LBUTTONDOWN:
       return TAB_LButtonDown (hwnd, wParam, lParam);
-      
+
     case WM_LBUTTONUP:
       return TAB_LButtonUp (hwnd, wParam, lParam);
-     
+
     case WM_NOTIFY:
       return SendMessageA(GetParent(hwnd), WM_NOTIFY, wParam, lParam);
- 
+
     case WM_RBUTTONDOWN:
       return TAB_RButtonDown (hwnd, wParam, lParam);
-      
+
     case WM_MOUSEMOVE:
       return TAB_MouseMove (hwnd, wParam, lParam);
-      
+
     case WM_ERASEBKGND:
       return TAB_EraseBackground (hwnd, (HDC)wParam);
 
@@ -3035,7 +3035,7 @@
 
     case WM_SIZE:
       return TAB_Size (hwnd, wParam, lParam);
-      
+
     case WM_SETREDRAW:
       return TAB_SetRedraw (hwnd, wParam);
 
@@ -3050,7 +3050,7 @@
     case WM_SYSCOLORCHANGE:
       COMCTL32_RefreshSysColors();
       return 0;
-      
+
     case WM_KILLFOCUS:
     case WM_SETFOCUS:
       return TAB_FocusChanging(hwnd, uMsg, wParam, lParam);
@@ -3084,7 +3084,7 @@
   wndClass.hCursor       = LoadCursorA (0, IDC_ARROWA);
   wndClass.hbrBackground = (HBRUSH)NULL;
   wndClass.lpszClassName = WC_TABCONTROLA;
-  
+
   RegisterClassA (&wndClass);
 }
 
diff --git a/dlls/comctl32/toolbar.c b/dlls/comctl32/toolbar.c
index 9a7b031..9db550f 100644
--- a/dlls/comctl32/toolbar.c
+++ b/dlls/comctl32/toolbar.c
@@ -85,7 +85,7 @@
     BOOL bHot;
     INT nRow;
     RECT rect;
-} TBUTTON_INFO; 
+} TBUTTON_INFO;
 
 typedef struct
 {
@@ -170,7 +170,7 @@
 #define SEPARATOR_WIDTH    8
 #define TOP_BORDER         2
 #define BOTTOM_BORDER      2
-#define DDARROW_WIDTH      11 
+#define DDARROW_WIDTH      11
 
 #define TOOLBAR_GetInfoPtr(hwnd) ((TOOLBAR_INFO *)GetWindowLongA(hwnd,0))
 #define TOOLBAR_HasText(x, y) (TOOLBAR_GetText(x, y) ? TRUE : FALSE)
@@ -196,7 +196,7 @@
         lpText = (LPWSTR)btnPtr->iString;
     else if ((btnPtr->iString >= 0) && (btnPtr->iString < infoPtr->nNumStrings))
         lpText = infoPtr->strings[btnPtr->iString];
-    
+
     return lpText;
 }
 
@@ -212,7 +212,7 @@
 	    TRACE("button %d id %d, hot=%s, row=%d, rect=(%d,%d)-(%d,%d)\n",
 		  btn_num, bP->idCommand,
 		  (bP->bHot) ? "TRUE":"FALSE", bP->nRow,
-		  bP->rect.left, bP->rect.top, 
+		  bP->rect.left, bP->rect.top,
 		  bP->rect.right, bP->rect.bottom);
     }
 }
@@ -263,7 +263,7 @@
 {
 	if(!IsWindow(infoPtr->hwndSelf))
 	    return 0;   /* we have just been destroyed */
-	
+
     nmhdr->idFrom = GetDlgCtrlID (infoPtr->hwndSelf);
     nmhdr->hwndFrom = infoPtr->hwndSelf;
     nmhdr->code = code;
@@ -272,10 +272,10 @@
 	  (infoPtr->bNtfUnicode) ? "via Unicode" : "via ANSI");
 
     if (infoPtr->bNtfUnicode)
-	return SendMessageW (infoPtr->hwndNotify, WM_NOTIFY, 
+	return SendMessageW (infoPtr->hwndNotify, WM_NOTIFY,
 			     (WPARAM) nmhdr->idFrom, (LPARAM)nmhdr);
     else
-	return SendMessageA (infoPtr->hwndNotify, WM_NOTIFY, 
+	return SendMessageA (infoPtr->hwndNotify, WM_NOTIFY,
 			     (WPARAM) nmhdr->idFrom, (LPARAM)nmhdr);
 }
 
@@ -286,7 +286,7 @@
 * If the button specifies I_IMAGECALLBACK, then the TBN_GETDISPINFO
 * is issued to retrieve the index.
 */
-static INT 
+static INT
 TOOLBAR_GetBitmapIndex(TOOLBAR_INFO *infoPtr, TBUTTON_INFO *btnPtr)
 {
     INT ret = btnPtr->iBitmap;
@@ -305,14 +305,14 @@
 	    btnPtr->iBitmap = nmgd.iImage;
 	}
 	ret = nmgd.iImage;
-	TRACE("TBN_GETDISPINFOA returned bitmap id %d, mask=%08lx, nNumBitmaps=%d\n", 
+	TRACE("TBN_GETDISPINFOA returned bitmap id %d, mask=%08lx, nNumBitmaps=%d\n",
 	      ret, nmgd.dwMask, infoPtr->nNumBitmaps);
     }
     return ret;
 }
 
 
-static BOOL 
+static BOOL
 TOOLBAR_IsValidBitmapIndex(TOOLBAR_INFO *infoPtr, INT index)
 {
     if (((index>=0) && (index <= infoPtr->nNumBitmaps)) ||
@@ -328,7 +328,7 @@
 *
 * This function validates the bitmap index (including I_IMAGECALLBACK
 * functionality). It then draws the image via the ImageList_Draw
-* function. It returns TRUE if the image was drawn, FALSE otherwise. 
+* function. It returns TRUE if the image was drawn, FALSE otherwise.
 */
 static BOOL
 TOOLBAR_DrawImageList (TOOLBAR_INFO *infoPtr, TBUTTON_INFO *btnPtr, HIMAGELIST himl,
@@ -340,7 +340,7 @@
 
     if (!TOOLBAR_IsValidBitmapIndex(infoPtr,btnPtr->iBitmap)) {
 	if (btnPtr->iBitmap == I_IMAGENONE) return FALSE;
-	ERR("index %d is not valid, max %d\n", 
+	ERR("index %d is not valid, max %d\n",
 	    btnPtr->iBitmap, infoPtr->nNumBitmaps);
 	return FALSE;
     }
@@ -375,7 +375,7 @@
 
     if (!TOOLBAR_IsValidBitmapIndex(infoPtr,btnPtr->iBitmap)) {
 	if (btnPtr->iBitmap == I_IMAGENONE) return FALSE;
-	ERR("index %d is not valid, max %d\n", 
+	ERR("index %d is not valid, max %d\n",
 	    btnPtr->iBitmap, infoPtr->nNumBitmaps);
 	return FALSE;
     }
@@ -402,7 +402,7 @@
     myrect.top = lpRect->top + 2;
     myrect.bottom = lpRect->bottom - 2;
 
-    newcolor = (infoPtr->clrBtnShadow == CLR_DEFAULT) ? 
+    newcolor = (infoPtr->clrBtnShadow == CLR_DEFAULT) ?
 	        comctl32_color.clrBtnShadow : infoPtr->clrBtnShadow;
     oldcolor = SetBkColor (hdc, newcolor);
     ExtTextOutA (hdc, 0, 0, ETO_OPAQUE, &myrect, 0, 0, 0);
@@ -410,7 +410,7 @@
     myrect.left = myrect.right;
     myrect.right = myrect.left + 1;
 
-    newcolor = (infoPtr->clrBtnHighlight == CLR_DEFAULT) ? 
+    newcolor = (infoPtr->clrBtnHighlight == CLR_DEFAULT) ?
 	        comctl32_color.clrBtnHighlight : infoPtr->clrBtnHighlight;
     SetBkColor (hdc, newcolor);
     ExtTextOutA (hdc, 0, 0, ETO_OPAQUE, &myrect, 0, 0, 0);
@@ -446,7 +446,7 @@
     TRACE("rect=(%d,%d)-(%d,%d)\n",
 	  myrect.left, myrect.top, myrect.right, myrect.bottom);
 
-    newcolor = (infoPtr->clrBtnShadow == CLR_DEFAULT) ? 
+    newcolor = (infoPtr->clrBtnShadow == CLR_DEFAULT) ?
 	        comctl32_color.clrBtnShadow : infoPtr->clrBtnShadow;
     oldcolor = SetBkColor (hdc, newcolor);
     ExtTextOutA (hdc, 0, 0, ETO_OPAQUE, &myrect, 0, 0, 0);
@@ -454,7 +454,7 @@
     myrect.top = myrect.bottom;
     myrect.bottom = myrect.top + 1;
 
-    newcolor = (infoPtr->clrBtnHighlight == CLR_DEFAULT) ? 
+    newcolor = (infoPtr->clrBtnHighlight == CLR_DEFAULT) ?
 	        comctl32_color.clrBtnHighlight : infoPtr->clrBtnHighlight;
     SetBkColor (hdc, newcolor);
     ExtTextOutA (hdc, 0, 0, ETO_OPAQUE, &myrect, 0, 0, 0);
@@ -631,7 +631,7 @@
             rc.right = max(rc.left, rc.right - DDARROW_WIDTH);
 	else
             rc.right = max(rc.left, rc.right - DDARROW_WIDTH - 2);
-	rcArrow.left = rc.right; 
+	rcArrow.left = rc.right;
     }
 
     /* Center the bitmap horizontally and vertically */
@@ -645,7 +645,7 @@
     else
         rcBitmap.top+=(infoPtr->nButtonHeight - infoPtr->nBitmapHeight) / 2;
 
-    TRACE("iBitmap: %d, start=(%d,%d) w=%d, h=%d\n", 
+    TRACE("iBitmap: %d, start=(%d,%d) w=%d, h=%d\n",
 	  btnPtr->iBitmap, rcBitmap.left, rcBitmap.top,
 	  infoPtr->nBitmapWidth, infoPtr->nBitmapHeight);
     TRACE ("iString: %x\n", btnPtr->iString);
@@ -656,7 +656,7 @@
 
 	InflateRect (&rcText, -3, -3);
 
-	if (infoPtr->himlDef && 
+	if (infoPtr->himlDef &&
             TOOLBAR_IsValidBitmapIndex(infoPtr,btnPtr->iBitmap)) {
 	        /* The following test looked like this before
 		 * I changed it. IE4 "Links" toolbar would not
@@ -664,7 +664,7 @@
 		 *   ((dwStyle & TBSTYLE_LIST) &&
 		 *    ((btnPtr->fsStyle & TBSTYLE_AUTOSIZE) == 0) &&
 		 *       (btnPtr->iBitmap != I_IMAGENONE))
-		 */ 
+		 */
 	        if (dwStyle & TBSTYLE_LIST) {
 		    /* LIST style w/ ICON offset is by matching native. */
 		    /* Matches IE4 "Links" bar.   - GA 8/01             */
@@ -711,7 +711,7 @@
     tbcd.hbrLines = 0;
     tbcd.hpenLines = 0;
 
-    /* Issue Item Prepaint notify */ 
+    /* Issue Item Prepaint notify */
     infoPtr->dwItemCustDraw = 0;
     infoPtr->dwItemCDFlag = 0;
     if (infoPtr->dwBaseCustDraw & CDRF_NOTIFYITEMDRAW)
@@ -725,7 +725,7 @@
 	ntfret = TOOLBAR_SendNotify ((NMHDR *)&tbcd, infoPtr, NM_CUSTOMDRAW);
 	infoPtr->dwItemCustDraw = ntfret & 0xffff;
 	infoPtr->dwItemCDFlag = ntfret & 0xffff0000;
-	if (infoPtr->dwItemCustDraw & CDRF_SKIPDEFAULT) 
+	if (infoPtr->dwItemCustDraw & CDRF_SKIPDEFAULT)
 	    return;
 	/* save the only part of the rect that the user can change */
 	rcText.right = tbcd.rcText.right + rc.left;
@@ -765,7 +765,7 @@
             DrawEdge (hdc, &rcArrow, EDGE_RAISED,
 		      BF_SOFT | BF_RECT | BF_MIDDLE | BF_ADJUST);
 	}
-	
+
         if (hasDropDownArrow)
 	{
 	    TOOLBAR_DrawArrow(hdc, rcArrow.left+1, rcArrow.top+1, COLOR_3DHIGHLIGHT);
@@ -773,7 +773,7 @@
 	}
 
 	if (!TOOLBAR_DrawImageList (infoPtr, btnPtr, infoPtr->himlDis,
-				   hdc, rcBitmap.left, rcBitmap.top, 
+				   hdc, rcBitmap.left, rcBitmap.top,
 				   ILD_NORMAL))
 	    TOOLBAR_DrawMasked (infoPtr, btnPtr, hdc, rcBitmap.left, rcBitmap.top);
 
@@ -804,7 +804,7 @@
 	    TOOLBAR_DrawArrow(hdc, rcArrow.left, rcArrow.top, COLOR_WINDOWFRAME);
 
 	TOOLBAR_DrawImageList (infoPtr, btnPtr, infoPtr->himlDef,
-			       hdc, rcBitmap.left+offset, rcBitmap.top+offset, 
+			       hdc, rcBitmap.left+offset, rcBitmap.top+offset,
 			       ILD_NORMAL);
 
 	TOOLBAR_DrawString (infoPtr, btnPtr, hdc, btnPtr->fsState, dwStyle, &rcText, lpText, &tbcd);
@@ -825,16 +825,16 @@
 	}
 
 	TOOLBAR_DrawPattern (hdc, &rc);
-        
+
 	TOOLBAR_DrawImageList (infoPtr, btnPtr, infoPtr->himlDef,
-			       hdc, rcBitmap.left+1, rcBitmap.top+1, 
+			       hdc, rcBitmap.left+1, rcBitmap.top+1,
 			       ILD_NORMAL);
 
 	TOOLBAR_DrawString (infoPtr, btnPtr, hdc, btnPtr->fsState, dwStyle, &rcText, lpText, &tbcd);
 	goto FINALNOTIFY;
     }
 
-    /* indeterminate */	
+    /* indeterminate */
     if (btnPtr->fsState & TBSTATE_INDETERMINATE) {
 	if (!(infoPtr->dwItemCDFlag & TBCDRF_NOEDGES))
 	    DrawEdge (hdc, &rc, EDGE_RAISED,
@@ -888,9 +888,9 @@
 
 	if (btnPtr->bHot) {
 	    /* if hot, attempt to draw with himlHot, if fails, use himlDef */
-	    if (!TOOLBAR_DrawImageList (infoPtr, btnPtr, 
+	    if (!TOOLBAR_DrawImageList (infoPtr, btnPtr,
 					infoPtr->himlHot,
-					hdc, rcBitmap.left, 
+					hdc, rcBitmap.left,
 					rcBitmap.top, ILD_NORMAL))
 		TOOLBAR_DrawImageList (infoPtr, btnPtr, infoPtr->himlDef,
 				       hdc, rcBitmap.left, rcBitmap.top,
@@ -918,7 +918,7 @@
 	TOOLBAR_DrawImageList (infoPtr, btnPtr, infoPtr->himlDef,
 			       hdc, rcBitmap.left, rcBitmap.top,
 			       ILD_NORMAL);}
-    
+
 
     TOOLBAR_DrawString (infoPtr, btnPtr, hdc, btnPtr->fsState, dwStyle, &rcText, lpText, &tbcd);
 
@@ -1002,7 +1002,7 @@
 * only DrawText does. Note that the TBSTYLE_NOPREFIX is handled here.
 */
 static void
-TOOLBAR_MeasureString(TOOLBAR_INFO *infoPtr, TBUTTON_INFO *btnPtr, 
+TOOLBAR_MeasureString(TOOLBAR_INFO *infoPtr, TBUTTON_INFO *btnPtr,
 		      HDC hdc, LPSIZE lpSize)
 {
     RECT myrect;
@@ -1010,7 +1010,7 @@
     lpSize->cx = 0;
     lpSize->cy = 0;
 
-    if (!(btnPtr->fsState & TBSTATE_HIDDEN) ) 
+    if (!(btnPtr->fsState & TBSTATE_HIDDEN) )
     {
         LPWSTR lpText = TOOLBAR_GetText(infoPtr, btnPtr);
 
@@ -1080,17 +1080,17 @@
 /***********************************************************************
 * 		TOOLBAR_WrapToolbar
 *
-* This function walks through the buttons and seperators in the 
-* toolbar, and sets the TBSTATE_WRAP flag only on those items where 
-* wrapping should occur based on the width of the toolbar window.  
-* It does *not* calculate button placement itself.  That task 
-* takes place in TOOLBAR_CalcToolbar. If the program wants to manage 
-* the toolbar wrapping on its own, it can use the TBSTYLE_WRAPABLE 
+* This function walks through the buttons and seperators in the
+* toolbar, and sets the TBSTATE_WRAP flag only on those items where
+* wrapping should occur based on the width of the toolbar window.
+* It does *not* calculate button placement itself.  That task
+* takes place in TOOLBAR_CalcToolbar. If the program wants to manage
+* the toolbar wrapping on its own, it can use the TBSTYLE_WRAPABLE
 * flag, and set the TBSTATE_WRAP flags manually on the appropriate items.
 *
-* Note: TBSTYLE_WRAPABLE or TBSTYLE_EX_UNDOC1 can be used also to allow 
-* vertical toolbar lists. 
-*/ 
+* Note: TBSTYLE_WRAPABLE or TBSTYLE_EX_UNDOC1 can be used also to allow
+* vertical toolbar lists.
+*/
 
 static void
 TOOLBAR_WrapToolbar( HWND hwnd, DWORD dwStyle )
@@ -1101,10 +1101,10 @@
     RECT rc;
     BOOL bWrap, bButtonWrap;
 
-    /* 	When the toolbar window style is not TBSTYLE_WRAPABLE,	*/ 
+    /* 	When the toolbar window style is not TBSTYLE_WRAPABLE,	*/
     /*	no layout is necessary. Applications may use this style */
     /*	to perform their own layout on the toolbar. 		*/
-    if( !(dwStyle & TBSTYLE_WRAPABLE) && 
+    if( !(dwStyle & TBSTYLE_WRAPABLE) &&
 	!(infoPtr->dwExStyle & TBSTYLE_EX_UNDOC1) )  return;
 
     btnPtr = infoPtr->buttons;
@@ -1126,7 +1126,7 @@
     {
 	bWrap = FALSE;
 	btnPtr[i].fsState &= ~TBSTATE_WRAP;
-	
+
 	if (btnPtr[i].fsState & TBSTATE_HIDDEN)
 	    continue;
 
@@ -1138,18 +1138,18 @@
 	/* width.  - GA 8/01                                         */
 	if ((btnPtr[i].fsStyle & TBSTYLE_SEP) &&
 	    !(btnPtr[i].fsStyle & TBSTYLE_DROPDOWN))
-	    cx = (btnPtr[i].iBitmap > 0) ?  
+	    cx = (btnPtr[i].iBitmap > 0) ?
 			btnPtr[i].iBitmap : SEPARATOR_WIDTH;
 	else
 	    cx = infoPtr->nButtonWidth;
 
-	/* Two or more adjacent separators form a separator group.   */ 
+	/* Two or more adjacent separators form a separator group.   */
 	/* The first separator in a group should be wrapped to the   */
 	/* next row if the previous wrapping is on a button.	     */
 	if( bButtonWrap &&
-		(btnPtr[i].fsStyle & TBSTYLE_SEP) && 
+		(btnPtr[i].fsStyle & TBSTYLE_SEP) &&
 		(i + 1 < infoPtr->nNumButtons ) &&
-		(btnPtr[i + 1].fsStyle & TBSTYLE_SEP) ) 
+		(btnPtr[i + 1].fsStyle & TBSTYLE_SEP) )
 	{
 	    TRACE("wrap point 1 btn %d style %02x\n", i, btnPtr[i].fsStyle);
 	    btnPtr[i].fsState |= TBSTATE_WRAP;
@@ -1162,28 +1162,28 @@
 	/* The layout makes sure the bitmap is visible, but not the button. */
 	/* Test added to also wrap after a button that starts a row but     */
 	/* is bigger than the area.  - GA  8/01                             */
-	if (( x + cx - (infoPtr->nButtonWidth - infoPtr->nBitmapWidth) / 2 
+	if (( x + cx - (infoPtr->nButtonWidth - infoPtr->nBitmapWidth) / 2
 	   > infoPtr->nWidth ) ||
 	    ((x == infoPtr->nIndent) && (cx > infoPtr->nWidth)))
 	{
 	    BOOL bFound = FALSE;
 
-	    /* 	If the current button is a separator and not hidden,  */ 
+	    /* 	If the current button is a separator and not hidden,  */
 	    /*	go to the next until it reaches a non separator.      */
 	    /*	Wrap the last separator if it is before a button.     */
 	    while( ( ((btnPtr[i].fsStyle & TBSTYLE_SEP) &&
-		      !(btnPtr[i].fsStyle & TBSTYLE_DROPDOWN)) || 
+		      !(btnPtr[i].fsStyle & TBSTYLE_DROPDOWN)) ||
 		     (btnPtr[i].fsState & TBSTATE_HIDDEN) ) &&
 			i < infoPtr->nNumButtons )
 	    {
 		i++;
 		bFound = TRUE;
 	    }
-    
+
 	    if( bFound && i < infoPtr->nNumButtons )
 	    {
 		i--;
-		TRACE("wrap point 2 btn %d style %02x, x=%d, cx=%d\n", 
+		TRACE("wrap point 2 btn %d style %02x, x=%d, cx=%d\n",
 		      i, btnPtr[i].fsStyle, x, cx);
 		btnPtr[i].fsState |= TBSTATE_WRAP;
 		x = infoPtr->nIndent;
@@ -1193,20 +1193,20 @@
 	    else if ( i >= infoPtr->nNumButtons)
 		break;
 
-	    /* 	If the current button is not a separator, find the last  */ 
+	    /* 	If the current button is not a separator, find the last  */
 	    /*	separator and wrap it.   				 */
 	    for ( j = i - 1; j >= 0  &&  !(btnPtr[j].fsState & TBSTATE_WRAP); j--)
 	    {
 		if ((btnPtr[j].fsStyle & TBSTYLE_SEP) &&
 			!(btnPtr[j].fsState & TBSTATE_HIDDEN))
 		{
-		    bFound = TRUE; 
-		    i = j; 
-		    TRACE("wrap point 3 btn %d style %02x, x=%d, cx=%d\n", 
+		    bFound = TRUE;
+		    i = j;
+		    TRACE("wrap point 3 btn %d style %02x, x=%d, cx=%d\n",
 			  i, btnPtr[i].fsStyle, x, cx);
 		    x = infoPtr->nIndent;
 		    btnPtr[j].fsState |= TBSTATE_WRAP;
-		    bButtonWrap = FALSE; 
+		    bButtonWrap = FALSE;
 		    break;
 		}
 	    }
@@ -1215,15 +1215,15 @@
 	    /*  non-hidden previous button.  			     	*/
 	    if (!bFound)
 	    {
-		for ( j = i - 1; 
+		for ( j = i - 1;
 			j >= 0 && !(btnPtr[j].fsState & TBSTATE_WRAP); j--)
 		{
-		    if (btnPtr[j].fsState & TBSTATE_HIDDEN) 
+		    if (btnPtr[j].fsState & TBSTATE_HIDDEN)
 			continue;
 
-		    bFound = TRUE; 
-		    i = j; 
-		    TRACE("wrap point 4 btn %d style %02x, x=%d, cx=%d\n", 
+		    bFound = TRUE;
+		    i = j;
+		    TRACE("wrap point 4 btn %d style %02x, x=%d, cx=%d\n",
 			  i, btnPtr[i].fsStyle, x, cx);
 		    x = infoPtr->nIndent;
 		    btnPtr[j].fsState |= TBSTATE_WRAP;
@@ -1233,7 +1233,7 @@
 	    }
 
 	    /* If all above failed, wrap the current button. */
-	    if (!bFound)  
+	    if (!bFound)
 	    {
 		TRACE("wrap point 5 btn %d style %02x, x=%d, cx=%d\n",
 		      i, btnPtr[i].fsStyle, x, cx);
@@ -1244,10 +1244,10 @@
 		    bButtonWrap = FALSE;
 		else
 		    bButtonWrap = TRUE;
-	    }		    
+	    }
 	}
 	else {
-	    TRACE("wrap point 6 btn %d style %02x, x=%d, cx=%d\n", 
+	    TRACE("wrap point 6 btn %d style %02x, x=%d, cx=%d\n",
 		  i, btnPtr[i].fsStyle, x, cx);
 	    x += cx;
 	}
@@ -1258,13 +1258,13 @@
 /***********************************************************************
 * 		TOOLBAR_CalcToolbar
 *
-* This function calculates button and separator placement. It first 
-* calculates the button sizes, gets the toolbar window width and then 
-* calls TOOLBAR_WrapToolbar to determine which buttons we need to wrap 
+* This function calculates button and separator placement. It first
+* calculates the button sizes, gets the toolbar window width and then
+* calls TOOLBAR_WrapToolbar to determine which buttons we need to wrap
 * on. It assigns a new location to each item and sends this location to
-* the tooltip window if appropriate. Finally, it updates the rcBound 
-* rect and calculates the new required toolbar window height. 
-*/  
+* the tooltip window if appropriate. Finally, it updates the rcBound
+* rect and calculates the new required toolbar window height.
+*/
 
 static void
 TOOLBAR_CalcToolbar (HWND hwnd)
@@ -1301,10 +1301,10 @@
         if (sizeString.cy > 0)
         {
             if (usesBitmaps)
-		infoPtr->nButtonHeight = sizeString.cy + 
+		infoPtr->nButtonHeight = sizeString.cy +
 		    2 + /* this is the space to separate text from bitmap */
                   infoPtr->nBitmapHeight + 6;
-            else 
+            else
                 infoPtr->nButtonHeight = sizeString.cy + 6;
         }
         else if (infoPtr->nButtonHeight < infoPtr->nBitmapHeight + 6)
@@ -1327,8 +1327,8 @@
     y  = 0;
 
    /*
-    * We will set the height below, and we set the width on entry 
-    * so we do not reset them here.. 
+    * We will set the height below, and we set the width on entry
+    * so we do not reset them here..
     */
 #if 0
     GetClientRect( hwnd, &rc );
@@ -1389,7 +1389,7 @@
 	}
 	else
 	{
-            if (btnPtr->fsStyle & TBSTYLE_AUTOSIZE) 
+            if (btnPtr->fsStyle & TBSTYLE_AUTOSIZE)
             {
               SIZE sz;
 	      HDC hdc;
@@ -1406,7 +1406,7 @@
 	      /* Fudge amount measured against IE4 "menu" and "Links" */
 	      /* toolbars with native control (v4.71).  -  GA 8/01    */
               cx = sz.cx + 6 + 5 + 5;
-	      if ((dwStyle & TBSTYLE_LIST) && 
+	      if ((dwStyle & TBSTYLE_LIST) &&
 		  (TOOLBAR_TestImageExist (infoPtr, btnPtr, infoPtr->himlDef)))
 		  cx += infoPtr->nBitmapWidth;
             }
@@ -1414,7 +1414,7 @@
 	      cx = infoPtr->nButtonWidth;
 
 	    if (hasDropDownArrows && (btnPtr->fsStyle & TBSTYLE_DROPDOWN))
-	      cx += DDARROW_WIDTH; 
+	      cx += DDARROW_WIDTH;
 	}
 	if (btnPtr->fsState & TBSTATE_WRAP )
 		    bWrap = TRUE;
@@ -1429,7 +1429,7 @@
 	    infoPtr->rcBound.bottom = y + cy;
 
 	/* Set the toolTip only for non-hidden, non-separator button */
-	if (infoPtr->hwndToolTip && !(btnPtr->fsStyle & TBSTYLE_SEP )) 
+	if (infoPtr->hwndToolTip && !(btnPtr->fsStyle & TBSTYLE_SEP ))
 	{
 	    TTTOOLINFOA ti;
 
@@ -1454,17 +1454,17 @@
 	{
 	    if ( !(btnPtr->fsStyle & TBSTYLE_SEP) )
 	        y += cy;
-	    else 
-	    {   
+	    else
+	    {
 		/* UNDOCUMENTED: If a separator has a non zero bitmap index, */
 		/* it is the actual width of the separator. This is used for */
 		/* custom controls in toolbars. 			     */
 		if ( !(btnPtr->fsStyle & TBSTYLE_DROPDOWN))
 		    y += cy + ( (btnPtr->iBitmap > 0 ) ?
-				btnPtr->iBitmap : SEPARATOR_WIDTH) * 2 /3; 
+				btnPtr->iBitmap : SEPARATOR_WIDTH) * 2 /3;
 		else
 		    y += cy;
-	     
+
 		/* nSepRows is used to calculate the extra height follwoing  */
 		/* the last row.					     */
 		nSepRows++;
@@ -1495,10 +1495,10 @@
 
     /* nSepRows * (infoPtr->nBitmapHeight + 1) is the space following 	*/
     /* the last row. 							*/
-    infoPtr->nHeight = TOP_BORDER + (nRows + 1) * infoPtr->nButtonHeight + 
+    infoPtr->nHeight = TOP_BORDER + (nRows + 1) * infoPtr->nButtonHeight +
 		       	nSepRows * (SEPARATOR_WIDTH * 2 / 3) +
-			nSepRows * (infoPtr->nBitmapHeight + 1) + 
-			BOTTOM_BORDER; 
+			nSepRows * (infoPtr->nBitmapHeight + 1) +
+			BOTTOM_BORDER;
 #endif
 
     infoPtr->nHeight = infoPtr->rcBound.bottom - infoPtr->rcBound.top;
@@ -1513,7 +1513,7 @@
     TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr (hwnd);
     TBUTTON_INFO *btnPtr;
     INT i;
-    
+
     btnPtr = infoPtr->buttons;
     for (i = 0; i < infoPtr->nNumButtons; i++, btnPtr++) {
 	if (btnPtr->fsState & TBSTATE_HIDDEN)
@@ -1593,7 +1593,7 @@
     /* check next buttons */
     nRunIndex = nIndex + 1;
     while (nRunIndex < infoPtr->nNumButtons) {
-	btnPtr = &infoPtr->buttons[nRunIndex];	
+	btnPtr = &infoPtr->buttons[nRunIndex];
 	if ((btnPtr->fsStyle & TBSTYLE_CHECKGROUP) == TBSTYLE_CHECKGROUP) {
 	    if (btnPtr->fsState & TBSTATE_CHECKED)
 		return nRunIndex;
@@ -1648,7 +1648,7 @@
 		char Buffer[256];
 		int i = 0;
 		int index;
-		
+
 		infoPtr = custInfo->tbInfo;
 
 		/* send TBN_QUERYINSERT notification */
@@ -1668,8 +1668,8 @@
 
 		    /* send TBN_QUERYDELETE notification */
 		    nmtb.iItem = i;
-		    btnInfo->bRemovable = TOOLBAR_SendNotify ((NMHDR *) &nmtb, 
-						      infoPtr, 
+		    btnInfo->bRemovable = TOOLBAR_SendNotify ((NMHDR *) &nmtb,
+						      infoPtr,
 						      TBN_QUERYDELETE);
 
 		    index = (int)SendDlgItemMessageA (hwnd, IDC_TOOLBARBTN_LBOX, LB_ADDSTRING, 0, 0);
@@ -1697,7 +1697,7 @@
 		    if (!TOOLBAR_SendNotify ((NMHDR *) &nmtb, infoPtr, TBN_GETBUTTONINFOA))
 			break;
 
-		    TRACE("style: %x\n", nmtb.tbButton.fsStyle);		
+		    TRACE("style: %x\n", nmtb.tbButton.fsStyle);
 
 		    /* insert button into the apropriate list */
 		    index = TOOLBAR_GetButtonIndex (custInfo->tbInfo, nmtb.tbButton.idCommand, FALSE);
@@ -1773,7 +1773,7 @@
 
 			/* send TBN_QUERYINSERT notification */
 			nmtb.iItem = index;
-		        TOOLBAR_SendNotify ((NMHDR *) &nmtb, infoPtr, 
+		        TOOLBAR_SendNotify ((NMHDR *) &nmtb, infoPtr,
 					TBN_QUERYINSERT);
 
 			/* get list box item */
@@ -2100,18 +2100,18 @@
 	TRACE ("adding %d internal bitmaps!\n", nButtons);
 
 	/* Windows resize all the buttons to the size of a newly added standard image */
-	if (lpAddBmp->nID & 1) 
+	if (lpAddBmp->nID & 1)
 	{
 	    /* large icons */
-	    /* FIXME: on windows the size of the images is 25x24 but the size of the bitmap 
-             * in rsrc is only 24x24. Fix the bitmap (how?) and then fix this 
+	    /* FIXME: on windows the size of the images is 25x24 but the size of the bitmap
+             * in rsrc is only 24x24. Fix the bitmap (how?) and then fix this
              */
 	    SendMessageA (hwnd, TB_SETBITMAPSIZE, 0,
 			  MAKELPARAM((WORD)24, (WORD)24));
 	    SendMessageA (hwnd, TB_SETBUTTONSIZE, 0,
 			  MAKELPARAM((WORD)31, (WORD)30));
-	}	
-	else 
+	}
+	else
 	{
 	    /* small icons */
 	    SendMessageA (hwnd, TB_SETBITMAPSIZE, 0,
@@ -2119,7 +2119,7 @@
 	    SendMessageA (hwnd, TB_SETBUTTONSIZE, 0,
 			  MAKELPARAM((WORD)22, (WORD)22));
 	}
-	
+
 	TOOLBAR_CalcToolbar (hwnd);
     }
     else
@@ -2127,10 +2127,10 @@
 	nButtons = (INT)wParam;
 	if (nButtons <= 0)
 	    return -1;
-	
+
 	TRACE ("adding %d bitmaps!\n", nButtons);
     }
-    
+
     if (!(infoPtr->himlDef)) {
 	/* create new default image list */
 	TRACE ("creating default image list!\n");
@@ -2146,7 +2146,7 @@
     /* Add bitmaps to the default image list */
     if (lpAddBmp->hInst == (HINSTANCE)0)
     {
-	nIndex = 
+	nIndex =
 	    ImageList_AddMasked (infoPtr->himlDef, (HBITMAP)lpAddBmp->nID,
 				 CLR_DEFAULT);
     }
@@ -2476,7 +2476,7 @@
 	if (szString[0] == L'|')
 	{
 	    PWSTR p = szString + 1;
-		
+
 	    nIndex = infoPtr->nNumStrings;
 	    while (*p != L'|') {
 
@@ -2698,7 +2698,7 @@
 	btnPtr->fsState &= ~TBSTATE_CHECKED;
     else {
 	if (btnPtr->fsStyle & TBSTYLE_GROUP) {
-	    nOldIndex = 
+	    nOldIndex =
 		TOOLBAR_GetCheckedGroupButtonIndex (infoPtr, nIndex);
 	    if (nOldIndex == nIndex)
 		return 0;
@@ -2781,7 +2781,7 @@
     if ((nIndex < 0) || (nIndex >= infoPtr->nNumButtons))
 	return FALSE;
 
-    if ((infoPtr->hwndToolTip) && 
+    if ((infoPtr->hwndToolTip) &&
 	!(infoPtr->buttons[nIndex].fsStyle & TBSTYLE_SEP)) {
 	TTTOOLINFOA ti;
 
@@ -2976,7 +2976,7 @@
     if (lpTbInfo->cbSize < sizeof(TBBUTTONINFOW))
 	return -1;
 
-    nIndex = TOOLBAR_GetButtonIndex (infoPtr, (INT)wParam, 
+    nIndex = TOOLBAR_GetButtonIndex (infoPtr, (INT)wParam,
 				     lpTbInfo->dwMask & 0x80000000);
     if (nIndex == -1)
 	return -1;
@@ -3134,7 +3134,7 @@
 	return FALSE;
     if (btnPtr->fsState & TBSTATE_HIDDEN)
 	return FALSE;
-    
+
     lpRect->left   = btnPtr->rect.left;
     lpRect->right  = btnPtr->rect.right;
     lpRect->bottom = btnPtr->rect.bottom;
@@ -3195,7 +3195,7 @@
     lpRect = (LPRECT)lParam;
     if (lpRect == NULL)
 	return FALSE;
-    
+
     lpRect->left   = btnPtr->rect.left;
     lpRect->right  = btnPtr->rect.right;
     lpRect->bottom = btnPtr->rect.bottom;
@@ -3273,7 +3273,7 @@
 {
     TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr (hwnd);
 
-    TRACE("%s hwnd=0x%x stub!\n", 
+    TRACE("%s hwnd=0x%x stub!\n",
 	   infoPtr->bUnicode ? "TRUE" : "FALSE", hwnd);
 
     return infoPtr->bUnicode;
@@ -3471,7 +3471,7 @@
     } else if (nIndex < 0)
        return FALSE;
 
-    /* If the string passed is not an index, assume address of string 
+    /* If the string passed is not an index, assume address of string
        and do our own AddString */
     if ((HIWORD(lpTbb->iString) != 0) && (lpTbb->iString != -1)) {
 	LPWSTR ptr;
@@ -3839,7 +3839,7 @@
 	return FALSE;
     if (lptbbi->cbSize < sizeof(TBBUTTONINFOA))
 	return FALSE;
-    
+
     nIndex = TOOLBAR_GetButtonIndex (infoPtr, (INT)wParam,
 				     lptbbi->dwMask & 0x80000000);
     if (nIndex == -1)
@@ -3863,7 +3863,7 @@
         if ((HIWORD(btnPtr->iString) == 0) || (btnPtr->iString == -1))
 	    /* iString is index, zero it to make Str_SetPtr succeed */
 	    btnPtr->iString=0;
-      
+
          Str_SetPtrAtoW ((LPWSTR *)&btnPtr->iString, lptbbi->pszText);
     }
     return TRUE;
@@ -3925,15 +3925,15 @@
     }
 
     /* The documentation claims you can only change the button size before
-     * any button has been added. But this is wrong. 
-     * WINZIP32.EXE (ver 8) calls this on one of its buttons after adding 
+     * any button has been added. But this is wrong.
+     * WINZIP32.EXE (ver 8) calls this on one of its buttons after adding
      * it to the toolbar, and it checks that the return value is nonzero - mjm
      * Further testing shows that we must actually perform the change too.
      */
     /*
      * The documentation also does not mention that if 0 is supplied for
      * either size, the system changes it to the default of 24 wide and
-     * 22 high. Demonstarted in ControlSpy Toolbar. GLA 3/02 
+     * 22 high. Demonstarted in ControlSpy Toolbar. GLA 3/02
      */
     infoPtr->nButtonWidth = (cx) ? cx : 24;
     infoPtr->nButtonHeight = (cy) ? cy : 22;
@@ -3956,7 +3956,7 @@
 	(infoPtr->cxMax == (INT)HIWORD(lParam))) {
 	TRACE("matches current width, min=%d, max=%d, no recalc\n",
 	      infoPtr->cxMin, infoPtr->cxMax);
-	return TRUE; 
+	return TRUE;
     }
 
     /* save new values */
@@ -3965,14 +3965,14 @@
 
     /* if both values are 0 then we are done */
     if (lParam == 0) {
-	TRACE("setting both min and max to 0, norecalc\n"); 
+	TRACE("setting both min and max to 0, norecalc\n");
 	return TRUE;
     }
 
     /* otherwise we need to recalc the toolbar and in some cases
        recalc the bounding rectangle (does DrawText w/ DT_CALCRECT
        which doesn't actually draw - GA). */
-    TRACE("number of buttons %d, cx=%d, cy=%d, recalcing\n", 
+    TRACE("number of buttons %d, cx=%d, cy=%d, recalcing\n",
 	infoPtr->nNumButtons, infoPtr->cxMin, infoPtr->cxMax);
 
     TOOLBAR_CalcToolbar (hwnd);
@@ -4021,7 +4021,7 @@
 
     /* FIXME: redraw ? */
 
-    return (LRESULT)himlTemp; 
+    return (LRESULT)himlTemp;
 }
 
 
@@ -4060,7 +4060,7 @@
 	FIXME("Unknown Toolbar Extended Style 0x%08lx. Please report.\n",
 	      (infoPtr->dwExStyle & ~TBSTYLE_EX_ALL));
 
-    return (LRESULT)dwTemp; 
+    return (LRESULT)dwTemp;
 }
 
 
@@ -4080,7 +4080,7 @@
 
     /* FIXME: redraw ? */
 
-    return (LRESULT)himlTemp; 
+    return (LRESULT)himlTemp;
 }
 
 
@@ -4146,7 +4146,7 @@
     /* FIXME: redraw ? */
     InvalidateRect(hwnd, NULL, TRUE);
 
-    return (LRESULT)himlTemp; 
+    return (LRESULT)himlTemp;
 }
 
 
@@ -4348,7 +4348,7 @@
     TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr (hwnd);
     BOOL bTemp;
 
-    TRACE("%s hwnd=0x%04x stub!\n", 
+    TRACE("%s hwnd=0x%04x stub!\n",
 	   ((BOOL)wParam) ? "TRUE" : "FALSE", hwnd);
 
     bTemp = infoPtr->bUnicode;
@@ -4363,10 +4363,10 @@
 {
     TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr (hwnd);
 
-    lParam->clrBtnHighlight = (infoPtr->clrBtnHighlight == CLR_DEFAULT) ? 
-	                       comctl32_color.clrBtnHighlight : 
+    lParam->clrBtnHighlight = (infoPtr->clrBtnHighlight == CLR_DEFAULT) ?
+	                       comctl32_color.clrBtnHighlight :
                                infoPtr->clrBtnHighlight;
-    lParam->clrBtnShadow = (infoPtr->clrBtnShadow == CLR_DEFAULT) ? 
+    lParam->clrBtnShadow = (infoPtr->clrBtnShadow == CLR_DEFAULT) ?
 	                   comctl32_color.clrBtnShadow : infoPtr->clrBtnShadow;
     return 1;
 }
@@ -4426,7 +4426,7 @@
 	    nmhotitem.idOld = (nOldHotItem >= 0) ?
 		infoPtr->buttons[nOldHotItem].idCommand : 0;
 	if ( !(nmhotitem.dwFlags & HICF_LEAVING) )
-	    nmhotitem.idNew = (infoPtr->nHotItem >= 0) ? 
+	    nmhotitem.idNew = (infoPtr->nHotItem >= 0) ?
 		infoPtr->buttons[infoPtr->nHotItem].idCommand : 0;
 	no_hi = TOOLBAR_SendNotify((NMHDR*)&nmhotitem, infoPtr, TBN_HOTITEMCHANGE);
     }
@@ -4635,7 +4635,7 @@
 	infoPtr->dwBaseCustDraw = ntfret & 0xffff;
 
 	/* FIXME: in general the return flags *can* be or'ed together */
-	switch (infoPtr->dwBaseCustDraw) 
+	switch (infoPtr->dwBaseCustDraw)
 	    {
 	    case CDRF_DODEFAULT:
 		break;
@@ -4647,7 +4647,7 @@
 	    }
     }
 
-    /* If the toolbar is "transparent" then pass the WM_ERASEBKGND up 
+    /* If the toolbar is "transparent" then pass the WM_ERASEBKGND up
      * to my parent for processing.
      */
     if (infoPtr->bTransparent) {
@@ -4666,14 +4666,14 @@
     if (!ret)
 	ret = DefWindowProcA (hwnd, WM_ERASEBKGND, wParam, lParam);
 
-    if ((dwStyle & TBSTYLE_CUSTOMERASE) && 
-	(infoPtr->dwBaseCustDraw & CDRF_NOTIFYPOSTERASE)) { 
+    if ((dwStyle & TBSTYLE_CUSTOMERASE) &&
+	(infoPtr->dwBaseCustDraw & CDRF_NOTIFYPOSTERASE)) {
 	ZeroMemory (&tbcd, sizeof(NMTBCUSTOMDRAW));
 	tbcd.nmcd.dwDrawStage = CDDS_POSTERASE;
 	tbcd.nmcd.hdc = (HDC)wParam;
 	ntfret = TOOLBAR_SendNotify ((NMHDR *)&tbcd, infoPtr, NM_CUSTOMDRAW);
 	infoPtr->dwBaseCustDraw = ntfret & 0xffff;
-	switch (infoPtr->dwBaseCustDraw) 
+	switch (infoPtr->dwBaseCustDraw)
 	    {
 	    case CDRF_DODEFAULT:
 		break;
@@ -4846,7 +4846,7 @@
 			nHit);
 		    if (nOldIndex == nHit)
 			bSendMessage = FALSE;
-		    if ((nOldIndex != nHit) && 
+		    if ((nOldIndex != nHit) &&
 			(nOldIndex != -1))
 			infoPtr->buttons[nOldIndex].fsState &= ~TBSTATE_CHECKED;
 		    btnPtr->fsState |= TBSTATE_CHECKED;
@@ -4868,7 +4868,7 @@
 	/*
 	 * now we can ReleaseCapture, which triggers CAPTURECHANGED msg,
 	 * that resets bCaptured and btn TBSTATE_PRESSED flags,
-	 * and obliterates nButtonDown and nOldHit (see TOOLBAR_CaptureChanged) 
+	 * and obliterates nButtonDown and nOldHit (see TOOLBAR_CaptureChanged)
 	 */
 	if ((infoPtr->bCaptured) && (infoPtr->nButtonDown >= 0))
 	    ReleaseCapture ();
@@ -4877,7 +4877,7 @@
 	TOOLBAR_SendNotify ((NMHDR *) &hdr, infoPtr,
 			NM_RELEASEDCAPTURE);
 
-	/* native issues TBN_ENDDRAG here, if _LBUTTONDOWN issued the 
+	/* native issues TBN_ENDDRAG here, if _LBUTTONDOWN issued the
 	 * TBN_BEGINDRAG
 	 */
 	nmtb.iItem = btnPtr->idCommand;
@@ -4992,7 +4992,7 @@
     /* Make sure tracking is enabled so we receive a WM_MOUSELEAVE message */
     if(!(trackinfo.dwFlags & TME_LEAVE)) {
         trackinfo.dwFlags = TME_LEAVE; /* notify upon leaving */
- 
+
         /* call TRACKMOUSEEVENT so we receive a WM_MOUSELEAVE message */
         /* and can properly deactivate the hot toolbar button */
         _TrackMouseEvent(&trackinfo);
@@ -5011,7 +5011,7 @@
     {
 	/* Remove the effect of an old hot button if the button was enabled and was
 	   drawn with the hot button effect */
-	if(infoPtr->nOldHit >= 0 && infoPtr->nOldHit == infoPtr->nHotItem && 
+	if(infoPtr->nOldHit >= 0 && infoPtr->nOldHit == infoPtr->nHotItem &&
 		(infoPtr->buttons[infoPtr->nOldHit].fsState & TBSTATE_ENABLED))
 	{
 	    oldBtnPtr = &infoPtr->buttons[infoPtr->nOldHit];
@@ -5025,7 +5025,7 @@
 
 	    infoPtr->nHotItem = nHit;
 
-            /* only enabled buttons show hot effect */            
+            /* only enabled buttons show hot effect */
             if(infoPtr->buttons[nHit].fsState & TBSTATE_ENABLED)
             {
                 btnPtr->bHot = TRUE;
@@ -5116,7 +5116,7 @@
      *    CreateBitmap(0x27, 0x24, 1, 1, 0)
      *    hdc = GetDC(toolbar)
      *    GetSystemMetrics(0x48)
-     *    fnt2=CreateFontA(0xe, 0, 0, 0, 0x190, 0, 0, 0, 0, 2, 
+     *    fnt2=CreateFontA(0xe, 0, 0, 0, 0x190, 0, 0, 0, 0, 2,
      *                     0, 0, 0, 0, "MARLETT")
      *    oldfnt = SelectObject(hdc, fnt2)
      *    GetCharWidthA(hdc, 0x36, 0x36, adr2)
@@ -5205,12 +5205,12 @@
 
 	if (lppgc->dwFlag == PGF_CALCWIDTH) {
 	    lppgc->iWidth = infoPtr->rcBound.right - infoPtr->rcBound.left;
-	    TRACE("processed PGN_CALCSIZE, returning horz size = %d\n", 
+	    TRACE("processed PGN_CALCSIZE, returning horz size = %d\n",
 		  lppgc->iWidth);
 	}
 	else {
 	    lppgc->iHeight = infoPtr->rcBound.bottom - infoPtr->rcBound.top;
-	    TRACE("processed PGN_CALCSIZE, returning vert size = %d\n", 
+	    TRACE("processed PGN_CALCSIZE, returning vert size = %d\n",
 		  lppgc->iHeight);
 	}
 	return 0;
@@ -5231,10 +5231,10 @@
 
     if ((infoPtr->hwndToolTip) && (lpnmh->hwndFrom == infoPtr->hwndToolTip)) {
 	if (infoPtr->bNtfUnicode)
-	    return SendMessageW (infoPtr->hwndNotify, WM_NOTIFY, 
+	    return SendMessageW (infoPtr->hwndNotify, WM_NOTIFY,
 				 wParam, lParam);
 	else
-	    return SendMessageA (infoPtr->hwndNotify, WM_NOTIFY, 
+	    return SendMessageA (infoPtr->hwndNotify, WM_NOTIFY,
 				 wParam, lParam);
 
 #if 0
@@ -5296,7 +5296,7 @@
     PAINTSTRUCT ps;
 
     /* fill ps.rcPaint with a default rect */
-    memcpy(&(ps.rcPaint), &(infoPtr->rcBound), sizeof(infoPtr->rcBound)); 
+    memcpy(&(ps.rcPaint), &(infoPtr->rcBound), sizeof(infoPtr->rcBound));
 
     hdc = wParam==0 ? BeginPaint(hwnd, &ps) : (HDC)wParam;
 
@@ -5319,7 +5319,7 @@
       *  Handles the WM_SETREDRAW message.
       *
       * Documentation:
-      *  According to testing V4.71 of COMCTL32 returns the 
+      *  According to testing V4.71 of COMCTL32 returns the
       *  *previous* status of the redraw flag (either 0 or 1)
       *  instead of the MSDN documented value of 0 if handled.
       *  (For laughs see the "consistancy" with same function
@@ -5330,7 +5330,7 @@
     TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr (hwnd);
     BOOL oldredraw = infoPtr->bDoRedraw;
 
-    TRACE("set to %s\n", 
+    TRACE("set to %s\n",
 	  (wParam) ? "TRUE" : "FALSE");
     infoPtr->bDoRedraw = (BOOL) wParam;
     if (wParam) {
@@ -5384,7 +5384,7 @@
              * this sets the working width of the toolbar, and
              * Calc Toolbar will not adjust it, only the height
              */
-	    infoPtr->nWidth = parent_rect.right - parent_rect.left; 
+	    infoPtr->nWidth = parent_rect.right - parent_rect.left;
 	    cy = infoPtr->nHeight;
 	    cx = infoPtr->nWidth;
 	    TOOLBAR_CalcToolbar (hwnd);
@@ -5440,7 +5440,7 @@
 	    infoPtr->dwDTFlags = DT_CENTER;
 	}
 	infoPtr->bTransparent = (lpStyle->styleNew & TBSTYLE_TRANSPARENT);
-	infoPtr->bBtnTranspnt = (lpStyle->styleNew & 
+	infoPtr->bBtnTranspnt = (lpStyle->styleNew &
 				 (TBSTYLE_FLAT | TBSTYLE_LIST));
 	TOOLBAR_CheckStyle (hwnd, lpStyle->styleNew);
     }
@@ -5466,7 +5466,7 @@
 static LRESULT WINAPI
 ToolbarWindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
 {
-    TRACE("hwnd=%x msg=%x wparam=%x lparam=%lx\n", 
+    TRACE("hwnd=%x msg=%x wparam=%x lparam=%lx\n",
 	  hwnd, uMsg, /* SPY_GetMsgName(uMsg), */ wParam, lParam);
 
     if (!TOOLBAR_GetInfoPtr(hwnd) && (uMsg != WM_NCCREATE))
@@ -5774,10 +5774,10 @@
 	    return TOOLBAR_MouseMove (hwnd, wParam, lParam);
 
 	case WM_MOUSELEAVE:
-	    return TOOLBAR_MouseLeave (hwnd, wParam, lParam);	
+	    return TOOLBAR_MouseLeave (hwnd, wParam, lParam);
 
 	case WM_CAPTURECHANGED:
-	    return TOOLBAR_CaptureChanged(hwnd);	
+	    return TOOLBAR_CaptureChanged(hwnd);
 
 	case WM_NCACTIVATE:
 	    return TOOLBAR_NCActivate (hwnd, wParam, lParam);
@@ -5854,7 +5854,7 @@
     wndClass.hCursor       = LoadCursorA (0, IDC_ARROWA);
     wndClass.hbrBackground = (HBRUSH)(COLOR_3DFACE + 1);
     wndClass.lpszClassName = TOOLBARCLASSNAMEA;
- 
+
     RegisterClassA (&wndClass);
 }
 
diff --git a/dlls/comctl32/tooltips.c b/dlls/comctl32/tooltips.c
index efe8fe1..47428f3 100644
--- a/dlls/comctl32/tooltips.c
+++ b/dlls/comctl32/tooltips.c
@@ -61,7 +61,7 @@
  *
  * infoPtr->nTool is the tool the mouse was on on the last relayed MM
  * or timer expiry or -1 if the mouse was not on a tool.
- * 
+ *
  * infoPtr->nCurrentTool is the tool for which the tip is currently
  * displaying text for or -1 if the tip is not shown.  Actually this
  * will only ever be infoPtr-nTool or -1, so it could be changed to a
@@ -97,7 +97,7 @@
     HINSTANCE hinst;
     LPWSTR      lpszText;
     LPARAM      lParam;
-} TTTOOL_INFO; 
+} TTTOOL_INFO;
 
 
 typedef struct
@@ -285,7 +285,7 @@
     SelectObject (hdc, hOldFont);
     ReleaseDC (hwnd, hdc);
 
-    lpSize->cx = rc.right - rc.left + 4 + 
+    lpSize->cx = rc.right - rc.left + 4 +
 		 infoPtr->rcMargin.left + infoPtr->rcMargin.right;
     lpSize->cy = rc.bottom - rc.top + 4 +
 		 infoPtr->rcMargin.bottom + infoPtr->rcMargin.top;
@@ -367,7 +367,7 @@
 	else {
 	    rc = toolPtr->rect;
 	    MapWindowPoints (toolPtr->hwnd, (HWND)0, (LPPOINT)&rc, 2);
-	}   
+	}
 	rect.bottom = rc.top - 2;
     	rect.top = rect.bottom - size.cy;
     }
@@ -535,7 +535,7 @@
     for (nTool = 0; nTool < infoPtr->uNumTools; nTool++) {
 	toolPtr = &infoPtr->tools[nTool];
 
-	if (!(toolPtr->uFlags & TTF_IDISHWND) && 
+	if (!(toolPtr->uFlags & TTF_IDISHWND) &&
 	    (lpToolInfo->hwnd == toolPtr->hwnd) &&
 	    (lpToolInfo->uId == toolPtr->uId))
 	    return nTool;
@@ -562,7 +562,7 @@
     for (nTool = 0; nTool < infoPtr->uNumTools; nTool++) {
 	toolPtr = &infoPtr->tools[nTool];
 
-	if (!(toolPtr->uFlags & TTF_IDISHWND) && 
+	if (!(toolPtr->uFlags & TTF_IDISHWND) &&
 	    (lpToolInfo->hwnd == toolPtr->hwnd) &&
 	    (lpToolInfo->uId == toolPtr->uId))
 	    return nTool;
@@ -738,7 +738,7 @@
 	    if (lpttsi == NULL) {
 		lpttsi =
 		    (LPTT_SUBCLASS_INFO)COMCTL32_Alloc (sizeof(TT_SUBCLASS_INFO));
-		lpttsi->wpOrigProc = 
+		lpttsi->wpOrigProc =
 		    (WNDPROC)SetWindowLongA ((HWND)toolPtr->uId,
 		    GWL_WNDPROC,(LONG)TOOLTIPS_SubclassProc);
 		lpttsi->hwndToolTip = hwnd;
@@ -755,7 +755,7 @@
 	    if (lpttsi == NULL) {
 		lpttsi =
 		    (LPTT_SUBCLASS_INFO)COMCTL32_Alloc (sizeof(TT_SUBCLASS_INFO));
-		lpttsi->wpOrigProc = 
+		lpttsi->wpOrigProc =
 		    (WNDPROC)SetWindowLongA (toolPtr->hwnd,
 		    GWL_WNDPROC,(LONG)TOOLTIPS_SubclassProc);
 		lpttsi->hwndToolTip = hwnd;
@@ -840,7 +840,7 @@
 	    if (lpttsi == NULL) {
 		lpttsi =
 		    (LPTT_SUBCLASS_INFO)COMCTL32_Alloc (sizeof(TT_SUBCLASS_INFO));
-		lpttsi->wpOrigProc = 
+		lpttsi->wpOrigProc =
 		    (WNDPROC)SetWindowLongA ((HWND)toolPtr->uId,
 		    GWL_WNDPROC,(LONG)TOOLTIPS_SubclassProc);
 		lpttsi->hwndToolTip = hwnd;
@@ -857,7 +857,7 @@
 	    if (lpttsi == NULL) {
 		lpttsi =
 		    (LPTT_SUBCLASS_INFO)COMCTL32_Alloc (sizeof(TT_SUBCLASS_INFO));
-		lpttsi->wpOrigProc = 
+		lpttsi->wpOrigProc =
 		    (WNDPROC)SetWindowLongA (toolPtr->hwnd,
 		    GWL_WNDPROC,(LONG)TOOLTIPS_SubclassProc);
 		lpttsi->hwndToolTip = hwnd;
@@ -896,9 +896,9 @@
 
     /* make sure the tooltip has disappeared before deleting it */
     TOOLTIPS_Hide(hwnd, infoPtr);
-    
+
     /* delete text string */
-    toolPtr = &infoPtr->tools[nTool]; 
+    toolPtr = &infoPtr->tools[nTool];
     if ((toolPtr->hinst) && (toolPtr->lpszText)) {
 	if ( (toolPtr->lpszText != LPSTR_TEXTCALLBACKW) &&
 	     (HIWORD((INT)toolPtr->lpszText) != 0) )
@@ -962,11 +962,11 @@
     if (infoPtr->nTool == nTool)
     {
         /* no current tool (0 means first tool) */
-        infoPtr->nTool = -1;    
+        infoPtr->nTool = -1;
     }
-    
+
     infoPtr->uNumTools--;
-    
+
     return 0;
 }
 
@@ -992,10 +992,10 @@
     TRACE("tool %d\n", nTool);
 
     /* make sure the tooltip has disappeared before deleting it */
-    TOOLTIPS_Hide(hwnd, infoPtr);    
-    
+    TOOLTIPS_Hide(hwnd, infoPtr);
+
     /* delete text string */
-    toolPtr = &infoPtr->tools[nTool]; 
+    toolPtr = &infoPtr->tools[nTool];
     if ((toolPtr->hinst) && (toolPtr->lpszText)) {
 	if ( (toolPtr->lpszText != LPSTR_TEXTCALLBACKW) &&
 	     (HIWORD((INT)toolPtr->lpszText) != 0) )
@@ -1059,11 +1059,11 @@
     if (infoPtr->nTool == nTool)
     {
         /* no current tool (0 means first tool) */
-        infoPtr->nTool = -1;    
+        infoPtr->nTool = -1;
     }
-    
+
     infoPtr->uNumTools--;
-    
+
     return 0;
 }
 
@@ -2044,7 +2044,7 @@
 	    toolPtr = &infoPtr->tools[i];
 	    if ((toolPtr->hinst) && (toolPtr->lpszText)) {
 		if ( (toolPtr->lpszText != LPSTR_TEXTCALLBACKW) &&
-		     (HIWORD((INT)toolPtr->lpszText) != 0) ) 
+		     (HIWORD((INT)toolPtr->lpszText) != 0) )
 		{
 		    COMCTL32_Free (toolPtr->lpszText);
 		    toolPtr->lpszText = NULL;
@@ -2054,7 +2054,7 @@
 	    /* remove subclassing */
         if (toolPtr->uFlags & TTF_SUBCLASS) {
             LPTT_SUBCLASS_INFO lpttsi;
-    
+
             if (toolPtr->uFlags & TTF_IDISHWND) {
                 lpttsi = (LPTT_SUBCLASS_INFO)GetPropA ((HWND)toolPtr->uId, COMCTL32_aSubclass);
                 if (lpttsi) {
@@ -2470,10 +2470,10 @@
 
         case WM_GETTEXT:
             return TOOLTIPS_OnWMGetText (hwnd, wParam, lParam);
-        
+
         case WM_GETTEXTLENGTH:
             return TOOLTIPS_OnWMGetTextLength (hwnd, wParam, lParam);
- 
+
 
 	case WM_LBUTTONDOWN:
 	case WM_LBUTTONUP:
@@ -2528,7 +2528,7 @@
     wndClass.hCursor       = LoadCursorA (0, IDC_ARROWA);
     wndClass.hbrBackground = 0;
     wndClass.lpszClassName = TOOLTIPS_CLASSA;
- 
+
     RegisterClassA (&wndClass);
 }
 
diff --git a/dlls/comctl32/trackbar.c b/dlls/comctl32/trackbar.c
index 4bc2e59..6701053 100644
--- a/dlls/comctl32/trackbar.c
+++ b/dlls/comctl32/trackbar.c
@@ -23,7 +23,7 @@
  *   - handle dragging slider better
  *   - better tic handling.
  *   - more notifications.
- *   
+ *
  */
 
 /* known bugs:
@@ -76,10 +76,10 @@
 #define TRACKBAR_GetInfoPtr(wndPtr) ((TRACKBAR_INFO *)GetWindowLongA (hwnd,0))
 
 
-/* Used by TRACKBAR_Refresh to find out which parts of the control 
+/* Used by TRACKBAR_Refresh to find out which parts of the control
    need to be recalculated */
 
-#define TB_THUMBPOSCHANGED      1	
+#define TB_THUMBPOSCHANGED      1
 #define TB_THUMBSIZECHANGED     2
 #define TB_THUMBCHANGED 	(TB_THUMBPOSCHANGED | TB_THUMBPOSCHANGED)
 #define TB_SELECTIONCHANGED     4
@@ -101,7 +101,7 @@
 {
     int i,tic,nrTics;
 
-    if (infoPtr->uTicFreq && infoPtr->nRangeMax >= infoPtr->nRangeMin) 
+    if (infoPtr->uTicFreq && infoPtr->nRangeMax >= infoPtr->nRangeMin)
     	nrTics=(infoPtr->nRangeMax - infoPtr->nRangeMin)/infoPtr->uTicFreq;
     else {
         nrTics=0;
@@ -112,7 +112,7 @@
     }
 
     if (nrTics!=infoPtr->uNumTics) {
-    	infoPtr->tics=COMCTL32_ReAlloc (infoPtr->tics, 
+    	infoPtr->tics=COMCTL32_ReAlloc (infoPtr->tics,
                                         (nrTics+1)*sizeof (DWORD));
     	infoPtr->uNumTics=nrTics;
     }
@@ -123,12 +123,12 @@
 }
 
 
-/* converts from physical (mouse) position to logical position 
+/* converts from physical (mouse) position to logical position
    (in range of trackbar) */
 
 static inline DOUBLE
-TRACKBAR_ConvertPlaceToPosition (TRACKBAR_INFO *infoPtr, int place, 
-                                 int vertical) 
+TRACKBAR_ConvertPlaceToPosition (TRACKBAR_INFO *infoPtr, int place,
+                                 int vertical)
 {
     double range,width,pos;
 
@@ -165,7 +165,7 @@
     else
         cyChannel = 4;
 
-    offsettop  = (int)(infoPtr->uThumbLen/4.5); 
+    offsettop  = (int)(infoPtr->uThumbLen/4.5);
     offsetedge = (int)(infoPtr->uThumbLen/4.5) + 3;
 
     if (dwStyle & TBS_VERT) {
@@ -202,33 +202,33 @@
     RECT *thumb;
     int range, width, thumbdepth;
     DWORD dwStyle = GetWindowLongA(hwnd,GWL_STYLE);
-	
+
     thumb=&infoPtr->rcThumb;
     range=infoPtr->nRangeMax - infoPtr->nRangeMin;
     thumbdepth = ((INT)((FLOAT)infoPtr->uThumbLen / 4.5) * 2) + 2;
 
     if (!range) return; /* FIXME: may this happen? */
 
-    if (dwStyle & TBS_VERT) 
+    if (dwStyle & TBS_VERT)
     {
     	width=infoPtr->rcChannel.bottom - infoPtr->rcChannel.top;
 
         if (dwStyle & (TBS_BOTH | TBS_LEFT))
           thumb->left = 10;
         else
-          thumb-> left =2; 
+          thumb-> left =2;
         thumb->right = thumb -> left + infoPtr->uThumbLen;
         thumb->top = infoPtr->rcChannel.top +
-                     (width*(infoPtr->nPos - infoPtr->nRangeMin))/range - 
+                     (width*(infoPtr->nPos - infoPtr->nRangeMin))/range -
                      thumbdepth/2;
         thumb->bottom = thumb->top + thumbdepth;
-    } 
-    else 
+    }
+    else
     {
     	width=infoPtr->rcChannel.right - infoPtr->rcChannel.left;
 
         thumb->left = infoPtr->rcChannel.left +
-                      (width*(infoPtr->nPos - infoPtr->nRangeMin))/range - 
+                      (width*(infoPtr->nPos - infoPtr->nRangeMin))/range -
                       thumbdepth/2;
         thumb->right = thumb->left + thumbdepth;
         if (dwStyle & (TBS_BOTH | TBS_TOP))
@@ -249,9 +249,9 @@
     range=infoPtr->nRangeMax - infoPtr->nRangeMin;
     width=infoPtr->rcChannel.right - infoPtr->rcChannel.left;
 
-    if (range <= 0) 
+    if (range <= 0)
         SetRectEmpty (selection);
-    else 
+    else
         if (GetWindowLongA (hwnd, GWL_STYLE) & TBS_VERT) {
             selection->left   = infoPtr->rcChannel.left +
                 (width*infoPtr->nSelMin)/range;
@@ -274,7 +274,7 @@
 /* ticPos is in tic-units, not in pixels */
 
 static VOID
-TRACKBAR_DrawHorizTic (TRACKBAR_INFO *infoPtr, HDC hdc, LONG ticPos, 
+TRACKBAR_DrawHorizTic (TRACKBAR_INFO *infoPtr, HDC hdc, LONG ticPos,
                        int flags, COLORREF clrTic)
 {
     RECT rcChannel=infoPtr->rcChannel;
@@ -292,9 +292,9 @@
     }
 
     if (flags & TIC_SELECTIONMARK) {
-  	if (flags & TIC_SELECTIONMARKMIN) 
+  	if (flags & TIC_SELECTIONMARKMIN)
             x=rcChannel.left + (width*(ticPos - infoPtr->nRangeMin))/range - 1;
-	else 
+	else
             x=rcChannel.left + (width*(ticPos - infoPtr->nRangeMin))/range + 1;
 
    	SetPixel (hdc, x,y+6*side, clrTic);
@@ -312,7 +312,7 @@
     if (flags & TIC_EDGE) {
 	if (flags & TIC_LEFTEDGE)
             x=rcChannel.left;
-	else 
+	else
             x=rcChannel.right;
 
    	SetPixel (hdc, x,y+5*side, clrTic);
@@ -324,7 +324,7 @@
 }
 
 static VOID
-TRACKBAR_DrawVertTic (TRACKBAR_INFO *infoPtr, HDC hdc, LONG ticPos, 
+TRACKBAR_DrawVertTic (TRACKBAR_INFO *infoPtr, HDC hdc, LONG ticPos,
                       int flags, COLORREF clrTic)
 {
     RECT rcChannel=infoPtr->rcChannel;
@@ -343,9 +343,9 @@
 
 
     if (flags & TIC_SELECTIONMARK) {
-  	if (flags & TIC_SELECTIONMARKMIN) 
+  	if (flags & TIC_SELECTIONMARKMIN)
             y=rcChannel.top + (width*(ticPos - infoPtr->nRangeMin))/range - 1;
-	else 
+	else
             y=rcChannel.top + (width*(ticPos - infoPtr->nRangeMin))/range + 1;
 
    	SetPixel (hdc, x+6*side, y, clrTic);
@@ -363,7 +363,7 @@
     if (flags & TIC_EDGE) {
 	if (flags & TIC_LEFTEDGE)
             y=rcChannel.top;
-	else 
+	else
             y=rcChannel.bottom;
 
    	SetPixel (hdc, x+5*side, y, clrTic);
@@ -376,23 +376,23 @@
 
 
 static VOID
-TRACKBAR_DrawTics (TRACKBAR_INFO *infoPtr, HDC hdc, LONG ticPos, 
+TRACKBAR_DrawTics (TRACKBAR_INFO *infoPtr, HDC hdc, LONG ticPos,
                    int flags, COLORREF clrTic)
 {
 
     if (flags & TBS_VERT) {
-        if ((flags & TBS_TOP) || (flags & TBS_BOTH)) 
-            TRACKBAR_DrawVertTic (infoPtr, hdc, ticPos, 
+        if ((flags & TBS_TOP) || (flags & TBS_BOTH))
+            TRACKBAR_DrawVertTic (infoPtr, hdc, ticPos,
                                   flags | TBS_TOP , clrTic);
-        if (!(flags & TBS_TOP) || (flags & TBS_BOTH)) 
+        if (!(flags & TBS_TOP) || (flags & TBS_BOTH))
             TRACKBAR_DrawVertTic (infoPtr, hdc, ticPos, flags, clrTic);
         return;
     }
 
-    if ((flags & TBS_TOP) || (flags & TBS_BOTH)) 
+    if ((flags & TBS_TOP) || (flags & TBS_BOTH))
         TRACKBAR_DrawHorizTic (infoPtr, hdc, ticPos, flags | TBS_TOP , clrTic);
 
-    if (!(flags & TBS_TOP) || (flags & TBS_BOTH)) 
+    if (!(flags & TBS_TOP) || (flags & TBS_BOTH))
         TRACKBAR_DrawHorizTic (infoPtr, hdc, ticPos, flags, clrTic);
 
 }
@@ -411,8 +411,8 @@
 
     oldbr = SelectObject (hdc, hbr);
     SetPolyFillMode (hdc,WINDING);
-		
-    if (dwStyle & TBS_BOTH) 
+
+    if (dwStyle & TBS_BOTH)
     {
        points[0].x=thumb.right;
        points[0].y=thumb.top;
@@ -426,8 +426,8 @@
        points[4].y=points[0].y;
        PointCount = 5;
        BlackUntil = 3;
-    } 
-    else 
+    }
+    else
     {
         if (dwStyle & TBS_VERT)
         {
@@ -472,7 +472,7 @@
             points[1].x=thumb.right;
             points[1].y=thumb.top + PointDepth;
             points[2].x=thumb.right;
-            points[2].y=thumb.bottom; 
+            points[2].y=thumb.bottom;
             points[3].x=thumb.left;
             points[3].y=thumb.bottom;
             points[4].x=thumb.left;
@@ -497,7 +497,7 @@
             points[5].y=points[0].y;
           }
         }
-        
+
     }
 
     /*
@@ -513,13 +513,13 @@
 
     /*
      * Black part
-     */	
+     */
     Polyline(hdc,points,BlackUntil);
 
     SelectObject(hdc,oldpen);
     hpn = GetStockObject(WHITE_PEN);
     SelectObject(hdc,hpn);
-     
+
     /*
      * White Part
      */
@@ -551,15 +551,15 @@
         infoPtr->nPos=infoPtr->dragPos;
         infoPtr->flags |= TB_THUMBPOSCHANGED;
     }
-	
+
     if (infoPtr->flags & TB_THUMBCHANGED) {
         TRACKBAR_CalcThumb	(hwnd, infoPtr);
-        if (infoPtr->flags & TB_THUMBSIZECHANGED) 
+        if (infoPtr->flags & TB_THUMBSIZECHANGED)
             TRACKBAR_CalcChannel (hwnd, infoPtr);
     }
     if (infoPtr->flags & TB_SELECTIONCHANGED)
         TRACKBAR_CalcSelection (hwnd, infoPtr);
-    infoPtr->flags &= ~ (TB_THUMBCHANGED | TB_SELECTIONCHANGED | 
+    infoPtr->flags &= ~ (TB_THUMBCHANGED | TB_SELECTIONCHANGED |
                          TB_DRAGPOSVALID);
 
     /* draw channel */
@@ -571,11 +571,11 @@
     if (dwStyle & TBS_ENABLESELRANGE) {		 /* fill the channel */
         HBRUSH hbr = CreateSolidBrush (RGB(255,255,255));
         FillRect (hdc, &rcChannel, hbr);
-        if (((dwStyle & TBS_VERT) && 
-             (rcSelection.left!=rcSelection.right)) || 
-            ((!(dwStyle & TBS_VERT)) && 	
+        if (((dwStyle & TBS_VERT) &&
+             (rcSelection.left!=rcSelection.right)) ||
+            ((!(dwStyle & TBS_VERT)) &&
              (rcSelection.left!=rcSelection.right))) {
-            hbr=CreateSolidBrush (COLOR_HIGHLIGHT); 
+            hbr=CreateSolidBrush (COLOR_HIGHLIGHT);
             FillRect (hdc, &rcSelection, hbr);
         }
         DeleteObject (hbr);
@@ -588,27 +588,27 @@
         int ticFlags = dwStyle & 0x0f;
         COLORREF clrTic=GetSysColor (COLOR_3DDKSHADOW);
 
-        for (i=0; i<infoPtr->uNumTics; i++) 
-            TRACKBAR_DrawTics (infoPtr, hdc, infoPtr->tics[i], 
+        for (i=0; i<infoPtr->uNumTics; i++)
+            TRACKBAR_DrawTics (infoPtr, hdc, infoPtr->tics[i],
                                ticFlags, clrTic);
 
     	TRACKBAR_DrawTics (infoPtr, hdc, 0, ticFlags | TIC_LEFTEDGE, clrTic);
     	TRACKBAR_DrawTics (infoPtr, hdc, 0, ticFlags | TIC_RIGHTEDGE, clrTic);
-          
-        if ((dwStyle & TBS_ENABLESELRANGE) && 
+
+        if ((dwStyle & TBS_ENABLESELRANGE) &&
             (rcSelection.left!=rcSelection.right)) {
-            TRACKBAR_DrawTics (infoPtr, hdc, infoPtr->nSelMin, 
+            TRACKBAR_DrawTics (infoPtr, hdc, infoPtr->nSelMin,
                                ticFlags | TIC_SELECTIONMARKMIN, clrTic);
-            TRACKBAR_DrawTics (infoPtr, hdc, infoPtr->nSelMax, 
+            TRACKBAR_DrawTics (infoPtr, hdc, infoPtr->nSelMax,
                                ticFlags | TIC_SELECTIONMARKMAX, clrTic);
         }
     }
 
     /* draw thumb */
 
-    if (!(dwStyle & TBS_NOTHUMB)) 
+    if (!(dwStyle & TBS_NOTHUMB))
     {
-      TRACKBAR_DrawThumb(infoPtr,hdc,dwStyle);		
+      TRACKBAR_DrawThumb(infoPtr,hdc,dwStyle);
     }
 
     if (infoPtr->bFocus)
@@ -678,7 +678,7 @@
     infoPtr->nSelMax = 0;
     infoPtr->flags |= TB_SELECTIONCHANGED;
 
-    if ((BOOL)wParam) 
+    if ((BOOL)wParam)
 	InvalidateRect (hwnd, NULL, FALSE);
 
     return 0;
@@ -696,7 +696,7 @@
         infoPtr->uNumTics = 0;
     }
 
-    if (wParam) 
+    if (wParam)
         InvalidateRect (hwnd, NULL, FALSE);
 
     return 0;
@@ -821,7 +821,7 @@
 TRACKBAR_GetPTics (HWND hwnd)
 {
     TRACKBAR_INFO *infoPtr = TRACKBAR_GetInfoPtr (hwnd);
-    
+
     return (LRESULT) infoPtr->tics;
 }
 
@@ -830,17 +830,17 @@
 {
     TRACKBAR_INFO *infoPtr = TRACKBAR_GetInfoPtr (hwnd);
     LPRECT lprc = (LPRECT)lParam;
-    
+
     if (lprc == NULL)
-        return 0; 
-   
+        return 0;
+
     lprc->left   = infoPtr->rcThumb.left;
     lprc->right  = infoPtr->rcThumb.right;
     lprc->bottom = infoPtr->rcThumb.bottom;
     lprc->top    = infoPtr->rcThumb.top;
-   
+
     return 0;
-}  
+}
 
 
 static LRESULT
@@ -850,7 +850,7 @@
     INT iTic;
 
     iTic=(INT) wParam;
-    if ((iTic<0) || (iTic>infoPtr->uNumTics)) 
+    if ((iTic<0) || (iTic>infoPtr->uNumTics))
 	return -1;
 
     return (LRESULT) infoPtr->tics[iTic];
@@ -863,10 +863,10 @@
 {
     TRACKBAR_INFO *infoPtr = TRACKBAR_GetInfoPtr (hwnd);
     INT iTic, range, width, pos;
- 
+
 
     iTic=(INT ) wParam;
-    if ((iTic<0) || (iTic>infoPtr->uNumTics)) 
+    if ((iTic<0) || (iTic>infoPtr->uNumTics))
 	return -1;
 
     range=infoPtr->nRangeMax - infoPtr->nRangeMin;
@@ -957,7 +957,7 @@
 	infoPtr->nPos = infoPtr->nRangeMax;
     infoPtr->flags |= TB_THUMBPOSCHANGED;
 
-    if (wParam) 
+    if (wParam)
         InvalidateRect (hwnd, NULL, FALSE);
 
     return 0;
@@ -1009,7 +1009,7 @@
         infoPtr->nPageSize = 1;
     TRACKBAR_RecalculateTics (infoPtr);
 
-    if (wParam) 
+    if (wParam)
         InvalidateRect (hwnd, NULL, FALSE);
 
     return 0;
@@ -1043,16 +1043,16 @@
 TRACKBAR_SetTicFreq (HWND hwnd, WPARAM wParam)
 {
     TRACKBAR_INFO *infoPtr = TRACKBAR_GetInfoPtr (hwnd);
-	
+
     if (GetWindowLongA (hwnd, GWL_STYLE) & TBS_AUTOTICKS)
-        infoPtr->uTicFreq=(UINT) wParam; 
-	
+        infoPtr->uTicFreq=(UINT) wParam;
+
     TRACKBAR_RecalculateTics (infoPtr);
 
     InvalidateRect (hwnd, NULL, FALSE);
 
     return 0;
-}   
+}
 
 
 static LRESULT
@@ -1072,7 +1072,7 @@
     if (infoPtr->nSelMax > infoPtr->nRangeMax)
         infoPtr->nSelMax = infoPtr->nRangeMax;
 
-    if (wParam) 
+    if (wParam)
         InvalidateRect (hwnd, NULL, FALSE);
 
 
@@ -1090,11 +1090,11 @@
 
     infoPtr->nSelMax = (INT)lParam;
     infoPtr->flags |= TB_SELECTIONCHANGED;
-	
+
     if (infoPtr->nSelMax > infoPtr->nRangeMax)
         infoPtr->nSelMax = infoPtr->nRangeMax;
 
-    if (wParam) 
+    if (wParam)
         InvalidateRect (hwnd, NULL, FALSE);
 
     return 0;
@@ -1115,7 +1115,7 @@
     if (infoPtr->nSelMin < infoPtr->nRangeMin)
         infoPtr->nSelMin = infoPtr->nRangeMin;
 
-    if (wParam) 
+    if (wParam)
         InvalidateRect (hwnd, NULL, FALSE);
 
     return 0;
@@ -1165,7 +1165,7 @@
     INT fTemp = infoPtr->fLocation;
 
     infoPtr->fLocation = (INT)wParam;
-	
+
     return fTemp;
 }
 
@@ -1322,7 +1322,7 @@
 
             infoPtr->flags |= TB_SHOW_TOOLTIP;
             SetCapture (hwnd);
-            SendMessageA (infoPtr->hwndToolTip, TTM_TRACKACTIVATE, 
+            SendMessageA (infoPtr->hwndToolTip, TTM_TRACKACTIVATE,
                           (WPARAM)TRUE, (LPARAM)&ti);
         }
         return 0;
@@ -1338,7 +1338,7 @@
         else
             clickPlace=(INT)LOWORD(lParam);
 
-       clickPos = TRACKBAR_ConvertPlaceToPosition(infoPtr, clickPlace, 
+       clickPos = TRACKBAR_ConvertPlaceToPosition(infoPtr, clickPlace,
                                                    vertical);
         prevPos = infoPtr->nPos;
         if (clickPos > (int)prevPos)
@@ -1346,22 +1346,22 @@
             infoPtr->nPos += infoPtr->nPageSize;
             if (infoPtr->nPos > infoPtr->nRangeMax)
                 infoPtr->nPos = infoPtr->nRangeMax;
-            TRACKBAR_SendNotify (hwnd, TB_PAGEUP);  
-        } 
-        else 
+            TRACKBAR_SendNotify (hwnd, TB_PAGEUP);
+        }
+        else
         {
             infoPtr->nPos -= infoPtr->nPageSize;  /* similar to VK_PRIOR */
             if (infoPtr->nPos < infoPtr->nRangeMin)
                 infoPtr->nPos = infoPtr->nRangeMin;
             TRACKBAR_SendNotify (hwnd, TB_PAGEDOWN);
         }
-	
+
         if (prevPos!=infoPtr->nPos) {
             infoPtr->flags |= TB_THUMBPOSCHANGED;
             InvalidateRect (hwnd, NULL, FALSE);
         }
     }
-	
+
     return 0;
 }
 
@@ -1390,7 +1390,7 @@
         SendMessageA (infoPtr->hwndToolTip, TTM_TRACKACTIVATE,
                       (WPARAM)FALSE, (LPARAM)&ti);
     }
-    
+
     InvalidateRect (hwnd, NULL, FALSE);
 
     return 0;
@@ -1401,12 +1401,12 @@
 TRACKBAR_CaptureChanged (HWND hwnd, WPARAM wParam, LPARAM lParam)
 {
     TRACKBAR_INFO *infoPtr = TRACKBAR_GetInfoPtr (hwnd);
-	
+
     if (infoPtr->flags & TB_DRAGPOSVALID) {
         infoPtr->nPos=infoPtr->dragPos;
         InvalidateRect (hwnd, NULL, FALSE);
     }
-	
+
     infoPtr->flags &= ~ TB_DRAGPOSVALID;
 
     TRACKBAR_SendNotify (hwnd, TB_ENDTRACK);
@@ -1459,11 +1459,11 @@
 {
     TRACE("%x\n",code);
 
-    if (GetWindowLongA (hwnd, GWL_STYLE) & TBS_VERT) 
-    	return (BOOL) SendMessageA (GetParent (hwnd), 
+    if (GetWindowLongA (hwnd, GWL_STYLE) & TBS_VERT)
+    	return (BOOL) SendMessageA (GetParent (hwnd),
                                     WM_VSCROLL, (WPARAM)code, (LPARAM)hwnd);
 
-    return (BOOL) SendMessageA (GetParent (hwnd), 
+    return (BOOL) SendMessageA (GetParent (hwnd),
                                 WM_HSCROLL, (WPARAM)code, (LPARAM)hwnd);
 }
 
@@ -1476,7 +1476,7 @@
     SHORT clickPlace;
     DOUBLE dragPos;
     char buf[80];
-			
+
     TRACE("%x\n",wParam);
 
     if (dwStyle & TBS_VERT)
@@ -1488,7 +1488,7 @@
 	return TRUE;
 
     SetCapture (hwnd);
-    dragPos = TRACKBAR_ConvertPlaceToPosition (infoPtr, clickPlace, 
+    dragPos = TRACKBAR_ConvertPlaceToPosition (infoPtr, clickPlace,
                                                dwStyle & TBS_VERT);
     if (dragPos > ((INT)dragPos) + 0.5)
         infoPtr->dragPos = dragPos + 1;
@@ -1501,7 +1501,7 @@
     if (infoPtr->flags & TB_SHOW_TOOLTIP) {
         POINT pt;
     	TTTOOLINFOA ti;
-	
+
     	ti.cbSize = sizeof(TTTOOLINFOA);
 	ti.hwnd = hwnd;
     	ti.uId = 0;
@@ -1509,12 +1509,12 @@
         sprintf (buf,"%d",infoPtr->nPos);
     	ti.lpszText = (LPSTR) buf;
         GetCursorPos (&pt);
-		
+
 	if (dwStyle & TBS_VERT) {
-            SendMessageA (infoPtr->hwndToolTip, TTM_TRACKPOSITION, 
+            SendMessageA (infoPtr->hwndToolTip, TTM_TRACKPOSITION,
                           0, (LPARAM)MAKELPARAM(pt.x+5, pt.y+15));
         } else {
-            SendMessageA (infoPtr->hwndToolTip, TTM_TRACKPOSITION, 
+            SendMessageA (infoPtr->hwndToolTip, TTM_TRACKPOSITION,
                           0, (LPARAM)MAKELPARAM(pt.x+15, pt.y+5));
         }
     	SendMessageA (infoPtr->hwndToolTip, TTM_UPDATETIPTEXTA,
@@ -1539,48 +1539,48 @@
     pos=infoPtr->nPos;
     switch (wParam) {
     case VK_LEFT:
-    case VK_UP: 
+    case VK_UP:
         if (infoPtr->nPos == infoPtr->nRangeMin) return FALSE;
         infoPtr->nPos -= infoPtr->nLineSize;
-        if (infoPtr->nPos < infoPtr->nRangeMin) 
+        if (infoPtr->nPos < infoPtr->nRangeMin)
             infoPtr->nPos = infoPtr->nRangeMin;
         TRACKBAR_SendNotify (hwnd, TB_LINEUP);
         break;
     case VK_RIGHT:
-    case VK_DOWN: 
+    case VK_DOWN:
         if (infoPtr->nPos == infoPtr->nRangeMax) return FALSE;
         infoPtr->nPos += infoPtr->nLineSize;
-        if (infoPtr->nPos > infoPtr->nRangeMax) 
+        if (infoPtr->nPos > infoPtr->nRangeMax)
             infoPtr->nPos = infoPtr->nRangeMax;
         TRACKBAR_SendNotify (hwnd, TB_LINEDOWN);
         break;
     case VK_NEXT:
         if (infoPtr->nPos == infoPtr->nRangeMax) return FALSE;
         infoPtr->nPos += infoPtr->nPageSize;
-        if (infoPtr->nPos > infoPtr->nRangeMax) 
+        if (infoPtr->nPos > infoPtr->nRangeMax)
             infoPtr->nPos = infoPtr->nRangeMax;
         TRACKBAR_SendNotify (hwnd, TB_PAGEUP);
         break;
     case VK_PRIOR:
         if (infoPtr->nPos == infoPtr->nRangeMin) return FALSE;
         infoPtr->nPos -= infoPtr->nPageSize;
-        if (infoPtr->nPos < infoPtr->nRangeMin) 
+        if (infoPtr->nPos < infoPtr->nRangeMin)
             infoPtr->nPos = infoPtr->nRangeMin;
         TRACKBAR_SendNotify (hwnd, TB_PAGEDOWN);
         break;
-    case VK_HOME: 
+    case VK_HOME:
         if (infoPtr->nPos == infoPtr->nRangeMin) return FALSE;
         infoPtr->nPos = infoPtr->nRangeMin;
         TRACKBAR_SendNotify (hwnd, TB_TOP);
         break;
-    case VK_END: 
+    case VK_END:
         if (infoPtr->nPos == infoPtr->nRangeMax) return FALSE;
         infoPtr->nPos = infoPtr->nRangeMax;
         TRACKBAR_SendNotify (hwnd, TB_BOTTOM);
         break;
     }
 
-    if (pos!=infoPtr->nPos) { 
+    if (pos!=infoPtr->nPos) {
 	infoPtr->flags |=TB_THUMBPOSCHANGED;
 	InvalidateRect (hwnd, NULL, FALSE);
     }
@@ -1594,12 +1594,12 @@
 {
     switch (wParam) {
     case VK_LEFT:
-    case VK_UP: 
+    case VK_UP:
     case VK_RIGHT:
-    case VK_DOWN: 
+    case VK_DOWN:
     case VK_NEXT:
     case VK_PRIOR:
-    case VK_HOME: 
+    case VK_HOME:
     case VK_END:
         TRACKBAR_SendNotify (hwnd, TB_ENDTRACK);
     }
@@ -1662,10 +1662,10 @@
 
     case TBM_GETTIC:
         return TRACKBAR_GetTic (hwnd, wParam, lParam);
- 
+
     case TBM_GETTICPOS:
         return TRACKBAR_GetTicPos (hwnd, wParam, lParam);
- 
+
     case TBM_GETTOOLTIPS:
         return TRACKBAR_GetToolTips (hwnd, wParam, lParam);
 
@@ -1738,7 +1738,7 @@
 
     case WM_KEYDOWN:
         return TRACKBAR_KeyDown (hwnd, wParam, lParam);
-        
+
     case WM_KEYUP:
         return TRACKBAR_KeyUp (hwnd, wParam);
 
@@ -1789,7 +1789,7 @@
     wndClass.hCursor       = LoadCursorA (0, IDC_ARROWA);
     wndClass.hbrBackground = (HBRUSH)(COLOR_3DFACE + 1);
     wndClass.lpszClassName = TRACKBAR_CLASSA;
- 
+
     RegisterClassA (&wndClass);
 }
 
diff --git a/dlls/comctl32/treeview.c b/dlls/comctl32/treeview.c
index 3374eb0..d7533fa 100644
--- a/dlls/comctl32/treeview.c
+++ b/dlls/comctl32/treeview.c
@@ -154,7 +154,7 @@
 #define TV_LDRAG		0x04	/* Lbutton pushed to start drag */
 #define TV_LDRAGGING	0x08	/* Lbutton pushed, mouse moved. */
 #define TV_RDRAG		0x10	/* dito Rbutton */
-#define TV_RDRAGGING	0x20	
+#define TV_RDRAGGING	0x20
 
 /* bitflags for infoPtr->timer */
 
@@ -309,7 +309,7 @@
 }
 
 /***************************************************************************
- * This method returns the previous non-hidden item in the list not 
+ * This method returns the previous non-hidden item in the list not
  * considering the tree hierarchy.
  */
 static TREEVIEW_ITEM *
@@ -334,7 +334,7 @@
 
 
 /***************************************************************************
- * This method returns the next physical item in the treeview not 
+ * This method returns the next physical item in the treeview not
  * considering the tree hierarchy.
  */
 static TREEVIEW_ITEM *
@@ -342,7 +342,7 @@
 {
     assert(tvItem != NULL);
 
-    /* 
+    /*
      * If this item has children and is expanded, return the first child
      */
     if ((tvItem->state & TVIS_EXPANDED) && tvItem->firstChild != NULL)
@@ -372,7 +372,7 @@
 }
 
 /***************************************************************************
- * This method returns the nth item starting at the given item.  It returns 
+ * This method returns the nth item starting at the given item.  It returns
  * the last item (or first) we we run out of items.
  *
  * Will scroll backward if count is <0.
@@ -687,7 +687,7 @@
     TREEVIEW_SendRealNotify(infoPtr,
                             (WPARAM)callback.hdr.idFrom, (LPARAM)&callback);
 
-    /* It may have changed due to a call to SetItem. */ 
+    /* It may have changed due to a call to SetItem. */
     mask &= wineItem->callbackMask;
 
     if ((mask & TVIF_TEXT) && callback.item.pszText != wineItem->pszText)
@@ -696,7 +696,7 @@
 	if (infoPtr->bNtfUnicode) {
 	    LPWSTR newText;
 	    int buflen;
-            int len = WideCharToMultiByte( CP_ACP, 0, 
+            int len = WideCharToMultiByte( CP_ACP, 0,
 					   (LPWSTR)callback.item.pszText, -1,
                                            NULL, 0, NULL, NULL );
 	    buflen = max((len+1)*sizeof(WCHAR), TEXT_CALLBACK_SIZE);
@@ -708,16 +708,16 @@
 	    if (newText)
 	    {
 		wineItem->pszText = (LPSTR)newText;
-		WideCharToMultiByte( CP_ACP, 0, 
+		WideCharToMultiByte( CP_ACP, 0,
 				     (LPWSTR)callback.item.pszText, -1,
-				     wineItem->pszText, buflen, 
+				     wineItem->pszText, buflen,
 				     NULL, NULL );
 		wineItem->cchTextMax = buflen;
 	    }
 	    /* If ReAlloc fails we have nothing to do, but keep original text */
 	}
 	else {
-	    int len = max(lstrlenA(callback.item.pszText) + 1, 
+	    int len = max(lstrlenA(callback.item.pszText) + 1,
 			  TEXT_CALLBACK_SIZE);
 	    LPSTR newText = COMCTL32_ReAlloc(wineItem->pszText, len);
 
@@ -739,7 +739,7 @@
 	    LPWSTR newText;
 	    LPSTR oldText = NULL;
 	    int buflen;
-            int len = WideCharToMultiByte( CP_ACP, 0, 
+            int len = WideCharToMultiByte( CP_ACP, 0,
 					   (LPWSTR)callback.item.pszText, -1,
                                            NULL, 0, NULL, NULL );
 	    buflen = max((len+1)*sizeof(WCHAR), TEXT_CALLBACK_SIZE);
@@ -752,7 +752,7 @@
 	    {
 		oldText = wineItem->pszText;
 		wineItem->pszText = (LPSTR)newText;
-		WideCharToMultiByte( CP_ACP, 0, 
+		WideCharToMultiByte( CP_ACP, 0,
 				     (LPWSTR)callback.item.pszText, -1,
 				     wineItem->pszText, buflen, NULL, NULL );
 		wineItem->cchTextMax = buflen;
@@ -761,7 +761,7 @@
 	    }
 	}
     }
- 
+
     if (mask & TVIF_IMAGE)
 	wineItem->iImage = callback.item.iImage;
 
@@ -1240,7 +1240,7 @@
 
 		    /* This will help us to exit if there is no more sibling */
 		    aChild = (aChild->nextSibling == 0)
-			? NULL	
+			? NULL
 			: aChild->nextSibling;
 
 		    /* Look at the next item */
@@ -1248,9 +1248,9 @@
 		}
 		else if (comp == 0)
 		{
-		    /* 
-		     * An item with this name is already existing, therefore,  
-		     * we add after the one we found 
+		    /*
+		     * An item with this name is already existing, therefore,
+		     * we add after the one we found
 		     */
 		    TREEVIEW_InsertAfter(newItem, aChild, parentItem);
 		    bItemInserted = TRUE;
@@ -1258,7 +1258,7 @@
 		}
 	    }
 
-	    /* 
+	    /*
 	     * we reach the end of the child list and the item has not
 	     * yet been inserted, therefore, insert it after the last child.
 	     */
@@ -1304,7 +1304,7 @@
        TREEVIEW_ComputeTextWidth(infoPtr, newItem, 0);
        TREEVIEW_UpdateScrollBars(infoPtr);
     /*
-     * if the item was inserted in a visible part of the tree, 
+     * if the item was inserted in a visible part of the tree,
      * invalidate it, as well as those after it
      */
        for (item = newItem;
@@ -1435,8 +1435,8 @@
 {
     TRACE("%p, (%s)\n", wineItem, TREEVIEW_ItemName(wineItem));
 
-    TREEVIEW_SendTreeviewNotify(infoPtr, 
-				(infoPtr->bNtfUnicode) ? TVN_DELETEITEMW : 
+    TREEVIEW_SendTreeviewNotify(infoPtr,
+				(infoPtr->bNtfUnicode) ? TVN_DELETEITEMW :
 				                         TVN_DELETEITEMA,
 				TVIF_HANDLE | TVIF_PARAM, 0, wineItem, 0);
 
@@ -1933,9 +1933,9 @@
     if (!TREEVIEW_ValidItem(infoPtr, wineItem) || !ISVISIBLE(wineItem))
 	return FALSE;
 
-    /* 
-     * If wParam is TRUE return the text size otherwise return 
-     * the whole item size        
+    /*
+     * If wParam is TRUE return the text size otherwise return
+     * the whole item size
      */
     if (fTextRect)
     {
@@ -2141,7 +2141,7 @@
 	    len ++;
 	    tvItemA.pszText = HeapAlloc(GetProcessHeap(),0,len*sizeof(WCHAR));
 	    len = WideCharToMultiByte(CP_ACP, 0, tvItem->pszText, -1,
-				      tvItemA.pszText ,len*sizeof(WCHAR), 
+				      tvItemA.pszText ,len*sizeof(WCHAR),
 				      NULL,NULL);
 	}
 	else
@@ -2300,7 +2300,7 @@
 	HPEN hOldPen, hNewPen;
 	HTREEITEM parent;
 
-	/* 
+	/*
 	 * Get a dotted grey pen
 	 */
 	hNewPen = CreatePen(PS_ALTERNATE, 0, infoPtr->clrLine);
@@ -2342,7 +2342,7 @@
 	DeleteObject(hNewPen);
     }
 
-    /* 
+    /*
      * Display the (+/-) signs
      */
 
@@ -2419,7 +2419,7 @@
 
     centery = (wineItem->rect.top + wineItem->rect.bottom) / 2;
 
-    /* 
+    /*
      * Display the images associated with this item
      */
     {
@@ -2439,7 +2439,7 @@
 	}
 
 	/* Now, draw the normal image; can be either selected or
-	 * non-selected image. 
+	 * non-selected image.
 	 */
 
 	if ((wineItem->state & TVIS_SELECTED) && (wineItem->iSelectedImage))
@@ -2465,7 +2465,7 @@
     }
 
 
-    /* 
+    /*
      * Display the text associated with this item
      */
 
@@ -2813,7 +2813,7 @@
             GetObjectA(hbitmap, sizeof(BITMAP), &bitmap);
             rc.left = 0; rc.top = 0;
             rc.right = bitmap.bmWidth;
-            rc.bottom = bitmap.bmHeight;  
+            rc.bottom = bitmap.bmHeight;
             TREEVIEW_EraseBackground(infoPtr, wParam);
         }
     }
@@ -3050,7 +3050,7 @@
 		       UINT action)
 {
     return !TREEVIEW_SendTreeviewNotify(infoPtr,
-				(infoPtr->bNtfUnicode) ? TVN_ITEMEXPANDINGW : 
+				(infoPtr->bNtfUnicode) ? TVN_ITEMEXPANDINGW :
 				                         TVN_ITEMEXPANDINGA,
 				action,
 					TVIF_HANDLE | TVIF_STATE | TVIF_PARAM
@@ -3062,8 +3062,8 @@
 TREEVIEW_SendExpanded(TREEVIEW_INFO *infoPtr, TREEVIEW_ITEM *wineItem,
 		      UINT action)
 {
-    TREEVIEW_SendTreeviewNotify(infoPtr, 
-				(infoPtr->bNtfUnicode) ? TVN_ITEMEXPANDEDW : 
+    TREEVIEW_SendTreeviewNotify(infoPtr,
+				(infoPtr->bNtfUnicode) ? TVN_ITEMEXPANDEDW :
 				                         TVN_ITEMEXPANDEDA,
 				action,
 				TVIF_HANDLE | TVIF_STATE | TVIF_PARAM
@@ -3240,8 +3240,8 @@
 }
 
 /* Note:If the specified item is the child of a collapsed parent item,
-   the parent's list of child items is (recursively) expanded to reveal the 
-   specified item. This is mentioned for TREEVIEW_SelectItem; don't 
+   the parent's list of child items is (recursively) expanded to reveal the
+   specified item. This is mentioned for TREEVIEW_SelectItem; don't
    know if it also applies here.
 */
 
@@ -3461,8 +3461,8 @@
     {
     case EN_UPDATE:
 	{
-	    /* 
-	     * Adjust the edit window size 
+	    /*
+	     * Adjust the edit window size
 	     */
 	    char buffer[1024];
 	    TREEVIEW_ITEM *editItem = infoPtr->selectedItem;
@@ -3897,8 +3897,8 @@
     if (TREEVIEW_SendSimpleNotify(infoPtr, NM_CLICK))
         goto setfocus;
 
-    /* 
-     * If the style allows editing and the node is already selected 
+    /*
+     * If the style allows editing and the node is already selected
      * and the click occurred on the item label...
      */
     if ((infoPtr->dwStyle & TVS_EDITLABELS) &&
@@ -4188,20 +4188,20 @@
 /*************************************************************************
  *		TREEVIEW_ProcessLetterKeys
  *
- *  Processes keyboard messages generated by pressing the letter keys 
+ *  Processes keyboard messages generated by pressing the letter keys
  *  on the keyboard.
- *  What this does is perform a case insensitive search from the 
+ *  What this does is perform a case insensitive search from the
  *  current position with the following quirks:
- *  - If two chars or more are pressed in quick succession we search 
+ *  - If two chars or more are pressed in quick succession we search
  *    for the corresponding string (e.g. 'abc').
- *  - If there is a delay we wipe away the current search string and 
+ *  - If there is a delay we wipe away the current search string and
  *    restart with just that char.
- *  - If the user keeps pressing the same character, whether slowly or 
- *    fast, so that the search string is entirely composed of this 
- *    character ('aaaaa' for instance), then we search for first item 
+ *  - If the user keeps pressing the same character, whether slowly or
+ *    fast, so that the search string is entirely composed of this
+ *    character ('aaaaa' for instance), then we search for first item
  *    that starting with that character.
- *  - If the user types the above character in quick succession, then 
- *    we must also search for the corresponding string ('aaaaa'), and 
+ *  - If the user types the above character in quick succession, then
+ *    we must also search for the corresponding string ('aaaaa'), and
  *    go to that string if there is a match.
  *
  * RETURNS
@@ -4210,13 +4210,13 @@
  *
  * BUGS
  *
- *  - The current implementation has a list of characters it will 
- *    accept and it ignores averything else. In particular it will 
- *    ignore accentuated characters which seems to match what 
- *    Windows does. But I'm not sure it makes sense to follow 
+ *  - The current implementation has a list of characters it will
+ *    accept and it ignores averything else. In particular it will
+ *    ignore accentuated characters which seems to match what
+ *    Windows does. But I'm not sure it makes sense to follow
  *    Windows there.
  *  - We don't sound a beep when the search fails.
- *  - The search should start from the focused item, not from the selected 
+ *  - The search should start from the focused item, not from the selected
  *    item. One reason for this is to allow for multiple selections in trees.
  *    But currently infoPtr->focusedItem does not seem very usable.
  *
@@ -4624,7 +4624,7 @@
     {
         TREEVIEW_ITEM *item;
         LONG scroll_pixels = infoPtr->scrollX - scrollX;
-        
+
         for (item = infoPtr->root->firstChild; item != NULL;
              item = TREEVIEW_GetNextListItem(infoPtr, item))
         {
@@ -4679,14 +4679,14 @@
 
 static LRESULT
 TREEVIEW_Create(HWND hwnd)
-{ 
+{
     RECT rcClient;
     TREEVIEW_INFO *infoPtr;
 
     TRACE("wnd %x, style %lx\n", hwnd, GetWindowLongA(hwnd, GWL_STYLE));
 
     infoPtr = (TREEVIEW_INFO *)COMCTL32_Alloc(sizeof(TREEVIEW_INFO));
- 
+
     if (infoPtr == NULL)
     {
 	ERR("could not allocate info memory!\n");
@@ -4768,7 +4768,7 @@
 
     /* Determine what type of notify should be issued */
     /* sets infoPtr->bNtfUnicode */
-    TREEVIEW_NotifyFormat(infoPtr, 0, NF_REQUERY); 
+    TREEVIEW_NotifyFormat(infoPtr, 0, NF_REQUERY);
 
     if (!(infoPtr->dwStyle & TVS_NOTOOLTIPS))
 	infoPtr->hwndToolTip = COMCTL32_CreateToolTip(hwnd);
@@ -5009,12 +5009,12 @@
 
 	if (lppgc->dwFlag == PGF_CALCWIDTH) {
 	    lppgc->iWidth = infoPtr->treeWidth;
-	    TRACE("got PGN_CALCSIZE, returning horz size = %ld, client=%ld\n", 
+	    TRACE("got PGN_CALCSIZE, returning horz size = %ld, client=%ld\n",
 		  infoPtr->treeWidth, infoPtr->clientWidth);
 	}
 	else {
 	    lppgc->iHeight = infoPtr->treeHeight;
-	    TRACE("got PGN_CALCSIZE, returning vert size = %ld, client=%ld\n", 
+	    TRACE("got PGN_CALCSIZE, returning vert size = %ld, client=%ld\n",
 		  infoPtr->treeHeight, infoPtr->clientHeight);
 	}
 	return 0;
diff --git a/dlls/comctl32/updown.c b/dlls/comctl32/updown.c
index 77f37ba..5016ba6 100644
--- a/dlls/comctl32/updown.c
+++ b/dlls/comctl32/updown.c
@@ -1,4 +1,4 @@
-/*		
+/*
  * Updown control
  *
  * Copyright 1997, 2002 Dimitrie O. Paun
@@ -151,7 +151,7 @@
  * want to draw a sunken edge to make like we are part of that control.
  */
 static BOOL UPDOWN_HasBuddyBorder(UPDOWN_INFO* infoPtr)
-{  
+{
     DWORD dwStyle = GetWindowLongW (infoPtr->Self, GWL_STYLE);
 
     return  ( ((dwStyle & (UDS_ALIGNLEFT | UDS_ALIGNRIGHT)) != 0) &&
@@ -181,7 +181,7 @@
             rect->left += DEFAULT_BUDDYBORDER;
         else
             rect->right -= DEFAULT_BUDDYBORDER;
-    
+
         InflateRect(rect, 0, -DEFAULT_BUDDYBORDER);
     }
 
@@ -190,7 +190,7 @@
 	if (dwStyle & UDS_ALIGNLEFT) rect->right -= DEFAULT_BUDDYSPACER;
 	else rect->left += DEFAULT_BUDDYSPACER;
     }
-    
+
     /*
      * We're calculating the midpoint to figure-out where the
      * separation between the buttons will lay. We make sure that we
@@ -199,7 +199,7 @@
     if (dwStyle & UDS_HORZ) {
         int len = rect->right - rect->left + 1; /* compute the width */
         if (arrow & FLAG_INCR)
-            rect->left = rect->left + len/2; 
+            rect->left = rect->left + len/2;
         if (arrow & FLAG_DECR)
             rect->right =  rect->left + len/2 - 1;
     } else {
@@ -267,7 +267,7 @@
         /* we have a regular window, so will get the text */
         if (!GetWindowTextW(infoPtr->Buddy, txt, COUNT_OF(txt))) return FALSE;
 
-        sep = UPDOWN_GetThousandSep(); 
+        sep = UPDOWN_GetThousandSep();
 
         /* now get rid of the separators */
         for(src = dst = txt; *src; src++)
@@ -278,7 +278,7 @@
         newVal = strtolW(txt, &src, infoPtr->Base);
         if(*src || !UPDOWN_InBounds (infoPtr, newVal)) return FALSE;
     }
-  
+
     TRACE("new value(%d) from buddy (old=%d)\n", newVal, infoPtr->CurVal);
     infoPtr->CurVal = newVal;
     return TRUE;
@@ -306,7 +306,7 @@
     if (UPDOWN_IsBuddyListbox(infoPtr)) {
         return SendMessageW(infoPtr->Buddy, LB_SETCURSEL, infoPtr->CurVal, 0) != LB_ERR;
     }
-   
+
     /* Regular window, so set caption to the number */
     if (infoPtr->Base == 16) fmt[1] = 'X';
     len = wsprintfW(txt, fmt, infoPtr->CurVal);
@@ -317,7 +317,7 @@
         WCHAR tmp[COUNT_OF(txt)], *src = tmp, *dst = txt;
         WCHAR sep = UPDOWN_GetThousandSep();
 	int start = len % 3;
-	
+
 	memcpy(tmp, txt, sizeof(txt));
 	if (start == 0) start = 3;
 	dst += start;
@@ -328,9 +328,9 @@
         }
         *dst = 0;
     }
-    
+
     return SetWindowTextW(infoPtr->Buddy, txt);
-} 
+}
 
 /***********************************************************************
  * UPDOWN_Draw
@@ -346,16 +346,16 @@
     /* Draw the common border between ourselves and our buddy */
     if (UPDOWN_HasBuddyBorder(infoPtr)) {
 	GetClientRect(infoPtr->Self, &rect);
-	DrawEdge(hdc, &rect, EDGE_SUNKEN, 
-		 BF_BOTTOM | BF_TOP | 
+	DrawEdge(hdc, &rect, EDGE_SUNKEN,
+		 BF_BOTTOM | BF_TOP |
 		 (dwStyle & UDS_ALIGNLEFT ? BF_LEFT : BF_RIGHT));
     }
-  
+
     /* Draw the incr button */
     UPDOWN_GetArrowRect (infoPtr, &rect, FLAG_INCR);
     pressed = (infoPtr->Flags & FLAG_PRESSED) && (infoPtr->Flags & FLAG_INCR);
     hot = (infoPtr->Flags & FLAG_INCR) && (infoPtr->Flags & FLAG_MOUSEIN);
-    DrawFrameControl(hdc, &rect, DFC_SCROLL, 
+    DrawFrameControl(hdc, &rect, DFC_SCROLL,
 	(dwStyle & UDS_HORZ ? DFCS_SCROLLRIGHT : DFCS_SCROLLUP) |
         ((dwStyle & UDS_HOTTRACK) && hot ? DFCS_HOT : 0) |
 	(pressed ? DFCS_PUSHED : 0) |
@@ -365,7 +365,7 @@
     UPDOWN_GetArrowRect(infoPtr, &rect, FLAG_DECR);
     pressed = (infoPtr->Flags & FLAG_PRESSED) && (infoPtr->Flags & FLAG_DECR);
     hot = (infoPtr->Flags & FLAG_DECR) && (infoPtr->Flags & FLAG_MOUSEIN);
-    DrawFrameControl(hdc, &rect, DFC_SCROLL, 
+    DrawFrameControl(hdc, &rect, DFC_SCROLL,
 	(dwStyle & UDS_HORZ ? DFCS_SCROLLLEFT : DFCS_SCROLLDOWN) |
         ((dwStyle & UDS_HOTTRACK) && hot ? DFCS_HOT : 0) |
 	(pressed ? DFCS_PUSHED : 0) |
@@ -398,11 +398,11 @@
 static LRESULT UPDOWN_KeyPressed(UPDOWN_INFO *infoPtr, int key)
 {
     int arrow;
-    
+
     if (key == VK_UP) arrow = FLAG_INCR;
     else if (key == VK_DOWN) arrow = FLAG_DECR;
     else return 1;
-    
+
     UPDOWN_GetBuddyInt (infoPtr);
     infoPtr->Flags &= ~FLAG_ARROW;
     infoPtr->Flags |= FLAG_PRESSED | arrow;
@@ -413,19 +413,19 @@
 }
 
 /***********************************************************************
- * UPDOWN_Buddy_SubclassProc used to handle messages sent to the buddy 
+ * UPDOWN_Buddy_SubclassProc used to handle messages sent to the buddy
  *                           control.
  */
-static LRESULT CALLBACK 
+static LRESULT CALLBACK
 UPDOWN_Buddy_SubclassProc(HWND  hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
 {
     WNDPROC superClassWndProc = (WNDPROC)GetPropA(hwnd, BUDDY_SUPERCLASS_WNDPROC);
-    TRACE("hwnd=%04x, wndProc=%d, uMsg=%04x, wParam=%d, lParam=%d\n", 
+    TRACE("hwnd=%04x, wndProc=%d, uMsg=%04x, wParam=%d, lParam=%d\n",
 	  hwnd, (INT)superClassWndProc, uMsg, wParam, (UINT)lParam);
 
     if (uMsg == WM_KEYDOWN) {
         HWND upDownHwnd = GetPropA(hwnd, BUDDY_UPDOWN_HWND);
-      
+
 	UPDOWN_KeyPressed(UPDOWN_GetInfoPtr(upDownHwnd), (int)wParam);
     }
 
@@ -436,7 +436,7 @@
  *           UPDOWN_SetBuddy
  * Tests if 'bud' is a valid window handle. If not, returns FALSE.
  * Else, sets it as a new Buddy.
- * Then, it should subclass the buddy 
+ * Then, it should subclass the buddy
  * If window has the UDS_ARROWKEYS, it subcalsses the buddy window to
  * process the UP/DOWN arrow keys.
  * If window has the UDS_ALIGNLEFT or UDS_ALIGNRIGHT style
@@ -449,20 +449,20 @@
     int   x, width;  /* new x position and width for the up-down */
     WNDPROC baseWndProc, currWndProc;
     CHAR buddyClass[40];
- 	  
+
     /* Is it a valid bud? */
     if(!IsWindow(bud)) return FALSE;
 
     TRACE("(hwnd=%04x, bud=%04x)\n", infoPtr->Self, bud);
-    
+
     /* there is already a body assigned */
     if (infoPtr->Buddy)  RemovePropA(infoPtr->Buddy, BUDDY_UPDOWN_HWND);
 
     /* Store buddy window handle */
-    infoPtr->Buddy = bud;   
+    infoPtr->Buddy = bud;
 
-    /* keep upDown ctrl hwnd in a buddy property */            
-    SetPropA( bud, BUDDY_UPDOWN_HWND, infoPtr->Self); 
+    /* keep upDown ctrl hwnd in a buddy property */
+    SetPropA( bud, BUDDY_UPDOWN_HWND, infoPtr->Self);
 
     /* Store buddy window class type */
     infoPtr->BuddyType = BUDDY_TYPE_UNKNOWN;
@@ -474,12 +474,12 @@
     }
 
     if(dwStyle & UDS_ARROWKEYS){
-        /* Note that I don't clear the BUDDY_SUPERCLASS_WNDPROC property 
-           when we reset the upDown ctrl buddy to another buddy because it is not 
+        /* Note that I don't clear the BUDDY_SUPERCLASS_WNDPROC property
+           when we reset the upDown ctrl buddy to another buddy because it is not
            good to break the window proc chain. */
 	currWndProc = (WNDPROC) GetWindowLongW(bud, GWL_WNDPROC);
 	if (currWndProc != UPDOWN_Buddy_SubclassProc) {
-	    baseWndProc = (WNDPROC)SetWindowLongW(bud, GWL_WNDPROC, (LPARAM)UPDOWN_Buddy_SubclassProc); 
+	    baseWndProc = (WNDPROC)SetWindowLongW(bud, GWL_WNDPROC, (LPARAM)UPDOWN_Buddy_SubclassProc);
  	    SetPropA(bud, BUDDY_SUPERCLASS_WNDPROC, (HANDLE)baseWndProc);
 	}
     }
@@ -501,7 +501,7 @@
 
     /* first adjust the buddy to accomodate the up/down */
     SetWindowPos(infoPtr->Buddy, 0, budRect.left, budRect.top,
-	         budRect.right  - budRect.left, budRect.bottom - budRect.top, 
+	         budRect.right  - budRect.left, budRect.bottom - budRect.top,
 	         SWP_NOACTIVATE|SWP_NOZORDER);
 
     /* now position the up/down */
@@ -511,7 +511,7 @@
 
     /*
      * If the updown has a buddy border, it has to overlap with the buddy
-     * to look as if it is integrated with the buddy control. 
+     * to look as if it is integrated with the buddy control.
      * We nudge the control or change it size to overlap.
      */
     if (UPDOWN_HasBuddyBorder(infoPtr)) {
@@ -521,18 +521,18 @@
             x -= DEFAULT_BUDDYBORDER;
     }
 
-    SetWindowPos(infoPtr->Self, infoPtr->Buddy, x, 
-		 budRect.top - DEFAULT_ADDTOP, width, 
+    SetWindowPos(infoPtr->Self, infoPtr->Buddy, x,
+		 budRect.top - DEFAULT_ADDTOP, width,
 		 budRect.bottom - budRect.top + DEFAULT_ADDTOP + DEFAULT_ADDBOT,
 		 SWP_NOACTIVATE);
 
     return TRUE;
-}	  
+}
 
 /***********************************************************************
  *           UPDOWN_DoAction
  *
- * This function increments/decrements the CurVal by the 
+ * This function increments/decrements the CurVal by the
  * 'delta' amount according to the 'action' flag which can be a
  * combination of FLAG_INCR and FLAG_DECR
  * It notifies the parent as required.
@@ -555,7 +555,7 @@
     ni.iDelta = delta;
     ni.hdr.hwndFrom = infoPtr->Self;
     ni.hdr.idFrom   = GetWindowLongW (infoPtr->Self, GWL_ID);
-    ni.hdr.code = UDN_DELTAPOS; 
+    ni.hdr.code = UDN_DELTAPOS;
     if (!SendMessageW(GetParent (infoPtr->Self), WM_NOTIFY,
 		   (WPARAM)ni.hdr.idFrom, (LPARAM)&ni)) {
         /* Parent said: OK to adjust */
@@ -566,10 +566,10 @@
             if (dwStyle & UDS_SETBUDDYINT) UPDOWN_SetBuddyInt (infoPtr);
         }
     }
-  
+
     /* Also, notify it. This message is sent in any case. */
-    SendMessageW( GetParent(infoPtr->Self), 
-		  dwStyle & UDS_HORZ ? WM_HSCROLL : WM_VSCROLL, 
+    SendMessageW( GetParent(infoPtr->Self),
+		  dwStyle & UDS_HORZ ? WM_HSCROLL : WM_VSCROLL,
 		  MAKELONG(SB_THUMBPOSITION, infoPtr->CurVal), infoPtr->Self);
 }
 
@@ -593,17 +593,17 @@
  *
  * Deletes any timers, releases the mouse and does  redraw if necessary.
  * If the control is not in "capture" mode, it does nothing.
- * If the control was not in cancel mode, it returns FALSE. 
+ * If the control was not in cancel mode, it returns FALSE.
  * If the control was in cancel mode, it returns TRUE.
  */
 static BOOL UPDOWN_CancelMode (UPDOWN_INFO *infoPtr)
 {
     if (!(infoPtr->Flags & FLAG_PRESSED)) return FALSE;
-    
+
     KillTimer (infoPtr->Self, TIMER_AUTOREPEAT);
     KillTimer (infoPtr->Self, TIMER_ACCEL);
     KillTimer (infoPtr->Self, TIMER_AUTOPRESS);
-  
+
     if (GetCapture() == infoPtr->Self) {
 	NMHDR hdr;
 	hdr.hwndFrom = infoPtr->Self;
@@ -612,10 +612,10 @@
 	SendMessageW(GetParent (infoPtr->Self), WM_NOTIFY, hdr.idFrom, (LPARAM)&hdr);
 	ReleaseCapture();
     }
-    
+
     infoPtr->Flags &= ~FLAG_PRESSED;
     InvalidateRect (infoPtr->Self, NULL, FALSE);
-  
+
     return TRUE;
 }
 
@@ -624,7 +624,7 @@
  *
  * Handle a mouse event for the updown.
  * 'pt' is the location of the mouse event in client or
- * windows coordinates. 
+ * windows coordinates.
  */
 static void UPDOWN_HandleMouseEvent (UPDOWN_INFO *infoPtr, UINT msg, POINT pt)
 {
@@ -646,10 +646,10 @@
 
             	/* Update the CurVal if necessary */
             	if (dwStyle & UDS_SETBUDDYINT) UPDOWN_GetBuddyInt (infoPtr);
-	
+
             	/* Set up the correct flags */
-            	infoPtr->Flags |= FLAG_PRESSED; 
-      
+            	infoPtr->Flags |= FLAG_PRESSED;
+
             	/* repaint the control */
 	    	InvalidateRect (infoPtr->Self, NULL, FALSE);
 
@@ -678,7 +678,7 @@
             } else {
 	        if(infoPtr->AccelIndex != -1) infoPtr->AccelIndex = 0;
             }
-	    
+
             /* If state changed, redraw the control */
             if(temp != infoPtr->Flags)
 		 InvalidateRect (infoPtr->Self, &rect, FALSE);
@@ -699,9 +699,9 @@
     UPDOWN_INFO *infoPtr = UPDOWN_GetInfoPtr (hwnd);
     DWORD dwStyle = GetWindowLongW (hwnd, GWL_STYLE);
     int temp;
-    
+
     if (!infoPtr && (message != WM_CREATE))
-        return DefWindowProcW (hwnd, message, wParam, lParam); 
+        return DefWindowProcW (hwnd, message, wParam, lParam);
 
     switch(message)
     {
@@ -715,8 +715,8 @@
 	    infoPtr->AccelCount = 0;
 	    infoPtr->AccelVect = 0;
 	    infoPtr->AccelIndex = -1;
-	    infoPtr->CurVal = 0; 
-	    infoPtr->MinVal = 0; 
+	    infoPtr->CurVal = 0;
+	    infoPtr->MinVal = 0;
 	    infoPtr->MaxVal = 9999;
 	    infoPtr->Base  = 10; /* Default to base 10  */
 	    infoPtr->Buddy = 0;  /* No buddy window yet */
@@ -725,10 +725,10 @@
             /* Do we pick the buddy win ourselves? */
 	    if (dwStyle & UDS_AUTOBUDDY)
 		UPDOWN_SetBuddy (infoPtr, GetWindow (hwnd, GW_HWNDPREV));
-	
+
 	    TRACE("UpDown Ctrl creation, hwnd=%04x\n", hwnd);
 	    break;
-    
+
 	case WM_DESTROY:
 	    if(infoPtr->AccelVect) COMCTL32_Free (infoPtr->AccelVect);
 
@@ -738,7 +738,7 @@
 	    SetWindowLongW (hwnd, 0, 0);
 	    TRACE("UpDown Ctrl destruction, hwnd=%04x\n", hwnd);
 	    break;
-	
+
 	case WM_ENABLE:
 	    if (dwStyle & WS_DISABLED) UPDOWN_CancelMode (infoPtr);
 	    InvalidateRect (infoPtr->Self, NULL, FALSE);
@@ -770,13 +770,13 @@
 	    if(infoPtr->Flags & FLAG_MOUSEIN) {
 		temp = infoPtr->AccelIndex == -1 ? 1 : infoPtr->AccelVect[infoPtr->AccelIndex].nInc;
 		UPDOWN_DoAction(infoPtr, temp, infoPtr->Flags & FLAG_ARROW);
-	
+
 		if(infoPtr->AccelIndex != -1 && infoPtr->AccelIndex < infoPtr->AccelCount-1) {
 		    KillTimer(hwnd, TIMER_ACCEL);
 		    infoPtr->AccelIndex++; /* move to the next accel info */
 		    temp = infoPtr->AccelVect[infoPtr->AccelIndex].nSec * 1000 + 1;
 	  	    /* make sure we have at least 1ms intervals */
-		    SetTimer(hwnd, TIMER_ACCEL, temp, 0);	    
+		    SetTimer(hwnd, TIMER_ACCEL, temp, 0);
 		}
 	    }
 	    break;
@@ -786,11 +786,11 @@
 
 	case WM_LBUTTONUP:
 	    if (GetCapture() != infoPtr->Self) break;
-	    
+
 	    if ( (infoPtr->Flags & FLAG_MOUSEIN) &&
 		 (infoPtr->Flags & FLAG_ARROW) ) {
-		    
-	    	SendMessageW( GetParent(hwnd), 
+
+	    	SendMessageW( GetParent(hwnd),
 			      dwStyle & UDS_HORZ ? WM_HSCROLL : WM_VSCROLL,
                   	      MAKELONG(SB_ENDSCROLL, infoPtr->CurVal), hwnd);
 		if (UPDOWN_IsBuddyEdit(infoPtr))
@@ -798,7 +798,7 @@
 	    }
 	    UPDOWN_CancelMode(infoPtr);
 	    break;
-      
+
 	case WM_LBUTTONDOWN:
 	case WM_MOUSEMOVE:
 	    if(UPDOWN_IsEnabled(infoPtr)){
@@ -814,10 +814,10 @@
 		return UPDOWN_KeyPressed(infoPtr, (int)wParam);
 	    }
 	    break;
-      
+
 	case WM_PAINT:
 	    return UPDOWN_Paint (infoPtr, (HDC)wParam);
-    
+
 	case UDM_GETACCEL:
 	    if (wParam==0 && lParam==0) return infoPtr->AccelCount;
 	    if (wParam && lParam) {
@@ -883,20 +883,20 @@
 	    infoPtr->CurVal = temp;
 	    if(dwStyle & UDS_SETBUDDYINT) UPDOWN_SetBuddyInt (infoPtr);
 	    return wParam;            /* return prev value */
-      
+
 	case UDM_GETRANGE:
 	    if (wParam || lParam) UNKNOWN_PARAM(UDM_GETRANGE, wParam, lParam);
 	    return MAKELONG(infoPtr->MaxVal, infoPtr->MinVal);
 
 	case UDM_SETRANGE:
-	    if (wParam) UNKNOWN_PARAM(UDM_SETRANGE, wParam, lParam); 
+	    if (wParam) UNKNOWN_PARAM(UDM_SETRANGE, wParam, lParam);
 		                               /* we must have:     */
 	    infoPtr->MaxVal = SLOWORD(lParam); /* UD_MINVAL <= Max <= UD_MAXVAL */
 	    infoPtr->MinVal = SHIWORD(lParam); /* UD_MINVAL <= Min <= UD_MAXVAL */
                 	                       /* |Max-Min| <= UD_MAXVAL        */
-	    TRACE("UpDown Ctrl new range(%d to %d), hwnd=%04x\n", 
+	    TRACE("UpDown Ctrl new range(%d to %d), hwnd=%04x\n",
 		  infoPtr->MinVal, infoPtr->MaxVal, hwnd);
-	    break;                             
+	    break;
 
 	case UDM_GETRANGE32:
 	    if (wParam) *(LPINT)wParam = infoPtr->MinVal;
@@ -908,7 +908,7 @@
 	    infoPtr->MaxVal = (INT)lParam;
 	    if (infoPtr->MaxVal <= infoPtr->MinVal)
 		infoPtr->MaxVal = infoPtr->MinVal + 1;
-	    TRACE("UpDown Ctrl new range(%d to %d), hwnd=%04x\n", 
+	    TRACE("UpDown Ctrl new range(%d to %d), hwnd=%04x\n",
 		  infoPtr->MinVal, infoPtr->MaxVal, hwnd);
 	    break;
 
@@ -937,12 +937,12 @@
 	    temp = infoPtr->UnicodeFormat;
 	    infoPtr->UnicodeFormat = (BOOL)wParam;
 	    return temp;
-	    
-	default: 
-	    if (message >= WM_USER) 
+
+	default:
+	    if (message >= WM_USER)
 	     	ERR("unknown msg %04x wp=%04x lp=%08lx\n", message, wParam, lParam);
-	    return DefWindowProcW (hwnd, message, wParam, lParam); 
-    } 
+	    return DefWindowProcW (hwnd, message, wParam, lParam);
+    }
 
     return 0;
 }
@@ -966,7 +966,7 @@
     wndClass.hCursor       = LoadCursorW( 0, IDC_ARROWW );
     wndClass.hbrBackground = (HBRUSH)(COLOR_3DFACE + 1);
     wndClass.lpszClassName = UPDOWN_CLASSW;
- 
+
     RegisterClassW( &wndClass );
 }
 
diff --git a/dlls/commdlg/cdlg.h b/dlls/commdlg/cdlg.h
index 9fb24e9..df107f3 100644
--- a/dlls/commdlg/cdlg.h
+++ b/dlls/commdlg/cdlg.h
@@ -70,7 +70,7 @@
 
 #define PD32_PRINTER_STATUS_READY             1536
 #define PD32_PRINTER_STATUS_PAUSED            1537
-#define PD32_PRINTER_STATUS_ERROR             1538 
+#define PD32_PRINTER_STATUS_ERROR             1538
 #define PD32_PRINTER_STATUS_PENDING_DELETION  1539
 #define PD32_PRINTER_STATUS_PAPER_JAM         1540
 #define PD32_PRINTER_STATUS_PAPER_OUT         1541
@@ -183,7 +183,7 @@
 } FINDREPLACE16, *LPFINDREPLACE16;
 
 typedef UINT16 (CALLBACK *LPCFHOOKPROC16)(HWND16,UINT16,WPARAM16,LPARAM);
-typedef struct 
+typedef struct
 {
 	DWORD			lStructSize;
 	HWND16			hwndOwner;          /* caller's window handle   */
diff --git a/dlls/commdlg/cdlg32.c b/dlls/commdlg/cdlg32.c
index f3bcbfc..c8e90fa 100644
--- a/dlls/commdlg/cdlg32.c
+++ b/dlls/commdlg/cdlg32.c
@@ -89,7 +89,7 @@
 		COMDLG32_TlsIndex = 0xffffffff;
 
 		SHELL32_hInstance = GetModuleHandleA("SHELL32.DLL");
-		
+
 		if (!SHELL32_hInstance)
 		{
 			ERR("loading of shell32 failed\n");
@@ -102,9 +102,9 @@
 		GPA(COMDLG32_PIDL_ILGetNext, SHELL32_hInstance, (LPCSTR)153L);
 		GPA(COMDLG32_PIDL_ILClone, SHELL32_hInstance, (LPCSTR)18L);
 		GPA(COMDLG32_PIDL_ILRemoveLastID, SHELL32_hInstance, (LPCSTR)17L);
-		
+
 		/* SHELL */
-		
+
 		GPA(COMDLG32_SHAlloc, SHELL32_hInstance, (LPCSTR)196L);
 		GPA(COMDLG32_SHFree, SHELL32_hInstance, (LPCSTR)195L);
 		/* for the first versions of shell32 SHGetFolderPathA is in SHFOLDER.DLL */
@@ -177,7 +177,7 @@
  */
 DWORD WINAPI CommDlgExtendedError(void)
 {
-        if (COMDLG32_TlsIndex != 0xffffffff) 
+        if (COMDLG32_TlsIndex != 0xffffffff)
 	  return (DWORD)TlsGetValue(COMDLG32_TlsIndex);
 	else
 	  return 0; /* we never set an error, so there isn't one */
diff --git a/dlls/commdlg/colordlg.c b/dlls/commdlg/colordlg.c
index d08e6a8..4e079a0 100644
--- a/dlls/commdlg/colordlg.c
+++ b/dlls/commdlg/colordlg.c
@@ -69,7 +69,7 @@
  LPCHOOSECOLOR16 lpcc16; /* save the 16 bits pointer */
  int nextuserdef;     /* next free place in user defined color array */
  HDC hdcMem;        /* color graph used for BitBlt() */
- HBITMAP hbmMem;    /* color graph bitmap */    
+ HBITMAP hbmMem;    /* color graph bitmap */
  RECT fullsize;     /* original dialog window size */
  UINT msetrgb;        /* # of SETRGBSTRING message (today not used)  */
  RECT old3angle;    /* last position of l-marker */
@@ -459,7 +459,7 @@
  int oben;
  RECT rect;
  HWND hwnd = GetDlgItem(hDlg, 0x2be);
- LCCPRIV lpp = (LCCPRIV)GetWindowLongA( hDlg, DWL_USER); 
+ LCCPRIV lpp = (LCCPRIV)GetWindowLongA( hDlg, DWL_USER);
 
  if (IsWindowVisible( GetDlgItem(hDlg, 0x2c6)))   /* if full size */
  {
@@ -497,7 +497,7 @@
  HDC hDC;
  int w = GetDialogBaseUnits();
  HWND hwnd = GetDlgItem(hDlg, 0x2c6);
- LCCPRIV lpp = (LCCPRIV)GetWindowLongA( hDlg, DWL_USER ); 
+ LCCPRIV lpp = (LCCPRIV)GetWindowLongA( hDlg, DWL_USER );
  RECT rect;
  POINT point, p;
  HPEN hPen;
@@ -519,11 +519,11 @@
    lpp->oldcross.left   = point.x - w - 1;
    lpp->oldcross.right  = point.x + w + 1;
    lpp->oldcross.top    = point.y - w - 1;
-   lpp->oldcross.bottom = point.y + w + 1; 
+   lpp->oldcross.bottom = point.y + w + 1;
 
-   MoveToEx(hDC, point.x - w, point.y, &p); 
+   MoveToEx(hDC, point.x - w, point.y, &p);
    LineTo(hDC, point.x + w, point.y);
-   MoveToEx(hDC, point.x, point.y - w, &p); 
+   MoveToEx(hDC, point.x, point.y - w, &p);
    LineTo(hDC, point.x, point.y + w);
    DeleteObject( SelectObject(hDC, hPen)) ;
    ReleaseDC(hwnd, hDC);
@@ -538,11 +538,11 @@
 /***********************************************************************
  *                    CC_PrepareColorGraph                    [internal]
  */
-static void CC_PrepareColorGraph( HWND hDlg )    
+static void CC_PrepareColorGraph( HWND hDlg )
 {
  int sdif, hdif, xdif, ydif, r, g, b, hue, sat;
  HWND hwnd = GetDlgItem(hDlg, 0x2c6);
- LCCPRIV lpp = (LCCPRIV)GetWindowLongA(hDlg, DWL_USER);  
+ LCCPRIV lpp = (LCCPRIV)GetWindowLongA(hDlg, DWL_USER);
  HBRUSH hbrush;
  HDC hdc ;
  RECT rect, client;
@@ -585,7 +585,7 @@
 static void CC_PaintColorGraph( HWND hDlg )
 {
  HWND hwnd = GetDlgItem( hDlg, 0x2c6 );
- LCCPRIV lpp = (LCCPRIV)GetWindowLongA(hDlg, DWL_USER); 
+ LCCPRIV lpp = (LCCPRIV)GetWindowLongA(hDlg, DWL_USER);
  HDC  hDC;
  RECT rect;
  if (IsWindowVisible(hwnd))   /* if full size */
@@ -645,7 +645,7 @@
 static void CC_EditSetRGB( HWND hDlg, COLORREF cr )
 {
  char buffer[10];
- LCCPRIV lpp = (LCCPRIV)GetWindowLongA(hDlg, DWL_USER); 
+ LCCPRIV lpp = (LCCPRIV)GetWindowLongA(hDlg, DWL_USER);
  int r = GetRValue(cr);
  int g = GetGValue(cr);
  int b = GetBValue(cr);
@@ -690,8 +690,8 @@
 static void CC_SwitchToFullSize( HWND hDlg, COLORREF result, LPRECT lprect )
 {
  int i;
- LCCPRIV lpp = (LCCPRIV)GetWindowLongA(hDlg, DWL_USER); 
- 
+ LCCPRIV lpp = (LCCPRIV)GetWindowLongA(hDlg, DWL_USER);
+
  EnableWindow( GetDlgItem(hDlg, 0x2cf), FALSE);
  CC_PrepareColorGraph(hDlg);
  for (i = 0x2bf; i < 0x2c5; i++)
@@ -738,7 +738,7 @@
  FillRect(hdc, &rect, GetClassLongA(hwnd, GCL_HBRBACKGROUND));
  for ( j = 0; j < rows; j++ )
  {
-  for ( i = 0; i < cols; i++ ) 
+  for ( i = 0; i < cols; i++ )
   {
    hBrush = CreateSolidBrush(predefcolors[j][i]);
    if (hBrush)
@@ -759,7 +759,7 @@
 }
 /***********************************************************************
  *                             CC_PaintUserColorArray         [internal]
- *               Paint the 16 user-selected colors 
+ *               Paint the 16 user-selected colors
  */
 static void CC_PaintUserColorArray( HWND hDlg, int rows, int cols, COLORREF* lpcr )
 {
@@ -777,7 +777,7 @@
  k = rect.left;
 
  hdc = GetDC(hwnd);
- if (hdc) 
+ if (hdc)
  {
   FillRect(hdc, &rect, GetClassLongA(hwnd, GCL_HBRBACKGROUND) );
   for (j = 0; j < rows; j++)
@@ -786,7 +786,7 @@
    {
     hBrush = CreateSolidBrush(lpcr[i+j*cols]);
     if (hBrush)
-    { 
+    {
      hBrush = SelectObject(hdc, hBrush) ;
      Rectangle(hdc, rect.left, rect.top,
                   rect.left + dx - DISTANCE, rect.top + dy - DISTANCE);
@@ -821,15 +821,15 @@
 /***********************************************************************
  *                              CC_WMInitDialog                  [internal]
  */
-static LONG CC_WMInitDialog( HWND hDlg, WPARAM wParam, LPARAM lParam, BOOL b16 ) 
+static LONG CC_WMInitDialog( HWND hDlg, WPARAM wParam, LPARAM lParam, BOOL b16 )
 {
    int i, res;
    int r, g, b;
    HWND hwnd;
    RECT rect;
    POINT point;
-   LCCPRIV lpp; 
-   
+   LCCPRIV lpp;
+
    TRACE("WM_INITDIALOG lParam=%08lX\n", lParam);
    lpp = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(struct CCPRIVATE) );
    if (b16)
@@ -845,7 +845,7 @@
            return FALSE;
        }
        ch32->lStructSize = sizeof(CHOOSECOLORW);
-       ch32->hwndOwner = ch16->hwndOwner; 
+       ch32->hwndOwner = ch16->hwndOwner;
        ch32->hInstance = ch16->hInstance;
        ch32->lpCustColors = MapSL(ch16->lpCustColors);
        ch32->lpfnHook = (LPCCHOOKPROC) ch16->lpfnHook; /* only used as flag */
@@ -859,7 +859,7 @@
       EndDialog (hDlg, 0) ;
       return FALSE;
    }
-   SetWindowLongA(hDlg, DWL_USER, (LONG)lpp); 
+   SetWindowLongA(hDlg, DWL_USER, (LONG)lpp);
 
    if (!(lpp->lpcc->Flags & CC_SHOWHELP))
       ShowWindow( GetDlgItem(hDlg,0x40e), SW_HIDE);
@@ -869,7 +869,7 @@
    cpos = MAKELONG(5,7); /* init */
    if (lpp->lpcc->Flags & CC_RGBINIT)
    {
-     for (i = 0; i < 6; i++) 
+     for (i = 0; i < 6; i++)
        for (j = 0; j < 8; j++)
         if (predefcolors[i][j] == lpp->lpcc->rgbResult)
         {
@@ -921,7 +921,7 @@
       else
           res = CallWindowProcA( (WNDPROC)lpp->lpcc->lpfnHook, hDlg, WM_INITDIALOG, wParam, lParam);
    }
-   
+
    /* Set the initial values of the color chooser dialog */
    r = GetRValue(lpp->lpcc->rgbResult);
    g = GetGValue(lpp->lpcc->rgbResult);
@@ -950,13 +950,13 @@
 /***********************************************************************
  *                              CC_WMCommand                  [internal]
  */
-static LRESULT CC_WMCommand( HWND hDlg, WPARAM wParam, LPARAM lParam, WORD notifyCode, HWND hwndCtl ) 
+static LRESULT CC_WMCommand( HWND hDlg, WPARAM wParam, LPARAM lParam, WORD notifyCode, HWND hwndCtl )
 {
     int  r, g, b, i, xx;
     UINT cokmsg;
     HDC hdc;
     COLORREF *cr;
-    LCCPRIV lpp = (LCCPRIV)GetWindowLongA(hDlg, DWL_USER); 
+    LCCPRIV lpp = (LCCPRIV)GetWindowLongA(hDlg, DWL_USER);
     TRACE("CC_WMCommand wParam=%x lParam=%lx\n", wParam, lParam);
     switch (wParam)
     {
@@ -989,7 +989,7 @@
 			   }
 			 }
 		 break;
-		 
+
 	  case 0x2bf:  /* edit notify HSL */
 	  case 0x2c0:
 	  case 0x2c1:
@@ -1016,7 +1016,7 @@
 			   }
 			 }
 	       break;
-	       
+
           case 0x2cf:
                CC_SwitchToFullSize(hDlg, lpp->lpcc->rgbResult, &lpp->fullsize);
 	       SetFocus( GetDlgItem(hDlg, 0x2bf));
@@ -1089,7 +1089,7 @@
                 }
 		EndDialog(hDlg, 1) ;
 		return TRUE ;
-	
+
 	  case IDCANCEL :
 		EndDialog(hDlg, 0) ;
 		return TRUE ;
@@ -1101,11 +1101,11 @@
 /***********************************************************************
  *                              CC_WMPaint                    [internal]
  */
-static LRESULT CC_WMPaint( HWND hDlg, WPARAM wParam, LPARAM lParam ) 
+static LRESULT CC_WMPaint( HWND hDlg, WPARAM wParam, LPARAM lParam )
 {
     HDC hdc;
     PAINTSTRUCT ps;
-    LCCPRIV lpp = (LCCPRIV)GetWindowLongA(hDlg, DWL_USER); 
+    LCCPRIV lpp = (LCCPRIV)GetWindowLongA(hDlg, DWL_USER);
 
     hdc = BeginPaint(hDlg, &ps);
     /* we have to paint dialog children except text and buttons */
@@ -1134,7 +1134,7 @@
        ReleaseCapture();
        CC_PaintCross(hDlg, lpp->h, lpp->s);
        return 1;
-   } 
+   }
    return 0;
 }
 
@@ -1142,15 +1142,15 @@
 /***********************************************************************
  *                              CC_WMMouseMove              [internal]
  */
-static LRESULT CC_WMMouseMove( HWND hDlg, LPARAM lParam ) 
+static LRESULT CC_WMMouseMove( HWND hDlg, LPARAM lParam )
 {
-   LCCPRIV lpp = (LCCPRIV)GetWindowLongA(hDlg, DWL_USER); 
+   LCCPRIV lpp = (LCCPRIV)GetWindowLongA(hDlg, DWL_USER);
    int r, g, b;
 
    if (lpp->capturedGraph)
    {
       int *ptrh = NULL, *ptrs = &lpp->l;
-      if (lpp->capturedGraph == 0x2c6) 
+      if (lpp->capturedGraph == 0x2c6)
       {
           ptrh = &lpp->h;
           ptrs = &lpp->s;
@@ -1179,9 +1179,9 @@
 /***********************************************************************
  *                              CC_WMLButtonDown              [internal]
  */
-static LRESULT CC_WMLButtonDown( HWND hDlg, WPARAM wParam, LPARAM lParam ) 
+static LRESULT CC_WMLButtonDown( HWND hDlg, WPARAM wParam, LPARAM lParam )
 {
-   LCCPRIV lpp = (LCCPRIV)GetWindowLongA(hDlg, DWL_USER); 
+   LCCPRIV lpp = (LCCPRIV)GetWindowLongA(hDlg, DWL_USER);
    int r, g, b, i;
    i = 0;
 
@@ -1263,15 +1263,15 @@
 	  case WM_INITDIALOG:
 	                return CC_WMInitDialog(hDlg, wParam, lParam, FALSE);
 	  case WM_NCDESTROY:
-	                DeleteDC(lpp->hdcMem); 
-	                DeleteObject(lpp->hbmMem); 
+	                DeleteDC(lpp->hdcMem);
+	                DeleteObject(lpp->hbmMem);
                         HeapFree(GetProcessHeap(), 0, lpp);
 	                SetWindowLongA(hDlg, DWL_USER, 0L); /* we don't need it anymore */
 	                break;
 	  case WM_COMMAND:
 	                if (CC_WMCommand( hDlg, wParam, lParam, HIWORD(wParam), (HWND) lParam))
 	                   return TRUE;
-	                break;     
+	                break;
 	  case WM_PAINT:
 	                if ( CC_WMPaint(hDlg, wParam, lParam))
 	                   return TRUE;
@@ -1291,7 +1291,7 @@
 	  case WM_LBUTTONDOWN:/* FIXME: ClipCursor on  (if in color graph)*/
 	                if (CC_WMLButtonDown(hDlg, wParam, lParam))
 	                   return TRUE;
-	                break;     
+	                break;
 	}
      return FALSE ;
 }
@@ -1303,7 +1303,7 @@
                             WPARAM16 wParam, LONG lParam )
 {
  int res;
- LCCPRIV lpp = (LCCPRIV)GetWindowLongA(hDlg, DWL_USER); 
+ LCCPRIV lpp = (LCCPRIV)GetWindowLongA(hDlg, DWL_USER);
  if (message != WM_INITDIALOG)
  {
   if (!lpp)
@@ -1325,8 +1325,8 @@
 	  case WM_INITDIALOG:
 	                return CC_WMInitDialog(hDlg, wParam, lParam, TRUE);
 	  case WM_NCDESTROY:
-	                DeleteDC(lpp->hdcMem); 
-	                DeleteObject(lpp->hbmMem); 
+	                DeleteDC(lpp->hdcMem);
+	                DeleteObject(lpp->hbmMem);
                         HeapFree(GetProcessHeap(), 0, lpp->lpcc);
                         HeapFree(GetProcessHeap(), 0, lpp);
 	                SetWindowLongA(hDlg, DWL_USER, 0L); /* we don't need it anymore */
@@ -1334,7 +1334,7 @@
 	  case WM_COMMAND:
 	                if (CC_WMCommand(hDlg, wParam, lParam, HIWORD(lParam), (HWND)LOWORD(lParam)))
 	                   return TRUE;
-	                break;     
+	                break;
 	  case WM_PAINT:
 	                if (CC_WMPaint(hDlg, wParam, lParam))
 	                   return TRUE;
@@ -1354,7 +1354,7 @@
 	  case WM_LBUTTONDOWN:/* FIXME: ClipCursor on  (if in color graph)*/
 	                if (CC_WMLButtonDown(hDlg, wParam, lParam))
 	                   return TRUE;
-	                break;     
+	                break;
 	}
      return FALSE ;
 }
@@ -1372,9 +1372,9 @@
     BOOL16 bRet = FALSE;
     LPCVOID template;
     FARPROC16 ptr;
- 
+
     TRACE("ChooseColor\n");
-    if (!lpChCol) return FALSE;    
+    if (!lpChCol) return FALSE;
 
     if (lpChCol->Flags & CC_ENABLETEMPLATEHANDLE)
         hDlgTmpl16 = lpChCol->hInstance;
@@ -1420,7 +1420,7 @@
             return FALSE;
         }
         template = GlobalLock16(hGlobal16);
-        if (!template) 
+        if (!template)
         {
             COMDLG32_SetCommDlgExtendedError(CDERR_MEMLOCKFAILURE);
             ERR("global lock failure for %x handle\n", hDlgTmpl16);
@@ -1456,7 +1456,7 @@
     LPCVOID template;
 
     TRACE("ChooseColor\n");
-    if (!lpChCol) return FALSE;    
+    if (!lpChCol) return FALSE;
 
     if (lpChCol->Flags & CC_ENABLETEMPLATEHANDLE)
     {
diff --git a/dlls/commdlg/filedlg.c b/dlls/commdlg/filedlg.c
index 9c39f69..6aa7335 100644
--- a/dlls/commdlg/filedlg.c
+++ b/dlls/commdlg/filedlg.c
@@ -39,9 +39,9 @@
 #include "cdlg.h"
 
 #define BUFFILE 512
-#define BUFFILEALLOC 512 * sizeof(WCHAR)   
+#define BUFFILEALLOC 512 * sizeof(WCHAR)
 
-struct FSPRIVATE 
+struct FSPRIVATE
 {
     HWND hwnd; /* file dialog window handle */
     BOOL hook; /* TRUE if the dialog is hooked */
@@ -64,7 +64,7 @@
 #define LFS16 1
 #define LFS32A 2
 #define LFS32W 3
- 
+
 static const WCHAR FILE_star[] = {'*','.','*', 0};
 static const WCHAR FILE_bslash[] = {'\\', 0};
 static const WCHAR FILE_specc[] = {'%','c',':', 0};
@@ -117,7 +117,7 @@
         hHDisk   = LoadImageA( inst, "HDISK", IMAGE_ICON, 16, 16, LR_SHARED );
         hCDRom   = LoadImageA( inst, "CDROM", IMAGE_ICON, 16, 16, LR_SHARED );
         hNet     = LoadImageA( inst, "NETWORK", IMAGE_ICON, 16, 16, LR_SHARED );
-	if (hFolder == 0 || hFolder2 == 0 || hFloppy == 0 || 
+	if (hFolder == 0 || hFolder2 == 0 || hFloppy == 0 ||
 	    hHDisk == 0 || hCDRom == 0 || hNet == 0)
 	{
 	    ERR("Error loading icons !\n");
@@ -174,7 +174,7 @@
 	}
     } else { /* get it from internal Wine resource */
 	HANDLE hResInfo;
-	if (!(hResInfo = FindResourceA(COMMDLG_hInstance32, 
+	if (!(hResInfo = FindResourceA(COMMDLG_hInstance32,
              lfs->open? "OPEN_FILE":"SAVE_FILE", RT_DIALOGA)))
 	{
 	    COMDLG32_SetCommDlgExtendedError(CDERR_FINDRESFAILURE);
@@ -229,7 +229,7 @@
         LPCVOID template32;
         DWORD size;
 
-	if (!(hResInfo = FindResourceA(COMMDLG_hInstance32, 
+	if (!(hResInfo = FindResourceA(COMMDLG_hInstance32,
                lfs->open ? "OPEN_FILE":"SAVE_FILE", RT_DIALOGA)))
 	{
 	    COMDLG32_SetCommDlgExtendedError(CDERR_FINDRESFAILURE);
@@ -376,7 +376,7 @@
   int n, i;
   i = 0;
   if (cfptr)
-    for ( ;(n = lstrlenW(cfptr)) != 0; i++) 
+    for ( ;(n = lstrlenW(cfptr)) != 0; i++)
       {
 	cfptr += n + 1;
 	if (i == index)
@@ -384,7 +384,7 @@
 	cfptr += lstrlenW(cfptr) + 1;
       }
   if (fptr)
-    for ( ;(n = lstrlenW(fptr)) != 0; i++) 
+    for ( ;(n = lstrlenW(fptr)) != 0; i++)
       {
 	fptr += n + 1;
 	if (i == index)
@@ -407,7 +407,7 @@
     if (lpdis->CtlType == ODT_LISTBOX && lpdis->CtlID == lst1)
     {
         if (!(str = HeapAlloc(GetProcessHeap(), 0, BUFFILEALLOC))) return FALSE;
-	SendMessageW(lpdis->hwndItem, LB_GETTEXT, lpdis->itemID, 
+	SendMessageW(lpdis->hwndItem, LB_GETTEXT, lpdis->itemID,
                       (LPARAM)str);
 
 	if ((lpdis->itemState & ODS_SELECTED) && !savedlg)
@@ -438,7 +438,7 @@
     {
         if (!(str = HeapAlloc(GetProcessHeap(), 0, BUFFILEALLOC)))
             return FALSE;
-	SendMessageW(lpdis->hwndItem, LB_GETTEXT, lpdis->itemID, 
+	SendMessageW(lpdis->hwndItem, LB_GETTEXT, lpdis->itemID,
                       (LPARAM)str);
 
 	if (lpdis->itemState & ODS_SELECTED)
@@ -467,7 +467,7 @@
         char root[] = "a:";
         if (!(str = HeapAlloc(GetProcessHeap(), 0, BUFFILEALLOC)))
             return FALSE;
-	SendMessageW(lpdis->hwndItem, CB_GETLBTEXT, lpdis->itemID, 
+	SendMessageW(lpdis->hwndItem, CB_GETLBTEXT, lpdis->itemID,
                       (LPARAM)str);
         root[0] += str[2] - 'a';
         switch(GetDriveTypeA(root))
@@ -502,10 +502,10 @@
 /***********************************************************************
  *                              FILEDLG_WMMeasureItem           [internal]
  */
-static LONG FILEDLG_WMMeasureItem(HWND hWnd, WPARAM wParam, LPARAM lParam) 
+static LONG FILEDLG_WMMeasureItem(HWND hWnd, WPARAM wParam, LPARAM lParam)
 {
     LPMEASUREITEMSTRUCT lpmeasure;
-    
+
     lpmeasure = (LPMEASUREITEMSTRUCT)lParam;
     lpmeasure->itemHeight = fldrHeight;
     return TRUE;
@@ -514,10 +514,10 @@
 /***********************************************************************
  *                              FILEDLG_WMMeasureItem16         [internal]
  */
-static LONG FILEDLG_WMMeasureItem16(HWND16 hWnd, WPARAM16 wParam, LPARAM lParam) 
+static LONG FILEDLG_WMMeasureItem16(HWND16 hWnd, WPARAM16 wParam, LPARAM lParam)
 {
     LPMEASUREITEMSTRUCT16 lpmeasure;
-    
+
     lpmeasure = MapSL(lParam);
     lpmeasure->itemHeight = fldrHeight;
     return TRUE;
@@ -583,10 +583,10 @@
   /* set default filter */
   if (ofn->nFilterIndex == 0 && ofn->lpstrCustomFilter == NULL)
   	ofn->nFilterIndex = 1;
-  SendDlgItemMessageW(hWnd, cmb1, CB_SETCURSEL, ofn->nFilterIndex - 1, 0);    
+  SendDlgItemMessageW(hWnd, cmb1, CB_SETCURSEL, ofn->nFilterIndex - 1, 0);
   lstrcpynW(tmpstr, FILEDLG_GetFileType(ofn->lpstrCustomFilter,
 	     (LPWSTR)ofn->lpstrFilter, ofn->nFilterIndex - 1),BUFFILE);
-  TRACE("nFilterIndex = %ld, SetText of edt1 to %s\n", 
+  TRACE("nFilterIndex = %ld, SetText of edt1 to %s\n",
   			ofn->nFilterIndex, debugstr_w(tmpstr));
   SetDlgItemTextW( hWnd, edt1, tmpstr );
   /* get drive list */
@@ -597,7 +597,7 @@
    * the OPENFILENAME structure).  For example under 2000/XP any path in the
    * lpstrFile overrides the lpstrInitialDir, but not under 95/98/ME
    */
-  if (ofn->lpstrInitialDir != NULL) 
+  if (ofn->lpstrInitialDir != NULL)
     {
       int len;
       lstrcpynW(tmpstr, ofn->lpstrInitialDir, 511);
@@ -638,7 +638,7 @@
 
 /***********************************************************************
  *                              FILEDLG_UpdateResult            [internal]
- *      update the displayed file name (with path) 
+ *      update the displayed file name (with path)
  */
 void FILEDLG_UpdateResult(LFSPRIVATE lfs, WCHAR *tmpstr)
 {
@@ -695,13 +695,13 @@
 
 /***********************************************************************
  *                              FILEDLG_UpdateFileTitle         [internal]
- *      update the displayed file name (without path) 
+ *      update the displayed file name (without path)
  */
 void FILEDLG_UpdateFileTitle(LFSPRIVATE lfs)
 {
   LONG lRet;
   LPOPENFILENAMEW ofnW = lfs->ofnW;
-  if (ofnW->lpstrFileTitle != NULL) 
+  if (ofnW->lpstrFileTitle != NULL)
   {
     lRet = SendDlgItemMessageW(lfs->hwnd, lst1, LB_GETCURSEL, 0, 0);
     SendDlgItemMessageW(lfs->hwnd, lst1, LB_GETTEXT, lRet,
@@ -907,7 +907,7 @@
     {
         lRet = (BOOL)FILEDLG_CallWindowProc(lfs, lfs->fileokstring,
                   0, lfs->lParam );
-        if (lRet)       
+        if (lRet)
         {
             *ofnW = ofnsav; /* restore old state */
             return FALSE;
@@ -945,7 +945,7 @@
     SendDlgItemMessageW(hWnd, cmb2, CB_GETLBTEXT, lRet,
                          (LPARAM)pstr);
     wsprintfW(diskname, FILE_specc, pstr[2]);
-    HeapFree(GetProcessHeap(), 0, pstr);    
+    HeapFree(GetProcessHeap(), 0, pstr);
 
     return FILEDLG_Validate( lfs, diskname, cmb2, lRet, TRUE );
 }
@@ -977,7 +977,7 @@
  *                              FILEDLG_WMCommand               [internal]
  */
 static LRESULT FILEDLG_WMCommand(HWND hWnd, LPARAM lParam, UINT notification,
-       UINT control, LFSPRIVATE lfs ) 
+       UINT control, LFSPRIVATE lfs )
 {
     switch (control)
     {
@@ -1000,7 +1000,7 @@
         break;
 
         case cmb1: /* file type drop list */
-        if (notification == CBN_SELCHANGE) 
+        if (notification == CBN_SELCHANGE)
             return FILEDLG_FileTypeChange( lfs );
         break;
 
@@ -1117,7 +1117,7 @@
         ofnW->lpstrInitialDir = HEAP_strdupAtoW(GetProcessHeap(),0,ofnA->lpstrInitialDir);
     if (ofnA->lpstrTitle)
         str = ofnA->lpstrTitle;
-    else 
+    else
         /* Allocates default title (FIXME : get it from resource) */
         str = open ? defaultopen:defaultsave;
     ofnW->lpstrTitle = HEAP_strdupAtoW(GetProcessHeap(),0, str);
@@ -1174,7 +1174,7 @@
 
 /************************************************************************
  *                              FILEDLG_DestroyPrivate            [internal]
- *      destroys the private object 
+ *      destroys the private object
  */
 void FILEDLG_DestroyPrivate(LFSPRIVATE lfs)
 {
@@ -1209,7 +1209,7 @@
 
 /************************************************************************
  *                              FILEDLG_AllocPrivate            [internal]
- *      allocate a private object to hold 32 bits Unicode 
+ *      allocate a private object to hold 32 bits Unicode
  *      structure that will be used throughtout the calls, while
  *      keeping available the original structures and a few variables
  *      On entry : type = dialog procedure type (16,32A,32W)
@@ -1264,7 +1264,7 @@
             if (lfs->ofnA)
                 FILEDLG_MapOfnStructA(lfs->ofnA, lfs->ofnW, lfs->open);
         }
-        else 
+        else
             ret = NULL;
     }
     if (lfs->ofn16)
@@ -1283,7 +1283,7 @@
  *
  * Creates a win31 style dialog box for the user to select a file to open/save.
  */
-BOOL WINAPI GetFileName31A( 
+BOOL WINAPI GetFileName31A(
                            LPOPENFILENAMEA lpofn, /* addess of structure with data*/
                            UINT dlgType /* type dialogue : open/save */
                           )
@@ -1298,7 +1298,7 @@
     if (lfs)
     {
         hInst = GetWindowLongA( lpofn->hwndOwner, GWL_HINSTANCE );
-        bRet = DialogBoxIndirectParamA( hInst, lfs->template, lpofn->hwndOwner, 
+        bRet = DialogBoxIndirectParamA( hInst, lfs->template, lpofn->hwndOwner,
              (DLGPROC) FileOpenDlgProc, (DWORD) lfs);
         FILEDLG_DestroyPrivate(lfs);
     }
@@ -1313,7 +1313,7 @@
  *
  * Creates a win31 style dialog box for the user to select a file to open/save
  */
-BOOL WINAPI GetFileName31W( 
+BOOL WINAPI GetFileName31W(
                            LPOPENFILENAMEW lpofn, /* addess of structure with data*/
                            UINT dlgType /* type dialogue : open/save */
                           )
@@ -1328,7 +1328,7 @@
     if (lfs)
     {
         hInst = GetWindowLongA( lpofn->hwndOwner, GWL_HINSTANCE );
-        bRet = DialogBoxIndirectParamW( hInst, lfs->template, lpofn->hwndOwner, 
+        bRet = DialogBoxIndirectParamW( hInst, lfs->template, lpofn->hwndOwner,
              (DLGPROC) FileOpenDlgProc, (DWORD) lfs);
         FILEDLG_DestroyPrivate(lfs);
     }
@@ -1345,15 +1345,15 @@
  */
 LRESULT WINAPI FileOpenDlgProc16(HWND16 hWnd, UINT16 wMsg, WPARAM16 wParam,
                                LPARAM lParam)
-{  
+{
     LFSPRIVATE lfs = (LFSPRIVATE)GetPropA(hWnd,OFN_PROP);
     DRAWITEMSTRUCT dis;
- 
+
     TRACE("msg=%x wparam=%x lParam=%lx\n", wMsg, wParam, lParam);
     if ((wMsg != WM_INITDIALOG) && lfs && lfs->hook)
         {
             LRESULT lRet = (BOOL16)FILEDLG_CallWindowProc(lfs, wMsg, wParam, lParam);
-            if (lRet)   
+            if (lRet)
                 return lRet;         /* else continue message processing */
         }
     switch (wMsg)
@@ -1402,16 +1402,16 @@
   {
    LRESULT  lRet;
    lRet = (BOOL16)FILEDLG_CallWindowProc(lfs, wMsg, wParam, lParam);
-   if (lRet)   
+   if (lRet)
     return lRet;         /* else continue message processing */
-  }             
+  }
   switch (wMsg) {
    case WM_INITDIALOG:
       return FILEDLG_WMInitDialog(hWnd, wParam, lParam);
-      
+
    case WM_MEASUREITEM:
       return FILEDLG_WMMeasureItem16(hWnd, wParam, lParam);
-    
+
    case WM_DRAWITEM:
       FILEDLG_MapDrawItemStruct(MapSL(lParam), &dis);
       return FILEDLG_WMDrawItem(hWnd, wParam, lParam, TRUE, &dis);
@@ -1419,7 +1419,7 @@
    case WM_COMMAND:
       return FILEDLG_WMCommand(hWnd, lParam, HIWORD(lParam), wParam, lfs);
   }
-  
+
   /*
   case WM_CTLCOLOR:
    SetBkColor((HDC16)wParam, 0x00C0C0C0);
@@ -1433,14 +1433,14 @@
      return hGRAYBrush;
    }
    return FALSE;
-   
+
    */
   return FALSE;
 }
 
 /***********************************************************************
  *           FileOpenDlgProc                                    [internal]
- *      Used for open and save, in fact.   
+ *      Used for open and save, in fact.
  */
 static LRESULT WINAPI FileOpenDlgProc(HWND hWnd, UINT wMsg,
                                       WPARAM wParam, LPARAM lParam)
@@ -1452,7 +1452,7 @@
         {
             LRESULT lRet;
             lRet  = (BOOL)FILEDLG_CallWindowProc(lfs, wMsg, wParam, lParam);
-            if (lRet)   
+            if (lRet)
                 return lRet;         /* else continue message processing */
         }
     switch (wMsg)
@@ -1486,7 +1486,7 @@
     return FALSE;
 }
 
-/* ------------------ APIs ---------------------- */ 
+/* ------------------ APIs ---------------------- */
 
 /***********************************************************************
  *           GetOpenFileName   (COMMDLG.1)
@@ -1500,7 +1500,7 @@
  * BUGS
  *    unknown, there are some FIXME's left.
  */
-BOOL16 WINAPI GetOpenFileName16( 
+BOOL16 WINAPI GetOpenFileName16(
 				SEGPTR ofn /* [in/out] address of structure with data*/
 				)
 {
@@ -1517,7 +1517,7 @@
     {
         hInst = GetWindowLongA( lpofn->hwndOwner, GWL_HINSTANCE );
         ptr = GetProcAddress16(GetModuleHandle16("COMMDLG"), (LPCSTR) 6);
-        bRet = DialogBoxIndirectParam16( hInst, lfs->hDlgTmpl16, lpofn->hwndOwner, 
+        bRet = DialogBoxIndirectParam16( hInst, lfs->hDlgTmpl16, lpofn->hwndOwner,
              (DLGPROC16) ptr, (DWORD) lfs);
         FILEDLG_DestroyPrivate(lfs);
     }
@@ -1538,7 +1538,7 @@
  * BUGS
  *    unknown. There are some FIXME's left.
  */
-BOOL16 WINAPI GetSaveFileName16( 
+BOOL16 WINAPI GetSaveFileName16(
 				SEGPTR ofn /* [in/out] addess of structure with data*/
 				)
 {
@@ -1555,10 +1555,10 @@
     {
         hInst = GetWindowLongA( lpofn->hwndOwner, GWL_HINSTANCE );
         ptr = GetProcAddress16(GetModuleHandle16("COMMDLG"), (LPCSTR) 7);
-        bRet = DialogBoxIndirectParam16( hInst, lfs->hDlgTmpl16, lpofn->hwndOwner, 
+        bRet = DialogBoxIndirectParam16( hInst, lfs->hDlgTmpl16, lpofn->hwndOwner,
              (DLGPROC16) ptr, (DWORD) lfs);
         FILEDLG_DestroyPrivate(lfs);
-    } 
+    }
 
     TRACE("return lpstrFile='%s' !\n", (char *)MapSL(lpofn->lpstrFile));
     return bRet;
@@ -1650,7 +1650,7 @@
     if (newlook)
     {
         return GetFileDialog95A(ofn, SAVE_DIALOG);
-    } 
+    }
     else
     {
         return GetFileName31A(ofn, SAVE_DIALOG);
@@ -1681,7 +1681,7 @@
     if (newlook)
     {
         return GetFileDialog95W(ofn, SAVE_DIALOG);
-    } 
+    }
     else
     {
         return GetFileName31W(ofn, SAVE_DIALOG);
diff --git a/dlls/commdlg/filedlg95.c b/dlls/commdlg/filedlg95.c
index 560e052..e83a2db 100644
--- a/dlls/commdlg/filedlg95.c
+++ b/dlls/commdlg/filedlg95.c
@@ -92,7 +92,7 @@
   int m_iImageIndex;    /* Index of picture in image list */
   HIMAGELIST hImgList;
   int m_iIndent;      /* Indentation index */
-  LPITEMIDLIST pidlItem;  /* absolute pidl of the item */ 
+  LPITEMIDLIST pidlItem;  /* absolute pidl of the item */
 
 } SFOLDER,*LPSFOLDER;
 
@@ -222,7 +222,7 @@
 /***********************************************************************
  *      GetFileName95
  *
- * Creates an Open common dialog box that lets the user select 
+ * Creates an Open common dialog box that lets the user select
  * the drive, directory, and the name of a file or set of files to open.
  *
  * IN  : The FileOpenDlgInfos structure associated with the dialog
@@ -257,7 +257,7 @@
         COMDLG32_SetCommDlgExtendedError(CDERR_LOADRESFAILURE);
         return FALSE;
     }
-    
+
     /* old style hook messages */
     if (IsHooked(fodInfos))
     {
@@ -266,7 +266,7 @@
       fodInfos->HookMsg.helpmsgstring = RegisterWindowMessageA(HELPMSGSTRINGA);
       fodInfos->HookMsg.sharevistring = RegisterWindowMessageA(SHAREVISTRINGA);
     }
-    
+
     lRes = DialogBoxIndirectParamA(COMMDLG_hInstance32,
                                   (LPDLGTEMPLATEA) template,
                                   fodInfos->ofnInfos->hwndOwner,
@@ -276,7 +276,7 @@
     /* Unable to create the dialog */
     if( lRes == -1)
         return FALSE;
-    
+
     return lRes;
 }
 
@@ -297,14 +297,14 @@
   LPCSTR lpstrInitialDir = (LPCSTR)-1;
   LPSTR lpstrSavDir = NULL;
   DWORD dwFlags = 0;
-  
+
   /* Initialize FileOpenDlgInfos structure */
   fodInfos = (FileOpenDlgInfos*)MemAlloc(sizeof(FileOpenDlgInfos));
   ZeroMemory(fodInfos, sizeof(FileOpenDlgInfos));
-  
+
   /* Pass in the original ofn */
   fodInfos->ofnInfos = ofn;
-  
+
   /* Save original hInstance value */
   hInstance = ofn->hInstance;
   fodInfos->ofnInfos->hInstance = MapHModuleLS(ofn->hInstance);
@@ -322,7 +322,7 @@
   /* Initialize the dialog property */
   fodInfos->DlgInfos.dwDlgProp = 0;
   fodInfos->DlgInfos.hwndCustomDlg = (HWND)NULL;
-  
+
   switch(iDlgType)
   {
     case OPEN_DIALOG :
@@ -402,7 +402,7 @@
   BOOL ret;
   FileOpenDlgInfos *fodInfos;
   HINSTANCE hInstance;
-  
+
   /* out arguments */
   LPWSTR lpstrFile = NULL;
   LPWSTR lpstrFileTitle = NULL;
@@ -436,7 +436,7 @@
 
     /* filter is a list...  title\0ext\0......\0\0 */
     s = ofn->lpstrFilter;
-    
+
     while (*s) s = s+strlenW(s)+1;
     s++;
     n = s - ofn->lpstrFilter; /* already divides by 2. ptr magic */
@@ -490,7 +490,7 @@
   default :
       ret = 0;
   }
-      
+
   /* restore saved IN arguments and convert OUT arguments back */
   ofn->Flags = dwFlags;
   ofn->hInstance = hInstance;
@@ -568,7 +568,7 @@
     SetWindowPos(hwndChildDlg, 0, 0,0, ptParentClient.x,ptParentClient.y, SWP_NOZORDER );
     SetWindowPos(hwndParentDlg, 0, rectParent.left,rectParent.top, (rectParent.right- rectParent.left),
         (rectParent.bottom-rectParent.top),SWP_NOMOVE | SWP_NOZORDER);
-	
+
     hwndChild = GetWindow(hwndChildDlg,GW_CHILD);
     if(hwndStc32)
     {
@@ -588,7 +588,7 @@
 				continue;
           GetWindowRect(hwndChild,&rectCtrl);
           MapWindowPoints( 0, hwndParentDlg,(LPPOINT)&rectCtrl,2);
-                                  
+
           /*
             Check the initial position of the controls relative to the initial
             position and size of stc32 (before it is expanded).
@@ -606,15 +606,15 @@
           {
 	    rectCtrl.top  += ptMoveCtl.y;
 	  }
-					
-          SetWindowPos( hwndChild, 0, rectCtrl.left, rectCtrl.top, 
+
+          SetWindowPos( hwndChild, 0, rectCtrl.left, rectCtrl.top,
 				rectCtrl.right-rectCtrl.left,rectCtrl.bottom-rectCtrl.top,
 				SWP_NOSIZE | SWP_NOZORDER );
         }
       } while ((hwndChild=GetWindow( hwndChild, GW_HWNDNEXT )) != (HWND)NULL);
     }
     hwndChild = GetWindow(hwndParentDlg,GW_CHILD);
-	
+
     if(hwndStc32)
     {
       GetWindowRect(hwndStc32,&rectStc32);
@@ -635,12 +635,12 @@
             rectCtrl.left += ptMoveCtl.x;
             rectCtrl.top += ptMoveCtl.y;
 
-            SetWindowPos( hwndChild, 0, rectCtrl.left, rectCtrl.top, 
+            SetWindowPos( hwndChild, 0, rectCtrl.left, rectCtrl.top,
                 rectCtrl.right-rectCtrl.left,rectCtrl.bottom-rectCtrl.top,
                 SWP_NOSIZE |SWP_NOZORDER );
           }
         } while ((hwndChild=GetWindow( hwndChild, GW_HWNDNEXT )) != (HWND)NULL);
-      }		
+      }
     }
 }
 
@@ -656,7 +656,7 @@
     switch(uMsg)
     {
       case WM_INITDIALOG:
-      {         
+      {
         /* Hide caption since some program may leave it */
         DWORD Style = GetWindowLongA(hwnd, GWL_STYLE);
         if (Style & WS_CAPTION) SetWindowLongA(hwnd, GWL_STYLE, Style & (~WS_CAPTION));
@@ -667,14 +667,14 @@
 
         if(fodInfos && IsHooked(fodInfos))
           return CallWindowProcA((WNDPROC)fodInfos->ofnInfos->lpfnHook,hwnd,uMsg,wParam,lParam);
-        return 0;	
-      } 
+        return 0;
+      }
     }
 
     if(fodInfos && IsHooked(fodInfos))
-      return CallWindowProcA((WNDPROC)fodInfos->ofnInfos->lpfnHook,hwnd,uMsg,wParam,lParam); 
+      return CallWindowProcA((WNDPROC)fodInfos->ofnInfos->lpfnHook,hwnd,uMsg,wParam,lParam);
 
-    return DefWindowProcA(hwnd,uMsg,wParam,lParam); 
+    return DefWindowProcA(hwnd,uMsg,wParam,lParam);
 }
 
 HWND CreateTemplateDialog(FileOpenDlgInfos *fodInfos, HWND hwnd)
@@ -716,7 +716,7 @@
       hChildDlg= CreateDialogIndirectParamA(fodInfos->ofnInfos->hInstance,template,hwnd,(DLGPROC)FileOpenDlgProcUserTemplate,(LPARAM)fodInfos);
       if(hChildDlg)
       {
-        ShowWindow(hChildDlg,SW_SHOW); 
+        ShowWindow(hChildDlg,SW_SHOW);
         return hChildDlg;
       }
     }
@@ -742,7 +742,7 @@
     }
     return (HWND)NULL;
 }
- 
+
 /***********************************************************************
 *          SendCustomDlgNotificationMessage
 *
@@ -794,7 +794,7 @@
         case CDM_GETFILEPATH:
             GetDlgItemTextA(hwnd,IDC_FILENAME,lpstrPath, sizeof(lpstrPath));
             lpstrFileSpec = (LPSTR)PathFindFileNameA(lpstrPath);
-            if (lpstrFileSpec==lpstrPath) 
+            if (lpstrFileSpec==lpstrPath)
 	    {
                 char lpstrCurrentDir[MAX_PATH];
                 /* Prepend the current path */
@@ -802,8 +802,8 @@
                 if ((LPSTR)lParam!=NULL)
                     snprintf((LPSTR)lParam,(int)wParam,"%s\\%s",lpstrCurrentDir,lpstrPath);
                 reqSize=strlen(lpstrCurrentDir)+1+strlen(lpstrPath)+1;
-            } 
-	    else 
+            }
+	    else
 	    {
                 lstrcpynA((LPSTR)lParam,(LPSTR)lpstrPath,(int)wParam);
                 reqSize=strlen(lpstrPath);
@@ -836,7 +836,7 @@
     }
     return TRUE;
 }
- 
+
 /***********************************************************************
  *          FileOpenDlgProc95
  *
@@ -847,18 +847,18 @@
 #if 0
   TRACE("0x%04x 0x%04x\n", hwnd, uMsg);
 #endif
-  
+
   switch(uMsg)
   {
     case WM_INITDIALOG:
       {
          FileOpenDlgInfos * fodInfos = (FileOpenDlgInfos *)lParam;
 
-	 /* Adds the FileOpenDlgInfos in the property list of the dialog 
+	 /* Adds the FileOpenDlgInfos in the property list of the dialog
             so it will be easily accessible through a GetPropA(...) */
       	 SetPropA(hwnd, FileOpenDlgInfosStr, (HANDLE) fodInfos);
 
-      	 fodInfos->DlgInfos.hwndCustomDlg = 
+      	 fodInfos->DlgInfos.hwndCustomDlg =
      	   CreateTemplateDialog((FileOpenDlgInfos *)lParam, hwnd);
 
          FILEDLG95_InitControls(hwnd);
@@ -881,7 +881,7 @@
         }
       }
       return FALSE;
-          
+
     case WM_GETISHELLBROWSER:
       return FILEDLG95_OnWMGetIShellBrowser(hwnd);
 
@@ -897,7 +897,7 @@
 	/* set up the button tooltips strings */
 	if(TTN_GETDISPINFOA == lpnmh->code )
 	{
-	    LPNMTTDISPINFOA lpdi = (LPNMTTDISPINFOA)lParam; 
+	    LPNMTTDISPINFOA lpdi = (LPNMTTDISPINFOA)lParam;
 	    switch(lpnmh->idFrom )
 	    {
 		/* Up folder button */
@@ -923,7 +923,7 @@
 		default:
 		    stringId = 0;
 	    }
-	    lpdi->hinst = COMMDLG_hInstance32; 
+	    lpdi->hinst = COMMDLG_hInstance32;
 	    lpdi->lpszText =  (LPSTR) stringId;
 	}
         return FALSE;
@@ -959,9 +959,9 @@
    { HINST_COMMCTRL, IDB_VIEW_SMALL_COLOR },
    { COMDLG32_hInstance, 800 } 			/* desktop icon */
   };
-  
+
   RECT rectTB;
-  
+
   FileOpenDlgInfos *fodInfos = (FileOpenDlgInfos *) GetPropA(hwnd,FileOpenDlgInfosStr);
 
   TRACE("%p\n", fodInfos);
@@ -975,11 +975,11 @@
   GetWindowRect(GetDlgItem(hwnd,IDC_TOOLBARSTATIC),&rectTB);
   MapWindowPoints( 0, hwnd,(LPPOINT)&rectTB,2);
 
-  fodInfos->DlgInfos.hwndTB = CreateWindowExA(0, TOOLBARCLASSNAMEA, (LPSTR) NULL, 
+  fodInfos->DlgInfos.hwndTB = CreateWindowExA(0, TOOLBARCLASSNAMEA, (LPSTR) NULL,
         WS_CHILD | WS_GROUP | TBSTYLE_TOOLTIPS | CCS_NODIVIDER | CCS_NORESIZE,
-        0, 0, 150, 26, hwnd, (HMENU) IDC_TOOLBAR, COMMDLG_hInstance32, NULL); 
- 
-  SetWindowPos(fodInfos->DlgInfos.hwndTB, 0, 
+        0, 0, 150, 26, hwnd, (HMENU) IDC_TOOLBAR, COMMDLG_hInstance32, NULL);
+
+  SetWindowPos(fodInfos->DlgInfos.hwndTB, 0,
   	rectTB.left,rectTB.top, rectTB.right-rectTB.left, rectTB.bottom-rectTB.top,
 	SWP_SHOWWINDOW | SWP_NOACTIVATE | SWP_NOZORDER );
 
@@ -991,7 +991,7 @@
   SendMessageA(fodInfos->DlgInfos.hwndTB, TB_ADDBITMAP, (WPARAM) 1, (LPARAM) &tba[1]);
 
   SendMessageA(fodInfos->DlgInfos.hwndTB, TB_ADDBUTTONSA, (WPARAM) 9,(LPARAM) &tbb);
-  SendMessageA(fodInfos->DlgInfos.hwndTB, TB_AUTOSIZE, 0, 0); 
+  SendMessageA(fodInfos->DlgInfos.hwndTB, TB_AUTOSIZE, 0, 0);
 
   /* Set the window text with the text specified in the OPENFILENAME structure */
   if(fodInfos->ofnInfos->lpstrTitle)
@@ -1031,7 +1031,7 @@
   /* Resize the height, if open as read only checkbox ad help button
      are hidden and we are not using a custom template */
   if ( (fodInfos->ofnInfos->Flags & OFN_HIDEREADONLY) &&
-       (!(fodInfos->ofnInfos->Flags & 
+       (!(fodInfos->ofnInfos->Flags &
          (OFN_SHOWHELP|OFN_ENABLETEMPLATE|OFN_ENABLETEMPLATEHANDLE))))
   {
     RECT rectDlg, rectHelp, rectCancel;
@@ -1040,8 +1040,8 @@
     GetWindowRect(GetDlgItem(hwnd, IDCANCEL), &rectCancel);
     /* subtract the height of the help button plus the space between
        the help button and the cancel button to the height of the dialog */
-    SetWindowPos(hwnd, 0, 0, 0, rectDlg.right-rectDlg.left, 
-                 (rectDlg.bottom-rectDlg.top) - (rectHelp.bottom - rectCancel.bottom), 
+    SetWindowPos(hwnd, 0, 0, 0, rectDlg.right-rectDlg.left,
+                 (rectDlg.bottom-rectDlg.top) - (rectHelp.bottom - rectCancel.bottom),
                  SWP_NOACTIVATE|SWP_NOMOVE|SWP_NOZORDER);
   }
 
@@ -1062,10 +1062,10 @@
 static LRESULT FILEDLG95_FillControls(HWND hwnd, WPARAM wParam, LPARAM lParam)
 {
   LPITEMIDLIST pidlItemId = NULL;
-  
+
   FileOpenDlgInfos *fodInfos = (FileOpenDlgInfos *) lParam;
 
-  TRACE("dir=%s file=%s\n", 
+  TRACE("dir=%s file=%s\n",
   fodInfos->ofnInfos->lpstrInitialDir, fodInfos->ofnInfos->lpstrFile);
 
   /* Get the initial directory pidl */
@@ -1165,7 +1165,7 @@
   }
   /* Do not use the listview selection anymore */
   fodInfos->DlgInfos.dwDlgProp &= ~FODPROP_USEVIEW;
-  return 0; 
+  return 0;
 }
 
 /***********************************************************************
@@ -1182,13 +1182,13 @@
 
   SetWindowLongA(hwnd,DWL_MSGRESULT,(LONG)fodInfos->Shell.FOIShellBrowser);
 
-  return TRUE; 
+  return TRUE;
 }
 
 
 /***********************************************************************
  *      FILEDLG95_OnOpenMultipleFiles
- *      
+ *
  * Handles the opening of multiple files.
  *
  * FIXME
@@ -1205,13 +1205,13 @@
 
   lpstrFile = fodInfos->ofnInfos->lpstrFile;
   lpstrFile[0] = '\0';
-  
+
   SHGetPathFromIDListA( fodInfos->ShellInfos.pidlAbsCurrent, lpstrPathSpec );
 
   if ( !(fodInfos->ofnInfos->Flags & OFN_NOVALIDATE) &&
       ( fodInfos->ofnInfos->Flags & OFN_FILEMUSTEXIST))
   {
-    LPSTR lpstrTemp = lpstrFileList; 
+    LPSTR lpstrTemp = lpstrFileList;
 
     for ( nCount = 0; nCount < nFileCount; nCount++ )
     {
@@ -1236,7 +1236,7 @@
         MessageBoxA(hwnd, tmp, fodInfos->ofnInfos->lpstrTitle, MB_OK | MB_ICONEXCLAMATION);
         return FALSE;
       }
-  
+
       /* move to the next file in the list of files */
       lpstrTemp += strlen(lpstrTemp) + 1;
       COMDLG32_SHFree(pidl);
@@ -1259,7 +1259,7 @@
  *      FILEDLG95_OnOpen
  *
  * Ok button WM_COMMAND message handler
- * 
+ *
  * If the function succeeds, the return value is nonzero.
  */
 #define ONOPEN_BROWSE 1
@@ -1300,7 +1300,7 @@
       BrowseSelectedFolder(hwnd);
       return FALSE;
   }
- 
+
   if(nFileCount > 1)
   {
       ret = FILEDLG95_OnOpenMultipleFiles(hwnd, lpstrFileList, nFileCount, sizeUsed);
@@ -1359,7 +1359,7 @@
   We have to parse the path step by step to see if we have to browse
   to a folder if the path points to a directory or the last
   valid element is a directory.
-  
+
   valid variables:
     lpstrPathAndFile: cleaned up path
  */
@@ -1381,7 +1381,7 @@
     }
 
     if (FAILED (SHGetDesktopFolder(&lpsf))) return FALSE;
-  
+
     lpszTemp1 = lpszTemp = lpstrPathAndFile;
     while (lpszTemp1)
     {
@@ -1537,12 +1537,12 @@
 	    {
 		int PathLength;
 		PathLength = strlen(lpstrPathAndFile);
-		
+
 	        strcat(lpstrPathAndFile, ".");
 	        strcat(lpstrPathAndFile, fodInfos->ofnInfos->lpstrDefExt);
-		
+
 		/* if file does not exist try without extension */
-		if (!PathFileExistsA(lpstrPathAndFile)) 
+		if (!PathFileExistsA(lpstrPathAndFile))
 		  lpstrPathAndFile[PathLength] = '\0';
 	    }
 	  }
@@ -1554,7 +1554,7 @@
             ((fodInfos->ofnInfos->Flags & OFN_ALLOWMULTISELECT) ? 1 : 0))
         {
           LPSTR lpszTemp;
-	  
+
           /* fill destination buffer */
           strcpy(fodInfos->ofnInfos->lpstrFile, lpstrPathAndFile);
           if (fodInfos->ofnInfos->Flags & OFN_ALLOWMULTISELECT)
@@ -1564,11 +1564,11 @@
           /* set filename offset */
           lpszTemp = PathFindFileNameA(lpstrPathAndFile);
           fodInfos->ofnInfos->nFileOffset = lpszTemp - lpstrPathAndFile;
- 
+
           /* set extension offset */
           lpszTemp = PathFindExtensionA(lpstrPathAndFile);
           fodInfos->ofnInfos->nFileExtension = (*lpszTemp) ? lpszTemp - lpstrPathAndFile + 1 : 0;
-    
+
           /* set the lpstrFileTitle */
           if(fodInfos->ofnInfos->lpstrFileTitle)
 	  {
@@ -1627,7 +1627,7 @@
   TRACE("\n");
 
   /*
-   * Initialisation of the FileOpenDialogInfos structure 
+   * Initialisation of the FileOpenDialogInfos structure
    */
 
   /* Shell */
@@ -1638,7 +1638,7 @@
   /* Disable multi-select if flag not set */
   if (!(fodInfos->ofnInfos->Flags & OFN_ALLOWMULTISELECT))
   {
-     fodInfos->ShellInfos.folderSettings.fFlags |= FWF_SINGLESEL; 
+     fodInfos->ShellInfos.folderSettings.fFlags |= FWF_SINGLESEL;
   }
   fodInfos->ShellInfos.folderSettings.fFlags |= FWF_AUTOARRANGE | FWF_ALIGNLEFT;
   fodInfos->ShellInfos.folderSettings.ViewMode = FVM_LIST;
@@ -1648,8 +1648,8 @@
   ScreenToClient(hwnd,(LPPOINT)&fodInfos->ShellInfos.rectView.right);
 
   /* Construct the IShellBrowser interface */
-  fodInfos->Shell.FOIShellBrowser = IShellBrowserImpl_Construct(hwnd);  
-    
+  fodInfos->Shell.FOIShellBrowser = IShellBrowserImpl_Construct(hwnd);
+
   return NOERROR;
 }
 
@@ -1716,7 +1716,7 @@
   FileOpenDlgInfos *fodInfos = (FileOpenDlgInfos *) GetPropA(hwnd,FileOpenDlgInfosStr);
   LPITEMIDLIST pidl;
   HRESULT hres;
-  
+
   TRACE("\n");
 
   SHGetSpecialFolderLocation(0,CSIDL_DESKTOP,&pidl);
@@ -1749,7 +1749,7 @@
 /***********************************************************************
  *      FILEDLG95_FILETYPE_Init
  *
- * Initialisation of the file type combo box 
+ * Initialisation of the file type combo box
  */
 static HRESULT FILEDLG95_FILETYPE_Init(HWND hwnd)
 {
@@ -1765,7 +1765,7 @@
 
     for(;;)
     {
-      /* filter is a list...  title\0ext\0......\0\0 
+      /* filter is a list...  title\0ext\0......\0\0
        * Set the combo item text to the title and the item data
        *  to the ext
        */
@@ -1782,7 +1782,7 @@
       if (!(lpstrExt = (LPSTR) MemAlloc(strlen(lpstrPos)+1))) return E_FAIL;
       strcpy(lpstrExt,lpstrPos);
       lpstrPos += strlen(lpstrPos) + 1;
-            
+
       /* Add the item at the end of the combo */
       CBAddString(fodInfos->DlgInfos.hwndFileTypeCB, lpstrDisplay);
       CBSetItemDataPtr(fodInfos->DlgInfos.hwndFileTypeCB, nFilters, lpstrExt);
@@ -1793,7 +1793,7 @@
      * in the initialisation structure
      * FIXME: lpstrCustomFilter not handled at all
      */
-  
+
     /* set default filter index */
     if(fodInfos->ofnInfos->nFilterIndex == 0 && fodInfos->ofnInfos->lpstrCustomFilter == NULL)
       fodInfos->ofnInfos->nFilterIndex = 1;
@@ -1801,16 +1801,16 @@
     /* First, check to make sure our index isn't out of bounds. */
     if ( fodInfos->ofnInfos->nFilterIndex > nFilters )
       fodInfos->ofnInfos->nFilterIndex = nFilters;
- 
+
     /* Set the current index selection. */
     CBSetCurSel(fodInfos->DlgInfos.hwndFileTypeCB, fodInfos->ofnInfos->nFilterIndex-1);
-  
+
     /* Get the corresponding text string from the combo box. */
     lpstrFilter = (LPSTR) CBGetItemDataPtr(fodInfos->DlgInfos.hwndFileTypeCB,
                                              fodInfos->ofnInfos->nFilterIndex-1);
 
     if ((INT)lpstrFilter == CB_ERR)  /* control is empty */
-      lpstrFilter = NULL;	
+      lpstrFilter = NULL;
 
     if(lpstrFilter)
     {
@@ -1919,11 +1919,11 @@
      MemFree(fodInfos->ShellInfos.lpstrCurrentFilter);
 
 }
-    
+
 /***********************************************************************
  *      FILEDLG95_LOOKIN_Init
  *
- * Initialisation of the look in combo box 
+ * Initialisation of the look in combo box
  */
 static HRESULT FILEDLG95_LOOKIN_Init(HWND hwndCombo)
 {
@@ -2026,21 +2026,21 @@
   if(pDIStruct->itemID == liInfos->uSelectedItem)
   {
     ilItemImage = (HIMAGELIST) SHGetFileInfoA ((LPCSTR) tmpFolder->pidlItem,
-                                               0,    
-                                               &sfi,    
-                                               sizeof (SHFILEINFOA),   
-                                               SHGFI_PIDL | SHGFI_SMALLICON |    
-                                               SHGFI_OPENICON | SHGFI_SYSICONINDEX    | 
-                                               SHGFI_DISPLAYNAME );   
+                                               0,
+                                               &sfi,
+                                               sizeof (SHFILEINFOA),
+                                               SHGFI_PIDL | SHGFI_SMALLICON |
+                                               SHGFI_OPENICON | SHGFI_SYSICONINDEX    |
+                                               SHGFI_DISPLAYNAME );
   }
   else
   {
     ilItemImage = (HIMAGELIST) SHGetFileInfoA ((LPCSTR) tmpFolder->pidlItem,
-                                                  0, 
-                                                  &sfi, 
+                                                  0,
+                                                  &sfi,
                                                   sizeof (SHFILEINFOA),
-                                                  SHGFI_PIDL | SHGFI_SMALLICON | 
-                                                  SHGFI_SYSICONINDEX | 
+                                                  SHGFI_PIDL | SHGFI_SMALLICON |
+                                                  SHGFI_SYSICONINDEX |
                                                   SHGFI_DISPLAYNAME);
   }
 
@@ -2063,10 +2063,10 @@
   {
     iIndentation = 0;
     ilItemImage = (HIMAGELIST) SHGetFileInfoA ((LPCSTR) tmpFolder->pidlItem,
-                                                0, 
-                                                &sfi, 
-                                                sizeof (SHFILEINFOA), 
-                                                SHGFI_PIDL | SHGFI_SMALLICON | SHGFI_OPENICON 
+                                                0,
+                                                &sfi,
+                                                sizeof (SHFILEINFOA),
+                                                SHGFI_PIDL | SHGFI_SMALLICON | SHGFI_OPENICON
                                                 | SHGFI_SYSICONINDEX | SHGFI_DISPLAYNAME  );
 
   }
@@ -2090,14 +2090,14 @@
   rectText.right = pDIStruct->rcItem.right + XTEXTOFFSET;
   rectText.bottom =
 	  (pDIStruct->rcItem.top + pDIStruct->rcItem.bottom + tm.tmHeight) / 2;
- 
+
   /* Draw the icon from the image list */
   ImageList_Draw(ilItemImage,
                  sfi.iIcon,
-                 pDIStruct->hDC,  
-                 rectIcon.left,  
-                 rectIcon.top,  
-                 ILD_TRANSPARENT );  
+                 pDIStruct->hDC,
+                 rectIcon.left,
+                 rectIcon.top,
+                 ILD_TRANSPARENT );
 
   /* Draw the associated text */
   if(sfi.szDisplayName)
@@ -2124,7 +2124,7 @@
     case CBN_SELENDOK:
     {
       LPSFOLDER tmpFolder;
-      int iItem; 
+      int iItem;
 
       iItem = CBGetCurSel(fodInfos->DlgInfos.hwndLookInCB);
 
@@ -2141,7 +2141,7 @@
       }
       break;
     }
-      
+
   }
   return FALSE;
 }
@@ -2166,7 +2166,7 @@
 
   if(!(liInfos = (LookInInfos *)GetPropA(hwnd,LookInInfosStr)))
     return -1;
-    
+
   tmpFolder = MemAlloc(sizeof(SFOLDER));
   tmpFolder->m_iIndent = 0;
 
@@ -2181,13 +2181,13 @@
 
   if(tmpFolder->m_iIndent > liInfos->iMaxIndentation)
     liInfos->iMaxIndentation = tmpFolder->m_iIndent;
-  
+
   sfi.dwAttributes = SFGAO_FILESYSANCESTOR | SFGAO_FILESYSTEM;
   SHGetFileInfoA((LPSTR)pidl,
                   0,
                   &sfi,
                   sizeof(sfi),
-                  SHGFI_DISPLAYNAME | SHGFI_SYSICONINDEX 
+                  SHGFI_DISPLAYNAME | SHGFI_SYSICONINDEX
                   | SHGFI_PIDL | SHGFI_SMALLICON | SHGFI_ATTRIBUTES | SHGFI_ATTR_SPECIFIED);
 
   TRACE("-- Add %s attr=%08lx\n", sfi.szDisplayName, sfi.dwAttributes);
@@ -2195,7 +2195,7 @@
   if((sfi.dwAttributes & SFGAO_FILESYSANCESTOR) || (sfi.dwAttributes & SFGAO_FILESYSTEM))
   {
     int iItemID;
-  
+
     TRACE("-- Add %s at %u\n", sfi.szDisplayName, tmpFolder->m_iIndent);
 
     /* Add the item at the end of the list */
@@ -2221,11 +2221,11 @@
 /***********************************************************************
  *      FILEDLG95_LOOKIN_InsertItemAfterParent
  *
- * Insert an item below its parent 
+ * Insert an item below its parent
  */
 static int FILEDLG95_LOOKIN_InsertItemAfterParent(HWND hwnd,LPITEMIDLIST pidl)
 {
-  
+
   LPITEMIDLIST pidlParent = GetParentPidl(pidl);
   int iParentPos;
 
@@ -2280,7 +2280,7 @@
         iItemPos--;
     }
   }
-  
+
   CBSetCurSel(hwnd,iItemPos);
   liInfos->uSelectedItem = iItemPos;
 
@@ -2402,7 +2402,7 @@
       for ( nFileToOpen = 0; nFileToOpen < nFileSelected; nFileToOpen++ )
       {
         pidl = GetPidlFromDataObject( fodInfos->Shell.FOIDataObject, nFileToOpen+1 );
-    
+
         if (pidl)
 	{
           /* get the total length of the selected file names*/
@@ -2514,7 +2514,7 @@
 	GetDlgItemTextA(hwnd, IDC_FILENAME, lpstrEdit, nStrLen+1);
 
 	TRACE("nStrLen=%u str=%s\n", nStrLen, lpstrEdit);
-	
+
 	/* we might get single filename without any '"',
 	 * so we need nStrLen + terminating \0 + end-of-list \0 */
 	*lpstrFileList = MemAlloc(nStrLen+2);
@@ -2535,7 +2535,7 @@
 	    (*lpstrFileList)[nFileIndex++] = '\0';
 	    (*sizeUsed)++;
 	    nFileCount++;
-	  } 
+	  }
 	  nStrCharCount++;
 	}
 
@@ -2596,13 +2596,13 @@
  */
 LPITEMIDLIST GetPidlFromDataObject ( IDataObject *doSelected, UINT nPidlIndex)
 {
-     
+
     STGMEDIUM medium;
     FORMATETC formatetc;
     LPITEMIDLIST pidl = NULL;
-    
+
     TRACE("sv=%p index=%u\n", doSelected, nPidlIndex);
-    
+
     /* Set the FORMATETC structure*/
     SETDefFormatEtc(formatetc, RegisterClipboardFormatA(CFSTR_SHELLIDLIST), TYMED_HGLOBAL);
 
@@ -2656,9 +2656,9 @@
 /***********************************************************************
  *      GetName
  *
- * Get the pidl's display name (relative to folder) and 
+ * Get the pidl's display name (relative to folder) and
  * put it in lpstrFileName.
- * 
+ *
  * Return NOERROR on success,
  * E_FAIL otherwise
  */
@@ -2690,7 +2690,7 @@
 /***********************************************************************
  *      GetShellFolderFromPidl
  *
- * pidlRel is the item pidl relative 
+ * pidlRel is the item pidl relative
  * Return the IShellFolder of the absolute pidl
  */
 IShellFolder *GetShellFolderFromPidl(LPITEMIDLIST pidlAbs)
@@ -2726,17 +2726,17 @@
   LPITEMIDLIST pidlParent;
 
   TRACE("%p\n", pidl);
-  
+
   pidlParent = COMDLG32_PIDL_ILClone(pidl);
   COMDLG32_PIDL_ILRemoveLastID(pidlParent);
-     
+
   return pidlParent;
 }
 
 /***********************************************************************
  *      GetPidlFromName
  *
- * returns the pidl of the file name relative to folder 
+ * returns the pidl of the file name relative to folder
  * NULL if an error occurred
  */
 LPITEMIDLIST GetPidlFromName(IShellFolder *lpsf,LPCSTR lpcstrFileName)
@@ -2750,7 +2750,7 @@
   if(!lpcstrFileName) return NULL;
   if(!*lpcstrFileName) return NULL;
 
-  MultiByteToWideChar(CP_ACP,MB_PRECOMPOSED,lpcstrFileName,-1,(LPWSTR)lpwstrDirName,MAX_PATH);  
+  MultiByteToWideChar(CP_ACP,MB_PRECOMPOSED,lpcstrFileName,-1,(LPWSTR)lpwstrDirName,MAX_PATH);
 
   if(!lpsf)
   {
@@ -2760,7 +2760,7 @@
   }
   else
   {
-    IShellFolder_ParseDisplayName(lpsf, 0, NULL, (LPWSTR)lpwstrDirName, &ulEaten, &pidl, NULL); 
+    IShellFolder_ParseDisplayName(lpsf, 0, NULL, (LPWSTR)lpwstrDirName, &ulEaten, &pidl, NULL);
   }
   return pidl;
 }
@@ -2771,11 +2771,11 @@
 {
 	ULONG uAttr  = SFGAO_FOLDER | SFGAO_HASSUBFOLDER;
 	HRESULT ret;
-	
+
 	TRACE("%p, %p\n", psf, pidl);
-	
+
   	ret = IShellFolder_GetAttributesOf( psf, 1, &pidl, &uAttr );
-	
+
 	TRACE("-- 0x%08lx 0x%08lx\n", uAttr, ret);
 	/* see documentation shell 4.1*/
         return uAttr & (SFGAO_FOLDER | SFGAO_HASSUBFOLDER);
@@ -2812,7 +2812,7 @@
   }
 
   return bBrowseSelFolder;
-} 
+}
 
 /*
  * Memory allocation methods */
diff --git a/dlls/commdlg/filedlgbrowser.c b/dlls/commdlg/filedlgbrowser.c
index 2653245..7d0d649 100644
--- a/dlls/commdlg/filedlgbrowser.c
+++ b/dlls/commdlg/filedlgbrowser.c
@@ -1,6 +1,6 @@
 /*
  *  Implementation of IShellBrowser for the File Open common dialog
- * 
+ *
  * Copyright 1999 Francois Boisvert
  * Copyright 1999, 2000 Juergen Schmied
  *
@@ -69,7 +69,7 @@
 /**************************************************************************
 *   External Prototypes
 */
-extern const char *FileOpenDlgInfosStr; 
+extern const char *FileOpenDlgInfosStr;
 
 extern HRESULT          GetName(LPSHELLFOLDER lpsf, LPITEMIDLIST pidl,DWORD dwFlags,LPSTR lpstrFileName);
 extern HRESULT          GetFileName(HWND hwnd, LPITEMIDLIST pidl, LPSTR lpstrFileName);
@@ -137,7 +137,7 @@
 /*
  *	IShellBrowser
  */
- 
+
 /**************************************************************************
 *  IShellBrowserImpl_Construct
 */
@@ -168,7 +168,7 @@
 *  IShellBrowserImpl_QueryInterface
 */
 HRESULT WINAPI IShellBrowserImpl_QueryInterface(IShellBrowser *iface,
-                                            REFIID riid, 
+                                            REFIID riid,
                                             LPVOID *ppvObj)
 {
     ICOM_THIS(IShellBrowserImpl, iface);
@@ -178,7 +178,7 @@
     *ppvObj = NULL;
 
     if(IsEqualIID(riid, &IID_IUnknown))          /*IUnknown*/
-    { *ppvObj = This; 
+    { *ppvObj = This;
     }
     else if(IsEqualIID(riid, &IID_IOleWindow))  /*IOleWindow*/
     { *ppvObj = (IOleWindow*)This;
@@ -225,8 +225,8 @@
 
     TRACE("(%p)\n", This);
 
-    if (!--(This->ref)) 
-    { 
+    if (!--(This->ref))
+    {
       HeapFree(GetProcessHeap(),0, This);
       return 0;
     }
@@ -245,9 +245,9 @@
 *  See Windows documentation for more details
 *
 *  Note : We will never be window less in the File Open dialog
-*  
+*
 */
-HRESULT WINAPI IShellBrowserImpl_GetWindow(IShellBrowser * iface,  
+HRESULT WINAPI IShellBrowserImpl_GetWindow(IShellBrowser * iface,
                                            HWND * phwnd)
 {
     ICOM_THIS(IShellBrowserImpl, iface);
@@ -259,7 +259,7 @@
 
     *phwnd = This->hwndOwner;
 
-    return (*phwnd) ? S_OK : E_UNEXPECTED; 
+    return (*phwnd) ? S_OK : E_UNEXPECTED;
 
 }
 
@@ -286,11 +286,11 @@
 *
 *  See Windows documentation on IShellBrowser::BrowseObject for more details
 *
-*  This function will override user specified flags and will always 
-*  use SBSP_DEFBROWSER and SBSP_DEFMODE.  
+*  This function will override user specified flags and will always
+*  use SBSP_DEFBROWSER and SBSP_DEFMODE.
 */
-HRESULT WINAPI IShellBrowserImpl_BrowseObject(IShellBrowser *iface, 
-                                              LPCITEMIDLIST pidl, 
+HRESULT WINAPI IShellBrowserImpl_BrowseObject(IShellBrowser *iface,
+                                              LPCITEMIDLIST pidl,
                                               UINT wFlags)
 {
     HRESULT hRes;
@@ -311,7 +311,7 @@
     /* Format the pidl according to its parameter's category */
     if(wFlags & SBSP_RELATIVE)
     {
-        
+
         /* SBSP_RELATIVE  A relative pidl (relative from the current folder) */
         if(FAILED(hRes = IShellFolder_BindToObject(fodInfos->Shell.FOIShellFolder,
              pidl, NULL, &IID_IShellFolder, (LPVOID *)&psfTmp)))
@@ -336,14 +336,14 @@
         pidlTmp =  COMDLG32_PIDL_ILClone((LPITEMIDLIST)pidl);
         psfTmp = GetShellFolderFromPidl(pidlTmp);
     }
-    
+
     if(!psfTmp)
     {
       ERR("could not browse to folder\n");
       return E_FAIL;
     }
 
-    /* If the pidl to browse to is equal to the actual pidl ... 
+    /* If the pidl to browse to is equal to the actual pidl ...
        do nothing and pretend you did it*/
     if(COMDLG32_PIDL_ILIsEqual(pidlTmp,fodInfos->ShellInfos.pidlAbsCurrent))
     {
@@ -405,14 +405,14 @@
     FILEDLG95_LOOKIN_SelectItem(fodInfos->DlgInfos.hwndLookInCB,fodInfos->ShellInfos.pidlAbsCurrent);
 
     /* changes the tab order of the ListView to reflect the window's File Dialog */
-    hDlgWnd = GetDlgItem(GetParent(hwndView), IDC_LOOKIN); 
+    hDlgWnd = GetDlgItem(GetParent(hwndView), IDC_LOOKIN);
     SetWindowPos(hwndView, hDlgWnd, 0,0,0,0, SWP_NOMOVE | SWP_NOSIZE);
 
     /* Since we destroyed the old view if it had focus set focus to the newly created view */
     if (bViewHasFocus)
       SetFocus(fodInfos->ShellInfos.hwndView);
 
-    return hRes; 
+    return hRes;
 error:
     ERR("Failed with error 0x%08lx\n", hRes);
     return hRes;
@@ -421,9 +421,9 @@
 /**************************************************************************
 *  IShellBrowserImpl_EnableModelessSB
 */
-HRESULT WINAPI IShellBrowserImpl_EnableModelessSB(IShellBrowser *iface,    
+HRESULT WINAPI IShellBrowserImpl_EnableModelessSB(IShellBrowser *iface,
                                               BOOL fEnable)
-                                              
+
 {
     ICOM_THIS(IShellBrowserImpl, iface);
 
@@ -436,10 +436,10 @@
 /**************************************************************************
 *  IShellBrowserImpl_GetControlWindow
 */
-HRESULT WINAPI IShellBrowserImpl_GetControlWindow(IShellBrowser *iface,    
-                                              UINT id,    
+HRESULT WINAPI IShellBrowserImpl_GetControlWindow(IShellBrowser *iface,
+                                              UINT id,
                                               HWND *lphwnd)
-                                              
+
 {
     ICOM_THIS(IShellBrowserImpl, iface);
 
@@ -452,9 +452,9 @@
 *  IShellBrowserImpl_GetViewStateStream
 */
 HRESULT WINAPI IShellBrowserImpl_GetViewStateStream(IShellBrowser *iface,
-                                                DWORD grfMode,    
+                                                DWORD grfMode,
                                                 LPSTREAM *ppStrm)
-                                              
+
 {
     ICOM_THIS(IShellBrowserImpl, iface);
 
@@ -462,14 +462,14 @@
 
     /* Feature not implemented */
     return E_NOTIMPL;
-}       
+}
 /**************************************************************************
 *  IShellBrowserImpl_InsertMenusSB
 */
 HRESULT WINAPI IShellBrowserImpl_InsertMenusSB(IShellBrowser *iface,
                                            HMENU hmenuShared,
                                            LPOLEMENUGROUPWIDTHS lpMenuWidths)
-                                              
+
 {
     ICOM_THIS(IShellBrowserImpl, iface);
 
@@ -483,7 +483,7 @@
 */
 HRESULT WINAPI IShellBrowserImpl_OnViewWindowActive(IShellBrowser *iface,
                                                 IShellView *ppshv)
-                                              
+
 {
     ICOM_THIS(IShellBrowserImpl, iface);
 
@@ -491,13 +491,13 @@
 
     /* Feature not implemented */
     return E_NOTIMPL;
-}   
+}
 /**************************************************************************
 *  IShellBrowserImpl_QueryActiveShellView
 */
 HRESULT WINAPI IShellBrowserImpl_QueryActiveShellView(IShellBrowser *iface,
                                                   IShellView **ppshv)
-                                              
+
 {
     ICOM_THIS(IShellBrowserImpl, iface);
 
@@ -513,13 +513,13 @@
     }
     IShellView_AddRef(fodInfos->Shell.FOIShellView);
     return NOERROR;
-}   
+}
 /**************************************************************************
 *  IShellBrowserImpl_RemoveMenusSB
 */
 HRESULT WINAPI IShellBrowserImpl_RemoveMenusSB(IShellBrowser *iface,
                                            HMENU hmenuShared)
-                                              
+
 {
     ICOM_THIS(IShellBrowserImpl, iface);
 
@@ -527,21 +527,21 @@
 
     /* Feature not implemented */
     return E_NOTIMPL;
-}   
+}
 /**************************************************************************
 *  IShellBrowserImpl_SendControlMsg
 */
-HRESULT WINAPI IShellBrowserImpl_SendControlMsg(IShellBrowser *iface,    
-                                            UINT id,    
-                                            UINT uMsg,    
-                                            WPARAM wParam,    
+HRESULT WINAPI IShellBrowserImpl_SendControlMsg(IShellBrowser *iface,
+                                            UINT id,
+                                            UINT uMsg,
+                                            WPARAM wParam,
                                             LPARAM lParam,
                                             LRESULT *pret)
-                                              
+
 {
     ICOM_THIS(IShellBrowserImpl, iface);
     LRESULT lres;
-    
+
     TRACE("(%p)->(0x%08x 0x%08x 0x%08x 0x%08lx %p)\n", This, id, uMsg, wParam, lParam, pret);
 
     switch (id)
@@ -560,10 +560,10 @@
 *  IShellBrowserImpl_SetMenuSB
 */
 HRESULT WINAPI IShellBrowserImpl_SetMenuSB(IShellBrowser *iface,
-                                       HMENU hmenuShared,    
+                                       HMENU hmenuShared,
                                        HOLEMENU holemenuReserved,
                                        HWND hwndActiveObject)
-                                              
+
 {
     ICOM_THIS(IShellBrowserImpl, iface);
 
@@ -571,13 +571,13 @@
 
     /* Feature not implemented */
     return E_NOTIMPL;
-}   
+}
 /**************************************************************************
 *  IShellBrowserImpl_SetStatusTextSB
 */
 HRESULT WINAPI IShellBrowserImpl_SetStatusTextSB(IShellBrowser *iface,
                                              LPCOLESTR lpszStatusText)
-                                              
+
 {
     ICOM_THIS(IShellBrowserImpl, iface);
 
@@ -585,15 +585,15 @@
 
     /* Feature not implemented */
     return E_NOTIMPL;
-}   
+}
 /**************************************************************************
 *  IShellBrowserImpl_SetToolbarItems
 */
 HRESULT WINAPI IShellBrowserImpl_SetToolbarItems(IShellBrowser *iface,
-                                             LPTBBUTTON lpButtons,    
-                                             UINT nButtons,    
+                                             LPTBBUTTON lpButtons,
+                                             UINT nButtons,
                                              UINT uFlags)
-                                              
+
 {
     ICOM_THIS(IShellBrowserImpl, iface);
 
@@ -601,14 +601,14 @@
 
     /* Feature not implemented */
     return E_NOTIMPL;
-}   
+}
 /**************************************************************************
 *  IShellBrowserImpl_TranslateAcceleratorSB
 */
 HRESULT WINAPI IShellBrowserImpl_TranslateAcceleratorSB(IShellBrowser *iface,
-                                                    LPMSG lpmsg,    
+                                                    LPMSG lpmsg,
                                                     WORD wID)
-                                              
+
 {
     ICOM_THIS(IShellBrowserImpl, iface);
 
@@ -655,7 +655,7 @@
 */
 HRESULT WINAPI IShellBrowserImpl_ICommDlgBrowser_QueryInterface(
 	ICommDlgBrowser *iface,
-	REFIID riid, 
+	REFIID riid,
 	LPVOID *ppvObj)
 {
     _ICOM_THIS_FromICommDlgBrowser(IShellBrowser,iface);
@@ -703,8 +703,8 @@
 
     TRACE("(%p)\n", This);
 
-    fodInfos = (FileOpenDlgInfos *) GetPropA(This->hwndOwner,FileOpenDlgInfosStr);  
-    
+    fodInfos = (FileOpenDlgInfos *) GetPropA(This->hwndOwner,FileOpenDlgInfosStr);
+
     /* If the selected object is not a folder, send a IDOK command to parent window */
     if((pidl = GetPidlFromDataObject(fodInfos->Shell.FOIDataObject, 1)))
     {
@@ -753,7 +753,7 @@
              SendMessageA(This->hwndOwner, DM_SETDEFID, IDOK, 0);
 
             break;
-        case CDBOSC_KILLFOCUS: 
+        case CDBOSC_KILLFOCUS:
 	    {
 		FileOpenDlgInfos *fodInfos = (FileOpenDlgInfos *) GetPropA(This->hwndOwner,FileOpenDlgInfosStr);
 		if(fodInfos->DlgInfos.dwDlgProp & FODPROP_SAVEDLG)
@@ -767,13 +767,13 @@
             break;
     }
 
-    return NOERROR;     
+    return NOERROR;
 }
 
 /**************************************************************************
 *  IShellBrowserImpl_ICommDlgBrowser_IncludeObject
 */
-HRESULT WINAPI IShellBrowserImpl_ICommDlgBrowser_IncludeObject(ICommDlgBrowser *iface, 
+HRESULT WINAPI IShellBrowserImpl_ICommDlgBrowser_IncludeObject(ICommDlgBrowser *iface,
                                                                IShellView * ppshv,
                                                                LPCITEMIDLIST pidl)
 {
@@ -790,13 +790,13 @@
 
     ulAttr = SFGAO_HIDDEN | SFGAO_FOLDER | SFGAO_FILESYSTEM | SFGAO_FILESYSANCESTOR | SFGAO_LINK;
     IShellFolder_GetAttributesOf(fodInfos->Shell.FOIShellFolder, 1, &pidl, &ulAttr);
-    
+
     if( (ulAttr & SFGAO_HIDDEN)                                         /* hidden */
       | !(ulAttr & (SFGAO_FILESYSTEM | SFGAO_FILESYSANCESTOR))) /* special folder */
         return S_FALSE;
 
     /* always include directories and links */
-    if(ulAttr & (SFGAO_FOLDER | SFGAO_LINK)) 
+    if(ulAttr & (SFGAO_FOLDER | SFGAO_LINK))
         return S_OK;
 
     /* Check if there is a mask to apply if not */
@@ -817,7 +817,7 @@
 
 /**************************************************************************
 *  IShellBrowserImpl_ICommDlgBrowser_OnSelChange
-*/  
+*/
 HRESULT IShellBrowserImpl_ICommDlgBrowser_OnSelChange(ICommDlgBrowser *iface, IShellView *ppshv)
 {
     FileOpenDlgInfos *fodInfos;
@@ -826,16 +826,16 @@
 
     fodInfos = (FileOpenDlgInfos *) GetPropA(This->hwndOwner,FileOpenDlgInfosStr);
     TRACE("(%p do=%p view=%p)\n", This, fodInfos->Shell.FOIDataObject, fodInfos->Shell.FOIShellView);
-    
+
     /* release old selections */
     if (fodInfos->Shell.FOIDataObject)
       IDataObject_Release(fodInfos->Shell.FOIDataObject);
-    
+
     /* get a new DataObject from the ShellView */
     if(FAILED(IShellView_GetItemObject(fodInfos->Shell.FOIShellView, SVGIO_SELECTION,
                               &IID_IDataObject, (LPVOID*)&fodInfos->Shell.FOIDataObject)))
       return E_FAIL;
-					  
+
     FILEDLG95_FILENAME_FillFromSelection(This->hwndOwner);
 
     SendCustomDlgNotificationMessage(This->hwndOwner, CDN_SELCHANGE);
@@ -867,7 +867,7 @@
 */
 HRESULT WINAPI IShellBrowserImpl_IServiceProvider_QueryInterface(
 	IServiceProvider *iface,
-	REFIID riid, 
+	REFIID riid,
 	LPVOID *ppvObj)
 {
     _ICOM_THIS_FromIServiceProvider(IShellBrowser,iface);
@@ -905,7 +905,7 @@
 *  IShellBrowserImpl_IServiceProvider_Release
 *
 * NOTES
-*  the w2k shellview asks for 
+*  the w2k shellview asks for
 *   guidService = SID_STopLevelBrowser
 *   riid = IShellBrowser
 *
diff --git a/dlls/commdlg/filedlgbrowser.h b/dlls/commdlg/filedlgbrowser.h
index 7bd22ae..221db78 100644
--- a/dlls/commdlg/filedlgbrowser.h
+++ b/dlls/commdlg/filedlgbrowser.h
@@ -1,6 +1,6 @@
 /*
  *  Implementation of IShellBrowser for the File Open common dialog
- * 
+ *
  * Copyright 1999 Francois Boisvert
  * Copyright 1999, 2000 Juergen Schmied
  *
@@ -39,7 +39,7 @@
 /* dialog internal property */
 
 #define FODPROP_SAVEDLG 0x0001  /* File dialog is a Save file dialog */
-#define FODPROP_USEVIEW 0x0002  /* Indicates the user selection must be taken 
+#define FODPROP_USEVIEW 0x0002  /* Indicates the user selection must be taken
 				   from the IShellView */
 
 /***********************************************************************
@@ -49,10 +49,10 @@
 
 typedef struct
 {
-    
+
     LPOPENFILENAMEA ofnInfos;
     struct {
-        IShellBrowser *FOIShellBrowser; 
+        IShellBrowser *FOIShellBrowser;
         IShellFolder *FOIShellFolder;
         IShellView *FOIShellView;
 	IDataObject *FOIDataObject;
diff --git a/dlls/commdlg/filetitle.c b/dlls/commdlg/filetitle.c
index 8c61075..6c55e5e 100644
--- a/dlls/commdlg/filetitle.c
+++ b/dlls/commdlg/filetitle.c
@@ -71,7 +71,7 @@
 		i++;
 
 	TRACE("---> '%s' \n", &lpFile[i]);
-    
+
 	len = strlen(lpFile+i)+1;
 	if(cbBuf < len)
 		return len;
diff --git a/dlls/commdlg/finddlg.c b/dlls/commdlg/finddlg.c
index 269ccb4..5ef7f00 100644
--- a/dlls/commdlg/finddlg.c
+++ b/dlls/commdlg/finddlg.c
@@ -33,7 +33,7 @@
 
 #include "cdlg.h"
 
-struct FRPRIVATE 
+struct FRPRIVATE
 {
     HANDLE16 hDlgTmpl16; /* handle for resource 16 */
     HANDLE16 hResource16; /* handle for allocated resource 16 */
@@ -101,7 +101,7 @@
         DWORD size;
         HGLOBAL16 hGlobal16;
 
-	if (!(hResInfo = FindResourceA(COMMDLG_hInstance32, 
+	if (!(hResInfo = FindResourceA(COMMDLG_hInstance32,
                lfr->find ?
                MAKEINTRESOURCEA(FINDDLGORD):MAKEINTRESOURCEA(REPLACEDLGORD),
                RT_DIALOGA)))
@@ -142,7 +142,7 @@
 /***********************************************************************
  *           FINDDLG_FreeResources                                [internal]
  *
- * Free resources allocated 
+ * Free resources allocated
  */
 void FINDDLG_FreeResources(LFRPRIVATE lfr)
 {
@@ -259,15 +259,15 @@
     }
     ShowWindow(hWnd, SW_SHOWNORMAL);
     return TRUE;
-}    
+}
 
 
 /***********************************************************************
  *                              FINDDLG_WMCommand               [internal]
  */
-static LRESULT FINDDLG_WMCommand(HWND hWnd, WPARAM wParam, 
+static LRESULT FINDDLG_WMCommand(HWND hWnd, WPARAM wParam,
 			HWND hwndOwner, LPDWORD lpFlags,
-			LPSTR lpstrFindWhat, WORD wFindWhatLen, 
+			LPSTR lpstrFindWhat, WORD wFindWhatLen,
 			BOOL fUnicode)
 {
     int uFindReplaceMessage = RegisterWindowMessageA( FINDMSGSTRINGA );
@@ -275,17 +275,17 @@
 
     switch (wParam) {
 	case IDOK:
-	    if (fUnicode) 
+	    if (fUnicode)
 	      GetDlgItemTextW(hWnd, edt1, (LPWSTR)lpstrFindWhat, wFindWhatLen/2);
 	      else GetDlgItemTextA(hWnd, edt1, lpstrFindWhat, wFindWhatLen);
 	    if (IsDlgButtonChecked(hWnd, rad2))
 		*lpFlags |= FR_DOWN;
 		else *lpFlags &= ~FR_DOWN;
 	    if (IsDlgButtonChecked(hWnd, chx1))
-		*lpFlags |= FR_WHOLEWORD; 
+		*lpFlags |= FR_WHOLEWORD;
 		else *lpFlags &= ~FR_WHOLEWORD;
 	    if (IsDlgButtonChecked(hWnd, chx2))
-		*lpFlags |= FR_MATCHCASE; 
+		*lpFlags |= FR_MATCHCASE;
 		else *lpFlags &= ~FR_MATCHCASE;
             *lpFlags &= ~(FR_REPLACE | FR_REPLACEALL | FR_DIALOGTERM);
 	    *lpFlags |= FR_FINDNEXT;
@@ -305,7 +305,7 @@
 	    return TRUE;
     }
     return FALSE;
-}    
+}
 
 
 /***********************************************************************
@@ -334,7 +334,7 @@
  *                              REPLACEDLG_WMInitDialog         [internal]
  */
 static LRESULT REPLACEDLG_WMInitDialog(HWND hWnd, LPARAM lParam,
-		    LPDWORD lpFlags, LPSTR lpstrFindWhat, 
+		    LPDWORD lpFlags, LPSTR lpstrFindWhat,
 		    LPSTR lpstrReplaceWith, BOOL fUnicode)
 {
     SetWindowLongA(hWnd, DWL_USER, lParam);
@@ -344,7 +344,7 @@
      * Replace / ReplaceAll buttons.  Only after typing some text, the buttons should be
      * enabled.
      */
-    if (fUnicode)     
+    if (fUnicode)
     {
 	SetDlgItemTextW(hWnd, edt1, (LPWSTR)lpstrFindWhat);
 	SetDlgItemTextW(hWnd, edt2, (LPWSTR)lpstrReplaceWith);
@@ -369,7 +369,7 @@
     }
     ShowWindow(hWnd, SW_SHOWNORMAL);
     return TRUE;
-}    
+}
 
 
 /***********************************************************************
@@ -396,10 +396,10 @@
 		GetDlgItemTextA(hWnd, edt2, lpstrReplaceWith, wReplaceWithLen);
 	    }
 	    if (IsDlgButtonChecked(hWnd, chx1))
-		*lpFlags |= FR_WHOLEWORD; 
+		*lpFlags |= FR_WHOLEWORD;
 		else *lpFlags &= ~FR_WHOLEWORD;
 	    if (IsDlgButtonChecked(hWnd, chx2))
-		*lpFlags |= FR_MATCHCASE; 
+		*lpFlags |= FR_MATCHCASE;
 		else *lpFlags &= ~FR_MATCHCASE;
             *lpFlags &= ~(FR_REPLACE | FR_REPLACEALL | FR_DIALOGTERM);
 	    *lpFlags |= FR_FINDNEXT;
@@ -419,15 +419,15 @@
 		GetDlgItemTextW(hWnd, edt1, (LPWSTR)lpstrFindWhat, wFindWhatLen/2);
 		GetDlgItemTextW(hWnd, edt2, (LPWSTR)lpstrReplaceWith, wReplaceWithLen/2);
 	    }  else
-	    {	
+	    {
 		GetDlgItemTextA(hWnd, edt1, lpstrFindWhat, wFindWhatLen);
 		GetDlgItemTextA(hWnd, edt2, lpstrReplaceWith, wReplaceWithLen);
 	    }
 	    if (IsDlgButtonChecked(hWnd, chx1))
-		*lpFlags |= FR_WHOLEWORD; 
+		*lpFlags |= FR_WHOLEWORD;
 		else *lpFlags &= ~FR_WHOLEWORD;
 	    if (IsDlgButtonChecked(hWnd, chx2))
-		*lpFlags |= FR_MATCHCASE; 
+		*lpFlags |= FR_MATCHCASE;
 		else *lpFlags &= ~FR_MATCHCASE;
             *lpFlags &= ~(FR_FINDNEXT | FR_REPLACEALL | FR_DIALOGTERM);
 	    *lpFlags |= FR_REPLACE;
@@ -445,10 +445,10 @@
 		GetDlgItemTextA(hWnd, edt2, lpstrReplaceWith, wReplaceWithLen);
 	    }
 	    if (IsDlgButtonChecked(hWnd, chx1))
-		*lpFlags |= FR_WHOLEWORD; 
+		*lpFlags |= FR_WHOLEWORD;
 		else *lpFlags &= ~FR_WHOLEWORD;
 	    if (IsDlgButtonChecked(hWnd, chx2))
-		*lpFlags |= FR_MATCHCASE; 
+		*lpFlags |= FR_MATCHCASE;
 		else *lpFlags &= ~FR_MATCHCASE;
             *lpFlags &= ~(FR_FINDNEXT | FR_REPLACE | FR_DIALOGTERM);
 	    *lpFlags |= FR_REPLACEALL;
@@ -461,7 +461,7 @@
 	    return TRUE;
     }
     return FALSE;
-}    
+}
 
 
 /***********************************************************************
@@ -479,7 +479,7 @@
 		    MapSL(lpfr->lpstrReplaceWith), FALSE);
 	case WM_COMMAND:
 	    lpfr=MapSL(GetWindowLongA(hWnd, DWL_USER));
-	    return REPLACEDLG_WMCommand(hWnd, wParam, lpfr->hwndOwner, 
+	    return REPLACEDLG_WMCommand(hWnd, wParam, lpfr->hwndOwner,
 		    &lpfr->Flags, MapSL(lpfr->lpstrFindWhat),
 		    lpfr->wFindWhatLen, MapSL(lpfr->lpstrReplaceWith),
 		    lpfr->wReplaceWithLen, FALSE);
diff --git a/dlls/commdlg/finddlg32.c b/dlls/commdlg/finddlg32.c
index 7788049..caa270c 100644
--- a/dlls/commdlg/finddlg32.c
+++ b/dlls/commdlg/finddlg32.c
@@ -175,7 +175,7 @@
 static BOOL CALLBACK COMDLG32_FindReplaceDlgProc(HWND hDlgWnd, UINT iMsg, WPARAM wParam, LPARAM lParam)
 {
 	COMDLG32_FR_Data *pdata = (COMDLG32_FR_Data *)GetPropA(hDlgWnd, (LPSTR)COMDLG32_Atom);
-	BOOL retval = TRUE;;
+	BOOL retval = TRUE;
 
 	if(iMsg == WM_INITDIALOG)
         {
diff --git a/dlls/commdlg/fontdlg.c b/dlls/commdlg/fontdlg.c
index fd4618b..194a736 100644
--- a/dlls/commdlg/fontdlg.c
+++ b/dlls/commdlg/fontdlg.c
@@ -39,7 +39,7 @@
 
 #include "cdlg.h"
 
-static HBITMAP16 hBitmapTT = 0; 
+static HBITMAP16 hBitmapTT = 0;
 
 
 LRESULT WINAPI FormatCharDlgProcA(HWND hDlg, UINT uMsg, WPARAM wParam,
@@ -132,7 +132,7 @@
 
 
 /***********************************************************************
- *                        ChooseFont   (COMMDLG.15)     
+ *                        ChooseFont   (COMMDLG.15)
  */
 BOOL16 WINAPI ChooseFont16(LPCHOOSEFONT16 lpChFont)
 {
@@ -146,12 +146,12 @@
     LOGFONTA lf32a;
     LOGFONT16 *font16;
     SEGPTR lpTemplateName;
-    
+
     cf32a.lpLogFont=&lf32a;
     CFn_CHOOSEFONT16to32A(lpChFont, &cf32a);
 
     TRACE("ChooseFont\n");
-    if (!lpChFont) return FALSE;    
+    if (!lpChFont) return FALSE;
 
     if (TRACE_ON(commdlg))
 	_dump_cf_flags(lpChFont->Flags);
@@ -214,7 +214,7 @@
             return FALSE;
         }
         ConvertDialog32To16((LPVOID)template32, size, (LPVOID)template);
-        hDlgTmpl16 = hGlobal16;         
+        hDlgTmpl16 = hGlobal16;
 
     }
 
@@ -278,7 +278,7 @@
 
   if (lpChFont->Flags & (CF_SELECTSCRIPT | CF_NOVERTFONTS | CF_ENABLETEMPLATE |
     CF_ENABLETEMPLATEHANDLE)) FIXME(": unimplemented flag (ignored)\n");
-  return DialogBoxIndirectParamA(COMMDLG_hInstance32, template, 
+  return DialogBoxIndirectParamA(COMMDLG_hInstance32, template,
             lpChFont->hwndOwner, (DLGPROC)FormatCharDlgProcA, (LPARAM)lpChFont );
 }
 
@@ -320,9 +320,9 @@
     memcpy(cfa, cfw, sizeof(CHOOSEFONTA));
     cfa->lpLogFont = lpLogFont;
     cfa->lpszStyle = lpszStyle;
-    
+
     LogFontWtoA(cfw->lpLogFont, lpLogFont);
-    
+
     if (cfw->lpTemplateName != NULL)
     {
     	cfa->lpTemplateName = HEAP_strdupWtoA(GetProcessHeap(), 0,
@@ -330,14 +330,14 @@
     	if (cfa->lpTemplateName == NULL)
     	    return FALSE;
     }
-	
+
     if ((cfw->Flags & CF_USESTYLE) != 0 && cfw->lpszStyle != NULL)
     {
     	WideCharToMultiByte(CP_ACP, 0, cfw->lpszStyle, -1, cfa->lpszStyle,
     	    	LF_FACESIZE, NULL, NULL);
     	cfa->lpszStyle[LF_FACESIZE - 1] = '\0';
     }
-    
+
     return TRUE;
 }
 
@@ -351,12 +351,12 @@
     cfw->lpLogFont = lpLogFont;
     cfw->lpszStyle = lpszStyle;
     cfw->lpTemplateName = lpTemplateName;
-    
+
     LogFontAtoW(cfa->lpLogFont, lpLogFont);
-    
+
     if (cfa->lpTemplateName != NULL)
     	HeapFree(GetProcessHeap(), 0, (LPSTR)(cfa->lpTemplateName));
-    
+
     if ((cfa->Flags & CF_USESTYLE) != 0 && cfa->lpszStyle != NULL)
     {
     	MultiByteToWideChar(CP_ACP, 0, cfa->lpszStyle, -1, cfw->lpszStyle,
@@ -370,25 +370,25 @@
     CHOOSEFONTA     cf_a;
     LOGFONTA	    lf_a;
     CHAR    	    style_a[LF_FACESIZE];
-    
+
     cf_a.lpLogFont = &lf_a;
     cf_a.lpszStyle = style_a;
-    
+
     if (ChooseFontWtoA(lpChFont, &cf_a) == FALSE)
     {
     	COMDLG32_SetCommDlgExtendedError(CDERR_MEMALLOCFAILURE);
 	return FALSE;
     }
-    
+
     if (ChooseFontA(&cf_a) == FALSE)
     {
     	if (cf_a.lpTemplateName != NULL)
     	    HeapFree(GetProcessHeap(), 0, (LPSTR)(cf_a.lpTemplateName));
 	return FALSE;
     }
-    
+
     ChooseFontAtoW(&cf_a, lpChFont);
-    
+
     return TRUE;
 }
 
@@ -430,7 +430,7 @@
   cf32a.lpLogFont=&lf32a;
   cf32a.lpszStyle=HEAP_strdupWtoA(GetProcessHeap(), 0, lpChFont->lpszStyle);
   lpChFont->lpTemplateName=(LPWSTR)&cf32a;
-  bRet = DialogBoxIndirectParamW(COMMDLG_hInstance32, template, 
+  bRet = DialogBoxIndirectParamW(COMMDLG_hInstance32, template,
             lpChFont->hwndOwner, (DLGPROC)FormatCharDlgProcW, (LPARAM)lpChFont );
   HeapFree(GetProcessHeap(), 0, cf32a.lpszStyle);
   lpChFont->lpTemplateName=(LPWSTR)cf32a.lpTemplateName;
@@ -488,7 +488,7 @@
 /*************************************************************************
  *              AddFontFamily                               [internal]
  */
-static INT AddFontFamily(const LOGFONTA *lplf, UINT nFontType, 
+static INT AddFontFamily(const LOGFONTA *lplf, UINT nFontType,
                            LPCHOOSEFONTA lpcf, HWND hwnd, LPCFn_ENUMSTRUCT e)
 {
   int i;
@@ -504,7 +504,7 @@
      return 1;
   if (lpcf->Flags & CF_TTONLY)
    if (!(nFontType & TRUETYPE_FONTTYPE))
-     return 1;   
+     return 1;
 
   if (e) e->added++;
 
@@ -522,7 +522,7 @@
 /*************************************************************************
  *              FontFamilyEnumProc32                           [internal]
  */
-static INT WINAPI FontFamilyEnumProc(const LOGFONTA *lpLogFont, 
+static INT WINAPI FontFamilyEnumProc(const LOGFONTA *lpLogFont,
 	  const TEXTMETRICA *metrics, DWORD dwFontType, LPARAM lParam)
 {
   LPCFn_ENUMSTRUCT e;
@@ -538,7 +538,7 @@
 {
   HWND16 hwnd=LOWORD(lParam);
   HWND hDlg=GetParent(hwnd);
-  LPCHOOSEFONT16 lpcf=(LPCHOOSEFONT16)GetWindowLongA(hDlg, DWL_USER); 
+  LPCHOOSEFONT16 lpcf=(LPCHOOSEFONT16)GetWindowLongA(hDlg, DWL_USER);
   LOGFONT16 *lplf = MapSL( logfont );
   LOGFONTA lf32a;
   FONT_LogFont16To32A(lplf, &lf32a);
@@ -555,10 +555,10 @@
 {
    #define FSTYLES 4
    struct FONTSTYLE
-          { int italic; 
+          { int italic;
             int weight;
             char stname[20]; };
-   static struct FONTSTYLE fontstyles[FSTYLES]={ 
+   static struct FONTSTYLE fontstyles[FSTYLES]={
           { 0,FW_NORMAL,"Regular"},{0,FW_BOLD,"Bold"},
           { 1,FW_NORMAL,"Italic"}, {1,FW_BOLD,"Bold Italic"}};
    HFONT hf;
@@ -585,9 +585,9 @@
        if (j==CB_ERR) return 1;
        j=SendMessageA(hwnd, CB_SETITEMDATA, j,
                                  MAKELONG(fontstyles[i].weight,fontstyles[i].italic));
-       if (j==CB_ERR) return 1;                                 
+       if (j==CB_ERR) return 1;
      }
-   }  
+   }
   return 0;
 }
 
@@ -606,14 +606,14 @@
 	j=SendMessageA(hwnd, CB_FINDSTRINGEXACT, -1, (LPARAM)buffer);
 	if (j==CB_ERR)
 	{
-    	    j=SendMessageA(hwnd, CB_ADDSTRING, 0, (LPARAM)buffer);	
-    	    if (j!=CB_ERR) j = SendMessageA(hwnd, CB_SETITEMDATA, j, h); 
+    	    j=SendMessageA(hwnd, CB_ADDSTRING, 0, (LPARAM)buffer);
+    	    if (j!=CB_ERR) j = SendMessageA(hwnd, CB_SETITEMDATA, j, h);
     	    if (j==CB_ERR) return 1;
 	}
     }
     return 0;
-} 
- 
+}
+
 /*************************************************************************
  *              SetFontSizesToCombo3                           [internal]
  */
@@ -630,11 +630,11 @@
 /***********************************************************************
  *                 AddFontStyle                          [internal]
  */
-static INT AddFontStyle(const LOGFONTA *lplf, UINT nFontType, 
+static INT AddFontStyle(const LOGFONTA *lplf, UINT nFontType,
     LPCHOOSEFONTA lpcf, HWND hcmb2, HWND hcmb3, HWND hDlg)
 {
   int i;
-  
+
   TRACE("(nFontType=%d)\n",nFontType);
   TRACE("  %s h=%ld w=%ld e=%ld o=%ld wg=%ld i=%d u=%d s=%d"
 	       " ch=%d op=%d cp=%d q=%d pf=%xh\n",
@@ -659,7 +659,7 @@
   }
   return 1 ;
 
-}    
+}
 
 /***********************************************************************
  *                 FontStyleEnumProc                     (COMMDLG.18)
@@ -670,7 +670,7 @@
   HWND16 hcmb2=LOWORD(lParam);
   HWND16 hcmb3=HIWORD(lParam);
   HWND hDlg=GetParent(hcmb3);
-  LPCHOOSEFONT16 lpcf=(LPCHOOSEFONT16)GetWindowLongA(hDlg, DWL_USER); 
+  LPCHOOSEFONT16 lpcf=(LPCHOOSEFONT16)GetWindowLongA(hDlg, DWL_USER);
   LOGFONT16 *lplf = MapSL(logfont);
   LOGFONTA lf32a;
   FONT_LogFont16To32A(lplf, &lf32a);
@@ -681,7 +681,7 @@
 /***********************************************************************
  *                 FontStyleEnumProc32                     [internal]
  */
-static INT WINAPI FontStyleEnumProc( const LOGFONTA *lpFont, 
+static INT WINAPI FontStyleEnumProc( const LOGFONTA *lpFont,
           const TEXTMETRICA *metrics, DWORD dwFontType, LPARAM lParam )
 {
   LPCFn_ENUMSTRUCT s=(LPCFn_ENUMSTRUCT)lParam;
@@ -704,14 +704,14 @@
   LPLOGFONTA lpxx;
   HCURSOR hcursor=SetCursor(LoadCursorA(0,IDC_WAITA));
 
-  SetWindowLongA(hDlg, DWL_USER, lParam); 
+  SetWindowLongA(hDlg, DWL_USER, lParam);
   lpxx=lpcf->lpLogFont;
   TRACE("WM_INITDIALOG lParam=%08lX\n", lParam);
 
   if (lpcf->lStructSize != sizeof(CHOOSEFONTA))
   {
     ERR("structure size failure !!!\n");
-    EndDialog (hDlg, 0); 
+    EndDialog (hDlg, 0);
     return FALSE;
   }
   if (!hBitmapTT)
@@ -720,7 +720,7 @@
   /* This font will be deleted by WM_COMMAND */
   SendDlgItemMessageA(hDlg,stc6,WM_SETFONT,
      CreateFontA(0, 0, 1, 1, 400, 0, 0, 0, 0, 0, 0, 0, 0, NULL),FALSE);
-			 
+
   if (!(lpcf->Flags & CF_SHOWHELP) || !IsWindow(lpcf->hwndOwner))
     ShowWindow(GetDlgItem(hDlg,pshHelp),SW_HIDE);
   if (!(lpcf->Flags & CF_APPLY))
@@ -791,7 +791,7 @@
           if (l==SendDlgItemMessageA(hDlg, cmb2, CB_GETITEMDATA, i, 0))
             SendDlgItemMessageA(hDlg, cmb2, CB_SETCURSEL, i, 0);
         }
-      
+
         /* look for fitting font size in combobox3 */
         j=SendDlgItemMessageA(hDlg, cmb3, CB_GETCOUNT, 0, 0);
         for (i=0;i<j;i++)
@@ -806,7 +806,7 @@
       SendDlgItemMessageA(hDlg,cmb1,CB_SETCURSEL,0,0);
       SendMessageA(hDlg, WM_COMMAND, MAKEWPARAM(cmb1, CBN_SELCHANGE),
                        GetDlgItem(hDlg,cmb1));
-    }    
+    }
     if (lpcf->Flags & CF_USESTYLE && lpcf->lpszStyle)
     {
       j=SendDlgItemMessageA(hDlg,cmb2,CB_FINDSTRING,-1,(LONG)lpcf->lpszStyle);
@@ -821,13 +821,13 @@
   else
   {
     WARN("HDC failure !!!\n");
-    EndDialog (hDlg, 0); 
+    EndDialog (hDlg, 0);
     return FALSE;
   }
 
   if (!((lpcf->Flags & CF_PRINTERFONTS) && lpcf->hDC))
     ReleaseDC(hDlg,hdc);
-  SetCursor(hcursor);   
+  SetCursor(hcursor);
   return TRUE;
 }
 
@@ -858,11 +858,11 @@
   BITMAP bm;
   COLORREF cr, oldText=0, oldBk=0;
   RECT rect;
-#if 0  
+#if 0
   HDC hMemDC;
   int nFontType;
   HBITMAP hBitmap; /* for later TT usage */
-#endif  
+#endif
   LPDRAWITEMSTRUCT lpdi = (LPDRAWITEMSTRUCT)lParam;
 
   if (lpdi->itemID == (UINT)-1)  /* got no items */
@@ -891,7 +891,7 @@
    {
     case cmb1:	/* TRACE(commdlg,"WM_Drawitem cmb1\n"); */
 		SendMessageA(lpdi->hwndItem, CB_GETLBTEXT, lpdi->itemID,
-			       (LPARAM)buffer);	          
+			       (LPARAM)buffer);
 		GetObjectA( hBitmapTT, sizeof(bm), &bm );
 		TextOutA(lpdi->hDC, lpdi->rcItem.left + bm.bmWidth + 10,
                            lpdi->rcItem.top, buffer, strlen(buffer));
@@ -976,7 +976,7 @@
   long l;
   HDC hdc;
   LPLOGFONTA lpxx=lpcf->lpLogFont;
-  
+
   TRACE("WM_COMMAND wParam=%08lX lParam=%08lX\n", (LONG)wParam, lParam);
   switch (LOWORD(wParam))
   {
@@ -985,7 +985,7 @@
 		    hdc=((lpcf->Flags & CF_PRINTERFONTS) && lpcf->hDC) ? lpcf->hDC : GetDC(hDlg);
 		    if (hdc)
 		    {
-                      SendDlgItemMessageA(hDlg, cmb2, CB_RESETCONTENT16, 0, 0); 
+                      SendDlgItemMessageA(hDlg, cmb2, CB_RESETCONTENT16, 0, 0);
 		      SendDlgItemMessageA(hDlg, cmb3, CB_RESETCONTENT16, 0, 0);
 		      i=SendDlgItemMessageA(hDlg, cmb1, CB_GETCURSEL16, 0, 0);
 		      if (i!=CB_ERR)
@@ -1010,7 +1010,7 @@
  		    else
                     {
                       WARN("HDC failure !!!\n");
-                      EndDialog (hDlg, 0); 
+                      EndDialog (hDlg, 0);
                       return TRUE;
                     }
 	          }
@@ -1063,7 +1063,7 @@
 		    hFont=CreateFontIndirectA(lpxx);
 		    if (hFont)
 		    {
-		      HFONT oldFont=SendDlgItemMessageA(hDlg, stc6, 
+		      HFONT oldFont=SendDlgItemMessageA(hDlg, stc6,
 		          WM_GETFONT, 0, 0);
 		      SendDlgItemMessageA(hDlg,stc6,WM_SETFONT,hFont,TRUE);
 		      DeleteObject(oldFont);
@@ -1078,7 +1078,7 @@
 		   InvalidateRect( GetDlgItem(hDlg,stc6), NULL, 0 );
 		  }
 		  break;
-	
+
 	case psh15:i=RegisterWindowMessageA( HELPMSGSTRINGA );
 		  if (lpcf->hwndOwner)
 		    SendMessageA(lpcf->hwndOwner, i, 0, (LPARAM)GetWindowLongA(hDlg, DWL_USER));
@@ -1087,8 +1087,8 @@
 		  break;
 
 	case IDOK:if (  (!(lpcf->Flags & CF_LIMITSIZE))  ||
-                     ( (lpcf->Flags & CF_LIMITSIZE) && 
-                      (-lpxx->lfHeight >= lpcf->nSizeMin) && 
+                     ( (lpcf->Flags & CF_LIMITSIZE) &&
+                      (-lpxx->lfHeight >= lpcf->nSizeMin) &&
                       (-lpxx->lfHeight <= lpcf->nSizeMax)))
 	             EndDialog(hDlg, TRUE);
 	          else
@@ -1097,7 +1097,7 @@
 	           sprintf(buffer,"Select a font size between %d and %d points.",
                            lpcf->nSizeMin,lpcf->nSizeMax);
 	           MessageBoxA(hDlg, buffer, NULL, MB_OK);
-	          } 
+	          }
 		  return(TRUE);
 	case IDCANCEL:EndDialog(hDlg, FALSE);
 		  return(TRUE);
@@ -1123,10 +1123,10 @@
 {
   LPCHOOSEFONT16 lpcf;
   LPCHOOSEFONTA lpcf32a;
-  LRESULT res=0;  
+  LRESULT res=0;
   if (message!=WM_INITDIALOG)
   {
-   lpcf=(LPCHOOSEFONT16)GetWindowLongA(hDlg, DWL_USER);   
+   lpcf=(LPCHOOSEFONT16)GetWindowLongA(hDlg, DWL_USER);
    if (!lpcf)
       return FALSE;
    if (CFn_HookCallChk(lpcf))
@@ -1138,11 +1138,11 @@
   {
     lpcf=(LPCHOOSEFONT16)lParam;
     lpcf32a=(LPCHOOSEFONTA)lpcf->lpTemplateName;
-    if (!CFn_WMInitDialog(hDlg, wParam, lParam, lpcf32a)) 
+    if (!CFn_WMInitDialog(hDlg, wParam, lParam, lpcf32a))
     {
       TRACE("CFn_WMInitDialog returned FALSE\n");
       return FALSE;
-    }  
+    }
     if (CFn_HookCallChk(lpcf))
       return CallWindowProc16((WNDPROC16)lpcf->lpfnHook,hDlg,WM_INITDIALOG,wParam,lParam);
   }
@@ -1208,7 +1208,7 @@
   LRESULT res=FALSE;
   if (uMsg!=WM_INITDIALOG)
   {
-   lpcf=(LPCHOOSEFONTA)GetWindowLongA(hDlg, DWL_USER);   
+   lpcf=(LPCHOOSEFONTA)GetWindowLongA(hDlg, DWL_USER);
    if (!lpcf)
      return FALSE;
    if (CFn_HookCallChk32(lpcf))
@@ -1219,11 +1219,11 @@
   else
   {
     lpcf=(LPCHOOSEFONTA)lParam;
-    if (!CFn_WMInitDialog(hDlg, wParam, lParam, lpcf)) 
+    if (!CFn_WMInitDialog(hDlg, wParam, lParam, lpcf))
     {
       TRACE("CFn_WMInitDialog returned FALSE\n");
       return FALSE;
-    }  
+    }
     if (CFn_HookCallChk32(lpcf))
       return CallWindowProcA((WNDPROC)lpcf->lpfnHook,hDlg,WM_INITDIALOG,wParam,lParam);
   }
@@ -1259,7 +1259,7 @@
   LRESULT res=FALSE;
   if (uMsg!=WM_INITDIALOG)
   {
-   lpcf32w=(LPCHOOSEFONTW)GetWindowLongA(hDlg, DWL_USER);   
+   lpcf32w=(LPCHOOSEFONTW)GetWindowLongA(hDlg, DWL_USER);
    if (!lpcf32w)
      return FALSE;
    if (CFn_HookCallChk32((LPCHOOSEFONTA)lpcf32w))
@@ -1271,11 +1271,11 @@
   {
     lpcf32w=(LPCHOOSEFONTW)lParam;
     lpcf32a=(LPCHOOSEFONTA)lpcf32w->lpTemplateName;
-    if (!CFn_WMInitDialog(hDlg, wParam, lParam, lpcf32a)) 
+    if (!CFn_WMInitDialog(hDlg, wParam, lParam, lpcf32a))
     {
       TRACE("CFn_WMInitDialog returned FALSE\n");
       return FALSE;
-    }  
+    }
     if (CFn_HookCallChk32((LPCHOOSEFONTA)lpcf32w))
       return CallWindowProcW((WNDPROC)lpcf32w->lpfnHook,hDlg,WM_INITDIALOG,wParam,lParam);
   }
@@ -1292,7 +1292,7 @@
                         return CFn_WMCommand(hDlg, wParam, lParam, lpcf32a);
       case WM_DESTROY:
                         return CFn_WMDestroy(hDlg, wParam, lParam);
-      case WM_CHOOSEFONT_GETLOGFONT: 
+      case WM_CHOOSEFONT_GETLOGFONT:
                          TRACE("WM_CHOOSEFONT_GETLOGFONT lParam=%08lX\n",
 				      lParam);
 			 FIXME("current logfont back to caller\n");
diff --git a/dlls/commdlg/printdlg.c b/dlls/commdlg/printdlg.c
index e5b7968..3cc0472 100644
--- a/dlls/commdlg/printdlg.c
+++ b/dlls/commdlg/printdlg.c
@@ -43,9 +43,9 @@
 
 /* This PRINTDLGA internal structure stores
  * pointers to several throughout useful structures.
- * 
+ *
  */
-typedef struct  
+typedef struct
 {
   LPDEVMODEA        lpDevMode;
   struct {
@@ -62,7 +62,7 @@
   HWND              hwndUpDown;
 } PRINT_PTRA;
 
-typedef struct  
+typedef struct
 {
   LPDEVMODEW        lpDevMode;
   struct {
@@ -137,7 +137,7 @@
  *    PRINTDLG_GetDefaultPrinterName
  *
  * Returns the default printer name in buf.
- * Even under WinNT/2000 default printer is retrieved via GetProfileString - 
+ * Even under WinNT/2000 default printer is retrieved via GetProfileString -
  * these entries are mapped somewhere in the registry rather than win.ini.
  *
  * Returns TRUE on success else FALSE
@@ -219,7 +219,7 @@
     LPPRINTER_INFO_2A pi;
     EnumPrintersA(PRINTER_ENUM_LOCAL, NULL, 2, NULL, 0, &needed, &num);
     pi = HeapAlloc(GetProcessHeap(), 0, needed);
-    EnumPrintersA(PRINTER_ENUM_LOCAL, NULL, 2, (LPBYTE)pi, needed, &needed, 
+    EnumPrintersA(PRINTER_ENUM_LOCAL, NULL, 2, (LPBYTE)pi, needed, &needed,
 		  &num);
 
     for(i = 0; i < num; i++) {
@@ -251,7 +251,7 @@
     LPPRINTER_INFO_2W pi;
     EnumPrintersW(PRINTER_ENUM_LOCAL, NULL, 2, NULL, 0, &needed, &num);
     pi = HeapAlloc(GetProcessHeap(), 0, needed);
-    EnumPrintersW(PRINTER_ENUM_LOCAL, NULL, 2, (LPBYTE)pi, needed, &needed, 
+    EnumPrintersW(PRINTER_ENUM_LOCAL, NULL, 2, (LPBYTE)pi, needed, &needed,
 		  &num);
 
     for(i = 0; i < num; i++) {
@@ -285,7 +285,7 @@
  *
  *  (NB. when we handle unicode the offsets will be in wchars).
  */
-static BOOL PRINTDLG_CreateDevNames(HGLOBAL *hmem, char* DeviceDriverName, 
+static BOOL PRINTDLG_CreateDevNames(HGLOBAL *hmem, char* DeviceDriverName,
 				    char* DeviceName, char* OutputPort)
 {
     long size;
@@ -298,7 +298,7 @@
             + strlen(DeviceName) + 1
             + strlen(OutputPort) + 1
             + sizeof(DEVNAMES);
-            
+
     if(*hmem)
         *hmem = GlobalReAlloc(*hmem, size, GMEM_MOVEABLE);
     else
@@ -316,7 +316,7 @@
     pTempPtr += strlen(DeviceDriverName) + 1;
     strcpy(pTempPtr, DeviceName);
     lpDevNames->wDeviceOffset = pTempPtr - pDevNamesSpace;
-        
+
     pTempPtr += strlen(DeviceName) + 1;
     strcpy(pTempPtr, OutputPort);
     lpDevNames->wOutputOffset = pTempPtr - pDevNamesSpace;
@@ -327,7 +327,7 @@
     return TRUE;
 }
 
-static BOOL PRINTDLG_CreateDevNamesW(HGLOBAL *hmem, LPCWSTR DeviceDriverName, 
+static BOOL PRINTDLG_CreateDevNamesW(HGLOBAL *hmem, LPCWSTR DeviceDriverName,
 				    LPCWSTR DeviceName, LPCWSTR OutputPort)
 {
     long size;
@@ -341,7 +341,7 @@
             + sizeof(WCHAR)*lstrlenW(DeviceName) + 2
             + sizeof(WCHAR)*lstrlenW(OutputPort) + 2
             + sizeof(DEVNAMES);
-            
+
     if(*hmem)
         *hmem = GlobalReAlloc(*hmem, size, GMEM_MOVEABLE);
     else
@@ -359,7 +359,7 @@
     pTempPtr += lstrlenW(DeviceDriverName) + 1;
     lstrcpyW(pTempPtr, DeviceName);
     lpDevNames->wDeviceOffset = pTempPtr - pDevNamesSpace;
-        
+
     pTempPtr += lstrlenW(DeviceName) + 1;
     lstrcpyW(pTempPtr, OutputPort);
     lpDevNames->wOutputOffset = pTempPtr - pDevNamesSpace;
@@ -372,7 +372,7 @@
 }
 
 
-static BOOL PRINTDLG_CreateDevNames16(HGLOBAL16 *hmem, char* DeviceDriverName, 
+static BOOL PRINTDLG_CreateDevNames16(HGLOBAL16 *hmem, char* DeviceDriverName,
 				      char* DeviceName, char* OutputPort)
 {
     long size;
@@ -385,7 +385,7 @@
             + strlen(DeviceName) + 1
             + strlen(OutputPort) + 1
             + sizeof(DEVNAMES);
-            
+
     if(*hmem)
         *hmem = GlobalReAlloc16(*hmem, size, GMEM_MOVEABLE);
     else
@@ -403,7 +403,7 @@
     pTempPtr += strlen(DeviceDriverName) + 1;
     strcpy(pTempPtr, DeviceName);
     lpDevNames->wDeviceOffset = pTempPtr - pDevNamesSpace;
-        
+
     pTempPtr += strlen(DeviceName) + 1;
     strcpy(pTempPtr, OutputPort);
     lpDevNames->wOutputOffset = pTempPtr - pDevNamesSpace;
@@ -420,12 +420,12 @@
  *
  *
  *   updates the PrintDlg structure for returnvalues.
- *      
+ *
  * RETURNS
  *   FALSE if user is not allowed to close (i.e. wrong nTo or nFrom values)
  *   TRUE  if succesful.
  */
-static BOOL PRINTDLG_UpdatePrintDlgA(HWND hDlg, 
+static BOOL PRINTDLG_UpdatePrintDlgA(HWND hDlg,
 				    PRINT_PTRA* PrintStructures)
 {
     LPPRINTDLGA       lppd = PrintStructures->dlg.lpPrintDlg;
@@ -452,10 +452,10 @@
 		nToPage < lppd->nMinPage || nToPage > lppd->nMaxPage) {
 	        char resourcestr[256];
 		char resultstr[256];
-		LoadStringA(COMDLG32_hInstance, PD32_INVALID_PAGE_RANGE, 
+		LoadStringA(COMDLG32_hInstance, PD32_INVALID_PAGE_RANGE,
 			    resourcestr, 255);
 		sprintf(resultstr,resourcestr, lppd->nMinPage, lppd->nMaxPage);
-		LoadStringA(COMDLG32_hInstance, PD32_PRINT_TITLE, 
+		LoadStringA(COMDLG32_hInstance, PD32_PRINT_TITLE,
 			    resourcestr, 255);
 		MessageBoxA(hDlg, resultstr, resourcestr,
 			    MB_OK | MB_ICONWARNING);
@@ -484,7 +484,7 @@
 	   * otherwise no collate & multiple copies !
 	   */
 	    if (lpdm->dmFields & DM_COLLATE)
-	        lpdm->dmCollate = 
+	        lpdm->dmCollate =
 		  (IsDlgButtonChecked(hDlg, chx2) == BST_CHECKED);
 	    if (lpdm->dmFields & DM_COPIES)
 	        lpdm->dmCopies = GetDlgItemInt(hDlg, edt3, NULL, FALSE);
@@ -499,7 +499,7 @@
     return TRUE;
 }
 
-static BOOL PRINTDLG_UpdatePrintDlgW(HWND hDlg, 
+static BOOL PRINTDLG_UpdatePrintDlgW(HWND hDlg,
 				    PRINT_PTRW* PrintStructures)
 {
     LPPRINTDLGW       lppd = PrintStructures->dlg.lpPrintDlg;
@@ -526,10 +526,10 @@
 		nToPage < lppd->nMinPage || nToPage > lppd->nMaxPage) {
 	        char resourcestr[256];
 		char resultstr[256];
-		LoadStringA(COMDLG32_hInstance, PD32_INVALID_PAGE_RANGE, 
+		LoadStringA(COMDLG32_hInstance, PD32_INVALID_PAGE_RANGE,
 			    resourcestr, 255);
 		sprintf(resultstr,resourcestr, lppd->nMinPage, lppd->nMaxPage);
-		LoadStringA(COMDLG32_hInstance, PD32_PRINT_TITLE, 
+		LoadStringA(COMDLG32_hInstance, PD32_PRINT_TITLE,
 			    resourcestr, 255);
 		MessageBoxA(hDlg, resultstr, resourcestr,
 			    MB_OK | MB_ICONWARNING);
@@ -559,7 +559,7 @@
 	   * otherwise no collate & multiple copies !
 	   */
 	    if (lpdm->dmFields & DM_COLLATE)
-	        lpdm->dmCollate = 
+	        lpdm->dmCollate =
 		  (IsDlgButtonChecked(hDlg, chx2) == BST_CHECKED);
 	    if (lpdm->dmFields & DM_COPIES)
 	        lpdm->dmCopies = GetDlgItemInt(hDlg, edt3, NULL, FALSE);
@@ -585,7 +585,7 @@
     char	*Names = NULL;
     POINT	*points = NULL;
     BOOL	retval = FALSE;
-    
+
     dn = GlobalLock(pdlga->hDevNames);
     dm = GlobalLock(pdlga->hDevMode);
     devname	= ((char*)dn)+dn->wDeviceOffset;
@@ -601,7 +601,7 @@
 	ERR("Hmm ? DeviceCapabilities() DC_PAPERNAMES failed, ret -1 !\n");
 	goto out;
     }
-	    
+
     Names = (char*)HeapAlloc(GetProcessHeap(),0,NrOfEntries*64);
     if (NrOfEntries != (ret=DeviceCapabilitiesA(devname,portname,DC_PAPERNAMES,Names,dm))) {
 	FIXME("Number of returned vals %d is not %d\n",NrOfEntries,ret);
@@ -643,7 +643,7 @@
     WCHAR	*Names = NULL;
     POINT	*points = NULL;
     BOOL	retval = FALSE;
-    
+
     dn = GlobalLock(pdlga->hDevNames);
     dm = GlobalLock(pdlga->hDevMode);
     devname	= ((WCHAR*)dn)+dn->wDeviceOffset;
@@ -659,7 +659,7 @@
 	ERR("Hmm ? DeviceCapabilities() DC_PAPERNAMES failed, ret -1 !\n");
 	goto out;
     }
-	    
+
     Names = (WCHAR*)HeapAlloc(GetProcessHeap(),0,sizeof(WCHAR)*NrOfEntries*64);
     if (NrOfEntries != (ret=DeviceCapabilitiesW(devname,portname,DC_PAPERNAMES,Names,dm))) {
 	FIXME("Number of returned vals %d is not %d\n",NrOfEntries,ret);
@@ -700,7 +700,7 @@
  */
 static BOOL PRINTDLG_SetUpPaperComboBoxA(HWND hDlg,
 					int   nIDComboBox,
-					char* PrinterName, 
+					char* PrinterName,
 					char* PortName,
 					LPDEVMODEA dm)
 {
@@ -713,9 +713,9 @@
     int     NamesSize;
     int     fwCapability_Names;
     int     fwCapability_Words;
-    
+
     TRACE(" Printer: %s, Port: %s, ComboID: %d\n",PrinterName,PortName,nIDComboBox);
-    
+
     /* query the dialog box for the current selected value */
     Sel = SendDlgItemMessageA(hDlg, nIDComboBox, CB_GETCURSEL, 0, 0);
     if(Sel != CB_ERR) {
@@ -755,8 +755,8 @@
          fwCapability_Names = DC_BINNAMES;
          fwCapability_Words = DC_BINS;
     }
-    
-    /* for some printer drivers, DeviceCapabilities calls a VXD to obtain the 
+
+    /* for some printer drivers, DeviceCapabilities calls a VXD to obtain the
      * paper settings. As Wine doesn't allow VXDs, this results in a crash.
      */
     WARN(" if your printer driver uses VXDs, expect a crash now!\n");
@@ -782,12 +782,12 @@
 
     /* reset any current content in the combobox */
     SendDlgItemMessageA(hDlg, nIDComboBox, CB_RESETCONTENT, 0, 0);
-    
+
     /* store new content */
     for (i = 0; i < NrOfEntries; i++) {
         DWORD pos = SendDlgItemMessageA(hDlg, nIDComboBox, CB_ADDSTRING, 0,
 					(LPARAM)(&Names[i*NamesSize]) );
-	SendDlgItemMessageA(hDlg, nIDComboBox, CB_SETITEMDATA, pos, 
+	SendDlgItemMessageA(hDlg, nIDComboBox, CB_SETITEMDATA, pos,
 			    Words[i]);
     }
 
@@ -810,7 +810,7 @@
 
 static BOOL PRINTDLG_SetUpPaperComboBoxW(HWND hDlg,
 					int   nIDComboBox,
-					WCHAR* PrinterName, 
+					WCHAR* PrinterName,
 					WCHAR* PortName,
 					LPDEVMODEW dm)
 {
@@ -823,9 +823,9 @@
     int     NamesSize;
     int     fwCapability_Names;
     int     fwCapability_Words;
-    
+
     TRACE(" Printer: %s, Port: %s, ComboID: %d\n",debugstr_w(PrinterName),debugstr_w(PortName),nIDComboBox);
-    
+
     /* query the dialog box for the current selected value */
     Sel = SendDlgItemMessageA(hDlg, nIDComboBox, CB_GETCURSEL, 0, 0);
     if(Sel != CB_ERR) {
@@ -865,8 +865,8 @@
          fwCapability_Names = DC_BINNAMES;
          fwCapability_Words = DC_BINS;
     }
-    
-    /* for some printer drivers, DeviceCapabilities calls a VXD to obtain the 
+
+    /* for some printer drivers, DeviceCapabilities calls a VXD to obtain the
      * paper settings. As Wine doesn't allow VXDs, this results in a crash.
      */
     WARN(" if your printer driver uses VXDs, expect a crash now!\n");
@@ -892,12 +892,12 @@
 
     /* reset any current content in the combobox */
     SendDlgItemMessageA(hDlg, nIDComboBox, CB_RESETCONTENT, 0, 0);
-    
+
     /* store new content */
     for (i = 0; i < NrOfEntries; i++) {
         DWORD pos = SendDlgItemMessageW(hDlg, nIDComboBox, CB_ADDSTRING, 0,
 					(LPARAM)(&Names[i*NamesSize]) );
-	SendDlgItemMessageW(hDlg, nIDComboBox, CB_SETITEMDATA, pos, 
+	SendDlgItemMessageW(hDlg, nIDComboBox, CB_SETITEMDATA, pos,
 			    Words[i]);
     }
 
@@ -934,18 +934,18 @@
     /* add all status messages */
     for (i = 0; i < 25; i++) {
         if (pi->Status & (1<<i)) {
-	    LoadStringA(COMDLG32_hInstance, PD32_PRINTER_STATUS_PAUSED+i, 
+	    LoadStringA(COMDLG32_hInstance, PD32_PRINTER_STATUS_PAUSED+i,
 			ResourceString, 255);
 	    strcat(StatusMsg,ResourceString);
         }
     }
     /* append "ready" */
-    /* FIXME: status==ready must only be appended if really so. 
+    /* FIXME: status==ready must only be appended if really so.
               but how to detect? */
-    LoadStringA(COMDLG32_hInstance, PD32_PRINTER_STATUS_READY, 
+    LoadStringA(COMDLG32_hInstance, PD32_PRINTER_STATUS_READY,
 		ResourceString, 255);
     strcat(StatusMsg,ResourceString);
-  
+
     SendDlgItemMessageA(hDlg, stc12, WM_SETTEXT, 0, (LPARAM)StatusMsg);
 
     /* set all other printer info texts */
@@ -971,18 +971,18 @@
     /* add all status messages */
     for (i = 0; i < 25; i++) {
         if (pi->Status & (1<<i)) {
-	    LoadStringW(COMDLG32_hInstance, PD32_PRINTER_STATUS_PAUSED+i, 
+	    LoadStringW(COMDLG32_hInstance, PD32_PRINTER_STATUS_PAUSED+i,
 			ResourceString, 255);
 	    lstrcatW(StatusMsg,ResourceString);
         }
     }
     /* append "ready" */
-    /* FIXME: status==ready must only be appended if really so. 
+    /* FIXME: status==ready must only be appended if really so.
               but how to detect? */
-    LoadStringW(COMDLG32_hInstance, PD32_PRINTER_STATUS_READY, 
+    LoadStringW(COMDLG32_hInstance, PD32_PRINTER_STATUS_READY,
 		ResourceString, 255);
     lstrcatW(StatusMsg,ResourceString);
-  
+
     SendDlgItemMessageW(hDlg, stc12, WM_SETTEXT, 0, (LPARAM)StatusMsg);
 
     /* set all other printer info texts */
@@ -1083,22 +1083,22 @@
 	{
 	    char        resourcestr[64];
 	    char        result[64];
-	    LoadStringA(COMDLG32_hInstance, PD32_PRINT_ALL_X_PAGES, 
+	    LoadStringA(COMDLG32_hInstance, PD32_PRINT_ALL_X_PAGES,
 			resourcestr, 49);
 	    sprintf(result,resourcestr,lppd->nMaxPage - lppd->nMinPage + 1);
 	    SendDlgItemMessageA(hDlg, rad1, WM_SETTEXT, 0, (LPARAM) result);
 	}
-        
-	/* Collate pages 
+
+	/* Collate pages
 	 *
 	 * FIXME: The ico3 is not displayed for some reason. I don't know why.
 	 */
 	if (lppd->Flags & PD_COLLATE) {
-	    SendDlgItemMessageA(hDlg, ico3, STM_SETIMAGE, (WPARAM) IMAGE_ICON, 
+	    SendDlgItemMessageA(hDlg, ico3, STM_SETIMAGE, (WPARAM) IMAGE_ICON,
 				(LPARAM)PrintStructures->hCollateIcon);
 	    CheckDlgButton(hDlg, chx2, 1);
 	} else {
-	    SendDlgItemMessageA(hDlg, ico3, STM_SETIMAGE, (WPARAM) IMAGE_ICON, 
+	    SendDlgItemMessageA(hDlg, ico3, STM_SETIMAGE, (WPARAM) IMAGE_ICON,
 				(LPARAM)PrintStructures->hNoCollateIcon);
 	    CheckDlgButton(hDlg, chx2, 0);
 	}
@@ -1106,8 +1106,8 @@
 	if (lppd->Flags & PD_USEDEVMODECOPIESANDCOLLATE) {
 	  /* if printer doesn't support it: no Collate */
 	    if (!(lpdm->dmFields & DM_COLLATE)) {
-	        EnableWindow(GetDlgItem(hDlg, chx2), FALSE);    
-		EnableWindow(GetDlgItem(hDlg, ico3), FALSE);    
+	        EnableWindow(GetDlgItem(hDlg, chx2), FALSE);
+		EnableWindow(GetDlgItem(hDlg, ico3), FALSE);
 	    }
 	}
 
@@ -1126,15 +1126,15 @@
 	if (lppd->Flags & PD_USEDEVMODECOPIESANDCOLLATE) {
 	  /* if printer doesn't support it: no nCopies */
 	    if (!(lpdm->dmFields & DM_COPIES)) {
-	        EnableWindow(GetDlgItem(hDlg, edt3), FALSE);    
-		EnableWindow(GetDlgItem(hDlg, stc5), FALSE);    
+	        EnableWindow(GetDlgItem(hDlg, edt3), FALSE);
+		EnableWindow(GetDlgItem(hDlg, stc5), FALSE);
 	    }
 	}
 
 	/* print to file */
 	CheckDlgButton(hDlg, chx1, (lppd->Flags & PD_PRINTTOFILE) ? 1 : 0);
 	if (lppd->Flags & PD_DISABLEPRINTTOFILE)
-            EnableWindow(GetDlgItem(hDlg, chx1), FALSE);    
+            EnableWindow(GetDlgItem(hDlg, chx1), FALSE);
 	if (lppd->Flags & PD_HIDEPRINTTOFILE)
             ShowWindow(GetDlgItem(hDlg, chx1), SW_HIDE);
 
@@ -1153,13 +1153,13 @@
       SendDlgItemMessageA(hDlg, ico1, STM_SETIMAGE, (WPARAM) IMAGE_ICON,
                           (LPARAM)(bPortrait ? PrintStructures->hPortraitIcon :
                                    PrintStructures->hLandscapeIcon));
-      
+
     }
 
     /* help button */
     if ((lppd->Flags & PD_SHOWHELP)==0) {
         /* hide if PD_SHOWHELP not specified */
-        ShowWindow(GetDlgItem(hDlg, pshHelp), SW_HIDE);         
+        ShowWindow(GetDlgItem(hDlg, pshHelp), SW_HIDE);
     }
     return TRUE;
 }
@@ -1246,22 +1246,22 @@
 	    /* ansi is ok */
 	    char        resourcestr[64];
 	    char        result[64];
-	    LoadStringA(COMDLG32_hInstance, PD32_PRINT_ALL_X_PAGES, 
+	    LoadStringA(COMDLG32_hInstance, PD32_PRINT_ALL_X_PAGES,
 			resourcestr, 49);
 	    sprintf(result,resourcestr,lppd->nMaxPage - lppd->nMinPage + 1);
 	    SendDlgItemMessageA(hDlg, rad1, WM_SETTEXT, 0, (LPARAM) result);
 	}
-        
-	/* Collate pages 
+
+	/* Collate pages
 	 *
 	 * FIXME: The ico3 is not displayed for some reason. I don't know why.
 	 */
 	if (lppd->Flags & PD_COLLATE) {
-	    SendDlgItemMessageA(hDlg, ico3, STM_SETIMAGE, (WPARAM) IMAGE_ICON, 
+	    SendDlgItemMessageA(hDlg, ico3, STM_SETIMAGE, (WPARAM) IMAGE_ICON,
 				(LPARAM)PrintStructures->hCollateIcon);
 	    CheckDlgButton(hDlg, chx2, 1);
 	} else {
-	    SendDlgItemMessageA(hDlg, ico3, STM_SETIMAGE, (WPARAM) IMAGE_ICON, 
+	    SendDlgItemMessageA(hDlg, ico3, STM_SETIMAGE, (WPARAM) IMAGE_ICON,
 				(LPARAM)PrintStructures->hNoCollateIcon);
 	    CheckDlgButton(hDlg, chx2, 0);
 	}
@@ -1269,8 +1269,8 @@
 	if (lppd->Flags & PD_USEDEVMODECOPIESANDCOLLATE) {
 	  /* if printer doesn't support it: no Collate */
 	    if (!(lpdm->dmFields & DM_COLLATE)) {
-	        EnableWindow(GetDlgItem(hDlg, chx2), FALSE);    
-		EnableWindow(GetDlgItem(hDlg, ico3), FALSE);    
+	        EnableWindow(GetDlgItem(hDlg, chx2), FALSE);
+		EnableWindow(GetDlgItem(hDlg, ico3), FALSE);
 	    }
 	}
 
@@ -1289,15 +1289,15 @@
 	if (lppd->Flags & PD_USEDEVMODECOPIESANDCOLLATE) {
 	  /* if printer doesn't support it: no nCopies */
 	    if (!(lpdm->dmFields & DM_COPIES)) {
-	        EnableWindow(GetDlgItem(hDlg, edt3), FALSE);    
-		EnableWindow(GetDlgItem(hDlg, stc5), FALSE);    
+	        EnableWindow(GetDlgItem(hDlg, edt3), FALSE);
+		EnableWindow(GetDlgItem(hDlg, stc5), FALSE);
 	    }
 	}
 
 	/* print to file */
 	CheckDlgButton(hDlg, chx1, (lppd->Flags & PD_PRINTTOFILE) ? 1 : 0);
 	if (lppd->Flags & PD_DISABLEPRINTTOFILE)
-            EnableWindow(GetDlgItem(hDlg, chx1), FALSE);    
+            EnableWindow(GetDlgItem(hDlg, chx1), FALSE);
 	if (lppd->Flags & PD_HIDEPRINTTOFILE)
             ShowWindow(GetDlgItem(hDlg, chx1), SW_HIDE);
 
@@ -1316,13 +1316,13 @@
       SendDlgItemMessageA(hDlg, ico1, STM_SETIMAGE, (WPARAM) IMAGE_ICON,
                           (LPARAM)(bPortrait ? PrintStructures->hPortraitIcon :
                                    PrintStructures->hLandscapeIcon));
-      
+
     }
 
     /* help button */
     if ((lppd->Flags & PD_SHOWHELP)==0) {
         /* hide if PD_SHOWHELP not specified */
-        ShowWindow(GetDlgItem(hDlg, pshHelp), SW_HIDE);         
+        ShowWindow(GetDlgItem(hDlg, pshHelp), SW_HIDE);
     }
     return TRUE;
 }
@@ -1344,7 +1344,7 @@
        size and we don't want them rescaled */
     PrintStructures->hCollateIcon =
       LoadImageA(COMDLG32_hInstance, "PD32_COLLATE", IMAGE_ICON, 0, 0, 0);
-    PrintStructures->hNoCollateIcon = 
+    PrintStructures->hNoCollateIcon =
       LoadImageA(COMDLG32_hInstance, "PD32_NOCOLLATE", IMAGE_ICON, 0, 0, 0);
 
     /* These can be done with LoadIcon */
@@ -1367,7 +1367,7 @@
      * must be registered and the Help button must be shown.
      */
     if (lppd->Flags & PD_SHOWHELP) {
-        if((PrintStructures->HelpMessageID = 
+        if((PrintStructures->HelpMessageID =
 	    RegisterWindowMessageA(HELPMSGSTRINGA)) == 0) {
 	    COMDLG32_SetCommDlgExtendedError(CDERR_REGISTERMSGFAIL);
 	    return FALSE;
@@ -1390,8 +1390,8 @@
      */
     if (lppd->nMaxPage < lppd->nMinPage)
     	lppd->nMaxPage = lppd->nMinPage;
-    if (lppd->nMinPage == lppd->nMaxPage) 
-    	lppd->Flags |= PD_NOPAGENUMS;        
+    if (lppd->nMinPage == lppd->nMaxPage)
+    	lppd->Flags |= PD_NOPAGENUMS;
     if (lppd->nToPage < lppd->nMinPage)
         lppd->nToPage = lppd->nMinPage;
     if (lppd->nToPage > lppd->nMaxPage)
@@ -1403,7 +1403,7 @@
 
     /* if we have the combo box, fill it */
     if (GetDlgItem(hDlg,comboID)) {
-	/* Fill Combobox 
+	/* Fill Combobox
 	 */
 	pdn = GlobalLock(lppd->hDevNames);
 	pdm = GlobalLock(lppd->hDevMode);
@@ -1447,7 +1447,7 @@
        size and we don't want them rescaled */
     PrintStructures->hCollateIcon =
       LoadImageA(COMDLG32_hInstance, "PD32_COLLATE", IMAGE_ICON, 0, 0, 0);
-    PrintStructures->hNoCollateIcon = 
+    PrintStructures->hNoCollateIcon =
       LoadImageA(COMDLG32_hInstance, "PD32_NOCOLLATE", IMAGE_ICON, 0, 0, 0);
 
     /* These can be done with LoadIcon */
@@ -1470,7 +1470,7 @@
      * must be registered and the Help button must be shown.
      */
     if (lppd->Flags & PD_SHOWHELP) {
-        if((PrintStructures->HelpMessageID = 
+        if((PrintStructures->HelpMessageID =
 	    RegisterWindowMessageA(HELPMSGSTRINGA)) == 0) {
 	    COMDLG32_SetCommDlgExtendedError(CDERR_REGISTERMSGFAIL);
 	    return FALSE;
@@ -1493,8 +1493,8 @@
      */
     if (lppd->nMaxPage < lppd->nMinPage)
     	lppd->nMaxPage = lppd->nMinPage;
-    if (lppd->nMinPage == lppd->nMaxPage) 
-    	lppd->Flags |= PD_NOPAGENUMS;        
+    if (lppd->nMinPage == lppd->nMaxPage)
+    	lppd->Flags |= PD_NOPAGENUMS;
     if (lppd->nToPage < lppd->nMinPage)
         lppd->nToPage = lppd->nMinPage;
     if (lppd->nToPage > lppd->nMaxPage)
@@ -1506,7 +1506,7 @@
 
     /* if we have the combo box, fill it */
     if (GetDlgItem(hDlg,comboID)) {
-	/* Fill Combobox 
+	/* Fill Combobox
 	 */
 	pdn = GlobalLock(lppd->hDevNames);
 	pdm = GlobalLock(lppd->hDevMode);
@@ -1553,7 +1553,7 @@
     /* load Collate ICONs */
     PrintStructures->hCollateIcon =
       LoadIconA(COMDLG32_hInstance, "PD32_COLLATE");
-    PrintStructures->hNoCollateIcon = 
+    PrintStructures->hNoCollateIcon =
       LoadIconA(COMDLG32_hInstance, "PD32_NOCOLLATE");
     if(PrintStructures->hCollateIcon == 0 ||
        PrintStructures->hNoCollateIcon == 0) {
@@ -1570,7 +1570,7 @@
      * must be registered and the Help button must be shown.
      */
     if (lppd->Flags & PD_SHOWHELP) {
-        if((PrintStructures->HelpMessageID = 
+        if((PrintStructures->HelpMessageID =
 	    RegisterWindowMessageA(HELPMSGSTRINGA)) == 0) {
 	    COMDLG32_SetCommDlgExtendedError(CDERR_REGISTERMSGFAIL);
 	    return FALSE;
@@ -1596,7 +1596,7 @@
 		default			: sprintf(buf,"%ddpi",pdm->dmPrintQuality);break;
 		}
 	        GlobalUnlock16(lppd->hDevMode);
-	    } else 
+	    } else
 		strcpy(buf,"Default");
 	    SendDlgItemMessageA(hDlg,cmb1,CB_ADDSTRING,0,(LPARAM)buf);
 	    SendDlgItemMessageA(hDlg,cmb1,CB_SETCURSEL,0,0);
@@ -1610,8 +1610,8 @@
      */
     if (lppd->nMaxPage < lppd->nMinPage)
     	lppd->nMaxPage = lppd->nMinPage;
-    if (lppd->nMinPage == lppd->nMaxPage) 
-    	lppd->Flags |= PD_NOPAGENUMS;        
+    if (lppd->nMinPage == lppd->nMaxPage)
+    	lppd->Flags |= PD_NOPAGENUMS;
     if (lppd->nToPage < lppd->nMinPage)
         lppd->nToPage = lppd->nMinPage;
     if (lppd->nToPage > lppd->nMaxPage)
@@ -1623,7 +1623,7 @@
 
     /* If the printer combo box is in the dialog, fill it */
     if (GetDlgItem(hDlg,comboID)) {
-	/* Fill Combobox 
+	/* Fill Combobox
 	 */
 	pdn = GlobalLock16(lppd->hDevNames);
 	pdm = GlobalLock16(lppd->hDevMode);
@@ -1657,7 +1657,7 @@
 /***********************************************************************
  *                              PRINTDLG_WMCommand               [internal]
  */
-static LRESULT PRINTDLG_WMCommandA(HWND hDlg, WPARAM wParam, 
+static LRESULT PRINTDLG_WMCommandA(HWND hDlg, WPARAM wParam,
 			LPARAM lParam, PRINT_PTRA* PrintStructures)
 {
     LPPRINTDLGA lppd = PrintStructures->dlg.lpPrintDlg;
@@ -1681,18 +1681,18 @@
 
      case pshHelp:
         TRACE(" HELP button was hit\n");
-        SendMessageA(lppd->hwndOwner, PrintStructures->HelpMessageID, 
+        SendMessageA(lppd->hwndOwner, PrintStructures->HelpMessageID,
         			(WPARAM) hDlg, (LPARAM) lppd);
         break;
 
      case chx2:                         /* collate pages checkbox */
         if (IsDlgButtonChecked(hDlg, chx2) == BST_CHECKED)
-            SendDlgItemMessageA(hDlg, ico3, STM_SETIMAGE, (WPARAM) IMAGE_ICON, 
+            SendDlgItemMessageA(hDlg, ico3, STM_SETIMAGE, (WPARAM) IMAGE_ICON,
                                     (LPARAM)PrintStructures->hCollateIcon);
         else
-            SendDlgItemMessageA(hDlg, ico3, STM_SETIMAGE, (WPARAM) IMAGE_ICON, 
+            SendDlgItemMessageA(hDlg, ico3, STM_SETIMAGE, (WPARAM) IMAGE_ICON,
                                     (LPARAM)PrintStructures->hNoCollateIcon);
-        break;        
+        break;
      case edt1:                         /* from page nr editbox */
      case edt2:                         /* to page nr editbox */
         if (HIWORD(wParam)==EN_CHANGE) {
@@ -1718,7 +1718,7 @@
      case psh1:                       /* Print Setup */
 	{
 	    PRINTDLG16	pdlg;
-	    
+
 	    if (!PrintStructures->dlg.lpPrintDlg16) {
 		FIXME("The 32bit print dialog does not have this button!?\n");
 		break;
@@ -1741,7 +1741,7 @@
 	     FIXME(" Call to OpenPrinter did not succeed!\n");
 	     break;
 	 }
-	 DocumentPropertiesA(hDlg, hPrinter, PrinterName, 
+	 DocumentPropertiesA(hDlg, hPrinter, PrinterName,
 			     PrintStructures->lpDevMode,
 			     PrintStructures->lpDevMode,
 			     DM_IN_BUFFER | DM_OUT_BUFFER | DM_IN_PROMPT);
@@ -1757,7 +1757,7 @@
                           (LPARAM)(PrintStructures->hPortraitIcon));
         }
         break;
-            
+
     case rad2: /* Paperorientation */
         if (lppd->Flags & PD_PRINTSETUP)
         {
@@ -1766,7 +1766,7 @@
                           (LPARAM)(PrintStructures->hLandscapeIcon));
         }
         break;
-            
+
     case cmb1: /* Printer Combobox in PRINT SETUP, quality combobox in PRINT */
 	 if (PrinterComboID != wParam) {
 	     FIXME("No handling for print quality combo box yet.\n");
@@ -1799,7 +1799,7 @@
 							  CB_GETITEMDATA, Sel,
 							  0);
       }
-      break; 
+      break;
     }
     if(lppd->Flags & PD_PRINTSETUP) {
         switch (LOWORD(wParam)) {
@@ -1830,9 +1830,9 @@
 	}
     }
     return FALSE;
-}    
+}
 
-static LRESULT PRINTDLG_WMCommandW(HWND hDlg, WPARAM wParam, 
+static LRESULT PRINTDLG_WMCommandW(HWND hDlg, WPARAM wParam,
 			LPARAM lParam, PRINT_PTRW* PrintStructures)
 {
     LPPRINTDLGW lppd = PrintStructures->dlg.lpPrintDlg;
@@ -1856,18 +1856,18 @@
 
      case pshHelp:
         TRACE(" HELP button was hit\n");
-        SendMessageW(lppd->hwndOwner, PrintStructures->HelpMessageID, 
+        SendMessageW(lppd->hwndOwner, PrintStructures->HelpMessageID,
         			(WPARAM) hDlg, (LPARAM) lppd);
         break;
 
      case chx2:                         /* collate pages checkbox */
         if (IsDlgButtonChecked(hDlg, chx2) == BST_CHECKED)
-            SendDlgItemMessageA(hDlg, ico3, STM_SETIMAGE, (WPARAM) IMAGE_ICON, 
+            SendDlgItemMessageA(hDlg, ico3, STM_SETIMAGE, (WPARAM) IMAGE_ICON,
                                     (LPARAM)PrintStructures->hCollateIcon);
         else
-            SendDlgItemMessageA(hDlg, ico3, STM_SETIMAGE, (WPARAM) IMAGE_ICON, 
+            SendDlgItemMessageA(hDlg, ico3, STM_SETIMAGE, (WPARAM) IMAGE_ICON,
                                     (LPARAM)PrintStructures->hNoCollateIcon);
-        break;        
+        break;
      case edt1:                         /* from page nr editbox */
      case edt2:                         /* to page nr editbox */
         if (HIWORD(wParam)==EN_CHANGE) {
@@ -1905,7 +1905,7 @@
 	     FIXME(" Call to OpenPrinter did not succeed!\n");
 	     break;
 	 }
-	 DocumentPropertiesW(hDlg, hPrinter, PrinterName, 
+	 DocumentPropertiesW(hDlg, hPrinter, PrinterName,
 			     PrintStructures->lpDevMode,
 			     PrintStructures->lpDevMode,
 			     DM_IN_BUFFER | DM_OUT_BUFFER | DM_IN_PROMPT);
@@ -1921,7 +1921,7 @@
                           (LPARAM)(PrintStructures->hPortraitIcon));
         }
         break;
-            
+
     case rad2: /* Paperorientation */
         if (lppd->Flags & PD_PRINTSETUP)
         {
@@ -1930,7 +1930,7 @@
                           (LPARAM)(PrintStructures->hLandscapeIcon));
         }
         break;
-            
+
     case cmb1: /* Printer Combobox in PRINT SETUP, quality combobox in PRINT */
 	 if (PrinterComboID != wParam) {
 	     FIXME("No handling for print quality combo box yet.\n");
@@ -1963,7 +1963,7 @@
 							  CB_GETITEMDATA, Sel,
 							  0);
       }
-      break; 
+      break;
     }
     if(lppd->Flags & PD_PRINTSETUP) {
         switch (LOWORD(wParam)) {
@@ -1994,7 +1994,7 @@
 	}
     }
     return FALSE;
-}    
+}
 
 /***********************************************************************
  *           PrintDlgProcA			[internal]
@@ -2006,21 +2006,21 @@
     LRESULT res=FALSE;
 
     if (uMsg!=WM_INITDIALOG) {
-        PrintStructures = (PRINT_PTRA*) GetWindowLongA(hDlg, DWL_USER);   
+        PrintStructures = (PRINT_PTRA*) GetWindowLongA(hDlg, DWL_USER);
 	if (!PrintStructures)
 	    return FALSE;
     } else {
         PrintStructures = (PRINT_PTRA*) lParam;
-	SetWindowLongA(hDlg, DWL_USER, lParam); 
+	SetWindowLongA(hDlg, DWL_USER, lParam);
 	res = PRINTDLG_WMInitDialog(hDlg, wParam, PrintStructures);
 
 	if(PrintStructures->dlg.lpPrintDlg->Flags & PD_ENABLEPRINTHOOK)
 	    res = PrintStructures->dlg.lpPrintDlg->lpfnPrintHook(
 		hDlg, uMsg, wParam, (LPARAM)PrintStructures->dlg.lpPrintDlg
-	    ); 
+	    );
 	return res;
     }
-  
+
     if(PrintStructures->dlg.lpPrintDlg->Flags & PD_ENABLEPRINTHOOK) {
         res = PrintStructures->dlg.lpPrintDlg->lpfnPrintHook(hDlg,uMsg,wParam,
 							 lParam);
@@ -2039,7 +2039,7 @@
 	if(PrintStructures->hwndUpDown)
 	    DestroyWindow(PrintStructures->hwndUpDown);
         return FALSE;
-    }    
+    }
     return res;
 }
 
@@ -2050,21 +2050,21 @@
     LRESULT res=FALSE;
 
     if (uMsg!=WM_INITDIALOG) {
-        PrintStructures = (PRINT_PTRW*) GetWindowLongA(hDlg, DWL_USER);   
+        PrintStructures = (PRINT_PTRW*) GetWindowLongA(hDlg, DWL_USER);
 	if (!PrintStructures)
 	    return FALSE;
     } else {
         PrintStructures = (PRINT_PTRW*) lParam;
-	SetWindowLongA(hDlg, DWL_USER, lParam); 
+	SetWindowLongA(hDlg, DWL_USER, lParam);
 	res = PRINTDLG_WMInitDialogW(hDlg, wParam, PrintStructures);
 
 	if(PrintStructures->dlg.lpPrintDlg->Flags & PD_ENABLEPRINTHOOK)
 	    res = PrintStructures->dlg.lpPrintDlg->lpfnPrintHook(
 		hDlg, uMsg, wParam, (LPARAM)PrintStructures->dlg.lpPrintDlg
-	    ); 
+	    );
 	return res;
     }
-  
+
     if(PrintStructures->dlg.lpPrintDlg->Flags & PD_ENABLEPRINTHOOK) {
         res = PrintStructures->dlg.lpPrintDlg->lpfnPrintHook(hDlg,uMsg,wParam,
 							 lParam);
@@ -2083,7 +2083,7 @@
 	if(PrintStructures->hwndUpDown)
 	    DestroyWindow(PrintStructures->hwndUpDown);
         return FALSE;
-    }    
+    }
     return res;
 }
 
@@ -2101,7 +2101,7 @@
         DWORD size;
         HGLOBAL16 hGlobal16;
         LPVOID template;
- 
+
         if (!(hResInfo = FindResourceA(COMMDLG_hInstance32,
                PrintResourceName, RT_DIALOGA)))
         {
@@ -2147,7 +2147,7 @@
     if (lppd->Flags & PD_PRINTSETUP) {
 	if(lppd->Flags & PD_ENABLESETUPTEMPLATEHANDLE) {
 	    hDlgTmpl = lppd->hSetupTemplate;
-	} else if(lppd->Flags & PD_ENABLESETUPTEMPLATE) {	
+	} else if(lppd->Flags & PD_ENABLESETUPTEMPLATE) {
 	    hResInfo = FindResourceA(lppd->hInstance,
 				     lppd->lpSetupTemplateName, RT_DIALOGA);
 	    hDlgTmpl = LoadResource(lppd->hInstance, hResInfo);
@@ -2182,7 +2182,7 @@
     if (lppd->Flags & PD_PRINTSETUP) {
 	if(lppd->Flags & PD_ENABLESETUPTEMPLATEHANDLE) {
 	    hDlgTmpl = lppd->hSetupTemplate;
-	} else if(lppd->Flags & PD_ENABLESETUPTEMPLATE) {	
+	} else if(lppd->Flags & PD_ENABLESETUPTEMPLATE) {
 	    hResInfo = FindResourceW(lppd->hInstance,
 				     lppd->lpSetupTemplateName, RT_DIALOGW);
 	    hDlgTmpl = LoadResource(lppd->hInstance, hResInfo);
@@ -2220,7 +2220,7 @@
     if (lppd->Flags & PD_PRINTSETUP) {
 	if(lppd->Flags & PD_ENABLESETUPTEMPLATEHANDLE) {
 	    hDlgTmpl = lppd->hSetupTemplate;
-	} else if(lppd->Flags & PD_ENABLESETUPTEMPLATE) {	
+	} else if(lppd->Flags & PD_ENABLESETUPTEMPLATE) {
 	    hResInfo = FindResource16(lppd->hInstance,
 				     MapSL(lppd->lpSetupTemplateName), RT_DIALOGA);
 	    hDlgTmpl = LoadResource16(lppd->hInstance, hResInfo);
@@ -2327,7 +2327,7 @@
  *  PrintSetupDlg:
  *  * The Paper Orientation Icons are not implemented yet.
  *  * The Properties Button(s) should call DocumentPropertiesA().
- *  * Settings are not yet taken from a provided DevMode or 
+ *  * Settings are not yet taken from a provided DevMode or
  *    default printer settings.
  */
 
@@ -2357,7 +2357,7 @@
     if(lppd->lStructSize != sizeof(PRINTDLGA)) {
         WARN("structure size failure !!!\n");
 	COMDLG32_SetCommDlgExtendedError(CDERR_STRUCTSIZE);
-	return FALSE; 
+	return FALSE;
     }
 
     if(lppd->Flags & PD_RETURNDEFAULT) {
@@ -2368,12 +2368,12 @@
 
 	if(lppd->hDevMode || lppd->hDevNames) {
 	    WARN("hDevMode or hDevNames non-zero for PD_RETURNDEFAULT\n");
-	    COMDLG32_SetCommDlgExtendedError(PDERR_RETDEFFAILURE); 
+	    COMDLG32_SetCommDlgExtendedError(PDERR_RETDEFFAILURE);
 	    return FALSE;
 	}
         if(!PRINTDLG_OpenDefaultPrinter(&hprn)) {
 	    WARN("Can't find default printer\n");
-	    COMDLG32_SetCommDlgExtendedError(PDERR_NODEFAULTPRN); 
+	    COMDLG32_SetCommDlgExtendedError(PDERR_NODEFAULTPRN);
 	    return FALSE;
 	}
 
@@ -2385,7 +2385,7 @@
 	dbuf = HeapAlloc(GetProcessHeap(),0,needed);
 	if (!GetPrinterDriverA(hprn, NULL, 3, (LPBYTE)dbuf, needed, &needed)) {
 	    ERR("GetPrinterDriverA failed, le %ld, fix your config for printer %s!\n",GetLastError(),pbuf->pPrinterName);
-	    COMDLG32_SetCommDlgExtendedError(PDERR_RETDEFFAILURE); 
+	    COMDLG32_SetCommDlgExtendedError(PDERR_RETDEFFAILURE);
 	    return FALSE;
 	}
 	ClosePrinter(hprn);
@@ -2407,8 +2407,8 @@
 	HGLOBAL hDlgTmpl;
 	PRINT_PTRA *PrintStructures;
 
-    /* load Dialog resources, 
-     * depending on Flags indicates Print32 or Print32_setup dialog 
+    /* load Dialog resources,
+     * depending on Flags indicates Print32 or Print32_setup dialog
      */
 	hDlgTmpl = PRINTDLG_GetDlgTemplateA(lppd);
 	if (!hDlgTmpl) {
@@ -2480,8 +2480,8 @@
     if(bRet && (lppd->Flags & PD_RETURNDC || lppd->Flags & PD_RETURNIC))
         bRet = PRINTDLG_CreateDCA(lppd);
 
-    TRACE("exit! (%d)\n", bRet);        
-    return bRet;    
+    TRACE("exit! (%d)\n", bRet);
+    return bRet;
 }
 
 /***********************************************************************
@@ -2513,7 +2513,7 @@
     if(lppd->lStructSize != sizeof(PRINTDLGW)) {
         WARN("structure size failure !!!\n");
 	COMDLG32_SetCommDlgExtendedError(CDERR_STRUCTSIZE);
-	return FALSE; 
+	return FALSE;
     }
 
     if(lppd->Flags & PD_RETURNDEFAULT) {
@@ -2524,12 +2524,12 @@
 
 	if(lppd->hDevMode || lppd->hDevNames) {
 	    WARN("hDevMode or hDevNames non-zero for PD_RETURNDEFAULT\n");
-	    COMDLG32_SetCommDlgExtendedError(PDERR_RETDEFFAILURE); 
+	    COMDLG32_SetCommDlgExtendedError(PDERR_RETDEFFAILURE);
 	    return FALSE;
 	}
         if(!PRINTDLG_OpenDefaultPrinter(&hprn)) {
 	    WARN("Can't find default printer\n");
-	    COMDLG32_SetCommDlgExtendedError(PDERR_NODEFAULTPRN); 
+	    COMDLG32_SetCommDlgExtendedError(PDERR_NODEFAULTPRN);
 	    return FALSE;
 	}
 
@@ -2541,7 +2541,7 @@
 	dbuf = HeapAlloc(GetProcessHeap(),0,sizeof(WCHAR)*needed);
 	if (!GetPrinterDriverW(hprn, NULL, 3, (LPBYTE)dbuf, needed, &needed)) {
 	    ERR("GetPrinterDriverA failed, le %ld, fix your config for printer %s!\n",GetLastError(),debugstr_w(pbuf->pPrinterName));
-	    COMDLG32_SetCommDlgExtendedError(PDERR_RETDEFFAILURE); 
+	    COMDLG32_SetCommDlgExtendedError(PDERR_RETDEFFAILURE);
 	    return FALSE;
 	}
 	ClosePrinter(hprn);
@@ -2563,8 +2563,8 @@
 	HGLOBAL hDlgTmpl;
 	PRINT_PTRW *PrintStructures;
 
-    /* load Dialog resources, 
-     * depending on Flags indicates Print32 or Print32_setup dialog 
+    /* load Dialog resources,
+     * depending on Flags indicates Print32 or Print32_setup dialog
      */
 	hDlgTmpl = PRINTDLG_GetDlgTemplateW(lppd);
 	if (!hDlgTmpl) {
@@ -2636,13 +2636,13 @@
     if(bRet && (lppd->Flags & PD_RETURNDC || lppd->Flags & PD_RETURNIC))
         bRet = PRINTDLG_CreateDCW(lppd);
 
-    TRACE("exit! (%d)\n", bRet);        
-    return bRet;    
+    TRACE("exit! (%d)\n", bRet);
+    return bRet;
 }
 
 /***********************************************************************
  *           PrintDlg   (COMMDLG.20)
- * 
+ *
  *  Displays the the PRINT dialog box, which enables the user to specify
  *  specific properties of the print job.
  *
@@ -2691,12 +2691,12 @@
 
 	if(lppd->hDevMode || lppd->hDevNames) {
 	    WARN("hDevMode or hDevNames non-zero for PD_RETURNDEFAULT\n");
-	    COMDLG32_SetCommDlgExtendedError(PDERR_RETDEFFAILURE); 
+	    COMDLG32_SetCommDlgExtendedError(PDERR_RETDEFFAILURE);
 	    return FALSE;
 	}
         if(!PRINTDLG_OpenDefaultPrinter(&hprn)) {
 	    WARN("Can't find default printer\n");
-	    COMDLG32_SetCommDlgExtendedError(PDERR_NODEFAULTPRN); 
+	    COMDLG32_SetCommDlgExtendedError(PDERR_NODEFAULTPRN);
 	    return FALSE;
 	}
 
@@ -2708,7 +2708,7 @@
 	if (!GetPrinterDriverA(hprn, NULL, 3, (LPBYTE)dbuf, needed, &needed)) {
 	    ERR("GetPrinterDriverA failed for %s, le %ld, fix your config!\n",
 		    pbuf->pPrinterName,GetLastError());
-	    COMDLG32_SetCommDlgExtendedError(PDERR_RETDEFFAILURE); 
+	    COMDLG32_SetCommDlgExtendedError(PDERR_RETDEFFAILURE);
 	    return FALSE;
 	}
 	ClosePrinter(hprn);
@@ -2729,8 +2729,8 @@
 	HGLOBAL hDlgTmpl;
 	PRINT_PTRA *PrintStructures;
 
-    /* load Dialog resources, 
-     * depending on Flags indicates Print32 or Print32_setup dialog 
+    /* load Dialog resources,
+     * depending on Flags indicates Print32 or Print32_setup dialog
      */
 	hDlgTmpl = PRINTDLG_GetDlgTemplate16(lppd);
 	if (!hDlgTmpl) {
@@ -2813,8 +2813,8 @@
     if(bRet && (lppd->Flags & PD_RETURNDC || lppd->Flags & PD_RETURNIC))
         bRet = PRINTDLG_CreateDC16(lppd);
 
-    TRACE("exit! (%d)\n", bRet);        
-    return bRet;    
+    TRACE("exit! (%d)\n", bRet);
+    return bRet;
 }
 
 
@@ -2848,7 +2848,7 @@
 
     if(lppd->Flags & PSD_ENABLEPAGESETUPTEMPLATEHANDLE) {
 	hDlgTmpl = lppd->hPageSetupTemplate;
-    } else if(lppd->Flags & PSD_ENABLEPAGESETUPTEMPLATE) {	
+    } else if(lppd->Flags & PSD_ENABLEPAGESETUPTEMPLATE) {
 	hResInfo = FindResourceA(lppd->hInstance,
 				 lppd->lpPageSetupTemplateName, RT_DIALOGA);
 	hDlgTmpl = LoadResource(lppd->hInstance, hResInfo);
@@ -2865,7 +2865,7 @@
 
     if(lppd->Flags & PSD_ENABLEPAGESETUPTEMPLATEHANDLE) {
 	hDlgTmpl = lppd->hPageSetupTemplate;
-    } else if(lppd->Flags & PSD_ENABLEPAGESETUPTEMPLATE) {	
+    } else if(lppd->Flags & PSD_ENABLEPAGESETUPTEMPLATE) {
 	hResInfo = FindResourceW(lppd->hInstance,
 				 lppd->lpPageSetupTemplateName, RT_DIALOGW);
 	hDlgTmpl = LoadResource(lppd->hInstance, hResInfo);
@@ -2983,7 +2983,7 @@
     LPSTR	devname,portname;
     char	papername[64];
     char	buf[200];
-    
+
     dn = GlobalLock(pda->pdlg.hDevNames);
     dm = GlobalLock(pda->pdlg.hDevMode);
     devname	= ((char*)dn)+dn->wDeviceOffset;
@@ -3024,7 +3024,7 @@
     WCHAR	papername[64];
 
     char	buf[200];
-    
+
     dn = GlobalLock(pda->pdlg.hDevNames);
     dm = GlobalLock(pda->pdlg.hDevMode);
     devname	= ((WCHAR*)dn)+dn->wDeviceOffset;
@@ -3065,7 +3065,7 @@
     DEVNAMES	*dn;
     DEVMODEA	*dm;
     LPSTR	devname,portname;
-    
+
     dn = GlobalLock(pda->pdlg.hDevNames);
     dm = GlobalLock(pda->pdlg.hDevMode);
     devname	= ((char*)dn)+dn->wDeviceOffset;
@@ -3082,7 +3082,7 @@
     DEVNAMES	*dn;
     DEVMODEW	*dm;
     LPWSTR	devname,portname;
-    
+
     dn = GlobalLock(pda->pdlg.hDevNames);
     dm = GlobalLock(pda->pdlg.hDevMode);
     devname	= ((WCHAR*)dn)+dn->wDeviceOffset;
@@ -3174,12 +3174,12 @@
 	    FIXME("PagePaintHook not yet implemented!\n");
 	}
 	if (pda->dlga->Flags & PSD_DISABLEPRINTER)
-            EnableWindow(GetDlgItem(hDlg, psh3), FALSE);    
+            EnableWindow(GetDlgItem(hDlg, psh3), FALSE);
 	if (pda->dlga->Flags & PSD_DISABLEMARGINS) {
-            EnableWindow(GetDlgItem(hDlg, edt4), FALSE);    
-            EnableWindow(GetDlgItem(hDlg, edt5), FALSE);    
-            EnableWindow(GetDlgItem(hDlg, edt6), FALSE);    
-            EnableWindow(GetDlgItem(hDlg, edt7), FALSE);    
+            EnableWindow(GetDlgItem(hDlg, edt4), FALSE);
+            EnableWindow(GetDlgItem(hDlg, edt5), FALSE);
+            EnableWindow(GetDlgItem(hDlg, edt6), FALSE);
+            EnableWindow(GetDlgItem(hDlg, edt7), FALSE);
 	}
 	/* width larger as height -> landscape */
 	if (pda->dlga->ptPaperSize.x > pda->dlga->ptPaperSize.y)
@@ -3256,12 +3256,12 @@
 	    FIXME("PagePaintHook not yet implemented!\n");
 	}
 	if (pda->dlga->Flags & PSD_DISABLEPRINTER)
-            EnableWindow(GetDlgItem(hDlg, psh3), FALSE);    
+            EnableWindow(GetDlgItem(hDlg, psh3), FALSE);
 	if (pda->dlga->Flags & PSD_DISABLEMARGINS) {
-            EnableWindow(GetDlgItem(hDlg, edt4), FALSE);    
-            EnableWindow(GetDlgItem(hDlg, edt5), FALSE);    
-            EnableWindow(GetDlgItem(hDlg, edt6), FALSE);    
-            EnableWindow(GetDlgItem(hDlg, edt7), FALSE);    
+            EnableWindow(GetDlgItem(hDlg, edt4), FALSE);
+            EnableWindow(GetDlgItem(hDlg, edt5), FALSE);
+            EnableWindow(GetDlgItem(hDlg, edt6), FALSE);
+            EnableWindow(GetDlgItem(hDlg, edt7), FALSE);
 	}
 	/* width larger as height -> landscape */
 	if (pda->dlga->ptPaperSize.x > pda->dlga->ptPaperSize.y)
@@ -3339,7 +3339,7 @@
 	TRACE("(%p): hwndOwner = %08x, hDevMode = %08x, hDevNames = %08x\n"
 	      "hinst %08x, flags %08lx (%s)\n",
 	      setupdlg, setupdlg->hwndOwner, setupdlg->hDevMode,
-	      setupdlg->hDevNames, 
+	      setupdlg->hDevNames,
 	      setupdlg->hInstance, setupdlg->Flags, flagstr);
     }
 
@@ -3405,7 +3405,7 @@
 	TRACE("(%p): hwndOwner = %08x, hDevMode = %08x, hDevNames = %08x\n"
 	      "hinst %08x, flags %08lx (%s)\n",
 	      setupdlg, setupdlg->hwndOwner, setupdlg->hDevMode,
-	      setupdlg->hDevNames, 
+	      setupdlg->hDevNames,
 	      setupdlg->hInstance, setupdlg->Flags, flagstr);
     }
 
@@ -3466,12 +3466,12 @@
     LRESULT res=FALSE;
 
     if (uMsg!=WM_INITDIALOG) {
-        PrintStructures = (PRINT_PTRA*) GetWindowLongA(hDlg, DWL_USER);   
+        PrintStructures = (PRINT_PTRA*) GetWindowLongA(hDlg, DWL_USER);
 	if (!PrintStructures)
 	    return FALSE;
     } else {
         PrintStructures = (PRINT_PTRA*) lParam;
-	SetWindowLongA(hDlg, DWL_USER, lParam); 
+	SetWindowLongA(hDlg, DWL_USER, lParam);
 	res = PRINTDLG_WMInitDialog16(hDlg, wParam, PrintStructures);
 
 	if(PrintStructures->dlg.lpPrintDlg16->Flags & PD_ENABLEPRINTHOOK) {
@@ -3482,7 +3482,7 @@
 	}
 	return res;
     }
-  
+
     if(PrintStructures->dlg.lpPrintDlg16->Flags & PD_ENABLEPRINTHOOK) {
         res = CallWindowProc16(
 		(WNDPROC16)PrintStructures->dlg.lpPrintDlg16->lpfnPrintHook,
@@ -3509,7 +3509,7 @@
     /* FIXME: don't forget to delete the paper orientation icons here! */
 
         return FALSE;
-    }    
+    }
     return res;
 }
 
diff --git a/dlls/dciman32/dciman_main.c b/dlls/dciman32/dciman_main.c
index f4e2c60..af8cfa1 100644
--- a/dlls/dciman32/dciman_main.c
+++ b/dlls/dciman32/dciman_main.c
@@ -1,7 +1,7 @@
-/* 
+/*
  * Implementation of DCIMAN32 - DCI Manager
  * "Device Context Interface" ?
- * 
+ *
  * Copyright 2000 Marcus Meissner
  *
  * This library is free software; you can redistribute it and/or
diff --git a/dlls/ddraw/convert.c b/dlls/ddraw/convert.c
index eeeb849..3a1393c 100644
--- a/dlls/ddraw/convert.c
+++ b/dlls/ddraw/convert.c
@@ -38,7 +38,7 @@
 	    /* gcc generates slightly inefficient code for the the copy/lookup,
 	     * it generates one excess memory access (to pal) per pixel. Since
 	     * we know that pal is not modified by the memory write we can
-	     * put it into a register and reduce the number of memory accesses 
+	     * put it into a register and reduce the number of memory accesses
 	     * from 4 to 3 pp. There are two xor eax,eax to avoid pipeline
 	     * stalls. (This is not guaranteed to be the fastest method.)
 	     */
diff --git a/dlls/ddraw/d3d_private.h b/dlls/ddraw/d3d_private.h
index ec601da..fa63bf1 100644
--- a/dlls/ddraw/d3d_private.h
+++ b/dlls/ddraw/d3d_private.h
@@ -108,7 +108,7 @@
     LPDIRECT3D iface, LPD3DFINDDEVICESEARCH lpfinddevsrc,
     LPD3DFINDDEVICERESULT lpfinddevrst)
 ;
-extern HRESULT WINAPI IDirect3D2Impl_QueryInterface(LPDIRECT3D2 iface,REFIID refiid,LPVOID *obj);  
+extern HRESULT WINAPI IDirect3D2Impl_QueryInterface(LPDIRECT3D2 iface,REFIID refiid,LPVOID *obj);
 extern ULONG WINAPI IDirect3D2Impl_AddRef(LPDIRECT3D2 iface);
 extern ULONG WINAPI IDirect3D2Impl_Release(LPDIRECT3D2 iface);
 extern HRESULT WINAPI IDirect3D2Impl_EnumDevices(
@@ -144,7 +144,7 @@
         IDirect3D2Impl* d3d2;
     } d3d;
     int                 type;
-  
+
     D3DLIGHT2           light;
 
     /* Chained list used for adding / removing from viewports */
@@ -153,7 +153,7 @@
     /* Activation function */
     void (*activate)(IDirect3DLightImpl*);
     int                 is_active;
-  
+
     LPVOID		private;
 };
 
@@ -250,13 +250,13 @@
 
   /* Activation function */
   void (*activate)(IDirect3DViewport2Impl*);
-  
+
   /* Field used to chain viewports together */
   IDirect3DViewport2Impl*	next;
 
   /* Lights list */
   IDirect3DLightImpl*		lights;
-  
+
   LPVOID			private;
 };
 
diff --git a/dlls/ddraw/d3ddevice/main.c b/dlls/ddraw/d3ddevice/main.c
index 780212b..82d95a7 100644
--- a/dlls/ddraw/d3ddevice/main.c
+++ b/dlls/ddraw/d3ddevice/main.c
@@ -1,6 +1,6 @@
 /* Direct3D Device
  * Copyright (c) 1998 Lionel ULMER
- *   
+ *
  * This file contains all the common stuff for D3D devices.
  *
  * This library is free software; you can redistribute it and/or
@@ -379,12 +379,12 @@
     LPVOID lpvertex, DWORD vertcount, DWORD dwFlags
 ) {
   ICOM_THIS(IDirect3DDevice2Impl,iface);
-  
+
   TRACE("(%p)->(%d,%d,%p,%ld,%08lx): stub\n", This, d3dp, d3dv, lpvertex, vertcount, dwFlags);
 
   return D3D_OK;
 }
-    
+
 HRESULT WINAPI IDirect3DDevice2Impl_DrawIndexedPrimitive(
     LPDIRECT3DDEVICE2 iface, D3DPRIMITIVETYPE d3dp, D3DVERTEXTYPE d3dv,
     LPVOID lpvertex, DWORD vertcount, LPWORD lpindexes, DWORD indexcount,
@@ -670,7 +670,7 @@
 {
     ICOM_THIS(IDirect3DDeviceImpl,iface);
     FIXME("(%p)->(): stub\n", This);
-    return DD_OK;  
+    return DD_OK;
 }
 
 HRESULT WINAPI IDirect3DDeviceImpl_GetDirect3D(
@@ -685,7 +685,7 @@
 /*******************************************************************************
  *				Direct3DDevice VTable
  */
-static ICOM_VTABLE(IDirect3DDevice) WINE_UNUSED d3d_d3ddevice_vtbl = 
+static ICOM_VTABLE(IDirect3DDevice) WINE_UNUSED d3d_d3ddevice_vtbl =
 {
   ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
   IDirect3DDeviceImpl_QueryInterface,
diff --git a/dlls/ddraw/d3ddevice/mesa.c b/dlls/ddraw/d3ddevice/mesa.c
index af8c381..bb09d9a 100644
--- a/dlls/ddraw/d3ddevice/mesa.c
+++ b/dlls/ddraw/d3ddevice/mesa.c
@@ -1,6 +1,6 @@
 /* Direct3D Device
  * Copyright (c) 1998 Lionel ULMER
- *   
+ *
  * This file contains the MESA implementation of all the D3D devices that
  * Wine supports.
  *
@@ -98,7 +98,7 @@
 static void fill_opengl_caps(D3DDEVICEDESC *d1, D3DDEVICEDESC *d2)
 {
   /* GLint maxlight; */
-  
+
   d1->dwSize  = sizeof(*d1);
   d1->dwFlags = D3DDD_DEVCAPS | D3DDD_BCLIPPING | D3DDD_COLORMODEL | D3DDD_DEVICERENDERBITDEPTH | D3DDD_DEVICEZBUFFERBITDEPTH
     | D3DDD_LIGHTINGCAPS | D3DDD_LINECAPS | D3DDD_MAXBUFFERSIZE | D3DDD_MAXVERTEXCOUNT | D3DDD_TRANSFORMCAPS | D3DDD_TRICAPS;
@@ -114,7 +114,7 @@
   d1->dlcLightingCaps.dwLightingModel = D3DLIGHTINGMODEL_RGB;
   d1->dlcLightingCaps.dwNumLights = 16; /* glGetIntegerv(GL_MAX_LIGHTS, &maxlight); d1->dlcLightingCaps.dwNumLights = maxlight; */
   fill_opengl_primcaps(&(d1->dpcLineCaps));
-  fill_opengl_primcaps(&(d1->dpcTriCaps));  
+  fill_opengl_primcaps(&(d1->dpcTriCaps));
   d1->dwDeviceRenderBitDepth  = DDBD_16;
   d1->dwDeviceZBufferBitDepth = DDBD_16;
   d1->dwMaxBufferSize = 0;
@@ -137,10 +137,10 @@
   x11_dd_private *private = (x11_dd_private *) ddraw->d->private;
   const char *ext_string;
   Mesa_DeviceCapabilities *devcap;
-  
+
   private->device_capabilities = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(Mesa_DeviceCapabilities));
   devcap = (Mesa_DeviceCapabilities *) private->device_capabilities;
-  
+
   ENTER_GL();
   ext_string = glGetString(GL_EXTENSIONS);
   /* Query for the ColorTable Extension */
@@ -174,7 +174,7 @@
       (!memcmp(&IID_IDirect3DHALDevice,rguid,sizeof(IID_IDirect3DHALDevice))) ||
       /* OpenGL Device */
       (!memcmp(&IID_D3DDEVICE2_OpenGL,rguid,sizeof(IID_D3DDEVICE2_OpenGL)))) {
-    
+
     *device = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(IDirect3DDevice2Impl));
     (*device)->private = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(mesa_d3dd_private));
     odev = (mesa_d3dd_private*)(*device)->private;
@@ -185,7 +185,7 @@
     (*device)->viewport_list = NULL;
     (*device)->current_viewport = NULL;
     (*device)->set_context = set_context;
-    
+
     TRACE("Creating OpenGL device for surface %p\n", surface);
     /* Create the OpenGL context */
 #if COMPILABLE
@@ -203,12 +203,12 @@
       odev->ctx = glXCreateContext(gdi_display, vis,
 				   NULL, GL_TRUE);
     }
-    
+
     if (odev->ctx == NULL)
       ERR("Error in context creation !\n");
     else
       TRACE("Context created (%p)\n", odev->ctx);
-    
+
     /* Now override the surface's Flip method (if in double buffering) */
     ((x11_ds_private *) surface->private)->opengl_flip = TRUE;
     {
@@ -230,7 +230,7 @@
     odev->world_mat = (D3DMATRIX *) HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, 16 * sizeof(float));
     odev->view_mat  = (D3DMATRIX *) HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, 16 * sizeof(float));
     odev->proj_mat  = (D3DMATRIX *) HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, 16 * sizeof(float));
-    
+
     memcpy(odev->world_mat, id_mat, 16 * sizeof(float));
     memcpy(odev->view_mat , id_mat, 16 * sizeof(float));
     memcpy(odev->proj_mat , id_mat, 16 * sizeof(float));
@@ -244,7 +244,7 @@
     LEAVE_GL();
 
     fill_device_capabilities(d3d->ddraw);
-    
+
     TRACE("OpenGL device created \n");
     return 1;
   }
@@ -260,7 +260,7 @@
 {
   ICOM_THIS(IDirect3DDevice2Impl,iface);
   FIXME("(%p)->() decrementing from %lu.\n", This, This->ref );
-  
+
   if (!--(This->ref)) {
 #if 0  /* broken for now */
     D3DDPRIVATE(This);
@@ -298,7 +298,7 @@
   pformat = &(sdesc.ddpfPixelFormat);
   pformat->dwSize = sizeof(DDPIXELFORMAT);
   pformat->dwFourCC = 0;
-  
+
   TRACE("Enumerating GL_RGBA unpacked (32)\n");
   pformat->dwFlags = DDPF_RGB | DDPF_ALPHAPIXELS;
   pformat->u1.dwRGBBitCount = 32;
@@ -371,8 +371,8 @@
   pformat->u4.dwBBitMask =         0x0000001F;
   pformat->u5.dwRGBAlphaBitMask =  0x00008000;
   if (cb(&sdesc, context) == 0)
-    return DD_OK;  
-  
+    return DD_OK;
+
   TRACE("Enumerating Paletted (8)\n");
   pformat->dwFlags = DDPF_PALETTEINDEXED8;
   pformat->u1.dwRGBBitCount = 8;
@@ -382,9 +382,9 @@
   pformat->u5.dwRGBAlphaBitMask = 0x00000000;
   if (cb(&sdesc, context) == 0)
     return DD_OK;
-  
+
   TRACE("End of enumeration\n");
-  
+
   return DD_OK;
 }
 
@@ -393,7 +393,7 @@
 ) {
   ICOM_THIS(IDirect3DDevice2Impl,iface);
   FIXME("(%p)->(%p,%p): stub\n", This, cb, context);
-  
+
   return enum_texture_format_OpenGL(cb, context);
 }
 
@@ -401,12 +401,12 @@
     LPDIRECT3DDEVICE2 iface
 ) {
   ICOM_THIS(IDirect3DDevice2Impl,iface);
-  
+
   FIXME("(%p)->(): stub\n", This);
-  
+
   /* Here, we should get the DDraw surface and 'copy it' to the
      OpenGL surface.... */
-  
+
   return DD_OK;
 }
 
@@ -416,7 +416,7 @@
   FIXME("(%p)->(): stub\n", This);
 
   /* No need to do anything here... */
-  
+
   return DD_OK;
 }
 
@@ -428,10 +428,10 @@
   D3DDPRIVATE(This);
 
   TRACE("(%p)->(%d,%ld)\n", This, dwRenderStateType, dwRenderState);
-  
+
   /* Call the render state functions */
   set_render_state(dwRenderStateType, dwRenderState, &(odev->rs));
-  
+
   return DD_OK;
 }
 
@@ -441,11 +441,11 @@
 ) {
   ICOM_THIS(IDirect3DDevice2Impl,iface);
   FIXME("(%p)->(%d,%08lx): stub\n", This, dwLightStateType, dwLightState);
-  
+
   switch (dwLightStateType) {
   case D3DLIGHTSTATE_MATERIAL: {  /* 1 */
     IDirect3DMaterial2Impl* mat = (IDirect3DMaterial2Impl*) dwLightState;
-    
+
     if (mat != NULL) {
       ENTER_GL();
       mat->activate(mat);
@@ -454,10 +454,10 @@
       TRACE("Zoups !!!\n");
     }
   } break;
-    
+
   case D3DLIGHTSTATE_AMBIENT: {   /* 2 */
     float light[4];
-    
+
     light[0] = ((dwLightState >> 16) & 0xFF) / 255.0;
     light[1] = ((dwLightState >>  8) & 0xFF) / 255.0;
     light[2] = ((dwLightState >>  0) & 0xFF) / 255.0;
@@ -478,7 +478,7 @@
     TRACE("Unexpected Light State Type\n");
     return DDERR_INVALIDPARAMS;
   }
-  
+
   return DD_OK;
 }
 
@@ -488,12 +488,12 @@
 ) {
   ICOM_THIS(IDirect3DDevice2Impl,iface);
   D3DDPRIVATE(This);
-  
+
   FIXME("(%p)->(%d,%p): stub\n", This, d3dts, lpmatrix);
-  
+
   ENTER_GL();
-  
-  /* Using a trial and failure approach, I found that the order of 
+
+  /* Using a trial and failure approach, I found that the order of
      Direct3D transformations that works best is :
 
      ScreenCoord = ProjectionMat * ViewMat * WorldMat * ObjectCoord
@@ -504,7 +504,7 @@
      If anyone has a good explanation of the three different matrices in
      the SDK online documentation, feel free to point it to me. For example,
      which matrices transform lights ? In OpenGL only the PROJECTION matrix
-     transform the lights, not the MODELVIEW. Using the matrix names, I 
+     transform the lights, not the MODELVIEW. Using the matrix names, I
      supposed that PROJECTION and VIEW (all 'camera' related names) do
      transform lights, but WORLD do not. It may be wrong though... */
 
@@ -530,21 +530,21 @@
     glMatrixMode(GL_MODELVIEW);
     glLoadMatrixf((float *) odev->world_mat);
   } break;
-    
+
   case D3DTRANSFORMSTATE_VIEW: {
     conv_mat(lpmatrix, odev->view_mat);
     glMatrixMode(GL_PROJECTION);
     glLoadMatrixf((float *) odev->proj_mat);
     glMultMatrixf((float *) odev->view_mat);
   } break;
-    
+
   case D3DTRANSFORMSTATE_PROJECTION: {
     conv_mat(lpmatrix, odev->proj_mat);
     glMatrixMode(GL_PROJECTION);
     glLoadMatrixf((float *) odev->proj_mat);
     glMultMatrixf((float *) odev->view_mat);
   } break;
-    
+
   default:
     break;
   }
@@ -720,16 +720,16 @@
   ICOM_THIS(IDirect3DDevice2Impl,iface);
   D3DDPRIVATE(This);
   int vx_index;
-  
+
   TRACE("(%p)->(%d,%d,%p,%ld,%08lx): stub\n", This, d3dp, d3dv, lpvertex, vertcount, dwFlags);
 
   ENTER_GL();
   DRAW_PRIMITIVE(vertcount, vx_index);
   LEAVE_GL();
-    
+
   return D3D_OK;
 }
-      
+
 static HRESULT WINAPI MESA_IDirect3DDevice2Impl_DrawIndexedPrimitive(
     LPDIRECT3DDEVICE2 iface, D3DPRIMITIVETYPE d3dp, D3DVERTEXTYPE d3dv,
     LPVOID lpvertex, DWORD vertcount, LPWORD lpindexes, DWORD indexcount,
@@ -738,13 +738,13 @@
   ICOM_THIS(IDirect3DDevice2Impl,iface);
   D3DDPRIVATE(This);
   int vx_index;
-  
+
   TRACE("(%p)->(%d,%d,%p,%ld,%p,%ld,%08lx): stub\n", This, d3dp, d3dv, lpvertex, vertcount, lpindexes, indexcount, dwFlags);
-  
+
   ENTER_GL();
   DRAW_PRIMITIVE(indexcount, lpindexes[vx_index]);
   LEAVE_GL();
-  
+
   return D3D_OK;
 }
 
@@ -767,7 +767,7 @@
  *				OpenGL-specific VTable
  */
 
-ICOM_VTABLE(IDirect3DDevice2) OpenGL_vtable = 
+ICOM_VTABLE(IDirect3DDevice2) OpenGL_vtable =
 {
   ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
   IDirect3DDevice2Impl_QueryInterface,
@@ -784,20 +784,20 @@
   MESA_IDirect3DDevice2Impl_BeginScene,
   MESA_IDirect3DDevice2Impl_EndScene,
   IDirect3DDevice2Impl_GetDirect3D,
-  
+
   /*** DrawPrimitive API ***/
   IDirect3DDevice2Impl_SetCurrentViewport,
   IDirect3DDevice2Impl_GetCurrentViewport,
-  
+
   IDirect3DDevice2Impl_SetRenderTarget,
   IDirect3DDevice2Impl_GetRenderTarget,
-  
+
   IDirect3DDevice2Impl_Begin,
   IDirect3DDevice2Impl_BeginIndexed,
   IDirect3DDevice2Impl_Vertex,
   IDirect3DDevice2Impl_Index,
   IDirect3DDevice2Impl_End,
-  
+
   IDirect3DDevice2Impl_GetRenderState,
   MESA_IDirect3DDevice2Impl_SetRenderState,
   IDirect3DDevice2Impl_GetLightState,
@@ -805,10 +805,10 @@
   MESA_IDirect3DDevice2Impl_SetTransform,
   IDirect3DDevice2Impl_GetTransform,
   IDirect3DDevice2Impl_MultiplyTransform,
-  
+
   MESA_IDirect3DDevice2Impl_DrawPrimitive,
   MESA_IDirect3DDevice2Impl_DrawIndexedPrimitive,
-  
+
   IDirect3DDevice2Impl_SetClipStatus,
   IDirect3DDevice2Impl_GetClipStatus,
 };
@@ -818,11 +818,11 @@
  */
 int d3d_OpenGL_dx3(LPD3DENUMDEVICESCALLBACK cb, LPVOID context) {
   D3DDEVICEDESC	d1,d2;
-  
+
   TRACE(" Enumerating OpenGL D3D device (IID %s).\n", debugstr_guid(&IID_D3DDEVICE_OpenGL));
-  
+
   fill_opengl_caps(&d1, &d2);
-  
+
   return cb((void*)&IID_D3DDEVICE_OpenGL,"WINE Direct3D using OpenGL","direct3d",&d1,&d2,context);
 }
 
@@ -834,7 +834,7 @@
     int attributeList[]={ GLX_RGBA, GLX_DEPTH_SIZE, 16, GLX_DOUBLEBUFFER, None };
     XVisualInfo *xvis;
 #endif
-       
+
     *device = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(IDirect3DDeviceImpl));
     (*device)->private = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(mesa_d3dd_private));
     odev = (mesa_d3dd_private*)(*device)->private;
@@ -842,14 +842,14 @@
     ICOM_VTBL(*device) = &OpenGL_vtable_dx3;
     (*device)->d3d = NULL;
     (*device)->surface = surface;
-    
+
     (*device)->viewport_list = NULL;
     (*device)->current_viewport = NULL;
-    
+
     (*device)->set_context = (void*)set_context;
-    
+
     TRACE("OpenGL device created \n");
-    
+
     /* Create the OpenGL context */
     /* First get the correct visual */
     /* if (surface->s.backbuffer == NULL)
@@ -869,7 +869,7 @@
 				 NULL,
 				 GL_TRUE);
     TRACE("Context created\n");
-    
+
     /* Now override the surface's Flip method (if in double buffering) */
     surface->s.d3d_device = (void *) odev;
     {
@@ -893,12 +893,12 @@
     (*device)->set_context(*device);
     glClearColor(0.0, 0.0, 0.0, 0.0);
     glColor3f(1.0, 1.0, 1.0);
-    
+
     fill_device_capabilities((IDirectDrawImpl *) surface->ddraw_owner);
 
     return 1;
   }
-  
+
   /* This is not the OpenGL UID */
   return DD_OK;
 }
@@ -907,7 +907,7 @@
 {
   ICOM_THIS(IDirect3DDeviceImpl,iface);
   FIXME("(%p)->() decrementing from %lu.\n", This, This->ref );
-  
+
   if (!--(This->ref)) {
 #if 0  /* broken for now */
     D3DDPRIVATE(This);
@@ -928,7 +928,7 @@
 {
   ICOM_THIS(IDirect3DDeviceImpl,iface);
   TRACE("(%p)->(%p,%p): stub\n", This, lpd3dEnumTextureProc, lpArg);
-  
+
   return enum_texture_format_OpenGL(lpd3dEnumTextureProc, lpArg);
 }
 
@@ -937,12 +937,12 @@
 {
   ICOM_THIS(IDirect3DDeviceImpl,iface);
   /* OpenGL_IDirect3DDevice *odev = (OpenGL_IDirect3DDevice *) This; */
-  
+
   FIXME("(%p)->(): stub\n", This);
-  
+
   /* We get the pointer to the surface (should be done on flip) */
   /* odev->zb->pbuf = This->surface->s.surface_desc.u2.lpSurface; */
-  
+
   return DD_OK;
 }
 
@@ -952,18 +952,18 @@
 static HRESULT WINAPI MESA_IDirect3DDeviceImpl_EndScene(LPDIRECT3DDEVICE iface)
 {
   ICOM_THIS(IDirect3DDeviceImpl,iface);
-  
+
   FIXME("(%p)->(): stub\n", This);
 
   /* No need to do anything here... */
-  
-  return DD_OK;  
+
+  return DD_OK;
 }
 
 /*******************************************************************************
  *				Direct3DDevice VTable
  */
-ICOM_VTABLE(IDirect3DDevice) OpenGL_vtable_dx3 = 
+ICOM_VTABLE(IDirect3DDevice) OpenGL_vtable_dx3 =
 {
   ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
   IDirect3DDeviceImpl_QueryInterface,
diff --git a/dlls/ddraw/d3dexecutebuffer.c b/dlls/ddraw/d3dexecutebuffer.c
index fe78460..bec0409 100644
--- a/dlls/ddraw/d3dexecutebuffer.c
+++ b/dlls/ddraw/d3dexecutebuffer.c
@@ -69,7 +69,7 @@
  *				ExecuteBuffer static functions
  */
 void _dump_d3dstatus(LPD3DSTATUS lpStatus) {
-  
+
 }
 
 void _dump_executedata(LPD3DEXECUTEDATA lpData) {
@@ -193,16 +193,16 @@
   /* DWORD vc = ilpBuff->data.dwVertexCount; */
   DWORD is = ilpBuff->data.dwInstructionOffset;
   /* DWORD il = ilpBuff->data.dwInstructionLength; */
-  
+
   void *instr = ilpBuff->desc.lpData + is;
   D3DDPRIVATE((IDirect3DDeviceImpl*)dev);
-  
+
   TRACE("ExecuteData : \n");
   if (TRACE_ON(ddraw))
   _dump_executedata(&(ilpBuff->data));
-  
+
   ENTER_GL();
-  
+
   while (1) {
     LPD3DINSTRUCTION current = (LPD3DINSTRUCTION) instr;
     BYTE size;
@@ -211,20 +211,20 @@
     count = current->wCount;
     size = current->bSize;
     instr += sizeof(D3DINSTRUCTION);
-    
+
     switch (current->bOpcode) {
     case D3DOP_POINT: {
       TRACE("POINT-s          (%d)\n", count);
 
       instr += count * size;
     } break;
-      
+
     case D3DOP_LINE: {
       TRACE("LINE-s           (%d)\n", count);
 
       instr += count * size;
     } break;
-      
+
     case D3DOP_TRIANGLE: {
       int i;
       float z_inv_matrix[16] = {
@@ -233,18 +233,18 @@
 	0.0, 0.0, -1.0, 0.0,
 	0.0, 0.0,  1.0, 1.0
       };
-      
+
       OGL_Vertex  *vx    = (OGL_Vertex  *) ilpBuff->vertex_data;
       OGL_LVertex *l_vx  = (OGL_LVertex *) ilpBuff->vertex_data;
       D3DTLVERTEX *tl_vx = (D3DTLVERTEX *) ilpBuff->vertex_data;
-      
+
       TRACE("TRIANGLE         (%d)\n", count);
 
       switch (ilpBuff->vertex_type) {
       case D3DVT_VERTEX:
 	/* This time, there is lighting */
 	glEnable(GL_LIGHTING);
-	
+
       /* Use given matrixes */
       glMatrixMode(GL_MODELVIEW);
       glLoadIdentity(); /* The model transformation was done during the
@@ -282,16 +282,16 @@
 
       case D3DVT_TLVERTEX: {
 	GLdouble height, width, minZ, maxZ;
-        
+
         /* First, disable lighting */
         glDisable(GL_LIGHTING);
-        
+
         /* Then do not put any transformation matrixes */
         glMatrixMode(GL_MODELVIEW);
         glLoadIdentity();
         glMatrixMode(GL_PROJECTION);
         glLoadIdentity();
-        
+
         if (ivp == NULL) {
           ERR("No current viewport !\n");
           /* Using standard values */
@@ -314,7 +314,7 @@
 
         glOrtho(0.0, width, height, 0.0, -minZ, -maxZ);
       } break;
-	
+
       default:
 	ERR("Unhandled vertex type !\n");
 	break;
@@ -324,27 +324,27 @@
       case D3DVT_VERTEX:
 	TRIANGLE_LOOP(DO_VERTEX);
 	break;
-	
+
       case D3DVT_LVERTEX:
 	TRIANGLE_LOOP(DO_LVERTEX);
 	break;
-	
+
       case D3DVT_TLVERTEX:
 	TRIANGLE_LOOP(DO_TLVERTEX);
 	break;
-	
+
       default:
 	ERR("Unhandled vertex type !\n");
       }
-      
+
     } break;
-    
+
     case D3DOP_MATRIXLOAD: {
       TRACE("MATRIXLOAD-s     (%d)\n", count);
 
       instr += count * size;
     } break;
-      
+
     case D3DOP_MATRIXMULTIPLY: {
       int i;
       TRACE("MATRIXMULTIPLY   (%d)\n", count);
@@ -354,7 +354,7 @@
 	LPD3DMATRIX a = (LPD3DMATRIX) ci->hDestMatrix;
 	LPD3DMATRIX b = (LPD3DMATRIX) ci->hSrcMatrix1;
 	LPD3DMATRIX c = (LPD3DMATRIX) ci->hSrcMatrix2;
-	
+
 	TRACE("  Dest : %08lx  Src1 : %08lx  Src2 : %08lx\n",
 	      ci->hDestMatrix, ci->hSrcMatrix1, ci->hSrcMatrix2);
 
@@ -369,11 +369,11 @@
 	glGetFloatv(GL_PROJECTION_MATRIX, (float *) a);
 	/* Restore the current matrix */
 	glPopMatrix();
-	
+
 	instr += size;
       }
     } break;
-      
+
     case D3DOP_STATETRANSFORM: {
       int i;
       TRACE("STATETRANSFORM   (%d)\n", count);
@@ -401,38 +401,38 @@
 	default:
 	  ERR("  Unhandled state transformation !! (%d)\n", (int) ci->u1.dtstTransformStateType);
 	  break;
-	  
+
 	}
-	
+
 	instr += size;
       }
     } break;
-      
+
     case D3DOP_STATELIGHT: {
       int i;
       TRACE("STATELIGHT       (%d)\n", count);
 
       for (i = 0; i < count; i++) {
 	LPD3DSTATE ci = (LPD3DSTATE) instr;
-	
+
 	/* Handle the state transform */
 	switch (ci->u1.dlstLightStateType) {
 	case D3DLIGHTSTATE_MATERIAL: {
 	  IDirect3DMaterial2Impl* mat = (IDirect3DMaterial2Impl*) ci->u2.dwArg[0];
 	  TRACE("  MATERIAL\n");
-	  
+
 	  if (mat != NULL) {
 	    mat->activate(mat);
 	  } else {
 	    TRACE("    bad Material Handle\n");
 	  }
 	} break ;
-	  
+
 	case D3DLIGHTSTATE_AMBIENT: {
 	  float light[4];
 	  DWORD dwLightState = ci->u2.dwArg[0];
 	  TRACE("  AMBIENT\n");
-	  
+
 	  light[0] = ((dwLightState >> 16) & 0xFF) / 255.0;
 	  light[1] = ((dwLightState >>  8) & 0xFF) / 255.0;
 	  light[2] = ((dwLightState >>  0) & 0xFF) / 255.0;
@@ -445,27 +445,27 @@
 		((dwLightState >>  0) & 0xFF),
 		((dwLightState >> 24) & 0xFF));
 	} break ;
-	  
+
 	case D3DLIGHTSTATE_COLORMODEL: {
 	  TRACE("  COLORMODEL\n");
 	} break ;
-	  
+
 	case D3DLIGHTSTATE_FOGMODE: {
 	  TRACE("  FOGMODE\n");
 	} break ;
-	  
+
 	case D3DLIGHTSTATE_FOGSTART: {
 	  TRACE("  FOGSTART\n");
 	} break ;
-	  
+
 	case D3DLIGHTSTATE_FOGEND: {
 	  TRACE("  FOGEND\n");
 	} break ;
-	  
+
 	case D3DLIGHTSTATE_FOGDENSITY: {
 	  TRACE("  FOGDENSITY\n");
 	} break ;
-	  
+
 	default:
 	  ERR("  Unhandled light state !! (%d)\n", (int) ci->u1.dlstLightStateType);
 	  break;
@@ -473,28 +473,28 @@
 	instr += size;
       }
     } break;
-      
+
     case D3DOP_STATERENDER: {
       int i;
       TRACE("STATERENDER      (%d)\n", count);
-      
+
       for (i = 0; i < count; i++) {
 	LPD3DSTATE ci = (LPD3DSTATE) instr;
-	
+
 	/* Handle the state transform */
 	set_render_state(ci->u1.drstRenderStateType, ci->u2.dwArg[0], &(odev->rs));
 
 	instr += size;
       }
     } break;
-      
+
     case D3DOP_PROCESSVERTICES: {
       int i;
       TRACE("PROCESSVERTICES  (%d)\n", count);
-      
+
       for (i = 0; i < count; i++) {
 	LPD3DPROCESSVERTICES ci = (LPD3DPROCESSVERTICES) instr;
-	
+
 	TRACE("  Start : %d Dest : %d Count : %ld\n",
 	      ci->wStart, ci->wDest, ci->dwCount);
 	TRACE("  Flags : ");
@@ -523,13 +523,13 @@
 
 	   In this implementation, I will emulate only ONE thing : each
 	   vertex can have its own "WORLD" transformation (this is used in the
-	   TWIST.EXE demo of the 5.2 SDK). I suppose that all vertices of the 
+	   TWIST.EXE demo of the 5.2 SDK). I suppose that all vertices of the
 	   execute buffer use the same state.
 
 	   If I find applications that change other states, I will try to do a
-	   more 'fine-tuned' state emulation (but I may become quite tricky if 
+	   more 'fine-tuned' state emulation (but I may become quite tricky if
 	   it changes a light position in the middle of a triangle).
-	   
+
 	   In this case, a 'direct' approach (i.e. without using OpenGL, but
 	   writing our own 3D rasterizer) would be easier. */
 
@@ -551,13 +551,13 @@
 	  dump_mat(mat);
 
 	  ilpBuff->vertex_type = D3DVT_VERTEX;
-	  
+
 	  for (nb = 0; nb < ci->dwCount; nb++) {
 	    /* For the moment, no normal transformation... */
 	    dst->nx = src->u4.nx;
 	    dst->ny = src->u5.ny;
 	    dst->nz = src->u6.nz;
-	    
+
 	    dst->u  = src->u7.tu;
 	    dst->v  = src->u8.tv;
 
@@ -566,7 +566,7 @@
 	    dst->y = (src->u1.x * mat->_12) + (src->u2.y * mat->_22) + (src->u3.z * mat->_32) + (1.0 * mat->_42);
 	    dst->z = (src->u1.x * mat->_13) + (src->u2.y * mat->_23) + (src->u3.z * mat->_33) + (1.0 * mat->_43);
 	    dst->w = (src->u1.x * mat->_14) + (src->u2.y * mat->_24) + (src->u3.z * mat->_34) + (1.0 * mat->_44);
-	    
+
 	    src++;
 	    dst++;
 	  }
@@ -580,7 +580,7 @@
 	  dump_mat(mat);
 
 	  ilpBuff->vertex_type = D3DVT_LVERTEX;
-	  
+
 	  for (nb = 0; nb < ci->dwCount; nb++) {
 	    dst->c  = src->u4.color;
 	    dst->sc = src->u5.specular;
@@ -592,7 +592,7 @@
 	    dst->y = (src->u1.x * mat->_12) + (src->u2.y * mat->_22) + (src->u3.z * mat->_32) + (1.0 * mat->_42);
 	    dst->z = (src->u1.x * mat->_13) + (src->u2.y * mat->_23) + (src->u3.z * mat->_33) + (1.0 * mat->_43);
 	    dst->w = (src->u1.x * mat->_14) + (src->u2.y * mat->_24) + (src->u3.z * mat->_34) + (1.0 * mat->_44);
-	    
+
 	    src++;
 	    dst++;
 	  }
@@ -601,22 +601,22 @@
 	  D3DTLVERTEX *dst = ((LPD3DTLVERTEX) (ilpBuff->vertex_data)) + ci->wDest;
 
 	  ilpBuff->vertex_type = D3DVT_TLVERTEX;
-	  
+
 	  memcpy(dst, src, ci->dwCount * sizeof(D3DTLVERTEX));
 	} else {
 	  ERR("Unhandled vertex processing !\n");
 	}
-	
+
 	instr += size;
       }
     } break;
-      
+
     case D3DOP_TEXTURELOAD: {
       TRACE("TEXTURELOAD-s    (%d)\n", count);
 
       instr += count * size;
     } break;
-      
+
     case D3DOP_EXIT: {
       TRACE("EXIT             (%d)\n", count);
       /* We did this instruction */
@@ -624,14 +624,14 @@
       /* Exit this loop */
       goto end_of_buffer;
     } break;
-      
+
     case D3DOP_BRANCHFORWARD: {
       int i;
       TRACE("BRANCHFORWARD    (%d)\n", count);
 
       for (i = 0; i < count; i++) {
 	LPD3DBRANCH ci = (LPD3DBRANCH) instr;
-	
+
 	if ((ilpBuff->data.dsStatus.dwStatus & ci->dwMask) == ci->dwValue) {
 	  if (!ci->bNegate) {
 	    TRACE(" Should branch to %ld\n", ci->dwOffset);
@@ -645,22 +645,22 @@
 	instr += size;
       }
     } break;
-      
+
     case D3DOP_SPAN: {
       TRACE("SPAN-s           (%d)\n", count);
 
       instr += count * size;
     } break;
-      
+
     case D3DOP_SETSTATUS: {
       int i;
       TRACE("SETSTATUS        (%d)\n", count);
 
       for (i = 0; i < count; i++) {
 	LPD3DSTATUS ci = (LPD3DSTATUS) instr;
-	
+
 	ilpBuff->data.dsStatus = *ci;
-	
+
 	instr += size;
       }
     } break;
@@ -683,7 +683,7 @@
 LPDIRECT3DEXECUTEBUFFER d3dexecutebuffer_create(IDirect3DDeviceImpl* d3ddev, LPD3DEXECUTEBUFFERDESC lpDesc)
 {
   IDirect3DExecuteBufferImpl* eb;
-  
+
   eb = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(IDirect3DExecuteBufferImpl));
   eb->ref = 1;
   ICOM_VTBL(eb) = &executebuffer_vtable;
@@ -707,14 +707,14 @@
   } else {
     eb->need_free = FALSE;
   }
-    
+
   /* No vertices for the moment */
   eb->vertex_data = NULL;
 
   eb->desc.dwFlags |= D3DDEB_LPDATA;
 
   eb->execute = execute;
-  
+
   return (LPDIRECT3DEXECUTEBUFFER)eb;
 }
 
@@ -727,9 +727,9 @@
 							    LPVOID* ppvObj)
 {
   ICOM_THIS(IDirect3DExecuteBufferImpl,iface);
-  
+
   FIXME("(%p)->(%s,%p): stub\n", This, debugstr_guid(riid),ppvObj);
-  
+
   return S_OK;
 }
 
@@ -739,7 +739,7 @@
 {
   ICOM_THIS(IDirect3DExecuteBufferImpl,iface);
   TRACE("(%p)->()incrementing from %lu.\n", This, This->ref );
-  
+
   return ++(This->ref);
 }
 
@@ -749,7 +749,7 @@
 {
   ICOM_THIS(IDirect3DExecuteBufferImpl,iface);
   FIXME("(%p)->() decrementing from %lu.\n", This, This->ref );
-  
+
   if (!--(This->ref)) {
     if ((This->desc.lpData != NULL) && This->need_free)
       HeapFree(GetProcessHeap(),0,This->desc.lpData);
@@ -760,7 +760,7 @@
     HeapFree(GetProcessHeap(),0,This);
     return 0;
   }
-  
+
   return This->ref;
 }
 
@@ -770,7 +770,7 @@
 {
   ICOM_THIS(IDirect3DExecuteBufferImpl,iface);
   FIXME("(%p)->(%p,%p): stub\n", This, lpDirect3DDevice, lpDesc);
-  
+
   return DD_OK;
 }
 
@@ -782,7 +782,7 @@
 
   /* Copies the buffer description */
   *lpDesc = This->desc;
-  
+
   return DD_OK;
 }
 
@@ -806,7 +806,7 @@
 
   /* Get the number of vertices in the execute buffer */
   nbvert = This->data.dwVertexCount;
-    
+
   /* Prepares the transformed vertex buffer */
   if (This->vertex_data != NULL)
     HeapFree(GetProcessHeap(), 0, This->vertex_data);
@@ -816,7 +816,7 @@
   if (TRACE_ON(ddraw)) {
     _dump_executedata(lpData);
   }
-  
+
   return DD_OK;
 }
 
@@ -827,7 +827,7 @@
   TRACE("(%p)->(%p): stub\n", This, lpData);
 
   *lpData = This->data;
-  
+
   return DD_OK;
 }
 
@@ -856,7 +856,7 @@
 /*******************************************************************************
  *				IDirect3DLight VTable
  */
-static ICOM_VTABLE(IDirect3DExecuteBuffer) executebuffer_vtable = 
+static ICOM_VTABLE(IDirect3DExecuteBuffer) executebuffer_vtable =
 {
   ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
   /*** IUnknown methods ***/
diff --git a/dlls/ddraw/d3dlight.c b/dlls/ddraw/d3dlight.c
index a734f9a..cbe8ebf 100644
--- a/dlls/ddraw/d3dlight.c
+++ b/dlls/ddraw/d3dlight.c
@@ -29,7 +29,7 @@
 #include "mesa_private.h"
 
 WINE_DEFAULT_DEBUG_CHANNEL(ddraw);
-    
+
 #define D3DLPRIVATE(x) mesa_d3dl_private*dlpriv=((mesa_d3dl_private*)x->private)
 
 static ICOM_VTABLE(IDirect3DLight) light_vtable;
@@ -52,14 +52,14 @@
   case D3DLIGHT_POINT:         /* 1 */
     TRACE("Activating POINT\n");
     break;
-    
+
   case D3DLIGHT_SPOT:          /* 2 */
     TRACE("Activating SPOT\n");
     break;
-    
+
   case D3DLIGHT_DIRECTIONAL: {  /* 3 */
     float direction[4];
-    
+
     TRACE("Activating DIRECTIONAL\n");
     TRACE("  direction : %f %f %f\n",
 	  This->light.dvDirection.u1.x,
@@ -77,7 +77,7 @@
 
     glLightfv(dlpriv->light_num, GL_POSITION, (float *) direction);
   } break;
-    
+
   case D3DLIGHT_PARALLELPOINT:  /* 4 */
     TRACE("Activating PARRALLEL-POINT\n");
     break;
@@ -109,7 +109,7 @@
 LPDIRECT3DLIGHT d3dlight_create(IDirect3D2Impl* d3d2)
 {
   IDirect3DLightImpl* light;
-  
+
   light = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(IDirect3DLightImpl));
   light->ref = 1;
   ICOM_VTBL(light) = &light_vtable;
@@ -120,26 +120,26 @@
   light->prev = NULL;
   light->activate = activate;
   light->is_active = 0;
-  
+
   return (LPDIRECT3DLIGHT)light;
 }
 
 LPDIRECT3DLIGHT d3dlight_create_dx3(IDirect3DImpl* d3d1)
 {
   IDirect3DLightImpl* light;
-  
+
   light = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(IDirect3DLightImpl));
   light->ref = 1;
   ICOM_VTBL(light) = &light_vtable;
-  
+
   light->d3d.d3d1 = d3d1;
   light->type = D3D_1;
-  
+
   light->next = NULL;
   light->prev = NULL;
   light->activate = activate;
   light->is_active = 0;
-  
+
   return (LPDIRECT3DLIGHT)light;
 }
 
@@ -152,9 +152,9 @@
 						    LPVOID* ppvObj)
 {
   ICOM_THIS(IDirect3DLightImpl,iface);
-  
+
   FIXME("(%p)->(%s,%p): stub\n", This, debugstr_guid(riid),ppvObj);
-  
+
   return S_OK;
 }
 
@@ -164,7 +164,7 @@
 {
   ICOM_THIS(IDirect3DLightImpl,iface);
   TRACE("(%p)->()incrementing from %lu.\n", This, This->ref );
-  
+
   return ++(This->ref);
 }
 
@@ -174,12 +174,12 @@
 {
   ICOM_THIS(IDirect3DLightImpl,iface);
   FIXME("(%p)->() decrementing from %lu.\n", This, This->ref );
-  
+
   if (!--(This->ref)) {
     HeapFree(GetProcessHeap(),0,This);
     return 0;
   }
-  
+
   return This->ref;
 }
 
@@ -196,7 +196,7 @@
   TRACE("(%p)->(%p)\n", This, lpLight);
   if (TRACE_ON(ddraw))
     dump_light(lpLight);
-  
+
   /* Copies the light structure */
   switch (This->type) {
   case D3D_1:
@@ -206,7 +206,7 @@
     *((LPD3DLIGHT2)lpLight) = *((LPD3DLIGHT2) &(This->light));
     break;
   }
-  
+
   return DD_OK;
 }
 
@@ -217,7 +217,7 @@
   TRACE("(%p)->(%p)\n", This, lpLight);
   if (TRACE_ON(ddraw))
     dump_light(lpLight);
-  
+
   /* Stores the light */
   switch (This->type) {
   case D3D_1:
@@ -227,12 +227,12 @@
     *((LPD3DLIGHT2) &(This->light)) = *((LPD3DLIGHT2)lpLight);
     break;
   }
-  
+
   ENTER_GL();
   if (This->is_active)
     update(This);
   LEAVE_GL();
-  
+
   return DD_OK;
 }
 
@@ -250,7 +250,7 @@
 /*******************************************************************************
  *				IDirect3DLight VTable
  */
-static ICOM_VTABLE(IDirect3DLight) light_vtable = 
+static ICOM_VTABLE(IDirect3DLight) light_vtable =
 {
   ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
   /*** IUnknown methods ***/
diff --git a/dlls/ddraw/d3dmaterial.c b/dlls/ddraw/d3dmaterial.c
index 64e61a0..ff8dbdd 100644
--- a/dlls/ddraw/d3dmaterial.c
+++ b/dlls/ddraw/d3dmaterial.c
@@ -38,7 +38,7 @@
  */
 static void activate(IDirect3DMaterial2Impl* This) {
   TRACE("Activating material %p\n", This);
-  
+
   ENTER_GL();
   /* First, set the rendering context */
   if (This->use_d3d2)
@@ -63,13 +63,13 @@
   glMaterialfv(GL_FRONT,
 	       GL_EMISSION,
 	       (float *) &(This->mat.u3.emissive));
-  
+
   TRACE("Size  : %ld\n", This->mat.dwSize);
   TRACE("Power : %f\n", This->mat.u4.power);
 
   TRACE("Texture handle : %08lx\n", (DWORD)This->mat.hTexture);
   LEAVE_GL();
-  
+
   return ;
 }
 
@@ -79,7 +79,7 @@
 LPDIRECT3DMATERIAL2 d3dmaterial2_create(IDirect3D2Impl* d3d2)
 {
   IDirect3DMaterial2Impl* mat;
-  
+
   mat = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(IDirect3DMaterial2Impl));
   mat->ref = 1;
   ICOM_VTBL(mat) = &material2_vtable;
@@ -88,14 +88,14 @@
   mat->d3d.d3d2 = d3d2;
 
   mat->activate = activate;
-  
+
   return (LPDIRECT3DMATERIAL2)mat;
 }
 
 LPDIRECT3DMATERIAL d3dmaterial_create(IDirect3DImpl* d3d1)
 {
   IDirect3DMaterial2Impl* mat;
-  
+
   mat = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(IDirect3DMaterial2Impl));
   mat->ref = 1;
   ICOM_VTBL(mat) = (ICOM_VTABLE(IDirect3DMaterial2)*)&material_vtable;
@@ -104,7 +104,7 @@
   mat->d3d.d3d1 = d3d1;
 
   mat->activate = activate;
-  
+
   return (LPDIRECT3DMATERIAL) mat;
 }
 
@@ -117,9 +117,9 @@
 							LPVOID* ppvObj)
 {
   ICOM_THIS(IDirect3DMaterial2Impl,iface);
-  
+
   FIXME("(%p)->(%s,%p): stub\n", This, debugstr_guid(riid),ppvObj);
-  
+
   return S_OK;
 }
 
@@ -129,7 +129,7 @@
 {
   ICOM_THIS(IDirect3DMaterial2Impl,iface);
   TRACE("(%p)->()incrementing from %lu.\n", This, This->ref );
-  
+
   return ++(This->ref);
 }
 
@@ -139,12 +139,12 @@
 {
   ICOM_THIS(IDirect3DMaterial2Impl,iface);
   FIXME("(%p)->() decrementing from %lu.\n", This, This->ref );
-  
+
   if (!--(This->ref)) {
     HeapFree(GetProcessHeap(),0,This);
     return 0;
   }
-  
+
   return This->ref;
 }
 
@@ -161,10 +161,10 @@
   TRACE("(%p)->(%p)\n", This, lpMat);
   if (TRACE_ON(ddraw))
     dump_material(lpMat);
-  
+
   /* Copies the material structure */
   *lpMat = This->mat;
-  
+
   return DD_OK;
 }
 
@@ -175,10 +175,10 @@
   TRACE("(%p)->(%p)\n", This, lpMat);
   if (TRACE_ON(ddraw))
     dump_material(lpMat);
-  
+
   /* Stores the material */
   This->mat = *lpMat;
-  
+
   return DD_OK;
 }
 
@@ -194,9 +194,9 @@
     This->device.active_device2 = (IDirect3DDevice2Impl*)lpD3DDevice2;
   else
     This->device.active_device1 = (IDirect3DDeviceImpl*)lpD3DDevice2;
-  
+
   *lpMatHandle = (DWORD) This; /* lpD3DDevice2->store_material(This); */
-  
+
   return DD_OK;
 }
 
@@ -207,7 +207,7 @@
 
   return DDERR_INVALIDPARAMS;
 }
-						  
+
 static HRESULT WINAPI IDirect3DMaterialImpl_Unreserve(LPDIRECT3DMATERIAL iface)
 {
   ICOM_THIS(IDirect3DMaterial2Impl,iface);
@@ -222,7 +222,7 @@
 {
   ICOM_THIS(IDirect3DMaterial2Impl,iface);
   TRACE("(%p)->(%p)\n", This, lpDirect3D);
-  
+
   return DDERR_ALREADYINITIALIZED;
 }
 
@@ -236,7 +236,7 @@
 # define XCAST(fun)	(void*)
 #endif
 
-static ICOM_VTABLE(IDirect3DMaterial) material_vtable = 
+static ICOM_VTABLE(IDirect3DMaterial) material_vtable =
 {
   ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
   /*** IUnknown methods ***/
@@ -259,7 +259,7 @@
 /*******************************************************************************
  *				IDirect3DMaterial2 VTable
  */
-static ICOM_VTABLE(IDirect3DMaterial2) material2_vtable = 
+static ICOM_VTABLE(IDirect3DMaterial2) material2_vtable =
 {
   ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
   /*** IUnknown methods ***/
diff --git a/dlls/ddraw/d3dtexture.c b/dlls/ddraw/d3dtexture.c
index 199a1da..9728f97 100644
--- a/dlls/ddraw/d3dtexture.c
+++ b/dlls/ddraw/d3dtexture.c
@@ -43,7 +43,7 @@
 
 #ifdef TEXTURE_SNOOP
 #include <stdio.h>
-     
+
 #define SNOOP_PALETTED() 									\
       {												\
 	FILE *f;										\
@@ -118,14 +118,14 @@
 LPDIRECT3DTEXTURE2 d3dtexture2_create(IDirectDrawSurfaceImpl* surf)
 {
   IDirect3DTexture2Impl* tex;
-  
+
   tex = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(IDirect3DTexture2Impl));
   tex->ref = 1;
   ICOM_VTBL(tex) = &mesa_texture2_vtable;
   tex->surface = surf;
 
   tex->private = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(mesa_d3dt_private));
-  
+
   return (LPDIRECT3DTEXTURE2)tex;
 }
 
@@ -135,14 +135,14 @@
 LPDIRECT3DTEXTURE d3dtexture_create(IDirectDrawSurfaceImpl* surf)
 {
   IDirect3DTexture2Impl* tex;
-  
+
   tex = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(IDirect3DTexture2Impl));
   tex->ref = 1;
   ICOM_VTBL(tex) = (ICOM_VTABLE(IDirect3DTexture2)*)&mesa_texture_vtable;
   tex->surface = surf;
 
   tex->private = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(mesa_d3dt_private));
-  
+
   return (LPDIRECT3DTEXTURE)tex;
 }
 
@@ -155,7 +155,7 @@
   D3DTPRIVATE(texture);
   int bpp;
   GLuint current_texture;
-  
+
   TRACE("(%p) : colorkey callback\n", texture);
 
   /* Get the texture description */
@@ -163,7 +163,7 @@
   bpp = (tex_d->ddpfPixelFormat.dwFlags & DDPF_PALETTEINDEXED8 ?
 	 1 /* 8 bit of palette index */:
 	 tex_d->ddpfPixelFormat.u1.dwRGBBitCount / 8 /* RGB bits for each colors */ );
-  
+
   /* Now, save the current texture */
   ENTER_GL();
   glGetIntegerv(GL_TEXTURE_BINDING_2D, &current_texture);
@@ -193,13 +193,13 @@
 	for (y = 0; y < tex_d->dwHeight; y++) {
 	  for (x = 0; x < tex_d->dwWidth; x++) {
 	    unsigned short cpixel = src[x + y * tex_d->dwWidth];
-	    
+
 	    if ((dwFlags & DDCKEY_SRCBLT) &&
 		(cpixel >= ckey->dwColorSpaceLowValue) &&
 		(cpixel <= ckey->dwColorSpaceHighValue)) /* No alpha bit => this pixel is transparent */
 	      dest[x + y * tex_d->dwWidth] = (cpixel & ~0x003F) | ((cpixel & 0x001F) << 1) | 0x0000;
 	    else                                         /* Alpha bit is set => this pixel will be seen */
-	      dest[x + y * tex_d->dwWidth] = (cpixel & ~0x003F) | ((cpixel & 0x001F) << 1) | 0x0001; 
+	      dest[x + y * tex_d->dwWidth] = (cpixel & ~0x003F) | ((cpixel & 0x001F) << 1) | 0x0001;
 	  }
 	}
 
@@ -245,9 +245,9 @@
 							LPVOID* ppvObj)
 {
   ICOM_THIS(IDirect3DTexture2Impl,iface);
-  
+
   FIXME("(%p)->(%s,%p): stub\n", This, debugstr_guid(riid),ppvObj);
-  
+
   return S_OK;
 }
 
@@ -257,7 +257,7 @@
 {
   ICOM_THIS(IDirect3DTexture2Impl,iface);
   TRACE("(%p)->()incrementing from %lu.\n", This, This->ref );
-  
+
   return ++(This->ref);
 }
 
@@ -268,20 +268,20 @@
   ICOM_THIS(IDirect3DTexture2Impl,iface);
   D3DTPRIVATE(This);
   FIXME("(%p)->() decrementing from %lu.\n", This, This->ref );
-  
+
   if (!--(This->ref)) {
     /* Delete texture from OpenGL */
     ENTER_GL();
     glDeleteTextures(1, &(dtpriv->tex_name));
     LEAVE_GL();
-    
+
     /* Release surface */
     IDirectDrawSurface4_Release((IDirectDrawSurface4*)This->surface);
-    
+
     HeapFree(GetProcessHeap(),0,This);
     return 0;
   }
-  
+
   return This->ref;
 }
 
@@ -392,7 +392,7 @@
   /* Install the callbacks to the destination surface */
   This->surface->texture = This;
   This->surface->SetColorKey_cb = SetColorKey_cb;
-  
+
   if ((src_d->dwWidth != dst_d->dwWidth) || (src_d->dwHeight != dst_d->dwHeight)) {
     /* Should also check for same pixel format, lPitch, ... */
     ERR("Error in surface sizes\n");
@@ -410,7 +410,7 @@
     memcpy(dst_d->lpSurface, src_d->lpSurface, src_d->dwWidth * src_d->dwHeight * bpp);
 
     ENTER_GL();
-    
+
     /* Now, load the texture */
     /* d3dd->set_context(d3dd); We need to set the context somehow.... */
     glGetIntegerv(GL_TEXTURE_BINDING_2D, &current_texture);
@@ -434,7 +434,7 @@
 	  ((Mesa_DeviceCapabilities *) ((x11_dd_private *) This->surface->s.ddraw->d->private)->device_capabilities)->ptr_ColorTableEXT;
       }
 #endif
-      
+
       if (pal == NULL) {
 	ERR("Palettized texture Loading with a NULL palette !\n");
 	LEAVE_GL();
@@ -453,7 +453,7 @@
 	else
 	table[i][3] = 0xFF;
       }
-      
+
       /* Texture snooping */
       SNOOP_PALETTED();
 
@@ -465,7 +465,7 @@
 			  GL_RGBA,          /* table format */
 			  GL_UNSIGNED_BYTE, /* table type */
 			  table);           /* the color table */
-	
+
 	glTexImage2D(GL_TEXTURE_2D,       /* target */
 		     0,                   /* level */
 		     GL_COLOR_INDEX8_EXT, /* internal format */
@@ -478,7 +478,7 @@
 	DWORD *surface = (DWORD *) HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, src_d->dwWidth * src_d->dwHeight * sizeof(DWORD));
 	DWORD i;
 	BYTE *src = (BYTE *) src_d->lpSurface, *dst = (BYTE *) surface;
-	
+
 	for (i = 0; i < src_d->dwHeight * src_d->dwWidth; i++) {
 	  BYTE color = *src++;
 	  *dst++ = table[color][0];
@@ -486,7 +486,7 @@
 	  *dst++ = table[color][2];
 	  *dst++ = table[color][3];
 	}
-	
+
 	glTexImage2D(GL_TEXTURE_2D,
 		     0,
 		     GL_RGBA,
@@ -495,7 +495,7 @@
 		     GL_RGBA,
 		     GL_UNSIGNED_BYTE,
 		     surface);
-	
+
 	HeapFree(GetProcessHeap(), 0, surface);
       }
     } else if (src_d->ddpfPixelFormat.dwFlags & DDPF_RGB) {
@@ -504,7 +504,7 @@
 	 ************ */
       if (src_d->ddpfPixelFormat.u1.dwRGBBitCount == 8) {
 	/* **********************
-	   GL_UNSIGNED_BYTE_3_3_2 
+	   GL_UNSIGNED_BYTE_3_3_2
 	   ********************** */
 	glTexImage2D(GL_TEXTURE_2D,
 		     0,
@@ -516,10 +516,10 @@
 		     src_d->lpSurface);
       } else if (src_d->ddpfPixelFormat.u1.dwRGBBitCount == 16) {
 	if (src_d->ddpfPixelFormat.u5.dwRGBAlphaBitMask == 0x00000000) {
-	    
+
 	  /* Texture snooping */
 	  SNOOP_5650();
-	  
+
 	  glTexImage2D(GL_TEXTURE_2D,
 		       0,
 		       GL_RGB,
@@ -531,7 +531,7 @@
 	} else if (src_d->ddpfPixelFormat.u5.dwRGBAlphaBitMask == 0x00000001) {
 	  /* Texture snooping */
 	  SNOOP_5551();
-	  
+
 	  glTexImage2D(GL_TEXTURE_2D,
 		       0,
 		       GL_RGBA,
@@ -560,7 +560,7 @@
 		      ((*src & 0x7FFF) <<  1));
 	    src++;
 	  }
-	  
+
 	  glTexImage2D(GL_TEXTURE_2D,
 		       0,
 		       GL_RGBA,
@@ -569,8 +569,8 @@
 		       GL_RGBA,
 		       GL_UNSIGNED_SHORT_5_5_5_1,
 		       surface);
-	  
-	  HeapFree(GetProcessHeap(), 0, surface);	  
+
+	  HeapFree(GetProcessHeap(), 0, surface);
 	} else {
 	  ERR("Unhandled texture format (bad Aplha channel for a 16 bit texture)\n");
 	}
@@ -603,7 +603,7 @@
 
     LEAVE_GL();
   }
-  
+
   return D3D_OK;
 }
 
@@ -611,7 +611,7 @@
 /*******************************************************************************
  *				IDirect3DTexture2 VTable
  */
-ICOM_VTABLE(IDirect3DTexture2) mesa_texture2_vtable = 
+ICOM_VTABLE(IDirect3DTexture2) mesa_texture2_vtable =
 {
   ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
   /*** IUnknown methods ***/
@@ -633,7 +633,7 @@
 # define XCAST(fun)	(void*)
 #endif
 
-ICOM_VTABLE(IDirect3DTexture) mesa_texture_vtable = 
+ICOM_VTABLE(IDirect3DTexture) mesa_texture_vtable =
 {
   ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
   /*** IUnknown methods ***/
diff --git a/dlls/ddraw/d3dviewport.c b/dlls/ddraw/d3dviewport.c
index 4cf4608..0309ba3 100644
--- a/dlls/ddraw/d3dviewport.c
+++ b/dlls/ddraw/d3dviewport.c
@@ -43,7 +43,7 @@
  */
 static void activate(IDirect3DViewport2Impl* This) {
   IDirect3DLightImpl* l;
-  
+
   /* Activate all the lights associated with this context */
   l = This->lights;
 
@@ -59,7 +59,7 @@
 LPDIRECT3DVIEWPORT2 d3dviewport2_create(IDirect3D2Impl* d3d2)
 {
   IDirect3DViewport2Impl* vp;
-  
+
   vp = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(IDirect3DViewport2Impl));
   vp->private = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(mesa_d3dv_private));
   vp->ref = 1;
@@ -73,14 +73,14 @@
   vp->lights = NULL;
 
   ((mesa_d3dv_private *) vp->private)->nextlight = GL_LIGHT0;
-  
+
   return (LPDIRECT3DVIEWPORT2)vp;
 }
 
 LPDIRECT3DVIEWPORT d3dviewport_create(IDirect3DImpl* d3d1)
 {
   IDirect3DViewport2Impl* vp;
-  
+
   vp = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(IDirect3DViewport2Impl));
   vp->private = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(mesa_d3dv_private));
   vp->ref = 1;
@@ -94,7 +94,7 @@
   vp->lights = NULL;
 
   ((mesa_d3dv_private *) vp->private)->nextlight = GL_LIGHT0;
-  
+
   return (LPDIRECT3DVIEWPORT) vp;
 }
 
@@ -107,9 +107,9 @@
 							LPVOID* ppvObj)
 {
   ICOM_THIS(IDirect3DViewport2Impl,iface);
-  
+
   FIXME("(%p)->(%s,%p): stub\n", This, debugstr_guid(riid),ppvObj);
-  
+
   return S_OK;
 }
 
@@ -119,7 +119,7 @@
 {
   ICOM_THIS(IDirect3DViewport2Impl,iface);
   TRACE("(%p)->()incrementing from %lu.\n", This, This->ref );
-  
+
   return ++(This->ref);
 }
 
@@ -129,12 +129,12 @@
 {
   ICOM_THIS(IDirect3DViewport2Impl,iface);
   FIXME("(%p)->() decrementing from %lu.\n", This, This->ref );
-  
+
   if (!--(This->ref)) {
     HeapFree(GetProcessHeap(),0,This);
     return 0;
   }
-  
+
   return This->ref;
 }
 
@@ -144,7 +144,7 @@
 {
   ICOM_THIS(IDirect3DViewport2Impl,iface);
   FIXME("(%p)->(%p): stub\n", This, d3d);
-  
+
   return DD_OK;
 }
 
@@ -153,12 +153,12 @@
 {
   ICOM_THIS(IDirect3DViewport2Impl,iface);
   FIXME("(%p)->(%p): stub\n", This, lpvp);
-  
+
   if (This->use_vp2 != 0)
     return DDERR_INVALIDPARAMS;
 
   *lpvp = This->viewport.vp1;
-  
+
   return DD_OK;
 }
 
@@ -170,7 +170,7 @@
 
   This->use_vp2 = 0;
   This->viewport.vp1 = *lpvp;
-  
+
   TRACE("dwSize = %ld   dwX = %ld   dwY = %ld\n",
 	lpvp->dwSize, lpvp->dwX, lpvp->dwY);
   TRACE("dwWidth = %ld   dwHeight = %ld\n",
@@ -182,7 +182,7 @@
   TRACE("dvMinZ = %f   dvMaxZ = %f\n",
 	lpvp->dvMinZ, lpvp->dvMaxZ);
 
-  
+
   return DD_OK;
 }
 
@@ -195,7 +195,7 @@
   ICOM_THIS(IDirect3DViewport2Impl,iface);
   FIXME("(%p)->(%8ld,%p,%08lx,%p): stub\n",
 	This, dwVertexCount, lpData, dwFlags, lpOffScreen);
-  
+
   return DD_OK;
 }
 
@@ -205,7 +205,7 @@
 {
   ICOM_THIS(IDirect3DViewport2Impl,iface);
   FIXME("(%p)->(%8ld,%p): stub\n", This, dwElementCount, lpData);
-  
+
   return DD_OK;
 }
 
@@ -214,7 +214,7 @@
 {
   ICOM_THIS(IDirect3DViewport2Impl,iface);
   FIXME("(%p)->(%08lx): stub\n", This, (DWORD) hMat);
-  
+
   return DD_OK;
 }
 
@@ -224,7 +224,7 @@
 {
   ICOM_THIS(IDirect3DViewport2Impl,iface);
   FIXME("(%p)->(%p,%p): stub\n", This, lphMat, lpValid);
-  
+
   return DD_OK;
 }
 
@@ -233,7 +233,7 @@
 {
   ICOM_THIS(IDirect3DViewport2Impl,iface);
   FIXME("(%p)->(%p): stub\n", This, lpDDSurface);
-  
+
   return DD_OK;
 }
 
@@ -243,7 +243,7 @@
 {
   ICOM_THIS(IDirect3DViewport2Impl,iface);
   FIXME("(%p)->(%p,%p): stub\n", This, lplpDDSurface, lpValid);
-  
+
   return DD_OK;
 }
 
@@ -272,7 +272,7 @@
     glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
     glDepthMask(ztest);
     LEAVE_GL();
-  
+
   return DD_OK;
 }
 
@@ -291,18 +291,18 @@
   if (This->device.active_device1 != NULL) {
     D3DVPRIVATE(This);
     D3DLPRIVATE(ilpLight);
-    
+
     /* Get the rendering context */
     if (This->use_d3d2)
       This->device.active_device2->set_context(This->device.active_device2);
     else
       This->device.active_device1->set_context(This->device.active_device1);
-    
+
     /* Activate the light */
     dlpriv->light_num = dvpriv->nextlight++;
     ilpLight->activate(ilpLight);
   }
-  
+
   return DD_OK;
 }
 
@@ -311,7 +311,7 @@
 {
   ICOM_THIS(IDirect3DViewport2Impl,iface);
   FIXME("(%p)->(%p): stub\n", This, lpLight);
-  
+
   return DD_OK;
 }
 
@@ -322,7 +322,7 @@
 {
   ICOM_THIS(IDirect3DViewport2Impl,iface);
   FIXME("(%p)->(%p,%p,%08lx): stub\n", This, lpLight, lplpLight, dwFlags);
-  
+
   return DD_OK;
 }
 
@@ -337,7 +337,7 @@
     return DDERR_INVALIDPARAMS;
 
   *lpViewport2 = This->viewport.vp2;
-  
+
   return DD_OK;
 }
 
@@ -360,7 +360,7 @@
 
   This->viewport.vp2 = *lpViewport2;
   This->use_vp2 = 1;
-  
+
   return DD_OK;
 }
 
@@ -368,7 +368,7 @@
 /*******************************************************************************
  *				IDirect3DViewport1/2 VTable
  */
-static ICOM_VTABLE(IDirect3DViewport2) viewport2_vtable = 
+static ICOM_VTABLE(IDirect3DViewport2) viewport2_vtable =
 {
   ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
   /*** IUnknown methods ***/
diff --git a/dlls/ddraw/dclipper/main.c b/dlls/ddraw/dclipper/main.c
index 9f64291..ae9c83e 100644
--- a/dlls/ddraw/dclipper/main.c
+++ b/dlls/ddraw/dclipper/main.c
@@ -54,7 +54,7 @@
 
     ICOM_INIT_INTERFACE(This, IDirectDrawClipper, DDRAW_Clipper_VTable);
     This->ref = 1;
-    This->hWnd = 0; 
+    This->hWnd = 0;
     This->ddraw_owner = NULL;
 
     *lplpDDClipper = ICOM_INTERFACE(This, IDirectDrawClipper);
@@ -87,7 +87,7 @@
     TRACE("(%p)->SetHwnd(0x%08lx,0x%08lx)\n",This,dwFlags,(DWORD)hWnd);
     if( dwFlags ) {
 	FIXME("dwFlags = 0x%08lx, not supported.\n",dwFlags);
-	return DDERR_INVALIDPARAMS; 
+	return DDERR_INVALIDPARAMS;
     }
 
     This->hWnd = hWnd;
@@ -170,7 +170,7 @@
     ICOM_THIS(IDirectDrawClipperImpl,iface);
     FIXME("(%p)->(%p),stub!\n",This,hWndPtr);
 
-    *hWndPtr = This->hWnd; 
+    *hWndPtr = This->hWnd;
 
     return DD_OK;
 }
diff --git a/dlls/ddraw/ddraw/hal.c b/dlls/ddraw/ddraw/hal.c
index 9710e52..d2b8ddc 100644
--- a/dlls/ddraw/ddraw/hal.c
+++ b/dlls/ddraw/ddraw/hal.c
@@ -47,7 +47,7 @@
 static DD32BITDRIVERDATA hal_driverdata;
 static HINSTANCE hal_instance;
 
-static const DDDEVICEIDENTIFIER2 hal_device = 
+static const DDDEVICEIDENTIFIER2 hal_device =
 {
     "display",
     "DirectDraw HAL",
@@ -501,7 +501,7 @@
 
     TRACE("(%p)->(%ldx%ldx%ld,%ld Hz,%08lx)\n",This,dwWidth,dwHeight,dwBPP,dwRefreshRate,dwFlags);
     hr = User_DirectDraw_SetDisplayMode(iface, dwWidth, dwHeight, dwBPP,
-					dwRefreshRate, dwFlags);      
+					dwRefreshRate, dwFlags);
 
     if (SUCCEEDED(hr)) {
 	if (!(dd_gbl.dwFlags & DDRAWI_MODECHANGED)) dd_gbl.dwModeIndexOrig = dd_gbl.dwModeIndex;
diff --git a/dlls/ddraw/ddraw/hal.h b/dlls/ddraw/ddraw/hal.h
index 89cc8d8..32ca71d 100644
--- a/dlls/ddraw/ddraw/hal.h
+++ b/dlls/ddraw/ddraw/hal.h
@@ -50,11 +50,11 @@
 				      LPDIRECTDRAWSURFACE7* ppSurf,
 				      LPUNKNOWN pOuter,
 				      DWORD dwMipMapLevel);
-                                                                                                 
+
 HRESULT HAL_DirectDraw_Construct(IDirectDrawImpl *This, BOOL ex);
 HRESULT HAL_DirectDraw_Create(const GUID* pGUID, LPDIRECTDRAW7* pIface,
 				   IUnknown* pUnkOuter, BOOL ex);
-                                  
+
 
 HRESULT WINAPI
 HAL_DirectDraw_GetDeviceIdentifier(LPDIRECTDRAW7 iface,
diff --git a/dlls/ddraw/ddraw/main.c b/dlls/ddraw/ddraw/main.c
index 3d61268..b4bd0d5 100644
--- a/dlls/ddraw/ddraw/main.c
+++ b/dlls/ddraw/ddraw/main.c
@@ -915,11 +915,11 @@
 	return DD_OK;
 
     /* XXX "It cannot be reset while the process has surfaces or palettes
-     * created." Otherwise the window can be changed??? 
-     * 
+     * created." Otherwise the window can be changed???
+     *
      * This appears to be wrong - comment it out for now.
     if (This->window)
-	return DDERR_HWNDALREADYSET; 
+	return DDERR_HWNDALREADYSET;
     */
 
     if (!(cooplevel & (DDSCL_EXCLUSIVE|DDSCL_NORMAL)))
@@ -965,7 +965,7 @@
 {
     short screenX;
     short screenY;
-    
+
     ICOM_THIS(IDirectDrawImpl,iface);
 
     TRACE("(%p)->SetDisplayMode(%ld,%ld)\n",This,dwWidth,dwHeight);
@@ -980,14 +980,14 @@
 
     screenX = GetSystemMetrics(SM_CXSCREEN);
     screenY = GetSystemMetrics(SM_CYSCREEN);
-    
+
     This->width = dwWidth;
     This->height = dwHeight;
     This->pitch = lPitch;
     This->pixelformat = *pixelformat;
 
     /* Position the window in the center of the screen - don't center for now */
-    /* MoveWindow(This->window, (screenX-dwWidth)/2, (screenY-dwHeight)/2, 
+    /* MoveWindow(This->window, (screenX-dwWidth)/2, (screenY-dwHeight)/2,
                   dwWidth, dwHeight, TRUE);*/
     MoveWindow(This->window, 0, 0, dwWidth, dwHeight, TRUE);
 
@@ -1208,7 +1208,7 @@
 
 /******************************************************************************
  * Uninitialised DirectDraw functions
- * 
+ *
  * This vtable is used when a DirectDraw object is created with
  * CoCreateInstance. The only usable method is Initialize.
  */
diff --git a/dlls/ddraw/ddraw/thunks.c b/dlls/ddraw/ddraw/thunks.c
index 69a928a..396824d 100644
--- a/dlls/ddraw/ddraw/thunks.c
+++ b/dlls/ddraw/ddraw/thunks.c
@@ -202,7 +202,7 @@
     LPDIRECTDRAWSURFACE7 pSurface7;
     HRESULT hr;
 
-    /* the LPDDSURFACEDESC -> LPDDSURFACEDESC2 conversion should be ok, 
+    /* the LPDDSURFACEDESC -> LPDDSURFACEDESC2 conversion should be ok,
      * since the data layout is the same */
     hr = IDirectDraw7_CreateSurface(COM_INTERFACE_CAST(IDirectDrawImpl,
 						       IDirectDraw,
@@ -387,7 +387,7 @@
 
     /* This coercion is safe, since the IDirectDrawSurface3 vtable has the
      * IDirectDrawSurface vtable layout at the beginning  */
-    return cbcontext->func((LPDIRECTDRAWSURFACE) 
+    return cbcontext->func((LPDIRECTDRAWSURFACE)
                            COM_INTERFACE_CAST(IDirectDrawSurfaceImpl,
 					      IDirectDrawSurface7,
 					      IDirectDrawSurface3, pSurf),
diff --git a/dlls/ddraw/ddraw/user.c b/dlls/ddraw/ddraw/user.c
index b781027..6b339e3 100644
--- a/dlls/ddraw/ddraw/user.c
+++ b/dlls/ddraw/ddraw/user.c
@@ -37,7 +37,7 @@
 
 static ICOM_VTABLE(IDirectDraw7) User_DirectDraw_VTable;
 
-static const DDDEVICEIDENTIFIER2 user_device = 
+static const DDDEVICEIDENTIFIER2 user_device =
 {
     "display",
     "User (and GDI)",
@@ -48,7 +48,7 @@
     0
 };
 
-static const DDPIXELFORMAT pixelformats[] = 
+static const DDPIXELFORMAT pixelformats[] =
 {
     /* 8bpp paletted */
     { sizeof(DDPIXELFORMAT), DDPF_RGB|DDPF_PALETTEINDEXED8, 0, { 8 } },
@@ -409,7 +409,7 @@
 #define ROPS { 0, }
 #endif
 
-    static const DDCAPS caps = 
+    static const DDCAPS caps =
     { sizeof(DDCAPS),
       DDCAPS_3D | DDCAPS_GDI | DDCAPS_PALETTE | BLIT_CAPS,
       DDCAPS2_CANMANAGETEXTURE | DDCAPS2_CANRENDERWINDOWED | DDCAPS2_CERTIFIED
@@ -484,7 +484,7 @@
 #undef ROPS
 
     ICOM_THIS(IDirectDrawImpl, iface);
-	
+
     TRACE("(%p)->(%p,%p)\n",This,pDriverCaps,pHELCaps);
 
     if (pDriverCaps != NULL)
diff --git a/dlls/ddraw/ddraw_private.h b/dlls/ddraw/ddraw_private.h
index a7ad8dd..1bd5552 100644
--- a/dlls/ddraw/ddraw_private.h
+++ b/dlls/ddraw/ddraw_private.h
@@ -139,7 +139,7 @@
     HRESULT (*create_zbuffer)(IDirectDrawImpl* This,
 			      const DDSURFACEDESC2* pDDSD,
 			      LPDIRECTDRAWSURFACE7* ppSurf, LPUNKNOWN pOuter);
-    
+
     LPVOID	private;
 
     /* Everything below here is still questionable. */
@@ -281,7 +281,7 @@
     BOOL (*aux_flip)(LPVOID ctx, LPVOID data);
     void (*aux_unlock)(LPVOID ctx, LPVOID data, LPRECT lpRect);
     struct IDirect3DTexture2Impl*	texture;
-    HRESULT (WINAPI *SetColorKey_cb)(struct IDirect3DTexture2Impl *texture, DWORD dwFlags, LPDDCOLORKEY ckey ) ; 
+    HRESULT (WINAPI *SetColorKey_cb)(struct IDirect3DTexture2Impl *texture, DWORD dwFlags, LPDDCOLORKEY ckey ) ;
 };
 
 /*****************************************************************************
diff --git a/dlls/ddraw/direct3d/main.c b/dlls/ddraw/direct3d/main.c
index b212f8f..61f5fb6 100644
--- a/dlls/ddraw/direct3d/main.c
+++ b/dlls/ddraw/direct3d/main.c
@@ -167,7 +167,7 @@
  *				IDirect3D2
  */
 HRESULT WINAPI IDirect3D2Impl_QueryInterface(
-    LPDIRECT3D2 iface,REFIID refiid,LPVOID *obj) {  
+    LPDIRECT3D2 iface,REFIID refiid,LPVOID *obj) {
     ICOM_THIS(IDirect3D2Impl,iface);
 
     /* FIXME: Not sure if this is correct */
@@ -180,7 +180,7 @@
 	IDirect3D2_AddRef(iface);
 
 	TRACE("  Creating IDirectDrawX interface (%p)\n", *obj);
-	
+
 	return S_OK;
     }
     if ( ( IsEqualGUID( &IID_IDirect3D2, refiid ) ) ||
@@ -280,7 +280,7 @@
 /* This is for checking the correctness of the prototypes/functions.
  * Do not remove.
  */
-static ICOM_VTABLE(IDirect3D2) WINE_UNUSED d3d2vt = 
+static ICOM_VTABLE(IDirect3D2) WINE_UNUSED d3d2vt =
 {
     ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
     IDirect3D2Impl_QueryInterface,
diff --git a/dlls/ddraw/direct3d/mesa.c b/dlls/ddraw/direct3d/mesa.c
index fa5a536..ddbee96 100644
--- a/dlls/ddraw/direct3d/mesa.c
+++ b/dlls/ddraw/direct3d/mesa.c
@@ -148,7 +148,7 @@
     return D3D_OK;
 }
 
-ICOM_VTABLE(IDirect3D) mesa_d3dvt = 
+ICOM_VTABLE(IDirect3D) mesa_d3dvt =
 {
     ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
     MESA_IDirect3DImpl_QueryInterface,
@@ -166,7 +166,7 @@
  *				IDirect3D2
  */
 static HRESULT WINAPI MESA_IDirect3D2Impl_QueryInterface(
-    LPDIRECT3D2 iface,REFIID refiid,LPVOID *obj) {  
+    LPDIRECT3D2 iface,REFIID refiid,LPVOID *obj) {
     ICOM_THIS(IDirect3D2Impl,iface);
 
     /* FIXME: Not sure if this is correct */
@@ -179,7 +179,7 @@
 	IDirect3D2_AddRef(iface);
 
 	TRACE("  Creating IDirectDrawX interface (%p)\n", *obj);
-	
+
 	return S_OK;
     }
     if ( ( IsEqualGUID( &IID_IDirect3D2, refiid ) ) ||
@@ -292,7 +292,7 @@
     return DDERR_INVALIDPARAMS;
 }
 
-ICOM_VTABLE(IDirect3D2) mesa_d3d2vt = 
+ICOM_VTABLE(IDirect3D2) mesa_d3d2vt =
 {
     ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
     MESA_IDirect3D2Impl_QueryInterface,
@@ -405,7 +405,7 @@
     *obj = (LPUNKNOWN)d3d;
 
     TRACE("  Creating IDirect3D3 interface (%p)\n", *obj);
-    
+
     return S_OK;
 }
 
diff --git a/dlls/ddraw/dpalette/main.c b/dlls/ddraw/dpalette/main.c
index 3125943..a2c972f 100644
--- a/dlls/ddraw/dpalette/main.c
+++ b/dlls/ddraw/dpalette/main.c
@@ -194,7 +194,7 @@
 
     if (This->private != This+1)
 	HeapFree(GetProcessHeap(), 0, This->private);
-		     
+
     HeapFree(GetProcessHeap(),0,This);
 }
 
@@ -244,7 +244,7 @@
    *lpdwCaps = This->flags;
 
    return DD_OK;
-} 
+}
 
 HRESULT WINAPI
 Main_DirectDrawPalette_QueryInterface(LPDIRECTDRAWPALETTE iface,
diff --git a/dlls/ddraw/dsurface/dib.c b/dlls/ddraw/dsurface/dib.c
index b013d01..ed69701 100644
--- a/dlls/ddraw/dsurface/dib.c
+++ b/dlls/ddraw/dsurface/dib.c
@@ -455,7 +455,7 @@
 	    break;
 	case SRCCOPY: /* well, we do that below ? */
 	    break;
-	default: 
+	default:
 	    FIXME("Unsupported raster op: %08lx  Pattern: %p\n", lpbltfx->dwROP, lpbltfx->u5.lpDDSPattern);
 	    goto error;
 	}
@@ -623,7 +623,7 @@
 	else
 	  FIXME(" srcrect: NULL\n");
     }
-    
+
     /* We need to lock the surfaces, or we won't get refreshes when done. */
     sdesc.dwSize = sizeof(sdesc);
     IDirectDrawSurface7_Lock(src, NULL,&sdesc,DDLOCK_READONLY, 0);
@@ -824,7 +824,7 @@
 /* SetOverlayPosition: generic */
 
 void DIB_DirectDrawSurface_set_palette(IDirectDrawSurfaceImpl* This,
-				       IDirectDrawPaletteImpl* pal) 
+				       IDirectDrawPaletteImpl* pal)
 {
     if (!pal) return;
     if (This->surface_desc.ddsCaps.dwCaps & DDSCAPS_PRIMARYSURFACE)
diff --git a/dlls/ddraw/dsurface/gamma.c b/dlls/ddraw/dsurface/gamma.c
index eb874dd..d67141a 100644
--- a/dlls/ddraw/dsurface/gamma.c
+++ b/dlls/ddraw/dsurface/gamma.c
@@ -36,7 +36,7 @@
 
 static HRESULT WINAPI
 DirectDrawGammaControl_QueryInterface(LPDIRECTDRAWGAMMACONTROL iface, REFIID riid,
-				      LPVOID *ppObj)                        
+				      LPVOID *ppObj)
 {
     TRACE("(%p)->(%s,%p)\n", iface, debugstr_guid(riid), ppObj);
     return E_NOINTERFACE;
@@ -47,13 +47,13 @@
 {
     return IDirectDrawSurface7_AddRef(CONVERT(iface));
 }
- 
+
 static ULONG WINAPI
 DirectDrawGammaControl_Release(LPDIRECTDRAWGAMMACONTROL iface)
 {
     return IDirectDrawSurface7_Release(CONVERT(iface));
 }
- 
+
 static HRESULT WINAPI
 DirectDrawGammaControl_GetGammaRamp(LPDIRECTDRAWGAMMACONTROL iface, DWORD dwFlags, LPDDGAMMARAMP lpGammaRamp)
 {
diff --git a/dlls/ddraw/dsurface/hal.c b/dlls/ddraw/dsurface/hal.c
index 5cf70e5..d016cd4 100644
--- a/dlls/ddraw/dsurface/hal.c
+++ b/dlls/ddraw/dsurface/hal.c
@@ -107,7 +107,7 @@
 
     /* the driver may want to dereference these pointers */
     This->local.lpSurfMore = &This->more;
-    This->local.lpGbl = &This->global;   
+    This->local.lpGbl = &This->global;
     This->gmore = &This->global_more;
 
     if (This->surface_desc.ddsCaps.dwCaps & DDSCAPS_TEXTURE) {
@@ -229,7 +229,7 @@
 }
 
 void HAL_DirectDrawSurface_set_palette(IDirectDrawSurfaceImpl* This,
-				       IDirectDrawPaletteImpl* pal) 
+				       IDirectDrawPaletteImpl* pal)
 {
     LPDDRAWI_DIRECTDRAW_GBL dd_gbl = This->more.lpDD_lcl->lpGbl;
     DDHAL_SETPALETTEDATA data;
diff --git a/dlls/ddraw/dsurface/main.c b/dlls/ddraw/dsurface/main.c
index a62d105..c0b0794 100644
--- a/dlls/ddraw/dsurface/main.c
+++ b/dlls/ddraw/dsurface/main.c
@@ -480,7 +480,7 @@
 
 	/* MSDN: "The method fails if the specified [override] surface is not
 	 * a member of the flipping chain." */
-	
+
 	/* Verify that override is on this flip chain. We assume that
 	 * surf is the head of the flipping chain, because it's the front
 	 * buffer. */
@@ -575,8 +575,8 @@
 	    if (found != NULL)
             {
                 FIXME("More than one attached surface matches requested caps.  What should we do here?\n");
-                /* Previous code returned 'DDERR_NOTFOUND'.  That appears not 
-                   to be correct, given what 3DMark expects from MipMapped surfaces. 
+                /* Previous code returned 'DDERR_NOTFOUND'.  That appears not
+                   to be correct, given what 3DMark expects from MipMapped surfaces.
                    We shall just continue instead. */
             }
 
@@ -846,12 +846,12 @@
     ICOM_THIS(IDirectDrawSurfaceImpl, iface);
 
     TRACE("(%p)->(%p)\n",This,pDDSD);
-    if ((pDDSD->dwSize < sizeof(DDSURFACEDESC)) || 
+    if ((pDDSD->dwSize < sizeof(DDSURFACEDESC)) ||
     	(pDDSD->dwSize > sizeof(DDSURFACEDESC2))) {
 	ERR("Impossible/Strange struct size %ld.\n",pDDSD->dwSize);
 	return DDERR_GENERIC;
     }
-	
+
     DD_STRUCT_COPY_BYSIZE(pDDSD,&This->surface_desc);
     return DD_OK;
 }
@@ -920,7 +920,7 @@
        }
 
 	This->lock_update(This, prect, flags);
-       
+
 	pDDSD->lpSurface = (char *)This->surface_desc.lpSurface
 	    + prect->top * This->surface_desc.u1.lPitch
 	    + prect->left * GET_BPP(This->surface_desc);
diff --git a/dlls/ddraw/dsurface/user.c b/dlls/ddraw/dsurface/user.c
index 3c01f3e..f949e09 100644
--- a/dlls/ddraw/dsurface/user.c
+++ b/dlls/ddraw/dsurface/user.c
@@ -210,7 +210,7 @@
 }
 
 void User_DirectDrawSurface_set_palette(IDirectDrawSurfaceImpl* This,
-					IDirectDrawPaletteImpl* pal) 
+					IDirectDrawPaletteImpl* pal)
 {
     USER_PRIV_VAR(priv, This);
 
diff --git a/dlls/ddraw/helper.c b/dlls/ddraw/helper.c
index 0d3ee64..a775bb5 100644
--- a/dlls/ddraw/helper.c
+++ b/dlls/ddraw/helper.c
@@ -153,7 +153,7 @@
 
 void DDRAW_dump_DDSCAPS(const DDSCAPS2 *in)
 {
-    static const flag_info flags[] = 
+    static const flag_info flags[] =
 	{
 	    FE(DDSCAPS_RESERVED1),
 	    FE(DDSCAPS_ALPHA),
diff --git a/dlls/ddraw/main.c b/dlls/ddraw/main.c
index 766af8a..d3f1a5a 100644
--- a/dlls/ddraw/main.c
+++ b/dlls/ddraw/main.c
@@ -49,7 +49,7 @@
 
 typedef struct {
     LPVOID lpCallback;
-    LPVOID lpContext; 
+    LPVOID lpContext;
 } DirectDrawEnumerateProcData;
 
 /***********************************************************************
@@ -104,7 +104,7 @@
  */
 
 static BOOL CALLBACK DirectDrawEnumerateExProcW(
-    GUID *lpGUID, LPSTR lpDriverDescription, LPSTR lpDriverName, 
+    GUID *lpGUID, LPSTR lpDriverDescription, LPSTR lpDriverName,
     LPVOID lpContext, HMONITOR hm)
 {
     INT len;
@@ -143,7 +143,7 @@
  */
 
 static BOOL CALLBACK DirectDrawEnumerateProcA(
-	GUID *lpGUID, LPSTR lpDriverDescription, LPSTR lpDriverName, 
+	GUID *lpGUID, LPSTR lpDriverDescription, LPSTR lpDriverName,
 	LPVOID lpContext, HMONITOR hm)
 {
     DirectDrawEnumerateProcData *pEPD = (DirectDrawEnumerateProcData*)lpContext;
@@ -153,9 +153,9 @@
 }
 
 HRESULT WINAPI DirectDrawEnumerateA(
-  LPDDENUMCALLBACKA lpCallback, LPVOID lpContext) 
+  LPDDENUMCALLBACKA lpCallback, LPVOID lpContext)
 {
-    DirectDrawEnumerateProcData epd;  
+    DirectDrawEnumerateProcData epd;
     epd.lpCallback = (LPVOID) lpCallback;
     epd.lpContext = lpContext;
 
@@ -167,17 +167,17 @@
  */
 
 static BOOL WINAPI DirectDrawEnumerateProcW(
-  GUID *lpGUID, LPWSTR lpDriverDescription, LPWSTR lpDriverName, 
+  GUID *lpGUID, LPWSTR lpDriverDescription, LPWSTR lpDriverName,
   LPVOID lpContext, HMONITOR hm)
 {
     DirectDrawEnumerateProcData *pEPD = (DirectDrawEnumerateProcData*)lpContext;
-  
+
     return ((LPDDENUMCALLBACKW) pEPD->lpCallback)(
 	lpGUID, lpDriverDescription, lpDriverName, pEPD->lpContext);
 }
 
 HRESULT WINAPI DirectDrawEnumerateW(
-  LPDDENUMCALLBACKW lpCallback, LPVOID lpContext) 
+  LPDDENUMCALLBACKW lpCallback, LPVOID lpContext)
 {
     DirectDrawEnumerateProcData epd;
     epd.lpCallback = (LPVOID) lpCallback;
@@ -341,7 +341,7 @@
     { &CLSID_DirectDrawClipper,	DDRAW_CreateDirectDrawClipper }
 };
 
-static HRESULT WINAPI 
+static HRESULT WINAPI
 DDCF_QueryInterface(LPCLASSFACTORY iface,REFIID riid,LPVOID *ppobj)
 {
     ICOM_THIS(IClassFactoryImpl,iface);
@@ -391,7 +391,7 @@
     return S_OK;
 }
 
-static ICOM_VTABLE(IClassFactory) DDCF_Vtbl = 
+static ICOM_VTABLE(IClassFactory) DDCF_Vtbl =
 {
     ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
     DDCF_QueryInterface,
diff --git a/dlls/ddraw/mesa.c b/dlls/ddraw/mesa.c
index 62bf560..7c38354 100644
--- a/dlls/ddraw/mesa.c
+++ b/dlls/ddraw/mesa.c
@@ -29,7 +29,7 @@
 #include "mesa_private.h"
 
 WINE_DEFAULT_DEBUG_CHANNEL(ddraw);
-    
+
 #define D3DTPRIVATE(x) mesa_d3dt_private *dtpriv = (mesa_d3dt_private*)(x)->private
 
 void set_render_state(D3DRENDERSTATETYPE dwRenderStateType,
@@ -40,25 +40,25 @@
     _dump_renderstate(dwRenderStateType, dwRenderState);
 
   /* First, all the stipple patterns */
-  if ((dwRenderStateType >= D3DRENDERSTATE_STIPPLEPATTERN00) && 
+  if ((dwRenderStateType >= D3DRENDERSTATE_STIPPLEPATTERN00) &&
       (dwRenderStateType <= D3DRENDERSTATE_STIPPLEPATTERN31)) {
     ERR("Unhandled dwRenderStateType stipple %d!\n",dwRenderStateType);
   } else {
     ENTER_GL();
-    
+
     /* All others state variables */
     switch (dwRenderStateType) {
 
     case D3DRENDERSTATE_TEXTUREHANDLE: {    /*  1 */
       IDirect3DTexture2Impl* tex = (IDirect3DTexture2Impl*) dwRenderState;
-      
+
       if (tex == NULL) {
 	glBindTexture(GL_TEXTURE_2D, 0);
 	glDisable(GL_TEXTURE_2D);
 	TRACE("disabling texturing\n");
       } else {
 	D3DTPRIVATE(tex);
-	
+
 	glEnable(GL_TEXTURE_2D);
 	/* Default parameters */
 	glBindTexture(GL_TEXTURE_2D, dtpriv->tex_name);
@@ -76,14 +76,14 @@
       else
 	glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_FASTEST);
       break;
-      
+
     case D3DRENDERSTATE_ZENABLE:          /*  7 */
       if (dwRenderState)
 	glEnable(GL_DEPTH_TEST);
       else
 	glDisable(GL_DEPTH_TEST);
       break;
-      
+
     case D3DRENDERSTATE_FILLMODE:           /*  8 */
       switch ((D3DFILLMODE) dwRenderState) {
       case D3DFILL_SOLID:
@@ -108,24 +108,24 @@
 	ERR("Unhandled shade mode !\n");
       }
       break;
-      
+
     case D3DRENDERSTATE_ZWRITEENABLE:     /* 14 */
       if (dwRenderState)
 	glDepthMask(GL_TRUE);
       else
 	glDepthMask(GL_FALSE);
       break;
-      
+
     case D3DRENDERSTATE_TEXTUREMAG:         /* 17 */
       switch ((D3DTEXTUREFILTER) dwRenderState) {
       case D3DFILTER_NEAREST:
 	rs->mag = GL_NEAREST;
 	break;
-	
+
       case D3DFILTER_LINEAR:
 	rs->mag = GL_LINEAR;
 	break;
-	
+
       default:
 	ERR("Unhandled texture mag !\n");
       }
@@ -136,16 +136,16 @@
       case D3DFILTER_NEAREST:
 	rs->min = GL_NEAREST;
 	break;
-	
+
       case D3DFILTER_LINEAR:
 	rs->mag = GL_LINEAR;
 	break;
-	
+
       default:
 	ERR("Unhandled texture min !\n");
       }
       break;
-      
+
     case D3DRENDERSTATE_SRCBLEND:           /* 19 */
       switch ((D3DBLEND) dwRenderState) {
       case D3DBLEND_SRCALPHA:
@@ -155,20 +155,20 @@
       default:
 	ERR("Unhandled blend mode !\n");
       }
-      
+
       glBlendFunc(rs->src, rs->dst);
       break;
-      
+
     case D3DRENDERSTATE_DESTBLEND:          /* 20 */
       switch ((D3DBLEND) dwRenderState) {
       case D3DBLEND_INVSRCALPHA:
 	rs->dst = GL_ONE_MINUS_SRC_ALPHA;
 	break;
-	
+
       default:
 	ERR("Unhandled blend mode !\n");
       }
-      
+
       glBlendFunc(rs->src, rs->dst);
       break;
 
@@ -183,28 +183,28 @@
 	ERR("Unhandled texture environment !\n");
       }
       break;
-      
+
     case D3DRENDERSTATE_CULLMODE:           /* 22 */
       switch ((D3DCULL) dwRenderState) {
       case D3DCULL_NONE:
 	glDisable(GL_CULL_FACE);
 	break;
-	
+
       case D3DCULL_CW:
 	glEnable(GL_CULL_FACE);
 	glFrontFace(GL_CW);
 	break;
-	
+
       case D3DCULL_CCW:
 	glEnable(GL_CULL_FACE);
 	glFrontFace(GL_CCW);
 	break;
-	
+
       default:
 	ERR("Unhandled cull mode !\n");
       }
       break;
-      
+
     case D3DRENDERSTATE_ZFUNC:            /* 23 */
       switch ((D3DCMPFUNC) dwRenderState) {
       case D3DCMP_NEVER:
@@ -236,14 +236,14 @@
 	ERR("Unexpected value\n");
       }
       break;
-      
+
     case D3DRENDERSTATE_DITHERENABLE:     /* 26 */
       if (dwRenderState)
 	glEnable(GL_DITHER);
       else
 	glDisable(GL_DITHER);
       break;
-      
+
     case D3DRENDERSTATE_ALPHABLENDENABLE:   /* 27 */
       if (dwRenderState)
 	glEnable(GL_BLEND);
@@ -260,7 +260,7 @@
 
     case D3DRENDERSTATE_FLUSHBATCH:         /* 50 */
       break;
-      
+
     default:
       ERR("Unhandled dwRenderStateType %d!\n",dwRenderStateType);
       break;
diff --git a/dlls/dinput/device.c b/dlls/dinput/device.c
index 9817a20..9354d84 100644
--- a/dlls/dinput/device.c
+++ b/dlls/dinput/device.c
@@ -125,19 +125,19 @@
 		df->dt[i].offset_out, df->dt[i].offset_in, *((char *) (in_c + df->dt[i].offset_in)));
 	  *((char *) (out_c + df->dt[i].offset_out)) = *((char *) (in_c + df->dt[i].offset_in));
 	  break;
-	
+
 	case 2:
 	  TRACE("Copying (s) to %d from %d (value %d)\n",
 		df->dt[i].offset_out, df->dt[i].offset_in, *((short *) (in_c + df->dt[i].offset_in)));
 	  *((short *) (out_c + df->dt[i].offset_out)) = *((short *) (in_c + df->dt[i].offset_in));
 	  break;
-	
+
 	case 4:
 	  TRACE("Copying (i) to %d from %d (value %d)\n",
 		df->dt[i].offset_out, df->dt[i].offset_in, *((int *) (in_c + df->dt[i].offset_in)));
 	  *((int *) (out_c + df->dt[i].offset_out)) = *((int *) (in_c + df->dt[i].offset_in));
 	  break;
-	
+
 	default:
 	  memcpy((out_c + df->dt[i].offset_out), (in_c + df->dt[i].offset_in), df->dt[i].size);
 	}
@@ -148,19 +148,19 @@
 		df->dt[i].offset_out, df->dt[i].value);
 	  *((char *) (out_c + df->dt[i].offset_out)) = (char) df->dt[i].value;
 	  break;
-	
+
 	case 2:
 	  TRACE("Copying (s) to %d default value %d\n",
 		df->dt[i].offset_out, df->dt[i].value);
 	  *((short *) (out_c + df->dt[i].offset_out)) = (short) df->dt[i].value;
 	  break;
-	
+
 	case 4:
 	  TRACE("Copying (i) to %d default value %d\n",
 		df->dt[i].offset_out, df->dt[i].value);
 	  *((int *) (out_c + df->dt[i].offset_out)) = (int) df->dt[i].value;
 	  break;
-	
+
 	default:
 	  memset((out_c + df->dt[i].offset_out), df->dt[i].size, 0);
 	}
@@ -176,40 +176,40 @@
   int same = 1;
   int *done;
   int index = 0;
-  
+
   ret = (DataFormat *) HeapAlloc(GetProcessHeap(), 0, sizeof(DataFormat));
-  
+
   done = (int *) HeapAlloc(GetProcessHeap(), 0, sizeof(int) * asked_format->dwNumObjs);
   memset(done, 0, sizeof(int) * asked_format->dwNumObjs);
 
   dt = (DataTransform *) HeapAlloc(GetProcessHeap(), 0, asked_format->dwNumObjs * sizeof(DataTransform));
 
   TRACE("Creating DataTransform : \n");
-  
+
   for (i = 0; i < wine_format->dwNumObjs; i++) {
     offset[i] = -1;
-    
+
     for (j = 0; j < asked_format->dwNumObjs; j++) {
       if (done[j] == 1)
 	continue;
-      
+
       if (((asked_format->rgodf[j].pguid == NULL) || (IsEqualGUID(wine_format->rgodf[i].pguid, asked_format->rgodf[j].pguid)))
 	  &&
 	  (wine_format->rgodf[i].dwType & asked_format->rgodf[j].dwType)) {
 
 	done[j] = 1;
 
-	TRACE("Matching : \n"); 
+	TRACE("Matching : \n");
 	TRACE("   - Asked (%d) : %s - Ofs = %3ld - (Type = 0x%02x | Instance = %04x)\n",
-	      j, debugstr_guid(asked_format->rgodf[j].pguid), 
+	      j, debugstr_guid(asked_format->rgodf[j].pguid),
 	      asked_format->rgodf[j].dwOfs,
 	      DIDFT_GETTYPE(asked_format->rgodf[j].dwType), DIDFT_GETINSTANCE(asked_format->rgodf[j].dwType));
-	
+
 	TRACE("   - Wine  (%d) : %s - Ofs = %3ld - (Type = 0x%02x | Instance = %04x)\n",
-	      j, debugstr_guid(wine_format->rgodf[i].pguid), 
+	      j, debugstr_guid(wine_format->rgodf[i].pguid),
 	      wine_format->rgodf[i].dwOfs,
 	      DIDFT_GETTYPE(wine_format->rgodf[i].dwType), DIDFT_GETINSTANCE(wine_format->rgodf[i].dwType));
-	
+
 	if (wine_format->rgodf[i].dwType & DIDFT_BUTTON)
 	  dt[index].size = sizeof(BYTE);
 	else
@@ -218,7 +218,7 @@
 	dt[index].offset_out = asked_format->rgodf[j].dwOfs;
 	dt[index].value = 0;
 	index++;
-	
+
 	if (wine_format->rgodf[i].dwOfs != asked_format->rgodf[j].dwOfs)
 	  same = 0;
 
@@ -235,11 +235,11 @@
   for (j = 0; j < asked_format->dwNumObjs; j++) {
     if (done[j] == 0) {
       TRACE(" - Asked (%d) : %s - Ofs = %3ld - (Type = 0x%02x | Instance = %04x)\n",
-	    j, debugstr_guid(asked_format->rgodf[j].pguid), 
+	    j, debugstr_guid(asked_format->rgodf[j].pguid),
 	    asked_format->rgodf[j].dwOfs,
 	    DIDFT_GETTYPE(asked_format->rgodf[j].dwType), DIDFT_GETINSTANCE(asked_format->rgodf[j].dwType));
 
-      
+
       if (asked_format->rgodf[j].dwType & DIDFT_BUTTON)
 	dt[index].size = sizeof(BYTE);
       else
@@ -261,7 +261,7 @@
   } else {
     ret->dt = dt;
   }
-  
+
   HeapFree(GetProcessHeap(), 0, done);
 
   return ret;
@@ -278,13 +278,13 @@
   ICOM_THIS(IDirectInputDevice2AImpl,iface);
 
   TRACE("(this=%p,%p)\n",This,df);
-  
+
   TRACE("df.dwSize=%ld\n",df->dwSize);
   TRACE("(df.dwObjsize=%ld)\n",df->dwObjSize);
   TRACE("(df.dwFlags=0x%08lx)\n",df->dwFlags);
   TRACE("(df.dwDataSize=%ld)\n",df->dwDataSize);
   TRACE("(df.dwNumObjs=%ld)\n",df->dwNumObjs);
-  
+
   for (i=0;i<df->dwNumObjs;i++) {
     TRACE("df.rgodf[%d].guid %s\n",i,debugstr_guid(df->rgodf[i].pguid));
     TRACE("df.rgodf[%d].dwOfs %ld\n",i,df->rgodf[i].dwOfs);
@@ -367,10 +367,10 @@
 	  _dump_EnumObjects_flags(dwFlags);
 	  DPRINTF("\n");
 	}
-	
+
 	return DI_OK;
 }
-	
+
 HRESULT WINAPI IDirectInputDevice2AImpl_GetProperty(
 	LPDIRECTINPUTDEVICE2A iface,
 	REFGUID rguid,
@@ -378,10 +378,10 @@
 {
 	FIXME("(this=%p,%s,%p): stub!\n",
 	      iface, debugstr_guid(rguid), pdiph);
-	
+
 	if (TRACE_ON(dinput))
 	  _dump_DIPROPHEADER(pdiph);
-	
+
 	return DI_OK;
 }
 
@@ -393,20 +393,20 @@
 {
 	FIXME("(this=%p,%p,%ld,0x%08lx): stub!\n",
 	      iface, pdidoi, dwObj, dwHow);
-	
+
 	return DI_OK;
 }
-	
+
 HRESULT WINAPI IDirectInputDevice2AImpl_GetDeviceInfo(
 	LPDIRECTINPUTDEVICE2A iface,
 	LPDIDEVICEINSTANCEA pdidi)
 {
 	FIXME("(this=%p,%p): stub!\n",
 	      iface, pdidi);
-	
+
 	return DI_OK;
 }
-	
+
 HRESULT WINAPI IDirectInputDevice2AImpl_RunControlPanel(
 	LPDIRECTINPUTDEVICE2A iface,
 	HWND hwndOwner,
@@ -414,10 +414,10 @@
 {
   FIXME("(this=%p,0x%08x,0x%08lx): stub!\n",
 	iface, hwndOwner, dwFlags);
-	
+
 	return DI_OK;
 }
-	
+
 HRESULT WINAPI IDirectInputDevice2AImpl_Initialize(
 	LPDIRECTINPUTDEVICE2A iface,
 	HINSTANCE hinst,
@@ -428,7 +428,7 @@
 	      iface, hinst, dwVersion, debugstr_guid(rguid));
 	return DI_OK;
 }
-	
+
 /******************************************************************************
  *	IDirectInputDevice2A
  */
@@ -453,7 +453,7 @@
 {
 	FIXME("(this=%p,%p,%p,0x%08lx): stub!\n",
 	      iface, lpCallback, lpvRef, dwFlags);
-	
+
 	if (lpCallback)
 		lpCallback(NULL, lpvRef);
 	return DI_OK;
@@ -525,7 +525,7 @@
 {
 	FIXME("(this=%p,0x%08lx,%p,%p,0x%08lx): stub!\n",
 	      iface, cbObjectData, rgdod, pdwInOut, dwFlags);
-	
+
 	return DI_OK;
 }
 
@@ -547,6 +547,6 @@
 							  DWORD dwFlags)
 {
   FIXME("(%p)->(%s,%08lx,%p,%08lx): stub !\n", iface, lpszFileName, dwEntries, rgDiFileEft, dwFlags);
-  
+
   return DI_OK;
 }
diff --git a/dlls/dinput/dinput_main.c b/dlls/dinput/dinput_main.c
index cb77d4b..ef5bad0 100644
--- a/dlls/dinput/dinput_main.c
+++ b/dlls/dinput/dinput_main.c
@@ -24,7 +24,7 @@
  *   Playable using keyboard only.
  * - WingCommander Prophecy Demo:
  *   Doesn't get Input Focus.
- * 
+ *
  * - Fallout : works great in X and DGA mode
  *
  * FIXME: The keyboard handling needs to (and will) be merged into keyboard.c
@@ -68,7 +68,7 @@
 }
 
 
-/* register a direct draw driver. We better not use malloc for we are in 
+/* register a direct draw driver. We better not use malloc for we are in
  * the ELF startup initialisation at this point.
  */
 void dinput_register_device(dinput_device *device) {
@@ -108,16 +108,16 @@
 	  This->ref = 1;
 	  ICOM_VTBL(This) = &ddiavt;
 	  *ppDI = This;
-	  
+
 	  return DI_OK;
 	}
-	
+
 	if (IsEqualGUID(&IID_IDirectInput7A,riid)) {
 	  This = (IDirectInputAImpl*)HeapAlloc(GetProcessHeap(),0,sizeof(IDirectInputAImpl));
 	  This->ref = 1;
 	  ICOM_VTBL(This) = (ICOM_VTABLE(IDirectInputA) *) &ddi7avt;
 	  *ppDI = This;
-	  
+
 	  return DI_OK;
 	}
 
@@ -159,7 +159,7 @@
 	      return 0;
 	  }
 	}
-	
+
 	return 0;
 }
 
@@ -186,7 +186,7 @@
 	ICOM_THIS(IDirectInputAImpl,iface);
 	HRESULT ret_value = DIERR_DEVICENOTREG;
 	int i;
-	
+
 	TRACE("(this=%p,%s,%p,%p)\n",This,debugstr_guid(rguid),pdev,punk);
 
 	/* Loop on all the devices to see if anyone matches the given GUID */
@@ -231,9 +231,9 @@
 static HRESULT WINAPI IDirectInputAImpl_GetDeviceStatus(LPDIRECTINPUT7A iface,
 							REFGUID rguid) {
   ICOM_THIS(IDirectInputAImpl,iface);
-  
+
   FIXME("(%p)->(%s): stub\n",This,debugstr_guid(rguid));
-  
+
   return DI_OK;
 }
 
@@ -242,7 +242,7 @@
 							DWORD dwFlags) {
   ICOM_THIS(IDirectInputAImpl,iface);
   FIXME("(%p)->(%08lx,%08lx): stub\n",This, (DWORD) hwndOwner, dwFlags);
-  
+
   return DI_OK;
 }
 
@@ -250,7 +250,7 @@
 						    LPCSTR pszName, LPGUID pguidInstance) {
   ICOM_THIS(IDirectInputAImpl,iface);
   FIXME("(%p)->(%s, %s, %p): stub\n", This, debugstr_guid(rguid), pszName, pguidInstance);
-  
+
   return DI_OK;
 }
 
@@ -260,7 +260,7 @@
   ICOM_THIS(IDirectInputAImpl,iface);
   HRESULT ret_value = DIERR_DEVICENOTREG;
   int i;
-	
+
   TRACE("(%p)->(%s, %s, %p, %p)\n", This, debugstr_guid(rguid), debugstr_guid(riid), pvOut, lpUnknownOuter);
 
   /* Loop on all the devices to see if anyone matches the given GUID */
@@ -268,11 +268,11 @@
     HRESULT ret;
     if ((ret = dinput_devices[i]->create_device(This, rguid, riid, (LPDIRECTINPUTDEVICEA*) pvOut)) == DI_OK)
       return DI_OK;
-    
+
     if (ret == DIERR_NOINTERFACE)
       ret_value = DIERR_NOINTERFACE;
   }
-  
+
   return ret_value;
 }
 
@@ -282,7 +282,7 @@
 # define XCAST(fun)	(void*)
 #endif
 
-static ICOM_VTABLE(IDirectInputA) ddiavt = 
+static ICOM_VTABLE(IDirectInputA) ddiavt =
 {
 	ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
 	XCAST(QueryInterface)IDirectInputAImpl_QueryInterface,
@@ -333,7 +333,7 @@
 HRESULT WINAPI DINPUT_DllGetClassObject(REFCLSID rclsid, REFIID riid,
 					LPVOID *ppv)
 {
-    FIXME("(%p, %p, %p): stub\n", debugstr_guid(rclsid), 
+    FIXME("(%p, %p, %p): stub\n", debugstr_guid(rclsid),
 	  debugstr_guid(riid), ppv);
 
     return CLASS_E_CLASSNOTAVAILABLE;
diff --git a/dlls/dinput/joystick/linux.c b/dlls/dinput/joystick/linux.c
index 6fad4dc..11a3b9d 100644
--- a/dlls/dinput/joystick/linux.c
+++ b/dlls/dinput/joystick/linux.c
@@ -67,7 +67,7 @@
 
 	/* The 'parent' DInput */
 	IDirectInputAImpl *dinput;
-	
+
 	/* joystick private */
 	int				joyfd;
 	LPDIDATAFORMAT			df;
@@ -91,7 +91,7 @@
     /* check whether we have a joystick */
     if ((access(JOYDEV,O_RDONLY) != -1) || (errno!=ENODEV && errno!=ENOENT)) {
       TRACE("Enumerating the Joystick device\n");
-      
+
       /* Return joystick */
       lpddi->guidInstance	= GUID_Joystick;
       lpddi->guidProduct	= DInput_Wine_Joystick_GUID;
@@ -112,7 +112,7 @@
 static JoystickAImpl *alloc_device(REFGUID rguid, ICOM_VTABLE(IDirectInputDevice2A) *jvt, IDirectInputAImpl *dinput)
 {
   JoystickAImpl* newDevice;
-  
+
   newDevice = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(JoystickAImpl));
   newDevice->ref		= 1;
   ICOM_VTBL(newDevice)    = jvt;
@@ -131,12 +131,12 @@
       (IsEqualGUID(&DInput_Wine_Joystick_GUID,rguid))) {
     if ((riid == NULL) || (IsEqualGUID(&IID_IDirectInputDevice2A,riid)) || (IsEqualGUID(&IID_IDirectInputDevice2A,riid))) {
       *pdev=(IDirectInputDeviceA*) alloc_device(rguid, &JoystickAvt, dinput);
-    
+
       TRACE("Creating a Joystick device (%p)\n", *pdev);
       return DI_OK;
     } else if (IsEqualGUID(&IID_IDirectInputDevice7A,riid)) {
       *pdev=(IDirectInputDeviceA*) alloc_device(rguid, (ICOM_VTABLE(IDirectInputDevice2A) *) &Joystick7Avt, dinput);
-    
+
       TRACE("Creating a Joystick DInput7A device (%p)\n", *pdev);
       return DI_OK;
     } else
@@ -168,10 +168,10 @@
 	/* Free the data queue */
 	if (This->data_queue != NULL)
 	  HeapFree(GetProcessHeap(),0,This->data_queue);
-	
+
 	/* Free the DataFormat */
 	HeapFree(GetProcessHeap(), 0, This->df);
-	
+
 	HeapFree(GetProcessHeap(),0,This);
 	return 0;
 }
@@ -186,7 +186,7 @@
 {
   ICOM_THIS(JoystickAImpl,iface);
   int i;
-  
+
   TRACE("(this=%p,%p)\n",This,df);
 
   TRACE("(df.dwSize=%ld)\n",df->dwSize);
@@ -201,13 +201,13 @@
     TRACE("dwType 0x%02x,dwInstance %d\n",DIDFT_GETTYPE(df->rgodf[i].dwType),DIDFT_GETINSTANCE(df->rgodf[i].dwType));
     TRACE("df.rgodf[%d].dwFlags 0x%08lx\n",i,df->rgodf[i].dwFlags);
   }
-  
+
   /* Store the new data format */
   This->df = HeapAlloc(GetProcessHeap(),0,df->dwSize);
   memcpy(This->df, df, df->dwSize);
   This->df->rgodf = HeapAlloc(GetProcessHeap(),0,df->dwNumObjs*df->dwObjSize);
   memcpy(This->df->rgodf,df->rgodf,df->dwNumObjs*df->dwObjSize);
-  
+
   return 0;
 }
 
@@ -217,7 +217,7 @@
 static HRESULT WINAPI JoystickAImpl_Acquire(LPDIRECTINPUTDEVICE2A iface)
 {
     ICOM_THIS(JoystickAImpl,iface);
-  
+
     TRACE("(this=%p)\n",This);
     if (This->joyfd!=-1)
     	return 0;
@@ -295,7 +295,7 @@
 	LPDIRECTINPUTDEVICE2A iface,DWORD len,LPVOID ptr
 ) {
     ICOM_THIS(JoystickAImpl,iface);
-  
+
     joy_polldev(This);
     TRACE("(this=%p,0x%08lx,%p)\n",This,len,ptr);
     if (len != sizeof(DIJOYSTATE)) {
@@ -317,7 +317,7 @@
 					      DWORD flags
 ) {
   ICOM_THIS(JoystickAImpl,iface);
-  
+
   FIXME("(%p)->(dods=%ld,entries=%ld,fl=0x%08lx),STUB!\n",This,dodsize,*entries,flags);
 
   joy_polldev(This);
@@ -341,7 +341,7 @@
 
   FIXME("(this=%p,%s,%p)\n",This,debugstr_guid(rguid),ph);
   FIXME("ph.dwSize = %ld, ph.dwHeaderSize =%ld, ph.dwObj = %ld, ph.dwHow= %ld\n",ph->dwSize, ph->dwHeaderSize,ph->dwObj,ph->dwHow);
-  
+
   if (!HIWORD(rguid)) {
     switch ((DWORD)rguid) {
     case (DWORD) DIPROP_BUFFERSIZE: {
@@ -443,12 +443,12 @@
 
   /* Only the fields till dwFFMaxForce are relevant */
   ddoi.dwSize = FIELD_OFFSET(DIDEVICEOBJECTINSTANCEA, dwFFMaxForce);
-    
+
   /* For the joystick, do as is done in the GetCapabilities function */
   if ((dwFlags == DIDFT_ALL) ||
       (dwFlags & DIDFT_AXIS)) {
     BYTE axes, i;
-    
+
 #ifdef JSIOCGAXES
     if (-1==ioctl(xfd,JSIOCGAXES,&axes))
       axes = 2;
@@ -482,15 +482,15 @@
   if ((dwFlags == DIDFT_ALL) ||
       (dwFlags & DIDFT_BUTTON)) {
     BYTE buttons, i;
-    
+
 #ifdef JSIOCGBUTTONS
     if (-1==ioctl(xfd,JSIOCGAXES,&buttons))
       buttons = 2;
 #endif
-  
+
     /* The DInput SDK says that GUID_Button is only for mouse buttons but well... */
     ddoi.guidType = GUID_Button;
-    
+
     for (i = 0; i < buttons; i++) {
       ddoi.dwOfs = DIJOFS_BUTTON(i);
       ddoi.dwType = DIDFT_MAKEINSTANCE((0x0001 << i) << WINE_JOYSTICK_BUTTON_BASE) | DIDFT_PSHBUTTON;
@@ -520,12 +520,12 @@
 
   if (TRACE_ON(dinput))
     _dump_DIPROPHEADER(pdiph);
-  
+
   if (!HIWORD(rguid)) {
     switch ((DWORD)rguid) {
     case (DWORD) DIPROP_BUFFERSIZE: {
       LPDIPROPDWORD	pd = (LPDIPROPDWORD)pdiph;
-      
+
       TRACE(" return buffersize = %d\n",This->queue_len);
       pd->dwData = This->queue_len;
       break;
@@ -540,21 +540,21 @@
 	pr->lMin = This->lMin;
 	pr->lMax = This->lMax;
       }
-      
+
       break;
     }
-      
+
     default:
       FIXME("Unknown type %ld (%s)\n",(DWORD)rguid,debugstr_guid(rguid));
       break;
     }
   }
-  
-  
+
+
   return DI_OK;
 }
 
-static ICOM_VTABLE(IDirectInputDevice2A) JoystickAvt = 
+static ICOM_VTABLE(IDirectInputDevice2A) JoystickAvt =
 {
 	ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
 	IDirectInputDevice2AImpl_QueryInterface,
@@ -592,7 +592,7 @@
 # define XCAST(fun)	(void*)
 #endif
 
-static ICOM_VTABLE(IDirectInputDevice7A) Joystick7Avt = 
+static ICOM_VTABLE(IDirectInputDevice7A) Joystick7Avt =
 {
 	ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
 	XCAST(QueryInterface)IDirectInputDevice2AImpl_QueryInterface,
diff --git a/dlls/dinput/joystick/linuxinput.c b/dlls/dinput/joystick/linuxinput.c
index 729dce3..8229625 100644
--- a/dlls/dinput/joystick/linuxinput.c
+++ b/dlls/dinput/joystick/linuxinput.c
@@ -70,11 +70,11 @@
         ICOM_VFIELD(IDirectInputDevice2A);
         DWORD                           ref;
         GUID                            guid;
-	
+
 
 	/* The 'parent' DInput */
 	IDirectInputAImpl *dinput;
-	
+
 	/* joystick private */
 	/* what range and deadzone the game wants */
 	LONG				wantmin[ABS_MAX];
@@ -102,7 +102,7 @@
 #define AXE_ABSFUZZ	3
 #define AXE_ABSFLAT	4
 
-	
+
 	/* data returned by EVIOCGBIT for EV_ABS and EV_KEY */
 	BYTE				absbits[(ABS_MAX+7)/8];
 	BYTE				keybits[(KEY_MAX+7)/8];
@@ -162,7 +162,7 @@
       return FALSE;
 
   TRACE("Enumerating the Joystick device\n");
-    
+
   /* Return joystick */
   lpddi->guidInstance	= GUID_Joystick;
   lpddi->guidProduct	= DInput_Wine_Joystick_GUID;
@@ -180,7 +180,7 @@
 {
   JoystickAImpl* newDevice;
   int i;
- 
+
   newDevice = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(JoystickAImpl));
   newDevice->ref	= 1;
   ICOM_VTBL(newDevice)	= jvt;
@@ -240,12 +240,12 @@
       (IsEqualGUID(&DInput_Wine_Joystick_GUID,rguid))) {
     if ((riid == NULL) || (IsEqualGUID(&IID_IDirectInputDevice2A,riid)) || (IsEqualGUID(&IID_IDirectInputDevice2A,riid))) {
       *pdev=(IDirectInputDeviceA*) alloc_device(rguid, &JoystickAvt, dinput);
-    
+
       TRACE("Creating a Joystick device (%p)\n", *pdev);
       return DI_OK;
     } else if (IsEqualGUID(&IID_IDirectInputDevice7A,riid)) {
       *pdev=(IDirectInputDeviceA*) alloc_device(rguid, (ICOM_VTABLE(IDirectInputDevice2A) *) &Joystick7Avt, dinput);
-    
+
       TRACE("Creating a Joystick DInput7A device (%p)\n", *pdev);
       return DI_OK;
     } else
@@ -277,10 +277,10 @@
 	/* Free the data queue */
 	if (This->data_queue != NULL)
 	  HeapFree(GetProcessHeap(),0,This->data_queue);
-	
+
 	/* Free the DataFormat */
 	HeapFree(GetProcessHeap(), 0, This->df);
-	
+
 	HeapFree(GetProcessHeap(),0,This);
 	return 0;
 }
@@ -295,7 +295,7 @@
 {
   ICOM_THIS(JoystickAImpl,iface);
   int i;
-  
+
   TRACE("(this=%p,%p)\n",This,df);
 
   TRACE("(df.dwSize=%ld)\n",df->dwSize);
@@ -310,13 +310,13 @@
     TRACE("dwType 0x%02x,dwInstance %d\n",DIDFT_GETTYPE(df->rgodf[i].dwType),DIDFT_GETINSTANCE(df->rgodf[i].dwType));
     TRACE("df.rgodf[%d].dwFlags 0x%08lx\n",i,df->rgodf[i].dwFlags);
   }
-  
+
   /* Store the new data format */
   This->df = HeapAlloc(GetProcessHeap(),0,df->dwSize);
   memcpy(This->df, df, df->dwSize);
   This->df->rgodf = HeapAlloc(GetProcessHeap(),0,df->dwNumObjs*df->dwObjSize);
   memcpy(This->df->rgodf,df->rgodf,df->dwNumObjs*df->dwObjSize);
-  
+
   return 0;
 }
 
@@ -328,7 +328,7 @@
     int		i;
     ICOM_THIS(JoystickAImpl,iface);
     char	buf[200];
-  
+
     TRACE("(this=%p)\n",This);
     if (This->joyfd!=-1)
     	return 0;
@@ -392,7 +392,7 @@
     return DI_OK;
 }
 
-/* 
+/*
  * This maps the read value (from the input event) to a value in the
  * 'wanted' range. It also autodetects the possible range of the axe and
  * adapts values accordingly.
@@ -511,7 +511,7 @@
 	LPDIRECTINPUTDEVICE2A iface,DWORD len,LPVOID ptr
 ) {
     ICOM_THIS(JoystickAImpl,iface);
-  
+
     joy_polldev(This);
 
     TRACE("(this=%p,0x%08lx,%p)\n",This,len,ptr);
@@ -534,7 +534,7 @@
 					      DWORD flags
 ) {
   ICOM_THIS(JoystickAImpl,iface);
-  
+
   FIXME("(%p)->(dods=%ld,entries=%ld,fl=0x%08lx),STUB!\n",This,dodsize,*entries,flags);
 
   joy_polldev(This);
@@ -558,7 +558,7 @@
 
   FIXME("(this=%p,%s,%p)\n",This,debugstr_guid(rguid),ph);
   FIXME("ph.dwSize = %ld, ph.dwHeaderSize =%ld, ph.dwObj = %ld, ph.dwHow= %ld\n",ph->dwSize, ph->dwHeaderSize,ph->dwObj,ph->dwHow);
-  
+
   if (!HIWORD(rguid)) {
     switch ((DWORD)rguid) {
     case (DWORD) DIPROP_BUFFERSIZE: {
@@ -680,13 +680,13 @@
 
   /* Only the fields till dwFFMaxForce are relevant */
   ddoi.dwSize = FIELD_OFFSET(DIDEVICEOBJECTINSTANCEA, dwFFMaxForce);
-    
+
   /* For the joystick, do as is done in the GetCapabilities function */
   /* FIXME: needs more items */
   if ((dwFlags == DIDFT_ALL) ||
       (dwFlags & DIDFT_AXIS)) {
     BYTE i;
-    
+
     for (i = 0; i < ABS_MAX; i++) {
       if (!test_bit(This->absbits,i)) continue;
 
@@ -733,11 +733,11 @@
   if ((dwFlags == DIDFT_ALL) ||
       (dwFlags & DIDFT_BUTTON)) {
     BYTE i;
-    
+
     /*The DInput SDK says that GUID_Button is only for mouse buttons but well*/
 
     ddoi.guidType = GUID_Button;
-    
+
     for (i = 0; i < KEY_MAX; i++) {
       if (!test_bit(This->keybits,i)) continue;
 
@@ -834,12 +834,12 @@
 
   if (TRACE_ON(dinput))
     _dump_DIPROPHEADER(pdiph);
-  
+
   if (!HIWORD(rguid)) {
     switch ((DWORD)rguid) {
     case (DWORD) DIPROP_BUFFERSIZE: {
       LPDIPROPDWORD	pd = (LPDIPROPDWORD)pdiph;
-      
+
       TRACE(" return buffersize = %d\n",This->queue_len);
       pd->dwData = This->queue_len;
       break;
@@ -852,21 +852,21 @@
 	/* The app is querying the current range of the axis : return the lMin and lMax values */
 	FIXME("unimplemented axis range query.\n");
       }
-      
+
       break;
     }
-      
+
     default:
       FIXME("Unknown type %ld (%s)\n",(DWORD)rguid,debugstr_guid(rguid));
       break;
     }
   }
-  
-  
+
+
   return DI_OK;
 }
 
-static ICOM_VTABLE(IDirectInputDevice2A) JoystickAvt = 
+static ICOM_VTABLE(IDirectInputDevice2A) JoystickAvt =
 {
 	ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
 	IDirectInputDevice2AImpl_QueryInterface,
@@ -904,7 +904,7 @@
 # define XCAST(fun)	(void*)
 #endif
 
-static ICOM_VTABLE(IDirectInputDevice7A) Joystick7Avt = 
+static ICOM_VTABLE(IDirectInputDevice7A) Joystick7Avt =
 {
 	ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
 	XCAST(QueryInterface)IDirectInputDevice2AImpl_QueryInterface,
diff --git a/dlls/dinput/keyboard/main.c b/dlls/dinput/keyboard/main.c
index 5298f78..e50b296 100644
--- a/dlls/dinput/keyboard/main.c
+++ b/dlls/dinput/keyboard/main.c
@@ -47,8 +47,8 @@
         GUID                            guid;
 
 	IDirectInputAImpl *dinput;
-	
-	HANDLE	hEvent;	
+
+	HANDLE	hEvent;
         /* SysKeyboardAImpl */
 	int                             acquired;
         int                             buffersize;  /* set in 'SetProperty'         */
@@ -64,10 +64,10 @@
         CRITICAL_SECTION                crit;
 };
 
-SysKeyboardAImpl *current; /* Today's acquired device 
+SysKeyboardAImpl *current; /* Today's acquired device
 FIXME: currently this can be only one.
 Maybe this should be a linked list or st.
-I don't know what the rules are for multiple acquired keyboards, 
+I don't know what the rules are for multiple acquired keyboards,
 but 'DI_LOSTFOCUS' and 'DI_UNACQUIRED' exist for a reason.
 */
 
@@ -116,7 +116,7 @@
                   current->start++;
                   current->overflow = TRUE;
                 }
-              else 
+              else
                 current->count++;
 
               LeaveCriticalSection(&(current->crit));
@@ -138,13 +138,13 @@
 {
   if ((dwDevType == 0) || (dwDevType == DIDEVTYPE_KEYBOARD)) {
     TRACE("Enumerating the Keyboard device\n");
-    
+
     lpddi->guidInstance = GUID_SysKeyboard;/* DInput's GUID */
     lpddi->guidProduct = DInput_Wine_Keyboard_GUID; /* Vendor's GUID */
     lpddi->dwDevType = DIDEVTYPE_KEYBOARD | (DIDEVTYPEKEYBOARD_UNKNOWN << 8);
     strcpy(lpddi->tszInstanceName, "Keyboard");
     strcpy(lpddi->tszProductName, "Wine Keyboard");
-    
+
     return TRUE;
   }
 
@@ -170,12 +170,12 @@
       (IsEqualGUID(&DInput_Wine_Keyboard_GUID,rguid))) { /* Wine Keyboard */
     if ((riid == NULL) || (IsEqualGUID(&IID_IDirectInputDevice2A,riid)) || (IsEqualGUID(&IID_IDirectInputDevice2A,riid))) {
       *pdev=(IDirectInputDeviceA*) alloc_device(rguid, &SysKeyboardAvt, dinput);
-    
+
       TRACE("Creating a Keyboard device (%p)\n", *pdev);
       return DI_OK;
     } else if (IsEqualGUID(&IID_IDirectInputDevice7A,riid)) {
       *pdev=(IDirectInputDeviceA*) alloc_device(rguid, (ICOM_VTABLE(IDirectInputDevice2A) *) &SysKeyboard7Avt, dinput);
-    
+
       TRACE("Creating a Keyboard DInput7A device (%p)\n", *pdev);
       return DI_OK;
     } else
@@ -294,15 +294,15 @@
 static HRESULT WINAPI SysKeyboardAImpl_Acquire(LPDIRECTINPUTDEVICE2A iface)
 {
 	ICOM_THIS(SysKeyboardAImpl,iface);
-	
+
 	TRACE("(this=%p)\n",This);
-	
+
         if (This->acquired)
           return S_FALSE;
 
         This->acquired = 1;
 
-        if (current != NULL) 
+        if (current != NULL)
           {
             FIXME("Not more than one keyboard can be acquired at the same time.\n");
             SysKeyboardAImpl_Unacquire(iface);
@@ -386,11 +386,11 @@
     /* DirectX 3.0 */
     FIXME("DirectX 3.0 not supported....\n");
   }
-  
+
   return DI_OK;
 }
 
-static ICOM_VTABLE(IDirectInputDevice2A) SysKeyboardAvt = 
+static ICOM_VTABLE(IDirectInputDevice2A) SysKeyboardAvt =
 {
 	ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
 	IDirectInputDevice2AImpl_QueryInterface,
@@ -428,7 +428,7 @@
 # define XCAST(fun)	(void*)
 #endif
 
-static ICOM_VTABLE(IDirectInputDevice7A) SysKeyboard7Avt = 
+static ICOM_VTABLE(IDirectInputDevice7A) SysKeyboard7Avt =
 {
 	ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
 	XCAST(QueryInterface)IDirectInputDevice2AImpl_QueryInterface,
diff --git a/dlls/dinput/mouse/main.c b/dlls/dinput/mouse/main.c
index 4a08103..10f001c 100644
--- a/dlls/dinput/mouse/main.c
+++ b/dlls/dinput/mouse/main.c
@@ -104,13 +104,13 @@
         GUID                            guid;
 
 	IDirectInputAImpl *dinput;
-	
+
 	/* The current data format and the conversion between internal
 	   and external data formats */
 	LPDIDATAFORMAT			df;
 	DataFormat                     *wine_df;
 	int                             offset_array[5];
-	
+
         /* SysMouseAImpl */
         BYTE                            absolute;
         /* Previous position for relative moves */
@@ -177,7 +177,7 @@
     ICOM_VTBL(newDevice) = mvt;
     InitializeCriticalSection(&(newDevice->crit));
     memcpy(&(newDevice->guid),rguid,sizeof(*rguid));
-    
+
     /* Per default, Wine uses its internal data format */
     newDevice->df = &Wine_InternalMouseFormat;
     memcpy(newDevice->offset_array, offset_array, 5 * sizeof(int));
@@ -196,12 +196,12 @@
       (IsEqualGUID(&DInput_Wine_Mouse_GUID,rguid))) { /* Wine Mouse */
     if ((riid == NULL) || (IsEqualGUID(&IID_IDirectInputDevice2A,riid)) || (IsEqualGUID(&IID_IDirectInputDevice2A,riid))) {
       *pdev=(IDirectInputDeviceA*) alloc_device(rguid, &SysMouseAvt, dinput);
-    
+
       TRACE("Creating a Mouse device (%p)\n", *pdev);
       return DI_OK;
     }else if (IsEqualGUID(&IID_IDirectInputDevice7A,riid)) {
       *pdev=(IDirectInputDeviceA*) alloc_device(rguid, (ICOM_VTABLE(IDirectInputDevice2A) *) &SysMouse7Avt, dinput);
-    
+
       TRACE("Creating a Mouse DInput7A device (%p)\n", *pdev);
       return DI_OK;
     } else
@@ -246,7 +246,7 @@
 	  HeapFree(GetProcessHeap(), 0, This->df->rgodf);
 	  HeapFree(GetProcessHeap(), 0, This->df);
 	}
-	
+
 	HeapFree(GetProcessHeap(),0,This);
 	return 0;
 }
@@ -272,7 +272,7 @@
     hwnd = GetDesktopWindow();
   This->win = hwnd;
   This->dwCoopLevel = dwflags;
-  
+
   return 0;
 }
 
@@ -290,7 +290,7 @@
 {
   ICOM_THIS(SysMouseAImpl,iface);
   int i;
-  
+
   TRACE("(this=%p,%p)\n",This,df);
 
   TRACE("(df.dwSize=%ld)\n",df->dwSize);
@@ -323,10 +323,10 @@
 
   /* Prepare all the data-conversion filters */
   This->wine_df = create_DataFormat(&(Wine_InternalMouseFormat), df, This->offset_array);
-  
+
   return 0;
 }
-  
+
 /* low-level mouse hook */
 static LRESULT CALLBACK dinput_mouse_hook( int code, WPARAM wparam, LPARAM lparam )
 {
@@ -355,7 +355,7 @@
 	    This->need_warp = WARP_DONE;
 	    goto end;
 	  }
-	      	  
+
 	  /* Relative mouse input with absolute mouse event : the real fun starts here... */
 	  if ((This->need_warp == WARP_NEEDED) ||
 	      (This->need_warp == WARP_STARTED)) {
@@ -370,7 +370,7 @@
 	      GEN_EVENT(This->offset_array[WINE_MOUSE_X_POSITION], hook->pt.x - This->mapped_center.x, hook->time, (This->dinput->evsequence)++);
 	      This->need_warp = WARP_NEEDED;
 	    }
-	    
+
 	    if (hook->pt.y != This->mapped_center.y) {
 	      GEN_EVENT(This->offset_array[WINE_MOUSE_Y_POSITION], hook->pt.y - This->mapped_center.y, hook->time, (This->dinput->evsequence)++);
 	      This->need_warp = WARP_NEEDED;
@@ -380,7 +380,7 @@
 
 	This->prevX = hook->pt.x;
 	This->prevY = hook->pt.y;
-	
+
 	if (This->absolute) {
 	  This->m_state.lX = hook->pt.x;
 	  This->m_state.lY = hook->pt.y;
@@ -449,7 +449,7 @@
 {
   ICOM_THIS(SysMouseAImpl,iface);
   RECT	rect;
-  
+
   TRACE("(this=%p)\n",This);
 
   if (This->acquired == 0) {
@@ -486,7 +486,7 @@
       This->mapped_center.x = This->win_centerX;
       This->mapped_center.y = This->win_centerY;
       MapWindowPoints(This->win, HWND_DESKTOP, &This->mapped_center, 1);
-      TRACE("Warping mouse to %ld - %ld\n", This->mapped_center.x, This->mapped_center.y); 
+      TRACE("Warping mouse to %ld - %ld\n", This->mapped_center.x, This->mapped_center.y);
       SetCursorPos( This->mapped_center.x, This->mapped_center.y );
 #ifdef MOUSE_HACK
       This->need_warp = WARP_DONE;
@@ -523,7 +523,7 @@
     }
     else
 	ERR("Unacquiring a not-acquired device !!!\n");
-  
+
     return DI_OK;
 }
 
@@ -537,13 +537,13 @@
 	LPDIRECTINPUTDEVICE2A iface,DWORD len,LPVOID ptr
 ) {
   ICOM_THIS(SysMouseAImpl,iface);
-  
+
   EnterCriticalSection(&(This->crit));
   TRACE("(this=%p,0x%08lx,%p): \n",This,len,ptr);
-  
+
   /* Copy the current mouse state */
   fill_DataFormat(ptr, &(This->m_state), This->wine_df);
-  
+
   /* Initialize the buffer when in relative mode */
   if (This->absolute == 0) {
     This->m_state.lX = 0;
@@ -555,7 +555,7 @@
     This->mapped_center.x = This->win_centerX;
     This->mapped_center.y = This->win_centerY;
     MapWindowPoints(This->win, HWND_DESKTOP, &This->mapped_center, 1);
-    TRACE("Warping mouse to %ld - %ld\n", This->mapped_center.x, This->mapped_center.y); 
+    TRACE("Warping mouse to %ld - %ld\n", This->mapped_center.x, This->mapped_center.y);
     SetCursorPos( This->mapped_center.x, This->mapped_center.y );
 
 #ifdef MOUSE_HACK
@@ -566,11 +566,11 @@
   }
 
   LeaveCriticalSection(&(This->crit));
-  
+
   TRACE("(X: %ld - Y: %ld   L: %02x M: %02x R: %02x)\n",
 	This->m_state.lX, This->m_state.lY,
 	This->m_state.rgbButtons[0], This->m_state.rgbButtons[2], This->m_state.rgbButtons[1]);
-  
+
   return 0;
 }
 
@@ -585,7 +585,7 @@
 ) {
   ICOM_THIS(SysMouseAImpl,iface);
   DWORD len, nqtail;
-  
+
   EnterCriticalSection(&(This->crit));
   TRACE("(%p)->(dods=%ld,entries=%ld,fl=0x%08lx)\n",This,dodsize,*entries,flags);
 
@@ -605,7 +605,7 @@
     }
 
     if (len)
-    	TRACE("Application retrieving %ld event(s).\n", len); 
+    	TRACE("Application retrieving %ld event(s).\n", len);
 
     *entries = 0;
     nqtail = This->queue_tail;
@@ -632,7 +632,7 @@
     This->mapped_center.x = This->win_centerX;
     This->mapped_center.y = This->win_centerY;
     MapWindowPoints(This->win, HWND_DESKTOP, &This->mapped_center, 1);
-    TRACE("Warping mouse to %ld - %ld\n", This->mapped_center.x, This->mapped_center.y); 
+    TRACE("Warping mouse to %ld - %ld\n", This->mapped_center.x, This->mapped_center.y);
     SetCursorPos( This->mapped_center.x, This->mapped_center.y );
 
 #ifdef MOUSE_HACK
@@ -654,12 +654,12 @@
   ICOM_THIS(SysMouseAImpl,iface);
 
   TRACE("(this=%p,%s,%p)\n",This,debugstr_guid(rguid),ph);
-  
+
   if (!HIWORD(rguid)) {
     switch ((DWORD)rguid) {
     case (DWORD) DIPROP_BUFFERSIZE: {
       LPCDIPROPDWORD	pd = (LPCDIPROPDWORD)ph;
-      
+
       TRACE("buffersize = %ld\n",pd->dwData);
 
       This->data_queue = (LPDIDEVICEOBJECTDATA)HeapAlloc(GetProcessHeap(),0,
@@ -680,7 +680,7 @@
       break;
     }
   }
-  
+
   return 0;
 }
 
@@ -698,12 +698,12 @@
 
   if (TRACE_ON(dinput))
     _dump_DIPROPHEADER(pdiph);
-  
+
   if (!HIWORD(rguid)) {
     switch ((DWORD)rguid) {
     case (DWORD) DIPROP_BUFFERSIZE: {
       LPDIPROPDWORD	pd = (LPDIPROPDWORD)pdiph;
-      
+
       TRACE(" return buffersize = %d\n",This->queue_len);
       pd->dwData = This->queue_len;
       break;
@@ -721,17 +721,17 @@
 	pr->lMin = DIPROPRANGE_NOMIN;
 	pr->lMax = DIPROPRANGE_NOMAX;
       }
-      
+
       break;
     }
-      
+
     default:
       FIXME("Unknown type %ld (%s)\n",(DWORD)rguid,debugstr_guid(rguid));
       break;
     }
   }
-  
-  
+
+
   return DI_OK;
 }
 
@@ -777,7 +777,7 @@
     /* DirectX 3.0 */
     FIXME("DirectX 3.0 not supported....\n");
   }
-  
+
   return DI_OK;
 }
 
@@ -793,7 +793,7 @@
 {
   ICOM_THIS(SysMouseAImpl,iface);
   DIDEVICEOBJECTINSTANCEA ddoi;
-  
+
   TRACE("(this=%p,%p,%p,%08lx)\n", This, lpCallback, lpvRef, dwFlags);
   if (TRACE_ON(dinput)) {
     DPRINTF("  - flags = ");
@@ -803,7 +803,7 @@
 
   /* Only the fields till dwFFMaxForce are relevant */
   ddoi.dwSize = FIELD_OFFSET(DIDEVICEOBJECTINSTANCEA, dwFFMaxForce);
-    
+
   /* In a mouse, we have : two relative axis and three buttons */
   if ((dwFlags == DIDFT_ALL) ||
       (dwFlags & DIDFT_AXIS)) {
@@ -814,7 +814,7 @@
     strcpy(ddoi.tszName, "X-Axis");
     _dump_OBJECTINSTANCEA(&ddoi);
     if (lpCallback(&ddoi, lpvRef) != DIENUM_CONTINUE) return DI_OK;
-    
+
     /* Y axis */
     ddoi.guidType = GUID_YAxis;
     ddoi.dwOfs = This->offset_array[WINE_MOUSE_Y_POSITION];
@@ -854,7 +854,7 @@
 }
 
 
-static ICOM_VTABLE(IDirectInputDevice2A) SysMouseAvt = 
+static ICOM_VTABLE(IDirectInputDevice2A) SysMouseAvt =
 {
 	ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
 	IDirectInputDevice2AImpl_QueryInterface,
@@ -892,7 +892,7 @@
 # define XCAST(fun)	(void*)
 #endif
 
-static ICOM_VTABLE(IDirectInputDevice7A) SysMouse7Avt = 
+static ICOM_VTABLE(IDirectInputDevice7A) SysMouse7Avt =
 {
 	ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
 	XCAST(QueryInterface)IDirectInputDevice2AImpl_QueryInterface,
diff --git a/dlls/dplayx/dpinit.h b/dlls/dplayx/dpinit.h
index 3516b7a..c84a4cc 100644
--- a/dlls/dplayx/dpinit.h
+++ b/dlls/dplayx/dpinit.h
@@ -24,7 +24,7 @@
 
 extern HRESULT DP_CreateInterface( REFIID riid, LPVOID* ppvObj );
 extern HRESULT DPL_CreateInterface( REFIID riid, LPVOID* ppvObj );
-extern HRESULT DPSP_CreateInterface( REFIID riid, LPVOID* ppvObj, 
+extern HRESULT DPSP_CreateInterface( REFIID riid, LPVOID* ppvObj,
                                      IDirectPlay2Impl* dp );
 extern HRESULT DPLSP_CreateInterface( REFIID riid, LPVOID* ppvObj,
                                       IDirectPlay2Impl* dp );
diff --git a/dlls/dplayx/dplay.c b/dlls/dplayx/dplay.c
index 035a6f9..edefc77 100644
--- a/dlls/dplayx/dplay.c
+++ b/dlls/dplayx/dplay.c
@@ -44,14 +44,14 @@
 WINE_DEFAULT_DEBUG_CHANNEL(dplay);
 
 /* FIXME: Should this be externed? */
-extern HRESULT DPL_CreateCompoundAddress 
+extern HRESULT DPL_CreateCompoundAddress
 ( LPCDPCOMPOUNDADDRESSELEMENT lpElements, DWORD dwElementCount,
   LPVOID lpAddress, LPDWORD lpdwAddressSize, BOOL bAnsiInterface );
 
 
 /* Local function prototypes */
 static lpPlayerList DP_FindPlayer( IDirectPlay2AImpl* This, DPID dpid );
-static lpPlayerData DP_CreatePlayer( IDirectPlay2Impl* iface, LPDPID lpid, 
+static lpPlayerData DP_CreatePlayer( IDirectPlay2Impl* iface, LPDPID lpid,
                                      LPDPNAME lpName, DWORD dwFlags,
                                      HANDLE hEvent, BOOL bAnsi );
 static BOOL DP_CopyDPNAMEStruct( LPDPNAME lpDst, LPDPNAME lpSrc, BOOL bAnsi );
@@ -59,52 +59,52 @@
                               LPVOID lpData, DWORD dwDataSize );
 
 static lpGroupData DP_CreateGroup( IDirectPlay2AImpl* iface, LPDPID lpid,
-                                   LPDPNAME lpName, DWORD dwFlags, 
+                                   LPDPNAME lpName, DWORD dwFlags,
                                    DPID idParent, BOOL bAnsi );
 static void DP_SetGroupData( lpGroupData lpGData, DWORD dwFlags,
                              LPVOID lpData, DWORD dwDataSize );
 static void DP_DeleteDPNameStruct( LPDPNAME lpDPName );
 static void DP_DeletePlayer( IDirectPlay2Impl* This, DPID dpid );
-static BOOL CALLBACK cbDeletePlayerFromAllGroups( DPID dpId, 
-                                                  DWORD dwPlayerType, 
-                                                  LPCDPNAME lpName, 
-                                                  DWORD dwFlags, 
+static BOOL CALLBACK cbDeletePlayerFromAllGroups( DPID dpId,
+                                                  DWORD dwPlayerType,
+                                                  LPCDPNAME lpName,
+                                                  DWORD dwFlags,
                                                   LPVOID lpContext );
 static lpGroupData DP_FindAnyGroup( IDirectPlay2AImpl* This, DPID dpid );
-static BOOL CALLBACK cbRemoveGroupOrPlayer( DPID dpId, DWORD dwPlayerType, 
-                                            LPCDPNAME lpName, DWORD dwFlags, 
+static BOOL CALLBACK cbRemoveGroupOrPlayer( DPID dpId, DWORD dwPlayerType,
+                                            LPCDPNAME lpName, DWORD dwFlags,
                                             LPVOID lpContext );
 static void DP_DeleteGroup( IDirectPlay2Impl* This, DPID dpid );
 
 /* Helper methods for player/group interfaces */
 static HRESULT WINAPI DP_IF_DeletePlayerFromGroup
-          ( IDirectPlay2Impl* This, LPVOID lpMsgHdr, DPID idGroup, 
+          ( IDirectPlay2Impl* This, LPVOID lpMsgHdr, DPID idGroup,
             DPID idPlayer, BOOL bAnsi );
 static HRESULT WINAPI DP_IF_CreatePlayer
-          ( IDirectPlay2Impl* This, LPVOID lpMsgHdr, LPDPID lpidPlayer, 
-            LPDPNAME lpPlayerName, HANDLE hEvent, LPVOID lpData, 
+          ( IDirectPlay2Impl* This, LPVOID lpMsgHdr, LPDPID lpidPlayer,
+            LPDPNAME lpPlayerName, HANDLE hEvent, LPVOID lpData,
             DWORD dwDataSize, DWORD dwFlags, BOOL bAnsi );
 static HRESULT WINAPI DP_IF_DestroyGroup
           ( IDirectPlay2Impl* This, LPVOID lpMsgHdr, DPID idGroup, BOOL bAnsi );
 static HRESULT WINAPI DP_IF_DestroyPlayer
           ( IDirectPlay2Impl* This, LPVOID lpMsgHdr, DPID idPlayer, BOOL bAnsi );
 static HRESULT WINAPI DP_IF_EnumGroupPlayers
-          ( IDirectPlay2Impl* This, DPID idGroup, LPGUID lpguidInstance, 
+          ( IDirectPlay2Impl* This, DPID idGroup, LPGUID lpguidInstance,
             LPDPENUMPLAYERSCALLBACK2 lpEnumPlayersCallback2,
             LPVOID lpContext, DWORD dwFlags, BOOL bAnsi );
 static HRESULT WINAPI DP_IF_EnumGroups
-          ( IDirectPlay2Impl* This, LPGUID lpguidInstance, 
-            LPDPENUMPLAYERSCALLBACK2 lpEnumPlayersCallback2, 
+          ( IDirectPlay2Impl* This, LPGUID lpguidInstance,
+            LPDPENUMPLAYERSCALLBACK2 lpEnumPlayersCallback2,
             LPVOID lpContext, DWORD dwFlags, BOOL bAnsi );
 static HRESULT WINAPI DP_IF_EnumPlayers
-          ( IDirectPlay2Impl* This, LPGUID lpguidInstance, 
-            LPDPENUMPLAYERSCALLBACK2 lpEnumPlayersCallback2, 
+          ( IDirectPlay2Impl* This, LPGUID lpguidInstance,
+            LPDPENUMPLAYERSCALLBACK2 lpEnumPlayersCallback2,
             LPVOID lpContext, DWORD dwFlags, BOOL bAnsi );
 static HRESULT WINAPI DP_IF_GetGroupData
-          ( IDirectPlay2Impl* This, DPID idGroup, LPVOID lpData, 
+          ( IDirectPlay2Impl* This, DPID idGroup, LPVOID lpData,
             LPDWORD lpdwDataSize, DWORD dwFlags, BOOL bAnsi );
 static HRESULT WINAPI DP_IF_GetGroupName
-          ( IDirectPlay2Impl* This, DPID idGroup, LPVOID lpData, 
+          ( IDirectPlay2Impl* This, DPID idGroup, LPVOID lpData,
             LPDWORD lpdwDataSize, BOOL bAnsi );
 static HRESULT WINAPI DP_IF_GetPlayerData
           ( IDirectPlay2Impl* This, DPID idPlayer, LPVOID lpData,
@@ -113,31 +113,31 @@
           ( IDirectPlay2Impl* This, DPID idPlayer, LPVOID lpData,
             LPDWORD lpdwDataSize, BOOL bAnsi );
 static HRESULT WINAPI DP_IF_SetGroupName
-          ( IDirectPlay2Impl* This, DPID idGroup, LPDPNAME lpGroupName, 
+          ( IDirectPlay2Impl* This, DPID idGroup, LPDPNAME lpGroupName,
             DWORD dwFlags, BOOL bAnsi );
 static HRESULT WINAPI DP_IF_SetPlayerData
-          ( IDirectPlay2Impl* This, DPID idPlayer, LPVOID lpData, 
+          ( IDirectPlay2Impl* This, DPID idPlayer, LPVOID lpData,
             DWORD dwDataSize, DWORD dwFlags, BOOL bAnsi );
 static HRESULT WINAPI DP_IF_SetPlayerName
-          ( IDirectPlay2Impl* This, DPID idPlayer, LPDPNAME lpPlayerName, 
+          ( IDirectPlay2Impl* This, DPID idPlayer, LPDPNAME lpPlayerName,
             DWORD dwFlags, BOOL bAnsi );
 static HRESULT WINAPI DP_IF_AddGroupToGroup
           ( IDirectPlay3Impl* This, DPID idParentGroup, DPID idGroup );
 static HRESULT WINAPI DP_IF_CreateGroup
-          ( IDirectPlay2AImpl* This, LPVOID lpMsgHdr, LPDPID lpidGroup, 
-            LPDPNAME lpGroupName, LPVOID lpData, DWORD dwDataSize, 
+          ( IDirectPlay2AImpl* This, LPVOID lpMsgHdr, LPDPID lpidGroup,
+            LPDPNAME lpGroupName, LPVOID lpData, DWORD dwDataSize,
             DWORD dwFlags, BOOL bAnsi );
 static HRESULT WINAPI DP_IF_CreateGroupInGroup
-          ( IDirectPlay3Impl* This, LPVOID lpMsgHdr, DPID idParentGroup, 
-            LPDPID lpidGroup, LPDPNAME lpGroupName, LPVOID lpData, 
+          ( IDirectPlay3Impl* This, LPVOID lpMsgHdr, DPID idParentGroup,
+            LPDPID lpidGroup, LPDPNAME lpGroupName, LPVOID lpData,
             DWORD dwDataSize, DWORD dwFlags, BOOL bAnsi );
 static HRESULT WINAPI DP_IF_AddPlayerToGroup
-          ( IDirectPlay2Impl* This, LPVOID lpMsgHdr, DPID idGroup, 
+          ( IDirectPlay2Impl* This, LPVOID lpMsgHdr, DPID idGroup,
             DPID idPlayer, BOOL bAnsi );
 static HRESULT WINAPI DP_IF_DeleteGroupFromGroup
           ( IDirectPlay3Impl* This, DPID idParentGroup, DPID idGroup );
 static HRESULT WINAPI DP_SetSessionDesc
-          ( IDirectPlay2Impl* This, LPCDPSESSIONDESC2 lpSessDesc, 
+          ( IDirectPlay2Impl* This, LPCDPSESSIONDESC2 lpSessDesc,
             DWORD dwFlags, BOOL bInitial, BOOL bAnsi  );
 static HRESULT WINAPI DP_SecureOpen
           ( IDirectPlay2Impl* This, LPCDPSESSIONDESC2 lpsd, DWORD dwFlags,
@@ -169,7 +169,7 @@
             DWORD dwMinPriority, DWORD dwMaxPriority, BOOL bAnsi );
 static HRESULT WINAPI DP_IF_EnumGroupsInGroup
           ( IDirectPlay3AImpl* This, DPID idGroup, LPGUID lpguidInstance,
-            LPDPENUMPLAYERSCALLBACK2 lpEnumPlayersCallback2, 
+            LPDPENUMPLAYERSCALLBACK2 lpEnumPlayersCallback2,
             LPVOID lpContext, DWORD dwFlags, BOOL bAnsi );
 static HRESULT WINAPI DP_IF_GetGroupParent
           ( IDirectPlay3AImpl* This, DPID idGroup, LPDPID lpidGroup,
@@ -194,7 +194,7 @@
 static DPID DP_GetRemoteNextObjectId(void);
 
 
-static void DP_CopySessionDesc( LPDPSESSIONDESC2 destSessionDesc, 
+static void DP_CopySessionDesc( LPDPSESSIONDESC2 destSessionDesc,
                                 LPCDPSESSIONDESC2 srcSessDesc, BOOL bAnsi );
 
 
@@ -208,7 +208,7 @@
 
 
 #define DPID_NOPARENT_GROUP 0 /* Magic number to indicate no parent of group */
-#define DPID_SYSTEM_GROUP DPID_NOPARENT_GROUP /* If system group is supported 
+#define DPID_SYSTEM_GROUP DPID_NOPARENT_GROUP /* If system group is supported
                                                  we don't have to change much */
 #define DPID_NAME_SERVER 0x19a9d65b  /* Don't ask me why */
 
@@ -277,8 +277,8 @@
   }
 
   /* Provide an initial session desc with nothing in it */
-  This->dp2->lpSessionDesc = (LPDPSESSIONDESC2)HeapAlloc( GetProcessHeap(), 
-                               HEAP_ZERO_MEMORY, 
+  This->dp2->lpSessionDesc = (LPDPSESSIONDESC2)HeapAlloc( GetProcessHeap(),
+                               HEAP_ZERO_MEMORY,
                                sizeof( *This->dp2->lpSessionDesc ) );
   if( This->dp2->lpSessionDesc == NULL )
   {
@@ -294,9 +294,9 @@
                                       sizeof( *This->dp2->spData.lpCB ) );
   This->dp2->spData.lpCB->dwSize = sizeof( *This->dp2->spData.lpCB );
   This->dp2->spData.lpCB->dwVersion = DPSP_MAJORVERSION;
-  
+
   /* This is the pointer to the service provider */
-  if( FAILED( DPSP_CreateInterface( &IID_IDirectPlaySP, 
+  if( FAILED( DPSP_CreateInterface( &IID_IDirectPlaySP,
                                     (LPVOID*)&This->dp2->spData.lpISP, This ) )
     )
   {
@@ -337,8 +337,8 @@
 DPQ_DECL_DELETECB( cbDeleteGroupsElem, lpGroupList );
 DPQ_DECL_DELETECB( cbDeleteGroupsElem, lpGroupList )
 {
-  DPQ_DELETEQ( elem->lpGData->groups, groups, 
-               lpGroupList, cbDeleteElemFromHeap ); 
+  DPQ_DELETEQ( elem->lpGData->groups, groups,
+               lpGroupList, cbDeleteElemFromHeap );
   DPQ_DELETEQ( elem->lpGData->players, players,
                lpPlayerList, cbDeleteElemFromHeap );
   HeapFree( GetProcessHeap(), 0, elem->lpGData );
@@ -462,9 +462,9 @@
 }
 
 
-/* Create a new interface */ 
-extern 
-HRESULT DP_CreateInterface 
+/* Create a new interface */
+extern
+HRESULT DP_CreateInterface
          ( REFIID riid, LPVOID* ppvObj )
 {
   TRACE( " for %s\n", debugstr_guid( riid ) );
@@ -481,7 +481,7 @@
   {
     ICOM_THIS(IDirectPlay2Impl,*ppvObj);
     ICOM_VTBL(This) = &directPlay2WVT;
-  } 
+  }
   else if( IsEqualGUID( &IID_IDirectPlay2A, riid ) )
   {
     ICOM_THIS(IDirectPlay2AImpl,*ppvObj);
@@ -615,7 +615,7 @@
   ulObjRefCount       = InterlockedIncrement( &This->unk->ulObjRef );
   ulInterfaceRefCount = InterlockedIncrement( &This->ulInterfaceRef );
 
-  TRACE( "ref count incremented to %lu:%lu for %p\n", 
+  TRACE( "ref count incremented to %lu:%lu for %p\n",
          ulInterfaceRefCount, ulObjRefCount, This );
 
   return ulObjRefCount;
@@ -644,7 +644,7 @@
      DP_DestroyDirectPlay2( This );
      DP_DestroyIUnknown( This );
   }
-  
+
   /* Deallocate the interface */
   if( ulInterfaceRefCount == 0 )
   {
@@ -662,11 +662,11 @@
 /* *lplpReply will be non NULL iff there is something to reply */
 HRESULT DP_HandleMessage( IDirectPlay2Impl* This, LPCVOID lpcMessageBody,
                           DWORD  dwMessageBodySize, LPCVOID lpcMessageHeader,
-                          WORD wCommandId, WORD wVersion, 
+                          WORD wCommandId, WORD wVersion,
                           LPVOID* lplpReply, LPDWORD lpdwMsgSize )
 {
   TRACE( "(%p)->(%p,0x%08lx,%p,%u,%u)\n",
-         This, lpcMessageBody, dwMessageBodySize, lpcMessageHeader, wCommandId, 
+         This, lpcMessageBody, dwMessageBodySize, lpcMessageHeader, wCommandId,
          wVersion );
 
   switch( wCommandId )
@@ -693,14 +693,14 @@
 
     case DPMSGCMD_REQUESTNEWPLAYERID:
     {
-      LPCDPMSG_REQUESTNEWPLAYERID lpcMsg = 
+      LPCDPMSG_REQUESTNEWPLAYERID lpcMsg =
         (LPCDPMSG_REQUESTNEWPLAYERID)lpcMessageBody;
 
       LPDPMSG_NEWPLAYERIDREPLY lpReply;
 
       *lpdwMsgSize = This->dp2->spData.dwSPHeaderSize + sizeof( *lpReply );
 
-      *lplpReply = (LPDPMSG_NEWPLAYERIDREPLY)HeapAlloc( GetProcessHeap(), 
+      *lplpReply = (LPDPMSG_NEWPLAYERIDREPLY)HeapAlloc( GetProcessHeap(),
                                                         HEAP_ZERO_MEMORY,
                                                         *lpdwMsgSize );
 
@@ -708,16 +708,16 @@
              lpcMsg->dwFlags );
 
       /* Setup the reply */
-      lpReply = (LPDPMSG_NEWPLAYERIDREPLY)( (BYTE*)(*lplpReply) + 
+      lpReply = (LPDPMSG_NEWPLAYERIDREPLY)( (BYTE*)(*lplpReply) +
                                             This->dp2->spData.dwSPHeaderSize );
 
       lpReply->envelope.dwMagic    = DPMSGMAGIC_DPLAYMSG;
-      lpReply->envelope.wCommandId = DPMSGCMD_NEWPLAYERIDREPLY; 
-      lpReply->envelope.wVersion   = DPMSGVER_DP6; 
+      lpReply->envelope.wCommandId = DPMSGCMD_NEWPLAYERIDREPLY;
+      lpReply->envelope.wVersion   = DPMSGVER_DP6;
 
       lpReply->dpidNewPlayerId = DP_NextObjectId();
 
-      TRACE( "Allocating new playerid 0x%08lx from remote request\n", 
+      TRACE( "Allocating new playerid 0x%08lx from remote request\n",
              lpReply->dpidNewPlayerId );
 
       break;
@@ -732,10 +732,10 @@
         DebugBreak();
 #endif
       DP_MSG_ReplyReceived( This, wCommandId, lpcMessageBody, dwMessageBodySize );
- 
+
       break;
     }
-    
+
 #if 1
     case DPMSGCMD_JUSTENVELOPE:
     {
@@ -778,14 +778,14 @@
 
 
 static HRESULT WINAPI DP_IF_AddPlayerToGroup
-          ( IDirectPlay2Impl* This, LPVOID lpMsgHdr, DPID idGroup, 
+          ( IDirectPlay2Impl* This, LPVOID lpMsgHdr, DPID idGroup,
             DPID idPlayer, BOOL bAnsi )
 {
   lpGroupData  lpGData;
   lpPlayerList lpPList;
   lpPlayerList lpNewPList;
 
-  TRACE( "(%p)->(%p,0x%08lx,0x%08lx,%u)\n", 
+  TRACE( "(%p)->(%p,0x%08lx,0x%08lx,%u)\n",
          This, lpMsgHdr, idGroup, idPlayer, bAnsi );
 
   /* Find the group */
@@ -803,10 +803,10 @@
   /* Create a player list (ie "shortcut" ) */
   lpNewPList = (lpPlayerList)HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY,
                                         sizeof( *lpNewPList ) );
-  if( lpNewPList == NULL ) 
+  if( lpNewPList == NULL )
   {
     return DPERR_CANTADDPLAYER;
-  }   
+  }
 
   /* Add the shortcut */
   lpPList->lpPData->uRef++;
@@ -819,7 +819,7 @@
   if( This->dp2->spData.lpCB->AddPlayerToGroup )
   {
     DPSP_ADDPLAYERTOGROUPDATA data;
-   
+
     TRACE( "Calling SP AddPlayerToGroup\n" );
 
     data.idPlayer = idPlayer;
@@ -839,7 +839,7 @@
       ( This->dp2->lpSessionDesc->dwFlags & DPSESSION_MULTICASTSERVER ) )
   {
     DPMSG_ADDPLAYERTOGROUP msg;
-    msg.dwType = DPSYS_ADDPLAYERTOGROUP; 
+    msg.dwType = DPSYS_ADDPLAYERTOGROUP;
 
     msg.dpIdGroup  = idGroup;
     msg.dpIdPlayer = idPlayer;
@@ -885,9 +885,9 @@
     TRACE( "Calling SP CloseEx\n" );
 
     data.lpISP = This->dp2->spData.lpISP;
- 
+
     hr = (*This->dp2->spData.lpCB->CloseEx)( &data );
-        
+
   }
   else if ( This->dp2->spData.lpCB->Close ) /* Try obsolete version */
   {
@@ -915,7 +915,7 @@
 
 static
 lpGroupData DP_CreateGroup( IDirectPlay2AImpl* This, LPDPID lpid,
-                            LPDPNAME lpName, DWORD dwFlags, 
+                            LPDPNAME lpName, DWORD dwFlags,
                             DPID idParent, BOOL bAnsi )
 {
   lpGroupData lpGData;
@@ -936,7 +936,7 @@
   lpGData->dpid = *lpid;
 
   DP_CopyDPNAMEStruct( &lpGData->name, lpName, bAnsi );
- 
+
   /* FIXME: Should we check that the parent exists? */
   lpGData->parent  = idParent;
 
@@ -949,7 +949,7 @@
 }
 
 /* This method assumes that all links to it are already deleted */
-static void 
+static void
 DP_DeleteGroup( IDirectPlay2Impl* This, DPID dpid )
 {
   lpGroupList lpGList;
@@ -976,7 +976,7 @@
 
   /* Remove and Delete Player List object */
   HeapFree( GetProcessHeap(), 0, lpGList );
- 
+
 }
 
 static lpGroupData DP_FindAnyGroup( IDirectPlay2AImpl* This, DPID dpid )
@@ -993,7 +993,7 @@
   {
     DPQ_FIND_ENTRY( This->dp2->lpSysGroup->groups, groups, lpGData->dpid, ==, dpid, lpGroups );
   }
-  
+
   if( lpGroups == NULL )
   {
     return NULL;
@@ -1003,14 +1003,14 @@
 }
 
 static HRESULT WINAPI DP_IF_CreateGroup
-          ( IDirectPlay2AImpl* This, LPVOID lpMsgHdr, LPDPID lpidGroup, 
-            LPDPNAME lpGroupName, LPVOID lpData, DWORD dwDataSize, 
+          ( IDirectPlay2AImpl* This, LPVOID lpMsgHdr, LPDPID lpidGroup,
+            LPDPNAME lpGroupName, LPVOID lpData, DWORD dwDataSize,
             DWORD dwFlags, BOOL bAnsi )
 {
   lpGroupData lpGData;
 
-  TRACE( "(%p)->(%p,%p,%p,%p,0x%08lx,0x%08lx,%u)\n", 
-         This, lpMsgHdr, lpidGroup, lpGroupName, lpData, dwDataSize, 
+  TRACE( "(%p)->(%p,%p,%p,%p,0x%08lx,0x%08lx,%u)\n",
+         This, lpMsgHdr, lpidGroup, lpGroupName, lpData, dwDataSize,
          dwFlags, bAnsi );
 
   /* If the name is not specified, we must provide one */
@@ -1028,7 +1028,7 @@
       *lpidGroup = DP_GetRemoteNextObjectId();
     }
   }
- 
+
   lpGData = DP_CreateGroup( This, lpidGroup, lpGroupName, dwFlags,
                             DPID_NOPARENT_GROUP, bAnsi );
 
@@ -1039,13 +1039,13 @@
 
   if( DPID_SYSTEM_GROUP == *lpidGroup )
   {
-    This->dp2->lpSysGroup = lpGData; 
+    This->dp2->lpSysGroup = lpGData;
     TRACE( "Inserting system group\n" );
   }
   else
   {
     /* Insert into the system group */
-    lpGroupList lpGroup = (lpGroupList) HeapAlloc( GetProcessHeap(), 
+    lpGroupList lpGroup = (lpGroupList) HeapAlloc( GetProcessHeap(),
                                                    HEAP_ZERO_MEMORY,
                                                    sizeof( *lpGroup ) );
     lpGroup->lpGData = lpGData;
@@ -1088,12 +1088,12 @@
     (*This->dp2->spData.lpCB->CreateGroup)( &data );
   }
 
-  /* Inform all other peers of the creation of a new group. If there are 
-   * no peers keep this event quiet. 
+  /* Inform all other peers of the creation of a new group. If there are
+   * no peers keep this event quiet.
    * Also if this message was sent to us, don't rebroadcast.
    */
   if( ( lpMsgHdr == NULL ) &&
-      This->dp2->lpSessionDesc && 
+      This->dp2->lpSessionDesc &&
       ( This->dp2->lpSessionDesc->dwFlags & DPSESSION_MULTICASTSERVER ) )
   {
     DPMSG_CREATEPLAYERORGROUP msg;
@@ -1124,23 +1124,23 @@
 {
   *lpidGroup = DPID_UNKNOWN;
 
-  return DP_IF_CreateGroup( (IDirectPlay2AImpl*)iface, NULL, lpidGroup, 
+  return DP_IF_CreateGroup( (IDirectPlay2AImpl*)iface, NULL, lpidGroup,
                             lpGroupName, lpData, dwDataSize, dwFlags, TRUE );
 }
 
 static HRESULT WINAPI DirectPlay2WImpl_CreateGroup
-          ( LPDIRECTPLAY2 iface, LPDPID lpidGroup, LPDPNAME lpGroupName, 
+          ( LPDIRECTPLAY2 iface, LPDPID lpidGroup, LPDPNAME lpGroupName,
             LPVOID lpData, DWORD dwDataSize, DWORD dwFlags )
 {
   *lpidGroup = DPID_UNKNOWN;
 
-  return DP_IF_CreateGroup( (IDirectPlay2AImpl*)iface, NULL, lpidGroup, 
+  return DP_IF_CreateGroup( (IDirectPlay2AImpl*)iface, NULL, lpidGroup,
                             lpGroupName, lpData, dwDataSize, dwFlags, FALSE );
 }
 
 
 static void
-DP_SetGroupData( lpGroupData lpGData, DWORD dwFlags, 
+DP_SetGroupData( lpGroupData lpGData, DWORD dwFlags,
                  LPVOID lpData, DWORD dwDataSize )
 {
   /* Clear out the data with this player */
@@ -1184,9 +1184,9 @@
 }
 
 /* This function will just create the storage for the new player.  */
-static 
-lpPlayerData DP_CreatePlayer( IDirectPlay2Impl* This, LPDPID lpid, 
-                              LPDPNAME lpName, DWORD dwFlags, 
+static
+lpPlayerData DP_CreatePlayer( IDirectPlay2Impl* This, LPDPID lpid,
+                              LPDPNAME lpName, DWORD dwFlags,
                               HANDLE hEvent, BOOL bAnsi )
 {
   lpPlayerData lpPData;
@@ -1194,7 +1194,7 @@
   TRACE( "(%p)->(%p,%p,%u)\n", This, lpid, lpName, bAnsi );
 
   /* Allocate the storage for the player and associate it with list element */
-  lpPData = (lpPlayerData) HeapAlloc( GetProcessHeap(), 
+  lpPData = (lpPlayerData) HeapAlloc( GetProcessHeap(),
                                       HEAP_ZERO_MEMORY,
                                       sizeof( *lpPData ) );
   if( lpPData == NULL )
@@ -1234,8 +1234,8 @@
 static void
 DP_DeleteDPNameStruct( LPDPNAME lpDPName )
 {
-  HeapFree( GetProcessHeap(), HEAP_ZERO_MEMORY, lpDPName->u1.lpszShortNameA ); 
-  HeapFree( GetProcessHeap(), HEAP_ZERO_MEMORY, lpDPName->u2.lpszLongNameA ); 
+  HeapFree( GetProcessHeap(), HEAP_ZERO_MEMORY, lpDPName->u1.lpszShortNameA );
+  HeapFree( GetProcessHeap(), HEAP_ZERO_MEMORY, lpDPName->u2.lpszLongNameA );
 }
 
 /* This method assumes that all links to it are already deleted */
@@ -1258,9 +1258,9 @@
   if( --(lpPList->lpPData->uRef) )
   {
     FIXME( "Why is this not the last reference to player?\n" );
-    DebugBreak(); 
+    DebugBreak();
   }
- 
+
   /* Delete player */
   DP_DeleteDPNameStruct( &lpPList->lpPData->name );
 
@@ -1292,7 +1292,7 @@
     return TRUE;
   }
 
-  if( lpSrc->dwSize != sizeof( *lpSrc) )   
+  if( lpSrc->dwSize != sizeof( *lpSrc) )
   {
     return FALSE;
   }
@@ -1309,7 +1309,7 @@
   }
 
   /* Copy as required */
-  CopyMemory( lpDst, lpSrc, lpSrc->dwSize ); 
+  CopyMemory( lpDst, lpSrc, lpSrc->dwSize );
 
   if( bAnsi )
   {
@@ -1345,8 +1345,8 @@
   return TRUE;
 }
 
-static void 
-DP_SetPlayerData( lpPlayerData lpPData, DWORD dwFlags, 
+static void
+DP_SetPlayerData( lpPlayerData lpPData, DWORD dwFlags,
                   LPVOID lpData, DWORD dwDataSize )
 {
   /* Clear out the data with this player */
@@ -1389,14 +1389,14 @@
 
 }
 
-static HRESULT WINAPI DP_IF_CreatePlayer 
-( IDirectPlay2Impl* This, 
+static HRESULT WINAPI DP_IF_CreatePlayer
+( IDirectPlay2Impl* This,
   LPVOID lpMsgHdr, /* NULL for local creation, non NULL for remote creation */
-  LPDPID lpidPlayer, 
-  LPDPNAME lpPlayerName, 
-  HANDLE hEvent, 
-  LPVOID lpData, 
-  DWORD dwDataSize, 
+  LPDPID lpidPlayer,
+  LPDPNAME lpPlayerName,
+  HANDLE hEvent,
+  LPVOID lpData,
+  DWORD dwDataSize,
   DWORD dwFlags,
   BOOL bAnsi )
 {
@@ -1405,11 +1405,11 @@
   lpPlayerList lpPList;
   DWORD dwCreateFlags = 0;
 
-  TRACE( "(%p)->(%p,%p,%d,%p,0x%08lx,0x%08lx,%u)\n", 
-         This, lpidPlayer, lpPlayerName, hEvent, lpData, 
+  TRACE( "(%p)->(%p,%p,%d,%p,0x%08lx,0x%08lx,%u)\n",
+         This, lpidPlayer, lpPlayerName, hEvent, lpData,
          dwDataSize, dwFlags, bAnsi );
 
-  if( dwFlags == 0 ) 
+  if( dwFlags == 0 )
   {
     dwFlags = DPPLAYER_SPECTATOR;
   }
@@ -1509,7 +1509,7 @@
   DPQ_INSERT( This->dp2->lpSysGroup->players, lpPList, players );
 
   /* Update the information and send it to all players in the session */
-  DP_SetPlayerData( lpPData, DPSET_REMOTE, lpData, dwDataSize );  
+  DP_SetPlayerData( lpPData, DPSET_REMOTE, lpData, dwDataSize );
 
   /* Let the SP know that we've created this player */
   if( This->dp2->spData.lpCB->CreatePlayer )
@@ -1539,7 +1539,7 @@
     DPSP_ADDPLAYERTOGROUPDATA data;
 
     data.idPlayer = *lpidPlayer;
-    data.idGroup  = DPID_SYSTEM_GROUP; 
+    data.idGroup  = DPID_SYSTEM_GROUP;
     data.lpISP    = This->dp2->spData.lpISP;
 
     TRACE( "Calling SP AddPlayerToGroup (sys group)\n" );
@@ -1549,7 +1549,7 @@
 
   if( FAILED(hr) )
   {
-    ERR( "Failed to add player to sys group with sp: %s\n", 
+    ERR( "Failed to add player to sys group with sp: %s\n",
          DPLAYX_HresultToString(hr) );
     return hr;
   }
@@ -1571,7 +1571,7 @@
   }
 #else
   /* Inform all other peers of the creation of a new player. If there are
-   * no peers keep this quiet. 
+   * no peers keep this quiet.
    * Also, if this was a remote event, no need to rebroadcast it.
    */
   if( ( lpMsgHdr == NULL ) &&
@@ -1593,7 +1593,7 @@
     /* FIXME: Correct to just use send effectively? */
     /* FIXME: Should size include data w/ message or just message "header" */
     /* FIXME: Check return code */
-    hr = DP_SendEx( This, DPID_SERVERPLAYER, DPID_ALLPLAYERS, 0, &msg, 
+    hr = DP_SendEx( This, DPID_SERVERPLAYER, DPID_ALLPLAYERS, 0, &msg,
                     sizeof( msg ), 0, 0, NULL, NULL, bAnsi );
   }
 #endif
@@ -1602,7 +1602,7 @@
 }
 
 static HRESULT WINAPI DirectPlay2AImpl_CreatePlayer
-          ( LPDIRECTPLAY2A iface, LPDPID lpidPlayer, LPDPNAME lpPlayerName, 
+          ( LPDIRECTPLAY2A iface, LPDPID lpidPlayer, LPDPNAME lpPlayerName,
             HANDLE hEvent, LPVOID lpData, DWORD dwDataSize, DWORD dwFlags )
 {
   ICOM_THIS(IDirectPlay2Impl,iface);
@@ -1616,12 +1616,12 @@
     *lpidPlayer = DPID_UNKNOWN;
   }
 
-  return DP_IF_CreatePlayer( This, NULL, lpidPlayer, lpPlayerName, hEvent, 
+  return DP_IF_CreatePlayer( This, NULL, lpidPlayer, lpPlayerName, hEvent,
                            lpData, dwDataSize, dwFlags, TRUE );
 }
 
 static HRESULT WINAPI DirectPlay2WImpl_CreatePlayer
-          ( LPDIRECTPLAY2 iface, LPDPID lpidPlayer, LPDPNAME lpPlayerName, 
+          ( LPDIRECTPLAY2 iface, LPDPID lpidPlayer, LPDPNAME lpPlayerName,
             HANDLE hEvent, LPVOID lpData, DWORD dwDataSize, DWORD dwFlags )
 {
   ICOM_THIS(IDirectPlay2Impl,iface);
@@ -1635,7 +1635,7 @@
     *lpidPlayer = DPID_UNKNOWN;
   }
 
-  return DP_IF_CreatePlayer( This, NULL, lpidPlayer, lpPlayerName, hEvent, 
+  return DP_IF_CreatePlayer( This, NULL, lpidPlayer, lpPlayerName, hEvent,
                            lpData, dwDataSize, dwFlags, FALSE );
 }
 
@@ -1648,15 +1648,15 @@
 }
 
 static HRESULT WINAPI DP_IF_DeletePlayerFromGroup
-          ( IDirectPlay2Impl* This, LPVOID lpMsgHdr, DPID idGroup, 
+          ( IDirectPlay2Impl* This, LPVOID lpMsgHdr, DPID idGroup,
             DPID idPlayer, BOOL bAnsi )
 {
   HRESULT hr = DP_OK;
 
   lpGroupData  lpGData;
   lpPlayerList lpPList;
-  
-  TRACE( "(%p)->(%p,0x%08lx,0x%08lx,%u)\n", 
+
+  TRACE( "(%p)->(%p,0x%08lx,0x%08lx,%u)\n",
          This, lpMsgHdr, idGroup, idPlayer, bAnsi );
 
   /* Find the group */
@@ -1736,24 +1736,24 @@
 {
   lpDPRGOPContext lpCtxt = (lpDPRGOPContext)lpContext;
 
-  TRACE( "Removing element:0x%08lx (type:0x%08lx) from element:0x%08lx\n", 
+  TRACE( "Removing element:0x%08lx (type:0x%08lx) from element:0x%08lx\n",
            dpId, dwPlayerType, lpCtxt->idGroup );
 
   if( dwPlayerType == DPPLAYERTYPE_GROUP )
   {
-    if( FAILED( DP_IF_DeleteGroupFromGroup( lpCtxt->This, lpCtxt->idGroup, 
-                                            dpId ) 
-              ) 
+    if( FAILED( DP_IF_DeleteGroupFromGroup( lpCtxt->This, lpCtxt->idGroup,
+                                            dpId )
+              )
       )
     {
-      ERR( "Unable to delete group 0x%08lx from group 0x%08lx\n", 
+      ERR( "Unable to delete group 0x%08lx from group 0x%08lx\n",
              dpId, lpCtxt->idGroup );
     }
   }
   else
   {
-    if( FAILED( DP_IF_DeletePlayerFromGroup( (IDirectPlay2Impl*)lpCtxt->This, 
-                                             NULL, lpCtxt->idGroup, 
+    if( FAILED( DP_IF_DeletePlayerFromGroup( (IDirectPlay2Impl*)lpCtxt->This,
+                                             NULL, lpCtxt->idGroup,
                                              dpId, lpCtxt->bAnsi )
               )
       )
@@ -1762,7 +1762,7 @@
              dpId, lpCtxt->idGroup );
     }
   }
-  
+
   return TRUE; /* Continue enumeration */
 }
 
@@ -1772,7 +1772,7 @@
   lpGroupData lpGData;
   DPRGOPContext context;
 
-  FIXME( "(%p)->(%p,0x%08lx,%u): semi stub\n", 
+  FIXME( "(%p)->(%p,0x%08lx,%u): semi stub\n",
          This, lpMsgHdr, idGroup, bAnsi );
 
   /* Find the group */
@@ -1786,11 +1786,11 @@
   context.idGroup = idGroup;
 
   /* Remove all players that this group has */
-  DP_IF_EnumGroupPlayers( This, idGroup, NULL, 
+  DP_IF_EnumGroupPlayers( This, idGroup, NULL,
                           cbRemoveGroupOrPlayer, (LPVOID)&context, 0, bAnsi );
 
   /* Remove all links to groups that this group has since this is dp3 */
-  DP_IF_EnumGroupsInGroup( (IDirectPlay3Impl*)This, idGroup, NULL, 
+  DP_IF_EnumGroupsInGroup( (IDirectPlay3Impl*)This, idGroup, NULL,
                            cbRemoveGroupOrPlayer, (LPVOID)&context, 0, bAnsi );
 
   /* Remove this group from the parent group - if it has one */
@@ -1798,12 +1798,12 @@
       ( lpGData->parent != DPID_SYSTEM_GROUP )
     )
   {
-    DP_IF_DeleteGroupFromGroup( (IDirectPlay3Impl*)This, lpGData->parent, 
-                                idGroup ); 
+    DP_IF_DeleteGroupFromGroup( (IDirectPlay3Impl*)This, lpGData->parent,
+                                idGroup );
   }
-  
+
   /* Now delete this group data and list from the system group */
-  DP_DeleteGroup( This, idGroup ); 
+  DP_DeleteGroup( This, idGroup );
 
   /* Let the SP know that we've destroyed this group */
   if( This->dp2->spData.lpCB->DeleteGroup )
@@ -1813,7 +1813,7 @@
     FIXME( "data.dwFlags is incorrect\n" );
 
     data.idGroup = idGroup;
-    data.dwFlags = 0; 
+    data.dwFlags = 0;
     data.lpISP   = This->dp2->spData.lpISP;
 
     (*This->dp2->spData.lpCB->DeleteGroup)( &data );
@@ -1850,7 +1850,7 @@
 {
   DPFAGContext cbContext;
 
-  FIXME( "(%p)->(%p,0x%08lx,%u): semi stub\n", 
+  FIXME( "(%p)->(%p,0x%08lx,%u): semi stub\n",
          This, lpMsgHdr, idPlayer, bAnsi );
 
   if( DP_FindPlayer( This, idPlayer ) == NULL )
@@ -1880,7 +1880,7 @@
     FIXME( "data.dwFlags is incorrect\n" );
 
     data.idPlayer = idPlayer;
-    data.dwFlags = 0; 
+    data.dwFlags = 0;
     data.lpISP   = This->dp2->spData.lpISP;
 
     (*This->dp2->spData.lpCB->DeletePlayer)( &data );
@@ -1912,7 +1912,7 @@
     DP_IF_EnumGroupsInGroup( (IDirectPlay3Impl*)lpCtxt->This,
                              dpId, NULL,
                              cbDeletePlayerFromAllGroups,
-                             (LPVOID)lpContext, DPENUMGROUPS_ALL, 
+                             (LPVOID)lpContext, DPENUMGROUPS_ALL,
                              lpCtxt->bAnsi );
 
   }
@@ -1939,15 +1939,15 @@
 }
 
 static HRESULT WINAPI DP_IF_EnumGroupPlayers
-          ( IDirectPlay2Impl* This, DPID idGroup, LPGUID lpguidInstance, 
+          ( IDirectPlay2Impl* This, DPID idGroup, LPGUID lpguidInstance,
             LPDPENUMPLAYERSCALLBACK2 lpEnumPlayersCallback2,
             LPVOID lpContext, DWORD dwFlags, BOOL bAnsi )
 {
   lpGroupData  lpGData;
   lpPlayerList lpPList;
 
-  FIXME("(%p)->(0x%08lx,%p,%p,%p,0x%08lx,%u): semi stub\n", 
-          This, idGroup, lpguidInstance, lpEnumPlayersCallback2, 
+  FIXME("(%p)->(0x%08lx,%p,%p,%p,0x%08lx,%u): semi stub\n",
+          This, idGroup, lpguidInstance, lpEnumPlayersCallback2,
           lpContext, dwFlags, bAnsi );
 
   /* Find the group */
@@ -1960,7 +1960,7 @@
   {
     return DP_OK;
   }
- 
+
   lpPList = DPQ_FIRST( lpGData->players );
 
   /* Walk the players in this group */
@@ -1970,7 +1970,7 @@
      * concequence to the end user.
      */
     if( ( lpPList->lpPData->dpid != DPID_NAME_SERVER ) &&
-        ( lpPList->lpPData->dpid != DPID_SERVERPLAYER ) 
+        ( lpPList->lpPData->dpid != DPID_SERVERPLAYER )
       )
     {
 
@@ -1989,7 +1989,7 @@
 
     if( DPQ_IS_ENDOFLIST( lpPList->players ) )
     {
-      break; 
+      break;
     }
 
     lpPList = DPQ_NEXT( lpPList->players );
@@ -1999,7 +1999,7 @@
 }
 
 static HRESULT WINAPI DirectPlay2AImpl_EnumGroupPlayers
-          ( LPDIRECTPLAY2A iface, DPID idGroup, LPGUID lpguidInstance, 
+          ( LPDIRECTPLAY2A iface, DPID idGroup, LPGUID lpguidInstance,
             LPDPENUMPLAYERSCALLBACK2 lpEnumPlayersCallback2,
             LPVOID lpContext, DWORD dwFlags )
 {
@@ -2010,7 +2010,7 @@
 }
 
 static HRESULT WINAPI DirectPlay2WImpl_EnumGroupPlayers
-          ( LPDIRECTPLAY2 iface, DPID idGroup, LPGUID lpguidInstance, 
+          ( LPDIRECTPLAY2 iface, DPID idGroup, LPGUID lpguidInstance,
             LPDPENUMPLAYERSCALLBACK2 lpEnumPlayersCallback2,
             LPVOID lpContext, DWORD dwFlags )
 {
@@ -2022,19 +2022,19 @@
 
 /* NOTE: This only enumerates top level groups (created with CreateGroup) */
 static HRESULT WINAPI DP_IF_EnumGroups
-          ( IDirectPlay2Impl* This, LPGUID lpguidInstance, 
-            LPDPENUMPLAYERSCALLBACK2 lpEnumPlayersCallback2, 
+          ( IDirectPlay2Impl* This, LPGUID lpguidInstance,
+            LPDPENUMPLAYERSCALLBACK2 lpEnumPlayersCallback2,
             LPVOID lpContext, DWORD dwFlags, BOOL bAnsi )
 {
-  return DP_IF_EnumGroupsInGroup( (IDirectPlay3Impl*)This, 
+  return DP_IF_EnumGroupsInGroup( (IDirectPlay3Impl*)This,
                                   DPID_SYSTEM_GROUP, lpguidInstance,
                                   lpEnumPlayersCallback2, lpContext,
                                   dwFlags, bAnsi );
 }
 
 static HRESULT WINAPI DirectPlay2AImpl_EnumGroups
-          ( LPDIRECTPLAY2A iface, LPGUID lpguidInstance, 
-            LPDPENUMPLAYERSCALLBACK2 lpEnumPlayersCallback2, 
+          ( LPDIRECTPLAY2A iface, LPGUID lpguidInstance,
+            LPDPENUMPLAYERSCALLBACK2 lpEnumPlayersCallback2,
             LPVOID lpContext, DWORD dwFlags )
 {
   ICOM_THIS(IDirectPlay2Impl,iface);
@@ -2043,8 +2043,8 @@
 }
 
 static HRESULT WINAPI DirectPlay2WImpl_EnumGroups
-          ( LPDIRECTPLAY2 iface, LPGUID lpguidInstance, 
-            LPDPENUMPLAYERSCALLBACK2 lpEnumPlayersCallback2, 
+          ( LPDIRECTPLAY2 iface, LPGUID lpguidInstance,
+            LPDPENUMPLAYERSCALLBACK2 lpEnumPlayersCallback2,
             LPVOID lpContext, DWORD dwFlags )
 {
   ICOM_THIS(IDirectPlay2Impl,iface);
@@ -2053,8 +2053,8 @@
 }
 
 static HRESULT WINAPI DP_IF_EnumPlayers
-          ( IDirectPlay2Impl* This, LPGUID lpguidInstance, 
-            LPDPENUMPLAYERSCALLBACK2 lpEnumPlayersCallback2, 
+          ( IDirectPlay2Impl* This, LPGUID lpguidInstance,
+            LPDPENUMPLAYERSCALLBACK2 lpEnumPlayersCallback2,
             LPVOID lpContext, DWORD dwFlags, BOOL bAnsi )
 {
   return DP_IF_EnumGroupPlayers( This, DPID_SYSTEM_GROUP, lpguidInstance,
@@ -2063,8 +2063,8 @@
 }
 
 static HRESULT WINAPI DirectPlay2AImpl_EnumPlayers
-          ( LPDIRECTPLAY2A iface, LPGUID lpguidInstance, 
-            LPDPENUMPLAYERSCALLBACK2 lpEnumPlayersCallback2, 
+          ( LPDIRECTPLAY2A iface, LPGUID lpguidInstance,
+            LPDPENUMPLAYERSCALLBACK2 lpEnumPlayersCallback2,
             LPVOID lpContext, DWORD dwFlags )
 {
   ICOM_THIS(IDirectPlay2Impl,iface);
@@ -2073,8 +2073,8 @@
 }
 
 static HRESULT WINAPI DirectPlay2WImpl_EnumPlayers
-          ( LPDIRECTPLAY2 iface, LPGUID lpguidInstance, 
-            LPDPENUMPLAYERSCALLBACK2 lpEnumPlayersCallback2, 
+          ( LPDIRECTPLAY2 iface, LPGUID lpguidInstance,
+            LPDPENUMPLAYERSCALLBACK2 lpEnumPlayersCallback2,
             LPVOID lpContext, DWORD dwFlags )
 {
   ICOM_THIS(IDirectPlay2Impl,iface);
@@ -2168,7 +2168,7 @@
   /* Does a thread exist? If so we were doing an async enum session */
   if( This->dp2->hEnumSessionThread != INVALID_HANDLE_VALUE )
   {
-    TRACE( "Killing EnumSession thread %u\n", 
+    TRACE( "Killing EnumSession thread %u\n",
            This->dp2->hEnumSessionThread );
 
     /* Request that the thread kill itself nicely */
@@ -2183,13 +2183,13 @@
 }
 
 static HRESULT WINAPI DP_IF_EnumSessions
-          ( IDirectPlay2Impl* This, LPDPSESSIONDESC2 lpsd, DWORD dwTimeout, 
+          ( IDirectPlay2Impl* This, LPDPSESSIONDESC2 lpsd, DWORD dwTimeout,
             LPDPENUMSESSIONSCALLBACK2 lpEnumSessionsCallback2,
             LPVOID lpContext, DWORD dwFlags, BOOL bAnsi )
 {
   HRESULT hr = DP_OK;
 
-  TRACE( "(%p)->(%p,0x%08lx,%p,%p,0x%08lx,%u)\n", 
+  TRACE( "(%p)->(%p,0x%08lx,%p,%p,0x%08lx,%u)\n",
          This, lpsd, dwTimeout, lpEnumSessionsCallback2, lpContext, dwFlags,
          bAnsi );
 
@@ -2267,8 +2267,8 @@
   if( ( dwFlags & DPENUMSESSIONS_ASYNC ) )
   {
     /* Enumerate everything presently in the local session cache */
-    DP_InvokeEnumSessionCallbacks( lpEnumSessionsCallback2, 
-                                   This->dp2->lpNameServerData, dwTimeout, 
+    DP_InvokeEnumSessionCallbacks( lpEnumSessionsCallback2,
+                                   This->dp2->lpNameServerData, dwTimeout,
                                    lpContext );
 
 
@@ -2285,7 +2285,7 @@
 
       if( !FAILED(hr) )
       {
-        EnumSessionAsyncCallbackData* lpData 
+        EnumSessionAsyncCallbackData* lpData
           = (EnumSessionAsyncCallbackData*)HeapAlloc( GetProcessHeap(),
                                                       HEAP_ZERO_MEMORY,
                                                        sizeof( *lpData ) );
@@ -2295,11 +2295,11 @@
         CopyMemory( &lpData->requestGuid, &lpsd->guidApplication, sizeof(GUID) );
         lpData->dwEnumSessionFlags = dwFlags;
         lpData->dwTimeout = dwTimeout;
-  
-        This->dp2->hKillEnumSessionThreadEvent = 
+
+        This->dp2->hKillEnumSessionThreadEvent =
           CreateEventA( NULL, TRUE, FALSE, NULL );
-  
-        if( !DuplicateHandle( GetCurrentProcess(), 
+
+        if( !DuplicateHandle( GetCurrentProcess(),
                               This->dp2->hKillEnumSessionThreadEvent,
                               GetCurrentProcess(),
                               &lpData->hSuicideRequest,
@@ -2308,9 +2308,9 @@
         {
           ERR( "Can't duplicate thread killing handle\n" );
         }
-  
+
         TRACE( ": creating EnumSessionsRequest thread\n" );
-  
+
         This->dp2->hEnumSessionThread = CreateThread( NULL,
                                                       0,
                                                       DP_EnumSessionsSendAsyncRequestThread,
@@ -2318,7 +2318,7 @@
                                                       0,
                                                       &dwThreadId );
       }
-    } 
+    }
   }
   else
   {
@@ -2333,8 +2333,8 @@
 
     SleepEx( dwTimeout, FALSE );
 
-    DP_InvokeEnumSessionCallbacks( lpEnumSessionsCallback2, 
-                                   This->dp2->lpNameServerData, dwTimeout, 
+    DP_InvokeEnumSessionCallbacks( lpEnumSessionsCallback2,
+                                   This->dp2->lpNameServerData, dwTimeout,
                                    lpContext );
   }
 
@@ -2342,7 +2342,7 @@
 }
 
 static HRESULT WINAPI DirectPlay2AImpl_EnumSessions
-          ( LPDIRECTPLAY2A iface, LPDPSESSIONDESC2 lpsd, DWORD dwTimeout, 
+          ( LPDIRECTPLAY2A iface, LPDPSESSIONDESC2 lpsd, DWORD dwTimeout,
             LPDPENUMSESSIONSCALLBACK2 lpEnumSessionsCallback2,
             LPVOID lpContext, DWORD dwFlags )
 {
@@ -2352,7 +2352,7 @@
 }
 
 static HRESULT WINAPI DirectPlay2WImpl_EnumSessions
-          ( LPDIRECTPLAY2 iface, LPDPSESSIONDESC2 lpsd, DWORD dwTimeout, 
+          ( LPDIRECTPLAY2 iface, LPDPSESSIONDESC2 lpsd, DWORD dwTimeout,
             LPDPENUMSESSIONSCALLBACK2 lpEnumSessionsCallback2,
             LPVOID lpContext, DWORD dwFlags )
 {
@@ -2362,7 +2362,7 @@
 }
 
 static HRESULT WINAPI DP_IF_GetPlayerCaps
-          ( IDirectPlay2Impl* This, DPID idPlayer, LPDPCAPS lpDPCaps, 
+          ( IDirectPlay2Impl* This, DPID idPlayer, LPDPCAPS lpDPCaps,
             DWORD dwFlags )
 {
   DPSP_GETCAPSDATA data;
@@ -2399,14 +2399,14 @@
 }
 
 static HRESULT WINAPI DP_IF_GetGroupData
-          ( IDirectPlay2Impl* This, DPID idGroup, LPVOID lpData, 
+          ( IDirectPlay2Impl* This, DPID idGroup, LPVOID lpData,
             LPDWORD lpdwDataSize, DWORD dwFlags, BOOL bAnsi )
 {
   lpGroupData lpGData;
   DWORD dwRequiredBufferSize;
   LPVOID lpCopyDataFrom;
 
-  TRACE( "(%p)->(0x%08lx,%p,%p,0x%08lx,%u)\n", 
+  TRACE( "(%p)->(0x%08lx,%p,%p,0x%08lx,%u)\n",
          This, idGroup, lpData, lpdwDataSize, dwFlags, bAnsi );
 
   if( ( lpGData = DP_FindAnyGroup( This, idGroup ) ) == NULL )
@@ -2434,11 +2434,11 @@
 
   /* Is the user requesting to know how big a buffer is required? */
   if( ( lpData == NULL ) ||
-      ( *lpdwDataSize < dwRequiredBufferSize ) 
+      ( *lpdwDataSize < dwRequiredBufferSize )
     )
   {
     *lpdwDataSize = dwRequiredBufferSize;
-    return DPERR_BUFFERTOOSMALL; 
+    return DPERR_BUFFERTOOSMALL;
   }
 
   CopyMemory( lpData, lpCopyDataFrom, dwRequiredBufferSize );
@@ -2447,32 +2447,32 @@
 }
 
 static HRESULT WINAPI DirectPlay2AImpl_GetGroupData
-          ( LPDIRECTPLAY2A iface, DPID idGroup, LPVOID lpData, 
+          ( LPDIRECTPLAY2A iface, DPID idGroup, LPVOID lpData,
             LPDWORD lpdwDataSize, DWORD dwFlags )
 {
   ICOM_THIS(IDirectPlay2Impl,iface);
-  return DP_IF_GetGroupData( This, idGroup, lpData, lpdwDataSize, 
+  return DP_IF_GetGroupData( This, idGroup, lpData, lpdwDataSize,
                            dwFlags, TRUE );
 }
 
 static HRESULT WINAPI DirectPlay2WImpl_GetGroupData
-          ( LPDIRECTPLAY2 iface, DPID idGroup, LPVOID lpData, 
+          ( LPDIRECTPLAY2 iface, DPID idGroup, LPVOID lpData,
             LPDWORD lpdwDataSize, DWORD dwFlags )
 {
   ICOM_THIS(IDirectPlay2Impl,iface);
-  return DP_IF_GetGroupData( This, idGroup, lpData, lpdwDataSize, 
+  return DP_IF_GetGroupData( This, idGroup, lpData, lpdwDataSize,
                            dwFlags, FALSE );
 }
 
 static HRESULT WINAPI DP_IF_GetGroupName
-          ( IDirectPlay2Impl* This, DPID idGroup, LPVOID lpData, 
+          ( IDirectPlay2Impl* This, DPID idGroup, LPVOID lpData,
             LPDWORD lpdwDataSize, BOOL bAnsi )
 {
   lpGroupData lpGData;
   LPDPNAME    lpName = (LPDPNAME)lpData;
   DWORD       dwRequiredDataSize;
 
-  FIXME("(%p)->(0x%08lx,%p,%p,%u) ANSI ignored\n", 
+  FIXME("(%p)->(0x%08lx,%p,%p,%u) ANSI ignored\n",
           This, idGroup, lpData, lpdwDataSize, bAnsi );
 
   if( ( lpGData = DP_FindAnyGroup( This, idGroup ) ) == NULL )
@@ -2491,7 +2491,7 @@
   {
     dwRequiredDataSize += strlen( lpGData->name.u2.lpszLongNameA ) + 1;
   }
- 
+
   if( ( lpData == NULL ) ||
       ( *lpdwDataSize < dwRequiredDataSize )
     )
@@ -2505,7 +2505,7 @@
 
   if( lpGData->name.u1.lpszShortNameA )
   {
-    strcpy( ((BYTE*)lpName)+lpGData->name.dwSize, 
+    strcpy( ((BYTE*)lpName)+lpGData->name.dwSize,
             lpGData->name.u1.lpszShortNameA );
   }
   else
@@ -2515,7 +2515,7 @@
 
   if( lpGData->name.u1.lpszShortNameA )
   {
-    strcpy( ((BYTE*)lpName)+lpGData->name.dwSize, 
+    strcpy( ((BYTE*)lpName)+lpGData->name.dwSize,
             lpGData->name.u2.lpszLongNameA );
   }
   else
@@ -2527,7 +2527,7 @@
 }
 
 static HRESULT WINAPI DirectPlay2AImpl_GetGroupName
-          ( LPDIRECTPLAY2A iface, DPID idGroup, LPVOID lpData, 
+          ( LPDIRECTPLAY2A iface, DPID idGroup, LPVOID lpData,
             LPDWORD lpdwDataSize )
 {
   ICOM_THIS(IDirectPlay2Impl,iface);
@@ -2535,7 +2535,7 @@
 }
 
 static HRESULT WINAPI DirectPlay2WImpl_GetGroupName
-          ( LPDIRECTPLAY2 iface, DPID idGroup, LPVOID lpData, 
+          ( LPDIRECTPLAY2 iface, DPID idGroup, LPVOID lpData,
             LPDWORD lpdwDataSize )
 {
   ICOM_THIS(IDirectPlay2Impl,iface);
@@ -2543,12 +2543,12 @@
 }
 
 static HRESULT WINAPI DP_IF_GetMessageCount
-          ( IDirectPlay2Impl* This, DPID idPlayer, 
+          ( IDirectPlay2Impl* This, DPID idPlayer,
             LPDWORD lpdwCount, BOOL bAnsi )
 {
   FIXME("(%p)->(0x%08lx,%p,%u): stub\n", This, idPlayer, lpdwCount, bAnsi );
-  return DP_IF_GetMessageQueue( (IDirectPlay4Impl*)This, 0, idPlayer, 
-                                DPMESSAGEQUEUE_RECEIVE, lpdwCount, NULL, 
+  return DP_IF_GetMessageQueue( (IDirectPlay4Impl*)This, 0, idPlayer,
+                                DPMESSAGEQUEUE_RECEIVE, lpdwCount, NULL,
                                 bAnsi );
 }
 
@@ -2583,7 +2583,7 @@
 }
 
 static HRESULT WINAPI DirectPlay2AImpl_GetPlayerCaps
-          ( LPDIRECTPLAY2A iface, DPID idPlayer, LPDPCAPS lpPlayerCaps, 
+          ( LPDIRECTPLAY2A iface, DPID idPlayer, LPDPCAPS lpPlayerCaps,
             DWORD dwFlags )
 {
   ICOM_THIS(IDirectPlay2Impl,iface);
@@ -2591,7 +2591,7 @@
 }
 
 static HRESULT WINAPI DirectPlay2WImpl_GetPlayerCaps
-          ( LPDIRECTPLAY2 iface, DPID idPlayer, LPDPCAPS lpPlayerCaps, 
+          ( LPDIRECTPLAY2 iface, DPID idPlayer, LPDPCAPS lpPlayerCaps,
             DWORD dwFlags )
 {
   ICOM_THIS(IDirectPlay2Impl,iface);
@@ -2599,14 +2599,14 @@
 }
 
 static HRESULT WINAPI DP_IF_GetPlayerData
-          ( IDirectPlay2Impl* This, DPID idPlayer, LPVOID lpData, 
+          ( IDirectPlay2Impl* This, DPID idPlayer, LPVOID lpData,
             LPDWORD lpdwDataSize, DWORD dwFlags, BOOL bAnsi )
 {
   lpPlayerList lpPList;
   DWORD dwRequiredBufferSize;
   LPVOID lpCopyDataFrom;
 
-  TRACE( "(%p)->(0x%08lx,%p,%p,0x%08lx,%u)\n", 
+  TRACE( "(%p)->(0x%08lx,%p,%p,0x%08lx,%u)\n",
          This, idPlayer, lpData, lpdwDataSize, dwFlags, bAnsi );
 
   if( ( lpPList = DP_FindPlayer( This, idPlayer ) ) == NULL )
@@ -2647,32 +2647,32 @@
 }
 
 static HRESULT WINAPI DirectPlay2AImpl_GetPlayerData
-          ( LPDIRECTPLAY2A iface, DPID idPlayer, LPVOID lpData, 
+          ( LPDIRECTPLAY2A iface, DPID idPlayer, LPVOID lpData,
             LPDWORD lpdwDataSize, DWORD dwFlags )
 {
   ICOM_THIS(IDirectPlay2Impl,iface);
-  return DP_IF_GetPlayerData( This, idPlayer, lpData, lpdwDataSize, 
+  return DP_IF_GetPlayerData( This, idPlayer, lpData, lpdwDataSize,
                             dwFlags, TRUE );
 }
 
 static HRESULT WINAPI DirectPlay2WImpl_GetPlayerData
-          ( LPDIRECTPLAY2 iface, DPID idPlayer, LPVOID lpData, 
+          ( LPDIRECTPLAY2 iface, DPID idPlayer, LPVOID lpData,
             LPDWORD lpdwDataSize, DWORD dwFlags )
 {
   ICOM_THIS(IDirectPlay2Impl,iface);
-  return DP_IF_GetPlayerData( This, idPlayer, lpData, lpdwDataSize, 
+  return DP_IF_GetPlayerData( This, idPlayer, lpData, lpdwDataSize,
                             dwFlags, FALSE );
 }
 
 static HRESULT WINAPI DP_IF_GetPlayerName
-          ( IDirectPlay2Impl* This, DPID idPlayer, LPVOID lpData, 
+          ( IDirectPlay2Impl* This, DPID idPlayer, LPVOID lpData,
             LPDWORD lpdwDataSize, BOOL bAnsi )
 {
   lpPlayerList lpPList;
   LPDPNAME    lpName = (LPDPNAME)lpData;
   DWORD       dwRequiredDataSize;
 
-  FIXME( "(%p)->(0x%08lx,%p,%p,%u): ANSI \n", 
+  FIXME( "(%p)->(0x%08lx,%p,%p,%u): ANSI \n",
          This, idPlayer, lpData, lpdwDataSize, bAnsi );
 
   if( ( lpPList = DP_FindPlayer( This, idPlayer ) ) == NULL )
@@ -2727,7 +2727,7 @@
 }
 
 static HRESULT WINAPI DirectPlay2AImpl_GetPlayerName
-          ( LPDIRECTPLAY2A iface, DPID idPlayer, LPVOID lpData, 
+          ( LPDIRECTPLAY2A iface, DPID idPlayer, LPVOID lpData,
             LPDWORD lpdwDataSize )
 {
   ICOM_THIS(IDirectPlay2Impl,iface);
@@ -2735,7 +2735,7 @@
 }
 
 static HRESULT WINAPI DirectPlay2WImpl_GetPlayerName
-          ( LPDIRECTPLAY2 iface, DPID idPlayer, LPVOID lpData, 
+          ( LPDIRECTPLAY2 iface, DPID idPlayer, LPVOID lpData,
             LPDWORD lpdwDataSize )
 {
   ICOM_THIS(IDirectPlay2Impl,iface);
@@ -2743,14 +2743,14 @@
 }
 
 static HRESULT WINAPI DP_GetSessionDesc
-          ( IDirectPlay2Impl* This, LPVOID lpData, LPDWORD lpdwDataSize, 
+          ( IDirectPlay2Impl* This, LPVOID lpData, LPDWORD lpdwDataSize,
             BOOL bAnsi )
 {
   DWORD dwRequiredSize;
 
   TRACE( "(%p)->(%p,%p,%u)\n", This, lpData, lpdwDataSize, bAnsi );
 
-  if( ( lpData == NULL ) && ( lpdwDataSize == NULL ) ) 
+  if( ( lpData == NULL ) && ( lpdwDataSize == NULL ) )
   {
     return DPERR_INVALIDPARAMS;
   }
@@ -2765,10 +2765,10 @@
     *lpdwDataSize = dwRequiredSize;
     return DPERR_BUFFERTOOSMALL;
   }
-  
+
   DP_CopySessionDesc( lpData, This->dp2->lpSessionDesc, bAnsi );
 
-  return DP_OK;  
+  return DP_OK;
 }
 
 static HRESULT WINAPI DirectPlay2AImpl_GetSessionDesc
@@ -2811,7 +2811,7 @@
 {
   HRESULT hr = DP_OK;
 
-  FIXME( "(%p)->(%p,0x%08lx,%p,%p): partial stub\n", 
+  FIXME( "(%p)->(%p,0x%08lx,%p,%p): partial stub\n",
          This, lpsd, dwFlags, lpSecurity, lpCredentials );
 
   if( This->dp2->bConnectionOpen )
@@ -2834,7 +2834,7 @@
     hr = DP_SetSessionDesc( This, lpsd, 0, TRUE, bAnsi );
     if( FAILED( hr ) )
     {
-      ERR( "Unable to set session desc: %s\n", DPLAYX_HresultToString( hr ) );  
+      ERR( "Unable to set session desc: %s\n", DPLAYX_HresultToString( hr ) );
       return hr;
     }
   }
@@ -2847,7 +2847,7 @@
     FIXME( "Not all data fields are correct. Need new parameter\n" );
 
     data.bCreate           = (dwFlags & DPOPEN_CREATE ) ? TRUE : FALSE;
-    data.lpSPMessageHeader = (dwFlags & DPOPEN_CREATE ) ? NULL 
+    data.lpSPMessageHeader = (dwFlags & DPOPEN_CREATE ) ? NULL
                                                         : NS_GetNSAddr( This->dp2->lpNameServerData );
     data.lpISP             = This->dp2->spData.lpISP;
     data.bReturnStatus     = (dwFlags & DPOPEN_RETURNSTATUS) ? TRUE : FALSE;
@@ -2857,7 +2857,7 @@
     hr = (*This->dp2->spData.lpCB->Open)(&data);
     if( FAILED( hr ) )
     {
-      ERR( "Unable to open session: %s\n", DPLAYX_HresultToString( hr ) );  
+      ERR( "Unable to open session: %s\n", DPLAYX_HresultToString( hr ) );
       return hr;
     }
   }
@@ -2868,23 +2868,23 @@
 
     hr = DP_IF_CreateGroup( This, NULL, &systemGroup, NULL,
                             NULL, 0, 0, TRUE );
-                       
+
   }
 
   if( dwFlags & DPOPEN_JOIN )
   {
     DPID dpidServerId = DPID_UNKNOWN;
- 
+
     /* Create the server player for this interface. This way we can receive
      * messages for this session.
      */
-    /* FIXME: I suppose that we should be setting an event for a receive 
+    /* FIXME: I suppose that we should be setting an event for a receive
      *        type of thing. That way the messaging thread could know to wake
      *        up. DPlay would then trigger the hEvent for the player the
      *        message is directed to.
      */
-    hr = DP_IF_CreatePlayer( This, NULL, &dpidServerId, NULL, 0, NULL, 
-                             0, 
+    hr = DP_IF_CreatePlayer( This, NULL, &dpidServerId, NULL, 0, NULL,
+                             0,
                              DPPLAYER_SERVERPLAYER | DPPLAYER_LOCAL , bAnsi );
 
   }
@@ -2922,12 +2922,12 @@
 }
 
 static HRESULT WINAPI DP_IF_Receive
-          ( IDirectPlay2Impl* This, LPDPID lpidFrom, LPDPID lpidTo, 
+          ( IDirectPlay2Impl* This, LPDPID lpidFrom, LPDPID lpidTo,
             DWORD dwFlags, LPVOID lpData, LPDWORD lpdwDataSize, BOOL bAnsi )
 {
   LPDPMSG lpMsg = NULL;
 
-  FIXME( "(%p)->(%p,%p,0x%08lx,%p,%p,%u): stub\n", 
+  FIXME( "(%p)->(%p,%p,0x%08lx,%p,%p,%u): stub\n",
          This, lpidFrom, lpidTo, dwFlags, lpData, lpdwDataSize, bAnsi );
 
   if( dwFlags == 0 )
@@ -2950,7 +2950,7 @@
     if( !( dwFlags & DPRECEIVE_PEEK ) )
     {
       FIXME( "Remove from queue\n" );
-    } 
+    }
   }
   else if( ( dwFlags & DPRECEIVE_TOPLAYER ) ||
            ( dwFlags & DPRECEIVE_FROMPLAYER )
@@ -2975,20 +2975,20 @@
 }
 
 static HRESULT WINAPI DirectPlay2AImpl_Receive
-          ( LPDIRECTPLAY2A iface, LPDPID lpidFrom, LPDPID lpidTo, 
+          ( LPDIRECTPLAY2A iface, LPDPID lpidFrom, LPDPID lpidTo,
             DWORD dwFlags, LPVOID lpData, LPDWORD lpdwDataSize )
 {
   ICOM_THIS(IDirectPlay2Impl,iface);
-  return DP_IF_Receive( This, lpidFrom, lpidTo, dwFlags, 
+  return DP_IF_Receive( This, lpidFrom, lpidTo, dwFlags,
                         lpData, lpdwDataSize, TRUE );
 }
 
 static HRESULT WINAPI DirectPlay2WImpl_Receive
-          ( LPDIRECTPLAY2 iface, LPDPID lpidFrom, LPDPID lpidTo, 
+          ( LPDIRECTPLAY2 iface, LPDPID lpidFrom, LPDPID lpidTo,
             DWORD dwFlags, LPVOID lpData, LPDWORD lpdwDataSize )
 {
   ICOM_THIS(IDirectPlay2Impl,iface);
-  return DP_IF_Receive( This, lpidFrom, lpidTo, dwFlags, 
+  return DP_IF_Receive( This, lpidFrom, lpidTo, dwFlags,
                         lpData, lpdwDataSize, FALSE );
 }
 
@@ -2996,7 +2996,7 @@
           ( LPDIRECTPLAY2A iface, DPID idFrom, DPID idTo, DWORD dwFlags, LPVOID lpData, DWORD dwDataSize )
 {
   ICOM_THIS(IDirectPlay2Impl,iface);
-  return DP_SendEx( This, idFrom, idTo, dwFlags, lpData, dwDataSize, 
+  return DP_SendEx( This, idFrom, idTo, dwFlags, lpData, dwDataSize,
                     0, 0, NULL, NULL, TRUE );
 }
 
@@ -3004,17 +3004,17 @@
           ( LPDIRECTPLAY2 iface, DPID idFrom, DPID idTo, DWORD dwFlags, LPVOID lpData, DWORD dwDataSize )
 {
   ICOM_THIS(IDirectPlay2Impl,iface);
-  return DP_SendEx( This, idFrom, idTo, dwFlags, lpData, dwDataSize, 
+  return DP_SendEx( This, idFrom, idTo, dwFlags, lpData, dwDataSize,
                     0, 0, NULL, NULL, FALSE );
 }
 
 static HRESULT WINAPI DP_IF_SetGroupData
-          ( IDirectPlay2Impl* This, DPID idGroup, LPVOID lpData, 
+          ( IDirectPlay2Impl* This, DPID idGroup, LPVOID lpData,
             DWORD dwDataSize, DWORD dwFlags, BOOL bAnsi )
 {
   lpGroupData lpGData;
 
-  TRACE( "(%p)->(0x%08lx,%p,0x%08lx,0x%08lx,%u)\n", 
+  TRACE( "(%p)->(0x%08lx,%p,0x%08lx,0x%08lx,%u)\n",
          This, idGroup, lpData, dwDataSize, dwFlags, bAnsi );
 
   /* Parameter check */
@@ -3034,7 +3034,7 @@
   if( dwFlags & DPSET_REMOTE )
   {
     FIXME( "Was this group created by this interface?\n" );
-    /* FIXME: If this is a remote update need to allow it but not 
+    /* FIXME: If this is a remote update need to allow it but not
      *        send a message.
      */
   }
@@ -3053,28 +3053,28 @@
 }
 
 static HRESULT WINAPI DirectPlay2AImpl_SetGroupData
-          ( LPDIRECTPLAY2A iface, DPID idGroup, LPVOID lpData, 
+          ( LPDIRECTPLAY2A iface, DPID idGroup, LPVOID lpData,
             DWORD dwDataSize, DWORD dwFlags )
-{  
+{
   ICOM_THIS(IDirectPlay2Impl,iface);
   return DP_IF_SetGroupData( This, idGroup, lpData, dwDataSize, dwFlags, TRUE );
 }
 
 static HRESULT WINAPI DirectPlay2WImpl_SetGroupData
-          ( LPDIRECTPLAY2 iface, DPID idGroup, LPVOID lpData, 
+          ( LPDIRECTPLAY2 iface, DPID idGroup, LPVOID lpData,
             DWORD dwDataSize, DWORD dwFlags )
-{   
+{
   ICOM_THIS(IDirectPlay2Impl,iface);
   return DP_IF_SetGroupData( This, idGroup, lpData, dwDataSize, dwFlags, FALSE );
 }
 
 static HRESULT WINAPI DP_IF_SetGroupName
-          ( IDirectPlay2Impl* This, DPID idGroup, LPDPNAME lpGroupName, 
+          ( IDirectPlay2Impl* This, DPID idGroup, LPDPNAME lpGroupName,
             DWORD dwFlags, BOOL bAnsi )
 {
   lpGroupData lpGData;
 
-  TRACE( "(%p)->(0x%08lx,%p,0x%08lx,%u)\n", This, idGroup, 
+  TRACE( "(%p)->(0x%08lx,%p,0x%08lx,%u)\n", This, idGroup,
          lpGroupName, dwFlags, bAnsi );
 
   if( ( lpGData = DP_FindAnyGroup( This, idGroup ) ) == NULL )
@@ -3091,7 +3091,7 @@
 }
 
 static HRESULT WINAPI DirectPlay2AImpl_SetGroupName
-          ( LPDIRECTPLAY2A iface, DPID idGroup, LPDPNAME lpGroupName, 
+          ( LPDIRECTPLAY2A iface, DPID idGroup, LPDPNAME lpGroupName,
             DWORD dwFlags )
 {
   ICOM_THIS(IDirectPlay2Impl,iface);
@@ -3099,7 +3099,7 @@
 }
 
 static HRESULT WINAPI DirectPlay2WImpl_SetGroupName
-          ( LPDIRECTPLAY2 iface, DPID idGroup, LPDPNAME lpGroupName, 
+          ( LPDIRECTPLAY2 iface, DPID idGroup, LPDPNAME lpGroupName,
             DWORD dwFlags )
 {
   ICOM_THIS(IDirectPlay2Impl,iface);
@@ -3107,12 +3107,12 @@
 }
 
 static HRESULT WINAPI DP_IF_SetPlayerData
-          ( IDirectPlay2Impl* This, DPID idPlayer, LPVOID lpData, 
+          ( IDirectPlay2Impl* This, DPID idPlayer, LPVOID lpData,
             DWORD dwDataSize, DWORD dwFlags, BOOL bAnsi )
 {
   lpPlayerList lpPList;
 
-  TRACE( "(%p)->(0x%08lx,%p,0x%08lx,0x%08lx,%u)\n", 
+  TRACE( "(%p)->(0x%08lx,%p,0x%08lx,0x%08lx,%u)\n",
          This, idPlayer, lpData, dwDataSize, dwFlags, bAnsi );
 
   /* Parameter check */
@@ -3132,7 +3132,7 @@
   if( dwFlags & DPSET_REMOTE )
   {
     FIXME( "Was this group created by this interface?\n" );
-    /* FIXME: If this is a remote update need to allow it but not 
+    /* FIXME: If this is a remote update need to allow it but not
      *        send a message.
      */
   }
@@ -3148,30 +3148,30 @@
 }
 
 static HRESULT WINAPI DirectPlay2AImpl_SetPlayerData
-          ( LPDIRECTPLAY2A iface, DPID idPlayer, LPVOID lpData, 
+          ( LPDIRECTPLAY2A iface, DPID idPlayer, LPVOID lpData,
             DWORD dwDataSize, DWORD dwFlags )
 {
   ICOM_THIS(IDirectPlay2Impl,iface);
-  return DP_IF_SetPlayerData( This, idPlayer, lpData, dwDataSize, 
+  return DP_IF_SetPlayerData( This, idPlayer, lpData, dwDataSize,
                               dwFlags, TRUE );
 }
 
 static HRESULT WINAPI DirectPlay2WImpl_SetPlayerData
-          ( LPDIRECTPLAY2 iface, DPID idPlayer, LPVOID lpData, 
+          ( LPDIRECTPLAY2 iface, DPID idPlayer, LPVOID lpData,
             DWORD dwDataSize, DWORD dwFlags )
 {
   ICOM_THIS(IDirectPlay2Impl,iface);
-  return DP_IF_SetPlayerData( This, idPlayer, lpData, dwDataSize, 
+  return DP_IF_SetPlayerData( This, idPlayer, lpData, dwDataSize,
                               dwFlags, FALSE );
 }
 
 static HRESULT WINAPI DP_IF_SetPlayerName
-          ( IDirectPlay2Impl* This, DPID idPlayer, LPDPNAME lpPlayerName, 
+          ( IDirectPlay2Impl* This, DPID idPlayer, LPDPNAME lpPlayerName,
             DWORD dwFlags, BOOL bAnsi )
 {
   lpPlayerList lpPList;
 
-  TRACE( "(%p)->(0x%08lx,%p,0x%08lx,%u)\n", 
+  TRACE( "(%p)->(0x%08lx,%p,0x%08lx,%u)\n",
          This, idPlayer, lpPlayerName, dwFlags, bAnsi );
 
   if( ( lpPList = DP_FindPlayer( This, idPlayer ) ) == NULL )
@@ -3188,7 +3188,7 @@
 }
 
 static HRESULT WINAPI DirectPlay2AImpl_SetPlayerName
-          ( LPDIRECTPLAY2A iface, DPID idPlayer, LPDPNAME lpPlayerName, 
+          ( LPDIRECTPLAY2A iface, DPID idPlayer, LPDPNAME lpPlayerName,
             DWORD dwFlags )
 {
   ICOM_THIS(IDirectPlay2Impl,iface);
@@ -3196,7 +3196,7 @@
 }
 
 static HRESULT WINAPI DirectPlay2WImpl_SetPlayerName
-          ( LPDIRECTPLAY2 iface, DPID idPlayer, LPDPNAME lpPlayerName, 
+          ( LPDIRECTPLAY2 iface, DPID idPlayer, LPDPNAME lpPlayerName,
             DWORD dwFlags )
 {
   ICOM_THIS(IDirectPlay2Impl,iface);
@@ -3204,13 +3204,13 @@
 }
 
 static HRESULT WINAPI DP_SetSessionDesc
-          ( IDirectPlay2Impl* This, LPCDPSESSIONDESC2 lpSessDesc, 
+          ( IDirectPlay2Impl* This, LPCDPSESSIONDESC2 lpSessDesc,
             DWORD dwFlags, BOOL bInitial, BOOL bAnsi  )
 {
   DWORD            dwRequiredSize;
   LPDPSESSIONDESC2 lpTempSessDesc;
 
-  TRACE( "(%p)->(%p,0x%08lx,%u,%u)\n", 
+  TRACE( "(%p)->(%p,0x%08lx,%u,%u)\n",
          This, lpSessDesc, dwFlags, bInitial, bAnsi );
 
   if( dwFlags )
@@ -3226,8 +3226,8 @@
 
   /* FIXME: Copy into This->dp2->lpSessionDesc */
   dwRequiredSize = DP_CalcSessionDescSize( lpSessDesc, bAnsi );
-  lpTempSessDesc = (LPDPSESSIONDESC2)HeapAlloc( GetProcessHeap(), 
-                                                HEAP_ZERO_MEMORY, 
+  lpTempSessDesc = (LPDPSESSIONDESC2)HeapAlloc( GetProcessHeap(),
+                                                HEAP_ZERO_MEMORY,
                                                 dwRequiredSize );
 
   if( lpTempSessDesc == NULL )
@@ -3243,13 +3243,13 @@
   /* Set the new */
   DP_CopySessionDesc( This->dp2->lpSessionDesc, lpSessDesc, bAnsi );
 
-  /* If this is an external invocation of the interface, we should be 
+  /* If this is an external invocation of the interface, we should be
    * letting everyone know that things have changed. Otherwise this is
    * just an initialization and it doesn't need to be propagated.
    */
   if( !bInitial )
   {
-    FIXME( "Need to send a DPMSG_SETSESSIONDESC msg to everyone\n" ); 
+    FIXME( "Need to send a DPMSG_SETSESSIONDESC msg to everyone\n" );
   }
 
   return DP_OK;
@@ -3314,7 +3314,7 @@
 }
 
 /* Assumes that contugous buffers are already allocated. */
-static void DP_CopySessionDesc( LPDPSESSIONDESC2 lpSessionDest, 
+static void DP_CopySessionDesc( LPDPSESSIONDESC2 lpSessionDest,
                                 LPCDPSESSIONDESC2 lpSessionSrc, BOOL bAnsi )
 {
   BYTE* lpStartOfFreeSpace;
@@ -3333,21 +3333,21 @@
   {
     if( lpSessionSrc->u1.lpszSessionNameA )
     {
-      lstrcpyA( (LPSTR)lpStartOfFreeSpace, 
+      lstrcpyA( (LPSTR)lpStartOfFreeSpace,
                 lpSessionDest->u1.lpszSessionNameA );
       lpSessionDest->u1.lpszSessionNameA = (LPSTR)lpStartOfFreeSpace;
-      lpStartOfFreeSpace += 
+      lpStartOfFreeSpace +=
         lstrlenA( (LPSTR)lpSessionDest->u1.lpszSessionNameA ) + 1;
-    } 
+    }
 
     if( lpSessionSrc->u2.lpszPasswordA )
     {
-      lstrcpyA( (LPSTR)lpStartOfFreeSpace, 
+      lstrcpyA( (LPSTR)lpStartOfFreeSpace,
                 lpSessionDest->u2.lpszPasswordA );
       lpSessionDest->u2.lpszPasswordA = (LPSTR)lpStartOfFreeSpace;
-      lpStartOfFreeSpace += 
+      lpStartOfFreeSpace +=
         lstrlenA( (LPSTR)lpSessionDest->u2.lpszPasswordA ) + 1;
-    }  
+    }
   }
   else /* UNICODE */
   {
@@ -3361,14 +3361,14 @@
     }
 
     if( lpSessionSrc->u2.lpszPassword )
-    { 
-      lstrcpyW( (LPWSTR)lpStartOfFreeSpace, 
+    {
+      lstrcpyW( (LPWSTR)lpStartOfFreeSpace,
                 lpSessionDest->u2.lpszPassword );
       lpSessionDest->u2.lpszPassword = (LPWSTR)lpStartOfFreeSpace;
       lpStartOfFreeSpace += sizeof(WCHAR) *
         ( lstrlenW( (LPWSTR)lpSessionDest->u2.lpszPassword ) + 1 );
     }
-  }  
+  }
 }
 
 
@@ -3390,14 +3390,14 @@
   {
     return DPERR_INVALIDGROUP;
   }
- 
+
   /* Create a player list (ie "shortcut" ) */
   lpNewGList = (lpGroupList)HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY,
                                        sizeof( *lpNewGList ) );
   if( lpNewGList == NULL )
   {
     return DPERR_CANTADDPLAYER;
-  }  
+  }
 
   /* Add the shortcut */
   lpGData->uRef++;
@@ -3408,7 +3408,7 @@
 
   /* Send a ADDGROUPTOGROUP message */
   FIXME( "Not sending message\n" );
-  
+
   return DP_OK;
 }
 
@@ -3427,27 +3427,27 @@
 }
 
 static HRESULT WINAPI DP_IF_CreateGroupInGroup
-          ( IDirectPlay3Impl* This, LPVOID lpMsgHdr, DPID idParentGroup, 
-            LPDPID lpidGroup, LPDPNAME lpGroupName, LPVOID lpData, 
+          ( IDirectPlay3Impl* This, LPVOID lpMsgHdr, DPID idParentGroup,
+            LPDPID lpidGroup, LPDPNAME lpGroupName, LPVOID lpData,
             DWORD dwDataSize, DWORD dwFlags, BOOL bAnsi )
 {
   lpGroupData lpGParentData;
   lpGroupList lpGList;
   lpGroupData lpGData;
 
-  TRACE( "(%p)->(0x%08lx,%p,%p,%p,0x%08lx,0x%08lx,%u)\n", 
-         This, idParentGroup, lpidGroup, lpGroupName, lpData, 
+  TRACE( "(%p)->(0x%08lx,%p,%p,%p,0x%08lx,0x%08lx,%u)\n",
+         This, idParentGroup, lpidGroup, lpGroupName, lpData,
          dwDataSize, dwFlags, bAnsi );
 
   /* Verify that the specified parent is valid */
-  if( ( lpGParentData = DP_FindAnyGroup( (IDirectPlay2AImpl*)This, 
-                                         idParentGroup ) ) == NULL 
+  if( ( lpGParentData = DP_FindAnyGroup( (IDirectPlay2AImpl*)This,
+                                         idParentGroup ) ) == NULL
     )
   {
     return DPERR_INVALIDGROUP;
-  } 
+  }
 
-  lpGData = DP_CreateGroup( (IDirectPlay2AImpl*)This, lpidGroup, lpGroupName, 
+  lpGData = DP_CreateGroup( (IDirectPlay2AImpl*)This, lpidGroup, lpGroupName,
                             dwFlags, idParentGroup, bAnsi );
 
   if( lpGData == NULL )
@@ -3457,12 +3457,12 @@
 
   /* Something else is referencing this data */
   lpGData->uRef++;
-  
+
   DP_SetGroupData( lpGData, DPSET_REMOTE, lpData, dwDataSize );
 
   /* The list has now been inserted into the interface group list. We now
      need to put a "shortcut" to this group in the parent group */
-  lpGList = (lpGroupList)HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, 
+  lpGList = (lpGroupList)HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY,
                                     sizeof( *lpGList ) );
   if( lpGList == NULL )
   {
@@ -3470,7 +3470,7 @@
     return DPERR_CANTADDPLAYER; /* yes player not group */
   }
 
-  lpGList->lpGData = lpGData; 
+  lpGList->lpGData = lpGData;
 
   DPQ_INSERT( lpGParentData->groups, lpGList, groups );
 
@@ -3489,10 +3489,10 @@
     (*This->dp2->spData.lpCB->CreateGroup)( &data );
   }
 
-  /* Inform all other peers of the creation of a new group. If there are 
-   * no peers keep this quiet. 
+  /* Inform all other peers of the creation of a new group. If there are
+   * no peers keep this quiet.
    */
-  if( This->dp2->lpSessionDesc && 
+  if( This->dp2->lpSessionDesc &&
       ( This->dp2->lpSessionDesc->dwFlags & DPSESSION_MULTICASTSERVER ) )
   {
     DPMSG_CREATEPLAYERORGROUP msg;
@@ -3508,7 +3508,7 @@
     /* FIXME: Correct to just use send effectively? */
     /* FIXME: Should size include data w/ message or just message "header" */
     /* FIXME: Check return code */
-    DP_SendEx( (IDirectPlay2Impl*)This, 
+    DP_SendEx( (IDirectPlay2Impl*)This,
                DPID_SERVERPLAYER, DPID_ALLPLAYERS, 0, &msg, sizeof( msg ),
                0, 0, NULL, NULL, bAnsi );
   }
@@ -3517,30 +3517,30 @@
 }
 
 static HRESULT WINAPI DirectPlay3AImpl_CreateGroupInGroup
-          ( LPDIRECTPLAY3A iface, DPID idParentGroup, LPDPID lpidGroup, 
-            LPDPNAME lpGroupName, LPVOID lpData, DWORD dwDataSize, 
+          ( LPDIRECTPLAY3A iface, DPID idParentGroup, LPDPID lpidGroup,
+            LPDPNAME lpGroupName, LPVOID lpData, DWORD dwDataSize,
             DWORD dwFlags )
 {
   ICOM_THIS(IDirectPlay3Impl,iface);
 
   *lpidGroup = DPID_UNKNOWN;
 
-  return DP_IF_CreateGroupInGroup( This, NULL, idParentGroup, lpidGroup, 
-                                   lpGroupName, lpData, dwDataSize, dwFlags, 
+  return DP_IF_CreateGroupInGroup( This, NULL, idParentGroup, lpidGroup,
+                                   lpGroupName, lpData, dwDataSize, dwFlags,
                                    TRUE );
 }
 
 static HRESULT WINAPI DirectPlay3WImpl_CreateGroupInGroup
-          ( LPDIRECTPLAY3 iface, DPID idParentGroup, LPDPID lpidGroup, 
-            LPDPNAME lpGroupName, LPVOID lpData, DWORD dwDataSize, 
+          ( LPDIRECTPLAY3 iface, DPID idParentGroup, LPDPID lpidGroup,
+            LPDPNAME lpGroupName, LPVOID lpData, DWORD dwDataSize,
             DWORD dwFlags )
 {
   ICOM_THIS(IDirectPlay3Impl,iface);
 
   *lpidGroup = DPID_UNKNOWN;
 
-  return DP_IF_CreateGroupInGroup( This, NULL, idParentGroup, lpidGroup, 
-                                   lpGroupName, lpData, dwDataSize, 
+  return DP_IF_CreateGroupInGroup( This, NULL, idParentGroup, lpidGroup,
+                                   lpGroupName, lpData, dwDataSize,
                                    dwFlags, FALSE );
 }
 
@@ -3556,7 +3556,7 @@
   if( ( lpGParentData = DP_FindAnyGroup( (IDirectPlay2AImpl*)This, idParentGroup ) ) == NULL )
   {
     return DPERR_INVALIDGROUP;
-  } 
+  }
 
   /* Remove the group from the parent group queue */
   DPQ_REMOVE_ENTRY( lpGParentData->groups, groups, lpGData->dpid, ==, idGroup, lpGList );
@@ -3570,7 +3570,7 @@
   lpGList->lpGData->uRef--;
 
   /* Free up the list item */
-  HeapFree( GetProcessHeap(), 0, lpGList ); 
+  HeapFree( GetProcessHeap(), 0, lpGList );
 
   /* Should send a DELETEGROUPFROMGROUP message */
   FIXME( "message not sent\n" );
@@ -3645,7 +3645,7 @@
 
   if( ! ( ( dwFlags & DPCONNECTION_DIRECTPLAY ) ||
           ( dwFlags & DPCONNECTION_DIRECTPLAYLOBBY ) )
-    ) 
+    )
   {
     return DPERR_INVALIDFLAGS;
   }
@@ -3661,7 +3661,7 @@
     HKEY hkResult;
     LPCSTR searchSubKey    = "SOFTWARE\\Microsoft\\DirectPlay\\Service Providers";
     LPSTR guidDataSubKey   = "Guid";
-    char subKeyName[51]; 
+    char subKeyName[51];
     DWORD dwIndex, sizeOfSubKeyName=50;
     FILETIME filetime;
 
@@ -3677,7 +3677,7 @@
 
     /* Traverse all the service providers we have available */
     for( dwIndex=0;
-         RegEnumKeyExA( hkResult, dwIndex, subKeyName, &sizeOfSubKeyName, 
+         RegEnumKeyExA( hkResult, dwIndex, subKeyName, &sizeOfSubKeyName,
                         NULL, NULL, NULL, &filetime ) != ERROR_NO_MORE_ITEMS;
          ++dwIndex, sizeOfSubKeyName=51 )
     {
@@ -3722,7 +3722,7 @@
       dpName.u1.lpszShortNameA = subKeyName;
       dpName.u2.lpszLongNameA  = NULL;
 
-      /* Create the compound address for the service provider. 
+      /* Create the compound address for the service provider.
        * NOTE: This is a gruesome architectural scar right now.  DP
        * uses DPL and DPL uses DP.  Nasty stuff. This may be why the
        * native dll just gets around this little bit by allocating an
@@ -3741,7 +3741,7 @@
       }
 
       /* The enumeration will return FALSE if we are not to continue */
-      if( !lpEnumCallback( &serviceProviderGUID, lpAddressBuffer, dwAddressBufferSize, 
+      if( !lpEnumCallback( &serviceProviderGUID, lpAddressBuffer, dwAddressBufferSize,
                            &dpName, DPCONNECTION_DIRECTPLAY, lpContext ) )
       {
          return DP_OK;
@@ -3755,7 +3755,7 @@
     HKEY hkResult;
     LPCSTR searchSubKey    = "SOFTWARE\\Microsoft\\DirectPlay\\Lobby Providers";
     LPSTR guidDataSubKey   = "Guid";
-    char subKeyName[51]; 
+    char subKeyName[51];
     DWORD dwIndex, sizeOfSubKeyName=50;
     FILETIME filetime;
 
@@ -3771,7 +3771,7 @@
 
     /* Traverse all the lobby providers we have available */
     for( dwIndex=0;
-         RegEnumKeyExA( hkResult, dwIndex, subKeyName, &sizeOfSubKeyName, 
+         RegEnumKeyExA( hkResult, dwIndex, subKeyName, &sizeOfSubKeyName,
                         NULL, NULL, NULL, &filetime ) != ERROR_NO_MORE_ITEMS;
          ++dwIndex, sizeOfSubKeyName=51 )
     {
@@ -3817,7 +3817,7 @@
       dpName.u1.lpszShortNameA = subKeyName;
       dpName.u2.lpszLongNameA  = NULL;
 
-      /* Create the compound address for the service provider. 
+      /* Create the compound address for the service provider.
          NOTE: This is a gruesome architectural scar right now. DP uses DPL and DPL uses DP
                nast stuff. This may be why the native dll just gets around this little bit by
                allocating an 80 byte buffer which isn't even a filled with a valid compound
@@ -3826,9 +3826,9 @@
 
       dpCompoundAddress.guidDataType = DPAID_LobbyProvider;
       dpCompoundAddress.dwDataSize   = sizeof( GUID );
-      dpCompoundAddress.lpData       = &serviceProviderGUID; 
+      dpCompoundAddress.lpData       = &serviceProviderGUID;
 
-      if( ( hr = DPL_CreateCompoundAddress( &dpCompoundAddress, 1, lpAddressBuffer, 
+      if( ( hr = DPL_CreateCompoundAddress( &dpCompoundAddress, 1, lpAddressBuffer,
                                      &dwAddressBufferSize, TRUE ) ) != DPERR_BUFFERTOOSMALL )
       {
         ERR( "can't get buffer size: %s\n", DPLAYX_HresultToString( hr ) );
@@ -3859,7 +3859,7 @@
 
 static HRESULT WINAPI DirectPlay3WImpl_EnumConnections
           ( LPDIRECTPLAY3 iface, LPCGUID lpguidApplication, LPDPENUMCONNECTIONSCALLBACK lpEnumCallback, LPVOID lpContext, DWORD dwFlags )
-{ 
+{
   ICOM_THIS(IDirectPlay3Impl,iface);
   FIXME("(%p)->(%p,%p,%p,0x%08lx): stub\n", This, lpguidApplication, lpEnumCallback, lpContext, dwFlags );
   return DP_OK;
@@ -3867,17 +3867,17 @@
 
 static HRESULT WINAPI DP_IF_EnumGroupsInGroup
           ( IDirectPlay3AImpl* This, DPID idGroup, LPGUID lpguidInstance,
-            LPDPENUMPLAYERSCALLBACK2 lpEnumPlayersCallback2, 
+            LPDPENUMPLAYERSCALLBACK2 lpEnumPlayersCallback2,
             LPVOID lpContext, DWORD dwFlags, BOOL bAnsi )
 {
   lpGroupList lpGList;
   lpGroupData lpGData;
 
-  FIXME( "(%p)->(0x%08lx,%p,%p,%p,0x%08lx,%u): semi stub\n", 
-         This, idGroup, lpguidInstance, lpEnumPlayersCallback2,  
+  FIXME( "(%p)->(0x%08lx,%p,%p,%p,0x%08lx,%u): semi stub\n",
+         This, idGroup, lpguidInstance, lpEnumPlayersCallback2,
          lpContext, dwFlags, bAnsi );
 
-  if( ( lpGData = DP_FindAnyGroup( (IDirectPlay2AImpl*)This, idGroup ) ) == NULL ) 
+  if( ( lpGData = DP_FindAnyGroup( (IDirectPlay2AImpl*)This, idGroup ) ) == NULL )
   {
     return DPERR_INVALIDGROUP;
   }
@@ -3913,12 +3913,12 @@
 }
 
 static HRESULT WINAPI DirectPlay3AImpl_EnumGroupsInGroup
-          ( LPDIRECTPLAY3A iface, DPID idGroup, LPGUID lpguidInstance, 
-            LPDPENUMPLAYERSCALLBACK2 lpEnumPlayersCallback2, LPVOID lpContext, 
+          ( LPDIRECTPLAY3A iface, DPID idGroup, LPGUID lpguidInstance,
+            LPDPENUMPLAYERSCALLBACK2 lpEnumPlayersCallback2, LPVOID lpContext,
             DWORD dwFlags )
 {
   ICOM_THIS(IDirectPlay3Impl,iface);
-  return DP_IF_EnumGroupsInGroup( This, idGroup, lpguidInstance, 
+  return DP_IF_EnumGroupsInGroup( This, idGroup, lpguidInstance,
                                   lpEnumPlayersCallback2, lpContext, dwFlags,
                                   TRUE );
 }
@@ -3961,7 +3961,7 @@
       ( IsEqualGUID( guidDataType, &DPAID_LobbyProvider ) )
     )
   {
-    TRACE( "Found SP/LP (%s) %s (data size = 0x%08lx)\n", 
+    TRACE( "Found SP/LP (%s) %s (data size = 0x%08lx)\n",
            debugstr_guid( guidDataType ), debugstr_guid( lpData ), dwDataSize );
 
     if( dwDataSize != sizeof( GUID ) )
@@ -3974,7 +3974,7 @@
     /* There shouldn't be more than 1 GUID/compound address */
     return FALSE;
   }
-  
+
   /* Still waiting for what we want */
   return TRUE;
 }
@@ -3983,9 +3983,9 @@
 /* Find and perform a LoadLibrary on the requested SP or LP GUID */
 static HMODULE DP_LoadSP( LPCGUID lpcGuid, LPSPINITDATA lpSpData, LPBOOL lpbIsDpSp )
 {
-  UINT i; 
+  UINT i;
   LPCSTR spSubKey         = "SOFTWARE\\Microsoft\\DirectPlay\\Service Providers";
-  LPCSTR lpSubKey         = "SOFTWARE\\Microsoft\\DirectPlay\\Lobby Providers"; 
+  LPCSTR lpSubKey         = "SOFTWARE\\Microsoft\\DirectPlay\\Lobby Providers";
   LPCSTR guidDataSubKey   = "Guid";
   LPCSTR majVerDataSubKey = "dwReserved1";
   LPCSTR minVerDataSubKey = "dwReserved2";
@@ -4004,7 +4004,7 @@
 
     (i == 0) ? (searchSubKey = spSubKey ) : (searchSubKey = lpSubKey );
     *lpbIsDpSp = (i == 0) ? TRUE : FALSE;
-    
+
 
     /* Need to loop over the service providers in the registry */
     if( RegOpenKeyExA( HKEY_LOCAL_MACHINE, searchSubKey,
@@ -4094,7 +4094,7 @@
           memcpy( &lpSpData->dwReserved2, returnBuffer, sizeof(lpSpData->dwReserved2) );
 
       sizeOfReturnBuffer = 255;
-   
+
       /* Get the path for this service provider */
       if( ( dwTemp = RegQueryValueExA( hkServiceProvider, pathSubKey,
                             NULL, NULL, returnBuffer,
@@ -4104,7 +4104,7 @@
         continue;
       }
 
-      TRACE( "Loading %s\n", returnBuffer ); 
+      TRACE( "Loading %s\n", returnBuffer );
       return LoadLibraryA( returnBuffer );
     }
   }
@@ -4120,16 +4120,16 @@
 
   /* Initialize the service provider by calling SPInit */
   SPInit = (LPDPSP_SPINIT)GetProcAddress( hServiceProvider, "SPInit" );
- 
+
   if( SPInit == NULL )
   {
     ERR( "Service provider doesn't provide SPInit interface?\n" );
     FreeLibrary( hServiceProvider );
     return DPERR_UNAVAILABLE;
-  } 
+  }
 
   TRACE( "Calling SPInit (DP SP entry point)\n" );
- 
+
   hr = (*SPInit)( &This->dp2->spData );
 
   if( FAILED(hr) )
@@ -4148,7 +4148,7 @@
 
   /* Store the handle of the module so that we can unload it later */
   This->dp2->hServiceProvider = hServiceProvider;
-     
+
   return hr;
 }
 
@@ -4157,19 +4157,19 @@
 {
   HRESULT hr;
   LPSP_INIT DPLSPInit;
- 
+
   /* Initialize the service provider by calling SPInit */
   DPLSPInit = (LPSP_INIT)GetProcAddress( hLobbyProvider, "DPLSPInit" );
- 
+
   if( DPLSPInit == NULL )
   {
     ERR( "Service provider doesn't provide DPLSPInit interface?\n" );
     FreeLibrary( hLobbyProvider );
     return DPERR_UNAVAILABLE;
-  } 
+  }
 
   TRACE( "Calling DPLSPInit (DPL SP entry point)\n" );
- 
+
   hr = (*DPLSPInit)( &This->dp2->dplspData );
 
   if( FAILED(hr) )
@@ -4183,13 +4183,13 @@
    *        using IsBadCodePtr */
 
   This->dp2->bDPLSPInitialized = TRUE;
-   
+
   /* This interface is now initialized as a lobby object */
   This->dp2->connectionInitialized = DP_LOBBY_PROVIDER;
 
   /* Store the handle of the module so that we can unload it later */
   This->dp2->hDPLobbyProvider = hLobbyProvider;
-     
+
   return hr;
 }
 
@@ -4210,7 +4210,7 @@
   }
 
   /* Find out what the requested SP is and how large this buffer is */
-  hr = DPL_EnumAddress( DP_GetSpLpGuidFromCompoundAddress, lpConnection, 
+  hr = DPL_EnumAddress( DP_GetSpLpGuidFromCompoundAddress, lpConnection,
                         dwAddrSize, &guidSP );
 
   if( FAILED(hr) )
@@ -4225,9 +4225,9 @@
   if( hServiceProvider == 0 )
   {
     ERR( "Unable to load service provider\n" );
-    return DPERR_UNAVAILABLE; 
+    return DPERR_UNAVAILABLE;
   }
-  
+
   if( bIsDpSp )
   {
      /* Fill in what we can of the Service Provider required information.
@@ -4245,7 +4245,7 @@
 
      hr = DP_InitializeDPLSP( This, hServiceProvider );
   }
-  
+
   if( FAILED(hr) )
   {
     return hr;
@@ -4263,9 +4263,9 @@
   if( This->dp2->connectionInitialized != NO_PROVIDER )
   {
     return DPERR_ALREADYINITIALIZED;
-  } 
+  }
 
-  return DP_IF_InitializeConnection( This, lpConnection, dwFlags, TRUE );  
+  return DP_IF_InitializeConnection( This, lpConnection, dwFlags, TRUE );
 }
 
 static HRESULT WINAPI DirectPlay3WImpl_InitializeConnection
@@ -4283,7 +4283,7 @@
 }
 
 static HRESULT WINAPI DirectPlay3AImpl_SecureOpen
-          ( LPDIRECTPLAY3A iface, LPCDPSESSIONDESC2 lpsd, DWORD dwFlags, 
+          ( LPDIRECTPLAY3A iface, LPCDPSESSIONDESC2 lpsd, DWORD dwFlags,
             LPCDPSECURITYDESC lpSecurity, LPCDPCREDENTIALS lpCredentials )
 {
   ICOM_THIS(IDirectPlay2Impl,iface); /* Yes a dp 2 interface */
@@ -4291,9 +4291,9 @@
 }
 
 static HRESULT WINAPI DirectPlay3WImpl_SecureOpen
-          ( LPDIRECTPLAY3 iface, LPCDPSESSIONDESC2 lpsd, DWORD dwFlags, 
+          ( LPDIRECTPLAY3 iface, LPCDPSESSIONDESC2 lpsd, DWORD dwFlags,
             LPCDPSECURITYDESC lpSecurity, LPCDPCREDENTIALS lpCredentials )
-{   
+{
   ICOM_THIS(IDirectPlay2Impl,iface); /* Yes a dp 2 interface */
   return DP_SecureOpen( This, lpsd, dwFlags, lpSecurity, lpCredentials, FALSE );
 }
@@ -4345,7 +4345,7 @@
   FIXME("(%p)->(0x%08lx,0x%08lx): stub\n", This, dwFlags, idGroup );
   return DP_OK;
 }
- 
+
 static HRESULT WINAPI DirectPlay3AImpl_GetGroupFlags
           ( LPDIRECTPLAY3A iface, DPID idGroup, LPDWORD lpdwFlags )
 {
@@ -4363,7 +4363,7 @@
 }
 
 static HRESULT WINAPI DP_IF_GetGroupParent
-          ( IDirectPlay3AImpl* This, DPID idGroup, LPDPID lpidGroup, 
+          ( IDirectPlay3AImpl* This, DPID idGroup, LPDPID lpidGroup,
             BOOL bAnsi )
 {
   lpGroupData lpGData;
@@ -4384,13 +4384,13 @@
           ( LPDIRECTPLAY3A iface, DPID idGroup, LPDPID lpidGroup )
 {
   ICOM_THIS(IDirectPlay3Impl,iface);
-  return DP_IF_GetGroupParent( This, idGroup, lpidGroup, TRUE ); 
+  return DP_IF_GetGroupParent( This, idGroup, lpidGroup, TRUE );
 }
 static HRESULT WINAPI DirectPlay3WImpl_GetGroupParent
           ( LPDIRECTPLAY3 iface, DPID idGroup, LPDPID lpidGroup )
 {
   ICOM_THIS(IDirectPlay3Impl,iface);
-  return DP_IF_GetGroupParent( This, idGroup, lpidGroup, FALSE ); 
+  return DP_IF_GetGroupParent( This, idGroup, lpidGroup, FALSE );
 }
 
 static HRESULT WINAPI DirectPlay3AImpl_GetPlayerAccount
@@ -4458,7 +4458,7 @@
 }
 
 static HRESULT WINAPI DP_SendEx
-          ( IDirectPlay2Impl* This, DPID idFrom, DPID idTo, DWORD dwFlags, 
+          ( IDirectPlay2Impl* This, DPID idFrom, DPID idTo, DWORD dwFlags,
             LPVOID lpData, DWORD dwDataSize, DWORD dwPriority, DWORD dwTimeout,
             LPVOID lpContext, LPDWORD lpdwMsgID, BOOL bAnsi )
 {
@@ -4495,7 +4495,7 @@
    */
   if( idTo == DPID_ALLPLAYERS )
   {
-    bValidDestination = TRUE;  
+    bValidDestination = TRUE;
 
     /* See if SP has the ability to multicast. If so, use it */
     if( This->dp2->spData.lpCB->SendToGroupEx )
@@ -4513,7 +4513,7 @@
     }
   }
 
-  if( ( !bValidDestination ) && 
+  if( ( !bValidDestination ) &&
       ( DP_FindPlayer( This, idTo ) != NULL )
     )
   {
@@ -4574,22 +4574,22 @@
 
 
 static HRESULT WINAPI DirectPlay4AImpl_SendEx
-          ( LPDIRECTPLAY4A iface, DPID idFrom, DPID idTo, DWORD dwFlags, 
+          ( LPDIRECTPLAY4A iface, DPID idFrom, DPID idTo, DWORD dwFlags,
             LPVOID lpData, DWORD dwDataSize, DWORD dwPriority, DWORD dwTimeout,
             LPVOID lpContext, LPDWORD lpdwMsgID )
 {
   ICOM_THIS(IDirectPlay2Impl,iface); /* yes downcast to 2 */
-  return DP_SendEx( This, idFrom, idTo, dwFlags, lpData, dwDataSize, 
+  return DP_SendEx( This, idFrom, idTo, dwFlags, lpData, dwDataSize,
                     dwPriority, dwTimeout, lpContext, lpdwMsgID, TRUE );
 }
 
 static HRESULT WINAPI DirectPlay4WImpl_SendEx
-          ( LPDIRECTPLAY4 iface, DPID idFrom, DPID idTo, DWORD dwFlags, 
+          ( LPDIRECTPLAY4 iface, DPID idFrom, DPID idTo, DWORD dwFlags,
             LPVOID lpData, DWORD dwDataSize, DWORD dwPriority, DWORD dwTimeout,
             LPVOID lpContext, LPDWORD lpdwMsgID )
 {
   ICOM_THIS(IDirectPlay2Impl,iface); /* yes downcast to 2 */
-  return DP_SendEx( This, idFrom, idTo, dwFlags, lpData, dwDataSize, 
+  return DP_SendEx( This, idFrom, idTo, dwFlags, lpData, dwDataSize,
                     dwPriority, dwTimeout, lpContext, lpdwMsgID, FALSE );
 }
 
@@ -4606,24 +4606,24 @@
 
   lpMElem = (LPDPMSG)HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY,
                                sizeof( *lpMElem ) );
-  lpMElem->msg = (DPMSG_GENERIC*)HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, 
+  lpMElem->msg = (DPMSG_GENERIC*)HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY,
                                             dwDataSize );
 
   CopyMemory( lpMElem->msg, lpData, dwDataSize );
 
   /* FIXME: Need to queue based on priority */
-  DPQ_INSERT( This->dp2->sendMsgs, lpMElem, msgs ); 
-   
+  DPQ_INSERT( This->dp2->sendMsgs, lpMElem, msgs );
+
   return DP_OK;
 }
 
 static HRESULT WINAPI DP_IF_GetMessageQueue
-          ( IDirectPlay4Impl* This, DPID idFrom, DPID idTo, DWORD dwFlags, 
+          ( IDirectPlay4Impl* This, DPID idFrom, DPID idTo, DWORD dwFlags,
             LPDWORD lpdwNumMsgs, LPDWORD lpdwNumBytes, BOOL bAnsi )
 {
   HRESULT hr = DP_OK;
 
-  FIXME( "(%p)->(0x%08lx,0x%08lx,0x%08lx,%p,%p,%u): semi stub\n", 
+  FIXME( "(%p)->(0x%08lx,0x%08lx,0x%08lx,%p,%p,%u): semi stub\n",
          This, idFrom, idTo, dwFlags, lpdwNumMsgs, lpdwNumBytes, bAnsi );
 
   /* FIXME: Do we need to do idFrom and idTo sanity checking here? */
@@ -4638,12 +4638,12 @@
     /* FIXME: None of this is documented :( */
 
     data.lpISP        = This->dp2->spData.lpISP;
-    data.dwFlags      = dwFlags; 
+    data.dwFlags      = dwFlags;
     data.idFrom       = idFrom;
     data.idTo         = idTo;
     data.lpdwNumMsgs  = lpdwNumMsgs;
     data.lpdwNumBytes = lpdwNumBytes;
-  
+
     hr = (*This->dp2->spData.lpCB->GetMessageQueue)( &data );
   }
   else
@@ -4655,7 +4655,7 @@
 }
 
 static HRESULT WINAPI DirectPlay4AImpl_GetMessageQueue
-          ( LPDIRECTPLAY4A iface, DPID idFrom, DPID idTo, DWORD dwFlags, 
+          ( LPDIRECTPLAY4A iface, DPID idFrom, DPID idTo, DWORD dwFlags,
             LPDWORD lpdwNumMsgs, LPDWORD lpdwNumBytes )
 {
   ICOM_THIS(IDirectPlay4Impl,iface);
@@ -4664,7 +4664,7 @@
 }
 
 static HRESULT WINAPI DirectPlay4WImpl_GetMessageQueue
-          ( LPDIRECTPLAY4 iface, DPID idFrom, DPID idTo, DWORD dwFlags, 
+          ( LPDIRECTPLAY4 iface, DPID idFrom, DPID idTo, DWORD dwFlags,
             LPDWORD lpdwNumMsgs, LPDWORD lpdwNumBytes )
 {
   ICOM_THIS(IDirectPlay4Impl,iface);
@@ -4673,12 +4673,12 @@
 }
 
 static HRESULT WINAPI DP_IF_CancelMessage
-          ( IDirectPlay4Impl* This, DWORD dwMsgID, DWORD dwFlags, 
+          ( IDirectPlay4Impl* This, DWORD dwMsgID, DWORD dwFlags,
             DWORD dwMinPriority, DWORD dwMaxPriority, BOOL bAnsi )
 {
   HRESULT hr = DP_OK;
 
-  FIXME( "(%p)->(0x%08lx,0x%08lx,%u): semi stub\n", 
+  FIXME( "(%p)->(0x%08lx,0x%08lx,%u): semi stub\n",
          This, dwMsgID, dwFlags, bAnsi );
 
   if( This->dp2->spData.lpCB->Cancel )
@@ -4720,7 +4720,7 @@
   {
     dwFlags |= DPCANCELSEND_ALL;
   }
- 
+
   return DP_IF_CancelMessage( This, dwMsgID, dwFlags, 0, 0, TRUE );
 }
 
@@ -4743,7 +4743,7 @@
 }
 
 static HRESULT WINAPI DirectPlay4AImpl_CancelPriority
-          ( LPDIRECTPLAY4A iface, DWORD dwMinPriority, DWORD dwMaxPriority, 
+          ( LPDIRECTPLAY4A iface, DWORD dwMinPriority, DWORD dwMaxPriority,
             DWORD dwFlags )
 {
   ICOM_THIS(IDirectPlay4Impl,iface);
@@ -4753,12 +4753,12 @@
     return DPERR_INVALIDFLAGS;
   }
 
-  return DP_IF_CancelMessage( This, 0, DPCANCELSEND_PRIORITY, dwMinPriority, 
+  return DP_IF_CancelMessage( This, 0, DPCANCELSEND_PRIORITY, dwMinPriority,
                               dwMaxPriority, TRUE );
 }
 
 static HRESULT WINAPI DirectPlay4WImpl_CancelPriority
-          ( LPDIRECTPLAY4 iface, DWORD dwMinPriority, DWORD dwMaxPriority, 
+          ( LPDIRECTPLAY4 iface, DWORD dwMinPriority, DWORD dwMaxPriority,
             DWORD dwFlags )
 {
   ICOM_THIS(IDirectPlay4Impl,iface);
@@ -4768,7 +4768,7 @@
     return DPERR_INVALIDFLAGS;
   }
 
-  return DP_IF_CancelMessage( This, 0, DPCANCELSEND_PRIORITY, dwMinPriority, 
+  return DP_IF_CancelMessage( This, 0, DPCANCELSEND_PRIORITY, dwMinPriority,
                               dwMaxPriority, FALSE );
 }
 
@@ -4779,7 +4779,7 @@
 # define XCAST(fun)     (void*)
 #endif
 
-static ICOM_VTABLE(IDirectPlay2) directPlay2WVT = 
+static ICOM_VTABLE(IDirectPlay2) directPlay2WVT =
 {
   ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
   XCAST(QueryInterface)DP_QueryInterface,
@@ -4825,7 +4825,7 @@
 # define XCAST(fun)     (void*)
 #endif
 
-static ICOM_VTABLE(IDirectPlay2) directPlay2AVT = 
+static ICOM_VTABLE(IDirectPlay2) directPlay2AVT =
 {
   ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
   XCAST(QueryInterface)DP_QueryInterface,
@@ -4872,7 +4872,7 @@
 # define XCAST(fun)     (void*)
 #endif
 
-static ICOM_VTABLE(IDirectPlay3) directPlay3AVT = 
+static ICOM_VTABLE(IDirectPlay3) directPlay3AVT =
 {
   ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
   XCAST(QueryInterface)DP_QueryInterface,
@@ -4933,7 +4933,7 @@
 #else
 # define XCAST(fun)     (void*)
 #endif
-static ICOM_VTABLE(IDirectPlay3) directPlay3WVT = 
+static ICOM_VTABLE(IDirectPlay3) directPlay3WVT =
 {
   ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
   XCAST(QueryInterface)DP_QueryInterface,
@@ -5125,9 +5125,9 @@
 };
 #undef XCAST
 
-extern 
-HRESULT DP_GetSPPlayerData( IDirectPlay2Impl* lpDP, 
-                            DPID idPlayer, 
+extern
+HRESULT DP_GetSPPlayerData( IDirectPlay2Impl* lpDP,
+                            DPID idPlayer,
                             LPVOID* lplpData )
 {
   lpPlayerList lpPlayer = DP_FindPlayer( lpDP, idPlayer );
@@ -5142,9 +5142,9 @@
   return DP_OK;
 }
 
-extern 
-HRESULT DP_SetSPPlayerData( IDirectPlay2Impl* lpDP, 
-                            DPID idPlayer, 
+extern
+HRESULT DP_SetSPPlayerData( IDirectPlay2Impl* lpDP,
+                            DPID idPlayer,
                             LPVOID lpData )
 {
   lpPlayerList lpPlayer = DP_FindPlayer( lpDP, idPlayer );
@@ -5163,23 +5163,23 @@
  *  DirectPlayEnumerate  [DPLAYX.9]
  *  DirectPlayEnumerateA [DPLAYX.2]
  *
- *  The pointer to the structure lpContext will be filled with the 
+ *  The pointer to the structure lpContext will be filled with the
  *  appropriate data for each service offered by the OS. These services are
  *  not necessarily available on this particular machine but are defined
  *  as simple service providers under the "Service Providers" registry key.
- *  This structure is then passed to lpEnumCallback for each of the different 
- *  services. 
+ *  This structure is then passed to lpEnumCallback for each of the different
+ *  services.
  *
  *  This API is useful only for applications written using DirectX3 or
  *  worse. It is superceeded by IDirectPlay3::EnumConnections which also
  *  gives information on the actual connections.
  *
  * defn of a service provider:
- * A dynamic-link library used by DirectPlay to communicate over a network. 
+ * A dynamic-link library used by DirectPlay to communicate over a network.
  * The service provider contains all the network-specific code required
  * to send and receive messages. Online services and network operators can
  * supply service providers to use specialized hardware, protocols, communications
- * media, and network resources. 
+ * media, and network resources.
  *
  * TODO: Allocate string buffer space from the heap (length from reg)
  *       Pass real device driver numbers...
@@ -5189,11 +5189,11 @@
                                      LPVOID lpContext )
 {
 
-  HKEY   hkResult; 
+  HKEY   hkResult;
   LPCSTR searchSubKey    = "SOFTWARE\\Microsoft\\DirectPlay\\Service Providers";
   DWORD  dwIndex;
   DWORD  sizeOfSubKeyName=50;
-  char   subKeyName[51]; 
+  char   subKeyName[51];
   FILETIME filetime;
 
   TRACE(": lpEnumCallback=%p lpContext=%p\n", lpEnumCallback, lpContext );
@@ -5207,19 +5207,19 @@
   if( RegOpenKeyExA( HKEY_LOCAL_MACHINE, searchSubKey,
                        0, KEY_READ, &hkResult ) != ERROR_SUCCESS )
   {
-    /* Hmmm. Does this mean that there are no service providers? */ 
+    /* Hmmm. Does this mean that there are no service providers? */
     ERR(": no service providers?\n");
-    return DP_OK; 
+    return DP_OK;
   }
 
   /* Traverse all the service providers we have available */
   for( dwIndex=0;
-       RegEnumKeyExA( hkResult, dwIndex, subKeyName, &sizeOfSubKeyName, 
+       RegEnumKeyExA( hkResult, dwIndex, subKeyName, &sizeOfSubKeyName,
                       NULL, NULL, NULL, &filetime ) != ERROR_NO_MORE_ITEMS;
        ++dwIndex, sizeOfSubKeyName=50 )
   {
-    LPSTR    majVerDataSubKey = "dwReserved1";  
-    LPSTR    minVerDataSubKey = "dwReserved2";  
+    LPSTR    majVerDataSubKey = "dwReserved1";
+    LPSTR    minVerDataSubKey = "dwReserved2";
     LPSTR    guidDataSubKey   = "Guid";
     HKEY     hkServiceProvider;
     GUID     serviceProviderGUID;
@@ -5238,15 +5238,15 @@
       continue;
     }
 
-    /* Get the GUID, Device major number and device minor number 
-     * from the registry. 
+    /* Get the GUID, Device major number and device minor number
+     * from the registry.
      */
     if( RegQueryValueExA( hkServiceProvider, guidDataSubKey,
                             NULL, &returnTypeGUID, returnBuffer,
                             &sizeOfReturnBuffer ) != ERROR_SUCCESS )
     {
       ERR(": missing GUID registry data members\n" );
-      continue; 
+      continue;
     }
 
     /* FIXME: Check return types to ensure we're interpreting data right */
@@ -5261,7 +5261,7 @@
                             &sizeOfReturnBuffer ) != ERROR_SUCCESS )
     {
       ERR(": missing dwReserved1 registry data members\n") ;
-      continue; 
+      continue;
     }
     memcpy( &majVersionNum, returnBuffer, sizeof(majVersionNum) );
 
@@ -5298,18 +5298,18 @@
 
   FIXME(":stub\n");
 
-  return DPERR_OUTOFMEMORY; 
+  return DPERR_OUTOFMEMORY;
 
 }
 
 typedef struct tagCreateEnum
 {
   LPVOID  lpConn;
-  LPCGUID lpGuid; 
+  LPCGUID lpGuid;
 } CreateEnumData, *lpCreateEnumData;
 
 /* Find and copy the matching connection for the SP guid */
-static BOOL CALLBACK cbDPCreateEnumConnections( 
+static BOOL CALLBACK cbDPCreateEnumConnections(
     LPCGUID     lpguidSP,
     LPVOID      lpConnection,
     DWORD       dwConnectionSize,
@@ -5317,7 +5317,7 @@
     DWORD       dwFlags,
     LPVOID      lpContext)
 {
-  lpCreateEnumData lpData = (lpCreateEnumData)lpContext; 
+  lpCreateEnumData lpData = (lpCreateEnumData)lpContext;
 
   if( IsEqualGUID( lpguidSP, lpData->lpGuid ) )
   {
@@ -5346,7 +5346,7 @@
   HRESULT hr;
   LPDIRECTPLAY3A lpDP3A;
   CreateEnumData cbData;
-  
+
   TRACE( "lpGUID=%s lplpDP=%p pUnk=%p\n", debugstr_guid(lpGUID), lplpDP, pUnk );
 
   if( pUnk != NULL )
@@ -5359,12 +5359,12 @@
   if( DP_CreateInterface( &IID_IDirectPlay2A, (LPVOID*)lplpDP ) != DP_OK )
   {
     return DPERR_UNAVAILABLE;
-  } 
+  }
 
   if( IsEqualGUID( &GUID_NULL, lpGUID ) )
   {
     /* The GUID_NULL means don't bind a service provider. Just return the
-       interface as is */ 
+       interface as is */
     return DP_OK;
   }
 
@@ -5372,11 +5372,11 @@
   TRACE( "Service Provider binding for %s\n", debugstr_guid(lpGUID) );
 
   /* We're going to use a DP3 interface */
-  hr = IDirectPlayX_QueryInterface( *lplpDP, &IID_IDirectPlay3A, 
+  hr = IDirectPlayX_QueryInterface( *lplpDP, &IID_IDirectPlay3A,
                                     (LPVOID*)&lpDP3A );
   if( FAILED(hr) )
   {
-    ERR( "Failed to get DP3 interface: %s\n", DPLAYX_HresultToString(hr) ); 
+    ERR( "Failed to get DP3 interface: %s\n", DPLAYX_HresultToString(hr) );
     return hr;
   }
 
@@ -5384,20 +5384,20 @@
   cbData.lpGuid = lpGUID;
 
   /* We were given a service provider, find info about it... */
-  hr = IDirectPlayX_EnumConnections( lpDP3A, NULL, cbDPCreateEnumConnections, 
+  hr = IDirectPlayX_EnumConnections( lpDP3A, NULL, cbDPCreateEnumConnections,
                                      &cbData, DPCONNECTION_DIRECTPLAY );
   if( ( FAILED(hr) ) ||
-      ( cbData.lpConn == NULL )    
+      ( cbData.lpConn == NULL )
     )
   {
-    ERR( "Failed to get Enum for SP: %s\n", DPLAYX_HresultToString(hr) );  
+    ERR( "Failed to get Enum for SP: %s\n", DPLAYX_HresultToString(hr) );
     IDirectPlayX_Release( lpDP3A );
     return DPERR_UNAVAILABLE;
   }
 
   /* Initialize the service provider */
   hr = IDirectPlayX_InitializeConnection( lpDP3A, cbData.lpConn, 0 );
-  if( FAILED(hr) ) 
+  if( FAILED(hr) )
   {
     ERR( "Failed to Initialize SP: %s\n", DPLAYX_HresultToString(hr) );
     HeapFree( GetProcessHeap(), 0, cbData.lpConn );
diff --git a/dlls/dplayx/dplay_global.h b/dlls/dplayx/dplay_global.h
index 8d939bc..0917e58 100644
--- a/dlls/dplayx/dplay_global.h
+++ b/dlls/dplayx/dplay_global.h
@@ -23,8 +23,8 @@
 #include "lobbysp.h"
 #include "dplayx_queue.h"
 
-extern HRESULT DPL_EnumAddress( LPDPENUMADDRESSCALLBACK lpEnumAddressCallback, 
-                                LPCVOID lpAddress, DWORD dwAddressSize, 
+extern HRESULT DPL_EnumAddress( LPDPENUMADDRESSCALLBACK lpEnumAddressCallback,
+                                LPCVOID lpAddress, DWORD dwAddressSize,
                                 LPVOID lpContext );
 
 extern DWORD DP_CalcSessionDescSize( LPCDPSESSIONDESC2 lpSessDesc, BOOL bAnsi );
@@ -65,7 +65,7 @@
 
 typedef struct tagDP_MSG_REPLY_STRUCT_LIST
 {
-  DPQ_ENTRY(tagDP_MSG_REPLY_STRUCT_LIST) replysExpected; 
+  DPQ_ENTRY(tagDP_MSG_REPLY_STRUCT_LIST) replysExpected;
   DP_MSG_REPLY_STRUCT replyExpected;
 } DP_MSG_REPLY_STRUCT_LIST, *LPDP_MSG_REPLY_STRUCT_LIST;
 
@@ -239,7 +239,7 @@
 
 HRESULT DP_HandleMessage( IDirectPlay2Impl* This, LPCVOID lpMessageBody,
                           DWORD  dwMessageBodySize, LPCVOID lpMessageHeader,
-                          WORD wCommandId, WORD wVersion, 
+                          WORD wCommandId, WORD wVersion,
                           LPVOID* lplpReply, LPDWORD lpdwMsgSize );
 
 /* DP SP external interfaces into DirectPlay */
diff --git a/dlls/dplayx/dplaysp.c b/dlls/dplayx/dplaysp.c
index 8c20535..dec2861 100644
--- a/dlls/dplayx/dplaysp.c
+++ b/dlls/dplayx/dplaysp.c
@@ -1,5 +1,5 @@
 /* This contains the implementation of the interface Service
- * Providers require to communicate with Direct Play 
+ * Providers require to communicate with Direct Play
  *
  * Copyright 2000 Peter Hunnisett <hunnise@nortelnetworks.com>
  *
@@ -98,7 +98,7 @@
   {
     return DPERR_OUTOFMEMORY;
   }
- 
+
   if( IsEqualGUID( &IID_IDirectPlaySP, riid ) )
   {
     ICOM_THIS(IDirectPlaySPImpl,*ppvObj);
@@ -136,7 +136,7 @@
 {
   ICOM_THIS(IDirectPlaySPImpl,lpSP);
 
-  This->unk = (DirectPlaySPIUnknownData*)HeapAlloc( GetProcessHeap(), 
+  This->unk = (DirectPlaySPIUnknownData*)HeapAlloc( GetProcessHeap(),
                                                     HEAP_ZERO_MEMORY,
                                                     sizeof( *(This->unk) ) );
 
@@ -153,7 +153,7 @@
 static BOOL DPSP_DestroyIUnknown( LPVOID lpSP )
 {
   ICOM_THIS(IDirectPlaySPImpl,lpSP);
- 
+
   DeleteCriticalSection( &This->unk->DPSP_lock );
   HeapFree( GetProcessHeap(), 0, This->unk );
 
@@ -185,7 +185,7 @@
    * FIXME: This is a kludge to get around a problem where a queryinterface
    *        is used to get a new interface and then is closed. We will then
    *        reference garbage. However, with this we will never deallocate
-   *        the interface we store. The correct fix is to require all 
+   *        the interface we store. The correct fix is to require all
    *        DP internal interfaces to use the This->dp2 interface which
    *        should be changed to This->dp
    */
@@ -249,11 +249,11 @@
 
     return E_NOINTERFACE;
   }
- 
+
   IDirectPlaySP_AddRef( (LPDIRECTPLAYSP)*ppvObj );
 
   return S_OK;
-} 
+}
 
 static ULONG WINAPI DPSP_AddRef
 ( LPDIRECTPLAYSP iface )
@@ -301,8 +301,8 @@
 ( LPDIRECTPLAYSP iface,
   LPCWSTR lpSection,
   LPCWSTR lpKey,
-  LPCVOID lpData, 
-  DWORD   dwDataSize, 
+  LPCVOID lpData,
+  DWORD   dwDataSize,
   DWORD   dwMaxEntries
 )
 {
@@ -310,7 +310,7 @@
 
   /* Should be able to call the comctl32 undocumented MRU routines.
      I suspect that the interface works appropriately */
-  FIXME( "(%p)->(%p,%p%p,0x%08lx,0x%08lx): stub\n", 
+  FIXME( "(%p)->(%p,%p%p,0x%08lx,0x%08lx): stub\n",
          This, lpSection, lpKey, lpData, dwDataSize, dwMaxEntries );
 
   return DP_OK;
@@ -318,17 +318,17 @@
 
 static HRESULT WINAPI IDirectPlaySPImpl_CreateAddress
 ( LPDIRECTPLAYSP iface,
-  REFGUID guidSP, 
-  REFGUID guidDataType, 
-  LPCVOID lpData, 
-  DWORD   dwDataSize, 
+  REFGUID guidSP,
+  REFGUID guidDataType,
+  LPCVOID lpData,
+  DWORD   dwDataSize,
   LPVOID  lpAddress,
   LPDWORD lpdwAddressSize
 )
 {
   ICOM_THIS(IDirectPlaySPImpl,iface);
 
-  FIXME( "(%p)->(%s,%s,%p,0x%08lx,%p,%p): stub\n", 
+  FIXME( "(%p)->(%s,%s,%p,0x%08lx,%p,%p): stub\n",
          This, debugstr_guid(guidSP), debugstr_guid(guidDataType),
          lpData, dwDataSize, lpAddress, lpdwAddressSize );
 
@@ -337,15 +337,15 @@
 
 static HRESULT WINAPI IDirectPlaySPImpl_EnumAddress
 ( LPDIRECTPLAYSP iface,
-  LPDPENUMADDRESSCALLBACK lpEnumAddressCallback, 
-  LPCVOID lpAddress, 
-  DWORD dwAddressSize, 
+  LPDPENUMADDRESSCALLBACK lpEnumAddressCallback,
+  LPCVOID lpAddress,
+  DWORD dwAddressSize,
   LPVOID lpContext
 )
 {
   ICOM_THIS(IDirectPlaySPImpl,iface);
 
-  TRACE( "(%p)->(%p,%p,0x%08lx,%p)\n", 
+  TRACE( "(%p)->(%p,%p,0x%08lx,%p)\n",
          This, lpEnumAddressCallback, lpAddress, dwAddressSize, lpContext );
 
   DPL_EnumAddress( lpEnumAddressCallback, lpAddress, dwAddressSize, lpContext );
@@ -355,9 +355,9 @@
 
 static HRESULT WINAPI IDirectPlaySPImpl_EnumMRUEntries
 ( LPDIRECTPLAYSP iface,
-  LPCWSTR lpSection, 
-  LPCWSTR lpKey, 
-  LPENUMMRUCALLBACK lpEnumMRUCallback, 
+  LPCWSTR lpSection,
+  LPCWSTR lpKey,
+  LPENUMMRUCALLBACK lpEnumMRUCallback,
   LPVOID lpContext
 )
 {
@@ -365,7 +365,7 @@
 
   /* Should be able to call the comctl32 undocumented MRU routines.
      I suspect that the interface works appropriately */
-  FIXME( "(%p)->(%p,%p,%p,%p,): stub\n", 
+  FIXME( "(%p)->(%p,%p,%p,%p,): stub\n",
          This, lpSection, lpKey, lpEnumMRUCallback, lpContext );
 
   return DP_OK;
@@ -373,13 +373,13 @@
 
 static HRESULT WINAPI IDirectPlaySPImpl_GetPlayerFlags
 ( LPDIRECTPLAYSP iface,
-  DPID idPlayer, 
+  DPID idPlayer,
   LPDWORD lpdwPlayerFlags
 )
 {
   ICOM_THIS(IDirectPlaySPImpl,iface);
 
-  FIXME( "(%p)->(0x%08lx,%p): stub\n", 
+  FIXME( "(%p)->(0x%08lx,%p): stub\n",
          This, idPlayer, lpdwPlayerFlags );
 
   return DP_OK;
@@ -387,9 +387,9 @@
 
 static HRESULT WINAPI IDirectPlaySPImpl_GetSPPlayerData
 ( LPDIRECTPLAYSP iface,
-  DPID idPlayer, 
-  LPVOID* lplpData, 
-  LPDWORD lpdwDataSize, 
+  DPID idPlayer,
+  LPVOID* lplpData,
+  LPDWORD lpdwDataSize,
   DWORD dwFlags
 )
 {
@@ -397,7 +397,7 @@
   LPDP_SPPLAYERDATA lpPlayerData;
   ICOM_THIS(IDirectPlaySPImpl,iface);
 
-  TRACE( "(%p)->(0x%08lx,%p,%p,0x%08lx)\n", 
+  TRACE( "(%p)->(0x%08lx,%p,%p,0x%08lx)\n",
          This, idPlayer, lplpData, lpdwDataSize, dwFlags );
 
   hr = DP_GetSPPlayerData( This->sp->dplay, idPlayer, (LPVOID*)&lpPlayerData );
@@ -433,15 +433,15 @@
   if( *lplpData == NULL )
   {
     hr = DPERR_GENERIC;
-  } 
+  }
 
   return hr;
 }
 
 static HRESULT WINAPI IDirectPlaySPImpl_HandleMessage
 ( LPDIRECTPLAYSP iface,
-  LPVOID lpMessageBody, 
-  DWORD  dwMessageBodySize, 
+  LPVOID lpMessageBody,
+  DWORD  dwMessageBodySize,
   LPVOID lpMessageHeader
 )
 {
@@ -450,16 +450,16 @@
   WORD wCommandId;
   WORD wVersion;
   DPSP_REPLYDATA data;
-      
+
   ICOM_THIS(IDirectPlaySPImpl,iface);
 
-  FIXME( "(%p)->(%p,0x%08lx,%p): mostly stub\n", 
+  FIXME( "(%p)->(%p,0x%08lx,%p): mostly stub\n",
          This, lpMessageBody, dwMessageBodySize, lpMessageHeader );
 
   wCommandId = lpMsg->wCommandId;
   wVersion   = lpMsg->wVersion;
 
-  TRACE( "Incomming message has envelope of 0x%08lx, %u, %u\n", 
+  TRACE( "Incomming message has envelope of 0x%08lx, %u, %u\n",
          lpMsg->dwMagic, wCommandId, wVersion );
 
   if( lpMsg->dwMagic != DPMSGMAGIC_DPLAYMSG )
@@ -483,7 +483,7 @@
 
   /* Pass this message to the dplay interface to handle */
   hr = DP_HandleMessage( This->sp->dplay, lpMessageBody, dwMessageBodySize,
-                         lpMessageHeader, wCommandId, wVersion, 
+                         lpMessageHeader, wCommandId, wVersion,
                          &data.lpMessage, &data.dwMessageSize );
 
   if( FAILED(hr) )
@@ -524,8 +524,8 @@
 
       if( msg->dwPlayerType == DPPLAYERTYPE_PLAYER )
       {
-        hr = DP_IF_CreatePlayer( This, lpMessageHeader, msg->dpId, 
-                                 &msg->dpnName, 0, msg->lpData, 
+        hr = DP_IF_CreatePlayer( This, lpMessageHeader, msg->dpId,
+                                 &msg->dpnName, 0, msg->lpData,
                                  msg->dwDataSize, msg->dwFlags, ... );
       }
       else if( msg->dwPlayerType == DPPLAYERTYPE_GROUP )
@@ -533,14 +533,14 @@
         /* Group in group situation? */
         if( msg->dpIdParent == DPID_NOPARENT_GROUP )
         {
-          hr = DP_IF_CreateGroup( This, lpMessageHeader, msg->dpId, 
-                                  &msg->dpnName, 0, msg->lpData, 
+          hr = DP_IF_CreateGroup( This, lpMessageHeader, msg->dpId,
+                                  &msg->dpnName, 0, msg->lpData,
                                   msg->dwDataSize, msg->dwFlags, ... );
         }
         else /* Group in Group */
         {
           hr = DP_IF_CreateGroupInGroup( This, lpMessageHeader, msg->dpIdParent,
-                                         &msg->dpnName, 0, msg->lpData, 
+                                         &msg->dpnName, 0, msg->lpData,
                                          msg->dwDataSize, msg->dwFlags, ... );
         }
       }
@@ -707,7 +707,7 @@
       FIXME( "DPSYS_CHAT not implemeneted\n" );
 
       break;
-    }   
+    }
 
     case DPSYS_SETGROUPOWNER:
     {
@@ -754,20 +754,20 @@
 
 static HRESULT WINAPI IDirectPlaySPImpl_SetSPPlayerData
 ( LPDIRECTPLAYSP iface,
-  DPID idPlayer, 
-  LPVOID lpData, 
-  DWORD dwDataSize, 
+  DPID idPlayer,
+  LPVOID lpData,
+  DWORD dwDataSize,
   DWORD dwFlags
 )
 {
   HRESULT           hr;
   LPDP_SPPLAYERDATA lpPlayerEntry;
-  LPVOID            lpPlayerData; 
+  LPVOID            lpPlayerData;
 
   ICOM_THIS(IDirectPlaySPImpl,iface);
 
 /*  TRACE( "Called on process 0x%08lx\n", GetCurrentProcessId() ); */
-  TRACE( "(%p)->(0x%08lx,%p,0x%08lx,0x%08lx)\n", 
+  TRACE( "(%p)->(0x%08lx,%p,0x%08lx,0x%08lx)\n",
          This, idPlayer, lpData, dwDataSize, dwFlags );
 
   hr = DP_GetSPPlayerData( This->sp->dplay, idPlayer, (LPVOID*)&lpPlayerEntry );
@@ -798,15 +798,15 @@
 
 static HRESULT WINAPI IDirectPlaySPImpl_CreateCompoundAddress
 ( LPDIRECTPLAYSP iface,
-  LPCDPCOMPOUNDADDRESSELEMENT lpElements, 
-  DWORD dwElementCount, 
-  LPVOID lpAddress, 
+  LPCDPCOMPOUNDADDRESSELEMENT lpElements,
+  DWORD dwElementCount,
+  LPVOID lpAddress,
   LPDWORD lpdwAddressSize
 )
 {
   ICOM_THIS(IDirectPlaySPImpl,iface);
 
-  FIXME( "(%p)->(%p,0x%08lx,%p,%p): stub\n", 
+  FIXME( "(%p)->(%p,0x%08lx,%p,%p): stub\n",
          This, lpElements, dwElementCount, lpAddress, lpdwAddressSize );
 
   return DP_OK;
@@ -814,8 +814,8 @@
 
 static HRESULT WINAPI IDirectPlaySPImpl_GetSPData
 ( LPDIRECTPLAYSP iface,
-  LPVOID* lplpData, 
-  LPDWORD lpdwDataSize, 
+  LPVOID* lplpData,
+  LPDWORD lpdwDataSize,
   DWORD dwFlags
 )
 {
@@ -823,7 +823,7 @@
   ICOM_THIS(IDirectPlaySPImpl,iface);
 
 /*  TRACE( "Called on process 0x%08lx\n", GetCurrentProcessId() ); */
-  TRACE( "(%p)->(%p,%p,0x%08lx)\n", 
+  TRACE( "(%p)->(%p,%p,0x%08lx)\n",
          This, lplpData, lpdwDataSize, dwFlags );
 
 #if 0
@@ -872,8 +872,8 @@
 
 static HRESULT WINAPI IDirectPlaySPImpl_SetSPData
 ( LPDIRECTPLAYSP iface,
-  LPVOID lpData, 
-  DWORD dwDataSize, 
+  LPVOID lpData,
+  DWORD dwDataSize,
   DWORD dwFlags
 )
 {
@@ -882,7 +882,7 @@
   ICOM_THIS(IDirectPlaySPImpl,iface);
 
 /*  TRACE( "Called on process 0x%08lx\n", GetCurrentProcessId() ); */
-  TRACE( "(%p)->(%p,0x%08lx,0x%08lx)\n", 
+  TRACE( "(%p)->(%p,0x%08lx,0x%08lx)\n",
          This, lpData, dwDataSize, dwFlags );
 
 #if 0
@@ -932,13 +932,13 @@
 
 static VOID WINAPI IDirectPlaySPImpl_SendComplete
 ( LPDIRECTPLAYSP iface,
-  LPVOID unknownA, 
+  LPVOID unknownA,
   DWORD unknownB
 )
 {
   ICOM_THIS(IDirectPlaySPImpl,iface);
 
-  FIXME( "(%p)->(%p,0x%08lx): stub\n", 
+  FIXME( "(%p)->(%p,0x%08lx): stub\n",
          This, unknownA, unknownB );
 }
 
@@ -972,7 +972,7 @@
 extern LPVOID DPSP_CreateSPPlayerData(void)
 {
   TRACE( "Creating SPPlayer data struct\n" );
-  return HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, 
+  return HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY,
                     sizeof( DP_SPPLAYERDATA ) );
 }
 
diff --git a/dlls/dplayx/dplaysp.h b/dlls/dplayx/dplaysp.h
index ae14d4a..1b961af 100644
--- a/dlls/dplayx/dplaysp.h
+++ b/dlls/dplayx/dplaysp.h
@@ -74,7 +74,7 @@
 #undef ICOM_INTERFACE
 
 
-/* NOTE: The microsoft provided header file doesn't have these access 
+/* NOTE: The microsoft provided header file doesn't have these access
  * functions
  */
 /*** IUnknown methods ***/
@@ -189,7 +189,7 @@
 } DPSP_REMOVEPLAYERFROMGROUPDATA, *LPDPSP_REMOVEPLAYERFROMGROUPDATA;
 
 typedef struct tagDPSP_REPLYDATA
-{      
+{
   LPVOID         lpSPMessageHeader;
   LPVOID         lpMessage;
   DWORD          dwMessageSize;
@@ -331,27 +331,27 @@
     LPDPSP_SENDEX                SendEx;                /* Optional */
     LPDPSP_SENDTOGROUPEX         SendToGroupEx;         /* Optional */
     LPDPSP_CANCEL                Cancel;                /* Optional */
-    LPDPSP_GETMESSAGEQUEUE       GetMessageQueue;       /* Optional */ 
+    LPDPSP_GETMESSAGEQUEUE       GetMessageQueue;       /* Optional */
 } DPSP_SPCALLBACKS, *LPDPSP_SPCALLBACKS;
 
 typedef struct tagSPINITDATA
 {
-    LPDPSP_SPCALLBACKS  lpCB; 
+    LPDPSP_SPCALLBACKS  lpCB;
     IDirectPlaySP*      lpISP;
     LPWSTR              lpszName;
     LPGUID              lpGuid;
-    DWORD               dwReserved1; 
+    DWORD               dwReserved1;
     DWORD               dwReserved2;
-    DWORD               dwSPHeaderSize;     
+    DWORD               dwSPHeaderSize;
     LPDPADDRESS         lpAddress;
-    DWORD               dwAddressSize;      
-    DWORD               dwSPVersion;        
+    DWORD               dwAddressSize;
+    DWORD               dwSPVersion;
 } SPINITDATA, *LPSPINITDATA;
 
 typedef HRESULT (WINAPI *LPDPSP_SPINIT)(LPSPINITDATA);
 
-/* This variable is exported from the DLL at ordinal 6 to be accessed by the 
- * SP directly 
+/* This variable is exported from the DLL at ordinal 6 to be accessed by the
+ * SP directly
  */
 extern DWORD gdwDPlaySPRefCount;
 
diff --git a/dlls/dplayx/dplayx_global.c b/dlls/dplayx/dplayx_global.c
index fbc5fba..be48111 100644
--- a/dlls/dplayx/dplayx_global.c
+++ b/dlls/dplayx/dplayx_global.c
@@ -19,9 +19,9 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
-/* NOTE: Methods that begin with DPLAYX_ are used for dealing with 
+/* NOTE: Methods that begin with DPLAYX_ are used for dealing with
  *       dplayx.dll data which is accessible from all processes.
- */ 
+ */
 
 #include <string.h>
 #include "wine/debug.h"
@@ -57,7 +57,7 @@
                                   TRACE( "DPLAYX Semaphore released\n" ) /* FIXME: Is this correct? */
 
 
-/* HACK for simple global data right now */ 
+/* HACK for simple global data right now */
 #define dwStaticSharedSize (128 * 1024) /* 128 KBytes */
 #define dwDynamicSharedSize (512 * 1024) /* 512 KBytes */
 #define dwTotalSharedSize  ( dwStaticSharedSize + dwDynamicSharedSize )
@@ -70,7 +70,7 @@
 #define dwBlockSize 512
 #define dwMaxBlock  (dwDynamicSharedSize/dwBlockSize)
 
-typedef struct 
+typedef struct
 {
   DWORD used;
   DWORD data[dwBlockSize-sizeof(DWORD)];
@@ -88,11 +88,11 @@
   if( addr == NULL )
   {
     return;
-  } 
+  }
 
   lpAddrStart = addr - sizeof(DWORD); /* Find block header */
   dwBlockUsed =  ((BYTE*)lpAddrStart - (BYTE*)lpMemArea)/dwBlockSize;
-  
+
   lpMemArea[ dwBlockUsed ].used = 0;
 }
 
@@ -107,11 +107,11 @@
   {
     FIXME( "Size exceeded. Request of 0x%08lx\n", size );
     size = dwBlockSize - sizeof(DWORD);
-  } 
+  }
 
   /* Find blank area */
-  uBlockUsed = 0; 
-  while( ( lpMemArea[ uBlockUsed ].used != 0 ) && ( uBlockUsed <= dwMaxBlock ) ) { uBlockUsed++; } 
+  uBlockUsed = 0;
+  while( ( lpMemArea[ uBlockUsed ].used != 0 ) && ( uBlockUsed <= dwMaxBlock ) ) { uBlockUsed++; }
 
   if( uBlockUsed <= dwMaxBlock )
   {
@@ -124,7 +124,7 @@
     ERR( "No free block found\n" );
     return NULL;
   }
-  
+
   if( flags & HEAP_ZERO_MEMORY )
   {
     ZeroMemory( lpvArea, size );
@@ -145,7 +145,7 @@
 
 LPWSTR DPLAYX_strdupW( DWORD flags, LPCWSTR str );
 LPWSTR DPLAYX_strdupW( DWORD flags, LPCWSTR str )
-{                   
+{
   INT len = strlenW(str) + 1;
   LPWSTR p = DPLAYX_PrivHeapAlloc( flags, len * sizeof(WCHAR) );
   if(p) {
@@ -159,7 +159,7 @@
 typedef struct tagDPLAYX_LOBBYDATA
 {
   /* Points to lpConn + block of contiguous extra memory for dynamic parts
-   * of the struct directly following 
+   * of the struct directly following
    */
   LPDPLCONNECTION lpConn;
 
@@ -177,14 +177,14 @@
   /* Sundries */
   BOOL bWaitForConnectionSettings;
   DWORD dwLobbyMsgThreadId;
-  
+
 
 } DPLAYX_LOBBYDATA, *LPDPLAYX_LOBBYDATA;
 
 static DPLAYX_LOBBYDATA* lobbyData = NULL;
 /* static DPLAYX_LOBBYDATA lobbyData[ numSupportedLobbies ]; */
 
-static DPSESSIONDESC2* sessionData = NULL; 
+static DPSESSIONDESC2* sessionData = NULL;
 /* static DPSESSIONDESC2* sessionData[ numSupportedSessions ]; */
 
 /* Function prototypes */
@@ -199,10 +199,10 @@
 
 
 
-/*************************************************************************** 
- * Called to initialize the global data. This will only be used on the 
- * loading of the dll 
- ***************************************************************************/ 
+/***************************************************************************
+ * Called to initialize the global data. This will only be used on the
+ * loading of the dll
+ ***************************************************************************/
 BOOL DPLAYX_ConstructData(void)
 {
   SECURITY_ATTRIBUTES s_attrib;
@@ -218,7 +218,7 @@
   s_attrib.lpSecurityDescriptor = NULL;
   s_attrib.nLength              = sizeof(s_attrib);
 
-  hDplayxSema = CreateSemaphoreA( &s_attrib, 1, 1, lpszDplayxSemaName ); 
+  hDplayxSema = CreateSemaphoreA( &s_attrib, 1, 1, lpszDplayxSemaName );
 
   /* First instance creates the semaphore. Others just use it */
   if( GetLastError() == ERROR_SUCCESS )
@@ -241,13 +241,13 @@
   SetLastError( ERROR_SUCCESS );
 
   DPLAYX_AquireSemaphore();
- 
+
   hDplayxSharedMem = CreateFileMappingA( INVALID_HANDLE_VALUE,
                                          &s_attrib,
                                          PAGE_READWRITE | SEC_COMMIT,
-                                         0, 
+                                         0,
                                          dwTotalSharedSize,
-                                         lpszDplayxFileMapping ); 
+                                         lpszDplayxFileMapping );
 
   if( GetLastError() == ERROR_SUCCESS )
   {
@@ -263,13 +263,13 @@
     return FALSE;
   }
 
-  lpSharedStaticData = MapViewOfFileEx( hDplayxSharedMem, 
-                                        FILE_MAP_WRITE, 
+  lpSharedStaticData = MapViewOfFileEx( hDplayxSharedMem,
+                                        FILE_MAP_WRITE,
                                         0, 0, 0, lpDesiredMemoryMapStart );
 
   if( lpSharedStaticData == NULL )
   {
-    ERR( ": unable to map static data into process memory space (%ld)\n", 
+    ERR( ": unable to map static data into process memory space (%ld)\n",
          GetLastError() );
     return FALSE;
   }
@@ -307,7 +307,7 @@
 
     TRACE( "Initializing shared memory\n" );
 
-    /* Set all lobbies to be "empty" */ 
+    /* Set all lobbies to be "empty" */
     for( i=0; i < numSupportedLobbies; i++ )
     {
       DPLAYX_InitializeLobbyDataEntry( &lobbyData[ i ] );
@@ -325,19 +325,19 @@
     /* Just for fun sync the whole data area */
     FlushViewOfFile( lpSharedStaticData, dwTotalSharedSize );
   }
-  
+
   DPLAYX_ReleaseSemaphore();
 
   /* Everything was created correctly. Signal the lobby client that
    * we started up correctly
    */
   if( DPLAYX_GetThisLobbyHandles( &hInformOnStart, NULL, NULL, FALSE ) &&
-      hInformOnStart 
+      hInformOnStart
     )
   {
     BOOL bSuccess;
     bSuccess = SetEvent( hInformOnStart );
-    TRACE( "Signalling lobby app start event %u %s\n", 
+    TRACE( "Signalling lobby app start event %u %s\n",
              hInformOnStart, bSuccess ? "succeed" : "failed" );
 
     /* Close out handle */
@@ -347,10 +347,10 @@
   return TRUE;
 }
 
-/*************************************************************************** 
- * Called to destroy all global data. This will only be used on the 
- * unloading of the dll 
- ***************************************************************************/ 
+/***************************************************************************
+ * Called to destroy all global data. This will only be used on the
+ * unloading of the dll
+ ***************************************************************************/
 BOOL DPLAYX_DestructData(void)
 {
   HANDLE hInformOnDeath;
@@ -359,12 +359,12 @@
 
   /* If required, inform that this app is dying */
   if( DPLAYX_GetThisLobbyHandles( NULL, &hInformOnDeath, NULL, FALSE ) &&
-      hInformOnDeath 
+      hInformOnDeath
     )
   {
     BOOL bSuccess;
     bSuccess = SetEvent( hInformOnDeath );
-    TRACE( "Signalling lobby app death event %u %s\n", 
+    TRACE( "Signalling lobby app death event %u %s\n",
              hInformOnDeath, bSuccess ? "succeed" : "failed" );
 
     /* Close out handle */
@@ -375,7 +375,7 @@
 
   /* Delete the semaphore */
   CloseHandle( hDplayxSema );
- 
+
   /* Delete shared memory file mapping */
   UnmapViewOfFile( lpSharedStaticData );
   CloseHandle( hDplayxSharedMem );
@@ -389,7 +389,7 @@
   ZeroMemory( lpData, sizeof( *lpData ) );
 }
 
-/* NOTE: This must be called with the semaphore aquired. 
+/* NOTE: This must be called with the semaphore aquired.
  * TRUE/FALSE with a pointer to it's data returned. Pointer data is
  * is only valid if TRUE is returned.
  */
@@ -409,7 +409,7 @@
   {
     if( lobbyData[ i ].dwAppID == dwAppID )
     {
-      /* This process is lobbied */ 
+      /* This process is lobbied */
       TRACE( "Found 0x%08lx @ %u\n", dwAppID, i );
       *lplpDplData = &lobbyData[ i ];
       return TRUE;
@@ -428,7 +428,7 @@
   if( dwAppID == 0 )
   {
     return FALSE;
-  } 
+  }
 
   DPLAYX_AquireSemaphore();
 
@@ -445,7 +445,7 @@
       lobbyData[ i ].dwAppLaunchedFromID  = GetCurrentProcessId();
 
       /* FIXME: Where is the best place for this? In interface or here? */
-      lobbyData[ i ].hInformOnAppStart = 0; 
+      lobbyData[ i ].hInformOnAppStart = 0;
       lobbyData[ i ].hInformOnAppDeath = 0;
       lobbyData[ i ].hInformOnSettingRead = 0;
 
@@ -461,7 +461,7 @@
 }
 
 /* I'm not sure when I'm going to need this, but here it is */
-BOOL DPLAYX_DestroyLobbyApplication( DWORD dwAppID ) 
+BOOL DPLAYX_DestroyLobbyApplication( DWORD dwAppID )
 {
   UINT i;
 
@@ -515,7 +515,7 @@
   return TRUE;
 }
 
-BOOL DPLAYX_GetThisLobbyHandles( LPHANDLE lphStart, 
+BOOL DPLAYX_GetThisLobbyHandles( LPHANDLE lphStart,
                                  LPHANDLE lphDeath,
                                  LPHANDLE lphConnRead,
                                  BOOL     bClearSetHandles )
@@ -535,7 +535,7 @@
     if( lpLData->hInformOnAppStart == 0 )
     {
       DPLAYX_ReleaseSemaphore();
-      return FALSE; 
+      return FALSE;
     }
 
     *lphStart = lpLData->hInformOnAppStart;
@@ -580,7 +580,7 @@
       lpLData->hInformOnSettingRead = 0;
     }
   }
- 
+
   DPLAYX_ReleaseSemaphore();
 
   return TRUE;
@@ -609,7 +609,7 @@
   dwRequiredDataSize = DPLAYX_SizeOfLobbyDataA( lpDplData->lpConn );
 
   /* Do they want to know the required buffer size or is the provided buffer
-   * big enough? 
+   * big enough?
    */
   if ( ( lpData == NULL ) ||
        ( *lpdwDataSize < dwRequiredDataSize )
@@ -628,12 +628,12 @@
 
   /* They have gotten the information - signal the event if required */
   if( DPLAYX_GetThisLobbyHandles( NULL, NULL, &hInformOnSettingRead, FALSE ) &&
-      hInformOnSettingRead 
+      hInformOnSettingRead
     )
   {
     BOOL bSuccess;
     bSuccess = SetEvent( hInformOnSettingRead );
-    TRACE( "Signalling setting read event %u %s\n", 
+    TRACE( "Signalling setting read event %u %s\n",
              hInformOnSettingRead, bSuccess ? "succeed" : "failed" );
 
     /* Close out handle */
@@ -664,7 +664,7 @@
     {
       strcpy( (LPSTR)lpStartOfFreeSpace, src->lpSessionDesc->u1.lpszSessionNameA );
       dest->lpSessionDesc->u1.lpszSessionNameA = (LPSTR)lpStartOfFreeSpace;
-      lpStartOfFreeSpace +=  
+      lpStartOfFreeSpace +=
         strlen( (LPSTR)dest->lpSessionDesc->u1.lpszSessionNameA ) + 1;
     }
 
@@ -672,7 +672,7 @@
     {
       strcpy( (LPSTR)lpStartOfFreeSpace, src->lpSessionDesc->u2.lpszPasswordA );
       dest->lpSessionDesc->u2.lpszPasswordA = (LPSTR)lpStartOfFreeSpace;
-      lpStartOfFreeSpace += 
+      lpStartOfFreeSpace +=
         strlen( (LPSTR)dest->lpSessionDesc->u2.lpszPasswordA ) + 1;
     }
   }
@@ -688,7 +688,7 @@
     {
       strcpy( (LPSTR)lpStartOfFreeSpace, src->lpPlayerName->u1.lpszShortNameA );
       dest->lpPlayerName->u1.lpszShortNameA = (LPSTR)lpStartOfFreeSpace;
-      lpStartOfFreeSpace +=  
+      lpStartOfFreeSpace +=
         strlen( (LPSTR)dest->lpPlayerName->u1.lpszShortNameA ) + 1;
     }
 
@@ -696,7 +696,7 @@
     {
       strcpy( (LPSTR)lpStartOfFreeSpace, src->lpPlayerName->u2.lpszLongNameA );
       dest->lpPlayerName->u2.lpszLongNameA = (LPSTR)lpStartOfFreeSpace;
-      lpStartOfFreeSpace +=  
+      lpStartOfFreeSpace +=
         strlen( (LPSTR)dest->lpPlayerName->u2.lpszLongName ) + 1 ;
     }
 
@@ -731,7 +731,7 @@
   dwRequiredDataSize = DPLAYX_SizeOfLobbyDataW( lpDplData->lpConn );
 
   /* Do they want to know the required buffer size or is the provided buffer
-   * big enough? 
+   * big enough?
    */
   if ( ( lpData == NULL ) ||
        ( *lpdwDataSize < dwRequiredDataSize )
@@ -750,12 +750,12 @@
 
   /* They have gotten the information - signal the event if required */
   if( DPLAYX_GetThisLobbyHandles( NULL, NULL, &hInformOnSettingRead, FALSE ) &&
-      hInformOnSettingRead 
+      hInformOnSettingRead
     )
   {
     BOOL bSuccess;
     bSuccess = SetEvent( hInformOnSettingRead );
-    TRACE( "Signalling setting read event %u %s\n", 
+    TRACE( "Signalling setting read event %u %s\n",
              hInformOnSettingRead, bSuccess ? "succeed" : "failed" );
 
     /* Close out handle */
@@ -779,7 +779,7 @@
   {
     dest->lpSessionDesc = (LPDPSESSIONDESC2)lpStartOfFreeSpace;
     lpStartOfFreeSpace += sizeof( DPSESSIONDESC2 );
-    CopyMemory( dest->lpSessionDesc, src->lpSessionDesc, sizeof( DPSESSIONDESC2 ) ); 
+    CopyMemory( dest->lpSessionDesc, src->lpSessionDesc, sizeof( DPSESSIONDESC2 ) );
 
     /* Session names may or may not exist */
     if( src->lpSessionDesc->u1.lpszSessionName )
@@ -805,7 +805,7 @@
     dest->lpPlayerName = (LPDPNAME)lpStartOfFreeSpace;
     lpStartOfFreeSpace += sizeof( DPNAME );
     CopyMemory( dest->lpPlayerName, src->lpPlayerName, sizeof( DPNAME ) );
-   
+
     if( src->lpPlayerName->u1.lpszShortName )
     {
       strcpyW( (LPWSTR)lpStartOfFreeSpace, src->lpPlayerName->u1.lpszShortName );
@@ -828,7 +828,7 @@
   if( src->lpAddress )
   {
     dest->lpAddress = (LPVOID)lpStartOfFreeSpace;
-    CopyMemory( lpStartOfFreeSpace, src->lpAddress, src->dwAddressSize );  
+    CopyMemory( lpStartOfFreeSpace, src->lpAddress, src->dwAddressSize );
     /* No need to advance lpStartOfFreeSpace as there is no more "dynamic" data */
   }
 
@@ -836,7 +836,7 @@
 
 /* Store the structure into the shared data structre. Ensure that allocs for
  * variable length strings come from the shared data structure.
- * FIXME: We need to free information as well 
+ * FIXME: We need to free information as well
  */
 HRESULT DPLAYX_SetConnectionSettingsA
 ( DWORD dwFlags,
@@ -885,7 +885,7 @@
   /* Free the existing memory */
   DPLAYX_PrivHeapFree( lpDplData->lpConn );
 
-  lpDplData->lpConn = DPLAYX_PrivHeapAlloc( HEAP_ZERO_MEMORY, 
+  lpDplData->lpConn = DPLAYX_PrivHeapAlloc( HEAP_ZERO_MEMORY,
                                             DPLAYX_SizeOfLobbyDataA( lpConn ) );
 
   DPLAYX_CopyConnStructA( lpDplData->lpConn, lpConn );
@@ -900,7 +900,7 @@
 
 /* Store the structure into the shared data structre. Ensure that allocs for
  * variable length strings come from the shared data structure.
- * FIXME: We need to free information as well 
+ * FIXME: We need to free information as well
  */
 HRESULT DPLAYX_SetConnectionSettingsW
 ( DWORD dwFlags,
@@ -969,7 +969,7 @@
     {
       dwTotalSize += strlen( lpConn->lpSessionDesc->u1.lpszSessionNameA ) + 1;
     }
- 
+
     if( lpConn->lpSessionDesc->u2.lpszPasswordA )
     {
       dwTotalSize += strlen( lpConn->lpSessionDesc->u2.lpszPasswordA ) + 1;
@@ -1052,8 +1052,8 @@
 
 LPDPSESSIONDESC2 DPLAYX_CopyAndAllocateSessionDesc2A( LPCDPSESSIONDESC2 lpSessionSrc )
 {
-   LPDPSESSIONDESC2 lpSessionDest = 
-     (LPDPSESSIONDESC2)HeapAlloc( GetProcessHeap(), 
+   LPDPSESSIONDESC2 lpSessionDest =
+     (LPDPSESSIONDESC2)HeapAlloc( GetProcessHeap(),
                                   HEAP_ZERO_MEMORY, sizeof( *lpSessionSrc ) );
    DPLAYX_CopyIntoSessionDesc2A( lpSessionDest, lpSessionSrc );
 
@@ -1090,10 +1090,10 @@
   {
     if( sessionData[(*index)].dwSize != 0 )
     {
-      return DPLAYX_CopyAndAllocateSessionDesc2A( &sessionData[(*index)++] ); 
+      return DPLAYX_CopyAndAllocateSessionDesc2A( &sessionData[(*index)++] );
     }
   }
- 
+
   /* No more sessions */
   return NULL;
 }
@@ -1119,14 +1119,14 @@
   UINT i;
 
   /* FIXME: Is this an error if it exists already? */
- 
+
   /* Crude/wrong implementation for now. Just always add to first empty spot */
   for( i=0; i < numSupportedSessions; i++ )
   {
     /* Is this one empty? */
     if( sessionData[i].dwSize == 0 )
     {
-      DPLAYX_CopyIntoSessionDesc2A( &sessionData[i], lpsd );  
+      DPLAYX_CopyIntoSessionDesc2A( &sessionData[i], lpsd );
       break;
     }
   }
@@ -1138,7 +1138,7 @@
   LPDPLAYX_LOBBYDATA lpLobbyData;
 
   DPLAYX_AquireSemaphore();
-  
+
   if( !DPLAYX_IsAppIdLobbied( 0, &lpLobbyData ) )
   {
     DPLAYX_ReleaseSemaphore();
@@ -1164,9 +1164,9 @@
     if( ( lobbyData[ i ].dwAppID != 0 ) &&            /* lobby initialized */
         ( lobbyData[ i ].bWaitForConnectionSettings ) /* Waiting */
       )
-    { 
+    {
       bFound = TRUE;
-      break; 
+      break;
     }
   }
 
@@ -1194,7 +1194,7 @@
   return TRUE;
 }
 
-/* NOTE: This is potentially not thread safe. You are not guaranteed to end up 
+/* NOTE: This is potentially not thread safe. You are not guaranteed to end up
          with the correct string printed in the case where the HRESULT is not
          known. You'll just get the last hr passed in printed. This can change
          over time if this method is used alot :) */
@@ -1204,135 +1204,135 @@
 
   switch (hr)
   {
-    case DP_OK:  
+    case DP_OK:
       return "DP_OK";
-    case DPERR_ALREADYINITIALIZED: 
+    case DPERR_ALREADYINITIALIZED:
       return "DPERR_ALREADYINITIALIZED";
-    case DPERR_ACCESSDENIED: 
+    case DPERR_ACCESSDENIED:
       return "DPERR_ACCESSDENIED";
-    case DPERR_ACTIVEPLAYERS: 
+    case DPERR_ACTIVEPLAYERS:
       return "DPERR_ACTIVEPLAYERS";
-    case DPERR_BUFFERTOOSMALL: 
+    case DPERR_BUFFERTOOSMALL:
       return "DPERR_BUFFERTOOSMALL";
-    case DPERR_CANTADDPLAYER: 
+    case DPERR_CANTADDPLAYER:
       return "DPERR_CANTADDPLAYER";
-    case DPERR_CANTCREATEGROUP: 
+    case DPERR_CANTCREATEGROUP:
       return "DPERR_CANTCREATEGROUP";
-    case DPERR_CANTCREATEPLAYER: 
+    case DPERR_CANTCREATEPLAYER:
       return "DPERR_CANTCREATEPLAYER";
-    case DPERR_CANTCREATESESSION: 
+    case DPERR_CANTCREATESESSION:
       return "DPERR_CANTCREATESESSION";
-    case DPERR_CAPSNOTAVAILABLEYET: 
+    case DPERR_CAPSNOTAVAILABLEYET:
       return "DPERR_CAPSNOTAVAILABLEYET";
-    case DPERR_EXCEPTION: 
+    case DPERR_EXCEPTION:
       return "DPERR_EXCEPTION";
-    case DPERR_GENERIC: 
+    case DPERR_GENERIC:
       return "DPERR_GENERIC";
-    case DPERR_INVALIDFLAGS: 
+    case DPERR_INVALIDFLAGS:
       return "DPERR_INVALIDFLAGS";
-    case DPERR_INVALIDOBJECT: 
+    case DPERR_INVALIDOBJECT:
       return "DPERR_INVALIDOBJECT";
-    case DPERR_INVALIDPARAMS: 
+    case DPERR_INVALIDPARAMS:
       return "DPERR_INVALIDPARAMS";
-    case DPERR_INVALIDPLAYER: 
+    case DPERR_INVALIDPLAYER:
       return "DPERR_INVALIDPLAYER";
-    case DPERR_INVALIDGROUP: 
+    case DPERR_INVALIDGROUP:
       return "DPERR_INVALIDGROUP";
-    case DPERR_NOCAPS: 
+    case DPERR_NOCAPS:
       return "DPERR_NOCAPS";
-    case DPERR_NOCONNECTION: 
+    case DPERR_NOCONNECTION:
       return "DPERR_NOCONNECTION";
-    case DPERR_OUTOFMEMORY: 
+    case DPERR_OUTOFMEMORY:
       return "DPERR_OUTOFMEMORY";
-    case DPERR_NOMESSAGES: 
+    case DPERR_NOMESSAGES:
       return "DPERR_NOMESSAGES";
-    case DPERR_NONAMESERVERFOUND: 
+    case DPERR_NONAMESERVERFOUND:
       return "DPERR_NONAMESERVERFOUND";
-    case DPERR_NOPLAYERS: 
+    case DPERR_NOPLAYERS:
       return "DPERR_NOPLAYERS";
-    case DPERR_NOSESSIONS: 
+    case DPERR_NOSESSIONS:
       return "DPERR_NOSESSIONS";
-    case DPERR_PENDING: 
+    case DPERR_PENDING:
       return "DPERR_PENDING";
-    case DPERR_SENDTOOBIG: 
+    case DPERR_SENDTOOBIG:
       return "DPERR_SENDTOOBIG";
-    case DPERR_TIMEOUT: 
+    case DPERR_TIMEOUT:
       return "DPERR_TIMEOUT";
-    case DPERR_UNAVAILABLE: 
+    case DPERR_UNAVAILABLE:
       return "DPERR_UNAVAILABLE";
-    case DPERR_UNSUPPORTED: 
+    case DPERR_UNSUPPORTED:
       return "DPERR_UNSUPPORTED";
-    case DPERR_BUSY: 
+    case DPERR_BUSY:
       return "DPERR_BUSY";
-    case DPERR_USERCANCEL: 
+    case DPERR_USERCANCEL:
       return "DPERR_USERCANCEL";
-    case DPERR_NOINTERFACE: 
+    case DPERR_NOINTERFACE:
       return "DPERR_NOINTERFACE";
-    case DPERR_CANNOTCREATESERVER: 
+    case DPERR_CANNOTCREATESERVER:
       return "DPERR_CANNOTCREATESERVER";
-    case DPERR_PLAYERLOST: 
+    case DPERR_PLAYERLOST:
       return "DPERR_PLAYERLOST";
-    case DPERR_SESSIONLOST: 
+    case DPERR_SESSIONLOST:
       return "DPERR_SESSIONLOST";
-    case DPERR_UNINITIALIZED: 
+    case DPERR_UNINITIALIZED:
       return "DPERR_UNINITIALIZED";
-    case DPERR_NONEWPLAYERS: 
+    case DPERR_NONEWPLAYERS:
       return "DPERR_NONEWPLAYERS";
-    case DPERR_INVALIDPASSWORD: 
+    case DPERR_INVALIDPASSWORD:
       return "DPERR_INVALIDPASSWORD";
-    case DPERR_CONNECTING: 
+    case DPERR_CONNECTING:
       return "DPERR_CONNECTING";
-    case DPERR_CONNECTIONLOST: 
+    case DPERR_CONNECTIONLOST:
       return "DPERR_CONNECTIONLOST";
     case DPERR_UNKNOWNMESSAGE:
       return "DPERR_UNKNOWNMESSAGE";
-    case DPERR_CANCELFAILED: 
+    case DPERR_CANCELFAILED:
       return "DPERR_CANCELFAILED";
-    case DPERR_INVALIDPRIORITY: 
+    case DPERR_INVALIDPRIORITY:
       return "DPERR_INVALIDPRIORITY";
-    case DPERR_NOTHANDLED: 
+    case DPERR_NOTHANDLED:
       return "DPERR_NOTHANDLED";
-    case DPERR_CANCELLED: 
+    case DPERR_CANCELLED:
       return "DPERR_CANCELLED";
-    case DPERR_ABORTED: 
+    case DPERR_ABORTED:
       return "DPERR_ABORTED";
-    case DPERR_BUFFERTOOLARGE: 
+    case DPERR_BUFFERTOOLARGE:
       return "DPERR_BUFFERTOOLARGE";
-    case DPERR_CANTCREATEPROCESS: 
+    case DPERR_CANTCREATEPROCESS:
       return "DPERR_CANTCREATEPROCESS";
-    case DPERR_APPNOTSTARTED: 
+    case DPERR_APPNOTSTARTED:
       return "DPERR_APPNOTSTARTED";
-    case DPERR_INVALIDINTERFACE: 
+    case DPERR_INVALIDINTERFACE:
       return "DPERR_INVALIDINTERFACE";
-    case DPERR_NOSERVICEPROVIDER: 
+    case DPERR_NOSERVICEPROVIDER:
       return "DPERR_NOSERVICEPROVIDER";
-    case DPERR_UNKNOWNAPPLICATION: 
+    case DPERR_UNKNOWNAPPLICATION:
       return "DPERR_UNKNOWNAPPLICATION";
-    case DPERR_NOTLOBBIED: 
+    case DPERR_NOTLOBBIED:
       return "DPERR_NOTLOBBIED";
-    case DPERR_SERVICEPROVIDERLOADED: 
+    case DPERR_SERVICEPROVIDERLOADED:
       return "DPERR_SERVICEPROVIDERLOADED";
-    case DPERR_ALREADYREGISTERED: 
+    case DPERR_ALREADYREGISTERED:
       return "DPERR_ALREADYREGISTERED";
-    case DPERR_NOTREGISTERED: 
+    case DPERR_NOTREGISTERED:
       return "DPERR_NOTREGISTERED";
-    case DPERR_AUTHENTICATIONFAILED: 
+    case DPERR_AUTHENTICATIONFAILED:
       return "DPERR_AUTHENTICATIONFAILED";
-    case DPERR_CANTLOADSSPI: 
+    case DPERR_CANTLOADSSPI:
       return "DPERR_CANTLOADSSPI";
-    case DPERR_ENCRYPTIONFAILED: 
+    case DPERR_ENCRYPTIONFAILED:
       return "DPERR_ENCRYPTIONFAILED";
-    case DPERR_SIGNFAILED: 
+    case DPERR_SIGNFAILED:
       return "DPERR_SIGNFAILED";
-    case DPERR_CANTLOADSECURITYPACKAGE: 
+    case DPERR_CANTLOADSECURITYPACKAGE:
       return "DPERR_CANTLOADSECURITYPACKAGE";
-    case DPERR_ENCRYPTIONNOTSUPPORTED: 
+    case DPERR_ENCRYPTIONNOTSUPPORTED:
       return "DPERR_ENCRYPTIONNOTSUPPORTED";
-    case DPERR_CANTLOADCAPI: 
+    case DPERR_CANTLOADCAPI:
       return "DPERR_CANTLOADCAPI";
-    case DPERR_NOTLOGGEDIN: 
+    case DPERR_NOTLOGGEDIN:
       return "DPERR_NOTLOGGEDIN";
-    case DPERR_LOGONDENIED: 
+    case DPERR_LOGONDENIED:
       return "DPERR_LOGONDENIED";
     default:
       /* For errors not in the list, return HRESULT as a string
diff --git a/dlls/dplayx/dplayx_global.h b/dlls/dplayx/dplayx_global.h
index ffb1e4e..b40669b 100644
--- a/dlls/dplayx/dplayx_global.h
+++ b/dlls/dplayx/dplayx_global.h
@@ -24,18 +24,18 @@
 BOOL DPLAYX_ConstructData(void);
 BOOL DPLAYX_DestructData(void);
 
-HRESULT DPLAYX_GetConnectionSettingsA ( DWORD dwAppID, 
-                                        LPVOID lpData, 
+HRESULT DPLAYX_GetConnectionSettingsA ( DWORD dwAppID,
+                                        LPVOID lpData,
                                         LPDWORD lpdwDataSize );
-HRESULT DPLAYX_GetConnectionSettingsW ( DWORD dwAppID, 
+HRESULT DPLAYX_GetConnectionSettingsW ( DWORD dwAppID,
                                         LPVOID lpData,
                                         LPDWORD lpdwDataSize );
 
-HRESULT DPLAYX_SetConnectionSettingsA ( DWORD dwFlags, 
-                                        DWORD dwAppID, 
+HRESULT DPLAYX_SetConnectionSettingsA ( DWORD dwFlags,
+                                        DWORD dwAppID,
                                         LPDPLCONNECTION lpConn );
-HRESULT DPLAYX_SetConnectionSettingsW ( DWORD dwFlags, 
-                                        DWORD dwAppID, 
+HRESULT DPLAYX_SetConnectionSettingsW ( DWORD dwFlags,
+                                        DWORD dwAppID,
                                         LPDPLCONNECTION lpConn );
 
 BOOL DPLAYX_CreateLobbyApplication( DWORD dwAppID );
@@ -44,9 +44,9 @@
 BOOL DPLAYX_WaitForConnectionSettings( BOOL bWait );
 BOOL DPLAYX_AnyLobbiesWaitingForConnSettings(void);
 
-BOOL DPLAYX_SetLobbyHandles( DWORD dwAppID, 
+BOOL DPLAYX_SetLobbyHandles( DWORD dwAppID,
                              HANDLE hStart, HANDLE hDeath, HANDLE hConnRead );
-BOOL DPLAYX_GetThisLobbyHandles( LPHANDLE lphStart, 
+BOOL DPLAYX_GetThisLobbyHandles( LPHANDLE lphStart,
                                  LPHANDLE lphDeath,
                                  LPHANDLE lphConnRead, BOOL bClearSetHandles );
 
diff --git a/dlls/dplayx/dplayx_main.c b/dlls/dplayx/dplayx_main.c
index 8eb8e7d..ac8a34e 100644
--- a/dlls/dplayx/dplayx_main.c
+++ b/dlls/dplayx/dplayx_main.c
@@ -1,7 +1,7 @@
-/* 
+/*
  * DPLAYX.DLL LibMain
  *
- * Copyright 1999,2000 - Peter Hunnisett 
+ * Copyright 1999,2000 - Peter Hunnisett
  *
  * contact <hunnise@nortelnetworks.com>
  *
@@ -35,20 +35,20 @@
 
   TRACE( "(%u,0x%08lx,%p)\n", hinstDLL, fdwReason, lpvReserved );
 
-  switch ( fdwReason ) 
+  switch ( fdwReason )
   {
     case DLL_PROCESS_ATTACH:
-        /* First instance perform construction of global processor data */ 
+        /* First instance perform construction of global processor data */
         return DPLAYX_ConstructData();
 
     case DLL_PROCESS_DETACH:
         /* Last instance performs destruction of global processor data */
-        return DPLAYX_DestructData(); 
+        return DPLAYX_DestructData();
 
     case DLL_THREAD_ATTACH: /* Do nothing */
     case DLL_THREAD_DETACH: /* Do nothing */
       break;
-    default:                
+    default:
       break;
 
   }
@@ -63,12 +63,12 @@
 {
   HRESULT hr = ( gdwDPlaySPRefCount > 0 ) ? S_FALSE : S_OK;
 
-  /* FIXME: Should I be putting a check in for class factory objects 
+  /* FIXME: Should I be putting a check in for class factory objects
    *        as well
    */
 
   TRACE( ": returning 0x%08lx\n", hr );
- 
+
   return hr;
 }
 
diff --git a/dlls/dplayx/dplayx_messages.c b/dlls/dplayx/dplayx_messages.c
index 43fd09e..f1684c7 100644
--- a/dlls/dplayx/dplayx_messages.c
+++ b/dlls/dplayx/dplayx_messages.c
@@ -37,13 +37,13 @@
 typedef struct tagMSGTHREADINFO
 {
   HANDLE hStart;
-  HANDLE hDeath; 
+  HANDLE hDeath;
   HANDLE hSettingRead;
-  HANDLE hNotifyEvent; 
+  HANDLE hNotifyEvent;
 } MSGTHREADINFO, *LPMSGTHREADINFO;
 
 static DWORD CALLBACK DPL_MSG_ThreadMain( LPVOID lpContext );
-static LPVOID DP_MSG_ExpectReply( IDirectPlay2AImpl* This, LPDPSP_SENDDATA data, 
+static LPVOID DP_MSG_ExpectReply( IDirectPlay2AImpl* This, LPDPSP_SENDDATA data,
                                   DWORD dwWaitTime, WORD wReplyCommandId,
                                   LPVOID* lplpReplyMsg, LPDWORD lpdwMsgBodySize );
 
@@ -51,7 +51,7 @@
 /* Create the message reception thread to allow the application to receive
  * asynchronous message reception
  */
-DWORD CreateLobbyMessageReceptionThread( HANDLE hNotifyEvent, HANDLE hStart, 
+DWORD CreateLobbyMessageReceptionThread( HANDLE hNotifyEvent, HANDLE hStart,
                                          HANDLE hDeath, HANDLE hConnRead )
 {
   DWORD           dwMsgThreadId;
@@ -65,8 +65,8 @@
 
   /* The notify event may or may not exist. Depends if async comm or not */
   if( hNotifyEvent &&
-      !DuplicateHandle( GetCurrentProcess(), hNotifyEvent, 
-                        GetCurrentProcess(), &lpThreadInfo->hNotifyEvent, 
+      !DuplicateHandle( GetCurrentProcess(), hNotifyEvent,
+                        GetCurrentProcess(), &lpThreadInfo->hNotifyEvent,
                         0, FALSE, DUPLICATE_SAME_ACCESS ) )
   {
     ERR( "Unable to duplicate event handle\n" );
@@ -75,14 +75,14 @@
 
   /* These 3 handles don't need to be duplicated because we don't keep a
    * reference to them where they're created. They're created specifically
-   * for the message thread 
+   * for the message thread
    */
   lpThreadInfo->hStart       = hStart;
   lpThreadInfo->hDeath       = hDeath;
   lpThreadInfo->hSettingRead = hConnRead;
 
   if( !CreateThread( NULL,                  /* Security attribs */
-                     0,                     /* Stack */ 
+                     0,                     /* Stack */
                      DPL_MSG_ThreadMain,    /* Msg reception function */
                      lpThreadInfo,          /* Msg reception func parameter */
                      0,                     /* Flags */
@@ -96,7 +96,7 @@
 
   /* FIXME: Should I be closing the handle to the thread or does that
             terminate the thread? */
- 
+
   return dwMsgThreadId;
 
 error:
@@ -110,7 +110,7 @@
 {
   LPMSGTHREADINFO lpThreadInfo = (LPMSGTHREADINFO)lpContext;
   DWORD dwWaitResult;
- 
+
   TRACE( "Msg thread created. Waiting on app startup\n" );
 
   /* Wait to ensure that the lobby application is started w/ 1 min timeout */
@@ -153,7 +153,7 @@
 
 /* DP messageing stuff */
 static HANDLE DP_MSG_BuildAndLinkReplyStruct( IDirectPlay2Impl* This,
-                                              LPDP_MSG_REPLY_STRUCT_LIST lpReplyStructList, 
+                                              LPDP_MSG_REPLY_STRUCT_LIST lpReplyStructList,
                                               WORD wReplyCommandId );
 static LPVOID DP_MSG_CleanReplyStruct( LPDP_MSG_REPLY_STRUCT_LIST lpReplyStructList,
                                        LPVOID* lplpReplyMsg, LPDWORD lpdwMsgBodySize );
@@ -200,7 +200,7 @@
 
   lpMsg = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, dwMsgSize );
 
-  lpMsgBody = (LPDPMSG_REQUESTNEWPLAYERID)( (BYTE*)lpMsg + 
+  lpMsgBody = (LPDPMSG_REQUESTNEWPLAYERID)( (BYTE*)lpMsg +
                                              This->dp2->spData.dwSPHeaderSize );
 
   /* Compose dplay message envelope */
@@ -223,33 +223,33 @@
     data.bSystemMessage = TRUE; /* Allow reply to be sent */
     data.lpISP          = This->dp2->spData.lpISP;
 
-    TRACE( "Asking for player id w/ dwFlags 0x%08lx\n", 
+    TRACE( "Asking for player id w/ dwFlags 0x%08lx\n",
            lpMsgBody->dwFlags );
 
-    DP_MSG_ExpectReply( This, &data, DPMSG_DEFAULT_WAIT_TIME, DPMSGCMD_NEWPLAYERIDREPLY, 
+    DP_MSG_ExpectReply( This, &data, DPMSG_DEFAULT_WAIT_TIME, DPMSGCMD_NEWPLAYERIDREPLY,
                         &lpMsg, &dwMsgSize );
   }
 
   /* Need to examine the data and extract the new player id */
   if( !FAILED(hr) )
   {
-    LPCDPMSG_NEWPLAYERIDREPLY lpcReply; 
+    LPCDPMSG_NEWPLAYERIDREPLY lpcReply;
 
     lpcReply = (LPCDPMSG_NEWPLAYERIDREPLY)lpMsg;
 
-    *lpdpidAllocatedId = lpcReply->dpidNewPlayerId;   
+    *lpdpidAllocatedId = lpcReply->dpidNewPlayerId;
 
     TRACE( "Received reply for id = 0x%08lx\n", lpcReply->dpidNewPlayerId );
 
     /* FIXME: I think that the rest of the message has something to do
      *        with remote data for the player that perhaps I need to setup.
      *        However, with the information that is passed, all that it could
-     *        be used for is a standardized intialization value, which I'm 
+     *        be used for is a standardized intialization value, which I'm
      *        guessing we can do without. Unless the message content is the same
      *        for several different messages?
      */
 
-    HeapFree( GetProcessHeap(), 0, lpMsg ); 
+    HeapFree( GetProcessHeap(), 0, lpMsg );
   }
 
   return hr;
@@ -278,14 +278,14 @@
   {
     LPBYTE lpPData;
     DWORD  dwDataSize;
-    
+
     /* SP Player remote data needs to be propagated at some point - is this the point? */
     IDirectPlaySP_GetSPPlayerData( This->dp2->spData.lpISP, 0, (LPVOID*)&lpPData, &dwDataSize, DPSET_REMOTE );
-    
+
     ERR( "Player Data size is 0x%08lx\n"
          "[%02x%02x %02x%02x %02x%02x %02x%02x %02x%02x %02x%02x %02x%02x %02x%02x]\n"
-         "[%02x%02x %02x%02x %02x%02x %02x%02x %02x%02x %02x%02x %02x%02x %02x%02x]\n", 
- 
+         "[%02x%02x %02x%02x %02x%02x %02x%02x %02x%02x %02x%02x %02x%02x %02x%02x]\n",
+
 	 dwDataSize,
          lpPData[0], lpPData[1], lpPData[2], lpPData[3], lpPData[4],
 	 lpPData[5], lpPData[6], lpPData[7], lpPData[8], lpPData[9],
@@ -293,7 +293,7 @@
 	 lpPData[15], lpPData[16], lpPData[17], lpPData[18], lpPData[19],
          lpPData[20], lpPData[21], lpPData[22], lpPData[23], lpPData[24],
 	 lpPData[25], lpPData[26], lpPData[27], lpPData[28], lpPData[29],
-         lpPData[30], lpPData[31]	 	 
+         lpPData[30], lpPData[31]
         );
     DebugBreak();
   }
@@ -313,9 +313,9 @@
   lpMsgBody->unknown3[0] = 0x20;
   lpMsgBody->unknown3[0] = 0x0;
   lpMsgBody->unknown3[0] = 0x0;
-  
+
   lpMsgBody->dpidAppServer3 = dpidServer;
-  lpMsgBody->unknown4[0] =  0x30; 
+  lpMsgBody->unknown4[0] =  0x30;
   lpMsgBody->unknown4[1] =  0xb;
   lpMsgBody->unknown4[2] =  0x0;
 
@@ -357,8 +357,8 @@
 
     TRACE( "Sending forward player request with 0x%08lx\n", dpidServer );
 
-    lpMsg = DP_MSG_ExpectReply( This, &data, 
-                                DPMSG_WAIT_60_SECS, 
+    lpMsg = DP_MSG_ExpectReply( This, &data,
+                                DPMSG_WAIT_60_SECS,
                                 DPMSGCMD_GETNAMETABLEREPLY,
                                 &lpMsg, &dwMsgSize );
   }
@@ -379,7 +379,7 @@
  * a networking company.
  */
 static
-LPVOID DP_MSG_ExpectReply( IDirectPlay2AImpl* This, LPDPSP_SENDDATA lpData, 
+LPVOID DP_MSG_ExpectReply( IDirectPlay2AImpl* This, LPDPSP_SENDDATA lpData,
                            DWORD dwWaitTime, WORD wReplyCommandId,
                            LPVOID* lplpReplyMsg, LPDWORD lpdwMsgBodySize )
 {
@@ -387,12 +387,12 @@
   HANDLE                   hMsgReceipt;
   DP_MSG_REPLY_STRUCT_LIST replyStructList;
   DWORD                    dwWaitReturn;
- 
+
   /* Setup for receipt */
-  hMsgReceipt = DP_MSG_BuildAndLinkReplyStruct( This, &replyStructList, 
+  hMsgReceipt = DP_MSG_BuildAndLinkReplyStruct( This, &replyStructList,
                                                 wReplyCommandId );
 
-  TRACE( "Sending msg and expecting cmd %u in reply within %lu ticks\n", 
+  TRACE( "Sending msg and expecting cmd %u in reply within %lu ticks\n",
          wReplyCommandId, dwWaitTime );
   hr = (*This->dp2->spData.lpCB->Send)( lpData );
 
@@ -420,7 +420,7 @@
  * all important data. It is quite silly to have to copy the message, but the documents
  * indicate that a copy is taken. Silly really.
  */
-void DP_MSG_ReplyReceived( IDirectPlay2AImpl* This, WORD wCommandId, 
+void DP_MSG_ReplyReceived( IDirectPlay2AImpl* This, WORD wCommandId,
                            LPCVOID lpcMsgBody, DWORD dwMsgBodySize )
 {
   LPDP_MSG_REPLY_STRUCT_LIST lpReplyList;
@@ -432,21 +432,21 @@
   }
 #endif
 
-  /* Find, and immediately remove (to avoid double triggering), the appropriate entry. Call locked to 
+  /* Find, and immediately remove (to avoid double triggering), the appropriate entry. Call locked to
    * avoid problems.
    */
   EnterCriticalSection( &This->unk->DP_lock );
     DPQ_REMOVE_ENTRY( This->dp2->replysExpected, replysExpected, replyExpected.wExpectedReply,\
                      ==, wCommandId, lpReplyList );
-  LeaveCriticalSection( &This->unk->DP_lock );  
+  LeaveCriticalSection( &This->unk->DP_lock );
 
   if( lpReplyList != NULL )
   {
-    lpReplyList->replyExpected.dwMsgBodySize = dwMsgBodySize; 
+    lpReplyList->replyExpected.dwMsgBodySize = dwMsgBodySize;
     lpReplyList->replyExpected.lpReplyMsg = HeapAlloc( GetProcessHeap(),
                                                        HEAP_ZERO_MEMORY,
                                                        dwMsgBodySize );
-    CopyMemory( lpReplyList->replyExpected.lpReplyMsg, 
+    CopyMemory( lpReplyList->replyExpected.lpReplyMsg,
                 lpcMsgBody, dwMsgBodySize );
 
     /* Signal the thread which sent the message that it has a reply */
@@ -503,7 +503,7 @@
 
   lpcErrorMsg = (LPCDPMSG_FORWARDADDPLAYERNACK)lpMsgBody;
 
-  ERR( "Received error message %u. Error is %s\n", 
+  ERR( "Received error message %u. Error is %s\n",
        wCommandId, DPLAYX_HresultToString( lpcErrorMsg->errorCode) );
   DebugBreak();
 }
diff --git a/dlls/dplayx/dplayx_messages.h b/dlls/dplayx/dplayx_messages.h
index 6351188..015f1c0 100644
--- a/dlls/dplayx/dplayx_messages.h
+++ b/dlls/dplayx/dplayx_messages.h
@@ -25,14 +25,14 @@
 
 #include "dplay_global.h"
 
-DWORD CreateLobbyMessageReceptionThread( HANDLE hNotifyEvent, HANDLE hStart, 
+DWORD CreateLobbyMessageReceptionThread( HANDLE hNotifyEvent, HANDLE hStart,
                                          HANDLE hDeath, HANDLE hConnRead );
 
 HRESULT DP_MSG_SendRequestPlayerId( IDirectPlay2AImpl* This, DWORD dwFlags,
                                     LPDPID lpdipidAllocatedId );
 HRESULT DP_MSG_ForwardPlayerCreation( IDirectPlay2AImpl* This, DPID dpidServer );
 
-void DP_MSG_ReplyReceived( IDirectPlay2AImpl* This, WORD wCommandId, 
+void DP_MSG_ReplyReceived( IDirectPlay2AImpl* This, WORD wCommandId,
                            LPCVOID lpMsgBody, DWORD dwMsgBodySize );
 void DP_MSG_ErrorReceived( IDirectPlay2AImpl* This, WORD wCommandId,
                            LPCVOID lpMsgBody, DWORD dwMsgBodySize );
@@ -55,9 +55,9 @@
 #define DPMSGCMD_REQUESTNEWPLAYERID   5
 
 #define DPMSGCMD_NEWPLAYERIDREPLY     7
-#define DPMSGCMD_CREATESESSION        8 /* Might be a create nameserver or new player msg */ 
+#define DPMSGCMD_CREATESESSION        8 /* Might be a create nameserver or new player msg */
 #define DPMSGCMD_CREATENEWPLAYER      9
-#define DPMSGCMD_SYSTEMMESSAGE        10 
+#define DPMSGCMD_SYSTEMMESSAGE        10
 #define DPMSGCMD_DELETEPLAYER         11
 #define DPMSGCMD_DELETEGROUP          12
 
@@ -93,7 +93,7 @@
 typedef const DPMSG_SENDENVELOPE* LPCDPMSG_SENDENVELOPE;
 
 /* System messages exchanged between players seems to have this
- * payload envelope on top of the basic envelope 
+ * payload envelope on top of the basic envelope
  */
 typedef struct tagDPMSG_SYSMSGENVELOPE
 {
@@ -205,7 +205,7 @@
 } DPMSG_FORWARDADDPLAYER, *LPDPMSG_FORWARDADDPLAYER;
 typedef const DPMSG_FORWARDADDPLAYER* LPCDPMSG_FORWARDADDPLAYER;
 
-/* This is an error message that can be received. Not sure if this is 
+/* This is an error message that can be received. Not sure if this is
  * specifically for a forward add player or for all errors
  */
 typedef struct tagDPMSG_FORWARDADDPLAYERNACK
diff --git a/dlls/dplayx/dplayx_queue.h b/dlls/dplayx/dplayx_queue.h
index 12c1f68..7e5cbf3 100644
--- a/dlls/dplayx/dplayx_queue.h
+++ b/dlls/dplayx/dplayx_queue.h
@@ -1,5 +1,5 @@
 /* A queue definition based on sys/queue.h TAILQ definitions
- * 
+ *
  * Copyright 2000 Peter Hunnisett
  *
  * This library is free software; you can redistribute it and/or
@@ -52,7 +52,7 @@
 #define DPQ_FIRST( head ) ( (head).lpQHFirst )
 
 /* Check if the queue has any elements */
-#define DPQ_IS_EMPTY( head ) ( DPQ_FIRST(head) == NULL ) 
+#define DPQ_IS_EMPTY( head ) ( DPQ_FIRST(head) == NULL )
 
 /* Next entry -- FIXME: Convert everything over to this macro ... */
 #define DPQ_NEXT( elem ) (elem).lpQNext
@@ -85,7 +85,7 @@
  * field - to be concatenated to rc to compare with fieldToCompare
  * fieldToCompare - The value that we're comparing against
  * fieldCompareOperator - The logical operator to compare field and
- *                        fieldToCompare. 
+ *                        fieldToCompare.
  * rc - Variable to put the return code. Same type as (head).lpQHFirst
  */
 #define DPQ_FIND_ENTRY( head, elm, field, fieldCompareOperator, fieldToCompare, rc )\
@@ -114,7 +114,7 @@
  * field - to be concatenated to rc to compare with fieldToCompare
  * fieldToCompare - The value that we're comparing against
  * compare_cb - Callback to invoke to determine if comparision should continue.
- *              Callback must be defined with DPQ_DECL_COMPARECB. 
+ *              Callback must be defined with DPQ_DECL_COMPARECB.
  * rc - Variable to put the return code. Same type as (head).lpQHFirst
  */
 #define DPQ_FIND_ENTRY_CB( head, elm, field, compare_cb, fieldToCompare, rc )\
@@ -181,7 +181,7 @@
 } while(0)
 
 
-/* Delete the entire queue 
+/* Delete the entire queue
  * head - pointer to the head of the queue
  * field - field to access the next elements of the queue
  * type - type of the pointer to the element element
diff --git a/dlls/dplayx/dplobby.c b/dlls/dplayx/dplobby.c
index ebb2081..04760bc 100644
--- a/dlls/dplayx/dplobby.c
+++ b/dlls/dplayx/dplobby.c
@@ -47,7 +47,7 @@
 HRESULT DPL_CreateCompoundAddress ( LPCDPCOMPOUNDADDRESSELEMENT lpElements, DWORD dwElementCount,
                                     LPVOID lpAddress, LPDWORD lpdwAddressSize, BOOL bAnsiInterface );
 
-HRESULT DPL_CreateAddress( REFGUID guidSP, REFGUID guidDataType, LPCVOID lpData, DWORD dwDataSize, 
+HRESULT DPL_CreateAddress( REFGUID guidSP, REFGUID guidDataType, LPCVOID lpData, DWORD dwDataSize,
                            LPVOID lpAddress, LPDWORD lpdwAddressSize, BOOL bAnsiInterface );
 
 
@@ -55,8 +55,8 @@
 extern HRESULT DPL_EnumAddress( LPDPENUMADDRESSCALLBACK lpEnumAddressCallback, LPCVOID lpAddress,
                                 DWORD dwAddressSize, LPVOID lpContext );
 
-static HRESULT WINAPI DPL_ConnectEx( IDirectPlayLobbyAImpl* This, 
-                                     DWORD dwFlags, REFIID riid, 
+static HRESULT WINAPI DPL_ConnectEx( IDirectPlayLobbyAImpl* This,
+                                     DWORD dwFlags, REFIID riid,
                                      LPVOID* lplpDP, IUnknown* pUnk );
 
 BOOL DPL_CreateAndSetLobbyHandles( DWORD dwDestProcessId, HANDLE hDestProcess,
@@ -66,10 +66,10 @@
 
 /*****************************************************************************
  * IDirectPlayLobby {1,2,3} implementation structure
- * 
- * The philosophy behind this extra pointer derefernce is that I wanted to 
+ *
+ * The philosophy behind this extra pointer derefernce is that I wanted to
  * have the same structure for all types of objects without having to do
- * alot of casting. I also only wanted to implement an interface in the 
+ * alot of casting. I also only wanted to implement an interface in the
  * object it was "released" with IUnknown interface being implemented in the 1 version.
  * Of course, with these new interfaces comes the data required to keep the state required
  * by these interfaces. So, basically, the pointers contain the data associated with
@@ -144,15 +144,15 @@
 
 
 
-static BOOL DPL_CreateIUnknown( LPVOID lpDPL ) 
+static BOOL DPL_CreateIUnknown( LPVOID lpDPL )
 {
   ICOM_THIS(IDirectPlayLobbyAImpl,lpDPL);
 
-  This->unk = (DirectPlayLobbyIUnknownData*)HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, 
-                                                       sizeof( *(This->unk) ) ); 
+  This->unk = (DirectPlayLobbyIUnknownData*)HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY,
+                                                       sizeof( *(This->unk) ) );
   if ( This->unk == NULL )
   {
-    return FALSE; 
+    return FALSE;
   }
 
   InitializeCriticalSection( &This->unk->DPL_lock );
@@ -181,9 +181,9 @@
     return FALSE;
   }
 
-  DPQ_INIT( This->dpl->msgs ); 
+  DPQ_INIT( This->dpl->msgs );
 
-  return TRUE;  
+  return TRUE;
 }
 
 static BOOL DPL_DestroyLobby1( LPVOID lpDPL )
@@ -273,7 +273,7 @@
  *    successfully for a third interface, a query for the first interface
  *    through the pointer for the third interface must succeed.
  */
-extern 
+extern
 HRESULT DPL_CreateInterface
          ( REFIID riid, LPVOID* ppvObj )
 {
@@ -325,14 +325,14 @@
 
     return E_NOINTERFACE;
   }
-  
+
   /* Initialize it */
   if ( DPL_CreateIUnknown( *ppvObj ) &&
        DPL_CreateLobby1( *ppvObj ) &&
        DPL_CreateLobby2( *ppvObj ) &&
        DPL_CreateLobby3( *ppvObj )
      )
-  { 
+  {
     IDirectPlayLobby_AddRef( (LPDIRECTPLAYLOBBY)*ppvObj );
     return S_OK;
   }
@@ -411,7 +411,7 @@
   return S_OK;
 }
 
-/* 
+/*
  * Simple procedure. Just increment the reference count to this
  * structure and return the new reference count.
  */
@@ -466,7 +466,7 @@
 
 
 /********************************************************************
- * 
+ *
  * Connects an application to the session specified by the DPLCONNECTION
  * structure currently stored with the DirectPlayLobby object.
  *
@@ -474,9 +474,9 @@
  *
  */
 static HRESULT WINAPI DPL_ConnectEx
-( IDirectPlayLobbyAImpl* This, 
+( IDirectPlayLobbyAImpl* This,
   DWORD     dwFlags,
-  REFIID    riid, 
+  REFIID    riid,
   LPVOID*   lplpDP,
   IUnknown* pUnk)
 {
@@ -501,19 +501,19 @@
   /* Create the DirectPlay interface */
   if( ( hr = DP_CreateInterface( riid, lplpDP ) ) != DP_OK )
   {
-     ERR( "error creating interface for %s:%s.\n", 
+     ERR( "error creating interface for %s:%s.\n",
           debugstr_guid( riid ), DPLAYX_HresultToString( hr ) );
      return hr;
   }
 
   /* FIXME: Is it safe/correct to use appID of 0? */
-  hr = IDirectPlayLobby_GetConnectionSettings( (LPDIRECTPLAYLOBBY)This, 
-                                               0, NULL, &dwConnSize ); 
+  hr = IDirectPlayLobby_GetConnectionSettings( (LPDIRECTPLAYLOBBY)This,
+                                               0, NULL, &dwConnSize );
   if( hr != DPERR_BUFFERTOOSMALL )
   {
     return hr;
   }
- 
+
   lpConn = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, dwConnSize );
 
   if( lpConn == NULL )
@@ -522,7 +522,7 @@
   }
 
   /* FIXME: Is it safe/correct to use appID of 0? */
-  hr = IDirectPlayLobby_GetConnectionSettings( (LPDIRECTPLAYLOBBY)This, 
+  hr = IDirectPlayLobby_GetConnectionSettings( (LPDIRECTPLAYLOBBY)This,
                                                0, lpConn, &dwConnSize );
   if( FAILED( hr ) )
   {
@@ -538,7 +538,7 @@
   /* Now initialize the Service Provider */
   hr = IDirectPlayX_InitializeConnection( (*(LPDIRECTPLAY2*)lplpDP),
 #endif
-                                          
+
 
   /* Setup flags to pass into DirectPlay::Open */
   if( dwFlags & DPCONNECT_RETURNSTATUS )
@@ -547,7 +547,7 @@
   }
   dwOpenFlags |= lpConn->dwFlags;
 
-  hr = IDirectPlayX_Open( (*(LPDIRECTPLAY2*)lplpDP), lpConn->lpSessionDesc, 
+  hr = IDirectPlayX_Open( (*(LPDIRECTPLAY2*)lplpDP), lpConn->lpSessionDesc,
                           dwOpenFlags );
 
   HeapFree( GetProcessHeap(), 0, lpConn );
@@ -562,7 +562,7 @@
   IUnknown* pUnk)
 {
   ICOM_THIS(IDirectPlayLobbyAImpl,iface);
-  return DPL_ConnectEx( This, dwFlags, &IID_IDirectPlay2A, 
+  return DPL_ConnectEx( This, dwFlags, &IID_IDirectPlay2A,
                         (LPVOID)lplpDP, pUnk );
 }
 
@@ -573,14 +573,14 @@
   IUnknown* pUnk)
 {
   ICOM_THIS(IDirectPlayLobbyAImpl,iface); /* Yes cast to A */
-  return DPL_ConnectEx( This, dwFlags, &IID_IDirectPlay2, 
+  return DPL_ConnectEx( This, dwFlags, &IID_IDirectPlay2,
                         (LPVOID)lplpDP, pUnk );
 }
 
 /********************************************************************
  *
  * Creates a DirectPlay Address, given a service provider-specific network
- * address. 
+ * address.
  * Returns an address contains the globally unique identifier
  * (GUID) of the service provider and data that the service provider can
  * interpret as a network address.
@@ -592,13 +592,13 @@
 ( LPDIRECTPLAYLOBBYA iface,
   REFGUID guidSP,
   REFGUID guidDataType,
-  LPCVOID lpData, 
+  LPCVOID lpData,
   DWORD dwDataSize,
-  LPVOID lpAddress, 
+  LPVOID lpAddress,
   LPDWORD lpdwAddressSize )
 {
-  return DPL_CreateAddress( guidSP, guidDataType, lpData, dwDataSize, 
-                            lpAddress, lpdwAddressSize, TRUE ); 
+  return DPL_CreateAddress( guidSP, guidDataType, lpData, dwDataSize,
+                            lpAddress, lpdwAddressSize, TRUE );
 }
 
 static HRESULT WINAPI IDirectPlayLobbyWImpl_CreateAddress
@@ -626,7 +626,7 @@
   const DWORD dwNumAddElements = 2; /* Service Provide & address data type */
   DPCOMPOUNDADDRESSELEMENT addressElements[ 2 /* dwNumAddElements */ ];
 
-  TRACE( "(%p)->(%p,%p,0x%08lx,%p,%p,%d)\n", guidSP, guidDataType, lpData, dwDataSize, 
+  TRACE( "(%p)->(%p,%p,0x%08lx,%p,%p,%d)\n", guidSP, guidDataType, lpData, dwDataSize,
                                              lpAddress, lpdwAddressSize, bAnsiInterface );
 
   addressElements[ 0 ].guidDataType = DPAID_ServiceProvider;
@@ -660,12 +660,12 @@
 {
   ICOM_THIS(IDirectPlayLobbyAImpl,iface);
 
-  TRACE("(%p)->(%p,%p,0x%08lx,%p)\n", This, lpEnumAddressCallback, lpAddress, 
+  TRACE("(%p)->(%p,%p,0x%08lx,%p)\n", This, lpEnumAddressCallback, lpAddress,
                                       dwAddressSize, lpContext );
 
   return DPL_EnumAddress( lpEnumAddressCallback, lpAddress, dwAddressSize, lpContext );
 }
-  
+
 static HRESULT WINAPI IDirectPlayLobbyWImpl_EnumAddress
 ( LPDIRECTPLAYLOBBY iface,
   LPDPENUMADDRESSCALLBACK lpEnumAddressCallback,
@@ -675,7 +675,7 @@
 {
   ICOM_THIS(IDirectPlayLobbyWImpl,iface);
 
-  TRACE("(%p)->(%p,%p,0x%08lx,%p)\n", This, lpEnumAddressCallback, lpAddress,     
+  TRACE("(%p)->(%p,%p,0x%08lx,%p)\n", This, lpEnumAddressCallback, lpAddress,
                                       dwAddressSize, lpContext );
 
   return DPL_EnumAddress( lpEnumAddressCallback, lpAddress, dwAddressSize, lpContext );
@@ -683,20 +683,20 @@
 
 extern HRESULT DPL_EnumAddress( LPDPENUMADDRESSCALLBACK lpEnumAddressCallback, LPCVOID lpAddress,
                                 DWORD dwAddressSize, LPVOID lpContext )
-{ 
+{
   DWORD dwTotalSizeEnumerated = 0;
 
-  /* FIXME: First chunk is always the total size chunk - Should we report it? */ 
+  /* FIXME: First chunk is always the total size chunk - Should we report it? */
 
   while ( dwTotalSizeEnumerated < dwAddressSize )
   {
     LPDPADDRESS lpElements = (LPDPADDRESS)lpAddress;
-    DWORD dwSizeThisEnumeration; 
+    DWORD dwSizeThisEnumeration;
 
     /* Invoke the enum method. If false is returned, stop enumeration */
-    if ( !lpEnumAddressCallback( &lpElements->guidDataType, 
-                                 lpElements->dwDataSize, 
-                                 (BYTE*)lpElements + sizeof( DPADDRESS ), 
+    if ( !lpEnumAddressCallback( &lpElements->guidDataType,
+                                 lpElements->dwDataSize,
+                                 (BYTE*)lpElements + sizeof( DPADDRESS ),
                                  lpContext ) )
     {
       break;
@@ -825,7 +825,7 @@
         MultiByteToWideChar( CP_ACP, 0, atSubKey, -1, buff, sizeof(buff)/sizeof(WCHAR) );
         CLSIDFromString( (LPCOLESTR)buff, &serviceProviderGUID );
         /* FIXME: Have I got a memory leak on the serviceProviderGUID? */
-    
+
         /* The enumeration will return FALSE if we are not to continue */
         if( !lpEnumAddressTypeCallback( &serviceProviderGUID, lpContext, 0 ) )
         {
@@ -837,7 +837,7 @@
 
       /* We only enumerate address types for 1 GUID. We've found it, so quit looking */
       break;
-    } 
+    }
 
   return DP_OK;
 }
@@ -946,10 +946,10 @@
 
     dplAppInfo.dwSize               = sizeof( dplAppInfo );
     dplAppInfo.guidApplication      = serviceProviderGUID;
-    dplAppInfo.u.lpszAppNameA = subKeyName; 
+    dplAppInfo.u.lpszAppNameA = subKeyName;
 
     EnterCriticalSection( &This->unk->DPL_lock );
- 
+
     memcpy( &This->dpl->hkCallbackKeyHack, &hkServiceProvider, sizeof( hkServiceProvider ) );
 
     if( !lpEnumLocalAppCallback( &dplAppInfo, lpContext, dwFlags ) )
@@ -981,14 +981,14 @@
   LPDWORD lpdwDataSize )
 {
   ICOM_THIS(IDirectPlayLobbyAImpl,iface);
-  HRESULT hr; 
+  HRESULT hr;
 
   TRACE("(%p)->(0x%08lx,%p,%p)\n", This, dwAppID, lpData, lpdwDataSize );
 
   EnterCriticalSection( &This->unk->DPL_lock );
 
-  hr = DPLAYX_GetConnectionSettingsA( dwAppID, 
-                                      lpData, 
+  hr = DPLAYX_GetConnectionSettingsA( dwAppID,
+                                      lpData,
                                       lpdwDataSize
                                     );
 
@@ -1007,11 +1007,11 @@
   HRESULT hr;
 
   TRACE("(%p)->(0x%08lx,%p,%p)\n", This, dwAppID, lpData, lpdwDataSize );
- 
+
   EnterCriticalSection( &This->unk->DPL_lock );
 
-  hr = DPLAYX_GetConnectionSettingsW( dwAppID, 
-                                      lpData, 
+  hr = DPLAYX_GetConnectionSettingsW( dwAppID,
+                                      lpData,
                                       lpdwDataSize
                                     );
 
@@ -1022,7 +1022,7 @@
 
 /********************************************************************
  *
- * Retrieves the message sent between a lobby client and a DirectPlay 
+ * Retrieves the message sent between a lobby client and a DirectPlay
  * application. All messages are queued until received.
  *
  */
@@ -1078,14 +1078,14 @@
     char  returnBuffer[200];
     DWORD returnType, sizeOfReturnBuffer;
     LPSTR clSubKey   = "CommandLine";
-    LPSTR cdSubKey   = "CurrentDirectory";  
+    LPSTR cdSubKey   = "CurrentDirectory";
     LPSTR fileSubKey = "File";
     LPSTR pathSubKey = "Path";
 
-    /* FIXME: Lazy man hack - dplay struct has the present reg key saved */ 
+    /* FIXME: Lazy man hack - dplay struct has the present reg key saved */
 
     sizeOfReturnBuffer = 200;
-    
+
     /* Get all the appropriate data from the registry */
     if( RegQueryValueExA( lpData->This->dpl->hkCallbackKeyHack, clSubKey,
                           NULL, &returnType, returnBuffer,
@@ -1144,11 +1144,11 @@
     return FALSE; /* No need to keep going as we found what we wanted */
   }
 
-  return TRUE; /* Keep enumerating, haven't found the application yet */ 
+  return TRUE; /* Keep enumerating, haven't found the application yet */
 }
 
 BOOL DPL_CreateAndSetLobbyHandles( DWORD dwDestProcessId, HANDLE hDestProcess,
-                                   LPHANDLE lphStart, LPHANDLE lphDeath, 
+                                   LPHANDLE lphStart, LPHANDLE lphDeath,
                                    LPHANDLE lphRead )
 {
   /* These are the handles for the created process */
@@ -1169,14 +1169,14 @@
   hTemp = CreateEventA( &s_attrib, TRUE, FALSE, NULL );
   *lphRead  = ConvertToGlobalHandle( hTemp );
 
-  if( ( !DuplicateHandle( GetCurrentProcess(), *lphStart, 
-                          hDestProcess, &hAppStart, 
+  if( ( !DuplicateHandle( GetCurrentProcess(), *lphStart,
+                          hDestProcess, &hAppStart,
                           0, FALSE, DUPLICATE_SAME_ACCESS ) ) ||
-      ( !DuplicateHandle( GetCurrentProcess(), *lphDeath, 
-                          hDestProcess, &hAppDeath, 
+      ( !DuplicateHandle( GetCurrentProcess(), *lphDeath,
+                          hDestProcess, &hAppDeath,
                           0, FALSE, DUPLICATE_SAME_ACCESS ) ) ||
-      ( !DuplicateHandle( GetCurrentProcess(), *lphRead, 
-                          hDestProcess, &hAppRead, 
+      ( !DuplicateHandle( GetCurrentProcess(), *lphRead,
+                          hDestProcess, &hAppRead,
                           0, FALSE, DUPLICATE_SAME_ACCESS ) )
     )
   {
@@ -1185,10 +1185,10 @@
     return FALSE;
   }
 
-  if( !DPLAYX_SetLobbyHandles( dwDestProcessId, 
+  if( !DPLAYX_SetLobbyHandles( dwDestProcessId,
                                hAppStart, hAppDeath, hAppRead ) )
   {
-    return FALSE; 
+    return FALSE;
   }
 
   return TRUE;
@@ -1218,7 +1218,7 @@
   DWORD dwSuspendCount;
   HANDLE hStart, hDeath, hSettingRead;
 
-  TRACE( "(%p)->(0x%08lx,%p,%p,%x)\n", 
+  TRACE( "(%p)->(0x%08lx,%p,%p,%x)\n",
          This, dwFlags, lpdwAppID, lpConn, hReceiveEvent );
 
   if( dwFlags != 0 )
@@ -1237,7 +1237,7 @@
   enumData.This    = This;
   enumData.appGUID = lpConn->lpSessionDesc->guidApplication;
 
-  /* Our callback function will fill up the enumData structure with all the information 
+  /* Our callback function will fill up the enumData structure with all the information
      required to start a new process */
   IDirectPlayLobby_EnumLocalApplications( iface, RunApplicationA_EnumLocalApplications,
                                           (LPVOID)(&enumData), 0 );
@@ -1245,13 +1245,13 @@
   /* First the application name */
   strcpy( temp, enumData.lpszPath );
   strcat( temp, "\\" );
-  strcat( temp, enumData.lpszFileName ); 
-  HeapFree( GetProcessHeap(), 0, enumData.lpszPath );   
+  strcat( temp, enumData.lpszFileName );
+  HeapFree( GetProcessHeap(), 0, enumData.lpszPath );
   HeapFree( GetProcessHeap(), 0, enumData.lpszFileName );
   if ((appName = HeapAlloc( GetProcessHeap(), 0, strlen(temp)+1 ))) strcpy( appName, temp );
 
   /* Now the command line */
-  strcat( temp, " " ); 
+  strcat( temp, " " );
   strcat( temp, enumData.lpszCommandLine );
   HeapFree( GetProcessHeap(), 0, enumData.lpszCommandLine );
   if ((enumData.lpszCommandLine = HeapAlloc( GetProcessHeap(), 0, strlen(temp)+1 )))
@@ -1282,8 +1282,8 @@
     HeapFree( GetProcessHeap(), 0, enumData.lpszCommandLine );
     HeapFree( GetProcessHeap(), 0, enumData.lpszCurrentDirectory );
 
-    return DPERR_CANTCREATEPROCESS; 
-  } 
+    return DPERR_CANTCREATEPROCESS;
+  }
 
   HeapFree( GetProcessHeap(), 0, appName );
   HeapFree( GetProcessHeap(), 0, enumData.lpszCommandLine );
@@ -1297,7 +1297,7 @@
   }
 
   hr = IDirectPlayLobby_SetConnectionSettings( iface, 0, newProcessInfo.dwProcessId, lpConn );
- 
+
   if( hr != DP_OK )
   {
     ERR( "SetConnectionSettings failure %s\n", DPLAYX_HresultToString( hr ) );
@@ -1310,7 +1310,7 @@
                                 &hStart, &hDeath, &hSettingRead );
 
   /* Setup the message thread ID */
-  This->dpl->dwMsgThread = 
+  This->dpl->dwMsgThread =
     CreateLobbyMessageReceptionThread( hReceiveEvent, hStart, hDeath, hSettingRead );
 
   DPLAYX_SetLobbyMsgThreadId( newProcessInfo.dwProcessId, This->dpl->dwMsgThread );
@@ -1320,7 +1320,7 @@
   /* Everything seems to have been set correctly, update the dwAppID */
   *lpdwAppID = newProcessInfo.dwProcessId;
 
-  /* Unsuspend the process - should return the prev suspension count */ 
+  /* Unsuspend the process - should return the prev suspension count */
   if( ( dwSuspendCount = ResumeThread( newProcessInfo.hThread ) ) != 1 )
   {
     ERR( "ResumeThread failed with 0x%08lx\n", dwSuspendCount );
@@ -1512,13 +1512,13 @@
   dwSizeRequired += sizeof( DPADDRESS ) + sizeof( DWORD );
 
   /* Calculate the size of the buffer required */
-  for ( dwElements = dwElementCount; dwElements > 0; --dwElements, ++lpElements ) 
+  for ( dwElements = dwElementCount; dwElements > 0; --dwElements, ++lpElements )
   {
     if ( ( IsEqualGUID( &lpElements->guidDataType, &DPAID_ServiceProvider ) ) ||
          ( IsEqualGUID( &lpElements->guidDataType, &DPAID_LobbyProvider ) )
        )
     {
-      dwSizeRequired += sizeof( DPADDRESS ) + sizeof( GUID ); 
+      dwSizeRequired += sizeof( DPADDRESS ) + sizeof( GUID );
     }
     else if ( ( IsEqualGUID( &lpElements->guidDataType, &DPAID_Phone ) ) ||
               ( IsEqualGUID( &lpElements->guidDataType, &DPAID_Modem ) ) ||
@@ -1526,7 +1526,7 @@
             )
     {
       if( !bAnsiInterface )
-      { 
+      {
         ERR( "Ansi GUIDs used for unicode interface\n" );
         return DPERR_INVALIDFLAGS;
       }
@@ -1559,18 +1559,18 @@
     else
     {
       ERR( "Unknown GUID %s\n", debugstr_guid(&lpElements->guidDataType) );
-      return DPERR_INVALIDFLAGS; 
+      return DPERR_INVALIDFLAGS;
     }
   }
 
   /* The user wants to know how big a buffer to allocate for us */
   if( ( lpAddress == NULL ) ||
-      ( *lpdwAddressSize < dwSizeRequired ) 
+      ( *lpdwAddressSize < dwSizeRequired )
     )
   {
-    *lpdwAddressSize = dwSizeRequired; 
+    *lpdwAddressSize = dwSizeRequired;
     return DPERR_BUFFERTOOSMALL;
-  }  
+  }
 
   /* Add the total size chunk */
   {
@@ -1585,9 +1585,9 @@
   }
 
   /* Calculate the size of the buffer required */
-  for( dwElements = dwElementCount, lpElements = lpOrigElements; 
-       dwElements > 0; 
-       --dwElements, ++lpElements ) 
+  for( dwElements = dwElementCount, lpElements = lpOrigElements;
+       dwElements > 0;
+       --dwElements, ++lpElements )
   {
     if ( ( IsEqualGUID( &lpElements->guidDataType, &DPAID_ServiceProvider ) ) ||
          ( IsEqualGUID( &lpElements->guidDataType, &DPAID_LobbyProvider ) )
@@ -1595,7 +1595,7 @@
     {
       LPDPADDRESS lpdpAddress = (LPDPADDRESS)lpAddress;
 
-      CopyMemory( &lpdpAddress->guidDataType, &lpElements->guidDataType, 
+      CopyMemory( &lpdpAddress->guidDataType, &lpElements->guidDataType,
                   sizeof( GUID ) );
       lpdpAddress->dwDataSize = sizeof( GUID );
       lpAddress = (char *) lpAddress + sizeof( DPADDRESS );
@@ -1604,19 +1604,19 @@
       lpAddress = (char *) lpAddress + sizeof( GUID );
     }
     else if ( ( IsEqualGUID( &lpElements->guidDataType, &DPAID_Phone ) ) ||
-              ( IsEqualGUID( &lpElements->guidDataType, &DPAID_Modem ) ) || 
+              ( IsEqualGUID( &lpElements->guidDataType, &DPAID_Modem ) ) ||
               ( IsEqualGUID( &lpElements->guidDataType, &DPAID_INet ) )
             )
     {
       LPDPADDRESS lpdpAddress = (LPDPADDRESS)lpAddress;
 
-      CopyMemory( &lpdpAddress->guidDataType, &lpElements->guidDataType, 
+      CopyMemory( &lpdpAddress->guidDataType, &lpElements->guidDataType,
                   sizeof( GUID ) );
       lpdpAddress->dwDataSize = lpElements->dwDataSize;
       lpAddress = (char *) lpAddress + sizeof( DPADDRESS );
 
-      lstrcpynA( (LPSTR)lpAddress, 
-                 (LPCSTR)lpElements->lpData, 
+      lstrcpynA( (LPSTR)lpAddress,
+                 (LPCSTR)lpElements->lpData,
                  lpElements->dwDataSize );
       lpAddress = (char *) lpAddress + lpElements->dwDataSize;
     }
@@ -1627,7 +1627,7 @@
     {
       LPDPADDRESS lpdpAddress = (LPDPADDRESS)lpAddress;
 
-      CopyMemory( &lpdpAddress->guidDataType, &lpElements->guidDataType, 
+      CopyMemory( &lpdpAddress->guidDataType, &lpElements->guidDataType,
                   sizeof( GUID ) );
       lpdpAddress->dwDataSize = lpElements->dwDataSize;
       lpAddress = (char *) lpAddress + sizeof( DPADDRESS );
@@ -1641,7 +1641,7 @@
     {
       LPDPADDRESS lpdpAddress = (LPDPADDRESS)lpAddress;
 
-      CopyMemory( &lpdpAddress->guidDataType, &lpElements->guidDataType, 
+      CopyMemory( &lpdpAddress->guidDataType, &lpElements->guidDataType,
                   sizeof( GUID ) );
       lpdpAddress->dwDataSize = lpElements->dwDataSize;
       lpAddress = (char *) lpAddress + sizeof( DPADDRESS );
@@ -1653,12 +1653,12 @@
     {
       LPDPADDRESS lpdpAddress = (LPDPADDRESS)lpAddress;
 
-      CopyMemory( &lpdpAddress->guidDataType, &lpElements->guidDataType, 
+      CopyMemory( &lpdpAddress->guidDataType, &lpElements->guidDataType,
                   sizeof( GUID ) );
       lpdpAddress->dwDataSize = lpElements->dwDataSize;
       lpAddress = (char *) lpAddress + sizeof( DPADDRESS );
 
-      CopyMemory( lpAddress, lpElements->lpData, sizeof( DPADDRESS ) ); 
+      CopyMemory( lpAddress, lpElements->lpData, sizeof( DPADDRESS ) );
       lpAddress = (char *) lpAddress + sizeof( DPADDRESS );
     }
   }
@@ -1669,7 +1669,7 @@
 /* DPL 3 methods */
 
 static HRESULT WINAPI IDirectPlayLobby3WImpl_ConnectEx
-( LPDIRECTPLAYLOBBY3 iface, DWORD dwFlags, REFIID riid, 
+( LPDIRECTPLAYLOBBY3 iface, DWORD dwFlags, REFIID riid,
   LPVOID* lplpDP, IUnknown* pUnk )
 {
   ICOM_THIS( IDirectPlayLobbyAImpl, iface );
@@ -1677,7 +1677,7 @@
 }
 
 static HRESULT WINAPI IDirectPlayLobby3AImpl_ConnectEx
-( LPDIRECTPLAYLOBBY3A iface, DWORD dwFlags, REFIID riid, 
+( LPDIRECTPLAYLOBBY3A iface, DWORD dwFlags, REFIID riid,
   LPVOID* lplpDP, IUnknown* pUnk )
 {
   ICOM_THIS( IDirectPlayLobbyAImpl, iface );
@@ -1723,7 +1723,7 @@
   if( DPLAYX_WaitForConnectionSettings( bStartWait ) )
   {
     /* FIXME: What is the correct error return code? */
-    hr = DPERR_NOTLOBBIED; 
+    hr = DPERR_NOTLOBBIED;
   }
 
   return hr;
@@ -1758,7 +1758,7 @@
 
 /* Direct Play Lobby 1 (ascii) Virtual Table for methods */
 /* All lobby 1 methods are exactly the same except QueryInterface */
-static struct ICOM_VTABLE(IDirectPlayLobby) directPlayLobbyAVT = 
+static struct ICOM_VTABLE(IDirectPlayLobby) directPlayLobbyAVT =
 {
   ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
 
@@ -1789,7 +1789,7 @@
 #endif
 
 /* Direct Play Lobby 1 (unicode) Virtual Table for methods */
-static ICOM_VTABLE(IDirectPlayLobby) directPlayLobbyWVT = 
+static ICOM_VTABLE(IDirectPlayLobby) directPlayLobbyWVT =
 {
   ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
 
@@ -1798,7 +1798,7 @@
   XCAST(Release)DPL_Release,
 
   IDirectPlayLobbyWImpl_Connect,
-  IDirectPlayLobbyWImpl_CreateAddress, 
+  IDirectPlayLobbyWImpl_CreateAddress,
   IDirectPlayLobbyWImpl_EnumAddress,
   IDirectPlayLobbyWImpl_EnumAddressTypes,
   IDirectPlayLobbyWImpl_EnumLocalApplications,
@@ -1819,7 +1819,7 @@
 #endif
 
 /* Direct Play Lobby 2 (ascii) Virtual Table for methods */
-static ICOM_VTABLE(IDirectPlayLobby2) directPlayLobby2AVT = 
+static ICOM_VTABLE(IDirectPlayLobby2) directPlayLobby2AVT =
 {
   ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
 
@@ -1839,7 +1839,7 @@
   XCAST(SetConnectionSettings)IDirectPlayLobbyAImpl_SetConnectionSettings,
   XCAST(SetLobbyMessageEvent)IDirectPlayLobbyAImpl_SetLobbyMessageEvent,
 
-  IDirectPlayLobby2AImpl_CreateCompoundAddress 
+  IDirectPlayLobby2AImpl_CreateCompoundAddress
 };
 #undef XCAST
 
@@ -1851,12 +1851,12 @@
 #endif
 
 /* Direct Play Lobby 2 (unicode) Virtual Table for methods */
-static ICOM_VTABLE(IDirectPlayLobby2) directPlayLobby2WVT = 
+static ICOM_VTABLE(IDirectPlayLobby2) directPlayLobby2WVT =
 {
   ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
 
   XCAST(QueryInterface)DPL_QueryInterface,
-  XCAST(AddRef)DPL_AddRef, 
+  XCAST(AddRef)DPL_AddRef,
   XCAST(Release)DPL_Release,
 
   XCAST(Connect)IDirectPlayLobbyWImpl_Connect,
@@ -1952,9 +1952,9 @@
 
 /*********************************************************
  *
- * Direct Play Lobby Interface Implementation 
- * 
- *********************************************************/ 
+ * Direct Play Lobby Interface Implementation
+ *
+ *********************************************************/
 
 /***************************************************************************
  *  DirectPlayLobbyCreateA   (DPLAYX.4)
@@ -1962,7 +1962,7 @@
  */
 HRESULT WINAPI DirectPlayLobbyCreateA( LPGUID lpGUIDDSP,
                                        LPDIRECTPLAYLOBBYA *lplpDPL,
-                                       IUnknown *lpUnk, 
+                                       IUnknown *lpUnk,
                                        LPVOID lpData,
                                        DWORD dwDataSize )
 {
@@ -1985,23 +1985,23 @@
      return CLASS_E_NOAGGREGATION;
   }
 
-  return DPL_CreateInterface( &IID_IDirectPlayLobbyA, (void**)lplpDPL ); 
+  return DPL_CreateInterface( &IID_IDirectPlayLobbyA, (void**)lplpDPL );
 }
 
 /***************************************************************************
  *  DirectPlayLobbyCreateW   (DPLAYX.5)
  *
  */
-HRESULT WINAPI DirectPlayLobbyCreateW( LPGUID lpGUIDDSP, 
+HRESULT WINAPI DirectPlayLobbyCreateW( LPGUID lpGUIDDSP,
                                        LPDIRECTPLAYLOBBY *lplpDPL,
                                        IUnknown *lpUnk,
-                                       LPVOID lpData, 
+                                       LPVOID lpData,
                                        DWORD dwDataSize )
 {
   TRACE("lpGUIDDSP=%p lplpDPL=%p lpUnk=%p lpData=%p dwDataSize=%08lx\n",
         lpGUIDDSP,lplpDPL,lpUnk,lpData,dwDataSize);
 
-  /* Parameter Check: lpGUIDSP, lpUnk & lpData must be NULL. dwDataSize must 
+  /* Parameter Check: lpGUIDSP, lpUnk & lpData must be NULL. dwDataSize must
    * equal 0. These fields are mostly for future expansion.
    */
   if ( lpGUIDDSP || lpData || dwDataSize )
@@ -2018,5 +2018,5 @@
      return CLASS_E_NOAGGREGATION;
   }
 
-  return DPL_CreateInterface( &IID_IDirectPlayLobby, (void**)lplpDPL );  
+  return DPL_CreateInterface( &IID_IDirectPlayLobby, (void**)lplpDPL );
 }
diff --git a/dlls/dplayx/lobbysp.c b/dlls/dplayx/lobbysp.c
index 364b77d..0575c35 100644
--- a/dlls/dplayx/lobbysp.c
+++ b/dlls/dplayx/lobbysp.c
@@ -181,9 +181,9 @@
 
 static
 HRESULT WINAPI DPLSP_QueryInterface
-( LPDPLOBBYSP iface, 
+( LPDPLOBBYSP iface,
   REFIID riid,
-  LPVOID* ppvObj 
+  LPVOID* ppvObj
 )
 {
   ICOM_THIS(IDPLobbySPImpl,iface);
@@ -219,7 +219,7 @@
   return S_OK;
 }
 
-static 
+static
 ULONG WINAPI DPLSP_AddRef
 ( LPDPLOBBYSP iface )
 {
@@ -263,10 +263,10 @@
   return ulInterfaceRefCount;
 }
 
-static 
+static
 HRESULT WINAPI IDPLobbySPImpl_AddGroupToGroup
-( LPDPLOBBYSP iface, 
-  LPSPDATA_ADDREMOTEGROUPTOGROUP argtg 
+( LPDPLOBBYSP iface,
+  LPSPDATA_ADDREMOTEGROUPTOGROUP argtg
 )
 {
   ICOM_THIS(IDPLobbySPImpl,iface);
@@ -274,10 +274,10 @@
   return DP_OK;
 }
 
-static 
+static
 HRESULT WINAPI IDPLobbySPImpl_AddPlayerToGroup
-( LPDPLOBBYSP iface, 
-  LPSPDATA_ADDREMOTEPLAYERTOGROUP arptg 
+( LPDPLOBBYSP iface,
+  LPSPDATA_ADDREMOTEPLAYERTOGROUP arptg
 )
 {
   ICOM_THIS(IDPLobbySPImpl,iface);
@@ -285,10 +285,10 @@
   return DP_OK;
 }
 
-static 
+static
 HRESULT WINAPI IDPLobbySPImpl_CreateGroup
-( LPDPLOBBYSP iface, 
-  LPSPDATA_CREATEREMOTEGROUP crg 
+( LPDPLOBBYSP iface,
+  LPSPDATA_CREATEREMOTEGROUP crg
 )
 {
   ICOM_THIS(IDPLobbySPImpl,iface);
@@ -296,10 +296,10 @@
   return DP_OK;
 }
 
-static 
+static
 HRESULT WINAPI IDPLobbySPImpl_CreateGroupInGroup
-( LPDPLOBBYSP iface, 
-  LPSPDATA_CREATEREMOTEGROUPINGROUP crgig 
+( LPDPLOBBYSP iface,
+  LPSPDATA_CREATEREMOTEGROUPINGROUP crgig
 )
 {
   ICOM_THIS(IDPLobbySPImpl,iface);
@@ -309,8 +309,8 @@
 
 static
 HRESULT WINAPI IDPLobbySPImpl_DeleteGroupFromGroup
-( LPDPLOBBYSP iface, 
-  LPSPDATA_DELETEREMOTEGROUPFROMGROUP drgfg 
+( LPDPLOBBYSP iface,
+  LPSPDATA_DELETEREMOTEGROUPFROMGROUP drgfg
 )
 {
   ICOM_THIS(IDPLobbySPImpl,iface);
@@ -320,8 +320,8 @@
 
 static
 HRESULT WINAPI IDPLobbySPImpl_DeletePlayerFromGroup
-( LPDPLOBBYSP iface, 
-  LPSPDATA_DELETEREMOTEPLAYERFROMGROUP drpfg 
+( LPDPLOBBYSP iface,
+  LPSPDATA_DELETEREMOTEPLAYERFROMGROUP drpfg
 )
 {
   ICOM_THIS(IDPLobbySPImpl,iface);
@@ -331,8 +331,8 @@
 
 static
 HRESULT WINAPI IDPLobbySPImpl_DestroyGroup
-( LPDPLOBBYSP iface, 
-  LPSPDATA_DESTROYREMOTEGROUP drg 
+( LPDPLOBBYSP iface,
+  LPSPDATA_DESTROYREMOTEGROUP drg
 )
 {
   ICOM_THIS(IDPLobbySPImpl,iface);
@@ -342,8 +342,8 @@
 
 static
 HRESULT WINAPI IDPLobbySPImpl_EnumSessionsResponse
-( LPDPLOBBYSP iface, 
-  LPSPDATA_ENUMSESSIONSRESPONSE er 
+( LPDPLOBBYSP iface,
+  LPSPDATA_ENUMSESSIONSRESPONSE er
 )
 {
   ICOM_THIS(IDPLobbySPImpl,iface);
@@ -353,8 +353,8 @@
 
 static
 HRESULT WINAPI IDPLobbySPImpl_GetSPDataPointer
-( LPDPLOBBYSP iface, 
-  LPVOID* lplpData 
+( LPDPLOBBYSP iface,
+  LPVOID* lplpData
 )
 {
   ICOM_THIS(IDPLobbySPImpl,iface);
@@ -364,8 +364,8 @@
 
 static
 HRESULT WINAPI IDPLobbySPImpl_HandleMessage
-( LPDPLOBBYSP iface, 
-  LPSPDATA_HANDLEMESSAGE hm 
+( LPDPLOBBYSP iface,
+  LPSPDATA_HANDLEMESSAGE hm
 )
 {
   ICOM_THIS(IDPLobbySPImpl,iface);
@@ -375,8 +375,8 @@
 
 static
 HRESULT WINAPI IDPLobbySPImpl_SendChatMessage
-( LPDPLOBBYSP iface, 
-  LPSPDATA_CHATMESSAGE cm 
+( LPDPLOBBYSP iface,
+  LPSPDATA_CHATMESSAGE cm
 )
 {
   ICOM_THIS(IDPLobbySPImpl,iface);
@@ -386,8 +386,8 @@
 
 static
 HRESULT WINAPI IDPLobbySPImpl_SetGroupName
-( LPDPLOBBYSP iface, 
-  LPSPDATA_SETREMOTEGROUPNAME srgn 
+( LPDPLOBBYSP iface,
+  LPSPDATA_SETREMOTEGROUPNAME srgn
 )
 {
   ICOM_THIS(IDPLobbySPImpl,iface);
@@ -397,8 +397,8 @@
 
 static
 HRESULT WINAPI IDPLobbySPImpl_SetPlayerName
-( LPDPLOBBYSP iface, 
-  LPSPDATA_SETREMOTEPLAYERNAME srpn 
+( LPDPLOBBYSP iface,
+  LPSPDATA_SETREMOTEPLAYERNAME srpn
 )
 {
   ICOM_THIS(IDPLobbySPImpl,iface);
@@ -408,8 +408,8 @@
 
 static
 HRESULT WINAPI IDPLobbySPImpl_SetSessionDesc
-( LPDPLOBBYSP iface, 
-  LPSPDATA_SETSESSIONDESC ssd 
+( LPDPLOBBYSP iface,
+  LPSPDATA_SETSESSIONDESC ssd
 )
 {
   ICOM_THIS(IDPLobbySPImpl,iface);
@@ -419,8 +419,8 @@
 
 static
 HRESULT WINAPI IDPLobbySPImpl_SetSPDataPointer
-( LPDPLOBBYSP iface, 
-  LPVOID lpData 
+( LPDPLOBBYSP iface,
+  LPVOID lpData
 )
 {
   ICOM_THIS(IDPLobbySPImpl,iface);
@@ -430,8 +430,8 @@
 
 static
 HRESULT WINAPI IDPLobbySPImpl_StartSession
-( LPDPLOBBYSP iface, 
-  LPSPDATA_STARTSESSIONCOMMAND ssc 
+( LPDPLOBBYSP iface,
+  LPSPDATA_STARTSESSIONCOMMAND ssc
 )
 {
   ICOM_THIS(IDPLobbySPImpl,iface);
@@ -459,8 +459,8 @@
   IDPLobbySPImpl_GetSPDataPointer,
   IDPLobbySPImpl_HandleMessage,
   IDPLobbySPImpl_SendChatMessage,
-  IDPLobbySPImpl_SetGroupName, 
-  IDPLobbySPImpl_SetPlayerName, 
+  IDPLobbySPImpl_SetGroupName,
+  IDPLobbySPImpl_SetPlayerName,
   IDPLobbySPImpl_SetSessionDesc,
   IDPLobbySPImpl_SetSPDataPointer,
   IDPLobbySPImpl_StartSession
diff --git a/dlls/dplayx/lobbysp.h b/dlls/dplayx/lobbysp.h
index a9efe35..4e905f1 100644
--- a/dlls/dplayx/lobbysp.h
+++ b/dlls/dplayx/lobbysp.h
@@ -442,9 +442,9 @@
   LPSP_SETPLAYERNAME               SetPlayerName;
   LPSP_SHUTDOWN                    Shutdown;
   LPSP_STARTSESSION                StartSession;
-} SP_CALLBACKS, *LPSP_CALLBACKS;             
+} SP_CALLBACKS, *LPSP_CALLBACKS;
 
-typedef struct SPDATA_INIT 
+typedef struct SPDATA_INIT
 {
   LPSP_CALLBACKS lpCB;
   DWORD          dwSPVersion;
diff --git a/dlls/dplayx/name_server.c b/dlls/dplayx/name_server.c
index 8f97b09..d02cbaa 100644
--- a/dlls/dplayx/name_server.c
+++ b/dlls/dplayx/name_server.c
@@ -18,7 +18,7 @@
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
- 
+
 /* NOTE: Methods with the NS_ prefix are name server methods */
 
 #include <string.h>
@@ -60,14 +60,14 @@
   BOOL bNsIsLocal;
   LPVOID lpLocalAddrHdr;  /* FIXME: Not yet used */
   LPVOID lpRemoteAddrHdr; /* FIXME: Not yet used */
-}; 
+};
 typedef struct NSCache NSCache, *lpNSCache;
 
 /* Function prototypes */
 DPQ_DECL_DELETECB( cbDeleteNSNodeFromHeap, lpNSCacheData );
 
-/* Name Server functions 
- * --------------------- 
+/* Name Server functions
+ * ---------------------
  */
 void NS_SetLocalComputerAsNameServer( LPCDPSESSIONDESC2 lpsd, LPVOID lpNSInfo )
 {
@@ -117,7 +117,7 @@
   }
 
   /* Add this to the list */
-  lpCacheNode = (lpNSCacheData)HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, 
+  lpCacheNode = (lpNSCacheData)HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY,
                                           sizeof( *lpCacheNode ) );
 
   if( lpCacheNode == NULL )
@@ -129,10 +129,10 @@
   lpCacheNode->lpNSAddrHdr = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY,
                                         dwHdrSize );
   CopyMemory( lpCacheNode->lpNSAddrHdr, lpcNSAddrHdr, dwHdrSize );
-              
+
 
   lpCacheNode->data = (LPDPSESSIONDESC2)HeapAlloc( GetProcessHeap(),
-                                                   HEAP_ZERO_MEMORY, 
+                                                   HEAP_ZERO_MEMORY,
                                                    sizeof( *(lpCacheNode->data) ) );
 
   if( lpCacheNode->data == NULL )
@@ -155,8 +155,8 @@
 
   lpCache->present = lpCacheNode;
 
-  /* Use this message as an oportunity to weed out any old sessions so 
-   * that we don't enum them again 
+  /* Use this message as an oportunity to weed out any old sessions so
+   * that we don't enum them again
    */
   NS_PruneSessionCache( lpNSInfo );
 }
@@ -214,7 +214,7 @@
 HRESULT NS_SendSessionRequestBroadcast( LPCGUID lpcGuid,
                                         DWORD dwFlags,
                                         LPSPINITDATA lpSpData )
-                                     
+
 {
   DPSP_ENUMSESSIONSDATA data;
   LPDPMSG_ENUMSESSIONSREQUEST lpMsg;
@@ -225,13 +225,13 @@
   FIXME( ": not all data fields are correct\n" );
 
   data.dwMessageSize = lpSpData->dwSPHeaderSize + sizeof( *lpMsg ); /*FIXME!*/
-  data.lpMessage = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, 
+  data.lpMessage = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY,
                               data.dwMessageSize );
   data.lpISP = lpSpData->lpISP;
   data.bReturnStatus = (dwFlags & DPENUMSESSIONS_RETURNSTATUS) ? TRUE : FALSE;
 
 
-  lpMsg = (LPDPMSG_ENUMSESSIONSREQUEST)(((BYTE*)data.lpMessage)+lpSpData->dwSPHeaderSize); 
+  lpMsg = (LPDPMSG_ENUMSESSIONSREQUEST)(((BYTE*)data.lpMessage)+lpSpData->dwSPHeaderSize);
 
   /* Setup EnumSession reqest message */
   lpMsg->envelope.dwMagic    = DPMSGMAGIC_DPLAYMSG;
@@ -243,7 +243,7 @@
 
   CopyMemory( &lpMsg->guidApplication, lpcGuid, sizeof( *lpcGuid ) );
 
-  return (lpSpData->lpCB->EnumSessions)( &data ); 
+  return (lpSpData->lpCB->EnumSessions)( &data );
 }
 
 /* Delete a name server node which has been allocated on the heap */
@@ -318,7 +318,7 @@
 
   /* FIXME: The pointers could disappear when walking if a prune happens */
 
-  /* Test for end of the list */ 
+  /* Test for end of the list */
   if( lpCache->present == NULL )
   {
     return NULL;
@@ -343,10 +343,10 @@
   const DWORD dwPresentTime = timeGetTime();
   const DWORD dwPrunePeriod = DPMSG_WAIT_60_SECS; /* is 60 secs enough? */
 
-  /* This silly little algorithm is based on the fact we keep entries in 
+  /* This silly little algorithm is based on the fact we keep entries in
    * the queue in a time based order. It also assumes that it is not possible
    * to wrap around over yourself (which is not unreasonable).
-   * The if statements verify if the first entry in the queue is less 
+   * The if statements verify if the first entry in the queue is less
    * than dwPrunePeriod old depending on the "clock" roll over.
    */
   for( ;; )
@@ -375,7 +375,7 @@
 }
 
 /* NAME SERVER Message stuff */
-void NS_ReplyToEnumSessionsRequest( LPCVOID lpcMsg, 
+void NS_ReplyToEnumSessionsRequest( LPCVOID lpcMsg,
                                     LPVOID* lplpReplyData,
                                     LPDWORD lpdwReplySize,
                                     IDirectPlay2Impl* lpDP )
@@ -406,15 +406,15 @@
   *lplpReplyData = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY,
                               *lpdwReplySize );
 
-  rmsg = (LPDPMSG_ENUMSESSIONSREPLY)( (BYTE*)*lplpReplyData + 
+  rmsg = (LPDPMSG_ENUMSESSIONSREPLY)( (BYTE*)*lplpReplyData +
                                              lpDP->dp2->spData.dwSPHeaderSize);
 
-  rmsg->envelope.dwMagic    = DPMSGMAGIC_DPLAYMSG; 
+  rmsg->envelope.dwMagic    = DPMSGMAGIC_DPLAYMSG;
   rmsg->envelope.wCommandId = DPMSGCMD_ENUMSESSIONSREPLY;
   rmsg->envelope.wVersion   = DPMSGVER_DP6;
 
-  CopyMemory( &rmsg->sd, lpDP->dp2->lpSessionDesc, 
-              sizeof( lpDP->dp2->lpSessionDesc->dwSize ) ); 
+  CopyMemory( &rmsg->sd, lpDP->dp2->lpSessionDesc,
+              sizeof( lpDP->dp2->lpSessionDesc->dwSize ) );
   rmsg->dwUnknown = 0x0000005c;
   if( bAnsi )
   {
diff --git a/dlls/dplayx/name_server.h b/dlls/dplayx/name_server.h
index 51caa87..ed0c1e7 100644
--- a/dlls/dplayx/name_server.h
+++ b/dlls/dplayx/name_server.h
@@ -35,7 +35,7 @@
 DWORD NS_GetOtherMagic( LPVOID lpNSInfo );
 void NS_SetLocalAddr( LPVOID lpNSInfo, LPCVOID lpHdr, DWORD dwHdrSize );
 
-void NS_ReplyToEnumSessionsRequest( LPCVOID lpcMsg, 
+void NS_ReplyToEnumSessionsRequest( LPCVOID lpcMsg,
                                     LPVOID* lplpReplyData,
                                     LPDWORD lpdwReplySize,
                                     IDirectPlay2Impl* lpDP );
@@ -43,7 +43,7 @@
 HRESULT NS_SendSessionRequestBroadcast( LPCGUID lpcGuid,
                                         DWORD dwFlags,
                                         LPSPINITDATA lpSpData );
-                                        
+
 
 BOOL NS_InitializeSessionCache( LPVOID* lplpNSInfo );
 void NS_DeleteSessionCache( LPVOID lpNSInfo );
diff --git a/dlls/dsound/dsound_main.c b/dlls/dsound/dsound_main.c
index d58605b..b6295bf 100644
--- a/dlls/dsound/dsound_main.c
+++ b/dlls/dsound/dsound_main.c
@@ -1,5 +1,5 @@
 /*  			DirectSound
- * 
+ *
  * Copyright 1998 Marcus Meissner
  * Copyright 1998 Rob Riggs
  * Copyright 2000-2001 TransGaming Technologies, Inc.
@@ -69,7 +69,7 @@
 /* these are eligible for tuning... they must be high on slow machines... */
 /* some stuff may get more responsive with lower values though... */
 #define DS_EMULDRIVER 1 /* some games (Quake 2, UT) refuse to accept
-				emulated dsound devices. set to 0 ! */ 
+				emulated dsound devices. set to 0 ! */
 #define DS_HEL_FRAGS 48 /* HEL only: number of waveOut fragments in primary buffer
 			 * (changing this won't help you) */
 #define DS_HEL_MARGIN 5 /* HEL only: number of waveOut fragments ahead to mix in new buffers
@@ -183,10 +183,10 @@
     /* IDirectSound3DListenerImpl fields */
     IDirectSoundBufferImpl* dsb;
     DS3DLISTENER            ds3dl;
-    CRITICAL_SECTION        lock;   
+    CRITICAL_SECTION        lock;
 };
 
-struct IKsPropertySetImpl 
+struct IKsPropertySetImpl
 {
     /* IUnknown fields */
     ICOM_VFIELD(IKsPropertySet);
@@ -288,7 +288,7 @@
 static int	ds_snd_queue_max = DS_SND_QUEUE_MAX;
 static int	ds_snd_queue_min = DS_SND_QUEUE_MIN;
 
-/* 
+/*
  * Call the callback provided to DirectSoundEnumerateA.
  */
 
@@ -324,9 +324,9 @@
 {
     char buffer[MAX_PATH+1];
     HKEY hkey, appkey = 0;
-    
+
     buffer[MAX_PATH]='\0';
-    
+
     if (RegCreateKeyExA( HKEY_LOCAL_MACHINE, "Software\\Wine\\Wine\\Config\\dsound", 0, NULL,
                          REG_OPTION_VOLATILE, KEY_ALL_ACCESS, NULL, &hkey, NULL ))
     {
@@ -356,10 +356,10 @@
 
     /* get options */
 
-    if (!get_config_key( hkey, appkey, "EmulDriver", buffer, MAX_PATH )) 
+    if (!get_config_key( hkey, appkey, "EmulDriver", buffer, MAX_PATH ))
         ds_emuldriver = strcmp(buffer, "N");
 
-    if (!get_config_key( hkey, appkey, "HELmargin", buffer, MAX_PATH )) 
+    if (!get_config_key( hkey, appkey, "HELmargin", buffer, MAX_PATH ))
         ds_hel_margin = atoi(buffer);
 
     if (!get_config_key( hkey, appkey, "HELqueue", buffer, MAX_PATH ))
@@ -376,10 +376,10 @@
 
     if (ds_emuldriver != DS_EMULDRIVER )
 	WARN("ds_emuldriver = %d (default=%d)\n",ds_emuldriver, DS_EMULDRIVER);
-    if (ds_hel_margin != DS_HEL_MARGIN ) 
+    if (ds_hel_margin != DS_HEL_MARGIN )
 	WARN("ds_hel_margin = %d (default=%d)\n",ds_hel_margin, DS_HEL_MARGIN );
     if (ds_hel_queue != DS_HEL_QUEUE )
-    	WARN("ds_hel_queue = %d (default=%d)\n",ds_hel_queue, DS_HEL_QUEUE );          
+    	WARN("ds_hel_queue = %d (default=%d)\n",ds_hel_queue, DS_HEL_QUEUE );
     if (ds_snd_queue_max != DS_SND_QUEUE_MAX)
 	WARN("ds_snd_queue_max = %d (default=%d)\n",ds_snd_queue_max ,DS_SND_QUEUE_MAX);
     if (ds_snd_queue_min != DS_SND_QUEUE_MIN)
@@ -391,7 +391,7 @@
 
 
 /***************************************************************************
- * DirectSoundEnumerateA [DSOUND.2]  
+ * DirectSoundEnumerateA [DSOUND.2]
  *
  * Enumerate all DirectSound drivers installed in the system
  *
@@ -406,7 +406,7 @@
 	WAVEOUTCAPSA wcaps;
 	unsigned devs, wod;
 
-	TRACE("lpDSEnumCallback = %p, lpContext = %p\n", 
+	TRACE("lpDSEnumCallback = %p, lpContext = %p\n",
 	      lpDSEnumCallback, lpContext);
 
 	devs = waveOutGetNumDevs();
@@ -422,7 +422,7 @@
 }
 
 /***************************************************************************
- * DirectSoundEnumerateW [DSOUND.3]  
+ * DirectSoundEnumerateW [DSOUND.3]
  *
  * Enumerate all DirectSound drivers installed in the system
  *
@@ -431,10 +431,10 @@
  *    Failure: DSERR_INVALIDPARAM
  */
 HRESULT WINAPI DirectSoundEnumerateW(
-	LPDSENUMCALLBACKW lpDSEnumCallback, 
+	LPDSENUMCALLBACKW lpDSEnumCallback,
 	LPVOID lpContext )
 {
-        FIXME("lpDSEnumCallback = %p, lpContext = %p: stub\n", 
+        FIXME("lpDSEnumCallback = %p, lpContext = %p: stub\n",
                 lpDSEnumCallback, lpContext);
 
         return DS_OK;
@@ -803,7 +803,7 @@
 #endif
 
 #ifdef USE_DSOUND3D
-static ICOM_VTABLE(IDirectSound3DBuffer) ds3dbvt = 
+static ICOM_VTABLE(IDirectSound3DBuffer) ds3dbvt =
 {
 	ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
 	/* IUnknown methods */
@@ -898,7 +898,7 @@
 			bObuf[i * 2] = temp;
 			bObuf[(i * 2) + 1] = temp;
 		}
-	
+
 	if (wTbuf)
 		free(wTbuf);
 	if (bTbuf)
@@ -920,7 +920,7 @@
 	TRACE("(%p,%s,%p)\n",This,debugstr_guid(riid),ppobj);
 	return E_FAIL;
 }
-	
+
 static ULONG WINAPI IDirectSound3DListenerImpl_AddRef(LPDIRECTSOUND3DLISTENER iface)
 {
 	ICOM_THIS(IDirectSound3DListenerImpl,iface);
@@ -1078,7 +1078,7 @@
 	return DS_OK;
 }
 
-static ICOM_VTABLE(IDirectSound3DListener) ds3dlvt = 
+static ICOM_VTABLE(IDirectSound3DListener) ds3dlvt =
 {
 	ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
 	/* IUnknown methods */
@@ -1156,7 +1156,7 @@
 	return S_OK;
 }
 
-static ICOM_VTABLE(IDirectSoundNotify) dsnvt = 
+static ICOM_VTABLE(IDirectSoundNotify) dsnvt =
 {
 	ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
 	IDirectSoundNotifyImpl_QueryInterface,
@@ -1363,7 +1363,7 @@
 	TRACE("(formattag=0x%04x,chans=%d,samplerate=%ld,"
 		   "bytespersec=%ld,blockalign=%d,bitspersamp=%d,cbSize=%d)\n",
 		   wfex->wFormatTag, wfex->nChannels, wfex->nSamplesPerSec,
-		   wfex->nAvgBytesPerSec, wfex->nBlockAlign, 
+		   wfex->nAvgBytesPerSec, wfex->nBlockAlign,
 		   wfex->wBitsPerSample, wfex->cbSize);
 
 	primarybuf->wfx.nAvgBytesPerSec =
@@ -1590,7 +1590,7 @@
 		HeapFree(GetProcessHeap(),0,This->buffer);
 
 	HeapFree(GetProcessHeap(),0,This);
-	
+
 	if (This == primarybuf)
 		primarybuf = NULL;
 
@@ -1651,7 +1651,7 @@
 static HRESULT WINAPI IDirectSoundBufferImpl_GetCurrentPosition(
 	LPDIRECTSOUNDBUFFER iface,LPDWORD playpos,LPDWORD writepos
 ) {
-	HRESULT	hres; 
+	HRESULT	hres;
 	ICOM_THIS(IDirectSoundBufferImpl,iface);
 	TRACE("(%p,%p,%p)\n",This,playpos,writepos);
 	if (This->hwbuf) {
@@ -2004,7 +2004,7 @@
 ) {
 	ICOM_THIS(IDirectSoundBufferImpl,iface);
   	TRACE("(%p)->(%p)\n",This,caps);
-  
+
 	if (caps == NULL)
 		return DSERR_INVALIDPARAM;
 
@@ -2162,7 +2162,7 @@
 	return E_FAIL;
 }
 
-static ICOM_VTABLE(IDirectSoundBuffer) dsbvt = 
+static ICOM_VTABLE(IDirectSoundBuffer) dsbvt =
 {
 	ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
 	IDirectSoundBufferImpl_QueryInterface,
@@ -2213,10 +2213,10 @@
 	HRESULT err = DS_OK;
 
 	TRACE("(%p,%p,%p,%p)\n",This,dsbd,ippdsb,lpunk);
-	
+
 	if ((This == NULL) || (dsbd == NULL) || (ippdsb == NULL))
 		return DSERR_INVALIDPARAM;
-	
+
 	if (TRACE_ON(dsound)) {
 		TRACE("(structsize=%ld)\n",dsbd->dwSize);
 		TRACE("(flags=0x%08lx:\n",dsbd->dwFlags);
@@ -2232,7 +2232,7 @@
 		TRACE("(formattag=0x%04x,chans=%d,samplerate=%ld,"
 		   "bytespersec=%ld,blockalign=%d,bitspersamp=%d,cbSize=%d)\n",
 		   wfex->wFormatTag, wfex->nChannels, wfex->nSamplesPerSec,
-		   wfex->nAvgBytesPerSec, wfex->nBlockAlign, 
+		   wfex->nAvgBytesPerSec, wfex->nBlockAlign,
 		   wfex->wBitsPerSample, wfex->cbSize);
 
 	if (dsbd->dwFlags & DSBCAPS_PRIMARYBUFFER) {
@@ -2361,7 +2361,7 @@
 		*ippdsb = NULL;
 		return err;
 	}
-	
+
 #ifdef USE_DSOUND3D
 	if (dsbd->dwFlags & DSBCAPS_CTRL3D) {
 		IDirectSound3DBufferImpl	*ds3db;
@@ -2520,7 +2520,7 @@
 			IDirectSoundBuffer_Release((LPDIRECTSOUNDBUFFER)primarybuf);
 
 		if (This->buffers) {
-			for( i=0;i<This->nrofbuffers;i++)	
+			for( i=0;i<This->nrofbuffers;i++)
 				IDirectSoundBuffer_Release((LPDIRECTSOUNDBUFFER)This->buffers[i]);
 		}
 
@@ -2574,9 +2574,9 @@
 		This->listener->ref = 1;
 		ICOM_VTBL(This->listener) = &ds3dlvt;
 		*ppobj = (LPVOID)This->listener;
-		IDirectSound3DListener_AddRef((LPDIRECTSOUND3DLISTENER)*ppobj);	
+		IDirectSound3DListener_AddRef((LPDIRECTSOUND3DLISTENER)*ppobj);
 
-		This->listener->dsb = NULL; 
+		This->listener->dsb = NULL;
 
 		This->listener->ds3dl.dwSize = sizeof(DS3DLISTENER);
 		This->listener->ds3dl.vPosition.u1.x = 0.0;
@@ -2631,7 +2631,7 @@
 	return DS_OK;
 }
 
-static ICOM_VTABLE(IDirectSound) dsvt = 
+static ICOM_VTABLE(IDirectSound) dsvt =
 {
 	ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
 	IDirectSoundImpl_QueryInterface,
@@ -2712,7 +2712,7 @@
 static inline BYTE cvtS16toU8(INT16 word)
 {
 	BYTE	b = (word + 32768) >> 8;
-	
+
 	return b;
 }
 
@@ -2759,7 +2759,7 @@
 			*(((INT16 *)obuf) + 1) = fr;
 			return;
 		}
-	}	
+	}
 	if (primarybuf->wfx.nChannels == 1) {
 		fl = (fl + fr) >> 1;
 		if (primarybuf->wfx.wBitsPerSample == 8) {
@@ -2799,7 +2799,7 @@
 		}
 		return len;
 	}
-	
+
 	/* Check for same sample rate */
 	if (dsb->freq == primarybuf->wfx.nSamplesPerSec) {
 		TRACE("(%p) Same sample rate %ld = primary %ld\n", dsb,
@@ -2813,7 +2813,7 @@
 			if (ibp >= (BYTE *)(dsb->buffer + dsb->buflen))
 				ibp = dsb->buffer;	/* wrap */
 		}
-		return (ilen);	
+		return (ilen);
 	}
 
 	/* Mix in different sample rates */
@@ -2850,7 +2850,7 @@
 	INT	i, inc = primarybuf->wfx.wBitsPerSample >> 3;
 	BYTE	*bpc = buf;
 	INT16	*bps = (INT16 *) buf;
-	
+
 	TRACE("(%p) left = %lx, right = %lx\n", dsb,
 		dsb->volpan.dwTotalLeftAmpFactor, dsb->volpan.dwTotalRightAmpFactor);
 	if ((!(dsb->dsbd.dwFlags & DSBCAPS_CTRLPAN) || (dsb->volpan.lPan == 0)) &&
@@ -2886,7 +2886,7 @@
 			/* Very ugly! */
 			FIXME("MixerVol had a nasty error\n");
 		}
-	}		
+	}
 }
 
 #ifdef USE_DSOUND3D
@@ -3015,7 +3015,7 @@
 	}
 
 	dsb->buf_mixpos += ilen;
-	
+
 	if (dsb->buf_mixpos >= dsb->buflen) {
 		if (!(dsb->playflags & DSBPLAY_LOOPING)) {
 			dsb->state = STATE_STOPPED;
@@ -3309,7 +3309,7 @@
 			LeaveCriticalSection(&(dsb->lock));
 		}
 	}
-	
+
 	return maxlen;
 }
 
@@ -3545,7 +3545,7 @@
 		if (primarybuf->state == STATE_STARTING) {
 			DSOUND_PrimaryPlay(primarybuf);
 			primarybuf->state = STATE_PLAYING;
-		} 
+		}
 		else if (primarybuf->state == STATE_STOPPING) {
 			DSOUND_PrimaryStop(primarybuf);
 			primarybuf->state = STATE_STOPPED;
@@ -3618,7 +3618,7 @@
 	PIDSDRIVER drv = NULL;
 	WAVEOUTCAPSA wcaps;
 	unsigned wod, wodn;
-	HRESULT err = DS_OK;	
+	HRESULT err = DS_OK;
 
 	if (lpGUID)
 		TRACE("(%p,%p,%p)\n",lpGUID,ippDS,pUnkOuter);
@@ -3659,11 +3659,11 @@
 
 	(*ippDS)->driver	= drv;
 	(*ippDS)->fraglen	= 0;
-	(*ippDS)->priolevel	= DSSCL_NORMAL; 
+	(*ippDS)->priolevel	= DSSCL_NORMAL;
 	(*ippDS)->nrofbuffers	= 0;
 	(*ippDS)->buffers	= NULL;
-	(*ippDS)->primary	= NULL; 
-	(*ippDS)->listener	= NULL; 
+	(*ippDS)->primary	= NULL;
+	(*ippDS)->listener	= NULL;
 
 	(*ippDS)->prebuf	= ds_snd_queue_max;
 
@@ -3695,10 +3695,10 @@
 		err = DSERR_ALLOCATED;
 
 		/* if this device is busy try the next one */
-		while((err == DSERR_ALLOCATED) && 
+		while((err == DSERR_ALLOCATED) &&
 			((*ippDS)->drvdesc.dnDevNode < wodn))
   		{
-		  err = mmErr(waveOutOpen(&((*ippDS)->hwo), 
+		  err = mmErr(waveOutOpen(&((*ippDS)->hwo),
 			(*ippDS)->drvdesc.dnDevNode, &((*ippDS)->wfx),
 			(DWORD)DSOUND_callback, (DWORD)(*ippDS),
 			CALLBACK_FUNCTION | WAVE_DIRECTSOUND));
@@ -3706,7 +3706,7 @@
 		}
 
                 (*ippDS)->drvdesc.dnDevNode--; /* take away last increment */
-		
+
 	}
 
 	if (drv && (err == DS_OK))
@@ -3845,7 +3845,7 @@
 {
         FIXME("(%p,%p):stub\n", lpDSEnumCallback, lpContext );
         return DS_OK;
-} 
+}
 
 static HRESULT
 DSOUND_CreateDirectSoundCapture( LPVOID* ppobj )
@@ -3922,7 +3922,7 @@
 IDirectSoundCaptureImpl_CreateCaptureBuffer(
 	LPDIRECTSOUNDCAPTURE iface,
 	LPCDSCBUFFERDESC lpcDSCBufferDesc,
-	LPDIRECTSOUNDCAPTUREBUFFER* lplpDSCaptureBuffer, 
+	LPDIRECTSOUNDCAPTUREBUFFER* lplpDSCaptureBuffer,
 	LPUNKNOWN pUnk )
 {
 	HRESULT hr;
@@ -3975,7 +3975,7 @@
         /* IDirectSoundCapture methods */
         IDirectSoundCaptureImpl_CreateCaptureBuffer,
         IDirectSoundCaptureImpl_GetCaps,
-        IDirectSoundCaptureImpl_Initialize 
+        IDirectSoundCaptureImpl_Initialize
 };
 
 static HRESULT
@@ -4081,8 +4081,8 @@
 static HRESULT WINAPI
 IDirectSoundCaptureBufferImpl_GetFormat(
         LPDIRECTSOUNDCAPTUREBUFFER iface,
-	LPWAVEFORMATEX lpwfxFormat, 
-	DWORD dwSizeAllocated, 
+	LPWAVEFORMATEX lpwfxFormat,
+	DWORD dwSizeAllocated,
 	LPDWORD lpdwSizeWritten )
 {
 	ICOM_THIS(IDirectSoundCaptureBufferImpl,iface);
@@ -4107,7 +4107,7 @@
 static HRESULT WINAPI
 IDirectSoundCaptureBufferImpl_Initialize(
         LPDIRECTSOUNDCAPTUREBUFFER iface,
-	LPDIRECTSOUNDCAPTURE lpDSC, 
+	LPDIRECTSOUNDCAPTURE lpDSC,
 	LPCDSCBUFFERDESC lpcDSCBDesc )
 {
 	ICOM_THIS(IDirectSoundCaptureBufferImpl,iface);
@@ -4120,12 +4120,12 @@
 static HRESULT WINAPI
 IDirectSoundCaptureBufferImpl_Lock(
         LPDIRECTSOUNDCAPTUREBUFFER iface,
-	DWORD dwReadCusor, 
-	DWORD dwReadBytes, 
-	LPVOID* lplpvAudioPtr1, 
-	LPDWORD lpdwAudioBytes1, 
-	LPVOID* lplpvAudioPtr2, 
-	LPDWORD lpdwAudioBytes2, 
+	DWORD dwReadCusor,
+	DWORD dwReadBytes,
+	LPVOID* lplpvAudioPtr1,
+	LPDWORD lpdwAudioBytes1,
+	LPVOID* lplpvAudioPtr2,
+	LPDWORD lpdwAudioBytes2,
 	DWORD dwFlags )
 {
 	ICOM_THIS(IDirectSoundCaptureBufferImpl,iface);
@@ -4160,9 +4160,9 @@
 static HRESULT WINAPI
 IDirectSoundCaptureBufferImpl_Unlock(
         LPDIRECTSOUNDCAPTUREBUFFER iface,
-	LPVOID lpvAudioPtr1, 
-	DWORD dwAudioBytes1, 
-	LPVOID lpvAudioPtr2, 
+	LPVOID lpvAudioPtr1,
+	DWORD dwAudioBytes1,
+	LPVOID lpvAudioPtr2,
 	DWORD dwAudioBytes2 )
 {
 	ICOM_THIS(IDirectSoundCaptureBufferImpl,iface);
@@ -4203,7 +4203,7 @@
     DWORD                       ref;
 } IClassFactoryImpl;
 
-static HRESULT WINAPI 
+static HRESULT WINAPI
 DSCF_QueryInterface(LPCLASSFACTORY iface,REFIID riid,LPVOID *ppobj) {
 	ICOM_THIS(IClassFactoryImpl,iface);
 
diff --git a/dlls/gdi/bidi16.c b/dlls/gdi/bidi16.c
index cebd7d2..06abc13 100644
--- a/dlls/gdi/bidi16.c
+++ b/dlls/gdi/bidi16.c
@@ -38,9 +38,9 @@
 /***********************************************************************
  *		RawGetTextExtent   (GDI.532)
  */
-LONG WINAPI RawGetTextExtent16(HDC16 hdc, LPCSTR lpszString, INT16 cbString ) { 
-      FIXME("(%04hx, %p, %hd): stub\n", hdc, lpszString, cbString); 
-      return 0; 
+LONG WINAPI RawGetTextExtent16(HDC16 hdc, LPCSTR lpszString, INT16 cbString ) {
+      FIXME("(%04hx, %p, %hd): stub\n", hdc, lpszString, cbString);
+      return 0;
 }
 
 /***********************************************************************
diff --git a/dlls/gdi/driver.c b/dlls/gdi/driver.c
index 12f72fa..3dff1c7 100644
--- a/dlls/gdi/driver.c
+++ b/dlls/gdi/driver.c
@@ -366,12 +366,12 @@
  *      @ [GDI32.101]
  *
  * This should load the correct driver for lpszDevice and calls this driver's
- * ExtDeviceModePropSheet proc. 
+ * ExtDeviceModePropSheet proc.
  *
- * Note: The driver calls a callback routine for each property sheet page; these 
+ * Note: The driver calls a callback routine for each property sheet page; these
  * pages are supposed to be filled into the structure pointed to by lpPropSheet.
  * The layout of this structure is:
- * 
+ *
  * struct
  * {
  *   DWORD  nPages;
diff --git a/dlls/gdi/enhmfdrv/enhmetafiledrv.h b/dlls/gdi/enhmfdrv/enhmetafiledrv.h
index 30f6df3..ab2ef54 100644
--- a/dlls/gdi/enhmfdrv/enhmetafiledrv.h
+++ b/dlls/gdi/enhmfdrv/enhmetafiledrv.h
@@ -33,7 +33,7 @@
     DC             *dc;
     ENHMETAHEADER  *emh;           /* Pointer to enhanced metafile header */
     UINT       nextHandle;         /* Next handle number */
-    HFILE      hFile;              /* HFILE for disk based MetaFile */ 
+    HFILE      hFile;              /* HFILE for disk based MetaFile */
 } EMFDRV_PDEVICE;
 
 
diff --git a/dlls/gdi/enhmfdrv/graphics.c b/dlls/gdi/enhmfdrv/graphics.c
index 997f3ab..32cc2d3 100644
--- a/dlls/gdi/enhmfdrv/graphics.c
+++ b/dlls/gdi/enhmfdrv/graphics.c
@@ -138,7 +138,7 @@
     bounds.top    = min(yinterStart, yinterEnd);
     bounds.right  = max(xinterStart, xinterEnd);
     bounds.bottom = max(yinterStart, yinterEnd);
-    
+
     for(i = 0; i <= 8; i++) {
         if(i * M_PI / 2 < angleStart) /* loop until we're past start */
 	    continue;
@@ -148,7 +148,7 @@
 	/* the arc touches the rectangle at the start of quadrant i, so adjust
 	   BBox to reflect this. */
 
-	switch(i % 4) { 
+	switch(i % 4) {
 	case 0:
 	    bounds.right = right;
 	    break;
@@ -283,7 +283,7 @@
 /***********************************************************************
  *           EMFDRV_RoundRect
  */
-BOOL 
+BOOL
 EMFDRV_RoundRect( PHYSDEV dev, INT left, INT top, INT right,
 		  INT bottom, INT ell_width, INT ell_height )
 {
@@ -343,7 +343,7 @@
     emr = HeapAlloc( GetProcessHeap(), 0, size );
     emr->emr.iType = iType;
     emr->emr.nSize = size;
-    
+
     emr->rclBounds.left = emr->rclBounds.right = pt[0].x;
     emr->rclBounds.top = emr->rclBounds.bottom = pt[0].y;
 
@@ -394,7 +394,7 @@
  *
  * Helper for EMFDRV_PolyPoly{line|gon}
  */
-static BOOL 
+static BOOL
 EMFDRV_PolyPolylinegon( PHYSDEV dev, const POINT* pt, const INT* counts, UINT polys,
 			DWORD iType)
 {
@@ -418,8 +418,8 @@
 	    pts++;
 	}
     }
-    
-    size = sizeof(EMRPOLYPOLYLINE) + (polys - 1) * sizeof(DWORD) + 
+
+    size = sizeof(EMRPOLYPOLYLINE) + (polys - 1) * sizeof(DWORD) +
       (cptl - 1) * sizeof(POINTL);
 
     emr = HeapAlloc( GetProcessHeap(), 0, size );
@@ -441,7 +441,7 @@
 /**********************************************************************
  *          EMFDRV_PolyPolyline
  */
-BOOL 
+BOOL
 EMFDRV_PolyPolyline(PHYSDEV dev, const POINT* pt, const DWORD* counts, DWORD polys)
 {
     return EMFDRV_PolyPolylinegon( dev, pt, (INT *)counts, polys,
@@ -451,7 +451,7 @@
 /**********************************************************************
  *          EMFDRV_PolyPolygon
  */
-BOOL 
+BOOL
 EMFDRV_PolyPolygon( PHYSDEV dev, const POINT* pt, const INT* counts, UINT polys )
 {
     return EMFDRV_PolyPolylinegon( dev, pt, counts, polys, EMR_POLYPOLYGON );
@@ -461,7 +461,7 @@
 /**********************************************************************
  *          EMFDRV_ExtFloodFill
  */
-BOOL 
+BOOL
 EMFDRV_ExtFloodFill( PHYSDEV dev, INT x, INT y, COLORREF color, UINT fillType )
 {
     EMREXTFLOODFILL emr;
@@ -503,7 +503,7 @@
     emr->rclBounds.bottom = ((RGNDATA *)&emr->RgnData)->rdh.rcBound.bottom - 1;
     emr->cbRgnData = rgnsize;
     emr->ihBrush = index;
-    
+
     ret = EMFDRV_WriteRecord( dev, &emr->emr );
     if(ret)
         EMFDRV_UpdateBBox( dev, &emr->rclBounds );
@@ -571,7 +571,7 @@
     emr->rclBounds.right  = ((RGNDATA *)&emr->RgnData)->rdh.rcBound.right - 1;
     emr->rclBounds.bottom = ((RGNDATA *)&emr->RgnData)->rdh.rcBound.bottom - 1;
     emr->cbRgnData = rgnsize;
-    
+
     ret = EMFDRV_WriteRecord( dev, &emr->emr );
     if(ret)
         EMFDRV_UpdateBBox( dev, &emr->rclBounds );
diff --git a/dlls/gdi/enhmfdrv/init.c b/dlls/gdi/enhmfdrv/init.c
index a502434..12a1005 100644
--- a/dlls/gdi/enhmfdrv/init.c
+++ b/dlls/gdi/enhmfdrv/init.c
@@ -223,11 +223,11 @@
 /**********************************************************************
  *          CreateEnhMetaFileA   (GDI32.@)
  */
-HDC WINAPI CreateEnhMetaFileA( 
+HDC WINAPI CreateEnhMetaFileA(
     HDC hdc,           /* [in] optional reference DC */
     LPCSTR filename,   /* [in] optional filename for disk metafiles */
     const RECT *rect,  /* [in] optional bounding rectangle */
-    LPCSTR description /* [in] optional description */ 
+    LPCSTR description /* [in] optional description */
     )
 {
     LPWSTR filenameW = NULL;
@@ -266,7 +266,7 @@
     HDC           hdc,        /* [in] optional reference DC */
     LPCWSTR       filename,   /* [in] optional filename for disk metafiles */
     const RECT*   rect,       /* [in] optional bounding rectangle */
-    LPCWSTR       description /* [in] optional description */ 
+    LPCWSTR       description /* [in] optional description */
     )
 {
     HDC ret;
@@ -335,7 +335,7 @@
     physDev->emh->offDescription = length ? sizeof(ENHMETAHEADER) : 0;
 
     physDev->emh->nPalEntries = 0; /* I guess this should start at 0 */
-  
+
     /* Size in pixels */
     physDev->emh->szlDevice.cx = GetDeviceCaps( hRefDC, HORZRES );
     physDev->emh->szlDevice.cy = GetDeviceCaps( hRefDC, VERTRES );
@@ -366,7 +366,7 @@
 
     if( !hdc )
       DeleteDC( hRefDC );
-	
+
     return ret;
 }
 
diff --git a/dlls/gdi/enhmfdrv/objects.c b/dlls/gdi/enhmfdrv/objects.c
index b516cc5..938e57a 100644
--- a/dlls/gdi/enhmfdrv/objects.c
+++ b/dlls/gdi/enhmfdrv/objects.c
@@ -86,7 +86,7 @@
 	emr->cbBmi = biSize;
 	emr->offBits = sizeof(EMRCREATEDIBPATTERNBRUSHPT) + biSize;
 	memcpy((char *)emr + sizeof(EMRCREATEDIBPATTERNBRUSHPT), info,
-	       biSize + bmSize ); 
+	       biSize + bmSize );
 
 	if(!EMFDRV_WriteRecord( dev, &emr->emr ))
 	    index = 0;
diff --git a/dlls/gdi/freetype.c b/dlls/gdi/freetype.c
index 418ba3f..016384a 100644
--- a/dlls/gdi/freetype.c
+++ b/dlls/gdi/freetype.c
@@ -244,7 +244,7 @@
     StyleW = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR));
     MultiByteToWideChar(CP_ACP, 0, ft_face->style_name, -1, StyleW, len);
 
-    
+
     for(insertface = &family->FirstFace; *insertface;
 	insertface = &(*insertface)->next) {
         if(!strcmpW((*insertface)->StyleName, StyleW)) {
@@ -337,7 +337,7 @@
     nc->name = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR));
     MultiByteToWideChar(CP_ACP, 0, str, -1, nc->name, len);
 }
-  
+
 static void LoadSubstList(void)
 {
     FontSubst *psub, **ppsub;
@@ -491,7 +491,7 @@
 	   <= 2.0.3 has FT_Sqrt64 */
 	  goto sym_not_found;
       }
-	
+
     if(pFT_Init_FreeType(&library) != 0) {
         ERR("Can't init FreeType library\n");
 	wine_dlclose(ft_handle, NULL, 0);
@@ -685,7 +685,7 @@
     TRACE("numRecs = %d numRatios = %d\n", numRecs, numRatios);
     for(i = 0; i < numRatios; i++) {
 	Ratios ratio;
-	
+
 	offset = (3 * 2) + (i * sizeof(Ratios));
 	WineEngGetFontData(font, MS_VDMX_TAG, offset, &ratio, sizeof(Ratios));
 	offset = -1;
@@ -695,12 +695,12 @@
 	if(ratio.bCharSet != 1)
 	    continue;
 
-	if((ratio.xRatio == 0 && 
+	if((ratio.xRatio == 0 &&
 	    ratio.yStartRatio == 0 &&
 	    ratio.yEndRatio == 0) ||
-	   (devXRatio == ratio.xRatio && 
+	   (devXRatio == ratio.xRatio &&
 	    devYRatio >= ratio.yStartRatio &&
-	    devYRatio <= ratio.yEndRatio)) 
+	    devYRatio <= ratio.yEndRatio))
 	    {
 		offset = (3 * 2) + (numRatios * 4) + (i * 2);
 		WineEngGetFontData(font, MS_VDMX_TAG, offset, tmp, 2);
@@ -767,10 +767,10 @@
 	    for(i = 0; i < recs; i++) {
 		USHORT yPelHeight;
 		yPelHeight = GET_BE_WORD(&vTable[i * 6]);
-		
+
 		if(yPelHeight > ppem)
 		    break; /* failed */
-		
+
 		if(yPelHeight == ppem) {
 		    font->yMax = GET_BE_WORD(&vTable[(i * 6) + 2]);
 		    font->yMin = GET_BE_WORD(&vTable[(i * 6) + 4]);
@@ -930,7 +930,7 @@
     for(gdiFont = GdiFontList; gdiFont; gdiFont = gdiFont->next) {
 	FONTOBJ *font = GDI_GetObjPtr(gdiFont->hfont, FONT_MAGIC);
 	LOGFONTW *plf = &font->logfont;
-	TRACE("gdiFont=%p  hfont=%x (%s)\n", 
+	TRACE("gdiFont=%p  hfont=%x (%s)\n",
 	       gdiFont, gdiFont->hfont, debugstr_w(plf->lfFaceName));
 	GDI_ReleaseObj(gdiFont->hfont);
     }
@@ -950,14 +950,14 @@
     TRACE("destroying hfont=%x\n", handle);
     if(TRACE_ON(font))
 	DumpGdiFontList();
-    
+
     for(gdiFont = GdiFontList; gdiFont; gdiFont = gdiFont->next) {
 	if(gdiFont->hfont == handle) {
 	    if(gdiPrev)
 		gdiPrev->next = gdiFont->next;
 	    else
 		GdiFontList = gdiFont->next;
-	    
+
 	    free_font(gdiFont);
 	    return TRUE;
 	}
@@ -1106,7 +1106,7 @@
 		        csi.ciCharset = DEFAULT_CHARSET;
 		    if(i == 31) csi.ciCharset = SYMBOL_CHARSET;
 		    if(csi.ciCharset != DEFAULT_CHARSET) {
-		        elf.elfLogFont.lfCharSet = ntm.ntmTm.tmCharSet = 
+		        elf.elfLogFont.lfCharSet = ntm.ntmTm.tmCharSet =
 			  csi.ciCharset;
 			  if(ElfScriptsW[i])
 			      strcpyW(elf.elfScript, ElfScriptsW[i]);
@@ -1219,7 +1219,7 @@
     font->gm[glyph_index].bbx = (right - left) >> 6;
 
     if(font->orientation == 0) {
-	top = (ft_face->glyph->metrics.horiBearingY + 63) & -64;;
+	top = (ft_face->glyph->metrics.horiBearingY + 63) & -64;
 	bottom = (ft_face->glyph->metrics.horiBearingY -
 		  ft_face->glyph->metrics.height) & -64;
 	lpgm->gmCellIncX = font->gm[glyph_index].adv;
@@ -1271,7 +1271,7 @@
 
     if(format == GGO_METRICS)
         return 1; /* FIXME */
-    
+
     if(ft_face->glyph->format != ft_glyph_format_outline) {
         FIXME("loaded a bitmap\n");
 	return GDI_ERROR;
@@ -1437,7 +1437,7 @@
     FT_Fixed x_scale, y_scale;
 
     TRACE("font=%p, ptm=%p\n", font, ptm);
-    
+
     x_scale = ft_face->size->metrics.x_scale;
     y_scale = ft_face->size->metrics.y_scale;
 
@@ -1554,7 +1554,7 @@
     TRACE("font=%p\n", font);
 
     needed = sizeof(*potm);
-    
+
     lenfam = MultiByteToWideChar(CP_ACP, 0, ft_face->family_name, -1, NULL, 0)
       * sizeof(WCHAR);
     family_nameW = HeapAlloc(GetProcessHeap(), 0, lenfam);
@@ -1610,7 +1610,7 @@
     potm->otmSize = needed;
 
     WineEngGetTextMetrics(font, &potm->otmTextMetrics);
-    
+
     potm->otmFiller = 0;
     memcpy(&potm->otmPanoseNumber, pOS2->panose, PANOSE_COUNT);
     potm->otmfsSelection = pOS2->fsSelection;
@@ -1659,7 +1659,7 @@
         strcatW((WCHAR*)cp, spaceW);
 	strcatW((WCHAR*)cp, style_nameW);
 	cp += lenfam + lensty;
-    } else 
+    } else
         cp += lenfam;
     potm->otmpFullName = (LPSTR)(cp - (char*)potm);
     strcpyW((WCHAR*)cp, family_nameW);
@@ -1714,7 +1714,7 @@
     size->cx = 0;
     WineEngGetTextMetrics(font, &tm);
     size->cy = tm.tmHeight;
- 
+
    for(idx = 0; idx < count; idx++) {
         WineEngGetGlyphOutline(font, wstr[idx], GGO_METRICS, &gm, 0, NULL,
 			       NULL);
@@ -1741,7 +1741,7 @@
     size->cx = 0;
     WineEngGetTextMetrics(font, &tm);
     size->cy = tm.tmHeight;
- 
+
    for(idx = 0; idx < count; idx++) {
         WineEngGetGlyphOutline(font, indices[idx],
 			       GGO_METRICS | GGO_GLYPH_INDEX, &gm, 0, NULL,
diff --git a/dlls/gdi/mfdrv/bitblt.c b/dlls/gdi/mfdrv/bitblt.c
index 9c31a33..d5730ca 100644
--- a/dlls/gdi/mfdrv/bitblt.c
+++ b/dlls/gdi/mfdrv/bitblt.c
@@ -73,7 +73,7 @@
       *(mr->rdParm + 5) = yDst;
       *(mr->rdParm + 6) = xDst;
       ret = MFDRV_WriteRecord( devDst, mr, mr->rdSize * 2);
-    } 
+    }
     else
         ret = FALSE;
     HeapFree( GetProcessHeap(), 0, mr);
@@ -101,15 +101,15 @@
     BITMAP16  BM;
     METAFILEDRV_PDEVICE *physDevSrc = (METAFILEDRV_PDEVICE *)devSrc;
     DC *dcSrc = physDevSrc->dc;
-#ifdef STRETCH_VIA_DIB    
+#ifdef STRETCH_VIA_DIB
     LPBITMAPINFOHEADER lpBMI;
     WORD nBPP;
-#endif  
+#endif
     GetObject16(dcSrc->hBitmap, sizeof(BITMAP16), &BM);
 #ifdef STRETCH_VIA_DIB
     nBPP = BM.bmPlanes * BM.bmBitsPixel;
-    len = sizeof(METARECORD) + 10 * sizeof(INT16) 
-            + sizeof(BITMAPINFOHEADER) + (nBPP != 24 ? 1 << nBPP: 0) * sizeof(RGBQUAD) 
+    len = sizeof(METARECORD) + 10 * sizeof(INT16)
+            + sizeof(BITMAPINFOHEADER) + (nBPP != 24 ? 1 << nBPP: 0) * sizeof(RGBQUAD)
               + ((BM.bmWidth * nBPP + 31) / 32) * 4 * BM.bmHeight;
     if (!(mr = HeapAlloc( GetProcessHeap(), 0, len)))
 	return FALSE;
@@ -146,7 +146,7 @@
     TRACE("len = %ld  rop=%lx  \n",len,rop);
     if (GetBitmapBits( dcSrc->hBitmap, BM.bmWidthBytes * BM.bmHeight,
                          mr->rdParm +15))
-#endif    
+#endif
     {
       mr->rdSize = len / sizeof(INT16);
       *(mr->rdParm) = LOWORD(rop);
@@ -160,7 +160,7 @@
       *(mr->rdParm + 8) = yDst;
       *(mr->rdParm + 9) = xDst;
       ret = MFDRV_WriteRecord( devDst, mr, mr->rdSize * 2);
-    }  
+    }
     else
         ret = FALSE;
     HeapFree( GetProcessHeap(), 0, mr);
@@ -208,7 +208,7 @@
     return heightSrc;
 }
 
-	
+
 /***********************************************************************
  *           MFDRV_SetDIBitsToDeivce
  */
@@ -248,4 +248,4 @@
     return lines;
 }
 
-	
+
diff --git a/dlls/gdi/mfdrv/graphics.c b/dlls/gdi/mfdrv/graphics.c
index 54c4ad3..591d05c 100644
--- a/dlls/gdi/mfdrv/graphics.c
+++ b/dlls/gdi/mfdrv/graphics.c
@@ -49,7 +49,7 @@
 /***********************************************************************
  *           MFDRV_Arc
  */
-BOOL 
+BOOL
 MFDRV_Arc( PHYSDEV dev, INT left, INT top, INT right, INT bottom,
            INT xstart, INT ystart, INT xend, INT yend )
 {
@@ -102,7 +102,7 @@
 /***********************************************************************
  *           MFDRV_RoundRect
  */
-BOOL 
+BOOL
 MFDRV_RoundRect( PHYSDEV dev, INT left, INT top, INT right,
                  INT bottom, INT ell_width, INT ell_height )
 {
@@ -117,7 +117,7 @@
 MFDRV_SetPixel( PHYSDEV dev, INT x, INT y, COLORREF color )
 {
     return MFDRV_MetaParam4(dev, META_SETPIXEL, x, y,HIWORD(color),
-			    LOWORD(color)); 
+			    LOWORD(color));
 }
 
 
@@ -130,7 +130,7 @@
     DWORD len;
     METARECORD *mr;
 
-    len = sizeof(METARECORD) + (count * 4); 
+    len = sizeof(METARECORD) + (count * 4);
     if (!(mr = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, len )))
 	return FALSE;
 
@@ -157,7 +157,7 @@
     pt16 = (LPPOINT16)HeapAlloc( GetProcessHeap(), 0, sizeof(POINT16)*count );
     if(!pt16) return FALSE;
     for (i=count;i--;) CONV_POINT32TO16(&(pt[i]),&(pt16[i]));
-    ret = MFDRV_MetaPoly(dev, META_POLYLINE, pt16, count); 
+    ret = MFDRV_MetaPoly(dev, META_POLYLINE, pt16, count);
 
     HeapFree( GetProcessHeap(), 0, pt16 );
     return ret;
@@ -177,7 +177,7 @@
     pt16 = (LPPOINT16) HeapAlloc( GetProcessHeap(), 0, sizeof(POINT16)*count );
     if(!pt16) return FALSE;
     for (i=count;i--;) CONV_POINT32TO16(&(pt[i]),&(pt16[i]));
-    ret = MFDRV_MetaPoly(dev, META_POLYGON, pt16, count); 
+    ret = MFDRV_MetaPoly(dev, META_POLYGON, pt16, count);
 
     HeapFree( GetProcessHeap(), 0, pt16 );
     return ret;
@@ -187,7 +187,7 @@
 /**********************************************************************
  *          MFDRV_PolyPolygon
  */
-BOOL 
+BOOL
 MFDRV_PolyPolygon( PHYSDEV dev, const POINT* pt, const INT* counts, UINT polygons)
 {
     int		i,j;
@@ -196,7 +196,7 @@
     BOOL	ret;
 
     for (i=0;i<polygons;i++) {
-    	pt16=(LPPOINT16)HeapAlloc( GetProcessHeap(), 0, 
+    	pt16=(LPPOINT16)HeapAlloc( GetProcessHeap(), 0,
 				   sizeof(POINT16) * counts[i] );
 	if(!pt16) return FALSE;
 	for (j=counts[i];j--;) CONV_POINT32TO16(&(curpt[j]),&(pt16[j]));
@@ -213,11 +213,11 @@
 /**********************************************************************
  *          MFDRV_ExtFloodFill
  */
-BOOL 
+BOOL
 MFDRV_ExtFloodFill( PHYSDEV dev, INT x, INT y, COLORREF color, UINT fillType )
 {
     return MFDRV_MetaParam4(dev,META_FLOODFILL,x,y,HIWORD(color),
-			    LOWORD(color)); 
+			    LOWORD(color));
 }
 
 
@@ -225,7 +225,7 @@
  *         MFDRV_CreateRegion
  *
  * For explanation of the format of the record see MF_Play_MetaCreateRegion in
- * objects/metafile.c 
+ * objects/metafile.c
  */
 static INT16 MFDRV_CreateRegion(PHYSDEV dev, HRGN hrgn)
 {
@@ -283,7 +283,7 @@
 	}
     }
     len = Param - (WORD *)mr;
-    
+
     mr->rdParm[0] = 0;
     mr->rdParm[1] = 6;
     mr->rdParm[2] = 0x1234;
@@ -297,10 +297,10 @@
     mr->rdParm[10] = rgndata->rdh.rcBound.bottom;
     mr->rdFunction = META_CREATEREGION;
     mr->rdSize = len / 2;
-    ret = MFDRV_WriteRecord( dev, mr, mr->rdSize * 2 );	
+    ret = MFDRV_WriteRecord( dev, mr, mr->rdSize * 2 );
     HeapFree( GetProcessHeap(), 0, mr );
     HeapFree( GetProcessHeap(), 0, rgndata );
-    if(!ret) 
+    if(!ret)
     {
         WARN("MFDRV_WriteRecord failed\n");
 	return -1;
diff --git a/dlls/gdi/mfdrv/init.c b/dlls/gdi/mfdrv/init.c
index cb6fd19..ad952db 100644
--- a/dlls/gdi/mfdrv/init.c
+++ b/dlls/gdi/mfdrv/init.c
@@ -149,7 +149,7 @@
 {
     DC *dc;
     METAFILEDRV_PDEVICE *physDev;
-    
+
     if (!(dc = DC_AllocDC( &MFDRV_Funcs ))) return NULL;
     dc->header.wMagic = METAFILE_DC_MAGIC;
 
@@ -209,7 +209,7 @@
  * RETURNS
  *  A handle to the metafile DC if successful, NULL on failure.
  */
-HDC16 WINAPI CreateMetaFile16( 
+HDC16 WINAPI CreateMetaFile16(
 			      LPCSTR filename /* [in] Filename of disk metafile */
 )
 {
@@ -222,7 +222,7 @@
 
     if (!(dc = MFDRV_AllocMetaFile())) return 0;
     physDev = (METAFILEDRV_PDEVICE *)dc->physDev;
-    
+
     if (filename)  /* disk based metafile */
     {
         physDev->mh->mtType = METAFILE_DISK;
@@ -243,7 +243,7 @@
     }
     else  /* memory based metafile */
 	physDev->mh->mtType = METAFILE_MEMORY;
-	
+
     TRACE("returning %04x\n", dc->hSelf);
     ret = dc->hSelf;
     GDI_ReleaseObj( dc->hSelf );
@@ -253,7 +253,7 @@
 /**********************************************************************
  *	     CreateMetaFileA   (GDI32.@)
  */
-HDC WINAPI CreateMetaFileA( 
+HDC WINAPI CreateMetaFileA(
 			      LPCSTR filename /* [in] Filename of disk metafile */
 )
 {
@@ -284,11 +284,11 @@
 /**********************************************************************
  *          MFDRV_CloseMetaFile
  */
-static DC *MFDRV_CloseMetaFile( HDC hdc ) 
+static DC *MFDRV_CloseMetaFile( HDC hdc )
 {
     DC *dc;
     METAFILEDRV_PDEVICE *physDev;
-    
+
     TRACE("(%04x)\n", hdc );
 
     if (!(dc = (DC *) GDI_GetObjPtr( hdc, METAFILE_DC_MAGIC ))) return 0;
@@ -302,7 +302,7 @@
     {
         MFDRV_DeleteDC( dc->physDev );
 	return 0;
-    }	
+    }
 
     if (physDev->mh->mtType == METAFILE_DISK)  /* disk based metafile */
     {
@@ -328,7 +328,7 @@
  *	     CloseMetaFile     (GDI.126)
  *	     CloseMetaFile16   (GDI32.@)
  */
-HMETAFILE16 WINAPI CloseMetaFile16( 
+HMETAFILE16 WINAPI CloseMetaFile16(
 				   HDC16 hdc /* [in] Metafile DC to close */
 )
 {
@@ -356,7 +356,7 @@
  * RETURNS
  *  Handle of newly created metafile on success, NULL on failure.
  */
-HMETAFILE WINAPI CloseMetaFile( 
+HMETAFILE WINAPI CloseMetaFile(
 				   HDC hdc /* [in] Metafile DC to close */
 )
 {
@@ -420,7 +420,7 @@
 {
     char buffer[8];
     METARECORD *mr = (METARECORD *)&buffer;
-    
+
     mr->rdSize = 3;
     mr->rdFunction = func;
     return MFDRV_WriteRecord( dev, mr, mr->rdSize * 2);
@@ -434,7 +434,7 @@
 {
     char buffer[8];
     METARECORD *mr = (METARECORD *)&buffer;
-    
+
     mr->rdSize = 4;
     mr->rdFunction = func;
     *(mr->rdParm) = param1;
@@ -449,7 +449,7 @@
 {
     char buffer[10];
     METARECORD *mr = (METARECORD *)&buffer;
-    
+
     mr->rdSize = 5;
     mr->rdFunction = func;
     *(mr->rdParm) = param2;
@@ -462,12 +462,12 @@
  *         MFDRV_MetaParam4
  */
 
-BOOL MFDRV_MetaParam4(PHYSDEV dev, short func, short param1, short param2, 
+BOOL MFDRV_MetaParam4(PHYSDEV dev, short func, short param1, short param2,
 		      short param3, short param4)
 {
     char buffer[14];
     METARECORD *mr = (METARECORD *)&buffer;
-    
+
     mr->rdSize = 7;
     mr->rdFunction = func;
     *(mr->rdParm) = param4;
@@ -482,12 +482,12 @@
  *         MFDRV_MetaParam6
  */
 
-BOOL MFDRV_MetaParam6(PHYSDEV dev, short func, short param1, short param2, 
+BOOL MFDRV_MetaParam6(PHYSDEV dev, short func, short param1, short param2,
 		      short param3, short param4, short param5, short param6)
 {
     char buffer[18];
     METARECORD *mr = (METARECORD *)&buffer;
-    
+
     mr->rdSize = 9;
     mr->rdFunction = func;
     *(mr->rdParm) = param6;
@@ -503,13 +503,13 @@
 /******************************************************************
  *         MFDRV_MetaParam8
  */
-BOOL MFDRV_MetaParam8(PHYSDEV dev, short func, short param1, short param2, 
+BOOL MFDRV_MetaParam8(PHYSDEV dev, short func, short param1, short param2,
 		      short param3, short param4, short param5,
 		      short param6, short param7, short param8)
 {
     char buffer[22];
     METARECORD *mr = (METARECORD *)&buffer;
-    
+
     mr->rdSize = 11;
     mr->rdFunction = func;
     *(mr->rdParm) = param8;
diff --git a/dlls/gdi/mfdrv/metafiledrv.h b/dlls/gdi/mfdrv/metafiledrv.h
index f1af970..caca363 100644
--- a/dlls/gdi/mfdrv/metafiledrv.h
+++ b/dlls/gdi/mfdrv/metafiledrv.h
@@ -33,7 +33,7 @@
     DC          *dc;
     METAHEADER  *mh;           /* Pointer to metafile header */
     UINT       nextHandle;     /* Next handle number */
-    HFILE      hFile;          /* HFILE for disk based MetaFile */ 
+    HFILE      hFile;          /* HFILE for disk based MetaFile */
 } METAFILEDRV_PDEVICE;
 
 
diff --git a/dlls/gdi/mfdrv/objects.c b/dlls/gdi/mfdrv/objects.c
index 9e5f54a..4c5b7c6 100644
--- a/dlls/gdi/mfdrv/objects.c
+++ b/dlls/gdi/mfdrv/objects.c
@@ -86,7 +86,7 @@
 
 	    bmSize = DIB_GetDIBImageBytes(bm.bmWidth, bm.bmHeight, 1);
 
-	    size = sizeof(METARECORD) + sizeof(WORD) + sizeof(BITMAPINFO) + 
+	    size = sizeof(METARECORD) + sizeof(WORD) + sizeof(BITMAPINFO) +
 	      sizeof(RGBQUAD) + bmSize;
 
 	    mr = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, size);
diff --git a/dlls/gdi/mfdrv/text.c b/dlls/gdi/mfdrv/text.c
index 33d8792..b185d9c 100644
--- a/dlls/gdi/mfdrv/text.c
+++ b/dlls/gdi/mfdrv/text.c
@@ -37,7 +37,7 @@
     BOOL ret;
     DWORD len;
     METARECORD *mr;
-   
+
     if (flags && !rect)
 	    WARN("Inconsistent flags and rect\n");
     len = sizeof(METARECORD) + (((count + 1) >> 1) * 2) + 2 * sizeof(short)
diff --git a/dlls/gdi/printdrv.c b/dlls/gdi/printdrv.c
index 273f614..cd17a57 100644
--- a/dlls/gdi/printdrv.c
+++ b/dlls/gdi/printdrv.c
@@ -1,6 +1,6 @@
-/* 
+/*
  * Implementation of some printer driver bits
- * 
+ *
  * Copyright 1996 John Harvey
  * Copyright 1998 Huw Davies
  * Copyright 1998 Andreas Mohr
@@ -80,7 +80,7 @@
  * StartDoc calls the STARTDOC Escape with the input data pointing to DocName
  * and the output data (which is used as a second input parameter).pointing at
  * the whole docinfo structure.  This seems to be an undocumented feature of
- * the STARTDOC Escape. 
+ * the STARTDOC Escape.
  *
  * Note: we now do it the other way, with the STARTDOC Escape calling StartDoc.
  */
@@ -101,7 +101,7 @@
 
 /*************************************************************************
  *                  StartDocW [GDI32.@]
- * 
+ *
  */
 INT WINAPI StartDocW(HDC hdc, const DOCINFOW* doc)
 {
@@ -109,7 +109,7 @@
     INT ret;
 
     docA.cbSize = doc->cbSize;
-    docA.lpszDocName = doc->lpszDocName ? 
+    docA.lpszDocName = doc->lpszDocName ?
       HEAP_strdupWtoA( GetProcessHeap(), 0, doc->lpszDocName ) : NULL;
     docA.lpszOutput = doc->lpszOutput ?
       HEAP_strdupWtoA( GetProcessHeap(), 0, doc->lpszOutput ) : NULL;
@@ -312,7 +312,7 @@
 /*
  * The following function should implement a queing system
  */
-struct hpq 
+struct hpq
 {
     struct hpq 	*next;
     int		 tag;
@@ -325,7 +325,7 @@
  *           CreatePQ   (GDI.230)
  *
  */
-HPQ16 WINAPI CreatePQ16(INT16 size) 
+HPQ16 WINAPI CreatePQ16(INT16 size)
 {
 #if 0
     HGLOBAL16 hpq = 0;
@@ -353,7 +353,7 @@
  *           DeletePQ   (GDI.235)
  *
  */
-INT16 WINAPI DeletePQ16(HPQ16 hPQ) 
+INT16 WINAPI DeletePQ16(HPQ16 hPQ)
 {
     return GlobalFree16((HGLOBAL16)hPQ);
 }
@@ -362,15 +362,15 @@
  *           ExtractPQ   (GDI.232)
  *
  */
-INT16 WINAPI ExtractPQ16(HPQ16 hPQ) 
-{ 
+INT16 WINAPI ExtractPQ16(HPQ16 hPQ)
+{
     struct hpq *queue, *prev, *current, *currentPrev;
     int key = 0, tag = -1;
     currentPrev = prev = NULL;
     queue = current = hpqueue;
     if (current)
         key = current->key;
-    
+
     while (current)
     {
         currentPrev = current;
@@ -387,15 +387,15 @@
     if (queue)
     {
         tag = queue->tag;
-        
+
         if (prev)
             prev->next = queue->next;
         else
             hpqueue = queue->next;
         HeapFree(GetProcessHeap(), 0, queue);
     }
-    
-    TRACE("%x got tag %d key %d\n", hPQ, tag, key); 
+
+    TRACE("%x got tag %d key %d\n", hPQ, tag, key);
 
     return tag;
 }
@@ -404,7 +404,7 @@
  *           InsertPQ   (GDI.233)
  *
  */
-INT16 WINAPI InsertPQ16(HPQ16 hPQ, INT16 tag, INT16 key) 
+INT16 WINAPI InsertPQ16(HPQ16 hPQ, INT16 tag, INT16 key)
 {
     struct hpq *queueItem = HeapAlloc(GetProcessHeap(), 0, sizeof(struct hpq));
     if(queueItem == NULL) {
@@ -415,7 +415,7 @@
     hpqueue = queueItem;
     queueItem->key = key;
     queueItem->tag = tag;
-    
+
     FIXME("(%x %d %d): stub???\n", hPQ, tag, key);
     return TRUE;
 }
@@ -424,9 +424,9 @@
  *           MinPQ   (GDI.231)
  *
  */
-INT16 WINAPI MinPQ16(HPQ16 hPQ) 
+INT16 WINAPI MinPQ16(HPQ16 hPQ)
 {
-    FIXME("(%x): stub\n", hPQ); 
+    FIXME("(%x): stub\n", hPQ);
     return 0;
 }
 
@@ -434,16 +434,16 @@
  *           SizePQ   (GDI.234)
  *
  */
-INT16 WINAPI SizePQ16(HPQ16 hPQ, INT16 sizechange) 
-{  
-    FIXME("(%x %d): stub\n", hPQ, sizechange); 
-    return -1; 
+INT16 WINAPI SizePQ16(HPQ16 hPQ, INT16 sizechange)
+{
+    FIXME("(%x %d): stub\n", hPQ, sizechange);
+    return -1;
 }
 
 
 
-/* 
- * The following functions implement part of the spooling process to 
+/*
+ * The following functions implement part of the spooling process to
  * print manager.  I would like to see wine have a version of print managers
  * that used LPR/LPD.  For simplicity print jobs will be sent to a file for
  * now.
@@ -522,7 +522,7 @@
             close (fds[1]);
             system(psCmdP);
             exit(0);
-            
+
         }
         close (fds[0]);
         fd = fds[1];
@@ -542,7 +542,7 @@
 
         if ((fd = open(buffer, O_CREAT | O_TRUNC | O_WRONLY , 0600)) < 0)
         {
-            ERR("Failed to create spool file '%s' ('%s'). (error %s)\n", 
+            ERR("Failed to create spool file '%s' ('%s'). (error %s)\n",
                 buffer, psCmdP, strerror(errno));
         }
     }
@@ -593,7 +593,7 @@
                 WARN("Memory exausted!\n");
                 return hHandle;
             }
-            
+
             hHandle = 1;
 
 	    pPrintJob->pszOutput = HeapAlloc(GetProcessHeap(), 0, strlen(lpOutput)+1);
@@ -606,8 +606,8 @@
 	    pPrintJob->hDC = hDC;
 	    pPrintJob->fd = fd;
 	    pPrintJob->nIndex = 0;
-	    pPrintJob->hHandle = hHandle; 
-	    gPrintJobsTable[pPrintJob->nIndex] = pPrintJob; 
+	    pPrintJob->hHandle = hHandle;
+	    gPrintJobsTable[pPrintJob->nIndex] = pPrintJob;
 	}
     }
     TRACE("return %04x\n", hHandle);
@@ -710,7 +710,7 @@
     return nRet;
 }
 
-/* 
+/*
  * The following two function would allow a page to be sent to the printer
  * when it has been processed.  For simplicity they havn't been implemented.
  * This means a whole job has to be processed before it is sent to the printer.
@@ -872,7 +872,7 @@
 	    RegSetValueExA(hkey2, lpProfile, 0, REG_DWORD, (LPBYTE)&SetData, 4); /* no result returned */
 	}
     }
-	
+
 failed:
     if (hkey2) RegCloseKey(hkey2);
     if (hkey) RegCloseKey(hkey);
@@ -916,9 +916,9 @@
 
     if (((DWORD)lpProfile == INT_PD_DEFAULT_DEVMODE) || (HIWORD(lpProfile) &&
     (!strcmp(lpProfile, DefaultDevMode)))) {
-	if ( RegOpenKeyA(HKEY_LOCAL_MACHINE, RegStr_Printer, &hkey) 
+	if ( RegOpenKeyA(HKEY_LOCAL_MACHINE, RegStr_Printer, &hkey)
 	     != ERROR_SUCCESS ||
-	     RegSetValueExA(hkey, DefaultDevMode, 0, REG_BINARY, 
+	     RegSetValueExA(hkey, DefaultDevMode, 0, REG_BINARY,
 			      lpPrinterData, dwSize) != ERROR_SUCCESS )
 	        res = ERROR_INVALID_PRINTER_NAME;
     }
@@ -929,7 +929,7 @@
 	if( (res = RegOpenKeyA(HKEY_LOCAL_MACHINE, RegStr_Printer, &hkey)) ==
 	    ERROR_SUCCESS ) {
 
-	    if (!lpPrinterData) 
+	    if (!lpPrinterData)
 	        res = RegDeleteValueA(hkey, lpProfile);
 	    else
                 res = RegSetValueExA(hkey, lpProfile, 0, lpType,
diff --git a/dlls/gdi/win16drv/font.c b/dlls/gdi/win16drv/font.c
index 6af457a..d959853 100644
--- a/dlls/gdi/win16drv/font.c
+++ b/dlls/gdi/win16drv/font.c
@@ -48,9 +48,9 @@
     str = HeapAlloc( GetProcessHeap(), 0, len );
     WideCharToMultiByte( CP_ACP, 0, wstr, count, str, len, NULL, NULL );
 
-    dwRet = PRTDRV_ExtTextOut(physDev->segptrPDEVICE, 0, 0, 
+    dwRet = PRTDRV_ExtTextOut(physDev->segptrPDEVICE, 0, 0,
                               NULL, str, -len,  physDev->FontInfo,
-			      win16drv_SegPtr_DrawMode, 
+			      win16drv_SegPtr_DrawMode,
 			      win16drv_SegPtr_TextXForm, NULL, NULL, 0);
     size->cx = XDSTOLS(dc,LOWORD(dwRet));
     size->cy = YDSTOLS(dc,HIWORD(dwRet));
@@ -109,29 +109,29 @@
     }
 
     nSize = PRTDRV_RealizeObject (physDev->segptrPDEVICE, DRVOBJ_FONT,
-                                  &physDev->lf, 0, 0); 
+                                  &physDev->lf, 0, 0);
 
-    if( physDev->FontInfo && 
+    if( physDev->FontInfo &&
 	HeapSize( GetProcessHeap(), 0, physDev->FontInfo ) < nSize )
     {
         HeapFree( GetProcessHeap(), 0, physDev->FontInfo );
 	physDev->FontInfo = NULL;
     }
-    
+
     if( !physDev->FontInfo )
         physDev->FontInfo = HeapAlloc( GetProcessHeap(), 0, nSize );
 
 
     nSize = PRTDRV_RealizeObject(physDev->segptrPDEVICE, DRVOBJ_FONT,
-                                 &physDev->lf, 
-                                 physDev->FontInfo, 
-                                 win16drv_SegPtr_TextXForm ); 
+                                 &physDev->lf,
+                                 physDev->FontInfo,
+                                 win16drv_SegPtr_TextXForm );
 
-#define fi physDev->FontInfo    
+#define fi physDev->FontInfo
     physDev->tm.tmHeight           = YDSTOLS(dc, fi->dfPixHeight);
     physDev->tm.tmAscent           = YDSTOLS(dc, fi->dfAscent);
     physDev->tm.tmDescent          = physDev->tm.tmHeight -
-					    physDev->tm.tmAscent; 
+					    physDev->tm.tmAscent;
     physDev->tm.tmInternalLeading  = YDSTOLS(dc, fi->dfInternalLeading);
     physDev->tm.tmExternalLeading  = YDSTOLS(dc, fi->dfExternalLeading);
     physDev->tm.tmAveCharWidth     = XDSTOLS(dc, fi->dfAvgWidth);
@@ -176,9 +176,9 @@
 
     TRACE("%d - %d into %p\n", firstChar, lastChar, buffer );
 
-    wRet = PRTDRV_GetCharWidth( physDev->segptrPDEVICE, buffer, firstChar, 
-				lastChar, physDev->FontInfo, 
-				win16drv_SegPtr_DrawMode, 
+    wRet = PRTDRV_GetCharWidth( physDev->segptrPDEVICE, buffer, firstChar,
+				lastChar, physDev->FontInfo,
+				win16drv_SegPtr_DrawMode,
 				win16drv_SegPtr_TextXForm );
     if( TRACE_ON(win16drv) ){
         for(i = 0; i <= lastChar - firstChar; i++)
@@ -223,8 +223,8 @@
 
 /***********************************************************************
  * EnumCallback (GDI.158)
- * 
- * This is the callback function used when EnumDFonts is called. 
+ *
+ * This is the callback function used when EnumDFonts is called.
  * (The printer drivers uses it to pass info on available fonts).
  *
  * lpvClientData is the pointer passed to EnumDFonts, which points to a WEPFC
@@ -233,7 +233,7 @@
  */
 WORD WINAPI EnumCallback16(LPENUMLOGFONT16 lpLogFont,
                            LPNEWTEXTMETRIC16 lpTextMetrics,
-                           WORD wFontType, LONG lpClientData) 
+                           WORD wFontType, LONG lpClientData)
 {
     ENUMLOGFONTEXW lfW;
     ENUMLOGFONTEX16 lf16;
diff --git a/dlls/gdi/win16drv/graphics.c b/dlls/gdi/win16drv/graphics.c
index 7d9af86..f3dd7d9 100644
--- a/dlls/gdi/win16drv/graphics.c
+++ b/dlls/gdi/win16drv/graphics.c
@@ -41,7 +41,7 @@
     points[1].x = dc->DCOrgX + XLPTODP( dc, x );
     points[1].y = dc->DCOrgY + YLPTODP( dc, y );
     bRet = PRTDRV_Output(physDev->segptrPDEVICE,
-                         OS_POLYLINE, 2, points, 
+                         OS_POLYLINE, 2, points,
                          physDev->PenInfo,
                          NULL,
                          win16drv_SegPtr_DrawMode, dc->hClipRgn);
@@ -73,7 +73,7 @@
     points[1].x = XLPTODP(dc, right);
     points[1].y = YLPTODP(dc, bottom);
     bRet = PRTDRV_Output(physDev->segptrPDEVICE,
-                           OS_RECTANGLE, 2, points, 
+                           OS_RECTANGLE, 2, points,
                            physDev->PenInfo,
 			   physDev->BrushInfo,
 			   win16drv_SegPtr_DrawMode, dc->hClipRgn);
@@ -100,8 +100,8 @@
         count++; /* Ensure polygon is closed */
 
     points = HeapAlloc( GetProcessHeap(), 0, count * sizeof(POINT16) );
-    if(points == NULL) return FALSE;    
- 
+    if(points == NULL) return FALSE;
+
     for (i = 0; i < count - 1; i++)
     {
       points[i].x = XLPTODP( dc, pt[i].x );
@@ -110,7 +110,7 @@
     points[count-1].x = points[0].x;
     points[count-1].y = points[0].y;
     bRet = PRTDRV_Output(physDev->segptrPDEVICE,
-                         OS_WINDPOLYGON, count, points, 
+                         OS_WINDPOLYGON, count, points,
                          physDev->PenInfo,
                          physDev->BrushInfo,
                          win16drv_SegPtr_DrawMode, dc->hClipRgn);
@@ -135,14 +135,14 @@
 
     points = HeapAlloc( GetProcessHeap(), 0, count * sizeof(POINT16) );
     if(points == NULL) return FALSE;
- 
+
     for (i = 0; i < count; i++)
     {
       points[i].x = XLPTODP( dc, pt[i].x );
       points[i].y = YLPTODP( dc, pt[i].y );
     }
     bRet = PRTDRV_Output(physDev->segptrPDEVICE,
-                         OS_POLYLINE, count, points, 
+                         OS_POLYLINE, count, points,
                          physDev->PenInfo,
                          NULL,
                          win16drv_SegPtr_DrawMode, dc->hClipRgn);
@@ -172,7 +172,7 @@
     points[1].y = YLPTODP(dc, bottom);
 
     bRet = PRTDRV_Output(physDev->segptrPDEVICE,
-                         OS_ELLIPSE, 2, points, 
+                         OS_ELLIPSE, 2, points,
                          physDev->PenInfo,
                          physDev->BrushInfo,
                          win16drv_SegPtr_DrawMode, dc->hClipRgn);
diff --git a/dlls/gdi/win16drv/init.c b/dlls/gdi/win16drv/init.c
index 0550337..56a6429 100644
--- a/dlls/gdi/win16drv/init.c
+++ b/dlls/gdi/win16drv/init.c
@@ -210,7 +210,7 @@
     lpTextXForm->txfWeight 	= 0x0190;
     lpTextXForm->txfItalic 	= 0x00;
     lpTextXForm->txfUnderline 	= 0x00;
-    lpTextXForm->txfStrikeOut 	= 0x00; 
+    lpTextXForm->txfStrikeOut 	= 0x00;
     lpTextXForm->txfOutPrecision = 0x02;
     lpTextXForm->txfClipPrecision = 0x01;
     lpTextXForm->txfAccelerator = 0x0001;
@@ -220,18 +220,18 @@
 
 void InitDrawMode(LPDRAWMODE lpDrawMode)
 {
-    lpDrawMode->Rop2		= 0x000d;       
-    lpDrawMode->bkMode		= 0x0001;     
-    lpDrawMode->bkColor		= 0x3fffffff;    
-    lpDrawMode->TextColor	= 0x20000000;  
+    lpDrawMode->Rop2		= 0x000d;
+    lpDrawMode->bkMode		= 0x0001;
+    lpDrawMode->bkColor		= 0x3fffffff;
+    lpDrawMode->TextColor	= 0x20000000;
     lpDrawMode->TBreakExtra	= 0x0000;
-    lpDrawMode->BreakExtra	= 0x0000; 
-    lpDrawMode->BreakErr	= 0x0000;   
-    lpDrawMode->BreakRem	= 0x0000;   
-    lpDrawMode->BreakCount	= 0x0000; 
-    lpDrawMode->CharExtra	= 0x0000;  
-    lpDrawMode->LbkColor	= 0x00ffffff;   
-    lpDrawMode->LTextColor	= 0x00000000;     
+    lpDrawMode->BreakExtra	= 0x0000;
+    lpDrawMode->BreakErr	= 0x0000;
+    lpDrawMode->BreakRem	= 0x0000;
+    lpDrawMode->BreakCount	= 0x0000;
+    lpDrawMode->CharExtra	= 0x0000;
+    lpDrawMode->LbkColor	= 0x00ffffff;
+    lpDrawMode->LTextColor	= 0x00000000;
     lpDrawMode->ICMCXform       = 0; /* ? */
     lpDrawMode->StretchBltMode  = STRETCH_ANDSCANS;
     lpDrawMode->eMiterLimit     = 1;
@@ -269,13 +269,13 @@
     if(!output) output = "LPT1:";
 
     /* Get GDIINFO which is the same as a DeviceCaps structure */
-    wRet = PRTDRV_Enable(&physDev->DevCaps, GETGDIINFO, device, driver, output,NULL); 
+    wRet = PRTDRV_Enable(&physDev->DevCaps, GETGDIINFO, device, driver, output,NULL);
 
     /* Add this to the DC */
     dc->bitsPerPixel = physDev->DevCaps.bitsPixel;
-    
+
     TRACE("Got devcaps width %d height %d bits %d planes %d\n",
-	  physDev->DevCaps.horzRes, physDev->DevCaps.vertRes, 
+	  physDev->DevCaps.horzRes, physDev->DevCaps.vertRes,
 	  physDev->DevCaps.bitsPixel, physDev->DevCaps.planes);
 
     /* Now we allocate enough memory for the PDEVICE structure */
@@ -286,30 +286,30 @@
 
     /* TTD Shouldn't really do pointer arithmetic on segment points */
     physDev->segptrPDEVICE = K32WOWGlobalLock16(GlobalAlloc16(GHND, nPDEVICEsize))+sizeof(PDEVICE_HEADER);
-    *((BYTE *)MapSL(physDev->segptrPDEVICE)+0) = 'N'; 
-    *((BYTE *)MapSL(physDev->segptrPDEVICE)+1) = 'B'; 
+    *((BYTE *)MapSL(physDev->segptrPDEVICE)+0) = 'N';
+    *((BYTE *)MapSL(physDev->segptrPDEVICE)+1) = 'B';
 
     /* Set up the header */
-    pPDH = (PDEVICE_HEADER *)((BYTE*)MapSL(physDev->segptrPDEVICE) - sizeof(PDEVICE_HEADER)); 
+    pPDH = (PDEVICE_HEADER *)((BYTE*)MapSL(physDev->segptrPDEVICE) - sizeof(PDEVICE_HEADER));
     pPDH->pLPD = pLPD;
-    
+
     TRACE("PDEVICE allocated %08lx\n",(DWORD)(physDev->segptrPDEVICE));
-    
+
     /* Now get the printer driver to initialise this data */
-    wRet = PRTDRV_Enable((LPVOID)physDev->segptrPDEVICE, INITPDEVICE, device, driver, output, NULL); 
+    wRet = PRTDRV_Enable((LPVOID)physDev->segptrPDEVICE, INITPDEVICE, device, driver, output, NULL);
 
     physDev->FontInfo = NULL;
     physDev->BrushInfo = NULL;
     physDev->PenInfo = NULL;
     win16drv_SegPtr_TextXForm = K32WOWGlobalLock16(GlobalAlloc16(GHND, sizeof(TEXTXFORM16)));
     win16drv_TextXFormP = MapSL(win16drv_SegPtr_TextXForm);
-    
+
     InitTextXForm(win16drv_TextXFormP);
 
     /* TTD Lots more to do here */
     win16drv_SegPtr_DrawMode = K32WOWGlobalLock16(GlobalAlloc16(GHND, sizeof(DRAWMODE)));
     win16drv_DrawModeP = MapSL(win16drv_SegPtr_DrawMode);
-    
+
     InitDrawMode(win16drv_DrawModeP);
 
     return TRUE;
@@ -317,7 +317,7 @@
 
 BOOL WIN16DRV_PatBlt( PHYSDEV dev, INT left, INT top, INT width, INT height, DWORD rop )
 {
-  
+
     WIN16DRV_PDEVICE *physDev = (WIN16DRV_PDEVICE *)dev;
     BOOL bRet = 0;
 
@@ -372,7 +372,7 @@
 		- After every write to printer port or spool file
 		- Several times when no more disk space
 		- Before every metafile record when GDI does banding
-		*/ 
+		*/
 
        /* Call Control with hdc as lpInData */
 	    HDC16 *seghdc = SEGPTR_NEW(HDC16);
@@ -413,7 +413,7 @@
 	      char *cp = SEGPTR_ALLOC(cbInput + 1);
 	      memcpy(cp, MapSL(lpInData), cbInput);
 	      cp[cbInput] = '\0';
-	    
+
 	      nRet = PRTDRV_Control(physDev->segptrPDEVICE, nEscape,
 				    SEGPTR_GET(cp), lpOutData);
 	      SEGPTR_FREE(cp);
@@ -437,7 +437,7 @@
 	}
     }
     else
-	WARN("Escape(nEscape = %04x) - ???\n", nEscape);      
+	WARN("Escape(nEscape = %04x) - ???\n", nEscape);
     return nRet;
 #endif
     /* FIXME: should convert args to SEGPTR and redo all the above */
diff --git a/dlls/gdi/win16drv/prtdrv.c b/dlls/gdi/win16drv/prtdrv.c
index 527b28a..d401f85 100644
--- a/dlls/gdi/win16drv/prtdrv.c
+++ b/dlls/gdi/win16drv/prtdrv.c
@@ -140,13 +140,13 @@
     return pLPD;
 }
 
-/* 
+/*
  * Load a printer driver, adding it self to the list of loaded drivers.
  */
 
 LOADED_PRINTER_DRIVER *LoadPrinterDriver(const char *pszDriver)
-{                                        
-    HINSTANCE16	hInst;	
+{
+    HINSTANCE16	hInst;
     LOADED_PRINTER_DRIVER *pLPD = NULL;
     int		nDriverSlot = 0;
     BOOL	bSlotFound = FALSE;
@@ -186,7 +186,7 @@
 	HeapFree(GetProcessHeap(), 0, drvName);
     }
 
-    
+
     if (hInst <= 32)
     {
 	/* Failed to load driver */
@@ -196,7 +196,7 @@
 	/* Allocate some memory for printer driver info */
 	pLPD = malloc(sizeof(LOADED_PRINTER_DRIVER));
 	memset(pLPD, 0 , sizeof(LOADED_PRINTER_DRIVER));
-	
+
 	pLPD->hInst	= hInst;
 	pLPD->szDriver = HeapAlloc(GetProcessHeap(),0,strlen(pszDriver)+1);
 	strcpy( pLPD->szDriver, pszDriver );
@@ -240,7 +240,7 @@
 	    WARN("Not supported by driver\n");
 	    return 0;
 	}
-	wRet = PRTDRV_CallTo16_word_lwll( pLPD->fn[FUNC_CONTROL], 
+	wRet = PRTDRV_CallTo16_word_lwll( pLPD->fn[FUNC_CONTROL],
 					  (SEGPTR)lpDestDev, wfunction,
 					  lpInData, lpOutData );
     }
@@ -251,7 +251,7 @@
 /*
  *	Enable (ordinal 5)
  */
-WORD PRTDRV_Enable(LPVOID lpDevInfo, WORD wStyle, LPCSTR  lpDestDevType, 
+WORD PRTDRV_Enable(LPVOID lpDevInfo, WORD wStyle, LPCSTR  lpDestDevType,
                           LPCSTR lpDeviceName, LPCSTR lpOutputFile, LPVOID lpData)
 {
     WORD wRet = 0;
@@ -279,14 +279,14 @@
 	    lP1 = (SEGPTR)lpDevInfo;/* 16 bit segmented ptr already */
 	else
 	    lP1 = MapLS(&devcaps);
-	
+
 	wP2 = wStyle;
-	
+
 	/* MapLS handles NULL like a charm ... */
 	lP3 = MapLS(lpDestDevType);
 	lP4 = MapLS(lpOutputFile);
 	lP5 = (LONG)lpData;
-        
+
 	wRet = PRTDRV_CallTo16_word_lwlll(pLPD->fn[FUNC_ENABLE], lP1, wP2, lP3, lP4, lP5);
 	UnMapLS(lP3);
 	UnMapLS(lP4);
@@ -305,7 +305,7 @@
 /*
  *	EnumDFonts (ordinal 6)
  */
-WORD PRTDRV_EnumDFonts(LPPDEVICE lpDestDev, LPSTR lpFaceName,  
+WORD PRTDRV_EnumDFonts(LPPDEVICE lpDestDev, LPSTR lpFaceName,
 		       FARPROC16 lpCallbackFunc, LPVOID lpClientData)
 {
     WORD wRet = 0;
@@ -329,16 +329,16 @@
         wRet = PRTDRV_CallTo16_word_llll( pLPD->fn[FUNC_ENUMDFONTS], lP1, lP2,
                                           (LONG)lpCallbackFunc,lP4);
         UnMapLS(lP2);
-    } else 
+    } else
         WARN("Failed to find device\n");
-    
+
     TRACE("return %x\n", wRet);
     return wRet;
 }
 /*
  *	EnumObj (ordinal 7)
  */
-BOOL16 PRTDRV_EnumObj(LPPDEVICE lpDestDev, WORD iStyle, 
+BOOL16 PRTDRV_EnumObj(LPPDEVICE lpDestDev, WORD iStyle,
 		       FARPROC16 lpCallbackFunc, LPVOID lpClientData)
 {
     WORD wRet = 0;
@@ -358,22 +358,22 @@
 	}
 
 	lP1 = (SEGPTR)lpDestDev;
-	
+
 	wP2 = iStyle;
 
-	/* 
+	/*
 	 * Need to pass addres of function conversion function that will switch back to 32 bit code if necessary
 	 */
-	lP3 = (LONG)lpCallbackFunc; 
+	lP3 = (LONG)lpCallbackFunc;
 
 	lP4 = (LONG)lpClientData;
-        
-        wRet = PRTDRV_CallTo16_word_lwll( pLPD->fn[FUNC_ENUMOBJ], 
+
+        wRet = PRTDRV_CallTo16_word_lwll( pLPD->fn[FUNC_ENUMOBJ],
 					  lP1, wP2, lP3, lP4 );
     }
-    else 
+    else
         WARN("Failed to find device\n");
-    
+
     TRACE("return %x\n", wRet);
     return wRet;
 }
@@ -382,9 +382,9 @@
  *	Output (ordinal 8)
  */
 WORD PRTDRV_Output(LPPDEVICE 	 lpDestDev,
-                   WORD 	 wStyle, 
+                   WORD 	 wStyle,
                    WORD 	 wCount,
-                   POINT16      *points, 
+                   POINT16      *points,
                    LPLOGPEN16 	 lpPen,
                    LPLOGBRUSH16	 lpBrush,
                    SEGPTR	 lpDrawMode,
@@ -392,9 +392,9 @@
 {
     WORD wRet = 0;
     LOADED_PRINTER_DRIVER *pLPD = NULL;
-    
+
     TRACE("PRTDRV_OUTPUT %d\n", wStyle );
-    
+
     if ((pLPD = FindPrinterDriverFromPDEVICE(lpDestDev)) != NULL)
     {
         LONG lP1, lP4, lP5, lP6, lP7, lP8;
@@ -412,7 +412,7 @@
         lP5 = MapLS( lpPen );
         lP6 = MapLS( lpBrush );
         lP7 = lpDrawMode;
-        
+
 	if (hClipRgn)
 	{
 	    DWORD size;
@@ -420,7 +420,7 @@
 
 	    size = GetRegionData( hClipRgn, 0, NULL );
 	    clip = HeapAlloc( GetProcessHeap(), 0, size );
-	    if(!clip) 
+	    if(!clip)
 	    {
 	        WARN("Can't alloc clip array in PRTDRV_Output\n");
 		return FALSE;
@@ -428,7 +428,7 @@
 	    GetRegionData( hClipRgn, size, clip );
 	    if( clip->rdh.nCount == 0 )
 	    {
-		wRet = PRTDRV_CallTo16_word_lwwlllll(pLPD->fn[FUNC_OUTPUT], 
+		wRet = PRTDRV_CallTo16_word_lwwlllll(pLPD->fn[FUNC_OUTPUT],
 						     lP1, wP2, wP3, lP4,
 						     lP5, lP6, lP7,
 						     (SEGPTR) NULL);
@@ -438,8 +438,8 @@
 	        RECT *pRect;
                 RECT16 r16;
 	        lP8 = MapLS(&r16);
-	    
-		for(pRect = (RECT *)clip->Buffer; 
+
+		for(pRect = (RECT *)clip->Buffer;
 		    pRect < (RECT *)clip->Buffer + clip->rdh.nCount; pRect++)
 	        {
 		    CONV_RECT32TO16( pRect, &r16 );
@@ -455,7 +455,7 @@
 	}
 	else
 	{
-	    wRet = PRTDRV_CallTo16_word_lwwlllll(pLPD->fn[FUNC_OUTPUT], 
+	    wRet = PRTDRV_CallTo16_word_lwwlllll(pLPD->fn[FUNC_OUTPUT],
 						 lP1, wP2, wP3, lP4,
 						 lP5, lP6, lP7, (SEGPTR) NULL);
 	}
@@ -467,22 +467,22 @@
     return wRet;
 }
 
-/* 
+/*
  * RealizeObject (ordinal 10)
  */
-DWORD PRTDRV_RealizeObject(LPPDEVICE lpDestDev, WORD wStyle, 
+DWORD PRTDRV_RealizeObject(LPPDEVICE lpDestDev, WORD wStyle,
                            LPVOID lpInObj, LPVOID lpOutObj,
                            SEGPTR lpTextXForm)
 {
     WORD dwRet = 0;
     LOADED_PRINTER_DRIVER *pLPD = NULL;
-    
+
     TRACE("%08lx %04x %p %p %08lx\n",
 		 lpDestDev, wStyle, lpInObj, lpOutObj, lpTextXForm);
-    
+
     if ((pLPD = FindPrinterDriverFromPDEVICE(lpDestDev)) != NULL)
     {
-        LONG lP1, lP3, lP4, lP5;  
+        LONG lP1, lP3, lP4, lP5;
 	WORD wP2;
 
 	if (pLPD->fn[FUNC_REALIZEOBJECT] == NULL)
@@ -498,7 +498,7 @@
         lP5 = lpTextXForm;
 	TRACE("Calling Realize %08lx %04x %08lx %08lx %08lx\n",
 		     lP1, wP2, lP3, lP4, lP5);
-	dwRet = PRTDRV_CallTo16_long_lwlll(pLPD->fn[FUNC_REALIZEOBJECT], 
+	dwRet = PRTDRV_CallTo16_long_lwlll(pLPD->fn[FUNC_REALIZEOBJECT],
 					   lP1, wP2, lP3, lP4, lP5);
         UnMapLS( lP3 );
         UnMapLS( lP4 );
@@ -507,15 +507,15 @@
     return dwRet;
 }
 
-/* 
+/*
  * StretchBlt (ordinal 27)
  */
 DWORD PRTDRV_StretchBlt(LPPDEVICE lpDestDev,
                         WORD wDestX, WORD wDestY,
-                        WORD wDestXext, WORD wDestYext, 
+                        WORD wDestXext, WORD wDestYext,
                         LPPDEVICE lpSrcDev,
                         WORD wSrcX, WORD wSrcY,
-                        WORD wSrcXext, WORD wSrcYext, 
+                        WORD wSrcXext, WORD wSrcYext,
                         DWORD Rop3,
                         LPLOGBRUSH16 lpBrush,
                         SEGPTR lpDrawMode,
@@ -523,9 +523,9 @@
 {
     WORD wRet = 0;
     LOADED_PRINTER_DRIVER *pLPD = NULL;
-    
+
     TRACE("(lots of params - FIXME)\n");
-    
+
     if ((pLPD = FindPrinterDriverFromPDEVICE(lpDestDev)) != NULL)
     {
         LONG lP1,lP6, lP11, lP12, lP13;
@@ -551,9 +551,9 @@
         lP12 = MapLS( lpBrush );
         lP13 = lpDrawMode;
         lP14 = MapLS(lpClipRect);
-	wRet = PRTDRV_CallTo16_word_lwwwwlwwwwllll(pLPD->fn[FUNC_STRETCHBLT], 
+	wRet = PRTDRV_CallTo16_word_lwwwwlwwwwllll(pLPD->fn[FUNC_STRETCHBLT],
 						   lP1, wP2, wP3, wP4, wP5,
-						   lP6, wP7, wP8, wP9, wP10, 
+						   lP6, wP7, wP8, wP9, wP10,
 						   lP11, lP12, lP13, lP14);
         UnMapLS(lP12);
         UnMapLS(lP14);
@@ -563,16 +563,16 @@
 }
 
 DWORD PRTDRV_ExtTextOut(LPPDEVICE lpDestDev, WORD wDestXOrg, WORD wDestYOrg,
-                        RECT16 *lpClipRect, LPCSTR lpString, WORD wCount, 
-                        LPFONTINFO16 lpFontInfo, SEGPTR lpDrawMode, 
+                        RECT16 *lpClipRect, LPCSTR lpString, WORD wCount,
+                        LPFONTINFO16 lpFontInfo, SEGPTR lpDrawMode,
                         SEGPTR lpTextXForm, SHORT *lpCharWidths,
                         RECT16 *     lpOpaqueRect, WORD wOptions)
 {
     DWORD dwRet = 0;
     LOADED_PRINTER_DRIVER *pLPD = NULL;
-    
+
     TRACE("(lots of params - FIXME)\n");
-    
+
     if ((pLPD = FindPrinterDriverFromPDEVICE(lpDestDev)) != NULL)
     {
 	LONG		lP1, lP4, lP5, lP7, lP8, lP9, lP10, lP11;
@@ -591,13 +591,13 @@
         lP4 = MapLS( lpClipRect );
         lP5 = MapLS( lpString );
 	iP6 = wCount;
-	
+
 	/* This should be realized by the driver, so in 16bit data area */
 	lP7 = MapLS( lpFontInfo );
         lP8 = lpDrawMode;
         lP9 = lpTextXForm;
-	
-	if (lpCharWidths != NULL) 
+
+	if (lpCharWidths != NULL)
 	  FIXME("Char widths not supported\n");
 	lP10 = 0;
 	lP11 = MapLS( lpOpaqueRect );
@@ -690,7 +690,7 @@
 				    OutBrush->lbStyle = InBrush->lbStyle;
 				    OutBrush->lbColor = InBrush->lbColor;
 				    OutBrush->lbHatch = InBrush->lbHatch;
-				    if (InBrush->lbStyle == BS_SOLID) 
+				    if (InBrush->lbStyle == BS_SOLID)
 				    return 0x8002; /* FIXME: diff mono-color */
 				    else return 0x8000;
 				}
@@ -709,21 +709,21 @@
 }
 
 
-WORD PRTDRV_GetCharWidth(LPPDEVICE lpDestDev, LPINT lpBuffer, 
+WORD PRTDRV_GetCharWidth(LPPDEVICE lpDestDev, LPINT lpBuffer,
 		      WORD wFirstChar, WORD wLastChar, LPFONTINFO16 lpFontInfo,
 		      SEGPTR lpDrawMode, SEGPTR lpTextXForm )
 {
 
     WORD wRet = 0;
     LOADED_PRINTER_DRIVER *pLPD = NULL;
-    
+
     TRACE("(lots of params - FIXME)\n");
-    
+
     if ((pLPD = FindPrinterDriverFromPDEVICE(lpDestDev)) != NULL)
     {
 	LONG		lP1, lP2, lP5, lP6, lP7;
 	WORD		wP3, wP4;
-	
+
 	if (pLPD->fn[FUNC_GETCHARWIDTH] == NULL)
 	{
 	    WARN("Not supported by driver\n");
@@ -737,8 +737,8 @@
 	lP5 = MapLS( lpFontInfo );
         lP6 = lpDrawMode;
         lP7 = lpTextXForm;
-	
-	wRet = PRTDRV_CallTo16_word_llwwlll(pLPD->fn[FUNC_GETCHARWIDTH], 
+
+	wRet = PRTDRV_CallTo16_word_llwwlll(pLPD->fn[FUNC_GETCHARWIDTH],
                                             lP1, lP2, wP3, wP4, lP5, lP6, lP7 );
 
         UnMapLS( lP2 );
diff --git a/dlls/gdi/win16drv/text.c b/dlls/gdi/win16drv/text.c
index ab6f80f..93614bc 100644
--- a/dlls/gdi/win16drv/text.c
+++ b/dlls/gdi/win16drv/text.c
@@ -40,7 +40,7 @@
     BOOL bRet = 1;
     RECT16	 clipRect;
     RECT16 	 opaqueRect;
-    RECT16 	*lpOpaqueRect = NULL; 
+    RECT16 	*lpOpaqueRect = NULL;
     WORD wOptions = 0;
     DWORD len;
     INT16 width;
@@ -59,7 +59,7 @@
 
     clipRect.left = 0;
     clipRect.top = 0;
-        
+
     clipRect.right = physDev->DevCaps.horzRes;
     clipRect.bottom = physDev->DevCaps.vertRes;
     if (lprect) {
@@ -69,7 +69,7 @@
 	opaqueRect.bottom = lprect->bottom;
 	lpOpaqueRect = &opaqueRect;
     }
-        
+
     TRACE("textalign = %d\n", dc->textAlign);
 
     if (dc->textAlign & TA_UPDATECP) {
@@ -80,8 +80,8 @@
     x = XLPTODP( dc, x );
     y = YLPTODP( dc, y );
 
-    dwRet = PRTDRV_ExtTextOut(physDev->segptrPDEVICE, 0, 0, 
-			      NULL, str, -len,  physDev->FontInfo, 
+    dwRet = PRTDRV_ExtTextOut(physDev->segptrPDEVICE, 0, 0,
+			      NULL, str, -len,  physDev->FontInfo,
 			      win16drv_SegPtr_DrawMode,
 			      win16drv_SegPtr_TextXForm,
 			      NULL, NULL, 0);
@@ -111,12 +111,12 @@
 	break;
     case TA_BASELINE:
         y -= physDev->FontInfo->dfAscent;
-	break;    
+	break;
     }
 
-    dwRet = PRTDRV_ExtTextOut(physDev->segptrPDEVICE, 
+    dwRet = PRTDRV_ExtTextOut(physDev->segptrPDEVICE,
 			      x, y, &clipRect, str, (WORD)len,
-			      physDev->FontInfo, win16drv_SegPtr_DrawMode, 
+			      physDev->FontInfo, win16drv_SegPtr_DrawMode,
 			      win16drv_SegPtr_TextXForm, NULL, lpOpaqueRect,
 			      wOptions);
 
diff --git a/dlls/gdi/win16drv/win16drv.h b/dlls/gdi/win16drv/win16drv.h
index 0b56d5f..6880a76 100644
--- a/dlls/gdi/win16drv/win16drv.h
+++ b/dlls/gdi/win16drv/win16drv.h
@@ -25,7 +25,7 @@
 #include "wingdi.h"
 #include "gdi.h"
 
-#define SETHIGHBIT 
+#define SETHIGHBIT
 #undef SETHIGHBIT
 #ifdef SETHIGHBIT
 #define GETGDIINFO  0x8001
@@ -51,14 +51,14 @@
 
 /* Internal Data */
 #define ORD_BITBLT		1
-#define ORD_COLORINFO		2		
+#define ORD_COLORINFO		2
 #define ORD_CONTROL		3
 #define ORD_DISABLE		4
 #define ORD_ENABLE		5
 #define ORD_ENUMDFONTS		6
 #define ORD_ENUMOBJ		7
 #define ORD_OUTPUT		8
-#define ORD_PIXEL		9	
+#define ORD_PIXEL		9
 #define ORD_REALIZEOBJECT	10
 #define ORD_STRBLT		11
 #define ORD_SCANLR		12
@@ -80,34 +80,34 @@
 
 #define ORD_DIALOGFN		100
 #define ORD_PSEUDOEDIT		101
-                        
+
 enum {
-    FUNC_BITBLT = 0,		 
-    FUNC_COLORINFO,    	 
-    FUNC_CONTROL,    	
-    FUNC_DISABLE,    	
-    FUNC_ENABLE,    		
-    FUNC_ENUMDFONTS,    	
-    FUNC_ENUMOBJ,    	
-    FUNC_OUTPUT,    		
-    FUNC_PIXEL,    			
-    FUNC_REALIZEOBJECT,    	
-    FUNC_STRBLT,    		
-    FUNC_SCANLR,    		
-    FUNC_DEVICEMODE,    	
-    FUNC_EXTTEXTOUT,    	
-    FUNC_GETCHARWIDTH,    	
-    FUNC_DEVICEBITMAP,    	
-    FUNC_FASTBORDER,         
-    FUNC_SETATTRIBUTE,    				
-    FUNC_STRETCHBLT,    	
-    FUNC_STRETCHDIBITS,  	
-    FUNC_SELECTBITMAP,    	
-    FUNC_BITMAPBITS,    			       
-    FUNC_EXTDEVICEMODE,    	
-    FUNC_DEVICECAPABILITIES,	
-    FUNC_ADVANCEDSETUPDIALOG,			
-    FUNC_DIALOGFN,		
+    FUNC_BITBLT = 0,
+    FUNC_COLORINFO,
+    FUNC_CONTROL,
+    FUNC_DISABLE,
+    FUNC_ENABLE,
+    FUNC_ENUMDFONTS,
+    FUNC_ENUMOBJ,
+    FUNC_OUTPUT,
+    FUNC_PIXEL,
+    FUNC_REALIZEOBJECT,
+    FUNC_STRBLT,
+    FUNC_SCANLR,
+    FUNC_DEVICEMODE,
+    FUNC_EXTTEXTOUT,
+    FUNC_GETCHARWIDTH,
+    FUNC_DEVICEBITMAP,
+    FUNC_FASTBORDER,
+    FUNC_SETATTRIBUTE,
+    FUNC_STRETCHBLT,
+    FUNC_STRETCHDIBITS,
+    FUNC_SELECTBITMAP,
+    FUNC_BITMAPBITS,
+    FUNC_EXTDEVICEMODE,
+    FUNC_DEVICECAPABILITIES,
+    FUNC_ADVANCEDSETUPDIALOG,
+    FUNC_DIALOGFN,
     FUNC_PSEUDOEDIT,
     TOTAL_PRINTER_DRIVER_FUNCTIONS /* insert functions before here */
 };
@@ -129,19 +129,19 @@
 
 #include "pshpack1.h"
 #define PCOLOR DWORD
-typedef struct DRAWMODE 
+typedef struct DRAWMODE
 {
-    SHORT    Rop2;       
-    SHORT    bkMode;     
-    PCOLOR   bkColor;    
-    PCOLOR   TextColor;  
+    SHORT    Rop2;
+    SHORT    bkMode;
+    PCOLOR   bkColor;
+    PCOLOR   TextColor;
     SHORT    TBreakExtra;
-    SHORT    BreakExtra; 
-    SHORT    BreakErr;   
-    SHORT    BreakRem;   
-    SHORT    BreakCount; 
-    SHORT    CharExtra;  
-    COLORREF LbkColor;   
+    SHORT    BreakExtra;
+    SHORT    BreakErr;
+    SHORT    BreakRem;
+    SHORT    BreakCount;
+    SHORT    CharExtra;
+    COLORREF LbkColor;
     COLORREF LTextColor;
     DWORD    ICMCXform;
     SHORT    StretchBltMode;
@@ -157,9 +157,9 @@
     LPARAM lp;
 } WEPFC;
 
-#define DRVOBJ_PEN 	1       
-#define DRVOBJ_BRUSH 	2  
-#define DRVOBJ_FONT 	3   
+#define DRVOBJ_PEN 	1
+#define DRVOBJ_BRUSH 	2
+#define DRVOBJ_FONT 	3
 #define DRVOBJ_PBITMAP 	5
 
 typedef struct tagDeviceCaps
@@ -217,25 +217,25 @@
 LOADED_PRINTER_DRIVER *LoadPrinterDriver(const char *pszDriver);
 
 extern INT16 PRTDRV_Control(LPPDEVICE lpDestDev, WORD wfunction, SEGPTR lpInData, SEGPTR lpOutData);
-extern WORD PRTDRV_Enable(LPVOID lpDevInfo, WORD wStyle, LPCSTR  lpDestDevType, 
+extern WORD PRTDRV_Enable(LPVOID lpDevInfo, WORD wStyle, LPCSTR  lpDestDevType,
                           LPCSTR lpDeviceName, LPCSTR lpOutputFile, LPVOID lpData);
-extern WORD PRTDRV_EnumDFonts(LPPDEVICE lpDestDev, LPSTR lpFaceName,  
+extern WORD PRTDRV_EnumDFonts(LPPDEVICE lpDestDev, LPSTR lpFaceName,
 		       FARPROC16 lpCallbackFunc, LPVOID lpClientData);
-extern DWORD PRTDRV_RealizeObject(LPPDEVICE lpDestDev, WORD wStyle, 
+extern DWORD PRTDRV_RealizeObject(LPPDEVICE lpDestDev, WORD wStyle,
 				  LPVOID lpInObj, LPVOID lpOutObj,
 				  SEGPTR lpTextXForm);
 
 extern BOOL16 PRTDRV_EnumObj(LPPDEVICE lpDestDev, WORD iStyle, FARPROC16 lpfn, LPVOID lpb);
 extern DWORD PRTDRV_ExtTextOut(LPPDEVICE lpDestDev, WORD wDestXOrg, WORD wDestYOrg,
-			       RECT16 *lpClipRect, LPCSTR lpString, WORD wCount, 
-			       LPFONTINFO16 lpFontInfo, SEGPTR lpDrawMode, 
+			       RECT16 *lpClipRect, LPCSTR lpString, WORD wCount,
+			       LPFONTINFO16 lpFontInfo, SEGPTR lpDrawMode,
 			       SEGPTR lpTextXForm, SHORT *lpCharWidths,
 			       RECT16 *     lpOpaqueRect, WORD wOptions);
 
 extern WORD PRTDRV_Output(LPPDEVICE 	 lpDestDev,
-			  WORD 	 wStyle, 
+			  WORD 	 wStyle,
 			  WORD 	 wCount,
-			  POINT16       *points, 
+			  POINT16       *points,
 			  LPLOGPEN16 	 lpPen,
 			  LPLOGBRUSH16	 lpBrush,
 			  SEGPTR	 lpDrawMode,
@@ -243,16 +243,16 @@
 
 DWORD PRTDRV_StretchBlt(LPPDEVICE lpDestDev,
                         WORD wDestX, WORD wDestY,
-                        WORD wDestXext, WORD wDestYext, 
+                        WORD wDestXext, WORD wDestYext,
                         LPPDEVICE lpSrcDev,
                         WORD wSrcX, WORD wSrcY,
-                        WORD wSrcXext, WORD wSrcYext, 
+                        WORD wSrcXext, WORD wSrcYext,
                         DWORD Rop3,
                         LPLOGBRUSH16 lpBrush,
                         SEGPTR lpDrawMode,
                         RECT16 *lpClipRect);
 
-extern WORD PRTDRV_GetCharWidth(LPPDEVICE lpDestDev, LPINT lpBuffer, 
+extern WORD PRTDRV_GetCharWidth(LPPDEVICE lpDestDev, LPINT lpBuffer,
 		      WORD wFirstChar, WORD wLastChar, LPFONTINFO16 lpFontInfo,
 		      SEGPTR lpDrawMode, SEGPTR lpTextXForm );
 
diff --git a/dlls/gdi/wing.c b/dlls/gdi/wing.c
index e692dc4..a581c48 100644
--- a/dlls/gdi/wing.c
+++ b/dlls/gdi/wing.c
@@ -34,10 +34,10 @@
   WING_DISPERSED_4x4, WING_DISPERSED_8x8, WING_CLUSTERED_4x4
 } WING_DITHER_TYPE;
 
-/* 
+/*
  * WinG DIB bitmaps can be selected into DC and then scribbled upon
- * by GDI functions. They can also be changed directly. This gives us 
- * three choices 
+ * by GDI functions. They can also be changed directly. This gives us
+ * three choices
  *	- use original WinG 16-bit DLL
  *		requires working 16-bit driver interface
  * 	- implement DIB graphics driver from scratch
diff --git a/dlls/icmp/icmp_main.c b/dlls/icmp/icmp_main.c
index e35fcc7..8fd1882 100644
--- a/dlls/icmp/icmp_main.c
+++ b/dlls/icmp/icmp_main.c
@@ -2,8 +2,8 @@
  * ICMP
  *
  * Francois Gouget, 1999, based on the work of
- *   RW Hall, 1999, based on public domain code PING.C by Mike Muus (1983) 
- *   and later works (c) 1989 Regents of Univ. of California - see copyright 
+ *   RW Hall, 1999, based on public domain code PING.C by Mike Muus (1983)
+ *   and later works (c) 1989 Regents of Univ. of California - see copyright
  *   notice at end of source-code.
  *
  * This library is free software; you can redistribute it and/or
@@ -25,9 +25,9 @@
  * - Systems like FreeBSD don't seem to support the IP_TTL option and maybe others.
  *   But using IP_HDRINCL and building the IP header by hand might work.
  * - Not all IP options are supported.
- * - Are ICMP handles real handles, i.e. inheritable and all? There might be some 
+ * - Are ICMP handles real handles, i.e. inheritable and all? There might be some
  *   more work to do here, including server side stuff with synchronization.
- * - Is it correct to use malloc for the internal buffer, for allocating the 
+ * - Is it correct to use malloc for the internal buffer, for allocating the
  *   handle's structure?
  * - This API should probably be thread safe. Is it really?
  * - Using the winsock functions has not been tested.
@@ -86,9 +86,9 @@
 #define u_int16_t  WORD
 #define u_int32_t  DWORD
 
-/* These are BSD headers. We use these here because they are needed on 
- * libc5 Linux systems. On other platforms they are usually simply more 
- * complete than the native stuff, and cause less portability problems 
+/* These are BSD headers. We use these here because they are needed on
+ * libc5 Linux systems. On other platforms they are usually simply more
+ * complete than the native stuff, and cause less portability problems
  * so we use them anyway.
  */
 #include "ip.h"
@@ -140,7 +140,7 @@
 #define IP_OPTS_DEFAULT     1
 #define IP_OPTS_CUSTOM      2
 
-/* The sequence number is unique process wide, so that all threads 
+/* The sequence number is unique process wide, so that all threads
  * have a distinct sequence number.
  */
 static LONG icmp_sequence=0;
@@ -456,7 +456,7 @@
 			ier->Status=IP_REQ_TIMED_OUT;
 		    }
                 }
-	    }                
+	    }
 	}
 
         if (ier->Status==IP_REQ_TIMED_OUT) {
diff --git a/dlls/imagehlp/access.c b/dlls/imagehlp/access.c
index 43c2909..bdd60b4 100644
--- a/dlls/imagehlp/access.c
+++ b/dlls/imagehlp/access.c
@@ -121,7 +121,7 @@
  */
 PLOADED_IMAGE WINAPI ImageLoad(LPSTR DllName, LPSTR DllPath)
 {
-  PLOADED_IMAGE pLoadedImage = 
+  PLOADED_IMAGE pLoadedImage =
     HeapAlloc(IMAGEHLP_hHeap, 0, sizeof(LOADED_IMAGE));
   return pLoadedImage;
 }
@@ -175,8 +175,8 @@
 
   pFind=&pLoadedImage->Links;
   pCurrent=&IMAGEHLP_pFirstLoadedImage->Links;
-  while((pCurrent != pFind) && 
-    (pCurrent != NULL)) 
+  while((pCurrent != pFind) &&
+    (pCurrent != NULL))
       pCurrent = pCurrent->Flink;
   if(!pCurrent)
     {
diff --git a/dlls/imagehlp/imagehlp_main.c b/dlls/imagehlp/imagehlp_main.c
index d638c09..2fb8657 100644
--- a/dlls/imagehlp/imagehlp_main.c
+++ b/dlls/imagehlp/imagehlp_main.c
@@ -104,7 +104,7 @@
   LPSTR RootPath, LPSTR InputPathName, LPSTR OutputPathBuffer)
 {
   FIXME("(%s, %s, %s): stub\n",
-    debugstr_a(RootPath), debugstr_a(InputPathName), 
+    debugstr_a(RootPath), debugstr_a(InputPathName),
     debugstr_a(OutputPathBuffer)
   );
   SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
diff --git a/dlls/imagehlp/internal.c b/dlls/imagehlp/internal.c
index dc8096f..488a246 100644
--- a/dlls/imagehlp/internal.c
+++ b/dlls/imagehlp/internal.c
@@ -96,10 +96,10 @@
 PLIST_ENTRY RemoveHeadList(PLIST_ENTRY pListHead)
 {
   PLIST_ENTRY p = pListHead->Flink;
-  
+
   if(p != pListHead)
     {
-      RemoveEntryList(pListHead); 
+      RemoveEntryList(pListHead);
       return p;
     }
   else
diff --git a/dlls/imagehlp/modify.c b/dlls/imagehlp/modify.c
index 25fef44..54dd3a0 100644
--- a/dlls/imagehlp/modify.c
+++ b/dlls/imagehlp/modify.c
@@ -45,7 +45,7 @@
   DWORD Flags, LPSTR ImageName, LPSTR DllPath, LPSTR SymbolPath,
   PIMAGEHLP_STATUS_ROUTINE StatusRoutine)
 {
-  FIXME("(%ld, %s, %s, %s, %p): stub\n", 
+  FIXME("(%ld, %s, %s, %s, %p): stub\n",
     Flags, debugstr_a(ImageName), debugstr_a(DllPath),
     debugstr_a(SymbolPath), StatusRoutine
   );
@@ -84,7 +84,7 @@
  *		CheckSumMappedFile (IMAGEHLP.@)
  */
 PIMAGE_NT_HEADERS WINAPI CheckSumMappedFile(
-  LPVOID BaseAddress, DWORD FileLength, 
+  LPVOID BaseAddress, DWORD FileLength,
   LPDWORD HeaderSum, LPDWORD CheckSum)
 {
   PIMAGE_NT_HEADERS Header;
@@ -275,8 +275,8 @@
 {
   FIXME(
     "(%s, %s, %d, %d, %d, %ld, %p, %p, %p, %p, %ld): stub\n",
-      debugstr_a(CurrentImageName),debugstr_a(SymbolPath), fReBase, 
-      fRebaseSysfileOk, fGoingDown, CheckImageSize, OldImageSize, 
+      debugstr_a(CurrentImageName),debugstr_a(SymbolPath), fReBase,
+      fRebaseSysfileOk, fGoingDown, CheckImageSize, OldImageSize,
       OldImageBase, NewImageSize, NewImageBase, TimeStamp
   );
   SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
@@ -309,7 +309,7 @@
  *		SplitSymbols (IMAGEHLP.@)
  */
 BOOL WINAPI SplitSymbols(
-  LPSTR ImageName, LPSTR SymbolsPath, 
+  LPSTR ImageName, LPSTR SymbolsPath,
   LPSTR SymbolFilePath, DWORD Flags)
 {
   FIXME("(%s, %s, %s, %ld): stub\n",
diff --git a/dlls/imagehlp/symbol.c b/dlls/imagehlp/symbol.c
index 214082d..4e5d31f 100644
--- a/dlls/imagehlp/symbol.c
+++ b/dlls/imagehlp/symbol.c
@@ -126,7 +126,7 @@
  *		SymGetSymFromAddr (IMAGEHLP.@)
  */
 BOOL WINAPI SymGetSymFromAddr(
-  HANDLE hProcess, DWORD dwAddr, 
+  HANDLE hProcess, DWORD dwAddr,
   PDWORD pdwDisplacement, PIMAGEHLP_SYMBOL Symbol)
 {
   FIXME("(0x%08x, 0x%08lx, %p, %p): stub\n",
diff --git a/dlls/imm32/imm.c b/dlls/imm32/imm.c
index 44f4ce0..79f982f 100644
--- a/dlls/imm32/imm.c
+++ b/dlls/imm32/imm.c
@@ -93,7 +93,7 @@
   LPCSTR lpszRegister, LPVOID lpData)
 {
   FIXME("(0x%08x, %p, %s, %ld, %s, %p): stub\n",
-    hKL, lpfnEnumProc, 
+    hKL, lpfnEnumProc,
     debugstr_a(lpszReading), dwStyle,
     debugstr_a(lpszRegister), lpData
   );
@@ -110,7 +110,7 @@
   LPCWSTR lpszRegister, LPVOID lpData)
 {
   FIXME("(0x%08x, %p, %s, %ld, %s, %p): stub\n",
-    hKL, lpfnEnumProc, 
+    hKL, lpfnEnumProc,
     debugstr_w(lpszReading), dwStyle,
     debugstr_w(lpszRegister), lpData
   );
@@ -122,7 +122,7 @@
  *		ImmEscapeA (IMM32.@)
  */
 LRESULT WINAPI ImmEscapeA(
-  HKL hKL, HIMC hIMC, 
+  HKL hKL, HIMC hIMC,
   UINT uEscape, LPVOID lpData)
 {
   FIXME("(0x%08x, 0x%08x, %d, %p): stub\n",
@@ -150,7 +150,7 @@
  *		ImmGetCandidateListA (IMM32.@)
  */
 DWORD WINAPI ImmGetCandidateListA(
-  HIMC hIMC, DWORD deIndex, 
+  HIMC hIMC, DWORD deIndex,
   LPCANDIDATELIST lpCandList, DWORD dwBufLen)
 {
   FIXME("(0x%08x, %ld, %p, %ld): stub\n",
@@ -187,7 +187,7 @@
  *		ImmGetCandidateListW (IMM32.@)
  */
 DWORD WINAPI ImmGetCandidateListW(
-  HIMC hIMC, DWORD deIndex, 
+  HIMC hIMC, DWORD deIndex,
   LPCANDIDATELIST lpCandList, DWORD dwBufLen)
 {
   FIXME("(0x%08x, %ld, %p, %ld): stub\n",
@@ -255,7 +255,7 @@
  *		ImmGetCompositionStringW (IMM32.@)
  */
 LONG WINAPI ImmGetCompositionStringW(
-  HIMC hIMC, DWORD dwIndex, 
+  HIMC hIMC, DWORD dwIndex,
   LPVOID lpBuf, DWORD dwBufLen)
 {
   OSVERSIONINFOA version;
@@ -642,8 +642,8 @@
  *		ImmSetCompositionStringA (IMM32.@)
  */
 BOOL WINAPI ImmSetCompositionStringA(
-  HIMC hIMC, DWORD dwIndex, 
-  LPCVOID lpComp, DWORD dwCompLen, 
+  HIMC hIMC, DWORD dwIndex,
+  LPCVOID lpComp, DWORD dwCompLen,
   LPCVOID lpRead, DWORD dwReadLen)
 {
   FIXME("(0x%08x, %ld, %p, %ld, %p, %ld): stub\n",
diff --git a/dlls/kernel/comm.c b/dlls/kernel/comm.c
index fc98f98..fd1547c 100644
--- a/dlls/kernel/comm.c
+++ b/dlls/kernel/comm.c
@@ -34,7 +34,7 @@
  * A program that wants to monitor the modem status line (RLSD/DCD) may
  * poll the modem status register in the commMask structure. I update the bit
  * in GetCommError, waiting for an implementation of communication events.
- * 
+ *
  * July 6, 1998. Fixes and comments by Valentijn Sessink
  *                                     <vsessink@ic.uva.nl> [V]
  *
@@ -187,7 +187,7 @@
         else strcpy(temp,device);
 
 	last=temp[strlen(temp)-1];
-	ptr = strtok(temp, ", "); 
+	ptr = strtok(temp, ", ");
 
         /* DOS/Windows only compares the first two numbers
 	 * and assigns an appropriate baud rate.
@@ -219,7 +219,7 @@
 		WARN("Unknown baudrate indicator %d !\n", rate);
 		return FALSE;
 	}
-			
+
         lpdcb->BaudRate = rate;
 	TRACE("baudrate (%ld)\n", lpdcb->BaudRate);
 
@@ -233,25 +233,25 @@
 	case 'N':
 		lpdcb->Parity = NOPARITY;
 		lpdcb->fParity = FALSE;
-		break;			
+		break;
 	case 'E':
 		lpdcb->Parity = EVENPARITY;
-		break;			
+		break;
 	case 'M':
 		lpdcb->Parity = MARKPARITY;
-		break;			
+		break;
 	case 'O':
 		lpdcb->Parity = ODDPARITY;
-		break;		
+		break;
         case 'S':
                 lpdcb->Parity = SPACEPARITY;
-                break;	
+                break;
 	default:
 		WARN("Unknown parity `%c'!\n", *ptr);
 		return FALSE;
 	}
 
-	ptr = strtok(NULL, ", "); 
+	ptr = strtok(NULL, ", ");
        	TRACE("charsize (%c)\n", *ptr);
 	lpdcb->ByteSize = *ptr - '0';
 
@@ -260,14 +260,14 @@
 	switch (*ptr) {
 	case '1':
 		lpdcb->StopBits = ONESTOPBIT;
-		break;			
+		break;
 	case '2':
 		lpdcb->StopBits = TWOSTOPBITS;
-		break;			
+		break;
 	default:
 		WARN("Unknown # of stopbits `%c'!\n", *ptr);
 		return FALSE;
-	}	
+	}
 
 	if (last == 'x') {
 		lpdcb->fInX		= TRUE;
@@ -352,7 +352,7 @@
 
 		return COMM_BuildOldCommDCB(device,lpdcb);
 	}
-	ptr=strtok(temp," "); 
+	ptr=strtok(temp," ");
 	while (ptr) {
 		DWORD	flag,x;
 
@@ -498,14 +498,14 @@
  *
  * BUGS
  *
- *  Only TIOCSBRK and TIOCCBRK are supported. 
+ *  Only TIOCSBRK and TIOCCBRK are supported.
  */
 BOOL WINAPI SetCommBreak(
     HANDLE handle) /* [in] The communictions device to suspend. */
 {
 #if defined(TIOCSBRK) && defined(TIOCCBRK) /* check if available for compilation */
         int fd,result;
- 
+
 	fd = FILE_GetUnixHandle( handle, GENERIC_READ );
 	if(fd<0) {
 	        TRACE("FILE_GetUnixHandle failed\n");
@@ -538,14 +538,14 @@
  *
  * BUGS
  *
- *  Only TIOCSBRK and TIOCCBRK are supported. 
+ *  Only TIOCSBRK and TIOCCBRK are supported.
  */
 BOOL WINAPI ClearCommBreak(
     HANDLE handle) /* [in] The halted communication device whose character transmission is to be resumed. */
 {
 #if defined(TIOCSBRK) && defined(TIOCCBRK) /* check if available for compilation */
         int fd,result;
- 
+
 	fd = FILE_GetUnixHandle( handle, GENERIC_READ );
 	if(fd<0) {
 	        TRACE("FILE_GetUnixHandle failed\n");
@@ -601,7 +601,7 @@
 	switch (nFunction) {
 		case RESETDEV:
 		        TRACE("\n");
-			break;					
+			break;
 
 		case CLRDTR:
 		        TRACE("CLRDTR\n");
@@ -618,7 +618,7 @@
 			result= COMM_WhackModem(fd, ~TIOCM_RTS, 0);
 			break;
 #endif
-	
+
 		case SETDTR:
 		        TRACE("SETDTR\n");
 #ifdef TIOCM_DTR
@@ -659,17 +659,17 @@
 			break;
 #endif
 		default:
-			WARN("(handle=%d,nFunction=%d): Unknown function\n", 
+			WARN("(handle=%d,nFunction=%d): Unknown function\n",
 			handle, nFunction);
-			break;				
+			break;
 	}
-	
+
 	if (!direct)
 	  if (tcsetattr(fd, TCSADRAIN, &port) == -1) {
 		close(fd);
 		COMM_SetCommError(handle,CE_IOE);
-		return FALSE;	
-	  } else 
+		return FALSE;
+	  } else
 	        result= TRUE;
 	else
 	  {
@@ -745,13 +745,13 @@
     int fd;
 
     fd=FILE_GetUnixHandle( handle, GENERIC_READ );
-    if(0>fd) 
+    if(0>fd)
     {
 	FIXME("no handle %d found\n",handle);
         return FALSE;
     }
 
-    if (lpStat) 
+    if (lpStat)
     {
 	lpStat->status = 0;
 
@@ -808,7 +808,7 @@
     }
     close(fd);
     return TRUE;
-} 
+}
 
 /*****************************************************************************
  *	GetCommMask	(KERNEL32.@)
@@ -934,58 +934,58 @@
 		case 110:
 		case CBR_110:
 			port.c_cflag |= B110;
-			break;		
+			break;
 		case 300:
 		case CBR_300:
 			port.c_cflag |= B300;
-			break;		
+			break;
 		case 600:
 		case CBR_600:
 			port.c_cflag |= B600;
-			break;		
+			break;
 		case 1200:
 		case CBR_1200:
 			port.c_cflag |= B1200;
-			break;		
+			break;
 		case 2400:
 		case CBR_2400:
 			port.c_cflag |= B2400;
-			break;		
+			break;
 		case 4800:
 		case CBR_4800:
 			port.c_cflag |= B4800;
-			break;		
+			break;
 		case 9600:
 		case CBR_9600:
 			port.c_cflag |= B9600;
-			break;		
+			break;
 		case 19200:
 		case CBR_19200:
 			port.c_cflag |= B19200;
-			break;		
+			break;
 		case 38400:
 		case CBR_38400:
 			port.c_cflag |= B38400;
-			break;		
+			break;
 #ifdef B57600
 		case 57600:
 			port.c_cflag |= B57600;
-			break;		
+			break;
 #endif
 #ifdef B115200
 		case 115200:
 			port.c_cflag |= B115200;
-			break;		
+			break;
 #endif
 #ifdef B230400
 		case 230400:
 			port.c_cflag |= B230400;
-			break;		
+			break;
 #endif
 #ifdef B460800
 		case 460800:
 			port.c_cflag |= B460800;
-			break;		
+			break;
 #endif
        	        default:
 #if defined (HAVE_LINUX_SERIAL_H) && defined (TIOCSSERIAL)
@@ -1009,8 +1009,8 @@
  			}
  			break;
 #endif    /* Don't have linux/serial.h or lack TIOCSSERIAL */
- 			
-			
+
+
                         COMM_SetCommError(handle,IE_BAUDRATE);
 			close( fd );
 			ERR("baudrate %ld\n",lpdcb->BaudRate);
@@ -1144,7 +1144,7 @@
 			ERR("Parity\n");
                         return FALSE;
         }
-	
+
 
 	port.c_cflag &= ~CSIZE;
 	switch (bytesize) {
@@ -1166,7 +1166,7 @@
 			ERR("ByteSize\n");
 			return FALSE;
 	}
-        
+
 	switch (stopbits) {
 		case ONESTOPBIT:
 				port.c_cflag &= ~CSTOPB;
@@ -1184,13 +1184,13 @@
 #ifdef CRTSCTS
 	if (	lpdcb->fOutxCtsFlow 			||
 		lpdcb->fRtsControl == RTS_CONTROL_HANDSHAKE
-	) 
+	)
 	  {
 	    port.c_cflag |= CRTSCTS;
 	    TRACE("CRTSCTS\n");
 	  }
-#endif	
-	
+#endif
+
 	if (lpdcb->fDtrControl == DTR_CONTROL_HANDSHAKE)
 	  {
              WARN("DSR/DTR flow control not supported\n");
@@ -1227,7 +1227,7 @@
  * RETURNS
  *
  *  True on success, false if the communication device handle is bad etc
- *  
+ *
  * BUGS
  *
  *  XonChar and XoffChar are not set.
@@ -1242,7 +1242,7 @@
      TRACE("handle %d, ptr %p\n", handle, lpdcb);
 
      fd = FILE_GetUnixHandle( handle, GENERIC_READ );
-     if (fd < 0) 
+     if (fd < 0)
        {
 	 ERR("FILE_GetUnixHandle failed\n");
 	 return FALSE;
@@ -1292,22 +1292,22 @@
 #ifdef B57600
 		case B57600:
 			lpdcb->BaudRate = 57600;
-			break;		
+			break;
 #endif
 #ifdef B115200
 		case B115200:
 			lpdcb->BaudRate = 115200;
-			break;		
+			break;
 #endif
 #ifdef B230400
                 case B230400:
 			lpdcb->BaudRate = 230400;
-			break;		
+			break;
 #endif
 #ifdef B460800
                 case B460800:
 			lpdcb->BaudRate = 460800;
-			break;		
+			break;
 #endif
 	        default:
 		        ERR("unknown speed %x \n",speed);
@@ -1328,8 +1328,8 @@
 			break;
 	        default:
 		        ERR("unknown size %x \n",port.c_cflag & CSIZE);
-	}	
-	
+	}
+
         if(port.c_iflag & INPCK)
             lpdcb->fParity = TRUE;
         else
@@ -1347,14 +1347,14 @@
 			lpdcb->Parity = EVENPARITY;
 			break;
 		case (PARENB | PARODD):
-			lpdcb->Parity = ODDPARITY;		
+			lpdcb->Parity = ODDPARITY;
 			break;
 #ifdef CMSPAR
 		case (PARENB | CMSPAR):
-			lpdcb->Parity = MARKPARITY;		
+			lpdcb->Parity = MARKPARITY;
 			break;
                 case (PARENB | PARODD | CMSPAR):
-			lpdcb->Parity = SPACEPARITY;		
+			lpdcb->Parity = SPACEPARITY;
 			break;
 #endif
 	}
@@ -1379,7 +1379,7 @@
 	if (port.c_cflag & CRTSCTS) {
 		lpdcb->fRtsControl = RTS_CONTROL_HANDSHAKE;
 		lpdcb->fOutxCtsFlow = 1;
-	} else 
+	} else
 #endif
 	{
 		lpdcb->fRtsControl = RTS_CONTROL_ENABLE;
@@ -1395,8 +1395,8 @@
 	else
 		lpdcb->fOutX = 0;
 /*
-	lpdcb->XonChar = 
-	lpdcb->XoffChar = 
+	lpdcb->XonChar =
+	lpdcb->XoffChar =
  */
 	lpdcb->XonLim = 10;
 	lpdcb->XoffLim = 10;
@@ -1404,7 +1404,7 @@
         COMM_SetCommError(handle,0);
 
         TRACE("OK\n");
- 
+
 	TRACE("bytesize %d baudrate %ld fParity %d Parity %d stopbits %d\n",
 	      lpdcb->ByteSize,lpdcb->BaudRate,lpdcb->fParity, lpdcb->Parity,
 	      (lpdcb->StopBits == ONESTOPBIT)?1:
@@ -1414,13 +1414,13 @@
 #ifdef CRTSCTS
 	if (	lpdcb->fOutxCtsFlow 			||
 		lpdcb->fRtsControl == RTS_CONTROL_HANDSHAKE
-		) 
+		)
 	  TRACE("CRTSCTS\n");
         else
-	
+
 	  TRACE("~CRTSCTS\n");
-	
-#endif	
+
+#endif
 	return TRUE;
 }
 
@@ -1506,7 +1506,7 @@
  *
  * Sets the timeouts used when reading and writing data to/from COMM ports.
  *
- * ReadIntervalTimeout 
+ * ReadIntervalTimeout
  *     - converted and passes to linux kernel as c_cc[VTIME]
  * ReadTotalTimeoutMultiplier, ReadTotalTimeoutConstant
  *     - used in ReadFile to calculate GetOverlappedResult's timeout
@@ -1601,7 +1601,7 @@
     LPDWORD lpModemStat) /* [out] The control register bits. */
 {
 	int fd,mstat, result=FALSE;
-	
+
 	*lpModemStat=0;
 #ifdef TIOCMGET
 	fd = FILE_GetUnixHandle( hFile, GENERIC_READ );
@@ -1657,7 +1657,7 @@
 
     /* FIXME: detect other events */
     *commio->buffer = EV_RXCHAR;
- 
+
     lpOverlapped->Internal = STATUS_SUCCESS;
 }
 
@@ -1761,11 +1761,11 @@
 
     return ret;
 }
-  
+
 /***********************************************************************
  *           GetCommProperties   (KERNEL32.@)
  *
- * This function fills in a structure with the capabilities of the 
+ * This function fills in a structure with the capabilities of the
  * communications port driver.
  *
  * RETURNS
@@ -1796,13 +1796,13 @@
     lpCommProp->dwMaxBaud           = BAUD_115200;
     lpCommProp->dwProvSubType       = PST_RS232;
     lpCommProp->dwProvCapabilities  = PCF_DTRDSR | PCF_PARITY_CHECK | PCF_RTSCTS ;
-    lpCommProp->dwSettableParams    = SP_BAUD | SP_DATABITS | SP_HANDSHAKING | 
+    lpCommProp->dwSettableParams    = SP_BAUD | SP_DATABITS | SP_HANDSHAKING |
                                       SP_PARITY | SP_PARITY_CHECK | SP_STOPBITS ;
     lpCommProp->dwSettableBaud      = BAUD_075 | BAUD_110 | BAUD_134_5 | BAUD_150 |
                 BAUD_300 | BAUD_600 | BAUD_1200 | BAUD_1800 | BAUD_2400 | BAUD_4800 |
                 BAUD_9600 | BAUD_19200 | BAUD_38400 | BAUD_57600 | BAUD_115200 ;
     lpCommProp->wSettableData       = DATABITS_5 | DATABITS_6 | DATABITS_7 | DATABITS_8 ;
-    lpCommProp->wSettableStopParity = STOPBITS_10 | STOPBITS_15 | STOPBITS_20 | 
+    lpCommProp->wSettableStopParity = STOPBITS_10 | STOPBITS_15 | STOPBITS_20 |
                 PARITY_NONE | PARITY_ODD |PARITY_EVEN | PARITY_MARK | PARITY_SPACE;
     lpCommProp->dwCurrentTxQueue    = lpCommProp->dwMaxTxQueue;
     lpCommProp->dwCurrentRxQueue    = lpCommProp->dwMaxRxQueue;
@@ -1816,12 +1816,12 @@
  * SetDefaultCommConfig is implemented in a DLL (usually SERIALUI.DLL).
  * This is dependent on the type of COMM port, but since it is doubtful
  * anybody will get around to implementing support for fancy serial
- * ports in WINE, this is hardcoded for the time being.  The name of 
- * this DLL should be stored in and read from the system registry in 
+ * ports in WINE, this is hardcoded for the time being.  The name of
+ * this DLL should be stored in and read from the system registry in
  * the hive HKEY_LOCAL_MACHINE, key
  * System\\CurrentControlSet\\Services\\Class\\Ports\\????
  * where ???? is the port number... that is determined by PNP
- * The DLL should be loaded when the COMM port is opened, and closed 
+ * The DLL should be loaded when the COMM port is opened, and closed
  * when the COMM port is closed. - MJM 20 June 2000
  ***********************************************************************/
 static CHAR lpszSerialUI[] = "serialui.dll";
@@ -1909,7 +1909,7 @@
     HANDLE       hFile,        /* [in] The communications device. */
     LPCOMMCONFIG lpCommConfig, /* [out] The communications configuration of the device (if it fits). */
     LPDWORD      lpdwSize)     /* [in/out] Initially the size of the configuration buffer/structure,
-                                  afterwards the number of bytes copied to the buffer or 
+                                  afterwards the number of bytes copied to the buffer or
                                   the needed size of the buffer. */
 {
     BOOL r;
@@ -1921,7 +1921,7 @@
 
     r = *lpdwSize < sizeof(COMMCONFIG);
     *lpdwSize = sizeof(COMMCONFIG);
-    if(!r)   
+    if(!r)
         return FALSE;
 
     lpCommConfig->dwSize = sizeof(COMMCONFIG);
diff --git a/dlls/kernel/console.c b/dlls/kernel/console.c
index 085cd35..6b69d92 100644
--- a/dlls/kernel/console.c
+++ b/dlls/kernel/console.c
@@ -333,7 +333,7 @@
  * RETURNS
  *    Success: TRUE
  *    Failure: FALSE
- * 
+ *
  */
 BOOL WINAPI WriteConsoleOutputAttribute( HANDLE hConsoleOutput, CONST WORD *attr, DWORD length,
                                          COORD coord, LPDWORD lpNumAttrsWritten )
@@ -468,7 +468,7 @@
 
 /******************************************************************************
  * ReadConsoleOutputCharacterA [KERNEL32.@]
- * 
+ *
  */
 BOOL WINAPI ReadConsoleOutputCharacterA(HANDLE hConsoleOutput, LPSTR lpstr, DWORD count,
                                         COORD coord, LPDWORD read_count)
@@ -492,7 +492,7 @@
 
 /******************************************************************************
  * ReadConsoleOutputCharacterW [KERNEL32.@]
- * 
+ *
  */
 BOOL WINAPI ReadConsoleOutputCharacterW( HANDLE hConsoleOutput, LPWSTR buffer, DWORD count,
                                          COORD coord, LPDWORD read_count )
@@ -550,7 +550,7 @@
 
 /******************************************************************************
  *  ReadConsoleOutputA [KERNEL32.@]
- * 
+ *
  */
 BOOL WINAPI ReadConsoleOutputA( HANDLE hConsoleOutput, LPCHAR_INFO lpBuffer, COORD size,
                                 COORD coord, LPSMALL_RECT region )
@@ -573,7 +573,7 @@
 
 /******************************************************************************
  *  ReadConsoleOutputW [KERNEL32.@]
- * 
+ *
  * NOTE: The NT4 (sp5) kernel crashes on me if size is (0,0). I don't
  * think we need to be *that* compatible.  -- AJ
  */
diff --git a/dlls/kernel/format_msg.c b/dlls/kernel/format_msg.c
index be7b58c..435c7d1 100644
--- a/dlls/kernel/format_msg.c
+++ b/dlls/kernel/format_msg.c
@@ -37,10 +37,10 @@
 
 
 /* Messages...used by FormatMessage32* (KERNEL32.something)
- * 
+ *
  * They can be specified either directly or using a message ID and
  * loading them from the resource.
- * 
+ *
  * The resourcedata has following format:
  * start:
  * 0: DWORD nrofentries
@@ -78,7 +78,7 @@
     if (!hrsrc) return 0;
     hmem = LoadResource( instance, hrsrc );
     if (!hmem) return 0;
-    
+
     mrd = (PMESSAGE_RESOURCE_DATA)LockResource(hmem);
     mre = NULL;
     mrb = &(mrd->Blocks[0]);
@@ -177,7 +177,7 @@
         &&((dwFlags & FORMAT_MESSAGE_FROM_SYSTEM)
            || (dwFlags & FORMAT_MESSAGE_FROM_HMODULE))) return 0;
 
-    if (width && width != FORMAT_MESSAGE_MAX_WIDTH_MASK) 
+    if (width && width != FORMAT_MESSAGE_MAX_WIDTH_MASK)
         FIXME("line wrapping (%lu) not supported.\n", width);
     from = NULL;
     if (dwFlags & FORMAT_MESSAGE_FROM_STRING)
@@ -306,7 +306,7 @@
 
                             HeapFree(GetProcessHeap(),0,b);
                         } else {
-                                /* NULL args - copy formatstr 
+                                /* NULL args - copy formatstr
                                  * (probably wrong)
                                  */
                             while ((lastf<f)&&(*lastf)) {
diff --git a/dlls/kernel/stress.c b/dlls/kernel/stress.c
index 34ea66f..cd59178 100644
--- a/dlls/kernel/stress.c
+++ b/dlls/kernel/stress.c
@@ -27,7 +27,7 @@
  */
 INT16 WINAPI AllocDiskSpace(LONG lLeft, UINT16 uDrive)
 {
-	FIXME("(%d, %ld) - stub\n", 
+	FIXME("(%d, %ld) - stub\n",
 		       uDrive, lLeft);
 
 	return 1;
diff --git a/dlls/kernel/sync.c b/dlls/kernel/sync.c
index 54e0751..3ec71d6 100644
--- a/dlls/kernel/sync.c
+++ b/dlls/kernel/sync.c
@@ -219,7 +219,7 @@
 }
 
 /***********************************************************************
- *       VWin32_EventWait	(KERNEL.450) 
+ *       VWin32_EventWait	(KERNEL.450)
  */
 VOID WINAPI VWin32_EventWait(HANDLE event)
 {
@@ -712,7 +712,7 @@
 {
     BOOL ret;
 
-    TRACE("%d %p %p %p %p\n", hNamedPipe, lpFlags, 
+    TRACE("%d %p %p %p %p\n", hNamedPipe, lpFlags,
           lpOutputBufferSize, lpInputBufferSize, lpMaxInstances);
 
     SERVER_START_REQ( get_named_pipe_info )
@@ -741,7 +741,7 @@
           hNamedPipe, lpState, lpCurInstances,
           lpMaxCollectionCount, lpCollectDataTimeout,
           lpUsername, nUsernameMaxSize);
-         
+
     return FALSE;
 }
 
@@ -757,7 +757,7 @@
           hNamedPipe, lpState, lpCurInstances,
           lpMaxCollectionCount, lpCollectDataTimeout,
           lpUsername, nUsernameMaxSize);
-         
+
     return FALSE;
 }
 
diff --git a/dlls/kernel/tests/alloc.c b/dlls/kernel/tests/alloc.c
index 49f7fcf..8d10c38 100644
--- a/dlls/kernel/tests/alloc.c
+++ b/dlls/kernel/tests/alloc.c
@@ -149,7 +149,7 @@
 
 /* Check that HeapDestry works */
    ok(HeapDestroy(heap),"HeapDestroy failed");
-} 
+}
 
 /* The following functions don't have tests, because either I don't know how
    to test them, or they are WinNT only, or require multiple threads.
@@ -292,7 +292,7 @@
           }
         }
         ok(!error,"LocalAlloc should have zeroed out it's allocated memory");
-        ok(!(error=LocalUnlock(mem2)) && 
+        ok(!(error=LocalUnlock(mem2)) &&
                 (GetLastError()==ERROR_NOT_LOCKED || GetLastError()==NO_ERROR),
            "LocalUnlock Failed.");
       }
@@ -374,7 +374,7 @@
     sysInfo.dwPageSize=0;
     GetSystemInfo(&sysInfo);
     ok(sysInfo.dwPageSize>0,"GetSystemInfo should return a valid page size");
-    
+
 /* Chhose a reasonable allocation size */
     memchunk=10*sysInfo.dwPageSize;
 
diff --git a/dlls/kernel/tests/locale.c b/dlls/kernel/tests/locale.c
index 2aee6e5..2e1c93b 100644
--- a/dlls/kernel/tests/locale.c
+++ b/dlls/kernel/tests/locale.c
@@ -34,7 +34,7 @@
 char GlobalBuffer[BUFFER_SIZE];
 
 // TODO :
-// Unicode versions 
+// Unicode versions
 // EnumTimeFormatsA
 // EnumDateFormatsA
 // LCMapStringA
@@ -58,7 +58,7 @@
 	ret = GetLocaleInfoA(lcid, LOCALE_SDAYNAME1, buffer, 0);
 	cmp = strncmp (buffer, Expected, strlen(Expected));
 	ok (cmp == 0, "GetLocaleInfoA got %s instead of %s", buffer, Expected);
-	eq (ret, strlen("Monday") + 1, "GetLocaleInfoA with len=0", "%d");	
+	eq (ret, strlen("Monday") + 1, "GetLocaleInfoA with len=0", "%d");
 
 	strcpy(Expected, "Monxx");
 	memset( buffer, 'x', sizeof (buffer)/sizeof(buffer[0]) );
@@ -66,7 +66,7 @@
 	cmp = strncmp (buffer, Expected, strlen(Expected));
 	ok (cmp == 0, "GetLocaleInfoA got %s instead of %s", buffer, Expected);
 	eq (ret, 0, "GetLocaleInfoA with len = 3", "%d");
-			
+
 	strcpy(Expected, "Monday");
 	memset( buffer, 'x', sizeof (buffer)/sizeof(buffer[0]) );
 	ret = GetLocaleInfoA(lcid, LOCALE_SDAYNAME1, buffer, 10);
@@ -107,7 +107,7 @@
         }
 
 	strcpy(Expected, "AM 08:56@13");
-	curtime.wHour = 8;  curtime.wMinute = 56; 
+	curtime.wHour = 8;  curtime.wMinute = 56;
 	curtime.wSecond = 13; curtime.wMilliseconds = 22;
 	ret = GetTimeFormatA(lcid, TIME_FORCE24HOURFORMAT, &curtime, format, buffer, sizeof(buffer));
 	cmp = strncmp (Expected, buffer, strlen(Expected)+1);
@@ -293,7 +293,7 @@
 	ret = EnumTimeFormatsA(EnumTimeFormatsProc, lcid, 0);
 
 	eq (ret, 1, "EnumTimeFormats should return 1", "%d");
-	ok (strncmp (GlobalBuffer, Expected, strlen(Expected)) == 0, 
+	ok (strncmp (GlobalBuffer, Expected, strlen(Expected)) == 0,
 				"EnumTimeFormats failed");
 	ok (ret == 1, "EnumTimeFormats should return 1");
 }
@@ -324,7 +324,7 @@
 	ok (ret== 1, "CompareStringA (st1=%s str2=%s) expected result=1", buffer1, buffer2);
 
 	lcid = MAKELCID(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), SORT_DEFAULT );
-	
+
 	strcpy(buffer1, "héhé"); strcpy(buffer2, "hèhè");
 	ret = CompareStringA(lcid, NORM_IGNORECASE, buffer1, -1, buffer2, -1);
 	ok (ret== 1, "CompareStringA (st1=%s str2=%s) expected result=1", buffer1, buffer2);
diff --git a/dlls/kernel/tests/path.c b/dlls/kernel/tests/path.c
index 8056ebf..c4b0278 100644
--- a/dlls/kernel/tests/path.c
+++ b/dlls/kernel/tests/path.c
@@ -66,7 +66,7 @@
          for wine.  It is not very pretty, but it sure beats duplicating this
          function lots of times
 */
-static void test_ValidPathA(CHAR *curdir, CHAR *subdir, CHAR *filename, 
+static void test_ValidPathA(CHAR *curdir, CHAR *subdir, CHAR *filename,
                          CHAR *shortstr, SLpassfail *passfail, CHAR *errstr) {
   CHAR tmpstr[MAX_PATH],
        fullpath[MAX_PATH],      /*full path to the file (not short/long) */
@@ -119,7 +119,7 @@
          "%s: GetFullPathNameA returned '%s' instead of '%s'",
          errstr,tmpstr,fullpath);
     }
-  } else { 
+  } else {
     ok(lstrcmpiA(strptr,filename)==0,
        "%s: GetFullPathNameA returned '%s' instead of '%s'",
        errstr,strptr,filename);
@@ -136,7 +136,7 @@
     passfail->shortlen=len;
     passfail->shorterror=GetLastError();
   }
-/* Test GetLongPathNameA functionality 
+/* Test GetLongPathNameA functionality
    We test both conversion from GetFullPathNameA and from GetShortPathNameA
 */
   if(pGetLongPathNameA) {
@@ -144,7 +144,7 @@
       SetLastError(0);
       len=pGetLongPathNameA(shortstr,tmpstr,MAX_PATH);
       if(passfail==NULL) {
-        ok(len, 
+        ok(len,
           "%s: GetLongPathNameA failed during Short->Long conversion", errstr);
         ok(lstrcmpiA(fullpathlong,tmpstr)==0,
            "%s: GetLongPathNameA returned '%s' instead of '%s'",
@@ -186,7 +186,7 @@
   ext=len; fil=len; done=0; error=0;
 /* walk backwards over path looking for '.' or '\\' seperators */
   for(i=len-1;(i>=0) && (!done);i--) {
-    if(path[i]=='.') 
+    if(path[i]=='.')
       if(ext!=len) error=1; else ext=i;
     else if(path[i]=='\\') {
       if(i==len-1) {
@@ -229,7 +229,7 @@
    characters in the filename.
      'valid' indicates whether this would be an allowed filename
      'todo' indictaes that wine doesn't get this right yet.
-   NOTE: We always call this routine with a non-existant filename, so 
+   NOTE: We always call this routine with a non-existant filename, so
          Get(Short|Long)PathNameA should never pass, but GetFullPathNameA
          should.
 */
@@ -317,7 +317,7 @@
 /* else thest that it fails correctly */
     chklen=lstrlenA(olddir);
     ok(val==0,
-       "%s: SetCurrentDirectoryA passed when it should have failed",errstr); 
+       "%s: SetCurrentDirectoryA passed when it should have failed",errstr);
     ok(len==chklen,
        "%s: SetCurrentDirectory changed the directrory, though it failed",
        errstr);
@@ -351,7 +351,7 @@
          "GetTempPathA should not have modified the buffer");
     }
   }
-/* Test GetTmpFileNameA 
+/* Test GetTmpFileNameA
    The only test we do here is whether GetTempFileNameA passes or not.
    We do not thoroughly test this function yet (specifically, whether
    it behaves correctly when 'unique' is non zero)
@@ -363,7 +363,7 @@
      lstrcmpiA(newdir+(lstrlenA(newdir)-lstrlenA(tmpstr1)),tmpstr1)==0,
      "GetTempPath returned '%s' which doesn't match '%s' or '%s'",
      newdir,tmpstr,tmpstr1);
- 
+
 /* Do some CreateDirectoryA tests */
 /* It would be nice to do test the SECURITY_ATTRIBUTES, but I don't
    really understand how they work.
@@ -422,13 +422,13 @@
   ok(len1==len+1, "GetCurrentDirectoryA returned %d instead of %d",len1,len+1);
   ok(lstrcmpiA(tmpstr,"aaaaaaa")==0,
      "GetCurrentDirectoryA should not have modified the buffer");
-/* SetCurrentDirectoryA shouldn't care whether the string has a 
+/* SetCurrentDirectoryA shouldn't care whether the string has a
    trailing '\\' or not
 */
   sprintf(tmpstr,"%s\\",newdir);
   test_setdir(origdir,tmpstr,newdir,1,"check 1");
   test_setdir(origdir,newdir,NULL,1,"check 2");
-/* Set the directory to the working area.  We just tested that this works, 
+/* Set the directory to the working area.  We just tested that this works,
    so why check it again.
 */
   SetCurrentDirectoryA(newdir);
@@ -569,7 +569,7 @@
   test_ValidPathA(curdir,NONDIR_SHORT,SHORTFILE,tmpstr,&passfail,"test9");
   todo_wine {
     ok(passfail.shortlen==0,"GetShortPathNameA passed when it shouldn't have");
-    ok(passfail.shorterror==ERROR_PATH_NOT_FOUND || 
+    ok(passfail.shorterror==ERROR_PATH_NOT_FOUND ||
        passfail.shorterror==ERROR_FILE_NOT_FOUND,
        "GetShortPathA returned %d and not 'ERROR_PATH_NOT_FOUND'",
         passfail.shorterror);
@@ -584,7 +584,7 @@
 /* Now try a 8.3 directory, long file name */
   test_ValidPathA(curdir,NONDIR_SHORT,LONGFILE,tmpstr,&passfail,"test10");
   ok(passfail.shortlen==0,"GetShortPathNameA passed when it shouldn't have");
-  ok(passfail.shorterror==ERROR_PATH_NOT_FOUND || 
+  ok(passfail.shorterror==ERROR_PATH_NOT_FOUND ||
      passfail.shorterror==ERROR_FILE_NOT_FOUND,
      "GetShortPathA returned %d and not 'ERROR_PATH_NOT_FOUND'",
       passfail.shorterror);
@@ -598,7 +598,7 @@
 /* Next is a long directory, 8.3 file */
   test_ValidPathA(curdir,NONDIR_LONG,SHORTFILE,tmpstr,&passfail,"test11");
   ok(passfail.shortlen==0,"GetShortPathNameA passed when it shouldn't have");
-  ok(passfail.shorterror==ERROR_PATH_NOT_FOUND || 
+  ok(passfail.shorterror==ERROR_PATH_NOT_FOUND ||
      passfail.shorterror==ERROR_FILE_NOT_FOUND,
      "GetShortPathA returned %d and not 'ERROR_PATH_NOT_FOUND'",
       passfail.shorterror);
@@ -612,7 +612,7 @@
 /*Lastly a long directory, long file */
   test_ValidPathA(curdir,NONDIR_LONG,LONGFILE,tmpstr,&passfail,"test12");
   ok(passfail.shortlen==0,"GetShortPathNameA passed when it shouldn't have");
-  ok(passfail.shorterror==ERROR_PATH_NOT_FOUND || 
+  ok(passfail.shorterror==ERROR_PATH_NOT_FOUND ||
      passfail.shorterror==ERROR_FILE_NOT_FOUND,
      "GetShortPathA returned %d and not 'ERROR_PATH_NOT_FOUND'",
       passfail.shorterror);
diff --git a/dlls/kernel/tests/process.c b/dlls/kernel/tests/process.c
index f43f95e..df58baf 100644
--- a/dlls/kernel/tests/process.c
+++ b/dlls/kernel/tests/process.c
@@ -119,7 +119,7 @@
     if (!len--) return NULL;
     ptr = (WCHAR*)grab_memory(len * 2 + 1);
     for (i = 0; i < len; i++)
-        ptr[i] = (decode_char(str[4 * i]) << 12) | 
+        ptr[i] = (decode_char(str[4 * i]) << 12) |
             (decode_char(str[4 * i + 1]) << 8) |
             (decode_char(str[4 * i + 2]) << 4) |
             (decode_char(str[4 * i + 3]) << 0);
@@ -194,33 +194,33 @@
 
     /* output of startup info (Ansi) */
     GetStartupInfoA(&siA);
-    childPrintf(hFile, 
+    childPrintf(hFile,
                 "[StartupInfoA]\ncb=%08ld\nlpDesktop=%s\nlpTitle=%s\n"
                 "dwX=%lu\ndwY=%lu\ndwXSize=%lu\ndwYSize=%lu\n"
                 "dwXCountChars=%lu\ndwYCountChars=%lu\ndwFillAttribute=%lu\n"
                 "dwFlags=%lu\nwShowWindow=%u\n"
                 "hStdInput=%lu\nhStdOutput=%lu\nhStdError=%lu\n\n",
                 siA.cb, encodeA(siA.lpDesktop), encodeA(siA.lpTitle),
-                siA.dwX, siA.dwY, siA.dwXSize, siA.dwYSize, 
-                siA.dwXCountChars, siA.dwYCountChars, siA.dwFillAttribute, 
-                siA.dwFlags, siA.wShowWindow, 
+                siA.dwX, siA.dwY, siA.dwXSize, siA.dwYSize,
+                siA.dwXCountChars, siA.dwYCountChars, siA.dwFillAttribute,
+                siA.dwFlags, siA.wShowWindow,
                 (DWORD)siA.hStdInput, (DWORD)siA.hStdOutput, (DWORD)siA.hStdError);
 
-    /* since GetStartupInfoW is only implemented in win2k, 
+    /* since GetStartupInfoW is only implemented in win2k,
      * zero out before calling so we can notice the difference
      */
     memset(&siW, 0, sizeof(siW));
     GetStartupInfoW(&siW);
-    childPrintf(hFile, 
+    childPrintf(hFile,
                 "[StartupInfoW]\ncb=%08ld\nlpDesktop=%s\nlpTitle=%s\n"
                 "dwX=%lu\ndwY=%lu\ndwXSize=%lu\ndwYSize=%lu\n"
                 "dwXCountChars=%lu\ndwYCountChars=%lu\ndwFillAttribute=%lu\n"
                 "dwFlags=%lu\nwShowWindow=%u\n"
                 "hStdInput=%lu\nhStdOutput=%lu\nhStdError=%lu\n\n",
                 siW.cb, encodeW(siW.lpDesktop), encodeW(siW.lpTitle),
-                siW.dwX, siW.dwY, siW.dwXSize, siW.dwYSize, 
-                siW.dwXCountChars, siW.dwYCountChars, siW.dwFillAttribute, 
-                siW.dwFlags, siW.wShowWindow, 
+                siW.dwX, siW.dwY, siW.dwXSize, siW.dwYSize,
+                siW.dwXCountChars, siW.dwYCountChars, siW.dwFillAttribute,
+                siW.dwFlags, siW.wShowWindow,
                 (DWORD)siW.hStdInput, (DWORD)siW.hStdOutput, (DWORD)siW.hStdError);
 
     /* Arguments */
@@ -286,7 +286,7 @@
     if (GetCurrentDirectoryW(sizeof(bufW) / sizeof(bufW[0]), bufW))
         childPrintf(hFile, "CurrDirW=%s\n", encodeW(bufW));
     childPrintf(hFile, "\n");
-    
+
     CloseHandle(hFile);
 }
 
@@ -342,7 +342,7 @@
     } while (0)
 
 /* using !expect insures that the test will fail if the sect/key isn't present
- * in result file 
+ * in result file
  */
 #define okChildInt(sect, key, expect) \
     do { \
diff --git a/dlls/kernel/thunk.c b/dlls/kernel/thunk.c
index 683ab76..ba46ac8 100644
--- a/dlls/kernel/thunk.c
+++ b/dlls/kernel/thunk.c
@@ -62,7 +62,7 @@
 
 /***********************************************************************
  *           LogApiThkLSF    (KERNEL32.42)
- * 
+ *
  * NOTE: needs to preserve all registers!
  */
 void WINAPI LogApiThkLSF( LPSTR func, CONTEXT86 *context )
@@ -72,7 +72,7 @@
 
 /***********************************************************************
  *           LogApiThkSL    (KERNEL32.44)
- * 
+ *
  * NOTE: needs to preserve all registers!
  */
 void WINAPI LogApiThkSL( LPSTR func, CONTEXT86 *context )
@@ -82,7 +82,7 @@
 
 /***********************************************************************
  *           LogCBThkSL    (KERNEL32.47)
- * 
+ *
  * NOTE: needs to preserve all registers!
  */
 void WINAPI LogCBThkSL( LPSTR func, CONTEXT86 *context )
@@ -92,7 +92,7 @@
 
 /***********************************************************************
  * Generates a FT_Prolog call.
- *	
+ *
  *  0FB6D1                  movzbl edx,cl
  *  8B1495xxxxxxxx	    mov edx,[4*edx + targetTable]
  *  68xxxxxxxx		    push FT_Prolog
@@ -141,14 +141,14 @@
 /***********************************************************************
  *           _loadthunk
  */
-static LPVOID _loadthunk(LPCSTR module, LPCSTR func, LPCSTR module32, 
+static LPVOID _loadthunk(LPCSTR module, LPCSTR func, LPCSTR module32,
                          struct ThunkDataCommon *TD32, DWORD checksum)
 {
     struct ThunkDataCommon *TD16;
     HMODULE hmod;
     int ordinal;
 
-    if ((hmod = LoadLibrary16(module)) <= 32) 
+    if ((hmod = LoadLibrary16(module)) <= 32)
     {
         ERR("(%s, %s, %s): Unable to load '%s', error %d\n",
                    module, func, module32, module, hmod);
@@ -166,7 +166,7 @@
     if (TD32 && memcmp(TD16->magic, TD32->magic, 4))
     {
         ERR("(%s, %s, %s): Bad magic %c%c%c%c (should be %c%c%c%c)\n",
-                   module, func, module32, 
+                   module, func, module32,
                    TD16->magic[0], TD16->magic[1], TD16->magic[2], TD16->magic[3],
                    TD32->magic[0], TD32->magic[1], TD32->magic[2], TD32->magic[3]);
         return 0;
@@ -210,7 +210,7 @@
  *		ThunkConnect32		(KERNEL32.@)
  * Connects a 32bit and a 16bit thunkbuffer.
  */
-UINT WINAPI ThunkConnect32( 
+UINT WINAPI ThunkConnect32(
 	struct ThunkDataCommon *TD,  /* [in/out] thunkbuffer */
 	LPSTR thunkfun16,            /* [in] win16 thunkfunction */
 	LPSTR module16,              /* [in] name of win16 dll */
@@ -236,11 +236,11 @@
     }
     else
     {
-        ERR("Invalid magic %c%c%c%c\n", 
+        ERR("Invalid magic %c%c%c%c\n",
                    TD->magic[0], TD->magic[1], TD->magic[2], TD->magic[3]);
         return 0;
     }
-    
+
     switch (dwReason)
     {
         case DLL_PROCESS_ATTACH:
@@ -270,7 +270,7 @@
                 tdb->next = SL32->data->targetDB;   /* FIXME: not thread-safe! */
                 SL32->data->targetDB = tdb;
 
-                TRACE("Process %08lx allocated TargetDB entry for ThunkDataSL %08lx\n", 
+                TRACE("Process %08lx allocated TargetDB entry for ThunkDataSL %08lx\n",
                              GetCurrentProcessId(), (DWORD)SL32->data);
             }
             else
@@ -332,7 +332,7 @@
 
 /**********************************************************************
  * 		FT_Prolog			(KERNEL32.@)
- * 
+ *
  * The set of FT_... thunk routines is used instead of QT_Thunk,
  * if structures have to be converted from 32-bit to 16-bit
  * (change of member alignment, conversion of members).
@@ -349,7 +349,7 @@
  *              bits 10..15  number of DWORD arguments
  *
  * Output: A new stackframe is created, and a 64 byte buffer
- *         allocated on the stack. The layout of the stack 
+ *         allocated on the stack. The layout of the stack
  *         on return is as follows:
  *
  *  (ebp+4)  return address to caller of thunk function
@@ -371,7 +371,7 @@
  *  (ebp-64)
  *
  *  ESP is EBP-64 after return.
- *         
+ *
  */
 
 void WINAPI FT_Prolog( CONTEXT86 *context )
@@ -398,7 +398,7 @@
 /**********************************************************************
  * 		FT_Thunk			(KERNEL32.@)
  *
- * This routine performs the actual call to 16-bit code, 
+ * This routine performs the actual call to 16-bit code,
  * similar to QT_Thunk. The differences are:
  *  - The call target is taken from the buffer created by FT_Prolog
  *  - Those arguments requested by the thunk code (by setting the
@@ -407,11 +407,11 @@
  *    are guaranteed to point to structures copied to the stack
  *    by the thunk code, so we always use the 16-bit stack selector
  *    for those addresses).
- * 
+ *
  *    The bit #i of EBP-20 corresponds here to the DWORD starting at
  *    ESP+4 + 2*i.
- * 
- * FIXME: It is unclear what happens if there are more than 32 WORDs 
+ *
+ * FIXME: It is unclear what happens if there are more than 32 WORDs
  *        of arguments, so that the single DWORD bitmap is no longer
  *        sufficient ...
  */
@@ -464,8 +464,8 @@
  *
  * One of the FT_ExitNN functions is called at the end of the thunk code.
  * It removes the stack frame created by FT_Prolog, moves the function
- * return from EBX to EAX (yes, FT_Thunk did use EAX for the return 
- * value, but the thunk code has moved it from EAX to EBX in the 
+ * return from EBX to EAX (yes, FT_Thunk did use EAX for the return
+ * value, but the thunk code has moved it from EAX to EBX in the
  * meantime ... :-), restores the caller's EBX, ESI, and EDI registers,
  * and perform a return to the CALLER of the thunk code (while removing
  * the given number of arguments from the caller's stack).
@@ -568,7 +568,7 @@
 
 /***********************************************************************
  * 		ThunkInitLS 	(KERNEL32.43)
- * A thunkbuffer link routine 
+ * A thunkbuffer link routine
  * The thunkbuf looks like:
  *
  *	00: DWORD	length		? don't know exactly
@@ -600,14 +600,14 @@
 
 /***********************************************************************
  * 		Common32ThkLS 	(KERNEL32.45)
- * 
+ *
  * This is another 32->16 thunk, independent of the QT_Thunk/FT_Thunk
- * style thunks. The basic difference is that the parameter conversion 
+ * style thunks. The basic difference is that the parameter conversion
  * is done completely on the *16-bit* side here. Thus we do not call
  * the 16-bit target directly, but call a common entry point instead.
  * This entry function then calls the target according to the target
  * number passed in the DI register.
- * 
+ *
  * Input:  EAX    SEGPTR to the common 16-bit entry point
  *         CX     offset in thunk table (target number * 4)
  *         DX     error return value if execution fails (unclear???)
@@ -620,14 +620,14 @@
  *   (esp+40)  32-bit arguments
  *     ...
  *   (esp+8)   32 byte of stack space available as buffer
- *   (esp)     8 byte return address for use with 0x66 lret 
- * 
+ *   (esp)     8 byte return address for use with 0x66 lret
+ *
  * The called 16-bit stub uses a 0x66 lret to return to 32-bit code,
  * and uses the EAX register to return a DWORD return value.
- * Thus we need to use a special assembly glue routine 
+ * Thus we need to use a special assembly glue routine
  * (CallRegisterLongProc instead of CallRegisterShortProc).
  *
- * Finally, we return to the caller, popping the arguments off 
+ * Finally, we return to the caller, popping the arguments off
  * the stack.  The number of arguments to be popped is returned
  * in the BL register by the called 16-bit routine.
  *
@@ -667,12 +667,12 @@
  * YET Another 32->16 thunk. The difference to Common32ThkLS is that
  * argument processing is done on both the 32-bit and the 16-bit side:
  * The 32-bit side prepares arguments, copying them onto the stack.
- * 
- * When this routine is called, the first word on the stack is the 
+ *
+ * When this routine is called, the first word on the stack is the
  * number of argument bytes prepared by the 32-bit code, and EDX
  * contains the 16-bit target address.
  *
- * The called 16-bit routine is another relaycode, doing further 
+ * The called 16-bit routine is another relaycode, doing further
  * argument processing and then calling the real 16-bit target
  * whose address is stored at [bp-04].
  *
@@ -680,7 +680,7 @@
  * After return from the 16-bit relaycode, the arguments need
  * to be copied *back* to the 32-bit stack, since the 32-bit
  * relaycode processes output parameters.
- * 
+ *
  * Note that we copy twice the number of arguments, since some of the
  * 16-bit relaycodes in SYSTHUNK.DLL directly access the original
  * arguments of the caller!
@@ -710,7 +710,7 @@
     context->Edx = context16.Edx;
 
     /* Copy modified buffers back to 32-bit stack */
-    memcpy( (LPBYTE)context->Esp, 
+    memcpy( (LPBYTE)context->Esp,
             (LPBYTE)CURRENT_STACK16 - argsize, argsize );
 
     context->Esp +=   LOWORD(context16.Esp) -
@@ -770,7 +770,7 @@
 	*(DWORD*)(thunk+0x35) = (DWORD)GetProcAddress(hkrnl32,(LPSTR)90);
 	*(DWORD*)(thunk+0x6D) = (DWORD)GetProcAddress(hkrnl32,(LPSTR)89);
 
-	
+
 	if (!(addr = _loadthunk( dll16, thkbuf, dll32, NULL, len )))
 		return 0;
 
@@ -783,21 +783,21 @@
 
 /***********************************************************************
  *		FT_PrologPrime			(KERNEL32.89)
- * 
+ *
  * This function is called from the relay code installed by
- * ThunkInitLSF. It replaces the location from where it was 
+ * ThunkInitLSF. It replaces the location from where it was
  * called by a standard FT_Prolog call stub (which is 'primed'
  * by inserting the correct target table pointer).
  * Finally, it calls that stub.
- * 
+ *
  * Input:  ECX    target number + flags (passed through to FT_Prolog)
- *        (ESP)   offset of location where target table pointer 
+ *        (ESP)   offset of location where target table pointer
  *                is stored, relative to the start of the relay code
  *        (ESP+4) pointer to start of relay code
  *                (this is where the FT_Prolog call stub gets written to)
- * 
+ *
  * Note: The two DWORD arguments get popped off the stack.
- *        
+ *
  */
 void WINAPI FT_PrologPrime( CONTEXT86 *context )
 {
@@ -820,13 +820,13 @@
 /***********************************************************************
  *		QT_ThunkPrime			(KERNEL32.90)
  *
- * This function corresponds to FT_PrologPrime, but installs a 
+ * This function corresponds to FT_PrologPrime, but installs a
  * call stub for QT_Thunk instead.
  *
  * Input: (EBP-4) target number (passed through to QT_Thunk)
  *         EDX    target table pointer location offset
  *         EAX    start of relay code
- *      
+ *
  */
 void WINAPI QT_ThunkPrime( CONTEXT86 *context )
 {
@@ -925,7 +925,7 @@
     if(TRACE_ON(thunk))
     {
       DPRINTF("(%ld,0x%08lx,%p,[",nr,flags,fun);
-      for (i=0;i<nr/4;i++) 
+      for (i=0;i<nr/4;i++)
           DPRINTF("0x%08lx,",args[i]);
       DPRINTF("])\n");
     }
@@ -1001,7 +1001,7 @@
  * Following code is then generated by AllocSLCallback. The code is 16 bit, so
  * the 0x66 prefix switches from word->long registers.
  *
- *	665A		pop	edx 
+ *	665A		pop	edx
  *	6668x arg2 x 	pushl	<arg2>
  *	6652		push	edx
  *	EAx arg1 x	jmpf	<arg1>
@@ -1048,7 +1048,7 @@
  * 		GetTEBSelectorFS	(KERNEL.475)
  * 	Set the 16-bit %fs to the 32-bit %fs (current TEB selector)
  */
-void WINAPI GetTEBSelectorFS16(void) 
+void WINAPI GetTEBSelectorFS16(void)
 {
     CURRENT_STACK16->fs = wine_get_fs();
 }
@@ -1095,7 +1095,7 @@
       This means that SYSTHUNK.DLL itself switches to a 32-bit stack,
       and does a far call to the 32-bit code segment of OLECLI32/OLESVR32.
       Unfortunately, our CallTo/CallFrom mechanism is therefore completely
-      bypassed, which means it will crash the next time the 32-bit OLE 
+      bypassed, which means it will crash the next time the 32-bit OLE
       code thunks down again to 16-bit (this *will* happen!).
 
       The following hack tries to recognize this situation.
@@ -1108,8 +1108,8 @@
 
       If we recognize this situation, we try to simulate the actions
       of our CallTo/CallFrom mechanism by copying the 16-bit stack
-      to our 32-bit stack, creating a proper STACK16FRAME and 
-      updating cur_stack. */ 
+      to our 32-bit stack, creating a proper STACK16FRAME and
+      updating cur_stack. */
 
    if (   code[5] == 0xFF && code[6] == 0x55 && code[7] == 0xFC
        && code[13] == 0x66 && code[14] == 0xCB)
@@ -1519,15 +1519,15 @@
 /***********************************************************************
  *     THUNK_FindThunklet
  */
-THUNKLET *THUNK_FindThunklet( DWORD target, DWORD relay, 
-                              DWORD glue, BYTE type ) 
+THUNKLET *THUNK_FindThunklet( DWORD target, DWORD relay,
+                              DWORD glue, BYTE type )
 {
-    THUNKLET *thunk; 
+    THUNKLET *thunk;
 
     for (thunk = ThunkletAnchor; thunk; thunk = thunk->next)
         if (    thunk->type   == type
              && thunk->target == target
-             && thunk->relay  == relay 
+             && thunk->relay  == relay
              && ( type == THUNKLET_TYPE_LS ?
                     ( thunk->glue == glue - (DWORD)&thunk->type )
                   : ( thunk->glue == glue ) ) )
@@ -1539,8 +1539,8 @@
 /***********************************************************************
  *     THUNK_AllocLSThunklet
  */
-FARPROC THUNK_AllocLSThunklet( SEGPTR target, DWORD relay, 
-                                 FARPROC glue, HTASK16 owner ) 
+FARPROC THUNK_AllocLSThunklet( SEGPTR target, DWORD relay,
+                                 FARPROC glue, HTASK16 owner )
 {
     THUNKLET *thunk = THUNK_FindThunklet( (DWORD)target, relay, (DWORD)glue,
                                           THUNKLET_TYPE_LS );
@@ -1629,22 +1629,22 @@
 /***********************************************************************
  *     AllocLSThunkletSysthunk             (KERNEL.607)
  */
-FARPROC WINAPI AllocLSThunkletSysthunk16( SEGPTR target, 
+FARPROC WINAPI AllocLSThunkletSysthunk16( SEGPTR target,
                                           FARPROC relay, DWORD dummy )
 {
     if (!ThunkletSysthunkGlueLS) THUNK_Init();
-    return THUNK_AllocLSThunklet( (SEGPTR)relay, (DWORD)target, 
+    return THUNK_AllocLSThunklet( (SEGPTR)relay, (DWORD)target,
                                   ThunkletSysthunkGlueLS, GetCurrentTask() );
 }
 
 /***********************************************************************
  *     AllocSLThunkletSysthunk             (KERNEL.608)
  */
-SEGPTR WINAPI AllocSLThunkletSysthunk16( FARPROC target, 
+SEGPTR WINAPI AllocSLThunkletSysthunk16( FARPROC target,
                                        SEGPTR relay, DWORD dummy )
 {
     if (!ThunkletSysthunkGlueSL) THUNK_Init();
-    return THUNK_AllocSLThunklet( (FARPROC)relay, (DWORD)target, 
+    return THUNK_AllocSLThunklet( (FARPROC)relay, (DWORD)target,
                                   ThunkletSysthunkGlueSL, GetCurrentTask() );
 }
 
@@ -1652,34 +1652,34 @@
 /***********************************************************************
  *     AllocLSThunkletCallbackEx           (KERNEL.567)
  */
-FARPROC WINAPI AllocLSThunkletCallbackEx16( SEGPTR target, 
+FARPROC WINAPI AllocLSThunkletCallbackEx16( SEGPTR target,
                                             DWORD relay, HTASK16 task )
 {
     THUNKLET *thunk = MapSL( target );
     if ( !thunk ) return NULL;
 
-    if (   IsSLThunklet16( thunk ) && thunk->relay == relay 
+    if (   IsSLThunklet16( thunk ) && thunk->relay == relay
         && thunk->glue == (DWORD)ThunkletCallbackGlueSL )
         return (FARPROC)thunk->target;
 
-    return THUNK_AllocLSThunklet( target, relay, 
+    return THUNK_AllocLSThunklet( target, relay,
                                   ThunkletCallbackGlueLS, task );
 }
 
 /***********************************************************************
  *     AllocSLThunkletCallbackEx           (KERNEL.568)
  */
-SEGPTR WINAPI AllocSLThunkletCallbackEx16( FARPROC target, 
+SEGPTR WINAPI AllocSLThunkletCallbackEx16( FARPROC target,
                                          DWORD relay, HTASK16 task )
 {
     THUNKLET *thunk = (THUNKLET *)target;
     if ( !thunk ) return 0;
 
-    if (   IsLSThunklet( thunk ) && thunk->relay == relay 
+    if (   IsLSThunklet( thunk ) && thunk->relay == relay
         && thunk->glue == (DWORD)ThunkletCallbackGlueLS - (DWORD)&thunk->type )
         return (SEGPTR)thunk->target;
 
-    return THUNK_AllocSLThunklet( target, relay, 
+    return THUNK_AllocSLThunklet( target, relay,
                                   ThunkletCallbackGlueSL, task );
 }
 
@@ -1708,12 +1708,12 @@
 FARPROC WINAPI FindLSThunkletCallback( SEGPTR target, DWORD relay )
 {
     THUNKLET *thunk = MapSL( target );
-    if (   thunk && IsSLThunklet16( thunk ) && thunk->relay == relay 
+    if (   thunk && IsSLThunklet16( thunk ) && thunk->relay == relay
         && thunk->glue == (DWORD)ThunkletCallbackGlueSL )
         return (FARPROC)thunk->target;
 
-    thunk = THUNK_FindThunklet( (DWORD)target, relay, 
-                                (DWORD)ThunkletCallbackGlueLS, 
+    thunk = THUNK_FindThunklet( (DWORD)target, relay,
+                                (DWORD)ThunkletCallbackGlueLS,
                                 THUNKLET_TYPE_LS );
     return (FARPROC)thunk;
 }
@@ -1725,12 +1725,12 @@
 SEGPTR WINAPI FindSLThunkletCallback( FARPROC target, DWORD relay )
 {
     THUNKLET *thunk = (THUNKLET *)target;
-    if (   thunk && IsLSThunklet( thunk ) && thunk->relay == relay 
+    if (   thunk && IsLSThunklet( thunk ) && thunk->relay == relay
         && thunk->glue == (DWORD)ThunkletCallbackGlueLS - (DWORD)&thunk->type )
         return (SEGPTR)thunk->target;
 
-    thunk = THUNK_FindThunklet( (DWORD)target, relay, 
-                                (DWORD)ThunkletCallbackGlueSL, 
+    thunk = THUNK_FindThunklet( (DWORD)target, relay,
+                                (DWORD)ThunkletCallbackGlueSL,
                                 THUNKLET_TYPE_SL );
     return get_segptr( thunk );
 }
@@ -1759,7 +1759,7 @@
 /***********************************************************************
  *     RegisterCBClient                    (KERNEL.619)
  */
-INT16 WINAPI RegisterCBClient16( INT16 wCBCId, 
+INT16 WINAPI RegisterCBClient16( INT16 wCBCId,
                                  SEGPTR relay16, FARPROC *relay32 )
 {
     /* Search for free Callback ID */
@@ -1783,11 +1783,11 @@
 /***********************************************************************
  *     UnRegisterCBClient                  (KERNEL.622)
  */
-INT16 WINAPI UnRegisterCBClient16( INT16 wCBCId, 
+INT16 WINAPI UnRegisterCBClient16( INT16 wCBCId,
                                    SEGPTR relay16, FARPROC *relay32 )
 {
-    if (    wCBCId >= N_CBC_FIXED && wCBCId < N_CBC_TOTAL 
-         && CBClientRelay16[ wCBCId ] == relay16 
+    if (    wCBCId >= N_CBC_FIXED && wCBCId < N_CBC_TOTAL
+         && CBClientRelay16[ wCBCId ] == relay16
          && CBClientRelay32[ wCBCId ] == relay32 )
     {
         CBClientRelay16[ wCBCId ] = 0;
@@ -1820,7 +1820,7 @@
     SEGPTR stackSeg = stack16_push( 12 );
     LPWORD stackLin = MapSL( stackSeg );
     SEGPTR glue, *glueTab;
-    
+
     stackLin[3] = BP_reg( context );
     stackLin[2] = SI_reg( context );
     stackLin[1] = DI_reg( context );
diff --git a/dlls/kernel/time.c b/dlls/kernel/time.c
index 85a7a3a..bdb6991 100644
--- a/dlls/kernel/time.c
+++ b/dlls/kernel/time.c
@@ -51,19 +51,19 @@
 
 static const struct tagTZ_INFO TZ_INFO[] =
 {
-   {"MHT", 
+   {"MHT",
     {'D','a','t','e','l','i','n','e',' ','S','t','a','n','d','a','r','d',' ','T','i','m','e','\0'},
     -720, 0},
-   {"SST", 
+   {"SST",
     {'S','a','m','o','a',' ','S','t','a','n','d','a','r','d',' ','T','i','m','e','\0'},
     660, 0},
    {"HST",
     {'H','a','w','a','i','i','a','n',' ','S','t','a','n','d','a','r','d',' ','T','i','m','e','\0'},
     600, 0},
-   {"AKDT", 
+   {"AKDT",
     {'A','l','a','s','k','a','n',' ','S','t','a','n','d','a','r','d',' ','T','i','m','e','\0'},
     480, 1},
-   {"PDT", 
+   {"PDT",
     {'P','a','c','i','f','i','c',' ','S','t','a','n','d','a','r','d',' ','T','i','m','e','\0'},
     420, 1},
    {"MST",
@@ -258,7 +258,7 @@
    if (!strftime (psTZName, 7, "%Z", ptm))
       return (NULL);
 
-   for (i=0; i<(sizeof(TZ_INFO) / sizeof(struct tagTZ_INFO)); i++) 
+   for (i=0; i<(sizeof(TZ_INFO) / sizeof(struct tagTZ_INFO)); i++)
    {
       if ( strcmp(TZ_INFO[i].psTZFromUnix, psTZName) == 0 &&
            TZ_INFO[i].bias == bias &&
@@ -334,7 +334,7 @@
     ERR("Cannot set time to %d/%d/%d %d:%d:%d Time adjustment %ld %s\n",
             systime->wYear, systime->wMonth, systime->wDay, systime->wHour,
             systime->wMinute, systime->wSecond,
-            sec-oldsec, err == -1 ? "No Permission" : 
+            sec-oldsec, err == -1 ? "No Permission" :
                 sec==(time_t)-1 ? "" : "is too large." );
     return FALSE;
 }
@@ -535,7 +535,7 @@
  *
  *      Differences to UnixTimeToFileTime:
  *          1) Divided by CLK_TCK
- *          2) Time is relative. There is no 'starting date', so there is 
+ *          2) Time is relative. There is no 'starting date', so there is
  *             no need in offset correction, like in UnixTimeToFileTime
  */
 static void TIME_ClockTimeToFileTime(clock_t unix_time, LPFILETIME filetime)
@@ -589,7 +589,7 @@
     int ret;
     LPWSTR lpCalDataW = NULL;
 
-    FIXME("(%08lx,%08lx,%08lx,%p,%d,%p): quarter-stub\n", 
+    FIXME("(%08lx,%08lx,%08lx,%p,%d,%p): quarter-stub\n",
 	  Locale, Calendar, CalType, lpCalData, cchData, lpValue);
     /* FIXME: Should verify if Locale is allowable in ANSI, as per MSDN */
 
@@ -611,8 +611,8 @@
  */
 int WINAPI GetCalendarInfoW(LCID Locale, CALID Calendar, CALTYPE CalType,
 			    LPWSTR lpCalData, int cchData, LPDWORD lpValue)
-{	
-    FIXME("(%08lx,%08lx,%08lx,%p,%d,%p): quarter-stub\n", 
+{
+    FIXME("(%08lx,%08lx,%08lx,%p,%d,%p): quarter-stub\n",
 	  Locale, Calendar, CalType, lpCalData, cchData, lpValue);
 
     if (CalType & CAL_NOUSEROVERRIDE)
@@ -746,7 +746,7 @@
  */
 int WINAPI	SetCalendarInfoA(LCID Locale, CALID Calendar, CALTYPE CalType, LPCSTR lpCalData)
 {
-    FIXME("(%08lx,%08lx,%08lx,%s): stub\n", 
+    FIXME("(%08lx,%08lx,%08lx,%s): stub\n",
 	  Locale, Calendar, CalType, debugstr_a(lpCalData));
     return 0;
 }
@@ -757,7 +757,7 @@
  */
 int WINAPI	SetCalendarInfoW(LCID Locale, CALID Calendar, CALTYPE CalType, LPCWSTR lpCalData)
 {
-    FIXME("(%08lx,%08lx,%08lx,%s): stub\n", 
+    FIXME("(%08lx,%08lx,%08lx,%s): stub\n",
 	  Locale, Calendar, CalType, debugstr_w(lpCalData));
     return 0;
 }
diff --git a/dlls/kernel/toolhelp.c b/dlls/kernel/toolhelp.c
index 62638fb..f128d65 100644
--- a/dlls/kernel/toolhelp.c
+++ b/dlls/kernel/toolhelp.c
@@ -35,7 +35,7 @@
 WINE_DEFAULT_DEBUG_CHANNEL(toolhelp);
 
 
-/* FIXME: to make this work, we have to call back all these registered 
+/* FIXME: to make this work, we have to call back all these registered
  * functions from all over the WINE code. Someone with more knowledge than
  * me please do that. -Marcus
  */
@@ -86,7 +86,7 @@
 BOOL16 WINAPI NotifyUnregister16( HTASK16 htask )
 {
     int	i;
-    
+
     FIXME("(%x), semi-stub.\n", htask );
     if (!htask) htask = GetCurrentTask();
     for (i=nrofnotifys;i--;)
@@ -152,14 +152,14 @@
 BOOL16 WINAPI TimerCount16( TIMERINFO *pTimerInfo )
 {
     /* FIXME
-     * In standard mode, dwmsSinceStart = dwmsThisVM 
+     * In standard mode, dwmsSinceStart = dwmsThisVM
      *
      * I tested this, under Windows in enhanced mode, and
      * if you never switch VM (ie start/stop DOS) these
-     * values should be the same as well. 
+     * values should be the same as well.
      *
      * Also, Wine should adjust for the hardware timer
-     * to reduce the amount of error to ~1ms. 
+     * to reduce the amount of error to ~1ms.
      * I can't be bothered, can you?
      */
     pTimerInfo->dwmsSinceStart = pTimerInfo->dwmsThisVM = GetTickCount();
@@ -202,7 +202,7 @@
 /***********************************************************************
  *           CreateToolhelp32Snapshot			(KERNEL32.@)
  */
-HANDLE WINAPI CreateToolhelp32Snapshot( DWORD flags, DWORD process ) 
+HANDLE WINAPI CreateToolhelp32Snapshot( DWORD flags, DWORD process )
 {
     HANDLE ret;
 
@@ -402,7 +402,7 @@
  *              GlobalMasterHandle (KERNEL.28)
  *
  *
- * Should return selector and handle of the information structure for 
+ * Should return selector and handle of the information structure for
  * the global heap. selector and handle are stored in the THHOOK as
  * pGlobalHeap and hGlobalHeap.
  * As Wine doesn't have this structure, we return both values as zero
diff --git a/dlls/kernel/utthunk.c b/dlls/kernel/utthunk.c
index 82f9247..ba649b6 100644
--- a/dlls/kernel/utthunk.c
+++ b/dlls/kernel/utthunk.c
@@ -1,7 +1,7 @@
 /*
  * Win32s Universal Thunk API
  *
- * Copyright 1999 Ulrich Weigand 
+ * Copyright 1999 Ulrich Weigand
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -56,7 +56,7 @@
     struct _UTINFO    *next;
     HMODULE            hModule;
     HMODULE16          hModule16;
-    
+
     UT16THUNK          ut16;
     UT32THUNK          ut32;
 
@@ -66,9 +66,9 @@
 
 typedef DWORD (CALLBACK *UTGLUEPROC)( LPVOID lpBuff, DWORD dwUserDefined );
 
-BOOL WINAPI UTRegister( HMODULE hModule, LPSTR lpsz16BITDLL, 
+BOOL WINAPI UTRegister( HMODULE hModule, LPSTR lpsz16BITDLL,
                         LPSTR lpszInitName, LPSTR lpszProcName,
-                        FARPROC *ppfn32Thunk, FARPROC pfnUT32CallBack, 
+                        FARPROC *ppfn32Thunk, FARPROC pfnUT32CallBack,
                         LPVOID lpBuff );
 
 VOID WINAPI UTUnRegister( HMODULE hModule );
@@ -102,7 +102,7 @@
 /****************************************************************************
  *		UTGlue32
  */
-static DWORD WINAPI UTGlue32( FARPROC16 target, LPVOID lpBuff, DWORD dwUserDefined, 
+static DWORD WINAPI UTGlue32( FARPROC16 target, LPVOID lpBuff, DWORD dwUserDefined,
                               LPVOID translationList[] )
 {
     SEGPTR segBuff, *segptrList = NULL;
@@ -125,7 +125,7 @@
         }
 
         for ( i = 0; i < nList; i++ )
-            segptrList[i] = *(SEGPTR *)translationList[i] 
+            segptrList[i] = *(SEGPTR *)translationList[i]
                           = MapLS( *(LPVOID *)translationList[i] );
     }
 
@@ -227,14 +227,14 @@
 /****************************************************************************
  *		UTRegister (KERNEL32.@)
  */
-BOOL WINAPI UTRegister( HMODULE hModule, LPSTR lpsz16BITDLL, 
+BOOL WINAPI UTRegister( HMODULE hModule, LPSTR lpsz16BITDLL,
                         LPSTR lpszInitName, LPSTR lpszProcName,
-                        FARPROC *ppfn32Thunk, FARPROC pfnUT32CallBack, 
+                        FARPROC *ppfn32Thunk, FARPROC pfnUT32CallBack,
                         LPVOID lpBuff )
 {
     UTINFO *ut;
-    HMODULE16 hModule16; 
-    FARPROC16 target16, init16; 
+    HMODULE16 hModule16;
+    FARPROC16 target16, init16;
 
     /* Load 16-bit DLL and get UTProc16 entry point */
 
@@ -279,7 +279,7 @@
     /* Return 32-bit thunk */
 
     *ppfn32Thunk = (FARPROC) &ut->ut32;
-    
+
     return TRUE;
 }
 
@@ -300,7 +300,7 @@
     }
     RtlReleasePebLock();
 
-    if ( hModule16 ) 
+    if ( hModule16 )
         FreeLibrary16( hModule16 );
 }
 
diff --git a/dlls/kernel/win87em.c b/dlls/kernel/win87em.c
index 394b7d6..573607a 100644
--- a/dlls/kernel/win87em.c
+++ b/dlls/kernel/win87em.c
@@ -40,7 +40,7 @@
  * (int13 error reporting of coprocessor)
  */
 
-/* have a look at /usr/src/linux/arch/i386/math-emu/ *.[ch] for more info 
+/* have a look at /usr/src/linux/arch/i386/math-emu/ *.[ch] for more info
  * especially control_w.h and status_w.h
  */
 /* FIXME: Still rather skeletal implementation only */
@@ -122,7 +122,7 @@
         WIN87_Init(context);
         break;
 
-    case 2: /* deinstall emulator (decrease instanceref), deinstall NMI vector	
+    case 2: /* deinstall emulator (decrease instanceref), deinstall NMI vector
              * if zero. Every '0' call should have a matching '2' call.
              */
         WIN87_Init(context);
@@ -131,7 +131,7 @@
         if (!RefCount && Installed)
             RestoreInt02h();
 #endif
-        
+
         break;
 
     case 3:
@@ -173,8 +173,8 @@
         /* OUT: DX:AX variable popped */
         {
             DWORD dw=0;
-            /* I don't know much about asm() programming. This could be 
-             * wrong. 
+            /* I don't know much about asm() programming. This could be
+             * wrong.
              */
 /* FIXME: could someone who really understands asm() fix this please? --AJ */
 /*            __asm__("fistp %0;wait" : "=m" (dw) : : "memory"); */
diff --git a/dlls/kernel/windebug.c b/dlls/kernel/windebug.c
index 19c0089..e971713 100644
--- a/dlls/kernel/windebug.c
+++ b/dlls/kernel/windebug.c
@@ -39,7 +39,7 @@
 		case 0x000E:
 		case 0x0060:	/* do nothing */
 				break;
-		case 0x0062: 
+		case 0x0062:
 				break;
 		case 0x0063:	/* do something complicated */
 				break;
@@ -54,5 +54,5 @@
 				break;
 		default:
 				break;
-	}	
+	}
 }
diff --git a/dlls/kernel/wowthunk.c b/dlls/kernel/wowthunk.c
index a9c2155..8d29cbd 100644
--- a/dlls/kernel/wowthunk.c
+++ b/dlls/kernel/wowthunk.c
@@ -1,7 +1,7 @@
 /*
  * Win32 WOW Generic Thunk API
  *
- * Copyright 1999 Ulrich Weigand 
+ * Copyright 1999 Ulrich Weigand
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -29,8 +29,8 @@
 WINE_DEFAULT_DEBUG_CHANNEL(thunk);
 
 /*
- * These are the 16-bit side WOW routines.  They reside in wownt16.h 
- * in the SDK; since we don't support Win16 source code anyway, I've 
+ * These are the 16-bit side WOW routines.  They reside in wownt16.h
+ * in the SDK; since we don't support Win16 source code anyway, I've
  * placed them here for compilation with Wine ...
  */
 
@@ -55,7 +55,7 @@
  */
 BOOL WINAPI K32WOWGetDescriptor( SEGPTR segptr, LPLDT_ENTRY ldtent )
 {
-    return GetThreadSelectorEntry( GetCurrentThread(), 
+    return GetThreadSelectorEntry( GetCurrentThread(),
                                    segptr >> 16, ldtent );
 }
 
@@ -77,15 +77,15 @@
  */
 LPVOID WINAPI K32WOWGetVDMPointerFix( DWORD vp, DWORD dwBytes, BOOL fProtectedMode )
 {
-    /* 
+    /*
      * Hmmm. According to the docu, we should call:
      *
      *          GlobalFix16( SELECTOROF(vp) );
      *
      * But this is unnecessary under Wine, as we never move global
-     * memory segments in linear memory anyway. 
+     * memory segments in linear memory anyway.
      *
-     * (I'm not so sure what we are *supposed* to do if 
+     * (I'm not so sure what we are *supposed* to do if
      *  fProtectedMode is TRUE, anyway ...)
      */
 
@@ -145,7 +145,7 @@
  */
 DWORD WINAPI K32WOWGlobalLockSize16( WORD hMem, PDWORD pcb )
 {
-    if ( pcb ) 
+    if ( pcb )
         *pcb = GlobalSize16( (HGLOBAL16)hMem );
 
     return K32WOWGlobalLock16( hMem );
@@ -169,7 +169,7 @@
 VOID WINAPI K32WOWYield16( void )
 {
     /*
-     * This does the right thing for both Win16 and Win32 tasks.  
+     * This does the right thing for both Win16 and Win32 tasks.
      * More or less, at least :-/
      */
     Yield16();
@@ -182,7 +182,7 @@
 {
     /*
      * Argh.  Our scheduler doesn't like DirectedYield by Win32
-     * tasks at all.  So we do hope that this routine is indeed 
+     * tasks at all.  So we do hope that this routine is indeed
      * only ever called by Win16 tasks that have thunked up ...
      */
     DirectedYield16( (HTASK16)htask16 );
@@ -263,16 +263,16 @@
     /*
      * Arguments must be prepared in the correct order by the caller
      * (both for PASCAL and CDECL calling convention), so we simply
-     * copy them to the 16-bit stack ... 
+     * copy them to the 16-bit stack ...
      */
     memcpy( (LPBYTE)CURRENT_STACK16 - cbArgs, (LPBYTE)pArgs, cbArgs );
 
 
     /*
      * Actually, we should take care whether the called routine cleans up
-     * its stack or not.  Fortunately, our wine_call_to_16 core doesn't rely on 
-     * the callee to do so; after the routine has returned, the 16-bit 
-     * stack pointer is always reset to the position it had before. 
+     * its stack or not.  Fortunately, our wine_call_to_16 core doesn't rely on
+     * the callee to do so; after the routine has returned, the 16-bit
+     * stack pointer is always reset to the position it had before.
      */
 
     ret = wine_call_to_16_long( (FARPROC16)vpfn16, cbArgs );
@@ -290,7 +290,7 @@
 {
     DWORD ret;
 
-    if ( !K32WOWCallback16Ex( vpfn16, WCB16_PASCAL, 
+    if ( !K32WOWCallback16Ex( vpfn16, WCB16_PASCAL,
                            sizeof(DWORD), &dwParam, &ret ) )
         ret = 0L;
 
@@ -317,7 +317,7 @@
 DWORD WINAPI LoadLibraryEx32W16( LPCSTR lpszLibFile, DWORD hFile, DWORD dwFlags )
 {
     HMODULE hModule;
-    DOS_FULL_NAME full_name; 
+    DOS_FULL_NAME full_name;
     DWORD mutex_count;
 
     /* if the file can not be found, call LoadLibraryExA anyway, since it might be
@@ -468,7 +468,7 @@
 /**********************************************************************
  *           _CallProcEx32W         (KERNEL.518)
  *
- * DWORD CallProcEx32W( DWORD cParams, DWORD fAddressConvert, 
+ * DWORD CallProcEx32W( DWORD cParams, DWORD fAddressConvert,
  *                      DWORD lpProcAddress, DWORD p1, ... );
  */
 DWORD WINAPI CallProcEx32W16( void )
@@ -483,7 +483,7 @@
  * FIXME!!!
  *
  */
-DWORD WINAPI WOW16Call(WORD x,WORD y,WORD z) 
+DWORD WINAPI WOW16Call(WORD x,WORD y,WORD z)
 {
         int     i;
         DWORD   calladdr;
diff --git a/dlls/lzexpand/lzexpand_main.c b/dlls/lzexpand/lzexpand_main.c
index e0d11a2..a9a2a89 100644
--- a/dlls/lzexpand/lzexpand_main.c
+++ b/dlls/lzexpand/lzexpand_main.c
@@ -1,5 +1,5 @@
 /*
- * LZ Decompression functions 
+ * LZ Decompression functions
  *
  * Copyright 1996 Marcus Meissner
  *
@@ -17,7 +17,7 @@
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
-/* 
+/*
  * FIXME: return values might be wrong
  */
 
@@ -48,7 +48,7 @@
 	BYTE	magic[8];
 	BYTE	compressiontype;
 	CHAR	lastchar;
-	DWORD	reallength;		
+	DWORD	reallength;
 };
 static BYTE LZMagic[8]={'S','Z','D','D',0x88,0xf0,0x27,0x33};
 
@@ -63,7 +63,7 @@
 	BYTE	table[0x1000];	/* the rotating LZ table */
 	UINT	curtabent;	/* CURrent TABle ENTry */
 
-	BYTE	stringlen;	/* length and position of current string */ 
+	BYTE	stringlen;	/* length and position of current string */
 	DWORD	stringpos;	/* from stringtable */
 
 
@@ -103,7 +103,7 @@
 }
 /* internal function, reads lzheader
  * returns BADINHANDLE for non filedescriptors
- * return 0 for file not compressed using LZ 
+ * return 0 for file not compressed using LZ
  * return UNKNOWNALG for unknown algorithm
  * returns lzfileheader in *head
  */
@@ -114,7 +114,7 @@
 	if (_llseek(fd,0,SEEK_SET)==-1)
 		return LZERROR_BADINHANDLE;
 
-	/* We can't directly read the lzfileheader struct due to 
+	/* We can't directly read the lzfileheader struct due to
 	 * structure element alignment
 	 */
 	if (_lread(fd,buf,14)<14)
@@ -173,7 +173,7 @@
  * on failure, returns error code <0
  * lzfiledescriptors range from 0x400 to 0x410 (only 16 open files per process)
  *
- * since _llseek uses the same types as libc.lseek, we just use the macros of 
+ * since _llseek uses the same types as libc.lseek, we just use the macros of
  *  libc
  */
 HFILE WINAPI LZInit( HFILE hfSrc )
@@ -194,7 +194,7 @@
         if (i == MAX_LZSTATES) return LZERROR_GLOBALLOC;
 	lzstates[i] = lzs = HeapAlloc( GetProcessHeap(), 0, sizeof(struct lzstate) );
 	if(lzs == NULL) return LZERROR_GLOBALLOC;
-	
+
 	memset(lzs,'\0',sizeof(*lzs));
 	lzs->realfd	= hfSrc;
 	lzs->lastchar	= head.lastchar;
@@ -209,11 +209,11 @@
 		lzstates[i] = NULL;
 		return LZERROR_GLOBALLOC;
 	}
-	
+
 	/* Yes, preinitialize with spaces */
 	memset(lzs->table,' ',0x1000);
 	/* Yes, start 16 byte from the END of the table */
-	lzs->curtabent	= 0xff0; 
+	lzs->curtabent	= 0xff0;
 	return 0x400 + i;
 }
 
@@ -298,7 +298,7 @@
 			head.lastchar=tolower(head.lastchar);
 		else
 			head.lastchar=toupper(head.lastchar);
-	}	
+	}
 
 	/* now look where to replace the last character */
 	if (NULL!=(t=strchr(s,'.'))) {
@@ -400,11 +400,11 @@
 		lzs->curtabent	&= 0xFFF;				\
 		lzs->realcurrent++;
 
-	/* if someone has seeked, we have to bring the decompressor 
+	/* if someone has seeked, we have to bring the decompressor
 	 * to that position
 	 */
 	if (lzs->realcurrent!=lzs->realwanted) {
-		/* if the wanted position is before the current position 
+		/* if the wanted position is before the current position
 		 * I see no easy way to unroll ... We have to restart at
 		 * the beginning. *sigh*
 		 */
@@ -531,7 +531,7 @@
         if (!IS_LZ_HANDLE(src))
 		xread=_lread;
 	else
-		xread=(_readfun)LZRead; 
+		xread=(_readfun)LZRead;
 	len=0;
 	while (1) {
 		ret=xread(src,buf,BUFLEN);
diff --git a/dlls/mpr/mpr_main.c b/dlls/mpr/mpr_main.c
index f81f684..6c5692b 100644
--- a/dlls/mpr/mpr_main.c
+++ b/dlls/mpr/mpr_main.c
@@ -24,7 +24,7 @@
 
 WINE_DEFAULT_DEBUG_CHANNEL(mpr);
 
- /* 
+ /*
   * FIXME: The following routines should use a private heap ...
   */
 
diff --git a/dlls/mpr/multinet.c b/dlls/mpr/multinet.c
index 575eb55..9b79449 100644
--- a/dlls/mpr/multinet.c
+++ b/dlls/mpr/multinet.c
@@ -32,7 +32,7 @@
  *    Success: NO_ERROR
  *    Failure: ERROR_NOT_SUPPORTED, ERROR_NOT_CONNECTED,
  *             ERROR_NO_NET_OR_BAD_PATH, ERROR_BAD_DEVICE,
- *             ERROR_BAD_NET_NAME, ERROR_INVALID_PARAMETER, 
+ *             ERROR_BAD_NET_NAME, ERROR_INVALID_PARAMETER,
  *             ERROR_NO_NETWORK, ERROR_EXTENDED_ERROR
  */
 DWORD WINAPI MultinetGetConnectionPerformanceA(
diff --git a/dlls/mpr/pwcache.c b/dlls/mpr/pwcache.c
index a483700..72f8816 100644
--- a/dlls/mpr/pwcache.c
+++ b/dlls/mpr/pwcache.c
@@ -28,7 +28,7 @@
  * WNetCachePassword [MPR.@]  Saves password in cache
  *
  * NOTES
- *	only the parameter count is verifyed  
+ *	only the parameter count is verifyed
  *
  *	---- everything below this line might be wrong (js) -----
  * RETURNS
@@ -43,9 +43,9 @@
     WORD cbPassword,  /* [in] Size of password */
     BYTE nType,       /* [in] Type of password to cache */
     WORD x)
-    
+
 {
-    FIXME( "(%p(%s), %d, %p(%s), %d, %d, 0x%08x): stub\n", 
+    FIXME( "(%p(%s), %d, %p(%s), %d, %d, 0x%08x): stub\n",
            pbResource, debugstr_a(pbResource), cbResource,
 	   pbPassword, debugstr_a(pbPassword), cbPassword,
 	   nType, x );
@@ -56,10 +56,10 @@
 /*****************************************************************
  *  WNetRemoveCachedPassword [MPR.@]
  */
-UINT WINAPI WNetRemoveCachedPassword( LPSTR pbResource, WORD cbResource, 
+UINT WINAPI WNetRemoveCachedPassword( LPSTR pbResource, WORD cbResource,
                                       BYTE nType )
 {
-    FIXME( "(%p(%s), %d, %d): stub\n", 
+    FIXME( "(%p(%s), %d, %d): stub\n",
            pbResource, debugstr_a(pbResource), cbResource, nType );
 
     return WN_SUCCESS;
@@ -75,11 +75,11 @@
  *	arg3:	ptr	0x40xxxxxx -> (no string)
  *	arg4:	ptr	0x40xxxxxx -> 0xc8
  *	arg5:	type?	4
- *  
+ *
  *	---- everything below this line might be wrong (js) -----
  * RETURNS
  *    Success: WN_SUCCESS
- *    Failure: WN_ACCESS_DENIED, WN_BAD_PASSWORD, WN_BAD_VALUE, 
+ *    Failure: WN_ACCESS_DENIED, WN_BAD_PASSWORD, WN_BAD_VALUE,
  *             WN_NET_ERROR, WN_NOT_SUPPORTED, WN_OUT_OF_MEMORY
  */
 DWORD WINAPI WNetGetCachedPassword(
@@ -101,7 +101,7 @@
  * WNetEnumCachedPasswords [MPR.@]
  *
  * NOTES
- *	the parameter count is verifyed  
+ *	the parameter count is verifyed
  *
  *  observed values:
  *	arg1	ptr	0x40xxxxxx -> (no string)
diff --git a/dlls/mpr/wnet.c b/dlls/mpr/wnet.c
index 367cc74..8de75c6 100644
--- a/dlls/mpr/wnet.c
+++ b/dlls/mpr/wnet.c
@@ -64,10 +64,10 @@
 /*********************************************************************
  * WNetEnumResourceA [MPR.@]
  */
-DWORD WINAPI WNetEnumResourceA( HANDLE hEnum, LPDWORD lpcCount, 
+DWORD WINAPI WNetEnumResourceA( HANDLE hEnum, LPDWORD lpcCount,
                                 LPVOID lpBuffer, LPDWORD lpBufferSize )
 {
-    FIXME( "(%04X, %p, %p, %p): stub\n", 
+    FIXME( "(%04X, %p, %p, %p): stub\n",
 	    hEnum, lpcCount, lpBuffer, lpBufferSize );
 
     SetLastError(WN_NO_NETWORK);
@@ -77,10 +77,10 @@
 /*********************************************************************
  * WNetEnumResourceW [MPR.@]
  */
-DWORD WINAPI WNetEnumResourceW( HANDLE hEnum, LPDWORD lpcCount, 
+DWORD WINAPI WNetEnumResourceW( HANDLE hEnum, LPDWORD lpcCount,
                                 LPVOID lpBuffer, LPDWORD lpBufferSize )
 {
-    FIXME( "(%04X, %p, %p, %p): stub\n", 
+    FIXME( "(%04X, %p, %p, %p): stub\n",
 	    hEnum, lpcCount, lpBuffer, lpBufferSize );
 
     SetLastError(WN_NO_NETWORK);
@@ -101,8 +101,8 @@
 /*********************************************************************
  * WNetGetResourceInformationA [MPR.@]
  */
-DWORD WINAPI WNetGetResourceInformationA( LPNETRESOURCEA lpNetResource, 
-                                          LPVOID lpBuffer, LPDWORD cbBuffer, 
+DWORD WINAPI WNetGetResourceInformationA( LPNETRESOURCEA lpNetResource,
+                                          LPVOID lpBuffer, LPDWORD cbBuffer,
                                           LPSTR *lplpSystem )
 {
     FIXME( "(%p, %p, %p, %p): stub\n",
@@ -115,8 +115,8 @@
 /*********************************************************************
  * WNetGetResourceInformationW [MPR.@]
  */
-DWORD WINAPI WNetGetResourceInformationW( LPNETRESOURCEW lpNetResource, 
-                                          LPVOID lpBuffer, LPDWORD cbBuffer, 
+DWORD WINAPI WNetGetResourceInformationW( LPNETRESOURCEW lpNetResource,
+                                          LPVOID lpBuffer, LPDWORD cbBuffer,
                                           LPWSTR *lplpSystem )
 {
     FIXME( "(%p, %p, %p, %p): stub\n",
@@ -132,7 +132,7 @@
 DWORD WINAPI WNetGetResourceParentA( LPNETRESOURCEA lpNetResource,
                                      LPVOID lpBuffer, LPDWORD lpBufferSize )
 {
-    FIXME( "(%p, %p, %p): stub\n", 
+    FIXME( "(%p, %p, %p): stub\n",
            lpNetResource, lpBuffer, lpBufferSize );
 
     SetLastError(WN_NO_NETWORK);
@@ -145,7 +145,7 @@
 DWORD WINAPI WNetGetResourceParentW( LPNETRESOURCEW lpNetResource,
                                      LPVOID lpBuffer, LPDWORD lpBufferSize )
 {
-    FIXME( "(%p, %p, %p): stub\n", 
+    FIXME( "(%p, %p, %p): stub\n",
            lpNetResource, lpBuffer, lpBufferSize );
 
     SetLastError(WN_NO_NETWORK);
@@ -164,7 +164,7 @@
 DWORD WINAPI WNetAddConnectionA( LPCSTR lpRemoteName, LPCSTR lpPassword,
                                  LPCSTR lpLocalName )
 {
-    FIXME( "(%s, %p, %s): stub\n", 
+    FIXME( "(%s, %p, %s): stub\n",
            debugstr_a(lpRemoteName), lpPassword, debugstr_a(lpLocalName) );
 
     SetLastError(WN_NO_NETWORK);
@@ -177,7 +177,7 @@
 DWORD WINAPI WNetAddConnectionW( LPCWSTR lpRemoteName, LPCWSTR lpPassword,
                                  LPCWSTR lpLocalName )
 {
-    FIXME( "(%s, %p, %s): stub\n", 
+    FIXME( "(%s, %p, %s): stub\n",
            debugstr_w(lpRemoteName), lpPassword, debugstr_w(lpLocalName) );
 
     SetLastError(WN_NO_NETWORK);
@@ -188,10 +188,10 @@
  *  WNetAddConnection2A [MPR.@]
  */
 DWORD WINAPI WNetAddConnection2A( LPNETRESOURCEA lpNetResource,
-                                  LPCSTR lpPassword, LPCSTR lpUserID, 
+                                  LPCSTR lpPassword, LPCSTR lpUserID,
                                   DWORD dwFlags )
 {
-    FIXME( "(%p, %p, %s, 0x%08lX): stub\n", 
+    FIXME( "(%p, %p, %s, 0x%08lX): stub\n",
            lpNetResource, lpPassword, debugstr_a(lpUserID), dwFlags );
 
     SetLastError(WN_NO_NETWORK);
@@ -202,10 +202,10 @@
  * WNetAddConnection2W [MPR.@]
  */
 DWORD WINAPI WNetAddConnection2W( LPNETRESOURCEW lpNetResource,
-                                  LPCWSTR lpPassword, LPCWSTR lpUserID, 
+                                  LPCWSTR lpPassword, LPCWSTR lpUserID,
                                   DWORD dwFlags )
 {
-    FIXME( "(%p, %p, %s, 0x%08lX): stub\n", 
+    FIXME( "(%p, %p, %s, 0x%08lX): stub\n",
            lpNetResource, lpPassword, debugstr_w(lpUserID), dwFlags );
 
     SetLastError(WN_NO_NETWORK);
@@ -216,10 +216,10 @@
  * WNetAddConnection3A [MPR.@]
  */
 DWORD WINAPI WNetAddConnection3A( HWND hwndOwner, LPNETRESOURCEA lpNetResource,
-                                  LPCSTR lpPassword, LPCSTR lpUserID, 
+                                  LPCSTR lpPassword, LPCSTR lpUserID,
                                   DWORD dwFlags )
 {
-    FIXME( "(%04x, %p, %p, %s, 0x%08lX), stub\n", 
+    FIXME( "(%04x, %p, %p, %s, 0x%08lX), stub\n",
            hwndOwner, lpNetResource, lpPassword, debugstr_a(lpUserID), dwFlags );
 
     SetLastError(WN_NO_NETWORK);
@@ -230,25 +230,25 @@
  * WNetAddConnection3W [MPR.@]
  */
 DWORD WINAPI WNetAddConnection3W( HWND hwndOwner, LPNETRESOURCEW lpNetResource,
-                                  LPCWSTR lpPassword, LPCWSTR lpUserID, 
+                                  LPCWSTR lpPassword, LPCWSTR lpUserID,
                                   DWORD dwFlags )
 {
-    FIXME( "(%04x, %p, %p, %s, 0x%08lX), stub\n", 
+    FIXME( "(%04x, %p, %p, %s, 0x%08lX), stub\n",
            hwndOwner, lpNetResource, lpPassword, debugstr_w(lpUserID), dwFlags );
 
     SetLastError(WN_NO_NETWORK);
     return WN_NO_NETWORK;
-} 
+}
 
 /*****************************************************************
  *  WNetUseConnectionA [MPR.@]
  */
 DWORD WINAPI WNetUseConnectionA( HWND hwndOwner, LPNETRESOURCEA lpNetResource,
                                  LPCSTR lpPassword, LPCSTR lpUserID, DWORD dwFlags,
-                                 LPSTR lpAccessName, LPDWORD lpBufferSize, 
+                                 LPSTR lpAccessName, LPDWORD lpBufferSize,
                                  LPDWORD lpResult )
 {
-    FIXME( "(%04x, %p, %p, %s, 0x%08lX, %s, %p, %p), stub\n", 
+    FIXME( "(%04x, %p, %p, %s, 0x%08lX, %s, %p, %p), stub\n",
            hwndOwner, lpNetResource, lpPassword, debugstr_a(lpUserID), dwFlags,
            debugstr_a(lpAccessName), lpBufferSize, lpResult );
 
@@ -264,7 +264,7 @@
                                  LPWSTR lpAccessName, LPDWORD lpBufferSize,
                                  LPDWORD lpResult )
 {
-    FIXME( "(%04x, %p, %p, %s, 0x%08lX, %s, %p, %p), stub\n", 
+    FIXME( "(%04x, %p, %p, %s, 0x%08lX, %s, %p, %p), stub\n",
            hwndOwner, lpNetResource, lpPassword, debugstr_w(lpUserID), dwFlags,
            debugstr_w(lpAccessName), lpBufferSize, lpResult );
 
@@ -285,7 +285,7 @@
 /*********************************************************************
  *  WNetCancelConnectionW [MPR.@]
  */
-DWORD WINAPI WNetCancelConnectionW( LPCWSTR lpName, BOOL fForce ) 
+DWORD WINAPI WNetCancelConnectionW( LPCWSTR lpName, BOOL fForce )
 {
     FIXME( "(%s, %d), stub\n", debugstr_w(lpName), fForce );
 
@@ -295,7 +295,7 @@
 /*********************************************************************
  *  WNetCancelConnection2A [MPR.@]
  */
-DWORD WINAPI WNetCancelConnection2A( LPCSTR lpName, DWORD dwFlags, BOOL fForce ) 
+DWORD WINAPI WNetCancelConnection2A( LPCSTR lpName, DWORD dwFlags, BOOL fForce )
 {
     FIXME( "(%s, %08lX, %d), stub\n", debugstr_a(lpName), dwFlags, fForce );
 
@@ -305,7 +305,7 @@
 /*********************************************************************
  *  WNetCancelConnection2W [MPR.@]
  */
-DWORD WINAPI WNetCancelConnection2W( LPCWSTR lpName, DWORD dwFlags, BOOL fForce ) 
+DWORD WINAPI WNetCancelConnection2W( LPCWSTR lpName, DWORD dwFlags, BOOL fForce )
 {
     FIXME( "(%s, %08lX, %d), stub\n", debugstr_w(lpName), dwFlags, fForce );
 
@@ -341,10 +341,10 @@
  * - WN_BAD_LOCALNAME     lpLocalName makes no sense
  * - WN_NOT_CONNECTED     drive is a local drive
  * - WN_MORE_DATA         buffer isn't big enough
- * - WN_SUCCESS           success (net path in buffer)  
+ * - WN_SUCCESS           success (net path in buffer)
  *
  */
-DWORD WINAPI WNetGetConnectionA( LPCSTR lpLocalName, 
+DWORD WINAPI WNetGetConnectionA( LPCSTR lpLocalName,
                                  LPSTR lpRemoteName, LPDWORD lpBufferSize )
 {
     char label[40];
@@ -380,7 +380,7 @@
 /**************************************************************************
  * WNetGetConnectionW [MPR.@]
  */
-DWORD WINAPI WNetGetConnectionW( LPCWSTR lpLocalName, 
+DWORD WINAPI WNetGetConnectionW( LPCWSTR lpLocalName,
                                  LPWSTR lpRemoteName, LPDWORD lpBufferSize )
 {
     CHAR  buf[200];
@@ -407,7 +407,7 @@
 /**************************************************************************
  * WNetSetConnectionA [MPR.@]
  */
-DWORD WINAPI WNetSetConnectionA( LPCSTR lpName, DWORD dwProperty, 
+DWORD WINAPI WNetSetConnectionA( LPCSTR lpName, DWORD dwProperty,
                                  LPVOID pvValue )
 {
     FIXME( "(%s, %08lX, %p): stub\n", debugstr_a(lpName), dwProperty, pvValue );
@@ -419,7 +419,7 @@
 /**************************************************************************
  * WNetSetConnectionW [MPR.@]
  */
-DWORD WINAPI WNetSetConnectionW( LPCWSTR lpName, DWORD dwProperty, 
+DWORD WINAPI WNetSetConnectionW( LPCWSTR lpName, DWORD dwProperty,
                                  LPVOID pvValue )
 {
     FIXME( "(%s, %08lX, %p): stub\n", debugstr_w(lpName), dwProperty, pvValue );
@@ -431,10 +431,10 @@
 /*****************************************************************
  * WNetGetUniversalNameA [MPR.@]
  */
-DWORD WINAPI WNetGetUniversalNameA ( LPCSTR lpLocalPath, DWORD dwInfoLevel, 
+DWORD WINAPI WNetGetUniversalNameA ( LPCSTR lpLocalPath, DWORD dwInfoLevel,
                                      LPVOID lpBuffer, LPDWORD lpBufferSize )
 {
-    FIXME( "(%s, 0x%08lX, %p, %p): stub\n", 
+    FIXME( "(%s, 0x%08lX, %p, %p): stub\n",
            debugstr_a(lpLocalPath), dwInfoLevel, lpBuffer, lpBufferSize);
 
     SetLastError(WN_NO_NETWORK);
@@ -444,10 +444,10 @@
 /*****************************************************************
  * WNetGetUniversalNameW [MPR.@]
  */
-DWORD WINAPI WNetGetUniversalNameW ( LPCWSTR lpLocalPath, DWORD dwInfoLevel, 
+DWORD WINAPI WNetGetUniversalNameW ( LPCWSTR lpLocalPath, DWORD dwInfoLevel,
                                      LPVOID lpBuffer, LPDWORD lpBufferSize )
 {
-    FIXME( "(%s, 0x%08lX, %p, %p): stub\n", 
+    FIXME( "(%s, 0x%08lX, %p, %p): stub\n",
            debugstr_w(lpLocalPath), dwInfoLevel, lpBuffer, lpBufferSize);
 
     SetLastError(WN_NO_NETWORK);
@@ -474,9 +474,9 @@
 /*****************************************************************
  * WNetGetUserW [MPR.@]
  */
-DWORD WINAPI WNetGetUserW( LPCWSTR lpName, LPWSTR lpUserID, LPDWORD lpBufferSize ) 
+DWORD WINAPI WNetGetUserW( LPCWSTR lpName, LPWSTR lpUserID, LPDWORD lpBufferSize )
 {
-    FIXME( "(%s, %p, %p): mostly stub\n", 
+    FIXME( "(%s, %p, %p): mostly stub\n",
            debugstr_w(lpName), lpUserID, lpBufferSize );
 
     SetLastError(WN_NO_NETWORK);
@@ -485,9 +485,9 @@
 
 /*********************************************************************
  * WNetConnectionDialog [MPR.@]
- */ 
+ */
 DWORD WINAPI WNetConnectionDialog( HWND hwnd, DWORD dwType )
-{ 
+{
     FIXME( "(%04x, %08lX): stub\n", hwnd, dwType );
 
     SetLastError(WN_NO_NETWORK);
@@ -498,7 +498,7 @@
  * WNetConnectionDialog1A [MPR.@]
  */
 DWORD WINAPI WNetConnectionDialog1A( LPCONNECTDLGSTRUCTA lpConnDlgStruct )
-{ 
+{
     FIXME( "(%p): stub\n", lpConnDlgStruct );
 
     SetLastError(WN_NO_NETWORK);
@@ -507,9 +507,9 @@
 
 /*********************************************************************
  * WNetConnectionDialog1W [MPR.@]
- */ 
+ */
 DWORD WINAPI WNetConnectionDialog1W( LPCONNECTDLGSTRUCTW lpConnDlgStruct )
-{ 
+{
     FIXME( "(%p): stub\n", lpConnDlgStruct );
 
     SetLastError(WN_NO_NETWORK);
@@ -518,9 +518,9 @@
 
 /*********************************************************************
  * WNetDisconnectDialog [MPR.@]
- */ 
+ */
 DWORD WINAPI WNetDisconnectDialog( HWND hwnd, DWORD dwType )
-{ 
+{
     FIXME( "(%04x, %08lX): stub\n", hwnd, dwType );
 
     SetLastError(WN_NO_NETWORK);
@@ -529,9 +529,9 @@
 
 /*********************************************************************
  * WNetDisconnectDialog1A [MPR.@]
- */ 
+ */
 DWORD WINAPI WNetDisconnectDialog1A( LPDISCDLGSTRUCTA lpConnDlgStruct )
-{ 
+{
     FIXME( "(%p): stub\n", lpConnDlgStruct );
 
     SetLastError(WN_NO_NETWORK);
@@ -540,9 +540,9 @@
 
 /*********************************************************************
  * WNetDisconnectDialog1W [MPR.@]
- */ 
+ */
 DWORD WINAPI WNetDisconnectDialog1W( LPDISCDLGSTRUCTW lpConnDlgStruct )
-{ 
+{
     FIXME( "(%p): stub\n", lpConnDlgStruct );
 
     SetLastError(WN_NO_NETWORK);
@@ -551,12 +551,12 @@
 
 /*********************************************************************
  * WNetGetLastErrorA [MPR.@]
- */ 
+ */
 DWORD WINAPI WNetGetLastErrorA( LPDWORD lpError,
                                 LPSTR lpErrorBuf, DWORD nErrorBufSize,
                                 LPSTR lpNameBuf, DWORD nNameBufSize )
 {
-    FIXME( "(%p, %p, %ld, %p, %ld): stub\n", 
+    FIXME( "(%p, %p, %ld, %p, %ld): stub\n",
            lpError, lpErrorBuf, nErrorBufSize, lpNameBuf, nNameBufSize );
 
     SetLastError(WN_NO_NETWORK);
@@ -565,12 +565,12 @@
 
 /*********************************************************************
  * WNetGetLastErrorW [MPR.@]
- */ 
+ */
 DWORD WINAPI WNetGetLastErrorW( LPDWORD lpError,
                                 LPWSTR lpErrorBuf, DWORD nErrorBufSize,
                          LPWSTR lpNameBuf, DWORD nNameBufSize )
 {
-    FIXME( "(%p, %p, %ld, %p, %ld): stub\n", 
+    FIXME( "(%p, %p, %ld, %p, %ld): stub\n",
            lpError, lpErrorBuf, nErrorBufSize, lpNameBuf, nNameBufSize );
 
     SetLastError(WN_NO_NETWORK);
@@ -579,8 +579,8 @@
 
 /*********************************************************************
  * WNetGetNetworkInformationA [MPR.@]
- */ 
-DWORD WINAPI WNetGetNetworkInformationA( LPCSTR lpProvider, 
+ */
+DWORD WINAPI WNetGetNetworkInformationA( LPCSTR lpProvider,
                                          LPNETINFOSTRUCT lpNetInfoStruct )
 {
     FIXME( "(%s, %p): stub\n", debugstr_a(lpProvider), lpNetInfoStruct );
@@ -591,8 +591,8 @@
 
 /*********************************************************************
  * WNetGetNetworkInformationW [MPR.@]
- */ 
-DWORD WINAPI WNetGetNetworkInformationW( LPCWSTR lpProvider, 
+ */
+DWORD WINAPI WNetGetNetworkInformationW( LPCWSTR lpProvider,
                                          LPNETINFOSTRUCT lpNetInfoStruct )
 {
     FIXME( "(%s, %p): stub\n", debugstr_w(lpProvider), lpNetInfoStruct );
@@ -604,7 +604,7 @@
 /*****************************************************************
  *  WNetGetProviderNameA [MPR.@]
  */
-DWORD WINAPI WNetGetProviderNameA( DWORD dwNetType, 
+DWORD WINAPI WNetGetProviderNameA( DWORD dwNetType,
                                    LPSTR lpProvider, LPDWORD lpBufferSize )
 {
     FIXME( "(%ld, %p, %p): stub\n", dwNetType, lpProvider, lpBufferSize );
@@ -617,7 +617,7 @@
  *  WNetGetProviderNameW [MPR.@]
  */
 DWORD WINAPI WNetGetProviderNameW( DWORD dwNetType,
-                                   LPWSTR lpProvider, LPDWORD lpBufferSize ) 
+                                   LPWSTR lpProvider, LPDWORD lpBufferSize )
 {
     FIXME( "(%ld, %p, %p): stub\n", dwNetType, lpProvider, lpBufferSize );
 
diff --git a/dlls/msacm/driver.c b/dlls/msacm/driver.c
index 2d3857a..e9867a5 100644
--- a/dlls/msacm/driver.c
+++ b/dlls/msacm/driver.c
@@ -40,7 +40,7 @@
 #include "wine/debug.h"
 
 WINE_DEFAULT_DEBUG_CHANNEL(msacm);
-	
+
 /***********************************************************************
  *           acmDriverAddA (MSACM32.@)
  */
@@ -49,26 +49,26 @@
 {
     if (!phadid)
 	return MMSYSERR_INVALPARAM;
-    
+
     /* Check if any unknown flags */
-    if (fdwAdd & 
+    if (fdwAdd &
 	~(ACM_DRIVERADDF_FUNCTION|ACM_DRIVERADDF_NOTIFYHWND|
 	  ACM_DRIVERADDF_GLOBAL))
 	return MMSYSERR_INVALFLAG;
-    
+
     /* Check if any incompatible flags */
-    if ((fdwAdd & ACM_DRIVERADDF_FUNCTION) && 
+    if ((fdwAdd & ACM_DRIVERADDF_FUNCTION) &&
 	(fdwAdd & ACM_DRIVERADDF_NOTIFYHWND))
 	return MMSYSERR_INVALFLAG;
-    
-    /* FIXME: in fact, should GetModuleFileName(hinstModule) and do a 
+
+    /* FIXME: in fact, should GetModuleFileName(hinstModule) and do a
      * LoadDriver on it, to be sure we can call SendDriverMessage on the
      * hDrvr handle.
      */
     *phadid = (HACMDRIVERID) MSACM_RegisterDriver(NULL, NULL, hinstModule);
-    
+
     /* FIXME: lParam, dwPriority and fdwAdd ignored */
-    
+
     return MMSYSERR_NOERROR;
 }
 
@@ -82,7 +82,7 @@
 {
     FIXME("(%p, 0x%08x, %ld, %ld, %ld): stub\n",
 	  phadid, hinstModule, lParam, dwPriority, fdwAdd);
-    
+
     SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
     return MMSYSERR_ERROR;
 }
@@ -98,7 +98,7 @@
 
     if (fdwClose)
 	return MMSYSERR_INVALFLAG;
-    
+
     pad = MSACM_GetDriver(had);
     if (!pad)
 	return MMSYSERR_INVALHANDLE;
@@ -112,13 +112,13 @@
 	    break;
 	}
     }
-    
+
     /* close driver if it has been opened */
     if (pad->hDrvr && !padid->hInstModule)
 	CloseDriver(pad->hDrvr, 0, 0);
-    
+
     HeapFree(MSACM_hHeap, 0, pad);
-    
+
     return MMSYSERR_NOERROR;
 }
 
@@ -129,20 +129,20 @@
 {
     MMRESULT mmr;
     ACMDRIVERDETAILSW	addw;
-    
+
     addw.cbStruct = sizeof(addw);
     mmr = acmDriverDetailsW(hadid, &addw, fdwDetails);
     if (mmr == 0) {
-	padd->fccType = addw.fccType; 
-	padd->fccComp = addw.fccComp; 
-	padd->wMid = addw.wMid; 
-	padd->wPid = addw.wPid; 
-	padd->vdwACM = addw.vdwACM; 
-	padd->vdwDriver = addw.vdwDriver; 
-	padd->fdwSupport = addw.fdwSupport; 
-	padd->cFormatTags = addw.cFormatTags; 
-	padd->cFilterTags = addw.cFilterTags; 
-	padd->hicon = addw.hicon; 
+	padd->fccType = addw.fccType;
+	padd->fccComp = addw.fccComp;
+	padd->wMid = addw.wMid;
+	padd->wPid = addw.wPid;
+	padd->vdwACM = addw.vdwACM;
+	padd->vdwDriver = addw.vdwDriver;
+	padd->fdwSupport = addw.fdwSupport;
+	padd->cFormatTags = addw.cFormatTags;
+	padd->cFilterTags = addw.cFilterTags;
+	padd->hicon = addw.hicon;
         WideCharToMultiByte( CP_ACP, 0, addw.szShortName, -1, padd->szShortName,
                              sizeof(padd->szShortName), NULL, NULL );
         WideCharToMultiByte( CP_ACP, 0, addw.szLongName, -1, padd->szLongName,
@@ -164,17 +164,17 @@
 {
     HACMDRIVER acmDrvr;
     MMRESULT mmr;
-    
+
     if (fdwDetails)
 	return MMSYSERR_INVALFLAG;
-    
+
     mmr = acmDriverOpen(&acmDrvr, hadid, 0);
     if (mmr == MMSYSERR_NOERROR) {
 	mmr = (MMRESULT)MSACM_Message(acmDrvr, ACMDM_DRIVER_DETAILS, (LPARAM)padd,  0);
-    
+
 	acmDriverClose(acmDrvr, 0);
     }
-    
+
     return mmr;
 }
 
@@ -187,13 +187,13 @@
     DWORD		fdwSupport;
 
     if (!fnCallback) return MMSYSERR_INVALPARAM;
-    
+
     if (fdwEnum & ~(ACM_DRIVERENUMF_NOLOCAL|ACM_DRIVERENUMF_DISABLED))
 	return MMSYSERR_INVALFLAG;
-    
+
     for (padid = MSACM_pFirstACMDriverID; padid; padid = padid->pNextACMDriverID) {
 	fdwSupport = padid->fdwSupport;
-	
+
 	if (padid->fdwSupport & ACMDRIVERDETAILS_SUPPORTF_DISABLED) {
 	    if (fdwEnum & ACM_DRIVERENUMF_DISABLED)
 		fdwSupport |= ACMDRIVERDETAILS_SUPPORTF_DISABLED;
@@ -203,7 +203,7 @@
 	if (!(*fnCallback)((HACMDRIVERID)padid, dwInstance, fdwSupport))
 	    break;
     }
-    
+
     return MMSYSERR_NOERROR;
 }
 
@@ -213,19 +213,19 @@
 MMRESULT WINAPI acmDriverID(HACMOBJ hao, PHACMDRIVERID phadid, DWORD fdwDriverID)
 {
     PWINE_ACMOBJ pao;
-    
+
     if (!phadid)
 	return MMSYSERR_INVALPARAM;
-    
+
     if (fdwDriverID)
 	return MMSYSERR_INVALFLAG;
-    
+
     pao = MSACM_GetObj(hao, WINE_ACMOBJ_DONTCARE);
     if (!pao)
 	return MMSYSERR_INVALHANDLE;
-    
+
     *phadid = (HACMDRIVERID) pao->pACMDriverID;
-    
+
     return MMSYSERR_NOERROR;
 }
 
@@ -256,32 +256,32 @@
 
     if (!phad)
 	return MMSYSERR_INVALPARAM;
-    
+
     if (fdwOpen)
 	return MMSYSERR_INVALFLAG;
-    
-    padid = MSACM_GetDriverID(hadid); 
+
+    padid = MSACM_GetDriverID(hadid);
     if (!padid)
 	return MMSYSERR_INVALHANDLE;
 
     pad = HeapAlloc(MSACM_hHeap, 0, sizeof(WINE_ACMDRIVER));
-    if (!pad) 
+    if (!pad)
         return MMSYSERR_NOMEM;
 
     pad->obj.dwType = WINE_ACMOBJ_DRIVER;
     pad->obj.pACMDriverID = padid;
 
-    if (!(pad->hDrvr = padid->hInstModule)) 
+    if (!(pad->hDrvr = padid->hInstModule))
     {
         ACMDRVOPENDESCW	adod;
         int		len;
 
 	/* this is not an externally added driver... need to actually load it */
-	if (!padid->pszDriverAlias) 
-        {       
+	if (!padid->pszDriverAlias)
+        {
             ret = MMSYSERR_ERROR;
             goto gotError;
-        }       
+        }
 
         adod.cbStruct = sizeof(adod);
         adod.fccType = ACMDRIVERDETAILS_FCCTYPE_AUDIOCODEC;
@@ -301,7 +301,7 @@
 
         HeapFree(MSACM_hHeap, 0, (LPWSTR)adod.pszSectionName);
         HeapFree(MSACM_hHeap, 0, (LPWSTR)adod.pszAliasName);
-        if (!pad->hDrvr) 
+        if (!pad->hDrvr)
         {
             ret = adod.dwError;
             goto gotError;
@@ -335,28 +335,28 @@
     LONG lError;
     HKEY hPriorityKey;
     DWORD dwPriorityCounter;
-    
+
     padid = MSACM_GetDriverID(hadid);
     if (!padid)
 	return MMSYSERR_INVALHANDLE;
-    
+
     /* Check for unknown flags */
-    if (fdwPriority & 
+    if (fdwPriority &
 	~(ACM_DRIVERPRIORITYF_ENABLE|ACM_DRIVERPRIORITYF_DISABLE|
 	  ACM_DRIVERPRIORITYF_BEGIN|ACM_DRIVERPRIORITYF_END))
 	return MMSYSERR_INVALFLAG;
-    
+
     /* Check for incompatible flags */
     if ((fdwPriority & ACM_DRIVERPRIORITYF_ENABLE) &&
 	(fdwPriority & ACM_DRIVERPRIORITYF_DISABLE))
 	return MMSYSERR_INVALFLAG;
-    
+
     /* Check for incompatible flags */
     if ((fdwPriority & ACM_DRIVERPRIORITYF_BEGIN) &&
 	(fdwPriority & ACM_DRIVERPRIORITYF_END))
 	return MMSYSERR_INVALFLAG;
-    
-    lError = RegOpenKeyA(HKEY_CURRENT_USER, 
+
+    lError = RegOpenKeyA(HKEY_CURRENT_USER,
 			 "Software\\Microsoft\\Multimedia\\"
 			 "Audio Compression Manager\\Priority v4.00",
 			 &hPriorityKey
@@ -364,20 +364,20 @@
     /* FIXME: Create key */
     if (lError != ERROR_SUCCESS)
 	return MMSYSERR_ERROR;
-    
+
     for (dwPriorityCounter = 1; ; dwPriorityCounter++)	{
 	snprintf(szSubKey, 17, "Priorty%ld", dwPriorityCounter);
 	lError = RegQueryValueA(hPriorityKey, szSubKey, szBuffer, &lBufferLength);
 	if (lError != ERROR_SUCCESS)
 	    break;
-	
-	FIXME("(0x%08x, %ld, %ld): stub (partial)\n", 
+
+	FIXME("(0x%08x, %ld, %ld): stub (partial)\n",
 	      hadid, dwPriority, fdwPriority);
 	break;
     }
-    
+
     RegCloseKey(hPriorityKey);
-    
+
     return MMSYSERR_ERROR;
 }
 
@@ -387,16 +387,16 @@
 MMRESULT WINAPI acmDriverRemove(HACMDRIVERID hadid, DWORD fdwRemove)
 {
     PWINE_ACMDRIVERID padid;
-    
+
     padid = MSACM_GetDriverID(hadid);
     if (!padid)
 	return MMSYSERR_INVALHANDLE;
-    
+
     if (fdwRemove)
 	return MMSYSERR_INVALFLAG;
-    
+
     MSACM_UnregisterDriver(padid);
-    
+
     return MMSYSERR_NOERROR;
 }
 
diff --git a/dlls/msacm/filter.c b/dlls/msacm/filter.c
index 1c3cfce..66ee816 100644
--- a/dlls/msacm/filter.c
+++ b/dlls/msacm/filter.c
@@ -55,7 +55,7 @@
 /***********************************************************************
  *           acmFilterDetailsA (MSACM32.@)
  */
-MMRESULT WINAPI acmFilterDetailsA(HACMDRIVER had, PACMFILTERDETAILSA pafd, 
+MMRESULT WINAPI acmFilterDetailsA(HACMDRIVER had, PACMFILTERDETAILSA pafd,
 				  DWORD fdwDetails)
 {
     ACMFILTERDETAILSW	afdw;
@@ -64,14 +64,14 @@
     memset(&afdw, 0, sizeof(afdw));
     afdw.cbStruct = sizeof(afdw);
     afdw.dwFilterIndex = pafd->dwFilterIndex;
-    afdw.dwFilterTag = pafd->dwFilterTag; 
+    afdw.dwFilterTag = pafd->dwFilterTag;
     afdw.pwfltr = pafd->pwfltr;
     afdw.cbwfltr = pafd->cbwfltr;
 
     mmr = acmFilterDetailsW(had, &afdw, fdwDetails);
     if (mmr == MMSYSERR_NOERROR) {
-	pafd->dwFilterTag = afdw.dwFilterTag; 
-	pafd->fdwSupport = afdw.fdwSupport; 
+	pafd->dwFilterTag = afdw.dwFilterTag;
+	pafd->fdwSupport = afdw.fdwSupport;
         WideCharToMultiByte( CP_ACP, 0, afdw.szFilter, -1, pafd->szFilter,
                              sizeof(pafd->szFilter), NULL, NULL );
     }
@@ -81,7 +81,7 @@
 /***********************************************************************
  *           acmFilterDetailsW (MSACM32.@)
  */
-MMRESULT WINAPI acmFilterDetailsW(HACMDRIVER had, PACMFILTERDETAILSW pafd, 
+MMRESULT WINAPI acmFilterDetailsW(HACMDRIVER had, PACMFILTERDETAILSW pafd,
 				  DWORD fdwDetails)
 {
     MMRESULT			mmr;
@@ -93,7 +93,7 @@
     aftd.cbStruct = sizeof(aftd);
 
     if (pafd->cbStruct < sizeof(*pafd)) return MMSYSERR_INVALPARAM;
-	
+
     switch (fdwDetails) {
     case ACM_FILTERDETAILSF_FILTER:
 	if (pafd->dwFilterTag != pafd->pwfltr->dwFilterTag) {
@@ -113,7 +113,7 @@
 		    acmDriverClose(had, 0);
 		    if (mmr == MMSYSERR_NOERROR) break;
 		}
-	    }		    
+	    }
 	} else {
 	    mmr = MSACM_Message(had, ACMDM_FILTER_DETAILS, (LPARAM)pafd, fdwDetails);
 	}
@@ -139,29 +139,29 @@
 };
 
 static BOOL CALLBACK MSACM_FilterEnumCallbackWtoA(HACMDRIVERID hadid,
-						  PACMFILTERDETAILSW pafdw,  
-						  DWORD dwInstance,             
+						  PACMFILTERDETAILSW pafdw,
+						  DWORD dwInstance,
 						  DWORD fdwSupport)
 {
     struct MSACM_FilterEnumWtoA_Instance* pafei;
 
     pafei = (struct MSACM_FilterEnumWtoA_Instance*)dwInstance;
 
-    pafei->pafda->dwFilterIndex = pafdw->dwFilterIndex; 
-    pafei->pafda->dwFilterTag = pafdw->dwFilterTag; 
-    pafei->pafda->fdwSupport = pafdw->fdwSupport; 
+    pafei->pafda->dwFilterIndex = pafdw->dwFilterIndex;
+    pafei->pafda->dwFilterTag = pafdw->dwFilterTag;
+    pafei->pafda->fdwSupport = pafdw->fdwSupport;
     WideCharToMultiByte( CP_ACP, 0, pafdw->szFilter, -1, pafei->pafda->szFilter,
                          sizeof(pafei->pafda->szFilter), NULL, NULL );
 
-    return (pafei->fnCallback)(hadid, pafei->pafda, 
+    return (pafei->fnCallback)(hadid, pafei->pafda,
 			       pafei->dwInstance, fdwSupport);
 }
 
 /***********************************************************************
  *           acmFilterEnumA (MSACM32.@)
  */
-MMRESULT WINAPI acmFilterEnumA(HACMDRIVER had, PACMFILTERDETAILSA pafda, 
-			       ACMFILTERENUMCBA fnCallback, DWORD dwInstance, 
+MMRESULT WINAPI acmFilterEnumA(HACMDRIVER had, PACMFILTERDETAILSA pafda,
+			       ACMFILTERENUMCBA fnCallback, DWORD dwInstance,
 			       DWORD fdwEnum)
 {
     ACMFILTERDETAILSW		afdw;
@@ -178,13 +178,13 @@
     afei.dwInstance = dwInstance;
     afei.fnCallback = fnCallback;
 
-    return acmFilterEnumW(had, &afdw, MSACM_FilterEnumCallbackWtoA, 
+    return acmFilterEnumW(had, &afdw, MSACM_FilterEnumCallbackWtoA,
 			  (DWORD)&afei, fdwEnum);
 }
 
-static BOOL MSACM_FilterEnumHelper(PWINE_ACMDRIVERID padid, HACMDRIVER had, 
-				   PACMFILTERDETAILSW pafd, 
-				   ACMFILTERENUMCBW fnCallback, DWORD dwInstance,  
+static BOOL MSACM_FilterEnumHelper(PWINE_ACMDRIVERID padid, HACMDRIVER had,
+				   PACMFILTERDETAILSW pafd,
+				   ACMFILTERENUMCBW fnCallback, DWORD dwInstance,
 				   DWORD fdwEnum)
 {
     ACMFILTERTAGDETAILSW	aftd;
@@ -196,19 +196,19 @@
 	aftd.dwFilterTagIndex = i;
 	if (acmFilterTagDetailsW(had, &aftd, ACM_FILTERTAGDETAILSF_INDEX) != MMSYSERR_NOERROR)
 	    continue;
-	
-	if ((fdwEnum & ACM_FILTERENUMF_DWFILTERTAG) && 
+
+	if ((fdwEnum & ACM_FILTERENUMF_DWFILTERTAG) &&
 	    aftd.dwFilterTag != pafd->pwfltr->dwFilterTag)
 	    continue;
-	
+
 	for (j = 0; j < aftd.cStandardFilters; j++) {
 	    pafd->dwFilterIndex = j;
 	    pafd->dwFilterTag = aftd.dwFilterTag;
-	    if (acmFilterDetailsW(had, pafd, ACM_FILTERDETAILSF_INDEX) != MMSYSERR_NOERROR) 
+	    if (acmFilterDetailsW(had, pafd, ACM_FILTERDETAILSF_INDEX) != MMSYSERR_NOERROR)
 		continue;
-	    
+
 	    if (!(fnCallback)((HACMDRIVERID)padid, pafd, dwInstance, padid->fdwSupport))
-		return FALSE; 
+		return FALSE;
 	}
     }
     return TRUE;
@@ -217,8 +217,8 @@
 /***********************************************************************
  *           acmFilterEnumW (MSACM32.@)
  */
-MMRESULT WINAPI acmFilterEnumW(HACMDRIVER had, PACMFILTERDETAILSW pafd, 
-			       ACMFILTERENUMCBW fnCallback, DWORD dwInstance, 
+MMRESULT WINAPI acmFilterEnumW(HACMDRIVER had, PACMFILTERDETAILSW pafd,
+			       ACMFILTERENUMCBW fnCallback, DWORD dwInstance,
 			       DWORD fdwEnum)
 {
     PWINE_ACMDRIVERID		padid;
@@ -243,10 +243,10 @@
     }
     for (padid = MSACM_pFirstACMDriverID; padid; padid = padid->pNextACMDriverID) {
 	    /* should check for codec only */
-	    if ((padid->fdwSupport & ACMDRIVERDETAILS_SUPPORTF_DISABLED) || 
+	    if ((padid->fdwSupport & ACMDRIVERDETAILS_SUPPORTF_DISABLED) ||
 		acmDriverOpen(&had, (HACMDRIVERID)padid, 0) != MMSYSERR_NOERROR)
 		continue;
-	    ret = MSACM_FilterEnumHelper(padid, had, pafd, 
+	    ret = MSACM_FilterEnumHelper(padid, had, pafd,
 					 fnCallback, dwInstance, fdwEnum);
 	    acmDriverClose(had, 0);
 	    if (!ret) break;
@@ -257,7 +257,7 @@
 /***********************************************************************
  *           acmFilterTagDetailsA (MSACM32.@)
  */
-MMRESULT WINAPI acmFilterTagDetailsA(HACMDRIVER had, PACMFILTERTAGDETAILSA paftda, 
+MMRESULT WINAPI acmFilterTagDetailsA(HACMDRIVER had, PACMFILTERTAGDETAILSA paftda,
 				     DWORD fdwDetails)
 {
     ACMFILTERTAGDETAILSW	aftdw;
@@ -270,11 +270,11 @@
 
     mmr = acmFilterTagDetailsW(had, &aftdw, fdwDetails);
     if (mmr == MMSYSERR_NOERROR) {
-	paftda->dwFilterTag = aftdw.dwFilterTag; 
+	paftda->dwFilterTag = aftdw.dwFilterTag;
 	paftda->dwFilterTagIndex = aftdw.dwFilterTagIndex;
-	paftda->cbFilterSize = aftdw.cbFilterSize; 
-	paftda->fdwSupport = aftdw.fdwSupport; 
-	paftda->cStandardFilters = aftdw.cStandardFilters; 
+	paftda->cbFilterSize = aftdw.cbFilterSize;
+	paftda->fdwSupport = aftdw.fdwSupport;
+	paftda->cStandardFilters = aftdw.cStandardFilters;
         WideCharToMultiByte( CP_ACP, 0, aftdw.szFilterTag, -1, paftda->szFilterTag,
                              sizeof(paftda->szFilterTag), NULL, NULL );
     }
@@ -284,7 +284,7 @@
 /***********************************************************************
  *           acmFilterTagDetailsW (MSACM32.@)
  */
-MMRESULT WINAPI acmFilterTagDetailsW(HACMDRIVER had, PACMFILTERTAGDETAILSW paftd, 
+MMRESULT WINAPI acmFilterTagDetailsW(HACMDRIVER had, PACMFILTERTAGDETAILSW paftd,
 				     DWORD fdwDetails)
 {
     PWINE_ACMDRIVERID	padid;
@@ -327,20 +327,20 @@
 	    mmr = ACMERR_NOTPOSSIBLE;
 	    for (padid = MSACM_pFirstACMDriverID; padid; padid = padid->pNextACMDriverID) {
 		/* should check for codec only */
-		if (!(padid->fdwSupport & ACMDRIVERDETAILS_SUPPORTF_DISABLED) && 
+		if (!(padid->fdwSupport & ACMDRIVERDETAILS_SUPPORTF_DISABLED) &&
 		    acmDriverOpen(&had, (HACMDRIVERID)padid, 0) == 0) {
 
 		    memset(&tmp, 0, sizeof(tmp));
 		    tmp.cbStruct = sizeof(tmp);
 		    tmp.dwFilterTag = ft;
 
-		    if (MSACM_Message(had, ACMDM_FILTERTAG_DETAILS, 
+		    if (MSACM_Message(had, ACMDM_FILTERTAG_DETAILS,
 				      (LPARAM)&tmp, fdwDetails) == MMSYSERR_NOERROR) {
 			if (mmr == ACMERR_NOTPOSSIBLE ||
 			    paftd->cbFilterSize < tmp.cbFilterSize) {
 			    *paftd = tmp;
 			    mmr = MMSYSERR_NOERROR;
-			} 
+			}
 		    }
 		    acmDriverClose(had, 0);
 		}
@@ -355,7 +355,7 @@
 	mmr = MMSYSERR_ERROR;
     }
 
-    if (mmr == MMSYSERR_NOERROR && 
+    if (mmr == MMSYSERR_NOERROR &&
 	paftd->dwFilterTag == WAVE_FORMAT_PCM && paftd->szFilterTag[0] == 0)
         MultiByteToWideChar( CP_ACP, 0, "PCM", -1, paftd->szFilterTag,
                              sizeof(paftd->szFilterTag)/sizeof(WCHAR) );
@@ -370,23 +370,23 @@
 };
 
 static BOOL CALLBACK MSACM_FilterTagEnumCallbackWtoA(HACMDRIVERID hadid,
-						     PACMFILTERTAGDETAILSW paftdw,  
-						     DWORD dwInstance,             
+						     PACMFILTERTAGDETAILSW paftdw,
+						     DWORD dwInstance,
 						     DWORD fdwSupport)
 {
     struct MSACM_FilterTagEnumWtoA_Instance* paftei;
 
     paftei = (struct MSACM_FilterTagEnumWtoA_Instance*)dwInstance;
 
-    paftei->paftda->dwFilterTagIndex = paftdw->dwFilterTagIndex; 
-    paftei->paftda->dwFilterTag = paftdw->dwFilterTag; 
-    paftei->paftda->cbFilterSize = paftdw->cbFilterSize; 
-    paftei->paftda->fdwSupport = paftdw->fdwSupport; 
-    paftei->paftda->cStandardFilters = paftdw->cStandardFilters; 
+    paftei->paftda->dwFilterTagIndex = paftdw->dwFilterTagIndex;
+    paftei->paftda->dwFilterTag = paftdw->dwFilterTag;
+    paftei->paftda->cbFilterSize = paftdw->cbFilterSize;
+    paftei->paftda->fdwSupport = paftdw->fdwSupport;
+    paftei->paftda->cStandardFilters = paftdw->cStandardFilters;
     WideCharToMultiByte( CP_ACP, 0, paftdw->szFilterTag, -1, paftei->paftda->szFilterTag,
                          sizeof(paftei->paftda->szFilterTag), NULL, NULL );
 
-    return (paftei->fnCallback)(hadid, paftei->paftda, 
+    return (paftei->fnCallback)(hadid, paftei->paftda,
 				paftei->dwInstance, fdwSupport);
 }
 
@@ -394,7 +394,7 @@
  *           acmFilterTagEnumA (MSACM32.@)
  */
 MMRESULT WINAPI acmFilterTagEnumA(HACMDRIVER had, PACMFILTERTAGDETAILSA paftda,
-				  ACMFILTERTAGENUMCBA fnCallback, DWORD dwInstance, 
+				  ACMFILTERTAGENUMCBA fnCallback, DWORD dwInstance,
 				  DWORD fdwEnum)
 {
     ACMFILTERTAGDETAILSW	aftdw;
@@ -409,7 +409,7 @@
     aftei.dwInstance = dwInstance;
     aftei.fnCallback = fnCallback;
 
-    return acmFilterTagEnumW(had, &aftdw, MSACM_FilterTagEnumCallbackWtoA, 
+    return acmFilterTagEnumW(had, &aftdw, MSACM_FilterTagEnumCallbackWtoA,
 			     (DWORD)&aftei, fdwEnum);
 }
 
@@ -417,19 +417,19 @@
  *           acmFilterTagEnumW (MSACM32.@)
  */
 MMRESULT WINAPI acmFilterTagEnumW(HACMDRIVER had, PACMFILTERTAGDETAILSW paftd,
-				  ACMFILTERTAGENUMCBW fnCallback, DWORD dwInstance, 
+				  ACMFILTERTAGENUMCBW fnCallback, DWORD dwInstance,
 				  DWORD fdwEnum)
 {
     PWINE_ACMDRIVERID		padid;
     int				i;
 
     TRACE("(0x%08x, %p, %p, %ld, %ld)\n",
-	  had, paftd, fnCallback, dwInstance, fdwEnum); 
+	  had, paftd, fnCallback, dwInstance, fdwEnum);
 
     if (paftd->cbStruct < sizeof(*paftd)) return MMSYSERR_INVALPARAM;
 
     if (had) FIXME("had != NULL, not supported\n");
-    
+
     for (padid = MSACM_pFirstACMDriverID; padid; padid = padid->pNextACMDriverID) {
 	/* should check for codec only */
 	if (!(padid->fdwSupport & ACMDRIVERDETAILS_SUPPORTF_DISABLED) &&
diff --git a/dlls/msacm/format.c b/dlls/msacm/format.c
index 14c5eeb..9847e06 100644
--- a/dlls/msacm/format.c
+++ b/dlls/msacm/format.c
@@ -50,7 +50,7 @@
     DWORD		ret;
 };
 
-static BOOL CALLBACK MSACM_FillFormatTagsCB(HACMDRIVERID hadid, 
+static BOOL CALLBACK MSACM_FillFormatTagsCB(HACMDRIVERID hadid,
 					    PACMFORMATTAGDETAILSA paftd,
 					    DWORD dwInstance, DWORD fdwSupport)
 {
@@ -58,10 +58,10 @@
 
     switch (affd->mode) {
     case WINE_ACMFF_TAG:
-	if (SendDlgItemMessageA(affd->hWnd, IDD_ACMFORMATCHOOSE_CMB_FORMATTAG, 
-				CB_FINDSTRINGEXACT, 
+	if (SendDlgItemMessageA(affd->hWnd, IDD_ACMFORMATCHOOSE_CMB_FORMATTAG,
+				CB_FINDSTRINGEXACT,
 				(WPARAM)-1, (LPARAM)paftd->szFormatTag) == CB_ERR)
-	    SendDlgItemMessageA(affd->hWnd, IDD_ACMFORMATCHOOSE_CMB_FORMATTAG, 
+	    SendDlgItemMessageA(affd->hWnd, IDD_ACMFORMATCHOOSE_CMB_FORMATTAG,
 				CB_ADDSTRING, 0, (DWORD)paftd->szFormatTag);
 	break;
     case WINE_ACMFF_FORMAT:
@@ -87,22 +87,22 @@
 		    mmr = acmFormatDetailsA(had, &afd, ACM_FORMATDETAILSF_INDEX);
 		    if (mmr == MMSYSERR_NOERROR) {
 			strncpy(buffer, afd.szFormat, ACMFORMATTAGDETAILS_FORMATTAG_CHARS);
-			for (idx = strlen(buffer); 
+			for (idx = strlen(buffer);
 			     idx < ACMFORMATTAGDETAILS_FORMATTAG_CHARS; idx++)
 			    buffer[idx] = ' ';
-			wsprintfA(buffer + ACMFORMATTAGDETAILS_FORMATTAG_CHARS, 
-				  "%d Ko/s", 
+			wsprintfA(buffer + ACMFORMATTAGDETAILS_FORMATTAG_CHARS,
+				  "%d Ko/s",
 				  (afd.pwfx->nAvgBytesPerSec + 512) / 1024);
-			SendDlgItemMessageA(affd->hWnd, 
-					    IDD_ACMFORMATCHOOSE_CMB_FORMAT, 
+			SendDlgItemMessageA(affd->hWnd,
+					    IDD_ACMFORMATCHOOSE_CMB_FORMAT,
 					    CB_ADDSTRING, 0, (DWORD)buffer);
 		    }
 		}
 		acmDriverClose(had, 0);
-		SendDlgItemMessageA(affd->hWnd, IDD_ACMFORMATCHOOSE_CMB_FORMAT, 
+		SendDlgItemMessageA(affd->hWnd, IDD_ACMFORMATCHOOSE_CMB_FORMAT,
 				    CB_SETCURSEL, 0, 0);
 		HeapFree(MSACM_hHeap, 0, afd.pwfx);
-	    } 
+	    }
 	}
 	break;
     case WINE_ACMFF_WFX:
@@ -117,12 +117,12 @@
 		afd.pwfx = affd->afc->pwfx;
 		afd.cbwfx = affd->afc->cbwfx;
 
-		afd.dwFormatIndex = SendDlgItemMessageA(affd->hWnd, IDD_ACMFORMATCHOOSE_CMB_FORMAT, 
-							CB_GETCURSEL, 0, 0);;
+		afd.dwFormatIndex = SendDlgItemMessageA(affd->hWnd, IDD_ACMFORMATCHOOSE_CMB_FORMAT,
+							CB_GETCURSEL, 0, 0);
 		affd->ret = acmFormatDetailsA(had, &afd, ACM_FORMATDETAILSF_INDEX);
 		acmDriverClose(had, 0);
 		return TRUE;
-	    } 
+	    }
 	}
 	break;
     default:
@@ -160,12 +160,12 @@
 
     affd.hWnd = hWnd;
     affd.mode = WINE_ACMFF_FORMAT;
-    SendDlgItemMessageA(hWnd, IDD_ACMFORMATCHOOSE_CMB_FORMATTAG, 
+    SendDlgItemMessageA(hWnd, IDD_ACMFORMATCHOOSE_CMB_FORMATTAG,
 			CB_GETLBTEXT,
-			SendDlgItemMessageA(hWnd, IDD_ACMFORMATCHOOSE_CMB_FORMATTAG, 
+			SendDlgItemMessageA(hWnd, IDD_ACMFORMATCHOOSE_CMB_FORMATTAG,
 					    CB_GETCURSEL, 0, 0),
 			(DWORD)affd.szFormatTag);
-    
+
     acmFormatTagEnumA((HACMDRIVER)0, &aftd, MSACM_FillFormatTagsCB, (DWORD)&affd, 0);
     SendDlgItemMessageA(hWnd, IDD_ACMFORMATCHOOSE_CMB_FORMAT, CB_SETCURSEL, 0, 0);
     return TRUE;
@@ -183,9 +183,9 @@
     affd.mode = WINE_ACMFF_WFX;
     affd.afc = afc;
     affd.ret = MMSYSERR_NOERROR;
-    SendDlgItemMessageA(hWnd, IDD_ACMFORMATCHOOSE_CMB_FORMATTAG, 
+    SendDlgItemMessageA(hWnd, IDD_ACMFORMATCHOOSE_CMB_FORMATTAG,
 			CB_GETLBTEXT,
-			SendDlgItemMessageA(hWnd, IDD_ACMFORMATCHOOSE_CMB_FORMATTAG, 
+			SendDlgItemMessageA(hWnd, IDD_ACMFORMATCHOOSE_CMB_FORMATTAG,
 					    CB_GETCURSEL, 0, 0),
 			(DWORD)affd.szFormatTag);
 
@@ -193,12 +193,12 @@
     return affd.ret;
 }
 
-static BOOL WINAPI FormatChooseDlgProc(HWND hWnd, UINT msg, 
+static BOOL WINAPI FormatChooseDlgProc(HWND hWnd, UINT msg,
 				       WPARAM wParam, LPARAM lParam)
 {
-    
+
     TRACE("hwnd=%i msg=%i 0x%08x 0x%08lx\n", hWnd,  msg, wParam, lParam );
-    
+
     switch (msg) {
     case WM_INITDIALOG:
 	afc = (PACMFORMATCHOOSEA)lParam;
@@ -210,7 +210,7 @@
 	if (!(afc->fdwStyle & ACMFORMATCHOOSE_STYLEF_SHOWHELP))
 	    ShowWindow(GetDlgItem(hWnd, IDD_ACMFORMATCHOOSE_BTN_HELP), SW_HIDE);
 	return TRUE;
-	
+
     case WM_COMMAND:
 	switch (LOWORD(wParam)) {
 	case IDOK:
@@ -225,39 +225,39 @@
 		MSACM_FillFormat(hWnd);
 		break;
 	    default:
-		TRACE("Dropped dlgNotif (fmtTag): 0x%08x 0x%08lx\n", 
+		TRACE("Dropped dlgNotif (fmtTag): 0x%08x 0x%08lx\n",
 		      HIWORD(wParam), lParam);
 		break;
 	    }
 	    break;
 	case IDD_ACMFORMATCHOOSE_BTN_HELP:
 	    if (afc->fdwStyle & ACMFORMATCHOOSE_STYLEF_SHOWHELP)
-		SendMessageA(afc->hwndOwner, 
+		SendMessageA(afc->hwndOwner,
 			     RegisterWindowMessageA(ACMHELPMSGSTRINGA), 0L, 0L);
 	    break;
-	    
+
 	default:
-	    TRACE("Dropped dlgCmd: ctl=%d ntf=0x%04x 0x%08lx\n", 
+	    TRACE("Dropped dlgCmd: ctl=%d ntf=0x%04x 0x%08lx\n",
 		  LOWORD(wParam), HIWORD(wParam), lParam);
 	    break;
 	}
 	break;
     case WM_CONTEXTMENU:
 	if (afc->fdwStyle & ACMFORMATCHOOSE_STYLEF_CONTEXTHELP)
-	    SendMessageA(afc->hwndOwner, 
-			 RegisterWindowMessageA(ACMHELPMSGCONTEXTMENUA), 
+	    SendMessageA(afc->hwndOwner,
+			 RegisterWindowMessageA(ACMHELPMSGCONTEXTMENUA),
 			 wParam, lParam);
 	break;
 #if defined(WM_CONTEXTHELP)
     case WM_CONTEXTHELP:
 	if (afc->fdwStyle & ACMFORMATCHOOSE_STYLEF_CONTEXTHELP)
-	    SendMessageA(afc->hwndOwner, 
-			 RegisterWindowMessageA(ACMHELPMSGCONTEXTHELPA), 
+	    SendMessageA(afc->hwndOwner,
+			 RegisterWindowMessageA(ACMHELPMSGCONTEXTHELPA),
 			 wParam, lParam);
 	break;
-#endif       
+#endif
     default:
-	TRACE("Dropped dlgMsg: hwnd=%i msg=%i 0x%08x 0x%08lx\n", 
+	TRACE("Dropped dlgMsg: hwnd=%i msg=%i 0x%08x 0x%08lx\n",
 	      hWnd,  msg, wParam, lParam );
 	break;
     }
@@ -286,7 +286,7 @@
 /***********************************************************************
  *           acmFormatDetailsA (MSACM32.@)
  */
-MMRESULT WINAPI acmFormatDetailsA(HACMDRIVER had, PACMFORMATDETAILSA pafd, 
+MMRESULT WINAPI acmFormatDetailsA(HACMDRIVER had, PACMFORMATDETAILSA pafd,
 				  DWORD fdwDetails)
 {
     ACMFORMATDETAILSW	afdw;
@@ -295,14 +295,14 @@
     memset(&afdw, 0, sizeof(afdw));
     afdw.cbStruct = sizeof(afdw);
     afdw.dwFormatIndex = pafd->dwFormatIndex;
-    afdw.dwFormatTag = pafd->dwFormatTag; 
-    afdw.pwfx = pafd->pwfx; 
-    afdw.cbwfx = pafd->cbwfx; 
+    afdw.dwFormatTag = pafd->dwFormatTag;
+    afdw.pwfx = pafd->pwfx;
+    afdw.cbwfx = pafd->cbwfx;
 
     mmr = acmFormatDetailsW(had, &afdw, fdwDetails);
     if (mmr == MMSYSERR_NOERROR) {
-	pafd->dwFormatTag = afdw.dwFormatTag; 
-	pafd->fdwSupport = afdw.fdwSupport; 
+	pafd->dwFormatTag = afdw.dwFormatTag;
+	pafd->fdwSupport = afdw.fdwSupport;
         WideCharToMultiByte( CP_ACP, 0, afdw.szFormat, -1,
                              pafd->szFormat, sizeof(pafd->szFormat), NULL, NULL );
     }
@@ -325,7 +325,7 @@
     aftd.cbStruct = sizeof(aftd);
 
     if (pafd->cbStruct < sizeof(*pafd)) return MMSYSERR_INVALPARAM;
-	
+
     switch (fdwDetails) {
     case ACM_FORMATDETAILSF_FORMAT:
 	if (pafd->dwFormatTag != pafd->pwfx->wFormatTag) {
@@ -338,13 +338,13 @@
 	    mmr = ACMERR_NOTPOSSIBLE;
 	    for (padid = MSACM_pFirstACMDriverID; padid; padid = padid->pNextACMDriverID) {
 		/* should check for codec only */
-		if (!(padid->fdwSupport & ACMDRIVERDETAILS_SUPPORTF_DISABLED) && 
+		if (!(padid->fdwSupport & ACMDRIVERDETAILS_SUPPORTF_DISABLED) &&
 		    acmDriverOpen(&had, (HACMDRIVERID)padid, 0) == 0) {
 		    mmr = MSACM_Message(had, ACMDM_FORMAT_DETAILS, (LPARAM)pafd, fdwDetails);
 		    acmDriverClose(had, 0);
 		    if (mmr == MMSYSERR_NOERROR) break;
 		}
-	    }		    
+	    }
 	} else {
 	    mmr = MSACM_Message(had, ACMDM_FORMAT_DETAILS, (LPARAM)pafd, fdwDetails);
 	}
@@ -362,7 +362,7 @@
     if (mmr == MMSYSERR_NOERROR && pafd->szFormat[0] == (WCHAR)0) {
 	wsprintfW(pafd->szFormat, fmt1, pafd->pwfx->nSamplesPerSec);
 	if (pafd->pwfx->wBitsPerSample) {
-	    wsprintfW(pafd->szFormat + lstrlenW(pafd->szFormat), fmt2, 
+	    wsprintfW(pafd->szFormat + lstrlenW(pafd->szFormat), fmt2,
 		      pafd->pwfx->wBitsPerSample);
 	}
         MultiByteToWideChar( CP_ACP, 0, (pafd->pwfx->nChannels == 1) ? "; Mono" : "; Stereo", -1,
@@ -381,21 +381,21 @@
 };
 
 static BOOL CALLBACK MSACM_FormatEnumCallbackWtoA(HACMDRIVERID hadid,
-						  PACMFORMATDETAILSW pafdw,  
-						  DWORD dwInstance,             
+						  PACMFORMATDETAILSW pafdw,
+						  DWORD dwInstance,
 						  DWORD fdwSupport)
 {
     struct MSACM_FormatEnumWtoA_Instance* pafei;
 
     pafei = (struct MSACM_FormatEnumWtoA_Instance*)dwInstance;
 
-    pafei->pafda->dwFormatIndex = pafdw->dwFormatIndex; 
-    pafei->pafda->dwFormatTag = pafdw->dwFormatTag; 
-    pafei->pafda->fdwSupport = pafdw->fdwSupport; 
+    pafei->pafda->dwFormatIndex = pafdw->dwFormatIndex;
+    pafei->pafda->dwFormatTag = pafdw->dwFormatTag;
+    pafei->pafda->fdwSupport = pafdw->fdwSupport;
     WideCharToMultiByte( CP_ACP, 0, pafdw->szFormat, -1,
                          pafei->pafda->szFormat, sizeof(pafei->pafda->szFormat), NULL, NULL );
 
-    return (pafei->fnCallback)(hadid, pafei->pafda, 
+    return (pafei->fnCallback)(hadid, pafei->pafda,
 			       pafei->dwInstance, fdwSupport);
 }
 
@@ -403,7 +403,7 @@
  *           acmFormatEnumA (MSACM32.@)
  */
 MMRESULT WINAPI acmFormatEnumA(HACMDRIVER had, PACMFORMATDETAILSA pafda,
-			       ACMFORMATENUMCBA fnCallback, DWORD dwInstance, 
+			       ACMFORMATENUMCBA fnCallback, DWORD dwInstance,
 			       DWORD fdwEnum)
 {
     ACMFORMATDETAILSW		afdw;
@@ -420,16 +420,16 @@
     afei.dwInstance = dwInstance;
     afei.fnCallback = fnCallback;
 
-    return acmFormatEnumW(had, &afdw, MSACM_FormatEnumCallbackWtoA, 
+    return acmFormatEnumW(had, &afdw, MSACM_FormatEnumCallbackWtoA,
 			  (DWORD)&afei, fdwEnum);
 }
 
 /***********************************************************************
  *           acmFormatEnumW (MSACM32.@)
  */
-static BOOL MSACM_FormatEnumHelper(PWINE_ACMDRIVERID padid, HACMDRIVER had, 
-				   PACMFORMATDETAILSW pafd, PWAVEFORMATEX pwfxRef, 
-				   ACMFORMATENUMCBW fnCallback, DWORD dwInstance,  
+static BOOL MSACM_FormatEnumHelper(PWINE_ACMDRIVERID padid, HACMDRIVER had,
+				   PACMFORMATDETAILSW pafd, PWAVEFORMATEX pwfxRef,
+				   ACMFORMATENUMCBW fnCallback, DWORD dwInstance,
 				   DWORD fdwEnum)
 {
     ACMFORMATTAGDETAILSW	aftd;
@@ -441,33 +441,33 @@
 	aftd.dwFormatTagIndex = i;
 	if (acmFormatTagDetailsW(had, &aftd, ACM_FORMATTAGDETAILSF_INDEX) != MMSYSERR_NOERROR)
 	    continue;
-	
+
 	if ((fdwEnum & ACM_FORMATENUMF_WFORMATTAG) && aftd.dwFormatTag != pwfxRef->wFormatTag)
 	    continue;
-	
+
 	for (j = 0; j < aftd.cStandardFormats; j++) {
 	    pafd->dwFormatIndex = j;
 	    pafd->dwFormatTag = aftd.dwFormatTag;
-	    if (acmFormatDetailsW(had, pafd, ACM_FORMATDETAILSF_INDEX) != MMSYSERR_NOERROR) 
+	    if (acmFormatDetailsW(had, pafd, ACM_FORMATDETAILSF_INDEX) != MMSYSERR_NOERROR)
 		continue;
-	    
-	    if ((fdwEnum & ACM_FORMATENUMF_NCHANNELS) && 
+
+	    if ((fdwEnum & ACM_FORMATENUMF_NCHANNELS) &&
 		pafd->pwfx->nChannels != pwfxRef->nChannels)
 		continue;
-	    if ((fdwEnum & ACM_FORMATENUMF_NSAMPLESPERSEC) && 
+	    if ((fdwEnum & ACM_FORMATENUMF_NSAMPLESPERSEC) &&
 		pafd->pwfx->nSamplesPerSec != pwfxRef->nSamplesPerSec)
 		continue;
-	    if ((fdwEnum & ACM_FORMATENUMF_WBITSPERSAMPLE) && 
+	    if ((fdwEnum & ACM_FORMATENUMF_WBITSPERSAMPLE) &&
 		pafd->pwfx->wBitsPerSample != pwfxRef->wBitsPerSample)
 		continue;
 	    if ((fdwEnum & ACM_FORMATENUMF_HARDWARE) &&
 		!(pafd->fdwSupport & ACMDRIVERDETAILS_SUPPORTF_HARDWARE))
 		continue;
-	    
+
 	    /* more checks to be done on fdwEnum */
 
 	    if (!(fnCallback)((HACMDRIVERID)padid, pafd, dwInstance, padid->fdwSupport))
-		return FALSE; 
+		return FALSE;
 	}
 	/* the "formats" used by the filters are also reported */
     }
@@ -477,7 +477,7 @@
 /**********************************************************************/
 
 MMRESULT WINAPI acmFormatEnumW(HACMDRIVER had, PACMFORMATDETAILSW pafd,
-			       ACMFORMATENUMCBW fnCallback, DWORD dwInstance,  
+			       ACMFORMATENUMCBW fnCallback, DWORD dwInstance,
 			       DWORD fdwEnum)
 {
     PWINE_ACMDRIVERID		padid;
@@ -494,7 +494,7 @@
 		   ACM_FORMATENUMF_CONVERT|ACM_FORMATENUMF_SUGGEST))
         wfxRef = *pafd->pwfx;
 
-    if ((fdwEnum & ACM_FORMATENUMF_HARDWARE) && 
+    if ((fdwEnum & ACM_FORMATENUMF_HARDWARE) &&
 	!(fdwEnum & (ACM_FORMATENUMF_INPUT|ACM_FORMATENUMF_OUTPUT)))
 	return MMSYSERR_INVALPARAM;
 
@@ -511,16 +511,16 @@
 
 	if (acmDriverID((HACMOBJ)had, &hadid, 0) != MMSYSERR_NOERROR)
 	    return MMSYSERR_INVALHANDLE;
-	MSACM_FormatEnumHelper(MSACM_GetDriverID(hadid), had, pafd, &wfxRef, 
+	MSACM_FormatEnumHelper(MSACM_GetDriverID(hadid), had, pafd, &wfxRef,
 			       fnCallback, dwInstance, fdwEnum);
 	return MMSYSERR_NOERROR;
     }
     for (padid = MSACM_pFirstACMDriverID; padid; padid = padid->pNextACMDriverID) {
 	    /* should check for codec only */
-	    if ((padid->fdwSupport & ACMDRIVERDETAILS_SUPPORTF_DISABLED) || 
+	    if ((padid->fdwSupport & ACMDRIVERDETAILS_SUPPORTF_DISABLED) ||
 		acmDriverOpen(&had, (HACMDRIVERID)padid, 0) != MMSYSERR_NOERROR)
 		continue;
-	    ret = MSACM_FormatEnumHelper(padid, had, pafd, &wfxRef, 
+	    ret = MSACM_FormatEnumHelper(padid, had, pafd, &wfxRef,
 					 fnCallback, dwInstance, fdwEnum);
 	    acmDriverClose(had, 0);
 	    if (!ret) break;
@@ -531,13 +531,13 @@
 /***********************************************************************
  *           acmFormatSuggest (MSACM32.@)
  */
-MMRESULT WINAPI acmFormatSuggest(HACMDRIVER had, PWAVEFORMATEX pwfxSrc, 
+MMRESULT WINAPI acmFormatSuggest(HACMDRIVER had, PWAVEFORMATEX pwfxSrc,
 				 PWAVEFORMATEX pwfxDst, DWORD cbwfxDst, DWORD fdwSuggest)
 {
     ACMDRVFORMATSUGGEST	adfg;
     MMRESULT		mmr;
 
-    TRACE("(0x%08x, %p, %p, %ld, %ld)\n", 
+    TRACE("(0x%08x, %p, %p, %ld, %ld)\n",
 	  had, pwfxSrc, pwfxDst, cbwfxDst, fdwSuggest);
 
     if (fdwSuggest & ~(ACM_FORMATSUGGESTF_NCHANNELS|ACM_FORMATSUGGESTF_NSAMPLESPERSEC|
@@ -554,8 +554,8 @@
 
     if (had == (HACMDRIVER)NULL) {
 	PWINE_ACMDRIVERID	padid;
-	
-	/* MS doc says: ACM finds the best suggestion. 
+
+	/* MS doc says: ACM finds the best suggestion.
 	 * Well, first found will be the "best"
 	 */
 	mmr = ACMERR_NOTPOSSIBLE;
@@ -564,7 +564,7 @@
 	    if ((padid->fdwSupport & ACMDRIVERDETAILS_SUPPORTF_DISABLED) ||
 		acmDriverOpen(&had, (HACMDRIVERID)padid, 0) != MMSYSERR_NOERROR)
 		continue;
-	    
+
 	    if (MSACM_Message(had, ACMDM_FORMAT_SUGGEST, (LPARAM)&adfg, 0L) == MMSYSERR_NOERROR) {
 		mmr = MMSYSERR_NOERROR;
 		break;
@@ -580,7 +580,7 @@
 /***********************************************************************
  *           acmFormatTagDetailsA (MSACM32.@)
  */
-MMRESULT WINAPI acmFormatTagDetailsA(HACMDRIVER had, PACMFORMATTAGDETAILSA paftda, 
+MMRESULT WINAPI acmFormatTagDetailsA(HACMDRIVER had, PACMFORMATTAGDETAILSA paftda,
 				     DWORD fdwDetails)
 {
     ACMFORMATTAGDETAILSW	aftdw;
@@ -593,11 +593,11 @@
 
     mmr = acmFormatTagDetailsW(had, &aftdw, fdwDetails);
     if (mmr == MMSYSERR_NOERROR) {
-	paftda->dwFormatTag = aftdw.dwFormatTag; 
+	paftda->dwFormatTag = aftdw.dwFormatTag;
 	paftda->dwFormatTagIndex = aftdw.dwFormatTagIndex;
-	paftda->cbFormatSize = aftdw.cbFormatSize; 
-	paftda->fdwSupport = aftdw.fdwSupport; 
-	paftda->cStandardFormats = aftdw.cStandardFormats; 
+	paftda->cbFormatSize = aftdw.cbFormatSize;
+	paftda->fdwSupport = aftdw.fdwSupport;
+	paftda->cStandardFormats = aftdw.cStandardFormats;
         WideCharToMultiByte( CP_ACP, 0, aftdw.szFormatTag, -1, paftda->szFormatTag,
                              sizeof(paftda->szFormatTag), NULL, NULL );
     }
@@ -607,7 +607,7 @@
 /***********************************************************************
  *           acmFormatTagDetailsW (MSACM32.@)
  */
-MMRESULT WINAPI acmFormatTagDetailsW(HACMDRIVER had, PACMFORMATTAGDETAILSW paftd, 
+MMRESULT WINAPI acmFormatTagDetailsW(HACMDRIVER had, PACMFORMATTAGDETAILSW paftd,
 				     DWORD fdwDetails)
 {
     PWINE_ACMDRIVERID	padid;
@@ -624,7 +624,7 @@
 	if (had == (HACMDRIVER)NULL) {
 	    for (padid = MSACM_pFirstACMDriverID; padid; padid = padid->pNextACMDriverID) {
 		/* should check for codec only */
-		if (!(padid->fdwSupport & ACMDRIVERDETAILS_SUPPORTF_DISABLED) && 
+		if (!(padid->fdwSupport & ACMDRIVERDETAILS_SUPPORTF_DISABLED) &&
 		    MSACM_FindFormatTagInCache(padid, paftd->dwFormatTag, NULL) &&
 		    acmDriverOpen(&had, (HACMDRIVERID)padid, 0) == 0) {
 		    mmr = MSACM_Message(had, ACMDM_FORMATTAG_DETAILS, (LPARAM)paftd, fdwDetails);
@@ -634,7 +634,7 @@
 	    }
 	} else {
 	    PWINE_ACMDRIVER	pad = MSACM_GetDriver(had);
-	    
+
 	    if (pad && MSACM_FindFormatTagInCache(pad->obj.pACMDriverID, paftd->dwFormatTag, NULL))
 		mmr = MSACM_Message(had, ACMDM_FORMATTAG_DETAILS, (LPARAM)paftd, fdwDetails);
 	}
@@ -643,10 +643,10 @@
     case ACM_FORMATTAGDETAILSF_INDEX:
 	if (had != (HACMDRIVER)NULL) {
 	    PWINE_ACMDRIVER	pad = MSACM_GetDriver(had);
-	    
+
 	    if (pad && paftd->dwFormatTagIndex < pad->obj.pACMDriverID->cFormatTags)
 		mmr = MSACM_Message(had, ACMDM_FORMATTAG_DETAILS, (LPARAM)paftd, fdwDetails);
-	} 
+	}
 	break;
 
     case ACM_FORMATTAGDETAILSF_LARGESTSIZE:
@@ -656,20 +656,20 @@
 
 	    for (padid = MSACM_pFirstACMDriverID; padid; padid = padid->pNextACMDriverID) {
 		/* should check for codec only */
-		if (!(padid->fdwSupport & ACMDRIVERDETAILS_SUPPORTF_DISABLED) && 
+		if (!(padid->fdwSupport & ACMDRIVERDETAILS_SUPPORTF_DISABLED) &&
 		    acmDriverOpen(&had, (HACMDRIVERID)padid, 0) == 0) {
 
 		    memset(&tmp, 0, sizeof(tmp));
 		    tmp.cbStruct = sizeof(tmp);
 		    tmp.dwFormatTag = ft;
 
-		    if (MSACM_Message(had, ACMDM_FORMATTAG_DETAILS, 
+		    if (MSACM_Message(had, ACMDM_FORMATTAG_DETAILS,
 				      (LPARAM)&tmp, fdwDetails) == MMSYSERR_NOERROR) {
 			if (mmr == ACMERR_NOTPOSSIBLE ||
 			    paftd->cbFormatSize < tmp.cbFormatSize) {
 			    *paftd = tmp;
 			    mmr = MMSYSERR_NOERROR;
-			} 
+			}
 		    }
 		    acmDriverClose(had, 0);
 		}
@@ -684,7 +684,7 @@
 	mmr = MMSYSERR_ERROR;
     }
 
-    if (mmr == MMSYSERR_NOERROR && 
+    if (mmr == MMSYSERR_NOERROR &&
 	paftd->dwFormatTag == WAVE_FORMAT_PCM && paftd->szFormatTag[0] == 0)
         MultiByteToWideChar( CP_ACP, 0, "PCM", -1, paftd->szFormatTag,
                              sizeof(paftd->szFormatTag)/sizeof(WCHAR) );
@@ -699,23 +699,23 @@
 };
 
 static BOOL CALLBACK MSACM_FormatTagEnumCallbackWtoA(HACMDRIVERID hadid,
-						     PACMFORMATTAGDETAILSW paftdw,  
-						     DWORD dwInstance,             
+						     PACMFORMATTAGDETAILSW paftdw,
+						     DWORD dwInstance,
 						     DWORD fdwSupport)
 {
     struct MSACM_FormatTagEnumWtoA_Instance* paftei;
 
     paftei = (struct MSACM_FormatTagEnumWtoA_Instance*)dwInstance;
 
-    paftei->paftda->dwFormatTagIndex = paftdw->dwFormatTagIndex; 
-    paftei->paftda->dwFormatTag = paftdw->dwFormatTag; 
-    paftei->paftda->cbFormatSize = paftdw->cbFormatSize; 
-    paftei->paftda->fdwSupport = paftdw->fdwSupport; 
-    paftei->paftda->cStandardFormats = paftdw->cStandardFormats; 
+    paftei->paftda->dwFormatTagIndex = paftdw->dwFormatTagIndex;
+    paftei->paftda->dwFormatTag = paftdw->dwFormatTag;
+    paftei->paftda->cbFormatSize = paftdw->cbFormatSize;
+    paftei->paftda->fdwSupport = paftdw->fdwSupport;
+    paftei->paftda->cStandardFormats = paftdw->cStandardFormats;
     WideCharToMultiByte( CP_ACP, 0, paftdw->szFormatTag, -1, paftei->paftda->szFormatTag,
                          sizeof(paftei->paftda->szFormatTag), NULL, NULL );
 
-    return (paftei->fnCallback)(hadid, paftei->paftda, 
+    return (paftei->fnCallback)(hadid, paftei->paftda,
 				paftei->dwInstance, fdwSupport);
 }
 
@@ -723,7 +723,7 @@
  *           acmFormatTagEnumA (MSACM32.@)
  */
 MMRESULT WINAPI acmFormatTagEnumA(HACMDRIVER had, PACMFORMATTAGDETAILSA paftda,
-				  ACMFORMATTAGENUMCBA fnCallback, DWORD dwInstance, 
+				  ACMFORMATTAGENUMCBA fnCallback, DWORD dwInstance,
 				  DWORD fdwEnum)
 {
     ACMFORMATTAGDETAILSW	aftdw;
@@ -738,7 +738,7 @@
     aftei.dwInstance = dwInstance;
     aftei.fnCallback = fnCallback;
 
-    return acmFormatTagEnumW(had, &aftdw, MSACM_FormatTagEnumCallbackWtoA, 
+    return acmFormatTagEnumW(had, &aftdw, MSACM_FormatTagEnumCallbackWtoA,
 			     (DWORD)&aftei, fdwEnum);
 }
 
@@ -746,7 +746,7 @@
  *           acmFormatTagEnumW (MSACM32.@)
  */
 MMRESULT WINAPI acmFormatTagEnumW(HACMDRIVER had, PACMFORMATTAGDETAILSW paftd,
-				  ACMFORMATTAGENUMCBW fnCallback, DWORD dwInstance, 
+				  ACMFORMATTAGENUMCBW fnCallback, DWORD dwInstance,
 				  DWORD fdwEnum)
 {
     PWINE_ACMDRIVERID		padid;
@@ -754,15 +754,15 @@
     BOOL			bPcmDone = FALSE;
 
     TRACE("(0x%08x, %p, %p, %ld, %ld)\n",
-	  had, paftd, fnCallback, dwInstance, fdwEnum); 
+	  had, paftd, fnCallback, dwInstance, fdwEnum);
 
     if (paftd->cbStruct < sizeof(*paftd)) return MMSYSERR_INVALPARAM;
 
     if (had) FIXME("had != NULL, not supported\n");
-    
+
     for (padid = MSACM_pFirstACMDriverID; padid; padid = padid->pNextACMDriverID) {
 	/* should check for codec only */
-	if (!(padid->fdwSupport & ACMDRIVERDETAILS_SUPPORTF_DISABLED) && 
+	if (!(padid->fdwSupport & ACMDRIVERDETAILS_SUPPORTF_DISABLED) &&
 	    acmDriverOpen(&had, (HACMDRIVERID)padid, 0) == MMSYSERR_NOERROR) {
 	    for (i = 0; i < padid->cFormatTags; i++) {
 		paftd->dwFormatTagIndex = i;
@@ -772,9 +772,9 @@
 			if (paftd->szFormatTag[0] == 0)
 			    MultiByteToWideChar( CP_ACP, 0, "PCM", -1, paftd->szFormatTag,
 						 sizeof(paftd->szFormatTag)/sizeof(WCHAR) );
-			/* FIXME (EPP): I'm not sure this is the correct 
+			/* FIXME (EPP): I'm not sure this is the correct
 			 * algorithm (should make more sense to apply the same
-			 * for all already loaded formats, but this will do 
+			 * for all already loaded formats, but this will do
 			 * for now
 			 */
 			if (bPcmDone) continue;
diff --git a/dlls/msacm/imaadp32/imaadp32.c b/dlls/msacm/imaadp32/imaadp32.c
index ee270d9..41e74bf 100644
--- a/dlls/msacm/imaadp32/imaadp32.c
+++ b/dlls/msacm/imaadp32/imaadp32.c
@@ -52,9 +52,9 @@
     return 1;
 }
 
-typedef struct tagAcmAdpcmData 
+typedef struct tagAcmAdpcmData
 {
-    void (*convert)(PACMDRVSTREAMINSTANCE adsi, 
+    void (*convert)(PACMDRVSTREAMINSTANCE adsi,
 		    const unsigned char*, LPDWORD, unsigned char*, LPDWORD);
     /* IMA encoding only */
     BYTE	stepIndexL;
@@ -65,14 +65,14 @@
 /* table to list all supported formats... those are the basic ones. this
  * also helps given a unique index to each of the supported formats
  */
-typedef	struct 
+typedef	struct
 {
     int		nChannels;
     int		nBits;
     int		rate;
 } Format;
 
-static Format PCM_Formats[] = 
+static Format PCM_Formats[] =
 {
     {1,  8,  8000}, {2,  8,  8000}, {1, 16,  8000}, {2, 16,  8000},
     {1,  8, 11025}, {2,  8, 11025}, {1, 16, 11025}, {2, 16, 11025},
@@ -80,9 +80,9 @@
     {1,  8, 44100}, {2,  8, 44100}, {1, 16, 44100}, {2, 16, 44100},
 };
 
-static Format ADPCM_Formats[] = 
+static Format ADPCM_Formats[] =
 {
-    {1,  4,  8000}, {2,	4,  8000},  {1,  4, 11025}, {2,	 4, 11025}, 
+    {1,  4,  8000}, {2,	4,  8000},  {1,  4, 11025}, {2,	 4, 11025},
     {1,  4, 22050}, {2,	4, 22050},  {1,  4, 44100}, {2,	 4, 44100},
 };
 
@@ -96,8 +96,8 @@
 {
     int 	i, hi;
     Format*	fmts;
-    
-    switch (wfx->wFormatTag) 
+
+    switch (wfx->wFormatTag)
     {
     case WAVE_FORMAT_PCM:
 	hi = NUM_PCM_FORMATS;
@@ -110,15 +110,15 @@
     default:
 	return 0xFFFFFFFF;
     }
-    
-    for (i = 0; i < hi; i++) 
+
+    for (i = 0; i < hi; i++)
     {
 	if (wfx->nChannels == fmts[i].nChannels &&
 	    wfx->nSamplesPerSec == fmts[i].rate &&
 	    wfx->wBitsPerSample == fmts[i].nBits)
 	    return i;
     }
-    
+
     return 0xFFFFFFFF;
 }
 
@@ -145,7 +145,7 @@
 
 /* IMA (or DVI) APDCM codec routines */
 
-static const unsigned IMA_StepTable[89] = 
+static const unsigned IMA_StepTable[89] =
 {
     7, 8, 9, 10, 11, 12, 13, 14,
     16, 17, 19, 21, 23, 25, 28, 31,
@@ -161,10 +161,10 @@
     32767
 };
 
-static const int IMA_IndexTable[16] = 
+static const int IMA_IndexTable[16] =
 {
     -1, -1, -1, -1, 2, 4, 6, 8,
-    -1, -1, -1, -1, 2, 4, 6, 8 
+    -1, -1, -1, -1, 2, 4, 6, 8
 };
 
 static inline void clamp_step_index(int* stepIndex)
@@ -183,9 +183,9 @@
 {
     unsigned step;
     int diff;
-    
+
     code &= 0x0F;
-    
+
     step = IMA_StepTable[*stepIndex];
     diff = step >> 3;
     if (code & 1) diff += step >> 2;
@@ -204,38 +204,38 @@
     unsigned step;
     unsigned char code;
 
-    if (diff < 0) 
+    if (diff < 0)
     {
         diff = -diff;
-        code = 8; 
+        code = 8;
     }
-    else 
+    else
     {
         code = 0;
     }
-	    
+
     step = IMA_StepTable[*stepIndex];
     effdiff = (step >> 3);
-    if (diff >= step) 
+    if (diff >= step)
     {
         code |= 4;
         diff -= step;
         effdiff += step;
     }
     step >>= 1;
-    if (diff >= step) 
+    if (diff >= step)
     {
         code |= 2;
         diff -= step;
         effdiff += step;
     }
     step >>= 1;
-    if (diff >= step) 
+    if (diff >= step)
     {
         code |= 1;
         effdiff += step;
     }
-    if (code & 8)       *sample -= effdiff; 
+    if (code & 8)       *sample -= effdiff;
     else                *sample += effdiff;
     clamp_sample(sample);
     *stepIndex += IMA_IndexTable[code];
@@ -243,8 +243,8 @@
     return code;
 }
 
-static	void cvtSSima16K(PACMDRVSTREAMINSTANCE adsi, 
-                         const unsigned char* src, LPDWORD nsrc, 
+static	void cvtSSima16K(PACMDRVSTREAMINSTANCE adsi,
+                         const unsigned char* src, LPDWORD nsrc,
                          unsigned char* dst, LPDWORD ndst)
 {
     int         i;
@@ -256,30 +256,30 @@
      * it's the min of the number of entire blocks in source buffer and the number
      * of entire blocks in destination buffer
      */
-    DWORD	nblock = min(*nsrc / adsi->pwfxSrc->nBlockAlign, 
+    DWORD	nblock = min(*nsrc / adsi->pwfxSrc->nBlockAlign,
                              *ndst / (nsamp_blk * 2 * 2));
-    
+
     *nsrc = nblock * adsi->pwfxSrc->nBlockAlign;
     *ndst = nblock * (nsamp_blk * 2 * 2);
-    
+
     nsamp_blk--; /* remove the sample in block header */
-    for (; nblock > 0; nblock--) 
+    for (; nblock > 0; nblock--)
     {
         const unsigned char* in_src = src;
-        
+
 	/* handle headers first */
 	sampleL = R16(src);
 	stepIndexL = (unsigned)*(src + 2);
         clamp_step_index(&stepIndexL);
 	src += 4;
 	W16(dst, sampleL);	dst += 2;
-        
+
 	sampleR = R16(src);
 	stepIndexR = (unsigned)*(src + 2);
         clamp_step_index(&stepIndexR);
 	src += 4;
 	W16(dst, sampleR);	dst += 2;
-        
+
 	for (nsamp = nsamp_blk; nsamp > 0; nsamp -= 8)
         {
             for (i = 0; i < 4; i++)
@@ -303,8 +303,8 @@
     }
 }
 
-static	void cvtMMima16K(PACMDRVSTREAMINSTANCE adsi, 
-                         const unsigned char* src, LPDWORD nsrc, 
+static	void cvtMMima16K(PACMDRVSTREAMINSTANCE adsi,
+                         const unsigned char* src, LPDWORD nsrc,
                          unsigned char* dst, LPDWORD ndst)
 {
     int	 	sample;
@@ -315,24 +315,24 @@
      * it's the min of the number of entire blocks in source buffer and the number
      * of entire blocks in destination buffer
      */
-    DWORD	nblock = min(*nsrc / adsi->pwfxSrc->nBlockAlign, 
+    DWORD	nblock = min(*nsrc / adsi->pwfxSrc->nBlockAlign,
                              *ndst / (nsamp_blk * 2));
-    
+
     *nsrc = nblock * adsi->pwfxSrc->nBlockAlign;
     *ndst = nblock * nsamp_blk * 2;
-    
+
     nsamp_blk--; /* remove the sample in block header */
-    for (; nblock > 0; nblock--) 
+    for (; nblock > 0; nblock--)
     {
         const unsigned char*    in_src = src;
-        
+
 	/* handle header first */
 	sample = R16(src);
 	stepIndex = (unsigned)*(src + 2);
         clamp_step_index(&stepIndex);
 	src += 4;
 	W16(dst, sample);	dst += 2;
-        
+
 	for (nsamp = nsamp_blk; nsamp > 0; nsamp -= 2)
         {
             process_nibble(*src >> 4, &stepIndex, &sample);
@@ -345,8 +345,8 @@
     }
 }
 
-static	void cvtSS16imaK(PACMDRVSTREAMINSTANCE adsi, 
-                         const unsigned char* src, LPDWORD nsrc, 
+static	void cvtSS16imaK(PACMDRVSTREAMINSTANCE adsi,
+                         const unsigned char* src, LPDWORD nsrc,
                          unsigned char* dst, LPDWORD ndst)
 {
     int		stepIndexL, stepIndexR;
@@ -359,7 +359,7 @@
      * of entire blocks in destination buffer
      */
     DWORD	nblock = min(*nsrc / (nsamp_blk * 2 * 2),
-                             *ndst / adsi->pwfxDst->nBlockAlign); 
+                             *ndst / adsi->pwfxDst->nBlockAlign);
 
     *nsrc = nblock * (nsamp_blk * 2 * 2);
     *ndst = nblock * adsi->pwfxDst->nBlockAlign;
@@ -383,22 +383,22 @@
 	W16(dst, sampleR); dst += 2;
 	*dst = (unsigned char)(unsigned)stepIndexR;
 	dst += 2;
-	
+
 	for (nsamp = nsamp_blk; nsamp > 0; nsamp -= 8)
         {
             for (i = 0; i < 4; i++)
             {
-                code1 = generate_nibble(R16(src + (2 * i + 0) * 2 + 0), 
+                code1 = generate_nibble(R16(src + (2 * i + 0) * 2 + 0),
                                         &stepIndexL, &sampleL);
-                code2 = generate_nibble(R16(src + (2 * i + 1) * 2 + 0), 
+                code2 = generate_nibble(R16(src + (2 * i + 1) * 2 + 0),
                                         &stepIndexL, &sampleL);
                 *dst++ = (code1 << 4) | code2;
             }
             for (i = 0; i < 4; i++)
             {
-                code1 = generate_nibble(R16(src + (2 * i + 0) * 2 + 1), 
+                code1 = generate_nibble(R16(src + (2 * i + 0) * 2 + 1),
                                         &stepIndexR, &sampleR);
-                code2 = generate_nibble(R16(src + (2 * i + 1) * 2 + 1), 
+                code2 = generate_nibble(R16(src + (2 * i + 1) * 2 + 1),
                                         &stepIndexR, &sampleR);
                 *dst++ = (code1 << 4) | code2;
             }
@@ -410,8 +410,8 @@
     ((AcmAdpcmData*)adsi->dwDriver)->stepIndexR = stepIndexR;
 }
 
-static	void cvtMM16imaK(PACMDRVSTREAMINSTANCE adsi, 
-                         const unsigned char* src, LPDWORD nsrc, 
+static	void cvtMM16imaK(PACMDRVSTREAMINSTANCE adsi,
+                         const unsigned char* src, LPDWORD nsrc,
                          unsigned char* dst, LPDWORD ndst)
 {
     int		stepIndex;
@@ -424,8 +424,8 @@
      * of entire blocks in destination buffer
      */
     DWORD	nblock = min(*nsrc / (nsamp_blk * 2),
-                             *ndst / adsi->pwfxDst->nBlockAlign); 
-          
+                             *ndst / adsi->pwfxDst->nBlockAlign);
+
     *nsrc = nblock * (nsamp_blk * 2);
     *ndst = nblock * adsi->pwfxDst->nBlockAlign;
 
@@ -449,7 +449,7 @@
 	W16(dst, sample); dst += 2;
 	*dst = (unsigned char)(unsigned)stepIndex;
 	dst += 2;
-	
+
 	for (nsamp = nsamp_blk; nsamp > 0; nsamp -= 2)
         {
             code1 = generate_nibble(R16(src), &stepIndex, &sample);
@@ -488,7 +488,7 @@
     MultiByteToWideChar( CP_ACP, 0, "Refer to LICENSE file", -1,
                          add->szLicensing, sizeof(add->szLicensing)/sizeof(WCHAR) );
     add->szFeatures[0] = 0;
-    
+
     return MMSYSERR_NOERROR;
 }
 
@@ -500,21 +500,21 @@
 {
     static WCHAR szPcm[]={'P','C','M',0};
     static WCHAR szImaAdPcm[]={'I','M','A',' ','A','d','P','C','M',0};
-    
-    switch (dwQuery) 
+
+    switch (dwQuery)
     {
     case ACM_FORMATTAGDETAILSF_INDEX:
 	if (aftd->dwFormatTagIndex >= 2) return ACMERR_NOTPOSSIBLE;
 	break;
     case ACM_FORMATTAGDETAILSF_LARGESTSIZE:
-	if (aftd->dwFormatTag == WAVE_FORMAT_UNKNOWN) 
+	if (aftd->dwFormatTag == WAVE_FORMAT_UNKNOWN)
         {
             aftd->dwFormatTagIndex = 1; /* WAVE_FORMAT_IMA_ADPCM is bigger than PCM */
 	    break;
 	}
 	/* fall thru */
-    case ACM_FORMATTAGDETAILSF_FORMATTAG: 
-	switch (aftd->dwFormatTag) 
+    case ACM_FORMATTAGDETAILSF_FORMATTAG:
+	switch (aftd->dwFormatTag)
         {
 	case WAVE_FORMAT_PCM:		aftd->dwFormatTagIndex = 0; break;
 	case WAVE_FORMAT_IMA_ADPCM:     aftd->dwFormatTagIndex = 1; break;
@@ -525,9 +525,9 @@
 	WARN("Unsupported query %08lx\n", dwQuery);
 	return MMSYSERR_NOTSUPPORTED;
     }
-    
+
     aftd->fdwSupport = ACMDRIVERDETAILS_SUPPORTF_CODEC;
-    switch (aftd->dwFormatTagIndex) 
+    switch (aftd->dwFormatTagIndex)
     {
     case 0:
 	aftd->dwFormatTag = WAVE_FORMAT_PCM;
@@ -551,14 +551,14 @@
  */
 static	LRESULT	ADPCM_FormatDetails(PACMFORMATDETAILSW afd, DWORD dwQuery)
 {
-    switch (dwQuery) 
+    switch (dwQuery)
     {
     case ACM_FORMATDETAILSF_FORMAT:
 	if (ADPCM_GetFormatIndex(afd->pwfx) == 0xFFFFFFFF) return ACMERR_NOTPOSSIBLE;
 	break;
     case ACM_FORMATDETAILSF_INDEX:
 	afd->pwfx->wFormatTag = afd->dwFormatTag;
-	switch (afd->dwFormatTag) 
+	switch (afd->dwFormatTag)
         {
 	case WAVE_FORMAT_PCM:
 	    if (afd->dwFormatIndex >= NUM_PCM_FORMATS) return ACMERR_NOTPOSSIBLE;
@@ -566,11 +566,11 @@
 	    afd->pwfx->nSamplesPerSec = PCM_Formats[afd->dwFormatIndex].rate;
 	    afd->pwfx->wBitsPerSample = PCM_Formats[afd->dwFormatIndex].nBits;
 	    /* native MSACM uses a PCMWAVEFORMAT structure, so cbSize is not accessible
-	     * afd->pwfx->cbSize = 0; 
+	     * afd->pwfx->cbSize = 0;
 	     */
-	    afd->pwfx->nBlockAlign = 
+	    afd->pwfx->nBlockAlign =
 		(afd->pwfx->nChannels * afd->pwfx->wBitsPerSample) / 8;
-	    afd->pwfx->nAvgBytesPerSec = 
+	    afd->pwfx->nAvgBytesPerSec =
 		afd->pwfx->nSamplesPerSec * afd->pwfx->nBlockAlign;
 	    break;
 	case WAVE_FORMAT_IMA_ADPCM:
@@ -594,11 +594,11 @@
 	break;
     default:
 	WARN("Unsupported query %08lx\n", dwQuery);
-	return MMSYSERR_NOTSUPPORTED;	
+	return MMSYSERR_NOTSUPPORTED;
     }
     afd->fdwSupport = ACMDRIVERDETAILS_SUPPORTF_CODEC;
     afd->szFormat[0] = 0; /* let MSACM format this for us... */
-    
+
     return MMSYSERR_NOERROR;
 }
 
@@ -620,21 +620,21 @@
     if (!(adfs->fdwSuggest & ACM_FORMATSUGGESTF_NSAMPLESPERSEC))
         adfs->pwfxDst->nSamplesPerSec = adfs->pwfxSrc->nSamplesPerSec;
 
-    if (!(adfs->fdwSuggest & ACM_FORMATSUGGESTF_WBITSPERSAMPLE)) 
+    if (!(adfs->fdwSuggest & ACM_FORMATSUGGESTF_WBITSPERSAMPLE))
     {
-	if (adfs->pwfxSrc->wFormatTag == WAVE_FORMAT_PCM) 
+	if (adfs->pwfxSrc->wFormatTag == WAVE_FORMAT_PCM)
             adfs->pwfxDst->wBitsPerSample = 4;
         else
             adfs->pwfxDst->wBitsPerSample = 16;
     }
-    if (!(adfs->fdwSuggest & ACM_FORMATSUGGESTF_WFORMATTAG)) 
+    if (!(adfs->fdwSuggest & ACM_FORMATSUGGESTF_WFORMATTAG))
     {
-	if (adfs->pwfxSrc->wFormatTag == WAVE_FORMAT_PCM) 
+	if (adfs->pwfxSrc->wFormatTag == WAVE_FORMAT_PCM)
             adfs->pwfxDst->wFormatTag = WAVE_FORMAT_IMA_ADPCM;
         else
             adfs->pwfxDst->wFormatTag = WAVE_FORMAT_PCM;
     }
-        
+
     /* check if result is ok */
     if (ADPCM_GetFormatIndex(adfs->pwfxDst) == 0xFFFFFFFF) return ACMERR_NOTPOSSIBLE;
 
@@ -679,25 +679,25 @@
     unsigned            nspb;
 
     assert(!(adsi->fdwOpen & ACM_STREAMOPENF_ASYNC));
-    
+
     if (ADPCM_GetFormatIndex(adsi->pwfxSrc) == 0xFFFFFFFF ||
 	ADPCM_GetFormatIndex(adsi->pwfxDst) == 0xFFFFFFFF)
 	return ACMERR_NOTPOSSIBLE;
-    
+
     aad = HeapAlloc(GetProcessHeap(), 0, sizeof(AcmAdpcmData));
     if (aad == 0) return MMSYSERR_NOMEM;
-    
+
     adsi->dwDriver = (DWORD)aad;
-    
+
     if (adsi->pwfxSrc->wFormatTag == WAVE_FORMAT_PCM &&
-	adsi->pwfxDst->wFormatTag == WAVE_FORMAT_PCM) 
+	adsi->pwfxDst->wFormatTag == WAVE_FORMAT_PCM)
     {
 	goto theEnd;
     }
     else if (adsi->pwfxSrc->wFormatTag == WAVE_FORMAT_IMA_ADPCM &&
-             adsi->pwfxDst->wFormatTag == WAVE_FORMAT_PCM) 
+             adsi->pwfxDst->wFormatTag == WAVE_FORMAT_PCM)
     {
-	/* resampling or mono <=> stereo not available 
+	/* resampling or mono <=> stereo not available
          * ADPCM algo only define 16 bit per sample output
          */
 	if (adsi->pwfxSrc->nSamplesPerSec != adsi->pwfxDst->nSamplesPerSec ||
@@ -717,19 +717,19 @@
             goto theEnd;
 
 	/* adpcm decoding... */
-	if (adsi->pwfxDst->wBitsPerSample == 16 && adsi->pwfxDst->nChannels == 2) 
+	if (adsi->pwfxDst->wBitsPerSample == 16 && adsi->pwfxDst->nChannels == 2)
 	    aad->convert = cvtSSima16K;
-	if (adsi->pwfxDst->wBitsPerSample == 16 && adsi->pwfxDst->nChannels == 1) 
+	if (adsi->pwfxDst->wBitsPerSample == 16 && adsi->pwfxDst->nChannels == 1)
 	    aad->convert = cvtMMima16K;
     }
     else if (adsi->pwfxSrc->wFormatTag == WAVE_FORMAT_PCM &&
-             adsi->pwfxDst->wFormatTag == WAVE_FORMAT_IMA_ADPCM) 
+             adsi->pwfxDst->wFormatTag == WAVE_FORMAT_IMA_ADPCM)
     {
 	if (adsi->pwfxSrc->nSamplesPerSec != adsi->pwfxDst->nSamplesPerSec ||
 	    adsi->pwfxSrc->nChannels != adsi->pwfxDst->nChannels ||
             adsi->pwfxSrc->wBitsPerSample != 16)
 	    goto theEnd;
-        
+
         nspb = ((LPIMAADPCMWAVEFORMAT)adsi->pwfxDst)->wSamplesPerBlock;
         FIXME("spb=%u\n", nspb);
 
@@ -742,16 +742,16 @@
             goto theEnd;
 
 	/* adpcm coding... */
-	if (adsi->pwfxSrc->wBitsPerSample == 16 && adsi->pwfxSrc->nChannels == 2) 
+	if (adsi->pwfxSrc->wBitsPerSample == 16 && adsi->pwfxSrc->nChannels == 2)
 	    aad->convert = cvtSS16imaK;
-	if (adsi->pwfxSrc->wBitsPerSample == 16 && adsi->pwfxSrc->nChannels == 1) 
+	if (adsi->pwfxSrc->wBitsPerSample == 16 && adsi->pwfxSrc->nChannels == 1)
 	    aad->convert = cvtMM16imaK;
     }
     else goto theEnd;
     ADPCM_Reset(adsi, aad);
 
     return MMSYSERR_NOERROR;
-    
+
  theEnd:
     HeapFree(GetProcessHeap(), 0, aad);
     adsi->dwDriver = 0L;
@@ -785,23 +785,23 @@
  */
 static	LRESULT ADPCM_StreamSize(PACMDRVSTREAMINSTANCE adsi, PACMDRVSTREAMSIZE adss)
 {
-    switch (adss->fdwSize) 
+    switch (adss->fdwSize)
     {
     case ACM_STREAMSIZEF_DESTINATION:
 	/* cbDstLength => cbSrcLength */
 	if (adsi->pwfxSrc->wFormatTag == WAVE_FORMAT_PCM &&
-	    adsi->pwfxDst->wFormatTag == WAVE_FORMAT_IMA_ADPCM) 
+	    adsi->pwfxDst->wFormatTag == WAVE_FORMAT_IMA_ADPCM)
         {
 	    /* don't take block overhead into account, doesn't matter too much */
 	    adss->cbSrcLength = adss->cbDstLength * 4;
 	}
         else if (adsi->pwfxSrc->wFormatTag == WAVE_FORMAT_IMA_ADPCM &&
-                 adsi->pwfxDst->wFormatTag == WAVE_FORMAT_PCM) 
+                 adsi->pwfxDst->wFormatTag == WAVE_FORMAT_PCM)
         {
 	    FIXME("misses the block header overhead\n");
 	    adss->cbSrcLength = 256 + adss->cbDstLength / 4;
 	}
-        else 
+        else
         {
 	    return MMSYSERR_NOTSUPPORTED;
 	}
@@ -809,25 +809,25 @@
     case ACM_STREAMSIZEF_SOURCE:
 	/* cbSrcLength => cbDstLength */
 	if (adsi->pwfxSrc->wFormatTag == WAVE_FORMAT_PCM &&
-	    adsi->pwfxDst->wFormatTag == WAVE_FORMAT_IMA_ADPCM) 
+	    adsi->pwfxDst->wFormatTag == WAVE_FORMAT_IMA_ADPCM)
         {
 	    FIXME("misses the block header overhead\n");
 	    adss->cbDstLength = 256 + adss->cbSrcLength / 4;
-	} 
+	}
         else if (adsi->pwfxSrc->wFormatTag == WAVE_FORMAT_IMA_ADPCM &&
-                 adsi->pwfxDst->wFormatTag == WAVE_FORMAT_PCM) 
+                 adsi->pwfxDst->wFormatTag == WAVE_FORMAT_PCM)
         {
 	    /* don't take block overhead into account, doesn't matter too much */
 	    adss->cbDstLength = adss->cbSrcLength * 4;
 	}
-        else 
+        else
         {
 	    return MMSYSERR_NOTSUPPORTED;
 	}
 	break;
     default:
 	WARN("Unsupported query %08lx\n", adss->fdwSize);
-	return MMSYSERR_NOTSUPPORTED;	
+	return MMSYSERR_NOTSUPPORTED;
     }
     return MMSYSERR_NOERROR;
 }
@@ -841,11 +841,11 @@
     AcmAdpcmData*	aad = (AcmAdpcmData*)adsi->dwDriver;
     DWORD		nsrc = adsh->cbSrcLength;
     DWORD		ndst = adsh->cbDstLength;
-    
-    if (adsh->fdwConvert & 
+
+    if (adsh->fdwConvert &
 	~(ACM_STREAMCONVERTF_BLOCKALIGN|
 	  ACM_STREAMCONVERTF_END|
-	  ACM_STREAMCONVERTF_START)) 
+	  ACM_STREAMCONVERTF_START))
     {
 	FIXME("Unsupported fdwConvert (%08lx), ignoring it\n", adsh->fdwConvert);
     }
@@ -854,7 +854,7 @@
      * ACM_STREAMCONVERTF_END
      *	no pending data, so do nothing for this flag
      */
-    if ((adsh->fdwConvert & ACM_STREAMCONVERTF_START)) 
+    if ((adsh->fdwConvert & ACM_STREAMCONVERTF_START))
     {
 	ADPCM_Reset(adsi, aad);
     }
@@ -862,60 +862,60 @@
     aad->convert(adsi, adsh->pbSrc, &nsrc, adsh->pbDst, &ndst);
     adsh->cbSrcLengthUsed = nsrc;
     adsh->cbDstLengthUsed = ndst;
-    
+
     return MMSYSERR_NOERROR;
 }
 
 /**************************************************************************
  * 			ADPCM_DriverProc			[exported]
  */
-LRESULT CALLBACK	ADPCM_DriverProc(DWORD dwDevID, HDRVR hDriv, UINT wMsg, 
+LRESULT CALLBACK	ADPCM_DriverProc(DWORD dwDevID, HDRVR hDriv, UINT wMsg,
 					 LPARAM dwParam1, LPARAM dwParam2)
 {
-    TRACE("(%08lx %08lx %04x %08lx %08lx);\n", 
+    TRACE("(%08lx %08lx %04x %08lx %08lx);\n",
 	  dwDevID, (DWORD)hDriv, wMsg, dwParam1, dwParam2);
-    
-    switch (wMsg) 
+
+    switch (wMsg)
     {
     case DRV_LOAD:		return 1;
     case DRV_FREE:		return 1;
     case DRV_OPEN:		return ADPCM_drvOpen((LPSTR)dwParam1);
     case DRV_CLOSE:		return ADPCM_drvClose(dwDevID);
-    case DRV_ENABLE:		return 1;	
+    case DRV_ENABLE:		return 1;
     case DRV_DISABLE:		return 1;
     case DRV_QUERYCONFIGURE:	return 1;
     case DRV_CONFIGURE:		MessageBoxA(0, "MSACM IMA ADPCM filter !", "Wine Driver", MB_OK); return 1;
     case DRV_INSTALL:		return DRVCNF_RESTART;
     case DRV_REMOVE:		return DRVCNF_RESTART;
-	
+
     case ACMDM_DRIVER_NOTIFY:
 	/* no caching from other ACM drivers is done so far */
 	return MMSYSERR_NOERROR;
-	
+
     case ACMDM_DRIVER_DETAILS:
 	return ADPCM_DriverDetails((PACMDRIVERDETAILSW)dwParam1);
-	
+
     case ACMDM_FORMATTAG_DETAILS:
 	return ADPCM_FormatTagDetails((PACMFORMATTAGDETAILSW)dwParam1, dwParam2);
-	
+
     case ACMDM_FORMAT_DETAILS:
 	return ADPCM_FormatDetails((PACMFORMATDETAILSW)dwParam1, dwParam2);
-	
+
     case ACMDM_FORMAT_SUGGEST:
 	return ADPCM_FormatSuggest((PACMDRVFORMATSUGGEST)dwParam1);
-	
+
     case ACMDM_STREAM_OPEN:
 	return ADPCM_StreamOpen((PACMDRVSTREAMINSTANCE)dwParam1);
-	
+
     case ACMDM_STREAM_CLOSE:
 	return ADPCM_StreamClose((PACMDRVSTREAMINSTANCE)dwParam1);
-	
+
     case ACMDM_STREAM_SIZE:
 	return ADPCM_StreamSize((PACMDRVSTREAMINSTANCE)dwParam1, (PACMDRVSTREAMSIZE)dwParam2);
-	
+
     case ACMDM_STREAM_CONVERT:
 	return ADPCM_StreamConvert((PACMDRVSTREAMINSTANCE)dwParam1, (PACMDRVSTREAMHEADER)dwParam2);
-	
+
     case ACMDM_HARDWARE_WAVE_CAPS_INPUT:
     case ACMDM_HARDWARE_WAVE_CAPS_OUTPUT:
 	/* this converter is not a hardware driver */
@@ -929,7 +929,7 @@
     case ACMDM_STREAM_UNPREPARE:
 	/* nothing special to do here... so don't do anything */
 	return MMSYSERR_NOERROR;
-	
+
     default:
 	return DefDriverProc(dwDevID, hDriv, wMsg, dwParam1, dwParam2);
     }
diff --git a/dlls/msacm/internal.c b/dlls/msacm/internal.c
index 417f3e0..e852b40 100644
--- a/dlls/msacm/internal.c
+++ b/dlls/msacm/internal.c
@@ -47,14 +47,14 @@
 /***********************************************************************
  *           MSACM_DumpCache
  */
-static	void MSACM_DumpCache(PWINE_ACMDRIVERID padid) 
+static	void MSACM_DumpCache(PWINE_ACMDRIVERID padid)
 {
     unsigned 	i;
 
     TRACE("cFilterTags=%lu cFormatTags=%lu fdwSupport=%08lx\n",
 	  padid->cFilterTags, padid->cFormatTags, padid->fdwSupport);
     for (i = 0; i < padid->cache->cFormatTags; i++) {
-	TRACE("\tdwFormatTag=%lu cbwfx=%lu\n", 
+	TRACE("\tdwFormatTag=%lu cbwfx=%lu\n",
 	      padid->aFormatTag[i].dwFormatTag, padid->aFormatTag[i].cbwfx);
     }
 }
@@ -62,7 +62,7 @@
 
 /***********************************************************************
  *           MSACM_FindFormatTagInCache 		[internal]
- * 
+ *
  *	Returns TRUE is the format tag fmtTag is present in the cache.
  *	If so, idx is set to its index.
  */
@@ -82,7 +82,7 @@
 /***********************************************************************
  *           MSACM_FillCache
  */
-static BOOL MSACM_FillCache(PWINE_ACMDRIVERID padid) 
+static BOOL MSACM_FillCache(PWINE_ACMDRIVERID padid)
 {
     HACMDRIVER		        had = 0;
     int			        ntag;
@@ -98,7 +98,7 @@
 	goto errCleanUp;
 
     if (add.cFormatTags > 0) {
-	padid->aFormatTag = HeapAlloc(MSACM_hHeap, HEAP_ZERO_MEMORY, 
+	padid->aFormatTag = HeapAlloc(MSACM_hHeap, HEAP_ZERO_MEMORY,
 				      add.cFormatTags * sizeof(padid->aFormatTag[0]));
 	if (!padid->aFormatTag) goto errCleanUp;
     }
@@ -108,7 +108,7 @@
     padid->fdwSupport  = add.fdwSupport;
 
     aftd.cbStruct = sizeof(aftd);
- 
+
     for (ntag = 0; ntag < add.cFormatTags; ntag++) {
 	aftd.dwFormatTagIndex = ntag;
 	if (MSACM_Message(had, ACMDM_FORMATTAG_DETAILS, (LPARAM)&aftd, ACM_FORMATTAGDETAILSF_INDEX)) {
@@ -216,8 +216,8 @@
 	goto errCleanUp;
     if (RegSetValueExA(hKey, "fdwSupport", 0, REG_DWORD, (void*)&padid->fdwSupport, sizeof(DWORD)))
 	goto errCleanUp;
-    if (RegSetValueExA(hKey, "aFormatTagCache", 0, REG_BINARY, 
-		       (void*)padid->aFormatTag, 
+    if (RegSetValueExA(hKey, "aFormatTagCache", 0, REG_BINARY,
+		       (void*)padid->aFormatTag,
 		       padid->cFormatTags * sizeof(padid->aFormatTag[0])))
 	goto errCleanUp;
     HeapFree(MSACM_hHeap, 0, key);
@@ -229,11 +229,11 @@
 }
 
 /***********************************************************************
- *           MSACM_RegisterDriver() 
+ *           MSACM_RegisterDriver()
  */
 PWINE_ACMDRIVERID MSACM_RegisterDriver(LPSTR pszDriverAlias, LPSTR pszFileName,
 				       HINSTANCE hinstModule)
-{ 
+{
     PWINE_ACMDRIVERID	padid;
 
     TRACE("('%s', '%s', 0x%08x)\n", pszDriverAlias, pszFileName, hinstModule);
@@ -254,7 +254,7 @@
         strcpy( padid->pszFileName, pszFileName );
     }
     padid->hInstModule = hinstModule;
-	
+
     padid->pACMDriverList = NULL;
     padid->pNextACMDriverID = NULL;
     padid->pPrevACMDriverID = MSACM_pLastACMDriverID;
@@ -273,24 +273,24 @@
 }
 
 /***********************************************************************
- *           MSACM_RegisterAllDrivers() 
+ *           MSACM_RegisterAllDrivers()
  */
 void MSACM_RegisterAllDrivers(void)
 {
     LPSTR pszBuffer;
     DWORD dwBufferLength;
 
-    /* FIXME 
+    /* FIXME
      *  What if the user edits system.ini while the program is running?
      *  Does Windows handle that?
      */
     if (MSACM_pFirstACMDriverID)
 	return;
-    
+
     /* FIXME: Does not work! How do I determine the section length? */
     dwBufferLength = 1024;
 /* EPP 	GetPrivateProfileSectionA("drivers32", NULL, 0, "system.ini"); */
-    
+
     pszBuffer = (LPSTR) HeapAlloc(MSACM_hHeap, 0, dwBufferLength);
     if (GetPrivateProfileSectionA("drivers32", pszBuffer, dwBufferLength, "system.ini")) {
 	char* s = pszBuffer;
@@ -303,11 +303,11 @@
 		    MSACM_RegisterDriver(s, s2 + 1, 0);
 		    *s2 = '=';
 		}
-	    }  
+	    }
 	    s += strlen(s) + 1; /* Either next char or \0 */
 	}
     }
-    
+
     HeapFree(MSACM_hHeap, 0, pszBuffer);
 
     MSACM_RegisterDriver("msacm32.dll", "msacm32.dll", 0);
@@ -319,10 +319,10 @@
 PWINE_ACMDRIVERID MSACM_UnregisterDriver(PWINE_ACMDRIVERID p)
 {
     PWINE_ACMDRIVERID pNextACMDriverID;
-    
+
     while (p->pACMDriverList)
 	acmDriverClose((HACMDRIVER) p->pACMDriverList, 0);
-    
+
     if (p->pszDriverAlias)
 	HeapFree(MSACM_hHeap, 0, p->pszDriverAlias);
     if (p->pszFileName)
@@ -338,11 +338,11 @@
 	p->pPrevACMDriverID->pNextACMDriverID = p->pNextACMDriverID;
     if (p->pNextACMDriverID)
 	p->pNextACMDriverID->pPrevACMDriverID = p->pPrevACMDriverID;
-    
+
     pNextACMDriverID = p->pNextACMDriverID;
-    
+
     HeapFree(MSACM_hHeap, 0, p);
-    
+
     return pNextACMDriverID;
 }
 
@@ -351,7 +351,7 @@
  */
 void MSACM_UnregisterAllDrivers(void)
 {
-    PWINE_ACMDRIVERID p = MSACM_pFirstACMDriverID; 
+    PWINE_ACMDRIVERID p = MSACM_pFirstACMDriverID;
 
     while (p) {
 	MSACM_WriteCache(p);
@@ -373,7 +373,7 @@
 }
 
 /***********************************************************************
- *           MSACM_GetDriverID() 
+ *           MSACM_GetDriverID()
  */
 PWINE_ACMDRIVERID MSACM_GetDriverID(HACMDRIVERID hDriverID)
 {
diff --git a/dlls/msacm/msacm32_main.c b/dlls/msacm/msacm32_main.c
index 80f92f7..a923d45 100644
--- a/dlls/msacm/msacm32_main.c
+++ b/dlls/msacm/msacm32_main.c
@@ -30,13 +30,13 @@
 #include "wineacm.h"
 
 WINE_DEFAULT_DEBUG_CHANNEL(msacm);
-	
+
 /**********************************************************************/
-	
+
 HINSTANCE	MSACM_hInstance32 = 0;
 
 /***********************************************************************
- *           MSACM_LibMain (MSACM32.init) 
+ *           MSACM_LibMain (MSACM32.init)
  */
 BOOL WINAPI MSACM32_LibMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpvReserved)
 {
@@ -110,7 +110,7 @@
     MMRESULT		mmr = MMSYSERR_NOERROR;
 
     TRACE("(0x%08x, %d, %p);\n", hao, uMetric, pMetric);
-    
+
 #define CheckLocal(padid) (!bLocal || ((padid)->fdwSupport & ACMDRIVERDETAILS_SUPPORTF_LOCAL))
 
     switch (uMetric) {
@@ -131,7 +131,7 @@
     case ACM_METRIC_COUNT_LOCAL_CODECS:
 	if (hao) return MMSYSERR_INVALHANDLE;
 	for (padid = MSACM_pFirstACMDriverID; padid; padid = padid->pNextACMDriverID)
-	    if (!(padid->fdwSupport & ACMDRIVERDETAILS_SUPPORTF_DISABLED) && 
+	    if (!(padid->fdwSupport & ACMDRIVERDETAILS_SUPPORTF_DISABLED) &&
 		(padid->fdwSupport & ACMDRIVERDETAILS_SUPPORTF_CODEC) &&
 		CheckLocal(padid))
 		val++;
@@ -144,7 +144,7 @@
     case ACM_METRIC_COUNT_LOCAL_CONVERTERS:
 	if (hao) return MMSYSERR_INVALHANDLE;
 	for (padid = MSACM_pFirstACMDriverID; padid; padid = padid->pNextACMDriverID)
-	    if (!(padid->fdwSupport & ACMDRIVERDETAILS_SUPPORTF_DISABLED) && 
+	    if (!(padid->fdwSupport & ACMDRIVERDETAILS_SUPPORTF_DISABLED) &&
 		 (padid->fdwSupport & ACMDRIVERDETAILS_SUPPORTF_CONVERTER) &&
 		CheckLocal(padid))
 		val++;
@@ -157,8 +157,8 @@
     case ACM_METRIC_COUNT_LOCAL_FILTERS:
 	if (hao) return MMSYSERR_INVALHANDLE;
 	for (padid = MSACM_pFirstACMDriverID; padid; padid = padid->pNextACMDriverID)
-	    if (!(padid->fdwSupport & ACMDRIVERDETAILS_SUPPORTF_DISABLED) && 
-		(padid->fdwSupport & ACMDRIVERDETAILS_SUPPORTF_FILTER) && 
+	    if (!(padid->fdwSupport & ACMDRIVERDETAILS_SUPPORTF_DISABLED) &&
+		(padid->fdwSupport & ACMDRIVERDETAILS_SUPPORTF_FILTER) &&
 		CheckLocal(padid))
 		val++;
 	*(LPDWORD)pMetric = val;
@@ -174,7 +174,7 @@
 		val++;
 	*(LPDWORD)pMetric = val;
 	break;
-    
+
     case ACM_METRIC_MAX_SIZE_FORMAT:
 	if (hao == (HACMOBJ)NULL) {
 	    for (padid = MSACM_pFirstACMDriverID; padid; padid = padid->pNextACMDriverID) {
diff --git a/dlls/msacm/msacm_main.c b/dlls/msacm/msacm_main.c
index be5947c..1d1d017 100644
--- a/dlls/msacm/msacm_main.c
+++ b/dlls/msacm/msacm_main.c
@@ -34,7 +34,7 @@
  * MSACM DLL entry point
  *
  */
-BOOL WINAPI MSACM_DllEntryPoint(DWORD fdwReason, HINSTANCE16 hinstDLL, WORD ds, 
+BOOL WINAPI MSACM_DllEntryPoint(DWORD fdwReason, HINSTANCE16 hinstDLL, WORD ds,
 				WORD wHeapSize, DWORD dwReserved1, WORD wReserved2)
 {
     static HANDLE	hndl;
@@ -210,7 +210,7 @@
 {
   FIXME("(0x%04x, %p, %p, %ld, %ld): stub\n",
     had, paftd, fnCallback, dwInstance, fdwEnum
-  ); 
+  );
   SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
   return MMSYSERR_ERROR;
 }
@@ -255,7 +255,7 @@
  * 		acmFormatSuggest (MSACM.45)
  */
 MMRESULT16 WINAPI acmFormatSuggest16(
-  HACMDRIVER16 had, LPWAVEFORMATEX pwfxSrc, 
+  HACMDRIVER16 had, LPWAVEFORMATEX pwfxSrc,
   LPWAVEFORMATEX pwfxDst, DWORD cbwfxDst, DWORD fdwSuggest)
 {
   FIXME("(0x%04x, %p, %p, %ld, %ld): stub\n",
@@ -358,7 +358,7 @@
  * 		acmStreamSize (MSACM.72)
  */
 MMRESULT16 WINAPI acmStreamSize16(
-  HACMSTREAM16 has, DWORD cbInput, 
+  HACMSTREAM16 has, DWORD cbInput,
   LPDWORD pdwOutputBytes, DWORD fdwSize)
 {
   FIXME("(0x%04x, %ld, %p, %ld): stub\n",
diff --git a/dlls/msacm/msacmdrv.h b/dlls/msacm/msacmdrv.h
index abf36d5..cb8688f 100644
--- a/dlls/msacm/msacmdrv.h
+++ b/dlls/msacm/msacmdrv.h
@@ -36,7 +36,7 @@
 #define MAKE_ACM_VERSION(mjr, mnr, bld) \
   (((long)(mjr)<<24) | ((long)(mnr)<<16) | ((long)bld))
 
-#define ACMDRVOPENDESC_SECTIONNAME_CHARS    
+#define ACMDRVOPENDESC_SECTIONNAME_CHARS
 
 #define ACMDM_DRIVER_NOTIFY             (ACMDM_BASE + 1)
 #define ACMDM_DRIVER_DETAILS            (ACMDM_BASE + 10)
diff --git a/dlls/msacm/msadp32/msadp32.c b/dlls/msacm/msadp32/msadp32.c
index f0f5b9b..aca54f1 100644
--- a/dlls/msacm/msadp32/msadp32.c
+++ b/dlls/msacm/msadp32/msadp32.c
@@ -50,23 +50,23 @@
     return 1;
 }
 
-typedef struct tagAcmAdpcmData 
+typedef struct tagAcmAdpcmData
 {
-    void (*convert)(PACMDRVSTREAMINSTANCE adsi, 
+    void (*convert)(PACMDRVSTREAMINSTANCE adsi,
 		    const unsigned char*, LPDWORD, unsigned char*, LPDWORD);
 } AcmAdpcmData;
 
 /* table to list all supported formats... those are the basic ones. this
  * also helps given a unique index to each of the supported formats
  */
-typedef	struct 
+typedef	struct
 {
     int		nChannels;
     int		nBits;
     int		rate;
 } Format;
 
-static Format PCM_Formats[] = 
+static Format PCM_Formats[] =
 {
     {1,  8,  8000}, {2,  8,  8000}, {1, 16,  8000}, {2, 16,  8000},
     {1,  8, 11025}, {2,  8, 11025}, {1, 16, 11025}, {2, 16, 11025},
@@ -74,9 +74,9 @@
     {1,  8, 44100}, {2,  8, 44100}, {1, 16, 44100}, {2, 16, 44100},
 };
 
-static Format ADPCM_Formats[] = 
+static Format ADPCM_Formats[] =
 {
-    {1,  4,  8000}, {2,	4,  8000},  {1,  4, 11025}, {2,	 4, 11025}, 
+    {1,  4,  8000}, {2,	4,  8000},  {1,  4, 11025}, {2,	 4, 11025},
     {1,  4, 22050}, {2,	4, 22050},  {1,  4, 44100}, {2,	 4, 44100},
 };
 
@@ -102,8 +102,8 @@
 {
     int 	i, hi;
     Format*	fmts;
-    
-    switch (wfx->wFormatTag) 
+
+    switch (wfx->wFormatTag)
     {
     case WAVE_FORMAT_PCM:
 	hi = NUM_PCM_FORMATS;
@@ -116,15 +116,15 @@
     default:
 	return 0xFFFFFFFF;
     }
-    
-    for (i = 0; i < hi; i++) 
+
+    for (i = 0; i < hi; i++)
     {
 	if (wfx->nChannels == fmts[i].nChannels &&
 	    wfx->nSamplesPerSec == fmts[i].rate &&
 	    wfx->wBitsPerSample == fmts[i].nBits)
 	    return i;
     }
-    
+
     return 0xFFFFFFFF;
 }
 
@@ -148,7 +148,7 @@
     }
     pwfx->cbSize = 2 * sizeof(WORD) + 7 * sizeof(ADPCMCOEFSET);
     /* 7 is the size of the block head (which contains two samples) */
-            
+
     awfx->wSamplesPerBlock = (pwfx->nBlockAlign - (7 * pwfx->nChannels)) * (2 / pwfx->nChannels) + 2;
     pwfx->nAvgBytesPerSec = (pwfx->nSamplesPerSec * pwfx->nBlockAlign) / awfx->wSamplesPerBlock;
     awfx->wNumCoef = 7;
@@ -182,7 +182,7 @@
     if (*sample >  32767) *sample =  32767;
 }
 
-static inline void process_nibble(unsigned nibble, int* idelta, 
+static inline void process_nibble(unsigned nibble, int* idelta,
                                   int* sample1, int* sample2,
                                   const ADPCMCOEFSET* coeff)
 {
@@ -191,7 +191,7 @@
 
     /* nibble is in fact a signed 4 bit integer => propagate sign if needed */
     snibble = (nibble & 0x08) ? (nibble - 16) : nibble;
-    sample = ((*sample1 * coeff->iCoef1) + (*sample2 * coeff->iCoef2)) / 256 + 
+    sample = ((*sample1 * coeff->iCoef1) + (*sample2 * coeff->iCoef2)) / 256 +
         snibble * *idelta;
     clamp_sample(&sample);
 
@@ -201,8 +201,8 @@
     if (*idelta < 16) *idelta = 16;
 }
 
-static	void cvtSSms16K(PACMDRVSTREAMINSTANCE adsi, 
-                        const unsigned char* src, LPDWORD nsrc, 
+static	void cvtSSms16K(PACMDRVSTREAMINSTANCE adsi,
+                        const unsigned char* src, LPDWORD nsrc,
                         unsigned char* dst, LPDWORD ndst)
 {
     int                 ideltaL, ideltaR;
@@ -211,17 +211,17 @@
     ADPCMCOEFSET        coeffL, coeffR;
     int                 nsamp;
     int		        nsamp_blk = ((ADPCMWAVEFORMAT*)adsi->pwfxSrc)->wSamplesPerBlock;
-    DWORD	        nblock = min(*nsrc / adsi->pwfxSrc->nBlockAlign, 
+    DWORD	        nblock = min(*nsrc / adsi->pwfxSrc->nBlockAlign,
                                      *ndst / (nsamp_blk * 2 * 2));
-    
+
     *nsrc = nblock * adsi->pwfxSrc->nBlockAlign;
     *ndst = nblock * nsamp_blk * 2 * 2;
 
     nsamp_blk -= 2; /* see below for samples from block head */
-    for (; nblock > 0; nblock--) 
+    for (; nblock > 0; nblock--)
     {
         const unsigned char*    in_src = src;
-        
+
         assert(*src <= 6);
         coeffL = MSADPCM_CoeffSet[*src++];
         assert(*src <= 6);
@@ -246,13 +246,13 @@
             W16(dst, sample1L); dst += 2;
             process_nibble(*src++ & 0x0F, &ideltaR, &sample1R, &sample2R, &coeffR);
             W16(dst, sample1R); dst += 2;
-        }            
+        }
         src = in_src + adsi->pwfxSrc->nBlockAlign;
     }
 }
 
-static	void cvtMMms16K(PACMDRVSTREAMINSTANCE adsi, 
-                        const unsigned char* src, LPDWORD nsrc, 
+static	void cvtMMms16K(PACMDRVSTREAMINSTANCE adsi,
+                        const unsigned char* src, LPDWORD nsrc,
                         unsigned char* dst, LPDWORD ndst)
 {
     int                 idelta;
@@ -260,17 +260,17 @@
     ADPCMCOEFSET        coeff;
     int                 nsamp;
     int		        nsamp_blk = ((ADPCMWAVEFORMAT*)adsi->pwfxSrc)->wSamplesPerBlock;
-    DWORD	        nblock = min(*nsrc / adsi->pwfxSrc->nBlockAlign, 
+    DWORD	        nblock = min(*nsrc / adsi->pwfxSrc->nBlockAlign,
                                      *ndst / (nsamp_blk * 2));
-    
+
     *nsrc = nblock * adsi->pwfxSrc->nBlockAlign;
     *ndst = nblock * nsamp_blk * 2;
 
     nsamp_blk -= 2; /* see below for samples from block head */
-    for (; nblock > 0; nblock--) 
+    for (; nblock > 0; nblock--)
     {
         const unsigned char*    in_src = src;
-        
+
         assert(*src <= 6);
         coeff = MSADPCM_CoeffSet[*src++];
 
@@ -288,20 +288,20 @@
             W16(dst, sample1); dst += 2;
             process_nibble(*src++ & 0x0F, &idelta, &sample1, &sample2, &coeff);
             W16(dst, sample1); dst += 2;
-        }            
+        }
         src = in_src + adsi->pwfxSrc->nBlockAlign;
     }
 }
 
 #if 0
-static	void cvtSS16msK(PACMDRVSTREAMINSTANCE adsi, 
-                        const unsigned char* src, LPDWORD nsrc, 
+static	void cvtSS16msK(PACMDRVSTREAMINSTANCE adsi,
+                        const unsigned char* src, LPDWORD nsrc,
                         unsigned char* dst, LPDWORD ndst)
 {
 }
 
-static	void cvtMM16msK(PACMDRVSTREAMINSTANCE adsi, 
-                        const unsigned char* src, LPDWORD nsrc, 
+static	void cvtMM16msK(PACMDRVSTREAMINSTANCE adsi,
+                        const unsigned char* src, LPDWORD nsrc,
                         unsigned char* dst, LPDWORD ndst)
 {
 }
@@ -332,7 +332,7 @@
     MultiByteToWideChar( CP_ACP, 0, "Refer to LICENSE file", -1,
                          add->szLicensing, sizeof(add->szLicensing)/sizeof(WCHAR) );
     add->szFeatures[0] = 0;
-    
+
     return MMSYSERR_NOERROR;
 }
 
@@ -344,21 +344,21 @@
 {
     static WCHAR szPcm[]={'P','C','M',0};
     static WCHAR szMsAdPcm[]={'M','S',' ','A','d','P','C','M',0};
-    
-    switch (dwQuery) 
+
+    switch (dwQuery)
     {
     case ACM_FORMATTAGDETAILSF_INDEX:
 	if (aftd->dwFormatTagIndex >= 2) return ACMERR_NOTPOSSIBLE;
 	break;
     case ACM_FORMATTAGDETAILSF_LARGESTSIZE:
-	if (aftd->dwFormatTag == WAVE_FORMAT_UNKNOWN) 
+	if (aftd->dwFormatTag == WAVE_FORMAT_UNKNOWN)
         {
             aftd->dwFormatTagIndex = 1; /* WAVE_FORMAT_ADPCM is bigger than PCM */
 	    break;
 	}
 	/* fall thru */
-    case ACM_FORMATTAGDETAILSF_FORMATTAG: 
-	switch (aftd->dwFormatTag) 
+    case ACM_FORMATTAGDETAILSF_FORMATTAG:
+	switch (aftd->dwFormatTag)
         {
 	case WAVE_FORMAT_PCM:	aftd->dwFormatTagIndex = 0; break;
 	case WAVE_FORMAT_ADPCM: aftd->dwFormatTagIndex = 1; break;
@@ -369,9 +369,9 @@
 	WARN("Unsupported query %08lx\n", dwQuery);
 	return MMSYSERR_NOTSUPPORTED;
     }
-    
+
     aftd->fdwSupport = ACMDRIVERDETAILS_SUPPORTF_CODEC;
-    switch (aftd->dwFormatTagIndex) 
+    switch (aftd->dwFormatTagIndex)
     {
     case 0:
 	aftd->dwFormatTag = WAVE_FORMAT_PCM;
@@ -395,14 +395,14 @@
  */
 static	LRESULT	ADPCM_FormatDetails(PACMFORMATDETAILSW afd, DWORD dwQuery)
 {
-    switch (dwQuery) 
+    switch (dwQuery)
     {
     case ACM_FORMATDETAILSF_FORMAT:
 	if (ADPCM_GetFormatIndex(afd->pwfx) == 0xFFFFFFFF) return ACMERR_NOTPOSSIBLE;
 	break;
     case ACM_FORMATDETAILSF_INDEX:
 	afd->pwfx->wFormatTag = afd->dwFormatTag;
-	switch (afd->dwFormatTag) 
+	switch (afd->dwFormatTag)
         {
 	case WAVE_FORMAT_PCM:
 	    if (afd->dwFormatIndex >= NUM_PCM_FORMATS) return ACMERR_NOTPOSSIBLE;
@@ -410,11 +410,11 @@
 	    afd->pwfx->nSamplesPerSec = PCM_Formats[afd->dwFormatIndex].rate;
 	    afd->pwfx->wBitsPerSample = PCM_Formats[afd->dwFormatIndex].nBits;
 	    /* native MSACM uses a PCMWAVEFORMAT structure, so cbSize is not accessible
-	     * afd->pwfx->cbSize = 0; 
+	     * afd->pwfx->cbSize = 0;
 	     */
-	    afd->pwfx->nBlockAlign = 
+	    afd->pwfx->nBlockAlign =
 		(afd->pwfx->nChannels * afd->pwfx->wBitsPerSample) / 8;
-	    afd->pwfx->nAvgBytesPerSec = 
+	    afd->pwfx->nAvgBytesPerSec =
 		afd->pwfx->nSamplesPerSec * afd->pwfx->nBlockAlign;
 	    break;
 	case WAVE_FORMAT_ADPCM:
@@ -433,11 +433,11 @@
 	break;
     default:
 	WARN("Unsupported query %08lx\n", dwQuery);
-	return MMSYSERR_NOTSUPPORTED;	
+	return MMSYSERR_NOTSUPPORTED;
     }
     afd->fdwSupport = ACMDRIVERDETAILS_SUPPORTF_CODEC;
     afd->szFormat[0] = 0; /* let MSACM format this for us... */
-    
+
     return MMSYSERR_NOERROR;
 }
 
@@ -459,21 +459,21 @@
     if (!(adfs->fdwSuggest & ACM_FORMATSUGGESTF_NSAMPLESPERSEC))
         adfs->pwfxDst->nSamplesPerSec = adfs->pwfxSrc->nSamplesPerSec;
 
-    if (!(adfs->fdwSuggest & ACM_FORMATSUGGESTF_WBITSPERSAMPLE)) 
+    if (!(adfs->fdwSuggest & ACM_FORMATSUGGESTF_WBITSPERSAMPLE))
     {
-	if (adfs->pwfxSrc->wFormatTag == WAVE_FORMAT_PCM) 
+	if (adfs->pwfxSrc->wFormatTag == WAVE_FORMAT_PCM)
             adfs->pwfxDst->wBitsPerSample = 4;
         else
             adfs->pwfxDst->wBitsPerSample = 16;
     }
-    if (!(adfs->fdwSuggest & ACM_FORMATSUGGESTF_WFORMATTAG)) 
+    if (!(adfs->fdwSuggest & ACM_FORMATSUGGESTF_WFORMATTAG))
     {
-	if (adfs->pwfxSrc->wFormatTag == WAVE_FORMAT_PCM) 
+	if (adfs->pwfxSrc->wFormatTag == WAVE_FORMAT_PCM)
             adfs->pwfxDst->wFormatTag = WAVE_FORMAT_ADPCM;
         else
             adfs->pwfxDst->wFormatTag = WAVE_FORMAT_PCM;
     }
-        
+
     /* check if result is ok */
     if (ADPCM_GetFormatIndex(adfs->pwfxDst) == 0xFFFFFFFF) return ACMERR_NOTPOSSIBLE;
 
@@ -513,25 +513,25 @@
     unsigned            nspb;
 
     assert(!(adsi->fdwOpen & ACM_STREAMOPENF_ASYNC));
-    
+
     if (ADPCM_GetFormatIndex(adsi->pwfxSrc) == 0xFFFFFFFF ||
 	ADPCM_GetFormatIndex(adsi->pwfxDst) == 0xFFFFFFFF)
 	return ACMERR_NOTPOSSIBLE;
-    
+
     aad = HeapAlloc(GetProcessHeap(), 0, sizeof(AcmAdpcmData));
     if (aad == 0) return MMSYSERR_NOMEM;
-    
+
     adsi->dwDriver = (DWORD)aad;
-    
+
     if (adsi->pwfxSrc->wFormatTag == WAVE_FORMAT_PCM &&
-	adsi->pwfxDst->wFormatTag == WAVE_FORMAT_PCM) 
+	adsi->pwfxDst->wFormatTag == WAVE_FORMAT_PCM)
     {
 	goto theEnd;
     }
     else if (adsi->pwfxSrc->wFormatTag == WAVE_FORMAT_ADPCM &&
-             adsi->pwfxDst->wFormatTag == WAVE_FORMAT_PCM) 
+             adsi->pwfxDst->wFormatTag == WAVE_FORMAT_PCM)
     {
-	/* resampling or mono <=> stereo not available 
+	/* resampling or mono <=> stereo not available
          * ADPCM algo only define 16 bit per sample output
          */
 	if (adsi->pwfxSrc->nSamplesPerSec != adsi->pwfxDst->nSamplesPerSec ||
@@ -552,19 +552,19 @@
 #endif
 
 	/* adpcm decoding... */
-	if (adsi->pwfxDst->wBitsPerSample == 16 && adsi->pwfxDst->nChannels == 2) 
+	if (adsi->pwfxDst->wBitsPerSample == 16 && adsi->pwfxDst->nChannels == 2)
 	    aad->convert = cvtSSms16K;
-	if (adsi->pwfxDst->wBitsPerSample == 16 && adsi->pwfxDst->nChannels == 1) 
+	if (adsi->pwfxDst->wBitsPerSample == 16 && adsi->pwfxDst->nChannels == 1)
 	    aad->convert = cvtMMms16K;
     }
     else if (adsi->pwfxSrc->wFormatTag == WAVE_FORMAT_PCM &&
-             adsi->pwfxDst->wFormatTag == WAVE_FORMAT_ADPCM) 
+             adsi->pwfxDst->wFormatTag == WAVE_FORMAT_ADPCM)
     {
 	if (adsi->pwfxSrc->nSamplesPerSec != adsi->pwfxDst->nSamplesPerSec ||
 	    adsi->pwfxSrc->nChannels != adsi->pwfxDst->nChannels ||
             adsi->pwfxSrc->wBitsPerSample != 16)
 	    goto theEnd;
-#if 0        
+#if 0
         nspb = ((IMAADPCMWAVEFORMAT*)adsi->pwfxDst)->wSamplesPerBlock;
         FIXME("spb=%u\n", nspb);
 
@@ -578,9 +578,9 @@
 #endif
 #if 0
 	/* adpcm coding... */
-	if (adsi->pwfxSrc->wBitsPerSample == 16 && adsi->pwfxSrc->nChannels == 2) 
+	if (adsi->pwfxSrc->wBitsPerSample == 16 && adsi->pwfxSrc->nChannels == 2)
 	    aad->convert = cvtSS16msK;
-	if (adsi->pwfxSrc->wBitsPerSample == 16 && adsi->pwfxSrc->nChannels == 1) 
+	if (adsi->pwfxSrc->wBitsPerSample == 16 && adsi->pwfxSrc->nChannels == 1)
 	    aad->convert = cvtMM16msK;
 #endif
         FIXME("We don't support encoding yet\n");
@@ -590,7 +590,7 @@
     ADPCM_Reset(adsi, aad);
 
     return MMSYSERR_NOERROR;
-    
+
  theEnd:
     HeapFree(GetProcessHeap(), 0, aad);
     adsi->dwDriver = 0L;
@@ -624,23 +624,23 @@
  */
 static	LRESULT ADPCM_StreamSize(PACMDRVSTREAMINSTANCE adsi, PACMDRVSTREAMSIZE adss)
 {
-    switch (adss->fdwSize) 
+    switch (adss->fdwSize)
     {
     case ACM_STREAMSIZEF_DESTINATION:
 	/* cbDstLength => cbSrcLength */
 	if (adsi->pwfxSrc->wFormatTag == WAVE_FORMAT_PCM &&
-	    adsi->pwfxDst->wFormatTag == WAVE_FORMAT_ADPCM) 
+	    adsi->pwfxDst->wFormatTag == WAVE_FORMAT_ADPCM)
         {
 	    /* don't take block overhead into account, doesn't matter too much */
 	    adss->cbSrcLength = adss->cbDstLength * 4;
 	}
         else if (adsi->pwfxSrc->wFormatTag == WAVE_FORMAT_ADPCM &&
-                 adsi->pwfxDst->wFormatTag == WAVE_FORMAT_PCM) 
+                 adsi->pwfxDst->wFormatTag == WAVE_FORMAT_PCM)
         {
 	    FIXME("misses the block header overhead\n");
 	    adss->cbSrcLength = 256 + adss->cbDstLength / 4;
 	}
-        else 
+        else
         {
 	    return MMSYSERR_NOTSUPPORTED;
 	}
@@ -648,25 +648,25 @@
     case ACM_STREAMSIZEF_SOURCE:
 	/* cbSrcLength => cbDstLength */
 	if (adsi->pwfxSrc->wFormatTag == WAVE_FORMAT_PCM &&
-	    adsi->pwfxDst->wFormatTag == WAVE_FORMAT_ADPCM) 
+	    adsi->pwfxDst->wFormatTag == WAVE_FORMAT_ADPCM)
         {
 	    FIXME("misses the block header overhead\n");
 	    adss->cbDstLength = 256 + adss->cbSrcLength / 4;
-	} 
+	}
         else if (adsi->pwfxSrc->wFormatTag == WAVE_FORMAT_ADPCM &&
-                 adsi->pwfxDst->wFormatTag == WAVE_FORMAT_PCM) 
+                 adsi->pwfxDst->wFormatTag == WAVE_FORMAT_PCM)
         {
 	    /* don't take block overhead into account, doesn't matter too much */
 	    adss->cbDstLength = adss->cbSrcLength * 4;
 	}
-        else 
+        else
         {
 	    return MMSYSERR_NOTSUPPORTED;
 	}
 	break;
     default:
 	WARN("Unsupported query %08lx\n", adss->fdwSize);
-	return MMSYSERR_NOTSUPPORTED;	
+	return MMSYSERR_NOTSUPPORTED;
     }
     return MMSYSERR_NOERROR;
 }
@@ -680,11 +680,11 @@
     AcmAdpcmData*	aad = (AcmAdpcmData*)adsi->dwDriver;
     DWORD		nsrc = adsh->cbSrcLength;
     DWORD		ndst = adsh->cbDstLength;
-    
-    if (adsh->fdwConvert & 
+
+    if (adsh->fdwConvert &
 	~(ACM_STREAMCONVERTF_BLOCKALIGN|
 	  ACM_STREAMCONVERTF_END|
-	  ACM_STREAMCONVERTF_START)) 
+	  ACM_STREAMCONVERTF_START))
     {
 	FIXME("Unsupported fdwConvert (%08lx), ignoring it\n", adsh->fdwConvert);
     }
@@ -693,7 +693,7 @@
      * ACM_STREAMCONVERTF_END
      *	no pending data, so do nothing for this flag
      */
-    if ((adsh->fdwConvert & ACM_STREAMCONVERTF_START)) 
+    if ((adsh->fdwConvert & ACM_STREAMCONVERTF_START))
     {
 	ADPCM_Reset(adsi, aad);
     }
@@ -701,60 +701,60 @@
     aad->convert(adsi, adsh->pbSrc, &nsrc, adsh->pbDst, &ndst);
     adsh->cbSrcLengthUsed = nsrc;
     adsh->cbDstLengthUsed = ndst;
-    
+
     return MMSYSERR_NOERROR;
 }
 
 /**************************************************************************
  * 			ADPCM_DriverProc			[exported]
  */
-LRESULT CALLBACK	ADPCM_DriverProc(DWORD dwDevID, HDRVR hDriv, UINT wMsg, 
+LRESULT CALLBACK	ADPCM_DriverProc(DWORD dwDevID, HDRVR hDriv, UINT wMsg,
 					 LPARAM dwParam1, LPARAM dwParam2)
 {
-    TRACE("(%08lx %08lx %04x %08lx %08lx);\n", 
+    TRACE("(%08lx %08lx %04x %08lx %08lx);\n",
 	  dwDevID, (DWORD)hDriv, wMsg, dwParam1, dwParam2);
-    
-    switch (wMsg) 
+
+    switch (wMsg)
     {
     case DRV_LOAD:		return 1;
     case DRV_FREE:		return 1;
     case DRV_OPEN:		return ADPCM_drvOpen((LPSTR)dwParam1);
     case DRV_CLOSE:		return ADPCM_drvClose(dwDevID);
-    case DRV_ENABLE:		return 1;	
+    case DRV_ENABLE:		return 1;
     case DRV_DISABLE:		return 1;
     case DRV_QUERYCONFIGURE:	return 1;
     case DRV_CONFIGURE:		MessageBoxA(0, "MSACM MS ADPCM filter !", "Wine Driver", MB_OK); return 1;
     case DRV_INSTALL:		return DRVCNF_RESTART;
     case DRV_REMOVE:		return DRVCNF_RESTART;
-	
+
     case ACMDM_DRIVER_NOTIFY:
 	/* no caching from other ACM drivers is done so far */
 	return MMSYSERR_NOERROR;
-	
+
     case ACMDM_DRIVER_DETAILS:
 	return ADPCM_DriverDetails((PACMDRIVERDETAILSW)dwParam1);
-	
+
     case ACMDM_FORMATTAG_DETAILS:
 	return ADPCM_FormatTagDetails((PACMFORMATTAGDETAILSW)dwParam1, dwParam2);
-	
+
     case ACMDM_FORMAT_DETAILS:
 	return ADPCM_FormatDetails((PACMFORMATDETAILSW)dwParam1, dwParam2);
-	
+
     case ACMDM_FORMAT_SUGGEST:
 	return ADPCM_FormatSuggest((PACMDRVFORMATSUGGEST)dwParam1);
-	
+
     case ACMDM_STREAM_OPEN:
 	return ADPCM_StreamOpen((PACMDRVSTREAMINSTANCE)dwParam1);
-	
+
     case ACMDM_STREAM_CLOSE:
 	return ADPCM_StreamClose((PACMDRVSTREAMINSTANCE)dwParam1);
-	
+
     case ACMDM_STREAM_SIZE:
 	return ADPCM_StreamSize((PACMDRVSTREAMINSTANCE)dwParam1, (PACMDRVSTREAMSIZE)dwParam2);
-	
+
     case ACMDM_STREAM_CONVERT:
 	return ADPCM_StreamConvert((PACMDRVSTREAMINSTANCE)dwParam1, (PACMDRVSTREAMHEADER)dwParam2);
-	
+
     case ACMDM_HARDWARE_WAVE_CAPS_INPUT:
     case ACMDM_HARDWARE_WAVE_CAPS_OUTPUT:
 	/* this converter is not a hardware driver */
@@ -768,7 +768,7 @@
     case ACMDM_STREAM_UNPREPARE:
 	/* nothing special to do here... so don't do anything */
 	return MMSYSERR_NOERROR;
-	
+
     default:
 	return DefDriverProc(dwDevID, hDriv, wMsg, dwParam1, dwParam2);
     }
diff --git a/dlls/msacm/msg711/msg711.c b/dlls/msacm/msg711/msg711.c
index 696bb36..637eeb9 100644
--- a/dlls/msacm/msg711/msg711.c
+++ b/dlls/msacm/msg711/msg711.c
@@ -48,23 +48,23 @@
     return 1;
 }
 
-typedef struct tagAcmG711Data 
+typedef struct tagAcmG711Data
 {
-    void (*convert)(PACMDRVSTREAMINSTANCE adsi, 
+    void (*convert)(PACMDRVSTREAMINSTANCE adsi,
 		    const unsigned char*, LPDWORD, unsigned char*, LPDWORD);
 } AcmG711Data;
 
 /* table to list all supported formats... those are the basic ones. this
  * also helps given a unique index to each of the supported formats
  */
-typedef	struct 
+typedef	struct
 {
     int		nChannels;
     int		nBits;
     int		rate;
 } Format;
 
-static Format PCM_Formats[] = 
+static Format PCM_Formats[] =
 {
     /*{1,  8,  8000}, {2,  8,  8000}, */{1, 16,  8000}, {2, 16,  8000},
     /*{1,  8, 11025}, {2,  8, 11025}, */{1, 16, 11025}, {2, 16, 11025},
@@ -72,15 +72,15 @@
     /*{1,  8, 44100}, {2,  8, 44100}, */{1, 16, 44100}, {2, 16, 44100},
 };
 
-static Format ALaw_Formats[] = 
+static Format ALaw_Formats[] =
 {
-    {1,  8,  8000}, {2,	8,  8000},  {1,  8, 11025}, {2,	 8, 11025}, 
+    {1,  8,  8000}, {2,	8,  8000},  {1,  8, 11025}, {2,	 8, 11025},
     {1,  8, 22050}, {2,	8, 22050},  {1,  8, 44100}, {2,	 8, 44100},
 };
 
-static Format ULaw_Formats[] = 
+static Format ULaw_Formats[] =
 {
-    {1,  8,  8000}, {2,	8,  8000},  {1,  8, 11025}, {2,	 8, 11025}, 
+    {1,  8,  8000}, {2,	8,  8000},  {1,  8, 11025}, {2,	 8, 11025},
     {1,  8, 22050}, {2,	8, 22050},  {1,  8, 44100}, {2,	 8, 44100},
 };
 
@@ -95,8 +95,8 @@
 {
     int 	i, hi;
     Format*	fmts;
-    
-    switch (wfx->wFormatTag) 
+
+    switch (wfx->wFormatTag)
     {
     case WAVE_FORMAT_PCM:
 	hi = NUM_PCM_FORMATS;
@@ -113,15 +113,15 @@
     default:
 	return 0xFFFFFFFF;
     }
-    
-    for (i = 0; i < hi; i++) 
+
+    for (i = 0; i < hi; i++)
     {
 	if (wfx->nChannels == fmts[i].nChannels &&
 	    wfx->nSamplesPerSec == fmts[i].rate &&
 	    wfx->wBitsPerSample == fmts[i].nBits)
 	    return i;
     }
-    
+
     return 0xFFFFFFFF;
 }
 
@@ -198,7 +198,7 @@
  * bli@cpk.auc.dk
  *
  */
- 
+
 #define	SIGN_BIT	(0x80)		/* Sign bit for a A-law byte. */
 #define	QUANT_MASK	(0xf)		/* Quantization field mask. */
 #define	NSEGS		(8)		/* Number of A-law segments. */
@@ -223,7 +223,7 @@
 	64,	65,	66,	67,	68,	69,	70,	71,
 	72,	73,	74,	75,	76,	77,	78,	79,
 /* corrected:
-	81,	82,	83,	84,	85,	86,	87,	88, 
+	81,	82,	83,	84,	85,	86,	87,	88,
    should be: */
 	80,	82,	83,	84,	85,	86,	87,	88,
 	89,	90,	91,	92,	93,	94,	95,	96,
@@ -261,7 +261,7 @@
     int		size)	        /* changed from "short" *drago* */
 {
     int		i;	/* changed from "short" *drago* */
-    
+
     for (i = 0; i < size; i++) {
         if (val <= *table++)
             return (i);
@@ -295,21 +295,21 @@
     int		mask;	/* changed from "short" *drago* */
     int		seg;	/* changed from "short" *drago* */
     unsigned char	aval;
-    
+
     pcm_val = pcm_val >> 3;
-    
+
     if (pcm_val >= 0) {
         mask = 0xD5;		/* sign (7th) bit = 1 */
     } else {
         mask = 0x55;		/* sign bit = 0 */
         pcm_val = -pcm_val - 1;
     }
-    
+
     /* Convert the scaled magnitude to segment number. */
     seg = search(pcm_val, seg_aend, 8);
-    
+
     /* Combine the sign, segment, and quantization bits. */
-    
+
     if (seg >= 8)		/* out of range, return maximum value. */
         return (unsigned char) (0x7F ^ mask);
     else {
@@ -332,9 +332,9 @@
 {
     int		t;	/* changed from "short" *drago* */
     int		seg;	/* changed from "short" *drago* */
-    
+
     a_val ^= 0x55;
-    
+
     t = (a_val & QUANT_MASK) << 4;
     seg = ((unsigned)a_val & SEG_MASK) >> SEG_SHIFT;
     switch (seg) {
@@ -352,7 +352,7 @@
 }
 #else
 /* EPP (for Wine):
- * this array has been statically generated from the above routine 
+ * this array has been statically generated from the above routine
  */
 static unsigned short _a2l[] = {
 0xEA80, 0xEB80, 0xE880, 0xE980, 0xEE80, 0xEF80, 0xEC80, 0xED80,
@@ -433,7 +433,7 @@
     short		mask;
     short		seg;
     unsigned char	uval;
-    
+
     /* Get the sign and the magnitude of the value. */
     pcm_val = pcm_val >> 2;
     if (pcm_val < 0) {
@@ -444,10 +444,10 @@
     }
     if ( pcm_val > CLIP ) pcm_val = CLIP;		/* clip the magnitude */
     pcm_val += (BIAS >> 2);
-    
+
     /* Convert the scaled magnitude to segment number. */
     seg = search(pcm_val, seg_uend, 8);
-    
+
     /*
      * Combine the sign, segment, quantization bits;
      * and complement the code word.
@@ -474,22 +474,22 @@
 ulaw2linear(unsigned char u_val)
 {
     short		t;
-    
+
     /* Complement to obtain normal u-law value. */
     u_val = ~u_val;
-    
+
     /*
      * Extract and bias the quantization bits. Then
      * shift up by the segment number and subtract out the bias.
      */
     t = ((u_val & QUANT_MASK) << 3) + BIAS;
     t <<= ((unsigned)u_val & SEG_MASK) >> SEG_SHIFT;
-    
+
     return ((u_val & SIGN_BIT) ? (BIAS - t) : (t - BIAS));
 }
 #else
 /* EPP (for Wine):
- * this array has been statically generated from the above routine 
+ * this array has been statically generated from the above routine
  */
 static unsigned short _u2l[] = {
 0x8284, 0x8684, 0x8A84, 0x8E84, 0x9284, 0x9684, 0x9A84, 0x9E84,
@@ -532,7 +532,7 @@
 #endif
 
 /* A-law to u-law conversion */
-static inline unsigned char 
+static inline unsigned char
 alaw2ulaw(unsigned char aval)
 {
     aval &= 0xff;
@@ -551,14 +551,14 @@
 
 /* -------------------------------------------------------------------------------*/
 
-static void cvtXXalaw16K(PACMDRVSTREAMINSTANCE adsi, 
-                         const unsigned char* src, LPDWORD srcsize, 
+static void cvtXXalaw16K(PACMDRVSTREAMINSTANCE adsi,
+                         const unsigned char* src, LPDWORD srcsize,
                          unsigned char* dst, LPDWORD dstsize)
 {
     DWORD       len = min(*srcsize, *dstsize / 2);
     DWORD       i;
     short       w;
-    
+
     *srcsize = len;
     *dstsize = len * 2;
     for (i = 0; i < len; i++)
@@ -568,8 +568,8 @@
     }
 }
 
-static void cvtXX16alawK(PACMDRVSTREAMINSTANCE adsi, 
-                         const unsigned char* src, LPDWORD srcsize, 
+static void cvtXX16alawK(PACMDRVSTREAMINSTANCE adsi,
+                         const unsigned char* src, LPDWORD srcsize,
                          unsigned char* dst, LPDWORD dstsize)
 {
     DWORD       len = min(*srcsize / 2, *dstsize);
@@ -583,8 +583,8 @@
     }
 }
 
-static void cvtXXulaw16K(PACMDRVSTREAMINSTANCE adsi, 
-                         const unsigned char* src, LPDWORD srcsize, 
+static void cvtXXulaw16K(PACMDRVSTREAMINSTANCE adsi,
+                         const unsigned char* src, LPDWORD srcsize,
                          unsigned char* dst, LPDWORD dstsize)
 {
     DWORD       len = min(*srcsize, *dstsize / 2);
@@ -600,8 +600,8 @@
     }
 }
 
-static void cvtXX16ulawK(PACMDRVSTREAMINSTANCE adsi, 
-                         const unsigned char* src, LPDWORD srcsize, 
+static void cvtXX16ulawK(PACMDRVSTREAMINSTANCE adsi,
+                         const unsigned char* src, LPDWORD srcsize,
                          unsigned char* dst, LPDWORD dstsize)
 {
     DWORD       len = min(*srcsize / 2, *dstsize);
@@ -615,8 +615,8 @@
     }
 }
 
-static void cvtXXalawulawK(PACMDRVSTREAMINSTANCE adsi, 
-                           const unsigned char* src, LPDWORD srcsize, 
+static void cvtXXalawulawK(PACMDRVSTREAMINSTANCE adsi,
+                           const unsigned char* src, LPDWORD srcsize,
                            unsigned char* dst, LPDWORD dstsize)
 {
     DWORD       len = min(*srcsize, *dstsize);
@@ -630,8 +630,8 @@
 }
 
 
-static void cvtXXulawalawK(PACMDRVSTREAMINSTANCE adsi, 
-                           const unsigned char* src, LPDWORD srcsize, 
+static void cvtXXulawalawK(PACMDRVSTREAMINSTANCE adsi,
+                           const unsigned char* src, LPDWORD srcsize,
                            unsigned char* dst, LPDWORD dstsize)
 {
     DWORD       len = min(*srcsize, *dstsize);
@@ -669,7 +669,7 @@
     MultiByteToWideChar( CP_ACP, 0, "Refer to LICENSE file", -1,
                          add->szLicensing, sizeof(add->szLicensing)/sizeof(WCHAR) );
     add->szFeatures[0] = 0;
-    
+
     return MMSYSERR_NOERROR;
 }
 
@@ -682,21 +682,21 @@
     static WCHAR szPcm[]={'P','C','M',0};
     static WCHAR szALaw[]={'A','-','L','a','w',0};
     static WCHAR szULaw[]={'U','-','L','a','w',0};
-    
-    switch (dwQuery) 
+
+    switch (dwQuery)
     {
     case ACM_FORMATTAGDETAILSF_INDEX:
 	if (aftd->dwFormatTagIndex >= 3) return ACMERR_NOTPOSSIBLE;
 	break;
     case ACM_FORMATTAGDETAILSF_LARGESTSIZE:
-	if (aftd->dwFormatTag == WAVE_FORMAT_UNKNOWN) 
+	if (aftd->dwFormatTag == WAVE_FORMAT_UNKNOWN)
         {
             aftd->dwFormatTagIndex = 1;
 	    break;
 	}
 	/* fall thru */
-    case ACM_FORMATTAGDETAILSF_FORMATTAG: 
-	switch (aftd->dwFormatTag) 
+    case ACM_FORMATTAGDETAILSF_FORMATTAG:
+	switch (aftd->dwFormatTag)
         {
 	case WAVE_FORMAT_PCM:	aftd->dwFormatTagIndex = 0; break;
 	case WAVE_FORMAT_ALAW:  aftd->dwFormatTagIndex = 1; break;
@@ -708,9 +708,9 @@
 	WARN("Unsupported query %08lx\n", dwQuery);
 	return MMSYSERR_NOTSUPPORTED;
     }
-    
+
     aftd->fdwSupport = ACMDRIVERDETAILS_SUPPORTF_CODEC;
-    switch (aftd->dwFormatTagIndex) 
+    switch (aftd->dwFormatTagIndex)
     {
     case 0:
 	aftd->dwFormatTag = WAVE_FORMAT_PCM;
@@ -740,14 +740,14 @@
  */
 static	LRESULT	G711_FormatDetails(PACMFORMATDETAILSW afd, DWORD dwQuery)
 {
-    switch (dwQuery) 
+    switch (dwQuery)
     {
     case ACM_FORMATDETAILSF_FORMAT:
 	if (G711_GetFormatIndex(afd->pwfx) == 0xFFFFFFFF) return ACMERR_NOTPOSSIBLE;
 	break;
     case ACM_FORMATDETAILSF_INDEX:
 	afd->pwfx->wFormatTag = afd->dwFormatTag;
-	switch (afd->dwFormatTag) 
+	switch (afd->dwFormatTag)
         {
 	case WAVE_FORMAT_PCM:
 	    if (afd->dwFormatIndex >= NUM_PCM_FORMATS) return ACMERR_NOTPOSSIBLE;
@@ -763,7 +763,7 @@
 	    afd->pwfx->nSamplesPerSec = ALaw_Formats[afd->dwFormatIndex].rate;
 	    afd->pwfx->wBitsPerSample = ALaw_Formats[afd->dwFormatIndex].nBits;
 	    afd->pwfx->nBlockAlign = ALaw_Formats[afd->dwFormatIndex].nChannels;
-	    afd->pwfx->nAvgBytesPerSec = afd->pwfx->nSamplesPerSec * afd->pwfx->nChannels; 
+	    afd->pwfx->nAvgBytesPerSec = afd->pwfx->nSamplesPerSec * afd->pwfx->nChannels;
             afd->pwfx->cbSize = 0;
 	    break;
 	case WAVE_FORMAT_MULAW:
@@ -772,7 +772,7 @@
 	    afd->pwfx->nSamplesPerSec = ULaw_Formats[afd->dwFormatIndex].rate;
 	    afd->pwfx->wBitsPerSample = ULaw_Formats[afd->dwFormatIndex].nBits;
 	    afd->pwfx->nBlockAlign = ULaw_Formats[afd->dwFormatIndex].nChannels;
-	    afd->pwfx->nAvgBytesPerSec = afd->pwfx->nSamplesPerSec * afd->pwfx->nChannels; 
+	    afd->pwfx->nAvgBytesPerSec = afd->pwfx->nSamplesPerSec * afd->pwfx->nChannels;
             afd->pwfx->cbSize = 0;
 	    break;
 	default:
@@ -782,11 +782,11 @@
 	break;
     default:
 	WARN("Unsupported query %08lx\n", dwQuery);
-	return MMSYSERR_NOTSUPPORTED;	
+	return MMSYSERR_NOTSUPPORTED;
     }
     afd->fdwSupport = ACMDRIVERDETAILS_SUPPORTF_CODEC;
     afd->szFormat[0] = 0; /* let MSACM format this for us... */
-    
+
     return MMSYSERR_NOERROR;
 }
 
@@ -808,14 +808,14 @@
     if (!(adfs->fdwSuggest & ACM_FORMATSUGGESTF_NSAMPLESPERSEC))
         adfs->pwfxDst->nSamplesPerSec = adfs->pwfxSrc->nSamplesPerSec;
 
-    if (!(adfs->fdwSuggest & ACM_FORMATSUGGESTF_WBITSPERSAMPLE)) 
+    if (!(adfs->fdwSuggest & ACM_FORMATSUGGESTF_WBITSPERSAMPLE))
     {
-	if (adfs->pwfxSrc->wFormatTag == WAVE_FORMAT_PCM) 
+	if (adfs->pwfxSrc->wFormatTag == WAVE_FORMAT_PCM)
             adfs->pwfxDst->wBitsPerSample = 8;
         else
             adfs->pwfxDst->wBitsPerSample = 16;
     }
-    if (!(adfs->fdwSuggest & ACM_FORMATSUGGESTF_WFORMATTAG)) 
+    if (!(adfs->fdwSuggest & ACM_FORMATSUGGESTF_WFORMATTAG))
     {
 	switch (adfs->pwfxSrc->wFormatTag)
         {
@@ -867,25 +867,25 @@
     AcmG711Data*	aad;
 
     assert(!(adsi->fdwOpen & ACM_STREAMOPENF_ASYNC));
-    
+
     if (G711_GetFormatIndex(adsi->pwfxSrc) == 0xFFFFFFFF ||
 	G711_GetFormatIndex(adsi->pwfxDst) == 0xFFFFFFFF)
 	return ACMERR_NOTPOSSIBLE;
-    
+
     aad = HeapAlloc(GetProcessHeap(), 0, sizeof(AcmG711Data));
     if (aad == 0) return MMSYSERR_NOMEM;
-    
+
     adsi->dwDriver = (DWORD)aad;
-    
+
     if (adsi->pwfxSrc->wFormatTag == WAVE_FORMAT_PCM &&
-	adsi->pwfxDst->wFormatTag == WAVE_FORMAT_PCM) 
+	adsi->pwfxDst->wFormatTag == WAVE_FORMAT_PCM)
     {
 	goto theEnd;
     }
     else if (adsi->pwfxSrc->wFormatTag == WAVE_FORMAT_ALAW &&
-             adsi->pwfxDst->wFormatTag == WAVE_FORMAT_PCM) 
+             adsi->pwfxDst->wFormatTag == WAVE_FORMAT_PCM)
     {
-	/* resampling or mono <=> stereo not available 
+	/* resampling or mono <=> stereo not available
          * G711 algo only define 16 bit per sample output
          */
 	if (adsi->pwfxSrc->nSamplesPerSec != adsi->pwfxDst->nSamplesPerSec ||
@@ -898,21 +898,21 @@
 	    aad->convert = cvtXXalaw16K;
     }
     else if (adsi->pwfxSrc->wFormatTag == WAVE_FORMAT_PCM &&
-             adsi->pwfxDst->wFormatTag == WAVE_FORMAT_ALAW) 
+             adsi->pwfxDst->wFormatTag == WAVE_FORMAT_ALAW)
     {
 	if (adsi->pwfxSrc->nSamplesPerSec != adsi->pwfxDst->nSamplesPerSec ||
 	    adsi->pwfxSrc->nChannels != adsi->pwfxDst->nChannels ||
             adsi->pwfxSrc->wBitsPerSample != 16)
 	    goto theEnd;
-        
+
 	/* g711 coding... */
 	if (adsi->pwfxSrc->wBitsPerSample == 16)
 	    aad->convert = cvtXX16alawK;
     }
     else if (adsi->pwfxSrc->wFormatTag == WAVE_FORMAT_MULAW &&
-             adsi->pwfxDst->wFormatTag == WAVE_FORMAT_PCM) 
+             adsi->pwfxDst->wFormatTag == WAVE_FORMAT_PCM)
     {
-	/* resampling or mono <=> stereo not available 
+	/* resampling or mono <=> stereo not available
          * G711 algo only define 16 bit per sample output
          */
 	if (adsi->pwfxSrc->nSamplesPerSec != adsi->pwfxDst->nSamplesPerSec ||
@@ -925,34 +925,34 @@
 	    aad->convert = cvtXXulaw16K;
     }
     else if (adsi->pwfxSrc->wFormatTag == WAVE_FORMAT_PCM &&
-             adsi->pwfxDst->wFormatTag == WAVE_FORMAT_ALAW) 
+             adsi->pwfxDst->wFormatTag == WAVE_FORMAT_ALAW)
     {
 	if (adsi->pwfxSrc->nSamplesPerSec != adsi->pwfxDst->nSamplesPerSec ||
 	    adsi->pwfxSrc->nChannels != adsi->pwfxDst->nChannels ||
             adsi->pwfxSrc->wBitsPerSample != 16)
 	    goto theEnd;
-        
+
 	/* g711 coding... */
 	if (adsi->pwfxSrc->wBitsPerSample == 16)
 	    aad->convert = cvtXX16ulawK;
     }
     else if (adsi->pwfxSrc->wFormatTag == WAVE_FORMAT_MULAW &&
-             adsi->pwfxDst->wFormatTag == WAVE_FORMAT_ALAW) 
+             adsi->pwfxDst->wFormatTag == WAVE_FORMAT_ALAW)
     {
 	if (adsi->pwfxSrc->nSamplesPerSec != adsi->pwfxDst->nSamplesPerSec ||
 	    adsi->pwfxSrc->nChannels != adsi->pwfxDst->nChannels)
 	    goto theEnd;
-        
+
 	/* MU-Law => A-Law... */
         aad->convert = cvtXXulawalawK;
     }
     else if (adsi->pwfxSrc->wFormatTag == WAVE_FORMAT_ALAW &&
-             adsi->pwfxDst->wFormatTag == WAVE_FORMAT_MULAW) 
+             adsi->pwfxDst->wFormatTag == WAVE_FORMAT_MULAW)
     {
 	if (adsi->pwfxSrc->nSamplesPerSec != adsi->pwfxDst->nSamplesPerSec ||
 	    adsi->pwfxSrc->nChannels != adsi->pwfxDst->nChannels)
 	    goto theEnd;
-        
+
 	/* A-Law => MU-Law... */
         aad->convert = cvtXXalawulawK;
     }
@@ -961,7 +961,7 @@
     G711_Reset(adsi, aad);
 
     return MMSYSERR_NOERROR;
-    
+
  theEnd:
     HeapFree(GetProcessHeap(), 0, aad);
     adsi->dwDriver = 0L;
@@ -995,7 +995,7 @@
  */
 static	LRESULT G711_StreamSize(PACMDRVSTREAMINSTANCE adsi, PACMDRVSTREAMSIZE adss)
 {
-    switch (adss->fdwSize) 
+    switch (adss->fdwSize)
     {
     case ACM_STREAMSIZEF_DESTINATION:
 	/* cbDstLength => cbSrcLength */
@@ -1007,7 +1007,7 @@
 	}
         else if ((adsi->pwfxSrc->wFormatTag == WAVE_FORMAT_ALAW ||
                   adsi->pwfxSrc->wFormatTag == WAVE_FORMAT_MULAW) &&
-                 adsi->pwfxDst->wFormatTag == WAVE_FORMAT_PCM) 
+                 adsi->pwfxDst->wFormatTag == WAVE_FORMAT_PCM)
         {
 	    adss->cbSrcLength = adss->cbDstLength * 2;
 	}
@@ -1018,7 +1018,7 @@
         {
 	    adss->cbSrcLength = adss->cbDstLength;
         }
-        else 
+        else
         {
 	    return MMSYSERR_NOTSUPPORTED;
 	}
@@ -1033,7 +1033,7 @@
 	}
         else if ((adsi->pwfxSrc->wFormatTag == WAVE_FORMAT_ALAW ||
                   adsi->pwfxSrc->wFormatTag == WAVE_FORMAT_MULAW) &&
-                 adsi->pwfxDst->wFormatTag == WAVE_FORMAT_PCM) 
+                 adsi->pwfxDst->wFormatTag == WAVE_FORMAT_PCM)
         {
 	    adss->cbDstLength = adss->cbSrcLength / 2;
 	}
@@ -1044,14 +1044,14 @@
         {
 	    adss->cbDstLength = adss->cbSrcLength;
         }
-        else 
+        else
         {
 	    return MMSYSERR_NOTSUPPORTED;
 	}
 	break;
     default:
 	WARN("Unsupported query %08lx\n", adss->fdwSize);
-	return MMSYSERR_NOTSUPPORTED;	
+	return MMSYSERR_NOTSUPPORTED;
     }
     FIXME("\n");
     return MMSYSERR_NOERROR;
@@ -1066,11 +1066,11 @@
     AcmG711Data*	aad = (AcmG711Data*)adsi->dwDriver;
     DWORD		nsrc = adsh->cbSrcLength;
     DWORD		ndst = adsh->cbDstLength;
-    
-    if (adsh->fdwConvert & 
+
+    if (adsh->fdwConvert &
 	~(ACM_STREAMCONVERTF_BLOCKALIGN|
 	  ACM_STREAMCONVERTF_END|
-	  ACM_STREAMCONVERTF_START)) 
+	  ACM_STREAMCONVERTF_START))
     {
 	FIXME("Unsupported fdwConvert (%08lx), ignoring it\n", adsh->fdwConvert);
     }
@@ -1079,7 +1079,7 @@
      * ACM_STREAMCONVERTF_END
      *	no pending data, so do nothing for this flag
      */
-    if ((adsh->fdwConvert & ACM_STREAMCONVERTF_START)) 
+    if ((adsh->fdwConvert & ACM_STREAMCONVERTF_START))
     {
 	G711_Reset(adsi, aad);
     }
@@ -1087,60 +1087,60 @@
     aad->convert(adsi, adsh->pbSrc, &nsrc, adsh->pbDst, &ndst);
     adsh->cbSrcLengthUsed = nsrc;
     adsh->cbDstLengthUsed = ndst;
-    
+
     return MMSYSERR_NOERROR;
 }
 
 /**************************************************************************
  * 			G711_DriverProc			[exported]
  */
-LRESULT CALLBACK	G711_DriverProc(DWORD dwDevID, HDRVR hDriv, UINT wMsg, 
+LRESULT CALLBACK	G711_DriverProc(DWORD dwDevID, HDRVR hDriv, UINT wMsg,
 					 LPARAM dwParam1, LPARAM dwParam2)
 {
-    TRACE("(%08lx %08lx %04x %08lx %08lx);\n", 
+    TRACE("(%08lx %08lx %04x %08lx %08lx);\n",
 	  dwDevID, (DWORD)hDriv, wMsg, dwParam1, dwParam2);
-    
-    switch (wMsg) 
+
+    switch (wMsg)
     {
     case DRV_LOAD:		return 1;
     case DRV_FREE:		return 1;
     case DRV_OPEN:		return G711_drvOpen((LPSTR)dwParam1);
     case DRV_CLOSE:		return G711_drvClose(dwDevID);
-    case DRV_ENABLE:		return 1;	
+    case DRV_ENABLE:		return 1;
     case DRV_DISABLE:		return 1;
     case DRV_QUERYCONFIGURE:	return 1;
     case DRV_CONFIGURE:		MessageBoxA(0, "MS G711 (a-Law & mu-Law) filter !", "Wine Driver", MB_OK); return 1;
     case DRV_INSTALL:		return DRVCNF_RESTART;
     case DRV_REMOVE:		return DRVCNF_RESTART;
-	
+
     case ACMDM_DRIVER_NOTIFY:
 	/* no caching from other ACM drivers is done so far */
 	return MMSYSERR_NOERROR;
-	
+
     case ACMDM_DRIVER_DETAILS:
 	return G711_DriverDetails((PACMDRIVERDETAILSW)dwParam1);
-	
+
     case ACMDM_FORMATTAG_DETAILS:
 	return G711_FormatTagDetails((PACMFORMATTAGDETAILSW)dwParam1, dwParam2);
-	
+
     case ACMDM_FORMAT_DETAILS:
 	return G711_FormatDetails((PACMFORMATDETAILSW)dwParam1, dwParam2);
-	
+
     case ACMDM_FORMAT_SUGGEST:
 	return G711_FormatSuggest((PACMDRVFORMATSUGGEST)dwParam1);
-	
+
     case ACMDM_STREAM_OPEN:
 	return G711_StreamOpen((PACMDRVSTREAMINSTANCE)dwParam1);
-	
+
     case ACMDM_STREAM_CLOSE:
 	return G711_StreamClose((PACMDRVSTREAMINSTANCE)dwParam1);
-	
+
     case ACMDM_STREAM_SIZE:
 	return G711_StreamSize((PACMDRVSTREAMINSTANCE)dwParam1, (PACMDRVSTREAMSIZE)dwParam2);
-	
+
     case ACMDM_STREAM_CONVERT:
 	return G711_StreamConvert((PACMDRVSTREAMINSTANCE)dwParam1, (PACMDRVSTREAMHEADER)dwParam2);
-	
+
     case ACMDM_HARDWARE_WAVE_CAPS_INPUT:
     case ACMDM_HARDWARE_WAVE_CAPS_OUTPUT:
 	/* this converter is not a hardware driver */
@@ -1154,7 +1154,7 @@
     case ACMDM_STREAM_UNPREPARE:
 	/* nothing special to do here... so don't do anything */
 	return MMSYSERR_NOERROR;
-	
+
     default:
 	return DefDriverProc(dwDevID, hDriv, wMsg, dwParam1, dwParam2);
     }
diff --git a/dlls/msacm/pcmconverter.c b/dlls/msacm/pcmconverter.c
index f368538..891995f 100644
--- a/dlls/msacm/pcmconverter.c
+++ b/dlls/msacm/pcmconverter.c
@@ -20,7 +20,7 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  *
  *	FIXME / TODO list
- *	+ most of the computation should be done in fixed point arithmetic 
+ *	+ most of the computation should be done in fixed point arithmetic
  *	  instead of floating point (16 bits for integral part, and 16 bits
  *	  for fractional part for example)
  *	+ implement PCM_FormatSuggest function
@@ -76,13 +76,13 @@
     /* conversion routine, depending if rate conversion is required */
     union {
 	void (*cvtKeepRate)(const unsigned char*, int, unsigned char*);
-	void (*cvtChangeRate)(struct tagAcmPcmData*, const unsigned char*, 
+	void (*cvtChangeRate)(struct tagAcmPcmData*, const unsigned char*,
 			      LPDWORD, unsigned char*, LPDWORD);
     } cvt;
     /* the following fields are used only with rate conversion) */
     DWORD	srcPos;		/* position in source stream */
     double	dstPos;		/* position in destination stream */
-    double	dstIncr;	/* value to increment dst stream when src stream 
+    double	dstIncr;	/* value to increment dst stream when src stream
 				   is incremented by 1 */
     /* last source stream value read */
     union {
@@ -111,7 +111,7 @@
 static	DWORD	PCM_GetFormatIndex(LPWAVEFORMATEX wfx)
 {
     int i;
-    
+
     for (i = 0; i < NUM_PCM_FORMATS; i++) {
 	if (wfx->nChannels == PCM_Formats[i].nChannels &&
 	    wfx->nSamplesPerSec == PCM_Formats[i].rate &&
@@ -132,7 +132,7 @@
  * mono => stereo: copy the same sample on Left & Right channels
  * stereo =) mono: use the average value of samples from Left & Right channels
  * resampling; we lookup for each destination sample the two source adjacent samples
- * 	were src <= dst < src+1 (dst is increased by a fractional value which is 
+ * 	were src <= dst < src+1 (dst is increased by a fractional value which is
  *	equivalent to the increment by one on src); then we use a linear
  *	interpolation between src and src+1
  */
@@ -142,7 +142,7 @@
  *
  * Converts a 8 bit sample to a 16 bit one
  */
-static inline short C816(unsigned char b) 
+static inline short C816(unsigned char b)
 {
     return (short)(b ^ 0x80) * 256;
 }
@@ -152,7 +152,7 @@
  *
  * Converts a 16 bit sample to a 8 bit one (data loss !!)
  */
-static inline unsigned char C168(short s) 
+static inline unsigned char C168(short s)
 {
     return HIBYTE(s) ^ (unsigned char)0x80;
 }
@@ -181,7 +181,7 @@
 /***********************************************************************
  *           M16
  *
- * Convert the (l,r) 16 bit stereo sample into a 16 bit mono 
+ * Convert the (l,r) 16 bit stereo sample into a 16 bit mono
  * (takes the mid-point of the two values)
  */
 static inline short M16(short l, short r)
@@ -192,7 +192,7 @@
 /***********************************************************************
  *           M8
  *
- * Convert the (l,r) 8 bit stereo sample into a 8 bit mono 
+ * Convert the (l,r) 8 bit stereo sample into a 8 bit mono
  * (takes the mid-point of the two values)
  */
 static inline unsigned char M8(unsigned char a, unsigned char b)
@@ -242,7 +242,7 @@
 static	void cvtMS816K(const unsigned char* src, int ns, unsigned char* dst)
 {
     short	v;
-    
+
     while (ns--) {
 	v = C816(*src++);
 	W16(dst, v);		dst += 2;
@@ -253,7 +253,7 @@
 static	void cvtMS168K(const unsigned char* src, int ns, unsigned char* dst)
 {
     unsigned char v;
-    
+
     while (ns--) {
 	v = C168(R16(src));		src += 2;
 	*dst++ = v;
@@ -283,7 +283,7 @@
 static	void cvtSM816K(const unsigned char* src, int ns, unsigned char* dst)
 {
     short	v;
-    
+
     while (ns--) {
 	v = M16(C816(src[0]), C816(src[1]));
 	src += 2;
@@ -356,7 +356,7 @@
     return (1.0 - r) * v1 + r * v2;
 }
 
-static	void cvtSS88C(AcmPcmData* apd, const unsigned char* src, LPDWORD nsrc, 
+static	void cvtSS88C(AcmPcmData* apd, const unsigned char* src, LPDWORD nsrc,
 		      unsigned char* dst, LPDWORD ndst)
 {
     double     		r;
@@ -385,7 +385,7 @@
  * <M> is the number of bits of output channel (8 or 16)
  *
  */
-static	void cvtSM88C(AcmPcmData* apd, const unsigned char* src, LPDWORD nsrc, 
+static	void cvtSM88C(AcmPcmData* apd, const unsigned char* src, LPDWORD nsrc,
 		      unsigned char* dst, LPDWORD ndst)
 {
     double   	r;
@@ -405,7 +405,7 @@
     }
 }
 
-static	void cvtMS88C(AcmPcmData* apd, const unsigned char* src, LPDWORD nsrc, 
+static	void cvtMS88C(AcmPcmData* apd, const unsigned char* src, LPDWORD nsrc,
 		      unsigned char* dst, LPDWORD ndst)
 {
     double	r;
@@ -425,7 +425,7 @@
     }
 }
 
-static	void cvtMM88C(AcmPcmData* apd, const unsigned char* src, LPDWORD nsrc, 
+static	void cvtMM88C(AcmPcmData* apd, const unsigned char* src, LPDWORD nsrc,
 		      unsigned char* dst, LPDWORD ndst)
 {
     double     	r;
@@ -444,11 +444,11 @@
     }
 }
 
-static	void cvtSS816C(AcmPcmData* apd, const unsigned char* src, LPDWORD nsrc, 
+static	void cvtSS816C(AcmPcmData* apd, const unsigned char* src, LPDWORD nsrc,
 		       unsigned char* dst, LPDWORD ndst)
 {
     double	r;
-	
+
     while (*nsrc != 0 && *ndst != 0) {
 	while ((r = (double)apd->srcPos - apd->dstPos) <= 0) {
 	    if (*nsrc == 0) return;
@@ -465,7 +465,7 @@
     }
 }
 
-static	void cvtSM816C(AcmPcmData* apd, const unsigned char* src, LPDWORD nsrc, 
+static	void cvtSM816C(AcmPcmData* apd, const unsigned char* src, LPDWORD nsrc,
 			unsigned char* dst, LPDWORD ndst)
 {
     double     	r;
@@ -487,7 +487,7 @@
     }
 }
 
-static	void cvtMS816C(AcmPcmData* apd, const unsigned char* src, LPDWORD nsrc, 
+static	void cvtMS816C(AcmPcmData* apd, const unsigned char* src, LPDWORD nsrc,
 			unsigned char* dst, LPDWORD ndst)
 {
     double     	r;
@@ -509,7 +509,7 @@
     }
 }
 
-static	void cvtMM816C(AcmPcmData* apd, const unsigned char* src, LPDWORD nsrc, 
+static	void cvtMM816C(AcmPcmData* apd, const unsigned char* src, LPDWORD nsrc,
 			unsigned char* dst, LPDWORD ndst)
 {
     double     	r;
@@ -529,7 +529,7 @@
     }
 }
 
-static	void cvtSS168C(AcmPcmData* apd, const unsigned char* src, LPDWORD nsrc, 
+static	void cvtSS168C(AcmPcmData* apd, const unsigned char* src, LPDWORD nsrc,
 			unsigned char* dst, LPDWORD ndst)
 {
     double     	r;
@@ -550,7 +550,7 @@
     }
 }
 
-static	void cvtSM168C(AcmPcmData* apd, const unsigned char* src, LPDWORD nsrc, 
+static	void cvtSM168C(AcmPcmData* apd, const unsigned char* src, LPDWORD nsrc,
 			unsigned char* dst, LPDWORD ndst)
 {
     double     	r;
@@ -564,7 +564,7 @@
 	    (*nsrc)--;
 	}
 	/* now do the interpolation */
-	*dst++ = C168(I(M16(apd->last[0].s, apd->last[1].s), 
+	*dst++ = C168(I(M16(apd->last[0].s, apd->last[1].s),
 			M16(R16(src), R16(src + 2)), r));
 	apd->dstPos += apd->dstIncr;
 	(*ndst)--;
@@ -572,7 +572,7 @@
 }
 
 
-static	void cvtMS168C(AcmPcmData* apd, const unsigned char* src, LPDWORD nsrc, 
+static	void cvtMS168C(AcmPcmData* apd, const unsigned char* src, LPDWORD nsrc,
 			unsigned char* dst, LPDWORD ndst)
 {
     double     	r;
@@ -592,7 +592,7 @@
 }
 
 
-static	void cvtMM168C(AcmPcmData* apd, const unsigned char* src, LPDWORD nsrc, 
+static	void cvtMM168C(AcmPcmData* apd, const unsigned char* src, LPDWORD nsrc,
 			unsigned char* dst, LPDWORD ndst)
 {
     double     	r;
@@ -611,7 +611,7 @@
     }
 }
 
-static	void cvtSS1616C(AcmPcmData* apd, const unsigned char* src, LPDWORD nsrc, 
+static	void cvtSS1616C(AcmPcmData* apd, const unsigned char* src, LPDWORD nsrc,
 			unsigned char* dst, LPDWORD ndst)
 {
     double     	r;
@@ -632,7 +632,7 @@
     }
 }
 
-static	void cvtSM1616C(AcmPcmData* apd, const unsigned char* src, LPDWORD nsrc, 
+static	void cvtSM1616C(AcmPcmData* apd, const unsigned char* src, LPDWORD nsrc,
 			unsigned char* dst, LPDWORD ndst)
 {
     double     	r;
@@ -654,7 +654,7 @@
     }
 }
 
-static	void cvtMS1616C(AcmPcmData* apd, const unsigned char* src, LPDWORD nsrc, 
+static	void cvtMS1616C(AcmPcmData* apd, const unsigned char* src, LPDWORD nsrc,
 			unsigned char* dst, LPDWORD ndst)
 {
     double     	r;
@@ -676,7 +676,7 @@
     }
 }
 
-static	void cvtMM1616C(AcmPcmData* apd, const unsigned char* src, LPDWORD nsrc, 
+static	void cvtMM1616C(AcmPcmData* apd, const unsigned char* src, LPDWORD nsrc,
 			unsigned char* dst, LPDWORD ndst)
 {
     double     	r;
@@ -695,8 +695,8 @@
     }
 }
 
-static	void (*PCM_ConvertChangeRate[16])(AcmPcmData* apd, 
-					  const unsigned char* src, LPDWORD nsrc, 
+static	void (*PCM_ConvertChangeRate[16])(AcmPcmData* apd,
+					  const unsigned char* src, LPDWORD nsrc,
 					  unsigned char* dst, LPDWORD ndst) = {
     cvtSS88C,   cvtSM88C,   cvtMS88C,   cvtMM88C,
     cvtSS816C,	cvtSM816C,  cvtMS816C,  cvtMM816C,
@@ -729,7 +729,7 @@
     MultiByteToWideChar( CP_ACP, 0, "Refer to LICENSE file", -1,
                          add->szLicensing, sizeof(add->szLicensing)/sizeof(WCHAR) );
     add->szFeatures[0] = 0;
-    
+
     return MMSYSERR_NOERROR;
 }
 
@@ -743,11 +743,11 @@
     case ACM_FORMATTAGDETAILSF_INDEX:
 	if (aftd->dwFormatTagIndex != 0) return ACMERR_NOTPOSSIBLE;
 	break;
-    case ACM_FORMATTAGDETAILSF_FORMATTAG: 
+    case ACM_FORMATTAGDETAILSF_FORMATTAG:
 	if (aftd->dwFormatTag != WAVE_FORMAT_PCM) return ACMERR_NOTPOSSIBLE;
 	break;
     case ACM_FORMATTAGDETAILSF_LARGESTSIZE:
-	if (aftd->dwFormatTag != WAVE_FORMAT_UNKNOWN && 
+	if (aftd->dwFormatTag != WAVE_FORMAT_UNKNOWN &&
 	    aftd->dwFormatTag != WAVE_FORMAT_PCM)
 	    return ACMERR_NOTPOSSIBLE;
 	break;
@@ -755,14 +755,14 @@
 	WARN("Unsupported query %08lx\n", dwQuery);
 	return MMSYSERR_NOTSUPPORTED;
     }
-    
+
     aftd->dwFormatTagIndex = 0;
     aftd->dwFormatTag = WAVE_FORMAT_PCM;
     aftd->cbFormatSize = sizeof(PCMWAVEFORMAT);
     aftd->fdwSupport = ACMDRIVERDETAILS_SUPPORTF_CONVERTER;
     aftd->cStandardFormats = NUM_PCM_FORMATS;
     aftd->szFormatTag[0] = 0;
-    
+
     return MMSYSERR_NOERROR;
 }
 
@@ -783,18 +783,18 @@
 	afd->pwfx->nSamplesPerSec = PCM_Formats[afd->dwFormatIndex].rate;
 	afd->pwfx->wBitsPerSample = PCM_Formats[afd->dwFormatIndex].nBits;
 	/* native MSACM uses a PCMWAVEFORMAT structure, so cbSize is not accessible
-	 * afd->pwfx->cbSize = 0; 
+	 * afd->pwfx->cbSize = 0;
 	 */
-	afd->pwfx->nBlockAlign = 
+	afd->pwfx->nBlockAlign =
 	    (afd->pwfx->nChannels * afd->pwfx->wBitsPerSample) / 8;
-	afd->pwfx->nAvgBytesPerSec = 
+	afd->pwfx->nAvgBytesPerSec =
 	    afd->pwfx->nSamplesPerSec * afd->pwfx->nBlockAlign;
 	break;
     default:
 	WARN("Unsupported query %08lx\n", dwQuery);
-	return MMSYSERR_NOTSUPPORTED;	
+	return MMSYSERR_NOTSUPPORTED;
     }
-    
+
     afd->dwFormatTag = WAVE_FORMAT_PCM;
     afd->fdwSupport = ACMDRIVERDETAILS_SUPPORTF_CONVERTER;
     afd->szFormat[0] = 0; /* let MSACM format this for us... */
@@ -866,7 +866,7 @@
     int		idx = 0;
 
     assert(!(adsi->fdwOpen & ACM_STREAMOPENF_ASYNC));
-    
+
     if (PCM_GetFormatIndex(adsi->pwfxSrc) == 0xFFFFFFFF ||
 	PCM_GetFormatIndex(adsi->pwfxDst) == 0xFFFFFFFF)
 	return ACMERR_NOTPOSSIBLE;
@@ -876,7 +876,7 @@
 
     adsi->dwDriver = (DWORD)apd;
     adsi->fdwDriver = 0;
-    
+
     if (adsi->pwfxSrc->wBitsPerSample == 16) idx += 8;
     if (adsi->pwfxDst->wBitsPerSample == 16) idx += 4;
     if (adsi->pwfxSrc->nChannels      == 1)  idx += 2;
@@ -929,18 +929,18 @@
     case ACM_STREAMSIZEF_DESTINATION:
 	/* cbDstLength => cbSrcLength */
 	adss->cbSrcLength = PCM_round(adss->cbDstLength & dstMask,
-				      adsi->pwfxSrc->nAvgBytesPerSec, 
+				      adsi->pwfxSrc->nAvgBytesPerSec,
 				      adsi->pwfxDst->nAvgBytesPerSec) & srcMask;
 	break;
     case ACM_STREAMSIZEF_SOURCE:
 	/* cbSrcLength => cbDstLength */
 	adss->cbDstLength =  PCM_round(adss->cbSrcLength & srcMask,
-				       adsi->pwfxDst->nAvgBytesPerSec, 
+				       adsi->pwfxDst->nAvgBytesPerSec,
 				       adsi->pwfxSrc->nAvgBytesPerSec) & dstMask;
 	break;
     default:
 	WARN("Unsupported query %08lx\n", adss->fdwSize);
-	return MMSYSERR_NOTSUPPORTED;	
+	return MMSYSERR_NOTSUPPORTED;
     }
     return MMSYSERR_NOERROR;
 }
@@ -955,7 +955,7 @@
     DWORD	nsrc = NUM_OF(adsh->cbSrcLength, adsi->pwfxSrc->nBlockAlign);
     DWORD	ndst = NUM_OF(adsh->cbDstLength, adsi->pwfxDst->nBlockAlign);
 
-    if (adsh->fdwConvert & 
+    if (adsh->fdwConvert &
 	~(ACM_STREAMCONVERTF_BLOCKALIGN|
 	  ACM_STREAMCONVERTF_END|
 	  ACM_STREAMCONVERTF_START)) {
@@ -966,7 +966,7 @@
      * ACM_STREAMCONVERTF_END
      *	no pending data, so do nothing for this flag
      */
-    if ((adsh->fdwConvert & ACM_STREAMCONVERTF_START) && 
+    if ((adsh->fdwConvert & ACM_STREAMCONVERTF_START) &&
 	(adsi->fdwDriver & PCM_RESAMPLE)) {
 	PCM_Reset(apd, adsi->pwfxSrc->wBitsPerSample);
     }
@@ -995,52 +995,52 @@
 /**************************************************************************
  * 			DriverProc (MSACM32.@)
  */
-LRESULT CALLBACK	PCM_DriverProc(DWORD dwDevID, HDRVR hDriv, UINT wMsg, 
+LRESULT CALLBACK	PCM_DriverProc(DWORD dwDevID, HDRVR hDriv, UINT wMsg,
 				       LPARAM dwParam1, LPARAM dwParam2)
 {
-    TRACE("(%08lx %08lx %u %08lx %08lx);\n", 
+    TRACE("(%08lx %08lx %u %08lx %08lx);\n",
 	  dwDevID, (DWORD)hDriv, wMsg, dwParam1, dwParam2);
-    
+
     switch (wMsg) {
     case DRV_LOAD:		return 1;
     case DRV_FREE:		return 1;
     case DRV_OPEN:		return PCM_drvOpen((LPSTR)dwParam1, (PACMDRVOPENDESCW)dwParam2);
     case DRV_CLOSE:		return PCM_drvClose(dwDevID);
-    case DRV_ENABLE:		return 1;	
+    case DRV_ENABLE:		return 1;
     case DRV_DISABLE:		return 1;
     case DRV_QUERYCONFIGURE:	return 1;
     case DRV_CONFIGURE:		MessageBoxA(0, "MSACM PCM filter !", "Wine Driver", MB_OK); return 1;
     case DRV_INSTALL:		return DRVCNF_RESTART;
     case DRV_REMOVE:		return DRVCNF_RESTART;
-	
+
     case ACMDM_DRIVER_NOTIFY:
 	/* no caching from other ACM drivers is done so far */
 	return MMSYSERR_NOERROR;
-	
+
     case ACMDM_DRIVER_DETAILS:
 	return PCM_DriverDetails((PACMDRIVERDETAILSW)dwParam1);
-	
+
     case ACMDM_FORMATTAG_DETAILS:
 	return PCM_FormatTagDetails((PACMFORMATTAGDETAILSW)dwParam1, dwParam2);
-	
+
     case ACMDM_FORMAT_DETAILS:
 	return PCM_FormatDetails((PACMFORMATDETAILSW)dwParam1, dwParam2);
-	
+
     case ACMDM_FORMAT_SUGGEST:
 	return PCM_FormatSuggest((PACMDRVFORMATSUGGEST)dwParam1);
-	
+
     case ACMDM_STREAM_OPEN:
 	return PCM_StreamOpen((PACMDRVSTREAMINSTANCE)dwParam1);
-	
+
     case ACMDM_STREAM_CLOSE:
 	return PCM_StreamClose((PACMDRVSTREAMINSTANCE)dwParam1);
-	
+
     case ACMDM_STREAM_SIZE:
 	return PCM_StreamSize((PACMDRVSTREAMINSTANCE)dwParam1, (PACMDRVSTREAMSIZE)dwParam2);
-	
+
     case ACMDM_STREAM_CONVERT:
 	return PCM_StreamConvert((PACMDRVSTREAMINSTANCE)dwParam1, (PACMDRVSTREAMHEADER)dwParam2);
-	
+
     case ACMDM_HARDWARE_WAVE_CAPS_INPUT:
     case ACMDM_HARDWARE_WAVE_CAPS_OUTPUT:
 	/* this converter is not a hardware driver */
@@ -1053,7 +1053,7 @@
     case ACMDM_STREAM_UNPREPARE:
 	/* nothing special to do here... so don't do anything */
 	return MMSYSERR_NOTSUPPORTED;
-	
+
     default:
 	return DefDriverProc(dwDevID, hDriv, wMsg, dwParam1, dwParam2);
     }
diff --git a/dlls/msacm/stream.c b/dlls/msacm/stream.c
index 62d4d2c..9597025 100644
--- a/dlls/msacm/stream.c
+++ b/dlls/msacm/stream.c
@@ -39,7 +39,7 @@
 #include "wineacm.h"
 
 WINE_DEFAULT_DEBUG_CHANNEL(msacm);
-    
+
 static PWINE_ACMSTREAM	ACM_GetStream(HACMSTREAM has)
 {
     return (PWINE_ACMSTREAM)has;
@@ -52,16 +52,16 @@
 {
     PWINE_ACMSTREAM	was;
     MMRESULT		ret;
-		
+
     TRACE("(0x%08x, %ld)\n", has, fdwClose);
-    
+
     if ((was = ACM_GetStream(has)) == NULL) {
 	return MMSYSERR_INVALHANDLE;
     }
     ret = SendDriverMessage(was->pDrv->hDrvr, ACMDM_STREAM_CLOSE, (DWORD)&was->drvInst, 0);
     if (ret == MMSYSERR_NOERROR) {
 	if (was->hAcmDriver)
-	    acmDriverClose(was->hAcmDriver, 0L);	
+	    acmDriverClose(was->hAcmDriver, 0L);
 	HeapFree(MSACM_hHeap, 0, was);
     }
     TRACE("=> (%d)\n", ret);
@@ -71,7 +71,7 @@
 /***********************************************************************
  *           acmStreamConvert (MSACM32.@)
  */
-MMRESULT WINAPI acmStreamConvert(HACMSTREAM has, PACMSTREAMHEADER pash, 
+MMRESULT WINAPI acmStreamConvert(HACMSTREAM has, PACMSTREAMHEADER pash,
 				 DWORD fdwConvert)
 {
     PWINE_ACMSTREAM	was;
@@ -79,7 +79,7 @@
     PACMDRVSTREAMHEADER	padsh;
 
     TRACE("(0x%08x, %p, %ld)\n", has, pash, fdwConvert);
-    
+
     if ((was = ACM_GetStream(has)) == NULL)
 	return MMSYSERR_INVALHANDLE;
     if (!pash || pash->cbStruct < sizeof(ACMSTREAMHEADER))
@@ -100,7 +100,7 @@
 	padsh->pbPreparedDst != padsh->pbDst ||
 	padsh->cbPreparedDstLength < padsh->cbDstLength) {
 	return MMSYSERR_INVALPARAM;
-    }	
+    }
 
     padsh->fdwConvert = fdwConvert;
 
@@ -115,7 +115,7 @@
 /***********************************************************************
  *           acmStreamMessage (MSACM32.@)
  */
-MMRESULT WINAPI acmStreamMessage(HACMSTREAM has, UINT uMsg, LPARAM lParam1, 
+MMRESULT WINAPI acmStreamMessage(HACMSTREAM has, UINT uMsg, LPARAM lParam1,
 				 LPARAM lParam2)
 {
     FIXME("(0x%08x, %u, %ld, %ld): stub\n", has, uMsg, lParam1, lParam2);
@@ -135,16 +135,16 @@
     MMRESULT		ret;
     int			wfxSrcSize;
     int			wfxDstSize;
-    
+
     TRACE("(%p, 0x%08x, %p, %p, %p, %ld, %ld, %ld)\n",
 	  phas, had, pwfxSrc, pwfxDst, pwfltr, dwCallback, dwInstance, fdwOpen);
 
-    TRACE("src [wFormatTag=%u, nChannels=%u, nSamplesPerSec=%lu, nAvgBytesPerSec=%lu, nBlockAlign=%u, wBitsPerSample=%u, cbSize=%u]\n", 
-	  pwfxSrc->wFormatTag, pwfxSrc->nChannels, pwfxSrc->nSamplesPerSec, pwfxSrc->nAvgBytesPerSec, 
+    TRACE("src [wFormatTag=%u, nChannels=%u, nSamplesPerSec=%lu, nAvgBytesPerSec=%lu, nBlockAlign=%u, wBitsPerSample=%u, cbSize=%u]\n",
+	  pwfxSrc->wFormatTag, pwfxSrc->nChannels, pwfxSrc->nSamplesPerSec, pwfxSrc->nAvgBytesPerSec,
 	  pwfxSrc->nBlockAlign, pwfxSrc->wBitsPerSample, pwfxSrc->cbSize);
 
-    TRACE("dst [wFormatTag=%u, nChannels=%u, nSamplesPerSec=%lu, nAvgBytesPerSec=%lu, nBlockAlign=%u, wBitsPerSample=%u, cbSize=%u]\n", 
-	  pwfxDst->wFormatTag, pwfxDst->nChannels, pwfxDst->nSamplesPerSec, pwfxDst->nAvgBytesPerSec, 
+    TRACE("dst [wFormatTag=%u, nChannels=%u, nSamplesPerSec=%lu, nAvgBytesPerSec=%lu, nBlockAlign=%u, wBitsPerSample=%u, cbSize=%u]\n",
+	  pwfxDst->wFormatTag, pwfxDst->nChannels, pwfxDst->nSamplesPerSec, pwfxDst->nAvgBytesPerSec,
 	  pwfxDst->nBlockAlign, pwfxDst->wBitsPerSample, pwfxDst->cbSize);
 
     if ((fdwOpen & ACM_STREAMOPENF_QUERY) && phas) return MMSYSERR_INVALPARAM;
@@ -154,11 +154,11 @@
     if (pwfxSrc->wFormatTag != WAVE_FORMAT_PCM) wfxSrcSize += pwfxSrc->cbSize;
     if (pwfxDst->wFormatTag != WAVE_FORMAT_PCM) wfxDstSize += pwfxDst->cbSize;
 
-    was = HeapAlloc(MSACM_hHeap, 0, sizeof(*was) + wfxSrcSize + wfxDstSize + 
+    was = HeapAlloc(MSACM_hHeap, 0, sizeof(*was) + wfxSrcSize + wfxDstSize +
 		    ((pwfltr) ? sizeof(WAVEFILTER) : 0));
     if (was == NULL)
 	return MMSYSERR_NOMEM;
-    
+
     was->drvInst.cbStruct = sizeof(was->drvInst);
     was->drvInst.pwfxSrc = (PWAVEFORMATEX)((LPSTR)was + sizeof(*was));
     memcpy(was->drvInst.pwfxSrc, pwfxSrc, wfxSrcSize);
@@ -170,20 +170,20 @@
     } else {
 	was->drvInst.pwfltr = NULL;
     }
-    was->drvInst.dwCallback = dwCallback;    
+    was->drvInst.dwCallback = dwCallback;
     was->drvInst.dwInstance = dwInstance;
     was->drvInst.fdwOpen = fdwOpen;
-    was->drvInst.fdwDriver = 0L;  
-    was->drvInst.dwDriver = 0L;     
+    was->drvInst.fdwDriver = 0L;
+    was->drvInst.dwDriver = 0L;
     /* real value will be stored once ACMDM_STREAM_OPEN succeeds */
     was->drvInst.has = 0L;
-    
+
     if (had) {
 	if (!(wad = MSACM_GetDriver(had))) {
 	    ret = MMSYSERR_INVALPARAM;
 	    goto errCleanUp;
 	}
-	
+
 	was->obj.dwType = WINE_ACMOBJ_STREAM;
 	was->obj.pACMDriverID = wad->obj.pACMDriverID;
 	was->pDrv = wad;
@@ -194,10 +194,10 @@
 	    goto errCleanUp;
     } else {
 	PWINE_ACMDRIVERID wadi;
-	
+
 	ret = ACMERR_NOTPOSSIBLE;
 	for (wadi = MSACM_pFirstACMDriverID; wadi; wadi = wadi->pNextACMDriverID) {
-	    if ((wadi->fdwSupport & ACMDRIVERDETAILS_SUPPORTF_DISABLED) || 
+	    if ((wadi->fdwSupport & ACMDRIVERDETAILS_SUPPORTF_DISABLED) ||
 		!MSACM_FindFormatTagInCache(wadi, pwfxSrc->wFormatTag, NULL) ||
 		!MSACM_FindFormatTagInCache(wadi, pwfxDst->wFormatTag, NULL))
 		continue;
@@ -209,7 +209,7 @@
 		was->obj.pACMDriverID = wad->obj.pACMDriverID;
 		was->pDrv = wad;
 		was->hAcmDriver = had;
-		
+
 		ret = SendDriverMessage(wad->hDrvr, ACMDM_STREAM_OPEN, (DWORD)&was->drvInst, 0L);
 		TRACE("%s => %08x\n", wadi->pszDriverAlias, ret);
 		if (ret == MMSYSERR_NOERROR) {
@@ -235,7 +235,7 @@
 	TRACE("=> (%d)\n", ret);
 	return ret;
     }
-errCleanUp:		
+errCleanUp:
     if (phas)
 	*phas = (HACMSTREAM)0;
     HeapFree(MSACM_hHeap, 0, was);
@@ -247,7 +247,7 @@
 /***********************************************************************
  *           acmStreamPrepareHeader (MSACM32.@)
  */
-MMRESULT WINAPI acmStreamPrepareHeader(HACMSTREAM has, PACMSTREAMHEADER pash, 
+MMRESULT WINAPI acmStreamPrepareHeader(HACMSTREAM has, PACMSTREAMHEADER pash,
 				       DWORD fdwPrepare)
 {
     PWINE_ACMSTREAM	was;
@@ -255,7 +255,7 @@
     PACMDRVSTREAMHEADER	padsh;
 
     TRACE("(0x%08x, %p, %ld)\n", has, pash, fdwPrepare);
-    
+
     if ((was = ACM_GetStream(has)) == NULL)
 	return MMSYSERR_INVALHANDLE;
     if (!pash || pash->cbStruct < sizeof(ACMSTREAMHEADER))
@@ -330,15 +330,15 @@
 /***********************************************************************
  *           acmStreamSize (MSACM32.@)
  */
-MMRESULT WINAPI acmStreamSize(HACMSTREAM has, DWORD cbInput, 
+MMRESULT WINAPI acmStreamSize(HACMSTREAM has, DWORD cbInput,
 			      LPDWORD pdwOutputBytes, DWORD fdwSize)
 {
     PWINE_ACMSTREAM	was;
     ACMDRVSTREAMSIZE	adss;
     MMRESULT		ret;
-    
+
     TRACE("(0x%08x, %ld, %p, %ld)\n", has, cbInput, pdwOutputBytes, fdwSize);
-    
+
     if ((was = ACM_GetStream(has)) == NULL) {
 	return MMSYSERR_INVALHANDLE;
     }
@@ -347,7 +347,7 @@
     }
 
     *pdwOutputBytes = 0L;
-    
+
     switch (fdwSize & ACM_STREAMSIZEF_QUERYMASK) {
     case ACM_STREAMSIZEF_DESTINATION:
 	adss.cbDstLength = cbInput;
@@ -357,13 +357,13 @@
 	adss.cbSrcLength = cbInput;
 	adss.cbDstLength = 0;
 	break;
-    default:	
+    default:
 	return MMSYSERR_INVALFLAG;
     }
-    
+
     adss.cbStruct = sizeof(adss);
     adss.fdwSize = fdwSize;
-    ret = SendDriverMessage(was->pDrv->hDrvr, ACMDM_STREAM_SIZE, 
+    ret = SendDriverMessage(was->pDrv->hDrvr, ACMDM_STREAM_SIZE,
 			    (DWORD)&was->drvInst, (DWORD)&adss);
     if (ret == MMSYSERR_NOERROR) {
 	switch (fdwSize & ACM_STREAMSIZEF_QUERYMASK) {
@@ -382,7 +382,7 @@
 /***********************************************************************
  *           acmStreamUnprepareHeader (MSACM32.@)
  */
-MMRESULT WINAPI acmStreamUnprepareHeader(HACMSTREAM has, PACMSTREAMHEADER pash, 
+MMRESULT WINAPI acmStreamUnprepareHeader(HACMSTREAM has, PACMSTREAMHEADER pash,
 					 DWORD fdwUnprepare)
 {
     PWINE_ACMSTREAM	was;
@@ -390,7 +390,7 @@
     PACMDRVSTREAMHEADER	padsh;
 
     TRACE("(0x%08x, %p, %ld)\n", has, pash, fdwUnprepare);
-    
+
     if ((was = ACM_GetStream(has)) == NULL)
 	return MMSYSERR_INVALHANDLE;
     if (!pash || pash->cbStruct < sizeof(ACMSTREAMHEADER))
@@ -411,7 +411,7 @@
 	padsh->pbPreparedDst != padsh->pbDst ||
 	padsh->cbPreparedDstLength < padsh->cbDstLength) {
 	return MMSYSERR_INVALPARAM;
-    }	
+    }
 
     padsh->fdwConvert = fdwUnprepare;
 
diff --git a/dlls/msacm/wineacm.h b/dlls/msacm/wineacm.h
index 6b58434..b9b4f72 100644
--- a/dlls/msacm/wineacm.h
+++ b/dlls/msacm/wineacm.h
@@ -81,7 +81,7 @@
 
   DWORD          fdwEnum;
   LPWAVEFILTER   pwfltrEnum;
-    
+
   HINSTANCE16    hInstance;
   LPCSTR         pszTemplateName;
   LPARAM         lCustData;
@@ -114,22 +114,22 @@
 {
   DWORD            cbStruct;
   DWORD            fdwStyle;
-    
+
   HWND16           hwndOwner;
 
   LPWAVEFORMATEX   pwfx;
   DWORD            cbwfx;
   LPCSTR           pszTitle;
-    
+
   CHAR             szFormatTag[ACMFORMATTAGDETAILS_FORMATTAG_CHARS];
-  CHAR             szFormat[ACMFORMATDETAILS_FORMAT_CHARS];    
+  CHAR             szFormat[ACMFORMATDETAILS_FORMAT_CHARS];
 
   LPSTR            pszName;
   DWORD            cchName;
 
   DWORD            fdwEnum;
   LPWAVEFORMATEX   pwfxEnum;
-    
+
   HINSTANCE16      hInstance;
   LPCSTR           pszTemplateName;
   LPARAM           lCustData;
@@ -235,7 +235,7 @@
   ACMFORMATENUMCB16 fnCallback, DWORD dwInstance, DWORD fdwEnum
 );
 MMRESULT16 WINAPI acmFormatSuggest16(
-  HACMDRIVER16 had, LPWAVEFORMATEX pwfxSrc, 
+  HACMDRIVER16 had, LPWAVEFORMATEX pwfxSrc,
   LPWAVEFORMATEX pwfxDst, DWORD cbwfxDst, DWORD fdwSuggest
 );
 MMRESULT16 WINAPI acmFilterTagDetails16(
@@ -265,7 +265,7 @@
   HACMSTREAM16 has, DWORD fdwClose
 );
 MMRESULT16 WINAPI acmStreamSize16(
-  HACMSTREAM16 has, DWORD cbInput, 
+  HACMSTREAM16 has, DWORD cbInput,
   LPDWORD pdwOutputBytes, DWORD fdwSize
 );
 MMRESULT16 WINAPI acmStreamConvert16(
@@ -353,7 +353,7 @@
 extern HINSTANCE MSACM_hInstance32;
 
 /* From pcmcnvtr.c */
-LRESULT CALLBACK	PCM_DriverProc(DWORD dwDevID, HDRVR hDriv, UINT wMsg, 
+LRESULT CALLBACK	PCM_DriverProc(DWORD dwDevID, HDRVR hDriv, UINT wMsg,
 				       LPARAM dwParam1, LPARAM dwParam2);
 
 /* Dialog box templates */
diff --git a/dlls/msvcrt/except.c b/dlls/msvcrt/except.c
index e393341..9f9c731 100644
--- a/dlls/msvcrt/except.c
+++ b/dlls/msvcrt/except.c
@@ -259,8 +259,8 @@
 typedef void (*MSVCRT_unwind_function)(const void*);
 
 /*
- * The signatures of the setjmp/longjmp functions do not match that 
- * declared in the setjmp header so they don't follow the regular naming 
+ * The signatures of the setjmp/longjmp functions do not match that
+ * declared in the setjmp header so they don't follow the regular naming
  * convention to avoid conflicts.
  */
 
@@ -382,7 +382,7 @@
 {
     FIXME("(%p,%p,%p,%p):stub?\n",rec,frame,context,dispatch);
 
-    /* Copied from MSVCRT_nested_handler, I hope this is more 
+    /* Copied from MSVCRT_nested_handler, I hope this is more
      * or less the right thing to do
      */
     if (rec->ExceptionFlags & 0x6)
diff --git a/dlls/msvcrt/file.c b/dlls/msvcrt/file.c
index 0ce4124..ab9a7c0 100644
--- a/dlls/msvcrt/file.c
+++ b/dlls/msvcrt/file.c
@@ -223,7 +223,7 @@
 	if(file->_base) {
 		file->_bufsiz = MSVCRT_BUFSIZ;
 		file->_flag |= MSVCRT__IOMYBUF;
-	} else { 
+	} else {
 		file->_base = (unsigned char *)(&file->_charbuf);
 		/* put here 2 ??? */
 		file->_bufsiz = sizeof(file->_charbuf);
@@ -359,11 +359,11 @@
   if (hand == INVALID_HANDLE_VALUE)
     return -1;
   /* flush stdio buffers */
-  if(MSVCRT_files[fd]) { 
-  	if(MSVCRT_files[fd]->_flag & MSVCRT__IOWRT) 
+  if(MSVCRT_files[fd]) {
+  	if(MSVCRT_files[fd]->_flag & MSVCRT__IOWRT)
 		MSVCRT_fflush(MSVCRT_files[fd]);
 
-  	if(MSVCRT_files[fd]->_flag & MSVCRT__IOMYBUF) 
+  	if(MSVCRT_files[fd]->_flag & MSVCRT__IOMYBUF)
 		MSVCRT_free(MSVCRT_files[fd]->_base);
   }
 
@@ -1105,7 +1105,7 @@
  */
 int _getw(MSVCRT_FILE* file)
 {
-  int i; 
+  int i;
   if (_read(file->_file, &i, sizeof(int)) != 1)
     return MSVCRT_EOF;
   return i;
@@ -1142,9 +1142,9 @@
 
   memset(buf,0,sizeof(struct _stat));
 
-  /* FIXME: rdev isnt drive num,despite what the docs say-what is it? 
-     Bon 011120: This FIXME seems incorrect 
-                 Also a letter as first char isn't enough to be classify 
+  /* FIXME: rdev isnt drive num,despite what the docs say-what is it?
+     Bon 011120: This FIXME seems incorrect
+                 Also a letter as first char isn't enough to be classify
 		 as drive letter
   */
   if (isalpha(*path)&& (*(path+1)==':'))
@@ -1411,10 +1411,10 @@
  */
 int MSVCRT_fflush(MSVCRT_FILE* file)
 {
-  if(!file) { 
+  if(!file) {
 	_flushall();
 	return 0;
-  } else { 
+  } else {
   	int res=msvcrt_flush_buffer(file);
   	return res;
   }
@@ -1425,10 +1425,10 @@
  */
 int MSVCRT_fgetc(MSVCRT_FILE* file)
 {
-  if (file->_cnt>0) { 
+  if (file->_cnt>0) {
 	file->_cnt--;
 	return *(unsigned char *)file->_ptr++;
-  } else { 
+  } else {
 	return _filbuf(file);
   }
 }
@@ -1446,29 +1446,29 @@
  */
 int _filbuf(MSVCRT_FILE* file)
 {
-   
+
   /* Allocate buffer if needed */
-  if(file->_bufsiz == 0 && !(file->_flag & MSVCRT__IONBF) ) { 
+  if(file->_bufsiz == 0 && !(file->_flag & MSVCRT__IONBF) ) {
 	msvcrt_alloc_buffer(file);
   }
-  if(!(file->_flag & MSVCRT__IOREAD)) { 
-	if(file->_flag & MSVCRT__IORW) { 
+  if(!(file->_flag & MSVCRT__IOREAD)) {
+	if(file->_flag & MSVCRT__IORW) {
 		file->_flag |= MSVCRT__IOREAD;
-	} else { 
+	} else {
 		return MSVCRT_EOF;
 	}
   }
-  if(file->_flag & MSVCRT__IONBF) { 
+  if(file->_flag & MSVCRT__IONBF) {
 	unsigned char c;
-  	if (_read(file->_file,&c,1) != 1) { 
+  	if (_read(file->_file,&c,1) != 1) {
 		file->_flag |= MSVCRT__IOEOF;
     		return MSVCRT_EOF;
 	}
   	return c;
-  } else { 
+  } else {
 	file->_cnt = _read(file->_file, file->_base, file->_bufsiz);
 	if(file->_cnt<0) file->_cnt = 0;
-	if(!file->_cnt) { 
+	if(!file->_cnt) {
 		file->_flag |= MSVCRT__IOEOF;
 		return MSVCRT_EOF;
 	}
@@ -1523,7 +1523,7 @@
  */
 MSVCRT_wint_t MSVCRT_fgetwc(MSVCRT_FILE* file)
 {
-  WCHAR wc; 
+  WCHAR wc;
   if (_read(file->_file, &wc, sizeof(wc)) != sizeof(wc))
     return MSVCRT_WEOF;
   return wc;
@@ -1714,11 +1714,11 @@
  */
 int MSVCRT_fputc(int c, MSVCRT_FILE* file)
 {
-  if(file->_cnt>0) { 
+  if(file->_cnt>0) {
 	*file->_ptr++=c;
 	file->_cnt--;
 	return c;
-  } else { 
+  } else {
 	return _flsbuf(c, file);
   }
 }
@@ -1732,17 +1732,17 @@
   if(file->_bufsiz == 0 && !(file->_flag & MSVCRT__IONBF)) {
 	msvcrt_alloc_buffer(file);
   }
-  if(!(file->_flag & MSVCRT__IOWRT)) { 
-	if(file->_flag & MSVCRT__IORW) { 
+  if(!(file->_flag & MSVCRT__IOWRT)) {
+	if(file->_flag & MSVCRT__IORW) {
 		file->_flag |= MSVCRT__IOWRT;
-	} else { 
+	} else {
 		return MSVCRT_EOF;
 	}
   }
   if(file->_bufsiz) {
         int res=msvcrt_flush_buffer(file);
 	return res?res : MSVCRT_fputc(c, file);
-  } else { 
+  } else {
 	unsigned char cc=c;
   	return _write(file->_file, &cc, 1) == 1? c : MSVCRT_EOF;
   }
@@ -1764,7 +1764,7 @@
   MSVCRT_size_t read=0;
   int pread=0;
   /* first buffered data */
-  if(file->_cnt>0) { 
+  if(file->_cnt>0) {
 	int pcnt= (rcnt>file->_cnt)? file->_cnt:rcnt;
 	memcpy(ptr, file->_ptr, pcnt);
 	file->_cnt -= pcnt;
@@ -1772,10 +1772,10 @@
 	read += pcnt ;
 	rcnt -= pcnt ;
 	ptr += pcnt;
-  } else if(!(file->_flag & MSVCRT__IOREAD )) { 
-	if(file->_flag & MSVCRT__IORW) { 
+  } else if(!(file->_flag & MSVCRT__IOREAD )) {
+	if(file->_flag & MSVCRT__IORW) {
 		file->_flag |= MSVCRT__IOREAD;
-	} else 
+	} else
 		return 0;
   }
   if(rcnt) pread = _read(file->_file,ptr, rcnt);
@@ -1805,7 +1805,7 @@
     MSVCRT__set_errno(ERROR_CALL_NOT_IMPLEMENTED);
     return NULL;
 #endif
-    if(MSVCRT_fclose(file)) 
+    if(MSVCRT_fclose(file))
 	return NULL;
     return MSVCRT_fopen(path, mode);
   }
@@ -1857,7 +1857,7 @@
 
 /*********************************************************************
  *		fscanf (MSVCRT.@)
- * Implemented based on 
+ * Implemented based on
  * http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore98/html/_crt_format_specification_fields_.2d_.scanf_and_wscanf_functions.asp
  * Extended by C. Scott Ananian <cananian@alumni.princeton.edu> to handle
  * more types of format spec.
@@ -2113,15 +2113,15 @@
 int MSVCRT_fseek(MSVCRT_FILE* file, long offset, int whence)
 {
   /* Flush output if needed */
-  if(file->_flag & MSVCRT__IOWRT) 
+  if(file->_flag & MSVCRT__IOWRT)
 	msvcrt_flush_buffer(file);
-  
+
   if(whence == SEEK_CUR && file->_flag & MSVCRT__IOREAD ) {
 	offset -= file->_cnt;
   }
   /* Discard buffered input */
   file->_cnt = 0;
-  file->_ptr = file->_base; 
+  file->_ptr = file->_base;
   /* Reset direction of i/o */
   if(file->_flag & MSVCRT__IORW) {
         file->_flag &= ~(MSVCRT__IOREAD|MSVCRT__IOWRT);
@@ -2136,10 +2136,10 @@
 {
   int off=0;
   long pos;
-  if(file->_bufsiz)  { 
+  if(file->_bufsiz)  {
 	if( file->_flag & MSVCRT__IOWRT ) {
 		off = file->_ptr - file->_base;
-	} else { 
+	} else {
 		off = -file->_cnt;
 	}
   }
@@ -2157,7 +2157,7 @@
   int written = 0;
   if (size == 0)
       return 0;
-  if(file->_cnt) { 
+  if(file->_cnt) {
 	int pcnt=(file->_cnt>wrcnt)? wrcnt: file->_cnt;
 	memcpy(file->_ptr, ptr, pcnt);
 	file->_cnt -= pcnt;
@@ -2165,16 +2165,16 @@
 	written = pcnt;
 	wrcnt -= pcnt;
 	ptr += pcnt;
-  } else if(!(file->_flag & MSVCRT__IOWRT)) { 
-	if(file->_flag & MSVCRT__IORW) { 
+  } else if(!(file->_flag & MSVCRT__IOWRT)) {
+	if(file->_flag & MSVCRT__IORW) {
 		file->_flag |= MSVCRT__IOWRT;
-	} else 
+	} else
 		return 0;
   }
   if(wrcnt) {
 	/* Flush buffer */
   	int res=msvcrt_flush_buffer(file);
-	if(!res) { 
+	if(!res) {
 		int pwritten = _write(file->_file, ptr, wrcnt);
   		if (pwritten <= 0) pwritten=0;
 		written += pwritten;
@@ -2364,17 +2364,17 @@
 int MSVCRT_setvbuf(MSVCRT_FILE* file, char *buf, int mode, MSVCRT_size_t size)
 {
   /* TODO: Check if file busy */
-  if(file->_bufsiz) { 
+  if(file->_bufsiz) {
 	MSVCRT_free(file->_base);
 	file->_bufsiz = 0;
 	file->_cnt = 0;
   }
-  if(mode == MSVCRT__IOFBF) { 
+  if(mode == MSVCRT__IOFBF) {
 	file->_flag &= ~MSVCRT__IONBF;
   	file->_base = file->_ptr = buf;
-  	if(buf) { 
+  	if(buf) {
 		file->_bufsiz = size;
-	}  
+	}
   } else {
 	file->_flag |= MSVCRT__IONBF;
   }
@@ -2449,7 +2449,7 @@
 
 /*********************************************************************
  *		vfwprintf (MSVCRT.@)
- * FIXME: 
+ * FIXME:
  * Is final char included in written (then resize is too big) or not
  * (then we must test for equality too)?
  */
@@ -2533,11 +2533,11 @@
  */
 int MSVCRT_ungetc(int c, MSVCRT_FILE * file)
 {
-	if(file->_bufsiz == 0 && !(file->_flag & MSVCRT__IONBF)) { 
+	if(file->_bufsiz == 0 && !(file->_flag & MSVCRT__IONBF)) {
 		msvcrt_alloc_buffer(file);
 		file->_ptr++;
 	}
-	if(file->_ptr>file->_base) { 
+	if(file->_ptr>file->_base) {
 		file->_ptr--;
 		*file->_ptr=c;
 		file->_cnt++;
@@ -2554,7 +2554,7 @@
 	WCHAR mwc = wc;
 	char * pp = (char *)&mwc;
 	int i;
-	for(i=sizeof(WCHAR)-1;i>=0;i--) { 
+	for(i=sizeof(WCHAR)-1;i>=0;i--) {
 		if(pp[i] != MSVCRT_ungetc(pp[i],file))
 			return MSVCRT_WEOF;
 	}
diff --git a/dlls/msvcrt/lock.c b/dlls/msvcrt/lock.c
index dd6683f..1053ff5 100644
--- a/dlls/msvcrt/lock.c
+++ b/dlls/msvcrt/lock.c
@@ -25,7 +25,7 @@
 
 typedef struct
 {
-  BOOL             bInit; 
+  BOOL             bInit;
   CRITICAL_SECTION crit;
 } LOCKTABLEENTRY;
 
@@ -39,7 +39,7 @@
 static inline void msvcrt_initialize_mlock( int locknum )
 {
   InitializeCriticalSection( &(lock_table[ locknum ].crit) );
-  msvcrt_mlock_set_entry_initialized( locknum, TRUE ); 
+  msvcrt_mlock_set_entry_initialized( locknum, TRUE );
 }
 
 static inline void msvcrt_uninitialize_mlock( int locknum )
@@ -51,7 +51,7 @@
 /**********************************************************************
  *     msvcrt_init_mt_locks (internal)
  *
- * Initialize the table lock. All other locks will be initialized 
+ * Initialize the table lock. All other locks will be initialized
  * upon first use.
  *
  */
@@ -68,7 +68,7 @@
   }
 
   /* Initialize our lock table lock */
-  msvcrt_initialize_mlock( _LOCKTAB_LOCK ); 
+  msvcrt_initialize_mlock( _LOCKTAB_LOCK );
 }
 
 /**********************************************************************
@@ -119,7 +119,7 @@
     _unlock( _LOCKTAB_LOCK );
   }
 
-  EnterCriticalSection( &(lock_table[ locknum ].crit) ); 
+  EnterCriticalSection( &(lock_table[ locknum ].crit) );
 }
 
 /**********************************************************************
diff --git a/dlls/msvcrt/mbcs.c b/dlls/msvcrt/mbcs.c
index 5714aa0..0db7552 100644
--- a/dlls/msvcrt/mbcs.c
+++ b/dlls/msvcrt/mbcs.c
@@ -180,7 +180,7 @@
     MSVCRT_size_t len = 0;
     while(*str)
     {
-      /* FIXME: According to the documentation we are supposed to test for 
+      /* FIXME: According to the documentation we are supposed to test for
        * multi-byte character validity. Whatever that means
        */
       str += MSVCRT_isleadbyte(*str) ? 2 : 1;
@@ -247,7 +247,7 @@
     }
     if (*src && n && !MSVCRT_isleadbyte(*src))
     {
-      /* If the last character is a multi-byte character then 
+      /* If the last character is a multi-byte character then
        * we cannot copy it since we have only one byte left
        */
       *dst++ = *src;
diff --git a/dlls/msvcrt/msvcrt.h b/dlls/msvcrt/msvcrt.h
index ba03a3d..aa68e97 100644
--- a/dlls/msvcrt/msvcrt.h
+++ b/dlls/msvcrt/msvcrt.h
@@ -53,7 +53,7 @@
 char*  msvcrt_strndup(const char*,unsigned int);
 LPWSTR msvcrt_wstrndup(LPCWSTR, unsigned int);
 
-/* FIXME: This should be declared in new.h but it's not an extern "C" so 
+/* FIXME: This should be declared in new.h but it's not an extern "C" so
  * it would not be much use anyway. Even for Winelib applications.
  */
 int    MSVCRT__set_new_mode(int mode);
diff --git a/dlls/msvcrt/mtdll.h b/dlls/msvcrt/mtdll.h
index d1ab2e9..1c899df 100644
--- a/dlls/msvcrt/mtdll.h
+++ b/dlls/msvcrt/mtdll.h
@@ -42,7 +42,7 @@
 #define _OUTPUT_LOCK    5
 #define _CSCANF_LOCK    6
 #define _CPRINTF_LOCK   7
-#define _CONIO_LOCK     8 
+#define _CONIO_LOCK     8
 #define _HEAP_LOCK      9
 #define _BHEAP_LOCK          10 /* No longer used? */
 #define _TIME_LOCK      11
@@ -50,7 +50,7 @@
 #define _EXIT_LOCK1     13
 #define _EXIT_LOCK2          14 /* No longer used? */
 #define _THREADDATA_LOCK     15 /* No longer used? */
-#define _POPEN_LOCK     16   
+#define _POPEN_LOCK     16
 #define _LOCKTAB_LOCK   17
 #define _OSFHND_LOCK    18
 #define _SETLOCALE_LOCK 19
diff --git a/dlls/msvcrt/process.c b/dlls/msvcrt/process.c
index e9b66fe..5585750 100644
--- a/dlls/msvcrt/process.c
+++ b/dlls/msvcrt/process.c
@@ -215,7 +215,7 @@
 /*********************************************************************
  *		_execl (MSVCRT.@)
  *
- * Like on Windows, this function does not handle arguments with spaces 
+ * Like on Windows, this function does not handle arguments with spaces
  * or double-quotes.
  */
 int _execl(const char* name, const char* arg0, ...)
@@ -237,7 +237,7 @@
 /*********************************************************************
  *		_execlp (MSVCRT.@)
  *
- * Like on Windows, this function does not handle arguments with spaces 
+ * Like on Windows, this function does not handle arguments with spaces
  * or double-quotes.
  */
 int _execlp(const char* name, const char* arg0, ...)
@@ -262,7 +262,7 @@
 /*********************************************************************
  *		_execv (MSVCRT.@)
  *
- * Like on Windows, this function does not handle arguments with spaces 
+ * Like on Windows, this function does not handle arguments with spaces
  * or double-quotes.
  */
 int _execv(const char* name, char* const* argv)
@@ -273,7 +273,7 @@
 /*********************************************************************
  *		_execve (MSVCRT.@)
  *
- * Like on Windows, this function does not handle arguments with spaces 
+ * Like on Windows, this function does not handle arguments with spaces
  * or double-quotes.
  */
 int _execve(const char* name, char* const* argv, const char* const* envv)
@@ -284,7 +284,7 @@
 /*********************************************************************
  *		_execvpe (MSVCRT.@)
  *
- * Like on Windows, this function does not handle arguments with spaces 
+ * Like on Windows, this function does not handle arguments with spaces
  * or double-quotes.
  */
 int _execvpe(const char* name, char* const* argv, const char* const* envv)
@@ -299,7 +299,7 @@
 /*********************************************************************
  *		_execvp (MSVCRT.@)
  *
- * Like on Windows, this function does not handle arguments with spaces 
+ * Like on Windows, this function does not handle arguments with spaces
  * or double-quotes.
  */
 int _execvp(const char* name, char* const* argv)
@@ -310,7 +310,7 @@
 /*********************************************************************
  *		_spawnl (MSVCRT.@)
  *
- * Like on Windows, this function does not handle arguments with spaces 
+ * Like on Windows, this function does not handle arguments with spaces
  * or double-quotes.
  */
 int _spawnl(int flags, const char* name, const char* arg0, ...)
@@ -332,7 +332,7 @@
 /*********************************************************************
  *		_spawnlp (MSVCRT.@)
  *
- * Like on Windows, this function does not handle arguments with spaces 
+ * Like on Windows, this function does not handle arguments with spaces
  * or double-quotes.
  */
 int _spawnlp(int flags, const char* name, const char* arg0, ...)
@@ -357,7 +357,7 @@
 /*********************************************************************
  *		_spawnve (MSVCRT.@)
  *
- * Like on Windows, this function does not handle arguments with spaces 
+ * Like on Windows, this function does not handle arguments with spaces
  * or double-quotes.
  */
 int _spawnve(int flags, const char* name, const char* const* argv,
@@ -385,7 +385,7 @@
 /*********************************************************************
  *		_spawnv (MSVCRT.@)
  *
- * Like on Windows, this function does not handle arguments with spaces 
+ * Like on Windows, this function does not handle arguments with spaces
  * or double-quotes.
  */
 int _spawnv(int flags, const char* name, const char* const* argv)
@@ -396,7 +396,7 @@
 /*********************************************************************
  *		_spawnvpe (MSVCRT.@)
  *
- * Like on Windows, this function does not handle arguments with spaces 
+ * Like on Windows, this function does not handle arguments with spaces
  * or double-quotes.
  */
 int _spawnvpe(int flags, const char* name, const char* const* argv,
@@ -410,7 +410,7 @@
 /*********************************************************************
  *		_spawnvp (MSVCRT.@)
  *
- * Like on Windows, this function does not handle arguments with spaces 
+ * Like on Windows, this function does not handle arguments with spaces
  * or double-quotes.
  */
 int _spawnvp(int flags, const char* name, const char* const* argv)
diff --git a/dlls/msvcrt/thread.c b/dlls/msvcrt/thread.c
index 586561c..b4f52c2 100644
--- a/dlls/msvcrt/thread.c
+++ b/dlls/msvcrt/thread.c
@@ -40,8 +40,8 @@
 {
     _beginthread_trampoline_t local_trampoline;
 
-    /* Maybe it's just being paranoid, but freeing arg right 
-     * away seems safer. 
+    /* Maybe it's just being paranoid, but freeing arg right
+     * away seems safer.
      */
     memcpy(&local_trampoline,arg,sizeof(local_trampoline));
     MSVCRT_free(arg);
@@ -62,7 +62,7 @@
 
   TRACE("(%p, %d, %p)\n", start_address, stack_size, arglist);
 
-  /* Allocate the trampoline here so that it is still valid when the thread 
+  /* Allocate the trampoline here so that it is still valid when the thread
    * starts... typically after this function has returned.
    * _beginthread_trampoline is responsible for freeing the trampoline
    */
diff --git a/dlls/msvideo/drawdib.c b/dlls/msvideo/drawdib.c
index abf20bd..6321c0f 100644
--- a/dlls/msvideo/drawdib.c
+++ b/dlls/msvideo/drawdib.c
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 2000 Bradley Baetz
  *
  * This library is free software; you can redistribute it and/or
@@ -101,7 +101,7 @@
 BOOL VFWAPI DrawDibEnd(HDRAWDIB hdd) {
 	BOOL ret = TRUE;
 	WINE_HDD *whdd = GlobalLock16(hdd);
-	
+
 	TRACE("(0x%08lx)\n",(DWORD)hdd);
 
 	whdd->hpal = 0; /* Do not free this */
@@ -127,7 +127,7 @@
 
 	if (whdd->hDib)
 		DeleteObject(whdd->hDib);
-	
+
 	if (whdd->hic) {
 		ICDecompressEnd(whdd->hic);
 		ICClose(whdd->hic);
@@ -164,9 +164,9 @@
 		hdd,(DWORD)hdc,dxDst,dyDst,lpbi,dxSrc,dySrc,(DWORD)wFlags
 	);
 	TRACE("lpbi: %ld,%ld/%ld,%d,%d,%ld,%ld,%ld,%ld,%ld,%ld\n",
-		  lpbi->biSize, lpbi->biWidth, lpbi->biHeight, lpbi->biPlanes, 
-		  lpbi->biBitCount, lpbi->biCompression, lpbi->biSizeImage, 
-		  lpbi->biXPelsPerMeter, lpbi->biYPelsPerMeter, lpbi->biClrUsed, 
+		  lpbi->biSize, lpbi->biWidth, lpbi->biHeight, lpbi->biPlanes,
+		  lpbi->biBitCount, lpbi->biCompression, lpbi->biSizeImage,
+		  lpbi->biXPelsPerMeter, lpbi->biYPelsPerMeter, lpbi->biClrUsed,
 		  lpbi->biClrImportant);
 
 	if (wFlags & ~(DDF_BUFFER))
@@ -222,7 +222,7 @@
 
 	if (ret) {
 		/*whdd->lpvbuf = HeapAlloc(GetProcessHeap(),0,whdd->lpbiOut->biSizeImage);*/
-		
+
 		whdd->hMemDC = CreateCompatibleDC(hdc);
 		TRACE("Creating: %ld,%p\n",whdd->lpbiOut->biSize,whdd->lpvbits);
 		whdd->hDib = CreateDIBSection(whdd->hMemDC,(BITMAPINFO *)whdd->lpbiOut,DIB_RGB_COLORS,&(whdd->lpvbits),0,0);
@@ -288,7 +288,7 @@
 		  hdd,(DWORD)hdc,xDst,yDst,dxDst,dyDst,lpbi,lpBits,xSrc,ySrc,dxSrc,dySrc,(DWORD)wFlags
 	);
 
-	if (wFlags & ~(DDF_SAME_HDC | DDF_SAME_DRAW | DDF_NOTKEYFRAME | 
+	if (wFlags & ~(DDF_SAME_HDC | DDF_SAME_DRAW | DDF_NOTKEYFRAME |
 				   DDF_UPDATE | DDF_DONTDRAW))
 		FIXME("wFlags == 0x%08lx not handled\n",(DWORD)wFlags);
 
@@ -321,16 +321,16 @@
 
 		if (lpbi->biCompression) {
 		    DWORD flags = 0;
-		
+
 			TRACE("Compression == 0x%08lx\n",lpbi->biCompression);
-		
+
 			if (wFlags & DDF_NOTKEYFRAME)
 			    flags |= ICDECOMPRESS_NOTKEYFRAME;
-		
+
 			ICDecompress(whdd->hic,flags,lpbi,lpBits,whdd->lpbiOut,whdd->lpvbits);
 		} else {
 		    memcpy(whdd->lpvbits,lpBits,lpbi->biSizeImage);
-		}	
+		}
 	}
 	if (!(wFlags & DDF_DONTDRAW) && whdd->hpal)
 	    SelectPalette(hdc,whdd->hpal,FALSE);
@@ -345,7 +345,7 @@
 /**********************************************************************
  *		DrawDibDraw		[MSVIDEO.106]
  */
-BOOL16 VFWAPI DrawDibDraw16(HDRAWDIB16 hdd,             
+BOOL16 VFWAPI DrawDibDraw16(HDRAWDIB16 hdd,
 						  HDC16 hdc,
 						  INT16 xDst,
 						  INT16 yDst,
@@ -401,7 +401,7 @@
 
 	whdd = GlobalLock16(hdd);
 	whdd->hpal = hpal;
-	
+
 	if (whdd->begun) {
 		SelectPalette(whdd->hdc,hpal,0);
 		RealizePalette(whdd->hdc);
@@ -448,20 +448,20 @@
 	UINT ret = 0;
 
 	FIXME("(%d,0x%08lx,%d), stub\n",hdd,(DWORD)hdc,fBackground);
-	
+
 	whdd = GlobalLock16(hdd);
 
 	if (!whdd || !(whdd->begun)) {
 		ret = 0;
 		goto out;
 	}
-	
+
 	if (!whdd->hpal)
 		whdd->hpal = CreateHalftonePalette(hdc);
 
 	oldPal = SelectPalette(hdc,whdd->hpal,fBackground);
 	ret = RealizePalette(hdc);
-	
+
  out:
 	GlobalUnlock16(hdd);
 
diff --git a/dlls/msvideo/mciwnd.c b/dlls/msvideo/mciwnd.c
index c42217b..1151f8a 100644
--- a/dlls/msvideo/mciwnd.c
+++ b/dlls/msvideo/mciwnd.c
@@ -1,5 +1,5 @@
 /*
- * Copyright 2000 Eric Pouech 
+ * Copyright 2000 Eric Pouech
  *
  *
  * This library is free software; you can redistribute it and/or
@@ -81,7 +81,7 @@
 {
    DWORD	wndStyle;
    MCIWndInfo*	mwi;
-   
+
    TRACE("%x %x %lx %s\n", hwndParent, hInstance, dwStyle, szFile);
 
    MCIWndRegisterClass(hInstance);
@@ -99,12 +99,12 @@
    wndStyle = ((hwndParent) ? (WS_CHILD|WS_BORDER) : WS_OVERLAPPEDWINDOW) |
               WS_VISIBLE | (dwStyle & 0xFFFF0000);
 
-   if (CreateWindowExA(0, "MCIWndClass", NULL, wndStyle, 
-		       CW_USEDEFAULT, CW_USEDEFAULT, 
-		       CW_USEDEFAULT, CW_USEDEFAULT, 
+   if (CreateWindowExA(0, "MCIWndClass", NULL, wndStyle,
+		       CW_USEDEFAULT, CW_USEDEFAULT,
+		       CW_USEDEFAULT, CW_USEDEFAULT,
 		       hwndParent, (HMENU)0, hInstance, mwi))
       return mwi->hWnd;
-   
+
    if(mwi->lpName) HeapFree(GetProcessHeap(), 0, mwi->lpName);
    HeapFree(GetProcessHeap(), 0, mwi);
    return 0;
@@ -126,7 +126,7 @@
 static DWORD MCIWND_GetStatus(MCIWndInfo* mwi)
 {
    MCI_DGV_STATUS_PARMSA	mdsp;
-   
+
    memset(&mdsp, 0, sizeof(mdsp));
    mdsp.dwItem = MCI_STATUS_MODE;
    if (mciSendCommandA(mwi->mci, MCI_STATUS, MCI_WAIT|MCI_STATUS_ITEM, (DWORD)&mdsp))
@@ -142,7 +142,7 @@
 static DWORD MCIWND_Get(MCIWndInfo* mwi, DWORD what)
 {
    MCI_DGV_STATUS_PARMSA	mdsp;
-      
+
    memset(&mdsp, 0, sizeof(mdsp));
    mdsp.dwItem = what;
    if (mciSendCommandA(mwi->mci, MCI_STATUS, MCI_WAIT|MCI_STATUS_ITEM, (DWORD)&mdsp))
@@ -216,7 +216,7 @@
       return;
    }
    mwi->mci = mdopn.wDeviceID;
-  
+
    /* grab AVI window size */
    memset(&mdrct, 0, sizeof(mdrct));
    mmr = mciSendCommandA(mwi->mci,  MCI_WHERE, MCI_DGV_WHERE_DESTINATION, (LPARAM)&mdrct);
@@ -228,17 +228,17 @@
    cy = mdrct.rc.bottom - mdrct.rc.top;
 
    AdjustWindowRect(&mdrct.rc, GetWindowLongA(hWnd, GWL_STYLE), FALSE);
-   SetWindowPos(hWnd, 0, 0, 0, mdrct.rc.right - mdrct.rc.left, 
+   SetWindowPos(hWnd, 0, 0, 0, mdrct.rc.right - mdrct.rc.left,
 		mdrct.rc.bottom - mdrct.rc.top + 32, SWP_NOMOVE|SWP_NOZORDER);
 
    /* adding the other elements: play/stop button, menu button, status */
-   hChld = CreateWindowExA(0, "BUTTON", "Play", WS_CHILD|WS_VISIBLE, 0, cy, 32, 32, 
+   hChld = CreateWindowExA(0, "BUTTON", "Play", WS_CHILD|WS_VISIBLE, 0, cy, 32, 32,
 			   hWnd, (HMENU)CTL_PLAYSTOP, GetWindowLongA(hWnd, GWL_HINSTANCE), 0L);
    TRACE("Get Button1: %04x\n", hChld);
-   hChld = CreateWindowExA(0, "BUTTON", "Menu", WS_CHILD|WS_VISIBLE, 32, cy, 32, 32, 
+   hChld = CreateWindowExA(0, "BUTTON", "Menu", WS_CHILD|WS_VISIBLE, 32, cy, 32, 32,
 			   hWnd, (HMENU)CTL_MENU, GetWindowLongA(hWnd, GWL_HINSTANCE), 0L);
    TRACE("Get Button2: %04x\n", hChld);
-   hChld = CreateWindowExA(0, TRACKBAR_CLASSA, "", WS_CHILD|WS_VISIBLE, 64, cy, cx - 64, 32, 
+   hChld = CreateWindowExA(0, TRACKBAR_CLASSA, "", WS_CHILD|WS_VISIBLE, 64, cy, cx - 64, 32,
 			   hWnd, (HMENU)CTL_TRACKBAR, GetWindowLongA(hWnd, GWL_HINSTANCE), 0L);
    TRACE("Get status: %04x\n", hChld);
    SendMessageA(hChld, TBM_SETRANGEMIN, 0L, 0L);
diff --git a/dlls/msvideo/msvideo_main.c b/dlls/msvideo/msvideo_main.c
index 15eff37..66c0b86 100644
--- a/dlls/msvideo/msvideo_main.c
+++ b/dlls/msvideo/msvideo_main.c
@@ -1,6 +1,6 @@
 /*
  * Copyright 1998 Marcus Meissner
- * Copyright 2000 Bradley Baetz 
+ * Copyright 2000 Bradley Baetz
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -180,7 +180,7 @@
 	ret = ICInfo(fccType,fccHandler,(ICINFO*)lParam);
 
 	MSVIDEO_UnmapMsg16To32(ICM_GETINFO,lpv,&lParam,&size);
-	
+
 	return ret;
 }
 
@@ -201,7 +201,7 @@
 
 	sprintf(codecname,"%s.%s",type,handler);
 
-	/* Well, lParam2 is in fact a LPVIDEO_OPEN_PARMS, but it has the 
+	/* Well, lParam2 is in fact a LPVIDEO_OPEN_PARMS, but it has the
 	 * same layout as ICOPEN
 	 */
 	icopen.fccType		= fccType;
@@ -253,12 +253,12 @@
 		return 0;
 	whic = GlobalLock16(hic);
 	whic->driverproc = lpfnHandler;
-	
+
 	whic->private = bFrom32;
-	
+
 	/* Now try opening/loading the driver. Taken from DRIVER_AddToList */
 	/* What if the function is used more than once? */
-	
+
 	if (MSVIDEO_SendMessage(hic,DRV_LOAD,0L,0L,bFrom32) != DRV_SUCCESS) {
 		WARN("DRV_LOAD failed for hic 0x%08lx\n",(DWORD)hic);
 		GlobalFree16(hic);
@@ -346,7 +346,7 @@
 
 	switch (wMode) {
 	case ICMODE_FASTCOMPRESS:
-	case ICMODE_COMPRESS: 
+	case ICMODE_COMPRESS:
 		querymsg = ICM_COMPRESS_QUERY;
 		break;
 	case ICMODE_FASTDECOMPRESS:
@@ -374,7 +374,7 @@
 
 	/* Now try each driver in turn. 32 bit codecs only. */
 	/* FIXME: Move this to an init routine? */
-	
+
 	pszBuffer = (LPSTR)HeapAlloc(GetProcessHeap(),0,1024);
 	if (GetPrivateProfileSectionA("drivers32",pszBuffer,1024,"system.ini")) {
 		char* s = pszBuffer;
@@ -397,7 +397,7 @@
 		}
 	}
 	HeapFree(GetProcessHeap(),0,pszBuffer);
-	
+
 	if (fccType==streamtypeVIDEO) {
 		hic = ICLocate(ICTYPE_VIDEO,fccHandler,lpbiIn,lpbiOut,wMode);
 		if (hic)
@@ -424,7 +424,7 @@
 	HIC hic,LPBITMAPINFOHEADER lpbiIn,LPBITMAPINFOHEADER lpbiOut,
 	INT depth,INT dx,INT dy)
 {
-	HIC	tmphic = hic; 
+	HIC	tmphic = hic;
 
 	FIXME("(0x%08lx,%p,%p,%d,%d,%d),stub!\n",(DWORD)hic,lpbiIn,lpbiOut,depth,dx,dy);
 	if (!tmphic) {
@@ -461,7 +461,7 @@
 	}
 	if (lpbiIn->biBitCount == 8)
 		depth = 8;
-	
+
 	TRACE("=> 0x%08lx\n",(DWORD)tmphic);
 	return tmphic;
 errout:
@@ -583,7 +583,7 @@
         ICDECOMPRESS icd;
         SEGPTR segptr;
 	DWORD ret;
-	
+
 	TRACE("(0x%08lx,%ld,%p,%p,%p,%p)\n",(DWORD)hic,dwFlags,lpbiFormat,lpData,lpbi,lpBits);
 
         icd.dwFlags = dwFlags;
@@ -607,7 +607,7 @@
 	ICDECOMPRESSEX *icdx = HeapAlloc(GetProcessHeap(),0,sizeof(ICDECOMPRESSEX));
 	ICDECOMPRESSEX16 *icdx16 = MapSL(*lParam);
 	ret = icdx16;
-	
+
 	COPY(icdx,dwFlags);
 	COPYPTR(icdx,lpbiSrc);
 	COPYPTR(icdx,lpSrc);
@@ -621,14 +621,14 @@
 	COPY(icdx,ySrc);
 	COPY(icdx,dxSrc);
 	COPY(icdx,dySrc);
-	
+
 	*lParam = (DWORD)(icdx);
 	return ret;
 }
 
 LPVOID MSVIDEO_MapMsg16To32(UINT msg, LPDWORD lParam1, LPDWORD lParam2) {
 	LPVOID ret = 0;
-	
+
 	TRACE("Mapping %d\n",msg);
 
 	switch (msg) {
@@ -698,7 +698,7 @@
 			COPY(icc,dwQuality);
 			COPYPTR(icc,lpbiPrev);
 			COPYPTR(icc,lpPrev);
-			
+
 			*lParam1 = (DWORD)(icc);
 			*lParam2 = sizeof(ICCOMPRESS);
 		}
@@ -707,17 +707,17 @@
 		{
 			ICDECOMPRESS *icd = HeapAlloc(GetProcessHeap(),0,sizeof(ICDECOMPRESS));
 			ICDECOMPRESS *icd16; /* Same structure except for the pointers */
-			
+
 			icd16 = MapSL(*lParam1);
 			ret = icd16;
-			
+
 			COPY(icd,dwFlags);
 			COPYPTR(icd,lpbiInput);
 			COPYPTR(icd,lpInput);
 			COPYPTR(icd,lpbiOutput);
 			COPYPTR(icd,lpOutput);
 			COPY(icd,ckid);
-			
+
 			*lParam1 = (DWORD)(icd);
 			*lParam2 = sizeof(ICDECOMPRESS);
 		}
@@ -746,7 +746,7 @@
 		 addr[1] = MSVIDEO_MapICDEX16To32(lParam2);
 		 else
 		 addr[1] = 0;
-		 
+
 		 ret = addr;
 		 }
 		 break;*/
@@ -785,7 +785,7 @@
 		{
 			ICDRAWSUGGEST *icds = HeapAlloc(GetProcessHeap(),0,sizeof(ICDRAWSUGGEST));
 			ICDRAWSUGGEST16 *icds16 = MapSL(*lParam1);
-			
+
 			ret = icds16;
 
 			COPY(icds,dwFlags);
@@ -878,7 +878,7 @@
 	default:
 		ERR("Unmapping unmapped msg %d\n",msg);
 	}
-#undef UNCOPY		
+#undef UNCOPY
 }
 
 LRESULT MSVIDEO_SendMessage(HIC hic,UINT msg,DWORD lParam1,DWORD lParam2, BOOL bFrom32) {
@@ -971,7 +971,7 @@
 			goto out;
 		}
 	}
-	
+
 	if (whic->driverproc) {
 		if (bDrv32) {
 			ret = whic->driverproc(whic->hdrv,hic,msg,lParam1,lParam2);
@@ -984,10 +984,10 @@
 
 	if (data16)
 		MSVIDEO_UnmapMsg16To32(msg,data16,&lParam1,&lParam2);
- 
+
  out:
 	GlobalUnlock16(hic);
-	
+
 	TRACE("	-> 0x%08lx\n",ret);
 	return ret;
 }
@@ -1019,7 +1019,7 @@
 	UINT16 i;
 
 	VA_LIST16 valist;
-	
+
 	VA_START16(valist);
 	hic = VA_ARG16(valist, HIC16);
 	msg = VA_ARG16(valist, UINT16);
@@ -1032,7 +1032,7 @@
 	for(i=0;i<cb/sizeof(WORD);i++) {
 		lpData[i] = VA_ARG16(valist, WORD);
 	}
-		
+
 	VA_END16(valist);
         segData = MapLS( lpData );
         ret = ICSendMessage16(hic, msg, segData, (DWORD)cb);
@@ -1062,7 +1062,7 @@
 	DWORD              dwRate,  /* [in] frames/second = (dwRate/dwScale) */
 	DWORD              dwScale) /* [in] */
 {
-	
+
 	ICDRAWBEGIN	icdb;
 
 	TRACE("(0x%08lx,%ld,0x%08lx,0x%08lx,0x%08lx,%u,%u,%u,%u,%p,%u,%u,%u,%u,%ld,%ld)\n",
@@ -1162,8 +1162,8 @@
 	DWORD dwFlags,
 	LPVOID lpFormat, /* [???] NOTE: SEGPTR */
 	LPVOID lpData,   /* [???] NOTE: SEGPTR */
-	DWORD cbData, 
-	LONG lTime) 
+	DWORD cbData,
+	LONG lTime)
 {
         DWORD ret;
         ICDRAW icd;
diff --git a/dlls/netapi32/netapi32.c b/dlls/netapi32/netapi32.c
index 65dce6e..3b91f73 100644
--- a/dlls/netapi32/netapi32.c
+++ b/dlls/netapi32/netapi32.c
@@ -1,4 +1,4 @@
-/*		
+/*
  * Copyright 2001 Mike McCormack
  *
  * This library is free software; you can redistribute it and/or
@@ -199,7 +199,7 @@
 
 BOOL WINAPI Netbios(PNCB pncb)
 {
-    UCHAR ret = NRC_ILLCMD; 
+    UCHAR ret = NRC_ILLCMD;
 
     TRACE("ncb = %p\n",pncb);
 
@@ -210,7 +210,7 @@
     {
     case NCBRESET:
         FIXME("NCBRESET adapter %d\n",pncb->ncb_lana_num);
-        if( (pncb->ncb_lana_num < MAX_LANA ) && 
+        if( (pncb->ncb_lana_num < MAX_LANA ) &&
              NETBIOS_Adapter[pncb->ncb_lana_num].valid)
             ret = NRC_GOODRET;
         else
diff --git a/dlls/ntdll/cdrom.c b/dlls/ntdll/cdrom.c
index c5740ba..54c4b81 100644
--- a/dlls/ntdll/cdrom.c
+++ b/dlls/ntdll/cdrom.c
@@ -95,7 +95,7 @@
 
 #endif  /* linux */
 
-/* FIXME: this is needed because we can't open simultaneously several times /dev/cdrom 
+/* FIXME: this is needed because we can't open simultaneously several times /dev/cdrom
  * this should be removed when a proper device interface is implemented
  */
 struct cdrom_cache {
@@ -107,7 +107,7 @@
 /******************************************************************
  *		CDROM_GetIdeInterface
  *
- * Determines the ide interface (the number after the ide), and the 
+ * Determines the ide interface (the number after the ide), and the
  * number of the device on that interface for ide cdroms.
  * Returns false if the info could not be get
  *
@@ -160,7 +160,7 @@
  * Initializes registry to contain scsi info about the cdrom in NT.
  * All devices (even not real scsi ones) have this info in NT.
  * TODO: for now it only works for non scsi devices
- * NOTE: programs usually read these registry entries after sending the 
+ * NOTE: programs usually read these registry entries after sending the
  *       IOCTL_SCSI_GET_ADDRESS ioctl to the cdrom
  */
 void CDROM_InitRegistry(int dev)
@@ -325,7 +325,7 @@
 static void CDROM_Close(DWORD clientID, int fd)
 {
     int dev = LOWORD(clientID);
-    
+
     if (dev >= 26 || fd != cdrom_cache[dev].fd) FIXME("how come\n");
     if (--cdrom_cache[dev].count == 0)
         close(cdrom_cache[dev].fd);
@@ -390,7 +390,7 @@
 #else
     return STATUS_NOT_SUPPORTED;
 #endif
-}  
+}
 
 /******************************************************************
  *		CDROM_SetTray
@@ -402,7 +402,7 @@
 #if defined(linux)
     return CDROM_GetStatusCode(ioctl(dev, doEject ? CDROMEJECT : CDROMCLOSETRAY));
 #elif defined(__FreeBSD__) || defined(__NetBSD__)
-    return CDROM_GetStatusCode((ioctl(dev, CDIOCALLOW, NULL)) || 
+    return CDROM_GetStatusCode((ioctl(dev, CDIOCALLOW, NULL)) ||
                                (ioctl(dev, doEject ? CDIOCEJECT : CDIOCCLOSE, NULL)) ||
                                (ioctl(dev, CDIOCPREVENT, NULL)));
 #else
@@ -441,7 +441,7 @@
     struct cdrom_tocentry	entry;
 
     io = ioctl(dev, CDROMREADTOCHDR, &hdr);
-    if (io == -1) 
+    if (io == -1)
     {
         WARN("(%d) -- Error occurred (%s)!\n", dev, strerror(errno));
         goto end;
@@ -483,7 +483,7 @@
     struct cd_toc_entry         toc_buffer;
 
     io = ioctl(dev, CDIOREADTOCHEADER, &hdr);
-    if (io == -1) 
+    if (io == -1)
     {
         WARN("(%d) -- Error occurred (%s)!\n", dev, strerror(errno));
         goto end;
@@ -555,7 +555,7 @@
  *
  *
  */
-static DWORD CDROM_ReadQChannel(int dev, const CDROM_SUB_Q_DATA_FORMAT* fmt, 
+static DWORD CDROM_ReadQChannel(int dev, const CDROM_SUB_Q_DATA_FORMAT* fmt,
                                 SUB_Q_CHANNEL_DATA* data)
 {
     DWORD               ret = STATUS_NOT_SUPPORTED;
@@ -580,7 +580,7 @@
     case CDROM_AUDIO_INVALID:
 	hdr->AudioStatus = AUDIO_STATUS_NOT_SUPPORTED;
 	break;
-    case CDROM_AUDIO_NO_STATUS: 
+    case CDROM_AUDIO_NO_STATUS:
 	hdr->AudioStatus = AUDIO_STATUS_NO_STATUS;
 	break;
     case CDROM_AUDIO_PLAY:
@@ -901,7 +901,7 @@
 #if defined(linux)
     struct cdrom_volctrl volc;
     int io;
-    
+
     io = ioctl(dev, CDROMVOLREAD, &volc);
     if (io != -1)
     {
@@ -914,7 +914,7 @@
 #elif defined(__FreeBSD__) || defined(__NetBSD__)
     struct  ioc_vol     volc;
     int io;
-    
+
     io = ioctl(dev, CDIOCGETVOL, &volc);
     if (io != -1)
     {
@@ -922,7 +922,7 @@
         vc->PortVolume[1] = volc.vol[1];
         vc->PortVolume[2] = volc.vol[2];
         vc->PortVolume[3] = volc.vol[3];
-    } 
+    }
     return CDROM_GetStatusCode(io);
 #else
     return STATUS_NOT_SUPPORTED;
@@ -943,7 +943,7 @@
     volc.channel1 = vc->PortVolume[1];
     volc.channel2 = vc->PortVolume[2];
     volc.channel3 = vc->PortVolume[3];
-   
+
     return CDROM_GetStatusCode(ioctl(dev, CDROMVOLCTRL, &volc));
 #elif defined(__FreeBSD__) || defined(__NetBSD__)
     struct  ioc_vol     volc;
@@ -978,7 +978,7 @@
     default:    return STATUS_INVALID_PARAMETER;
     }
     if (len < raw->SectorCount * sectSize) return STATUS_BUFFER_TOO_SMALL;
-    /* strangely enough, it seems that sector offsets are always indicated with a size of 2048, 
+    /* strangely enough, it seems that sector offsets are always indicated with a size of 2048,
      * even if a larger size if read...
      */
 #if defined(linux)
@@ -1000,7 +1000,7 @@
             return ret;
         case CDDA:
             /* FIXME: the output doesn't seem 100% correct... in fact output is shifted
-             * between by NT2K box and this... should check on the same drive... 
+             * between by NT2K box and this... should check on the same drive...
              * otherwise, I fear a 2352/2368 mismatch somewhere in one of the drivers
              * (linux/NT).
              * Anyway, that's not critical at all. We're talking of 16/32 bytes, we're
@@ -1198,7 +1198,7 @@
 
 /******************************************************************
  *		CDROM_GetAddress
- * 
+ *
  * implements IOCTL_SCSI_GET_ADDRESS
  */
 static DWORD CDROM_GetAddress(int dev, SCSI_ADDRESS* address)
@@ -1221,8 +1221,8 @@
  *
  *
  */
-BOOL CDROM_DeviceIoControl(DWORD clientID, HANDLE hDevice, DWORD dwIoControlCode, 
-                           LPVOID lpInBuffer, DWORD nInBufferSize, 
+BOOL CDROM_DeviceIoControl(DWORD clientID, HANDLE hDevice, DWORD dwIoControlCode,
+                           LPVOID lpInBuffer, DWORD nInBufferSize,
                            LPVOID lpOutBuffer, DWORD nOutBufferSize,
                            LPDWORD lpBytesReturned, LPOVERLAPPED lpOverlapped)
 {
@@ -1230,8 +1230,8 @@
     DWORD       error = 0;
     int         dev;
 
-    TRACE("%lx[%c] %lx %lx %ld %lx %ld %lx %lx\n", 
-          (DWORD)hDevice, 'A' + LOWORD(clientID), dwIoControlCode, (DWORD)lpInBuffer, nInBufferSize, 
+    TRACE("%lx[%c] %lx %lx %ld %lx %ld %lx %lx\n",
+          (DWORD)hDevice, 'A' + LOWORD(clientID), dwIoControlCode, (DWORD)lpInBuffer, nInBufferSize,
           (DWORD)lpOutBuffer, nOutBufferSize, (DWORD)lpBytesReturned, (DWORD)lpOverlapped);
 
     if (lpBytesReturned) *lpBytesReturned = 0;
@@ -1283,7 +1283,7 @@
     case IOCTL_DISK_MEDIA_REMOVAL:
     case IOCTL_STORAGE_MEDIA_REMOVAL:
     case IOCTL_STORAGE_EJECTION_CONTROL:
-        /* FIXME the last ioctl:s is not the same as the two others... 
+        /* FIXME the last ioctl:s is not the same as the two others...
          * lockcount/owner should be handled */
         sz = 0;
         if (lpOutBuffer != NULL || nOutBufferSize != 0) error = STATUS_INVALID_PARAMETER;
@@ -1332,7 +1332,7 @@
 
     case IOCTL_CDROM_READ_Q_CHANNEL:
         sz = sizeof(SUB_Q_CHANNEL_DATA);
-        if (lpInBuffer == NULL || nInBufferSize < sizeof(CDROM_SUB_Q_DATA_FORMAT)) 
+        if (lpInBuffer == NULL || nInBufferSize < sizeof(CDROM_SUB_Q_DATA_FORMAT))
             error = STATUS_INVALID_PARAMETER;
         else if (nOutBufferSize < sz) error = STATUS_BUFFER_TOO_SMALL;
         else error = CDROM_ReadQChannel(dev, (const CDROM_SUB_Q_DATA_FORMAT*)lpInBuffer,
@@ -1394,7 +1394,7 @@
         sz = 0;
         if (nInBufferSize < sizeof(RAW_READ_INFO)) error = STATUS_INVALID_PARAMETER;
         else if (lpOutBuffer == NULL) error = STATUS_BUFFER_TOO_SMALL;
-        else error = CDROM_RawRead(dev, (const RAW_READ_INFO*)lpInBuffer, 
+        else error = CDROM_RawRead(dev, (const RAW_READ_INFO*)lpInBuffer,
                                    lpOutBuffer, nOutBufferSize, &sz);
         break;
     case IOCTL_SCSI_GET_ADDRESS:
@@ -1424,7 +1424,7 @@
     }
 
     if (lpBytesReturned) *lpBytesReturned = sz;
-    if (error) 
+    if (error)
     {
         SetLastError(error);
         return FALSE;
diff --git a/dlls/ntdll/error.c b/dlls/ntdll/error.c
index 711337c..ca958d0 100644
--- a/dlls/ntdll/error.c
+++ b/dlls/ntdll/error.c
@@ -1,6 +1,6 @@
 /*
  * NTDLL error handling
- * 
+ *
  * Copyright 2000 Alexandre Julliard
  *
  * This library is free software; you can redistribute it and/or
diff --git a/dlls/ntdll/exception.c b/dlls/ntdll/exception.c
index f936b77..4fe4454 100644
--- a/dlls/ntdll/exception.c
+++ b/dlls/ntdll/exception.c
@@ -1,6 +1,6 @@
 /*
  * NT exception handling routines
- * 
+ *
  * Copyright 1999 Turchanov Sergey
  * Copyright 1999 Alexandre Julliard
  *
@@ -57,7 +57,7 @@
 extern void SIGNAL_Unblock(void);
 
 void WINAPI EXC_RtlRaiseException( PEXCEPTION_RECORD, PCONTEXT );
-void WINAPI EXC_RtlUnwind( PEXCEPTION_FRAME, LPVOID, 
+void WINAPI EXC_RtlUnwind( PEXCEPTION_FRAME, LPVOID,
                            PEXCEPTION_RECORD, DWORD, PCONTEXT );
 void WINAPI EXC_NtRaiseException( PEXCEPTION_RECORD, PCONTEXT,
                                   BOOL, PCONTEXT );
@@ -103,7 +103,7 @@
  * rely on Base Pointer (EBP) to have a fixed position related to the exception frame
  */
 static DWORD EXC_CallHandler( EXCEPTION_RECORD *record, EXCEPTION_FRAME *frame,
-                              CONTEXT *context, EXCEPTION_FRAME **dispatcher, 
+                              CONTEXT *context, EXCEPTION_FRAME **dispatcher,
                               PEXCEPTION_HANDLER handler, PEXCEPTION_HANDLER nested_handler)
 {
     EXC_NESTED_FRAME newframe;
@@ -251,9 +251,9 @@
 /*******************************************************************
  *		RtlUnwind (NTDLL.@)
  */
-DEFINE_REGS_ENTRYPOINT_4( RtlUnwind, EXC_RtlUnwind, 
+DEFINE_REGS_ENTRYPOINT_4( RtlUnwind, EXC_RtlUnwind,
                           PEXCEPTION_FRAME, LPVOID, PEXCEPTION_RECORD, DWORD );
-void WINAPI EXC_RtlUnwind( PEXCEPTION_FRAME pEndFrame, LPVOID unusedEip, 
+void WINAPI EXC_RtlUnwind( PEXCEPTION_FRAME pEndFrame, LPVOID unusedEip,
                            PEXCEPTION_RECORD pRecord, DWORD returnEax,
                            CONTEXT *context )
 {
@@ -270,7 +270,7 @@
         record.ExceptionCode    = STATUS_UNWIND;
         record.ExceptionFlags   = 0;
         record.ExceptionRecord  = NULL;
-        record.ExceptionAddress = GET_IP(context); 
+        record.ExceptionAddress = GET_IP(context);
         record.NumberParameters = 0;
         pRecord = &record;
     }
diff --git a/dlls/ntdll/file.c b/dlls/ntdll/file.c
index dd17086..87f2deb 100644
--- a/dlls/ntdll/file.c
+++ b/dlls/ntdll/file.c
@@ -47,7 +47,7 @@
 	ULONG OpenOptions)
 {
 	FIXME("(%p,0x%08lx,%p,%p,0x%08lx,0x%08lx) stub\n",
-	FileHandle, DesiredAccess, ObjectAttributes, 
+	FileHandle, DesiredAccess, ObjectAttributes,
 	IoStatusBlock, ShareAccess, OpenOptions);
 	dump_ObjectAttributes (ObjectAttributes);
 	return 0;
@@ -84,7 +84,7 @@
 	ULONG CreateDisposition,
 	ULONG CreateOptions,
 	PVOID EaBuffer,
-	ULONG EaLength)  
+	ULONG EaLength)
 {
 	FIXME("(%p,0x%08lx,%p,%p,%p,0x%08lx,0x%08lx,0x%08lx,0x%08lx,%p,0x%08lx) stub\n",
 	FileHandle,DesiredAccess,ObjectAttributes,
@@ -178,7 +178,7 @@
 	PIO_STATUS_BLOCK IoStatusBlock,
 	PVOID FsInformation,
         ULONG Length,
-	FS_INFORMATION_CLASS FsInformationClass) 
+	FS_INFORMATION_CLASS FsInformationClass)
 {
 	FIXME("(0x%08x,%p,%p,0x%08lx,0x%08x) stub\n",
 	FileHandle,IoStatusBlock,FsInformation,Length,FsInformationClass);
@@ -237,7 +237,7 @@
 {
 	FIXME("(0x%08x 0x%08x %p %p %p %p 0x%08lx 0x%08x 0x%08x %p 0x%08x\n",
 	FileHandle, Event, ApcRoutine, ApcContext, IoStatusBlock, FileInformation,
-	Length, FileInformationClass, ReturnSingleEntry, 
+	Length, FileInformationClass, ReturnSingleEntry,
 	debugstr_us(FileName),RestartScan);
 	return 0;
 }
@@ -271,7 +271,7 @@
 	    len = sizeof( FILE_FS_SIZE_INFORMATION );
 	    break;
 
-	  case FileFsDeviceInformation:	
+	  case FileFsDeviceInformation:
 	    len = sizeof( FILE_FS_DEVICE_INFORMATION );
 	    break;
 	  case FileFsAttributeInformation:
@@ -308,11 +308,11 @@
 	  case FileFsSizeInformation:
 	    break;
 
-	  case FileFsDeviceInformation:	
+	  case FileFsDeviceInformation:
 	    if (FSInformation)
 	    {
 	      FILE_FS_DEVICE_INFORMATION * DeviceInfo = FSInformation;
-	      DeviceInfo->DeviceType = FILE_DEVICE_DISK; 
+	      DeviceInfo->DeviceType = FILE_DEVICE_DISK;
 	      DeviceInfo->Characteristics = 0;
 	      break;
 	    };
diff --git a/dlls/ntdll/heap.c b/dlls/ntdll/heap.c
index 94a02f2..7821ef3 100644
--- a/dlls/ntdll/heap.c
+++ b/dlls/ntdll/heap.c
@@ -172,7 +172,7 @@
         DWORD freeSize = 0, usedSize = 0, arenaSize = subheap->headerSize;
         DPRINTF( "\n\nSub-heap %08lx: size=%08lx committed=%08lx\n",
 	      (DWORD)subheap, subheap->size, subheap->commitSize );
-	
+
         DPRINTF( "\n Block   Stat   Size    Id\n" );
         ptr = (char*)subheap + subheap->headerSize;
         while (ptr < (char *)subheap + subheap->size)
@@ -529,7 +529,7 @@
 
     /* Create the first free block */
 
-    HEAP_CreateFreeBlock( subheap, (LPBYTE)subheap + subheap->headerSize, 
+    HEAP_CreateFreeBlock( subheap, (LPBYTE)subheap + subheap->headerSize,
                           subheap->size - subheap->headerSize );
 
     return TRUE;
@@ -699,8 +699,8 @@
     /* Check that next arena is free */
     if (!(pArena->next->size & ARENA_FLAG_FREE) ||
         (pArena->next->magic != ARENA_FREE_MAGIC))
-    { 
-        ERR("Heap %08lx: next arena %08lx invalid for %08lx\n", 
+    {
+        ERR("Heap %08lx: next arena %08lx invalid for %08lx\n",
                  (DWORD)subheap->heap, (DWORD)pArena->next, (DWORD)pArena );
         return FALSE;
     }
@@ -714,10 +714,10 @@
     /* Check that prev arena is free */
     if (!(pArena->prev->size & ARENA_FLAG_FREE) ||
         (pArena->prev->magic != ARENA_FREE_MAGIC))
-    { 
+    {
 	/* this often means that the prev arena got overwritten
 	 * by a memory write before that prev arena */
-        ERR("Heap %08lx: prev arena %08lx invalid for %08lx\n", 
+        ERR("Heap %08lx: prev arena %08lx invalid for %08lx\n",
                  (DWORD)subheap->heap, (DWORD)pArena->prev, (DWORD)pArena );
         return FALSE;
     }
@@ -789,7 +789,7 @@
         return FALSE;
     }
     /* Check size flags */
-    if (pArena->size & ARENA_FLAG_FREE) 
+    if (pArena->size & ARENA_FLAG_FREE)
     {
         ERR("Heap %08lx: bad flags %lx for in-use arena %08lx\n",
                  (DWORD)subheap->heap, pArena->size & ~ARENA_SIZE_MASK, (DWORD)pArena );
@@ -823,8 +823,8 @@
         /* Check that prev arena is free */
         if (!(pPrev->size & ARENA_FLAG_FREE) ||
             (pPrev->magic != ARENA_FREE_MAGIC))
-        { 
-            ERR("Heap %08lx: prev arena %08lx invalid for in-use %08lx\n", 
+        {
+            ERR("Heap %08lx: prev arena %08lx invalid for in-use %08lx\n",
                      (DWORD)subheap->heap, (DWORD)pPrev, (DWORD)pArena );
             return FALSE;
         }
@@ -877,9 +877,9 @@
             ((char *)block < (char *)subheap + subheap->headerSize
                               + sizeof(ARENA_INUSE)))
         {
-            if (quiet == NOISY) 
+            if (quiet == NOISY)
                 ERR("Heap %p: block %p is not inside heap\n", heapPtr, block );
-            else if (WARN_ON(heap)) 
+            else if (WARN_ON(heap))
                 WARN("Heap %p: block %p is not inside heap\n", heapPtr, block );
             ret = FALSE;
         } else
diff --git a/dlls/ntdll/nt.c b/dlls/ntdll/nt.c
index 56913b4..691d19d 100644
--- a/dlls/ntdll/nt.c
+++ b/dlls/ntdll/nt.c
@@ -1,6 +1,6 @@
 /*
  * NT basis DLL
- * 
+ *
  * This file contains the Nt* API functions of NTDLL.DLL.
  * In the original ntdll.dll they all seem to just call int 0x2e (down to the NTOSKRNL)
  *
@@ -36,7 +36,7 @@
 /*
  *	Timer object
  */
- 
+
 /**************************************************************************
  *		NtCreateTimer				[NTDLL.@]
  *		ZwCreateTimer				[NTDLL.@]
@@ -73,7 +73,7 @@
 /******************************************************************************
  * NtQueryTimerResolution [NTDLL.@]
  */
-NTSTATUS WINAPI NtQueryTimerResolution(DWORD x1,DWORD x2,DWORD x3) 
+NTSTATUS WINAPI NtQueryTimerResolution(DWORD x1,DWORD x2,DWORD x3)
 {
 	FIXME("(0x%08lx,0x%08lx,0x%08lx), stub!\n",x1,x2,x3);
 	return 1;
@@ -171,7 +171,7 @@
  */
 NTSTATUS WINAPI NtResumeThread(
 	IN HANDLE ThreadHandle,
-	IN PULONG SuspendCount) 
+	IN PULONG SuspendCount)
 {
 	FIXME("(0x%08x,%p),stub!\n",
 	ThreadHandle,SuspendCount);
@@ -269,8 +269,8 @@
  */
 NTSTATUS WINAPI NtOpenProcessToken(
 	HANDLE ProcessHandle,
-	DWORD DesiredAccess, 
-	HANDLE *TokenHandle) 
+	DWORD DesiredAccess,
+	HANDLE *TokenHandle)
 {
 	FIXME("(0x%08x,0x%08lx,%p): stub\n",
 	ProcessHandle,DesiredAccess, TokenHandle);
@@ -284,9 +284,9 @@
  */
 NTSTATUS WINAPI NtOpenThreadToken(
 	HANDLE ThreadHandle,
-	DWORD DesiredAccess, 
+	DWORD DesiredAccess,
 	BOOLEAN OpenAsSelf,
-	HANDLE *TokenHandle) 
+	HANDLE *TokenHandle)
 {
 	FIXME("(0x%08x,0x%08lx,0x%08x,%p): stub\n",
 	ThreadHandle,DesiredAccess, OpenAsSelf, TokenHandle);
@@ -325,10 +325,10 @@
 */
 NTSTATUS WINAPI NtQueryInformationToken(
 	HANDLE token,
-	DWORD tokeninfoclass, 
+	DWORD tokeninfoclass,
 	LPVOID tokeninfo,
 	DWORD tokeninfolength,
-	LPDWORD retlen ) 
+	LPDWORD retlen )
 {
     unsigned int len = 0;
 
@@ -416,7 +416,7 @@
 /*
  *	Section
  */
- 
+
 /******************************************************************************
  *  NtCreateSection	[NTDLL.@]
  *  ZwCreateSection	[NTDLL.@]
@@ -480,7 +480,7 @@
  *  ZeroBits		Number of high order address bits that must be zero
  *  CommitSize		Size in bytes of the initially committed section of the view
  *  SectionOffset	Offset in bytes from the beginning of the section to the beginning of the view
- *  ViewSize		Desired length of map (or zero to map all) on entry 
+ *  ViewSize		Desired length of map (or zero to map all) on entry
  			Actual length mapped on exit
  *  InheritDisposition	Specified how the view is to be shared with
  *			child processes
@@ -513,7 +513,7 @@
  *  NtCreatePort		[NTDLL.@]
  *  ZwCreatePort		[NTDLL.@]
  */
-NTSTATUS WINAPI NtCreatePort(DWORD x1,DWORD x2,DWORD x3,DWORD x4,DWORD x5) 
+NTSTATUS WINAPI NtCreatePort(DWORD x1,DWORD x2,DWORD x3,DWORD x4,DWORD x5)
 {
 	FIXME("(0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx),stub!\n",x1,x2,x3,x4,x5);
 	return 0;
@@ -523,7 +523,7 @@
  *  NtConnectPort		[NTDLL.@]
  *  ZwConnectPort		[NTDLL.@]
  */
-NTSTATUS WINAPI NtConnectPort(DWORD x1,PUNICODE_STRING uni,DWORD x3,DWORD x4,DWORD x5,DWORD x6,DWORD x7,DWORD x8) 
+NTSTATUS WINAPI NtConnectPort(DWORD x1,PUNICODE_STRING uni,DWORD x3,DWORD x4,DWORD x5,DWORD x6,DWORD x7,DWORD x8)
 {
 	FIXME("(0x%08lx,%s,0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx),stub!\n",
 	x1,debugstr_w(uni->Buffer),x3,x4,x5,x6,x7,x8);
@@ -534,7 +534,7 @@
  *  NtListenPort		[NTDLL.@]
  *  ZwListenPort		[NTDLL.@]
  */
-NTSTATUS WINAPI NtListenPort(DWORD x1,DWORD x2) 
+NTSTATUS WINAPI NtListenPort(DWORD x1,DWORD x2)
 {
 	FIXME("(0x%08lx,0x%08lx),stub!\n",x1,x2);
 	return 0;
@@ -544,7 +544,7 @@
  *  NtAcceptConnectPort	[NTDLL.@]
  *  ZwAcceptConnectPort	[NTDLL.@]
  */
-NTSTATUS WINAPI NtAcceptConnectPort(DWORD x1,DWORD x2,DWORD x3,DWORD x4,DWORD x5,DWORD x6) 
+NTSTATUS WINAPI NtAcceptConnectPort(DWORD x1,DWORD x2,DWORD x3,DWORD x4,DWORD x5,DWORD x6)
 {
 	FIXME("(0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx),stub!\n",x1,x2,x3,x4,x5,x6);
 	return 0;
@@ -554,7 +554,7 @@
  *  NtCompleteConnectPort	[NTDLL.@]
  *  ZwCompleteConnectPort	[NTDLL.@]
  */
-NTSTATUS WINAPI NtCompleteConnectPort(DWORD x1) 
+NTSTATUS WINAPI NtCompleteConnectPort(DWORD x1)
 {
 	FIXME("(0x%08lx),stub!\n",x1);
 	return 0;
@@ -564,7 +564,7 @@
  *  NtRegisterThreadTerminatePort	[NTDLL.@]
  *  ZwRegisterThreadTerminatePort	[NTDLL.@]
  */
-NTSTATUS WINAPI NtRegisterThreadTerminatePort(DWORD x1) 
+NTSTATUS WINAPI NtRegisterThreadTerminatePort(DWORD x1)
 {
 	FIXME("(0x%08lx),stub!\n",x1);
 	return 0;
@@ -574,7 +574,7 @@
  *  NtRequestWaitReplyPort		[NTDLL.@]
  *  ZwRequestWaitReplyPort		[NTDLL.@]
  */
-NTSTATUS WINAPI NtRequestWaitReplyPort(DWORD x1,DWORD x2,DWORD x3) 
+NTSTATUS WINAPI NtRequestWaitReplyPort(DWORD x1,DWORD x2,DWORD x3)
 {
 	FIXME("(0x%08lx,0x%08lx,0x%08lx),stub!\n",x1,x2,x3);
 	return 0;
@@ -584,7 +584,7 @@
  *  NtReplyWaitReceivePort	[NTDLL.@]
  *  ZwReplyWaitReceivePort	[NTDLL.@]
  */
-NTSTATUS WINAPI NtReplyWaitReceivePort(DWORD x1,DWORD x2,DWORD x3,DWORD x4) 
+NTSTATUS WINAPI NtReplyWaitReceivePort(DWORD x1,DWORD x2,DWORD x3,DWORD x4)
 {
 	FIXME("(0x%08lx,0x%08lx,0x%08lx,0x%08lx),stub!\n",x1,x2,x3,x4);
 	return 0;
@@ -608,7 +608,7 @@
  */
 NTSTATUS WINAPI NtQueryPerformanceCounter(
 	IN PLARGE_INTEGER Counter,
-	IN PLARGE_INTEGER Frequency) 
+	IN PLARGE_INTEGER Frequency)
 {
 	FIXME("(%p, 0%p) stub\n",
 	Counter, Frequency);
@@ -619,7 +619,7 @@
  *  NtCreateMailslotFile	[NTDLL.@]
  *  ZwCreateMailslotFile	[NTDLL.@]
  */
-NTSTATUS WINAPI NtCreateMailslotFile(DWORD x1,DWORD x2,DWORD x3,DWORD x4,DWORD x5,DWORD x6,DWORD x7,DWORD x8) 
+NTSTATUS WINAPI NtCreateMailslotFile(DWORD x1,DWORD x2,DWORD x3,DWORD x4,DWORD x5,DWORD x6,DWORD x7,DWORD x8)
 {
 	FIXME("(0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx),stub!\n",x1,x2,x3,x4,x5,x6,x7,x8);
 	return 0;
@@ -634,7 +634,7 @@
  *	SystemTimeAdjustmentInformation	SYSTEM_TIME_ADJUSTMENT
  *	SystemCacheInformation		SYSTEM_CACHE_INFORMATION
  *	SystemConfigurationInformation	CONFIGURATION_INFORMATION
- *	observed (class/len): 
+ *	observed (class/len):
  *		0x0/0x2c
  *		0x12/0x18
  *		0x2/0x138
@@ -692,7 +692,7 @@
 
 /******************************************************************************
  *  NtDisplayString				[NTDLL.@]
- * 
+ *
  * writes a string to the nt-textmode screen eg. during startup
  */
 NTSTATUS WINAPI NtDisplayString ( PUNICODE_STRING string )
@@ -710,7 +710,7 @@
 
 /******************************************************************************
  *  NtPowerInformation				[NTDLL.@]
- * 
+ *
  */
 NTSTATUS WINAPI NtPowerInformation(DWORD x1,DWORD x2,DWORD x3,DWORD x4,DWORD x5)
 {
diff --git a/dlls/ntdll/om.c b/dlls/ntdll/om.c
index 217d41e..56f6523 100644
--- a/dlls/ntdll/om.c
+++ b/dlls/ntdll/om.c
@@ -35,7 +35,7 @@
 /*
  *	Generic object functions
  */
- 
+
 /******************************************************************************
  * NtQueryObject [NTDLL.@]
  * ZwQueryObject [NTDLL.@]
@@ -59,12 +59,12 @@
  *
  * NOTES
  *  only the lowest 4 bit of SecurityObjectInformationClass are used
- *  0x7-0xf returns STATUS_ACCESS_DENIED (even running with system privileges) 
+ *  0x7-0xf returns STATUS_ACCESS_DENIED (even running with system privileges)
  *
- * FIXME: we are constructing a fake sid 
+ * FIXME: we are constructing a fake sid
  *  (Administrators:Full, System:Full, Everyone:Read)
  */
-NTSTATUS WINAPI 
+NTSTATUS WINAPI
 NtQuerySecurityObject(
 	IN HANDLE Object,
 	IN SECURITY_INFORMATION RequestedInformation,
@@ -77,7 +77,7 @@
 	BYTE Buffer[256];
 	PISECURITY_DESCRIPTOR_RELATIVE psd = (PISECURITY_DESCRIPTOR_RELATIVE)Buffer;
 	UINT BufferIndex = sizeof(SECURITY_DESCRIPTOR_RELATIVE);
-	
+
 	FIXME("(0x%08x,0x%08lx,%p,0x%08lx,%p) stub!\n",
 	Object, RequestedInformation, pSecurityDesriptor, Length, ResultLength);
 
@@ -87,7 +87,7 @@
 
 	ZeroMemory(Buffer, 256);
 	RtlCreateSecurityDescriptor((PSECURITY_DESCRIPTOR)psd, SECURITY_DESCRIPTOR_REVISION);
-	psd->Control = SE_SELF_RELATIVE | 
+	psd->Control = SE_SELF_RELATIVE |
 	  ((RequestedInformation & DACL_SECURITY_INFORMATION) ? SE_DACL_PRESENT:0);
 
 	/* owner: administrator S-1-5-20-220*/
@@ -104,7 +104,7 @@
 	  psid->SubAuthority[0] = SECURITY_BUILTIN_DOMAIN_RID;
 	  psid->SubAuthority[1] = DOMAIN_ALIAS_RID_ADMINS;
 	}
-	
+
 	/* group: built in domain S-1-5-12 */
 	if (GROUP_SECURITY_INFORMATION & RequestedInformation)
 	{
@@ -126,7 +126,7 @@
 	  PACL pacl = (PACL)&(Buffer[BufferIndex]);
 	  PACCESS_ALLOWED_ACE pace;
 	  PSID psid;
-	  	  	  
+
 	  psd->Dacl = BufferIndex;
 
 	  pacl->AclRevision = MIN_ACL_REVISION;
@@ -134,7 +134,7 @@
 	  pacl->AclSize = BufferIndex; /* storing the start index temporary */
 
 	  BufferIndex += sizeof(ACL);
-	  
+
 	  /* ACE System - full access */
 	  pace = (PACCESS_ALLOWED_ACE)&(Buffer[BufferIndex]);
 	  BufferIndex += sizeof(ACCESS_ALLOWED_ACE)-sizeof(DWORD);
@@ -154,7 +154,7 @@
 	  psid->SubAuthorityCount = 1;
 	  psid->IdentifierAuthority = localSidAuthority;
 	  psid->SubAuthority[0] = SECURITY_LOCAL_SYSTEM_RID;
-	  
+
 	  /* ACE Administrators - full access*/
 	  pace = (PACCESS_ALLOWED_ACE) &(Buffer[BufferIndex]);
 	  BufferIndex += sizeof(ACCESS_ALLOWED_ACE)-sizeof(DWORD);
@@ -175,7 +175,7 @@
 	  psid->IdentifierAuthority = localSidAuthority;
 	  psid->SubAuthority[0] = SECURITY_BUILTIN_DOMAIN_RID;
 	  psid->SubAuthority[1] = DOMAIN_ALIAS_RID_ADMINS;
-	 
+
 	  /* ACE Everyone - read access */
 	  pace = (PACCESS_ALLOWED_ACE)&(Buffer[BufferIndex]);
 	  BufferIndex += sizeof(ACCESS_ALLOWED_ACE)-sizeof(DWORD);
@@ -277,7 +277,7 @@
 	ACCESS_MASK DesiredAccess,
 	POBJECT_ATTRIBUTES ObjectAttributes)
 {
-	FIXME("(%p,0x%08lx,%p): stub\n", 
+	FIXME("(%p,0x%08lx,%p): stub\n",
 	DirectoryHandle, DesiredAccess, ObjectAttributes);
 	dump_ObjectAttributes(ObjectAttributes);
 	return 0;
@@ -290,7 +290,7 @@
 NTSTATUS WINAPI NtCreateDirectoryObject(
 	PHANDLE DirectoryHandle,
 	ACCESS_MASK DesiredAccess,
-	POBJECT_ATTRIBUTES ObjectAttributes) 
+	POBJECT_ATTRIBUTES ObjectAttributes)
 {
 	FIXME("(%p,0x%08lx,%p),stub!\n",
 	DirectoryHandle,DesiredAccess,ObjectAttributes);
@@ -330,7 +330,7 @@
 /*
  *	Link objects
  */
- 
+
 /******************************************************************************
  *  NtOpenSymbolicLinkObject	[NTDLL.@]
  */
diff --git a/dlls/ntdll/reg.c b/dlls/ntdll/reg.c
index b2b99c9..740fe0d 100644
--- a/dlls/ntdll/reg.c
+++ b/dlls/ntdll/reg.c
@@ -86,7 +86,7 @@
  *
  *   OUT	PHANDLE			retkey (returns 0 when failure)
  *   IN		ACCESS_MASK		access
- *   IN		POBJECT_ATTRIBUTES 	attr 
+ *   IN		POBJECT_ATTRIBUTES 	attr
  */
 NTSTATUS WINAPI NtOpenKey( PHANDLE retkey, ACCESS_MASK access, const OBJECT_ATTRIBUTES *attr )
 {
@@ -248,7 +248,7 @@
  * ZwEnumerateKey [NTDLL.@]
  *
  * NOTES
- *  the name copied into the buffer is NOT 0-terminated 
+ *  the name copied into the buffer is NOT 0-terminated
  */
 NTSTATUS WINAPI NtEnumerateKey( HANDLE handle, ULONG index, KEY_INFORMATION_CLASS info_class,
                                 void *info, DWORD length, DWORD *result_len )
@@ -540,7 +540,7 @@
  * ZwSetValueKey [NTDLL.@]
  *
  * NOTES
- *   win95 does not care about count for REG_SZ and finds out the len by itself (js) 
+ *   win95 does not care about count for REG_SZ and finds out the len by itself (js)
  *   NT does definitely care (aj)
  */
 NTSTATUS WINAPI NtSetValueKey( HANDLE hkey, const UNICODE_STRING *name, ULONG TitleIndex,
diff --git a/dlls/ntdll/rtl.c b/dlls/ntdll/rtl.c
index 23431cb..3b96138 100644
--- a/dlls/ntdll/rtl.c
+++ b/dlls/ntdll/rtl.c
@@ -1,8 +1,8 @@
 /*
  * NT basis DLL
- * 
+ *
  * This file contains the Rtl* API functions. These should be implementable.
- * 
+ *
  * Copyright 1996-1998 Marcus Meissner
  *		  1999 Alex Korobka
  *
@@ -121,7 +121,7 @@
     else  /* one or more shared locks are in progress */
 	 if( fWait )
 	     goto wait;
-	 
+
     if( retVal == 1 )
 	rwl->hOwningThreadId = GetCurrentThreadId();
 done:
@@ -148,7 +148,7 @@
 	    retVal = 1;
 	    goto done;
 	}
-	
+
 	if( fWait )
 	{
 	    rwl->uSharedWaiters++;
@@ -158,7 +158,7 @@
 	    goto start;
 	}
     }
-    else 
+    else
     {
 	if( dwWait != WAIT_OBJECT_0 ) /* otherwise RtlReleaseResource() has already done it */
 	    rwl->iNumberActive++;
@@ -189,7 +189,7 @@
 	    }
 	}
     }
-    else 
+    else
     if( rwl->iNumberActive < 0 ) /* have a writer, possibly recursive */
     {
 	if( ++rwl->iNumberActive == 0 )
@@ -219,7 +219,7 @@
 {
     if( rwl )
     {
-	MESSAGE("RtlDumpResource(%p):\n\tactive count = %i\n\twaiting readers = %i\n\twaiting writers = %i\n",  
+	MESSAGE("RtlDumpResource(%p):\n\tactive count = %i\n\twaiting readers = %i\n\twaiting writers = %i\n",
 		rwl, rwl->iNumberActive, rwl->uSharedWaiters, rwl->uExclusiveWaiters );
 	if( rwl->iNumberActive )
 	    MESSAGE("\towner thread = %08x\n", rwl->hOwningThreadId );
@@ -240,7 +240,7 @@
 
        va_start(args, fmt);
        vsprintf(buf,fmt, args);
-       va_end(args); 
+       va_end(args);
 
 	MESSAGE("DbgPrint says: %s",buf);
 	/* hmm, raise exception? */
@@ -398,7 +398,7 @@
 
 /******************************************************************************
  *  RtlInitializeBitMap			[NTDLL.@]
- * 
+ *
  */
 NTSTATUS WINAPI RtlInitializeBitMap(DWORD x1,DWORD x2,DWORD x3)
 {
@@ -408,7 +408,7 @@
 
 /******************************************************************************
  *  RtlSetBits				[NTDLL.@]
- * 
+ *
  */
 NTSTATUS WINAPI RtlSetBits(DWORD x1,DWORD x2,DWORD x3)
 {
@@ -418,7 +418,7 @@
 
 /******************************************************************************
  *  RtlFindClearBits			[NTDLL.@]
- * 
+ *
  */
 NTSTATUS WINAPI RtlFindClearBits(DWORD x1,DWORD x2,DWORD x3)
 {
@@ -428,7 +428,7 @@
 
 /******************************************************************************
  *  RtlClearBits			[NTDLL.@]
- * 
+ *
  */
 NTSTATUS WINAPI RtlClearBits(DWORD x1,DWORD x2,DWORD x3)
 {
@@ -437,14 +437,14 @@
 }
 
 /******************************************************************************
- *  RtlCopyMemory   [NTDLL] 
- * 
+ *  RtlCopyMemory   [NTDLL]
+ *
  */
 #undef RtlCopyMemory
 VOID WINAPI RtlCopyMemory( VOID *Destination, CONST VOID *Source, SIZE_T Length )
 {
     memcpy(Destination, Source, Length);
-}	
+}
 
 /******************************************************************************
  *  RtlMoveMemory   [NTDLL.@]
diff --git a/dlls/ntdll/sec.c b/dlls/ntdll/sec.c
index 2d026b5..25eb86e 100644
--- a/dlls/ntdll/sec.c
+++ b/dlls/ntdll/sec.c
@@ -123,7 +123,7 @@
 /******************************************************************************
  * RtlEqualPrefixSid	[NTDLL.@]
  */
-BOOL WINAPI RtlEqualPrefixSid (PSID pSid1, PSID pSid2) 
+BOOL WINAPI RtlEqualPrefixSid (PSID pSid1, PSID pSid2)
 {
     if (!RtlValidSid(pSid1) || !RtlValidSid(pSid2))
         return FALSE;
@@ -141,7 +141,7 @@
 /******************************************************************************
  *  RtlFreeSid		[NTDLL.@]
  */
-DWORD WINAPI RtlFreeSid(PSID pSid) 
+DWORD WINAPI RtlFreeSid(PSID pSid)
 {
 	TRACE("(%p)\n", pSid);
 	RtlFreeHeap( GetProcessHeap(), 0, pSid );
@@ -165,7 +165,7 @@
 DWORD WINAPI RtlLengthSid(PSID pSid)
 {
 	TRACE("sid=%p\n",pSid);
-	if (!pSid) return 0; 
+	if (!pSid) return 0;
 	return RtlLengthRequiredSid(*RtlSubAuthorityCountSid(pSid));
 }
 
@@ -279,9 +279,9 @@
  * RtlCreateSecurityDescriptor			[NTDLL.@]
  *
  * RETURNS:
- *  0 success, 
+ *  0 success,
  *  STATUS_INVALID_OWNER, STATUS_PRIVILEGE_NOT_HELD, STATUS_NO_INHERITANCE,
- *  STATUS_NO_MEMORY 
+ *  STATUS_NO_MEMORY
  */
 NTSTATUS WINAPI RtlCreateSecurityDescriptor(
 	PSECURITY_DESCRIPTOR lpsd,
@@ -360,7 +360,7 @@
 	}
 
 	*lpbDaclDefaulted = (( SE_DACL_DEFAULTED & pSecurityDescriptor->Control ) ? 1 : 0);
-	
+
 	return STATUS_SUCCESS;
 }
 
@@ -378,7 +378,7 @@
 	if (lpsd->Control & SE_SELF_RELATIVE)
 		return STATUS_INVALID_SECURITY_DESCR;
 
-	if (!daclpresent) 
+	if (!daclpresent)
 	{	lpsd->Control &= ~SE_DACL_PRESENT;
 		return TRUE;
 	}
@@ -421,7 +421,7 @@
 	}
 
 	*lpbSaclDefaulted = (( SE_SACL_DEFAULTED & pSecurityDescriptor->Control ) ? 1 : 0);
-	
+
 	return STATUS_SUCCESS;
 }
 
@@ -532,7 +532,7 @@
 			*GroupDefaulted = FALSE;
 	}
 	return STATUS_SUCCESS;
-} 
+}
 
 /**************************************************************************
  *                 RtlMakeSelfRelativeSD		[NTDLL.@]
@@ -646,7 +646,7 @@
 /******************************************************************************
  *  RtlGetAce		[NTDLL.@]
  */
-DWORD WINAPI RtlGetAce(PACL pAcl,DWORD dwAceIndex,LPVOID *pAce ) 
+DWORD WINAPI RtlGetAce(PACL pAcl,DWORD dwAceIndex,LPVOID *pAce )
 {
 	FIXME("(%p,%ld,%p),stub!\n",pAcl,dwAceIndex,pAce);
 	return 0;
@@ -659,7 +659,7 @@
 /******************************************************************************
  *  RtlAdjustPrivilege		[NTDLL.@]
  */
-DWORD WINAPI RtlAdjustPrivilege(DWORD x1,DWORD x2,DWORD x3,DWORD x4) 
+DWORD WINAPI RtlAdjustPrivilege(DWORD x1,DWORD x2,DWORD x3,DWORD x4)
 {
 	FIXME("(0x%08lx,0x%08lx,0x%08lx,0x%08lx),stub!\n",x1,x2,x3,x4);
 	return 0;
@@ -678,7 +678,7 @@
 /******************************************************************************
  *  NtAccessCheck		[NTDLL.@]
  */
-NTSTATUS WINAPI 
+NTSTATUS WINAPI
 NtAccessCheck(
 	IN PSECURITY_DESCRIPTOR SecurityDescriptor,
 	IN HANDLE ClientToken,
@@ -690,7 +690,7 @@
 	OUT PBOOLEAN AccessStatus)
 {
 	FIXME("(%p, %04x, %08lx, %p, %p, %p, %p, %p), stub\n",
-          SecurityDescriptor, ClientToken, DesiredAccess, GenericMapping, 
+          SecurityDescriptor, ClientToken, DesiredAccess, GenericMapping,
           PrivilegeSet, ReturnLength, GrantedAccess, AccessStatus);
 	*AccessStatus = TRUE;
 	return STATUS_SUCCESS;
@@ -703,7 +703,7 @@
 NtSetSecurityObject(
         IN HANDLE Handle,
         IN SECURITY_INFORMATION SecurityInformation,
-        IN PSECURITY_DESCRIPTOR SecurityDescriptor) 
+        IN PSECURITY_DESCRIPTOR SecurityDescriptor)
 {
 	FIXME("0x%08x 0x%08lx %p\n", Handle, SecurityInformation, SecurityDescriptor);
 	return STATUS_SUCCESS;
@@ -720,7 +720,7 @@
 {
 	FIXME("(%p,%p,%p),stub!\n",pSecurityDescriptor,pControl,lpdwRevision);
 	return STATUS_SUCCESS;
-}		
+}
 
 /******************************************************************************
  * RtlConvertSidToUnicodeString (NTDLL.@)
diff --git a/dlls/ntdll/signal_i386.c b/dlls/ntdll/signal_i386.c
index addd3d2..d93ce86 100644
--- a/dlls/ntdll/signal_i386.c
+++ b/dlls/ntdll/signal_i386.c
@@ -1,6 +1,6 @@
 /*
  * i386 signal handling routines
- * 
+ *
  * Copyright 1999 Alexandre Julliard
  *
  * This library is free software; you can redistribute it and/or
@@ -179,7 +179,7 @@
 #define ESI_sig(context)     ((context)->tf_esi)
 #define EDI_sig(context)     ((context)->tf_edi)
 #define EBP_sig(context)     ((context)->tf_ebp)
-                            
+
 #define CS_sig(context)      ((context)->tf_cs)
 #define DS_sig(context)      ((context)->tf_ds)
 #define ES_sig(context)      ((context)->tf_es)
@@ -259,13 +259,13 @@
 #define ESI_sig(context)     ((context)->sc_esi)
 #define EDI_sig(context)     ((context)->sc_edi)
 #define EBP_sig(context)     ((context)->sc_ebp)
-                            
+
 #define CS_sig(context)      ((context)->sc_cs)
 #define DS_sig(context)      ((context)->sc_ds)
 #define ES_sig(context)      ((context)->sc_es)
 #define SS_sig(context)      ((context)->sc_ss)
-                            
-/* FS and GS are now in the sigcontext struct of FreeBSD, but not 
+
+/* FS and GS are now in the sigcontext struct of FreeBSD, but not
  * saved by the exception handling. duh.
  * Actually they are in -current (have been for a while), and that
  * patch now finally has been MFC'd to -stable too (Nov 15 1999).
@@ -291,12 +291,12 @@
 
 #ifndef __FreeBSD__
 #define EFL_sig(context)     ((context)->sc_eflags)
-#else                       
+#else
 #define EFL_sig(context)     ((context)->sc_efl)
 /* FreeBSD, see i386/i386/traps.c::trap_pfault va->err kludge  */
 #define CR2_sig(context)     ((context)->sc_err)
 #define TRAP_sig(context)    ((context)->sc_trapno)
-#endif                      
+#endif
 
 #define EIP_sig(context)     (*((unsigned long*)&(context)->sc_eip))
 #define ESP_sig(context)     (*((unsigned long*)&(context)->sc_esp))
@@ -316,17 +316,17 @@
 #define ESI_sig(context)     ((context)->uc_mcontext.gregs[ESI])
 #define EDI_sig(context)     ((context)->uc_mcontext.gregs[EDI])
 #define EBP_sig(context)     ((context)->uc_mcontext.gregs[EBP])
-                            
+
 #define CS_sig(context)      ((context)->uc_mcontext.gregs[CS])
 #define DS_sig(context)      ((context)->uc_mcontext.gregs[DS])
 #define ES_sig(context)      ((context)->uc_mcontext.gregs[ES])
 #define SS_sig(context)      ((context)->uc_mcontext.gregs[SS])
-                            
+
 #define FS_sig(context)      ((context)->uc_mcontext.gregs[FS])
 #define GS_sig(context)      ((context)->uc_mcontext.gregs[GS])
 
 #define EFL_sig(context)     ((context)->uc_mcontext.gregs[EFL])
-                            
+
 #define EIP_sig(context)     ((context)->uc_mcontext.gregs[EIP])
 #ifdef R_ESP
 #define ESP_sig(context)     ((context)->uc_mcontext.gregs[R_ESP])
@@ -483,7 +483,7 @@
 /***********************************************************************
  *           save_context
  *
- * Set the register values from a sigcontext. 
+ * Set the register values from a sigcontext.
  */
 static void save_context( CONTEXT *context, const SIGCONTEXT *sigcontext )
 {
@@ -594,7 +594,7 @@
 /***********************************************************************
  *           save_fpu
  *
- * Set the FPU context from a sigcontext. 
+ * Set the FPU context from a sigcontext.
  */
 inline static void save_fpu( CONTEXT *context, const SIGCONTEXT *sigcontext )
 {
@@ -614,7 +614,7 @@
 /***********************************************************************
  *           restore_fpu
  *
- * Restore the FPU context to a sigcontext. 
+ * Restore the FPU context to a sigcontext.
  */
 inline static void restore_fpu( CONTEXT *context, const SIGCONTEXT *sigcontext )
 {
diff --git a/dlls/ntdll/signal_sparc.c b/dlls/ntdll/signal_sparc.c
index d50e16d..93871a8 100644
--- a/dlls/ntdll/signal_sparc.c
+++ b/dlls/ntdll/signal_sparc.c
@@ -1,6 +1,6 @@
 /*
  * Sparc signal handling routines
- * 
+ *
  * Copyright 1999 Ulrich Weigand
  *
  * This library is free software; you can redistribute it and/or
@@ -151,7 +151,7 @@
     rec.NumberParameters = 2;
     rec.ExceptionInformation[0] = 0;  /* FIXME: read/write access ? */
     rec.ExceptionInformation[1] = (DWORD)info->si_addr;
-    
+
     EXC_RtlRaiseException( &rec, &context );
     restore_context( &context, ucontext );
 }
@@ -176,7 +176,7 @@
         rec.ExceptionCode = EXCEPTION_DATATYPE_MISALIGNMENT;
     else
         rec.ExceptionCode = EXCEPTION_ACCESS_VIOLATION;
-    
+
     EXC_RtlRaiseException( &rec, &context );
     restore_context( &context, ucontext );
 }
@@ -210,7 +210,7 @@
         rec.ExceptionCode = EXCEPTION_STACK_OVERFLOW;
         break;
     }
-    
+
     save_context( &context, ucontext );
     rec.ExceptionRecord  = NULL;
     rec.ExceptionFlags   = EXCEPTION_CONTINUABLE;
diff --git a/dlls/ntdll/string.c b/dlls/ntdll/string.c
index 3e041a0..e504a0b 100644
--- a/dlls/ntdll/string.c
+++ b/dlls/ntdll/string.c
@@ -54,7 +54,7 @@
 /*********************************************************************
  *                  _strlwr   (NTDLL.@)
  *
- * convert a string in place to lowercase 
+ * convert a string in place to lowercase
  */
 LPSTR __cdecl _strlwr( LPSTR str )
 {
diff --git a/dlls/ntdll/sync.c b/dlls/ntdll/sync.c
index ad6e414..51071b3 100644
--- a/dlls/ntdll/sync.c
+++ b/dlls/ntdll/sync.c
@@ -95,7 +95,7 @@
 	PVOID SemaphoreInformationClass,
 	OUT PVOID SemaphoreInformation,
 	ULONG Length,
-	PULONG ReturnLength) 
+	PULONG ReturnLength)
 {
 	FIXME("(0x%08x,%p,%p,0x%08lx,%p) stub!\n",
 	SemaphoreHandle, SemaphoreInformationClass, SemaphoreInformation, Length, ReturnLength);
@@ -124,7 +124,7 @@
 /*
  *	Events
  */
- 
+
 /**************************************************************************
  * NtCreateEvent (NTDLL.@)
  * ZwCreateEvent (NTDLL.@)
diff --git a/dlls/ntdll/time.c b/dlls/ntdll/time.c
index 3dd48a2..6d69bec 100644
--- a/dlls/ntdll/time.c
+++ b/dlls/ntdll/time.c
@@ -1,10 +1,10 @@
 /*
  * Conversion between Time and TimeFields
  *
- * RtlTimeToTimeFields, RtlTimeFieldsToTime and defines are taken from ReactOS and 
- * adapted to wine with special permissions of the author  
+ * RtlTimeToTimeFields, RtlTimeFieldsToTime and defines are taken from ReactOS and
+ * adapted to wine with special permissions of the author
  * Rex Jolliff (rex@lvcablemodem.com)
- * 
+ *
  * Copyright 1999 Juergen Schmied
  *
  * This library is free software; you can redistribute it and/or
@@ -100,11 +100,11 @@
 
 	/* Adjust the values for GMT and leap seconds */
 	SecondsInDay += (GMTOffset - LeapSecondCorrections);
-	while (SecondsInDay < 0) 
+	while (SecondsInDay < 0)
 	{ SecondsInDay += SECSPERDAY;
 	  Days--;
 	}
-	while (SecondsInDay >= SECSPERDAY) 
+	while (SecondsInDay >= SECSPERDAY)
 	{ SecondsInDay -= SECSPERDAY;
 	  Days++;
 	}
diff --git a/dlls/odbc32/proxyodbc.c b/dlls/odbc32/proxyodbc.c
index 4cf86ef..4e8518e1 100644
--- a/dlls/odbc32/proxyodbc.c
+++ b/dlls/odbc32/proxyodbc.c
@@ -1,6 +1,6 @@
 /*
  * Win32 ODBC functions
- * 
+ *
  * Proxy ODBC driver manager.  This manager delegates all ODBC calls to a real ODBC driver manager which is either:
  *  	1) its name is defined in the environment variable LIB_ODBC_DRIVER_MANAGER
  *	2) if LIB_ODBC_DRIVER_MANAGER is not defined, a default library libodbc.so will be used.
@@ -138,7 +138,7 @@
   "",
   "",
   ""
-}; 
+};
 
 /* What is the difference between these two (dmHandle cf READY_AND_dmHandle)? When does one use one and when the other? */
 
diff --git a/dlls/odbc32/proxyodbc.h b/dlls/odbc32/proxyodbc.h
index 7d9e54a..5a750e2 100644
--- a/dlls/odbc32/proxyodbc.h
+++ b/dlls/odbc32/proxyodbc.h
@@ -46,7 +46,7 @@
 	char driverLibName[200];	/* ODBC driver SO name */
 	char dmLibName[200];		/* driver manager library name */
 	char ServerName[200];       /* keep server name */
-	char UserName[50];          /* keep username */	
+	char UserName[50];          /* keep username */
 } PROXYHANDLE;
 
 #define    /* 00 */ SQLAPI_INDEX_SQLALLOCCONNECT       0
diff --git a/dlls/ole32/antimoniker.c b/dlls/ole32/antimoniker.c
index 45738b1..9664eb4 100644
--- a/dlls/ole32/antimoniker.c
+++ b/dlls/ole32/antimoniker.c
@@ -36,7 +36,7 @@
 
     ICOM_VTABLE(IMoniker)*  lpvtbl1;  /* VTable relative to the IMoniker interface.*/
 
-    /* The ROT (RunningObjectTable implementation) uses the IROTData interface to test whether 
+    /* The ROT (RunningObjectTable implementation) uses the IROTData interface to test whether
      * two monikers are equal. That's whay IROTData interface is implemented by monikers.
      */
     ICOM_VTABLE(IROTData)*  lpvtbl2;  /* VTable relative to the IROTData interface.*/
@@ -142,13 +142,13 @@
 HRESULT WINAPI AntiMonikerImpl_QueryInterface(IMoniker* iface,REFIID riid,void** ppvObject)
 {
     ICOM_THIS(AntiMonikerImpl,iface);
-  
+
   TRACE("(%p,%p,%p)\n",This,riid,ppvObject);
 
   /* Perform a sanity check on the parameters.*/
     if ( (This==0) || (ppvObject==0) )
 	return E_INVALIDARG;
-  
+
   /* Initialize the return parameter */
   *ppvObject = 0;
 
@@ -165,7 +165,7 @@
   /* Check that we obtained an interface.*/
     if ((*ppvObject)==0)
         return E_NOINTERFACE;
-  
+
    /* Query Interface always increases the reference count by one when it is successful */
   AntiMonikerImpl_AddRef(iface);
 
@@ -202,7 +202,7 @@
 
         return 0;
     }
-    return This->ref;;
+    return This->ref;
 }
 
 /******************************************************************************
@@ -214,9 +214,9 @@
 
     if (pClassID==NULL)
         return E_POINTER;
-            
+
     *pClassID = CLSID_AntiMoniker;
-        
+
     return S_OK;
 }
 
@@ -258,7 +258,7 @@
 {
     DWORD constant=1;
     HRESULT res;
-    
+
     /* data writen by this function is only a DWORD constant seted to 1 ! */
     res=IStream_Write(pStm,&constant,sizeof(constant),NULL);
 
@@ -277,7 +277,7 @@
         return E_POINTER;
 
     /* for more details see AntiMonikerImpl_Save coments */
-    
+
     /* Normaly the sizemax must be the  size of DWORD ! but I tested this function it ususlly return 16 bytes */
     /* more than the number of bytes used by AntiMoniker::Save function */
     pcbSize->s.LowPart =  sizeof(DWORD)+16;
@@ -356,7 +356,7 @@
     AntiMonikerImpl_AddRef(iface);
 
     *ppmkReduced=iface;
-    
+
     return MK_S_REDUCED_TO_SELF;
 }
 /******************************************************************************
@@ -374,7 +374,7 @@
 	return E_POINTER;
 
     *ppmkComposite=0;
-    
+
     if (fOnlyIfNotGeneric)
         return MK_E_NEEDGENERIC;
     else
@@ -390,7 +390,7 @@
 
     if (ppenumMoniker == NULL)
         return E_POINTER;
-    
+
     *ppenumMoniker = NULL;
 
     return S_OK;
@@ -402,12 +402,12 @@
 HRESULT WINAPI AntiMonikerImpl_IsEqual(IMoniker* iface,IMoniker* pmkOtherMoniker)
 {
     DWORD mkSys;
-    
+
     TRACE("(%p,%p)\n",iface,pmkOtherMoniker);
 
     if (pmkOtherMoniker==NULL)
         return S_FALSE;
-    
+
     IMoniker_IsSystemMoniker(pmkOtherMoniker,&mkSys);
 
     if (mkSys==MKSYS_ANTIMONIKER)
@@ -490,7 +490,7 @@
 HRESULT WINAPI AntiMonikerImpl_CommonPrefixWith(IMoniker* iface,IMoniker* pmkOther,IMoniker** ppmkPrefix)
 {
     DWORD mkSys;
-    
+
     IMoniker_IsSystemMoniker(pmkOther,&mkSys);
 
     if(mkSys==MKSYS_ITEMMONIKER){
@@ -500,7 +500,7 @@
         *ppmkPrefix=iface;
 
         IMoniker_AddRef(iface);
-        
+
         return MK_S_US;
     }
     else
@@ -533,7 +533,7 @@
                                               LPOLESTR *ppszDisplayName)
 {
     WCHAR back[]={'\\','.','.',0};
-    
+
     TRACE("(%p,%p,%p,%p)\n",iface,pbc,pmkToLeft,ppszDisplayName);
 
     if (ppszDisplayName==NULL)
@@ -550,7 +550,7 @@
         return E_OUTOFMEMORY;
 
     strcpyW(*ppszDisplayName,back);
-    
+
     return S_OK;
 }
 
@@ -577,7 +577,7 @@
 
     if (!pwdMksys)
         return E_POINTER;
-    
+
     (*pwdMksys)=MKSYS_ANTIMONIKER;
 
     return S_OK;
@@ -614,7 +614,7 @@
 ULONG   WINAPI AntiMonikerROTDataImpl_Release(IROTData* iface)
 {
     ICOM_THIS_From_IROTData(IMoniker, iface);
-    
+
     TRACE("(%p)\n",iface);
 
     return AntiMonikerImpl_Release(This);
@@ -640,7 +640,7 @@
     AntiMonikerImpl* newAntiMoniker = 0;
     HRESULT        hr = S_OK;
     IID riid=IID_IMoniker;
-    
+
     TRACE("(%p)\n",ppmk);
 
     newAntiMoniker = HeapAlloc(GetProcessHeap(), 0, sizeof(AntiMonikerImpl));
diff --git a/dlls/ole32/bindctx.c b/dlls/ole32/bindctx.c
index 8dda099..e66cc32 100644
--- a/dlls/ole32/bindctx.c
+++ b/dlls/ole32/bindctx.c
@@ -32,7 +32,7 @@
 WINE_DEFAULT_DEBUG_CHANNEL(ole);
 
 /* represent the first size table and it's increment block size */
-#define  BLOCK_TAB_SIZE 10 
+#define  BLOCK_TAB_SIZE 10
 #define  MAX_TAB_SIZE   0xFFFFFFFF
 
 /* data structure of the BindCtx table elements */
@@ -50,7 +50,7 @@
 typedef struct BindCtxImpl{
 
     ICOM_VFIELD(IBindCtx); /* VTable relative to the IBindCtx interface.*/
-                                     
+
     ULONG ref; /* reference counter for this object */
 
     BindCtxObject* bindCtxTable; /* this is a table in which all bounded objects are stored*/
@@ -114,7 +114,7 @@
   /* Perform a sanity check on the parameters.*/
   if ( (This==0) || (ppvObject==0) )
       return E_INVALIDARG;
-  
+
   /* Initialize the return parameter.*/
   *ppvObject = 0;
 
@@ -128,7 +128,7 @@
   /* Check that we obtained an interface.*/
   if ((*ppvObject)==0)
       return E_NOINTERFACE;
-  
+
    /* Query Interface always increases the reference count by one when it is successful */
   BindCtxImpl_AddRef(iface);
 
@@ -167,7 +167,7 @@
 
         return 0;
     }
-    return This->ref;;
+    return This->ref;
 }
 
 
@@ -235,9 +235,9 @@
 
     if (punk==NULL)
         return E_POINTER;
-    
+
     IUnknown_AddRef(punk);
-    
+
     /* put the object in the first free element in the table */
     This->bindCtxTable[lastIndex].pObj = punk;
     This->bindCtxTable[lastIndex].pkeyObj = NULL;
@@ -275,15 +275,15 @@
 
     /* check if the object was registred or not */
     if (BindCtxImpl_GetObjectIndex(This,punk,NULL,&index)==S_FALSE)
-        
+
         return MK_E_NOTBOUND;
 
     IUnknown_Release(This->bindCtxTable[index].pObj);
-    
+
     /* left-shift all elements in the right side of the current revoked object */
     for(j=index; j<This->bindCtxTableLastIndex-1; j++)
         This->bindCtxTable[j]= This->bindCtxTable[j+1];
-    
+
     This->bindCtxTableLastIndex--;
 
     return S_OK;
@@ -319,7 +319,7 @@
 
     if (pbindopts==NULL)
         return E_POINTER;
-    
+
     if (pbindopts->cbStruct > sizeof(BIND_OPTS2))
     {
         WARN("invalid size\n");
@@ -363,7 +363,7 @@
 
     if (pprot==NULL)
         return E_POINTER;
-    
+
     res=GetRunningObjectTable(0, pprot);
 
     return res;
@@ -380,7 +380,7 @@
 
     if (punk==NULL)
         return E_INVALIDARG;
-    
+
     IUnknown_AddRef(punk);
 
     This->bindCtxTable[This->bindCtxTableLastIndex].pObj = punk;
@@ -401,7 +401,7 @@
     }
 
     This->bindCtxTableLastIndex++;
-    
+
     if (This->bindCtxTableLastIndex == This->bindCtxTableSize){ /* table is full ! must be resized */
 
         This->bindCtxTableSize+=BLOCK_TAB_SIZE; /* new table size */
@@ -431,12 +431,12 @@
         return E_POINTER;
 
     *punk=0;
-    
+
     if (BindCtxImpl_GetObjectIndex(This,NULL,pszkey,&index)==S_FALSE)
         return E_FAIL;
 
     IUnknown_AddRef(This->bindCtxTable[index].pObj);
-    
+
     *punk = This->bindCtxTable[index].pObj;
 
     return S_OK;
@@ -458,11 +458,11 @@
 
     /* release the object if it's found */
     IUnknown_Release(This->bindCtxTable[index].pObj);
-    
+
     /* remove the object from the table with a left-shifting of all objects in the right side */
     for(j=index; j<This->bindCtxTableLastIndex-1; j++)
         This->bindCtxTable[j]= This->bindCtxTable[j+1];
-    
+
     This->bindCtxTableLastIndex--;
 
     return S_OK;
@@ -488,7 +488,7 @@
 
     DWORD i;
     BYTE found=0;
-    
+
     TRACE("(%p,%p,%p,%p)\n",This,punk,pszkey,index);
 
     if (punk==NULL)
diff --git a/dlls/ole32/clipboard.c b/dlls/ole32/clipboard.c
index 02e08ca..d7fdf0c 100644
--- a/dlls/ole32/clipboard.c
+++ b/dlls/ole32/clipboard.c
@@ -94,7 +94,7 @@
   ICOM_VTABLE(IDataObject)*  lpvtbl1;  /* IDataObject VTable */
 
   /*
-   * The hidden OLE clipboard window. This window is used as the bridge between the 
+   * The hidden OLE clipboard window. This window is used as the bridge between the
    * the OLE and windows clipboard API. (Windows creates one such window per process)
    */
   HWND                       hWndClipboard;
@@ -127,11 +127,11 @@
 *   IEnumFORMATETC implementation
 *   DO NOT add any members before the VTables declaration!
 */
-typedef struct 
+typedef struct
 {
   /* IEnumFORMATETC VTable */
   ICOM_VFIELD(IEnumFORMATETC);
-  
+
   /* IEnumFORMATETC fields */
   UINT                         posFmt;    /* current enumerator position */
   UINT                         countFmt;  /* number of EnumFORMATETC's in array */
@@ -146,7 +146,7 @@
    * IUnknown implementation of the parent data object.
    */
   IUnknown*                    pUnkDataObj;
-  
+
 } IEnumFORMATETCImpl;
 
 typedef struct PresentationDataHeader
@@ -185,39 +185,39 @@
             IDataObject*     iface,
             REFIID           riid,
             void**           ppvObject);
-static ULONG WINAPI OLEClipbrd_IDataObject_AddRef( 
+static ULONG WINAPI OLEClipbrd_IDataObject_AddRef(
             IDataObject*     iface);
-static ULONG WINAPI OLEClipbrd_IDataObject_Release( 
+static ULONG WINAPI OLEClipbrd_IDataObject_Release(
             IDataObject*     iface);
 static HRESULT WINAPI OLEClipbrd_IDataObject_GetData(
 	    IDataObject*     iface,
-	    LPFORMATETC      pformatetcIn, 
+	    LPFORMATETC      pformatetcIn,
 	    STGMEDIUM*       pmedium);
 static HRESULT WINAPI OLEClipbrd_IDataObject_GetDataHere(
-	    IDataObject*     iface, 
+	    IDataObject*     iface,
 	    LPFORMATETC      pformatetc,
 	    STGMEDIUM*       pmedium);
 static HRESULT WINAPI OLEClipbrd_IDataObject_QueryGetData(
 	    IDataObject*     iface,
 	    LPFORMATETC      pformatetc);
 static HRESULT WINAPI OLEClipbrd_IDataObject_GetCanonicalFormatEtc(
-	    IDataObject*     iface, 
-	    LPFORMATETC      pformatectIn, 
+	    IDataObject*     iface,
+	    LPFORMATETC      pformatectIn,
 	    LPFORMATETC      pformatetcOut);
 static HRESULT WINAPI OLEClipbrd_IDataObject_SetData(
 	    IDataObject*     iface,
-	    LPFORMATETC      pformatetc, 
-	    STGMEDIUM*       pmedium, 
+	    LPFORMATETC      pformatetc,
+	    STGMEDIUM*       pmedium,
 	    BOOL             fRelease);
 static HRESULT WINAPI OLEClipbrd_IDataObject_EnumFormatEtc(
-	    IDataObject*     iface,       
+	    IDataObject*     iface,
 	    DWORD            dwDirection,
 	    IEnumFORMATETC** ppenumFormatEtc);
 static HRESULT WINAPI OLEClipbrd_IDataObject_DAdvise(
-	    IDataObject*     iface, 
-	    FORMATETC*       pformatetc, 
-	    DWORD            advf, 
-	    IAdviseSink*     pAdvSink, 
+	    IDataObject*     iface,
+	    FORMATETC*       pformatetc,
+	    DWORD            advf,
+	    IAdviseSink*     pAdvSink,
 	    DWORD*           pdwConnection);
 static HRESULT WINAPI OLEClipbrd_IDataObject_DUnadvise(
 	    IDataObject*     iface,
@@ -278,7 +278,7 @@
 };
 
 /*
- * Name of our registered OLE clipboard window class 
+ * Name of our registered OLE clipboard window class
  */
 CHAR OLEClipbrd_WNDCLASS[] = "CLIPBRDWNDCLASS";
 
@@ -292,7 +292,7 @@
  */
 
 /*---------------------------------------------------------------------*
- *           Win32 OLE clipboard API 
+ *           Win32 OLE clipboard API
  *---------------------------------------------------------------------*/
 
 /***********************************************************************
@@ -303,8 +303,8 @@
  * RETURNS:
  *
  *    S_OK                  IDataObject pointer placed on the clipboard
- *    CLIPBRD_E_CANT_OPEN   OpenClipboard failed 
- *    CLIPBRD_E_CANT_EMPTY  EmptyClipboard failed 
+ *    CLIPBRD_E_CANT_OPEN   OpenClipboard failed
+ *    CLIPBRD_E_CANT_EMPTY  EmptyClipboard failed
  *    CLIPBRD_E_CANT_CLOSE  CloseClipboard failed
  *    CLIPBRD_E_CANT_SET    SetClipboard failed
  */
@@ -319,9 +319,9 @@
   HGLOBAL hDataObject = 0;
   OLEClipbrd **ppDataObject;
 */
-  
+
   TRACE("(%p)\n", pDataObj);
-  
+
   /*
    * Make sure we have a clipboard object
    */
@@ -344,7 +344,7 @@
 
   /*
    * Empty the current clipboard and make our window the clipboard owner
-   * NOTE: This will trigger a WM_DESTROYCLIPBOARD message 
+   * NOTE: This will trigger a WM_DESTROYCLIPBOARD message
    */
   if ( !EmptyClipboard() )
     HANDLE_ERROR( CLIPBRD_E_CANT_EMPTY );
@@ -369,10 +369,10 @@
   }
 
   /*
-   * Enumerate all HGLOBAL formats supported by the source and make 
+   * Enumerate all HGLOBAL formats supported by the source and make
    * those formats available using delayed rendering using SetClipboardData.
-   * Only global memory based data items may be made available to non-OLE 
-   * applications via the standard Windows clipboard API. Data based on other 
+   * Only global memory based data items may be made available to non-OLE
+   * applications via the standard Windows clipboard API. Data based on other
    * mediums(non TYMED_HGLOBAL) can only be accessed via the Ole Clipboard API.
    *
    * TODO: Do we need to additionally handle TYMED_IStorage media by copying
@@ -386,7 +386,7 @@
     {
       HANDLE_ERROR( hr );
     }
-      
+
     while ( S_OK == IEnumFORMATETC_Next(penumFormatetc, 1, &rgelt, NULL) )
     {
       if ( rgelt.tymed == TYMED_HGLOBAL )
@@ -395,7 +395,7 @@
         TRACE("(cfFormat=%d:%s)\n", rgelt.cfFormat,
               GetClipboardFormatNameA(rgelt.cfFormat, szFmtName, sizeof(szFmtName)-1)
                 ? szFmtName : "");
-  
+
         SetClipboardData( rgelt.cfFormat, (HANDLE)NULL);
       }
     }
@@ -404,7 +404,7 @@
 
   /*
    * Windows additionally creates a new "DataObject" clipboard format
-   * and stores in on the clipboard. We could possibly store a pointer 
+   * and stores in on the clipboard. We could possibly store a pointer
    * to our internal IDataObject interface on the clipboard. I'm not
    * sure what the use of this is though.
    * Enable the code below for this functionality.
@@ -415,7 +415,7 @@
                              sizeof(OLEClipbrd *));
    if (hDataObject==0)
      HANDLE_ERROR( E_OUTOFMEMORY );
-   
+
    ppDataObject = (OLEClipbrd**)GlobalLock(hDataObject);
    *ppDataObject = theOleClipboard;
    GlobalUnlock(hDataObject);
@@ -423,7 +423,7 @@
    if ( !SetClipboardData( theOleClipboard->cfDataObj, hDataObject ) )
      HANDLE_ERROR( CLIPBRD_E_CANT_SET );
 */
-  
+
   hr = S_OK;
 
 CLEANUP:
@@ -452,15 +452,15 @@
 
 /***********************************************************************
  * OleGetClipboard [OLE32.105]
- * Returns a pointer to our internal IDataObject which represents the conceptual 
- * state of the Windows clipboard. If the current clipboard already contains 
+ * Returns a pointer to our internal IDataObject which represents the conceptual
+ * state of the Windows clipboard. If the current clipboard already contains
  * an IDataObject, our internal IDataObject will delegate to this object.
  */
 HRESULT WINAPI OleGetClipboard(IDataObject** ppDataObj)
 {
   HRESULT hr = S_OK;
   TRACE("()\n");
-    
+
   /*
    * Make sure we have a clipboard object
    */
@@ -501,7 +501,7 @@
   HRESULT hr = S_OK;
   BOOL bClipboardOpen = FALSE;
   IDataObject* pIDataObjectSrc = NULL;
-  
+
   TRACE("()\n");
 
   /*
@@ -521,7 +521,7 @@
    */
   pIDataObjectSrc = theOleClipboard->pIDataObjectSrc;
   IDataObject_AddRef(pIDataObjectSrc);
-  
+
   /*
    * Open the Windows clipboard
    */
@@ -561,9 +561,9 @@
         continue;
     }
   }
-  
+
   IEnumFORMATETC_Release(penumFormatetc);
-  
+
   /*
    * Release the source data object we are holding on to
    */
@@ -584,7 +584,7 @@
 /***********************************************************************
  *           OleIsCurrentClipboard [OLE32.110]
  */
-HRESULT WINAPI OleIsCurrentClipboard (  IDataObject *pDataObject) 
+HRESULT WINAPI OleIsCurrentClipboard (  IDataObject *pDataObject)
 {
   TRACE("()\n");
   /*
@@ -600,17 +600,17 @@
 
 
 /*---------------------------------------------------------------------*
- *           Internal implementation methods for the OLE clipboard 
+ *           Internal implementation methods for the OLE clipboard
  *---------------------------------------------------------------------*/
 
 /***********************************************************************
  * OLEClipbrd_Initialize()
- * Initializes the OLE clipboard. 
+ * Initializes the OLE clipboard.
  */
 void OLEClipbrd_Initialize()
 {
   /*
-   * Create the clipboard if necessary 
+   * Create the clipboard if necessary
    */
   if ( !theOleClipboard )
   {
@@ -622,7 +622,7 @@
 
 /***********************************************************************
  * OLEClipbrd_UnInitialize()
- * Un-Initializes the OLE clipboard 
+ * Un-Initializes the OLE clipboard
  */
 void OLEClipbrd_UnInitialize()
 {
@@ -649,7 +649,7 @@
 {
   OLEClipbrd* newObject = NULL;
   HGLOBAL hNewObject = 0;
-  
+
   /*
    * Allocate space for the object. We use GlobalAlloc since we need
    * an HGLOBAL to expose our DataObject as a registered clipboard type.
@@ -663,20 +663,20 @@
    * Lock the handle for the entire lifetime of the clipboard.
    */
   newObject = GlobalLock(hNewObject);
-  
+
   /*
    * Initialize the virtual function table.
    */
   newObject->lpvtbl1 = &OLEClipbrd_IDataObject_VTable;
 
   /*
-   * Start with one reference count. The caller of this function 
+   * Start with one reference count. The caller of this function
    * must release the interface pointer when it is done.
    */
   newObject->ref = 1;
 
   newObject->hSelf = hNewObject;
-  
+
   /*
    * The Ole clipboard is a singleton - save the global handle and pointer
    */
@@ -689,12 +689,12 @@
 static void OLEClipbrd_Destroy(OLEClipbrd* ptrToDestroy)
 {
   TRACE("()\n");
-    
+
   if ( !ptrToDestroy )
     return;
 
   /*
-   * Destroy the Ole clipboard window 
+   * Destroy the Ole clipboard window
    */
   if ( ptrToDestroy->hWndClipboard )
     OLEClipbrd_DestroyWindow(ptrToDestroy->hWndClipboard);
@@ -716,15 +716,15 @@
 
 /***********************************************************************
  * OLEClipbrd_CreateWindow()
- * Create the clipboard window 
+ * Create the clipboard window
  */
 static HWND OLEClipbrd_CreateWindow()
 {
   HWND hwnd = 0;
   WNDCLASSEXA wcex;
 
-  /* 
-   * Register the clipboard window class if necessary 
+  /*
+   * Register the clipboard window class if necessary
    */
     ZeroMemory( &wcex, sizeof(WNDCLASSEXA));
 
@@ -740,7 +740,7 @@
     RegisterClassExA(&wcex);
 
   /*
-   * Create a hidden window to receive OLE clipboard messages 
+   * Create a hidden window to receive OLE clipboard messages
    */
 
 /*
@@ -750,7 +750,7 @@
  *   ZeroMemory( &trackerInfo, sizeof(ClipboardWindowInfo));
  */
 
-  hwnd = CreateWindowA(OLEClipbrd_WNDCLASS, 
+  hwnd = CreateWindowA(OLEClipbrd_WNDCLASS,
 				    "ClipboardWindow",
 				    WS_POPUP | WS_CLIPSIBLINGS | WS_OVERLAPPED,
 				    CW_USEDEFAULT, CW_USEDEFAULT,
@@ -769,8 +769,8 @@
  */
 static void OLEClipbrd_DestroyWindow(HWND hwnd)
 {
-  /* 
-   * Destroy clipboard window and unregister its WNDCLASS 
+  /*
+   * Destroy clipboard window and unregister its WNDCLASS
    */
   DestroyWindow(hwnd);
   UnregisterClassA( OLEClipbrd_WNDCLASS, 0 );
@@ -778,32 +778,32 @@
 
 /***********************************************************************
  * OLEClipbrd_WndProc(HWND, unsigned, WORD, LONG)
- * Processes messages sent to the OLE clipboard window. 
- * Note that we will intercept messages in our WndProc only when data 
- * has been placed in the clipboard via OleSetClipboard(). 
+ * Processes messages sent to the OLE clipboard window.
+ * Note that we will intercept messages in our WndProc only when data
+ * has been placed in the clipboard via OleSetClipboard().
  * i.e. Only when OLE owns the windows clipboard.
  */
 LRESULT CALLBACK OLEClipbrd_WndProc
   (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
 {
-  switch (message) 
+  switch (message)
   {
     /*
-     * WM_RENDERFORMAT 
+     * WM_RENDERFORMAT
      * We receive this message to allow us to handle delayed rendering of
-     * a specific clipboard format when an application requests data in 
+     * a specific clipboard format when an application requests data in
      * that format by calling GetClipboardData.
-     * (Recall that in OleSetClipboard, we used SetClipboardData to 
+     * (Recall that in OleSetClipboard, we used SetClipboardData to
      * make all HGLOBAL formats supported by the source IDataObject
      * available using delayed rendering)
-     * On receiving this mesage we must actually render the data in the 
-     * specified format and place it on the clipboard by calling the 
-     * SetClipboardData function. 
+     * On receiving this mesage we must actually render the data in the
+     * specified format and place it on the clipboard by calling the
+     * SetClipboardData function.
      */
     case WM_RENDERFORMAT:
     {
       FORMATETC rgelt;
-        
+
       ZeroMemory( &rgelt, sizeof(FORMATETC));
 
       /*
@@ -815,7 +815,7 @@
       rgelt.tymed = TYMED_HGLOBAL;
 
       TRACE("(): WM_RENDERFORMAT(cfFormat=%d)\n", rgelt.cfFormat);
-      
+
       /*
        * Render the clipboard data.
        * (We must have a source data object or we wouldn't be in this WndProc)
@@ -839,9 +839,9 @@
     {
       IEnumFORMATETC* penumFormatetc = NULL;
       FORMATETC rgelt;
-      
+
       TRACE("(): WM_RENDERALLFORMATS\n");
-      
+
       /*
        * Render all HGLOBAL formats supported by the source into
        * the windows clipboard.
@@ -858,15 +858,15 @@
         if ( rgelt.tymed == TYMED_HGLOBAL )
         {
           /*
-           * Render the clipboard data. 
+           * Render the clipboard data.
            */
           if ( FAILED(OLEClipbrd_RenderFormat( (IDataObject*)&(theOleClipboard->lpvtbl1), &rgelt )) )
             continue;
-        
+
           TRACE("(): WM_RENDERALLFORMATS(cfFormat=%d)\n", rgelt.cfFormat);
         }
       }
-      
+
       IEnumFORMATETC_Release(penumFormatetc);
 
       break;
@@ -1005,7 +1005,7 @@
         IStream_Release(pStream);
 
         HeapFree(GetProcessHeap(), 0, mfBits);
-  
+
         GlobalUnlock(std2.u.hGlobal);
 
         ReadClassStg(std.u.pstg, &clsID);
@@ -1033,10 +1033,10 @@
   /*
    *  Put a copy of the rendered data back on the clipboard
    */
-  
+
   if ( !(hDup = OLEClipbrd_GlobalDupMem(hStorage)) )
     HANDLE_ERROR( E_OUTOFMEMORY );
-       
+
   if ( !SetClipboardData( pFormatetc->cfFormat, hDup ) )
   {
     GlobalFree(hDup);
@@ -1044,9 +1044,9 @@
   }
 
 CLEANUP:
-  
+
   ReleaseStgMedium(&std);
-  
+
   return hr;
 }
 
@@ -1060,26 +1060,26 @@
     HGLOBAL hGlobalDest;
     PVOID pGlobalSrc, pGlobalDest;
     DWORD cBytes;
-    
+
     if ( !hGlobalSrc )
       return 0;
 
     cBytes = GlobalSize(hGlobalSrc);
     if ( 0 == cBytes )
       return 0;
-        
+
     hGlobalDest = GlobalAlloc( GMEM_DDESHARE|GMEM_MOVEABLE,
                                cBytes );
     if ( !hGlobalDest )
       return 0;
-    
+
     pGlobalSrc = GlobalLock(hGlobalSrc);
     pGlobalDest = GlobalLock(hGlobalDest);
     if ( !pGlobalSrc || !pGlobalDest )
       return 0;
 
     memcpy(pGlobalDest, pGlobalSrc, cBytes);
-        
+
     GlobalUnlock(hGlobalSrc);
     GlobalUnlock(hGlobalDest);
 
@@ -1088,7 +1088,7 @@
 
 
 /*---------------------------------------------------------------------*
- *  Implementation of the internal IDataObject interface exposed by 
+ *  Implementation of the internal IDataObject interface exposed by
  *  the OLE clipboard.
  *---------------------------------------------------------------------*/
 
@@ -1103,18 +1103,18 @@
             REFIID           riid,
             void**           ppvObject)
 {
-  /* 
-   * Declare "This" pointer 
+  /*
+   * Declare "This" pointer
    */
   ICOM_THIS(OLEClipbrd, iface);
   TRACE("(%p)->(\n\tIID:\t%s,%p)\n",This,debugstr_guid(riid),ppvObject);
-  
+
   /*
    * Perform a sanity check on the parameters.
    */
   if ( (This==0) || (ppvObject==0) )
     return E_INVALIDARG;
-  
+
   /*
    * Initialize the return parameter.
    */
@@ -1123,11 +1123,11 @@
   /*
    * Compare the riid with the interface IDs implemented by this object.
    */
-  if (memcmp(&IID_IUnknown, riid, sizeof(IID_IUnknown)) == 0) 
+  if (memcmp(&IID_IUnknown, riid, sizeof(IID_IUnknown)) == 0)
   {
     *ppvObject = iface;
   }
-  else if (memcmp(&IID_IDataObject, riid, sizeof(IID_IDataObject)) == 0) 
+  else if (memcmp(&IID_IDataObject, riid, sizeof(IID_IDataObject)) == 0)
   {
     *ppvObject = (IDataObject*)&(This->lpvtbl1);
   }
@@ -1136,10 +1136,10 @@
     WARN( "() : asking for unsupported interface %s\n", debugstr_guid(riid));
     return E_NOINTERFACE;
   }
-  
+
   /*
    * Query Interface always increases the reference count by one when it is
-   * successful. 
+   * successful.
    */
   IUnknown_AddRef((IUnknown*)*ppvObject);
 
@@ -1151,16 +1151,16 @@
  *
  * See Windows documentation for more details on IUnknown methods.
  */
-static ULONG WINAPI OLEClipbrd_IDataObject_AddRef( 
+static ULONG WINAPI OLEClipbrd_IDataObject_AddRef(
             IDataObject*     iface)
 {
-  /* 
-   * Declare "This" pointer 
+  /*
+   * Declare "This" pointer
    */
   ICOM_THIS(OLEClipbrd, iface);
 
   TRACE("(%p)->(count=%lu)\n",This, This->ref);
-  
+
   This->ref++;
 
   return This->ref;
@@ -1171,16 +1171,16 @@
  *
  * See Windows documentation for more details on IUnknown methods.
  */
-static ULONG WINAPI OLEClipbrd_IDataObject_Release( 
+static ULONG WINAPI OLEClipbrd_IDataObject_Release(
             IDataObject*     iface)
 {
-  /* 
-   * Declare "This" pointer 
+  /*
+   * Declare "This" pointer
    */
   ICOM_THIS(OLEClipbrd, iface);
 
   TRACE("(%p)->(count=%lu)\n",This, This->ref);
-  
+
   /*
    * Decrease the reference count on this object.
    */
@@ -1193,22 +1193,22 @@
   {
     OLEClipbrd_Destroy(This);
   }
-  
+
   return This->ref;
 }
 
- 
+
 /************************************************************************
  * OLEClipbrd_IDataObject_GetData (IDataObject)
  *
- * The OLE Clipboard's implementation of this method delegates to 
+ * The OLE Clipboard's implementation of this method delegates to
  * a data source if there is one or wraps around the windows clipboard
  *
  * See Windows documentation for more details on IDataObject methods.
  */
 static HRESULT WINAPI OLEClipbrd_IDataObject_GetData(
 	    IDataObject*     iface,
-	    LPFORMATETC      pformatetcIn, 
+	    LPFORMATETC      pformatetcIn,
 	    STGMEDIUM*       pmedium)
 {
   HANDLE      hData = 0;
@@ -1217,10 +1217,10 @@
   LPVOID src;
 
   /*
-   * Declare "This" pointer 
+   * Declare "This" pointer
    */
   ICOM_THIS(OLEClipbrd, iface);
- 
+
   TRACE("(%p,%p,%p)\n", iface, pformatetcIn, pmedium);
 
   if ( !pformatetcIn || !pmedium )
@@ -1246,7 +1246,7 @@
      return DV_E_DVASPECT;
 */
 
-  /* 
+  /*
    * Otherwise, get the data from the windows clipboard using GetClipboardData
    */
   if ( !(bClipboardOpen = OpenClipboard(theOleClipboard->hWndClipboard)) )
@@ -1273,15 +1273,15 @@
       hData = hDest;
   }
 
-  /* 
+  /*
    * Return the clipboard data in the storage medium structure
    */
   pmedium->tymed = (hData == 0) ? TYMED_NULL : TYMED_HGLOBAL;
   pmedium->u.hGlobal = (HGLOBAL)hData;
   pmedium->pUnkForRelease = NULL;
-  
+
   hr = S_OK;
-  
+
 CLEANUP:
   /*
    * Close Windows clipboard
@@ -1295,7 +1295,7 @@
 }
 
 static HRESULT WINAPI OLEClipbrd_IDataObject_GetDataHere(
-	    IDataObject*     iface, 
+	    IDataObject*     iface,
 	    LPFORMATETC      pformatetc,
 	    STGMEDIUM*       pmedium)
 {
@@ -1306,7 +1306,7 @@
 /************************************************************************
  * OLEClipbrd_IDataObject_QueryGetData (IDataObject)
  *
- * The OLE Clipboard's implementation of this method delegates to 
+ * The OLE Clipboard's implementation of this method delegates to
  * a data source if there is one or wraps around the windows clipboard
  * function IsClipboardFormatAvailable() otherwise.
  *
@@ -1316,8 +1316,8 @@
 	    IDataObject*     iface,
 	    LPFORMATETC      pformatetc)
 {
-  /* 
-   * Declare "This" pointer 
+  /*
+   * Declare "This" pointer
    */
   ICOM_THIS(OLEClipbrd, iface);
 
@@ -1347,7 +1347,7 @@
    */
   if ( pformatetc->tymed != TYMED_HGLOBAL )
     return DV_E_TYMED;
-          
+
   /*
    * Delegate to the Windows clipboard function IsClipboardFormatAvailable
    */
@@ -1360,8 +1360,8 @@
  * See Windows documentation for more details on IDataObject methods.
  */
 static HRESULT WINAPI OLEClipbrd_IDataObject_GetCanonicalFormatEtc(
-	    IDataObject*     iface, 
-	    LPFORMATETC      pformatectIn, 
+	    IDataObject*     iface,
+	    LPFORMATETC      pformatectIn,
 	    LPFORMATETC      pformatetcOut)
 {
   TRACE("(%p, %p, %p)\n", iface, pformatectIn, pformatetcOut);
@@ -1376,14 +1376,14 @@
 /************************************************************************
  * OLEClipbrd_IDataObject_SetData (IDataObject)
  *
- * The OLE Clipboard's does not implement this method 
+ * The OLE Clipboard's does not implement this method
  *
  * See Windows documentation for more details on IDataObject methods.
  */
 static HRESULT WINAPI OLEClipbrd_IDataObject_SetData(
 	    IDataObject*     iface,
-	    LPFORMATETC      pformatetc, 
-	    STGMEDIUM*       pmedium, 
+	    LPFORMATETC      pformatetc,
+	    STGMEDIUM*       pmedium,
 	    BOOL             fRelease)
 {
   TRACE("\n");
@@ -1405,9 +1405,9 @@
   int cfmt, i;
   UINT format;
   BOOL bClipboardOpen;
-  
-  /* 
-   * Declare "This" pointer 
+
+  /*
+   * Declare "This" pointer
    */
   ICOM_THIS(OLEClipbrd, iface);
 
@@ -1460,7 +1460,7 @@
       ERR("EnumClipboardFormats failed to return format!\n");
       HANDLE_ERROR( E_FAIL );
     }
-    
+
     /* Init the FORMATETC struct */
     afmt[i].cfFormat = format;
     afmt[i].ptd = NULL;
@@ -1479,16 +1479,16 @@
 
   if (FAILED( hr = IEnumFORMATETC_AddRef(*ppenumFormatEtc)))
     HANDLE_ERROR( hr );
-      
+
   hr = S_OK;
-  
+
 CLEANUP:
   /*
    * Free the array of FORMATETC's
    */
   if (afmt)
     HeapFree(GetProcessHeap(), 0, afmt);
-  
+
   /*
    * Close Windows clipboard
    */
@@ -1501,15 +1501,15 @@
 /************************************************************************
  * OLEClipbrd_IDataObject_DAdvise (IDataObject)
  *
- * The OLE Clipboard's does not implement this method 
+ * The OLE Clipboard's does not implement this method
  *
  * See Windows documentation for more details on IDataObject methods.
  */
 static HRESULT WINAPI OLEClipbrd_IDataObject_DAdvise(
-	    IDataObject*     iface, 
-	    FORMATETC*       pformatetc, 
-	    DWORD            advf, 
-	    IAdviseSink*     pAdvSink, 
+	    IDataObject*     iface,
+	    FORMATETC*       pformatetc,
+	    DWORD            advf,
+	    IAdviseSink*     pAdvSink,
 	    DWORD*           pdwConnection)
 {
   TRACE("\n");
@@ -1519,7 +1519,7 @@
 /************************************************************************
  * OLEClipbrd_IDataObject_DUnadvise (IDataObject)
  *
- * The OLE Clipboard's does not implement this method 
+ * The OLE Clipboard's does not implement this method
  *
  * See Windows documentation for more details on IDataObject methods.
  */
@@ -1566,27 +1566,27 @@
   IEnumFORMATETCImpl* ef;
   DWORD size=cfmt * sizeof(FORMATETC);
   LPMALLOC pIMalloc;
-  
+
   ef = (IEnumFORMATETCImpl*)HeapAlloc(GetProcessHeap(),
                                       HEAP_ZERO_MEMORY,
                                       sizeof(IEnumFORMATETCImpl));
   if (!ef)
     return NULL;
-  
+
   ef->ref = 0;
   ICOM_VTBL(ef) = &efvt;
   ef->pUnkDataObj = pUnkDataObj;
-  
+
   ef->posFmt = 0;
   ef->countFmt = cfmt;
   if (FAILED(CoGetMalloc(MEMCTX_TASK, &pIMalloc)))
     return NULL;
   ef->pFmt = (LPFORMATETC)IMalloc_Alloc(pIMalloc, size);
   IMalloc_Release(pIMalloc);
-  
+
   if (ef->pFmt)
     memcpy(ef->pFmt, afmt, size);
-  
+
   TRACE("(%p)->()\n",ef);
   return (LPENUMFORMATETC)ef;
 }
@@ -1608,9 +1608,9 @@
    * Since enumerators are separate objects from the parent data object
    * we only need to support the IUnknown and IEnumFORMATETC interfaces
    */
-  
+
   *ppvObj = NULL;
-  
+
   if(IsEqualIID(riid, &IID_IUnknown))
   {
     *ppvObj = This;
@@ -1618,15 +1618,15 @@
   else if(IsEqualIID(riid, &IID_IEnumFORMATETC))
   {
     *ppvObj = (IDataObject*)This;
-  }   
-  
+  }
+
   if(*ppvObj)
   {
     IEnumFORMATETC_AddRef((IEnumFORMATETC*)*ppvObj);
     TRACE("-- Interface: (%p)->(%p)\n",ppvObj,*ppvObj);
     return S_OK;
   }
-  
+
   TRACE("-- Interface: E_NOINTERFACE\n");
   return E_NOINTERFACE;
 }
@@ -1647,7 +1647,7 @@
 
   if (This->pUnkDataObj)
     IUnknown_AddRef(This->pUnkDataObj);
-  
+
   return ++(This->ref);
 }
 
@@ -1665,8 +1665,8 @@
 
   if (This->pUnkDataObj)
     IUnknown_Release(This->pUnkDataObj);  /* Release parent data object */
-  
-  if (!--(This->ref)) 
+
+  if (!--(This->ref))
   {
     TRACE("() - destroying IEnumFORMATETC(%p)\n",This);
     if (SUCCEEDED(CoGetMalloc(MEMCTX_TASK, &pIMalloc)))
@@ -1674,7 +1674,7 @@
       IMalloc_Free(pIMalloc, This->pFmt);
       IMalloc_Release(pIMalloc);
     }
-      
+
     HeapFree(GetProcessHeap(),0,This);
     return 0;
   }
@@ -1693,9 +1693,9 @@
   ICOM_THIS(IEnumFORMATETCImpl,iface);
   UINT cfetch;
   HRESULT hres = S_FALSE;
-  
+
   TRACE("(%p)->(pos=%u)\n", This, This->posFmt);
-  
+
   if (This->posFmt < This->countFmt)
   {
     cfetch = This->countFmt - This->posFmt;
@@ -1704,7 +1704,7 @@
       cfetch = celt;
       hres = S_OK;
     }
-    
+
     memcpy(rgelt, &This->pFmt[This->posFmt], cfetch * sizeof(FORMATETC));
     This->posFmt += cfetch;
   }
@@ -1712,12 +1712,12 @@
   {
     cfetch = 0;
   }
-  
+
   if (pceltFethed)
   {
     *pceltFethed = cfetch;
   }
-  
+
   return hres;
 }
 
@@ -1730,7 +1730,7 @@
 {
   ICOM_THIS(IEnumFORMATETCImpl,iface);
   TRACE("(%p)->(num=%lu)\n", This, celt);
-  
+
   This->posFmt += celt;
   if (This->posFmt > This->countFmt)
   {
@@ -1749,7 +1749,7 @@
 {
   ICOM_THIS(IEnumFORMATETCImpl,iface);
   TRACE("(%p)->()\n", This);
-  
+
   This->posFmt = 0;
   return S_OK;
 }
@@ -1764,7 +1764,7 @@
 {
   ICOM_THIS(IEnumFORMATETCImpl,iface);
   HRESULT hr = S_OK;
-  
+
   TRACE("(%p)->(ppenum=%p)\n", This, ppenum);
 
   if ( !ppenum )
@@ -1776,7 +1776,7 @@
 
   if (FAILED( hr = IEnumFORMATETC_AddRef(*ppenum)))
     return ( hr );
-  
+
   return (*ppenum) ? S_OK : E_OUTOFMEMORY;
 }
 
diff --git a/dlls/ole32/compobj.c b/dlls/ole32/compobj.c
index dc716ac..557e8d2 100644
--- a/dlls/ole32/compobj.c
+++ b/dlls/ole32/compobj.c
@@ -1297,7 +1297,7 @@
  *           CoGetClassObject [COMPOBJ.7]
  *           CoGetClassObject [OLE32.16]
  *
- * FIXME.  If request allows of several options and there is a failure 
+ * FIXME.  If request allows of several options and there is a failure
  *         with one (other than not being registered) do we try the
  *         others or return failure?  (E.g. inprocess is registered but
  *         the DLL is not found but the server version works)
@@ -1382,7 +1382,7 @@
 	    return DllGetClassObject(rclsid, iid, ppv);
         }
     }
-    
+
 
     /* Next try out of process */
     if (CLSCTX_LOCAL_SERVER & dwClsContext)
diff --git a/dlls/ole32/compositemoniker.c b/dlls/ole32/compositemoniker.c
index 90aa77f..a2878c8 100644
--- a/dlls/ole32/compositemoniker.c
+++ b/dlls/ole32/compositemoniker.c
@@ -39,8 +39,8 @@
 
     ICOM_VTABLE(IMoniker)*  lpvtbl1;  /* VTable relative to the IMoniker interface.*/
 
-    /* The ROT (RunningObjectTable implementation) uses the IROTData 
-     * interface to test whether two monikers are equal. That's why IROTData 
+    /* The ROT (RunningObjectTable implementation) uses the IROTData
+     * interface to test whether two monikers are equal. That's why IROTData
      * interface is implemented by monikers.
      */
     ICOM_VTABLE(IROTData)*  lpvtbl2;  /* VTable relative to the IROTData interface.*/
@@ -200,13 +200,13 @@
 HRESULT WINAPI CompositeMonikerImpl_QueryInterface(IMoniker* iface,REFIID riid,void** ppvObject)
 {
     ICOM_THIS(CompositeMonikerImpl,iface);
-  
+
     TRACE("(%p,%p,%p)\n",This,riid,ppvObject);
 
     /* Perform a sanity check on the parameters.*/
     if ( (This==0) || (ppvObject==0) )
 	return E_INVALIDARG;
-  
+
     /* Initialize the return parameter */
     *ppvObject = 0;
 
@@ -249,7 +249,7 @@
 {
     ICOM_THIS(CompositeMonikerImpl,iface);
     ULONG i;
-    
+
     TRACE("(%p)\n",This);
 
     This->ref--;
@@ -260,12 +260,12 @@
         /* release all the components before destroying this object */
         for (i=0;i<This->tabLastIndex;i++)
             IMoniker_Release(This->tabMoniker[i]);
-        
+
         CompositeMonikerImpl_Destroy(This);
 
         return 0;
     }
-    return This->ref;;
+    return This->ref;
 }
 
 /******************************************************************************
@@ -277,9 +277,9 @@
 
     if (pClassID==NULL)
         return E_POINTER;
-            
+
     *pClassID = CLSID_CompositeMoniker;
-        
+
     return S_OK;
 }
 
@@ -306,8 +306,8 @@
     DWORD constant;
     CLSID clsid;
     WCHAR string[1]={0};
-    
-    ICOM_THIS(CompositeMonikerImpl,iface);    
+
+    ICOM_THIS(CompositeMonikerImpl,iface);
 
     TRACE("(%p,%p)\n",iface,pStm);
 
@@ -365,7 +365,7 @@
 
         /* resize the table if needed */
         if (++This->tabLastIndex==This->tabSize){
-                
+
             This->tabSize+=BLOCK_TAB_SIZE;
             This->tabMoniker=HeapReAlloc(GetProcessHeap(),0,This->tabMoniker,This->tabSize*sizeof(IMoniker));
 
@@ -386,13 +386,13 @@
     IEnumMoniker *enumMk;
     IMoniker *pmk;
     DWORD constant=3;
-    
+
     TRACE("(%p,%p,%d)\n",iface,pStm,fClearDirty);
 
-    /* This function calls OleSaveToStream function for each moniker within 
+    /* This function calls OleSaveToStream function for each moniker within
      * this object.
-     * When I tested this function in windows, I usually found this constant 
-     * at the beginning of the stream. I don't known why (there's no 
+     * When I tested this function in windows, I usually found this constant
+     * at the beginning of the stream. I don't known why (there's no
      * indication in the specification) !
      */
     res=IStream_Write(pStm,&constant,sizeof(constant),NULL);
@@ -426,7 +426,7 @@
     IMoniker *pmk;
     ULARGE_INTEGER ptmpSize;
 
-    /* The sizeMax of this object is calculated by calling  GetSizeMax on 
+    /* The sizeMax of this object is calculated by calling  GetSizeMax on
      * each moniker within this object then summing all returned values
      */
 
@@ -464,7 +464,7 @@
     IEnumMoniker *enumMoniker;
     IMoniker *tempMk;
     HRESULT res;
-    
+
     TRACE("(%p,%p,%p)\n",This,pmkFirst,pmkRest);
 
     /* Initialize the virtual function table. */
@@ -490,12 +490,12 @@
     else{
 
         IMoniker_Enum(pmkFirst,TRUE,&enumMoniker);
-        
+
         while(IEnumMoniker_Next(enumMoniker,1,&This->tabMoniker[This->tabLastIndex],NULL)==S_OK){
 
 
             if (++This->tabLastIndex==This->tabSize){
-                
+
                 This->tabSize+=BLOCK_TAB_SIZE;
                 This->tabMoniker=HeapReAlloc(GetProcessHeap(),0,This->tabMoniker,This->tabSize*sizeof(IMoniker));
 
@@ -510,14 +510,14 @@
     /* put the rest moniker contents after the first one and make simplification if needed */
 
     IMoniker_IsSystemMoniker(pmkRest,&mkSys);
-    
+
     if (mkSys!=MKSYS_GENERICCOMPOSITE){
 
         /* add a simple moniker to the moniker table */
 
         res=IMoniker_ComposeWith(This->tabMoniker[This->tabLastIndex-1],pmkRest,TRUE,&tempMk);
 
-        if (res==MK_E_NEEDGENERIC){ 
+        if (res==MK_E_NEEDGENERIC){
 
             /* there's no simplification in this case */
             This->tabMoniker[This->tabLastIndex]=pmkRest;
@@ -526,7 +526,7 @@
 
             IMoniker_AddRef(pmkRest);
         }
-        else if (tempMk==NULL){ 
+        else if (tempMk==NULL){
 
             /* we have an antimoniker after a simple moniker so we can make a simplification in this case */
             IMoniker_Release(This->tabMoniker[This->tabLastIndex-1]);
@@ -544,7 +544,7 @@
 
         /* resize tabMoniker if needed */
         if (This->tabLastIndex==This->tabSize){
-                
+
             This->tabSize+=BLOCK_TAB_SIZE;
 
             This->tabMoniker=HeapReAlloc(GetProcessHeap(),0,This->tabMoniker,This->tabSize*sizeof(IMoniker));
@@ -555,8 +555,8 @@
     }
     else{
 
-        /* add a composite moniker to the moniker table (do the same thing 
-         * for each moniker within the composite moniker as a simple moniker 
+        /* add a composite moniker to the moniker table (do the same thing
+         * for each moniker within the composite moniker as a simple moniker
          * (see above for how to add a simple moniker case) )
          */
         IMoniker_Enum(pmkRest,TRUE,&enumMoniker);
@@ -583,7 +583,7 @@
             }
 
             if (This->tabLastIndex==This->tabSize){
-                
+
                 This->tabSize+=BLOCK_TAB_SIZE;
 
                 This->tabMoniker=HeapReAlloc(GetProcessHeap(),0,This->tabMoniker,This->tabSize*sizeof(IMoniker));
@@ -626,12 +626,12 @@
     IRunningObjectTable *prot;
     IMoniker *tempMk,*antiMk,*mostRigthMk;
     IEnumMoniker *enumMoniker;
-    
+
     TRACE("(%p,%p,%p,%p,%p)\n",iface,pbc,pmkToLeft,riid,ppvResult);
 
     if (ppvResult==NULL)
         return E_POINTER;
-    
+
     *ppvResult=0;
     /* If pmkToLeft is NULL, this method looks for the moniker in the ROT, and if found, queries the retrieved */
     /* object for the requested interface pointer. */
@@ -655,11 +655,11 @@
         IMoniker_Enum(iface,FALSE,&enumMoniker);
         IEnumMoniker_Next(enumMoniker,1,&mostRigthMk,NULL);
         IEnumMoniker_Release(enumMoniker);
-        
+
         res=CreateAntiMoniker(&antiMk);
         res=IMoniker_ComposeWith(iface,antiMk,0,&tempMk);
         IMoniker_Release(antiMk);
-        
+
         res=CompositeMonikerImpl_BindToObject(mostRigthMk,pbc,tempMk,riid,ppvResult);
 
         IMoniker_Release(tempMk);
@@ -690,15 +690,15 @@
     /* passing the rest of the composite as the pmkToLeft parameter for that call. */
 
     if (pmkToLeft!=NULL){
-        
+
         IMoniker_Enum(iface,FALSE,&enumMoniker);
         IEnumMoniker_Next(enumMoniker,1,&mostRigthMk,NULL);
         IEnumMoniker_Release(enumMoniker);
-        
+
         res=CreateAntiMoniker(&antiMk);
         res=IMoniker_ComposeWith(iface,antiMk,0,&tempMk);
         IMoniker_Release(antiMk);
-        
+
         res=CompositeMonikerImpl_BindToStorage(mostRigthMk,pbc,tempMk,riid,ppvResult);
 
         IMoniker_Release(tempMk);
@@ -736,7 +736,7 @@
         IMoniker_Enum(iface,FALSE,&enumMoniker);
         IEnumMoniker_Next(enumMoniker,1,&mostRigthMk,NULL);
         IEnumMoniker_Release(enumMoniker);
-        
+
         res=CreateAntiMoniker(&antiMk);
         res=IMoniker_ComposeWith(iface,antiMk,0,&tempMk);
         IMoniker_Release(antiMk);
@@ -753,7 +753,7 @@
         IMoniker_Enum(iface,FALSE,&enumMoniker);
         IEnumMoniker_Next(enumMoniker,1,&mostRigthMk,NULL);
         IEnumMoniker_Release(enumMoniker);
-        
+
         res=CreateAntiMoniker(&antiMk);
         res=IMoniker_ComposeWith(iface,antiMk,0,&tempMk);
         IMoniker_Release(antiMk);
@@ -796,10 +796,10 @@
     /* If fOnlyIfNotGeneric is TRUE, this method sets *pmkComposite to NULL and returns MK_E_NEEDGENERIC; */
     /* otherwise, the method returns the result of combining the two monikers by calling the */
     /* CreateGenericComposite function */
-    
+
     if (fOnlyIfNotGeneric)
         return MK_E_NEEDGENERIC;
-    
+
     return CreateGenericComposite(iface,pmkRight,ppmkComposite);
 }
 
@@ -814,7 +814,7 @@
 
     if (ppenumMoniker == NULL)
         return E_POINTER;
-    
+
     return EnumMonikerImpl_CreateEnumMoniker(This->tabMoniker,This->tabLastIndex,0,fForward,ppenumMoniker);
 }
 
@@ -826,7 +826,7 @@
     IEnumMoniker *enumMoniker1,*enumMoniker2;
     IMoniker *tempMk1,*tempMk2;
     HRESULT res1,res2,res;
-    
+
     TRACE("(%p,%p)\n",iface,pmkOtherMoniker);
 
     if (pmkOtherMoniker==NULL)
@@ -838,14 +838,14 @@
 
     if (enumMoniker1==NULL)
         return S_FALSE;
-    
+
     IMoniker_Enum(iface,TRUE,&enumMoniker2);
 
     while(1){
 
         res1=IEnumMoniker_Next(enumMoniker1,1,&tempMk1,NULL);
         res2=IEnumMoniker_Next(enumMoniker2,1,&tempMk2,NULL);
-        
+
         if((res1==S_OK)&&(res2==S_OK)){
 
             if(IMoniker_IsEqual(tempMk1,tempMk2)==S_FALSE){
@@ -915,7 +915,7 @@
     else
         /* If pmkToLeft is NULL, this method returns S_OK if pmkNewlyRunning is non-NULL and is equal */
         /* to this moniker */
-        
+
         if (pmkNewlyRunning!=NULL)
 
             if (IMoniker_IsEqual(iface,pmkNewlyRunning)==S_OK)
@@ -933,7 +933,7 @@
             /* the moniker is running. If so, the method returns S_OK; otherwise, it recursively calls   */
             /* IMoniker::IsRunning on the rightmost component of the composite, passing the remainder of */
             /* the composite as the pmkToLeft parameter for that call.                                   */
-            
+
              res=IBindCtx_GetRunningObjectTable(pbc,&rot);
 
             if (FAILED(res))
@@ -977,7 +977,7 @@
     HRESULT res;
     IMoniker *tempMk,*antiMk,*mostRigthMk;
     IEnumMoniker *enumMoniker;
-    
+
     TRACE("(%p,%p,%p,%p)\n",iface,pbc,pmkToLeft,pCompositeTime);
 
     if (pCompositeTime==NULL)
@@ -1074,19 +1074,19 @@
     IMoniker *tempMk1,*tempMk2,*mostLeftMk1,*mostLeftMk2;
     IEnumMoniker *enumMoniker1,*enumMoniker2;
     ULONG i,nbCommonMk=0;
-    
+
     /* If the other moniker is a composite, this method compares the components of each composite from left  */
     /* to right. The returned common prefix moniker might also be a composite moniker, depending on how many */
     /* of the leftmost components were common to both monikers.                                              */
 
     if (ppmkPrefix==NULL)
         return E_POINTER;
-    
+
     *ppmkPrefix=0;
 
     if (pmkOther==NULL)
         return MK_E_NOPREFIX;
-    
+
     IMoniker_IsSystemMoniker(pmkOther,&mkSys);
 
     if((mkSys==MKSYS_GENERICCOMPOSITE)){
@@ -1150,7 +1150,7 @@
             CreateGenericComposite(tempMk1,tempMk2,ppmkPrefix);
             IMoniker_Release(tempMk1);
             IMoniker_Release(tempMk2);
-            
+
             /* compose all common monikers in a composite moniker */
             for(i=0;i<nbCommonMk;i++){
 
@@ -1161,7 +1161,7 @@
                 IMoniker_Release(*ppmkPrefix);
 
                 IMoniker_Release(tempMk1);
-                
+
                 *ppmkPrefix=tempMk2;
             }
             return S_OK;
@@ -1202,7 +1202,7 @@
     ULONG nbRestMk=0;
     DWORD mkSys;
     HRESULT res1,res2;
-    
+
     *restMk=0;
 
     /* to create an enumerator for pGenMk with current position pointed on the first element after common  */
@@ -1245,7 +1245,7 @@
 
     for(;IEnumMoniker_Next(enumMoniker3,1,&tempMk,NULL)==S_OK;nbRestMk++)
 
-        IMoniker_Release(tempMk);;
+        IMoniker_Release(tempMk);
 
     if (nbRestMk==0)
         return;
@@ -1300,7 +1300,7 @@
     /* of this moniker and composes the remainder of the other moniker on the right of it.               */
 
     /* finds the common prefix of the two monikers */
-    res=IMoniker_CommonPrefixWith(iface,pmkOther,&commonMk);    
+    res=IMoniker_CommonPrefixWith(iface,pmkOther,&commonMk);
 
     /* if there's no common prefix or the two moniker are equal the relative is the other moniker */
     if ((res== MK_E_NOPREFIX)||(res==MK_S_US)){
@@ -1357,7 +1357,7 @@
 
     if (ppszDisplayName==NULL)
         return E_POINTER;
-    
+
     *ppszDisplayName=CoTaskMemAlloc(sizeof(WCHAR));
 
     if (*ppszDisplayName==NULL)
@@ -1369,7 +1369,7 @@
     **ppszDisplayName=0;
 
     IMoniker_Enum(iface,TRUE,&enumMoniker);
-    
+
     while(IEnumMoniker_Next(enumMoniker,1,&tempMk,NULL)==S_OK){
 
         IMoniker_GetDisplayName(tempMk,pbc,NULL,&tempStr);
@@ -1429,7 +1429,7 @@
 
     if (!pwdMksys)
         return E_POINTER;
-    
+
     (*pwdMksys)=MKSYS_GENERICCOMPOSITE;
 
     return S_OK;
@@ -1466,7 +1466,7 @@
 ULONG   WINAPI CompositeMonikerROTDataImpl_Release(IROTData* iface)
 {
     ICOM_THIS_From_IROTData(IMoniker, iface);
-    
+
     TRACE("(%p)\n",iface);
 
     return CompositeMonikerImpl_Release(This);
@@ -1490,13 +1490,13 @@
 HRESULT WINAPI EnumMonikerImpl_QueryInterface(IEnumMoniker* iface,REFIID riid,void** ppvObject)
 {
     ICOM_THIS(EnumMonikerImpl,iface);
-  
+
     TRACE("(%p,%p,%p)\n",This,riid,ppvObject);
 
     /* Perform a sanity check on the parameters.*/
     if ( (This==0) || (ppvObject==0) )
 	return E_INVALIDARG;
-  
+
     /* Initialize the return parameter */
     *ppvObject = 0;
 
@@ -1541,7 +1541,7 @@
 
     /* destroy the object if there's no more reference on it */
     if (This->ref==0){
-        
+
         for(i=0;i<This->tabSize;i++)
             IMoniker_Release(This->tabMoniker[i]);
 
@@ -1550,7 +1550,7 @@
 
         return 0;
     }
-    return This->ref;;
+    return This->ref;
 }
 
 /******************************************************************************
@@ -1568,7 +1568,7 @@
 
     if (pceltFethed!=NULL)
         *pceltFethed= i;
-    
+
     if (i==celt)
         return S_OK;
     else
@@ -1586,7 +1586,7 @@
         return S_FALSE;
 
     This->currentPos+=celt;
-    
+
     return S_OK;
 }
 
@@ -1632,7 +1632,7 @@
 
     if (currentPos > tabSize)
         return E_INVALIDARG;
-    
+
     /* Initialize the virtual function table. */
     ICOM_VTBL(newEnumMoniker)    = &VT_EnumMonikerImpl;
     newEnumMoniker->ref          = 0;
@@ -1675,7 +1675,7 @@
 
     if (ppmkComposite==NULL)
         return E_POINTER;
-    
+
     *ppmkComposite=0;
 
     if (pmkFirst==NULL && pmkRest!=NULL){
diff --git a/dlls/ole32/datacache.c b/dlls/ole32/datacache.c
index 9a44559..86ea590 100644
--- a/dlls/ole32/datacache.c
+++ b/dlls/ole32/datacache.c
@@ -30,17 +30,17 @@
  * NOTES
  *  -  This implementation of the datacache will let your application
  *     load documents that have embedded OLE objects in them and it will
- *     also retrieve the metafile representation of those objects. 
+ *     also retrieve the metafile representation of those objects.
  *  -  This implementation of the datacache will also allow your
  *     application to save new documents with OLE objects in them.
- *  -  The main thing that it doesn't do is allow you to activate 
+ *  -  The main thing that it doesn't do is allow you to activate
  *     or modify the OLE objects in any way.
  *  -  I haven't found any good documentation on the real usage of
  *     the streams created by the data cache. In particular, How to
  *     determine what the XXX stands for in the stream name
  *     "\002OlePresXXX". It appears to just be a counter.
  *  -  Also, I don't know the real content of the presentation stream
- *     header. I was able to figure-out where the extent of the object 
+ *     header. I was able to figure-out where the extent of the object
  *     was stored and the aspect, but that's about it.
  */
 #include <assert.h>
@@ -94,10 +94,10 @@
   /*
    * List all interface VTables here
    */
-  ICOM_VTABLE(IDataObject)*      lpvtbl1; 
+  ICOM_VTABLE(IDataObject)*      lpvtbl1;
   ICOM_VTABLE(IUnknown)*         lpvtbl2;
   ICOM_VTABLE(IPersistStorage)*  lpvtbl3;
-  ICOM_VTABLE(IViewObject2)*     lpvtbl4;  
+  ICOM_VTABLE(IViewObject2)*     lpvtbl4;
   ICOM_VTABLE(IOleCache2)*       lpvtbl5;
   ICOM_VTABLE(IOleCacheControl)* lpvtbl6;
 
@@ -132,17 +132,17 @@
 typedef struct DataCache DataCache;
 
 /*
- * Here, I define utility macros to help with the casting of the 
+ * Here, I define utility macros to help with the casting of the
  * "this" parameter.
  * There is a version to accomodate all of the VTables implemented
  * by this object.
  */
 #define _ICOM_THIS_From_IDataObject(class,name)       class* this = (class*)name;
-#define _ICOM_THIS_From_NDIUnknown(class, name)       class* this = (class*)(((char*)name)-sizeof(void*)); 
-#define _ICOM_THIS_From_IPersistStorage(class, name)  class* this = (class*)(((char*)name)-2*sizeof(void*)); 
-#define _ICOM_THIS_From_IViewObject2(class, name)     class* this = (class*)(((char*)name)-3*sizeof(void*)); 
-#define _ICOM_THIS_From_IOleCache2(class, name)       class* this = (class*)(((char*)name)-4*sizeof(void*)); 
-#define _ICOM_THIS_From_IOleCacheControl(class, name) class* this = (class*)(((char*)name)-5*sizeof(void*)); 
+#define _ICOM_THIS_From_NDIUnknown(class, name)       class* this = (class*)(((char*)name)-sizeof(void*));
+#define _ICOM_THIS_From_IPersistStorage(class, name)  class* this = (class*)(((char*)name)-2*sizeof(void*));
+#define _ICOM_THIS_From_IViewObject2(class, name)     class* this = (class*)(((char*)name)-3*sizeof(void*));
+#define _ICOM_THIS_From_IOleCache2(class, name)       class* this = (class*)(((char*)name)-4*sizeof(void*));
+#define _ICOM_THIS_From_IOleCacheControl(class, name) class* this = (class*)(((char*)name)-5*sizeof(void*));
 
 /*
  * Prototypes for the methods of the DataCache class.
@@ -170,9 +170,9 @@
             IUnknown*      iface,
             REFIID         riid,
             void**         ppvObject);
-static ULONG WINAPI DataCache_NDIUnknown_AddRef( 
+static ULONG WINAPI DataCache_NDIUnknown_AddRef(
             IUnknown*      iface);
-static ULONG WINAPI DataCache_NDIUnknown_Release( 
+static ULONG WINAPI DataCache_NDIUnknown_Release(
             IUnknown*      iface);
 
 /*
@@ -183,39 +183,39 @@
             IDataObject*     iface,
             REFIID           riid,
             void**           ppvObject);
-static ULONG WINAPI DataCache_IDataObject_AddRef( 
+static ULONG WINAPI DataCache_IDataObject_AddRef(
             IDataObject*     iface);
-static ULONG WINAPI DataCache_IDataObject_Release( 
+static ULONG WINAPI DataCache_IDataObject_Release(
             IDataObject*     iface);
 static HRESULT WINAPI DataCache_GetData(
 	    IDataObject*     iface,
-	    LPFORMATETC      pformatetcIn, 
+	    LPFORMATETC      pformatetcIn,
 	    STGMEDIUM*       pmedium);
 static HRESULT WINAPI DataCache_GetDataHere(
-	    IDataObject*     iface, 
+	    IDataObject*     iface,
 	    LPFORMATETC      pformatetc,
 	    STGMEDIUM*       pmedium);
 static HRESULT WINAPI DataCache_QueryGetData(
 	    IDataObject*     iface,
 	    LPFORMATETC      pformatetc);
 static HRESULT WINAPI DataCache_GetCanonicalFormatEtc(
-	    IDataObject*     iface, 
-	    LPFORMATETC      pformatectIn, 
+	    IDataObject*     iface,
+	    LPFORMATETC      pformatectIn,
 	    LPFORMATETC      pformatetcOut);
 static HRESULT WINAPI DataCache_IDataObject_SetData(
 	    IDataObject*     iface,
-	    LPFORMATETC      pformatetc, 
-	    STGMEDIUM*       pmedium, 
+	    LPFORMATETC      pformatetc,
+	    STGMEDIUM*       pmedium,
 	    BOOL             fRelease);
 static HRESULT WINAPI DataCache_EnumFormatEtc(
-	    IDataObject*     iface,       
+	    IDataObject*     iface,
 	    DWORD            dwDirection,
 	    IEnumFORMATETC** ppenumFormatEtc);
 static HRESULT WINAPI DataCache_DAdvise(
-	    IDataObject*     iface, 
-	    FORMATETC*       pformatetc, 
-	    DWORD            advf, 
-	    IAdviseSink*     pAdvSink, 
+	    IDataObject*     iface,
+	    FORMATETC*       pformatetc,
+	    DWORD            advf,
+	    IAdviseSink*     pAdvSink,
 	    DWORD*           pdwConnection);
 static HRESULT WINAPI DataCache_DUnadvise(
 	    IDataObject*     iface,
@@ -232,27 +232,27 @@
             IPersistStorage* iface,
             REFIID           riid,
             void**           ppvObject);
-static ULONG WINAPI DataCache_IPersistStorage_AddRef( 
+static ULONG WINAPI DataCache_IPersistStorage_AddRef(
             IPersistStorage* iface);
-static ULONG WINAPI DataCache_IPersistStorage_Release( 
+static ULONG WINAPI DataCache_IPersistStorage_Release(
             IPersistStorage* iface);
-static HRESULT WINAPI DataCache_GetClassID( 
+static HRESULT WINAPI DataCache_GetClassID(
             IPersistStorage* iface,
 	    CLSID*           pClassID);
-static HRESULT WINAPI DataCache_IsDirty( 
+static HRESULT WINAPI DataCache_IsDirty(
             IPersistStorage* iface);
-static HRESULT WINAPI DataCache_InitNew( 
-            IPersistStorage* iface, 
-	    IStorage*        pStg);
-static HRESULT WINAPI DataCache_Load( 
+static HRESULT WINAPI DataCache_InitNew(
             IPersistStorage* iface,
 	    IStorage*        pStg);
-static HRESULT WINAPI DataCache_Save( 
+static HRESULT WINAPI DataCache_Load(
             IPersistStorage* iface,
-	    IStorage*        pStg, 
+	    IStorage*        pStg);
+static HRESULT WINAPI DataCache_Save(
+            IPersistStorage* iface,
+	    IStorage*        pStg,
 	    BOOL             fSameAsLoad);
-static HRESULT WINAPI DataCache_SaveCompleted( 
-            IPersistStorage* iface,  
+static HRESULT WINAPI DataCache_SaveCompleted(
+            IPersistStorage* iface,
 	    IStorage*        pStgNew);
 static HRESULT WINAPI DataCache_HandsOffStorage(
             IPersistStorage* iface);
@@ -265,54 +265,54 @@
             IViewObject2* iface,
             REFIID           riid,
             void**           ppvObject);
-static ULONG WINAPI DataCache_IViewObject2_AddRef( 
+static ULONG WINAPI DataCache_IViewObject2_AddRef(
             IViewObject2* iface);
-static ULONG WINAPI DataCache_IViewObject2_Release( 
+static ULONG WINAPI DataCache_IViewObject2_Release(
             IViewObject2* iface);
 static HRESULT WINAPI DataCache_Draw(
             IViewObject2*    iface,
 	    DWORD            dwDrawAspect,
 	    LONG             lindex,
 	    void*            pvAspect,
-	    DVTARGETDEVICE*  ptd, 
-	    HDC              hdcTargetDev, 
+	    DVTARGETDEVICE*  ptd,
+	    HDC              hdcTargetDev,
 	    HDC              hdcDraw,
 	    LPCRECTL         lprcBounds,
 	    LPCRECTL         lprcWBounds,
 	    IVO_ContCallback pfnContinue,
 	    DWORD            dwContinue);
 static HRESULT WINAPI DataCache_GetColorSet(
-            IViewObject2*   iface, 
-	    DWORD           dwDrawAspect, 
-	    LONG            lindex, 
-	    void*           pvAspect, 
-	    DVTARGETDEVICE* ptd, 
-	    HDC             hicTargetDevice, 
+            IViewObject2*   iface,
+	    DWORD           dwDrawAspect,
+	    LONG            lindex,
+	    void*           pvAspect,
+	    DVTARGETDEVICE* ptd,
+	    HDC             hicTargetDevice,
 	    LOGPALETTE**    ppColorSet);
 static HRESULT WINAPI DataCache_Freeze(
             IViewObject2*   iface,
 	    DWORD           dwDrawAspect,
 	    LONG            lindex,
-	    void*           pvAspect, 
+	    void*           pvAspect,
 	    DWORD*          pdwFreeze);
 static HRESULT WINAPI DataCache_Unfreeze(
             IViewObject2*   iface,
 	    DWORD           dwFreeze);
 static HRESULT WINAPI DataCache_SetAdvise(
             IViewObject2*   iface,
-	    DWORD           aspects, 
-	    DWORD           advf, 
+	    DWORD           aspects,
+	    DWORD           advf,
 	    IAdviseSink*    pAdvSink);
 static HRESULT WINAPI DataCache_GetAdvise(
-            IViewObject2*   iface, 
-	    DWORD*          pAspects, 
-	    DWORD*          pAdvf, 
+            IViewObject2*   iface,
+	    DWORD*          pAspects,
+	    DWORD*          pAdvf,
 	    IAdviseSink**   ppAdvSink);
 static HRESULT WINAPI DataCache_GetExtent(
-            IViewObject2*   iface, 
-	    DWORD           dwDrawAspect, 
-	    LONG            lindex, 
-	    DVTARGETDEVICE* ptd, 
+            IViewObject2*   iface,
+	    DWORD           dwDrawAspect,
+	    LONG            lindex,
+	    DVTARGETDEVICE* ptd,
 	    LPSIZEL         lpsizel);
 
 /*
@@ -323,9 +323,9 @@
             IOleCache2*     iface,
             REFIID          riid,
             void**          ppvObject);
-static ULONG WINAPI DataCache_IOleCache2_AddRef( 
+static ULONG WINAPI DataCache_IOleCache2_AddRef(
             IOleCache2*     iface);
-static ULONG WINAPI DataCache_IOleCache2_Release( 
+static ULONG WINAPI DataCache_IOleCache2_Release(
             IOleCache2*     iface);
 static HRESULT WINAPI DataCache_Cache(
             IOleCache2*     iface,
@@ -348,7 +348,7 @@
 	    BOOL            fRelease);
 static HRESULT WINAPI DataCache_UpdateCache(
             IOleCache2*     iface,
-	    LPDATAOBJECT    pDataObject, 
+	    LPDATAOBJECT    pDataObject,
 	    DWORD           grfUpdf,
 	    LPVOID          pReserved);
 static HRESULT WINAPI DataCache_DiscardCache(
@@ -363,9 +363,9 @@
             IOleCacheControl* iface,
             REFIID            riid,
             void**            ppvObject);
-static ULONG WINAPI DataCache_IOleCacheControl_AddRef( 
+static ULONG WINAPI DataCache_IOleCacheControl_AddRef(
             IOleCacheControl* iface);
-static ULONG WINAPI DataCache_IOleCacheControl_Release( 
+static ULONG WINAPI DataCache_IOleCacheControl_Release(
             IOleCacheControl* iface);
 static HRESULT WINAPI DataCache_OnRun(
 	    IOleCacheControl* iface,
@@ -460,9 +460,9 @@
  *              CreateDataCache        [OLE32.54]
  */
 HRESULT WINAPI CreateDataCache(
-  LPUNKNOWN pUnkOuter, 
-  REFCLSID  rclsid, 
-  REFIID    riid, 
+  LPUNKNOWN pUnkOuter,
+  REFCLSID  rclsid,
+  REFIID    riid,
   LPVOID*   ppvObj)
 {
   DataCache* newCache = NULL;
@@ -484,14 +484,14 @@
    * This is necessary because it's the only time the non-delegating
    * IUnknown pointer can be returned to the outside.
    */
-  if ( (pUnkOuter!=NULL) && 
+  if ( (pUnkOuter!=NULL) &&
        (memcmp(&IID_IUnknown, riid, sizeof(IID_IUnknown)) != 0) )
     return CLASS_E_NOAGGREGATION;
 
   /*
    * Try to construct a new instance of the class.
    */
-  newCache = DataCache_Construct(rclsid, 
+  newCache = DataCache_Construct(rclsid,
 				 pUnkOuter);
 
   if (newCache == 0)
@@ -527,7 +527,7 @@
 
   if (newObject==0)
     return newObject;
-  
+
   /*
    * Initialize the virtual function table.
    */
@@ -537,16 +537,16 @@
   newObject->lpvtbl4 = &DataCache_IViewObject2_VTable;
   newObject->lpvtbl5 = &DataCache_IOleCache2_VTable;
   newObject->lpvtbl6 = &DataCache_IOleCacheControl_VTable;
-  
+
   /*
-   * Start with one reference count. The caller of this function 
+   * Start with one reference count. The caller of this function
    * must release the interface pointer when it is done.
    */
   newObject->ref = 1;
 
   /*
    * Initialize the outer unknown
-   * We don't keep a reference on the outer unknown since, the way 
+   * We don't keep a reference on the outer unknown since, the way
    * aggregation works, our lifetime is at least as large as it's
    * lifetime.
    */
@@ -592,7 +592,7 @@
 /************************************************************************
  * DataCache_ReadPresentationData
  *
- * This method will read information for the requested presentation 
+ * This method will read information for the requested presentation
  * into the given structure.
  *
  * Param:
@@ -795,7 +795,7 @@
 /************************************************************************
  * DataCache_ReadPresentationData
  *
- * This method will read information for the requested presentation 
+ * This method will read information for the requested presentation
  * into the given structure.
  *
  * Param:
@@ -821,7 +821,7 @@
    * Open the presentation stream.
    */
   hres = DataCache_OpenPresStream(
-           this, 
+           this,
 	   drawAspect,
 	   &presStream);
 
@@ -852,8 +852,8 @@
   /*
    * Allocate a buffer for the metafile bits.
    */
-  metafileBits = HeapAlloc(GetProcessHeap(), 
-			   0, 
+  metafileBits = HeapAlloc(GetProcessHeap(),
+			   0,
 			   streamInfo.cbSize.s.LowPart);
 
   /*
@@ -910,7 +910,7 @@
    */
   if ( (this==0) || (ppvObject==0) )
     return E_INVALIDARG;
-  
+
   /*
    * Initialize the return parameter.
    */
@@ -919,11 +919,11 @@
   /*
    * Compare the riid with the interface IDs implemented by this object.
    */
-  if (memcmp(&IID_IUnknown, riid, sizeof(IID_IUnknown)) == 0) 
+  if (memcmp(&IID_IUnknown, riid, sizeof(IID_IUnknown)) == 0)
   {
     *ppvObject = iface;
   }
-  else if (memcmp(&IID_IDataObject, riid, sizeof(IID_IDataObject)) == 0) 
+  else if (memcmp(&IID_IDataObject, riid, sizeof(IID_IDataObject)) == 0)
   {
     *ppvObject = (IDataObject*)&(this->lpvtbl1);
   }
@@ -942,7 +942,7 @@
   {
     *ppvObject = (IOleCache2*)&(this->lpvtbl5);
   }
-  else if (memcmp(&IID_IOleCacheControl, riid, sizeof(IID_IOleCacheControl)) == 0) 
+  else if (memcmp(&IID_IOleCacheControl, riid, sizeof(IID_IOleCacheControl)) == 0)
   {
     *ppvObject = (IOleCacheControl*)&(this->lpvtbl6);
   }
@@ -955,14 +955,14 @@
     WARN( "() : asking for unsupported interface %s\n", debugstr_guid(riid));
     return E_NOINTERFACE;
   }
-  
+
   /*
    * Query Interface always increases the reference count by one when it is
-   * successful. 
+   * successful.
    */
   IUnknown_AddRef((IUnknown*)*ppvObject);
 
-  return S_OK;;  
+  return S_OK;
 }
 
 /************************************************************************
@@ -973,7 +973,7 @@
  * This version of QueryInterface will not delegate it's implementation
  * to the outer unknown.
  */
-static ULONG WINAPI DataCache_NDIUnknown_AddRef( 
+static ULONG WINAPI DataCache_NDIUnknown_AddRef(
             IUnknown*      iface)
 {
   _ICOM_THIS_From_NDIUnknown(DataCache, iface);
@@ -991,7 +991,7 @@
  * This version of QueryInterface will not delegate it's implementation
  * to the outer unknown.
  */
-static ULONG WINAPI DataCache_NDIUnknown_Release( 
+static ULONG WINAPI DataCache_NDIUnknown_Release(
             IUnknown*      iface)
 {
   _ICOM_THIS_From_NDIUnknown(DataCache, iface);
@@ -1010,7 +1010,7 @@
 
     return 0;
   }
-  
+
   return this->ref;
 }
 
@@ -1031,7 +1031,7 @@
 {
   _ICOM_THIS_From_IDataObject(DataCache, iface);
 
-  return IUnknown_QueryInterface(this->outerUnknown, riid, ppvObject);  
+  return IUnknown_QueryInterface(this->outerUnknown, riid, ppvObject);
 }
 
 /************************************************************************
@@ -1039,12 +1039,12 @@
  *
  * See Windows documentation for more details on IUnknown methods.
  */
-static ULONG WINAPI DataCache_IDataObject_AddRef( 
+static ULONG WINAPI DataCache_IDataObject_AddRef(
             IDataObject*     iface)
 {
   _ICOM_THIS_From_IDataObject(DataCache, iface);
 
-  return IUnknown_AddRef(this->outerUnknown);  
+  return IUnknown_AddRef(this->outerUnknown);
 }
 
 /************************************************************************
@@ -1052,12 +1052,12 @@
  *
  * See Windows documentation for more details on IUnknown methods.
  */
-static ULONG WINAPI DataCache_IDataObject_Release( 
+static ULONG WINAPI DataCache_IDataObject_Release(
             IDataObject*     iface)
 {
   _ICOM_THIS_From_IDataObject(DataCache, iface);
 
-  return IUnknown_Release(this->outerUnknown);  
+  return IUnknown_Release(this->outerUnknown);
 }
 
 /************************************************************************
@@ -1069,7 +1069,7 @@
  */
 static HRESULT WINAPI DataCache_GetData(
 	    IDataObject*     iface,
-	    LPFORMATETC      pformatetcIn, 
+	    LPFORMATETC      pformatetcIn,
 	    STGMEDIUM*       pmedium)
 {
   HRESULT hr = 0;
@@ -1167,7 +1167,7 @@
 }
 
 static HRESULT WINAPI DataCache_GetDataHere(
-	    IDataObject*     iface, 
+	    IDataObject*     iface,
 	    LPFORMATETC      pformatetc,
 	    STGMEDIUM*       pmedium)
 {
@@ -1191,8 +1191,8 @@
  * See Windows documentation for more details on IDataObject methods.
  */
 static HRESULT WINAPI DataCache_GetCanonicalFormatEtc(
-	    IDataObject*     iface, 
-	    LPFORMATETC      pformatectIn, 
+	    IDataObject*     iface,
+	    LPFORMATETC      pformatectIn,
 	    LPFORMATETC      pformatetcOut)
 {
   TRACE("()\n");
@@ -1208,8 +1208,8 @@
  */
 static HRESULT WINAPI DataCache_IDataObject_SetData(
 	    IDataObject*     iface,
-	    LPFORMATETC      pformatetc, 
-	    STGMEDIUM*       pmedium, 
+	    LPFORMATETC      pformatetc,
+	    STGMEDIUM*       pmedium,
 	    BOOL             fRelease)
 {
   IOleCache2* oleCache = NULL;
@@ -1226,7 +1226,7 @@
 
   IOleCache2_Release(oleCache);
 
-  return hres;;
+  return hres;
 }
 
 /************************************************************************
@@ -1237,7 +1237,7 @@
  * See Windows documentation for more details on IDataObject methods.
  */
 static HRESULT WINAPI DataCache_EnumFormatEtc(
-	    IDataObject*     iface,       
+	    IDataObject*     iface,
 	    DWORD            dwDirection,
 	    IEnumFORMATETC** ppenumFormatEtc)
 {
@@ -1253,10 +1253,10 @@
  * See Windows documentation for more details on IDataObject methods.
  */
 static HRESULT WINAPI DataCache_DAdvise(
-	    IDataObject*     iface, 
-	    FORMATETC*       pformatetc, 
-	    DWORD            advf, 
-	    IAdviseSink*     pAdvSink, 
+	    IDataObject*     iface,
+	    FORMATETC*       pformatetc,
+	    DWORD            advf,
+	    IAdviseSink*     pAdvSink,
 	    DWORD*           pdwConnection)
 {
   TRACE("()\n");
@@ -1310,7 +1310,7 @@
 {
   _ICOM_THIS_From_IPersistStorage(DataCache, iface);
 
-  return IUnknown_QueryInterface(this->outerUnknown, riid, ppvObject);  
+  return IUnknown_QueryInterface(this->outerUnknown, riid, ppvObject);
 }
 
 /************************************************************************
@@ -1318,12 +1318,12 @@
  *
  * See Windows documentation for more details on IUnknown methods.
  */
-static ULONG WINAPI DataCache_IPersistStorage_AddRef( 
+static ULONG WINAPI DataCache_IPersistStorage_AddRef(
             IPersistStorage* iface)
 {
   _ICOM_THIS_From_IPersistStorage(DataCache, iface);
 
-  return IUnknown_AddRef(this->outerUnknown);  
+  return IUnknown_AddRef(this->outerUnknown);
 }
 
 /************************************************************************
@@ -1331,12 +1331,12 @@
  *
  * See Windows documentation for more details on IUnknown methods.
  */
-static ULONG WINAPI DataCache_IPersistStorage_Release( 
+static ULONG WINAPI DataCache_IPersistStorage_Release(
             IPersistStorage* iface)
 {
   _ICOM_THIS_From_IPersistStorage(DataCache, iface);
 
-  return IUnknown_Release(this->outerUnknown);  
+  return IUnknown_Release(this->outerUnknown);
 }
 
 /************************************************************************
@@ -1346,7 +1346,7 @@
  *
  * See Windows documentation for more details on IPersistStorage methods.
  */
-static HRESULT WINAPI DataCache_GetClassID( 
+static HRESULT WINAPI DataCache_GetClassID(
             IPersistStorage* iface,
 	    CLSID*           pClassID)
 {
@@ -1357,12 +1357,12 @@
 /************************************************************************
  * DataCache_IsDirty (IPersistStorage)
  *
- * Until we actully connect to a running object and retrieve new 
+ * Until we actully connect to a running object and retrieve new
  * information to it, we never get dirty.
  *
  * See Windows documentation for more details on IPersistStorage methods.
  */
-static HRESULT WINAPI DataCache_IsDirty( 
+static HRESULT WINAPI DataCache_IsDirty(
             IPersistStorage* iface)
 {
   TRACE("(%p)\n", iface);
@@ -1378,8 +1378,8 @@
  *
  * See Windows documentation for more details on IPersistStorage methods.
  */
-static HRESULT WINAPI DataCache_InitNew( 
-            IPersistStorage* iface, 
+static HRESULT WINAPI DataCache_InitNew(
+            IPersistStorage* iface,
 	    IStorage*        pStg)
 {
   TRACE("(%p, %p)\n", iface, pStg);
@@ -1390,14 +1390,14 @@
 /************************************************************************
  * DataCache_Load (IPersistStorage)
  *
- * The data cache implementation of IPersistStorage_Load doesn't 
+ * The data cache implementation of IPersistStorage_Load doesn't
  * actually load anything. Instead, it holds on to the storage pointer
- * and it will load the presentation information when the 
+ * and it will load the presentation information when the
  * IDataObject_GetData or IViewObject2_Draw methods are called.
  *
  * See Windows documentation for more details on IPersistStorage methods.
  */
-static HRESULT WINAPI DataCache_Load( 
+static HRESULT WINAPI DataCache_Load(
             IPersistStorage* iface,
 	    IStorage*        pStg)
 {
@@ -1422,23 +1422,23 @@
 /************************************************************************
  * DataCache_Save (IPersistStorage)
  *
- * Until we actully connect to a running object and retrieve new 
+ * Until we actully connect to a running object and retrieve new
  * information to it, we never have to save anything. However, it is
  * our responsability to copy the information when saving to a new
  * storage.
  *
  * See Windows documentation for more details on IPersistStorage methods.
  */
-static HRESULT WINAPI DataCache_Save( 
+static HRESULT WINAPI DataCache_Save(
             IPersistStorage* iface,
-	    IStorage*        pStg, 
+	    IStorage*        pStg,
 	    BOOL             fSameAsLoad)
 {
   _ICOM_THIS_From_IPersistStorage(DataCache, iface);
 
   TRACE("(%p, %p, %d)\n", iface, pStg, fSameAsLoad);
 
-  if ( (!fSameAsLoad) && 
+  if ( (!fSameAsLoad) &&
        (this->presentationStorage!=NULL) )
   {
     return IStorage_CopyTo(this->presentationStorage,
@@ -1459,8 +1459,8 @@
  *
  * See Windows documentation for more details on IPersistStorage methods.
  */
-static HRESULT WINAPI DataCache_SaveCompleted( 
-            IPersistStorage* iface,  
+static HRESULT WINAPI DataCache_SaveCompleted(
+            IPersistStorage* iface,
 	    IStorage*        pStgNew)
 {
   TRACE("(%p, %p)\n", iface, pStgNew);
@@ -1524,7 +1524,7 @@
 {
   _ICOM_THIS_From_IViewObject2(DataCache, iface);
 
-  return IUnknown_QueryInterface(this->outerUnknown, riid, ppvObject);  
+  return IUnknown_QueryInterface(this->outerUnknown, riid, ppvObject);
 }
 
 /************************************************************************
@@ -1532,12 +1532,12 @@
  *
  * See Windows documentation for more details on IUnknown methods.
  */
-static ULONG WINAPI DataCache_IViewObject2_AddRef( 
+static ULONG WINAPI DataCache_IViewObject2_AddRef(
             IViewObject2* iface)
 {
   _ICOM_THIS_From_IViewObject2(DataCache, iface);
 
-  return IUnknown_AddRef(this->outerUnknown);  
+  return IUnknown_AddRef(this->outerUnknown);
 }
 
 /************************************************************************
@@ -1545,12 +1545,12 @@
  *
  * See Windows documentation for more details on IUnknown methods.
  */
-static ULONG WINAPI DataCache_IViewObject2_Release( 
+static ULONG WINAPI DataCache_IViewObject2_Release(
             IViewObject2* iface)
 {
   _ICOM_THIS_From_IViewObject2(DataCache, iface);
 
-  return IUnknown_Release(this->outerUnknown);  
+  return IUnknown_Release(this->outerUnknown);
 }
 
 /************************************************************************
@@ -1566,8 +1566,8 @@
 	    DWORD            dwDrawAspect,
 	    LONG             lindex,
 	    void*            pvAspect,
-	    DVTARGETDEVICE*  ptd, 
-	    HDC              hdcTargetDev, 
+	    DVTARGETDEVICE*  ptd,
+	    HDC              hdcTargetDev,
 	    HDC              hdcDraw,
 	    LPCRECTL         lprcBounds,
 	    LPCRECTL         lprcWBounds,
@@ -1585,7 +1585,7 @@
 	dwDrawAspect,
 	lindex,
 	pvAspect,
-	hdcTargetDev, 
+	hdcTargetDev,
 	hdcDraw,
 	lprcBounds,
 	lprcWBounds,
@@ -1636,7 +1636,7 @@
 		   presData.dwObjectExtentY,
 		   &oldWindowExt);
 
-    SetViewportExtEx(hdcDraw, 
+    SetViewportExtEx(hdcDraw,
 		     lprcBounds->right - lprcBounds->left,
 		     lprcBounds->bottom - lprcBounds->top,
 		     &oldViewportExt);
@@ -1653,7 +1653,7 @@
 		   oldWindowExt.cy,
 		   NULL);
 
-    SetViewportExtEx(hdcDraw, 
+    SetViewportExtEx(hdcDraw,
 		     oldViewportExt.cx,
 		     oldViewportExt.cy,
 		     NULL);
@@ -1672,12 +1672,12 @@
 }
 
 static HRESULT WINAPI DataCache_GetColorSet(
-            IViewObject2*   iface, 
-	    DWORD           dwDrawAspect, 
-	    LONG            lindex, 
-	    void*           pvAspect, 
-	    DVTARGETDEVICE* ptd, 
-	    HDC             hicTargetDevice, 
+            IViewObject2*   iface,
+	    DWORD           dwDrawAspect,
+	    LONG            lindex,
+	    void*           pvAspect,
+	    DVTARGETDEVICE* ptd,
+	    HDC             hicTargetDevice,
 	    LOGPALETTE**    ppColorSet)
 {
   FIXME("stub\n");
@@ -1688,7 +1688,7 @@
             IViewObject2*   iface,
 	    DWORD           dwDrawAspect,
 	    LONG            lindex,
-	    void*           pvAspect, 
+	    void*           pvAspect,
 	    DWORD*          pdwFreeze)
 {
   FIXME("stub\n");
@@ -1713,8 +1713,8 @@
  */
 static HRESULT WINAPI DataCache_SetAdvise(
             IViewObject2*   iface,
-	    DWORD           aspects, 
-	    DWORD           advf, 
+	    DWORD           aspects,
+	    DWORD           advf,
 	    IAdviseSink*    pAdvSink)
 {
   _ICOM_THIS_From_IViewObject2(DataCache, iface);
@@ -1728,7 +1728,7 @@
   {
     IAdviseSink_Release(this->sinkInterface);
     this->sinkInterface  = NULL;
-    this->sinkAspects    = 0; 
+    this->sinkAspects    = 0;
     this->sinkAdviseFlag = 0;
   }
 
@@ -1738,8 +1738,8 @@
   if (pAdvSink!=NULL)
   {
     this->sinkInterface  = pAdvSink;
-    this->sinkAspects    = aspects; 
-    this->sinkAdviseFlag = advf;    
+    this->sinkAspects    = aspects;
+    this->sinkAdviseFlag = advf;
 
     IAdviseSink_AddRef(this->sinkInterface);
   }
@@ -1761,15 +1761,15 @@
 /************************************************************************
  * DataCache_GetAdvise (IViewObject2)
  *
- * This method queries the current state of the advise sink 
+ * This method queries the current state of the advise sink
  * installed on the data cache.
  *
  * See Windows documentation for more details on IViewObject2 methods.
  */
 static HRESULT WINAPI DataCache_GetAdvise(
-            IViewObject2*   iface, 
-	    DWORD*          pAspects, 
-	    DWORD*          pAdvf, 
+            IViewObject2*   iface,
+	    DWORD*          pAspects,
+	    DWORD*          pAdvf,
 	    IAdviseSink**   ppAdvSink)
 {
   _ICOM_THIS_From_IViewObject2(DataCache, iface);
@@ -1787,8 +1787,8 @@
 
   if (ppAdvSink!=NULL)
   {
-    IAdviseSink_QueryInterface(this->sinkInterface, 
-			       &IID_IAdviseSink, 
+    IAdviseSink_QueryInterface(this->sinkInterface,
+			       &IID_IAdviseSink,
 			       (void**)ppAdvSink);
   }
 
@@ -1803,10 +1803,10 @@
  * See Windows documentation for more details on IViewObject2 methods.
  */
 static HRESULT WINAPI DataCache_GetExtent(
-            IViewObject2*   iface, 
-	    DWORD           dwDrawAspect, 
-	    LONG            lindex, 
-	    DVTARGETDEVICE* ptd, 
+            IViewObject2*   iface,
+	    DWORD           dwDrawAspect,
+	    LONG            lindex,
+	    DVTARGETDEVICE* ptd,
 	    LPSIZEL         lpsizel)
 {
   PresentationDataHeader presData;
@@ -1814,7 +1814,7 @@
 
   _ICOM_THIS_From_IViewObject2(DataCache, iface);
 
-  TRACE("(%p, %lx, %ld, %p, %p)\n", 
+  TRACE("(%p, %lx, %ld, %p, %p)\n",
 	iface, dwDrawAspect, lindex, ptd, lpsizel);
 
   /*
@@ -1841,9 +1841,9 @@
    */
   if (ptd!=NULL)
     FIXME("Unimplemented ptd = %p\n", ptd);
-  
+
   /*
-   * Get the presentation information from the 
+   * Get the presentation information from the
    * cache.
    */
   hres = DataCache_ReadPresentationData(this,
@@ -1883,7 +1883,7 @@
 {
   _ICOM_THIS_From_IOleCache2(DataCache, iface);
 
-  return IUnknown_QueryInterface(this->outerUnknown, riid, ppvObject);  
+  return IUnknown_QueryInterface(this->outerUnknown, riid, ppvObject);
 }
 
 /************************************************************************
@@ -1891,12 +1891,12 @@
  *
  * See Windows documentation for more details on IUnknown methods.
  */
-static ULONG WINAPI DataCache_IOleCache2_AddRef( 
+static ULONG WINAPI DataCache_IOleCache2_AddRef(
             IOleCache2*     iface)
 {
   _ICOM_THIS_From_IOleCache2(DataCache, iface);
 
-  return IUnknown_AddRef(this->outerUnknown);  
+  return IUnknown_AddRef(this->outerUnknown);
 }
 
 /************************************************************************
@@ -1904,12 +1904,12 @@
  *
  * See Windows documentation for more details on IUnknown methods.
  */
-static ULONG WINAPI DataCache_IOleCache2_Release( 
+static ULONG WINAPI DataCache_IOleCache2_Release(
             IOleCache2*     iface)
 {
   _ICOM_THIS_From_IOleCache2(DataCache, iface);
 
-  return IUnknown_Release(this->outerUnknown);  
+  return IUnknown_Release(this->outerUnknown);
 }
 
 static HRESULT WINAPI DataCache_Cache(
@@ -1958,7 +1958,7 @@
 
 static HRESULT WINAPI DataCache_UpdateCache(
             IOleCache2*     iface,
-	    LPDATAOBJECT    pDataObject, 
+	    LPDATAOBJECT    pDataObject,
 	    DWORD           grfUpdf,
 	    LPVOID          pReserved)
 {
@@ -1992,7 +1992,7 @@
 {
   _ICOM_THIS_From_IOleCacheControl(DataCache, iface);
 
-  return IUnknown_QueryInterface(this->outerUnknown, riid, ppvObject);  
+  return IUnknown_QueryInterface(this->outerUnknown, riid, ppvObject);
 }
 
 /************************************************************************
@@ -2000,12 +2000,12 @@
  *
  * See Windows documentation for more details on IUnknown methods.
  */
-static ULONG WINAPI DataCache_IOleCacheControl_AddRef( 
+static ULONG WINAPI DataCache_IOleCacheControl_AddRef(
             IOleCacheControl* iface)
 {
   _ICOM_THIS_From_IOleCacheControl(DataCache, iface);
 
-  return IUnknown_AddRef(this->outerUnknown);  
+  return IUnknown_AddRef(this->outerUnknown);
 }
 
 /************************************************************************
@@ -2013,12 +2013,12 @@
  *
  * See Windows documentation for more details on IUnknown methods.
  */
-static ULONG WINAPI DataCache_IOleCacheControl_Release( 
+static ULONG WINAPI DataCache_IOleCacheControl_Release(
             IOleCacheControl* iface)
 {
   _ICOM_THIS_From_IOleCacheControl(DataCache, iface);
 
-  return IUnknown_Release(this->outerUnknown);  
+  return IUnknown_Release(this->outerUnknown);
 }
 
 static HRESULT WINAPI DataCache_OnRun(
diff --git a/dlls/ole32/defaulthandler.c b/dlls/ole32/defaulthandler.c
index 14adf2a..7a46610 100644
--- a/dlls/ole32/defaulthandler.c
+++ b/dlls/ole32/defaulthandler.c
@@ -38,7 +38,7 @@
  *   another one and go into emulation mode. Nothing has been
  *   done in this area.
  *
- * - Some functions still return E_NOTIMPL they have to be 
+ * - Some functions still return E_NOTIMPL they have to be
  *   implemented. Most of those are related to the running of the
  *   actual server.
  *
@@ -66,7 +66,7 @@
   /*
    * List all interface VTables here
    */
-  ICOM_VTABLE(IOleObject)*      lpvtbl1; 
+  ICOM_VTABLE(IOleObject)*      lpvtbl1;
   ICOM_VTABLE(IUnknown)*        lpvtbl2;
   ICOM_VTABLE(IDataObject)*     lpvtbl3;
   ICOM_VTABLE(IRunnableObject)* lpvtbl4;
@@ -103,7 +103,7 @@
   IOleAdviseHolder* oleAdviseHolder;
 
   /*
-   * The IDataAdviseHolder maintains the data 
+   * The IDataAdviseHolder maintains the data
    * connections on behalf of the default handler.
    */
   IDataAdviseHolder* dataAdviseHolder;
@@ -111,7 +111,7 @@
   /*
    * Name of the container and object contained
    */
-  LPWSTR containerApp; 
+  LPWSTR containerApp;
   LPWSTR containerObj;
 
 };
@@ -119,15 +119,15 @@
 typedef struct DefaultHandler DefaultHandler;
 
 /*
- * Here, I define utility macros to help with the casting of the 
+ * Here, I define utility macros to help with the casting of the
  * "this" parameter.
  * There is a version to accomodate all of the VTables implemented
  * by this object.
  */
 #define _ICOM_THIS_From_IOleObject(class,name)       class* this = (class*)name;
-#define _ICOM_THIS_From_NDIUnknown(class, name)      class* this = (class*)(((char*)name)-sizeof(void*)); 
-#define _ICOM_THIS_From_IDataObject(class, name)     class* this = (class*)(((char*)name)-2*sizeof(void*)); 
-#define _ICOM_THIS_From_IRunnableObject(class, name) class* this = (class*)(((char*)name)-3*sizeof(void*)); 
+#define _ICOM_THIS_From_NDIUnknown(class, name)      class* this = (class*)(((char*)name)-sizeof(void*));
+#define _ICOM_THIS_From_IDataObject(class, name)     class* this = (class*)(((char*)name)-2*sizeof(void*));
+#define _ICOM_THIS_From_IRunnableObject(class, name) class* this = (class*)(((char*)name)-3*sizeof(void*));
 
 /*
  * Prototypes for the methods of the DefaultHandler class.
@@ -144,9 +144,9 @@
             IUnknown*      iface,
             REFIID         riid,
             void**         ppvObject);
-static ULONG WINAPI DefaultHandler_NDIUnknown_AddRef( 
+static ULONG WINAPI DefaultHandler_NDIUnknown_AddRef(
             IUnknown*      iface);
-static ULONG WINAPI DefaultHandler_NDIUnknown_Release( 
+static ULONG WINAPI DefaultHandler_NDIUnknown_Release(
             IUnknown*      iface);
 
 /*
@@ -157,9 +157,9 @@
             IOleObject*      iface,
             REFIID           riid,
             void**           ppvObject);
-static ULONG WINAPI DefaultHandler_AddRef( 
+static ULONG WINAPI DefaultHandler_AddRef(
             IOleObject*        iface);
-static ULONG WINAPI DefaultHandler_Release( 
+static ULONG WINAPI DefaultHandler_Release(
             IOleObject*        iface);
 static HRESULT WINAPI DefaultHandler_SetClientSite(
 	    IOleObject*        iface,
@@ -169,13 +169,13 @@
 	    IOleClientSite**   ppClientSite);
 static HRESULT WINAPI DefaultHandler_SetHostNames(
 	    IOleObject*        iface,
-	    LPCOLESTR          szContainerApp, 
+	    LPCOLESTR          szContainerApp,
 	    LPCOLESTR          szContainerObj);
 static HRESULT WINAPI DefaultHandler_Close(
-	    IOleObject*        iface, 
+	    IOleObject*        iface,
 	    DWORD              dwSaveOption);
 static HRESULT WINAPI DefaultHandler_SetMoniker(
-	    IOleObject*        iface, 
+	    IOleObject*        iface,
 	    DWORD              dwWhichMoniker,
 	    IMoniker*          pmk);
 static HRESULT WINAPI DefaultHandler_GetMoniker(
@@ -184,57 +184,57 @@
 	    DWORD              dwWhichMoniker,
 	    IMoniker**         ppmk);
 static HRESULT WINAPI DefaultHandler_InitFromData(
-	    IOleObject*        iface, 
-	    IDataObject*       pDataObject, 
+	    IOleObject*        iface,
+	    IDataObject*       pDataObject,
 	    BOOL               fCreation,
 	    DWORD              dwReserved);
 static HRESULT WINAPI DefaultHandler_GetClipboardData(
-	    IOleObject*        iface, 
-	    DWORD              dwReserved, 
+	    IOleObject*        iface,
+	    DWORD              dwReserved,
 	    IDataObject**      ppDataObject);
 static HRESULT WINAPI DefaultHandler_DoVerb(
-	    IOleObject*        iface, 
-	    LONG               iVerb, 
-	    struct tagMSG*     lpmsg, 
-	    IOleClientSite*    pActiveSite, 
-	    LONG               lindex, 
-	    HWND               hwndParent, 
+	    IOleObject*        iface,
+	    LONG               iVerb,
+	    struct tagMSG*     lpmsg,
+	    IOleClientSite*    pActiveSite,
+	    LONG               lindex,
+	    HWND               hwndParent,
 	    LPCRECT            lprcPosRect);
 static HRESULT WINAPI DefaultHandler_EnumVerbs(
-	    IOleObject*        iface, 
+	    IOleObject*        iface,
 	    IEnumOLEVERB**     ppEnumOleVerb);
 static HRESULT WINAPI DefaultHandler_Update(
 	    IOleObject*        iface);
 static HRESULT WINAPI DefaultHandler_IsUpToDate(
 	    IOleObject*        iface);
 static HRESULT WINAPI DefaultHandler_GetUserClassID(
-	    IOleObject*        iface, 
+	    IOleObject*        iface,
 	    CLSID*             pClsid);
 static HRESULT WINAPI DefaultHandler_GetUserType(
-	    IOleObject*        iface, 
-	    DWORD              dwFormOfType, 
+	    IOleObject*        iface,
+	    DWORD              dwFormOfType,
 	    LPOLESTR*          pszUserType);
 static HRESULT WINAPI DefaultHandler_SetExtent(
-	    IOleObject*        iface, 
-	    DWORD              dwDrawAspect, 
+	    IOleObject*        iface,
+	    DWORD              dwDrawAspect,
 	    SIZEL*             psizel);
 static HRESULT WINAPI DefaultHandler_GetExtent(
-	    IOleObject*        iface, 
-	    DWORD              dwDrawAspect, 
+	    IOleObject*        iface,
+	    DWORD              dwDrawAspect,
 	    SIZEL*             psizel);
 static HRESULT WINAPI DefaultHandler_Advise(
-	    IOleObject*        iface, 
-	    IAdviseSink*       pAdvSink, 
+	    IOleObject*        iface,
+	    IAdviseSink*       pAdvSink,
 	    DWORD*             pdwConnection);
 static HRESULT WINAPI DefaultHandler_Unadvise(
-	    IOleObject*        iface, 
+	    IOleObject*        iface,
 	    DWORD              dwConnection);
 static HRESULT WINAPI DefaultHandler_EnumAdvise(
-	    IOleObject*        iface, 
+	    IOleObject*        iface,
 	    IEnumSTATDATA**    ppenumAdvise);
 static HRESULT WINAPI DefaultHandler_GetMiscStatus(
-	    IOleObject*        iface, 
-	    DWORD              dwAspect, 
+	    IOleObject*        iface,
+	    DWORD              dwAspect,
 	    DWORD*             pdwStatus);
 static HRESULT WINAPI DefaultHandler_SetColorScheme(
 	    IOleObject*           iface,
@@ -248,39 +248,39 @@
             IDataObject*     iface,
             REFIID           riid,
             void**           ppvObject);
-static ULONG WINAPI DefaultHandler_IDataObject_AddRef( 
+static ULONG WINAPI DefaultHandler_IDataObject_AddRef(
             IDataObject*     iface);
-static ULONG WINAPI DefaultHandler_IDataObject_Release( 
+static ULONG WINAPI DefaultHandler_IDataObject_Release(
             IDataObject*     iface);
 static HRESULT WINAPI DefaultHandler_GetData(
 	    IDataObject*     iface,
-	    LPFORMATETC      pformatetcIn, 
+	    LPFORMATETC      pformatetcIn,
 	    STGMEDIUM*       pmedium);
 static HRESULT WINAPI DefaultHandler_GetDataHere(
-	    IDataObject*     iface, 
+	    IDataObject*     iface,
 	    LPFORMATETC      pformatetc,
 	    STGMEDIUM*       pmedium);
 static HRESULT WINAPI DefaultHandler_QueryGetData(
 	    IDataObject*     iface,
 	    LPFORMATETC      pformatetc);
 static HRESULT WINAPI DefaultHandler_GetCanonicalFormatEtc(
-	    IDataObject*     iface, 
-	    LPFORMATETC      pformatectIn, 
+	    IDataObject*     iface,
+	    LPFORMATETC      pformatectIn,
 	    LPFORMATETC      pformatetcOut);
 static HRESULT WINAPI DefaultHandler_SetData(
 	    IDataObject*     iface,
-	    LPFORMATETC      pformatetc, 
-	    STGMEDIUM*       pmedium, 
+	    LPFORMATETC      pformatetc,
+	    STGMEDIUM*       pmedium,
 	    BOOL             fRelease);
 static HRESULT WINAPI DefaultHandler_EnumFormatEtc(
-	    IDataObject*     iface,       
+	    IDataObject*     iface,
 	    DWORD            dwDirection,
 	    IEnumFORMATETC** ppenumFormatEtc);
 static HRESULT WINAPI DefaultHandler_DAdvise(
-	    IDataObject*     iface, 
-	    FORMATETC*       pformatetc, 
-	    DWORD            advf, 
-	    IAdviseSink*     pAdvSink, 
+	    IDataObject*     iface,
+	    FORMATETC*       pformatetc,
+	    DWORD            advf,
+	    IAdviseSink*     pAdvSink,
 	    DWORD*           pdwConnection);
 static HRESULT WINAPI DefaultHandler_DUnadvise(
 	    IDataObject*     iface,
@@ -297,24 +297,24 @@
             IRunnableObject*     iface,
             REFIID               riid,
             void**               ppvObject);
-static ULONG WINAPI DefaultHandler_IRunnableObject_AddRef( 
+static ULONG WINAPI DefaultHandler_IRunnableObject_AddRef(
             IRunnableObject*     iface);
-static ULONG WINAPI DefaultHandler_IRunnableObject_Release( 
+static ULONG WINAPI DefaultHandler_IRunnableObject_Release(
             IRunnableObject*     iface);
-static HRESULT WINAPI DefaultHandler_GetRunningClass( 
-            IRunnableObject*     iface,   
+static HRESULT WINAPI DefaultHandler_GetRunningClass(
+            IRunnableObject*     iface,
 	    LPCLSID              lpClsid);
-static HRESULT WINAPI DefaultHandler_Run( 
+static HRESULT WINAPI DefaultHandler_Run(
             IRunnableObject*     iface,
 	    IBindCtx*            pbc);
-static BOOL    WINAPI DefaultHandler_IsRunning( 
+static BOOL    WINAPI DefaultHandler_IsRunning(
             IRunnableObject*     iface);
-static HRESULT WINAPI DefaultHandler_LockRunning( 
-            IRunnableObject*     iface, 
-	    BOOL                 fLock, 
+static HRESULT WINAPI DefaultHandler_LockRunning(
+            IRunnableObject*     iface,
+	    BOOL                 fLock,
 	    BOOL                 fLastUnlockCloses);
-static HRESULT WINAPI DefaultHandler_SetContainedObject( 
-            IRunnableObject*     iface, 
+static HRESULT WINAPI DefaultHandler_SetContainedObject(
+            IRunnableObject*     iface,
 	    BOOL                 fContained);
 
 
@@ -416,14 +416,14 @@
    * This is necessary because it's the only time the non-delegating
    * IUnknown pointer can be returned to the outside.
    */
-  if ( (pUnkOuter!=NULL) && 
+  if ( (pUnkOuter!=NULL) &&
        (memcmp(&IID_IUnknown, riid, sizeof(IID_IUnknown)) != 0) )
     return CLASS_E_NOAGGREGATION;
 
   /*
    * Try to construct a new instance of the class.
    */
-  newHandler = DefaultHandler_Construct(clsid, 
+  newHandler = DefaultHandler_Construct(clsid,
 					pUnkOuter);
 
   if (newHandler == 0)
@@ -459,7 +459,7 @@
 
   if (newObject==0)
     return newObject;
-  
+
   /*
    * Initialize the virtual function table.
    */
@@ -469,14 +469,14 @@
   newObject->lpvtbl4 = &DefaultHandler_IRunnableObject_VTable;
 
   /*
-   * Start with one reference count. The caller of this function 
+   * Start with one reference count. The caller of this function
    * must release the interface pointer when it is done.
    */
   newObject->ref = 1;
 
   /*
    * Initialize the outer unknown
-   * We don't keep a reference on the outer unknown since, the way 
+   * We don't keep a reference on the outer unknown since, the way
    * aggregation works, our lifetime is at least as large as it's
    * lifetime.
    */
@@ -488,7 +488,7 @@
   /*
    * Create a datacache object.
    * We aggregate with the datacache. Make sure we pass our outer
-   * unknown as the datacache's outer unknown. 
+   * unknown as the datacache's outer unknown.
    */
   CreateDataCache(newObject->outerUnknown,
 		  clsid,
@@ -525,7 +525,7 @@
     HeapFree( GetProcessHeap(), 0, ptrToDestroy->containerObj );
     ptrToDestroy->containerObj = NULL;
   }
-  
+
   /*
    * Release our reference to the data cache.
    */
@@ -594,7 +594,7 @@
    */
   if ( (this==0) || (ppvObject==0) )
     return E_INVALIDARG;
-  
+
   /*
    * Initialize the return parameter.
    */
@@ -603,19 +603,19 @@
   /*
    * Compare the riid with the interface IDs implemented by this object.
    */
-  if (memcmp(&IID_IUnknown, riid, sizeof(IID_IUnknown)) == 0) 
+  if (memcmp(&IID_IUnknown, riid, sizeof(IID_IUnknown)) == 0)
   {
     *ppvObject = iface;
   }
-  else if (memcmp(&IID_IOleObject, riid, sizeof(IID_IOleObject)) == 0) 
+  else if (memcmp(&IID_IOleObject, riid, sizeof(IID_IOleObject)) == 0)
   {
     *ppvObject = (IOleObject*)&(this->lpvtbl1);
   }
-  else if (memcmp(&IID_IDataObject, riid, sizeof(IID_IDataObject)) == 0) 
+  else if (memcmp(&IID_IDataObject, riid, sizeof(IID_IDataObject)) == 0)
   {
     *ppvObject = (IDataObject*)&(this->lpvtbl3);
   }
-  else if (memcmp(&IID_IRunnableObject, riid, sizeof(IID_IRunnableObject)) == 0) 
+  else if (memcmp(&IID_IRunnableObject, riid, sizeof(IID_IRunnableObject)) == 0)
   {
     *ppvObject = (IRunnableObject*)&(this->lpvtbl4);
   }
@@ -627,7 +627,7 @@
     if (IUnknown_QueryInterface(this->dataCache, riid, ppvObject) == S_OK)
 	return S_OK;
   }
-  
+
   /*
    * Check that we obtained an interface.
    */
@@ -636,14 +636,14 @@
     WARN( "() : asking for un supported interface %s\n", debugstr_guid(riid));
     return E_NOINTERFACE;
   }
-  
+
   /*
    * Query Interface always increases the reference count by one when it is
-   * successful. 
+   * successful.
    */
   IUnknown_AddRef((IUnknown*)*ppvObject);
 
-  return S_OK;;  
+  return S_OK;
 }
 
 /************************************************************************
@@ -654,7 +654,7 @@
  * This version of QueryInterface will not delegate it's implementation
  * to the outer unknown.
  */
-static ULONG WINAPI DefaultHandler_NDIUnknown_AddRef( 
+static ULONG WINAPI DefaultHandler_NDIUnknown_AddRef(
             IUnknown*      iface)
 {
   _ICOM_THIS_From_NDIUnknown(DefaultHandler, iface);
@@ -672,7 +672,7 @@
  * This version of QueryInterface will not delegate it's implementation
  * to the outer unknown.
  */
-static ULONG WINAPI DefaultHandler_NDIUnknown_Release( 
+static ULONG WINAPI DefaultHandler_NDIUnknown_Release(
             IUnknown*      iface)
 {
   _ICOM_THIS_From_NDIUnknown(DefaultHandler, iface);
@@ -691,7 +691,7 @@
 
     return 0;
   }
-  
+
   return this->ref;
 }
 
@@ -712,7 +712,7 @@
 {
   _ICOM_THIS_From_IOleObject(DefaultHandler, iface);
 
-  return IUnknown_QueryInterface(this->outerUnknown, riid, ppvObject);  
+  return IUnknown_QueryInterface(this->outerUnknown, riid, ppvObject);
 }
 
 /************************************************************************
@@ -720,7 +720,7 @@
  *
  * See Windows documentation for more details on IUnknown methods.
  */
-static ULONG WINAPI DefaultHandler_AddRef( 
+static ULONG WINAPI DefaultHandler_AddRef(
             IOleObject*        iface)
 {
   _ICOM_THIS_From_IOleObject(DefaultHandler, iface);
@@ -733,7 +733,7 @@
  *
  * See Windows documentation for more details on IUnknown methods.
  */
-static ULONG WINAPI DefaultHandler_Release( 
+static ULONG WINAPI DefaultHandler_Release(
             IOleObject*        iface)
 {
   _ICOM_THIS_From_IOleObject(DefaultHandler, iface);
@@ -816,19 +816,19 @@
  */
 static HRESULT WINAPI DefaultHandler_SetHostNames(
 	    IOleObject*        iface,
-	    LPCOLESTR          szContainerApp, 
+	    LPCOLESTR          szContainerApp,
 	    LPCOLESTR          szContainerObj)
 {
   _ICOM_THIS_From_IOleObject(DefaultHandler, iface);
 
   TRACE("(%p, %s, %s)\n",
 	iface,
-	debugstr_w(szContainerApp), 
+	debugstr_w(szContainerApp),
 	debugstr_w(szContainerObj));
 
   /*
    * Be sure to cleanup before re-assinging the strings.
-   */ 
+   */
   if (this->containerApp!=NULL)
   {
     HeapFree( GetProcessHeap(), 0, this->containerApp );
@@ -869,7 +869,7 @@
  * See Windows documentation for more details on IOleObject methods.
  */
 static HRESULT WINAPI DefaultHandler_Close(
-	    IOleObject*        iface, 
+	    IOleObject*        iface,
 	    DWORD              dwSaveOption)
 {
   TRACE("()\n");
@@ -884,13 +884,13 @@
  * See Windows documentation for more details on IOleObject methods.
  */
 static HRESULT WINAPI DefaultHandler_SetMoniker(
-	    IOleObject*        iface, 
+	    IOleObject*        iface,
 	    DWORD              dwWhichMoniker,
 	    IMoniker*          pmk)
 {
   TRACE("(%p, %ld, %p)\n",
-	iface, 
-	dwWhichMoniker, 
+	iface,
+	dwWhichMoniker,
 	pmk);
 
   return S_OK;
@@ -920,7 +920,7 @@
 				     dwAssign,
 				     dwWhichMoniker,
 				     ppmk);
-			      
+
   }
 
   return E_UNSPEC;
@@ -930,12 +930,12 @@
  * DefaultHandler_InitFromData (IOleObject)
  *
  * This method is meaningless if the server is not running
- * 
+ *
  * See Windows documentation for more details on IOleObject methods.
  */
 static HRESULT WINAPI DefaultHandler_InitFromData(
-	    IOleObject*        iface, 
-	    IDataObject*       pDataObject, 
+	    IOleObject*        iface,
+	    IDataObject*       pDataObject,
 	    BOOL               fCreation,
 	    DWORD              dwReserved)
 {
@@ -949,12 +949,12 @@
  * DefaultHandler_GetClipboardData (IOleObject)
  *
  * This method is meaningless if the server is not running
- * 
+ *
  * See Windows documentation for more details on IOleObject methods.
  */
 static HRESULT WINAPI DefaultHandler_GetClipboardData(
-	    IOleObject*        iface, 
-	    DWORD              dwReserved, 
+	    IOleObject*        iface,
+	    DWORD              dwReserved,
 	    IDataObject**      ppDataObject)
 {
   TRACE("(%p, %ld, %p)\n",
@@ -964,12 +964,12 @@
 }
 
 static HRESULT WINAPI DefaultHandler_DoVerb(
-	    IOleObject*        iface, 
-	    LONG               iVerb, 
-	    struct tagMSG*     lpmsg, 
-	    IOleClientSite*    pActiveSite, 
-	    LONG               lindex, 
-	    HWND               hwndParent, 
+	    IOleObject*        iface,
+	    LONG               iVerb,
+	    struct tagMSG*     lpmsg,
+	    IOleClientSite*    pActiveSite,
+	    LONG               lindex,
+	    HWND               hwndParent,
 	    LPCRECT            lprcPosRect)
 {
   FIXME(": Stub\n");
@@ -981,11 +981,11 @@
  *
  * The default handler implementation of this method simply delegates
  * to OleRegEnumVerbs
- * 
+ *
  * See Windows documentation for more details on IOleObject methods.
  */
 static HRESULT WINAPI DefaultHandler_EnumVerbs(
-	    IOleObject*        iface, 
+	    IOleObject*        iface,
 	    IEnumOLEVERB**     ppEnumOleVerb)
 {
   _ICOM_THIS_From_IOleObject(DefaultHandler, iface);
@@ -1006,7 +1006,7 @@
  * DefaultHandler_IsUpToDate (IOleObject)
  *
  * This method is meaningless if the server is not running
- * 
+ *
  * See Windows documentation for more details on IOleObject methods.
  */
 static HRESULT WINAPI DefaultHandler_IsUpToDate(
@@ -1021,11 +1021,11 @@
  * DefaultHandler_GetUserClassID (IOleObject)
  *
  * TODO: Map to a new class ID if emulation is active.
- * 
+ *
  * See Windows documentation for more details on IOleObject methods.
  */
 static HRESULT WINAPI DefaultHandler_GetUserClassID(
-	    IOleObject*        iface, 
+	    IOleObject*        iface,
 	    CLSID*             pClsid)
 {
   _ICOM_THIS_From_IOleObject(DefaultHandler, iface);
@@ -1048,12 +1048,12 @@
  *
  * The default handler implementation of this method simply delegates
  * to OleRegGetUserType
- * 
+ *
  * See Windows documentation for more details on IOleObject methods.
  */
 static HRESULT WINAPI DefaultHandler_GetUserType(
-	    IOleObject*        iface, 
-	    DWORD              dwFormOfType, 
+	    IOleObject*        iface,
+	    DWORD              dwFormOfType,
 	    LPOLESTR*          pszUserType)
 {
   _ICOM_THIS_From_IOleObject(DefaultHandler, iface);
@@ -1071,8 +1071,8 @@
  * See Windows documentation for more details on IOleObject methods.
  */
 static HRESULT WINAPI DefaultHandler_SetExtent(
-	    IOleObject*        iface, 
-	    DWORD              dwDrawAspect, 
+	    IOleObject*        iface,
+	    DWORD              dwDrawAspect,
 	    SIZEL*             psizel)
 {
   TRACE("(%p, %lx, (%ld x %ld))\n", iface,
@@ -1089,15 +1089,15 @@
  * See Windows documentation for more details on IOleObject methods.
  */
 static HRESULT WINAPI DefaultHandler_GetExtent(
-	    IOleObject*        iface, 
-	    DWORD              dwDrawAspect, 
+	    IOleObject*        iface,
+	    DWORD              dwDrawAspect,
 	    SIZEL*             psizel)
 {
   DVTARGETDEVICE* targetDevice;
   IViewObject2*   cacheView = NULL;
   HRESULT         hres;
 
-  _ICOM_THIS_From_IOleObject(DefaultHandler, iface);  
+  _ICOM_THIS_From_IOleObject(DefaultHandler, iface);
 
   TRACE("(%p, %lx, %p)\n", iface, dwDrawAspect, psizel);
 
@@ -1110,8 +1110,8 @@
    * Prepare the call to the cache's GetExtent method.
    *
    * Here we would build a valid DVTARGETDEVICE structure
-   * but, since we are calling into the data cache, we 
-   * know it's implementation and we'll skip this 
+   * but, since we are calling into the data cache, we
+   * know it's implementation and we'll skip this
    * extra work until later.
    */
   targetDevice = NULL;
@@ -1139,12 +1139,12 @@
  * See Windows documentation for more details on IOleObject methods.
  */
 static HRESULT WINAPI DefaultHandler_Advise(
-	    IOleObject*        iface, 
-	    IAdviseSink*       pAdvSink, 
+	    IOleObject*        iface,
+	    IAdviseSink*       pAdvSink,
 	    DWORD*             pdwConnection)
 {
   HRESULT hres = S_OK;
-  _ICOM_THIS_From_IOleObject(DefaultHandler, iface);  
+  _ICOM_THIS_From_IOleObject(DefaultHandler, iface);
 
   TRACE("(%p, %p, %p)\n", iface, pAdvSink, pdwConnection);
 
@@ -1158,8 +1158,8 @@
 
   if (SUCCEEDED(hres))
   {
-    hres = IOleAdviseHolder_Advise(this->oleAdviseHolder, 
-				   pAdvSink, 
+    hres = IOleAdviseHolder_Advise(this->oleAdviseHolder,
+				   pAdvSink,
 				   pdwConnection);
   }
 
@@ -1175,10 +1175,10 @@
  * See Windows documentation for more details on IOleObject methods.
  */
 static HRESULT WINAPI DefaultHandler_Unadvise(
-	    IOleObject*        iface, 
+	    IOleObject*        iface,
 	    DWORD              dwConnection)
 {
-  _ICOM_THIS_From_IOleObject(DefaultHandler, iface);  
+  _ICOM_THIS_From_IOleObject(DefaultHandler, iface);
 
   TRACE("(%p, %ld)\n", iface, dwConnection);
 
@@ -1202,10 +1202,10 @@
  * See Windows documentation for more details on IOleObject methods.
  */
 static HRESULT WINAPI DefaultHandler_EnumAdvise(
-	    IOleObject*        iface, 
+	    IOleObject*        iface,
 	    IEnumSTATDATA**    ppenumAdvise)
 {
-  _ICOM_THIS_From_IOleObject(DefaultHandler, iface);  
+  _ICOM_THIS_From_IOleObject(DefaultHandler, iface);
 
   TRACE("(%p, %p)\n", iface, ppenumAdvise);
 
@@ -1236,8 +1236,8 @@
  * See Windows documentation for more details on IOleObject methods.
  */
 static HRESULT WINAPI DefaultHandler_GetMiscStatus(
-	    IOleObject*        iface, 
-	    DWORD              dwAspect, 
+	    IOleObject*        iface,
+	    DWORD              dwAspect,
 	    DWORD*             pdwStatus)
 {
   HRESULT hres;
@@ -1279,13 +1279,13 @@
  * See Windows documentation for more details on IUnknown methods.
  */
 static HRESULT WINAPI DefaultHandler_IDataObject_QueryInterface(
-            IDataObject*     iface, 
+            IDataObject*     iface,
            REFIID           riid,
             void**           ppvObject)
 {
   _ICOM_THIS_From_IDataObject(DefaultHandler, iface);
 
-  return IUnknown_QueryInterface(this->outerUnknown, riid, ppvObject);  
+  return IUnknown_QueryInterface(this->outerUnknown, riid, ppvObject);
 }
 
 /************************************************************************
@@ -1293,12 +1293,12 @@
  *
  * See Windows documentation for more details on IUnknown methods.
  */
-static ULONG WINAPI DefaultHandler_IDataObject_AddRef( 
+static ULONG WINAPI DefaultHandler_IDataObject_AddRef(
             IDataObject*     iface)
 {
   _ICOM_THIS_From_IDataObject(DefaultHandler, iface);
 
-  return IUnknown_AddRef(this->outerUnknown);  
+  return IUnknown_AddRef(this->outerUnknown);
 }
 
 /************************************************************************
@@ -1306,12 +1306,12 @@
  *
  * See Windows documentation for more details on IUnknown methods.
  */
-static ULONG WINAPI DefaultHandler_IDataObject_Release( 
+static ULONG WINAPI DefaultHandler_IDataObject_Release(
             IDataObject*     iface)
 {
   _ICOM_THIS_From_IDataObject(DefaultHandler, iface);
 
-  return IUnknown_Release(this->outerUnknown);  
+  return IUnknown_Release(this->outerUnknown);
 }
 
 /************************************************************************
@@ -1323,7 +1323,7 @@
  */
 static HRESULT WINAPI DefaultHandler_GetData(
 	    IDataObject*     iface,
-	    LPFORMATETC      pformatetcIn, 
+	    LPFORMATETC      pformatetcIn,
 	    STGMEDIUM*       pmedium)
 {
   IDataObject* cacheDataObject = NULL;
@@ -1333,7 +1333,7 @@
 
   TRACE("(%p, %p, %p)\n", iface, pformatetcIn, pmedium);
 
-  hres = IUnknown_QueryInterface(this->dataCache, 
+  hres = IUnknown_QueryInterface(this->dataCache,
 				 &IID_IDataObject,
 				 (void**)&cacheDataObject);
 
@@ -1343,14 +1343,14 @@
   hres = IDataObject_GetData(cacheDataObject,
 			     pformatetcIn,
 			     pmedium);
-  
+
   IDataObject_Release(cacheDataObject);
-  
+
   return hres;
 }
 
 static HRESULT WINAPI DefaultHandler_GetDataHere(
-	    IDataObject*     iface, 
+	    IDataObject*     iface,
 	    LPFORMATETC      pformatetc,
 	    STGMEDIUM*       pmedium)
 {
@@ -1361,7 +1361,7 @@
 /************************************************************************
  * DefaultHandler_QueryGetData (IDataObject)
  *
- * The default handler's implementation of this method delegates to 
+ * The default handler's implementation of this method delegates to
  * the cache.
  *
  * See Windows documentation for more details on IDataObject methods.
@@ -1377,7 +1377,7 @@
 
   TRACE("(%p, %p)\n", iface, pformatetc);
 
-  hres = IUnknown_QueryInterface(this->dataCache, 
+  hres = IUnknown_QueryInterface(this->dataCache,
 				 &IID_IDataObject,
 				 (void**)&cacheDataObject);
 
@@ -1388,7 +1388,7 @@
 				  pformatetc);
 
   IDataObject_Release(cacheDataObject);
-  
+
   return hres;
 }
 
@@ -1400,8 +1400,8 @@
  * See Windows documentation for more details on IDataObject methods.
  */
 static HRESULT WINAPI DefaultHandler_GetCanonicalFormatEtc(
-	    IDataObject*     iface, 
-	    LPFORMATETC      pformatectIn, 
+	    IDataObject*     iface,
+	    LPFORMATETC      pformatectIn,
 	    LPFORMATETC      pformatetcOut)
 {
   FIXME("(%p, %p, %p)\n", iface, pformatectIn, pformatetcOut);
@@ -1412,15 +1412,15 @@
 /************************************************************************
  * DefaultHandler_SetData (IDataObject)
  *
- * The default handler's implementation of this method delegates to 
+ * The default handler's implementation of this method delegates to
  * the cache.
  *
  * See Windows documentation for more details on IDataObject methods.
  */
 static HRESULT WINAPI DefaultHandler_SetData(
 	    IDataObject*     iface,
-	    LPFORMATETC      pformatetc, 
-	    STGMEDIUM*       pmedium, 
+	    LPFORMATETC      pformatetc,
+	    STGMEDIUM*       pmedium,
 	    BOOL             fRelease)
 {
   IDataObject* cacheDataObject = NULL;
@@ -1430,7 +1430,7 @@
 
   TRACE("(%p, %p, %p, %d)\n", iface, pformatetc, pmedium, fRelease);
 
-  hres = IUnknown_QueryInterface(this->dataCache, 
+  hres = IUnknown_QueryInterface(this->dataCache,
 				 &IID_IDataObject,
 				 (void**)&cacheDataObject);
 
@@ -1441,9 +1441,9 @@
 			     pformatetc,
 			     pmedium,
 			     fRelease);
-  
+
   IDataObject_Release(cacheDataObject);
-  
+
   return hres;
 }
 
@@ -1456,7 +1456,7 @@
  * See Windows documentation for more details on IDataObject methods.
  */
 static HRESULT WINAPI DefaultHandler_EnumFormatEtc(
-	    IDataObject*     iface,       
+	    IDataObject*     iface,
 	    DWORD            dwDirection,
 	    IEnumFORMATETC** ppenumFormatEtc)
 {
@@ -1479,16 +1479,16 @@
  * See Windows documentation for more details on IDataObject methods.
  */
 static HRESULT WINAPI DefaultHandler_DAdvise(
-	    IDataObject*     iface, 
-	    FORMATETC*       pformatetc, 
-	    DWORD            advf, 
-	    IAdviseSink*     pAdvSink, 
+	    IDataObject*     iface,
+	    FORMATETC*       pformatetc,
+	    DWORD            advf,
+	    IAdviseSink*     pAdvSink,
 	    DWORD*           pdwConnection)
 {
   HRESULT hres = S_OK;
-  _ICOM_THIS_From_IDataObject(DefaultHandler, iface);  
+  _ICOM_THIS_From_IDataObject(DefaultHandler, iface);
 
-  TRACE("(%p, %p, %ld, %p, %p)\n", 
+  TRACE("(%p, %p, %ld, %p, %p)\n",
 	iface, pformatetc, advf, pAdvSink, pdwConnection);
 
   /*
@@ -1501,11 +1501,11 @@
 
   if (SUCCEEDED(hres))
   {
-    hres = IDataAdviseHolder_Advise(this->dataAdviseHolder, 
+    hres = IDataAdviseHolder_Advise(this->dataAdviseHolder,
 				    iface,
-				    pformatetc, 
-				    advf, 
-				    pAdvSink, 
+				    pformatetc,
+				    advf,
+				    pAdvSink,
 				    pdwConnection);
   }
 
@@ -1524,7 +1524,7 @@
 	    IDataObject*     iface,
 	    DWORD            dwConnection)
 {
-  _ICOM_THIS_From_IDataObject(DefaultHandler, iface);  
+  _ICOM_THIS_From_IDataObject(DefaultHandler, iface);
 
   TRACE("(%p, %ld)\n", iface, dwConnection);
 
@@ -1537,7 +1537,7 @@
     return OLE_E_NOCONNECTION;
   }
 
-  return IDataAdviseHolder_Unadvise(this->dataAdviseHolder, 
+  return IDataAdviseHolder_Unadvise(this->dataAdviseHolder,
 				    dwConnection);
 }
 
@@ -1553,7 +1553,7 @@
 	    IDataObject*     iface,
 	    IEnumSTATDATA**  ppenumAdvise)
 {
-  _ICOM_THIS_From_IDataObject(DefaultHandler, iface);  
+  _ICOM_THIS_From_IDataObject(DefaultHandler, iface);
 
   TRACE("(%p, %p)\n", iface, ppenumAdvise);
 
@@ -1573,7 +1573,7 @@
    */
   if (this->dataAdviseHolder!=NULL)
   {
-    return IDataAdviseHolder_EnumAdvise(this->dataAdviseHolder, 
+    return IDataAdviseHolder_EnumAdvise(this->dataAdviseHolder,
 					ppenumAdvise);
   }
 
@@ -1581,7 +1581,7 @@
 }
 
 /*********************************************************
- * Methods implementation for the IRunnableObject part 
+ * Methods implementation for the IRunnableObject part
  * of the DefaultHandler class.
  */
 
@@ -1597,7 +1597,7 @@
 {
   _ICOM_THIS_From_IRunnableObject(DefaultHandler, iface);
 
-  return IUnknown_QueryInterface(this->outerUnknown, riid, ppvObject);  
+  return IUnknown_QueryInterface(this->outerUnknown, riid, ppvObject);
 }
 
 /************************************************************************
@@ -1605,7 +1605,7 @@
  *
  * See Windows documentation for more details on IUnknown methods.
  */
-static ULONG WINAPI DefaultHandler_IRunnableObject_AddRef( 
+static ULONG WINAPI DefaultHandler_IRunnableObject_AddRef(
             IRunnableObject*     iface)
 {
   _ICOM_THIS_From_IRunnableObject(DefaultHandler, iface);
@@ -1618,7 +1618,7 @@
  *
  * See Windows documentation for more details on IUnknown methods.
  */
-static ULONG WINAPI DefaultHandler_IRunnableObject_Release( 
+static ULONG WINAPI DefaultHandler_IRunnableObject_Release(
             IRunnableObject*     iface)
 {
   _ICOM_THIS_From_IRunnableObject(DefaultHandler, iface);
@@ -1629,21 +1629,21 @@
 /************************************************************************
  * DefaultHandler_GetRunningClass (IRunnableObject)
  *
- * According to Brockscmidt, Chapter 19, the default handler's 
+ * According to Brockscmidt, Chapter 19, the default handler's
  * implementation of IRunnableobject does nothing until the object
  * is actually running.
  *
  * See Windows documentation for more details on IRunnableObject methods.
  */
-static HRESULT WINAPI DefaultHandler_GetRunningClass( 
-            IRunnableObject*     iface,   
+static HRESULT WINAPI DefaultHandler_GetRunningClass(
+            IRunnableObject*     iface,
 	    LPCLSID              lpClsid)
 {
   TRACE("()\n");
   return S_OK;
 }
 
-static HRESULT WINAPI DefaultHandler_Run( 
+static HRESULT WINAPI DefaultHandler_Run(
             IRunnableObject*     iface,
 	    IBindCtx*            pbc)
 {
@@ -1654,13 +1654,13 @@
 /************************************************************************
  * DefaultHandler_IsRunning (IRunnableObject)
  *
- * According to Brockscmidt, Chapter 19, the default handler's 
+ * According to Brockscmidt, Chapter 19, the default handler's
  * implementation of IRunnableobject does nothing until the object
  * is actually running.
  *
  * See Windows documentation for more details on IRunnableObject methods.
  */
-static BOOL    WINAPI DefaultHandler_IsRunning( 
+static BOOL    WINAPI DefaultHandler_IsRunning(
             IRunnableObject*     iface)
 {
   TRACE("()\n");
@@ -1670,15 +1670,15 @@
 /************************************************************************
  * DefaultHandler_LockRunning (IRunnableObject)
  *
- * According to Brockscmidt, Chapter 19, the default handler's 
+ * According to Brockscmidt, Chapter 19, the default handler's
  * implementation of IRunnableobject does nothing until the object
  * is actually running.
  *
  * See Windows documentation for more details on IRunnableObject methods.
  */
-static HRESULT WINAPI DefaultHandler_LockRunning( 
-            IRunnableObject*     iface, 
-	    BOOL                 fLock, 
+static HRESULT WINAPI DefaultHandler_LockRunning(
+            IRunnableObject*     iface,
+	    BOOL                 fLock,
 	    BOOL                 fLastUnlockCloses)
 {
   TRACE("()\n");
@@ -1688,14 +1688,14 @@
 /************************************************************************
  * DefaultHandler_SetContainedObject (IRunnableObject)
  *
- * According to Brockscmidt, Chapter 19, the default handler's 
+ * According to Brockscmidt, Chapter 19, the default handler's
  * implementation of IRunnableobject does nothing until the object
  * is actually running.
  *
  * See Windows documentation for more details on IRunnableObject methods.
  */
-static HRESULT WINAPI DefaultHandler_SetContainedObject( 
-            IRunnableObject*     iface, 
+static HRESULT WINAPI DefaultHandler_SetContainedObject(
+            IRunnableObject*     iface,
 	    BOOL                 fContained)
 {
   TRACE("()\n");
diff --git a/dlls/ole32/errorinfo.c b/dlls/ole32/errorinfo.c
index 2687626..2e4598b 100644
--- a/dlls/ole32/errorinfo.c
+++ b/dlls/ole32/errorinfo.c
@@ -19,7 +19,7 @@
  *
  * NOTES:
  *
- * The errorinfo is a per-thread object. The reference is stored in the 
+ * The errorinfo is a per-thread object. The reference is stored in the
  * TEB at offset 0xf80
  */
 
@@ -47,7 +47,7 @@
     DWORD* newBuffer;
     WCHAR* stringBuffer;
     DWORD len;
-    
+
     if (in == NULL)
 	return NULL;
     /*
@@ -106,7 +106,7 @@
 static VOID WINAPI ERRORINFO_SysFreeString(BSTR in)
 {
     DWORD* bufferPointer;
-    
+
     /* NULL is a valid parameter */
     if(!in) return;
 
@@ -132,7 +132,7 @@
 	ICOM_VTABLE(ICreateErrorInfo)	*lpvtcei;
 	ICOM_VTABLE(ISupportErrorInfo)	*lpvtsei;
 	DWORD				ref;
-	
+
 	GUID m_Guid;
 	BSTR bstrSource;
 	BSTR bstrDescription;
@@ -147,14 +147,14 @@
 /*
  converts a objectpointer to This
  */
-#define _IErrorInfo_Offset ((int)(&(((ErrorInfoImpl*)0)->lpvtei))) 
-#define _ICOM_THIS_From_IErrorInfo(class, name) class* This = (class*)(((char*)name)-_IErrorInfo_Offset); 
+#define _IErrorInfo_Offset ((int)(&(((ErrorInfoImpl*)0)->lpvtei)))
+#define _ICOM_THIS_From_IErrorInfo(class, name) class* This = (class*)(((char*)name)-_IErrorInfo_Offset);
 
-#define _ICreateErrorInfo_Offset ((int)(&(((ErrorInfoImpl*)0)->lpvtcei))) 
-#define _ICOM_THIS_From_ICreateErrorInfo(class, name) class* This = (class*)(((char*)name)-_ICreateErrorInfo_Offset); 
+#define _ICreateErrorInfo_Offset ((int)(&(((ErrorInfoImpl*)0)->lpvtcei)))
+#define _ICOM_THIS_From_ICreateErrorInfo(class, name) class* This = (class*)(((char*)name)-_ICreateErrorInfo_Offset);
 
-#define _ISupportErrorInfo_Offset ((int)(&(((ErrorInfoImpl*)0)->lpvtsei))) 
-#define _ICOM_THIS_From_ISupportErrorInfo(class, name) class* This = (class*)(((char*)name)-_ISupportErrorInfo_Offset); 
+#define _ISupportErrorInfo_Offset ((int)(&(((ErrorInfoImpl*)0)->lpvtsei)))
+#define _ICOM_THIS_From_ISupportErrorInfo(class, name) class* This = (class*)(((char*)name)-_ISupportErrorInfo_Offset);
 
 /*
  converts This to a objectpointer
@@ -193,7 +193,7 @@
 
 	if(IsEqualIID(riid, &IID_IErrorInfo))
 	{
-	  *ppvoid = _IErrorInfo_(This); 
+	  *ppvoid = _IErrorInfo_(This);
 	}
 	else if(IsEqualIID(riid, &IID_ICreateErrorInfo))
 	{
@@ -239,7 +239,7 @@
 
 static HRESULT WINAPI IErrorInfoImpl_GetGUID(
 	IErrorInfo* iface,
-	GUID * pGUID) 
+	GUID * pGUID)
 {
 	_ICOM_THIS_From_IErrorInfo(ErrorInfoImpl, iface);
 	TRACE("(%p)->(count=%lu)\n",This,This->ref);
@@ -270,7 +270,7 @@
 	if (pBstrDescription == NULL)
 	    return E_INVALIDARG;
 	*pBstrDescription = ERRORINFO_SysAllocString(This->bstrDescription);
-	
+
 	return S_OK;
 }
 
@@ -284,7 +284,7 @@
 	if (pBstrHelpFile == NULL)
 	    return E_INVALIDARG;
 	*pBstrHelpFile = ERRORINFO_SysAllocString(This->bstrHelpFile);
-	
+
 	return S_OK;
 }
 
@@ -297,7 +297,7 @@
 	if (pdwHelpContext == NULL)
 	    return E_INVALIDARG;
 	*pdwHelpContext = This->m_dwHelpContext;
-	
+
 	return S_OK;
 }
 
@@ -307,7 +307,7 @@
   IErrorInfoImpl_QueryInterface,
   IErrorInfoImpl_AddRef,
   IErrorInfoImpl_Release,
- 
+
   IErrorInfoImpl_GetGUID,
   IErrorInfoImpl_GetSource,
   IErrorInfoImpl_GetDescription,
@@ -362,7 +362,7 @@
 	if (This->bstrSource != NULL)
 	    ERRORINFO_SysFreeString(This->bstrSource);
 	This->bstrSource = ERRORINFO_SysAllocString(szSource);
-	
+
 	return S_OK;
 }
 
@@ -375,7 +375,7 @@
 	if (This->bstrDescription != NULL)
 	    ERRORINFO_SysFreeString(This->bstrDescription);
 	This->bstrDescription = ERRORINFO_SysAllocString(szDescription);
-	
+
 	return S_OK;
 }
 
@@ -399,7 +399,7 @@
 	_ICOM_THIS_From_ICreateErrorInfo(ErrorInfoImpl, iface);
 	TRACE("(%p)\n",This);
 	This->m_dwHelpContext = dwHelpContext;
-	
+
 	return S_OK;
 }
 
@@ -424,7 +424,7 @@
 {
 	_ICOM_THIS_From_ISupportErrorInfo(ErrorInfoImpl, iface);
 	TRACE("(%p)\n", This);
-	
+
 	return IErrorInfo_QueryInterface(_IErrorInfo_(This), riid, ppvoid);
 }
 
@@ -474,7 +474,7 @@
 	TRACE("(%p): stub:\n", pperrinfo);
 	if(! pperrinfo ) return E_INVALIDARG;
 	if(!(pei=IErrorInfoImpl_Constructor()))return E_OUTOFMEMORY;
-	
+
 	res = IErrorInfo_QueryInterface(pei, &IID_ICreateErrorInfo, (LPVOID*)pperrinfo);
 	IErrorInfo_Release(pei);
 	return res;
diff --git a/dlls/ole32/filemoniker.c b/dlls/ole32/filemoniker.c
index a7d0235..1052366 100644
--- a/dlls/ole32/filemoniker.c
+++ b/dlls/ole32/filemoniker.c
@@ -39,7 +39,7 @@
 
     ICOM_VTABLE(IMoniker)*  lpvtbl1;  /* VTable relative to the IMoniker interface.*/
 
-    /* The ROT (RunningObjectTable implementation) uses the IROTData interface to test whether 
+    /* The ROT (RunningObjectTable implementation) uses the IROTData interface to test whether
      * two monikers are equal. That's whay IROTData interface is implemented by monikers.
      */
     ICOM_VTABLE(IROTData)*  lpvtbl2;  /* VTable relative to the IROTData interface.*/
@@ -149,13 +149,13 @@
 HRESULT WINAPI FileMonikerImpl_QueryInterface(IMoniker* iface,REFIID riid,void** ppvObject)
 {
     ICOM_THIS(FileMonikerImpl,iface);
-  
+
   TRACE("(%p,%p,%p)\n",This,riid,ppvObject);
 
     /* Perform a sanity check on the parameters.*/
     if ( (This==0) || (ppvObject==0) )
 	return E_INVALIDARG;
-  
+
     /* Initialize the return parameter */
   *ppvObject = 0;
 
@@ -166,14 +166,14 @@
         IsEqualIID(&IID_IMoniker, riid)
        )
         *ppvObject = iface;
-    
+
     else if (IsEqualIID(&IID_IROTData, riid))
         *ppvObject = (IROTData*)&(This->lpvtbl2);
 
     /* Check that we obtained an interface.*/
     if ((*ppvObject)==0)
         return E_NOINTERFACE;
-  
+
     /* Query Interface always increases the reference count by one when it is successful */
   FileMonikerImpl_AddRef(iface);
 
@@ -210,7 +210,7 @@
 
         return 0;
     }
-    return This->ref;;
+    return This->ref;
 }
 
 /******************************************************************************
@@ -225,7 +225,7 @@
         return E_POINTER;
 
     *pClassID = CLSID_FileMoniker;
-        
+
     return S_OK;
 }
 
@@ -265,7 +265,7 @@
     res=IStream_Read(pStm,&wbuffer,sizeof(WORD),&bread);
     if (bread!=sizeof(WORD) || wbuffer!=0)
         return E_FAIL;
-    
+
     /* read filePath string length (plus one) */
     res=IStream_Read(pStm,&length,sizeof(DWORD),&bread);
     if (bread != sizeof(DWORD))
@@ -281,18 +281,18 @@
     IStream_Read(pStm,&dwbuffer,sizeof(DWORD),&bread);
     if (bread != sizeof(DWORD) || dwbuffer != 0xDEADFFFF)
         return E_FAIL;
-	
+
     length--;
-	
+
     for(i=0;i<10;i++){
         res=IStream_Read(pStm,&wbuffer,sizeof(WORD),&bread);
         if (bread!=sizeof(WORD) || wbuffer!=0)
             return E_FAIL;
     }
-    
+
     if (length>8)
         length=0;
-	
+
     doubleLenHex=doubleLenDec=2*length;
     if (length > 5)
         doubleLenDec+=6;
@@ -303,7 +303,7 @@
 
     if (length==0)
         return res;
-	
+
     res=IStream_Read(pStm,&dwbuffer,sizeof(DWORD),&bread);
     if (bread!=sizeof(DWORD) || dwbuffer!=doubleLenHex)
         return E_FAIL;
@@ -324,7 +324,7 @@
     This->filePathName=filePathW;
 
     HeapFree(GetProcessHeap(),0,filePathA);
-    
+
     return res;
 }
 
@@ -335,11 +335,11 @@
                                     IStream* pStm,/* pointer to the stream where the object is to be saved */
                                     BOOL fClearDirty)/* Specifies whether to clear the dirty flag */
 {
-    /* this function saves data of this object. In the beginning I thougth 
-     * that I have just to write the filePath string on Stream. But, when I 
-     * tested this function whith windows programs samples, I noticed that it 
-     * was not the case. So I analysed data written by this function on 
-     * Windows and what this did function exactly ! But I have no idea about 
+    /* this function saves data of this object. In the beginning I thougth
+     * that I have just to write the filePath string on Stream. But, when I
+     * tested this function whith windows programs samples, I noticed that it
+     * was not the case. So I analysed data written by this function on
+     * Windows and what this did function exactly ! But I have no idea about
      * its logic !
      * I guessed data which must be written on stream is:
      * 1) WORD constant:zero
@@ -347,14 +347,14 @@
      * 3) path string type A
      * 4) DWORD constant : 0xDEADFFFF
      * 5) ten WORD constant: zero
-     * 6) DWORD: double-length of the the path string type W ("\0" not 
+     * 6) DWORD: double-length of the the path string type W ("\0" not
      *    included)
      * 7) WORD constant: 0x3
      * 8) filePath unicode string.
      *    if the length(filePath) > 8 or length(filePath) == 8 stop at step 5)
      */
 
-    ICOM_THIS(FileMonikerImpl,iface);        
+    ICOM_THIS(FileMonikerImpl,iface);
 
     HRESULT res;
     LPOLESTR filePathW=This->filePathName;
@@ -389,15 +389,15 @@
 
     /* write a DWORD set to 0xDEADFFFF: constant */
     res=IStream_Write(pStm,&constant1,sizeof(DWORD),NULL);
-	
+
     len--;
     /* write 10 times a DWORD set to 0 : constants */
     for(i=0;i<10;i++)
         res=IStream_Write(pStm,&zero,sizeof(WORD),NULL);
-	
+
     if (len>8)
         len=0;
-	
+
     doubleLenHex=doubleLenDec=2*len;
     if (len > 5)
         doubleLenDec+=6;
@@ -436,7 +436,7 @@
         return E_POINTER;
 
     /* for more details see FileMonikerImpl_Save coments */
-    
+
     sizeMAx =  sizeof(WORD) +           /* first WORD is 0 */
                sizeof(DWORD)+           /* length of filePath including "\0" in the end of the string */
                (len+1)+                 /* filePath string */
@@ -446,11 +446,11 @@
 
     if (len==0 || len > 8)
         return S_OK;
-    
+
     sizeMAx += sizeof(DWORD)+           /* size of the unicode filePath: "\0" not included */
                sizeof(WORD)+            /* constant : 0x3 */
                len*sizeof(WCHAR);       /* unicde filePath string */
-    
+
     pcbSize->s.LowPart=sizeMAx;
     pcbSize->s.HighPart=0;
 
@@ -468,7 +468,7 @@
     WCHAR twoPoint[]={'.','.',0};
     WCHAR bkSlash[]={'\\',0};
     BYTE addBkSlash;
-    
+
     TRACE("(%p,%p)\n",This,lpszPathName);
 
     /* Initialize the virtual fgunction table. */
@@ -513,10 +513,10 @@
         This->filePathName=HeapReAlloc(GetProcessHeap(),0,This->filePathName,(sizeStr+1)*sizeof(WCHAR));
 
         *This->filePathName=0;
-    
+
         for(i=0;tabStr[i]!=NULL;i++)
             strcatW(This->filePathName,tabStr[i]);
-    
+
         if (addBkSlash)
             strcatW(This->filePathName,bkSlash);
     }
@@ -559,15 +559,15 @@
     IPersistFile  *ppf=0;
     IClassFactory *pcf=0;
     IClassActivator *pca=0;
-    
-    ICOM_THIS(FileMonikerImpl,iface);    
+
+    ICOM_THIS(FileMonikerImpl,iface);
 
     *ppvResult=0;
 
     TRACE("(%p,%p,%p,%p,%p)\n",iface,pbc,pmkToLeft,riid,ppvResult);
 
     if(pmkToLeft==NULL){
-        
+
         res=IBindCtx_GetRunningObjectTable(pbc,&prot);
 
         if (SUCCEEDED(res)){
@@ -599,7 +599,7 @@
         if (res==E_NOINTERFACE){
 
             res=IMoniker_BindToObject(pmkToLeft,pbc,NULL,&IID_IClassActivator,(void**)&pca);
-        
+
             if (res==E_NOINTERFACE)
                 return MK_E_INTERMEDIATEINTERFACENOTSUPPORTED;
         }
@@ -618,7 +618,7 @@
         if (pca!=NULL){
 
             FIXME("()\n");
-            
+
             /*res=GetClassFile(This->filePathName,&clsID);
 
             if (SUCCEEDED(res)){
@@ -654,7 +654,7 @@
 
     if (pcf!=NULL)
         IClassFactory_Release(pcf);
-    
+
     return res;
 }
 
@@ -760,7 +760,7 @@
 	return E_INVALIDARG;
 
     *ppmkComposite=0;
-    
+
     IMoniker_IsSystemMoniker(pmkRight,&mkSys);
 
     /* check if we have two filemonikers to compose or not */
@@ -789,7 +789,7 @@
 
         /* the length of the composed path string  is raised by the sum of the two paths lengths  */
         newStr=HeapAlloc(GetProcessHeap(),0,sizeof(WCHAR)*(lstrlenW(str1)+lstrlenW(str2)+1));
-	
+
 	  if (newStr==NULL)
 		return E_OUTOFMEMORY;
 
@@ -799,10 +799,10 @@
 
         if ((strDec2[i]==NULL && lastIdx1>-1 && lastIdx2>-1) || lstrcmpW(strDec2[i],bkSlash)!=0)
             strcatW(newStr,bkSlash);
-            
+
         for(j=i;j<=lastIdx2;j++)
             strcatW(newStr,strDec2[j]);
-        
+
         /* create a new moniker with the new string */
         res=CreateFileMoniker(newStr,ppmkComposite);
 
@@ -878,12 +878,12 @@
         return res;
 
     IMoniker_GetDisplayName(pmkOtherMoniker,bind,NULL,&filePath);
-    
+
     if (lstrcmpiW(filePath,
                   This->filePathName)!=0)
 
         return S_FALSE;
-    
+
     return S_OK;
 }
 
@@ -900,7 +900,7 @@
 
     if (pdwHash==NULL)
         return E_POINTER;
-    
+
     val =  This->filePathName;
     len = lstrlenW(val);
 
@@ -984,7 +984,7 @@
 
         if (!GetFileAttributesExW(This->filePathName,GetFileExInfoStandard,&info))
             return MK_E_NOOBJECT;
-        
+
         *pFileTime=info.ftLastWriteTime;
     }
 
@@ -1019,9 +1019,9 @@
 
     if (pmkOther==NULL)
         return E_INVALIDARG;
-    
+
     *ppmkPrefix=0;
-    
+
     /* check if we have the same type of moniker */
     IMoniker_IsSystemMoniker(pmkOther,&mkSys);
 
@@ -1043,7 +1043,7 @@
         commonPath=HeapAlloc(GetProcessHeap(),0,sizeof(WCHAR)*(min(lstrlenW(pathThis),lstrlenW(pathOther))+1));
 
         *commonPath=0;
-        
+
         for(sameIdx=0; ( (stringTable1[sameIdx]!=NULL) &&
                          (stringTable2[sameIdx]!=NULL) &&
                          (lstrcmpiW(stringTable1[sameIdx],stringTable2[sameIdx])==0)); sameIdx++);
@@ -1062,13 +1062,13 @@
 
         if (machimeNameCase && *stringTable1[sameIdx-1]=='\\')
             sameIdx--;
-        
+
         if (machimeNameCase && (sameIdx<=3) && (nb1 > 3 || nb2 > 3) )
             return MK_E_NOPREFIX;
 
         for(i=0;i<sameIdx;i++)
             strcatW(commonPath,stringTable1[i]);
-        
+
         for(i=0;i<nb1;i++)
             CoTaskMemFree(stringTable1[i]);
 
@@ -1080,7 +1080,7 @@
         CoTaskMemFree(stringTable2);
 
         HeapFree(GetProcessHeap(),0,commonPath);
-        
+
         return CreateFileMoniker(commonPath,ppmkPrefix);
     }
     else
@@ -1100,10 +1100,10 @@
     int len=lstrlenW(str);
 
     strgtable =CoTaskMemAlloc(len*sizeof(LPOLESTR));
-    
+
     if (strgtable==NULL)
 	return E_OUTOFMEMORY;
-    
+
     while(str[i]!=0){
 
         if(str[i]==bSlash[0]){
@@ -1134,9 +1134,9 @@
         }
     }
     strgtable[tabIndex]=NULL;
-    
+
     *stringTable=strgtable;
-    
+
     return tabIndex;
 }
 
@@ -1150,7 +1150,7 @@
     LPOLESTR str1=0,str2=0,*tabStr1=0,*tabStr2=0,relPath=0;
     DWORD len1=0,len2=0,sameIdx=0,j=0;
     WCHAR back[] ={'.','.','\\',0};
-    
+
     TRACE("(%p,%p,%p)\n",iface,pmOther,ppmkRelPath);
 
     if (ppmkRelPath==NULL)
@@ -1158,7 +1158,7 @@
 
     if (pmOther==NULL)
         return E_INVALIDARG;
-    
+
     res=CreateBindCtx(0,&bind);
     if (FAILED(res))
 	return res;
@@ -1175,7 +1175,7 @@
 
     if (FAILED(len1) || FAILED(len2))
 	return E_OUTOFMEMORY;
-	
+
     /* count the number of similar items from the begin of the two paths */
     for(sameIdx=0; ( (tabStr1[sameIdx]!=NULL) &&
 		   (tabStr2[sameIdx]!=NULL) &&
@@ -1196,9 +1196,9 @@
     /* add items of the second path (similar items with the first path are not included) to the relativePath */
     for(j=sameIdx;tabStr2[j]!=NULL;j++)
         strcatW(relPath,tabStr2[j]);
-    
+
     res=CreateFileMoniker(relPath,ppmkRelPath);
-    
+
     for(j=0; tabStr1[j]!=NULL;j++)
         CoTaskMemFree(tabStr1[j]);
     for(j=0; tabStr2[j]!=NULL;j++)
@@ -1240,7 +1240,7 @@
         return E_OUTOFMEMORY;
 
     strcpyW(*ppszDisplayName,This->filePathName);
-    
+
     return S_OK;
 }
 
@@ -1267,7 +1267,7 @@
 
     if (!pwdMksys)
         return E_POINTER;
-    
+
     (*pwdMksys)=MKSYS_FILEMONIKER;
 
     return S_OK;
@@ -1304,7 +1304,7 @@
 ULONG   WINAPI FileMonikerROTDataImpl_Release(IROTData* iface)
 {
     ICOM_THIS_From_IROTData(IMoniker, iface);
-    
+
     TRACE("(%p)\n",This);
 
     return FileMonikerImpl_Release(This);
@@ -1348,9 +1348,9 @@
 
     if(lpszPathName==NULL)
         return MK_E_SYNTAX;
-            
+
     *ppmk=0;
-        
+
     newFileMoniker = HeapAlloc(GetProcessHeap(), 0, sizeof(FileMonikerImpl));
 
     if (newFileMoniker == 0)
diff --git a/dlls/ole32/hglobalstream.c b/dlls/ole32/hglobalstream.c
index 6fa7750..8e76f3f 100644
--- a/dlls/ole32/hglobalstream.c
+++ b/dlls/ole32/hglobalstream.c
@@ -48,7 +48,7 @@
 {
   ICOM_VFIELD(IStream);  /* Needs to be the first item in the stuct
 			  * since we want to cast this in a IStream pointer */
-  
+
   /*
    * Reference count
    */
@@ -93,71 +93,71 @@
 
 HRESULT WINAPI HGLOBALStreamImpl_QueryInterface(
 		IStream*      iface,
-		REFIID         riid,		/* [in] */          
-		void**         ppvObject);  /* [iid_is][out] */ 
-        
+		REFIID         riid,		/* [in] */
+		void**         ppvObject);  /* [iid_is][out] */
+
 ULONG WINAPI HGLOBALStreamImpl_AddRef(
 		IStream*      iface);
-        
+
 ULONG WINAPI HGLOBALStreamImpl_Release(
 		IStream*      iface);
-        
-HRESULT WINAPI HGLOBALStreamImpl_Read( 
+
+HRESULT WINAPI HGLOBALStreamImpl_Read(
 	        IStream*      iface,
 		void*          pv,        /* [length_is][size_is][out] */
-		ULONG          cb,        /* [in] */                     
-		ULONG*         pcbRead);  /* [out] */                    
-        
+		ULONG          cb,        /* [in] */
+		ULONG*         pcbRead);  /* [out] */
+
 HRESULT WINAPI HGLOBALStreamImpl_Write(
 		IStream*      iface,
-		const void*    pv,          /* [size_is][in] */ 
-		ULONG          cb,          /* [in] */          
-		ULONG*         pcbWritten); /* [out] */         
-        
-HRESULT WINAPI HGLOBALStreamImpl_Seek( 
-		IStream*      iface,
-		LARGE_INTEGER   dlibMove,         /* [in] */ 
-		DWORD           dwOrigin,         /* [in] */ 
-		ULARGE_INTEGER* plibNewPosition); /* [out] */
-        
-HRESULT WINAPI HGLOBALStreamImpl_SetSize( 
-	        IStream*      iface,
-		ULARGE_INTEGER  libNewSize);  /* [in] */ 
-        
-HRESULT WINAPI HGLOBALStreamImpl_CopyTo( 
-		IStream*      iface,
-		IStream*      pstm,         /* [unique][in] */ 
-		ULARGE_INTEGER  cb,           /* [in] */         
-		ULARGE_INTEGER* pcbRead,      /* [out] */        
-		ULARGE_INTEGER* pcbWritten);  /* [out] */        
+		const void*    pv,          /* [size_is][in] */
+		ULONG          cb,          /* [in] */
+		ULONG*         pcbWritten); /* [out] */
 
-HRESULT WINAPI HGLOBALStreamImpl_Commit( 
+HRESULT WINAPI HGLOBALStreamImpl_Seek(
+		IStream*      iface,
+		LARGE_INTEGER   dlibMove,         /* [in] */
+		DWORD           dwOrigin,         /* [in] */
+		ULARGE_INTEGER* plibNewPosition); /* [out] */
+
+HRESULT WINAPI HGLOBALStreamImpl_SetSize(
+	        IStream*      iface,
+		ULARGE_INTEGER  libNewSize);  /* [in] */
+
+HRESULT WINAPI HGLOBALStreamImpl_CopyTo(
+		IStream*      iface,
+		IStream*      pstm,         /* [unique][in] */
+		ULARGE_INTEGER  cb,           /* [in] */
+		ULARGE_INTEGER* pcbRead,      /* [out] */
+		ULARGE_INTEGER* pcbWritten);  /* [out] */
+
+HRESULT WINAPI HGLOBALStreamImpl_Commit(
 	    	IStream*      iface,
-		DWORD           grfCommitFlags); /* [in] */ 
-        
-HRESULT WINAPI HGLOBALStreamImpl_Revert( 
+		DWORD           grfCommitFlags); /* [in] */
+
+HRESULT WINAPI HGLOBALStreamImpl_Revert(
 		IStream*  iface);
-        
-HRESULT WINAPI HGLOBALStreamImpl_LockRegion( 
+
+HRESULT WINAPI HGLOBALStreamImpl_LockRegion(
 		IStream*     iface,
-		ULARGE_INTEGER libOffset,   /* [in] */ 
-		ULARGE_INTEGER cb,          /* [in] */ 
-		DWORD          dwLockType); /* [in] */ 
-        
-HRESULT WINAPI HGLOBALStreamImpl_UnlockRegion( 
+		ULARGE_INTEGER libOffset,   /* [in] */
+		ULARGE_INTEGER cb,          /* [in] */
+		DWORD          dwLockType); /* [in] */
+
+HRESULT WINAPI HGLOBALStreamImpl_UnlockRegion(
 		IStream*     iface,
-		ULARGE_INTEGER libOffset,   /* [in] */ 
-	        ULARGE_INTEGER cb,          /* [in] */ 
-		DWORD          dwLockType); /* [in] */ 
-        
-HRESULT WINAPI HGLOBALStreamImpl_Stat( 
+		ULARGE_INTEGER libOffset,   /* [in] */
+	        ULARGE_INTEGER cb,          /* [in] */
+		DWORD          dwLockType); /* [in] */
+
+HRESULT WINAPI HGLOBALStreamImpl_Stat(
 		IStream*     iface,
 	        STATSTG*       pstatstg,     /* [out] */
-	        DWORD          grfStatFlag); /* [in] */ 
-        
-HRESULT WINAPI HGLOBALStreamImpl_Clone( 
+	        DWORD          grfStatFlag); /* [in] */
+
+HRESULT WINAPI HGLOBALStreamImpl_Clone(
 		IStream*     iface,
-		IStream**    ppstm);       /* [out] */ 
+		IStream**    ppstm);       /* [out] */
 
 
 /*
@@ -186,8 +186,8 @@
  *           CreateStreamOnHGlobal     [OLE32.61]
  */
 HRESULT WINAPI CreateStreamOnHGlobal(
-		HGLOBAL   hGlobal, 
-		BOOL      fDeleteOnRelease, 
+		HGLOBAL   hGlobal,
+		BOOL      fDeleteOnRelease,
 		LPSTREAM* ppstm)
 {
   HGLOBALStreamImpl* newStream;
@@ -197,7 +197,7 @@
 
   if (newStream!=NULL)
   {
-    return IUnknown_QueryInterface((IUnknown*)newStream, 
+    return IUnknown_QueryInterface((IUnknown*)newStream,
 				   &IID_IStream,
 				   (void**)ppstm);
   }
@@ -240,7 +240,7 @@
  *
  * Params:
  *    hGlobal          - Handle that will support the stream. can be NULL.
- *    fDeleteOnRelease - Flag set to TRUE if the HGLOBAL will be released 
+ *    fDeleteOnRelease - Flag set to TRUE if the HGLOBAL will be released
  *                       when the IStream object is destroyed.
  */
 HGLOBALStreamImpl* HGLOBALStreamImpl_Construct(
@@ -250,7 +250,7 @@
   HGLOBALStreamImpl* newStream;
 
   newStream = HeapAlloc(GetProcessHeap(), 0, sizeof(HGLOBALStreamImpl));
-  
+
   if (newStream!=0)
   {
     /*
@@ -258,7 +258,7 @@
      */
     ICOM_VTBL(newStream) = &HGLOBALStreamImpl_Vtbl;
     newStream->ref    = 0;
-    
+
     /*
      * Initialize the support.
      */
@@ -273,27 +273,27 @@
       newStream->supportHandle = GlobalAlloc(GMEM_MOVEABLE | GMEM_NODISCARD |
 					     GMEM_SHARE, 0);
     }
-    
+
     /*
      * Start the stream at the beginning.
      */
     newStream->currentPosition.s.HighPart = 0;
     newStream->currentPosition.s.LowPart = 0;
-    
+
     /*
      * Initialize the size of the stream to the size of the handle.
      */
     newStream->streamSize.s.HighPart = 0;
     newStream->streamSize.s.LowPart  = GlobalSize(newStream->supportHandle);
   }
-  
+
   return newStream;
 }
 
 /***
  * This is the destructor of the HGLOBALStreamImpl class.
  *
- * This method will clean-up all the resources used-up by the given HGLOBALStreamImpl 
+ * This method will clean-up all the resources used-up by the given HGLOBALStreamImpl
  * class. The pointer passed-in to this function will be freed and will not
  * be valid anymore.
  */
@@ -313,7 +313,7 @@
   /*
    * Finally, free the memory used-up by the class.
    */
-  HeapFree(GetProcessHeap(), 0, This);  
+  HeapFree(GetProcessHeap(), 0, This);
 }
 
 /***
@@ -322,8 +322,8 @@
  */
 HRESULT WINAPI HGLOBALStreamImpl_QueryInterface(
 		  IStream*     iface,
-		  REFIID         riid,	      /* [in] */          
-		  void**         ppvObject)   /* [iid_is][out] */ 
+		  REFIID         riid,	      /* [in] */
+		  void**         ppvObject)   /* [iid_is][out] */
 {
   HGLOBALStreamImpl* const This=(HGLOBALStreamImpl*)iface;
 
@@ -332,37 +332,37 @@
    */
   if (ppvObject==0)
     return E_INVALIDARG;
-  
+
   /*
    * Initialize the return parameter.
    */
   *ppvObject = 0;
-  
+
   /*
    * Compare the riid with the interface IDs implemented by this object.
    */
-  if (memcmp(&IID_IUnknown, riid, sizeof(IID_IUnknown)) == 0) 
+  if (memcmp(&IID_IUnknown, riid, sizeof(IID_IUnknown)) == 0)
   {
     *ppvObject = (IStream*)This;
   }
-  else if (memcmp(&IID_IStream, riid, sizeof(IID_IStream)) == 0) 
+  else if (memcmp(&IID_IStream, riid, sizeof(IID_IStream)) == 0)
   {
     *ppvObject = (IStream*)This;
   }
-  
+
   /*
    * Check that we obtained an interface.
    */
   if ((*ppvObject)==0)
     return E_NOINTERFACE;
-  
+
   /*
    * Query Interface always increases the reference count by one when it is
    * successful
    */
   HGLOBALStreamImpl_AddRef(iface);
-  
-  return S_OK;;
+
+  return S_OK;
 }
 
 /***
@@ -375,7 +375,7 @@
   HGLOBALStreamImpl* const This=(HGLOBALStreamImpl*)iface;
 
   This->ref++;
-  
+
   return This->ref;
 }
 
@@ -389,11 +389,11 @@
   HGLOBALStreamImpl* const This=(HGLOBALStreamImpl*)iface;
 
   ULONG newRef;
-  
+
   This->ref--;
-  
+
   newRef = This->ref;
-  
+
   /*
    * If the reference count goes down to 0, perform suicide.
    */
@@ -401,7 +401,7 @@
   {
     HGLOBALStreamImpl_Destroy(This);
   }
-  
+
   return newRef;
 }
 
@@ -414,11 +414,11 @@
  *
  * See the documentation of ISequentialStream for more info.
  */
-HRESULT WINAPI HGLOBALStreamImpl_Read( 
+HRESULT WINAPI HGLOBALStreamImpl_Read(
 		  IStream*     iface,
 		  void*          pv,        /* [length_is][size_is][out] */
-		  ULONG          cb,        /* [in] */                     
-		  ULONG*         pcbRead)   /* [out] */                    
+		  ULONG          cb,        /* [in] */
+		  ULONG*         pcbRead)   /* [out] */
 {
   HGLOBALStreamImpl* const This=(HGLOBALStreamImpl*)iface;
 
@@ -428,14 +428,14 @@
 
   TRACE("(%p, %p, %ld, %p)\n", iface,
 	pv, cb, pcbRead);
-  
-  /* 
+
+  /*
    * If the caller is not interested in the nubmer of bytes read,
    * we use another buffer to avoid "if" statements in the code.
    */
   if (pcbRead==0)
     pcbRead = &bytesReadBuffer;
-  
+
   /*
    * Using the known size of the stream, calculate the number of bytes
    * to read from the block chain
@@ -463,7 +463,7 @@
    * Cleanup
    */
   GlobalUnlock(This->supportHandle);
-  
+
   /*
    * The function returns S_OK if the buffer was filled completely
    * it returns S_FALSE if the end of the stream is reached before the
@@ -471,10 +471,10 @@
    */
   if(*pcbRead == cb)
     return S_OK;
-  
+
   return S_FALSE;
 }
-        
+
 /***
  * This method is part of the ISequentialStream interface.
  *
@@ -487,9 +487,9 @@
  */
 HRESULT WINAPI HGLOBALStreamImpl_Write(
 	          IStream*     iface,
-		  const void*    pv,          /* [size_is][in] */ 
-		  ULONG          cb,          /* [in] */          
-		  ULONG*         pcbWritten)  /* [out] */         
+		  const void*    pv,          /* [size_is][in] */
+		  ULONG          cb,          /* [in] */
+		  ULONG*         pcbWritten)  /* [out] */
 {
   HGLOBALStreamImpl* const This=(HGLOBALStreamImpl*)iface;
 
@@ -499,14 +499,14 @@
 
   TRACE("(%p, %p, %ld, %p)\n", iface,
 	pv, cb, pcbWritten);
-  
+
   /*
    * If the caller is not interested in the number of bytes written,
    * we use another buffer to avoid "if" statements in the code.
    */
   if (pcbWritten == 0)
     pcbWritten = &bytesWritten;
-  
+
   if (cb == 0)
   {
     return S_OK;
@@ -516,7 +516,7 @@
     newSize.s.HighPart = 0;
     newSize.s.LowPart = This->currentPosition.s.LowPart + cb;
   }
-  
+
   /*
    * Verify if we need to grow the stream
    */
@@ -525,13 +525,13 @@
     /* grow stream */
    IStream_SetSize(iface, newSize);
   }
-  
+
   /*
    * Lock the buffer in position and copy the data.
    */
   supportBuffer = GlobalLock(This->supportHandle);
 
-  memcpy((char *) supportBuffer+This->currentPosition.s.LowPart, pv, cb);  
+  memcpy((char *) supportBuffer+This->currentPosition.s.LowPart, pv, cb);
 
   /*
    * Move the current position to the new position
@@ -547,7 +547,7 @@
    * Cleanup
    */
   GlobalUnlock(This->supportHandle);
-  
+
   return S_OK;
 }
 
@@ -558,11 +558,11 @@
  * given.
  *
  * See the documentation of IStream for more info.
- */        
-HRESULT WINAPI HGLOBALStreamImpl_Seek( 
+ */
+HRESULT WINAPI HGLOBALStreamImpl_Seek(
 		  IStream*      iface,
-		  LARGE_INTEGER   dlibMove,         /* [in] */ 
-		  DWORD           dwOrigin,         /* [in] */ 
+		  LARGE_INTEGER   dlibMove,         /* [in] */
+		  DWORD           dwOrigin,         /* [in] */
 		  ULARGE_INTEGER* plibNewPosition) /* [out] */
 {
   HGLOBALStreamImpl* const This=(HGLOBALStreamImpl*)iface;
@@ -572,7 +572,7 @@
   TRACE("(%p, %ld, %ld, %p)\n", iface,
 	dlibMove.s.LowPart, dwOrigin, plibNewPosition);
 
-  /* 
+  /*
    * The caller is allowed to pass in NULL as the new position return value.
    * If it happens, we assign it to a dynamic variable to avoid special cases
    * in the code below.
@@ -626,7 +626,7 @@
    */
   plibNewPosition->s.LowPart += dlibMove.s.LowPart;
   This->currentPosition = *plibNewPosition;
- 
+
   return S_OK;
 }
 
@@ -639,9 +639,9 @@
  *
  * See the documentation of IStream for more info.
  */
-HRESULT WINAPI HGLOBALStreamImpl_SetSize( 
+HRESULT WINAPI HGLOBALStreamImpl_SetSize(
 				     IStream*      iface,
-				     ULARGE_INTEGER  libNewSize)   /* [in] */ 
+				     ULARGE_INTEGER  libNewSize)   /* [in] */
 {
   HGLOBALStreamImpl* const This=(HGLOBALStreamImpl*)iface;
 
@@ -652,22 +652,22 @@
    */
   if (libNewSize.s.HighPart != 0)
     return STG_E_INVALIDFUNCTION;
-  
+
   if (This->streamSize.s.LowPart == libNewSize.s.LowPart)
     return S_OK;
 
   /*
    * Re allocate the HGlobal to fit the new size of the stream.
    */
-  This->supportHandle = GlobalReAlloc(This->supportHandle, 
+  This->supportHandle = GlobalReAlloc(This->supportHandle,
 				      libNewSize.s.LowPart,
 				      0);
 
   This->streamSize.s.LowPart = libNewSize.s.LowPart;
-  
+
   return S_OK;
 }
-        
+
 /***
  * This method is part of the IStream interface.
  *
@@ -675,12 +675,12 @@
  *
  * See the documentation of IStream for more info.
  */
-HRESULT WINAPI HGLOBALStreamImpl_CopyTo( 
+HRESULT WINAPI HGLOBALStreamImpl_CopyTo(
 				    IStream*      iface,
-				    IStream*      pstm,         /* [unique][in] */ 
-				    ULARGE_INTEGER  cb,           /* [in] */         
-				    ULARGE_INTEGER* pcbRead,      /* [out] */        
-				    ULARGE_INTEGER* pcbWritten)   /* [out] */        
+				    IStream*      pstm,         /* [unique][in] */
+				    ULARGE_INTEGER  cb,           /* [in] */
+				    ULARGE_INTEGER* pcbRead,      /* [out] */
+				    ULARGE_INTEGER* pcbWritten)   /* [out] */
 {
   HRESULT        hr = S_OK;
   BYTE           tmpBuffer[128];
@@ -688,7 +688,7 @@
   ULARGE_INTEGER totalBytesRead;
   ULARGE_INTEGER totalBytesWritten;
 
-  TRACE("(%p, %p, %ld, %p, %p)\n", iface, pstm, 
+  TRACE("(%p, %p, %ld, %p, %p)\n", iface, pstm,
 	cb.s.LowPart, pcbRead, pcbWritten);
 
   /*
@@ -711,11 +711,11 @@
       copySize = 128;
     else
       copySize = cb.s.LowPart;
-    
+
     IStream_Read(iface, tmpBuffer, copySize, &bytesRead);
 
     totalBytesRead.s.LowPart += bytesRead;
-    
+
     IStream_Write(pstm, tmpBuffer, bytesRead, &bytesWritten);
 
     totalBytesWritten.s.LowPart += bytesWritten;
@@ -728,7 +728,7 @@
       hr = STG_E_MEDIUMFULL;
       break;
     }
-    
+
     if (bytesRead!=copySize)
       cb.s.LowPart = 0;
     else
@@ -755,14 +755,14 @@
 /***
  * This method is part of the IStream interface.
  *
- * For streams supported by HGLOBALS, this function does nothing. 
+ * For streams supported by HGLOBALS, this function does nothing.
  * This is what the documentation tells us.
  *
  * See the documentation of IStream for more info.
- */        
-HRESULT WINAPI HGLOBALStreamImpl_Commit( 
+ */
+HRESULT WINAPI HGLOBALStreamImpl_Commit(
 		  IStream*      iface,
-		  DWORD         grfCommitFlags)  /* [in] */ 
+		  DWORD         grfCommitFlags)  /* [in] */
 {
   return S_OK;
 }
@@ -770,12 +770,12 @@
 /***
  * This method is part of the IStream interface.
  *
- * For streams supported by HGLOBALS, this function does nothing. 
+ * For streams supported by HGLOBALS, this function does nothing.
  * This is what the documentation tells us.
  *
  * See the documentation of IStream for more info.
- */        
-HRESULT WINAPI HGLOBALStreamImpl_Revert( 
+ */
+HRESULT WINAPI HGLOBALStreamImpl_Revert(
 		  IStream* iface)
 {
   return S_OK;
@@ -784,16 +784,16 @@
 /***
  * This method is part of the IStream interface.
  *
- * For streams supported by HGLOBALS, this function does nothing. 
+ * For streams supported by HGLOBALS, this function does nothing.
  * This is what the documentation tells us.
  *
  * See the documentation of IStream for more info.
- */        
-HRESULT WINAPI HGLOBALStreamImpl_LockRegion( 
+ */
+HRESULT WINAPI HGLOBALStreamImpl_LockRegion(
 		  IStream*       iface,
-		  ULARGE_INTEGER libOffset,   /* [in] */ 
-		  ULARGE_INTEGER cb,          /* [in] */ 
-		  DWORD          dwLockType)  /* [in] */ 
+		  ULARGE_INTEGER libOffset,   /* [in] */
+		  ULARGE_INTEGER cb,          /* [in] */
+		  DWORD          dwLockType)  /* [in] */
 {
   return S_OK;
 }
@@ -801,16 +801,16 @@
 /*
  * This method is part of the IStream interface.
  *
- * For streams supported by HGLOBALS, this function does nothing. 
+ * For streams supported by HGLOBALS, this function does nothing.
  * This is what the documentation tells us.
  *
  * See the documentation of IStream for more info.
- */        
-HRESULT WINAPI HGLOBALStreamImpl_UnlockRegion( 
+ */
+HRESULT WINAPI HGLOBALStreamImpl_UnlockRegion(
 		  IStream*       iface,
-		  ULARGE_INTEGER libOffset,   /* [in] */ 
-		  ULARGE_INTEGER cb,          /* [in] */ 
-		  DWORD          dwLockType)  /* [in] */ 
+		  ULARGE_INTEGER libOffset,   /* [in] */
+		  ULARGE_INTEGER cb,          /* [in] */
+		  DWORD          dwLockType)  /* [in] */
 {
   return S_OK;
 }
@@ -822,11 +822,11 @@
  * stream.
  *
  * See the documentation of IStream for more info.
- */        
-HRESULT WINAPI HGLOBALStreamImpl_Stat( 
+ */
+HRESULT WINAPI HGLOBALStreamImpl_Stat(
 		  IStream*     iface,
 		  STATSTG*     pstatstg,     /* [out] */
-		  DWORD        grfStatFlag)  /* [in] */ 
+		  DWORD        grfStatFlag)  /* [in] */
 {
   HGLOBALStreamImpl* const This=(HGLOBALStreamImpl*)iface;
 
@@ -838,10 +838,10 @@
 
   return S_OK;
 }
-        
-HRESULT WINAPI HGLOBALStreamImpl_Clone( 
+
+HRESULT WINAPI HGLOBALStreamImpl_Clone(
 		  IStream*     iface,
-		  IStream**    ppstm) /* [out] */ 
+		  IStream**    ppstm) /* [out] */
 {
   FIXME("not implemented!\n");
   return E_NOTIMPL;
diff --git a/dlls/ole32/ifs.c b/dlls/ole32/ifs.c
index b88abc0..0e37e4d 100644
--- a/dlls/ole32/ifs.c
+++ b/dlls/ole32/ifs.c
@@ -49,7 +49,7 @@
 /******************************************************************************
  *		IUnknown_AddRef	[VTABLE:IUNKNOWN.1]
  */
-static ULONG WINAPI IUnknown_fnAddRef(LPUNKNOWN iface) { 
+static ULONG WINAPI IUnknown_fnAddRef(LPUNKNOWN iface) {
 	ICOM_THIS(IUnknownImpl,iface);
 	TRACE("(%p)->AddRef()\n",This);
 	return ++(This->ref);
@@ -78,12 +78,12 @@
 
 	if (!memcmp(&IID_IUnknown,refiid,sizeof(IID_IUnknown))) {
 		*obj = This;
-		return 0; 
+		return 0;
 	}
-	return OLE_E_ENUM_NOMORE; 
+	return OLE_E_ENUM_NOMORE;
 }
 
-static ICOM_VTABLE(IUnknown) uvt = 
+static ICOM_VTABLE(IUnknown) uvt =
 {
 	ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
 	IUnknown_fnQueryInterface,
@@ -129,7 +129,7 @@
 		*obj = This;
 		return 0;
 	}
-	return OLE_E_ENUM_NOMORE; 
+	return OLE_E_ENUM_NOMORE;
 }
 
 /******************************************************************************
@@ -267,7 +267,7 @@
 		*obj = This;
 		return S_OK;
 	}
-	return OLE_E_ENUM_NOMORE; 
+	return OLE_E_ENUM_NOMORE;
 }
 
 /******************************************************************************
@@ -343,7 +343,7 @@
 	TRACE("(%p)->HeapMinimize()\n",This);
 }
 
-static ICOM_VTABLE(IMalloc) VT_IMalloc32 = 
+static ICOM_VTABLE(IMalloc) VT_IMalloc32 =
 {
     ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
     IMalloc_fnQueryInterface,
diff --git a/dlls/ole32/itemmoniker.c b/dlls/ole32/itemmoniker.c
index 4a74cf9..13342b4 100644
--- a/dlls/ole32/itemmoniker.c
+++ b/dlls/ole32/itemmoniker.c
@@ -38,7 +38,7 @@
 
     ICOM_VTABLE(IMoniker)*  lpvtbl1;  /* VTable relative to the IMoniker interface.*/
 
-    /* The ROT (RunningObjectTable implementation) uses the IROTData interface to test whether 
+    /* The ROT (RunningObjectTable implementation) uses the IROTData interface to test whether
      * two monikers are equal. That's whay IROTData interface is implemented by monikers.
      */
     ICOM_VTABLE(IROTData)*  lpvtbl2;  /* VTable relative to the IROTData interface.*/
@@ -48,7 +48,7 @@
     LPOLESTR itemName; /* item name identified by this ItemMoniker */
 
     LPOLESTR itemDelimiter; /* Delimiter string */
-    
+
 } ItemMonikerImpl;
 
 /********************************************************************************/
@@ -154,7 +154,7 @@
   /* Perform a sanity check on the parameters.*/
     if ( (This==0) || (ppvObject==0) )
 	return E_INVALIDARG;
-  
+
   /* Initialize the return parameter */
   *ppvObject = 0;
 
@@ -165,14 +165,14 @@
       IsEqualIID(&IID_IMoniker, riid)
      )
       *ppvObject = iface;
-  
+
     else if (IsEqualIID(&IID_IROTData, riid))
         *ppvObject = (IROTData*)&(This->lpvtbl2);
 
   /* Check that we obtained an interface.*/
     if ((*ppvObject)==0)
         return E_NOINTERFACE;
-  
+
    /* Query Interface always increases the reference count by one when it is successful */
   ItemMonikerImpl_AddRef(iface);
 
@@ -209,7 +209,7 @@
 
         return 0;
     }
-    return This->ref;;
+    return This->ref;
 }
 
 /******************************************************************************
@@ -221,9 +221,9 @@
 
     if (pClassID==NULL)
         return E_POINTER;
-            
+
     *pClassID = CLSID_ItemMoniker;
-        
+
     return S_OK;
 }
 
@@ -355,7 +355,7 @@
         return E_POINTER;
 
     /* for more details see ItemMonikerImpl_Save coments */
-    
+
     pcbSize->s.LowPart =  sizeof(DWORD) + /* DWORD which contains delimiter length */
                         delimiterLength + /* item delimiter string */
                         sizeof(DWORD) + /* DWORD which contains item name length */
@@ -432,7 +432,7 @@
                                             VOID** ppvResult)
 {
     ICOM_THIS(ItemMonikerImpl,iface);
-    
+
     HRESULT   res;
     IID    refid=IID_IOleItemContainer;
     IOleItemContainer *poic=0;
@@ -479,7 +479,7 @@
 
     if(pmkToLeft==NULL)
         return E_INVALIDARG;
-        
+
     res=IMoniker_BindToObject(pmkToLeft,pbc,NULL,&IID_IOleItemContainer,(void**)&poic);
 
     if (SUCCEEDED(res)){
@@ -509,7 +509,7 @@
     ItemMonikerImpl_AddRef(iface);
 
     *ppmkReduced=iface;
-    
+
     return MK_S_REDUCED_TO_SELF;
 }
 /******************************************************************************
@@ -532,7 +532,7 @@
 	return E_POINTER;
 
     *ppmkComposite=0;
-    
+
     IMoniker_IsSystemMoniker(pmkRight,&mkSys);
 
     /* If pmkRight is an anti-moniker, the returned moniker is NULL */
@@ -542,7 +542,7 @@
     else
         /* if pmkRight is a composite whose leftmost component is an anti-moniker,           */
         /* the returned moniker is the composite after the leftmost anti-moniker is removed. */
-        
+
          if(mkSys==MKSYS_GENERICCOMPOSITE){
 
             res=IMoniker_Enum(pmkRight,TRUE,&penumMk);
@@ -560,7 +560,7 @@
 
                 tempMkComposite=iface;
                 IMoniker_AddRef(iface);
-                
+
                 while(IEnumMoniker_Next(penumMk,1,&pmostLeftMk,NULL)==S_OK){
 
                     res=CreateGenericComposite(tempMkComposite,pmostLeftMk,ppmkComposite);
@@ -617,7 +617,7 @@
 
     if (pmkOtherMoniker==NULL)
         return S_FALSE;
-    
+
     /* This method returns S_OK if both monikers are item monikers and their display names are */
     /* identical (using a case-insensitive comparison); otherwise, the method returns S_FALSE. */
 
@@ -632,10 +632,10 @@
 
     IMoniker_GetDisplayName(iface,bind,NULL,&dispName1);
     IMoniker_GetDisplayName(pmkOtherMoniker,bind,NULL,&dispName2);
-    
+
     if (lstrcmpW(dispName1,dispName2)!=0)
         return S_FALSE;
-    
+
     return S_OK;
 }
 
@@ -652,7 +652,7 @@
 
     if (pdwHash==NULL)
         return E_POINTER;
-    
+
     val =  This->itemName;
     len = lstrlenW(val);
 
@@ -711,7 +711,7 @@
         /* If pmkToLeft is non-NULL, the method calls IMoniker::BindToObject on the pmkToLeft parameter,         */
         /* requesting an IOleItemContainer interface pointer. The method then calls IOleItemContainer::IsRunning,*/
         /* passing the string contained within this moniker. */
-        
+
         res=IMoniker_BindToObject(pmkToLeft,pbc,NULL,&IID_IOleItemContainer,(void**)&poic);
 
         if (SUCCEEDED(res)){
@@ -792,9 +792,9 @@
     if((mkSys==MKSYS_ITEMMONIKER) && (IMoniker_IsEqual(iface,pmkOther)==S_OK) ){
 
         *ppmkPrefix=iface;
-        
+
         IMoniker_AddRef(iface);
-        
+
         return MK_S_US;
     }
     else
@@ -814,7 +814,7 @@
         return E_POINTER;
 
     *ppmkRelPath=0;
-    
+
     return MK_E_NOTBINDABLE;
 }
 
@@ -844,7 +844,7 @@
 
     strcpyW(*ppszDisplayName,This->itemDelimiter);
     strcatW(*ppszDisplayName,This->itemName);
-    
+
     return S_OK;
 }
 
@@ -899,7 +899,7 @@
 
     if (!pwdMksys)
         return E_POINTER;
-    
+
     (*pwdMksys)=MKSYS_ITEMMONIKER;
 
     return S_OK;
@@ -936,7 +936,7 @@
 ULONG   WINAPI ItemMonikerROTDataImpl_Release(IROTData* iface)
 {
     ICOM_THIS_From_IROTData(IMoniker, iface);
-    
+
     TRACE("(%p)\n",iface);
 
     return ItemMonikerImpl_Release(This);
diff --git a/dlls/ole32/marshal.c b/dlls/ole32/marshal.c
index 57242f1..2256dcc 100644
--- a/dlls/ole32/marshal.c
+++ b/dlls/ole32/marshal.c
@@ -540,8 +540,8 @@
 /***********************************************************************
  *		CoMarshalInterThreadInterfaceInStream	[OLE32.33]
  *
- * Marshal interfaces across threads. We don't have a thread distinction, 
- * meaning most interfaces just work across different threads, the RPC 
+ * Marshal interfaces across threads. We don't have a thread distinction,
+ * meaning most interfaces just work across different threads, the RPC
  * handles it.
  */
 HRESULT WINAPI
@@ -600,7 +600,7 @@
   if (IsEqualIID(riid,&IID_IMarshal)) {
       StdMarshalImpl	*dm;
       dm=(StdMarshalImpl*)HeapAlloc(GetProcessHeap(),0,sizeof(StdMarshalImpl));
-      if (!dm) 
+      if (!dm)
 	  return E_FAIL;
       dm->lpvtbl	= &stdmvtbl;
       dm->ref		= 1;
diff --git a/dlls/ole32/memlockbytes.c b/dlls/ole32/memlockbytes.c
index 8ad655b..31e9753 100644
--- a/dlls/ole32/memlockbytes.c
+++ b/dlls/ole32/memlockbytes.c
@@ -42,7 +42,7 @@
 struct HGLOBALLockBytesImpl
 {
   /*
-   * Needs to be the first item in the stuct 
+   * Needs to be the first item in the stuct
    * since we want to cast this in an ILockBytes pointer
    */
   ICOM_VFIELD(ILockBytes);
@@ -205,7 +205,7 @@
 {
   HGLOBALLockBytesImpl* newLockBytes;
   newLockBytes = HeapAlloc(GetProcessHeap(), 0, sizeof(HGLOBALLockBytesImpl));
- 
+
   if (newLockBytes!=0)
   {
     /*
@@ -213,7 +213,7 @@
      */
     ICOM_VTBL(newLockBytes) = &HGLOBALLockBytesImpl_Vtbl;
     newLockBytes->ref    = 0;
-  
+
     /*
      * Initialize the support.
      */
@@ -311,7 +311,7 @@
    */
   HGLOBALLockBytesImpl_AddRef(iface);
 
-  return S_OK;;
+  return S_OK;
 }
 
 /******************************************************************************
@@ -415,7 +415,7 @@
   /*
    * The function returns S_OK if the specified number of bytes were read
    * or the end of the array was reached.
-   * It returns STG_E_READFAULT if the number of bytes to read does not equal 
+   * It returns STG_E_READFAULT if the number of bytes to read does not equal
    * the number of bytes actually read.
    */
   if(*pcbRead == cb)
@@ -520,7 +520,7 @@
    */
   if (libNewSize.s.HighPart != 0)
     return STG_E_INVALIDFUNCTION;
- 
+
   if (This->byteArraySize.s.LowPart == libNewSize.s.LowPart)
     return S_OK;
 
@@ -535,7 +535,7 @@
     return STG_E_MEDIUMFULL;
 
   This->byteArraySize.s.LowPart = libNewSize.s.LowPart;
- 
+
   return S_OK;
 }
 
diff --git a/dlls/ole32/moniker.c b/dlls/ole32/moniker.c
index ce28586..103d450 100644
--- a/dlls/ole32/moniker.c
+++ b/dlls/ole32/moniker.c
@@ -58,7 +58,7 @@
     DWORD      runObjTabSize;       /* current table size                            */
     DWORD      runObjTabLastIndx;  /* first free index element in the table.        */
     DWORD      runObjTabRegister; /* registration key of the next registered object */
-    
+
 } RunningObjectTableImpl;
 
 RunningObjectTableImpl* runningObjectTableInstance=0;
@@ -148,7 +148,7 @@
 HRESULT WINAPI RunningObjectTableImpl_Destroy()
 {
     TRACE("()\n");
-    
+
     if (runningObjectTableInstance==NULL)
         return E_INVALIDARG;
 
@@ -181,7 +181,7 @@
         {
             if (( This->runObjTab[i].regTypeObj &  ROTFLAGS_REGISTRATIONKEEPSALIVE) != 0)
                 IUnknown_Release(This->runObjTab[i].pObj);
- 
+
             IMoniker_Release(This->runObjTab[i].pmkObj);
         }
        /*  RunningObjectTable data structure will be not destroyed here ! the destruction will be done only
@@ -241,7 +241,7 @@
 
     if (runningObjectTableInstance==NULL)
         return E_POINTER;
-    
+
     RunningObjectTableImpl_Release((IRunningObjectTable*)runningObjectTableInstance);
 
     RunningObjectTableImpl_Destroy();
@@ -282,7 +282,7 @@
     This->runObjTab[This->runObjTabLastIndx].regTypeObj = grfFlags;
     This->runObjTab[This->runObjTabLastIndx].identRegObj = This->runObjTabRegister;
     CoFileTimeNow(&(This->runObjTab[This->runObjTabLastIndx].lastModifObj));
-    
+
     /* gives a registration identifier to the registered object*/
     (*pdwRegister)= This->runObjTabRegister;
 
@@ -293,7 +293,7 @@
     }
     This->runObjTabRegister++;
     This->runObjTabLastIndx++;
-    
+
     if (This->runObjTabLastIndx == This->runObjTabSize){ /* table is full ! so it must be resized */
 
         This->runObjTabSize+=BLOCK_TAB_SIZE; /* newsize table */
@@ -307,7 +307,7 @@
         IUnknown_AddRef(punkObject);
 
     IMoniker_AddRef(pmkObjectName);
-    
+
     return res;
 }
 
@@ -333,11 +333,11 @@
         IUnknown_Release(This->runObjTab[index].pObj);
 
     IMoniker_Release(This->runObjTab[index].pmkObj);
-    
+
     /* remove the object from the table */
     for(j=index; j<This->runObjTabLastIndx-1; j++)
         This->runObjTab[j]= This->runObjTab[j+1];
-    
+
     This->runObjTabLastIndx--;
 
     return S_OK;
@@ -348,7 +348,7 @@
  */
 HRESULT WINAPI RunningObjectTableImpl_IsRunning(  IRunningObjectTable* iface,
                                                   IMoniker *pmkObjectName)  /* Pointer to the moniker of the object whose status is desired */
-{    
+{
     ICOM_THIS(RunningObjectTableImpl,iface);
 
     TRACE("(%p,%p)\n",This,pmkObjectName);
@@ -370,7 +370,7 @@
 
     if (ppunkObject==NULL)
         return E_POINTER;
-    
+
     *ppunkObject=0;
 
     /* verify if the object was registered before or not */
@@ -405,7 +405,7 @@
 
     return S_OK;
 }
-    
+
 /***********************************************************************
  *        RunningObjectTable_GetTimeOfLastChange
  */
@@ -423,7 +423,7 @@
 
     /* verify if the object was registered before or not */
     if (RunningObjectTableImpl_GetObjectIndex(This,-1,pmkObjectName,&index)==S_FALSE)
-        return MK_E_UNAVAILABLE;;
+        return MK_E_UNAVAILABLE;
 
     (*pfiletime)= This->runObjTab[index].lastModifObj;
 
@@ -459,7 +459,7 @@
     else
         /* search object identified by a register identifier */
         for(i=0;((i<This->runObjTabLastIndx)&&(This->runObjTab[i].identRegObj!=identReg));i++);
-    
+
     if (i==This->runObjTabLastIndx)  return S_FALSE;
 
     if (indx != NULL)  *indx=i;
@@ -507,7 +507,7 @@
   LRESULT		ret;
 
   ret = IRunnableObject_QueryInterface(This,&IID_IRunnableObject,(LPVOID*)&runable);
-  if (ret) 
+  if (ret)
 	return 0; /* Appears to return no error. */
   ret  = IRunnableObject_Run(runable,NULL);
   IRunnableObject_Release(runable);
diff --git a/dlls/ole32/ole2.c b/dlls/ole32/ole2.c
index a4f3aa6..066457e 100644
--- a/dlls/ole32/ole2.c
+++ b/dlls/ole32/ole2.c
@@ -4,7 +4,7 @@
  *
  *	Copyright 1995	Martin von Loewis
  *      Copyright 1999  Francis Beaudet
- *      Copyright 1999  Noel Borthwick 
+ *      Copyright 1999  Noel Borthwick
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -49,7 +49,7 @@
 WINE_DECLARE_DEBUG_CHANNEL(accel);
 
 /******************************************************************************
- * These are static/global variables and internal data structures that the 
+ * These are static/global variables and internal data structures that the
  * OLE module uses to maintain it's state.
  */
 typedef struct tagDropTargetNode
@@ -111,7 +111,7 @@
 static DropTargetNode* targetListHead = NULL;
 
 /******************************************************************************
- * These are the prototypes of miscelaneous utility methods 
+ * These are the prototypes of miscelaneous utility methods
  */
 static void OLEUTL_ReadRegistryDWORDValue(HKEY regKey, DWORD* pdwValue);
 
@@ -146,9 +146,9 @@
 static DropTargetNode* OLEDD_FindDropTarget(
                          HWND hwndOfTarget);
 static LRESULT WINAPI  OLEDD_DragTrackerWindowProc(
-			 HWND   hwnd, 
+			 HWND   hwnd,
 			 UINT   uMsg,
-			 WPARAM wParam, 
+			 WPARAM wParam,
 			 LPARAM   lParam);
 static void OLEDD_TrackMouseMove(
                          TrackerWindowInfo* trackerInfo,
@@ -187,11 +187,11 @@
   hr = CoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
 
   /*
-   * If the CoInitializeEx call failed, the OLE libraries can't be 
+   * If the CoInitializeEx call failed, the OLE libraries can't be
    * initialized.
    */
   if (FAILED(hr))
-    return hr;    
+    return hr;
 
   /*
    * Then, it has to initialize the OLE specific modules.
@@ -203,7 +203,7 @@
    */
   if (OLE_moduleLockCount==0)
   {
-    /* 
+    /*
      * Initialize the libraries.
      */
     TRACE("() - Initializing the OLE libraries\n");
@@ -227,7 +227,7 @@
   /*
    * Then, we increase the lock count on the OLE module.
    */
-  OLE_moduleLockCount++;  
+  OLE_moduleLockCount++;
 
   return hr;
 }
@@ -276,13 +276,13 @@
      * Drag and Drop
      */
     OLEDD_UnInitialize();
-    
+
     /*
      * OLE shared menu
      */
     OLEMenu_UnInitialize();
   }
-  
+
   /*
    * Then, uninitialize the COM libraries.
    */
@@ -327,7 +327,7 @@
  */
 HRESULT WINAPI RegisterDragDrop(
 	HWND hwnd,
-	LPDROPTARGET pDropTarget) 
+	LPDROPTARGET pDropTarget)
 {
   DropTargetNode* dropTargetInfo;
 
@@ -359,7 +359,7 @@
    */
   dropTargetInfo->dropTarget  = pDropTarget;
   IDropTarget_AddRef(dropTargetInfo->dropTarget);
-  
+
   OLEDD_InsertDropTarget(dropTargetInfo);
 
 	return S_OK;
@@ -401,7 +401,7 @@
    * references
    */
   IDropTarget_Release(dropTargetInfo->dropTarget);
-  HeapFree(GetProcessHeap(), 0, dropTargetInfo);  
+  HeapFree(GetProcessHeap(), 0, dropTargetInfo);
 
 	return S_OK;
 }
@@ -414,8 +414,8 @@
  * not too bad since this is the case for many objects because of the
  * way they are registered.
  */
-HRESULT WINAPI OleRegGetUserType( 
-	REFCLSID clsid, 
+HRESULT WINAPI OleRegGetUserType(
+	REFCLSID clsid,
 	DWORD dwFormOfType,
 	LPOLESTR* pszUserType)
 {
@@ -499,7 +499,7 @@
 
   RegCloseKey(clsidKey);
 
-  
+
   if (hres!=ERROR_SUCCESS)
   {
     CoTaskMemFree(*pszUserType);
@@ -566,7 +566,7 @@
      */
     while (!trackerInfo.trackingDone && GetMessageA(&msg, 0, 0, 0) )
     {
-      if ( (msg.message >= WM_KEYFIRST) && 
+      if ( (msg.message >= WM_KEYFIRST) &&
 	   (msg.message <= WM_KEYLAST) )
       {
 	/*
@@ -583,7 +583,7 @@
 
 	/*
 	 * Notify the drop source.
-	 */       
+	 */
 	OLEDD_TrackStateChange(&trackerInfo,
 			       msg.pt,
 			       OLEDD_GetButtonState());
@@ -664,7 +664,7 @@
 		       "MiscStatus",
 		       &miscStatusKey);
 
-  
+
   if (result != ERROR_SUCCESS)
   {
     RegCloseKey(clsidKey);
@@ -684,7 +684,7 @@
   result = RegOpenKeyA(miscStatusKey,
 		       keyName,
 		       &aspectKey);
-  
+
   if (result == ERROR_SUCCESS)
   {
     OLEUTL_ReadRegistryDWORDValue(aspectKey, pdwStatus);
@@ -704,7 +704,7 @@
  *              OleSetContainedObject        [OLE32.128]
  */
 HRESULT WINAPI OleSetContainedObject(
-  LPUNKNOWN pUnknown, 
+  LPUNKNOWN pUnknown,
   BOOL      fContained)
 {
   IRunnableObject* runnable = NULL;
@@ -732,9 +732,9 @@
  *              OleLoad        [OLE32.112]
  */
 HRESULT WINAPI OleLoad(
-  LPSTORAGE       pStg, 
-  REFIID          riid, 
-  LPOLECLIENTSITE pClientSite, 
+  LPSTORAGE       pStg,
+  REFIID          riid,
+  LPOLECLIENTSITE pClientSite,
   LPVOID*         ppvObj)
 {
   IPersistStorage* persistStorage = NULL;
@@ -743,7 +743,7 @@
   HRESULT          hres;
 
   TRACE("(%p,%p,%p,%p)\n", pStg, riid, pClientSite, ppvObj);
-  
+
   /*
    * TODO, Conversion ... OleDoAutoConvert
    */
@@ -792,7 +792,7 @@
 				   &IID_IPersistStorage,
 				   (void**)&persistStorage);
 
-  if (SUCCEEDED(hres)) 
+  if (SUCCEEDED(hres))
   {
     IPersistStorage_Load(persistStorage, pStg);
 
@@ -847,7 +847,7 @@
     IStorage_Commit(pStg,
 		    STGC_DEFAULT);
   }
-  
+
   return hres;
 }
 
@@ -855,7 +855,7 @@
 /******************************************************************************
  *              OleLockRunning        [OLE32.114]
  */
-HRESULT WINAPI OleLockRunning(LPUNKNOWN pUnknown, BOOL fLock, BOOL fLastUnlockCloses) 
+HRESULT WINAPI OleLockRunning(LPUNKNOWN pUnknown, BOOL fLock, BOOL fLastUnlockCloses)
 {
   IRunnableObject* runnable = NULL;
   HRESULT          hres;
@@ -920,7 +920,7 @@
 
   pHookItem->tid = tid;
   pHookItem->hHeap = GetProcessHeap();
-  
+
   /* Install a thread scope message hook for WH_GETMESSAGE */
   pHookItem->GetMsg_hHook = SetWindowsHookExA( WH_GETMESSAGE, OLEMenu_GetMsgProc,
                                                0, GetCurrentThreadId() );
@@ -936,9 +936,9 @@
   /* Insert the hook table entry */
   pHookItem->next = hook_list;
   hook_list = pHookItem;
-  
+
   return TRUE;
-  
+
 CLEANUP:
   /* Unhook any hooks */
   if ( pHookItem->GetMsg_hHook )
@@ -947,7 +947,7 @@
     UnhookWindowsHookEx( pHookItem->CallWndProc_hHook );
   /* Release the hook table entry */
   HeapFree(pHookItem->hHeap, 0, pHookItem );
-  
+
   return FALSE;
 }
 
@@ -1012,7 +1012,7 @@
     if ( tid == pHookItem->tid )
       return pHookItem;
   }
-  
+
   return NULL;
 }
 
@@ -1033,7 +1033,7 @@
   for (i = 0; i < nItems; i++)
   {
     HMENU hsubmenu;
-      
+
     /*  Is the current item a submenu? */
     if ( (hsubmenu = GetSubMenu(hMainMenu, i)) )
     {
@@ -1080,7 +1080,7 @@
   /* Find the menu item index in the shared OLE menu that this item belongs to */
   if ( !OLEMenu_FindMainMenuIndex( pOleMenuDescriptor->hmenuCombined, hmenu,  &nPos ) )
     return FALSE;
-  
+
   /* The group widths array has counts for the number of elements
    * in the groups File, Edit, Container, Object, Window, Help.
    * The Edit, Object & Help groups belong to the server object
@@ -1113,13 +1113,13 @@
   OleMenuDescriptor *pOleMenuDescriptor = NULL;
   OleMenuHookItem *pHookItem = NULL;
   WORD fuFlags;
-  
+
   TRACE("%i, %04x, %08x\n", code, wParam, (unsigned)lParam );
 
   /* Check if we're being asked to process the message */
   if ( HC_ACTION != code )
     goto NEXTHOOK;
-      
+
   /* Retrieve the current message being dispatched from lParam */
   pMsg = (LPCWPSTRUCT)lParam;
 
@@ -1149,14 +1149,14 @@
                   pMsg->message, pMsg->wParam, pMsg->lParam );
       goto NEXTHOOK;
     }
-    
+
     case WM_INITMENUPOPUP:
     {
       /* Save the state for whether this is a server owned menu */
       OLEMenu_SetIsServerMenu( (HMENU)pMsg->wParam, pOleMenuDescriptor );
       break;
     }
-    
+
     case WM_MENUSELECT:
     {
       fuFlags = HIWORD(pMsg->wParam);  /* Get flags */
@@ -1169,7 +1169,7 @@
 
       break;
     }
-    
+
     case WM_DRAWITEM:
     {
       LPDRAWITEMSTRUCT lpdis = (LPDRAWITEMSTRUCT) pMsg->lParam;
@@ -1189,11 +1189,11 @@
     SendMessageA( pOleMenuDescriptor->hwndActiveObject,
                   pMsg->message, pMsg->wParam, pMsg->lParam );
   }
-    
+
 NEXTHOOK:
   if ( pOleMenuDescriptor )
     GlobalUnlock( hOleMenu );
-  
+
   /* Lookup the hook item for the current thread */
   if ( !( pHookItem = OLEMenu_IsHookInstalled( GetCurrentThreadId() ) ) )
   {
@@ -1201,7 +1201,7 @@
     WARN("could not retrieve hHook for current thread!\n" );
     return 0;
   }
-  
+
   /* Pass on the message to the next hooker */
   return CallNextHookEx( pHookItem->CallWndProc_hHook, code, wParam, lParam );
 }
@@ -1218,13 +1218,13 @@
   OleMenuDescriptor *pOleMenuDescriptor = NULL;
   OleMenuHookItem *pHookItem = NULL;
   WORD wCode;
-  
+
   TRACE("%i, %04x, %08x\n", code, wParam, (unsigned)lParam );
 
   /* Check if we're being asked to process a  messages */
   if ( HC_ACTION != code )
     goto NEXTHOOK;
-      
+
   /* Retrieve the current message being dispatched from lParam */
   pMsg = (LPMSG)lParam;
 
@@ -1263,11 +1263,11 @@
      * dispatch it to the embedded objects window. */
     pMsg->hwnd = pOleMenuDescriptor->hwndActiveObject;
   }
-    
+
 NEXTHOOK:
   if ( pOleMenuDescriptor )
     GlobalUnlock( hOleMenu );
-  
+
   /* Lookup the hook item for the current thread */
   if ( !( pHookItem = OLEMenu_IsHookInstalled( GetCurrentThreadId() ) ) )
   {
@@ -1275,7 +1275,7 @@
     WARN("could not retrieve hHook for current thread!\n" );
     return FALSE;
   }
-  
+
   /* Pass on the message to the next hooker */
   return CallNextHookEx( pHookItem->GetMsg_hHook, code, wParam, lParam );
 }
@@ -1313,11 +1313,11 @@
   /* Initialize menu group widths and hmenu */
   for ( i = 0; i < 6; i++ )
     pOleMenuDescriptor->mgw.width[i] = lpMenuWidths->width[i];
-  
+
   pOleMenuDescriptor->hmenuCombined = hmenuCombined;
   pOleMenuDescriptor->bIsServerItem = FALSE;
   GlobalUnlock( hOleMenu );
-      
+
   return hOleMenu;
 }
 
@@ -1339,7 +1339,7 @@
  * FIXME: The lpFrame and lpActiveObject parameters are currently ignored
  * OLE should install context sensitive help F1 filtering for the app when
  * these are non null.
- * 
+ *
  * PARAMS:
  *     hOleMenu         Handle to composite menu descriptor
  *     hwndFrame        Handle to containers frame window
@@ -1387,7 +1387,7 @@
      * without first calling it with a null hOleMenu to uninstall */
     if ( OLEMenu_IsHookInstalled( GetCurrentThreadId() ) )
   return E_FAIL;
-        
+
     /* Get the menu descriptor */
     pOleMenuDescriptor = (OleMenuDescriptor *) GlobalLock( hOleMenu );
     if ( !pOleMenuDescriptor )
@@ -1399,7 +1399,7 @@
 
     GlobalUnlock( hOleMenu );
     pOleMenuDescriptor = NULL;
-    
+
     /* Add a menu descriptor windows property to the frame window */
     SetPropA( hwndFrame, "PROP_OLEMenuDescriptor", hOleMenu );
 
@@ -1412,11 +1412,11 @@
     /* Uninstall the hooks */
     if ( !OLEMenu_UnInstallHooks( GetCurrentThreadId() ) )
       return E_FAIL;
-    
+
     /* Remove the menu descriptor property from the frame window */
     RemovePropA( hwndFrame, "PROP_OLEMenuDescriptor" );
   }
-      
+
   return S_OK;
 }
 
@@ -1484,7 +1484,7 @@
 		}
 	    }
 	}
-    }	
+    }
 
     WARN_(accel)("couldn't translate accelerator key\n");
     return FALSE;
@@ -1504,7 +1504,7 @@
   {
     case TYMED_HGLOBAL:
     {
-      if ( (pmedium->pUnkForRelease==0) && 
+      if ( (pmedium->pUnkForRelease==0) &&
 	   (pmedium->u.hGlobal!=0) )
 	GlobalFree(pmedium->u.hGlobal);
 
@@ -1519,7 +1519,7 @@
 	{
 	  DeleteFileW(pmedium->u.lpszFileName);
 	}
-	
+
 	CoTaskMemFree(pmedium->u.lpszFileName);
       }
 
@@ -1548,7 +1548,7 @@
     }
     case TYMED_GDI:
     {
-      if ( (pmedium->pUnkForRelease==0) && 
+      if ( (pmedium->pUnkForRelease==0) &&
 	   (pmedium->u.hGlobal!=0) )
 	DeleteObject(pmedium->u.hGlobal);
 
@@ -1557,7 +1557,7 @@
     }
     case TYMED_MFPICT:
     {
-      if ( (pmedium->pUnkForRelease==0) && 
+      if ( (pmedium->pUnkForRelease==0) &&
 	   (pmedium->u.hMetaFilePict!=0) )
       {
 	LPMETAFILEPICT pMP = GlobalLock(pmedium->u.hGlobal);
@@ -1571,7 +1571,7 @@
     }
     case TYMED_ENHMF:
     {
-      if ( (pmedium->pUnkForRelease==0) && 
+      if ( (pmedium->pUnkForRelease==0) &&
 	   (pmedium->u.hEnhMetaFile!=0) )
       {
 	DeleteEnhMetaFile(pmedium->u.hEnhMetaFile);
@@ -1612,7 +1612,7 @@
     wndClass.hCursor       = 0;
     wndClass.hbrBackground = 0;
     wndClass.lpszClassName = OLEDD_DRAGTRACKERCLASS;
- 
+
     RegisterClassA (&wndClass);
 }
 
@@ -1678,7 +1678,7 @@
 
   /*
    * If we get here, we have found a spot for our item. The parentNodeLink
-   * pointer points to the pointer that we have to modify. 
+   * pointer points to the pointer that we have to modify.
    * The curNode should be NULL. We just have to establish the link and Voila!
    */
   assert(curNode==NULL);
@@ -1725,7 +1725,7 @@
     else
     {
       /*
-       * The item was found in the list. Detach it from it's parent and 
+       * The item was found in the list. Detach it from it's parent and
        * re-insert it's kids in the tree.
        */
       assert(parentNodeLink!=NULL);
@@ -1815,9 +1815,9 @@
  * of this behavior.
  */
 static LRESULT WINAPI OLEDD_DragTrackerWindowProc(
-			 HWND   hwnd, 
+			 HWND   hwnd,
 			 UINT   uMsg,
-			 WPARAM wParam, 
+			 WPARAM wParam,
 			 LPARAM   lParam)
 {
   switch (uMsg)
@@ -1826,9 +1826,9 @@
     {
       LPCREATESTRUCTA createStruct = (LPCREATESTRUCTA)lParam;
 
-      SetWindowLongA(hwnd, 0, (LONG)createStruct->lpCreateParams); 
+      SetWindowLongA(hwnd, 0, (LONG)createStruct->lpCreateParams);
 
-      
+
       break;
     }
     case WM_MOUSEMOVE:
@@ -1923,11 +1923,11 @@
    * If we are hovering over the same target as before, send the
    * DragOver notification
    */
-  if ( (trackerInfo->curDragTarget != 0) && 
+  if ( (trackerInfo->curDragTarget != 0) &&
        (trackerInfo->curDragTargetHWND==hwndNewTarget) )
   {
     POINTL  mousePosParam;
-    
+
     /*
      * The documentation tells me that the coordinate should be in the target
      * window's coordinate space. However, the tests I made tell me the
@@ -1935,7 +1935,7 @@
      */
     mousePosParam.x = mousePos.x;
     mousePosParam.y = mousePos.y;
-    
+
     IDropTarget_DragOver(trackerInfo->curDragTarget,
 			 keyState,
 			 mousePosParam,
@@ -1944,7 +1944,7 @@
   else
   {
     DropTargetNode* newDropTargetNode = 0;
-    
+
     /*
      * If we changed window, we have to notify our old target and check for
      * the new one.
@@ -1953,7 +1953,7 @@
     {
       IDropTarget_DragLeave(trackerInfo->curDragTarget);
     }
-    
+
     /*
      * Make sure we're hovering over a window.
      */
@@ -1970,14 +1970,14 @@
 
       trackerInfo->curDragTargetHWND = hwndNewTarget;
       trackerInfo->curDragTarget     = newDropTargetNode ? newDropTargetNode->dropTarget : 0;
-      
+
       /*
        * If there is, notify it that we just dragged-in
        */
       if (trackerInfo->curDragTarget!=0)
       {
 	POINTL  mousePosParam;
-	
+
 	/*
 	 * The documentation tells me that the coordinate should be in the target
 	 * window's coordinate space. However, the tests I made tell me the
@@ -1985,7 +1985,7 @@
 	 */
 	mousePosParam.x = mousePos.x;
 	mousePosParam.y = mousePos.y;
-	
+
 	IDropTarget_DragEnter(trackerInfo->curDragTarget,
 			      trackerInfo->dataObject,
 			      keyState,
@@ -2004,8 +2004,8 @@
   }
 
   /*
-   * Now that we have done that, we have to tell the source to give 
-   * us feedback on the work being done by the target.  If we don't 
+   * Now that we have done that, we have to tell the source to give
+   * us feedback on the work being done by the target.  If we don't
    * have a target, simulate no effect.
    */
   if (trackerInfo->curDragTarget==0)
@@ -2040,7 +2040,7 @@
     {
       SetCursor(LoadCursorA(OLE32_hInstance, MAKEINTRESOURCEA(0)));
     }
-  }  
+  }
 }
 
 /***
@@ -2069,9 +2069,9 @@
    */
   trackerInfo->returnValue = IDropSource_QueryContinueDrag(
 			       trackerInfo->dropSource,
-			       trackerInfo->escPressed, 
+			       trackerInfo->escPressed,
 			       keyState);
-  
+
   /*
    * All the return valued will stop the operation except the S_OK
    * return value.
@@ -2084,13 +2084,13 @@
     trackerInfo->trackingDone = TRUE;
 
     /*
-     * Release the mouse in case the drop target decides to show a popup 
+     * Release the mouse in case the drop target decides to show a popup
      * or a menu or something.
      */
     ReleaseCapture();
-    
+
     /*
-     * If we end-up over a target, drop the object in the target or 
+     * If we end-up over a target, drop the object in the target or
      * inform the target that the operation was cancelled.
      */
     if (trackerInfo->curDragTarget!=0)
@@ -2098,21 +2098,21 @@
       switch (trackerInfo->returnValue)
       {
 	/*
-	 * If the source wants us to complete the operation, we tell 
+	 * If the source wants us to complete the operation, we tell
 	 * the drop target that we just dropped the object in it.
 	 */
         case DRAGDROP_S_DROP:
 	{
 	  POINTL  mousePosParam;
-	
+
 	  /*
-	   * The documentation tells me that the coordinate should be 
+	   * The documentation tells me that the coordinate should be
 	   * in the target window's coordinate space. However, the tests
 	   * I made tell me the coordinates should be in screen coordinates.
 	   */
 	  mousePosParam.x = mousePos.x;
 	  mousePosParam.y = mousePos.y;
-	  
+
 	  IDropTarget_Drop(trackerInfo->curDragTarget,
 			   trackerInfo->dataObject,
 			   keyState,
@@ -2121,9 +2121,9 @@
 	  break;
 	}
 	/*
-	 * If the source told us that we should cancel, fool the drop 
+	 * If the source told us that we should cancel, fool the drop
 	 * target by telling it that the mouse left it's window.
-	 * Also set the drop effect to "NONE" in case the application 
+	 * Also set the drop effect to "NONE" in case the application
 	 * ignores the result of DoDragDrop.
 	 */
         case DRAGDROP_S_CANCEL:
@@ -2176,13 +2176,13 @@
  *
  * params:
  *     regKey   - Key to read the default value from
- *     pdwValue - Pointer to the location where the DWORD 
+ *     pdwValue - Pointer to the location where the DWORD
  *                value is returned. This value is not modified
  *                if the value is not found.
  */
 
 static void OLEUTL_ReadRegistryDWORDValue(
-  HKEY   regKey, 
+  HKEY   regKey,
   DWORD* pdwValue)
 {
   char  buffer[20];
diff --git a/dlls/ole32/ole2nls.c b/dlls/ole32/ole2nls.c
index a18682b..27602d9 100644
--- a/dlls/ole32/ole2nls.c
+++ b/dlls/ole32/ole2nls.c
@@ -131,5 +131,5 @@
 	}
 
 	return FALSE; /* ptr not set */
-} 
+}
 
diff --git a/dlls/ole32/ole2stubs.c b/dlls/ole32/ole2stubs.c
index 52d6085..46989e0 100644
--- a/dlls/ole32/ole2stubs.c
+++ b/dlls/ole32/ole2stubs.c
@@ -49,7 +49,7 @@
     return E_NOTIMPL;
 }
 
- 
+
 /***********************************************************************
  *               WriteFmtUserTypeStg (OLE32.160)
  */
@@ -94,7 +94,7 @@
 {
   HRESULT hres, hres1;
   IUnknown * pUnk = NULL;
-    
+
   FIXME("\n\t%s\n\t%s stub!\n", debugstr_guid(rclsid), debugstr_guid(riid));
 
   if (SUCCEEDED((hres = CoCreateInstance(rclsid, 0, CLSCTX_INPROC_SERVER, riid, (LPVOID*)&pUnk))))
@@ -211,7 +211,7 @@
  *           OleRegEnumFormatEtc    [OLE32.119]
  */
 HRESULT     WINAPI OleRegEnumFormatEtc (
-  REFCLSID clsid, 
+  REFCLSID clsid,
   DWORD    dwDirection,
   LPENUMFORMATETC* ppenumFormatetc)
 {
diff --git a/dlls/ole32/oleobj.c b/dlls/ole32/oleobj.c
index d5af7b9..80a90b4 100644
--- a/dlls/ole32/oleobj.c
+++ b/dlls/ole32/oleobj.c
@@ -86,7 +86,7 @@
   lpoah= (OleAdviseHolderImpl*)HeapAlloc(GetProcessHeap(),
 					 0,
 					 sizeof(OleAdviseHolderImpl));
-  
+
   ICOM_VTBL(lpoah) = &oahvt;
   lpoah->ref = 1;
   lpoah->maxSinks = INITIAL_SINKS;
@@ -118,11 +118,11 @@
       ptrToDestroy->arrayOfSinks[index] = NULL;
     }
   }
-  
+
   HeapFree(GetProcessHeap(),
 	   0,
 	   ptrToDestroy->arrayOfSinks);
-  
+
 
   HeapFree(GetProcessHeap(),
 	   0,
@@ -134,10 +134,10 @@
  */
 static HRESULT WINAPI OleAdviseHolderImpl_QueryInterface(
   LPOLEADVISEHOLDER iface,
-  REFIID            riid, 
+  REFIID            riid,
   LPVOID*           ppvObj)
 {
-  ICOM_THIS(OleAdviseHolderImpl, iface); 
+  ICOM_THIS(OleAdviseHolderImpl, iface);
   TRACE("(%p)->(%s,%p)\n",This,debugstr_guid(riid),ppvObj);
   /*
    * Sanity check
@@ -147,12 +147,12 @@
 
   *ppvObj = NULL;
 
-  if (IsEqualIID(riid, &IID_IUnknown)) 
+  if (IsEqualIID(riid, &IID_IUnknown))
   {
     /* IUnknown */
-    *ppvObj = This; 
+    *ppvObj = This;
   }
-  else if(IsEqualIID(riid, &IID_IOleAdviseHolder)) 
+  else if(IsEqualIID(riid, &IID_IOleAdviseHolder))
   {
     /* IOleAdviseHolder */
     *ppvObj = (IOleAdviseHolder*) This;
@@ -160,7 +160,7 @@
 
   if(*ppvObj == NULL)
     return E_NOINTERFACE;
-  
+
   /*
    * A successful QI always increments the reference count.
    */
@@ -175,8 +175,8 @@
 static ULONG WINAPI OleAdviseHolderImpl_AddRef(
   LPOLEADVISEHOLDER iface)
 {
-  ICOM_THIS(OleAdviseHolderImpl, iface); 
-  TRACE("(%p)->(ref=%ld)\n", This, This->ref); 
+  ICOM_THIS(OleAdviseHolderImpl, iface);
+  TRACE("(%p)->(ref=%ld)\n", This, This->ref);
   return ++(This->ref);
 }
 
@@ -186,8 +186,8 @@
 static ULONG WINAPI OleAdviseHolderImpl_Release(
   LPOLEADVISEHOLDER iface)
 {
-  ICOM_THIS(OleAdviseHolderImpl, iface); 
-  TRACE("(%p)->(ref=%ld)\n", This, This->ref); 
+  ICOM_THIS(OleAdviseHolderImpl, iface);
+  TRACE("(%p)->(ref=%ld)\n", This, This->ref);
   This->ref--;
 
   if (This->ref == 0)
@@ -209,8 +209,8 @@
   DWORD*            pdwConnection)
 {
   DWORD index;
-  
-  ICOM_THIS(OleAdviseHolderImpl, iface); 
+
+  ICOM_THIS(OleAdviseHolderImpl, iface);
 
   TRACE("(%p)->(%p, %p)\n", This, pAdvise, pdwConnection);
 
@@ -219,7 +219,7 @@
    */
   if (pdwConnection==NULL)
     return E_POINTER;
-  
+
   *pdwConnection = 0;
 
   /*
@@ -240,13 +240,13 @@
 
     This->maxSinks+=INITIAL_SINKS;
 
-    This->arrayOfSinks = HeapReAlloc(GetProcessHeap(), 
+    This->arrayOfSinks = HeapReAlloc(GetProcessHeap(),
 				     0,
 				     This->arrayOfSinks,
 				     This->maxSinks*sizeof(IAdviseSink*));
 
     for (i=index;i < This->maxSinks; i++)
-      This->arrayOfSinks[i]=0;      
+      This->arrayOfSinks[i]=0;
   }
 
   /*
@@ -271,24 +271,24 @@
  * OleAdviseHolderImpl_Unadvise
  */
 static HRESULT WINAPI OleAdviseHolderImpl_Unadvise(
-  LPOLEADVISEHOLDER iface, 
+  LPOLEADVISEHOLDER iface,
   DWORD             dwConnection)
 {
-  ICOM_THIS(OleAdviseHolderImpl, iface); 
+  ICOM_THIS(OleAdviseHolderImpl, iface);
 
   TRACE("(%p)->(%lu)\n", This, dwConnection);
 
   /*
-   * So we don't return 0 as a cookie, the index was 
+   * So we don't return 0 as a cookie, the index was
    * incremented by 1 in OleAdviseHolderImpl_Advise
    * we have to compensate.
    */
   dwConnection--;
-  
+
   /*
    * Check for invalid cookies.
    */
-  if ( (dwConnection < 0) || 
+  if ( (dwConnection < 0) ||
        (dwConnection >= This->maxSinks) )
     return OLE_E_NOCONNECTION;
 
@@ -310,7 +310,7 @@
 static HRESULT WINAPI
 OleAdviseHolderImpl_EnumAdvise (LPOLEADVISEHOLDER iface, IEnumSTATDATA **ppenumAdvise)
 {
-    ICOM_THIS(OleAdviseHolderImpl, iface); 
+    ICOM_THIS(OleAdviseHolderImpl, iface);
     FIXME("(%p)->(%p)\n", This, ppenumAdvise);
 
     *ppenumAdvise = NULL;
@@ -324,7 +324,7 @@
 static HRESULT WINAPI
 OleAdviseHolderImpl_SendOnRename (LPOLEADVISEHOLDER iface, IMoniker *pmk)
 {
-    ICOM_THIS(OleAdviseHolderImpl, iface); 
+    ICOM_THIS(OleAdviseHolderImpl, iface);
     FIXME("(%p)->(%p)\n", This, pmk);
 
 
@@ -337,7 +337,7 @@
 static HRESULT WINAPI
 OleAdviseHolderImpl_SendOnSave (LPOLEADVISEHOLDER iface)
 {
-    ICOM_THIS(OleAdviseHolderImpl, iface); 
+    ICOM_THIS(OleAdviseHolderImpl, iface);
     FIXME("(%p)\n", This);
 
     return S_OK;
@@ -349,7 +349,7 @@
 static HRESULT WINAPI
 OleAdviseHolderImpl_SendOnClose (LPOLEADVISEHOLDER iface)
 {
-    ICOM_THIS(OleAdviseHolderImpl, iface); 
+    ICOM_THIS(OleAdviseHolderImpl, iface);
     FIXME("(%p)\n", This);
 
 
@@ -363,7 +363,7 @@
   IAdviseSink *sink;
   FORMATETC fmat;
   DWORD advf;
-} DataAdviseConnection;  
+} DataAdviseConnection;
 
 typedef struct DataAdviseHolder
 {
@@ -383,27 +383,27 @@
 			    IDataAdviseHolder*      iface,
 			    REFIID                  riid,
 			    void**                  ppvObject);
-static ULONG WINAPI       DataAdviseHolder_AddRef( 
+static ULONG WINAPI       DataAdviseHolder_AddRef(
                             IDataAdviseHolder*      iface);
-static ULONG WINAPI       DataAdviseHolder_Release( 
+static ULONG WINAPI       DataAdviseHolder_Release(
                             IDataAdviseHolder*      iface);
-static HRESULT WINAPI     DataAdviseHolder_Advise( 
+static HRESULT WINAPI     DataAdviseHolder_Advise(
                             IDataAdviseHolder*      iface,
-			    IDataObject*            pDataObject, 
-			    FORMATETC*              pFetc, 
-			    DWORD                   advf, 
-			    IAdviseSink*            pAdvise, 
+			    IDataObject*            pDataObject,
+			    FORMATETC*              pFetc,
+			    DWORD                   advf,
+			    IAdviseSink*            pAdvise,
 			    DWORD*                  pdwConnection);
-static HRESULT WINAPI     DataAdviseHolder_Unadvise( 
+static HRESULT WINAPI     DataAdviseHolder_Unadvise(
                             IDataAdviseHolder*      iface,
 			    DWORD                   dwConnection);
-static HRESULT WINAPI     DataAdviseHolder_EnumAdvise( 
-                            IDataAdviseHolder*      iface,       
+static HRESULT WINAPI     DataAdviseHolder_EnumAdvise(
+                            IDataAdviseHolder*      iface,
 			    IEnumSTATDATA**         ppenumAdvise);
-static HRESULT WINAPI     DataAdviseHolder_SendOnDataChange( 
-                            IDataAdviseHolder*      iface, 
-			    IDataObject*            pDataObject, 
-			    DWORD                   dwReserved, 
+static HRESULT WINAPI     DataAdviseHolder_SendOnDataChange(
+                            IDataAdviseHolder*      iface,
+			    IDataObject*            pDataObject,
+			    DWORD                   dwReserved,
 			    DWORD                   advf);
 
 /**************************************************************************
@@ -431,13 +431,13 @@
   newHolder = (DataAdviseHolder*)HeapAlloc(GetProcessHeap(),
 					   0,
 					   sizeof(DataAdviseHolder));
-  
+
   ICOM_VTBL(newHolder) = &DataAdviseHolderImpl_VTable;
   newHolder->ref = 1;
   newHolder->maxCons = INITIAL_SINKS;
   newHolder->Connections = HeapAlloc(GetProcessHeap(),
 				     HEAP_ZERO_MEMORY,
-				     newHolder->maxCons * 
+				     newHolder->maxCons *
 				     sizeof(DataAdviseConnection));
 
   TRACE("returning %p\n", newHolder);
@@ -460,7 +460,7 @@
       ptrToDestroy->Connections[index].sink = NULL;
     }
   }
-  
+
   HeapFree(GetProcessHeap(), 0, ptrToDestroy->Connections);
   HeapFree(GetProcessHeap(), 0, ptrToDestroy);
 }
@@ -475,14 +475,14 @@
   REFIID                  riid,
   void**                  ppvObject)
 {
-  ICOM_THIS(DataAdviseHolder, iface); 
+  ICOM_THIS(DataAdviseHolder, iface);
   TRACE("(%p)->(%s,%p)\n",This,debugstr_guid(riid),ppvObject);
   /*
    * Perform a sanity check on the parameters.
    */
   if ( (This==0) || (ppvObject==0) )
     return E_INVALIDARG;
-  
+
   /*
    * Initialize the return parameter.
    */
@@ -496,7 +496,7 @@
   {
     *ppvObject = iface;
   }
-  
+
   /*
    * Check that we obtained an interface.
    */
@@ -504,14 +504,14 @@
   {
     return E_NOINTERFACE;
   }
-  
+
   /*
    * Query Interface always increases the reference count by one when it is
-   * successful. 
+   * successful.
    */
   IUnknown_AddRef((IUnknown*)*ppvObject);
 
-  return S_OK;;  
+  return S_OK;
 }
 
 /************************************************************************
@@ -519,10 +519,10 @@
  *
  * See Windows documentation for more details on IUnknown methods.
  */
-static ULONG WINAPI       DataAdviseHolder_AddRef(                             
+static ULONG WINAPI       DataAdviseHolder_AddRef(
   IDataAdviseHolder*      iface)
 {
-  ICOM_THIS(DataAdviseHolder, iface); 
+  ICOM_THIS(DataAdviseHolder, iface);
   TRACE("(%p) (ref=%ld)\n", This, This->ref);
   This->ref++;
 
@@ -534,7 +534,7 @@
  *
  * See Windows documentation for more details on IUnknown methods.
  */
-static ULONG WINAPI DataAdviseHolder_Release( 
+static ULONG WINAPI DataAdviseHolder_Release(
   IDataAdviseHolder*      iface)
 {
   ICOM_THIS(DataAdviseHolder, iface);
@@ -554,7 +554,7 @@
 
     return 0;
   }
-  
+
   return This->ref;
 }
 
@@ -564,15 +564,15 @@
  */
 static HRESULT WINAPI DataAdviseHolder_Advise(
   IDataAdviseHolder*      iface,
-  IDataObject*            pDataObject, 
-  FORMATETC*              pFetc, 
-  DWORD                   advf, 
-  IAdviseSink*            pAdvise, 
+  IDataObject*            pDataObject,
+  FORMATETC*              pFetc,
+  DWORD                   advf,
+  IAdviseSink*            pAdvise,
   DWORD*                  pdwConnection)
 {
   DWORD index;
-  
-  ICOM_THIS(DataAdviseHolder, iface); 
+
+  ICOM_THIS(DataAdviseHolder, iface);
 
   TRACE("(%p)->(%p, %p, %08lx, %p, %p)\n", This, pDataObject, pFetc, advf,
 	pAdvise, pdwConnection);
@@ -581,7 +581,7 @@
    */
   if (pdwConnection==NULL)
     return E_POINTER;
-  
+
   *pdwConnection = 0;
 
   /*
@@ -629,25 +629,25 @@
 /******************************************************************************
  * DataAdviseHolder_Unadvise
  */
-static HRESULT WINAPI     DataAdviseHolder_Unadvise( 
+static HRESULT WINAPI     DataAdviseHolder_Unadvise(
   IDataAdviseHolder*      iface,
   DWORD                   dwConnection)
 {
-  ICOM_THIS(DataAdviseHolder, iface); 
+  ICOM_THIS(DataAdviseHolder, iface);
 
   TRACE("(%p)->(%lu)\n", This, dwConnection);
 
   /*
-   * So we don't return 0 as a cookie, the index was 
+   * So we don't return 0 as a cookie, the index was
    * incremented by 1 in OleAdviseHolderImpl_Advise
    * we have to compensate.
    */
   dwConnection--;
-  
+
   /*
    * Check for invalid cookies.
    */
-  if ( (dwConnection < 0) || 
+  if ( (dwConnection < 0) ||
        (dwConnection >= This->maxCons) )
     return OLE_E_NOCONNECTION;
 
@@ -662,11 +662,11 @@
   return S_OK;
 }
 
-static HRESULT WINAPI     DataAdviseHolder_EnumAdvise( 
-  IDataAdviseHolder*      iface,       
+static HRESULT WINAPI     DataAdviseHolder_EnumAdvise(
+  IDataAdviseHolder*      iface,
   IEnumSTATDATA**         ppenumAdvise)
 {
-  ICOM_THIS(DataAdviseHolder, iface); 
+  ICOM_THIS(DataAdviseHolder, iface);
 
   FIXME("(%p)->(%p)\n", This, ppenumAdvise);
   return E_NOTIMPL;
@@ -675,13 +675,13 @@
 /******************************************************************************
  * DataAdviseHolder_SendOnDataChange
  */
-static HRESULT WINAPI     DataAdviseHolder_SendOnDataChange( 
-  IDataAdviseHolder*      iface, 
-  IDataObject*            pDataObject, 
-  DWORD                   dwReserved, 
+static HRESULT WINAPI     DataAdviseHolder_SendOnDataChange(
+  IDataAdviseHolder*      iface,
+  IDataObject*            pDataObject,
+  DWORD                   dwReserved,
   DWORD                   advf)
 {
-  ICOM_THIS(DataAdviseHolder, iface); 
+  ICOM_THIS(DataAdviseHolder, iface);
   DWORD index;
   STGMEDIUM stg;
   HRESULT res;
diff --git a/dlls/ole32/oleproxy.c b/dlls/ole32/oleproxy.c
index 8ca812f..d366ad8 100644
--- a/dlls/ole32/oleproxy.c
+++ b/dlls/ole32/oleproxy.c
@@ -249,8 +249,8 @@
     return S_OK;
 }
 
-/* Since we create proxy buffers and classfactory in a pair, there is 
- * no need for 2 seperate structs. Just put them in one, but remember 
+/* Since we create proxy buffers and classfactory in a pair, there is
+ * no need for 2 seperate structs. Just put them in one, but remember
  * the refcount.
  */
 typedef struct _CFProxy {
@@ -347,7 +347,7 @@
 
     TRACE("(%p,%s,%p)\n",pUnkOuter,debugstr_guid(riid),ppv);
 
-    /* Send CreateInstance to the remote classfactory. 
+    /* Send CreateInstance to the remote classfactory.
      *
      * Data: Only the 'IID'.
      */
@@ -436,7 +436,7 @@
 static HRESULT WINAPI
 PSFacBuf_QueryInterface(LPPSFACTORYBUFFER iface, REFIID iid, LPVOID *ppv) {
     if (IsEqualIID(iid,&IID_IPSFactoryBuffer)||IsEqualIID(iid,&IID_IUnknown)) {
-	*ppv = (LPVOID)iface; 
+	*ppv = (LPVOID)iface;
 	/* No ref counting, static class */
 	return S_OK;
     }
@@ -497,7 +497,7 @@
     *ppv = NULL;
     if (IsEqualIID(rclsid,&CLSID_PSFactoryBuffer)) {
 	*ppv = &lppsfac;
-	/* If we create a ps factory, we might need a stub manager later 
+	/* If we create a ps factory, we might need a stub manager later
 	 * anyway
 	 */
 	STUBMGR_Start();
diff --git a/dlls/ole32/rpc.c b/dlls/ole32/rpc.c
index 2eeafbc..2ff255e 100644
--- a/dlls/ole32/rpc.c
+++ b/dlls/ole32/rpc.c
@@ -187,7 +187,7 @@
   return NULL;
 }
 
-static HRESULT 
+static HRESULT
 RPC_GetRequest(wine_rpc_request **req) {
     static int reqid = 0xdeadbeef;
     int i;
@@ -538,7 +538,7 @@
       CloseHandle(hPipe);
       break;
   }
-  if (tries>=MAXTRIES) 
+  if (tries>=MAXTRIES)
       return E_NOINTERFACE;
   hres = CreateStreamOnHGlobal(0,TRUE,&pStm);
   if (hres) return hres;
diff --git a/dlls/ole32/stg_bigblockfile.c b/dlls/ole32/stg_bigblockfile.c
index e5957d1..c425ecf 100644
--- a/dlls/ole32/stg_bigblockfile.c
+++ b/dlls/ole32/stg_bigblockfile.c
@@ -2,15 +2,15 @@
  *
  * BigBlockFile
  *
- * This is the implementation of a file that consists of blocks of 
+ * This is the implementation of a file that consists of blocks of
  * a predetermined size.
- * This class is used in the Compound File implementation of the 
- * IStorage and IStream interfaces. It provides the functionality 
- * to read and write any blocks in the file as well as setting and 
+ * This class is used in the Compound File implementation of the
+ * IStorage and IStream interfaces. It provides the functionality
+ * to read and write any blocks in the file as well as setting and
  * obtaining the size of the file.
  * The blocks are indexed sequentially from the start of the file
  * starting with -1.
- * 
+ *
  * TODO:
  * - Support for a transacted mode
  *
@@ -72,7 +72,7 @@
 
 /***
  * This structure identifies the paged that are mapped
- * from the file and their position in memory. It is 
+ * from the file and their position in memory. It is
  * also used to hold a reference count to those pages.
  *
  * page_index identifies which PAGE_SIZE chunk from the
@@ -105,7 +105,7 @@
 static void*     BIGBLOCKFILE_GetBigBlockPointer(LPBIGBLOCKFILE This,
                                                  ULONG          index,
                                                  DWORD          desired_access);
-static MappedPage* BIGBLOCKFILE_GetPageFromPointer(LPBIGBLOCKFILE This, 
+static MappedPage* BIGBLOCKFILE_GetPageFromPointer(LPBIGBLOCKFILE This,
 						   void*         pBlock);
 static MappedPage* BIGBLOCKFILE_CreatePage(LPBIGBLOCKFILE This,
 					   ULONG page_index);
@@ -153,7 +153,7 @@
 /******************************************************************************
  *      BIGBLOCKFILE_Construct
  *
- * Construct a big block file. Create the file mapping object. 
+ * Construct a big block file. Create the file mapping object.
  * Create the read only mapped pages list, the writable mapped page list
  * and the blocks in use list.
  */
@@ -326,7 +326,7 @@
 
   /*
    * validate the block index
-   * 
+   *
    */
   if (This->blocksize * (index + 1)
       > ROUND_UP(This->filesize.s.LowPart, This->blocksize))
@@ -396,7 +396,7 @@
  *      BIGBLOCKFILE_SetSize
  *
  * Sets the size of the file.
- * 
+ *
  */
 void BIGBLOCKFILE_SetSize(LPBIGBLOCKFILE This, ULARGE_INTEGER newSize)
 {
@@ -408,7 +408,7 @@
    * unmap all views, must be done before call to SetEndFile
    */
   BIGBLOCKFILE_UnmapAllMappedPages(This);
-  
+
   if (This->fileBased)
   {
     char buf[10];
@@ -426,7 +426,7 @@
      * to that dir: crash.
      *
      * The problem is that the SetFilePointer-SetEndOfFile combo below
-     * doesn't always succeed. The file is not grown. It seems like the 
+     * doesn't always succeed. The file is not grown. It seems like the
      * operation is cached. By doing the WriteFile, the file is actually
      * grown on disk.
      * This hack is only needed when saving to smbfs.
@@ -435,7 +435,7 @@
     SetFilePointer(This->hfile, newSize.s.LowPart, NULL, FILE_BEGIN);
     WriteFile(This->hfile, buf, 10, NULL, NULL);
     /*
-     * END HACK 
+     * END HACK
      */
 
     /*
@@ -443,14 +443,14 @@
      */
     SetFilePointer(This->hfile, newSize.s.LowPart, NULL, FILE_BEGIN);
     SetEndOfFile(This->hfile);
-  
+
     /*
      * re-create the file mapping object
      */
     This->hfilemap = CreateFileMappingA(This->hfile,
                                         NULL,
                                         This->flProtect,
-                                        0, 0, 
+                                        0, 0,
                                         NULL);
   }
   else
@@ -479,7 +479,7 @@
  *      BIGBLOCKFILE_GetSize
  *
  * Returns the size of the file.
- * 
+ *
  */
 ULARGE_INTEGER BIGBLOCKFILE_GetSize(LPBIGBLOCKFILE This)
 {
@@ -522,8 +522,8 @@
  * Returns a pointer to the specified block.
  */
 static void* BIGBLOCKFILE_GetBigBlockPointer(
-  LPBIGBLOCKFILE This, 
-  ULONG          block_index, 
+  LPBIGBLOCKFILE This,
+  ULONG          block_index,
   DWORD          desired_access)
 {
     DWORD page_index = block_index / BLOCKS_PER_PAGE;
diff --git a/dlls/ole32/stg_stream.c b/dlls/ole32/stg_stream.c
index 0c1f3a3..4b24d27 100644
--- a/dlls/ole32/stg_stream.c
+++ b/dlls/ole32/stg_stream.c
@@ -78,7 +78,7 @@
   StgStreamImpl* newStream;
 
   newStream = HeapAlloc(GetProcessHeap(), 0, sizeof(StgStreamImpl));
-  
+
   if (newStream!=0)
   {
     /*
@@ -86,7 +86,7 @@
      */
     ICOM_VTBL(newStream) = &StgStreamImpl_Vtbl;
     newStream->ref       = 0;
-    
+
     /*
      * We want to nail-down the reference to the storage in case the
      * stream out-lives the storage in the client application.
@@ -94,15 +94,15 @@
     newStream->parentStorage = parentStorage;
     IStorage_AddRef((IStorage*)newStream->parentStorage);
 
-    newStream->grfMode = grfMode;    
+    newStream->grfMode = grfMode;
     newStream->ownerProperty = ownerProperty;
-    
+
     /*
      * Start the stream at the beginning.
      */
     newStream->currentPosition.s.HighPart = 0;
     newStream->currentPosition.s.LowPart = 0;
-    
+
     /*
      * Initialize the rest of the data.
      */
@@ -110,21 +110,21 @@
     newStream->streamSize.s.LowPart  = 0;
     newStream->bigBlockChain       = 0;
     newStream->smallBlockChain     = 0;
-    
+
     /*
      * Read the size from the property and determine if the blocks forming
      * this stream are large or small.
      */
     StgStreamImpl_OpenBlockChain(newStream);
   }
-  
+
   return newStream;
 }
 
 /***
  * This is the destructor of the StgStreamImpl class.
  *
- * This method will clean-up all the resources used-up by the given StgStreamImpl 
+ * This method will clean-up all the resources used-up by the given StgStreamImpl
  * class. The pointer passed-in to this function will be freed and will not
  * be valid anymore.
  */
@@ -156,7 +156,7 @@
   /*
    * Finally, free the memory used-up by the class.
    */
-  HeapFree(GetProcessHeap(), 0, This);  
+  HeapFree(GetProcessHeap(), 0, This);
 }
 
 /***
@@ -165,8 +165,8 @@
  */
 HRESULT WINAPI StgStreamImpl_QueryInterface(
 		  IStream*     iface,
-		  REFIID         riid,	      /* [in] */          
-		  void**         ppvObject)   /* [iid_is][out] */ 
+		  REFIID         riid,	      /* [in] */
+		  void**         ppvObject)   /* [iid_is][out] */
 {
   StgStreamImpl* const This=(StgStreamImpl*)iface;
 
@@ -175,37 +175,37 @@
    */
   if (ppvObject==0)
     return E_INVALIDARG;
-  
+
   /*
    * Initialize the return parameter.
    */
   *ppvObject = 0;
-  
+
   /*
    * Compare the riid with the interface IDs implemented by this object.
    */
-  if (memcmp(&IID_IUnknown, riid, sizeof(IID_IUnknown)) == 0) 
+  if (memcmp(&IID_IUnknown, riid, sizeof(IID_IUnknown)) == 0)
   {
     *ppvObject = (IStream*)This;
   }
-  else if (memcmp(&IID_IStream, riid, sizeof(IID_IStream)) == 0) 
+  else if (memcmp(&IID_IStream, riid, sizeof(IID_IStream)) == 0)
   {
     *ppvObject = (IStream*)This;
   }
-  
+
   /*
    * Check that we obtained an interface.
    */
   if ((*ppvObject)==0)
     return E_NOINTERFACE;
-  
+
   /*
    * Query Interface always increases the reference count by one when it is
    * successful
    */
   StgStreamImpl_AddRef(iface);
-  
-  return S_OK;;
+
+  return S_OK;
 }
 
 /***
@@ -218,7 +218,7 @@
   StgStreamImpl* const This=(StgStreamImpl*)iface;
 
   This->ref++;
-  
+
   return This->ref;
 }
 
@@ -232,11 +232,11 @@
   StgStreamImpl* const This=(StgStreamImpl*)iface;
 
   ULONG newRef;
-  
+
   This->ref--;
-  
+
   newRef = This->ref;
-  
+
   /*
    * If the reference count goes down to 0, perform suicide.
    */
@@ -244,7 +244,7 @@
   {
     StgStreamImpl_Destroy(This);
   }
-  
+
   return newRef;
 }
 
@@ -280,16 +280,16 @@
   readSucessful = StorageImpl_ReadProperty(This->parentStorage->ancestorStorage,
 					     This->ownerProperty,
 					     &curProperty);
-  
+
   if (readSucessful)
   {
     This->streamSize = curProperty.size;
-    
+
     /*
      * This code supports only streams that are <32 bits in size.
      */
     assert(This->streamSize.s.HighPart == 0);
-    
+
     if(curProperty.startingBlock == BLOCK_END_OF_CHAIN)
     {
       assert( (This->streamSize.s.HighPart == 0) && (This->streamSize.s.LowPart == 0) );
@@ -300,7 +300,7 @@
 	   (This->streamSize.s.LowPart < LIMIT_TO_USE_SMALL_BLOCK) )
       {
 	This->smallBlockChain = SmallBlockChainStream_Construct(
-								This->parentStorage->ancestorStorage,	
+								This->parentStorage->ancestorStorage,
 								This->ownerProperty);
       }
       else
@@ -323,11 +323,11 @@
  *
  * See the documentation of ISequentialStream for more info.
  */
-HRESULT WINAPI StgStreamImpl_Read( 
+HRESULT WINAPI StgStreamImpl_Read(
 		  IStream*     iface,
 		  void*          pv,        /* [length_is][size_is][out] */
-		  ULONG          cb,        /* [in] */                     
-		  ULONG*         pcbRead)   /* [out] */                    
+		  ULONG          cb,        /* [in] */
+		  ULONG*         pcbRead)   /* [out] */
 {
   StgStreamImpl* const This=(StgStreamImpl*)iface;
 
@@ -338,19 +338,19 @@
   TRACE("(%p, %p, %ld, %p)\n",
 	iface, pv, cb, pcbRead);
 
-  /* 
+  /*
    * If the caller is not interested in the number of bytes read,
    * we use another buffer to avoid "if" statements in the code.
    */
   if (pcbRead==0)
     pcbRead = &bytesReadBuffer;
-  
+
   /*
    * Using the known size of the stream, calculate the number of bytes
    * to read from the block chain
    */
   bytesToReadFromBuffer = min( This->streamSize.s.LowPart - This->currentPosition.s.LowPart, cb);
-  
+
   /*
    * Depending on the type of chain that was opened when the stream was constructed,
    * we delegate the work to the method that reads the block chains.
@@ -362,7 +362,7 @@
 				 bytesToReadFromBuffer,
 				 pv,
 				 pcbRead);
-    
+
   }
   else if (This->bigBlockChain!=0)
   {
@@ -394,7 +394,7 @@
    * Advance the pointer for the number of positions read.
    */
   This->currentPosition.s.LowPart += *pcbRead;
-  
+
   if(*pcbRead != cb)
   {
     WARN("read %ld instead of the required %ld bytes !\n", *pcbRead, cb);
@@ -408,12 +408,12 @@
   }
   else
     res = S_OK;
-  
+
 end:
   TRACE("<-- %08lx\n", res);
   return res;
 }
-        
+
 /***
  * This method is part of the ISequentialStream interface.
  *
@@ -426,9 +426,9 @@
  */
 HRESULT WINAPI StgStreamImpl_Write(
 	          IStream*     iface,
-		  const void*    pv,          /* [size_is][in] */ 
-		  ULONG          cb,          /* [in] */          
-		  ULONG*         pcbWritten)  /* [out] */         
+		  const void*    pv,          /* [size_is][in] */
+		  ULONG          cb,          /* [in] */
+		  ULONG*         pcbWritten)  /* [out] */
 {
   StgStreamImpl* const This=(StgStreamImpl*)iface;
 
@@ -437,7 +437,7 @@
 
   TRACE("(%p, %p, %ld, %p)\n",
 	iface, pv, cb, pcbWritten);
- 
+
   /*
    * Do we have permission to write to this stream?
    */
@@ -451,7 +451,7 @@
    */
   if (pcbWritten == 0)
     pcbWritten = &bytesWritten;
-  
+
   /*
    * Initialize the out parameter
    */
@@ -466,7 +466,7 @@
     newSize.s.HighPart = 0;
     newSize.s.LowPart = This->currentPosition.s.LowPart + cb;
   }
-  
+
   /*
    * Verify if we need to grow the stream
    */
@@ -475,7 +475,7 @@
     /* grow stream */
     IStream_SetSize(iface, newSize);
   }
-  
+
   /*
    * Depending on the type of chain that was opened when the stream was constructed,
    * we delegate the work to the method that readwrites to the block chains.
@@ -487,7 +487,7 @@
 				  cb,
 				  pv,
 				  pcbWritten);
-    
+
   }
   else if (This->bigBlockChain!=0)
   {
@@ -499,12 +499,12 @@
   }
   else
     assert(FALSE);
-  
+
   /*
    * Advance the position pointer for the number of positions written.
    */
   This->currentPosition.s.LowPart += *pcbWritten;
-  
+
   return S_OK;
 }
 
@@ -515,11 +515,11 @@
  * given.
  *
  * See the documentation of IStream for more info.
- */        
-HRESULT WINAPI StgStreamImpl_Seek( 
+ */
+HRESULT WINAPI StgStreamImpl_Seek(
 		  IStream*      iface,
-		  LARGE_INTEGER   dlibMove,         /* [in] */ 
-		  DWORD           dwOrigin,         /* [in] */ 
+		  LARGE_INTEGER   dlibMove,         /* [in] */
+		  DWORD           dwOrigin,         /* [in] */
 		  ULARGE_INTEGER* plibNewPosition) /* [out] */
 {
   StgStreamImpl* const This=(StgStreamImpl*)iface;
@@ -529,7 +529,7 @@
   TRACE("(%p, %ld, %ld, %p)\n",
 	iface, dlibMove.s.LowPart, dwOrigin, plibNewPosition);
 
-  /* 
+  /*
    * The caller is allowed to pass in NULL as the new position return value.
    * If it happens, we assign it to a dynamic variable to avoid special cases
    * in the code below.
@@ -565,7 +565,7 @@
    * tell the caller what we calculated
    */
   This->currentPosition = *plibNewPosition;
- 
+
   return S_OK;
 }
 
@@ -578,9 +578,9 @@
  *
  * See the documentation of IStream for more info.
  */
-HRESULT WINAPI StgStreamImpl_SetSize( 
+HRESULT WINAPI StgStreamImpl_SetSize(
 				     IStream*      iface,
-				     ULARGE_INTEGER  libNewSize)   /* [in] */ 
+				     ULARGE_INTEGER  libNewSize)   /* [in] */
 {
   StgStreamImpl* const This=(StgStreamImpl*)iface;
 
@@ -629,11 +629,11 @@
    */
   Success = StorageImpl_ReadProperty(This->parentStorage->ancestorStorage,
                                        This->ownerProperty,
-                                       &curProperty); 
+                                       &curProperty);
   /*
    * Determine if we have to switch from small to big blocks or vice versa
-   */  
-  if ( (This->smallBlockChain!=0) && 
+   */
+  if ( (This->smallBlockChain!=0) &&
        (curProperty.size.s.LowPart < LIMIT_TO_USE_SMALL_BLOCK) )
   {
     if (libNewSize.s.LowPart >= LIMIT_TO_USE_SMALL_BLOCK)
@@ -665,19 +665,19 @@
 
   curProperty.size.s.HighPart = libNewSize.s.HighPart;
   curProperty.size.s.LowPart = libNewSize.s.LowPart;
-  
+
   if (Success)
   {
     StorageImpl_WriteProperty(This->parentStorage->ancestorStorage,
 				This->ownerProperty,
 				&curProperty);
   }
-  
+
   This->streamSize = libNewSize;
-  
+
   return S_OK;
 }
-        
+
 /***
  * This method is part of the IStream interface.
  *
@@ -685,12 +685,12 @@
  *
  * See the documentation of IStream for more info.
  */
-HRESULT WINAPI StgStreamImpl_CopyTo( 
+HRESULT WINAPI StgStreamImpl_CopyTo(
 				    IStream*      iface,
-				    IStream*      pstm,         /* [unique][in] */ 
-				    ULARGE_INTEGER  cb,           /* [in] */         
-				    ULARGE_INTEGER* pcbRead,      /* [out] */        
-				    ULARGE_INTEGER* pcbWritten)   /* [out] */        
+				    IStream*      pstm,         /* [unique][in] */
+				    ULARGE_INTEGER  cb,           /* [in] */
+				    ULARGE_INTEGER* pcbRead,      /* [out] */
+				    ULARGE_INTEGER* pcbWritten)   /* [out] */
 {
   HRESULT        hr = S_OK;
   BYTE           tmpBuffer[128];
@@ -698,7 +698,7 @@
   ULARGE_INTEGER totalBytesRead;
   ULARGE_INTEGER totalBytesWritten;
 
-  TRACE("(%p, %p, %ld, %p, %p)\n", 
+  TRACE("(%p, %p, %ld, %p, %p)\n",
 	iface, pstm, cb.s.LowPart, pcbRead, pcbWritten);
 
   /*
@@ -721,11 +721,11 @@
       copySize = 128;
     else
       copySize = cb.s.LowPart;
-    
+
     IStream_Read(iface, tmpBuffer, copySize, &bytesRead);
 
     totalBytesRead.s.LowPart += bytesRead;
-    
+
     IStream_Write(pstm, tmpBuffer, bytesRead, &bytesWritten);
 
     totalBytesWritten.s.LowPart += bytesWritten;
@@ -738,7 +738,7 @@
       hr = STG_E_MEDIUMFULL;
       break;
     }
-    
+
     if (bytesRead!=copySize)
       cb.s.LowPart = 0;
     else
@@ -769,10 +769,10 @@
  * does nothing. This is what the documentation tells us.
  *
  * See the documentation of IStream for more info.
- */        
-HRESULT WINAPI StgStreamImpl_Commit( 
+ */
+HRESULT WINAPI StgStreamImpl_Commit(
 		  IStream*      iface,
-		  DWORD           grfCommitFlags)  /* [in] */ 
+		  DWORD           grfCommitFlags)  /* [in] */
 {
   return S_OK;
 }
@@ -784,28 +784,28 @@
  * does nothing. This is what the documentation tells us.
  *
  * See the documentation of IStream for more info.
- */        
-HRESULT WINAPI StgStreamImpl_Revert( 
+ */
+HRESULT WINAPI StgStreamImpl_Revert(
 		  IStream* iface)
 {
   return S_OK;
 }
 
-HRESULT WINAPI StgStreamImpl_LockRegion( 
+HRESULT WINAPI StgStreamImpl_LockRegion(
 					IStream*     iface,
-					ULARGE_INTEGER libOffset,   /* [in] */ 
-					ULARGE_INTEGER cb,          /* [in] */ 
-					DWORD          dwLockType)  /* [in] */ 
+					ULARGE_INTEGER libOffset,   /* [in] */
+					ULARGE_INTEGER cb,          /* [in] */
+					DWORD          dwLockType)  /* [in] */
 {
   FIXME("not implemented!\n");
   return E_NOTIMPL;
 }
 
-HRESULT WINAPI StgStreamImpl_UnlockRegion( 
+HRESULT WINAPI StgStreamImpl_UnlockRegion(
 					  IStream*     iface,
-					  ULARGE_INTEGER libOffset,   /* [in] */ 
-					  ULARGE_INTEGER cb,          /* [in] */ 
-					  DWORD          dwLockType)  /* [in] */ 
+					  ULARGE_INTEGER libOffset,   /* [in] */
+					  ULARGE_INTEGER cb,          /* [in] */
+					  DWORD          dwLockType)  /* [in] */
 {
   FIXME("not implemented!\n");
   return E_NOTIMPL;
@@ -818,38 +818,38 @@
  * stream.
  *
  * See the documentation of IStream for more info.
- */        
-HRESULT WINAPI StgStreamImpl_Stat( 
+ */
+HRESULT WINAPI StgStreamImpl_Stat(
 		  IStream*     iface,
 		  STATSTG*       pstatstg,     /* [out] */
-		  DWORD          grfStatFlag)  /* [in] */ 
+		  DWORD          grfStatFlag)  /* [in] */
 {
   StgStreamImpl* const This=(StgStreamImpl*)iface;
 
   StgProperty    curProperty;
   BOOL         readSucessful;
-  
+
   /*
    * Read the information from the property.
    */
   readSucessful = StorageImpl_ReadProperty(This->parentStorage->ancestorStorage,
 					     This->ownerProperty,
 					     &curProperty);
-  
+
   if (readSucessful)
   {
-    StorageUtl_CopyPropertyToSTATSTG(pstatstg, 
-				     &curProperty, 
+    StorageUtl_CopyPropertyToSTATSTG(pstatstg,
+				     &curProperty,
 				     grfStatFlag);
 
     pstatstg->grfMode = This->grfMode;
-    
+
     return S_OK;
   }
-  
+
   return E_FAIL;
 }
-        
+
 /***
  * This method is part of the IStream interface.
  *
@@ -861,10 +861,10 @@
  * I am not totally sure what I am doing here but I presume that this
  * should be basically as simple as creating a new stream with the same
  * parent etc and positioning its seek cursor.
- */        
-HRESULT WINAPI StgStreamImpl_Clone( 
+ */
+HRESULT WINAPI StgStreamImpl_Clone(
 				   IStream*     iface,
-				   IStream**    ppstm) /* [out] */ 
+				   IStream**    ppstm) /* [out] */
 {
   StgStreamImpl* const This=(StgStreamImpl*)iface;
   HRESULT hres;
@@ -884,9 +884,9 @@
 
   *ppstm = (IStream*) new_stream;
   seek_pos.QuadPart = This->currentPosition.QuadPart;
-  
+
   hres=StgStreamImpl_Seek (*ppstm, seek_pos, STREAM_SEEK_SET, NULL);
-  
+
   assert (SUCCEEDED(hres));
 
   return S_OK;
diff --git a/dlls/ole32/storage.c b/dlls/ole32/storage.c
index d861fff..ac9c791 100644
--- a/dlls/ole32/storage.c
+++ b/dlls/ole32/storage.c
@@ -141,7 +141,7 @@
 	struct	storage_header	sth;
 
 	READ_HEADER;
-	
+
 	assert(blocknr>>7<sth.num_of_bbd_blocks);
 	if (sth.bbd_list[blocknr>>7]==0xffffffff)
 		return -5;
@@ -161,7 +161,7 @@
 	struct storage_header sth;
 
 	READ_HEADER;
-	
+
 	assert(blocknr>=0);
 	while (nr--) {
 		assert((blocknr>>7)<sth.num_of_bbd_blocks);
@@ -397,7 +397,7 @@
 /******************************************************************************
  * STORAGE_init_storage [INTERNAL]
  */
-static BOOL 
+static BOOL
 STORAGE_init_storage(HFILE hf) {
 	BYTE	block[BIGSIZE];
 	LPDWORD	bbs;
@@ -503,7 +503,7 @@
 /******************************************************************************
  *		STORAGE_get_free_big_blocknr	[Internal]
  */
-static int 
+static int
 STORAGE_get_free_big_blocknr(HFILE hf) {
 	BYTE	block[BIGSIZE];
 	LPINT	sbd = (LPINT)block;
@@ -529,8 +529,8 @@
 		bigblocknr = sth.bbd_list[++curblock];
 	}
 	bigblocknr = curblock*128;
-	/* since we have marked all blocks from 0 up to curblock*128-1 
-	 * the next free one is curblock*128, where we happily put our 
+	/* since we have marked all blocks from 0 up to curblock*128-1
+	 * the next free one is curblock*128, where we happily put our
 	 * next large block depot.
 	 */
 	memset(block,0xff,sizeof(block));
@@ -539,7 +539,7 @@
 	assert(STORAGE_put_big_block(hf,bigblocknr,block));
 
 	/* if we had a bbd block already (mostlikely) we need
-	 * to link the new one into the chain 
+	 * to link the new one into the chain
 	 */
 	if (lastbigblocknr!=-1)
 		assert(STORAGE_set_big_chain(hf,lastbigblocknr,bigblocknr));
@@ -550,7 +550,7 @@
 
 	/* Set the end of the chain for the bigblockdepots */
 	assert(STORAGE_set_big_chain(hf,bigblocknr,STORAGE_CHAINENTRY_ENDOFCHAIN));
-	/* add 1, for the first entry is used for the additional big block 
+	/* add 1, for the first entry is used for the additional big block
 	 * depot. (means we already used bigblocknr) */
 	memset(block,0x42,sizeof(block));
 	/* allocate this block (filled with 0x42) */
@@ -562,7 +562,7 @@
 /******************************************************************************
  *		STORAGE_get_free_small_blocknr	[Internal]
  */
-static int 
+static int
 STORAGE_get_free_small_blocknr(HFILE hf) {
 	BYTE	block[BIGSIZE];
 	LPINT	sbd = (LPINT)block;
@@ -658,7 +658,7 @@
 	while (blocknr>=0) {
 		if (!STORAGE_get_big_block(hf,blocknr,block))
 			return -1;
-		for (i=0;i<4;i++) 
+		for (i=0;i<4;i++)
 			if (stde[i].pps_sizeofname==0) /* free */
 				return curblock*4+i;
 		lastblocknr = blocknr;
@@ -670,7 +670,7 @@
 	/* sth invalidated */
 	if (blocknr<0)
 		return -1;
-	
+
 	if (!STORAGE_set_big_chain(hf,lastblocknr,blocknr))
 		return -1;
 	if (!STORAGE_set_big_chain(hf,blocknr,STORAGE_CHAINENTRY_ENDOFCHAIN))
@@ -708,7 +708,7 @@
 		return 0;
 	}
 	return OLE_E_ENUM_NOMORE;
-	
+
 }
 
 /******************************************************************************
@@ -809,7 +809,7 @@
 			   WARN("small block read failed!!!\n");
 				return E_FAIL;
 			}
-			cc = cb; 
+			cc = cb;
 			if (cc>SMALLSIZE-(This->offset.s.LowPart&(SMALLSIZE-1)))
 				cc=SMALLSIZE-(This->offset.s.LowPart&(SMALLSIZE-1));
 			memcpy((LPBYTE)pv,block+(This->offset.s.LowPart&(SMALLSIZE-1)),cc);
@@ -829,7 +829,7 @@
 				WARN("big block read failed!!!\n");
 				return E_FAIL;
 			}
-			cc = cb; 
+			cc = cb;
 			if (cc>BIGSIZE-(This->offset.s.LowPart&(BIGSIZE-1)))
 				cc=BIGSIZE-(This->offset.s.LowPart&(BIGSIZE-1));
 			memcpy((LPBYTE)pv,block+(This->offset.s.LowPart&(BIGSIZE-1)),cc);
@@ -881,7 +881,7 @@
 				if (!STORAGE_set_big_chain(hf,blocknr,STORAGE_CHAINENTRY_ENDOFCHAIN))
 					return E_FAIL;
 			} else {
-				/* Migrate large blocks to small blocks 
+				/* Migrate large blocks to small blocks
 				 * (we just migrate newsize bytes)
 				 */
 				LPBYTE	curdata,data = HeapAlloc(GetProcessHeap(),0,newsize+BIGSIZE);
@@ -1190,7 +1190,7 @@
 		return 0;
 	}
 	return OLE_E_ENUM_NOMORE;
-	
+
 }
 
 /******************************************************************************
@@ -1660,8 +1660,8 @@
 /******************************************************************************
  * StgIsStorageFile [OLE32.146]
  */
-HRESULT WINAPI 
-StgIsStorageFile(LPCOLESTR fn) 
+HRESULT WINAPI
+StgIsStorageFile(LPCOLESTR fn)
 {
     HRESULT ret;
     DWORD len = WideCharToMultiByte( CP_ACP, 0, fn, -1, NULL, 0, NULL, NULL );
@@ -1712,7 +1712,7 @@
 		return E_FAIL;
 	}
 	return S_OK;
-	
+
 }
 
 
diff --git a/dlls/ole32/storage32.c b/dlls/ole32/storage32.c
index c73e407..2e35ed2 100644
--- a/dlls/ole32/storage32.c
+++ b/dlls/ole32/storage32.c
@@ -54,7 +54,7 @@
 
 /* OLESTREAM memory structure to use for Get and Put Routines */
 /* Used for OleConvertIStorageToOLESTREAM and OleConvertOLESTREAMToIStorage */
-typedef struct 
+typedef struct
 {
     DWORD dwOleID;
     DWORD dwTypeID;
@@ -92,7 +92,7 @@
     BYTE byUnknown1[28];
     DWORD dwExtentX;
     DWORD dwExtentY;
-    DWORD dwSize;  
+    DWORD dwSize;
     BYTE *pData;
 }OLECONVERT_ISTORAGE_OLEPRES;
 
@@ -117,7 +117,7 @@
   ULONG         storagePropertyIndex,
   INT         typeOfRelation);
 
-static HRESULT adjustPropertyChain( 
+static HRESULT adjustPropertyChain(
   StorageImpl *This,
   StgProperty   propertyToDelete,
   StgProperty   parentProperty,
@@ -144,7 +144,7 @@
 /***********************************************************************
  * Declaration of miscellaneous functions...
  */
-static HRESULT validateSTGM(DWORD stgmValue); 
+static HRESULT validateSTGM(DWORD stgmValue);
 
 static DWORD GetShareModeFromSTGM(DWORD stgm);
 static DWORD GetAccessModeFromSTGM(DWORD stgm);
@@ -230,7 +230,7 @@
  *
  * This method implements the common QueryInterface for all IStorage32
  * implementations contained in this file.
- * 
+ *
  * See Windows documentation for more details on IUnknown methods.
  */
 HRESULT WINAPI StorageBaseImpl_QueryInterface(
@@ -244,30 +244,30 @@
    */
   if ( (This==0) || (ppvObject==0) )
     return E_INVALIDARG;
-  
+
   /*
    * Initialize the return parameter.
    */
   *ppvObject = 0;
-  
+
   /*
    * Compare the riid with the interface IDs implemented by this object.
    */
-  if (memcmp(&IID_IUnknown, riid, sizeof(IID_IUnknown)) == 0) 
+  if (memcmp(&IID_IUnknown, riid, sizeof(IID_IUnknown)) == 0)
   {
     *ppvObject = (IStorage*)This;
   }
-  else if (memcmp(&IID_IStorage, riid, sizeof(IID_IStorage)) == 0) 
+  else if (memcmp(&IID_IStorage, riid, sizeof(IID_IStorage)) == 0)
   {
     *ppvObject = (IStorage*)This;
   }
-  
+
   /*
    * Check that we obtained an interface.
    */
   if ((*ppvObject)==0)
     return E_NOINTERFACE;
-  
+
   /*
    * Query Interface always increases the reference count by one when it is
    * successful
@@ -276,16 +276,16 @@
 
   return S_OK;
 }
-        
+
 /************************************************************************
  * Storage32BaseImpl_AddRef (IUnknown)
  *
  * This method implements the common AddRef for all IStorage32
  * implementations contained in this file.
- * 
+ *
  * See Windows documentation for more details on IUnknown methods.
  */
-ULONG WINAPI StorageBaseImpl_AddRef( 
+ULONG WINAPI StorageBaseImpl_AddRef(
             IStorage* iface)
 {
   ICOM_THIS(StorageBaseImpl,iface);
@@ -293,16 +293,16 @@
 
   return This->ref;
 }
-        
+
 /************************************************************************
  * Storage32BaseImpl_Release (IUnknown)
  *
  * This method implements the common Release for all IStorage32
  * implementations contained in this file.
- * 
+ *
  * See Windows documentation for more details on IUnknown methods.
  */
-ULONG WINAPI StorageBaseImpl_Release( 
+ULONG WINAPI StorageBaseImpl_Release(
       IStorage* iface)
 {
   ICOM_THIS(StorageBaseImpl,iface);
@@ -317,15 +317,15 @@
   if (This->ref==0)
   {
     /*
-     * Since we are using a system of base-classes, we want to call the 
-     * destructor of the appropriate derived class. To do this, we are 
+     * Since we are using a system of base-classes, we want to call the
+     * destructor of the appropriate derived class. To do this, we are
      * using virtual functions to implement the destructor.
      */
     This->v_destructor(This);
 
     return 0;
   }
-  
+
   return This->ref;
 }
 
@@ -336,13 +336,13 @@
  *
  * See Windows documentation for more details on IStorage methods.
  */
-HRESULT WINAPI StorageBaseImpl_OpenStream( 
+HRESULT WINAPI StorageBaseImpl_OpenStream(
   IStorage*        iface,
   const OLECHAR*   pwcsName,  /* [string][in] */
   void*            reserved1, /* [unique][in] */
-  DWORD            grfMode,   /* [in]  */        
-  DWORD            reserved2, /* [in]  */        
-  IStream**        ppstm)     /* [out] */       
+  DWORD            grfMode,   /* [in]  */
+  DWORD            reserved2, /* [in]  */
+  IStream**        ppstm)     /* [out] */
 {
   ICOM_THIS(StorageBaseImpl,iface);
   IEnumSTATSTGImpl* propertyEnumeration;
@@ -351,7 +351,7 @@
   ULONG             foundPropertyIndex;
   HRESULT           res = STG_E_UNKNOWN;
 
-  TRACE("(%p, %s, %p, %lx, %ld, %p)\n", 
+  TRACE("(%p, %s, %p, %lx, %ld, %p)\n",
 	iface, debugstr_w(pwcsName), reserved1, grfMode, reserved2, ppstm);
 
   /*
@@ -362,12 +362,12 @@
     res = E_INVALIDARG;
     goto end;
   }
-  
+
   /*
    * Initialize the out parameter
    */
   *ppstm = NULL;
-  
+
   /*
    * Validate the STGM flags
    */
@@ -392,9 +392,9 @@
    * Create a property enumeration to search the properties
    */
   propertyEnumeration = IEnumSTATSTGImpl_Construct(
-    This->ancestorStorage, 
+    This->ancestorStorage,
     This->rootPropertySetIndex);
-  
+
   /*
    * Search the enumeration for the property with the given name
    */
@@ -402,39 +402,39 @@
     propertyEnumeration,
     pwcsName,
     &currentProperty);
-  
+
   /*
    * Delete the property enumeration since we don't need it anymore
    */
   IEnumSTATSTGImpl_Destroy(propertyEnumeration);
-  
+
   /*
    * If it was found, construct the stream object and return a pointer to it.
    */
-  if ( (foundPropertyIndex!=PROPERTY_NULL) && 
+  if ( (foundPropertyIndex!=PROPERTY_NULL) &&
        (currentProperty.propertyType==PROPTYPE_STREAM) )
   {
     newStream = StgStreamImpl_Construct(This, grfMode, foundPropertyIndex);
-    
+
     if (newStream!=0)
     {
       newStream->grfMode = grfMode;
       *ppstm = (IStream*)newStream;
 
       /*
-       * Since we are returning a pointer to the interface, we have to 
+       * Since we are returning a pointer to the interface, we have to
        * nail down the reference.
        */
       StgStreamImpl_AddRef(*ppstm);
-      
+
       res = S_OK;
       goto end;
     }
-    
+
     res = E_OUTOFMEMORY;
     goto end;
   }
-  
+
   res = STG_E_FILENOTFOUND;
 
 end:
@@ -448,17 +448,17 @@
  * Storage32BaseImpl_OpenStorage (IStorage)
  *
  * This method will open a new storage object from the current storage.
- * 
+ *
  * See Windows documentation for more details on IStorage methods.
- */        
-HRESULT WINAPI StorageBaseImpl_OpenStorage( 
+ */
+HRESULT WINAPI StorageBaseImpl_OpenStorage(
   IStorage*        iface,
-  const OLECHAR*   pwcsName,      /* [string][unique][in] */ 
-  IStorage*        pstgPriority,  /* [unique][in] */         
-  DWORD            grfMode,       /* [in] */                 
-  SNB              snbExclude,    /* [unique][in] */         
-  DWORD            reserved,      /* [in] */                 
-  IStorage**       ppstg)         /* [out] */                        
+  const OLECHAR*   pwcsName,      /* [string][unique][in] */
+  IStorage*        pstgPriority,  /* [unique][in] */
+  DWORD            grfMode,       /* [in] */
+  SNB              snbExclude,    /* [unique][in] */
+  DWORD            reserved,      /* [in] */
+  IStorage**       ppstg)         /* [out] */
 {
   ICOM_THIS(StorageBaseImpl,iface);
   StorageInternalImpl* newStorage;
@@ -467,10 +467,10 @@
   ULONG                  foundPropertyIndex;
   HRESULT                res = STG_E_UNKNOWN;
 
-  TRACE("(%p, %s, %p, %lx, %p, %ld, %p)\n", 
-	iface, debugstr_w(pwcsName), pstgPriority, 
+  TRACE("(%p, %s, %p, %lx, %p, %ld, %p)\n",
+	iface, debugstr_w(pwcsName), pstgPriority,
 	grfMode, snbExclude, reserved, ppstg);
-  
+
   /*
    * Perform a sanity check on the parameters.
    */
@@ -479,14 +479,14 @@
     res = E_INVALIDARG;
     goto end;
   }
-  
+
   /* as documented */
   if (snbExclude != NULL)
   {
     res = STG_E_INVALIDPARAMETER;
     goto end;
   }
-  
+
   /*
    * Validate the STGM flags
    */
@@ -499,7 +499,7 @@
   /*
    * As documented.
    */
-  if ( !(grfMode & STGM_SHARE_EXCLUSIVE) || 
+  if ( !(grfMode & STGM_SHARE_EXCLUSIVE) ||
         (grfMode & STGM_DELETEONRELEASE) ||
         (grfMode & STGM_PRIORITY) )
   {
@@ -511,14 +511,14 @@
    * Initialize the out parameter
    */
   *ppstg = NULL;
-  
+
   /*
    * Create a property enumeration to search the properties
    */
   propertyEnumeration = IEnumSTATSTGImpl_Construct(
-                          This->ancestorStorage, 
+                          This->ancestorStorage,
                           This->rootPropertySetIndex);
-  
+
   /*
    * Search the enumeration for the property with the given name
    */
@@ -526,16 +526,16 @@
                          propertyEnumeration,
                          pwcsName,
                          &currentProperty);
-  
+
   /*
    * Delete the property enumeration since we don't need it anymore
    */
   IEnumSTATSTGImpl_Destroy(propertyEnumeration);
-  
+
   /*
    * If it was found, construct the stream object and return a pointer to it.
    */
-  if ( (foundPropertyIndex!=PROPERTY_NULL) && 
+  if ( (foundPropertyIndex!=PROPERTY_NULL) &&
        (currentProperty.propertyType==PROPTYPE_STORAGE) )
   {
     /*
@@ -544,25 +544,25 @@
     newStorage = StorageInternalImpl_Construct(
                    This->ancestorStorage,
                    foundPropertyIndex);
-    
+
     if (newStorage != 0)
     {
       *ppstg = (IStorage*)newStorage;
 
       /*
-       * Since we are returning a pointer to the interface, 
+       * Since we are returning a pointer to the interface,
        * we have to nail down the reference.
        */
       StorageBaseImpl_AddRef(*ppstg);
-      
+
       res = S_OK;
       goto end;
     }
-    
+
     res = STG_E_INSUFFICIENTMEMORY;
     goto end;
   }
-  
+
   res = STG_E_FILENOTFOUND;
 
 end:
@@ -573,22 +573,22 @@
 /************************************************************************
  * Storage32BaseImpl_EnumElements (IStorage)
  *
- * This method will create an enumerator object that can be used to 
+ * This method will create an enumerator object that can be used to
  * retrieve informatino about all the properties in the storage object.
- * 
+ *
  * See Windows documentation for more details on IStorage methods.
- */        
-HRESULT WINAPI StorageBaseImpl_EnumElements( 
+ */
+HRESULT WINAPI StorageBaseImpl_EnumElements(
   IStorage*       iface,
-  DWORD           reserved1, /* [in] */                  
-  void*           reserved2, /* [size_is][unique][in] */ 
-  DWORD           reserved3, /* [in] */                  
-  IEnumSTATSTG**  ppenum)    /* [out] */                 
+  DWORD           reserved1, /* [in] */
+  void*           reserved2, /* [size_is][unique][in] */
+  DWORD           reserved3, /* [in] */
+  IEnumSTATSTG**  ppenum)    /* [out] */
 {
   ICOM_THIS(StorageBaseImpl,iface);
   IEnumSTATSTGImpl* newEnum;
 
-  TRACE("(%p, %ld, %p, %ld, %p)\n", 
+  TRACE("(%p, %ld, %p, %ld, %p)\n",
 	iface, reserved1, reserved2, reserved3, ppenum);
 
   /*
@@ -596,7 +596,7 @@
    */
   if ( (This==0) || (ppenum==0))
     return E_INVALIDARG;
-  
+
   /*
    * Construct the enumerator.
    */
@@ -613,7 +613,7 @@
      * returning it.
      */
     IEnumSTATSTGImpl_AddRef(*ppenum);
-    
+
     return S_OK;
   }
 
@@ -624,20 +624,20 @@
  * Storage32BaseImpl_Stat (IStorage)
  *
  * This method will retrieve information about this storage object.
- * 
+ *
  * See Windows documentation for more details on IStorage methods.
- */        
-HRESULT WINAPI StorageBaseImpl_Stat( 
+ */
+HRESULT WINAPI StorageBaseImpl_Stat(
   IStorage*        iface,
-  STATSTG*         pstatstg,     /* [out] */ 
-  DWORD            grfStatFlag)  /* [in] */  
+  STATSTG*         pstatstg,     /* [out] */
+  DWORD            grfStatFlag)  /* [in] */
 {
   ICOM_THIS(StorageBaseImpl,iface);
   StgProperty    curProperty;
   BOOL           readSuccessful;
   HRESULT        res = STG_E_UNKNOWN;
 
-  TRACE("(%p, %p, %lx)\n", 
+  TRACE("(%p, %p, %lx)\n",
 	iface, pstatstg, grfStatFlag);
 
   /*
@@ -660,14 +660,14 @@
   if (readSuccessful)
   {
     StorageUtl_CopyPropertyToSTATSTG(
-      pstatstg, 
-      &curProperty, 
+      pstatstg,
+      &curProperty,
       grfStatFlag);
-    
+
     res = S_OK;
     goto end;
   }
-  
+
   res = E_FAIL;
 
 end:
@@ -682,12 +682,12 @@
 /************************************************************************
  * Storage32BaseImpl_RenameElement (IStorage)
  *
- * This method will rename the specified element. 
+ * This method will rename the specified element.
  *
  * See Windows documentation for more details on IStorage methods.
- * 
- * Implementation notes: The method used to rename consists of creating a clone 
- *    of the deleted StgProperty object setting it with the new name and to 
+ *
+ * Implementation notes: The method used to rename consists of creating a clone
+ *    of the deleted StgProperty object setting it with the new name and to
  *    perform a DestroyElement of the old StgProperty.
  */
 HRESULT WINAPI StorageBaseImpl_RenameElement(
@@ -700,7 +700,7 @@
   StgProperty       currentProperty;
   ULONG             foundPropertyIndex;
 
-  TRACE("(%p, %s, %s)\n", 
+  TRACE("(%p, %s, %s)\n",
 	iface, debugstr_w(pwcsOldName), debugstr_w(pwcsNewName));
 
   /*
@@ -747,65 +747,65 @@
     /*
      * Setup a new property for the renamed property
      */
-    renamedProperty.sizeOfNameString = 
+    renamedProperty.sizeOfNameString =
       ( lstrlenW(pwcsNewName)+1 ) * sizeof(WCHAR);
-  
+
     if (renamedProperty.sizeOfNameString > PROPERTY_NAME_BUFFER_LEN)
       return STG_E_INVALIDNAME;
-  
+
     strcpyW(renamedProperty.name, pwcsNewName);
- 
+
     renamedProperty.propertyType  = currentProperty.propertyType;
     renamedProperty.startingBlock = currentProperty.startingBlock;
     renamedProperty.size.s.LowPart  = currentProperty.size.s.LowPart;
     renamedProperty.size.s.HighPart = currentProperty.size.s.HighPart;
-  
+
     renamedProperty.previousProperty = PROPERTY_NULL;
     renamedProperty.nextProperty     = PROPERTY_NULL;
-  
+
     /*
      * Bring the dirProperty link in case it is a storage and in which
      * case the renamed storage elements don't require to be reorganized.
      */
     renamedProperty.dirProperty = currentProperty.dirProperty;
-  
-    /* call CoFileTime to get the current time 
+
+    /* call CoFileTime to get the current time
     renamedProperty.timeStampS1
     renamedProperty.timeStampD1
     renamedProperty.timeStampS2
     renamedProperty.timeStampD2
-    renamedProperty.propertyUniqueID 
+    renamedProperty.propertyUniqueID
     */
-  
-    /* 
+
+    /*
      * Obtain a free property in the property chain
      */
     renamedPropertyIndex = getFreeProperty(This->ancestorStorage);
-  
+
     /*
      * Save the new property into the new property spot
-     */  
+     */
     StorageImpl_WriteProperty(
       This->ancestorStorage,
-      renamedPropertyIndex, 
+      renamedPropertyIndex,
       &renamedProperty);
-  
-    /* 
+
+    /*
      * Find a spot in the property chain for our newly created property.
      */
     updatePropertyChain(
       (StorageImpl*)This,
-      renamedPropertyIndex, 
+      renamedPropertyIndex,
       renamedProperty);
 
     /*
-     * At this point the renamed property has been inserted in the tree, 
-     * now, before to Destroy the old property we must zeroed it's dirProperty 
-     * otherwise the DestroyProperty below will zap it all and we do not want 
+     * At this point the renamed property has been inserted in the tree,
+     * now, before to Destroy the old property we must zeroed it's dirProperty
+     * otherwise the DestroyProperty below will zap it all and we do not want
      * this to happen.
      * Also, we fake that the old property is a storage so the DestroyProperty
      * will not do a SetSize(0) on the stream data.
-     * 
+     *
      * This means that we need to tweek the StgProperty if it is a stream or a
      * non empty storage.
      */
@@ -817,14 +817,14 @@
     currentProperty.propertyType = PROPTYPE_STORAGE;
     StorageImpl_WriteProperty(
       This->ancestorStorage,
-      foundPropertyIndex, 
+      foundPropertyIndex,
       &currentProperty);
 
-    /* 
-     * Invoke Destroy to get rid of the ole property and automatically redo 
-     * the linking of it's previous and next members... 
-     */ 
-    StorageImpl_DestroyElement((IStorage*)This->ancestorStorage, pwcsOldName); 
+    /*
+     * Invoke Destroy to get rid of the ole property and automatically redo
+     * the linking of it's previous and next members...
+     */
+    StorageImpl_DestroyElement((IStorage*)This->ancestorStorage, pwcsOldName);
 
   }
   else
@@ -841,7 +841,7 @@
 /************************************************************************
  * Storage32BaseImpl_CreateStream (IStorage)
  *
- * This method will create a stream object within this storage 
+ * This method will create a stream object within this storage
  *
  * See Windows documentation for more details on IStorage methods.
  */
@@ -859,8 +859,8 @@
   StgProperty       currentProperty, newStreamProperty;
   ULONG             foundPropertyIndex, newPropertyIndex;
 
-  TRACE("(%p, %s, %lx, %ld, %ld, %p)\n", 
-	iface, debugstr_w(pwcsName), grfMode, 
+  TRACE("(%p, %s, %lx, %ld, %ld, %p)\n",
+	iface, debugstr_w(pwcsName), grfMode,
 	reserved1, reserved2, ppstm);
 
   /*
@@ -906,18 +906,18 @@
   if (foundPropertyIndex != PROPERTY_NULL)
   {
     /*
-     * An element with this name already exists 
+     * An element with this name already exists
      */
     if (grfMode & STGM_CREATE)
     {
-      IStorage_DestroyElement(iface, pwcsName); 
+      IStorage_DestroyElement(iface, pwcsName);
     }
-    else 
+    else
       return STG_E_FILEALREADYEXISTS;
   }
 
-  /* 
-   * memset the empty property 
+  /*
+   * memset the empty property
    */
   memset(&newStreamProperty, 0, sizeof(StgProperty));
 
@@ -938,7 +938,7 @@
   newStreamProperty.nextProperty     = PROPERTY_NULL;
   newStreamProperty.dirProperty      = PROPERTY_NULL;
 
-  /* call CoFileTime to get the current time 
+  /* call CoFileTime to get the current time
   newStreamProperty.timeStampS1
   newStreamProperty.timeStampD1
   newStreamProperty.timeStampS2
@@ -948,27 +948,27 @@
   /*  newStreamProperty.propertyUniqueID */
 
   /*
-   * Get a free property or create a new one 
+   * Get a free property or create a new one
    */
   newPropertyIndex = getFreeProperty(This->ancestorStorage);
 
   /*
    * Save the new property into the new property spot
-   */  
+   */
   StorageImpl_WriteProperty(
     This->ancestorStorage,
-    newPropertyIndex, 
+    newPropertyIndex,
     &newStreamProperty);
 
-  /* 
+  /*
    * Find a spot in the property chain for our newly created property.
    */
   updatePropertyChain(
     (StorageImpl*)This,
-    newPropertyIndex, 
+    newPropertyIndex,
     newStreamProperty);
 
-  /* 
+  /*
    * Open the stream to return it.
    */
   newStream = StgStreamImpl_Construct(This, grfMode, newPropertyIndex);
@@ -994,7 +994,7 @@
 /************************************************************************
  * Storage32BaseImpl_SetClass (IStorage)
  *
- * This method will write the specified CLSID in the property of this 
+ * This method will write the specified CLSID in the property of this
  * storage.
  *
  * See Windows documentation for more details on IStorage methods.
@@ -1009,7 +1009,7 @@
   BOOL success;
 
   TRACE("(%p, %p)\n", iface, clsid);
-  
+
   success = StorageImpl_ReadProperty(This->ancestorStorage,
                                        This->rootPropertySetIndex,
                                        &curProperty);
@@ -1030,7 +1030,7 @@
 /************************************************************************
 ** Storage32Impl implementation
 */
-        
+
 /************************************************************************
  * Storage32Impl_CreateStorage (IStorage)
  *
@@ -1038,13 +1038,13 @@
  *
  * See Windows documentation for more details on IStorage methods.
  */
-HRESULT WINAPI StorageImpl_CreateStorage( 
+HRESULT WINAPI StorageImpl_CreateStorage(
   IStorage*      iface,
-  const OLECHAR  *pwcsName, /* [string][in] */ 
-  DWORD            grfMode,   /* [in] */ 
-  DWORD            reserved1, /* [in] */ 
-  DWORD            reserved2, /* [in] */ 
-  IStorage       **ppstg)   /* [out] */ 
+  const OLECHAR  *pwcsName, /* [string][in] */
+  DWORD            grfMode,   /* [in] */
+  DWORD            reserved1, /* [in] */
+  DWORD            reserved2, /* [in] */
+  IStorage       **ppstg)   /* [out] */
 {
   StorageImpl* const This=(StorageImpl*)iface;
 
@@ -1055,10 +1055,10 @@
   ULONG            newPropertyIndex;
   HRESULT          hr;
 
-  TRACE("(%p, %s, %lx, %ld, %ld, %p)\n", 
-	iface, debugstr_w(pwcsName), grfMode, 
+  TRACE("(%p, %s, %lx, %ld, %ld, %p)\n",
+	iface, debugstr_w(pwcsName), grfMode,
 	reserved1, reserved2, ppstg);
-  
+
   /*
    * Validate parameters
    */
@@ -1094,16 +1094,16 @@
   if (foundPropertyIndex != PROPERTY_NULL)
   {
     /*
-     * An element with this name already exists 
+     * An element with this name already exists
      */
     if (grfMode & STGM_CREATE)
-      IStorage_DestroyElement(iface, pwcsName); 
-    else 
+      IStorage_DestroyElement(iface, pwcsName);
+    else
       return STG_E_FILEALREADYEXISTS;
   }
 
-  /* 
-   * memset the empty property 
+  /*
+   * memset the empty property
    */
   memset(&newProperty, 0, sizeof(StgProperty));
 
@@ -1123,7 +1123,7 @@
   newProperty.nextProperty     = PROPERTY_NULL;
   newProperty.dirProperty      = PROPERTY_NULL;
 
-  /* call CoFileTime to get the current time 
+  /* call CoFileTime to get the current time
   newProperty.timeStampS1
   newProperty.timeStampD1
   newProperty.timeStampS2
@@ -1132,28 +1132,28 @@
 
   /*  newStorageProperty.propertyUniqueID */
 
-  /* 
+  /*
    * Obtain a free property in the property chain
    */
   newPropertyIndex = getFreeProperty(This->ancestorStorage);
 
   /*
    * Save the new property into the new property spot
-   */  
+   */
   StorageImpl_WriteProperty(
     This->ancestorStorage,
-    newPropertyIndex, 
+    newPropertyIndex,
     &newProperty);
 
-  /* 
+  /*
    * Find a spot in the property chain for our newly created property.
    */
   updatePropertyChain(
     This,
-    newPropertyIndex, 
+    newPropertyIndex,
     newProperty);
 
-  /* 
+  /*
    * Open it to get a pointer to return.
    */
   hr = IStorage_OpenStorage(
@@ -1170,7 +1170,7 @@
     return hr;
   }
 
-  
+
   return S_OK;
 }
 
@@ -1201,7 +1201,7 @@
     {
       if (currentProperty.sizeOfNameString == 0)
       {
-        /* 
+        /*
          * The property existis and is available, we found it.
          */
         newPropertyIndex = currentPropertyIndex;
@@ -1218,8 +1218,8 @@
 
   } while (newPropertyIndex == PROPERTY_NULL);
 
-  /* 
-   * grow the property chain 
+  /*
+   * grow the property chain
    */
   if (! readSuccessful)
   {
@@ -1229,34 +1229,34 @@
     ULONG          lastProperty  = 0;
     ULONG          blockCount    = 0;
 
-    /* 
-     * obtain the new count of property blocks 
+    /*
+     * obtain the new count of property blocks
      */
     blockCount = BlockChainStream_GetCount(
                    storage->ancestorStorage->rootBlockChain)+1;
 
-    /* 
-     * initialize the size used by the property stream 
+    /*
+     * initialize the size used by the property stream
      */
     newSize.s.HighPart = 0;
     newSize.s.LowPart  = storage->bigBlockSize * blockCount;
 
-    /* 
-     * add a property block to the property chain 
+    /*
+     * add a property block to the property chain
      */
     BlockChainStream_SetSize(storage->ancestorStorage->rootBlockChain, newSize);
 
-    /* 
-     * memset the empty property in order to initialize the unused newly 
+    /*
+     * memset the empty property in order to initialize the unused newly
      * created property
      */
     memset(&emptyProperty, 0, sizeof(StgProperty));
 
-    /* 
+    /*
      * initialize them
      */
-    lastProperty = storage->bigBlockSize / PROPSET_BLOCK_SIZE * blockCount; 
-    
+    lastProperty = storage->bigBlockSize / PROPSET_BLOCK_SIZE * blockCount;
+
     for(
       propertyIndex = newPropertyIndex;
       propertyIndex < lastProperty;
@@ -1264,7 +1264,7 @@
     {
       StorageImpl_WriteProperty(
         storage->ancestorStorage,
-        propertyIndex, 
+        propertyIndex,
         &emptyProperty);
     }
   }
@@ -1276,7 +1276,7 @@
  *
  * Internal Method
  *
- * Case insensitive comparaison of StgProperty.name by first considering 
+ * Case insensitive comparaison of StgProperty.name by first considering
  * their size.
  *
  * Returns <0 when newPrpoerty < currentProperty
@@ -1289,15 +1289,15 @@
 {
   LONG diff      = lstrlenW(newProperty) - lstrlenW(currentProperty);
 
-  if (diff == 0) 
+  if (diff == 0)
   {
-    /* 
+    /*
      * We compare the string themselves only when they are of the same lenght
      */
     diff = lstrcmpiW( newProperty, currentProperty);
   }
 
-  return diff;  
+  return diff;
 }
 
 /****************************************************************************
@@ -1309,7 +1309,7 @@
 static void updatePropertyChain(
   StorageImpl *storage,
   ULONG         newPropertyIndex,
-  StgProperty   newProperty) 
+  StgProperty   newProperty)
 {
   StgProperty currentProperty;
 
@@ -1322,7 +1322,7 @@
 
   if (currentProperty.dirProperty != PROPERTY_NULL)
   {
-    /* 
+    /*
      * The root storage contains some element, therefore, start the research
      * for the appropriate location.
      */
@@ -1335,7 +1335,7 @@
     currentPropertyId = currentProperty.dirProperty;
 
     /*
-     * Read 
+     * Read
      */
     StorageImpl_ReadProperty(storage->ancestorStorage,
                                currentProperty.dirProperty,
@@ -1348,7 +1348,7 @@
     while (found == 0)
     {
       LONG diff = propertyNameCmp( newProperty.name, currentProperty.name);
-  
+
       if (diff < 0)
       {
         if (previous != PROPERTY_NULL)
@@ -1400,7 +1400,7 @@
   }
   else
   {
-    /* 
+    /*
      * The root storage is empty, link the new property to it's dir property
      */
     currentProperty.dirProperty = newPropertyIndex;
@@ -1410,16 +1410,16 @@
   }
 }
 
-      
+
 /*************************************************************************
  * CopyTo (IStorage)
  */
-HRESULT WINAPI StorageImpl_CopyTo( 
+HRESULT WINAPI StorageImpl_CopyTo(
   IStorage*   iface,
-  DWORD       ciidExclude,  /* [in] */ 
-  const IID*  rgiidExclude, /* [size_is][unique][in] */ 
-  SNB         snbExclude,   /* [unique][in] */ 
-  IStorage*   pstgDest)     /* [unique][in] */ 
+  DWORD       ciidExclude,  /* [in] */
+  const IID*  rgiidExclude, /* [size_is][unique][in] */
+  SNB         snbExclude,   /* [unique][in] */
+  IStorage*   pstgDest)     /* [unique][in] */
 {
   IEnumSTATSTG *elements     = 0;
   STATSTG      curElement, strStat;
@@ -1430,8 +1430,8 @@
   if ((ciidExclude != 0) || (rgiidExclude != NULL) || (snbExclude != NULL))
     FIXME("Exclude option not implemented\n");
 
-  TRACE("(%p, %ld, %p, %p, %p)\n", 
-	iface, ciidExclude, rgiidExclude, 
+  TRACE("(%p, %ld, %p, %p, %p)\n",
+	iface, ciidExclude, rgiidExclude,
 	snbExclude, pstgDest);
 
   /*
@@ -1440,7 +1440,7 @@
   if ( pstgDest == 0 )
     return STG_E_INVALIDPOINTER;
 
-  /* 
+  /*
    * Enumerate the elements
    */
   hr = IStorage_EnumElements( iface, 0, 0, 0, &elements );
@@ -1453,7 +1453,7 @@
    */
   IStorage_Stat( iface, &curElement, STATFLAG_NONAME);
   IStorage_SetClass( pstgDest, &curElement.clsid );
-  
+
   do
   {
     /*
@@ -1489,7 +1489,7 @@
 
 	return STG_E_ACCESSDENIED;
       }
-            
+
       /*
        * create a new storage in destination storage
        */
@@ -1506,17 +1506,17 @@
                                    STGM_WRITE|STGM_SHARE_EXCLUSIVE,
                                    NULL, 0, &pstgTmp );
       }
-        
+
       if (hr != S_OK)
         break;
 
-        
+
       /*
        * do the copy recursively
        */
       hr = IStorage_CopyTo( pstgChild, ciidExclude, rgiidExclude,
                                snbExclude, pstgTmp );
-                                
+
       IStorage_Release( pstgTmp );
       IStorage_Release( pstgChild );
     }
@@ -1552,13 +1552,13 @@
        * Set the size of the destination stream.
        */
       IStream_SetSize(pstrTmp, strStat.cbSize);
-      
+
       /*
        * do the copy
        */
       hr = IStream_CopyTo( pstrChild, pstrTmp, strStat.cbSize,
                            NULL, NULL );
-                                
+
       IStream_Release( pstrTmp );
       IStream_Release( pstrChild );
     }
@@ -1573,39 +1573,39 @@
    * Clean-up
    */
   IEnumSTATSTG_Release(elements);
-  
+
   return hr;
 }
-        
+
 /*************************************************************************
  * MoveElementTo (IStorage)
  */
-HRESULT WINAPI StorageImpl_MoveElementTo( 
+HRESULT WINAPI StorageImpl_MoveElementTo(
   IStorage*     iface,
-  const OLECHAR *pwcsName,   /* [string][in] */ 
-  IStorage      *pstgDest,   /* [unique][in] */ 
-  const OLECHAR *pwcsNewName,/* [string][in] */ 
-  DWORD           grfFlags)    /* [in] */ 
+  const OLECHAR *pwcsName,   /* [string][in] */
+  IStorage      *pstgDest,   /* [unique][in] */
+  const OLECHAR *pwcsNewName,/* [string][in] */
+  DWORD           grfFlags)    /* [in] */
 {
   FIXME("not implemented!\n");
   return E_NOTIMPL;
 }
-        
+
 /*************************************************************************
  * Commit (IStorage)
  */
-HRESULT WINAPI StorageImpl_Commit( 
+HRESULT WINAPI StorageImpl_Commit(
   IStorage*   iface,
-  DWORD         grfCommitFlags)/* [in] */ 
+  DWORD         grfCommitFlags)/* [in] */
 {
   FIXME("(%ld): stub!\n", grfCommitFlags);
   return S_OK;
 }
-        
+
 /*************************************************************************
  * Revert (IStorage)
  */
-HRESULT WINAPI StorageImpl_Revert( 
+HRESULT WINAPI StorageImpl_Revert(
   IStorage* iface)
 {
   FIXME("not implemented!\n");
@@ -1615,17 +1615,17 @@
 /*************************************************************************
  * DestroyElement (IStorage)
  *
- * Stategy: This implementation is build this way for simplicity not for speed. 
+ * Stategy: This implementation is build this way for simplicity not for speed.
  *          I always delete the top most element of the enumeration and adjust
- *          the deleted element pointer all the time.  This takes longer to 
- *          do but allow to reinvoke DestroyElement whenever we encounter a 
+ *          the deleted element pointer all the time.  This takes longer to
+ *          do but allow to reinvoke DestroyElement whenever we encounter a
  *          storage object.  The optimisation reside in the usage of another
- *          enumeration stategy that would give all the leaves of a storage 
+ *          enumeration stategy that would give all the leaves of a storage
  *          first. (postfix order)
  */
-HRESULT WINAPI StorageImpl_DestroyElement( 
+HRESULT WINAPI StorageImpl_DestroyElement(
   IStorage*     iface,
-  const OLECHAR *pwcsName)/* [string][in] */ 
+  const OLECHAR *pwcsName)/* [string][in] */
 {
   StorageImpl* const This=(StorageImpl*)iface;
 
@@ -1638,22 +1638,22 @@
   ULONG             typeOfRelation;
   ULONG             parentPropertyId;
 
-  TRACE("(%p, %s)\n", 
+  TRACE("(%p, %s)\n",
 	iface, debugstr_w(pwcsName));
 
   /*
    * Perform a sanity check on the parameters.
    */
-  if (pwcsName==NULL) 
+  if (pwcsName==NULL)
     return STG_E_INVALIDPOINTER;
-  
+
   /*
    * Create a property enumeration to search the property with the given name
    */
   propertyEnumeration = IEnumSTATSTGImpl_Construct(
-    This->ancestorStorage, 
+    This->ancestorStorage,
     This->rootPropertySetIndex);
-  
+
   foundPropertyIndexToDelete = IEnumSTATSTGImpl_FindProperty(
     propertyEnumeration,
     pwcsName,
@@ -1661,51 +1661,51 @@
 
   IEnumSTATSTGImpl_Destroy(propertyEnumeration);
 
-  if ( foundPropertyIndexToDelete == PROPERTY_NULL )  
+  if ( foundPropertyIndexToDelete == PROPERTY_NULL )
   {
     return STG_E_FILENOTFOUND;
   }
 
-  /* 
-   * Find the parent property of the property to delete (the one that 
-   * link to it).  If This->dirProperty == foundPropertyIndexToDelete, 
+  /*
+   * Find the parent property of the property to delete (the one that
+   * link to it).  If This->dirProperty == foundPropertyIndexToDelete,
    * the parent is This. Otherwise, the parent is one of it's sibling...
    */
 
-  /* 
+  /*
    * First, read This's StgProperty..
    */
-  res = StorageImpl_ReadProperty( 
+  res = StorageImpl_ReadProperty(
           This->ancestorStorage,
           This->rootPropertySetIndex,
           &parentProperty);
 
   assert(res==TRUE);
 
-  /* 
+  /*
    * Second, check to see if by any chance the actual storage (This) is not
    * the parent of the property to delete... We never know...
    */
   if ( parentProperty.dirProperty == foundPropertyIndexToDelete )
   {
-    /* 
+    /*
      * Set data as it would have been done in the else part...
      */
     typeOfRelation   = PROPERTY_RELATION_DIR;
     parentPropertyId = This->rootPropertySetIndex;
   }
-  else 
-  { 
+  else
+  {
     /*
-     * Create a property enumeration to search the parent properties, and 
+     * Create a property enumeration to search the parent properties, and
      * delete it once done.
      */
     IEnumSTATSTGImpl* propertyEnumeration2;
 
     propertyEnumeration2 = IEnumSTATSTGImpl_Construct(
-      This->ancestorStorage, 
+      This->ancestorStorage,
       This->rootPropertySetIndex);
-  
+
     typeOfRelation = IEnumSTATSTGImpl_FindParentProperty(
       propertyEnumeration2,
       foundPropertyIndexToDelete,
@@ -1715,22 +1715,22 @@
     IEnumSTATSTGImpl_Destroy(propertyEnumeration2);
   }
 
-  if ( propertyToDelete.propertyType == PROPTYPE_STORAGE ) 
+  if ( propertyToDelete.propertyType == PROPTYPE_STORAGE )
   {
     hr = deleteStorageProperty(
-           This, 
+           This,
            foundPropertyIndexToDelete,
            propertyToDelete);
-  } 
+  }
   else if ( propertyToDelete.propertyType == PROPTYPE_STREAM )
   {
     hr = deleteStreamProperty(
-           This, 
+           This,
            foundPropertyIndexToDelete,
            propertyToDelete);
   }
 
-  if (hr!=S_OK) 
+  if (hr!=S_OK)
     return hr;
 
   /*
@@ -1738,7 +1738,7 @@
    */
   hr = adjustPropertyChain(
         This,
-        propertyToDelete, 
+        propertyToDelete,
         parentProperty,
         parentPropertyId,
         typeOfRelation);
@@ -1747,12 +1747,12 @@
 }
 
 
-/************************************************************************ 
- * StorageImpl_Stat (IStorage) 
- * 
- * This method will retrieve information about this storage object. 
- *  
- * See Windows documentation for more details on IStorage methods. 
+/************************************************************************
+ * StorageImpl_Stat (IStorage)
+ *
+ * This method will retrieve information about this storage object.
+ *
+ * See Windows documentation for more details on IStorage methods.
  */
 HRESULT WINAPI StorageImpl_Stat( IStorage* iface,
                                  STATSTG*  pstatstg,     /* [out] */
@@ -1808,7 +1808,7 @@
     return hr;
   }
 
-  /* 
+  /*
    * Enumerate the elements
    */
   IStorage_EnumElements( childStorage, 0, 0, 0, &elements);
@@ -1822,7 +1822,7 @@
     if (hr==S_OK)
     {
       destroyHr = StorageImpl_DestroyElement(
-                    (IStorage*)childStorage, 
+                    (IStorage*)childStorage,
                     (OLECHAR*)currentElement.pwcsName);
 
       CoTaskMemFree(currentElement.pwcsName);
@@ -1847,7 +1847,7 @@
 
   IStorage_Release(childStorage);
   IEnumSTATSTG_Release(elements);
-    
+
   return destroyHr;
 }
 
@@ -1877,16 +1877,16 @@
          STGM_WRITE | STGM_SHARE_EXCLUSIVE,
          0,
          &pis);
-    
+
   if (hr!=S_OK)
   {
     return(hr);
   }
 
-  /* 
-   * Zap the stream 
-   */ 
-  hr = IStream_SetSize(pis, size); 
+  /*
+   * Zap the stream
+   */
+  hr = IStream_SetSize(pis, size);
 
   if(hr != S_OK)
   {
@@ -1898,17 +1898,17 @@
    */
   IStream_Release(pis);
 
-  /* 
+  /*
    * Invalidate the property by zeroing it's name member.
    */
   propertyToDelete.sizeOfNameString = 0;
 
-  /* 
+  /*
    * Here we should re-read the property so we get the updated pointer
    * but since we are here to zap it, I don't do it...
    */
   StorageImpl_WriteProperty(
-    parentStorage->ancestorStorage, 
+    parentStorage->ancestorStorage,
     indexOfPropertyToDelete,
     &propertyToDelete);
 
@@ -1937,7 +1937,7 @@
    */
   res = StorageImpl_ReadProperty(
           storage->ancestorStorage,
-          storePropertyIndex, 
+          storePropertyIndex,
           &storeProperty);
 
   if(! res)
@@ -1951,7 +1951,7 @@
     {
       return findPlaceholder(
                storage,
-               propertyIndexToStore, 
+               propertyIndexToStore,
                storeProperty.previousProperty,
                typeOfRelation);
     }
@@ -1966,7 +1966,7 @@
     {
       return findPlaceholder(
                storage,
-               propertyIndexToStore, 
+               propertyIndexToStore,
                storeProperty.nextProperty,
                typeOfRelation);
     }
@@ -1974,14 +1974,14 @@
     {
       storeProperty.nextProperty = propertyIndexToStore;
     }
-  } 
+  }
   else if (typeOfRelation == PROPERTY_RELATION_DIR)
   {
     if (storeProperty.dirProperty != PROPERTY_NULL)
     {
       return findPlaceholder(
                storage,
-               propertyIndexToStore, 
+               propertyIndexToStore,
                storeProperty.dirProperty,
                typeOfRelation);
     }
@@ -1993,7 +1993,7 @@
 
   hr = StorageImpl_WriteProperty(
          storage->ancestorStorage,
-         storePropertyIndex, 
+         storePropertyIndex,
          &storeProperty);
 
   if(! hr)
@@ -2008,10 +2008,10 @@
  *
  * Internal Method
  *
- * This method takes the previous and the next property link of a property 
+ * This method takes the previous and the next property link of a property
  * to be deleted and find them a place in the Storage.
  */
-static HRESULT adjustPropertyChain( 
+static HRESULT adjustPropertyChain(
   StorageImpl *This,
   StgProperty   propertyToDelete,
   StgProperty   parentProperty,
@@ -2025,116 +2025,116 @@
   INT   relationType           = 0;
   HRESULT hr                     = S_OK;
   BOOL  res                    = TRUE;
-  
-  if (typeOfRelation == PROPERTY_RELATION_PREVIOUS) 
+
+  if (typeOfRelation == PROPERTY_RELATION_PREVIOUS)
   {
-    if (propertyToDelete.previousProperty != PROPERTY_NULL)  
+    if (propertyToDelete.previousProperty != PROPERTY_NULL)
     {
-      /* 
+      /*
        * Set the parent previous to the property to delete previous
        */
       newLinkProperty = propertyToDelete.previousProperty;
 
-      if (propertyToDelete.nextProperty != PROPERTY_NULL)  
+      if (propertyToDelete.nextProperty != PROPERTY_NULL)
       {
         /*
-         * We also need to find a storage for the other link, setup variables 
+         * We also need to find a storage for the other link, setup variables
          * to do this at the end...
-         */      
+         */
         needToFindAPlaceholder = TRUE;
         storeNode              = propertyToDelete.previousProperty;
         toStoreNode            = propertyToDelete.nextProperty;
         relationType           = PROPERTY_RELATION_NEXT;
       }
-    } 
-    else if (propertyToDelete.nextProperty != PROPERTY_NULL)  
+    }
+    else if (propertyToDelete.nextProperty != PROPERTY_NULL)
     {
-      /* 
+      /*
        * Set the parent previous to the property to delete next
        */
       newLinkProperty = propertyToDelete.nextProperty;
     }
-   
-    /* 
+
+    /*
      * Link it for real...
-     */ 
+     */
     parentProperty.previousProperty = newLinkProperty;
-  
-  } 
-  else if (typeOfRelation == PROPERTY_RELATION_NEXT) 
+
+  }
+  else if (typeOfRelation == PROPERTY_RELATION_NEXT)
   {
-    if (propertyToDelete.previousProperty != PROPERTY_NULL)  
+    if (propertyToDelete.previousProperty != PROPERTY_NULL)
     {
-      /* 
+      /*
        * Set the parent next to the property to delete next previous
        */
       newLinkProperty = propertyToDelete.previousProperty;
-      
-      if (propertyToDelete.nextProperty != PROPERTY_NULL)  
+
+      if (propertyToDelete.nextProperty != PROPERTY_NULL)
       {
         /*
-         * We also need to find a storage for the other link, setup variables 
+         * We also need to find a storage for the other link, setup variables
          * to do this at the end...
-         */      
+         */
         needToFindAPlaceholder = TRUE;
         storeNode              = propertyToDelete.previousProperty;
         toStoreNode            = propertyToDelete.nextProperty;
         relationType           = PROPERTY_RELATION_NEXT;
       }
-    } 
-    else if (propertyToDelete.nextProperty != PROPERTY_NULL)  
+    }
+    else if (propertyToDelete.nextProperty != PROPERTY_NULL)
     {
-      /* 
+      /*
        * Set the parent next to the property to delete next
        */
       newLinkProperty = propertyToDelete.nextProperty;
     }
 
-    /* 
+    /*
      * Link it for real...
-     */ 
+     */
     parentProperty.nextProperty = newLinkProperty;
-  } 
+  }
   else /* (typeOfRelation == PROPERTY_RELATION_DIR) */
   {
-    if (propertyToDelete.previousProperty != PROPERTY_NULL) 
+    if (propertyToDelete.previousProperty != PROPERTY_NULL)
     {
-      /* 
+      /*
        * Set the parent dir to the property to delete previous
        */
       newLinkProperty = propertyToDelete.previousProperty;
 
-      if (propertyToDelete.nextProperty != PROPERTY_NULL)  
+      if (propertyToDelete.nextProperty != PROPERTY_NULL)
       {
         /*
-         * We also need to find a storage for the other link, setup variables 
+         * We also need to find a storage for the other link, setup variables
          * to do this at the end...
-         */      
+         */
         needToFindAPlaceholder = TRUE;
         storeNode              = propertyToDelete.previousProperty;
         toStoreNode            = propertyToDelete.nextProperty;
         relationType           = PROPERTY_RELATION_NEXT;
       }
-    } 
-    else if (propertyToDelete.nextProperty != PROPERTY_NULL)  
+    }
+    else if (propertyToDelete.nextProperty != PROPERTY_NULL)
     {
-      /* 
+      /*
        * Set the parent dir to the property to delete next
        */
       newLinkProperty = propertyToDelete.nextProperty;
     }
 
-    /* 
+    /*
      * Link it for real...
-     */ 
+     */
     parentProperty.dirProperty = newLinkProperty;
   }
 
-  /* 
-   * Write back the parent property    
+  /*
+   * Write back the parent property
    */
   res = StorageImpl_WriteProperty(
-          This->ancestorStorage, 
+          This->ancestorStorage,
           parentPropertyId,
           &parentProperty);
   if(! res)
@@ -2143,14 +2143,14 @@
   }
 
   /*
-   * If a placeholder is required for the other link, then, find one and 
+   * If a placeholder is required for the other link, then, find one and
    * get out of here...
    */
-  if (needToFindAPlaceholder) 
+  if (needToFindAPlaceholder)
   {
     hr = findPlaceholder(
-           This, 
-           toStoreNode, 
+           This,
+           toStoreNode,
            storeNode,
            relationType);
   }
@@ -2162,12 +2162,12 @@
 /******************************************************************************
  * SetElementTimes (IStorage)
  */
-HRESULT WINAPI StorageImpl_SetElementTimes( 
+HRESULT WINAPI StorageImpl_SetElementTimes(
   IStorage*     iface,
-  const OLECHAR *pwcsName,/* [string][in] */ 
-  const FILETIME  *pctime,  /* [in] */ 
-  const FILETIME  *patime,  /* [in] */ 
-  const FILETIME  *pmtime)  /* [in] */ 
+  const OLECHAR *pwcsName,/* [string][in] */
+  const FILETIME  *pctime,  /* [in] */
+  const FILETIME  *patime,  /* [in] */
+  const FILETIME  *pmtime)  /* [in] */
 {
   FIXME("(%s,...), stub!\n",debugstr_w(pwcsName));
   return S_OK;
@@ -2176,10 +2176,10 @@
 /******************************************************************************
  * SetStateBits (IStorage)
  */
-HRESULT WINAPI StorageImpl_SetStateBits( 
+HRESULT WINAPI StorageImpl_SetStateBits(
   IStorage*   iface,
-  DWORD         grfStateBits,/* [in] */ 
-  DWORD         grfMask)     /* [in] */ 
+  DWORD         grfStateBits,/* [in] */
+  DWORD         grfMask)     /* [in] */
 {
   FIXME("not implemented!\n");
   return E_NOTIMPL;
@@ -2203,33 +2203,33 @@
     return STG_E_INVALIDFLAG;
 
   memset(This, 0, sizeof(StorageImpl));
-  
+
   /*
    * Initialize the virtual function table.
    */
   ICOM_VTBL(This)    = &Storage32Impl_Vtbl;
   This->v_destructor = &StorageImpl_Destroy;
-  
+
   /*
    * This is the top-level storage so initialize the ancestor pointer
    * to this.
    */
   This->ancestorStorage = This;
-  
+
   /*
    * Initialize the physical support of the storage.
    */
   This->hFile = hFile;
-  
+
   /*
    * Store copy of file path.
    */
   if(pwcsName) {
-      This->pwcsName = HeapAlloc(GetProcessHeap(), 0, 
+      This->pwcsName = HeapAlloc(GetProcessHeap(), 0,
                                 (lstrlenW(pwcsName)+1)*sizeof(WCHAR));
       if (!This->pwcsName)
          return STG_E_INSUFFICIENTMEMORY;
-      strcpyW(This->pwcsName, pwcsName); 
+      strcpyW(This->pwcsName, pwcsName);
   }
 
   /*
@@ -2245,7 +2245,7 @@
 
   if (This->bigBlockFile == 0)
     return E_FAIL;
- 
+
   if (fileCreate)
   {
     ULARGE_INTEGER size;
@@ -2257,8 +2257,8 @@
      * - The properties start at block 1
      * - There is no small block depot
      */
-    memset( This->bigBlockDepotStart,     
-            BLOCK_UNUSED, 
+    memset( This->bigBlockDepotStart,
+            BLOCK_UNUSED,
             sizeof(This->bigBlockDepotStart));
 
     This->bigBlockDepotCount    = 1;
@@ -2312,20 +2312,20 @@
    * Start searching for free blocks with block 0.
    */
   This->prevFreeBlock = 0;
-  
+
   /*
    * Create the block chain abstractions.
    */
-  This->rootBlockChain = 
+  This->rootBlockChain =
     BlockChainStream_Construct(This, &This->rootStartBlock, PROPERTY_NULL);
 
   This->smallBlockDepotChain = BlockChainStream_Construct(
-                                 This, 
-                                 &This->smallBlockDepotStart, 
+                                 This,
+                                 &This->smallBlockDepotStart,
                                  PROPERTY_NULL);
 
   /*
-   * Write the root property 
+   * Write the root property
    */
   if (fileCreate)
   {
@@ -2352,14 +2352,14 @@
    * Find the ID of the root in the property sets.
    */
   currentPropertyIndex = 0;
-  
+
   do
   {
     readSuccessful = StorageImpl_ReadProperty(
-                      This, 
-                      currentPropertyIndex, 
+                      This,
+                      currentPropertyIndex,
                       &currentProperty);
-    
+
     if (readSuccessful)
     {
       if ( (currentProperty.sizeOfNameString != 0 ) &&
@@ -2370,9 +2370,9 @@
     }
 
     currentPropertyIndex++;
-    
+
   } while (readSuccessful && (This->rootPropertySetIndex == PROPERTY_NULL) );
-  
+
   if (!readSuccessful)
   {
     /* TODO CLEANUP */
@@ -2383,10 +2383,10 @@
    * Create the block chain abstraction for the small block root chain.
    */
   This->smallBlockRootChain = BlockChainStream_Construct(
-                                This, 
-                                NULL, 
+                                This,
+                                NULL,
                                 This->rootPropertySetIndex);
-  
+
   return hr;
 }
 
@@ -2922,48 +2922,48 @@
     }
 
     StorageUtl_ReadWord(
-      headerBigBlock, 
-      OFFSET_BIGBLOCKSIZEBITS,   
+      headerBigBlock,
+      OFFSET_BIGBLOCKSIZEBITS,
       &This->bigBlockSizeBits);
 
     StorageUtl_ReadWord(
-      headerBigBlock, 
-      OFFSET_SMALLBLOCKSIZEBITS, 
+      headerBigBlock,
+      OFFSET_SMALLBLOCKSIZEBITS,
       &This->smallBlockSizeBits);
 
     StorageUtl_ReadDWord(
-      headerBigBlock, 
-      OFFSET_BBDEPOTCOUNT,      
+      headerBigBlock,
+      OFFSET_BBDEPOTCOUNT,
       &This->bigBlockDepotCount);
 
     StorageUtl_ReadDWord(
-      headerBigBlock, 
-      OFFSET_ROOTSTARTBLOCK,    
+      headerBigBlock,
+      OFFSET_ROOTSTARTBLOCK,
       &This->rootStartBlock);
 
     StorageUtl_ReadDWord(
-      headerBigBlock, 
-      OFFSET_SBDEPOTSTART,      
+      headerBigBlock,
+      OFFSET_SBDEPOTSTART,
       &This->smallBlockDepotStart);
 
-    StorageUtl_ReadDWord( 
-      headerBigBlock, 
-      OFFSET_EXTBBDEPOTSTART,   
+    StorageUtl_ReadDWord(
+      headerBigBlock,
+      OFFSET_EXTBBDEPOTSTART,
       &This->extBigBlockDepotStart);
 
     StorageUtl_ReadDWord(
-      headerBigBlock, 
-      OFFSET_EXTBBDEPOTCOUNT,   
+      headerBigBlock,
+      OFFSET_EXTBBDEPOTCOUNT,
       &This->extBigBlockDepotCount);
-    
+
     for (index = 0; index < COUNT_BBDEPOTINHEADER; index ++)
     {
       StorageUtl_ReadDWord(
-        headerBigBlock, 
+        headerBigBlock,
         OFFSET_BBDEPOTSTART + (sizeof(ULONG)*index),
         &(This->bigBlockDepotStart[index]));
     }
-    
+
     /*
      * Make the bitwise arithmetic to get the size of the blocks in bytes.
      */
@@ -2977,9 +2977,9 @@
       This->bigBlockSize   = 0x000000001 >> (DWORD)This->bigBlockSizeBits;
       This->smallBlockSize = 0x000000001 >> (DWORD)This->smallBlockSizeBits;
     }
-    
+
     /*
-     * Right now, the code is making some assumptions about the size of the 
+     * Right now, the code is making some assumptions about the size of the
      * blocks, just make sure they are what we're expecting.
      */
     if (This->bigBlockSize != DEF_BIG_BLOCK_SIZE ||
@@ -2990,13 +2990,13 @@
     }
     else
 	hr = S_OK;
-    
+
     /*
      * Release the block.
      */
     StorageImpl_ReleaseBigBlock(This, headerBigBlock);
   }
-  
+
   return hr;
 }
 
@@ -3016,7 +3016,7 @@
    * Get a pointer to the big block of data containing the header.
    */
   success = StorageImpl_ReadBigBlock(This, -1, headerBigBlock);
-  
+
   /*
    * If the block read failed, the file is probably new.
    */
@@ -3026,12 +3026,12 @@
      * Initialize for all unknown fields.
      */
     memset(headerBigBlock, 0, BIG_BLOCK_SIZE);
-    
+
     /*
      * Initialize the magic number.
      */
     memcpy(headerBigBlock, STORAGE_magic, sizeof(STORAGE_magic));
-    
+
     /*
      * And a bunch of things we don't know what they mean
      */
@@ -3041,56 +3041,56 @@
     StorageUtl_WriteDWord(headerBigBlock, 0x38, (DWORD)0x1000);
     StorageUtl_WriteDWord(headerBigBlock, 0x40, (DWORD)0x0001);
   }
-  
+
   /*
    * Write the information to the header.
    */
   if (headerBigBlock!=0)
   {
     StorageUtl_WriteWord(
-      headerBigBlock, 
-      OFFSET_BIGBLOCKSIZEBITS,   
+      headerBigBlock,
+      OFFSET_BIGBLOCKSIZEBITS,
       This->bigBlockSizeBits);
 
     StorageUtl_WriteWord(
-      headerBigBlock, 
-      OFFSET_SMALLBLOCKSIZEBITS, 
+      headerBigBlock,
+      OFFSET_SMALLBLOCKSIZEBITS,
       This->smallBlockSizeBits);
 
     StorageUtl_WriteDWord(
-      headerBigBlock, 
-      OFFSET_BBDEPOTCOUNT,      
+      headerBigBlock,
+      OFFSET_BBDEPOTCOUNT,
       This->bigBlockDepotCount);
 
     StorageUtl_WriteDWord(
-      headerBigBlock, 
-      OFFSET_ROOTSTARTBLOCK,    
+      headerBigBlock,
+      OFFSET_ROOTSTARTBLOCK,
       This->rootStartBlock);
 
     StorageUtl_WriteDWord(
-      headerBigBlock, 
-      OFFSET_SBDEPOTSTART,      
+      headerBigBlock,
+      OFFSET_SBDEPOTSTART,
       This->smallBlockDepotStart);
 
     StorageUtl_WriteDWord(
-      headerBigBlock, 
-      OFFSET_EXTBBDEPOTSTART,   
+      headerBigBlock,
+      OFFSET_EXTBBDEPOTSTART,
       This->extBigBlockDepotStart);
 
     StorageUtl_WriteDWord(
-      headerBigBlock, 
-      OFFSET_EXTBBDEPOTCOUNT,   
+      headerBigBlock,
+      OFFSET_EXTBBDEPOTCOUNT,
       This->extBigBlockDepotCount);
 
     for (index = 0; index < COUNT_BBDEPOTINHEADER; index ++)
     {
       StorageUtl_WriteDWord(
-        headerBigBlock, 
+        headerBigBlock,
         OFFSET_BBDEPOTSTART + (sizeof(ULONG)*index),
         (This->bigBlockDepotStart[index]));
     }
   }
-  
+
   /*
    * Write the big block back to the file.
    */
@@ -3114,7 +3114,7 @@
 
   offsetInPropSet.s.HighPart = 0;
   offsetInPropSet.s.LowPart  = index * PROPSET_BLOCK_SIZE;
-  
+
   readSuccessful = BlockChainStream_ReadAt(
                     This->rootBlockChain,
                     offsetInPropSet,
@@ -3130,66 +3130,66 @@
 
     memset(buffer->name, 0, sizeof(buffer->name));
     memcpy(
-      buffer->name, 
-      propName, 
+      buffer->name,
+      propName,
       PROPERTY_NAME_BUFFER_LEN );
     TRACE("storage name: %s\n", debugstr_w(buffer->name));
 
     memcpy(&buffer->propertyType, currentProperty + OFFSET_PS_PROPERTYTYPE, 1);
-    
+
     StorageUtl_ReadWord(
-      currentProperty,  
-      OFFSET_PS_NAMELENGTH,  
+      currentProperty,
+      OFFSET_PS_NAMELENGTH,
       &buffer->sizeOfNameString);
 
     StorageUtl_ReadDWord(
-      currentProperty, 
-      OFFSET_PS_PREVIOUSPROP, 
+      currentProperty,
+      OFFSET_PS_PREVIOUSPROP,
       &buffer->previousProperty);
 
     StorageUtl_ReadDWord(
-      currentProperty, 
-      OFFSET_PS_NEXTPROP,     
+      currentProperty,
+      OFFSET_PS_NEXTPROP,
       &buffer->nextProperty);
 
     StorageUtl_ReadDWord(
-      currentProperty, 
-      OFFSET_PS_DIRPROP,      
+      currentProperty,
+      OFFSET_PS_DIRPROP,
       &buffer->dirProperty);
 
     StorageUtl_ReadGUID(
-      currentProperty,  
-      OFFSET_PS_GUID,        
+      currentProperty,
+      OFFSET_PS_GUID,
       &buffer->propertyUniqueID);
 
     StorageUtl_ReadDWord(
-      currentProperty, 
-      OFFSET_PS_TSS1,         
+      currentProperty,
+      OFFSET_PS_TSS1,
       &buffer->timeStampS1);
 
     StorageUtl_ReadDWord(
-      currentProperty, 
-      OFFSET_PS_TSD1,         
+      currentProperty,
+      OFFSET_PS_TSD1,
       &buffer->timeStampD1);
 
     StorageUtl_ReadDWord(
-      currentProperty, 
-      OFFSET_PS_TSS2,         
+      currentProperty,
+      OFFSET_PS_TSS2,
       &buffer->timeStampS2);
 
     StorageUtl_ReadDWord(
-      currentProperty, 
-      OFFSET_PS_TSD2,         
+      currentProperty,
+      OFFSET_PS_TSD2,
       &buffer->timeStampD2);
 
     StorageUtl_ReadDWord(
-      currentProperty, 
-      OFFSET_PS_STARTBLOCK,   
+      currentProperty,
+      OFFSET_PS_STARTBLOCK,
       &buffer->startingBlock);
 
     StorageUtl_ReadDWord(
-      currentProperty, 
-      OFFSET_PS_SIZE,         
+      currentProperty,
+      OFFSET_PS_SIZE,
       &buffer->size.s.LowPart);
 
     buffer->size.s.HighPart = 0;
@@ -3217,65 +3217,65 @@
   memset(currentProperty, 0, PROPSET_BLOCK_SIZE);
 
   memcpy(
-    currentProperty + OFFSET_PS_NAME, 
-    buffer->name, 
+    currentProperty + OFFSET_PS_NAME,
+    buffer->name,
     PROPERTY_NAME_BUFFER_LEN );
 
   memcpy(currentProperty + OFFSET_PS_PROPERTYTYPE, &buffer->propertyType, 1);
 
   StorageUtl_WriteWord(
-    currentProperty,  
-      OFFSET_PS_NAMELENGTH,   
+    currentProperty,
+      OFFSET_PS_NAMELENGTH,
       buffer->sizeOfNameString);
 
   StorageUtl_WriteDWord(
-    currentProperty, 
-      OFFSET_PS_PREVIOUSPROP, 
+    currentProperty,
+      OFFSET_PS_PREVIOUSPROP,
       buffer->previousProperty);
 
   StorageUtl_WriteDWord(
-    currentProperty, 
-      OFFSET_PS_NEXTPROP,     
+    currentProperty,
+      OFFSET_PS_NEXTPROP,
       buffer->nextProperty);
 
   StorageUtl_WriteDWord(
-    currentProperty, 
-      OFFSET_PS_DIRPROP,      
+    currentProperty,
+      OFFSET_PS_DIRPROP,
       buffer->dirProperty);
 
   StorageUtl_WriteGUID(
-    currentProperty,  
-      OFFSET_PS_GUID,        
+    currentProperty,
+      OFFSET_PS_GUID,
       &buffer->propertyUniqueID);
 
   StorageUtl_WriteDWord(
-    currentProperty, 
-      OFFSET_PS_TSS1,         
+    currentProperty,
+      OFFSET_PS_TSS1,
       buffer->timeStampS1);
 
   StorageUtl_WriteDWord(
-    currentProperty, 
-      OFFSET_PS_TSD1,         
+    currentProperty,
+      OFFSET_PS_TSD1,
       buffer->timeStampD1);
 
   StorageUtl_WriteDWord(
-    currentProperty, 
-      OFFSET_PS_TSS2,         
+    currentProperty,
+      OFFSET_PS_TSS2,
       buffer->timeStampS2);
 
   StorageUtl_WriteDWord(
-    currentProperty, 
-      OFFSET_PS_TSD2,         
+    currentProperty,
+      OFFSET_PS_TSD2,
       buffer->timeStampD2);
 
   StorageUtl_WriteDWord(
-    currentProperty, 
-      OFFSET_PS_STARTBLOCK,   
+    currentProperty,
+      OFFSET_PS_STARTBLOCK,
       buffer->startingBlock);
 
   StorageUtl_WriteDWord(
-    currentProperty, 
-      OFFSET_PS_SIZE,         
+    currentProperty,
+      OFFSET_PS_SIZE,
       buffer->size.s.LowPart);
 
   writeSuccessful = BlockChainStream_WriteAt(This->rootBlockChain,
@@ -3321,10 +3321,10 @@
     memcpy(bigBlockBuffer, buffer, This->bigBlockSize);
 
     StorageImpl_ReleaseBigBlock(This, bigBlockBuffer);
-    
+
     return TRUE;
   }
-  
+
   return FALSE;
 }
 
@@ -3454,7 +3454,7 @@
 */
 
 StorageInternalImpl* StorageInternalImpl_Construct(
-  StorageImpl* ancestorStorage,  
+  StorageImpl* ancestorStorage,
   ULONG          rootPropertyIndex)
 {
   StorageInternalImpl* newStorage;
@@ -3505,13 +3505,13 @@
 ** The non-root storages cannot be opened in transacted mode thus this function
 ** does nothing.
 */
-HRESULT WINAPI StorageInternalImpl_Commit( 
+HRESULT WINAPI StorageInternalImpl_Commit(
   IStorage*            iface,
-  DWORD                  grfCommitFlags)  /* [in] */ 
+  DWORD                  grfCommitFlags)  /* [in] */
 {
   return S_OK;
 }
-        
+
 /******************************************************************************
 **
 ** Storage32InternalImpl_Revert
@@ -3519,7 +3519,7 @@
 ** The non-root storages cannot be opened in transacted mode thus this function
 ** does nothing.
 */
-HRESULT WINAPI StorageInternalImpl_Revert( 
+HRESULT WINAPI StorageInternalImpl_Revert(
   IStorage*            iface)
 {
   return S_OK;
@@ -3536,7 +3536,7 @@
   IEnumSTATSTGImpl* newEnumeration;
 
   newEnumeration = HeapAlloc(GetProcessHeap(), 0, sizeof(IEnumSTATSTGImpl));
-  
+
   if (newEnumeration!=0)
   {
     /*
@@ -3544,30 +3544,30 @@
      */
     ICOM_VTBL(newEnumeration) = &IEnumSTATSTGImpl_Vtbl;
     newEnumeration->ref       = 0;
-    
+
     /*
      * We want to nail-down the reference to the storage in case the
      * enumeration out-lives the storage in the client application.
      */
     newEnumeration->parentStorage = parentStorage;
     IStorage_AddRef((IStorage*)newEnumeration->parentStorage);
-    
+
     newEnumeration->firstPropertyNode   = firstPropertyNode;
-    
+
     /*
      * Initialize the search stack
      */
     newEnumeration->stackSize    = 0;
     newEnumeration->stackMaxSize = ENUMSTATSGT_SIZE_INCREMENT;
-    newEnumeration->stackToVisit = 
+    newEnumeration->stackToVisit =
       HeapAlloc(GetProcessHeap(), 0, sizeof(ULONG)*ENUMSTATSGT_SIZE_INCREMENT);
-    
+
     /*
      * Make sure the current node of the iterator is the first one.
      */
     IEnumSTATSTGImpl_Reset((IEnumSTATSTG*)newEnumeration);
   }
-  
+
   return newEnumeration;
 }
 
@@ -3599,11 +3599,11 @@
   /*
    * Compare the riid with the interface IDs implemented by this object.
    */
-  if (memcmp(&IID_IUnknown, riid, sizeof(IID_IUnknown)) == 0) 
+  if (memcmp(&IID_IUnknown, riid, sizeof(IID_IUnknown)) == 0)
   {
     *ppvObject = (IEnumSTATSTG*)This;
   }
-  else if (memcmp(&IID_IStorage, riid, sizeof(IID_IEnumSTATSTG)) == 0) 
+  else if (memcmp(&IID_IStorage, riid, sizeof(IID_IEnumSTATSTG)) == 0)
   {
     *ppvObject = (IEnumSTATSTG*)This;
   }
@@ -3622,7 +3622,7 @@
 
   return S_OK;
 }
-        
+
 ULONG   WINAPI IEnumSTATSTGImpl_AddRef(
   IEnumSTATSTG* iface)
 {
@@ -3631,7 +3631,7 @@
   This->ref++;
   return This->ref;
 }
-        
+
 ULONG   WINAPI IEnumSTATSTGImpl_Release(
   IEnumSTATSTG* iface)
 {
@@ -3650,7 +3650,7 @@
     IEnumSTATSTGImpl_Destroy(This);
   }
 
-  return newRef;;
+  return newRef;
 }
 
 HRESULT WINAPI IEnumSTATSTGImpl_Next(
@@ -3670,15 +3670,15 @@
    * Perform a sanity check on the parameters.
    */
   if ( (rgelt==0) || ( (celt!=1) && (pceltFetched==0) ) )
-    return E_INVALIDARG;  
-  
+    return E_INVALIDARG;
+
   /*
    * To avoid the special case, get another pointer to a ULONG value if
    * the caller didn't supply one.
    */
   if (pceltFetched==0)
     pceltFetched = &objectFetched;
-  
+
   /*
    * Start the iteration, we will iterate until we hit the end of the
    * linked list or until we hit the number of items to iterate through
@@ -3690,10 +3690,10 @@
    */
   currentSearchNode = IEnumSTATSTGImpl_PopSearchNode(This, FALSE);
 
-  while ( ( *pceltFetched < celt) && 
+  while ( ( *pceltFetched < celt) &&
           ( currentSearchNode!=PROPERTY_NULL) )
   {
-    /* 
+    /*
      * Remove the top node from the stack
      */
     IEnumSTATSTGImpl_PopSearchNode(This, TRUE);
@@ -3702,7 +3702,7 @@
      * Read the property from the storage.
      */
     StorageImpl_ReadProperty(This->parentStorage,
-      currentSearchNode, 
+      currentSearchNode,
       &currentProperty);
 
     /*
@@ -3711,7 +3711,7 @@
     StorageUtl_CopyPropertyToSTATSTG(currentReturnStruct,
       &currentProperty,
       STATFLAG_DEFAULT);
-        
+
     /*
      * Step to the next item in the iteration
      */
@@ -3735,7 +3735,7 @@
   return S_FALSE;
 }
 
-        
+
 HRESULT WINAPI IEnumSTATSTGImpl_Skip(
   IEnumSTATSTG* iface,
   ULONG             celt)
@@ -3751,10 +3751,10 @@
    */
   currentSearchNode = IEnumSTATSTGImpl_PopSearchNode(This, FALSE);
 
-  while ( (objectFetched < celt) && 
+  while ( (objectFetched < celt) &&
           (currentSearchNode!=PROPERTY_NULL) )
   {
-    /* 
+    /*
      * Remove the top node from the stack
      */
     IEnumSTATSTGImpl_PopSearchNode(This, TRUE);
@@ -3763,9 +3763,9 @@
      * Read the property from the storage.
      */
     StorageImpl_ReadProperty(This->parentStorage,
-      currentSearchNode, 
+      currentSearchNode,
       &currentProperty);
-    
+
     /*
      * Step to the next item in the iteration
      */
@@ -3787,7 +3787,7 @@
 
   return S_FALSE;
 }
-        
+
 HRESULT WINAPI IEnumSTATSTGImpl_Reset(
   IEnumSTATSTG* iface)
 {
@@ -3806,7 +3806,7 @@
    */
   readSuccessful = StorageImpl_ReadProperty(
                     This->parentStorage,
-                    This->firstPropertyNode, 
+                    This->firstPropertyNode,
                     &rootProperty);
 
   if (readSuccessful)
@@ -3821,7 +3821,7 @@
 
   return S_OK;
 }
-        
+
 HRESULT WINAPI IEnumSTATSTGImpl_Clone(
   IEnumSTATSTG* iface,
   IEnumSTATSTG**    ppenum)
@@ -3835,23 +3835,23 @@
    */
   if (ppenum==0)
     return E_INVALIDARG;
-  
+
   newClone = IEnumSTATSTGImpl_Construct(This->parentStorage,
                This->firstPropertyNode);
 
-  
+
   /*
    * The new clone enumeration must point to the same current node as
    * the ole one.
    */
   newClone->stackSize    = This->stackSize    ;
   newClone->stackMaxSize = This->stackMaxSize ;
-  newClone->stackToVisit = 
+  newClone->stackToVisit =
     HeapAlloc(GetProcessHeap(), 0, sizeof(ULONG) * newClone->stackMaxSize);
 
   memcpy(
-    newClone->stackToVisit, 
-    This->stackToVisit, 
+    newClone->stackToVisit,
+    This->stackToVisit,
     sizeof(ULONG) * newClone->stackSize);
 
   *ppenum = (IEnumSTATSTG*)newClone;
@@ -3867,7 +3867,7 @@
 
 INT IEnumSTATSTGImpl_FindParentProperty(
   IEnumSTATSTGImpl *This,
-  ULONG             childProperty, 
+  ULONG             childProperty,
   StgProperty      *currentProperty,
   ULONG            *thisNodeId)
 {
@@ -3885,7 +3885,7 @@
    * Start with the node at the top of the stack.
    */
   currentSearchNode = IEnumSTATSTGImpl_PopSearchNode(This, FALSE);
-  
+
 
   while (currentSearchNode!=PROPERTY_NULL)
   {
@@ -3894,7 +3894,7 @@
      */
     *thisNodeId = currentSearchNode;
 
-    /* 
+    /*
      * Remove the top node from the stack
      */
     IEnumSTATSTGImpl_PopSearchNode(This, TRUE);
@@ -3904,18 +3904,18 @@
      */
     StorageImpl_ReadProperty(
       This->parentStorage,
-      currentSearchNode, 
+      currentSearchNode,
       currentProperty);
-      
+
     if (currentProperty->previousProperty == childProperty)
       return PROPERTY_RELATION_PREVIOUS;
 
-    else if (currentProperty->nextProperty == childProperty)  
+    else if (currentProperty->nextProperty == childProperty)
       return PROPERTY_RELATION_NEXT;
-  
+
     else if (currentProperty->dirProperty == childProperty)
       return PROPERTY_RELATION_DIR;
-       
+
     /*
      * Push the next search node in the search stack.
      */
@@ -3944,7 +3944,7 @@
 
   while (currentSearchNode!=PROPERTY_NULL)
   {
-    /* 
+    /*
      * Remove the top node from the stack
      */
     IEnumSTATSTGImpl_PopSearchNode(This, TRUE);
@@ -3953,11 +3953,11 @@
      * Read the property from the storage.
      */
     StorageImpl_ReadProperty(This->parentStorage,
-      currentSearchNode, 
+      currentSearchNode,
       currentProperty);
 
     if ( propertyNameCmp(
-          (OLECHAR*)currentProperty->name, 
+          (OLECHAR*)currentProperty->name,
           (OLECHAR*)lpszPropName) == 0)
       return currentSearchNode;
 
@@ -3996,7 +3996,7 @@
     This->stackMaxSize += ENUMSTATSGT_SIZE_INCREMENT;
 
     This->stackToVisit = HeapReAlloc(
-                           GetProcessHeap(), 
+                           GetProcessHeap(),
                            0,
                            This->stackToVisit,
                            sizeof(ULONG) * This->stackMaxSize);
@@ -4010,7 +4010,7 @@
    */
   readSuccessful = StorageImpl_ReadProperty(
                     This->parentStorage,
-                    nodeToPush, 
+                    nodeToPush,
                     &rootProperty);
 
   if (readSuccessful)
@@ -4097,12 +4097,12 @@
   }
   else
   {
-    destination->pwcsName = 
+    destination->pwcsName =
       CoTaskMemAlloc((lstrlenW(source->name)+1)*sizeof(WCHAR));
 
     strcpyW((LPWSTR)destination->pwcsName, source->name);
   }
-  
+
   switch (source->propertyType)
   {
     case PROPTYPE_STORAGE:
@@ -4114,20 +4114,20 @@
       break;
     default:
       destination->type = STGTY_STREAM;
-      break;        
+      break;
   }
 
   destination->cbSize            = source->size;
-/*    
+/*
   currentReturnStruct->mtime     = {0}; TODO
   currentReturnStruct->ctime     = {0};
-  currentReturnStruct->atime     = {0}; 
+  currentReturnStruct->atime     = {0};
 */
   destination->grfMode           = 0;
-  destination->grfLocksSupported = 0; 
+  destination->grfLocksSupported = 0;
   destination->clsid             = source->propertyUniqueID;
-  destination->grfStateBits      = 0; 
-  destination->reserved          = 0; 
+  destination->grfStateBits      = 0;
+  destination->reserved          = 0;
 }
 
 /******************************************************************************
@@ -4135,7 +4135,7 @@
 */
 
 BlockChainStream* BlockChainStream_Construct(
-  StorageImpl* parentStorage,  
+  StorageImpl* parentStorage,
   ULONG*         headOfStreamPlaceHolder,
   ULONG          propertyIndex)
 {
@@ -4208,7 +4208,7 @@
  *
  * Returns the number of blocks that comprises this chain.
  * This is not the size of the stream as the last block may not be full!
- * 
+ *
  */
 ULONG BlockChainStream_GetCount(BlockChainStream* This)
 {
@@ -4222,7 +4222,7 @@
     count++;
 
     blockIndex = StorageImpl_GetNextBlockInChain(
-                   This->parentStorage, 
+                   This->parentStorage,
                    blockIndex);
   }
 
@@ -4230,7 +4230,7 @@
 }
 
 /******************************************************************************
- *      BlockChainStream_ReadAt 
+ *      BlockChainStream_ReadAt
  *
  * Reads a specified number of bytes from this chain at the specified offset.
  * bytesRead may be NULL.
@@ -4270,9 +4270,9 @@
 
   while ( (blockNoInSequence > 0) &&  (blockIndex != BLOCK_END_OF_CHAIN))
   {
-    blockIndex = 
+    blockIndex =
       StorageImpl_GetNextBlockInChain(This->parentStorage, blockIndex);
-    
+
     blockNoInSequence--;
   }
 
@@ -4283,29 +4283,29 @@
    */
   *bytesRead   = 0;
   bufferWalker = buffer;
-  
+
   while ( (size > 0) && (blockIndex != BLOCK_END_OF_CHAIN) )
   {
     /*
      * Calculate how many bytes we can copy from this big block.
      */
-    bytesToReadInBuffer = 
+    bytesToReadInBuffer =
       min(This->parentStorage->bigBlockSize - offsetInBlock, size);
-    
+
     /*
      * Copy those bytes to the buffer
      */
-    bigBlockBuffer = 
+    bigBlockBuffer =
       StorageImpl_GetROBigBlock(This->parentStorage, blockIndex);
-    
+
     memcpy(bufferWalker, bigBlockBuffer + offsetInBlock, bytesToReadInBuffer);
-    
+
     StorageImpl_ReleaseBigBlock(This->parentStorage, bigBlockBuffer);
-    
+
     /*
      * Step to the next big block.
      */
-    blockIndex    = 
+    blockIndex    =
       StorageImpl_GetNextBlockInChain(This->parentStorage, blockIndex);
 
     bufferWalker += bytesToReadInBuffer;
@@ -4314,7 +4314,7 @@
     offsetInBlock = 0;  /* There is no offset on the next block */
 
   }
-  
+
   return (size == 0);
 }
 
@@ -4359,9 +4359,9 @@
 
   while ( (blockNoInSequence > 0) &&  (blockIndex != BLOCK_END_OF_CHAIN))
   {
-    blockIndex = 
+    blockIndex =
       StorageImpl_GetNextBlockInChain(This->parentStorage, blockIndex);
-    
+
     blockNoInSequence--;
   }
 
@@ -4379,22 +4379,22 @@
     /*
      * Calculate how many bytes we can copy from this big block.
      */
-    bytesToWrite = 
+    bytesToWrite =
       min(This->parentStorage->bigBlockSize - offsetInBlock, size);
-    
+
     /*
      * Copy those bytes to the buffer
      */
     bigBlockBuffer = StorageImpl_GetBigBlock(This->parentStorage, blockIndex);
-    
+
     memcpy(bigBlockBuffer + offsetInBlock, bufferWalker, bytesToWrite);
-    
+
     StorageImpl_ReleaseBigBlock(This->parentStorage, bigBlockBuffer);
-    
+
     /*
      * Step to the next big block.
      */
-    blockIndex    = 
+    blockIndex    =
       StorageImpl_GetNextBlockInChain(This->parentStorage, blockIndex);
 
     bufferWalker  += bytesToWrite;
@@ -4402,7 +4402,7 @@
     *bytesWritten += bytesToWrite;
     offsetInBlock  = 0;      /* There is no offset on the next block */
   }
-  
+
   return (size == 0);
 }
 
@@ -4439,20 +4439,20 @@
    */
   while (count < numBlocks)
   {
-    blockIndex = 
+    blockIndex =
       StorageImpl_GetNextBlockInChain(This->parentStorage, blockIndex);
 
     count++;
   }
 
   /* Get the next block before marking the new end */
-  extraBlock = 
+  extraBlock =
     StorageImpl_GetNextBlockInChain(This->parentStorage, blockIndex);
 
   /* Mark the new end of chain */
   StorageImpl_SetNextBlockInChain(
-    This->parentStorage, 
-    blockIndex, 
+    This->parentStorage,
+    blockIndex,
     BLOCK_END_OF_CHAIN);
 
   This->tailIndex = blockIndex;
@@ -4463,7 +4463,7 @@
    */
   while (extraBlock != BLOCK_END_OF_CHAIN)
   {
-    blockIndex = 
+    blockIndex =
       StorageImpl_GetNextBlockInChain(This->parentStorage, extraBlock);
 
     StorageImpl_FreeBigBlock(This->parentStorage, extraBlock);
@@ -4507,14 +4507,14 @@
       assert(This->ownerPropertyIndex != PROPERTY_NULL);
 
       StorageImpl_ReadProperty(
-        This->parentStorage, 
+        This->parentStorage,
         This->ownerPropertyIndex,
         &chainProp);
 
-      chainProp.startingBlock = blockIndex; 
+      chainProp.startingBlock = blockIndex;
 
       StorageImpl_WriteProperty(
-        This->parentStorage, 
+        This->parentStorage,
         This->ownerPropertyIndex,
         &chainProp);
     }
@@ -4563,13 +4563,13 @@
       blockIndex = StorageImpl_GetNextFreeBigBlock(This->parentStorage);
 
       StorageImpl_SetNextBlockInChain(
-	This->parentStorage, 
-	currentBlock, 
+	This->parentStorage,
+	currentBlock,
 	blockIndex);
 
       StorageImpl_SetNextBlockInChain(
-        This->parentStorage, 
-	blockIndex, 
+        This->parentStorage,
+	blockIndex,
 	BLOCK_END_OF_CHAIN);
 
       currentBlock = blockIndex;
@@ -4591,7 +4591,7 @@
  *
  * TODO: Free the actual blocks in the file when we shrink the chain.
  *       Currently, the blocks are still in the file. So the file size
- *       doesn't shrink even if we shrink streams. 
+ *       doesn't shrink even if we shrink streams.
  */
 BOOL BlockChainStream_SetSize(
   BlockChainStream* This,
@@ -4608,7 +4608,7 @@
   }
   else
   {
-    ULARGE_INTEGER fileSize = 
+    ULARGE_INTEGER fileSize =
       BIGBLOCKFILE_GetSize(This->parentStorage->bigBlockFile);
 
     ULONG diff = newSize.s.LowPart - size.s.LowPart;
@@ -4617,7 +4617,7 @@
      * Make sure the file stays a multiple of blocksize
      */
     if ((diff % This->parentStorage->bigBlockSize) != 0)
-      diff += (This->parentStorage->bigBlockSize - 
+      diff += (This->parentStorage->bigBlockSize -
                 (diff % This->parentStorage->bigBlockSize) );
 
     fileSize.s.LowPart += diff;
@@ -4641,8 +4641,8 @@
 
   if(This->headOfStreamPlaceHolder == NULL)
   {
-    /* 
-     * This chain is a data stream read the property and return 
+    /*
+     * This chain is a data stream read the property and return
      * the appropriate size
      */
     StorageImpl_ReadProperty(
@@ -4655,15 +4655,15 @@
   else
   {
     /*
-     * this chain is a chain that does not have a property, figure out the 
-     * size by making the product number of used blocks times the 
+     * this chain is a chain that does not have a property, figure out the
+     * size by making the product number of used blocks times the
      * size of them
      */
     ULARGE_INTEGER result;
     result.s.HighPart = 0;
 
-    result.s.LowPart  = 
-      BlockChainStream_GetCount(This) * 
+    result.s.LowPart  =
+      BlockChainStream_GetCount(This) *
       This->parentStorage->bigBlockSize;
 
     return result;
@@ -4675,7 +4675,7 @@
 */
 
 SmallBlockChainStream* SmallBlockChainStream_Construct(
-  StorageImpl* parentStorage,  
+  StorageImpl* parentStorage,
   ULONG          propertyIndex)
 {
   SmallBlockChainStream* newStream;
@@ -4726,7 +4726,7 @@
  *      SmallBlockChainStream_GetNextBlockInChain
  *
  * Returns the index of the next small block in this chain.
- * 
+ *
  * Return Values:
  *    - BLOCK_END_OF_CHAIN: end of this chain
  *    - BLOCK_UNUSED: small block 'blockIndex' is free
@@ -4853,7 +4853,7 @@
     }
     else
     {
-      ULONG count = 
+      ULONG count =
         BlockChainStream_GetCount(This->parentStorage->smallBlockDepotChain);
 
       ULONG sbdIndex = This->parentStorage->smallBlockDepotStart;
@@ -4864,26 +4864,26 @@
       while (nextBlock != BLOCK_END_OF_CHAIN)
       {
         sbdIndex = nextBlock;
-        nextBlock = 
+        nextBlock =
           StorageImpl_GetNextBlockInChain(This->parentStorage, sbdIndex);
       }
 
       newsbdIndex = StorageImpl_GetNextFreeBigBlock(This->parentStorage);
       if (sbdIndex != BLOCK_END_OF_CHAIN)
         StorageImpl_SetNextBlockInChain(
-          This->parentStorage, 
-          sbdIndex, 
+          This->parentStorage,
+          sbdIndex,
           newsbdIndex);
 
       StorageImpl_SetNextBlockInChain(
-        This->parentStorage, 
-        newsbdIndex, 
+        This->parentStorage,
+        newsbdIndex,
         BLOCK_END_OF_CHAIN);
 
       /*
        * Initialize all the small blocks to free
        */
-      smallBlockDepot = 
+      smallBlockDepot =
         StorageImpl_GetBigBlock(This->parentStorage, newsbdIndex);
 
       memset(smallBlockDepot, BLOCK_UNUSED, This->parentStorage->bigBlockSize);
@@ -4895,7 +4895,7 @@
          * We have just created the small block depot.
          */
         StgProperty rootProp;
-        ULONG sbStartIndex; 
+        ULONG sbStartIndex;
 
         /*
          * Save it in the header
@@ -4904,19 +4904,19 @@
         StorageImpl_SaveFileHeader(This->parentStorage);
 
         /*
-         * And allocate the first big block that will contain small blocks 
+         * And allocate the first big block that will contain small blocks
          */
-        sbStartIndex = 
+        sbStartIndex =
           StorageImpl_GetNextFreeBigBlock(This->parentStorage);
 
         StorageImpl_SetNextBlockInChain(
-          This->parentStorage, 
-          sbStartIndex, 
+          This->parentStorage,
+          sbStartIndex,
           BLOCK_END_OF_CHAIN);
 
         StorageImpl_ReadProperty(
-          This->parentStorage, 
-          This->parentStorage->rootPropertySetIndex, 
+          This->parentStorage,
+          This->parentStorage->rootPropertySetIndex,
           &rootProp);
 
         rootProp.startingBlock = sbStartIndex;
@@ -4924,14 +4924,14 @@
         rootProp.size.s.LowPart  = This->parentStorage->bigBlockSize;
 
         StorageImpl_WriteProperty(
-          This->parentStorage, 
-          This->parentStorage->rootPropertySetIndex, 
+          This->parentStorage,
+          This->parentStorage->rootPropertySetIndex,
           &rootProp);
       }
     }
   }
 
-  smallBlocksPerBigBlock = 
+  smallBlocksPerBigBlock =
     This->parentStorage->bigBlockSize / This->parentStorage->smallBlockSize;
 
   /*
@@ -4943,22 +4943,22 @@
     ULONG blocksRequired = (blockIndex / smallBlocksPerBigBlock) + 1;
 
     StorageImpl_ReadProperty(
-      This->parentStorage, 
-      This->parentStorage->rootPropertySetIndex, 
+      This->parentStorage,
+      This->parentStorage->rootPropertySetIndex,
       &rootProp);
 
-    if (rootProp.size.s.LowPart < 
+    if (rootProp.size.s.LowPart <
        (blocksRequired * This->parentStorage->bigBlockSize))
     {
       rootProp.size.s.LowPart += This->parentStorage->bigBlockSize;
 
       BlockChainStream_SetSize(
-        This->parentStorage->smallBlockRootChain, 
+        This->parentStorage->smallBlockRootChain,
         rootProp.size);
 
       StorageImpl_WriteProperty(
-        This->parentStorage, 
-        This->parentStorage->rootPropertySetIndex, 
+        This->parentStorage,
+        This->parentStorage->rootPropertySetIndex,
         &rootProp);
     }
   }
@@ -4971,7 +4971,7 @@
  *
  * Reads a specified number of bytes from this chain at the specified offset.
  * bytesRead may be NULL.
- * Failure will be returned if the specified number of bytes has not been read. 
+ * Failure will be returned if the specified number of bytes has not been read.
  */
 BOOL SmallBlockChainStream_ReadAt(
   SmallBlockChainStream* This,
@@ -4981,7 +4981,7 @@
   ULONG*                 bytesRead)
 {
   ULARGE_INTEGER offsetInBigBlockFile;
-  ULONG blockNoInSequence = 
+  ULONG blockNoInSequence =
     offset.s.LowPart / This->parentStorage->smallBlockSize;
 
   ULONG offsetInBlock = offset.s.LowPart % This->parentStorage->smallBlockSize;
@@ -5018,14 +5018,14 @@
     /*
      * Calculate how many bytes we can copy from this small block.
      */
-    bytesToReadInBuffer = 
+    bytesToReadInBuffer =
       min(This->parentStorage->smallBlockSize - offsetInBlock, size);
 
     /*
      * Calculate the offset of the small block in the small block file.
      */
     offsetInBigBlockFile.s.HighPart  = 0;
-    offsetInBigBlockFile.s.LowPart   = 
+    offsetInBigBlockFile.s.LowPart   =
       blockIndex * This->parentStorage->smallBlockSize;
 
     offsetInBigBlockFile.s.LowPart  += offsetInBlock;
@@ -5069,7 +5069,7 @@
   ULONG*         bytesWritten)
 {
   ULARGE_INTEGER offsetInBigBlockFile;
-  ULONG blockNoInSequence = 
+  ULONG blockNoInSequence =
     offset.s.LowPart / This->parentStorage->smallBlockSize;
 
   ULONG offsetInBlock = offset.s.LowPart % This->parentStorage->smallBlockSize;
@@ -5077,24 +5077,24 @@
   ULONG blockIndex;
   ULONG bytesWrittenFromBigBlockFile;
   BYTE* bufferWalker;
-  
+
   /*
    * This should never happen on a small block file.
    */
   assert(offset.s.HighPart==0);
-  
+
   /*
    * Find the first block in the stream that contains part of the buffer.
    */
   blockIndex = SmallBlockChainStream_GetHeadOfChain(This);
-  
+
   while ( (blockNoInSequence > 0) &&  (blockIndex != BLOCK_END_OF_CHAIN))
   {
     blockIndex = SmallBlockChainStream_GetNextBlockInChain(This, blockIndex);
-    
+
     blockNoInSequence--;
   }
-  
+
   /*
    * Start writing the buffer.
    *
@@ -5108,18 +5108,18 @@
     /*
      * Calculate how many bytes we can copy to this small block.
      */
-    bytesToWriteInBuffer = 
+    bytesToWriteInBuffer =
       min(This->parentStorage->smallBlockSize - offsetInBlock, size);
-    
+
     /*
      * Calculate the offset of the small block in the small block file.
      */
     offsetInBigBlockFile.s.HighPart  = 0;
-    offsetInBigBlockFile.s.LowPart   = 
+    offsetInBigBlockFile.s.LowPart   =
       blockIndex * This->parentStorage->smallBlockSize;
 
     offsetInBigBlockFile.s.LowPart  += offsetInBlock;
-    
+
     /*
      * Write those bytes in the buffer to the small block file.
      */
@@ -5128,9 +5128,9 @@
       bytesToWriteInBuffer,
       bufferWalker,
       &bytesWrittenFromBigBlockFile);
-    
+
     assert(bytesWrittenFromBigBlockFile == bytesToWriteInBuffer);
-    
+
     /*
      * Step to the next big block.
      */
@@ -5140,14 +5140,14 @@
     *bytesWritten += bytesToWriteInBuffer;
     offsetInBlock  = 0;     /* There is no offset on the next block */
   }
-  
+
   return (size == 0);
 }
 
 /******************************************************************************
  *       SmallBlockChainStream_Shrink
  *
- * Shrinks this chain in the small block depot. 
+ * Shrinks this chain in the small block depot.
  */
 BOOL SmallBlockChainStream_Shrink(
   SmallBlockChainStream* This,
@@ -5175,13 +5175,13 @@
 
   /*
    * If the count is 0, we have a special case, the head of the chain was
-   * just freed. 
+   * just freed.
    */
   if (count == 0)
   {
     StgProperty chainProp;
 
-    StorageImpl_ReadProperty(This->parentStorage, 
+    StorageImpl_ReadProperty(This->parentStorage,
 			     This->ownerPropertyIndex,
 			     &chainProp);
 
@@ -5203,8 +5203,8 @@
 
     /* Mark the new end of chain */
     SmallBlockChainStream_SetNextBlockInChain(
-      This, 
-      blockIndex, 
+      This,
+      blockIndex,
       BLOCK_END_OF_CHAIN);
   }
 
@@ -5218,7 +5218,7 @@
     extraBlock = blockIndex;
   }
 
-  return TRUE;  
+  return TRUE;
 }
 
 /******************************************************************************
@@ -5254,8 +5254,8 @@
 
     blockIndex = chainProp.startingBlock;
     SmallBlockChainStream_SetNextBlockInChain(
-      This, 
-      blockIndex, 
+      This,
+      blockIndex,
       BLOCK_END_OF_CHAIN);
   }
 
@@ -5288,8 +5288,8 @@
     SmallBlockChainStream_SetNextBlockInChain(This, currentBlock, blockIndex);
 
     SmallBlockChainStream_SetNextBlockInChain(
-      This, 
-      blockIndex, 
+      This,
+      blockIndex,
       BLOCK_END_OF_CHAIN);
 
     currentBlock = blockIndex;
@@ -5330,7 +5330,7 @@
  *
  * TODO: Free the actual blocks in the file when we shrink the chain.
  *       Currently, the blocks are still in the file. So the file size
- *       doesn't shrink even if we shrink streams. 
+ *       doesn't shrink even if we shrink streams.
  */
 BOOL SmallBlockChainStream_SetSize(
                 SmallBlockChainStream* This,
@@ -5388,8 +5388,8 @@
   DWORD          fileAttributes;
   WCHAR          tempFileName[MAX_PATH];
 
-  TRACE("(%s, %lx, %ld, %p)\n", 
-	debugstr_w(pwcsName), grfMode, 
+  TRACE("(%s, %lx, %ld, %p)\n",
+	debugstr_w(pwcsName), grfMode,
 	reserved, ppstgOpen);
 
   /*
@@ -5436,7 +5436,7 @@
   }
 
   /*
-   * Interpret the STGM value grfMode 
+   * Interpret the STGM value grfMode
    */
   shareMode    = GetShareModeFromSTGM(grfMode);
   accessMode   = GetAccessModeFromSTGM(grfMode);
@@ -5461,7 +5461,7 @@
                         creationMode,
                         fileAttributes,
             0);
- 
+
   if (hFile == INVALID_HANDLE_VALUE)
   {
     return E_FAIL;
@@ -5471,7 +5471,7 @@
    * Allocate and initialize the new IStorage32object.
    */
   newStorage = HeapAlloc(GetProcessHeap(), 0, sizeof(StorageImpl));
- 
+
   if (newStorage == 0)
     return STG_E_INSUFFICIENTMEMORY;
 
@@ -5483,7 +5483,7 @@
          grfMode,
          TRUE,
          TRUE);
- 
+
   if (FAILED(hr))
   {
     HeapFree(GetProcessHeap(), 0, newStorage);
@@ -5509,7 +5509,7 @@
   IStorage      *pstgPriority,
   DWORD           grfMode,
   SNB           snbExclude,
-  DWORD           reserved, 
+  DWORD           reserved,
   IStorage      **ppstgOpen)
 {
   StorageImpl* newStorage = 0;
@@ -5520,7 +5520,7 @@
   WCHAR          fullname[MAX_PATH];
   DWORD          length;
 
-  TRACE("(%s, %p, %lx, %p, %ld, %p)\n", 
+  TRACE("(%s, %p, %lx, %p, %ld, %p)\n",
 	debugstr_w(pwcsName), pstgPriority, grfMode,
 	snbExclude, reserved, ppstgOpen);
 
@@ -5552,17 +5552,17 @@
    * Initialize the "out" parameter.
    */
   *ppstgOpen = 0;
-  
-  hFile = CreateFileW( pwcsName, 
+
+  hFile = CreateFileW( pwcsName,
                        accessMode,
                        shareMode,
                        NULL,
                        OPEN_EXISTING,
                        FILE_ATTRIBUTE_NORMAL | FILE_FLAG_RANDOM_ACCESS,
                        0);
-  
+
   length = GetFileSize(hFile, NULL);
-  
+
   if (hFile==INVALID_HANDLE_VALUE)
   {
     DWORD last_error = GetLastError();
@@ -5599,7 +5599,7 @@
    * Allocate and initialize the new IStorage32object.
    */
   newStorage = HeapAlloc(GetProcessHeap(), 0, sizeof(StorageImpl));
-  
+
   if (newStorage == 0)
   {
     hr = STG_E_INSUFFICIENTMEMORY;
@@ -5615,7 +5615,7 @@
          grfMode,
          TRUE,
 	 !length );
-  
+
   if (FAILED(hr))
   {
     HeapFree(GetProcessHeap(), 0, newStorage);
@@ -5626,7 +5626,7 @@
 	hr = STG_E_FILEALREADYEXISTS;
     goto end;
   }
-  
+
   /* prepare the file name string given in lieu of the root property name */
   GetFullPathNameW(pwcsName, MAX_PATH, fullname, NULL);
   memcpy(newStorage->filename, fullname, PROPERTY_NAME_BUFFER_LEN);
@@ -5639,7 +5639,7 @@
          (IStorage*)newStorage,
          (REFIID)&IID_IStorage,
          (void**)ppstgOpen);
-  
+
 end:
   TRACE("<-- %08lx, IStorage %p\n", hr, ppstgOpen ? *ppstgOpen : NULL);
   return hr;
@@ -5694,7 +5694,7 @@
          (REFIID)&IID_IStorage,
          (void**)ppstgOpen);
 
-  return hr;  
+  return hr;
 }
 
 /******************************************************************************
@@ -5732,7 +5732,7 @@
    * Allocate and initialize the new IStorage object.
    */
   newStorage = HeapAlloc(GetProcessHeap(), 0, sizeof(StorageImpl));
- 
+
   if (newStorage == 0)
     return STG_E_INSUFFICIENTMEMORY;
 
@@ -5820,7 +5820,7 @@
 
     STATSTG pstatstg;
     HRESULT hRes;
-    
+
     TRACE("()\n");
 
     if(pclsid==NULL)
@@ -5881,13 +5881,13 @@
 
     CLSID clsid;
     HRESULT res;
-    
+
     TRACE("(%p,%p)\n",pPStm,pStm);
 
     res=IPersistStream_GetClassID(pPStm,&clsid);
 
     if (SUCCEEDED(res)){
-        
+
         res=WriteClassStm(pStm,&clsid);
 
         if (SUCCEEDED(res))
@@ -5905,16 +5905,16 @@
  * STGM_DIRECT               0x00000000
  * STGM_TRANSACTED           0x00010000
  * STGM_SIMPLE               0x08000000
- * 
+ *
  * STGM_READ                 0x00000000
  * STGM_WRITE                0x00000001
  * STGM_READWRITE            0x00000002
- * 
+ *
  * STGM_SHARE_DENY_NONE      0x00000040
  * STGM_SHARE_DENY_READ      0x00000030
  * STGM_SHARE_DENY_WRITE     0x00000020
  * STGM_SHARE_EXCLUSIVE      0x00000010
- * 
+ *
  * STGM_PRIORITY             0x00040000
  * STGM_DELETEONRELEASE      0x04000000
  *
@@ -5930,11 +5930,11 @@
   BOOL bSTGM_TRANSACTED       = ((stgm & STGM_TRANSACTED) == STGM_TRANSACTED);
   BOOL bSTGM_SIMPLE           = ((stgm & STGM_SIMPLE) == STGM_SIMPLE);
   BOOL bSTGM_DIRECT           = ! (bSTGM_TRANSACTED || bSTGM_SIMPLE);
-   
+
   BOOL bSTGM_WRITE            = ((stgm & STGM_WRITE) == STGM_WRITE);
   BOOL bSTGM_READWRITE        = ((stgm & STGM_READWRITE) == STGM_READWRITE);
   BOOL bSTGM_READ             = ! (bSTGM_WRITE || bSTGM_READWRITE);
-   
+
   BOOL bSTGM_SHARE_DENY_NONE  =
                      ((stgm & STGM_SHARE_DENY_NONE)  == STGM_SHARE_DENY_NONE);
 
@@ -5949,18 +5949,18 @@
 
   BOOL bSTGM_CREATE           = ((stgm & STGM_CREATE) == STGM_CREATE);
   BOOL bSTGM_CONVERT          = ((stgm & STGM_CONVERT) == STGM_CONVERT);
-   
+
   BOOL bSTGM_NOSCRATCH        = ((stgm & STGM_NOSCRATCH) == STGM_NOSCRATCH);
   BOOL bSTGM_NOSNAPSHOT       = ((stgm & STGM_NOSNAPSHOT) == STGM_NOSNAPSHOT);
 
-  /* 
+  /*
    * STGM_DIRECT | STGM_TRANSACTED | STGM_SIMPLE
    */
   if ( ! bSTGM_DIRECT )
     if( bSTGM_TRANSACTED && bSTGM_SIMPLE )
       return E_FAIL;
 
-  /* 
+  /*
    * STGM_WRITE |  STGM_READWRITE | STGM_READ
    */
   if ( ! bSTGM_READ )
@@ -5968,13 +5968,13 @@
       return E_FAIL;
 
   /*
-   * STGM_SHARE_DENY_NONE | others 
+   * STGM_SHARE_DENY_NONE | others
    * (I assume here that DENY_READ implies DENY_WRITE)
    */
   if ( bSTGM_SHARE_DENY_NONE )
     if ( bSTGM_SHARE_DENY_READ ||
-         bSTGM_SHARE_DENY_WRITE || 
-         bSTGM_SHARE_EXCLUSIVE) 
+         bSTGM_SHARE_DENY_WRITE ||
+         bSTGM_SHARE_EXCLUSIVE)
       return E_FAIL;
 
   /*
@@ -5989,14 +5989,14 @@
    */
   if ( bSTGM_NOSCRATCH && ! bSTGM_TRANSACTED )
     return E_FAIL;
-  
+
   /*
-   * STGM_NOSNAPSHOT requires STGM_TRANSACTED and 
+   * STGM_NOSNAPSHOT requires STGM_TRANSACTED and
    * not STGM_SHARE_EXCLUSIVE or STGM_SHARE_DENY_WRITE`
    */
   if (bSTGM_NOSNAPSHOT)
   {
-    if ( ! ( bSTGM_TRANSACTED && 
+    if ( ! ( bSTGM_TRANSACTED &&
            !(bSTGM_SHARE_EXCLUSIVE || bSTGM_SHARE_DENY_WRITE)) )
     return E_FAIL;
   }
@@ -6008,7 +6008,7 @@
  *      GetShareModeFromSTGM
  *
  * This method will return a share mode flag from a STGM value.
- * The STGM value is assumed valid. 
+ * The STGM value is assumed valid.
  */
 static DWORD GetShareModeFromSTGM(DWORD stgm)
 {
@@ -6084,9 +6084,9 @@
 
 
 /*************************************************************************
- * OLECONVERT_LoadOLE10 [Internal] 
+ * OLECONVERT_LoadOLE10 [Internal]
  *
- * Loads the OLE10 STREAM to memory 
+ * Loads the OLE10 STREAM to memory
  *
  * PARAMS
  *     pOleStream   [I] The OLESTREAM
@@ -6099,7 +6099,7 @@
  *
  * NOTES
  *     This function is used by OleConvertOLESTREAMToIStorage only.
- *     
+ *
  *     Memory allocated for pData must be freed by the caller
  */
 HRESULT OLECONVERT_LoadOLE10(LPOLESTREAM pOleStream, OLECONVERT_OLESTREAM_DATA *pData, BOOL bStrem1)
@@ -6254,9 +6254,9 @@
 }
 
 /*************************************************************************
- * OLECONVERT_SaveOLE10 [Internal] 
+ * OLECONVERT_SaveOLE10 [Internal]
  *
- * Saves the OLE10 STREAM From memory 
+ * Saves the OLE10 STREAM From memory
  *
  * PARAMS
  *     pData        [I] Data Structure for the OLESTREAM Data
@@ -6268,7 +6268,7 @@
  *
  * NOTES
  *     This function is used by OleConvertIStorageToOLESTREAM only.
- *     
+ *
  */
 HRESULT OLECONVERT_SaveOLE10(OLECONVERT_OLESTREAM_DATA *pData, LPOLESTREAM pOleStream)
 {
@@ -6362,12 +6362,12 @@
 }
 
 /*************************************************************************
- * OLECONVERT_GetOLE20FromOLE10[Internal] 
+ * OLECONVERT_GetOLE20FromOLE10[Internal]
  *
  * This function copies OLE10 Data (the IStorage in the OLESTREAM) to disk,
- * opens it, and copies the content to the dest IStorage for 
+ * opens it, and copies the content to the dest IStorage for
  * OleConvertOLESTREAMToIStorage
- * 
+ *
  *
  * PARAMS
  *     pDestStorage  [I] The IStorage to copy the data to
@@ -6378,8 +6378,8 @@
  *     Nothing
  *
  * NOTES
- *     
- *     
+ *
+ *
  */
 void OLECONVERT_GetOLE20FromOLE10(LPSTORAGE pDestStorage, BYTE *pBuffer, DWORD nBufferLength)
 {
@@ -6414,9 +6414,9 @@
 
 
 /*************************************************************************
- * OLECONVERT_WriteOLE20ToBuffer [Internal] 
+ * OLECONVERT_WriteOLE20ToBuffer [Internal]
  *
- * Saves the OLE10 STREAM From memory 
+ * Saves the OLE10 STREAM From memory
  *
  * PARAMS
  *     pStorage  [I] The Src IStorage to copy
@@ -6429,7 +6429,7 @@
  *     Memory allocated for pData must be freed by the caller
  *
  *     Used by OleConvertIStorageToOLESTREAM only.
- *     
+ *
  */
 DWORD OLECONVERT_WriteOLE20ToBuffer(LPSTORAGE pStorage, BYTE **pData)
 {
@@ -6441,7 +6441,7 @@
     WCHAR wstrPrefix[] = {'s', 'i', 's', 0};
 
     *pData = NULL;
-    
+
     /* Create temp Storage */
     GetTempPathW(MAX_PATH, wstrTempDir);
     GetTempFileNameW(wstrTempDir, wstrPrefix, 0, wstrTempFile);
@@ -6468,7 +6468,7 @@
 }
 
 /*************************************************************************
- * OLECONVERT_CreateOleStream [Internal] 
+ * OLECONVERT_CreateOleStream [Internal]
  *
  * Creates the "\001OLE" stream in the IStorage if neccessary.
  *
@@ -6483,24 +6483,24 @@
  *
  *     This stream is still unknown, MS Word seems to have extra data
  *     but since the data is stored in the OLESTREAM there should be
- *     no need to recreate the stream.  If the stream is manually 
+ *     no need to recreate the stream.  If the stream is manually
  *     deleted it will create it with this default data.
- *     
+ *
  */
 void OLECONVERT_CreateOleStream(LPSTORAGE pStorage)
 {
     HRESULT hRes;
     IStream *pStream;
     WCHAR wstrStreamName[] = {1,'O', 'l', 'e', 0};
-    BYTE pOleStreamHeader [] = 
+    BYTE pOleStreamHeader [] =
     {
-        0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-        0x00, 0x00, 0x00, 0x00 
+        0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
+        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+        0x00, 0x00, 0x00, 0x00
     };
-    
+
     /* Create stream if not present */
-    hRes = IStorage_CreateStream(pStorage, wstrStreamName, 
+    hRes = IStorage_CreateStream(pStorage, wstrStreamName,
         STGM_WRITE  | STGM_SHARE_EXCLUSIVE, 0, 0, &pStream );
 
     if(hRes == S_OK)
@@ -6513,12 +6513,12 @@
 
 
 /*************************************************************************
- * OLECONVERT_CreateCompObjStream [Internal] 
+ * OLECONVERT_CreateCompObjStream [Internal]
  *
  * Creates a "\001CompObj" is the destination IStorage if necessary.
  *
  * PARAMS
- *     pStorage       [I] The dest IStorage to create the CompObj Stream 
+ *     pStorage       [I] The dest IStorage to create the CompObj Stream
  *                        if necessary.
  *     strOleTypeName [I] The ProgID
  *
@@ -6530,10 +6530,10 @@
  *     This function is used by OleConvertOLESTREAMToIStorage only.
  *
  *     The stream data is stored in the OLESTREAM and there should be
- *     no need to recreate the stream.  If the stream is manually 
+ *     no need to recreate the stream.  If the stream is manually
  *     deleted it will attempt to create it by querying the registry.
  *
- *     
+ *
  */
 HRESULT OLECONVERT_CreateCompObjStream(LPSTORAGE pStorage, LPCSTR strOleTypeName)
 {
@@ -6552,7 +6552,7 @@
 
 
     /*  Create a CompObj stream if it doesn't exist */
-    hStorageRes = IStorage_CreateStream(pStorage, wstrStreamName, 
+    hStorageRes = IStorage_CreateStream(pStorage, wstrStreamName,
         STGM_WRITE  | STGM_SHARE_EXCLUSIVE, 0, 0, &pStream );
     if(hStorageRes == S_OK)
     {
@@ -6573,7 +6573,7 @@
             HKEY hKey;
             LONG hErr;
             /* Get the CLSID Default Name from the Registry */
-            hErr = RegOpenKeyA(HKEY_CLASSES_ROOT, IStorageCompObj.strProgIDName, &hKey); 
+            hErr = RegOpenKeyA(HKEY_CLASSES_ROOT, IStorageCompObj.strProgIDName, &hKey);
             if(hErr == ERROR_SUCCESS)
             {
                 char strTemp[OLESTREAM_MAX_STR_LEN];
@@ -6615,14 +6615,14 @@
 
 
 /*************************************************************************
- * OLECONVERT_CreateOlePresStream[Internal] 
+ * OLECONVERT_CreateOlePresStream[Internal]
  *
  * Creates the "\002OlePres000" Stream with the Metafile data
  *
  * PARAMS
  *     pStorage     [I] The dest IStorage to create \002OLEPres000 stream in.
  *     dwExtentX    [I] Width of the Metafile
- *     dwExtentY    [I] Height of the Metafile 
+ *     dwExtentY    [I] Height of the Metafile
  *     pData        [I] Metafile data
  *     dwDataLength [I] Size of the Metafile data
  *
@@ -6632,31 +6632,31 @@
  *
  * NOTES
  *     This function is used by OleConvertOLESTREAMToIStorage only.
- *     
+ *
  */
 void OLECONVERT_CreateOlePresStream(LPSTORAGE pStorage, DWORD dwExtentX, DWORD dwExtentY , BYTE *pData, DWORD dwDataLength)
 {
     HRESULT hRes;
     IStream *pStream;
     WCHAR wstrStreamName[] = {2, 'O', 'l', 'e', 'P', 'r', 'e', 's', '0', '0', '0', 0};
-    BYTE pOlePresStreamHeader [] = 
+    BYTE pOlePresStreamHeader [] =
     {
-        0xFF, 0xFF, 0xFF, 0xFF, 0x03, 0x00, 0x00, 0x00, 
-        0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 
+        0xFF, 0xFF, 0xFF, 0xFF, 0x03, 0x00, 0x00, 0x00,
+        0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
         0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00,
         0x00, 0x00, 0x00, 0x00
     };
 
-    BYTE pOlePresStreamHeaderEmpty [] = 
+    BYTE pOlePresStreamHeaderEmpty [] =
     {
-        0x00, 0x00, 0x00, 0x00, 
-        0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 
+        0x00, 0x00, 0x00, 0x00,
+        0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
         0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00,
         0x00, 0x00, 0x00, 0x00
     };
-     
+
     /* Create the OlePres000 Stream */
-    hRes = IStorage_CreateStream(pStorage, wstrStreamName, 
+    hRes = IStorage_CreateStream(pStorage, wstrStreamName,
         STGM_CREATE | STGM_WRITE  | STGM_SHARE_EXCLUSIVE, 0, 0, &pStream );
 
     if(hRes == S_OK)
@@ -6700,7 +6700,7 @@
 }
 
 /*************************************************************************
- * OLECONVERT_CreateOle10NativeStream [Internal] 
+ * OLECONVERT_CreateOle10NativeStream [Internal]
  *
  * Creates the "\001Ole10Native" Stream (should contain a BMP)
  *
@@ -6716,16 +6716,16 @@
  *     This function is used by OleConvertOLESTREAMToIStorage only.
  *
  *     Might need to verify the data and return appropriate error message
- *     
+ *
  */
 void OLECONVERT_CreateOle10NativeStream(LPSTORAGE pStorage, BYTE *pData, DWORD dwDataLength)
 {
     HRESULT hRes;
     IStream *pStream;
     WCHAR wstrStreamName[] = {1, 'O', 'l', 'e', '1', '0', 'N', 'a', 't', 'i', 'v', 'e', 0};
-    
+
     /* Create the Ole10Native Stream */
-    hRes = IStorage_CreateStream(pStorage, wstrStreamName, 
+    hRes = IStorage_CreateStream(pStorage, wstrStreamName,
         STGM_CREATE | STGM_WRITE  | STGM_SHARE_EXCLUSIVE, 0, 0, &pStream );
 
     if(hRes == S_OK)
@@ -6739,7 +6739,7 @@
 }
 
 /*************************************************************************
- * OLECONVERT_GetOLE10ProgID [Internal] 
+ * OLECONVERT_GetOLE10ProgID [Internal]
  *
  * Finds the ProgID (or OleTypeID) from the IStorage
  *
@@ -6755,7 +6755,7 @@
  * NOTES
  *     This function is used by OleConvertIStorageToOLESTREAM only.
  *
- *     
+ *
  */
 HRESULT OLECONVERT_GetOLE10ProgID(LPSTORAGE pStorage, char *strProgID, DWORD *dwSize)
 {
@@ -6766,7 +6766,7 @@
     WCHAR wstrStreamName[] = {1,'C', 'o', 'm', 'p', 'O', 'b', 'j', 0};
 
     /* Open the CompObj Stream */
-    hRes = IStorage_OpenStream(pStorage, wstrStreamName, NULL,  
+    hRes = IStorage_OpenStream(pStorage, wstrStreamName, NULL,
         STGM_READ  | STGM_SHARE_EXCLUSIVE, 0, &pStream );
     if(hRes == S_OK)
     {
@@ -6803,13 +6803,13 @@
         {
             *dwSize = WideCharToMultiByte(CP_ACP, 0, wstrProgID, -1, strProgID, *dwSize, NULL, FALSE);
         }
- 
+
     }
     return hRes;
 }
 
 /*************************************************************************
- * OLECONVERT_GetOle10PresData [Internal] 
+ * OLECONVERT_GetOle10PresData [Internal]
  *
  * Converts IStorage "/001Ole10Native" stream to a OLE10 Stream
  *
@@ -6824,8 +6824,8 @@
  *     This function is used by OleConvertIStorageToOLESTREAM only.
  *
  *     Memory allocated for pData must be freed by the caller
- *      
- *     
+ *
+ *
  */
 void OLECONVERT_GetOle10PresData(LPSTORAGE pStorage, OLECONVERT_OLESTREAM_DATA *pOleStreamData)
 {
@@ -6845,7 +6845,7 @@
     pOleStreamData[1].pData = NULL;
 
     /* Open Ole10Native Stream */
-    hRes = IStorage_OpenStream(pStorage, wstrStreamName, NULL,  
+    hRes = IStorage_OpenStream(pStorage, wstrStreamName, NULL,
         STGM_READ  | STGM_SHARE_EXCLUSIVE, 0, &pStream );
     if(hRes == S_OK)
     {
@@ -6864,7 +6864,7 @@
 
 
 /*************************************************************************
- * OLECONVERT_GetOle20PresData[Internal] 
+ * OLECONVERT_GetOle20PresData[Internal]
  *
  * Converts IStorage "/002OlePres000" stream to a OLE10 Stream
  *
@@ -6877,7 +6877,7 @@
  *
  * NOTES
  *     This function is used by OleConvertIStorageToOLESTREAM only.
- *     
+ *
  *     Memory allocated for pData must be freed by the caller
  */
 void OLECONVERT_GetOle20PresData(LPSTORAGE pStorage, OLECONVERT_OLESTREAM_DATA *pOleStreamData)
@@ -6904,7 +6904,7 @@
 
 
     /* Open OlePress000 stream */
-    hRes = IStorage_OpenStream(pStorage, wstrStreamName, NULL,  
+    hRes = IStorage_OpenStream(pStorage, wstrStreamName, NULL,
         STGM_READ  | STGM_SHARE_EXCLUSIVE, 0, &pStream );
     if(hRes == S_OK)
     {
@@ -6952,7 +6952,7 @@
 }
 
 /*************************************************************************
- * OleConvertOLESTREAMToIStorage [OLE32.87] 
+ * OleConvertOLESTREAMToIStorage [OLE32.87]
  *
  * Read info on MSDN
  *
@@ -6961,11 +6961,11 @@
  *      Still unsure of some mem fields for OLE 10 Stream
  *      Still some unknowns for the IStorage: "\002OlePres000", "\001CompObj",
  *      and "\001OLE" streams
- *     
+ *
  */
 HRESULT WINAPI OleConvertOLESTREAMToIStorage (
-    LPOLESTREAM pOleStream, 
-    LPSTORAGE pstg, 
+    LPOLESTREAM pOleStream,
+    LPSTORAGE pstg,
     const DVTARGETDEVICE* ptd)
 {
     int i;
@@ -7056,10 +7056,10 @@
  *      Still unsure of some mem fields for OLE 10 Stream
  *      Still some unknowns for the IStorage: "\002OlePres000", "\001CompObj",
  *      and "\001OLE" streams.
- *     
+ *
  */
 HRESULT WINAPI OleConvertIStorageToOLESTREAM (
-    LPSTORAGE pstg, 
+    LPSTORAGE pstg,
     LPOLESTREAM pOleStream)
 {
     int i;
@@ -7084,7 +7084,7 @@
     if(hRes == S_OK)
     {
         /* Was it originally Ole10 */
-        hRes = IStorage_OpenStream(pstg, wstrStreamName, 0, STGM_READ | STGM_SHARE_EXCLUSIVE, 0, &pStream);    
+        hRes = IStorage_OpenStream(pstg, wstrStreamName, 0, STGM_READ | STGM_SHARE_EXCLUSIVE, 0, &pStream);
         if(hRes == S_OK)
         {
             IStream_Release(pStream);
diff --git a/dlls/ole32/storage32.h b/dlls/ole32/storage32.h
index c1d16f2..5e8316c 100644
--- a/dlls/ole32/storage32.h
+++ b/dlls/ole32/storage32.h
@@ -6,7 +6,7 @@
  * (Thanks to Martin Schwartz <schwartz@cs.tu-berlin.de>)
  *
  * This include file contains definitions of types and function
- * prototypes that are used in the many files implementing the 
+ * prototypes that are used in the many files implementing the
  * storage functionality
  *
  * Copyright 1998,1999 Francis Beaudet
@@ -49,15 +49,15 @@
 static const ULONG OFFSET_PS_NAMELENGTH	     = 0x00000040;
 static const ULONG OFFSET_PS_PROPERTYTYPE    = 0x00000042;
 static const ULONG OFFSET_PS_PREVIOUSPROP    = 0x00000044;
-static const ULONG OFFSET_PS_NEXTPROP        = 0x00000048;   
+static const ULONG OFFSET_PS_NEXTPROP        = 0x00000048;
 static const ULONG OFFSET_PS_DIRPROP	     = 0x0000004C;
 static const ULONG OFFSET_PS_GUID            = 0x00000050;
 static const ULONG OFFSET_PS_TSS1	     = 0x00000064;
 static const ULONG OFFSET_PS_TSD1            = 0x00000068;
 static const ULONG OFFSET_PS_TSS2            = 0x0000006C;
 static const ULONG OFFSET_PS_TSD2            = 0x00000070;
-static const ULONG OFFSET_PS_STARTBLOCK	     = 0x00000074; 
-static const ULONG OFFSET_PS_SIZE	     = 0x00000078; 
+static const ULONG OFFSET_PS_STARTBLOCK	     = 0x00000074;
+static const ULONG OFFSET_PS_SIZE	     = 0x00000078;
 static const WORD  DEF_BIG_BLOCK_SIZE_BITS   = 0x0009;
 static const WORD  DEF_SMALL_BLOCK_SIZE_BITS = 0x0006;
 static const WORD  DEF_BIG_BLOCK_SIZE        = 0x0200;
@@ -69,7 +69,7 @@
 static const ULONG PROPERTY_NULL             = 0xFFFFFFFF;
 
 #define PROPERTY_NAME_MAX_LEN    0x20
-#define PROPERTY_NAME_BUFFER_LEN 0x40             
+#define PROPERTY_NAME_BUFFER_LEN 0x40
 
 #define PROPSET_BLOCK_SIZE 0x00000080
 
@@ -141,7 +141,7 @@
  * Big Block File support
  *
  * The big block file is an abstraction of a flat file separated in
- * same sized blocks. The implementation for the methods described in 
+ * same sized blocks. The implementation for the methods described in
  * this section appear in stg_bigblockfile.c
  */
 
@@ -208,19 +208,19 @@
    * Reference count of this object
    */
   ULONG ref;
-  
-  /* 
-   * Ancestor storage (top level) 
+
+  /*
+   * Ancestor storage (top level)
    */
-  StorageImpl* ancestorStorage;		 
-  
+  StorageImpl* ancestorStorage;
+
   /*
    * Index of the property for the root of
    * this storage
    */
   ULONG rootPropertySetIndex;
-  
-  /* 
+
+  /*
    * virtual Destructor method.
    */
   void (*v_destructor)(StorageBaseImpl*);
@@ -234,41 +234,41 @@
             IStorage*        iface,
             REFIID             riid,
             void**             ppvObject);
-        
-ULONG WINAPI StorageBaseImpl_AddRef( 
+
+ULONG WINAPI StorageBaseImpl_AddRef(
             IStorage*        iface);
-        
-ULONG WINAPI StorageBaseImpl_Release( 
+
+ULONG WINAPI StorageBaseImpl_Release(
             IStorage*        iface);
-        
-HRESULT WINAPI StorageBaseImpl_OpenStream( 
+
+HRESULT WINAPI StorageBaseImpl_OpenStream(
             IStorage*        iface,
             const OLECHAR*   pwcsName,  /* [string][in] */
             void*              reserved1, /* [unique][in] */
-            DWORD              grfMode,   /* [in] */        
-            DWORD              reserved2, /* [in] */        
-            IStream**        ppstm);    /* [out] */   
-    
-HRESULT WINAPI StorageBaseImpl_OpenStorage( 
-            IStorage*        iface,
-            const OLECHAR*   pwcsName,      /* [string][unique][in] */ 
-            IStorage*        pstgPriority,  /* [unique][in] */         
-            DWORD              grfMode,       /* [in] */                 
-            SNB              snbExclude,    /* [unique][in] */         
-            DWORD              reserved,      /* [in] */                 
-            IStorage**       ppstg);        /* [out] */                
-          
-HRESULT WINAPI StorageBaseImpl_EnumElements( 
-            IStorage*        iface,
-            DWORD              reserved1, /* [in] */                  
-            void*              reserved2, /* [size_is][unique][in] */ 
-            DWORD              reserved3, /* [in] */                  
-            IEnumSTATSTG**     ppenum);   /* [out] */   
+            DWORD              grfMode,   /* [in] */
+            DWORD              reserved2, /* [in] */
+            IStream**        ppstm);    /* [out] */
 
-HRESULT WINAPI StorageBaseImpl_Stat( 
+HRESULT WINAPI StorageBaseImpl_OpenStorage(
             IStorage*        iface,
-            STATSTG*           pstatstg,     /* [out] */ 
-            DWORD              grfStatFlag); /* [in] */  
+            const OLECHAR*   pwcsName,      /* [string][unique][in] */
+            IStorage*        pstgPriority,  /* [unique][in] */
+            DWORD              grfMode,       /* [in] */
+            SNB              snbExclude,    /* [unique][in] */
+            DWORD              reserved,      /* [in] */
+            IStorage**       ppstg);        /* [out] */
+
+HRESULT WINAPI StorageBaseImpl_EnumElements(
+            IStorage*        iface,
+            DWORD              reserved1, /* [in] */
+            void*              reserved2, /* [size_is][unique][in] */
+            DWORD              reserved3, /* [in] */
+            IEnumSTATSTG**     ppenum);   /* [out] */
+
+HRESULT WINAPI StorageBaseImpl_Stat(
+            IStorage*        iface,
+            STATSTG*           pstatstg,     /* [out] */
+            DWORD              grfStatFlag); /* [in] */
 
 HRESULT WINAPI StorageBaseImpl_RenameElement(
             IStorage*        iface,
@@ -303,10 +303,10 @@
    * casting as a Storage32BaseImpl
    */
   ULONG		        ref;
-  struct StorageImpl* ancestorStorage;		 
+  struct StorageImpl* ancestorStorage;
   ULONG                 rootPropertySetIndex;
   void (*v_destructor)(struct StorageImpl*);
-  
+
   /*
    * The following data members are specific to the Storage32Impl
    * class
@@ -340,62 +340,62 @@
    */
   BlockChainStream* rootBlockChain;
   BlockChainStream* smallBlockDepotChain;
-  BlockChainStream* smallBlockRootChain;  
+  BlockChainStream* smallBlockRootChain;
 
   /*
    * Pointer to the big block file abstraction
    */
-  BigBlockFile* bigBlockFile; 
+  BigBlockFile* bigBlockFile;
 };
 
 /*
  * Method declaration for the Storage32Impl class
- */        
+ */
 
-HRESULT WINAPI StorageImpl_CreateStorage( 
+HRESULT WINAPI StorageImpl_CreateStorage(
             IStorage*      iface,
-            const OLECHAR* pwcsName,  /* [string][in] */ 
-            DWORD            grfMode,   /* [in] */ 
-            DWORD            dwStgFmt,  /* [in] */ 
-            DWORD            reserved2, /* [in] */ 
-            IStorage**     ppstg);    /* [out] */ 
-        
-HRESULT WINAPI StorageImpl_CopyTo( 
+            const OLECHAR* pwcsName,  /* [string][in] */
+            DWORD            grfMode,   /* [in] */
+            DWORD            dwStgFmt,  /* [in] */
+            DWORD            reserved2, /* [in] */
+            IStorage**     ppstg);    /* [out] */
+
+HRESULT WINAPI StorageImpl_CopyTo(
             IStorage*      iface,
-            DWORD          ciidExclude,  /* [in] */ 
-            const IID*     rgiidExclude, /* [size_is][unique][in] */ 
-            SNB            snbExclude, /* [unique][in] */ 
-            IStorage*    pstgDest);    /* [unique][in] */ 
-        
-HRESULT WINAPI StorageImpl_MoveElementTo( 
+            DWORD          ciidExclude,  /* [in] */
+            const IID*     rgiidExclude, /* [size_is][unique][in] */
+            SNB            snbExclude, /* [unique][in] */
+            IStorage*    pstgDest);    /* [unique][in] */
+
+HRESULT WINAPI StorageImpl_MoveElementTo(
             IStorage*      iface,
-            const OLECHAR* pwcsName,    /* [string][in] */ 
-            IStorage*      pstgDest,    /* [unique][in] */ 
-            const OLECHAR* pwcsNewName, /* [string][in] */ 
-            DWORD            grfFlags);   /* [in] */ 
-        
-HRESULT WINAPI StorageImpl_Commit( 
+            const OLECHAR* pwcsName,    /* [string][in] */
+            IStorage*      pstgDest,    /* [unique][in] */
+            const OLECHAR* pwcsNewName, /* [string][in] */
+            DWORD            grfFlags);   /* [in] */
+
+HRESULT WINAPI StorageImpl_Commit(
             IStorage*      iface,
-            DWORD          grfCommitFlags); /* [in] */ 
-        
-HRESULT WINAPI StorageImpl_Revert( 
+            DWORD          grfCommitFlags); /* [in] */
+
+HRESULT WINAPI StorageImpl_Revert(
             IStorage*      iface);
-        
-HRESULT WINAPI StorageImpl_DestroyElement( 
-            IStorage*      iface,
-            const OLECHAR* pwcsName); /* [string][in] */ 
-        
-HRESULT WINAPI StorageImpl_SetElementTimes( 
-            IStorage*      iface,
-            const OLECHAR* pwcsName, /* [string][in] */ 
-            const FILETIME*  pctime,   /* [in] */ 
-            const FILETIME*  patime,   /* [in] */ 
-            const FILETIME*  pmtime);  /* [in] */ 
 
-HRESULT WINAPI StorageImpl_SetStateBits( 
+HRESULT WINAPI StorageImpl_DestroyElement(
             IStorage*      iface,
-            DWORD          grfStateBits, /* [in] */ 
-            DWORD          grfMask);     /* [in] */ 
+            const OLECHAR* pwcsName); /* [string][in] */
+
+HRESULT WINAPI StorageImpl_SetElementTimes(
+            IStorage*      iface,
+            const OLECHAR* pwcsName, /* [string][in] */
+            const FILETIME*  pctime,   /* [in] */
+            const FILETIME*  patime,   /* [in] */
+            const FILETIME*  pmtime);  /* [in] */
+
+HRESULT WINAPI StorageImpl_SetStateBits(
+            IStorage*      iface,
+            DWORD          grfStateBits, /* [in] */
+            DWORD          grfMask);     /* [in] */
 
 HRESULT WINAPI StorageImpl_Stat(IStorage* iface,
                                 STATSTG*  pstatstg,     /* [out] */
@@ -502,7 +502,7 @@
    * casting as a Storage32BaseImpl
    */
   ULONG		             ref;
-  struct StorageImpl* ancestorStorage;		 
+  struct StorageImpl* ancestorStorage;
   ULONG                    rootPropertySetIndex;
   void (*v_destructor)(struct StorageInternalImpl*);
 
@@ -515,17 +515,17 @@
  * Method definitions for the Storage32InternalImpl class.
  */
 StorageInternalImpl* StorageInternalImpl_Construct(
-	    StorageImpl* ancestorStorage,	
+	    StorageImpl* ancestorStorage,
 	    ULONG          rootTropertyIndex);
 
 void StorageInternalImpl_Destroy(
        	    StorageInternalImpl* This);
 
-HRESULT WINAPI StorageInternalImpl_Commit( 
+HRESULT WINAPI StorageInternalImpl_Commit(
 	    IStorage*            iface,
-	    DWORD                  grfCommitFlags); /* [in] */ 
+	    DWORD                  grfCommitFlags); /* [in] */
 
-HRESULT WINAPI StorageInternalImpl_Revert( 
+HRESULT WINAPI StorageInternalImpl_Revert(
      	    IStorage*            iface);
 
 
@@ -540,7 +540,7 @@
 {
   ICOM_VFIELD(IEnumSTATSTG);    /* Needs to be the first item in the struct
 					 * since we want to cast this in a IEnumSTATSTG pointer */
-  
+
   ULONG		 ref;		        /* Reference count */
   StorageImpl* parentStorage;         /* Reference to the parent storage */
   ULONG          firstPropertyNode;     /* Index of the root of the storage to enumerate */
@@ -564,26 +564,26 @@
 	    IEnumSTATSTG*     iface,
 	    REFIID            riid,
 	    void**            ppvObject);
-        
+
 ULONG WINAPI IEnumSTATSTGImpl_AddRef(
-            IEnumSTATSTG*     iface); 
-        
+            IEnumSTATSTG*     iface);
+
 ULONG WINAPI IEnumSTATSTGImpl_Release(
             IEnumSTATSTG*     iface);
-        
+
 HRESULT WINAPI IEnumSTATSTGImpl_Next(
             IEnumSTATSTG*     iface,
 	    ULONG             celt,
 	    STATSTG*          rgelt,
 	    ULONG*            pceltFetched);
-        
+
 HRESULT WINAPI IEnumSTATSTGImpl_Skip(
             IEnumSTATSTG*     iface,
 	    ULONG             celt);
-        
+
 HRESULT WINAPI IEnumSTATSTGImpl_Reset(
             IEnumSTATSTG* iface);
-        
+
 HRESULT WINAPI IEnumSTATSTGImpl_Clone(
             IEnumSTATSTG*     iface,
 	    IEnumSTATSTG**    ppenum);
@@ -625,7 +625,7 @@
 {
   ICOM_VFIELD(IStream);  /* Needs to be the first item in the struct
 				    * since we want to cast this in a IStream pointer */
-  
+
   /*
    * Reference count
    */
@@ -655,7 +655,7 @@
    * This is the current position of the cursor in the stream
    */
   ULARGE_INTEGER     currentPosition;
-  
+
   /*
    * The information in the stream is represented by a chain of small blocks
    * or a chain of large blocks. Depending on the case, one of the two
@@ -681,76 +681,76 @@
 
 HRESULT WINAPI StgStreamImpl_QueryInterface(
 		IStream*      iface,
-		REFIID         riid,		/* [in] */          
-		void**         ppvObject);  /* [iid_is][out] */ 
-        
+		REFIID         riid,		/* [in] */
+		void**         ppvObject);  /* [iid_is][out] */
+
 ULONG WINAPI StgStreamImpl_AddRef(
 		IStream*      iface);
-        
+
 ULONG WINAPI StgStreamImpl_Release(
 		IStream*      iface);
-        
-HRESULT WINAPI StgStreamImpl_Read( 
+
+HRESULT WINAPI StgStreamImpl_Read(
 	        IStream*      iface,
 		void*          pv,        /* [length_is][size_is][out] */
-		ULONG          cb,        /* [in] */                     
-		ULONG*         pcbRead);  /* [out] */                    
-        
+		ULONG          cb,        /* [in] */
+		ULONG*         pcbRead);  /* [out] */
+
 HRESULT WINAPI StgStreamImpl_Write(
 		IStream*      iface,
-		const void*    pv,          /* [size_is][in] */ 
-		ULONG          cb,          /* [in] */          
-		ULONG*         pcbWritten); /* [out] */         
-        
-HRESULT WINAPI StgStreamImpl_Seek( 
-		IStream*      iface,
-		LARGE_INTEGER   dlibMove,         /* [in] */ 
-		DWORD           dwOrigin,         /* [in] */ 
-		ULARGE_INTEGER* plibNewPosition); /* [out] */
-        
-HRESULT WINAPI StgStreamImpl_SetSize( 
-	        IStream*      iface,
-		ULARGE_INTEGER  libNewSize);  /* [in] */ 
-        
-HRESULT WINAPI StgStreamImpl_CopyTo( 
-		IStream*      iface,
-		IStream*      pstm,         /* [unique][in] */ 
-		ULARGE_INTEGER  cb,           /* [in] */         
-		ULARGE_INTEGER* pcbRead,      /* [out] */        
-		ULARGE_INTEGER* pcbWritten);  /* [out] */        
+		const void*    pv,          /* [size_is][in] */
+		ULONG          cb,          /* [in] */
+		ULONG*         pcbWritten); /* [out] */
 
-HRESULT WINAPI StgStreamImpl_Commit( 
+HRESULT WINAPI StgStreamImpl_Seek(
+		IStream*      iface,
+		LARGE_INTEGER   dlibMove,         /* [in] */
+		DWORD           dwOrigin,         /* [in] */
+		ULARGE_INTEGER* plibNewPosition); /* [out] */
+
+HRESULT WINAPI StgStreamImpl_SetSize(
+	        IStream*      iface,
+		ULARGE_INTEGER  libNewSize);  /* [in] */
+
+HRESULT WINAPI StgStreamImpl_CopyTo(
+		IStream*      iface,
+		IStream*      pstm,         /* [unique][in] */
+		ULARGE_INTEGER  cb,           /* [in] */
+		ULARGE_INTEGER* pcbRead,      /* [out] */
+		ULARGE_INTEGER* pcbWritten);  /* [out] */
+
+HRESULT WINAPI StgStreamImpl_Commit(
 	    	IStream*      iface,
-		DWORD           grfCommitFlags); /* [in] */ 
-        
-HRESULT WINAPI StgStreamImpl_Revert( 
+		DWORD           grfCommitFlags); /* [in] */
+
+HRESULT WINAPI StgStreamImpl_Revert(
 		IStream*  iface);
-        
-HRESULT WINAPI StgStreamImpl_LockRegion( 
+
+HRESULT WINAPI StgStreamImpl_LockRegion(
 		IStream*     iface,
-		ULARGE_INTEGER libOffset,   /* [in] */ 
-		ULARGE_INTEGER cb,          /* [in] */ 
-		DWORD          dwLockType); /* [in] */ 
-        
-HRESULT WINAPI StgStreamImpl_UnlockRegion( 
+		ULARGE_INTEGER libOffset,   /* [in] */
+		ULARGE_INTEGER cb,          /* [in] */
+		DWORD          dwLockType); /* [in] */
+
+HRESULT WINAPI StgStreamImpl_UnlockRegion(
 		IStream*     iface,
-		ULARGE_INTEGER libOffset,   /* [in] */ 
-	        ULARGE_INTEGER cb,          /* [in] */ 
-		DWORD          dwLockType); /* [in] */ 
-        
-HRESULT WINAPI StgStreamImpl_Stat( 
+		ULARGE_INTEGER libOffset,   /* [in] */
+	        ULARGE_INTEGER cb,          /* [in] */
+		DWORD          dwLockType); /* [in] */
+
+HRESULT WINAPI StgStreamImpl_Stat(
 		IStream*     iface,
 	        STATSTG*       pstatstg,     /* [out] */
-	        DWORD          grfStatFlag); /* [in] */ 
-        
-HRESULT WINAPI StgStreamImpl_Clone( 
+	        DWORD          grfStatFlag); /* [in] */
+
+HRESULT WINAPI StgStreamImpl_Clone(
 		IStream*     iface,
-		IStream**    ppstm);       /* [out] */ 
+		IStream**    ppstm);       /* [out] */
 
 
 /********************************************************************************
  * The StorageUtl_ functions are miscelaneous utility functions. Most of which are
- * abstractions used to read values from file buffers without having to worry 
+ * abstractions used to read values from file buffers without having to worry
  * about bit order
  */
 void StorageUtl_ReadWord(void* buffer, ULONG offset, WORD* value);
@@ -784,7 +784,7 @@
  * Methods for the BlockChainStream class.
  */
 BlockChainStream* BlockChainStream_Construct(
-		StorageImpl* parentStorage,	
+		StorageImpl* parentStorage,
 		ULONG*         headOfStreamPlaceHolder,
 		ULONG          propertyIndex);
 
@@ -834,7 +834,7 @@
  * Methods of the SmallBlockChainStream class.
  */
 SmallBlockChainStream* SmallBlockChainStream_Construct(
-	       StorageImpl* parentStorage,	
+	       StorageImpl* parentStorage,
 	       ULONG          propertyIndex);
 
 void SmallBlockChainStream_Destroy(
diff --git a/dlls/oleaut32/connpt.c b/dlls/oleaut32/connpt.c
index 516d1e3..fe99c98 100644
--- a/dlls/oleaut32/connpt.c
+++ b/dlls/oleaut32/connpt.c
@@ -81,7 +81,7 @@
   /* Connection Data */
   CONNECTDATA *pCD;
   DWORD nConns;
-  
+
   /* Next connection to enumerate from */
   DWORD nCur;
 
@@ -106,7 +106,7 @@
   Obj->ref = 1;
   Obj->iid =  *riid;
   Obj->maxSinks = MAXSINKS;
-  Obj->sinks = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, 
+  Obj->sinks = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY,
 			 sizeof(IUnknown*) * MAXSINKS);
   Obj->nSinks = 0;
   return Obj;
@@ -148,24 +148,24 @@
    */
   if ( (This==0) || (ppvObject==0) )
     return E_INVALIDARG;
-  
+
   /*
    * Initialize the return parameter.
    */
   *ppvObject = 0;
-  
+
   /*
    * Compare the riid with the interface IDs implemented by this object.
    */
-  if (memcmp(&IID_IUnknown, riid, sizeof(IID_IUnknown)) == 0) 
+  if (memcmp(&IID_IUnknown, riid, sizeof(IID_IUnknown)) == 0)
   {
     *ppvObject = (IConnectionPoint*)This;
   }
-  else if (memcmp(&IID_IConnectionPoint, riid, sizeof(IID_IConnectionPoint)) == 0) 
+  else if (memcmp(&IID_IConnectionPoint, riid, sizeof(IID_IConnectionPoint)) == 0)
   {
     *ppvObject = (IConnectionPoint*)This;
   }
-  
+
   /*
    * Check that we obtained an interface.
    */
@@ -174,14 +174,14 @@
     FIXME("() : asking for un supported interface %s\n",debugstr_guid(riid));
     return E_NOINTERFACE;
   }
-  
+
   /*
    * Query Interface always increases the reference count by one when it is
    * successful
    */
   ConnectionPointImpl_AddRef((IConnectionPoint*)This);
 
-  return S_OK;;
+  return S_OK;
 }
 
 
@@ -198,13 +198,13 @@
 
   return This->ref;
 }
-        
+
 /************************************************************************
  * ConnectionPointImpl_Release (IUnknown)
  *
  * See Windows documentation for more details on IUnknown methods.
  */
-static ULONG WINAPI ConnectionPointImpl_Release( 
+static ULONG WINAPI ConnectionPointImpl_Release(
       IConnectionPoint* iface)
 {
   ICOM_THIS(ConnectionPointImpl, iface);
@@ -224,7 +224,7 @@
 
     return 0;
   }
-  
+
   return This->ref;
 }
 
@@ -318,7 +318,7 @@
 static HRESULT WINAPI ConnectionPointImpl_EnumConnections(
 						    IConnectionPoint *iface,
 						    LPENUMCONNECTIONS *ppEnum)
-{ 
+{
   ICOM_THIS(ConnectionPointImpl, iface);
   CONNECTDATA *pCD;
   DWORD i, nextslot;
@@ -326,7 +326,7 @@
   HRESULT hr;
 
   TRACE("(%p)->(%p)\n", This, ppEnum);
-  
+
   *ppEnum = NULL;
 
   if(This->nSinks == 0) return OLE_E_NOCONNECTION;
@@ -429,24 +429,24 @@
    */
   if ( (This==0) || (ppvObject==0) )
     return E_INVALIDARG;
-  
+
   /*
    * Initialize the return parameter.
    */
   *ppvObject = 0;
-  
+
   /*
    * Compare the riid with the interface IDs implemented by this object.
    */
-  if (memcmp(&IID_IUnknown, riid, sizeof(IID_IUnknown)) == 0) 
+  if (memcmp(&IID_IUnknown, riid, sizeof(IID_IUnknown)) == 0)
   {
     *ppvObject = (IEnumConnections*)This;
   }
-  else if (memcmp(&IID_IEnumConnections, riid, sizeof(IID_IEnumConnections)) == 0) 
+  else if (memcmp(&IID_IEnumConnections, riid, sizeof(IID_IEnumConnections)) == 0)
   {
     *ppvObject = (IEnumConnections*)This;
   }
-  
+
   /*
    * Check that we obtained an interface.
    */
@@ -455,14 +455,14 @@
     FIXME("() : asking for un supported interface %s\n",debugstr_guid(riid));
     return E_NOINTERFACE;
   }
-  
+
   /*
    * Query Interface always increases the reference count by one when it is
    * successful
    */
   EnumConnectionsImpl_AddRef((IEnumConnections*)This);
 
-  return S_OK;;
+  return S_OK;
 }
 
 
@@ -479,7 +479,7 @@
   IUnknown_AddRef(This->pUnk);
   return This->ref;
 }
-        
+
 /************************************************************************
  * EnumConnectionsImpl_Release (IUnknown)
  *
@@ -506,7 +506,7 @@
 
     return 0;
   }
-  
+
   return This->ref;
 }
 
@@ -590,14 +590,14 @@
   ICOM_THIS(EnumConnectionsImpl, iface);
   EnumConnectionsImpl *newObj;
   TRACE("(%p)->(%p)\n", This, ppEnum);
-  
+
   newObj = EnumConnectionsImpl_Construct(This->pUnk, This->nConns, This->pCD);
   newObj->nCur = This->nCur;
   *ppEnum = (LPENUMCONNECTIONS)newObj;
   IUnknown_AddRef(This->pUnk);
   return S_OK;
 }
-  
+
 static ICOM_VTABLE(IEnumConnections) EnumConnectionsImpl_VTable =
 {
   ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
@@ -633,7 +633,7 @@
   Obj = ConnectionPointImpl_Construct(pUnk, riid);
   if(!Obj) return E_OUTOFMEMORY;
 
-  hr = IConnectionPoint_QueryInterface((IConnectionPoint *)Obj, 
+  hr = IConnectionPoint_QueryInterface((IConnectionPoint *)Obj,
 				       &IID_IConnectionPoint, (LPVOID)pCP);
   IConnectionPoint_Release((IConnectionPoint *)Obj);
   return hr;
diff --git a/dlls/oleaut32/dispatch.c b/dlls/oleaut32/dispatch.c
index c29f955..fedcef8 100644
--- a/dlls/oleaut32/dispatch.c
+++ b/dlls/oleaut32/dispatch.c
@@ -87,9 +87,9 @@
 /******************************************************************************
  *		DispGetIDsOfNames (OLEAUT32.29)
  *
- * Convert a set of names to dispids, based on information 
+ * Convert a set of names to dispids, based on information
  * contained in object's type library.
- * 
+ *
  * NOTES
  * 		- Defers to ITypeInfo::GetIDsOfNames()
  *
diff --git a/dlls/oleaut32/ole2disp.c b/dlls/oleaut32/ole2disp.c
index bc5bdf9..500d377 100644
--- a/dlls/oleaut32/ole2disp.c
+++ b/dlls/oleaut32/ole2disp.c
@@ -75,9 +75,9 @@
 BSTR16 WINAPI SysAllocString16(LPCOLESTR16 in)
 {
 	BSTR16 out;
-    
+
 	if (!in) return 0;
-    
+
 	out = BSTR_AllocBytes(strlen(in)+1);
 	if (!out) return 0;
 	strcpy(BSTR_GetAddr(out),in);
@@ -94,7 +94,7 @@
 BSTR WINAPI SysAllocString(LPCOLESTR in)
 {
     if (!in) return 0;
-    
+
     /* Delegate this to the SysAllocStringLen32 method. */
     return SysAllocStringLen(in, lstrlenW(in));
 }
@@ -118,13 +118,13 @@
     /*
      * Sanity check
      */
-    if (old==NULL) 
+    if (old==NULL)
       return 0;
 
     /*
      * Make sure we free the old string.
      */
-    if (*old!=NULL)      
+    if (*old!=NULL)
       SysFreeString(*old);
 
     /*
@@ -165,7 +165,7 @@
  * section, he describes the DWORD value placed *before* the BSTR data type.
  * he describes it as a "DWORD count of characters". By experimenting with
  * a windows application, this count seems to be a DWORD count of bytes in
- * the string. Meaning that the count is double the number of wide 
+ * the string. Meaning that the count is double the number of wide
  * characters in the string.
  */
 BSTR WINAPI SysAllocStringLen(const OLECHAR *in, unsigned int len)
@@ -236,7 +236,7 @@
 	return 1;
 }
 
- 
+
 /******************************************************************************
  *             SysReAllocStringLen   [OLEAUT32.5]
  */
@@ -245,13 +245,13 @@
     /*
      * Sanity check
      */
-    if (old==NULL) 
+    if (old==NULL)
       return 0;
 
     /*
      * Make sure we free the old string.
      */
-    if (*old!=NULL)      
+    if (*old!=NULL)
       SysFreeString(*old);
 
     /*
@@ -276,7 +276,7 @@
 void WINAPI SysFreeString(BSTR in)
 {
     DWORD* bufferPointer;
-    
+
     /* NULL is a valid parameter */
     if(!in) return;
 
@@ -317,7 +317,7 @@
 
      if (!str) return 0;
     /*
-     * The length of the string (in bytes) is contained in a DWORD placed 
+     * The length of the string (in bytes) is contained in a DWORD placed
      * just before the BSTR pointer
      */
     bufferPointer = (DWORD*)str;
@@ -341,7 +341,7 @@
 
      if (!str) return 0;
     /*
-     * The length of the string (in bytes) is contained in a DWORD placed 
+     * The length of the string (in bytes) is contained in a DWORD placed
      * just before the BSTR pointer
      */
     bufferPointer = (DWORD*)str;
@@ -418,7 +418,7 @@
  *
  * Converts an OLE_COLOR to a COLORREF.
  * See the documentation for conversion rules.
- * pColorRef can be NULL. In that case the user only wants to test the 
+ * pColorRef can be NULL. In that case the user only wants to test the
  * conversion.
  */
 HRESULT WINAPI OleTranslateColor(
diff --git a/dlls/oleaut32/oleaut.c b/dlls/oleaut32/oleaut.c
index 30b7455..7087d9e 100644
--- a/dlls/oleaut32/oleaut.c
+++ b/dlls/oleaut32/oleaut.c
@@ -53,7 +53,7 @@
 
 	StringFromGUID2(rcid,guidbuf,39);
 	ret = CreateItemMoniker(pdelimiter,guidbuf,&moniker);
-	if (FAILED(ret)) 
+	if (FAILED(ret))
 		return ret;
 	ret = GetRunningObjectTable(0,&runobtable);
 	if (FAILED(ret)) {
@@ -94,7 +94,7 @@
 
 	StringFromGUID2(rcid,guidbuf,39);
 	ret = CreateItemMoniker(pdelimiter,guidbuf,&moniker);
-	if (FAILED(ret)) 
+	if (FAILED(ret))
 		return ret;
 	ret = GetRunningObjectTable(0,&runobtable);
 	if (FAILED(ret)) {
@@ -153,7 +153,7 @@
 /***********************************************************************
  *		DllRegisterServer (OLEAUT32.320)
  */
-HRESULT WINAPI OLEAUT32_DllRegisterServer() { 
+HRESULT WINAPI OLEAUT32_DllRegisterServer() {
     FIXME("stub!\n");
     return S_OK;
 }
diff --git a/dlls/oleaut32/olefont.c b/dlls/oleaut32/olefont.c
index 164f8df..3b75345 100644
--- a/dlls/oleaut32/olefont.c
+++ b/dlls/oleaut32/olefont.c
@@ -53,7 +53,7 @@
 struct OLEFontImpl
 {
   /*
-   * This class supports many interfaces. IUnknown, IFont, 
+   * This class supports many interfaces. IUnknown, IFont,
    * IDispatch, IDispFont IPersistStream and IConnectionPointContainer.
    * The first two are supported by the first vtable, the next two are
    * supported by the second table and the last two have their own.
@@ -92,15 +92,15 @@
 };
 
 /*
- * Here, I define utility macros to help with the casting of the 
+ * Here, I define utility macros to help with the casting of the
  * "this" parameter.
  * There is a version to accomodate all of the VTables implemented
  * by this object.
  */
 #define _ICOM_THIS(class,name) class* this = (class*)name;
-#define _ICOM_THIS_From_IDispatch(class, name) class* this = (class*)(((char*)name)-sizeof(void*)); 
-#define _ICOM_THIS_From_IPersistStream(class, name) class* this = (class*)(((char*)name)-2*sizeof(void*)); 
-#define _ICOM_THIS_From_IConnectionPointContainer(class, name) class* this = (class*)(((char*)name)-3*sizeof(void*)); 
+#define _ICOM_THIS_From_IDispatch(class, name) class* this = (class*)(((char*)name)-sizeof(void*));
+#define _ICOM_THIS_From_IPersistStream(class, name) class* this = (class*)(((char*)name)-2*sizeof(void*));
+#define _ICOM_THIS_From_IConnectionPointContainer(class, name) class* this = (class*)(((char*)name)-3*sizeof(void*));
 
 
 /***********************************************************************
@@ -141,60 +141,60 @@
  * Prototypes for the implementation functions for the IDispatch
  * interface
  */
-static HRESULT WINAPI OLEFontImpl_IDispatch_QueryInterface(IDispatch* iface, 
-						    REFIID     riid, 
+static HRESULT WINAPI OLEFontImpl_IDispatch_QueryInterface(IDispatch* iface,
+						    REFIID     riid,
 						    VOID**     ppvoid);
 static ULONG   WINAPI OLEFontImpl_IDispatch_AddRef(IDispatch* iface);
 static ULONG   WINAPI OLEFontImpl_IDispatch_Release(IDispatch* iface);
-static HRESULT WINAPI OLEFontImpl_GetTypeInfoCount(IDispatch*    iface, 
+static HRESULT WINAPI OLEFontImpl_GetTypeInfoCount(IDispatch*    iface,
 					           unsigned int* pctinfo);
-static HRESULT WINAPI OLEFontImpl_GetTypeInfo(IDispatch*  iface, 
+static HRESULT WINAPI OLEFontImpl_GetTypeInfo(IDispatch*  iface,
 				       	      UINT      iTInfo,
-				              LCID        lcid, 
+				              LCID        lcid,
 				              ITypeInfo** ppTInfo);
 static HRESULT WINAPI OLEFontImpl_GetIDsOfNames(IDispatch*  iface,
-					        REFIID      riid, 
-					        LPOLESTR* rgszNames, 
-					        UINT      cNames, 
+					        REFIID      riid,
+					        LPOLESTR* rgszNames,
+					        UINT      cNames,
 					        LCID        lcid,
 					        DISPID*     rgDispId);
 static HRESULT WINAPI OLEFontImpl_Invoke(IDispatch*  iface,
-				         DISPID      dispIdMember, 
-				         REFIID      riid, 
-				         LCID        lcid, 
+				         DISPID      dispIdMember,
+				         REFIID      riid,
+				         LCID        lcid,
 				         WORD        wFlags,
 				         DISPPARAMS* pDispParams,
-				         VARIANT*    pVarResult, 
+				         VARIANT*    pVarResult,
 				         EXCEPINFO*  pExepInfo,
-				         UINT*     puArgErr); 
+				         UINT*     puArgErr);
 
 /***********************************************************************
  * Prototypes for the implementation functions for the IPersistStream
  * interface
  */
-static HRESULT WINAPI OLEFontImpl_IPersistStream_QueryInterface(IPersistStream* iface, 
-						    REFIID     riid, 
+static HRESULT WINAPI OLEFontImpl_IPersistStream_QueryInterface(IPersistStream* iface,
+						    REFIID     riid,
 						    VOID**     ppvoid);
 static ULONG   WINAPI OLEFontImpl_IPersistStream_AddRef(IPersistStream* iface);
 static ULONG   WINAPI OLEFontImpl_IPersistStream_Release(IPersistStream* iface);
-static HRESULT WINAPI OLEFontImpl_GetClassID(IPersistStream* iface, 
+static HRESULT WINAPI OLEFontImpl_GetClassID(IPersistStream* iface,
 					     CLSID*                pClassID);
 static HRESULT WINAPI OLEFontImpl_IsDirty(IPersistStream*  iface);
 static HRESULT WINAPI OLEFontImpl_Load(IPersistStream*  iface,
 				       IStream*         pLoadStream);
 static HRESULT WINAPI OLEFontImpl_Save(IPersistStream*  iface,
 				       IStream*         pOutStream,
-				       BOOL             fClearDirty); 
+				       BOOL             fClearDirty);
 static HRESULT WINAPI OLEFontImpl_GetSizeMax(IPersistStream*  iface,
-					     ULARGE_INTEGER*  pcbSize); 
+					     ULARGE_INTEGER*  pcbSize);
 
 /***********************************************************************
  * Prototypes for the implementation functions for the
  * IConnectionPointContainer interface
  */
 static HRESULT WINAPI OLEFontImpl_IConnectionPointContainer_QueryInterface(
-					    IConnectionPointContainer* iface, 
-					    REFIID     riid, 
+					    IConnectionPointContainer* iface,
+					    REFIID     riid,
 					    VOID**     ppvoid);
 static ULONG   WINAPI OLEFontImpl_IConnectionPointContainer_AddRef(
 					    IConnectionPointContainer* iface);
@@ -234,7 +234,7 @@
   OLEFontImpl_get_Charset,
   OLEFontImpl_put_Charset,
   OLEFontImpl_get_hFont,
-  OLEFontImpl_Clone, 
+  OLEFontImpl_Clone,
   OLEFontImpl_IsEqual,
   OLEFontImpl_SetRatio,
   OLEFontImpl_QueryTextMetrics,
@@ -341,7 +341,7 @@
   CONNECTDATA CD;
 
   IConnectionPoint_EnumConnections(this->pCP, &pEnum);
-  
+
   while(IEnumConnections_Next(pEnum, 1, &CD, NULL) == S_OK) {
     IPropertyNotifySink *sink;
 
@@ -353,7 +353,7 @@
   IEnumConnections_Release(pEnum);
   return;
 }
-  
+
 /************************************************************************
  * OLEFontImpl_Construct
  *
@@ -374,7 +374,7 @@
 
   if (newObject==0)
     return newObject;
-  
+
   /*
    * Initialize the virtual function table.
    */
@@ -382,9 +382,9 @@
   newObject->lpvtbl2 = &OLEFontImpl_IDispatch_VTable;
   newObject->lpvtbl3 = &OLEFontImpl_IPersistStream_VTable;
   newObject->lpvtbl4 = &OLEFontImpl_IConnectionPointContainer_VTable;
-  
+
   /*
-   * Start with one reference count. The caller of this function 
+   * Start with one reference count. The caller of this function
    * must release the interface pointer when it is done.
    */
   newObject->ref = 1;
@@ -396,7 +396,7 @@
 
   newObject->description.cbSizeofstruct = sizeof(FONTDESC);
   newObject->description.lpstrName = HeapAlloc(GetProcessHeap(),
-					       0, 
+					       0,
 					       (lstrlenW(fontDesc->lpstrName)+1) * sizeof(WCHAR));
   strcpyW(newObject->description.lpstrName, fontDesc->lpstrName);
   newObject->description.cySize         = fontDesc->cySize;
@@ -458,41 +458,41 @@
    */
   if ( (this==0) || (ppvObject==0) )
     return E_INVALIDARG;
-  
+
   /*
    * Initialize the return parameter.
    */
   *ppvObject = 0;
-  
+
   /*
    * Compare the riid with the interface IDs implemented by this object.
    */
-  if (memcmp(&IID_IUnknown, riid, sizeof(IID_IUnknown)) == 0) 
+  if (memcmp(&IID_IUnknown, riid, sizeof(IID_IUnknown)) == 0)
   {
     *ppvObject = (IFont*)this;
   }
-  else if (memcmp(&IID_IFont, riid, sizeof(IID_IFont)) == 0) 
+  else if (memcmp(&IID_IFont, riid, sizeof(IID_IFont)) == 0)
   {
     *ppvObject = (IFont*)this;
   }
-  else if (memcmp(&IID_IDispatch, riid, sizeof(IID_IDispatch)) == 0) 
+  else if (memcmp(&IID_IDispatch, riid, sizeof(IID_IDispatch)) == 0)
   {
     *ppvObject = (IDispatch*)&(this->lpvtbl2);
   }
-  else if (memcmp(&IID_IFontDisp, riid, sizeof(IID_IFontDisp)) == 0) 
+  else if (memcmp(&IID_IFontDisp, riid, sizeof(IID_IFontDisp)) == 0)
   {
     *ppvObject = (IDispatch*)&(this->lpvtbl2);
   }
-  else if (memcmp(&IID_IPersistStream, riid, sizeof(IID_IPersistStream)) == 0) 
+  else if (memcmp(&IID_IPersistStream, riid, sizeof(IID_IPersistStream)) == 0)
   {
     *ppvObject = (IPersistStream*)&(this->lpvtbl3);
   }
   else if (memcmp(&IID_IConnectionPointContainer, riid,
-		  sizeof(IID_IConnectionPointContainer)) == 0) 
+		  sizeof(IID_IConnectionPointContainer)) == 0)
   {
     *ppvObject = (IPersistStream*)&(this->lpvtbl4);
   }
-  
+
   /*
    * Check that we obtained an interface.
    */
@@ -501,22 +501,22 @@
     FIXME("() : asking for un supported interface %s\n",debugstr_guid(riid));
     return E_NOINTERFACE;
   }
-  
+
   /*
    * Query Interface always increases the reference count by one when it is
    * successful
    */
   OLEFontImpl_AddRef((IFont*)this);
 
-  return S_OK;;
+  return S_OK;
 }
-        
+
 /************************************************************************
  * OLEFontImpl_AddRef (IUnknown)
  *
  * See Windows documentation for more details on IUnknown methods.
  */
-ULONG WINAPI OLEFontImpl_AddRef( 
+ULONG WINAPI OLEFontImpl_AddRef(
   IFont* iface)
 {
   _ICOM_THIS(OLEFontImpl, iface);
@@ -525,13 +525,13 @@
 
   return this->ref;
 }
-        
+
 /************************************************************************
  * OLEFontImpl_Release (IUnknown)
  *
  * See Windows documentation for more details on IUnknown methods.
  */
-ULONG WINAPI OLEFontImpl_Release( 
+ULONG WINAPI OLEFontImpl_Release(
       IFont* iface)
 {
   _ICOM_THIS(OLEFontImpl, iface);
@@ -551,17 +551,17 @@
 
     return 0;
   }
-  
+
   return this->ref;
 }
-        
+
 /************************************************************************
  * OLEFontImpl_get_Name (IFont)
  *
  * See Windows documentation for more details on IFont methods.
  */
 static HRESULT WINAPI OLEFontImpl_get_Name(
-  IFont*  iface, 
+  IFont*  iface,
   BSTR* pname)
 {
   _ICOM_THIS(OLEFontImpl, iface);
@@ -586,7 +586,7 @@
  * See Windows documentation for more details on IFont methods.
  */
 static HRESULT WINAPI OLEFontImpl_put_Name(
-  IFont* iface, 
+  IFont* iface,
   BSTR name)
 {
   _ICOM_THIS(OLEFontImpl, iface);
@@ -595,13 +595,13 @@
   if (this->description.lpstrName==0)
   {
     this->description.lpstrName = HeapAlloc(GetProcessHeap(),
-					    0, 
+					    0,
 					    (lstrlenW(name)+1) * sizeof(WCHAR));
   }
   else
   {
     this->description.lpstrName = HeapReAlloc(GetProcessHeap(),
-					      0, 
+					      0,
 					      this->description.lpstrName,
 					      (lstrlenW(name)+1) * sizeof(WCHAR));
   }
@@ -621,7 +621,7 @@
  * See Windows documentation for more details on IFont methods.
  */
 static HRESULT WINAPI OLEFontImpl_get_Size(
-  IFont* iface, 
+  IFont* iface,
   CY*    psize)
 {
   _ICOM_THIS(OLEFontImpl, iface);
@@ -645,7 +645,7 @@
  * See Windows documentation for more details on IFont methods.
  */
 static HRESULT WINAPI OLEFontImpl_put_Size(
-  IFont* iface, 
+  IFont* iface,
   CY     size)
 {
   _ICOM_THIS(OLEFontImpl, iface);
@@ -663,7 +663,7 @@
  * See Windows documentation for more details on IFont methods.
  */
 static HRESULT WINAPI OLEFontImpl_get_Bold(
-  IFont*  iface, 
+  IFont*  iface,
   BOOL* pbold)
 {
   _ICOM_THIS(OLEFontImpl, iface);
@@ -702,7 +702,7 @@
  * See Windows documentation for more details on IFont methods.
  */
 static HRESULT WINAPI OLEFontImpl_get_Italic(
-  IFont*  iface, 
+  IFont*  iface,
   BOOL* pitalic)
 {
   _ICOM_THIS(OLEFontImpl, iface);
@@ -724,7 +724,7 @@
  * See Windows documentation for more details on IFont methods.
  */
 static HRESULT WINAPI OLEFontImpl_put_Italic(
-  IFont* iface, 
+  IFont* iface,
   BOOL italic)
 {
   _ICOM_THIS(OLEFontImpl, iface);
@@ -742,7 +742,7 @@
  * See Windows documentation for more details on IFont methods.
  */
 static HRESULT WINAPI OLEFontImpl_get_Underline(
-  IFont*  iface, 
+  IFont*  iface,
   BOOL* punderline)
 {
   _ICOM_THIS(OLEFontImpl, iface);
@@ -783,7 +783,7 @@
  * See Windows documentation for more details on IFont methods.
  */
 static HRESULT WINAPI OLEFontImpl_get_Strikethrough(
-  IFont*  iface, 
+  IFont*  iface,
   BOOL* pstrikethrough)
 {
   _ICOM_THIS(OLEFontImpl, iface);
@@ -806,7 +806,7 @@
  * See Windows documentation for more details on IFont methods.
  */
 static HRESULT WINAPI OLEFontImpl_put_Strikethrough(
- IFont* iface, 
+ IFont* iface,
  BOOL strikethrough)
 {
   _ICOM_THIS(OLEFontImpl, iface);
@@ -824,7 +824,7 @@
  * See Windows documentation for more details on IFont methods.
  */
 static HRESULT WINAPI OLEFontImpl_get_Weight(
-  IFont* iface, 
+  IFont* iface,
   short* pweight)
 {
   _ICOM_THIS(OLEFontImpl, iface);
@@ -847,7 +847,7 @@
  * See Windows documentation for more details on IFont methods.
  */
 static HRESULT WINAPI OLEFontImpl_put_Weight(
-  IFont* iface, 
+  IFont* iface,
   short  weight)
 {
   _ICOM_THIS(OLEFontImpl, iface);
@@ -865,7 +865,7 @@
  * See Windows documentation for more details on IFont methods.
  */
 static HRESULT WINAPI OLEFontImpl_get_Charset(
-  IFont* iface, 
+  IFont* iface,
   short* pcharset)
 {
   _ICOM_THIS(OLEFontImpl, iface);
@@ -888,7 +888,7 @@
  * See Windows documentation for more details on IFont methods.
  */
 static HRESULT WINAPI OLEFontImpl_put_Charset(
-  IFont* iface, 
+  IFont* iface,
   short charset)
 {
   _ICOM_THIS(OLEFontImpl, iface);
@@ -922,7 +922,7 @@
     LOGFONTW logFont;
     INT      fontHeight;
     CY       cySize;
-    
+
     /*
      * The height of the font returned by the get_Size property is the
      * height of the font in points multiplied by 10000... Using some
@@ -1033,7 +1033,7 @@
  * See Windows documentation for more details on IFont methods.
  */
 static HRESULT WINAPI OLEFontImpl_IsEqual(
-  IFont* iface, 
+  IFont* iface,
   IFont* pFontOther)
 {
   FIXME("():Stub\n");
@@ -1065,7 +1065,7 @@
  * See Windows documentation for more details on IFont methods.
  */
 static HRESULT      WINAPI OLEFontImpl_QueryTextMetrics(
-  IFont*         iface, 
+  IFont*         iface,
   TEXTMETRICOLE* ptm)
 {
   FIXME("():Stub\n");
@@ -1078,7 +1078,7 @@
  * See Windows documentation for more details on IFont methods.
  */
 static HRESULT WINAPI OLEFontImpl_AddRefHfont(
-  IFont*  iface, 
+  IFont*  iface,
   HFONT hfont)
 {
   _ICOM_THIS(OLEFontImpl, iface);
@@ -1117,7 +1117,7 @@
   if (this->fontLock==0)
   {
     DeleteObject(this->gdiFont);
-    this->gdiFont = 0; 
+    this->gdiFont = 0;
   }
 
   return S_OK;
@@ -1184,7 +1184,7 @@
  * See Windows documentation for more details on IDispatch methods.
  */
 static HRESULT WINAPI OLEFontImpl_GetTypeInfoCount(
-  IDispatch*    iface, 
+  IDispatch*    iface,
   unsigned int* pctinfo)
 {
   _ICOM_THIS_From_IDispatch(IFont, iface);
@@ -1199,9 +1199,9 @@
  * See Windows documentation for more details on IDispatch methods.
  */
 static HRESULT WINAPI OLEFontImpl_GetTypeInfo(
-  IDispatch*  iface, 
+  IDispatch*  iface,
   UINT      iTInfo,
-  LCID        lcid, 
+  LCID        lcid,
   ITypeInfo** ppTInfo)
 {
   _ICOM_THIS_From_IDispatch(IFont, iface);
@@ -1217,9 +1217,9 @@
  */
 static HRESULT WINAPI OLEFontImpl_GetIDsOfNames(
   IDispatch*  iface,
-  REFIID      riid, 
-  LPOLESTR* rgszNames, 
-  UINT      cNames, 
+  REFIID      riid,
+  LPOLESTR* rgszNames,
+  UINT      cNames,
   LCID        lcid,
   DISPID*     rgDispId)
 {
@@ -1236,12 +1236,12 @@
  */
 static HRESULT WINAPI OLEFontImpl_Invoke(
   IDispatch*  iface,
-  DISPID      dispIdMember, 
-  REFIID      riid, 
-  LCID        lcid, 
+  DISPID      dispIdMember,
+  REFIID      riid,
+  LCID        lcid,
   WORD        wFlags,
   DISPPARAMS* pDispParams,
-  VARIANT*    pVarResult, 
+  VARIANT*    pVarResult,
   EXCEPINFO*  pExepInfo,
   UINT*     puArgErr)
 {
@@ -1299,7 +1299,7 @@
  * See Windows documentation for more details on IPersistStream methods.
  */
 static HRESULT WINAPI OLEFontImpl_GetClassID(
-  IPersistStream* iface, 
+  IPersistStream* iface,
   CLSID*                pClassID)
 {
   if (pClassID==0)
@@ -1354,7 +1354,7 @@
   INT len;
 
   _ICOM_THIS_From_IPersistStream(OLEFontImpl, iface);
-  
+
   /*
    * Read the version byte
    */
@@ -1383,7 +1383,7 @@
   this->description.fItalic        = (bAttributes & FONTPERSIST_ITALIC) != 0;
   this->description.fStrikethrough = (bAttributes & FONTPERSIST_STRIKETHROUGH) != 0;
   this->description.fUnderline     = (bAttributes & FONTPERSIST_UNDERLINE) != 0;
-    
+
   /*
    * Weight
    */
@@ -1441,7 +1441,7 @@
   BYTE  bVersion = 0x01;
   BYTE  bAttributes;
   BYTE  bStringSize;
-  
+
   _ICOM_THIS_From_IPersistStream(OLEFontImpl, iface);
 
   /*
@@ -1470,7 +1470,7 @@
 
   if (this->description.fStrikethrough)
     bAttributes |= FONTPERSIST_STRIKETHROUGH;
-  
+
   if (this->description.fUnderline)
     bAttributes |= FONTPERSIST_UNDERLINE;
 
@@ -1478,7 +1478,7 @@
 
   if (cbWritten!=1)
     return E_FAIL;
-  
+
   /*
    * Weight
    */
@@ -1646,7 +1646,7 @@
     DWORD                       ref;
 } IClassFactoryImpl;
 
-static HRESULT WINAPI 
+static HRESULT WINAPI
 SFCF_QueryInterface(LPCLASSFACTORY iface,REFIID riid,LPVOID *ppobj) {
 	ICOM_THIS(IClassFactoryImpl,iface);
 
diff --git a/dlls/oleaut32/olepicture.c b/dlls/oleaut32/olepicture.c
index c7bea43..a93142e 100644
--- a/dlls/oleaut32/olepicture.c
+++ b/dlls/oleaut32/olepicture.c
@@ -57,7 +57,7 @@
 
 #ifdef HAVE_LIBJPEG
 /* This is a hack, so jpeglib.h does not redefine INT32 and the like*/
-#define XMD_H 
+#define XMD_H
 #define UINT16 JPEG_UINT16
 #ifdef HAVE_JPEGLIB_H
 # include <jpeglib.h>
@@ -87,7 +87,7 @@
 
   /* We own the object and must destroy it ourselves */
     BOOL fOwn;
-  
+
   /* Picture description */
     PICTDESC desc;
 
@@ -171,7 +171,7 @@
 
   if (newObject==0)
     return newObject;
-  
+
   /*
    * Initialize the virtual function table.
    */
@@ -183,7 +183,7 @@
   CreateConnectionPoint((IUnknown*)newObject,&IID_IPropertyNotifySink,&newObject->pCP);
 
   /*
-   * Start with one reference count. The caller of this function 
+   * Start with one reference count. The caller of this function
    * must release the interface pointer when it is done.
    */
   newObject->ref	= 1;
@@ -222,7 +222,7 @@
   } else {
       newObject->desc.picType = PICTYPE_UNINITIALIZED;
   }
-    
+
   TRACE("returning %p\n", newObject);
   return newObject;
 }
@@ -234,7 +234,7 @@
  * count goes down to 0. It will free all resources used by
  * this object.  */
 static void OLEPictureImpl_Destroy(OLEPictureImpl* Obj)
-{ 
+{
   TRACE("(%p)\n", Obj);
 
   if(Obj->fOwn) { /* We need to destroy the picture */
@@ -279,36 +279,36 @@
    */
   if ( (This==0) || (ppvObject==0) )
     return E_INVALIDARG;
-  
+
   /*
    * Initialize the return parameter.
    */
   *ppvObject = 0;
-  
+
   /*
    * Compare the riid with the interface IDs implemented by this object.
    */
-  if (memcmp(&IID_IUnknown, riid, sizeof(IID_IUnknown)) == 0) 
+  if (memcmp(&IID_IUnknown, riid, sizeof(IID_IUnknown)) == 0)
   {
     *ppvObject = (IPicture*)This;
   }
-  else if (memcmp(&IID_IPicture, riid, sizeof(IID_IPicture)) == 0) 
+  else if (memcmp(&IID_IPicture, riid, sizeof(IID_IPicture)) == 0)
   {
     *ppvObject = (IPicture*)This;
   }
-  else if (memcmp(&IID_IDispatch, riid, sizeof(IID_IDispatch)) == 0) 
+  else if (memcmp(&IID_IDispatch, riid, sizeof(IID_IDispatch)) == 0)
   {
     *ppvObject = (IDispatch*)&(This->lpvtbl2);
   }
-  else if (memcmp(&IID_IPictureDisp, riid, sizeof(IID_IPictureDisp)) == 0) 
+  else if (memcmp(&IID_IPictureDisp, riid, sizeof(IID_IPictureDisp)) == 0)
   {
     *ppvObject = (IDispatch*)&(This->lpvtbl2);
   }
-  else if (memcmp(&IID_IPersistStream, riid, sizeof(IID_IPersistStream)) == 0) 
+  else if (memcmp(&IID_IPersistStream, riid, sizeof(IID_IPersistStream)) == 0)
   {
   *ppvObject = (IPersistStream*)&(This->lpvtbl3);
   }
-  else if (memcmp(&IID_IConnectionPointContainer, riid, sizeof(IID_IConnectionPointContainer)) == 0) 
+  else if (memcmp(&IID_IConnectionPointContainer, riid, sizeof(IID_IConnectionPointContainer)) == 0)
   {
   *ppvObject = (IConnectionPointContainer*)&(This->lpvtbl4);
   }
@@ -320,14 +320,14 @@
     FIXME("() : asking for un supported interface %s\n",debugstr_guid(riid));
     return E_NOINTERFACE;
   }
-  
+
   /*
    * Query Interface always increases the reference count by one when it is
    * successful
    */
   OLEPictureImpl_AddRef((IPicture*)This);
 
-  return S_OK;;
+  return S_OK;
 }
 /***********************************************************************
  *    OLEPicture_SendNotify (internal)
@@ -359,7 +359,7 @@
  *
  * See Windows documentation for more details on IUnknown methods.
  */
-static ULONG WINAPI OLEPictureImpl_AddRef( 
+static ULONG WINAPI OLEPictureImpl_AddRef(
   IPicture* iface)
 {
   ICOM_THIS(OLEPictureImpl, iface);
@@ -368,13 +368,13 @@
 
   return This->ref;
 }
-        
+
 /************************************************************************
  * OLEPictureImpl_Release (IUnknown)
  *
  * See Windows documentation for more details on IUnknown methods.
  */
-static ULONG WINAPI OLEPictureImpl_Release( 
+static ULONG WINAPI OLEPictureImpl_Release(
       IPicture* iface)
 {
   ICOM_THIS(OLEPictureImpl, iface);
@@ -394,14 +394,14 @@
 
     return 0;
   }
-  
+
   return This->ref;
 }
 
 
 /************************************************************************
  * OLEPictureImpl_get_Handle
- */ 
+ */
 static HRESULT WINAPI OLEPictureImpl_get_Handle(IPicture *iface,
 						OLE_HANDLE *phandle)
 {
@@ -430,7 +430,7 @@
 
 /************************************************************************
  * OLEPictureImpl_get_hPal
- */ 
+ */
 static HRESULT WINAPI OLEPictureImpl_get_hPal(IPicture *iface,
 					      OLE_HANDLE *phandle)
 {
@@ -441,7 +441,7 @@
 
 /************************************************************************
  * OLEPictureImpl_get_Type
- */ 
+ */
 static HRESULT WINAPI OLEPictureImpl_get_Type(IPicture *iface,
 					      short *ptype)
 {
@@ -453,7 +453,7 @@
 
 /************************************************************************
  * OLEPictureImpl_get_Width
- */ 
+ */
 static HRESULT WINAPI OLEPictureImpl_get_Width(IPicture *iface,
 					       OLE_XSIZE_HIMETRIC *pwidth)
 {
@@ -465,7 +465,7 @@
 
 /************************************************************************
  * OLEPictureImpl_get_Height
- */ 
+ */
 static HRESULT WINAPI OLEPictureImpl_get_Height(IPicture *iface,
 						OLE_YSIZE_HIMETRIC *pheight)
 {
@@ -477,7 +477,7 @@
 
 /************************************************************************
  * OLEPictureImpl_Render
- */ 
+ */
 static HRESULT WINAPI OLEPictureImpl_Render(IPicture *iface, HDC hdc,
 					    long x, long y, long cx, long cy,
 					    OLE_XPOS_HIMETRIC xSrc,
@@ -539,7 +539,7 @@
 
 /************************************************************************
  * OLEPictureImpl_set_hPal
- */ 
+ */
 static HRESULT WINAPI OLEPictureImpl_set_hPal(IPicture *iface,
 					      OLE_HANDLE hpal)
 {
@@ -551,7 +551,7 @@
 
 /************************************************************************
  * OLEPictureImpl_get_CurDC
- */ 
+ */
 static HRESULT WINAPI OLEPictureImpl_get_CurDC(IPicture *iface,
 					       HDC *phdc)
 {
@@ -563,7 +563,7 @@
 
 /************************************************************************
  * OLEPictureImpl_SelectPicture
- */ 
+ */
 static HRESULT WINAPI OLEPictureImpl_SelectPicture(IPicture *iface,
 						   HDC hdcIn,
 						   HDC *phdcOut,
@@ -588,7 +588,7 @@
 
 /************************************************************************
  * OLEPictureImpl_get_KeepOriginalFormat
- */ 
+ */
 static HRESULT WINAPI OLEPictureImpl_get_KeepOriginalFormat(IPicture *iface,
 							    BOOL *pfKeep)
 {
@@ -602,7 +602,7 @@
 
 /************************************************************************
  * OLEPictureImpl_put_KeepOriginalFormat
- */ 
+ */
 static HRESULT WINAPI OLEPictureImpl_put_KeepOriginalFormat(IPicture *iface,
 							    BOOL keep)
 {
@@ -615,7 +615,7 @@
 
 /************************************************************************
  * OLEPictureImpl_PictureChanged
- */ 
+ */
 static HRESULT WINAPI OLEPictureImpl_PictureChanged(IPicture *iface)
 {
   ICOM_THIS(OLEPictureImpl, iface);
@@ -626,7 +626,7 @@
 
 /************************************************************************
  * OLEPictureImpl_SaveAsFile
- */ 
+ */
 static HRESULT WINAPI OLEPictureImpl_SaveAsFile(IPicture *iface,
 						IStream *pstream,
 						BOOL SaveMemCopy,
@@ -639,7 +639,7 @@
 
 /************************************************************************
  * OLEPictureImpl_get_Attributes
- */ 
+ */
 static HRESULT WINAPI OLEPictureImpl_get_Attributes(IPicture *iface,
 						    DWORD *pdwAttr)
 {
@@ -703,7 +703,7 @@
 ) {
   ICOM_THIS_From_IConnectionPointContainer(OLEPictureImpl, iface);
   TRACE("(%p,%s,%p)\n",This,debugstr_guid(riid),ppCP);
-  if (!ppCP) 
+  if (!ppCP)
       return E_POINTER;
   *ppCP = NULL;
   if (IsEqualGUID(riid,&IID_IPropertyNotifySink))
@@ -825,7 +825,7 @@
   xread = 0;
   xbuf = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,header[1]);
   while (xread < header[1]) {
-    ULONG nread; 
+    ULONG nread;
     hr = IStream_Read(pStm,xbuf+xread,header[1]-xread,&nread);
     xread+=nread;
     if (hr || !nread)
@@ -1071,7 +1071,7 @@
  * See Windows documentation for more details on IDispatch methods.
  */
 static HRESULT WINAPI OLEPictureImpl_GetTypeInfoCount(
-  IDispatch*    iface, 
+  IDispatch*    iface,
   unsigned int* pctinfo)
 {
   FIXME("():Stub\n");
@@ -1085,9 +1085,9 @@
  * See Windows documentation for more details on IDispatch methods.
  */
 static HRESULT WINAPI OLEPictureImpl_GetTypeInfo(
-  IDispatch*  iface, 
+  IDispatch*  iface,
   UINT      iTInfo,
-  LCID        lcid, 
+  LCID        lcid,
   ITypeInfo** ppTInfo)
 {
   FIXME("():Stub\n");
@@ -1102,9 +1102,9 @@
  */
 static HRESULT WINAPI OLEPictureImpl_GetIDsOfNames(
   IDispatch*  iface,
-  REFIID      riid, 
-  LPOLESTR* rgszNames, 
-  UINT      cNames, 
+  REFIID      riid,
+  LPOLESTR* rgszNames,
+  UINT      cNames,
   LCID        lcid,
   DISPID*     rgDispId)
 {
@@ -1120,12 +1120,12 @@
  */
 static HRESULT WINAPI OLEPictureImpl_Invoke(
   IDispatch*  iface,
-  DISPID      dispIdMember, 
-  REFIID      riid, 
-  LCID        lcid, 
+  DISPID      dispIdMember,
+  REFIID      riid,
+  LCID        lcid,
   WORD        wFlags,
   DISPPARAMS* pDispParams,
-  VARIANT*    pVarResult, 
+  VARIANT*    pVarResult,
   EXCEPINFO*  pExepInfo,
   UINT*     puArgErr)
 {
@@ -1279,4 +1279,4 @@
 	lpstream, lSize, fRunmode, reed, xsiz, ysiz, flags, ppvObj);
   return S_OK;
 }
- 
+
diff --git a/dlls/oleaut32/parsedt.c b/dlls/oleaut32/parsedt.c
index 96762da..b1072e3 100644
--- a/dlls/oleaut32/parsedt.c
+++ b/dlls/oleaut32/parsedt.c
@@ -65,10 +65,10 @@
 static const char * const days[] = {"Sunday", "Monday", "Tuesday", "Wednesday",
 "Thursday", "Friday", "Saturday", NULL};
 
-/* those three vars are useless, and not even initialized, so 
+/* those three vars are useless, and not even initialized, so
  * I'd rather remove them all (EPP)
  */
-int	DateStyle; 
+int	DateStyle;
 bool	EuroDates;
 int	CTimeZone;
 
diff --git a/dlls/oleaut32/safearray.c b/dlls/oleaut32/safearray.c
index 257c136..72d58c9 100644
--- a/dlls/oleaut32/safearray.c
+++ b/dlls/oleaut32/safearray.c
@@ -35,31 +35,31 @@
 #define SYSDUPSTRING(str) SysAllocStringLen((str), SysStringLen(str))
 
 /* Locally used methods */
-static INT  
+static INT
 endOfDim(LONG *coor, SAFEARRAYBOUND *mat, LONG dim, LONG realDim);
 
-static ULONG   
+static ULONG
 calcDisplacement(LONG *coor, SAFEARRAYBOUND *mat, LONG dim);
 
-static BOOL  
+static BOOL
 isPointer(USHORT feature);
 
-static INT   
+static INT
 getFeatures(VARTYPE vt);
 
-static BOOL  
+static BOOL
 validCoordinate(LONG *coor, SAFEARRAY *psa);
 
-static BOOL  
+static BOOL
 resizeSafeArray(SAFEARRAY *psa, LONG lDelta);
 
-static BOOL  
+static BOOL
 validArg(SAFEARRAY *psa);
 
-static ULONG   
+static ULONG
 getArraySize(SAFEARRAY *psa);
 
-static HRESULT 
+static HRESULT
 duplicateData(SAFEARRAY *psa, SAFEARRAY **ppsaOut);
 
 /* Association between VARTYPE and their size.
@@ -122,9 +122,9 @@
  *		SafeArrayAllocDescriptor (OLEAUT32.36)
  * Allocate the appropriate amount of memory for the SafeArray descriptor
  */
-HRESULT WINAPI SafeArrayAllocDescriptor( 
-  UINT    cDims, 
-  SAFEARRAY **ppsaOut) 
+HRESULT WINAPI SafeArrayAllocDescriptor(
+  UINT    cDims,
+  SAFEARRAY **ppsaOut)
 {
   SAFEARRAYBOUND *sab;
   LONG allocSize = 0;
@@ -134,7 +134,7 @@
   allocSize = sizeof(**ppsaOut) + (sizeof(*sab) * (cDims-1));
 
   /* Allocate memory for SAFEARRAY struc */
-  if(( (*ppsaOut)=HeapAlloc( 
+  if(( (*ppsaOut)=HeapAlloc(
         GetProcessHeap(), HEAP_ZERO_MEMORY, allocSize)) == NULL){
     return(E_UNEXPECTED);
   }
@@ -151,10 +151,10 @@
  *
  * The MSDN documentation on this doesn't tell us much.
  */
-HRESULT WINAPI SafeArrayAllocDescriptorEx( 
+HRESULT WINAPI SafeArrayAllocDescriptorEx(
   VARTYPE vt,
-  UINT    cDims, 
-  SAFEARRAY **ppsaOut) 
+  UINT    cDims,
+  SAFEARRAY **ppsaOut)
 {
   if ( (vt >= LAST_VARTYPE) ||
        ( VARTYPE_SIZE[vt] == VARTYPE_NOT_SUPPORTED ) )
@@ -168,21 +168,21 @@
  * Allocate the appropriate amount of data for the SafeArray data
  */
 HRESULT WINAPI SafeArrayAllocData(
-  SAFEARRAY *psa) 
+  SAFEARRAY *psa)
 {
   ULONG  ulWholeArraySize;   /* to store the size of the whole thing */
 
-  if(! validArg(psa)) 
+  if(! validArg(psa))
     return E_INVALIDARG;
 
   ulWholeArraySize = getArraySize(psa);
 
   /* Allocate memory for the data itself */
-  if((psa->pvData = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, 
+  if((psa->pvData = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY,
         psa->cbElements*ulWholeArraySize)) == NULL)
     return(E_UNEXPECTED);
 
-  TRACE("SafeArray: %lu bytes allocated for data at %p (%lu objects).\n", 
+  TRACE("SafeArray: %lu bytes allocated for data at %p (%lu objects).\n",
     psa->cbElements*ulWholeArraySize, psa->pvData, ulWholeArraySize);
 
   return(S_OK);
@@ -190,11 +190,11 @@
 
 /*************************************************************************
  *		SafeArrayCreate (OLEAUT32.15)
- * Create a SafeArray object by encapsulating AllocDescriptor and AllocData 
+ * Create a SafeArray object by encapsulating AllocDescriptor and AllocData
  */
 SAFEARRAY* WINAPI SafeArrayCreate(
-  VARTYPE        vt, 
-  UINT         cDims, 
+  VARTYPE        vt,
+  UINT         cDims,
   SAFEARRAYBOUND *rgsabound)
 {
   SAFEARRAY *psa;
@@ -210,7 +210,7 @@
   if( FAILED( hRes = SafeArrayAllocDescriptor(cDims, &psa)))
     return NULL;
 
-  /* setup data members... */ 
+  /* setup data members... */
   psa->cDims     = cDims;
   psa->fFeatures = getFeatures(vt);
   psa->cLocks    = 0;
@@ -223,14 +223,14 @@
     psa->rgsabound[cDim].lLbound   = rgsabound[psa->cDims-cDim-1].lLbound;
   }
 
-  /* allocate memory for the data... */ 
+  /* allocate memory for the data... */
   if( FAILED( hRes = SafeArrayAllocData(psa))) {
-    SafeArrayDestroyDescriptor(psa); 
+    SafeArrayDestroyDescriptor(psa);
     ERR("() : Failed to allocate the Safe Array data\n");
     return NULL;
   }
 
-  return(psa); 
+  return(psa);
 }
 
 /*************************************************************************
@@ -241,13 +241,13 @@
   SAFEARRAY *psa)
 {
   /* Check for lockness before to free... */
-  if(psa->cLocks > 0) 
+  if(psa->cLocks > 0)
     return DISP_E_ARRAYISLOCKED;
 
   /* The array is unlocked, then, deallocate memory */
-  if(HeapFree( GetProcessHeap(), 0, psa) == FALSE) 
+  if(HeapFree( GetProcessHeap(), 0, psa) == FALSE)
     return E_UNEXPECTED;
-  
+
   return(S_OK);
 }
 
@@ -257,13 +257,13 @@
  * Increment the lock counter
  *
  * Doc says (MSDN Library ) that psa->pvData should be made available (!= NULL)
- * only when psa->cLocks is > 0... I don't get it since pvData is allocated 
- * before the array is locked, therefore  
+ * only when psa->cLocks is > 0... I don't get it since pvData is allocated
+ * before the array is locked, therefore
  */
 HRESULT WINAPI SafeArrayLock(
   SAFEARRAY *psa)
 {
-  if(! validArg(psa))     
+  if(! validArg(psa))
     return E_INVALIDARG;
 
   psa->cLocks++;
@@ -278,10 +278,10 @@
 HRESULT WINAPI SafeArrayUnlock(
   SAFEARRAY *psa)
 {
-  if(! validArg(psa)) 
+  if(! validArg(psa))
     return E_INVALIDARG;
 
-  if (psa->cLocks > 0) 
+  if (psa->cLocks > 0)
     psa->cLocks--;
 
   return(S_OK);
@@ -293,16 +293,16 @@
  * Set the data at the given coordinate
  */
 HRESULT WINAPI SafeArrayPutElement(
-  SAFEARRAY *psa, 
-  LONG      *rgIndices, 
+  SAFEARRAY *psa,
+  LONG      *rgIndices,
   void      *pv)
 {
-  ULONG stepCountInSAData     = 0;    /* Number of array item to skip to get to 
+  ULONG stepCountInSAData     = 0;    /* Number of array item to skip to get to
                                          the desired one... */
   PVOID elementStorageAddress = NULL; /* Adress to store the data */
 
   /* Validate the index given */
-  if(! validCoordinate(rgIndices, psa)) 
+  if(! validCoordinate(rgIndices, psa))
     return DISP_E_BADINDEX;
   if(! validArg(psa))
     return E_INVALIDARG;
@@ -311,24 +311,24 @@
 
     /* Figure out the number of items to skip */
     stepCountInSAData = calcDisplacement(rgIndices, psa->rgsabound, psa->cDims);
-  
+
     /* Figure out the number of byte to skip ... */
     elementStorageAddress = (char *) psa->pvData+(stepCountInSAData*psa->cbElements);
-  
+
     if(isPointer(psa->fFeatures)) { /* increment ref count for this pointer */
 
-      *((PVOID*)elementStorageAddress) = *(PVOID*)pv; 
+      *((PVOID*)elementStorageAddress) = *(PVOID*)pv;
       IUnknown_AddRef( *(IUnknown**)pv);
 
-    } else { 
+    } else {
 
       if(psa->fFeatures == FADF_BSTR) { /* Create a new object */
         BSTR pbstrReAllocStr = NULL;
         if(pv &&
            ((pbstrReAllocStr = SYSDUPSTRING( (OLECHAR*)pv )) == NULL)) {
-          SafeArrayUnlock(psa);  
+          SafeArrayUnlock(psa);
           return E_OUTOFMEMORY;
-        } else 
+        } else
           *((BSTR*)elementStorageAddress) = pbstrReAllocStr;
       }
       else if(psa->fFeatures == FADF_VARIANT) {
@@ -348,7 +348,7 @@
   }
 
   TRACE("SafeArray: item put at adress %p.\n",elementStorageAddress);
-  return SafeArrayUnlock(psa);  
+  return SafeArrayUnlock(psa);
 }
 
 
@@ -357,17 +357,17 @@
  * Return the data element corresponding the the given coordinate
  */
 HRESULT WINAPI SafeArrayGetElement(
-  SAFEARRAY *psa, 
-  LONG      *rgIndices, 
+  SAFEARRAY *psa,
+  LONG      *rgIndices,
   void      *pv)
 {
-  ULONG stepCountInSAData     = 0;    /* Number of array item to skip to get to 
+  ULONG stepCountInSAData     = 0;    /* Number of array item to skip to get to
                                          the desired one... */
   PVOID elementStorageAddress = NULL; /* Adress to store the data */
 
-  if(! validArg(psa)) 
+  if(! validArg(psa))
     return E_INVALIDARG;
-  
+
   if(! validCoordinate(rgIndices, psa)) /* Validate the index given */
     return(DISP_E_BADINDEX);
 
@@ -375,10 +375,10 @@
 
     /* Figure out the number of items to skip */
     stepCountInSAData = calcDisplacement(rgIndices, psa->rgsabound, psa->cDims);
-  
+
     /* Figure out the number of byte to skip ... */
     elementStorageAddress = (char *) psa->pvData+(stepCountInSAData*psa->cbElements);
-  
+
     if( psa->fFeatures == FADF_BSTR) {           /* reallocate the obj */
       BSTR pbstrStoredStr = *(OLECHAR**)elementStorageAddress;
       BSTR pbstrReturnedStr = NULL;
@@ -386,8 +386,8 @@
           ((pbstrReturnedStr = SYSDUPSTRING( pbstrStoredStr )) == NULL) ) {
         SafeArrayUnlock(psa);
         return E_OUTOFMEMORY;
-      } else 
-        *((BSTR*)pv) = pbstrReturnedStr; 
+      } else
+        *((BSTR*)pv) = pbstrReturnedStr;
     }
     else if( psa->fFeatures == FADF_VARIANT) {
       HRESULT hr;
@@ -399,7 +399,7 @@
       }
     }
     else if( isPointer(psa->fFeatures) )         /* simply copy the pointer */
-      *(PVOID*)pv = *((PVOID*)elementStorageAddress); 
+      *(PVOID*)pv = *((PVOID*)elementStorageAddress);
     else                                         /* copy the bytes */
       memcpy(pv, elementStorageAddress, psa->cbElements );
 
@@ -408,7 +408,7 @@
     return E_UNEXPECTED; /* UNDOC error condition */
   }
 
-  return( SafeArrayUnlock(psa) );  
+  return( SafeArrayUnlock(psa) );
 }
 
 /*************************************************************************
@@ -416,20 +416,20 @@
  * return the UP bound for a given array dimension
  */
 HRESULT WINAPI SafeArrayGetUBound(
-  SAFEARRAY *psa, 
+  SAFEARRAY *psa,
   UINT    nDim,
   LONG      *plUbound)
 {
-  if(! validArg(psa))   
+  if(! validArg(psa))
     return E_INVALIDARG;
 
-  if(nDim > psa->cDims) 
+  if(nDim > psa->cDims)
     return DISP_E_BADINDEX;
 
   if(0 == nDim)
     return DISP_E_BADINDEX;
 
-  *plUbound = psa->rgsabound[nDim-1].lLbound + 
+  *plUbound = psa->rgsabound[nDim-1].lLbound +
               psa->rgsabound[nDim-1].cElements - 1;
 
   return S_OK;
@@ -437,22 +437,22 @@
 
 /*************************************************************************
  *		SafeArrayGetLBound (OLEAUT32.20)
- * Return the LO bound for a given array dimension 
+ * Return the LO bound for a given array dimension
  */
 HRESULT WINAPI SafeArrayGetLBound(
   SAFEARRAY *psa,
-  UINT    nDim, 
+  UINT    nDim,
   LONG      *plLbound)
 {
-  if(! validArg(psa))   
+  if(! validArg(psa))
     return E_INVALIDARG;
 
-  if(nDim > psa->cDims) 
+  if(nDim > psa->cDims)
     return DISP_E_BADINDEX;
 
   if(0 == nDim)
     return DISP_E_BADINDEX;
-  
+
   *plLbound = psa->rgsabound[nDim-1].lLbound;
   return S_OK;
 }
@@ -463,12 +463,12 @@
  */
 UINT WINAPI SafeArrayGetDim(
   SAFEARRAY * psa)
-{ 
+{
   /*
    * A quick test in Windows shows that the behavior here for an invalid
    * pointer is to return 0.
    */
-  if(! validArg(psa)) 
+  if(! validArg(psa))
     return 0;
 
   return psa->cDims;
@@ -480,12 +480,12 @@
  */
 UINT WINAPI SafeArrayGetElemsize(
   SAFEARRAY * psa)
-{ 
+{
   /*
    * A quick test in Windows shows that the behavior here for an invalid
    * pointer is to return 0.
    */
-  if(! validArg(psa)) 
+  if(! validArg(psa))
     return 0;
 
   return psa->cbElements;
@@ -493,28 +493,28 @@
 
 /*************************************************************************
  *		SafeArrayAccessData (OLEAUT32.23)
- * increment the access count and return the data 
+ * increment the access count and return the data
  */
 HRESULT WINAPI SafeArrayAccessData(
-  SAFEARRAY *psa, 
+  SAFEARRAY *psa,
   void      **ppvData)
-{ 
+{
   HRESULT hRes;
 
-  if(! validArg(psa)) 
+  if(! validArg(psa))
     return E_INVALIDARG;
 
   hRes = SafeArrayLock(psa);
 
   switch (hRes) {
-    case S_OK: 
+    case S_OK:
       (*ppvData) = psa->pvData;
       break;
     case E_INVALIDARG:
       (*ppvData) = NULL;
       return E_INVALIDARG;
   }
-  
+
   return S_OK;
 }
 
@@ -525,29 +525,29 @@
  */
 HRESULT WINAPI SafeArrayUnaccessData(
   SAFEARRAY * psa)
-{ 
-  if(! validArg(psa)) 
+{
+  if(! validArg(psa))
     return E_INVALIDARG;
 
   return(SafeArrayUnlock(psa));
 }
 
-/************************************************************************ 
+/************************************************************************
  *		SafeArrayPtrOfIndex (OLEAUT32.148)
  * Return a pointer to the element at rgIndices
  */
 HRESULT WINAPI SafeArrayPtrOfIndex(
-  SAFEARRAY *psa, 
-  LONG      *rgIndices, 
+  SAFEARRAY *psa,
+  LONG      *rgIndices,
   void      **ppvData)
-{ 
-  ULONG stepCountInSAData     = 0;    /* Number of array item to skip to get to 
+{
+  ULONG stepCountInSAData     = 0;    /* Number of array item to skip to get to
                                          the desired one... */
 
-  if(! validArg(psa))                   
+  if(! validArg(psa))
     return E_INVALIDARG;
 
-  if(! validCoordinate(rgIndices, psa)) 
+  if(! validCoordinate(rgIndices, psa))
     return DISP_E_BADINDEX;
 
   /* Although it is dangerous to do this without having a lock, it is not
@@ -556,27 +556,27 @@
 
   /* Figure out the number of items to skip */
   stepCountInSAData = calcDisplacement(rgIndices, psa->rgsabound, psa->cDims);
-  
+
   *ppvData = (char *) psa->pvData+(stepCountInSAData*psa->cbElements);
 
   return S_OK;
 }
 
-/************************************************************************ 
+/************************************************************************
  *		SafeArrayDestroyData (OLEAUT32.39)
  * Frees the memory data bloc
  */
 HRESULT WINAPI SafeArrayDestroyData(
   SAFEARRAY *psa)
-{ 
+{
   HRESULT  hRes;
   ULONG    ulWholeArraySize; /* count spot in array  */
   ULONG    ulDataIter;       /* to iterate the data space */
 
-  if(! validArg(psa)) 
+  if(! validArg(psa))
     return E_INVALIDARG;
 
-  if(psa->cLocks > 0) 
+  if(psa->cLocks > 0)
     return DISP_E_ARRAYISLOCKED;
 
   ulWholeArraySize = getArraySize(psa);
@@ -585,9 +585,9 @@
     IUnknown *punk;
 
     for(ulDataIter=0; ulDataIter < ulWholeArraySize; ulDataIter++) {
-      punk = *(IUnknown**)((char *) psa->pvData+(ulDataIter*(psa->cbElements)));	
+      punk = *(IUnknown**)((char *) psa->pvData+(ulDataIter*(psa->cbElements)));
 
-      if( punk != NULL) 
+      if( punk != NULL)
         IUnknown_Release(punk);
     }
 
@@ -598,7 +598,7 @@
     for(ulDataIter=0; ulDataIter < ulWholeArraySize; ulDataIter++) {
       bstr = *(BSTR*)((char *) psa->pvData+(ulDataIter*(psa->cbElements)));
 
-      if( bstr != NULL) 
+      if( bstr != NULL)
         SysFreeString( bstr );
     }
   }
@@ -608,8 +608,8 @@
       VariantClear((VARIANT*)((char *) psa->pvData+(ulDataIter*(psa->cbElements))));
     }
   }
-      
-  /* check if this array is a Vector, in which case do not free the data 
+
+  /* check if this array is a Vector, in which case do not free the data
      block since it has been allocated by AllocDescriptor and therefore
      deserve to be freed by DestroyDescriptor */
   if(!(psa->fFeatures & FADF_CREATEVECTOR)) { /* Set when we do CreateVector */
@@ -620,11 +620,11 @@
 
     psa->pvData = NULL;
   }
-  
+
   return S_OK;
 }
 
-/************************************************************************ 
+/************************************************************************
  *		SafeArrayCopyData (OLEAUT32.412)
  * Copy the psaSource's data block into psaTarget if dimension and size
  * permits it.
@@ -632,45 +632,45 @@
 HRESULT WINAPI SafeArrayCopyData(
   SAFEARRAY *psaSource,
   SAFEARRAY **psaTarget)
-{ 
+{
   USHORT   cDimCount;        /* looper */
   LONG     lDelta;           /* looper */
-  IUnknown *punk;   
+  IUnknown *punk;
   ULONG    ulWholeArraySize; /* Number of item in SA */
   BSTR   bstr;
 
-  if(! (validArg(psaSource) && validArg(*psaTarget)) ) 
+  if(! (validArg(psaSource) && validArg(*psaTarget)) )
     return E_INVALIDARG;
 
   if(SafeArrayGetDim(psaSource) != SafeArrayGetDim(*psaTarget))
     return E_INVALIDARG;
 
-  ulWholeArraySize = getArraySize(psaSource); 
+  ulWholeArraySize = getArraySize(psaSource);
 
   /* The two arrays boundaries must be of same lenght */
   for(cDimCount=0;cDimCount < psaSource->cDims; cDimCount++)
-    if( psaSource->rgsabound[cDimCount].cElements != 
+    if( psaSource->rgsabound[cDimCount].cElements !=
       (*psaTarget)->rgsabound[cDimCount].cElements)
       return E_INVALIDARG;
 
-  if( isPointer((*psaTarget)->fFeatures) ) {         /* the target contains ptr 
+  if( isPointer((*psaTarget)->fFeatures) ) {         /* the target contains ptr
                                                         that must be released */
     for(lDelta=0;lDelta < ulWholeArraySize; lDelta++) {
       punk = *(IUnknown**)
         ((char *) (*psaTarget)->pvData + (lDelta * (*psaTarget)->cbElements));
 
-      if( punk != NULL) 
+      if( punk != NULL)
         IUnknown_Release(punk);
     }
 
   }
   else if( (*psaTarget)->fFeatures & FADF_BSTR) {    /* the target contain BSTR
-                                                        that must be freed */ 
+                                                        that must be freed */
     for(lDelta=0;lDelta < ulWholeArraySize; lDelta++) {
-      bstr = 
+      bstr =
         *(BSTR*)((char *) (*psaTarget)->pvData + (lDelta * (*psaTarget)->cbElements));
 
-      if( bstr != NULL) 
+      if( bstr != NULL)
         SysFreeString( bstr );
     }
   }
@@ -684,19 +684,19 @@
   return duplicateData(psaSource, psaTarget);
 }
 
-/************************************************************************ 
+/************************************************************************
  *		SafeArrayDestroy (OLEAUT32.16)
  * Deallocates all memory reserved for the SafeArray
  */
 HRESULT WINAPI SafeArrayDestroy(
   SAFEARRAY * psa)
-{ 
+{
   HRESULT hRes;
 
-  if(! validArg(psa)) 
+  if(! validArg(psa))
     return E_INVALIDARG;
 
-  if(psa->cLocks > 0) 
+  if(psa->cLocks > 0)
     return DISP_E_ARRAYISLOCKED;
 
   if((hRes = SafeArrayDestroyData( psa )) == S_OK)
@@ -706,38 +706,38 @@
   return E_UNEXPECTED; /* UNDOC error condition */
 }
 
-/************************************************************************ 
+/************************************************************************
  *		SafeArrayCopy (OLEAUT32.27)
  * Make a dupplicate of a SafeArray
  */
 HRESULT WINAPI SafeArrayCopy(
-  SAFEARRAY *psa, 
+  SAFEARRAY *psa,
   SAFEARRAY **ppsaOut)
-{ 
+{
   HRESULT hRes;
   DWORD   dAllocSize;
   ULONG   ulWholeArraySize; /* size of the thing */
 
-  if(! validArg(psa)) 
+  if(! validArg(psa))
     return E_INVALIDARG;
 
   if((hRes=SafeArrayAllocDescriptor(psa->cDims, ppsaOut)) == S_OK){
 
     /* Duplicate the SAFEARRAY struc */
-    memcpy(*ppsaOut, psa, 
+    memcpy(*ppsaOut, psa,
             sizeof(*psa)+(sizeof(*(psa->rgsabound))*(psa->cDims-1)));
 
     (*ppsaOut)->pvData = NULL; /* do not point to the same data area */
 
     /* make sure the new safe array doesn't have the FADF_CREATEVECTOR flag,
        because the data has not been allocated with the descriptor. */
-    (*ppsaOut)->fFeatures &= ~FADF_CREATEVECTOR;  
- 
-    /* Get the allocated memory size for source and allocate it for target */ 
+    (*ppsaOut)->fFeatures &= ~FADF_CREATEVECTOR;
+
+    /* Get the allocated memory size for source and allocate it for target */
     ulWholeArraySize = getArraySize(psa); /* Number of item in SA */
     dAllocSize = ulWholeArraySize*psa->cbElements;
 
-    (*ppsaOut)->pvData = 
+    (*ppsaOut)->pvData =
       HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, dAllocSize);
     if( (*ppsaOut)->pvData != NULL) {   /* HeapAlloc succeed */
 
@@ -747,7 +747,7 @@
         SafeArrayDestroyDescriptor(*ppsaOut);
         return hRes;
       }
-        
+
     } else { /* failed to allocate or dupplicate... */
       SafeArrayDestroyDescriptor(*ppsaOut);
       return E_UNEXPECTED; /* UNDOC error condition */
@@ -759,16 +759,16 @@
   return S_OK;
 }
 
-/************************************************************************ 
+/************************************************************************
  *		SafeArrayCreateVector (OLEAUT32.411)
- * Creates a one dimension safearray where the data is next to the 
+ * Creates a one dimension safearray where the data is next to the
  * SAFEARRAY structure.
  */
 SAFEARRAY* WINAPI SafeArrayCreateVector(
-  VARTYPE vt, 
-  LONG    lLbound, 
-  ULONG   cElements) 
-{ 
+  VARTYPE vt,
+  LONG    lLbound,
+  ULONG   cElements)
+{
   SAFEARRAY *psa;
 
   /* Validate supported VARTYPE */
@@ -777,13 +777,13 @@
     return NULL;
 
   /* Allocate memory for the array descriptor and data contiguously  */
-  if( FAILED( psa = HeapAlloc( GetProcessHeap(), 
-                      HEAP_ZERO_MEMORY, 
+  if( FAILED( psa = HeapAlloc( GetProcessHeap(),
+                      HEAP_ZERO_MEMORY,
                       (sizeof(*psa) + (VARTYPE_SIZE[vt] * cElements))))) {
     return NULL;
   }
-										
-  /* setup data members... */ 
+
+  /* setup data members... */
   psa->cDims      = 1; /* always and forever */
   psa->fFeatures  = getFeatures(vt) | FADF_CREATEVECTOR;  /* undocumented flag used by Microsoft */
   psa->cLocks     = 0;
@@ -793,30 +793,30 @@
   psa->rgsabound[0].cElements = cElements;
   psa->rgsabound[0].lLbound   = lLbound;
 
-  return(psa); 				  
-} 
+  return(psa);
+}
 
-/************************************************************************ 
+/************************************************************************
  *		SafeArrayRedim (OLEAUT32.40)
  * Changes the caracteristics of the last dimension of the SafeArray
  */
 HRESULT WINAPI SafeArrayRedim(
-  SAFEARRAY      *psa, 
+  SAFEARRAY      *psa,
   SAFEARRAYBOUND *psaboundNew)
-{ 
+{
   LONG   lDelta;  /* hold difference in size */
   USHORT cDims=1; /* dims counter */
 
-  if( !validArg(psa) )                    
+  if( !validArg(psa) )
     return E_INVALIDARG;
 
-  if( psa->cLocks > 0 )                    
+  if( psa->cLocks > 0 )
     return DISP_E_ARRAYISLOCKED;
 
-  if( psa->fFeatures & FADF_FIXEDSIZE )    
+  if( psa->fFeatures & FADF_FIXEDSIZE )
     return E_INVALIDARG;
 
-  if( SafeArrayLock(psa)==E_UNEXPECTED ) 
+  if( SafeArrayLock(psa)==E_UNEXPECTED )
     return E_UNEXPECTED;/* UNDOC error condition */
 
   /* find the delta in number of array spot to apply to the new array */
@@ -830,10 +830,10 @@
   if (lDelta == 0) { ;/* same size, maybe a change of lLbound, just set it */
 
   } else /* need to enlarge (lDelta +) reduce (lDelta -) */
-    if(! resizeSafeArray(psa, lDelta)) 
+    if(! resizeSafeArray(psa, lDelta))
       return E_UNEXPECTED; /* UNDOC error condition */
 
-  /* the only modifyable dimension sits in [0] as the dimensions were reversed  
+  /* the only modifyable dimension sits in [0] as the dimensions were reversed
      at array creation time... */
   psa->rgsabound[0].cElements = psaboundNew->cElements;
   psa->rgsabound[0].lLbound   = psaboundNew->lLbound;
@@ -845,11 +845,11 @@
  * NOT WINDOWS API - SafeArray* Utility functions
  ************************************************************************/
 
-/************************************************************************ 
+/************************************************************************
  * Used to validate the SAFEARRAY type of arg
  */
 static BOOL validArg(
-  SAFEARRAY *psa) 
+  SAFEARRAY *psa)
 {
   SAFEARRAYBOUND *sab;
   LONG psaSize  = 0;
@@ -879,15 +879,15 @@
   return((psaSize >= descSize) || (psaSize >= fullSize));
 }
 
-/************************************************************************ 
+/************************************************************************
  * Used to reallocate memory
  */
 static BOOL resizeSafeArray(
-  SAFEARRAY *psa, 
+  SAFEARRAY *psa,
   LONG lDelta)
 {
   ULONG    ulWholeArraySize;  /* use as multiplicator */
-  PVOID    pvNewBlock = NULL;  
+  PVOID    pvNewBlock = NULL;
   IUnknown *punk;
   BSTR   bstr;
 
@@ -898,7 +898,7 @@
       for(;lDelta < 0; lDelta++) {
 	      punk = *(IUnknown**)
           ((char *) psa->pvData+((ulWholeArraySize+lDelta)*psa->cbElements));
-	
+
         if( punk != NULL )
           IUnknown_Release(punk);
 	    }
@@ -919,13 +919,13 @@
 
   if (!(psa->fFeatures & FADF_CREATEVECTOR))
   {
-    /* Ok now, if we are enlarging the array, we *MUST* move the whole block 
+    /* Ok now, if we are enlarging the array, we *MUST* move the whole block
        pointed to by pvData.   If we are shorthening the array, this move is
-       optional but we do it anyway becuase the benefit is that we are 
+       optional but we do it anyway becuase the benefit is that we are
        releasing to the system the unused memory */
 
-    if((pvNewBlock = HeapReAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, psa->pvData, 
-       (ulWholeArraySize + lDelta) * psa->cbElements)) == NULL) 
+    if((pvNewBlock = HeapReAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, psa->pvData,
+       (ulWholeArraySize + lDelta) * psa->cbElements)) == NULL)
         return FALSE; /* TODO If we get here it means:
                          SHRINK situation :  we've deleted the undesired
                                              data and did not release the memory
@@ -934,11 +934,11 @@
   }
   else
   {
-    /* Allocate a new block, because the previous data has been allocated with 
+    /* Allocate a new block, because the previous data has been allocated with
        the descriptor in SafeArrayCreateVector function. */
 
     if((pvNewBlock = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY,
-       ulWholeArraySize * psa->cbElements)) == NULL) 
+       ulWholeArraySize * psa->cbElements)) == NULL)
         return FALSE;
 
     psa->fFeatures &= ~FADF_CREATEVECTOR;
@@ -948,11 +948,11 @@
   return TRUE;
 }
 
-/************************************************************************ 
- * Used to set the fFeatures data member of the SAFEARRAY structure. 
+/************************************************************************
+ * Used to set the fFeatures data member of the SAFEARRAY structure.
  */
 static INT getFeatures(
-  VARTYPE vt) 
+  VARTYPE vt)
 {
   switch(vt) {
     case VT_BSTR:      return FADF_BSTR;
@@ -963,12 +963,12 @@
   return 0;
 }
 
-/************************************************************************ 
- * Used to figure out if the fFeatures data member of the SAFEARRAY 
- * structure contain any information about the type of data stored... 
+/************************************************************************
+ * Used to figure out if the fFeatures data member of the SAFEARRAY
+ * structure contain any information about the type of data stored...
  */
 static BOOL isPointer(
-  USHORT feature) 
+  USHORT feature)
 {
   switch(feature) {
     case FADF_UNKNOWN:  return TRUE; /* those are pointers */
@@ -977,8 +977,8 @@
   return FALSE;
 }
 
-/************************************************************************ 
- * Used to calculate the displacement when accessing or modifying 
+/************************************************************************
+ * Used to calculate the displacement when accessing or modifying
  * safearray data set.
  *
  *  Parameters: - LONG *coor is the desired location in the multidimension
@@ -988,46 +988,46 @@
  *              - USHORT dim is the number of dimension of the SafeArray
  */
 static ULONG calcDisplacement(
-  LONG           *coor, 
-  SAFEARRAYBOUND *mat, 
-  LONG           dim) 
+  LONG           *coor,
+  SAFEARRAYBOUND *mat,
+  LONG           dim)
 {
   ULONG res = 0;
   LONG  iterDim;
 
-  for(iterDim=0; iterDim<dim; iterDim++) 
+  for(iterDim=0; iterDim<dim; iterDim++)
     /* the -mat[dim] bring coor[dim] relative to 0 for calculation */
-    res += ((coor[iterDim]-mat[iterDim].lLbound) * 
+    res += ((coor[iterDim]-mat[iterDim].lLbound) *
             endOfDim(coor, mat, iterDim+1, dim));
 
   TRACE("SafeArray: calculated displacement is %lu.\n", res);
   return(res);
 }
 
-/************************************************************************ 
- * Recursivity agent for calcDisplacement method.  Used within Put and 
+/************************************************************************
+ * Recursivity agent for calcDisplacement method.  Used within Put and
  * Get methods.
  */
 static INT endOfDim(
-  LONG           *coor, 
-  SAFEARRAYBOUND *mat, 
-  LONG           dim, 
-  LONG           realDim) 
+  LONG           *coor,
+  SAFEARRAYBOUND *mat,
+  LONG           dim,
+  LONG           realDim)
 {
-  if(dim==realDim) 
+  if(dim==realDim)
     return 1;
-  else 
+  else
     return (endOfDim(coor, mat, dim+1, realDim) * mat[dim].cElements);
 }
 
 
-/************************************************************************ 
- * Method used to validate the coordinate received in Put and Get 
+/************************************************************************
+ * Method used to validate the coordinate received in Put and Get
  * methods.
  */
 static BOOL validCoordinate(
-  LONG      *coor, 
-  SAFEARRAY *psa) 
+  LONG      *coor,
+  SAFEARRAY *psa)
 {
   INT   iter=0;
   LONG    lUBound;
@@ -1041,47 +1041,47 @@
       return FALSE;
     if((hRes = SafeArrayGetUBound(psa, (iter+1), &lUBound)) != S_OK)
       return FALSE;
- 
-    if(lLBound > lUBound) 
-      return FALSE; 
+
+    if(lLBound > lUBound)
+      return FALSE;
 
     if((coor[iter] < lLBound) || (coor[iter] > lUBound))
       return FALSE;
   }
   return TRUE;
-}  
+}
 
-/************************************************************************ 
+/************************************************************************
  * Method used to calculate the number of cells of the SA
  */
 static ULONG getArraySize(
-  SAFEARRAY *psa) 
+  SAFEARRAY *psa)
 {
-  USHORT cCount; 
+  USHORT cCount;
   ULONG  ulWholeArraySize = 1;
 
   for(cCount=0; cCount < psa->cDims; cCount++) /* foreach dimensions... */
     ulWholeArraySize *= psa->rgsabound[cCount].cElements;
 
-  return ulWholeArraySize;  
+  return ulWholeArraySize;
 }
 
 
-/************************************************************************ 
+/************************************************************************
  * Method used to handle data space dupplication for Copy32 and CopyData32
  */
 static HRESULT duplicateData(
-  SAFEARRAY *psa, 
-  SAFEARRAY **ppsaOut) 
+  SAFEARRAY *psa,
+  SAFEARRAY **ppsaOut)
 {
   ULONG    ulWholeArraySize; /* size of the thing */
   LONG     lDelta;
 
   ulWholeArraySize = getArraySize(psa); /* Number of item in SA */
-  
+
   SafeArrayLock(*ppsaOut);
 
-  if( isPointer(psa->fFeatures) ) {  /* If datatype is object increment 
+  if( isPointer(psa->fFeatures) ) {  /* If datatype is object increment
                                         object's reference count */
     IUnknown *punk;
 
@@ -1093,11 +1093,11 @@
     }
 
     /* Copy the source array data into target array */
-    memcpy((*ppsaOut)->pvData, psa->pvData, 
+    memcpy((*ppsaOut)->pvData, psa->pvData,
       ulWholeArraySize*psa->cbElements);
 
   }
-  else if( psa->fFeatures & FADF_BSTR ) { /* if datatype is BSTR allocate 
+  else if( psa->fFeatures & FADF_BSTR ) { /* if datatype is BSTR allocate
                                              the BSTR in the new array */
     BSTR   pbstrReAllocStr = NULL;
 
@@ -1109,7 +1109,7 @@
         return E_OUTOFMEMORY;
       }
 
-      *((BSTR*)((char *) (*ppsaOut)->pvData+(lDelta * psa->cbElements))) = 
+      *((BSTR*)((char *) (*ppsaOut)->pvData+(lDelta * psa->cbElements))) =
         pbstrReAllocStr;
     }
 
@@ -1124,7 +1124,7 @@
   }
   else { /* Simply copy the source array data into target array */
 
-    memcpy((*ppsaOut)->pvData, psa->pvData, 
+    memcpy((*ppsaOut)->pvData, psa->pvData,
       ulWholeArraySize*psa->cbElements);
   }
 
@@ -1134,7 +1134,7 @@
 }
 
 
-/************************************************************************ 
+/************************************************************************
  *		SafeArrayGetVarType (OLEAUT32.77)
  * Returns the VARTYPE stored in the given safearray
  */
diff --git a/dlls/oleaut32/stubs.c b/dlls/oleaut32/stubs.c
index d1d3c63..4078bcc 100644
--- a/dlls/oleaut32/stubs.c
+++ b/dlls/oleaut32/stubs.c
@@ -47,13 +47,13 @@
 	FIXME("(%p), not implemented (olepro32.dll)\n",lpParams);
 	return S_OK;
 }
- 
+
 /***********************************************************************
  * OleCreatePropertyFrame (OLEAUT32.417)
  */
 HRESULT WINAPI OleCreatePropertyFrame(
     HWND hwndOwner, UINT x, UINT y, LPCOLESTR lpszCaption,ULONG cObjects,
-    LPUNKNOWN* ppUnk, ULONG cPages, LPCLSID pPageClsID, LCID lcid, 
+    LPUNKNOWN* ppUnk, ULONG cPages, LPCLSID pPageClsID, LCID lcid,
     DWORD dwReserved, LPVOID pvReserved )
 {
 	FIXME("(%x,%d,%d,%s,%ld,%p,%ld,%p,%x,%ld,%p), not implemented (olepro32.dll)\n",
@@ -61,4 +61,4 @@
 		pPageClsID, (int)lcid,dwReserved,pvReserved);
 	return S_OK;
 }
- 
+
diff --git a/dlls/oleaut32/tests/vartest.c b/dlls/oleaut32/tests/vartest.c
index e63ec6a..b5b822d 100644
--- a/dlls/oleaut32/tests/vartest.c
+++ b/dlls/oleaut32/tests/vartest.c
@@ -1627,7 +1627,7 @@
 	float* pFloat = &f;
 	double d = 0;
 	double* pDouble = &d;
-	
+
 	BSTR bstr = NULL;
 	int off, i = 0;
 	int nOlePtrs = 120;
@@ -1696,7 +1696,7 @@
 	pOleChar[57] = AtoW( "65536" );
 	pOleChar[58] = AtoW( "4294967295" );
 	pOleChar[59] = AtoW( "4294967296" );
-	
+
 	pOleChar[60] = AtoW( "1 January 99" );
 	pOleChar[61] = AtoW( "December 31, 2078" );
 	pOleChar[62] = AtoW( "January 1, 1900" );
@@ -1857,7 +1857,7 @@
 
 	/* unsigned short from ... */
 	trace( "\n\n======== Testing VarUI2FromXXX ========\n");
-	
+
 	ok(DISP_E_OVERFLOW == VarUI2FromI2( -1, pUShort ), XOV);
 	/* ok(S_OK == VarUI2FromI2( 0, NULL ), XOK);
 	 */
@@ -2088,7 +2088,7 @@
 		sprintf(msg,"offset %d, expect retval %d",i,strrets_I2[i].retval);
 		ok(strrets_I2[i].retval == *pShort,msg);
 	}
-	
+
 	/* long from ...
 	 */
 	trace( "\n\n======== Testing VarI4FromXXX ========\n");
@@ -2151,7 +2151,7 @@
 	ok(-16777216.0 == *pFloat,"should be -16777216.0");
 	ok(S_OK == VarR4FromR8( -16777217.0, pFloat ), XOK);
 	ok(-16777216.0 == *pFloat,"should be -16777216.0");
-	
+
 	ok(S_OK == VarR4FromR8( 16777218e31, pFloat ), XOK);
 	ok(*pFloat == 167772177736353110000000000000000000000.000000,
 		"should be 167772177736353110000000000000000000000.000000");
@@ -2234,7 +2234,7 @@
 		sprintf(msg,"offset %d, retval %g ",i,strrets_DATE[i].retval);
 		ok(*pDouble == strrets_DATE[i].retval,msg);
 	}
-#endif	
+#endif
 	/* bool from ...
 	 */
 	trace( "\n\n======== Testing VarBoolFromXXX ========\n");
@@ -2258,7 +2258,7 @@
 	ok(VARIANT_TRUE == *pBool, "expected TRUE");
 	ok(S_OK == VarBoolFromUI1( (unsigned char)0xFFFF, pBool ), XOK);
 	ok(VARIANT_TRUE == *pBool, "expected TRUE");
-	
+
 	ok(S_OK == VarBoolFromR8( 0.0, pBool ), XOK);
 	ok(VARIANT_FALSE == *pBool, "expected FALSE");
 	ok(S_OK == VarBoolFromR8( 1.1, pBool ), XOK);
@@ -2276,7 +2276,7 @@
 	ok(S_OK == VarBoolFromR8( -0.51, pBool ), XOK);
 	ok(VARIANT_TRUE == *pBool, "expected TRUE");
 
-	
+
 	for( i = 0; i < nOlePtrs; i ++ )
 	{
 	    	char msg[200];
diff --git a/dlls/oleaut32/tmarshal.c b/dlls/oleaut32/tmarshal.c
index 0baab08..f206998 100644
--- a/dlls/oleaut32/tmarshal.c
+++ b/dlls/oleaut32/tmarshal.c
@@ -182,7 +182,7 @@
 static HRESULT WINAPI
 PSFacBuf_QueryInterface(LPPSFACTORYBUFFER iface, REFIID iid, LPVOID *ppv) {
     if (IsEqualIID(iid,&IID_IPSFactoryBuffer)||IsEqualIID(iid,&IID_IUnknown)) {
-	*ppv = (LPVOID)iface; 
+	*ppv = (LPVOID)iface;
 	/* No ref counting, static class */
 	return S_OK;
     }
@@ -251,7 +251,7 @@
 }
 
 /* Determine nr of functions. Since we use the toplevel interface and all
- * inherited ones have lower numbers, we are ok to not to descent into 
+ * inherited ones have lower numbers, we are ok to not to descent into
  * the inheritance tree I think.
  */
 static int _nroffuncs(ITypeInfo *tinfo) {
@@ -498,7 +498,7 @@
 	ITypeInfo_Release(tinfo2);
 	return hres;
     }
-    case VT_VOID: 
+    case VT_VOID:
 	/* Hacky. If we are LPVOID* we apparently have to guess the IID
 	 * for the interface. This sucks pretty badly. */
 	return _unmarshal_interface(buf,&(buf->iid),(LPUNKNOWN*)arg);
@@ -563,7 +563,7 @@
 }
 
 /* how much space do we use on stack in DWORD steps. */
-static int 
+static int
 _argsize(DWORD vt_type) {
     switch (vt_type) {
     case VT_VARIANT:
@@ -708,7 +708,7 @@
     int		i, nroffuncs;
     FUNCDESC	*fdesc;
     TMProxyImpl	*proxy;
-    
+
     TRACE("(...%s...)\n",debugstr_guid(riid));
     hres = _get_typeinfo_for_iid(riid,&tinfo);
     if (hres) {
@@ -949,7 +949,7 @@
 
     switch (tdesc->vt) {
     case VT_BOOL:
-    case VT_I4: 
+    case VT_I4:
 	hres = S_OK;
 	if (elem->u.paramdesc.wParamFlags & PARAMFLAG_FOUT)
 	    hres = xbuf_add(buf,(LPBYTE)arg,sizeof(DWORD));
diff --git a/dlls/oleaut32/typelib.c b/dlls/oleaut32/typelib.c
index 11aa4f4..fae272e 100644
--- a/dlls/oleaut32/typelib.c
+++ b/dlls/oleaut32/typelib.c
@@ -19,18 +19,18 @@
  * You should have received a copy of the GNU Lesser General Public
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *                    
+ *
  * --------------------------------------------------------------------------------------
  * Known problems (2000, Francois Jacques)
  *
  * - Tested using OLEVIEW (Platform SDK tool) only.
- *   
- * - dual interface dispinterfaces. vtable-interface ITypeInfo instances are 
- *   creating by doing a straight copy of the dispinterface instance and just changing 
+ *
+ * - dual interface dispinterfaces. vtable-interface ITypeInfo instances are
+ *   creating by doing a straight copy of the dispinterface instance and just changing
  *   its typekind. Pointed structures aren't copied - only the address of the pointers.
  *   So when you release the dispinterface, you delete the vtable-interface structures
  *   as well... fortunately, clean up of structures is not implemented.
- * 
+ *
  * - locale stuff is partially implemented but hasn't been tested.
  *
  * - typelib file is still read in its entirety, but it is released now.
@@ -49,7 +49,7 @@
  * -. lousy fatal error handling
  * -. some methods just return pointers to internal data structures, this is
  *      partly laziness, partly I want to check how windows does it.
- * 
+ *
  */
 
 #include "config.h"
@@ -82,7 +82,7 @@
  *	path of typelib
  */
 HRESULT WINAPI
-QueryPathOfRegTypeLib16(	
+QueryPathOfRegTypeLib16(
 	REFGUID guid,	/* [in] referenced guid */
 	WORD wMaj,	/* [in] major version */
 	WORD wMin,	/* [in] minor version */
@@ -117,14 +117,14 @@
 	*path = SysAllocString16(pathname);
 	return S_OK;
 }
- 
+
 /****************************************************************************
  *		QueryPathOfRegTypeLib	[OLEAUT32.164]
  * RETURNS
  *	path of typelib
  */
 HRESULT WINAPI
-QueryPathOfRegTypeLib(	
+QueryPathOfRegTypeLib(
 	REFGUID guid,	/* [in] referenced guid */
 	WORD wMaj,	/* [in] major version */
 	WORD wMin,	/* [in] minor version */
@@ -158,7 +158,7 @@
         sprintf(szTypeLibKey,
             "SOFTWARE\\Classes\\Typelib\\{%08lx-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}\\%d.%d\\%lx\\win32",
             guid->Data1,    guid->Data2,    guid->Data3,
-            guid->Data4[0], guid->Data4[1], guid->Data4[2], guid->Data4[3], 
+            guid->Data4[0], guid->Data4[1], guid->Data4[2], guid->Data4[3],
             guid->Data4[4], guid->Data4[5], guid->Data4[6], guid->Data4[7],
             wMaj,
             wMin,
@@ -198,10 +198,10 @@
            hr = S_OK;
         }
     }
-	
+
     if (hr != S_OK)
 		TRACE_(typelib)("%s not found\n", szTypeLibKey);
-	
+
     return hr;
 }
 
@@ -279,7 +279,7 @@
     HRESULT res;
     INT index = 1;
     TRACE("(%s,%d,%p)\n",debugstr_w(szFile), regkind, pptLib);
-    
+
     if(!SearchPathW(NULL,szFile,NULL,sizeof(szPath)/sizeof(WCHAR),szPath,
 		    NULL)) {
 
@@ -331,7 +331,7 @@
 /******************************************************************************
  *		LoadRegTypeLib	[OLEAUT32.162]
  */
-HRESULT WINAPI LoadRegTypeLib(	
+HRESULT WINAPI LoadRegTypeLib(
 	REFGUID rguid,		/* [in] referenced guid */
 	WORD wVerMajor,		/* [in] major version */
 	WORD wVerMinor,		/* [in] minor version */
@@ -350,12 +350,12 @@
     TRACE("(IID: %s) load %s (%p)\n",debugstr_guid(rguid), SUCCEEDED(res)? "SUCCESS":"FAILED", *ppTLib);
 
     return res;
-}	
+}
 
 
 /******************************************************************************
  *		RegisterTypeLib	[OLEAUT32.163]
- * Adds information about a type library to the System Registry           
+ * Adds information about a type library to the System Registry
  * NOTES
  *    Docs: ITypeLib FAR * ptlib
  *    Docs: OLECHAR FAR* szFullPath
@@ -554,7 +554,7 @@
 
 /******************************************************************************
  *	UnRegisterTypeLib	[OLEAUT32.186]
- * Removes information about a type library from the System Registry           
+ * Removes information about a type library from the System Registry
  * NOTES
  *
  * RETURNS
@@ -567,7 +567,7 @@
 	WORD wVerMinor,	/* [in] minor version */
 	LCID lcid,	/* [in] locale id */
 	SYSKIND syskind)
-{   
+{
     TRACE("(IID: %s): stub\n",debugstr_guid(libid));
     return S_OK;	/* FIXME: pretend everything is OK */
 }
@@ -614,7 +614,7 @@
 
 /*======================= ITypeLib implementation =======================*/
 
-typedef struct tagTLBCustData 
+typedef struct tagTLBCustData
 {
     GUID guid;
     VARIANT data;
@@ -647,7 +647,7 @@
     ICOM_VFIELD(ITypeLib2);
     UINT ref;
     TLIBATTR LibAttr;            /* guid,lcid,syskind,version,flags */
-    
+
     /* strings can be stored in tlb as multibyte strings BUT they are *always*
      * exported to the application as a UNICODE string.
      */
@@ -688,7 +688,7 @@
     TLBImpLib *pImpTLInfo;  /* If ref is external ptr to library data
 			       TLB_REF_INTERNAL for internal refs
 			       TLB_REF_NOT_FOUND for broken refs */
-  
+
     struct tagTLBRefType * next;
 } TLBRefType;
 
@@ -717,7 +717,7 @@
     BSTR Entry;            /* if its Hiword==0, it numeric; -1 is not present*/
     int ctCustData;
     TLBCustData * pCustData;        /* linked list to cust data; */
-    struct tagTLBFuncDesc * next; 
+    struct tagTLBFuncDesc * next;
 } TLBFuncDesc;
 
 /* internal Variable data */
@@ -730,7 +730,7 @@
     BSTR HelpString;
     int ctCustData;
     TLBCustData * pCustData;/* linked list to cust data; */
-    struct tagTLBVarDesc * next; 
+    struct tagTLBVarDesc * next;
 } TLBVarDesc;
 
 /* internal implemented interface data */
@@ -751,7 +751,7 @@
     TYPEATTR TypeAttr ;         /* _lots_ of type information. */
     ITypeLibImpl * pTypeLib;        /* back pointer to typelib */
     int index;                  /* index in this typelib; */
-    /* type libs seem to store the doc strings in ascii 
+    /* type libs seem to store the doc strings in ascii
      * so why should we do it in unicode?
      */
     BSTR Name;
@@ -987,18 +987,18 @@
 	impl = impl->next;
     }
 }
-      
+
 static void dump_Variant(VARIANT * pvar)
 {
     char szVarType[32];
     LPVOID ref;
-    
+
     TRACE("(%p)\n", pvar);
- 
+
     if (!pvar)  return;
- 
+
     ZeroMemory(szVarType, sizeof(szVarType));
-               
+
     /* FIXME : we could have better trace here, depending on the VARTYPE
      * of the variant
      */
@@ -1059,13 +1059,13 @@
         default:
             TRACE("(?)%ld\n", *(long*)ref);
             break;
-    }       
+    }
 }
 
 static void dump_DispParms(DISPPARAMS * pdp)
 {
     int index = 0;
-    
+
     TRACE("args=%u named args=%u\n", pdp->cArgs, pdp->cNamedArgs);
 
     while (index < pdp->cArgs)
@@ -1242,7 +1242,7 @@
     return bstr;
 }
 /*
- * read a value and fill a VARIANT structure 
+ * read a value and fill a VARIANT structure
  */
 static void MSFT_ReadValue( VARIANT * pVar, int offset, TLBContext *pcx )
 {
@@ -1255,7 +1255,7 @@
         V_UNION(pVar, iVal) = offset & 0xffff;
         return;
     }
-    MSFT_Read(&(V_VT(pVar)), sizeof(VARTYPE), pcx, 
+    MSFT_Read(&(V_VT(pVar)), sizeof(VARTYPE), pcx,
         pcx->pTblDir->pCustData.offset + offset );
     TRACE_(typelib)("Vartype = %x\n", V_VT(pVar));
     switch (V_VT(pVar)){
@@ -1264,22 +1264,22 @@
         case VT_I2  :   /* this should not happen */
         case VT_I4  :
         case VT_R4  :
-        case VT_ERROR   : 
-        case VT_BOOL    : 
-        case VT_I1  : 
-        case VT_UI1 : 
-        case VT_UI2 : 
-        case VT_UI4 : 
-        case VT_INT : 
-        case VT_UINT    : 
+        case VT_ERROR   :
+        case VT_BOOL    :
+        case VT_I1  :
+        case VT_UI1 :
+        case VT_UI2 :
+        case VT_UI4 :
+        case VT_INT :
+        case VT_UINT    :
         case VT_VOID    : /* FIXME: is this right? */
-        case VT_HRESULT : 
+        case VT_HRESULT :
             size=4; break;
         case VT_R8  :
         case VT_CY  :
-        case VT_DATE    : 
-        case VT_I8  : 
-        case VT_UI8 : 
+        case VT_DATE    :
+        case VT_I8  :
+        case VT_UI8 :
         case VT_DECIMAL :  /* FIXME: is this right? */
         case VT_FILETIME :
             size=8;break;
@@ -1302,24 +1302,24 @@
 	size=-4; break;
     /* FIXME: this will not work AT ALL when the variant contains a pointer */
         case VT_DISPATCH :
-        case VT_VARIANT : 
-        case VT_UNKNOWN : 
-        case VT_PTR : 
+        case VT_VARIANT :
+        case VT_UNKNOWN :
+        case VT_PTR :
         case VT_SAFEARRAY :
-        case VT_CARRAY  : 
-        case VT_USERDEFINED : 
-        case VT_LPSTR   : 
-        case VT_LPWSTR  : 
-        case VT_BLOB    : 
-        case VT_STREAM  : 
-        case VT_STORAGE : 
-        case VT_STREAMED_OBJECT : 
-        case VT_STORED_OBJECT   : 
-        case VT_BLOB_OBJECT : 
-        case VT_CF  : 
-        case VT_CLSID   : 
-        default: 
-            size=0; 
+        case VT_CARRAY  :
+        case VT_USERDEFINED :
+        case VT_LPSTR   :
+        case VT_LPWSTR  :
+        case VT_BLOB    :
+        case VT_STREAM  :
+        case VT_STORAGE :
+        case VT_STREAMED_OBJECT :
+        case VT_STORED_OBJECT   :
+        case VT_BLOB_OBJECT :
+        case VT_CF  :
+        case VT_CLSID   :
+        default:
+            size=0;
             FIXME("VARTYPE %d is not supported, setting pointer to NULL\n",
                 V_VT(pVar));
     }
@@ -1342,7 +1342,7 @@
     while(offset >=0){
         count++;
         pNew=TLB_Alloc(sizeof(TLBCustData));
-        MSFT_Read(&entry, sizeof(entry), pcx, 
+        MSFT_Read(&entry, sizeof(entry), pcx,
             pcx->pTblDir->pCDGuids.offset+offset);
         MSFT_ReadGuid(&(pNew->guid), entry.GuidOffset , pcx);
         MSFT_ReadValue(&(pNew->data), entry.DataOffset, pcx);
@@ -1368,35 +1368,35 @@
     TRACE_(typelib)("vt type = %X\n", pTd->vt);
 }
 
-static void 
+static void
 MSFT_DoFuncs(TLBContext*     pcx,
 	    ITypeInfoImpl*  pTI,
-            int             cFuncs, 
+            int             cFuncs,
             int             cVars,
-            int             offset, 
+            int             offset,
             TLBFuncDesc**   pptfd)
 {
-    /* 
+    /*
      * member information is stored in a data structure at offset
      * indicated by the memoffset field of the typeinfo structure
      * There are several distinctive parts.
-     * the first part starts with a field that holds the total length 
+     * the first part starts with a field that holds the total length
      * of this (first) part excluding this field. Then follow the records,
      * for each member there is one record.
      *
      * First entry is always the length of the record (excluding this
-     * length word). 
-     * Rest of the record depends on the type of the member. If there is 
+     * length word).
+     * Rest of the record depends on the type of the member. If there is
      * a field indicating the member type (function variable intereface etc)
      * I have not found it yet. At this time we depend on the information
      * in the type info and the usual order how things are stored.
      *
      * Second follows an array sized nrMEM*sizeof(INT) with a memeber id
      * for each member;
-     * 
-     * Third is a equal sized array with file offsets to the name entry 
+     *
+     * Third is a equal sized array with file offsets to the name entry
      * of each member.
-     * 
+     *
      * Forth and last (?) part is an array with offsets to the records in the
      * first part of this file segment.
      */
@@ -1416,19 +1416,19 @@
         *pptfd = TLB_Alloc(sizeof(TLBFuncDesc));
 
         /* name, eventually add to a hash table */
-        MSFT_Read(&nameoffset, 
-                 sizeof(INT), 
-                 pcx, 
+        MSFT_Read(&nameoffset,
+                 sizeof(INT),
+                 pcx,
                  offset + infolen + (cFuncs + cVars + i + 1) * sizeof(INT));
 
         (*pptfd)->Name = MSFT_ReadName(pcx, nameoffset);
 
         /* read the function information record */
         MSFT_Read(&reclength, sizeof(INT), pcx, recoffset);
-        
+
         reclength &= 0x1ff;
 
-        MSFT_Read(pFuncRec, reclength - sizeof(INT), pcx, DO_NOT_SEEK) ; 
+        MSFT_Read(pFuncRec, reclength - sizeof(INT), pcx, DO_NOT_SEEK) ;
 
         /* do the attributes */
         nrattributes = (reclength - pFuncRec->nrargs * 3 * sizeof(int) - 0x18)
@@ -1437,7 +1437,7 @@
         if ( nrattributes > 0 )
         {
             (*pptfd)->helpcontext = pFuncRec->OptAttr[0] ;
-            
+
             if ( nrattributes > 1 )
             {
                 (*pptfd)->HelpString = MSFT_ReadString(pcx,
@@ -1460,7 +1460,7 @@
 
                         if ( nrattributes > 6 && pFuncRec->FKCCIC & 0x80 )
                         {
-                            MSFT_CustData(pcx, 
+                            MSFT_CustData(pcx,
 					  pFuncRec->OptAttr[6],
 					  &(*pptfd)->pCustData);
                         }
@@ -1470,8 +1470,8 @@
         }
 
         /* fill the FuncDesc Structure */
-        MSFT_Read( & (*pptfd)->funcdesc.memid, 
-                  sizeof(INT), pcx, 
+        MSFT_Read( & (*pptfd)->funcdesc.memid,
+                  sizeof(INT), pcx,
                   offset + infolen + ( i + 1) * sizeof(INT));
 
         (*pptfd)->funcdesc.funckind   =  (pFuncRec->FKCCIC)      & 0x7;
@@ -1482,8 +1482,8 @@
         (*pptfd)->funcdesc.oVft       =   pFuncRec->VtableOffset ;
         (*pptfd)->funcdesc.wFuncFlags =   LOWORD(pFuncRec->Flags) ;
 
-        MSFT_GetTdesc(pcx, 
-		      pFuncRec->DataType,   
+        MSFT_GetTdesc(pcx,
+		      pFuncRec->DataType,
 		      &(*pptfd)->funcdesc.elemdescFunc.tdesc,
 		      pTI);
 
@@ -1493,15 +1493,15 @@
             int j = 0;
             MSFT_ParameterInfo paraminfo;
 
-            (*pptfd)->funcdesc.lprgelemdescParam = 
+            (*pptfd)->funcdesc.lprgelemdescParam =
                 TLB_Alloc(pFuncRec->nrargs * sizeof(ELEMDESC));
 
-            (*pptfd)->pParamDesc = 
+            (*pptfd)->pParamDesc =
                 TLB_Alloc(pFuncRec->nrargs * sizeof(TLBParDesc));
 
             MSFT_Read(&paraminfo,
-		      sizeof(paraminfo), 
-		      pcx, 
+		      sizeof(paraminfo),
+		      pcx,
 		      recoffset + reclength -
 		      pFuncRec->nrargs * sizeof(MSFT_ParameterInfo));
 
@@ -1509,8 +1509,8 @@
             {
                 TYPEDESC* lpArgTypeDesc = 0;
 
-                MSFT_GetTdesc(pcx, 
-			      paraminfo.DataType,   
+                MSFT_GetTdesc(pcx,
+			      paraminfo.DataType,
 			      &(*pptfd)->funcdesc.lprgelemdescParam[j].tdesc,
 			      pTI);
 
@@ -1518,15 +1518,15 @@
 
                 (*pptfd)->pParamDesc[j].Name = (void *) paraminfo.oName;
 
-                /* SEEK value = jump to offset, 
+                /* SEEK value = jump to offset,
                  * from there jump to the end of record,
                  * go back by (j-1) arguments
                  */
                 MSFT_Read( &paraminfo ,
 			   sizeof(MSFT_ParameterInfo), pcx,
-			   recoffset + reclength - ((pFuncRec->nrargs - j - 1) 
+			   recoffset + reclength - ((pFuncRec->nrargs - j - 1)
 					       * sizeof(MSFT_ParameterInfo)));
-                lpArgTypeDesc = 
+                lpArgTypeDesc =
                     & ((*pptfd)->funcdesc.lprgelemdescParam[j].tdesc);
 
                 while ( lpArgTypeDesc != NULL )
@@ -1542,7 +1542,7 @@
                         break;
 
                     case VT_USERDEFINED:
-                        MSFT_DoRefType(pcx, pTI, 
+                        MSFT_DoRefType(pcx, pTI,
 				       lpArgTypeDesc->u.hreftype);
 
                         lpArgTypeDesc = NULL;
@@ -1560,7 +1560,7 @@
             {
                 TYPEDESC* lpArgTypeDesc;
 
-                (*pptfd)->funcdesc.elemdescFunc = 
+                (*pptfd)->funcdesc.elemdescFunc =
                 (*pptfd)->funcdesc.lprgelemdescParam[j];
 
                 lpArgTypeDesc = & ((*pptfd)->funcdesc.elemdescFunc.tdesc) ;
@@ -1573,13 +1573,13 @@
                         lpArgTypeDesc = lpArgTypeDesc->u.lptdesc;
                         break;
                     case VT_CARRAY:
-                        lpArgTypeDesc = 
+                        lpArgTypeDesc =
                         & (lpArgTypeDesc->u.lpadesc->tdescElem);
 
                         break;
 
                     case VT_USERDEFINED:
-                        MSFT_DoRefType(pcx, 
+                        MSFT_DoRefType(pcx,
 				       pTI,
 				       lpArgTypeDesc->u.hreftype);
 
@@ -1600,12 +1600,12 @@
                     MSFT_ReadName( pcx, (int)(*pptfd)->pParamDesc[j].Name );
 
                 /* default value */
-                if ( (PARAMFLAG_FHASDEFAULT & 
+                if ( (PARAMFLAG_FHASDEFAULT &
                       (*pptfd)->funcdesc.lprgelemdescParam[j].u.paramdesc.wParamFlags) &&
                      ((pFuncRec->FKCCIC) & 0x1000) )
                 {
-                    INT* pInt = (INT *)((char *)pFuncRec + 
-                                   reclength - 
+                    INT* pInt = (INT *)((char *)pFuncRec +
+                                   reclength -
                                    (pFuncRec->nrargs * 4 + 1) * sizeof(INT) );
 
                     PARAMDESC* pParamDesc = & (*pptfd)->funcdesc.lprgelemdescParam[j].u.paramdesc;
@@ -1613,13 +1613,13 @@
                     pParamDesc->pparamdescex = TLB_Alloc(sizeof(PARAMDESCEX));
                     pParamDesc->pparamdescex->cBytes = sizeof(PARAMDESCEX);
 
-		    MSFT_ReadValue(&(pParamDesc->pparamdescex->varDefaultValue), 
+		    MSFT_ReadValue(&(pParamDesc->pparamdescex->varDefaultValue),
                         pInt[j], pcx);
                 }
                 /* custom info */
                 if ( nrattributes > 7 + j && pFuncRec->FKCCIC & 0x80 )
                 {
-                    MSFT_CustData(pcx, 
+                    MSFT_CustData(pcx,
 				  pFuncRec->OptAttr[7+j],
 				  &(*pptfd)->pParamDesc[j].pCustData);
                 }
@@ -1646,19 +1646,19 @@
     TRACE_(typelib)("\n");
 
     MSFT_Read(&infolen,sizeof(INT), pcx, offset);
-    MSFT_Read(&recoffset,sizeof(INT), pcx, offset + infolen + 
+    MSFT_Read(&recoffset,sizeof(INT), pcx, offset + infolen +
         ((cFuncs+cVars)*2+cFuncs + 1)*sizeof(INT));
     recoffset += offset+sizeof(INT);
     for(i=0;i<cVars;i++){
         *pptvd=TLB_Alloc(sizeof(TLBVarDesc));
     /* name, eventually add to a hash table */
-        MSFT_Read(&nameoffset, sizeof(INT), pcx, 
+        MSFT_Read(&nameoffset, sizeof(INT), pcx,
             offset + infolen + (cFuncs + cVars + i + 1) * sizeof(INT));
         (*pptvd)->Name=MSFT_ReadName(pcx, nameoffset);
     /* read the variable information record */
         MSFT_Read(&reclength, sizeof(INT), pcx, recoffset);
         reclength &=0xff;
-        MSFT_Read(pVarRec, reclength - sizeof(INT), pcx, DO_NOT_SEEK) ; 
+        MSFT_Read(pVarRec, reclength - sizeof(INT), pcx, DO_NOT_SEEK) ;
     /* Optional data */
         if(reclength >(6*sizeof(INT)) )
             (*pptvd)->HelpContext=pVarRec->HelpContext;
@@ -1668,11 +1668,11 @@
         if(reclength >(9*sizeof(INT)) )
             (*pptvd)->HelpStringContext=pVarRec->HelpStringContext;
     /* fill the VarDesc Structure */
-        MSFT_Read(&(*pptvd)->vardesc.memid, sizeof(INT), pcx, 
+        MSFT_Read(&(*pptvd)->vardesc.memid, sizeof(INT), pcx,
             offset + infolen + ( i + 1) * sizeof(INT));
         (*pptvd)->vardesc.varkind = pVarRec->VarKind;
         (*pptvd)->vardesc.wVarFlags = pVarRec->Flags;
-        MSFT_GetTdesc(pcx, pVarRec->DataType,    
+        MSFT_GetTdesc(pcx, pVarRec->DataType,
             &(*pptvd)->vardesc.elemdescVar.tdesc, pTI);
 /*   (*pptvd)->vardesc.lpstrSchema; is reserved (SDK) FIXME?? */
         if(pVarRec->VarKind == VAR_CONST ){
@@ -1713,7 +1713,7 @@
 
         TRACE_(typelib)("offset %x, masked offset %x\n", offset, offset + (offset & 0xfffffffc));
 
-        MSFT_Read(&impinfo, sizeof(impinfo), pcx, 
+        MSFT_Read(&impinfo, sizeof(impinfo), pcx,
             pcx->pTblDir->pImpInfo.offset + (offset & 0xfffffffc));
         for(j=0;pImpLib;j++){   /* search the known offsets of all import libraries */
             if(pImpLib->offset==impinfo.oImpFile) break;
@@ -1751,7 +1751,7 @@
         if(offset<0) break; /* paranoia */
         *ppImpl=TLB_Alloc(sizeof(**ppImpl));
         MSFT_Read(&refrec,sizeof(refrec),pcx,offset+pcx->pTblDir->pRefTab.offset);
-        MSFT_DoRefType(pcx, pTI, refrec.reftype); 
+        MSFT_DoRefType(pcx, pTI, refrec.reftype);
 	(*ppImpl)->hRef = refrec.reftype;
 	(*ppImpl)->implflags=refrec.flags;
         (*ppImpl)->ctCustData=
@@ -1799,7 +1799,7 @@
     ptiRet->TypeAttr.cImplTypes=tiBase.cImplTypes;
     ptiRet->TypeAttr.cbSizeVft=tiBase.cbSizeVft; /* FIXME: this is only the non inherited part */
     if(ptiRet->TypeAttr.typekind == TKIND_ALIAS)
-        MSFT_GetTdesc(pcx, tiBase.datatype1, 
+        MSFT_GetTdesc(pcx, tiBase.datatype1,
             &ptiRet->TypeAttr.tdescAlias, ptiRet);
 
 /*  FIXME: */
@@ -1818,23 +1818,23 @@
     /* functions */
     if(ptiRet->TypeAttr.cFuncs >0 )
         MSFT_DoFuncs(pcx, ptiRet, ptiRet->TypeAttr.cFuncs,
-		    ptiRet->TypeAttr.cVars, 
+		    ptiRet->TypeAttr.cVars,
 		    tiBase.memoffset, & ptiRet->funclist);
     /* variables */
     if(ptiRet->TypeAttr.cVars >0 )
         MSFT_DoVars(pcx, ptiRet, ptiRet->TypeAttr.cFuncs,
-		   ptiRet->TypeAttr.cVars, 
+		   ptiRet->TypeAttr.cVars,
 		   tiBase.memoffset, & ptiRet->varlist);
     if(ptiRet->TypeAttr.cImplTypes >0 ) {
         switch(ptiRet->TypeAttr.typekind)
         {
         case TKIND_COCLASS:
-            MSFT_DoImplTypes(pcx, ptiRet, ptiRet->TypeAttr.cImplTypes , 
+            MSFT_DoImplTypes(pcx, ptiRet, ptiRet->TypeAttr.cImplTypes ,
                 tiBase.datatype1);
             break;
         case TKIND_DISPATCH:
             ptiRet->impltypelist=TLB_Alloc(sizeof(TLBImplType));
-            
+
             if (tiBase.datatype1 != -1)
             {
               MSFT_DoRefType(pcx, ptiRet, tiBase.datatype1);
@@ -1857,17 +1857,17 @@
 		(*ppRef)->reference        = -1;
 		(*ppRef)->index            = TLB_REF_USE_GUID;
 		(*ppRef)->pImpTLInfo       = TLB_Alloc(sizeof(TLBImpLib));
-		(*ppRef)->pImpTLInfo->guid = IID_StdOle;             
+		(*ppRef)->pImpTLInfo->guid = IID_StdOle;
 		(*ppRef)->pImpTLInfo->name = SysAllocStringLen(NULL,
 							      nStdOleLen  + 1);
-              
+
 		MultiByteToWideChar(CP_ACP,
 				    MB_PRECOMPOSED,
 				    szStdOle,
 				    -1,
 				    (*ppRef)->pImpTLInfo->name,
 				    SysStringLen((*ppRef)->pImpTLInfo->name));
-                                  
+
 		(*ppRef)->pImpTLInfo->lcid          = 0;
 		(*ppRef)->pImpTLInfo->wVersionMajor = 2;
 		(*ppRef)->pImpTLInfo->wVersionMinor = 0;
@@ -1956,7 +1956,7 @@
           {
             LPVOID pBase = LockResource(hGlobal);
             DWORD  dwTLBLength = SizeofResource(hinstDLL, hrsrc);
-            
+
             if (pBase)
             {
               /* try to load as incore resource */
@@ -2019,7 +2019,7 @@
     cx.mapping = pLib;
     cx.pLibInfo = pTypeLibImpl;
     cx.length = dwTLBLength;
-    
+
     /* read header */
     MSFT_Read((void*)&tlbHeader, sizeof(tlbHeader), &cx, 0);
     TRACE("header:\n");
@@ -2035,7 +2035,7 @@
 
     /* now read the segment directory */
     TRACE("read segment directory (at %ld)\n",lPSegDir);
-    MSFT_Read((void*)&tlbSegDir, sizeof(tlbSegDir), &cx, lPSegDir);  
+    MSFT_Read((void*)&tlbSegDir, sizeof(tlbSegDir), &cx, lPSegDir);
     cx.pTblDir = &tlbSegDir;
 
     /* just check two entries */
@@ -2133,9 +2133,9 @@
 
                 for(j = 0; j<td[2]; j++)
 		{
-                    MSFT_Read(& pTypeLibImpl->pTypeDesc[i].u.lpadesc->rgbounds[j].cElements, 
+                    MSFT_Read(& pTypeLibImpl->pTypeDesc[i].u.lpadesc->rgbounds[j].cElements,
                         sizeof(INT), &cx, DO_NOT_SEEK);
-                    MSFT_Read(& pTypeLibImpl->pTypeDesc[i].u.lpadesc->rgbounds[j].lLbound, 
+                    MSFT_Read(& pTypeLibImpl->pTypeDesc[i].u.lpadesc->rgbounds[j].lLbound,
                         sizeof(INT), &cx, DO_NOT_SEEK);
                 }
             }
@@ -2630,7 +2630,7 @@
 		  TLB_MultiByteToBSTR(paramName);
 	    }
 	}
-	
+
 	ppFuncDesc = &((*ppFuncDesc)->next);
 	if(pFunc->next == 0xffff) break;
     }
@@ -2776,7 +2776,7 @@
     pTypeLibImpl->ref = 1;
 
     pHeader = pLib;
-    
+
     TRACE("header:\n");
     TRACE("\tmagic=0x%08lx, file blocks = %d\n", pHeader->SLTG_magic,
 	  pHeader->nrOfFileBlks );
@@ -2785,7 +2785,7 @@
 	      pHeader->SLTG_magic);
 	return NULL;
     }
-    
+
     /* There are pHeader->nrOfFileBlks - 2 TypeInfo records in this typelib */
     pTypeLibImpl->TypeInfoCount = pHeader->nrOfFileBlks - 2;
 
@@ -2837,7 +2837,7 @@
 
 
     ptr = (char*)pLibBlk + len;
-    
+
     for(i = 0; i < pTypeLibImpl->TypeInfoCount; i++) {
 	WORD w, extra;
 	len = 0;
@@ -2888,7 +2888,7 @@
        table */
 
     pNameTable = (char*)pLibBlk + len + 0x216;
-    
+
     pNameTable += 2;
 
     TRACE("Library name is %s\n", pNameTable + pLibBlk->name);
@@ -2936,7 +2936,7 @@
       (*ppTypeInfoImpl)->TypeAttr.wMinorVerNum = pTIHeader->minor_version;
       (*ppTypeInfoImpl)->TypeAttr.wTypeFlags =
 	(pTIHeader->typeflags1 >> 3) | (pTIHeader->typeflags2 << 5);
-      
+
       if((pTIHeader->typeflags1 & 7) != 2)
 	FIXME("typeflags1 = %02x\n", pTIHeader->typeflags1);
       if(pTIHeader->typeflags3 != 2)
@@ -2950,11 +2950,11 @@
 
       switch(pTIHeader->typekind) {
       case TKIND_ENUM:
-	pTITail = SLTG_ProcessEnum(pBlk, *ppTypeInfoImpl, pNameTable); 
+	pTITail = SLTG_ProcessEnum(pBlk, *ppTypeInfoImpl, pNameTable);
 	break;
 
       case TKIND_RECORD:
-	pTITail = SLTG_ProcessRecord(pBlk, *ppTypeInfoImpl, pNameTable); 
+	pTITail = SLTG_ProcessRecord(pBlk, *ppTypeInfoImpl, pNameTable);
 	break;
 
       case TKIND_INTERFACE:
@@ -3003,7 +3003,7 @@
     TRACE("(%p)->(IID: %s)\n",This,debugstr_guid(riid));
 
     *ppvObject=NULL;
-    if(IsEqualIID(riid, &IID_IUnknown) || 
+    if(IsEqualIID(riid, &IID_IUnknown) ||
        IsEqualIID(riid,&IID_ITypeLib)||
        IsEqualIID(riid,&IID_ITypeLib2))
     {
@@ -3038,7 +3038,7 @@
     ICOM_THIS( ITypeLibImpl, iface);
 
     --(This->ref);
-    
+
     TRACE("(%p)->(%u)\n",This, This->ref);
 
     if (!This->ref)
@@ -3070,7 +3070,7 @@
           SysFreeString(This->HelpStringDll);
           This->HelpStringDll = NULL;
       }
-    
+
       ITypeInfo_Release((ITypeInfo*) This->pTypeInfo);
       HeapFree(GetProcessHeap(),0,This);
       return 0;
@@ -3080,7 +3080,7 @@
 }
 
 /* ITypeLib::GetTypeInfoCount
- * 
+ *
  * Returns the number of type descriptions in the type library
  */
 static UINT WINAPI ITypeLib2_fnGetTypeInfoCount( ITypeLib2 *iface)
@@ -3096,18 +3096,18 @@
  */
 static HRESULT WINAPI ITypeLib2_fnGetTypeInfo(
     ITypeLib2 *iface,
-    UINT index, 
+    UINT index,
     ITypeInfo **ppTInfo)
 {
     int i;
-    
+
     ICOM_THIS( ITypeLibImpl, iface);
     ITypeInfoImpl *pTypeInfo = This->pTypeInfo;
 
     TRACE("(%p)->(index=%d) \n", This, index);
 
     if (!ppTInfo) return E_INVALIDARG;
-    
+
     /* search element n in list */
     for(i=0; i < index; i++)
     {
@@ -3117,10 +3117,10 @@
         TRACE("-- element not found\n");
         return TYPE_E_ELEMENTNOTFOUND;
       }
-    }   
+    }
 
     *ppTInfo = (ITypeInfo *) pTypeInfo;
-    
+
     ITypeInfo_AddRef(*ppTInfo);
     TRACE("-- found (%p)\n",*ppTInfo);
     return S_OK;
@@ -3143,7 +3143,7 @@
     TRACE("(%p) index %d \n",This, index);
 
     if(!pTKind) return E_INVALIDARG;
-    
+
     /* search element n in list */
     for(i=0; i < index; i++)
     {
@@ -3190,8 +3190,8 @@
       }
     }
 
-    TRACE("-- found (%p, %s)\n", 
-          pTypeInfo, 
+    TRACE("-- found (%p, %s)\n",
+          pTypeInfo,
           debugstr_w(pTypeInfo->Name));
 
     *ppTInfo = (ITypeInfo*)pTypeInfo;
@@ -3205,7 +3205,7 @@
  *
  */
 static HRESULT WINAPI ITypeLib2_fnGetLibAttr(
-	ITypeLib2 *iface, 
+	ITypeLib2 *iface,
 	LPTLIBATTR *ppTLibAttr)
 {
     ICOM_THIS( ITypeLibImpl, iface);
@@ -3244,23 +3244,23 @@
     INT index,
     BSTR *pBstrName,
     BSTR *pBstrDocString,
-    DWORD *pdwHelpContext, 
+    DWORD *pdwHelpContext,
     BSTR *pBstrHelpFile)
 {
     ICOM_THIS( ITypeLibImpl, iface);
-    
+
     HRESULT result = E_INVALIDARG;
-    
+
     ITypeInfo *pTInfo;
 
-   
+
     TRACE("(%p) index %d Name(%p) DocString(%p) HelpContext(%p) HelpFile(%p)\n",
         This, index,
-        pBstrName, pBstrDocString, 
+        pBstrName, pBstrDocString,
         pdwHelpContext, pBstrHelpFile);
-   
+
     if(index<0)
-    { 
+    {
         /* documentation for the typelib */
         if(pBstrName)
         {
@@ -3292,19 +3292,19 @@
 
         result = S_OK;
     }
-    else 
+    else
     {
         /* for a typeinfo */
         result = ITypeLib2_fnGetTypeInfo(iface, index, &pTInfo);
 
         if(SUCCEEDED(result))
         {
-            result = ITypeInfo_GetDocumentation(pTInfo, 
-                                          MEMBERID_NIL,  
+            result = ITypeInfo_GetDocumentation(pTInfo,
+                                          MEMBERID_NIL,
                                           pBstrName,
-                                          pBstrDocString, 
+                                          pBstrDocString,
                                           pdwHelpContext, pBstrHelpFile);
-            
+
             ITypeInfo_Release(pTInfo);
         }
     }
@@ -3350,14 +3350,14 @@
         }
         for(pVInfo=pTInfo->varlist;pVInfo;pVInfo=pVInfo->next)
             if(!memcmp(szNameBuf,pVInfo->Name, nNameBufLen)) goto ITypeLib2_fnIsName_exit;
-       
+
     }
     *pfName=FALSE;
 
 ITypeLib2_fnIsName_exit:
     TRACE("(%p)slow! search for %s: %s found!\n", This,
           debugstr_w(szNameBuf), *pfName?"NOT":"");
-    
+
     return S_OK;
 }
 
@@ -3380,7 +3380,7 @@
     TLBFuncDesc *pFInfo;
     TLBVarDesc *pVInfo;
     int i,j = 0;
-   
+
     UINT nNameBufLen = SysStringLen(szNameBuf);
 
     for(pTInfo=This->pTypeInfo;pTInfo && j<*pcFound; pTInfo=pTInfo->next){
@@ -3403,7 +3403,7 @@
           This, *pcFound, debugstr_w(szNameBuf), j);
 
     *pcFound=j;
-    
+
     return S_OK;
 }
 
@@ -3428,7 +3428,7 @@
  */
 static HRESULT WINAPI ITypeLib2_fnGetCustData(
 	ITypeLib2 * iface,
-	REFGUID guid, 
+	REFGUID guid,
         VARIANT *pVarVal)
 {
     ICOM_THIS( ITypeLibImpl, iface);
@@ -3438,7 +3438,7 @@
     {
       if( IsEqualIID(guid, &pCData->guid)) break;
     }
-    
+
     TRACE("(%p) guid %s %s found!x)\n", This, debugstr_guid(guid), pCData? "" : "NOT");
 
     if(pCData)
@@ -3457,7 +3457,7 @@
  *
  */
 static HRESULT WINAPI ITypeLib2_fnGetLibStatistics(
-	ITypeLib2 * iface, 
+	ITypeLib2 * iface,
         ULONG *pcUniqueNames,
 	ULONG *pcchUniqueNames)
 {
@@ -3478,7 +3478,7 @@
  *
  */
 static HRESULT WINAPI ITypeLib2_fnGetDocumentation2(
-	ITypeLib2 * iface, 
+	ITypeLib2 * iface,
         INT index,
 	LCID lcid,
 	BSTR *pbstrHelpString,
@@ -3511,26 +3511,26 @@
     {
       /* for a typeinfo */
       result=ITypeLib2_GetTypeInfo(iface, index, &pTInfo);
-      
+
       if(SUCCEEDED(result))
-      { 
+      {
         ITypeInfo2 * pTInfo2;
-        result = ITypeInfo_QueryInterface(pTInfo, 
-                                          &IID_ITypeInfo2, 
+        result = ITypeInfo_QueryInterface(pTInfo,
+                                          &IID_ITypeInfo2,
                                           (LPVOID*) &pTInfo2);
 
         if(SUCCEEDED(result))
         {
-          result = ITypeInfo2_GetDocumentation2(pTInfo2, 
-                                           MEMBERID_NIL, 
+          result = ITypeInfo2_GetDocumentation2(pTInfo2,
+                                           MEMBERID_NIL,
                                            lcid,
-                                           pbstrHelpString, 
-                                           pdwHelpStringContext, 
+                                           pbstrHelpString,
+                                           pdwHelpStringContext,
                                            pbstrHelpStringDll);
-  
+
           ITypeInfo2_Release(pTInfo2);
         }
-            
+
         ITypeInfo_Release(pTInfo);
       }
     }
@@ -3539,7 +3539,7 @@
 
 /* ITypeLib2::GetAllCustData
  *
- * Gets all custom data items for the library. 
+ * Gets all custom data items for the library.
  *
  */
 static HRESULT WINAPI ITypeLib2_fnGetAllCustData(
@@ -3549,7 +3549,7 @@
     ICOM_THIS( ITypeLibImpl, iface);
     TLBCustData *pCData;
     int i;
-    TRACE("(%p) returning %d items\n", This, This->ctCustData); 
+    TRACE("(%p) returning %d items\n", This, This->ctCustData);
     pCustData->prgCustData = TLB_Alloc(This->ctCustData * sizeof(CUSTDATAITEM));
     if(pCustData->prgCustData ){
         pCustData->cCustData=This->ctCustData;
@@ -3613,7 +3613,7 @@
     TRACE("(%p)->(IID: %s)\n",This,debugstr_guid(riid));
 
     *ppvObject=NULL;
-    if(IsEqualIID(riid, &IID_IUnknown) || 
+    if(IsEqualIID(riid, &IID_IUnknown) ||
             IsEqualIID(riid,&IID_ITypeInfo)||
             IsEqualIID(riid,&IID_ITypeInfo2))
         *ppvObject = This;
@@ -3646,20 +3646,20 @@
     ICOM_THIS( ITypeInfoImpl, iface);
 
     --(This->ref);
-    
+
     TRACE("(%p)->(%u)\n",This, This->ref);
 
     if (!This->ref)
     {
       FIXME("destroy child objects\n");
 
-      TRACE("destroying ITypeInfo(%p)\n",This); 
+      TRACE("destroying ITypeInfo(%p)\n",This);
       if (This->Name)
       {
           SysFreeString(This->Name);
           This->Name = 0;
       }
-      
+
       if (This->DocString)
       {
           SysFreeString(This->DocString);
@@ -3718,7 +3718,7 @@
 {
     ICOM_THIS( ITypeInfoImpl, iface);
     int i;
-    TLBFuncDesc * pFDesc; 
+    TLBFuncDesc * pFDesc;
     TRACE("(%p) index %d\n", This, index);
     for(i=0, pFDesc=This->funclist; i!=index && pFDesc; i++, pFDesc=pFDesc->next)
         ;
@@ -3732,7 +3732,7 @@
 
 /* ITypeInfo::GetVarDesc
  *
- * Retrieves a VARDESC structure that describes the specified variable. 
+ * Retrieves a VARDESC structure that describes the specified variable.
  *
  */
 static HRESULT WINAPI ITypeInfo_fnGetVarDesc( ITypeInfo2 *iface, UINT index,
@@ -3740,7 +3740,7 @@
 {
     ICOM_THIS( ITypeInfoImpl, iface);
     int i;
-    TLBVarDesc * pVDesc; 
+    TLBVarDesc * pVDesc;
     TRACE("(%p) index %d\n", This, index);
     for(i=0, pVDesc=This->varlist; i!=index && pVDesc; i++, pVDesc=pVDesc->next)
         ;
@@ -3762,8 +3762,8 @@
         BSTR  *rgBstrNames, UINT cMaxNames, UINT  *pcNames)
 {
     ICOM_THIS( ITypeInfoImpl, iface);
-    TLBFuncDesc * pFDesc; 
-    TLBVarDesc * pVDesc; 
+    TLBFuncDesc * pFDesc;
+    TLBVarDesc * pVDesc;
     int i;
     TRACE("(%p) memid=0x%08lx Maxname=%d\n", This, memid, cMaxNames);
     for(pFDesc=This->funclist; pFDesc && pFDesc->funcdesc.memid != memid; pFDesc=pFDesc->next);
@@ -3842,7 +3842,7 @@
          retrieve the associated TKIND_INTERFACE handle for the current TKIND_DISPATCH
       */
       if( This->TypeAttr.typekind != TKIND_DISPATCH) return E_INVALIDARG;
-      
+
       if (This->TypeAttr.wTypeFlags & TYPEFLAG_FDISPATCHABLE &&
           This->TypeAttr.wTypeFlags & TYPEFLAG_FDUAL )
       {
@@ -3861,21 +3861,21 @@
       {
         pImpl = pImpl->next;
       }
-      
+
       if (!pImpl) return TYPE_E_ELEMENTNOTFOUND;
-      
+
       *pRefType = pImpl->hRef;
-      
+
       TRACE("-- 0x%08lx\n", pImpl->hRef );
     }
-    
+
     return S_OK;
-   
+
 }
 
 /* ITypeInfo::GetImplTypeFlags
- * 
- * Retrieves the IMPLTYPEFLAGS enumeration for one implemented interface 
+ *
+ * Retrieves the IMPLTYPEFLAGS enumeration for one implemented interface
  * or base interface in a type description.
  */
 static HRESULT WINAPI ITypeInfo_fnGetImplTypeFlags( ITypeInfo2 *iface,
@@ -3905,8 +3905,8 @@
         LPOLESTR  *rgszNames, UINT cNames, MEMBERID  *pMemId)
 {
     ICOM_THIS( ITypeInfoImpl, iface);
-    TLBFuncDesc * pFDesc; 
-    TLBVarDesc * pVDesc; 
+    TLBFuncDesc * pFDesc;
+    TLBVarDesc * pVDesc;
     HRESULT ret=S_OK;
 
     TRACE("(%p) Name %s cNames %d\n", This, debugstr_w(*rgszNames),
@@ -3926,19 +3926,19 @@
             };
             return ret;
         }
-    }   
+    }
     for(pVDesc=This->varlist; pVDesc; pVDesc=pVDesc->next) {
         if(!lstrcmpiW(*rgszNames, pVDesc->Name)) {
             if(cNames) *pMemId=pVDesc->vardesc.memid;
             return ret;
         }
     }
-    /* not found, see if this is and interface with an inheritance */       
-    if(This->TypeAttr.typekind==TKIND_INTERFACE && 
+    /* not found, see if this is and interface with an inheritance */
+    if(This->TypeAttr.typekind==TKIND_INTERFACE &&
             This->TypeAttr.cImplTypes ){
         /* recursive search */
         ITypeInfo *pTInfo;
-        ret=ITypeInfo_GetRefTypeInfo(iface, 
+        ret=ITypeInfo_GetRefTypeInfo(iface,
                 This->impltypelist->hRef, &pTInfo);
         if(SUCCEEDED(ret)){
             ret=ITypeInfo_GetIDsOfNames(pTInfo, rgszNames, cNames, pMemId );
@@ -3952,7 +3952,7 @@
 }
 
 /* ITypeInfo::Invoke
- * 
+ *
  * Invokes a method, or accesses a property of an object, that implements the
  * interface described by the type description.
  */
@@ -4037,8 +4037,8 @@
     UINT  *pArgErr)
 {
     ICOM_THIS( ITypeInfoImpl, iface);
-    TLBFuncDesc * pFDesc; 
-    TLBVarDesc * pVDesc; 
+    TLBFuncDesc * pFDesc;
+    TLBVarDesc * pVDesc;
     int i;
 
     TRACE("(%p)(%p,id=%ld,flags=0x%08x,%p,%p,%p,%p) partial stub!\n",
@@ -4173,7 +4173,7 @@
 }
 
 /* ITypeInfo::GetDocumentation
- * 
+ *
  * Retrieves the documentation string, the complete Help file name and path,
  * and the context ID for the Help topic for a specified type description.
  */
@@ -4182,8 +4182,8 @@
         DWORD  *pdwHelpContext, BSTR  *pBstrHelpFile)
 {
     ICOM_THIS( ITypeInfoImpl, iface);
-    TLBFuncDesc * pFDesc; 
-    TLBVarDesc * pVDesc; 
+    TLBFuncDesc * pFDesc;
+    TLBVarDesc * pVDesc;
     TRACE("(%p) memid %ld Name(%p) DocString(%p)"
           " HelpContext(%p) HelpFile(%p)\n",
         This, memid, pBstrName, pBstrDocString, pdwHelpContext, pBstrHelpFile);
@@ -4218,7 +4218,7 @@
 }
 
 /*  ITypeInfo::GetDllEntry
- * 
+ *
  * Retrieves a description or specification of an entry point for a function
  * in a DLL.
  */
@@ -4232,7 +4232,7 @@
 }
 
 /* ITypeInfo::GetRefTypeInfo
- * 
+ *
  * If a type description references other type descriptions, it retrieves
  * the referenced type descriptions.
  */
@@ -4245,25 +4245,25 @@
     HRESULT result = E_FAIL;
 
 
-    if (hRefType == -1 && 
+    if (hRefType == -1 &&
 	(((ITypeInfoImpl*) This)->TypeAttr.typekind   == TKIND_DISPATCH) &&
 	(((ITypeInfoImpl*) This)->TypeAttr.wTypeFlags &  TYPEFLAG_FDUAL))
     {
-	  /* when we meet a DUAL dispinterface, we must create the interface 
+	  /* when we meet a DUAL dispinterface, we must create the interface
 	  * version of it.
 	  */
 	  ITypeInfoImpl* pTypeInfoImpl = (ITypeInfoImpl*) ITypeInfo_Constructor();
 
-		
+
 	  /* the interface version contains the same information as the dispinterface
 	   * copy the contents of the structs.
 	   */
 	  *pTypeInfoImpl = *This;
 	  pTypeInfoImpl->ref = 1;
-		
+
 	  /* change the type to interface */
 	  pTypeInfoImpl->TypeAttr.typekind = TKIND_INTERFACE;
-	  
+
 	  *ppTInfo = (ITypeInfo*) pTypeInfoImpl;
 
 	  ITypeInfo_AddRef((ITypeInfo*) pTypeInfoImpl);
@@ -4311,8 +4311,8 @@
 	    }
 	    if(SUCCEEDED(result)) {
 	        if(pRefType->index == TLB_REF_USE_GUID)
-		    result = ITypeLib2_GetTypeInfoOfGuid(pTLib, 
-							 &pRefType->guid, 
+		    result = ITypeLib2_GetTypeInfoOfGuid(pTLib,
+							 &pRefType->guid,
 							 ppTInfo);
 		else
 		    result = ITypeLib2_GetTypeInfo(pTLib, pRefType->index,
@@ -4329,7 +4329,7 @@
 }
 
 /* ITypeInfo::AddressOfMember
- * 
+ *
  * Retrieves the addresses of static functions or variables, such as those
  * defined in a DLL.
  */
@@ -4342,12 +4342,12 @@
 }
 
 /* ITypeInfo::CreateInstance
- * 
- * Creates a new instance of a type that describes a component object class 
+ *
+ * Creates a new instance of a type that describes a component object class
  * (coclass).
  */
-static HRESULT WINAPI ITypeInfo_fnCreateInstance( ITypeInfo2 *iface, 
-        IUnknown *pUnk, REFIID riid, VOID  **ppvObj) 
+static HRESULT WINAPI ITypeInfo_fnCreateInstance( ITypeInfo2 *iface,
+        IUnknown *pUnk, REFIID riid, VOID  **ppvObj)
 {
     ICOM_THIS( ITypeInfoImpl, iface);
     FIXME("(%p) stub!\n", This);
@@ -4367,7 +4367,7 @@
 }
 
 /* ITypeInfo::GetContainingTypeLib
- * 
+ *
  * Retrieves the containing type library and the index of the type description
  * within that type library.
  */
@@ -4440,7 +4440,7 @@
  *
  * Returns the type flags without any allocations. This returns a DWORD type
  * flag, which expands the type flags without growing the TYPEATTR (type
- * attribute). 
+ * attribute).
  *
  */
 static HRESULT WINAPI ITypeInfo2_fnGetTypeFlags( ITypeInfo2 * iface,
@@ -4465,7 +4465,7 @@
     int i;
     HRESULT result;
     /* FIXME: should check for invKind??? */
-    for(i=0, pFuncInfo=This->funclist;pFuncInfo && 
+    for(i=0, pFuncInfo=This->funclist;pFuncInfo &&
             memid != pFuncInfo->funcdesc.memid; i++, pFuncInfo=pFuncInfo->next);
     if(pFuncInfo){
         *pFuncIndex=i;
@@ -4482,7 +4482,7 @@
 /* TypeInfo2::GetVarIndexOfMemId
  *
  * Binds to a specific member based on a known DISPID, where the member name
- * is not known (for example, when binding to a default member). 
+ * is not known (for example, when binding to a default member).
  *
  */
 static HRESULT WINAPI ITypeInfo2_fnGetVarIndexOfMemId( ITypeInfo2 * iface,
@@ -4492,7 +4492,7 @@
     TLBVarDesc *pVarInfo;
     int i;
     HRESULT result;
-    for(i=0, pVarInfo=This->varlist; pVarInfo && 
+    for(i=0, pVarInfo=This->varlist; pVarInfo &&
             memid != pVarInfo->vardesc.memid; i++, pVarInfo=pVarInfo->next)
         ;
     if(pVarInfo){
@@ -4545,7 +4545,7 @@
 {
     ICOM_THIS( ITypeInfoImpl, iface);
     TLBCustData *pCData=NULL;
-    TLBFuncDesc * pFDesc; 
+    TLBFuncDesc * pFDesc;
     int i;
     for(i=0, pFDesc=This->funclist; i!=index && pFDesc; i++,
             pFDesc=pFDesc->next);
@@ -4574,16 +4574,16 @@
 	UINT indexParam,
 	REFGUID guid,
 	VARIANT *pVarVal)
-{   
+{
     ICOM_THIS( ITypeInfoImpl, iface);
     TLBCustData *pCData=NULL;
-    TLBFuncDesc * pFDesc; 
+    TLBFuncDesc * pFDesc;
     int i;
 
     for(i=0, pFDesc=This->funclist; i!=indexFunc && pFDesc; i++,pFDesc=pFDesc->next);
 
     if(pFDesc && indexParam >=0 && indexParam<pFDesc->funcdesc.cParams)
-        for(pCData=pFDesc->pParamDesc[indexParam].pCustData; pCData; 
+        for(pCData=pFDesc->pParamDesc[indexParam].pCustData; pCData;
                 pCData = pCData->next)
             if( IsEqualIID(guid, &pCData->guid)) break;
 
@@ -4607,10 +4607,10 @@
 	UINT index,
 	REFGUID guid,
 	VARIANT *pVarVal)
-{   
+{
     ICOM_THIS( ITypeInfoImpl, iface);
     TLBCustData *pCData=NULL;
-    TLBVarDesc * pVDesc; 
+    TLBVarDesc * pVDesc;
     int i;
 
     for(i=0, pVDesc=This->varlist; i!=index && pVDesc; i++, pVDesc=pVDesc->next);
@@ -4643,10 +4643,10 @@
 	UINT index,
 	REFGUID guid,
 	VARIANT *pVarVal)
-{   
+{
     ICOM_THIS( ITypeInfoImpl, iface);
     TLBCustData *pCData=NULL;
-    TLBImplType * pRDesc; 
+    TLBImplType * pRDesc;
     int i;
 
     for(i=0, pRDesc=This->impltypelist; i!=index && pRDesc; i++, pRDesc=pRDesc->next);
@@ -4658,7 +4658,7 @@
         if( IsEqualIID(guid, &pCData->guid)) break;
       }
     }
-    
+
     TRACE("(%p) guid %s %s found!x)\n", This, debugstr_guid(guid), pCData? "" : "NOT");
 
     if(pCData)
@@ -4671,7 +4671,7 @@
 }
 
 /* ITypeInfo2::GetDocumentation2
- * 
+ *
  * Retrieves the documentation string, the complete Help file name and path,
  * the localization context to use, and the context ID for the library Help
  * topic in the Help file.
@@ -4686,8 +4686,8 @@
 	BSTR *pbstrHelpStringDll)
 {
     ICOM_THIS( ITypeInfoImpl, iface);
-    TLBFuncDesc * pFDesc; 
-    TLBVarDesc * pVDesc; 
+    TLBFuncDesc * pFDesc;
+    TLBVarDesc * pVDesc;
     TRACE("(%p) memid %ld lcid(0x%lx)  HelpString(%p) "
           "HelpStringContext(%p) HelpStringDll(%p)\n",
           This, memid, lcid, pbstrHelpString, pdwHelpStringContext,
@@ -4734,7 +4734,7 @@
 
 /* ITypeInfo2::GetAllCustData
  *
- * Gets all custom data items for the Type info. 
+ * Gets all custom data items for the Type info.
  *
  */
 static HRESULT WINAPI ITypeInfo2_fnGetAllCustData(
@@ -4745,7 +4745,7 @@
     TLBCustData *pCData;
     int i;
 
-    TRACE("(%p) returning %d items\n", This, This->ctCustData); 
+    TRACE("(%p) returning %d items\n", This, This->ctCustData);
 
     pCustData->prgCustData = TLB_Alloc(This->ctCustData * sizeof(CUSTDATAITEM));
     if(pCustData->prgCustData ){
@@ -4773,9 +4773,9 @@
 {
     ICOM_THIS( ITypeInfoImpl, iface);
     TLBCustData *pCData;
-    TLBFuncDesc * pFDesc; 
+    TLBFuncDesc * pFDesc;
     int i;
-    TRACE("(%p) index %d\n", This, index); 
+    TRACE("(%p) index %d\n", This, index);
     for(i=0, pFDesc=This->funclist; i!=index && pFDesc; i++,
             pFDesc=pFDesc->next)
         ;
@@ -4809,14 +4809,14 @@
 {
     ICOM_THIS( ITypeInfoImpl, iface);
     TLBCustData *pCData=NULL;
-    TLBFuncDesc * pFDesc; 
+    TLBFuncDesc * pFDesc;
     int i;
-    TRACE("(%p) index %d\n", This, indexFunc); 
+    TRACE("(%p) index %d\n", This, indexFunc);
     for(i=0, pFDesc=This->funclist; i!=indexFunc && pFDesc; i++,
             pFDesc=pFDesc->next)
         ;
     if(pFDesc && indexParam >=0 && indexParam<pFDesc->funcdesc.cParams){
-        pCustData->prgCustData = 
+        pCustData->prgCustData =
             TLB_Alloc(pFDesc->pParamDesc[indexParam].ctCustData *
                     sizeof(CUSTDATAITEM));
         if(pCustData->prgCustData ){
@@ -4846,9 +4846,9 @@
 {
     ICOM_THIS( ITypeInfoImpl, iface);
     TLBCustData *pCData;
-    TLBVarDesc * pVDesc; 
+    TLBVarDesc * pVDesc;
     int i;
-    TRACE("(%p) index %d\n", This, index); 
+    TRACE("(%p) index %d\n", This, index);
     for(i=0, pVDesc=This->varlist; i!=index && pVDesc; i++,
             pVDesc=pVDesc->next)
         ;
@@ -4884,9 +4884,9 @@
 {
     ICOM_THIS( ITypeInfoImpl, iface);
     TLBCustData *pCData;
-    TLBImplType * pRDesc; 
+    TLBImplType * pRDesc;
     int i;
-    TRACE("(%p) index %d\n", This, index); 
+    TRACE("(%p) index %d\n", This, index);
     for(i=0, pRDesc=This->impltypelist; i!=index && pRDesc; i++,
             pRDesc=pRDesc->next)
         ;
@@ -4910,7 +4910,7 @@
     return TYPE_E_ELEMENTNOTFOUND;
 }
 
-static ICOM_VTABLE(ITypeInfo2) tinfvt = 
+static ICOM_VTABLE(ITypeInfo2) tinfvt =
 {
     ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
 
diff --git a/dlls/oleaut32/typelib.h b/dlls/oleaut32/typelib.h
index c5c2cc3..d1032d5 100644
--- a/dlls/oleaut32/typelib.h
+++ b/dlls/oleaut32/typelib.h
@@ -49,7 +49,7 @@
 /*
  * structure of the typelib type2 header
  * it is at the beginning of a type lib file
- *  
+ *
  */
 typedef struct tagMSFT_Header {
 /*0x00*/INT magic1;       /* 0x5446534D "MSFT" */
@@ -191,8 +191,8 @@
 */
 } MSFT_FuncRecord;
 
-/* after this may follow an array with default value pointers if the 
- * appropriate bit in the FKCCIC field has been set: 
+/* after this may follow an array with default value pointers if the
+ * appropriate bit in the FKCCIC field has been set:
  * INT   oDefautlValue[nrargs];
  */
 
@@ -357,7 +357,7 @@
 	WORD res1a;	      /* 0xffff */
 	WORD name_offs;	      /* offset to name in name table */
 	WORD more_bytes;      /* if this is non-zero we get this many
-				 bytes before the next element, which seem 
+				 bytes before the next element, which seem
 				 to reference the docstring of the type ? */
 	WORD res20;	      /* 0xffff */
 	DWORD helpcontext;
@@ -456,7 +456,7 @@
 			   middle 6 bits */
 	WORD rettype;	/* return type VT_?? or offset to ret type */
 	WORD vtblpos;	/* position in vtbl? */
-	WORD funcflags; /* present if magic == 0x6c */ 
+	WORD funcflags; /* present if magic == 0x6c */
 /* Param list starts, repeat next two as required */
 #if 0
 	WORD  name;	/* offset to 2nd letter of name */
diff --git a/dlls/oleaut32/variant.c b/dlls/oleaut32/variant.c
index 7736ffe..baef33b 100644
--- a/dlls/oleaut32/variant.c
+++ b/dlls/oleaut32/variant.c
@@ -35,7 +35,7 @@
  */
 
 #include "config.h"
- 
+
 #include <string.h>
 #include <stdlib.h>
 #include <stdio.h>
@@ -535,7 +535,7 @@
 }
 /******************************************************************************
  *	   StringDupAtoBstr		[INTERNAL]
- * 
+ *
  */
 static BSTR StringDupAtoBstr( char* strIn )
 {
@@ -562,7 +562,7 @@
      */
    nSign = (d >= 0.0) ? 1 : -1;
     d = fabs( d );
-    
+
 	/* Remove the decimals.
 	 */
    integerValue = floor( d );
@@ -629,7 +629,7 @@
 		pNewString = strdup( str );
 		str[0] = '\0';
 		strToken = strtok( pNewString, strOfCharToRemove );
-		while( strToken != NULL ) { 
+		while( strToken != NULL ) {
 			strcat( str, strToken );
 			strToken = strtok( NULL, strOfCharToRemove );
 		}
@@ -670,7 +670,7 @@
 	LPSTR strToken = NULL;
 	int nTokens = 0;
 	LPSTR pChar = NULL;
-	
+
 	/* Check if we have a valid argument
 	 */
 	if( strRealString == NULL )
@@ -683,9 +683,9 @@
 		/* Make sure we only have ONE token in the string.
 		 */
 		strToken = strtok( strRealString, " " );
-		while( strToken != NULL ) { 
-			nTokens++;		
-			strToken = strtok( NULL, " " );	
+		while( strToken != NULL ) {
+			nTokens++;
+			strToken = strtok( NULL, " " );
 		}
 
 		if( nTokens != 1 )
@@ -777,7 +777,7 @@
 		case '6':
 		case '7':
 		case '8':
-		case '9': 
+		case '9':
 			if( bFirstDigitsProcessed == FALSE )
 			{
 				if( bDecimalPointProcessed ||
@@ -823,7 +823,7 @@
 			break;
 		/* If DecimalPoint...
 		 */
-		case '.': 
+		case '.':
 			if( bDecimalPointProcessed ||
 				bSecondDigitsProcessed ||
 				bExponentProcessed ||
@@ -893,14 +893,14 @@
 	unsigned short vtFrom = 0;
 	vtFrom = V_VT(ps) & VT_TYPEMASK;
 
-	
+
 	/* Note: Since "long" and "int" values both have 4 bytes and are
 	 * both signed integers "int" will be treated as "long" in the
 	 * following code.
 	 * The same goes for their unsigned versions.
 	 */
 
-	/* Trivial Case: If the coercion is from two types that are 
+	/* Trivial Case: If the coercion is from two types that are
 	 * identical then we can blindly copy from one argument to another.*/
 	if ((vt==vtFrom))
 	{
@@ -1243,7 +1243,7 @@
 			break;
 		}
 		break;
-		
+
 	case( VT_R4 ):
 		switch( vtFrom )
 		{
@@ -1606,7 +1606,7 @@
 		FIXME("Coercion from %d to %d\n", vtFrom, vt );
 		break;
 	}
-	
+
 	return res;
 }
 
@@ -1652,13 +1652,13 @@
 		{
 			res = DISP_E_BADVARTYPE;
 		}
-			
+
     }
     else
     {
         res = ValidateVtRange( vt );
     }
-		
+
 	return res;
 }
 
@@ -1685,13 +1685,13 @@
 		{
 			res = DISP_E_BADVARTYPE;
 		}
-			
+
     }
     else
     {
         res = ValidateVtRange( vt );
     }
-		
+
 	return res;
 }
 
@@ -1766,7 +1766,7 @@
 	}
       }
     }
-	
+
     /*
      * Empty all the fields and mark the type as empty.
      */
@@ -1796,7 +1796,7 @@
   if( pvargDest != pvargSrc && res == S_OK )
   {
     res = VariantClear( pvargDest );
-		
+
     if( res == S_OK )
     {
       if( V_VT(pvargSrc) & VT_BYREF )
@@ -1850,9 +1850,9 @@
 	      break;
 	  }
 	}
-	
+
 	V_VT(pvargDest) = V_VT(pvargSrc);
-      }      
+      }
     }
   }
 
@@ -1876,7 +1876,7 @@
 
   if( res != S_OK )
     return res;
-  
+
   if( V_VT(pvargSrc) & VT_BYREF )
   {
     VARIANTARG varg;
@@ -1927,7 +1927,7 @@
 		 * this API dereferences the inner Variants to only one depth.
 		 * If the inner Variant itself contains an
 		 * other inner variant the E_INVALIDARG error is
-		 * returned. 
+		 * returned.
 		 */
 		if( pvargSrc->n1.n2.wReserved1 & PROCESSING_INNER_VARIANT )
 		{
@@ -1944,7 +1944,7 @@
 		   * that will be passed to the VariantCopyInd function.
 		   */
 		  (V_UNION(pvargSrc,pvarVal))->n1.n2.wReserved1 |= PROCESSING_INNER_VARIANT;
-		  
+
 		  /* Dereference the inner variant.
 		   */
 		  res = VariantCopyInd( pvargDest, V_UNION(pvargSrc,pvarVal) );
@@ -2007,7 +2007,7 @@
 	HRESULT res = S_OK;
 	VARIANTARG varg;
 	VariantInit( &varg );
-	
+
 	TRACE("(%p, %p, %ld, %u, %u) vt=%d\n", pvargDest, pvargSrc, lcid, wFlags, vt, V_VT(pvargSrc));
 
 	/* validate our source argument.
@@ -2052,7 +2052,7 @@
 				 */
 				VariantClear( &Variant );
 			}
-	
+
 		}
 		else
 		{
@@ -2064,7 +2064,7 @@
 	/* this should not fail.
 	 */
 	VariantClear( &varg );
-	
+
 	/* set the type of the destination
 	 */
 	if ( res == S_OK )
@@ -2091,7 +2091,7 @@
 	}
 
 	*pbOut = (BYTE) sIn;
-	
+
 	return S_OK;
 }
 
@@ -2110,7 +2110,7 @@
 	}
 
 	*pbOut = (BYTE) lIn;
-	
+
 	return S_OK;
 }
 
@@ -2131,7 +2131,7 @@
 	}
 
 	*pbOut = (BYTE) fltIn;
-	
+
 	return S_OK;
 }
 
@@ -2260,7 +2260,7 @@
 	/* Convert the valid string to a floating point number.
 	 */
 	dValue = atof( pNewString );
-	
+
 	/* We don't need the string anymore so free it.
 	 */
 	HeapFree( GetProcessHeap(), 0 , pNewString );
@@ -2284,9 +2284,9 @@
  */
 HRESULT WINAPI VarUI1FromCy(CY cyIn, BYTE* pbOut) {
    double t = round((((double)cyIn.s.Hi * 4294967296.0) + (double)cyIn.s.Lo) / 10000);
-   
+
    if (t > UI1_MAX || t < UI1_MIN) return DISP_E_OVERFLOW;
-   
+
    *pbOut = (BYTE)t;
    return S_OK;
 }
@@ -2299,7 +2299,7 @@
 	TRACE("( 0x%08x, %p ), stub\n", bIn, psOut );
 
 	*psOut = (short) bIn;
-	
+
 	return S_OK;
 }
 
@@ -2318,7 +2318,7 @@
 	}
 
 	*psOut = (short) lIn;
-	
+
 	return S_OK;
 }
 
@@ -2466,7 +2466,7 @@
 	/* Convert the valid string to a floating point number.
 	 */
 	dValue = atof( pNewString );
-	
+
 	/* We don't need the string anymore so free it.
 	 */
 	HeapFree( GetProcessHeap(), 0, pNewString );
@@ -2490,9 +2490,9 @@
  */
 HRESULT WINAPI VarI2FromCy(CY cyIn, short* psOut) {
    double t = round((((double)cyIn.s.Hi * 4294967296.0) + (double)cyIn.s.Lo) / 10000);
-   
+
    if (t > I2_MAX || t < I2_MIN) return DISP_E_OVERFLOW;
-   
+
    *psOut = (SHORT)t;
    return S_OK;
 }
@@ -2659,7 +2659,7 @@
 	/* Convert the valid string to a floating point number.
 	 */
 	dValue = atof( pNewString );
-	
+
 	/* We don't need the string anymore so free it.
 	 */
 	HeapFree( GetProcessHeap(), 0, pNewString );
@@ -2683,9 +2683,9 @@
  */
 HRESULT WINAPI VarI4FromCy(CY cyIn, LONG* plOut) {
    double t = round((((double)cyIn.s.Hi * 4294967296.0) + (double)cyIn.s.Lo) / 10000);
-   
+
    if (t > I4_MAX || t < I4_MIN) return DISP_E_OVERFLOW;
-   
+
    *plOut = (LONG)t;
    return S_OK;
 }
@@ -2834,7 +2834,7 @@
 	/* Convert the valid string to a floating point number.
 	 */
 	dValue = atof( pNewString );
-	
+
 	/* We don't need the string anymore so free it.
 	 */
 	HeapFree( GetProcessHeap(), 0, pNewString );
@@ -2857,7 +2857,7 @@
  */
 HRESULT WINAPI VarR4FromCy(CY cyIn, FLOAT* pfltOut) {
    *pfltOut = (FLOAT)((((double)cyIn.s.Hi * 4294967296.0) + (double)cyIn.s.Lo) / 10000);
-   
+
    return S_OK;
 }
 
@@ -2991,7 +2991,7 @@
 	/* Convert the valid string to a floating point number.
 	 */
 	dValue = atof( pNewString );
-	
+
 	/* We don't need the string anymore so free it.
 	 */
 	HeapFree( GetProcessHeap(), 0, pNewString );
@@ -3007,7 +3007,7 @@
  */
 HRESULT WINAPI VarR8FromCy(CY cyIn, double* pdblOut) {
    *pdblOut = (double)((((double)cyIn.s.Hi * 4294967296.0) + (double)cyIn.s.Lo) / 10000);
-   
+
    return S_OK;
 }
 
@@ -3096,16 +3096,16 @@
  * of space and/or tab characters, which are ignored.
  *
  * The formats for the date part are has follows:
- * mm/[dd/][yy]yy 
+ * mm/[dd/][yy]yy
  * [dd/]mm/[yy]yy
- * [yy]yy/mm/dd 
+ * [yy]yy/mm/dd
  * January dd[,] [yy]yy
  * dd January [yy]yy
  * [yy]yy January dd
  * Whitespace can be inserted anywhere between these tokens.
  *
  * The formats for the date and time string are has follows.
- * date[whitespace][time] 
+ * date[whitespace][time]
  * [time][whitespace]date
  *
  * These are the only characters allowed in a string representing a date and time:
@@ -3214,7 +3214,7 @@
 	sprintf( pBuffer, "%d", bVal );
 
 	*pbstrOut =  StringDupAtoBstr( pBuffer );
-	
+
 	return S_OK;
 }
 
@@ -3277,7 +3277,7 @@
 	return E_NOTIMPL;
 }
 
- 
+
 /******************************************************************************
  *		VarBstrFromDate		[OLEAUT32.114]
  *
@@ -3504,7 +3504,7 @@
 	}
 
 	HeapFree( GetProcessHeap(), 0, pNewString );
-	
+
 	return ret;
 }
 
@@ -3551,7 +3551,7 @@
 HRESULT WINAPI VarBoolFromCy(CY cyIn, VARIANT_BOOL* pboolOut) {
       if (cyIn.s.Hi || cyIn.s.Lo) *pboolOut = -1;
       else *pboolOut = 0;
-      
+
       return S_OK;
 }
 
@@ -3684,7 +3684,7 @@
 	/* Convert the valid string to a floating point number.
 	 */
 	dValue = atof( pNewString );
-  
+
 	/* We don't need the string anymore so free it.
 	 */
 	HeapFree( GetProcessHeap(), 0, pNewString );
@@ -3754,9 +3754,9 @@
  */
 HRESULT WINAPI VarI1FromCy(CY cyIn, CHAR* pcOut) {
    double t = round((((double)cyIn.s.Hi * 4294967296.0) + (double)cyIn.s.Lo) / 10000);
-   
+
    if (t > CHAR_MAX || t < CHAR_MIN) return DISP_E_OVERFLOW;
-   
+
    *pcOut = (CHAR)t;
    return S_OK;
 }
@@ -3883,7 +3883,7 @@
 	/* Convert the valid string to a floating point number.
 	 */
 	dValue = atof( pNewString );
-  
+
 	/* We don't need the string anymore so free it.
 	 */
 	HeapFree( GetProcessHeap(), 0, pNewString );
@@ -3964,7 +3964,7 @@
 	/* Convert the valid string to a floating point number.
 	 */
 	dValue = atof( pNewString );
-  
+
 	/* We don't need the string anymore so free it.
 	 */
 	HeapFree( GetProcessHeap(), 0, pNewString );
@@ -3988,11 +3988,11 @@
  */
 HRESULT WINAPI VarUI2FromCy(CY cyIn, USHORT* pusOut) {
    double t = round((((double)cyIn.s.Hi * 4294967296.0) + (double)cyIn.s.Lo) / 10000);
-   
+
    if (t > UI2_MAX || t < UI2_MIN) return DISP_E_OVERFLOW;
-      
+
    *pusOut = (USHORT)t;
-   
+
    return S_OK;
 }
 
@@ -4136,7 +4136,7 @@
  */
 HRESULT WINAPI VarUI4FromCy(CY cyIn, ULONG* pulOut) {
    double t = round((((double)cyIn.s.Hi * 4294967296.0) + (double)cyIn.s.Lo) / 10000);
-   
+
    if (t > UI4_MAX || t < UI4_MIN) return DISP_E_OVERFLOW;
 
    *pulOut = (ULONG)t;
@@ -4176,7 +4176,7 @@
       pcyOut->s.Hi = (LONG)(t / (double)4294967296.0);
       pcyOut->s.Lo = (ULONG)fmod(t, (double)4294967296.0);
       if (lIn < 0) pcyOut->s.Hi--;
-   
+
       return S_OK;
 }
 
@@ -4189,7 +4189,7 @@
    pcyOut->s.Hi = (LONG)(t / (double)4294967296.0);
    pcyOut->s.Lo = (ULONG)fmod(t, (double)4294967296.0);
    if (fltIn < 0) pcyOut->s.Hi--;
-   
+
    return S_OK;
 }
 
@@ -4227,7 +4227,7 @@
 	return E_NOTIMPL;
 }
 
- 
+
 /**********************************************************************
  *              VarCyFromBool [OLEAUT32.106]
  * Convert boolean to currency
@@ -4236,7 +4236,7 @@
    if (boolIn < 0) pcyOut->s.Hi = -1;
    else pcyOut->s.Hi = 0;
    pcyOut->s.Lo = (ULONG)boolIn * (ULONG)10000;
-   
+
    return S_OK;
 }
 
@@ -4248,7 +4248,7 @@
    if (cIn < 0) pcyOut->s.Hi = -1;
    else pcyOut->s.Hi = 0;
    pcyOut->s.Lo = (ULONG)cIn * (ULONG)10000;
-   
+
    return S_OK;
 }
 
@@ -4259,7 +4259,7 @@
 HRESULT WINAPI VarCyFromUI2(USHORT usIn, CY* pcyOut) {
    pcyOut->s.Hi = 0;
    pcyOut->s.Lo = (ULONG)usIn * (ULONG)10000;
-   
+
    return S_OK;
 }
 
@@ -4271,7 +4271,7 @@
    double t = (double)ulIn * (double)10000;
    pcyOut->s.Hi = (LONG)(t / (double)4294967296.0);
    pcyOut->s.Lo = (ULONG)fmod(t, (double)4294967296.0);
-      
+
    return S_OK;
 }
 
@@ -4287,11 +4287,11 @@
     struct tm t;
 
     TRACE("( 0x%x, 0x%x, %p ), stub\n", wDosDate, wDosTime, pvtime );
-    
+
     t.tm_sec = (wDosTime & 0x001f) * 2;
     t.tm_min = (wDosTime & 0x07e0) >> 5;
     t.tm_hour = (wDosTime & 0xf800) >> 11;
-    
+
     t.tm_mday = (wDosDate & 0x001f);
     t.tm_mon = (wDosDate & 0x01e0) >> 5;
     t.tm_year = ((wDosDate & 0xfe00) >> 9) + 1980;
@@ -4625,7 +4625,7 @@
 /**********************************************************************
  *              VarBstrCmp [OLEAUT32.440]
  *
- * flags can be: 
+ * flags can be:
  *   NORM_IGNORECASE, NORM_IGNORENONSPACE, NORM_IGNORESYMBOLS
  *   NORM_IGNORESTRINGWIDTH, NORM_IGNOREKANATYPE, NORM_IGNOREKASHIDA
  *
diff --git a/dlls/olecli/olecli_main.c b/dlls/olecli/olecli_main.c
index 04e7d6a..5d8c611 100644
--- a/dlls/olecli/olecli_main.c
+++ b/dlls/olecli/olecli_main.c
@@ -145,7 +145,7 @@
 /******************************************************************************
  *           OleCreateLinkFromClip	[OLECLI32.11]
  */
-OLESTATUS WINAPI OleCreateLinkFromClip( 
+OLESTATUS WINAPI OleCreateLinkFromClip(
 	LPCSTR name,LPOLECLIENT olecli,LHCLIENTDOC hclientdoc,LPCSTR xname,
 	LPOLEOBJECT *lpoleob,OLEOPT_RENDER render,OLECLIPFORMAT clipformat
 ) {
diff --git a/dlls/opengl32/wgl.c b/dlls/opengl32/wgl.c
index 9433548..02e233f 100644
--- a/dlls/opengl32/wgl.c
+++ b/dlls/opengl32/wgl.c
@@ -186,7 +186,7 @@
   BOOL ret = TRUE;
 
   TRACE("(%p)\n", hglrc);
-  
+
   ENTER_GL();
   /* A game (Half Life not to name it) deletes twice the same context,
    * so make sure it is valid first */
@@ -202,7 +202,7 @@
     ret = FALSE;
   }
   LEAVE_GL();
-  
+
   return ret;
 }
 
@@ -234,7 +234,7 @@
   LEAVE_GL();
 
   TRACE(" returning %p (GL context %p)\n", ret, gl_ctx);
-  
+
   return ret;
 }
 
@@ -246,7 +246,7 @@
   Wine_GLContext *ret;
 
   TRACE("()\n");
-  
+
   ENTER_GL();
   gl_ctx = glXGetCurrentContext();
   ret = get_context_from_GLXContext(gl_ctx);
@@ -319,9 +319,9 @@
     if ((local_func = glXGetProcAddressARB(ext_ret->glx_name)) == NULL) {
       char buf[256];
       void *ret = NULL;
-      
+
       /* Remove the 3 last letters (EXT, ARB, ...).
-	 
+
 	 I know that some extensions have more than 3 letters (MESA, NV,
 	 INTEL, ...), but this is only a stop-gap measure to fix buggy
 	 OpenGL drivers (moreover, it is only useful for old 1.0 apps
@@ -330,19 +330,19 @@
       strncpy(buf, ext_ret->glx_name, strlen(ext_ret->glx_name) - 3);
       buf[strlen(ext_ret->glx_name) - 3] = '\0';
       TRACE(" extension not found in the Linux OpenGL library, checking against libGL bug with %s..\n", buf);
-      
+
       ret = GetProcAddress(hm, buf);
       if (ret != NULL) {
 	TRACE(" found function in main OpenGL library (%p) !\n", ret);
       } else {
 	WARN("Did not find function %s (%s) in your OpenGL library !\n", lpszProc, ext_ret->glx_name);
-      }	
-      
+      }
+
       return ret;
     } else {
       TRACE(" returning function  (%p)\n", ext_ret->func);
       *(ext_ret->func_ptr) = local_func;
-      
+
       return ext_ret->func;
     }
   }
@@ -356,7 +356,7 @@
   BOOL ret;
 
   TRACE("(%08x,%p)\n", hdc, hglrc);
-  
+
   ENTER_GL();
   if (hglrc == NULL) {
       ret = glXMakeCurrent(default_display, None, NULL);
@@ -406,7 +406,7 @@
 			  HGLRC hglrc2) {
   Wine_GLContext *org  = (Wine_GLContext *) hglrc1;
   Wine_GLContext *dest = (Wine_GLContext *) hglrc2;
-  
+
   TRACE("(%p, %p)\n", org, dest);
 
   if (dest->ctx != NULL) {
@@ -426,7 +426,7 @@
     LEAVE_GL();
     TRACE(" created a delayed OpenGL context (%p) for Wine context %p sharing lists with OpenGL ctx %p\n", dest->ctx, dest, org->ctx);
   }
-  
+
   return TRUE;
 }
 
@@ -458,7 +458,7 @@
   LEAVE_GL();
   return TRUE;
 }
- 
+
 /***********************************************************************
  *		wglUseFontOutlinesA (OPENGL32.@)
  */
@@ -507,16 +507,16 @@
 
   /* Try to get the visual from the Root Window.  We can't use the standard (presumably
      double buffered) X11DRV visual with the Root Window, since we don't know if the Root
-     Window was created using the standard X11DRV visual, and glXMakeCurrent can't deal 
-     with mismatched visuals.  Note that the Root Window visual may not be double 
+     Window was created using the standard X11DRV visual, and glXMakeCurrent can't deal
+     with mismatched visuals.  Note that the Root Window visual may not be double
      buffered, so apps actually attempting to render this way may flicker */
   if (XGetWindowAttributes( default_display, root, &win_attr ))
   {
-    rootVisual = win_attr.visual; 
+    rootVisual = win_attr.visual;
   }
   else
   {
-    /* Get the default visual, since we can't seem to get the attributes from the 
+    /* Get the default visual, since we can't seem to get the attributes from the
        Root Window.  Let's hope that the Root Window Visual matches the DefaultVisual */
     rootVisual = DefaultVisual( default_display, DefaultScreen(default_display) );
   }
diff --git a/dlls/opengl32/wgl.h b/dlls/opengl32/wgl.h
index adff60d..8960e14 100644
--- a/dlls/opengl32/wgl.h
+++ b/dlls/opengl32/wgl.h
@@ -25,45 +25,45 @@
 typedef void *HGLRC;
 
 typedef struct {
-  WORD  nSize; 
-  WORD  nVersion; 
-  DWORD dwFlags; 
-  BYTE  iPixelType; 
-  BYTE  cColorBits; 
-  BYTE  cRedBits; 
-  BYTE  cRedShift; 
-  BYTE  cGreenBits; 
-  BYTE  cGreenShift; 
-  BYTE  cBlueBits; 
-  BYTE  cBlueShift; 
-  BYTE  cAlphaBits; 
-  BYTE  cAlphaShift; 
-  BYTE  cAccumBits; 
-  BYTE  cAccumRedBits; 
-  BYTE  cAccumGreenBits; 
-  BYTE  cAccumBlueBits; 
-  BYTE  cAccumAlphaBits; 
-  BYTE  cDepthBits; 
-  BYTE  cStencilBits; 
-  BYTE  cAuxBuffers; 
+  WORD  nSize;
+  WORD  nVersion;
+  DWORD dwFlags;
+  BYTE  iPixelType;
+  BYTE  cColorBits;
+  BYTE  cRedBits;
+  BYTE  cRedShift;
+  BYTE  cGreenBits;
+  BYTE  cGreenShift;
+  BYTE  cBlueBits;
+  BYTE  cBlueShift;
+  BYTE  cAlphaBits;
+  BYTE  cAlphaShift;
+  BYTE  cAccumBits;
+  BYTE  cAccumRedBits;
+  BYTE  cAccumGreenBits;
+  BYTE  cAccumBlueBits;
+  BYTE  cAccumAlphaBits;
+  BYTE  cDepthBits;
+  BYTE  cStencilBits;
+  BYTE  cAuxBuffers;
   BYTE  iLayerPlane;
-  BYTE  bReserved; 
-  COLORREF crTransparent; 
-} LAYERPLANEDESCRIPTOR; 
+  BYTE  bReserved;
+  COLORREF crTransparent;
+} LAYERPLANEDESCRIPTOR;
 typedef LAYERPLANEDESCRIPTOR* LPLAYERPLANEDESCRIPTOR;
 
 typedef struct {
-  FLOAT      x; 
-  FLOAT      y; 
-} POINTFLOAT; 
+  FLOAT      x;
+  FLOAT      y;
+} POINTFLOAT;
 
 typedef struct {
-  FLOAT      gmfBlackBoxX; 
-  FLOAT      gmfBlackBoxY; 
-  POINTFLOAT gmfptGlyphOrigin; 
-  FLOAT      gmfCellIncX; 
-  FLOAT      gmfCellIncY; 
-} GLYPHMETRICSFLOAT; 
+  FLOAT      gmfBlackBoxX;
+  FLOAT      gmfBlackBoxY;
+  POINTFLOAT gmfptGlyphOrigin;
+  FLOAT      gmfCellIncX;
+  FLOAT      gmfCellIncY;
+} GLYPHMETRICSFLOAT;
 typedef GLYPHMETRICSFLOAT *LPGLYPHMETRICSFLOAT;
 
 HGLRC WINAPI wglCreateContext(HDC hdc) ;
diff --git a/dlls/psapi/psapi_main.c b/dlls/psapi/psapi_main.c
index 211defd..2896fa6 100644
--- a/dlls/psapi/psapi_main.c
+++ b/dlls/psapi/psapi_main.c
@@ -69,7 +69,7 @@
     *lpcbNeeded = 0;
 
   return TRUE;
-}    
+}
 
 
 /***********************************************************************
diff --git a/dlls/rasapi32/rasapi.c b/dlls/rasapi32/rasapi.c
index 79d3db9..f2e13c6 100644
--- a/dlls/rasapi32/rasapi.c
+++ b/dlls/rasapi32/rasapi.c
@@ -1,6 +1,6 @@
 /*
  * RASAPI32
- * 
+ *
  * Copyright 1998 Marcus Meissner
  *
  * This library is free software; you can redistribute it and/or
@@ -32,7 +32,7 @@
 	FIXME("(%p,%p,%p),stub!\n",rca,lpcb,lpcConnections);
 	FIXME("RAS support is not implemented ! Configure program to use LAN connection/winsock instead !\n");
 	*lpcConnections = 0; /* no RAS connections available */
-	
+
 	return 0;
 }
 
@@ -40,8 +40,8 @@
  *                 RasEnumEntriesA		        	[RASAPI32.546]
  */
 DWORD WINAPI RasEnumEntriesA( LPCSTR Reserved, LPCSTR lpszPhoneBook,
-        LPRASENTRYNAMEA lpRasEntryName, 
-        LPDWORD lpcb, LPDWORD lpcEntries) 
+        LPRASENTRYNAMEA lpRasEntryName,
+        LPDWORD lpcb, LPDWORD lpcEntries)
 {
 	FIXME("(%p,%s,%p,%p,%p),stub!\n",Reserved,debugstr_a(lpszPhoneBook),
             lpRasEntryName,lpcb,lpcEntries);
@@ -54,7 +54,7 @@
  */
 DWORD WINAPI RasGetEntryDialParamsA( LPCSTR lpszPhoneBook,
         LPRASDIALPARAMSA lpRasDialParams,
-        LPBOOL lpfPassword) 
+        LPBOOL lpfPassword)
 {
 	FIXME("(%s,%p,%p),stub!\n",debugstr_a(lpszPhoneBook),
             lpRasDialParams,lpfPassword);
diff --git a/dlls/richedit/ansi_gen.h b/dlls/richedit/ansi_gen.h
index 534948e..3d96752 100644
--- a/dlls/richedit/ansi_gen.h
+++ b/dlls/richedit/ansi_gen.h
@@ -12,7 +12,7 @@
  in decimal or 0xyy as hex yy.  Single or double quotes may be used to quote
  characters.*/
 
-int ansi_gen[] = 
+int ansi_gen[] =
 {
   rtfSC_formula 	 ,0x06,
   rtfSC_nobrkhyphen	 ,0x1e,
diff --git a/dlls/richedit/ansi_sym.h b/dlls/richedit/ansi_sym.h
index 679f017..f471848 100644
--- a/dlls/richedit/ansi_sym.h
+++ b/dlls/richedit/ansi_sym.h
@@ -1,17 +1,17 @@
 /*
  * RTF ANSI character set (\ansi) Symbol font map
- * 
+ *
  * Field 1 is the standard character name which the character value in
  * field 2 maps onto.  (It doesn't mean "to produce the character in field 1,
  * use the value in field 2.)
- * 
+ *
  * The character value may be given either as a single character (which will be
  * converted to the ASCII value of the character), or in numeric format, either
  * in decimal or 0xyy as hex yy.  Single or double quotes may be used to quote
  * characters.
- * 
+ *
  */
- 
+
 int ansi_sym[] =
 {
   rtfSC_formula        ,0x06,
diff --git a/dlls/richedit/charlist.c b/dlls/richedit/charlist.c
index e622912..26d1e99 100644
--- a/dlls/richedit/charlist.c
+++ b/dlls/richedit/charlist.c
@@ -1,9 +1,9 @@
 /*
- * 
+ *
  *  Character List
- * 
+ *
  *  Copyright (c) 2000 by Jean-Claude Batista
- *  
+ *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
  * License as published by the Free Software Foundation; either
@@ -35,20 +35,20 @@
 extern HANDLE RICHED32_hHeap;
 
 void CHARLIST_Enqueue( CHARLIST* pCharList, char myChar )
-{   
+{
     CHARLISTENTRY* pNewEntry = HeapAlloc(RICHED32_hHeap, 0,sizeof(CHARLISTENTRY));
     pNewEntry->pNext = NULL;
     pNewEntry->myChar = myChar;
 
     TRACE("\n");
-    
+
     if(pCharList->pTail == NULL)
     {
          pCharList->pHead = pCharList->pTail = pNewEntry;
     }
     else
     {
-         CHARLISTENTRY* pCurrent = pCharList->pTail;         
+         CHARLISTENTRY* pCurrent = pCharList->pTail;
          pCharList->pTail = pCurrent->pNext = pNewEntry;
     }
 
@@ -56,13 +56,13 @@
 }
 
 void CHARLIST_Push( CHARLIST* pCharList, char myChar)
-{   
+{
     CHARLISTENTRY* pNewEntry = malloc(sizeof(CHARLISTENTRY));
-    
+
     TRACE("\n");
 
     pNewEntry->myChar = myChar;
-    
+
     if(pCharList->pHead == NULL)
     {
          pCharList->pHead = pCharList->pTail = pNewEntry;
@@ -85,14 +85,14 @@
 
     TRACE("\n");
 
-    if(pCharList->nCount == 0) 
+    if(pCharList->nCount == 0)
       return 0;
-    
+
     pCharList->nCount--;
     myChar = pCharList->pHead->myChar;
     pCurrent = pCharList->pHead->pNext;
     HeapFree(RICHED32_hHeap, 0,pCharList->pHead);
- 
+
     if(pCharList->nCount == 0)
     {
         pCharList->pHead = pCharList->pTail = NULL;
@@ -102,7 +102,7 @@
         pCharList->pHead = pCurrent;
     }
 
-    return myChar;   
+    return myChar;
 }
 
 int CHARLIST_GetNbItems(CHARLIST* pCharList)
@@ -116,7 +116,7 @@
     TRACE("\n");
 
     while(pCharList->nCount)
-        CHARLIST_Dequeue(pCharList);       
+        CHARLIST_Dequeue(pCharList);
 }
 
 /* this function counts the number of occurrences of a caracter */
@@ -126,26 +126,26 @@
     int nCount = 0;
 
     TRACE("\n");
-    
+
     for(pCurrent =pCharList->pHead ;pCurrent;pCurrent=pCurrent->pNext)
     	if(pCurrent->myChar == myChar)
 	    nCount++;
-    
+
     return nCount;
 }
 
 int CHARLIST_toBuffer(CHARLIST* pCharList, char* pBuffer, int nBufferSize)
 {
-   
+
    TRACE("\n");
 
    /* we add one to store a NULL caracter */
-   if(nBufferSize < pCharList->nCount + 1) 
+   if(nBufferSize < pCharList->nCount + 1)
         return pCharList->nCount;
-  
+
    for(;pCharList->nCount;pBuffer++)
        *pBuffer = CHARLIST_Dequeue(pCharList);
-   
+
    *pBuffer = '\0';
 
    return 0;
diff --git a/dlls/richedit/charlist.h b/dlls/richedit/charlist.h
index 708920f..8b81ddd 100644
--- a/dlls/richedit/charlist.h
+++ b/dlls/richedit/charlist.h
@@ -1,6 +1,6 @@
 /*
  * Character List
- * 
+ *
  * Copyright (c) 2000 by Jean-Claude Batista
  *
  * This library is free software; you can redistribute it and/or
diff --git a/dlls/richedit/reader.c b/dlls/richedit/reader.c
index 992aba4..e2a64a3 100644
--- a/dlls/richedit/reader.c
+++ b/dlls/richedit/reader.c
@@ -66,7 +66,7 @@
 /*
  *  include hard coded charsets
  */
- 
+
 #include "ansi_gen.h"
 #include "ansi_sym.h"
 #include "text_map.h"
@@ -206,10 +206,10 @@
 /*
  * Get a char from the charlist. The charlist is used to store characters
  * from the editstream.
- * 
+ *
  */
 
-int 
+int
 _RTFGetChar()
 {
     char myChar;
@@ -270,7 +270,7 @@
 	RTFFree (inputName);
 	RTFFree (outputName);
 	inputName = outputName = (char *) NULL;
-			
+
 	/* initialize lookup table */
 	LookupInit ();
 
@@ -846,7 +846,7 @@
  * the *next* input character.
  */
 
- 
+
 static int
 GetChar ()
 {
@@ -978,11 +978,11 @@
 
 /*
  * Do auto-charset-file reading.
- * will always use the ansi charset no mater what the value  
+ * will always use the ansi charset no mater what the value
  * of the rtfTextBuf is.
  *
  * TODO: add support for other charset in the future.
- * 
+ *
  */
 
 static void
@@ -1009,7 +1009,7 @@
 
 
 /*
- * Convert a CaracterSetMap (caracter_name, caracter) into 
+ * Convert a CaracterSetMap (caracter_name, caracter) into
  * this form : array[caracter_ident] = caracter;
  */
 
@@ -1027,7 +1027,7 @@
 	default:
 		return (0);	/* illegal charset id */
 	case rtfCSGeneral:
-	
+
 		haveGenCharSet = 1;
 		stdCodeArray = genCharCode;
 		for (i = 0; i < charSetSize; i++)
@@ -1040,7 +1040,7 @@
 		    stdCodeArray[ ansi_gen[i+1] ] = ansi_gen[i];
 		}
 		break;
-		
+
 	case rtfCSSymbol:
 
 		haveSymCharSet = 1;
@@ -1053,7 +1053,7 @@
 		for ( i = 0 ; i< sizeof(ansi_sym)/(sizeof(int));i+=2)
 		{
 		    stdCodeArray[ ansi_sym[i+1] ] = ansi_sym[i];
-		}		
+		}
 		break;
 	}
 
@@ -1241,7 +1241,7 @@
 		fp->rtfFType = 0;
 		fp->rtfFCodePage = 0;
 
-		while (rtfClass != rtfEOF 
+		while (rtfClass != rtfEOF
 		       && !RTFCheckCM (rtfText, ';')
 		       && !RTFCheckCM (rtfGroup, rtfEndGroup))
 		{
@@ -1302,12 +1302,12 @@
 					*bp++ = rtfMajor;
 					(void) RTFGetToken ();
 				}
-				
+
 				/* FIX: in some cases the <fontinfo> isn't finished with a semi-column */
 				if(RTFCheckCM (rtfGroup, rtfEndGroup))
 				{
 				  RTFUngetToken ();
-				}				
+				}
 				*bp = '\0';
 				fp->rtfFName = RTFStrSave (buf);
 				if (fp->rtfFName == (char *) NULL)
@@ -2781,7 +2781,7 @@
  *
  *	char *outMap[rtfSC_MaxChar];
  *
- * reinit should be non-zero if outMap should be initialized 
+ * reinit should be non-zero if outMap should be initialized
  * zero otherwise.
  *
  */
diff --git a/dlls/richedit/richedit.c b/dlls/richedit/richedit.c
index 7c51fcb..9af1dee 100644
--- a/dlls/richedit/richedit.c
+++ b/dlls/richedit/richedit.c
@@ -2,7 +2,7 @@
  * RichEdit32  functions
  *
  * This module is a simple wrapper for the edit controls.
- * At the point, it is good only for application who use the RICHEDIT 
+ * At the point, it is good only for application who use the RICHEDIT
  * control to display RTF text.
  *
  * Copyright 2000 by Jean-Claude Batista
@@ -21,7 +21,7 @@
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
- 
+
 #include <string.h>
 #include "windef.h"
 #include "winbase.h"
@@ -68,7 +68,7 @@
 BOOL WINAPI
 RICHED32_LibMain (HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
 {
-    TRACE("\n"); 
+    TRACE("\n");
     switch (fdwReason)
     {
     case DLL_PROCESS_ATTACH:
@@ -91,7 +91,7 @@
 /* Support routines for window procedure */
    INT RICHEDIT_GetTextRange(HWND hwnd,TEXTRANGEA *tr);
    INT RICHEDIT_GetSelText(HWND hwnd,LPSTR lpstrBuffer);
- 
+
 
 /*
  *
@@ -104,7 +104,7 @@
 {
     int RTFToBuffer(char* pBuffer, int nBufferSize);
     LONG newstyle = 0;
-    LONG style = 0;  
+    LONG style = 0;
 
     static HWND hwndEdit;
     static HWND hwndParent;
@@ -114,14 +114,14 @@
     CHARRANGE *cr;
     TRACE("previous hwndEdit: 0x%x hwndParent 0x%x\n",hwndEdit,hwndParent);
     hwndEdit = GetWindow(hwnd,GW_CHILD);
-    TRACE("uMsg: 0x%x hwnd: 0x%x hwndEdit: 0x%x\n",uMsg,hwnd,hwndEdit); 
-   
+    TRACE("uMsg: 0x%x hwnd: 0x%x hwndEdit: 0x%x\n",uMsg,hwnd,hwndEdit);
+
     switch (uMsg)
     {
- 
-    case WM_CREATE :           
+
+    case WM_CREATE :
 	    DPRINTF_EDIT_MSG32("WM_CREATE");
-	             
+
 	    /* remove SCROLLBARS from the current window style */
 	    hwndParent = ((LPCREATESTRUCTA) lParam)->hwndParent;
 
@@ -136,21 +136,21 @@
                                    style, 0, 0, 0, 0,
                                    hwnd, (HMENU) ID_EDIT,
                                    ((LPCREATESTRUCTA) lParam)->hInstance, NULL) ;
-    TRACE("hwndEdit: 0x%x hwnd: 0x%x\n",hwndEdit,hwnd);	
-	
-	    SetWindowLongA(hwnd,GWL_STYLE, newstyle); 		   
+    TRACE("hwndEdit: 0x%x hwnd: 0x%x\n",hwndEdit,hwnd);
+
+	    SetWindowLongA(hwnd,GWL_STYLE, newstyle);
             return 0 ;
-          
+
     case WM_SETFOCUS :
-	    DPRINTF_EDIT_MSG32("WM_SETFOCUS");            
+	    DPRINTF_EDIT_MSG32("WM_SETFOCUS");
             SetFocus (hwndEdit) ;
             return 0 ;
 
-    case WM_SIZE :             
+    case WM_SIZE :
             DPRINTF_EDIT_MSG32("WM_SIZE");
             MoveWindow (hwndEdit, 0, 0, LOWORD (lParam), HIWORD (lParam), TRUE) ;
             return 0 ;
-          
+
     case WM_COMMAND :
         DPRINTF_EDIT_MSG32("WM_COMMAND");
 	switch(HIWORD(wParam)) {
@@ -160,28 +160,28 @@
 		case EN_SETFOCUS:
 		case EN_UPDATE:
 		case EN_VSCROLL:
-			return SendMessageA(hwndParent, WM_COMMAND, 
+			return SendMessageA(hwndParent, WM_COMMAND,
 				wParam, (LPARAM)(hwnd));
-		
+
 		case EN_ERRSPACE:
 		case EN_MAXTEXT:
 			MessageBoxA (hwnd, "RichEdit control out of space.",
                                   "ERROR", MB_OK | MB_ICONSTOP) ;
 			return 0 ;
 		}
-     
-    case EM_STREAMIN:                           
+
+    case EM_STREAMIN:
             DPRINTF_EDIT_MSG32("EM_STREAMIN");
-            
+
 	    /* setup the RTF parser */
 	    RTFSetEditStream(( EDITSTREAM*)lParam);
 	    WriterInit();
 	    RTFInit ();
-	    BeginFile();	    
+	    BeginFile();
 
 	    /* do the parsing */
 	    RTFRead ();
-            
+
 	    rtfBufferSize = RTFToBuffer(NULL, 0);
 	    rtfBuffer = HeapAlloc(RICHED32_hHeap, 0,rtfBufferSize*sizeof(char));
 	    if(rtfBuffer)
@@ -192,8 +192,8 @@
 	    }
 	    else
 		WARN("Not enough memory for a allocating rtfBuffer\n");
-		
-            return 0;   
+
+            return 0;
 
 /* Messages specific to Richedit controls */
 
@@ -598,7 +598,7 @@
      case EM_UNDO:
             DPRINTF_EDIT_MSG32("EM_UNDO Passed to edit control");
 	    return SendMessageA( hwndEdit, uMsg, wParam, lParam);
- 
+
      case WM_STYLECHANGING:
             DPRINTF_EDIT_MSG32("WM_STYLECHANGING Passed to edit control");
 	    return SendMessageA( hwndEdit, uMsg, wParam, lParam);
@@ -627,7 +627,7 @@
             DPRINTF_EDIT_MSG32("WM_PASTE Passed to edit control");
 	    return SendMessageA( hwndEdit, uMsg, wParam, lParam);
 
-    /* Messages passed to default handler. */ 
+    /* Messages passed to default handler. */
     case WM_NCPAINT:
         DPRINTF_EDIT_MSG32("WM_NCPAINT Passed to default");
         return DefWindowProcA( hwnd,uMsg,wParam,lParam);
@@ -643,7 +643,7 @@
     case WM_DESTROY:
         DPRINTF_EDIT_MSG32("WM_DESTROY Passed to default");
         return DefWindowProcA( hwnd,uMsg,wParam,lParam);
-    case WM_CHILDACTIVATE:	       
+    case WM_CHILDACTIVATE:
 	DPRINTF_EDIT_MSG32("WM_CHILDACTIVATE Passed to default");
 	return DefWindowProcA( hwnd,uMsg,wParam,lParam);
 
@@ -723,7 +723,7 @@
     TRACE("\n");
 
     if (pdvi->cbSize != sizeof(DLLVERSIONINFO)) {
- 
+
 	return E_INVALIDARG;
     }
 
@@ -738,7 +738,7 @@
 /***
  * DESCRIPTION:
  * Registers the window class.
- * 
+ *
  * PARAMETER(S):
  * None
  *
@@ -747,7 +747,7 @@
  */
 VOID RICHED32_Register(void)
 {
-    WNDCLASSA wndClass; 
+    WNDCLASSA wndClass;
 
     TRACE("\n");
 
@@ -766,7 +766,7 @@
 /***
  * DESCRIPTION:
  * Unregisters the window class.
- * 
+ *
  * PARAMETER(S):
  * None
  *
@@ -794,13 +794,13 @@
 
     if (text_size > tr->chrg.cpMin)
     {
-       range_size = (text_size> tr->chrg.cpMax) ? (tr->chrg.cpMax - tr->chrg.cpMin) : (text_size - tr->chrg.cpMin);    
+       range_size = (text_size> tr->chrg.cpMax) ? (tr->chrg.cpMax - tr->chrg.cpMin) : (text_size - tr->chrg.cpMin);
        TRACE("EditText: %.30s ...\n",text+tr->chrg.cpMin);
        memcpy(tr->lpstrText,text+tr->chrg.cpMin,range_size);
     }
     else range_size = 0;
     HeapFree(GetProcessHeap(), 0, text);
-    
+
     return range_size;
 }
 
diff --git a/dlls/richedit/text-writer.c b/dlls/richedit/text-writer.c
index 9a95218..678aa25 100644
--- a/dlls/richedit/text-writer.c
+++ b/dlls/richedit/text-writer.c
@@ -60,16 +60,16 @@
 int RTFToBuffer(char* pBuffer, int nBufferSize);
 int RTFToBuffer(char* pBuffer, int nBufferSize)
 {
-    
-   /* check if the buffer is big enough to hold all characters  */    
+
+   /* check if the buffer is big enough to hold all characters  */
    /* we require one more for the '\0'                          */
-   
-   TRACE("\n");   
+
+   TRACE("\n");
 
    if(nBufferSize < charlist.nCount + 1) {
         return charlist.nCount + CHARLIST_CountChar(&charlist, '\n') + 1;
    }
-  
+
    while(charlist.nCount)
    {
        *pBuffer = CHARLIST_Dequeue(&charlist);
@@ -77,13 +77,13 @@
        {
          *pBuffer = '\r';
          pBuffer++;
-         *pBuffer = '\n'; 
+         *pBuffer = '\n';
        }
        pBuffer++;
    }
    *pBuffer = '\0';
 
-   return 0;    
+   return 0;
 }
 
 
@@ -123,7 +123,7 @@
 {
 char	buf[rtfBufSiz];
 
-	TRACE("\n");   
+	TRACE("\n");
 
 	if (rtfMinor != rtfSC_nothing)
 		PutStdChar (rtfMinor);
@@ -255,13 +255,13 @@
 
 void PutStdChar (int stdCode)
 {
-  
+
   char	*oStr = (char *) NULL;
   char	buf[rtfBufSiz];
-  
+
 /*	if (stdCode == rtfSC_nothing)
 		RTFPanic ("Unknown character code, logic error\n");
-*/		
+*/
 	TRACE("\n");
 
 	oStr = outMap[stdCode];
diff --git a/dlls/richedit/text_map.h b/dlls/richedit/text_map.h
index 01f0444..3c43791 100644
--- a/dlls/richedit/text_map.h
+++ b/dlls/richedit/text_map.h
@@ -1,13 +1,13 @@
 /*
  *  Output sequence map for rtf2text
- * 
+ *
  *  Field 1 is the standard character name.  Field 2 is the output sequence
  *  to produce for that character.
- * 
+ *
  *  The output sequence is simply a string of characters.  If it contains
  *  whitespace, it may be quoted.  If it contains quotes, it may be quoted
  *  with a different quote character.
- * 
+ *
  *  characters in ASCII range (32-127
  */
 
diff --git a/dlls/rpcrt4/rpcrt4_main.c b/dlls/rpcrt4/rpcrt4_main.c
index 8a9db8a..4f31acd 100644
--- a/dlls/rpcrt4/rpcrt4_main.c
+++ b/dlls/rpcrt4/rpcrt4_main.c
@@ -81,7 +81,7 @@
 	break;
 
     case DLL_PROCESS_DETACH:
-	break;	    
+	break;
     }
 
     return TRUE;
@@ -187,7 +187,7 @@
 	       /* make sure it's not blank */
 	       if (!a[0] && !a[1] && !a[2] && !a[3] && !a[4] && !a[5])
 		   continue;
-						                
+
 	       goto valid_address;
 	    }
 	    /* if we didn't find a valid address, make a random one */
@@ -214,12 +214,12 @@
 #endif /* HAVE_NET_IF_H */
       has_init = 1;
    }
-   
+
    /* generate time element of GUID */
-   
+
    /* Assume that the gettimeofday() has microsecond granularity */
 #define MAX_ADJUSTMENT 10
-                     
+
    try_again:
    gettimeofday(&tv, 0);
    if ((last.tv_sec == 0) && (last.tv_usec == 0)) {
@@ -240,19 +240,19 @@
       adjustment++;
    } else
        adjustment = 0;
-   
+
    clock_reg = tv.tv_usec*10 + adjustment;
    clock_reg += ((unsigned long long) tv.tv_sec)*10000000;
    clock_reg += (((unsigned long long) 0x01B21DD2) << 32) + 0x13814000;
-   
+
    clock_high = clock_reg >> 32;
    clock_low = clock_reg;
    temp_clock_seq = clock_seq | 0x8000;
    temp_clock_mid = (UINT16)clock_high;
    temp_clock_hi_and_version = (clock_high >> 16) | 0x1000;
-   
+
    /* pack the information into the GUID structure */
-   
+
    ((unsigned char*)&Uuid->Data1)[3] = (unsigned char)clock_low;
    clock_low >>= 8;
    ((unsigned char*)&Uuid->Data1)[2] = (unsigned char)clock_low;
@@ -260,28 +260,28 @@
    ((unsigned char*)&Uuid->Data1)[1] = (unsigned char)clock_low;
    clock_low >>= 8;
    ((unsigned char*)&Uuid->Data1)[0] = (unsigned char)clock_low;
-   
+
    ((unsigned char*)&Uuid->Data2)[1] = (unsigned char)temp_clock_mid;
    temp_clock_mid >>= 8;
    ((unsigned char*)&Uuid->Data2)[0] = (unsigned char)temp_clock_mid;
-   
+
    ((unsigned char*)&Uuid->Data3)[1] = (unsigned char)temp_clock_hi_and_version;
    temp_clock_hi_and_version >>= 8;
    ((unsigned char*)&Uuid->Data3)[0] = (unsigned char)temp_clock_hi_and_version;
-      
+
    ((unsigned char*)Uuid->Data4)[1] = (unsigned char)temp_clock_seq;
    temp_clock_seq >>= 8;
    ((unsigned char*)Uuid->Data4)[0] = (unsigned char)temp_clock_seq;
-   
+
    ((unsigned char*)Uuid->Data4)[2] = a[0];
    ((unsigned char*)Uuid->Data4)[3] = a[1];
    ((unsigned char*)Uuid->Data4)[4] = a[2];
    ((unsigned char*)Uuid->Data4)[5] = a[3];
    ((unsigned char*)Uuid->Data4)[6] = a[4];
    ((unsigned char*)Uuid->Data4)[7] = a[5];
-   
+
    TRACE("%s\n", debugstr_guid(Uuid));
-   
+
    return RPC_S_OK;
 }
 
@@ -365,7 +365,7 @@
   HMODULE hDll,          /* [in] */
   const ProxyFileInfo **pProxyFileList, /* [in] */
   const CLSID *pclsid    /* [in] */
-) 
+)
 {
   FIXME("(%x,%p,%s), stub!\n",hDll,pProxyFileList,debugstr_guid(pclsid));
   return S_OK;
@@ -378,14 +378,14 @@
 RPC_STATUS WINAPI RpcServerUseProtseqEpA( LPSTR Protseq, UINT MaxCalls, LPSTR Endpoint, LPVOID SecurityDescriptor )
 {
   RPC_POLICY policy;
-  
+
   TRACE( "(%s,%u,%s,%p)\n", Protseq, MaxCalls, Endpoint, SecurityDescriptor );
-  
+
   /* This should provide the default behaviour */
   policy.Length        = sizeof( policy );
   policy.EndpointFlags = 0;
   policy.NICFlags      = 0;
-  
+
   return RpcServerUseProtseqEpExA( Protseq, MaxCalls, Endpoint, SecurityDescriptor, &policy );
 }
 
@@ -395,14 +395,14 @@
 RPC_STATUS WINAPI RpcServerUseProtseqEpW( LPWSTR Protseq, UINT MaxCalls, LPWSTR Endpoint, LPVOID SecurityDescriptor )
 {
   RPC_POLICY policy;
-  
+
   TRACE( "(%s,%u,%s,%p)\n", debugstr_w( Protseq ), MaxCalls, debugstr_w( Endpoint ), SecurityDescriptor );
-  
+
   /* This should provide the default behaviour */
   policy.Length        = sizeof( policy );
   policy.EndpointFlags = 0;
   policy.NICFlags      = 0;
-  
+
   return RpcServerUseProtseqEpExW( Protseq, MaxCalls, Endpoint, SecurityDescriptor, &policy );
 }
 
@@ -414,8 +414,8 @@
 {
   FIXME( "(%s,%u,%s,%p,{%u,%lu,%lu}): stub\n", Protseq, MaxCalls, Endpoint, SecurityDescriptor,
                                                lpPolicy->Length, lpPolicy->EndpointFlags, lpPolicy->NICFlags );
-  
-  return RPC_S_PROTSEQ_NOT_SUPPORTED; /* We don't support anything at this point */			  
+
+  return RPC_S_PROTSEQ_NOT_SUPPORTED; /* We don't support anything at this point */
 }
 
 /***********************************************************************
@@ -427,8 +427,8 @@
   FIXME( "(%s,%u,%s,%p,{%u,%lu,%lu}): stub\n", debugstr_w( Protseq ), MaxCalls, debugstr_w( Endpoint ),
                                                SecurityDescriptor,
                                                lpPolicy->Length, lpPolicy->EndpointFlags, lpPolicy->NICFlags );
-  
-  return RPC_S_PROTSEQ_NOT_SUPPORTED; /* We don't support anything at this point */			  
+
+  return RPC_S_PROTSEQ_NOT_SUPPORTED; /* We don't support anything at this point */
 }
 
 /***********************************************************************
@@ -438,7 +438,7 @@
 {
   /* FIXME: Dump UUID using UuidToStringA */
   TRACE( "(%p,%p,%p)\n", IfSpec, MgrTypeUuid, MgrEpv );
-  
+
   return RpcServerRegisterIf2( IfSpec, MgrTypeUuid, MgrEpv, 0, RPC_C_LISTEN_MAX_CALLS_DEFAULT, (UINT)-1, NULL );
 }
 
@@ -450,7 +450,7 @@
 {
   /* FIXME: Dump UUID using UuidToStringA */
   TRACE( "(%p,%p,%p,%u,%u,%p)\n", IfSpec, MgrTypeUuid, MgrEpv, Flags, MaxCalls, IfCallbackFn );
-  
+
   return RpcServerRegisterIf2( IfSpec, MgrTypeUuid, MgrEpv, Flags, MaxCalls, (UINT)-1, IfCallbackFn );
 }
 
@@ -462,7 +462,7 @@
 {
   /* FIXME: Dump UUID using UuidToStringA */
   FIXME( "(%p,%p,%p,%u,%u,%u,%p): stub\n", IfSpec, MgrTypeUuid, MgrEpv, Flags, MaxCalls, MaxRpcSize, IfCallbackFn );
-  
+
   return RPC_S_UNKNOWN_IF; /* I guess this return code is as good as any failure */
 }
 
@@ -474,7 +474,7 @@
                             LPVOID Arg )
 {
   FIXME( "(%s,%lu,%p,%p): stub\n", ServerPrincName, AuthnSvc, GetKeyFn, Arg );
-  
+
   return RPC_S_UNKNOWN_AUTHN_SERVICE; /* We don't know any authentication services */
 }
 
@@ -485,7 +485,7 @@
                             LPVOID Arg )
 {
   FIXME( "(%s,%lu,%p,%p): stub\n", debugstr_w( ServerPrincName ), AuthnSvc, GetKeyFn, Arg );
-  
+
   return RPC_S_UNKNOWN_AUTHN_SERVICE; /* We don't know any authentication services */
 }
 
@@ -495,7 +495,7 @@
 RPC_STATUS WINAPI RpcServerListen( UINT MinimumCallThreads, UINT MaxCalls, UINT DontWait )
 {
   FIXME( "(%u,%u,%u): stub\n", MinimumCallThreads, MaxCalls, DontWait );
-  
+
   return RPC_S_NO_PROTSEQS_REGISTERED; /* Since we don't allow registration this seems reasonable */
 }
 
@@ -507,7 +507,7 @@
 {
   FIXME( "(%s,%s,%s,%s,%s,%p): stub\n", ObjUuid, Protseq, NetworkAddr, Endpoint, Options, StringBinding );
   *StringBinding = NULL;
-  
+
   return RPC_S_INVALID_STRING_UUID; /* Failure */
 }
 
@@ -520,7 +520,7 @@
   FIXME( "(%s,%s,%s,%s,%s,%p): stub\n", debugstr_w( ObjUuid ), debugstr_w( Protseq ), debugstr_w( NetworkAddr ),
                                         debugstr_w( Endpoint ), debugstr_w( Options ), StringBinding );
   *StringBinding = NULL;
-  
+
   return RPC_S_INVALID_STRING_UUID; /* Failure */
 }
 
@@ -538,10 +538,10 @@
 RPC_STATUS WINAPI RpcBindingFromStringBindingA( LPSTR StringBinding, RPC_BINDING_HANDLE* Binding )
 {
   FIXME( "(%s,%p): stub\n", StringBinding, Binding );
-  
+
   return RPC_S_INVALID_STRING_BINDING; /* As good as any failure code */
 }
-  
+
 /***********************************************************************
  *		RpcBindingFromStringBindingW (RPCRT4.@)
  */
@@ -565,12 +565,12 @@
  *		NdrDllGetClassObject (RPCRT4.@)
  */
 HRESULT WINAPI NdrDllGetClassObject(
-    REFCLSID rclsid, REFIID riid , LPVOID *ppv, 
+    REFCLSID rclsid, REFIID riid , LPVOID *ppv,
     const ProxyFileInfo **   pProxyFileList,
     const CLSID *            pclsid,
     CStdPSFactoryBuffer *    pPSFactoryBuffer)
 {
-    if(ppv)  
+    if(ppv)
         *ppv = NULL;
     return RPC_S_UNKNOWN_IF;
 }
diff --git a/dlls/serialui/confdlg.c b/dlls/serialui/confdlg.c
index dc226a1..3ff6caa 100644
--- a/dlls/serialui/confdlg.c
+++ b/dlls/serialui/confdlg.c
@@ -1,4 +1,4 @@
-/*		
+/*
  * This DLL contains the user interface for the serial driver.
  *    a dialog box to configure the specified COMM port
  *    an interface to the control panel (??)
@@ -80,7 +80,7 @@
  * EnumPropPages (SERIALUI.2)
  *
  * Called by the device manager to add prop sheets in Control Panel ???
- * Pointed to in Win98 registry by 
+ * Pointed to in Win98 registry by
  * \System\CurrentControlSet\Services\Class\ports\0000\EnumPropPages =
  *  "serialui.dll,EnumPropPages"
  */
@@ -119,7 +119,7 @@
 };
 static PARAM2STR SERIALUI_Baud2Str={ SERIALUI_TABLESIZE(SERIALUI_Baud2StrData),SERIALUI_Baud2StrData };
 
-static PARAM2STRDATA SERIALUI_Parity2StrData[]={ 
+static PARAM2STRDATA SERIALUI_Parity2StrData[]={
   {NOPARITY,"None"}, {ODDPARITY,"Odd"}, {EVENPARITY,"Even"}, {MARKPARITY,"Mark"},
   {SPACEPARITY,"Space"}
 };
@@ -288,10 +288,10 @@
     SERIALUI_GetConfItems( hDlg, IDC_PARITY, &SERIALUI_Parity2Str, &dwParity);
     SERIALUI_GetConfItems( hDlg, IDC_DATA, &SERIALUI_Data2Str, &dwByteSize);
     SERIALUI_GetConfItems( hDlg, IDC_FLOW, &SERIALUI_Flow2Str, &dwFlowControl );
- 
+
     TRACE("baud=%ld stop=%ld parity=%ld data=%ld flow=%ld\n",
           dwBaudRate, dwStopBits, dwParity, dwByteSize, dwFlowControl);
-    
+
     lpdcb->BaudRate = dwBaudRate;
     lpdcb->StopBits = dwStopBits;
     lpdcb->Parity   = dwParity;
@@ -375,7 +375,7 @@
         case ID_GETDEFAULT:
             {
                 DWORD r,dwConfSize = sizeof (COMMCONFIG);
-                r = GetDefaultCommConfigA(info->lpszDevice, 
+                r = GetDefaultCommConfigA(info->lpszDevice,
                           info->lpCommConfig, &dwConfSize);
                 if(!r)
                     MessageBoxA(hWnd,"Failed","GetDefaultCommConfig",MB_OK);
@@ -386,7 +386,7 @@
             {
                 DWORD r;
                 SERIALUI_DialogInfoToDCB(hWnd,info);
-                r = SetDefaultCommConfigA(info->lpszDevice, 
+                r = SetDefaultCommConfigA(info->lpszDevice,
                           info->lpCommConfig, sizeof (COMMCONFIG));
                 if(!r)
                     MessageBoxA(hWnd,"Failed","GetDefaultCommConfig",MB_OK);
@@ -406,8 +406,8 @@
  * Used by Win9x KERNEL to show a dialog for configuring a COMM port.
  */
 BOOL WINAPI SERIALUI_CommConfigDialog(
-	LPCSTR lpszName, 
-	HWND hWndParent, 
+	LPCSTR lpszName,
+	HWND hWndParent,
 	LPCOMMCONFIG lpCommConfig
 ) {
     SERIALUI_DialogInfo info;
@@ -422,7 +422,7 @@
 
     return DialogBoxParamA(SERIALUI_hModule,
                            MAKEINTRESOURCEA(IDD_SERIALUICONFIG),
-                           hWndParent, 
+                           hWndParent,
                            (DLGPROC) SERIALUI_ConfigDialogProc,
                            (LPARAM)&info);
 }
@@ -438,7 +438,7 @@
  *        the comm port name.
  */
 BOOL WINAPI SERIALUI_SetDefaultCommConfig(
-	LPCSTR lpszDevice, 
+	LPCSTR lpszDevice,
 	LPCOMMCONFIG lpCommConfig,
 	DWORD dwSize
 ) {
@@ -482,7 +482,7 @@
  *        the comm port name.
  */
 BOOL WINAPI SERIALUI_GetDefaultCommConfig(
-	LPCSTR lpszDevice, 
+	LPCSTR lpszDevice,
 	LPCOMMCONFIG lpCommConfig,
 	LPDWORD lpdwSize
 ) {
@@ -522,13 +522,13 @@
             r = 1;
         if ((r==ERROR_SUCCESS) && (dwSize != sizeof(DCB)))
             r = 1;
-           
+
         RegCloseKey(hKeyPort);
     }
     else
     {
         /* FIXME: default to a hardcoded commconfig */
-        
+
         lpCommConfig->dcb.DCBlength = sizeof(DCB);
         lpCommConfig->dcb.BaudRate = 9600;
         lpCommConfig->dcb.fBinary = TRUE;
diff --git a/dlls/setupapi/devinst.c b/dlls/setupapi/devinst.c
index 800ea22..a4aefea 100644
--- a/dlls/setupapi/devinst.c
+++ b/dlls/setupapi/devinst.c
@@ -47,9 +47,9 @@
 BOOL WINAPI SetupDiGetDeviceInterfaceDetailA(
       HDEVINFO DeviceInfoSet,
       PSP_DEVICE_INTERFACE_DATA DeviceInterfaceData,
-      PSP_DEVICE_INTERFACE_DETAIL_DATAA DeviceInterfaceDetailData, 
+      PSP_DEVICE_INTERFACE_DETAIL_DATAA DeviceInterfaceDetailData,
       DWORD DeviceInterfaceDetailDataSize,
-      PDWORD RequiredSize, 
+      PDWORD RequiredSize,
       PSP_DEVINFO_DATA DeviceInfoData )
 {
     FIXME("\n");
@@ -59,9 +59,9 @@
 BOOL WINAPI SetupDiGetDeviceInterfaceDetailW(
       HDEVINFO DeviceInfoSet,
       PSP_DEVICE_INTERFACE_DATA DeviceInterfaceData,
-      PSP_DEVICE_INTERFACE_DETAIL_DATAW DeviceInterfaceDetailData, 
+      PSP_DEVICE_INTERFACE_DETAIL_DATAW DeviceInterfaceDetailData,
       DWORD DeviceInterfaceDetailDataSize,
-      PDWORD RequiredSize, 
+      PDWORD RequiredSize,
       PSP_DEVINFO_DATA DeviceInfoData )
 {
     FIXME("\n");
@@ -70,7 +70,7 @@
 
 BOOL WINAPI SetupDiEnumDeviceInterfaces(
        HDEVINFO DeviceInfoSet,
-       PSP_DEVINFO_DATA DeviceInfoData, 
+       PSP_DEVINFO_DATA DeviceInfoData,
        CONST GUID * InterfaceClassGuid,
        DWORD MemberIndex,
        PSP_DEVICE_INTERFACE_DATA DeviceInterfaceData)
@@ -120,7 +120,7 @@
         DWORD   PropertyBufferSize,
         PDWORD  RequiredSize)
 {
-    FIXME("%04lx %p %ld %p %p %ld %p\n", (DWORD)devinfo, DeviceInfoData, 
+    FIXME("%04lx %p %ld %p %p %ld %p\n", (DWORD)devinfo, DeviceInfoData,
         Property, PropertyRegDataType, PropertyBuffer, PropertyBufferSize,
         RequiredSize);
     return FALSE;
diff --git a/dlls/setupapi/infparse.c b/dlls/setupapi/infparse.c
index e203265..bef5153 100644
--- a/dlls/setupapi/infparse.c
+++ b/dlls/setupapi/infparse.c
@@ -208,7 +208,7 @@
 	}
     return FALSE;
 }
-	
+
 
 LPCSTR IP_GetFileName(HINF16 hInf)
 {
diff --git a/dlls/setupapi/setupx16.h b/dlls/setupapi/setupx16.h
index e1946a4..a301d19 100644
--- a/dlls/setupapi/setupx16.h
+++ b/dlls/setupapi/setupx16.h
@@ -82,7 +82,7 @@
 
 	VCPPROGRESS	prgFileWrite;
 	VCPPROGRESS	prgByteWrite;
-} VCPDISKINFO, *LPVCPDISKINFO;	
+} VCPDISKINFO, *LPVCPDISKINFO;
 
 typedef struct {
 	LOGDISKID16	ldid;
diff --git a/dlls/setupapi/stubs.c b/dlls/setupapi/stubs.c
index 7bd1e71..fd4117b 100644
--- a/dlls/setupapi/stubs.c
+++ b/dlls/setupapi/stubs.c
@@ -39,7 +39,7 @@
  *		SetupIterateCabinetW (SETUPAPI.@)
  */
 BOOL WINAPI SetupIterateCabinetW(PWSTR CabinetFile, DWORD Reserved,
-                                 PSP_FILE_CALLBACK_W MsgHandler, PVOID Context) 
+                                 PSP_FILE_CALLBACK_W MsgHandler, PVOID Context)
 {
 	FIXME("not implemented (setupapi.dll) \n");
 	return 0;
diff --git a/dlls/setupapi/virtcopy.c b/dlls/setupapi/virtcopy.c
index 4fbcc3e..597ae10 100644
--- a/dlls/setupapi/virtcopy.c
+++ b/dlls/setupapi/virtcopy.c
@@ -155,7 +155,7 @@
 
 /***********************************************************************
  *		vsmGetStringName (SETUPX.205)
- * 
+ *
  * Pretty correct, I guess
  */
 INT16 WINAPI vsmGetStringName16(VHSTR vhstr, LPSTR lpszBuffer, int cbBuffer)
@@ -206,7 +206,7 @@
     while (vn_last < vn_num)
     {
 	if (pvnlist[vn_last] == NULL)
-	    break;	
+	    break;
 	vn_last++;
     }
     heap = GetProcessHeap();
@@ -219,7 +219,7 @@
     pvnlist[vn_last] = HeapAlloc(heap, HEAP_ZERO_MEMORY, sizeof(VIRTNODE));
     lpvn = pvnlist[vn_last];
     vn_last++;
-    
+
     lpvn->cbSize = sizeof(VIRTNODE);
 
     if (vfsSrc)
@@ -292,7 +292,7 @@
 
 /***********************************************************************
  *		VcpQueueCopy		[SETUPX.13]
- *		
+ *
  * lpExpandVtbl seems to be deprecated.
  * fl are the CNFL_xxx and VNFL_xxx flags.
  * lParam are the VNLP_xxx flags.
@@ -310,7 +310,7 @@
     if (!VCP_opened)
 	return ERR_VCP_NOTOPEN;
 
-    TRACE("srcdir: %s, srcfile: %s, dstdir: %s, dstfile: %s\n", 
+    TRACE("srcdir: %s, srcfile: %s, dstdir: %s, dstfile: %s\n",
       lpszSrcDir, lpszSrcFileName, lpszDstDir, lpszDstFileName);
 
     TRACE("ldidSrc == %d, ldidDst == %d\n", ldidSrc, ldidDst);
@@ -354,7 +354,7 @@
 
 /***********************************************************************
  *		VcpQueueRename		[SETUPX.204]
- *		
+ *
  */
 RETERR16 WINAPI VcpQueueRename16(
 	LPCSTR lpszSrcFileName, LPCSTR lpszDstFileName,
@@ -478,7 +478,7 @@
 	vcp_status.prgFileWrite.dwSoFar++;
 	cbres = VCP_CALLBACK(&vcp_status, VCPM_VSTATWRITE, 0, 0, VCP_MsgRef);
     }
-    
+
     cbres = VCP_CALLBACK(&vcp_status, VCPM_VSTATCOPYEND, 0, 0, VCP_MsgRef);
     return res;
 }
@@ -511,7 +511,7 @@
 
     /* FIXME: needs to sort virtnodes in case VCPFL_INSPECIFIEDORDER
      * is not set. This is done by VCP_CALLBACK(VCPM_NODECOMPARE) */
-    
+
     TRACE("#1\n");
     memset(&vcp_status, 0, sizeof(VCPSTATUS));
     /* yes, vcp_status.cbSize is 0 ! */
@@ -524,7 +524,7 @@
     if (res != OK)
 	return res; /* is this ok ? */
     VCP_CopyFiles();
-    
+
     TRACE("#5\n");
     cbres = VCP_CALLBACK(&vcp_status, VCPM_VSTATCLOSEEND, 0, 0, VCP_MsgRef);
     TRACE("#6\n");
@@ -637,7 +637,7 @@
     wndClass.hCursor       = LoadCursorA (0, IDC_ARROWA);
     wndClass.hbrBackground = (HBRUSH)NULL;
     wndClass.lpszClassName = "setupx_progress";
-  
+
     RegisterClassA (&wndClass);
 }
 
@@ -701,7 +701,7 @@
     if (RegSetValueExA(hKeyConflict, "BackupDirectory", 0, REG_SZ, (LPBYTE)buf, strlen(buf)+1))
 	return VCPN_FAIL;
     RegCloseKey(hKeyConflict);
-    
+
     return VCPN_OK;
 }
 
diff --git a/dlls/shdocvw/classinfo.c b/dlls/shdocvw/classinfo.c
index 68b53b8..6aa2a7a 100644
--- a/dlls/shdocvw/classinfo.c
+++ b/dlls/shdocvw/classinfo.c
@@ -70,7 +70,7 @@
  * IProvideClassInfo virtual function table for IE Web Browser component
  */
 
-static ICOM_VTABLE(IProvideClassInfo) WBPCI_Vtbl = 
+static ICOM_VTABLE(IProvideClassInfo) WBPCI_Vtbl =
 {
     ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
     WBPCI_QueryInterface,
@@ -155,7 +155,7 @@
  * IProvideClassInfo virtual function table for IE Web Browser component
  */
 
-static ICOM_VTABLE(IProvideClassInfo2) WBPCI2_Vtbl = 
+static ICOM_VTABLE(IProvideClassInfo2) WBPCI2_Vtbl =
 {
     ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
     WBPCI2_QueryInterface,
diff --git a/dlls/shdocvw/events.c b/dlls/shdocvw/events.c
index 965c50e..b85583e 100644
--- a/dlls/shdocvw/events.c
+++ b/dlls/shdocvw/events.c
@@ -100,7 +100,7 @@
  * IConnectionPointContainer virtual function table for IE Web Browser component
  */
 
-static ICOM_VTABLE(IConnectionPointContainer) WBCPC_Vtbl = 
+static ICOM_VTABLE(IConnectionPointContainer) WBCPC_Vtbl =
 {
     ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
     WBCPC_QueryInterface,
@@ -195,7 +195,7 @@
  * IConnectionPoint virtual function table for IE Web Browser component
  */
 
-static ICOM_VTABLE(IConnectionPoint) WBCP_Vtbl = 
+static ICOM_VTABLE(IConnectionPoint) WBCP_Vtbl =
 {
     ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
     WBCP_QueryInterface,
diff --git a/dlls/shdocvw/factory.c b/dlls/shdocvw/factory.c
index 233f6b9..f29ec17 100644
--- a/dlls/shdocvw/factory.c
+++ b/dlls/shdocvw/factory.c
@@ -109,7 +109,7 @@
     return S_OK;
 }
 
-static ICOM_VTABLE(IClassFactory) WBCF_Vtbl = 
+static ICOM_VTABLE(IClassFactory) WBCF_Vtbl =
 {
     ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
     WBCF_QueryInterface,
diff --git a/dlls/shdocvw/misc.c b/dlls/shdocvw/misc.c
index 6f37417..e16a34c 100644
--- a/dlls/shdocvw/misc.c
+++ b/dlls/shdocvw/misc.c
@@ -80,7 +80,7 @@
  * IQuickActivate virtual function table for IE Web Browser component
  */
 
-static ICOM_VTABLE(IQuickActivate) WBQA_Vtbl = 
+static ICOM_VTABLE(IQuickActivate) WBQA_Vtbl =
 {
     ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
     WBQA_QueryInterface,
diff --git a/dlls/shdocvw/oleobject.c b/dlls/shdocvw/oleobject.c
index 482dd0b..d7db11a 100644
--- a/dlls/shdocvw/oleobject.c
+++ b/dlls/shdocvw/oleobject.c
@@ -410,7 +410,7 @@
  * IOleObject virtual function table for IE Web Browser component
  */
 
-static ICOM_VTABLE(IOleObject) WBOOBJ_Vtbl = 
+static ICOM_VTABLE(IOleObject) WBOOBJ_Vtbl =
 {
     ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
     WBOOBJ_QueryInterface,
@@ -528,7 +528,7 @@
  * IOleInPlaceObject virtual function table for IE Web Browser component
  */
 
-static ICOM_VTABLE(IOleInPlaceObject) WBOIPO_Vtbl = 
+static ICOM_VTABLE(IOleInPlaceObject) WBOIPO_Vtbl =
 {
     ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
     WBOIPO_QueryInterface,
@@ -603,7 +603,7 @@
  * IOleControl virtual function table for IE Web Browser component
  */
 
-static ICOM_VTABLE(IOleControl) WBOC_Vtbl = 
+static ICOM_VTABLE(IOleControl) WBOC_Vtbl =
 {
     ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
     WBOC_QueryInterface,
diff --git a/dlls/shdocvw/persist.c b/dlls/shdocvw/persist.c
index 5c18791..b0cabe5 100644
--- a/dlls/shdocvw/persist.c
+++ b/dlls/shdocvw/persist.c
@@ -94,7 +94,7 @@
  * IPersistStorage virtual function table for IE Web Browser component
  */
 
-static ICOM_VTABLE(IPersistStorage) WBPS_Vtbl = 
+static ICOM_VTABLE(IPersistStorage) WBPS_Vtbl =
 {
     ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
     WBPS_QueryInterface,
@@ -183,7 +183,7 @@
  * IPersistStreamInit virtual function table for IE Web Browser component
  */
 
-static ICOM_VTABLE(IPersistStreamInit) WBPSI_Vtbl = 
+static ICOM_VTABLE(IPersistStreamInit) WBPSI_Vtbl =
 {
     ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
     WBPSI_QueryInterface,
diff --git a/dlls/shdocvw/webbrowser.c b/dlls/shdocvw/webbrowser.c
index 919c748..5d9dcf4 100644
--- a/dlls/shdocvw/webbrowser.c
+++ b/dlls/shdocvw/webbrowser.c
@@ -241,7 +241,7 @@
  * IWebBrowser virtual function table for IE Web Browser component
  */
 
-static ICOM_VTABLE(IWebBrowser) WB_Vtbl = 
+static ICOM_VTABLE(IWebBrowser) WB_Vtbl =
 {
     ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
     WB_QueryInterface,
diff --git a/dlls/shell32/brsfolder.c b/dlls/shell32/brsfolder.c
index cd98e43..d0636ff 100644
--- a/dlls/shell32/brsfolder.c
+++ b/dlls/shell32/brsfolder.c
@@ -43,7 +43,7 @@
 
 	hwndTreeView = GetDlgItem (hwndParent, IDD_TREEVIEW);
 	Shell_GetImageList(NULL, &hImageList);
-	
+
 	TRACE("dlg=%x tree=%x\n", hwndParent, hwndTreeView );
 
 	if (hImageList && hwndTreeView)
@@ -71,7 +71,7 @@
 	{ TreeView_DeleteAllItems(hwndTreeView);
        	  FillTreeView(lpsf, NULL, TVI_ROOT);
 	}
-	
+
 	if (SUCCEEDED(hr))
 	{ IShellFolder_Release(lpsf);
 	}
@@ -192,32 +192,32 @@
 }
 
 static LRESULT MsgNotify(HWND hWnd,  UINT CtlID, LPNMHDR lpnmh)
-{	
+{
 	NMTREEVIEWA	*pnmtv   = (NMTREEVIEWA *)lpnmh;
 	LPTV_ITEMDATA	lptvid;  /* Long pointer to TreeView item data */
 	IShellFolder *	lpsf2=0;
-	
+
 
 	TRACE("%x %x %p msg=%x\n", hWnd,  CtlID, lpnmh, pnmtv->hdr.code);
 
 	switch (pnmtv->hdr.idFrom)
 	{ case IDD_TREEVIEW:
-	    switch (pnmtv->hdr.code)   
+	    switch (pnmtv->hdr.code)
 	    { case TVN_DELETEITEMA: case TVN_DELETEITEMW:
 	        { FIXME("TVN_DELETEITEMA/W\n");
 		  lptvid=(LPTV_ITEMDATA)pnmtv->itemOld.lParam;
 	          IShellFolder_Release(lptvid->lpsfParent);
-	          SHFree(lptvid->lpi);  
-	          SHFree(lptvid->lpifq);  
-	          SHFree(lptvid);  
+	          SHFree(lptvid->lpi);
+	          SHFree(lptvid->lpifq);
+	          SHFree(lptvid);
 		}
 	        break;
-			
+
 	      case TVN_ITEMEXPANDINGA: case TVN_ITEMEXPANDINGW:
 		{ FIXME("TVN_ITEMEXPANDINGA/W\n");
 		  if ((pnmtv->itemNew.state & TVIS_EXPANDEDONCE))
 	            break;
-		
+
 	          lptvid=(LPTV_ITEMDATA)pnmtv->itemNew.lParam;
 	          if (SUCCEEDED(IShellFolder_BindToObject(lptvid->lpsfParent, lptvid->lpi,0,(REFIID)&IID_IShellFolder,(LPVOID *)&lpsf2)))
 	          { FillTreeView( lpsf2, lptvid->lpifq, pnmtv->itemNew.hItem );
@@ -282,7 +282,7 @@
 	  case WM_NOTIFY:
 	    MsgNotify( hWnd, (UINT)wParam, (LPNMHDR)lParam);
 	    break;
-	    
+
 	  case WM_COMMAND:
 	    switch (wParam)
 	    { case IDOK:
@@ -332,11 +332,11 @@
  */
 LPITEMIDLIST WINAPI SHBrowseForFolderA (LPBROWSEINFOA lpbi)
 {
-	TRACE("(%p{lpszTitle=%s,owner=%i})\n", 
+	TRACE("(%p{lpszTitle=%s,owner=%i})\n",
 	      lpbi, debugstr_a(lpbi->lpszTitle), lpbi->hwndOwner);
 
 	return (LPITEMIDLIST) DialogBoxParamA( shell32_hInstance,
-					       "SHBRSFORFOLDER_MSGBOX",  
+					       "SHBRSFORFOLDER_MSGBOX",
 					       lpbi->hwndOwner,
 					       BrsFolderDlgProc, (INT)lpbi );
 }
diff --git a/dlls/shell32/changenotify.c b/dlls/shell32/changenotify.c
index bd5809a..f2d9c62 100644
--- a/dlls/shell32/changenotify.c
+++ b/dlls/shell32/changenotify.c
@@ -62,13 +62,13 @@
 	ptr = head.next;
 
 	while(ptr != &tail)
-	{ 
+	{
 	  int i;
 	  item = ptr;
 	  ptr = ptr->next;
 
 	  TRACE("item=%p\n", item);
-	  
+
 	  /* free the item */
 	  for (i=0; i<item->cidl;i++) SHFree(item->apidl[i].pidlPath);
 	  SHFree(item->apidl);
@@ -85,7 +85,7 @@
 static BOOL AddNode(LPNOTIFICATIONLIST item)
 {
 	LPNOTIFICATIONLIST last;
-	
+
 	EnterCriticalSection(&SHELL32_ChangenotifyCS);
 
 	/* get last entry */
@@ -114,13 +114,13 @@
 
 	ptr = head.next;
 	while((ptr != &tail) && (ret == FALSE))
-	{ 
+	{
 	  TRACE("ptr=%p\n", ptr);
-	  
+
 	  if (ptr == item)
 	  {
 	    int i;
-	    
+
 	    TRACE("item=%p prev=%p next=%p\n", item, item->prev, item->next);
 
 	    /* remove item from list */
@@ -135,10 +135,10 @@
 	  }
 	  ptr = ptr->next;
 	}
-	
+
 	LeaveCriticalSection(&SHELL32_ChangenotifyCS);
 	return ret;
-	
+
 }
 
 /*************************************************************************
@@ -161,7 +161,7 @@
 
 	TRACE("(0x%04x,0x%08lx,0x%08lx,0x%08lx,0x%08x,%p) item=%p\n",
 		hwnd,dwFlags,wEventMask,uMsg,cItems,lpItems,item);
-	
+
 	item->next = NULL;
 	item->prev = NULL;
 	item->cidl = cItems;
@@ -188,7 +188,7 @@
 {
 	TRACE("(0x%08x)\n",hNotify);
 
-	return DeleteNode((LPNOTIFICATIONLIST)hNotify);;
+	return DeleteNode((LPNOTIFICATIONLIST)hNotify);
 }
 
 /*************************************************************************
@@ -211,7 +211,7 @@
 {
 	LPITEMIDLIST pidl1=(LPITEMIDLIST)dwItem1, pidl2=(LPITEMIDLIST)dwItem2;
 	LPNOTIFICATIONLIST ptr;
-	
+
 	TRACE("(0x%08lx,0x%08x,%p,%p):stub.\n", wEventId,uFlags,dwItem1,dwItem2);
 
 	/* convert paths in IDLists*/
@@ -221,15 +221,15 @@
 	  if (dwItem1) SHILCreateFromPathA((LPCSTR)dwItem1, &pidl1, &dummy);
 	  if (dwItem2) SHILCreateFromPathA((LPCSTR)dwItem2, &pidl2, &dummy);
 	}
-	
+
 	EnterCriticalSection(&SHELL32_ChangenotifyCS);
-	
+
 	/* loop through the list */
 	ptr = head.next;
 	while(ptr != &tail)
 	{
 	  TRACE("trying %p\n", ptr);
-	  
+
 	  if(wEventId & ptr->wEventMask)
 	  {
 	    TRACE("notifying\n");
@@ -237,7 +237,7 @@
 	  }
 	  ptr = ptr->next;
 	}
-	
+
 	LeaveCriticalSection(&SHELL32_ChangenotifyCS);
 
 	if(uFlags & SHCNF_PATHA)
@@ -254,7 +254,7 @@
 {
 	LPITEMIDLIST Pidls[2];
 	LPNOTIFICATIONLIST ptr;
-	
+
 	Pidls[0] = (LPITEMIDLIST)dwItem1;
 	Pidls[1] = (LPITEMIDLIST)dwItem2;
 
@@ -267,15 +267,15 @@
 	  if (Pidls[0]) SHILCreateFromPathA((LPCSTR)dwItem1, &Pidls[0], &dummy);
 	  if (Pidls[1]) SHILCreateFromPathA((LPCSTR)dwItem2, &Pidls[1], &dummy);
 	}
-	
+
 	EnterCriticalSection(&SHELL32_ChangenotifyCS);
-	
+
 	/* loop through the list */
 	ptr = head.next;
 	while(ptr != &tail)
 	{
 	  TRACE("trying %p\n", ptr);
-	  
+
 	  if(wEventId & ptr->wEventMask)
 	  {
 	    TRACE("notifying\n");
@@ -283,7 +283,7 @@
 	  }
 	  ptr = ptr->next;
 	}
-	
+
 	LeaveCriticalSection(&SHELL32_ChangenotifyCS);
 
 	/* if we allocated it, free it */
diff --git a/dlls/shell32/classes.c b/dlls/shell32/classes.c
index 8438be7..9f1af16 100644
--- a/dlls/shell32/classes.c
+++ b/dlls/shell32/classes.c
@@ -1,5 +1,5 @@
 /*
- *	file type mapping 
+ *	file type mapping
  *	(HKEY_CLASSES_ROOT - Stuff)
  *
  * Copyright 1998, 1999, 2000 Juergen Schmied
@@ -50,7 +50,7 @@
 	  strcpy(szTemp, ".");
 
 	lstrcpynA(szTemp+((bPrependDot)?1:0), szExtension, MAX_EXTENSION_LENGTH);
-	
+
 	if (RegOpenKeyExA(HKEY_CLASSES_ROOT,szTemp,0,0x02000000,&hkey))
 	{ return FALSE;
 	}
@@ -58,7 +58,7 @@
 	if (RegQueryValueA(hkey,NULL,szFileType,&len))
 	{ RegCloseKey(hkey);
 	  return FALSE;
-	}	
+	}
 
 	RegCloseKey(hkey);
 
@@ -72,7 +72,7 @@
 	char	sTemp[MAX_PATH];
 	DWORD	dwType;
 	BOOL	ret = FALSE;
-	
+
 	TRACE("%s %s\n",szClass, szVerb );
 
 	sprintf(sTemp, "%s\\shell\\%s\\command",szClass, szVerb);
@@ -125,7 +125,7 @@
                *dwNr=0; /* sometimes the icon number is missing */
 	    ParseFieldA (szDest, 1, szDest, len);
 	    ret = TRUE;
-	  }	
+	  }
 	  RegCloseKey(hkey);
 	}
 	TRACE("-- %s %li\n", szDest, *dwNr );
@@ -161,7 +161,7 @@
 	}
 
 	if (!ret || !szDest[0])
-	{ 
+	{
 	  if(IsEqualIID(riid, &CLSID_ShellDesktop))
 	  {
 	    if (LoadStringA(shell32_hInstance, IDS_DESKTOP, szDest, buflen))
@@ -171,7 +171,7 @@
 	  {
 	    if(LoadStringA(shell32_hInstance, IDS_MYCOMPUTER, szDest, buflen))
 	      ret = TRUE;
-	  }	
+	  }
 	}
 
 	TRACE("-- %s\n", szDest);
@@ -201,7 +201,7 @@
 
 	if (!szDest) return FALSE;
 	*szDest = SFGAO_FOLDER|SFGAO_FILESYSTEM;
-	
+
 	strcat (xriid, "\\ShellFolder");
 
 	if (RegOpenKeyExA(HKEY_CLASSES_ROOT,xriid,0,KEY_READ,&hkey))
@@ -224,7 +224,7 @@
 	return TRUE;
 }
 
-typedef struct 
+typedef struct
 {	ICOM_VFIELD(IQueryAssociations);
 	DWORD	ref;
 } IQueryAssociationsImpl;
@@ -262,7 +262,7 @@
 
 	if(IsEqualIID(riid, &IID_IUnknown))		/*IUnknown*/
 	{
-	  *ppvObj = This; 
+	  *ppvObj = This;
 	}
 	else if(IsEqualIID(riid, &IID_IQueryAssociations))	/*IExtractIcon*/
 	{
@@ -271,7 +271,7 @@
 
 	if(*ppvObj)
 	{
-	  IQueryAssociations_AddRef((IQueryAssociations*) *ppvObj);  	
+	  IQueryAssociations_AddRef((IQueryAssociations*) *ppvObj);
 	  TRACE("-- Interface: (%p)->(%p)\n",ppvObj,*ppvObj);
 	  return S_OK;
 	}
@@ -303,7 +303,7 @@
 
 	shell32_ObjCount--;
 
-	if (!--(This->ref)) 
+	if (!--(This->ref))
 	{
 	  TRACE(" destroying IExtractIcon(%p)\n",This);
 	  HeapFree(GetProcessHeap(),0,This);
@@ -364,14 +364,14 @@
 	return E_NOTIMPL;
 }
 
-static struct ICOM_VTABLE(IQueryAssociations) qavt = 
-{	
+static struct ICOM_VTABLE(IQueryAssociations) qavt =
+{
 	ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
 	IQueryAssociations_fnQueryInterface,
 	IQueryAssociations_fnAddRef,
 	IQueryAssociations_fnRelease,
 	IQueryAssociations_fnInit,
-	IQueryAssociations_fnGetString,	
+	IQueryAssociations_fnGetString,
 	IQueryAssociations_fnGetKey,
 	IQueryAssociations_fnGetData,
 	IQueryAssociations_fnGetEnum
diff --git a/dlls/shell32/clipboard.c b/dlls/shell32/clipboard.c
index 0f93089..ad74178 100644
--- a/dlls/shell32/clipboard.c
+++ b/dlls/shell32/clipboard.c
@@ -53,7 +53,7 @@
 /**************************************************************************
  * InitShellOle
  *
- * 
+ *
  */
 void InitShellOle(void)
 {
@@ -115,7 +115,7 @@
 	HGLOBAL hGlobal;
 	DROPFILES *pDropFiles;
 	int offset;
-	
+
 	TRACE("(%p,%p,%u)\n", pidlRoot, apidl, cidl);
 
 	/* get the size needed */
@@ -124,7 +124,7 @@
 	SHGetPathFromIDListA(pidlRoot, szRootPath);
 	PathAddBackslashA(szRootPath);
 	rootsize = strlen(szRootPath);
-	
+
 	for (i=0; i<cidl;i++)
 	{
 	  _ILSimpleGetText(apidl[i], szFileName, MAX_PATH);
@@ -143,10 +143,10 @@
 
 	offset = pDropFiles->pFiles;
 	strcpy(szFileName, szRootPath);
-	
+
 	for (i=0; i<cidl;i++)
 	{
-	  
+
 	  _ILSimpleGetText(apidl[i], szFileName + rootsize, MAX_PATH - rootsize);
 	  size = strlen(szFileName) + 1;
 	  strcpy(((char*)pDropFiles)+offset, szFileName);
@@ -176,7 +176,7 @@
 	}
 
 	/* fill the structure */
-	hGlobal = GlobalAlloc(GHND|GMEM_SHARE, size);		
+	hGlobal = GlobalAlloc(GHND|GMEM_SHARE, size);
 	if(!hGlobal) return hGlobal;
 	pcida = GlobalLock (hGlobal);
 	pcida->cidl = cidl;
@@ -223,7 +223,7 @@
 	int len, size = 0;
 	char szTemp[MAX_PATH], *szFileName;
 	HGLOBAL hGlobal;
-	
+
 	TRACE("(%p,%p,%u)\n", pidlRoot, apidl, cidl);
 
 	/* build name of first file */
@@ -245,7 +245,7 @@
 {
 	DWORD * pdwFlag;
 	HGLOBAL hGlobal;
-	
+
 	TRACE("(0x%08lx)\n", dwFlags);
 
 	hGlobal = GlobalAlloc(GHND|GMEM_SHARE, sizeof(DWORD));
@@ -264,7 +264,7 @@
 BOOL IsDataInClipboard (HWND hwnd)
 {
 	BOOL ret = FALSE;
-	
+
 	if (OpenClipboard(hwnd))
 	{
 	  if (GetOpenClipboardWindow())
diff --git a/dlls/shell32/control.c b/dlls/shell32/control.c
index 841c0de..46eb8cb 100644
--- a/dlls/shell32/control.c
+++ b/dlls/shell32/control.c
@@ -36,7 +36,7 @@
     unsigned		count;		/* number of subprograms */
     HMODULE     	hModule;	/* module of loaded applet */
     APPLET_PROC		proc;		/* entry point address */
-    NEWCPLINFOA		info[1];	/* array of count information. 
+    NEWCPLINFOA		info[1];	/* array of count information.
 					 * dwSize field is 0 if entry is invalid */
 } CPlApplet;
 
@@ -92,9 +92,9 @@
 	goto theError;
     }
 
-    applet = HeapReAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, applet, 
+    applet = HeapReAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, applet,
 			 sizeof(*applet) + (applet->count - 1) * sizeof(NEWCPLINFOA));
-    
+
     for (i = 0; i < applet->count; i++) {
        applet->info[i].dwSize = sizeof(NEWCPLINFOA);
        /* proc is supposed to return a null value upon success for
@@ -113,11 +113,11 @@
 	       applet->info[i].dwFlags = 0;
 	       applet->info[i].dwHelpContext = 0;
 	       applet->info[i].lData = info.lData;
-	       applet->info[i].hIcon = LoadIconA(applet->hModule, 
+	       applet->info[i].hIcon = LoadIconA(applet->hModule,
 						 MAKEINTRESOURCEA(info.idIcon));
-	       LoadStringA(applet->hModule, info.idName, 
+	       LoadStringA(applet->hModule, info.idName,
 			   applet->info[i].szName, sizeof(applet->info[i].szName));
-	       LoadStringA(applet->hModule, info.idInfo, 
+	       LoadStringA(applet->hModule, info.idInfo,
 			   applet->info[i].szInfo, sizeof(applet->info[i].szInfo));
 	       applet->info[i].szHelpFile[0] = '\0';
 	   }
@@ -154,7 +154,7 @@
     unsigned	i, x = (XSTEP-XICON)/2, y = 0;
     CPlApplet*	applet;
     RECT	rc;
-    
+
     GetClientRect(panel->hWnd, &rc);
     for (applet = panel->first; applet; applet = applet = applet->next) {
         for (i = 0; i < applet->count; i++) {
@@ -198,7 +198,7 @@
 	    txtRect.right = x + XSTEP;
 	    txtRect.top = y + YICON;
 	    txtRect.bottom = y + YSTEP;
-	    DrawTextA(hdc, applet->info[i].szName, -1, &txtRect, 
+	    DrawTextA(hdc, applet->info[i].szName, -1, &txtRect,
 		      DT_CENTER | DT_VCENTER);
 	    x += XSTEP;
 	}
@@ -212,7 +212,7 @@
 {
     unsigned	i;
     CPlApplet*	applet;
-    
+
     if (Control_Localize(panel, LOWORD(lParam), HIWORD(lParam), &applet, &i)) {
        if (up) {
 	   if (panel->clkApplet == applet && panel->clkSP == i) {
@@ -226,7 +226,7 @@
     return 0;
 }
 
-static LRESULT WINAPI	Control_WndProc(HWND hWnd, UINT wMsg, 
+static LRESULT WINAPI	Control_WndProc(HWND hWnd, UINT wMsg,
 					WPARAM lParam1, LPARAM lParam2)
 {
    CPanel*	panel = (CPanel*)GetWindowLongA(hWnd, 0);
@@ -271,10 +271,10 @@
 
     if (!RegisterClassA(&wc)) return;
 
-    CreateWindowExA(0, wc.lpszClassName, "Wine Control Panel", 
-		    WS_OVERLAPPEDWINDOW | WS_VISIBLE, 
-		    CW_USEDEFAULT, CW_USEDEFAULT, 
-		    CW_USEDEFAULT, CW_USEDEFAULT, 
+    CreateWindowExA(0, wc.lpszClassName, "Wine Control Panel",
+		    WS_OVERLAPPEDWINDOW | WS_VISIBLE,
+		    CW_USEDEFAULT, CW_USEDEFAULT,
+		    CW_USEDEFAULT, CW_USEDEFAULT,
 		    hWnd, (HMENU)0, hInst, panel);
     if (!panel->hWnd) return;
     while (GetMessageA(&msg, panel->hWnd, 0, 0)) {
@@ -369,7 +369,7 @@
 {
     CPanel	panel;
 
-    TRACE("(0x%08x, 0x%08lx, %s, 0x%08lx)\n", 
+    TRACE("(0x%08x, 0x%08lx, %s, 0x%08lx)\n",
 	  hWnd, (DWORD)hInst, debugstr_a(cmd), nCmdShow);
 
     memset(&panel, 0, sizeof(panel));
diff --git a/dlls/shell32/dataobject.c b/dlls/shell32/dataobject.c
index a8071d9..514e911 100644
--- a/dlls/shell32/dataobject.c
+++ b/dlls/shell32/dataobject.c
@@ -34,7 +34,7 @@
 *   IEnumFORMATETC implementation
 */
 
-typedef struct 
+typedef struct
 {
     /* IUnknown fields */
     ICOM_VFIELD(IEnumFORMATETC);
@@ -53,7 +53,7 @@
 static HRESULT WINAPI IEnumFORMATETC_fnReset(LPENUMFORMATETC iface);
 static HRESULT WINAPI IEnumFORMATETC_fnClone(LPENUMFORMATETC iface, LPENUMFORMATETC* ppenum);
 
-static struct ICOM_VTABLE(IEnumFORMATETC) efvt = 
+static struct ICOM_VTABLE(IEnumFORMATETC) efvt =
 {
     ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
         IEnumFORMATETC_fnQueryInterface,
@@ -69,7 +69,7 @@
 {
 	IEnumFORMATETCImpl* ef;
 	DWORD size=cfmt * sizeof(FORMATETC);
-	
+
 	ef=(IEnumFORMATETCImpl*)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IEnumFORMATETCImpl));
 
 	if(ef)
@@ -101,12 +101,12 @@
 
 	if(IsEqualIID(riid, &IID_IUnknown))
 	{
-	  *ppvObj = This; 
+	  *ppvObj = This;
 	}
 	else if(IsEqualIID(riid, &IID_IEnumFORMATETC))
 	{
 	  *ppvObj = (IEnumFORMATETC*)This;
-	}   
+	}
 
 	if(*ppvObj)
 	{
@@ -134,7 +134,7 @@
 
 	shell32_ObjCount--;
 
-	if (!--(This->ref)) 
+	if (!--(This->ref))
 	{
 	  TRACE(" destroying IEnumFORMATETC(%p)\n",This);
 	  if (This->pFmt)
@@ -249,7 +249,7 @@
 
 	  shell32_ObjCount++;
 	}
-	
+
 	TRACE("(%p)->(apidl=%p cidl=%u)\n",dto, apidl, cidl);
 	return (LPDATAOBJECT)dto;
 }
@@ -266,16 +266,16 @@
 
 	if(IsEqualIID(riid, &IID_IUnknown))          /*IUnknown*/
 	{
-	  *ppvObj = This; 
+	  *ppvObj = This;
 	}
 	else if(IsEqualIID(riid, &IID_IDataObject))  /*IDataObject*/
 	{
 	  *ppvObj = (IDataObject*)This;
-	}   
+	}
 
 	if(*ppvObj)
 	{
-	  IUnknown_AddRef((IUnknown*)*ppvObj);      
+	  IUnknown_AddRef((IUnknown*)*ppvObj);
 	  TRACE("-- Interface: (%p)->(%p)\n",ppvObj,*ppvObj);
 	  return S_OK;
 	}
@@ -306,7 +306,7 @@
 
 	shell32_ObjCount--;
 
-	if (!--(This->ref)) 
+	if (!--(This->ref))
 	{
 	  TRACE(" destroying IDataObject(%p)\n",This);
 	  _ILFreeaPidl(This->apidl, This->cidl);
@@ -324,7 +324,7 @@
 	ICOM_THIS(IDataObjectImpl,iface);
 
 	char	szTemp[256];
-	
+
 	szTemp[0]=0;
 	GetClipboardFormatNameA (pformatetcIn->cfFormat, szTemp, 256);
 	TRACE("(%p)->(%p %p format=%s)\n", This, pformatetcIn, pmedium, szTemp);
@@ -369,9 +369,9 @@
 {
 	ICOM_THIS(IDataObjectImpl,iface);
 	UINT i;
-	
+
 	TRACE("(%p)->(fmt=0x%08x tym=0x%08lx)\n", This, pformatetc->cfFormat, pformatetc->tymed);
-	
+
 	if(!(DVASPECT_CONTENT & pformatetc->dwAspect))
 	  return DV_E_DVASPECT;
 
@@ -415,7 +415,7 @@
 	  *ppenumFormatEtc = IEnumFORMATETC_Constructor(MAX_FORMATS, This->pFormatEtc);
 	  return (*ppenumFormatEtc) ? S_OK : E_FAIL;
 	}
-	
+
 	return E_NOTIMPL;
 }
 
@@ -438,7 +438,7 @@
 	return E_NOTIMPL;
 }
 
-static struct ICOM_VTABLE(IDataObject) dtovt = 
+static struct ICOM_VTABLE(IDataObject) dtovt =
 {
 	ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
 	IDataObject_fnQueryInterface,
diff --git a/dlls/shell32/debughlp.c b/dlls/shell32/debughlp.c
index bd76951..bdb33ed 100644
--- a/dlls/shell32/debughlp.c
+++ b/dlls/shell32/debughlp.c
@@ -136,17 +136,17 @@
 
 DWORD _dbg_ILSimpleGetText (LPCITEMIDLIST pidl, LPSTR szOut, UINT uOutSize)
 {
-	DWORD		dwReturn=0; 
+	DWORD		dwReturn=0;
 	LPSTR		szSrc;
 	GUID const * 	riid;
 	char szTemp[MAX_PATH];
-	
+
 	if (!pidl) return 0;
 
 	if (szOut)
 	  *szOut = 0;
 
-	if (_dbg_ILIsDesktop(pidl))					
+	if (_dbg_ILIsDesktop(pidl))
 	{
 	 /* desktop */
 	  if (szOut) strncpy(szOut, "Desktop", uOutSize);
@@ -191,7 +191,7 @@
 	{
 	  MESSAGE ("-------- pidl=%p\n", pidl);
 	  if (pidltemp->mkid.cb)
-	  { 
+	  {
 	    do
 	    {
 	      DWORD dwAttrib = 0;
diff --git a/dlls/shell32/dialogs.c b/dlls/shell32/dialogs.c
index 11b225f..0452e49 100644
--- a/dlls/shell32/dialogs.c
+++ b/dlls/shell32/dialogs.c
@@ -33,7 +33,7 @@
 
 /*************************************************************************
  * PickIconDlg					[SHELL32.62]
- * 
+ *
  */
 BOOL WINAPI PickIconDlg(
 	HWND hwndOwner,
diff --git a/dlls/shell32/enumidlist.c b/dlls/shell32/enumidlist.c
index 77b8117..7d61cc0 100644
--- a/dlls/shell32/enumidlist.c
+++ b/dlls/shell32/enumidlist.c
@@ -84,7 +84,7 @@
 	    /*add the new item to the end of the list */
 	    This->mpLast->pNext = pNew;
 	  }
-	 
+
 	  /*update the last item pointer */
 	  This->mpLast = pNew;
 	  TRACE("-- (%p)->(first=%p, last=%p)\n",This,This->mpFirst,This->mpLast);
@@ -104,7 +104,7 @@
 	ICOM_THIS(IEnumIDListImpl,iface);
 
 	LPITEMIDLIST	pidl=NULL;
-	WIN32_FIND_DATAA stffile;	
+	WIN32_FIND_DATAA stffile;
 	HANDLE hFile;
 	CHAR  szPath[MAX_PATH];
 
@@ -118,7 +118,7 @@
 
 	/*enumerate the folders*/
 	if(dwFlags & SHCONTF_FOLDERS)
-	{ 
+	{
 	  TRACE("-- (%p)-> enumerate SHCONTF_FOLDERS of %s\n",This,debugstr_a(szPath));
 	  hFile = FindFirstFileA(szPath,&stffile);
 	  if ( hFile != INVALID_HANDLE_VALUE )
@@ -159,7 +159,7 @@
 	      }
 	    } while( FindNextFileA(hFile,&stffile));
 	    FindClose (hFile);
-	  } 
+	  }
 	}
 	return TRUE;
 }
@@ -181,7 +181,7 @@
 
 	/*enumerate the root folders */
 	if(dwFlags & SHCONTF_FOLDERS)
-	{ 
+	{
 	  /*create the pidl for This item */
 	  pidl = _ILCreateMyComputer();
 	  if(pidl)
@@ -216,7 +216,7 @@
 	/*enumerate the elements in %windir%\desktop */
 	SHGetSpecialFolderPathA(0, szPath, CSIDL_DESKTOPDIRECTORY, FALSE);
 	CreateFolderEnumList( (IEnumIDList*)This, szPath, dwFlags);
-	
+
 	return TRUE;
 }
 
@@ -293,7 +293,7 @@
 	LPENUMLIST  pDelete;
 
 	TRACE("(%p)->()\n",This);
-	
+
 	while(This->mpFirst)
 	{ pDelete = This->mpFirst;
 	  This->mpFirst = pDelete->pNext;
@@ -315,7 +315,7 @@
 	DWORD dwKind)
 {
 	IEnumIDListImpl*	lpeidl;
-	BOOL			ret = FALSE;	
+	BOOL			ret = FALSE;
 
 	lpeidl = (IEnumIDListImpl*)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IEnumIDListImpl));
 
@@ -374,7 +374,7 @@
 	*ppvObj = NULL;
 
 	if(IsEqualIID(riid, &IID_IUnknown))          /*IUnknown*/
-	{ *ppvObj = This; 
+	{ *ppvObj = This;
 	}
 	else if(IsEqualIID(riid, &IID_IEnumIDList))  /*IEnumIDList*/
 	{    *ppvObj = (IEnumIDList*)This;
@@ -385,7 +385,7 @@
 	  TRACE("-- Interface: (%p)->(%p)\n",ppvObj,*ppvObj);
 	  return S_OK;
 	}
-	
+
 	TRACE("-- Interface: E_NOINTERFACE\n");
 	return E_NOINTERFACE;
 }
@@ -415,7 +415,7 @@
 
 	shell32_ObjCount--;
 
-	if (!--(This->ref)) 
+	if (!--(This->ref))
 	{ TRACE(" destroying IEnumIDList(%p)\n",This);
 	  DeleteList((IEnumIDList*)This);
 	  HeapFree(GetProcessHeap(),0,This);
@@ -423,7 +423,7 @@
 	}
 	return This->ref;
 }
-   
+
 /**************************************************************************
  *  IEnumIDList_fnNext
  */
@@ -432,7 +432,7 @@
 	IEnumIDList * iface,
 	ULONG celt,
 	LPITEMIDLIST * rgelt,
-	ULONG *pceltFetched) 
+	ULONG *pceltFetched)
 {
 	ICOM_THIS(IEnumIDListImpl,iface);
 
@@ -449,7 +449,7 @@
 	  *pceltFetched = 0;
 
 	*rgelt=0;
-	
+
 	if(celt > 1 && !pceltFetched)
 	{ return E_INVALIDARG;
 	}
@@ -519,7 +519,7 @@
 /**************************************************************************
  *  IEnumIDList_fnVTable
  */
-static ICOM_VTABLE (IEnumIDList) eidlvt = 
+static ICOM_VTABLE (IEnumIDList) eidlvt =
 {
 	ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
 	IEnumIDList_fnQueryInterface,
diff --git a/dlls/shell32/folders.c b/dlls/shell32/folders.c
index 2a1352e..a63fce6 100644
--- a/dlls/shell32/folders.c
+++ b/dlls/shell32/folders.c
@@ -40,7 +40,7 @@
 *   IExtractIconA implementation
 */
 
-typedef struct 
+typedef struct
 {	ICOM_VFIELD(IExtractIconA);
 	DWORD	ref;
 	ICOM_VTABLE(IPersistFile)*	lpvtblPersistFile;
@@ -84,7 +84,7 @@
 	*ppvObj = NULL;
 
 	if(IsEqualIID(riid, &IID_IUnknown))		/*IUnknown*/
-	{ *ppvObj = This; 
+	{ *ppvObj = This;
 	}
 	else if(IsEqualIID(riid, &IID_IPersistFile))	/*IExtractIcon*/
 	{    *ppvObj = (IPersistFile*)&(This->lpvtblPersistFile);
@@ -94,7 +94,7 @@
 	}
 
 	if(*ppvObj)
-	{ IExtractIconA_AddRef((IExtractIconA*) *ppvObj);  	
+	{ IExtractIconA_AddRef((IExtractIconA*) *ppvObj);
 	  TRACE("-- Interface: (%p)->(%p)\n",ppvObj,*ppvObj);
 	  return S_OK;
 	}
@@ -126,7 +126,7 @@
 
 	shell32_ObjCount--;
 
-	if (!--(This->ref)) 
+	if (!--(This->ref))
 	{ TRACE(" destroying IExtractIcon(%p)\n",This);
 	  SHFree(This->pidl);
 	  HeapFree(GetProcessHeap(),0,This);
@@ -153,7 +153,7 @@
 	DWORD	dwNr;
 	GUID const * riid;
 	LPITEMIDLIST	pSimplePidl = ILFindLastID(This->pidl);
-			
+
 	TRACE("(%p) (flags=%u %p %u %p %p)\n", This, uFlags, szIconFile, cchMax, piIndex, pwFlags);
 
 	if (pwFlags)
@@ -167,7 +167,7 @@
 
 	/* my computer and other shell extensions */
 	else if ( (riid = _ILGetGUIDPointer(pSimplePidl)) )
-	{ 
+	{
 	  char xriid[50];
           sprintf( xriid, "CLSID\\{%08lx-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}",
                    riid->Data1, riid->Data2, riid->Data3,
@@ -254,8 +254,8 @@
 	return S_OK;
 }
 
-static struct ICOM_VTABLE(IExtractIconA) eivt = 
-{	
+static struct ICOM_VTABLE(IExtractIconA) eivt =
+{
 	ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
 	IExtractIconA_fnQueryInterface,
 	IExtractIconA_fnAddRef,
diff --git a/dlls/shell32/iconcache.c b/dlls/shell32/iconcache.c
index 2189798..751265e 100644
--- a/dlls/shell32/iconcache.c
+++ b/dlls/shell32/iconcache.c
@@ -71,7 +71,7 @@
 	if (strcasecmp(((LPSIC_ENTRY)p1)->sSourceFile,((LPSIC_ENTRY)p2)->sSourceFile))
 	  return 1;
 
-	return 0;  
+	return 0;
 }
 /*****************************************************************************
  * SIC_IconAppend			[internal]
@@ -92,7 +92,7 @@
         strcpy( lpsice->sSourceFile, path );
 
 	lpsice->dwSourceIndex = dwSourceIndex;
-	
+
 	EnterCriticalSection(&SHELL32_SicCS);
 
 	index = pDPA_InsertPtr(sic_hdpa, 0x7fff, lpsice);
@@ -115,7 +115,7 @@
 	}
 
 	LeaveCriticalSection(&SHELL32_SicCS);
-	return ret;	
+	return ret;
 }
 /****************************************************************************
  * SIC_LoadIcon				[internal]
@@ -127,15 +127,15 @@
 {	HICON	hiconLarge=0;
 	HICON	hiconSmall=0;
 
-        PrivateExtractIconsA( sSourceFile, dwSourceIndex, 32, 32, &hiconLarge, 0, 1, 0 ); 
-        PrivateExtractIconsA( sSourceFile, dwSourceIndex, 16, 16, &hiconSmall, 0, 1, 0 ); 
+        PrivateExtractIconsA( sSourceFile, dwSourceIndex, 32, 32, &hiconLarge, 0, 1, 0 );
+        PrivateExtractIconsA( sSourceFile, dwSourceIndex, 16, 16, &hiconSmall, 0, 1, 0 );
 
 	if ( !hiconLarge ||  !hiconSmall)
 	{
 	  WARN("failure loading icon %i from %s (%x %x)\n", dwSourceIndex, sSourceFile, hiconLarge, hiconSmall);
 	  return -1;
 	}
-	return SIC_IconAppend (sSourceFile, dwSourceIndex, hiconSmall, hiconLarge);		
+	return SIC_IconAppend (sSourceFile, dwSourceIndex, hiconSmall, hiconLarge);
 }
 /*****************************************************************************
  * SIC_GetIconIndex			[internal]
@@ -151,12 +151,12 @@
 INT SIC_GetIconIndex (LPCSTR sSourceFile, INT dwSourceIndex )
 {	SIC_ENTRY sice;
 	INT ret, index = INVALID_INDEX;
-		
+
 	TRACE("%s %i\n", sSourceFile, dwSourceIndex);
 
 	sice.sSourceFile = PathFindFileNameA(sSourceFile);
 	sice.dwSourceIndex = dwSourceIndex;
-	
+
 	EnterCriticalSection(&SHELL32_SicCS);
 
 	if (NULL != pDPA_GetPtr (sic_hdpa, 0))
@@ -199,13 +199,13 @@
 	if (bSmallIcon)
 	  return ImageList_GetIcon(ShellSmallIconList, index, ILD_NORMAL);
 	return ImageList_GetIcon(ShellBigIconList, index, ILD_NORMAL);
-	
+
 }
 /*****************************************************************************
  * SIC_Initialize			[internal]
  *
  * NOTES
- *  hack to load the resources from the shell32.dll under a different dll name 
+ *  hack to load the resources from the shell32.dll under a different dll name
  *  will be removed when the resource-compiler is ready
  */
 BOOL SIC_Initialize(void)
@@ -217,9 +217,9 @@
 
 	if (sic_hdpa)	/* already initialized?*/
 	  return TRUE;
-	  
+
 	sic_hdpa = pDPA_Create(16);
-	
+
 	if (!sic_hdpa)
 	{
 	  return(FALSE);
@@ -266,7 +266,7 @@
 	{
 	  for (i=0; i < pDPA_GetPtrCount(sic_hdpa); ++i)
 	  {
-	    lpsice = pDPA_GetPtr(sic_hdpa, i); 
+	    lpsice = pDPA_GetPtr(sic_hdpa, i);
 	    SHFree(lpsice);
 	  }
 	  pDPA_Destroy(sic_hdpa);
@@ -312,13 +312,13 @@
 	BOOL bBigIcon,
 	UINT uFlags,
 	UINT * pIndex)
-{	
+{
 	IExtractIconA	*ei;
 	char		szIconFile[MAX_PATH];	/* file containing the icon */
 	INT		iSourceIndex;		/* index or resID(negated) in this file */
 	BOOL		ret = FALSE;
 	UINT		dwFlags = 0;
-	
+
 	TRACE("sf=%p pidl=%p %s\n", sh, pidl, bBigIcon?"Big":"Small");
 
 	if (SUCCEEDED (IShellFolder_GetUIObjectOf(sh, 0, 1, &pidl, &IID_IExtractIconA, 0, (void **)&ei)))
@@ -342,7 +342,7 @@
  * SHMapPIDLToSystemImageListIndex	[SHELL32.77]
  *
  * PARAMETERS
- *	sh	[IN]		pointer to an instance of IShellFolder 
+ *	sh	[IN]		pointer to an instance of IShellFolder
  *	pidl	[IN]
  *	pIndex	[OUT][OPTIONAL]	SIC index for big icon
  *
@@ -356,7 +356,7 @@
 
 	TRACE("(SF=%p,pidl=%p,%p)\n",sh,pidl,pIndex);
 	pdump(pidl);
-	
+
 	if (pIndex)
 	  PidlToSicIndex ( sh, pidl, 1, 0, pIndex);
 	PidlToSicIndex ( sh, pidl, 0, 0, &Index);
@@ -367,16 +367,16 @@
  * Shell_GetCachedImageIndex		[SHELL32.72]
  *
  */
-INT WINAPI Shell_GetCachedImageIndexA(LPCSTR szPath, INT nIndex, BOOL bSimulateDoc) 
+INT WINAPI Shell_GetCachedImageIndexA(LPCSTR szPath, INT nIndex, BOOL bSimulateDoc)
 {
 	WARN("(%s,%08x,%08x) semi-stub.\n",debugstr_a(szPath), nIndex, bSimulateDoc);
 	return SIC_GetIconIndex(szPath, nIndex);
 }
 
-INT WINAPI Shell_GetCachedImageIndexW(LPCWSTR szPath, INT nIndex, BOOL bSimulateDoc) 
+INT WINAPI Shell_GetCachedImageIndexW(LPCWSTR szPath, INT nIndex, BOOL bSimulateDoc)
 {	INT ret;
 	LPSTR sTemp = HEAP_strdupWtoA (GetProcessHeap(),0,szPath);
-	
+
 	WARN("(%s,%08x,%08x) semi-stub.\n",debugstr_w(szPath), nIndex, bSimulateDoc);
 
 	ret = SIC_GetIconIndex(sTemp, nIndex);
@@ -401,13 +401,13 @@
 /*************************************************************************
  * ExtractIconExA			[SHELL32.@]
  * RETURNS
- *  0 no icon found 
+ *  0 no icon found
  *  1 file is not valid
  *  HICON handle of a icon (phiconLarge/Small == NULL)
  */
 HICON WINAPI ExtractIconExA ( LPCSTR lpszFile, INT nIconIndex, HICON * phiconLarge, HICON * phiconSmall, UINT nIcons )
 {	HICON ret=0;
-	
+
 	TRACE("file=%s idx=%i %p %p num=%i\n", lpszFile, nIconIndex, phiconLarge, phiconSmall, nIcons );
 
 	if (nIconIndex==-1)	/* Number of icons requested */
@@ -417,14 +417,14 @@
         {
           ret = PrivateExtractIconsA( lpszFile, nIconIndex, 32, 32, phiconLarge, 0, nIcons, 0 );
 	  if ( nIcons==1)
-	  { ret = phiconLarge[0];	    
+	  { ret = phiconLarge[0];
 	  }
 	}
 
 	/* if no pointers given and one icon expected, return the handle directly*/
 	if (!phiconLarge && !phiconSmall && nIcons==1 )
 	  phiconSmall = &ret;
-	
+
 	if (phiconSmall)
         {
           ret = PrivateExtractIconsA( lpszFile, nIconIndex, 16, 16, phiconSmall, 0, nIcons, 0 );
@@ -441,7 +441,7 @@
 HICON WINAPI ExtractIconExW ( LPCWSTR lpszFile, INT nIconIndex, HICON * phiconLarge, HICON * phiconSmall, UINT nIcons )
 {	LPSTR sFile;
 	DWORD ret;
-	
+
 	TRACE("file=%s idx=%i %p %p num=%i\n", debugstr_w(lpszFile), nIconIndex, phiconLarge, phiconSmall, nIcons );
 
 	sFile = HEAP_strdupWtoA (GetProcessHeap(),0,lpszFile);
diff --git a/dlls/shell32/memorystream.c b/dlls/shell32/memorystream.c
index e3326fe..5e86162 100644
--- a/dlls/shell32/memorystream.c
+++ b/dlls/shell32/memorystream.c
@@ -50,8 +50,8 @@
 static HRESULT WINAPI IStream_fnStat (IStream * iface, STATSTG*   pstatstg, DWORD grfStatFlag);
 static HRESULT WINAPI IStream_fnClone (IStream * iface, IStream** ppstm);
 
-static ICOM_VTABLE(IStream) stvt = 
-{	
+static ICOM_VTABLE(IStream) stvt =
+{
 	ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
 	IStream_fnQueryInterface,
 	IStream_fnAddRef,
@@ -67,10 +67,10 @@
 	IStream_fnUnlockRegion,
 	IStream_fnStat,
 	IStream_fnClone
-	
+
 };
 
-typedef struct 
+typedef struct
 {	ICOM_VTABLE(IStream)	*lpvtst;
 	DWORD		ref;
 	LPBYTE		pImage;
@@ -90,7 +90,7 @@
 	OFSTRUCT	ofs;
 	HFILE		hFile = OpenFile( pszFilename, &ofs, OF_READ );
 	HRESULT		ret = E_FAIL;
-	
+
 	fstr = (ISHFileStream*)HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(ISHFileStream));
 	fstr->lpvtst=&stvt;
 	fstr->ref = 1;
@@ -112,7 +112,7 @@
 
 	ret = S_OK;
 	goto end_1;
-	
+
 end_3:	CloseHandle(fstr->hMapping);
 end_2:	HeapFree(GetProcessHeap(), 0, fstr);
 	fstr = NULL;
@@ -140,8 +140,8 @@
 	}
 
 	if(*ppvObj)
-	{ 
-	  IStream_AddRef((IStream*)*ppvObj);      
+	{
+	  IStream_AddRef((IStream*)*ppvObj);
 	  TRACE("-- Interface: (%p)->(%p)\n",ppvObj,*ppvObj);
 	  return S_OK;
 	}
@@ -173,7 +173,7 @@
 
 	shell32_ObjCount--;
 
-	if (!--(This->ref)) 
+	if (!--(This->ref))
 	{ TRACE(" destroying SHFileStream (%p)\n",This);
 
 	  UnmapViewOfFile(This->pImage);
@@ -190,9 +190,9 @@
 	ICOM_THIS(ISHFileStream, iface);
 
 	DWORD dwBytesToRead, dwBytesLeft;
-	
+
 	TRACE("(%p)->(%p,0x%08lx,%p)\n",This, pv, cb, pcbRead);
-	
+
 	if ( !pv )
 	  return STG_E_INVALIDPOINTER;
 
@@ -200,11 +200,11 @@
 
 	if ( 0 >= dwBytesLeft )						/* end of buffer */
 	  return S_FALSE;
-	
+
 	dwBytesToRead = ( cb > dwBytesLeft) ? dwBytesLeft : cb;
 
 	memmove ( pv, (This->pImage) + (This->dwPos), dwBytesToRead);
-	
+
 	This->dwPos += dwBytesToRead;					/* adjust pointer */
 
 	if (pcbRead)
diff --git a/dlls/shell32/pidl.c b/dlls/shell32/pidl.c
index c642a7a..8ff062b 100644
--- a/dlls/shell32/pidl.c
+++ b/dlls/shell32/pidl.c
@@ -57,7 +57,7 @@
  * NOTES
  *   observed: pidl=Desktop return=pidl
  */
-LPITEMIDLIST WINAPI ILFindLastID(LPITEMIDLIST pidl) 
+LPITEMIDLIST WINAPI ILFindLastID(LPITEMIDLIST pidl)
 {	LPITEMIDLIST   pidlLast = pidl;
 
 	TRACE("(pidl=%p)\n",pidl);
@@ -67,7 +67,7 @@
 	  pidlLast = pidl;
 	  pidl = ILGetNext(pidl);
 	}
-	return pidlLast;		
+	return pidlLast;
 }
 /*************************************************************************
  * ILRemoveLastID [SHELL32.17]
@@ -97,7 +97,7 @@
 
   if (!pidl)
     return NULL;
-    
+
   len = ILGetSize(pidl);
   newpidl = (LPITEMIDLIST)SHAlloc(len);
   if (newpidl)
@@ -117,13 +117,13 @@
 LPITEMIDLIST WINAPI ILCloneFirst(LPCITEMIDLIST pidl)
 {	DWORD len;
 	LPITEMIDLIST pidlNew = NULL;
-	
+
 	TRACE("pidl=%p \n",pidl);
 	pdump(pidl);
-	
+
 	if (pidl)
 	{
-	  len = pidl->mkid.cb;	
+	  len = pidl->mkid.cb;
 	  pidlNew = (LPITEMIDLIST) SHAlloc (len+2);
 	  if (pidlNew)
 	  {
@@ -148,7 +148,7 @@
 {	WORD		wLen = 0;
 	DWORD		dwBytesRead;
 	HRESULT		ret = E_FAIL;
-	
+
 
 	TRACE_(shell)("%p %p\n", pStream ,  ppPidl);
 
@@ -156,7 +156,7 @@
 	{ SHFree(*ppPidl);
 	  *ppPidl = NULL;
 	}
-	
+
 	IStream_AddRef (pStream);
 
 	if (SUCCEEDED(IStream_Read(pStream, (LPVOID)&wLen, 2, &dwBytesRead)))
@@ -169,13 +169,13 @@
 	    *ppPidl = NULL;
 	  }
 	}
-	
+
 	/* we are not yet fully compatible */
 	if (!pcheck(*ppPidl))
 	{ SHFree(*ppPidl);
 	  *ppPidl = NULL;
 	}
-	
+
 
 	IStream_Release (pStream);
 
@@ -193,7 +193,7 @@
 	LPITEMIDLIST	pidl;
 	WORD		wLen = 0;
 	HRESULT		ret = E_FAIL;
-	
+
 	TRACE_(shell)("%p %p\n", pStream, pPidl);
 
 	IStream_AddRef (pStream);
@@ -211,7 +211,7 @@
 	  { ret = S_OK;
 	  }
 	}
-	
+
 
 	IStream_Release (pStream);
 
@@ -229,7 +229,7 @@
 	WCHAR lpszDisplayName[MAX_PATH];
 	DWORD pchEaten;
 	HRESULT ret = E_FAIL;
-	
+
 	TRACE_(shell)("%s %p 0x%08lx\n",path,ppidl,attributes?*attributes:0);
 
         if (!MultiByteToWideChar( CP_ACP, 0, path, -1, lpszDisplayName, MAX_PATH ))
@@ -246,7 +246,7 @@
 {	LPSHELLFOLDER sf;
 	DWORD pchEaten;
 	HRESULT ret = E_FAIL;
-	
+
 	TRACE_(shell)("%s %p 0x%08lx\n",debugstr_w(path),ppidl,attributes?*attributes:0);
 
 	if (SUCCEEDED (SHGetDesktopFolder(&sf)))
@@ -265,9 +265,9 @@
 
 /*************************************************************************
  * SHCloneSpecialIDList [SHELL32.89]
- * 
+ *
  * PARAMETERS
- *  hwndOwner 	[in] 
+ *  hwndOwner 	[in]
  *  nFolder 	[in]	CSIDL_xxxxx ??
  *
  * RETURNS
@@ -295,7 +295,7 @@
 
 	if (!pidl)
 	  return NULL;
-    
+
 	len = ILGetSize(pidl);
 	newpidl = (LPITEMIDLIST)pCOMCTL32_Alloc(len);
 	if (newpidl)
@@ -329,7 +329,7 @@
 	pdump (pidl2);
 
 	if ( (!pidl1) || (!pidl2) ) return FALSE;
-	
+
 	while (pidltemp1->mkid.cb && pidltemp2->mkid.cb)
 	{
 	    _ILSimpleGetText(pidltemp1, szData1, MAX_PATH);
@@ -340,7 +340,7 @@
 
 	    pidltemp1 = ILGetNext(pidltemp1);
 	    pidltemp2 = ILGetNext(pidltemp2);
-	}	
+	}
 
 	if (!pidltemp1->mkid.cb && !pidltemp2->mkid.cb)
 	{
@@ -363,7 +363,7 @@
 
 	LPITEMIDLIST pParent = pidlParent;
 	LPITEMIDLIST pChild = pidlChild;
-	
+
 	TRACE("%p %p %x\n", pidlParent, pidlChild, bImmediate);
 
 	while (pParent->mkid.cb && pChild->mkid.cb)
@@ -376,14 +376,14 @@
 
 	  pParent = ILGetNext(pParent);
 	  pChild = ILGetNext(pChild);
-	}	
-	
+	}
+
 	if ( pParent->mkid.cb || ! pChild->mkid.cb)	/* child shorter or has equal length to parent */
 	  return FALSE;
-	
+
 	if ( ILGetNext(pChild)->mkid.cb && bImmediate)	/* not immediate descent */
 	  return FALSE;
-	
+
 	return TRUE;
 }
 
@@ -434,7 +434,7 @@
 
 	    pidltemp1 = ILGetNext(pidltemp1);
 	    pidltemp2 = ILGetNext(pidltemp2);
-	    ret = pidltemp2;	
+	    ret = pidltemp2;
 	  }
 
 	  if (pidltemp1->mkid.cb)
@@ -458,7 +458,7 @@
 {
 	DWORD    len1,len2;
 	LPITEMIDLIST  pidlNew;
-	
+
 	TRACE("pidl=%p pidl=%p\n",pidl1,pidl2);
 
 	if(!pidl1 && !pidl2) return NULL;
@@ -539,7 +539,7 @@
 	DWORD  len=0;
 
 	if (pidl)
-	{ while (si->cb) 
+	{ while (si->cb)
 	  { len += si->cb;
 	    si  = (LPSHITEMID)(((LPBYTE)si)+si->cb);
 	  }
@@ -591,7 +591,7 @@
 
 	pdump (pidl);
 	pdump (item);
-	
+
 	if (_ILIsDesktop(pidl))
 	{
 	   idlRet = ILClone(item);
@@ -620,7 +620,7 @@
  *     allocated by SHMalloc allocator
  *     exported by ordinal
  */
-DWORD WINAPI ILFree(LPITEMIDLIST pidl) 
+DWORD WINAPI ILFree(LPITEMIDLIST pidl)
 {
 	TRACE("(pidl=0x%08lx)\n",(DWORD)pidl);
 
@@ -643,7 +643,7 @@
  * ILCreateFromPath [SHELL32.157]
  *
  */
-LPITEMIDLIST WINAPI ILCreateFromPathA (LPCSTR path) 
+LPITEMIDLIST WINAPI ILCreateFromPathA (LPCSTR path)
 {
 	LPITEMIDLIST pidlnew;
 	DWORD attributes = 0;
@@ -654,7 +654,7 @@
 	  return pidlnew;
 	return FALSE;
 }
-LPITEMIDLIST WINAPI ILCreateFromPathW (LPCWSTR path) 
+LPITEMIDLIST WINAPI ILCreateFromPathW (LPCWSTR path)
 {
 	LPITEMIDLIST pidlnew;
 	DWORD attributes = 0;
@@ -665,7 +665,7 @@
 	  return pidlnew;
 	return FALSE;
 }
-LPITEMIDLIST WINAPI ILCreateFromPathAW (LPCVOID path) 
+LPITEMIDLIST WINAPI ILCreateFromPathAW (LPCVOID path)
 {
 	if ( SHELL_OsIsUnicode())
 	  return ILCreateFromPathW (path);
@@ -723,7 +723,7 @@
  *
  * gets the folder locations from the registry and creates a pidl
  * creates missing reg keys and directories
- * 
+ *
  * PARAMS
  *   hwndOwner [I]
  *   nFolder   [I] CSIDL_xxxxx
@@ -813,7 +813,7 @@
 HRESULT WINAPI SHGetDataFromIDListA(LPSHELLFOLDER psf, LPCITEMIDLIST pidl, int nFormat, LPVOID dest, int len)
 {
 	TRACE_(shell)("sf=%p pidl=%p 0x%04x %p 0x%04x stub\n",psf,pidl,nFormat,dest,len);
-	
+
 	pdump(pidl);
 	if (!psf || !dest )  return E_INVALIDARG;
 
@@ -893,10 +893,10 @@
  * SHGetPathFromIDListA		[SHELL32.@][NT 4.0: SHELL32.220]
  *
  * PARAMETERS
- *  pidl,   [IN] pidl 
+ *  pidl,   [IN] pidl
  *  pszPath [OUT] path
  *
- * RETURNS 
+ * RETURNS
  *  path from a passed PIDL.
  *
  * NOTES
@@ -919,7 +919,7 @@
 
 	if(_ILIsDesktop(pidl))
 	{
-	   SHGetSpecialFolderPathA(0, pszPath, CSIDL_DESKTOPDIRECTORY, FALSE);	
+	   SHGetSpecialFolderPathA(0, pszPath, CSIDL_DESKTOPDIRECTORY, FALSE);
 	}
 	else if (_ILIsSpecialFolder(ILFindLastID(pidl)))
 	{
@@ -966,17 +966,17 @@
 	IShellFolder	* psf;
 	LPITEMIDLIST	pidlChild, pidlParent;
 	HRESULT		hr=E_FAIL;
-	
+
 	TRACE_(shell)("pidl=%p\n", pidl);
 	pdump(pidl);
-	
+
 	*ppv = NULL;
 	if (ppidlLast) *ppidlLast = NULL;
 
 	if (_ILIsPidlSimple(pidl))
 	{
 	  /* we are on desktop level */
-	  if (ppidlLast) 
+	  if (ppidlLast)
 	    *ppidlLast = ILClone(pidl);
 	  hr = SHGetDesktopFolder((IShellFolder**)ppv);
 	}
@@ -1028,7 +1028,7 @@
  *  _ILCreateIExplore()
  *  _ILCreateMyComputer()
  *  _ILCreateDrive()
- *  _ILCreateFolder() 
+ *  _ILCreateFolder()
  *  _ILCreateValue()
  */
 LPITEMIDLIST _ILCreateDesktop()
@@ -1081,7 +1081,7 @@
 	char *	pbuff = buff;
 	ULONG	len, len1;
 	LPITEMIDLIST pidl;
-	
+
 	TRACE("(%s, %s)\n",stffile->cAlternateFileName, stffile->cFileName);
 
 	/* prepare buffer with both names */
@@ -1101,7 +1101,7 @@
 	}
 
 	pidl = _ILCreate(PT_FOLDER, (LPVOID)buff, len + len1);
-	
+
 	/* set attributes */
 	if (pidl)
 	{
@@ -1121,7 +1121,7 @@
 	char *	pbuff = buff;
 	ULONG	len, len1;
 	LPITEMIDLIST pidl;
-	
+
 	TRACE("(%s, %s)\n",stffile->cAlternateFileName, stffile->cFileName);
 
 	/* prepare buffer with both names */
@@ -1141,7 +1141,7 @@
 	}
 
 	pidl = _ILCreate(PT_VALUE, (LPVOID)buff, len + len1);
-	
+
 	/* set attributes */
 	if (pidl)
 	{
@@ -1180,7 +1180,7 @@
 	LPPIDLDATA     pData;
 	UINT           uSize = 0;
 	LPSTR	pszDest;
-	
+
 	TRACE("(0x%02x %p %i)\n",type,pIn,uInSize);
 
 	switch (type)
@@ -1196,11 +1196,11 @@
 	    uSize = 2 + 23;
 	    break;
 	  case PT_FOLDER:
-	  case PT_VALUE:   
+	  case PT_VALUE:
 	    uSize = 2 + 12 + uInSize;
 	    break;
 	  default:
-	    FIXME("can't create type: 0x%08x\n",type); 
+	    FIXME("can't create type: 0x%08x\n",type);
 	    return NULL;
 	}
 
@@ -1231,7 +1231,7 @@
 	    break;
 
 	  case PT_FOLDER:
-	  case PT_VALUE:   
+	  case PT_VALUE:
 	    pData =_ILGetDataPointer(pidlOut);
 	    pData->type = type;
 	    pszDest =  _ILGetTextPointer(pidlOut);
@@ -1239,7 +1239,7 @@
 	    TRACE("- create Value: %s\n",debugstr_a(pszDest));
 	    break;
 	}
-	
+
 	pidlTemp = ILGetNext(pidlOut);
 	if (pidlTemp)
 	  pidlTemp->mkid.cb = 0x00;
@@ -1301,7 +1301,7 @@
 {
 	LPPIDLDATA lpPData = _ILGetDataPointer(pidl);
 	TRACE("(%p)\n",pidl);
-	return (pidl && ( (lpPData && (PT_MYCOMP== lpPData->type || PT_SPECIAL== lpPData->type)) || 
+	return (pidl && ( (lpPData && (PT_MYCOMP== lpPData->type || PT_SPECIAL== lpPData->type)) ||
 			  (pidl && pidl->mkid.cb == 0x00)
 			));
 }
@@ -1360,19 +1360,19 @@
  */
 DWORD _ILSimpleGetText (LPCITEMIDLIST pidl, LPSTR szOut, UINT uOutSize)
 {
-	DWORD		dwReturn=0; 
+	DWORD		dwReturn=0;
 	LPSTR		szSrc;
 	GUID const * 	riid;
 	char szTemp[MAX_PATH];
-	
+
 	TRACE("(%p %p %x)\n",pidl,szOut,uOutSize);
-	
+
 	if (!pidl) return 0;
 
 	if (szOut)
 	  *szOut = 0;
 
-	if (_ILIsDesktop(pidl))					
+	if (_ILIsDesktop(pidl))
 	{
 	 /* desktop */
 	  if (HCR_GetClassName(&CLSID_ShellDesktop, szTemp, MAX_PATH))
@@ -1532,7 +1532,7 @@
  *     True if Successful
  *
  * NOTES
- *     
+ *
  */
 BOOL _ILGetFileDateTime(LPCITEMIDLIST pidl, FILETIME *pFt)
 {
@@ -1541,10 +1541,10 @@
     if(! pdata) return FALSE;
 
     switch (pdata->type)
-    { 
+    {
         case PT_FOLDER:
             DosDateTimeToFileTime(pdata->u.folder.uFileDate, pdata->u.folder.uFileTime, pFt);
-            break;	    
+            break;
         case PT_VALUE:
             DosDateTimeToFileTime(pdata->u.file.uFileDate, pdata->u.file.uFileTime, pFt);
             break;
@@ -1555,12 +1555,12 @@
 }
 
 BOOL _ILGetFileDate (LPCITEMIDLIST pidl, LPSTR pOut, UINT uOutSize)
-{	
+{
 	FILETIME ft,lft;
 	SYSTEMTIME time;
 
 	if (! _ILGetFileDateTime( pidl, &ft )) return FALSE;
-	
+
 	FileTimeToLocalFileTime(&ft, &lft);
 	FileTimeToSystemTime (&lft, &time);
 	return GetDateFormatA(LOCALE_USER_DEFAULT,DATE_SHORTDATE,&time, NULL,  pOut, uOutSize);
@@ -1581,13 +1581,13 @@
  *
  * NOTES
  *	pOut can be null when no string is needed
- *     
+ *
  */
 DWORD _ILGetFileSize (LPCITEMIDLIST pidl, LPSTR pOut, UINT uOutSize)
 {
 	LPPIDLDATA pdata =_ILGetDataPointer(pidl);
 	DWORD dwSize;
-	
+
 	if(! pdata) return 0;
 
 	switch (pdata->type)
@@ -1606,13 +1606,13 @@
 	char szTemp[MAX_PATH];
 	const char * pPoint;
 	LPITEMIDLIST  pidlTemp=pidl;
-	
+
 	TRACE("pidl=%p\n",pidl);
 
 	if (!pidl) return FALSE;
-	
+
 	pidlTemp = ILFindLastID(pidl);
-	
+
 	if (!_ILIsValue(pidlTemp)) return FALSE;
 	if (!_ILSimpleGetText(pidlTemp, szTemp, MAX_PATH)) return FALSE;
 
@@ -1641,7 +1641,7 @@
  *	nothing
  *
  * NOTES
- *	This function copies as much as possible into the buffer. 
+ *	This function copies as much as possible into the buffer.
  */
 void _ILGetFileType(LPCITEMIDLIST pidl, LPSTR pOut, UINT uOutSize)
 {
@@ -1683,7 +1683,7 @@
  *
  * FIXME
  *  return value 0 in case of error is a valid return value
- *     
+ *
  */
 DWORD _ILGetFileAttributes(LPCITEMIDLIST pidl, LPSTR pOut, UINT uOutSize)
 {
@@ -1702,7 +1702,7 @@
 	    wAttrib = pData->u.file.uFileAttribs;
 	    break;
 	}
-	
+
 	if(uOutSize >= 6)
 	{
 	  i=0;
diff --git a/dlls/shell32/pidl.h b/dlls/shell32/pidl.h
index 0d5f6c4..37c7280 100644
--- a/dlls/shell32/pidl.h
+++ b/dlls/shell32/pidl.h
@@ -22,7 +22,7 @@
  * DO NOT use this definitions outside the shell32.dll !
  *
  * The contents of a pidl should never used from a application
- * directly. 
+ * directly.
  *
  * Undocumented:
  * MS says: the abID of SHITEMID should be treated as binary data and not
@@ -30,13 +30,13 @@
  * Word95 interprets the contents of abID (Filesize/Date) so we have to go
  * for binary compatibility here.
  */
- 
+
 #ifndef __WINE_PIDL_H
 #define __WINE_PIDL_H
 
 #include "shlobj.h"
 
-/* 
+/*
 * the pidl does cache fileattributes to speed up SHGetAttributes when
 * displaying a big number of files.
 *
@@ -62,7 +62,7 @@
 *	workgroup	0x41		network (3)
 *	computer	0x42		network (4)
 *	whole network	0x47		network (5)
-*	MSITStore	0x61		htmlhlp (7)	
+*	MSITStore	0x61		htmlhlp (7)
 *	history/favorites 0xb1		file
 *	share		0xc3		network (6)
 *
@@ -72,7 +72,7 @@
 * (2) IID_MyComputer = 20D04FE0L-3AEA-1069-A2D8-08002B30309D
 * (3) two strings	"workgroup" "microsoft network"
 * (4) one string	"\\sirius"
-* (5) one string	"whole network" 
+* (5) one string	"whole network"
 * (6) one string	"\\sirius\c"
 * (7) contains string   "mk:@MSITStore:C:\path\file.chm::/path/filename.htm"
 *		GUID	871C5380-42A0-1069-A2EA-08002B30309D
@@ -111,16 +111,16 @@
 	    DWORD dwUnknown;		/*21*/
 	    /* the drive seems to be 25 bytes every time */
 	  } drive;
-	  struct 
+	  struct
 	  { BYTE dummy;			/*01 is 0x00 for files or dirs */
 	    DWORD dwFileSize;		/*02*/
 	    WORD uFileDate;		/*06*/
 	    WORD uFileTime;		/*08*/
 	    WORD uFileAttribs;		/*10*/
 	    CHAR szNames[1];		/*12*/
-	    /* Here are comming two strings. The first is the long name. 
+	    /* Here are comming two strings. The first is the long name.
 	    The second the dos name when needed or just 0x00 */
-	  } file, folder, generic; 
+	  } file, folder, generic;
 	  struct
 	  { WORD dummy;		/*01*/
 	    CHAR szNames[1];	/*03*/
@@ -183,8 +183,8 @@
 LPSTR		_ILGetSTextPointer	(LPCITEMIDLIST);
 REFIID		_ILGetGUIDPointer	(LPCITEMIDLIST pidl);
 
-/* 
- * debug helper 
+/*
+ * debug helper
  */
 void	pdump	(LPCITEMIDLIST pidl);
 BOOL	pcheck	(LPCITEMIDLIST pidl);
diff --git a/dlls/shell32/shell.c b/dlls/shell32/shell.c
index 463ea36..0ac0903 100644
--- a/dlls/shell32/shell.c
+++ b/dlls/shell32/shell.c
@@ -125,25 +125,25 @@
 {
  	LPSTR lpDrop;
 	UINT i = 0;
-	LPDROPFILESTRUCT16 lpDropFileStruct = (LPDROPFILESTRUCT16) GlobalLock16(hDrop); 
-   
+	LPDROPFILESTRUCT16 lpDropFileStruct = (LPDROPFILESTRUCT16) GlobalLock16(hDrop);
+
 	TRACE("(%04x, %x, %p, %u)\n", hDrop,wFile,lpszFile,wLength);
-    
+
 	if(!lpDropFileStruct) goto end;
-    
+
 	lpDrop = (LPSTR) lpDropFileStruct + lpDropFileStruct->wSize;
 	wFile = (wFile==0xffff) ? 0xffffffff : wFile;
 
 	while (i++ < wFile)
 	{
 	  while (*lpDrop++); /* skip filename */
-	  if (!*lpDrop) 
+	  if (!*lpDrop)
 	  {
-	    i = (wFile == 0xFFFFFFFF) ? i : 0; 
+	    i = (wFile == 0xFFFFFFFF) ? i : 0;
 	    goto end;
 	  }
 	}
-    
+
 	i = strlen(lpDrop);
 	i++;
 	if (!lpszFile ) goto end;   /* needed buffer size */
@@ -169,14 +169,14 @@
  */
 BOOL16 WINAPI DragQueryPoint16(HDROP16 hDrop, POINT16 *p)
 {
-  LPDROPFILESTRUCT16 lpDropFileStruct;  
+  LPDROPFILESTRUCT16 lpDropFileStruct;
   BOOL16           bRet;
   TRACE("\n");
   lpDropFileStruct = (LPDROPFILESTRUCT16) GlobalLock16(hDrop);
-  
+
   memcpy(p,&lpDropFileStruct->ptMousePos,sizeof(POINT16));
   bRet = lpDropFileStruct->fInNonClientArea;
-  
+
   GlobalUnlock16(hDrop);
   return bRet;
 }
@@ -220,7 +220,7 @@
     OFSTRUCT ofs;
     HFILE hFile;
 
-	TRACE("(%04x,file %s,start %d,extract %d\n", 
+	TRACE("(%04x,file %s,start %d,extract %d\n",
 		       hInstance, lpszExeFileName, nIconIndex, n);
 
 	if( !n )
@@ -322,7 +322,7 @@
 
 /*************************************************************************
  *				ExtractAssociatedIcon	[SHELL.36]
- * 
+ *
  * Return icon for given file (either from file itself or from associated
  * executable) and patch parameters if needed.
  */
@@ -345,13 +345,13 @@
 	    if( uRet > 32 && tempPath[0] )
 	    { strcpy(lpIconPath,tempPath);
 	      hIcon = ExtractIcon16(hInst, lpIconPath, *lpiIcon);
-	      if( hIcon > 2 ) 
+	      if( hIcon > 2 )
 	        return hIcon;
 	    }
 	    else hIcon = 0;
 	  }
 
-	  if( hIcon == 1 ) 
+	  if( hIcon == 1 )
 	    *lpiIcon = 2;   /* MSDOS icon - we found .exe but no icons in it */
 	  else
 	    *lpiIcon = 6;   /* generic icon - found nothing */
@@ -364,7 +364,7 @@
 
 /*************************************************************************
  *				ExtractAssociatedIconA (SHELL32.@)
- * 
+ *
  * Return icon for given file (either from file itself or from associated
  * executable) and patch parameters if needed.
  */
@@ -375,7 +375,7 @@
 
 /*************************************************************************
  *				ExtractAssociatedIconExA (SHELL32.@)
- * 
+ *
  * Return icon for given file (either from file itself or from associated
  * executable) and patch parameters if needed.
  */
@@ -387,7 +387,7 @@
 
 /*************************************************************************
  *				ExtractAssociatedIconExW (SHELL32.@)
- * 
+ *
  * Return icon for given file (either from file itself or from associated
  * executable) and patch parameters if needed.
  */
@@ -407,9 +407,9 @@
 
   TRACE("\n");
 
-  l = strlen(entry); 
+  l = strlen(entry);
   for( ; *lpEnv ; lpEnv+=strlen(lpEnv)+1 )
-  { if( strncasecmp(lpEnv, entry, l) ) 
+  { if( strncasecmp(lpEnv, entry, l) )
       continue;
 	if( !*(lpEnv+l) )
 	    return (lpEnv + l); 		/* empty entry */
@@ -425,11 +425,11 @@
 { SEGPTR  spEnv;
   LPSTR lpEnv,lpString;
   TRACE("\n");
-    
+
   spEnv = GetDOSEnvironment16();
 
   lpEnv = MapSL(spEnv);
-  lpString = (spEnv)?SHELL_FindString(lpEnv, str):NULL; 
+  lpString = (spEnv)?SHELL_FindString(lpEnv, str):NULL;
 
     if( lpString )		/*  offset should be small enough */
 	return spEnv + (lpString - lpEnv);
@@ -463,7 +463,7 @@
 	  if( *lpend == '%' && lpend - lpstr > 1 )	/* found key */
 	    {
 	       LPSTR lpKey;
-	      *lpend = '\0';  
+	      *lpend = '\0';
 	       lpKey = SHELL_FindString(lpEnv, lpstr+1);
 	       if( lpKey )				/* found key value */
 		 {
@@ -485,7 +485,7 @@
 	  else break;					/* back off and whine */
 
 	  continue;
-       } 
+       }
 
      *lpbstr++ = *lpstr++;
    }
@@ -516,7 +516,7 @@
  */
 LRESULT WINAPI ShellHookProc16(INT16 code, WPARAM16 wParam, LPARAM lParam)
 {
-    TRACE("%i, %04x, %08x\n", code, wParam, 
+    TRACE("%i, %04x, %08x\n", code, wParam,
 						      (unsigned)lParam );
     if( SHELL_hHook && SHELL_hWnd )
     {
@@ -536,24 +536,24 @@
  *				RegisterShellHook	[SHELL.102]
  */
 BOOL WINAPI RegisterShellHook16(HWND16 hWnd, UINT16 uAction)
-{ 
+{
     TRACE("%04x [%u]\n", hWnd, uAction );
 
     switch( uAction )
-    { 
+    {
     case 2:  /* register hWnd as a shell window */
         if( !SHELL_hHook )
-        { 
+        {
             HMODULE16 hShell = GetModuleHandle16( "SHELL" );
             HOOKPROC16 hookProc = (HOOKPROC16)GetProcAddress16( hShell, (LPCSTR)103 );
             SHELL_hHook = SetWindowsHookEx16( WH_SHELL, hookProc, hShell, 0 );
             if ( SHELL_hHook )
-            { 
+            {
                 uMsgWndCreated = RegisterWindowMessageA( lpstrMsgWndCreated );
                 uMsgWndDestroyed = RegisterWindowMessageA( lpstrMsgWndDestroyed );
                 uMsgShellActivate = RegisterWindowMessageA( lpstrMsgShellActivate );
-            } 
-            else 
+            }
+            else
                 WARN("-- unable to install ShellHookProc()!\n");
         }
 
diff --git a/dlls/shell32/shell32_main.c b/dlls/shell32/shell32_main.c
index b10acd1..75adf2e 100644
--- a/dlls/shell32/shell32_main.c
+++ b/dlls/shell32/shell32_main.c
@@ -49,19 +49,19 @@
 /*************************************************************************
  * CommandLineToArgvW			[SHELL32.@]
  *
- * We must interpret the quotes in the command line to rebuild the argv 
+ * We must interpret the quotes in the command line to rebuild the argv
  * array correctly:
  * - arguments are separated by spaces or tabs
  * - quotes serve as optional argument delimiters
  *   '"a b"'   -> 'a b'
  * - escaped quotes must be converted back to '"'
  *   '\"'      -> '"'
- * - an odd number of '\'s followed by '"' correspond to half that number 
+ * - an odd number of '\'s followed by '"' correspond to half that number
  *   of '\' followed by a '"' (extension of the above)
  *   '\\\"'    -> '\"'
  *   '\\\\\"'  -> '\\"'
  * - an even number of '\'s followed by a '"' correspond to half that number
- *   of '\', plus a regular quote serving as an argument delimiter (which 
+ *   of '\', plus a regular quote serving as an argument delimiter (which
  *   means it does not appear in the result)
  *   'a\\"b c"'   -> 'a\b c'
  *   'a\\\\"b c"' -> 'a\\b c'
@@ -168,14 +168,14 @@
         } else if (*s==0x0022) {
             /* '"' */
             if ((bcount & 1)==0) {
-                /* Preceeded by an even number of '\', this is half that 
+                /* Preceeded by an even number of '\', this is half that
                  * number of '\', plus a quote which we erase.
                  */
                 d-=bcount/2;
                 in_quotes=!in_quotes;
                 s++;
             } else {
-                /* Preceeded by an odd number of '\', this is half that 
+                /* Preceeded by an odd number of '\', this is half that
                  * number of '\' followed by a '"'
                  */
                 d=d-bcount/2-1;
@@ -217,12 +217,12 @@
 	HRESULT hr = S_OK;
     BOOL IconNotYetLoaded=TRUE;
 
-	TRACE("(%s fattr=0x%lx sfi=%p(attr=0x%08lx) size=0x%x flags=0x%x)\n", 
+	TRACE("(%s fattr=0x%lx sfi=%p(attr=0x%08lx) size=0x%x flags=0x%x)\n",
 	  (flags & SHGFI_PIDL)? "pidl" : path, dwFileAttributes, psfi, psfi->dwAttributes, sizeofpsfi, flags);
 
 	if ((flags & SHGFI_USEFILEATTRIBUTES) && (flags & (SHGFI_ATTRIBUTES|SHGFI_EXETYPE|SHGFI_PIDL)))
 	  return FALSE;
-	
+
 	/* windows initializes this values regardless of the flags */
 	psfi->szDisplayName[0] = '\0';
 	psfi->szTypeName[0] = '\0';
@@ -255,14 +255,14 @@
 	 * Seek to the start of the file and read the header information.
 	 */
 
-	  SetFilePointer( hfile, 0, NULL, SEEK_SET );  
+	  SetFilePointer( hfile, 0, NULL, SEEK_SET );
 	  ReadFile( hfile, &mz_header, sizeof(mz_header), &len, NULL );
 
          SetFilePointer( hfile, mz_header.e_lfanew, NULL, SEEK_SET );
          ReadFile( hfile, magic, sizeof(magic), &len, NULL );
          if ( *(DWORD*)magic      == IMAGE_NT_SIGNATURE )
          {
-             SetFilePointer( hfile, mz_header.e_lfanew, NULL, SEEK_SET ); 
+             SetFilePointer( hfile, mz_header.e_lfanew, NULL, SEEK_SET );
              ReadFile( hfile, &nt, sizeof(nt), &len, NULL );
 	      CloseHandle( hfile );
 	      if (nt.OptionalHeader.Subsystem == IMAGE_SUBSYSTEM_WINDOWS_GUI) {
@@ -275,7 +275,7 @@
          else if ( *(WORD*)magic == IMAGE_OS2_SIGNATURE )
          {
              IMAGE_OS2_HEADER ne;
-             SetFilePointer( hfile, mz_header.e_lfanew, NULL, SEEK_SET ); 
+             SetFilePointer( hfile, mz_header.e_lfanew, NULL, SEEK_SET );
              ReadFile( hfile, &ne, sizeof(ne), &len, NULL );
 	      CloseHandle( hfile );
              if (ne.ne_exetyp == 2) return IMAGE_OS2_SIGNATURE
@@ -286,8 +286,8 @@
 	  return 0;
       }
 
-	
-	/* translate the path into a pidl only when SHGFI_USEFILEATTRIBUTES in not specified 
+
+	/* translate the path into a pidl only when SHGFI_USEFILEATTRIBUTES in not specified
 	   the pidl functions fail on not existing file names */
 	if (flags & SHGFI_PIDL)
 	{
@@ -303,13 +303,13 @@
 	  hr = SHILCreateFromPathA ( path, &pidl, &dwAttributes);
 	  /* note: the attributes in ISF::ParseDisplayName are not implemented */
 	}
-	
+
 	/* get the parent shellfolder */
 	if (pidl)
 	{
 	  hr = SHBindToParent( pidl, &IID_IShellFolder, (LPVOID*)&psfParent, &pidlLast);
 	}
-	
+
 	/* get the attributes of the child */
 	if (SUCCEEDED(hr) && (flags & SHGFI_ATTRIBUTES))
 	{
@@ -322,7 +322,7 @@
 
 	/* get the displayname */
 	if (SUCCEEDED(hr) && (flags & SHGFI_DISPLAYNAME))
-	{ 
+	{
 	  if (flags & SHGFI_USEFILEATTRIBUTES)
 	  {
 	    strcpy (psfi->szDisplayName, PathFindFileNameA(path));
@@ -378,7 +378,7 @@
 	      strcpy (psfi->szDisplayName, szLoaction);
 	    else
 	      ret = FALSE;
-	      
+
 	    IExtractIconA_Release(pei);
 	  }
 	}
@@ -416,17 +416,17 @@
             else                                  /* default icon */
             {
               psfi->iIcon = 0;
-            }          
+            }
 	  }
 	  else
 	  {
-	    if (!(PidlToSicIndex(psfParent, pidlLast, (flags & SHGFI_LARGEICON), 
+	    if (!(PidlToSicIndex(psfParent, pidlLast, (flags & SHGFI_LARGEICON),
 	      (flags & SHGFI_OPENICON)? GIL_OPENICON : 0, &(psfi->iIcon))))
 	    {
 	      ret = FALSE;
 	    }
 	  }
-	  if (ret) 
+	  if (ret)
 	  {
 	    ret = (DWORD) ((flags & SHGFI_LARGEICON) ? ShellBigIconList : ShellSmallIconList);
 	  }
@@ -447,7 +447,7 @@
 
 	if(pidlLast) SHFree(pidlLast);
 #ifdef MORE_DEBUG
-	TRACE ("icon=0x%08x index=0x%08x attr=0x%08lx name=%s type=%s ret=0x%08lx\n", 
+	TRACE ("icon=0x%08x index=0x%08x attr=0x%08lx name=%s type=%s ret=0x%08lx\n",
 		psfi->hIcon, psfi->iIcon, psfi->dwAttributes, psfi->szDisplayName, psfi->szTypeName, ret);
 #endif
 	return ret;
@@ -478,7 +478,7 @@
 	ret = SHGetFileInfoA(temppath, dwFileAttributes, &temppsfi, sizeof(temppsfi), flags);
 
 	HeapFree(GetProcessHeap(), 0, temppath);
-	
+
 	return ret;
 }
 
@@ -512,13 +512,13 @@
         hDupIcon = CreateIconIndirect(&IconInfo);
 
         /* clean up hbmMask and hbmColor */
-        DeleteObject(IconInfo.hbmMask);        
-        DeleteObject(IconInfo.hbmColor);        
+        DeleteObject(IconInfo.hbmMask);
+        DeleteObject(IconInfo.hbmColor);
     }
- 
+
     return hDupIcon;
 }
-    
+
 
 /*************************************************************************
  * ExtractIconA				[SHELL32.@]
@@ -620,7 +620,7 @@
                return TRUE;
           case ABM_SETAUTOHIDEBAR:
                SetWindowPos(data->hWnd,HWND_TOP,rec.left+1000,rec.top,
-                                       width,height,SWP_SHOWWINDOW);          
+                                       width,height,SWP_SHOWWINDOW);
                return TRUE;
           case ABM_SETPOS:
                data->uEdge=(ABE_RIGHT | ABE_LEFT);
@@ -648,7 +648,7 @@
 
 /*************************************************************************
  * SHLoadInProc				[SHELL32.@]
- * Create an instance of specified object class from within 
+ * Create an instance of specified object class from within
  * the shell process and release it immediately
  */
 
@@ -780,7 +780,7 @@
 		    else
           { char* pch = Template + strlen(Template) - strlen(__appendix_str);
 			*pch = '\0';
-			SendMessageA( GetDlgItem(hWnd, IDC_LISTBOX), LB_ADDSTRING, 
+			SendMessageA( GetDlgItem(hWnd, IDC_LISTBOX), LB_ADDSTRING,
 					(WPARAM)-1, (LPARAM)Template );
 		    }
 
@@ -844,7 +844,7 @@
     LPVOID template;
 
     TRACE("\n");
-    
+
     if(!(hRes = FindResourceA(shell32_hInstance, "SHELL_ABOUT_MSGBOX", RT_DIALOGA)))
         return FALSE;
     if(!(template = (LPVOID)LoadResource(shell32_hInstance, hRes)))
@@ -910,14 +910,14 @@
  */
 void	(WINAPI *pDLLInitComctl)(LPVOID);
 
-LPVOID	(WINAPI *pCOMCTL32_Alloc) (INT);  
-BOOL	(WINAPI *pCOMCTL32_Free) (LPVOID);  
+LPVOID	(WINAPI *pCOMCTL32_Alloc) (INT);
+BOOL	(WINAPI *pCOMCTL32_Free) (LPVOID);
 
-HDPA	(WINAPI *pDPA_Create) (INT);  
-INT	(WINAPI *pDPA_InsertPtr) (const HDPA, INT, LPVOID); 
-BOOL	(WINAPI *pDPA_Sort) (const HDPA, PFNDPACOMPARE, LPARAM); 
-LPVOID	(WINAPI *pDPA_GetPtr) (const HDPA, INT);   
-BOOL	(WINAPI *pDPA_Destroy) (const HDPA); 
+HDPA	(WINAPI *pDPA_Create) (INT);
+INT	(WINAPI *pDPA_InsertPtr) (const HDPA, INT, LPVOID);
+BOOL	(WINAPI *pDPA_Sort) (const HDPA, PFNDPACOMPARE, LPARAM);
+LPVOID	(WINAPI *pDPA_GetPtr) (const HDPA, INT);
+BOOL	(WINAPI *pDPA_Destroy) (const HDPA);
 INT	(WINAPI *pDPA_Search) (const HDPA, LPVOID, INT, PFNDPACOMPARE, LPARAM, UINT);
 LPVOID	(WINAPI *pDPA_DeletePtr) (const HDPA hdpa, INT i);
 HANDLE  (WINAPI *pCreateMRUListA) (LPVOID lpcml);
@@ -929,7 +929,7 @@
 static HINSTANCE	hComctl32;
 
 LONG		shell32_ObjCount = 0;
-HINSTANCE	shell32_hInstance = 0; 
+HINSTANCE	shell32_hInstance = 0;
 HIMAGELIST	ShellSmallIconList = 0;
 HIMAGELIST	ShellBigIconList = 0;
 
@@ -949,7 +949,7 @@
 	{
 	  case DLL_PROCESS_ATTACH:
 	    shell32_hInstance = hinstDLL;
-	    hComctl32 = GetModuleHandleA("COMCTL32.DLL");	
+	    hComctl32 = GetModuleHandleA("COMCTL32.DLL");
 	    DisableThreadLibraryCalls(shell32_hInstance);
 
 	    if (!hComctl32)
@@ -996,7 +996,7 @@
 	  case DLL_PROCESS_DETACH:
 	      shell32_hInstance = 0;
 
-	      if (pdesktopfolder) 
+	      if (pdesktopfolder)
 	      {
 	        IShellFolder_Release(pdesktopfolder);
 	        pdesktopfolder = NULL;
@@ -1004,7 +1004,7 @@
 
 	      SIC_Destroy();
 	      FreeChangeNotifications();
-	      
+
 	      /* this one is here to check if AddRef/Release is balanced */
 	      if (shell32_ObjCount)
 	      {
@@ -1019,7 +1019,7 @@
  * DllInstall         [SHELL32.@]
  *
  * PARAMETERS
- *   
+ *
  *    BOOL bInstall - TRUE for install, FALSE for uninstall
  *    LPCWSTR pszCmdLine - command line (unused by shell32?)
  */
diff --git a/dlls/shell32/shell32_main.h b/dlls/shell32/shell32_main.h
index ad859d2..0e03fc8 100644
--- a/dlls/shell32/shell32_main.h
+++ b/dlls/shell32/shell32_main.h
@@ -48,14 +48,14 @@
 */
 extern void	(WINAPI *pDLLInitComctl)(LPVOID);
 
-extern LPVOID	(WINAPI *pCOMCTL32_Alloc) (INT);  
-extern BOOL	(WINAPI *pCOMCTL32_Free) (LPVOID);  
+extern LPVOID	(WINAPI *pCOMCTL32_Alloc) (INT);
+extern BOOL	(WINAPI *pCOMCTL32_Free) (LPVOID);
 
-extern HDPA	(WINAPI *pDPA_Create) (INT);  
-extern INT	(WINAPI *pDPA_InsertPtr) (const HDPA, INT, LPVOID); 
-extern BOOL	(WINAPI *pDPA_Sort) (const HDPA, PFNDPACOMPARE, LPARAM); 
-extern LPVOID	(WINAPI *pDPA_GetPtr) (const HDPA, INT);   
-extern BOOL	(WINAPI *pDPA_Destroy) (const HDPA); 
+extern HDPA	(WINAPI *pDPA_Create) (INT);
+extern INT	(WINAPI *pDPA_InsertPtr) (const HDPA, INT, LPVOID);
+extern BOOL	(WINAPI *pDPA_Sort) (const HDPA, PFNDPACOMPARE, LPARAM);
+extern LPVOID	(WINAPI *pDPA_GetPtr) (const HDPA, INT);
+extern BOOL	(WINAPI *pDPA_Destroy) (const HDPA);
 extern INT	(WINAPI *pDPA_Search) (const HDPA, LPVOID, INT, PFNDPACOMPARE, LPARAM, UINT);
 extern LPVOID	(WINAPI *pDPA_DeletePtr) (const HDPA hdpa, INT i);
 extern HANDLE   (WINAPI *pCreateMRUListA) (LPVOID lpcml);
@@ -63,7 +63,7 @@
 extern INT      (WINAPI *pAddMRUData) (HANDLE hList, LPCVOID lpData, DWORD cbData);
 extern INT      (WINAPI *pFindMRUData) (HANDLE hList, LPCVOID lpData, DWORD cbData, LPINT lpRegNum);
 extern INT      (WINAPI *pEnumMRUListA) (HANDLE hList, INT nItemPos, LPVOID lpBuffer, DWORD nBufferSize);
-#define pDPA_GetPtrCount(hdpa)  (*(INT*)(hdpa))   
+#define pDPA_GetPtrCount(hdpa)  (*(INT*)(hdpa))
 
 /* ole2 */
 /*
@@ -113,7 +113,7 @@
 LPENUMIDLIST	IEnumIDList_Constructor(LPCSTR,DWORD,DWORD);
 
 LPEXTRACTICONA	IExtractIconA_Constructor(LPITEMIDLIST);
-HRESULT		CreateStreamOnFile (LPCSTR pszFilename, IStream ** ppstm);	
+HRESULT		CreateStreamOnFile (LPCSTR pszFilename, IStream ** ppstm);
 
 /* FIXME: rename the functions when the shell32.dll has it's own exports namespace */
 HRESULT WINAPI  SHELL32_DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID * ppv);
@@ -154,7 +154,7 @@
 void    (WINAPI *pOleUninitialize)(void);
 HRESULT (WINAPI *pRegisterDragDrop)(HWND hwnd, IDropTarget* pDropTarget);
 HRESULT (WINAPI *pRevokeDragDrop)(HWND hwnd);
-HRESULT (WINAPI *pDoDragDrop)(LPDATAOBJECT,LPDROPSOURCE,DWORD,DWORD*); 
+HRESULT (WINAPI *pDoDragDrop)(LPDATAOBJECT,LPDROPSOURCE,DWORD,DWORD*);
 void 	(WINAPI *pReleaseStgMedium)(STGMEDIUM* pmedium);
 HRESULT (WINAPI *pOleSetClipboard)(IDataObject* pDataObj);
 HRESULT (WINAPI *pOleGetClipboard)(IDataObject** ppDataObj);
diff --git a/dlls/shell32/shelllink.c b/dlls/shell32/shelllink.c
index 1f5097d..1689e49 100644
--- a/dlls/shell32/shelllink.c
+++ b/dlls/shell32/shelllink.c
@@ -59,7 +59,7 @@
 #define	MAXIMIZED	0x03
 #define	MINIMIZED	0x07
 
-typedef struct _LINK_HEADER	
+typedef struct _LINK_HEADER
 {	DWORD	MagicStr;	/* 0x00 'L','\0','\0','\0' */
 	GUID	MagicGuid;	/* 0x04 is CLSID_ShellLink */
 	DWORD	Flag1;		/* 0x14 describes elements following */
@@ -142,10 +142,10 @@
 	ICOM_VTABLE(IShellLinkW)*	lpvtblw;
 	ICOM_VTABLE(IPersistFile)*	lpvtblPersistFile;
 	ICOM_VTABLE(IPersistStream)*	lpvtblPersistStream;
-	
+
 	/* internal stream of the IPersistFile interface */
 	IStream*			lpFileStream;
-	
+
 	/* data structures according to the informations in the lnk */
 	LPSTR		sPath;
 	LPITEMIDLIST	pPidl;
@@ -241,11 +241,11 @@
 	HRESULT		hRet = E_FAIL;
 
 	TRACE("(%p, %s)\n",This, sFile);
-	
+
 
 	if (This->lpFileStream)
 	  IStream_Release(This->lpFileStream);
-	
+
 	if SUCCEEDED(CreateStreamOnFile(sFile, &(This->lpFileStream)))
 	{
 	  if SUCCEEDED (IPersistStream_Load(StreamThis, This->lpFileStream))
@@ -253,7 +253,7 @@
 	    return NOERROR;
 	  }
 	}
-	
+
 	return hRet;
 }
 
@@ -356,7 +356,7 @@
 static BOOL CALLBACK EnumResNameProc(HANDLE hModule, const char *lpszType, char *lpszName, LONG lParam)
 {
     ENUMRESSTRUCT *sEnumRes = (ENUMRESSTRUCT *) lParam;
-    
+
     if (!sEnumRes->nIndex--)
     {
       *sEnumRes->pResInfo = FindResourceA(hModule, lpszName, RT_GROUP_ICONA);
@@ -647,7 +647,7 @@
     if (This->sWorkDir) work_dir = get_unix_file_name( This->sWorkDir );
 
     /* extract the icon */
-    if (!(icon_name = extract_icon( This->sIcoPath && strlen(This->sIcoPath) ? 
+    if (!(icon_name = extract_icon( This->sIcoPath && strlen(This->sIcoPath) ?
                                       This->sIcoPath : This->sPath,
                                       This->iIcoNdx )))
     {
@@ -752,7 +752,7 @@
 	return NOERROR;
 }
 
-static ICOM_VTABLE(IPersistFile) pfvt = 
+static ICOM_VTABLE(IPersistFile) pfvt =
 {
 	ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
 	IPersistFile_fnQueryInterface,
@@ -805,7 +805,7 @@
 	TRACE("(%p)\n",This);
 
 	return IShellLinkA_AddRef((IShellLinkA*)This);
-} 
+}
 
 /************************************************************************
  * IPersistStream_GetClassID
@@ -851,7 +851,7 @@
 	ULONG	dwBytesRead;
 	DWORD	ret = E_FAIL;
 	char	sTemp[MAX_PATH];
-	
+
 	_ICOM_THIS_From_IPersistStream(IShellLinkImpl, iface);
 
 	TRACE("(%p)(%p)\n", This, pLoadStream);
@@ -860,7 +860,7 @@
 	{
 	  return STG_E_INVALIDPOINTER;
 	}
-	
+
 	IStream_AddRef (pLoadStream);
 	if(lpLinkHeader)
 	{
@@ -874,7 +874,7 @@
 	        if (SUCCEEDED(IStream_Read(pLoadStream, &(lpLinkHeader->Pidl), lpLinkHeader->PidlSize, &dwBytesRead)))
 	        {
 	          if (pcheck (&lpLinkHeader->Pidl))
-	          {	
+	          {
 	            This->pPidl = ILClone (&lpLinkHeader->Pidl);
 
 	            SHGetPathFromIDListA(&lpLinkHeader->Pidl, sTemp);
@@ -892,7 +892,7 @@
 		  GetDateFormatA(LOCALE_USER_DEFAULT,DATE_SHORTDATE,&This->time3, NULL, sTemp, 256);
 		  TRACE("-- time1: %s\n", sTemp);
 		  pdump (This->pPidl);
-#endif		  
+#endif
 		  ret = S_OK;
 	        }
 	      }
@@ -907,7 +907,7 @@
 	IStream_Release (pLoadStream);
 
 	pdump(This->pPidl);
-	
+
 	HeapFree(GetProcessHeap(), 0, lpLinkHeader);
 
 	return ret;
@@ -922,7 +922,7 @@
 	BOOL             fClearDirty)
 {
 	_ICOM_THIS_From_IPersistStream(IShellLinkImpl, iface);
-	
+
 	TRACE("(%p) %p %x\n", This, pOutStream, fClearDirty);
 
 	return E_NOTIMPL;
@@ -936,7 +936,7 @@
 	ULARGE_INTEGER*  pcbSize)
 {
 	_ICOM_THIS_From_IPersistStream(IShellLinkImpl, iface);
-	
+
 	TRACE("(%p)\n", This);
 
 	return E_NOTIMPL;
@@ -958,7 +958,7 @@
 /**************************************************************************
  *	  IShellLink_Constructor
  */
-IShellLinkA * IShellLink_Constructor(BOOL bUnicode) 
+IShellLinkA * IShellLink_Constructor(BOOL bUnicode)
 {	IShellLinkImpl * sl;
 
 	sl = (IShellLinkImpl *)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IShellLinkImpl));
@@ -967,7 +967,7 @@
 	sl->lpvtblw = &slvtw;
 	sl->lpvtblPersistFile = &pfvt;
 	sl->lpvtblPersistStream = &psvt;
-	
+
 	TRACE("(%p)->()\n",sl);
 	shell32_ObjCount++;
 	return bUnicode ? (IShellLinkA *) &(sl->lpvtblw) : (IShellLinkA *)sl;
@@ -979,7 +979,7 @@
 static HRESULT WINAPI IShellLinkA_fnQueryInterface( IShellLinkA * iface, REFIID riid,  LPVOID *ppvObj)
 {
 	ICOM_THIS(IShellLinkImpl, iface);
-	
+
 	TRACE("(%p)->(\n\tIID:\t%s)\n",This,debugstr_guid(riid));
 
 	*ppvObj = NULL;
@@ -988,11 +988,11 @@
 	   IsEqualIID(riid, &IID_IShellLinkA))
 	{
 	  *ppvObj = This;
-	}   
+	}
 	else if(IsEqualIID(riid, &IID_IShellLinkW))
 	{
 	  *ppvObj = (IShellLinkW *)&(This->lpvtblw);
-	}   
+	}
 	else if(IsEqualIID(riid, &IID_IPersistFile))
 	{
 	  *ppvObj = (IPersistFile *)&(This->lpvtblPersistFile);
@@ -1000,7 +1000,7 @@
 	else if(IsEqualIID(riid, &IID_IPersistStream))
 	{
 	  *ppvObj = (IPersistStream *)&(This->lpvtblPersistStream);
-	}   
+	}
 
 	if(*ppvObj)
 	{
@@ -1010,14 +1010,14 @@
 	}
 	TRACE("-- Interface: E_NOINTERFACE\n");
 	return E_NOINTERFACE;
-}  
+}
 /******************************************************************************
  * IShellLinkA_AddRef
  */
 static ULONG WINAPI IShellLinkA_fnAddRef(IShellLinkA * iface)
 {
 	ICOM_THIS(IShellLinkImpl, iface);
-	
+
 	TRACE("(%p)->(count=%lu)\n",This,This->ref);
 
 	shell32_ObjCount++;
@@ -1029,22 +1029,22 @@
 static ULONG WINAPI IShellLinkA_fnRelease(IShellLinkA * iface)
 {
 	ICOM_THIS(IShellLinkImpl, iface);
-	
+
 	TRACE("(%p)->(count=%lu)\n",This,This->ref);
 
 	shell32_ObjCount--;
-	if (!--(This->ref)) 
+	if (!--(This->ref))
 	{ TRACE("-- destroying IShellLink(%p)\n",This);
-	
+
 	  if (This->sIcoPath)
 	    HeapFree(GetProcessHeap(), 0, This->sIcoPath);
-	    
+
 	  if (This->sArgs)
 	    HeapFree(GetProcessHeap(), 0, This->sArgs);
 
 	  if (This->sWorkDir)
 	    HeapFree(GetProcessHeap(), 0, This->sWorkDir);
-	    
+
 	  if (This->sDescription)
 	    HeapFree(GetProcessHeap(), 0, This->sDescription);
 
@@ -1056,7 +1056,7 @@
 
 	  if (This->lpFileStream)
 	    IStream_Release(This->lpFileStream);
-	
+
 	  This->iIcoNdx = 0;
 
 	  HeapFree(GetProcessHeap(),0,This);
@@ -1068,7 +1068,7 @@
 static HRESULT WINAPI IShellLinkA_fnGetPath(IShellLinkA * iface, LPSTR pszFile,INT cchMaxPath, WIN32_FIND_DATAA *pfd, DWORD fFlags)
 {
 	ICOM_THIS(IShellLinkImpl, iface);
-	
+
 	TRACE("(%p)->(pfile=%p len=%u find_data=%p flags=%lu)(%s)\n",This, pszFile, cchMaxPath, pfd, fFlags, debugstr_a(This->sPath));
 
 	if (This->sPath)
@@ -1081,7 +1081,7 @@
 static HRESULT WINAPI IShellLinkA_fnGetIDList(IShellLinkA * iface, LPITEMIDLIST * ppidl)
 {
 	ICOM_THIS(IShellLinkImpl, iface);
-	
+
 	TRACE("(%p)->(ppidl=%p)\n",This, ppidl);
 
 	*ppidl = ILClone(This->pPidl);
@@ -1090,7 +1090,7 @@
 static HRESULT WINAPI IShellLinkA_fnSetIDList(IShellLinkA * iface, LPCITEMIDLIST pidl)
 {
 	ICOM_THIS(IShellLinkImpl, iface);
-	
+
 	TRACE("(%p)->(pidl=%p)\n",This, pidl);
 
 	if (This->pPidl)
@@ -1101,7 +1101,7 @@
 static HRESULT WINAPI IShellLinkA_fnGetDescription(IShellLinkA * iface, LPSTR pszName,INT cchMaxName)
 {
 	ICOM_THIS(IShellLinkImpl, iface);
-	
+
 	FIXME("(%p)->(%p len=%u)\n",This, pszName, cchMaxName);
 	lstrcpynA(pszName,"Description, FIXME",cchMaxName);
 	return NOERROR;
@@ -1109,7 +1109,7 @@
 static HRESULT WINAPI IShellLinkA_fnSetDescription(IShellLinkA * iface, LPCSTR pszName)
 {
 	ICOM_THIS(IShellLinkImpl, iface);
-	
+
 	TRACE("(%p)->(pName=%s)\n", This, pszName);
 
 	if (This->sDescription)
@@ -1122,7 +1122,7 @@
 static HRESULT WINAPI IShellLinkA_fnGetWorkingDirectory(IShellLinkA * iface, LPSTR pszDir,INT cchMaxPath)
 {
 	ICOM_THIS(IShellLinkImpl, iface);
-	
+
 	TRACE("(%p)->(%p len=%u)\n", This, pszDir, cchMaxPath);
 
 	lstrcpynA( pszDir, This->sWorkDir ? This->sWorkDir : "", cchMaxPath );
@@ -1132,7 +1132,7 @@
 static HRESULT WINAPI IShellLinkA_fnSetWorkingDirectory(IShellLinkA * iface, LPCSTR pszDir)
 {
 	ICOM_THIS(IShellLinkImpl, iface);
-	
+
 	TRACE("(%p)->(dir=%s)\n",This, pszDir);
 
 	if (This->sWorkDir)
@@ -1145,7 +1145,7 @@
 static HRESULT WINAPI IShellLinkA_fnGetArguments(IShellLinkA * iface, LPSTR pszArgs,INT cchMaxPath)
 {
 	ICOM_THIS(IShellLinkImpl, iface);
-	
+
 	TRACE("(%p)->(%p len=%u)\n", This, pszArgs, cchMaxPath);
 
 	lstrcpynA( pszArgs, This->sArgs ? This->sArgs : "", cchMaxPath );
@@ -1155,7 +1155,7 @@
 static HRESULT WINAPI IShellLinkA_fnSetArguments(IShellLinkA * iface, LPCSTR pszArgs)
 {
 	ICOM_THIS(IShellLinkImpl, iface);
-	
+
 	TRACE("(%p)->(args=%s)\n",This, pszArgs);
 
 	if (This->sArgs)
@@ -1168,7 +1168,7 @@
 static HRESULT WINAPI IShellLinkA_fnGetHotkey(IShellLinkA * iface, WORD *pwHotkey)
 {
 	ICOM_THIS(IShellLinkImpl, iface);
-	
+
 	TRACE("(%p)->(%p)(0x%08x)\n",This, pwHotkey, This->wHotKey);
 
 	*pwHotkey = This->wHotKey;
@@ -1178,9 +1178,9 @@
 static HRESULT WINAPI IShellLinkA_fnSetHotkey(IShellLinkA * iface, WORD wHotkey)
 {
 	ICOM_THIS(IShellLinkImpl, iface);
-	
+
 	TRACE("(%p)->(hotkey=%x)\n",This, wHotkey);
-	
+
 	This->wHotKey = wHotkey;
 
 	return NOERROR;
@@ -1188,7 +1188,7 @@
 static HRESULT WINAPI IShellLinkA_fnGetShowCmd(IShellLinkA * iface, INT *piShowCmd)
 {
 	ICOM_THIS(IShellLinkImpl, iface);
-	
+
 	FIXME("(%p)->(%p)\n",This, piShowCmd);
 	*piShowCmd=0;
 	return NOERROR;
@@ -1196,14 +1196,14 @@
 static HRESULT WINAPI IShellLinkA_fnSetShowCmd(IShellLinkA * iface, INT iShowCmd)
 {
 	ICOM_THIS(IShellLinkImpl, iface);
-	
+
 	FIXME("(%p)->(showcmd=%x)\n",This, iShowCmd);
 	return NOERROR;
 }
 static HRESULT WINAPI IShellLinkA_fnGetIconLocation(IShellLinkA * iface, LPSTR pszIconPath,INT cchIconPath,INT *piIcon)
 {
 	ICOM_THIS(IShellLinkImpl, iface);
-	
+
 	TRACE("(%p)->(%p len=%u iicon=%p)\n", This, pszIconPath, cchIconPath, piIcon);
 
 	lstrcpynA( pszIconPath, This->sIcoPath ? This->sIcoPath : "", cchIconPath );
@@ -1214,42 +1214,42 @@
 static HRESULT WINAPI IShellLinkA_fnSetIconLocation(IShellLinkA * iface, LPCSTR pszIconPath,INT iIcon)
 {
 	ICOM_THIS(IShellLinkImpl, iface);
-	
+
 	TRACE("(%p)->(path=%s iicon=%u)\n",This, pszIconPath, iIcon);
-	
+
 	if (This->sIcoPath)
 	    HeapFree(GetProcessHeap(), 0, This->sIcoPath);
 	if (!(This->sIcoPath = heap_strdup(pszIconPath)))
-	    return E_OUTOFMEMORY;	
+	    return E_OUTOFMEMORY;
 	This->iIcoNdx = iIcon;
-	
+
 	return NOERROR;
 }
 static HRESULT WINAPI IShellLinkA_fnSetRelativePath(IShellLinkA * iface, LPCSTR pszPathRel, DWORD dwReserved)
 {
 	ICOM_THIS(IShellLinkImpl, iface);
-	
+
 	FIXME("(%p)->(path=%s %lx)\n",This, pszPathRel, dwReserved);
 	return NOERROR;
 }
 static HRESULT WINAPI IShellLinkA_fnResolve(IShellLinkA * iface, HWND hwnd, DWORD fFlags)
 {
 	ICOM_THIS(IShellLinkImpl, iface);
-	
+
 	FIXME("(%p)->(hwnd=%x flags=%lx)\n",This, hwnd, fFlags);
 	return NOERROR;
 }
 static HRESULT WINAPI IShellLinkA_fnSetPath(IShellLinkA * iface, LPCSTR pszFile)
 {
 	ICOM_THIS(IShellLinkImpl, iface);
-	
+
 	TRACE("(%p)->(path=%s)\n",This, pszFile);
 
 	if (This->sPath)
 	    HeapFree(GetProcessHeap(), 0, This->sPath);
 	if (!(This->sPath = heap_strdup(pszFile)))
 	    return E_OUTOFMEMORY;
-	
+
 	return NOERROR;
 }
 
@@ -1257,8 +1257,8 @@
 * IShellLink Implementation
 */
 
-static ICOM_VTABLE(IShellLinkA) slvt = 
-{	
+static ICOM_VTABLE(IShellLinkA) slvt =
+{
 	ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
 	IShellLinkA_fnQueryInterface,
 	IShellLinkA_fnAddRef,
@@ -1291,7 +1291,7 @@
   IShellLinkW * iface, REFIID riid, LPVOID *ppvObj)
 {
 	_ICOM_THIS_From_IShellLinkW(IShellLinkImpl, iface);
-	
+
 	return IShellLinkA_QueryInterface((IShellLinkA*)This, riid, ppvObj);
 }
 
@@ -1301,7 +1301,7 @@
 static ULONG WINAPI IShellLinkW_fnAddRef(IShellLinkW * iface)
 {
 	_ICOM_THIS_From_IShellLinkW(IShellLinkImpl, iface);
-	
+
 	TRACE("(%p)->(count=%lu)\n",This,This->ref);
 
 	return IShellLinkA_AddRef((IShellLinkA*)This);
@@ -1313,7 +1313,7 @@
 static ULONG WINAPI IShellLinkW_fnRelease(IShellLinkW * iface)
 {
 	_ICOM_THIS_From_IShellLinkW(IShellLinkImpl, iface);
-	
+
 	TRACE("(%p)->(count=%lu)\n",This,This->ref);
 
 	return IShellLinkA_Release((IShellLinkA*)This);
@@ -1322,7 +1322,7 @@
 static HRESULT WINAPI IShellLinkW_fnGetPath(IShellLinkW * iface, LPWSTR pszFile,INT cchMaxPath, WIN32_FIND_DATAA *pfd, DWORD fFlags)
 {
 	_ICOM_THIS_From_IShellLinkW(IShellLinkImpl, iface);
-	
+
 	FIXME("(%p)->(pfile=%p len=%u find_data=%p flags=%lu)\n",This, pszFile, cchMaxPath, pfd, fFlags);
         MultiByteToWideChar( CP_ACP, 0, "c:\\foo.bar", -1, pszFile, cchMaxPath );
 	return NOERROR;
@@ -1331,7 +1331,7 @@
 static HRESULT WINAPI IShellLinkW_fnGetIDList(IShellLinkW * iface, LPITEMIDLIST * ppidl)
 {
 	_ICOM_THIS_From_IShellLinkW(IShellLinkImpl, iface);
-	
+
 	FIXME("(%p)->(ppidl=%p)\n",This, ppidl);
 	*ppidl = _ILCreateDesktop();
 	return NOERROR;
@@ -1340,7 +1340,7 @@
 static HRESULT WINAPI IShellLinkW_fnSetIDList(IShellLinkW * iface, LPCITEMIDLIST pidl)
 {
 	_ICOM_THIS_From_IShellLinkW(IShellLinkImpl, iface);
-	
+
 	FIXME("(%p)->(pidl=%p)\n",This, pidl);
 	return NOERROR;
 }
@@ -1348,7 +1348,7 @@
 static HRESULT WINAPI IShellLinkW_fnGetDescription(IShellLinkW * iface, LPWSTR pszName,INT cchMaxName)
 {
 	_ICOM_THIS_From_IShellLinkW(IShellLinkImpl, iface);
-	
+
 	FIXME("(%p)->(%p len=%u)\n",This, pszName, cchMaxName);
         MultiByteToWideChar( CP_ACP, 0, "Description, FIXME", -1, pszName, cchMaxName );
 	return NOERROR;
@@ -1357,21 +1357,21 @@
 static HRESULT WINAPI IShellLinkW_fnSetDescription(IShellLinkW * iface, LPCWSTR pszName)
 {
 	_ICOM_THIS_From_IShellLinkW(IShellLinkImpl, iface);
-	
+
 	TRACE("(%p)->(desc=%s)\n",This, debugstr_w(pszName));
 
 	if (This->sDescription)
 	    HeapFree(GetProcessHeap(), 0, This->sDescription);
 	if (!(This->sDescription = HEAP_strdupWtoA(GetProcessHeap(), 0, pszName)))
 	    return E_OUTOFMEMORY;
-		
+
 	return NOERROR;
 }
 
 static HRESULT WINAPI IShellLinkW_fnGetWorkingDirectory(IShellLinkW * iface, LPWSTR pszDir,INT cchMaxPath)
 {
 	_ICOM_THIS_From_IShellLinkW(IShellLinkImpl, iface);
-	
+
 	TRACE("(%p)->(%p len %u)\n", This, pszDir, cchMaxPath);
 
 	MultiByteToWideChar( CP_ACP, 0, This->sWorkDir ? This->sWorkDir : "", -1, pszDir, cchMaxPath );
@@ -1382,7 +1382,7 @@
 static HRESULT WINAPI IShellLinkW_fnSetWorkingDirectory(IShellLinkW * iface, LPCWSTR pszDir)
 {
 	_ICOM_THIS_From_IShellLinkW(IShellLinkImpl, iface);
-	
+
 	TRACE("(%p)->(dir=%s)\n",This, debugstr_w(pszDir));
 
 	if (This->sWorkDir)
@@ -1396,7 +1396,7 @@
 static HRESULT WINAPI IShellLinkW_fnGetArguments(IShellLinkW * iface, LPWSTR pszArgs,INT cchMaxPath)
 {
 	_ICOM_THIS_From_IShellLinkW(IShellLinkImpl, iface);
-	
+
 	TRACE("(%p)->(%p len=%u)\n", This, pszArgs, cchMaxPath);
 
 	MultiByteToWideChar( CP_ACP, 0, This->sArgs ? This->sArgs : "", -1, pszArgs, cchMaxPath );
@@ -1407,21 +1407,21 @@
 static HRESULT WINAPI IShellLinkW_fnSetArguments(IShellLinkW * iface, LPCWSTR pszArgs)
 {
 	_ICOM_THIS_From_IShellLinkW(IShellLinkImpl, iface);
-	
+
 	TRACE("(%p)->(args=%s)\n",This, debugstr_w(pszArgs));
-	
+
 	if (This->sArgs)
 	    HeapFree(GetProcessHeap(), 0, This->sArgs);
 	if (!(This->sArgs = HEAP_strdupWtoA(GetProcessHeap(), 0, pszArgs)))
 	    return E_OUTOFMEMORY;
-	
+
 	return NOERROR;
 }
 
 static HRESULT WINAPI IShellLinkW_fnGetHotkey(IShellLinkW * iface, WORD *pwHotkey)
 {
 	_ICOM_THIS_From_IShellLinkW(IShellLinkImpl, iface);
-	
+
 	FIXME("(%p)->(%p)\n",This, pwHotkey);
 	*pwHotkey=0x0;
 	return NOERROR;
@@ -1430,7 +1430,7 @@
 static HRESULT WINAPI IShellLinkW_fnSetHotkey(IShellLinkW * iface, WORD wHotkey)
 {
 	_ICOM_THIS_From_IShellLinkW(IShellLinkImpl, iface);
-	
+
 	FIXME("(%p)->(hotkey=%x)\n",This, wHotkey);
 	return NOERROR;
 }
@@ -1438,7 +1438,7 @@
 static HRESULT WINAPI IShellLinkW_fnGetShowCmd(IShellLinkW * iface, INT *piShowCmd)
 {
 	_ICOM_THIS_From_IShellLinkW(IShellLinkImpl, iface);
-	
+
 	FIXME("(%p)->(%p)\n",This, piShowCmd);
 	*piShowCmd=0;
 	return NOERROR;
@@ -1447,7 +1447,7 @@
 static HRESULT WINAPI IShellLinkW_fnSetShowCmd(IShellLinkW * iface, INT iShowCmd)
 {
 	_ICOM_THIS_From_IShellLinkW(IShellLinkImpl, iface);
-	
+
 	FIXME("(%p)->(showcmd=%x)\n",This, iShowCmd);
 	return NOERROR;
 }
@@ -1455,7 +1455,7 @@
 static HRESULT WINAPI IShellLinkW_fnGetIconLocation(IShellLinkW * iface, LPWSTR pszIconPath,INT cchIconPath,INT *piIcon)
 {
 	_ICOM_THIS_From_IShellLinkW(IShellLinkImpl, iface);
-	
+
 	TRACE("(%p)->(%p len=%u iicon=%p)\n", This, pszIconPath, cchIconPath, piIcon);
 
         MultiByteToWideChar( CP_ACP, 0, This->sIcoPath ? This->sIcoPath : "", -1, pszIconPath, cchIconPath );
@@ -1467,13 +1467,13 @@
 static HRESULT WINAPI IShellLinkW_fnSetIconLocation(IShellLinkW * iface, LPCWSTR pszIconPath,INT iIcon)
 {
 	_ICOM_THIS_From_IShellLinkW(IShellLinkImpl, iface);
-	
+
 	TRACE("(%p)->(path=%s iicon=%u)\n",This, debugstr_w(pszIconPath), iIcon);
 
 	if (This->sIcoPath)
 	    HeapFree(GetProcessHeap(), 0, This->sIcoPath);
 	if (!(This->sIcoPath = HEAP_strdupWtoA(GetProcessHeap(), 0, pszIconPath)))
-	    return E_OUTOFMEMORY;	
+	    return E_OUTOFMEMORY;
 	This->iIcoNdx = iIcon;
 
 	return NOERROR;
@@ -1482,7 +1482,7 @@
 static HRESULT WINAPI IShellLinkW_fnSetRelativePath(IShellLinkW * iface, LPCWSTR pszPathRel, DWORD dwReserved)
 {
 	_ICOM_THIS_From_IShellLinkW(IShellLinkImpl, iface);
-	
+
 	FIXME("(%p)->(path=%s %lx)\n",This, debugstr_w(pszPathRel), dwReserved);
 	return NOERROR;
 }
@@ -1490,7 +1490,7 @@
 static HRESULT WINAPI IShellLinkW_fnResolve(IShellLinkW * iface, HWND hwnd, DWORD fFlags)
 {
 	_ICOM_THIS_From_IShellLinkW(IShellLinkImpl, iface);
-	
+
 	FIXME("(%p)->(hwnd=%x flags=%lx)\n",This, hwnd, fFlags);
 	return NOERROR;
 }
@@ -1498,14 +1498,14 @@
 static HRESULT WINAPI IShellLinkW_fnSetPath(IShellLinkW * iface, LPCWSTR pszFile)
 {
 	_ICOM_THIS_From_IShellLinkW(IShellLinkImpl, iface);
-	
+
 	TRACE("(%p)->(path=%s)\n",This, debugstr_w(pszFile));
-	
+
 	if (This->sPath)
 	    HeapFree(GetProcessHeap(), 0, This->sPath);
 	if (!(This->sPath = HEAP_strdupWtoA(GetProcessHeap(), 0, pszFile)))
-	    return E_OUTOFMEMORY;	
-	
+	    return E_OUTOFMEMORY;
+
 	return NOERROR;
 }
 
@@ -1513,8 +1513,8 @@
 * IShellLinkW Implementation
 */
 
-static ICOM_VTABLE(IShellLinkW) slvtw = 
-{	
+static ICOM_VTABLE(IShellLinkW) slvtw =
+{
 	ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
 	IShellLinkW_fnQueryInterface,
 	IShellLinkW_fnAddRef,
diff --git a/dlls/shell32/shellole.c b/dlls/shell32/shellole.c
index 383fd1b..5158053 100644
--- a/dlls/shell32/shellole.c
+++ b/dlls/shell32/shellole.c
@@ -49,7 +49,7 @@
 
 /*************************************************************************
  * SHCoCreateInstance [SHELL32.102]
- * 
+ *
  * NOTES
  *     exported by ordinal
  */
@@ -63,7 +63,7 @@
 	DWORD	hres;
 	IID	iid;
 	CLSID * myclsid = (CLSID*)clsid;
-	
+
 	if (!clsid)
 	{
 	  if (!aclsid) return REGDB_E_CLASSNOTREG;
@@ -83,7 +83,7 @@
 	  CoInitialize(NULL);
 	  hres = CoCreateInstance(myclsid, unknownouter, CLSCTX_INPROC_SERVER, refiid, ppv);
 	}
-	
+
 	if(hres!=S_OK)
 	{
 	  ERR("failed (0x%08lx) to create \n\tCLSID:\t%s\n\tIID:\t%s\n",
@@ -103,15 +103,15 @@
 	LPCLASSFACTORY lpclf;
 
 	TRACE("\n\tCLSID:\t%s,\n\tIID:\t%s\n",debugstr_guid(rclsid),debugstr_guid(iid));
-	
+
 	*ppv = NULL;
 
-	if(IsEqualCLSID(rclsid, &CLSID_ShellDesktop)|| 
+	if(IsEqualCLSID(rclsid, &CLSID_ShellDesktop)||
 	   IsEqualCLSID(rclsid, &CLSID_ShellLink))
 	{
 	  lpclf = IClassFactory_Constructor( rclsid );
 
-	  if(lpclf) 
+	  if(lpclf)
 	  {
 	    hres = IClassFactory_QueryInterface(lpclf,iid, ppv);
 	    IClassFactory_Release(lpclf);
@@ -143,7 +143,7 @@
 DWORD WINAPI SHCLSIDFromStringW (LPWSTR clsid, CLSID *id)
 {
 	TRACE("(%p(%s) %p)\n", clsid, debugstr_w(clsid), id);
-	return CLSIDFromString(clsid, id); 
+	return CLSIDFromString(clsid, id);
 }
 DWORD WINAPI SHCLSIDFromStringAW (LPVOID clsid, CLSID *id)
 {
@@ -162,7 +162,7 @@
  * What we are currently doing is not very wrong, since we always use the same
  * heap (ProcessHeap).
  */
-DWORD WINAPI SHGetMalloc(LPMALLOC *lpmal) 
+DWORD WINAPI SHGetMalloc(LPMALLOC *lpmal)
 {
 	TRACE("(%p)\n", lpmal);
 	return CoGetMalloc(MEMCTX_TASK, lpmal);
@@ -181,17 +181,17 @@
 
 	*psf=NULL;
 
-	if (!pdesktopfolder) 
+	if (!pdesktopfolder)
 	{
 	  lpclf = IClassFactory_Constructor(&CLSID_ShellDesktop);
-	  if(lpclf) 
+	  if(lpclf)
 	  {
 	    hres = IClassFactory_CreateInstance(lpclf,NULL,(REFIID)&IID_IShellFolder, (void*)&pdesktopfolder);
 	    IClassFactory_Release(lpclf);
-	  }  
+	  }
 	}
-	
-	if (pdesktopfolder) 
+
+	if (pdesktopfolder)
 	{
 	  /* even if we create the folder, add a ref so the application can´t destroy the folder*/
 	  IShellFolder_AddRef(pdesktopfolder);
@@ -245,20 +245,20 @@
 	*ppvObj = NULL;
 
 	if(IsEqualIID(riid, &IID_IUnknown))          /*IUnknown*/
-	{ *ppvObj = This; 
+	{ *ppvObj = This;
 	}
 	else if(IsEqualIID(riid, &IID_IClassFactory))  /*IClassFactory*/
 	{ *ppvObj = (IClassFactory*)This;
-	}   
+	}
 
 	if(*ppvObj)
-	{ IUnknown_AddRef((LPUNKNOWN)*ppvObj);  	
+	{ IUnknown_AddRef((LPUNKNOWN)*ppvObj);
 	  TRACE("-- Interface: (%p)->(%p)\n",ppvObj,*ppvObj);
 	  return S_OK;
 	}
 	TRACE("-- Interface: %s E_NOINTERFACE\n", debugstr_guid(riid));
 	return E_NOINTERFACE;
-}  
+}
 /******************************************************************************
  * IClassFactory_AddRef
  */
@@ -279,7 +279,7 @@
 	TRACE("(%p)->(count=%lu)\n",This,This->ref);
 
 	InterlockedDecrement(&shell32_ObjCount);
-	if (!InterlockedDecrement(&This->ref)) 
+	if (!InterlockedDecrement(&This->ref))
 	{
 	  TRACE("-- destroying IClassFactory(%p)\n",This);
 	  HeapFree(GetProcessHeap(),0,This);
@@ -300,7 +300,7 @@
 	TRACE("%p->(%p,\n\tIID:\t%s,%p)\n",This,pUnknown,debugstr_guid(riid),ppObject);
 
 	*ppObject = NULL;
-		
+
 	if(pUnknown)
 	{
 	  return(CLASS_E_NOAGGREGATION);
@@ -313,18 +313,18 @@
 	else if (IsEqualCLSID(This->rclsid, &CLSID_ShellLink))
 	{
 	  pObj = (IUnknown *)IShellLink_Constructor(FALSE);
-	} 
+	}
 	else
 	{
 	  ERR("unknown IID requested\n\tIID:\t%s\n",debugstr_guid(riid));
 	  return(E_NOINTERFACE);
 	}
-	
+
 	if (!pObj)
 	{
 	  return(E_OUTOFMEMORY);
 	}
-	 
+
 	hres = IUnknown_QueryInterface(pObj,riid, ppObject);
 	IUnknown_Release(pObj);
 
@@ -342,7 +342,7 @@
 	return E_NOTIMPL;
 }
 
-static ICOM_VTABLE(IClassFactory) clfvt = 
+static ICOM_VTABLE(IClassFactory) clfvt =
 {
     ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
     IClassFactory_fnQueryInterface,
@@ -410,20 +410,20 @@
 	*ppvObj = NULL;
 
 	if(IsEqualIID(riid, &IID_IUnknown))          /*IUnknown*/
-	{ *ppvObj = This; 
+	{ *ppvObj = This;
 	}
 	else if(IsEqualIID(riid, &IID_IClassFactory))  /*IClassFactory*/
 	{ *ppvObj = (IClassFactory*)This;
-	}   
+	}
 
 	if(*ppvObj)
-	{ IUnknown_AddRef((LPUNKNOWN)*ppvObj);  	
+	{ IUnknown_AddRef((LPUNKNOWN)*ppvObj);
 	  TRACE("-- Interface: (%p)->(%p)\n",ppvObj,*ppvObj);
 	  return S_OK;
 	}
 	TRACE("-- Interface: %s E_NOINTERFACE\n", debugstr_guid(riid));
 	return E_NOINTERFACE;
-}  
+}
 /******************************************************************************
  * IDefClF_fnAddRef
  */
@@ -445,8 +445,8 @@
 
 	InterlockedDecrement(&shell32_ObjCount);
 
-	if (!InterlockedDecrement(&This->ref)) 
-	{ 
+	if (!InterlockedDecrement(&This->ref))
+	{
 	  if (This->pcRefDll) InterlockedDecrement(This->pcRefDll);
 
 	  TRACE("-- destroying IClassFactory(%p)\n",This);
@@ -466,7 +466,7 @@
 	TRACE("%p->(%p,\n\tIID:\t%s,%p)\n",This,pUnkOuter,debugstr_guid(riid),ppvObject);
 
 	*ppvObject = NULL;
-		
+
 	if(pUnkOuter)
 	  return(CLASS_E_NOAGGREGATION);
 
@@ -490,7 +490,7 @@
 	return E_NOTIMPL;
 }
 
-static ICOM_VTABLE(IClassFactory) dclfvt = 
+static ICOM_VTABLE(IClassFactory) dclfvt =
 {
     ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
     IDefClF_fnQueryInterface,
@@ -504,8 +504,8 @@
  * SHCreateDefClassObject			[SHELL32.70]
  */
 HRESULT WINAPI SHCreateDefClassObject(
-	REFIID	riid,				
-	LPVOID*	ppv,	
+	REFIID	riid,
+	LPVOID*	ppv,
 	LPFNCREATEINSTANCE lpfnCI,	/* [in] create instance callback entry */
 	LPDWORD	pcRefDll,		/* [in/out] ref count of the dll */
 	REFIID	riidInst)		/* [in] optional interface to the instance */
@@ -532,7 +532,7 @@
 void WINAPI DragAcceptFiles(HWND hWnd, BOOL b)
 {
 	LONG exstyle;
-  
+
 	if( !IsWindow(hWnd) ) return;
 	exstyle = GetWindowLongA(hWnd,GWL_EXSTYLE);
 	if (b)
@@ -565,7 +565,7 @@
 
         *p = lpDropFileStruct->pt;
 	bRet = lpDropFileStruct->fNC;
-  
+
 	GlobalUnlock(hDrop);
 	return bRet;
 }
@@ -583,9 +583,9 @@
 	LPSTR lpDrop;
 	UINT i = 0;
 	DROPFILES *lpDropFileStruct = (DROPFILES *) GlobalLock(hDrop);
-    
+
 	TRACE("(%08x, %x, %p, %u)\n",	hDrop,lFile,lpszFile,lLength);
-    
+
 	if(!lpDropFileStruct) goto end;
 
 	lpDrop = (LPSTR) lpDropFileStruct + lpDropFileStruct->pFiles;
@@ -593,13 +593,13 @@
 	while (i++ < lFile)
 	{
 	  while (*lpDrop++); /* skip filename */
-	  if (!*lpDrop) 
+	  if (!*lpDrop)
 	  {
-	    i = (lFile == 0xFFFFFFFF) ? i : 0; 
+	    i = (lFile == 0xFFFFFFFF) ? i : 0;
 	    goto end;
 	  }
 	}
-    
+
 	i = strlen(lpDrop);
 	i++;
 	if (!lpszFile ) goto end;   /* needed buffer size */
@@ -622,9 +622,9 @@
 	LPWSTR lpwDrop;
 	UINT i = 0;
 	DROPFILES *lpDropFileStruct = (DROPFILES *) GlobalLock(hDrop);
-    
+
 	TRACE("(%08x, %x, %p, %u)\n", hDrop,lFile,lpszwFile,lLength);
-    
+
 	if(!lpDropFileStruct) goto end;
 
 	lpwDrop = (LPWSTR) lpDropFileStruct + lpDropFileStruct->pFiles;
@@ -633,13 +633,13 @@
 	while (i++ < lFile)
 	{
 	  while (*lpwDrop++); /* skip filename */
-	  if (!*lpwDrop) 
+	  if (!*lpwDrop)
 	  {
-	    i = (lFile == 0xFFFFFFFF) ? i : 0; 
+	    i = (lFile == 0xFFFFFFFF) ? i : 0;
 	    goto end;
 	  }
 	}
-    
+
 	i = strlenW(lpwDrop);
 	i++;
 	if ( !lpszwFile) goto end;   /* needed buffer size */
diff --git a/dlls/shell32/shellord.c b/dlls/shell32/shellord.c
index f2fda55..bdb8481 100644
--- a/dlls/shell32/shellord.c
+++ b/dlls/shell32/shellord.c
@@ -1,7 +1,7 @@
 /*
  * The parameters of many functions changes between different OS versions
  * (NT uses Unicode strings, 95 uses ASCII strings)
- * 
+ *
  * Copyright 1997 Marcus Meissner
  *           1998 Jürgen Schmied
  *
@@ -44,14 +44,14 @@
  * ParseFieldA					[internal]
  *
  * copies a field from a ',' delimited string
- * 
+ *
  * first field is nField = 1
  */
 DWORD WINAPI ParseFieldA(
 	LPCSTR src,
 	DWORD nField,
 	LPSTR dst,
-	DWORD len) 
+	DWORD len)
 {
 	WARN("(%s,0x%08lx,%p,%ld) semi-stub.\n",debugstr_a(src),nField,dst,len);
 
@@ -67,10 +67,10 @@
 
 	/* copy part till the next ',' to dst */
 	while ( *src!='\0' && *src!=',' && (len--)>0 ) *(dst++)=*(src++);
-	
+
 	/* finalize the string */
 	*dst=0x0;
-	
+
 	return TRUE;
 }
 
@@ -78,10 +78,10 @@
  * ParseFieldW			[internal]
  *
  * copies a field from a ',' delimited string
- * 
+ *
  * first field is nField = 1
  */
-DWORD WINAPI ParseFieldW(LPCWSTR src, DWORD nField, LPWSTR dst, DWORD len) 
+DWORD WINAPI ParseFieldW(LPCWSTR src, DWORD nField, LPWSTR dst, DWORD len)
 {
 	FIXME("(%s,0x%08lx,%p,%ld) stub\n",
 	  debugstr_w(src), nField, dst, len);
@@ -91,7 +91,7 @@
 /*************************************************************************
  * ParseField			[SHELL32.58]
  */
-DWORD WINAPI ParseFieldAW(LPCVOID src, DWORD nField, LPVOID dst, DWORD len) 
+DWORD WINAPI ParseFieldAW(LPCVOID src, DWORD nField, LPVOID dst, DWORD len)
 {
 	if (SHELL_OsIsUnicode())
 	  return ParseFieldW(src, nField, dst, len);
@@ -100,7 +100,7 @@
 
 /*************************************************************************
  * GetFileNameFromBrowse			[SHELL32.63]
- * 
+ *
  */
 BOOL WINAPI GetFileNameFromBrowse(
 	HWND hwndOwner,
@@ -141,7 +141,7 @@
     ofn.lpstrDefExt = lpstrDefExt;
     ofn.Flags = OFN_EXPLORER | OFN_HIDEREADONLY | OFN_FILEMUSTEXIST;
     ret = pGetOpenFileNameA(&ofn);
-    
+
     FreeLibrary(hmodule);
     return ret;
 }
@@ -156,7 +156,7 @@
 
 /*************************************************************************
  * SHGetSettings				[SHELL32.@]
- * 
+ *
  * NOTES
  *  the registry path are for win98 (tested)
  *  and possibly are the same in nt40
@@ -169,11 +169,11 @@
 	DWORD	dwDataSize = sizeof (DWORD);
 
 	TRACE("(%p 0x%08lx)\n",lpsfs,dwMask);
-	
+
 	if (RegCreateKeyExA(HKEY_CURRENT_USER, "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced",
 				 0, 0, 0, KEY_ALL_ACCESS, 0, &hKey, 0))
 	  return;
-	
+
 	if ( (SSF_SHOWEXTENSIONS & dwMask) && !RegQueryValueExA(hKey, "HideFileExt", 0, 0, (LPBYTE)&dwData, &dwDataSize))
 	  lpsfs->fShowExtensions  = ((dwData == 0) ?  0 : 1);
 
@@ -215,7 +215,7 @@
  * SHShellFolderView_Message			[SHELL32.73]
  *
  * PARAMETERS
- *  hwndCabinet defines the explorer cabinet window that contains the 
+ *  hwndCabinet defines the explorer cabinet window that contains the
  *              shellview you need to communicate with
  *  uMsg        identifying the SFVM enum to perform
  *  lParam
@@ -227,7 +227,7 @@
  *    that was clicked.
  */
 int WINAPI SHShellFolderView_Message(
-	HWND hwndCabinet, 
+	HWND hwndCabinet,
 	DWORD dwMessage,
 	DWORD dwParam)
 {
@@ -241,7 +241,7 @@
  * PARAMS
  *      hwnd [I]  window handle
  *      y    [I]  flag ????
- * 
+ *
  * NOTES
  *     exported by ordinal
  */
@@ -292,7 +292,7 @@
 	else
 	  pszText = lpText;
 
-	FormatMessageW(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_STRING, 
+	FormatMessageW(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_STRING,
 		       pszText, 0, 0, (LPWSTR)&pszTemp, 0, &args);
 
 	va_end(args);
@@ -334,7 +334,7 @@
 	else
 	  pszText = lpText;
 
-	FormatMessageA(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_STRING, 
+	FormatMessageA(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_STRING,
 		       pszText, 0, 0, (LPSTR)&pszTemp, 0, &args);
 
 	va_end(args);
@@ -352,7 +352,7 @@
  *     exported by ordinal
  */
 #define MEM_DEBUG 0
-void WINAPI SHFree(LPVOID x) 
+void WINAPI SHFree(LPVOID x)
 {
 #if MEM_DEBUG
 	WORD len = *(LPWORD)((LPBYTE)x-2);
@@ -381,7 +381,7 @@
  *     void *task_alloc(DWORD len), uses SHMalloc allocator
  *     exported by ordinal
  */
-LPVOID WINAPI SHAlloc(DWORD len) 
+LPVOID WINAPI SHAlloc(DWORD len)
 {
 	LPBYTE ret;
 
@@ -449,7 +449,7 @@
 
 /*************************************************************************
  * ArrangeWindows				[SHELL32.184]
- * 
+ *
  */
 WORD WINAPI ArrangeWindows(
 	HWND hwndParent,
@@ -495,7 +495,7 @@
     HKEY Policy_basekey;
     INT ret;
 
-    /* Get the key for the policies location in the registry 
+    /* Get the key for the policies location in the registry
      */
     if (RegOpenKeyExA(HKEY_LOCAL_MACHINE,
 		      "Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer",
@@ -553,12 +553,12 @@
 {
     LPSTR ptr;
     INT wlen;
-    
+
     /*FIXME: Document:
      *  RecentDocs MRU data structure seems to be:
      *    +0h   document file name w/ terminating 0h
      *    +nh   short int w/ size of remaining
-     *    +n+2h 02h 30h, or 01h 30h, or 00h 30h  -  unknown 
+     *    +n+2h 02h 30h, or 01h 30h, or 00h 30h  -  unknown
      *    +n+4h 10 bytes zeros  -   unknown
      *    +n+eh shortcut file name w/ terminating 0h
      *    +n+e+nh 3 zero bytes  -  unknown
@@ -582,7 +582,7 @@
     ptr += 3;
     *len = ptr - buffer;
 
-    /* Add the new entry into the MRU list 
+    /* Add the new entry into the MRU list
      */
     return pAddMRUData(mruhandle, (LPCVOID)buffer, *len);
 }
@@ -599,7 +599,7 @@
  *
  * FIXME: ?? MSDN shows this as a VOID
  */
-DWORD WINAPI SHAddToRecentDocs (UINT uFlags,LPCVOID pv)   
+DWORD WINAPI SHAddToRecentDocs (UINT uFlags,LPCVOID pv)
 {
 
 /* FIXME: !!! move CREATEMRULIST and flags to header file !!! */
@@ -644,7 +644,7 @@
      *  RecentDocs MRU data structure seems to be:
      *    +0h   document file name w/ terminating 0h
      *    +nh   short int w/ size of remaining
-     *    +n+2h 02h 30h, or 01h 30h, or 00h 30h  -  unknown 
+     *    +n+2h 02h 30h, or 01h 30h, or 00h 30h  -  unknown
      *    +n+4h 10 bytes zeros  -   unknown
      *    +n+eh shortcut file name w/ terminating 0h
      *    +n+e+nh 3 zero bytes  -  unknown
@@ -659,7 +659,7 @@
 	return 0;
     }
     if (ret == ERROR_SUCCESS) {
-	if (!( (type == REG_DWORD) || 
+	if (!( (type == REG_DWORD) ||
 	       ((type == REG_BINARY) && (datalen == 4)) )) {
 	    ERR("Error policy data for \"NoRecentDocsHistory\" not formated correctly, type=%ld, len=%ld\n",
 		type, datalen);
@@ -688,7 +688,7 @@
     /* Get path to user's "Recent" directory
      */
     if(SUCCEEDED(SHGetMalloc(&ppM))) {
-	if (SUCCEEDED(SHGetSpecialFolderLocation(hwnd, CSIDL_RECENT, 
+	if (SUCCEEDED(SHGetSpecialFolderLocation(hwnd, CSIDL_RECENT,
 						 &pidl))) {
 	    SHGetPathFromIDListA(pidl, link_dir);
 	    IMalloc_Free(ppM, pidl);
@@ -738,7 +738,7 @@
     /* Have data to add, the jobs to be done:
      *   1. Add document to MRU list in registry "HKCU\Software\
      *      Microsoft\Windows\CurrentVersion\Explorer\RecentDocs".
-     *   2. Add shortcut to document in the user's Recent directory 
+     *   2. Add shortcut to document in the user's Recent directory
      *      (CSIDL_RECENT).
      *   3. Add shortcut to Start menu's Documents submenu.
      */
@@ -752,20 +752,20 @@
 	lstrcpyA(doc_name, (LPSTR) pv);
     }
     TRACE("full document name %s\n", doc_name);
-    PathStripPathA(doc_name);;
+    PathStripPathA(doc_name);
     TRACE("stripped document name %s\n", doc_name);
 
 
     /* ***  JOB 1: Update registry for ...\Explorer\RecentDocs list  *** */
 
-    {  /* on input needs: 
-	*      doc_name    -  pure file-spec, no path 
+    {  /* on input needs:
+	*      doc_name    -  pure file-spec, no path
 	*      link_dir    -  path to the user's Recent directory
 	*      HCUbasekey  -  key of ...Windows\CurrentVersion\Explorer" node
 	* creates:
 	*      new_lnk_name-  pure file-spec, no path for new .lnk file
 	*      new_lnk_filepath
-	*                  -  path and file name of new .lnk file 
+	*                  -  path and file name of new .lnk file
 	*/
 	CREATEMRULIST mymru;
 	HANDLE mruhandle;
@@ -793,10 +793,10 @@
 	len = lstrlenA(doc_name);
 	pos = pFindMRUData(mruhandle, doc_name, len, 0);
 
-	/* Now get the MRU entry that will be replaced 
-	 * and delete the .lnk file for it 
+	/* Now get the MRU entry that will be replaced
+	 * and delete the .lnk file for it
 	 */
-	if ((bufused = pEnumMRUListA(mruhandle, (pos == -1) ? 14 : pos, 
+	if ((bufused = pEnumMRUListA(mruhandle, (pos == -1) ? 14 : pos,
 				     buffer, 2048)) != -1) {
 	    ptr = buffer;
 	    ptr += (lstrlenA(buffer) + 1);
@@ -859,10 +859,10 @@
 
     /* ***  JOB 2: Create shortcut in user's "Recent" directory  *** */
 
-    {  /* on input needs: 
+    {  /* on input needs:
 	*      doc_name    -  pure file-spec, no path
 	*      new_lnk_filepath
-	*                  -  path and file name of new .lnk file 
+	*                  -  path and file name of new .lnk file
  	*      uFlags[in]  -  flags on call to SHAddToRecentDocs
 	*      pv[in]      -  document path/pidl on call to SHAddToRecentDocs
 	*/
@@ -881,7 +881,7 @@
 				 (LPVOID )&psl);
 	if(SUCCEEDED(hres)) {
 
-	    hres = IShellLinkA_QueryInterface(psl, &IID_IPersistFile, 
+	    hres = IShellLinkA_QueryInterface(psl, &IID_IPersistFile,
 					     (LPVOID *)&pPf);
 	    if(FAILED(hres)) {
 		/* bombed */
@@ -910,7 +910,7 @@
 		goto fail;
 	    }
 
-	    MultiByteToWideChar(CP_ACP, 0, new_lnk_filepath, -1, 
+	    MultiByteToWideChar(CP_ACP, 0, new_lnk_filepath, -1,
 				widelink, MAX_PATH);
 	    /* create the short cut */
 	    hres = IPersistFile_Save(pPf, widelink, TRUE);
@@ -924,7 +924,7 @@
 	    hres = IPersistFile_SaveCompleted(pPf, widelink);
 	    IPersistFile_Release(pPf);
 	    IShellLinkA_Release(psl);
-	    TRACE("shortcut %s has been created, result=%08lx\n", 
+	    TRACE("shortcut %s has been created, result=%08lx\n",
 		  new_lnk_filepath, hres);
 	}
 	else {
@@ -952,13 +952,13 @@
 {
 	IShellView * psf;
 	HRESULT hRes;
-	
-	TRACE("sf=%p pidl=%p cb=%p mode=0x%08x parm=0x%08lx\n", 
+
+	TRACE("sf=%p pidl=%p cb=%p mode=0x%08x parm=0x%08lx\n",
 	  psvcbi->pshf, psvcbi->pidlFolder, psvcbi->lpfnCallback,
 	  psvcbi->uViewMode, psvcbi->dwUser);
 
 	psf = IShellView_Constructor(psvcbi->pshf);
-	
+
 	if (!psf)
 	  return E_OUTOFMEMORY;
 
@@ -1012,29 +1012,29 @@
 	int gap, len;
 	STARTUPINFOA  startup;
 	PROCESS_INFORMATION info;
-			
+
 	WARN("mask=0x%08lx hwnd=0x%04x verb=%s file=%s parm=%s dir=%s show=0x%08x class=%s incomplete\n",
 	     sei->fMask, sei->hwnd, debugstr_a(sei->lpVerb),
 	     debugstr_a(sei->lpFile), debugstr_a(sei->lpParameters),
-	     debugstr_a(sei->lpDirectory), sei->nShow, 
+	     debugstr_a(sei->lpDirectory), sei->nShow,
 	     (sei->fMask & SEE_MASK_CLASSNAME) ? debugstr_a(sei->lpClass) : "not used");
 
 	ZeroMemory(szApplicationName,MAX_PATH);
 	if (sei->lpFile)
 	  strcpy(szApplicationName, sei->lpFile);
-	
+
 	ZeroMemory(szCommandline,MAX_PATH);
 	if (sei->lpParameters)
 	  strcpy(szCommandline, sei->lpParameters);
-			
+
 	if (sei->fMask & (SEE_MASK_CLASSKEY | SEE_MASK_INVOKEIDLIST | SEE_MASK_ICON | SEE_MASK_HOTKEY |
 			  SEE_MASK_CONNECTNETDRV | SEE_MASK_FLAG_DDEWAIT |
-			  SEE_MASK_DOENVSUBST | SEE_MASK_FLAG_NO_UI | SEE_MASK_UNICODE | 
+			  SEE_MASK_DOENVSUBST | SEE_MASK_FLAG_NO_UI | SEE_MASK_UNICODE |
 			  SEE_MASK_NO_CONSOLE | SEE_MASK_ASYNCOK | SEE_MASK_HMONITOR ))
 	{
 	  FIXME("flags ignored: 0x%08lx\n", sei->fMask);
 	}
-	
+
 	/* launch a document by fileclass like 'Wordpad.Document.1' */
 	if (sei->fMask & SEE_MASK_CLASSNAME)
 	{
@@ -1063,7 +1063,7 @@
 	      pv = SHLockShared(hmem,0);
 	      sprintf(szPidl,":%p",pv );
 	      SHUnlockShared(pv);
-	    
+
 	      gap = strlen(szPidl);
 	      len = strlen(pos)-2;
 	      memmove(pos+gap,pos+2,len);
@@ -1084,7 +1084,7 @@
 	startup.cb = sizeof(STARTUPINFOA);
 
 	if (! CreateProcessA(NULL, szApplicationName,
-			 NULL, NULL, FALSE, 0, 
+			 NULL, NULL, FALSE, 0,
 			 NULL, sei->lpDirectory,
 			 &startup, &info))
 	{
@@ -1098,7 +1098,7 @@
             CHAR    cmdline[1023];
             DWORD   size;
 
-            sprintf(key,"Software\\Classes\\%s",ext);   
+            sprintf(key,"Software\\Classes\\%s",ext);
             size = 1023;
             if (!RegQueryValueA(HKEY_LOCAL_MACHINE,key,buffer,&size))
             {
@@ -1123,9 +1123,9 @@
 	}
 
         sei->hInstApp = 33;
- 
+
 	if(sei->fMask & SEE_MASK_NOCLOSEPROCESS)
-	  sei->hProcess = info.hProcess;	  
+	  sei->hProcess = info.hProcess;
         else
           CloseHandle( info.hProcess );
         CloseHandle( info.hThread );
@@ -1142,7 +1142,7 @@
 	TRACE("%p\n", sei);
 
 	memcpy(&seiA, sei, sizeof(SHELLEXECUTEINFOA));
-	
+
         if (sei->lpVerb)
 	  seiA.lpVerb = HEAP_strdupWtoA( GetProcessHeap(), 0, sei->lpVerb);
 
@@ -1159,7 +1159,7 @@
 	  seiA.lpClass = HEAP_strdupWtoA( GetProcessHeap(), 0, sei->lpClass);
 	else
 	  seiA.lpClass = NULL;
-	  	  
+
 	ret = ShellExecuteExA(&seiA);
 
         if (seiA.lpVerb)	HeapFree( GetProcessHeap(), 0, (LPSTR) seiA.lpVerb );
@@ -1282,19 +1282,19 @@
 HGLOBAL WINAPI SHAllocShared(LPVOID psrc, DWORD size, DWORD procID)
 {	HGLOBAL hmem;
 	LPVOID pmem;
-	
+
 	TRACE("ptr=%p size=0x%04lx procID=0x%04lx\n",psrc,size,procID);
 	hmem = GlobalAlloc(GMEM_FIXED, size);
 	if (!hmem)
 	  return 0;
-	
+
 	pmem =  GlobalLock (hmem);
 
 	if (! pmem)
 	  return 0;
-	  
+
 	memcpy (pmem, psrc, size);
-	GlobalUnlock(hmem); 
+	GlobalUnlock(hmem);
 	return hmem;
 }
 /*************************************************************************
@@ -1303,7 +1303,7 @@
  * NOTES
  *  parameter1 is return value from SHAllocShared
  *  parameter2 is return value from GetCurrentProcessId
- *  the receiver of (WM_USER+2) tries to lock the HANDLE (?) 
+ *  the receiver of (WM_USER+2) tries to lock the HANDLE (?)
  *  the return value seems to be a memory address
  */
 LPVOID WINAPI SHLockShared(HANDLE hmem, DWORD procID)
@@ -1319,7 +1319,7 @@
 BOOL WINAPI SHUnlockShared(LPVOID pv)
 {
 	TRACE("%p\n",pv);
-	return GlobalUnlock((HANDLE)pv); 
+	return GlobalUnlock((HANDLE)pv);
 }
 /*************************************************************************
  * SHFreeShared					[SHELL32.523]
@@ -1393,7 +1393,7 @@
  *
  */
 BOOL WINAPI SHWaitForFileToOpen(
-	LPCITEMIDLIST pidl, 
+	LPCITEMIDLIST pidl,
 	DWORD dwFlags,
 	DWORD dwTimeout)
 {
@@ -1467,15 +1467,15 @@
 
 /*************************************************************************
  *      @                             [SHELL32.243]
- * 
+ *
  * Win98+ by-ordinal routine.  In Win98 this routine returns zero and
  * does nothing else.  Possibly this does something in NT or SHELL32 5.0?
  *
  */
 
-BOOL WINAPI shell32_243(DWORD a, DWORD b) 
-{ 
-  return FALSE; 
+BOOL WINAPI shell32_243(DWORD a, DWORD b)
+{
+  return FALSE;
 }
 
 /*************************************************************************
diff --git a/dlls/shell32/shellpath.c b/dlls/shell32/shellpath.c
index cb85a42..ddb54f0 100644
--- a/dlls/shell32/shellpath.c
+++ b/dlls/shell32/shellpath.c
@@ -59,7 +59,7 @@
 LPVOID WINAPI PathCombineAW(
 	LPVOID szDest,
 	LPCVOID lpszDir,
-	LPCVOID lpszFile) 
+	LPCVOID lpszFile)
 {
 	if (SHELL_OsIsUnicode())
 	  return PathCombineW( szDest, lpszDir, lpszFile );
@@ -103,7 +103,7 @@
 /*************************************************************************
  * PathFindExtension		[SHELL32.31]
  */
-LPVOID WINAPI PathFindExtensionAW(LPCVOID lpszPath) 
+LPVOID WINAPI PathFindExtensionAW(LPCVOID lpszPath)
 {
 	if (SHELL_OsIsUnicode())
 	  return PathFindExtensionW(lpszPath);
@@ -140,7 +140,7 @@
 /*************************************************************************
  * PathGetExtension		[SHELL32.158]
  */
-LPVOID WINAPI PathGetExtensionAW(LPCVOID lpszPath,DWORD void1, DWORD void2) 
+LPVOID WINAPI PathGetExtensionAW(LPCVOID lpszPath,DWORD void1, DWORD void2)
 {
 	if (SHELL_OsIsUnicode())
 	  return PathGetExtensionW(lpszPath);
@@ -150,7 +150,7 @@
 /*************************************************************************
  * PathGetArgs	[SHELL32.52]
  */
-LPVOID WINAPI PathGetArgsAW(LPVOID lpszPath) 
+LPVOID WINAPI PathGetArgsAW(LPVOID lpszPath)
 {
 	if (SHELL_OsIsUnicode())
 	  return PathGetArgsW(lpszPath);
@@ -160,7 +160,7 @@
 /*************************************************************************
  * PathGetDriveNumber	[SHELL32.57]
  */
-int WINAPI PathGetDriveNumberAW(LPVOID lpszPath) 
+int WINAPI PathGetDriveNumberAW(LPVOID lpszPath)
 {
 	if (SHELL_OsIsUnicode())
 	  return PathGetDriveNumberW(lpszPath);
@@ -170,7 +170,7 @@
 /*************************************************************************
  * PathRemoveFileSpec [SHELL32.35]
  */
-BOOL WINAPI PathRemoveFileSpecAW(LPVOID lpszPath) 
+BOOL WINAPI PathRemoveFileSpecAW(LPVOID lpszPath)
 {
 	if (SHELL_OsIsUnicode())
 	  return PathRemoveFileSpecW(lpszPath);
@@ -180,7 +180,7 @@
 /*************************************************************************
  * PathStripPath	[SHELL32.38]
  */
-void WINAPI PathStripPathAW(LPVOID lpszPath) 
+void WINAPI PathStripPathAW(LPVOID lpszPath)
 {
 	if (SHELL_OsIsUnicode())
 	  return PathStripPathW(lpszPath);
@@ -190,7 +190,7 @@
 /*************************************************************************
  * PathStripToRoot	[SHELL32.50]
  */
-BOOL WINAPI PathStripToRootAW(LPVOID lpszPath) 
+BOOL WINAPI PathStripToRootAW(LPVOID lpszPath)
 {
 	if (SHELL_OsIsUnicode())
 	  return PathStripToRootW(lpszPath);
@@ -200,7 +200,7 @@
 /*************************************************************************
  * PathRemoveArgs	[SHELL32.251]
  */
-void WINAPI PathRemoveArgsAW(LPVOID lpszPath) 
+void WINAPI PathRemoveArgsAW(LPVOID lpszPath)
 {
 	if (SHELL_OsIsUnicode())
 	  PathRemoveArgsW(lpszPath);
@@ -210,7 +210,7 @@
 /*************************************************************************
  * PathRemoveExtension	[SHELL32.250]
  */
-void WINAPI PathRemoveExtensionAW(LPVOID lpszPath) 
+void WINAPI PathRemoveExtensionAW(LPVOID lpszPath)
 {
 	if (SHELL_OsIsUnicode())
 	  return PathRemoveExtensionW(lpszPath);
@@ -273,7 +273,7 @@
 /*************************************************************************
  * PathUnquoteSpaces [SHELL32.56]
  */
-VOID WINAPI PathUnquoteSpacesAW(LPVOID str) 
+VOID WINAPI PathUnquoteSpacesAW(LPVOID str)
 {
 	if(SHELL_OsIsUnicode())
 	  PathUnquoteSpacesW(str);
@@ -301,7 +301,7 @@
 {
 	if (SHELL_OsIsUnicode())
 	  return PathIsUNCW( lpszPath );
-	return PathIsUNCA( lpszPath );  
+	return PathIsUNCA( lpszPath );
 }
 
 /*************************************************************************
@@ -311,13 +311,13 @@
 {
 	if (SHELL_OsIsUnicode())
 	  return PathIsRelativeW( lpszPath );
-	return PathIsRelativeA( lpszPath );  
+	return PathIsRelativeA( lpszPath );
 }
 
 /*************************************************************************
  * PathIsRoot		[SHELL32.29]
  */
-BOOL WINAPI PathIsRootAW(LPCVOID lpszPath) 
+BOOL WINAPI PathIsRootAW(LPCVOID lpszPath)
 {
 	if (SHELL_OsIsUnicode())
 	  return PathIsRootW(lpszPath);
@@ -332,12 +332,12 @@
 	LPCSTR lpszExtension = PathGetExtensionA(lpszPath);
 	int i = 0;
 	static char * lpszExtensions[6] = {"exe", "com", "pid", "cmd", "bat", NULL };
-	
+
 	TRACE("path=%s\n",lpszPath);
 
 	for(i=0; lpszExtensions[i]; i++)
 	  if (!strcasecmp(lpszExtension,lpszExtensions[i])) return TRUE;
-	  
+
 	return FALSE;
 }
 
@@ -351,12 +351,12 @@
 	static WCHAR lpszExtensions[6][4] =
 	  {{'e','x','e','\0'}, {'c','o','m','\0'}, {'p','i','d','\0'},
 	   {'c','m','d','\0'}, {'b','a','t','\0'}, {'\0'} };
-	
+
 	TRACE("path=%s\n",debugstr_w(lpszPath));
 
 	for(i=0; lpszExtensions[i][0]; i++)
 	  if (!strcmpiW(lpszExtension,lpszExtensions[i])) return TRUE;
-	  
+
 	return FALSE;
 }
 
@@ -382,7 +382,7 @@
 
 /*************************************************************************
  * PathFileExists	[SHELL32.45]
- */ 
+ */
 BOOL WINAPI PathFileExistsAW (LPCVOID lpszPath)
 {
 	if (SHELL_OsIsUnicode())
@@ -393,7 +393,7 @@
 /*************************************************************************
  * PathMatchSpec	[SHELL32.46]
  */
-BOOL WINAPI PathMatchSpecAW(LPVOID name, LPVOID mask) 
+BOOL WINAPI PathMatchSpecAW(LPVOID name, LPVOID mask)
 {
 	if (SHELL_OsIsUnicode())
 	  return PathMatchSpecW( name, mask );
@@ -412,11 +412,11 @@
 
 /*************************************************************************
  * IsLFNDrive		[SHELL32.119]
- * 
+ *
  * NOTES
  *     exported by ordinal Name
  */
-BOOL WINAPI IsLFNDriveA(LPCSTR lpszPath) 
+BOOL WINAPI IsLFNDriveA(LPCSTR lpszPath)
 {
     DWORD	fnlen;
 
@@ -433,7 +433,7 @@
  */
 BOOL WINAPI PathMakeUniqueNameA(
 	LPSTR lpszBuffer,
-	DWORD dwBuffSize, 
+	DWORD dwBuffSize,
 	LPCSTR lpszShortName,
 	LPCSTR lpszLongName,
 	LPCSTR lpszPathName)
@@ -449,7 +449,7 @@
  */
 BOOL WINAPI PathMakeUniqueNameW(
 	LPWSTR lpszBuffer,
-	DWORD dwBuffSize, 
+	DWORD dwBuffSize,
 	LPCWSTR lpszShortName,
 	LPCWSTR lpszLongName,
 	LPCWSTR lpszPathName)
@@ -465,7 +465,7 @@
  */
 BOOL WINAPI PathMakeUniqueNameAW(
 	LPVOID lpszBuffer,
-	DWORD dwBuffSize, 
+	DWORD dwBuffSize,
 	LPCVOID lpszShortName,
 	LPCVOID lpszLongName,
 	LPCVOID lpszPathName)
@@ -477,7 +477,7 @@
 
 /*************************************************************************
  * PathYetAnotherMakeUniqueName [SHELL32.75]
- * 
+ *
  * NOTES
  *     exported by ordinal
  */
@@ -519,7 +519,7 @@
 /*************************************************************************
  * PathQualifyA		[SHELL32]
  */
-BOOL WINAPI PathQualifyA(LPCSTR pszPath) 
+BOOL WINAPI PathQualifyA(LPCSTR pszPath)
 {
 	FIXME("%s\n",pszPath);
 	return 0;
@@ -528,7 +528,7 @@
 /*************************************************************************
  * PathQualifyW		[SHELL32]
  */
-BOOL WINAPI PathQualifyW(LPCWSTR pszPath) 
+BOOL WINAPI PathQualifyW(LPCWSTR pszPath)
 {
 	FIXME("%s\n",debugstr_w(pszPath));
 	return 0;
@@ -537,7 +537,7 @@
 /*************************************************************************
  * PathQualify	[SHELL32.49]
  */
-BOOL WINAPI PathQualifyAW(LPCVOID pszPath) 
+BOOL WINAPI PathQualifyAW(LPCVOID pszPath)
 {
 	if (SHELL_OsIsUnicode())
 	  return PathQualifyW(pszPath);
@@ -549,7 +549,7 @@
  */
 BOOL WINAPI PathResolveA(
 	LPSTR lpszPath,
-	LPCSTR *alpszPaths, 
+	LPCSTR *alpszPaths,
 	DWORD dwFlags)
 {
 	FIXME("(%s,%p,0x%08lx),stub!\n",
@@ -562,7 +562,7 @@
  */
 BOOL WINAPI PathResolveW(
 	LPWSTR lpszPath,
-	LPCWSTR *alpszPaths, 
+	LPCWSTR *alpszPaths,
 	DWORD dwFlags)
 {
 	FIXME("(%s,%p,0x%08lx),stub!\n",
@@ -575,7 +575,7 @@
  */
 BOOL WINAPI PathResolveAW(
 	LPVOID lpszPath,
-	LPCVOID *alpszPaths, 
+	LPCVOID *alpszPaths,
 	DWORD dwFlags)
 {
 	if (SHELL_OsIsUnicode())
@@ -634,7 +634,7 @@
 /*************************************************************************
  * PathSetDlgItemPath (SHELL32.48)
  */
-VOID WINAPI PathSetDlgItemPathAW(HWND hDlg, int id, LPCVOID pszPath) 
+VOID WINAPI PathSetDlgItemPathAW(HWND hDlg, int id, LPCVOID pszPath)
 {	if (SHELL_OsIsUnicode())
 	  return PathSetDlgItemPathW(hDlg, id, pszPath);
 	return PathSetDlgItemPathA(hDlg, id, pszPath);
@@ -643,10 +643,10 @@
 
 /*************************************************************************
  * SHGetSpecialFolderPathA [SHELL32.@]
- * 
+ *
  * converts csidl to path
  */
- 
+
 static const char * const szSHFolders = "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders";
 static const char * const szSHUserFolders = "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders";
 static const char * const szSetup = "Software\\Microsoft\\Windows\\CurrentVersion\\Setup";
@@ -890,7 +890,7 @@
     },
     { /* CSIDL_PROGRAM_FILES_COMMON */
 	4, HKLM,
-	"CommonFilesDir", 
+	"CommonFilesDir",
 	"Program Files\\Common Files" /* ? */
     },
     { /* CSIDL_PROGRAM_FILES_COMMONX86 */
@@ -929,7 +929,7 @@
 	NULL,
     },
     { /* unassigned 33*/
-	0, 0, 
+	0, 0,
 	NULL,
 	NULL,
     },
@@ -1144,7 +1144,7 @@
 	BOOL bCreate)
 {
 	char szTemp[MAX_PATH];
-	
+
 	if (SHGetSpecialFolderPathA(hwndOwner, szTemp, csidl, bCreate))
 	{
             if (!MultiByteToWideChar( CP_ACP, 0, szTemp, -1, szPath, MAX_PATH ))
diff --git a/dlls/shell32/shellreg.c b/dlls/shell32/shellreg.c
index fddd9bc..4f22c76 100644
--- a/dlls/shell32/shellreg.c
+++ b/dlls/shell32/shellreg.c
@@ -97,9 +97,9 @@
 /*************************************************************************
  * SHRegQueryValueExW	[SHELL32.511] NT4.0
  *
- * FIXME 
+ * FIXME
  *  if the datatype REG_EXPAND_SZ then expand the string and change
- *  *pdwType to REG_SZ. 
+ *  *pdwType to REG_SZ.
  */
 HRESULT WINAPI SHRegQueryValueExW (
 	HKEY hkey,
diff --git a/dlls/shell32/shellstring.c b/dlls/shell32/shellstring.c
index a1da15f..c1e622a 100644
--- a/dlls/shell32/shellstring.c
+++ b/dlls/shell32/shellstring.c
@@ -19,7 +19,7 @@
 #include <string.h>
 #include <stdio.h>
 #include <ctype.h>
-#include <stdlib.h> 
+#include <stdlib.h>
 
 #include "winnls.h"
 #include "winerror.h"
@@ -116,7 +116,7 @@
 
 /*************************************************************************
  * StrRetToStrN				[SHELL32.96]
- * 
+ *
  * converts a STRRET to a normal string
  *
  * NOTES
@@ -164,12 +164,12 @@
  *  lpMulti, nMulti, nWide [IN]
  *  lpWide [OUT]
  */
-BOOL WINAPI StrToOleStrNA (LPWSTR lpWide, INT nWide, LPCSTR lpStrA, INT nStr) 
+BOOL WINAPI StrToOleStrNA (LPWSTR lpWide, INT nWide, LPCSTR lpStrA, INT nStr)
 {
 	TRACE("(%p, %x, %s, %x)\n", lpWide, nWide, debugstr_an(lpStrA,nStr), nStr);
 	return MultiByteToWideChar (0, 0, lpStrA, nStr, lpWide, nWide);
 }
-BOOL WINAPI StrToOleStrNW (LPWSTR lpWide, INT nWide, LPCWSTR lpStrW, INT nStr) 
+BOOL WINAPI StrToOleStrNW (LPWSTR lpWide, INT nWide, LPCWSTR lpStrW, INT nStr)
 {
 	TRACE("(%p, %x, %s, %x)\n", lpWide, nWide, debugstr_wn(lpStrW, nStr), nStr);
 
@@ -179,7 +179,7 @@
 	return 0;
 }
 
-BOOL WINAPI StrToOleStrNAW (LPWSTR lpWide, INT nWide, LPCVOID lpStr, INT nStr) 
+BOOL WINAPI StrToOleStrNAW (LPWSTR lpWide, INT nWide, LPCVOID lpStr, INT nStr)
 {
 	if (SHELL_OsIsUnicode())
 	  return StrToOleStrNW (lpWide, nWide, lpStr, nStr);
@@ -189,13 +189,13 @@
 /*************************************************************************
  * OleStrToStrN					[SHELL32.78]
  */
-BOOL WINAPI OleStrToStrNA (LPSTR lpStr, INT nStr, LPCWSTR lpOle, INT nOle) 
+BOOL WINAPI OleStrToStrNA (LPSTR lpStr, INT nStr, LPCWSTR lpOle, INT nOle)
 {
 	TRACE("(%p, %x, %s, %x)\n", lpStr, nStr, debugstr_wn(lpOle,nOle), nOle);
 	return WideCharToMultiByte (0, 0, lpOle, nOle, lpStr, nStr, NULL, NULL);
 }
 
-BOOL WINAPI OleStrToStrNW (LPWSTR lpwStr, INT nwStr, LPCWSTR lpOle, INT nOle) 
+BOOL WINAPI OleStrToStrNW (LPWSTR lpwStr, INT nwStr, LPCWSTR lpOle, INT nOle)
 {
 	TRACE("(%p, %x, %s, %x)\n", lpwStr, nwStr, debugstr_wn(lpOle,nOle), nOle);
 
@@ -205,7 +205,7 @@
 	return 0;
 }
 
-BOOL WINAPI OleStrToStrNAW (LPVOID lpOut, INT nOut, LPCVOID lpIn, INT nIn) 
+BOOL WINAPI OleStrToStrNAW (LPVOID lpOut, INT nOut, LPCVOID lpIn, INT nIn)
 {
 	if (SHELL_OsIsUnicode())
 	  return OleStrToStrNW (lpOut, nOut, lpIn, nIn);
diff --git a/dlls/shell32/shlexec.c b/dlls/shell32/shlexec.c
index 079649d..de153b0 100644
--- a/dlls/shell32/shlexec.c
+++ b/dlls/shell32/shlexec.c
@@ -44,10 +44,10 @@
 
 /* this function is supposed to expand the escape sequences found in the registry
  * some diving reported that the following were used:
- * + %1, %2...  seem to report to parameter of index N in ShellExecute pmts 
+ * + %1, %2...  seem to report to parameter of index N in ShellExecute pmts
  + + %*         seem to report to all parameter (or all remaining, ie after removing
- *              the already used %1 %2...) 
- * + %L         seems to be %1 as long filename followed by the 8+3 variation 
+ *              the already used %1 %2...)
+ * + %L         seems to be %1 as long filename followed by the 8+3 variation
  * + %l         unknown
  * + %S         unknown
  * + %I         unknown
@@ -63,19 +63,19 @@
             switch (*++fmt)
             {
             case '\0':
-            case '%': 
-                *res++ = '%'; 
+            case '%':
+                *res++ = '%';
                 break;
-            case '1': 
+            case '1':
                 if (SearchPathA(NULL, lpFile, ".exe", sizeof(xlpFile), xlpFile, NULL))
                 {
-                    strcpy(res, xlpFile); 
-                    res += strlen(xlpFile); 
+                    strcpy(res, xlpFile);
+                    res += strlen(xlpFile);
                 }
                 else
                 {
-                    strcpy(res, lpFile); 
-                    res += strlen(lpFile); 
+                    strcpy(res, lpFile);
+                    res += strlen(lpFile);
                 }
                 break;
             default: FIXME("Unknown escape sequence %%%c\n", *fmt);
@@ -92,7 +92,7 @@
  *	SHELL_FindExecutable [Internal]
  *
  * Utility for code sharing between FindExecutable and ShellExecute
- * in: 
+ * in:
  *      lpFile the name of a file
  *      lpOperation the operation on it (open)
  * out:
@@ -116,11 +116,11 @@
     char *tok;              /* token pointer */
     int i;                  /* random counter */
     char xlpFile[256] = ""; /* result of SearchPath */
-    
+
     TRACE("%s\n", (lpFile != NULL) ? lpFile : "-");
-    
+
     lpResult[0] = '\0'; /* Start off with an empty return string */
-    
+
     /* trap NULL parameters on entry */
     if ((lpFile == NULL) || (lpResult == NULL) || (lpOperation == NULL))
     {
@@ -128,30 +128,30 @@
              lpFile, lpOperation, lpResult);
         return 2; /* File not found. Close enough, I guess. */
     }
-    
+
     if (SearchPathA(NULL, lpFile, ".exe", sizeof(xlpFile), xlpFile, NULL))
     {
         TRACE("SearchPathA returned non-zero\n");
         lpFile = xlpFile;
     }
-    
+
     /* First thing we need is the file's extension */
     extension = strrchr(xlpFile, '.'); /* Assume last "." is the one; */
                                        /* File->Run in progman uses */
                                        /* .\FILE.EXE :( */
     TRACE("xlpFile=%s,extension=%s\n", xlpFile, extension);
-    
+
     if ((extension == NULL) || (extension == &xlpFile[strlen(xlpFile)]))
     {
         WARN("Returning 31 - No association\n");
         return 31; /* no association */
     }
-    
+
     /* Make local copy & lowercase it for reg & 'programs=' lookup */
     lstrcpynA(tmpext, extension, 5);
     CharLowerA(tmpext);
     TRACE("%s file\n", tmpext);
-    
+
     /* Three places to check: */
     /* 1. win.ini, [windows], programs (NB no leading '.') */
     /* 2. Registry, HKEY_CLASS_ROOT\<filetype>\shell\open\command */
@@ -159,7 +159,7 @@
     /* All I know of the order is that registry is checked before */
     /* extensions; however, it'd make sense to check the programs */
     /* section first, so that's what happens here. */
-    
+
     if (key) *key = '\0';
 
     /* See if it's a program - if GetProfileString fails, we skip this
@@ -169,7 +169,7 @@
                           buffer, sizeof(buffer)) > 0)
     {
         for (i = 0;i<strlen(buffer); i++) buffer[i] = tolower(buffer[i]);
-        
+
         tok = strtok(buffer, " \t"); /* ? */
         while (tok!= NULL)
         {
@@ -180,7 +180,7 @@
                  * attached */
                 TRACE("found %s\n", lpResult);
                 return 33;
-                
+
 		/* Greater than 32 to indicate success FIXME According to the
 		 * docs, I should be returning a handle for the
 		 * executable. Does this mean I'm supposed to open the
@@ -189,19 +189,19 @@
             tok = strtok(NULL, " \t");
         }
     }
-    
+
     /* Check registry */
     if (RegQueryValueA(HKEY_CLASSES_ROOT, tmpext, filetype,
                        &filetypelen) == ERROR_SUCCESS)
     {
 	filetype[filetypelen] = '\0';
 	TRACE("File type: %s\n", filetype);
-        
+
 	/* Looking for ...buffer\shell\lpOperation\command */
 	strcat(filetype, "\\shell\\");
 	strcat(filetype, lpOperation);
 	strcat(filetype, "\\command");
-	
+
 	if (RegQueryValueA(HKEY_CLASSES_ROOT, filetype, command,
                            &commandlen) == ERROR_SUCCESS)
 	{
@@ -216,12 +216,12 @@
              * the exec names.
              * on Win98, it doesn't appear, but I think it does on Win2k
              */
-	    /* Get the parameters needed by the application 
-	       from the associated ddeexec key */ 
+	    /* Get the parameters needed by the application
+	       from the associated ddeexec key */
 	    tmp = strstr(filetype, "command");
 	    tmp[0] = '\0';
 	    strcat(filetype, "ddeexec");
-            
+
 	    if (RegQueryValueA(HKEY_CLASSES_ROOT, filetype, param, &paramlen) == ERROR_SUCCESS)
 	    {
                 strcat(command, " ");
@@ -259,7 +259,7 @@
             }
         }
     }
-    
+
     TRACE("returning %s\n", lpResult);
     return retval;
 }
@@ -269,7 +269,7 @@
  *
  * callback for the DDE connection. not really usefull
  */
-static HDDEDATA CALLBACK dde_cb(UINT uType, UINT uFmt, HCONV hConv, 
+static HDDEDATA CALLBACK dde_cb(UINT uType, UINT uFmt, HCONV hConv,
                                 HSZ hsz1, HSZ hsz2,
                                 HDDEDATA hData, DWORD dwData1, DWORD dwData2)
 {
@@ -281,12 +281,12 @@
  *
  * ShellExecute helper. Used to do an operation with a DDE connection
  *
- * Handles both the direct connection (try #1), and if it fails, 
+ * Handles both the direct connection (try #1), and if it fails,
  * launching an application and trying (#2) to connect to it
  *
  */
-static unsigned dde_connect(char* key, char* start, char* ddeexec, 
-                            const char* lpFile, 
+static unsigned dde_connect(char* key, char* start, char* ddeexec,
+                            const char* lpFile,
                             int iCmdShow, BOOL is32)
 {
     char*       endkey = key + strlen(key);
@@ -306,22 +306,22 @@
         FIXME("default app name NIY %s\n", key);
         return 2;
     }
-    
+
     strcpy(endkey, "\\topic");
     topiclen = sizeof(topic);
     if (RegQueryValueA(HKEY_CLASSES_ROOT, key, topic, &topiclen) != ERROR_SUCCESS)
     {
         strcpy(topic, "System");
     }
-    
+
     if (DdeInitializeA(&ddeInst, dde_cb, APPCMD_CLIENTONLY, 0L) != DMLERR_NO_ERROR)
     {
         return 2;
     }
-    
+
     hszApp = DdeCreateStringHandleA(ddeInst, app, CP_WINANSI);
     hszTopic = DdeCreateStringHandleA(ddeInst, topic, CP_WINANSI);
-    
+
     hConv = DdeConnect(ddeInst, hszApp, hszTopic, NULL);
     exec = ddeexec;
     if (!hConv)
@@ -346,11 +346,11 @@
             exec = ifexec;
         }
     }
-    
+
     argify(res, sizeof(res), exec, lpFile);
     TRACE("%s %s => %s\n", exec, lpFile, res);
-    
-    ret = (DdeClientTransaction(res, strlen(res) + 1, hConv, 0L, 0, 
+
+    ret = (DdeClientTransaction(res, strlen(res) + 1, hConv, 0L, 0,
                                 XTYP_EXECUTE, 10000, &tid) != DMLERR_NO_ERROR) ? 31 : 32;
     DdeDisconnect(hConv);
  error:
@@ -370,13 +370,13 @@
         LPSTR tmp;
         char param[256] = "";
         LONG paramlen = 256;
-                
-        /* Get the parameters needed by the application 
-           from the associated ddeexec key */ 
+
+        /* Get the parameters needed by the application
+           from the associated ddeexec key */
         tmp = strstr(key, "command");
         assert(tmp);
         strcpy(tmp, "ddeexec");
-                
+
         if (RegQueryValueA(HKEY_CLASSES_ROOT, key, param, &paramlen) == ERROR_SUCCESS)
         {
             TRACE("Got ddeexec %s => %s\n", key, param);
@@ -396,48 +396,48 @@
     return retval;
 }
 
-static HINSTANCE SHELL_Execute(HWND hWnd, LPCSTR lpOperation, LPCSTR lpFile, 
-                               LPCSTR lpParameters, LPCSTR lpDirectory, 
+static HINSTANCE SHELL_Execute(HWND hWnd, LPCSTR lpOperation, LPCSTR lpFile,
+                               LPCSTR lpParameters, LPCSTR lpDirectory,
                                INT iShowCmd, BOOL is32)
 {
     HINSTANCE retval = 31;
     char old_dir[1024];
     char cmd[1024];
-    
+
     TRACE("(%04x,'%s','%s','%s','%s',%x)\n",
           hWnd, lpOperation ? lpOperation:"<null>", lpFile ? lpFile:"<null>",
-          lpParameters ? lpParameters : "<null>", 
+          lpParameters ? lpParameters : "<null>",
           lpDirectory ? lpDirectory : "<null>", iShowCmd);
-    
+
     if (lpFile == NULL) return 0; /* should not happen */
     if (lpOperation == NULL) /* default is open */
         lpOperation = "open";
-    
+
     if (lpDirectory)
     {
         GetCurrentDirectoryA(sizeof(old_dir), old_dir);
         SetCurrentDirectoryA(lpDirectory);
     }
-    
-    /* First try to execute lpFile with lpParameters directly */ 
+
+    /* First try to execute lpFile with lpParameters directly */
     strcpy(cmd, lpFile);
-    if (lpParameters) 
+    if (lpParameters)
     {
         strcat(cmd, " ");
         strcat(cmd, lpParameters);
     }
-    
+
     retval = (is32) ? WinExec(cmd, iShowCmd) : WinExec16(cmd, iShowCmd);
-    
+
     /* Unable to execute lpFile directly
        Check if we can match an application to lpFile */
     if (retval < 32)
-    { 
+    {
         char lpstrProtocol[256];
 
         cmd[0] = '\0';
         retval = SHELL_FindExecutable(lpFile, lpOperation, cmd, lpstrProtocol);
-        
+
         if (retval > 32)  /* Found */
         {
             TRACE("%s/%s => %s/%s\n", lpFile, lpOperation, cmd, lpstrProtocol);
@@ -450,10 +450,10 @@
         {
             LPSTR lpstrRes;
             INT iSize;
-            
+
             lpstrRes = strchr(lpFile, ':');
             iSize = lpstrRes - lpFile;
-            
+
             TRACE("Got URL: %s\n", lpFile);
             /* Looking for ...protocol\shell\lpOperation\command */
             strncpy(lpstrProtocol, lpFile, iSize);
@@ -461,7 +461,7 @@
             strcat(lpstrProtocol, "\\shell\\");
             strcat(lpstrProtocol, lpOperation);
             strcat(lpstrProtocol, "\\command");
-            
+
             /* Remove File Protocol from lpFile */
             /* In the case file://path/file     */
             if (!strncasecmp(lpFile, "file", iSize))
@@ -469,13 +469,13 @@
                 lpFile += iSize;
                 while (*lpFile == ':') lpFile++;
             }
-            
+
             retval = execute_from_key(lpstrProtocol, lpFile, iShowCmd, is32);
-        }       
+        }
         /* Check if file specified is in the form www.??????.*** */
         else if (!strncasecmp(lpFile, "www", 3))
         {
-            /* if so, append lpFile http:// and call ShellExecute */ 
+            /* if so, append lpFile http:// and call ShellExecute */
             char lpstrTmpFile[256] = "http://" ;
             strcat(lpstrTmpFile, lpFile);
             retval = ShellExecuteA(hWnd, lpOperation, lpstrTmpFile, NULL, NULL, 0);
@@ -490,11 +490,11 @@
  * FindExecutableA			[SHELL32.@]
  */
 HINSTANCE WINAPI FindExecutableA(LPCSTR lpFile, LPCSTR lpDirectory, LPSTR lpResult)
-{ 
+{
     HINSTANCE retval = 31;    /* default - 'No association was found' */
     char old_dir[1024];
-    
-    TRACE("File %s, Dir %s\n", 
+
+    TRACE("File %s, Dir %s\n",
           (lpFile != NULL ? lpFile : "-"), (lpDirectory != NULL ? lpDirectory : "-"));
 
     lpResult[0] = '\0'; /* Start off with an empty return string */
@@ -511,9 +511,9 @@
         GetCurrentDirectoryA(sizeof(old_dir), old_dir);
         SetCurrentDirectoryA(lpDirectory);
     }
-    
+
     retval = SHELL_FindExecutable(lpFile, "open", lpResult, NULL);
-    
+
     TRACE("returning %s\n", lpResult);
     if (lpDirectory)
         SetCurrentDirectoryA(old_dir);
@@ -535,15 +535,15 @@
 HINSTANCE16 WINAPI ShellExecute16( HWND16 hWnd, LPCSTR lpOperation,
                                    LPCSTR lpFile, LPCSTR lpParameters,
                                    LPCSTR lpDirectory, INT16 iShowCmd )
-{   
-    return (HINSTANCE16)SHELL_Execute(hWnd, lpOperation, lpFile, 
+{
+    return (HINSTANCE16)SHELL_Execute(hWnd, lpOperation, lpFile,
                                       lpParameters, lpDirectory, iShowCmd, FALSE );
 }
 
 /*************************************************************************
  * ShellExecuteA			[SHELL32.290]
  */
-HINSTANCE WINAPI ShellExecuteA(HWND hWnd, LPCSTR lpOperation,LPCSTR lpFile, 
+HINSTANCE WINAPI ShellExecuteA(HWND hWnd, LPCSTR lpOperation,LPCSTR lpFile,
                                LPCSTR lpParameters,LPCSTR lpDirectory, INT iShowCmd)
 {
     TRACE("\n");
@@ -554,10 +554,10 @@
 /*************************************************************************
  * ShellExecuteW			[SHELL32.294]
  * from shellapi.h
- * WINSHELLAPI HINSTANCE APIENTRY ShellExecuteW(HWND hwnd, LPCWSTR lpOperation, 
- * LPCWSTR lpFile, LPCWSTR lpParameters, LPCWSTR lpDirectory, INT nShowCmd);   
+ * WINSHELLAPI HINSTANCE APIENTRY ShellExecuteW(HWND hwnd, LPCWSTR lpOperation,
+ * LPCWSTR lpFile, LPCWSTR lpParameters, LPCWSTR lpDirectory, INT nShowCmd);
  */
-HINSTANCE WINAPI ShellExecuteW(HWND hwnd, LPCWSTR lpOperation, LPCWSTR lpFile, 
+HINSTANCE WINAPI ShellExecuteW(HWND hwnd, LPCWSTR lpOperation, LPCWSTR lpFile,
                                LPCWSTR lpParameters, LPCWSTR lpDirectory, INT nShowCmd)
 {
        FIXME(": stub\n");
diff --git a/dlls/shell32/shlfileop.c b/dlls/shell32/shlfileop.c
index 1aa59ac..9712486 100644
--- a/dlls/shell32/shlfileop.c
+++ b/dlls/shell32/shlfileop.c
@@ -36,32 +36,32 @@
 
         if(nKindOfDialog == ASK_DELETE_FILE)
         {
-	  LoadStringA(shell32_hInstance, IDS_DELETEITEM_TEXT, szText, 
+	  LoadStringA(shell32_hInstance, IDS_DELETEITEM_TEXT, szText,
 		sizeof(szText));
-	  LoadStringA(shell32_hInstance, IDS_DELETEITEM_CAPTION, 
+	  LoadStringA(shell32_hInstance, IDS_DELETEITEM_CAPTION,
 		szCaption, sizeof(szCaption));
 	}
         else if(nKindOfDialog == ASK_DELETE_FOLDER)
         {
-	  LoadStringA(shell32_hInstance, IDS_DELETEITEM_TEXT, szText, 
+	  LoadStringA(shell32_hInstance, IDS_DELETEITEM_TEXT, szText,
 		sizeof(szText));
-	  LoadStringA(shell32_hInstance, IDS_DELETEFOLDER_CAPTION, 
+	  LoadStringA(shell32_hInstance, IDS_DELETEFOLDER_CAPTION,
 		szCaption, sizeof(szCaption));
         }
         else if(nKindOfDialog == ASK_DELETE_MULTIPLE_ITEM)
         {
-	  LoadStringA(shell32_hInstance, IDS_DELETEMULTIPLE_TEXT, szText, 
+	  LoadStringA(shell32_hInstance, IDS_DELETEMULTIPLE_TEXT, szText,
 		sizeof(szText));
-	  LoadStringA(shell32_hInstance, IDS_DELETEITEM_CAPTION, 
+	  LoadStringA(shell32_hInstance, IDS_DELETEITEM_CAPTION,
 		szCaption, sizeof(szCaption));
         }
 	else {
           FIXME("Called without a valid nKindOfDialog specified!\n");
-	  LoadStringA(shell32_hInstance, IDS_DELETEITEM_TEXT, szText, 
+	  LoadStringA(shell32_hInstance, IDS_DELETEITEM_TEXT, szText,
 		sizeof(szText));
-	  LoadStringA(shell32_hInstance, IDS_DELETEITEM_CAPTION, 
+	  LoadStringA(shell32_hInstance, IDS_DELETEITEM_CAPTION,
 		szCaption, sizeof(szCaption));
-	}          
+	}
 
 	FormatMessageA(FORMAT_MESSAGE_FROM_STRING|FORMAT_MESSAGE_ARGUMENT_ARRAY,
 	    szText, 0, 0, szBuffer, sizeof(szBuffer), (va_list*)&szDir);
@@ -85,10 +85,10 @@
 	strcpy(szTemp, pszDir);
 	PathAddBackslashA(szTemp);
 	strcat(szTemp, "*.*");
-	
+
 	if (bShowUI && !SHELL_WarnItemDelete(ASK_DELETE_FOLDER, pszDir))
 	  return FALSE;
-	
+
 	if(INVALID_HANDLE_VALUE != (hFind = FindFirstFileA(szTemp, &wfd)))
 	{
 	  do
@@ -98,7 +98,7 @@
 	      strcpy(szTemp, pszDir);
 	      PathAddBackslashA(szTemp);
 	      strcat(szTemp, wfd.cFileName);
-	
+
 	      if(FILE_ATTRIBUTE_DIRECTORY & wfd.dwFileAttributes)
 	        SHELL_DeleteDirectoryA(szTemp, FALSE);
 	      else
@@ -121,7 +121,7 @@
 {
 	if (bShowUI && !SHELL_WarnItemDelete(ASK_DELETE_FILE, pszFile))
 		return FALSE;
- 
+
         return DeleteFileA(pszFile);
 }
 
@@ -144,7 +144,7 @@
 }
 
 /************************************************************************
- *      Win32DeleteFile                         [SHELL32.164]  
+ *      Win32DeleteFile                         [SHELL32.164]
  *
  * Deletes a file.  Also triggers a change notify if one exists.
  *
@@ -152,7 +152,7 @@
  * Verified on Win98 / IE 5 (SHELL32 4.72, March 1999 build) to be
  * ANSI.  Is this Unicode on NT?
  *
- */ 
+ */
 
 BOOL WINAPI Win32DeleteFile(LPSTR fName)
 {
@@ -169,12 +169,12 @@
  * NOTES
  *     exported by name
  */
-DWORD WINAPI SHFileOperationA (LPSHFILEOPSTRUCTA lpFileOp)   
+DWORD WINAPI SHFileOperationA (LPSHFILEOPSTRUCTA lpFileOp)
 {
 	LPSTR pFrom = (LPSTR)lpFileOp->pFrom;
 	LPSTR pTo = (LPSTR)lpFileOp->pTo;
 	LPSTR pTempTo;
-        TRACE("flags (0x%04x) : %s%s%s%s%s%s%s%s%s%s%s%s \n", lpFileOp->fFlags, 
+        TRACE("flags (0x%04x) : %s%s%s%s%s%s%s%s%s%s%s%s \n", lpFileOp->fFlags,
                 lpFileOp->fFlags & FOF_MULTIDESTFILES ? "FOF_MULTIDESTFILES " : "",
                 lpFileOp->fFlags & FOF_CONFIRMMOUSE ? "FOF_CONFIRMMOUSE " : "",
                 lpFileOp->fFlags & FOF_SILENT ? "FOF_SILENT " : "",
@@ -203,10 +203,10 @@
                  * multiple from filenames 1 0 1 0 1 0 1 0
                  *                         ---------------
                  * copy files to dir       1 0 1 1 0 0 1 0
-                 * create dir              0 0 0 0 0 0 1 0 
+                 * create dir              0 0 0 0 0 0 1 0
                  */
                 int multifrom = pFrom[strlen(pFrom) + 1] != '\0';
-                int destisdir = PathIsDirectoryA( pTo ); 
+                int destisdir = PathIsDirectoryA( pTo );
                 int copytodir = 0;
 		TRACE("File Copy:\n");
                 if( destisdir ) {
@@ -290,7 +290,7 @@
  * NOTES
  *     exported by name
  */
-DWORD WINAPI SHFileOperationW (LPSHFILEOPSTRUCTW lpFileOp)   
+DWORD WINAPI SHFileOperationW (LPSHFILEOPSTRUCTW lpFileOp)
 {
 	FIXME("(%p):stub.\n", lpFileOp);
 	return 1;
diff --git a/dlls/shell32/shlfolder.c b/dlls/shell32/shlfolder.c
index 62fde5e..a7086b9 100644
--- a/dlls/shell32/shlfolder.c
+++ b/dlls/shell32/shlfolder.c
@@ -3,7 +3,7 @@
  *
  *	Copyright 1997	Marcus Meissner
  *	Copyright 1998, 1999	Juergen Schmied
- *	
+ *
  *	IShellFolder2 and related interfaces
  *
  * This library is free software; you can redistribute it and/or
@@ -67,7 +67,7 @@
 	int	pcsFlags;
 	int	fmt;
 	int	cxChar;
-	
+
 } shvheader;
 
 /***************************************************************************
@@ -90,7 +90,7 @@
 	TRACE("(%s %p 0x%08lx)\n",debugstr_w(pszNext),pszOut,dwOut);
 
 	*pszOut=0x0000;
-	
+
 	if(!pszNext || !*pszNext)
 	  return NULL;
 
@@ -120,7 +120,7 @@
 	HRESULT		hr = E_OUTOFMEMORY;
 	LPITEMIDLIST	pidlOut, pidlTemp = NULL;
 	IShellFolder	*psfChild;
-	
+
 	TRACE("(%p, %p, %s)\n",psf, pidlInOut ? *pidlInOut : NULL, debugstr_w(szNext));
 
 
@@ -134,7 +134,7 @@
 
 	  pidlTemp = ILCombine(*pidlInOut, pidlOut);
 
-	  if (pidlOut) 
+	  if (pidlOut)
 	    ILFree(pidlOut);
 	}
 
@@ -142,7 +142,7 @@
 	*pidlInOut = pidlTemp;
 
 	TRACE("-- pidl=%p ret=0x%08lx\n", pidlInOut? *pidlInOut: NULL, hr);
-	return hr;	
+	return hr;
 }
 
 /***********************************************************************
@@ -165,7 +165,7 @@
 	TRACE("%p %p\n", pidlRoot, pidlChild);
 
 	*ppvOut = NULL;
-	
+
 	/* we have to ask first for IPersistFolder, some special folders are expecting this */
 	hr = SHCoCreateInstance(NULL, clsid, NULL, &IID_IPersistFolder, (LPVOID*)&pPersistFolder);
 	if (SUCCEEDED(hr))
@@ -196,12 +196,12 @@
 	IShellFolder2 *	psfChild;
 	HRESULT		hr = E_OUTOFMEMORY;
 	STRRET strTemp;
-	
+
 	TRACE("(%p)->(pidl=%p 0x%08lx %p 0x%08lx)\n",psf,pidl,dwFlags,szOut, dwOutLen);
 	pdump(pidl);
-	
+
 	if ((pidlFirst = ILCloneFirst(pidl)))
-	{ 
+	{
 	  hr = IShellFolder_BindToObject(psf, pidlFirst, NULL, &IID_IShellFolder, (LPVOID*)&psfChild);
 	  if (SUCCEEDED(hr))
 	  {
@@ -243,7 +243,7 @@
 {
         GUID const * clsid;
 	DWORD dwAttributes;
-	
+
 	TRACE("0x%08lx\n", *pdwAttributes);
 
 	if (*pdwAttributes & (0xcff3fe88))
@@ -263,7 +263,7 @@
 	  else
 	  {
 	    *pdwAttributes &= 0xb0000154;
-	  }	  
+	  }
 	}
 	else if (_ILGetDataPointer(pidl))
 	{
@@ -291,7 +291,7 @@
 *   IShellFolder implementation
 */
 
-typedef struct 
+typedef struct
 {
 	ICOM_VFIELD(IUnknown);
 	DWORD				ref;
@@ -319,17 +319,17 @@
 
 static IShellFolder * ISF_MyComputer_Constructor(void);
 
-#define _IShellFolder2_Offset ((int)(&(((IGenericSFImpl*)0)->lpvtblShellFolder))) 
-#define _ICOM_THIS_From_IShellFolder2(class, name) class* This = (class*)(((char*)name)-_IShellFolder2_Offset); 
-	
-#define _IPersistFolder_Offset ((int)(&(((IGenericSFImpl*)0)->lpvtblPersistFolder2))) 
-#define _ICOM_THIS_From_IPersistFolder2(class, name) class* This = (class*)(((char*)name)-_IPersistFolder_Offset); 
-	
-#define _IDropTarget_Offset ((int)(&(((IGenericSFImpl*)0)->lpvtblDropTarget))) 
-#define _ICOM_THIS_From_IDropTarget(class, name) class* This = (class*)(((char*)name)-_IDropTarget_Offset); 
+#define _IShellFolder2_Offset ((int)(&(((IGenericSFImpl*)0)->lpvtblShellFolder)))
+#define _ICOM_THIS_From_IShellFolder2(class, name) class* This = (class*)(((char*)name)-_IShellFolder2_Offset);
 
-#define _ISFHelper_Offset ((int)(&(((IGenericSFImpl*)0)->lpvtblSFHelper))) 
-#define _ICOM_THIS_From_ISFHelper(class, name) class* This = (class*)(((char*)name)-_ISFHelper_Offset); 
+#define _IPersistFolder_Offset ((int)(&(((IGenericSFImpl*)0)->lpvtblPersistFolder2)))
+#define _ICOM_THIS_From_IPersistFolder2(class, name) class* This = (class*)(((char*)name)-_IPersistFolder_Offset);
+
+#define _IDropTarget_Offset ((int)(&(((IGenericSFImpl*)0)->lpvtblDropTarget)))
+#define _ICOM_THIS_From_IDropTarget(class, name) class* This = (class*)(((char*)name)-_IDropTarget_Offset);
+
+#define _ISFHelper_Offset ((int)(&(((IGenericSFImpl*)0)->lpvtblSFHelper)))
+#define _ICOM_THIS_From_ISFHelper(class, name) class* This = (class*)(((char*)name)-_ISFHelper_Offset);
 /*
   converts This to a interface pointer
 */
@@ -370,7 +370,7 @@
 
 	*ppvObj = NULL;
 
-	if(IsEqualIID(riid, &IID_IUnknown))		*ppvObj = _IUnknown_(This); 
+	if(IsEqualIID(riid, &IID_IUnknown))		*ppvObj = _IUnknown_(This);
 	else if(IsEqualIID(riid, &IID_IShellFolder))	*ppvObj = _IShellFolder_(This);
 	else if(IsEqualIID(riid, &IID_IShellFolder2))	*ppvObj = _IShellFolder_(This);
 	else if(IsEqualIID(riid, &IID_IPersist))	*ppvObj = _IPersist_(This);
@@ -404,7 +404,7 @@
 	return ++(This->ref);
 }
 
-static ULONG WINAPI IUnknown_fnRelease(IUnknown * iface) 
+static ULONG WINAPI IUnknown_fnRelease(IUnknown * iface)
 {
 	ICOM_THIS(IGenericSFImpl, iface);
 
@@ -412,7 +412,7 @@
 	TRACE("(%p)->(count=%lu)\n",This,This->ref);
 
 	shell32_ObjCount--;
-	if (!--(This->ref)) 
+	if (!--(This->ref))
 	{
 	  TRACE("-- destroying IShellFolder(%p)\n",This);
 
@@ -429,8 +429,8 @@
 	return This->ref;
 }
 
-static ICOM_VTABLE(IUnknown) unkvt = 
-{	
+static ICOM_VTABLE(IUnknown) unkvt =
+{
 	ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
 	IUnknown_fnQueryInterface,
 	IUnknown_fnAddRef,
@@ -482,7 +482,7 @@
 	    sf->lpvtblPersistFolder2=&psfvt;
 	    sf->lpvtblDropTarget=&dtvt;
 	    sf->lpvtblSFHelper=&shvt;
-	    
+
 	    sf->pclsid = (CLSID*)&CLSID_SFFile;
 	    sf->pUnkOuter = pUnkOuter ? pUnkOuter : _IUnknown_(sf);
 	    *ppv = _IUnknown_(sf);
@@ -526,7 +526,7 @@
 
 	TRACE("(%p)->(parent=%p, pidl=%p)\n",sf,This, pidl);
 	pdump(pidl);
-		
+
 	if(pidl && iface)				/* do we have a pidl? */
 	{
 	  int len;
@@ -539,7 +539,7 @@
 	    {
 	      dwSize += strlen(This->sMyPath) ;
 	      TRACE("-- (%p)->(parent's path=%s)\n",sf, debugstr_a(This->sMyPath));
-	    }   
+	    }
 
 	    dwSize += _ILSimpleGetText(pidl,NULL,0);		/* add the size of our name*/
 	    sf->sMyPath = SHAlloc(dwSize + 2);			/* '\0' and backslash */
@@ -603,7 +603,7 @@
 /**************************************************************************
  *  IShellFolder_fnRelease
  */
-static ULONG WINAPI IShellFolder_fnRelease(IShellFolder2 * iface) 
+static ULONG WINAPI IShellFolder_fnRelease(IShellFolder2 * iface)
 {
 	_ICOM_THIS_From_IShellFolder2(IGenericSFImpl, iface)
 
@@ -624,14 +624,14 @@
 *  ULONG*        pdwAttributes   //[out] items attributes
 *
 * NOTES
-*  every folder tries to parse only its own (the leftmost) pidl and creates a 
+*  every folder tries to parse only its own (the leftmost) pidl and creates a
 *  subfolder to evaluate the remaining parts
 *  now we can parse into namespaces implemented by shell extensions
 *
 *  behaviour on win98:	lpszDisplayName=NULL -> chrash
 *			lpszDisplayName="" -> returns mycoputer-pidl
 *
-* FIXME: 
+* FIXME:
 *    pdwAttributes: not set
 *    pchEaten: not set like in windows
 */
@@ -651,7 +651,7 @@
 	WCHAR		szElement[MAX_PATH];
 	CHAR		szTempA[MAX_PATH], szPath[MAX_PATH];
 	LPITEMIDLIST	pidlTemp=NULL;
-	
+
 	TRACE("(%p)->(HWND=0x%08x,%p,%p=%s,%p,pidl=%p,%p)\n",
 	This,hwndOwner,pbcReserved,lpszDisplayName,
 	debugstr_w(lpszDisplayName),pchEaten,ppidl,pdwAttributes);
@@ -659,9 +659,9 @@
 	if (!lpszDisplayName || !ppidl) return E_INVALIDARG;
 
 	if (pchEaten) *pchEaten = 0;	/* strange but like the original */
-	
+
 	if (*lpszDisplayName)
-	{	
+	{
 	  /* get the next element */
 	  szNext = GetNextElementW(lpszDisplayName, szElement, MAX_PATH);
 
@@ -706,7 +706,7 @@
 
 	TRACE("(%p)->(-- pidl=%p ret=0x%08lx)\n", This, ppidl? *ppidl:0, hr);
 
-	return hr;	
+	return hr;
 }
 
 /**************************************************************************
@@ -733,7 +733,7 @@
 
 	if(!*ppEnumIDList) return E_OUTOFMEMORY;
 
-	return S_OK;		
+	return S_OK;
 }
 
 /**************************************************************************
@@ -753,7 +753,7 @@
 	IPersistFolder 	*pPersistFolder;
 	LPITEMIDLIST	absPidl;
 	HRESULT         hr;
-	
+
 	TRACE("(%p)->(pidl=%p,%p,\n\tIID:\t%s,%p)\n",This,pidl,pbcReserved,debugstr_guid(riid),ppvOut);
 
 	if(!pidl || !ppvOut) return E_INVALIDARG;
@@ -814,7 +814,7 @@
 * PARAMETERS
 *  LPCITEMIDLIST pidl,       //[in ] complex pidl to store
 *  LPBC          pbc,        //[in ] reserved
-*  REFIID        riid,       //[in ] Initial storage interface 
+*  REFIID        riid,       //[in ] Initial storage interface
 *  LPVOID*       ppvObject   //[out] Interface* returned
 */
 static HRESULT WINAPI IShellFolder_fnBindToStorage(
@@ -845,7 +845,7 @@
 *   Special case - If one of the items is a Path and the other is a File,
 *   always make the Path come before the File.
 *
-* NOTES 
+* NOTES
 *  use SCODE_CODE() on the return value to get the result
 */
 
@@ -870,7 +870,7 @@
 	    pdump (pidl1);
 	    pdump (pidl2);
 	}
-	
+
 	if (!pidl1 && !pidl2)
 	{
 	  hr = ResultFromShort(0);
@@ -888,7 +888,7 @@
 	  LPPIDLDATA pd1, pd2;
 	  pd1 = _ILGetDataPointer(pidl1);
 	  pd2 = _ILGetDataPointer(pidl2);
-	
+
 	  /* compate the types. sort order is the PT_* constant */
 	  pt1 = ( pd1 ? pd1->type: PT_DESKTOP);
 	  pt2 = ( pd2 ? pd2->type: PT_DESKTOP);
@@ -902,19 +902,19 @@
 	    _ILSimpleGetText(pidl1, szTemp1, MAX_PATH);
 	    _ILSimpleGetText(pidl2, szTemp2, MAX_PATH);
 	    nReturn = strcasecmp(szTemp1, szTemp2);
-	
+
 	    if (nReturn == 0)				/* first pidl different ? */
 	    {
 	      pidl1 = ILGetNext(pidl1);
 
-	      if (pidl1 && pidl1->mkid.cb)		/* go deeper? */	
+	      if (pidl1 && pidl1->mkid.cb)		/* go deeper? */
 	      {
 	        pidlTemp = ILCloneFirst(pidl1);
 	        pidl2 = ILGetNext(pidl2);
-	
+
 	        hr = IShellFolder_BindToObject(iface, pidlTemp, NULL, &IID_IShellFolder, (LPVOID*)&psf);
 	        if (SUCCEEDED(hr))
-	        { 
+	        {
 	          nReturn = IShellFolder_CompareIDs(psf, 0, pidl1, pidl2);
 	          IShellFolder_Release(psf);
 	          hr = ResultFromShort(nReturn);
@@ -936,7 +936,7 @@
 	    }
 	  }
 	}
-	
+
 	TRACE("-- res=0x%08lx\n", hr);
 	return hr;
 }
@@ -956,7 +956,7 @@
 	HRESULT		hr = E_INVALIDARG;
 
 	TRACE("(%p)->(hwnd=0x%x,\n\tIID:\t%s,%p)\n",This,hwndOwner,debugstr_guid(riid),ppvOut);
-	
+
 	if(ppvOut)
 	{
 	  *ppvOut = NULL;
@@ -981,7 +981,7 @@
 	  }
 	}
 	TRACE("-- (%p)->(interface=%p)\n",This, ppvOut);
-	return hr; 
+	return hr;
 }
 
 /**************************************************************************
@@ -989,8 +989,8 @@
 *
 * PARAMETERS
 *  UINT            cidl,     //[in ] num elements in pidl array
-*  LPCITEMIDLIST*  apidl,    //[in ] simple pidl array 
-*  ULONG*          rgfInOut) //[out] result array  
+*  LPCITEMIDLIST*  apidl,    //[in ] simple pidl array
+*  ULONG*          rgfInOut) //[out] result array
 *
 */
 static HRESULT WINAPI IShellFolder_fnGetAttributesOf(
@@ -1014,7 +1014,7 @@
 	  SHELL32_GetItemAttributes(_IShellFolder_(This), *apidl, rgfInOut);
 	  apidl++;
 	  cidl--;
-	} 
+	}
 
 	TRACE("-- result=0x%08lx\n",*rgfInOut);
 
@@ -1028,7 +1028,7 @@
 *  UINT           cidl,      //[in ] array size
 *  LPCITEMIDLIST* apidl,     //[in ] simple pidl array
 *  REFIID         riid,      //[in ] Requested Interface
-*  UINT*          prgfInOut, //[   ] reserved 
+*  UINT*          prgfInOut, //[   ] reserved
 *  LPVOID*        ppvObject) //[out] Resulting Interface
 *
 * NOTES
@@ -1041,21 +1041,21 @@
 *  a barely documented "Icon positions" structure to SetData when the drag starts,
 *  and GetData's it if the drop is in another explorer window that needs the positions.
 */
-static HRESULT WINAPI IShellFolder_fnGetUIObjectOf( 
+static HRESULT WINAPI IShellFolder_fnGetUIObjectOf(
 	IShellFolder2 *	iface,
 	HWND		hwndOwner,
 	UINT		cidl,
-	LPCITEMIDLIST *	apidl, 
-	REFIID		riid, 
+	LPCITEMIDLIST *	apidl,
+	REFIID		riid,
 	UINT *		prgfInOut,
 	LPVOID *	ppvOut)
-{	
+{
 	_ICOM_THIS_From_IShellFolder2(IGenericSFImpl, iface)
 
 	LPITEMIDLIST	pidl;
-	IUnknown*	pObj = NULL; 
+	IUnknown*	pObj = NULL;
 	HRESULT		hr = E_INVALIDARG;
-	
+
 	TRACE("(%p)->(0x%04x,%u,apidl=%p,\n\tIID:%s,%p,%p)\n",
 	  This,hwndOwner,cidl,apidl,debugstr_guid(riid),prgfInOut,ppvOut);
 
@@ -1079,13 +1079,13 @@
 	    pObj = (LPUNKNOWN)IExtractIconA_Constructor( pidl );
 	    SHFree(pidl);
 	    hr = S_OK;
-	  } 
+	  }
 	  else if (IsEqualIID(riid, &IID_IDropTarget) && (cidl >= 1))
 	  {
 	    hr = IShellFolder_QueryInterface(iface, &IID_IDropTarget, (LPVOID*)&pObj);
 	  }
 	  else
-	  { 
+	  {
 	    hr = E_NOINTERFACE;
 	  }
 
@@ -1124,12 +1124,12 @@
 	CHAR		szPath[MAX_PATH]= "";
 	int		len = 0;
 	BOOL		bSimplePidl;
-		
+
 	TRACE("(%p)->(pidl=%p,0x%08lx,%p)\n",This,pidl,dwFlags,strRet);
 	pdump(pidl);
-	
+
 	if(!pidl || !strRet) return E_INVALIDARG;
-	
+
 	bSimplePidl = _ILIsPidlSimple(pidl);
 
 	/* take names of special folders only if its only this folder */
@@ -1172,7 +1172,7 @@
               if(doHide && szPath[0]!='.') PathRemoveExtensionA(szPath);
           }
 	}
-	
+
 	if ( (dwFlags & SHGDN_FORPARSING) && !bSimplePidl)	/* go deeper if needed */
 	{
 	  PathAddBackslashA(szPath);
@@ -1202,10 +1202,10 @@
 */
 static HRESULT WINAPI IShellFolder_fnSetNameOf(
 	IShellFolder2 * iface,
-	HWND hwndOwner, 
+	HWND hwndOwner,
 	LPCITEMIDLIST pidl, /*simple pidl*/
-	LPCOLESTR lpName, 
-	DWORD dwFlags, 
+	LPCOLESTR lpName,
+	DWORD dwFlags,
 	LPITEMIDLIST *pPidlOut)
 {
 	_ICOM_THIS_From_IShellFolder2(IGenericSFImpl, iface)
@@ -1224,7 +1224,7 @@
 	  len = strlen (szSrc);
 	  _ILSimpleGetText(pidl, szSrc+len, MAX_PATH-len);
 	}
-	else 
+	else
 	{
 	  SHGetPathFromIDListA(pidl, szSrc);
 	}
@@ -1252,7 +1252,7 @@
 	_ICOM_THIS_From_IShellFolder2(IGenericSFImpl, iface)
 	FIXME("(%p)\n",This);
 	return E_NOTIMPL;
-}	
+}
 static HRESULT WINAPI IShellFolder_fnEnumSearches(
 	IShellFolder2 * iface,
 	IEnumExtraSearch **ppenum)
@@ -1260,7 +1260,7 @@
 	_ICOM_THIS_From_IShellFolder2(IGenericSFImpl, iface)
 	FIXME("(%p)\n",This);
 	return E_NOTIMPL;
-}	
+}
 static HRESULT WINAPI IShellFolder_fnGetDefaultColumn(
 	IShellFolder2 * iface,
 	DWORD dwRes,
@@ -1275,14 +1275,14 @@
 	if (pDisplay) *pDisplay = 0;
 
 	return S_OK;
-}	
+}
 static HRESULT WINAPI IShellFolder_fnGetDefaultColumnState(
 	IShellFolder2 * iface,
 	UINT iColumn,
 	DWORD *pcsFlags)
 {
 	_ICOM_THIS_From_IShellFolder2(IGenericSFImpl, iface)
-	
+
 	TRACE("(%p)\n",This);
 
 	if (!pcsFlags || iColumn >= GENERICSHELLVIEWCOLUMNS ) return E_INVALIDARG;
@@ -1290,7 +1290,7 @@
 	*pcsFlags = GenericSFHeader[iColumn].pcsFlags;
 
 	return S_OK;
-}	
+}
 static HRESULT WINAPI IShellFolder_fnGetDetailsEx(
 	IShellFolder2 * iface,
 	LPCITEMIDLIST pidl,
@@ -1301,7 +1301,7 @@
 	FIXME("(%p)\n",This);
 
 	return E_NOTIMPL;
-}	
+}
 static HRESULT WINAPI IShellFolder_fnGetDetailsOf(
 	IShellFolder2 * iface,
 	LPCITEMIDLIST pidl,
@@ -1314,7 +1314,7 @@
 	TRACE("(%p)->(%p %i %p)\n",This, pidl, iColumn, psd);
 
 	if (!psd || iColumn >= GENERICSHELLVIEWCOLUMNS ) return E_INVALIDARG;
-	
+
 	if (!pidl)
 	{
 	  /* the header titles */
@@ -1350,7 +1350,7 @@
 	}
 
 	return hr;
-}	
+}
 static HRESULT WINAPI IShellFolder_fnMapNameToSCID(
 	IShellFolder2 * iface,
 	LPCWSTR pwszName,
@@ -1359,10 +1359,10 @@
 	_ICOM_THIS_From_IShellFolder2(IGenericSFImpl, iface)
 	FIXME("(%p)\n",This);
 	return E_NOTIMPL;
-}	
+}
 
-static ICOM_VTABLE(IShellFolder2) sfvt = 
-{	
+static ICOM_VTABLE(IShellFolder2) sfvt =
+{
 	ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
 	IShellFolder_fnQueryInterface,
 	IShellFolder_fnAddRef,
@@ -1441,20 +1441,20 @@
 	HRESULT hr;
 	char szText[MAX_PATH];
 	char * szNewFolder = "New Folder";
-	
+
 	TRACE("(%p)(%s %u)\n", This, lpName, uLen);
 
 	if (uLen < strlen(szNewFolder) + 4) return E_POINTER;
-	
+
 	strcpy(lpName, szNewFolder);
-	
+
 	hr = IShellFolder_fnEnumObjects(_IShellFolder2_(This), 0, SHCONTF_FOLDERS | SHCONTF_NONFOLDERS | SHCONTF_INCLUDEHIDDEN, &penum);
 	if (penum)
 	{
 	  LPITEMIDLIST pidl;
 	  DWORD dwFetched;
 	  int i=1;
-	  
+
 next:     IEnumIDList_Reset(penum);
 	  while(S_OK == IEnumIDList_Next(penum, 1, &pidl, &dwFetched) && dwFetched)
 	  {
@@ -1462,7 +1462,7 @@
 	    if (0 == strcasecmp(szText, lpName))
 	    {
 	      sprintf(lpName, "%s %d", szNewFolder, i++);
-	      if (i > 99) 
+	      if (i > 99)
 	      {
 	        hr = E_FAIL;
 	        break;
@@ -1475,7 +1475,7 @@
 	}
 	return hr;
 }
-	
+
 /****************************************************************************
  * ISFHelper_fnAddFolder
  *
@@ -1492,7 +1492,7 @@
 	char lpstrNewDir[MAX_PATH];
 	DWORD bRes;
 	HRESULT hres = E_FAIL;
-	
+
 	TRACE("(%p)(%s %p)\n", This, lpName, ppidlOut);
 
 	strcpy(lpstrNewDir, This->sMyPath);
@@ -1509,7 +1509,7 @@
 
 	  pidl = ILCombine(This->absPidl, pidlitem);
 	  SHChangeNotifyA(SHCNE_MKDIR, SHCNF_IDLIST, pidl, NULL);
-	  SHFree(pidl); 
+	  SHFree(pidl);
 
 	  if (ppidlOut) *ppidlOut = pidlitem;
 	  hres = S_OK;
@@ -1546,11 +1546,11 @@
         BOOL bConfirm = TRUE;
 
 	TRACE("(%p)(%u %p)\n", This, cidl, apidl);
-	
+
 	/* deleting multiple items so give a slightly different warning */
 	if(cidl != 1)
 	{
-          char tmp[8]; 
+          char tmp[8];
           snprintf(tmp, sizeof(tmp), "%d", cidl);
 	  if(!SHELL_WarnItemDelete(ASK_DELETE_MULTIPLE_ITEM, tmp))
             return E_FAIL;
@@ -1574,7 +1574,7 @@
 	    }
 	    pidl = ILCombine(This->absPidl, apidl[i]);
 	    SHChangeNotifyA(SHCNE_RMDIR, SHCNF_IDLIST, pidl, NULL);
-	    SHFree(pidl); 
+	    SHFree(pidl);
 	  }
 	  else if (_ILIsValue(apidl[i]))
 	  {
@@ -1588,7 +1588,7 @@
 	    }
 	    pidl = ILCombine(This->absPidl, apidl[i]);
 	    SHChangeNotifyA(SHCNE_DELETE, SHCNF_IDLIST, pidl, NULL);
-	    SHFree(pidl); 
+	    SHFree(pidl);
 	  }
 
 	}
@@ -1637,7 +1637,7 @@
 	return S_OK;
 }
 
-static ICOM_VTABLE(ISFHelper) shvt = 
+static ICOM_VTABLE(ISFHelper) shvt =
 {
 	ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
 	ISFHelper_fnQueryInterface,
@@ -1703,16 +1703,16 @@
 
 	if(IsEqualIID(riid, &IID_IUnknown))          /*IUnknown*/
 	{
-	  *ppvObj = _IUnknown_(This); 
+	  *ppvObj = _IUnknown_(This);
 	}
 	else if(IsEqualIID(riid, &IID_IShellFolder))  /*IShellFolder*/
 	{
 	  *ppvObj = _IShellFolder_(This);
-	}   
+	}
 	else if(IsEqualIID(riid, &IID_IShellFolder2))  /*IShellFolder2*/
 	{
 	  *ppvObj = _IShellFolder_(This);
-	}   
+	}
 
 	if(*ppvObj)
 	{
@@ -1745,14 +1745,14 @@
 	LPCWSTR		szNext=NULL;
 	LPITEMIDLIST	pidlTemp=NULL;
 	HRESULT		hr=E_OUTOFMEMORY;
-	
+
 	TRACE("(%p)->(HWND=0x%08x,%p,%p=%s,%p,pidl=%p,%p)\n",
 	This,hwndOwner,pbcReserved,lpszDisplayName,
 	debugstr_w(lpszDisplayName),pchEaten,ppidl,pdwAttributes);
 
 	*ppidl = 0;
 	if (pchEaten) *pchEaten = 0;	/* strange but like the original */
-	
+
 	/* FIXME no real parsing implemented */
 	pidlTemp = _ILCreateMyComputer();
 	szNext = lpszDisplayName;
@@ -1775,7 +1775,7 @@
 
 	TRACE("(%p)->(-- ret=0x%08lx)\n", This, hr);
 
-	return hr;	
+	return hr;
 }
 
 /**************************************************************************
@@ -1798,7 +1798,7 @@
 
 	if(!*ppEnumIDList) return E_OUTOFMEMORY;
 
-	return S_OK;		
+	return S_OK;
 }
 
 /**************************************************************************
@@ -1823,7 +1823,7 @@
 	  {
 	    pShellFolder = ISF_MyComputer_Constructor();
 	  }
-	  else 
+	  else
 	  {
 	     /* shell extension */
 	     if (!SUCCEEDED(SHELL32_CoCreateInitSF (This->absPidl, pidl, clsid, riid, (LPVOID*)&pShellFolder)))
@@ -1831,7 +1831,7 @@
 	       return E_INVALIDARG;
 	     }
 	  }
-	} 
+	}
 	else
 	{
 	  /* file system folder on the desktop */
@@ -1853,7 +1853,7 @@
 	  ILFree(deskpidl);
 	  ILFree(firstpidl);
 	}
-	
+
 	if (_ILIsPidlSimple(pidl))	/* no sub folders */
 	{
 	  *ppvOut = pShellFolder;
@@ -1883,7 +1883,7 @@
 	HRESULT		hr = E_INVALIDARG;
 
 	TRACE("(%p)->(hwnd=0x%x,\n\tIID:\t%s,%p)\n",This,hwndOwner,debugstr_guid(riid),ppvOut);
-	
+
 	if(ppvOut)
 	{
 	  *ppvOut = NULL;
@@ -1909,7 +1909,7 @@
 	  }
 	}
 	TRACE("-- (%p)->(interface=%p)\n",This, ppvOut);
-	return hr; 
+	return hr;
 }
 
 /**************************************************************************
@@ -1958,12 +1958,12 @@
 	_ICOM_THIS_From_IShellFolder2(IGenericSFImpl, iface)
 
 	CHAR		szPath[MAX_PATH]= "";
-		
+
 	TRACE("(%p)->(pidl=%p,0x%08lx,%p)\n",This,pidl,dwFlags,strRet);
 	pdump(pidl);
-	
+
 	if(!strRet) return E_INVALIDARG;
-	
+
 	if(!pidl)
 	{
 	  HCR_GetClassName(&CLSID_ShellDesktop, szPath, MAX_PATH);
@@ -1973,7 +1973,7 @@
 	  _ILSimpleGetText(pidl, szPath, MAX_PATH);
 	}
 	else
-	{ 
+	{
 	  if (!SUCCEEDED(SHELL32_GetDisplayNameOfChild(iface, pidl, dwFlags, szPath, MAX_PATH)))
 	    return E_OUTOFMEMORY;
 	}
@@ -1992,7 +1992,7 @@
 	_ICOM_THIS_From_IShellFolder2(IGenericSFImpl, iface)
 	FIXME("(%p)\n",This);
 	return E_NOTIMPL;
-}	
+}
 static HRESULT WINAPI ISF_Desktop_fnEnumSearches(
 	IShellFolder2 * iface,
 	IEnumExtraSearch **ppenum)
@@ -2000,7 +2000,7 @@
 	_ICOM_THIS_From_IShellFolder2(IGenericSFImpl, iface)
 	FIXME("(%p)\n",This);
 	return E_NOTIMPL;
-}	
+}
 static HRESULT WINAPI ISF_Desktop_fnGetDefaultColumn(
 	IShellFolder2 * iface,
 	DWORD dwRes,
@@ -2015,14 +2015,14 @@
 	if (pDisplay) *pDisplay = 0;
 
 	return S_OK;
-}	
+}
 static HRESULT WINAPI ISF_Desktop_fnGetDefaultColumnState(
 	IShellFolder2 * iface,
 	UINT iColumn,
 	DWORD *pcsFlags)
 {
 	_ICOM_THIS_From_IShellFolder2(IGenericSFImpl, iface)
-	
+
 	TRACE("(%p)\n",This);
 
 	if (!pcsFlags || iColumn >= DESKTOPSHELLVIEWCOLUMNS ) return E_INVALIDARG;
@@ -2030,7 +2030,7 @@
 	*pcsFlags = DesktopSFHeader[iColumn].pcsFlags;
 
 	return S_OK;
-}	
+}
 static HRESULT WINAPI ISF_Desktop_fnGetDetailsEx(
 	IShellFolder2 * iface,
 	LPCITEMIDLIST pidl,
@@ -2041,7 +2041,7 @@
 	FIXME("(%p)\n",This);
 
 	return E_NOTIMPL;
-}	
+}
 static HRESULT WINAPI ISF_Desktop_fnGetDetailsOf(
 	IShellFolder2 * iface,
 	LPCITEMIDLIST pidl,
@@ -2049,12 +2049,12 @@
 	SHELLDETAILS *psd)
 {
 	_ICOM_THIS_From_IShellFolder2(IGenericSFImpl, iface)
-	HRESULT hr = E_FAIL;;
+	HRESULT hr = E_FAIL;
 
 	TRACE("(%p)->(%p %i %p)\n",This, pidl, iColumn, psd);
 
 	if (!psd || iColumn >= DESKTOPSHELLVIEWCOLUMNS ) return E_INVALIDARG;
-	
+
 	if (!pidl)
 	{
 	  psd->fmt = DesktopSFHeader[iColumn].fmt;
@@ -2089,7 +2089,7 @@
 	}
 
 	return hr;
-}	
+}
 static HRESULT WINAPI ISF_Desktop_fnMapNameToSCID(
 	IShellFolder2 * iface,
 	LPCWSTR pwszName,
@@ -2098,10 +2098,10 @@
 	_ICOM_THIS_From_IShellFolder2(IGenericSFImpl, iface)
 	FIXME("(%p)\n",This);
 	return E_NOTIMPL;
-}	
+}
 
-static ICOM_VTABLE(IShellFolder2) sfdvt = 
-{	
+static ICOM_VTABLE(IShellFolder2) sfdvt =
+{
 	ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
 	ISF_Desktop_fnQueryInterface,
 	IShellFolder_fnAddRef,
@@ -2185,7 +2185,7 @@
 	WCHAR		szElement[MAX_PATH];
 	CHAR		szTempA[MAX_PATH];
 	LPITEMIDLIST	pidlTemp;
-	
+
 	TRACE("(%p)->(HWND=0x%08x,%p,%p=%s,%p,pidl=%p,%p)\n",
 	This,hwndOwner,pbcReserved,lpszDisplayName,
 	debugstr_w(lpszDisplayName),pchEaten,ppidl,pdwAttributes);
@@ -2218,7 +2218,7 @@
 
 	TRACE("(%p)->(-- ret=0x%08lx)\n", This, hr);
 
-	return hr;	
+	return hr;
 }
 
 /**************************************************************************
@@ -2241,7 +2241,7 @@
 
 	if(!*ppEnumIDList) return E_OUTOFMEMORY;
 
-	return S_OK;		
+	return S_OK;
 }
 
 /**************************************************************************
@@ -2309,7 +2309,7 @@
 	HRESULT		hr = E_INVALIDARG;
 
 	TRACE("(%p)->(hwnd=0x%x,\n\tIID:\t%s,%p)\n",This,hwndOwner,debugstr_guid(riid),ppvOut);
-	
+
 	if(ppvOut)
 	{
 	  *ppvOut = NULL;
@@ -2335,7 +2335,7 @@
 	  }
 	}
 	TRACE("-- (%p)->(interface=%p)\n",This, ppvOut);
-	return hr; 
+	return hr;
 }
 
 /**************************************************************************
@@ -2386,17 +2386,17 @@
 	char		szPath[MAX_PATH], szDrive[18];
 	int		len = 0;
 	BOOL		bSimplePidl;
-		
+
 	TRACE("(%p)->(pidl=%p,0x%08lx,%p)\n",This,pidl,dwFlags,strRet);
 	pdump(pidl);
-	
+
 	if(!strRet) return E_INVALIDARG;
-	
+
 	szPath[0]=0x00; szDrive[0]=0x00;
-	
-	
+
+
 	bSimplePidl = _ILIsPidlSimple(pidl);
-	
+
 	if (_ILIsSpecialFolder(pidl))
 	{
 	  /* take names of special folders only if its only this folder */
@@ -2427,9 +2427,9 @@
 	    strcpy (szPath, szDrive);
 	  }
 	}
-	
+
 	if (!bSimplePidl)	/* go deeper if needed */
-	{ 
+	{
 	  PathAddBackslashA(szPath);
 	  len = strlen(szPath);
 
@@ -2451,7 +2451,7 @@
 	_ICOM_THIS_From_IShellFolder2(IGenericSFImpl, iface)
 	FIXME("(%p)\n",This);
 	return E_NOTIMPL;
-}	
+}
 static HRESULT WINAPI ISF_MyComputer_fnEnumSearches(
 	IShellFolder2 * iface,
 	IEnumExtraSearch **ppenum)
@@ -2459,7 +2459,7 @@
 	_ICOM_THIS_From_IShellFolder2(IGenericSFImpl, iface)
 	FIXME("(%p)\n",This);
 	return E_NOTIMPL;
-}	
+}
 static HRESULT WINAPI ISF_MyComputer_fnGetDefaultColumn(
 	IShellFolder2 * iface,
 	DWORD dwRes,
@@ -2474,14 +2474,14 @@
 	if (pDisplay) *pDisplay = 0;
 
 	return S_OK;
-}	
+}
 static HRESULT WINAPI ISF_MyComputer_fnGetDefaultColumnState(
 	IShellFolder2 * iface,
 	UINT iColumn,
 	DWORD *pcsFlags)
 {
 	_ICOM_THIS_From_IShellFolder2(IGenericSFImpl, iface)
-	
+
 	TRACE("(%p)\n",This);
 
 	if (!pcsFlags || iColumn >= MYCOMPUTERSHELLVIEWCOLUMNS ) return E_INVALIDARG;
@@ -2489,7 +2489,7 @@
 	*pcsFlags = MyComputerSFHeader[iColumn].pcsFlags;
 
 	return S_OK;
-}	
+}
 static HRESULT WINAPI ISF_MyComputer_fnGetDetailsEx(
 	IShellFolder2 * iface,
 	LPCITEMIDLIST pidl,
@@ -2500,7 +2500,7 @@
 	FIXME("(%p)\n",This);
 
 	return E_NOTIMPL;
-}	
+}
 
 /* FIXME: drive size >4GB is rolling over */
 static HRESULT WINAPI ISF_MyComputer_fnGetDetailsOf(
@@ -2515,7 +2515,7 @@
 	TRACE("(%p)->(%p %i %p)\n",This, pidl, iColumn, psd);
 
 	if (!psd || iColumn >= MYCOMPUTERSHELLVIEWCOLUMNS ) return E_INVALIDARG;
-	
+
 	if (!pidl)
 	{
 	  psd->fmt = MyComputerSFHeader[iColumn].fmt;
@@ -2560,7 +2560,7 @@
 	}
 
 	return hr;
-}	
+}
 static HRESULT WINAPI ISF_MyComputer_fnMapNameToSCID(
 	IShellFolder2 * iface,
 	LPCWSTR pwszName,
@@ -2569,10 +2569,10 @@
 	_ICOM_THIS_From_IShellFolder2(IGenericSFImpl, iface)
 	FIXME("(%p)\n",This);
 	return E_NOTIMPL;
-}	
+}
 
-static ICOM_VTABLE(IShellFolder2) sfmcvt = 
-{	
+static ICOM_VTABLE(IShellFolder2) sfmcvt =
+{
 	ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
 	IShellFolder_fnQueryInterface,
 	IShellFolder_fnAddRef,
@@ -2710,7 +2710,7 @@
 	LPITEMIDLIST * pidl)
 {
 	_ICOM_THIS_From_IPersistFolder2(IGenericSFImpl, iface);
-	
+
 	TRACE("(%p)->(%p)\n",This, pidl);
 
 	if (!pidl) return E_POINTER;
@@ -2720,7 +2720,7 @@
 	return S_OK;
 }
 
-static ICOM_VTABLE(IPersistFolder2) psfvt = 
+static ICOM_VTABLE(IPersistFolder2) psfvt =
 {
 	ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
 	ISFPersistFolder2_QueryInterface,
@@ -2742,13 +2742,13 @@
 	DWORD dwEffect = *pdwEffect;
 
 	_ICOM_THIS_From_IDropTarget(IGenericSFImpl,iface);
-	
+
 	*pdwEffect = DROPEFFECT_NONE;
 
 	if (This->fAcceptFmt)
 	{ /* Does our interpretation of the keystate ... */
 	  *pdwEffect = KeyStateToDropEffect(dwKeyState);
-	  
+
 	  /* ... matches the desired effect ? */
 	  if (dwEffect & *pdwEffect)
 	  {
@@ -2794,9 +2794,9 @@
 	DWORD		dwKeyState,
 	POINTL		pt,
 	DWORD		*pdwEffect)
-{	
+{
 	FORMATETC	fmt;
-	
+
 	_ICOM_THIS_From_IDropTarget(IGenericSFImpl,iface);
 
 	TRACE("(%p)->(DataObject=%p)\n",This,pDataObject);
@@ -2819,7 +2819,7 @@
 	_ICOM_THIS_From_IDropTarget(IGenericSFImpl,iface);
 
 	TRACE("(%p)\n",This);
-	
+
 	if(!pdwEffect) return E_INVALIDARG;
 
 	ISFDropTarget_QueryDrop(iface, dwKeyState, pdwEffect);
@@ -2835,7 +2835,7 @@
 	TRACE("(%p)\n",This);
 
 	This->fAcceptFmt = FALSE;
-	
+
 	return S_OK;
 }
 
@@ -2853,7 +2853,7 @@
 	return E_NOTIMPL;
 }
 
-static struct ICOM_VTABLE(IDropTarget) dtvt = 
+static struct ICOM_VTABLE(IDropTarget) dtvt =
 {
 	ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
 	ISFDropTarget_QueryInterface,
diff --git a/dlls/shell32/shlmenu.c b/dlls/shell32/shlmenu.c
index 0cf70af..b81ac3b 100644
--- a/dlls/shell32/shlmenu.c
+++ b/dlls/shell32/shlmenu.c
@@ -84,7 +84,7 @@
 	  ERR("menudata corrupt: %p %lu\n", menudata, MenuInfo.cbSize);
 	  return 0;
 	}
-	
+
 	return menudata;
 
 }
@@ -103,13 +103,13 @@
 	LPFMINFO	menudata;
 
 	TRACE("\n");
-	
+
 	menudata = FM_GetMenuInfo(hmenu);
-	
+
 	if ( menudata->pidl)
 	{ SHFree(menudata->pidl);
 	}
-	
+
 	menudata->uID = uID;
 	menudata->pidl = ILClone(pidl);
 	menudata->uFlags = uFlags;
@@ -143,16 +143,16 @@
 	  return FALSE;
 
 	menudata = (LPFMINFO)MenuInfo.dwMenuData;
-	
+
 	if ((menudata == 0) || (MenuInfo.cbSize != sizeof(MENUINFO)))
 	{
 	  ERR("menudata corrupt: %p %lu\n", menudata, MenuInfo.cbSize);
 	  return 0;
 	}
-	
+
 	if (menudata->bInitialized)
 	  return 0;
-	
+
 	pidl = ((pAlternatePidl) ? pAlternatePidl : menudata->pidl);
 	if (!pidl)
 	  return 0;
@@ -164,7 +164,7 @@
 	menudata->bInitialized = FALSE;
 
 	SetMenuInfo(hmenu, &MenuInfo);
-	
+
 	if (SUCCEEDED (SHGetDesktopFolder(&lpsf)))
 	{
 	  if (SUCCEEDED(IShellFolder_BindToObject(lpsf, pidl,0,(REFIID)&IID_IShellFolder,(LPVOID *)&lpsf2)))
@@ -189,7 +189,7 @@
 		    LPFMINFO lpFmMi;
 		    MENUINFO MenuInfo;
 		    HMENU hMenuPopup = CreatePopupMenu();
-	
+
 		    lpFmMi = (LPFMINFO) HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(FMINFO));
 
 		    lpFmMi->pidl = ILCombine(pidl, pidlTemp);
@@ -240,7 +240,7 @@
  *
  * NOTES
  *  for non-root menus values are
- *  (ffffffff,00000000,00000000,00000000,00000000) 
+ *  (ffffffff,00000000,00000000,00000000,00000000)
  */
 HMENU WINAPI FileMenu_Create (
 	COLORREF crBorderColor,
@@ -283,7 +283,7 @@
 	TRACE("0x%08x\n", hmenu);
 
 	FileMenu_DeleteAllItems (hmenu);
-	
+
 	menudata = FM_GetMenuInfo(hmenu);
 
 	if ( menudata->pidl)
@@ -316,9 +316,9 @@
 	TRACE("0x%08x %s 0x%08x 0x%08x 0x%08x 0x%08x\n",
 	hMenu, (lpszText!=FM_SEPARATOR) ? lpText: NULL,
 	uID, icon, hMenuPopup, nItemHeight);
-	
+
 	ZeroMemory (&mii, sizeof(MENUITEMINFOA));
-	
+
 	mii.cbSize = sizeof(MENUITEMINFOA);
 
 	if (lpText != FM_SEPARATOR)
@@ -331,7 +331,7 @@
 	  mii.fMask = MIIM_DATA;
 	  mii.dwItemData = (DWORD) myItem;
 	}
-	
+
 	if ( hMenuPopup )
 	{ /* sub menu */
 	  mii.fMask |= MIIM_TYPE | MIIM_SUBMENU;
@@ -409,7 +409,7 @@
 	UINT uFlags,
 	UINT uEnumFlags,
 	LPFNFMCALLBACK lpfnCallback)
-{	
+{
 	TRACE("0x%08x 0x%08x %p 0x%08x 0x%08x %p\n",
 	hmenu, uID, pidl, uFlags, uEnumFlags, lpfnCallback);
 
@@ -417,7 +417,7 @@
 
 	bAbortInit = FALSE;
 
-	FM_SetMenuParameter(hmenu, uID, pidl, uFlags, uEnumFlags, lpfnCallback);	
+	FM_SetMenuParameter(hmenu, uID, pidl, uFlags, uEnumFlags, lpfnCallback);
 
 	return FM_InitMenuPopup(hmenu, NULL);
 }
@@ -436,10 +436,10 @@
 {
 	TRACE("0x%08x 0x%08x %p 0x%08x %p\n",
 	hmenu, uID, pidl, uEnumFlags, lpfnCallback);
-	
+
 	FileMenu_DeleteAllItems (hmenu);
 
-	FM_SetMenuParameter(hmenu, uID, pidl, 0, uEnumFlags, lpfnCallback);	
+	FM_SetMenuParameter(hmenu, uID, pidl, 0, uEnumFlags, lpfnCallback);
 
 	return FM_InitMenuPopup(hmenu, NULL);
 }
@@ -449,7 +449,7 @@
  */
 void WINAPI FileMenu_Invalidate (HMENU hMenu)
 {
-	FIXME("0x%08x\n",hMenu);	
+	FIXME("0x%08x\n",hMenu);
 }
 
 /*************************************************************************
@@ -459,7 +459,7 @@
 	HMENU	hMenu,
 	LPCITEMIDLIST	pidl)
 {
-	FIXME("0x%08x %p\n",hMenu, pidl);	
+	FIXME("0x%08x %p\n",hMenu, pidl);
 	return 0;
 }
 
@@ -474,15 +474,15 @@
 	LPFMINFO	menudata;
 
 	menudata = FM_GetMenuInfo(hmenu);
-	
+
 	menudata->bInitialized = FALSE;
-	
+
 	FM_InitMenuPopup(hmenu, pidl);
 
 	if (bAddSeperator)
 	  FileMenu_AppendItemA (hmenu, FM_SEPARATOR, 0, 0, 0, FM_DEFAULT_HEIGHT);
 
-	TRACE("0x%08x %p 0x%08x\n",hmenu, pidl,bAddSeperator);	
+	TRACE("0x%08x %p 0x%08x\n",hmenu, pidl,bAddSeperator);
 
 	return 0;
 }
@@ -554,11 +554,11 @@
 	HDC hdc = GetDC(hWnd);
 	SIZE size;
 	LPFMINFO menuinfo;
-		
+
 	TRACE("0x%08x %p %s\n", hWnd, lpmis, pMyItem->szItemText);
-	
+
 	GetTextExtentPoint32A(hdc, pMyItem->szItemText, pMyItem->cchItemText, &size);
-	
+
 	lpmis->itemWidth = size.cx + FM_LEFTBORDER + FM_ICON_SIZE + FM_SPACE1 + FM_SPACE2 + FM_RIGHTBORDER;
 	lpmis->itemHeight = (size.cy > (FM_ICON_SIZE + FM_Y_SPACE)) ? size.cy : (FM_ICON_SIZE + FM_Y_SPACE);
 
@@ -566,7 +566,7 @@
 	menuinfo = FM_GetMenuInfo(pMyItem->hMenu);
 	if (menuinfo->nBorderWidth)
 	  lpmis->itemWidth += menuinfo->nBorderWidth;
-	
+
 	TRACE("-- 0x%04x 0x%04x\n", lpmis->itemWidth, lpmis->itemHeight);
 	ReleaseDC (hWnd, hdc);
 	return 0;
@@ -584,9 +584,9 @@
 	HIMAGELIST hImageList;
 	RECT TextRect, BorderRect;
 	LPFMINFO menuinfo;
-	
+
 	TRACE("0x%08x %p %s\n", hWnd, lpdis, pMyItem->szItemText);
-	
+
 	if (lpdis->itemState & ODS_SELECTED)
 	{
 	  clrPrevText = SetTextColor(lpdis->hDC, GetSysColor (COLOR_HIGHLIGHTTEXT));
@@ -597,14 +597,14 @@
 	  clrPrevText = SetTextColor(lpdis->hDC, GetSysColor (COLOR_MENUTEXT));
 	  clrPrevBkgnd = SetBkColor(lpdis->hDC, GetSysColor (COLOR_MENU));
 	}
-	
+
 	CopyRect(&TextRect, &(lpdis->rcItem));
 
 	/* add the menubitmap */
 	menuinfo = FM_GetMenuInfo(pMyItem->hMenu);
 	if (menuinfo->nBorderWidth)
 	  TextRect.left += menuinfo->nBorderWidth;
-	
+
 	BorderRect.right = menuinfo->nBorderWidth;
 /*	FillRect(lpdis->hDC, &BorderRect, CreateSolidBrush( menuinfo->crBorderColor));
 */
@@ -617,12 +617,12 @@
 	yt = yi;
 
 	ExtTextOutA (lpdis->hDC, xt , yt, ETO_OPAQUE, &TextRect, pMyItem->szItemText, pMyItem->cchItemText, NULL);
-	
+
 	Shell_GetImageList(0, &hImageList);
 	ImageList_Draw(hImageList, pMyItem->iIconIndex, lpdis->hDC, xi, yi, ILD_NORMAL);
 
 	TRACE("-- 0x%04x 0x%04x 0x%04x 0x%04x\n", TextRect.left, TextRect.top, TextRect.right, TextRect.bottom);
-	
+
 	SetTextColor(lpdis->hDC, clrPrevText);
 	SetBkColor(lpdis->hDC, clrPrevBkgnd);
 
@@ -633,7 +633,7 @@
  * FileMenu_InitMenuPopup			[SHELL32.109]
  *
  * NOTES
- *  The filemenu is a ownerdrawn menu. Call this function responding to 
+ *  The filemenu is a ownerdrawn menu. Call this function responding to
  *  WM_INITPOPUPMENU
  *
  */
@@ -661,14 +661,14 @@
  *  exported by name
  */
 BOOL WINAPI FileMenu_DeleteAllItems (HMENU hmenu)
-{	
+{
 	MENUITEMINFOA	mii;
 	LPFMINFO	menudata;
 
 	int i;
-	
+
 	TRACE("0x%08x\n", hmenu);
-	
+
 	ZeroMemory ( &mii, sizeof(MENUITEMINFOA));
 	mii.cbSize = sizeof(MENUITEMINFOA);
 	mii.fMask = MIIM_SUBMENU|MIIM_DATA;
@@ -682,13 +682,13 @@
 	  if (mii.hSubMenu)
 	    FileMenu_Destroy(mii.hSubMenu);
 	}
-	
+
 	while (DeleteMenu (hmenu, 0, MF_BYPOSITION)){};
 
 	menudata = FM_GetMenuInfo(hmenu);
-	
+
 	menudata->bInitialized = FALSE;
-	
+
 	return TRUE;
 }
 
@@ -701,7 +701,7 @@
 	MENUITEMINFOA mii;
 
 	TRACE("0x%08x 0x%08x\n", hMenu, uID);
-	
+
 	ZeroMemory ( &mii, sizeof(MENUITEMINFOA));
 	mii.cbSize = sizeof(MENUITEMINFOA);
 	mii.fMask = MIIM_SUBMENU;
@@ -773,13 +773,13 @@
 
 /*************************************************************************
  * FileMenu_GetItemExtent			[SHELL32.144]
- * 
+ *
  * NOTES
  *  if the menu is too big, entries are getting cut away!!
  */
 DWORD WINAPI FileMenu_GetItemExtent (HMENU hMenu, UINT uPos)
 {	RECT rect;
-	
+
 	FIXME("0x%08x 0x%08x\n", hMenu, uPos);
 
 	if (GetMenuItemRect(0, hMenu, uPos, &rect))
@@ -869,7 +869,7 @@
 	}
 	else
 	{
-	  bAlreadySeparated = _SHIsMenuSeparator(hmDst, uInsert);;
+	  bAlreadySeparated = _SHIsMenuSeparator(hmDst, uInsert);
 	}
 
 	if ((uFlags & MM_ADDSEPARATOR) && !bAlreadySeparated)
diff --git a/dlls/shell32/shlview.c b/dlls/shell32/shlview.c
index 8fdf99b..bd9085d 100644
--- a/dlls/shell32/shlview.c
+++ b/dlls/shell32/shlview.c
@@ -4,8 +4,8 @@
  *	Copyright 1998,1999	<juergen.schmied@debitel.net>
  *
  * This is the view visualizing the data provied by the shellfolder.
- * No direct access to data from pidls should be done from here. 
- * 
+ * No direct access to data from pidls should be done from here.
+ *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
  * License as published by the Free Software Foundation; either
@@ -33,7 +33,7 @@
  * FIXME: implement the drag and drop in the old (msg-based) way
  *
  * FIXME: when the ShellView_WndProc gets a WM_NCDESTROY should we do a
- * Release() ??? 
+ * Release() ???
  */
 
 #include <stdlib.h>
@@ -62,7 +62,7 @@
     INT     nLastHeaderID;
 }LISTVIEW_SORT_INFO, *LPLISTVIEW_SORT_INFO;
 
-typedef struct 
+typedef struct
 {	ICOM_VFIELD(IShellView);
 	DWORD		ref;
 	ICOM_VTABLE(IOleCommandTarget)*	lpvtblOleCommandTarget;
@@ -89,20 +89,20 @@
 static struct ICOM_VTABLE(IShellView) svvt;
 
 static struct ICOM_VTABLE(IOleCommandTarget) ctvt;
-#define _IOleCommandTarget_Offset ((int)(&(((IShellViewImpl*)0)->lpvtblOleCommandTarget))) 
-#define _ICOM_THIS_From_IOleCommandTarget(class, name) class* This = (class*)(((char*)name)-_IOleCommandTarget_Offset); 
+#define _IOleCommandTarget_Offset ((int)(&(((IShellViewImpl*)0)->lpvtblOleCommandTarget)))
+#define _ICOM_THIS_From_IOleCommandTarget(class, name) class* This = (class*)(((char*)name)-_IOleCommandTarget_Offset);
 
 static struct ICOM_VTABLE(IDropTarget) dtvt;
-#define _IDropTarget_Offset ((int)(&(((IShellViewImpl*)0)->lpvtblDropTarget))) 
-#define _ICOM_THIS_From_IDropTarget(class, name) class* This = (class*)(((char*)name)-_IDropTarget_Offset); 
+#define _IDropTarget_Offset ((int)(&(((IShellViewImpl*)0)->lpvtblDropTarget)))
+#define _ICOM_THIS_From_IDropTarget(class, name) class* This = (class*)(((char*)name)-_IDropTarget_Offset);
 
 static struct ICOM_VTABLE(IDropSource) dsvt;
-#define _IDropSource_Offset ((int)(&(((IShellViewImpl*)0)->lpvtblDropSource))) 
-#define _ICOM_THIS_From_IDropSource(class, name) class* This = (class*)(((char*)name)-_IDropSource_Offset); 
+#define _IDropSource_Offset ((int)(&(((IShellViewImpl*)0)->lpvtblDropSource)))
+#define _ICOM_THIS_From_IDropSource(class, name) class* This = (class*)(((char*)name)-_IDropSource_Offset);
 
 static struct ICOM_VTABLE(IViewObject) vovt;
-#define _IViewObject_Offset ((int)(&(((IShellViewImpl*)0)->lpvtblViewObject))) 
-#define _ICOM_THIS_From_IViewObject(class, name) class* This = (class*)(((char*)name)-_IViewObject_Offset); 
+#define _IViewObject_Offset ((int)(&(((IShellViewImpl*)0)->lpvtblViewObject)))
+#define _ICOM_THIS_From_IViewObject(class, name) class* This = (class*)(((char*)name)-_IViewObject_Offset);
 
 /* ListView Header ID's */
 #define LISTVIEW_COLUMN_NAME 0
@@ -125,7 +125,7 @@
 #define GET_WM_COMMAND_HWND(wp, lp)             (HWND)(lp)
 #define GET_WM_COMMAND_CMD(wp, lp)              HIWORD(wp)
 
-extern void WINAPI _InsertMenuItem (HMENU hmenu, UINT indexMenu, BOOL fByPosition, 
+extern void WINAPI _InsertMenuItem (HMENU hmenu, UINT indexMenu, BOOL fByPosition,
 			UINT wID, UINT fType, LPSTR dwTypeData, UINT fState);
 
 /*
@@ -140,7 +140,7 @@
    BYTE  bStyle;
 } MYTOOLINFO, *LPMYTOOLINFO;
 
-MYTOOLINFO Tools[] = 
+MYTOOLINFO Tools[] =
 {
 { FCIDM_SHVIEW_BIGICON,    0, 0, IDS_VIEW_LARGE,   TBSTATE_ENABLED, TBSTYLE_BUTTON },
 { FCIDM_SHVIEW_SMALLICON,  0, 0, IDS_VIEW_SMALL,   TBSTATE_ENABLED, TBSTYLE_BUTTON },
@@ -167,7 +167,7 @@
 	sv->pSFParent = pFolder;
 	if(pFolder) IShellFolder_AddRef(pFolder);
 	IShellFolder_QueryInterface(sv->pSFParent, &IID_IShellFolder2, (LPVOID*)&sv->pSF2Parent);
-	
+
 	TRACE("(%p)->(%p)\n",sv, pFolder);
 	shell32_ObjCount++;
 	return (IShellView *) sv;
@@ -184,7 +184,7 @@
 static HRESULT IncludeObject(IShellViewImpl * This, LPCITEMIDLIST pidl)
 {
 	HRESULT ret = S_OK;
-	
+
 	if ( IsInCommDlg(This) )
 	{
 	  TRACE("ICommDlgBrowser::IncludeObject pidl=%p\n", pidl);
@@ -197,7 +197,7 @@
 static HRESULT OnDefaultCommand(IShellViewImpl * This)
 {
 	HRESULT ret = S_FALSE;
-	
+
 	if (IsInCommDlg(This))
 	{
 	  TRACE("ICommDlgBrowser::OnDefaultCommand\n");
@@ -222,7 +222,7 @@
 /**********************************************************
  *	set the toolbar of the filedialog buttons
  *
- * - activates the buttons from the shellbrowser according to 
+ * - activates the buttons from the shellbrowser according to
  *   the view state
  */
 static void CheckToolbar(IShellViewImpl * This)
@@ -230,7 +230,7 @@
 	LRESULT result;
 
 	TRACE("\n");
-	
+
 	if (IsInCommDlg(This))
 	{
 	  IShellBrowser_SendControlMsg(This->pShellBrowser, FCW_TOOLBAR, TB_CHECKBUTTON,
@@ -350,11 +350,11 @@
 	return TRUE;
 }
 /**********************************************************
-* ShellView_CompareItems() 
+* ShellView_CompareItems()
 *
 * NOTES
 *  internal, CALLBACK for DSA_Sort
-*/   
+*/
 static INT CALLBACK ShellView_CompareItems(LPVOID lParam1, LPVOID lParam2, LPARAM lpData)
 {
 	int ret;
@@ -362,7 +362,7 @@
 
 	if(!lpData) return 0;
 
-	ret =  (SHORT) SCODE_CODE(IShellFolder_CompareIDs((LPSHELLFOLDER)lpData, 0, (LPITEMIDLIST)lParam1, (LPITEMIDLIST)lParam2));  
+	ret =  (SHORT) SCODE_CODE(IShellFolder_CompareIDs((LPSHELLFOLDER)lpData, 0, (LPITEMIDLIST)lParam1, (LPITEMIDLIST)lParam2));
 	TRACE("ret=%i\n",ret);
 	return ret;
 }
@@ -378,17 +378,17 @@
  *     lpData        [I] The column ID for the header Ctrl to process
  *
  * RETURNS
- *     A negative value if the first item should precede the second, 
- *     a positive value if the first item should follow the second, 
+ *     A negative value if the first item should precede the second,
+ *     a positive value if the first item should follow the second,
  *     or zero if the two items are equivalent
  *
  * NOTES
  *	FIXME: function does what ShellView_CompareItems is supposed to do.
  *	unify it and figure out how to use the undocumented first parameter
  *	of IShellFolder_CompareIDs to do the job this function does and
- *	move this code to IShellFolder. 
+ *	move this code to IShellFolder.
  *	make LISTVIEW_SORT_INFO obsolete
- *	the way this function works is only usable if we had only 
+ *	the way this function works is only usable if we had only
  *	filesystemfolders  (25/10/99 jsch)
  */
 static INT CALLBACK ShellView_ListViewCompareItems(LPVOID lParam1, LPVOID lParam2, LPARAM lpData)
@@ -412,9 +412,9 @@
         nDiff = bIsFolder1 ? -1 : 1;
     }
     else
-    {   
+    {
         /* Sort by Time: Folders or Files can be sorted */
- 
+
         if(pSortInfo->nHeaderID == LISTVIEW_COLUMN_TIME)
         {
             _ILGetFileDateTime(pItemIdList1, &fd1);
@@ -451,7 +451,7 @@
         }
     }
     /*  If the Date, FileSize, FileType, Attrib was the same, sort by FileName */
-        
+
     if(nDiff == 0)
     {
         _ILSimpleGetText(pItemIdList1, strName1, MAX_PATH);
@@ -470,7 +470,7 @@
 
 /**********************************************************
 *  LV_FindItemByPidl()
-*/   
+*/
 static int LV_FindItemByPidl(
 	IShellViewImpl * This,
 	LPCITEMIDLIST pidl)
@@ -555,7 +555,7 @@
 * - gets the objectlist from the shellfolder
 * - sorts the list
 * - fills the list into the view
-*/   
+*/
 
 static HRESULT ShellView_FillList(IShellViewImpl * This)
 {
@@ -568,7 +568,7 @@
 
 	TRACE("%p\n",This);
 
-	/* get the itemlist from the shfolder*/  
+	/* get the itemlist from the shfolder*/
 	hRes = IShellFolder_EnumObjects(This->pSFParent,This->hWnd, SHCONTF_NONFOLDERS | SHCONTF_FOLDERS, &pEnumIDList);
 	if (hRes != S_OK)
 	{
@@ -577,7 +577,7 @@
 	  return(hRes);
 	}
 
-	/* create a pointer array */	
+	/* create a pointer array */
 	hdpa = pDPA_Create(16);
 	if (!hdpa)
 	{
@@ -590,14 +590,14 @@
 	  if (pDPA_InsertPtr(hdpa, 0x7fff, pidl) == -1)
 	  {
 	    SHFree(pidl);
-	  } 
+	  }
 	}
 
 	/* sort the array */
 	pDPA_Sort(hdpa, ShellView_CompareItems, (LPARAM)This->pSFParent);
 
 	/*turn the listview's redrawing off*/
-	SendMessageA(This->hWndList, WM_SETREDRAW, FALSE, 0); 
+	SendMessageA(This->hWndList, WM_SETREDRAW, FALSE, 0);
 
 	for (i=0; i < DPA_GetPtrCount(hdpa); ++i) 	/* DPA_GetPtrCount is a macro*/
 	{
@@ -614,19 +614,19 @@
 
 	IEnumIDList_Release(pEnumIDList); /* destroy the list*/
 	pDPA_Destroy(hdpa);
-	
+
 	return S_OK;
 }
 
 /**********************************************************
 *  ShellView_OnCreate()
-*/   
+*/
 static LRESULT ShellView_OnCreate(IShellViewImpl * This)
 {
 	IDropTarget* pdt;
 	NOTIFYREGISTER ntreg;
 	IPersistFolder2 * ppf2 = NULL;
-	
+
 	TRACE("%p\n",This);
 
 	if(ShellView_CreateList(This))
@@ -636,7 +636,7 @@
 	    ShellView_FillList(This);
 	  }
 	}
-	
+
 	if(GetShellOle())
 	{
 	  if (SUCCEEDED(IShellFolder_CreateViewObject(This->pSFParent, This->hWnd, &IID_IDropTarget, (LPVOID*)&pdt)))
@@ -658,7 +658,7 @@
 	}
 
 	This->hAccel = LoadAcceleratorsA(shell32_hInstance, "shv_accel");
-	
+
 	return S_OK;
 }
 
@@ -684,7 +684,7 @@
 
 	  /*add the menu items*/
 	  for(i = 0; i < nTools; i++)
-	  { 
+	  {
 	    LoadStringA(shell32_hInstance, Tools[i].idMenuString, szText, MAX_PATH);
 
 	    ZeroMemory(&mii, sizeof(mii));
@@ -721,7 +721,7 @@
 	  _InsertMenuItem(hSubMenu, 0, TRUE, IDM_MYFILEITEM, MFT_STRING, "dummy45", MFS_ENABLED);
 
 	}
-	TRACE("--\n");	
+	TRACE("--\n");
 }
 
 /**********************************************************
@@ -739,7 +739,7 @@
 
 	  ZeroMemory(&mii, sizeof(mii));
 	  mii.cbSize = sizeof(mii);
-	  mii.fMask = MIIM_SUBMENU | MIIM_TYPE | MIIM_DATA;;
+	  mii.fMask = MIIM_SUBMENU | MIIM_TYPE | MIIM_DATA;
 	  mii.fType = MFT_STRING;
 	  mii.dwTypeData = "View";
 	  mii.hSubMenu = LoadMenuA(shell32_hInstance, "MENU_001");
@@ -754,7 +754,7 @@
 *
 * RETURNS
 *  number of selected items
-*/   
+*/
 static UINT ShellView_GetSelections(IShellViewImpl * This)
 {
 	LVITEMA	lvItem;
@@ -769,7 +769,7 @@
 	This->apidl = (LPITEMIDLIST*)SHAlloc(This->cidl * sizeof(LPITEMIDLIST));
 
 	TRACE("selected=%i\n", This->cidl);
-	
+
 	if(This->apidl)
 	{
 	  TRACE("-- Items selected =%u\n", This->cidl);
@@ -804,13 +804,13 @@
 	LPCONTEXTMENU	pContextMenu = NULL;
 	IContextMenu *	pCM = NULL;
 	CMINVOKECOMMANDINFO	cmi;
-	
+
 	TRACE("(%p)->(0x%08x 0x%08x 0x%08x) stub\n",This, x, y, bDefault);
 
 	/* look, what's selected and create a context menu object of it*/
 	if( ShellView_GetSelections(This) )
 	{
-	  IShellFolder_GetUIObjectOf( This->pSFParent, This->hWndParent, This->cidl, This->apidl, 
+	  IShellFolder_GetUIObjectOf( This->pSFParent, This->hWndParent, This->cidl, This->apidl,
 					(REFIID)&IID_IContextMenu, NULL, (LPVOID *)&pContextMenu);
 
 	  if(pContextMenu)
@@ -842,7 +842,7 @@
 		{
 		  TRACE("-- track popup\n");
 		  uCommand = TrackPopupMenu( hMenu,TPM_LEFTALIGN | TPM_RETURNCMD,x,y,0,This->hWnd,NULL);
-		}		
+		}
 
 		if(uCommand > 0)
 		{
@@ -870,7 +870,7 @@
 	  }
 	}
 	else	/* background context menu */
-	{ 
+	{
 	  hMenu = CreatePopupMenu();
 
 	  pCM = ISvBgCm_Constructor(This->pSFParent);
@@ -915,7 +915,7 @@
 *
 * NOTES
 *  internal
-*/   
+*/
 static void ShellView_OnDeactivate(IShellViewImpl * This)
 {
 	TRACE("%p\n",This);
@@ -936,13 +936,13 @@
 
 /**********************************************************
 * ShellView_OnActivate()
-*/   
+*/
 static LRESULT ShellView_OnActivate(IShellViewImpl * This, UINT uState)
 {	OLEMENUGROUPWIDTHS   omw = { {0, 0, 0, 0, 0, 0} };
 	MENUITEMINFOA         mii;
 	CHAR                szText[MAX_PATH];
 
-	TRACE("%p uState=%x\n",This,uState);    
+	TRACE("%p uState=%x\n",This,uState);
 
 	/*don't do anything if the state isn't really changing */
 	if(This->uState == uState)
@@ -961,7 +961,7 @@
 	  if(This->hMenu)
 	  {
 	    IShellBrowser_InsertMenusSB(This->pShellBrowser, This->hMenu, &omw);
-	    TRACE("-- after fnInsertMenusSB\n");    
+	    TRACE("-- after fnInsertMenusSB\n");
 
 	    /*build the top level menu get the menu item's text*/
 	    strcpy(szText,"dummy 31");
@@ -1003,12 +1003,12 @@
 	        ShellView_MergeFileMenu(This, mii.hSubMenu);
 	      }
 	    }
-	    TRACE("-- before fnSetMenuSB\n");      
+	    TRACE("-- before fnSetMenuSB\n");
 	    IShellBrowser_SetMenuSB(This->pShellBrowser, This->hMenu, 0, This->hWnd);
 	  }
 	}
 	This->uState = uState;
-	TRACE("--\n");    
+	TRACE("--\n");
 	return S_OK;
 }
 
@@ -1021,7 +1021,7 @@
 	TRACE("%p\n",This);
 
 	/* Tell the browser one of our windows has received the focus. This
-	should always be done before merging menus (OnActivate merges the 
+	should always be done before merging menus (OnActivate merges the
 	menus) if one of our windows has the focus.*/
 
 	IShellBrowser_OnViewWindowActive(This->pShellBrowser,(IShellView*) This);
@@ -1038,7 +1038,7 @@
 
 /**********************************************************
 * ShellView_OnKillFocus()
-*/   
+*/
 static LRESULT ShellView_OnKillFocus(IShellViewImpl * This)
 {
 	TRACE("(%p) stub\n",This);
@@ -1055,7 +1055,7 @@
 *
 * NOTES
 *	the CmdID's are the ones from the context menu
-*/   
+*/
 static LRESULT ShellView_OnCommand(IShellViewImpl * This,DWORD dwCmdID, DWORD dwCmd, HWND hwndCmd)
 {
 	TRACE("(%p)->(0x%08lx 0x%08lx 0x%08x) stub\n",This, dwCmdID, dwCmd, hwndCmd);
@@ -1096,7 +1096,7 @@
 	    This->ListViewSortInfo.nLastHeaderID = This->ListViewSortInfo.nHeaderID;
 	    ListView_SortItems(This->hWndList, ShellView_ListViewCompareItems, (LPARAM) (&(This->ListViewSortInfo)));
 	    break;
-	    
+
 	  default:
 	    TRACE("-- COMMAND 0x%04lx unhandled\n", dwCmdID);
 	}
@@ -1106,7 +1106,7 @@
 /**********************************************************
 * ShellView_OnNotify()
 */
-   
+
 static LRESULT ShellView_OnNotify(IShellViewImpl * This, UINT CtlID, LPNMHDR lpnmh)
 {	LPNMLISTVIEW lpnmlv = (LPNMLISTVIEW)lpnmh;
 	NMLVDISPINFOA *lpdi = (NMLVDISPINFOA *)lpnmh;
@@ -1159,7 +1159,7 @@
 
 	    ListView_SortItems(lpnmlv->hdr.hwndFrom, ShellView_ListViewCompareItems, (LPARAM) (&(This->ListViewSortInfo)));
 	    break;
-	
+
 	  case LVN_GETDISPINFOA:
           case LVN_GETDISPINFOW:
 	    TRACE("-- LVN_GETDISPINFO %p\n",This);
@@ -1203,11 +1203,11 @@
 	    TRACE("-- LVN_BEGINDRAG\n");
 
 	    if (ShellView_GetSelections(This))
-	    {  
+	    {
 	      IDataObject * pda;
 	      DWORD dwAttributes = SFGAO_CANLINK;
 	      DWORD dwEffect = DROPEFFECT_COPY | DROPEFFECT_MOVE;
-	      
+
 	      if(GetShellOle())
 	      {
 	        if (SUCCEEDED(IShellFolder_GetUIObjectOf(This->pSFParent, This->hWnd, This->cidl, This->apidl, &IID_IDataObject,0,(LPVOID *)&pda)))
@@ -1221,7 +1221,7 @@
 		      dwEffect |= DROPEFFECT_LINK;
 		    }
 		  }
-		
+
 	          if (pds)
 	          {
 	            DWORD dwEffect;
@@ -1262,12 +1262,12 @@
 		lvItem.iItem = lpdi->item.iItem;
 		lvItem.mask = LVIF_PARAM;
 		ListView_GetItemA(This->hWndList, &lvItem);
-		
+
 		pidl = (LPITEMIDLIST)lpdi->item.lParam;
                 if (!MultiByteToWideChar( CP_ACP, 0, lpdi->item.pszText, -1, wszNewName, MAX_PATH ))
                     wszNewName[MAX_PATH-1] = 0;
 	        hr = IShellFolder_SetNameOf(This->pSFParent, 0, pidl, wszNewName, SHGDN_INFOLDER, &pidl);
-		
+
 		if(SUCCEEDED(hr) && pidl)
 		{
 	          lvItem.mask = LVIF_PARAM;
@@ -1279,7 +1279,7 @@
 	      return FALSE;
 	    }
 	    break;
-	  
+
 	  case LVN_KEYDOWN:
 	    {
 	    /*  MSG msg;
@@ -1289,7 +1289,7 @@
 	      msg.lParam = 0;
 	      msg.time = 0;
 	      msg.pt = 0;*/
-	      
+
 	      LPNMLVKEYDOWN plvKeyDown = (LPNMLVKEYDOWN) lpnmh;
 
               /* initiate a rename of the selected file or directory */
@@ -1304,7 +1304,7 @@
                   /* get selected item */
                   i = ListView_GetNextItem(This->hWndList, -1,
 			LVNI_SELECTED);
- 
+
                   ListView_EnsureVisible(This->hWndList, i, 0);
                   ListView_EditLabelA(This->hWndList, i);
                 }
@@ -1324,25 +1324,25 @@
 
 		if(!(i = ListView_GetSelectedCount(This->hWndList)))
 		  break;
-	
+
 		/* allocate memory for the pidl array */
-		pItems = HeapAlloc(GetProcessHeap(), 0, 
+		pItems = HeapAlloc(GetProcessHeap(), 0,
 			sizeof(LPITEMIDLIST) * i);
- 
+
 		/* retrieve all selected items */
 		i = 0;
 		item_index = -1;
 		while(ListView_GetSelectedCount(This->hWndList) > i)
 		{
 		  /* get selected item */
-		  item_index = ListView_GetNextItem(This->hWndList, 
+		  item_index = ListView_GetNextItem(This->hWndList,
 			item_index, LVNI_SELECTED);
 		  item.iItem = item_index;
 		  ListView_GetItemA(This->hWndList, &item);
 
 		  /* get item pidl */
 		  pItems[i] = (LPITEMIDLIST)item.lParam;
-		  
+
 		  i++;
 		}
 
@@ -1359,7 +1359,7 @@
 
 	  default:
 	    TRACE("-- %p WM_COMMAND %x unhandled\n", This, lpnmh->code);
-	    break;;
+	    break;
 	}
 	return 0;
 }
@@ -1373,7 +1373,7 @@
 
 	TRACE("(%p)(%p,%p,0x%08lx)\n", This, Pidls[0], Pidls[1], wEventId);
 	switch(wEventId)
-	{		
+	{
 	  case SHCNE_MKDIR:
 	  case SHCNE_CREATE:
 	    LV_AddItem(This, Pidls[0]);
@@ -1417,9 +1417,9 @@
 	  case WM_CREATE:	return ShellView_OnCreate(pThis);
 	  case WM_ACTIVATE:	return ShellView_OnActivate(pThis, SVUIA_ACTIVATE_FOCUS);
 	  case WM_NOTIFY:	return ShellView_OnNotify(pThis,(UINT)wParam, (LPNMHDR)lParam);
-	  case WM_COMMAND:      return ShellView_OnCommand(pThis, 
-					GET_WM_COMMAND_ID(wParam, lParam), 
-					GET_WM_COMMAND_CMD(wParam, lParam), 
+	  case WM_COMMAND:      return ShellView_OnCommand(pThis,
+					GET_WM_COMMAND_ID(wParam, lParam),
+					GET_WM_COMMAND_CMD(wParam, lParam),
 					GET_WM_COMMAND_HWND(wParam, lParam));
 	  case SHV_CHANGE_NOTIFY: return ShellView_OnChange(pThis, (LPITEMIDLIST*)wParam, (LONG)lParam);
 
@@ -1460,7 +1460,7 @@
 
 	if(IsEqualIID(riid, &IID_IUnknown))
 	{
-	  *ppvObj = This; 
+	  *ppvObj = This;
 	}
 	else if(IsEqualIID(riid, &IID_IShellView))
 	{
@@ -1516,7 +1516,7 @@
 
 	shell32_ObjCount--;
 
-	if (!--(This->ref)) 
+	if (!--(This->ref))
 	{
 	  TRACE(" destroying IShellView(%p)\n",This);
 
@@ -1574,7 +1574,7 @@
 
 	FIXME("(%p)->(%p: hwnd=%x msg=%x lp=%lx wp=%x) stub\n",This,lpmsg, lpmsg->hwnd, lpmsg->message, lpmsg->lParam, lpmsg->wParam);
 #endif
-	
+
 	if ((lpmsg->message>=WM_KEYFIRST) && (lpmsg->message>=WM_KEYLAST))
 	{
 	  TRACE("-- key=0x04%x\n",lpmsg->wParam) ;
@@ -1628,7 +1628,7 @@
 /*
 	  IShellBrowser_SendControlMsg(This->pShellBrowser, FCW_STATUS, SB_SETTEXTA,
 							0, (LPARAM)szName, &lResult);
-*/							
+*/
 	}
 
 	return S_OK;
@@ -1659,7 +1659,7 @@
 	WNDCLASSA wc;
 	*phWnd = 0;
 
-	
+
 	TRACE("(%p)->(shlview=%p set=%p shlbrs=%p rec=%p hwnd=%p) incomplete\n",This, lpPrevView,lpfs, psb, prcView, phWnd);
 	TRACE("-- vmode=%x flags=%x left=%i top=%i right=%i bottom=%i\n",lpfs->ViewMode, lpfs->fFlags ,prcView->left,prcView->top, prcView->right, prcView->bottom);
 
@@ -1673,7 +1673,7 @@
 
 	/* try to get the ICommDlgBrowserInterface, adds a reference !!! */
 	This->pCommDlgBrowser=NULL;
-	if ( SUCCEEDED (IShellBrowser_QueryInterface( This->pShellBrowser, 
+	if ( SUCCEEDED (IShellBrowser_QueryInterface( This->pShellBrowser,
 			(REFIID)&IID_ICommDlgBrowser, (LPVOID*) &This->pCommDlgBrowser)))
 	{
 	  TRACE("-- CommDlgBrowser\n");
@@ -1712,7 +1712,7 @@
 				(LPVOID)This);
 
 	CheckToolbar(This);
-	
+
 	if(!*phWnd) return E_FAIL;
 
 	return S_OK;
@@ -1742,7 +1742,7 @@
 {
 	ICOM_THIS(IShellViewImpl, iface);
 
-	TRACE("(%p)->(%p) vmode=%x flags=%x\n",This, lpfs, 
+	TRACE("(%p)->(%p) vmode=%x flags=%x\n",This, lpfs,
 		This->FolderSettings.ViewMode, This->FolderSettings.fFlags);
 
 	if (!lpfs) return E_INVALIDARG;
@@ -1776,15 +1776,15 @@
 {
 	ICOM_THIS(IShellViewImpl, iface);
 	int i;
-	
+
 	TRACE("(%p)->(pidl=%p, 0x%08x) stub\n",This, pidl, uFlags);
-	
+
 	i = LV_FindItemByPidl(This, pidl);
 
 	if (i != -1)
 	{
 	  LVITEMA lvItem;
-	  
+
 	  if(uFlags & SVSI_ENSUREVISIBLE)
 	    ListView_EnsureVisible(This->hWndList, i, 0);
 
@@ -1853,9 +1853,9 @@
 {
 	ICOM_THIS(IShellViewImpl, iface);
 	int i;
-	
+
 	TRACE("(%p)->(pidl=%p)\n",This, pidl);
-	
+
 	i = LV_FindItemByPidl(This, pidl);
 	if (i != -1)
 	{
@@ -1865,8 +1865,8 @@
 	return S_OK;
 }
 
-static struct ICOM_VTABLE(IShellView) svvt = 
-{	
+static struct ICOM_VTABLE(IShellView) svvt =
+{
 	ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
 	IShellView_fnQueryInterface,
 	IShellView_fnAddRef,
@@ -1929,7 +1929,7 @@
 static HRESULT WINAPI ISVOleCmdTarget_QueryStatus(
 	IOleCommandTarget *iface,
 	const GUID* pguidCmdGroup,
-	ULONG cCmds, 
+	ULONG cCmds,
 	OLECMD * prgCmds,
 	OLECMDTEXT* pCmdText)
 {
@@ -1960,7 +1960,7 @@
 	return E_NOTIMPL;
 }
 
-static ICOM_VTABLE(IOleCommandTarget) ctvt = 
+static ICOM_VTABLE(IOleCommandTarget) ctvt =
 {
 	ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
 	ISVOleCmdTarget_QueryInterface,
@@ -2010,7 +2010,7 @@
 	DWORD		grfKeyState,
 	POINTL		pt,
 	DWORD		*pdwEffect)
-{	
+{
 
 	_ICOM_THIS_From_IDropTarget(IShellViewImpl, iface);
 
@@ -2056,7 +2056,7 @@
 	return E_NOTIMPL;
 }
 
-static struct ICOM_VTABLE(IDropTarget) dtvt = 
+static struct ICOM_VTABLE(IDropTarget) dtvt =
 {
 	ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
 	ISVDropTarget_QueryInterface,
@@ -2179,10 +2179,10 @@
 	HDC hdcTargetDev,
 	HDC hdcDraw,
 	LPCRECTL lprcBounds,
-	LPCRECTL lprcWBounds, 
+	LPCRECTL lprcWBounds,
 	IVO_ContCallback pfnContinue,
 	DWORD dwContinue)
-{	
+{
 
 	_ICOM_THIS_From_IViewObject(IShellViewImpl, iface);
 
@@ -2198,7 +2198,7 @@
 	DVTARGETDEVICE* ptd,
 	HDC hicTargetDevice,
 	LOGPALETTE** ppColorSet)
-{	
+{
 
 	_ICOM_THIS_From_IViewObject(IShellViewImpl, iface);
 
@@ -2212,7 +2212,7 @@
 	LONG lindex,
 	void* pvAspect,
 	DWORD* pdwFreeze)
-{	
+{
 
 	_ICOM_THIS_From_IViewObject(IShellViewImpl, iface);
 
@@ -2223,7 +2223,7 @@
 static HRESULT WINAPI ISVViewObject_Unfreeze(
 	IViewObject 	*iface,
 	DWORD dwFreeze)
-{	
+{
 
 	_ICOM_THIS_From_IViewObject(IShellViewImpl, iface);
 
@@ -2236,7 +2236,7 @@
 	DWORD aspects,
 	DWORD advf,
 	IAdviseSink* pAdvSink)
-{	
+{
 
 	_ICOM_THIS_From_IViewObject(IShellViewImpl, iface);
 
@@ -2249,7 +2249,7 @@
 	DWORD* pAspects,
 	DWORD* pAdvf,
 	IAdviseSink** ppAdvSink)
-{	
+{
 
 	_ICOM_THIS_From_IViewObject(IShellViewImpl, iface);
 
@@ -2259,7 +2259,7 @@
 }
 
 
-static struct ICOM_VTABLE(IViewObject) vovt = 
+static struct ICOM_VTABLE(IViewObject) vovt =
 {
 	ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
 	ISVViewObject_QueryInterface,
diff --git a/dlls/shell32/shpolicy.c b/dlls/shell32/shpolicy.c
index f21e3d1..dc58d88 100644
--- a/dlls/shell32/shpolicy.c
+++ b/dlls/shell32/shpolicy.c
@@ -23,9 +23,9 @@
  * Editor which came with the Win95 Migration Guide, although
  * there doesn't appear to be an updated Win98 version that
  * would handle the many new policies introduced since then.
- * You could easily write one with the information in 
+ * You could easily write one with the information in
  * this file...
- * 
+ *
  * Up to date as of SHELL32 v4.72 (Win98, Win95 with MSIE 5)
  */
 
@@ -127,7 +127,7 @@
 
 /* policy data array */
 
-POLICYDATA sh32_policy_table[] = 
+POLICYDATA sh32_policy_table[] =
 {
   {
     0x1,
@@ -476,14 +476,14 @@
 /*************************************************************************
  * SHRestricted				[SHELL32.100]
  *
- * walks through policy table, queries <app> key, <type> value, returns 
+ * walks through policy table, queries <app> key, <type> value, returns
  * queried (DWORD) value, and caches it between called to SHInitRestricted
  * to prevent unnecessary registry access.
  *
  * NOTES
  *     exported by ordinal
  *
- * REFERENCES: 
+ * REFERENCES:
  *     MS System Policy Editor
  *     98Lite 2.0 (which uses many of these policy keys) http://www.98lite.net/
  *     "The Windows 95 Registry", by John Woram, 1996 MIS: Press
@@ -581,7 +581,7 @@
 	     /* doesn't match, fail */
 	     return 0;
 	 }
-     }                               
+     }
 
      /* check passed, init all policy cache entries with SHELL_NO_POLICY */
      for (i = 0; i < SHELL_MAX_POLICIES; i++)
diff --git a/dlls/shell32/shv_bg_cmenu.c b/dlls/shell32/shv_bg_cmenu.c
index 5cfedba..9cd9e73 100644
--- a/dlls/shell32/shv_bg_cmenu.c
+++ b/dlls/shell32/shv_bg_cmenu.c
@@ -37,7 +37,7 @@
 /**************************************************************************
 *  IContextMenu Implementation
 */
-typedef struct 
+typedef struct
 {
 	ICOM_VFIELD(IContextMenu);
 	IShellFolder*	pSFParent;
@@ -78,20 +78,20 @@
 
 	if(IsEqualIID(riid, &IID_IUnknown))          /*IUnknown*/
 	{
-	  *ppvObj = This; 
+	  *ppvObj = This;
 	}
 	else if(IsEqualIID(riid, &IID_IContextMenu))  /*IContextMenu*/
 	{
 	  *ppvObj = This;
-	}   
+	}
 	else if(IsEqualIID(riid, &IID_IShellExtInit))  /*IShellExtInit*/
 	{
 	  FIXME("-- LPSHELLEXTINIT pointer requested\n");
 	}
 
 	if(*ppvObj)
-	{ 
-	  IUnknown_AddRef((IUnknown*)*ppvObj);      
+	{
+	  IUnknown_AddRef((IUnknown*)*ppvObj);
 	  TRACE("-- Interface: (%p)->(%p)\n",ppvObj,*ppvObj);
 	  return S_OK;
 	}
@@ -121,7 +121,7 @@
 
 	TRACE("(%p)->()\n",This);
 
-	if (!--(This->ref)) 
+	if (!--(This->ref))
 	{
 	  TRACE(" destroying IContextMenu(%p)\n",This);
 
@@ -151,7 +151,7 @@
 {
 	HMENU	hMyMenu;
 	UINT	idMax;
-	
+
 	ICOM_THIS(BgCmImpl, iface);
 
 	TRACE("(%p)->(hmenu=%x indexmenu=%x cmdfirst=%x cmdlast=%x flags=%x )\n",This, hMenu, indexMenu, idCmdFirst, idCmdLast, uFlags);
@@ -175,14 +175,14 @@
 	ICOM_THIS(BgCmImpl, iface);
 	ISFHelper * psfhlp;
 	char szName[MAX_PATH];
-	
+
 	IShellFolder_QueryInterface(This->pSFParent, &IID_ISFHelper, (LPVOID*)&psfhlp);
 	if (psfhlp)
 	{
 	  LPITEMIDLIST pidl;
 	  ISFHelper_GetUniqueName(psfhlp, szName, MAX_PATH);
 	  ISFHelper_AddFolder(psfhlp, 0, szName, &pidl);
-          
+
 	  if(psv)
 	  {
 	    /* if we are in a shellview do labeledit */
@@ -191,7 +191,7 @@
                     |SVSI_FOCUSED|SVSI_SELECT));
 	  }
 	  SHFree(pidl);
-	  
+
 	  ISFHelper_Release(psfhlp);
 	}
 }
@@ -205,7 +205,7 @@
 	ICOM_THIS(BgCmImpl, iface);
 	BOOL bSuccess = FALSE;
 	IDataObject * pda;
-	
+
 	TRACE("\n");
 
 	if(SUCCEEDED(pOleGetClipboard(&pda)))
@@ -227,9 +227,9 @@
 
 	    LPCIDA lpcida = GlobalLock(medium.u.hGlobal);
 	    TRACE("cida=%p\n", lpcida);
-	    
+
 	    apidl = _ILCopyCidaToaPidl(&pidl, lpcida);
-	    
+
 	    /* bind to the source shellfolder */
 	    SHGetDesktopFolder(&psfDesktop);
 	    if(psfDesktop)
@@ -237,19 +237,19 @@
 	      IShellFolder_BindToObject(psfDesktop, pidl, NULL, &IID_IShellFolder, (LPVOID*)&psfFrom);
 	      IShellFolder_Release(psfDesktop);
 	    }
-	    
+
 	    if (psfFrom)
 	    {
 	      /* get source and destination shellfolder */
 	      ISFHelper *psfhlpdst, *psfhlpsrc;
 	      IShellFolder_QueryInterface(This->pSFParent, &IID_ISFHelper, (LPVOID*)&psfhlpdst);
 	      IShellFolder_QueryInterface(psfFrom, &IID_ISFHelper, (LPVOID*)&psfhlpsrc);
-   
+
 	      /* do the copy/move */
 	      if (psfhlpdst && psfhlpsrc)
 	      {
 	        ISFHelper_CopyItems(psfhlpdst, psfFrom, lpcida->cidl, apidl);
-		/* FIXME handle move 
+		/* FIXME handle move
 		ISFHelper_DeleteItems(psfhlpsrc, lpcida->cidl, apidl);
 		*/
 	      }
@@ -257,10 +257,10 @@
 	      if(psfhlpsrc) ISFHelper_Release(psfhlpsrc);
 	      IShellFolder_Release(psfFrom);
 	    }
-	    
+
 	    _ILFreeaPidl(apidl, lpcida->cidl);
 	    SHFree(pidl);
-	    
+
 	    /* release the medium*/
 	    pReleaseStgMedium(&medium);
 	  }
@@ -271,7 +271,7 @@
 
 	OpenClipboard(NULL);
 	hMem = GetClipboardData(CF_HDROP);
-	
+
 	if(hMem)
 	{
 	  char * pDropFiles = (char *)GlobalLock(hMem);
@@ -305,7 +305,7 @@
 	LPSHELLVIEW	lpSV;
 	HWND	hWndSV;
 
-	TRACE("(%p)->(invcom=%p verb=%p wnd=%x)\n",This,lpcmi,lpcmi->lpVerb, lpcmi->hwnd);    
+	TRACE("(%p)->(invcom=%p verb=%p wnd=%x)\n",This,lpcmi,lpcmi->lpVerb, lpcmi->hwnd);
 
 	/* get the active IShellView */
 	if((lpSB = (LPSHELLBROWSER)SendMessageA(lpcmi->hwnd, CWM_GETISHELLBROWSER,0,0)))
@@ -333,7 +333,7 @@
 	    else if (! strcmp(lpcmi->lpVerb,CMDSTR_VIEWDETAILSA))
 	    {
 	      if(hWndSV) SendMessageA(hWndSV, WM_COMMAND, MAKEWPARAM(FCIDM_SHVIEW_REPORTVIEW,0),0 );
-	    } 
+	    }
 	    else
 	    {
 	      FIXME("please report: unknown verb %s\n",lpcmi->lpVerb);
@@ -355,7 +355,7 @@
 		break;
 	    }
 	  }
-	
+
 	  IShellView_Release(lpSV);	/* QueryActiveShellView does AddRef*/
 	}
 	return NOERROR;
@@ -372,12 +372,12 @@
 	LPUINT lpReserved,
 	LPSTR lpszName,
 	UINT uMaxNameLen)
-{	
+{
 	ICOM_THIS(BgCmImpl, iface);
 
 	TRACE("(%p)->(idcom=%x flags=%x %p name=%p len=%x)\n",This, idCommand, uFlags, lpReserved, lpszName, uMaxNameLen);
 
-	/* test the existence of the menu items, the file dialog enables 
+	/* test the existence of the menu items, the file dialog enables
 	   the buttons according to this */
 	if (uFlags == GCS_VALIDATEA)
 	{
@@ -386,7 +386,7 @@
 	    if (!strcmp((LPSTR)idCommand, CMDSTR_VIEWLISTA) ||
 	        !strcmp((LPSTR)idCommand, CMDSTR_VIEWDETAILSA) ||
 	        !strcmp((LPSTR)idCommand, CMDSTR_NEWFOLDERA))
-	    {	
+	    {
 	      return NOERROR;
 	    }
 	  }
@@ -414,10 +414,10 @@
 
 /**************************************************************************
 * IContextMenu VTable
-* 
+*
 */
-static struct ICOM_VTABLE(IContextMenu) cmvt = 
-{	
+static struct ICOM_VTABLE(IContextMenu) cmvt =
+{
 	ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
 	ISVBgCm_fnQueryInterface,
 	ISVBgCm_fnAddRef,
diff --git a/dlls/shell32/shv_item_cmenu.c b/dlls/shell32/shv_item_cmenu.c
index 3036dea..63eddd4 100644
--- a/dlls/shell32/shv_item_cmenu.c
+++ b/dlls/shell32/shv_item_cmenu.c
@@ -39,7 +39,7 @@
 /**************************************************************************
 *  IContextMenu Implementation
 */
-typedef struct 
+typedef struct
 {	ICOM_VFIELD(IContextMenu);
 	DWORD		ref;
 	IShellFolder*	pSFParent;
@@ -115,20 +115,20 @@
 
 	if(IsEqualIID(riid, &IID_IUnknown))          /*IUnknown*/
 	{
-	  *ppvObj = This; 
+	  *ppvObj = This;
 	}
 	else if(IsEqualIID(riid, &IID_IContextMenu))  /*IContextMenu*/
 	{
 	  *ppvObj = This;
-	}   
+	}
 	else if(IsEqualIID(riid, &IID_IShellExtInit))  /*IShellExtInit*/
 	{
 	  FIXME("-- LPSHELLEXTINIT pointer requested\n");
 	}
 
 	if(*ppvObj)
-	{ 
-	  IUnknown_AddRef((IUnknown*)*ppvObj); 
+	{
+	  IUnknown_AddRef((IUnknown*)*ppvObj);
 	  TRACE("-- Interface: (%p)->(%p)\n",ppvObj,*ppvObj);
 	  return S_OK;
 	}
@@ -160,7 +160,7 @@
 
 	shell32_ObjCount--;
 
-	if (!--(This->ref)) 
+	if (!--(This->ref))
 	{
 	  TRACE(" destroying IContextMenu(%p)\n",This);
 
@@ -169,7 +169,7 @@
 
 	  if(This->pidl)
 	    SHFree(This->pidl);
-	  
+
 	  /*make sure the pidl is freed*/
 	  _ILFreeaPidl(This->apidl, This->cidl);
 
@@ -181,7 +181,7 @@
 
 /**************************************************************************
 *  ICM_InsertItem()
-*/ 
+*/
 void WINAPI _InsertMenuItem (
 	HMENU hmenu,
 	UINT indexMenu,
@@ -276,7 +276,7 @@
 	LPITEMIDLIST	pidlFQ;
 	SHELLEXECUTEINFOA	sei;
 
-	/* Find the first item in the list that is not a value. These commands 
+	/* Find the first item in the list that is not a value. These commands
 	    should never be invoked if there isn't at least one folder item in the list.*/
 
 	for(i = 0; i<This->cidl; i++)
@@ -316,14 +316,14 @@
 	LPSHELLBROWSER	lpSB;
 	LPSHELLVIEW	lpSV;
 
-	TRACE("(%p)->(wnd=%x)\n",This, hwnd);    
+	TRACE("(%p)->(wnd=%x)\n",This, hwnd);
 
 	/* get the active IShellView */
 	if ((lpSB = (LPSHELLBROWSER)SendMessageA(hwnd, CWM_GETISHELLBROWSER,0,0)))
 	{
 	  if(SUCCEEDED(IShellBrowser_QueryActiveShellView(lpSB, &lpSV)))
 	  {
-	    TRACE("(sv=%p)\n",lpSV);    
+	    TRACE("(sv=%p)\n",lpSV);
 	    IShellView_SelectItem(lpSV, This->apidl[0],
               SVSI_DESELECTOTHERS|SVSI_EDIT|SVSI_ENSUREVISIBLE|SVSI_FOCUSED|SVSI_SELECT);
 	    IShellView_Release(lpSV);
@@ -340,7 +340,7 @@
 {
 	ICOM_THIS(ItemCmImpl, iface);
 	ISFHelper * psfhlp;
-	
+
 	IShellFolder_QueryInterface(This->pSFParent, &IID_ISFHelper, (LPVOID*)&psfhlp);
 	if (psfhlp)
 	{
@@ -364,7 +364,7 @@
 	LPSHELLBROWSER	lpSB;
 	LPSHELLVIEW	lpSV;
 	LPDATAOBJECT    lpDo;
-	
+
 	TRACE("(%p)->(wnd=0x%04x,bCut=0x%08x)\n",This, hwnd, bCut);
 
 	if(GetShellOle())
@@ -392,7 +392,7 @@
 	BOOL bSuccess = FALSE;
 
 	TRACE("(%p)\n", iface);
-	
+
 	if(OpenClipboard(NULL))
 	{
 	  if(EmptyClipboard())
@@ -408,7 +408,7 @@
 	        HGLOBAL hMem;
 
 		hMem = RenderHDROP(pidl, This->apidl, This->cidl);
-		
+
 		if(SetClipboardData(CF_HDROP, hMem))
 		{
 		  bSuccess = TRUE;
@@ -417,7 +417,7 @@
 	      }
 	      IPersistFolder2_Release(ppf2);
 	    }
-	    
+
 	  }
 	  CloseClipboard();
 	}
@@ -433,7 +433,7 @@
 {
 	ICOM_THIS(ItemCmImpl, iface);
 
-	TRACE("(%p)->(invcom=%p verb=%p wnd=%x)\n",This,lpcmi,lpcmi->lpVerb, lpcmi->hwnd);    
+	TRACE("(%p)->(invcom=%p verb=%p wnd=%x)\n",This,lpcmi,lpcmi->lpVerb, lpcmi->hwnd);
 
 	if(LOWORD(lpcmi->lpVerb) > FCIDM_SHVIEWLAST)  return E_INVALIDARG;
 
@@ -447,10 +447,10 @@
 	    break;
 	  case FCIDM_SHVIEW_RENAME:
 	    DoRename(iface, lpcmi->hwnd);
-	    break;	    
+	    break;
 	  case FCIDM_SHVIEW_DELETE:
 	    DoDelete(iface);
-	    break;	    
+	    break;
 	  case FCIDM_SHVIEW_COPY:
 	    DoCopyOrCut(iface, lpcmi->hwnd, FALSE);
 	    break;
@@ -471,7 +471,7 @@
 	LPUINT lpReserved,
 	LPSTR lpszName,
 	UINT uMaxNameLen)
-{	
+{
 	ICOM_THIS(ItemCmImpl, iface);
 
 	HRESULT  hr = E_INVALIDARG;
@@ -494,7 +494,7 @@
 	    }
 	    break;
 
-	     /* NT 4.0 with IE 3.0x or no IE will always call This with GCS_VERBW. In This 
+	     /* NT 4.0 with IE 3.0x or no IE will always call This with GCS_VERBW. In This
 	     case, you need to do the lstrcpyW to the pointer passed.*/
 	  case GCS_VERBW:
 	    switch(idCommand)
@@ -532,8 +532,8 @@
 	return E_NOTIMPL;
 }
 
-static struct ICOM_VTABLE(IContextMenu) cmvt = 
-{	
+static struct ICOM_VTABLE(IContextMenu) cmvt =
+{
 	ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
 	ISvItemCm_fnQueryInterface,
 	ISvItemCm_fnAddRef,
diff --git a/dlls/shell32/systray.c b/dlls/shell32/systray.c
index a587201..84ea925 100644
--- a/dlls/shell32/systray.c
+++ b/dlls/shell32/systray.c
@@ -222,7 +222,7 @@
 static void SYSTRAY_ItemTerm(SystrayItem *ptrayItem)
 {
   if(ptrayItem->notifyIcon.hIcon)
-     DestroyIcon(ptrayItem->notifyIcon.hIcon);   
+     DestroyIcon(ptrayItem->notifyIcon.hIcon);
   if(ptrayItem->hWndToolTip)
       DestroyWindow(ptrayItem->hWndToolTip);
   if(ptrayItem->hWnd)
diff --git a/dlls/shell32/undocshell.h b/dlls/shell32/undocshell.h
index 93fa746..38ccc1e 100644
--- a/dlls/shell32/undocshell.h
+++ b/dlls/shell32/undocshell.h
@@ -180,7 +180,7 @@
 	LPDWORD lpdwIconIndex);
 
 /* RunFileDlg flags */
-#define RFF_NOBROWSE       0x01 
+#define RFF_NOBROWSE       0x01
 #define RFF_NODEFAULT      0x02
 #define RFF_CALCDIRECTORY  0x04
 #define RFF_NOLABEL        0x08
@@ -191,7 +191,7 @@
 {
   NMHDR   hdr;
   LPCSTR  lpFile;
-  LPCSTR  lpDirectory; 
+  LPCSTR  lpDirectory;
   int     nShow;
 } NM_RUNFILEDLG, * LPNM_RUNFILEDLG;
 
@@ -213,7 +213,7 @@
 int  WINAPI RestartDialog(
 	HWND hwndOwner,
 	LPCSTR lpstrReason,
-	UINT uFlags); 
+	UINT uFlags);
 
 BOOL WINAPI GetFileNameFromBrowse(
 	HWND hwndOwner,
@@ -231,7 +231,7 @@
 BOOL WINAPI SHFindComputer(
 	LPCITEMIDLIST pidlRoot,
 	LPCITEMIDLIST pidlSavedSearch);
- 
+
 /* SHObjectProperties flags */
 #define OPF_PRINTERNAME  0x01
 #define OPF_PATHNAME     0x02
@@ -310,11 +310,11 @@
 #define CWM_GETPATH           (WM_USER + 12)
 
 /* CWM_TESTPATH types */
-#define CWTP_ISEQUAL  0 
-#define CWTP_ISCHILD  1 
+#define CWTP_ISEQUAL  0
+#define CWTP_ISCHILD  1
 
 /* CWM_TESTPATH structure */
-typedef struct 
+typedef struct
 {
 	DWORD dwType;
 	ITEMIDLIST idl;
@@ -509,7 +509,7 @@
 #define DAD_SCROLL_RIGHT 8
 
 /* DAD_AutoScroll sample structure */
-typedef struct 
+typedef struct
 {
 	DWORD  dwCount;
 	DWORD  dwLastTime;
@@ -553,15 +553,15 @@
 
 LPVOID WINAPI PathCombineAW(LPVOID szDest, LPCVOID lpszDir, LPCVOID lpszFile);
 
-LPVOID  WINAPI PathAddBackslashAW(LPVOID path);	
+LPVOID  WINAPI PathAddBackslashAW(LPVOID path);
 
 LPVOID WINAPI PathBuildRootAW(LPVOID lpszPath, int drive);
 
-LPVOID WINAPI PathFindExtensionAW(LPCVOID path); 
+LPVOID WINAPI PathFindExtensionAW(LPCVOID path);
 
-LPVOID WINAPI PathFindFileNameAW(LPCVOID path); 
+LPVOID WINAPI PathFindFileNameAW(LPCVOID path);
 
-LPVOID WINAPI PathGetExtensionAW(LPCVOID lpszPath,  DWORD void1, DWORD void2); 
+LPVOID WINAPI PathGetExtensionAW(LPCVOID lpszPath,  DWORD void1, DWORD void2);
 
 LPVOID WINAPI PathGetArgsAW(LPVOID lpszPath);
 
@@ -571,7 +571,7 @@
 
 void WINAPI PathRemoveBlanksAW(LPVOID lpszPath);
 
-VOID  WINAPI PathQuoteSpacesAW(LPVOID path);	
+VOID  WINAPI PathQuoteSpacesAW(LPVOID path);
 
 void WINAPI PathUnquoteSpacesAW(LPVOID lpszPath);
 
@@ -590,10 +590,10 @@
 BOOL WINAPI PathMatchSpecAW(LPVOID lpszPath, LPVOID lpszSpec);
 
 BOOL WINAPI PathMakeUniqueNameAW(
-	LPVOID lpszBuffer, 
+	LPVOID lpszBuffer,
 	DWORD dwBuffSize,
 	LPCVOID lpszShortName,
-	LPCVOID lpszLongName, 
+	LPCVOID lpszLongName,
 	LPCVOID lpszPathName);
 
 BOOL WINAPI PathYetAnotherMakeUniqueNameA(
@@ -610,10 +610,10 @@
 
 DWORD WINAPI PathCleanupSpecAW(LPCVOID lpszPath, LPVOID lpszFile);
 
-BOOL WINAPI PathQualifyA(LPCSTR path);	
-BOOL WINAPI PathQualifyW(LPCWSTR path);	
+BOOL WINAPI PathQualifyA(LPCSTR path);
+BOOL WINAPI PathQualifyW(LPCWSTR path);
 #define PathQualify WINELIB_NAME_AW(PathQualify)
-BOOL  WINAPI PathQualifyAW(LPCVOID path);	
+BOOL  WINAPI PathQualifyAW(LPCVOID path);
 
 
 /* PathResolve flags */
@@ -664,7 +664,7 @@
 	LPARAM lParam);
 
 /* SHCreateShellFolderViewEx structure */
-typedef struct 
+typedef struct
 {
   DWORD            dwSize;
   LPSHELLFOLDER    pshf;
@@ -719,7 +719,7 @@
 #define SFVCB_ISCHILDOBJECT       0x0026
 
 /* Generic structure used by several messages */
-typedef struct 
+typedef struct
 {
   DWORD          dwReserved;
   DWORD          dwReserved2;
@@ -729,7 +729,7 @@
 typedef const SFVCBINFO * LPCSFVCBINFO;
 
 /* SFVCB_ADDTOMENU structure */
-typedef struct  
+typedef struct
 {
   HMENU  hMenu;
   UINT   indexMenu;
@@ -738,22 +738,22 @@
 } SFVMENUINFO, * LPSFVMENUINFO;
 
 /* SFVCB_GETTOOLBARINFO structure */
-typedef struct 
+typedef struct
 {
   UINT  nButtons;
   UINT  uFlags;
 } SFVTOOLBARINFO, * LPSFVTOOLBARINFO;
 
 /* SFVTOOLBARINFO flags */
-typedef enum 
+typedef enum
 {
   SFVTI_ADDTOEND   = 0,
   SFVTI_ADDTOFRONT = 1,
   SFVTI_OVERWRITE  = 2
-} SFVTIF; 
+} SFVTIF;
 
 /* SFVCB_SELECTIONCHANGED structure */
-typedef struct 
+typedef struct
 {
   UINT           uOldState;
   UINT           uNewState;
@@ -763,7 +763,7 @@
 typedef const SFVSELECTSTATE * LPCSFVSELECTSTATE;
 
 /* SFVCB_COPYHOOKCALLBACK structure */
-typedef struct 
+typedef struct
 {
   HWND    hwnd;
   UINT    wFunc;
@@ -776,7 +776,7 @@
 typedef const SFVCOPYHOOKINFO * LPCSFVCOPYHOOKINFO;
 
 /* SFVCB_GETDETAILSOF structure */
-typedef struct 
+typedef struct
 {
   LPCITEMIDLIST  pidl;
   int            fmt;
@@ -785,9 +785,9 @@
 } SFVCOLUMNINFO, * LPSFVCOLUMNINFO;
 
 int WINAPI SHShellFolderView_Message(
-	HWND hwndCabinet, 
+	HWND hwndCabinet,
 	DWORD dwMessage,
-	DWORD dwParam); 
+	DWORD dwParam);
 
 /* SHShellFolderView_Message messages */
 #define SFVM_REARRANGE          0x0001
@@ -824,7 +824,7 @@
 #define SHWFF_WAIT    0x04
 
 BOOL WINAPI SHWaitForFileToOpen(
-	LPCITEMIDLIST pidl, 
+	LPCITEMIDLIST pidl,
 	DWORD dwFlags,
 	DWORD dwTimeout);
 
@@ -852,14 +852,14 @@
 	LPVOID *ppvObject);
 
 HRESULT WINAPI SHCreateDefClassObject(
-	REFIID riidFactory, 
+	REFIID riidFactory,
 	LPVOID *ppvFactory,
 	LPFNCDCOCALLBACK lpfnCallback,
-	LPDWORD lpdwUsage, 
+	LPDWORD lpdwUsage,
 	REFIID riidObject);
 
 HRESULT WINAPI SHCoCreateInstance(
-	LPCSTR lpszClsid, 
+	LPCSTR lpszClsid,
 	REFCLSID rClsid,
 	LPUNKNOWN pUnkOuter,
 	REFIID riid,
@@ -873,7 +873,7 @@
 
 HRESULT WINAPI SHCreateLinks(
 	HWND hWnd,
-	LPCSTR lpszDir, 
+	LPCSTR lpszDir,
 	LPDATAOBJECT lpDataObject,
 	UINT uFlags,
 	LPITEMIDLIST *lppidlLinks);
@@ -885,14 +885,14 @@
 
 BOOL WINAPI SHGetNewLinkInfoA(
 	LPCSTR pszLinkTo,
-	LPCSTR pszDir, 
+	LPCSTR pszDir,
 	LPSTR pszName,
 	BOOL *pfMustCopy,
 	UINT uFlags);
 
 BOOL WINAPI SHGetNewLinkInfoW(
 	LPCWSTR pszLinkTo,
-	LPCWSTR pszDir, 
+	LPCWSTR pszDir,
 	LPWSTR pszName,
 	BOOL *pfMustCopy,
 	UINT uFlags);
diff --git a/dlls/shlwapi/ordinal.c b/dlls/shlwapi/ordinal.c
index c107aae..22dc118 100644
--- a/dlls/shlwapi/ordinal.c
+++ b/dlls/shlwapi/ordinal.c
@@ -160,7 +160,7 @@
     const SHL_2_inet_scheme *inet_pro;
 
     if (y->size != 0x18) return E_INVALIDARG;
-    /* FIXME: leading white space generates error of 0x80041001 which 
+    /* FIXME: leading white space generates error of 0x80041001 which
      *        is undefined
      */
     if (*x <= ' ') return 0x80041001;
@@ -628,7 +628,7 @@
  *
  * Function:
  *    Retrieves IE "AcceptLanguage" value from registry. ASCII mode.
- *  
+ *
  */
 HRESULT WINAPI SHLWAPI_14 (
 	LPSTR langbuf,
@@ -640,12 +640,12 @@
 	LCID mylcid;
 
 	mystrlen = (*buflen > 6) ? *buflen : 6;
-	mystr = (CHAR*)HeapAlloc(GetProcessHeap(), 
+	mystr = (CHAR*)HeapAlloc(GetProcessHeap(),
 				 HEAP_ZERO_MEMORY, mystrlen);
-	RegOpenKeyA(HKEY_CURRENT_USER, 
-		    "Software\\Microsoft\\Internet Explorer\\International", 
+	RegOpenKeyA(HKEY_CURRENT_USER,
+		    "Software\\Microsoft\\Internet Explorer\\International",
 		    &mykey);
-	if (RegQueryValueExA(mykey, "AcceptLanguage", 
+	if (RegQueryValueExA(mykey, "AcceptLanguage",
 			      0, &mytype, mystr, &mystrlen)) {
 	    /* Did not find value */
 	    mylcid = GetUserDefaultLCID();
@@ -664,12 +664,12 @@
 	    /* handle returned string */
 	    FIXME("missing code\n");
 	}
-	if (mystrlen > *buflen) 
+	if (mystrlen > *buflen)
 	    lstrcpynA(langbuf, mystr, *buflen);
 	else {
 	    lstrcpyA(langbuf, mystr);
 	    *buflen = lstrlenA(langbuf);
-	}        
+	}
 	RegCloseKey(mykey);
 	HeapFree(GetProcessHeap(), 0, mystr);
 	TRACE("language is %s\n", debugstr_a(langbuf));
@@ -681,7 +681,7 @@
  *
  * Function:
  *    Retrieves IE "AcceptLanguage" value from registry. UNICODE mode.
- *  
+ *
  */
 HRESULT WINAPI SHLWAPI_15 (
 	LPWSTR langbuf,
@@ -693,12 +693,12 @@
 	LCID mylcid;
 
 	mystrlen = (*buflen > 6) ? *buflen : 6;
-	mystr = (CHAR*)HeapAlloc(GetProcessHeap(), 
+	mystr = (CHAR*)HeapAlloc(GetProcessHeap(),
 				 HEAP_ZERO_MEMORY, mystrlen);
-	RegOpenKeyA(HKEY_CURRENT_USER, 
-		    "Software\\Microsoft\\Internet Explorer\\International", 
+	RegOpenKeyA(HKEY_CURRENT_USER,
+		    "Software\\Microsoft\\Internet Explorer\\International",
 		    &mykey);
-	if (RegQueryValueExA(mykey, "AcceptLanguage", 
+	if (RegQueryValueExA(mykey, "AcceptLanguage",
 			      0, &mytype, mystr, &mystrlen)) {
 	    /* Did not find value */
 	    mylcid = GetUserDefaultLCID();
@@ -970,7 +970,7 @@
  */
 BOOL WINAPI SHLWAPI_36(HMENU h1, UINT ui2, UINT h3, LPCWSTR p4)
 {
-    TRACE("(0x%08x, 0x%08x, 0x%08x, %s): stub\n", 
+    TRACE("(0x%08x, 0x%08x, 0x%08x, %s): stub\n",
 	  h1, ui2, h3, debugstr_w(p4));
     return AppendMenuW(h1, ui2, h3, p4);
 }
@@ -1173,13 +1173,13 @@
 /*************************************************************************
  *      @	[SHLWAPI.174]
  *
- * Seems to do call either IObjectWithSite::SetSite or 
+ * Seems to do call either IObjectWithSite::SetSite or
  *   IPersistMoniker::GetClassID.  But since we do not implement either
  *   of those classes in our headers, we will fake it out.
  */
 DWORD WINAPI SHLWAPI_174(
 	IUnknown *p1,     /* [in]   OLE object                          */
-        LPVOID *p2)       /* [out]  ptr to result of either GetClassID 
+        LPVOID *p2)       /* [out]  ptr to result of either GetClassID
                                     or SetSite call.                    */
 {
     DWORD ret, aa;
@@ -1189,7 +1189,7 @@
     /* see if SetSite interface exists for IObjectWithSite object */
     ret = IUnknown_QueryInterface((IUnknown *)p1, (REFIID)id1, (LPVOID *)&p1);
     TRACE("first IU_QI ret=%08lx, p1=%p\n", ret, p1);
-    if (ret) { 
+    if (ret) {
 
 	/* see if GetClassId interface exists for IPersistMoniker object */
 	ret = IUnknown_QueryInterface((IUnknown *)p1, (REFIID)id2, (LPVOID *)&aa);
@@ -1198,14 +1198,14 @@
 
 	/* fake a GetClassId call */
 	ret = IOleWindow_GetWindow((IOleWindow *)aa, (HWND*)p2);
-	TRACE("second IU_QI doing 0x0c ret=%08lx, *p2=%08lx\n", ret, 
+	TRACE("second IU_QI doing 0x0c ret=%08lx, *p2=%08lx\n", ret,
 	      *(LPDWORD)p2);
 	IUnknown_Release((IUnknown *)aa);
     }
     else {
 	/* fake a SetSite call */
 	ret = IOleWindow_GetWindow((IOleWindow *)p1, (HWND*)p2);
-	TRACE("first IU_QI doing 0x0c ret=%08lx, *p2=%08lx\n", ret, 
+	TRACE("first IU_QI doing 0x0c ret=%08lx, *p2=%08lx\n", ret,
 	      *(LPDWORD)p2);
 	IUnknown_Release((IUnknown *)p1);
     }
@@ -1244,11 +1244,11 @@
     *z = 0;
     if (!unk) return E_FAIL;
     ret = IUnknown_QueryInterface(unk, &IID_IServiceProvider, &aa);
-    TRACE("did IU_QI retval=%08lx, aa=%p\n", ret, aa); 
+    TRACE("did IU_QI retval=%08lx, aa=%p\n", ret, aa);
     if (ret) return ret;
-    ret = IServiceProvider_QueryService((IServiceProvider *)aa, sid, riid, 
+    ret = IServiceProvider_QueryService((IServiceProvider *)aa, sid, riid,
 					(void **)z);
-    TRACE("did ISP_QS retval=%08lx, *z=%p\n", ret, (LPVOID)*z); 
+    TRACE("did ISP_QS retval=%08lx, *z=%p\n", ret, (LPVOID)*z);
     IUnknown_Release((IUnknown*)aa);
     return ret;
 }
@@ -1385,7 +1385,7 @@
 
 	len_a = lstrlenA(lpStrSrc);
 	ret = MultiByteToWideChar(0, 0, lpStrSrc, len_a, lpwStrDest, len);
-	TRACE("%s %s %d, ret=%d\n", 
+	TRACE("%s %s %d, ret=%d\n",
 	      debugstr_a(lpStrSrc), debugstr_w(lpwStrDest), len, ret);
 	return ret;
 }
@@ -1523,7 +1523,7 @@
 	if (z) {
 	    xmove = x;
 	    while (xmove->refid) {
-		TRACE("trying (indx %ld) %s\n", xmove->indx, 
+		TRACE("trying (indx %ld) %s\n", xmove->indx,
 		      debugstr_guid(xmove->refid));
 		if (IsEqualIID(riid, xmove->refid)) {
 		    a_vtbl = (IUnknown*)(xmove->indx + (LPBYTE)w);
@@ -1688,8 +1688,8 @@
  *      @	[SHLWAPI.267]
  */
 HRESULT WINAPI SHLWAPI_267 (
-	LPVOID w, 
-	LPVOID x, 
+	LPVOID w,
+	LPVOID x,
 	LPVOID y, /* [???] NOTE: same as 3rd parameter of SHLWAPI_219 */
 	LPVOID z) /* [???] NOTE: same as 4th parameter of SHLWAPI_219 */
 {
@@ -1947,7 +1947,7 @@
  */
 WORD WINAPI SHLWAPI_352 (
 	LPVOID w,   /* [in] buffer from _351 */
-	LPWSTR x,   /* [in]   value to retrieve - 
+	LPWSTR x,   /* [in]   value to retrieve -
                               converted and passed to VerQueryValueA as #2 */
 	LPVOID y,   /* [out]  ver buffer - passed to VerQueryValueA as #3 */
 	UINT*  z)   /* [in]   ver length - passed to VerQueryValueA as #4 */
@@ -1959,10 +1959,10 @@
 /**************************************************************************
  *      @       [SHLWAPI.356]
  *
- *      mbc - this function is undocumented, The parameters are correct and 
- *            the calls to InitializeSecurityDescriptor and 
- *            SetSecurityDescriptorDacl are correct, but apparently some 
- *            apps call this function with all zero parameters. 
+ *      mbc - this function is undocumented, The parameters are correct and
+ *            the calls to InitializeSecurityDescriptor and
+ *            SetSecurityDescriptorDacl are correct, but apparently some
+ *            apps call this function with all zero parameters.
  */
 
 DWORD WINAPI SHLWAPI_356(PACL pDacl, PSECURITY_DESCRIPTOR pSD, LPCSTR *str)
@@ -2042,7 +2042,7 @@
 /*************************************************************************
  *      @	[SHLWAPI.377]
  *
- * FIXME: Native appears to do DPA_Create and a DPA_InsertPtr for 
+ * FIXME: Native appears to do DPA_Create and a DPA_InsertPtr for
  *        each call here.
  * FIXME: Native shows calls to:
  *  SHRegGetUSValue for "Software\Microsoft\Internet Explorer\International"
@@ -2378,7 +2378,7 @@
  * NOTES
  * Input HLS values are constrained to the range (0..240).
  */
-VOID WINAPI ColorRGBToHLS(COLORREF drRGB, LPWORD pwHue, 
+VOID WINAPI ColorRGBToHLS(COLORREF drRGB, LPWORD pwHue,
 			  LPWORD wLuminance, LPWORD pwSaturation)
 {
     FIXME("stub\n");
diff --git a/dlls/shlwapi/path.c b/dlls/shlwapi/path.c
index 7a9a8fe..1eb2b87 100644
--- a/dlls/shlwapi/path.c
+++ b/dlls/shlwapi/path.c
@@ -1615,9 +1615,9 @@
  */
 static BOOL PathMatchSingleMaskW(LPCWSTR name, LPCWSTR mask)
 {
-	while (*name && *mask && *mask!=';') 
+	while (*name && *mask && *mask!=';')
 	{
-	  if (*mask=='*') 
+	  if (*mask=='*')
 	  {
 	    do
 	    {
@@ -1629,7 +1629,7 @@
 	  name = CharNextW(name);
 	  mask = CharNextW(mask);
 	}
-	if (!*name) 
+	if (!*name)
 	{
 	  while (*mask=='*') mask++;
 	  if (!*mask || *mask==';') return 1;
diff --git a/dlls/shlwapi/reg.c b/dlls/shlwapi/reg.c
index 3a027be..ffb13d0 100644
--- a/dlls/shlwapi/reg.c
+++ b/dlls/shlwapi/reg.c
@@ -92,12 +92,12 @@
     LONG ret2, ret1 = ~ERROR_SUCCESS;
     LPInternal_HUSKEY ihky;
 
-    TRACE("(%s, 0x%lx, 0x%lx, %p, %s)\n", debugstr_a(Path), 
-	  (LONG)AccessType, (LONG)hRelativeUSKey, phNewUSKey, 
+    TRACE("(%s, 0x%lx, 0x%lx, %p, %s)\n", debugstr_a(Path),
+	  (LONG)AccessType, (LONG)hRelativeUSKey, phNewUSKey,
 	  (fIgnoreHKCU) ? "Ignoring HKCU" : "Process HKCU then HKLM");
 
     /* now create the internal version of HUSKEY */
-    ihky = (LPInternal_HUSKEY)HeapAlloc(GetProcessHeap(), 0 , 
+    ihky = (LPInternal_HUSKEY)HeapAlloc(GetProcessHeap(), 0 ,
 					sizeof(Internal_HUSKEY));
     MultiByteToWideChar(0, 0, Path, -1, ihky->key_string,
 			sizeof(ihky->key_string)-1);
@@ -114,13 +114,13 @@
     ihky->HKCUkey = 0;
     ihky->HKLMkey = 0;
     if (!fIgnoreHKCU) {
-	ret1 = RegOpenKeyExA(openHKCUkey, Path, 
+	ret1 = RegOpenKeyExA(openHKCUkey, Path,
 			     0, AccessType, &ihky->HKCUkey);
 	/* if successful, then save real starting point */
 	if (ret1 != ERROR_SUCCESS)
 	    ihky->HKCUkey = 0;
     }
-    ret2 = RegOpenKeyExA(openHKLMkey, Path, 
+    ret2 = RegOpenKeyExA(openHKLMkey, Path,
 			 0, AccessType, &ihky->HKLMkey);
     if (ret2 != ERROR_SUCCESS)
 	ihky->HKLMkey = 0;
@@ -159,12 +159,12 @@
     LONG ret2, ret1 = ~ERROR_SUCCESS;
     LPInternal_HUSKEY ihky;
 
-    TRACE("(%s, 0x%lx, 0x%lx, %p, %s)\n", debugstr_w(Path), 
-	  (LONG)AccessType, (LONG)hRelativeUSKey, phNewUSKey, 
+    TRACE("(%s, 0x%lx, 0x%lx, %p, %s)\n", debugstr_w(Path),
+	  (LONG)AccessType, (LONG)hRelativeUSKey, phNewUSKey,
 	  (fIgnoreHKCU) ? "Ignoring HKCU" : "Process HKCU then HKLM");
 
     /* now create the internal version of HUSKEY */
-    ihky = (LPInternal_HUSKEY)HeapAlloc(GetProcessHeap(), 0 , 
+    ihky = (LPInternal_HUSKEY)HeapAlloc(GetProcessHeap(), 0 ,
 					sizeof(Internal_HUSKEY));
     lstrcpynW(ihky->key_string, Path, sizeof(ihky->key_string));
 
@@ -180,13 +180,13 @@
     ihky->HKCUkey = 0;
     ihky->HKLMkey = 0;
     if (!fIgnoreHKCU) {
-	ret1 = RegOpenKeyExW(openHKCUkey, Path, 
+	ret1 = RegOpenKeyExW(openHKCUkey, Path,
 			    0, AccessType, &ihky->HKCUkey);
 	/* if successful, then save real starting point */
 	if (ret1 != ERROR_SUCCESS)
 	    ihky->HKCUkey = 0;
     }
-    ret2 = RegOpenKeyExW(openHKLMkey, Path, 
+    ret2 = RegOpenKeyExW(openHKLMkey, Path,
 			0, AccessType, &ihky->HKLMkey);
     if (ret2 != ERROR_SUCCESS)
 	ihky->HKLMkey = 0;
@@ -411,7 +411,7 @@
 	      (fIgnoreHKCU) ? "Ignoring HKCU" : "Tries HKCU then HKLM");
 
 	datalen = sizeof(data)-1;
-	if (!(retvalue = SHRegGetUSValueA( pszSubKey, pszValue, &type, 
+	if (!(retvalue = SHRegGetUSValueA( pszSubKey, pszValue, &type,
 					   data, &datalen,
 					   fIgnoreHKCU, 0, 0))) {
 	    /* process returned data via type into bool */
@@ -470,7 +470,7 @@
 	      (fIgnoreHKCU) ? "Ignoring HKCU" : "Tries HKCU then HKLM");
 
 	datalen = (sizeof(data)-1) * sizeof(WCHAR);
-	if (!(retvalue = SHRegGetUSValueW( pszSubKey, pszValue, &type, 
+	if (!(retvalue = SHRegGetUSValueW( pszSubKey, pszValue, &type,
 					   data, &datalen,
 					   fIgnoreHKCU, 0, 0))) {
 	    /* process returned data via type into bool */
@@ -532,11 +532,11 @@
 				   pcSubKeys, pcchMaxSubKeyLen, 0,
 				   pcValues, pcchMaxValueNameLen, 0, 0, 0);
 	    if ((ret == ERROR_SUCCESS) ||
-		(enumRegFlags == SHREGENUM_HKCU)) 
+		(enumRegFlags == SHREGENUM_HKCU))
 		return ret;
 	}
 	if (((enumRegFlags == SHREGENUM_HKLM) ||
-	     (enumRegFlags == SHREGENUM_DEFAULT)) && 
+	     (enumRegFlags == SHREGENUM_DEFAULT)) &&
 	    (dokey = REG_GetHKEYFromHUSKEY(hUSKey,REG_HKLM))) {
 	    return RegQueryInfoKeyA(dokey, 0, 0, 0,
 				    pcSubKeys, pcchMaxSubKeyLen, 0,
@@ -565,17 +565,17 @@
 
 	/* if user wants HKCU, and it exists, then try it */
 	if (((enumRegFlags == SHREGENUM_HKCU) ||
-	     (enumRegFlags == SHREGENUM_DEFAULT)) && 
+	     (enumRegFlags == SHREGENUM_DEFAULT)) &&
 	    (dokey = REG_GetHKEYFromHUSKEY(hUSKey,REG_HKCU))) {
 	    ret = RegQueryInfoKeyW(dokey, 0, 0, 0,
 				   pcSubKeys, pcchMaxSubKeyLen, 0,
 				   pcValues, pcchMaxValueNameLen, 0, 0, 0);
 	    if ((ret == ERROR_SUCCESS) ||
-		(enumRegFlags == SHREGENUM_HKCU)) 
+		(enumRegFlags == SHREGENUM_HKCU))
 		return ret;
 	}
 	if (((enumRegFlags == SHREGENUM_HKLM) ||
-	     (enumRegFlags == SHREGENUM_DEFAULT)) && 
+	     (enumRegFlags == SHREGENUM_DEFAULT)) &&
 	    (dokey = REG_GetHKEYFromHUSKEY(hUSKey,REG_HKLM))) {
 	    return RegQueryInfoKeyW(dokey, 0, 0, 0,
 				    pcSubKeys, pcchMaxSubKeyLen, 0,
@@ -601,14 +601,14 @@
 	      *pcchValueNameLen, enumRegFlags);
 
 	if (((enumRegFlags == SHREGENUM_HKCU) ||
-	     (enumRegFlags == SHREGENUM_DEFAULT)) && 
+	     (enumRegFlags == SHREGENUM_DEFAULT)) &&
 	    (dokey = REG_GetHKEYFromHUSKEY(hUSKey,REG_HKCU))) {
-	    return RegEnumKeyExA(dokey, dwIndex, pszName, pcchValueNameLen, 
+	    return RegEnumKeyExA(dokey, dwIndex, pszName, pcchValueNameLen,
 				0, 0, 0, 0);
 	}
 
 	if (((enumRegFlags == SHREGENUM_HKLM) ||
-	     (enumRegFlags == SHREGENUM_DEFAULT)) && 
+	     (enumRegFlags == SHREGENUM_DEFAULT)) &&
 	    (dokey = REG_GetHKEYFromHUSKEY(hUSKey,REG_HKLM))) {
 	    return RegEnumKeyExA(dokey, dwIndex, pszName, pcchValueNameLen,
 				0, 0, 0, 0);
@@ -634,7 +634,7 @@
 	      *pcchValueNameLen, enumRegFlags);
 
 	if (((enumRegFlags == SHREGENUM_HKCU) ||
-	     (enumRegFlags == SHREGENUM_DEFAULT)) && 
+	     (enumRegFlags == SHREGENUM_DEFAULT)) &&
 	    (dokey = REG_GetHKEYFromHUSKEY(hUSKey,REG_HKCU))) {
 	    return RegEnumKeyExW(dokey, dwIndex, pszName, pcchValueNameLen,
 				0, 0, 0, 0);
@@ -661,17 +661,17 @@
     TRACE("(0x%lx,%s,%ld,%p,%ld,%ld)\n",
 	  (LONG)hUSKey, debugstr_a(pszValue), dwType, pvData, cbData, dwFlags);
 
-    if ((dwFlags & SHREGSET_FORCE_HKCU) && 
+    if ((dwFlags & SHREGSET_FORCE_HKCU) &&
 	    (dokey = REG_GetHKEYFromHUSKEY(hUSKey,REG_HKCU))) {
 	RegSetValueExA(dokey, pszValue, 0, dwType, pvData, cbData);
     }
 
-    if ((dwFlags & SHREGSET_FORCE_HKLM) && 
+    if ((dwFlags & SHREGSET_FORCE_HKLM) &&
 	    (dokey = REG_GetHKEYFromHUSKEY(hUSKey,REG_HKLM))) {
 	RegSetValueExA(dokey, pszValue, 0, dwType, pvData, cbData);
     }
 
-    if (dwFlags & (SHREGSET_FORCE_HKCU | SHREGSET_FORCE_HKLM)) 
+    if (dwFlags & (SHREGSET_FORCE_HKCU | SHREGSET_FORCE_HKLM))
 	return ERROR_SUCCESS;
 
     FIXME("SHREGSET_HKCU or SHREGSET_HKLM not supported\n");
@@ -689,17 +689,17 @@
     TRACE("(0x%lx,%s,%ld,%p,%ld,%ld)\n",
 	  (LONG)hUSKey, debugstr_w(pszValue), dwType, pvData, cbData, dwFlags);
 
-    if ((dwFlags & SHREGSET_FORCE_HKCU) && 
+    if ((dwFlags & SHREGSET_FORCE_HKCU) &&
 	    (dokey = REG_GetHKEYFromHUSKEY(hUSKey,REG_HKCU))) {
 	RegSetValueExW(dokey, pszValue, 0, dwType, pvData, cbData);
     }
 
-    if ((dwFlags & SHREGSET_FORCE_HKLM) && 
+    if ((dwFlags & SHREGSET_FORCE_HKLM) &&
 	    (dokey = REG_GetHKEYFromHUSKEY(hUSKey,REG_HKLM))) {
 	RegSetValueExW(dokey, pszValue, 0, dwType, pvData, cbData);
     }
 
-    if (dwFlags & (SHREGSET_FORCE_HKCU | SHREGSET_FORCE_HKLM)) 
+    if (dwFlags & (SHREGSET_FORCE_HKCU | SHREGSET_FORCE_HKLM))
 	return ERROR_SUCCESS;
 
     FIXME("SHREGSET_HKCU or SHREGSET_HKLM not supported\n");
@@ -832,7 +832,7 @@
   /*   lpszSubKey can be 0. In this case the value is taken from the
    *   current key.
    */
-  if(lpszSubKey) 
+  if(lpszSubKey)
     dwRet = RegOpenKeyExA(hKey, lpszSubKey, 0, KEY_QUERY_VALUE, &hSubKey);
 
   if (! dwRet)
@@ -858,7 +858,7 @@
   TRACE("(hkey=0x%08x,%s,%s,%p,%p,%p)\n", hKey, debugstr_w(lpszSubKey),
         debugstr_w(lpszValue), pwType, pvData, pcbData);
 
-  if(lpszSubKey) 
+  if(lpszSubKey)
     dwRet = RegOpenKeyExW(hKey, lpszSubKey, 0, KEY_QUERY_VALUE, &hSubKey);
 
   if (! dwRet)
@@ -1086,7 +1086,7 @@
      * to allocate our own
      */
     if ((!pvData) || (dwRet == ERROR_MORE_DATA) )
-    { 
+    {
       char cNull = '\0';
       nBytesToAlloc = (!pvData || (dwRet == ERROR_MORE_DATA)) ? dwUnExpDataLen : *pcbData;
 
@@ -1102,7 +1102,7 @@
       szData = (LPSTR) LocalAlloc(GMEM_ZEROINIT, nBytesToAlloc + 1);
       lstrcpyA(szData, pvData);
       dwExpDataLen = ExpandEnvironmentStringsA(szData, pvData, *pcbData / sizeof(CHAR));
-      if (dwExpDataLen > *pcbData) dwRet = ERROR_MORE_DATA; 
+      if (dwExpDataLen > *pcbData) dwRet = ERROR_MORE_DATA;
       dwUnExpDataLen = max(nBytesToAlloc, dwExpDataLen);
       LocalFree((HLOCAL) szData);
     }
@@ -1145,7 +1145,7 @@
      * to allocate our own
      */
     if ((!pvData) || (dwRet == ERROR_MORE_DATA) )
-    { 
+    {
       WCHAR cNull = '\0';
       nBytesToAlloc = (!pvData || (dwRet == ERROR_MORE_DATA)) ? dwUnExpDataLen : *pcbData;
 
@@ -1161,7 +1161,7 @@
       szData = (LPWSTR) LocalAlloc(GMEM_ZEROINIT, nBytesToAlloc + 1);
       lstrcpyW(szData, pvData);
       dwExpDataLen = ExpandEnvironmentStringsW(szData, pvData, *pcbData/sizeof(WCHAR) );
-      if (dwExpDataLen > *pcbData) dwRet = ERROR_MORE_DATA; 
+      if (dwExpDataLen > *pcbData) dwRet = ERROR_MORE_DATA;
       dwUnExpDataLen = max(nBytesToAlloc, dwExpDataLen);
       LocalFree((HLOCAL) szData);
     }
diff --git a/dlls/shlwapi/regstream.c b/dlls/shlwapi/regstream.c
index 31ed737..1b74e43 100644
--- a/dlls/shlwapi/regstream.c
+++ b/dlls/shlwapi/regstream.c
@@ -29,7 +29,7 @@
 
 WINE_DEFAULT_DEBUG_CHANNEL(shell);
 
-typedef struct 
+typedef struct
 {	ICOM_VFIELD(IStream);
 	DWORD		ref;
 	HKEY		hKey;
@@ -47,7 +47,7 @@
 {
 	ISHRegStream*	rstr;
 	DWORD		dwType;
-	
+
 	rstr = (ISHRegStream*)HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(ISHRegStream));
 
 	ICOM_VTBL(rstr)=&rstvt;
@@ -56,7 +56,7 @@
 	if (!(RegOpenKeyExA (hKey, pszSubKey, 0, KEY_READ, &(rstr->hKey))))
 	{
 	  if (!(RegQueryValueExA(rstr->hKey, pszValue,0,0,0,&(rstr->dwLength))))
-	  { 
+	  {
 	    /* read the binary data into the buffer */
 	    if((rstr->pbBuffer = HeapAlloc(GetProcessHeap(),0,rstr->dwLength)))
 	    {
@@ -84,7 +84,7 @@
 {
 	ISHRegStream*	rstr;
 	DWORD		dwType;
-	
+
 	rstr = (ISHRegStream*)HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(ISHRegStream));
 
 	ICOM_VTBL(rstr)=&rstvt;
@@ -93,7 +93,7 @@
 	if (!(RegOpenKeyExW (hKey, pszSubKey, 0, KEY_READ, &(rstr->hKey))))
 	{
 	  if (!(RegQueryValueExW(rstr->hKey, pszValue,0,0,0,&(rstr->dwLength))))
-	  { 
+	  {
 	    /* read the binary data into the buffer */
 	    if((rstr->pbBuffer = HeapAlloc(GetProcessHeap(),0,rstr->dwLength)))
 	    {
@@ -126,15 +126,15 @@
 	*ppvObj = NULL;
 
 	if(IsEqualIID(riid, &IID_IUnknown))	/*IUnknown*/
-	{ *ppvObj = This; 
+	{ *ppvObj = This;
 	}
 	else if(IsEqualIID(riid, &IID_IStream))	/*IStream*/
 	{ *ppvObj = This;
-	}   
+	}
 
 	if(*ppvObj)
-	{ 
-	  IStream_AddRef((IStream*)*ppvObj);      
+	{
+	  IStream_AddRef((IStream*)*ppvObj);
 	  TRACE("-- Interface: (%p)->(%p)\n",ppvObj,*ppvObj);
 	  return S_OK;
 	}
@@ -163,7 +163,7 @@
 
 	TRACE("(%p)->()\n",This);
 
-	if (!--(This->ref)) 
+	if (!--(This->ref))
 	{ TRACE(" destroying SHReg IStream (%p)\n",This);
 
 	  if (This->pbBuffer)
@@ -183,21 +183,21 @@
 	ICOM_THIS(ISHRegStream, iface);
 
 	DWORD dwBytesToRead, dwBytesLeft;
-	
+
 	TRACE("(%p)->(%p,0x%08lx,%p)\n",This, pv, cb, pcbRead);
-	
+
 	if ( !pv )
 	  return STG_E_INVALIDPOINTER;
-	  
+
 	dwBytesLeft = This->dwLength - This->dwPos;
 
 	if ( 0 >= dwBytesLeft )						/* end of buffer */
 	  return S_FALSE;
-	
+
 	dwBytesToRead = ( cb > dwBytesLeft) ? dwBytesLeft : cb;
 
 	memmove ( pv, (This->pbBuffer) + (This->dwPos), dwBytesToRead);
-	
+
 	This->dwPos += dwBytesToRead;					/* adjust pointer */
 
 	if (pcbRead)
@@ -286,8 +286,8 @@
 	return E_NOTIMPL;
 }
 
-static struct ICOM_VTABLE(IStream) rstvt = 
-{	
+static struct ICOM_VTABLE(IStream) rstvt =
+{
 	ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
 	IStream_fnQueryInterface,
 	IStream_fnAddRef,
@@ -303,7 +303,7 @@
 	IStream_fnUnlockRegion,
 	IStream_fnStat,
 	IStream_fnClone
-	
+
 };
 
 /*************************************************************************
diff --git a/dlls/shlwapi/shlwapi_main.c b/dlls/shlwapi/shlwapi_main.c
index 600dfa9..fdc4aa2 100644
--- a/dlls/shlwapi/shlwapi_main.c
+++ b/dlls/shlwapi/shlwapi_main.c
@@ -28,7 +28,7 @@
 
 WINE_DEFAULT_DEBUG_CHANNEL(shell);
 
-HINSTANCE shlwapi_hInstance = 0; 
+HINSTANCE shlwapi_hInstance = 0;
 HMODULE SHLWAPI_hshell32 = 0;
 HMODULE SHLWAPI_hwinmm = 0;
 HMODULE SHLWAPI_hcomdlg32 = 0;
diff --git a/dlls/shlwapi/string.c b/dlls/shlwapi/string.c
index c80225d..7d8759f 100644
--- a/dlls/shlwapi/string.c
+++ b/dlls/shlwapi/string.c
@@ -19,7 +19,7 @@
  */
 
 #include <ctype.h>
-#include <stdlib.h> 
+#include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
 
@@ -268,7 +268,7 @@
 {
 	int len = strlen(lpSrc);
 	LPSTR lpDest = (LPSTR) LocalAlloc(LMEM_FIXED, len+1);
-	
+
 	TRACE("%s\n", lpSrc);
 
 	if (lpDest) strcpy(lpDest, lpSrc);
@@ -282,7 +282,7 @@
 {
 	int len = strlenW(lpSrc);
 	LPWSTR lpDest = (LPWSTR) LocalAlloc(LMEM_FIXED, sizeof(WCHAR) * (len+1));
-	
+
 	TRACE("%s\n", debugstr_w(lpSrc));
 
 	if (lpDest) strcpyW(lpDest, lpSrc);
@@ -308,9 +308,9 @@
 	      pos = j;
 	    }
 	  }
-	}      
+	}
 	TRACE("-- %u\n", pos);
-	return pos;	
+	return pos;
 }
 
 /*************************************************************************
@@ -332,9 +332,9 @@
 	      pos = j;
 	    }
 	  }
-	}      
+	}
 	TRACE("-- %u\n", pos);
-	return pos;	
+	return pos;
 }
 
 /**************************************************************************
@@ -355,7 +355,7 @@
         if (*lpStart != LOBYTE(wMatch)) continue;
         if (dbcs && lpStart[1] != HIBYTE(wMatch)) continue;
         lpGotIt = lpStart;
-    }    
+    }
     return (LPSTR)lpGotIt;
 }
 
@@ -403,7 +403,7 @@
 	} else {
 	    if (toupper(*lpStart) == toupper(wMatch)) lpGotIt = lpStart;
 	}
-    }    
+    }
     return (LPSTR)lpGotIt;
 }
 
@@ -465,7 +465,7 @@
 
 /*************************************************************************
  * StrRetToBufA					[SHLWAPI.@]
- * 
+ *
  * converts a STRRET to a normal string
  *
  * NOTES
@@ -510,7 +510,7 @@
 
 /*************************************************************************
  * StrRetToBufW					[SHLWAPI.@]
- * 
+ *
  * converts a STRRET to a normal string
  *
  * NOTES
@@ -577,7 +577,7 @@
 	{ sprintf (buf,"%3.1f GB", (FLOAT)dw/1073741824L);
 	}
 	lstrcpynA (pszBuf, buf, cchBuf);
-	return pszBuf;	
+	return pszBuf;
 }
 
 /*************************************************************************
diff --git a/dlls/shlwapi/tests/shreg.c b/dlls/shlwapi/tests/shreg.c
index 70ae1ec..6ce7d41 100644
--- a/dlls/shlwapi/tests/shreg.c
+++ b/dlls/shlwapi/tests/shreg.c
@@ -1,4 +1,4 @@
-/* Unit test suite for SHReg* functions 
+/* Unit test suite for SHReg* functions
  *
  * Copyright 2002 Juergen Schmied
  *
@@ -145,7 +145,7 @@
 
 	/*
 	 * string grows during expanding
-	 */	
+	 */
 	strcpy(buf, sEmptyBuffer);
 	dwSize = 6;
 	dwType = -1;
diff --git a/dlls/shlwapi/url.c b/dlls/shlwapi/url.c
index dacbf1e..0bf68f4 100644
--- a/dlls/shlwapi/url.c
+++ b/dlls/shlwapi/url.c
@@ -198,7 +198,7 @@
 	  debugstr_a(pszUrl), pszCanonicalized,
 	  pcchCanonicalized, dwFlags);
 
-    base = (LPWSTR) HeapAlloc(GetProcessHeap(), 0, 
+    base = (LPWSTR) HeapAlloc(GetProcessHeap(), 0,
 			      (2*INTERNET_MAX_URL_LENGTH) * sizeof(WCHAR));
     canonical = base + INTERNET_MAX_URL_LENGTH;
 
@@ -217,7 +217,7 @@
 	HeapFree(GetProcessHeap(), 0, base);
 	return E_POINTER;
     }
-    WideCharToMultiByte(0, 0, canonical, len+1, pszCanonicalized, 
+    WideCharToMultiByte(0, 0, canonical, len+1, pszCanonicalized,
 			*pcchCanonicalized, 0, 0);
     *pcchCanonicalized = len2;
     HeapFree(GetProcessHeap(), 0, base);
@@ -228,7 +228,7 @@
  *        UrlCanonicalizeW     [SHLWAPI.@]
  *
  *
- * MSDN is wrong (at 10/30/01 - go figure). This should support the 
+ * MSDN is wrong (at 10/30/01 - go figure). This should support the
  * following flags:                                      GLA
  *    URL_DONT_ESCAPE_EXTRA_INFO    0x02000000
  *    URL_ESCAPE_SPACES_ONLY        0x04000000
@@ -238,7 +238,7 @@
  *    URL_DONT_SIMPLIFY             0x08000000
  *    URL_ESCAPE_SEGMENT_ONLY       0x00002000
  */
-HRESULT WINAPI UrlCanonicalizeW(LPCWSTR pszUrl, LPWSTR pszCanonicalized, 
+HRESULT WINAPI UrlCanonicalizeW(LPCWSTR pszUrl, LPWSTR pszCanonicalized,
 				LPDWORD pcchCanonicalized, DWORD dwFlags)
 {
     HRESULT hr = S_OK;
@@ -364,7 +364,7 @@
     if(dwFlags & URL_UNESCAPE)
         UrlUnescapeW(lpszUrlCpy, NULL, NULL, URL_UNESCAPE_INPLACE);
 
-    if((EscapeFlags = dwFlags & (URL_ESCAPE_UNSAFE | 
+    if((EscapeFlags = dwFlags & (URL_ESCAPE_UNSAFE |
                                  URL_ESCAPE_SPACES_ONLY |
                                  URL_ESCAPE_PERCENT |
                                  URL_DONT_ESCAPE_EXTRA_INFO |
@@ -384,7 +384,7 @@
     }
 
     HeapFree(GetProcessHeap(), 0, lpszUrlCpy);
-  
+
     if (hr == S_OK)
 	TRACE("result %s\n", debugstr_w(pszCanonicalized));
 
@@ -407,7 +407,7 @@
 	  debugstr_a(pszBase),debugstr_a(pszRelative),
 	  *pcchCombined,dwFlags);
 
-    base = (LPWSTR) HeapAlloc(GetProcessHeap(), 0, 
+    base = (LPWSTR) HeapAlloc(GetProcessHeap(), 0,
 			      (3*INTERNET_MAX_URL_LENGTH) * sizeof(WCHAR));
     relative = base + INTERNET_MAX_URL_LENGTH;
     combined = relative + INTERNET_MAX_URL_LENGTH;
@@ -508,7 +508,7 @@
 	 *    .ap2      points to location (starting with '//')
 	 *    .sizep2   length of location (above) and rest less the last
 	 *              leaf (if any)
-	 *    sizeloc   length of location (above) up to but not including 
+	 *    sizeloc   length of location (above) up to but not including
 	 *              the last '/'
 	 */
 
@@ -548,7 +548,7 @@
 	}
 
 	/* handle cases where pszRelative has scheme */
-	if ((base.sizep1 == relative.sizep1) && 
+	if ((base.sizep1 == relative.sizep1) &&
 	    (strncmpW(base.ap1, relative.ap1, base.sizep1) == 0)) {
 
 	    /* since the schemes are the same */
@@ -590,7 +590,7 @@
 	    *pcchCombined = len;
 	    ret = E_POINTER;
 	    break;
-	} 
+	}
 	strcatW(preliminary, mrelative);
 	break;
 
@@ -603,7 +603,7 @@
 	    *pcchCombined = len;
 	    ret = E_POINTER;
 	    break;
-	} 
+	}
 	strcpyW(preliminary, mrelative);
 	if (!(dwFlags & URL_PLUGGABLE_PROTOCOL) &&
 	    URL_JustLocation(relative.ap2))
@@ -619,7 +619,7 @@
 	    *pcchCombined = len;
 	    ret = E_POINTER;
 	    break;
-	} 
+	}
 	strncpyW(preliminary, base.ap1, base.sizep1 + 1);
 	work = preliminary + base.sizep1 + 1;
 	strcpyW(work, relative.ap2);
@@ -638,7 +638,7 @@
 	    *pcchCombined = len;
 	    ret = E_POINTER;
 	    break;
-	} 
+	}
 	strncpyW(preliminary, base.ap1, base.sizep1+1+sizeloc);
 	work = preliminary + base.sizep1 + 1 + sizeloc;
 	if (dwFlags & URL_PLUGGABLE_PROTOCOL)
@@ -647,7 +647,7 @@
 	break;
 
     case 5:  /*
-	      * Return the pszBase without its document (if any) and 
+	      * Return the pszBase without its document (if any) and
 	      * append pszRelative after its scheme.
 	      */
 	len = base.sizep1 + 1 + base.sizep2 + relative.sizep2;
@@ -655,7 +655,7 @@
 	    *pcchCombined = len;
 	    ret = E_POINTER;
 	    break;
-	} 
+	}
 	strncpyW(preliminary, base.ap1, base.sizep1+1+base.sizep2);
 	work = preliminary + base.sizep1+1+base.sizep2 - 1;
 	if (*work++ != L'/')
@@ -670,7 +670,7 @@
 
     if (ret == S_OK) {
 	/*
-	 * Now that the combining is done, process the escape options if 
+	 * Now that the combining is done, process the escape options if
 	 * necessary, otherwise just copy the string.
 	 */
 	myflags = dwFlags & (URL_ESCAPE_PERCENT |
@@ -787,7 +787,7 @@
     }
     *pcchEscaped = needed;
     return ret;
-}	
+}
 
 /*************************************************************************
  *      UrlEscapeW	[SHLWAPI.@]
@@ -884,7 +884,7 @@
  *      UrlUnescapeA	[SHLWAPI.@]
  *
  * Converts escape sequences back to ordinary characters.
- * 
+ *
  * If URL_ESCAPE_INPLACE is set in dwFlags then pszUnescaped and
  * pcchUnescaped are ignored and the converted string is returned in
  * pszUrl, otherwise the string is returned in pszUnescaped.
@@ -949,7 +949,7 @@
         *pcchUnescaped = needed;
 
     if (ret == S_OK) {
-	TRACE("result %s\n", (dwFlags & URL_UNESCAPE_INPLACE) ? 
+	TRACE("result %s\n", (dwFlags & URL_UNESCAPE_INPLACE) ?
 	      debugstr_a(pszUrl) : debugstr_a(pszUnescaped));
     }
 
@@ -1013,7 +1013,7 @@
         *pcchUnescaped = needed;
 
     if (ret == S_OK) {
-	TRACE("result %s\n", (dwFlags & URL_UNESCAPE_INPLACE) ? 
+	TRACE("result %s\n", (dwFlags & URL_UNESCAPE_INPLACE) ?
 	      debugstr_w(pszUrl) : debugstr_w(pszUnescaped));
     }
 
@@ -1024,15 +1024,15 @@
  *      UrlGetLocationA 	[SHLWAPI.@]
  *
  * Bugs/Features:
- *  MSDN (as of 2001-11-01) says that: 
- *         "The location is the segment of the URL starting with a ? 
- *          or # character." 
+ *  MSDN (as of 2001-11-01) says that:
+ *         "The location is the segment of the URL starting with a ?
+ *          or # character."
  *     Neither V4 nor V5 of shlwapi.dll implement the '?' and always return
  *     a NULL.
  *  MSDN further states that:
- *         "If a file URL has a query string, ther returned string 
+ *         "If a file URL has a query string, ther returned string
  *          the query string."
- *     In all test cases if the scheme starts with "fi" then a NULL is 
+ *     In all test cases if the scheme starts with "fi" then a NULL is
  *     returned. V5 gives the following results:
  *       NULL     file://aa/b/cd#hohoh
  *       #hohoh   http://aa/b/cd#hohoh
@@ -1186,7 +1186,7 @@
     TRACE("(in %s, out size %ld, flags %08lx) using W version\n",
 	  debugstr_a(pszIn), *pcchOut, dwFlags);
 
-    in = (LPWSTR) HeapAlloc(GetProcessHeap(), 0, 
+    in = (LPWSTR) HeapAlloc(GetProcessHeap(), 0,
 			      (2*INTERNET_MAX_URL_LENGTH) * sizeof(WCHAR));
     out = in + INTERNET_MAX_URL_LENGTH;
 
@@ -1300,7 +1300,7 @@
 	  debugstr_w(pszIn), *pcchOut, dwFlags);
 
     if (dwFlags & URL_APPLY_GUESSFILE) {
-	FIXME("(%s %p %p(%ld) 0x%08lx): stub URL_APPLY_GUESSFILE not implemented\n", 
+	FIXME("(%s %p %p(%ld) 0x%08lx): stub URL_APPLY_GUESSFILE not implemented\n",
 	      debugstr_w(pszIn), pszOut, pcchOut, *pcchOut, dwFlags);
 	strcpyW(pszOut, pszIn);
 	*pcchOut = strlenW(pszOut);
@@ -1313,7 +1313,7 @@
     if (res1) {
 	/* no scheme in input, need to see if we need to guess */
 	if (dwFlags & URL_APPLY_GUESSSCHEME) {
-	    if ((ret = URL_GuessScheme(pszIn, pszOut, pcchOut)) != -1) 
+	    if ((ret = URL_GuessScheme(pszIn, pszOut, pcchOut)) != -1)
 		return ret;
 	}
     }
@@ -1332,7 +1332,7 @@
 	}
     }
 
-    /* If we are here, then either invalid scheme, 
+    /* If we are here, then either invalid scheme,
      * or no scheme and can't/failed guess.
      */
     if ( ( ((res1 == 0) && (dwFlags & URL_APPLY_FORCEAPPLY)) ||
@@ -1502,7 +1502,7 @@
 		start++;
 		(*size)++;
 	    } else if (*start == L'%') {
-		if (isxdigitW(*(start+1)) && 
+		if (isxdigitW(*(start+1)) &&
 		    isxdigitW(*(start+2))) {
 		    start += 3;
 		    *size += 3;
@@ -1614,13 +1614,13 @@
 /*************************************************************************
  *      UrlGetPartA  	[SHLWAPI.@]
  */
-HRESULT WINAPI UrlGetPartA(LPCSTR pszIn, LPSTR pszOut, LPDWORD pcchOut, 
+HRESULT WINAPI UrlGetPartA(LPCSTR pszIn, LPSTR pszOut, LPDWORD pcchOut,
 			   DWORD dwPart, DWORD dwFlags)
 {
     LPWSTR in, out;
     DWORD ret, len, len2;
 
-    in = (LPWSTR) HeapAlloc(GetProcessHeap(), 0, 
+    in = (LPWSTR) HeapAlloc(GetProcessHeap(), 0,
 			      (2*INTERNET_MAX_URL_LENGTH) * sizeof(WCHAR));
     out = in + INTERNET_MAX_URL_LENGTH;
 
@@ -1649,7 +1649,7 @@
 /*************************************************************************
  *      UrlGetPartW  	[SHLWAPI.@]
  */
-HRESULT WINAPI UrlGetPartW(LPCWSTR pszIn, LPWSTR pszOut, LPDWORD pcchOut, 
+HRESULT WINAPI UrlGetPartW(LPCWSTR pszIn, LPWSTR pszOut, LPDWORD pcchOut,
 			   DWORD dwPart, DWORD dwFlags)
 {
     WINE_PARSE_URL pl;
diff --git a/dlls/snmpapi/main.c b/dlls/snmpapi/main.c
index 63be398..035436b 100644
--- a/dlls/snmpapi/main.c
+++ b/dlls/snmpapi/main.c
@@ -35,7 +35,7 @@
 	LPVOID lpvReserved)
 {
     TRACE("(%08x,%08lx,%p)\n", hInstDLL, fdwReason, lpvReserved);
-  
+
     switch(fdwReason) {
     case DLL_PROCESS_ATTACH:
         break;
@@ -46,6 +46,6 @@
     case DLL_THREAD_DETACH:
         break;
     }
-  
+
     return TRUE;
 }
diff --git a/dlls/tapi32/assisted.c b/dlls/tapi32/assisted.c
index dbd92fc..098ccfa 100644
--- a/dlls/tapi32/assisted.c
+++ b/dlls/tapi32/assisted.c
@@ -31,11 +31,11 @@
 DWORD WINAPI tapiGetLocationInfo(LPSTR lpszCountryCode, LPSTR lpszCityCode)
 {
     char temp[30];
-    
+
     FIXME("(%s, %s): file sections ???\n", lpszCountryCode, lpszCityCode);
     if (!(GetPrivateProfileStringA("Locations", "CurrentLocation", "", temp, 30, "telephon.ini")))
         return TAPIERR_REQUESTFAILED;
-    if (!(GetPrivateProfileStringA("Locations", "FIXME_ENTRY", "", lpszCityCode, 8, "telephon.ini"))) 
+    if (!(GetPrivateProfileStringA("Locations", "FIXME_ENTRY", "", lpszCityCode, 8, "telephon.ini")))
         return TAPIERR_REQUESTFAILED;
     return 0;
 }
diff --git a/dlls/tapi32/line.c b/dlls/tapi32/line.c
index 5345c2e..e21ac09 100644
--- a/dlls/tapi32/line.c
+++ b/dlls/tapi32/line.c
@@ -44,7 +44,7 @@
 {
     FIXME("(%s, %04x, %p): stub.\n", lpszProviderName, hwndOwner, lpdwPermanentProviderID);
     return 1;
-}	
+}
 
 /***********************************************************************
  *		lineAddToConference (TAPI32.@)
@@ -62,7 +62,7 @@
 {
     FIXME("(%04x, %s, %ld): stub.\n", hCall, lpsUserUserInfo, dwSize);
     return 1;
-}	
+}
 
 /***********************************************************************
  *		lineBlindTransfer (TAPI32.@)
@@ -71,7 +71,7 @@
 {
     FIXME("(%04x, %s, %08lx): stub.\n", hCall, lpszDestAddress, dwCountryCode);
     return 1;
-}	
+}
 
 /***********************************************************************
  *		lineClose (TAPI32.@)
@@ -80,7 +80,7 @@
 {
     FIXME("(%04x): stub.\n", hLine);
     return 0;
-}	
+}
 
 /***********************************************************************
  *		lineCompleteCall (TAPI32.@)
@@ -89,7 +89,7 @@
 {
     FIXME("(%04x, %p, %08lx, %08lx): stub.\n", hCall, lpdwCompletionID, dwCompletionMode, dwMessageID);
     return 1;
-}	
+}
 
 /***********************************************************************
  *		lineCompleteTransfer (TAPI32.@)
@@ -107,7 +107,7 @@
 {
     FIXME("(%08lx, %04x, %s): stub.\n", dwDeviceID, hwndOwner, lpszDeviceClass);
     return 0;
-}	
+}
 
 /***********************************************************************
  *		lineConfigDialogEdit (TAPI32.@)
@@ -116,7 +116,7 @@
 {
     FIXME("stub.\n");
     return 0;
-}	
+}
 
 /***********************************************************************
  *		lineConfigProvider (TAPI32.@)
@@ -143,7 +143,7 @@
 {
     FIXME("(%04x, %08lx, %04x, %p, %ld): stub.\n", hLine, dwAddressId, hCall, lpParams, dwSize);
     return 1;
-}	
+}
 
 /***********************************************************************
  *		lineDevSpecificFeature (TAPI32.@)
@@ -165,7 +165,7 @@
 
 /***********************************************************************
  *		lineDrop (TAPI32.@)
- */ 
+ */
 DWORD WINAPI lineDrop(HCALL hCall, LPCSTR lpsUserUserInfo, DWORD dwSize)
 {
     FIXME("(%04x, %s, %08lx): stub.\n", hCall, lpsUserUserInfo, dwSize);
@@ -183,7 +183,7 @@
 
 /***********************************************************************
  *		lineGatherDigits (TAPI32.@)
- */	
+ */
 DWORD WINAPI lineGatherDigits(HCALL hCall, DWORD dwDigitModes, LPSTR lpsDigits, DWORD dwNumDigits, LPCSTR lpszTerminationDigits, DWORD dwFirstDigitTimeout, DWORD dwInterDigitTimeout)
 {
     FIXME("stub.\n");
@@ -206,7 +206,7 @@
 {
     FIXME("(%04x, %08lx, %ld, %ld, %p): stub.\n", hCall, dwToneMode, dwDuration, dwNumTones, lpTones);
     return 0;
-}	
+}
 
 /***********************************************************************
  *		lineGetAddressCaps (TAPI32.@)
@@ -242,7 +242,7 @@
 {
     FIXME("(%s, %08lx, %p, %08lx, %p, %p): stub.\n", lpszAppFilename, dwMediaMode, lpExtensionID, dwRequestMode, lpExtensionName, lpdwPriority);
     return 0;
-}	
+}
 
 /***********************************************************************
  *		lineGetCallInfo (TAPI32.@)
@@ -269,16 +269,16 @@
 {
     FIXME("(%04x, %p): stub.\n", hCall, lpCallList);
     return 0;
-}	
+}
 
 typedef struct tagTAPI_CountryInfo
 {
     DWORD  dwCountryID;
     DWORD  dwCountryCode;
     LPSTR  lpCountryName;
-    LPSTR  lpSameAreaRule; 
-    LPSTR  lpLongDistanceRule; 
-    LPSTR  lpInternationalRule; 
+    LPSTR  lpSameAreaRule;
+    LPSTR  lpLongDistanceRule;
+    LPSTR  lpInternationalRule;
 } TAPI_CountryInfo;
 
 /* FIXME: this should be stored in an ini file... perhaps TAPI.INI */
@@ -306,7 +306,7 @@
         return LINEERR_INVALPOINTER;
     }
 
-    TRACE("(%08lx, %08lx, %p(%ld)): stub.\n", 
+    TRACE("(%08lx, %08lx, %p(%ld)): stub.\n",
 	  dwCountryID, dwAPIVersion, lpLineCountryList,
 	  lpLineCountryList->dwTotalSize);
 
@@ -408,7 +408,7 @@
 {
     FIXME("(%04x, %08lx, %08lx, %08lx, %p): stub.\n", hLineApp, dwDeviceID, dwAPIVersion, dwExtVersion, lpLineDevCaps);
     return 0;
-}	
+}
 
 /***********************************************************************
  *		lineGetDevConfig (TAPI32.@)
@@ -435,7 +435,7 @@
 {
     FIXME("(%08lx, %s, %p): stub.\n", dwDeviceID, lpszDeviceClass, lphIcon);
     return 0;
-}	
+}
 
 /***********************************************************************
  *		lineGetLineDevStatus (TAPI32.@)
@@ -444,7 +444,7 @@
 {
     FIXME("(%04x, %p): stub.\n", hLine, lpLineDevStatus);
     return 0;
-}	
+}
 
 /***********************************************************************
  *		lineGetNewCalls (TAPI32.@)
@@ -471,7 +471,7 @@
 {
     FIXME("(%08lx, %p): stub.\n", dwAPIVersion, lpProviderList);
     return 0;
-}	
+}
 
 /***********************************************************************
  *		lineGetRequest (TAPI32.@)
@@ -480,7 +480,7 @@
 {
     FIXME("%04x, %08lx, %p): stub.\n", hLineApp, dwRequestMode, lpRequestBuffer);
     return 0;
-}	
+}
 
 /***********************************************************************
  *		lineGetStatusMessages (TAPI32.@)
@@ -489,7 +489,7 @@
 {
     FIXME("(%04x, %p, %p): stub.\n", hLine, lpdwLineStatus, lpdwAddressStates);
     return 0;
-}	
+}
 
 /***********************************************************************
  *		lineGetTranslateCaps (TAPI32.@)
@@ -507,7 +507,7 @@
 {
     FIXME("(%04x, %s, %08lx): stub.\n", hCall, lpszFileName, dwMediaMode);
     return 0;
-}	
+}
 
 /***********************************************************************
  *		lineHold (TAPI32.@)
@@ -516,7 +516,7 @@
 {
     FIXME("(%04x): stub.\n", hCall);
     return 1;
-}	
+}
 
 /***********************************************************************
  *		lineInitialize (TAPI32.@)
@@ -558,7 +558,7 @@
 {
     FIXME("(%04x, %08lx): stub.\n", hCall, dwMediaModes);
     return 0;
-}	
+}
 
 /***********************************************************************
  *		lineMonitorTones (TAPI32.@)
@@ -567,7 +567,7 @@
 {
     FIXME("(%04x, %p, %08lx): stub.\n", hCall, lpToneList, dwNumEntries);
     return 0;
-}	
+}
 
 /***********************************************************************
  *		lineNegotiateAPIVersion (TAPI32.@)
@@ -581,7 +581,7 @@
   LPLINEEXTENSIONID lpExtensionID
 )
 {
-    FIXME("(%04x, %ld, %ld, %ld, %p, %p): stub.\n", hLineApp, dwDeviceID, 
+    FIXME("(%04x, %ld, %ld, %ld, %p, %p): stub.\n", hLineApp, dwDeviceID,
 	  dwAPILowVersion, dwAPIHighVersion, lpdwAPIVersion, lpExtensionID);
     *lpdwAPIVersion = dwAPIHighVersion;
     return 0;
@@ -612,7 +612,7 @@
 {
     FIXME("(%04x, %08lx, %s, %p): stub.\n", hCall, dwParkMode, lpszDirAddress, lpNonDirAddress);
     return 1;
-}	
+}
 
 /***********************************************************************
  *		linePickup (TAPI32.@)
@@ -621,7 +621,7 @@
 {
     FIXME("(%04x, %08lx, %p, %s, %s): stub.\n", hLine, dwAddressID, lphCall, lpszDestAddress, lpszGroupID);
     return 1;
-}	
+}
 
 /***********************************************************************
  *		linePrepareAddToConference (TAPI32.@)
@@ -630,7 +630,7 @@
 {
     FIXME("(%04x, %p, %p): stub.\n", hConfCall, lphConsultCall, lpCallParams);
     return 1;
-}	
+}
 
 /***********************************************************************
  *		lineRedirect (TAPI32.@)
@@ -660,7 +660,7 @@
 {
     FIXME("(%04x): stub.\n", hCall);
     return 1;
-}	
+}
 
 /***********************************************************************
  *		lineRemoveFromConference (TAPI32.@)
@@ -678,7 +678,7 @@
 {
     FIXME("(%08lx, %04x): stub.\n", dwPermanentProviderID, hwndOwner);
     return 1;
-}	
+}
 
 /***********************************************************************
  *		lineSecureCall (TAPI32.@)
@@ -732,8 +732,8 @@
 {
     FIXME("(%04x, %08lx): stub.\n", hCall, dwCallPrivilege);
     return 0;
-}	
-		
+}
+
 /***********************************************************************
  *		lineSetCurrentLocation (TAPI32.@)
  */
@@ -764,7 +764,7 @@
 DWORD dwDigitNumEntries,
 LPLINEMEDIACONTROLMEDIA const lpMediaList,
 DWORD dwMediaNumEntries,
-LPLINEMEDIACONTROLTONE const lpToneList, 
+LPLINEMEDIACONTROLTONE const lpToneList,
 DWORD dwToneNumEntries,
 LPLINEMEDIACONTROLCALLSTATE const lpCallStateList,
 DWORD dwCallStateNumEntries)
@@ -780,7 +780,7 @@
 {
     FIXME("(%04x, %08lx): stub.\n", hCall, dwMediaModes);
     return 0;
-}	
+}
 
 /***********************************************************************
  *		lineSetNumRings (TAPI32.@)
@@ -789,8 +789,8 @@
 {
     FIXME("(%04x, %08lx, %08lx): stub.\n", hLine, dwAddressID, dwNumRings);
     return 0;
-}	
-		
+}
+
 /***********************************************************************
  *		lineSetStatusMessages (TAPI32.@)
  */
@@ -798,8 +798,8 @@
 {
     FIXME("(%04x, %08lx, %08lx): stub.\n", hLine, dwLineStates, dwAddressStates);
     return 0;
-}	
-		
+}
+
 /***********************************************************************
  *		lineSetTerminal (TAPI32.@)
  */
@@ -807,7 +807,7 @@
 {
     FIXME("(%04x, %08lx, %04x, %08lx, %08lx, %08lx, %08lx): stub.\n", hLine, dwAddressID, hCall, dwSelect, dwTerminalModes, dwTerminalID, bEnable);
     return 1;
-}	
+}
 
 /***********************************************************************
  *		lineSetTollList (TAPI32.@)
@@ -816,8 +816,8 @@
 {
     FIXME("(%04x, %08lx, %s, %08lx): stub.\n", hLineApp, dwDeviceID, lpszAddressIn, dwTollListOption);
     return 0;
-}	
-		
+}
+
 /***********************************************************************
  *		lineSetupConference (TAPI32.@)
  */
@@ -834,7 +834,7 @@
 {
     FIXME("(%04x, %p, %p): stub.\n", hCall, lphConsultCall, lpCallParams);
     return 1;
-}	
+}
 
 /***********************************************************************
  *		lineShutdown (TAPI32.@)
diff --git a/dlls/tapi32/phone.c b/dlls/tapi32/phone.c
index 110dc49..7b49052 100644
--- a/dlls/tapi32/phone.c
+++ b/dlls/tapi32/phone.c
@@ -97,8 +97,8 @@
 {
     FIXME("(%04x, %08lx, %p): stub.\n", hPhone, dwHookSwitchDev, lpdwGain);
     return 0;
-}	
-		
+}
+
 /***********************************************************************
  *		phoneGetHookSwitch (TAPI32.@)
  */
diff --git a/dlls/ttydrv/dc.c b/dlls/ttydrv/dc.c
index f4d2c25..95f9efd 100644
--- a/dlls/ttydrv/dc.c
+++ b/dlls/ttydrv/dc.c
@@ -45,11 +45,11 @@
   TTYDRV_PDEVICE *physDev;
 
   TRACE("(%p, %s, %s, %s, %p)\n",
-    dc, debugstr_a(driver), debugstr_a(device), 
+    dc, debugstr_a(driver), debugstr_a(device),
     debugstr_a(output), initData);
 
   dc->physDev = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY,
-			  sizeof(TTYDRV_PDEVICE));  
+			  sizeof(TTYDRV_PDEVICE));
   if(!dc->physDev) {
     ERR("Can't allocate physDev\n");
     return FALSE;
diff --git a/dlls/ttydrv/graphics.c b/dlls/ttydrv/graphics.c
index 25a205f..afe08d4 100644
--- a/dlls/ttydrv/graphics.c
+++ b/dlls/ttydrv/graphics.c
@@ -99,14 +99,14 @@
   if(row1 > row2) {
     INT tmp = row1;
     row1 = row2;
-    row2 = tmp; 
-  } 
+    row2 = tmp;
+  }
 
   if(col1 > col2) {
     INT tmp = col1;
     col1 = col2;
-    col2 = tmp; 
-  } 
+    col2 = tmp;
+  }
 
   wmove(physDev->window, row1, col1);
   if(col1 == col2) {
@@ -179,7 +179,7 @@
 BOOL TTYDRV_DC_PolyPolyline(TTYDRV_PDEVICE *physDev, const POINT* pt, const DWORD* counts, DWORD polylines)
 {
   FIXME("(%x, %p, %p, %lu): stub\n", physDev->hdc, pt, counts, polylines);
-  
+
   return TRUE;
 }
 
@@ -205,13 +205,13 @@
   if(row1 > row2) {
     INT tmp = row1;
     row1 = row2;
-    row2 = tmp; 
-  } 
+    row2 = tmp;
+  }
   if(col1 > col2) {
     INT tmp = col1;
     col1 = col2;
-    col2 = tmp; 
-  } 
+    col2 = tmp;
+  }
 
   wmove(physDev->window, row1, col1);
   whline(physDev->window, ACS_HLINE, col2-col1);
@@ -246,9 +246,9 @@
 BOOL TTYDRV_DC_RoundRect(TTYDRV_PDEVICE *physDev, INT left, INT top, INT right,
 			 INT bottom, INT ell_width, INT ell_height)
 {
-  FIXME("(%x, %d, %d, %d, %d, %d, %d): stub\n", 
+  FIXME("(%x, %d, %d, %d, %d, %d, %d): stub\n",
 	physDev->hdc, left, top, right, bottom, ell_width, ell_height);
-  
+
   return TRUE;
 }
 
@@ -344,7 +344,7 @@
 
   x = XLPTODP(dc, x);
   y = YLPTODP(dc, y);
-  
+
   row = (dc->DCOrgY + y) / physDev->cellHeight;
   col = (dc->DCOrgX + x) / physDev->cellWidth;
   len = WideCharToMultiByte( CP_ACP, 0, str, count, NULL, 0, NULL, NULL );
@@ -411,7 +411,7 @@
   lptm->tmDescent = 0;
   lptm->tmInternalLeading = 0;
   lptm->tmExternalLeading = 0;
-  lptm->tmAveCharWidth = physDev->cellWidth; 
+  lptm->tmAveCharWidth = physDev->cellWidth;
   lptm->tmMaxCharWidth = physDev->cellWidth;
   lptm->tmWeight = FW_MEDIUM;
   lptm->tmOverhang = 0;
diff --git a/dlls/ttydrv/palette.c b/dlls/ttydrv/palette.c
index 7a25ad2..ae20ab2 100644
--- a/dlls/ttydrv/palette.c
+++ b/dlls/ttydrv/palette.c
@@ -36,7 +36,7 @@
 
 static int palette_size = 256;  /* FIXME */
 
-extern const PALETTEENTRY COLOR_sysPalTemplate[NB_RESERVED_COLORS]; 
+extern const PALETTEENTRY COLOR_sysPalTemplate[NB_RESERVED_COLORS];
 
 /***********************************************************************
  *	     TTYDRV_PALETTE_Initialize
@@ -68,15 +68,15 @@
 
     if((src->peRed + src->peGreen + src->peBlue) <= 0xB0) {
       dst->peRed = 0;
-      dst->peGreen = 0;  
+      dst->peGreen = 0;
       dst->peBlue = 0;
       dst->peFlags = PC_SYS_USED;
     } else {
-      dst->peRed = 255;  
-      dst->peGreen= 255;  
+      dst->peRed = 255;
+      dst->peGreen= 255;
       dst->peBlue = 255;
       dst->peFlags = PC_SYS_USED;
-    }    
+    }
   }
 
   return TRUE;
diff --git a/dlls/ttydrv/ttydrv.h b/dlls/ttydrv/ttydrv.h
index 19dc93d..cc817a0 100644
--- a/dlls/ttydrv/ttydrv.h
+++ b/dlls/ttydrv/ttydrv.h
@@ -21,9 +21,9 @@
 #ifndef __WINE_TTYDRV_H
 #define __WINE_TTYDRV_H
 
-#ifndef __WINE_CONFIG_H 
-# error You must include config.h to use this header 
-#endif 
+#ifndef __WINE_CONFIG_H
+# error You must include config.h to use this header
+#endif
 
 #undef ERR
 #ifdef HAVE_NCURSES_H
diff --git a/dlls/ttydrv/user.c b/dlls/ttydrv/user.c
index 9a488ab..ff1c587 100644
--- a/dlls/ttydrv/user.c
+++ b/dlls/ttydrv/user.c
@@ -48,7 +48,7 @@
  *		GetKeyNameText (TTYDRV.@)
  */
 INT16 TTYDRV_GetKeyNameText( LONG lParam, LPSTR lpBuffer, INT16 nSize )
-{  
+{
   if(lpBuffer && nSize)
     {
       *lpBuffer = 0;
diff --git a/dlls/ttydrv/wnd.c b/dlls/ttydrv/wnd.c
index ac65fe7..7915d30 100644
--- a/dlls/ttydrv/wnd.c
+++ b/dlls/ttydrv/wnd.c
@@ -95,7 +95,7 @@
 	{
 	    TRACE("CBT-hook returned !0\n");
             return FALSE;
-	} 
+	}
     }
 
     if (unicode)
@@ -254,7 +254,7 @@
 
             if( hrgnClip )
             {
-                /* Compute obscured region for the visible rectangle by 
+                /* Compute obscured region for the visible rectangle by
 		 * clipping children, siblings, and ancestors. Note that
 		 * DCE_GetVisRect() returns a rectangle either in client
 		 * or in window coordinates (for DCX_WINDOW request). */
@@ -263,7 +263,7 @@
                 {
                     if( flags & DCX_WINDOW )
                     {
-                        /* adjust offsets since child window rectangles are 
+                        /* adjust offsets since child window rectangles are
 			 * in client coordinates */
 
                         xoffset = wndPtr->rectClient.left - wndPtr->rectWindow.left;
@@ -284,7 +284,7 @@
                 {
                     if( flags & DCX_WINDOW )
                     {
-                        /* adjust offsets since child window rectangles are 
+                        /* adjust offsets since child window rectangles are
 			 * in client coordinates */
 
                         xoffset = wndPtr->rectClient.left - wndPtr->rectWindow.left;
@@ -301,7 +301,7 @@
                                       &rect, xoffset, yoffset );
                 }
 
-                /* sibling window rectangles are in client 
+                /* sibling window rectangles are in client
 		 * coordinates of the parent window */
 
                 if (flags & DCX_WINDOW)
@@ -674,7 +674,7 @@
 /***********************************************************************
  *              WINPOS_MinMaximize   (internal)
  *
- *Lifted from x11 driver	
+ *Lifted from x11 driver
  */
 static UINT WINPOS_MinMaximize( HWND hwnd, UINT cmd, LPRECT rect )
 {
@@ -703,7 +703,7 @@
  *              ShowWindow   (TTYDRV.@)
  *
  *Lifted from x11 driver
- *Sets the specified windows' show state.	
+ *Sets the specified windows' show state.
  */
 BOOL TTYDRV_ShowWindow( HWND hwnd, INT cmd )
 {
@@ -722,7 +722,7 @@
     switch(cmd)
     {
         case SW_HIDE:
-            if (!wasVisible) goto END;;
+            if (!wasVisible) goto END;
 	    swp |= SWP_HIDEWINDOW | SWP_NOSIZE | SWP_NOMOVE |
 		        SWP_NOACTIVATE | SWP_NOZORDER;
 	    break;
diff --git a/dlls/twain/capability.c b/dlls/twain/capability.c
index 6ac5845..28311e7 100644
--- a/dlls/twain/capability.c
+++ b/dlls/twain/capability.c
@@ -140,7 +140,7 @@
             twCC = TWCC_CAPUNSUPPORTED;
             break;
         case CAP_XFERCOUNT:
-            /* This is a required capability that every source need to 
+            /* This is a required capability that every source need to
                support but we havev't implemented yet. */
             twCC = TWCC_SUCCESS;
             break;
@@ -148,7 +148,7 @@
         case ICAP_IMAGEFILEFORMAT:
         case ICAP_TILES:
             twCC = TWCC_CAPUNSUPPORTED;
-            break; 
+            break;
         case ICAP_XFERMECH:
             twCC = TWAIN_ICAPXferMech (pSource, pCapability, action);
             break;
@@ -161,7 +161,7 @@
             break;
         default:
             twCC = TWRC_FAILURE;
-            
+
     }
 
     return twCC;
@@ -170,7 +170,7 @@
 TW_BOOL TWAIN_OneValueSet (pTW_CAPABILITY pCapability, TW_UINT32 value)
 {
     pCapability->hContainer = (TW_HANDLE)GlobalAlloc (0, sizeof(TW_ONEVALUE));
-    
+
     if (pCapability->hContainer)
     {
         pTW_ONEVALUE pVal = GlobalLock ((HGLOBAL) pCapability->hContainer);
@@ -196,11 +196,11 @@
     else
         return FALSE;
 }
- 
+
 /* ICAP_XFERMECH */
 TW_UINT16 TWAIN_ICAPXferMech (activeDS *pSource, pTW_CAPABILITY pCapability,
                               TW_UINT16 action)
-{ 
+{
     TRACE("ICAP_XFERMECH\n");
 
     switch (action)
diff --git a/dlls/twain/ds_ctrl.c b/dlls/twain/ds_ctrl.c
index 806e71b..4dd3515 100644
--- a/dlls/twain/ds_ctrl.c
+++ b/dlls/twain/ds_ctrl.c
@@ -31,9 +31,9 @@
     TW_UINT16 twRC = TWRC_SUCCESS, twCC = TWCC_SUCCESS;
     pTW_CAPABILITY pCapability = (pTW_CAPABILITY) pData;
     activeDS *pSource = TWAIN_LookupSource (pDest);
-    
+
     TRACE("DG_CONTROL/DAT_CAPABILITY/MSG_GET\n");
-    
+
     if (!pDest)
     {
         twRC = TWRC_FAILURE;
@@ -48,7 +48,7 @@
     {
         twCC = TWAIN_SaneCapability (pSource, pCapability, MSG_GET);
         twRC = (twCC == TWCC_SUCCESS)?TWRC_SUCCESS:TWRC_FAILURE;
-        pSource->twCC = twCC; 
+        pSource->twCC = twCC;
     }
 
     return twRC;
@@ -79,7 +79,7 @@
         twCC = TWAIN_SaneCapability (pSource, pCapability, MSG_GETCURRENT);
         twRC = (twCC == TWCC_SUCCESS)?TWRC_SUCCESS:TWRC_FAILURE;
         pSource->twCC = twCC;
-    } 
+    }
 
     return twRC;
 }
@@ -154,7 +154,7 @@
 }
 
 /* DG_CONTROL/DAT_CAPABILITY/MSG_SET */
-TW_UINT16 TWAIN_CapabilitySet (pTW_IDENTITY pOrigin, pTW_IDENTITY pDest, 
+TW_UINT16 TWAIN_CapabilitySet (pTW_IDENTITY pOrigin, pTW_IDENTITY pDest,
                                TW_MEMREF pData)
 {
     TW_UINT16 twRC = TWRC_SUCCESS, twCC = TWCC_SUCCESS;
@@ -175,7 +175,7 @@
     }
     else
     {
-        twCC = TWAIN_SaneCapability (pSource, pCapability, MSG_SET); 
+        twCC = TWAIN_SaneCapability (pSource, pCapability, MSG_SET);
         twRC = (twCC == TWCC_SUCCESS)?TWRC_SUCCESS:TWRC_FAILURE;
         pSource->twCC = twCC;
     }
@@ -566,7 +566,7 @@
         /* Reset the condition code */
         pSource->twCC = TWCC_SUCCESS;
     }
- 
+
     return twRC;
 }
 
@@ -606,9 +606,9 @@
     TW_UINT16 twRC = TWRC_SUCCESS;
     pTW_USERINTERFACE pUserInterface = (pTW_USERINTERFACE) pData;
     activeDS *pSource = TWAIN_LookupSource (pDest);
-   
+
     TRACE ("DG_CONTROL/DAT_USERINTERFACE/MSG_ENABLEDS\n");
- 
+
     if (!pSource)
     {
         twRC = TWRC_FAILURE;
@@ -623,7 +623,7 @@
     {
         if (pUserInterface->ShowUI)
         {
-            pSource->currentState = 5; /* Transitions to state 5 */ 
+            pSource->currentState = 5; /* Transitions to state 5 */
             /* FIXME: we should replace xscanimage with our own device UI */
             system ("xscanimage");
             pSource->currentState = 6;
@@ -632,10 +632,10 @@
         else
         {
             /* no UI will be displayed, so source is ready to transfer data */
-            pSource->pendingEvent.TWMessage = MSG_XFERREADY; 
+            pSource->pendingEvent.TWMessage = MSG_XFERREADY;
             pSource->currentState = 6; /* Transitions to state 6 directly */
         }
-        
+
         pSource->hwndOwner = pUserInterface->hParent;
         twRC = TWRC_SUCCESS;
         pSource->twCC = TWCC_SUCCESS;
@@ -669,7 +669,7 @@
         system ("xscanimage");
         pSource->currentState = 5;
         twRC = TWRC_SUCCESS;
-        pSource->twCC = TWCC_SUCCESS; 
+        pSource->twCC = TWCC_SUCCESS;
     }
 
     return twRC;
diff --git a/dlls/twain/ds_image.c b/dlls/twain/ds_image.c
index 077921e..29b6f00 100644
--- a/dlls/twain/ds_image.c
+++ b/dlls/twain/ds_image.c
@@ -120,7 +120,7 @@
             pImageInfo->Planar = TRUE;
             pImageInfo->PixelType = TWPT_RGB;
             pImageInfo->Compression = TWCP_NONE;
-        } 
+        }
         else if (pSource->sane_param.depth == 8)
         {
             /* FIXME: fill the image info structure for 8-bit image */
@@ -193,7 +193,7 @@
     BITMAPINFO bmpInfo;
     VOID *pBits;
     HDC dc;
- 
+
     TRACE("DG_IMAGE/DAT_IMAGENATIVEXFER/MSG_GET\n");
 
     if (!pSource)
@@ -217,7 +217,7 @@
             pSource->twCC = TWCC_OPERATIONERROR;
             return TWRC_FAILURE;
         }
-        
+
         status = sane_get_parameters (pSource->deviceHandle, &pSource->sane_param);
         if (status != SANE_STATUS_GOOD)
         {
@@ -247,7 +247,7 @@
         bmpInfo.bmiColors[0].rgbBlue = 128;
         bmpInfo.bmiColors[0].rgbGreen = 128;
         bmpInfo.bmiColors[0].rgbRed = 128;
-        hDIB = CreateDIBSection ((dc = GetDC(pSource->hwndOwner)), &bmpInfo, 
+        hDIB = CreateDIBSection ((dc = GetDC(pSource->hwndOwner)), &bmpInfo,
                                  DIB_RGB_COLORS, &pBits, 0, 0);
         if (!hDIB)
         {
@@ -255,10 +255,10 @@
             pSource->twCC = TWCC_LOWMEMORY;
             return TWRC_FAILURE;
         }
-            
+
         do
         {
-            status = sane_read (pSource->deviceHandle, buffer, 
+            status = sane_read (pSource->deviceHandle, buffer,
                                 sizeof (buffer),  &buff_len);
             if (status == SANE_STATUS_GOOD)
             {
@@ -273,11 +273,11 @@
                 return TWRC_FAILURE;
             }
         } while (status == SANE_STATUS_GOOD);
-        
-        sane_cancel (pSource->deviceHandle); 
+
+        sane_cancel (pSource->deviceHandle);
         ReleaseDC (pSource->hwndOwner, dc);
         *pHandle = hDIB;
-        twRC = TWRC_XFERDONE; 
+        twRC = TWRC_XFERDONE;
         pSource->twCC = TWCC_SUCCESS;
         pSource->currentState = 7;
     }
diff --git a/dlls/twain/dsm_ctrl.c b/dlls/twain/dsm_ctrl.c
index 8ca5172..e9607e7 100644
--- a/dlls/twain/dsm_ctrl.c
+++ b/dlls/twain/dsm_ctrl.c
@@ -29,7 +29,7 @@
 WINE_DEFAULT_DEBUG_CHANNEL(twain);
 
 /* DG_CONTROL/DAT_IDENTITY/MSG_CLOSEDS */
-TW_UINT16 TWAIN_CloseDS (pTW_IDENTITY pOrigin, TW_MEMREF pData) 
+TW_UINT16 TWAIN_CloseDS (pTW_IDENTITY pOrigin, TW_MEMREF pData)
 {
 #ifndef HAVE_SANE
     DSM_twCC = TWCC_NODS;
@@ -73,7 +73,7 @@
         twRC = TWRC_FAILURE;
         DSM_twCC = TWCC_NODS;
     }
- 
+
     return twRC;
 #endif
 }
@@ -118,7 +118,7 @@
         twRC = TWRC_FAILURE;
         DSM_twCC = TWCC_NODS;
     }
- 
+
     return twRC;
 #endif
 }
@@ -133,7 +133,7 @@
     TW_UINT16 twRC = TWRC_SUCCESS;
     pTW_IDENTITY pSourceIdentity;/* = (pTW_IDENTITY) pData;*/
     SANE_Status status;
-    
+
     TRACE ("DG_CONTROL/DAT_IDENTITY/MSG_GETFIRST\n");
 
     status = sane_get_devices (&device_list, SANE_FALSE);
@@ -159,11 +159,11 @@
     }
     else
     {
-        WARN("sane_get_devices() failed: %s\n", sane_strstatus (status)); 
+        WARN("sane_get_devices() failed: %s\n", sane_strstatus (status));
         twRC = TWRC_FAILURE;
         DSM_twCC = TWCC_NODS;
     }
-   
+
     return twRC;
 #endif
 }
@@ -191,7 +191,7 @@
         DSM_currentDevice ++;
 
         twRC = TWRC_SUCCESS;
-        DSM_twCC = TWCC_SUCCESS; 
+        DSM_twCC = TWCC_SUCCESS;
     }
     else
     {
@@ -279,7 +279,7 @@
         twRC = TWRC_FAILURE;
         DSM_twCC = TWCC_NODS;
     }
- 
+
     return twRC;
 #endif
 }
@@ -361,9 +361,9 @@
             DSM_initialized = TRUE;
             status = sane_init (&version_code, NULL);
             device_list = NULL;
-            DSM_currentDevice = 0; 
+            DSM_currentDevice = 0;
             DSM_sourceId = 0;
-        }    
+        }
         DSM_parentHWND = *(HWND*)pData;
         DSM_currentState = 3; /* transition to state 3 */
         DSM_twCC = TWCC_SUCCESS;
diff --git a/dlls/twain/twain.h b/dlls/twain/twain.h
index 1a76452..d636a61 100644
--- a/dlls/twain/twain.h
+++ b/dlls/twain/twain.h
@@ -3,42 +3,42 @@
   Copyright (C) 1991, 1992 TWAIN Working Group: Aldus, Caere, Eastman-Kodak,
   Hewlett-Packard and Logitech Corporations.  All rights reserved.
 
-  Copyright (C) 1997 TWAIN Working Group: Bell+Howell, Canon, DocuMagix, 
+  Copyright (C) 1997 TWAIN Working Group: Bell+Howell, Canon, DocuMagix,
   Fujitsu, Genoa Technology, Hewlett-Packard, Kofax Imaging Products, and
   Ricoh Corporation.  All rights reserved.
- 
-  Copyright © 1998 TWAIN Working Group: Adobe Systems Incorporated, 
-  Canon Information Systems, Eastman Kodak Company, 
-  Fujitsu Computer Products of America, Genoa Technology, 
-  Hewlett-Packard Company, Intel Corporation, Kofax Image Products, 
-  JFL Peripheral Solutions Inc., Ricoh Corporation, and Xerox Corporation.  
+
+  Copyright © 1998 TWAIN Working Group: Adobe Systems Incorporated,
+  Canon Information Systems, Eastman Kodak Company,
+  Fujitsu Computer Products of America, Genoa Technology,
+  Hewlett-Packard Company, Intel Corporation, Kofax Image Products,
+  JFL Peripheral Solutions Inc., Ricoh Corporation, and Xerox Corporation.
   All rights reserved.
 
   TWAIN.h -  This is the definitive include file for applications and
           data sources written to the TWAIN specification.
           It defines constants, data structures, messages etc.
           for the public interface to TWAIN.
- 
+
   Revision History:
     version 1.0, March 6, 1992.  TWAIN 1.0.
     version 1.1, January 1993.   Tech Notes 1.1
     version 1.5, June 1993.      Specification Update 1.5
-                                 Change DC to TW 
+                                 Change DC to TW
                                  Change filename from DC.H to TWAIN.H
     version 1.5, July 1993.      Remove spaces from country identifiers
- 
-    version 1.7, July 1997       Added Capabilities and data structure for 
+
+    version 1.7, July 1997       Added Capabilities and data structure for
                                  document imaging and digital cameras.
                                  KHL.
     version 1.7, July 1997       Inserted Borland compatibile structure packing
                                  directives provided by Mentor.  JMH
-    version 1.7, Aug 1997        Expanded file tabs to spaces.  
-                                 NOTE: future authors should be sure to have 
-                                 their editors set to automatically expand tabs 
+    version 1.7, Aug 1997        Expanded file tabs to spaces.
+                                 NOTE: future authors should be sure to have
+                                 their editors set to automatically expand tabs
                                  to spaces (original tab setting was 4 spaces).
     version 1.7, Sept 1997       Added job control values
                                  Added return codes
-    version 1.7, Sept 1997       changed definition of pRGBRESPONSE to 
+    version 1.7, Sept 1997       changed definition of pRGBRESPONSE to
                                  pTW_RGBRESPONSE
     version 1.7  Aug 1998        Added missing TWEI_BARCODEROTATION values
                                  TWBCOR_ types JMH
@@ -118,12 +118,12 @@
 
 /* Numeric types. */
 typedef char           TW_INT8,   FAR *pTW_INT8;
-typedef short          TW_INT16,  FAR *pTW_INT16; 
+typedef short          TW_INT16,  FAR *pTW_INT16;
 typedef long           TW_INT32,  FAR *pTW_INT32;
 typedef unsigned char  TW_UINT8,  FAR *pTW_UINT8;
 typedef unsigned short TW_UINT16, FAR *pTW_UINT16;
 typedef unsigned long  TW_UINT32, FAR *pTW_UINT32;
-typedef unsigned short TW_BOOL,   FAR *pTW_BOOL; 
+typedef unsigned short TW_BOOL,   FAR *pTW_BOOL;
 
 /* Fixed point structure type. */
 typedef struct {
@@ -413,9 +413,9 @@
 
 /* ----------------------------------------------------------------------- *\
 
-  Version 1.7:      Added Following data structure for Document Imaging 
+  Version 1.7:      Added Following data structure for Document Imaging
   July 1997         Enhancement.
-  KHL               TW_CUSTOMDSDATA --  For Saving and Restoring Source's 
+  KHL               TW_CUSTOMDSDATA --  For Saving and Restoring Source's
                                         state.
                     TW_INFO         --  Each attribute for extended image
                                         information.
@@ -787,7 +787,7 @@
 #define TWJC_JSIS   2
 #define TWJC_JSXC   3
 #define TWJC_JSXS   4
-                  
+
 /* Added 1.7 */
 /* TWEI_BARCODEROTATION values (BCOR_ means barcode rotation) */
 #define TWBCOR_ROT0   0
@@ -820,7 +820,7 @@
 #define TWCB_NOCLEAR        2
 
 /* CAP_DEVICEEVENT values (DE_ means device event) */
-#define TWDE_CUSTOMEVENTS           0x8000      
+#define TWDE_CUSTOMEVENTS           0x8000
 #define TWDE_CHECKAUTOMATICCAPTURE  0
 #define TWDE_CHECKBATTERY           1
 #define TWDE_CHECKDEVICEONLINE      2
@@ -1187,7 +1187,7 @@
 #define TWLG_USA             13 /* U.S. English           */
 /* Added for 1.8 */
 #define TWLG_USERLOCALE           -1
-#define TWLG_AFRIKAANS            14  
+#define TWLG_AFRIKAANS            14
 #define TWLG_ALBANIA              15
 #define TWLG_ARABIC               16
 #define TWLG_ARABIC_ALGERIA       17
@@ -1431,7 +1431,7 @@
 #define MSG_CHANGEDIRECTORY   0x0801
 #define MSG_CREATEDIRECTORY   0x0802
 #define MSG_DELETE            0x0803
-#define MSG_FORMATMEDIA       0x0804 
+#define MSG_FORMATMEDIA       0x0804
 #define MSG_GETCLOSE          0x0805
 #define MSG_GETFIRSTFILE      0x0806
 #define MSG_GETINFO           0x0807
@@ -1510,7 +1510,7 @@
 #define CAP_BATTERYMINUTES          0x1032   /* Added 1.8 */
 #define CAP_BATTERYPERCENTAGE       0x1033   /* Added 1.8 */
 #define CAP_POWERDOWNTIME           0x1034   /* Added 1.8 */
- 
+
 /* image data sources MAY support these caps */
 #define ICAP_AUTOBRIGHT                   0x1100
 #define ICAP_BRIGHTNESS                   0x1101
@@ -1589,8 +1589,8 @@
 /* ----------------------------------------------------------------------- *\
 
   Version 1.7:      Following is Extended Image Info Attributes.
-  July 1997         
-  KHL               
+  July 1997
+  KHL
 
 \* ----------------------------------------------------------------------- */
 
@@ -1708,7 +1708,7 @@
 /* bit patterns: for query the operation that are supported by the data source on a capability */
 /* Application gets these through DG_CONTROL/DAT_CAPABILITY/MSG_QUERYSUPPORT */
 /* Added 1.6 */
-#define TWQC_GET           0x0001 
+#define TWQC_GET           0x0001
 #define TWQC_SET           0x0002
 #define TWQC_GETDEFAULT    0x0004
 #define TWQC_GETCURRENT    0x0008
@@ -1730,21 +1730,21 @@
  *          This could identify an application or a data source.
  *          If this is NULL, the message goes to the Source Manager.
  *
- *  DG      The Data Group. 
+ *  DG      The Data Group.
  *          Example: DG_IMAGE.
  *
  *  DAT     The Data Attribute Type.
  *          Example: DAT_IMAGEMEMXFER.
- *    
+ *
  *  MSG     The message.  Messages are interpreted by the destination module
- *          with respect to the Data Group and the Data Attribute Type.  
+ *          with respect to the Data Group and the Data Attribute Type.
  *          Example: MSG_GET.
  *
- *  pData   A pointer to the data structure or variable identified 
+ *  pData   A pointer to the data structure or variable identified
  *          by the Data Attribute Type.
  *          Example: (TW_MEMREF)&ImageMemXfer
  *                   where ImageMemXfer is a TW_IMAGEMEMXFER structure.
- *                    
+ *
  * Returns:
  *  ReturnCode
  *         Example: TWRC_SUCCESS.
@@ -1793,21 +1793,21 @@
  *  pOrigin Identifies the source module of the message. This could
  *          identify an application or the Data Source Manager.
  *
- *  DG      The Data Group. 
+ *  DG      The Data Group.
  *          Example: DG_IMAGE.
- *           
+ *
  *  DAT     The Data Attribute Type.
  *          Example: DAT_IMAGEMEMXFER.
- *    
+ *
  *  MSG     The message.  Messages are interpreted by the data source
  *          with respect to the Data Group and the Data Attribute Type.
  *          Example: MSG_GET.
  *
- *  pData   A pointer to the data structure or variable identified 
+ *  pData   A pointer to the data structure or variable identified
  *          by the Data Attribute Type.
  *          Example: (TW_MEMREF)&ImageMemXfer
  *                   where ImageMemXfer is a TW_IMAGEMEMXFER structure.
- *                    
+ *
  * Returns:
  *  ReturnCode
  *          Example: TWRC_SUCCESS.
@@ -1824,28 +1824,28 @@
 #ifdef  _MSWIN_
   #ifdef _WIN32
      __declspec(dllexport) TW_UINT16 FAR PASCAL DS_Entry (pTW_IDENTITY pOrigin,
-                                                          TW_UINT32    DG, 
-                                                          TW_UINT16    DAT, 
-                                                          TW_UINT16    MSG, 
+                                                          TW_UINT32    DG,
+                                                          TW_UINT16    DAT,
+                                                          TW_UINT16    MSG,
                                                           TW_MEMREF    pData);
   #else   /* _WIN32 */
      TW_UINT16 FAR PASCAL DS_Entry (pTW_IDENTITY pOrigin,
-                                    TW_UINT32    DG, 
-                                    TW_UINT16    DAT, 
-                                    TW_UINT16    MSG, 
+                                    TW_UINT32    DG,
+                                    TW_UINT16    DAT,
+                                    TW_UINT16    MSG,
                                     TW_MEMREF    pData);
   #endif  /* _WIN32 */
-  
+
   typedef TW_UINT16 (FAR PASCAL *DSENTRYPROC) (pTW_IDENTITY pOrigin,
-                                               TW_UINT32    DG, 
-                                               TW_UINT16    DAT, 
-                                               TW_UINT16    MSG, 
+                                               TW_UINT32    DG,
+                                               TW_UINT16    DAT,
+                                               TW_UINT16    MSG,
                                                TW_MEMREF    pData);
 #else   /* _MSWIN_ */
-/*FAR PASCAL TW_UINT16 DS_Entry( pTW_IDENTITY pOrigin, 
-                               TW_UINT32    DG, 
-                               TW_UINT16    DAT, 
-                               TW_UINT16    MSG, 
+/*FAR PASCAL TW_UINT16 DS_Entry( pTW_IDENTITY pOrigin,
+                               TW_UINT32    DG,
+                               TW_UINT16    DAT,
+                               TW_UINT16    MSG,
                                TW_MEMREF    pData);*/
 
 typedef TW_UINT16 (*DSENTRYPROC)(pTW_IDENTITY,
diff --git a/dlls/twain/twain32_main.c b/dlls/twain/twain32_main.c
index 451c03a..f38f314 100644
--- a/dlls/twain/twain32_main.c
+++ b/dlls/twain/twain32_main.c
@@ -1,6 +1,6 @@
 /*
  * TWAIN32 functions
- * 
+ *
  * Copyright 2000 Shi Quan He <shiquan@cyberdude.com>
  *
  * This library is free software; you can redistribute it and/or
@@ -113,7 +113,7 @@
                     twRC = TWRC_FAILURE;
                     DSM_twCC = TWCC_BADPROTOCOL;
                     WARN("unrecognized operation triplet\n");
-            } 
+            }
             break;
 
         case DAT_STATUS:
@@ -527,7 +527,7 @@
                     break;
                 case MSG_SET:
                     twRC = TWAIN_Palette8Set (pOrigin, pDest, pData);
-                    break; 
+                    break;
                 default:
                     twRC = TWRC_FAILURE;
                     DSM_twCC = TWCC_BADPROTOCOL;
@@ -591,7 +591,7 @@
             twRC = TWRC_FAILURE;
             break;
     }
-  
+
     return twRC;
 }
 
@@ -607,7 +607,7 @@
     TW_UINT16 twRC = TWRC_SUCCESS;  /* Return Code */
 
     TRACE("(DG=%ld DAT=%d MSG=%d)\n", DG, DAT, MSG);
-    
+
     switch (DG)
     {
         case DG_CONTROL:
@@ -627,7 +627,7 @@
     return twRC;
 }
 
-/* A helper function that looks up a destination identity in the active 
+/* A helper function that looks up a destination identity in the active
    source list */
 activeDS *TWAIN_LookupSource (pTW_IDENTITY pDest)
 {
diff --git a/dlls/twain/twain_i.h b/dlls/twain/twain_i.h
index 266a970..01b775e 100644
--- a/dlls/twain/twain_i.h
+++ b/dlls/twain/twain_i.h
@@ -31,7 +31,7 @@
     struct tagActiveDS	*next;			/* next active DS */
     TW_IDENTITY		identity;		/* identity */
     TW_UINT16		currentState;		/* current state */
-    TW_EVENT		pendingEvent;		/* pending event to be sent to 
+    TW_EVENT		pendingEvent;		/* pending event to be sent to
                                                    application */
     TW_UINT16		twCC;			/* condition code */
     HWND		hwndOwner;		/* window handle of the app */
@@ -42,7 +42,7 @@
 #endif
     /* Capabiblities */
     TW_UINT16		capXferMech;		/* ICAP_XFERMECH */
-} activeDS; 
+} activeDS;
 
 TW_UINT16 DSM_initialized;      /* whether Source Manager is initialized */
 TW_UINT16 DSM_currentState;     /* current state of Source Manager */
@@ -176,7 +176,7 @@
 TW_UINT16 TWAIN_XferGroupSet
     (pTW_IDENTITY pOrigin, pTW_IDENTITY pDest, TW_MEMREF pData);
 
-/* Implementation of operation triplets 
+/* Implementation of operation triplets
  * From Application to Source (Image Information) */
 TW_UINT16 TWAIN_CIEColorGet
     (pTW_IDENTITY pOrigin, pTW_IDENTITY pDest, TW_MEMREF pData);
diff --git a/dlls/urlmon/umon.c b/dlls/urlmon/umon.c
index 3eb20fc..b31a76f 100644
--- a/dlls/urlmon/umon.c
+++ b/dlls/urlmon/umon.c
@@ -54,7 +54,7 @@
  *
  * RETURNS
  *    S_OK 		success
- *    E_OUTOFMEMORY	out of memory 
+ *    E_OUTOFMEMORY	out of memory
  *    MK_E_SYNTAX	not a valid url
  *
  */
@@ -76,7 +76,7 @@
  * RETURNS
  *    S_OK 		success
  *    E_INVALIDARG  invalid argument(s)
- *    E_OUTOFMEMORY	out of memory 
+ *    E_OUTOFMEMORY	out of memory
  *
  */
 HRESULT WINAPI RegisterBindStatusCallback(
@@ -100,7 +100,7 @@
         else
             IBindStatusCallback_Release(prev);
     }
-    
+
 	return IBindCtx_RegisterObjectParam(pbc, BSCBHolder, (IUnknown *)pbsc);
 }
 
diff --git a/dlls/urlmon/urlmon_main.c b/dlls/urlmon/urlmon_main.c
index b58a229..18dc056 100644
--- a/dlls/urlmon/urlmon_main.c
+++ b/dlls/urlmon/urlmon_main.c
@@ -31,7 +31,7 @@
  */
 HRESULT WINAPI URLMON_DllInstall(BOOL bInstall, LPCWSTR cmdline)
 {
-  FIXME("(%s, %s): stub\n", bInstall?"TRUE":"FALSE", 
+  FIXME("(%s, %s): stub\n", bInstall?"TRUE":"FALSE",
 	debugstr_w(cmdline));
 
   return S_OK;
@@ -53,7 +53,7 @@
 HRESULT WINAPI URLMON_DllGetClassObject(REFCLSID rclsid, REFIID riid,
 					LPVOID *ppv)
 {
-    FIXME("(%p, %p, %p): stub\n", debugstr_guid(rclsid), 
+    FIXME("(%p, %p, %p): stub\n", debugstr_guid(rclsid),
 	  debugstr_guid(riid), ppv);
 
     return CLASS_E_CLASSNOTAVAILABLE;
@@ -96,7 +96,7 @@
  					long nosee)
 {
     FIXME("(%#lx, %p, %#lx, %#lx): stub\n", lost, splat, time, nosee);
-    
+
     return S_OK;
 }
 
diff --git a/dlls/user/cache.c b/dlls/user/cache.c
index ecaf628..774c816 100644
--- a/dlls/user/cache.c
+++ b/dlls/user/cache.c
@@ -1,7 +1,7 @@
 /*
- * Wine internally cached objects to speedup some things and prevent 
- * infinite duplication of trivial code and data. 
- * 
+ * Wine internally cached objects to speedup some things and prevent
+ * infinite duplication of trivial code and data.
+ *
  * Copyright 1997 Bertho A. Stultiens
  *
  * This library is free software; you can redistribute it and/or
@@ -24,7 +24,7 @@
 #include "user.h"
 
 static const WORD wPattern55AA[] =
-{ 
+{
     0x5555, 0xaaaa, 0x5555, 0xaaaa,
     0x5555, 0xaaaa, 0x5555, 0xaaaa
 };
diff --git a/dlls/user/comm16.c b/dlls/user/comm16.c
index e306aee..c789c3a 100644
--- a/dlls/user/comm16.c
+++ b/dlls/user/comm16.c
@@ -47,7 +47,7 @@
  * A program that wants to monitor the modem status line (RLSD/DCD) may
  * poll the modem status register in the commMask structure. I update the bit
  * in GetCommError, waiting for an implementation of communication events.
- * 
+ *
  */
 
 #include "config.h"
@@ -150,7 +150,7 @@
 		    RegCloseKey(hkey);
 		}
 
-		if (!strcmp(temp, "*") || *temp == '\0') 
+		if (!strcmp(temp, "*") || *temp == '\0')
 			COM[x].devicename = NULL;
 		else {
 		  	btemp = strchr(temp,',');
@@ -160,7 +160,7 @@
 			} else {
 				COM[x].baudrate = -1;
 			}
-			if ((COM[x].devicename = malloc(strlen(temp)+1)) == NULL) 
+			if ((COM[x].devicename = malloc(strlen(temp)+1)) == NULL)
 				WARN("Can't malloc for device info!\n");
 			else {
 				COM[x].handle = 0;
@@ -187,7 +187,7 @@
 		if (!strcmp(temp, "*") || *temp == '\0')
 			LPT[x].devicename = NULL;
 		else {
-			if ((LPT[x].devicename = malloc(strlen(temp)+1)) == NULL) 
+			if ((LPT[x].devicename = malloc(strlen(temp)+1)) == NULL)
 				WARN("Can't malloc for device info!\n");
 			else {
 				LPT[x].handle = 0;
@@ -219,23 +219,23 @@
 static int    GetCommPort_ov(LPOVERLAPPED ov, int write)
 {
 	int x;
-        
+
 	for (x=0; x<MAX_PORTS; x++) {
 		if (ov == (write?&COM[x].write_ov:&COM[x].read_ov))
 			return x;
 	}
-       
+
 	return -1;
-} 
+}
 
 static int ValidCOMPort(int x)
 {
-	return(x < MAX_PORTS ? (int) COM[x].devicename : 0); 
+	return(x < MAX_PORTS ? (int) COM[x].devicename : 0);
 }
 
 static int ValidLPTPort(int x)
 {
-	return(x < MAX_PORTS ? (int) LPT[x].devicename : 0); 
+	return(x < MAX_PORTS ? (int) LPT[x].devicename : 0);
 }
 
 static int WinError(void)
@@ -383,7 +383,7 @@
 	}
 
 	/* write from output queue */
-	bleft = ((ptr->obuf_tail <= ptr->obuf_head) ? 
+	bleft = ((ptr->obuf_tail <= ptr->obuf_head) ?
 		ptr->obuf_head : ptr->obuf_size) - ptr->obuf_tail;
 
 	/* check for notification */
@@ -410,7 +410,7 @@
         COMSTAT stat;
 
 	/* FIXME: get timeouts working properly so we can read bleft bytes */
-	bleft = ((ptr->ibuf_tail > ptr->ibuf_head) ? 
+	bleft = ((ptr->ibuf_tail > ptr->ibuf_head) ?
 		(ptr->ibuf_tail-1) : ptr->ibuf_size) - ptr->ibuf_head;
 
 	/* find out how many bytes are left in the buffer */
@@ -434,7 +434,7 @@
 {
 	int bleft;
 
-	bleft = ((ptr->obuf_tail <= ptr->obuf_head) ? 
+	bleft = ((ptr->obuf_tail <= ptr->obuf_head) ?
 		ptr->obuf_head : ptr->obuf_size) - ptr->obuf_tail;
 	WriteFileEx(ptr->handle,
 		ptr->outbuf + ptr->obuf_tail,
@@ -462,7 +462,7 @@
 	lpdcb16->StopBits = lpdcb->StopBits;
 
 	lpdcb16->RlsTimeout = 50;
-	lpdcb16->CtsTimeout = 50; 
+	lpdcb16->CtsTimeout = 50;
 	lpdcb16->DsrTimeout = 50;
 	lpdcb16->fNull = 0;
 	lpdcb16->fChEvt = 0;
@@ -478,8 +478,8 @@
 
 	lpdcb16->fOutX = lpdcb->fOutX;
 /*
-	lpdcb16->XonChar = 
-	lpdcb16->XoffChar = 
+	lpdcb16->XonChar =
+	lpdcb16->XoffChar =
  */
 	lpdcb16->XonLim = 10;
 	lpdcb16->XoffLim = 10;
@@ -491,8 +491,8 @@
 /**************************************************************************
  *         BuildCommDCB		(USER.213)
  *
- * According to the ECMA-234 (368.3) the function will return FALSE on 
- * success, otherwise it will return -1. 
+ * According to the ECMA-234 (368.3) the function will return FALSE on
+ * success, otherwise it will return -1.
  */
 INT16 WINAPI BuildCommDCB16(LPCSTR device, LPDCB16 lpdcb)
 {
@@ -516,7 +516,7 @@
 		FIXME("invalid COM port %d?\n",port);
 		return -1;
 	}
-		
+
 	memset(lpdcb, 0, sizeof(DCB16)); /* initialize */
 
 	lpdcb->Id = port;
@@ -550,7 +550,7 @@
 		ERR("BUG ! COM0 or LPT0 don't exist !\n");
 
 	if (!strncasecmp(device,"COM",3)) {
-		
+
                 TRACE("%s = %s\n", device, COM[port].devicename);
 
 		if (!ValidCOMPort(port))
@@ -560,7 +560,7 @@
 			return IE_OPEN;
 
 		handle = CreateFileA(device, GENERIC_READ|GENERIC_WRITE,
-			FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, CREATE_ALWAYS, 
+			FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, CREATE_ALWAYS,
 			FILE_FLAG_OVERLAPPED|FILE_FLAG_NO_BUFFERING, 0 );
 		if (handle == INVALID_HANDLE_VALUE) {
 			ERR("Couldn't open %s ! (%s)\n", COM[port].devicename, strerror(errno));
@@ -615,10 +615,10 @@
 
 			return port;
 		}
-	} 
-	else 
+	}
+	else
 	if (!strncasecmp(device,"LPT",3)) {
-	
+
 		if (!ValidLPTPort(port))
 			return IE_BADID;
 
@@ -645,7 +645,7 @@
 INT16 WINAPI CloseComm16(INT16 cid)
 {
 	struct DosDeviceStruct *ptr;
-        
+
     	TRACE("cid=%d\n", cid);
 	if ((ptr = GetDeviceStruct(cid)) == NULL) {
 		FIXME("no cid=%d found!\n", cid);
@@ -723,19 +723,19 @@
 
 	switch(nFunction) {
 	case GETMAXCOM:
-	        TRACE("GETMAXCOM\n"); 
+	        TRACE("GETMAXCOM\n");
 		for (max = MAX_PORTS;!COM[max].devicename;max--)
 			;
 		return max;
 
 	case GETMAXLPT:
-		TRACE("GETMAXLPT\n"); 
+		TRACE("GETMAXLPT\n");
 		for (max = MAX_PORTS;!LPT[max].devicename;max--)
 			;
 		return FLAG_LPT + max;
 
 	case GETBASEIRQ:
-		TRACE("GETBASEIRQ\n"); 
+		TRACE("GETBASEIRQ\n");
 		/* FIXME: use tables */
 		/* just fake something for now */
 		if (cid & FLAG_LPT) {
@@ -771,7 +771,7 @@
 	case CLRBREAK:
 	case SETBREAK:
 	default:
-		WARN("(cid=%d,nFunction=%d): Unknown function\n", 
+		WARN("(cid=%d,nFunction=%d): Unknown function\n",
 			cid, nFunction);
 	}
 	return -1;
@@ -800,19 +800,19 @@
 		ptr->ibuf_head = ptr->ibuf_tail;
 		break;
 	default:
-		WARN("(cid=%d,fnQueue=%d):Unknown queue\n", 
+		WARN("(cid=%d,fnQueue=%d):Unknown queue\n",
 		            cid, fnQueue);
 		return -1;
 	}
 
 	if (!PurgeComm(ptr->handle,queue)) {
 		ptr->commerror = WinError();
-		return -1;	
+		return -1;
 	} else {
 		ptr->commerror = 0;
 		return 0;
 	}
-}  
+}
 
 /********************************************************************
  *	GetCommError	(USER.203)
@@ -843,7 +843,7 @@
 		lpStat->cbInQue = comm_inbuf(ptr);
 
     		TRACE("cid %d, error %d, stat %d in %d out %d, stol %x\n",
-			     cid, ptr->commerror, lpStat->status, lpStat->cbInQue, 
+			     cid, ptr->commerror, lpStat->status, lpStat->cbInQue,
 			     lpStat->cbOutQue, *stol);
 	}
 	else
@@ -955,7 +955,7 @@
         else
 		dcb.BaudRate = lpdcb->BaudRate;
  	}
-	
+
         dcb.ByteSize=lpdcb->ByteSize;
         dcb.StopBits=lpdcb->StopBits;
 
@@ -967,16 +967,16 @@
 	if (lpdcb->fDtrflow || lpdcb->fRtsflow)
 		dcb.fRtsControl = TRUE;
 
-	if (lpdcb->fDtrDisable) 
+	if (lpdcb->fDtrDisable)
 		dcb.fDtrControl = TRUE;
 
 	ptr->evtchar = lpdcb->EvtChar;
 
 	dcb.fInX = lpdcb->fInX;
 	dcb.fOutX = lpdcb->fOutX;
-        
+
 	if (!SetCommState(ptr->handle,&dcb)) {
-		ptr->commerror = WinError();	
+		ptr->commerror = WinError();
 		return -1;
 	} else {
 		ptr->commerror = 0;
@@ -998,7 +998,7 @@
 		return -1;
 	}
 	if (!GetCommState(ptr->handle,&dcb)) {
-		ptr->commerror = WinError();	
+		ptr->commerror = WinError();
 		return -1;
 	}
 
@@ -1028,7 +1028,7 @@
 	if (ptr->suspended) {
 		ptr->commerror = IE_HARDWARE;
 		return -1;
-	}	
+	}
 
 	if (ptr->xmit >= 0) {
 	  /* character already queued */
@@ -1071,7 +1071,7 @@
 	if (ptr->suspended) {
 		ptr->commerror = IE_HARDWARE;
 		return -1;
-	}	
+	}
 
 	if (ptr->unget>=0) {
 	  /* character already queued */
@@ -1104,7 +1104,7 @@
 	if (ptr->suspended) {
 		ptr->commerror = IE_HARDWARE;
 		return -1;
-	}	
+	}
 
 	if(0==comm_inbuf(ptr))
 		WaitForMultipleObjectsEx(0,NULL,FALSE,1,TRUE);
@@ -1147,7 +1147,7 @@
 	int status, length;
 	struct DosDeviceStruct *ptr;
 
-    	TRACE("cid %d, ptr %p, length %d\n", 
+    	TRACE("cid %d, ptr %p, length %d\n",
 		cid, lpvBuf, cbWrite);
 	if ((ptr = GetDeviceStruct(cid)) == NULL) {
 		FIXME("no handle for cid = %0x!\n",cid);
@@ -1157,8 +1157,8 @@
 	if (ptr->suspended) {
 		ptr->commerror = IE_HARDWARE;
 		return -1;
-	}	
-	
+	}
+
 	TRACE("%s\n", debugstr_an( lpvBuf, cbWrite ));
 
 	length = 0;
@@ -1187,7 +1187,7 @@
 	  comm_waitwrite(ptr);
 	}
 
-	ptr->commerror = 0;	
+	ptr->commerror = 0;
 	return length;
 }
 
diff --git a/dlls/user/dde/client.c b/dlls/user/dde/client.c
index 077b2b9..26db172 100644
--- a/dlls/user/dde/client.c
+++ b/dlls/user/dde/client.c
@@ -100,7 +100,7 @@
     WDML_INSTANCE*	pInstance;
     WDML_CONV*		pConv = NULL;
     ATOM		aSrv = 0, aTpc = 0;
-    
+
     TRACE("(0x%lx,0x%x,0x%x,%p)\n", idInst, hszService, hszTopic, pCC);
 
     EnterCriticalSection(&WDML_CritSect);
@@ -110,7 +110,7 @@
     {
 	goto theEnd;
     }
-    
+
     /* make sure this conv is never created */
     pConv = WDML_FindConv(pInstance, WDML_CLIENT_SIDE, hszService, hszTopic);
     if (pConv != NULL)
@@ -118,10 +118,10 @@
 	ERR("This Conv already exists: (0x%lx)\n", (DWORD)pConv);
 	goto theEnd;
     }
-    
+
     /* we need to establish a conversation with
        server, so create a window for it       */
-    
+
     if (pInstance->unicode)
     {
 	WNDCLASSEXW	wndclass;
@@ -138,9 +138,9 @@
 	wndclass.lpszMenuName  = NULL;
 	wndclass.lpszClassName = WDML_szClientConvClassW;
 	wndclass.hIconSm       = 0;
-	
+
 	RegisterClassExW(&wndclass);
-    
+
 	hwndClient = CreateWindowW(WDML_szClientConvClassW, NULL, WS_POPUP, 0, 0, 0, 0, 0, 0, 0, 0);
     }
     else
@@ -159,14 +159,14 @@
 	wndclass.lpszMenuName  = NULL;
 	wndclass.lpszClassName = WDML_szClientConvClassA;
 	wndclass.hIconSm       = 0;
-	
+
 	RegisterClassExA(&wndclass);
-    
+
 	hwndClient = CreateWindowA(WDML_szClientConvClassA, NULL, WS_POPUP, 0, 0, 0, 0, 0, 0, 0, 0);
     }
 
     SetWindowLongA(hwndClient, GWL_WDML_INSTANCE, (DWORD)pInstance);
-    
+
     if (hszService)
     {
 	aSrv = WDML_MakeAtomFromHsz(hszService);
@@ -182,7 +182,7 @@
 
     /* note: sent messages shall not use packing */
     SendMessageA(HWND_BROADCAST, WM_DDE_INITIATE, (WPARAM)hwndClient, MAKELPARAM(aSrv, aTpc));
-    
+
     EnterCriticalSection(&WDML_CritSect);
 
     pInstance = WDML_GetInstance(idInst);
@@ -190,7 +190,7 @@
     {
 	goto theEnd;
     }
-    
+
     /* At this point, Client WM_DDE_ACK should have saved hwndServer
        for this instance id and hwndClient if server responds.
        So get HCONV and return it. And add it to conv list */
@@ -242,7 +242,7 @@
 
 	/* to reestablist a connection, we have to make sure that:
 	 * 1/ pConv is the converstation attached to the client window (it wouldn't be
-	 *    if a call to DdeReconnect would have already been done...) 
+	 *    if a call to DdeReconnect would have already been done...)
 	 *    FIXME: is this really an error ???
 	 * 2/ the pConv conversation had really been deconnected
 	 */
@@ -262,9 +262,9 @@
 	    LeaveCriticalSection(&WDML_CritSect);
 
             /* note: sent messages shall not use packing */
-	    ret = SendMessageA(hwndServer, WM_DDE_INITIATE, (WPARAM)hwndClient, 
+	    ret = SendMessageA(hwndServer, WM_DDE_INITIATE, (WPARAM)hwndClient,
                                MAKELPARAM(aSrv, aTpc));
-	    
+
 	    EnterCriticalSection(&WDML_CritSect);
 
 	    pConv = WDML_GetConv(hConv, FALSE);
@@ -284,7 +284,7 @@
 		    if (pLink->hConv == hConv)
 		    {
 			/* try to reestablish the links... */
-			DdeClientTransaction(NULL, 0, (HCONV)pNewConv, pLink->hszItem, pLink->uFmt, 
+			DdeClientTransaction(NULL, 0, (HCONV)pNewConv, pLink->hszItem, pLink->uFmt,
 					     pLink->transactionType, 1000, NULL);
 		    }
 		}
@@ -320,7 +320,7 @@
 
     atom = WDML_MakeAtomFromHsz(hszItem);
     if (!atom) return NULL;
-     
+
     pXAct = WDML_AllocTransaction(pConv->instance, WM_DDE_ADVISE, wFmt, hszItem);
     if (!pXAct)
     {
@@ -370,22 +370,22 @@
     FreeDDElParam(WM_DDE_ACK, msg->lParam);
 
     WDML_ExtractAck(uiLo, &ddeAck);
-	    
+
     if (ddeAck.fAck)
     {
 	WDML_LINK*	pLink;
-	
+
 	/* billx: first to see if the link is already created. */
-	pLink = WDML_FindLink(pConv->instance, (HCONV)pConv, WDML_CLIENT_SIDE, 
+	pLink = WDML_FindLink(pConv->instance, (HCONV)pConv, WDML_CLIENT_SIDE,
 			      pXAct->hszItem, TRUE, pXAct->wFmt);
-	if (pLink != NULL)	
-	{	
+	if (pLink != NULL)
+	{
 	    /* we found a link, and only need to modify it in case it changes */
 	    pLink->transactionType = pXAct->wType;
 	}
 	else
 	{
-	    WDML_AddLink(pConv->instance, (HCONV)pConv, WDML_CLIENT_SIDE, 
+	    WDML_AddLink(pConv->instance, (HCONV)pConv, WDML_CLIENT_SIDE,
 			 pXAct->wType, pXAct->hszItem, pXAct->wFmt);
 	}
         pXAct->hDdeData = (HDDEDATA)1;
@@ -409,7 +409,7 @@
 {
     WDML_XACT*	pXAct;
     ATOM	atom;
-    
+
     TRACE("XTYP_ADVSTOP transaction\n");
 
     atom = WDML_MakeAtomFromHsz(hszItem);
@@ -423,12 +423,12 @@
     }
 
     /* end advise loop: post WM_DDE_UNADVISE to server to terminate link
-     * on the specified item. 
+     * on the specified item.
      */
     pXAct->lParam = PackDDElParam(WM_DDE_UNADVISE, wFmt, atom);
     return pXAct;
 }
-    
+
 /******************************************************************
  *		WDML_HandleUnadviseReply
  *
@@ -455,9 +455,9 @@
     GlobalDeleteAtom(uiHi);
 
     WDML_ExtractAck(uiLo, &ddeAck);
-		    
+
     TRACE("WM_DDE_ACK received while waiting for a timeout\n");
-	    
+
     if (!ddeAck.fAck)
     {
 	TRACE("Returning FALSE on XTYP_ADVSTOP - fAck was FALSE\n");
@@ -466,7 +466,7 @@
     else
     {
 	/* billx: remove the link */
-	WDML_RemoveLink(pConv->instance, (HCONV)pConv, WDML_CLIENT_SIDE, 
+	WDML_RemoveLink(pConv->instance, (HCONV)pConv, WDML_CLIENT_SIDE,
 			pXAct->hszItem, pXAct->wFmt);
         pXAct->hDdeData = (HDDEDATA)1;
     }
@@ -559,7 +559,7 @@
     }
 
     return WDML_QS_HANDLED;
-}	
+}
 
 /******************************************************************
  *		WDML_BuildExecuteCommand
@@ -597,7 +597,7 @@
     if (hMem)
     {
 	LPBYTE	pDst;
-	    
+
 	pDst = GlobalLock(hMem);
 	if (pDst)
 	{
@@ -638,7 +638,7 @@
     WDML_XACT*	pXAct;
 
     TRACE("XTYP_EXECUTE transaction\n");
-	
+
     pXAct = WDML_AllocTransaction(pConv->instance, WM_DDE_EXECUTE, 0, 0);
     if (!pXAct)
 	return NULL;
@@ -646,7 +646,7 @@
     if (cbData == (DWORD)-1)
     {
 	HDDEDATA	hDdeData = (HDDEDATA)pData;
-    
+
 	pData = DdeAccessData(hDdeData, &cbData);
 	if (pData)
 	{
@@ -698,17 +698,17 @@
  *
  *
  */
-static WDML_XACT*	WDML_ClientQueuePoke(WDML_CONV* pConv, LPCVOID pData, DWORD cbData, 
+static WDML_XACT*	WDML_ClientQueuePoke(WDML_CONV* pConv, LPCVOID pData, DWORD cbData,
 					     UINT wFmt, HSZ hszItem)
 {
     WDML_XACT*	pXAct;
     ATOM	atom;
 
     TRACE("XTYP_POKE transaction\n");
-	
+
     atom = WDML_MakeAtomFromHsz(hszItem);
     if (!atom) return NULL;
-     
+
     pXAct = WDML_AllocTransaction(pConv->instance, WM_DDE_POKE, wFmt, hszItem);
     if (!pXAct)
     {
@@ -726,7 +726,7 @@
 
 	pXAct->hMem = GlobalAlloc(GHND | GMEM_DDESHARE, sizeof(DDEPOKE) + cbData);
 	ddePoke = GlobalLock(pXAct->hMem);
-	if (ddePoke) 
+	if (ddePoke)
 	{
 	    memcpy(ddePoke->Value, pData, cbData);
 	    ddePoke->fRelease = FALSE; /* FIXME: app owned ? */
@@ -811,7 +811,7 @@
     }
     if (!pConv->instance->CBFflags & CBF_SKIP_DISCONNECTS)
     {
-	WDML_InvokeCallback(pConv->instance, XTYP_DISCONNECT, 0, (HCONV)pConv, 
+	WDML_InvokeCallback(pConv->instance, XTYP_DISCONNECT, 0, (HCONV)pConv,
 			    0, 0, 0, 0, (pConv->wStatus & ST_ISSELF) ? 1 : 0);
     }
     WDML_RemoveConv(pConv, WDML_CLIENT_SIDE);
@@ -834,25 +834,25 @@
     TRACE("WM_DDE_DATA message received in the Client Proc!\n");
     /* wParam -- sending window handle	*/
     /* lParam -- hDdeData & item HSZ	*/
-	
+
     UnpackDDElParam(WM_DDE_DATA, msg->lParam, &uiLo, &uiHi);
     hsz = WDML_MakeHszFromAtom(pConv->instance, uiHi);
 
     hDdeDataIn = WDML_Global2DataHandle((HGLOBAL)uiLo, &wdh);
 
-    /* billx: 
+    /* billx:
      *  For hot link, data should be passed to its callback with
      * XTYP_ADVDATA and callback should return the proper status.
      */
-    pLink = WDML_FindLink(pConv->instance, (HCONV)pConv, WDML_CLIENT_SIDE, hsz, 
+    pLink = WDML_FindLink(pConv->instance, (HCONV)pConv, WDML_CLIENT_SIDE, hsz,
                           uiLo ? TRUE : FALSE, wdh.cfFormat);
-    if (!pLink)	
+    if (!pLink)
     {
 	WDML_DecHSZ(pConv->instance, hsz);
         DdeFreeDataHandle(hDdeDataIn);
 	return WDML_QS_PASS;
     }
-	
+
     if (hDdeDataIn != 0 && wdh.fAckReq)
     {
 	WDML_PostAck(pConv, WDML_CLIENT_SIDE, 0, FALSE, TRUE, uiHi, msg->lParam, WM_DDE_DATA);
@@ -863,11 +863,11 @@
     {
 	GlobalDeleteAtom(uiHi);
     }
-	
-    hDdeDataOut = WDML_InvokeCallback(pConv->instance, XTYP_ADVDATA, pLink->uFmt, pLink->hConv, 
+
+    hDdeDataOut = WDML_InvokeCallback(pConv->instance, XTYP_ADVDATA, pLink->uFmt, pLink->hConv,
 				      pConv->hszTopic, pLink->hszItem, hDdeDataIn, 0, 0);
 
-    if (hDdeDataOut != (HDDEDATA)DDE_FACK || wdh.fRelease) 
+    if (hDdeDataOut != (HDDEDATA)DDE_FACK || wdh.fRelease)
     {
         if (uiLo)
         {
@@ -876,11 +876,11 @@
     }
 
     DdeFreeDataHandle(hDdeDataIn);
-    
+
     WDML_DecHSZ(pConv->instance, hsz);
     if (msg->lParam)
 	FreeDDElParam(WM_DDE_DATA, msg->lParam);
-	
+
     return WDML_QS_HANDLED;
 }
 
@@ -893,11 +893,11 @@
 {
     if (pConv->hwndServer != WIN_GetFullHandle(msg->wParam))
 	return WDML_QS_PASS;
-    
+
     pConv->wStatus |= ST_TERMINATED;
     if (!pConv->instance->CBFflags & CBF_SKIP_DISCONNECTS)
     {
-	WDML_InvokeCallback(pConv->instance, XTYP_DISCONNECT, 0, (HCONV)pConv, 
+	WDML_InvokeCallback(pConv->instance, XTYP_DISCONNECT, 0, (HCONV)pConv,
 			    0, 0, 0, 0, (pConv->wStatus & ST_ISSELF) ? 1 : 0);
     }
     if (pConv->wStatus & ST_CONNECTED)
@@ -920,7 +920,7 @@
     WDML_XACT*		pXAct = pConv->transactions;
     WDML_QUEUE_STATE	qs;
 
-    if (pConv->transactions) 
+    if (pConv->transactions)
     {
 	/* first check message against a pending transaction, if any */
 	switch (pXAct->ddeMsg)
@@ -954,7 +954,7 @@
     }
 
     /* now check the results */
-    switch (qs) 
+    switch (qs)
     {
     case WDML_QS_ERROR:
     case WDML_QS_SWALLOWED:
@@ -971,7 +971,7 @@
 				(HCONV)pConv, pConv->hszTopic, pXAct->hszItem,
 				pXAct->hDdeData, MAKELONG(0, pXAct->xActID), 0 /* FIXME */);
 	    qs = WDML_QS_PASS;
-	}	
+	}
 	else
 	{
 	    *hdd = pXAct->hDdeData;
@@ -1014,20 +1014,20 @@
 
     /* FIXME: time 32 bit wrap around */
     dwTimeout += GetCurrentTime();
-	    
+
     while ((dwTime = GetCurrentTime()) < dwTimeout)
     {
 	/* we cannot be in the crit sect all the time because when client and server run in a
 	 * single process they need to share the access to the internal data
 	 */
-	if (MsgWaitForMultipleObjects(0, NULL, FALSE, 
+	if (MsgWaitForMultipleObjects(0, NULL, FALSE,
 				      dwTimeout - dwTime, QS_POSTMESSAGE) == WAIT_OBJECT_0)
 	{
 	    BOOL	ret = FALSE;
 	    MSG		msg;
 	    WDML_CONV*	pConv;
 	    HDDEDATA	hdd;
-	    
+
 	    EnterCriticalSection(&WDML_CritSect);
 
 	    pConv = WDML_GetConv(hConv, FALSE);
@@ -1041,7 +1041,7 @@
 	    {
 		/* check that either pXAct has been processed or no more xActions are pending */
 		ret = (pConv->transactions == pXAct);
-		ret = WDML_HandleReply(pConv, &msg, &hdd) == WDML_QS_HANDLED && 
+		ret = WDML_HandleReply(pConv, &msg, &hdd) == WDML_QS_HANDLED &&
 		    (pConv->transactions == NULL || ret);
 		if (ret) break;
 	    }
@@ -1089,16 +1089,16 @@
     WDML_CONV*		pConv;
     WDML_XACT*		pXAct;
     HDDEDATA		hDdeData = 0;
-    
+
     TRACE("(%p,%ld,0x%lx,0x%x,%d,%d,%ld,%p)\n",
 	  pData, cbData, (DWORD)hConv, hszItem, wFmt, wType, dwTimeout, pdwResult);
-    
+
     if (hConv == 0)
     {
 	ERR("Invalid conversation handle\n");
 	return 0;
     }
-    
+
     EnterCriticalSection(&WDML_CritSect);
 
     pConv = WDML_GetConv(hConv, TRUE);
@@ -1165,7 +1165,7 @@
 
     if (!PostMessageA(pConv->hwndServer, pXAct->ddeMsg, (WPARAM)pConv->hwndClient, pXAct->lParam))
     {
-	TRACE("Failed posting message %d to 0x%04x (error=0x%lx)\n", 
+	TRACE("Failed posting message %d to 0x%04x (error=0x%lx)\n",
 	      pXAct->ddeMsg, pConv->hwndServer, GetLastError());
 	pConv->wStatus &= ~ST_CONNECTED;
 	WDML_UnQueueTransaction(pConv, pXAct);
@@ -1174,7 +1174,7 @@
     }
     pXAct->dwTimeout = dwTimeout;
     /* FIXME: should set the app bits on *pdwResult */
-    
+
     if (dwTimeout == TIMEOUT_ASYNC)
     {
 	if (pdwResult)
@@ -1226,7 +1226,7 @@
             {
                 for (pXAct = pConv->transactions; pXAct; pXAct = pXAct->next)
                 {
-                    if (pXAct->dwTimeout == TIMEOUT_ASYNC && 
+                    if (pXAct->dwTimeout == TIMEOUT_ASYNC &&
                         (idTransaction == 0 || pXAct->xActID == idTransaction))
                     {
                         WDML_UnQueueTransaction(pConv, pXAct);
@@ -1301,9 +1301,9 @@
 	pConv->wConvst = XST_INIT1;
 
 	/* check if server is handled by DDEML */
-	if ((GetClassNameA((HWND)wParam, buf, sizeof(buf)) && 
+	if ((GetClassNameA((HWND)wParam, buf, sizeof(buf)) &&
 	     strcmp(buf, WDML_szServerConvClassA) == 0) ||
-	    (GetClassNameW((HWND)wParam, (LPWSTR)buf, sizeof(buf)/sizeof(WCHAR)) && 
+	    (GetClassNameW((HWND)wParam, (LPWSTR)buf, sizeof(buf)/sizeof(WCHAR)) &&
 	     lstrcmpW((LPWSTR)buf, WDML_szServerConvClassW) == 0))
 	{
 	    pConv->wStatus |= ST_ISLOCAL;
@@ -1324,7 +1324,7 @@
 
 	pConv = WDML_GetConvFromWnd(hwnd);
 
-	if (pConv) 
+	if (pConv)
 	{
 	    MSG		msg;
 	    HDDEDATA	hdd;
@@ -1340,8 +1340,8 @@
 	LeaveCriticalSection(&WDML_CritSect);
 	return 0;
     }
-    
-    return (IsWindowUnicode(hwnd)) ? 
+
+    return (IsWindowUnicode(hwnd)) ?
 	DefWindowProcA(hwnd, iMsg, wParam, lParam) : DefWindowProcW(hwnd, iMsg, wParam, lParam);
 }
 
@@ -1356,13 +1356,13 @@
     BOOL	ret = FALSE;
 
     TRACE("(%ld)\n", (DWORD)hConv);
-    
+
     if (hConv == 0)
     {
 	ERR("DdeDisconnect(): hConv = 0\n");
 	return FALSE;
     }
-    
+
     EnterCriticalSection(&WDML_CritSect);
     pConv = WDML_GetConv(hConv, TRUE);
     if (pConv != NULL)
@@ -1404,7 +1404,7 @@
 {
     WDML_CONV*	pConv;
     BOOL	ret = FALSE;
-    
+
     EnterCriticalSection(&WDML_CritSect);
     pConv = WDML_GetConv(hConv, TRUE);
     if (pConv)
diff --git a/dlls/user/dde/dde_private.h b/dlls/user/dde/dde_private.h
index c09d629..bad3036 100644
--- a/dlls/user/dde/dde_private.h
+++ b/dlls/user/dde/dde_private.h
@@ -38,7 +38,7 @@
 /* The internal structures (prefixed by WDML) are used as follows:
  * + a WDML_INSTANCE is created for each instance creation (DdeInitialize)
  *      - a popup window (InstanceClass) is created for each instance.
- *      - this window is used to receive all the DDEML events (server registration, 
+ *      - this window is used to receive all the DDEML events (server registration,
  *	  conversation confirmation...). See the WM_WDML_???? messages for details
  * + when registring a server (DdeNameService) a WDML_SERVER is created
  *	- a popup window (ServerNameClass) is created
@@ -53,7 +53,7 @@
  *	- all the exchanges then take place between those two windows
  *	- windows for the conversation exist in two forms (Ansi & Unicode). This
  *	  is only needed when a partner in a conv is not handled by DDEML. The
- *	  type (A/W) of the window is used to handle the ansi <=> unicode 
+ *	  type (A/W) of the window is used to handle the ansi <=> unicode
  *        transformations
  *	- two handles are created for a conversation (on each side). Each handle
  *	  is linked to a structure. To help differentiate those handles, the
@@ -61,7 +61,7 @@
  * + a (warm or link) is represented by two WDML_LINK structures:
  *	- one on client side, the other one on server side
  *	- therefore, two lists of links are kept for each instance
- *	
+ *
  * To help getting back to data, WDML windows store information:
  *	- offset 0: the DDE instance
  *	- offset 4: the current conversation (for ClientConv and ServerConv only)
@@ -69,12 +69,12 @@
  * All the implementation (client & server) makes the assumption that the other side
  * is not always a DDEML partner. However, if it's the case, supplementary services
  * are available (most notably the REGISTER/UNREGISTER and CONNECT_CONFIRM messages
- * to the callback function). To be correct in every situation, all the basic 
+ * to the callback function). To be correct in every situation, all the basic
  * exchanges are made using the 'pure' DDE protocol. A (future !) enhancement would
  * be to provide a new protocol in the case were both partners are handled by DDEML.
  *
  * The StringHandles are in fact stored as local atoms. So an HSZ and a (local) atom
- * can be used interchangably. However, in order to keep track of the allocated HSZ, 
+ * can be used interchangably. However, in order to keep track of the allocated HSZ,
  * and to free them upon instance termination, all HSZ are stored in a link list.
  * When the HSZ need to be passed thru DDE messages, we need to convert them back and
  * forth to global atoms.
@@ -123,7 +123,7 @@
     LPARAM			lParam; 	/* useful for reusing */
 } WDML_XACT;
 
-typedef struct tagWDML_CONV 
+typedef struct tagWDML_CONV
 {
     struct tagWDML_CONV*	next;		/* to link all the conversations */
     struct tagWDML_INSTANCE*	instance;
@@ -161,7 +161,7 @@
     PFNCALLBACK     		callback;
     DWORD           		CBFflags;
     DWORD           		monitorFlags;
-    DWORD			lastError; 
+    DWORD			lastError;
     HWND			hwndEvent;
     WDML_SERVER*		servers;	/* list of registered servers */
     WDML_CONV*			convs[2];	/* active conversations for this instance (client and server) */
@@ -187,31 +187,31 @@
 } WDML_QUEUE_STATE;
 
 extern	HDDEDATA 	WDML_InvokeCallback(WDML_INSTANCE* pInst, UINT uType, UINT uFmt, HCONV hConv,
-					    HSZ hsz1, HSZ hsz2, HDDEDATA hdata, 
+					    HSZ hsz1, HSZ hsz2, HDDEDATA hdata,
 					    DWORD dwData1, DWORD dwData2);
 extern	HDDEDATA 	WDML_InvokeCallback16(PFNCALLBACK pfn, UINT uType, UINT uFmt, HCONV hConv,
-					      HSZ hsz1, HSZ hsz2, HDDEDATA hdata, 
+					      HSZ hsz1, HSZ hsz2, HDDEDATA hdata,
 					      DWORD dwData1, DWORD dwData2);
 extern	WDML_SERVER*	WDML_AddServer(WDML_INSTANCE* pInstance, HSZ hszService, HSZ hszTopic);
 extern	void		WDML_RemoveServer(WDML_INSTANCE* pInstance, HSZ hszService, HSZ hszTopic);
 extern	WDML_SERVER*	WDML_FindServer(WDML_INSTANCE* pInstance, HSZ hszService, HSZ hszTopic);
-/* called both in DdeClientTransaction and server side. */		
+/* called both in DdeClientTransaction and server side. */
 extern	UINT		WDML_Initialize(LPDWORD pidInst, PFNCALLBACK pfnCallback,
 					DWORD afCmd, DWORD ulRes, BOOL bUnicode, BOOL b16);
-extern	WDML_CONV* 	WDML_AddConv(WDML_INSTANCE* pInstance, WDML_SIDE side, 
+extern	WDML_CONV* 	WDML_AddConv(WDML_INSTANCE* pInstance, WDML_SIDE side,
 				     HSZ hszService, HSZ hszTopic, HWND hwndClient, HWND hwndServer);
 extern	void		WDML_RemoveConv(WDML_CONV* pConv, WDML_SIDE side);
 extern	WDML_CONV*	WDML_GetConv(HCONV hConv, BOOL checkConnected);
 extern	WDML_CONV*	WDML_GetConvFromWnd(HWND hWnd);
-extern	WDML_CONV*	WDML_FindConv(WDML_INSTANCE* pInstance, WDML_SIDE side, 
-				      HSZ hszService, HSZ hszTopic);	
-extern  BOOL		WDML_PostAck(WDML_CONV* pConv, WDML_SIDE side, WORD appRetCode, 
+extern	WDML_CONV*	WDML_FindConv(WDML_INSTANCE* pInstance, WDML_SIDE side,
+				      HSZ hszService, HSZ hszTopic);
+extern  BOOL		WDML_PostAck(WDML_CONV* pConv, WDML_SIDE side, WORD appRetCode,
 				     BOOL fBusy, BOOL fAck, UINT pmt, LPARAM lParam, UINT oldMsg);
-extern	void		WDML_AddLink(WDML_INSTANCE* pInstance, HCONV hConv, WDML_SIDE side, 
+extern	void		WDML_AddLink(WDML_INSTANCE* pInstance, HCONV hConv, WDML_SIDE side,
 				     UINT wType, HSZ hszItem, UINT wFmt);
-extern	WDML_LINK*	WDML_FindLink(WDML_INSTANCE* pInstance, HCONV hConv, WDML_SIDE side, 
+extern	WDML_LINK*	WDML_FindLink(WDML_INSTANCE* pInstance, HCONV hConv, WDML_SIDE side,
 				      HSZ hszItem, BOOL use_fmt, UINT uFmt);
-extern	void 		WDML_RemoveLink(WDML_INSTANCE* pInstance, HCONV hConv, WDML_SIDE side, 
+extern	void 		WDML_RemoveLink(WDML_INSTANCE* pInstance, HCONV hConv, WDML_SIDE side,
 					HSZ hszItem, UINT wFmt);
 extern	void		WDML_RemoveAllLinks(WDML_INSTANCE* pInstance, WDML_CONV* pConv, WDML_SIDE side);
 /* string internals */
@@ -226,14 +226,14 @@
 extern	BOOL		WDML_UnQueueTransaction(WDML_CONV* pConv, WDML_XACT*  pXAct);
 extern	void		WDML_FreeTransaction(WDML_INSTANCE* pInstance, WDML_XACT* pXAct, BOOL doFreePmt);
 extern	WDML_XACT*	WDML_FindTransaction(WDML_CONV* pConv, DWORD tid);
-extern	HGLOBAL		WDML_DataHandle2Global(HDDEDATA hDdeData, BOOL fResponse, BOOL fRelease, 
+extern	HGLOBAL		WDML_DataHandle2Global(HDDEDATA hDdeData, BOOL fResponse, BOOL fRelease,
 					       BOOL fDeferUpd, BOOL dAckReq);
 extern	HDDEDATA	WDML_Global2DataHandle(HGLOBAL hMem, WINE_DDEHEAD* da);
 extern  BOOL            WDML_IsAppOwned(HDDEDATA hDdeData);
 extern	WDML_INSTANCE*	WDML_GetInstance(DWORD InstId);
 extern	WDML_INSTANCE*	WDML_GetInstanceFromWnd(HWND hWnd);
 /* broadcasting to DDE windows */
-extern	void		WDML_BroadcastDDEWindows(const char* clsName, UINT uMsg, 
+extern	void		WDML_BroadcastDDEWindows(const char* clsName, UINT uMsg,
 						 WPARAM wParam, LPARAM lParam);
 extern	void		WDML_NotifyThreadExit(DWORD tid);
 
@@ -252,7 +252,7 @@
 #define WM_WDML_UNREGISTER	(WM_USER + 0x201)
 #define WM_WDML_CONNECT_CONFIRM	(WM_USER + 0x202)
 
-/* parameters for messages: 
+/* parameters for messages:
  *			wParam				lParam
  * Register		atom for service name		atom for service spec
  * Unregister		atom for service name		atom for service spec
diff --git a/dlls/user/dde/ddeml16.c b/dlls/user/dde/ddeml16.c
index 35caee4..a6d5ff4 100644
--- a/dlls/user/dde/ddeml16.c
+++ b/dlls/user/dde/ddeml16.c
@@ -97,8 +97,8 @@
  *
  *
  */
-HDDEDATA	WDML_InvokeCallback16(PFNCALLBACK pfn, UINT uType, UINT uFmt, 
-                                      HCONV hConv, HSZ hsz1, HSZ hsz2, 
+HDDEDATA	WDML_InvokeCallback16(PFNCALLBACK pfn, UINT uType, UINT uFmt,
+                                      HCONV hConv, HSZ hsz1, HSZ hsz2,
                                       HDDEDATA hdata, DWORD dwData1, DWORD dwData2)
 {
     DWORD               d1;
@@ -116,7 +116,7 @@
         d1 = dwData1;
         break;
     }
-    ret = WDML_CallTo16_long_llllllll((FARPROC16)pfn, uType, uFmt, hConv, 
+    ret = WDML_CallTo16_long_llllllll((FARPROC16)pfn, uType, uFmt, hConv,
                                       hsz1, hsz2, hdata, d1, dwData2);
     switch (uType)
     {
@@ -134,7 +134,7 @@
 UINT16 WINAPI DdeInitialize16(LPDWORD pidInst, PFNCALLBACK16 pfnCallback,
 			      DWORD afCmd, DWORD ulRes)
 {
-    return WDML_Initialize(pidInst, (PFNCALLBACK)pfnCallback, afCmd, ulRes, 
+    return WDML_Initialize(pidInst, (PFNCALLBACK)pfnCallback, afCmd, ulRes,
                            FALSE, TRUE);
 }
 
@@ -155,7 +155,7 @@
 {
     CONVCONTEXT	        cc;
     CONVCONTEXT*	pCC = NULL;
-    
+
     if (pCC16)
         map1632_conv_context(pCC = &cc, pCC16);
     return DdeConnectList(idInst, hszService, hszTopic, hConvList, pCC);
@@ -181,7 +181,7 @@
 /*****************************************************************
  *		DdeQueryString (DDEML.23)
  */
-DWORD WINAPI DdeQueryString16(DWORD idInst, HSZ hsz, LPSTR lpsz, DWORD cchMax, 
+DWORD WINAPI DdeQueryString16(DWORD idInst, HSZ hsz, LPSTR lpsz, DWORD cchMax,
                               INT16 codepage)
 {
     return DdeQueryStringA(idInst, hsz, lpsz, cchMax, codepage);
@@ -190,12 +190,12 @@
 /*****************************************************************
  *            DdeConnect   (DDEML.7)
  */
-HCONV WINAPI DdeConnect16(DWORD idInst, HSZ hszService, HSZ hszTopic, 
+HCONV WINAPI DdeConnect16(DWORD idInst, HSZ hszService, HSZ hszTopic,
                           LPCONVCONTEXT16 pCC16)
 {
     CONVCONTEXT	        cc;
     CONVCONTEXT*	pCC = NULL;
-    
+
     if (pCC16)
         map1632_conv_context(pCC = &cc, pCC16);
     return DdeConnect(idInst, hszService, hszTopic, pCC);
@@ -220,8 +220,8 @@
 /*****************************************************************
  *            DdeCreateDataHandle (DDEML.14)
  */
-HDDEDATA WINAPI DdeCreateDataHandle16(DWORD idInst, LPBYTE pSrc, DWORD cb, 
-                                      DWORD cbOff, HSZ hszItem, UINT16 wFmt, 
+HDDEDATA WINAPI DdeCreateDataHandle16(DWORD idInst, LPBYTE pSrc, DWORD cb,
+                                      DWORD cbOff, HSZ hszItem, UINT16 wFmt,
 				      UINT16 afCmd)
 {
     return DdeCreateDataHandle(idInst, pSrc, cb, cbOff, hszItem, wFmt, afCmd);
@@ -235,8 +235,8 @@
     if  (codepage)
     {
         return DdeCreateStringHandleA(idInst, str, codepage);
-    } 
-    else 
+    }
+    else
     {
         TRACE("Default codepage supplied\n");
         return DdeCreateStringHandleA(idInst, str, CP_WINANSI);
@@ -270,8 +270,8 @@
 /*****************************************************************
  *            DdeClientTransaction  (DDEML.11)
  */
-HDDEDATA WINAPI DdeClientTransaction16(LPVOID pData, DWORD cbData, HCONV hConv, 
-                                       HSZ hszItem, UINT16 wFmt, UINT16 wType, 
+HDDEDATA WINAPI DdeClientTransaction16(LPVOID pData, DWORD cbData, HCONV hConv,
+                                       HSZ hszItem, UINT16 wFmt, UINT16 wType,
                                        DWORD dwTimeout, LPDWORD pdwResult)
 {
     return DdeClientTransaction((LPBYTE)pData, cbData, hConv, hszItem,
@@ -366,7 +366,7 @@
  *		DdeQueryConvInfo (DDEML.9)
  *
  */
-UINT16 WINAPI DdeQueryConvInfo16(HCONV hConv, DWORD idTransaction, 
+UINT16 WINAPI DdeQueryConvInfo16(HCONV hConv, DWORD idTransaction,
                                  LPCONVINFO16 lpConvInfo)
 {
     CONVINFO    ci32;
diff --git a/dlls/user/dde/misc.c b/dlls/user/dde/misc.c
index fc2e84d..5791599 100644
--- a/dlls/user/dde/misc.c
+++ b/dlls/user/dde/misc.c
@@ -310,8 +310,8 @@
 	    {
 		pConv->wStatus |= ST_ISLOCAL;
 
-		WDML_InvokeCallback(pInstance, XTYP_CONNECT_CONFIRM, 0, (HCONV)pConv, 
-				    pConv->hszTopic, pConv->hszService, 0, 0, 
+		WDML_InvokeCallback(pInstance, XTYP_CONNECT_CONFIRM, 0, (HCONV)pConv,
+				    pConv->hszTopic, pConv->hszService, 0, 0,
 				    (pConv->wStatus & ST_ISSELF) ? 1 : 0);
 	    }
 	}
@@ -335,7 +335,7 @@
     UINT			ret;
     WNDCLASSEXA			wndclass;
 
-    TRACE("(%p,%p,0x%lx,%ld)\n", 
+    TRACE("(%p,%p,0x%lx,%ld)\n",
 	  pidInst, pfnCallback, afCmd, ulRes);
 
     if (ulRes)
@@ -344,7 +344,7 @@
 	/* trap this and no more until we know more */
 	return DMLERR_NO_ERROR;
     }
-    
+
     /* grab enough heap for one control struct - not really necessary for re-initialise
      *	but allows us to use same validation routines */
     pInstance = (WDML_INSTANCE*)HeapAlloc(GetProcessHeap(), 0, sizeof(WDML_INSTANCE));
@@ -356,9 +356,9 @@
     }
     pInstance->next = NULL;
     pInstance->monitor = (afCmd | APPCLASS_MONITOR);
-    
+
     /* messy bit, spec implies that 'Client Only' can be set in 2 different ways, catch 1 here */
-    
+
     pInstance->clientOnly = afCmd & APPCMD_CLIENTONLY;
     pInstance->instanceID = *pidInst; /* May need to add calling proc Id */
     pInstance->threadID = GetCurrentThreadId();
@@ -374,79 +374,79 @@
     pInstance->links[1] = NULL;
 
     /* isolate CBF flags in one go, expect this will go the way of all attempts to be clever !! */
-    
+
     pInstance->CBFflags = afCmd^((afCmd&MF_MASK)|((afCmd&APPCMD_MASK)|(afCmd&APPCLASS_MASK)));
-    
+
     if (!pInstance->clientOnly)
     {
 	/* Check for other way of setting Client-only !! */
-	pInstance->clientOnly = 
+	pInstance->clientOnly =
 	    (pInstance->CBFflags & CBF_FAIL_ALLSVRXACTIONS) == CBF_FAIL_ALLSVRXACTIONS;
     }
-    
+
     TRACE("instance created - checking validity \n");
-    
-    if (*pidInst == 0) 
+
+    if (*pidInst == 0)
     {
 	/*  Initialisation of new Instance Identifier */
 	TRACE("new instance, callback %p flags %lX\n",pfnCallback,afCmd);
 
 	EnterCriticalSection(&WDML_CritSect);
-	
-	if (WDML_InstanceList == NULL) 
+
+	if (WDML_InstanceList == NULL)
 	{
 	    /* can't be another instance in this case, assign to the base pointer */
 	    WDML_InstanceList = pInstance;
-	    
+
 	    /* since first must force filter of XTYP_CONNECT and XTYP_WILDCONNECT for
-	     *		present 
+	     *		present
 	     *	-------------------------------      NOTE NOTE NOTE    --------------------------
-	     *		
+	     *
 	     *	the manual is not clear if this condition
-	     *	applies to the first call to DdeInitialize from an application, or the 
+	     *	applies to the first call to DdeInitialize from an application, or the
 	     *	first call for a given callback !!!
 	     */
-	    
+
 	    pInstance->CBFflags = pInstance->CBFflags|APPCMD_FILTERINITS;
 	    TRACE("First application instance detected OK\n");
 	    /*	allocate new instance ID */
 	    WDML_IncrementInstanceId(pInstance);
-	} 
-	else 
+	}
+	else
 	{
 	    /* really need to chain the new one in to the latest here, but after checking conditions
 	     *	such as trying to start a conversation from an application trying to monitor */
 	    reference_inst = WDML_InstanceList;
 	    TRACE("Subsequent application instance - starting checks\n");
-	    while (reference_inst->next != NULL) 
+	    while (reference_inst->next != NULL)
 	    {
 		/*
 		 *	This set of tests will work if application uses same instance Id
 		 *	at application level once allocated - which is what manual implies
-		 *	should happen. If someone tries to be 
+		 *	should happen. If someone tries to be
 		 *	clever (lazy ?) it will fail to pick up that later calls are for
 		 *	the same application - should we trust them ?
 		 */
-		if (pInstance->instanceID == reference_inst->instanceID) 
+		if (pInstance->instanceID == reference_inst->instanceID)
 		{
 		    /* Check 1 - must be same Client-only state */
-		    
+
 		    if (pInstance->clientOnly != reference_inst->clientOnly)
 		    {
 			ret = DMLERR_DLL_USAGE;
 			goto theError;
 		    }
-		    
+
 		    /* Check 2 - cannot use 'Monitor' with any non-monitor modes */
-		    
-		    if (pInstance->monitor != reference_inst->monitor) 
+
+		    if (pInstance->monitor != reference_inst->monitor)
 		    {
 			ret = DMLERR_INVALIDPARAMETER;
 			goto theError;
 		    }
-		    
+
 		    /* Check 3 - must supply different callback address */
-		    
+
 		    if (pInstance->callback == reference_inst->callback)
 		    {
 			ret = DMLERR_DLL_USAGE;
@@ -456,7 +456,7 @@
 		reference_inst = reference_inst->next;
 	    }
 	    /*  All cleared, add to chain */
-	    
+
 	    TRACE("Application Instance checks finished\n");
 	    WDML_IncrementInstanceId(pInstance);
 	    reference_inst->next = pInstance;
@@ -478,25 +478,25 @@
 	wndclass.lpszMenuName  = NULL;
 	wndclass.lpszClassName = WDML_szEventClass;
 	wndclass.hIconSm       = 0;
-	
+
 	RegisterClassExA(&wndclass);
-	
+
 	pInstance->hwndEvent = CreateWindowA(WDML_szEventClass, NULL,
 						WS_POPUP, 0, 0, 0, 0,
 						0, 0, 0, 0);
-	
+
 	SetWindowLongA(pInstance->hwndEvent, GWL_WDML_INSTANCE, (DWORD)pInstance);
 
 	TRACE("New application instance processing finished OK\n");
-    } 
-    else 
+    }
+    else
     {
 	/* Reinitialisation situation   --- FIX  */
 	TRACE("reinitialisation of (%p,%p,0x%lx,%ld): stub\n", pidInst, pfnCallback, afCmd, ulRes);
-	
+
 	EnterCriticalSection(&WDML_CritSect);
-	
-	if (WDML_InstanceList == NULL) 
+
+	if (WDML_InstanceList == NULL)
 	{
 	    ret = DMLERR_DLL_USAGE;
 	    goto theError;
@@ -514,13 +514,13 @@
 	    if (*pidInst == reference_inst->instanceID && pfnCallback == reference_inst->callback)
 	    {
 		/* Check 1 - cannot change client-only mode if set via APPCMD_CLIENTONLY */
-		
+
 		if (reference_inst->clientOnly)
 		{
-		    if  ((reference_inst->CBFflags & CBF_FAIL_ALLSVRXACTIONS) != CBF_FAIL_ALLSVRXACTIONS) 
+		    if  ((reference_inst->CBFflags & CBF_FAIL_ALLSVRXACTIONS) != CBF_FAIL_ALLSVRXACTIONS)
 		    {
 				/* i.e. Was set to Client-only and through APPCMD_CLIENTONLY */
-			
+
 			if (!(afCmd & APPCMD_CLIENTONLY))
 			{
 			    ret = DMLERR_DLL_USAGE;
@@ -529,15 +529,15 @@
 		    }
 		}
 		/* Check 2 - cannot change monitor modes */
-		
-		if (pInstance->monitor != reference_inst->monitor) 
+
+		if (pInstance->monitor != reference_inst->monitor)
 		{
 		    ret = DMLERR_DLL_USAGE;
 		    goto theError;
 		}
-		
+
 		/* Check 3 - trying to set Client-only via APPCMD when not set so previously */
-		
+
 		if ((afCmd&APPCMD_CLIENTONLY) && !reference_inst->clientOnly)
 		{
 		    ret = DMLERR_DLL_USAGE;
@@ -549,21 +549,21 @@
 	}
 	if (reference_inst->next == NULL)
 	{
-	    /* Crazy situation - trying to re-initialize something that has not beeen initialized !! 
-	     *	
+	    /* Crazy situation - trying to re-initialize something that has not beeen initialized !!
+	     *
 	     *	Manual does not say what we do, cannot return DMLERR_NOT_INITIALIZED so what ?
 	     */
 	    ret = DMLERR_INVALIDPARAMETER;
 	    goto theError;
 	}
 	/* All checked - change relevant flags */
-	
+
 	reference_inst->CBFflags = pInstance->CBFflags;
 	reference_inst->clientOnly = pInstance->clientOnly;
 	reference_inst->monitorFlags = pInstance->monitorFlags;
 	LeaveCriticalSection(&WDML_CritSect);
     }
-    
+
     return DMLERR_NO_ERROR;
  theError:
     HeapFree(GetProcessHeap(), 0, pInstance);
@@ -621,7 +621,7 @@
 
     EnterCriticalSection(&WDML_CritSect);
 
-    /*  First check instance 
+    /*  First check instance
      */
     pInstance = WDML_GetInstance(idInst);
     if (pInstance == NULL)
@@ -646,16 +646,16 @@
 
     /* then unregister all known service names */
     DdeNameService(idInst, 0, 0, DNS_UNREGISTER);
-    
+
     /* Free the nodes that were not freed by this instance
      * and remove the nodes from the list of HSZ nodes.
      */
     WDML_FreeAllHSZ(pInstance);
 
     DestroyWindow(pInstance->hwndEvent);
-    
+
     /* OK now delete the instance handle itself */
-    
+
     if (WDML_InstanceList == pInstance)
     {
 	/* special case - the first/only entry */
@@ -665,7 +665,7 @@
     {
 	/* general case, remove entry */
 	WDML_INSTANCE*	inst;
-	
+
 	for (inst = WDML_InstanceList; inst->next != pInstance; inst = inst->next);
 	inst->next = pInstance->next;
     }
@@ -705,7 +705,7 @@
  *
  */
 HDDEDATA 	WDML_InvokeCallback(WDML_INSTANCE* pInstance, UINT uType, UINT uFmt, HCONV hConv,
-				    HSZ hsz1, HSZ hsz2, HDDEDATA hdata, 
+				    HSZ hsz1, HSZ hsz2, HDDEDATA hdata,
 				    DWORD dwData1, DWORD dwData2)
 {
     HDDEDATA	ret;
@@ -713,11 +713,11 @@
     if (pInstance == NULL)
 	return (HDDEDATA)0;
     TRACE("invoking CB%d[%08lx] (%u %u %08lx 0x%x 0x%x %u %lu %lu)\n",
-	  pInstance->win16 ? 16 : 32, (DWORD)pInstance->callback, uType, uFmt, 
+	  pInstance->win16 ? 16 : 32, (DWORD)pInstance->callback, uType, uFmt,
 	  (DWORD)hConv, hsz1, hsz2, hdata, dwData1, dwData2);
     if (pInstance->win16)
     {
-	ret = WDML_InvokeCallback16(pInstance->callback, uType, uFmt, hConv, 
+	ret = WDML_InvokeCallback16(pInstance->callback, uType, uFmt, hConv,
 				    hsz1, hsz2, hdata, dwData1, dwData2);
     }
     else
@@ -738,7 +738,7 @@
 WDML_INSTANCE*	WDML_GetInstance(DWORD instId)
 {
     WDML_INSTANCE*	pInstance;
-    
+
     for (pInstance = WDML_InstanceList; pInstance != NULL; pInstance = pInstance->next)
     {
 	if (pInstance->instanceID == instId)
@@ -778,15 +778,15 @@
 {
     DWORD		error_code;
     WDML_INSTANCE*	pInstance;
-    
+
     FIXME("(%ld): error reporting is weakly implemented\n", idInst);
-    
+
     EnterCriticalSection(&WDML_CritSect);
-    
+
     /*  First check instance
      */
     pInstance = WDML_GetInstance(idInst);
-    if  (pInstance == NULL) 
+    if  (pInstance == NULL)
     {
 	error_code = DMLERR_DLL_NOT_INITIALIZED;
     }
@@ -795,7 +795,7 @@
 	error_code = pInstance->lastError;
 	pInstance->lastError = 0;
     }
-    
+
     LeaveCriticalSection(&WDML_CritSect);
     return error_code;
 }
@@ -916,7 +916,7 @@
 	}
     }
     WARN("HSZ 0x%x not found\n", hsz);
-   
+
     return FALSE;
 }
 
@@ -968,7 +968,7 @@
  *
  *
  */
-static int	WDML_QueryString(WDML_INSTANCE* pInstance, HSZ hsz, LPVOID ptr, DWORD cchMax, 
+static int	WDML_QueryString(WDML_INSTANCE* pInstance, HSZ hsz, LPVOID ptr, DWORD cchMax,
 				 int codepage)
 {
     WCHAR	pString[MAX_BUFFER_LEN];
@@ -1003,12 +1003,12 @@
 {
     DWORD		ret = 0;
     WDML_INSTANCE*	pInstance;
-    
+
     TRACE("(%ld, 0x%x, %p, %ld, %d)\n", idInst, hsz, psz, cchMax, iCodePage);
-    
+
     EnterCriticalSection(&WDML_CritSect);
-    
-    /*  First check instance 
+
+    /*  First check instance
      */
     pInstance = WDML_GetInstance(idInst);
     if (pInstance != NULL)
@@ -1017,8 +1017,8 @@
 	ret = WDML_QueryString(pInstance, hsz, psz, cchMax, iCodePage);
     }
     LeaveCriticalSection(&WDML_CritSect);
-    
-    TRACE("returning %s\n", debugstr_a(psz)); 
+
+    TRACE("returning %s\n", debugstr_a(psz));
     return ret;
 }
 
@@ -1032,10 +1032,10 @@
     WDML_INSTANCE*	pInstance;
 
     TRACE("(%ld, 0x%x, %p, %ld, %d)\n", idInst, hsz, psz, cchMax, iCodePage);
-    
+
     EnterCriticalSection(&WDML_CritSect);
-    
-    /*  First check instance 
+
+    /*  First check instance
      */
     pInstance = WDML_GetInstance(idInst);
     if (pInstance != NULL)
@@ -1045,7 +1045,7 @@
     }
     LeaveCriticalSection(&WDML_CritSect);
 
-    TRACE("returning %s\n", debugstr_w(psz)); 
+    TRACE("returning %s\n", debugstr_w(psz));
     return ret;
 }
 
@@ -1087,20 +1087,20 @@
 {
     HSZ			hsz = 0;
     WDML_INSTANCE*	pInstance;
-    
+
     TRACE("(%ld,%p,%d)\n", idInst, psz, codepage);
-    
+
     EnterCriticalSection(&WDML_CritSect);
-    
+
     pInstance = WDML_GetInstance(idInst);
     if (pInstance)
     {
 	if (codepage == 0) codepage = CP_WINANSI;
 	hsz = WDML_CreateString(pInstance, psz, codepage);
-    } 
+    }
 
     LeaveCriticalSection(&WDML_CritSect);
-    return hsz;  
+    return hsz;
 }
 
 
@@ -1119,17 +1119,17 @@
 {
     WDML_INSTANCE*	pInstance;
     HSZ			hsz = 0;
-    
+
     TRACE("(%ld,%p,%d)\n", idInst, psz, codepage);
-    
+
     EnterCriticalSection(&WDML_CritSect);
-    
+
     pInstance = WDML_GetInstance(idInst);
     if (pInstance)
     {
 	if (codepage == 0) codepage = CP_WINUNICODE;
 	hsz = WDML_CreateString(pInstance, psz, codepage);
-    } 
+    }
     LeaveCriticalSection(&WDML_CritSect);
 
     return hsz;
@@ -1146,10 +1146,10 @@
     BOOL		ret = FALSE;
 
     TRACE("(%ld,0x%x): \n", idInst, hsz);
-    
+
     EnterCriticalSection(&WDML_CritSect);
-    
-    /*  First check instance 
+
+    /*  First check instance
      */
     pInstance = WDML_GetInstance(idInst);
     if (pInstance)
@@ -1172,9 +1172,9 @@
     BOOL		ret = FALSE;
 
     TRACE("(%ld,0x%x): \n", idInst, hsz);
-    
+
     EnterCriticalSection(&WDML_CritSect);
-    
+
     /*  First check instance
      */
     pInstance = WDML_GetInstance(idInst);
@@ -1202,12 +1202,12 @@
     WCHAR	psz2[MAX_BUFFER_LEN];
     int		ret = 0;
     int		ret1, ret2;
-    
+
     ret1 = GetAtomNameW((ATOM)hsz1, psz1, MAX_BUFFER_LEN);
     ret2 = GetAtomNameW((ATOM)hsz2, psz2, MAX_BUFFER_LEN);
 
     TRACE("(%x<%s> %x<%s>);\n", hsz1, debugstr_w(psz1), hsz2, debugstr_w(psz2));
-    
+
     /* Make sure we found both strings. */
     if (ret1 == 0 && ret2 == 0)
     {
@@ -1228,7 +1228,7 @@
     {
 	/* Compare the two strings we got (case insensitive). */
 	ret = lstrcmpiW(psz1, psz2);
-	/* Since strcmp returns any number smaller than 
+	/* Since strcmp returns any number smaller than
 	 * 0 when the first string is found to be less than
 	 * the second one we must make sure we are returning
 	 * the proper values.
@@ -1242,7 +1242,7 @@
 	    ret = 1;
 	}
     }
-    
+
     return ret;
 }
 
@@ -1255,20 +1255,20 @@
 /*****************************************************************
  *            DdeCreateDataHandle (USER32.@)
  */
-HDDEDATA WINAPI DdeCreateDataHandle(DWORD idInst, LPBYTE pSrc, DWORD cb, DWORD cbOff, 
+HDDEDATA WINAPI DdeCreateDataHandle(DWORD idInst, LPBYTE pSrc, DWORD cb, DWORD cbOff,
                                     HSZ hszItem, UINT wFmt, UINT afCmd)
 {
     /* For now, we ignore idInst, hszItem.
      * The purpose of these arguments still need to be investigated.
      */
-    
+
     HGLOBAL     		hMem;
     LPBYTE      		pByte;
     DDE_DATAHANDLE_HEAD*	pDdh;
-    
+
     TRACE("(%ld,%p,%ld,%ld,0x%lx,%d,%d)\n",
 	  idInst, pSrc, cb, cbOff, (DWORD)hszItem, wFmt, afCmd);
-    
+
     if (afCmd != 0 && afCmd != HDATA_APPOWNED)
         return 0;
 
@@ -1277,8 +1277,8 @@
     {
 	ERR("GlobalAlloc failed\n");
 	return 0;
-    }   
-    
+    }
+
     pDdh = (DDE_DATAHANDLE_HEAD*)GlobalLock(hMem);
     if (!pDdh)
     {
@@ -1295,7 +1295,7 @@
 	memcpy(pByte, pSrc + cbOff, cb);
     }
     GlobalUnlock(hMem);
-    
+
     return (HDDEDATA)hMem;
 }
 
@@ -1306,22 +1306,22 @@
 HDDEDATA WINAPI DdeAddData(HDDEDATA hData, LPBYTE pSrc, DWORD cb, DWORD cbOff)
 {
     DWORD	old_sz, new_sz;
-    LPBYTE	pDst; 
-    
+    LPBYTE	pDst;
+
     pDst = DdeAccessData(hData, &old_sz);
     if (!pDst) return 0;
-    
+
     new_sz = cb + cbOff;
     if (new_sz > old_sz)
     {
 	DdeUnaccessData(hData);
-	hData = GlobalReAlloc((HGLOBAL)hData, new_sz + sizeof(DDE_DATAHANDLE_HEAD), 
+	hData = GlobalReAlloc((HGLOBAL)hData, new_sz + sizeof(DDE_DATAHANDLE_HEAD),
 			      GMEM_MOVEABLE | GMEM_DDESHARE);
 	pDst = DdeAccessData(hData, &old_sz);
     }
-    
+
     if (!pDst) return 0;
-    
+
     memcpy(pDst + cbOff, pSrc, cb);
     DdeUnaccessData(hData);
     return hData;
@@ -1344,12 +1344,12 @@
 {
     DWORD   dwSize, dwRet;
     LPBYTE  pByte;
-    
+
     TRACE("(%08lx,%p,%ld,%ld)\n",(DWORD)hData, pDst, cbMax, cbOff);
-    
+
     pByte = DdeAccessData(hData, &dwSize);
-    
-    if (pByte) 
+
+    if (pByte)
     {
         if (!pDst)
         {
@@ -1387,16 +1387,16 @@
 {
     HGLOBAL			hMem = (HGLOBAL)hData;
     DDE_DATAHANDLE_HEAD*	pDdh;
-    
+
     TRACE("(%08lx,%p)\n", (DWORD)hData, pcbDataSize);
-    
+
     pDdh = (DDE_DATAHANDLE_HEAD*)GlobalLock(hMem);
     if (pDdh == NULL)
     {
 	ERR("Failed on GlobalLock(%04x)\n", hMem);
 	return 0;
     }
-    
+
     if (pcbDataSize != NULL)
     {
 	*pcbDataSize = GlobalSize(hMem) - sizeof(DDE_DATAHANDLE_HEAD);
@@ -1411,11 +1411,11 @@
 BOOL WINAPI DdeUnaccessData(HDDEDATA hData)
 {
     HGLOBAL hMem = (HGLOBAL)hData;
-    
+
     TRACE("(0x%lx)\n", (DWORD)hData);
-    
+
     GlobalUnlock(hMem);
-    
+
     return TRUE;
 }
 
@@ -1423,7 +1423,7 @@
  *            DdeFreeDataHandle   (USER32.@)
  */
 BOOL WINAPI DdeFreeDataHandle(HDDEDATA hData)
-{	
+{
     return GlobalFree((HGLOBAL)hData) == 0;
 }
 
@@ -1451,9 +1451,9 @@
  *                  Global <=> Data handle management
  *
  * ================================================================ */
- 
+
 /* Note: we use a DDEDATA, but layout of DDEDATA, DDEADVISE and DDEPOKE structures is similar:
- *    offset	  size 
+ *    offset	  size
  *    (bytes)	 (bits)	comment
  *	0	   16	bit fields for options (release, ackreq, response...)
  *	2	   16	clipboard format
@@ -1475,7 +1475,7 @@
             switch (pDd->cfFormat)
             {
             default:
-                FIXME("Unsupported format (%d) for data... assuming raw information\n", 
+                FIXME("Unsupported format (%d) for data... assuming raw information\n",
                       pDd->cfFormat);
                 /* fall thru */
             case 0:
@@ -1491,11 +1491,11 @@
                     {
                         HBITMAP hbmp;
 
-                        if ((hbmp = CreateBitmap(bmp->bmWidth, bmp->bmHeight, 
+                        if ((hbmp = CreateBitmap(bmp->bmWidth, bmp->bmHeight,
                                                  bmp->bmPlanes, bmp->bmBitsPixel,
                                                  pDd->Value + sizeof(BITMAP))))
                         {
-                            ret = DdeCreateDataHandle(0, (LPBYTE)&hbmp, sizeof(hbmp), 
+                            ret = DdeCreateDataHandle(0, (LPBYTE)&hbmp, sizeof(hbmp),
                                                       0, 0, CF_BITMAP, 0);
                         }
                         else ERR("Can't create bmp\n");
@@ -1512,25 +1512,25 @@
     }
     return ret;
 }
- 
+
 /******************************************************************
  *		WDML_DataHandle2Global
  *
  *
  */
-HGLOBAL WDML_DataHandle2Global(HDDEDATA hDdeData, BOOL fResponse, BOOL fRelease, 
+HGLOBAL WDML_DataHandle2Global(HDDEDATA hDdeData, BOOL fResponse, BOOL fRelease,
 			       BOOL fDeferUpd, BOOL fAckReq)
 {
     DDE_DATAHANDLE_HEAD*	pDdh;
     DWORD                       dwSize;
     HGLOBAL                     hMem = 0;
- 
+
     dwSize = GlobalSize((HGLOBAL)hDdeData) - sizeof(DDE_DATAHANDLE_HEAD);
     pDdh = (DDE_DATAHANDLE_HEAD*)GlobalLock((HGLOBAL)hDdeData);
     if (dwSize && pDdh)
     {
         WINE_DDEHEAD*    wdh = NULL;
- 
+
         switch (pDdh->cfFormat)
         {
         default:
@@ -1539,7 +1539,7 @@
         case 0:
         case CF_TEXT:
             hMem = GlobalAlloc(GMEM_MOVEABLE | GMEM_DDESHARE, sizeof(WINE_DDEHEAD) + dwSize);
-            if (hMem && (wdh = GlobalLock(hMem))) 
+            if (hMem && (wdh = GlobalLock(hMem)))
             {
                 memcpy(wdh + 1, pDdh + 1, dwSize);
             }
@@ -1554,9 +1554,9 @@
                 if (GetObjectA(hbmp, sizeof(bmp), &bmp))
                 {
                     count = bmp.bmWidthBytes * bmp.bmHeight;
-                    hMem = GlobalAlloc(GMEM_MOVEABLE | GMEM_DDESHARE, 
+                    hMem = GlobalAlloc(GMEM_MOVEABLE | GMEM_DDESHARE,
                                        sizeof(WINE_DDEHEAD) + sizeof(bmp) + count);
-                    if (hMem && (wdh = GlobalLock(hMem))) 
+                    if (hMem && (wdh = GlobalLock(hMem)))
                     {
                         memcpy(wdh + 1, &bmp, sizeof(bmp));
                         GetBitmapBits(hbmp, count, ((char*)(wdh + 1)) + sizeof(bmp));
@@ -1576,7 +1576,7 @@
         }
         GlobalUnlock((HGLOBAL)hDdeData);
     }
- 
+
     return hMem;
 }
 
@@ -1596,10 +1596,10 @@
     WDML_SERVER* 	pServer;
     char		buf1[256];
     char		buf2[256];
-    
+
     pServer = (WDML_SERVER*)HeapAlloc(GetProcessHeap(), 0, sizeof(WDML_SERVER));
     if (pServer == NULL) return NULL;
-    
+
     WDML_IncHSZ(pInstance, pServer->hszService = hszService);
 
     DdeQueryStringA(pInstance->instanceID, hszService, buf1, sizeof(buf1), CP_WINANSI);
@@ -1610,7 +1610,7 @@
     pServer->atomServiceSpec = WDML_MakeAtomFromHsz(pServer->hszServiceSpec);
 
     pServer->filterOn = TRUE;
-    
+
     pServer->next = pInstance->servers;
     pInstance->servers = pServer;
     return pServer;
@@ -1629,12 +1629,12 @@
     WDML_CONV*		pConvNext;
 
     pServer = pInstance->servers;
-    
+
     while (pServer != NULL)
     {
 	if (DdeCmpStringHandles(pServer->hszService, hszService) == 0)
 	{
-	    WDML_BroadcastDDEWindows(WDML_szEventClass, WM_WDML_UNREGISTER, 
+	    WDML_BroadcastDDEWindows(WDML_szEventClass, WM_WDML_UNREGISTER,
 				     pServer->atomService, pServer->atomServiceSpec);
 	    /* terminate all conversations for given topic */
 	    for (pConv = pInstance->convs[WDML_SERVER_SIDE]; pConv != NULL; pConv = pConvNext)
@@ -1655,7 +1655,7 @@
 	    {
 		pPrev->next = pServer->next;
 	    }
-	    
+
 	    DestroyWindow(pServer->hwndServer);
 	    WDML_DecHSZ(pInstance, pServer->hszServiceSpec);
 	    WDML_DecHSZ(pInstance, pServer->hszService);
@@ -1666,7 +1666,7 @@
 	    HeapFree(GetProcessHeap(), 0, pServer);
 	    break;
 	}
-	
+
 	pPrev = pServer;
 	pServer = pServer->next;
     }
@@ -1682,7 +1682,7 @@
 WDML_SERVER*	WDML_FindServer(WDML_INSTANCE* pInstance, HSZ hszService, HSZ hszTopic)
 {
     WDML_SERVER*	pServer;
-    
+
     for (pServer = pInstance->servers; pServer != NULL; pServer = pServer->next)
     {
 	if (hszService == pServer->hszService)
@@ -1709,7 +1709,7 @@
 			     HSZ hszService, HSZ hszTopic, HWND hwndClient, HWND hwndServer)
 {
     WDML_CONV*	pConv;
-    
+
     /* no converstation yet, add it */
     pConv = HeapAlloc(GetProcessHeap(), 0, sizeof(WDML_CONV));
     if (!pConv) return NULL;
@@ -1732,7 +1732,7 @@
 
     pConv->next = pInstance->convs[side];
     pInstance->convs[side] = pConv;
-    
+
     return pConv;
 }
 
@@ -1741,11 +1741,11 @@
  *
  *
  */
-WDML_CONV*	WDML_FindConv(WDML_INSTANCE* pInstance, WDML_SIDE side, 
+WDML_CONV*	WDML_FindConv(WDML_INSTANCE* pInstance, WDML_SIDE side,
 			      HSZ hszService, HSZ hszTopic)
 {
     WDML_CONV*	pCurrent = NULL;
-    
+
     for (pCurrent = pInstance->convs[side]; pCurrent != NULL; pCurrent = pCurrent->next)
     {
 	if (DdeCmpStringHandles(pCurrent->hszService, hszService) == 0 &&
@@ -1753,7 +1753,7 @@
 	{
 	    return pCurrent;
 	}
-	
+
     }
     return NULL;
 }
@@ -1810,7 +1810,7 @@
 	    {
 		pPrev->next = pCurrent->next;
 	    }
-	    
+
 	    HeapFree(GetProcessHeap(), 0, pCurrent);
 	    break;
 	}
@@ -1823,14 +1823,14 @@
 BOOL WINAPI DdeEnableCallback(DWORD idInst, HCONV hConv, UINT wCmd)
 {
     FIXME("(%ld, 0x%x, %d) stub\n", idInst, hConv, wCmd);
-    
+
     return 0;
 }
 
 /******************************************************************
  *		WDML_GetConv
  *
- * 
+ *
  */
 WDML_CONV*	WDML_GetConv(HCONV hConv, BOOL checkConnected)
 {
@@ -1867,7 +1867,7 @@
  *
  *
  */
-BOOL		WDML_PostAck(WDML_CONV* pConv, WDML_SIDE side, WORD appRetCode, 
+BOOL		WDML_PostAck(WDML_CONV* pConv, WDML_SIDE side, WORD appRetCode,
 			     BOOL fBusy, BOOL fAck, UINT pmt, LPARAM lParam, UINT oldMsg)
 {
     DDEACK	ddeAck;
@@ -1890,7 +1890,7 @@
     ddeAck.fAck           = fAck;
 
     TRACE("Posting a %s ack\n", ddeAck.fAck ? "positive" : "negative");
-		    
+
     lParam = (lParam) ? ReuseDDElParam(lParam, oldMsg, WM_DDE_ACK, *(WORD*)&ddeAck, pmt) :
         PackDDElParam(WM_DDE_ACK, *(WORD*)&ddeAck, pmt);
     if (!PostMessageA(to, WM_DDE_ACK, (WPARAM)from, lParam))
@@ -1918,7 +1918,7 @@
 	ret = FALSE;
 	goto theError;
     }
-    if (id == QID_SYNC) 
+    if (id == QID_SYNC)
     {
 	pConv->hUser = hUser;
     }
@@ -2069,11 +2069,11 @@
  *
  *
  */
-void WDML_AddLink(WDML_INSTANCE* pInstance, HCONV hConv, WDML_SIDE side, 
+void WDML_AddLink(WDML_INSTANCE* pInstance, HCONV hConv, WDML_SIDE side,
 		  UINT wType, HSZ hszItem, UINT wFmt)
 {
     WDML_LINK*	pLink;
-    
+
     pLink = HeapAlloc(GetProcessHeap(), 0, sizeof(WDML_LINK));
     if (pLink == NULL)
     {
@@ -2094,14 +2094,14 @@
  *
  *
  */
-void WDML_RemoveLink(WDML_INSTANCE* pInstance, HCONV hConv, WDML_SIDE side, 
+void WDML_RemoveLink(WDML_INSTANCE* pInstance, HCONV hConv, WDML_SIDE side,
 		     HSZ hszItem, UINT uFmt)
 {
     WDML_LINK* pPrev = NULL;
     WDML_LINK* pCurrent = NULL;
-    
+
     pCurrent = pInstance->links[side];
-    
+
     while (pCurrent != NULL)
     {
 	if (pCurrent->hConv == hConv &&
@@ -2116,19 +2116,19 @@
 	    {
 		pPrev->next = pCurrent->next;
 	    }
-	    
+
 	    WDML_DecHSZ(pInstance, pCurrent->hszItem);
 	    HeapFree(GetProcessHeap(), 0, pCurrent);
 	    break;
 	}
-	
+
 	pPrev = pCurrent;
 	pCurrent = pCurrent->next;
     }
 }
 
 /* this function is called to remove all links related to the conv.
-   It should be called from both client and server when terminating 
+   It should be called from both client and server when terminating
    the conversation.
 */
 /******************************************************************
@@ -2141,9 +2141,9 @@
     WDML_LINK* pPrev = NULL;
     WDML_LINK* pCurrent = NULL;
     WDML_LINK* pNext = NULL;
-    
+
     pCurrent = pInstance->links[side];
-    
+
     while (pCurrent != NULL)
     {
 	if (pCurrent->hConv == (HCONV)pConv)
@@ -2158,13 +2158,13 @@
 		pPrev->next = pCurrent->next;
 		pNext = pCurrent->next;
 	    }
-	    
+
 	    WDML_DecHSZ(pInstance, pCurrent->hszItem);
-	    
+
 	    HeapFree(GetProcessHeap(), 0, pCurrent);
 	    pCurrent = NULL;
 	}
-	
+
 	if (pCurrent)
 	{
 	    pPrev = pCurrent;
@@ -2182,24 +2182,24 @@
  *
  *
  */
-WDML_LINK* 	WDML_FindLink(WDML_INSTANCE* pInstance, HCONV hConv, WDML_SIDE side, 
+WDML_LINK* 	WDML_FindLink(WDML_INSTANCE* pInstance, HCONV hConv, WDML_SIDE side,
 			      HSZ hszItem, BOOL use_fmt, UINT uFmt)
 {
     WDML_LINK*	pCurrent = NULL;
-    
+
     for (pCurrent = pInstance->links[side]; pCurrent != NULL; pCurrent = pCurrent->next)
     {
 	/* we don't need to check for transaction type as it can be altered */
-	
+
 	if (pCurrent->hConv == hConv &&
 	    DdeCmpStringHandles(pCurrent->hszItem, hszItem) == 0 &&
 	    (!use_fmt || pCurrent->uFmt == uFmt))
 	{
 	    break;
 	}
-	
+
     }
-    
+
     return pCurrent;
 }
 
@@ -2221,7 +2221,7 @@
     static WORD		tid = 1;	/* FIXME: wrap around */
 
     pXAct = HeapAlloc(GetProcessHeap(), 0, sizeof(WDML_XACT));
-    if (!pXAct) 
+    if (!pXAct)
     {
 	pInstance->lastError = DMLERR_MEMORY_ERROR;
 	return NULL;
@@ -2250,7 +2250,7 @@
 void	WDML_QueueTransaction(WDML_CONV* pConv, WDML_XACT* pXAct)
 {
     WDML_XACT**	pt;
-    
+
     /* advance to last in queue */
     for (pt = &pConv->transactions; *pt != NULL; pt = &(*pt)->next);
     *pt = pXAct;
@@ -2301,7 +2301,7 @@
 WDML_XACT*	WDML_FindTransaction(WDML_CONV* pConv, DWORD tid)
 {
     WDML_XACT* pXAct;
-    
+
     tid = HIWORD(tid);
     for (pXAct = pConv->transactions; pXAct; pXAct = pXAct->next)
     {
diff --git a/dlls/user/dde/server.c b/dlls/user/dde/server.c
index 4ce6cc1..f4e8fc2 100644
--- a/dlls/user/dde/server.c
+++ b/dlls/user/dde/server.c
@@ -68,16 +68,16 @@
     UINT		count;
 
     TRACE("(%ld,0x%x,0x%x)\n", idInst, hszTopic, hszItem);
-    
+
     EnterCriticalSection(&WDML_CritSect);
 
     pInstance = WDML_GetInstance(idInst);
-    
+
     if (pInstance == NULL || pInstance->links == NULL)
     {
 	goto theError;
     }
-    
+
     atom = WDML_MakeAtomFromHsz(hszItem);
     if (!atom) goto theError;
 
@@ -102,7 +102,7 @@
 	{
 	    hDdeData = WDML_InvokeCallback(pInstance, XTYP_ADVREQ, pLink->uFmt, pLink->hConv,
 					   hszTopic, hszItem, 0, count--, 0);
-		
+
 	    if (hDdeData == (HDDEDATA)CBR_BLOCK)
 	    {
 		/* MS doc is not consistent here */
@@ -119,18 +119,18 @@
 		else
 		{
 		    TRACE("with data\n");
-		    
+
 		    hItemData = WDML_DataHandle2Global(hDdeData, FALSE, FALSE, FALSE, FALSE);
 		}
-		
+
 		pConv = WDML_GetConv(pLink->hConv, TRUE);
-		
+
 		if (pConv == NULL)
 		{
 		    if (!WDML_IsAppOwned(hDdeData))  DdeFreeDataHandle(hDdeData);
 		    goto theError;
 		}
-		
+
 		if (!PostMessageA(pConv->hwndClient, WM_DDE_DATA, (WPARAM)pConv->hwndServer,
 				  PackDDElParam(WM_DDE_DATA, (UINT)hItemData, atom)))
 		{
@@ -139,7 +139,7 @@
 		    if (!WDML_IsAppOwned(hDdeData))  DdeFreeDataHandle(hDdeData);
 		    GlobalFree(hItemData);
 		    goto theError;
-		}	
+		}
                 if (!WDML_IsAppOwned(hDdeData))  DdeFreeDataHandle(hDdeData);
 	    }
 	}
@@ -173,13 +173,13 @@
     HDDEDATA 		hDdeData;
     HWND 		hwndServer;
     WNDCLASSEXA  	wndclass;
-    
+
     hDdeData = (HDDEDATA)NULL;
-    
+
     TRACE("(%ld,0x%x,0x%x,%d)\n", idInst, hsz1, hsz2, afCmd);
-    
+
     EnterCriticalSection(&WDML_CritSect);
-    
+
     /*  First check instance
      */
     pInstance = WDML_GetInstance(idInst);
@@ -189,7 +189,7 @@
 	/*  Nothing has been initialised - exit now ! can return TRUE since effect is the same */
 	goto theError;
     }
-    
+
     if (hsz2 != 0L)
     {
 	/*	Illegal, reserved parameter
@@ -207,7 +207,7 @@
 	pInstance->lastError = DMLERR_INVALIDPARAMETER;
 	goto theError;
     }
-    
+
     switch (afCmd)
     {
     case DNS_REGISTER:
@@ -217,17 +217,17 @@
 	    ERR("Trying to register already registered service!\n");
 	    pInstance->lastError = DMLERR_DLL_USAGE;
 	    goto theError;
-	}	    
+	}
 
 	TRACE("Adding service name\n");
-	    
+
 	WDML_IncHSZ(pInstance, hsz1);
-	    
+
 	pServer = WDML_AddServer(pInstance, hsz1, 0);
-	    
-	WDML_BroadcastDDEWindows(WDML_szEventClass, WM_WDML_REGISTER, 
+
+	WDML_BroadcastDDEWindows(WDML_szEventClass, WM_WDML_REGISTER,
 				 pServer->atomService, pServer->atomServiceSpec);
-	
+
 	wndclass.cbSize        = sizeof(wndclass);
 	wndclass.style         = 0;
 	wndclass.lpfnWndProc   = WDML_ServerNameProc;
@@ -240,9 +240,9 @@
 	wndclass.lpszMenuName  = NULL;
 	wndclass.lpszClassName = szServerNameClassA;
 	wndclass.hIconSm       = 0;
-	
+
 	RegisterClassExA(&wndclass);
-	
+
 	LeaveCriticalSection(&WDML_CritSect);
 	hwndServer = CreateWindowA(szServerNameClassA, NULL,
 				   WS_POPUP, 0, 0, 0, 0,
@@ -252,7 +252,7 @@
 	SetWindowLongA(hwndServer, GWL_WDML_INSTANCE, (DWORD)pInstance);
 	SetWindowLongA(hwndServer, GWL_WDML_SERVER, (DWORD)pServer);
 	TRACE("Created nameServer=%04x for instance=%08lx\n", hwndServer, idInst);
-	
+
 	pServer->hwndServer = hwndServer;
 	break;
 
@@ -260,7 +260,7 @@
 	if (hsz1 == 0L)
 	{
 	    /* General unregister situation
-	     * terminate all server side pending conversations 
+	     * terminate all server side pending conversations
 	     */
 	    while (pInstance->servers)
 		WDML_RemoveServer(pInstance, pInstance->servers->hszService, 0);
@@ -283,8 +283,8 @@
 	     */
 	    pInstance->lastError = DMLERR_DLL_USAGE;
 	    goto theError;
-	} 
-	else 
+	}
+	else
 	{
 	    pServer->filterOn = (afCmd == DNS_FILTERON);
 	}
@@ -303,12 +303,12 @@
  *
  *
  */
-static WDML_CONV* WDML_CreateServerConv(WDML_INSTANCE* pInstance, HWND hwndClient, 
+static WDML_CONV* WDML_CreateServerConv(WDML_INSTANCE* pInstance, HWND hwndClient,
 					HWND hwndServerName, HSZ hszApp, HSZ hszTopic)
 {
     HWND	hwndServerConv;
     WDML_CONV*	pConv;
-    
+
     if (pInstance->unicode)
     {
 	WNDCLASSEXW	wndclass;
@@ -327,7 +327,7 @@
 	wndclass.hIconSm       = 0;
 
 	RegisterClassExW(&wndclass);
-    
+
 	hwndServerConv = CreateWindowW(WDML_szServerConvClassW, 0,
 				       WS_CHILD, 0, 0, 0, 0,
 				       hwndServerName, 0, 0, 0);
@@ -350,16 +350,16 @@
 	wndclass.hIconSm       = 0;
 
 	RegisterClassExA(&wndclass);
-    
+
 	hwndServerConv = CreateWindowA(WDML_szServerConvClassA, 0,
 				       WS_CHILD, 0, 0, 0, 0,
 				       hwndServerName, 0, 0, 0);
     }
 
-    TRACE("Created convServer=%04x (nameServer=%04x) for instance=%08lx\n", 
+    TRACE("Created convServer=%04x (nameServer=%04x) for instance=%08lx\n",
 	  hwndServerConv, hwndServerName, pInstance->instanceID);
-    
-    pConv = WDML_AddConv(pInstance, WDML_SERVER_SIDE, hszApp, hszTopic, 
+
+    pConv = WDML_AddConv(pInstance, WDML_SERVER_SIDE, hszApp, hszTopic,
 			 hwndClient, hwndServerConv);
     if (pConv)
     {
@@ -370,7 +370,7 @@
         /* note: sent messages shall not use packing */
 	SendMessageA(hwndClient, WM_DDE_ACK, (WPARAM)hwndServerConv,
 		     MAKELPARAM(WDML_MakeAtomFromHsz(hszApp), WDML_MakeAtomFromHsz(hszTopic)));
-	/* we assume we're connected since we've sent an answer... 
+	/* we assume we're connected since we've sent an answer...
 	 * I'm not sure what we can do... it doesn't look like the return value
 	 * of SendMessage is used... sigh...
 	 */
@@ -395,28 +395,28 @@
     HDDEDATA		hDdeData = 0;
     WDML_INSTANCE*	pInstance;
     UINT		uiLo, uiHi;
-    
+
     switch (iMsg)
     {
     case WM_DDE_INITIATE:
-	
+
 	/* wParam         -- sending window handle
 	   LOWORD(lParam) -- application atom
 	   HIWORD(lParam) -- topic atom */
-	
+
 	TRACE("WM_DDE_INITIATE message received!\n");
 	hwndClient = (HWND)wParam;
-	
+
 	pInstance = WDML_GetInstanceFromWnd(hwndServer);
 	TRACE("idInst=%ld, threadID=0x%lx\n", pInstance->instanceID, GetCurrentThreadId());
 	if (!pInstance) return 0;
 
 	/* don't free DDEParams, since this is a broadcast */
-	UnpackDDElParam(WM_DDE_INITIATE, lParam, &uiLo, &uiHi);	
-	
+	UnpackDDElParam(WM_DDE_INITIATE, lParam, &uiLo, &uiHi);
+
 	hszApp = WDML_MakeHszFromAtom(pInstance, uiLo);
 	hszTop = WDML_MakeHszFromAtom(pInstance, uiHi);
-	
+
 	if (!(pInstance->CBFflags & CBF_FAIL_CONNECTIONS))
 	{
 	    BOOL 		self = FALSE;
@@ -433,9 +433,9 @@
 	    /* FIXME: so far, we don't grab distant convcontext, so only check if remote is
 	     * handled under DDEML, and if so build a default context
 	     */
-	    if ((GetClassNameA(hwndClient, buf, sizeof(buf)) && 
+	    if ((GetClassNameA(hwndClient, buf, sizeof(buf)) &&
 		 strcmp(buf, WDML_szClientConvClassA) == 0) ||
-		(GetClassNameW(hwndClient, (LPWSTR)buf, sizeof(buf)/sizeof(WCHAR)) && 
+		(GetClassNameW(hwndClient, (LPWSTR)buf, sizeof(buf)/sizeof(WCHAR)) &&
 		 lstrcmpW((LPWSTR)buf, WDML_szClientConvClassW) == 0))
 	    {
 		pcc = &cc;
@@ -447,10 +447,10 @@
 	    {
 		TRACE("Don't do self connection as requested\n");
 	    }
-	    else if (hszApp && hszTop) 
+	    else if (hszApp && hszTop)
 	    {
 		WDML_SERVER*	pServer = (WDML_SERVER*)GetWindowLongA(hwndServer, GWL_WDML_SERVER);
-		
+
 		/* check filters for name service */
 		if (!pServer->filterOn || DdeCmpStringHandles(pServer->hszService, hszApp) == 0)
 		{
@@ -459,7 +459,7 @@
 						   0, 0, hszTop, hszApp, 0, (DWORD)pcc, self);
 		    if ((UINT)hDdeData)
 		    {
-			pConv = WDML_CreateServerConv(pInstance, hwndClient, hwndServer, 
+			pConv = WDML_CreateServerConv(pInstance, hwndClient, hwndServer,
 						      hszApp, hszTop);
 			if (pConv && pcc) pConv->wStatus |= ST_ISLOCAL;
 		    }
@@ -479,27 +479,27 @@
 		else if ((UINT)hDdeData != 0)
 		{
 		    HSZPAIR*	hszp;
-		
+
 		    hszp = (HSZPAIR*)DdeAccessData(hDdeData, NULL);
 		    if (hszp)
 		    {
 			int	i;
 			for (i = 0; hszp[i].hszSvc && hszp[i].hszTopic; i++)
 			{
-			    pConv = WDML_CreateServerConv(pInstance, hwndClient, hwndServer, 
+			    pConv = WDML_CreateServerConv(pInstance, hwndClient, hwndServer,
 							  hszp[i].hszSvc, hszp[i].hszTopic);
 			    if (pConv && pcc) pConv->wStatus |= ST_ISLOCAL;
-			}	
+			}
 			DdeUnaccessData(hDdeData);
 		    }
                     if (!WDML_IsAppOwned(hDdeData)) DdeFreeDataHandle(hDdeData);
 		}
 	    }
 	}
-	
+
 	return 0;
-	
-	
+
+
     case WM_DDE_REQUEST:
 	FIXME("WM_DDE_REQUEST message received!\n");
 	return 0;
@@ -520,7 +520,7 @@
 	return 0;
 
     }
-    
+
     return DefWindowProcA(hwndServer, iMsg, wParam, lParam);
 }
 
@@ -536,7 +536,7 @@
 
     UnpackDDElParam(WM_DDE_REQUEST, lParam, &uiLo, &uiHi);
 
-    pXAct = WDML_AllocTransaction(pConv->instance, WM_DDE_REQUEST, 
+    pXAct = WDML_AllocTransaction(pConv->instance, WM_DDE_REQUEST,
 				  uiLo, WDML_MakeHszFromAtom(pConv->instance, uiHi));
     if (pXAct) pXAct->atom = uiHi;
     return pXAct;
@@ -554,15 +554,15 @@
 
     if (!(pConv->instance->CBFflags & CBF_FAIL_REQUESTS))
     {
-	    
-	hDdeData = WDML_InvokeCallback(pConv->instance, XTYP_REQUEST, pXAct->wFmt, (HCONV)pConv, 
+
+	hDdeData = WDML_InvokeCallback(pConv->instance, XTYP_REQUEST, pXAct->wFmt, (HCONV)pConv,
 				       pConv->hszTopic, pXAct->hszItem, 0, 0, 0);
     }
 
     switch ((DWORD)hDdeData)
     {
     case 0:
-	WDML_PostAck(pConv, WDML_SERVER_SIDE, 0, FALSE, FALSE, pXAct->atom, 
+	WDML_PostAck(pConv, WDML_SERVER_SIDE, 0, FALSE, FALSE, pXAct->atom,
                      pXAct->lParam, WM_DDE_REQUEST);
 	break;
     case CBR_BLOCK:
@@ -572,7 +572,7 @@
         {
 	    HGLOBAL	hMem = WDML_DataHandle2Global(hDdeData, FALSE, FALSE, FALSE, FALSE);
 	    if (!PostMessageA(pConv->hwndClient, WM_DDE_DATA, (WPARAM)pConv->hwndServer,
-			      ReuseDDElParam(pXAct->lParam, WM_DDE_REQUEST, WM_DDE_DATA, 
+			      ReuseDDElParam(pXAct->lParam, WM_DDE_REQUEST, WM_DDE_DATA,
 					     (UINT)hMem, (UINT)pXAct->atom)))
 	    {
 		DdeFreeDataHandle(hDdeData);
@@ -595,13 +595,13 @@
     UINT		uiLo, uiHi;
     WDML_XACT*		pXAct;
 
-    /* XTYP_ADVSTART transaction: 
+    /* XTYP_ADVSTART transaction:
        establish link and save link info to InstanceInfoTable */
-	
+
     if (!UnpackDDElParam(WM_DDE_ADVISE, lParam, &uiLo, &uiHi))
 	return NULL;
-	
-    pXAct = WDML_AllocTransaction(pConv->instance, WM_DDE_ADVISE, 
+
+    pXAct = WDML_AllocTransaction(pConv->instance, WM_DDE_ADVISE,
 				  0, WDML_MakeHszFromAtom(pConv->instance, uiHi));
     if (pXAct)
     {
@@ -625,13 +625,13 @@
     BOOL		fAck;
 
     pDdeAdvise = (DDEADVISE*)GlobalLock(pXAct->hMem);
-    uType = XTYP_ADVSTART | 
+    uType = XTYP_ADVSTART |
 	    (pDdeAdvise->fDeferUpd ? XTYPF_NODATA : 0) |
 	    (pDdeAdvise->fAckReq ? XTYPF_ACKREQ : 0);
-	
+
     if (!(pConv->instance->CBFflags & CBF_FAIL_ADVISES))
     {
-	hDdeData = WDML_InvokeCallback(pConv->instance, XTYP_ADVSTART, pDdeAdvise->cfFormat, 
+	hDdeData = WDML_InvokeCallback(pConv->instance, XTYP_ADVSTART, pDdeAdvise->cfFormat,
 				       (HCONV)pConv, pConv->hszTopic, pXAct->hszItem, 0, 0, 0);
     }
     else
@@ -642,9 +642,9 @@
     if ((UINT)hDdeData)
     {
 	fAck           = TRUE;
-	
+
 	/* billx: first to see if the link is already created. */
-	pLink = WDML_FindLink(pConv->instance, (HCONV)pConv, WDML_SERVER_SIDE, 
+	pLink = WDML_FindLink(pConv->instance, (HCONV)pConv, WDML_SERVER_SIDE,
 			      pXAct->hszItem, TRUE, pDdeAdvise->cfFormat);
 
 	if (pLink != NULL)
@@ -655,7 +655,7 @@
 	else
 	{
 	    TRACE("Adding Link with hConv=0x%lx\n", (DWORD)pConv);
-	    WDML_AddLink(pConv->instance, (HCONV)pConv, WDML_SERVER_SIDE, 
+	    WDML_AddLink(pConv->instance, (HCONV)pConv, WDML_SERVER_SIDE,
 			 uType, pXAct->hszItem, pDdeAdvise->cfFormat);
 	}
     }
@@ -664,7 +664,7 @@
 	TRACE("No data returned from the Callback\n");
 	fAck = FALSE;
     }
-	
+
     GlobalUnlock(pXAct->hMem);
     if (fAck)
     {
@@ -690,8 +690,8 @@
     WDML_XACT*		pXAct;
 
     UnpackDDElParam(WM_DDE_UNADVISE, lParam, &uiLo, &uiHi);
-	
-    pXAct = WDML_AllocTransaction(pConv->instance, WM_DDE_UNADVISE, 
+
+    pXAct = WDML_AllocTransaction(pConv->instance, WM_DDE_UNADVISE,
 				  uiLo, WDML_MakeHszFromAtom(pConv->instance, uiHi));
     if (pXAct) pXAct->atom = uiHi;
     return pXAct;
@@ -712,7 +712,7 @@
 	return WDML_QS_ERROR;
     }
 
-    pLink = WDML_FindLink(pConv->instance, (HCONV)pConv, WDML_SERVER_SIDE, 
+    pLink = WDML_FindLink(pConv->instance, (HCONV)pConv, WDML_SERVER_SIDE,
 			  pXAct->hszItem, TRUE, pXAct->wFmt);
     if (pLink == NULL)
     {
@@ -723,17 +723,17 @@
 
     if (!(pConv->instance->CBFflags & CBF_FAIL_ADVISES))
     {
-	WDML_InvokeCallback(pConv->instance, XTYP_ADVSTOP, pXAct->wFmt, (HCONV)pConv, 
+	WDML_InvokeCallback(pConv->instance, XTYP_ADVSTOP, pXAct->wFmt, (HCONV)pConv,
 			    pConv->hszTopic, pXAct->hszItem, 0, 0, 0);
     }
-	
-    WDML_RemoveLink(pConv->instance, (HCONV)pConv, WDML_SERVER_SIDE, 
+
+    WDML_RemoveLink(pConv->instance, (HCONV)pConv, WDML_SERVER_SIDE,
 		    pXAct->hszItem, pXAct->wFmt);
-	
+
     /* send back ack */
-    WDML_PostAck(pConv, WDML_SERVER_SIDE, 0, FALSE, TRUE, pXAct->atom, 
+    WDML_PostAck(pConv, WDML_SERVER_SIDE, 0, FALSE, TRUE, pXAct->atom,
                  pXAct->lParam, WM_DDE_UNADVISE);
-	
+
     WDML_DecHSZ(pConv->instance, pXAct->hszItem);
 
     return WDML_QS_HANDLED;
@@ -753,7 +753,7 @@
     {
 	pXAct->hMem    = (HGLOBAL)lParam;
     }
-    return pXAct;    
+    return pXAct;
 }
 
  /******************************************************************
@@ -769,33 +769,33 @@
     if (!(pConv->instance->CBFflags & CBF_FAIL_EXECUTES))
     {
 	LPVOID	ptr = GlobalLock(pXAct->hMem);
-	
+
 	if (ptr)
 	{
 	    hDdeData = DdeCreateDataHandle(0, ptr, GlobalSize(pXAct->hMem),
 					   0, 0, CF_TEXT, 0);
 	    GlobalUnlock(pXAct->hMem);
-	}  
-	hDdeData = WDML_InvokeCallback(pConv->instance, XTYP_EXECUTE, 0, (HCONV)pConv, 
+	}
+	hDdeData = WDML_InvokeCallback(pConv->instance, XTYP_EXECUTE, 0, (HCONV)pConv,
 				       pConv->hszTopic, 0, hDdeData, 0L, 0L);
     }
-	
+
     switch ((UINT)hDdeData)
     {
-    case DDE_FACK:	
-	fAck = TRUE;	
+    case DDE_FACK:
+	fAck = TRUE;
 	break;
-    case DDE_FBUSY:	
-	fBusy = TRUE;	
+    case DDE_FBUSY:
+	fBusy = TRUE;
 	break;
-    default:	
+    default:
 	WARN("Bad result code\n");
 	/* fall through */
-    case DDE_FNOTPROCESSED:				
+    case DDE_FNOTPROCESSED:
 	break;
-    }	
+    }
     WDML_PostAck(pConv, WDML_SERVER_SIDE, 0, fBusy, fAck, pXAct->hMem, 0, 0);
-	
+
     return WDML_QS_HANDLED;
 }
 
@@ -811,7 +811,7 @@
 
     UnpackDDElParam(WM_DDE_POKE, lParam, &uiLo, &uiHi);
 
-    pXAct = WDML_AllocTransaction(pConv->instance, WM_DDE_POKE, 
+    pXAct = WDML_AllocTransaction(pConv->instance, WM_DDE_POKE,
 				  0, WDML_MakeHszFromAtom(pConv->instance, uiHi));
     if (pXAct)
     {
@@ -840,20 +840,20 @@
 
     if (!(pConv->instance->CBFflags & CBF_FAIL_POKES))
     {
-	hDdeData = DdeCreateDataHandle(pConv->instance->instanceID, pDdePoke->Value, 
-				       GlobalSize(pXAct->hMem) - sizeof(DDEPOKE) + 1, 
+	hDdeData = DdeCreateDataHandle(pConv->instance->instanceID, pDdePoke->Value,
+				       GlobalSize(pXAct->hMem) - sizeof(DDEPOKE) + 1,
 				       0, 0, pDdePoke->cfFormat, 0);
-	if (hDdeData) 
+	if (hDdeData)
 	{
 	    HDDEDATA	hDdeDataOut;
-	    
-	    hDdeDataOut = WDML_InvokeCallback(pConv->instance, XTYP_POKE, pDdePoke->cfFormat, 
-					      (HCONV)pConv, pConv->hszTopic, pXAct->hszItem, 
+
+	    hDdeDataOut = WDML_InvokeCallback(pConv->instance, XTYP_POKE, pDdePoke->cfFormat,
+					      (HCONV)pConv, pConv->hszTopic, pXAct->hszItem,
 					      hDdeData, 0, 0);
-	    switch ((UINT)hDdeDataOut) 
+	    switch ((UINT)hDdeDataOut)
 	    {
 	    case DDE_FACK:
-		fAck = TRUE;	
+		fAck = TRUE;
 		break;
 	    case DDE_FBUSY:
 		fBusy = TRUE;
@@ -861,14 +861,14 @@
 	    default:
 		FIXME("Unsupported returned value %08lx\n", (DWORD)hDdeDataOut);
 		/* fal through */
-	    case DDE_FNOTPROCESSED:				
+	    case DDE_FNOTPROCESSED:
 		break;
 	    }
 	    DdeFreeDataHandle(hDdeData);
 	}
     }
     GlobalUnlock(pXAct->hMem);
-    
+
     if (!fAck)
     {
 	GlobalFree(pXAct->hMem);
@@ -905,12 +905,12 @@
      */
     if (!(pConv->instance->CBFflags & CBF_SKIP_DISCONNECTS))
     {
-	WDML_InvokeCallback(pConv->instance, XTYP_DISCONNECT, 0, (HCONV)pConv, 0, 0, 
+	WDML_InvokeCallback(pConv->instance, XTYP_DISCONNECT, 0, (HCONV)pConv, 0, 0,
 			    0, 0, (pConv->wStatus & ST_ISSELF) ? 1 : 0);
     }
     PostMessageA(pConv->hwndClient, WM_DDE_TERMINATE, (WPARAM)pConv->hwndServer, 0);
     WDML_RemoveConv(pConv, WDML_SERVER_SIDE);
-	
+
     return WDML_QS_HANDLED;
 }
 
@@ -931,23 +931,23 @@
     case WM_DDE_REQUEST:
 	qs = WDML_ServerHandleRequest(pConv, pXAct);
 	break;
-		
+
     case WM_DDE_ADVISE:
 	qs = WDML_ServerHandleAdvise(pConv, pXAct);
 	break;
-	
+
     case WM_DDE_UNADVISE:
 	qs = WDML_ServerHandleUnadvise(pConv, pXAct);
 	break;
-	
+
     case WM_DDE_EXECUTE:
 	qs = WDML_ServerHandleExecute(pConv, pXAct);
 	break;
-	
+
     case WM_DDE_POKE:
 	qs = WDML_ServerHandlePoke(pConv, pXAct);
 	break;
-	
+
     case WM_DDE_TERMINATE:
 	qs = WDML_ServerHandleTerminate(pConv, pXAct);
 	break;
@@ -993,7 +993,7 @@
     pInstance = WDML_GetInstanceFromWnd(hwndServer);
     pConv = WDML_GetConvFromWnd(hwndServer);
 
-    if (!pConv) 
+    if (!pConv)
     {
 	ERR("Got a message (%u) on a not known conversation, dropping request\n", iMsg);
 	goto theError;
@@ -1014,27 +1014,27 @@
     case WM_DDE_INITIATE:
 	FIXME("WM_DDE_INITIATE message received!\n");
 	break;
-	
+
     case WM_DDE_REQUEST:
 	pXAct = WDML_ServerQueueRequest(pConv, lParam);
 	break;
-		
+
     case WM_DDE_ADVISE:
 	pXAct = WDML_ServerQueueAdvise(pConv, lParam);
 	break;
-	
+
     case WM_DDE_UNADVISE:
 	pXAct = WDML_ServerQueueUnadvise(pConv, lParam);
 	break;
-	
+
     case WM_DDE_EXECUTE:
 	pXAct = WDML_ServerQueueExecute(pConv, lParam);
 	break;
-	
+
     case WM_DDE_POKE:
 	pXAct = WDML_ServerQueuePoke(pConv, lParam);
 	break;
-	
+
     case WM_DDE_TERMINATE:
 	pXAct = WDML_ServerQueueTerminate(pConv, lParam);
 	break;
@@ -1046,8 +1046,8 @@
     default:
 	FIXME("Unsupported message %d\n", iMsg);
     }
-    
-    if (pXAct) 
+
+    if (pXAct)
     {
 	pXAct->lParam = lParam;
 	if (WDML_ServerHandle(pConv, pXAct) == WDML_QS_BLOCK)
diff --git a/dlls/user/display.c b/dlls/user/display.c
index 98b8c01..871885c 100644
--- a/dlls/user/display.c
+++ b/dlls/user/display.c
@@ -36,7 +36,7 @@
 /***********************************************************************
  *           Inquire			(DISPLAY.101)
  */
-WORD WINAPI DISPLAY_Inquire(LPCURSORINFO lpCursorInfo) 
+WORD WINAPI DISPLAY_Inquire(LPCURSORINFO lpCursorInfo)
 {
     lpCursorInfo->wXMickeys = 1;
     lpCursorInfo->wYMickeys = 1;
diff --git a/dlls/user/exticon.c b/dlls/user/exticon.c
index c703190..8200c0d 100644
--- a/dlls/user/exticon.c
+++ b/dlls/user/exticon.c
@@ -3,7 +3,7 @@
  *
  * taken and slightly changed from shell
  * this should replace the icon extraction code in shell32 and shell16 once
- * it needs a serious test for compliance with the native API 
+ * it needs a serious test for compliance with the native API
  *
  * Copyright 2000 Juergen Schmied
  *
@@ -66,14 +66,14 @@
 
 #if 0
 static void dumpIcoDirEnty ( LPicoICONDIRENTRY entry )
-{	
+{
 	TRACE("width = 0x%08x height = 0x%08x\n", entry->bWidth, entry->bHeight);
 	TRACE("colors = 0x%08x planes = 0x%08x\n", entry->bColorCount, entry->wPlanes);
-	TRACE("bitcount = 0x%08x bytesinres = 0x%08lx offset = 0x%08lx\n", 
+	TRACE("bitcount = 0x%08x bytesinres = 0x%08lx offset = 0x%08lx\n",
 	entry->wBitCount, entry->dwBytesInRes, entry->dwImageOffset);
 }
 static void dumpIcoDir ( LPicoICONDIR entry )
-{	
+{
 	TRACE("type = 0x%08x count = 0x%08x\n", entry->idType, entry->idCount);
 }
 #endif
@@ -125,12 +125,12 @@
 {
 	IMAGE_DOS_HEADER	* mz_header;
 
-	TRACE("%p %p\n", peimage, retptr);  
+	TRACE("%p %p\n", peimage, retptr);
 
 	*retptr = NULL;
 
 	mz_header = (IMAGE_DOS_HEADER*) peimage;
-	
+
 	if (mz_header->e_magic != IMAGE_DOS_SIGNATURE)
 	{
 	  if (mz_header->e_cblp == 1)	/* .ICO file ? */
@@ -152,7 +152,7 @@
 	  IMAGE_OS2_HEADER	* ne_header;
 
 	  ne_header = (IMAGE_OS2_HEADER*)(peimage + mz_header->e_lfanew);
-	  
+
 	  if (ne_header->ne_magic != IMAGE_OS2_SIGNATURE)
 	    return 0;
 
@@ -196,14 +196,14 @@
 #define HEADER_SIZE		(sizeof(CURSORICONDIR) - sizeof (CURSORICONDIRENTRY))
 #define HEADER_SIZE_FILE	(sizeof(icoICONDIR) - sizeof (icoICONDIRENTRY))
 
-static BYTE * ICO_GetIconDirectory( LPBYTE peimage, LPicoICONDIR* lplpiID, ULONG *uSize ) 
+static BYTE * ICO_GetIconDirectory( LPBYTE peimage, LPicoICONDIR* lplpiID, ULONG *uSize )
 {
 	CURSORICONDIR	* lpcid;	/* icon resource in resource-dir format */
 	CURSORICONDIR	* lpID;		/* icon resource in resource format */
 	int		i;
 
-	TRACE("%p %p\n", peimage, lplpiID); 
-	
+	TRACE("%p %p\n", peimage, lplpiID);
+
 	lpcid = (CURSORICONDIR*)peimage;
 
 	if( lpcid->idReserved || (lpcid->idType != 1) || (!lpcid->idCount) )
@@ -257,7 +257,7 @@
 	HANDLE		fmapping;
 	ULONG		uSize;
 	DWORD		fsizeh,fsizel;
-	
+
 	TRACE("(file %s,start %d,extract %d\n", debugstr_w(lpszExeFileName), nIconIndex, nIcons);
 
 	hFile = CreateFileW( lpszExeFileName, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, 0 );
@@ -273,7 +273,7 @@
 	  return hRet;
 	}
 
-	if ( !(peimage = MapViewOfFile(fmapping,FILE_MAP_READ,0,0,0))) 
+	if ( !(peimage = MapViewOfFile(fmapping,FILE_MAP_READ,0,0,0)))
 	{
 	  WARN("MapViewOfFile error %ld\n", GetLastError() );
           CloseHandle( fmapping );
@@ -312,7 +312,7 @@
 	      pIconDir = ((NE_NAMEINFO*)(pTInfo + 1));
 	      TRACE("\tfound directory - %i icon families\n", iconDirCount);
 	    }
-	    if( pTInfo->type_id == NE_RSCTYPE_ICON ) 
+	    if( pTInfo->type_id == NE_RSCTYPE_ICON )
 	    {
 	      iconCount = pTInfo->count;
 	      pIconStorage = ((NE_NAMEINFO*)(pTInfo + 1));
@@ -330,10 +330,10 @@
 	    else if( nIconIndex < iconDirCount )
 	    {
 	      UINT16   i, icon;
-	      if( nIcons > iconDirCount - nIconIndex ) 
+	      if( nIcons > iconDirCount - nIconIndex )
 	        nIcons = iconDirCount - nIconIndex;
 
-	      for( i = nIconIndex; i < nIconIndex + nIcons; i++ ) 
+	      for( i = nIconIndex; i < nIconIndex + nIcons; i++ )
 	      {
 	        /* .ICO files have only one icon directory */
 	        if( lpiID == NULL )	/* *.ico */
@@ -359,7 +359,7 @@
 	      hRet = S_OK;
 	    }
 	  }
-	} 
+	}
 /* end ico file */
 
 /* exe/dll */
@@ -373,14 +373,14 @@
 	  const IMAGE_RESOURCE_DATA_ENTRY *idataent,*igdataent;
 	  const IMAGE_RESOURCE_DIRECTORY_ENTRY *xresent;
 	  int			i,j;
-		  
+
 	  dheader = (PIMAGE_DOS_HEADER)peimage;
 	  pe_header = (PIMAGE_NT_HEADERS)(peimage+dheader->e_lfanew);	  /* it is a pe header, USER32_GetResourceTable checked that */
 	  pe_sections = (PIMAGE_SECTION_HEADER)(((char*)pe_header)+sizeof(*pe_header));	/* probably makes problems with short PE headers...*/
 	  rootresdir = NULL;
 
 	  /* search for the root resource directory */
-	  for (i=0;i<pe_header->FileHeader.NumberOfSections;i++) 
+	  for (i=0;i<pe_header->FileHeader.NumberOfSections;i++)
 	  {
 	    if (pe_sections[i].Characteristics & IMAGE_SCN_CNT_UNINITIALIZED_DATA)
 	      continue;
@@ -393,21 +393,21 @@
 	      goto end;
 	    }
 	    /* FIXME: doesn't work when the resources are not in a separate section */
-	    if (pe_sections[i].VirtualAddress == pe_header->OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_RESOURCE].VirtualAddress) 
+	    if (pe_sections[i].VirtualAddress == pe_header->OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_RESOURCE].VirtualAddress)
 	    {
 	      rootresdir = (PIMAGE_RESOURCE_DIRECTORY)(peimage+pe_sections[i].PointerToRawData);
 	      break;
 	    }
 	  }
 
-	  if (!rootresdir) 
+	  if (!rootresdir)
 	  {
 	    WARN("haven't found section for resource directory.\n");
 	    goto end;		/* failure */
 	  }
 
 	  /* search for the group icon directory */
-	  if (!(icongroupresdir = find_entry_by_id(rootresdir, LOWORD(RT_GROUP_ICONW), rootresdir))) 
+	  if (!(icongroupresdir = find_entry_by_id(rootresdir, LOWORD(RT_GROUP_ICONW), rootresdir)))
 	  {
 	    WARN("No Icongroupresourcedirectory!\n");
 	    goto end;		/* failure */
@@ -429,14 +429,14 @@
 	    PIMAGE_RESOURCE_DIRECTORY_ENTRY xprdeTmp = (PIMAGE_RESOURCE_DIRECTORY_ENTRY)(icongroupresdir+1);
 
 	    while(n<iconDirCount && xprdeTmp)
-	    {              
+	    {
               if(xprdeTmp->u1.s2.Id ==  iId)
               {
                   nIconIndex = n;
                   break;
               }
               n++;
-              xprdeTmp++;                  
+              xprdeTmp++;
 	    }
 	    if (nIconIndex < 0)
 	    {
@@ -447,7 +447,7 @@
 	  else
 	  {
 	    /* check nIconIndex to be in range */
-	    if (nIconIndex >= iconDirCount) 
+	    if (nIconIndex >= iconDirCount)
 	    {
 	      WARN("nIconIndex %d is larger than iconDirCount %d\n",nIconIndex,iconDirCount);
 	      goto end;		/* failure */
@@ -461,7 +461,7 @@
 	  /* starting from specified index */
 	  xresent = (PIMAGE_RESOURCE_DIRECTORY_ENTRY)(icongroupresdir+1) + nIconIndex;
 
-	  for (i=0; i < nIcons; i++,xresent++) 
+	  for (i=0; i < nIcons; i++,xresent++)
 	  {
               const IMAGE_RESOURCE_DIRECTORY *resdir;
 
@@ -475,7 +475,7 @@
 	    /* lookup address in mapped image for virtual address */
 	    igdata = NULL;
 
-	    for (j=0;j<pe_header->FileHeader.NumberOfSections;j++) 
+	    for (j=0;j<pe_header->FileHeader.NumberOfSections;j++)
 	    {
 	      if (igdataent->OffsetToData < pe_sections[j].VirtualAddress)
 	        continue;
@@ -489,7 +489,7 @@
 	      igdata = peimage+(igdataent->OffsetToData-pe_sections[j].VirtualAddress+pe_sections[j].PointerToRawData);
 	    }
 
-	    if (!igdata) 
+	    if (!igdata)
 	    {
 	      FIXME("no matching real address for icongroup!\n");
 	      goto end;	/* failure */
@@ -503,7 +503,7 @@
 	    goto end;		/* failure */
 	  }
 
-	  for (i=0; i<nIcons; i++) 
+	  for (i=0; i<nIcons; i++)
 	  {
               const IMAGE_RESOURCE_DIRECTORY *xresdir;
               xresdir = find_entry_by_id(iconresdir,RetPtr[i],rootresdir);
@@ -512,7 +512,7 @@
 	    idata = NULL;
 
 	    /* map virtual to address in image */
-	    for (j=0;j<pe_header->FileHeader.NumberOfSections;j++) 
+	    for (j=0;j<pe_header->FileHeader.NumberOfSections;j++)
 	    {
 	      if (idataent->OffsetToData < pe_sections[j].VirtualAddress)
 	        continue;
@@ -520,7 +520,7 @@
 	        continue;
 	      idata = peimage+(idataent->OffsetToData-pe_sections[j].VirtualAddress+pe_sections[j].PointerToRawData);
 	    }
-	    if (!idata) 
+	    if (!idata)
 	    {
 	      WARN("no matching real address found for icondata!\n");
 	      RetPtr[i]=0;
@@ -539,7 +539,7 @@
  *           PrivateExtractIconsW			[USER32.@]
  *
  * NOTES
- *  nIndex = 1: a small and a large icon are extracted. 
+ *  nIndex = 1: a small and a large icon are extracted.
  *  the higher word of sizeXY contains the size of the small icon, the lower
  *  word the size of the big icon. phicon points to HICON[2].
  *
@@ -548,7 +548,7 @@
  *  nIcons = 0: the number of icons
  */
 
-HRESULT WINAPI PrivateExtractIconsW ( 
+HRESULT WINAPI PrivateExtractIconsW (
 	LPCWSTR lpwstrFile,
 	int nIndex,
 	DWORD sizeX,
@@ -576,7 +576,7 @@
  *           PrivateExtractIconsA			[USER32.@]
  */
 
-HRESULT WINAPI PrivateExtractIconsA ( 
+HRESULT WINAPI PrivateExtractIconsA (
 	LPCSTR lpstrFile,
 	INT nIndex,
 	DWORD sizeX,
@@ -616,7 +616,7 @@
 
 	TRACE("%s 0x%08lx %p %p 0x%08x\n",
 	debugstr_w(lpwstrFile),nIndex,phIconLarge, phIconSmall, nIcons);
-	
+
 	if (nIndex == 1 && phIconSmall && phIconLarge)
 	{
 	  HICON hIcon[2];
@@ -624,7 +624,7 @@
 	  cyicon = GetSystemMetrics(SM_CYICON);
 	  cxsmicon = GetSystemMetrics(SM_CXSMICON);
 	  cysmicon = GetSystemMetrics(SM_CYSMICON);
-	
+
 	  ret = PrivateExtractIconsW ( lpwstrFile, nIndex, cxicon | (cxsmicon<<16),  cyicon | (cysmicon<<16),
 	  (HICON*) &hIcon, 0, 2, 0 );
 	  *phIconLarge = hIcon[0];
diff --git a/dlls/user/lstr.c b/dlls/user/lstr.c
index 5d45dba..a7f0515 100644
--- a/dlls/user/lstr.c
+++ b/dlls/user/lstr.c
@@ -612,7 +612,7 @@
 		&&((dwFlags & FORMAT_MESSAGE_FROM_SYSTEM)
 			|| (dwFlags & FORMAT_MESSAGE_FROM_HMODULE))) return 0;
 
-    if (width && width != FORMAT_MESSAGE_MAX_WIDTH_MASK) 
+    if (width && width != FORMAT_MESSAGE_MAX_WIDTH_MASK)
         FIXME("line wrapping (%lu) not supported.\n", width);
     from = NULL;
     if (dwFlags & FORMAT_MESSAGE_FROM_STRING)
@@ -702,9 +702,9 @@
 			int	ret;
 		        int	sz;
 			LPSTR	b = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sz = 100);
-			
+
 			argliststart=args+insertnr-1;
-		       
+
 			/* CMF - This makes a BIG assumption about va_list */
 			while ((ret = vsnprintf(b, sz, fmtstr, (va_list) argliststart) < 0) || (ret >= sz)) {
 			    sz = (ret == -1 ? sz + 100 : ret + 1);
@@ -712,7 +712,7 @@
 			}
 			for (x=b; *x; x++) ADD_TO_T(*x);
 		    } else {
-		        /* NULL args - copy formatstr 
+		        /* NULL args - copy formatstr
 			 * (probably wrong)
 			 */
 		        while ((lastf<f)&&(*lastf)) {
@@ -762,7 +762,7 @@
         lstrcpynA(lpBuffer,target,nSize);
     HeapFree(GetProcessHeap(),0,target);
     if (from) HeapFree(GetProcessHeap(),0,from);
-    return (dwFlags & FORMAT_MESSAGE_ALLOCATE_BUFFER) ? 
+    return (dwFlags & FORMAT_MESSAGE_ALLOCATE_BUFFER) ?
         strlen(allocstring):
 	strlen(lpBuffer);
 #else
diff --git a/dlls/user/message.c b/dlls/user/message.c
index 4b9b0ad..0f5b66b 100644
--- a/dlls/user/message.c
+++ b/dlls/user/message.c
@@ -1070,7 +1070,7 @@
  * to the memory handle, we keep track (in the server side) of all pairs of handle
  * used (the client passes its value and the content of the memory handle), and
  * the server stored both values (the client, and the local one, created after the
- * content). When a ACK message is generated, the list of pair is searched for a 
+ * content). When a ACK message is generated, the list of pair is searched for a
  * matching pair, so that the client memory handle can be returned.
  */
 struct DDE_pair {
@@ -1202,7 +1202,7 @@
             return FALSE;
         }
         else if (info->msg != WM_DDE_DATA) return FALSE;
-        
+
         lp = uiHi;
         if (uiLo)
         {
@@ -1237,7 +1237,7 @@
         req->lparam  = lp;
         req->time    = GetCurrentTime();
         req->timeout = -1;
-        for (i = 0; i < data->count; i++) 
+        for (i = 0; i < data->count; i++)
             wine_server_add_data( req, data->data[i], data->size[i] );
         if ((res = wine_server_call( req )))
         {
@@ -1246,8 +1246,8 @@
                 SetLastError( ERROR_INVALID_THREAD_ID );
             else
                 SetLastError( RtlNtStatusToDosError(res) );
-        }   
-        else 
+        }
+        else
             FreeDDElParam(info->msg, info->lparam);
     }
     SERVER_END_REQ;
@@ -1319,7 +1319,7 @@
 		memcpy( ptr, *buffer, size );
 		GlobalUnlock( hMem );
                 TRACE( "exec: pairing c=%08lx s=%08lx\n", *lparam, (DWORD)hMem );
-                if (!dde_add_pair( *lparam, hMem )) 
+                if (!dde_add_pair( *lparam, hMem ))
                 {
                     GlobalFree( hMem );
                     return FALSE;
@@ -1494,7 +1494,7 @@
                                          &info.msg.lParam, &buffer, size ))
 		{
 		    ERR( "invalid packed dde-message %x (%s) hwnd %x wp %x lp %lx size %d\n",
-			 info.msg.message, SPY_GetMsgName(info.msg.message, info.msg.hwnd), 
+			 info.msg.message, SPY_GetMsgName(info.msg.message, info.msg.hwnd),
 			 info.msg.hwnd, info.msg.wParam, info.msg.lParam, size );
 		    /* ignore it */
 		    continue;
diff --git a/dlls/user/misc.c b/dlls/user/misc.c
index 84d8f41..f9e15f7 100644
--- a/dlls/user/misc.c
+++ b/dlls/user/misc.c
@@ -161,7 +161,7 @@
  *
  *    Not supported on Win9x - returns NULL and calls SetLastError.
  */
-HANDLE WINAPI OpenDesktopA( LPCSTR lpszDesktop, DWORD dwFlags, 
+HANDLE WINAPI OpenDesktopA( LPCSTR lpszDesktop, DWORD dwFlags,
                                 BOOL fInherit, DWORD dwDesiredAccess )
 {
     FIXME("(%s,%lx,%i,%lx): stub\n",debugstr_a(lpszDesktop),dwFlags,
@@ -175,7 +175,7 @@
 /******************************************************************************
  *		SetUserObjectInformationA   (USER32.@)
  */
-BOOL WINAPI SetUserObjectInformationA( HANDLE hObj, INT nIndex, 
+BOOL WINAPI SetUserObjectInformationA( HANDLE hObj, INT nIndex,
 				       LPVOID pvInfo, DWORD nLength )
 {
     FIXME("(%x,%d,%p,%lx): stub\n",hObj,nIndex,pvInfo,nLength);
@@ -209,7 +209,7 @@
 {
     FIXME("0x%08lx stub\n",u);
     return 0;
-	
+
 }
 
 
diff --git a/dlls/user/mouse.c b/dlls/user/mouse.c
index ff82061..7d5b3c5 100644
--- a/dlls/user/mouse.c
+++ b/dlls/user/mouse.c
@@ -1,8 +1,8 @@
 /*
  * MOUSE driver
- * 
+ *
  * Copyright 1998 Ulrich Weigand
- * 
+ *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
  * License as published by the Free Software Foundation; either
diff --git a/dlls/user/network.c b/dlls/user/network.c
index 11c8502..adf55a6 100644
--- a/dlls/user/network.c
+++ b/dlls/user/network.c
@@ -31,7 +31,7 @@
 WINE_DEFAULT_DEBUG_CHANNEL(wnet);
 
 /*
- * Remote printing 
+ * Remote printing
  */
 
 /**************************************************************************
@@ -112,7 +112,7 @@
  */
 WORD WINAPI WNetWatchQueue16( HWND16 hWnd, LPSTR szLocal, LPSTR szUser, WORD nQueue )
 {
-    FIXME( "(%04x, %s, %s, %d): stub\n", 
+    FIXME( "(%04x, %s, %s, %d): stub\n",
            hWnd, debugstr_a(szLocal), debugstr_a(szUser), nQueue );
     return WN16_NET_ERROR;
 }
@@ -129,10 +129,10 @@
 /**************************************************************************
  *              WNetLockQueueData       [USER.510]
  */
-WORD WINAPI WNetLockQueueData16( LPSTR szQueue, LPSTR szUser, 
+WORD WINAPI WNetLockQueueData16( LPSTR szQueue, LPSTR szUser,
                                  LPQUEUESTRUCT16 *lplpQueueStruct )
 {
-    FIXME( "(%s, %s, %p): stub\n", 
+    FIXME( "(%s, %s, %p): stub\n",
            debugstr_a(szQueue), debugstr_a(szUser), lplpQueueStruct );
     return WN16_NET_ERROR;
 }
@@ -153,14 +153,14 @@
 
 /********************************************************************
  *  WNetAddConnection [USER.517]  Directs a local device to net
- * 
+ *
  * Redirects a local device (either a disk drive or printer port)
  * to a shared device on a remote server.
  */
 WORD WINAPI WNetAddConnection16( LPSTR lpNetPath, LPSTR lpPassWord,
                                  LPSTR lpLocalName )
-{	
-    FIXME( "(%s, %p, %s): stub\n", 
+{
+    FIXME( "(%s, %p, %s): stub\n",
            debugstr_a(lpNetPath), lpPassWord, debugstr_a(lpLocalName) );
     return WN16_NET_ERROR;
 }
@@ -177,7 +177,7 @@
 /********************************************************************
  * WNetGetConnection [USER.512] reverse-resolves a local device
  */
-WORD WINAPI WNetGetConnection16( LPSTR lpLocalName, 
+WORD WINAPI WNetGetConnection16( LPSTR lpLocalName,
                                  LPSTR lpRemoteName, UINT16 *cbRemoteName )
 {
     char label[32];
@@ -224,13 +224,13 @@
  */
 WORD WINAPI WNetGetCaps16( WORD capability )
 {
-    switch (capability) 
+    switch (capability)
     {
     case WNNC16_SPEC_VERSION:
         return 0x30a; /* WfW 3.11 (and apparently other 3.1x) */
 
     case WNNC16_NET_TYPE:
-        /* hi byte = network type, 
+        /* hi byte = network type,
            lo byte = network vendor (Netware = 0x03) [15 types] */
         return WNNC16_NET_MultiNet | WNNC16_SUBNET_WinWorkgroups;
 
@@ -278,7 +278,7 @@
         return   WNNC16_ERR_GetError | WNNC16_ERR_GetErrorText;
 
     case WNNC16_PRINTMGREXT:
-        /* returns the Print Manager version in major and 
+        /* returns the Print Manager version in major and
            minor format if Print Manager functions are available */
         return 0x30e; /* printman version of WfW 3.11 */
 
@@ -409,7 +409,7 @@
 
     *lpType = (type == DRIVE_REMOTE)? WNDT_NETWORK : WNDT_NORMAL;
 
-    TRACE( "%s is %s\n", debugstr_a(lpName), 
+    TRACE( "%s is %s\n", debugstr_a(lpName),
            (*lpType == WNDT_NETWORK)? "WNDT_NETWORK" : "WNDT_NORMAL" );
     return WN16_SUCCESS;
 }
diff --git a/dlls/user/resource.c b/dlls/user/resource.c
index 183d9c0..37998e5 100644
--- a/dlls/user/resource.c
+++ b/dlls/user/resource.c
@@ -64,7 +64,7 @@
  * 00:	BYTE	type		type of accelerator
  * 01:	BYTE	pad		(to WORD boundary)
  * 02:	WORD	event
- * 04:	WORD	IDval		
+ * 04:	WORD	IDval
  * 06:	WORD	pad		(to DWORD boundary)
  */
 HACCEL WINAPI LoadAcceleratorsW(HINSTANCE instance,LPCWSTR lpTableName)
@@ -237,14 +237,14 @@
 /*********************************************************************
  *                    CreateAcceleratorTableW   (USER32.@)
  *
- * 
+ *
  */
 HACCEL WINAPI CreateAcceleratorTableW(LPACCEL lpaccel, INT cEntries)
 {
   HACCEL	hAccel;
   LPACCEL16	accel;
   int		i;
-  char		ckey;  
+  char		ckey;
 
   /* Do parameter checking just in case someone's trying to be
      funny. */
@@ -277,8 +277,8 @@
          if(!MultiByteToWideChar(CP_ACP, MB_PRECOMPOSED, &ckey, 1, &accel[i].key, 1))
             WARN_(accel)("Error converting ASCII accelerator table to Unicode");
        }
-       else 
-         accel[i].key = lpaccel[i].key; 
+       else
+         accel[i].key = lpaccel[i].key;
        accel[i].cmd = lpaccel[i].cmd;
   }
 
@@ -303,9 +303,9 @@
  */
 BOOL WINAPI DestroyAcceleratorTable( HACCEL handle )
 {
-    return !GlobalFree16(handle); 
+    return !GlobalFree16(handle);
 }
-  
+
 /**********************************************************************
  *     LoadString   (USER.176)
  */
@@ -325,14 +325,14 @@
     if (!hrsrc) return 0;
     hmem = LoadResource16( instance, hrsrc );
     if (!hmem) return 0;
-    
+
     p = LockResource16(hmem);
     string_num = resource_id & 0x000f;
     for (i = 0; i < string_num; i++)
 	p += *p + 1;
-    
+
     TRACE("strlen = %d\n", (int)*p );
-    
+
     if (buffer == NULL) return *p;
     i = min(buflen - 1, *p);
     if (i > 0) {
@@ -368,21 +368,21 @@
     TRACE("instance = %04x, id = %04x, buffer = %08x, length = %d\n",
           instance, (int)resource_id, (int) buffer, buflen);
 
-    /* Use bits 4 - 19 (incremented by 1) as resourceid, mask out 
+    /* Use bits 4 - 19 (incremented by 1) as resourceid, mask out
      * 20 - 31. */
     hrsrc = FindResourceW( instance, (LPCWSTR)(((resource_id>>4)&0xffff)+1),
                              RT_STRINGW );
     if (!hrsrc) return 0;
     hmem = LoadResource( instance, hrsrc );
     if (!hmem) return 0;
-    
+
     p = LockResource(hmem);
     string_num = resource_id & 0x000f;
     for (i = 0; i < string_num; i++)
 	p += *p + 1;
-    
+
     TRACE("strlen = %d\n", (int)*p );
-    
+
     if (buffer == NULL) return *p;
     i = min(buflen - 1, *p);
     if (i > 0) {
@@ -416,7 +416,7 @@
 
     if(buffer == NULL) /* asked size of string */
 	return LoadStringW(instance, resource_id, NULL, 0);
-    
+
     wbuf = HeapAlloc(GetProcessHeap(), 0, buflen * sizeof(WCHAR));
     if(!wbuf)
 	return 0;
diff --git a/dlls/user/tests/sysparams.c b/dlls/user/tests/sysparams.c
index 0cbb33f..34d17af 100644
--- a/dlls/user/tests/sysparams.c
+++ b/dlls/user/tests/sysparams.c
@@ -360,7 +360,7 @@
     eq( frame, GetSystemMetrics( SM_CYSIZEFRAME ), "SM_CYSIZEFRAME", "%d" )
 
     /* These tests hang when XFree86 4.0 for Windows is running (tested on
-     *  WinNT, SP2, Cygwin/XFree 4.1.0. Skip the test when XFree86 is 
+     *  WinNT, SP2, Cygwin/XFree 4.1.0. Skip the test when XFree86 is
      * running.
      */
     if (!FindWindowA( NULL, "Cygwin/XFree86" ))
@@ -620,8 +620,8 @@
     BOOL b;
     BOOL curr_val;
 
-    /* These tests hang when XFree86 4.0 for Windows is running (tested on 
-     * WinNT, SP2, Cygwin/XFree 4.1.0. Skip the test when XFree86 is 
+    /* These tests hang when XFree86 4.0 for Windows is running (tested on
+     * WinNT, SP2, Cygwin/XFree 4.1.0. Skip the test when XFree86 is
      * running.
      */
     if (!FindWindowA( NULL, "Cygwin/XFree86" ))
@@ -835,7 +835,7 @@
 
 static void test_SPI_SETFASTTASKSWITCH( void )         /*     36 */
 {
-    /* Temporarily commented out. 
+    /* Temporarily commented out.
     BOOL old_b;
     BOOL b;
     BOOL res;
@@ -857,7 +857,7 @@
     ok( !res, "Must not set" );
 
     SystemParametersInfoA( SPI_GETFASTTASKSWITCH, 0, &b, 0 );
-        
+
     ok( b, "retrieved value is the same as set" );
 
     SystemParametersInfoA( SPI_SETFASTTASKSWITCH, old_b, 0,
diff --git a/dlls/user/text.c b/dlls/user/text.c
index 0bae181..886c374 100644
--- a/dlls/user/text.c
+++ b/dlls/user/text.c
@@ -4,7 +4,7 @@
  * Copyright 1993, 1994 Alexandre Julliard
  * Copyright 2002 Bill Medland
  *
- * Contains 
+ * Contains
  *   1.  DrawText functions
  *   2.  GrayString functions
  *   3.  TabbedText functions
@@ -60,13 +60,13 @@
  *     a. If the buffered text to be displayed includes the ampersands then
  *        we will need special measurement and draw functions that will ignore
  *        the ampersands (e.g. by copying to a buffer without the prefix and
- *        then using the normal forms).  This may involve less space but may 
+ *        then using the normal forms).  This may involve less space but may
  *        require more processing.  e.g. since a line containing tabs may
  *        contain several underlined characters either we need to carry around
  *        a list of prefix locations or we may need to locate them several
  *        times.
  *     b. If we actually directly modify the "original text" as we go then we
- *        will need some special "caching" to handle the fact that when we 
+ *        will need some special "caching" to handle the fact that when we
  *        ellipsify the text the ellipsis may modify the next line of text,
  *        which we have not yet processed.  (e.g. ellipsification of a W at the
  *        end of a line will overwrite the W, the \n and the first character of
@@ -117,7 +117,7 @@
  *   width      [in] The maximum width permitted (in logical coordinates)
  *   size       [out] The dimensions of the text
  *   modstr     [out] The modified form of the string, to be returned to the
- *                    calling program.  It is assumed that the caller has 
+ *                    calling program.  It is assumed that the caller has
  *                    made sufficient space available so we don't need to
  *                    know the size of the space.  This pointer may be NULL if
  *                    the modified string is not required.
@@ -180,7 +180,7 @@
  *   width      [in] The maximum width permitted (in logical coordinates)
  *   size       [out] The dimensions of the text
  *   modstr     [out] The modified form of the string, to be returned to the
- *                    calling program.  It is assumed that the caller has 
+ *                    calling program.  It is assumed that the caller has
  *                    made sufficient space available so we don't need to
  *                    know the size of the space.  This pointer may be NULL if
  *                    the modified string is not required.
@@ -251,7 +251,7 @@
         memmove (lastSlash-1, lastSlash, len_trailing * sizeof(WCHAR));
         lastSlash--;
         len_under++;
-        
+
         assert (*len_str);
         (*len_str)--;
     }
@@ -298,7 +298,7 @@
  *              known to fit; chars_fit+1 is known not to fit.
  *   chars_used [out] The number of characters of str that have been "used" and
  *              do not need to be included in later text.  For example this will
- *              include any spaces that have been discarded from the start of 
+ *              include any spaces that have been discarded from the start of
  *              the next line.
  *   size       [out] The size of the returned text in logical coordinates
  *
@@ -306,7 +306,7 @@
  * increasing with number of characters (i.e. no weird kernings)
  *
  * Algorithm
- * 
+ *
  * Work back from the last character that did fit to either a space or the last
  * character of a word, whichever is met first.
  * If there was one or the first character didn't fit then
@@ -464,7 +464,7 @@
     *new_str = start_str;
     *new_count = start_count;
 }
-  
+
 /*********************************************************************
  *                      TEXT_Reprefix
  *
@@ -518,7 +518,7 @@
 }
 
 /*********************************************************************
- *  Returns true if and only if the remainder of the line is a single 
+ *  Returns true if and only if the remainder of the line is a single
  *  newline representation or nothing
  */
 
@@ -536,7 +536,7 @@
 
 /*********************************************************************
  *  Return next line of text from a string.
- * 
+ *
  * hdc - handle to DC.
  * str - string to parse into lines.
  * count - length of str.
@@ -550,13 +550,13 @@
  *            the return string is built.
  * tabwidth - The width of a tab in logical coordinates
  * pprefix_offset - Here is where we return the offset within dest of the first
- *                  prefixed (underlined) character.  -1 is returned if there 
+ *                  prefixed (underlined) character.  -1 is returned if there
  *                  are none.  Note that there may be more; the calling code
  *                  will need to use TEXT_Reprefix to find any later ones.
  * pellip - Here is where we return the information about any ellipsification
  *          that was carried out.  Note that if tabs are being expanded then
  *          this data will correspond to the last text segment actually
- *          returned in dest; by definition there would not have been any 
+ *          returned in dest; by definition there would not have been any
  *          ellipsification in earlier text segments of the line.
  *
  * Returns pointer to next char in str after end of the line
@@ -678,7 +678,7 @@
         /* NB we may end up ellipsifying a word-broken or path_ellipsified
          * string */
         if ((!line_fits && (format & DT_WORD_ELLIPSIS)) ||
-            ((format & DT_END_ELLIPSIS) && 
+            ((format & DT_END_ELLIPSIS) &&
               ((last_line && *count) ||
                (remainder_is_none_or_newline (*count, &str[i]) && !line_fits))))
         {
@@ -750,7 +750,7 @@
         }
         /* else it was a Tab and we go around again */
     }
-    
+
     retsize->cx = plen;
     *len = j;
     if (*count)
@@ -803,7 +803,7 @@
  * is not quite complete, especially with regard to \0.  We will assume that
  * the returned string could have a length of up to i_count+3 and also have
  * a trailing \0 (which would be 4 more than a not-null-terminated string but
- * 3 more than a null-terminated string).  If this is not so then increase 
+ * 3 more than a null-terminated string).  If this is not so then increase
  * the allowance in DrawTextExA.
  */
 #define MAX_STATIC_BUFFER 1024
@@ -907,12 +907,12 @@
                     const WCHAR *p;
                     p = str; while (p < str+len && *p != TAB) p++;
                     len_seg = p - str;
-                    if (len_seg != len && !GetTextExtentPointW(hdc, str, len_seg, &size)) 
+                    if (len_seg != len && !GetTextExtentPointW(hdc, str, len_seg, &size))
                         return 0;
                 }
                 else
                     len_seg = len;
-                   
+
                 if (!ExtTextOutW( hdc, xseg, y,
                                  ((flags & DT_NOCLIP) ? 0 : ETO_CLIPPED) |
                                  ((flags & DT_RTLREADING) ? ETO_RTLREADING : 0),
@@ -926,7 +926,7 @@
                 if (len)
                 {
                     assert ((flags & DT_EXPANDTABS) && *str == TAB);
-                    len--; str++; 
+                    len--; str++;
                     xseg += ((size.cx/tabwidth)+1)*tabwidth;
                     if (prefix_offset != -1)
                     {
@@ -973,7 +973,7 @@
 /***********************************************************************
  *           DrawTextExA    (USER32.@)
  *
- * If DT_MODIFYSTRING is specified then there must be room for up to 
+ * If DT_MODIFYSTRING is specified then there must be room for up to
  * 4 extra characters.  We take great care about just how much modified
  * string we return.
  */
@@ -1104,7 +1104,7 @@
  * rethink the strategy once the migration to NT handles is complete.
  * We are going to get a lot of code-duplication once this migration is
  * completed...
- * 
+ *
  */
 static BOOL TEXT_GrayString(HDC hdc, HBRUSH hb, GRAYSTRINGPROC fn, LPARAM lp, INT len,
                             INT x, INT y, INT cx, INT cy, BOOL unicode, BOOL _32bit)
@@ -1363,7 +1363,7 @@
 
     acount = WideCharToMultiByte(codepage,0,str,count,NULL,0,NULL,NULL);
     p = HeapAlloc( GetProcessHeap(), 0, acount );
-    if(p == NULL) return 0; /* FIXME: is this the correct return on failure */ 
+    if(p == NULL) return 0; /* FIXME: is this the correct return on failure */
     acount = WideCharToMultiByte(codepage,0,str,count,p,acount,NULL,NULL);
     ret = TabbedTextOutA( hdc, x, y, p, acount, cTabStops, lpTabPos, nTabOrg );
     HeapFree( GetProcessHeap(), 0, p );
diff --git a/dlls/user/wnd16.c b/dlls/user/wnd16.c
index 7e2e01e..311bbe0 100644
--- a/dlls/user/wnd16.c
+++ b/dlls/user/wnd16.c
@@ -557,7 +557,7 @@
  */
 void WINAPI SetDlgItemInt16( HWND16 hwnd, INT16 id, UINT16 value, BOOL16 fSigned )
 {
-    SetDlgItemInt( WIN_Handle32(hwnd), (UINT)(UINT16)id, 
+    SetDlgItemInt( WIN_Handle32(hwnd), (UINT)(UINT16)id,
              (UINT)(fSigned ? (INT16) value : (UINT16) value), fSigned );
 }
 
diff --git a/dlls/version/info.c b/dlls/version/info.c
index 338d5e6..a681fc9 100644
--- a/dlls/version/info.c
+++ b/dlls/version/info.c
@@ -1,6 +1,6 @@
-/* 
+/*
  * Implementation of VERSION.DLL - Version Info access
- * 
+ *
  * Copyright 1996,1997 Marcus Meissner
  * Copyright 1997 David Cuthbert
  * Copyright 1999 Ulrich Weigand
@@ -209,7 +209,7 @@
 /***********************************************************************
  *           ConvertVersionInfo32To16        [internal]
  */
-void ConvertVersionInfo32To16( VS_VERSION_INFO_STRUCT32 *info32, 
+void ConvertVersionInfo32To16( VS_VERSION_INFO_STRUCT32 *info32,
                                VS_VERSION_INFO_STRUCT16 *info16 )
 {
     /* Copy data onto local stack to prevent overwrites */
@@ -242,8 +242,8 @@
         WideCharToMultiByte( CP_ACP, 0, (LPCWSTR)lpValue, -1,
                              VersionInfo16_Value( info16 ), info16->wValueLength, NULL, NULL );
 
-        TRACE("Copied value from %p to %p: %s\n", lpValue, 
-                    VersionInfo16_Value( info16 ), 
+        TRACE("Copied value from %p to %p: %s\n", lpValue,
+                    VersionInfo16_Value( info16 ),
                     debugstr_a(VersionInfo16_Value( info16 )) );
     }
     else
@@ -251,7 +251,7 @@
         info16->wValueLength = wValueLength;
         memmove( VersionInfo16_Value( info16 ), lpValue, wValueLength );
 
-        TRACE("Copied value from %p to %p: %d bytes\n", lpValue, 
+        TRACE("Copied value from %p to %p: %d bytes\n", lpValue,
                      VersionInfo16_Value( info16 ), wValueLength );
     }
 
@@ -270,7 +270,7 @@
     /* Fixup length */
     info16->wLength = (DWORD)child16 - (DWORD)info16;
 
-    TRACE("Finished, length is %d (%p - %p)\n", 
+    TRACE("Finished, length is %d (%p - %p)\n",
                 info16->wLength, info16, child16 );
 }
 
@@ -461,7 +461,7 @@
     if (!ret) return 0;
 
     if ( handle ) *handle = offset;
-    
+
     if ( VersionInfoIs16( buf ) )
         vffi = (VS_FIXEDFILEINFO *)VersionInfo16_Value( (VS_VERSION_INFO_STRUCT16 *)buf );
     else
@@ -525,11 +525,11 @@
         return FALSE;
 DO_CONVERT:
     if (    datasize >= sizeof(VS_VERSION_INFO_STRUCT16)
-         && datasize >= ((VS_VERSION_INFO_STRUCT16 *)data)->wLength  
+         && datasize >= ((VS_VERSION_INFO_STRUCT16 *)data)->wLength
          && !VersionInfoIs16( data ) )
     {
         /* convert resource from PE format to NE format */
-        ConvertVersionInfo32To16( (VS_VERSION_INFO_STRUCT32 *)data, 
+        ConvertVersionInfo32To16( (VS_VERSION_INFO_STRUCT32 *)data,
                                   (VS_VERSION_INFO_STRUCT16 *)data );
     }
 
@@ -562,7 +562,7 @@
         retv = FALSE;
 
     else if (    datasize >= sizeof(VS_VERSION_INFO_STRUCT16)
-              && datasize >= ((VS_VERSION_INFO_STRUCT16 *)data)->wLength 
+              && datasize >= ((VS_VERSION_INFO_STRUCT16 *)data)->wLength
               && VersionInfoIs16( data ) )
     {
         ERR("Cannot access NE resource in %s\n", debugstr_a(fn) );
@@ -577,7 +577,7 @@
 /***********************************************************************
  *           VersionInfo16_FindChild             [internal]
  */
-static VS_VERSION_INFO_STRUCT16 *VersionInfo16_FindChild( VS_VERSION_INFO_STRUCT16 *info, 
+static VS_VERSION_INFO_STRUCT16 *VersionInfo16_FindChild( VS_VERSION_INFO_STRUCT16 *info,
                                             LPCSTR szKey, UINT cbKey )
 {
     VS_VERSION_INFO_STRUCT16 *child = VersionInfo16_Children( info );
@@ -597,7 +597,7 @@
 /***********************************************************************
  *           VersionInfo32_FindChild             [internal]
  */
-static VS_VERSION_INFO_STRUCT32 *VersionInfo32_FindChild( VS_VERSION_INFO_STRUCT32 *info, 
+static VS_VERSION_INFO_STRUCT32 *VersionInfo32_FindChild( VS_VERSION_INFO_STRUCT32 *info,
                                             LPCWSTR szKey, UINT cbKey )
 {
     VS_VERSION_INFO_STRUCT32 *child = VersionInfo32_Children( info );
diff --git a/dlls/version/install.c b/dlls/version/install.c
index eccf681..7cc8232 100644
--- a/dlls/version/install.c
+++ b/dlls/version/install.c
@@ -1,6 +1,6 @@
-/* 
+/*
  * Implementation of VERSION.DLL - File Installer routines
- * 
+ *
  * Copyright 1996,1997 Marcus Meissner
  * Copyright 1997 David Cuthbert
  *
@@ -325,7 +325,7 @@
             if(buf == NULL) {
                WARN("Memory exausted while fetching version info!\n");
                return NULL;
-            }                                                                 
+            }
 	} else {
 	    *vffi = (VS_FIXEDFILEINFO*)(buf+0x14);
 	    if ((*vffi)->dwSignature == 0x004f0049) /* hack to detect unicode */
@@ -392,7 +392,7 @@
 	    tmplast = strlen(pdest)+1;
 	    attr = GetFileAttributesA(tmpfn);
 	    /* if it exists, it has been copied by the call before.
-	     * we jump over the copy part... 
+	     * we jump over the copy part...
 	     */
 	}
     }
@@ -466,7 +466,7 @@
 		if (VerQueryValueA(buf1,"\\VarFileInfo\\Translation",(LPVOID*)&tbuf1,&len1) &&
 		    VerQueryValueA(buf2,"\\VarFileInfo\\Translation",(LPVOID*)&tbuf2,&len2)
 		) {
-		    /* irgendwas mit tbuf1 und tbuf2 machen 
+		    /* irgendwas mit tbuf1 und tbuf2 machen
 		     * generiert DIFFLANG|MISMATCH
 		     */
 		}
@@ -493,8 +493,8 @@
 		LZClose(hfsrc);
 		return xret;
 	    }
-	if ((!(flags & VIFF_DONTDELETEOLD))	&& 
-	    curdir				&& 
+	if ((!(flags & VIFF_DONTDELETEOLD))	&&
+	    curdir				&&
 	    *curdir				&&
 	    lstrcmpiA(curdir,pdest)
 	) {
diff --git a/dlls/version/resource.c b/dlls/version/resource.c
index 7b4c3ab..af332da 100644
--- a/dlls/version/resource.c
+++ b/dlls/version/resource.c
@@ -1,6 +1,6 @@
-/* 
+/*
  * Implementation of VERSION.DLL - Resource Access routines
- * 
+ *
  * Copyright 1996,1997 Marcus Meissner
  * Copyright 1997 David Cuthbert
  * Copyright 1999 Ulrich Weigand
@@ -177,18 +177,18 @@
     DWORD resTabSize;
     int count;
 
-    /* Read in NE header */ 
+    /* Read in NE header */
     nehdoffset = LZSeek( lzfd, 0, SEEK_CUR );
     if ( sizeof(nehd) != LZRead( lzfd, &nehd, sizeof(nehd) ) ) return 0;
 
-    resTabSize = nehd.ne_restab - nehd.ne_rsrctab; 
+    resTabSize = nehd.ne_restab - nehd.ne_rsrctab;
     if ( !resTabSize )
     {
         TRACE("No resources in NE dll\n" );
         return FALSE;
     }
 
-    /* Read in resource table */ 
+    /* Read in resource table */
     resTab = HeapAlloc( GetProcessHeap(), 0, resTabSize );
     if ( !resTab ) return FALSE;
 
@@ -292,8 +292,8 @@
     }
 
     /* Read in section table */
-    nSections = pehd.FileHeader.NumberOfSections; 
-    sections = HeapAlloc( GetProcessHeap(), 0, 
+    nSections = pehd.FileHeader.NumberOfSections;
+    sections = HeapAlloc( GetProcessHeap(), 0,
                           nSections * sizeof(IMAGE_SECTION_HEADER) );
     if ( !sections ) return FALSE;
 
@@ -324,9 +324,9 @@
     }
 
     /* Read in resource section */
-    resSectionSize = sections[i].SizeOfRawData; 
+    resSectionSize = sections[i].SizeOfRawData;
     resSection = HeapAlloc( GetProcessHeap(), 0, resSectionSize );
-    if ( !resSection ) 
+    if ( !resSection )
     {
         HeapFree( GetProcessHeap(), 0, sections );
         return FALSE;
@@ -397,7 +397,7 @@
     DWORD reslen;
 
     TRACE("(%s,type=0x%lx,id=0x%lx,off=%p)\n",
-                debugstr_a(lpszFileName), (LONG)lpszResType, (LONG)lpszResId, 
+                debugstr_a(lpszFileName), (LONG)lpszResType, (LONG)lpszResId,
                 lpszResId );
 
     lzfd = LZOpenFileA( lpszFileName, &ofs, OF_READ );
@@ -406,12 +406,12 @@
     switch ( read_xx_header( lzfd ) )
     {
     case IMAGE_OS2_SIGNATURE:
-        retv = find_ne_resource( lzfd, lpszResType, lpszResId, 
+        retv = find_ne_resource( lzfd, lpszResType, lpszResId,
                                  &reslen, lpdwFileOffset );
         break;
 
     case IMAGE_NT_SIGNATURE:
-        retv = find_pe_resource( lzfd, lpszResType, lpszResId, 
+        retv = find_pe_resource( lzfd, lpszResType, lpszResId,
                                  &reslen, lpdwFileOffset );
         break;
     }
@@ -434,7 +434,7 @@
     DWORD reslen = dwResLen;
 
     TRACE("(%s,type=0x%lx,id=0x%lx,off=%ld,len=%ld,data=%p)\n",
-		debugstr_a(lpszFileName), (LONG)lpszResType, (LONG)lpszResId, 
+		debugstr_a(lpszFileName), (LONG)lpszResType, (LONG)lpszResId,
                 dwFileOffset, dwResLen, lpvData );
 
     lzfd = LZOpenFileA( lpszFileName, &ofs, OF_READ );
@@ -442,20 +442,20 @@
 
     if ( !dwFileOffset )
     {
-        switch ( read_xx_header( lzfd ) ) 
+        switch ( read_xx_header( lzfd ) )
         {
         case IMAGE_OS2_SIGNATURE:
-            retv = find_ne_resource( lzfd, lpszResType, lpszResId, 
+            retv = find_ne_resource( lzfd, lpszResType, lpszResId,
                                      &reslen, &dwFileOffset );
             break;
 
         case IMAGE_NT_SIGNATURE:
-            retv = find_pe_resource( lzfd, lpszResType, lpszResId, 
+            retv = find_pe_resource( lzfd, lpszResType, lpszResId,
                                      &reslen, &dwFileOffset );
             break;
         }
 
-        if ( !retv ) 
+        if ( !retv )
         {
             LZClose( lzfd );
             return 0;
diff --git a/dlls/version/ver16.c b/dlls/version/ver16.c
index f06447d..9243d92 100644
--- a/dlls/version/ver16.c
+++ b/dlls/version/ver16.c
@@ -41,7 +41,7 @@
 DWORD WINAPI GetFileVersionInfo16( LPCSTR lpszFileName, DWORD handle,
                                    DWORD cbBuf, LPVOID lpvData )
 {
-    TRACE("(%s, %08lx, %ld, %p)\n", 
+    TRACE("(%s, %08lx, %ld, %p)\n",
                 debugstr_a(lpszFileName), handle, cbBuf, lpvData );
 
     return GetFileVersionInfoA( lpszFileName, handle, cbBuf, lpvData );
@@ -50,7 +50,7 @@
 /*************************************************************************
  * VerFindFile                             [VER.8]
  */
-DWORD WINAPI VerFindFile16( UINT16 flags, LPCSTR lpszFilename, 
+DWORD WINAPI VerFindFile16( UINT16 flags, LPCSTR lpszFilename,
                             LPCSTR lpszWinDir, LPCSTR lpszAppDir,
                             LPSTR lpszCurDir, UINT16 *lpuCurDirLen,
                             LPSTR lpszDestDir, UINT16 *lpuDestDirLen )
@@ -67,14 +67,14 @@
 /*************************************************************************
  * VerInstallFile                          [VER.9]
  */
-DWORD WINAPI VerInstallFile16( UINT16 flags, 
-                               LPCSTR lpszSrcFilename, LPCSTR lpszDestFilename, 
+DWORD WINAPI VerInstallFile16( UINT16 flags,
+                               LPCSTR lpszSrcFilename, LPCSTR lpszDestFilename,
                                LPCSTR lpszSrcDir, LPCSTR lpszDestDir, LPCSTR lpszCurDir,
                                LPSTR lpszTmpFile, UINT16 *lpwTmpFileLen )
 {
     UINT filelen;
-    DWORD retv = VerInstallFileA( flags, lpszSrcFilename, lpszDestFilename, 
-                                    lpszSrcDir, lpszDestDir, lpszCurDir, 
+    DWORD retv = VerInstallFileA( flags, lpszSrcFilename, lpszDestFilename,
+                                    lpszSrcDir, lpszDestDir, lpszCurDir,
                                     lpszTmpFile, &filelen);
 
     *lpwTmpFileLen = (UINT16)filelen;
@@ -92,7 +92,7 @@
 /*************************************************************************
  * VerQueryValue                          [VER.11]
  */
-DWORD WINAPI VerQueryValue16( SEGPTR spvBlock, LPCSTR lpszSubBlock, 
+DWORD WINAPI VerQueryValue16( SEGPTR spvBlock, LPCSTR lpszSubBlock,
                               SEGPTR *lpspBuffer, UINT16 *lpcb )
 {
     LPVOID lpvBlock = MapSL( spvBlock );
@@ -100,7 +100,7 @@
     UINT buflen;
     DWORD retv;
 
-    TRACE("(%p, %s, %p, %p)\n", 
+    TRACE("(%p, %s, %p, %p)\n",
                 lpvBlock, debugstr_a(lpszSubBlock), lpspBuffer, lpcb );
 
     retv = VerQueryValueA( lpvBlock, lpszSubBlock, &buffer, &buflen );
diff --git a/dlls/win32s/w32skernel.c b/dlls/win32s/w32skernel.c
index 5b203eb..db2ba1f 100644
--- a/dlls/win32s/w32skernel.c
+++ b/dlls/win32s/w32skernel.c
@@ -38,7 +38,7 @@
     strcat(sysdir, "\\WIN32S");
     text = HeapAlloc(GetProcessHeap(), 0, strlen(sysdir)+1);
     strcpy(text, sysdir);
-    return text; 
+    return text;
 }
 
 /***********************************************************************
diff --git a/dlls/winaspi/aspi.c b/dlls/winaspi/aspi.c
index fa8acda..5889d2c 100644
--- a/dlls/winaspi/aspi.c
+++ b/dlls/winaspi/aspi.c
@@ -41,7 +41,7 @@
 
 #include <stdio.h>
 #include <sys/types.h>
-#ifdef HAVE_SYS_IOCTL_H 
+#ifdef HAVE_SYS_IOCTL_H
 #include <sys/ioctl.h>
 #endif
 #include <fcntl.h>
@@ -321,7 +321,7 @@
 		WARN("Could not set timeout ! (%s)\n", strerror(errno));
 	}
 	return retval;
-	
+
 }
 
 /* This function takes care of the write/read to the linux sg device.
@@ -354,7 +354,7 @@
 		*lpcbBytesReturned = 0;
 		return FALSE;
 	}
-	
+
 	TRACE("Reading reply from Linux sg device\n");
 	*lpcbBytesReturned = read( fd, lpOutBuffer, cbOutBuffer );
 	if( *lpcbBytesReturned != cbOutBuffer )
@@ -504,7 +504,7 @@
 		RegCloseKey(hkeyScsi);
 		return;
 	}
-	
+
 	for( i=0; cbIdStr = sizeof(idstr), (error=RegEnumValueA( hkeyScsi, i, idstr, &cbIdStr, NULL, &type, NULL, NULL )) == ERROR_SUCCESS; i++ )
 	{
 	        if(idstr[0] == '\0') continue; /* skip the default value */
@@ -598,7 +598,7 @@
 	/* Check whether user has generic scsi devices at all */
 	if (!(SCSI_Linux_CheckDevices()))
 	    return;
-	
+
 	procfile = fopen( procname, "r" );
 	if( !procfile )
 	{
diff --git a/dlls/winaspi/winaspi16.c b/dlls/winaspi/winaspi16.c
index d4733d9..740f69a 100644
--- a/dlls/winaspi/winaspi16.c
+++ b/dlls/winaspi/winaspi16.c
@@ -379,7 +379,7 @@
       {
 	SEGPTR spPRB = MapLS(lpPRB);
 
-	ASPI_CallTo16_long_l(lpPRB->SRB_PostProc, spPRB);	
+	ASPI_CallTo16_long_l(lpPRB->SRB_PostProc, spPRB);
 	UnMapLS(spPRB);
 	break;
       }
@@ -393,7 +393,7 @@
   free(sg_hd);
   ASPI_DebugPrintResult(lpPRB, mode);
   return SS_COMP;
-  
+
 error_exit:
   if (error_code == EBUSY) {
       lpPRB->SRB_Status = SS_ASPI_IS_BUSY;
@@ -498,7 +498,7 @@
 #ifdef linux
     return ASPI_SendASPICommand(segptr_srb, ASPI_WIN16);
 #else
-    return 0; 
+    return 0;
 #endif
 }
 
diff --git a/dlls/winaspi/winescsi.h b/dlls/winaspi/winescsi.h
index 6d7efbb..3a2eee2 100644
--- a/dlls/winaspi/winescsi.h
+++ b/dlls/winaspi/winescsi.h
@@ -39,14 +39,14 @@
     int reply_len;   /* [i] max length of expected reply (inc. sg_header) */
     int pack_id;     /* [io] id number of packet (use ints >= 0) */
     int result;      /* [o] 0==ok, else (+ve) Unix errno (best ignored) */
-    unsigned int twelve_byte:1; 
+    unsigned int twelve_byte:1;
         /* [i] Force 12 byte command length for group 6 & 7 commands  */
     unsigned int target_status:5;   /* [o] scsi status from target */
     unsigned int host_status:8;     /* [o] host status (see "DID" codes) */
     unsigned int driver_status:8;   /* [o] driver status+suggestion */
     unsigned int other_flags:10;    /* unused */
     unsigned char sense_buffer[SG_MAX_SENSE]; /* [o] Output in 3 cases:
-           when target_status is CHECK_CONDITION or 
+           when target_status is CHECK_CONDITION or
            when target_status is COMMAND_TERMINATED or
            when (driver_status & DRIVER_SENSE) is true. */
 };      /* This structure is 36 bytes long on i386 */
diff --git a/dlls/winedos/devices.c b/dlls/winedos/devices.c
index e6e4200..35e786d 100644
--- a/dlls/winedos/devices.c
+++ b/dlls/winedos/devices.c
@@ -114,7 +114,7 @@
 static void WINAPI con_interrupt(CONTEXT86*ctx);
 
 /* devices */
-typedef struct 
+typedef struct
 {
     char name[8];
     WORD attr;
@@ -122,7 +122,7 @@
     RMCBPROC interrupt;
 } WINEDEV;
 
-static WINEDEV devs[] = 
+static WINEDEV devs[] =
 {
   { "NUL     ",
     ATTR_CHAR|ATTR_NUL|ATTR_DEVICE,
diff --git a/dlls/winedos/dosaspi.c b/dlls/winedos/dosaspi.c
index 20a4839..fdd9c7e 100644
--- a/dlls/winedos/dosaspi.c
+++ b/dlls/winedos/dosaspi.c
@@ -73,7 +73,7 @@
  * Offset of SRB Pointer		<- SP+4
  * Segment of return address		<- SP+2
  * Offset of return address		<- SP+0
- */ 
+ */
 		/* FIXME: I am about 99% sure what is here is correct,
 		 * but this code has never been tested (and probably
 		 * won't be either until someone finds a DOS program
@@ -99,7 +99,7 @@
 	} /* if ((SRB_Flags&SRB_POSTING) && SRB_PostProc) */
 }
 
-static 
+static
 DWORD ASPI_SendASPIDOSCommand(DWORD ptrSRB)
 {
 	PSRB_ExecSCSICmd lpPRB;
diff --git a/dlls/winedos/dosvm.c b/dlls/winedos/dosvm.c
index 227d954..1504fad 100644
--- a/dlls/winedos/dosvm.c
+++ b/dlls/winedos/dosvm.c
@@ -211,7 +211,7 @@
     } else {
       TRACE("new event queued (time=%ld)\n", GetTickCount());
     }
-    
+
     /* Wake up DOSVM_Wait so that it can serve pending events. */
     SetEvent(event_notifier);
 
@@ -655,7 +655,7 @@
     /* 30 */ 0, DOSVM_Int31Handler, 0, DOSVM_Int33Handler, 0, 0, 0, 0,
     /* 38 */ 0, 0, 0, 0, 0, 0, 0, 0,
     /* 40 */ 0, 0, 0, 0, 0, 0, 0, 0,
-    /* 48 */ 0, 0, 0, 0, 0, 0, 0, 0, 
+    /* 48 */ 0, 0, 0, 0, 0, 0, 0, 0,
     /* 50 */ 0, 0, 0, 0, 0, 0, 0, 0,
     /* 58 */ 0, 0, 0, 0, 0, 0, 0, 0,
     /* 60 */ 0, 0, 0, 0, 0, 0, 0, DOSVM_Int67Handler
diff --git a/dlls/winedos/int10.c b/dlls/winedos/int10.c
index f773d67..1d8793a 100644
--- a/dlls/winedos/int10.c
+++ b/dlls/winedos/int10.c
@@ -30,7 +30,7 @@
 
 WINE_DEFAULT_DEBUG_CHANNEL(int);
 
-static void scroll_window(int direction, char lines, char row1, 
+static void scroll_window(int direction, char lines, char row1,
    char col1, char row2, char col2, char attribute);
 
 #define SCROLL_UP 1
@@ -53,13 +53,13 @@
  *	    DOSVM_Int10Handler (WPROCS.116)
  *
  * Handler for int 10h (video).
- * 
+ *
  * NOTE:
  *    Most INT 10 functions for text-mode, CGA, EGA, and VGA cards
  *    are present in this list. (SVGA and XGA are not) That is not
  *    to say that all these functions should be supported, but if
  *    anyone is brain-damaged enough to want to emulate one of these
- *    beasts then this should get you started. 
+ *    beasts then this should get you started.
  *
  * NOTE:
  *    Several common graphical extensions used by Microsoft hook
@@ -68,18 +68,18 @@
  *
  *    MSHERC.COM - More functionality for Hercules cards.
  *    EGA.SYS (also MOUSE.COM) - More for EGA cards.
- *    
+ *
  *    Yes, MS also added this support into their mouse driver. Don't
  *    ask me, I don't work for them.
  *
- * Joseph Pranevich - 9/98 
+ * Joseph Pranevich - 9/98
  *
  *  Jess Haas 2/99
- *	Added support for Vesa. It is not complete but is a start. 
+ *	Added support for Vesa. It is not complete but is a start.
  *	NOTE: Im not sure if i did all this right or if eny of it works.
- *	Currently i dont have a program that uses Vesa that actually gets far 
+ *	Currently i dont have a program that uses Vesa that actually gets far
  *	enough without crashing to do vesa stuff.
- * 
+ *
  *      Added additional vga graphic support - 3/99
  */
 
@@ -97,7 +97,7 @@
 	    AL_reg(context) = 0x4f;
 	    AH_reg(context) = 0x00; /* 0x00 = successful 0x01 = failed */
 	    break;
- 
+
 	case 0x01: /* GET SuperVGA MODE INFORMATION */
 	    FIXME("VESA GET SuperVGA Mode Information - Not supported\n");
 	    AL_reg(context) = 0x4f;
@@ -112,7 +112,7 @@
                 	   BX_reg(context));
                 	VGA_SetAlphaMode(40, 25);
                         data->VideoColumns = 40;
-                	break;                
+                	break;
             	case 0x02:
             	case 0x03:
             	case 0x07:
@@ -127,7 +127,7 @@
                     break;
  	        case 0x0E:
                     TRACE("Setting VESA 640x200 16-color mode\n");
-                    VGA_SetMode(640,200,4); 
+                    VGA_SetMode(640,200,4);
                     break;
 	        case 0x10:
                     TRACE("Setting VESA 640x350 16-color mode\n");
@@ -242,7 +242,7 @@
             data->VideoMode = BX_reg(context);
             AL_reg(context) = 0x4f;
 	    AH_reg(context) = 0x00;
-	    break;	
+	    break;
 	case 0x03: /* VESA SuperVGA BIOS - GET CURRENT VIDEO MODE */
 		AL_reg(context) = 0x4f;
 		AH_reg(context) = 0x00; /* should probly check if a vesa mode has ben set */
@@ -250,31 +250,31 @@
 		break;
 	case 0x04: /* VESA SuperVGA BIOS - SAVE/RESTORE SuperVGA VIDEO STATE */
 		ERR("VESA SAVE/RESTORE Video State - Not Implemented\n");
-		/* AL_reg(context) = 0x4f; = supported so not set since not implemented */	
+		/* AL_reg(context) = 0x4f; = supported so not set since not implemented */
 		/* maybe we should do this instead ? */
 		/* AH_reg(context = 0x01;  not implemented so just fail */
 		break;
 	case 0x05: /* VESA SuperVGA BIOS - CPU VIDEO MEMORY CONTROL */
 		ERR("VESA CPU VIDEO MEMORY CONTROL\n");
-		/* AL_reg(context) = 0x4f; = supported so not set since not implemented */	
+		/* AL_reg(context) = 0x4f; = supported so not set since not implemented */
 		/* maybe we should do this instead ? */
 		/* AH_reg(context = 0x001; not implemented so just fail */
 		break;
 	case 0x06: /* VESA GET/SET LOGICAL SCAN LINE LENGTH */
 		ERR("VESA GET/SET LOGICAL SCAN LINE LENGTH - Not Implemented\n");
-		/* AL_reg(context) = 0x4f; = supported so not set since not implemented */	
+		/* AL_reg(context) = 0x4f; = supported so not set since not implemented */
 		/* maybe we should do this instead ? */
 		/* AH_reg(context = 0x001; not implemented so just fail */
 		break;
 	case 0x07: /* GET/SET DISPLAY START */
 		ERR("VESA GET/SET DISPLAY START - Not Implemented\n");
-		/* AL_reg(context) = 0x4f; = supported so not set since not implemented */	
+		/* AL_reg(context) = 0x4f; = supported so not set since not implemented */
 		/* maybe we should do this instead ? */
 		/* AH_reg(context = 0x001; not implemented so just fail */
 		break;
 	case 0x08: /* GET/SET DAC PALETTE CONTROL */
 		ERR("VESA GET/SET DAC PALETTE CONTROL- Not Implemented\n");
-		/* AL_reg(context) = 0x4f; = supported so not set since not implemented */	
+		/* AL_reg(context) = 0x4f; = supported so not set since not implemented */
 		/* maybe we should do this instead ? */
 		/* AH_reg(context = 0x001; not implemented so just fail */
 		break;
@@ -286,13 +286,13 @@
                     /* is there?....................(A.C.)       */
                 TRACE("Just report the video not hercules compatible\n");
                 DX_reg(context) = 0xffff;
-                break; 
+                break;
 	case 0xff: /* Turn VESA ON/OFF */
 		/* i dont know what to do */
 		break;
 	default:
 		FIXME("VESA Function (0x%x) - Not Supported\n", AH_reg(context));
-		break;		
+		break;
 	}
     }
     else {
@@ -302,21 +302,21 @@
     case 0x00: /* SET VIDEO MODE */
         /* Text Modes: */
         /* (mode) (text rows/cols)
-            0x00 - 40x25 
+            0x00 - 40x25
             0x01 - 40x25
             0x02 - 80x25
-            0x03 - 80x25 or 80x43 or 80x50 (assume 80x25) 
+            0x03 - 80x25 or 80x43 or 80x50 (assume 80x25)
             0x07 - 80x25
         */
 
         /* Bit 7 of AH = 0 -> Clean the video memory
                          1 -> Don't clean it
-        */  
+        */
         if (!(AL_reg(context)&0x80)) {
-	    /* FIXME: Do something which cleans the video memory */ 
+	    /* FIXME: Do something which cleans the video memory */
         }
 
-        /* FIXME: Should we keep the bit 7 in the Bios Data memory? */ 
+        /* FIXME: Should we keep the bit 7 in the Bios Data memory? */
         AL_reg(context) &= ~0x80;
 
         switch (AL_reg(context)) {
@@ -327,7 +327,7 @@
                    AL_reg(context));
                 VGA_SetAlphaMode(40, 25);
                 data->VideoColumns = 40;
-                break;                
+                break;
             case 0x02:
             case 0x03:
             case 0x07:
@@ -343,7 +343,7 @@
                 break;
 	    case 0x0E:
                 TRACE("Setting VGA 640x200 16-color mode\n");
-                VGA_SetMode(640,200,4); 
+                VGA_SetMode(640,200,4);
                 break;
 	    case 0x10:
                 TRACE("Setting VGA 640x350 16-color mode\n");
@@ -358,7 +358,7 @@
                 VGA_SetMode(320,200,8);
                 break;
             default:
-                FIXME("Set Video Mode (0x%x) - Not Supported\n", 
+                FIXME("Set Video Mode (0x%x) - Not Supported\n",
                    AL_reg(context));
         }
         data->VideoMode = AL_reg(context);
@@ -367,7 +367,7 @@
     case 0x01: /* SET CURSOR SHAPE */
         FIXME("Set Cursor Shape - Not Supported\n");
         break;
-    
+
     case 0x02: /* SET CURSOR POSITION */
         /* BH = Page Number */ /* Not supported */
         /* DH = Row */ /* 0 is left */
@@ -381,7 +381,7 @@
         else
         {
            VGA_SetCursorPos(DL_reg(context), DH_reg(context));
-           TRACE("Set Cursor Position: %d %d\n", DH_reg(context), 
+           TRACE("Set Cursor Position: %d %d\n", DH_reg(context),
               DL_reg(context));
         }
         break;
@@ -414,8 +414,8 @@
         /* BH = Attribute */
         /* CH,CL = row, col upper-left */
         /* DH,DL = row, col lower-right */
-        scroll_window(SCROLL_UP, AL_reg(context), CH_reg(context), 
-           CL_reg(context), DH_reg(context), DL_reg(context), 
+        scroll_window(SCROLL_UP, AL_reg(context), CH_reg(context),
+           CL_reg(context), DH_reg(context), DL_reg(context),
            BH_reg(context));
         TRACE("Scroll Up Window %d\n", AL_reg(context));
         break;
@@ -425,8 +425,8 @@
         /* BH = Attribute */
         /* CH,CL = row, col upper-left */
         /* DH,DL = row, col lower-right */
-        scroll_window(SCROLL_DOWN, AL_reg(context), CH_reg(context), 
-           CL_reg(context), DH_reg(context), DL_reg(context), 
+        scroll_window(SCROLL_DOWN, AL_reg(context), CH_reg(context),
+           CL_reg(context), DH_reg(context), DL_reg(context),
            BH_reg(context));
         TRACE("Scroll Down Window %d\n", AL_reg(context));
         break;
@@ -449,7 +449,7 @@
         break;
 
     case 0x09: /* WRITE CHARACTER AND ATTRIBUTE AT CURSOR POSITION */
-    case 0x0a: /* WRITE CHARACTER ONLY AT CURSOR POSITION */ 
+    case 0x0a: /* WRITE CHARACTER ONLY AT CURSOR POSITION */
        /* AL = Character to display. */
        /* BH = Page Number */ /* We can't write to non-0 pages, yet. */
        /* BL = Attribute / Color */
@@ -474,26 +474,26 @@
        }
        break;
 
-    case 0x0b: 
+    case 0x0b:
         switch BH_reg(context) {
         case 0x00: /* SET BACKGROUND/BORDER COLOR */
             /* In text modes, this sets only the border... */
             /* According to the interrupt list and one of my books. */
-            /* Funny though that Beyond Zork seems to indicate that it 
+            /* Funny though that Beyond Zork seems to indicate that it
                also sets up the default background attributes for clears
                and scrolls... */
             /* Bear in mind here that we do not want to change,
                apparantly, the foreground or attribute of the background
                with this call, so we should check first to see what the
                foreground already is... FIXME */
-            FIXME("Set Background/Border Color: %d\n", 
+            FIXME("Set Background/Border Color: %d\n",
                BL_reg(context));
             break;
         case 0x01: /* SET PALETTE */
             FIXME("Set Palette - Not Supported\n");
             break;
         default:
-            FIXME("INT 10 AH = 0x0b BH = 0x%x - Unknown\n", 
+            FIXME("INT 10 AH = 0x0b BH = 0x%x - Unknown\n",
                BH_reg(context));
             break;
         }
@@ -503,12 +503,12 @@
         /* Not in graphics mode, can ignore w/o error */
         FIXME("Write Graphics Pixel - Not Supported\n");
         break;
-        
+
     case 0x0d: /* READ GRAPHICS PIXEL */
         /* Not in graphics mode, can ignore w/o error */
         FIXME("Read Graphics Pixel - Not Supported\n");
         break;
-              
+
     case 0x0e: /* TELETYPE OUTPUT */
         TRACE("Teletype Output\n");
         DOSVM_PutChar(AL_reg(context));
@@ -522,7 +522,7 @@
         BH_reg(context) = 0; /* Display page 0 */
         break;
 
-    case 0x10: 
+    case 0x10:
         switch AL_reg(context) {
         case 0x00: /* SET SINGLE PALETTE REGISTER - A.C. */
             TRACE("Set Single Palette Register - Reg 0x0%x Value 0x0%x\n",
@@ -532,7 +532,7 @@
             break;
         case 0x01: /* SET BORDER (OVERSCAN) */
             /* Text terminals have no overscan */
-	    /* I'm setting it anyway. - A.C.   */	
+	    /* I'm setting it anyway. - A.C.   */
             TRACE("Set Border (Overscan) - Ignored but set.\n");
 	    VGA_SetColor16(16,(int)BH_reg(context));
             break;
@@ -613,7 +613,7 @@
             FIXME("Perform Gray-scale summing - Not Supported\n");
             break;
         default:
-            FIXME("INT 10 AH = 0x10 AL = 0x%x - Unknown\n", 
+            FIXME("INT 10 AH = 0x10 AL = 0x%x - Unknown\n",
                AL_reg(context));
             break;
         }
@@ -634,7 +634,7 @@
         case 0x02: /* LOAD ROM 8x8 DOUBLE-DOT PATTERNS */
         case 0x12:
             FIXME(
-                "Load ROM 8x8 Double Dot Patterns - Not Supported\n");       
+                "Load ROM 8x8 Double Dot Patterns - Not Supported\n");
             break;
         case 0x03: /* SET BLOCK SPECIFIER */
             FIXME("Set Block Specifier - Not Supported\n");
@@ -663,12 +663,12 @@
             FIXME("Get Font Information - Not Supported\n");
             break;
         default:
-            FIXME("INT 10 AH = 0x11 AL = 0x%x - Unknown\n", 
+            FIXME("INT 10 AH = 0x11 AL = 0x%x - Unknown\n",
                AL_reg(context));
             break;
         }
         break;
-        
+
     case 0x12: /* ALTERNATE FUNCTION SELECT */
         switch BL_reg(context) {
         case 0x10: /* GET EGA INFO */
@@ -706,7 +706,7 @@
             FIXME("Video Address Control - Not Supported\n");
             break;
         default:
-            FIXME("INT 10 AH = 0x11 AL = 0x%x - Unknown\n", 
+            FIXME("INT 10 AH = 0x11 AL = 0x%x - Unknown\n",
                AL_reg(context));
             break;
         }
@@ -716,8 +716,8 @@
         /* This one does not imply that string be at cursor. */
         FIXME("Write String - Not Supported\n");
         break;
-                             
-    case 0x1a: 
+
+    case 0x1a:
         switch AL_reg(context) {
         case 0x00: /* GET DISPLAY COMBINATION CODE */
             TRACE("Get Display Combination Code\n");
@@ -729,7 +729,7 @@
             FIXME("Set Display Combination Code - Not Supported\n");
             break;
         default:
-            FIXME("INT 10 AH = 0x1a AL = 0x%x - Unknown\n", 
+            FIXME("INT 10 AH = 0x1a AL = 0x%x - Unknown\n",
                AL_reg(context));
             break;
         }
@@ -755,7 +755,7 @@
                     /* is there?....................(A.C.)       */
                 TRACE("Just report the video not hercules compatible\n");
                 DX_reg(context) = 0xffff;
-                break; 
+                break;
     default:
         FIXME("Unknown - 0x%x\n", AH_reg(context));
         INT_BARF( context, 0x10 );
@@ -763,7 +763,7 @@
     }
 }
 
-static void scroll_window(int direction, char lines, char row1, 
+static void scroll_window(int direction, char lines, char row1,
    char col1, char row2, char col2, char attribute)
 {
    if (!lines) /* Actually, clear the window */
@@ -779,7 +779,7 @@
        VGA_ScrollDownText(row1, col1, row2, col2, lines, attribute);
    }
 }
-   
+
 
 /**********************************************************************
  *         DOSVM_PutChar
diff --git a/dlls/winedos/int16.c b/dlls/winedos/int16.c
index f4538bf..795ff25 100644
--- a/dlls/winedos/int16.c
+++ b/dlls/winedos/int16.c
@@ -42,7 +42,7 @@
  * Handler for int 16h (keyboard)
  *
  * NOTE:
- * 
+ *
  *    KEYB.COM (DOS >3.2) adds functions to this interrupt, they are
  *    not currently listed here.
  */
diff --git a/dlls/winedos/int21.c b/dlls/winedos/int21.c
index ae76337..7f21dca 100644
--- a/dlls/winedos/int21.c
+++ b/dlls/winedos/int21.c
@@ -83,12 +83,12 @@
         /* FIXME: buffers are not flushed */
 
         /*
-         * If AL is not one of 0x01, 0x06, 0x07, 0x08, or 0x0a, 
+         * If AL is not one of 0x01, 0x06, 0x07, 0x08, or 0x0a,
          * the buffer is flushed but no input is attempted.
          */
         if(al != 0x01 && al != 0x06 && al != 0x07 && al != 0x08 && al != 0x0a)
             return;
-      
+
         AH_reg(context) = al;
     }
 
diff --git a/dlls/winedos/int33.c b/dlls/winedos/int33.c
index eba98c2..1286f52 100644
--- a/dlls/winedos/int33.c
+++ b/dlls/winedos/int33.c
@@ -208,7 +208,7 @@
 
   if (!VGA_GetMode(&Height,&Width,NULL)) {
     /* may need to do some coordinate scaling */
-    if (Width) 
+    if (Width)
       SX = 640/Width;
     if (!SX) SX=1;
   }
@@ -270,7 +270,7 @@
     mask |= 0x20;
   else if(!newMiddleButton && oldMiddleButton)
     mask |= 0x40;
- 
+
   VGA_GetAlphaMode(&Width, &Height);
 
   QueueMouseRelay(640 / Width * record->dwMousePosition.X,
diff --git a/dlls/winedos/int67.c b/dlls/winedos/int67.c
index 0f80d61..2693eb91 100644
--- a/dlls/winedos/int67.c
+++ b/dlls/winedos/int67.c
@@ -36,12 +36,12 @@
  */
 #define EMS_PAGE_ADDRESS(base,page) (((char*)base) + EMS_PAGE_SIZE * page)
 
-/* 
+/*
  * Maximum number of pages that can be allocated using EMS.
  */
 #define EMS_MAX_PAGES 1024
 
-/* 
+/*
  * Maximum number of EMS handles (allocated blocks).
  */
 #define EMS_MAX_HANDLES 256
@@ -78,24 +78,24 @@
 } *EMS_record = 0;
 
 /**********************************************************************
- *          EMS_init 
+ *          EMS_init
  *
  * Allocates and initialized page frame and EMS global import record.
  */
 static void EMS_init(void)
 {
   /*
-   * FIXME: Should dynamically allocate upper memory block for EMS frame. 
+   * FIXME: Should dynamically allocate upper memory block for EMS frame.
    */
   ULONG base = 0xd0000;
 
   if(EMS_record)
     return;
 
-  EMS_record = HeapAlloc(GetProcessHeap(), 
-                         HEAP_ZERO_MEMORY, 
+  EMS_record = HeapAlloc(GetProcessHeap(),
+                         HEAP_ZERO_MEMORY,
                          sizeof(*EMS_record));
-  
+
   EMS_record->frame_address = DOSMEM_MapDosToLinear(base);
   EMS_record->frame_selector = base >> 4;
 }
@@ -124,8 +124,8 @@
       EMS_record->handle[hindex].address = buffer;
       EMS_record->handle[hindex].pages = pages;
       EMS_record->used_pages += pages;
-      
-      DX_reg(context) = hindex; /* handle to allocated memory*/  
+
+      DX_reg(context) = hindex; /* handle to allocated memory*/
       AH_reg(context) = 0;      /* status: ok */
     }
   }
@@ -157,7 +157,7 @@
     memcpy(EMS_record->handle[hindex].name, ptr, 8);
     AH_reg(context) = 0;
     break;
-    
+
   default:
     INT_BARF(context,0x67);
     break;
@@ -259,7 +259,7 @@
   case 0x42: /* EMS - GET NUMBER OF PAGES */
     EMS_init();
     /* unallocated 16k pages */
-    BX_reg(context) = EMS_MAX_PAGES - EMS_record->used_pages; 
+    BX_reg(context) = EMS_MAX_PAGES - EMS_record->used_pages;
     /* total number of 16k pages */
     DX_reg(context) = EMS_MAX_PAGES;
     /* status: ok */
diff --git a/dlls/winedos/ioports.c b/dlls/winedos/ioports.c
index 81fd233..3e94b14 100644
--- a/dlls/winedos/ioports.c
+++ b/dlls/winedos/ioports.c
@@ -59,7 +59,7 @@
     case 0xC6:
     case 0xC8:
     case 0xCA:
-    case 0xCC:    
+    case 0xCC:
     case 0xCE:
     case 0x87:
     case 0x83:
@@ -98,7 +98,7 @@
     case 0x20:
         DOSVM_PIC_ioport_out( port, (BYTE)value );
         break;
-    case 0x226:	
+    case 0x226:
     case 0x22c:
         SB_ioport_out( port, (BYTE)value );
         break;
@@ -120,7 +120,7 @@
     case 0xC6:
     case 0xC8:
     case 0xCA:
-    case 0xCC:    
+    case 0xCC:
     case 0xCE:
     case 0x87:
     case 0x83:
diff --git a/dlls/winedos/module.c b/dlls/winedos/module.c
index dcf2dfa..d2b8a58 100644
--- a/dlls/winedos/module.c
+++ b/dlls/winedos/module.c
@@ -122,7 +122,7 @@
   /* command.com does not skip over multiple spaces */
 
   if(length > 126) {
-    ERR("Command line truncated! (length %d > maximum length 126)\n", 
+    ERR("Command line truncated! (length %d > maximum length 126)\n",
        length);
     length = 126;
   }
@@ -224,7 +224,7 @@
 
  SetFilePointer(hFile,0,NULL,FILE_BEGIN);
  if (   !ReadFile(hFile,&mz_header,sizeof(mz_header),&len,NULL)
-     || len != sizeof(mz_header) 
+     || len != sizeof(mz_header)
      || mz_header.e_magic != IMAGE_DOS_SIGNATURE) {
   char *p = strrchr( filename, '.' );
   if (!p || strcasecmp( p, ".com" ))  /* check for .COM extension */
@@ -478,7 +478,7 @@
   pTask->flags |= TDBF_WINOLDAP;
 
   _LeaveWin16Lock();
-  
+
   ResumeThread(dosvm_thread);
   rv = DOSVM_Loop(dosvm_thread);
 
diff --git a/dlls/winedos/soundblaster.c b/dlls/winedos/soundblaster.c
index 833351b..72e8fa6 100644
--- a/dlls/winedos/soundblaster.c
+++ b/dlls/winedos/soundblaster.c
@@ -28,7 +28,7 @@
 WINE_DEFAULT_DEBUG_CHANNEL(sblaster);
 
 /* Board Configuration */
-/* FIXME: Should be in a config file */ 
+/* FIXME: Should be in a config file */
 #define SB_IRQ 5
 #define SB_IRQ_PRI 11
 #define SB_DMA 1
@@ -39,15 +39,15 @@
 static int SamplesCount;
 static BYTE DSP_Command[256];  /* Store param numbers in bytes for each command */
 static BYTE DSP_InBuffer[10];  /* Store DSP command bytes parameters from host */
-static int InSize;             /* Nb of bytes in InBuffer */ 
+static int InSize;             /* Nb of bytes in InBuffer */
 static BYTE DSP_OutBuffer[10]; /* Store DSP information bytes to host */
-static int OutSize;            /* Nb of bytes in InBuffer */ 
+static int OutSize;            /* Nb of bytes in InBuffer */
 static int command;            /* Current command */
 static int end_sound_loop = 0;
 static int dma_enable = 0;
 
 /* The maximum size of a dma transfer can be 65536 */
-#define DMATRFSIZE 1024 
+#define DMATRFSIZE 1024
 
 /* DMA can perform 8 or 16-bit transfer */
 static BYTE dma_buffer[DMATRFSIZE*2];
@@ -79,7 +79,7 @@
     DWORD dwbyteswritten2 = 0;
     int size;
 
-    /* FIXME: this loop must be improved */ 
+    /* FIXME: this loop must be improved */
     while(!end_sound_loop)
     {
         Sleep(10);
@@ -212,11 +212,11 @@
     /* Put a garbage value in the output buffer */
     OutSize = 1;
     if (SB_Init())
-        /* All right, let's put the magic value for autodetection */ 
+        /* All right, let's put the magic value for autodetection */
         DSP_OutBuffer[0] = 0xaa;
     else
         /* Something is wrong, put 0 to failed audetection */
-        DSP_OutBuffer[0] = 0x00; 
+        DSP_OutBuffer[0] = 0x00;
 }
 
 /* Find a standard sampling rate for DirectSound */
@@ -254,7 +254,7 @@
 	   /* Fill the input buffer the command parameters if any */
            DSP_InBuffer[InSize++]=val;
         else {
-	    /* Process command */ 
+	    /* Process command */
             switch(command)
             {
             case 0x10: /* SB */
@@ -304,7 +304,7 @@
             case 0xE1: /* SB */
                 FIXME("DSP Version - Not Implemented\n");
                 break;
-            case 0xF2: /* SB */ 
+            case 0xF2: /* SB */
                 TRACE("IRQ Request (8-bit)\n");
                 DOSVM_QueueEvent(SB_IRQ,SB_IRQ_PRI,NULL,NULL);
                 break;
@@ -322,7 +322,7 @@
                     case 0xB:
 		        FIXME("Generic DAC/ADC 8-bit not supported\n");
                         SampleMode = 0;
-                        break;                    
+                        break;
                     case 0xC:
 		        FIXME("Generic DAC/ADC 16-bit not supported\n");
                         SampleMode = 1;
@@ -361,7 +361,7 @@
       if (OutSize)
           res = DSP_OutBuffer[--OutSize];
       else
-	  /* return the last byte */ 
+	  /* return the last byte */
 	  res = DSP_OutBuffer[0];
       break;
     /* DSP - Write Buffer Status */
diff --git a/dlls/winedos/vga.c b/dlls/winedos/vga.c
index fc1dfad..b58d9ec 100644
--- a/dlls/winedos/vga.c
+++ b/dlls/winedos/vga.c
@@ -1,6 +1,6 @@
 /*
  * VGA hardware emulation
- * 
+ *
  * Copyright 1998 Ove Kåven (with some help from Marcus Meissner)
  *
  * This library is free software; you can redistribute it and/or
@@ -102,8 +102,8 @@
   {0,0,0} /* FIXME: a series of continuous rainbow hues should follow */
 };
 
-/* 
- *   This palette is the dos default, converted from 18 bit color to 24. 
+/*
+ *   This palette is the dos default, converted from 18 bit color to 24.
  *      It contains only 64 entries of colors--all others are zeros.
  *          --Robert 'Admiral' Coeyman
  */
@@ -386,12 +386,12 @@
 }
 
 /* set all 17 [char wide] colors at once in 16 color mode. */
-void VGA_Set16Palette(char *Table) 
+void VGA_Set16Palette(char *Table)
 {
 	PALETTEENTRY *pal;
 	int c;
 
-    if (!lpddraw) return;         /* return if we're in text only mode */     
+    if (!lpddraw) return;         /* return if we're in text only mode */
 	bcopy((void *)&vga_16_palette,(void *)Table,17);
 		                    /* copy the entries into the table */
     for (c=0; c<17; c++) {                                /* 17 entries */
@@ -402,10 +402,10 @@
 }
 
 /* Get all 17 [ char wide ] colors at once in 16 color mode. */
-void VGA_Get16Palette(char *Table) 
+void VGA_Get16Palette(char *Table)
 {
 
-    if (!lpddraw) return;         /* return if we're in text only mode */     
+    if (!lpddraw) return;         /* return if we're in text only mode */
 	bcopy((void *)Table,(void *)&vga_16_palette,17);
 		                    /* copy the entries into the table */
 }
@@ -507,7 +507,7 @@
     siz.Y = 1;
     off.X = 0;
     off.Y = 0;
-    dest.Top=Y; 
+    dest.Top=Y;
     dest.Bottom=Y;
 
     VGA_GetAlphaMode(&XR, &YR);
@@ -517,7 +517,7 @@
        dest.Right = X + count;
 
         *dat++ = ch;
-        if (attr>=0) 
+        if (attr>=0)
          *dat = attr;
        else
          info.Attributes = *dat;
@@ -548,7 +548,7 @@
 
     VGA_GetAlphaMode(&width, &height);
     VGA_GetCursorPos(&x, &y);
-  
+
     switch(ascii) {
     case '\b':
         VGA_PutCharAt(' ', x, y);
@@ -563,7 +563,7 @@
         y++;
        x = 0;
        break;
-  
+
     case '\a':
         break;
 
@@ -598,7 +598,7 @@
     SetConsoleTextAttribute(VGA_AlphaConsole(), attr);
 }
 
-void VGA_ClearText(unsigned row1, unsigned col1, 
+void VGA_ClearText(unsigned row1, unsigned col1,
                   unsigned row2, unsigned col2,
                   BYTE attr)
 {
@@ -608,7 +608,7 @@
     HANDLE con = VGA_AlphaConsole();
     VGA_GetAlphaMode(&width, &height);
 
-    EnterCriticalSection(&vga_lock); 
+    EnterCriticalSection(&vga_lock);
 
     for(y=row1; y<=row2; y++) {
         off.X = col1;
@@ -626,14 +626,14 @@
     LeaveCriticalSection(&vga_lock);
 }
 
-void VGA_ScrollUpText(unsigned row1, unsigned col1, 
+void VGA_ScrollUpText(unsigned row1, unsigned col1,
                      unsigned row2, unsigned col2,
                      unsigned lines, BYTE attr)
 {
     FIXME("not implemented\n");
 }
 
-void VGA_ScrollDownText(unsigned row1, unsigned col1, 
+void VGA_ScrollDownText(unsigned row1, unsigned col1,
                        unsigned row2, unsigned col2,
                        unsigned lines, BYTE attr)
 {
diff --git a/dlls/winedos/vga.h b/dlls/winedos/vga.h
index 55262ee..5750b25 100644
--- a/dlls/winedos/vga.h
+++ b/dlls/winedos/vga.h
@@ -1,6 +1,6 @@
 /*
  * VGA emulation
- * 
+ *
  * Copyright 1998 Ove KÅven
  *
  * This library is free software; you can redistribute it and/or
@@ -45,13 +45,13 @@
 void VGA_WriteChars(unsigned X,unsigned Y,unsigned ch,int attr,int count);
 void VGA_PutChar(BYTE ascii);
 void VGA_SetTextAttribute(BYTE attr);
-void VGA_ClearText(unsigned row1, unsigned col1, 
+void VGA_ClearText(unsigned row1, unsigned col1,
                   unsigned row2, unsigned col2,
                   BYTE attr);
-void VGA_ScrollUpText(unsigned row1, unsigned col1, 
+void VGA_ScrollUpText(unsigned row1, unsigned col1,
                      unsigned row2, unsigned col2,
                      unsigned lines, BYTE attr);
-void VGA_ScrollDownText(unsigned row1, unsigned col1, 
+void VGA_ScrollDownText(unsigned row1, unsigned col1,
                        unsigned row2, unsigned col2,
                        unsigned lines, BYTE attr);
 void VGA_GetCharacterAtCursor(BYTE *ascii, BYTE *attr);
diff --git a/dlls/wineps/afm.c b/dlls/wineps/afm.c
index 39c8dac..7b73158 100644
--- a/dlls/wineps/afm.c
+++ b/dlls/wineps/afm.c
@@ -97,7 +97,7 @@
 			   sizeof(*newafmle));
     if (newafmle == NULL)
     	return FALSE;
-	
+
     newafmle->afm = afm;
 
     while(family) {
@@ -106,7 +106,7 @@
 	insert = &(family->next);
 	family = family->next;
     }
- 
+
     if(!family) {
         family = HeapAlloc(PSDRV_Heap, HEAP_ZERO_MEMORY,
 			   sizeof(*family));
@@ -137,7 +137,7 @@
 	    tmpafmle = tmpafmle->next;
 	}
     }
-    
+
     tmpafmle = family->afmlist;
     while(tmpafmle->next)
         tmpafmle = tmpafmle->next;
@@ -164,15 +164,15 @@
 	for(afmle = family->afmlist; afmle; afmle = afmle->next)
 	{
 	    INT i;
-	    
+
 	    TRACE("\tFontName '%s' (%i glyphs) - '%s' encoding:\n",
 	    	    afmle->afm->FontName, afmle->afm->NumofMetrics,
 		    afmle->afm->EncodingScheme);
-	    
+
 	    /* Uncomment to regenerate font data; see afm2c.c */
-		    
+
 	    /* PSDRV_AFM2C(afmle->afm); */
-	    
+
 	    for (i = 0; i < afmle->afm->NumofMetrics; ++i)
 	    {
 	    	TRACE("\t\tU+%.4lX; C %i; N '%s'\n", afmle->afm->Metrics[i].UV,
@@ -197,12 +197,12 @@
 {
     float   w = 0.0;
     int     i;
-    
+
     for (i = 0; i < afm->NumofMetrics; ++i)
     	w += afm->Metrics[i].WX;
-	
+
     w /= afm->NumofMetrics;
-    
+
     return (SHORT)(w + 0.5);
 }
 
@@ -216,25 +216,25 @@
     { 0x0075,  31 }, { 0x0076,  10 }, { 0x0077,  18 }, { 0x0078,   3 },
     { 0x0079,  18 }, { 0x007a,   2 }, { 0x0020, 166 }
 };
- 
+
 SHORT PSDRV_CalcAvgCharWidth(const AFM *afm)
 {
     float   w = 0.0;
     int     i;
-    
+
     for (i = 0; i < 27; ++i)
     {
     	const AFMMETRICS    *afmm;
-	
+
 	afmm = PSDRV_UVMetrics(UVweight[i].UV, afm);
 	if (afmm->UV != UVweight[i].UV)     /* UVMetrics returns first glyph */
 	    return MeanCharWidth(afm);	    /*   in font if UV is missing    */
-	    
+
 	w += afmm->WX * (float)(UVweight[i].weight);
     }
-    
+
     w /= 1000.0;
-    
+
     return (SHORT)(w + 0.5);
 }
 
@@ -243,24 +243,24 @@
  *  AddBuiltinAFMs
  *
  */
- 
+
 static BOOL AddBuiltinAFMs()
 {
     const AFM *const	*afm = PSDRV_BuiltinAFMs;
-    
+
     while (*afm != NULL)
     {
     	BOOL	added;
-    
+
     	if (PSDRV_AddAFMtoList(&PSDRV_AFMFontList, *afm, &added) == FALSE)
 	    return FALSE;
-	    
+
 	if (added == FALSE)
 	    TRACE("Ignoring built-in font %s\n", (*afm)->FontName);
-	    
+
 	++afm;
     }
-    
+
     return TRUE;
 }
 
@@ -276,12 +276,12 @@
  * If this function fails, PSDRV_Init will destroy PSDRV_Heap, so don't worry
  * about freeing all the memory that's been allocated.
  */
- 
+
 BOOL PSDRV_GetFontMetrics(void)
 {
     if (PSDRV_GlyphListInit() != 0)
     	return FALSE;
-	
+
     if (PSDRV_GetType1Metrics() == FALSE)
     	return FALSE;
 
@@ -292,10 +292,10 @@
 
     if (AddBuiltinAFMs() == FALSE)
     	return FALSE;
-	
+
     PSDRV_IndexGlyphList(); 	    /* Enable fast searching of glyph names */
-    
+
     PSDRV_DumpFontList();
-    
+
     return TRUE;
 }
diff --git a/dlls/wineps/afm2c.c b/dlls/wineps/afm2c.c
index aa9494a..10de740 100644
--- a/dlls/wineps/afm2c.c
+++ b/dlls/wineps/afm2c.c
@@ -57,14 +57,14 @@
 {
     int ntp = np & 0xfffffff8;
     int ctp = cp & 0xfffffff8;
-    
+
     while (ctp < ntp)
     {
     	fputc('\t', of);
 	ctp += 8;
 	cp = ctp;
     }
-    
+
     while (cp < np)
     {
     	fputc(' ', of);
@@ -75,7 +75,7 @@
 static void writeHeader(FILE *of, const AFM *afm, const char *buffer)
 {
     int i;
-    
+
     fputc('/', of);
     for (i = 1; i < 80; ++i)
     	fputc('*', of);
@@ -98,18 +98,18 @@
 static void writeMetrics(FILE *of, const AFM *afm, const char *buffer)
 {
     int i;
-    
+
     fputs("\n\n/*\n *  Glyph metrics\n */\n\n", of);
-    
-    fprintf(of, "static const AFMMETRICS metrics[%i] = \n{\n",
+
+    fprintf(of, "static const AFMMETRICS metrics[%i] =\n{\n",
     	    afm->NumofMetrics);
-	    
+
     for (i = 0; i < afm->NumofMetrics - 1; ++i)
     {
     	fprintf(of, "    { %3i, 0x%.4lx, %4g, GN_%s },\n", afm->Metrics[i].C,
 	    	afm->Metrics[i].UV, afm->Metrics[i].WX, afm->Metrics[i].N->sz);
     }
-    
+
     fprintf(of, "    { %3i, 0x%.4lx, %4g, GN_%s }\n};\n", afm->Metrics[i].C,
     	    afm->Metrics[i].UV, afm->Metrics[i].WX, afm->Metrics[i].N->sz);
 }
@@ -188,30 +188,30 @@
     char    buffer[256];
     FILE    *of;
     int     i;
-    
+
     strncpy(buffer, afm->FontName, sizeof(buffer) - 3);
     buffer[sizeof(buffer) - 3] = '\0';
-    
+
     for (i = 0; i < strlen(buffer); ++i)
     	if (buffer[i] == '-')
 	    buffer[i] = '_';
-	    
+
     buffer[i] = '.';  buffer[i + 1] = 'c';  buffer[i + 2] = '\0';
 
     MESSAGE("writing '%s'\n", buffer);
-    
+
     of = fopen(buffer, "w");
     if (of == NULL)
     {
     	ERR("error opening '%s' for writing\n", buffer);
 	return;
     }
-    
+
     buffer[i] = '\0';
-    
+
     writeHeader(of, afm, buffer);
     writeMetrics(of, afm, buffer);
     writeAFM(of, afm, buffer);
-    
+
     fclose(of);
 }
diff --git a/dlls/wineps/brush.c b/dlls/wineps/brush.c
index bcddc27..d5e522c 100644
--- a/dlls/wineps/brush.c
+++ b/dlls/wineps/brush.c
@@ -183,7 +183,7 @@
 	    if(logbrush.lbHatch == HS_FDIAGONAL)
 	        break;
 	    /* else fallthrough for HS_DIAGCROSS */
-	    
+
 	case HS_BDIAGONAL:
 	    PSDRV_WriteGSave(physDev);
 	    PSDRV_Clip(physDev, EO);
@@ -222,7 +222,7 @@
 	        FIXME("Trying to set a pattern brush on a level 1 printer\n");
 		ret = FALSE;
 	    }
-	    HeapFree(PSDRV_Heap, 0, bits);	
+	    HeapFree(PSDRV_Heap, 0, bits);
 	}
 	break;
 
diff --git a/dlls/wineps/clipping.c b/dlls/wineps/clipping.c
index bbb95ab..85f78d7 100644
--- a/dlls/wineps/clipping.c
+++ b/dlls/wineps/clipping.c
@@ -1,7 +1,7 @@
 /*
  *	PostScript clipping functions
  *
- *	Copyright 1999  Luc Tourangau 
+ *	Copyright 1999  Luc Tourangau
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -62,9 +62,9 @@
     {
         RECT *pRect = (RECT *)rgndata->Buffer;
 
-        PSDRV_WriteRectClip(physDev, pRect->left, pRect->top, 
-                            pRect->right - pRect->left, 
-                            pRect->bottom - pRect->top);        
+        PSDRV_WriteRectClip(physDev, pRect->left, pRect->top,
+                            pRect->right - pRect->left,
+                            pRect->bottom - pRect->top);
     }
     else
     {
@@ -79,15 +79,15 @@
                                 pRect->left);
             PSDRV_WriteArrayPut(physDev, szArrayName, i * 4 + 1,
                                 pRect->top);
-            PSDRV_WriteArrayPut(physDev, szArrayName, i * 4 + 2, 
+            PSDRV_WriteArrayPut(physDev, szArrayName, i * 4 + 2,
                                 pRect->right - pRect->left);
-            PSDRV_WriteArrayPut(physDev, szArrayName, i * 4 + 3, 
+            PSDRV_WriteArrayPut(physDev, szArrayName, i * 4 + 3,
                                 pRect->bottom - pRect->top);
         }
 
         PSDRV_WriteRectClip2(physDev, szArrayName);
     }
-    
+
     HeapFree( GetProcessHeap(), 0, rgndata );
     return;
 }
diff --git a/dlls/wineps/color.c b/dlls/wineps/color.c
index fa3b600..e93bac2 100644
--- a/dlls/wineps/color.c
+++ b/dlls/wineps/color.c
@@ -27,7 +27,7 @@
  *	     PSDRV_CmpColor
  *
  * Return TRUE if col1 == col2
- */ 
+ */
 BOOL PSDRV_CmpColor(PSCOLOR *col1, PSCOLOR *col2)
 {
     if(col1->type != col2->type)
@@ -55,7 +55,7 @@
  *	     PSDRV_CopyColor
  *
  * Copies col2 into col1. Return FALSE on error.
- */ 
+ */
 BOOL PSDRV_CopyColor(PSCOLOR *col1, PSCOLOR *col2)
 {
 
diff --git a/dlls/wineps/data/AvantGarde_Book.c b/dlls/wineps/data/AvantGarde_Book.c
index 19f8d80..803f496 100644
--- a/dlls/wineps/data/AvantGarde_Book.c
+++ b/dlls/wineps/data/AvantGarde_Book.c
@@ -17,7 +17,7 @@
  *  Glyph metrics
  */
 
-static const AFMMETRICS metrics[228] = 
+static const AFMMETRICS metrics[228] =
 {
     {  32, 0x0020,  277, GN_space },
     {  33, 0x0021,  295, GN_exclam },
diff --git a/dlls/wineps/data/AvantGarde_BookOblique.c b/dlls/wineps/data/AvantGarde_BookOblique.c
index 484ff3c..805163d 100644
--- a/dlls/wineps/data/AvantGarde_BookOblique.c
+++ b/dlls/wineps/data/AvantGarde_BookOblique.c
@@ -17,7 +17,7 @@
  *  Glyph metrics
  */
 
-static const AFMMETRICS metrics[228] = 
+static const AFMMETRICS metrics[228] =
 {
     {  32, 0x0020,  277, GN_space },
     {  33, 0x0021,  295, GN_exclam },
diff --git a/dlls/wineps/data/AvantGarde_Demi.c b/dlls/wineps/data/AvantGarde_Demi.c
index c44a566..9580f92 100644
--- a/dlls/wineps/data/AvantGarde_Demi.c
+++ b/dlls/wineps/data/AvantGarde_Demi.c
@@ -17,7 +17,7 @@
  *  Glyph metrics
  */
 
-static const AFMMETRICS metrics[228] = 
+static const AFMMETRICS metrics[228] =
 {
     {  32, 0x0020,  280, GN_space },
     {  33, 0x0021,  280, GN_exclam },
diff --git a/dlls/wineps/data/AvantGarde_DemiOblique.c b/dlls/wineps/data/AvantGarde_DemiOblique.c
index 1b11a4a..085e6df 100644
--- a/dlls/wineps/data/AvantGarde_DemiOblique.c
+++ b/dlls/wineps/data/AvantGarde_DemiOblique.c
@@ -17,7 +17,7 @@
  *  Glyph metrics
  */
 
-static const AFMMETRICS metrics[228] = 
+static const AFMMETRICS metrics[228] =
 {
     {  32, 0x0020,  280, GN_space },
     {  33, 0x0021,  280, GN_exclam },
diff --git a/dlls/wineps/data/Bookman_Demi.c b/dlls/wineps/data/Bookman_Demi.c
index 02a815d..0859e48 100644
--- a/dlls/wineps/data/Bookman_Demi.c
+++ b/dlls/wineps/data/Bookman_Demi.c
@@ -17,7 +17,7 @@
  *  Glyph metrics
  */
 
-static const AFMMETRICS metrics[228] = 
+static const AFMMETRICS metrics[228] =
 {
     {  32, 0x0020,  340, GN_space },
     {  33, 0x0021,  360, GN_exclam },
diff --git a/dlls/wineps/data/Bookman_DemiItalic.c b/dlls/wineps/data/Bookman_DemiItalic.c
index 4cd8970..ffa8bb7 100644
--- a/dlls/wineps/data/Bookman_DemiItalic.c
+++ b/dlls/wineps/data/Bookman_DemiItalic.c
@@ -17,7 +17,7 @@
  *  Glyph metrics
  */
 
-static const AFMMETRICS metrics[228] = 
+static const AFMMETRICS metrics[228] =
 {
     {  32, 0x0020,  340, GN_space },
     {  33, 0x0021,  320, GN_exclam },
diff --git a/dlls/wineps/data/Bookman_Light.c b/dlls/wineps/data/Bookman_Light.c
index d400110..36a73c4 100644
--- a/dlls/wineps/data/Bookman_Light.c
+++ b/dlls/wineps/data/Bookman_Light.c
@@ -17,7 +17,7 @@
  *  Glyph metrics
  */
 
-static const AFMMETRICS metrics[228] = 
+static const AFMMETRICS metrics[228] =
 {
     {  32, 0x0020,  320, GN_space },
     {  33, 0x0021,  300, GN_exclam },
diff --git a/dlls/wineps/data/Bookman_LightItalic.c b/dlls/wineps/data/Bookman_LightItalic.c
index f986d00..e315b0a 100644
--- a/dlls/wineps/data/Bookman_LightItalic.c
+++ b/dlls/wineps/data/Bookman_LightItalic.c
@@ -17,7 +17,7 @@
  *  Glyph metrics
  */
 
-static const AFMMETRICS metrics[228] = 
+static const AFMMETRICS metrics[228] =
 {
     {  32, 0x0020,  300, GN_space },
     {  33, 0x0021,  320, GN_exclam },
diff --git a/dlls/wineps/data/Courier.c b/dlls/wineps/data/Courier.c
index 3181784..4c89876 100644
--- a/dlls/wineps/data/Courier.c
+++ b/dlls/wineps/data/Courier.c
@@ -17,7 +17,7 @@
  *  Glyph metrics
  */
 
-static const AFMMETRICS metrics[243] = 
+static const AFMMETRICS metrics[243] =
 {
     {  32, 0x0020,  600, GN_space },
     {  33, 0x0021,  600, GN_exclam },
diff --git a/dlls/wineps/data/Courier_Bold.c b/dlls/wineps/data/Courier_Bold.c
index 9d2a087..4bb6543 100644
--- a/dlls/wineps/data/Courier_Bold.c
+++ b/dlls/wineps/data/Courier_Bold.c
@@ -17,7 +17,7 @@
  *  Glyph metrics
  */
 
-static const AFMMETRICS metrics[243] = 
+static const AFMMETRICS metrics[243] =
 {
     {  32, 0x0020,  600, GN_space },
     {  33, 0x0021,  600, GN_exclam },
diff --git a/dlls/wineps/data/Courier_BoldOblique.c b/dlls/wineps/data/Courier_BoldOblique.c
index b9f65df..8657a2b 100644
--- a/dlls/wineps/data/Courier_BoldOblique.c
+++ b/dlls/wineps/data/Courier_BoldOblique.c
@@ -17,7 +17,7 @@
  *  Glyph metrics
  */
 
-static const AFMMETRICS metrics[243] = 
+static const AFMMETRICS metrics[243] =
 {
     {  32, 0x0020,  600, GN_space },
     {  33, 0x0021,  600, GN_exclam },
diff --git a/dlls/wineps/data/Courier_Oblique.c b/dlls/wineps/data/Courier_Oblique.c
index 4bbdc66..cd4324d 100644
--- a/dlls/wineps/data/Courier_Oblique.c
+++ b/dlls/wineps/data/Courier_Oblique.c
@@ -17,7 +17,7 @@
  *  Glyph metrics
  */
 
-static const AFMMETRICS metrics[243] = 
+static const AFMMETRICS metrics[243] =
 {
     {  32, 0x0020,  600, GN_space },
     {  33, 0x0021,  600, GN_exclam },
diff --git a/dlls/wineps/data/Helvetica.c b/dlls/wineps/data/Helvetica.c
index 090c565..0ead75b 100644
--- a/dlls/wineps/data/Helvetica.c
+++ b/dlls/wineps/data/Helvetica.c
@@ -17,7 +17,7 @@
  *  Glyph metrics
  */
 
-static const AFMMETRICS metrics[228] = 
+static const AFMMETRICS metrics[228] =
 {
     {  32, 0x0020,  278, GN_space },
     {  33, 0x0021,  278, GN_exclam },
diff --git a/dlls/wineps/data/Helvetica_Bold.c b/dlls/wineps/data/Helvetica_Bold.c
index 3dd4b48..e9cf1a3 100644
--- a/dlls/wineps/data/Helvetica_Bold.c
+++ b/dlls/wineps/data/Helvetica_Bold.c
@@ -17,7 +17,7 @@
  *  Glyph metrics
  */
 
-static const AFMMETRICS metrics[228] = 
+static const AFMMETRICS metrics[228] =
 {
     {  32, 0x0020,  278, GN_space },
     {  33, 0x0021,  333, GN_exclam },
diff --git a/dlls/wineps/data/Helvetica_BoldOblique.c b/dlls/wineps/data/Helvetica_BoldOblique.c
index efa80d7..e807a9a 100644
--- a/dlls/wineps/data/Helvetica_BoldOblique.c
+++ b/dlls/wineps/data/Helvetica_BoldOblique.c
@@ -17,7 +17,7 @@
  *  Glyph metrics
  */
 
-static const AFMMETRICS metrics[228] = 
+static const AFMMETRICS metrics[228] =
 {
     {  32, 0x0020,  278, GN_space },
     {  33, 0x0021,  333, GN_exclam },
diff --git a/dlls/wineps/data/Helvetica_Narrow.c b/dlls/wineps/data/Helvetica_Narrow.c
index ca93121..64f2e88 100644
--- a/dlls/wineps/data/Helvetica_Narrow.c
+++ b/dlls/wineps/data/Helvetica_Narrow.c
@@ -17,7 +17,7 @@
  *  Glyph metrics
  */
 
-static const AFMMETRICS metrics[228] = 
+static const AFMMETRICS metrics[228] =
 {
     {  32, 0x0020,  228, GN_space },
     {  33, 0x0021,  228, GN_exclam },
diff --git a/dlls/wineps/data/Helvetica_Narrow_Bold.c b/dlls/wineps/data/Helvetica_Narrow_Bold.c
index a827e86..8f6a6e3 100644
--- a/dlls/wineps/data/Helvetica_Narrow_Bold.c
+++ b/dlls/wineps/data/Helvetica_Narrow_Bold.c
@@ -17,7 +17,7 @@
  *  Glyph metrics
  */
 
-static const AFMMETRICS metrics[228] = 
+static const AFMMETRICS metrics[228] =
 {
     {  32, 0x0020,  228, GN_space },
     {  33, 0x0021,  273, GN_exclam },
diff --git a/dlls/wineps/data/Helvetica_Narrow_BoldOblique.c b/dlls/wineps/data/Helvetica_Narrow_BoldOblique.c
index 0cd25d8..0ad9edc 100644
--- a/dlls/wineps/data/Helvetica_Narrow_BoldOblique.c
+++ b/dlls/wineps/data/Helvetica_Narrow_BoldOblique.c
@@ -17,7 +17,7 @@
  *  Glyph metrics
  */
 
-static const AFMMETRICS metrics[228] = 
+static const AFMMETRICS metrics[228] =
 {
     {  32, 0x0020,  228, GN_space },
     {  33, 0x0021,  273, GN_exclam },
diff --git a/dlls/wineps/data/Helvetica_Narrow_Oblique.c b/dlls/wineps/data/Helvetica_Narrow_Oblique.c
index 231eabd..b127687 100644
--- a/dlls/wineps/data/Helvetica_Narrow_Oblique.c
+++ b/dlls/wineps/data/Helvetica_Narrow_Oblique.c
@@ -17,7 +17,7 @@
  *  Glyph metrics
  */
 
-static const AFMMETRICS metrics[228] = 
+static const AFMMETRICS metrics[228] =
 {
     {  32, 0x0020,  228, GN_space },
     {  33, 0x0021,  228, GN_exclam },
diff --git a/dlls/wineps/data/Helvetica_Oblique.c b/dlls/wineps/data/Helvetica_Oblique.c
index 7701568..b6eba3a 100644
--- a/dlls/wineps/data/Helvetica_Oblique.c
+++ b/dlls/wineps/data/Helvetica_Oblique.c
@@ -17,7 +17,7 @@
  *  Glyph metrics
  */
 
-static const AFMMETRICS metrics[228] = 
+static const AFMMETRICS metrics[228] =
 {
     {  32, 0x0020,  278, GN_space },
     {  33, 0x0021,  278, GN_exclam },
diff --git a/dlls/wineps/data/NewCenturySchlbk_Bold.c b/dlls/wineps/data/NewCenturySchlbk_Bold.c
index 7488d2a..b88fc28 100644
--- a/dlls/wineps/data/NewCenturySchlbk_Bold.c
+++ b/dlls/wineps/data/NewCenturySchlbk_Bold.c
@@ -17,7 +17,7 @@
  *  Glyph metrics
  */
 
-static const AFMMETRICS metrics[228] = 
+static const AFMMETRICS metrics[228] =
 {
     {  32, 0x0020,  287, GN_space },
     {  33, 0x0021,  296, GN_exclam },
diff --git a/dlls/wineps/data/NewCenturySchlbk_BoldItalic.c b/dlls/wineps/data/NewCenturySchlbk_BoldItalic.c
index 31ffed2..f0c6967 100644
--- a/dlls/wineps/data/NewCenturySchlbk_BoldItalic.c
+++ b/dlls/wineps/data/NewCenturySchlbk_BoldItalic.c
@@ -17,7 +17,7 @@
  *  Glyph metrics
  */
 
-static const AFMMETRICS metrics[228] = 
+static const AFMMETRICS metrics[228] =
 {
     {  32, 0x0020,  287, GN_space },
     {  33, 0x0021,  333, GN_exclam },
diff --git a/dlls/wineps/data/NewCenturySchlbk_Italic.c b/dlls/wineps/data/NewCenturySchlbk_Italic.c
index 9d5b49a..776af09 100644
--- a/dlls/wineps/data/NewCenturySchlbk_Italic.c
+++ b/dlls/wineps/data/NewCenturySchlbk_Italic.c
@@ -17,7 +17,7 @@
  *  Glyph metrics
  */
 
-static const AFMMETRICS metrics[228] = 
+static const AFMMETRICS metrics[228] =
 {
     {  32, 0x0020,  278, GN_space },
     {  33, 0x0021,  333, GN_exclam },
diff --git a/dlls/wineps/data/NewCenturySchlbk_Roman.c b/dlls/wineps/data/NewCenturySchlbk_Roman.c
index 412f8fc..30e6268 100644
--- a/dlls/wineps/data/NewCenturySchlbk_Roman.c
+++ b/dlls/wineps/data/NewCenturySchlbk_Roman.c
@@ -17,7 +17,7 @@
  *  Glyph metrics
  */
 
-static const AFMMETRICS metrics[228] = 
+static const AFMMETRICS metrics[228] =
 {
     {  32, 0x0020,  278, GN_space },
     {  33, 0x0021,  296, GN_exclam },
diff --git a/dlls/wineps/data/Palatino_Bold.c b/dlls/wineps/data/Palatino_Bold.c
index 64d5173..8a973ee 100644
--- a/dlls/wineps/data/Palatino_Bold.c
+++ b/dlls/wineps/data/Palatino_Bold.c
@@ -17,7 +17,7 @@
  *  Glyph metrics
  */
 
-static const AFMMETRICS metrics[228] = 
+static const AFMMETRICS metrics[228] =
 {
     {  32, 0x0020,  250, GN_space },
     {  33, 0x0021,  278, GN_exclam },
diff --git a/dlls/wineps/data/Palatino_BoldItalic.c b/dlls/wineps/data/Palatino_BoldItalic.c
index c8184a0..e5f3fdb 100644
--- a/dlls/wineps/data/Palatino_BoldItalic.c
+++ b/dlls/wineps/data/Palatino_BoldItalic.c
@@ -17,7 +17,7 @@
  *  Glyph metrics
  */
 
-static const AFMMETRICS metrics[228] = 
+static const AFMMETRICS metrics[228] =
 {
     {  32, 0x0020,  250, GN_space },
     {  33, 0x0021,  333, GN_exclam },
diff --git a/dlls/wineps/data/Palatino_Italic.c b/dlls/wineps/data/Palatino_Italic.c
index 9aed154..762cc55 100644
--- a/dlls/wineps/data/Palatino_Italic.c
+++ b/dlls/wineps/data/Palatino_Italic.c
@@ -17,7 +17,7 @@
  *  Glyph metrics
  */
 
-static const AFMMETRICS metrics[228] = 
+static const AFMMETRICS metrics[228] =
 {
     {  32, 0x0020,  250, GN_space },
     {  33, 0x0021,  333, GN_exclam },
diff --git a/dlls/wineps/data/Palatino_Roman.c b/dlls/wineps/data/Palatino_Roman.c
index 2565ad0..598f5e2 100644
--- a/dlls/wineps/data/Palatino_Roman.c
+++ b/dlls/wineps/data/Palatino_Roman.c
@@ -17,7 +17,7 @@
  *  Glyph metrics
  */
 
-static const AFMMETRICS metrics[228] = 
+static const AFMMETRICS metrics[228] =
 {
     {  32, 0x0020,  250, GN_space },
     {  33, 0x0021,  278, GN_exclam },
diff --git a/dlls/wineps/data/Symbol.c b/dlls/wineps/data/Symbol.c
index f81ecf3..9458a62 100644
--- a/dlls/wineps/data/Symbol.c
+++ b/dlls/wineps/data/Symbol.c
@@ -17,7 +17,7 @@
  *  Glyph metrics
  */
 
-static const AFMMETRICS metrics[188] = 
+static const AFMMETRICS metrics[188] =
 {
     {  32, 0xf020,  250, GN_space },
     {  33, 0xf021,  333, GN_exclam },
diff --git a/dlls/wineps/data/Times_Bold.c b/dlls/wineps/data/Times_Bold.c
index 92a202c..56036fd 100644
--- a/dlls/wineps/data/Times_Bold.c
+++ b/dlls/wineps/data/Times_Bold.c
@@ -17,7 +17,7 @@
  *  Glyph metrics
  */
 
-static const AFMMETRICS metrics[228] = 
+static const AFMMETRICS metrics[228] =
 {
     {  32, 0x0020,  250, GN_space },
     {  33, 0x0021,  333, GN_exclam },
diff --git a/dlls/wineps/data/Times_BoldItalic.c b/dlls/wineps/data/Times_BoldItalic.c
index 05c607a..a127b43 100644
--- a/dlls/wineps/data/Times_BoldItalic.c
+++ b/dlls/wineps/data/Times_BoldItalic.c
@@ -17,7 +17,7 @@
  *  Glyph metrics
  */
 
-static const AFMMETRICS metrics[228] = 
+static const AFMMETRICS metrics[228] =
 {
     {  32, 0x0020,  250, GN_space },
     {  33, 0x0021,  389, GN_exclam },
diff --git a/dlls/wineps/data/Times_Italic.c b/dlls/wineps/data/Times_Italic.c
index f329333..5e19284 100644
--- a/dlls/wineps/data/Times_Italic.c
+++ b/dlls/wineps/data/Times_Italic.c
@@ -17,7 +17,7 @@
  *  Glyph metrics
  */
 
-static const AFMMETRICS metrics[228] = 
+static const AFMMETRICS metrics[228] =
 {
     {  32, 0x0020,  250, GN_space },
     {  33, 0x0021,  333, GN_exclam },
diff --git a/dlls/wineps/data/Times_Roman.c b/dlls/wineps/data/Times_Roman.c
index f1e43cb..6f8eb4a 100644
--- a/dlls/wineps/data/Times_Roman.c
+++ b/dlls/wineps/data/Times_Roman.c
@@ -17,7 +17,7 @@
  *  Glyph metrics
  */
 
-static const AFMMETRICS metrics[228] = 
+static const AFMMETRICS metrics[228] =
 {
     {  32, 0x0020,  250, GN_space },
     {  33, 0x0021,  333, GN_exclam },
diff --git a/dlls/wineps/data/ZapfChancery_MediumItalic.c b/dlls/wineps/data/ZapfChancery_MediumItalic.c
index 25704f3..1353cf7 100644
--- a/dlls/wineps/data/ZapfChancery_MediumItalic.c
+++ b/dlls/wineps/data/ZapfChancery_MediumItalic.c
@@ -17,7 +17,7 @@
  *  Glyph metrics
  */
 
-static const AFMMETRICS metrics[228] = 
+static const AFMMETRICS metrics[228] =
 {
     {  32, 0x0020,  220, GN_space },
     {  33, 0x0021,  280, GN_exclam },
diff --git a/dlls/wineps/data/ZapfDingbats.c b/dlls/wineps/data/ZapfDingbats.c
index ad27bf3..2c7ce49 100644
--- a/dlls/wineps/data/ZapfDingbats.c
+++ b/dlls/wineps/data/ZapfDingbats.c
@@ -17,7 +17,7 @@
  *  Glyph metrics
  */
 
-static const AFMMETRICS metrics[188] = 
+static const AFMMETRICS metrics[188] =
 {
     {  32, 0xf020,  278, GN_space },
     {  33, 0xf021,  974, GN_a1 },
diff --git a/dlls/wineps/data/agl.c b/dlls/wineps/data/agl.c
index 76e8271..c7c2d38 100644
--- a/dlls/wineps/data/agl.c
+++ b/dlls/wineps/data/agl.c
@@ -1353,7 +1353,7 @@
 
 const INT PSDRV_AGLbyNameSize = 1039;
 
-const UNICODEGLYPH PSDRV_AGLbyName[1039] = 
+const UNICODEGLYPH PSDRV_AGLbyName[1039] =
 {
     { 0x0041, GN_A },			    { 0x00c6, GN_AE },
     { 0x01fc, GN_AEacute },		    { 0xf7e6, GN_AEsmall },
@@ -1884,7 +1884,7 @@
 
 const INT PSDRV_AGLbyUVSize = 1051;
 
-const UNICODEGLYPH PSDRV_AGLbyUV[1051] = 
+const UNICODEGLYPH PSDRV_AGLbyUV[1051] =
 {
     { 0x0020, GN_space },		    { 0x0021, GN_exclam },
     { 0x0022, GN_quotedbl },		    { 0x0023, GN_numbersign },
diff --git a/dlls/wineps/driver.c b/dlls/wineps/driver.c
index 9738e06..4d7a717 100644
--- a/dlls/wineps/driver.c
+++ b/dlls/wineps/driver.c
@@ -1,7 +1,7 @@
 /*
  * Exported functions from the PostScript driver.
  *
- * [Ext]DeviceMode, DeviceCapabilities, AdvancedSetupDialog. 
+ * [Ext]DeviceMode, DeviceCapabilities, AdvancedSetupDialog.
  *
  * Will need ExtTextOut for winword6 (urgh!)
  *
@@ -65,7 +65,7 @@
 	}
 	if(page) {
 	    dm1->dmPublic.u1.s1.dmPaperSize = dm2->dmPublic.u1.s1.dmPaperSize;
-	    dm1->dmPublic.u1.s1.dmPaperWidth = page->PaperDimension->x * 
+	    dm1->dmPublic.u1.s1.dmPaperWidth = page->PaperDimension->x *
 								254.0 / 72.0;
 	    dm1->dmPublic.u1.s1.dmPaperLength = page->PaperDimension->y *
 								254.0 / 72.0;
@@ -80,8 +80,8 @@
 	}
     } else if((dm2->dmPublic.dmFields & DM_PAPERLENGTH) &&
        (dm2->dmPublic.dmFields & DM_PAPERWIDTH)) {
-        dm1->dmPublic.u1.s1.dmPaperLength = dm2->dmPublic.u1.s1.dmPaperLength; 
-        dm1->dmPublic.u1.s1.dmPaperWidth = dm2->dmPublic.u1.s1.dmPaperWidth; 
+        dm1->dmPublic.u1.s1.dmPaperLength = dm2->dmPublic.u1.s1.dmPaperLength;
+        dm1->dmPublic.u1.s1.dmPaperWidth = dm2->dmPublic.u1.s1.dmPaperWidth;
 	TRACE("Changing PaperLength|Width to %dx%d\n",
 	      dm2->dmPublic.u1.s1.dmPaperLength,
 	      dm2->dmPublic.u1.s1.dmPaperWidth);
@@ -108,7 +108,7 @@
 
     if(dm2->dmPublic.dmFields & DM_DEFAULTSOURCE) {
         INPUTSLOT *slot;
-	
+
 	for(slot = pi->ppd->InputSlots; slot; slot = slot->next) {
 	    if(slot->WinBin == dm2->dmPublic.dmDefaultSource)
 	        break;
@@ -191,7 +191,7 @@
 			       lParam)
 {
   PSDRV_DLGINFO *di;
-  int i, Cursel = 0; 
+  int i, Cursel = 0;
   PAGESIZE *ps;
 
 
@@ -201,7 +201,7 @@
     SetWindowLongA(hwnd, DWL_USER, (LONG)di);
 
     for(ps = di->pi->ppd->PageSizes, i = 0; ps; ps = ps->next, i++) {
-      SendDlgItemMessageA(hwnd, IDD_PAPERS, LB_INSERTSTRING, i, 
+      SendDlgItemMessageA(hwnd, IDD_PAPERS, LB_INSERTSTRING, i,
 			  (LPARAM)ps->FullName);
       if(di->pi->Devmode->dmPublic.u1.s1.dmPaperSize == ps->WinPage)
 	Cursel = i;
@@ -254,7 +254,7 @@
     }
     break;
    }
-   
+
   default:
     return FALSE;
   }
@@ -306,7 +306,7 @@
 						"InitCommonControls");
     pCreatePropertySheetPage = (void*)GetProcAddress(hinstComctl32,
 						    "CreatePropertySheetPageW");
-    pPropertySheet = (void*)GetProcAddress(hinstComctl32, "PropertySheetW"); 
+    pPropertySheet = (void*)GetProcAddress(hinstComctl32, "PropertySheetW");
     memset(&psp,0,sizeof(psp));
     dlgdm = HeapAlloc( PSDRV_Heap, 0, sizeof(*dlgdm) );
     memcpy(dlgdm, pi->Devmode, sizeof(*dlgdm));
@@ -327,9 +327,9 @@
     psh.nPages = 1;
     psh.hwndParent = hwnd;
     psh.u3.phpage = hpsp;
-    
+
     pPropertySheet(&psh);
-    
+
   }
   if(fwMode & DM_UPDATE)
     FIXME("Mode DM_UPDATE.  Just do the same as DM_COPY\n");
@@ -444,7 +444,7 @@
       INPUTSLOT *slot;
       char *cp = lpszOutput;
       int i = 0;
-      
+
       /* Add an entry corresponding to DMBIN_AUTO, see DC_BINS */
       i++;
       if(lpszOutput != NULL) {
@@ -513,7 +513,7 @@
 
       if(lpszOutput == NULL)
 	return -1;
- 
+
       i = 0;
       for(ps = pi->ppd->PageSizes; ps; ps = ps->next, i++) {
 	if(ps->PaperDimension->x > ptMax.x)
@@ -534,7 +534,7 @@
 
       if(lpszOutput == NULL)
 	return -1;
- 
+
       i = 0;
       for(ps = pi->ppd->PageSizes; ps; ps = ps->next, i++) {
 	if(ps->PaperDimension->x > ptMax.x)
@@ -581,7 +581,7 @@
 void WINAPI PSDRV_DeviceMode16(HWND16 hwnd, HANDLE16 hDriver,
 LPSTR lpszDevice, LPSTR lpszPort)
 {
-    PSDRV_ExtDeviceMode16( hwnd, hDriver, NULL, lpszDevice, lpszPort, NULL, 
+    PSDRV_ExtDeviceMode16( hwnd, hDriver, NULL, lpszDevice, lpszPort, NULL,
 			   NULL, DM_PROMPT );
     return;
 }
@@ -601,9 +601,9 @@
 
     psp->dwSize = sizeof(psp);
     psp->hInstance = 0x1234;
-    
+
     ps->nPages = 1;
-    
+
 }
 
 #endif
diff --git a/dlls/wineps/escape.c b/dlls/wineps/escape.c
index a6ba990..01ce614 100644
--- a/dlls/wineps/escape.c
+++ b/dlls/wineps/escape.c
@@ -139,7 +139,7 @@
 	    return 0;
 	}
 
-    case SETCHARSET: 
+    case SETCHARSET:
       /* Undocumented escape used by winword6.
 	 Switches between ANSI and a special charset.
 	 If *lpInData == 1 we require that
@@ -151,7 +151,7 @@
 	 0x96 is endash
 	 0x97 is emdash
 	 0xa0 is non break space - yeah right.
-	 
+
 	 If *lpInData == 0 we get ANSI.
 	 Since there's nothing else there, let's just make these the default
 	 anyway and see what happens...
@@ -234,7 +234,7 @@
     return 1;
 }
 
-	
+
 /************************************************************************
  *           PSDRV_EndPage
  */
diff --git a/dlls/wineps/font.c b/dlls/wineps/font.c
index 2240c81..91e5efe 100644
--- a/dlls/wineps/font.c
+++ b/dlls/wineps/font.c
@@ -59,9 +59,9 @@
     USHORT  	    	usUnitsPerEm, usWinAscent, usWinDescent;
     SHORT   	    	sAscender, sDescender, sLineGap, sTypoAscender;
     SHORT    	    	sTypoDescender, sTypoLineGap, sAvgCharWidth;
-    
+
     TRACE("'%s' %li\n", afm->FontName, lfHeight);
-		
+
     if (lfHeight < 0)   	    	    	    	/* match em height */
     {
         font->scale = - ((float)lfHeight / (float)(wm->usUnitsPerEm));
@@ -71,10 +71,10 @@
     	font->scale = (float)lfHeight /
 	    	(float)(wm->usWinAscent + wm->usWinDescent);
     }
-    
+
     font->size = (INT)round(font->scale * (float)wm->usUnitsPerEm);
     font->set = FALSE;
-    
+
     usUnitsPerEm = (USHORT)round((float)(wm->usUnitsPerEm) * font->scale);
     sAscender = (SHORT)round((float)(wm->sAscender) * font->scale);
     sDescender = (SHORT)round((float)(wm->sDescender) * font->scale);
@@ -85,22 +85,22 @@
     usWinAscent = (USHORT)round((float)(wm->usWinAscent) * font->scale);
     usWinDescent = (USHORT)round((float)(wm->usWinDescent) * font->scale);
     sAvgCharWidth = (SHORT)round((float)(wm->sAvgCharWidth) * font->scale);
-    
+
     tm->tmAscent = (LONG)usWinAscent;
     tm->tmDescent = (LONG)usWinDescent;
     tm->tmHeight = tm->tmAscent + tm->tmDescent;
-    
+
     tm->tmInternalLeading = tm->tmHeight - (LONG)usUnitsPerEm;
     if (tm->tmInternalLeading < 0)
         tm->tmInternalLeading = 0;
-	
+
     tm->tmExternalLeading =
     	    (LONG)(sAscender - sDescender + sLineGap) - tm->tmHeight;
     if (tm->tmExternalLeading < 0)
     	tm->tmExternalLeading = 0;
-    
+
     tm->tmAveCharWidth = (LONG)sAvgCharWidth;
-	
+
     tm->tmWeight = afm->Weight;
     tm->tmItalic = (afm->ItalicAngle != 0.0);
     tm->tmUnderlined = 0;
@@ -109,28 +109,28 @@
     tm->tmLastChar = (WCHAR)(afm->Metrics[afm->NumofMetrics - 1].UV);
     tm->tmDefaultChar = 0x001f;     	/* Win2K does this - FIXME? */
     tm->tmBreakChar = tm->tmFirstChar;	    	/* should be 'space' */
-    
+
     tm->tmPitchAndFamily = TMPF_DEVICE | TMPF_VECTOR;
     if (!afm->IsFixedPitch)
     	tm->tmPitchAndFamily |= TMPF_FIXED_PITCH;   /* yes, it's backwards */
     if (wm->usUnitsPerEm != 1000)
     	tm->tmPitchAndFamily |= TMPF_TRUETYPE;
-    
+
     tm->tmCharSet = ANSI_CHARSET;   	/* FIXME */
     tm->tmOverhang = 0;
-    
+
     /*
      *	This is kludgy.  font->scale is used in several places in the driver
      *	to adjust PostScript-style metrics.  Since these metrics have been
      *	"normalized" to an em-square size of 1000, font->scale needs to be
      *	similarly adjusted..
      */
-     
+
     font->scale *= (float)wm->usUnitsPerEm / 1000.0;
-     
+
     tm->tmMaxCharWidth = (LONG)round(
     	    (afm->FontBBox.urx - afm->FontBBox.llx) * font->scale);
-    
+
     TRACE("Selected PS font '%s' size %d weight %ld.\n", afm->FontName,
     	    font->size, tm->tmWeight );
     TRACE("H = %ld As = %ld Des = %ld IL = %ld EL = %ld\n", tm->tmHeight,
@@ -161,7 +161,7 @@
         bd = TRUE;
     WideCharToMultiByte(CP_ACP, 0, lf.lfFaceName, -1,
 			FaceName, sizeof(FaceName), NULL, NULL);
-    
+
     if(FaceName[0] == '\0') {
         switch(lf.lfPitchAndFamily & 0xf0) {
 	case FF_DONTCARE:
@@ -246,28 +246,28 @@
     TRACE("Got family '%s'\n", family->FamilyName);
 
     for(afmle = family->afmlist; afmle; afmle = afmle->next) {
-        if( (bd == (afmle->afm->Weight == FW_BOLD)) && 
+        if( (bd == (afmle->afm->Weight == FW_BOLD)) &&
 	    (it == (afmle->afm->ItalicAngle != 0.0)) )
 	        break;
     }
     if(!afmle)
         afmle = family->afmlist; /* not ideal */
-	
+
     TRACE("Got font '%s'\n", afmle->afm->FontName);
-    
+
     physDev->font.afm = afmle->afm;
     /* stock fonts ignore the mapping mode */
     if (!is_stock_font( hfont )) lf.lfHeight = INTERNAL_YWSTODS(physDev->dc, lf.lfHeight);
     ScaleFont(physDev->font.afm, lf.lfHeight,
     	    &(physDev->font), &(physDev->font.tm));
-    
+
     physDev->font.escapement = lf.lfEscapement;
-    
+
     /* Does anyone know if these are supposed to be reversed like this? */
-    
+
     physDev->font.tm.tmDigitizedAspectX = physDev->logPixelsY;
     physDev->font.tm.tmDigitizedAspectY = physDev->logPixelsX;
-    
+
     return TRUE; /* We'll use a device font for now */
 }
 
@@ -290,23 +290,23 @@
 {
     return (int)(((const AFMMETRICS *)a)->UV - ((const AFMMETRICS *)b)->UV);
 }
- 
+
 const AFMMETRICS *PSDRV_UVMetrics(LONG UV, const AFM *afm)
 {
     AFMMETRICS	    	key;
     const AFMMETRICS	*needle;
-    
+
     /*
      *	Ugly work-around for symbol fonts.  Wine is sending characters which
      *	belong in the Unicode private use range (U+F020 - U+F0FF) as ASCII
      *	characters (U+0020 - U+00FF).
      */
-    
+
     if ((afm->Metrics->UV & 0xff00) == 0xf000 && UV < 0x100)
     	UV |= 0xf000;
-    
+
     key.UV = UV;
-    
+
     needle = bsearch(&key, afm->Metrics, afm->NumofMetrics, sizeof(AFMMETRICS),
 	    MetricsByUV);
 
@@ -315,7 +315,7 @@
     	WARN("No glyph for U+%.4lX in %s\n", UV, afm->FontName);
     	needle = afm->Metrics;
     }
-	
+
     return needle;
 }
 
@@ -327,20 +327,20 @@
     DC *dc = physDev->dc;
     int     	    i;
     float   	    width = 0.0;
-    
+
     TRACE("%s %i\n", debugstr_wn(str, count), count);
-    
+
     for (i = 0; i < count && str[i] != '\0'; ++i)
 	width += PSDRV_UVMetrics(str[i], physDev->font.afm)->WX;
-	
+
     width *= physDev->font.scale;
-    
+
     size->cx = GDI_ROUND((FLOAT)width * dc->xformVport2World.eM11);
     size->cy = GDI_ROUND((FLOAT)physDev->font.tm.tmHeight *
     	    dc->xformVport2World.eM22);
-	    
+
     TRACE("cx=%li cy=%li\n", size->cx, size->cy);
-	    
+
     return TRUE;
 }
 
@@ -350,15 +350,15 @@
 BOOL PSDRV_GetCharWidth(PSDRV_PDEVICE *physDev, UINT firstChar, UINT lastChar, LPINT buffer)
 {
     UINT    	    i;
-    
+
     TRACE("U+%.4X U+%.4X\n", firstChar, lastChar);
-    
+
     if (lastChar > 0xffff || firstChar > lastChar)
     {
     	SetLastError(ERROR_INVALID_PARAMETER);
     	return FALSE;
     }
-	
+
     for (i = firstChar; i <= lastChar; ++i)
     {
     	*buffer = GDI_ROUND(PSDRV_UVMetrics(i, physDev->font.afm)->WX
@@ -366,10 +366,10 @@
 	TRACE("U+%.4X: %i\n", i, *buffer);
 	++buffer;
     }
-	
+
     return TRUE;
 }
-    
+
 /***********************************************************************
  *           PSDRV_SetFont
  */
@@ -395,23 +395,23 @@
     TEXTMETRICW     *tm = (TEXTMETRICW *)&(ntmx->ntmTm);
     LOGFONTW	    *lf = &(elfx->elfLogFont);
     PSFONT  	    font;
-    
+
     memset(ntmx, 0, sizeof(*ntmx));
     memset(elfx, 0, sizeof(*elfx));
-    
+
     ScaleFont(afm, -(LONG)(afm->WinMetrics.usUnitsPerEm), &font, tm);
-    
+
     lf->lfHeight = tm->tmHeight;
     lf->lfWidth = tm->tmAveCharWidth;
     lf->lfWeight = tm->tmWeight;
     lf->lfItalic = tm->tmItalic;
     lf->lfCharSet = tm->tmCharSet;
-    
+
     lf->lfPitchAndFamily = (afm->IsFixedPitch) ? FIXED_PITCH : VARIABLE_PITCH;
-    
+
     MultiByteToWideChar(CP_ACP, 0, afm->FamilyName, -1, lf->lfFaceName,
     	    LF_FACESIZE);
-	    
+
     return DEVICE_FONTTYPE;
 }
 
@@ -433,7 +433,7 @@
 			  FaceName, sizeof(FaceName), NULL, NULL);
         TRACE("lfFaceName = '%s'\n", FaceName);
         for(family = physDev->pi->Fonts; family; family = family->next) {
-            if(!strncmp(FaceName, family->FamilyName, 
+            if(!strncmp(FaceName, family->FamilyName,
 			strlen(family->FamilyName)))
 	        break;
 	}
diff --git a/dlls/wineps/glyphlist.c b/dlls/wineps/glyphlist.c
index 2d1fbfa..e2ca136 100644
--- a/dlls/wineps/glyphlist.c
+++ b/dlls/wineps/glyphlist.c
@@ -85,7 +85,7 @@
     g = HeapAlloc(PSDRV_Heap, 0, sizeof(GLYPHNAME) + strlen(szName) + 1);
     if (g == NULL)
     {
-	ERR("Failed to allocate %i bytes of memory\n", 
+	ERR("Failed to allocate %i bytes of memory\n",
 		sizeof(GLYPHNAME) + strlen(szName) + 1);
 	return -1;
     }
@@ -194,7 +194,7 @@
 VOID PSDRV_IndexGlyphList()
 {
     INT i;
-    
+
     if (glyphNamesIndexed == TRUE)
     	return;
 
@@ -205,6 +205,6 @@
     	glyphList[i]->index = i;
 	TRACE("  glyphList[%i] -> '%s'\n", i, glyphList[i]->sz);
     }
-    
+
     glyphNamesIndexed = TRUE;
 }
diff --git a/dlls/wineps/init.c b/dlls/wineps/init.c
index 20f39a2..a2d6083 100644
--- a/dlls/wineps/init.c
+++ b/dlls/wineps/init.c
@@ -37,7 +37,7 @@
 
 WINE_DEFAULT_DEBUG_CHANNEL(psdrv);
 
-static PSDRV_DEVMODEA DefaultDevmode = 
+static PSDRV_DEVMODEA DefaultDevmode =
 {
   { /* dmPublic */
 /* dmDeviceName */	"Wine PostScript Driver",
@@ -45,8 +45,8 @@
 /* dmDriverVersion */	0x001,
 /* dmSize */		sizeof(DEVMODEA),
 /* dmDriverExtra */	0,
-/* dmFields */		DM_ORIENTATION | DM_PAPERSIZE | DM_SCALE | 
-			DM_COPIES | DM_DEFAULTSOURCE | DM_COLOR | 
+/* dmFields */		DM_ORIENTATION | DM_PAPERSIZE | DM_SCALE |
+			DM_COPIES | DM_DEFAULTSOURCE | DM_COLOR |
 			DM_DUPLEX | DM_YRESOLUTION | DM_TTOPTION,
    { /* u1 */
      { /* s1 */
@@ -85,7 +85,7 @@
     /* dummy */ 0
   },
   { /* dmDrvPrivate */
-    /* numInstalledOptions */ 0 
+    /* numInstalledOptions */ 0
   }
 };
 
@@ -106,7 +106,7 @@
 BOOL WINAPI PSDRV_Init( HINSTANCE hinst, DWORD reason, LPVOID reserved )
 {
     TRACE("(0x%4x, 0x%08lx, %p)\n", hinst, reason, reserved);
-   
+
     switch(reason) {
 
 	case DLL_PROCESS_ATTACH:
@@ -133,7 +133,7 @@
 	    HeapDestroy( PSDRV_Heap );
             break;
     }
- 
+
     return TRUE;
 }
 
@@ -142,7 +142,7 @@
 {
     PAGESIZE *page;
     INT width = 0, height = 0;
-    
+
     if(physDev->Devmode->dmPublic.dmFields & DM_PAPERSIZE) {
         for(page = physDev->pi->ppd->PageSizes; page; page = page->next) {
 	    if(page->WinPage == physDev->Devmode->dmPublic.u1.s1.dmPaperSize)
@@ -244,7 +244,7 @@
         device = physDev->Devmode->dmPublic.dmDeviceName;
     }
     pi = PSDRV_FindPrinterInfo(device);
-        
+
     TRACE("(%s %s %s %p)\n", driver, device, output, initData);
 
     if(!pi) return FALSE;
@@ -269,7 +269,7 @@
         HeapFree( PSDRV_Heap, 0, physDev );
 	return FALSE;
     }
-    
+
     memcpy( physDev->Devmode, pi->Devmode, sizeof(PSDRV_DEVMODEA) );
 
     physDev->logPixelsX = physDev->pi->ppd->DefaultResolution;
@@ -430,7 +430,7 @@
 /**********************************************************************
  *		PSDRV_FindPrinterInfo
  */
-PRINTERINFO *PSDRV_FindPrinterInfo(LPCSTR name) 
+PRINTERINFO *PSDRV_FindPrinterInfo(LPCSTR name)
 {
     static PRINTERINFO *PSDRV_PrinterList;
     DWORD type = REG_BINARY, needed, res, dwPaperSize;
@@ -444,11 +444,11 @@
     HKEY hkey;
 
     TRACE("'%s'\n", name);
-    
+
     /*
      *	If this loop completes, last will point to the 'next' element of the
      *	final PRINTERINFO in the list
-     */    
+     */
     for( ; pi; last = &pi->next, pi = pi->next)
         if(!strcmp(pi->FriendlyName, name))
 	    return pi;
@@ -461,14 +461,14 @@
     strcpy( pi->FriendlyName, name );
 
     /* Use Get|SetPrinterDataExA instead? */
-    
+
     res = DrvGetPrinterData16((LPSTR)name, (LPSTR)INT_PD_DEFAULT_DEVMODE, &type,
 			    NULL, 0, &needed );
 
     if(res == ERROR_INVALID_PRINTER_NAME || needed != sizeof(DefaultDevmode)) {
         pi->Devmode = HeapAlloc( PSDRV_Heap, 0, sizeof(DefaultDevmode) );
 	if (pi->Devmode == NULL)
-	    goto cleanup;	    
+	    goto cleanup;
 	memcpy(pi->Devmode, &DefaultDevmode, sizeof(DefaultDevmode) );
 	strcpy(pi->Devmode->dmPublic.dmDeviceName,name);
 	DrvSetPrinterData16((LPSTR)name, (LPSTR)INT_PD_DEFAULT_DEVMODE,
diff --git a/dlls/wineps/mkagl.c b/dlls/wineps/mkagl.c
index a6328f7..085d2a7 100644
--- a/dlls/wineps/mkagl.c
+++ b/dlls/wineps/mkagl.c
@@ -27,7 +27,7 @@
 /*
  *  The array of glyph information
  */
- 
+
 typedef struct
 {
     int     	UV;
@@ -44,7 +44,7 @@
 /*
  *  Functions to search and sort the array
  */
- 
+
 static int cmp_by_UV(const void *a, const void *b)
 {
     return ((const GLYPHINFO *)a)->UV - ((const GLYPHINFO *)b)->UV;
@@ -68,9 +68,9 @@
 inline static GLYPHINFO *search_by_name(const char *name)
 {
     GLYPHINFO	gi;
-    
+
     gi.name = name;
-    
+
     return (GLYPHINFO *)bsearch(&gi, glyphs, num_glyphs, sizeof(GLYPHINFO),
     	    cmp_by_name);
 }
@@ -79,19 +79,19 @@
 /*
  *  Use the 'optimal' combination of tabs and spaces to position the cursor
  */
- 
+
 inline static void fcpto(FILE *f, int newpos, int curpos)
 {
     int newtpos = newpos & ~7;
     int curtpos = curpos & ~7;
-    
+
     while (curtpos < newtpos)
     {
     	fputc('\t', f);
 	curtpos += 8;
 	curpos = curtpos;
     }
-    
+
     while (curpos < newpos)
     {
     	fputc(' ', f);
@@ -108,7 +108,7 @@
 /*
  *  Make main() look "purty"
  */
- 
+
 inline static void double_space(FILE *f)
 {
     fputc('\n', f);
@@ -123,43 +123,43 @@
 /*
  *  Read the Adobe Glyph List from 'glyphlist.txt'
  */
- 
+
 static void read_agl()
 {
     FILE    *f = fopen("glyphlist.txt", "r");
     char    linebuf[256], namebuf[128], commbuf[128];
-    
+
     if (f == NULL)
     {
     	fprintf(stderr, "Error opening glyphlist.txt\n");
 	exit(__LINE__);
     }
-    
+
     while (fgets(linebuf, sizeof(linebuf), f) != NULL)
     {
     	unsigned int	UV;
-    
+
     	if (linebuf[0] == '#')
 	    continue;
-	    
+
     	sscanf(linebuf, "%X;%[^;];%[^\n]", &UV, namebuf, commbuf);
-	
+
 	glyphs[num_glyphs].UV = (int)UV;
 	glyphs[num_glyphs].name = strdup(namebuf);
 	glyphs[num_glyphs].comment = strdup(commbuf);
-	
+
 	if (glyphs[num_glyphs].name == NULL ||
 	    	glyphs[num_glyphs].comment == NULL)
 	{
 	    fprintf(stderr, "Memory allocation failure\n");
 	    exit(__LINE__);
 	}
-	
+
 	++num_glyphs;
     }
-    
+
     fclose(f);
-    
+
     if (num_glyphs != 1051)
     {
     	fprintf(stderr, "Read %i glyphs\n", num_glyphs);
@@ -171,43 +171,43 @@
 /*
  *  Read glyph names from all AFM files in current directory
  */
- 
+
 static void read_afms(FILE *f_c, FILE *f_h)
 {
     DIR     	    *d = opendir(".");
     struct dirent   *de;
-    
+
     fputs(  "/*\n"
     	    " *  Built-in font metrics\n"
 	    " */\n"
 	    "\n"
 	    "const AFM *const PSDRV_BuiltinAFMs[] =\n"
 	    "{\n", f_c);
-		
-    
+
+
     if (d == NULL)
     {
     	fprintf(stderr, "Error opening current directory\n");
 	exit(__LINE__);
     }
-    
+
     while ((de = readdir(d)) != NULL)
     {
     	FILE   	*f;
 	char   	*cp, linebuf[256], font_family[128];
 	int	i, num_metrics;
-	
+
 	cp = strrchr(de->d_name, '.');	    	    	/* Does it end in   */
 	if (cp == NULL || strcasecmp(cp, ".afm") != 0)	/*   .afm or .AFM?  */
 	    continue;
-	    
+
 	f = fopen(de->d_name, "r");
 	if (f == NULL)
 	{
 	    fprintf(stderr, "Error opening %s\n", de->d_name);
 	    exit(__LINE__);
 	}
-	
+
 	while (1)
 	{
 	    if (fgets(linebuf, sizeof(linebuf), f) == NULL)
@@ -215,20 +215,20 @@
 	    	fprintf(stderr, "FontName not found in %s\n", de->d_name);
 		exit(__LINE__);
 	    }
-	    
+
 	    if (strncmp(linebuf, "FontName ", 9) == 0)
 	    	break;
 	}
-	
+
 	sscanf(linebuf, "FontName %[^\r\n]", font_family);
-	
+
 	for (i = 0; font_family[i] != '\0'; ++i)
 	    if (font_family[i] == '-')
 	    	font_family[i] = '_';
-		
+
 	fprintf(f_h, "extern const AFM PSDRV_%s;\n", font_family);
 	fprintf(f_c, "    &PSDRV_%s,\n", font_family);
-	
+
 	while (1)
 	{
 	    if (fgets(linebuf, sizeof(linebuf), f) == NULL)
@@ -236,13 +236,13 @@
 	    	fprintf(stderr, "FamilyName not found in %s\n", de->d_name);
 		exit(__LINE__);
 	    }
-	    
+
 	    if (strncmp(linebuf, "FamilyName ", 11) == 0)
 	    	break;
 	}
-	
+
 	sscanf(linebuf, "FamilyName %[^\r\n]", font_family);
-	
+
 	while (1)
 	{
 	    if (fgets(linebuf, sizeof(linebuf), f) == NULL)
@@ -251,24 +251,24 @@
 		    	de->d_name);
 		exit(__LINE__);
 	    }
-	    
+
 	    if (strncmp(linebuf, "StartCharMetrics ", 17) == 0)
 	    	break;
 	}
-	
+
 	sscanf(linebuf, "StartCharMetrics %i", &num_metrics);
-	
+
 	for (i = 0; i < num_metrics; ++i)
 	{
 	    char    namebuf[128];
-	
+
 	    if (fgets(linebuf, sizeof(linebuf), f) == NULL)
 	    {
 	    	fprintf(stderr, "Unexpected EOF after %i glyphs in %s\n", i,
 		    	de->d_name);
 		exit(__LINE__);
 	    }
-	    
+
 	    cp = strchr(linebuf, 'N');
 	    if (cp == NULL || strlen(cp) < 3)
 	    {
@@ -276,34 +276,34 @@
 		    	de->d_name);
 		exit(__LINE__);
 	    }
-	    
+
 	    sscanf(cp, "N %s", namebuf);
 	    if (search_by_name(namebuf) != NULL)
 	    	continue;
-		
+
 	    sprintf(linebuf, "FONT FAMILY;%s", font_family);
-		
+
 	    glyphs[num_glyphs].UV = -1;
 	    glyphs[num_glyphs].name = strdup(namebuf);
 	    glyphs[num_glyphs].comment = strdup(linebuf);
-	    
+
 	    if (glyphs[num_glyphs].name == NULL ||
 	    	    glyphs[num_glyphs].comment == NULL)
 	    {
 	    	fprintf(stderr, "Memory allocation failure\n");
 		exit(__LINE__);
 	    }
-	    
+
 	    ++num_glyphs;
-	    
+
 	    sort_by_name();
 	}
-	
+
 	fclose(f);
     }
-    
+
     closedir(d);
-    
+
     fputs("    NULL\n};\n", f_c);
 }
 
@@ -311,7 +311,7 @@
 /*
  *  Write opening comments, etc.
  */
- 
+
 static void write_header(FILE *f)
 {
     int i;
@@ -347,33 +347,33 @@
 /*
  *  Write the array of glyph names (also populates indexes)
  */
- 
+
 static void write_glyph_names(FILE *f_c, FILE *f_h)
 {
     int i, num_names = 0, index = 0;
-    
+
     for (i = 0; i < num_glyphs; ++i)
     	if (i == 0 || strcmp(glyphs[i - 1].name, glyphs[i].name) != 0)
 	    ++num_names;
-    
+
     fputs(  "/*\n"
     	    " *  Every glyph name in the AGL and the 35 core PostScript fonts\n"
 	    " */\n"
 	    "\n", f_c);
-	    
+
     fprintf(f_c, "const INT PSDRV_AGLGlyphNamesSize = %i;\n\n", num_names);
-    
+
     fprintf(f_c, "GLYPHNAME PSDRV_AGLGlyphNames[%i] =\n{\n", num_names);
-    
+
     for (i = 0; i < num_glyphs - 1; ++i)
     {
     	int cp = 0;
-	
+
 	if (i == 0 || strcmp(glyphs[i - 1].name, glyphs[i].name) != 0)
 	{
 	    fcpto(f_h, 32, fprintf(f_h, "#define GN_%s", glyphs[i].name));
 	    fprintf(f_h, "(PSDRV_AGLGlyphNames + %i)\n", index);
-	
+
 	    cp = fprintf(f_c, "    { %4i, \"%s\" },", index, glyphs[i].name);
 	    glyphs[i].index = index;
 	    ++index;
@@ -382,15 +382,15 @@
 	{
 	    glyphs[i].index = glyphs[i - 1].index;
 	}
-	
+
 	fcpto(f_c, 40, cp);
-	
+
 	fprintf(f_c, "/* %s */\n", glyphs[i].comment);
     }
-    
+
     fcpto(f_h, 32, fprintf(f_h, "#define GN_%s", glyphs[i].name));
     fprintf(f_h, "(PSDRV_AGLGlyphNames + %i)\n", index);
-    
+
     glyphs[i].index = index;
     fcpto(f_c, 40, fprintf(f_c, "    { %4i, \"%s\" }", index, glyphs[i].name));
     fprintf(f_c, "/* %s */\n};\n", glyphs[i].comment);
@@ -404,57 +404,57 @@
 static void write_encoding_by_name(FILE *f)
 {
     int i, size = 0, even = 1;
-    
+
     for (i = 0; i < num_glyphs; ++i)
     	if (glyphs[i].UV != -1 &&
 	    	(i == 0 || strcmp(glyphs[i - 1].name, glyphs[i].name) != 0))
 	    ++size; 	    	    /* should be 1039 */
-    
+
     fputs(  "/*\n"
     	    " *  The AGL encoding vector, sorted by glyph name - "
 	    	    "duplicates omitted\n"
 	    " */\n"
 	    "\n", f);
-	    
+
     fprintf(f, "const INT PSDRV_AGLbyNameSize = %i;\n\n", size);
-    fprintf(f, "const UNICODEGLYPH PSDRV_AGLbyName[%i] = \n{\n", size);
-    
+    fprintf(f, "const UNICODEGLYPH PSDRV_AGLbyName[%i] =\n{\n", size);
+
     for (i = 0; i < num_glyphs - 1; ++i)
     {
     	int cp;
-    
+
     	if (glyphs[i].UV == -1)
 	    continue;
-	    
+
 	if (i != 0 && strcmp(glyphs[i - 1].name, glyphs[i].name) == 0)
 	    continue;
-    
+
     	cp = fprintf(f, "    { 0x%.4x, GN_%s },", glyphs[i].UV, glyphs[i].name);
-	
+
 	even = !even;
 	if (even)
 	    fputc('\n', f);
 	else
 	    fcpto(f, 40, cp);
     }
-    
+
     fprintf(f, "    { 0x%.4x, GN_%s }\n};\n", glyphs[i].UV, glyphs[i].name);
 }
 
 /*
  *  Write the AGL encoding vector, sorted by Unicode value
  */
- 
+
 static void write_encoding_by_UV(FILE *f)
 {
     int i, size = 0, even = 1;
-    
+
     for (i = 0; i < num_glyphs; ++i)
     	if (glyphs[i].UV != -1)
 	    ++size; 	    	    	/* better be 1051! */
-	    
+
     sort_by_UV();
-	    
+
     fputs(  "/*\n"
     	    " *  The AGL encoding vector, sorted by Unicode value - "
 	    	    "duplicates included\n"
@@ -462,36 +462,36 @@
 	    "\n", f);
 
     fprintf(f, "const INT PSDRV_AGLbyUVSize = %i;\n\n", size);
-    fprintf(f, "const UNICODEGLYPH PSDRV_AGLbyUV[%i] = \n{\n", size);
-    
+    fprintf(f, "const UNICODEGLYPH PSDRV_AGLbyUV[%i] =\n{\n", size);
+
     for (i = 0; i < num_glyphs - 1; ++i)
     {
     	int cp;
-    
+
     	if (glyphs[i].UV == -1)
 	    continue;
-	    
+
 	cp = fprintf(f, "    { 0x%.4x, GN_%s },", glyphs[i].UV, glyphs[i].name);
-	
+
 	even = !even;
 	if (even)
 	    fputc('\n', f);
 	else
 	    fcpto(f, 40, cp);
     }
-    
+
     fprintf(f, "    { 0x%.4x, GN_%s }\n};\n", glyphs[i].UV, glyphs[i].name);
 }
-    
+
 
 /*
  *  Do it!
  */
- 
+
 int main(int argc, char *argv[])
 {
     FILE    *f_c, *f_h;
-    
+
     if (argc < 3)
     {
     	fprintf(stderr, "Usage: %s <C file> <header file>\n", argv[0]);
@@ -504,14 +504,14 @@
 	fprintf(stderr, "Error opening %s for writing\n", argv[1]);
 	exit(__LINE__);
     }
-    
+
     f_h = fopen(argv[2], "w");
     if (f_h == NULL)
     {
     	fprintf(stderr, "Error opening %s for writing\n", argv[2]);
 	exit(__LINE__);
     }
-    
+
     write_header(f_c);
     triple_space(f_c);
     read_agl();
@@ -522,6 +522,6 @@
     write_encoding_by_name(f_c);
     triple_space(f_c);
     write_encoding_by_UV(f_c);
-    
+
     return 0;
 }
diff --git a/dlls/wineps/pen.c b/dlls/wineps/pen.c
index b22006d..b1f73ad 100644
--- a/dlls/wineps/pen.c
+++ b/dlls/wineps/pen.c
@@ -47,7 +47,7 @@
 
     PSDRV_CreateColor(physDev, &physDev->pen.color, logpen.lopnColor);
     physDev->pen.style = logpen.lopnStyle & PS_STYLE_MASK;
- 
+
     switch(physDev->pen.style) {
     case PS_DASH:
 	physDev->pen.dash = PEN_dash;
@@ -71,12 +71,12 @@
 
     default:
 	physDev->pen.dash = NULL;
-    }	    
+    }
 
     if ((physDev->pen.width > 1) && (physDev->pen.dash != NULL)) {
 	physDev->pen.style = PS_SOLID;
          physDev->pen.dash = NULL;
-    } 
+    }
 
     physDev->pen.set = FALSE;
     return hpen;
@@ -92,11 +92,11 @@
 {
     if (physDev->pen.style != PS_NULL) {
 	PSDRV_WriteSetColor(physDev, &physDev->pen.color);
-	
+
 	if(!physDev->pen.set) {
 	    PSDRV_WriteSetPen(physDev);
 	    physDev->pen.set = TRUE;
-	}    
+	}
     }
 
     return TRUE;
diff --git a/dlls/wineps/ppd.c b/dlls/wineps/ppd.c
index d0088cd..995d103 100644
--- a/dlls/wineps/ppd.c
+++ b/dlls/wineps/ppd.c
@@ -266,7 +266,7 @@
     do {
         end = strchr(start, '"');
 	if(end) {
-	    buf = HeapReAlloc( PSDRV_Heap, 0, buf, 
+	    buf = HeapReAlloc( PSDRV_Heap, 0, buf,
 			       len + (end - start) + 1 );
 	    memcpy(buf + len, start, end - start);
 	    *(buf + len + (end - start)) = '\0';
@@ -457,7 +457,7 @@
 PAGESIZE *PSDRV_PPDGetPageSizeInfo(PPD *ppd, char *name)
 {
     PAGESIZE *page = ppd->PageSizes, *lastpage;
-    
+
     if(!page) {
        page = ppd->PageSizes = HeapAlloc( PSDRV_Heap,
 					    HEAP_ZERO_MEMORY, sizeof(*page) );
@@ -573,7 +573,7 @@
 	fclose(fp);
 	return NULL;
     }
-    
+
     while( PSDRV_PPDGetNextTuple(fp, &tuple)) {
 
 	if(!strcmp("*NickName", tuple.key)) {
@@ -646,7 +646,7 @@
 
 	        page->Name = tuple.option;
 		tuple.option = NULL;
-		
+
 		for(i = 0; PageTrans[i].PSName; i++) {
 		    if(!strcmp(PageTrans[i].PSName, page->Name)) { /* case ? */
 		        page->WinPage = PageTrans[i].WinPage;
@@ -678,7 +678,7 @@
 	else if(!strcmp("*ImageableArea", tuple.key)) {
 	    PAGESIZE *page;
 	    page = PSDRV_PPDGetPageSizeInfo(ppd, tuple.option);
-	    
+
 	    if(!page->Name) {
 	        page->Name = tuple.option;
 		tuple.option = NULL;
@@ -701,7 +701,7 @@
 	else if(!strcmp("*PaperDimension", tuple.key)) {
 	    PAGESIZE *page;
 	    page = PSDRV_PPDGetPageSizeInfo(ppd, tuple.option);
-	    
+
 	    if(!page->Name) {
 	        page->Name = tuple.option;
 		tuple.option = NULL;
@@ -727,28 +727,28 @@
 
 	    /* anything else, namely 'any', leaves value at 0 */
 
-	    TRACE("LandscapeOrientation = %d\n", 
+	    TRACE("LandscapeOrientation = %d\n",
 		  ppd->LandscapeOrientation);
 	}
-	
+
 	else if(!strcmp("*UIConstraints", tuple.key)) {
 	    char *start;
 	    CONSTRAINT *con, **insert = &ppd->Constraints;
 
 	    while(*insert)
 	        insert = &((*insert)->next);
-	    
+
 	    con = *insert = HeapAlloc( PSDRV_Heap, HEAP_ZERO_MEMORY,
 				       sizeof(*con) );
 
 	    start = tuple.value;
-	    
+
 	    con->Feature1 = PSDRV_PPDGetWord(start, &start);
 	    con->Value1 = PSDRV_PPDGetWord(start, &start);
 	    con->Feature2 = PSDRV_PPDGetWord(start, &start);
 	    con->Value2 = PSDRV_PPDGetWord(start, &start);
 	}
-	    
+
 	else if (!strcmp("*InputSlot", tuple.key))
 	{
 
@@ -763,7 +763,7 @@
 		    UserBinType++);
 
 	    tuple.option = tuple.opttrans = tuple.value = NULL;
-	}   
+	}
 
 	/*
 	 *  Windows treats "manual feed" as another paper source.  Most PPD
@@ -782,8 +782,8 @@
 	if(tuple.option) HeapFree(PSDRV_Heap, 0, tuple.option);
 	if(tuple.value) HeapFree(PSDRV_Heap, 0, tuple.value);
 	if(tuple.opttrans) HeapFree(PSDRV_Heap, 0, tuple.opttrans);
-	if(tuple.valtrans) HeapFree(PSDRV_Heap, 0, tuple.valtrans);    
-	
+	if(tuple.valtrans) HeapFree(PSDRV_Heap, 0, tuple.valtrans);
+
     }
 
 
@@ -797,16 +797,16 @@
 
 	for(fn = ppd->InstalledFonts; fn; fn = fn->next)
 	    TRACE("'%s'\n", fn->Name);
-	
+
 	for(page = ppd->PageSizes; page; page = page->next) {
 	    TRACE("'%s' aka '%s' (%d) invoked by '%s'\n", page->Name,
 	      page->FullName, page->WinPage, page->InvocationString);
 	    if(page->ImageableArea)
-	        TRACE("Area = %.2f,%.2f - %.2f, %.2f\n", 
+	        TRACE("Area = %.2f,%.2f - %.2f, %.2f\n",
 		      page->ImageableArea->llx, page->ImageableArea->lly,
 		      page->ImageableArea->urx, page->ImageableArea->ury);
 	    if(page->PaperDimension)
-	        TRACE("Dimension = %.2f x %.2f\n", 
+	        TRACE("Dimension = %.2f x %.2f\n",
 		      page->PaperDimension->x, page->PaperDimension->y);
 	}
 
@@ -825,7 +825,7 @@
 
 	for(slot = ppd->InputSlots; slot; slot = slot->next)
 	    TRACE("INPUTSLOTS '%s' Name '%s' (%d) Invocation '%s'\n",
-		  slot->Name, slot->FullName, slot->WinBin, 
+		  slot->Name, slot->FullName, slot->WinBin,
 		  slot->InvocationString);
     }
 
diff --git a/dlls/wineps/ps.c b/dlls/wineps/ps.c
index d82faf5..f8d46c8 100644
--- a/dlls/wineps/ps.c
+++ b/dlls/wineps/ps.c
@@ -36,7 +36,7 @@
 "%%%%Orientation: %s\n"
 "%%%%EndComments\n";
 
-static char psbeginprolog[] = 
+static char psbeginprolog[] =
 "%%BeginProlog\n";
 
 static char psendprolog[] =
@@ -93,7 +93,7 @@
 static char pslineto[] = /* x, y */
 "%d %d lineto\n";
 
-static char psstroke[] = 
+static char psstroke[] =
 "stroke\n";
 
 static char psrectangle[] = /* x, y, width, height, -width */
@@ -167,10 +167,10 @@
 "eoclip\n";
 
 static char psrectclip[] =
-"%d %d %d %d rectclip\n"; 
+"%d %d %d %d rectclip\n";
 
 static char psrectclip2[] =
-"%s rectclip\n"; 
+"%s rectclip\n";
 
 static char pshatch[] =
 "hatch\n";
@@ -178,13 +178,13 @@
 static char psrotate[] = /* ang */
 "%.1f rotate\n";
 
-static char psarrayget[] = 
+static char psarrayget[] =
 "%s %d get\n";
 
-static char psarrayput[] = 
+static char psarrayput[] =
 "%s %d %ld put\n";
 
-static char psarraydef[] = 
+static char psarraydef[] =
 "/%s %d array def\n";
 
 
@@ -212,7 +212,7 @@
     WriteSpool16( hJob, invocation, strlen(invocation) );
 
     WriteSpool16( hJob, psendfeature, strlen(psendfeature) );
-    
+
     HeapFree( PSDRV_Heap, 0, buf );
     return 1;
 }
@@ -234,7 +234,7 @@
         WARN("HeapAlloc failed\n");
         return 0;
     }
-    
+
     /* BBox co-ords are in default user co-ord system so urx < ury even in
        landscape mode */
     llx = physDev->ImageableArea.left * 72.0 / physDev->logPixelsX;
@@ -250,9 +250,9 @@
 
     /* FIXME should do something better with BBox */
 
-    sprintf(buf, psheader, title, llx, lly, urx, ury, orient);		
+    sprintf(buf, psheader, title, llx, lly, urx, ury, orient);
 
-    if( WriteSpool16( physDev->job.hJob, buf, strlen(buf) ) != 
+    if( WriteSpool16( physDev->job.hJob, buf, strlen(buf) ) !=
 	                                             strlen(buf) ) {
         WARN("WriteSpool error\n");
 	HeapFree( PSDRV_Heap, 0, buf );
@@ -305,7 +305,7 @@
 
     sprintf(buf, psfooter, physDev->job.PageNo);
 
-    if( WriteSpool16( physDev->job.hJob, buf, strlen(buf) ) != 
+    if( WriteSpool16( physDev->job.hJob, buf, strlen(buf) ) !=
 	                                             strlen(buf) ) {
         WARN("WriteSpool error\n");
 	HeapFree( PSDRV_Heap, 0, buf );
@@ -319,7 +319,7 @@
 
 INT PSDRV_WriteEndPage( PSDRV_PDEVICE *physDev )
 {
-    if( WriteSpool16( physDev->job.hJob, psendpage, sizeof(psendpage)-1 ) != 
+    if( WriteSpool16( physDev->job.hJob, psendpage, sizeof(psendpage)-1 ) !=
 	                                             sizeof(psendpage)-1 ) {
         WARN("WriteSpool error\n");
 	return 0;
@@ -364,7 +364,7 @@
 	    physDev->logPixelsX, physDev->logPixelsY,
 	    xtrans, ytrans, rotation);
 
-    if( WriteSpool16( physDev->job.hJob, buf, strlen(buf) ) != 
+    if( WriteSpool16( physDev->job.hJob, buf, strlen(buf) ) !=
 	                                             strlen(buf) ) {
         WARN("WriteSpool error\n");
 	HeapFree( PSDRV_Heap, 0, buf );
@@ -399,7 +399,7 @@
 
 
 
-BOOL PSDRV_WriteRectangle(PSDRV_PDEVICE *physDev, INT x, INT y, INT width, 
+BOOL PSDRV_WriteRectangle(PSDRV_PDEVICE *physDev, INT x, INT y, INT width,
 			INT height)
 {
     char buf[100];
@@ -439,15 +439,15 @@
         WARN("HeapAlloc failed\n");
         return FALSE;
     }
-    
-    sprintf(buf, pssetfont, physDev->font.afm->FontName, 
+
+    sprintf(buf, pssetfont, physDev->font.afm->FontName,
 		physDev->font.size, -physDev->font.size,
 	        -physDev->font.escapement);
 
     PSDRV_WriteSpool(physDev, buf, strlen(buf));
     HeapFree(PSDRV_Heap, 0, buf);
     return TRUE;
-}    
+}
 
 BOOL PSDRV_WriteSetColor(PSDRV_PDEVICE *physDev, PSCOLOR *color)
 {
@@ -460,10 +460,10 @@
 		color->value.rgb.b);
 	return PSDRV_WriteSpool(physDev, buf, strlen(buf));
 
-    case PSCOLOR_GRAY:	
+    case PSCOLOR_GRAY:
         sprintf(buf, pssetgray, color->value.gray.i);
 	return PSDRV_WriteSpool(physDev, buf, strlen(buf));
-	
+
     default:
         ERR("Unkonwn colour type %d\n", color->type);
 	break;
@@ -491,24 +491,24 @@
 {
     char    buf[128];
     int     i;
-    
+
     for (i = 0; i < count; ++i)
     {
     	LPCSTR	name;
 	int 	l;
-	
+
 	name = PSDRV_UVMetrics(str[i], physDev->font.afm)->N->sz;
 	l = snprintf(buf, sizeof(buf), psglyphshow, name);
-	
+
 	if (l < sizeof(psglyphshow) - 2 || l > sizeof(buf) - 1)
 	{
 	    WARN("Unusable glyph name '%s' - ignoring\n", name);
 	    continue;
 	}
-	
+
 	PSDRV_WriteSpool(physDev, buf, l);
     }
-    
+
     return TRUE;
 }
 
@@ -581,7 +581,7 @@
 {
     char buf[] = ">\n] setcolorspace\n";
     return PSDRV_WriteSpool(physDev, buf, sizeof(buf) - 1);
-} 
+}
 
 BOOL PSDRV_WriteRGB(PSDRV_PDEVICE *physDev, COLORREF *map, int number)
 {
@@ -590,7 +590,7 @@
 
     ptr = buf;
     for(i = 0; i < number; i++) {
-        sprintf(ptr, "%02x%02x%02x%c", (int)GetRValue(map[i]), 
+        sprintf(ptr, "%02x%02x%02x%c", (int)GetRValue(map[i]),
 		(int)GetGValue(map[i]), (int)GetBValue(map[i]),
 		((i & 0x7) == 0x7) || (i == number - 1) ? '\n' : ' ');
 	ptr += 7;
@@ -659,9 +659,9 @@
     char *buf = HeapAlloc(PSDRV_Heap, 0, number * 3 + 1);
     char *ptr;
     int i;
-    
+
     ptr = buf;
-    
+
     for(i = 0; i < number; i++) {
         sprintf(ptr, "%02x%c", bytes[i],
 		((i & 0xf) == 0xf) || (i == number - 1) ? '\n' : ' ');
@@ -678,9 +678,9 @@
     char *buf = HeapAlloc(PSDRV_Heap, 0, number * 7 + 1);
     char *ptr;
     int i;
-    
+
     ptr = buf;
-    
+
     for(i = 0; i < number; i++) {
         int r, g, b;
 
@@ -707,9 +707,9 @@
     char *buf = HeapAlloc(PSDRV_Heap, 0, number * 7 + 1);
     char *ptr;
     int i;
-    
+
     ptr = buf;
-    
+
     for(i = 0; i < number; i++) {
         sprintf(ptr, "%02x%02x%02x%c", bits[i * 3 + 2], bits[i * 3 + 1],
 		bits[i * 3],
@@ -727,9 +727,9 @@
     char *buf = HeapAlloc(PSDRV_Heap, 0, number * 7 + 1);
     char *ptr;
     int i;
-    
+
     ptr = buf;
-    
+
     for(i = 0; i < number; i++) {
         sprintf(ptr, "%02x%02x%02x%c", bits[i * 4 + 2], bits[i * 4 + 1],
 		bits[i * 4],
diff --git a/dlls/wineps/psdrv.h b/dlls/wineps/psdrv.h
index baadff4..efa4fe9 100644
--- a/dlls/wineps/psdrv.h
+++ b/dlls/wineps/psdrv.h
@@ -47,7 +47,7 @@
 } AFMLIGS;
 
 typedef struct {
-    int			C;		/* character */  
+    int			C;		/* character */
     LONG     	    	UV;
     float		WX;
     const GLYPHNAME	*N;		/* name */
@@ -299,7 +299,7 @@
 /*
  *  Every glyph name in the Adobe Glyph List and the 35 core PostScript fonts
  */
- 
+
 extern const INT    PSDRV_AGLGlyphNamesSize;
 extern GLYPHNAME    PSDRV_AGLGlyphNames[];
 
@@ -307,7 +307,7 @@
 /*
  *  The AGL encoding vector
  */
- 
+
 extern const INT    	    PSDRV_AGLbyNameSize;    /* sorted by name -     */
 extern const UNICODEGLYPH   PSDRV_AGLbyName[];	    /*  duplicates omitted  */
 
@@ -351,9 +351,9 @@
 extern BOOL PSDRV_WriteMoveTo(PSDRV_PDEVICE *physDev, INT x, INT y);
 extern BOOL PSDRV_WriteLineTo(PSDRV_PDEVICE *physDev, INT x, INT y);
 extern BOOL PSDRV_WriteStroke(PSDRV_PDEVICE *physDev);
-extern BOOL PSDRV_WriteRectangle(PSDRV_PDEVICE *physDev, INT x, INT y, INT width, 
+extern BOOL PSDRV_WriteRectangle(PSDRV_PDEVICE *physDev, INT x, INT y, INT width,
 			INT height);
-extern BOOL PSDRV_WriteRRectangle(PSDRV_PDEVICE *physDev, INT x, INT y, INT width, 
+extern BOOL PSDRV_WriteRRectangle(PSDRV_PDEVICE *physDev, INT x, INT y, INT width,
 			INT height);
 extern BOOL PSDRV_WriteSetFont(PSDRV_PDEVICE *physDev);
 extern BOOL PSDRV_WriteGlyphShow(PSDRV_PDEVICE *physDev, LPCWSTR str, INT count);
diff --git a/dlls/wineps/text.c b/dlls/wineps/text.c
index ea820f0..2af7e68 100644
--- a/dlls/wineps/text.c
+++ b/dlls/wineps/text.c
@@ -52,7 +52,7 @@
         rect = *lprect;
         LPtoDP( physDev->hdc, (POINT *)&rect, 2 );
 	PSDRV_WriteGSave(physDev);
-	PSDRV_WriteRectangle(physDev, rect.left, rect.top, rect.right - rect.left, 
+	PSDRV_WriteRectangle(physDev, rect.left, rect.top, rect.right - rect.left,
 			     rect.bottom - rect.top);
 
 	if (flags & ETO_OPAQUE)
@@ -70,12 +70,12 @@
 	    PSDRV_WriteClip(physDev);
 	}
 
-	bResult = PSDRV_Text(physDev, x, y, str, count, !(bClipped && bOpaque), lpDx); 
+	bResult = PSDRV_Text(physDev, x, y, str, count, !(bClipped && bOpaque), lpDx);
 	PSDRV_WriteGRestore(physDev);
     }
     else
     {
-	bResult = PSDRV_Text(physDev, x, y, str, count, TRUE, lpDx); 
+	bResult = PSDRV_Text(physDev, x, y, str, count, TRUE, lpDx);
     }
 
     return bResult;
@@ -157,13 +157,13 @@
 
     memcpy(strbuf, str, count * sizeof(WCHAR));
     *(strbuf + count) = '\0';
-    
+
     if ((GetBkMode( physDev->hdc ) != TRANSPARENT) && bDrawBackground)
     {
 	PSDRV_WriteGSave(physDev);
 	PSDRV_WriteNewPath(physDev);
-	PSDRV_WriteRectangle(physDev, x, y - physDev->font.tm.tmAscent, sz.cx, 
-			     physDev->font.tm.tmAscent + 
+	PSDRV_WriteRectangle(physDev, x, y - physDev->font.tm.tmAscent, sz.cx,
+			     physDev->font.tm.tmAscent +
 			     physDev->font.tm.tmDescent);
 	PSDRV_WriteSetColor(physDev, &physDev->bkColor);
 	PSDRV_WriteFill(physDev);
@@ -171,7 +171,7 @@
     }
 
     PSDRV_WriteMoveTo(physDev, x, y);
-    
+
     if(!lpDx)
         PSDRV_WriteGlyphShow(physDev, strbuf, lstrlenW(strbuf));
     else {
@@ -221,8 +221,8 @@
                 PSDRV_WriteMoveTo(physDev, x, y); /* move to the start */
 
                 /* temporarily rotate the coord system */
-                PSDRV_WriteRotate(physDev, -escapement/10); 
-                
+                PSDRV_WriteRotate(physDev, -escapement/10);
+
                 /* draw the underline relative to the starting point */
                 PSDRV_WriteRRectangle(physDev, 0, (INT)pos, size.cx, (INT)thick);
             }
diff --git a/dlls/wineps/truetype.c b/dlls/wineps/truetype.c
index 7525952..9448e88 100644
--- a/dlls/wineps/truetype.c
+++ b/dlls/wineps/truetype.c
@@ -97,7 +97,7 @@
 MAKE_FUNCPTR(FT_New_Face)
 MAKE_FUNCPTR(FT_Set_Charmap)
 #undef MAKE_FUNCPTR
-				    
+
 /*******************************************************************************
  *  FindCharMap
  *
@@ -126,46 +126,46 @@
     FT_Int  	i;
     FT_Error	error;
     FT_CharMap	charmap = NULL;
-    
+
     for (i = 0; i < face->num_charmaps; ++i)
     {
     	if (face->charmaps[i]->platform_id != TT_PLATFORM_MICROSOFT)
 	    continue;
-	    
+
 	if (face->charmaps[i]->encoding_id == TT_MS_ID_UNICODE_CS)
 	{
 	    charmap = face->charmaps[i];
 	    break;
 	}
-	
+
 	if (charmap == NULL)
 	    charmap = face->charmaps[i];
     }
-    
+
     *p_charmap = charmap;
-    
+
     if (charmap == NULL)
     {
     	WARN("No Windows character map found\n");
 	return TRUE;
     }
-    
+
     error = pFT_Set_Charmap(face, charmap);
     if (error != FT_Err_Ok)
     {
     	ERR("%s returned %i\n", "FT_Set_Charmap", error);
 	return FALSE;
     }
-    
+
     *p_sz = HeapAlloc(PSDRV_Heap, 0, sizeof("WindowsUnknown65535"));
     if (*p_sz == NULL)
     	return FALSE;
-	
+
     if (charmap->encoding_id < 7)
     	strcpy(*p_sz, encoding_names[charmap->encoding_id]);
     else
     	sprintf(*p_sz, "%s%u", "WindowsUnknown", charmap->encoding_id);
-	
+
     return TRUE;
 }
 
@@ -187,13 +187,13 @@
     INT     	len;
     BYTE  	*wsz;
     LPSTR   	sz;
-    
+
     len = name->string_len / 2;     	    	    /* # of 16-bit chars */
-    
+
     *p_sz = sz = HeapAlloc(PSDRV_Heap, 0, len + 1);
     if (sz == NULL)
     	return FALSE;
-	
+
     wsz = (BYTE *)name->string;
 
     for (i = 0; i < len; ++i, ++sz)
@@ -208,12 +208,12 @@
 	    *p_sz = NULL;
 	    return TRUE;
 	}
-	
+
 	*sz = (CHAR)wc;
     }
-    
+
     *sz = '\0';
-    
+
     return TRUE;
 }
 
@@ -234,9 +234,9 @@
     FT_UInt 	    num_strings, string_index;
     FT_SfntName     name;
     FT_Error	    error;
-    
+
     num_strings = pFT_Get_Sfnt_Name_Count(face);
-    
+
     for (string_index = 0; string_index < num_strings; ++string_index)
     {
     	error = pFT_Get_Sfnt_Name(face, string_index, &name);
@@ -245,25 +245,25 @@
 	    ERR("%s returned %i\n", "FT_Get_Sfnt_Name", error);
 	    return FALSE;
 	}
-	
+
 	/* FIXME - Handle other languages? */
-	
+
 	if (name.platform_id != TT_PLATFORM_MICROSOFT ||
 	    	name.language_id != TT_MS_LANGID_ENGLISH_UNITED_STATES)
 	    continue;
-	    
+
 	if (name.platform_id != charmap->platform_id ||
 	    	name.encoding_id != charmap->encoding_id)
 	    continue;
-	    
+
 	if (name.name_id != name_id)
 	    continue;
-	    
+
 	return MSTTStrToSz(&name, p_sz);
     }
-    
+
     *p_sz = NULL;   	    	    /* didn't find it */
-    
+
     return TRUE;
 }
 
@@ -295,12 +295,12 @@
     TT_HoriHeader   *hhea;
     USHORT  	    em_size;
     AFM     	    *afm;
-    
+
     head = pFT_Get_Sfnt_Table(face, ft_sfnt_head);
     post = pFT_Get_Sfnt_Table(face, ft_sfnt_post);
     os2 = pFT_Get_Sfnt_Table(face, ft_sfnt_os2);
     hhea = pFT_Get_Sfnt_Table(face, ft_sfnt_hhea);
-    
+
     if (head == NULL || post == NULL || os2 == NULL || hhea == NULL ||
     	    os2->version == 0xffff) 	    	    	/* old Macintosh font */
     {
@@ -308,11 +308,11 @@
 	*p_afm = NULL;
 	return TRUE;
     }
-    
+
     *p_afm = afm = HeapAlloc(PSDRV_Heap, 0, sizeof(*afm));
     if (afm == NULL)
     	return FALSE;
-    
+
     afm->WinMetrics.usUnitsPerEm = em_size = head->Units_Per_EM;
     afm->WinMetrics.sAscender = hhea->Ascender;
     afm->WinMetrics.sDescender = hhea->Descender;
@@ -323,7 +323,7 @@
     afm->WinMetrics.usWinAscent = os2->usWinAscent;
     afm->WinMetrics.usWinDescent = os2->usWinDescent;
     afm->WinMetrics.sAvgCharWidth = os2->xAvgCharWidth;
-        
+
     afm->Weight = os2->usWeightClass;
     afm->ItalicAngle = ((float)(post->italicAngle)) / 65536.0;
     afm->IsFixedPitch = (post-> isFixedPitch == 0) ? FALSE : TRUE;
@@ -334,10 +334,10 @@
     afm->FontBBox.lly = PSUnits(head->yMin, em_size);
     afm->FontBBox.urx = PSUnits(head->xMax, em_size);
     afm->FontBBox.ury = PSUnits(head->yMax, em_size);
-    
+
     afm->Ascender = PSUnits(os2->sTypoAscender, em_size);
     afm->Descender = PSUnits(os2->sTypoDescender, em_size);
-    
+
     return TRUE;
 }
 
@@ -353,58 +353,58 @@
     FT_ULong	charcode, index;
     AFMMETRICS	*metrics;
     USHORT  	em_size = afm->WinMetrics.usUnitsPerEm;
-    
+
     for (charcode = 0, index = 0; charcode < 65536; ++charcode)
     	if (pFT_Get_Char_Index(face, charcode) != 0)
 	    ++index;	    	    	    	    	/* count # of glyphs */
-	    
+
     afm->NumofMetrics = index;
-    
+
     *p_metrics = metrics = HeapAlloc(PSDRV_Heap, 0, index * sizeof(*metrics));
     if (metrics == NULL)
     	return FALSE;
-	
+
     for (charcode = 0, index = 0; charcode < 65536; ++charcode)
     {
     	FT_UInt     glyph_index = pFT_Get_Char_Index(face, charcode);
 	FT_Error    error;
 	CHAR	    buffer[128];  	    	/* for glyph names */
-	
+
 	if (glyph_index == 0)
 	    continue;
-	    
+
 	error = pFT_Load_Glyph(face, glyph_index, GLYPH_LOAD_FLAGS);
 	if (error != FT_Err_Ok)
 	{
 	    ERR("%s returned %i\n", "FT_Load_Glyph", error);
 	    goto cleanup;
 	}
-	
+
 	error = pFT_Get_Glyph_Name(face, glyph_index, buffer, sizeof(buffer));
 	if (error != FT_Err_Ok)
 	{
 	    ERR("%s returned %i\n", "FT_Get_Glyph_Name", error);
 	    goto cleanup;
     	}
-	
+
 	metrics[index].N = PSDRV_GlyphName(buffer);
 	if (metrics[index].N == NULL)
 	    goto cleanup;
-	    
+
 	metrics[index].C = metrics[index].UV = charcode;
 	metrics[index].WX = PSUnits(face->glyph->metrics.horiAdvance, em_size);
-	
+
 	++index;
     }
-    
+
     if (afm->WinMetrics.sAvgCharWidth == 0)
     	afm->WinMetrics.sAvgCharWidth = PSDRV_CalcAvgCharWidth(afm);
-	
+
     return TRUE;
-    
+
     cleanup:
     	HeapFree(PSDRV_Heap, 0, metrics);
-    
+
     return FALSE;
 }
 
@@ -423,44 +423,44 @@
     LPSTR   	font_name, full_name, family_name, encoding_scheme;
     FT_CharMap	charmap;
     BOOL    	retval, added;
-    
+
     retval = StartAFM(face, &afm);
     if (retval == FALSE || afm == NULL)
     	return retval;
-    
+
     retval = FindCharMap(face, &charmap, &encoding_scheme);
     if (retval == FALSE || charmap == NULL)
     	goto cleanup_afm;
-	
+
     retval = FindMSTTString(face, charmap, TT_NAME_ID_PS_NAME, &font_name);
     if (retval == FALSE || font_name == NULL)
     	goto cleanup_encoding_scheme;
-	
+
     retval = FindMSTTString(face, charmap, TT_NAME_ID_FULL_NAME, &full_name);
     if (retval == FALSE || full_name == NULL)
     	goto cleanup_font_name;
-	
+
     retval = FindMSTTString(face, charmap, TT_NAME_ID_FONT_FAMILY,
     	    &family_name);
     if (retval == FALSE || family_name == NULL)
     	goto cleanup_full_name;
-	
+
     retval = ReadCharMetrics(face, afm, &metrics);
     if (retval == FALSE || metrics == NULL)
     	goto cleanup_family_name;
-	
+
     afm->EncodingScheme = encoding_scheme; afm->FontName = font_name;
     afm->FullName = full_name; afm->FamilyName = family_name;
     afm->Metrics = metrics;
-	
+
     retval = PSDRV_AddAFMtoList(&PSDRV_AFMFontList, afm, &added);
     if (retval == FALSE || added == FALSE)
     	goto cleanup_family_name;
-	
+
     return TRUE;
-    
+
     /* clean up after fatal or non-fatal errors */
-	
+
     cleanup_family_name:
     	HeapFree(PSDRV_Heap, 0, family_name);
     cleanup_full_name:
@@ -471,10 +471,10 @@
     	HeapFree(PSDRV_Heap, 0, encoding_scheme);
     cleanup_afm:
     	HeapFree(PSDRV_Heap, 0, afm);
-	
+
     return retval;
 }
-				    
+
 /*******************************************************************************
  *  ReadTrueTypeFile
  *
@@ -486,16 +486,16 @@
 {
     FT_Error	    error;
     FT_Face 	    face;
-    
+
     TRACE("%s\n", filename);
-    
+
     error = pFT_New_Face(library, filename, 0, &face);
     if (error != FT_Err_Ok)
     {
     	WARN("FreeType error %i opening %s\n", error, filename);
 	return TRUE;
     }
-    
+
     if ((face->face_flags & REQUIRED_FACE_FLAGS) == REQUIRED_FACE_FLAGS)
     {
     	if (BuildTrueTypeAFM(face) == FALSE)
@@ -508,14 +508,14 @@
     {
     	WARN("Required information missing from %s\n", filename);
     }
-    
+
     error = pFT_Done_Face(face);
     if (error != FT_Err_Ok)
     {
     	ERR("%s returned %i\n", "FT_Done_Face", error);
 	return FALSE;
     }
-    
+
     return TRUE;
 }
 
@@ -530,41 +530,41 @@
     struct dirent   *dent;
     DIR     	    *dir;
     CHAR    	    filename[256];
-    
+
     dir = opendir(dirname);
     if (dir == NULL)
     {
     	WARN("'%s' opening %s\n", strerror(errno), dirname);
-	return TRUE;;
+	return TRUE;
     }
-    
+
     while ((dent = readdir(dir)) != NULL)
     {
     	CHAR	    *file_extension = strrchr(dent->d_name, '.');
 	int 	    fn_len;
-	
+
 	if (file_extension == NULL || strcasecmp(file_extension, ".ttf") != 0)
 	    continue;
-	    
+
 	fn_len = snprintf(filename, 256, "%s/%s", dirname, dent->d_name);
 	if (fn_len < 0 || fn_len > sizeof(filename) - 1)
 	{
 	    WARN("Path '%s/%s' is too long\n", dirname, dent->d_name);
 	    continue;
 	}
-	
+
 	if (ReadTrueTypeFile(library, filename) ==  FALSE)
 	{
 	    closedir(dir);
 	    return FALSE;
 	}
     }
-    
+
     closedir(dir);
-    
+
     return TRUE;
 }
-			    
+
 /*******************************************************************************
  *  PSDRV_GetTrueTypeMetrics
  *
@@ -626,25 +626,25 @@
 
     name_len = sizeof(name_buf);
     value_len = sizeof(value_buf);
-    
+
     while (RegEnumValueA(hkey, i++, name_buf, &name_len, NULL, &type, value_buf,
     	    &value_len) == ERROR_SUCCESS)
     {
     	value_buf[sizeof(value_buf) - 1] = '\0';
-	
+
 	if (ReadTrueTypeDir(library, value_buf) == FALSE)
 	{
 	    RegCloseKey(hkey);
 	    pFT_Done_FreeType(library);
 	    return FALSE;
 	}
-	
+
 	/* initialize lengths for new iteration */
-	
+
 	name_len = sizeof(name_buf);
 	value_len = sizeof(value_buf);
     }
-    
+
     RegCloseKey(hkey);
     pFT_Done_FreeType(library);
     wine_dlclose(ft_handle, NULL, 0);
diff --git a/dlls/wineps/type1afm.c b/dlls/wineps/type1afm.c
index 0b06f57..615da56 100644
--- a/dlls/wineps/type1afm.c
+++ b/dlls/wineps/type1afm.c
@@ -24,7 +24,7 @@
  *  	descriptions for how they indicate non-fatal errors.
  *
  */
- 
+
 #include "config.h"
 
 #include <string.h>
@@ -71,7 +71,7 @@
 {
      CHAR   *cp;
      INT    i;
-     
+
      if (fgets(buffer, bufsize, file) == NULL)
      {
      	if (feof(file) == 0)	    	    	    	/* EOF or error? */
@@ -79,22 +79,22 @@
 	    ERR("%s\n", strerror(errno));
     	    return FALSE;
 	}
-	
+
 	*p_result = EOF;
 	return TRUE;
     }
-    
+
     cp = strchr(buffer, '\n');
     if (cp == NULL)
     {
     	i = strlen(buffer);
-	
+
 	if (i == bufsize - 1)	    /* max possible; was line truncated? */
 	{
 	    do
 	    	i = fgetc(file);    	    	/* find the newline or EOF */
 	    while (i != '\n' && i != EOF);
-	    
+
 	    if (i == EOF)
 	    {
 	    	if (feof(file) == 0)	    	    	/* EOF or error? */
@@ -102,10 +102,10 @@
 		    ERR("%s\n", strerror(errno));
 		    return FALSE;
 		}
-		
+
 		WARN("No newline at EOF\n");
 	    }
-	    
+
 	    *p_result = INT_MIN;
 	    return TRUE;
 	}
@@ -116,12 +116,12 @@
 	    	*p_result = EOF;
 		return TRUE;
 	    }
-	    
+
 	    WARN("No newline at EOF\n");
 	    cp = buffer + i;	/* points to \0 where \n should have been */
 	}
     }
-    
+
     do
     {
     	*cp = '\0'; 	    	    	    	/* trim trailing whitespace */
@@ -130,7 +130,7 @@
 	--cp;
     }
     while (isspace(*cp));
-    
+
     *p_result = strlen(buffer);
     return TRUE;
 }
@@ -150,19 +150,19 @@
 {
     INT     len = strlen(key);
     LONG    start = ftell(file);
-    
+
     do
     {
 	INT 	result;
 	BOOL	ok;
-	
+
 	ok = ReadLine(file, buffer, bufsize, &result);
 	if (ok == FALSE)
 	    return FALSE;
-	    
+
 	if (result > 0 && strncmp(buffer, key, len) == 0)
 	    return TRUE;
-	    
+
 	if (result == EOF)
 	{
 	    rewind(file);
@@ -173,7 +173,7 @@
 	}
     }
     while (ftell(file) != start);
-    
+
     WARN("Couldn't find line '%s...' in AFM file\n", key);
     buffer[0] = '\0';
     return TRUE;
@@ -191,7 +191,7 @@
 {
     if (d > (double)FLT_MAX || d < -(double)FLT_MAX)
     	return FALSE;
-	
+
     *p_f = (float)d;
     return TRUE;
 }
@@ -224,26 +224,26 @@
 
     if (FindLine(file, buffer, bufsize, key) == FALSE)
     	return FALSE;
-	
+
     if (buffer[0] == '\0')  	    /* line not found */
     {
     	*p_found = FALSE;
 	*p_ret = 0.0;
 	return TRUE;
     }
-    
+
     cp = buffer + strlen(key);	    	    	    /* first char after key */
     errno = 0;
     d = strtod(cp, &end_ptr);
-    
+
     if (end_ptr == cp || errno != 0 || DoubleToFloat(p_ret, d) == FALSE)
     {
-    	WARN("Error parsing line '%s'\n", buffer); 
+    	WARN("Error parsing line '%s'\n", buffer);
     	*p_found = FALSE;
 	*p_ret = 0.0;
 	return TRUE;
     }
-    
+
     *p_found = TRUE;
     return TRUE;
 }
@@ -266,9 +266,9 @@
     	*p_ret = 0;
     	return retval;
     }
-    
+
     f = Round(f);
-    
+
     if (f > (FLOAT)INT_MAX || f < (FLOAT)INT_MIN)
     {
     	WARN("Error parsing line '%s'\n", buffer);
@@ -276,7 +276,7 @@
 	*p_found = FALSE;
 	return TRUE;
     }
-    
+
     *p_ret = (INT)f;
     return TRUE;
 }
@@ -295,27 +295,27 @@
 
     if (FindLine(file, buffer, bufsize, key) == FALSE)
     	return FALSE;
-	
+
     if (buffer[0] == '\0')
     {
     	*p_str = NULL;
 	return TRUE;
     }
-    
+
     cp = buffer + strlen(key);	    	    	    /* first char after key */
     if (*cp == '\0')
     {
     	*p_str = NULL;
 	return TRUE;
     }
-    
+
     while (isspace(*cp))    	    	/* find first non-whitespace char */
     	++cp;
-    
+
     *p_str = HeapAlloc(PSDRV_Heap, 0, strlen(cp) + 1);
     if (*p_str == NULL)
     	return FALSE;
-	
+
     strcpy(*p_str, cp);
     return TRUE;
 }
@@ -334,15 +334,15 @@
 
     if (FindLine(file, buffer, bufsize, "FontBBox") == FALSE)
     	return FALSE;
-	
+
     if (buffer[0] == '\0')
     {
     	*p_found = FALSE;
 	return TRUE;
     }
-    
+
     errno = 0;
-    
+
     cp = buffer + sizeof("FontBBox");
     d = strtod(cp, &end_ptr);
     if (end_ptr == cp || errno != 0 ||
@@ -354,22 +354,22 @@
     if (end_ptr == cp || errno != 0 ||
     	    DoubleToFloat(&(afm->FontBBox.lly), d) == FALSE)
     	goto parse_error;
-	
+
     cp = end_ptr;
     d = strtod(cp, &end_ptr);
     if (end_ptr == cp || errno != 0
     	    || DoubleToFloat(&(afm->FontBBox.urx), d) == FALSE)
     	goto parse_error;
-	
+
     cp = end_ptr;
     d = strtod(cp, &end_ptr);
     if (end_ptr == cp || errno != 0
     	    || DoubleToFloat(&(afm->FontBBox.ury), d) == FALSE)
     	goto parse_error;
-	
+
     *p_found = TRUE;
     return TRUE;
-    
+
     parse_error:
     	WARN("Error parsing line '%s'\n", buffer);
 	*p_found = FALSE;
@@ -400,14 +400,14 @@
     { "SUPER" ,     	FW_BOLD },
     { NULL, 	    	0 }
 };
- 
+
 static BOOL ReadWeight(FILE *file, CHAR buffer[], INT bufsize, AFM *afm,
     	BOOL *p_found)
 {
     LPSTR   sz;
     CHAR    *cp;
     INT     i;
-    
+
     if (ReadString(file, buffer, bufsize, "Weight", &sz) == FALSE)
     	return FALSE;
 
@@ -416,10 +416,10 @@
     	*p_found = FALSE;
 	return TRUE;
     }
-	
+
     for (cp = sz; *cp != '\0'; ++cp)
     	*cp = toupper(*cp);
-	
+
     for (i = 0; afm_weights[i].keyword != NULL; ++i)
     {
     	if (strstr(sz, afm_weights[i].keyword) != NULL)
@@ -430,9 +430,9 @@
 	    return TRUE;
 	}
     }
-    
+
     WARN("Unknown weight '%s'; treating as Roman\n", sz);
-    
+
     afm->Weight = FW_NORMAL;
     *p_found = TRUE;
     HeapFree(PSDRV_Heap, 0, sz);
@@ -447,10 +447,10 @@
     	BOOL *p_found)
 {
     LPSTR   sz;
-    
+
     if (ReadString(file, buffer, bufsize, "IsFixedPitch", &sz) == FALSE)
     	return FALSE;
-	
+
     if (sz == NULL)
     {
     	*p_found = FALSE;
@@ -464,7 +464,7 @@
 	HeapFree(PSDRV_Heap, 0, sz);
 	return TRUE;
     }
-    
+
     if (strcasecmp(sz, "true") == 0)
     {
     	afm->IsFixedPitch = TRUE;
@@ -472,9 +472,9 @@
 	HeapFree(PSDRV_Heap, 0, sz);
 	return TRUE;
     }
-    
+
     WARN("Can't parse line '%s'\n", buffer);
-    
+
     *p_found = FALSE;
     HeapFree(PSDRV_Heap, 0, sz);
     return TRUE;
@@ -496,61 +496,61 @@
     *p_afm = afm = HeapAlloc(PSDRV_Heap, 0, sizeof(*afm));
     if (afm == NULL)
     	return FALSE;
-	
+
     retval = ReadWeight(file, buffer, bufsize, afm, &found);
     if (retval == FALSE || found == FALSE)
     	goto cleanup_afm;
-	
+
     retval = ReadFloat(file, buffer, bufsize, "ItalicAngle",
     	    &(afm->ItalicAngle), &found);
     if (retval == FALSE || found == FALSE)
     	goto cleanup_afm;
-	
+
     retval = ReadFixedPitch(file, buffer, bufsize, afm, &found);
     if (retval == FALSE || found == FALSE)
     	goto cleanup_afm;
-	
+
     retval = ReadBBox(file, buffer, bufsize, afm, &found);
     if (retval == FALSE || found == FALSE)
     	goto cleanup_afm;
-	
+
     retval = ReadFloat(file, buffer, bufsize, "UnderlinePosition",
     	    &(afm->UnderlinePosition), &found);
     if (retval == FALSE || found == FALSE)
     	goto cleanup_afm;
-	
+
     retval = ReadFloat(file, buffer, bufsize, "UnderlineThickness",
     	    &(afm->UnderlineThickness), &found);
     if (retval == FALSE || found == FALSE)
     	goto cleanup_afm;
-	
+
     retval = ReadFloat(file, buffer, bufsize, "Ascender",    	/* optional */
     	    &(afm->Ascender), &found);
     if (retval == FALSE)
     	goto cleanup_afm;
-	
+
     retval = ReadFloat(file, buffer, bufsize, "Descender",   	/* optional */
     	    &(afm->Descender), &found);
     if (retval == FALSE)
     	goto cleanup_afm;
-	
+
     afm->WinMetrics.usUnitsPerEm = 1000;
     afm->WinMetrics.sTypoAscender = (SHORT)Round(afm->Ascender);
     afm->WinMetrics.sTypoDescender = (SHORT)Round(afm->Descender);
-    
+
     if (afm->WinMetrics.sTypoAscender == 0)
     	afm->WinMetrics.sTypoAscender = (SHORT)Round(afm->FontBBox.ury);
-	
+
     if (afm->WinMetrics.sTypoDescender == 0)
     	afm->WinMetrics.sTypoDescender = (SHORT)Round(afm->FontBBox.lly);
-	
+
     afm->WinMetrics.sTypoLineGap = 1200 -
     	    (afm->WinMetrics.sTypoAscender - afm->WinMetrics.sTypoDescender);
     if (afm->WinMetrics.sTypoLineGap < 0)
     	afm->WinMetrics.sTypoLineGap = 0;
-	
+
     return TRUE;
-	
+
     cleanup_afm:    	    	    	/* handle fatal or non-fatal errors */
     	HeapFree(PSDRV_Heap, 0, afm);
 	*p_afm = NULL;
@@ -572,13 +572,13 @@
     CHAR    *cp, *end_ptr;
 
     cp = sz + 1;
-    
+
     if (*cp == 'H')
     {
     	base = 16;
 	++cp;
     }
-    
+
     errno = 0;
     l = strtol(cp, &end_ptr, base);
     if (end_ptr == cp || errno != 0 || l > INT_MAX || l < INT_MIN)
@@ -586,7 +586,7 @@
     	WARN("Error parsing character code '%s'\n", sz);
 	return TRUE;
     }
-    
+
     metrics->C = (INT)l;
     return TRUE;
 }
@@ -606,39 +606,39 @@
     double  d;
 
     cp = sz + 1;
-    
+
     if (*cp == '0')
     	++cp;
-	
+
     if (*cp == 'X')
     {
     	vector = FALSE;
 	++cp;
     }
-    
+
     if (!isspace(*cp))
     	goto parse_error;
-	
+
     errno = 0;
     d = strtod(cp, &end_ptr);
     if (end_ptr == cp || errno != 0 ||
     	    DoubleToFloat(&(metrics->WX), d) == FALSE)
     	goto parse_error;
-	
+
     if (vector == FALSE)
     	return TRUE;
-	
+
     /*	Make sure that Y component of vector is zero */
-	
+
     d = strtod(cp, &end_ptr);	    	    	    	    /* errno == 0 */
     if (end_ptr == cp || errno != 0 || d != 0.0)
     {
     	metrics->WX = FLT_MAX;
     	goto parse_error;
     }
-	
+
     return TRUE;
-	
+
     parse_error:
     	WARN("Error parsing character width '%s'\n", sz);
 	return TRUE;
@@ -657,21 +657,21 @@
 {
     CHAR    *cp, *end_ptr;
     double  d;
-    
+
     errno = 0;
-    
+
     cp = sz + 1;
     d = strtod(cp, &end_ptr);
     if (end_ptr == cp || errno != 0 ||
     	    DoubleToFloat(&(metrics->B.llx), d) == FALSE)
 	goto parse_error;
-	
+
     cp = end_ptr;
     d = strtod(cp, &end_ptr);
     if (end_ptr == cp || errno != 0 ||
     	    DoubleToFloat(&(metrics->B.lly), d) == FALSE)
 	goto parse_error;
-	
+
     cp = end_ptr;
     d = strtod(cp, &end_ptr);
     if (end_ptr == cp || errno != 0 ||
@@ -685,7 +685,7 @@
 	goto parse_error;
 
     return TRUE;
-    
+
     parse_error:
     	WARN("Error parsing glyph bounding box '%s'\n", sz);
 	return TRUE;
@@ -702,30 +702,30 @@
 static BOOL ParseN(LPSTR sz, OLD_AFMMETRICS *metrics)
 {
     CHAR    save, *cp, *end_ptr;
-    
+
     cp = sz + 1;
-    
+
     while (isspace(*cp))
     	++cp;
-	
+
     end_ptr = cp;
-    
+
     while (*end_ptr != '\0' && !isspace(*end_ptr))
     	++end_ptr;
-	
+
     if (end_ptr == cp)
     {
     	WARN("Error parsing glyph name '%s'\n", sz);
 	return TRUE;
     }
-	
+
     save = *end_ptr;
     *end_ptr = '\0';
-    
+
     metrics->N = PSDRV_GlyphName(cp);
     if (metrics->N == NULL)
     	return FALSE;
-	
+
     *end_ptr = save;
     return TRUE;
 }
@@ -746,47 +746,47 @@
     { FLT_MAX, FLT_MAX, FLT_MAX, FLT_MAX }, 	    /* B */
     NULL    	    	    	    	    	    /* L */
 };
- 
+
 static BOOL ParseCharMetrics(LPSTR buffer, INT len, OLD_AFMMETRICS *metrics)
 {
     CHAR    *cp = buffer;
 
     *metrics = badmetrics;
-    
+
     while (*cp != '\0')
     {
     	while (isspace(*cp))
 	    ++cp;
-	    
+
 	switch(*cp)
 	{
 	    case 'C':	if (ParseC(cp, metrics) == FALSE)
 	    	    	    return FALSE;
 	    	    	break;
-			
+
 	    case 'W':	if (ParseW(cp, metrics) == FALSE)
 	    	    	    return FALSE;
 	    	    	break;
-			
+
 	    case 'N':	if (ParseN(cp, metrics) == FALSE)
 	    	    	    return FALSE;
 	    	    	break;
-			
+
 	    case 'B':	if (ParseB(cp, metrics) == FALSE)
 	    	    	    return FALSE;
 	    	    	break;
 	}
-	
+
 	cp = strchr(cp, ';');
 	if (cp == NULL)
 	{
 	    WARN("No terminating semicolon\n");
 	    break;
 	}
-	
+
 	++cp;
     }
-    
+
     if (metrics->C == INT_MAX || metrics->WX == FLT_MAX || metrics->N == NULL ||
     	    metrics->B.ury == FLT_MAX)
     {
@@ -814,17 +814,17 @@
 {
     return (int)(*((const LONG *)a) - *((const LONG *)b));
 }
- 
+
 inline static BOOL IsWinANSI(LONG uv)
 {
     if ((0x0020 <= uv && uv <= 0x007e) || (0x00a0 <= uv && uv <= 0x00ff) ||
     	    (0x2018 <= uv && uv <= 0x201a) || (0x201c <= uv && uv <= 0x201e) ||
 	    (0x2020 <= uv && uv <= 0x2022))
     	return TRUE;
-	
+
     if (bsearch(&uv, ansiChars, 21, sizeof(INT), cmpUV) != NULL)
     	return TRUE;
-	
+
     return FALSE;
 }
 
@@ -846,11 +846,11 @@
     return ((const UNICODEGLYPH *)a)->name->index -
     	    ((const UNICODEGLYPH *)b)->name->index;
 }
- 
+
 static VOID Unicodify(AFM *afm, OLD_AFMMETRICS *metrics)
 {
     INT     i;
-    
+
     if (strcmp(afm->EncodingScheme, "FontSpecific") == 0)
     {
     	for (i = 0; i < afm->NumofMetrics; ++i)
@@ -865,18 +865,18 @@
 		metrics[i].UV = -1L;
 	    }
 	}
-	
+
 	afm->WinMetrics.sAscender = (SHORT)Round(afm->FontBBox.ury);
 	afm->WinMetrics.sDescender = (SHORT)Round(afm->FontBBox.lly);
     }
     else    	    	    	    	    	/* non-FontSpecific encoding */
     {
     	UNICODEGLYPH	ug, *p_ug;
-	
+
 	PSDRV_IndexGlyphList();     	/* for fast searching of glyph names */
-	
+
 	afm->WinMetrics.sAscender = afm->WinMetrics.sDescender = 0;
-	
+
 	for (i = 0; i < afm->NumofMetrics; ++i)
 	{
 	    ug.name = metrics[i].N;
@@ -890,12 +890,12 @@
 	    else
 	    {
 	    	metrics[i].UV = p_ug->UV;
-		
+
 		if (IsWinANSI(p_ug->UV))
 		{
 		    SHORT   ury = (SHORT)Round(metrics[i].B.ury);
 		    SHORT   lly = (SHORT)Round(metrics[i].B.lly);
-		    
+
 		    if (ury > afm->WinMetrics.sAscender)
 		    	afm->WinMetrics.sAscender = ury;
 		    if (lly < afm->WinMetrics.sDescender)
@@ -903,18 +903,18 @@
 		}
 	    }
 	}
-	
+
 	if (afm->WinMetrics.sAscender == 0)
 	    afm->WinMetrics.sAscender = (SHORT)Round(afm->FontBBox.ury);
 	if (afm->WinMetrics.sDescender == 0)
 	    afm->WinMetrics.sDescender = (SHORT)Round(afm->FontBBox.lly);
     }
-    
+
     afm->WinMetrics.sLineGap =
     	    1150 - (afm->WinMetrics.sAscender - afm->WinMetrics.sDescender);
     if (afm->WinMetrics.sLineGap < 0)
     	afm->WinMetrics.sLineGap = 0;
-    
+
     afm->WinMetrics.usWinAscent = (afm->WinMetrics.sAscender > 0) ?
     	    afm->WinMetrics.sAscender : 0;
     afm->WinMetrics.usWinDescent = (afm->WinMetrics.sDescender < 0) ?
@@ -930,8 +930,8 @@
 static int OldAFMMetricsByUV(const void *a, const void *b)
 {
     return ((const OLD_AFMMETRICS *)a)->UV - ((const OLD_AFMMETRICS *)b)->UV;
-} 
- 
+}
+
 static BOOL ReadCharMetrics(FILE *file, CHAR buffer[], INT bufsize, AFM *afm,
     	AFMMETRICS **p_metrics)
 {
@@ -939,7 +939,7 @@
     OLD_AFMMETRICS  *old_metrics, *encoded_metrics;
     AFMMETRICS	    *metrics;
     INT     	    i, len;
-    
+
     retval = ReadInt(file, buffer, bufsize, "StartCharMetrics",
     	    &(afm->NumofMetrics), &found);
     if (retval == FALSE || found == FALSE)
@@ -947,55 +947,55 @@
     	*p_metrics = NULL;
 	return retval;
     }
-    
+
     old_metrics = HeapAlloc(PSDRV_Heap, 0,
     	    afm->NumofMetrics * sizeof(*old_metrics));
     if (old_metrics == NULL)
     	return FALSE;
-	
+
     for (i = 0; i < afm->NumofMetrics; ++i)
     {
     	retval = ReadLine(file, buffer, bufsize, &len);
     	if (retval == FALSE)
 	    goto cleanup_old_metrics;
-	
+
 	if(len > 0)
 	{
 	    retval = ParseCharMetrics(buffer, len, old_metrics + i);
 	    if (retval == FALSE || old_metrics[i].C == INT_MAX)
 	    	goto cleanup_old_metrics;
-		
+
 	    continue;
 	}
-	
+
 	switch (len)
 	{
 	    case 0: 	    --i;
 		    	    continue;
-				
+
 	    case INT_MIN:   WARN("Ignoring long line '%32s...'\n", buffer);
 			    goto cleanup_old_metrics;	    /* retval == TRUE */
-				
+
 	    case EOF:	    WARN("Unexpected EOF\n");
 	    	    	    goto cleanup_old_metrics;  	    /* retval == TRUE */
 	}
     }
-    
+
     Unicodify(afm, old_metrics);    /* wait until glyph names have been read */
-	    
+
     qsort(old_metrics, afm->NumofMetrics, sizeof(*old_metrics),
     	    OldAFMMetricsByUV);
-    
+
     for (i = 0; old_metrics[i].UV == -1; ++i);      /* count unencoded glyphs */
-    
+
     afm->NumofMetrics -= i;
     encoded_metrics = old_metrics + i;
-    
+
     afm->Metrics = *p_metrics = metrics = HeapAlloc(PSDRV_Heap, 0,
     	    afm->NumofMetrics * sizeof(*metrics));
     if (afm->Metrics == NULL)
     	goto cleanup_old_metrics;   	    	    	    /* retval == TRUE */
-	
+
     for (i = 0; i < afm->NumofMetrics; ++i, ++metrics, ++encoded_metrics)
     {
     	metrics->C = encoded_metrics->C;
@@ -1003,13 +1003,13 @@
 	metrics->WX = encoded_metrics->WX;
 	metrics->N = encoded_metrics->N;
     }
-    
+
     HeapFree(PSDRV_Heap, 0, old_metrics);
-    
+
     afm->WinMetrics.sAvgCharWidth = PSDRV_CalcAvgCharWidth(afm);
-    
+
     return TRUE;
-    
+
     cleanup_old_metrics:    	    	/* handle fatal or non-fatal errors */
     	HeapFree(PSDRV_Heap, 0, old_metrics);
 	*p_metrics = NULL;
@@ -1020,7 +1020,7 @@
  *  BuildAFM
  *
  *  Builds the AFM for a PostScript font and adds it to the driver font list.
- *  Returns FALSE only on an unexpected error (memory allocation or I/O error).	
+ *  Returns FALSE only on an unexpected error (memory allocation or I/O error).
  *
  */
 static BOOL BuildAFM(FILE *file)
@@ -1030,46 +1030,46 @@
     AFMMETRICS	*metrics;
     LPSTR   	font_name, full_name, family_name, encoding_scheme;
     BOOL    	retval, added;
-    
+
     retval = ReadFontMetrics(file, buffer, sizeof(buffer), &afm);
     if (retval == FALSE || afm == NULL)
     	return retval;
-	
+
     retval = ReadString(file, buffer, sizeof(buffer), "FontName", &font_name);
     if (retval == FALSE || font_name == NULL)
     	goto cleanup_afm;
-	
+
     retval = ReadString(file, buffer, sizeof(buffer), "FullName", &full_name);
     if (retval == FALSE || full_name == NULL)
     	goto cleanup_font_name;
-	
+
     retval = ReadString(file, buffer, sizeof(buffer), "FamilyName",
     	    &family_name);
     if (retval == FALSE || family_name == NULL)
     	goto cleanup_full_name;
-	
+
     retval = ReadString(file, buffer, sizeof(buffer), "EncodingScheme",
     	    &encoding_scheme);
     if (retval == FALSE || encoding_scheme == NULL)
     	goto cleanup_family_name;
-    
+
     afm->FontName = font_name;
     afm->FullName = full_name;
     afm->FamilyName = family_name;
     afm->EncodingScheme = encoding_scheme;
-	
+
     retval = ReadCharMetrics(file, buffer, sizeof(buffer), afm, &metrics);
     if (retval == FALSE || metrics == FALSE)
     	goto cleanup_encoding_scheme;
-	
+
     retval = PSDRV_AddAFMtoList(&PSDRV_AFMFontList, afm, &added);
     if (retval == FALSE || added == FALSE)
     	goto cleanup_encoding_scheme;
-	
+
     return TRUE;
-    
+
     /* clean up after fatal or non-fatal errors */
-    
+
     cleanup_encoding_scheme:
     	HeapFree(PSDRV_Heap, 0, encoding_scheme);
     cleanup_family_name:
@@ -1080,7 +1080,7 @@
     	HeapFree(PSDRV_Heap, 0, font_name);
     cleanup_afm:
     	HeapFree(PSDRV_Heap, 0, afm);
-	
+
     return retval;
 }
 
@@ -1097,16 +1097,16 @@
     BOOL    retval;
 
     TRACE("%s\n", filename);
-    
+
     f = fopen(filename, "r");
     if (f == NULL)
     {
     	WARN("%s: %s\n", filename, strerror(errno));
 	return TRUE;
     }
-    
+
     retval = BuildAFM(f);
-    
+
     fclose(f);
     return retval;
 }
@@ -1122,36 +1122,36 @@
     struct dirent   *dent;
     DIR     	    *dir;
     CHAR    	    filename[256];
-    
+
     dir = opendir(dirname);
     if (dir == NULL)
     {
     	WARN("%s: %s\n", dirname, strerror(errno));
 	return TRUE;
     }
-    
+
     while ((dent = readdir(dir)) != NULL)
     {
     	CHAR	*file_extension = strchr(dent->d_name, '.');
 	int 	fn_len;
-	
+
 	if (file_extension == NULL || strcasecmp(file_extension, ".afm") != 0)
 	    continue;
-	    
+
 	fn_len = snprintf(filename, 256, "%s/%s", dirname, dent->d_name);
 	if (fn_len < 0 || fn_len > sizeof(filename) - 1)
 	{
 	    WARN("Path '%s/%s' is too long\n", dirname, dent->d_name);
 	    continue;
 	}
-	
+
 	if (ReadAFMFile(filename) == FALSE)
 	{
 	    closedir(dir);
 	    return FALSE;
 	}
     }
-    
+
     closedir(dir);
     return TRUE;
 }
@@ -1173,32 +1173,32 @@
     INT     i = 0;
     HKEY    hkey;
     DWORD   type, name_len, value_len;
-    
+
     if (RegOpenKeyExA(HKEY_LOCAL_MACHINE,
     	    "Software\\Wine\\Wine\\Config\\afmdirs",
 	    0, KEY_READ, &hkey) != ERROR_SUCCESS)
 	return TRUE;
-	
+
     name_len = sizeof(name_buf);
     value_len = sizeof(value_buf);
-    
+
     while (RegEnumValueA(hkey, i++, name_buf, &name_len, NULL, &type, value_buf,
     	    &value_len) == ERROR_SUCCESS)
     {
     	value_buf[sizeof(value_buf) - 1] = '\0';
-	
+
 	if (ReadAFMDir(value_buf) == FALSE)
 	{
 	    RegCloseKey(hkey);
 	    return FALSE;
 	}
-	
+
 	/* initialize lengths for new iteration */
-	
+
 	name_len = sizeof(name_buf);
 	value_len = sizeof(value_buf);
     }
-    
+
     RegCloseKey(hkey);
     return TRUE;
 }
diff --git a/dlls/wininet/ftp.c b/dlls/wininet/ftp.c
index 195de9f..623a901 100644
--- a/dlls/wininet/ftp.c
+++ b/dlls/wininet/ftp.c
@@ -55,28 +55,28 @@
 
 typedef enum {
   /* FTP commands with arguments. */
-  FTP_CMD_ACCT, 
-  FTP_CMD_CWD,  
-  FTP_CMD_DELE, 
-  FTP_CMD_MKD,  
-  FTP_CMD_PASS, 
-  FTP_CMD_PORT, 
-  FTP_CMD_RETR, 
-  FTP_CMD_RMD,  
-  FTP_CMD_RNFR, 
-  FTP_CMD_RNTO, 
-  FTP_CMD_STOR, 
-  FTP_CMD_TYPE, 
-  FTP_CMD_USER, 
+  FTP_CMD_ACCT,
+  FTP_CMD_CWD,
+  FTP_CMD_DELE,
+  FTP_CMD_MKD,
+  FTP_CMD_PASS,
+  FTP_CMD_PORT,
+  FTP_CMD_RETR,
+  FTP_CMD_RMD,
+  FTP_CMD_RNFR,
+  FTP_CMD_RNTO,
+  FTP_CMD_STOR,
+  FTP_CMD_TYPE,
+  FTP_CMD_USER,
 
   /* FTP commands without arguments. */
   FTP_CMD_ABOR,
   FTP_CMD_LIST,
   FTP_CMD_NLST,
   FTP_CMD_PASV,
-  FTP_CMD_PWD, 
+  FTP_CMD_PWD,
   FTP_CMD_QUIT,
-} FTP_COMMAND; 
+} FTP_COMMAND;
 
 static const CHAR *szFtpCommands[] = {
   "ACCT",
@@ -121,7 +121,7 @@
 BOOL FTP_SendPortOrPasv(LPWININETFTPSESSIONA lpwfs);
 BOOL FTP_ParsePermission(LPCSTR lpszPermission, LPFILEPROPERTIESA lpfp);
 BOOL FTP_ParseDirectory(LPWININETFTPSESSIONA lpwfs, INT nSocket, LPFILEPROPERTIESA *lpafp, LPDWORD dwfp);
-HINTERNET FTP_ReceiveFileList(LPWININETFTPSESSIONA lpwfs, INT nSocket, 
+HINTERNET FTP_ReceiveFileList(LPWININETFTPSESSIONA lpwfs, INT nSocket,
 	LPWIN32_FIND_DATAA lpFindFileData, DWORD dwContext);
 DWORD FTP_SetResponseError(DWORD dwResponse);
 
@@ -170,7 +170,7 @@
     }
     else
     {
-	return FTP_FtpPutFileA(hConnect, lpszLocalFile, 
+	return FTP_FtpPutFileA(hConnect, lpszLocalFile,
 		lpszNewRemoteFile, dwFlags, dwContext);
     }
 }
@@ -205,7 +205,7 @@
     INTERNET_SetLastError(0);
 
     /* Open file to be uploaded */
-    if (INVALID_HANDLE_VALUE == 
+    if (INVALID_HANDLE_VALUE ==
         (hFile = CreateFileA(lpszLocalFile, GENERIC_READ, 0, 0, OPEN_EXISTING, 0, 0)))
     {
         INTERNET_SetLastError(ERROR_FILE_NOT_FOUND);
@@ -221,7 +221,7 @@
         INT nDataSocket;
 
         /* Get data socket to server */
-        if (FTP_GetDataSocket(lpwfs, &nDataSocket)) 
+        if (FTP_GetDataSocket(lpwfs, &nDataSocket))
         {
             FTP_SendData(lpwfs, nDataSocket, hFile);
             close(nDataSocket);
@@ -244,7 +244,7 @@
     if (hIC->hdr.dwFlags & INTERNET_FLAG_ASYNC  && hIC->lpfnStatusCB)
     {
         INTERNET_ASYNC_RESULT iar;
-	       
+
         iar.dwResult = (DWORD)bSuccess;
         iar.dwError = bSuccess ? ERROR_SUCCESS : INTERNET_GetLastError();
         hIC->lpfnStatusCB(hConnect, lpwfs->hdr.dwContext, INTERNET_STATUS_REQUEST_COMPLETE,
@@ -294,7 +294,7 @@
     }
     else
     {
-	return FTP_FtpSetCurrentDirectoryA(hConnect, lpszDirectory); 
+	return FTP_FtpSetCurrentDirectoryA(hConnect, lpszDirectory);
     }
 }
 
@@ -347,7 +347,7 @@
     if (hIC->hdr.dwFlags & INTERNET_FLAG_ASYNC && hIC->lpfnStatusCB)
     {
         INTERNET_ASYNC_RESULT iar;
-	       
+
         iar.dwResult = (DWORD)bSuccess;
         iar.dwError = bSuccess ? ERROR_SUCCESS : ERROR_INTERNET_EXTENDED_ERROR;
         hIC->lpfnStatusCB(hConnect, lpwfs->hdr.dwContext, INTERNET_STATUS_REQUEST_COMPLETE,
@@ -383,7 +383,7 @@
     {
         WORKREQUEST workRequest;
 
-        workRequest.asyncall = FTPCREATEDIRECTORYA;  
+        workRequest.asyncall = FTPCREATEDIRECTORYA;
 	workRequest.HFTPSESSION = (DWORD)hConnect;
 	workRequest.LPSZDIRECTORY = (DWORD)FTP_strdup(lpszDirectory);
 
@@ -391,7 +391,7 @@
     }
     else
     {
-	return FTP_FtpCreateDirectoryA(hConnect, lpszDirectory); 
+	return FTP_FtpCreateDirectoryA(hConnect, lpszDirectory);
     }
 }
 
@@ -441,7 +441,7 @@
     if (hIC->hdr.dwFlags & INTERNET_FLAG_ASYNC && hIC->lpfnStatusCB)
     {
         INTERNET_ASYNC_RESULT iar;
-	       
+
         iar.dwResult = (DWORD)bSuccess;
         iar.dwError = bSuccess ? ERROR_SUCCESS : INTERNET_GetLastError();
         hIC->lpfnStatusCB(hConnect, lpwfs->hdr.dwContext, INTERNET_STATUS_REQUEST_COMPLETE,
@@ -491,8 +491,8 @@
     }
     else
     {
-	return FTP_FtpFindFirstFileA(hConnect, lpszSearchFile, lpFindFileData, 
-		dwFlags, dwContext); 
+	return FTP_FtpFindFirstFileA(hConnect, lpszSearchFile, lpFindFileData,
+		dwFlags, dwContext);
     }
 }
 
@@ -536,7 +536,7 @@
         goto lend;
 
     hIC = (LPWININETAPPINFOA) lpwfs->hdr.lpwhparent;
-    if (!FTP_SendCommand(lpwfs->sndSocket, FTP_CMD_LIST, lpszSearchFile, 
+    if (!FTP_SendCommand(lpwfs->sndSocket, FTP_CMD_LIST, lpszSearchFile,
         hIC->lpfnStatusCB, hConnect, lpwfs->hdr.dwContext))
         goto lend;
 
@@ -601,7 +601,7 @@
  *    FALSE on failure
  *
  */
-BOOL WINAPI FtpGetCurrentDirectoryA(HINTERNET hFtpSession, LPSTR lpszCurrentDirectory, 
+BOOL WINAPI FtpGetCurrentDirectoryA(HINTERNET hFtpSession, LPSTR lpszCurrentDirectory,
 	LPDWORD lpdwCurrentDirectory)
 {
     LPWININETFTPSESSIONA lpwfs = (LPWININETFTPSESSIONA) hFtpSession;
@@ -630,7 +630,7 @@
     else
     {
 	return FTP_FtpGetCurrentDirectoryA(hFtpSession, lpszCurrentDirectory,
-		lpdwCurrentDirectory); 
+		lpdwCurrentDirectory);
     }
 }
 
@@ -645,7 +645,7 @@
  *    FALSE on failure
  *
  */
-BOOL WINAPI FTP_FtpGetCurrentDirectoryA(HINTERNET hFtpSession, LPSTR lpszCurrentDirectory, 
+BOOL WINAPI FTP_FtpGetCurrentDirectoryA(HINTERNET hFtpSession, LPSTR lpszCurrentDirectory,
 	LPDWORD lpdwCurrentDirectory)
 {
     INT nResCode;
@@ -671,7 +671,7 @@
         hIC->lpfnStatusCB, hFtpSession, lpwfs->hdr.dwContext))
         goto lend;
 
-    nResCode = FTP_ReceiveResponse(lpwfs->sndSocket, INTERNET_GetResponseBuffer(), 
+    nResCode = FTP_ReceiveResponse(lpwfs->sndSocket, INTERNET_GetResponseBuffer(),
         MAX_REPLY_LEN, hIC->lpfnStatusCB, hFtpSession, lpwfs->hdr.dwContext);
     if (nResCode)
     {
@@ -692,7 +692,7 @@
             }
 
             len = lastpos - firstpos - 1;
-            strncpy(lpszCurrentDirectory, &lpszResponseBuffer[firstpos+1], 
+            strncpy(lpszCurrentDirectory, &lpszResponseBuffer[firstpos+1],
                 len < *lpdwCurrentDirectory ? len : *lpdwCurrentDirectory);
             *lpdwCurrentDirectory = len;
             bSuccess = TRUE;
@@ -705,7 +705,7 @@
     if (hIC->hdr.dwFlags & INTERNET_FLAG_ASYNC && hIC->lpfnStatusCB)
     {
         INTERNET_ASYNC_RESULT iar;
-	       
+
         iar.dwResult = (DWORD)bSuccess;
         iar.dwError = bSuccess ? ERROR_SUCCESS : ERROR_INTERNET_EXTENDED_ERROR;
         hIC->lpfnStatusCB(hFtpSession, lpwfs->hdr.dwContext, INTERNET_STATUS_REQUEST_COMPLETE,
@@ -802,8 +802,8 @@
         bSuccess = FTP_SendStore(lpwfs, lpszFileName, dwFlags);
     }
 
-    /* Get data socket to server */ 
-    if (bSuccess && FTP_GetDataSocket(lpwfs, &nDataSocket)) 
+    /* Get data socket to server */
+    if (bSuccess && FTP_GetDataSocket(lpwfs, &nDataSocket))
     {
         hFile = HeapAlloc(GetProcessHeap(), 0, sizeof(WININETFILE));
         hFile->hdr.htype = WH_HFILE;
@@ -820,7 +820,7 @@
     if (hIC->hdr.dwFlags & INTERNET_FLAG_ASYNC && hIC->lpfnStatusCB)
     {
         INTERNET_ASYNC_RESULT iar;
-	
+
 	if (hFile)
 	{
             iar.dwResult = (DWORD)hFile;
@@ -828,7 +828,7 @@
             hIC->lpfnStatusCB(hFtpSession, lpwfs->hdr.dwContext, INTERNET_STATUS_HANDLE_CREATED,
                 &iar, sizeof(INTERNET_ASYNC_RESULT));
 	}
-       
+
         iar.dwResult = (DWORD)bSuccess;
         iar.dwError = bSuccess ? ERROR_SUCCESS : INTERNET_GetLastError();
         hIC->lpfnStatusCB(hFtpSession, lpwfs->hdr.dwContext, INTERNET_STATUS_REQUEST_COMPLETE,
@@ -917,7 +917,7 @@
     INTERNET_SetLastError(0);
 
     /* Ensure we can write to lpszNewfile by opening it */
-    hFile = CreateFileA(lpszNewFile, GENERIC_WRITE, 0, 0, fFailIfExists ? 
+    hFile = CreateFileA(lpszNewFile, GENERIC_WRITE, 0, 0, fFailIfExists ?
         CREATE_NEW : CREATE_ALWAYS, dwLocalFlagsAttribute, 0);
     if (INVALID_HANDLE_VALUE == hFile)
         goto lend;
@@ -929,8 +929,8 @@
     {
         INT nDataSocket;
 
-        /* Get data socket to server */ 
-        if (FTP_GetDataSocket(lpwfs, &nDataSocket)) 
+        /* Get data socket to server */
+        if (FTP_GetDataSocket(lpwfs, &nDataSocket))
         {
             INT nResCode;
 
@@ -960,7 +960,7 @@
     if (hIC->hdr.dwFlags & INTERNET_FLAG_ASYNC && hIC->lpfnStatusCB)
     {
         INTERNET_ASYNC_RESULT iar;
-	
+
         iar.dwResult = (DWORD)bSuccess;
         iar.dwError = bSuccess ? ERROR_SUCCESS : INTERNET_GetLastError();
         hIC->lpfnStatusCB(hInternet, lpwfs->hdr.dwContext, INTERNET_STATUS_REQUEST_COMPLETE,
@@ -1054,7 +1054,7 @@
     if (hIC->hdr.dwFlags & INTERNET_FLAG_ASYNC && hIC->lpfnStatusCB)
     {
         INTERNET_ASYNC_RESULT iar;
-	
+
         iar.dwResult = (DWORD)bSuccess;
         iar.dwError = bSuccess ? ERROR_SUCCESS : INTERNET_GetLastError();
         hIC->lpfnStatusCB(hFtpSession, lpwfs->hdr.dwContext, INTERNET_STATUS_REQUEST_COMPLETE,
@@ -1149,7 +1149,7 @@
     if (hIC->hdr.dwFlags & INTERNET_FLAG_ASYNC && hIC->lpfnStatusCB)
     {
         INTERNET_ASYNC_RESULT iar;
-	
+
         iar.dwResult = (DWORD)bSuccess;
         iar.dwError = bSuccess ? ERROR_SUCCESS : INTERNET_GetLastError();
         hIC->lpfnStatusCB(hFtpSession, lpwfs->hdr.dwContext, INTERNET_STATUS_REQUEST_COMPLETE,
@@ -1229,14 +1229,14 @@
     if (!FTP_SendCommand(lpwfs->sndSocket, FTP_CMD_RNFR, lpszSrc, 0, 0, 0))
         goto lend;
 
-    nResCode = FTP_ReceiveResponse(lpwfs->sndSocket, 
+    nResCode = FTP_ReceiveResponse(lpwfs->sndSocket,
         INTERNET_GetResponseBuffer(), MAX_REPLY_LEN, 0, 0, 0);
     if (nResCode == 350)
     {
         if (!FTP_SendCommand(lpwfs->sndSocket, FTP_CMD_RNTO, lpszDest, 0, 0, 0))
             goto lend;
 
-        nResCode = FTP_ReceiveResponse(lpwfs->sndSocket, 
+        nResCode = FTP_ReceiveResponse(lpwfs->sndSocket,
 		    INTERNET_GetResponseBuffer(), MAX_REPLY_LEN, 0, 0, 0);
     }
 
@@ -1250,7 +1250,7 @@
     if (hIC->hdr.dwFlags & INTERNET_FLAG_ASYNC && hIC->lpfnStatusCB)
     {
         INTERNET_ASYNC_RESULT iar;
-	
+
         iar.dwResult = (DWORD)bSuccess;
         iar.dwError = bSuccess ? ERROR_SUCCESS : INTERNET_GetLastError();
         hIC->lpfnStatusCB(hFtpSession, lpwfs->hdr.dwContext, INTERNET_STATUS_REQUEST_COMPLETE,
@@ -1272,7 +1272,7 @@
  *
  */
 
-HINTERNET FTP_Connect(HINTERNET hInternet, LPCSTR lpszServerName, 
+HINTERNET FTP_Connect(HINTERNET hInternet, LPCSTR lpszServerName,
 	INTERNET_PORT nServerPort, LPCSTR lpszUserName,
 	LPCSTR lpszPassword, DWORD dwFlags, DWORD dwContext)
 {
@@ -1283,8 +1283,8 @@
     BOOL bSuccess = FALSE;
     LPWININETFTPSESSIONA lpwfs = NULL;
 
-    TRACE("0x%08lx  Server(%s) Port(%d) User(%s) Paswd(%s)\n", 
-	    (ULONG) hInternet, lpszServerName, 
+    TRACE("0x%08lx  Server(%s) Port(%d) User(%s) Paswd(%s)\n",
+	    (ULONG) hInternet, lpszServerName,
 	    nServerPort, lpszUserName, lpszPassword);
 
     if (((LPWININETHANDLEHEADER)hInternet)->htype != WH_HINIT)
@@ -1333,7 +1333,7 @@
     }
     else
     {
-        TRACE("Connected to server\n"); 
+        TRACE("Connected to server\n");
         if (hIC->lpfnStatusCB)
             hIC->lpfnStatusCB(hInternet, dwContext, INTERNET_STATUS_CONNECTED_TO_SERVER,
                 &socketAddr, sizeof(struct sockaddr_in));
@@ -1395,7 +1395,7 @@
     if (hIC->hdr.dwFlags & INTERNET_FLAG_ASYNC && hIC->lpfnStatusCB)
     {
         INTERNET_ASYNC_RESULT iar;
-	       
+
         iar.dwResult = (DWORD)lpwfs;
         iar.dwError = bSuccess ? ERROR_SUCCESS : INTERNET_GetLastError();
         hIC->lpfnStatusCB(hInternet, dwContext, INTERNET_STATUS_REQUEST_COMPLETE,
@@ -1482,7 +1482,7 @@
 	    INTERNET_SetLastError(ERROR_OUTOFMEMORY);
 	    return FALSE;
 	}
-	sprintf(buf, "%s%s%s%s", szFtpCommands[ftpCmd], bParamHasLen ? " " : "", 
+	sprintf(buf, "%s%s%s%s", szFtpCommands[ftpCmd], bParamHasLen ? " " : "",
 		bParamHasLen ? lpszParam : "", szCRLF);
 
 	TRACE("Sending (%s) len(%ld)\n", buf, len);
@@ -1495,7 +1495,7 @@
 	HeapFree(GetProcessHeap(), 0, (LPVOID)buf);
 
 	if (lpfnStatusCB)
-		lpfnStatusCB(hHandle, dwContext, INTERNET_STATUS_REQUEST_SENT, 
+		lpfnStatusCB(hHandle, dwContext, INTERNET_STATUS_REQUEST_SENT,
 			&nBytesSent, sizeof(DWORD));
 
 	TRACE("Sent %ld bytes\n", nBytesSent);
@@ -1555,14 +1555,14 @@
 	    }
 	}
     }
-		   
+
     if (nRecv >= 3)
     {
         lpszResponse[nRecv] = '\0';
         rc = atoi(lpszResponse);
 
         if (lpfnStatusCB)
-            lpfnStatusCB(hHandle, dwContext, INTERNET_STATUS_RESPONSE_RECEIVED, 
+            lpfnStatusCB(hHandle, dwContext, INTERNET_STATUS_RESPONSE_RECEIVED,
 		    &nRecv, sizeof(DWORD));
     }
 
@@ -1590,7 +1590,7 @@
     TRACE("\n");
     if (!FTP_SendCommand(lpwfs->sndSocket, FTP_CMD_PASS, lpwfs->lpszPassword, 0, 0, 0))
         goto lend;
-	   
+
     nResCode = FTP_ReceiveResponse(lpwfs->sndSocket, INTERNET_GetResponseBuffer(),
         MAX_REPLY_LEN, 0, 0, 0);
     if (nResCode)
@@ -1616,7 +1616,7 @@
 /***********************************************************************
  *           FTP_SendAccount (internal)
  *
- * 
+ *
  *
  * RETURNS
  *   TRUE on success
@@ -1944,7 +1944,7 @@
  * Either accepts an incoming data socket connection from the server
  * or just returns the already opened socket after a PASV command
  * in case of passive FTP.
- * 
+ *
  *
  * RETURNS
  *   TRUE on success
@@ -2017,7 +2017,7 @@
                 break;
         }
 
-        nLen = DATA_PACKET_SIZE < nBytesToSend ? 
+        nLen = DATA_PACKET_SIZE < nBytesToSend ?
             DATA_PACKET_SIZE : nBytesToSend;
         nRC  = send(nDataSocket, lpszBuffer, nLen, 0);
 
@@ -2033,7 +2033,7 @@
         if( nSeconds / 60 > 0 )
         {
             TRACE( "%ld bytes of %ld bytes (%ld%%) in %ld min %ld sec estimated remainig time %ld sec\n",
-            nTotalSent, fi.nFileSizeLow, nTotalSent*100/fi.nFileSizeLow, nSeconds / 60, 
+            nTotalSent, fi.nFileSizeLow, nTotalSent*100/fi.nFileSizeLow, nSeconds / 60,
             nSeconds % 60, (fi.nFileSizeLow - nTotalSent) * nSeconds / nTotalSent );
         }
         else
@@ -2155,11 +2155,11 @@
             /* other side closed socket. */
             if (nRC == 0)
                 goto recv_end;
-            WriteFile(hFile, lpszBuffer, nRC, &nBytesWritten, NULL); 
+            WriteFile(hFile, lpszBuffer, nRC, &nBytesWritten, NULL);
             nBytesReceived += nRC;
         }
 
-        TRACE("%ld bytes of %ld (%ld%%)\r", nBytesReceived, nBytes, 
+        TRACE("%ld bytes of %ld (%ld%%)\r", nBytesReceived, nBytes,
            nBytesReceived * 100 / nBytes);
     }
 
@@ -2214,7 +2214,7 @@
  */
 BOOL FTP_CloseFindNextHandle(LPWININETFINDNEXTA lpwfn)
 {
-    INT i; 
+    INT i;
 
     TRACE("\n");
 
@@ -2241,7 +2241,7 @@
  *   NULL on failure
  *
  */
-HINTERNET FTP_ReceiveFileList(LPWININETFTPSESSIONA lpwfs, INT nSocket, 
+HINTERNET FTP_ReceiveFileList(LPWININETFTPSESSIONA lpwfs, INT nSocket,
 	LPWIN32_FIND_DATAA lpFindFileData, DWORD dwContext)
 {
     DWORD dwSize = 0;
@@ -2259,12 +2259,12 @@
         {
             lpwfn->hdr.htype = WH_HFINDNEXT;
             lpwfn->hdr.lpwhparent = (LPWININETHANDLEHEADER)lpwfs;
-	    lpwfn->hdr.dwContext = dwContext; 
+	    lpwfn->hdr.dwContext = dwContext;
             lpwfn->index = 1; /* Next index is 1 since we return index 0 */
             lpwfn->size = dwSize;
             lpwfn->lpafp = lpafp;
         }
-    } 
+    }
 
     TRACE("Matched %ld files\n", dwSize);
     return (HINTERNET)lpwfn;
@@ -2290,7 +2290,7 @@
     if (lpafp)
     {
         DWORD access = mktime(&lpafp->tmLastModified);
-		
+
         /* Not all fields are filled in */
         lpFindFileData->ftLastAccessTime.dwHighDateTime = HIWORD(access);
         lpFindFileData->ftLastAccessTime.dwLowDateTime  = LOWORD(access);
@@ -2372,7 +2372,7 @@
             LPFILEPROPERTIESA tmpafp;
 
             sizeFilePropArray *= 2;
-            tmpafp = HeapReAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, *lpafp, 
+            tmpafp = HeapReAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, *lpafp,
                 sizeof(FILEPROPERTIESA)*sizeFilePropArray);
             if (NULL == tmpafp)
             {
@@ -2474,7 +2474,7 @@
         {
             LPFILEPROPERTIESA tmpafp;
 
-            tmpafp = HeapReAlloc(GetProcessHeap(), 0, *lpafp, 
+            tmpafp = HeapReAlloc(GetProcessHeap(), 0, *lpafp,
                 sizeof(FILEPROPERTIESA)*indexFilePropArray);
             if (NULL == tmpafp)
                 *lpafp = tmpafp;
@@ -2488,7 +2488,7 @@
         bSuccess = FALSE;
     }
 
-lend:	
+lend:
     return bSuccess;
 }
 
@@ -2612,7 +2612,7 @@
             dwCode = ERROR_INTERNET_INTERNAL_ERROR;
 	    break;
     }
-    
+
     INTERNET_SetLastError(dwCode);
     return dwCode;
 }
diff --git a/dlls/wininet/http.c b/dlls/wininet/http.c
index 7bf3ff2..aba3951 100644
--- a/dlls/wininet/http.c
+++ b/dlls/wininet/http.c
@@ -1,4 +1,4 @@
-/* 
+/*
  * Wininet - Http Implementation
  *
  * Copyright 1999 Corel Corporation
@@ -66,9 +66,9 @@
 
 
 BOOL HTTP_OpenConnection(LPWININETHTTPREQA lpwhr);
-int HTTP_WriteDataToStream(LPWININETHTTPREQA lpwhr, 
+int HTTP_WriteDataToStream(LPWININETHTTPREQA lpwhr,
 	void *Buffer, int BytesToWrite);
-int HTTP_ReadDataFromStream(LPWININETHTTPREQA lpwhr, 
+int HTTP_ReadDataFromStream(LPWININETHTTPREQA lpwhr,
 	void *Buffer, int BytesToRead);
 BOOL HTTP_GetResponseHeaders(LPWININETHTTPREQA lpwhr);
 BOOL HTTP_ProcessHeader(LPWININETHTTPREQA lpwhr, LPCSTR field, LPCSTR value, DWORD dwModifier);
@@ -95,7 +95,7 @@
  *    FALSE on failure
  *
  */
-BOOL WINAPI HttpAddRequestHeadersA(HINTERNET hHttpRequest, 
+BOOL WINAPI HttpAddRequestHeadersA(HINTERNET hHttpRequest,
 	LPCSTR lpszHeader, DWORD dwHeaderLength, DWORD dwModifier)
 {
     LPSTR lpszStart;
@@ -154,7 +154,7 @@
  */
 HINTERNET WINAPI HttpOpenRequestA(HINTERNET hHttpSession,
 	LPCSTR lpszVerb, LPCSTR lpszObjectName, LPCSTR lpszVersion,
-	LPCSTR lpszReferrer , LPCSTR *lpszAcceptTypes, 
+	LPCSTR lpszReferrer , LPCSTR *lpszAcceptTypes,
 	DWORD dwFlags, DWORD dwContext)
 {
     LPWININETHTTPSESSIONA lpwhs = (LPWININETHTTPSESSIONA) hHttpSession;
@@ -188,7 +188,7 @@
     }
     else
     {
-	return HTTP_HttpOpenRequestA(hHttpSession, lpszVerb, lpszObjectName, 
+	return HTTP_HttpOpenRequestA(hHttpSession, lpszVerb, lpszObjectName,
 		lpszVersion, lpszReferrer, lpszAcceptTypes, dwFlags, dwContext);
     }
 }
@@ -206,7 +206,7 @@
  */
 HINTERNET WINAPI HTTP_HttpOpenRequestA(HINTERNET hHttpSession,
 	LPCSTR lpszVerb, LPCSTR lpszObjectName, LPCSTR lpszVersion,
-	LPCSTR lpszReferrer , LPCSTR *lpszAcceptTypes, 
+	LPCSTR lpszReferrer , LPCSTR *lpszAcceptTypes,
 	DWORD dwFlags, DWORD dwContext)
 {
     LPWININETHTTPSESSIONA lpwhs = (LPWININETHTTPSESSIONA) hHttpSession;
@@ -290,7 +290,7 @@
     if (hIC->hdr.dwFlags & INTERNET_FLAG_ASYNC && hIC->lpfnStatusCB)
     {
         INTERNET_ASYNC_RESULT iar;
-	       
+
         iar.dwResult = (DWORD)lpwhr;
         iar.dwError = lpwhr ? ERROR_SUCCESS : INTERNET_GetLastError();
         hIC->lpfnStatusCB(hHttpSession, dwContext, INTERNET_STATUS_REQUEST_COMPLETE,
@@ -314,10 +314,10 @@
 BOOL WINAPI HttpQueryInfoA(HINTERNET hHttpRequest, DWORD dwInfoLevel,
 	LPVOID lpBuffer, LPDWORD lpdwBufferLength, LPDWORD lpdwIndex)
 {
-    LPHTTPHEADERA lphttpHdr = NULL; 
+    LPHTTPHEADERA lphttpHdr = NULL;
     BOOL bSuccess = FALSE;
     LPWININETHTTPREQA lpwhr = (LPWININETHTTPREQA) hHttpRequest;
-		
+
     TRACE("(0x%08lx)--> %ld\n", dwInfoLevel, dwInfoLevel);
 
     if (NULL == lpwhr ||  lpwhr->hdr.htype != WH_HHTTPREQ)
@@ -352,7 +352,7 @@
                if ((~lpwhr->pCustHeaders[i].wFlags & HDR_ISREQUEST) && lpwhr->pCustHeaders[i].lpszField &&
 		   lpwhr->pCustHeaders[i].lpszValue)
 	       {
-                  size += strlen(lpwhr->pCustHeaders[i].lpszField) + 
+                  size += strlen(lpwhr->pCustHeaders[i].lpszField) +
                        strlen(lpwhr->pCustHeaders[i].lpszValue) + delim + 2;
 	       }
            }
@@ -360,10 +360,10 @@
            /* Calculate the length of stadard request headers */
            for (i = 0; i <= HTTP_QUERY_MAX; i++)
            {
-              if ((~lpwhr->StdHeaders[i].wFlags & HDR_ISREQUEST) && lpwhr->StdHeaders[i].lpszField && 
+              if ((~lpwhr->StdHeaders[i].wFlags & HDR_ISREQUEST) && lpwhr->StdHeaders[i].lpszField &&
                    lpwhr->StdHeaders[i].lpszValue)
               {
-                 size += strlen(lpwhr->StdHeaders[i].lpszField) + 
+                 size += strlen(lpwhr->StdHeaders[i].lpszField) +
                     strlen(lpwhr->StdHeaders[i].lpszValue) + delim + 2;
               }
            }
@@ -396,7 +396,7 @@
 						lpwhr->pCustHeaders[i].lpszField &&
 						lpwhr->pCustHeaders[i].lpszValue)
                 {
-                   cnt += sprintf(lpBuffer + cnt, "%s: %s%s", 
+                   cnt += sprintf(lpBuffer + cnt, "%s: %s%s",
                     lpwhr->pCustHeaders[i].lpszField, lpwhr->pCustHeaders[i].lpszValue,
 					index == HTTP_QUERY_RAW_HEADERS_CRLF ? "\r\n" : "\0");
                 }
@@ -409,7 +409,7 @@
 	        goto lend;
         }
 	else if (index >= 0 && index <= HTTP_QUERY_MAX && lpwhr->StdHeaders[index].lpszValue)
-	{ 
+	{
 	    lphttpHdr = &lpwhr->StdHeaders[index];
 	}
 	else
@@ -417,10 +417,10 @@
     }
 
     /* Ensure header satisifies requested attributes */
-    if ((dwInfoLevel & HTTP_QUERY_FLAG_REQUEST_HEADERS) && 
+    if ((dwInfoLevel & HTTP_QUERY_FLAG_REQUEST_HEADERS) &&
 	    (~lphttpHdr->wFlags & HDR_ISREQUEST))
 	goto lend;
-     
+
     /* coalesce value to reuqested type */
     if (dwInfoLevel & HTTP_QUERY_FLAG_NUMBER)
     {
@@ -432,7 +432,7 @@
         time_t tmpTime;
         struct tm tmpTM;
         SYSTEMTIME *STHook;
-	     
+
         tmpTime = ConvertTimeString(lphttpHdr->lpszValue);
 
         tmpTM = *gmtime(&tmpTime);
@@ -476,7 +476,7 @@
 
         strncpy(lpBuffer, lphttpHdr->lpszValue, len);
         *lpdwBufferLength = len;
-        bSuccess = TRUE; 
+        bSuccess = TRUE;
     }
 
 lend:
@@ -513,7 +513,7 @@
  */
 BOOL WINAPI HttpSendRequestA(HINTERNET hHttpRequest, LPCSTR lpszHeaders,
 	DWORD dwHeaderLength, LPVOID lpOptional ,DWORD dwOptionalLength)
-{	
+{
     LPWININETHTTPREQA lpwhr = (LPWININETHTTPREQA) hHttpRequest;
     LPWININETHTTPSESSIONA lpwhs = NULL;
     LPWININETAPPINFOA hIC = NULL;
@@ -555,7 +555,7 @@
     }
     else
     {
-	return HTTP_HttpSendRequestA(hHttpRequest, lpszHeaders, 
+	return HTTP_HttpSendRequestA(hHttpRequest, lpszHeaders,
 		dwHeaderLength, lpOptional, dwOptionalLength);
     }
 }
@@ -630,7 +630,7 @@
     }
 
     /* Calculate length of request string */
-    requestStringLen = 
+    requestStringLen =
         strlen(lpwhr->lpszVerb) +
         strlen(lpwhr->lpszPath) +
         (lpwhr->lpszHostName ? (strlen(HTTPHOSTHEADER) + strlen(lpwhr->lpszHostName)) : 0) +
@@ -640,7 +640,7 @@
     /* Add length of passed headers */
     if (lpszHeaders)
     {
-        headerLength = -1 == dwHeaderLength ?  strlen(lpszHeaders) : dwHeaderLength; 
+        headerLength = -1 == dwHeaderLength ?  strlen(lpszHeaders) : dwHeaderLength;
         requestStringLen += headerLength +  2; /* \r\n */
     }
 
@@ -649,7 +649,7 @@
     {
 	    if (lpwhr->pCustHeaders[i].wFlags & HDR_ISREQUEST)
 	    {
-            requestStringLen += strlen(lpwhr->pCustHeaders[i].lpszField) + 
+            requestStringLen += strlen(lpwhr->pCustHeaders[i].lpszField) +
                 strlen(lpwhr->pCustHeaders[i].lpszValue) + 4; /*: \r\n */
 	    }
     }
@@ -659,7 +659,7 @@
     {
        if (lpwhr->StdHeaders[i].wFlags & HDR_ISREQUEST)
        {
-          requestStringLen += strlen(lpwhr->StdHeaders[i].lpszField) + 
+          requestStringLen += strlen(lpwhr->StdHeaders[i].lpszField) +
              strlen(lpwhr->StdHeaders[i].lpszValue) + 4; /*: \r\n */
        }
     }
@@ -684,7 +684,7 @@
     {
        if (lpwhr->StdHeaders[i].wFlags & HDR_ISREQUEST)
        {
-           cnt += sprintf(requestString + cnt, "\r\n%s: %s", 
+           cnt += sprintf(requestString + cnt, "\r\n%s: %s",
                lpwhr->StdHeaders[i].lpszField, lpwhr->StdHeaders[i].lpszValue);
        }
     }
@@ -694,7 +694,7 @@
     {
        if (lpwhr->pCustHeaders[i].wFlags & HDR_ISREQUEST)
        {
-           cnt += sprintf(requestString + cnt, "\r\n%s: %s", 
+           cnt += sprintf(requestString + cnt, "\r\n%s: %s",
                lpwhr->pCustHeaders[i].lpszField, lpwhr->pCustHeaders[i].lpszValue);
        }
     }
@@ -735,7 +735,7 @@
     if (hIC->hdr.dwFlags & INTERNET_FLAG_ASYNC  && hIC->lpfnStatusCB)
     {
         INTERNET_ASYNC_RESULT iar;
-	       
+
         iar.dwResult = (DWORD)bSuccess;
         iar.dwError = bSuccess ? ERROR_SUCCESS : INTERNET_GetLastError();
         hIC->lpfnStatusCB(hHttpRequest, lpwhr->hdr.dwContext, INTERNET_STATUS_REQUEST_COMPLETE,
@@ -757,7 +757,7 @@
  *   NULL on failure
  *
  */
-HINTERNET HTTP_Connect(HINTERNET hInternet, LPCSTR lpszServerName, 
+HINTERNET HTTP_Connect(HINTERNET hInternet, LPCSTR lpszServerName,
 	INTERNET_PORT nServerPort, LPCSTR lpszUserName,
 	LPCSTR lpszPassword, DWORD dwFlags, DWORD dwContext)
 {
@@ -829,7 +829,7 @@
     if (hIC->hdr.dwFlags & INTERNET_FLAG_ASYNC && hIC->lpfnStatusCB)
     {
         INTERNET_ASYNC_RESULT iar;
-	       
+
         iar.dwResult = (DWORD)lpwhs;
         iar.dwError = bSuccess ? ERROR_SUCCESS : INTERNET_GetLastError();
         hIC->lpfnStatusCB(hInternet, dwContext, INTERNET_STATUS_REQUEST_COMPLETE,
@@ -913,7 +913,7 @@
     if (lpwhr->nSocketFD == -1)
         goto lend;
 
-    /* 
+    /*
      * We should first receive 'HTTP/1.x nnn' where nnn is the status code.
      */
     if (!INTERNET_GetNextLine(lpwhr->nSocketFD, buffer, &buflen))
@@ -921,7 +921,7 @@
 
     if (strncmp(buffer, "HTTP", 4) != 0)
         goto lend;
-	
+
     buffer[12]='\0';
     HTTP_ProcessHeader(lpwhr, "Status", buffer+9, (HTTP_ADDREQ_FLAG_ADD | HTTP_ADDREQ_FLAG_REPLACE));
 
@@ -971,7 +971,7 @@
 
     while (*lpszSrc == ' ' && *lpszSrc != '\0')
 	lpszSrc++;
-	
+
     lpsztmp = lpszSrc;
     while(*lpsztmp != '\0')
     {
@@ -1126,12 +1126,12 @@
 	    return index >= 0;
 	}
     }
- 
+
     if (dwModifier & HTTP_ADDHDR_FLAG_REQ)
 	lphttpHdr->wFlags |= HDR_ISREQUEST;
     else
         lphttpHdr->wFlags &= ~HDR_ISREQUEST;
-  
+
     if (!lphttpHdr->lpszValue && (dwModifier & (HTTP_ADDHDR_FLAG_ADD|HTTP_ADDHDR_FLAG_ADD_IF_NEW)))
     {
         INT slen;
@@ -1156,9 +1156,9 @@
             INTERNET_SetLastError(ERROR_OUTOFMEMORY);
         }
     }
-    else if (lphttpHdr->lpszValue) 
+    else if (lphttpHdr->lpszValue)
     {
-        if (dwModifier & HTTP_ADDHDR_FLAG_REPLACE) 
+        if (dwModifier & HTTP_ADDHDR_FLAG_REPLACE)
         {
             LPSTR lpsztmp;
             INT len;
@@ -1211,7 +1211,7 @@
             lpsztmp = HeapReAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY,  lphttpHdr->lpszValue, len+1);
             if (lpsztmp)
             {
-		/* FIXME: Increment lphttpHdr->wCount. Perhaps lpszValue should be an array */ 
+		/* FIXME: Increment lphttpHdr->wCount. Perhaps lpszValue should be an array */
                 if (ch > 0)
                 {
                     lphttpHdr->lpszValue[origlen] = ch;
diff --git a/dlls/wininet/internet.c b/dlls/wininet/internet.c
index 3646349..5f8f1c8 100644
--- a/dlls/wininet/internet.c
+++ b/dlls/wininet/internet.c
@@ -111,7 +111,7 @@
         case DLL_THREAD_ATTACH:
 	    {
                 LPWITHREADERROR lpwite = HeapAlloc(GetProcessHeap(), 0, sizeof(WITHREADERROR));
-		if (NULL == lpwite) 
+		if (NULL == lpwite)
                     return FALSE;
 
                 TlsSetValue(g_dwTlsErrIndex, (LPVOID)lpwite);
@@ -157,7 +157,7 @@
  *    NULL on failure
  *
  */
-HINTERNET WINAPI InternetOpenA(LPCSTR lpszAgent, 
+HINTERNET WINAPI InternetOpenA(LPCSTR lpszAgent,
 	DWORD dwAccessType, LPCSTR lpszProxy,
     	LPCSTR lpszProxyBypass, DWORD dwFlags)
 {
@@ -236,7 +236,7 @@
  *
  * RETURNS
  *    TRUE if connected
- *    if lpdwStatus is not null, return the status (off line, 
+ *    if lpdwStatus is not null, return the status (off line,
  *    modem, lan...) in it.
  *    FALSE if not connected
  */
@@ -388,7 +388,7 @@
 
     hIC = GET_HWININET_FROM_LPWININETFINDNEXT(lpwh);
     if (hIC->hdr.dwFlags & INTERNET_FLAG_ASYNC && hIC->lpfnStatusCB)
-    {	
+    {
         INTERNET_ASYNC_RESULT iar;
 
         iar.dwResult = (DWORD)bSuccess;
@@ -453,7 +453,7 @@
         case WH_HINIT:
             INTERNET_CloseHandle((LPWININETAPPINFOA) lpwh);
 	    retval = TRUE;
-            break; 
+            break;
 
         case WH_HHTTPSESSION:
 	    HTTP_CloseHTTPSessionHandle((LPWININETHTTPSESSIONA) lpwh);
@@ -472,7 +472,7 @@
         case WH_HFINDNEXT:
             retval = FTP_CloseFindNextHandle((LPWININETFINDNEXTA) lpwh);
             break;
-		
+
         default:
             break;
     }
@@ -527,7 +527,7 @@
  *    FALSE on failure
  *
  */
-BOOL WINAPI InternetCrackUrlA(LPCSTR lpszUrl, DWORD dwUrlLength, DWORD dwFlags, 
+BOOL WINAPI InternetCrackUrlA(LPCSTR lpszUrl, DWORD dwUrlLength, DWORD dwFlags,
 		LPURL_COMPONENTSA lpUrlComponents)
 {
   /*
@@ -567,7 +567,7 @@
     lpszParam = strpbrk(lpszap, ";?");
     if (lpszParam != NULL)
     {
-        if (!SetUrlComponentValue(&lpUrlComponents->lpszExtraInfo, 
+        if (!SetUrlComponentValue(&lpUrlComponents->lpszExtraInfo,
 	     &lpUrlComponents->dwExtraInfoLength, lpszParam+1, strlen(lpszParam+1)))
         {
 	    return FALSE;
@@ -580,7 +580,7 @@
 
         /* Get scheme first. */
         lpUrlComponents->nScheme = GetInternetScheme(lpszUrl, lpszcp - lpszUrl);
-        if (!SetUrlComponentValue(&lpUrlComponents->lpszScheme, 
+        if (!SetUrlComponentValue(&lpUrlComponents->lpszScheme,
 		    &lpUrlComponents->dwSchemeLength, lpszUrl, lpszcp - lpszUrl))
 	    return FALSE;
 
@@ -618,14 +618,14 @@
 
                 /* [<user>[<:password>]@]<host>[:<port>] */
             /* First find the user and password if they exist */
-			
+
             lpszHost = strchr(lpszcp, '@');
             if (lpszHost == NULL || lpszHost > lpszNetLoc)
                 {
                 /* username and password not specified. */
-		SetUrlComponentValue(&lpUrlComponents->lpszUserName, 
+		SetUrlComponentValue(&lpUrlComponents->lpszUserName,
 			&lpUrlComponents->dwUserNameLength, NULL, 0);
-		SetUrlComponentValue(&lpUrlComponents->lpszPassword, 
+		SetUrlComponentValue(&lpUrlComponents->lpszPassword,
 			&lpUrlComponents->dwPasswordLength, NULL, 0);
                 }
             else /* Parse out username and password */
@@ -639,16 +639,16 @@
 		       lpszPasswd = lpszcp;
 
 		   lpszcp++;
-                    }        
-		    
-		SetUrlComponentValue(&lpUrlComponents->lpszUserName, 
+                    }
+
+		SetUrlComponentValue(&lpUrlComponents->lpszUserName,
 			&lpUrlComponents->dwUserNameLength, lpszUser, lpszPasswd - lpszUser);
 
                 if (lpszPasswd != lpszHost)
                     lpszPasswd++;
-		SetUrlComponentValue(&lpUrlComponents->lpszPassword, 
-			&lpUrlComponents->dwPasswordLength, 
-			lpszPasswd == lpszHost ? NULL : lpszPasswd, 
+		SetUrlComponentValue(&lpUrlComponents->lpszPassword,
+			&lpUrlComponents->dwPasswordLength,
+			lpszPasswd == lpszHost ? NULL : lpszPasswd,
 			lpszHost - lpszPasswd);
 
 		lpszcp++; /* Advance to beginning of host */
@@ -667,7 +667,7 @@
 		lpszcp++;
                 }
 
-            SetUrlComponentValue(&lpUrlComponents->lpszHostName, 
+            SetUrlComponentValue(&lpUrlComponents->lpszHostName,
                &lpUrlComponents->dwHostNameLength, lpszHost, lpszPort - lpszHost);
 
 	    if (lpszPort != lpszNetLoc)
@@ -701,7 +701,7 @@
                 len = strlen(lpszcp);
         }
 
-        if (!SetUrlComponentValue(&lpUrlComponents->lpszUrlPath, 
+        if (!SetUrlComponentValue(&lpUrlComponents->lpszUrlPath,
          &lpUrlComponents->dwUrlPathLength, lpszcp, len))
          return FALSE;
     }
@@ -721,7 +721,7 @@
  *           GetUrlCacheEntryInfoA (WININET.@)
  *
  */
-BOOL WINAPI GetUrlCacheEntryInfoA(LPCSTR lpszUrl, 
+BOOL WINAPI GetUrlCacheEntryInfoA(LPCSTR lpszUrl,
   LPINTERNET_CACHE_ENTRY_INFOA lpCacheEntry,
   LPDWORD lpCacheEntrySize)
 {
@@ -790,7 +790,7 @@
  *           InternetSetStatusCallback (WININET.@)
  *
  * Sets up a callback function which is called as progress is made
- * during an operation. 
+ * during an operation.
  *
  * RETURNS
  *    Previous callback or NULL 	on success
@@ -805,7 +805,7 @@
 
     TRACE("0x%08lx\n", (ULONG)hInternet);
     if (lpwai->hdr.htype != WH_HINIT)
-        return INTERNET_INVALID_STATUS_CALLBACK; 
+        return INTERNET_INVALID_STATUS_CALLBACK;
 
     retVal = lpwai->lpfnStatusCB;
     lpwai->lpfnStatusCB = lpfnIntCB;
@@ -817,7 +817,7 @@
 /***********************************************************************
  *           InternetWriteFile (WININET.@)
  *
- * Write data to an open internet file 
+ * Write data to an open internet file
  *
  * RETURNS
  *    TRUE  on success
@@ -838,7 +838,7 @@
     switch (lpwh->htype)
     {
         case WH_HHTTPREQ:
-            nSocket = ((LPWININETHTTPREQA)hFile)->nSocketFD; 
+            nSocket = ((LPWININETHTTPREQA)hFile)->nSocketFD;
             break;
 
         case WH_HFILE:
@@ -865,14 +865,14 @@
 /***********************************************************************
  *           InternetReadFile (WININET.@)
  *
- * Read data from an open internet file 
+ * Read data from an open internet file
  *
  * RETURNS
  *    TRUE  on success
  *    FALSE on failure
  *
  */
-BOOL WINAPI InternetReadFile(HINTERNET hFile, LPVOID lpBuffer, 
+BOOL WINAPI InternetReadFile(HINTERNET hFile, LPVOID lpBuffer,
 	DWORD dwNumOfBytesToRead, LPDWORD dwNumOfBytesRead)
 {
     BOOL retval = FALSE;
@@ -886,7 +886,7 @@
     switch (lpwh->htype)
     {
         case WH_HHTTPREQ:
-            nSocket = ((LPWININETHTTPREQA)hFile)->nSocketFD; 
+            nSocket = ((LPWININETHTTPREQA)hFile)->nSocketFD;
             break;
 
         case WH_HFILE:
@@ -920,7 +920,7 @@
  *    FALSE on failure
  *
  */
-BOOL WINAPI InternetQueryOptionA(HINTERNET hInternet, DWORD dwOption, 
+BOOL WINAPI InternetQueryOptionA(HINTERNET hInternet, DWORD dwOption,
 	LPVOID lpBuffer, LPDWORD lpdwBufferLength)
 {
     LPWININETHANDLEHEADER lpwhh;
@@ -1032,7 +1032,7 @@
  *    FALSE on failure
  *
  */
-BOOL WINAPI InternetGetCookieA(LPCSTR lpszUrl, LPCSTR lpszCookieName, 
+BOOL WINAPI InternetGetCookieA(LPCSTR lpszUrl, LPCSTR lpszCookieName,
 		LPSTR lpCookieData, LPDWORD lpdwSize)
 {
     FIXME("(%s,%s,%p), stub!\n",debugstr_a(lpszUrl),debugstr_a(lpszCookieName),
@@ -1097,7 +1097,7 @@
  *
  * RETURNS
  *
- *  TRUE on success and FALSE on failure. if a failures then 
+ *  TRUE on success and FALSE on failure. if a failures then
  *   ERROR_NOT_CONNECTED is places into GetLastError
  *
  */
@@ -1114,14 +1114,14 @@
   char host[1024];
   int status = -1;
 
-  /* 
+  /*
    * Crack or set the Address
    */
   if (lpszUrl == NULL)
   {
-     /* 
+     /*
       * According to the doc we are supost to use the ip for the next
-      * server in the WnInet internal server database. I have 
+      * server in the WnInet internal server database. I have
       * no idea what that is or how to get it.
       *
       * So someone needs to implement this.
@@ -1136,10 +1136,10 @@
      ZeroMemory(&componets,sizeof(URL_COMPONENTSA));
      componets.lpszHostName = (LPSTR)&host;
      componets.dwHostNameLength = 1024;
-     
+
      if (!InternetCrackUrlA(lpszUrl,0,0,&componets))
        goto End;
- 
+
      TRACE("host name : %s\n",componets.lpszHostName);
   }
 
@@ -1155,13 +1155,13 @@
   status = system(command);
 
   TRACE("Ping returned a code of %i \n",status);
- 
-  /* Ping return code of 0 indicates success */ 
+
+  /* Ping return code of 0 indicates success */
   if (status == 0)
      rc = TRUE;
 
 End:
- 
+
   if (rc == FALSE)
     SetLastError(ERROR_NOT_CONNECTED);
 
@@ -1172,7 +1172,7 @@
  *	InternetOpenUrlA (WININET.@)
  *
  * Opens an URL
- * 
+ *
  * RETURNS
  *   handle of connection or NULL on failure
  */
@@ -1441,8 +1441,8 @@
     {
         InterlockedIncrement(&dwNumIdleThreads);
 
-	if (InterlockedIncrement(&dwNumThreads) > MAX_WORKER_THREADS || 
-	    !(hThread = CreateThread(NULL, 0, 
+	if (InterlockedIncrement(&dwNumThreads) > MAX_WORKER_THREADS ||
+	    !(hThread = CreateThread(NULL, 0,
             (LPTHREAD_START_ROUTINE)INTERNET_WorkerThreadFunc, NULL, 0, &dwTID)))
 	{
             InterlockedDecrement(&dwNumThreads);
@@ -1487,27 +1487,27 @@
 		break;
 
             case FTPSETCURRENTDIRECTORYA:
-		FTP_FtpSetCurrentDirectoryA((HINTERNET)workRequest.HFTPSESSION, 
+		FTP_FtpSetCurrentDirectoryA((HINTERNET)workRequest.HFTPSESSION,
 			(LPCSTR)workRequest.LPSZDIRECTORY);
 		HeapFree(GetProcessHeap(), 0, (LPVOID)workRequest.LPSZDIRECTORY);
 		break;
 
             case FTPCREATEDIRECTORYA:
-		FTP_FtpCreateDirectoryA((HINTERNET)workRequest.HFTPSESSION, 
+		FTP_FtpCreateDirectoryA((HINTERNET)workRequest.HFTPSESSION,
 			(LPCSTR)workRequest.LPSZDIRECTORY);
 		HeapFree(GetProcessHeap(), 0, (LPVOID)workRequest.LPSZDIRECTORY);
 		break;
 
             case FTPFINDFIRSTFILEA:
-                FTP_FtpFindFirstFileA((HINTERNET)workRequest.HFTPSESSION, 
-			(LPCSTR)workRequest.LPSZSEARCHFILE, 
-	           (LPWIN32_FIND_DATAA)workRequest.LPFINDFILEDATA, workRequest.DWFLAGS, 
+                FTP_FtpFindFirstFileA((HINTERNET)workRequest.HFTPSESSION,
+			(LPCSTR)workRequest.LPSZSEARCHFILE,
+	           (LPWIN32_FIND_DATAA)workRequest.LPFINDFILEDATA, workRequest.DWFLAGS,
 		   workRequest.DWCONTEXT);
 		HeapFree(GetProcessHeap(), 0, (LPVOID)workRequest.LPSZSEARCHFILE);
 		break;
 
             case FTPGETCURRENTDIRECTORYA:
-                FTP_FtpGetCurrentDirectoryA((HINTERNET)workRequest.HFTPSESSION, 
+                FTP_FtpGetCurrentDirectoryA((HINTERNET)workRequest.HFTPSESSION,
 			(LPSTR)workRequest.LPSZDIRECTORY, (LPDWORD)workRequest.LPDWDIRECTORY);
 		break;
 
@@ -1558,21 +1558,21 @@
 		break;
 
             case HTTPSENDREQUESTA:
-               HTTP_HttpSendRequestA((HINTERNET)workRequest.HFTPSESSION, 
+               HTTP_HttpSendRequestA((HINTERNET)workRequest.HFTPSESSION,
                        (LPCSTR)workRequest.LPSZHEADER,
-                       workRequest.DWHEADERLENGTH,     
-                       (LPVOID)workRequest.LPOPTIONAL, 
+                       workRequest.DWHEADERLENGTH,
+                       (LPVOID)workRequest.LPOPTIONAL,
                        workRequest.DWOPTIONALLENGTH);
                HeapFree(GetProcessHeap(), 0, (LPVOID)workRequest.LPSZHEADER);
                break;
 
             case HTTPOPENREQUESTA:
-               HTTP_HttpOpenRequestA((HINTERNET)workRequest.HFTPSESSION, 
+               HTTP_HttpOpenRequestA((HINTERNET)workRequest.HFTPSESSION,
                        (LPCSTR)workRequest.LPSZVERB,
-                       (LPCSTR)workRequest.LPSZOBJECTNAME,     
-                       (LPCSTR)workRequest.LPSZVERSION, 
-                       (LPCSTR)workRequest.LPSZREFERRER, 
-                       (LPCSTR*)workRequest.LPSZACCEPTTYPES, 
+                       (LPCSTR)workRequest.LPSZOBJECTNAME,
+                       (LPCSTR)workRequest.LPSZVERSION,
+                       (LPCSTR)workRequest.LPSZREFERRER,
+                       (LPCSTR*)workRequest.LPSZACCEPTTYPES,
                        workRequest.DWFLAGS,
                        workRequest.DWCONTEXT);
                HeapFree(GetProcessHeap(), 0, (LPVOID)workRequest.LPSZVERB);
diff --git a/dlls/wininet/internet.h b/dlls/wininet/internet.h
index d45d8bb..6ecf1bd 100644
--- a/dlls/wininet/internet.h
+++ b/dlls/wininet/internet.h
@@ -209,11 +209,11 @@
 
 time_t ConvertTimeString(LPCSTR asctime);
 
-HINTERNET FTP_Connect(HINTERNET hInterent, LPCSTR lpszServerName, 
+HINTERNET FTP_Connect(HINTERNET hInterent, LPCSTR lpszServerName,
 	INTERNET_PORT nServerPort, LPCSTR lpszUserName,
 	LPCSTR lpszPassword, DWORD dwFlags, DWORD dwContext);
 
-HINTERNET HTTP_Connect(HINTERNET hInterent, LPCSTR lpszServerName, 
+HINTERNET HTTP_Connect(HINTERNET hInterent, LPCSTR lpszServerName,
 	INTERNET_PORT nServerPort, LPCSTR lpszUserName,
 	LPCSTR lpszPassword, DWORD dwFlags, DWORD dwContext);
 
@@ -236,13 +236,13 @@
 BOOLAPI FTP_FtpCreateDirectoryA(HINTERNET hConnect, LPCSTR lpszDirectory);
 INTERNETAPI HINTERNET WINAPI FTP_FtpFindFirstFileA(HINTERNET hConnect,
     LPCSTR lpszSearchFile, LPWIN32_FIND_DATAA lpFindFileData, DWORD dwFlags, DWORD dwContext);
-BOOLAPI FTP_FtpGetCurrentDirectoryA(HINTERNET hFtpSession, LPSTR lpszCurrentDirectory, 
+BOOLAPI FTP_FtpGetCurrentDirectoryA(HINTERNET hFtpSession, LPSTR lpszCurrentDirectory,
 	LPDWORD lpdwCurrentDirectory);
 BOOL FTP_ConvertFileProp(LPFILEPROPERTIESA lpafp, LPWIN32_FIND_DATAA lpFindFileData);
 BOOL FTP_FtpRenameFileA(HINTERNET hFtpSession, LPCSTR lpszSrc, LPCSTR lpszDest);
 BOOL FTP_FtpRemoveDirectoryA(HINTERNET hFtpSession, LPCSTR lpszDirectory);
 BOOL FTP_FtpDeleteFileA(HINTERNET hFtpSession, LPCSTR lpszFileName);
-HINTERNET FTP_FtpOpenFileA(HINTERNET hFtpSession, LPCSTR lpszFileName, 
+HINTERNET FTP_FtpOpenFileA(HINTERNET hFtpSession, LPCSTR lpszFileName,
 	DWORD fdwAccess, DWORD dwFlags, DWORD dwContext);
 BOOLAPI FTP_FtpGetFileA(HINTERNET hInternet, LPCSTR lpszRemoteFile, LPCSTR lpszNewFile,
 	BOOL fFailIfExists, DWORD dwLocalFlagsAttribute, DWORD dwInternetFlags,
@@ -252,7 +252,7 @@
 	DWORD dwHeaderLength, LPVOID lpOptional ,DWORD dwOptionalLength);
 INTERNETAPI HINTERNET WINAPI HTTP_HttpOpenRequestA(HINTERNET hHttpSession,
 	LPCSTR lpszVerb, LPCSTR lpszObjectName, LPCSTR lpszVersion,
-	LPCSTR lpszReferrer , LPCSTR *lpszAcceptTypes, 
+	LPCSTR lpszReferrer , LPCSTR *lpszAcceptTypes,
 	DWORD dwFlags, DWORD dwContext);
 void HTTP_CloseHTTPSessionHandle(LPWININETHTTPSESSIONA lpwhs);
 void HTTP_CloseHTTPRequestHandle(LPWININETHTTPREQA lpwhr);
diff --git a/dlls/wininet/utility.c b/dlls/wininet/utility.c
index 0308104..1cff560 100644
--- a/dlls/wininet/utility.c
+++ b/dlls/wininet/utility.c
@@ -1,4 +1,4 @@
-/* 
+/*
  * Wininet - Utility functions
  *
  * Copyright 1999 Corel Corporation
@@ -52,11 +52,11 @@
 
     /* Assert that the string is the expected length */
     if (tmpChar[TIME_STRING_LEN] != '\0')
-    { 
+    {
         tmpChar[TIME_STRING_LEN] = '\0';
         FIXME("\n");
     }
-    
+
     /* Convert a time such as 'Mon, 15 Nov 1999 16:09:35 GMT' into a SYSTEMTIME structure
      * We assume the time is in this format
      * and divide it into easy to swallow chunks
@@ -74,7 +74,7 @@
     t.tm_hour = atoi(tmpChar+17);
     t.tm_min = atoi(tmpChar+20);
     t.tm_sec = atoi(tmpChar+23);
-	
+
     /* and month */
     tmpChar2 = tmpChar + 8;
     switch(tmpChar2[2])
diff --git a/dlls/wininet/wininet_main.c b/dlls/wininet/wininet_main.c
index 2873a63..4a46427 100644
--- a/dlls/wininet/wininet_main.c
+++ b/dlls/wininet/wininet_main.c
@@ -30,7 +30,7 @@
  */
 HRESULT WINAPI WININET_DllInstall(BOOL bInstall, LPCWSTR cmdline)
 {
-  FIXME("(%s, %s): stub\n", bInstall?"TRUE":"FALSE", 
+  FIXME("(%s, %s): stub\n", bInstall?"TRUE":"FALSE",
 	debugstr_w(cmdline));
 
   return S_OK;
diff --git a/dlls/winmm/driver.c b/dlls/winmm/driver.c
index ca3b03d..fd54e41 100644
--- a/dlls/winmm/driver.c
+++ b/dlls/winmm/driver.c
@@ -45,9 +45,9 @@
     unsigned		count = 0;
 
     if (found) *found = NULL;
-    for (lpDrv = lpDrvItemList; lpDrv; lpDrv = lpDrv->lpNextItem) 
+    for (lpDrv = lpDrvItemList; lpDrv; lpDrv = lpDrv->lpNextItem)
     {
-	if (!(lpDrv->dwFlags & WINE_GDF_16BIT) && lpDrv->d.d32.hModule == hModule) 
+	if (!(lpDrv->dwFlags & WINE_GDF_16BIT) && lpDrv->d.d32.hModule == hModule)
         {
             if (found && !*found) *found = lpDrv;
 	    count++;
@@ -58,11 +58,11 @@
 
 /**************************************************************************
  *				DRIVER_FindFromHDrvr		[internal]
- * 
+ *
  * From a hDrvr being 32 bits, returns the WINE internal structure.
  */
 LPWINE_DRIVER	DRIVER_FindFromHDrvr(HDRVR hDrvr)
-{    
+{
     LPWINE_DRIVER	d = (LPWINE_DRIVER)hDrvr;
 
     if (hDrvr && HeapValidate(GetProcessHeap(), 0, d) && d->dwMagic == WINE_DI_MAGIC) {
@@ -83,7 +83,7 @@
 static int DRIVER_MapMsg32To16(WORD wMsg, DWORD* lParam1, DWORD* lParam2)
 {
     int	ret = -1;
-    
+
     switch (wMsg) {
     case DRV_LOAD:
     case DRV_ENABLE:
@@ -92,7 +92,7 @@
     case DRV_QUERYCONFIGURE:
     case DRV_REMOVE:
     case DRV_EXITSESSION:
-    case DRV_EXITAPPLICATION:	
+    case DRV_EXITAPPLICATION:
     case DRV_POWER:
     case DRV_CLOSE:	/* should be 0/0 */
     case DRV_OPEN:	/* pass through */
@@ -102,18 +102,18 @@
 	break;
     case DRV_CONFIGURE:
     case DRV_INSTALL:
-	/* lParam1 is a handle to a window (conf) or to a driver (inst) or not used, 
-	 * lParam2 is a pointer to DRVCONFIGINFO 
+	/* lParam1 is a handle to a window (conf) or to a driver (inst) or not used,
+	 * lParam2 is a pointer to DRVCONFIGINFO
 	 */
 	if (*lParam2) {
             LPDRVCONFIGINFO16 dci16 = HeapAlloc( GetProcessHeap(), 0, sizeof(*dci16) );
             LPDRVCONFIGINFO	dci32 = (LPDRVCONFIGINFO)(*lParam2);
-	    
+
 	    if (dci16) {
 		LPSTR str1;
-		
+
 		dci16->dwDCISize = sizeof(DRVCONFIGINFO16);
-		
+
 		if ((str1 = HEAP_strdupWtoA(GetProcessHeap(), 0, dci32->lpszDCISectionName)) != NULL)
                 {
 		    dci16->lpszDCISectionName = MapLS( str1 );
@@ -155,7 +155,7 @@
 static int DRIVER_UnMapMsg32To16(WORD wMsg, DWORD lParam1, DWORD lParam2)
 {
     int	ret = -1;
-    
+
     switch (wMsg) {
     case DRV_LOAD:
     case DRV_ENABLE:
@@ -170,7 +170,7 @@
     case DRV_CLOSE:
 	/* lParam1 and lParam2 are not used */
 	break;
-    case DRV_CONFIGURE: 
+    case DRV_CONFIGURE:
     case DRV_INSTALL:
 	/* lParam1 is a handle to a window (or not used), lParam2 is a pointer to DRVCONFIGINFO, lParam2 */
 	if (lParam2) {
@@ -196,13 +196,13 @@
 /**************************************************************************
  *				DRIVER_SendMessage		[internal]
  */
-static LRESULT inline DRIVER_SendMessage(LPWINE_DRIVER lpDrv, UINT msg, 
+static LRESULT inline DRIVER_SendMessage(LPWINE_DRIVER lpDrv, UINT msg,
 					LPARAM lParam1, LPARAM lParam2)
 {
     if (lpDrv->dwFlags & WINE_GDF_16BIT) {
 	LRESULT		ret;
 	int		map = 0;
-	TRACE("Before sdm16 call hDrv=%04x wMsg=%04x p1=%08lx p2=%08lx\n", 
+	TRACE("Before sdm16 call hDrv=%04x wMsg=%04x p1=%08lx p2=%08lx\n",
 	      lpDrv->d.d16.hDriver16, msg, lParam1, lParam2);
 
 	if ((map = DRIVER_MapMsg32To16(msg, &lParam1, &lParam2)) >= 0) {
@@ -214,7 +214,7 @@
 	}
 	return ret;
     }
-    TRACE("Before func32 call proc=%p driverID=%08lx hDrv=%08x wMsg=%04x p1=%08lx p2=%08lx\n", 
+    TRACE("Before func32 call proc=%p driverID=%08lx hDrv=%08x wMsg=%04x p1=%08lx p2=%08lx\n",
 	  lpDrv->d.d32.lpDrvProc, lpDrv->d.d32.dwDriverID, (HDRVR)lpDrv, msg, lParam1, lParam2);
     return lpDrv->d.d32.lpDrvProc(lpDrv->d.d32.dwDriverID, (HDRVR)lpDrv, msg, lParam1, lParam2);
 }
@@ -228,16 +228,16 @@
 {
     LPWINE_DRIVER	lpDrv;
     LRESULT 		retval = 0;
-    
+
     TRACE("(%04x, %04X, %08lX, %08lX)\n", hDriver, msg, lParam1, lParam2);
-    
+
     if ((lpDrv = DRIVER_FindFromHDrvr(hDriver)) != NULL) {
 	retval = DRIVER_SendMessage(lpDrv, msg, lParam1, lParam2);
     } else {
 	WARN("Bad driver handle %u\n", hDriver);
     }
     TRACE("retval = %ld\n", retval);
-    
+
     return retval;
 }
 
@@ -256,7 +256,7 @@
 	    DRIVER_SendMessage(lpDrv, DRV_FREE,    0L, 0L);
 	}
     }
-    
+
     if (lpDrv->lpPrevItem)
 	lpDrv->lpPrevItem->lpNextItem = lpDrv->lpNextItem;
     else
@@ -299,7 +299,7 @@
 	LPWINE_DRIVER	lpDrv = lpDrvItemList;	/* find end of list */
 	while (lpDrv->lpNextItem != NULL)
 	    lpDrv = lpDrv->lpNextItem;
-	
+
 	lpDrv->lpNextItem = lpNewDrv;
 	lpNewDrv->lpPrevItem = lpDrv;
     }
@@ -340,7 +340,7 @@
     LPCSTR		cause = 0;
 
     TRACE("(%s, %08lX);\n", debugstr_a(fn), lParam2);
-    
+
     if ((ptr = strchr(fn, ' ')) != NULL) {
 	*ptr++ = '\0';
 	while (*ptr == ' ') ptr++;
@@ -360,7 +360,7 @@
     lpDrv->d.d32.dwDriverID = 0;
 
     /* Win32 installable drivers must support a two phase opening scheme:
-     * + first open with NULL as lParam2 (session instance), 
+     * + first open with NULL as lParam2 (session instance),
      * + then do a second open with the real non null lParam2)
      */
     if (DRIVER_GetNumberOfModuleRefs(lpDrv->d.d32.hModule, NULL) == 0 && lParam2)
@@ -369,20 +369,20 @@
 
         if (!DRIVER_AddToList(lpDrv, (LPARAM)ptr, 0L))
         {
-            cause = "load0 failed"; 
+            cause = "load0 failed";
             goto exit;
         }
         ret = DRIVER_TryOpenDriver32(fn, lParam2);
-        if (!ret) 
+        if (!ret)
         {
             CloseDriver((HDRVR)lpDrv, 0L, 0L);
-            cause = "load1 failed"; 
+            cause = "load1 failed";
             goto exit;
         }
         return ret;
     }
 
-    if (!DRIVER_AddToList(lpDrv, (LPARAM)ptr, lParam2)) 
+    if (!DRIVER_AddToList(lpDrv, (LPARAM)ptr, lParam2))
     {cause = "load failed"; goto exit;}
 
     TRACE("=> %p\n", lpDrv);
@@ -405,7 +405,7 @@
     LPCSTR		cause = 0;
 
     TRACE("(%s, %08lX);\n", debugstr_a(sn), lParam2);
-    
+
     lpDrv = HeapAlloc(GetProcessHeap(), 0, sizeof(WINE_DRIVER));
     if (lpDrv == NULL) {cause = "OOM"; goto exit;}
 
@@ -435,14 +435,14 @@
  * (0,1,DRV_ENABLE,0       ,0)
  * (0,1,DRV_OPEN  ,buf[256],0)
  */
-HDRVR WINAPI OpenDriverA(LPCSTR lpDriverName, LPCSTR lpSectionName, LPARAM lParam2) 
+HDRVR WINAPI OpenDriverA(LPCSTR lpDriverName, LPCSTR lpSectionName, LPARAM lParam2)
 {
     LPWINE_DRIVER	lpDrv = NULL;
     char 		libName[128];
     LPCSTR		lsn = lpSectionName;
 
     TRACE("(%s, %s, 0x%08lx);\n", debugstr_a(lpDriverName), debugstr_a(lpSectionName), lParam2);
-    
+
     if (lsn == NULL) {
 	lstrcpynA(libName, lpDriverName, sizeof(libName));
 
@@ -470,7 +470,7 @@
     LPSTR 		dn = HEAP_strdupWtoA(GetProcessHeap(), 0, lpDriverName);
     LPSTR 		sn = HEAP_strdupWtoA(GetProcessHeap(), 0, lpSectionName);
     HDRVR		ret = OpenDriverA(dn, sn, lParam);
-    
+
     if (dn) HeapFree(GetProcessHeap(), 0, dn);
     if (sn) HeapFree(GetProcessHeap(), 0, sn);
     return ret;
@@ -485,8 +485,8 @@
     LPWINE_DRIVER	lpDrv;
 
     TRACE("(%04x, %08lX, %08lX);\n", hDrvr, lParam1, lParam2);
-    
-    if ((lpDrv = DRIVER_FindFromHDrvr(hDrvr)) != NULL) 
+
+    if ((lpDrv = DRIVER_FindFromHDrvr(hDrvr)) != NULL)
     {
 	if (lpDrv->dwFlags & WINE_GDF_16BIT)
 	    CloseDriver16(lpDrv->d.d16.hDriver16, lParam1, lParam2);
@@ -553,9 +553,9 @@
 {
     LPWINE_DRIVER 	lpDrv;
     HMODULE		hModule = 0;
-    
+
     TRACE("(%04x);\n", hDrvr);
-    
+
     if ((lpDrv = DRIVER_FindFromHDrvr(hDrvr)) != NULL) {
 	if (!(lpDrv->dwFlags & WINE_GDF_16BIT))
 	    hModule = lpDrv->d.d32.hModule;
@@ -600,7 +600,7 @@
 /**************************************************************************
  * 				DrvDefDriverProc	[MMSYSTEM.1104]
  */
-LRESULT WINAPI DrvDefDriverProc16(DWORD dwDriverID, HDRVR16 hDrv, WORD wMsg, 
+LRESULT WINAPI DrvDefDriverProc16(DWORD dwDriverID, HDRVR16 hDrv, WORD wMsg,
 				  DWORD dwParam1, DWORD dwParam2)
 {
     return DefDriverProc16(dwDriverID, hDrv, wMsg, dwParam1, dwParam2);
@@ -630,7 +630,7 @@
 /**************************************************************************
  * 				DriverProc			[MMSYSTEM.6]
  */
-LRESULT WINAPI DriverProc16(DWORD dwDevID, HDRVR16 hDrv, WORD wMsg, 
+LRESULT WINAPI DriverProc16(DWORD dwDevID, HDRVR16 hDrv, WORD wMsg,
 			    DWORD dwParam1, DWORD dwParam2)
 {
     TRACE("dwDevID=%08lx hDrv=%04x wMsg=%04x dwParam1=%08lx dwParam2=%08lx\n",
diff --git a/dlls/winmm/joystick.c b/dlls/winmm/joystick.c
index 40d572c..41159ad 100644
--- a/dlls/winmm/joystick.c
+++ b/dlls/winmm/joystick.c
@@ -28,7 +28,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include <fcntl.h>
-#ifdef HAVE_SYS_IOCTL_H 
+#ifdef HAVE_SYS_IOCTL_H
 #include <sys/ioctl.h>
 #endif
 
@@ -83,17 +83,17 @@
     JOYINFO		ji;
     LONG		pos;
     unsigned 		buttonChange;
-    
+
     for (i = 0; i < MAXJOYSTICK; i++) {
 	joy = &JOY_Sticks[i];
-	
-	if (joy->hCapture != hWnd) continue;	
-	
+
+	if (joy->hCapture != hWnd) continue;
+
 	joyGetPos(i, &ji);
 	pos = MAKELONG(ji.wXpos, ji.wYpos);
-	
+
 	if (!joy->bChanged ||
-	    abs(joy->ji.wXpos - ji.wXpos) > joy->threshold || 
+	    abs(joy->ji.wXpos - ji.wXpos) > joy->threshold ||
 	    abs(joy->ji.wYpos - ji.wYpos) > joy->threshold) {
 	    SendMessageA(joy->hCapture, MM_JOY1MOVE + i, ji.wButtons, pos);
 	    joy->ji.wXpos = ji.wXpos;
@@ -106,10 +106,10 @@
 	}
 	if ((buttonChange = joy->ji.wButtons ^ ji.wButtons) != 0) {
 	    if (ji.wButtons & buttonChange)
-		SendMessageA(joy->hCapture, MM_JOY1BUTTONDOWN + i, 
+		SendMessageA(joy->hCapture, MM_JOY1BUTTONDOWN + i,
 			     (buttonChange << 8) | (ji.wButtons & buttonChange), pos);
 	    if (joy->ji.wButtons & buttonChange)
-		SendMessageA(joy->hCapture, MM_JOY1BUTTONUP + i, 
+		SendMessageA(joy->hCapture, MM_JOY1BUTTONUP + i,
 			     (buttonChange << 8) | (joy->ji.wButtons & buttonChange), pos);
 	    joy->ji.wButtons = ji.wButtons;
 	}
@@ -152,7 +152,7 @@
     lpCaps->wPeriodMax = JOY_PERIOD_MAX; /* FIXME (same as MS Joystick Driver) */
 
     return SendDriverMessage(JOY_Sticks[wID].hDriver, JDD_GETDEVCAPS, (DWORD)lpCaps, wSize);
-}   
+}
 
 /**************************************************************************
  * 				joyGetDevCapsW		[WINMM.@]
@@ -161,7 +161,7 @@
 {
     JOYCAPSA	jca;
     MMRESULT	ret = joyGetDevCapsA(wID, &jca, sizeof(jca));
-    
+
     if (ret != JOYERR_NOERROR) return ret;
     lpCaps->wMid = jca.wMid;
     lpCaps->wPid = jca.wPid;
@@ -176,7 +176,7 @@
     lpCaps->wNumButtons = jca.wNumButtons;
     lpCaps->wPeriodMin = jca.wPeriodMin;
     lpCaps->wPeriodMax = jca.wPeriodMax;
-    
+
     if (wSize >= sizeof(JOYCAPSW)) { /* Win95 extensions ? */
 	lpCaps->wRmin = jca.wRmin;
 	lpCaps->wRmax = jca.wRmax;
@@ -193,7 +193,7 @@
         MultiByteToWideChar( CP_ACP, 0, jca.szOEMVxD, -1, lpCaps->szOEMVxD,
                          sizeof(lpCaps->szOEMVxD)/sizeof(WCHAR) );
     }
-    
+
     return ret;
 }
 
@@ -204,7 +204,7 @@
 {
     JOYCAPSA	jca;
     MMRESULT	ret = joyGetDevCapsA(wID, &jca, sizeof(jca));
-    
+
     if (ret != JOYERR_NOERROR) return ret;
     lpCaps->wMid = jca.wMid;
     lpCaps->wPid = jca.wPid;
@@ -218,7 +218,7 @@
     lpCaps->wNumButtons = jca.wNumButtons;
     lpCaps->wPeriodMin = jca.wPeriodMin;
     lpCaps->wPeriodMax = jca.wPeriodMax;
-    
+
     if (wSize >= sizeof(JOYCAPS16)) { /* Win95 extensions ? */
 	lpCaps->wRmin = jca.wRmin;
 	lpCaps->wRmax = jca.wRmax;
@@ -233,7 +233,7 @@
 	strcpy(lpCaps->szRegKey, jca.szRegKey);
 	strcpy(lpCaps->szOEMVxD, jca.szOEMVxD);
     }
-    
+
     return ret;
 }
 
@@ -243,10 +243,10 @@
 MMRESULT WINAPI joyGetPosEx(UINT wID, LPJOYINFOEX lpInfo)
 {
     TRACE("(%d, %p);\n", wID, lpInfo);
-    
+
     if (wID >= MAXJOYSTICK)	return JOYERR_PARMS;
     if (!JOY_LoadDriver(wID))	return MMSYSERR_NODRIVER;
-    
+
     lpInfo->dwXpos = 0;
     lpInfo->dwYpos = 0;
     lpInfo->dwZpos = 0;
@@ -276,10 +276,10 @@
 MMRESULT WINAPI joyGetPos(UINT wID, LPJOYINFO lpInfo)
 {
     TRACE("(%d, %p);\n", wID, lpInfo);
-    
+
     if (wID >= MAXJOYSTICK)	return JOYERR_PARMS;
     if (!JOY_LoadDriver(wID))	return MMSYSERR_NODRIVER;
-    
+
     lpInfo->wXpos = 0;
     lpInfo->wYpos = 0;
     lpInfo->wZpos = 0;
@@ -295,9 +295,9 @@
 {
     JOYINFO	ji;
     MMRESULT	ret;
-    
+
     TRACE("(%d, %p);\n", wID, lpInfo);
-    
+
     if ((ret = joyGetPos(wID, &ji)) == JOYERR_NOERROR) {
 	lpInfo->wXpos = ji.wXpos;
 	lpInfo->wYpos = ji.wYpos;
@@ -313,9 +313,9 @@
 MMRESULT WINAPI joyGetThreshold(UINT wID, LPUINT lpThreshold)
 {
     TRACE("(%04X, %p);\n", wID, lpThreshold);
-    
+
     if (wID >= MAXJOYSTICK)	return JOYERR_PARMS;
-    
+
     *lpThreshold = JOY_Sticks[wID].threshold;
     return JOYERR_NOERROR;
 }
@@ -326,9 +326,9 @@
 MMRESULT16 WINAPI joyGetThreshold16(UINT16 wID, LPUINT16 lpThreshold)
 {
     TRACE("(%04X, %p);\n", wID, lpThreshold);
-    
+
     if (wID >= MAXJOYSTICK)	return JOYERR_PARMS;
-    
+
     *lpThreshold = JOY_Sticks[wID].threshold;
     return JOYERR_NOERROR;
 }
@@ -381,7 +381,7 @@
 
     JOY_Sticks[wID].hCapture = hWnd;
     JOY_Sticks[wID].bChanged = bChanged;
-    
+
     return JOYERR_NOERROR;
 }
 
@@ -390,7 +390,7 @@
  */
 MMRESULT16 WINAPI joySetCapture16(HWND16 hWnd, UINT16 wID, UINT16 wPeriod, BOOL16 bChanged)
 {
-    return joySetCapture16(hWnd, wID, wPeriod, bChanged);    
+    return joySetCapture16(hWnd, wID, wPeriod, bChanged);
 }
 
 /**************************************************************************
@@ -399,7 +399,7 @@
 MMRESULT WINAPI joySetThreshold(UINT wID, UINT wThreshold)
 {
     TRACE("(%04X, %d);\n", wID, wThreshold);
-    
+
     if (wID >= MAXJOYSTICK) return MMSYSERR_INVALPARAM;
 
     JOY_Sticks[wID].threshold = wThreshold;
diff --git a/dlls/winmm/joystick/joystick.c b/dlls/winmm/joystick/joystick.c
index cd93a5f..fef5b78 100644
--- a/dlls/winmm/joystick/joystick.c
+++ b/dlls/winmm/joystick/joystick.c
@@ -44,7 +44,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include <fcntl.h>
-#ifdef HAVE_SYS_IOCTL_H 
+#ifdef HAVE_SYS_IOCTL_H
 #include <sys/ioctl.h>
 #endif
 #ifdef HAVE_LINUX_JOYSTICK_H
@@ -76,7 +76,7 @@
 static	WINE_JSTCK	JSTCK_Data[MAXJOYSTICK];
 
 /**************************************************************************
- * 				JSTCK_drvGet			[internal]	
+ * 				JSTCK_drvGet			[internal]
  */
 static	WINE_JSTCK*	JSTCK_drvGet(DWORD dwDevID)
 {
@@ -92,7 +92,7 @@
 }
 
 /**************************************************************************
- * 				JSTCK_drvOpen			[internal]	
+ * 				JSTCK_drvOpen			[internal]
  */
 static	DWORD	JSTCK_drvOpen(LPSTR str, DWORD dwIntf)
 {
@@ -105,7 +105,7 @@
 }
 
 /**************************************************************************
- * 				JSTCK_drvClose			[internal]	
+ * 				JSTCK_drvClose			[internal]
  */
 static	DWORD	JSTCK_drvClose(DWORD dwDevID)
 {
@@ -159,7 +159,7 @@
 	return MMSYSERR_NODRIVER;
 
 #ifdef HAVE_LINUX_22_JOYSTICK_API
-    
+
     if ((dev = JSTCK_OpenDevice(jstck)) < 0) return JOYERR_PARMS;
     ioctl(dev, JSIOCGAXES, &nrOfAxes);
     ioctl(dev, JSIOCGBUTTONS, &nrOfButtons);
@@ -249,7 +249,7 @@
     struct js_status 	js;
     int    		dev_stat;
 #endif
-    
+
     if ((jstck = JSTCK_drvGet(dwDevID)) == NULL)
 	return MMSYSERR_NODRIVER;
 
@@ -265,7 +265,7 @@
 		if (lpInfo->dwFlags & JOY_RETURNX)
 		    lpInfo->dwXpos   = ev.value + 32767;
 		break;
-	    case 1: 
+	    case 1:
 		if (lpInfo->dwFlags & JOY_RETURNY)
 		    lpInfo->dwYpos   = ev.value + 32767;
 		break;
@@ -273,24 +273,24 @@
 		if (lpInfo->dwFlags & JOY_RETURNZ)
 		    lpInfo->dwZpos   = ev.value + 32767;
 		break;
-	    case 3: 
+	    case 3:
 		if (lpInfo->dwFlags & JOY_RETURNR)
 		    lpInfo->dwRpos   = ev.value + 32767;
-	    case 4: 
+	    case 4:
 		if (lpInfo->dwFlags & JOY_RETURNU)
 		    lpInfo->dwUpos   = ev.value + 32767;
-	    case 5: 
+	    case 5:
 		if (lpInfo->dwFlags & JOY_RETURNV)
 		    lpInfo->dwVpos   = ev.value + 32767;
 		break;
-	    default: 
+	    default:
 		FIXME("Unknown joystick event '%d'\n", ev.number);
 	    }
 	} else if (ev.type == (JS_EVENT_BUTTON | JS_EVENT_INIT)) {
 	    if (lpInfo->dwFlags & JOY_RETURNBUTTONS) {
 		if (ev.value) {
 		    lpInfo->dwButtons |= (1 << ev.number);
-		    /* FIXME: what to do for this field when 
+		    /* FIXME: what to do for this field when
 		     * multiple buttons are depressed ?
 		     */
 		    lpInfo->dwButtonNumber = ev.number + 1;
@@ -321,7 +321,7 @@
 
     close(dev);
 
-    TRACE("x: %ld, y: %ld, z: %ld, r: %ld, u: %ld, v: %ld, buttons: 0x%04x, flags: 0x%04x\n", 
+    TRACE("x: %ld, y: %ld, z: %ld, r: %ld, u: %ld, v: %ld, buttons: 0x%04x, flags: 0x%04x\n",
 	  lpInfo->dwXpos, lpInfo->dwYpos, lpInfo->dwZpos,
 	  lpInfo->dwRpos, lpInfo->dwUpos, lpInfo->dwVpos,
 	  (unsigned int)lpInfo->dwButtons,
@@ -356,12 +356,12 @@
 /**************************************************************************
  * 				DriverProc (JOYSTICK.@)
  */
-LONG CALLBACK	JSTCK_DriverProc(DWORD dwDevID, HDRVR hDriv, DWORD wMsg, 
+LONG CALLBACK	JSTCK_DriverProc(DWORD dwDevID, HDRVR hDriv, DWORD wMsg,
 				 DWORD dwParam1, DWORD dwParam2)
 {
     /* EPP     TRACE("(%08lX, %04X, %08lX, %08lX, %08lX)\n",  */
     /* EPP 	  dwDevID, hDriv, wMsg, dwParam1, dwParam2); */
-    
+
     switch(wMsg) {
     case DRV_LOAD:		return 1;
     case DRV_FREE:		return 1;
@@ -377,7 +377,7 @@
     case JDD_GETNUMDEVS:	return 1;
     case JDD_GETDEVCAPS:	return JSTCK_GetDevCaps(dwDevID, (LPJOYCAPSA)dwParam1, dwParam2);
     case JDD_GETPOS:		return JSTCK_GetPos(dwDevID, (LPJOYINFO)dwParam1);
-    case JDD_SETCALIBRATION:	
+    case JDD_SETCALIBRATION:
     case JDD_CONFIGCHANGED:	return JOYERR_NOCANDO;
     case JDD_GETPOSEX:		return JSTCK_GetPosEx(dwDevID, (LPJOYINFOEX)dwParam1);
     default:
@@ -390,19 +390,19 @@
 /**************************************************************************
  * 				DriverProc (JOYSTICK.@)
  */
-LONG CALLBACK	JSTCK_DriverProc(DWORD dwDevID, HDRVR hDriv, DWORD wMsg, 
+LONG CALLBACK	JSTCK_DriverProc(DWORD dwDevID, HDRVR hDriv, DWORD wMsg,
 				 DWORD dwParam1, DWORD dwParam2)
 {
     /* EPP     TRACE("(%08lX, %04X, %08lX, %08lX, %08lX)\n",  */
     /* EPP 	  dwDevID, hDriv, wMsg, dwParam1, dwParam2); */
-    
+
     switch(wMsg) {
-    case DRV_LOAD:		
-    case DRV_FREE:		
-    case DRV_OPEN:		
-    case DRV_CLOSE:		
-    case DRV_ENABLE:		
-    case DRV_DISABLE:		
+    case DRV_LOAD:
+    case DRV_FREE:
+    case DRV_OPEN:
+    case DRV_CLOSE:
+    case DRV_ENABLE:
+    case DRV_DISABLE:
     case DRV_QUERYCONFIGURE:	return 0;
     case DRV_CONFIGURE:		MessageBoxA(0, "JoyStick MultiMedia Driver !", "JoyStick Driver", MB_OK);	return 1;
     case DRV_INSTALL:		return DRVCNF_RESTART;
diff --git a/dlls/winmm/lolvldrv.c b/dlls/winmm/lolvldrv.c
index f551a6c..8a91d4a 100644
--- a/dlls/winmm/lolvldrv.c
+++ b/dlls/winmm/lolvldrv.c
@@ -67,7 +67,7 @@
 
 /* each known type of driver has an instance of this structure */
 typedef struct tagWINE_LLTYPE {
-    /* those attributes depend on the specification of the type */    
+    /* those attributes depend on the specification of the type */
     LPSTR		typestr;	/* name (for debugging) */
     BOOL		bSupportMapper;	/* if type is allowed to support mapper */
     MMDRV_MAPFUNC	Map16To32A;	/* those are function pointers to handle */
@@ -158,10 +158,10 @@
     if (!(dw = pGetFileVersionInfoSizeA(ofs.szPathName, &h)))	E(("Can't get FVIS\n"));
     if (!(ptr = HeapAlloc(GetProcessHeap(), 0, dw)))		E(("OOM\n"));
     if (!pGetFileVersionInfoA(ofs.szPathName, h, dw, ptr))	E(("Can't get FVI\n"));
-    
+
 #define	A(_x) if (pVerQueryValueA(ptr, "\\StringFileInfo\\040904B0\\" #_x, &val, &u)) \
                   TRACE(#_x " => %s\n", (LPSTR)val); else TRACE(#_x " @\n")
-    
+
     A(CompanyName);
     A(FileDescription);
     A(FileVersion);
@@ -173,13 +173,13 @@
     A(Comments);
     A(LegalTrademarks);
     A(PrivateBuild);
-    A(SpecialBuild); 
+    A(SpecialBuild);
 #undef A
 
     if (!pVerQueryValueA(ptr, "\\StringFileInfo\\040904B0\\ProductName", &val, &u)) E(("Can't get product name\n"));
     lstrcpynA(buf, val, buflen);
 
-#undef E    
+#undef E
     ret = TRUE;
 theEnd:
     HeapFree(GetProcessHeap(), 0, ptr);
@@ -198,10 +198,10 @@
     if (!mld->bFrom32 && (mld->dwFlags & DCB_TYPEMASK) == DCB_FUNCTION) {
 	/* 16 bit func, call it */
 	TRACE("Function (16 bit) !\n");
-	MMDRV_CallTo16_word_wwlll((FARPROC16)mld->dwCallback, hDev, uMsg, 
+	MMDRV_CallTo16_word_wwlll((FARPROC16)mld->dwCallback, hDev, uMsg,
 				  mld->dwClientInstance, dwParam1, dwParam2);
     } else {
-	DriverCallback(mld->dwCallback, mld->dwFlags, hDev, uMsg, 
+	DriverCallback(mld->dwCallback, mld->dwFlags, hDev, uMsg,
 		       mld->dwClientInstance, dwParam1, dwParam2);
     }
 }
@@ -282,7 +282,7 @@
 #if 0
     MIXERCAPSA	micA;
     UINT	ret = mixerGetDevCapsA(devid, &micA, sizeof(micA));
-    
+
     if (ret == MMSYSERR_NOERROR) {
 	mixcaps->wMid           = micA.wMid;
 	mixcaps->wPid           = micA.wPid;
@@ -371,9 +371,9 @@
     case MIM_CLOSE:
 	/* dwParam1 & dwParam2 are supposed to be 0, nothing to do */
 
-    case MIM_DATA:	
-    case MIM_MOREDATA:	
-    case MIM_ERROR:	
+    case MIM_DATA:
+    case MIM_MOREDATA:
+    case MIM_ERROR:
 	/* dwParam1 & dwParam2 are are data, nothing to do */
 	break;
     case MIM_LONGDATA:
@@ -383,7 +383,7 @@
 	    /* initial map is: 32 => 16 */
 	    LPMIDIHDR		mh16 = MapSL(dwParam1);
 	    LPMIDIHDR		mh32 = *(LPMIDIHDR*)((LPSTR)mh16 - sizeof(LPMIDIHDR));
-	    
+
 	    dwParam1 = (DWORD)mh32;
 	    mh32->dwFlags = mh16->dwFlags;
 	    mh32->dwBytesRecorded = mh16->dwBytesRecorded;
@@ -394,13 +394,13 @@
 	    LPMIDIHDR		mh32 = (LPMIDIHDR)(dwParam1);
 	    SEGPTR		segmh16 = *(SEGPTR*)((LPSTR)mh32 - sizeof(LPMIDIHDR));
 	    LPMIDIHDR		mh16 = MapSL(segmh16);
-	    
+
 	    dwParam1 = (DWORD)segmh16;
 	    mh16->dwFlags = mh32->dwFlags;
 	    mh16->dwBytesRecorded = mh32->dwBytesRecorded;
 	    if (mh16->reserved >= sizeof(MIDIHDR))
 		mh16->dwOffset = mh32->dwOffset;
-	}	
+	}
 	/* else { 16 => 16 or 32 => 32, nothing to do, same struct is kept }*/
 	break;
     /* case MOM_POSITIONCB: */
@@ -429,7 +429,7 @@
     case MODM_SETVOLUME:
 	ret = MMDRV_MAP_OK;
 	break;
-	
+
     case MODM_OPEN:
     case MODM_CLOSE:
     case MODM_GETVOLUME:
@@ -522,7 +522,7 @@
     case MODM_SETVOLUME:
 	ret = MMDRV_MAP_OK;
 	break;
-	
+
     case MODM_OPEN:
     case MODM_CLOSE:
     case MODM_GETVOLUME:
@@ -612,7 +612,7 @@
     case MODM_PREPARE:
 	{
 	    LPMIDIHDR		mh32 = (LPMIDIHDR)*lpParam1;
-	    LPMIDIHDR		mh16; 
+	    LPMIDIHDR		mh16;
 	    LPVOID ptr = HeapAlloc( GetProcessHeap(), 0,
                                     sizeof(LPMIDIHDR) + sizeof(MIDIHDR) + mh32->dwBufferLength);
 
@@ -629,11 +629,11 @@
 		/* FIXME: nothing on mh32->lpNext */
 		/* could link the mh32->lpNext at this level for memory house keeping */
 		mh16->dwOffset = (*lpParam2 >= sizeof(MIDIHDR)) ? mh32->dwOffset : 0;
-		    
+
 		mh32->lpNext = (LPMIDIHDR)mh16; /* for reuse in unprepare and write */
 		mh32->reserved = *lpParam2;
 
-		TRACE("mh16=%08lx mh16->lpData=%08lx mh32->buflen=%lu mh32->lpData=%08lx\n", 
+		TRACE("mh16=%08lx mh16->lpData=%08lx mh32->buflen=%lu mh32->lpData=%08lx\n",
 		      *lpParam1, (DWORD)mh16->lpData,
 		      mh32->dwBufferLength, (DWORD)mh32->lpData);
 		*lpParam2 = sizeof(MIDIHDR);
@@ -652,13 +652,13 @@
 	    LPSTR		ptr = (LPSTR)mh16 - sizeof(LPMIDIHDR);
 
 	    assert(*(LPMIDIHDR*)ptr == mh32);
-	    
+
 	    if (wMsg == MODM_LONGDATA)
 		memcpy((LPSTR)mh16 + sizeof(MIDIHDR), mh32->lpData, mh32->dwBufferLength);
 
 	    *lpParam1 = MapLS(mh16);
 	    *lpParam2 = sizeof(MIDIHDR);
-	    TRACE("mh16=%08lx mh16->lpData=%08lx mh32->buflen=%lu mh32->lpData=%08lx\n", 
+	    TRACE("mh16=%08lx mh16->lpData=%08lx mh32->buflen=%lu mh32->lpData=%08lx\n",
                   *lpParam1, (DWORD)mh16->lpData, mh32->dwBufferLength, (DWORD)mh32->lpData);
 
 	    /* dwBufferLength can be reduced between prepare & write */
@@ -681,7 +681,7 @@
 	       DWORD		orig dwUser, which is a pointer to DWORD:driver dwInstance
 	       DWORD		dwUser passed to driver
 	       MIDIOPENDESC16	mod16: openDesc passed to driver
-	       MIDIOPENSTRMID	cIds 
+	       MIDIOPENSTRMID	cIds
 	    */
             ptr = HeapAlloc( GetProcessHeap(), 0,
                              sizeof(LPMIDIOPENDESC) + 2*sizeof(DWORD) + sizeof(MIDIOPENDESC16) +
@@ -813,7 +813,7 @@
 	    /* initial map is: 32 => 16 */
 	    LPMIDIHDR		mh16 = MapSL(dwParam1);
 	    LPMIDIHDR		mh32 = *(LPMIDIHDR*)((LPSTR)mh16 - sizeof(LPMIDIHDR));
-	    
+
 	    dwParam1 = (DWORD)mh32;
 	    mh32->dwFlags = mh16->dwFlags;
 	    mh32->dwOffset = mh16->dwOffset;
@@ -824,12 +824,12 @@
 	    LPMIDIHDR		mh32 = (LPMIDIHDR)(dwParam1);
 	    SEGPTR		segmh16 = *(SEGPTR*)((LPSTR)mh32 - sizeof(LPMIDIHDR));
 	    LPMIDIHDR		mh16 = MapSL(segmh16);
-	    
+
 	    dwParam1 = (DWORD)segmh16;
 	    mh16->dwFlags = mh32->dwFlags;
 	    if (mh16->reserved >= sizeof(MIDIHDR))
 		mh16->dwOffset = mh32->dwOffset;
-	}	
+	}
 	/* else { 16 => 16 or 32 => 32, nothing to do, same struct is kept }*/
 	break;
     /* case MOM_POSITIONCB: */
@@ -978,11 +978,11 @@
 	    LPWAVEINCAPS16		wic16 = *(LPWAVEINCAPS16*)((LPSTR)wic32 - sizeof(LPWAVEINCAPS16));
 
 	    wic16->wMid = wic32->wMid;
-	    wic16->wPid = wic32->wPid; 
-	    wic16->vDriverVersion = wic32->vDriverVersion; 
+	    wic16->wPid = wic32->wPid;
+	    wic16->vDriverVersion = wic32->vDriverVersion;
 	    strcpy(wic16->szPname, wic32->szPname);
-	    wic16->dwFormats = wic32->dwFormats; 
-	    wic16->wChannels = wic32->wChannels; 
+	    wic16->dwFormats = wic32->dwFormats;
+	    wic16->wChannels = wic32->wChannels;
 	    HeapFree(GetProcessHeap(), 0, (LPSTR)wic32 - sizeof(LPWAVEINCAPS16));
 	    ret = MMDRV_MAP_OK;
 	}
@@ -1073,12 +1073,12 @@
 		wod16->hWave = wod32->hWave;
 		wod16->lpFormat = (LPWAVEFORMATEX)(seg_ptr + sizeof(LPWAVEOPENDESC) + 2*sizeof(DWORD) + sizeof(WAVEOPENDESC16));
 		memcpy(wod16 + 1, wod32->lpFormat, sz);
-		
+
 		wod16->dwCallback = wod32->dwCallback;
 		wod16->dwInstance = wod32->dwInstance;
 		wod16->uMappedDeviceID = wod32->uMappedDeviceID;
 		wod16->dnDevNode = wod32->dnDevNode;
-		
+
 		*lpParam1 = seg_ptr + sizeof(LPWAVEOPENDESC) + 2*sizeof(DWORD);
 		*lpdwUser = seg_ptr + sizeof(LPWAVEOPENDESC) + sizeof(DWORD);
 
@@ -1091,7 +1091,7 @@
     case WIDM_PREPARE:
 	{
 	    LPWAVEHDR		wh32 = (LPWAVEHDR)*lpParam1;
-	    LPWAVEHDR		wh16; 
+	    LPWAVEHDR		wh16;
 	    LPVOID ptr = HeapAlloc( GetProcessHeap(), 0,
                                     sizeof(LPWAVEHDR) + sizeof(WAVEHDR) + wh32->dwBufferLength);
 
@@ -1109,7 +1109,7 @@
 		/* FIXME: nothing on wh32->lpNext */
 		/* could link the wh32->lpNext at this level for memory house keeping */
 		wh32->lpNext = wh16; /* for reuse in unprepare and write */
-		TRACE("wh16=%08lx wh16->lpData=%08lx wh32->buflen=%lu wh32->lpData=%08lx\n", 
+		TRACE("wh16=%08lx wh16->lpData=%08lx wh32->buflen=%lu wh32->lpData=%08lx\n",
 		      seg_ptr + sizeof(LPWAVEHDR), (DWORD)wh16->lpData,
 		      wh32->dwBufferLength, (DWORD)wh32->lpData);
 		*lpParam1 = seg_ptr + sizeof(LPWAVEHDR);
@@ -1130,8 +1130,8 @@
             SEGPTR seg_ptr = MapLS( ptr );
 
 	    assert(*(LPWAVEHDR*)ptr == wh32);
-	    
-	    TRACE("wh16=%08lx wh16->lpData=%08lx wh32->buflen=%lu wh32->lpData=%08lx\n", 
+
+	    TRACE("wh16=%08lx wh16->lpData=%08lx wh32->buflen=%lu wh32->lpData=%08lx\n",
 		  seg_ptr + sizeof(LPWAVEHDR), (DWORD)wh16->lpData,
 		  wh32->dwBufferLength, (DWORD)wh32->lpData);
 
@@ -1306,7 +1306,7 @@
 	    /* initial map is: 32 => 16 */
 	    LPWAVEHDR		wh16 = MapSL(dwParam1);
 	    LPWAVEHDR		wh32 = *(LPWAVEHDR*)((LPSTR)wh16 - sizeof(LPWAVEHDR));
-	    
+
 	    dwParam1 = (DWORD)wh32;
 	    wh32->dwFlags = wh16->dwFlags;
 	    wh32->dwBytesRecorded = wh16->dwBytesRecorded;
@@ -1315,11 +1315,11 @@
 	    LPWAVEHDR		wh32 = (LPWAVEHDR)(dwParam1);
 	    SEGPTR		segwh16 = *(SEGPTR*)((LPSTR)wh32 - sizeof(LPWAVEHDR));
 	    LPWAVEHDR		wh16 = MapSL(segwh16);
-	    
+
 	    dwParam1 = (DWORD)segwh16;
 	    wh16->dwFlags = wh32->dwFlags;
 	    wh16->dwBytesRecorded = wh32->dwBytesRecorded;
-	}	
+	}
 	/* else { 16 => 16 or 32 => 32, nothing to do, same struct is kept }*/
 	break;
     default:
@@ -1361,7 +1361,7 @@
 	FIXME("Shouldn't be used: the corresponding 16 bit functions use the 32 bit interface\n");
 	break;
 
-    case WODM_GETDEVCAPS: 
+    case WODM_GETDEVCAPS:
 	{
             LPWAVEOUTCAPSA		woc32 = HeapAlloc(GetProcessHeap(), 0, sizeof(LPWAVEOUTCAPS16) + sizeof(WAVEOUTCAPSA));
 	    LPWAVEOUTCAPS16		woc16 = MapSL(*lpParam1);
@@ -1479,19 +1479,19 @@
     case WODM_OPEN:
 	FIXME("Shouldn't be used: those 16 bit functions use the 32 bit interface\n");
 	break;
-	
-    case WODM_GETDEVCAPS: 
+
+    case WODM_GETDEVCAPS:
 	{
             LPWAVEOUTCAPSA		woc32 = (LPWAVEOUTCAPSA)(*lpParam1);
 	    LPWAVEOUTCAPS16		woc16 = *(LPWAVEOUTCAPS16*)((LPSTR)woc32 - sizeof(LPWAVEOUTCAPS16));
 
 	    woc16->wMid = woc32->wMid;
-	    woc16->wPid = woc32->wPid; 
-	    woc16->vDriverVersion = woc32->vDriverVersion; 
+	    woc16->wPid = woc32->wPid;
+	    woc16->vDriverVersion = woc32->vDriverVersion;
 	    strcpy(woc16->szPname, woc32->szPname);
-	    woc16->dwFormats = woc32->dwFormats; 
-	    woc16->wChannels = woc32->wChannels; 
-	    woc16->dwSupport = woc32->dwSupport; 
+	    woc16->dwFormats = woc32->dwFormats;
+	    woc16->wChannels = woc32->wChannels;
+	    woc16->dwSupport = woc32->dwSupport;
 	    HeapFree(GetProcessHeap(), 0, (LPSTR)woc32 - sizeof(LPWAVEOUTCAPS16));
 	    ret = MMDRV_MAP_OK;
 	}
@@ -1554,7 +1554,7 @@
     case WODM_SETVOLUME:
 	ret = MMDRV_MAP_OK;
 	break;
-	
+
     case WODM_GETDEVCAPS:
 	{
             LPWAVEOUTCAPSA woc32 = (LPWAVEOUTCAPSA)*lpParam1;
@@ -1632,12 +1632,12 @@
 		wod16->hWave = wod32->hWave;
 		wod16->lpFormat = (LPWAVEFORMATEX)(seg_ptr + sizeof(LPWAVEOPENDESC) + 2*sizeof(DWORD) + sizeof(WAVEOPENDESC16));
 		memcpy(wod16 + 1, wod32->lpFormat, sz);
-		
+
 		wod16->dwCallback = wod32->dwCallback;
 		wod16->dwInstance = wod32->dwInstance;
 		wod16->uMappedDeviceID = wod32->uMappedDeviceID;
 		wod16->dnDevNode = wod32->dnDevNode;
-		
+
 		*lpParam1 = seg_ptr + sizeof(LPWAVEOPENDESC) + 2*sizeof(DWORD);
 		*lpdwUser = seg_ptr + sizeof(LPWAVEOPENDESC) + sizeof(DWORD);
 
@@ -1650,7 +1650,7 @@
     case WODM_PREPARE:
 	{
 	    LPWAVEHDR		wh32 = (LPWAVEHDR)*lpParam1;
-	    LPWAVEHDR		wh16; 
+	    LPWAVEHDR		wh16;
 	    LPVOID ptr = HeapAlloc( GetProcessHeap(), 0,
                                     sizeof(LPWAVEHDR) + sizeof(WAVEHDR) + wh32->dwBufferLength);
 
@@ -1668,7 +1668,7 @@
 		/* FIXME: nothing on wh32->lpNext */
 		/* could link the wh32->lpNext at this level for memory house keeping */
 		wh32->lpNext = wh16; /* for reuse in unprepare and write */
-		TRACE("wh16=%08lx wh16->lpData=%08lx wh32->buflen=%lu wh32->lpData=%08lx\n", 
+		TRACE("wh16=%08lx wh16->lpData=%08lx wh32->buflen=%lu wh32->lpData=%08lx\n",
 		      seg_ptr + sizeof(LPWAVEHDR), (DWORD)wh16->lpData,
 		      wh32->dwBufferLength, (DWORD)wh32->lpData);
 		*lpParam1 = seg_ptr + sizeof(LPWAVEHDR);
@@ -1689,8 +1689,8 @@
             SEGPTR seg_ptr = MapLS( ptr );
 
 	    assert(*(LPWAVEHDR*)ptr == wh32);
-	    
-	    TRACE("wh16=%08lx wh16->lpData=%08lx wh32->buflen=%lu wh32->lpData=%08lx\n", 
+
+	    TRACE("wh16=%08lx wh16->lpData=%08lx wh32->buflen=%lu wh32->lpData=%08lx\n",
 		  seg_ptr + sizeof(LPWAVEHDR), (DWORD)wh16->lpData,
 		  wh32->dwBufferLength, (DWORD)wh32->lpData);
 
@@ -1743,7 +1743,7 @@
     case WODM_SETVOLUME:
 	ret = MMDRV_MAP_OK;
 	break;
-	
+
     case WODM_GETDEVCAPS:
 	{
 	    LPWAVEOUTCAPS16		woc16 = MapSL(*lpParam1);
@@ -1852,7 +1852,7 @@
 	    /* initial map is: 32 => 16 */
 	    LPWAVEHDR		wh16 = MapSL(dwParam1);
 	    LPWAVEHDR		wh32 = *(LPWAVEHDR*)((LPSTR)wh16 - sizeof(LPWAVEHDR));
-	    
+
 	    dwParam1 = (DWORD)wh32;
 	    wh32->dwFlags = wh16->dwFlags;
 	} else if (!mld->bFrom32 && MMDrvs[mld->mmdIndex].bIs32) {
@@ -1860,10 +1860,10 @@
 	    LPWAVEHDR		wh32 = (LPWAVEHDR)(dwParam1);
 	    SEGPTR		segwh16 = *(SEGPTR*)((LPSTR)wh32 - sizeof(LPWAVEHDR));
 	    LPWAVEHDR		wh16 = MapSL(segwh16);
-	    
+
 	    dwParam1 = (DWORD)segwh16;
 	    wh16->dwFlags = wh32->dwFlags;
-	}	
+	}
 	/* else { 16 => 16 or 32 => 32, nothing to do, same struct is kept }*/
 	break;
     default:
@@ -1903,7 +1903,7 @@
 /**************************************************************************
  * 				WINE_Message			[internal]
  */
-DWORD	MMDRV_Message(LPWINE_MLD mld, WORD wMsg, DWORD dwParam1, 
+DWORD	MMDRV_Message(LPWINE_MLD mld, WORD wMsg, DWORD dwParam1,
 		      DWORD dwParam2, BOOL bFrom32)
 {
     LPWINE_MM_DRIVER 		lpDrv;
@@ -1913,13 +1913,13 @@
     MMDRV_MapType		map;
     int				devID;
 
-    TRACE("(%s %u %u 0x%08lx 0x%08lx 0x%08lx %c)!\n", 
-	  llTypes[mld->type].typestr, mld->uDeviceID, wMsg, 
+    TRACE("(%s %u %u 0x%08lx 0x%08lx 0x%08lx %c)!\n",
+	  llTypes[mld->type].typestr, mld->uDeviceID, wMsg,
 	  mld->dwDriverInstance, dwParam1, dwParam2, bFrom32?'Y':'N');
 
     if (mld->uDeviceID == (UINT16)-1) {
 	if (!llType->bSupportMapper) {
-	    WARN("uDev=-1 requested on non-mappable ll type %s\n", 
+	    WARN("uDev=-1 requested on non-mappable ll type %s\n",
 		 llTypes[mld->type].typestr);
 	    return MMSYSERR_BADDEVICEID;
 	}
@@ -1945,9 +1945,9 @@
 
     if (lpDrv->bIs32) {
 	assert(part->u.fnMessage32);
-	
+
 	if (bFrom32) {
-	    TRACE("Calling message(dev=%u msg=%u usr=0x%08lx p1=0x%08lx p2=0x%08lx\n", 
+	    TRACE("Calling message(dev=%u msg=%u usr=0x%08lx p1=0x%08lx p2=0x%08lx\n",
 		  mld->uDeviceID, wMsg, mld->dwDriverInstance, dwParam1, dwParam2);
             ret = part->u.fnMessage32(mld->uDeviceID, wMsg, mld->dwDriverInstance, dwParam1, dwParam2);
 	    TRACE("=> %lu\n", ret);
@@ -1963,9 +1963,9 @@
 		break;
 	    case MMDRV_MAP_OK:
 	    case MMDRV_MAP_OKMEM:
-		TRACE("Calling message(dev=%u msg=%u usr=0x%08lx p1=0x%08lx p2=0x%08lx\n", 
+		TRACE("Calling message(dev=%u msg=%u usr=0x%08lx p1=0x%08lx p2=0x%08lx\n",
 		      mld->uDeviceID, wMsg, mld->dwDriverInstance, dwParam1, dwParam2);
-		ret = part->u.fnMessage32(mld->uDeviceID, wMsg, mld->dwDriverInstance, 
+		ret = part->u.fnMessage32(mld->uDeviceID, wMsg, mld->dwDriverInstance,
 					  dwParam1, dwParam2);
 		TRACE("=> %lu\n", ret);
 		if (map == MMDRV_MAP_OKMEM)
@@ -1993,9 +1993,9 @@
 		break;
 	    case MMDRV_MAP_OK:
 	    case MMDRV_MAP_OKMEM:
-		TRACE("Calling message(dev=%u msg=%u usr=0x%08lx p1=0x%08lx p2=0x%08lx\n", 
+		TRACE("Calling message(dev=%u msg=%u usr=0x%08lx p1=0x%08lx p2=0x%08lx\n",
 		      mld->uDeviceID, wMsg, mld->dwDriverInstance, dwParam1, dwParam2);
-		ret = MMDRV_CallTo16_word_wwlll((FARPROC16)part->u.fnMessage16, mld->uDeviceID, 
+		ret = MMDRV_CallTo16_word_wwlll((FARPROC16)part->u.fnMessage16, mld->uDeviceID,
 						wMsg, mld->dwDriverInstance, dwParam1, dwParam2);
 		TRACE("=> %lu\n", ret);
 		if (map == MMDRV_MAP_OKMEM)
@@ -2008,9 +2008,9 @@
 		break;
 	    }
 	} else {
-	    TRACE("Calling message(dev=%u msg=%u usr=0x%08lx p1=0x%08lx p2=0x%08lx\n", 
+	    TRACE("Calling message(dev=%u msg=%u usr=0x%08lx p1=0x%08lx p2=0x%08lx\n",
 		  mld->uDeviceID, wMsg, mld->dwDriverInstance, dwParam1, dwParam2);
-            ret = MMDRV_CallTo16_word_wwlll((FARPROC16)part->u.fnMessage16, mld->uDeviceID, 
+            ret = MMDRV_CallTo16_word_wwlll((FARPROC16)part->u.fnMessage16, mld->uDeviceID,
 					    wMsg, mld->dwDriverInstance, dwParam1, dwParam2);
 	    TRACE("=> %lu\n", ret);
 	}
@@ -2021,7 +2021,7 @@
 /**************************************************************************
  * 				MMDRV_Alloc			[internal]
  */
-LPWINE_MLD	MMDRV_Alloc(UINT size, UINT type, LPHANDLE hndl, DWORD* dwFlags, 
+LPWINE_MLD	MMDRV_Alloc(UINT size, UINT type, LPHANDLE hndl, DWORD* dwFlags,
 			    DWORD* dwCallback, DWORD* dwInstance, BOOL bFrom32)
 {
     LPWINE_MLD	mld;
@@ -2151,7 +2151,7 @@
 
     assert(type < MMDRV_MAX);
 
-    if ((UINT)hndl >= llTypes[type].wMaxId && 
+    if ((UINT)hndl >= llTypes[type].wMaxId &&
 	hndl != (UINT16)-1 && hndl != (UINT)-1) {
 	if (hndl & 0x8000) {
 	    hndl &= ~0x8000;
@@ -2181,14 +2181,14 @@
 	WINE_MM_DRIVER_PART*	part = &MMDrvs[mld->mmdIndex].parts[dstType];
 	if (part->nIDMin < part->nIDMax)
 	    return MMDRV_GetByID(part->nIDMin, dstType);
-    } 
+    }
     return NULL;
 }
 
 /**************************************************************************
  * 				MMDRV_PhysicalFeatures		[internal]
  */
-UINT	MMDRV_PhysicalFeatures(LPWINE_MLD mld, UINT uMsg, DWORD dwParam1, 
+UINT	MMDRV_PhysicalFeatures(LPWINE_MLD mld, UINT uMsg, DWORD dwParam1,
 			       DWORD dwParam2)
 {
     WINE_MM_DRIVER*	lpDrv = &MMDrvs[mld->mmdIndex];
@@ -2250,7 +2250,7 @@
 #endif
         count = part->u.fnMessage32(0, wMsg, 0L, 0L, 0L);
     } else if (!lpDrv->bIs32 && part->u.fnMessage16) {
-        ret = MMDRV_CallTo16_word_wwlll((FARPROC16)part->u.fnMessage16, 
+        ret = MMDRV_CallTo16_word_wwlll((FARPROC16)part->u.fnMessage16,
 					0, DRVM_INIT, 0L, 0L, 0L);
 	TRACE("DRVM_INIT => %08lx\n", ret);
 #if 0
@@ -2258,7 +2258,7 @@
 					0, DRVM_ENABLE, 0L, 0L, 0L);
 	TRACE("DRVM_ENABLE => %08lx\n", ret);
 #endif
-        count = MMDRV_CallTo16_word_wwlll((FARPROC16)part->u.fnMessage16, 
+        count = MMDRV_CallTo16_word_wwlll((FARPROC16)part->u.fnMessage16,
 					  0, wMsg, 0L, 0L, 0L);
     } else {
 	return FALSE;
@@ -2270,7 +2270,7 @@
     if (lpDrv->bIsMapper) {
 	/* it seems native mappers return 0 devices :-( */
 	if (llTypes[type].nMapper != -1)
-	    ERR("Two mappers for type %s (%d, %s)\n", 
+	    ERR("Two mappers for type %s (%d, %s)\n",
 		llTypes[type].typestr, llTypes[type].nMapper, lpDrv->drvname);
 	if (count > 1)
 	    ERR("Strange: mapper with %d > 1 devices\n", count);
@@ -2283,7 +2283,7 @@
 	part->nIDMax = llTypes[type].wMaxId;
     }
     TRACE("Setting min=%d max=%d (ttop=%d) for (%s:%s)\n",
-	  part->nIDMin, part->nIDMax, llTypes[type].wMaxId, 
+	  part->nIDMin, part->nIDMax, llTypes[type].wMaxId,
 	  lpDrv->drvname, llTypes[type].typestr);
     /* realloc translation table */
     llTypes[type].lpMlds = (LPWINE_MLD)
@@ -2322,10 +2322,10 @@
 
     TRACE("('%s', '%s', mapper=%c);\n", drvRegName, drvFileName, bIsMapper ? 'Y' : 'N');
 
-    /* be sure that size of MMDrvs matches the max number of loadable drivers !! 
+    /* be sure that size of MMDrvs matches the max number of loadable drivers !!
      * if not just increase size of MMDrvs */
     assert(MMDrvsHi <= sizeof(MMDrvs)/sizeof(MMDrvs[0]));
-    
+
     for (i = 0; i < MMDrvsHi; i++) {
 	if (!strcmp(drvRegName, MMDrvs[i].drvname)) return FALSE;
     }
@@ -2336,7 +2336,7 @@
 	WARN("Couldn't open driver '%s'\n", drvFileName);
 	return FALSE;
     }
-    
+
     d = DRIVER_FindFromHDrvr(lpDrv->hDriver);
     lpDrv->bIs32 = (d->dwFlags & WINE_GDF_16BIT) ? FALSE : TRUE;
 
@@ -2365,20 +2365,20 @@
 
 	/*
 	 * DESCRIPTION 'wave,aux,mixer:Creative Labs Sound Blaster 16 Driver'
-	 * The beginning of the module description indicates the driver supports 
-	 * waveform, auxiliary, and mixer devices. Use one of the following 
+	 * The beginning of the module description indicates the driver supports
+	 * waveform, auxiliary, and mixer devices. Use one of the following
 	 * device-type names, followed by a colon (:) to indicate the type of
 	 * device your driver supports. If the driver supports more than one
-	 * type of device, separate each device-type name with a comma (,). 
-	 *	
-	 * wave for waveform audio devices 
+	 * type of device, separate each device-type name with a comma (,).
+	 *
+	 * wave for waveform audio devices
 	 * wavemapper for wave mappers
-	 * midi for MIDI audio devices 
+	 * midi for MIDI audio devices
 	 * midimapper for midi mappers
-	 * aux for auxiliary audio devices 
-	 * mixer for mixer devices 
+	 * aux for auxiliary audio devices
+	 * mixer for mixer devices
 	 */
-	
+
 	if (d->d.d16.hDriver16) {
 	    HMODULE16	hMod16 = GetDriverModuleHandle16(d->d.d16.hDriver16);
 
@@ -2422,7 +2422,7 @@
     MMDRV_InitPerType(lpDrv, MMDRV_MIDIOUT, 	MODM_GETNUMDEVS);
     MMDRV_InitPerType(lpDrv, MMDRV_WAVEIN, 	WIDM_GETNUMDEVS);
     MMDRV_InitPerType(lpDrv, MMDRV_WAVEOUT, 	WODM_GETNUMDEVS);
-    /* FIXME: if all those func calls return FALSE, 
+    /* FIXME: if all those func calls return FALSE,
      * then the driver must be unloaded
      */
 
diff --git a/dlls/winmm/mci.c b/dlls/winmm/mci.c
index 4dc2ab6..a44a7cd 100644
--- a/dlls/winmm/mci.c
+++ b/dlls/winmm/mci.c
@@ -73,7 +73,7 @@
 /**************************************************************************
  * 				MCI_GetDriver			[internal]
  */
-LPWINE_MCIDRIVER	MCI_GetDriver(UINT16 wDevID) 
+LPWINE_MCIDRIVER	MCI_GetDriver(UINT16 wDevID)
 {
     LPWINE_MCIDRIVER	wmd = 0;
     LPWINE_MM_IDATA	iData = MULTIMEDIA_GetIData();
@@ -98,10 +98,10 @@
 
     if (!lpstrName)
 	return 0;
-    
+
     if (!lstrcmpiA(lpstrName, "ALL"))
 	return MCI_ALL_DEVICE_ID;
-    
+
     EnterCriticalSection(&iData->cs);
     for (wmd = iData->lpMciDrvs; wmd; wmd = wmd->lpNext) {
 	if (wmd->lpstrElementName && strcmp(wmd->lpstrElementName, lpstrName) == 0) {
@@ -118,7 +118,7 @@
 	}
     }
     LeaveCriticalSection(&iData->cs);
-    
+
     return ret;
 }
 
@@ -128,9 +128,9 @@
 const char* MCI_MessageToString(UINT16 wMsg)
 {
     static char buffer[100];
-    
+
 #define CASE(s) case (s): return #s
-    
+
     switch (wMsg) {
 	CASE(MCI_BREAK);
 	CASE(MCI_CLOSE);
@@ -224,10 +224,10 @@
     int		idx = 0;
     BOOL	inCst = FALSE;
 
-    TRACE("Dumping cmdTbl=%d [hMem=%08x devType=%d]\n", 
+    TRACE("Dumping cmdTbl=%d [hMem=%08x devType=%d]\n",
 	  uTbl, S_MciCmdTable[uTbl].hMem, S_MciCmdTable[uTbl].uDevType);
 
-    if (uTbl >= MAX_MCICMDTABLE || !S_MciCmdTable[uTbl].hMem || !S_MciCmdTable[uTbl].lpTable) 
+    if (uTbl >= MAX_MCICMDTABLE || !S_MciCmdTable[uTbl].hMem || !S_MciCmdTable[uTbl].lpTable)
 	return FALSE;
 
     lmem = S_MciCmdTable[uTbl].lpTable;
@@ -267,7 +267,7 @@
     LPCSTR	str;
     DWORD	flg;
     WORD	eid;
-    
+
     if (!MCI_IsCommandTableValid(uTbl)) {
 	ERR("Ooops: %d is not valid\n", uTbl);
 	return FALSE;
@@ -298,11 +298,11 @@
     UINT	uTbl;
     char	buf[32];
     LPSTR	str = NULL;
-    
+
     /* first look up existing for existing devType */
     for (uTbl = 0; uTbl < MAX_MCICMDTABLE; uTbl++) {
 	if (S_MciCmdTable[uTbl].hMem && S_MciCmdTable[uTbl].uDevType == uDevType)
-	    return uTbl;	
+	    return uTbl;
     }
 
     /* well try to load id */
@@ -322,7 +322,7 @@
 	if (hMem) {
 	    uTbl = MCI_SetCommandTable(iData, hMem, uDevType);
 	} else {
-	    WARN("No command table found in resource %04x[%s]\n", 
+	    WARN("No command table found in resource %04x[%s]\n",
 		 iData->hWinMM32Instance, str);
 	}
     }
@@ -333,9 +333,9 @@
 /**************************************************************************
  * 				MCI_SetCommandTable		[internal]
  */
-static	UINT		MCI_SetCommandTable(LPWINE_MM_IDATA iData, HANDLE hMem, 
+static	UINT		MCI_SetCommandTable(LPWINE_MM_IDATA iData, HANDLE hMem,
 					    UINT uDevType)
-{    
+{
     int		        uTbl;
     static	BOOL	bInitDone = FALSE;
 
@@ -454,7 +454,7 @@
 static	BOOL	MCI_OpenMciDriver(LPWINE_MCIDRIVER wmd, LPCSTR drvTyp, LPARAM lp)
 {
     char	libName[128];
-    
+
     if (!DRIVER_GetLibName(drvTyp, "mci", libName, sizeof(libName)))
 	return FALSE;
 
@@ -487,19 +487,19 @@
 /**************************************************************************
  * 				MCI_LoadMciDriver		[internal]
  */
-static	DWORD	MCI_LoadMciDriver(LPWINE_MM_IDATA iData, LPCSTR _strDevTyp, 
+static	DWORD	MCI_LoadMciDriver(LPWINE_MM_IDATA iData, LPCSTR _strDevTyp,
 				  LPWINE_MCIDRIVER* lpwmd)
 {
     LPSTR			strDevTyp = str_dup_upper(_strDevTyp);
     LPWINE_MCIDRIVER		wmd = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*wmd));
     MCI_OPEN_DRIVER_PARMSA	modp;
     DWORD			dwRet = 0;
-    
+
     if (!wmd || !strDevTyp) {
 	dwRet = MCIERR_OUT_OF_MEMORY;
 	goto errCleanUp;
     }
- 
+
     wmd->lpfnYieldProc = MCI_DefYieldProc;
     wmd->dwYieldData = VK_CANCEL;
     wmd->hCreatorTask = GetCurrentTask();
@@ -511,8 +511,8 @@
     wmd->lpNext = iData->lpMciDrvs;
     iData->lpMciDrvs = wmd;
 
-    for (modp.wDeviceID = MCI_MAGIC; 
-	 MCI_GetDriver(modp.wDeviceID) != 0; 
+    for (modp.wDeviceID = MCI_MAGIC;
+	 MCI_GetDriver(modp.wDeviceID) != 0;
 	 modp.wDeviceID++);
 
     wmd->wDeviceID = modp.wDeviceID;
@@ -522,7 +522,7 @@
     TRACE("wDevID=%04X \n", modp.wDeviceID);
 
     modp.lpstrParams = NULL;
-    
+
     if (!MCI_OpenMciDriver(wmd, strDevTyp, (LPARAM)&modp)) {
 	/* silence warning if all is used... some bogus program use commands like
 	 * 'open all'...
@@ -538,7 +538,7 @@
 	}
 	goto errCleanUp;
     }
- 
+
     /* FIXME: should also check that module's description is of the form
      * MODULENAME:[MCI] comment
      */
@@ -547,13 +547,13 @@
     wmd->uSpecificCmdTable = LOWORD(modp.wCustomCommandTable);
     wmd->uTypeCmdTable = MCI_COMMAND_TABLE_NOT_LOADED;
 
-    TRACE("Loaded driver %x (%s), type is %d, cmdTable=%08x\n", 
+    TRACE("Loaded driver %x (%s), type is %d, cmdTable=%08x\n",
 	  wmd->hDriver, strDevTyp, modp.wType, modp.wCustomCommandTable);
-    
+
     wmd->lpstrDeviceType = strDevTyp;
     wmd->wType = modp.wType;
 
-    TRACE("mcidev=%d, uDevTyp=%04X wDeviceID=%04X !\n", 
+    TRACE("mcidev=%d, uDevTyp=%04X wDeviceID=%04X !\n",
 	  modp.wDeviceID, modp.wType, modp.wDeviceID);
     *lpwmd = wmd;
     return 0;
@@ -563,11 +563,11 @@
     *lpwmd = 0;
     return dwRet;
 }
-    
+
 /**************************************************************************
  * 			MCI_FinishOpen				[internal]
  */
-static	DWORD	MCI_FinishOpen(LPWINE_MCIDRIVER wmd, LPMCI_OPEN_PARMSA lpParms, 
+static	DWORD	MCI_FinishOpen(LPWINE_MCIDRIVER wmd, LPMCI_OPEN_PARMSA lpParms,
 			       DWORD dwParam)
 {
     if (dwParam & MCI_OPEN_ELEMENT)
@@ -582,7 +582,7 @@
     }
     lpParms->wDeviceID = wmd->wDeviceID;
 
-    return MCI_SendCommandFrom32(wmd->wDeviceID, MCI_OPEN_DRIVER, dwParam, 
+    return MCI_SendCommandFrom32(wmd->wDeviceID, MCI_OPEN_DRIVER, dwParam,
 				 (DWORD)lpParms);
 }
 
@@ -685,7 +685,7 @@
 /**************************************************************************
  * 				MCI_ParseOptArgs		[internal]
  */
-static	DWORD	MCI_ParseOptArgs(LPDWORD data, int _offset, LPCSTR lpCmd, 
+static	DWORD	MCI_ParseOptArgs(LPDWORD data, int _offset, LPCSTR lpCmd,
 				 LPSTR args, LPDWORD dwFlags)
 {
     int		len, offset;
@@ -703,7 +703,7 @@
 	/* skip any leading white space(s) */
 	while (*args == ' ') args++;
 	TRACE("args='%s' offset=%d\n", args, offset);
-	    
+
 	do { /* loop on options for command table for the requested verb */
 	    str = lmem;
 	    lmem += (len = strlen(lmem)) + 1;
@@ -711,20 +711,20 @@
 	    eid = *(LPWORD)(lmem + sizeof(DWORD));
 	    lmem += sizeof(DWORD) + sizeof(WORD);
 /* EPP 	    TRACE("\tcmd='%s' inCst=%c eid=%04x\n", str, inCst ? 'Y' : 'N', eid); */
-	    
+
 	    switch (eid) {
-	    case MCI_CONSTANT:		
+	    case MCI_CONSTANT:
 		inCst = TRUE;	cflg = flg;	break;
-	    case MCI_END_CONSTANT:	
+	    case MCI_END_CONSTANT:
 		/* there may be additional integral values after flag in constant */
 		if (inCst && MCI_GetDWord(&(data[offset]), &args)) {
 		    *dwFlags |= cflg;
 		}
-		inCst = FALSE;	cflg = 0;	
+		inCst = FALSE;	cflg = 0;
 		break;
 	    }
 
-	    if (strncasecmp(args, str, len) == 0 && 
+	    if (strncasecmp(args, str, len) == 0 &&
 		(args[len] == 0 || args[len] == ' ')) {
 		/* store good values into data[] */
 		args += len;
@@ -739,7 +739,7 @@
 		case MCI_CONSTANT: 	/* done above */
 		case MCI_END_CONSTANT:  /* done above */
 		    break;
-		case MCI_FLAG:			
+		case MCI_FLAG:
 		    *dwFlags |= flg;
 		    break;
 		case MCI_INTEGER:
@@ -754,7 +754,7 @@
 			}
 		    }
 		    break;
-		case MCI_RECT:			
+		case MCI_RECT:
 		    /* store rect in data (offset...offset+3) */
 		    *dwFlags |= flg;
 		    if (!MCI_GetDWord(&(data[offset+0]), &args) ||
@@ -784,7 +784,7 @@
 		case MCI_CONSTANT:
 		case MCI_FLAG:			break;
 		case MCI_INTEGER:		if (!inCst) offset++;	break;
-		case MCI_END_CONSTANT:		
+		case MCI_END_CONSTANT:
 		case MCI_STRING:		offset++; break;
 		case MCI_RECT:			offset += 4; break;
 		default:			ERR("oops\n");
@@ -806,47 +806,47 @@
 /**************************************************************************
  * 				MCI_HandleReturnValues	[internal]
  */
-static	DWORD	MCI_HandleReturnValues(LPWINE_MM_IDATA iData, DWORD dwRet, 
-				       LPWINE_MCIDRIVER wmd, LPCSTR lpCmd, LPDWORD data, 
+static	DWORD	MCI_HandleReturnValues(LPWINE_MM_IDATA iData, DWORD dwRet,
+				       LPWINE_MCIDRIVER wmd, LPCSTR lpCmd, LPDWORD data,
 				       LPSTR lpstrRet, UINT uRetLen)
 {
     if (lpstrRet) {
 	switch (MCI_GetReturnType(lpCmd)) {
 	case 0: /* nothing to return */
 	    break;
-	case MCI_INTEGER:	
+	case MCI_INTEGER:
 	    switch (dwRet & 0xFFFF0000ul) {
 	    case 0:
 	    case MCI_INTEGER_RETURNED:
 		snprintf(lpstrRet, uRetLen, "%ld", data[1]);
 		break;
 	    case MCI_RESOURCE_RETURNED:
-		/* return string which ID is HIWORD(data[1]), 
+		/* return string which ID is HIWORD(data[1]),
 		 * string is loaded from mmsystem.dll */
-		LoadStringA(iData->hWinMM32Instance, HIWORD(data[1]), 
+		LoadStringA(iData->hWinMM32Instance, HIWORD(data[1]),
 			    lpstrRet, uRetLen);
 		break;
 	    case MCI_RESOURCE_RETURNED|MCI_RESOURCE_DRIVER:
-		/* return string which ID is HIWORD(data[1]), 
+		/* return string which ID is HIWORD(data[1]),
 		 * string is loaded from driver */
 		/* FIXME: this is wrong for a 16 bit handle */
-		LoadStringA(GetDriverModuleHandle(wmd->hDriver), 
+		LoadStringA(GetDriverModuleHandle(wmd->hDriver),
 			    HIWORD(data[1]), lpstrRet, uRetLen);
 		break;
 	    case MCI_COLONIZED3_RETURN:
-		snprintf(lpstrRet, uRetLen, "%d:%d:%d", 
-			 LOBYTE(LOWORD(data[1])), HIBYTE(LOWORD(data[1])), 
+		snprintf(lpstrRet, uRetLen, "%d:%d:%d",
+			 LOBYTE(LOWORD(data[1])), HIBYTE(LOWORD(data[1])),
 			 LOBYTE(HIWORD(data[1])));
 		break;
 	    case MCI_COLONIZED4_RETURN:
-		snprintf(lpstrRet, uRetLen, "%d:%d:%d:%d", 
-			 LOBYTE(LOWORD(data[1])), HIBYTE(LOWORD(data[1])), 
+		snprintf(lpstrRet, uRetLen, "%d:%d:%d:%d",
+			 LOBYTE(LOWORD(data[1])), HIBYTE(LOWORD(data[1])),
 			 LOBYTE(HIWORD(data[1])), HIBYTE(HIWORD(data[1])));
 		break;
 	    default:	ERR("Ooops (%04X)\n", HIWORD(dwRet));
 	    }
 	    break;
-	case MCI_STRING:	
+	case MCI_STRING:
 	    switch (dwRet & 0xFFFF0000ul) {
 	    case 0:
 		/* nothing to do data[1] == lpstrRet */
@@ -860,11 +860,11 @@
 		break;
 	    }
 	    break;
-	case MCI_RECT:	
-	    if (dwRet & 0xFFFF0000ul)	
+	case MCI_RECT:
+	    if (dwRet & 0xFFFF0000ul)
 		WARN("Oooch. MCI_STRING and HIWORD(dwRet)=%04x\n", HIWORD(dwRet));
-	    snprintf(lpstrRet, uRetLen, "%ld %ld %ld %ld", 
-		       data[1], data[2], data[3], data[4]);	
+	    snprintf(lpstrRet, uRetLen, "%ld %ld %ld %ld",
+		       data[1], data[2], data[3], data[4]);
 	    break;
 	default:		ERR("oops\n");
 	}
@@ -875,7 +875,7 @@
 /**************************************************************************
  * 				mciSendStringA		[WINMM.@]
  */
-DWORD WINAPI mciSendStringA(LPCSTR lpstrCommand, LPSTR lpstrRet, 
+DWORD WINAPI mciSendStringA(LPCSTR lpstrCommand, LPSTR lpstrRet,
 			    UINT uRetLen, HWND hwndCallback)
 {
     LPSTR		verb, dev, args;
@@ -918,7 +918,7 @@
 	LPSTR	devType, tmp;
 
 	if ((devType = strchr(dev, '!')) != NULL) {
-	    *devType++ = '\0';	    
+	    *devType++ = '\0';
 	    tmp = devType; devType = dev; dev = tmp;
 
 	    dwFlags |= MCI_OPEN_TYPE;
@@ -974,10 +974,10 @@
 	/* auto open */
 	char	buf[128];
 	sprintf(buf, "open %s wait", dev);
-	
+
 	if ((dwRet = mciSendStringA(buf, NULL, 0, 0)) != 0)
 	    goto errCleanUp;
-	
+
 	wmd = MCI_GetDriver(mciGetDeviceIDA(dev));
 	if (!wmd) {
 	    /* FIXME: memory leak, MCI driver is not closed */
@@ -1038,7 +1038,7 @@
 
 #define	STR_OF(_x) (IsBadReadPtr((char*)_x,1)?"?":(char*)(_x))
     TRACE("[%d, %s, %08lx, %08lx/%s %08lx/%s %08lx/%s %08lx/%s %08lx/%s %08lx/%s]\n",
-	  wmd->wDeviceID, MCI_MessageToString(MCI_GetMessage(lpCmd)), dwFlags, 
+	  wmd->wDeviceID, MCI_MessageToString(MCI_GetMessage(lpCmd)), dwFlags,
 	  data[0], STR_OF(data[0]), data[1], STR_OF(data[1]),
 	  data[2], STR_OF(data[2]), data[3], STR_OF(data[3]),
 	  data[4], STR_OF(data[4]), data[5], STR_OF(data[5]));
@@ -1064,7 +1064,7 @@
 /**************************************************************************
  * 				mciSendStringW			[WINMM.@]
  */
-DWORD WINAPI mciSendStringW(LPCWSTR lpwstrCommand, LPSTR lpstrRet, 
+DWORD WINAPI mciSendStringW(LPCWSTR lpwstrCommand, LPSTR lpstrRet,
 			    UINT uRetLen, HWND hwndCallback)
 {
     LPSTR 	lpstrCommand;
@@ -1083,7 +1083,7 @@
 /**************************************************************************
  * 				mciSendString			[MMSYSTEM.702]
  */
-DWORD WINAPI mciSendString16(LPCSTR lpstrCommand, LPSTR lpstrRet, 
+DWORD WINAPI mciSendString16(LPCSTR lpstrCommand, LPSTR lpstrRet,
 			     UINT16 uRetLen, HWND16 hwndCallback)
 {
     return mciSendStringA(lpstrCommand, lpstrRet, uRetLen, hwndCallback);
@@ -1105,7 +1105,7 @@
 	if (!mciGetErrorStringA(ret, strRet, sizeof(strRet))) {
 	    sprintf(strRet, "Unknown MCI error (%ld)", ret);
 	}
-	MessageBoxA(0, strRet, "Error in mciExecute()", MB_OK); 
+	MessageBoxA(0, strRet, "Error in mciExecute()", MB_OK);
     }
     /* FIXME: what shall I return ? */
     return 0;
@@ -1156,7 +1156,7 @@
 
     return MCI_DeleteCommandTable(uTable);
 }
- 
+
 /**************************************************************************
  *                    	mciLoadCommandResource  		[WINMM.@]
  *
@@ -1232,8 +1232,8 @@
      */
     switch (wMsg) {
 	/* case MCI_CAPTURE */
-    case MCI_CLOSE:		
-    case MCI_CLOSE_DRIVER:	
+    case MCI_CLOSE:
+    case MCI_CLOSE_DRIVER:
     case MCI_CONFIGURE:
     case MCI_COPY:
     case MCI_CUE:
@@ -1245,20 +1245,20 @@
 	/* case MCI_MARK: */
 	/* case MCI_MONITOR: */
     case MCI_PASTE:
-    case MCI_PAUSE:		
-    case MCI_PLAY:		
+    case MCI_PAUSE:
+    case MCI_PLAY:
     case MCI_PUT:
     case MCI_REALIZE:
-    case MCI_RECORD:		
-    case MCI_RESUME:		
-    case MCI_SEEK:		
+    case MCI_RECORD:
+    case MCI_RESUME:
+    case MCI_SEEK:
     case MCI_SET:
 	/* case MCI_SETTIMECODE:*/
 	/* case MCI_SIGNAL:*/
     case MCI_SPIN:
     case MCI_STATUS:		/* FIXME: is wrong for digital video */
     case MCI_STEP:
-    case MCI_STOP:		
+    case MCI_STOP:
 	/* case MCI_UNDO: */
     case MCI_UNFREEZE:
     case MCI_UPDATE:
@@ -1266,8 +1266,8 @@
 	*lParam = (DWORD)MapSL(*lParam);
 	return MCI_MAP_OK;
     case MCI_WINDOW:
-	/* in fact, I would also need the dwFlags... to see 
-	 * which members of lParam are effectively used 
+	/* in fact, I would also need the dwFlags... to see
+	 * which members of lParam are effectively used
 	 */
 	*lParam = (DWORD)MapSL(*lParam);
 	FIXME("Current mapping may be wrong\n");
@@ -1306,7 +1306,7 @@
             LPMCI_INFO_PARMSA	mip32a = HeapAlloc(GetProcessHeap(), 0, sizeof(MCI_INFO_PARMSA));
 	    LPMCI_INFO_PARMS16	mip16  = MapSL(*lParam);
 
-	    /* FIXME this is wrong if device is of type 
+	    /* FIXME this is wrong if device is of type
 	     * MCI_DEVTYPE_DIGITAL_VIDEO, some members are not mapped
 	     */
 	    if (mip32a) {
@@ -1320,7 +1320,7 @@
 	}
 	return MCI_MAP_OKMEM;
     case MCI_OPEN:
-    case MCI_OPEN_DRIVER:	
+    case MCI_OPEN_DRIVER:
 	{
             LPMCI_OPEN_PARMSA	mop32a = HeapAlloc(GetProcessHeap(), 0, sizeof(LPMCI_OPEN_PARMS16) + sizeof(MCI_OPEN_PARMSA) + 2 * sizeof(DWORD));
 	    LPMCI_OPEN_PARMS16	mop16  = MapSL(*lParam);
@@ -1336,9 +1336,9 @@
 		/* copy extended information if any...
 		 * FIXME: this may seg fault if initial structure does not contain them and
 		 * the reads after msip16 fail under LDT limits...
-		 * NOTE: this should be split in two. First pass, while calling MCI_OPEN, and 
+		 * NOTE: this should be split in two. First pass, while calling MCI_OPEN, and
 		 * should not take care of extended parameters, and should be used by MCI_Open
-		 * to fetch uDevType. When, this is known, the mapping for sending the 
+		 * to fetch uDevType. When, this is known, the mapping for sending the
 		 * MCI_OPEN_DRIVER shall be done depending on uDevType.
 		 */
 		memcpy(mop32a + 1, mop16 + 1, 2 * sizeof(DWORD));
@@ -1395,7 +1395,7 @@
     switch (wMsg) {
 	/* case MCI_CAPTURE */
     case MCI_CLOSE:
-    case MCI_CLOSE_DRIVER:	
+    case MCI_CLOSE_DRIVER:
     case MCI_CONFIGURE:
     case MCI_COPY:
     case MCI_CUE:
@@ -1407,20 +1407,20 @@
 	/* case MCI_MARK: */
 	/* case MCI_MONITOR: */
     case MCI_PASTE:
-    case MCI_PAUSE:		
-    case MCI_PLAY:		
+    case MCI_PAUSE:
+    case MCI_PLAY:
     case MCI_PUT:
     case MCI_REALIZE:
-    case MCI_RECORD:		
-    case MCI_RESUME:		
-    case MCI_SEEK:		
+    case MCI_RECORD:
+    case MCI_RESUME:
+    case MCI_SEEK:
     case MCI_SET:
 	/* case MCI_SETTIMECODE:*/
 	/* case MCI_SIGNAL:*/
     case MCI_SPIN:
-    case MCI_STATUS:		
+    case MCI_STATUS:
     case MCI_STEP:
-    case MCI_STOP:		
+    case MCI_STOP:
 	/* case MCI_UNDO: */
     case MCI_UNFREEZE:
     case MCI_UPDATE:
@@ -1438,11 +1438,11 @@
 	HeapFree(GetProcessHeap(), 0, (LPVOID)lParam);
 	return MCI_MAP_OK;
     case MCI_OPEN:
-    case MCI_OPEN_DRIVER:	
+    case MCI_OPEN_DRIVER:
 	if (lParam) {
             LPMCI_OPEN_PARMSA	mop32a = (LPMCI_OPEN_PARMSA)lParam;
 	    LPMCI_OPEN_PARMS16	mop16  = *(LPMCI_OPEN_PARMS16*)((char*)mop32a - sizeof(LPMCI_OPEN_PARMS16));
-	    
+
 	    mop16->wDeviceID = mop32a->wDeviceID;
 	    if (!HeapFree(GetProcessHeap(), 0, (LPVOID)(lParam - sizeof(LPMCI_OPEN_PARMS16))))
 		FIXME("bad free line=%d\n", __LINE__);
@@ -1474,7 +1474,7 @@
  * 0001 squeeze   signed 4 bytes to 2 bytes     *( LPINT16)D = ( INT16)*( LPINT16)S; D += 2;     S += 4
  * 0010 squeeze unsigned 4 bytes to 2 bytes     *(LPUINT16)D = (UINT16)*(LPUINT16)S; D += 2;     S += 4
  * 0100
- * 0101 
+ * 0101
  * 0110 zero 4 bytes                            *(DWORD)D = 0                        D += 4;     S += 4
  * 0111 copy string                             *(LPSTR*)D = seg dup(*(LPSTR*)S)     D += 4;     S += 4
  * 1xxx copy xxx + 1 bytes                      memcpy(D, S, xxx + 1);               D += xxx+1; S += xxx+1
@@ -1483,8 +1483,8 @@
 /**************************************************************************
  * 			MCI_MsgMapper32To16_Create		[internal]
  *
- * Helper for MCI_MapMsg32ATo16. 
- * Maps the 32 bit pointer (*ptr), of size bytes, to an allocated 16 bit 
+ * Helper for MCI_MapMsg32ATo16.
+ * Maps the 32 bit pointer (*ptr), of size bytes, to an allocated 16 bit
  * segmented pointer.
  * map contains a list of action to be performed for the mapping (see list
  * above)
@@ -1507,7 +1507,7 @@
 	p16 = lp;
 	*ptr = (void*)MapLS(lp);
     }
-    
+
     if (map == 0) {
 	memcpy(p16, p32, size16);
     } else {
@@ -1563,7 +1563,7 @@
 /**************************************************************************
  * 			MCI_MsgMapper32To16_Destroy		[internal]
  *
- * Helper for MCI_UnMapMsg32ATo16. 
+ * Helper for MCI_UnMapMsg32ATo16.
  */
 static	MCI_MapType	MCI_MsgMapper32To16_Destroy(void* ptr, int size16, DWORD map, BOOLEAN kept)
 {
@@ -1656,9 +1656,9 @@
 	break;
 	/* case MCI_CAPTURE */
     case MCI_CLOSE:
-    case MCI_CLOSE_DRIVER:	
+    case MCI_CLOSE_DRIVER:
     case MCI_CONFIGURE:
-	size = sizeof(MCI_GENERIC_PARMS);	
+	size = sizeof(MCI_GENERIC_PARMS);
 	break;
 	/* case MCI_COPY: */
     case MCI_CUE:
@@ -1693,7 +1693,7 @@
 	{
             LPMCI_INFO_PARMSA	mip32a = (LPMCI_INFO_PARMSA)(*lParam);
 	    LPMCI_INFO_PARMS16	mip16;
-	    
+
 	    switch (uDevType) {
 	    case MCI_DEVTYPE_DIGITAL_VIDEO:	size = sizeof(MCI_DGV_INFO_PARMS16);	break;
 	    default:				size = sizeof(MCI_INFO_PARMS16);	break;
@@ -1716,7 +1716,7 @@
 	/* case MCI_MARK: */
 	/* case MCI_MONITOR: */
     case MCI_OPEN:
-    case MCI_OPEN_DRIVER:	
+    case MCI_OPEN_DRIVER:
 	{
             LPMCI_OPEN_PARMSA	mop32a = (LPMCI_OPEN_PARMSA)(*lParam);
             char* ptr = HeapAlloc( GetProcessHeap(), 0,
@@ -1758,9 +1758,9 @@
 		/* copy extended information if any...
 		 * FIXME: this may seg fault if initial structure does not contain them and
 		 * the reads after msip16 fail under LDT limits...
-		 * NOTE: this should be split in two. First pass, while calling MCI_OPEN, and 
+		 * NOTE: this should be split in two. First pass, while calling MCI_OPEN, and
 		 * should not take care of extended parameters, and should be used by MCI_Open
-		 * to fetch uDevType. When, this is known, the mapping for sending the 
+		 * to fetch uDevType. When, this is known, the mapping for sending the
 		 * MCI_OPEN_DRIVER shall be done depending on uDevType.
 		 */
 		memcpy(mop16 + 1, mop32a + 1, 2 * sizeof(DWORD));
@@ -1794,7 +1794,7 @@
 	default:			size = sizeof(MCI_RECORD_PARMS);	break;
 	}
 	break;
-    case MCI_RESUME:		
+    case MCI_RESUME:
 	size = sizeof(MCI_GENERIC_PARMS);
 	break;
     case MCI_SEEK:
@@ -1808,13 +1808,13 @@
 	case MCI_DEVTYPE_DIGITAL_VIDEO:	size = sizeof(MCI_DGV_SET_PARMS);	break;
 	case MCI_DEVTYPE_VCR:		/*size = sizeof(MCI_VCR_SET_PARMS);	break;*/FIXME("NIY vcr\n");	return MCI_MAP_NOMEM;
 	case MCI_DEVTYPE_SEQUENCER:	size = sizeof(MCI_SEQ_SET_PARMS);	break;
-        /* FIXME: normally the 16 and 32 bit structures are byte by byte aligned, 
+        /* FIXME: normally the 16 and 32 bit structures are byte by byte aligned,
 	 * so not doing anything should work...
 	 */
 	case MCI_DEVTYPE_WAVEFORM_AUDIO:size = sizeof(MCI_WAVE_SET_PARMS);	break;
 	default:			size = sizeof(MCI_SET_PARMS);		break;
 	}
-	break;	
+	break;
     case MCI_SETAUDIO:
 	switch (uDevType) {
 	case MCI_DEVTYPE_DIGITAL_VIDEO:	size = sizeof(MCI_DGV_SETAUDIO_PARMS16);map = 0x0000077FF;	break;
@@ -1825,13 +1825,13 @@
 	/* case MCI_SETTIMECODE:*/
 	/* case MCI_SIGNAL:*/
     case MCI_SPIN:
-	size = sizeof(MCI_SET_PARMS);		
+	size = sizeof(MCI_SET_PARMS);
 	break;
     case MCI_STATUS:
 	keep = TRUE;
 	switch (uDevType) {
 	/* FIXME:
-	 * don't know if buffer for value is the one passed through lpstrDevice 
+	 * don't know if buffer for value is the one passed through lpstrDevice
 	 * or is provided by MCI driver.
 	 * Assuming solution 2: provided by MCI driver, so zeroing on entry
 	 */
@@ -1847,9 +1847,9 @@
 	case MCI_DEVTYPE_VIDEODISC:	size = sizeof(MCI_VD_STEP_PARMS);	break;
 	default:			size = sizeof(MCI_GENERIC_PARMS);	break;
 	}
-	break;	
-    case MCI_STOP:		
-	size = sizeof(MCI_SET_PARMS);		
+	break;
+    case MCI_STOP:
+	size = sizeof(MCI_SET_PARMS);
 	break;
     case MCI_SYSINFO:
 	{
@@ -1954,12 +1954,12 @@
     case MCI_BREAK:
         break;
 	/* case MCI_CAPTURE */
-    case MCI_CLOSE:	
-    case MCI_CLOSE_DRIVER:	
+    case MCI_CLOSE:
+    case MCI_CLOSE_DRIVER:
     case MCI_CONFIGURE:
 	break;
 	/* case MCI_COPY: */
-    case MCI_CUE:	
+    case MCI_CUE:
 	break;
 	/* case MCI_CUT: */
     case MCI_DELETE:
@@ -1983,7 +1983,7 @@
 	/* case MCI_MARK: */
 	/* case MCI_MONITOR: */
     case MCI_OPEN:
-    case MCI_OPEN_DRIVER:	
+    case MCI_OPEN_DRIVER:
 	if (lParam) {
             LPMCI_OPEN_PARMS16	mop16  = (LPMCI_OPEN_PARMS16)MapSL(lParam);
 	    LPMCI_OPEN_PARMSA	mop32a = *(LPMCI_OPEN_PARMSA*)((char*)mop16 - sizeof(LPMCI_OPEN_PARMSA));
@@ -2001,7 +2001,7 @@
 	/* case MCI_PASTE:*/
     case MCI_PAUSE:
 	break;
-    case MCI_PLAY:		
+    case MCI_PLAY:
 	break;
     case MCI_PUT:
 	break;
@@ -2028,7 +2028,7 @@
     case MCI_STATUS:
 	kept = TRUE;
 	switch (uDevType) {
-	case MCI_DEVTYPE_DIGITAL_VIDEO:	
+	case MCI_DEVTYPE_DIGITAL_VIDEO:
 	if (lParam) {
             LPMCI_DGV_STATUS_PARMS16	mdsp16  = (LPMCI_DGV_STATUS_PARMS16)MapSL(lParam);
 	    LPMCI_DGV_STATUS_PARMSA	mdsp32a = *(LPMCI_DGV_STATUS_PARMSA*)((char*)mdsp16 - sizeof(LPMCI_DGV_STATUS_PARMSA));
@@ -2137,7 +2137,7 @@
 	    dwRet = SendDriverMessage(wmd->hDriver, wMsg, dwParam1, dwParam2);
 	} else {
 	    MCI_MapType	res;
-		
+
 	    switch (res = MCI_MapMsg32ATo16(wmd->wType, wMsg, dwParam1, &dwParam2)) {
 	    case MCI_MAP_MSGERROR:
 		TRACE("Not handled yet (%s)\n", MCI_MessageToString(wMsg));
@@ -2172,7 +2172,7 @@
 
 	if (wmd->bIs32) {
 	    MCI_MapType		res;
-	    
+
 	    switch (res = MCI_MapMsg16To32A(wmd->wType, wMsg, &dwParam2)) {
 	    case MCI_MAP_MSGERROR:
 		TRACE("Not handled yet (%s)\n", MCI_MessageToString(wMsg));
@@ -2202,7 +2202,7 @@
 static	DWORD MCI_Open(DWORD dwParam, LPMCI_OPEN_PARMSA lpParms)
 {
     char			strDevTyp[128];
-    DWORD 			dwRet; 
+    DWORD 			dwRet;
     LPWINE_MCIDRIVER		wmd = NULL;
     LPWINE_MM_IDATA		iData = MULTIMEDIA_GetIData();
 
@@ -2254,7 +2254,7 @@
 		/* FIXME: not a good idea to write in user supplied buffer */
 		lpParms->lpstrElementName = ptr;
 	    }
-		
+
 	}
 	TRACE("devType='%s' !\n", strDevTyp);
     }
@@ -2274,8 +2274,8 @@
 	}
 
 	/* type, if given as a parameter, supersedes file extension */
-	if (!strDevTyp[0] && 
-	    MCI_GetDevTypeFromFileName(lpParms->lpstrElementName, 
+	if (!strDevTyp[0] &&
+	    MCI_GetDevTypeFromFileName(lpParms->lpstrElementName,
 				       strDevTyp, sizeof(strDevTyp))) {
 	    if (GetDriveTypeA(lpParms->lpstrElementName) != DRIVE_CDROM) {
 		dwRet = MCIERR_EXTENSION_NOT_FOUND;
@@ -2285,7 +2285,7 @@
 	    strcpy(strDevTyp, "CDAUDIO");
 	}
     }
-    
+
     if (strDevTyp[0] == 0) {
 	FIXME("Couldn't load driver\n");
 	dwRet = MCIERR_INVALID_DEVICE_NAME;
@@ -2315,7 +2315,7 @@
 
     if (dwParam & MCI_NOTIFY)
 	mciDriverNotify16(lpParms->dwCallback, wmd->wDeviceID, MCI_NOTIFY_SUCCESSFUL);
-    
+
     return 0;
 errCleanUp:
     if (wmd) MCI_UnLoadMciDriver(iData, wmd);
@@ -2340,7 +2340,7 @@
 	LPWINE_MCIDRIVER	next;
 
 	EnterCriticalSection(&iData->cs);
-	/* FIXME: shall I notify once after all is done, or for 
+	/* FIXME: shall I notify once after all is done, or for
 	 * each of the open drivers ? if the latest, which notif
 	 * to return when only one fails ?
 	 */
@@ -2348,7 +2348,7 @@
 	    next = wmd->lpNext;
 	    MCI_Close(wmd->wDeviceID, dwParam, lpParms);
 	    wmd = next;
-	}	
+	}
 	LeaveCriticalSection(&iData->cs);
 	return 0;
     }
@@ -2364,7 +2364,7 @@
     if (dwParam & MCI_NOTIFY)
 	mciDriverNotify16(lpParms->dwCallback, wDevID,
 			  (dwRet == 0) ? MCI_NOTIFY_SUCCESSFUL : MCI_NOTIFY_FAILURE);
-    
+
     return dwRet;
 }
 
@@ -2381,7 +2381,7 @@
 	    ret = MCIERR_PARAM_OVERFLOW;
 	} else {
 	    strcpy(lpDstStr, lpSrcStr);
-	}	
+	}
     } else {
 	*lpDstStr = 0;
     }
@@ -2399,15 +2399,15 @@
 
     if (lpParms == NULL)			return MCIERR_NULL_PARAMETER_BLOCK;
 
-    TRACE("(%08x, %08lX, %08lX[num=%ld, wDevTyp=%u])\n", 
+    TRACE("(%08x, %08lX, %08lX[num=%ld, wDevTyp=%u])\n",
 	  uDevID, dwFlags, (DWORD)lpParms, lpParms->dwNumber, lpParms->wDeviceType);
-    
+
     switch (dwFlags & ~MCI_SYSINFO_OPEN) {
     case MCI_SYSINFO_QUANTITY:
 	{
 	    DWORD	cnt = 0;
-	    
-	    if (lpParms->wDeviceType < MCI_DEVTYPE_FIRST || 
+
+	    if (lpParms->wDeviceType < MCI_DEVTYPE_FIRST ||
 		lpParms->wDeviceType > MCI_DEVTYPE_LAST) {
 		if (dwFlags & MCI_SYSINFO_OPEN) {
 		    TRACE("MCI_SYSINFO_QUANTITY: # of open MCI drivers\n");
@@ -2422,7 +2422,7 @@
 		}
 	    } else {
 		if (dwFlags & MCI_SYSINFO_OPEN) {
-		    TRACE("MCI_SYSINFO_QUANTITY: # of open MCI drivers of type %u\n", 
+		    TRACE("MCI_SYSINFO_QUANTITY: # of open MCI drivers of type %u\n",
 			  lpParms->wDeviceType);
 		    EnterCriticalSection(&iData->cs);
 		    for (wmd = iData->lpMciDrvs; wmd; wmd = wmd->lpNext) {
@@ -2431,7 +2431,7 @@
 		    }
 		    LeaveCriticalSection(&iData->cs);
 		} else {
-		    TRACE("MCI_SYSINFO_QUANTITY: # of installed MCI drivers of type %u\n", 
+		    TRACE("MCI_SYSINFO_QUANTITY: # of installed MCI drivers of type %u\n",
 			  lpParms->wDeviceType);
 		    FIXME("Don't know how to get # of MCI devices of a given type\n");
 		    cnt = 1;
@@ -2445,7 +2445,7 @@
     case MCI_SYSINFO_INSTALLNAME:
 	TRACE("MCI_SYSINFO_INSTALLNAME \n");
 	if ((wmd = MCI_GetDriver(uDevID))) {
-	    ret = MCI_WriteString(lpParms->lpstrReturn, lpParms->dwRetSize, 
+	    ret = MCI_WriteString(lpParms->lpstrReturn, lpParms->dwRetSize,
 				  wmd->lpstrDeviceType);
 	} else {
 	    *lpParms->lpstrReturn = 0;
@@ -2482,7 +2482,7 @@
 static	DWORD MCI_Break(UINT wDevID, DWORD dwFlags, LPMCI_BREAK_PARMS lpParms)
 {
     DWORD	dwRet = 0;
-    
+
     if (lpParms == NULL)	return MCIERR_NULL_PARAMETER_BLOCK;
 
     if (dwFlags & MCI_NOTIFY)
@@ -2491,11 +2491,11 @@
 
     return dwRet;
 }
-    
+
 /**************************************************************************
  * 			MCI_SendCommand				[internal]
  */
-DWORD	MCI_SendCommand(UINT wDevID, UINT16 wMsg, DWORD dwParam1, 
+DWORD	MCI_SendCommand(UINT wDevID, UINT16 wMsg, DWORD dwParam1,
 			DWORD dwParam2, BOOL bFrom32)
 {
     DWORD		dwRet = MCIERR_UNRECOGNIZED_COMMAND;
@@ -2570,7 +2570,7 @@
 	    dwRet = (bFrom32) ?
 		MCI_SendCommandFrom32(wDevID, wMsg, dwParam1, dwParam2) :
 		MCI_SendCommandFrom16(wDevID, wMsg, dwParam1, dwParam2);
-	}	    
+	}
 	break;
     }
     return dwRet;
@@ -2579,13 +2579,13 @@
 /**************************************************************************
  * 				MCI_CleanUp			[internal]
  *
- * Some MCI commands need to be cleaned-up (when not called from 
+ * Some MCI commands need to be cleaned-up (when not called from
  * mciSendString), because MCI drivers return extra information for string
  * transformation. This function gets rid of them.
  */
 LRESULT		MCI_CleanUp(LRESULT dwRet, UINT wMsg, DWORD dwParam2, BOOL bIs32)
 {
-    if (LOWORD(dwRet)) 
+    if (LOWORD(dwRet))
 	return LOWORD(dwRet);
 
     switch (wMsg) {
@@ -2605,10 +2605,10 @@
 		lmgp = (LPMCI_GETDEVCAPS_PARMS)(bIs32 ? (void*)dwParam2 : MapSL(dwParam2));
 		TRACE("Changing %08lx to %08lx\n", lmgp->dwReturn, (DWORD)LOWORD(lmgp->dwReturn));
 		lmgp->dwReturn = LOWORD(lmgp->dwReturn);
-	    } 
+	    }
 	    break;
 	default:
-	    FIXME("Unsupported value for hiword (%04x) returned by DriverProc(%s)\n", 
+	    FIXME("Unsupported value for hiword (%04x) returned by DriverProc(%s)\n",
 		  HIWORD(dwRet), MCI_MessageToString(wMsg));
 	}
 	break;
@@ -2631,7 +2631,7 @@
 	    }
 	    break;
 	default:
-	    FIXME("Unsupported value for hiword (%04x) returned by DriverProc(%s)\n", 
+	    FIXME("Unsupported value for hiword (%04x) returned by DriverProc(%s)\n",
 		  HIWORD(dwRet), MCI_MessageToString(wMsg));
 	}
 	break;
@@ -2642,12 +2642,12 @@
 	    /* nothing to do */
 	    break;
 	default:
-	    FIXME("Unsupported value for hiword (%04x)\n", HIWORD(dwRet));	
+	    FIXME("Unsupported value for hiword (%04x)\n", HIWORD(dwRet));
 	}
 	break;
     default:
 	if (HIWORD(dwRet)) {
-	    FIXME("Got non null hiword for dwRet=0x%08lx for command %s\n", 
+	    FIXME("Got non null hiword for dwRet=0x%08lx for command %s\n",
 		  dwRet, MCI_MessageToString(wMsg));
 	}
 	break;
@@ -2681,7 +2681,7 @@
 	!(err = RegOpenKeyA(hWineConf, "options", &hkey))) {
 	err = RegQueryValueExA(hkey, "mci", 0, &type, MCI_lpInstallNames, &count);
 	RegCloseKey(hkey);
-	
+
     }
     if (!err) {
 	TRACE("Wine => '%s' \n", ptr1);
diff --git a/dlls/winmm/mcianim/mcianim.c b/dlls/winmm/mcianim/mcianim.c
index 39a4192..ea4f939 100644
--- a/dlls/winmm/mcianim/mcianim.c
+++ b/dlls/winmm/mcianim/mcianim.c
@@ -53,7 +53,7 @@
 /*-----------------------------------------------------------------------*/
 
 /**************************************************************************
- * 				MCIANIM_drvOpen			[internal]	
+ * 				MCIANIM_drvOpen			[internal]
  */
 static	DWORD	MCIANIM_drvOpen(LPSTR str, LPMCI_OPEN_DRIVER_PARMSA modp)
 {
@@ -74,7 +74,7 @@
 }
 
 /**************************************************************************
- * 				MCIANIM_drvClose		[internal]	
+ * 				MCIANIM_drvClose		[internal]
  */
 static	DWORD	MCIANIM_drvClose(DWORD dwDevID)
 {
@@ -88,12 +88,12 @@
 }
 
 /**************************************************************************
- * 				MCIANIM_mciGetOpenDrv		[internal]	
+ * 				MCIANIM_mciGetOpenDrv		[internal]
  */
 static WINE_MCIANIM*  MCIANIM_mciGetOpenDrv(UINT16 wDevID)
 {
     WINE_MCIANIM*	wma = (WINE_MCIANIM*)mciGetDriverData(wDevID);
-    
+
     if (wma == NULL || wma->nUseCount == 0) {
 	WARN("Invalid wDevID=%u\n", wDevID);
 	return 0;
@@ -108,12 +108,12 @@
 {
     DWORD		dwDeviceID;
     WINE_MCIANIM*	wma = (WINE_MCIANIM*)mciGetDriverData(wDevID);
-    
+
     TRACE("(%04X, %08lX, %p);\n", wDevID, dwFlags, lpOpenParms);
-    
+
     if (lpOpenParms == NULL) 	return MCIERR_INTERNAL;
     if (wma == NULL)		return MCIERR_INVALID_DEVICE_ID;
-    
+
     if (wma->nUseCount > 0) {
 	/* The driver already open on this channel */
 	/* If the driver was opened shareable before and this open specifies */
@@ -126,13 +126,13 @@
 	wma->nUseCount = 1;
 	wma->fShareable = dwFlags & MCI_OPEN_SHAREABLE;
     }
-    
+
     dwDeviceID = lpOpenParms->wDeviceID;
-    
+
     TRACE("wDevID=%04X\n", wDevID);
     /* FIXME this is not consistent with other implementations */
     lpOpenParms->wDeviceID = wDevID;
-    
+
     /*TRACE("lpParms->wDevID=%04X\n", lpParms->wDeviceID);*/
     if (dwFlags & MCI_OPEN_ELEMENT) {
 	TRACE("MCI_OPEN_ELEMENT '%s' !\n", lpOpenParms->lpstrElementName);
@@ -150,12 +150,12 @@
     wma->lpdwTrackLen = NULL;
     wma->lpdwTrackPos = NULL;
     /*
-      Moved to mmsystem.c mciOpen routine 
-      
+      Moved to mmsystem.c mciOpen routine
+
       if (dwFlags & MCI_NOTIFY) {
-      TRACE("MCI_NOTIFY_SUCCESSFUL %08lX !\n", 
+      TRACE("MCI_NOTIFY_SUCCESSFUL %08lX !\n",
       lpParms->dwCallback);
-      mciDriverNotify((HWND16)LOWORD(lpParms->dwCallback), 
+      mciDriverNotify((HWND16)LOWORD(lpParms->dwCallback),
       wma->wNotifyDeviceID, MCI_NOTIFY_SUCCESSFUL);
       }
     */
@@ -168,11 +168,11 @@
 static DWORD MCIANIM_mciClose(UINT16 wDevID, DWORD dwParam, LPMCI_GENERIC_PARMS lpParms)
 {
     WINE_MCIANIM*	wma = MCIANIM_mciGetOpenDrv(wDevID);
-    
+
     TRACE("(%u, %08lX, %p);\n", wDevID, dwParam, lpParms);
-    
+
     if (wma == NULL)	 return MCIERR_INVALID_DEVICE_ID;
-    
+
     if (--wma->nUseCount == 0) {
 	/* do the actual clean-up */
     }
@@ -182,17 +182,17 @@
 /**************************************************************************
  * 				MCIANIM_mciGetDevCaps	[internal]
  */
-static DWORD MCIANIM_mciGetDevCaps(UINT16 wDevID, DWORD dwFlags, 
+static DWORD MCIANIM_mciGetDevCaps(UINT16 wDevID, DWORD dwFlags,
 				LPMCI_GETDEVCAPS_PARMS lpParms)
 {
     WINE_MCIANIM*	wma = MCIANIM_mciGetOpenDrv(wDevID);
     DWORD		ret;
 
     TRACE("(%u, %08lX, %p);\n", wDevID, dwFlags, lpParms);
-    
+
     if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK;
     if (wma == NULL)	 return MCIERR_INVALID_DEVICE_ID;
-    
+
     if (dwFlags & MCI_GETDEVCAPS_ITEM) {
 	TRACE("MCI_GETDEVCAPS_ITEM dwItem=%08lX;\n", lpParms->dwItem);
 
@@ -256,9 +256,9 @@
     UINT16	wMinutes;
     UINT16	wSeconds;
     UINT16	wFrames;
-    
+
     TRACE("(%p, %08lX, %lu);\n", wma, dwFormatType, dwFrame);
-    
+
     switch (dwFormatType) {
     case MCI_FORMAT_MILLISECONDS:
 	dwTime = dwFrame / ANIMFRAMES_PERSEC * 1000;
@@ -268,7 +268,7 @@
     case MCI_FORMAT_MSF:
 	wMinutes = dwFrame / ANIMFRAMES_PERMIN;
 	wSeconds = (dwFrame - ANIMFRAMES_PERMIN * wMinutes) / ANIMFRAMES_PERSEC;
-	wFrames = dwFrame - ANIMFRAMES_PERMIN * wMinutes - 
+	wFrames = dwFrame - ANIMFRAMES_PERMIN * wMinutes -
 	    ANIMFRAMES_PERSEC * wSeconds;
 	dwTime = MCI_MAKE_MSF(wMinutes, wSeconds, wFrames);
 	TRACE("MSF %02u:%02u:%02u -> dwTime=%lu\n",wMinutes, wSeconds, wFrames, dwTime);
@@ -286,7 +286,7 @@
 	}
 	wMinutes = dwFrame / ANIMFRAMES_PERMIN;
 	wSeconds = (dwFrame - ANIMFRAMES_PERMIN * wMinutes) / ANIMFRAMES_PERSEC;
-	wFrames = dwFrame - ANIMFRAMES_PERMIN * wMinutes - 
+	wFrames = dwFrame - ANIMFRAMES_PERMIN * wMinutes -
 	    ANIMFRAMES_PERSEC * wSeconds;
 	dwTime = MCI_MAKE_TMSF(wTrack, wMinutes, wSeconds, wFrames);
 	*lpRet = MCI_COLONIZED4_RETURN;
@@ -304,9 +304,9 @@
 {
     DWORD	dwFrame = 0;
     UINT16	wTrack;
-    
+
     TRACE("(%p, %08lX, %lu);\n", wma, dwFormatType, dwTime);
-    
+
     switch (dwFormatType) {
     case MCI_FORMAT_MILLISECONDS:
 	dwFrame = dwTime * ANIMFRAMES_PERSEC / 1000;
@@ -314,7 +314,7 @@
 	break;
     case MCI_FORMAT_MSF:
 	TRACE("MSF %02u:%02u:%02u\n",
-	      MCI_MSF_MINUTE(dwTime), MCI_MSF_SECOND(dwTime), 
+	      MCI_MSF_MINUTE(dwTime), MCI_MSF_SECOND(dwTime),
 	      MCI_MSF_FRAME(dwTime));
 	dwFrame += ANIMFRAMES_PERMIN * MCI_MSF_MINUTE(dwTime);
 	dwFrame += ANIMFRAMES_PERSEC * MCI_MSF_SECOND(dwTime);
@@ -326,7 +326,7 @@
     case MCI_FORMAT_TMSF:
 	wTrack = MCI_TMSF_TRACK(dwTime);
 	TRACE("TMSF %02u-%02u:%02u:%02u\n",
-	      MCI_TMSF_TRACK(dwTime), MCI_TMSF_MINUTE(dwTime), 
+	      MCI_TMSF_TRACK(dwTime), MCI_TMSF_MINUTE(dwTime),
 	      MCI_TMSF_SECOND(dwTime), MCI_TMSF_FRAME(dwTime));
 	TRACE("TMSF trackpos[%u]=%lu\n",
 	      wTrack, wma->lpdwTrackPos[wTrack - 1]);
@@ -347,17 +347,17 @@
     WINE_MCIANIM*	wma = MCIANIM_mciGetOpenDrv(wDevID);
     LPSTR		str = 0;
     DWORD		ret = 0;
-    
+
     TRACE("(%u, %08lX, %p);\n", wDevID, dwFlags, lpParms);
-    
+
     if (lpParms == NULL || lpParms->lpstrReturn == NULL)
 	return MCIERR_NULL_PARAMETER_BLOCK;
 
     if (wma == NULL)
 	return MCIERR_INVALID_DEVICE_ID;
-    
+
     TRACE("buf=%p, len=%lu\n", lpParms->lpstrReturn, lpParms->dwRetSize);
-    
+
     switch(dwFlags) {
     case MCI_INFO_PRODUCT:
 	str = "Wine's animation";
@@ -379,7 +379,7 @@
 	    ret = MCIERR_PARAM_OVERFLOW;
 	} else {
 	    strcpy(lpParms->lpstrReturn, str);
-	}	
+	}
     } else {
 	*lpParms->lpstrReturn = 0;
     }
@@ -395,10 +395,10 @@
     DWORD		ret;
 
     TRACE("(%u, %08lX, %p);\n", wDevID, dwFlags, lpParms);
-    
+
     if (lpParms == NULL) return MCIERR_INTERNAL;
     if (wma == NULL) return MCIERR_INVALID_DEVICE_ID;
-    
+
     if (dwFlags & MCI_NOTIFY) {
 	TRACE("MCI_NOTIFY_SUCCESSFUL %08lX !\n", lpParms->dwCallback);
 
@@ -482,16 +482,16 @@
 {
     WINE_MCIANIM*	wma = MCIANIM_mciGetOpenDrv(wDevID);
     int 	start, end;
-    
+
     TRACE("(%u, %08lX, %p);\n", wDevID, dwFlags, lpParms);
-    
+
     if (lpParms == NULL) return MCIERR_INTERNAL;
     if (wma == NULL) return MCIERR_INVALID_DEVICE_ID;
-    
+
     start = 0; 		end = wma->dwTotalLen;
     wma->nCurTrack = 1;
     if (dwFlags & MCI_FROM) {
-	start = MCIANIM_CalcFrame(wma, wma->dwTimeFormat, lpParms->dwFrom); 
+	start = MCIANIM_CalcFrame(wma, wma->dwTimeFormat, lpParms->dwFrom);
         TRACE("MCI_FROM=%08lX -> %u \n", lpParms->dwFrom, start);
     }
     if (dwFlags & MCI_TO) {
@@ -500,7 +500,7 @@
     }
     wma->mode = MCI_MODE_PLAY;
     if (dwFlags & MCI_NOTIFY) {
-	TRACE("MCI_NOTIFY_SUCCESSFUL %08lX !\n", 
+	TRACE("MCI_NOTIFY_SUCCESSFUL %08lX !\n",
 	      lpParms->dwCallback);
 	mciDriverNotify((HWND)LOWORD(lpParms->dwCallback),
 			  wma->wNotifyDeviceID, MCI_NOTIFY_SUCCESSFUL);
@@ -514,12 +514,12 @@
 static DWORD MCIANIM_mciStop(UINT16 wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpParms)
 {
     WINE_MCIANIM*	wma = MCIANIM_mciGetOpenDrv(wDevID);
-    
+
     TRACE("(%u, %08lX, %p);\n", wDevID, dwFlags, lpParms);
-    
+
     if (lpParms == NULL) return MCIERR_INTERNAL;
     if (wma == NULL) return MCIERR_INVALID_DEVICE_ID;
-    
+
     wma->mode = MCI_MODE_STOP;
     if (dwFlags & MCI_NOTIFY) {
 	TRACE("MCI_NOTIFY_SUCCESSFUL %08lX !\n", lpParms->dwCallback);
@@ -536,7 +536,7 @@
 static DWORD MCIANIM_mciPause(UINT16 wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpParms)
 {
     WINE_MCIANIM*	wma = MCIANIM_mciGetOpenDrv(wDevID);
-    
+
     TRACE("(%u, %08lX, %p);\n", wDevID, dwFlags, lpParms);
     if (lpParms == NULL) return MCIERR_INTERNAL;
     wma->mode = MCI_MODE_PAUSE;
@@ -555,7 +555,7 @@
 static DWORD MCIANIM_mciResume(UINT16 wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpParms)
 {
     WINE_MCIANIM*	wma = MCIANIM_mciGetOpenDrv(wDevID);
-    
+
     TRACE("(%u, %08lX, %p);\n", wDevID, dwFlags, lpParms);
     if (lpParms == NULL) return MCIERR_INTERNAL;
     wma->mode = MCI_MODE_STOP;
@@ -576,9 +576,9 @@
     WINE_MCIANIM*	wma = MCIANIM_mciGetOpenDrv(wDevID);
     DWORD	dwRet;
     MCI_PLAY_PARMS PlayParms;
-    
+
     TRACE("(%u, %08lX, %p);\n", wDevID, dwFlags, lpParms);
-    
+
     if (lpParms == NULL) return MCIERR_INTERNAL;
     wma->mode = MCI_MODE_SEEK;
     switch (dwFlags) {
@@ -611,7 +611,7 @@
 static DWORD MCIANIM_mciSet(UINT16 wDevID, DWORD dwFlags, LPMCI_SET_PARMS lpParms)
 {
     WINE_MCIANIM*	wma = MCIANIM_mciGetOpenDrv(wDevID);
-    
+
     TRACE("(%u, %08lX, %p);\n", wDevID, dwFlags, lpParms);
 
     if (lpParms == NULL) return MCIERR_INTERNAL;
@@ -651,12 +651,12 @@
 /**************************************************************************
  * 				DriverProc (MCIANIM.@)
  */
-LONG WINAPI MCIANIM_DriverProc(DWORD dwDevID, HDRVR hDriv, DWORD wMsg, 
+LONG WINAPI MCIANIM_DriverProc(DWORD dwDevID, HDRVR hDriv, DWORD wMsg,
 			       DWORD dwParam1, DWORD dwParam2)
 {
     switch (wMsg) {
     case DRV_LOAD:		return 1;
-    case DRV_FREE:		return 1; 
+    case DRV_FREE:		return 1;
     case DRV_OPEN:		return MCIANIM_drvOpen((LPSTR)dwParam1, (LPMCI_OPEN_DRIVER_PARMSA)dwParam2);
     case DRV_CLOSE:		return MCIANIM_drvClose(dwDevID);
     case DRV_ENABLE:		return 1;
@@ -666,11 +666,11 @@
     case DRV_INSTALL:		return DRVCNF_RESTART;
     case DRV_REMOVE:		return DRVCNF_RESTART;
     }
-    
+
     if (dwDevID == 0xFFFFFFFF) return MCIERR_UNSUPPORTED_FUNCTION;
 
     switch (wMsg) {
-    case MCI_OPEN_DRIVER:	return MCIANIM_mciOpen(dwDevID, dwParam1, (LPMCI_OPEN_PARMSA)dwParam2); 
+    case MCI_OPEN_DRIVER:	return MCIANIM_mciOpen(dwDevID, dwParam1, (LPMCI_OPEN_PARMSA)dwParam2);
     case MCI_CLOSE_DRIVER:	return MCIANIM_mciClose(dwDevID, dwParam1, (LPMCI_GENERIC_PARMS)dwParam2);
     case MCI_GETDEVCAPS:	return MCIANIM_mciGetDevCaps(dwDevID, dwParam1, (LPMCI_GETDEVCAPS_PARMS)dwParam2);
     case MCI_INFO:		return MCIANIM_mciInfo(dwDevID, dwParam1, (LPMCI_INFO_PARMSA)dwParam2);
@@ -681,29 +681,29 @@
     case MCI_PAUSE:		return MCIANIM_mciPause(dwDevID, dwParam1, (LPMCI_GENERIC_PARMS)dwParam2);
     case MCI_RESUME:		return MCIANIM_mciResume(dwDevID, dwParam1, (LPMCI_GENERIC_PARMS)dwParam2);
     case MCI_SEEK:		return MCIANIM_mciSeek(dwDevID, dwParam1, (LPMCI_SEEK_PARMS)dwParam2);
-    case MCI_LOAD:		
-    case MCI_SAVE:		
-    case MCI_FREEZE:		
-    case MCI_PUT:		
-    case MCI_REALIZE:		
-    case MCI_UNFREEZE:		
-    case MCI_UPDATE:		
-    case MCI_WHERE:		
-    case MCI_WINDOW:		
-    case MCI_STEP:		
-    case MCI_SPIN:		
-    case MCI_ESCAPE:		
-    case MCI_COPY:		
-    case MCI_CUT:		
-    case MCI_DELETE:		
-    case MCI_PASTE:		
+    case MCI_LOAD:
+    case MCI_SAVE:
+    case MCI_FREEZE:
+    case MCI_PUT:
+    case MCI_REALIZE:
+    case MCI_UNFREEZE:
+    case MCI_UPDATE:
+    case MCI_WHERE:
+    case MCI_WINDOW:
+    case MCI_STEP:
+    case MCI_SPIN:
+    case MCI_ESCAPE:
+    case MCI_COPY:
+    case MCI_CUT:
+    case MCI_DELETE:
+    case MCI_PASTE:
 	FIXME("Unsupported message [%lu]\n", wMsg);
 	break;
     case MCI_OPEN:
     case MCI_CLOSE:
 	ERR("Shouldn't receive a MCI_OPEN or CLOSE message\n");
 	break;
-    default:			
+    default:
 	TRACE("Sending msg [%lu] to default driver proc\n", wMsg);
 	return DefDriverProc(dwDevID, hDriv, wMsg, dwParam1, dwParam2);
     }
diff --git a/dlls/winmm/mciavi/info.c b/dlls/winmm/mciavi/info.c
index 885e510e..003ecef 100644
--- a/dlls/winmm/mciavi/info.c
+++ b/dlls/winmm/mciavi/info.c
@@ -27,12 +27,12 @@
 WINE_DEFAULT_DEBUG_CHANNEL(mciavi);
 
 /**************************************************************************
- * 				MCIAVI_ConvertFrameToTimeFormat	[internal]	
+ * 				MCIAVI_ConvertFrameToTimeFormat	[internal]
  */
 DWORD 	MCIAVI_ConvertFrameToTimeFormat(WINE_MCIAVI* wma, DWORD val, LPDWORD lpRet)
 {
     DWORD	   ret = 0;
-    
+
     switch (wma->dwMciTimeFormat) {
     case MCI_FORMAT_MILLISECONDS:
         ret = (val * wma->mah.dwMicroSecPerFrame) / 1000;
@@ -49,12 +49,12 @@
 }
 
 /**************************************************************************
- * 				MCIAVI_ConvertTimeFormatToFrame	[internal]	
+ * 				MCIAVI_ConvertTimeFormatToFrame	[internal]
  */
 DWORD 	MCIAVI_ConvertTimeFormatToFrame(WINE_MCIAVI* wma, DWORD val)
 {
     DWORD	ret = 0;
-    
+
     switch (wma->dwMciTimeFormat) {
     case MCI_FORMAT_MILLISECONDS:
 	ret = (val * 1000) / wma->mah.dwMicroSecPerFrame;
@@ -76,12 +76,12 @@
 {
     WINE_MCIAVI*	wma = MCIAVI_mciGetOpenDev(wDevID);
     DWORD		ret;
-    
+
     TRACE("(%04x, %08lX, %p)\n", wDevID, dwFlags, lpParms);
-    
+
     if (lpParms == NULL) 	return MCIERR_NULL_PARAMETER_BLOCK;
     if (wma == NULL)		return MCIERR_INVALID_DEVICE_ID;
-    
+
     if (dwFlags & MCI_GETDEVCAPS_ITEM) {
 	switch (lpParms->dwItem) {
 	case MCI_GETDEVCAPS_DEVICE_TYPE:
@@ -148,13 +148,13 @@
     LPSTR		str = 0;
     WINE_MCIAVI*	wma = MCIAVI_mciGetOpenDev(wDevID);
     DWORD		ret = 0;
-    
+
     if (lpParms == NULL || lpParms->lpstrReturn == NULL)
 	return MCIERR_NULL_PARAMETER_BLOCK;
     if (wma == NULL) return MCIERR_INVALID_DEVICE_ID;
-    
+
     TRACE("buf=%p, len=%lu\n", lpParms->lpstrReturn, lpParms->dwRetSize);
-    
+
     switch (dwFlags) {
     case MCI_INFO_PRODUCT:
 	str = "Wine's AVI player";
@@ -184,10 +184,10 @@
 DWORD	MCIAVI_mciSet(UINT wDevID, DWORD dwFlags, LPMCI_DGV_SET_PARMS lpParms)
 {
     WINE_MCIAVI*	wma = MCIAVI_mciGetOpenDev(wDevID);
-    
+
     if (lpParms == NULL)	return MCIERR_NULL_PARAMETER_BLOCK;
     if (wma == NULL)		return MCIERR_INVALID_DEVICE_ID;
-    
+
     if (dwFlags & MCI_SET_TIME_FORMAT) {
 	switch (lpParms->dwTimeFormat) {
 	case MCI_FORMAT_MILLISECONDS:
@@ -203,7 +203,7 @@
 	    return MCIERR_BAD_TIME_FORMAT;
 	}
     }
-    
+
     if (dwFlags & MCI_SET_DOOR_OPEN) {
 	TRACE("No support for door open !\n");
 	return MCIERR_UNSUPPORTED_FUNCTION;
@@ -214,9 +214,9 @@
     }
     if (dwFlags & MCI_SET_ON) {
 	char	buffer[256];
-	
+
 	strcpy(buffer, "MCI_SET_ON:");
-	
+
 	if (dwFlags & MCI_SET_VIDEO) {
 	    strncat(buffer, " video", sizeof(buffer));
 	    wma->dwSet |= 4;
@@ -246,10 +246,10 @@
 	}
 	FIXME("%s\n", buffer);
     }
-    
+
     if (dwFlags & MCI_SET_OFF) {
 	char	buffer[256];
-	
+
 	strcpy(buffer, "MCI_SET_OFF:");
 	if (dwFlags & MCI_SET_VIDEO) {
 	    strncat(buffer, " video", sizeof(buffer));
@@ -282,9 +282,9 @@
     }
     if (dwFlags & MCI_DGV_SET_FILEFORMAT) {
 	LPSTR	str = "save";
-	if (dwFlags & MCI_DGV_SET_STILL)	
+	if (dwFlags & MCI_DGV_SET_STILL)
 	    str = "capture";
-	
+
 	switch (lpParms->dwFileFormat) {
 	case MCI_DGV_FF_AVI: 	FIXME("Setting file format (%s) to 'AVI'\n", str); 	break;
 	case MCI_DGV_FF_AVSS: 	FIXME("Setting file format (%s) to 'AVSS'\n", str);	break;
@@ -297,11 +297,11 @@
 	default:		FIXME("Setting unknown file format (%s): %ld\n", str, lpParms->dwFileFormat);
 	}
     }
-    
+
     if (dwFlags & MCI_DGV_SET_SPEED) {
 	FIXME("Setting speed to %ld\n", lpParms->dwSpeed);
     }
-    
+
     return 0;
 }
 
@@ -312,10 +312,10 @@
 {
     WINE_MCIAVI*	wma = MCIAVI_mciGetOpenDev(wDevID);
     DWORD		ret = 0;
-    
+
     if (lpParms == NULL)	return MCIERR_NULL_PARAMETER_BLOCK;
     if (wma == NULL)		return MCIERR_INVALID_DEVICE_ID;
-    
+
     if (dwFlags & MCI_STATUS_ITEM) {
 	switch (lpParms->dwItem) {
 	case MCI_STATUS_CURRENT_TRACK:
@@ -351,10 +351,10 @@
 		return MCIERR_UNSUPPORTED_FUNCTION;
 	    }
 	    /* only one track in file is currently handled, so don't take care of MCI_TRACK flag */
-	    lpParms->dwReturn = MCIAVI_ConvertFrameToTimeFormat(wma, 
+	    lpParms->dwReturn = MCIAVI_ConvertFrameToTimeFormat(wma,
 							     (dwFlags & MCI_STATUS_START) ? 0 : wma->dwCurrVideoFrame,
 							     &ret);
-	    TRACE("MCI_STATUS_POSITION %s => %lu\n", 
+	    TRACE("MCI_STATUS_POSITION %s => %lu\n",
 		  (dwFlags & MCI_STATUS_START) ? "start" : "current", lpParms->dwReturn);
 	    break;
 	case MCI_STATUS_READY:
@@ -447,7 +447,7 @@
 	mciDriverNotify((HWND)LOWORD(lpParms->dwCallback),
 			wma->openParms.wDeviceID, MCI_NOTIFY_SUCCESSFUL);
     }
-    
+
     return ret;
 }
 
diff --git a/dlls/winmm/mciavi/mciavi.c b/dlls/winmm/mciavi/mciavi.c
index 2dc974c..7f40e07 100644
--- a/dlls/winmm/mciavi/mciavi.c
+++ b/dlls/winmm/mciavi/mciavi.c
@@ -31,7 +31,7 @@
  *	- better move the AVI handling part to avifile DLL and make use of it
  *	- some files appear to have more than one audio stream (we only play the
  *	  first one)
- *	- some files contain an index of audio/video frame. Better use it, 
+ *	- some files contain an index of audio/video frame. Better use it,
  *	  instead of rebuilding it
  *	- mciWindow (for setting the hWnd) is broken with media player
  *	- stopping while playing a file with sound blocks until all buffered
@@ -67,7 +67,7 @@
 {
     struct SCA*	sca = (struct SCA*)arg;
     DWORD	ret;
-    
+
     TRACE("In thread before async command (%08x,%u,%08lx,%08lx)\n",
 	  sca->wDevID, sca->wMsg, sca->dwParam1, sca->dwParam2);
     ret = mciSendCommandA(sca->wDevID, sca->wMsg, sca->dwParam1 | MCI_WAIT, sca->dwParam2);
@@ -83,28 +83,28 @@
 /**************************************************************************
  * 				MCI_SendCommandAsync		[internal]
  */
-static	DWORD MCI_SendCommandAsync(UINT wDevID, UINT wMsg, DWORD dwParam1, 
+static	DWORD MCI_SendCommandAsync(UINT wDevID, UINT wMsg, DWORD dwParam1,
 				   DWORD dwParam2, UINT size)
 {
     struct SCA*	sca = HeapAlloc(GetProcessHeap(), 0, sizeof(struct SCA) + size);
-    
+
     if (sca == 0)
 	return MCIERR_OUT_OF_MEMORY;
-    
+
     sca->wDevID   = wDevID;
     sca->wMsg     = wMsg;
     sca->dwParam1 = dwParam1;
-    
+
     if (size && dwParam2) {
 	sca->dwParam2 = (DWORD)sca + sizeof(struct SCA);
-	/* copy structure passed by program in dwParam2 to be sure 
-	 * we can still use it whatever the program does 
+	/* copy structure passed by program in dwParam2 to be sure
+	 * we can still use it whatever the program does
 	 */
 	memcpy((LPVOID)sca->dwParam2, (LPVOID)dwParam2, size);
     } else {
 	sca->dwParam2 = dwParam2;
     }
-    
+
     if (CreateThread(NULL, 0, MCI_SCAStarter, sca, 0, NULL) == 0) {
 	WARN("Couldn't allocate thread for async command handling, sending synchronously\n");
 	return MCI_SCAStarter(&sca);
@@ -129,7 +129,7 @@
 }
 
 /**************************************************************************
- * 				MCIAVI_drvOpen			[internal]	
+ * 				MCIAVI_drvOpen			[internal]
  */
 static	DWORD	MCIAVI_drvOpen(LPSTR str, LPMCI_OPEN_DRIVER_PARMSA modp)
 {
@@ -141,7 +141,7 @@
     wma = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(WINE_MCIAVI));
     if (!wma)
 	return 0;
-    
+
     wma->wDevID = modp->wDeviceID;
     mciSetDriverData(wma->wDevID, (DWORD)wma);
     wma->wCommandTable = mciLoadCommandResource(MCIAVI_hInstance, mciAviWStr, 0);
@@ -151,42 +151,42 @@
 }
 
 /**************************************************************************
- * 				MCIAVI_drvClose		[internal]	
+ * 				MCIAVI_drvClose		[internal]
  */
 static	DWORD	MCIAVI_drvClose(DWORD dwDevID)
 {
     WINE_MCIAVI*  wma = (WINE_MCIAVI*)mciGetDriverData(dwDevID);
-    
+
     if (wma) {
 	mciSetDriverData(dwDevID, 0);
 	mciFreeCommandResource(wma->wCommandTable);
-	HeapFree(GetProcessHeap(), 0, wma);	
+	HeapFree(GetProcessHeap(), 0, wma);
 	return 1;
     }
     return (dwDevID == 0xFFFFFFFF) ? 1 : 0;
 }
 
 /**************************************************************************
- * 				MCIAVI_drvConfigure		[internal]	
+ * 				MCIAVI_drvConfigure		[internal]
  */
 static	DWORD	MCIAVI_drvConfigure(DWORD dwDevID)
 {
     WINE_MCIAVI*  wma = (WINE_MCIAVI*)mciGetDriverData(dwDevID);
 
     if (wma) {
-	MessageBoxA(0, "Sample AVI Wine Driver !", "MM-Wine Driver", MB_OK); 
+	MessageBoxA(0, "Sample AVI Wine Driver !", "MM-Wine Driver", MB_OK);
 	return 1;
     }
     return 0;
 }
 
 /**************************************************************************
- * 				MCIAVI_mciGetOpenDev		[internal]	
+ * 				MCIAVI_mciGetOpenDev		[internal]
  */
 WINE_MCIAVI*  MCIAVI_mciGetOpenDev(UINT wDevID)
 {
     WINE_MCIAVI*	wma = (WINE_MCIAVI*)mciGetDriverData(wDevID);
-    
+
     if (wma == NULL || wma->nUseCount == 0) {
 	WARN("Invalid wDevID=%u\n", wDevID);
 	return 0;
@@ -219,7 +219,7 @@
 	wma->hbmFrame = 0;
 	if (wma->hWnd)		DestroyWindow(wma->hWnd);
 	wma->hWnd = 0;
-	
+
 	if (wma->lpWaveFormat)	HeapFree(GetProcessHeap(), 0, wma->lpWaveFormat);
 	wma->lpWaveFormat = 0;
 
@@ -235,17 +235,17 @@
 /***************************************************************************
  * 				MCIAVI_mciOpen			[internal]
  */
-static	DWORD	MCIAVI_mciOpen(UINT wDevID, DWORD dwFlags, 
+static	DWORD	MCIAVI_mciOpen(UINT wDevID, DWORD dwFlags,
 			    LPMCI_DGV_OPEN_PARMSA lpOpenParms)
 {
     WINE_MCIAVI*	wma = (WINE_MCIAVI*)mciGetDriverData(wDevID);
     LRESULT		dwRet = 0;
-    
+
     TRACE("(%04x, %08lX, %p)\n", wDevID, dwFlags, lpOpenParms);
-    
+
     if (lpOpenParms == NULL) 		return MCIERR_NULL_PARAMETER_BLOCK;
     if (wma == NULL)			return MCIERR_INVALID_DEVICE_ID;
-    
+
     if (wma->nUseCount > 0) {
 	/* The driver is already open on this channel */
 	/* If the driver was opened shareable before and this open specifies */
@@ -258,44 +258,44 @@
 	wma->nUseCount = 1;
 	wma->fShareable = dwFlags & MCI_OPEN_SHAREABLE;
     }
-    
-    wma->dwStatus = MCI_MODE_NOT_READY;	
+
+    wma->dwStatus = MCI_MODE_NOT_READY;
     InitializeCriticalSection(&wma->cs);
-    
+
     if (dwFlags & MCI_OPEN_ELEMENT) {
 	if (dwFlags & MCI_OPEN_ELEMENT_ID) {
-	    /* could it be that (DWORD)lpOpenParms->lpstrElementName 
-	     * contains the hFile value ? 
+	    /* could it be that (DWORD)lpOpenParms->lpstrElementName
+	     * contains the hFile value ?
 	     */
 	    dwRet = MCIERR_UNRECOGNIZED_COMMAND;
 	} else if (strlen(lpOpenParms->lpstrElementName) > 0) {
 	    /* FIXME : what should be done id wma->hFile is already != 0, or the driver is playin' */
 	    TRACE("MCI_OPEN_ELEMENT '%s' !\n", lpOpenParms->lpstrElementName);
-	    
+
 	    if (lpOpenParms->lpstrElementName && (strlen(lpOpenParms->lpstrElementName) > 0)) {
-		wma->hFile = mmioOpenA(lpOpenParms->lpstrElementName, NULL, 
+		wma->hFile = mmioOpenA(lpOpenParms->lpstrElementName, NULL,
 				       MMIO_ALLOCBUF | MMIO_DENYWRITE | MMIO_READWRITE);
-		
+
 		if (wma->hFile == 0) {
 		    WARN("can't find file='%s' !\n", lpOpenParms->lpstrElementName);
 		    dwRet = MCIERR_FILE_NOT_FOUND;
 		} else {
-		    if (!MCIAVI_GetInfo(wma)) 
+		    if (!MCIAVI_GetInfo(wma))
 			dwRet = MCIERR_INVALID_FILE;
 		    else if (!MCIAVI_OpenVideo(wma))
 			dwRet = MCIERR_CANNOT_LOAD_DRIVER;
 		    else if (!MCIAVI_CreateWindow(wma, dwFlags, lpOpenParms))
 			dwRet = MCIERR_CREATEWINDOW;
-		} 
+		}
 	    }
 	} else {
 	    FIXME("Don't record yet\n");
 	    dwRet = MCIERR_UNSUPPORTED_FUNCTION;
 	}
     }
-    
+
     memcpy(&wma->openParms, lpOpenParms, sizeof(MCI_WAVE_OPEN_PARMSA));
-    
+
     if (dwRet == 0) {
 	wma->dwStatus = MCI_MODE_STOP;
 	wma->dwMciTimeFormat = MCI_FORMAT_FRAMES;
@@ -303,7 +303,7 @@
 	MCIAVI_CleanUp(wma);
     }
     return dwRet;
-    
+
 }
 
 /***************************************************************************
@@ -313,18 +313,18 @@
 {
     WINE_MCIAVI*	wma = MCIAVI_mciGetOpenDev(wDevID);
     DWORD		dwRet = 0;
-    
-    TRACE("(%04x, %08lX, %p)\n", wDevID, dwFlags, lpParms);    
-    
+
+    TRACE("(%04x, %08lX, %p)\n", wDevID, dwFlags, lpParms);
+
     if (wma == NULL) 	return MCIERR_INVALID_DEVICE_ID;
-    
+
     if (wma->nUseCount == 1) {
 	if (wma->dwStatus != MCI_MODE_STOP)
 	    dwRet = MCIAVI_mciStop(wDevID, MCI_WAIT, lpParms);
     	MCIAVI_CleanUp(wma);
-	
+
 	if ((dwFlags & MCI_NOTIFY) && lpParms) {
-	    mciDriverNotify((HWND)LOWORD(lpParms->dwCallback), 
+	    mciDriverNotify((HWND)LOWORD(lpParms->dwCallback),
 			    wma->openParms.wDeviceID,
 			    MCI_NOTIFY_SUCCESSFUL);
 	}
@@ -350,27 +350,27 @@
     DWORD		dwFromFrame, dwToFrame;
 
     TRACE("(%04x, %08lX, %p)\n", wDevID, dwFlags, lpParms);
-    
+
     if (lpParms == NULL)	return MCIERR_NULL_PARAMETER_BLOCK;
     if (wma == NULL)		return MCIERR_INVALID_DEVICE_ID;
-    
+
     if (!wma->hFile)		return MCIERR_FILE_NOT_FOUND;
     if (!wma->hWnd) 		return MCIERR_NO_WINDOW;
-    
+
     wma->dwStatus = MCI_MODE_PLAY;
-    
+
     if (!(dwFlags & MCI_WAIT)) {
-	return MCI_SendCommandAsync(wma->openParms.wDeviceID, MCI_PLAY, dwFlags, 
+	return MCI_SendCommandAsync(wma->openParms.wDeviceID, MCI_PLAY, dwFlags,
 				    (DWORD)lpParms, sizeof(MCI_PLAY_PARMS));
     }
-    
+
     ShowWindow(wma->hWnd, SW_SHOW);
-    
+
     dwFromFrame = wma->dwCurrVideoFrame;
     dwToFrame = wma->dwPlayableVideoFrames - 1;
-    
+
     if (lpParms && (dwFlags & MCI_FROM)) {
-	dwFromFrame = MCIAVI_ConvertTimeFormatToFrame(wma, lpParms->dwFrom); 
+	dwFromFrame = MCIAVI_ConvertTimeFormatToFrame(wma, lpParms->dwFrom);
     }
     if (lpParms && (dwFlags & MCI_TO)) {
 	dwToFrame = MCIAVI_ConvertTimeFormatToFrame(wma, lpParms->dwTo);
@@ -379,14 +379,14 @@
 	dwToFrame = wma->dwPlayableVideoFrames - 1;
 
     TRACE("Playing from frame=%lu to frame=%lu\n", dwFromFrame, dwToFrame);
-    
+
     if (dwToFrame <= wma->dwCurrVideoFrame)
 	return TRUE;
     wma->dwCurrVideoFrame = dwFromFrame;
 
     if (dwFlags & (MCI_DGV_PLAY_REPEAT|MCI_DGV_PLAY_REVERSE|MCI_MCIAVI_PLAY_WINDOW|MCI_MCIAVI_PLAY_FULLSCREEN))
 	FIXME("Unsupported flag %08lx\n", dwFlags);
-    
+
     /* time is in microseconds, we should convert it to milliseconds */
     frameTime = (wma->mah.dwMicroSecPerFrame + 500) / 1000;
 
@@ -399,7 +399,7 @@
 
     while (wma->dwStatus != MCI_MODE_STOP && wma->dwStatus != MCI_MODE_NOT_READY) {
 	tc = GetTickCount();
-	
+
 	MCIAVI_DrawFrame(wma);
 
 	if (wma->lpWaveFormat) {
@@ -422,7 +422,7 @@
 	while (*(volatile DWORD*)&wma->dwEventCount != nHdr - 1) {
 	    Sleep(100);
 	}
-	
+
 	/* just to get rid of some race conditions between play, stop and pause */
 	waveOutReset(wma->hWave);
 
@@ -447,9 +447,9 @@
 	mciDriverNotify((HWND)LOWORD(lpParms->dwCallback),
 			wma->openParms.wDeviceID, MCI_NOTIFY_SUCCESSFUL);
     }
-    
+
     wma->dwStatus = MCI_MODE_STOP;
-    
+
     return dwRet;
 }
 
@@ -459,12 +459,12 @@
 static	DWORD	MCIAVI_mciRecord(UINT wDevID, DWORD dwFlags, LPMCI_DGV_RECORD_PARMS lpParms)
 {
     WINE_MCIAVI*	wma = MCIAVI_mciGetOpenDev(wDevID);
-    
+
     FIXME("(%04x, %08lX, %p) : stub\n", wDevID, dwFlags, lpParms);
-    
+
     if (lpParms == NULL)	return MCIERR_NULL_PARAMETER_BLOCK;
     if (wma == NULL)		return MCIERR_INVALID_DEVICE_ID;
-    
+
     wma->dwStatus = MCI_MODE_RECORD;
     return 0;
 }
@@ -478,10 +478,10 @@
     DWORD		dwRet = 0;
 
     TRACE("(%04x, %08lX, %p)\n", wDevID, dwFlags, lpParms);
-    
+
     if (lpParms == NULL)	return MCIERR_NULL_PARAMETER_BLOCK;
     if (wma == NULL)		return MCIERR_INVALID_DEVICE_ID;
-    
+
     switch (wma->dwStatus) {
     case MCI_MODE_PAUSE:
     case MCI_MODE_PLAY:
@@ -499,12 +499,12 @@
 	wma->dwStatus = MCI_MODE_STOP;
 	break;
     }
-    
+
     if ((dwFlags & MCI_NOTIFY) && lpParms) {
-	mciDriverNotify((HWND)LOWORD(lpParms->dwCallback), 
+	mciDriverNotify((HWND)LOWORD(lpParms->dwCallback),
 			wma->openParms.wDeviceID, MCI_NOTIFY_SUCCESSFUL);
     }
-    
+
     return dwRet;
 }
 
@@ -514,10 +514,10 @@
 static	DWORD	MCIAVI_mciPause(UINT wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpParms)
 {
     WINE_MCIAVI*	wma = MCIAVI_mciGetOpenDev(wDevID);
-    
+
     if (lpParms == NULL)	return MCIERR_NULL_PARAMETER_BLOCK;
     if (wma == NULL)		return MCIERR_INVALID_DEVICE_ID;
-    
+
     if (wma->dwStatus == MCI_MODE_PLAY)
 	wma->dwStatus = MCI_MODE_PAUSE;
 
@@ -530,12 +530,12 @@
 static	DWORD	MCIAVI_mciResume(UINT wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpParms)
 {
     WINE_MCIAVI*	wma = MCIAVI_mciGetOpenDev(wDevID);
-    
+
     FIXME("(%04x, %08lX, %p) : stub\n", wDevID, dwFlags, lpParms);
-    
+
     if (lpParms == NULL)	return MCIERR_NULL_PARAMETER_BLOCK;
     if (wma == NULL)		return MCIERR_INVALID_DEVICE_ID;
-    
+
     if (wma->dwStatus == MCI_MODE_PAUSE)
 	wma->dwStatus = MCI_MODE_PLAY;
 
@@ -548,16 +548,16 @@
 static	DWORD	MCIAVI_mciSeek(UINT wDevID, DWORD dwFlags, LPMCI_SEEK_PARMS lpParms)
 {
     WINE_MCIAVI*	wma = MCIAVI_mciGetOpenDev(wDevID);
-    
+
     TRACE("(%04x, %08lX, %p)\n", wDevID, dwFlags, lpParms);
-    
+
     if (lpParms == NULL)	return MCIERR_NULL_PARAMETER_BLOCK;
     if (wma == NULL)		return MCIERR_INVALID_DEVICE_ID;
-    
+
     EnterCriticalSection(&wma->cs);
-    
+
     MCIAVI_mciStop(wDevID, MCI_WAIT, 0);
-	
+
     if (dwFlags & MCI_SEEK_TO_START) {
 	wma->dwCurrVideoFrame = 0;
     } else if (dwFlags & MCI_SEEK_TO_END) {
@@ -568,11 +568,11 @@
 	WARN("dwFlag doesn't tell where to seek to...\n");
 	return MCIERR_MISSING_PARAMETER;
     }
-	
+
     TRACE("Seeking to frame=%lu bytes\n", wma->dwCurrVideoFrame);
-	
+
     if (dwFlags & MCI_NOTIFY) {
-	mciDriverNotify((HWND)LOWORD(lpParms->dwCallback), 
+	mciDriverNotify((HWND)LOWORD(lpParms->dwCallback),
 			wma->openParms.wDeviceID, MCI_NOTIFY_SUCCESSFUL);
     }
 
@@ -587,12 +587,12 @@
 static DWORD	MCIAVI_mciLoad(UINT wDevID, DWORD dwFlags, LPMCI_DGV_LOAD_PARMSA lpParms)
 {
     WINE_MCIAVI*	wma = MCIAVI_mciGetOpenDev(wDevID);
-    
+
     FIXME("(%04x, %08lx, %p) : stub\n", wDevID, dwFlags, lpParms);
-    
+
     if (lpParms == NULL)	return MCIERR_NULL_PARAMETER_BLOCK;
     if (wma == NULL)		return MCIERR_INVALID_DEVICE_ID;
-    
+
     return 0;
 }
 
@@ -602,12 +602,12 @@
 static	DWORD	MCIAVI_mciSave(UINT wDevID, DWORD dwFlags, LPMCI_DGV_SAVE_PARMSA lpParms)
 {
     WINE_MCIAVI*	wma = MCIAVI_mciGetOpenDev(wDevID);
-    
+
     FIXME("(%04x, %08lx, %p) : stub\n", wDevID, dwFlags, lpParms);
-    
+
     if (lpParms == NULL)	return MCIERR_NULL_PARAMETER_BLOCK;
     if (wma == NULL)		return MCIERR_INVALID_DEVICE_ID;
-    
+
     return 0;
 }
 
@@ -617,12 +617,12 @@
 static	DWORD	MCIAVI_mciFreeze(UINT wDevID, DWORD dwFlags, LPMCI_DGV_RECT_PARMS lpParms)
 {
     WINE_MCIAVI*	wma = MCIAVI_mciGetOpenDev(wDevID);
-    
+
     FIXME("(%04x, %08lx, %p) : stub\n", wDevID, dwFlags, lpParms);
-    
+
     if (lpParms == NULL)	return MCIERR_NULL_PARAMETER_BLOCK;
     if (wma == NULL)		return MCIERR_INVALID_DEVICE_ID;
-    
+
     return 0;
 }
 
@@ -632,12 +632,12 @@
 static	DWORD	MCIAVI_mciRealize(UINT wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpParms)
 {
     WINE_MCIAVI*	wma = MCIAVI_mciGetOpenDev(wDevID);
-    
+
     FIXME("(%04x, %08lx, %p) : stub\n", wDevID, dwFlags, lpParms);
-    
+
     if (lpParms == NULL)	return MCIERR_NULL_PARAMETER_BLOCK;
     if (wma == NULL)		return MCIERR_INVALID_DEVICE_ID;
-    
+
     return 0;
 }
 
@@ -647,12 +647,12 @@
 static	DWORD	MCIAVI_mciUnFreeze(UINT wDevID, DWORD dwFlags, LPMCI_DGV_RECT_PARMS lpParms)
 {
     WINE_MCIAVI*	wma = MCIAVI_mciGetOpenDev(wDevID);
-    
+
     FIXME("(%04x, %08lx, %p) : stub\n", wDevID, dwFlags, lpParms);
-    
+
     if (lpParms == NULL)	return MCIERR_NULL_PARAMETER_BLOCK;
     if (wma == NULL)		return MCIERR_INVALID_DEVICE_ID;
-    
+
     return 0;
 }
 
@@ -664,10 +664,10 @@
     WINE_MCIAVI*	wma = MCIAVI_mciGetOpenDev(wDevID);
 
     FIXME("(%04x, %08lx, %p) : stub\n", wDevID, dwFlags, lpParms);
-    
+
     if (lpParms == NULL)	return MCIERR_NULL_PARAMETER_BLOCK;
     if (wma == NULL)		return MCIERR_INVALID_DEVICE_ID;
-    
+
     return 0;
 }
 
@@ -677,12 +677,12 @@
 static	DWORD	MCIAVI_mciStep(UINT wDevID, DWORD dwFlags, LPMCI_DGV_STEP_PARMS lpParms)
 {
     WINE_MCIAVI*	wma = MCIAVI_mciGetOpenDev(wDevID);
-    
+
     FIXME("(%04x, %08lx, %p) : stub\n", wDevID, dwFlags, lpParms);
-    
+
     if (lpParms == NULL)	return MCIERR_NULL_PARAMETER_BLOCK;
     if (wma == NULL)		return MCIERR_INVALID_DEVICE_ID;
-    
+
     return 0;
 }
 
@@ -692,12 +692,12 @@
 static	DWORD	MCIAVI_mciCopy(UINT wDevID, DWORD dwFlags, LPMCI_DGV_COPY_PARMS lpParms)
 {
     WINE_MCIAVI*	wma = MCIAVI_mciGetOpenDev(wDevID);
-    
+
     FIXME("(%04x, %08lx, %p) : stub\n", wDevID, dwFlags, lpParms);
-    
+
     if (lpParms == NULL)	return MCIERR_NULL_PARAMETER_BLOCK;
     if (wma == NULL)		return MCIERR_INVALID_DEVICE_ID;
-    
+
     return 0;
 }
 
@@ -707,12 +707,12 @@
 static	DWORD	MCIAVI_mciCut(UINT wDevID, DWORD dwFlags, LPMCI_DGV_CUT_PARMS lpParms)
 {
     WINE_MCIAVI*	wma = MCIAVI_mciGetOpenDev(wDevID);
-    
+
     FIXME("(%04x, %08lx, %p) : stub\n", wDevID, dwFlags, lpParms);
-    
+
     if (lpParms == NULL)	return MCIERR_NULL_PARAMETER_BLOCK;
     if (wma == NULL)		return MCIERR_INVALID_DEVICE_ID;
-    
+
     return 0;
 }
 
@@ -722,12 +722,12 @@
 static	DWORD	MCIAVI_mciDelete(UINT wDevID, DWORD dwFlags, LPMCI_DGV_DELETE_PARMS lpParms)
 {
     WINE_MCIAVI*	wma = MCIAVI_mciGetOpenDev(wDevID);
-    
+
     FIXME("(%04x, %08lx, %p) : stub\n", wDevID, dwFlags, lpParms);
-    
+
     if (lpParms == NULL)	return MCIERR_NULL_PARAMETER_BLOCK;
     if (wma == NULL)		return MCIERR_INVALID_DEVICE_ID;
-    
+
     return 0;
 }
 
@@ -737,12 +737,12 @@
 static	DWORD	MCIAVI_mciPaste(UINT wDevID, DWORD dwFlags, LPMCI_DGV_PASTE_PARMS lpParms)
 {
     WINE_MCIAVI*	wma = MCIAVI_mciGetOpenDev(wDevID);
-    
+
     FIXME("(%04x, %08lx, %p) : stub\n", wDevID, dwFlags, lpParms);
-    
+
     if (lpParms == NULL)	return MCIERR_NULL_PARAMETER_BLOCK;
     if (wma == NULL)		return MCIERR_INVALID_DEVICE_ID;
-    
+
     return 0;
 }
 
@@ -752,12 +752,12 @@
 static	DWORD	MCIAVI_mciCue(UINT wDevID, DWORD dwFlags, LPMCI_DGV_CUE_PARMS lpParms)
 {
     WINE_MCIAVI*	wma = MCIAVI_mciGetOpenDev(wDevID);
-    
+
     FIXME("(%04x, %08lx, %p) : stub\n", wDevID, dwFlags, lpParms);
-    
+
     if (lpParms == NULL)	return MCIERR_NULL_PARAMETER_BLOCK;
     if (wma == NULL)		return MCIERR_INVALID_DEVICE_ID;
-    
+
     return 0;
 }
 
@@ -767,12 +767,12 @@
 static	DWORD	MCIAVI_mciCapture(UINT wDevID, DWORD dwFlags, LPMCI_DGV_CAPTURE_PARMSA lpParms)
 {
     WINE_MCIAVI*	wma = MCIAVI_mciGetOpenDev(wDevID);
-    
+
     FIXME("(%04x, %08lx, %p) : stub\n", wDevID, dwFlags, lpParms);
-    
+
     if (lpParms == NULL)	return MCIERR_NULL_PARAMETER_BLOCK;
     if (wma == NULL)		return MCIERR_INVALID_DEVICE_ID;
-    
+
     return 0;
 }
 
@@ -782,12 +782,12 @@
 static	DWORD	MCIAVI_mciMonitor(UINT wDevID, DWORD dwFlags, LPMCI_DGV_MONITOR_PARMS lpParms)
 {
     WINE_MCIAVI*	wma = MCIAVI_mciGetOpenDev(wDevID);
-    
+
     FIXME("(%04x, %08lx, %p) : stub\n", wDevID, dwFlags, lpParms);
-    
+
     if (lpParms == NULL)	return MCIERR_NULL_PARAMETER_BLOCK;
     if (wma == NULL)		return MCIERR_INVALID_DEVICE_ID;
-    
+
     return 0;
 }
 
@@ -797,12 +797,12 @@
 static	DWORD	MCIAVI_mciReserve(UINT wDevID, DWORD dwFlags, LPMCI_DGV_RESERVE_PARMSA lpParms)
 {
     WINE_MCIAVI*	wma = MCIAVI_mciGetOpenDev(wDevID);
-    
+
     FIXME("(%04x, %08lx, %p) : stub\n", wDevID, dwFlags, lpParms);
-    
+
     if (lpParms == NULL)	return MCIERR_NULL_PARAMETER_BLOCK;
     if (wma == NULL)		return MCIERR_INVALID_DEVICE_ID;
-    
+
     return 0;
 }
 
@@ -812,12 +812,12 @@
 static	DWORD	MCIAVI_mciSetAudio(UINT wDevID, DWORD dwFlags, LPMCI_DGV_SETAUDIO_PARMSA lpParms)
 {
     WINE_MCIAVI*	wma = MCIAVI_mciGetOpenDev(wDevID);
-    
+
     FIXME("(%04x, %08lx, %p) : stub\n", wDevID, dwFlags, lpParms);
-    
+
     if (lpParms == NULL)	return MCIERR_NULL_PARAMETER_BLOCK;
     if (wma == NULL)		return MCIERR_INVALID_DEVICE_ID;
-    
+
     return 0;
 }
 
@@ -827,12 +827,12 @@
 static	DWORD	MCIAVI_mciSignal(UINT wDevID, DWORD dwFlags, LPMCI_DGV_SIGNAL_PARMS lpParms)
 {
     WINE_MCIAVI*	wma = MCIAVI_mciGetOpenDev(wDevID);
-    
+
     FIXME("(%04x, %08lx, %p) : stub\n", wDevID, dwFlags, lpParms);
-    
+
     if (lpParms == NULL)	return MCIERR_NULL_PARAMETER_BLOCK;
     if (wma == NULL)		return MCIERR_INVALID_DEVICE_ID;
-    
+
     return 0;
 }
 
@@ -842,12 +842,12 @@
 static	DWORD	MCIAVI_mciSetVideo(UINT wDevID, DWORD dwFlags, LPMCI_DGV_SETVIDEO_PARMSA lpParms)
 {
     WINE_MCIAVI*	wma = MCIAVI_mciGetOpenDev(wDevID);
-    
+
     FIXME("(%04x, %08lx, %p) : stub\n", wDevID, dwFlags, lpParms);
-    
+
     if (lpParms == NULL)	return MCIERR_NULL_PARAMETER_BLOCK;
     if (wma == NULL)		return MCIERR_INVALID_DEVICE_ID;
-    
+
     return 0;
 }
 
@@ -857,12 +857,12 @@
 static	DWORD	MCIAVI_mciQuality(UINT wDevID, DWORD dwFlags, LPMCI_DGV_QUALITY_PARMSA lpParms)
 {
     WINE_MCIAVI*	wma = MCIAVI_mciGetOpenDev(wDevID);
-    
+
     FIXME("(%04x, %08lx, %p) : stub\n", wDevID, dwFlags, lpParms);
-    
+
     if (lpParms == NULL)	return MCIERR_NULL_PARAMETER_BLOCK;
     if (wma == NULL)		return MCIERR_INVALID_DEVICE_ID;
-    
+
     return 0;
 }
 
@@ -872,12 +872,12 @@
 static	DWORD	MCIAVI_mciList(UINT wDevID, DWORD dwFlags, LPMCI_DGV_LIST_PARMSA lpParms)
 {
     WINE_MCIAVI*	wma = MCIAVI_mciGetOpenDev(wDevID);
-    
+
     FIXME("(%04x, %08lx, %p) : stub\n", wDevID, dwFlags, lpParms);
-    
+
     if (lpParms == NULL)	return MCIERR_NULL_PARAMETER_BLOCK;
     if (wma == NULL)		return MCIERR_INVALID_DEVICE_ID;
-    
+
     return 0;
 }
 
@@ -887,12 +887,12 @@
 static	DWORD	MCIAVI_mciUndo(UINT wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpParms)
 {
     WINE_MCIAVI*	wma = MCIAVI_mciGetOpenDev(wDevID);
-    
+
     FIXME("(%04x, %08lx, %p) : stub\n", wDevID, dwFlags, lpParms);
-    
+
     if (lpParms == NULL)	return MCIERR_NULL_PARAMETER_BLOCK;
     if (wma == NULL)		return MCIERR_INVALID_DEVICE_ID;
-    
+
     return 0;
 }
 
@@ -902,12 +902,12 @@
 static	DWORD	MCIAVI_mciConfigure(UINT wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpParms)
 {
     WINE_MCIAVI*	wma = MCIAVI_mciGetOpenDev(wDevID);
-    
+
     FIXME("(%04x, %08lx, %p) : stub\n", wDevID, dwFlags, lpParms);
-    
+
     if (lpParms == NULL)	return MCIERR_NULL_PARAMETER_BLOCK;
     if (wma == NULL)		return MCIERR_INVALID_DEVICE_ID;
-    
+
     return 0;
 }
 
@@ -917,12 +917,12 @@
 static	DWORD	MCIAVI_mciRestore(UINT wDevID, DWORD dwFlags, LPMCI_DGV_RESTORE_PARMSA lpParms)
 {
     WINE_MCIAVI*	wma = MCIAVI_mciGetOpenDev(wDevID);
-    
+
     FIXME("(%04x, %08lx, %p) : stub\n", wDevID, dwFlags, lpParms);
-    
+
     if (lpParms == NULL)	return MCIERR_NULL_PARAMETER_BLOCK;
     if (wma == NULL)		return MCIERR_INVALID_DEVICE_ID;
-    
+
     return 0;
 }
 
@@ -933,12 +933,12 @@
 /**************************************************************************
  * 				DriverProc (MCIAVI.@)
  */
-LONG CALLBACK	MCIAVI_DriverProc(DWORD dwDevID, HDRVR hDriv, DWORD wMsg, 
+LONG CALLBACK	MCIAVI_DriverProc(DWORD dwDevID, HDRVR hDriv, DWORD wMsg,
 				  DWORD dwParam1, DWORD dwParam2)
 {
-    TRACE("(%08lX, %04X, %08lX, %08lX, %08lX)\n", 
+    TRACE("(%08lX, %04X, %08lX, %08lX, %08lX)\n",
 	  dwDevID, hDriv, wMsg, dwParam1, dwParam2);
-    
+
     switch (wMsg) {
     case DRV_LOAD:		return 1;
     case DRV_FREE:		return 1;
@@ -951,7 +951,7 @@
     case DRV_INSTALL:		return DRVCNF_RESTART;
     case DRV_REMOVE:		return DRVCNF_RESTART;
     }
-    
+
     if (dwDevID == 0xFFFFFFFF) return MCIERR_UNSUPPORTED_FUNCTION;
 
     switch (wMsg) {
@@ -967,22 +967,22 @@
     case MCI_GETDEVCAPS:	return MCIAVI_mciGetDevCaps(dwDevID, dwParam1, (LPMCI_GETDEVCAPS_PARMS)    dwParam2);
     case MCI_INFO:		return MCIAVI_mciInfo      (dwDevID, dwParam1, (LPMCI_DGV_INFO_PARMSA)     dwParam2);
     case MCI_SEEK:		return MCIAVI_mciSeek      (dwDevID, dwParam1, (LPMCI_SEEK_PARMS)          dwParam2);
-    case MCI_PUT:		return MCIAVI_mciPut	   (dwDevID, dwParam1, (LPMCI_DGV_PUT_PARMS)       dwParam2);		
-    case MCI_WINDOW:		return MCIAVI_mciWindow	   (dwDevID, dwParam1, (LPMCI_DGV_WINDOW_PARMSA)   dwParam2);		
-    case MCI_LOAD:		return MCIAVI_mciLoad      (dwDevID, dwParam1, (LPMCI_DGV_LOAD_PARMSA)     dwParam2);		
-    case MCI_SAVE:		return MCIAVI_mciSave      (dwDevID, dwParam1, (LPMCI_DGV_SAVE_PARMSA)     dwParam2);		
+    case MCI_PUT:		return MCIAVI_mciPut	   (dwDevID, dwParam1, (LPMCI_DGV_PUT_PARMS)       dwParam2);
+    case MCI_WINDOW:		return MCIAVI_mciWindow	   (dwDevID, dwParam1, (LPMCI_DGV_WINDOW_PARMSA)   dwParam2);
+    case MCI_LOAD:		return MCIAVI_mciLoad      (dwDevID, dwParam1, (LPMCI_DGV_LOAD_PARMSA)     dwParam2);
+    case MCI_SAVE:		return MCIAVI_mciSave      (dwDevID, dwParam1, (LPMCI_DGV_SAVE_PARMSA)     dwParam2);
     case MCI_FREEZE:		return MCIAVI_mciFreeze	   (dwDevID, dwParam1, (LPMCI_DGV_RECT_PARMS)      dwParam2);
     case MCI_REALIZE:		return MCIAVI_mciRealize   (dwDevID, dwParam1, (LPMCI_GENERIC_PARMS)       dwParam2);
     case MCI_UNFREEZE:		return MCIAVI_mciUnFreeze  (dwDevID, dwParam1, (LPMCI_DGV_RECT_PARMS)      dwParam2);
     case MCI_UPDATE:		return MCIAVI_mciUpdate    (dwDevID, dwParam1, (LPMCI_DGV_UPDATE_PARMS)    dwParam2);
     case MCI_WHERE:		return MCIAVI_mciWhere	   (dwDevID, dwParam1, (LPMCI_DGV_RECT_PARMS)      dwParam2);
     case MCI_STEP:		return MCIAVI_mciStep      (dwDevID, dwParam1, (LPMCI_DGV_STEP_PARMS)      dwParam2);
-    case MCI_COPY:		return MCIAVI_mciCopy      (dwDevID, dwParam1, (LPMCI_DGV_COPY_PARMS)      dwParam2);		
-    case MCI_CUT:		return MCIAVI_mciCut       (dwDevID, dwParam1, (LPMCI_DGV_CUT_PARMS)       dwParam2);		
-    case MCI_DELETE:		return MCIAVI_mciDelete    (dwDevID, dwParam1, (LPMCI_DGV_DELETE_PARMS)    dwParam2);				
-    case MCI_PASTE:		return MCIAVI_mciPaste     (dwDevID, dwParam1, (LPMCI_DGV_PASTE_PARMS)     dwParam2);				
+    case MCI_COPY:		return MCIAVI_mciCopy      (dwDevID, dwParam1, (LPMCI_DGV_COPY_PARMS)      dwParam2);
+    case MCI_CUT:		return MCIAVI_mciCut       (dwDevID, dwParam1, (LPMCI_DGV_CUT_PARMS)       dwParam2);
+    case MCI_DELETE:		return MCIAVI_mciDelete    (dwDevID, dwParam1, (LPMCI_DGV_DELETE_PARMS)    dwParam2);
+    case MCI_PASTE:		return MCIAVI_mciPaste     (dwDevID, dwParam1, (LPMCI_DGV_PASTE_PARMS)     dwParam2);
     case MCI_CUE:		return MCIAVI_mciCue       (dwDevID, dwParam1, (LPMCI_DGV_CUE_PARMS)       dwParam2);
-	/* Digital Video specific */	
+	/* Digital Video specific */
     case MCI_CAPTURE:		return MCIAVI_mciCapture   (dwDevID, dwParam1, (LPMCI_DGV_CAPTURE_PARMSA)  dwParam2);
     case MCI_MONITOR:		return MCIAVI_mciMonitor   (dwDevID, dwParam1, (LPMCI_DGV_MONITOR_PARMS)   dwParam2);
     case MCI_RESERVE:		return MCIAVI_mciReserve   (dwDevID, dwParam1, (LPMCI_DGV_RESERVE_PARMSA)  dwParam2);
@@ -994,20 +994,20 @@
     case MCI_UNDO:		return MCIAVI_mciUndo      (dwDevID, dwParam1, (LPMCI_GENERIC_PARMS)       dwParam2);
     case MCI_CONFIGURE:		return MCIAVI_mciConfigure (dwDevID, dwParam1, (LPMCI_GENERIC_PARMS)       dwParam2);
     case MCI_RESTORE:		return MCIAVI_mciRestore   (dwDevID, dwParam1, (LPMCI_DGV_RESTORE_PARMSA)  dwParam2);
-	
+
     case MCI_SPIN:
-    case MCI_ESCAPE:		
+    case MCI_ESCAPE:
 	WARN("Unsupported command [%lu]\n", wMsg);
 	break;
     case MCI_OPEN:
     case MCI_CLOSE:
 	FIXME("Shouldn't receive a MCI_OPEN or CLOSE message\n");
 	break;
-    default:			
+    default:
 	TRACE("Sending msg [%lu] to default driver proc\n", wMsg);
 	return DefDriverProc(dwDevID, hDriv, wMsg, dwParam1, dwParam2);
     }
     return MCIERR_UNRECOGNIZED_COMMAND;
 }
 
-    
+
diff --git a/dlls/winmm/mciavi/mmoutput.c b/dlls/winmm/mciavi/mmoutput.c
index 9b4ea34..1408f14 100644
--- a/dlls/winmm/mciavi/mmoutput.c
+++ b/dlls/winmm/mciavi/mmoutput.c
@@ -28,22 +28,22 @@
 static BOOL MCIAVI_GetInfoAudio(WINE_MCIAVI* wma, const MMCKINFO* mmckList)
 {
     MMCKINFO	mmckInfo;
-    
+
     mmckInfo.ckid = ckidSTREAMHEADER;
     if (mmioDescend(wma->hFile, &mmckInfo, mmckList, MMIO_FINDCHUNK) != 0) {
 	WARN("Can't find 'strh' chunk\n");
 	return FALSE;
     }
-    
+
     mmioRead(wma->hFile, (LPSTR)&wma->ash_audio, sizeof(wma->ash_audio));
-    
-    TRACE("ash.fccType='%c%c%c%c'\n", 		LOBYTE(LOWORD(wma->ash_audio.fccType)), 
-	                                        HIBYTE(LOWORD(wma->ash_audio.fccType)), 
-	                                        LOBYTE(HIWORD(wma->ash_audio.fccType)), 
+
+    TRACE("ash.fccType='%c%c%c%c'\n", 		LOBYTE(LOWORD(wma->ash_audio.fccType)),
+	                                        HIBYTE(LOWORD(wma->ash_audio.fccType)),
+	                                        LOBYTE(HIWORD(wma->ash_audio.fccType)),
 	                                        HIBYTE(HIWORD(wma->ash_audio.fccType)));
-    TRACE("ash.fccHandler='%c%c%c%c'\n",	LOBYTE(LOWORD(wma->ash_audio.fccHandler)), 
-	                                        HIBYTE(LOWORD(wma->ash_audio.fccHandler)), 
-	                                        LOBYTE(HIWORD(wma->ash_audio.fccHandler)), 
+    TRACE("ash.fccHandler='%c%c%c%c'\n",	LOBYTE(LOWORD(wma->ash_audio.fccHandler)),
+	                                        HIBYTE(LOWORD(wma->ash_audio.fccHandler)),
+	                                        LOBYTE(HIWORD(wma->ash_audio.fccHandler)),
 	                                        HIBYTE(HIWORD(wma->ash_audio.fccHandler)));
     TRACE("ash.dwFlags=%ld\n", 			wma->ash_audio.dwFlags);
     TRACE("ash.wPriority=%d\n", 		wma->ash_audio.wPriority);
@@ -56,11 +56,11 @@
     TRACE("ash.dwSuggestedBufferSize=%ld\n", 	wma->ash_audio.dwSuggestedBufferSize);
     TRACE("ash.dwQuality=%ld\n", 		wma->ash_audio.dwQuality);
     TRACE("ash.dwSampleSize=%ld\n", 		wma->ash_audio.dwSampleSize);
-    TRACE("ash.rcFrame=(%d,%d,%d,%d)\n", 	wma->ash_audio.rcFrame.top, wma->ash_audio.rcFrame.left, 
+    TRACE("ash.rcFrame=(%d,%d,%d,%d)\n", 	wma->ash_audio.rcFrame.top, wma->ash_audio.rcFrame.left,
 	  wma->ash_audio.rcFrame.bottom, wma->ash_audio.rcFrame.right);
-    
+
     mmioAscend(wma->hFile, &mmckInfo, 0);
-    
+
     mmckInfo.ckid = ckidSTREAMFORMAT;
     if (mmioDescend(wma->hFile, &mmckInfo, mmckList, MMIO_FINDCHUNK) != 0) {
 	WARN("Can't find 'strh' chunk\n");
@@ -75,9 +75,9 @@
 	WARN("Can't alloc WaveFormat\n");
 	return FALSE;
     }
-    
+
     mmioRead(wma->hFile, (LPSTR)wma->lpWaveFormat, mmckInfo.cksize);
-    
+
     TRACE("waveFormat.wFormatTag=%d\n",		wma->lpWaveFormat->wFormatTag);
     TRACE("waveFormat.nChannels=%d\n", 		wma->lpWaveFormat->nChannels);
     TRACE("waveFormat.nSamplesPerSec=%ld\n",	wma->lpWaveFormat->nSamplesPerSec);
@@ -86,31 +86,31 @@
     TRACE("waveFormat.wBitsPerSample=%d\n",	wma->lpWaveFormat->wBitsPerSample);
     if (mmckInfo.cksize >= sizeof(WAVEFORMATEX))
 	TRACE("waveFormat.cbSize=%d\n", 		wma->lpWaveFormat->cbSize);
-    
+
     mmioAscend(wma->hFile, &mmckInfo, 0);
-    
+
     return TRUE;
 }
 
 static BOOL MCIAVI_GetInfoVideo(WINE_MCIAVI* wma, const MMCKINFO* mmckList)
 {
     MMCKINFO	mmckInfo;
-    
+
     mmckInfo.ckid = ckidSTREAMHEADER;
     if (mmioDescend(wma->hFile, &mmckInfo, mmckList, MMIO_FINDCHUNK) != 0) {
 	WARN("Can't find 'strh' chunk\n");
 	return FALSE;
     }
-    
+
     mmioRead(wma->hFile, (LPSTR)&wma->ash_video, sizeof(wma->ash_video));
-    
-    TRACE("ash.fccType='%c%c%c%c'\n", 		LOBYTE(LOWORD(wma->ash_video.fccType)), 
-	                                        HIBYTE(LOWORD(wma->ash_video.fccType)), 
-	                                        LOBYTE(HIWORD(wma->ash_video.fccType)), 
+
+    TRACE("ash.fccType='%c%c%c%c'\n", 		LOBYTE(LOWORD(wma->ash_video.fccType)),
+	                                        HIBYTE(LOWORD(wma->ash_video.fccType)),
+	                                        LOBYTE(HIWORD(wma->ash_video.fccType)),
 	                                        HIBYTE(HIWORD(wma->ash_video.fccType)));
-    TRACE("ash.fccHandler='%c%c%c%c'\n",	LOBYTE(LOWORD(wma->ash_video.fccHandler)), 
-	                                        HIBYTE(LOWORD(wma->ash_video.fccHandler)), 
-	                                        LOBYTE(HIWORD(wma->ash_video.fccHandler)), 
+    TRACE("ash.fccHandler='%c%c%c%c'\n",	LOBYTE(LOWORD(wma->ash_video.fccHandler)),
+	                                        HIBYTE(LOWORD(wma->ash_video.fccHandler)),
+	                                        LOBYTE(HIWORD(wma->ash_video.fccHandler)),
 	                                        HIBYTE(HIWORD(wma->ash_video.fccHandler)));
     TRACE("ash.dwFlags=%ld\n", 			wma->ash_video.dwFlags);
     TRACE("ash.wPriority=%d\n", 		wma->ash_video.wPriority);
@@ -123,25 +123,25 @@
     TRACE("ash.dwSuggestedBufferSize=%ld\n", 	wma->ash_video.dwSuggestedBufferSize);
     TRACE("ash.dwQuality=%ld\n", 		wma->ash_video.dwQuality);
     TRACE("ash.dwSampleSize=%ld\n", 		wma->ash_video.dwSampleSize);
-    TRACE("ash.rcFrame=(%d,%d,%d,%d)\n", 	wma->ash_video.rcFrame.top, wma->ash_video.rcFrame.left, 
+    TRACE("ash.rcFrame=(%d,%d,%d,%d)\n", 	wma->ash_video.rcFrame.top, wma->ash_video.rcFrame.left,
 	  wma->ash_video.rcFrame.bottom, wma->ash_video.rcFrame.right);
-    
+
     mmioAscend(wma->hFile, &mmckInfo, 0);
-    
+
     mmckInfo.ckid = ckidSTREAMFORMAT;
     if (mmioDescend(wma->hFile, &mmckInfo, mmckList, MMIO_FINDCHUNK) != 0) {
 	WARN("Can't find 'strh' chunk\n");
 	return FALSE;
     }
-    
+
     wma->inbih = HeapAlloc(GetProcessHeap(), 0, mmckInfo.cksize);
     if (!wma->inbih) {
 	WARN("Can't alloc input BIH\n");
 	return FALSE;
     }
-    
+
     mmioRead(wma->hFile, (LPSTR)wma->inbih, mmckInfo.cksize);
-    
+
     TRACE("bih.biSize=%ld\n", 		wma->inbih->biSize);
     TRACE("bih.biWidth=%ld\n", 		wma->inbih->biWidth);
     TRACE("bih.biHeight=%ld\n", 	wma->inbih->biHeight);
@@ -153,9 +153,9 @@
     TRACE("bih.biYPelsPerMeter=%ld\n", 	wma->inbih->biYPelsPerMeter);
     TRACE("bih.biClrUsed=%ld\n", 	wma->inbih->biClrUsed);
     TRACE("bih.biClrImportant=%ld\n", 	wma->inbih->biClrImportant);
-    
+
     mmioAscend(wma->hFile, &mmckInfo, 0);
-    
+
     return TRUE;
 }
 
@@ -167,16 +167,16 @@
     DWORD	inAudioSize;
 };
 
-static BOOL	MCIAVI_AddFrame(WINE_MCIAVI* wma, LPMMCKINFO mmck, 
+static BOOL	MCIAVI_AddFrame(WINE_MCIAVI* wma, LPMMCKINFO mmck,
 				struct AviListBuild* alb)
 {
     if (mmck->ckid == ckidAVIPADDING) return TRUE;
-    
+
     switch (TWOCCFromFOURCC(mmck->ckid)) {
     case cktypeDIBbits:
     case cktypeDIBcompressed:
     case cktypePALchange:
-	TRACE("Adding video frame[%ld]: %ld bytes\n", 
+	TRACE("Adding video frame[%ld]: %ld bytes\n",
 	      alb->numVideoFrames, mmck->cksize);
 	if (alb->numVideoFrames < wma->dwPlayableVideoFrames) {
 	    wma->lpVideoIndex[alb->numVideoFrames].dwOffset = mmck->dwDataOffset;
@@ -189,13 +189,13 @@
 	}
 	break;
     case cktypeWAVEbytes:
-	TRACE("Adding audio frame[%ld]: %ld bytes\n", 
+	TRACE("Adding audio frame[%ld]: %ld bytes\n",
 	      alb->numAudioBlocks, mmck->cksize);
 	if (wma->lpWaveFormat) {
 	    if (alb->numAudioBlocks >= alb->numAudioAllocated) {
 		alb->numAudioAllocated += 32;
-		wma->lpAudioIndex = HeapReAlloc(GetProcessHeap(), 0, 
-						wma->lpAudioIndex, 
+		wma->lpAudioIndex = HeapReAlloc(GetProcessHeap(), 0,
+						wma->lpAudioIndex,
 						alb->numAudioAllocated * sizeof(struct MMIOPos));
 		if (!wma->lpAudioIndex) return FALSE;
 	    }
@@ -222,31 +222,31 @@
     MMCKINFO		mmckList;
     MMCKINFO		mmckInfo;
     struct AviListBuild alb;
-    
+
     if (mmioDescend(wma->hFile, &ckMainRIFF, NULL, 0) != 0) {
 	WARN("Can't find 'RIFF' chunk\n");
 	return FALSE;
     }
-    
+
     if ((ckMainRIFF.ckid != FOURCC_RIFF) || (ckMainRIFF.fccType != formtypeAVI)) {
 	WARN("Can't find 'AVI ' chunk\n");
 	return FALSE;
     }
-    
+
     mmckHead.fccType = listtypeAVIHEADER;
     if (mmioDescend(wma->hFile, &mmckHead, &ckMainRIFF, MMIO_FINDLIST) != 0) {
 	WARN("Can't find 'hdrl' list\n");
 	return FALSE;
     }
-    
+
     mmckInfo.ckid = ckidAVIMAINHDR;
     if (mmioDescend(wma->hFile, &mmckInfo, &mmckHead, MMIO_FINDCHUNK) != 0) {
 	WARN("Can't find 'avih' chunk\n");
 	return FALSE;
     }
-    
+
     mmioRead(wma->hFile, (LPSTR)&wma->mah, sizeof(wma->mah));
-    
+
     TRACE("mah.dwMicroSecPerFrame=%ld\n", 	wma->mah.dwMicroSecPerFrame);
     TRACE("mah.dwMaxBytesPerSec=%ld\n", 	wma->mah.dwMaxBytesPerSec);
     TRACE("mah.dwPaddingGranularity=%ld\n", 	wma->mah.dwPaddingGranularity);
@@ -257,21 +257,21 @@
     TRACE("mah.dwSuggestedBufferSize=%ld\n",	wma->mah.dwSuggestedBufferSize);
     TRACE("mah.dwWidth=%ld\n", 			wma->mah.dwWidth);
     TRACE("mah.dwHeight=%ld\n", 		wma->mah.dwHeight);
-    
+
     mmioAscend(wma->hFile, &mmckInfo, 0);
-    
+
     mmckList.fccType = listtypeSTREAMHEADER;
     if (mmioDescend(wma->hFile, &mmckList, &mmckHead, MMIO_FINDLIST) != 0) {
 	WARN("Can't find 'strl' list\n");
 	return FALSE;
     }
-    
+
     if (!MCIAVI_GetInfoVideo(wma, &mmckList)) {
 	return FALSE;
     }
-    
+
     mmioAscend(wma->hFile, &mmckList, 0);
-    
+
     mmckList.fccType = listtypeSTREAMHEADER;
     if (mmioDescend(wma->hFile, &mmckList, &mmckHead, MMIO_FINDLIST) == 0) {
 	if (!MCIAVI_GetInfoAudio(wma, &mmckList)) {
@@ -279,40 +279,40 @@
 	}
 	mmioAscend(wma->hFile, &mmckList, 0);
     }
-    
+
     mmioAscend(wma->hFile, &mmckHead, 0);
-    
+
     /* no need to read optional JUNK chunk */
-    
+
     mmckList.fccType = listtypeAVIMOVIE;
     if (mmioDescend(wma->hFile, &mmckList, &ckMainRIFF, MMIO_FINDLIST) != 0) {
 	WARN("Can't find 'movi' list\n");
 	return FALSE;
     }
-    
+
     wma->dwPlayableVideoFrames = wma->mah.dwTotalFrames;
-    wma->lpVideoIndex = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, 
+    wma->lpVideoIndex = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY,
 				  wma->dwPlayableVideoFrames * sizeof(struct MMIOPos));
     if (!wma->lpVideoIndex) {
 	WARN("Can't alloc video index array\n");
 	return FALSE;
     }
     wma->dwPlayableAudioBlocks = 0;
-    wma->lpAudioIndex = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, 
+    wma->lpAudioIndex = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY,
 				  wma->dwPlayableVideoFrames * sizeof(struct MMIOPos));
     if (!wma->lpAudioIndex) {
 	WARN("Can't alloc audio index array\n");
 	return FALSE;
     }
-    
+
     alb.numAudioBlocks = alb.numVideoFrames = 0;
     alb.inVideoSize = alb.inAudioSize = 0;
     alb.numAudioAllocated = 0;
-    
+
     while (mmioDescend(wma->hFile, &mmckInfo, &mmckList, 0) == 0) {
-	if (mmckInfo.fccType == listtypeAVIRECORD) {	
+	if (mmckInfo.fccType == listtypeAVIRECORD) {
 	    MMCKINFO	tmp;
-	    
+
 	    while (mmioDescend(wma->hFile, &tmp, &mmckInfo, 0) == 0) {
 		MCIAVI_AddFrame(wma, &tmp, &alb);
 		mmioAscend(wma->hFile, &tmp, 0);
@@ -320,16 +320,16 @@
 	} else {
 	    MCIAVI_AddFrame(wma, &mmckInfo, &alb);
 	}
-	
+
 	mmioAscend(wma->hFile, &mmckInfo, 0);
     }
     if (alb.numVideoFrames != wma->dwPlayableVideoFrames) {
-	WARN("Found %ld video frames (/%ld), reducing playable frames\n", 
+	WARN("Found %ld video frames (/%ld), reducing playable frames\n",
 	     alb.numVideoFrames, wma->dwPlayableVideoFrames);
 	wma->dwPlayableVideoFrames = alb.numVideoFrames;
     }
     wma->dwPlayableAudioBlocks = alb.numAudioBlocks;
-    
+
     if (alb.inVideoSize > wma->ash_video.dwSuggestedBufferSize) {
 	WARN("inVideoSize=%ld suggestedSize=%ld\n", alb.inVideoSize, wma->ash_video.dwSuggestedBufferSize);
 	wma->ash_video.dwSuggestedBufferSize = alb.inVideoSize;
@@ -338,13 +338,13 @@
 	WARN("inAudioSize=%ld suggestedSize=%ld\n", alb.inAudioSize, wma->ash_audio.dwSuggestedBufferSize);
 	wma->ash_audio.dwSuggestedBufferSize = alb.inAudioSize;
     }
-    
+
     wma->indata = HeapAlloc(GetProcessHeap(), 0, wma->ash_video.dwSuggestedBufferSize);
     if (!wma->indata) {
 	WARN("Can't alloc input buffer\n");
 	return FALSE;
     }
-    
+
     return TRUE;
 }
 
@@ -352,28 +352,28 @@
 {
     DWORD	outSize;
     FOURCC	fcc = wma->ash_video.fccHandler;
-    
+
     /* check uncompressed AVI */
-    if ((fcc == mmioFOURCC('D','I','B',' ')) || 
+    if ((fcc == mmioFOURCC('D','I','B',' ')) ||
 	(fcc == mmioFOURCC('R','L','E',' '))) {
-	wma->hic = 0;             
+	wma->hic = 0;
 	MCIAVI_DrawFrame(wma);
 	return TRUE;
     }
-    
+
     /* get the right handle */
     if (fcc == 0) fcc = wma->inbih->biCompression;
     if (fcc == mmioFOURCC('C','R','A','M')) fcc = mmioFOURCC('M','S','V','C');
-    
+
     /* try to get a decompressor for that type */
     wma->hic = ICLocate(ICTYPE_VIDEO, fcc, wma->inbih, NULL, ICMODE_DECOMPRESS);
     if (!wma->hic) {
 	WARN("Can't locate codec for the file\n");
 	return FALSE;
     }
-    
+
     outSize = sizeof(BITMAPINFOHEADER) + 256 * sizeof(RGBQUAD);
-    
+
     wma->outbih = HeapAlloc(GetProcessHeap(), 0, outSize);
     if (!wma->outbih) {
 	WARN("Can't alloc output BIH\n");
@@ -383,7 +383,7 @@
 	WARN("Can't open decompressor\n");
 	return FALSE;
     }
-    
+
     TRACE("bih.biSize=%ld\n", 		wma->outbih->biSize);
     TRACE("bih.biWidth=%ld\n", 		wma->outbih->biWidth);
     TRACE("bih.biHeight=%ld\n", 	wma->outbih->biHeight);
@@ -395,29 +395,29 @@
     TRACE("bih.biYPelsPerMeter=%ld\n", 	wma->outbih->biYPelsPerMeter);
     TRACE("bih.biClrUsed=%ld\n", 	wma->outbih->biClrUsed);
     TRACE("bih.biClrImportant=%ld\n", 	wma->outbih->biClrImportant);
-    
+
     wma->outdata = HeapAlloc(GetProcessHeap(), 0, wma->outbih->biSizeImage);
     if (!wma->outdata) {
 	WARN("Can't alloc output buffer\n");
 	return FALSE;
     }
-    
-    if (ICSendMessage(wma->hic, ICM_DECOMPRESS_BEGIN, 
+
+    if (ICSendMessage(wma->hic, ICM_DECOMPRESS_BEGIN,
 		      (DWORD)wma->inbih, (DWORD)wma->outbih) != ICERR_OK) {
 	WARN("Can't begin decompression\n");
 	return FALSE;
     }
-    
+
     MCIAVI_DrawFrame(wma);
-    
+
     return TRUE;
 }
 
-static void CALLBACK MCIAVI_waveCallback(HWAVEOUT hwo, UINT uMsg, DWORD dwInstance,  
+static void CALLBACK MCIAVI_waveCallback(HWAVEOUT hwo, UINT uMsg, DWORD dwInstance,
 					 DWORD dwParam1, DWORD dwParam2)
 {
     WINE_MCIAVI*	wma = (WINE_MCIAVI*)dwInstance;
-    
+
     switch (uMsg) {
     case WOM_OPEN:
     case WOM_CLOSE:
@@ -437,8 +437,8 @@
     DWORD	dwRet;
     LPWAVEHDR	waveHdr;
     unsigned	i;
-    
-    dwRet = waveOutOpen(&wma->hWave, WAVE_MAPPER, wma->lpWaveFormat, 
+
+    dwRet = waveOutOpen(&wma->hWave, WAVE_MAPPER, wma->lpWaveFormat,
 			(DWORD)MCIAVI_waveCallback, (DWORD)wma, CALLBACK_FUNCTION);
     if (dwRet != 0) {
 	TRACE("Can't open low level audio device %ld\n", dwRet);
@@ -446,22 +446,22 @@
 	wma->hWave = 0;
 	goto cleanUp;
     }
-    
+
     /* FIXME: should set up a heuristic to compute the number of wave headers
      * to be used...
      */
     *nHdr = 7;
-    waveHdr = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, 
+    waveHdr = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY,
 			*nHdr * (sizeof(WAVEHDR) + wma->ash_audio.dwSuggestedBufferSize));
     if (!waveHdr) {
 	TRACE("Can't alloc wave headers\n");
 	dwRet = MCIERR_DEVICE_OPEN;
 	goto cleanUp;
     }
-    
+
     for (i = 0; i < *nHdr; i++) {
 	/* other fields are zero:ed on allocation */
-	waveHdr[i].lpData = (char*)waveHdr + 
+	waveHdr[i].lpData = (char*)waveHdr +
 	    *nHdr * sizeof(WAVEHDR) + i * wma->ash_audio.dwSuggestedBufferSize;
 	waveHdr[i].dwBufferLength = wma->ash_audio.dwSuggestedBufferSize;
 	if (waveOutPrepareHeader(wma->hWave, &waveHdr[i], sizeof(WAVEHDR))) {
@@ -469,36 +469,36 @@
 	    goto cleanUp;
 	}
     }
-    
+
     if (wma->dwCurrVideoFrame != 0 && wma->lpWaveFormat) {
 	FIXME("Should recompute dwCurrAudioBlock, except unsynchronized sound & video\n");
     }
     wma->dwCurrAudioBlock = 0;
-    
+
     wma->hEvent = CreateEventA(NULL, FALSE, FALSE, NULL);
     wma->dwEventCount = *nHdr - 1;
     *pWaveHdr = waveHdr;
  cleanUp:
     return dwRet;
-}	
+}
 
 void MCIAVI_PlayAudioBlocks(WINE_MCIAVI* wma, unsigned nHdr, LPWAVEHDR waveHdr)
 {
     TRACE("%ld (ec=%lu)\n", wma->lpAudioIndex[wma->dwCurrAudioBlock].dwOffset, wma->dwEventCount);
-    
+
     /* push as many blocks as possible => audio gets priority */
-    while (wma->dwStatus != MCI_MODE_STOP && wma->dwStatus != MCI_MODE_NOT_READY && 
+    while (wma->dwStatus != MCI_MODE_STOP && wma->dwStatus != MCI_MODE_NOT_READY &&
 	   wma->dwCurrAudioBlock < wma->dwPlayableAudioBlocks) {
 	unsigned	whidx = wma->dwCurrAudioBlock % nHdr;
-	
+
 	ResetEvent(wma->hEvent);
 	if (InterlockedDecrement(&wma->dwEventCount) < 0 ||
 	    !wma->lpAudioIndex[wma->dwCurrAudioBlock].dwOffset)
 	    break;
-	
+
 	mmioSeek(wma->hFile, wma->lpAudioIndex[wma->dwCurrAudioBlock].dwOffset, SEEK_SET);
 	mmioRead(wma->hFile, waveHdr[whidx].lpData, wma->lpAudioIndex[wma->dwCurrAudioBlock].dwSize);
-	
+
 	waveHdr[whidx].dwFlags &= ~WHDR_DONE;
 	waveHdr[whidx].dwBufferLength = wma->lpAudioIndex[wma->dwCurrAudioBlock].dwSize;
 	waveOutWrite(wma->hWave, &waveHdr[whidx], sizeof(WAVEHDR));
@@ -515,36 +515,36 @@
     HBITMAP		hbmOld;
     int 		nWidth;
     int 		nHeight;
-    
+
     if (!hDC || !wma->inbih)
 	return TRUE;
-    
+
     TRACE("Painting frame %lu\n", wma->dwCurrVideoFrame);
-    
+
     if (wma->hic) {
         pBitmapData = wma->outdata;
         pBitmapInfo = (LPBITMAPINFO)wma->outbih;
-	
+
         nWidth = wma->outbih->biWidth;
-        nHeight = wma->outbih->biHeight;  
-    } else {  
+        nHeight = wma->outbih->biHeight;
+    } else {
         pBitmapData = wma->indata;
         pBitmapInfo = (LPBITMAPINFO)wma->inbih;
-	
+
         nWidth = wma->inbih->biWidth;
-        nHeight = wma->inbih->biHeight;  
-    }  
-    
-    if (!wma->hbmFrame) 
+        nHeight = wma->inbih->biHeight;
+    }
+
+    if (!wma->hbmFrame)
         wma->hbmFrame = CreateCompatibleBitmap(hDC, nWidth, nHeight);
-    
-    SetDIBits(hDC, wma->hbmFrame, 0, nHeight, pBitmapData, pBitmapInfo, DIB_RGB_COLORS); 
-    
+
+    SetDIBits(hDC, wma->hbmFrame, 0, nHeight, pBitmapData, pBitmapInfo, DIB_RGB_COLORS);
+
     hdcMem = CreateCompatibleDC(hDC);
     hbmOld = SelectObject(hdcMem, wma->hbmFrame);
-    
-    BitBlt(hDC, 0, 0, nWidth, nHeight, hdcMem, 0, 0, SRCCOPY);    
-    
+
+    BitBlt(hDC, 0, 0, nWidth, nHeight, hdcMem, 0, 0, SRCCOPY);
+
     SelectObject(hdcMem, hbmOld);
     DeleteDC(hdcMem);
     return TRUE;
@@ -553,35 +553,35 @@
 LRESULT MCIAVI_DrawFrame(WINE_MCIAVI* wma)
 {
     HDC		hDC;
-    
+
     TRACE("Drawing frame %lu\n", wma->dwCurrVideoFrame);
-    
+
     if (!wma->lpVideoIndex[wma->dwCurrVideoFrame].dwOffset)
 	return FALSE;
-    
+
     EnterCriticalSection(&wma->cs);
-    
+
     mmioSeek(wma->hFile, wma->lpVideoIndex[wma->dwCurrVideoFrame].dwOffset, SEEK_SET);
     mmioRead(wma->hFile, wma->indata, wma->lpVideoIndex[wma->dwCurrVideoFrame].dwSize);
-    
+
     /* FIXME ? */
     wma->inbih->biSizeImage = wma->lpVideoIndex[wma->dwCurrVideoFrame].dwSize;
-    
+
     if (wma->hic &&
-	ICDecompress(wma->hic, 0, wma->inbih, wma->indata, 
+	ICDecompress(wma->hic, 0, wma->inbih, wma->indata,
 		     wma->outbih, wma->outdata) != ICERR_OK) {
 	LeaveCriticalSection(&wma->cs);
 	WARN("Decompression error\n");
 	return FALSE;
     }
-    
+
     if (IsWindowVisible(wma->hWnd) && (hDC = GetDC(wma->hWnd)) != 0) {
 	MCIAVI_PaintFrame(wma, hDC);
 	ReleaseDC(wma->hWnd, hDC);
     }
-    
+
     LeaveCriticalSection(&wma->cs);
-    
+
     return TRUE;
 }
 
diff --git a/dlls/winmm/mciavi/private_mciavi.h b/dlls/winmm/mciavi/private_mciavi.h
index 259c184..4c7ebbc 100644
--- a/dlls/winmm/mciavi/private_mciavi.h
+++ b/dlls/winmm/mciavi/private_mciavi.h
@@ -60,7 +60,7 @@
     HIC			hic;
     LPBITMAPINFOHEADER	outbih;
     LPVOID		indata;
-    LPVOID		outdata;   
+    LPVOID		outdata;
     HBITMAP  	    	hbmFrame;
     /* data for playing the audio part */
     HANDLE		hWave;
diff --git a/dlls/winmm/mciavi/wnd.c b/dlls/winmm/mciavi/wnd.c
index 87c9b27..3427834 100644
--- a/dlls/winmm/mciavi/wnd.c
+++ b/dlls/winmm/mciavi/wnd.c
@@ -29,19 +29,19 @@
 static LRESULT WINAPI MCIAVI_WindowProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
 {
     TRACE("hwnd=%x msg=%x wparam=%x lparam=%lx\n", hWnd, uMsg, wParam, lParam);
-    
+
     if (!(WINE_MCIAVI*)GetWindowLongA(hWnd, 0) && uMsg != WM_CREATE)
 	return DefWindowProcA(hWnd, uMsg, wParam, lParam);
-    
+
     switch (uMsg) {
     case WM_CREATE:
 	SetWindowLongA(hWnd, 0, (LPARAM)((CREATESTRUCTA*)lParam)->lpCreateParams);
 	return DefWindowProcA(hWnd, uMsg, wParam, lParam);
-	
+
     case WM_DESTROY:
 	SetWindowLongA(hWnd, 0, 0);
 	return DefWindowProcA(hWnd, uMsg, wParam, lParam);
-	
+
     case WM_ERASEBKGND:
 	{
 	    RECT	rect;
@@ -52,12 +52,12 @@
     case WM_PAINT:
         {
             WINE_MCIAVI* wma = (WINE_MCIAVI*)GetWindowLongA(hWnd, 0);
-	    
+
             /* the animation isn't playing, don't paint */
 	    if (wma->dwStatus == MCI_MODE_NOT_READY)
 		/* default paint handling */
 	    	return DefWindowProcA(hWnd, uMsg, wParam, lParam);
-	    
+
             if (wParam) {
                 EnterCriticalSection(&wma->cs);
                 MCIAVI_PaintFrame(wma, (HDC)wParam);
@@ -65,16 +65,16 @@
             } else {
 	        PAINTSTRUCT ps;
  	        HDC hDC = BeginPaint(hWnd, &ps);
-		
+
                 EnterCriticalSection(&wma->cs);
                 MCIAVI_PaintFrame(wma, hDC);
                 LeaveCriticalSection(&wma->cs);
-		
+
 	        EndPaint(hWnd, &ps);
 	    }
         }
 	break;
-	
+
     default:
 	return DefWindowProcA(hWnd, uMsg, wParam, lParam);
     }
@@ -90,7 +90,7 @@
 
     /* what should be done ? */
     if (wma->hWnd) return TRUE;
-    
+
     ZeroMemory(&wndClass, sizeof(WNDCLASSA));
     wndClass.style         = CS_GLOBALCLASS | CS_DBLCLKS;
     wndClass.lpfnWndProc   = (WNDPROC)MCIAVI_WindowProc;
@@ -99,17 +99,17 @@
     wndClass.hCursor       = LoadCursorA(0, IDC_ARROWA);
     wndClass.hbrBackground = (HBRUSH)(COLOR_BTNFACE + 1);
     wndClass.lpszClassName = "MCIAVI";
-    
+
     RegisterClassA(&wndClass);
 
     if (dwFlags & MCI_DGV_OPEN_PARENT)	hParent = lpOpenParms->hWndParent;
     if (dwFlags & MCI_DGV_OPEN_WS)	dwStyle = lpOpenParms->dwStyle;
     if (dwStyle & WS_CHILD)		p = 0;
 
-    wma->hWnd = CreateWindowA("MCIAVI", "Wine MCI-AVI player", 
-			      dwStyle, p, p, 
-			      (wma->hic ? wma->outbih : wma->inbih)->biWidth, 
-			      (wma->hic ? wma->outbih : wma->inbih)->biHeight, 
+    wma->hWnd = CreateWindowA("MCIAVI", "Wine MCI-AVI player",
+			      dwStyle, p, p,
+			      (wma->hic ? wma->outbih : wma->inbih)->biWidth,
+			      (wma->hic ? wma->outbih : wma->inbih)->biHeight,
 			      hParent, 0, MCIAVI_hInstance, wma);
     return (BOOL)wma->hWnd;
 }
@@ -122,18 +122,18 @@
     WINE_MCIAVI*	wma = MCIAVI_mciGetOpenDev(wDevID);
     RECT		rc;
     char		buffer[256];
-    
+
     FIXME("(%04x, %08lX, %p) : stub\n", wDevID, dwFlags, lpParms);
-    
+
     if (lpParms == NULL)	return MCIERR_NULL_PARAMETER_BLOCK;
     if (wma == NULL)		return MCIERR_INVALID_DEVICE_ID;
-    
+
     if (dwFlags & MCI_DGV_RECT) {
 	rc = lpParms->rc;
     } else {
 	SetRectEmpty(&rc);
     }
-    
+
     *buffer = 0;
     if (dwFlags & MCI_DGV_PUT_CLIENT) {
 	strncat(buffer, "PUT_CLIENT", sizeof(buffer));
@@ -154,7 +154,7 @@
 	strncat(buffer, "PUT_WINDOW", sizeof(buffer));
     }
     TRACE("%s (%d,%d,%d,%d)\n", buffer, rc.left, rc.top, rc.right, rc.bottom);
-    
+
     return 0;
 }
 
@@ -167,10 +167,10 @@
     LPSTR		x = "";
 
     TRACE("(%04x, %08lx, %p)\n", wDevID, dwFlags, lpParms);
-    
+
     if (lpParms == NULL)	return MCIERR_NULL_PARAMETER_BLOCK;
     if (wma == NULL)		return MCIERR_INVALID_DEVICE_ID;
-    
+
     if (dwFlags & MCI_DGV_WHERE_MAX) FIXME("Max NIY\n");
 
     if (dwFlags & MCI_DGV_WHERE_DESTINATION) {
@@ -195,7 +195,7 @@
 	x = "Window";
 	GetClientRect(wma->hWnd, &lpParms->rc);
     }
-    TRACE("%s -> (%d,%d,%d,%d)\n", 
+    TRACE("%s -> (%d,%d,%d,%d)\n",
 	  x, lpParms->rc.left, lpParms->rc.top, lpParms->rc.right, lpParms->rc.bottom);
 
     return 0;
@@ -207,12 +207,12 @@
 DWORD	MCIAVI_mciWindow(UINT wDevID, DWORD dwFlags, LPMCI_DGV_WINDOW_PARMSA lpParms)
 {
     WINE_MCIAVI*	wma = MCIAVI_mciGetOpenDev(wDevID);
-    
+
     TRACE("(%04x, %08lX, %p)\n", wDevID, dwFlags, lpParms);
-    
+
     if (lpParms == NULL)	return MCIERR_NULL_PARAMETER_BLOCK;
     if (wma == NULL)		return MCIERR_INVALID_DEVICE_ID;
-    
+
     if (dwFlags & MCI_DGV_WINDOW_HWND) {
 	FIXME("Setting hWnd to %08lx\n", (DWORD)lpParms->hWnd);
 #if 0
@@ -229,7 +229,7 @@
 	TRACE("Setting caption to '%s'\n", lpParms->lpstrText);
 	SetWindowTextA(wma->hWnd, lpParms->lpstrText);
     }
-    
+
     return 0;
 }
 
diff --git a/dlls/winmm/mcicda/mcicda.c b/dlls/winmm/mcicda/mcicda.c
index 8460b7f..fb24e3d 100644
--- a/dlls/winmm/mcicda/mcicda.c
+++ b/dlls/winmm/mcicda/mcicda.c
@@ -55,7 +55,7 @@
 /*-----------------------------------------------------------------------*/
 
 /**************************************************************************
- * 				MCICDA_drvOpen			[internal]	
+ * 				MCICDA_drvOpen			[internal]
  */
 static	DWORD	MCICDA_drvOpen(LPSTR str, LPMCI_OPEN_DRIVER_PARMSA modp)
 {
@@ -76,7 +76,7 @@
 }
 
 /**************************************************************************
- * 				MCICDA_drvClose			[internal]	
+ * 				MCICDA_drvClose			[internal]
  */
 static	DWORD	MCICDA_drvClose(DWORD dwDevID)
 {
@@ -90,12 +90,12 @@
 }
 
 /**************************************************************************
- * 				MCICDA_GetOpenDrv		[internal]	
+ * 				MCICDA_GetOpenDrv		[internal]
  */
 static WINE_MCICDAUDIO*  MCICDA_GetOpenDrv(UINT wDevID)
 {
     WINE_MCICDAUDIO*	wmcda = (WINE_MCICDAUDIO*)mciGetDriverData(wDevID);
-    
+
     if (wmcda == NULL || wmcda->nUseCount == 0) {
 	WARN("Invalid wDevID=%u\n", wDevID);
 	return 0;
@@ -114,7 +114,7 @@
     DWORD                       mode = MCI_MODE_NOT_READY;
 
     fmt.Format = IOCTL_CDROM_CURRENT_POSITION;
-    if (!DeviceIoControl(wmcda->handle, IOCTL_CDROM_READ_Q_CHANNEL, &fmt, sizeof(fmt), 
+    if (!DeviceIoControl(wmcda->handle, IOCTL_CDROM_READ_Q_CHANNEL, &fmt, sizeof(fmt),
                          &data, sizeof(data), &br, NULL)) {
         if (GetLastError() == STATUS_NO_MEDIA_IN_DEVICE) mode = MCI_MODE_OPEN;
     } else {
@@ -158,9 +158,9 @@
     CDROM_TOC   toc;
     DWORD       br;
     BYTE*       addr;
-    
+
     TRACE("(%p, %08lX, %lu);\n", wmcda, wmcda->dwTimeFormat, dwTime);
-    
+
     switch (wmcda->dwTimeFormat) {
     case MCI_FORMAT_MILLISECONDS:
 	dwFrame = ((dwTime - 1) * CDFRAMES_PERSEC + 500) / 1000;
@@ -176,13 +176,13 @@
     case MCI_FORMAT_TMSF:
     default: /* unknown format ! force TMSF ! ... */
 	wTrack = MCI_TMSF_TRACK(dwTime);
-        if (!DeviceIoControl(wmcda->handle, IOCTL_CDROM_READ_TOC, NULL, 0, 
+        if (!DeviceIoControl(wmcda->handle, IOCTL_CDROM_READ_TOC, NULL, 0,
                              &toc, sizeof(toc), &br, NULL))
             return 0;
         if (wTrack < toc.FirstTrack || wTrack > toc.LastTrack)
             return 0;
         TRACE("MSF %02u-%02u:%02u:%02u\n",
-              MCI_TMSF_TRACK(dwTime), MCI_TMSF_MINUTE(dwTime), 
+              MCI_TMSF_TRACK(dwTime), MCI_TMSF_MINUTE(dwTime),
               MCI_TMSF_SECOND(dwTime), MCI_TMSF_FRAME(dwTime));
         addr = toc.TrackData[wTrack - toc.FirstTrack].Address;
         TRACE("TMSF trackpos[%u]=%d:%d:%d\n",
@@ -207,9 +207,9 @@
     UINT	wFrames;
     CDROM_TOC   toc;
     DWORD       br;
-    
+
     TRACE("(%p, %08lX, %lu);\n", wmcda, tf, dwFrame);
-    
+
     switch (tf) {
     case MCI_FORMAT_MILLISECONDS:
 	dwTime = (dwFrame * 1000) / CDFRAMES_PERSEC + 1;
@@ -227,13 +227,13 @@
 	break;
     case MCI_FORMAT_TMSF:
     default:	/* unknown format ! force TMSF ! ... */
-        if (!DeviceIoControl(wmcda->handle, IOCTL_CDROM_READ_TOC, NULL, 0, 
+        if (!DeviceIoControl(wmcda->handle, IOCTL_CDROM_READ_TOC, NULL, 0,
                              &toc, sizeof(toc), &br, NULL))
             return 0;
-	if (dwFrame < FRAME_OF_TOC(toc, toc.FirstTrack) || 
+	if (dwFrame < FRAME_OF_TOC(toc, toc.FirstTrack) ||
             dwFrame > FRAME_OF_TOC(toc, toc.LastTrack + 1)) {
-	    ERR("Out of range value %lu [%u,%u]\n", 
-		dwFrame, FRAME_OF_TOC(toc, toc.FirstTrack), 
+	    ERR("Out of range value %lu [%u,%u]\n",
+		dwFrame, FRAME_OF_TOC(toc, toc.FirstTrack),
                 FRAME_OF_TOC(toc, toc.LastTrack + 1));
 	    *lpRet = 0;
 	    return 0;
@@ -271,7 +271,7 @@
     char                drive = 0;
 
     TRACE("(%04X, %08lX, %p);\n", wDevID, dwFlags, lpOpenParms);
-    
+
     if (lpOpenParms == NULL) 		return MCIERR_NULL_PARAMETER_BLOCK;
     if (wmcda == NULL)			return MCIERR_INVALID_DEVICE_ID;
 
@@ -298,7 +298,7 @@
             lpOpenParms->lpstrElementName[2])
         {
             WARN("MCI_OPEN_ELEMENT unsupported format: %s\n", lpOpenParms->lpstrElementName);
-            ret = MCIERR_NO_ELEMENT_ALLOWED; 
+            ret = MCIERR_NO_ELEMENT_ALLOWED;
             goto the_error;
         }
         drive = toupper(lpOpenParms->lpstrElementName[0]);
@@ -354,7 +354,7 @@
     TRACE("(%04X, %08lX, %p);\n", wDevID, dwParam, lpParms);
 
     if (wmcda == NULL) 	return MCIERR_INVALID_DEVICE_ID;
-    
+
     if (--wmcda->nUseCount == 0) {
 	CloseHandle(wmcda->handle);
     }
@@ -364,7 +364,7 @@
 /**************************************************************************
  * 				MCICDA_GetDevCaps		[internal]
  */
-static DWORD MCICDA_GetDevCaps(UINT wDevID, DWORD dwFlags, 
+static DWORD MCICDA_GetDevCaps(UINT wDevID, DWORD dwFlags,
 				   LPMCI_GETDEVCAPS_PARMS lpParms)
 {
     DWORD	ret = 0;
@@ -431,7 +431,7 @@
     int i;
     WORD wMagic;
     DWORD dwStart, dwEnd;
- 
+
     /*
      * wMagic collects the wFrames from track 1
      * dwStart, dwEnd collect the beginning and end of the disc respectively, in
@@ -443,17 +443,17 @@
     dwStart = FRAME_OF_TOC(*toc, toc->FirstTrack);
 
     for (i = 0; i <= toc->LastTrack - toc->FirstTrack; i++) {
-        serial += (toc->TrackData[i].Address[1] << 16) | 
+        serial += (toc->TrackData[i].Address[1] << 16) |
             (toc->TrackData[i].Address[2] << 8) | toc->TrackData[i].Address[3];
     }
     dwEnd = FRAME_OF_TOC(*toc, toc->LastTrack + 1);
- 
+
     if (toc->LastTrack - toc->FirstTrack + 1 < 3)
         serial += wMagic + (dwEnd - dwStart);
 
     return serial;
 }
-    
+
 
 /**************************************************************************
  * 				MCICDA_Info			[internal]
@@ -466,13 +466,13 @@
     char		buffer[16];
 
     TRACE("(%04X, %08lX, %p);\n", wDevID, dwFlags, lpParms);
-    
+
     if (lpParms == NULL || lpParms->lpstrReturn == NULL)
 	return MCIERR_NULL_PARAMETER_BLOCK;
     if (wmcda == NULL) return MCIERR_INVALID_DEVICE_ID;
 
     TRACE("buf=%p, len=%lu\n", lpParms->lpstrReturn, lpParms->dwRetSize);
-    
+
     if (dwFlags & MCI_INFO_PRODUCT) {
 	str = "Wine's audio CD";
     } else if (dwFlags & MCI_INFO_MEDIA_UPC) {
@@ -482,7 +482,7 @@
         CDROM_TOC   toc;
         DWORD       br;
 
-        if (!DeviceIoControl(wmcda->handle, IOCTL_CDROM_READ_TOC, NULL, 0, 
+        if (!DeviceIoControl(wmcda->handle, IOCTL_CDROM_READ_TOC, NULL, 0,
                              &toc, sizeof(toc), &br, NULL)) {
 	    return MCICDA_GetError(wmcda);
 	}
@@ -500,7 +500,7 @@
 	    ret = MCIERR_PARAM_OVERFLOW;
 	} else {
 	    strcpy(lpParms->lpstrReturn, str);
-	}	
+	}
     } else {
 	*lpParms->lpstrReturn = 0;
     }
@@ -522,13 +522,13 @@
     DWORD                       br;
 
     TRACE("(%04X, %08lX, %p);\n", wDevID, dwFlags, lpParms);
-    
+
     if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK;
     if (wmcda == NULL) return MCIERR_INVALID_DEVICE_ID;
 
     if (dwFlags & MCI_NOTIFY) {
 	TRACE("MCI_NOTIFY_SUCCESSFUL %08lX !\n", lpParms->dwCallback);
-	mciDriverNotify((HWND)LOWORD(lpParms->dwCallback), 
+	mciDriverNotify((HWND)LOWORD(lpParms->dwCallback),
 			wmcda->wNotifyDeviceID, MCI_NOTIFY_SUCCESSFUL);
     }
     if (dwFlags & MCI_STATUS_ITEM) {
@@ -536,7 +536,7 @@
 	switch (lpParms->dwItem) {
 	case MCI_STATUS_CURRENT_TRACK:
             fmt.Format = IOCTL_CDROM_CURRENT_POSITION;
-            if (!DeviceIoControl(wmcda->handle, IOCTL_CDROM_READ_Q_CHANNEL, &fmt, sizeof(fmt), 
+            if (!DeviceIoControl(wmcda->handle, IOCTL_CDROM_READ_Q_CHANNEL, &fmt, sizeof(fmt),
                                  &data, sizeof(data), &br, NULL))
             {
 		return MCICDA_GetError(wmcda);
@@ -545,7 +545,7 @@
 	    TRACE("CURRENT_TRACK=%lu!\n", lpParms->dwReturn);
 	    break;
 	case MCI_STATUS_LENGTH:
-            if (!DeviceIoControl(wmcda->handle, IOCTL_CDROM_READ_TOC, NULL, 0, 
+            if (!DeviceIoControl(wmcda->handle, IOCTL_CDROM_READ_TOC, NULL, 0,
                                  &toc, sizeof(toc), &br, NULL)) {
                 WARN("error reading TOC !\n");
                 return MCICDA_GetError(wmcda);
@@ -555,7 +555,7 @@
 		if (lpParms->dwTrack < toc.FirstTrack || lpParms->dwTrack > toc.LastTrack)
 		    return MCIERR_OUTOFRANGE;
                 idx = lpParms->dwTrack - toc.FirstTrack;
-		lpParms->dwReturn = FRAME_OF_TOC(toc, lpParms->dwTrack + 1) - 
+		lpParms->dwReturn = FRAME_OF_TOC(toc, lpParms->dwTrack + 1) -
                     FRAME_OF_TOC(toc, lpParms->dwTrack);
 		/* Windows returns one frame less than the total track length for the
 		   last track on the CD.  See CDDB HOWTO.  Verified on Win95OSR2. */
@@ -568,8 +568,8 @@
 		lpParms->dwReturn = FRAME_OF_TOC(toc, toc.LastTrack + 1) -
                     FRAME_OF_TOC(toc, toc.FirstTrack) - 1;
 	    }
-	    lpParms->dwReturn = MCICDA_CalcTime(wmcda, 
-						 (wmcda->dwTimeFormat == MCI_FORMAT_TMSF) 
+	    lpParms->dwReturn = MCICDA_CalcTime(wmcda,
+						 (wmcda->dwTimeFormat == MCI_FORMAT_TMSF)
 						    ? MCI_FORMAT_MSF : wmcda->dwTimeFormat,
 						 lpParms->dwReturn,
 						 &ret);
@@ -588,19 +588,19 @@
 	    ret = MCI_RESOURCE_RETURNED;
 	    break;
 	case MCI_STATUS_NUMBER_OF_TRACKS:
-            if (!DeviceIoControl(wmcda->handle, IOCTL_CDROM_READ_TOC, NULL, 0, 
+            if (!DeviceIoControl(wmcda->handle, IOCTL_CDROM_READ_TOC, NULL, 0,
                                  &toc, sizeof(toc), &br, NULL)) {
                 WARN("error reading TOC !\n");
                 return MCICDA_GetError(wmcda);
 	    }
 	    lpParms->dwReturn = toc.LastTrack - toc.FirstTrack + 1;
 	    TRACE("MCI_STATUS_NUMBER_OF_TRACKS = %lu !\n", lpParms->dwReturn);
-	    if (lpParms->dwReturn == (WORD)-1) 
+	    if (lpParms->dwReturn == (WORD)-1)
 		return MCICDA_GetError(wmcda);
 	    break;
 	case MCI_STATUS_POSITION:
 	    if (dwFlags & MCI_STATUS_START) {
-                if (!DeviceIoControl(wmcda->handle, IOCTL_CDROM_READ_TOC, NULL, 0, 
+                if (!DeviceIoControl(wmcda->handle, IOCTL_CDROM_READ_TOC, NULL, 0,
                                      &toc, sizeof(toc), &br, NULL)) {
                     WARN("error reading TOC !\n");
                     return MCICDA_GetError(wmcda);
@@ -608,7 +608,7 @@
 		lpParms->dwReturn = FRAME_OF_TOC(toc, toc.FirstTrack);
 		TRACE("get MCI_STATUS_START !\n");
 	    } else if (dwFlags & MCI_TRACK) {
-                if (!DeviceIoControl(wmcda->handle, IOCTL_CDROM_READ_TOC, NULL, 0, 
+                if (!DeviceIoControl(wmcda->handle, IOCTL_CDROM_READ_TOC, NULL, 0,
                                      &toc, sizeof(toc), &br, NULL)) {
                     WARN("error reading TOC !\n");
                     return MCICDA_GetError(wmcda);
@@ -619,7 +619,7 @@
 		TRACE("get MCI_TRACK #%lu !\n", lpParms->dwTrack);
             } else {
                 fmt.Format = IOCTL_CDROM_CURRENT_POSITION;
-                if (!DeviceIoControl(wmcda->handle, IOCTL_CDROM_READ_Q_CHANNEL, &fmt, sizeof(fmt), 
+                if (!DeviceIoControl(wmcda->handle, IOCTL_CDROM_READ_Q_CHANNEL, &fmt, sizeof(fmt),
                                      &data, sizeof(data), &br, NULL)) {
                     return MCICDA_GetError(wmcda);
                 }
@@ -650,10 +650,10 @@
 	    break;
 	case 4001: /* FIXME: for bogus FullCD */
 	case MCI_CDA_STATUS_TYPE_TRACK:
-	    if (!(dwFlags & MCI_TRACK)) 
+	    if (!(dwFlags & MCI_TRACK))
 		ret = MCIERR_MISSING_PARAMETER;
 	    else {
-                if (!DeviceIoControl(wmcda->handle, IOCTL_CDROM_READ_TOC, NULL, 0, 
+                if (!DeviceIoControl(wmcda->handle, IOCTL_CDROM_READ_TOC, NULL, 0,
                                      &toc, sizeof(toc), &br, NULL)) {
                     WARN("error reading TOC !\n");
                     return MCICDA_GetError(wmcda);
@@ -688,9 +688,9 @@
     CDROM_PLAY_AUDIO_MSF        play;
     CDROM_SUB_Q_DATA_FORMAT     fmt;
     SUB_Q_CHANNEL_DATA          data;
- 
+
     TRACE("(%04X, %08lX, %p);\n", wDevID, dwFlags, lpParms);
-    
+
     if (lpParms == NULL)
 	return MCIERR_NULL_PARAMETER_BLOCK;
 
@@ -702,7 +702,7 @@
 	TRACE("MCI_FROM=%08lX -> %lu \n", lpParms->dwFrom, start);
     } else {
         fmt.Format = IOCTL_CDROM_CURRENT_POSITION;
-        if (!DeviceIoControl(wmcda->handle, IOCTL_CDROM_READ_Q_CHANNEL, &fmt, sizeof(fmt), 
+        if (!DeviceIoControl(wmcda->handle, IOCTL_CDROM_READ_Q_CHANNEL, &fmt, sizeof(fmt),
                              &data, sizeof(data), &br, NULL)) {
             return MCICDA_GetError(wmcda);
         }
@@ -712,7 +712,7 @@
 	end = MCICDA_CalcFrame(wmcda, lpParms->dwTo);
 	TRACE("MCI_TO=%08lX -> %lu \n", lpParms->dwTo, end);
     } else {
-        if (!DeviceIoControl(wmcda->handle, IOCTL_CDROM_READ_TOC, NULL, 0, 
+        if (!DeviceIoControl(wmcda->handle, IOCTL_CDROM_READ_TOC, NULL, 0,
                              &toc, sizeof(toc), &br, NULL)) {
             WARN("error reading TOC !\n");
             return MCICDA_GetError(wmcda);
@@ -726,7 +726,7 @@
     play.EndingM   = end / CDFRAMES_PERMIN;
     play.EndingS   = (end / CDFRAMES_PERSEC) % 60;
     play.EndingF   = end % CDFRAMES_PERSEC;
-    if (!DeviceIoControl(wmcda->handle, IOCTL_CDROM_PLAY_AUDIO_MSF, &play, sizeof(play), 
+    if (!DeviceIoControl(wmcda->handle, IOCTL_CDROM_PLAY_AUDIO_MSF, &play, sizeof(play),
                          NULL, 0, &br, NULL)) {
 	ret = MCIERR_HARDWARE;
     } else if (dwFlags & MCI_NOTIFY) {
@@ -748,15 +748,15 @@
     DWORD               br;
 
     TRACE("(%04X, %08lX, %p);\n", wDevID, dwFlags, lpParms);
-    
+
     if (wmcda == NULL)	return MCIERR_INVALID_DEVICE_ID;
-    
+
     if (!DeviceIoControl(wmcda->handle, IOCTL_CDROM_STOP_AUDIO, NULL, 0, NULL, 0, &br, NULL))
 	return MCIERR_HARDWARE;
 
     if (lpParms && (dwFlags & MCI_NOTIFY)) {
 	TRACE("MCI_NOTIFY_SUCCESSFUL %08lX !\n", lpParms->dwCallback);
-	mciDriverNotify((HWND)LOWORD(lpParms->dwCallback), 
+	mciDriverNotify((HWND)LOWORD(lpParms->dwCallback),
 			wmcda->wNotifyDeviceID, MCI_NOTIFY_SUCCESSFUL);
     }
     return 0;
@@ -771,15 +771,15 @@
     DWORD               br;
 
     TRACE("(%04X, %08lX, %p);\n", wDevID, dwFlags, lpParms);
-    
+
     if (wmcda == NULL)	return MCIERR_INVALID_DEVICE_ID;
-    
+
     if (!DeviceIoControl(wmcda->handle, IOCTL_CDROM_PAUSE_AUDIO, NULL, 0, NULL, 0, &br, NULL))
 	return MCIERR_HARDWARE;
 
     if (lpParms && (dwFlags & MCI_NOTIFY)) {
         TRACE("MCI_NOTIFY_SUCCESSFUL %08lX !\n", lpParms->dwCallback);
-	mciDriverNotify((HWND)LOWORD(lpParms->dwCallback), 
+	mciDriverNotify((HWND)LOWORD(lpParms->dwCallback),
 			wmcda->wNotifyDeviceID, MCI_NOTIFY_SUCCESSFUL);
     }
     return 0;
@@ -792,17 +792,17 @@
 {
     WINE_MCICDAUDIO*	wmcda = MCICDA_GetOpenDrv(wDevID);
     DWORD               br;
-    
+
     TRACE("(%04X, %08lX, %p);\n", wDevID, dwFlags, lpParms);
-    
+
     if (wmcda == NULL)	return MCIERR_INVALID_DEVICE_ID;
-    
+
     if (!DeviceIoControl(wmcda->handle, IOCTL_CDROM_RESUME_AUDIO, NULL, 0, NULL, 0, &br, NULL))
 	return MCIERR_HARDWARE;
 
     if (lpParms && (dwFlags & MCI_NOTIFY)) {
 	TRACE("MCI_NOTIFY_SUCCESSFUL %08lX !\n", lpParms->dwCallback);
-	mciDriverNotify((HWND)LOWORD(lpParms->dwCallback), 
+	mciDriverNotify((HWND)LOWORD(lpParms->dwCallback),
 			wmcda->wNotifyDeviceID, MCI_NOTIFY_SUCCESSFUL);
     }
     return 0;
@@ -820,14 +820,14 @@
     DWORD                       br;
 
     TRACE("(%04X, %08lX, %p);\n", wDevID, dwFlags, lpParms);
-    
+
     if (wmcda == NULL)	return MCIERR_INVALID_DEVICE_ID;
     if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK;
-    
+
     switch (dwFlags & ~(MCI_NOTIFY|MCI_WAIT)) {
     case MCI_SEEK_TO_START:
 	TRACE("Seeking to start\n");
-        if (!DeviceIoControl(wmcda->handle, IOCTL_CDROM_READ_TOC, NULL, 0, 
+        if (!DeviceIoControl(wmcda->handle, IOCTL_CDROM_READ_TOC, NULL, 0,
                              &toc, sizeof(toc), &br, NULL)) {
             WARN("error reading TOC !\n");
             return MCICDA_GetError(wmcda);
@@ -836,7 +836,7 @@
 	break;
     case MCI_SEEK_TO_END:
 	TRACE("Seeking to end\n");
-        if (!DeviceIoControl(wmcda->handle, IOCTL_CDROM_READ_TOC, NULL, 0, 
+        if (!DeviceIoControl(wmcda->handle, IOCTL_CDROM_READ_TOC, NULL, 0,
                              &toc, sizeof(toc), &br, NULL)) {
             WARN("error reading TOC !\n");
             return MCICDA_GetError(wmcda);
@@ -855,13 +855,13 @@
     seek.M = at / CDFRAMES_PERMIN;
     seek.S = (at / CDFRAMES_PERSEC) % 60;
     seek.F = at % CDFRAMES_PERSEC;
-    if (!DeviceIoControl(wmcda->handle, IOCTL_CDROM_SEEK_AUDIO_MSF, &seek, sizeof(seek), 
+    if (!DeviceIoControl(wmcda->handle, IOCTL_CDROM_SEEK_AUDIO_MSF, &seek, sizeof(seek),
                          NULL, 0, &br, NULL))
 	return MCIERR_HARDWARE;
 
     if (dwFlags & MCI_NOTIFY) {
 	TRACE("MCI_NOTIFY_SUCCESSFUL %08lX !\n", lpParms->dwCallback);
-	mciDriverNotify((HWND)LOWORD(lpParms->dwCallback), 
+	mciDriverNotify((HWND)LOWORD(lpParms->dwCallback),
 			  wmcda->wNotifyDeviceID, MCI_NOTIFY_SUCCESSFUL);
     }
     return 0;
@@ -876,14 +876,14 @@
     DWORD               br;
 
     TRACE("(%04x, %s) !\n", wDevID, (open) ? "OPEN" : "CLOSE");
-    
+
     if (wmcda == NULL) return MCIERR_INVALID_DEVICE_ID;
-    
-    if (!DeviceIoControl(wmcda->handle, 
+
+    if (!DeviceIoControl(wmcda->handle,
                          (open) ? IOCTL_STORAGE_EJECT_MEDIA : IOCTL_STORAGE_LOAD_MEDIA,
                          NULL, 0, NULL, 0, &br, NULL))
 	return MCIERR_HARDWARE;
-      
+
     return 0;
 }
 
@@ -893,9 +893,9 @@
 static DWORD MCICDA_Set(UINT wDevID, DWORD dwFlags, LPMCI_SET_PARMS lpParms)
 {
     WINE_MCICDAUDIO*	wmcda = MCICDA_GetOpenDrv(wDevID);
-    
+
     TRACE("(%04X, %08lX, %p);\n", wDevID, dwFlags, lpParms);
-    
+
     if (wmcda == NULL)	return MCIERR_INVALID_DEVICE_ID;
 
     if (dwFlags & MCI_SET_DOOR_OPEN) {
@@ -932,9 +932,9 @@
     if (dwFlags & MCI_SET_ON) return MCIERR_UNSUPPORTED_FUNCTION;
     if (dwFlags & MCI_SET_OFF) return MCIERR_UNSUPPORTED_FUNCTION;
     if (dwFlags & MCI_NOTIFY) {
-	TRACE("MCI_NOTIFY_SUCCESSFUL %08lX !\n", 
+	TRACE("MCI_NOTIFY_SUCCESSFUL %08lX !\n",
 	      lpParms->dwCallback);
-	mciDriverNotify((HWND)LOWORD(lpParms->dwCallback), 
+	mciDriverNotify((HWND)LOWORD(lpParms->dwCallback),
 			wmcda->wNotifyDeviceID, MCI_NOTIFY_SUCCESSFUL);
     }
     return 0;
@@ -943,7 +943,7 @@
 /**************************************************************************
  * 			DriverProc (MCICDA.@)
  */
-LONG CALLBACK	MCICDA_DriverProc(DWORD dwDevID, HDRVR hDriv, DWORD wMsg, 
+LONG CALLBACK	MCICDA_DriverProc(DWORD dwDevID, HDRVR hDriv, DWORD wMsg,
 				      DWORD dwParam1, DWORD dwParam2)
 {
     switch(wMsg) {
@@ -951,14 +951,14 @@
     case DRV_FREE:		return 1;
     case DRV_OPEN:		return MCICDA_drvOpen((LPSTR)dwParam1, (LPMCI_OPEN_DRIVER_PARMSA)dwParam2);
     case DRV_CLOSE:		return MCICDA_drvClose(dwDevID);
-    case DRV_ENABLE:		return 1;	
+    case DRV_ENABLE:		return 1;
     case DRV_DISABLE:		return 1;
     case DRV_QUERYCONFIGURE:	return 1;
     case DRV_CONFIGURE:		MessageBoxA(0, "MCI audio CD driver !", "Wine Driver", MB_OK); return 1;
     case DRV_INSTALL:		return DRVCNF_RESTART;
     case DRV_REMOVE:		return DRVCNF_RESTART;
     }
-    
+
     if (dwDevID == 0xFFFFFFFF) return MCIERR_UNSUPPORTED_FUNCTION;
 
     switch (wMsg) {
@@ -979,25 +979,25 @@
     case MCI_SET_DOOR_CLOSED:	FIXME("MCI_SET_DOOR_CLOSED called. Please report this.\n");
 				return MCICDA_SetDoor(dwDevID, FALSE);
     /* commands that should be supported */
-    case MCI_LOAD:		
-    case MCI_SAVE:		
-    case MCI_FREEZE:		
-    case MCI_PUT:		
-    case MCI_REALIZE:		
-    case MCI_UNFREEZE:		
-    case MCI_UPDATE:		
-    case MCI_WHERE:		
-    case MCI_STEP:		
-    case MCI_SPIN:		
-    case MCI_ESCAPE:		
-    case MCI_COPY:		
-    case MCI_CUT:		
-    case MCI_DELETE:		
-    case MCI_PASTE:		
+    case MCI_LOAD:
+    case MCI_SAVE:
+    case MCI_FREEZE:
+    case MCI_PUT:
+    case MCI_REALIZE:
+    case MCI_UNFREEZE:
+    case MCI_UPDATE:
+    case MCI_WHERE:
+    case MCI_STEP:
+    case MCI_SPIN:
+    case MCI_ESCAPE:
+    case MCI_COPY:
+    case MCI_CUT:
+    case MCI_DELETE:
+    case MCI_PASTE:
 	FIXME("Unsupported yet command [%lu]\n", wMsg);
 	break;
     /* commands that should report an error */
-    case MCI_WINDOW:		
+    case MCI_WINDOW:
 	TRACE("Unsupported command [%lu]\n", wMsg);
 	break;
     case MCI_OPEN:
diff --git a/dlls/winmm/mciseq/mcimidi.c b/dlls/winmm/mciseq/mcimidi.c
index 91be36a..dffab6e 100644
--- a/dlls/winmm/mciseq/mcimidi.c
+++ b/dlls/winmm/mciseq/mcimidi.c
@@ -21,8 +21,8 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
-/* 
- * Eric POUECH : 
+/*
+ * Eric POUECH :
  * 98/7 changes for making this MIDI driver work on OSS
  * 	current support is limited to MIDI ports of OSS systems
  * 98/9	rewriting MCI code for MIDI
@@ -67,16 +67,16 @@
     HMMIO		hFile;	            	/* mmio file handle open as Element          */
     LPSTR		lpstrElementName;	/* Name of file */
     LPSTR		lpstrCopyright;
-    LPSTR		lpstrName;	       	
+    LPSTR		lpstrName;
     WORD		dwStatus;		/* one from MCI_MODE_xxxx */
-    DWORD		dwMciTimeFormat;	/* One of the supported MCI_FORMAT_xxxx */	       
+    DWORD		dwMciTimeFormat;	/* One of the supported MCI_FORMAT_xxxx */
     WORD		wFormat;		/* Format of MIDI hFile (0, 1 or 2) */
     WORD		nTracks;		/* Number of tracks in hFile */
     WORD		nDivision;		/* Number of division in hFile PPQN or SMPTE */
     WORD		wStartedPlaying;
     DWORD		dwTempo;		/* Tempo (# of 1/4 note per second */
     MCI_MIDITRACK*     	tracks;			/* Content of each track */
-    DWORD		dwPulse;		
+    DWORD		dwPulse;
     DWORD		dwPositionMS;
     DWORD		dwStartTicks;
 } WINE_MCIMIDI;
@@ -122,7 +122,7 @@
 /**************************************************************************
  * 				MCI_SendCommandAsync		[internal]
  */
-static	DWORD MCI_SendCommandAsync(UINT wDevID, UINT wMsg, DWORD dwParam1, 
+static	DWORD MCI_SendCommandAsync(UINT wDevID, UINT wMsg, DWORD dwParam1,
 				   DWORD dwParam2, UINT size)
 {
     struct SCA*	sca = HeapAlloc(GetProcessHeap(), 0, sizeof(struct SCA) + size);
@@ -133,11 +133,11 @@
     sca->wDevID   = wDevID;
     sca->wMsg     = wMsg;
     sca->dwParam1 = dwParam1;
-    
+
     if (size && dwParam2) {
 	sca->dwParam2 = (DWORD)sca + sizeof(struct SCA);
-	/* copy structure passed by program in dwParam2 to be sure 
-	 * we can still use it whatever the program does 
+	/* copy structure passed by program in dwParam2 to be sure
+	 * we can still use it whatever the program does
 	 */
 	memcpy((LPVOID)sca->dwParam2, (LPVOID)dwParam2, size);
     } else {
@@ -158,7 +158,7 @@
 static DWORD MIDI_mciResume(UINT wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpParms);
 
 /**************************************************************************
- * 				MIDI_drvOpen			[internal]	
+ * 				MIDI_drvOpen			[internal]
  */
 static	DWORD	MIDI_drvOpen(LPSTR str, LPMCI_OPEN_DRIVER_PARMSA modp)
 {
@@ -179,14 +179,14 @@
 }
 
 /**************************************************************************
- * 				MCIMIDI_drvClose		[internal]	
+ * 				MCIMIDI_drvClose		[internal]
  */
 static	DWORD	MIDI_drvClose(DWORD dwDevID)
 {
     WINE_MCIMIDI*  wmm = (WINE_MCIMIDI*)mciGetDriverData(dwDevID);
 
     if (wmm) {
-	HeapFree(GetProcessHeap(), 0, wmm);	
+	HeapFree(GetProcessHeap(), 0, wmm);
 	mciSetDriverData(dwDevID, 0);
 	return 1;
     }
@@ -194,12 +194,12 @@
 }
 
 /**************************************************************************
- * 				MIDI_mciGetOpenDev		[internal]	
+ * 				MIDI_mciGetOpenDev		[internal]
  */
 static WINE_MCIMIDI*  MIDI_mciGetOpenDev(UINT wDevID)
 {
     WINE_MCIMIDI*	wmm = (WINE_MCIMIDI*)mciGetDriverData(wDevID);
-    
+
     if (wmm == NULL || wmm->nUseCount == 0) {
 	WARN("Invalid wDevID=%u\n", wDevID);
 	return 0;
@@ -208,31 +208,31 @@
 }
 
 /**************************************************************************
- * 				MIDI_mciReadByte		[internal]	
+ * 				MIDI_mciReadByte		[internal]
  */
 static DWORD MIDI_mciReadByte(WINE_MCIMIDI* wmm, BYTE *lpbyt)
 {
     DWORD	ret = 0;
-    
-    if (lpbyt == NULL || 
+
+    if (lpbyt == NULL ||
 	mmioRead(wmm->hFile, (HPSTR)lpbyt, sizeof(BYTE)) != (long)sizeof(BYTE)) {
 	WARN("Error reading wmm=%p\n", wmm);
 	ret = MCIERR_INVALID_FILE;
     }
-    
+
     return ret;
 }
 
 /**************************************************************************
- * 				MIDI_mciReadWord		[internal]	
+ * 				MIDI_mciReadWord		[internal]
  */
 static DWORD MIDI_mciReadWord(WINE_MCIMIDI* wmm, LPWORD lpw)
 {
     BYTE	hibyte, lobyte;
     DWORD	ret = MCIERR_INVALID_FILE;
-    
-    if (lpw != NULL && 
-	MIDI_mciReadByte(wmm, &hibyte) == 0 && 
+
+    if (lpw != NULL &&
+	MIDI_mciReadByte(wmm, &hibyte) == 0 &&
 	MIDI_mciReadByte(wmm, &lobyte) == 0) {
 	*lpw = ((WORD)hibyte << 8) + lobyte;
 	ret = 0;
@@ -241,13 +241,13 @@
 }
 
 /**************************************************************************
- * 				MIDI_mciReadLong		[internal]	
+ * 				MIDI_mciReadLong		[internal]
  */
 static DWORD MIDI_mciReadLong(WINE_MCIMIDI* wmm, LPDWORD lpdw)
 {
     WORD	hiword, loword;
     DWORD	ret = MCIERR_INVALID_FILE;
-    
+
     if (lpdw != NULL &&
 	MIDI_mciReadWord(wmm, &hiword) == 0 &&
 	MIDI_mciReadWord(wmm, &loword) == 0) {
@@ -258,14 +258,14 @@
 }
 
 /**************************************************************************
- *  				MIDI_mciReadVaryLen		[internal]	
+ *  				MIDI_mciReadVaryLen		[internal]
  */
 static WORD MIDI_mciReadVaryLen(WINE_MCIMIDI* wmm, LPDWORD lpdw)
 {
     BYTE	byte;
     DWORD	value = 0;
     WORD	ret = 0;
-    
+
     if (lpdw == NULL) {
 	ret = MCIERR_INVALID_FILE;
     } else {
@@ -274,7 +274,7 @@
 		return 0;
 	    }
 	    value = (value << 7) + (byte & 0x7F);
-	    ret++; 
+	    ret++;
 	} while (byte & 0x80);
 	*lpdw = value;
 	/*
@@ -285,16 +285,16 @@
 }
 
 /**************************************************************************
- * 				MIDI_mciReadNextEvent		[internal]	
+ * 				MIDI_mciReadNextEvent		[internal]
  */
-static DWORD	MIDI_mciReadNextEvent(WINE_MCIMIDI* wmm, MCI_MIDITRACK* mmt) 
+static DWORD	MIDI_mciReadNextEvent(WINE_MCIMIDI* wmm, MCI_MIDITRACK* mmt)
 {
     BYTE	b1, b2 = 0, b3;
     WORD	hw = 0;
     DWORD	evtPulse;
     DWORD	evtLength;
     DWORD	tmp;
-    
+
     if (mmioSeek(wmm->hFile, mmt->dwIndex, SEEK_SET) != mmt->dwIndex) {
 	WARN("Can't seek at %08lX \n", mmt->dwIndex);
 	return MCIERR_INVALID_FILE;
@@ -309,7 +309,7 @@
 	break;
     case 0xFF:
 	MIDI_mciReadByte(wmm, &b2);	evtLength++;
-	
+
 	evtLength += MIDI_mciReadVaryLen(wmm, &tmp);
 	if (evtLength >= 0x10000u) {
 	    /* this limitation shouldn't be a problem */
@@ -342,47 +342,47 @@
     }
     if (mmt->dwIndex + evtLength > mmt->dwLast)
 	return MCIERR_INTERNAL;
-    
+
     mmt->dwEventPulse += evtPulse;
     mmt->dwEventData   = (hw << 16) + (b2 << 8) + b1;
     mmt->wEventLength  = evtLength;
-    
+
     /*
-      TRACE("[%u] => pulse=%08lx(%08lx), data=%08lx, length=%u\n", 
-      mmt->wTrackNr, mmt->dwEventPulse, evtPulse, 
+      TRACE("[%u] => pulse=%08lx(%08lx), data=%08lx, length=%u\n",
+      mmt->wTrackNr, mmt->dwEventPulse, evtPulse,
       mmt->dwEventData, mmt->wEventLength);
     */
     return 0;
 }
 
 /**************************************************************************
- * 				MIDI_mciReadMTrk		[internal]	
+ * 				MIDI_mciReadMTrk		[internal]
  */
 static DWORD MIDI_mciReadMTrk(WINE_MCIMIDI* wmm, MCI_MIDITRACK* mmt)
 {
     DWORD		toberead;
     FOURCC		fourcc;
-    
-    if (mmioRead(wmm->hFile, (HPSTR)&fourcc, (long)sizeof(FOURCC)) != 
+
+    if (mmioRead(wmm->hFile, (HPSTR)&fourcc, (long)sizeof(FOURCC)) !=
 	(long)sizeof(FOURCC)) {
 	return MCIERR_INVALID_FILE;
     }
-    
+
     if (fourcc != mmioFOURCC('M', 'T', 'r', 'k')) {
 	WARN("Can't synchronize on 'MTrk' !\n");
 	return MCIERR_INVALID_FILE;
     }
-    
+
     if (MIDI_mciReadLong(wmm, &toberead) != 0) {
 	return MCIERR_INVALID_FILE;
     }
     mmt->dwFirst = mmioSeek(wmm->hFile, 0, SEEK_CUR); /* >= 0 */
     mmt->dwLast = mmt->dwFirst + toberead;
-    
+
     /* compute # of pulses in this track */
     mmt->dwIndex = mmt->dwFirst;
     mmt->dwEventPulse = 0;
-    
+
     while (MIDI_mciReadNextEvent(wmm, mmt) == 0 && LOWORD(mmt->dwEventData) != 0x2FFF) {
 	char	buf[1024];
 	WORD	len;
@@ -395,7 +395,7 @@
 	    /* position after meta data header */
 	    mmioSeek(wmm->hFile, mmt->dwIndex + HIWORD(mmt->dwEventData), SEEK_SET);
 	    len = mmt->wEventLength - HIWORD(mmt->dwEventData);
-		    
+
 	    if (len >= sizeof(buf)) {
 		WARN("Buffer for text is too small (%d bytes, when %u are needed)\n", sizeof(buf) - 1, len);
 		len = sizeof(buf) - 1;
@@ -425,35 +425,35 @@
 	}
     }
     mmt->dwLength = mmt->dwEventPulse;
-    
+
     TRACE("Track %u has %lu bytes and %lu pulses\n", mmt->wTrackNr, toberead, mmt->dwLength);
-    
+
     /* reset track data */
     mmt->wStatus = 1;	/* ok, playing */
     mmt->dwIndex = mmt->dwFirst;
     mmt->dwEventPulse = 0;
-    
+
     if (mmioSeek(wmm->hFile, 0, SEEK_CUR) != mmt->dwLast) {
-	WARN("Ouch, out of sync seek=%lu track=%lu\n", 
+	WARN("Ouch, out of sync seek=%lu track=%lu\n",
 	     mmioSeek(wmm->hFile, 0, SEEK_CUR), mmt->dwLast);
 	/* position at end of this track, to be ready to read next track */
 	mmioSeek(wmm->hFile, mmt->dwLast, SEEK_SET);
     }
-    
+
     return 0;
 }
 
 /**************************************************************************
- * 				MIDI_mciReadMThd		[internal]	
+ * 				MIDI_mciReadMThd		[internal]
  */
 static DWORD MIDI_mciReadMThd(WINE_MCIMIDI* wmm, DWORD dwOffset)
 {
     DWORD	toberead;
     FOURCC	fourcc;
     WORD	nt;
-    
+
     TRACE("(%p, %08lX);\n", wmm, dwOffset);
-    
+
     if (mmioSeek(wmm->hFile, dwOffset, SEEK_SET) != dwOffset) {
 	WARN("Can't seek at %08lX begin of 'MThd' \n", dwOffset);
 	return MCIERR_INVALID_FILE;
@@ -461,24 +461,24 @@
     if (mmioRead(wmm->hFile, (HPSTR)&fourcc,
 		   (long) sizeof(FOURCC)) != (long) sizeof(FOURCC))
 	return MCIERR_INVALID_FILE;
-    
+
     if (fourcc != mmioFOURCC('M', 'T', 'h', 'd')) {
 	WARN("Can't synchronize on 'MThd' !\n");
 	return MCIERR_INVALID_FILE;
     }
-    
+
     if (MIDI_mciReadLong(wmm, &toberead) != 0 || toberead < 3 * sizeof(WORD))
 	return MCIERR_INVALID_FILE;
-    
+
     if (MIDI_mciReadWord(wmm, &wmm->wFormat) != 0 ||
 	MIDI_mciReadWord(wmm, &wmm->nTracks) != 0 ||
 	MIDI_mciReadWord(wmm, &wmm->nDivision) != 0) {
 	return MCIERR_INVALID_FILE;
     }
-    
+
     TRACE("toberead=0x%08lX, wFormat=0x%04X nTracks=0x%04X nDivision=0x%04X\n",
 	  toberead, wmm->wFormat, wmm->nTracks, wmm->nDivision);
-    
+
     /* MS doc says that the MIDI MCI time format must be put by default to the format
      * stored in the MIDI file...
      */
@@ -486,12 +486,12 @@
 	/* eric.pouech@lemel.fr 98/11
 	 * In did not check this very code (pulses are expressed as SMPTE sub-frames).
 	 * In about 40 MB of MIDI files I have, none was SMPTE based...
-	 * I'm just wondering if this is widely used :-). So, if someone has one of 
+	 * I'm just wondering if this is widely used :-). So, if someone has one of
 	 * these files, I'd like to know about.
 	 */
 	FIXME("Handling SMPTE time in MIDI files has not been tested\n"
 	      "Please report to comp.emulators.ms-windows.wine with MIDI file !\n");
-	
+
 	switch (HIBYTE(wmm->nDivision)) {
 	case 0xE8:	wmm->dwMciTimeFormat = MCI_FORMAT_SMPTE_24;	break;	/* -24 */
 	case 0xE7:	wmm->dwMciTimeFormat = MCI_FORMAT_SMPTE_25;	break;	/* -25 */
@@ -517,7 +517,7 @@
     } else {
 	wmm->dwMciTimeFormat = MCI_FORMAT_MILLISECONDS;
     }
-    
+
     switch (wmm->wFormat) {
     case 0:
 	if (wmm->nTracks != 1) {
@@ -533,23 +533,23 @@
 	     "Please report with MIDI file !\n", wmm->wFormat);
 	return MCIERR_INVALID_FILE;
     }
-    
+
     if (wmm->nTracks & 0x8000) {
 	/* this shouldn't be a problem... */
 	WARN("Ouch !! Implementation limitation to 32k tracks per MIDI file is overflowed\n");
 	wmm->nTracks = 0x7FFF;
     }
-    
+
     if ((wmm->tracks = HeapAlloc(GetProcessHeap(), 0, sizeof(MCI_MIDITRACK) * wmm->nTracks)) == NULL) {
 	return MCIERR_OUT_OF_MEMORY;
     }
-    
-    toberead -= 3 * sizeof(WORD); 
+
+    toberead -= 3 * sizeof(WORD);
     if (toberead > 0) {
 	TRACE("Size of MThd > 6, skipping %ld extra bytes\n", toberead);
 	mmioSeek(wmm->hFile, toberead, SEEK_CUR);
     }
-    
+
     for (nt = 0; nt < wmm->nTracks; nt++) {
 	wmm->tracks[nt].wTrackNr = nt;
 	if (MIDI_mciReadMTrk(wmm, &wmm->tracks[nt]) != 0) {
@@ -557,9 +557,9 @@
 	    return MCIERR_INVALID_FILE;
 	}
     }
-    
+
     wmm->dwTempo = 500000;
-    
+
     return 0;
 }
 
@@ -569,7 +569,7 @@
 static	DWORD	MIDI_ConvertPulseToMS(WINE_MCIMIDI* wmm, DWORD pulse)
 {
     DWORD	ret = 0;
-    
+
     /* FIXME: this function may return false values since the tempo (wmm->dwTempo)
      * may change during file playing
      */
@@ -580,15 +580,15 @@
 	int	nsf = LOBYTE(wmm->nDivision);		/* number of sub-frames */
 	ret = (pulse * 1000) / (nf * nsf);
     } else {
-	ret = (DWORD)((double)pulse * ((double)wmm->dwTempo / 1000) /	
+	ret = (DWORD)((double)pulse * ((double)wmm->dwTempo / 1000) /
 		      (double)wmm->nDivision);
     }
-    
+
     /*
-      TRACE("pulse=%lu tempo=%lu division=%u=0x%04x => ms=%lu\n", 
+      TRACE("pulse=%lu tempo=%lu division=%u=0x%04x => ms=%lu\n",
       pulse, wmm->dwTempo, wmm->nDivision, wmm->nDivision, ret);
     */
-    
+
     return ret;
 }
 
@@ -602,23 +602,23 @@
 static	DWORD	MIDI_ConvertTimeFormatToMS(WINE_MCIMIDI* wmm, DWORD val)
 {
     DWORD	ret = 0;
-    
+
     switch (wmm->dwMciTimeFormat) {
-    case MCI_FORMAT_MILLISECONDS:	
-	ret = val;		
+    case MCI_FORMAT_MILLISECONDS:
+	ret = val;
 	break;
     case MCI_FORMAT_SMPTE_24:
-	ret = 
+	ret =
 	    (HIBYTE(HIWORD(val)) * 125) / 3 +             LOBYTE(HIWORD(val)) * TIME_MS_IN_ONE_SECOND +
 	    HIBYTE(LOWORD(val)) * TIME_MS_IN_ONE_MINUTE + LOBYTE(LOWORD(val)) * TIME_MS_IN_ONE_HOUR;
 	break;
-    case MCI_FORMAT_SMPTE_25:		
-	ret = 
+    case MCI_FORMAT_SMPTE_25:
+	ret =
 	    HIBYTE(HIWORD(val)) * 40 + 		  	  LOBYTE(HIWORD(val)) * TIME_MS_IN_ONE_SECOND +
 	    HIBYTE(LOWORD(val)) * TIME_MS_IN_ONE_MINUTE + LOBYTE(LOWORD(val)) * TIME_MS_IN_ONE_HOUR;
 	break;
-    case MCI_FORMAT_SMPTE_30:		
-	ret = 
+    case MCI_FORMAT_SMPTE_30:
+	ret =
 	    (HIBYTE(HIWORD(val)) * 100) / 3 + 		  LOBYTE(HIWORD(val)) * TIME_MS_IN_ONE_SECOND +
 	    HIBYTE(LOWORD(val)) * TIME_MS_IN_ONE_MINUTE + LOBYTE(LOWORD(val)) * TIME_MS_IN_ONE_HOUR;
 	break;
@@ -629,7 +629,7 @@
       TRACE("val=%lu=0x%08lx [tf=%lu] => ret=%lu\n", val, val, wmm->dwMciTimeFormat, ret);
     */
     return ret;
-}	
+}
 
 /**************************************************************************
  * 			MIDI_ConvertMSToTimeFormat		[internal]
@@ -638,27 +638,27 @@
 {
     DWORD	ret = 0, val = _val;
     DWORD	h, m, s, f;
-    
+
     switch (wmm->dwMciTimeFormat) {
-    case MCI_FORMAT_MILLISECONDS:	
-	ret = val;		
+    case MCI_FORMAT_MILLISECONDS:
+	ret = val;
 	break;
     case MCI_FORMAT_SMPTE_24:
-    case MCI_FORMAT_SMPTE_25:		
-    case MCI_FORMAT_SMPTE_30:		
-	h = val / TIME_MS_IN_ONE_HOUR;	
-	m = (val -= h * TIME_MS_IN_ONE_HOUR)   / TIME_MS_IN_ONE_MINUTE;	
+    case MCI_FORMAT_SMPTE_25:
+    case MCI_FORMAT_SMPTE_30:
+	h = val / TIME_MS_IN_ONE_HOUR;
+	m = (val -= h * TIME_MS_IN_ONE_HOUR)   / TIME_MS_IN_ONE_MINUTE;
 	s = (val -= m * TIME_MS_IN_ONE_MINUTE) / TIME_MS_IN_ONE_SECOND;
 	switch (wmm->dwMciTimeFormat) {
 	case MCI_FORMAT_SMPTE_24:
 	    /* one frame is 1000/24 val long, 1000/24 == 125/3 */
 	    f = (val * 3) / 125; 	val -= (f * 125) / 3;
 	    break;
-	case MCI_FORMAT_SMPTE_25:		
+	case MCI_FORMAT_SMPTE_25:
 	    /* one frame is 1000/25 ms long, 1000/25 == 40 */
 	    f = val / 40; 		val -= f * 40;
 	    break;
-	case MCI_FORMAT_SMPTE_30:		
+	case MCI_FORMAT_SMPTE_30:
 	    /* one frame is 1000/30 ms long, 1000/30 == 100/3 */
 	    f = (val * 3) / 100; 	val -= (f * 100) / 3;
 	    break;
@@ -677,7 +677,7 @@
       TRACE("val=%lu [tf=%lu] => ret=%lu=0x%08lx\n", _val, wmm->dwMciTimeFormat, ret, ret);
     */
     return ret;
-}	
+}
 
 /**************************************************************************
  * 			MIDI_GetMThdLengthMS			[internal]
@@ -686,7 +686,7 @@
 {
     WORD	nt;
     DWORD	ret = 0;
-    
+
     for (nt = 0; nt < wmm->nTracks; nt++) {
 	if (wmm->wFormat == 2) {
 	    ret += wmm->tracks[nt].dwLength;
@@ -699,16 +699,16 @@
 }
 
 /**************************************************************************
- * 				MIDI_mciOpen			[internal]	
+ * 				MIDI_mciOpen			[internal]
  */
 static DWORD MIDI_mciOpen(UINT wDevID, DWORD dwFlags, LPMCI_OPEN_PARMSA lpParms)
 {
     DWORD		dwRet = 0;
     DWORD		dwDeviceID;
     WINE_MCIMIDI*	wmm = (WINE_MCIMIDI*)mciGetDriverData(wDevID);
-    
+
     TRACE("(%04x, %08lX, %p)\n", wDevID, dwFlags, lpParms);
-    
+
     if (lpParms == NULL) 	return MCIERR_NULL_PARAMETER_BLOCK;
     if (wmm == NULL)		return MCIERR_INVALID_DEVICE_ID;
     if (dwFlags & MCI_OPEN_SHAREABLE)
@@ -721,18 +721,18 @@
 	return MCIERR_DEVICE_OPEN;
     }
     wmm->nUseCount++;
-    
+
     wmm->hFile = 0;
     wmm->hMidi = 0;
     dwDeviceID = lpParms->wDeviceID;
-    
+
     TRACE("wDevID=%04X (lpParams->wDeviceID=%08lX)\n", wDevID, dwDeviceID);
     /*	lpParms->wDeviceID = wDevID;*/
-    
+
     if (dwFlags & MCI_OPEN_ELEMENT) {
 	TRACE("MCI_OPEN_ELEMENT '%s' !\n", lpParms->lpstrElementName);
 	if (lpParms->lpstrElementName && strlen(lpParms->lpstrElementName) > 0) {
-	    wmm->hFile = mmioOpenA(lpParms->lpstrElementName, NULL, 
+	    wmm->hFile = mmioOpenA(lpParms->lpstrElementName, NULL,
 				   MMIO_ALLOCBUF | MMIO_READ | MMIO_DENYWRITE);
 	    if (wmm->hFile == 0) {
 		WARN("Can't find file '%s' !\n", lpParms->lpstrElementName);
@@ -744,7 +744,7 @@
 	}
     }
     TRACE("hFile=%u\n", wmm->hFile);
-    
+
     /* FIXME: should I get a strdup() of it instead? */
     wmm->lpstrElementName = HeapAlloc( GetProcessHeap(), 0, strlen(lpParms->lpstrElementName)+1 );
     strcpy( wmm->lpstrElementName, lpParms->lpstrElementName );
@@ -755,18 +755,18 @@
     wmm->dwStatus = MCI_MODE_NOT_READY;	/* while loading file contents */
     /* spec says it should be the default format from the MIDI file... */
     wmm->dwMciTimeFormat = MCI_FORMAT_MILLISECONDS;
-    
+
     if (wmm->hFile != 0) {
 	MMCKINFO	ckMainRIFF;
 	MMCKINFO	mmckInfo;
 	DWORD		dwOffset = 0;
-	
+
 	if (mmioDescend(wmm->hFile, &ckMainRIFF, NULL, 0) != 0) {
 	    dwRet = MCIERR_INVALID_FILE;
 	} else {
 	    TRACE("ParentChunk ckid=%.4s fccType=%.4s cksize=%08lX \n",
 		  (LPSTR)&ckMainRIFF.ckid, (LPSTR)&ckMainRIFF.fccType, ckMainRIFF.cksize);
-	    
+
 	    if (ckMainRIFF.ckid == FOURCC_RIFF && ckMainRIFF.fccType == mmioFOURCC('R', 'M', 'I', 'D')) {
 		mmckInfo.ckid = mmioFOURCC('d', 'a', 't', 'a');
 		mmioSeek(wmm->hFile, ckMainRIFF.dwDataOffset + ((ckMainRIFF.cksize + 1) & ~1), SEEK_SET);
@@ -804,14 +804,14 @@
  * 				MIDI_mciStop			[internal]
  */
 static DWORD MIDI_mciStop(UINT wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpParms)
-{    
+{
     WINE_MCIMIDI*	wmm = MIDI_mciGetOpenDev(wDevID);
     DWORD		dwRet = 0;
 
     TRACE("(%04X, %08lX, %p);\n", wDevID, dwFlags, lpParms);
-    
+
     if (wmm == NULL)	return MCIERR_INVALID_DEVICE_ID;
-    
+
     if (wmm->dwStatus != MCI_MODE_STOP) {
 	int	oldstat = wmm->dwStatus;
 
@@ -826,11 +826,11 @@
     /* sanitiy reset */
     wmm->dwStatus = MCI_MODE_STOP;
 
-    TRACE("wmm->dwStatus=%d\n", wmm->dwStatus);    
+    TRACE("wmm->dwStatus=%d\n", wmm->dwStatus);
 
     if (lpParms && (dwFlags & MCI_NOTIFY)) {
 	TRACE("MCI_NOTIFY_SUCCESSFUL %08lX !\n", lpParms->dwCallback);
-	mciDriverNotify((HWND)LOWORD(lpParms->dwCallback), 
+	mciDriverNotify((HWND)LOWORD(lpParms->dwCallback),
 			wmm->wNotifyDeviceID, MCI_NOTIFY_SUCCESSFUL);
     }
     return 0;
@@ -842,15 +842,15 @@
 static DWORD MIDI_mciClose(UINT wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpParms)
 {
     WINE_MCIMIDI*	wmm = MIDI_mciGetOpenDev(wDevID);
-    
+
     TRACE("(%04X, %08lX, %p);\n", wDevID, dwFlags, lpParms);
-    
+
     if (wmm == NULL)	return MCIERR_INVALID_DEVICE_ID;
-    
+
     if (wmm->dwStatus != MCI_MODE_STOP) {
 	MIDI_mciStop(wDevID, MCI_WAIT, lpParms);
     }
-    
+
     wmm->nUseCount--;
     if (wmm->nUseCount == 0) {
 	if (wmm->hFile != 0) {
@@ -866,10 +866,10 @@
 	TRACE("Shouldn't happen... nUseCount=%d\n", wmm->nUseCount);
 	return MCIERR_INTERNAL;
     }
-    
+
     if (lpParms && (dwFlags & MCI_NOTIFY)) {
 	TRACE("MCI_NOTIFY_SUCCESSFUL %08lX !\n", lpParms->dwCallback);
-	mciDriverNotify((HWND)LOWORD(lpParms->dwCallback), 
+	mciDriverNotify((HWND)LOWORD(lpParms->dwCallback),
 			wmm->wNotifyDeviceID, MCI_NOTIFY_SUCCESSFUL);
     }
     return 0;
@@ -878,16 +878,16 @@
 /**************************************************************************
  * 				MIDI_mciFindNextEvent		[internal]
  */
-static MCI_MIDITRACK*	MIDI_mciFindNextEvent(WINE_MCIMIDI* wmm, LPDWORD hiPulse) 
+static MCI_MIDITRACK*	MIDI_mciFindNextEvent(WINE_MCIMIDI* wmm, LPDWORD hiPulse)
 {
     WORD		cnt, nt;
     MCI_MIDITRACK*	mmt;
-    
+
     *hiPulse = 0xFFFFFFFFul;
     cnt = 0xFFFFu;
     for (nt = 0; nt < wmm->nTracks; nt++) {
 	mmt = &wmm->tracks[nt];
-	
+
 	if (mmt->wStatus == 0)
 	    continue;
 	if (mmt->dwEventPulse < *hiPulse) {
@@ -910,16 +910,16 @@
     MCI_MIDITRACK*	mmt;
     DWORD		hiPulse;
     WINE_MCIMIDI*	wmm = MIDI_mciGetOpenDev(wDevID);
-    
+
     TRACE("(%04X, %08lX, %p);\n", wDevID, dwFlags, lpParms);
-    
+
     if (wmm == NULL)	return MCIERR_INVALID_DEVICE_ID;
-    
+
     if (wmm->hFile == 0) {
 	WARN("Can't play: no file '%s' !\n", wmm->lpstrElementName);
 	return MCIERR_FILE_NOT_FOUND;
     }
-    
+
     if (wmm->dwStatus != MCI_MODE_STOP) {
 	if (wmm->dwStatus == MCI_MODE_PAUSE) {
 	    /* FIXME: parameters (start/end) in lpParams may not be used */
@@ -928,30 +928,30 @@
 	WARN("Can't play: device is not stopped !\n");
 	return MCIERR_INTERNAL;
     }
-    
-    if (!(dwFlags & MCI_WAIT)) {	
+
+    if (!(dwFlags & MCI_WAIT)) {
 	/** FIXME: I'm not 100% sure that wNotifyDeviceID is the right value in all cases ??? */
 	return MCI_SendCommandAsync(wmm->wNotifyDeviceID, MCI_PLAY, dwFlags, (DWORD)lpParms, sizeof(LPMCI_PLAY_PARMS));
     }
-    
+
     if (lpParms && (dwFlags & MCI_FROM)) {
-	dwStartMS = MIDI_ConvertTimeFormatToMS(wmm, lpParms->dwFrom); 
+	dwStartMS = MIDI_ConvertTimeFormatToMS(wmm, lpParms->dwFrom);
     } else {
 	dwStartMS = wmm->dwPositionMS;
     }
-    
+
     if (lpParms && (dwFlags & MCI_TO)) {
 	dwEndMS = MIDI_ConvertTimeFormatToMS(wmm, lpParms->dwTo);
     } else {
 	dwEndMS = 0xFFFFFFFFul;
     }
-    
+
     TRACE("Playing from %lu to %lu\n", dwStartMS, dwEndMS);
-    
+
     /* init tracks */
     for (nt = 0; nt < wmm->nTracks; nt++) {
 	mmt = &wmm->tracks[nt];
-	
+
 	mmt->wStatus = 1;	/* ok, playing */
 	mmt->dwIndex = mmt->dwFirst;
 	if (wmm->wFormat == 2 && nt > 0) {
@@ -961,7 +961,7 @@
 	}
 	MIDI_mciReadNextEvent(wmm, mmt); /* FIXME == 0 */
     }
-    
+
     dwRet = midiOutOpen(&wmm->hMidi, MIDIMAPPER, 0L, 0L, CALLBACK_NULL);
     /*	dwRet = midiInOpen(&wmm->hMidi, MIDIMAPPER, 0L, 0L, CALLBACK_NULL);*/
     if (dwRet != MMSYSERR_NOERROR) {
@@ -973,20 +973,20 @@
     wmm->dwStatus = MCI_MODE_PLAY;
     wmm->dwPositionMS = 0;
     wmm->wStartedPlaying = FALSE;
-    
+
     while (wmm->dwStatus != MCI_MODE_STOP && wmm->dwStatus != MCI_MODE_NOT_READY) {
-	/* it seems that in case of multi-threading, gcc is optimizing just a little bit 
-	 * too much. Tell gcc not to optimize status value using volatile. 
+	/* it seems that in case of multi-threading, gcc is optimizing just a little bit
+	 * too much. Tell gcc not to optimize status value using volatile.
 	 */
 	while (((volatile WINE_MCIMIDI*)wmm)->dwStatus == MCI_MODE_PAUSE);
-	
+
 	doPlay = (wmm->dwPositionMS >= dwStartMS && wmm->dwPositionMS <= dwEndMS);
-	
+
 	TRACE("wmm->dwStatus=%d, doPlay=%c\n", wmm->dwStatus, doPlay ? 'T' : 'F');
-	
+
 	if ((mmt = MIDI_mciFindNextEvent(wmm, &hiPulse)) == NULL)
 	    break;  /* no more event on tracks */
-	
+
 	/* if starting playing, then set StartTicks to the value it would have had
 	 * if play had started at position 0
 	 */
@@ -995,22 +995,22 @@
 	    wmm->wStartedPlaying = TRUE;
 	    TRACE("Setting dwStartTicks to %lu\n", wmm->dwStartTicks);
 	}
-	
+
 	if (hiPulse > wmm->dwPulse) {
 	    wmm->dwPositionMS += MIDI_ConvertPulseToMS(wmm, hiPulse - wmm->dwPulse);
 	    if (doPlay) {
 		DWORD	togo = wmm->dwStartTicks + wmm->dwPositionMS;
 		DWORD	tc = GetTickCount();
-		
+
 		TRACE("Pulses hi=0x%08lx <> cur=0x%08lx\n", hiPulse, wmm->dwPulse);
-		TRACE("Wait until %lu => %lu ms\n", 	
+		TRACE("Wait until %lu => %lu ms\n",
 		      tc - wmm->dwStartTicks, togo - wmm->dwStartTicks);
-		if (tc < togo)	
+		if (tc < togo)
 		    Sleep(togo - tc);
 	    }
 	    wmm->dwPulse = hiPulse;
 	}
-	
+
 	switch (LOBYTE(LOWORD(mmt->dwEventData))) {
 	case 0xF0:
 	case 0xF7:	/* sysex events */
@@ -1025,7 +1025,7 @@
 	    case 0x00: /* 16-bit sequence number */
 		if (TRACE_ON(mcimidi)) {
 		    WORD	twd;
-		    
+
 		    MIDI_mciReadWord(wmm, &twd);	/* == 0 */
 		    TRACE("Got sequence number %u\n", twd);
 		}
@@ -1040,10 +1040,10 @@
 		if (TRACE_ON(mcimidi)) {
 		    char	buf[1024];
 		    WORD	len = mmt->wEventLength - HIWORD(mmt->dwEventData);
-		    static	char*	info[8] = {"", "Text", "Copyright", "Seq/Trk name", 
+		    static	char*	info[8] = {"", "Text", "Copyright", "Seq/Trk name",
 						   "Instrument", "Lyric", "Marker", "Cue-point"};
 		    WORD	idx = HIBYTE(LOWORD(mmt->dwEventData));
-		    
+
 		    if (len >= sizeof(buf)) {
 			WARN("Buffer for text is too small (%d bytes, when %u are needed)\n", sizeof(buf) - 1, len);
 			len = sizeof(buf) - 1;
@@ -1056,11 +1056,11 @@
 		    }
 		}
 		break;
-	    case 0x20: 
+	    case 0x20:
 		/* MIDI channel (cc) */
 		if (FIXME_ON(mcimidi)) {
 		    BYTE	bt;
-		    
+
 		    MIDI_mciReadByte(wmm, &bt);	/* == 0 */
 		    FIXME("NIY: MIDI channel=%u, track=%u\n", bt, mmt->wTrackNr);
 		}
@@ -1069,7 +1069,7 @@
 		/* MIDI port (pp) */
 		if (FIXME_ON(mcimidi)) {
 		    BYTE	bt;
-		    
+
 		    MIDI_mciReadByte(wmm, &bt);	/* == 0 */
 		    FIXME("NIY: MIDI port=%u, track=%u\n", bt, mmt->wTrackNr);
 		}
@@ -1083,10 +1083,10 @@
 		 */
 		if (mmt->wTrackNr != 0 && wmm->wFormat == 1) {
 		    WARN("For format #1 MIDI files, tempo can only be changed on track #0 (%u)\n", mmt->wTrackNr);
-		} else { 
+		} else {
 		    BYTE	tbt;
 		    DWORD	value = 0;
-		    
+
 		    MIDI_mciReadByte(wmm, &tbt);	value  = ((DWORD)tbt) << 16;
 		    MIDI_mciReadByte(wmm, &tbt);	value |= ((DWORD)tbt) << 8;
 		    MIDI_mciReadByte(wmm, &tbt);	value |= ((DWORD)tbt) << 0;
@@ -1101,7 +1101,7 @@
 		    WARN("SMPTE track start can only be expressed at start of track (%lu)\n", mmt->dwEventPulse);
 		} else {
 		    BYTE	h, m, s, f, ff;
-		    
+
 		    MIDI_mciReadByte(wmm, &h);
 		    MIDI_mciReadByte(wmm, &m);
 		    MIDI_mciReadByte(wmm, &s);
@@ -1113,24 +1113,24 @@
 	    case 0x58: /* file rythm */
 		if (TRACE_ON(mcimidi)) {
 		    BYTE	num, den, cpmc, _32npqn;
-		    
-		    MIDI_mciReadByte(wmm, &num);	
+
+		    MIDI_mciReadByte(wmm, &num);
 		    MIDI_mciReadByte(wmm, &den);		/* to notate e.g. 6/8 */
-		    MIDI_mciReadByte(wmm, &cpmc);		/* number of MIDI clocks per metronome click */ 
+		    MIDI_mciReadByte(wmm, &cpmc);		/* number of MIDI clocks per metronome click */
 		    MIDI_mciReadByte(wmm, &_32npqn);		/* number of notated 32nd notes per MIDI quarter note */
-		    
+
 		    TRACE("%u/%u, clock per metronome click=%u, 32nd notes by 1/4 note=%u\n", num, 1 << den, cpmc, _32npqn);
 		}
 		break;
 	    case 0x59: /* key signature */
 		if (TRACE_ON(mcimidi)) {
 		    BYTE	sf, mm;
-		    
-		    MIDI_mciReadByte(wmm, &sf);		
-		    MIDI_mciReadByte(wmm, &mm);	
-		    
-		    if (sf >= 0x80) 	TRACE("%d flats\n", -(char)sf);	 
-		    else if (sf > 0) 	TRACE("%d sharps\n", (char)sf);	 
+
+		    MIDI_mciReadByte(wmm, &sf);
+		    MIDI_mciReadByte(wmm, &mm);
+
+		    if (sf >= 0x80) 	TRACE("%d flats\n", -(char)sf);
+		    else if (sf > 0) 	TRACE("%d sharps\n", (char)sf);
 		    else 		TRACE("Key of C\n");
 		    TRACE("Mode: %s\n", (mm = 0) ? "major" : "minor");
 		}
@@ -1147,7 +1147,7 @@
 		switch (LOBYTE(LOWORD(mmt->dwEventData)) & 0xF0) {
 		case MIDI_NOTEON:
 		case MIDI_NOTEOFF:
-		    dwRet = 0;	
+		    dwRet = 0;
 		    break;
 		default:
 		    dwRet = midiOutShortMsg(wmm->hMidi, mmt->dwEventData);
@@ -1157,21 +1157,21 @@
 	mmt->dwIndex += mmt->wEventLength;
 	if (mmt->dwIndex < mmt->dwFirst || mmt->dwIndex >= mmt->dwLast) {
 	    mmt->wStatus = 0;
-	} 
-	if (mmt->wStatus) {	
+	}
+	if (mmt->wStatus) {
 	    MIDI_mciReadNextEvent(wmm, mmt);
 	}
     }
-    
+
     midiOutReset(wmm->hMidi);
-    
+
     dwRet = midiOutClose(wmm->hMidi);
     /* to restart playing at beginning when it's over */
     wmm->dwPositionMS = 0;
-    
+
     if (lpParms && (dwFlags & MCI_NOTIFY)) {
 	TRACE("MCI_NOTIFY_SUCCESSFUL %08lX !\n", lpParms->dwCallback);
-	mciDriverNotify((HWND)LOWORD(lpParms->dwCallback), 
+	mciDriverNotify((HWND)LOWORD(lpParms->dwCallback),
 			wmm->wNotifyDeviceID, MCI_NOTIFY_SUCCESSFUL);
     }
 
@@ -1188,18 +1188,18 @@
     MIDIHDR		midiHdr;
     DWORD		dwRet;
     WINE_MCIMIDI*	wmm = MIDI_mciGetOpenDev(wDevID);
-    
+
     TRACE("(%04X, %08lX, %p);\n", wDevID, dwFlags, lpParms);
-    
+
     if (wmm == 0)	return MCIERR_INVALID_DEVICE_ID;
-    
+
     if (wmm->hFile == 0) {
 	WARN("Can't find file='%s' !\n", wmm->lpstrElementName);
 	return MCIERR_FILE_NOT_FOUND;
     }
     start = 1; 		end = 99999;
     if (lpParms && (dwFlags & MCI_FROM)) {
-	start = lpParms->dwFrom; 
+	start = lpParms->dwFrom;
 	TRACE("MCI_FROM=%d \n", start);
     }
     if (lpParms && (dwFlags & MCI_TO)) {
@@ -1234,7 +1234,7 @@
     wmm->dwStatus = MCI_MODE_STOP;
     if (lpParms && (dwFlags & MCI_NOTIFY)) {
 	TRACE("MCI_NOTIFY_SUCCESSFUL %08lX !\n", lpParms->dwCallback);
-	mciDriverNotify((HWND)LOWORD(lpParms->dwCallback), 
+	mciDriverNotify((HWND)LOWORD(lpParms->dwCallback),
 			wmm->wNotifyDeviceID, MCI_NOTIFY_SUCCESSFUL);
     }
     return 0;
@@ -1246,24 +1246,24 @@
 static DWORD MIDI_mciPause(UINT wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpParms)
 {
     WINE_MCIMIDI*	wmm = MIDI_mciGetOpenDev(wDevID);
-    
+
     TRACE("(%04X, %08lX, %p);\n", wDevID, dwFlags, lpParms);
-    
+
     if (wmm == NULL)	return MCIERR_INVALID_DEVICE_ID;
-    
+
     if (wmm->dwStatus == MCI_MODE_PLAY) {
 	/* stop all notes */
 	unsigned chn;
 	for (chn = 0; chn < 16; chn++)
 	    midiOutShortMsg(wmm->hMidi, 0x78B0 | chn);
 	wmm->dwStatus = MCI_MODE_PAUSE;
-    } 
+    }
     if (lpParms && (dwFlags & MCI_NOTIFY)) {
 	TRACE("MCI_NOTIFY_SUCCESSFUL %08lX !\n", lpParms->dwCallback);
-	mciDriverNotify((HWND)LOWORD(lpParms->dwCallback), 
+	mciDriverNotify((HWND)LOWORD(lpParms->dwCallback),
 			wmm->wNotifyDeviceID, MCI_NOTIFY_SUCCESSFUL);
     }
-    
+
     return 0;
 }
 
@@ -1273,18 +1273,18 @@
 static DWORD MIDI_mciResume(UINT wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpParms)
 {
     WINE_MCIMIDI*	wmm = MIDI_mciGetOpenDev(wDevID);
-    
+
     TRACE("(%04X, %08lX, %p);\n", wDevID, dwFlags, lpParms);
-    
+
     if (wmm == NULL)	return MCIERR_INVALID_DEVICE_ID;
-    
+
     if (wmm->dwStatus == MCI_MODE_PAUSE) {
 	wmm->wStartedPlaying = FALSE;
 	wmm->dwStatus = MCI_MODE_PLAY;
-    } 
+    }
     if (lpParms && (dwFlags & MCI_NOTIFY)) {
 	TRACE("MCI_NOTIFY_SUCCESSFUL %08lX !\n", lpParms->dwCallback);
-	mciDriverNotify((HWND)LOWORD(lpParms->dwCallback), 
+	mciDriverNotify((HWND)LOWORD(lpParms->dwCallback),
 			wmm->wNotifyDeviceID, MCI_NOTIFY_SUCCESSFUL);
     }
     return 0;
@@ -1296,12 +1296,12 @@
 static DWORD MIDI_mciSet(UINT wDevID, DWORD dwFlags, LPMCI_SET_PARMS lpParms)
 {
     WINE_MCIMIDI*	wmm = MIDI_mciGetOpenDev(wDevID);
-    
+
     TRACE("(%04X, %08lX, %p);\n", wDevID, dwFlags, lpParms);
-    
+
     if (lpParms == NULL)	return MCIERR_NULL_PARAMETER_BLOCK;
     if (wmm == NULL)		return MCIERR_INVALID_DEVICE_ID;
-    
+
     if (dwFlags & MCI_SET_TIME_FORMAT) {
 	switch (lpParms->dwTimeFormat) {
 	case MCI_FORMAT_MILLISECONDS:
@@ -1346,7 +1346,7 @@
 	    WARN("MCI_SET_AUDIO without SET_ON or SET_OFF\n");
 	    return MCIERR_BAD_INTEGER;
 	}
-	
+
 	if (lpParms->dwAudio & MCI_SET_AUDIO_ALL)
 	    TRACE("MCI_SET_AUDIO_ALL !\n");
 	if (lpParms->dwAudio & MCI_SET_AUDIO_LEFT)
@@ -1354,7 +1354,7 @@
 	if (lpParms->dwAudio & MCI_SET_AUDIO_RIGHT)
 	    TRACE("MCI_SET_AUDIO_RIGHT !\n");
     }
-    
+
     if (dwFlags & MCI_SEQ_SET_MASTER)
 	TRACE("MCI_SEQ_SET_MASTER !\n");
     if (dwFlags & MCI_SEQ_SET_SLAVE)
@@ -1377,10 +1377,10 @@
     DWORD		ret = 0;
 
     TRACE("(%04X, %08lX, %p);\n", wDevID, dwFlags, lpParms);
-    
+
     if (lpParms == NULL) 	return MCIERR_NULL_PARAMETER_BLOCK;
     if (wmm == NULL)		return MCIERR_INVALID_DEVICE_ID;
-    
+
     if (dwFlags & MCI_STATUS_ITEM) {
 	switch (lpParms->dwItem) {
 	case MCI_STATUS_CURRENT_TRACK:
@@ -1416,9 +1416,9 @@
 	    break;
 	case MCI_STATUS_POSITION:
 	    /* FIXME: do I need to use MCI_TRACK ? */
-	    lpParms->dwReturn = MIDI_ConvertMSToTimeFormat(wmm, 
+	    lpParms->dwReturn = MIDI_ConvertMSToTimeFormat(wmm,
 							   (dwFlags & MCI_STATUS_START) ? 0 : wmm->dwPositionMS);
-	    TRACE("MCI_STATUS_POSITION %s => %lu\n", 
+	    TRACE("MCI_STATUS_POSITION %s => %lu\n",
 		  (dwFlags & MCI_STATUS_START) ? "start" : "current", lpParms->dwReturn);
 	    break;
 	case MCI_STATUS_READY:
@@ -1478,7 +1478,7 @@
     }
     if (dwFlags & MCI_NOTIFY) {
 	TRACE("MCI_NOTIFY_SUCCESSFUL %08lX !\n", lpParms->dwCallback);
-	mciDriverNotify((HWND)LOWORD(lpParms->dwCallback), 
+	mciDriverNotify((HWND)LOWORD(lpParms->dwCallback),
 			wmm->wNotifyDeviceID, MCI_NOTIFY_SUCCESSFUL);
     }
     return ret;
@@ -1487,17 +1487,17 @@
 /**************************************************************************
  * 				MIDI_mciGetDevCaps		[internal]
  */
-static DWORD MIDI_mciGetDevCaps(UINT wDevID, DWORD dwFlags, 
+static DWORD MIDI_mciGetDevCaps(UINT wDevID, DWORD dwFlags,
 				LPMCI_GETDEVCAPS_PARMS lpParms)
 {
     WINE_MCIMIDI*	wmm = MIDI_mciGetOpenDev(wDevID);
     DWORD		ret;
 
     TRACE("(%04X, %08lX, %p);\n", wDevID, dwFlags, lpParms);
-    
+
     if (lpParms == NULL) 	return MCIERR_NULL_PARAMETER_BLOCK;
     if (wmm == NULL)		return MCIERR_INVALID_DEVICE_ID;
-    
+
     if (dwFlags & MCI_GETDEVCAPS_ITEM) {
 	switch (lpParms->dwItem) {
 	case MCI_GETDEVCAPS_DEVICE_TYPE:
@@ -1566,13 +1566,13 @@
     DWORD		ret = 0;
 
     TRACE("(%04X, %08lX, %p);\n", wDevID, dwFlags, lpParms);
-    
+
     if (lpParms == NULL || lpParms->lpstrReturn == NULL)
 	return MCIERR_NULL_PARAMETER_BLOCK;
     if (wmm == NULL) return MCIERR_INVALID_DEVICE_ID;
 
     TRACE("buf=%p, len=%lu\n", lpParms->lpstrReturn, lpParms->dwRetSize);
-    
+
     switch (dwFlags & ~(MCI_WAIT|MCI_NOTIFY)) {
     case MCI_INFO_PRODUCT:
 	str = "Wine's MIDI sequencer";
@@ -1582,7 +1582,7 @@
 	break;
     case MCI_INFO_COPYRIGHT:
 	str = wmm->lpstrCopyright;
-	break;  
+	break;
     case MCI_INFO_NAME:
 	str = wmm->lpstrName;
 	break;
@@ -1596,7 +1596,7 @@
 	    ret = MCIERR_PARAM_OVERFLOW;
 	} else {
 	    strcpy(lpParms->lpstrReturn, str);
-	}	
+	}
     } else {
 	*lpParms->lpstrReturn = 0;
     }
@@ -1610,16 +1610,16 @@
 {
     DWORD		ret = 0;
     WINE_MCIMIDI*	wmm = MIDI_mciGetOpenDev(wDevID);
-    
+
     TRACE("(%04X, %08lX, %p);\n", wDevID, dwFlags, lpParms);
-    
+
     if (lpParms == NULL) {
 	ret = MCIERR_NULL_PARAMETER_BLOCK;
     } else if (wmm == NULL) {
 	ret = MCIERR_INVALID_DEVICE_ID;
     } else {
 	MIDI_mciStop(wDevID, MCI_WAIT, 0);
-	
+
 	if (dwFlags & MCI_SEEK_TO_START) {
 	    wmm->dwPositionMS = 0;
 	} else if (dwFlags & MCI_SEEK_TO_END) {
@@ -1630,17 +1630,17 @@
 	    WARN("dwFlag doesn't tell where to seek to...\n");
 	    return MCIERR_MISSING_PARAMETER;
 	}
-	
+
 	TRACE("Seeking to position=%lu ms\n", wmm->dwPositionMS);
-	
+
 	if (dwFlags & MCI_NOTIFY) {
 	    TRACE("MCI_NOTIFY_SUCCESSFUL %08lX !\n", lpParms->dwCallback);
-	    mciDriverNotify((HWND)LOWORD(lpParms->dwCallback), 
+	    mciDriverNotify((HWND)LOWORD(lpParms->dwCallback),
 			    wmm->wNotifyDeviceID, MCI_NOTIFY_SUCCESSFUL);
 	}
     }
-    return ret;	
-}    
+    return ret;
+}
 
 /*======================================================================*
  *                  	    MIDI entry points 				*
@@ -1649,7 +1649,7 @@
 /**************************************************************************
  * 				DriverProc (MCISEQ.@)
  */
-LONG CALLBACK	MCIMIDI_DriverProc(DWORD dwDevID, HDRVR hDriv, DWORD wMsg, 
+LONG CALLBACK	MCIMIDI_DriverProc(DWORD dwDevID, HDRVR hDriv, DWORD wMsg,
 				   DWORD dwParam1, DWORD dwParam2)
 {
     switch (wMsg) {
@@ -1681,36 +1681,36 @@
     case MCI_INFO:		return MIDI_mciInfo      (dwDevID, dwParam1, (LPMCI_INFO_PARMSA)     dwParam2);
     case MCI_SEEK:		return MIDI_mciSeek      (dwDevID, dwParam1, (LPMCI_SEEK_PARMS)      dwParam2);
     /* commands that should be supported */
-    case MCI_LOAD:		
-    case MCI_SAVE:		
-    case MCI_FREEZE:		
-    case MCI_PUT:		
-    case MCI_REALIZE:		
-    case MCI_UNFREEZE:		
-    case MCI_UPDATE:		
-    case MCI_WHERE:		
-    case MCI_STEP:		
-    case MCI_SPIN:		
-    case MCI_ESCAPE:		
-    case MCI_COPY:		
-    case MCI_CUT:		
-    case MCI_DELETE:		
-    case MCI_PASTE:		
+    case MCI_LOAD:
+    case MCI_SAVE:
+    case MCI_FREEZE:
+    case MCI_PUT:
+    case MCI_REALIZE:
+    case MCI_UNFREEZE:
+    case MCI_UPDATE:
+    case MCI_WHERE:
+    case MCI_STEP:
+    case MCI_SPIN:
+    case MCI_ESCAPE:
+    case MCI_COPY:
+    case MCI_CUT:
+    case MCI_DELETE:
+    case MCI_PASTE:
 	WARN("Unsupported command [%lu]\n", wMsg);
 	break;
     /* commands that should report an error */
-    case MCI_WINDOW:		
+    case MCI_WINDOW:
 	TRACE("Unsupported command [%lu]\n", wMsg);
 	break;
     case MCI_OPEN:
     case MCI_CLOSE:
 	FIXME("Shouldn't receive a MCI_OPEN or CLOSE message\n");
 	break;
-    default:			
+    default:
 	TRACE("Sending msg [%lu] to default driver proc\n", wMsg);
 	return DefDriverProc(dwDevID, hDriv, wMsg, dwParam1, dwParam2);
     }
     return MCIERR_UNRECOGNIZED_COMMAND;
 }
 
-    
+
diff --git a/dlls/winmm/mciwave/mciwave.c b/dlls/winmm/mciwave/mciwave.c
index ab18942..f492852 100644
--- a/dlls/winmm/mciwave/mciwave.c
+++ b/dlls/winmm/mciwave/mciwave.c
@@ -1,5 +1,5 @@
 /* -*- tab-width: 8; c-basic-offset: 4 -*- */
-/*				   
+/*
  * Sample Wine Driver for MCI wave forms
  *
  * Copyright 	1994 Martin Ayotte
@@ -92,7 +92,7 @@
 /**************************************************************************
  * 				MCI_SendCommandAsync		[internal]
  */
-static	DWORD MCI_SendCommandAsync(UINT wDevID, UINT wMsg, DWORD dwParam1, 
+static	DWORD MCI_SendCommandAsync(UINT wDevID, UINT wMsg, DWORD dwParam1,
 				   DWORD dwParam2, UINT size)
 {
     struct SCA*	sca = HeapAlloc(GetProcessHeap(), 0, sizeof(struct SCA) + size);
@@ -103,11 +103,11 @@
     sca->wDevID   = wDevID;
     sca->wMsg     = wMsg;
     sca->dwParam1 = dwParam1;
-    
+
     if (size && dwParam2) {
 	sca->dwParam2 = (DWORD)sca + sizeof(struct SCA);
-	/* copy structure passed by program in dwParam2 to be sure 
-	 * we can still use it whatever the program does 
+	/* copy structure passed by program in dwParam2 to be sure
+	 * we can still use it whatever the program does
 	 */
 	memcpy((LPVOID)sca->dwParam2, (LPVOID)dwParam2, size);
     } else {
@@ -128,7 +128,7 @@
 static DWORD WAVE_mciResume(UINT wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpParms);
 
 /**************************************************************************
- * 				MCIWAVE_drvOpen			[internal]	
+ * 				MCIWAVE_drvOpen			[internal]
  */
 static	DWORD	WAVE_drvOpen(LPSTR str, LPMCI_OPEN_DRIVER_PARMSA modp)
 {
@@ -146,11 +146,11 @@
     modp->wCustomCommandTable = MCI_NO_COMMAND_TABLE;
     modp->wType = MCI_DEVTYPE_WAVEFORM_AUDIO;
 
-    wmw->wfxRef.wFormatTag     	= WAVE_FORMAT_PCM; 
+    wmw->wfxRef.wFormatTag     	= WAVE_FORMAT_PCM;
     wmw->wfxRef.nChannels       = 1;      /* MONO */
     wmw->wfxRef.nSamplesPerSec  = 11025;
     wmw->wfxRef.nAvgBytesPerSec = 11025;
-    wmw->wfxRef.nBlockAlign     = 1; 
+    wmw->wfxRef.nBlockAlign     = 1;
     wmw->wfxRef.wBitsPerSample  = 8;
     wmw->wfxRef.cbSize          = 0;      /* don't care */
 
@@ -158,14 +158,14 @@
 }
 
 /**************************************************************************
- * 				MCIWAVE_drvClose		[internal]	
+ * 				MCIWAVE_drvClose		[internal]
  */
 static	DWORD	WAVE_drvClose(DWORD dwDevID)
 {
     WINE_MCIWAVE*  wmw = (WINE_MCIWAVE*)mciGetDriverData(dwDevID);
 
     if (wmw) {
-	HeapFree(GetProcessHeap(), 0, wmw);	
+	HeapFree(GetProcessHeap(), 0, wmw);
 	mciSetDriverData(dwDevID, 0);
 	return 1;
     }
@@ -173,12 +173,12 @@
 }
 
 /**************************************************************************
- * 				WAVE_mciGetOpenDev		[internal]	
+ * 				WAVE_mciGetOpenDev		[internal]
  */
 static WINE_MCIWAVE*  WAVE_mciGetOpenDev(UINT wDevID)
 {
     WINE_MCIWAVE*	wmw = (WINE_MCIWAVE*)mciGetDriverData(wDevID);
-    
+
     if (wmw == NULL || wmw->nUseCount == 0) {
 	WARN("Invalid wDevID=%u\n", wDevID);
 	return 0;
@@ -187,12 +187,12 @@
 }
 
 /**************************************************************************
- * 				WAVE_ConvertByteToTimeFormat	[internal]	
+ * 				WAVE_ConvertByteToTimeFormat	[internal]
  */
 static	DWORD 	WAVE_ConvertByteToTimeFormat(WINE_MCIWAVE* wmw, DWORD val, LPDWORD lpRet)
 {
     DWORD	   ret = 0;
-     
+
     switch (wmw->dwMciTimeFormat) {
     case MCI_FORMAT_MILLISECONDS:
 	ret = MulDiv(val,1000,wmw->lpWaveFormat->nAvgBytesPerSec);
@@ -212,12 +212,12 @@
 }
 
 /**************************************************************************
- * 				WAVE_ConvertTimeFormatToByte	[internal]	
+ * 				WAVE_ConvertTimeFormatToByte	[internal]
  */
 static	DWORD 	WAVE_ConvertTimeFormatToByte(WINE_MCIWAVE* wmw, DWORD val)
 {
     DWORD	ret = 0;
-    
+
     switch (wmw->dwMciTimeFormat) {
     case MCI_FORMAT_MILLISECONDS:
 	ret = (val * wmw->lpWaveFormat->nAvgBytesPerSec) / 1000;
@@ -253,7 +253,7 @@
     r = mmioRead(wmw->hFile, (HPSTR)wmw->lpWaveFormat, mmckInfo.cksize);
     if (r < sizeof(WAVEFORMAT))
 	return MCIERR_INVALID_FILE;
-    
+
     TRACE("wFormatTag=%04X !\n",   wmw->lpWaveFormat->wFormatTag);
     TRACE("nChannels=%d \n",       wmw->lpWaveFormat->nChannels);
     TRACE("nSamplesPerSec=%ld\n",  wmw->lpWaveFormat->nSamplesPerSec);
@@ -262,7 +262,7 @@
     TRACE("wBitsPerSample=%u !\n", wmw->lpWaveFormat->wBitsPerSample);
     if (r >= (long)sizeof(WAVEFORMATEX))
 	TRACE("cbSize=%u !\n", wmw->lpWaveFormat->cbSize);
-	
+
     mmioAscend(wmw->hFile, &mmckInfo, 0);
     wmw->ckWaveData.ckid = mmioFOURCC('d', 'a', 't', 'a');
     if (mmioDescend(wmw->hFile, &wmw->ckWaveData, pckMainRIFF, MMIO_FINDCHUNK) != 0) {
@@ -273,7 +273,7 @@
 	  (LPSTR)&wmw->ckWaveData.ckid, (LPSTR)&wmw->ckWaveData.fccType, wmw->ckWaveData.cksize);
     TRACE("nChannels=%d nSamplesPerSec=%ld\n",
 	  wmw->lpWaveFormat->nChannels, wmw->lpWaveFormat->nSamplesPerSec);
-    
+
     return 0;
 }
 
@@ -318,8 +318,8 @@
    /* only the first 16 bytes are serialized */
    /* wrong... for non PCM, the whole waveFormat is stored
     */
-   if (-1 == mmioWrite(hmmio, (HPCSTR) lpWaveFormat, 16)) 	
-	goto err; 		
+   if (-1 == mmioWrite(hmmio, (HPCSTR) lpWaveFormat, 16))
+	goto err;
 
    if (MMSYSERR_NOERROR != mmioAscend(hmmio, &ckWaveFormat, 0))
 	goto err;
@@ -327,14 +327,14 @@
    lpckWaveData->cksize  = 0;
    lpckWaveData->fccType = 0;
    lpckWaveData->ckid    = mmioFOURCC('d', 'a', 't', 'a');
-   
+
    /* create data chunk */
    if (MMSYSERR_NOERROR != mmioCreateChunk(hmmio, lpckWaveData, 0))
 	goto err;
 
    return 0;
 
-err:    
+err:
    HeapFree(GetProcessHeap(), 0, wmw->lpWaveFormat);
    return MCIERR_INVALID_FILE;
 }
@@ -347,14 +347,14 @@
     DWORD		dwRet = 0;
     WINE_MCIWAVE*	wmw = (WINE_MCIWAVE*)mciGetDriverData(wDevID);
     CHAR*               pszTmpFileName = 0;
-    
+
     TRACE("(%04X, %08lX, %p)\n", wDevID, dwFlags, lpOpenParms);
     if (lpOpenParms == NULL)	return MCIERR_NULL_PARAMETER_BLOCK;
     if (wmw == NULL) 		return MCIERR_INVALID_DEVICE_ID;
 
     if (dwFlags & MCI_OPEN_SHAREABLE)
 	return MCIERR_HARDWARE;
-    
+
     if (wmw->nUseCount > 0) {
 	/* The driver is already opened on this channel
 	 * Wave driver cannot be shared
@@ -363,17 +363,17 @@
     }
 
     wmw->nUseCount++;
-    
+
     wmw->fInput = FALSE;
     wmw->hWave = 0;
-    wmw->dwStatus = MCI_MODE_NOT_READY;	
+    wmw->dwStatus = MCI_MODE_NOT_READY;
 
     TRACE("wDevID=%04X (lpParams->wDeviceID=%08X)\n", wDevID, lpOpenParms->wDeviceID);
-    
+
     if (dwFlags & MCI_OPEN_ELEMENT) {
 	if (dwFlags & MCI_OPEN_ELEMENT_ID) {
-	    /* could it be that (DWORD)lpOpenParms->lpstrElementName 
-	     * contains the hFile value ? 
+	    /* could it be that (DWORD)lpOpenParms->lpstrElementName
+	     * contains the hFile value ?
 	     */
 	    dwRet = MCIERR_UNRECOGNIZED_COMMAND;
 	} else {
@@ -384,7 +384,7 @@
 		TRACE("MCI_OPEN_ELEMENT '%s' !\n", lpOpenParms->lpstrElementName);
 
 		if (lpOpenParms->lpstrElementName && (strlen(lpOpenParms->lpstrElementName) > 0)) {
-		    wmw->hFile = mmioOpenA((LPSTR)lpOpenParms->lpstrElementName, NULL, 
+		    wmw->hFile = mmioOpenA((LPSTR)lpOpenParms->lpstrElementName, NULL,
 				    MMIO_ALLOCBUF | MMIO_DENYWRITE | MMIO_READWRITE);
 
 		    if (wmw->hFile == 0) {
@@ -403,31 +403,31 @@
 			    dwRet = MCIERR_INVALID_FILE;
 			} else {
 			    TRACE("ParentChunk ckid=%.4s fccType=%.4s cksize=%08lX \n",
-				(LPSTR)&(lpckMainRIFF->ckid), 
-				(LPSTR) &(lpckMainRIFF->fccType), 
+				(LPSTR)&(lpckMainRIFF->ckid),
+				(LPSTR) &(lpckMainRIFF->fccType),
 				(lpckMainRIFF->cksize));
 
-			    if ((lpckMainRIFF->ckid    != FOURCC_RIFF) || 
+			    if ((lpckMainRIFF->ckid    != FOURCC_RIFF) ||
 				 lpckMainRIFF->fccType != mmioFOURCC('W', 'A', 'V', 'E')) {
 				dwRet = MCIERR_INVALID_FILE;
 			    } else {
 				dwRet = WAVE_mciReadFmt(wmw, lpckMainRIFF);
 			    }
-	    		}   
+	    		}
 		    }
-		} 
+		}
 		else {
 		    wmw->hFile = 0;
 		}
-	    } 
+	    }
 	    else {
 		CHAR  szTmpPath[MAX_PATH];
 		CHAR  szPrefix[4]    = "TMP\0";
-		
+
 		pszTmpFileName = HeapAlloc(GetProcessHeap(),
-				           HEAP_ZERO_MEMORY, 
+				           HEAP_ZERO_MEMORY,
 					   MAX_PATH * sizeof(*pszTmpFileName));
-		
+
 		if (!GetTempPathA(sizeof(szTmpPath), szTmpPath)) {
 		    WARN("can't retrieve temp path!\n");
 		    HeapFree(GetProcessHeap(), 0, pszTmpFileName);
@@ -441,14 +441,14 @@
 		}
 
 		wmw->bTemporaryFile = TRUE;
-    
+
 		TRACE("MCI_OPEN_ELEMENT '%s' !\n", pszTmpFileName);
-	    
+
 		if (pszTmpFileName && (strlen(pszTmpFileName) > 0)) {
 
-		    wmw->hFile = mmioOpenA(pszTmpFileName, NULL, 
+		    wmw->hFile = mmioOpenA(pszTmpFileName, NULL,
 				           MMIO_ALLOCBUF | MMIO_READWRITE | MMIO_CREATE);
-		
+
 		    if (wmw->hFile == 0) {
 			/* temporary file could not be created. clean filename. */
 			HeapFree(GetProcessHeap(), 0, pszTmpFileName);
@@ -456,12 +456,12 @@
 			dwRet = MCIERR_FILE_NOT_FOUND;
 		    }
 		}
-	    } 
+	    }
 	}
     }
 
     TRACE("hFile=%u\n", wmw->hFile);
-    
+
     memcpy(&wmw->openParms, lpOpenParms, sizeof(MCI_WAVE_OPEN_PARMSA));
 
     if (wmw->bTemporaryFile == TRUE)
@@ -469,26 +469,26 @@
 	    /* Additional openParms is temporary file's name */
 	    wmw->openParms.lpstrElementName = pszTmpFileName;
     }
-    
+
     if (dwRet == 0) {
 	if (wmw->lpWaveFormat) {
 	    switch (wmw->lpWaveFormat->wFormatTag) {
 	    case WAVE_FORMAT_PCM:
-		if (wmw->lpWaveFormat->nAvgBytesPerSec != 
+		if (wmw->lpWaveFormat->nAvgBytesPerSec !=
 		    wmw->lpWaveFormat->nSamplesPerSec * wmw->lpWaveFormat->nBlockAlign) {
-		    WARN("Incorrect nAvgBytesPerSec (%ld), setting it to %ld\n", 
-			wmw->lpWaveFormat->nAvgBytesPerSec, 
-			wmw->lpWaveFormat->nSamplesPerSec * 
+		    WARN("Incorrect nAvgBytesPerSec (%ld), setting it to %ld\n",
+			wmw->lpWaveFormat->nAvgBytesPerSec,
+			wmw->lpWaveFormat->nSamplesPerSec *
 			 wmw->lpWaveFormat->nBlockAlign);
-		    wmw->lpWaveFormat->nAvgBytesPerSec = 
-			wmw->lpWaveFormat->nSamplesPerSec * 
+		    wmw->lpWaveFormat->nAvgBytesPerSec =
+			wmw->lpWaveFormat->nSamplesPerSec *
 			wmw->lpWaveFormat->nBlockAlign;
 		}
 		break;
 	    }
 	}
 	wmw->dwPosition = 0;
-	
+
 	wmw->dwStatus = MCI_MODE_STOP;
     } else {
 	wmw->nUseCount--;
@@ -506,30 +506,30 @@
 {
     /*
       FIXME
-      
+
       This routine is far from complete. At the moment only a check is done on the
       MCI_WAVE_INPUT flag. No explicit check on MCI_WAVE_OUTPUT is done since that
       is the default.
-      
+
       The flags MCI_NOTIFY (and the callback parameter in lpParms) and MCI_WAIT
       are ignored
     */
-    
+
     DWORD		dwRet;
     WINE_MCIWAVE*	wmw = WAVE_mciGetOpenDev(wDevID);
-    
+
     FIXME("(%u, %08lX, %p); likely to fail\n", wDevID, dwParam, lpParms);
-    
+
     if (wmw == NULL)	return MCIERR_INVALID_DEVICE_ID;
-    
-    /* always close elements ? */    
+
+    /* always close elements ? */
     if (wmw->hFile != 0) {
 	mmioClose(wmw->hFile, 0);
 	wmw->hFile = 0;
     }
-    
+
     dwRet = MMSYSERR_NOERROR;  /* assume success */
-    
+
     if ((dwParam & MCI_WAVE_INPUT) && !wmw->fInput) {
 	dwRet = waveOutClose(wmw->hWave);
 	if (dwRet != MMSYSERR_NOERROR) return MCIERR_INTERNAL;
@@ -550,11 +550,11 @@
 {
     DWORD 		dwRet = 0;
     WINE_MCIWAVE*	wmw = WAVE_mciGetOpenDev(wDevID);
-    
+
     TRACE("(%u, %08lX, %p);\n", wDevID, dwFlags, lpParms);
-    
+
     if (wmw == NULL)		return MCIERR_INVALID_DEVICE_ID;
-    
+
     /* wait for playback thread (if any) to exit before processing further */
     switch (wmw->dwStatus) {
     case MCI_MODE_PAUSE:
@@ -575,12 +575,12 @@
 
     /* sanity resets */
     wmw->dwStatus = MCI_MODE_STOP;
-    
+
     if ((dwFlags & MCI_NOTIFY) && lpParms) {
-	mciDriverNotify((HWND)LOWORD(lpParms->dwCallback), 
+	mciDriverNotify((HWND)LOWORD(lpParms->dwCallback),
 			wmw->openParms.wDeviceID, MCI_NOTIFY_SUCCESSFUL);
     }
-    
+
     return dwRet;
 }
 
@@ -591,17 +591,17 @@
 {
     DWORD		dwRet = 0;
     WINE_MCIWAVE*	wmw = WAVE_mciGetOpenDev(wDevID);
-    
+
     TRACE("(%u, %08lX, %p);\n", wDevID, dwFlags, lpParms);
-    
+
     if (wmw == NULL)		return MCIERR_INVALID_DEVICE_ID;
-    
+
     if (wmw->dwStatus != MCI_MODE_STOP) {
 	dwRet = WAVE_mciStop(wDevID, MCI_WAIT, lpParms);
     }
-    
+
     wmw->nUseCount--;
-    
+
     if (wmw->nUseCount == 0) {
 	if (wmw->hFile != 0) {
 	    mmioClose(wmw->hFile, 0);
@@ -618,12 +618,12 @@
 	HeapFree(GetProcessHeap(), 0, (CHAR*) wmw->openParms.lpstrElementName);
 	wmw->openParms.lpstrElementName = NULL;
     }
-    
+
     HeapFree(GetProcessHeap(), 0, wmw->lpWaveFormat);
     wmw->lpWaveFormat = NULL;
 
     if ((dwFlags & MCI_NOTIFY) && lpParms) {
-	mciDriverNotify((HWND)LOWORD(lpParms->dwCallback), 
+	mciDriverNotify((HWND)LOWORD(lpParms->dwCallback),
 			wmw->openParms.wDeviceID,
 			(dwRet == 0) ? MCI_NOTIFY_SUCCESSFUL : MCI_NOTIFY_FAILURE);
     }
@@ -634,8 +634,8 @@
 /**************************************************************************
  * 				WAVE_mciPlayCallback		[internal]
  */
-static	void	CALLBACK WAVE_mciPlayCallback(HWAVEOUT hwo, UINT uMsg, 
-					      DWORD dwInstance,  
+static	void	CALLBACK WAVE_mciPlayCallback(HWAVEOUT hwo, UINT uMsg,
+					      DWORD dwInstance,
 					      DWORD dwParam1, DWORD dwParam2)
 {
     WINE_MCIWAVE*	wmw = (WINE_MCIWAVE*)dwInstance;
@@ -662,7 +662,7 @@
 	    break;
 	}
 	InterlockedIncrement(&wmw->dwEventCount);
-	
+
 	WaitForSingleObject(wmw->hEvent, INFINITE);
     }
 }
@@ -678,13 +678,13 @@
     LPWAVEHDR		waveHdr = NULL;
     WINE_MCIWAVE*	wmw = WAVE_mciGetOpenDev(wDevID);
     int			whidx;
-    
+
     TRACE("(%u, %08lX, %p);\n", wDevID, dwFlags, lpParms);
-    
+
     if (wmw == NULL)		return MCIERR_INVALID_DEVICE_ID;
     if (lpParms == NULL)	return MCIERR_NULL_PARAMETER_BLOCK;
 
-    /* FIXME : since there is no way to determine in which mode the device is 
+    /* FIXME : since there is no way to determine in which mode the device is
      * open (recording/playback) automatically switch from a mode to another
      */
     wmw->fInput = FALSE;
@@ -698,12 +698,12 @@
 	WARN("Can't play: no file='%s' !\n", wmw->openParms.lpstrElementName);
 	return MCIERR_FILE_NOT_FOUND;
     }
-    
+
     if (wmw->dwStatus == MCI_MODE_PAUSE) {
 	/* FIXME: parameters (start/end) in lpParams may not be used */
 	return WAVE_mciResume(wDevID, dwFlags, (LPMCI_GENERIC_PARMS)lpParms);
     }
-    
+
     /** This function will be called again by a thread when async is used.
      * We have to set MCI_MODE_PLAY before we do this so that the app can spin
      * on MCI_STATUS, so we have to allow it here if we're not going to start this thread.
@@ -713,22 +713,22 @@
     }
 
     wmw->dwStatus = MCI_MODE_PLAY;
-    
+
     if (!(dwFlags & MCI_WAIT)) {
-	return MCI_SendCommandAsync(wmw->openParms.wDeviceID, MCI_PLAY, dwFlags, 
+	return MCI_SendCommandAsync(wmw->openParms.wDeviceID, MCI_PLAY, dwFlags,
 				    (DWORD)lpParms, sizeof(MCI_PLAY_PARMS));
     }
 
     end = 0xFFFFFFFF;
     if (lpParms && (dwFlags & MCI_FROM)) {
-	wmw->dwPosition = WAVE_ConvertTimeFormatToByte(wmw, lpParms->dwFrom); 
+	wmw->dwPosition = WAVE_ConvertTimeFormatToByte(wmw, lpParms->dwFrom);
     }
     if (lpParms && (dwFlags & MCI_TO)) {
 	end = WAVE_ConvertTimeFormatToByte(wmw, lpParms->dwTo);
     }
-    
+
     TRACE("Playing from byte=%lu to byte=%lu\n", wmw->dwPosition, end);
-    
+
     if (end <= wmw->dwPosition)
 	return TRUE;
 
@@ -743,14 +743,14 @@
 	if (wmw->lpWaveFormat) {
 	    switch (wmw->lpWaveFormat->wFormatTag) {
 	    case WAVE_FORMAT_PCM:
-		if (wmw->lpWaveFormat->nAvgBytesPerSec != 
+		if (wmw->lpWaveFormat->nAvgBytesPerSec !=
 		    wmw->lpWaveFormat->nSamplesPerSec * wmw->lpWaveFormat->nBlockAlign) {
-		    WARN("Incorrect nAvgBytesPerSec (%ld), setting it to %ld\n", 
-			wmw->lpWaveFormat->nAvgBytesPerSec, 
-			wmw->lpWaveFormat->nSamplesPerSec * 
+		    WARN("Incorrect nAvgBytesPerSec (%ld), setting it to %ld\n",
+			wmw->lpWaveFormat->nAvgBytesPerSec,
+			wmw->lpWaveFormat->nSamplesPerSec *
 			 wmw->lpWaveFormat->nBlockAlign);
-		    wmw->lpWaveFormat->nAvgBytesPerSec = 
-			wmw->lpWaveFormat->nSamplesPerSec * 
+		    wmw->lpWaveFormat->nAvgBytesPerSec =
+			wmw->lpWaveFormat->nSamplesPerSec *
 			wmw->lpWaveFormat->nBlockAlign;
 		}
 		break;
@@ -760,10 +760,10 @@
 	TRACE("can't retrieve wave format %ld\n", dwRet);
 	goto cleanUp;
     }
-    
-	
+
+
     /* go back to beginning of chunk plus the requested position */
-    /* FIXME: I'm not sure this is correct, notably because some data linked to 
+    /* FIXME: I'm not sure this is correct, notably because some data linked to
      * the decompression state machine will not be correcly initialized.
      * try it this way (other way would be to decompress from 0 up to dwPosition
      * and to start sending to hWave when dwPosition is reached)
@@ -774,7 +774,7 @@
      * change from output to input and back
      */
     /* FIXME: how to choose between several output channels ? here mapper is forced */
-    dwRet = waveOutOpen(&wmw->hWave, WAVE_MAPPER, wmw->lpWaveFormat, 
+    dwRet = waveOutOpen(&wmw->hWave, WAVE_MAPPER, wmw->lpWaveFormat,
 			(DWORD)WAVE_mciPlayCallback, (DWORD)wmw, CALLBACK_FUNCTION);
 
     if (dwRet != 0) {
@@ -794,7 +794,7 @@
     waveHdr[0].dwLoops        = waveHdr[1].dwLoops        = 0L;
     waveHdr[0].dwFlags        = waveHdr[1].dwFlags        = 0L;
     waveHdr[0].dwBufferLength = waveHdr[1].dwBufferLength = bufsize;
-    if (waveOutPrepareHeader(wmw->hWave, &waveHdr[0], sizeof(WAVEHDR)) || 
+    if (waveOutPrepareHeader(wmw->hWave, &waveHdr[0], sizeof(WAVEHDR)) ||
 	waveOutPrepareHeader(wmw->hWave, &waveHdr[1], sizeof(WAVEHDR))) {
 	dwRet = MCIERR_INTERNAL;
 	goto cleanUp;
@@ -806,20 +806,20 @@
     wmw->dwEventCount = 1L; /* for first buffer */
 
     TRACE("Playing (normalized) from byte=%lu for %lu bytes\n", wmw->dwPosition, left);
-    
+
     /* FIXME: this doesn't work if wmw->dwPosition != 0 */
     while (left > 0 && wmw->dwStatus != MCI_MODE_STOP && wmw->dwStatus != MCI_MODE_NOT_READY) {
 	count = mmioRead(wmw->hFile, waveHdr[whidx].lpData, min(bufsize, left));
 	TRACE("mmioRead bufsize=%ld count=%ld\n", bufsize, count);
-	if (count < 1) 
+	if (count < 1)
 	    break;
-	/* count is always <= bufsize, so this is correct regarding the 
-	 * waveOutPrepareHeader function 
+	/* count is always <= bufsize, so this is correct regarding the
+	 * waveOutPrepareHeader function
 	 */
 	waveHdr[whidx].dwBufferLength = count;
 	waveHdr[whidx].dwFlags &= ~WHDR_DONE;
 	TRACE("before WODM_WRITE lpWaveHdr=%p dwBufferLength=%lu dwBytesRecorded=%lu\n",
-	      &waveHdr[whidx], waveHdr[whidx].dwBufferLength, 
+	      &waveHdr[whidx], waveHdr[whidx].dwBufferLength,
 	      waveHdr[whidx].dwBytesRecorded);
 	dwRet = waveOutWrite(wmw->hWave, &waveHdr[whidx], sizeof(WAVEHDR));
 	left -= count;
@@ -840,7 +840,7 @@
 
     dwRet = 0;
 
-cleanUp:    
+cleanUp:
     HeapFree(GetProcessHeap(), 0, waveHdr);
 
     if (wmw->hWave) {
@@ -850,8 +850,8 @@
     CloseHandle(wmw->hEvent);
 
     if (lpParms && (dwFlags & MCI_NOTIFY)) {
-	mciDriverNotify((HWND)LOWORD(lpParms->dwCallback), 
-			wmw->openParms.wDeviceID, 
+	mciDriverNotify((HWND)LOWORD(lpParms->dwCallback),
+			wmw->openParms.wDeviceID,
 			dwRet ? MCI_NOTIFY_FAILURE : MCI_NOTIFY_SUCCESSFUL);
     }
 
@@ -863,13 +863,13 @@
 /**************************************************************************
  * 				WAVE_mciPlayCallback		[internal]
  */
-static	void	CALLBACK WAVE_mciRecordCallback(HWAVEOUT hwo, UINT uMsg, 
-					      DWORD dwInstance,  
+static	void	CALLBACK WAVE_mciRecordCallback(HWAVEOUT hwo, UINT uMsg,
+					      DWORD dwInstance,
 					      DWORD dwParam1, DWORD dwParam2)
 {
     WINE_MCIWAVE*	wmw = (WINE_MCIWAVE*)dwInstance;
-    LPWAVEHDR           lpWaveHdr = NULL; 
-    LONG                count = 0; 
+    LPWAVEHDR           lpWaveHdr = NULL;
+    LONG                count = 0;
     switch (uMsg) {
     case WIM_OPEN:
     case WIM_CLOSE:
@@ -883,18 +883,18 @@
 
 	lpWaveHdr->dwFlags &= ~WHDR_DONE;
 	wmw->dwPosition  += count;
-        wmw->dwRemaining -= count;	
+        wmw->dwRemaining -= count;
 
         if (wmw->dwStatus == MCI_MODE_RECORD)
         {
            /* Only queue up another buffer if we are recording.  We could receive this
               message also when waveInReset() is called, since it notifies on all wave
               buffers that are outstanding.  Queueing up more sometimes causes waveInClose
-              to fail. */ 
+              to fail. */
            waveInAddBuffer(wmw->hWave, lpWaveHdr, sizeof(*lpWaveHdr));
            TRACE("after mmioWrite dwPosition=%lu\n", wmw->dwPosition);
         }
-        
+
 	SetEvent(wmw->hEvent);
 	break;
     default:
@@ -910,7 +910,7 @@
 	    break;
 	}
 	InterlockedIncrement(&wmw->dwEventCount);
-	
+
 	WaitForSingleObject(wmw->hEvent, INFINITE);
     }
 }
@@ -922,17 +922,17 @@
 {
     DWORD		end;
     DWORD		dwRet = 0;
-    LONG		bufsize; 
+    LONG		bufsize;
     LPWAVEHDR		waveHdr = NULL;
     WINE_MCIWAVE*	wmw = WAVE_mciGetOpenDev(wDevID);
 
 
     TRACE("(%u, %08lX, %p);\n", wDevID, dwFlags, lpParms);
-    
+
     if (wmw == NULL)		return MCIERR_INVALID_DEVICE_ID;
     if (lpParms == NULL)	return MCIERR_NULL_PARAMETER_BLOCK;
- 
-    /* FIXME : since there is no way to determine in which mode the device is 
+
+    /* FIXME : since there is no way to determine in which mode the device is
      * open (recording/playback) automatically switch from a mode to another
      */
     wmw->fInput = TRUE;
@@ -946,7 +946,7 @@
         /* FIXME: parameters (start/end) in lpParams may not be used */
         return WAVE_mciResume(wDevID, dwFlags, (LPMCI_GENERIC_PARMS)lpParms);
     }
-    
+
     /** This function will be called again by a thread when async is used.
      * We have to set MCI_MODE_PLAY before we do this so that the app can spin
      * on MCI_STATUS, so we have to allow it here if we're not going to start this thread.
@@ -956,9 +956,9 @@
     }
 
     wmw->dwStatus = MCI_MODE_RECORD;
-    
-    if (!(dwFlags & MCI_WAIT)) { 
-	return MCI_SendCommandAsync(wmw->openParms.wDeviceID, MCI_RECORD, dwFlags, 
+
+    if (!(dwFlags & MCI_WAIT)) {
+	return MCI_SendCommandAsync(wmw->openParms.wDeviceID, MCI_RECORD, dwFlags,
 				    (DWORD)lpParms, sizeof(MCI_RECORD_PARMS));
     }
 
@@ -966,14 +966,14 @@
     {
   	    /* new RIFF file */
 	    dwRet = WAVE_mciCreateRIFFSkeleton(wmw);
-    } else 
+    } else
     {
 	FIXME("Should descend into data chunk. Please report.\n");
     }
-  
+
     end = 0xFFFFFFFF;
     if (lpParms && (dwFlags & MCI_FROM)) {
-	wmw->dwPosition = WAVE_ConvertTimeFormatToByte(wmw, lpParms->dwFrom); 
+	wmw->dwPosition = WAVE_ConvertTimeFormatToByte(wmw, lpParms->dwFrom);
     }
 
     if (lpParms && (dwFlags & MCI_TO)) {
@@ -994,7 +994,7 @@
     wmw->ckWaveData.cksize = WAVE_ALIGN_ON_BLOCK(wmw, wmw->ckWaveData.cksize);
 
     /* go back to beginning of chunk plus the requested position */
-    /* FIXME: I'm not sure this is correct, notably because some data linked to 
+    /* FIXME: I'm not sure this is correct, notably because some data linked to
      * the decompression state machine will not be correcly initialized.
      * try it this way (other way would be to decompress from 0 up to dwPosition
      * and to start sending to hWave when dwPosition is reached)
@@ -1005,7 +1005,7 @@
      * change from output to input and back
      */
     /* FIXME: how to choose between several output channels ? here mapper is forced */
-    dwRet = waveInOpen(&wmw->hWave, WAVE_MAPPER, wmw->lpWaveFormat, 
+    dwRet = waveInOpen(&wmw->hWave, WAVE_MAPPER, wmw->lpWaveFormat,
 			(DWORD)WAVE_mciRecordCallback, (DWORD)wmw, CALLBACK_FUNCTION);
 
     if (dwRet != 0) {
@@ -1026,7 +1026,7 @@
     waveHdr[0].dwFlags        = waveHdr[1].dwFlags        = 0L;
     waveHdr[0].dwBufferLength = waveHdr[1].dwBufferLength = bufsize;
 
-    if (waveInPrepareHeader(wmw->hWave, &waveHdr[0], sizeof(WAVEHDR)) || 
+    if (waveInPrepareHeader(wmw->hWave, &waveHdr[0], sizeof(WAVEHDR)) ||
 	waveInPrepareHeader(wmw->hWave, &waveHdr[1], sizeof(WAVEHDR))) {
 	dwRet = MCIERR_INTERNAL;
 	goto cleanUp;
@@ -1037,23 +1037,23 @@
 	dwRet = MCIERR_INTERNAL;
 	goto cleanUp;
     }
-        
+
     wmw->hEvent = CreateEventA(NULL, FALSE, FALSE, NULL);
     wmw->dwEventCount = 1L; /* for first buffer */
 
     wmw->dwRemaining = end - wmw->dwPosition;
-    
+
     TRACE("Recording (normalized) from byte=%lu for %lu bytes\n", wmw->dwPosition, wmw->dwRemaining);
 
-    dwRet = waveInStart(wmw->hWave); 
-   
+    dwRet = waveInStart(wmw->hWave);
+
     while ( wmw->dwRemaining > 0 && wmw->dwStatus != MCI_MODE_STOP && wmw->dwStatus != MCI_MODE_NOT_READY) {
-	WAVE_mciRecordWaitDone(wmw);  
+	WAVE_mciRecordWaitDone(wmw);
     }
 
     /* needed so that the callback above won't add again the buffers returned by the reset */
     wmw->dwStatus = MCI_MODE_STOP;
-   
+
     waveInReset(wmw->hWave);
 
     waveInUnprepareHeader(wmw->hWave, &waveHdr[0], sizeof(WAVEHDR));
@@ -1061,7 +1061,7 @@
 
     dwRet = 0;
 
-cleanUp:    
+cleanUp:
     HeapFree(GetProcessHeap(), 0, waveHdr);
 
     if (wmw->hWave) {
@@ -1076,8 +1076,8 @@
     }
 
     if (lpParms && (dwFlags & MCI_NOTIFY)) {
-	mciDriverNotify((HWND)LOWORD(lpParms->dwCallback), 
-			wmw->openParms.wDeviceID, 
+	mciDriverNotify((HWND)LOWORD(lpParms->dwCallback),
+			wmw->openParms.wDeviceID,
 			dwRet ? MCI_NOTIFY_FAILURE : MCI_NOTIFY_SUCCESSFUL);
     }
 
@@ -1094,19 +1094,19 @@
 {
     DWORD 		dwRet;
     WINE_MCIWAVE*	wmw = WAVE_mciGetOpenDev(wDevID);
-    
+
     TRACE("(%u, %08lX, %p);\n", wDevID, dwFlags, lpParms);
-    
+
     if (lpParms == NULL)	return MCIERR_NULL_PARAMETER_BLOCK;
     if (wmw == NULL)		return MCIERR_INVALID_DEVICE_ID;
-    
+
     if (wmw->dwStatus == MCI_MODE_PLAY) {
 	wmw->dwStatus = MCI_MODE_PAUSE;
-    } 
-    
+    }
+
     if (wmw->fInput)	dwRet = waveInStop(wmw->hWave);
     else		dwRet = waveOutPause(wmw->hWave);
-    
+
     return (dwRet == MMSYSERR_NOERROR) ? 0 : MCIERR_INTERNAL;
 }
 
@@ -1117,15 +1117,15 @@
 {
     WINE_MCIWAVE*	wmw = WAVE_mciGetOpenDev(wDevID);
     DWORD		dwRet = 0;
-    
+
     TRACE("(%u, %08lX, %p);\n", wDevID, dwFlags, lpParms);
-    
+
     if (wmw == NULL)		return MCIERR_INVALID_DEVICE_ID;
-    
+
     if (wmw->dwStatus == MCI_MODE_PAUSE) {
 	wmw->dwStatus = MCI_MODE_PLAY;
-    } 
-    
+    }
+
     if (wmw->fInput)	dwRet = waveInStart(wmw->hWave);
     else		dwRet = waveOutRestart(wmw->hWave);
     return (dwRet == MMSYSERR_NOERROR) ? 0 : MCIERR_INTERNAL;
@@ -1138,16 +1138,16 @@
 {
     DWORD		ret = 0;
     WINE_MCIWAVE*	wmw = WAVE_mciGetOpenDev(wDevID);
-    
+
     TRACE("(%04X, %08lX, %p);\n", wDevID, dwFlags, lpParms);
-    
+
     if (lpParms == NULL) {
 	ret = MCIERR_NULL_PARAMETER_BLOCK;
     } else if (wmw == NULL) {
 	ret = MCIERR_INVALID_DEVICE_ID;
     } else {
 	WAVE_mciStop(wDevID, MCI_WAIT, 0);
-	
+
 	if (dwFlags & MCI_SEEK_TO_START) {
 	    wmw->dwPosition = 0;
 	} else if (dwFlags & MCI_SEEK_TO_END) {
@@ -1158,16 +1158,16 @@
 	    WARN("dwFlag doesn't tell where to seek to...\n");
 	    return MCIERR_MISSING_PARAMETER;
 	}
-	
+
 	TRACE("Seeking to position=%lu bytes\n", wmw->dwPosition);
-	
+
 	if (dwFlags & MCI_NOTIFY) {
-	    mciDriverNotify((HWND)LOWORD(lpParms->dwCallback), 
+	    mciDriverNotify((HWND)LOWORD(lpParms->dwCallback),
 			    wmw->openParms.wDeviceID, MCI_NOTIFY_SUCCESSFUL);
 	}
     }
-    return ret;	
-}    
+    return ret;
+}
 
 /**************************************************************************
  * 				WAVE_mciSet			[internal]
@@ -1175,12 +1175,12 @@
 static DWORD WAVE_mciSet(UINT wDevID, DWORD dwFlags, LPMCI_SET_PARMS lpParms)
 {
     WINE_MCIWAVE*	wmw = WAVE_mciGetOpenDev(wDevID);
-    
+
     TRACE("(%u, %08lX, %p);\n", wDevID, dwFlags, lpParms);
-    
+
     if (lpParms == NULL)	return MCIERR_NULL_PARAMETER_BLOCK;
     if (wmw == NULL)		return MCIERR_INVALID_DEVICE_ID;
-    
+
     if (dwFlags & MCI_SET_TIME_FORMAT) {
 	switch (lpParms->dwTimeFormat) {
 	case MCI_FORMAT_MILLISECONDS:
@@ -1221,7 +1221,7 @@
 	    WARN("MCI_SET_AUDIO without SET_ON or SET_OFF\n");
 	    return MCIERR_BAD_INTEGER;
 	}
-	
+
 	if (lpParms->dwAudio & MCI_SET_AUDIO_ALL)
 	    TRACE("MCI_SET_AUDIO_ALL !\n");
 	if (lpParms->dwAudio & MCI_SET_AUDIO_LEFT)
@@ -1229,13 +1229,13 @@
 	if (lpParms->dwAudio & MCI_SET_AUDIO_RIGHT)
 	    TRACE("MCI_SET_AUDIO_RIGHT !\n");
     }
-    if (dwFlags & MCI_WAVE_INPUT) 
+    if (dwFlags & MCI_WAVE_INPUT)
 	TRACE("MCI_WAVE_INPUT !\n");
-    if (dwFlags & MCI_WAVE_OUTPUT) 
+    if (dwFlags & MCI_WAVE_OUTPUT)
 	TRACE("MCI_WAVE_OUTPUT !\n");
-    if (dwFlags & MCI_WAVE_SET_ANYINPUT) 
+    if (dwFlags & MCI_WAVE_SET_ANYINPUT)
 	TRACE("MCI_WAVE_SET_ANYINPUT !\n");
-    if (dwFlags & MCI_WAVE_SET_ANYOUTPUT) 
+    if (dwFlags & MCI_WAVE_SET_ANYOUTPUT)
 	TRACE("MCI_WAVE_SET_ANYOUTPUT !\n");
     if (dwFlags & MCI_WAVE_SET_AVGBYTESPERSEC) {
 	wmw->wfxRef.nAvgBytesPerSec = ((LPMCI_WAVE_SET_PARMS)lpParms)->nAvgBytesPerSec;
@@ -1253,7 +1253,7 @@
 	wmw->wfxRef.nChannels = ((LPMCI_WAVE_SET_PARMS)lpParms)->nChannels;
 	TRACE("MCI_WAVE_SET_CHANNELS = %d\n", wmw->wfxRef.nChannels);
     }
-    if (dwFlags & MCI_WAVE_SET_FORMATTAG) { 
+    if (dwFlags & MCI_WAVE_SET_FORMATTAG) {
 	wmw->wfxRef.wFormatTag = ((LPMCI_WAVE_SET_PARMS)lpParms)->wFormatTag;
 	TRACE("MCI_WAVE_SET_FORMATTAG = %d\n", wmw->wfxRef.wFormatTag);
     }
@@ -1270,7 +1270,7 @@
 static DWORD WAVE_mciSave(UINT wDevID, DWORD dwFlags, LPMCI_SAVE_PARMS lpParms)
 {
     WINE_MCIWAVE*	wmw = WAVE_mciGetOpenDev(wDevID);
-    DWORD		ret = MCIERR_FILE_NOT_SAVED, tmpRet; 
+    DWORD		ret = MCIERR_FILE_NOT_SAVED, tmpRet;
     WPARAM           	wparam = MCI_NOTIFY_FAILURE;
 
     TRACE("%d, %08lX, %p);\n", wDevID, dwFlags, lpParms);
@@ -1287,7 +1287,7 @@
 
 
     ret = mmioClose(wmw->hFile, 0);
-    
+
     /*
       If the destination file already exists, it has to be overwritten.  (Behaviour
       verified in Windows (2000)).  If it doesn't overwrite, it is breaking one of
@@ -1300,15 +1300,15 @@
     tmpRet = GetLastError();
     DeleteFileA (lpParms->lpfilename);
     SetLastError(tmpRet);
-    
+
     if (0 == mmioRenameA(wmw->openParms.lpstrElementName, lpParms->lpfilename, 0, 0 )) {
 	ret = ERROR_SUCCESS;
     }
-    
+
     if (dwFlags & MCI_NOTIFY) {
 	if (ret == ERROR_SUCCESS) wparam = MCI_NOTIFY_SUCCESSFUL;
 
-    	mciDriverNotify( (HWND) LOWORD(lpParms->dwCallback), 
+    	mciDriverNotify( (HWND) LOWORD(lpParms->dwCallback),
 			 wmw->openParms.wDeviceID, wparam);
     }
 
@@ -1326,7 +1326,7 @@
     TRACE("(%u, %08lX, %p);\n", wDevID, dwFlags, lpParms);
     if (lpParms == NULL)	return MCIERR_NULL_PARAMETER_BLOCK;
     if (wmw == NULL)		return MCIERR_INVALID_DEVICE_ID;
-    
+
     if (dwFlags & MCI_STATUS_ITEM) {
 	switch (lpParms->dwItem) {
 	case MCI_STATUS_CURRENT_TRACK:
@@ -1363,10 +1363,10 @@
 		return MCIERR_UNSUPPORTED_FUNCTION;
 	    }
 	    /* only one track in file is currently handled, so don't take care of MCI_TRACK flag */
-	    lpParms->dwReturn = WAVE_ConvertByteToTimeFormat(wmw, 
+	    lpParms->dwReturn = WAVE_ConvertByteToTimeFormat(wmw,
 							     (dwFlags & MCI_STATUS_START) ? 0 : wmw->dwPosition,
 							     &ret);
-	    TRACE("MCI_STATUS_POSITION %s => %lu\n", 
+	    TRACE("MCI_STATUS_POSITION %s => %lu\n",
 		  (dwFlags & MCI_STATUS_START) ? "start" : "current", lpParms->dwReturn);
 	    break;
 	case MCI_STATUS_READY:
@@ -1455,7 +1455,7 @@
 	}
     }
     if (dwFlags & MCI_NOTIFY) {
-	mciDriverNotify((HWND)LOWORD(lpParms->dwCallback), 
+	mciDriverNotify((HWND)LOWORD(lpParms->dwCallback),
 			wmw->openParms.wDeviceID, MCI_NOTIFY_SUCCESSFUL);
     }
     return ret;
@@ -1464,17 +1464,17 @@
 /**************************************************************************
  * 				WAVE_mciGetDevCaps		[internal]
  */
-static DWORD WAVE_mciGetDevCaps(UINT wDevID, DWORD dwFlags, 
+static DWORD WAVE_mciGetDevCaps(UINT wDevID, DWORD dwFlags,
 				LPMCI_GETDEVCAPS_PARMS lpParms)
 {
     WINE_MCIWAVE*	wmw = WAVE_mciGetOpenDev(wDevID);
     DWORD		ret = 0;
 
     TRACE("(%u, %08lX, %p);\n", wDevID, dwFlags, lpParms);
-    
+
     if (lpParms == NULL)	return MCIERR_NULL_PARAMETER_BLOCK;
     if (wmw == NULL)		return MCIERR_INVALID_DEVICE_ID;
-    
+
     if (dwFlags & MCI_GETDEVCAPS_ITEM) {
 	switch(lpParms->dwItem) {
 	case MCI_GETDEVCAPS_DEVICE_TYPE:
@@ -1538,16 +1538,16 @@
     DWORD		ret = 0;
     LPCSTR		str = 0;
     WINE_MCIWAVE*	wmw = WAVE_mciGetOpenDev(wDevID);
-    
+
     TRACE("(%u, %08lX, %p);\n", wDevID, dwFlags, lpParms);
-    
+
     if (lpParms == NULL || lpParms->lpstrReturn == NULL) {
 	ret = MCIERR_NULL_PARAMETER_BLOCK;
     } else if (wmw == NULL) {
 	ret = MCIERR_INVALID_DEVICE_ID;
     } else {
 	TRACE("buf=%p, len=%lu\n", lpParms->lpstrReturn, lpParms->dwRetSize);
-	
+
 	switch (dwFlags & ~(MCI_WAIT|MCI_NOTIFY)) {
 	case MCI_INFO_PRODUCT:
 	    str = "Wine's audio player";
@@ -1575,19 +1575,19 @@
     } else {
 	lpParms->lpstrReturn[0] = 0;
     }
-    
+
     return ret;
 }
 
 /**************************************************************************
  * 				DriverProc (MCIWAVE.@)
  */
-LONG CALLBACK	MCIWAVE_DriverProc(DWORD dwDevID, HDRVR hDriv, DWORD wMsg, 
+LONG CALLBACK	MCIWAVE_DriverProc(DWORD dwDevID, HDRVR hDriv, DWORD wMsg,
 				   DWORD dwParam1, DWORD dwParam2)
 {
-    TRACE("(%08lX, %04X, %08lX, %08lX, %08lX)\n", 
+    TRACE("(%08lX, %04X, %08lX, %08lX, %08lX)\n",
 	  dwDevID, hDriv, wMsg, dwParam1, dwParam2);
-    
+
     switch (wMsg) {
     case DRV_LOAD:		return 1;
     case DRV_FREE:		return 1;
@@ -1616,23 +1616,23 @@
     case MCI_STATUS:		return WAVE_mciStatus    (dwDevID, dwParam1, (LPMCI_STATUS_PARMS)      dwParam2);
     case MCI_GETDEVCAPS:	return WAVE_mciGetDevCaps(dwDevID, dwParam1, (LPMCI_GETDEVCAPS_PARMS)  dwParam2);
     case MCI_INFO:		return WAVE_mciInfo      (dwDevID, dwParam1, (LPMCI_INFO_PARMSA)       dwParam2);
-    case MCI_SEEK:		return WAVE_mciSeek      (dwDevID, dwParam1, (LPMCI_SEEK_PARMS)        dwParam2);		
+    case MCI_SEEK:		return WAVE_mciSeek      (dwDevID, dwParam1, (LPMCI_SEEK_PARMS)        dwParam2);
     case MCI_SAVE:		return WAVE_mciSave	 (dwDevID, dwParam1, (LPMCI_SAVE_PARMS)	       dwParam2);
 	/* commands that should be supported */
-    case MCI_LOAD:		
-    case MCI_FREEZE:		
-    case MCI_PUT:		
-    case MCI_REALIZE:		
-    case MCI_UNFREEZE:		
-    case MCI_UPDATE:		
-    case MCI_WHERE:		
-    case MCI_STEP:		
-    case MCI_SPIN:		
-    case MCI_ESCAPE:		
-    case MCI_COPY:		
-    case MCI_CUT:		
-    case MCI_DELETE:		
-    case MCI_PASTE:		
+    case MCI_LOAD:
+    case MCI_FREEZE:
+    case MCI_PUT:
+    case MCI_REALIZE:
+    case MCI_UNFREEZE:
+    case MCI_UPDATE:
+    case MCI_WHERE:
+    case MCI_STEP:
+    case MCI_SPIN:
+    case MCI_ESCAPE:
+    case MCI_COPY:
+    case MCI_CUT:
+    case MCI_DELETE:
+    case MCI_PASTE:
 	FIXME("Unsupported yet command [%lu]\n", wMsg);
 	break;
     case MCI_WINDOW:
diff --git a/dlls/winmm/midimap/midimap.c b/dlls/winmm/midimap/midimap.c
index 60e0247..6c6f1ad 100644
--- a/dlls/winmm/midimap/midimap.c
+++ b/dlls/winmm/midimap/midimap.c
@@ -1,5 +1,5 @@
 /* -*- tab-width: 8; c-basic-offset: 4 -*- */
-/*				   
+/*
  * Wine Midi mapper driver
  *
  * Copyright 	1999, 2000, 2001 Eric Pouech
@@ -62,7 +62,7 @@
  * "Channels"="<bitMask>"
  * (the default value of this key also refers to the name of the device).
  *
- * this defines, for each midiOut device (identified by its index in <idxDevice>), which 
+ * this defines, for each midiOut device (identified by its index in <idxDevice>), which
  * channels have to be mapped onto it. The <bitMask> defines the channels (from 0 to 15)
  * will be mapped (mapping occurs for channel <ch> if bit <ch> is set in <bitMask>
  *
@@ -77,7 +77,7 @@
 
 WINE_DEFAULT_DEBUG_CHANNEL(msacm);
 
-typedef struct tagMIDIOUTPORT 
+typedef struct tagMIDIOUTPORT
 {
     char		name[MAXPNAMELEN];
     int			loaded;
@@ -87,7 +87,7 @@
     unsigned int	aChn[16];
 } MIDIOUTPORT;
 
-typedef	struct tagMIDIMAPDATA 
+typedef	struct tagMIDIMAPDATA
 {
     struct tagMIDIMAPDATA*	self;
     MIDIOUTPORT*	ChannelMap[16];
@@ -106,14 +106,14 @@
 
 static BOOL	MIDIMAP_FindPort(const char* name, unsigned* dev)
 {
-    for (*dev = 0; *dev < numMidiOutPorts; (*dev)++) 
+    for (*dev = 0; *dev < numMidiOutPorts; (*dev)++)
     {
 	TRACE("%s\n", midiOutPorts[*dev].name);
 	if (strcmp(midiOutPorts[*dev].name, name) == 0)
 	    return TRUE;
     }
     /* try the form #nnn */
-    if (*name == '#' && isdigit(name[1])) 
+    if (*name == '#' && isdigit(name[1]))
     {
 	*dev = atoi(name + 1);
 	if (*dev < numMidiOutPorts)
@@ -126,7 +126,7 @@
 {
     unsigned i, dev = 0;
 
-    if (port != NULL && !MIDIMAP_FindPort(port, &dev)) 
+    if (port != NULL && !MIDIMAP_FindPort(port, &dev))
     {
 	ERR("Registry glitch: couldn't find midi out (%s)\n", port);
 	dev = 0;
@@ -150,19 +150,19 @@
 
     for (i = 0; i < 16; i++)	mom->ChannelMap[i] = NULL;
 
-    if (RegOpenKeyA(HKEY_LOCAL_MACHINE, 
-		    "System\\CurrentControlSet\\Control\\MediaProperties\\PrivateProperties\\Midi\\Schemes", 
-		    &hSchemesKey)) 
+    if (RegOpenKeyA(HKEY_LOCAL_MACHINE,
+		    "System\\CurrentControlSet\\Control\\MediaProperties\\PrivateProperties\\Midi\\Schemes",
+		    &hSchemesKey))
     {
 	return FALSE;
     }
-    if (RegOpenKeyA(hSchemesKey, scheme, &hKey)) 
+    if (RegOpenKeyA(hSchemesKey, scheme, &hKey))
     {
 	RegCloseKey(hSchemesKey);
 	return FALSE;
     }
 
-    for (idx = 0; !RegEnumKeyA(hKey, idx, buffer, sizeof(buffer)); idx++) 
+    for (idx = 0; !RegEnumKeyA(hKey, idx, buffer, sizeof(buffer)); idx++)
     {
 	if (RegOpenKeyA(hKey, buffer, &hPortKey)) continue;
 
@@ -175,11 +175,11 @@
 	if (RegQueryValueExA(hPortKey, "Channels", 0, &type, (void*)&mask, &size))
 	    continue;
 
-	for (i = 0; i < 16; i++) 
+	for (i = 0; i < 16; i++)
 	{
-	    if (mask & (1 << i)) 
+	    if (mask & (1 << i))
 	    {
-		if (mom->ChannelMap[i]) 
+		if (mom->ChannelMap[i])
 		    ERR("Quirks in registry, channel %u is mapped twice\n", i);
 		mom->ChannelMap[i] = &midiOutPorts[dev];
 	    }
@@ -188,7 +188,7 @@
 
     RegCloseKey(hSchemesKey);
     RegCloseKey(hKey);
-    
+
     return TRUE;
 }
 
@@ -197,39 +197,39 @@
     HKEY 	hKey;
     BOOL	ret;
 
-    if (RegOpenKeyA(HKEY_CURRENT_USER, 
-		    "Software\\Microsoft\\Windows\\CurrentVersion\\Multimedia\\MIDIMap", &hKey)) 
+    if (RegOpenKeyA(HKEY_CURRENT_USER,
+		    "Software\\Microsoft\\Windows\\CurrentVersion\\Multimedia\\MIDIMap", &hKey))
     {
 	ret = MIDIMAP_LoadSettingsDefault(mom, NULL);
     }
-    else 
+    else
     {
 	DWORD	type, size, out;
 	char	buffer[256];
-    
+
 	ret = 2;
 	size = sizeof(out);
-	if (!RegQueryValueExA(hKey, "UseScheme", 0, &type, (void*)&out, &size) && out) 
+	if (!RegQueryValueExA(hKey, "UseScheme", 0, &type, (void*)&out, &size) && out)
 	{
 	    size = sizeof(buffer);
-	    if (!RegQueryValueExA(hKey, "CurrentScheme", 0, &type, buffer, &size)) 
+	    if (!RegQueryValueExA(hKey, "CurrentScheme", 0, &type, buffer, &size))
 	    {
 		if (!(ret = MIDIMAP_LoadSettingsScheme(mom, buffer)))
 		    ret = MIDIMAP_LoadSettingsDefault(mom, NULL);
 	    }
-	    else 
+	    else
 	    {
 		ERR("Wrong registry: UseScheme is active, but no CurrentScheme found\n");
 	    }
 	}
-	if (ret == 2) 
+	if (ret == 2)
 	{
 	    size = sizeof(buffer);
-	    if (!RegQueryValueExA(hKey, "CurrentInstrument", 0, &type, buffer, &size) && *buffer) 
+	    if (!RegQueryValueExA(hKey, "CurrentInstrument", 0, &type, buffer, &size) && *buffer)
 	    {
 		ret = MIDIMAP_LoadSettingsDefault(mom, buffer);
 	    }
-	    else 
+	    else
 	    {
 		ret = MIDIMAP_LoadSettingsDefault(mom, NULL);
 	    }
@@ -237,13 +237,13 @@
     }
     RegCloseKey(hKey);
 
-    if (ret && TRACE_ON(msacm)) 
+    if (ret && TRACE_ON(msacm))
     {
 	unsigned	i;
 
-	for (i = 0; i < 16; i++) 
+	for (i = 0; i < 16; i++)
 	{
-	    TRACE("chnMap[% 2d] => %d\n", 
+	    TRACE("chnMap[% 2d] => %d\n",
 		  i, mom->ChannelMap[i] ? mom->ChannelMap[i]->uDevID : -1);
 	}
     }
@@ -258,7 +258,7 @@
 
     if (!mom) return MMSYSERR_NOMEM;
 
-    if (MIDIMAP_LoadSettings(mom)) 
+    if (MIDIMAP_LoadSettings(mom))
     {
 	*lpdwUser = (DWORD)mom;
 	mom->self = mom;
@@ -276,13 +276,13 @@
 
     if (MIDIMAP_IsBadData(mom)) 	return MMSYSERR_ERROR;
 
-    for (i = 0; i < 16; i++) 
+    for (i = 0; i < 16; i++)
     {
 	DWORD	t;
-	if (mom->ChannelMap[i] && mom->ChannelMap[i]->loaded > 0) 
+	if (mom->ChannelMap[i] && mom->ChannelMap[i]->loaded > 0)
 	{
 	    t = midiOutClose(mom->ChannelMap[i]->hMidi);
-	    if (t == MMSYSERR_NOERROR) 
+	    if (t == MMSYSERR_NOERROR)
 	    {
 		mom->ChannelMap[i]->loaded = 0;
 		mom->ChannelMap[i]->hMidi = 0;
@@ -306,9 +306,9 @@
 	return MMSYSERR_ERROR;
 
     mh = *lpMidiHdr;
-    for (chn = 0; chn < 16; chn++) 
+    for (chn = 0; chn < 16; chn++)
     {
-	if (mom->ChannelMap[chn] && mom->ChannelMap[chn]->loaded > 0) 
+	if (mom->ChannelMap[chn] && mom->ChannelMap[chn]->loaded > 0)
 	{
 	    mh.dwFlags = 0;
 	    midiOutPrepareHeader(mom->ChannelMap[chn]->hMidi, &mh, sizeof(mh));
@@ -331,7 +331,7 @@
 
     if (!mom->ChannelMap[chn]) return MMSYSERR_NOERROR;
 
-    switch (lb & 0xF0) 
+    switch (lb & 0xF0)
     {
     case 0x80:
     case 0x90:
@@ -340,7 +340,7 @@
     case 0xC0:
     case 0xD0:
     case 0xE0:
-	if (mom->ChannelMap[chn]->loaded == 0) 
+	if (mom->ChannelMap[chn]->loaded == 0)
 	{
 	    if (midiOutOpen(&mom->ChannelMap[chn]->hMidi, mom->ChannelMap[chn]->uDevID,
 			    0L, 0L, CALLBACK_NULL) == MMSYSERR_NOERROR)
@@ -348,17 +348,17 @@
 	    else
 		mom->ChannelMap[chn]->loaded = -1;
 	    /* FIXME: should load here the IDF midi data... and allow channel and
-	     * patch mappings 
+	     * patch mappings
 	     */
 	}
-	if (mom->ChannelMap[chn]->loaded > 0) 
+	if (mom->ChannelMap[chn]->loaded > 0)
 	{
 	    /* change channel */
 	    dwParam &= ~0x0F;
 	    dwParam |= mom->ChannelMap[chn]->aChn[chn];
 
 	    if ((LOBYTE(LOWORD(dwParam)) & 0xF0) == 0xC0 /* program change */ &&
-		mom->ChannelMap[chn]->lpbPatch) 
+		mom->ChannelMap[chn]->lpbPatch)
 	    {
 		BYTE patch = HIBYTE(LOWORD(dwParam));
 
@@ -370,7 +370,7 @@
 	}
 	break;
     case 0xF0:
-	for (chn = 0; chn < 16; chn++) 
+	for (chn = 0; chn < 16; chn++)
 	{
 	    if (mom->ChannelMap[chn]->loaded > 0)
 		ret = midiOutShortMsg(mom->ChannelMap[chn]->hMidi, dwParam);
@@ -426,9 +426,9 @@
     if (MIDIMAP_IsBadData(mom))
 	return MMSYSERR_ERROR;
 
-    for (chn = 0; chn < 16; chn++) 
+    for (chn = 0; chn < 16; chn++)
     {
-	if (mom->ChannelMap[chn] && mom->ChannelMap[chn]->loaded > 0) 
+	if (mom->ChannelMap[chn] && mom->ChannelMap[chn]->loaded > 0)
 	{
 	    ret = midiOutReset(mom->ChannelMap[chn]->hMidi);
 	    if (ret != MMSYSERR_NOERROR) break;
@@ -440,13 +440,13 @@
 /**************************************************************************
  * 				modMessage (MIDIMAP.@)
  */
-DWORD WINAPI MIDIMAP_modMessage(UINT wDevID, UINT wMsg, DWORD dwUser, 
+DWORD WINAPI MIDIMAP_modMessage(UINT wDevID, UINT wMsg, DWORD dwUser,
 				DWORD dwParam1, DWORD dwParam2)
 {
     TRACE("(%u, %04X, %08lX, %08lX, %08lX);\n",
 	  wDevID, wMsg, dwUser, dwParam1, dwParam2);
-    
-    switch (wMsg) 
+
+    switch (wMsg)
     {
     case DRVM_INIT:
     case DRVM_EXIT:
@@ -479,7 +479,7 @@
  *======================================================================*/
 
 /**************************************************************************
- * 				MIDIMAP_drvOpen			[internal]	
+ * 				MIDIMAP_drvOpen			[internal]
  */
 static	DWORD	MIDIMAP_drvOpen(LPSTR str)
 {
@@ -488,13 +488,13 @@
 
     if (midiOutPorts)
 	return 0;
-    
+
     numMidiOutPorts = midiOutGetNumDevs();
-    midiOutPorts = HeapAlloc(GetProcessHeap(), 0, 
+    midiOutPorts = HeapAlloc(GetProcessHeap(), 0,
 			     numMidiOutPorts * sizeof(MIDIOUTPORT));
-    for (dev = 0; dev < numMidiOutPorts; dev++) 
+    for (dev = 0; dev < numMidiOutPorts; dev++)
     {
-	if (midiOutGetDevCapsA((HMIDIOUT)dev, &moc, sizeof(moc)) == 0L) 
+	if (midiOutGetDevCapsA((HMIDIOUT)dev, &moc, sizeof(moc)) == 0L)
 	{
 	    strcpy(midiOutPorts[dev].name, moc.szPname);
 	    midiOutPorts[dev].loaded = 0;
@@ -504,7 +504,7 @@
 	    for (i = 0; i < 16; i++)
 		midiOutPorts[dev].aChn[i] = i;
 	}
-	else 
+	else
 	{
 	    midiOutPorts[dev].loaded = -1;
 	}
@@ -514,11 +514,11 @@
 }
 
 /**************************************************************************
- * 				MIDIMAP_drvClose		[internal]	
+ * 				MIDIMAP_drvClose		[internal]
  */
 static	DWORD	MIDIMAP_drvClose(DWORD dwDevID)
 {
-    if (midiOutPorts) 
+    if (midiOutPorts)
     {
 	HeapFree(GetProcessHeap(), 0, midiOutPorts);
 	midiOutPorts = NULL;
@@ -530,13 +530,13 @@
 /**************************************************************************
  * 				DriverProc (MIDIMAP.@)
  */
-LONG CALLBACK	MIDIMAP_DriverProc(DWORD dwDevID, HDRVR hDriv, DWORD wMsg, 
+LONG CALLBACK	MIDIMAP_DriverProc(DWORD dwDevID, HDRVR hDriv, DWORD wMsg,
 				   DWORD dwParam1, DWORD dwParam2)
 {
 /* EPP     TRACE("(%08lX, %04X, %08lX, %08lX, %08lX)\n",  */
 /* EPP 	  dwDevID, hDriv, wMsg, dwParam1, dwParam2); */
-    
-    switch (wMsg) 
+
+    switch (wMsg)
     {
     case DRV_LOAD:		return 1;
     case DRV_FREE:		return 1;
diff --git a/dlls/winmm/mmio.c b/dlls/winmm/mmio.c
index b70b325..61e80c3 100644
--- a/dlls/winmm/mmio.c
+++ b/dlls/winmm/mmio.c
@@ -25,7 +25,7 @@
  * 	+ correct handling of global/local IOProcs
  *	+ mode of mmio objects is not used (read vs write vs readwrite)
  *	+ optimization of internal buffers (seg / lin)
- *	+ even in 32 bit only, a seg ptr IO buffer is allocated (after this is 
+ *	+ even in 32 bit only, a seg ptr IO buffer is allocated (after this is
  *	  fixed, we'll have a proper 32/16 separation)
  *	+ thread safeness
  *	+ rename operation is broken
@@ -52,15 +52,15 @@
 /**************************************************************************
  *               	mmioDosIOProc           		[internal]
  */
-static LRESULT CALLBACK mmioDosIOProc(LPMMIOINFO lpmmioinfo, UINT uMessage, 
-				      LPARAM lParam1, LPARAM lParam2) 
+static LRESULT CALLBACK mmioDosIOProc(LPMMIOINFO lpmmioinfo, UINT uMessage,
+				      LPARAM lParam1, LPARAM lParam2)
 {
     LRESULT	ret = MMSYSERR_NOERROR;
 
     TRACE("(%p, %X, 0x%lx, 0x%lx);\n", lpmmioinfo, uMessage, lParam1, lParam2);
-    
+
     switch (uMessage) {
-    case MMIOM_OPEN: 
+    case MMIOM_OPEN:
 	{
 	    /* Parameters:
 	     * lParam1 = szFileName parameter from mmioOpen
@@ -75,10 +75,10 @@
 		FIXME("MMIO_GETTEMP not implemented\n");
 		return MMIOERR_CANNOTOPEN;
 	    }
-	    
+
 	    /* if filename NULL, assume open file handle in adwInfo[0] */
 	    if (!szFileName) {
-		if (lParam2) 
+		if (lParam2)
 		    lpmmioinfo->adwInfo[0] = DosFileHandleToWin32Handle(lpmmioinfo->adwInfo[0]);
 		break;
 	    }
@@ -87,8 +87,8 @@
 		ret = MMIOERR_CANNOTOPEN;
 	}
 	break;
-    
-    case MMIOM_CLOSE: 
+
+    case MMIOM_CLOSE:
 	/* Parameters:
 	 * lParam1 = wFlags parameter from mmioClose
 	 * lParam2 = unused
@@ -97,8 +97,8 @@
 	if (!(lParam1 & MMIO_FHOPEN))
 	    _lclose((HFILE)lpmmioinfo->adwInfo[0]);
 	break;
-	    
-    case MMIOM_READ: 
+
+    case MMIOM_READ:
 	/* Parameters:
 	 * lParam1 = huge pointer to read buffer
 	 * lParam2 = number of bytes to read
@@ -108,13 +108,13 @@
 	ret = _lread((HFILE)lpmmioinfo->adwInfo[0], (HPSTR)lParam1, (LONG)lParam2);
 	if (ret != -1)
 	    lpmmioinfo->lDiskOffset += ret;
-	
+
 	break;
-    
+
     case MMIOM_WRITE:
-    case MMIOM_WRITEFLUSH: 
+    case MMIOM_WRITEFLUSH:
 	/* no internal buffering, so WRITEFLUSH handled same as WRITE */
-	
+
 	/* Parameters:
 	 * lParam1 = huge pointer to write buffer
 	 * lParam2 = number of bytes to write
@@ -125,8 +125,8 @@
 	if (ret != -1)
 	    lpmmioinfo->lDiskOffset += ret;
 	break;
-    
-    case MMIOM_SEEK: 
+
+    case MMIOM_SEEK:
 	/* Parameters:
 	 * lParam1 = new position
 	 * lParam2 = from whence to seek (SEEK_SET, SEEK_CUR, SEEK_END)
@@ -136,8 +136,8 @@
 	if (ret != -1)
 	    lpmmioinfo->lDiskOffset = ret;
 	return ret;
-    
-    case MMIOM_RENAME: 
+
+    case MMIOM_RENAME:
 	/* Parameters:
 	 * lParam1 = old name
 	 * lParam2 = new name
@@ -151,21 +151,21 @@
 	FIXME("unexpected message %u\n", uMessage);
 	return 0;
     }
-    
+
     return ret;
 }
 
 /**************************************************************************
  *               	mmioMemIOProc           		[internal]
  */
-static LRESULT CALLBACK mmioMemIOProc(LPMMIOINFO lpmmioinfo, UINT uMessage, 
-				      LPARAM lParam1, LPARAM lParam2) 
+static LRESULT CALLBACK mmioMemIOProc(LPMMIOINFO lpmmioinfo, UINT uMessage,
+				      LPARAM lParam1, LPARAM lParam2)
 {
     TRACE("(%p,0x%04x,0x%08lx,0x%08lx)\n", lpmmioinfo, uMessage, lParam1, lParam2);
 
     switch (uMessage) {
-	
-    case MMIOM_OPEN: 
+
+    case MMIOM_OPEN:
 	/* Parameters:
 	 * lParam1 = filename (must be NULL)
 	 * lParam2 = reserved (we use it for 16-bitness)
@@ -177,16 +177,16 @@
 	    lpmmioinfo->pchEndRead = lpmmioinfo->pchEndWrite;
         lpmmioinfo->adwInfo[0] = HFILE_ERROR;
 	return 0;
-	
-    case MMIOM_CLOSE: 
+
+    case MMIOM_CLOSE:
 	/* Parameters:
 	 * lParam1 = wFlags parameter from mmioClose
 	 * lParam2 = unused
 	 * Returns: zero on success, error code on error
 	 */
 	return 0;
-	
-    case MMIOM_READ: 
+
+    case MMIOM_READ:
 	/* Parameters:
 	 * lParam1 = huge pointer to read buffer
 	 * lParam2 = number of bytes to read
@@ -196,11 +196,11 @@
 	 */
 	FIXME("MMIOM_READ on memory files should not occur, buffer may be lost!\n");
 	return 0;
-    
+
     case MMIOM_WRITE:
-    case MMIOM_WRITEFLUSH: 
+    case MMIOM_WRITEFLUSH:
 	/* no internal buffering, so WRITEFLUSH handled same as WRITE */
-	
+
 	/* Parameters:
 	 * lParam1 = huge pointer to write buffer
 	 * lParam2 = number of bytes to write
@@ -210,8 +210,8 @@
 	 */
 	FIXME("MMIOM_WRITE on memory files should not occur, buffer may be lost!\n");
 	return 0;
-    
-    case MMIOM_SEEK: 
+
+    case MMIOM_SEEK:
 	/* Parameters:
 	 * lParam1 = new position
 	 * lParam2 = from whence to seek (SEEK_SET, SEEK_CUR, SEEK_END)
@@ -220,12 +220,12 @@
 	 */
 	FIXME("MMIOM_SEEK on memory files should not occur, buffer may be lost!\n");
 	return -1;
-    
+
     default:
 	FIXME("unexpected message %u\n", uMessage);
 	return 0;
     }
-    
+
     return 0;
 }
 
@@ -255,7 +255,7 @@
  *
  * Finds the ProcList node associated with a given FOURCC code.
  */
-static struct IOProcList*	MMIO_FindProcNode(FOURCC fccIOProc) 
+static struct IOProcList*	MMIO_FindProcNode(FOURCC fccIOProc)
 {
     struct IOProcList*	pListNode;
 
@@ -297,19 +297,19 @@
 	    /* Stick it on the end of the list */
 	    pListNode->pNext = pIOProcListAnchor;
 	    pIOProcListAnchor = pListNode;
-	    
+
 	    /* Return this IOProc - that's how the caller knows we succeeded */
 	    lpProc = pIOProc;
-	} 
+	}
 	break;
-	          
+
     case MMIO_REMOVEPROC:
-	/* 
+	/*
 	 * Search for the node that we're trying to remove - note
 	 * that this method won't find the first item on the list, but
 	 * since the first two items on this list are ones we won't
 	 * let the user delete anyway, that's okay
-	 */	    
+	 */
 	ppListNode = &pIOProcListAnchor;
 	while ((*ppListNode) && (*ppListNode)->fourCC != fccIOProc)
 	    ppListNode = &((*ppListNode)->pNext);
@@ -323,7 +323,7 @@
 		break;
 	    }
 	    /* remove it, but only if it isn't builtin */
-	    if ((*ppListNode) >= defaultProcs && 
+	    if ((*ppListNode) >= defaultProcs &&
 		(*ppListNode) < defaultProcs + sizeof(defaultProcs)) {
 		WARN("Tried to remove built-in mmio proc. Skipping\n");
 	    } else {
@@ -335,14 +335,14 @@
 	    }
 	}
 	break;
-	    
+
     case MMIO_FINDPROC:
 	if ((pListNode = MMIO_FindProcNode(fccIOProc))) {
 	    lpProc = pListNode->pIOProc;
 	}
 	break;
     }
-    
+
     return lpProc;
 }
 
@@ -394,7 +394,7 @@
 /****************************************************************
  *       	MMIO_SendMessage			[INTERNAL]
  */
-static LRESULT	MMIO_SendMessage(LPWINE_MMIO wm, DWORD wMsg, LPARAM lParam1, 
+static LRESULT	MMIO_SendMessage(LPWINE_MMIO wm, DWORD wMsg, LPARAM lParam1,
 				 LPARAM lParam2, enum mmioProcType type)
 {
     MMIOINFO16 mmioInfo16;
@@ -442,14 +442,14 @@
 	    WARN("NIY\n");
 	}
 	result = (wm->info.pIOProc)((LPSTR)&wm->info, wMsg, lp1, lp2);
-	
+
 #if 0
 	if (wm->ioProc->type != type) {
 	    /* unmap (lParam1, lParam2) into (lp1, lp2) 16=>32 */
 	}
 #endif
 	break;
-    default:  
+    default:
 	FIXME("Internal error\n");
 	result = MMSYSERR_ERROR;
     }
@@ -470,31 +470,31 @@
     /* Filenames are of the form file.ext+ABC
        FIXME: What if a '+' is part of the file name?
        For now, we take the last '+' present */
-    
+
     FOURCC ret = 0;
-    
+
     /* Note that ext{Start,End} point to the . and + respectively */
     LPSTR extEnd;
-    
+
     TRACE("(%s)\n",debugstr_a(szFileName));
-    
+
     if (!szFileName)
 	return ret;
     extEnd = strrchr(szFileName,'+');
     if (extEnd) {
 	/* Need to parse to find the extension */
 	LPSTR extStart;
-	
+
 	extStart = extEnd;
 	while (extStart >= szFileName && extStart[0] != '.') {
 	    extStart--;
 	}
-	
+
 	if (extStart < szFileName) {
 	    ERR("+ but no . in szFileName: %s\n", debugstr_a(szFileName));
 	} else {
 	    CHAR ext[5];
-	    
+
 	    if (extEnd - extStart - 1 > 4)
 		WARN("Extension length > 4\n");
 	    lstrcpynA(ext,extStart + 1,min(extEnd-extStart,5));
@@ -587,7 +587,7 @@
 	    MMIO_SendMessage(wm, MMIOM_WRITE, (LPARAM)wm->info.pchBuffer,
 			     wm->info.pchNext - wm->info.pchBuffer, MMIO_PROC_32A);
 	}
-	if (uFlags & MMIO_EMPTYBUF) 
+	if (uFlags & MMIO_EMPTYBUF)
 	    wm->info.pchNext = wm->info.pchEndRead = wm->info.pchBuffer;
     }
     wm->info.dwFlags &= ~MMIO_DIRTY;
@@ -602,10 +602,10 @@
 {
     LONG	size = wm->info.cchBuffer;
 
-    TRACE("bo=%lx do=%lx of=%lx\n", 
-	  wm->info.lBufOffset, wm->info.lDiskOffset, 
+    TRACE("bo=%lx do=%lx of=%lx\n",
+	  wm->info.lBufOffset, wm->info.lDiskOffset,
 	  MMIO_SendMessage(wm, MMIOM_SEEK, 0, SEEK_CUR, MMIO_PROC_32A));
-	  
+
     wm->info.lBufOffset = wm->info.lDiskOffset;
     wm->info.pchNext = wm->info.pchBuffer;
     wm->info.pchEndRead = wm->info.pchBuffer;
@@ -625,7 +625,7 @@
 /***************************************************************************
  *       		MMIO_SetBuffer 				[INTERNAL]
  */
-static MMRESULT MMIO_SetBuffer(WINE_MMIO* wm, void* pchBuffer, LONG cchBuffer, 
+static MMRESULT MMIO_SetBuffer(WINE_MMIO* wm, void* pchBuffer, LONG cchBuffer,
 			       UINT uFlags, BOOL bFrom32)
 {
     TRACE("(%p %p %ld %u %d)\n", wm, pchBuffer, cchBuffer, uFlags, bFrom32);
@@ -633,10 +633,10 @@
     if (uFlags)			return MMSYSERR_INVALPARAM;
     if (cchBuffer > 0xFFFF)
 	WARN("Untested handling of huge mmio buffers (%ld >= 64k)\n", cchBuffer);
-	
+
     if (MMIO_Flush(wm, 0) != MMSYSERR_NOERROR)
 	return MMIOERR_CANNOTWRITE;
-    
+
     if (wm->hMem && (wm->info.dwFlags & MMIO_ALLOCBUF)) {
 	GlobalUnlock16(wm->hMem);
 	GlobalFree16(wm->hMem);
@@ -681,7 +681,7 @@
 /**************************************************************************
  * 			MMIO_Open      				[internal]
  */
-static HMMIO MMIO_Open(LPSTR szFileName, MMIOINFO* refmminfo, 
+static HMMIO MMIO_Open(LPSTR szFileName, MMIOINFO* refmminfo,
 		       DWORD dwOpenFlags, enum mmioProcType type)
 {
     LPWINE_MMIO		wm;
@@ -690,7 +690,7 @@
 
     if (dwOpenFlags & (MMIO_PARSE|MMIO_EXIST)) {
 	char	buffer[MAX_PATH];
-	
+
 	if (GetFullPathNameA(szFileName, sizeof(buffer), buffer, NULL) >= sizeof(buffer))
 	    return (HMMIO16)FALSE;
 	if ((dwOpenFlags & MMIO_EXIST) && (GetFileAttributesA(buffer) == -1))
@@ -698,7 +698,7 @@
 	strcpy(szFileName, buffer);
 	return (HMMIO)TRUE;
     }
-    
+
     if ((wm = MMIO_Create()) == NULL)
 	return 0;
 
@@ -713,46 +713,46 @@
 	wm->bTmpIOProc = FALSE;
     }
     /* if just the four character code is present, look up IO proc */
-    else if (refmminfo->pIOProc == NULL) {	
+    else if (refmminfo->pIOProc == NULL) {
 	wm->info.fccIOProc = refmminfo->fccIOProc;
 	if (!(wm->ioProc = MMIO_FindProcNode(wm->info.fccIOProc))) goto error2;
 	wm->info.pIOProc = wm->ioProc->pIOProc;
 	wm->bTmpIOProc = FALSE;
-    } 
+    }
     /* if IO proc specified, use it and specified four character code */
     else {
 	wm->info.fccIOProc = refmminfo->fccIOProc;
 	wm->info.pIOProc = refmminfo->pIOProc;
-	MMIO_InstallIOProc(wm->info.fccIOProc, wm->info.pIOProc, 
+	MMIO_InstallIOProc(wm->info.fccIOProc, wm->info.pIOProc,
 			   MMIO_INSTALLPROC, type);
 	if (!(wm->ioProc = MMIO_FindProcNode(wm->info.fccIOProc))) goto error2;
 	assert(wm->ioProc->pIOProc == refmminfo->pIOProc);
 	wm->info.pIOProc = wm->ioProc->pIOProc;
 	wm->bTmpIOProc = TRUE;
     }
-    
+
     wm->bBufferLoaded = FALSE;
     wm->ioProc->count++;
 
     if (dwOpenFlags & MMIO_ALLOCBUF) {
-	if ((refmminfo->wErrorRet = MMIO_SetBuffer(wm, NULL, MMIO_DEFAULTBUFFER, 0, 
+	if ((refmminfo->wErrorRet = MMIO_SetBuffer(wm, NULL, MMIO_DEFAULTBUFFER, 0,
                                                    type != MMIO_PROC_16)))
 	    goto error1;
     } else if (wm->info.fccIOProc == FOURCC_MEM) {
-	refmminfo->wErrorRet = MMIO_SetBuffer(wm, refmminfo->pchBuffer, 
-					      refmminfo->cchBuffer, 0, 
+	refmminfo->wErrorRet = MMIO_SetBuffer(wm, refmminfo->pchBuffer,
+					      refmminfo->cchBuffer, 0,
 					      type != MMIO_PROC_16);
 	if (refmminfo->wErrorRet != MMSYSERR_NOERROR)
 	    goto error1;
 	wm->bBufferLoaded = TRUE;
     } /* else => unbuffered, wm->info.pchBuffer == NULL */
-    
+
     /* see mmioDosIOProc for that one */
     wm->info.adwInfo[0] = refmminfo->adwInfo[0];
     wm->info.dwFlags = dwOpenFlags;
-    
+
     /* call IO proc to actually open file */
-    refmminfo->wErrorRet = MMIO_SendMessage(wm, MMIOM_OPEN, (LPARAM)szFileName, 
+    refmminfo->wErrorRet = MMIO_SendMessage(wm, MMIOM_OPEN, (LPARAM)szFileName,
                                             type == MMIO_PROC_16, MMIO_PROC_32A);
 
     /* grab file size, when possible */
@@ -780,12 +780,12 @@
 	ret = MMIO_Open(szFn, lpmmioinfo, dwOpenFlags, MMIO_PROC_32W);
     } else {
 	MMIOINFO	mmioinfo;
-	
+
 	mmioinfo.fccIOProc = 0;
 	mmioinfo.pIOProc = NULL;
 	mmioinfo.pchBuffer = NULL;
 	mmioinfo.cchBuffer = 0;
-	
+
 	ret = MMIO_Open(szFn, &mmioinfo, dwOpenFlags, MMIO_PROC_32W);
     }
 
@@ -796,21 +796,21 @@
 /**************************************************************************
  * 				mmioOpenA       		[WINMM.@]
  */
-HMMIO WINAPI mmioOpenA(LPSTR szFileName, MMIOINFO* lpmmioinfo, 
+HMMIO WINAPI mmioOpenA(LPSTR szFileName, MMIOINFO* lpmmioinfo,
 		       DWORD dwOpenFlags)
 {
     HMMIO 	ret;
-    
+
     if (lpmmioinfo) {
 	ret = MMIO_Open(szFileName, lpmmioinfo, dwOpenFlags, MMIO_PROC_32A);
     } else {
 	MMIOINFO	mmioinfo;
-	
+
 	mmioinfo.fccIOProc = 0;
 	mmioinfo.pIOProc = NULL;
 	mmioinfo.pchBuffer = NULL;
 	mmioinfo.cchBuffer = 0;
-	
+
 	ret = MMIO_Open(szFileName, &mmioinfo, dwOpenFlags, MMIO_PROC_32A);
     }
     return ret;
@@ -819,27 +819,27 @@
 /**************************************************************************
  * 				mmioOpen       		[MMSYSTEM.1210]
  */
-HMMIO16 WINAPI mmioOpen16(LPSTR szFileName, MMIOINFO16* lpmmioinfo16, 
+HMMIO16 WINAPI mmioOpen16(LPSTR szFileName, MMIOINFO16* lpmmioinfo16,
 			  DWORD dwOpenFlags)
 {
     HMMIO 	ret;
     MMIOINFO	mmio;
-    
+
     if (lpmmioinfo16) {
 	MMIOINFO	mmioinfo;
-       
+
 	memset(&mmioinfo, 0, sizeof(mmioinfo));
 
-	mmioinfo.dwFlags     = lpmmioinfo16->dwFlags; 
-	mmioinfo.fccIOProc   = lpmmioinfo16->fccIOProc; 
-	mmioinfo.pIOProc     = (LPMMIOPROC)lpmmioinfo16->pIOProc; 
-	mmioinfo.cchBuffer   = lpmmioinfo16->cchBuffer; 
+	mmioinfo.dwFlags     = lpmmioinfo16->dwFlags;
+	mmioinfo.fccIOProc   = lpmmioinfo16->fccIOProc;
+	mmioinfo.pIOProc     = (LPMMIOPROC)lpmmioinfo16->pIOProc;
+	mmioinfo.cchBuffer   = lpmmioinfo16->cchBuffer;
 	mmioinfo.pchBuffer   = lpmmioinfo16->pchBuffer;
-	mmioinfo.adwInfo[0]  = lpmmioinfo16->adwInfo[0]; 
-	mmioinfo.adwInfo[1]  = lpmmioinfo16->adwInfo[1]; 
-	mmioinfo.adwInfo[2]  = lpmmioinfo16->adwInfo[2]; 
-	mmioinfo.adwInfo[3]  = lpmmioinfo16->adwInfo[3]; 
-	
+	mmioinfo.adwInfo[0]  = lpmmioinfo16->adwInfo[0];
+	mmioinfo.adwInfo[1]  = lpmmioinfo16->adwInfo[1];
+	mmioinfo.adwInfo[2]  = lpmmioinfo16->adwInfo[2];
+	mmioinfo.adwInfo[3]  = lpmmioinfo16->adwInfo[3];
+
 	ret = MMIO_Open(szFileName, &mmioinfo, dwOpenFlags, MMIO_PROC_16);
 
 	mmioGetInfo16(mmioinfo.hmmio, lpmmioinfo16, 0);
@@ -854,7 +854,7 @@
     return ret;
 }
 
-    
+
 /**************************************************************************
  * 				mmioClose      		[WINMM.@]
  */
@@ -862,23 +862,23 @@
 {
     LPWINE_MMIO	wm;
     MMRESULT 	result;
-    
+
     TRACE("(%04X, %04X);\n", hmmio, uFlags);
-    
+
     if ((wm = MMIO_Get(NULL, hmmio)) == NULL)
 	return MMSYSERR_INVALHANDLE;
-    
+
     if ((result = MMIO_Flush(wm, 0)) != MMSYSERR_NOERROR)
 	return result;
-    
+
     result = MMIO_SendMessage(wm, MMIOM_CLOSE, uFlags, 0, MMIO_PROC_32A);
-    
+
     MMIO_SetBuffer(wm, NULL, 0, 0, TRUE);
-    
+
     wm->ioProc->count--;
 
     if (wm->bTmpIOProc)
-	MMIO_InstallIOProc(wm->info.fccIOProc, NULL, 
+	MMIO_InstallIOProc(wm->info.fccIOProc, NULL,
 			   MMIO_REMOVEPROC, wm->ioProc->type);
 
     MMIO_Destroy(wm);
@@ -901,9 +901,9 @@
 {
     LPWINE_MMIO	wm;
     LONG 	count;
-    
+
     TRACE("(%04X, %p, %ld);\n", hmmio, pch, cch);
-    
+
     if ((wm = MMIO_Get(NULL, hmmio)) == NULL)
 	return -1;
 
@@ -921,7 +921,7 @@
 	cch -= count;
     } else
 	count = 0;
-    
+
     if (cch && (wm->info.fccIOProc != FOURCC_MEM)) {
 	assert(wm->info.cchBuffer);
 
@@ -938,7 +938,7 @@
 	    count += size;
 	}
     }
-    
+
     TRACE("count=%ld\n", count);
     return count;
 }
@@ -958,12 +958,12 @@
 {
     LPWINE_MMIO	wm;
     LONG	count;
-    
+
     TRACE("(%04X, %p, %ld);\n", hmmio, pch, cch);
 
     if ((wm = MMIO_Get(NULL, hmmio)) == NULL)
 	return -1;
-    
+
     if (wm->info.cchBuffer) {
 	LONG	bytesW = 0;
 
@@ -977,13 +977,13 @@
                 pch += count;
                 cch -= count;
                 bytesW += count;
-                wm->info.dwFlags |= MMIO_DIRTY;                                             
+                wm->info.dwFlags |= MMIO_DIRTY;
 	    } else {
                 if (wm->info.fccIOProc == FOURCC_MEM) {
                     if (wm->info.adwInfo[0]) {
                         /* from where would we get the memory handle? */
                         FIXME("memory file expansion not implemented!\n");
-                        break;                                                                      
+                        break;
 		    } else break;
                 }
             }
@@ -1000,7 +1000,7 @@
 	count = MMIO_SendMessage(wm, MMIOM_WRITE, (LPARAM)pch, cch, MMIO_PROC_32A);
 	wm->info.lBufOffset = wm->info.lDiskOffset;
     }
-    
+
     TRACE("bytes written=%ld\n", count);
     return count;
 }
@@ -1022,7 +1022,7 @@
     LONG 	offset;
 
     TRACE("(%04X, %08lX, %d);\n", hmmio, lOffset, iOrigin);
-    
+
     if ((wm = MMIO_Get(NULL, hmmio)) == NULL)
 	return MMSYSERR_INVALHANDLE;
 
@@ -1031,13 +1031,13 @@
 	return MMIO_SendMessage(wm, MMIOM_SEEK, lOffset, iOrigin, MMIO_PROC_32A);
 
     switch (iOrigin) {
-    case SEEK_SET: 
+    case SEEK_SET:
 	offset = lOffset;
 	break;
-    case SEEK_CUR: 
+    case SEEK_CUR:
 	offset = wm->info.lBufOffset + (wm->info.pchNext - wm->info.pchBuffer) + lOffset;
 	break;
-    case SEEK_END: 
+    case SEEK_END:
 	offset = ((wm->info.fccIOProc == FOURCC_MEM)? wm->info.cchBuffer : wm->dwFileSize) - lOffset;
 	break;
     default:
@@ -1062,10 +1062,10 @@
         /* some memory mapped buffers are defined with -1 as a size */
 
 	/* condition to change buffer */
-	if ((wm->info.fccIOProc == FOURCC_MEM) || 
+	if ((wm->info.fccIOProc == FOURCC_MEM) ||
 	    MMIO_Flush(wm, 0) != MMSYSERR_NOERROR ||
 	    /* this also sets the wm->info.lDiskOffset field */
-	    MMIO_SendMessage(wm, MMIOM_SEEK, 
+	    MMIO_SendMessage(wm, MMIOM_SEEK,
 			     (offset / wm->info.cchBuffer) * wm->info.cchBuffer,
 			     SEEK_SET, MMIO_PROC_32A) == -1)
 	    return -1;
@@ -1101,25 +1101,25 @@
     if (!wm->buffer16)
 	return MMSYSERR_ERROR;
 
-    lpmmioinfo->dwFlags     = wm->info.dwFlags; 
-    lpmmioinfo->fccIOProc   = wm->info.fccIOProc; 
-    lpmmioinfo->pIOProc     = (LPMMIOPROC16)wm->info.pIOProc; 
-    lpmmioinfo->wErrorRet   = wm->info.wErrorRet; 
-    lpmmioinfo->hTask       = wm->info.hTask; 
-    lpmmioinfo->cchBuffer   = wm->info.cchBuffer; 
+    lpmmioinfo->dwFlags     = wm->info.dwFlags;
+    lpmmioinfo->fccIOProc   = wm->info.fccIOProc;
+    lpmmioinfo->pIOProc     = (LPMMIOPROC16)wm->info.pIOProc;
+    lpmmioinfo->wErrorRet   = wm->info.wErrorRet;
+    lpmmioinfo->hTask       = wm->info.hTask;
+    lpmmioinfo->cchBuffer   = wm->info.cchBuffer;
     lpmmioinfo->pchBuffer   = (void*)wm->buffer16;
     lpmmioinfo->pchNext     = (void*)(wm->buffer16 + (wm->info.pchNext - wm->info.pchBuffer));
     lpmmioinfo->pchEndRead  = (void*)(wm->buffer16 + (wm->info.pchEndRead - wm->info.pchBuffer));
-    lpmmioinfo->pchEndWrite = (void*)(wm->buffer16 + (wm->info.pchEndWrite - wm->info.pchBuffer)); 
-    lpmmioinfo->lBufOffset  = wm->info.lBufOffset; 
-    lpmmioinfo->lDiskOffset = wm->info.lDiskOffset; 
-    lpmmioinfo->adwInfo[0]  = wm->info.adwInfo[0]; 
-    lpmmioinfo->adwInfo[1]  = wm->info.adwInfo[1]; 
-    lpmmioinfo->adwInfo[2]  = wm->info.adwInfo[2]; 
-    lpmmioinfo->adwInfo[3]  = wm->info.adwInfo[3]; 
+    lpmmioinfo->pchEndWrite = (void*)(wm->buffer16 + (wm->info.pchEndWrite - wm->info.pchBuffer));
+    lpmmioinfo->lBufOffset  = wm->info.lBufOffset;
+    lpmmioinfo->lDiskOffset = wm->info.lDiskOffset;
+    lpmmioinfo->adwInfo[0]  = wm->info.adwInfo[0];
+    lpmmioinfo->adwInfo[1]  = wm->info.adwInfo[1];
+    lpmmioinfo->adwInfo[2]  = wm->info.adwInfo[2];
+    lpmmioinfo->adwInfo[3]  = wm->info.adwInfo[3];
     lpmmioinfo->dwReserved1 = 0;
     lpmmioinfo->dwReserved2 = 0;
-    lpmmioinfo->hmmio = wm->info.hmmio; 
+    lpmmioinfo->hmmio = wm->info.hmmio;
 
     return MMSYSERR_NOERROR;
 }
@@ -1130,7 +1130,7 @@
 MMRESULT WINAPI mmioGetInfo(HMMIO hmmio, MMIOINFO* lpmmioinfo, UINT uFlags)
 {
     LPWINE_MMIO		wm;
-    
+
     TRACE("(0x%04x,%p,0x%08x)\n",hmmio,lpmmioinfo,uFlags);
 
     if ((wm = MMIO_Get(NULL, hmmio)) == NULL)
@@ -1157,13 +1157,13 @@
     if (wm->info.cchBuffer != lpmmioinfo->cchBuffer ||
 	wm->info.pchBuffer != MapSL(wm->buffer16))
 	return MMSYSERR_INVALPARAM;
-	
+
     /* check pointers coherence */
-    if (lpmmioinfo->pchNext < lpmmioinfo->pchBuffer || 
+    if (lpmmioinfo->pchNext < lpmmioinfo->pchBuffer ||
 	lpmmioinfo->pchNext > lpmmioinfo->pchBuffer + lpmmioinfo->cchBuffer ||
-	lpmmioinfo->pchEndRead < lpmmioinfo->pchBuffer || 
+	lpmmioinfo->pchEndRead < lpmmioinfo->pchBuffer ||
 	lpmmioinfo->pchEndRead > lpmmioinfo->pchBuffer + lpmmioinfo->cchBuffer ||
-	lpmmioinfo->pchEndWrite < lpmmioinfo->pchBuffer || 
+	lpmmioinfo->pchEndWrite < lpmmioinfo->pchBuffer ||
 	lpmmioinfo->pchEndWrite > lpmmioinfo->pchBuffer + lpmmioinfo->cchBuffer)
 	return MMSYSERR_INVALPARAM;
 
@@ -1185,13 +1185,13 @@
 
     if ((wm = MMIO_Get(NULL, hmmio)) == NULL)
 	return MMSYSERR_INVALHANDLE;
-    
+
     /* check pointers coherence */
-    if (lpmmioinfo->pchNext < wm->info.pchBuffer || 
+    if (lpmmioinfo->pchNext < wm->info.pchBuffer ||
 	lpmmioinfo->pchNext > wm->info.pchBuffer + wm->info.cchBuffer ||
-	lpmmioinfo->pchEndRead < wm->info.pchBuffer || 
+	lpmmioinfo->pchEndRead < wm->info.pchBuffer ||
 	lpmmioinfo->pchEndRead > wm->info.pchBuffer + wm->info.cchBuffer ||
-	lpmmioinfo->pchEndWrite < wm->info.pchBuffer || 
+	lpmmioinfo->pchEndWrite < wm->info.pchBuffer ||
 	lpmmioinfo->pchEndWrite > wm->info.pchBuffer + wm->info.cchBuffer)
 	return MMSYSERR_INVALPARAM;
 
@@ -1210,7 +1210,7 @@
 
     TRACE("(hmmio=%04x, pchBuf=%p, cchBuf=%ld, uFlags=%#08x)\n",
 	  hmmio, pchBuffer, cchBuffer, uFlags);
-    
+
     if ((wm = MMIO_Get(NULL, hmmio)) == NULL)
 	return MMSYSERR_INVALHANDLE;
 
@@ -1220,14 +1220,14 @@
 /**************************************************************************
  * 				mmioSetBuffer		[MMSYSTEM.1217]
  */
-MMRESULT16 WINAPI mmioSetBuffer16(HMMIO16 hmmio, LPSTR segpchBuffer, 
+MMRESULT16 WINAPI mmioSetBuffer16(HMMIO16 hmmio, LPSTR segpchBuffer,
                                   LONG cchBuffer, UINT16 uFlags)
 {
     LPWINE_MMIO		wm;
 
     TRACE("(hmmio=%04x, segpchBuf=%p, cchBuf=%ld, uFlags=%#08x)\n",
 	  hmmio, segpchBuffer, cchBuffer, uFlags);
-    
+
     if ((wm = MMIO_Get(NULL, hmmio)) == NULL)
 	return MMSYSERR_INVALHANDLE;
 
@@ -1245,7 +1245,7 @@
 
     if ((wm = MMIO_Get(NULL, hmmio)) == NULL)
 	return MMSYSERR_INVALHANDLE;
-       
+
     return MMIO_Flush(wm, uFlags);
 }
 
@@ -1263,7 +1263,7 @@
 MMRESULT WINAPI mmioAdvance(HMMIO hmmio, MMIOINFO* lpmmioinfo, UINT uFlags)
 {
     LPWINE_MMIO		wm;
-    
+
     TRACE("hmmio=%04X, lpmmioinfo=%p, uFlags=%04X\n", hmmio, lpmmioinfo, uFlags);
 
     if ((wm = MMIO_Get(NULL, hmmio)) == NULL)
@@ -1292,9 +1292,9 @@
 
     if (lpmmioinfo) {
 	lpmmioinfo->pchNext = lpmmioinfo->pchBuffer;
-	lpmmioinfo->pchEndRead  = lpmmioinfo->pchBuffer + 
+	lpmmioinfo->pchEndRead  = lpmmioinfo->pchBuffer +
 	    (wm->info.pchEndRead - wm->info.pchBuffer);
-	lpmmioinfo->pchEndWrite = lpmmioinfo->pchBuffer + 
+	lpmmioinfo->pchEndWrite = lpmmioinfo->pchBuffer +
 	    (wm->info.pchEndWrite - wm->info.pchBuffer);
 	lpmmioinfo->lDiskOffset = wm->info.lDiskOffset;
 	lpmmioinfo->lBufOffset = wm->info.lBufOffset;
@@ -1324,11 +1324,11 @@
 	return MMIOERR_CANNOTWRITE;
 
     MMIO_GrabNextBuffer(wm, uFlags == MMIO_READ);
-	
+
     lpmmioinfo->pchNext = lpmmioinfo->pchBuffer;
-    lpmmioinfo->pchEndRead  = lpmmioinfo->pchBuffer + 
+    lpmmioinfo->pchEndRead  = lpmmioinfo->pchBuffer +
 	(wm->info.pchEndRead - wm->info.pchBuffer);
-    lpmmioinfo->pchEndWrite = lpmmioinfo->pchBuffer + 
+    lpmmioinfo->pchEndWrite = lpmmioinfo->pchBuffer +
 	(wm->info.pchEndWrite - wm->info.pchBuffer);
     lpmmioinfo->lDiskOffset = wm->info.lDiskOffset;
     lpmmioinfo->lBufOffset = wm->info.lBufOffset;
@@ -1343,7 +1343,7 @@
 {
     CHAR cc[4];
     int i = 0;
-    
+
     for (i = 0; i < 4 && sz[i]; i++) {
 	if (uFlags & MMIO_TOUPPER) {
 	    cc[i] = toupper(sz[i]);
@@ -1351,10 +1351,10 @@
 	    cc[i] = sz[i];
 	}
     }
-    
+
     /* Pad with spaces */
     while (i < 4) cc[i++] = ' ';
-    
+
     TRACE("Got '%.4s'\n",cc);
     return mmioFOURCC(cc[0],cc[1],cc[2],cc[3]);
 }
@@ -1366,7 +1366,7 @@
 {
     LPSTR	szA = HEAP_strdupWtoA(GetProcessHeap(),0,sz);
     FOURCC	ret = mmioStringToFOURCCA(szA,uFlags);
-    
+
     HeapFree(GetProcessHeap(), 0, szA);
     return ret;
 }
@@ -1385,14 +1385,14 @@
 LPMMIOPROC16 WINAPI mmioInstallIOProc16(FOURCC fccIOProc, LPMMIOPROC16 pIOProc,
                                         DWORD dwFlags)
 {
-    return (LPMMIOPROC16)MMIO_InstallIOProc(fccIOProc, (LPMMIOPROC)pIOProc, 
-					    dwFlags, MMIO_PROC_16); 
+    return (LPMMIOPROC16)MMIO_InstallIOProc(fccIOProc, (LPMMIOPROC)pIOProc,
+					    dwFlags, MMIO_PROC_16);
 }
 
 /**************************************************************************
  * 				mmioInstallIOProcA	   [WINMM.@]
  */
-LPMMIOPROC WINAPI mmioInstallIOProcA(FOURCC fccIOProc, 
+LPMMIOPROC WINAPI mmioInstallIOProcA(FOURCC fccIOProc,
 				     LPMMIOPROC pIOProc, DWORD dwFlags)
 {
     return MMIO_InstallIOProc(fccIOProc, pIOProc, dwFlags, MMIO_PROC_32A);
@@ -1401,7 +1401,7 @@
 /**************************************************************************
  * 				mmioInstallIOProcW	   [WINMM.@]
  */
-LPMMIOPROC WINAPI mmioInstallIOProcW(FOURCC fccIOProc, 
+LPMMIOPROC WINAPI mmioInstallIOProcW(FOURCC fccIOProc,
 				     LPMMIOPROC pIOProc, DWORD dwFlags)
 {
     return MMIO_InstallIOProc(fccIOProc, pIOProc, dwFlags, MMIO_PROC_32W);
@@ -1414,15 +1414,15 @@
 				 LPARAM lParam1, LPARAM lParam2)
 {
     LPWINE_MMIO		wm;
-    
+
     TRACE("(%04X, %u, %ld, %ld)\n", hmmio, uMessage, lParam1, lParam2);
 
     if (uMessage < MMIOM_USER)
 	return MMSYSERR_INVALPARAM;
-    
+
     if ((wm = MMIO_Get(NULL, hmmio)) == NULL)
 	return MMSYSERR_INVALHANDLE;
-    
+
     return MMIO_SendMessage(wm, uMessage, lParam1, lParam2, MMIO_PROC_16);
 }
 
@@ -1433,15 +1433,15 @@
 			       LPARAM lParam1, LPARAM lParam2)
 {
     LPWINE_MMIO		wm;
-    
+
     TRACE("(%04X, %u, %ld, %ld)\n", hmmio, uMessage, lParam1, lParam2);
 
     if (uMessage < MMIOM_USER)
 	return MMSYSERR_INVALPARAM;
-    
+
     if ((wm = MMIO_Get(NULL, hmmio)) == NULL)
 	return MMSYSERR_INVALHANDLE;
-    
+
     return MMIO_SendMessage(wm, uMessage, lParam1, lParam2, MMIO_PROC_32A);
 }
 
@@ -1454,30 +1454,30 @@
     DWORD		dwOldPos;
     FOURCC		srchCkId;
     FOURCC		srchType;
-    
-    
+
+
     TRACE("(%04X, %p, %p, %04X);\n", hmmio, lpck, lpckParent, uFlags);
-    
+
     if (lpck == NULL)
 	return MMSYSERR_INVALPARAM;
-    
+
     dwOldPos = mmioSeek(hmmio, 0, SEEK_CUR);
     TRACE("dwOldPos=%ld\n", dwOldPos);
-    
+
     if (lpckParent != NULL) {
 	TRACE("seek inside parent at %ld !\n", lpckParent->dwDataOffset);
 	/* EPP: was dwOldPos = mmioSeek(hmmio,lpckParent->dwDataOffset,SEEK_SET); */
-	if (dwOldPos < lpckParent->dwDataOffset || 
+	if (dwOldPos < lpckParent->dwDataOffset ||
 	    dwOldPos >= lpckParent->dwDataOffset + lpckParent->cksize) {
 	    WARN("outside parent chunk\n");
 	    return MMIOERR_CHUNKNOTFOUND;
 	}
     }
-    
+
     /* The SDK docu says 'ckid' is used for all cases. Real World
-     * examples disagree -Marcus,990216. 
+     * examples disagree -Marcus,990216.
      */
-    
+
     srchType = 0;
     /* find_chunk looks for 'ckid' */
     if (uFlags & MMIO_FINDCHUNK)
@@ -1491,15 +1491,15 @@
 	srchCkId = FOURCC_RIFF;
 	srchType = lpck->fccType;
     }
-    
+
     if (uFlags & (MMIO_FINDCHUNK|MMIO_FINDLIST|MMIO_FINDRIFF)) {
-	TRACE("searching for %.4s.%.4s\n", 
+	TRACE("searching for %.4s.%.4s\n",
 	      (LPSTR)&srchCkId,
 	      srchType?(LPSTR)&srchType:"any ");
-	
+
 	while (TRUE) {
 	    LONG ix;
-	    
+
 	    ix = mmioRead(hmmio, (LPSTR)lpck, 3 * sizeof(DWORD));
 	    if (ix < 2*sizeof(DWORD)) {
 		mmioSeek(hmmio, dwOldPos, SEEK_SET);
@@ -1513,14 +1513,14 @@
 		return MMIOERR_CHUNKNOTFOUND;
 	    }
 	    TRACE("ckid=%.4s fcc=%.4s cksize=%08lX !\n",
-		  (LPSTR)&lpck->ckid, 
+		  (LPSTR)&lpck->ckid,
 		  srchType?(LPSTR)&lpck->fccType:"<na>",
 		  lpck->cksize);
 	    if ((srchCkId == lpck->ckid) &&
 		(!srchType || (srchType == lpck->fccType))
 		)
 		break;
-	    
+
 	    dwOldPos = lpck->dwDataOffset + ((lpck->cksize + 1) & ~1);
 	    mmioSeek(hmmio, dwOldPos, SEEK_SET);
 	}
@@ -1543,8 +1543,8 @@
 	mmioSeek(hmmio, lpck->dwDataOffset + sizeof(DWORD), SEEK_SET);
     else
 	mmioSeek(hmmio, lpck->dwDataOffset, SEEK_SET);
-    TRACE("lpck: ckid=%.4s, cksize=%ld, dwDataOffset=%ld fccType=%08lX (%.4s)!\n", 
-	  (LPSTR)&lpck->ckid, lpck->cksize, lpck->dwDataOffset, 
+    TRACE("lpck: ckid=%.4s, cksize=%ld, dwDataOffset=%ld fccType=%08lX (%.4s)!\n",
+	  (LPSTR)&lpck->ckid, lpck->cksize, lpck->dwDataOffset,
 	  lpck->fccType, srchType?(LPSTR)&lpck->fccType:"");
     return MMSYSERR_NOERROR;
 }
@@ -1564,10 +1564,10 @@
 MMRESULT WINAPI mmioAscend(HMMIO hmmio, LPMMCKINFO lpck, UINT uFlags)
 {
     TRACE("(%04X, %p, %04X);\n", hmmio, lpck, uFlags);
-    
+
     if (lpck->dwFlags & MMIO_DIRTY) {
 	DWORD	dwOldPos, dwNewSize;
-	
+
 	TRACE("Chunk is dirty, checking if chunk's size is correct\n");
 	dwOldPos = mmioSeek(hmmio, 0, SEEK_CUR);
 	TRACE("dwOldPos=%ld lpck->dwDataOffset = %ld\n", dwOldPos, lpck->dwDataOffset);
@@ -1575,7 +1575,7 @@
 	if (dwNewSize != lpck->cksize) {
 	    TRACE("Nope: lpck->cksize=%ld dwNewSize=%ld\n", lpck->cksize, dwNewSize);
 	    lpck->cksize = dwNewSize;
-	    
+
 	    /* pad odd size with 0 */
 	    if (dwNewSize & 1) {
 		char ch = 0;
@@ -1586,9 +1586,9 @@
 	}
 	lpck->dwFlags = 0;
     }
-    
+
     mmioSeek(hmmio, lpck->dwDataOffset + ((lpck->cksize + 1) & ~1), SEEK_SET);
-    
+
     return MMSYSERR_NOERROR;
 }
 
@@ -1608,26 +1608,26 @@
     DWORD	dwOldPos;
     LONG 	size;
     LONG 	ix;
-    
+
     TRACE("(%04X, %p, %04X);\n", hmmio, lpck, uFlags);
-    
+
     dwOldPos = mmioSeek(hmmio, 0, SEEK_CUR);
     TRACE("dwOldPos=%ld\n", dwOldPos);
-    
+
     if (uFlags == MMIO_CREATELIST)
 	lpck->ckid = FOURCC_LIST;
     else if (uFlags == MMIO_CREATERIFF)
 	lpck->ckid = FOURCC_RIFF;
-    
+
     TRACE("ckid=%.4s\n", (LPSTR)&lpck->ckid);
-    
+
     size = 2 * sizeof(DWORD);
     lpck->dwDataOffset = dwOldPos + size;
-    
-    if (lpck->ckid == FOURCC_RIFF || lpck->ckid == FOURCC_LIST) 
+
+    if (lpck->ckid == FOURCC_RIFF || lpck->ckid == FOURCC_LIST)
 	size += sizeof(DWORD);
     lpck->dwFlags = MMIO_DIRTY;
-    
+
     ix = mmioWrite(hmmio, (LPSTR)lpck, size);
     TRACE("after mmioWrite ix = %ld req = %ld, errno = %d\n",ix, size, errno);
     if (ix < size) {
@@ -1658,7 +1658,7 @@
 
     TRACE("('%s', '%s', %p, %08lX);\n",
 	  szFileName, szNewFileName, lpmmioinfo, dwRenameFlags);
-    
+
     /* If both params are NULL, then parse the file name */
     if (lpmmioinfo && lpmmioinfo->fccIOProc == 0 && lpmmioinfo->pIOProc == NULL)
 	lpmmioinfo->fccIOProc = MMIO_ParseExt(szFileName);
@@ -1676,10 +1676,10 @@
      * thunk somewhere. The main issue is that Wine's current thunking
      * 32 to 16 only supports pascal calling convention
      */
-    if (ioProc) 
-	result = (ioProc)(0, MMIOM_RENAME, 
+    if (ioProc)
+	result = (ioProc)(0, MMIOM_RENAME,
 			  (LPARAM)szFileName, (LPARAM)szNewFileName);
-    
+
     return result;
 }
 
@@ -1704,15 +1704,15 @@
 	ioProc = (LPMMIOPROC)mmioDosIOProc;
     /* if just the four character code is present, look up IO proc */
     else if (lpmmioinfo->pIOProc == NULL)
-	ioProc = MMIO_InstallIOProc(lpmmioinfo->fccIOProc, NULL, 
+	ioProc = MMIO_InstallIOProc(lpmmioinfo->fccIOProc, NULL,
 				    MMIO_FINDPROC, MMIO_PROC_32A);
     else /* use relevant ioProc */
  	ioProc = lpmmioinfo->pIOProc;
 
-    if (ioProc) 
-	result = (ioProc)(0, MMIOM_RENAME, 
+    if (ioProc)
+	result = (ioProc)(0, MMIOM_RENAME,
 			  (LPARAM)szFileName, (LPARAM)szNewFileName);
-    
+
     return result;
 }
 
@@ -1725,7 +1725,7 @@
     LPSTR	szFn = HEAP_strdupWtoA(GetProcessHeap(), 0, szFileName);
     LPSTR	sznFn = HEAP_strdupWtoA(GetProcessHeap(), 0, szNewFileName);
     UINT	ret = mmioRenameA(szFn, sznFn, lpmmioinfo, dwRenameFlags);
-    
+
     HeapFree(GetProcessHeap(),0,szFn);
     HeapFree(GetProcessHeap(),0,sznFn);
     return ret;
diff --git a/dlls/winmm/mmsystem.c b/dlls/winmm/mmsystem.c
index 6e54f29..33c9132 100644
--- a/dlls/winmm/mmsystem.c
+++ b/dlls/winmm/mmsystem.c
@@ -20,15 +20,15 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
-/* 
- * Eric POUECH : 
+/*
+ * Eric POUECH :
  * 	98/9	added Win32 MCI support
  *  	99/4	added mmTask and mmThread functions support
  *		added midiStream support
  *      99/9	added support for loadable low level drivers
  */
 
-/* FIXME: I think there are some segmented vs. linear pointer weirdnesses 
+/* FIXME: I think there are some segmented vs. linear pointer weirdnesses
  *        and long term pointers to 16 bit space in here
  */
 
@@ -83,7 +83,7 @@
 static	BOOL	MULTIMEDIA_CreateIData(HINSTANCE hInstDLL)
 {
     LPWINE_MM_IDATA	iData;
-	
+
     iData = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(WINE_MM_IDATA));
 
     if (!iData)
@@ -107,7 +107,7 @@
 {
     LPWINE_MM_IDATA	iData = MULTIMEDIA_GetIDataNoCheck();
     LPWINE_MM_IDATA*	ppid;
-	    
+
     if (iData) {
 	TIME_MMTimeStop();
 
@@ -117,7 +117,7 @@
 		break;
 	    }
 	}
-	/* FIXME: should also free content and resources allocated 
+	/* FIXME: should also free content and resources allocated
 	 * inside iData */
         CloseHandle(iData->psStopEvent);
         CloseHandle(iData->psLastEvent);
@@ -161,7 +161,7 @@
  * MMSYSTEM DLL entry point
  *
  */
-BOOL WINAPI MMSYSTEM_LibMain(DWORD fdwReason, HINSTANCE hinstDLL, WORD ds, 
+BOOL WINAPI MMSYSTEM_LibMain(DWORD fdwReason, HINSTANCE hinstDLL, WORD ds,
 			     WORD wHeapSize, DWORD dwReserved1, WORD wReserved2)
 {
     HANDLE			hndl;
@@ -176,7 +176,7 @@
 	 * - create correctly the per process WINE_MM_IDATA chunk
 	 */
 	hndl = LoadLibraryA("WINMM.DLL");
-	
+
 	if (!hndl) {
 	    ERR("Could not load sibling WinMM.dll\n");
 	    return FALSE;
@@ -206,7 +206,7 @@
     return TRUE;
 }
 
-void MMSYSTEM_MMTIME32to16(LPMMTIME16 mmt16, const MMTIME* mmt32) 
+void MMSYSTEM_MMTIME32to16(LPMMTIME16 mmt16, const MMTIME* mmt32)
 {
     mmt16->wType = mmt32->wType;
     /* layout of rest is the same for 32/16,
@@ -215,7 +215,7 @@
     memcpy(&(mmt16->u), &(mmt32->u), sizeof(mmt16->u));
 }
 
-void MMSYSTEM_MMTIME16to32(LPMMTIME mmt32, const MMTIME16* mmt16) 
+void MMSYSTEM_MMTIME16to32(LPMMTIME mmt32, const MMTIME16* mmt16)
 {
     mmt32->wType = mmt16->wType;
     /* layout of rest is the same for 32/16,
@@ -241,7 +241,7 @@
     return 0;
 }
 
-static HMMIO	get_mmioFromProfile(UINT uFlags, LPCWSTR lpszName) 
+static HMMIO	get_mmioFromProfile(UINT uFlags, LPCWSTR lpszName)
 {
     WCHAR	str[128];
     LPWSTR	ptr;
@@ -259,7 +259,7 @@
 
     TRACE("searching in SystemSound list for %s\n", debugstr_w(lpszName));
     GetProfileStringW(wszSounds, (LPWSTR)lpszName, wszNull, str, sizeof(str)/sizeof(str[0]));
-    if (lstrlenW(str) == 0) 
+    if (lstrlenW(str) == 0)
     {
 	if (uFlags & SND_NODEFAULT) goto next;
 	GetProfileStringW(wszSounds, wszDefault, wszNull, str, sizeof(str)/sizeof(str[0]));
@@ -314,14 +314,14 @@
     return 0;
 }
 
-struct playsound_data 
+struct playsound_data
 {
     HANDLE	hEvent;
     DWORD	dwEventCount;
 };
 
-static void CALLBACK PlaySound_Callback(HWAVEOUT hwo, UINT uMsg, 
-					DWORD dwInstance,  
+static void CALLBACK PlaySound_Callback(HWAVEOUT hwo, UINT uMsg,
+					DWORD dwInstance,
 					DWORD dwParam1, DWORD dwParam2)
 {
     struct playsound_data*	s = (struct playsound_data*)dwInstance;
@@ -340,13 +340,13 @@
     }
 }
 
-static void PlaySound_WaitDone(struct playsound_data* s) 
+static void PlaySound_WaitDone(struct playsound_data* s)
 {
     for (;;) {
 	ResetEvent(s->hEvent);
 	if (InterlockedDecrement(&s->dwEventCount) >= 0) break;
 	InterlockedIncrement(&s->dwEventCount);
-	
+
 	WaitForSingleObject(s->hEvent, INFINITE);
     }
 }
@@ -362,7 +362,7 @@
     case SND_MEMORY:    return FALSE;
     case SND_ALIAS:     /* what about ALIAS_ID ??? */
     case SND_FILENAME:
-    case 0:             return TRUE; 
+    case 0:             return TRUE;
     default:            FIXME("WTF\n"); return FALSE;
     }
 }
@@ -381,7 +381,7 @@
     HeapFree(GetProcessHeap(), 0, wps);
 }
 
-static WINE_PLAYSOUND*  PlaySound_Alloc(const void* pszSound, HMODULE hmod, 
+static WINE_PLAYSOUND*  PlaySound_Alloc(const void* pszSound, HMODULE hmod,
                                         DWORD fdwSound, BOOL bUnicode)
 {
     WINE_PLAYSOUND* wps;
@@ -397,7 +397,7 @@
         {
             if (fdwSound & SND_ASYNC)
             {
-                wps->pszSound = HeapAlloc(GetProcessHeap(), 0, 
+                wps->pszSound = HeapAlloc(GetProcessHeap(), 0,
                                           (lstrlenW(pszSound)+1) * sizeof(WCHAR));
                 if (!wps->pszSound) goto oom_error;
                 lstrcpyW((LPWSTR)wps->pszSound, pszSound);
@@ -446,7 +446,7 @@
         static WCHAR wszWave[] = {'W','A','V','E',0};
         HRSRC	hRes;
         HGLOBAL	hGlob;
-        
+
         if ((hRes = FindResourceW(wps->hMod, wps->pszSound, wszWave)) == 0 ||
             (hGlob = LoadResource(wps->hMod, hRes)) == 0)
             goto errCleanUp;
@@ -480,9 +480,9 @@
     }
     else
     {
-        if ((hmmio = get_mmioFromProfile(wps->fdwSound | SND_NODEFAULT, wps->pszSound)) == 0) 
+        if ((hmmio = get_mmioFromProfile(wps->fdwSound | SND_NODEFAULT, wps->pszSound)) == 0)
         {
-            if ((hmmio = get_mmioFromFile(wps->pszSound)) == 0)	
+            if ((hmmio = get_mmioFromFile(wps->pszSound)) == 0)
             {
                 hmmio = get_mmioFromProfile(wps->fdwSound, wps->pszSound);
             }
@@ -525,7 +525,7 @@
     if (mmioDescend(hmmio, &mmckInfo, &ckMainRIFF, MMIO_FINDCHUNK))
 	goto errCleanUp;
 
-    TRACE("Chunk Found ckid=%.4s fccType=%.4s cksize=%08lX\n", 
+    TRACE("Chunk Found ckid=%.4s fccType=%.4s cksize=%08lX\n",
 	  (LPSTR)&mmckInfo.ckid, (LPSTR)&mmckInfo.fccType, mmckInfo.cksize);
 
     s.hEvent = CreateEventA(NULL, FALSE, FALSE, NULL);
@@ -544,7 +544,7 @@
     waveHdr[0].dwLoops = waveHdr[1].dwLoops = 0L;
     waveHdr[0].dwFlags = waveHdr[1].dwFlags = 0L;
     waveHdr[0].dwBufferLength = waveHdr[1].dwBufferLength = bufsize;
-    if (waveOutPrepareHeader(hWave, &waveHdr[0], sizeof(WAVEHDR)) || 
+    if (waveOutPrepareHeader(hWave, &waveHdr[0], sizeof(WAVEHDR)) ||
 	waveOutPrepareHeader(hWave, &waveHdr[1], sizeof(WAVEHDR))) {
 	goto errCleanUp;
     }
@@ -555,7 +555,7 @@
 	s.dwEventCount = 1L; /* for first buffer */
 
 	mmioSeek(hmmio, mmckInfo.dwDataOffset, SEEK_SET);
-	while (left) 
+	while (left)
         {
 	    if (WaitForSingleObject(iData->psStopEvent, 0) == WAIT_OBJECT_0)
             {
@@ -602,11 +602,11 @@
 
     TRACE("pszSound='%p' hmod=%04X fdwSound=%08lX\n",
 	  pszSound, hmod, fdwSound);
-    
+
     /* FIXME? I see no difference between SND_NOWAIT and SND_NOSTOP !
      * there could be one if several sounds can be played at once...
-     */ 
-    if ((fdwSound & (SND_NOWAIT | SND_NOSTOP)) && iData->lpPlaySound != NULL) 
+     */
+    if ((fdwSound & (SND_NOWAIT | SND_NOSTOP)) && iData->lpPlaySound != NULL)
 	return FALSE;
 
     /* alloc internal structure, if we need to play something */
@@ -615,7 +615,7 @@
         if (!(wps = PlaySound_Alloc(pszSound, hmod, fdwSound, bUnicode)))
             return FALSE;
     }
-    
+
     EnterCriticalSection(&iData->cs);
     /* since several threads can enter PlaySound in parallel, we're not
      * sure, at this point, that another thread didn't start a new playsound
@@ -640,7 +640,7 @@
 
     if (!pszSound || (fdwSound & SND_PURGE)) return TRUE;
 
-    if (fdwSound & SND_ASYNC) 
+    if (fdwSound & SND_ASYNC)
     {
         DWORD       id;
         wps->bLoop = (fdwSound & SND_LOOP) ? TRUE : FALSE;
@@ -739,8 +739,8 @@
 /**************************************************************************
  * 				DriverCallback			[WINMM.@]
  */
-BOOL WINAPI DriverCallback(DWORD dwCallBack, UINT uFlags, HDRVR hDev, 
-			   UINT wMsg, DWORD dwUser, DWORD dwParam1, 
+BOOL WINAPI DriverCallback(DWORD dwCallBack, UINT uFlags, HDRVR hDev,
+			   UINT wMsg, DWORD dwUser, DWORD dwParam1,
 			   DWORD dwParam2)
 {
     TRACE("(%08lX, %04X, %04X, %04X, %08lX, %08lX, %08lX); !\n",
@@ -782,7 +782,7 @@
 	    SetEvent(lpMMThd->hEvent);
 	    /* some other stuff on lpMMThd->hVxD */
 	}
-	break;	
+	break;
 #if 0
     case 4:
 	/* this is an undocumented DCB_ value for... I don't know */
@@ -799,8 +799,8 @@
 /**************************************************************************
  * 				DriverCallback			[MMSYSTEM.31]
  */
-BOOL16 WINAPI DriverCallback16(DWORD dwCallBack, UINT16 uFlags, HDRVR16 hDev, 
-			       WORD wMsg, DWORD dwUser, DWORD dwParam1, 
+BOOL16 WINAPI DriverCallback16(DWORD dwCallBack, UINT16 uFlags, HDRVR16 hDev,
+			       WORD wMsg, DWORD dwUser, DWORD dwParam1,
 			       DWORD dwParam2)
 {
     return DriverCallback(dwCallBack, uFlags, hDev, wMsg, dwUser, dwParam1, dwParam2);
@@ -813,7 +813,7 @@
 /**************************************************************************
  * find out the real mixer ID depending on hmix (depends on dwFlags)
  */
-static LPWINE_MIXER MIXER_GetDev(HMIXEROBJ hmix, DWORD dwFlags) 
+static LPWINE_MIXER MIXER_GetDev(HMIXEROBJ hmix, DWORD dwFlags)
 {
     LPWINE_MIXER	lpwm = NULL;
 
@@ -861,7 +861,7 @@
 /**************************************************************************
  * 				mixerGetNumDevs			[WINMM.@]
  */
-UINT WINAPI mixerGetNumDevs(void) 
+UINT WINAPI mixerGetNumDevs(void)
 {
     return MMDRV_GetNum(MMDRV_MIXER);
 }
@@ -869,7 +869,7 @@
 /**************************************************************************
  * 				mixerGetNumDevs			[MMSYSTEM.800]
  */
-UINT16 WINAPI mixerGetNumDevs16(void) 
+UINT16 WINAPI mixerGetNumDevs16(void)
 {
     return MMDRV_GetNum(MMDRV_MIXER);
 }
@@ -877,7 +877,7 @@
 /**************************************************************************
  * 				mixerGetDevCapsA		[WINMM.@]
  */
-UINT WINAPI mixerGetDevCapsA(UINT devid, LPMIXERCAPSA mixcaps, UINT size) 
+UINT WINAPI mixerGetDevCapsA(UINT devid, LPMIXERCAPSA mixcaps, UINT size)
 {
     LPWINE_MLD	wmld;
 
@@ -890,7 +890,7 @@
 /**************************************************************************
  * 				mixerGetDevCapsW		[WINMM.@]
  */
-UINT WINAPI mixerGetDevCapsW(UINT devid, LPMIXERCAPSW mixcaps, UINT size) 
+UINT WINAPI mixerGetDevCapsW(UINT devid, LPMIXERCAPSW mixcaps, UINT size)
 {
     MIXERCAPSA	micA;
     UINT	ret = mixerGetDevCapsA(devid, &micA, sizeof(micA));
@@ -910,12 +910,12 @@
 /**************************************************************************
  * 				mixerGetDevCaps			[MMSYSTEM.801]
  */
-UINT16 WINAPI mixerGetDevCaps16(UINT16 devid, LPMIXERCAPS16 mixcaps, 
-				UINT16 size) 
+UINT16 WINAPI mixerGetDevCaps16(UINT16 devid, LPMIXERCAPS16 mixcaps,
+				UINT16 size)
 {
     MIXERCAPSA  micA;
     UINT        ret = mixerGetDevCapsA(devid, &micA, sizeof(micA));
-    
+
     if (ret == MMSYSERR_NOERROR) {
         mixcaps->wMid           = micA.wMid;
         mixcaps->wPid           = micA.wPid;
@@ -928,7 +928,7 @@
 }
 
 static	UINT  MMSYSTEM_mixerOpen(LPHMIXER lphMix, UINT uDeviceID, DWORD dwCallback,
-				 DWORD dwInstance, DWORD fdwOpen, BOOL bFrom32) 
+				 DWORD dwInstance, DWORD fdwOpen, BOOL bFrom32)
 {
     HMIXER		hMix;
     LPWINE_MLD		wmld;
@@ -962,9 +962,9 @@
  * 				mixerOpen			[WINMM.@]
  */
 UINT WINAPI mixerOpen(LPHMIXER lphMix, UINT uDeviceID, DWORD dwCallback,
-		      DWORD dwInstance, DWORD fdwOpen) 
+		      DWORD dwInstance, DWORD fdwOpen)
 {
-    return MMSYSTEM_mixerOpen(lphMix, uDeviceID, 
+    return MMSYSTEM_mixerOpen(lphMix, uDeviceID,
 			      dwCallback, dwInstance, fdwOpen, TRUE);
 }
 
@@ -972,12 +972,12 @@
  * 				mixerOpen			[MMSYSTEM.802]
  */
 UINT16 WINAPI mixerOpen16(LPHMIXER16 lphmix, UINT16 uDeviceID, DWORD dwCallback,
-			  DWORD dwInstance, DWORD fdwOpen) 
+			  DWORD dwInstance, DWORD fdwOpen)
 {
     HMIXER	hmix;
     UINT	ret;
-    
-    ret = MMSYSTEM_mixerOpen(&hmix, uDeviceID, 
+
+    ret = MMSYSTEM_mixerOpen(&hmix, uDeviceID,
 			     dwCallback, dwInstance, fdwOpen, FALSE);
     if (lphmix) *lphmix = hmix;
     return ret;
@@ -986,11 +986,11 @@
 /**************************************************************************
  * 				mixerClose			[WINMM.@]
  */
-UINT WINAPI mixerClose(HMIXER hMix) 
+UINT WINAPI mixerClose(HMIXER hMix)
 {
     LPWINE_MLD		wmld;
-    DWORD		dwRet;    
-    
+    DWORD		dwRet;
+
     TRACE("(%04x)\n", hMix);
 
     if ((wmld = MMDRV_Get(hMix, MMDRV_MIXER, FALSE)) == NULL) return MMSYSERR_INVALHANDLE;
@@ -1004,7 +1004,7 @@
 /**************************************************************************
  * 				mixerClose			[MMSYSTEM.803]
  */
-UINT16 WINAPI mixerClose16(HMIXER16 hMix) 
+UINT16 WINAPI mixerClose16(HMIXER16 hMix)
 {
     return mixerClose(hMix);
 }
@@ -1012,7 +1012,7 @@
 /**************************************************************************
  * 				mixerGetID			[WINMM.@]
  */
-UINT WINAPI mixerGetID(HMIXEROBJ hmix, LPUINT lpid, DWORD fdwID) 
+UINT WINAPI mixerGetID(HMIXEROBJ hmix, LPUINT lpid, DWORD fdwID)
 {
     LPWINE_MIXER	lpwm;
 
@@ -1031,12 +1031,12 @@
 /**************************************************************************
  * 				mixerGetID (MMSYSTEM.806)
  */
-UINT16 WINAPI mixerGetID16(HMIXEROBJ16 hmix, LPUINT16 lpid, DWORD fdwID) 
+UINT16 WINAPI mixerGetID16(HMIXEROBJ16 hmix, LPUINT16 lpid, DWORD fdwID)
 {
-    UINT	xid;    
+    UINT	xid;
     UINT	ret = mixerGetID(hmix, &xid, fdwID);
 
-    if (lpid) 
+    if (lpid)
 	*lpid = xid;
     return ret;
 }
@@ -1045,26 +1045,26 @@
  * 				mixerGetControlDetailsA		[WINMM.@]
  */
 UINT WINAPI mixerGetControlDetailsA(HMIXEROBJ hmix, LPMIXERCONTROLDETAILS lpmcdA,
-				    DWORD fdwDetails) 
+				    DWORD fdwDetails)
 {
     LPWINE_MIXER	lpwm;
 
     TRACE("(%04x, %p, %08lx)\n", hmix, lpmcdA, fdwDetails);
 
-    if ((lpwm = MIXER_GetDev(hmix, fdwDetails)) == NULL) 
+    if ((lpwm = MIXER_GetDev(hmix, fdwDetails)) == NULL)
 	return MMSYSERR_INVALHANDLE;
 
     if (lpmcdA == NULL || lpmcdA->cbStruct != sizeof(*lpmcdA))
 	return MMSYSERR_INVALPARAM;
 
-    return MMDRV_Message(&lpwm->mld, MXDM_GETCONTROLDETAILS, (DWORD)lpmcdA, 
+    return MMDRV_Message(&lpwm->mld, MXDM_GETCONTROLDETAILS, (DWORD)lpmcdA,
 			 fdwDetails, TRUE);
 }
 
 /**************************************************************************
  * 				mixerGetControlDetailsW	[WINMM.@]
  */
-UINT WINAPI mixerGetControlDetailsW(HMIXEROBJ hmix, LPMIXERCONTROLDETAILS lpmcd, DWORD fdwDetails) 
+UINT WINAPI mixerGetControlDetailsW(HMIXEROBJ hmix, LPMIXERCONTROLDETAILS lpmcd, DWORD fdwDetails)
 {
     DWORD			ret = MMSYSERR_NOTENABLED;
 
@@ -1122,9 +1122,9 @@
 /**************************************************************************
  * 				mixerGetControlDetails	[MMSYSTEM.808]
  */
-UINT16 WINAPI mixerGetControlDetails16(HMIXEROBJ16 hmix, 
-				       LPMIXERCONTROLDETAILS16 lpmcd, 
-				       DWORD fdwDetails) 
+UINT16 WINAPI mixerGetControlDetails16(HMIXEROBJ16 hmix,
+				       LPMIXERCONTROLDETAILS16 lpmcd,
+				       DWORD fdwDetails)
 {
     DWORD	ret = MMSYSERR_NOTENABLED;
     SEGPTR	sppaDetails;
@@ -1145,28 +1145,28 @@
 /**************************************************************************
  * 				mixerGetLineControlsA	[WINMM.@]
  */
-UINT WINAPI mixerGetLineControlsA(HMIXEROBJ hmix, LPMIXERLINECONTROLSA lpmlcA, 
-				  DWORD fdwControls) 
+UINT WINAPI mixerGetLineControlsA(HMIXEROBJ hmix, LPMIXERLINECONTROLSA lpmlcA,
+				  DWORD fdwControls)
 {
     LPWINE_MIXER	lpwm;
 
     TRACE("(%04x, %p, %08lx)\n", hmix, lpmlcA, fdwControls);
 
-    if ((lpwm = MIXER_GetDev(hmix, fdwControls)) == NULL) 
+    if ((lpwm = MIXER_GetDev(hmix, fdwControls)) == NULL)
 	return MMSYSERR_INVALHANDLE;
 
     if (lpmlcA == NULL || lpmlcA->cbStruct != sizeof(*lpmlcA))
 	return MMSYSERR_INVALPARAM;
 
-    return MMDRV_Message(&lpwm->mld, MXDM_GETLINECONTROLS, (DWORD)lpmlcA, 
+    return MMDRV_Message(&lpwm->mld, MXDM_GETLINECONTROLS, (DWORD)lpmlcA,
 			 fdwControls, TRUE);
 }
 
 /**************************************************************************
  * 				mixerGetLineControlsW		[WINMM.@]
  */
-UINT WINAPI mixerGetLineControlsW(HMIXEROBJ hmix, LPMIXERLINECONTROLSW lpmlcW, 
-				  DWORD fdwControls) 
+UINT WINAPI mixerGetLineControlsW(HMIXEROBJ hmix, LPMIXERLINECONTROLSW lpmlcW,
+				  DWORD fdwControls)
 {
     MIXERLINECONTROLSA	mlcA;
     DWORD		ret;
@@ -1174,7 +1174,7 @@
 
     TRACE("(%04x, %p, %08lx)\n", hmix, lpmlcW, fdwControls);
 
-    if (lpmlcW == NULL || lpmlcW->cbStruct != sizeof(*lpmlcW) || 
+    if (lpmlcW == NULL || lpmlcW->cbStruct != sizeof(*lpmlcW) ||
 	lpmlcW->cbmxctrl != sizeof(MIXERCONTROLW))
 	return MMSYSERR_INVALPARAM;
 
@@ -1184,7 +1184,7 @@
     mlcA.u.dwControlType = lpmlcW->u.dwControlType;
     mlcA.cControls = lpmlcW->cControls;
     mlcA.cbmxctrl = sizeof(MIXERCONTROLA);
-    mlcA.pamxctrl = HeapAlloc(GetProcessHeap(), 0, 
+    mlcA.pamxctrl = HeapAlloc(GetProcessHeap(), 0,
 			      mlcA.cControls * mlcA.cbmxctrl);
 
     ret = mixerGetLineControlsA(hmix, &mlcA, fdwControls);
@@ -1194,7 +1194,7 @@
 	lpmlcW->u.dwControlID = mlcA.u.dwControlID;
 	lpmlcW->u.dwControlType = mlcA.u.dwControlType;
 	lpmlcW->cControls = mlcA.cControls;
-	
+
 	for (i = 0; i < mlcA.cControls; i++) {
 	    lpmlcW->pamxctrl[i].cbStruct = sizeof(MIXERCONTROLW);
 	    lpmlcW->pamxctrl[i].dwControlID = mlcA.pamxctrl[i].dwControlID;
@@ -1207,13 +1207,13 @@
             MultiByteToWideChar( CP_ACP, 0, mlcA.pamxctrl[i].szName, -1,
                                  lpmlcW->pamxctrl[i].szName,
                                  sizeof(lpmlcW->pamxctrl[i].szName)/sizeof(WCHAR) );
-	    /* sizeof(lpmlcW->pamxctrl[i].Bounds) == 
+	    /* sizeof(lpmlcW->pamxctrl[i].Bounds) ==
 	     * sizeof(mlcA.pamxctrl[i].Bounds) */
-	    memcpy(&lpmlcW->pamxctrl[i].Bounds, &mlcA.pamxctrl[i].Bounds, 
+	    memcpy(&lpmlcW->pamxctrl[i].Bounds, &mlcA.pamxctrl[i].Bounds,
 		   sizeof(mlcA.pamxctrl[i].Bounds));
-	    /* sizeof(lpmlcW->pamxctrl[i].Metrics) == 
+	    /* sizeof(lpmlcW->pamxctrl[i].Metrics) ==
 	     * sizeof(mlcA.pamxctrl[i].Metrics) */
-	    memcpy(&lpmlcW->pamxctrl[i].Metrics, &mlcA.pamxctrl[i].Metrics, 
+	    memcpy(&lpmlcW->pamxctrl[i].Metrics, &mlcA.pamxctrl[i].Metrics,
 		   sizeof(mlcA.pamxctrl[i].Metrics));
 	}
     }
@@ -1226,9 +1226,9 @@
 /**************************************************************************
  * 				mixerGetLineControls		[MMSYSTEM.807]
  */
-UINT16 WINAPI mixerGetLineControls16(HMIXEROBJ16 hmix, 
-				     LPMIXERLINECONTROLS16 lpmlc16, 
-				     DWORD fdwControls) 
+UINT16 WINAPI mixerGetLineControls16(HMIXEROBJ16 hmix,
+				     LPMIXERLINECONTROLS16 lpmlc16,
+				     DWORD fdwControls)
 {
     MIXERLINECONTROLSA	mlcA;
     DWORD		ret;
@@ -1237,7 +1237,7 @@
 
     TRACE("(%04x, %p, %08lx)\n", hmix, lpmlc16, fdwControls);
 
-    if (lpmlc16 == NULL || lpmlc16->cbStruct != sizeof(*lpmlc16) || 
+    if (lpmlc16 == NULL || lpmlc16->cbStruct != sizeof(*lpmlc16) ||
 	lpmlc16->cbmxctrl != sizeof(MIXERCONTROL16))
 	return MMSYSERR_INVALPARAM;
 
@@ -1247,7 +1247,7 @@
     mlcA.u.dwControlType = lpmlc16->u.dwControlType;
     mlcA.cControls = lpmlc16->cControls;
     mlcA.cbmxctrl = sizeof(MIXERCONTROLA);
-    mlcA.pamxctrl = HeapAlloc(GetProcessHeap(), 0, 
+    mlcA.pamxctrl = HeapAlloc(GetProcessHeap(), 0,
 			      mlcA.cControls * mlcA.cbmxctrl);
 
     ret = mixerGetLineControlsA(hmix, &mlcA, fdwControls);
@@ -1257,9 +1257,9 @@
 	lpmlc16->u.dwControlID = mlcA.u.dwControlID;
 	lpmlc16->u.dwControlType = mlcA.u.dwControlType;
 	lpmlc16->cControls = mlcA.cControls;
-	
+
 	lpmc16 = MapSL(lpmlc16->pamxctrl);
-	
+
 	for (i = 0; i < mlcA.cControls; i++) {
 	    lpmc16[i].cbStruct = sizeof(MIXERCONTROL16);
 	    lpmc16[i].dwControlID = mlcA.pamxctrl[i].dwControlID;
@@ -1269,10 +1269,10 @@
 	    strcpy(lpmc16[i].szShortName, mlcA.pamxctrl[i].szShortName);
 	    strcpy(lpmc16[i].szName, mlcA.pamxctrl[i].szName);
 	    /* sizeof(lpmc16[i].Bounds) == sizeof(mlcA.pamxctrl[i].Bounds) */
-	    memcpy(&lpmc16[i].Bounds, &mlcA.pamxctrl[i].Bounds, 
+	    memcpy(&lpmc16[i].Bounds, &mlcA.pamxctrl[i].Bounds,
 		   sizeof(mlcA.pamxctrl[i].Bounds));
 	    /* sizeof(lpmc16[i].Metrics) == sizeof(mlcA.pamxctrl[i].Metrics) */
-	    memcpy(&lpmc16[i].Metrics, &mlcA.pamxctrl[i].Metrics, 
+	    memcpy(&lpmc16[i].Metrics, &mlcA.pamxctrl[i].Metrics,
 		   sizeof(mlcA.pamxctrl[i].Metrics));
 	}
     }
@@ -1288,28 +1288,28 @@
 UINT WINAPI mixerGetLineInfoA(HMIXEROBJ hmix, LPMIXERLINEA lpmliW, DWORD fdwInfo)
 {
     LPWINE_MIXER	lpwm;
-    
+
     TRACE("(%04x, %p, %08lx)\n", hmix, lpmliW, fdwInfo);
-    
-    if ((lpwm = MIXER_GetDev(hmix, fdwInfo)) == NULL) 
+
+    if ((lpwm = MIXER_GetDev(hmix, fdwInfo)) == NULL)
 	return MMSYSERR_INVALHANDLE;
 
-    return MMDRV_Message(&lpwm->mld, MXDM_GETLINEINFO, (DWORD)lpmliW, 
+    return MMDRV_Message(&lpwm->mld, MXDM_GETLINEINFO, (DWORD)lpmliW,
 			 fdwInfo, TRUE);
 }
 
 /**************************************************************************
  * 				mixerGetLineInfoW		[WINMM.@]
  */
-UINT WINAPI mixerGetLineInfoW(HMIXEROBJ hmix, LPMIXERLINEW lpmliW, 
-			      DWORD fdwInfo) 
+UINT WINAPI mixerGetLineInfoW(HMIXEROBJ hmix, LPMIXERLINEW lpmliW,
+			      DWORD fdwInfo)
 {
     MIXERLINEA		mliA;
     UINT		ret;
-    
+
     TRACE("(%04x, %p, %08lx)\n", hmix, lpmliW, fdwInfo);
 
-    if (lpmliW == NULL || lpmliW->cbStruct != sizeof(*lpmliW)) 
+    if (lpmliW == NULL || lpmliW->cbStruct != sizeof(*lpmliW))
 	return MMSYSERR_INVALPARAM;
 
     mliA.cbStruct = sizeof(mliA);
@@ -1367,15 +1367,15 @@
 /**************************************************************************
  * 				mixerGetLineInfo	[MMSYSTEM.805]
  */
-UINT16 WINAPI mixerGetLineInfo16(HMIXEROBJ16 hmix, LPMIXERLINE16 lpmli16, 
-				 DWORD fdwInfo) 
+UINT16 WINAPI mixerGetLineInfo16(HMIXEROBJ16 hmix, LPMIXERLINE16 lpmli16,
+				 DWORD fdwInfo)
 {
     MIXERLINEA		mliA;
     UINT		ret;
-    
+
     TRACE("(%04x, %p, %08lx)\n", hmix, lpmli16, fdwInfo);
 
-    if (lpmli16 == NULL || lpmli16->cbStruct != sizeof(*lpmli16)) 
+    if (lpmli16 == NULL || lpmli16->cbStruct != sizeof(*lpmli16))
 	return MMSYSERR_INVALPARAM;
 
     mliA.cbStruct = sizeof(mliA);
@@ -1430,26 +1430,26 @@
 /**************************************************************************
  * 				mixerSetControlDetails	[WINMM.@]
  */
-UINT WINAPI mixerSetControlDetails(HMIXEROBJ hmix, LPMIXERCONTROLDETAILS lpmcdA, 
-				   DWORD fdwDetails) 
+UINT WINAPI mixerSetControlDetails(HMIXEROBJ hmix, LPMIXERCONTROLDETAILS lpmcdA,
+				   DWORD fdwDetails)
 {
     LPWINE_MIXER	lpwm;
 
     TRACE("(%04x, %p, %08lx)\n", hmix, lpmcdA, fdwDetails);
 
-    if ((lpwm = MIXER_GetDev(hmix, fdwDetails)) == NULL) 
+    if ((lpwm = MIXER_GetDev(hmix, fdwDetails)) == NULL)
 	return MMSYSERR_INVALHANDLE;
 
-    return MMDRV_Message(&lpwm->mld, MXDM_SETCONTROLDETAILS, (DWORD)lpmcdA, 
+    return MMDRV_Message(&lpwm->mld, MXDM_SETCONTROLDETAILS, (DWORD)lpmcdA,
 			 fdwDetails, TRUE);
 }
 
 /**************************************************************************
  * 				mixerSetControlDetails	[MMSYSTEM.809]
  */
-UINT16 WINAPI mixerSetControlDetails16(HMIXEROBJ16 hmix, 
-				       LPMIXERCONTROLDETAILS16 lpmcd, 
-				       DWORD fdwDetails) 
+UINT16 WINAPI mixerSetControlDetails16(HMIXEROBJ16 hmix,
+				       LPMIXERCONTROLDETAILS16 lpmcd,
+				       DWORD fdwDetails)
 {
     TRACE("(%04x, %p, %08lx)\n", hmix, lpmcd, fdwDetails);
     return MMSYSERR_NOTENABLED;
@@ -1461,7 +1461,7 @@
 UINT WINAPI mixerMessage(HMIXER hmix, UINT uMsg, DWORD dwParam1, DWORD dwParam2)
 {
     LPWINE_MLD		wmld;
-    
+
     TRACE("(%04lx, %d, %08lx, %08lx): semi-stub?\n",
 	  (DWORD)hmix, uMsg, dwParam1, dwParam2);
 
@@ -1474,8 +1474,8 @@
 /**************************************************************************
  * 				mixerMessage		[MMSYSTEM.804]
  */
-DWORD WINAPI mixerMessage16(HMIXER16 hmix, UINT16 uMsg, DWORD dwParam1, 
-			     DWORD dwParam2) 
+DWORD WINAPI mixerMessage16(HMIXER16 hmix, UINT16 uMsg, DWORD dwParam1,
+			     DWORD dwParam2)
 {
     return mixerMessage(hmix, uMsg, dwParam1, dwParam2);
 }
@@ -1503,7 +1503,7 @@
 {
     AUXCAPSA	acA;
     UINT	ret = auxGetDevCapsA(uDeviceID, &acA, sizeof(acA));
-    
+
     lpCaps->wMid = acA.wMid;
     lpCaps->wPid = acA.wPid;
     lpCaps->vDriverVersion = acA.vDriverVersion;
@@ -1647,7 +1647,7 @@
 {
     LPSTR	bufstr = HeapAlloc(GetProcessHeap(), 0, uLength);
     BOOL	ret = mciGetErrorStringA(wError, bufstr, uLength);
-    
+
     MultiByteToWideChar( CP_ACP, 0, bufstr, -1, lpstrBuffer, uLength );
     HeapFree(GetProcessHeap(), 0, bufstr);
     return ret;
@@ -1668,10 +1668,10 @@
 {
     BOOL16		ret = FALSE;
 
-    if (lpstrBuffer != NULL && uLength > 0 && 
+    if (lpstrBuffer != NULL && uLength > 0 &&
 	dwError >= MCIERR_BASE && dwError <= MCIERR_CUSTOM_DRIVER_BASE) {
 
-	if (LoadStringA(MULTIMEDIA_GetIData()->hWinMM32Instance, 
+	if (LoadStringA(MULTIMEDIA_GetIData()->hWinMM32Instance,
 			dwError, lpstrBuffer, uLength) > 0) {
 	    ret = TRUE;
 	}
@@ -1703,7 +1703,7 @@
 /**************************************************************************
  * 			mciGetDriverData			[MMSYSTEM.708]
  */
-DWORD WINAPI mciGetDriverData16(UINT16 uDeviceID) 
+DWORD WINAPI mciGetDriverData16(UINT16 uDeviceID)
 {
     return mciGetDriverData(uDeviceID);
 }
@@ -1711,7 +1711,7 @@
 /**************************************************************************
  * 			mciGetDriverData			[WINMM.@]
  */
-DWORD WINAPI mciGetDriverData(UINT uDeviceID) 
+DWORD WINAPI mciGetDriverData(UINT uDeviceID)
 {
     LPWINE_MCIDRIVER	wmd;
 
@@ -1723,14 +1723,14 @@
 	WARN("Bad uDeviceID\n");
 	return 0L;
     }
-    
+
     return wmd->dwPrivate;
 }
 
 /**************************************************************************
  * 			mciSetDriverData			[MMSYSTEM.707]
  */
-BOOL16 WINAPI mciSetDriverData16(UINT16 uDeviceID, DWORD data) 
+BOOL16 WINAPI mciSetDriverData16(UINT16 uDeviceID, DWORD data)
 {
     return mciSetDriverData(uDeviceID, data);
 }
@@ -1738,7 +1738,7 @@
 /**************************************************************************
  * 			mciSetDriverData			[WINMM.@]
  */
-BOOL WINAPI mciSetDriverData(UINT uDeviceID, DWORD data) 
+BOOL WINAPI mciSetDriverData(UINT uDeviceID, DWORD data)
 {
     LPWINE_MCIDRIVER	wmd;
 
@@ -1750,7 +1750,7 @@
 	WARN("Bad uDeviceID\n");
 	return FALSE;
     }
-    
+
     wmd->dwPrivate = data;
     return TRUE;
 }
@@ -1762,7 +1762,7 @@
 {
     DWORD	dwRet;
 
-    TRACE("(%08x, %s, %08lx, %08lx)\n", 
+    TRACE("(%08x, %s, %08lx, %08lx)\n",
 	  wDevID, MCI_MessageToString(wMsg), dwParam1, dwParam2);
 
     dwRet = MCI_SendCommand(wDevID, wMsg, dwParam1, dwParam2, TRUE);
@@ -1776,7 +1776,7 @@
  */
 DWORD WINAPI mciSendCommandW(UINT wDevID, UINT wMsg, DWORD dwParam1, DWORD dwParam2)
 {
-    FIXME("(%08x, %s, %08lx, %08lx): stub\n", 
+    FIXME("(%08x, %s, %08lx, %08lx): stub\n",
 	  wDevID, MCI_MessageToString(wMsg), dwParam1, dwParam2);
     return MCIERR_UNSUPPORTED_FUNCTION;
 }
@@ -1788,7 +1788,7 @@
 {
     DWORD		dwRet;
 
-    TRACE("(%04X, %s, %08lX, %08lX)\n", 
+    TRACE("(%04X, %s, %08lX, %08lX)\n",
 	  wDevID, MCI_MessageToString(wMsg), dwParam1, dwParam2);
 
     dwRet = MCI_SendCommand(wDevID, wMsg, dwParam1, dwParam2, FALSE);
@@ -1796,7 +1796,7 @@
     TRACE("=> %ld\n", dwRet);
     return dwRet;
 }
-    
+
 /**************************************************************************
  * 				mciGetDeviceID		       	[MMSYSTEM.703]
  */
@@ -1835,7 +1835,7 @@
 UINT WINAPI MCI_DefYieldProc(MCIDEVICEID wDevID, DWORD data)
 {
     INT16	ret;
-    
+
     TRACE("(0x%04x, 0x%08lx)\n", wDevID, data);
 
     if ((HIWORD(data) != 0 && GetActiveWindow() != HIWORD(data)) ||
@@ -1865,7 +1865,7 @@
 	WARN("Bad uDeviceID\n");
 	return FALSE;
     }
-    
+
     wmd->lpfnYieldProc = (YIELDPROC)fpYieldProc;
     wmd->dwYieldData   = dwYieldData;
     wmd->bIs32         = FALSE;
@@ -1886,7 +1886,7 @@
 	WARN("Bad uDeviceID\n");
 	return FALSE;
     }
-    
+
     wmd->lpfnYieldProc = fpYieldProc;
     wmd->dwYieldData   = dwYieldData;
     wmd->bIs32         = TRUE;
@@ -1902,19 +1902,19 @@
     FIXME("(%lu, %s) stub\n", dwElementID, lpstrType);
     return 0;
 }
-	
+
 /**************************************************************************
  * 				mciGetDeviceIDFromElementIDW	[WINMM.@]
  */
 UINT WINAPI mciGetDeviceIDFromElementIDW(DWORD dwElementID, LPCWSTR lpstrType)
 {
-    /* FIXME: that's rather strange, there is no 
+    /* FIXME: that's rather strange, there is no
      * mciGetDeviceIDFromElementID32A in winmm.spec
      */
     FIXME("(%lu, %p) stub\n", dwElementID, lpstrType);
     return 0;
 }
-	
+
 /**************************************************************************
  * 				mciGetYieldProc			[MMSYSTEM.716]
  */
@@ -1938,7 +1938,7 @@
     }
     return (YIELDPROC16)wmd->lpfnYieldProc;
 }
-    
+
 /**************************************************************************
  * 				mciGetYieldProc			[WINMM.@]
  */
@@ -1990,7 +1990,7 @@
 /**************************************************************************
  * 				mciDriverYield			[MMSYSTEM.710]
  */
-UINT16 WINAPI mciDriverYield16(UINT16 uDeviceID) 
+UINT16 WINAPI mciDriverYield16(UINT16 uDeviceID)
 {
     LPWINE_MCIDRIVER	wmd;
     UINT16		ret = 0;
@@ -2009,7 +2009,7 @@
 /**************************************************************************
  * 			mciDriverYield				[WINMM.@]
  */
-UINT WINAPI mciDriverYield(UINT uDeviceID) 
+UINT WINAPI mciDriverYield(UINT uDeviceID)
 {
     LPWINE_MCIDRIVER	wmd;
     UINT		ret = 0;
@@ -2044,12 +2044,12 @@
 /**************************************************************************
  * 				midiOutGetDevCapsW	[WINMM.@]
  */
-UINT WINAPI midiOutGetDevCapsW(UINT uDeviceID, LPMIDIOUTCAPSW lpCaps, 
+UINT WINAPI midiOutGetDevCapsW(UINT uDeviceID, LPMIDIOUTCAPSW lpCaps,
 			       UINT uSize)
 {
     MIDIOUTCAPSA	mocA;
     UINT		ret;
-    
+
     ret = midiOutGetDevCapsA(uDeviceID, &mocA, sizeof(mocA));
     lpCaps->wMid		= mocA.wMid;
     lpCaps->wPid		= mocA.wPid;
@@ -2067,7 +2067,7 @@
 /**************************************************************************
  * 				midiOutGetDevCapsA	[WINMM.@]
  */
-UINT WINAPI midiOutGetDevCapsA(UINT uDeviceID, LPMIDIOUTCAPSA lpCaps, 
+UINT WINAPI midiOutGetDevCapsA(UINT uDeviceID, LPMIDIOUTCAPSA lpCaps,
 			       UINT uSize)
 {
     LPWINE_MLD	wmld;
@@ -2085,7 +2085,7 @@
 /**************************************************************************
  * 				midiOutGetDevCaps	[MMSYSTEM.202]
  */
-UINT16 WINAPI midiOutGetDevCaps16(UINT16 uDeviceID, LPMIDIOUTCAPS16 lpCaps, 
+UINT16 WINAPI midiOutGetDevCaps16(UINT16 uDeviceID, LPMIDIOUTCAPS16 lpCaps,
 				  UINT16 uSize)
 {
     MIDIOUTCAPSA	capsA;
@@ -2124,8 +2124,8 @@
 		* a warning for the test was always true */
 	       (/*uError >= MMSYSERR_BASE && */ uError <= MMSYSERR_LASTERROR) ||
 	       (uError >= MIDIERR_BASE  && uError <= MIDIERR_LASTERROR)) {
-	
-	if (LoadStringA(MULTIMEDIA_GetIData()->hWinMM32Instance, 
+
+	if (LoadStringA(MULTIMEDIA_GetIData()->hWinMM32Instance,
 			uError, lpText, uSize) > 0) {
 	    ret = MMSYSERR_NOERROR;
 	}
@@ -2148,7 +2148,7 @@
 {
     LPSTR	xstr = HeapAlloc(GetProcessHeap(), 0, uSize);
     UINT	ret;
-    
+
     ret = MIDI_GetErrorText(uError, xstr, uSize);
     MultiByteToWideChar( CP_ACP, 0, xstr, -1, lpText, uSize );
     HeapFree(GetProcessHeap(), 0, xstr);
@@ -2166,20 +2166,20 @@
 /**************************************************************************
  * 				MIDI_OutAlloc    		[internal]
  */
-static	LPWINE_MIDI	MIDI_OutAlloc(HMIDIOUT* lphMidiOut, LPDWORD lpdwCallback, 
-				      LPDWORD lpdwInstance, LPDWORD lpdwFlags, 
+static	LPWINE_MIDI	MIDI_OutAlloc(HMIDIOUT* lphMidiOut, LPDWORD lpdwCallback,
+				      LPDWORD lpdwInstance, LPDWORD lpdwFlags,
 				      DWORD cIDs, MIDIOPENSTRMID* lpIDs, BOOL bFrom32)
 {
     HMIDIOUT	      	hMidiOut;
     LPWINE_MIDI		lpwm;
     UINT		size;
-    
+
     size = sizeof(WINE_MIDI) + (cIDs ? (cIDs-1) : 0) * sizeof(MIDIOPENSTRMID);
 
-    lpwm = (LPWINE_MIDI)MMDRV_Alloc(size, MMDRV_MIDIOUT, &hMidiOut, lpdwFlags, 
+    lpwm = (LPWINE_MIDI)MMDRV_Alloc(size, MMDRV_MIDIOUT, &hMidiOut, lpdwFlags,
 				    lpdwCallback, lpdwInstance, bFrom32);
 
-    if (lphMidiOut != NULL) 
+    if (lphMidiOut != NULL)
 	*lphMidiOut = hMidiOut;
 
     if (lpwm) {
@@ -2194,19 +2194,19 @@
     return lpwm;
 }
 
-UINT MMSYSTEM_midiOutOpen(HMIDIOUT* lphMidiOut, UINT uDeviceID, DWORD dwCallback, 
+UINT MMSYSTEM_midiOutOpen(HMIDIOUT* lphMidiOut, UINT uDeviceID, DWORD dwCallback,
 			  DWORD dwInstance, DWORD dwFlags, BOOL bFrom32)
 {
     HMIDIOUT		hMidiOut;
     LPWINE_MIDI		lpwm;
     UINT		dwRet = 0;
-    
-    TRACE("(%p, %d, %08lX, %08lX, %08lX);\n", 
+
+    TRACE("(%p, %d, %08lX, %08lX, %08lX);\n",
 	  lphMidiOut, uDeviceID, dwCallback, dwInstance, dwFlags);
 
     if (lphMidiOut != NULL) *lphMidiOut = 0;
 
-    lpwm = MIDI_OutAlloc(&hMidiOut, &dwCallback, &dwInstance, &dwFlags, 
+    lpwm = MIDI_OutAlloc(&hMidiOut, &dwCallback, &dwInstance, &dwFlags,
 			 0, NULL, bFrom32);
 
     if (lpwm == NULL)
@@ -2214,7 +2214,7 @@
 
     lpwm->mld.uDeviceID = uDeviceID;
 
-    dwRet = MMDRV_Open((LPWINE_MLD)lpwm, MODM_OPEN, (DWORD)&lpwm->mod, 
+    dwRet = MMDRV_Open((LPWINE_MLD)lpwm, MODM_OPEN, (DWORD)&lpwm->mod,
 		       dwFlags);
 
     if (dwRet != MMSYSERR_NOERROR) {
@@ -2234,7 +2234,7 @@
 UINT WINAPI midiOutOpen(HMIDIOUT* lphMidiOut, UINT uDeviceID,
 			DWORD dwCallback, DWORD dwInstance, DWORD dwFlags)
 {
-    return MMSYSTEM_midiOutOpen(lphMidiOut, uDeviceID, dwCallback, 
+    return MMSYSTEM_midiOutOpen(lphMidiOut, uDeviceID, dwCallback,
 				dwInstance, dwFlags, TRUE);
 }
 
@@ -2246,10 +2246,10 @@
 {
     HMIDIOUT	hmo;
     UINT	ret;
-    
-    ret = MMSYSTEM_midiOutOpen(&hmo, uDeviceID, dwCallback, dwInstance, 
+
+    ret = MMSYSTEM_midiOutOpen(&hmo, uDeviceID, dwCallback, dwInstance,
 			       dwFlags, FALSE);
-    
+
     if (lphMidiOut != NULL) *lphMidiOut = hmo;
     return ret;
 }
@@ -2264,7 +2264,7 @@
 
     TRACE("(%04X)\n", hMidiOut);
 
-    if ((wmld = MMDRV_Get(hMidiOut, MMDRV_MIDIOUT, FALSE)) == NULL) 
+    if ((wmld = MMDRV_Get(hMidiOut, MMDRV_MIDIOUT, FALSE)) == NULL)
 	return MMSYSERR_INVALHANDLE;
 
     dwRet = MMDRV_Close(wmld, MODM_CLOSE);
@@ -2291,7 +2291,7 @@
 
     TRACE("(%04X, %p, %d)\n", hMidiOut, lpMidiOutHdr, uSize);
 
-    if ((wmld = MMDRV_Get(hMidiOut, MMDRV_MIDIOUT, FALSE)) == NULL) 
+    if ((wmld = MMDRV_Get(hMidiOut, MMDRV_MIDIOUT, FALSE)) == NULL)
 	return MMSYSERR_INVALHANDLE;
 
     return MMDRV_Message(wmld, MODM_PREPARE, (DWORD)lpMidiOutHdr, uSize, TRUE);
@@ -2308,7 +2308,7 @@
 
     TRACE("(%04X, %08lx, %d)\n", hMidiOut, lpsegMidiOutHdr, uSize);
 
-    if ((wmld = MMDRV_Get(hMidiOut, MMDRV_MIDIOUT, FALSE)) == NULL) 
+    if ((wmld = MMDRV_Get(hMidiOut, MMDRV_MIDIOUT, FALSE)) == NULL)
 	return MMSYSERR_INVALHANDLE;
 
     return MMDRV_Message(wmld, MODM_PREPARE, lpsegMidiOutHdr, uSize, FALSE);
@@ -2319,7 +2319,7 @@
  */
 UINT WINAPI midiOutUnprepareHeader(HMIDIOUT hMidiOut,
 				   MIDIHDR* lpMidiOutHdr, UINT uSize)
-{	
+{
     LPWINE_MLD		wmld;
 
     TRACE("(%04X, %p, %d)\n", hMidiOut, lpMidiOutHdr, uSize);
@@ -2328,7 +2328,7 @@
 	return MMSYSERR_NOERROR;
     }
 
-    if ((wmld = MMDRV_Get(hMidiOut, MMDRV_MIDIOUT, FALSE)) == NULL) 
+    if ((wmld = MMDRV_Get(hMidiOut, MMDRV_MIDIOUT, FALSE)) == NULL)
 	return MMSYSERR_INVALHANDLE;
 
     return MMDRV_Message(wmld, MODM_UNPREPARE, (DWORD)lpMidiOutHdr, uSize, TRUE);
@@ -2350,7 +2350,7 @@
 	return MMSYSERR_NOERROR;
     }
 
-    if ((wmld = MMDRV_Get(hMidiOut, MMDRV_MIDIOUT, FALSE)) == NULL) 
+    if ((wmld = MMDRV_Get(hMidiOut, MMDRV_MIDIOUT, FALSE)) == NULL)
 	return MMSYSERR_INVALHANDLE;
 
     return MMDRV_Message(wmld, MODM_UNPREPARE, (DWORD)lpsegMidiOutHdr, uSize, FALSE);
@@ -2365,7 +2365,7 @@
 
     TRACE("(%04X, %08lX)\n", hMidiOut, dwMsg);
 
-    if ((wmld = MMDRV_Get(hMidiOut, MMDRV_MIDIOUT, FALSE)) == NULL) 
+    if ((wmld = MMDRV_Get(hMidiOut, MMDRV_MIDIOUT, FALSE)) == NULL)
 	return MMSYSERR_INVALHANDLE;
 
     return MMDRV_Message(wmld, MODM_DATA, dwMsg, 0L, FALSE);
@@ -2389,7 +2389,7 @@
 
     TRACE("(%04X, %p, %d)\n", hMidiOut, lpMidiOutHdr, uSize);
 
-    if ((wmld = MMDRV_Get(hMidiOut, MMDRV_MIDIOUT, FALSE)) == NULL) 
+    if ((wmld = MMDRV_Get(hMidiOut, MMDRV_MIDIOUT, FALSE)) == NULL)
 	return MMSYSERR_INVALHANDLE;
 
     return MMDRV_Message(wmld, MODM_LONGDATA, (DWORD)lpMidiOutHdr, uSize, TRUE);
@@ -2406,7 +2406,7 @@
 
     TRACE("(%04X, %p, %d)\n", hMidiOut, lpsegMidiOutHdr, uSize);
 
-    if ((wmld = MMDRV_Get(hMidiOut, MMDRV_MIDIOUT, FALSE)) == NULL) 
+    if ((wmld = MMDRV_Get(hMidiOut, MMDRV_MIDIOUT, FALSE)) == NULL)
 	return MMSYSERR_INVALHANDLE;
 
     return MMDRV_Message(wmld, MODM_LONGDATA, (DWORD)lpsegMidiOutHdr, uSize, FALSE);
@@ -2421,7 +2421,7 @@
 
     TRACE("(%04X)\n", hMidiOut);
 
-    if ((wmld = MMDRV_Get(hMidiOut, MMDRV_MIDIOUT, FALSE)) == NULL) 
+    if ((wmld = MMDRV_Get(hMidiOut, MMDRV_MIDIOUT, FALSE)) == NULL)
 	return MMSYSERR_INVALHANDLE;
 
     return MMDRV_Message(wmld, MODM_RESET, 0L, 0L, TRUE);
@@ -2444,7 +2444,7 @@
 
     TRACE("(%04X, %p);\n", uDeviceID, lpdwVolume);
 
-    if ((wmld = MMDRV_Get(uDeviceID, MMDRV_MIDIOUT, TRUE)) == NULL) 
+    if ((wmld = MMDRV_Get(uDeviceID, MMDRV_MIDIOUT, TRUE)) == NULL)
 	return MMSYSERR_INVALHANDLE;
 
     return MMDRV_Message(wmld, MODM_GETVOLUME, (DWORD)lpdwVolume, 0L, TRUE);
@@ -2467,7 +2467,7 @@
 
     TRACE("(%04X, %ld);\n", uDeviceID, dwVolume);
 
-    if ((wmld = MMDRV_Get(uDeviceID, MMDRV_MIDIOUT, TRUE)) == NULL) 
+    if ((wmld = MMDRV_Get(uDeviceID, MMDRV_MIDIOUT, TRUE)) == NULL)
 	return MMSYSERR_INVALHANDLE;
 
     return MMDRV_Message(wmld, MODM_SETVOLUME, dwVolume, 0L, TRUE);
@@ -2530,7 +2530,7 @@
     TRACE("(%04X, %p)\n", hMidiOut, lpuDeviceID);
 
     if (lpuDeviceID == NULL) return MMSYSERR_INVALPARAM;
-    if ((wmld = MMDRV_Get(hMidiOut, MMDRV_MIDIOUT, FALSE)) == NULL) 
+    if ((wmld = MMDRV_Get(hMidiOut, MMDRV_MIDIOUT, FALSE)) == NULL)
 	return MMSYSERR_INVALHANDLE;
 
     *lpuDeviceID = wmld->uDeviceID;
@@ -2547,7 +2547,7 @@
     TRACE("(%04X, %p)\n", hMidiOut, lpuDeviceID);
 
     if (lpuDeviceID == NULL) return MMSYSERR_INVALPARAM;
-    if ((wmld = MMDRV_Get(hMidiOut, MMDRV_MIDIOUT, FALSE)) == NULL) 
+    if ((wmld = MMDRV_Get(hMidiOut, MMDRV_MIDIOUT, FALSE)) == NULL)
 	return MMSYSERR_INVALHANDLE;
 
     *lpuDeviceID = wmld->uDeviceID;
@@ -2557,7 +2557,7 @@
 /**************************************************************************
  * 				midiOutMessage		[WINMM.@]
  */
-DWORD WINAPI midiOutMessage(HMIDIOUT hMidiOut, UINT uMessage, 
+DWORD WINAPI midiOutMessage(HMIDIOUT hMidiOut, UINT uMessage,
 			    DWORD dwParam1, DWORD dwParam2)
 {
     LPWINE_MLD		wmld;
@@ -2588,14 +2588,14 @@
 /**************************************************************************
  * 				midiOutMessage		[MMSYSTEM.216]
  */
-DWORD WINAPI midiOutMessage16(HMIDIOUT16 hMidiOut, UINT16 uMessage, 
+DWORD WINAPI midiOutMessage16(HMIDIOUT16 hMidiOut, UINT16 uMessage,
                               DWORD dwParam1, DWORD dwParam2)
 {
     LPWINE_MLD		wmld;
 
     TRACE("(%04X, %04X, %08lX, %08lX)\n", hMidiOut, uMessage, dwParam1, dwParam2);
 
-    if ((wmld = MMDRV_Get(hMidiOut, MMDRV_MIDIOUT, FALSE)) == NULL) 
+    if ((wmld = MMDRV_Get(hMidiOut, MMDRV_MIDIOUT, FALSE)) == NULL)
 	return MMSYSERR_INVALHANDLE;
 
     switch (uMessage) {
@@ -2640,7 +2640,7 @@
 {
     MIDIINCAPSA		micA;
     UINT		ret = midiInGetDevCapsA(uDeviceID, &micA, uSize);
-    
+
     if (ret == MMSYSERR_NOERROR) {
 	lpCaps->wMid = micA.wMid;
 	lpCaps->wPid = micA.wPid;
@@ -2661,7 +2661,7 @@
 
     TRACE("(%d, %p, %d);\n", uDeviceID, lpCaps, uSize);
 
-    if ((wmld = MMDRV_Get(uDeviceID, MMDRV_MIDIIN, TRUE)) == NULL) 
+    if ((wmld = MMDRV_Get(uDeviceID, MMDRV_MIDIIN, TRUE)) == NULL)
 	return MMSYSERR_INVALHANDLE;
 
    return MMDRV_Message(wmld, MIDM_GETDEVCAPS, (DWORD)lpCaps, uSize, TRUE);
@@ -2670,12 +2670,12 @@
 /**************************************************************************
  * 				midiInGetDevCaps	[MMSYSTEM.302]
  */
-UINT16 WINAPI midiInGetDevCaps16(UINT16 uDeviceID, LPMIDIINCAPS16 lpCaps, 
+UINT16 WINAPI midiInGetDevCaps16(UINT16 uDeviceID, LPMIDIINCAPS16 lpCaps,
 				 UINT16 uSize)
 {
     MIDIINCAPSA		micA;
     UINT		ret = midiInGetDevCapsA(uDeviceID, &micA, uSize);
-    
+
     if (ret == MMSYSERR_NOERROR) {
 	lpCaps->wMid = micA.wMid;
 	lpCaps->wPid = micA.wPid;
@@ -2683,7 +2683,7 @@
 	strcpy(lpCaps->szPname, micA.szPname);
 	lpCaps->dwSupport = micA.dwSupport;
     }
- 
+
     return ret;
 }
 
@@ -2716,14 +2716,14 @@
     return MIDI_GetErrorText(uError, lpText, uSize);
 }
 
-static	UINT MMSYSTEM_midiInOpen(HMIDIIN* lphMidiIn, UINT uDeviceID, DWORD dwCallback, 
+static	UINT MMSYSTEM_midiInOpen(HMIDIIN* lphMidiIn, UINT uDeviceID, DWORD dwCallback,
 				 DWORD dwInstance, DWORD dwFlags, BOOL bFrom32)
 {
     HMIDIIN		hMidiIn;
     LPWINE_MIDI		lpwm;
     DWORD		dwRet = 0;
-    
-    TRACE("(%p, %d, %08lX, %08lX, %08lX);\n", 
+
+    TRACE("(%p, %d, %08lX, %08lX, %08lX);\n",
 	  lphMidiIn, uDeviceID, dwCallback, dwInstance, dwFlags);
 
     if (lphMidiIn != NULL) *lphMidiIn = 0;
@@ -2731,7 +2731,7 @@
     lpwm = (LPWINE_MIDI)MMDRV_Alloc(sizeof(WINE_MIDI), MMDRV_MIDIIN, &hMidiIn,
 				    &dwFlags, &dwCallback, &dwInstance, bFrom32);
 
-    if (lpwm == NULL) 
+    if (lpwm == NULL)
 	return MMSYSERR_NOMEM;
 
     lpwm->mod.hMidi = hMidiIn;
@@ -2757,7 +2757,7 @@
 UINT WINAPI midiInOpen(HMIDIIN* lphMidiIn, UINT uDeviceID,
 		       DWORD dwCallback, DWORD dwInstance, DWORD dwFlags)
 {
-    return MMSYSTEM_midiInOpen(lphMidiIn, uDeviceID, dwCallback, 
+    return MMSYSTEM_midiInOpen(lphMidiIn, uDeviceID, dwCallback,
 			       dwInstance, dwFlags, TRUE);
 }
 
@@ -2770,9 +2770,9 @@
     HMIDIIN	xhmid;
     UINT 	ret;
 
-    ret = MMSYSTEM_midiInOpen(&xhmid, uDeviceID, dwCallback, dwInstance, 
+    ret = MMSYSTEM_midiInOpen(&xhmid, uDeviceID, dwCallback, dwInstance,
 			      dwFlags, FALSE);
-    
+
     if (lphMidiIn) *lphMidiIn = xhmid;
     return ret;
 }
@@ -2783,11 +2783,11 @@
 UINT WINAPI midiInClose(HMIDIIN hMidiIn)
 {
     LPWINE_MLD		wmld;
-    DWORD		dwRet;    
+    DWORD		dwRet;
 
     TRACE("(%04X)\n", hMidiIn);
 
-    if ((wmld = MMDRV_Get(hMidiIn, MMDRV_MIDIIN, FALSE)) == NULL) 
+    if ((wmld = MMDRV_Get(hMidiIn, MMDRV_MIDIIN, FALSE)) == NULL)
 	return MMSYSERR_INVALHANDLE;
 
     dwRet = MMDRV_Close(wmld, MIDM_CLOSE);
@@ -2806,14 +2806,14 @@
 /**************************************************************************
  * 				midiInPrepareHeader	[WINMM.@]
  */
-UINT WINAPI midiInPrepareHeader(HMIDIIN hMidiIn, 
+UINT WINAPI midiInPrepareHeader(HMIDIIN hMidiIn,
 				MIDIHDR* lpMidiInHdr, UINT uSize)
 {
     LPWINE_MLD		wmld;
-    
+
     TRACE("(%04X, %p, %d)\n", hMidiIn, lpMidiInHdr, uSize);
 
-    if ((wmld = MMDRV_Get(hMidiIn, MMDRV_MIDIIN, FALSE)) == NULL) 
+    if ((wmld = MMDRV_Get(hMidiIn, MMDRV_MIDIIN, FALSE)) == NULL)
 	return MMSYSERR_INVALHANDLE;
 
     return MMDRV_Message(wmld, MIDM_PREPARE, (DWORD)lpMidiInHdr, uSize, TRUE);
@@ -2830,7 +2830,7 @@
 
     TRACE("(%04X, %08lx, %d)\n", hMidiIn, lpsegMidiInHdr, uSize);
 
-    if ((wmld = MMDRV_Get(hMidiIn, MMDRV_MIDIIN, FALSE)) == NULL) 
+    if ((wmld = MMDRV_Get(hMidiIn, MMDRV_MIDIIN, FALSE)) == NULL)
 	return MMSYSERR_INVALHANDLE;
 
     return MMDRV_Message(wmld, MIDM_PREPARE, (DWORD)lpsegMidiInHdr, uSize, FALSE);
@@ -2850,7 +2850,7 @@
 	return MMSYSERR_NOERROR;
     }
 
-    if ((wmld = MMDRV_Get(hMidiIn, MMDRV_MIDIIN, FALSE)) == NULL) 
+    if ((wmld = MMDRV_Get(hMidiIn, MMDRV_MIDIIN, FALSE)) == NULL)
 	return MMSYSERR_INVALHANDLE;
 
     return MMDRV_Message(wmld, MIDM_UNPREPARE, (DWORD)lpMidiInHdr, uSize, TRUE);
@@ -2872,7 +2872,7 @@
 	return MMSYSERR_NOERROR;
     }
 
-    if ((wmld = MMDRV_Get(hMidiIn, MMDRV_MIDIIN, FALSE)) == NULL) 
+    if ((wmld = MMDRV_Get(hMidiIn, MMDRV_MIDIIN, FALSE)) == NULL)
 	return MMSYSERR_INVALHANDLE;
 
     return MMDRV_Message(wmld, MIDM_UNPREPARE, (DWORD)lpsegMidiInHdr, uSize, FALSE);
@@ -2888,7 +2888,7 @@
 
     TRACE("(%04X, %p, %d)\n", hMidiIn, lpMidiInHdr, uSize);
 
-    if ((wmld = MMDRV_Get(hMidiIn, MMDRV_MIDIIN, FALSE)) == NULL) 
+    if ((wmld = MMDRV_Get(hMidiIn, MMDRV_MIDIIN, FALSE)) == NULL)
 	return MMSYSERR_INVALHANDLE;
 
     return MMDRV_Message(wmld, MIDM_ADDBUFFER, (DWORD)lpMidiInHdr, uSize, TRUE);
@@ -2905,7 +2905,7 @@
 
     TRACE("(%04X, %p, %d)\n", hMidiIn, lpsegMidiInHdr, uSize);
 
-    if ((wmld = MMDRV_Get(hMidiIn, MMDRV_MIDIIN, FALSE)) == NULL) 
+    if ((wmld = MMDRV_Get(hMidiIn, MMDRV_MIDIIN, FALSE)) == NULL)
 	return MMSYSERR_INVALHANDLE;
 
     return MMDRV_Message(wmld, MIDM_ADDBUFFER, (DWORD)lpsegMidiInHdr, uSize, FALSE);
@@ -2920,7 +2920,7 @@
 
     TRACE("(%04X)\n", hMidiIn);
 
-    if ((wmld = MMDRV_Get(hMidiIn, MMDRV_MIDIIN, FALSE)) == NULL) 
+    if ((wmld = MMDRV_Get(hMidiIn, MMDRV_MIDIIN, FALSE)) == NULL)
 	return MMSYSERR_INVALHANDLE;
 
     return MMDRV_Message(wmld, MIDM_START, 0L, 0L, TRUE);
@@ -2943,7 +2943,7 @@
 
     TRACE("(%04X)\n", hMidiIn);
 
-    if ((wmld = MMDRV_Get(hMidiIn, MMDRV_MIDIIN, FALSE)) == NULL) 
+    if ((wmld = MMDRV_Get(hMidiIn, MMDRV_MIDIIN, FALSE)) == NULL)
 	return MMSYSERR_INVALHANDLE;
 
     return MMDRV_Message(wmld, MIDM_STOP, 0L, 0L, TRUE);
@@ -2966,7 +2966,7 @@
 
     TRACE("(%04X)\n", hMidiIn);
 
-    if ((wmld = MMDRV_Get(hMidiIn, MMDRV_MIDIIN, FALSE)) == NULL) 
+    if ((wmld = MMDRV_Get(hMidiIn, MMDRV_MIDIIN, FALSE)) == NULL)
 	return MMSYSERR_INVALHANDLE;
 
     return MMDRV_Message(wmld, MIDM_RESET, 0L, 0L, TRUE);
@@ -2991,11 +2991,11 @@
 
     if (lpuDeviceID == NULL) return MMSYSERR_INVALPARAM;
 
-    if ((wmld = MMDRV_Get(hMidiIn, MMDRV_MIDIIN, TRUE)) == NULL) 
+    if ((wmld = MMDRV_Get(hMidiIn, MMDRV_MIDIIN, TRUE)) == NULL)
 	return MMSYSERR_INVALHANDLE;
 
     *lpuDeviceID = wmld->uDeviceID;
-    
+
     return MMSYSERR_NOERROR;
 }
 
@@ -3010,25 +3010,25 @@
 
     if (lpuDeviceID == NULL) return MMSYSERR_INVALPARAM;
 
-    if ((wmld = MMDRV_Get(hMidiIn, MMDRV_MIDIIN, TRUE)) == NULL) 
+    if ((wmld = MMDRV_Get(hMidiIn, MMDRV_MIDIIN, TRUE)) == NULL)
 	return MMSYSERR_INVALHANDLE;
 
     *lpuDeviceID = wmld->uDeviceID;
-    
+
     return MMSYSERR_NOERROR;
 }
 
 /**************************************************************************
  * 				midiInMessage		[WINMM.@]
  */
-DWORD WINAPI midiInMessage(HMIDIIN hMidiIn, UINT uMessage, 
+DWORD WINAPI midiInMessage(HMIDIIN hMidiIn, UINT uMessage,
 			   DWORD dwParam1, DWORD dwParam2)
 {
     LPWINE_MLD		wmld;
 
     TRACE("(%04X, %04X, %08lX, %08lX)\n", hMidiIn, uMessage, dwParam1, dwParam2);
 
-    if ((wmld = MMDRV_Get(hMidiIn, MMDRV_MIDIIN, FALSE)) == NULL) 
+    if ((wmld = MMDRV_Get(hMidiIn, MMDRV_MIDIIN, FALSE)) == NULL)
 	return MMSYSERR_INVALHANDLE;
 
     switch (uMessage) {
@@ -3043,7 +3043,7 @@
 /**************************************************************************
  * 				midiInMessage		[MMSYSTEM.313]
  */
-DWORD WINAPI midiInMessage16(HMIDIIN16 hMidiIn, UINT16 uMessage, 
+DWORD WINAPI midiInMessage16(HMIDIIN16 hMidiIn, UINT16 uMessage,
                              DWORD dwParam1, DWORD dwParam2)
 {
     LPWINE_MLD		wmld;
@@ -3066,7 +3066,7 @@
         return midiInAddBuffer16(hMidiIn, MapSL(dwParam1), dwParam2);
     }
 
-    if ((wmld = MMDRV_Get(hMidiIn, MMDRV_MIDIIN, FALSE)) == NULL) 
+    if ((wmld = MMDRV_Get(hMidiIn, MMDRV_MIDIIN, FALSE)) == NULL)
 	return MMSYSERR_INVALHANDLE;
 
     return MMDRV_Message(wmld, uMessage, dwParam1, dwParam2, FALSE);
@@ -3114,7 +3114,7 @@
 static	DWORD	MMSYSTEM_MidiStream_Convert(WINE_MIDIStream* lpMidiStrm, DWORD pulse)
 {
     DWORD	ret = 0;
-    
+
     if (lpMidiStrm->dwTimeDiv == 0) {
 	FIXME("Shouldn't happen. lpMidiStrm->dwTimeDiv = 0\n");
     } else if (lpMidiStrm->dwTimeDiv > 0x8000) { /* SMPTE, unchecked FIXME? */
@@ -3122,10 +3122,10 @@
 	int	nsf = LOBYTE(lpMidiStrm->dwTimeDiv);		/* number of sub-frames */
 	ret = (pulse * 1000) / (nf * nsf);
     } else {
-	ret = (DWORD)((double)pulse * ((double)lpMidiStrm->dwTempo / 1000) /	
+	ret = (DWORD)((double)pulse * ((double)lpMidiStrm->dwTempo / 1000) /
 		      (double)lpMidiStrm->dwTimeDiv);
     }
-    
+
     return ret;
 }
 
@@ -3150,8 +3150,8 @@
 	for (lpMidiHdr = lpMidiStrm->lpMidiHdr; lpMidiHdr; lpMidiHdr = (LPMIDIHDR)lpMidiHdr->lpNext) {
 	    lpMidiHdr->dwFlags |= MHDR_DONE;
 	    lpMidiHdr->dwFlags &= ~MHDR_INQUEUE;
-	    
-	    DriverCallback(lpwm->mod.dwCallback, lpMidiStrm->wFlags, lpMidiStrm->hDevice, 
+
+	    DriverCallback(lpwm->mod.dwCallback, lpMidiStrm->wFlags, lpMidiStrm->hDevice,
 			   MM_MOM_DONE, lpwm->mod.dwInstance, (DWORD)lpMidiHdr, 0L);
 	}
 	lpMidiStrm->lpMidiHdr = 0;
@@ -3161,14 +3161,14 @@
 	/* sets initial tick count for first MIDIHDR */
 	if (!lpMidiStrm->dwStartTicks)
 	    lpMidiStrm->dwStartTicks = GetTickCount();
-	
+
 	/* FIXME(EPP): "I don't understand the content of the first MIDIHDR sent
 	 * by native mcimidi, it doesn't look like a correct one".
-	 * this trick allows to throw it away... but I don't like it. 
-	 * It looks like part of the file I'm trying to play and definitively looks 
+	 * this trick allows to throw it away... but I don't like it.
+	 * It looks like part of the file I'm trying to play and definitively looks
 	 * like raw midi content
 	 * I'd really like to understand why native mcimidi sends it. Perhaps a bad
-	 * synchronization issue where native mcimidi is still processing raw MIDI 
+	 * synchronization issue where native mcimidi is still processing raw MIDI
 	 * content before generating MIDIEVENTs ?
 	 *
 	 * 4c 04 89 3b 00 81 7c 99 3b 43 00 99 23 5e 04 89 L..;..|.;C..#^..
@@ -3191,19 +3191,19 @@
 	 */
 	lpMidiHdr = (LPMIDIHDR)msg->lParam;
 	lpData = lpMidiHdr->lpData;
-	TRACE("Adding %s lpMidiHdr=%p [lpData=0x%08lx dwBufferLength=%lu/%lu dwFlags=0x%08lx size=%u]\n", 
-	      (lpMidiHdr->dwFlags & MHDR_ISSTRM) ? "stream" : "regular", lpMidiHdr, 
-	      (DWORD)lpMidiHdr, lpMidiHdr->dwBufferLength, lpMidiHdr->dwBytesRecorded, 
+	TRACE("Adding %s lpMidiHdr=%p [lpData=0x%08lx dwBufferLength=%lu/%lu dwFlags=0x%08lx size=%u]\n",
+	      (lpMidiHdr->dwFlags & MHDR_ISSTRM) ? "stream" : "regular", lpMidiHdr,
+	      (DWORD)lpMidiHdr, lpMidiHdr->dwBufferLength, lpMidiHdr->dwBytesRecorded,
 	      lpMidiHdr->dwFlags, msg->wParam);
 #if 0
 	/* dumps content of lpMidiHdr->lpData
 	 * FIXME: there should be a debug routine somewhere that already does this
-	 * I hate spreading this type of shit all around the code 
-	 */ 
+	 * I hate spreading this type of shit all around the code
+	 */
 	for (dwToGo = 0; dwToGo < lpMidiHdr->dwBufferLength; dwToGo += 16) {
 	    DWORD	i;
 	    BYTE	ch;
-	    
+
 	    for (i = 0; i < min(16, lpMidiHdr->dwBufferLength - dwToGo); i++)
 		printf("%02x ", lpData[dwToGo + i]);
 	    for (; i < 16; i++)
@@ -3215,20 +3215,20 @@
 	    printf("\n");
 	}
 #endif
-	if (((LPMIDIEVENT)lpData)->dwStreamID != 0 && 
+	if (((LPMIDIEVENT)lpData)->dwStreamID != 0 &&
 	    ((LPMIDIEVENT)lpData)->dwStreamID != 0xFFFFFFFF &&
 	    ((LPMIDIEVENT)lpData)->dwStreamID != (DWORD)lpMidiStrm) {
-	    FIXME("Dropping bad %s lpMidiHdr (streamID=%08lx)\n", 
-		  (lpMidiHdr->dwFlags & MHDR_ISSTRM) ? "stream" : "regular", 
+	    FIXME("Dropping bad %s lpMidiHdr (streamID=%08lx)\n",
+		  (lpMidiHdr->dwFlags & MHDR_ISSTRM) ? "stream" : "regular",
 		  ((LPMIDIEVENT)lpData)->dwStreamID);
 	    lpMidiHdr->dwFlags |= MHDR_DONE;
 	    lpMidiHdr->dwFlags &= ~MHDR_INQUEUE;
-	    
-	    DriverCallback(lpwm->mod.dwCallback, lpMidiStrm->wFlags, lpMidiStrm->hDevice, 
+
+	    DriverCallback(lpwm->mod.dwCallback, lpMidiStrm->wFlags, lpMidiStrm->hDevice,
 			   MM_MOM_DONE, lpwm->mod.dwInstance, (DWORD)lpMidiHdr, 0L);
 	    break;
-	} 
-	
+	}
+
 	for (lpmh = &lpMidiStrm->lpMidiHdr; *lpmh; lpmh = (LPMIDIHDR*)&((*lpmh)->lpNext));
 	*lpmh = lpMidiHdr;
 	lpMidiHdr = (LPMIDIHDR)msg->lParam;
@@ -3236,7 +3236,7 @@
 	lpMidiHdr->dwFlags |= MHDR_INQUEUE;
 	lpMidiHdr->dwFlags &= MHDR_DONE;
 	lpMidiHdr->dwOffset = 0;
-	
+
 	break;
     default:
 	FIXME("Unknown message %d\n", msg->message);
@@ -3261,7 +3261,7 @@
 
     TRACE("(%p)!\n", lpMidiStrm);
 
-    if (!lpMidiStrm || 
+    if (!lpMidiStrm ||
 	(lpwm = (LPWINE_MIDI)MMDRV_Get(lpMidiStrm->hDevice, MMDRV_MIDIOUT, FALSE)) == NULL)
 	goto the_end;
 
@@ -3277,7 +3277,7 @@
     SuspendThread(lpMidiStrm->hThread);
     TRACE("Ready to go 2\n");
 
-    lpMidiStrm->dwStartTicks = 0;    
+    lpMidiStrm->dwStartTicks = 0;
     lpMidiStrm->dwPulses = 0;
 
     lpMidiStrm->lpMidiHdr = 0;
@@ -3297,16 +3297,16 @@
 
 	if (!lpData)
 	    lpData = lpMidiHdr->lpData;
-	    
+
 	me = (LPMIDIEVENT)(lpData + lpMidiHdr->dwOffset);
-	
+
 	/* do we have to wait ? */
 	if (me->dwDeltaTime) {
 	    lpMidiStrm->dwPositionMS += MMSYSTEM_MidiStream_Convert(lpMidiStrm, me->dwDeltaTime);
 	    lpMidiStrm->dwPulses += me->dwDeltaTime;
 
 	    dwToGo = lpMidiStrm->dwStartTicks + lpMidiStrm->dwPositionMS;
-			    
+
 	    TRACE("%ld/%ld/%ld\n", dwToGo, GetTickCount(), me->dwDeltaTime);
 	    while ((dwCurrTC = GetTickCount()) < dwToGo) {
 		if (MsgWaitForMultipleObjects(0, NULL, FALSE, dwToGo - dwCurrTC, QS_ALLINPUT) == WAIT_OBJECT_0) {
@@ -3320,7 +3320,7 @@
 		    /* timeout, so me->dwDeltaTime is elapsed, can break the while loop */
 		    break;
 		}
-	    }		    
+	    }
 	}
 	switch (MEVT_EVENTTYPE(me->dwEvent & ~MEVT_F_CALLBACK)) {
 	case MEVT_COMMENT:
@@ -3345,19 +3345,19 @@
 	    break;
 	}
 	if (me->dwEvent & MEVT_F_CALLBACK) {
-	    DriverCallback(lpwm->mod.dwCallback, lpMidiStrm->wFlags, lpMidiStrm->hDevice, 
+	    DriverCallback(lpwm->mod.dwCallback, lpMidiStrm->wFlags, lpMidiStrm->hDevice,
 			   MM_MOM_POSITIONCB, lpwm->mod.dwInstance, (LPARAM)lpMidiHdr, 0L);
 	}
 	lpMidiHdr->dwOffset += sizeof(MIDIEVENT) - sizeof(me->dwParms);
-	if (me->dwEvent & MEVT_F_LONG) 
+	if (me->dwEvent & MEVT_F_LONG)
 	    lpMidiHdr->dwOffset += (MEVT_EVENTPARM(me->dwEvent) + 3) & ~3;
 	if (lpMidiHdr->dwOffset >= lpMidiHdr->dwBufferLength) {
 	    /* done with this header */
 	    lpMidiHdr->dwFlags |= MHDR_DONE;
 	    lpMidiHdr->dwFlags &= ~MHDR_INQUEUE;
-	    
+
 	    lpMidiStrm->lpMidiHdr = (LPMIDIHDR)lpMidiHdr->lpNext;
-	    DriverCallback(lpwm->mod.dwCallback, lpMidiStrm->wFlags, lpMidiStrm->hDevice, 
+	    DriverCallback(lpwm->mod.dwCallback, lpMidiStrm->wFlags, lpMidiStrm->hDevice,
 			   MM_MOM_DONE, lpwm->mod.dwInstance, (DWORD)lpMidiHdr, 0L);
 	    lpData = 0;
 	}
@@ -3382,7 +3382,7 @@
     } else {
 	WARN("bad PostThreadMessageA\n");
 	return FALSE;
-    }	
+    }
     return TRUE;
 }
 
@@ -3409,9 +3409,9 @@
 /**************************************************************************
  * 				MMSYSTEM_MidiStream_Open	[internal]
  */
-static	MMRESULT WINAPI MMSYSTEM_MidiStream_Open(HMIDISTRM* lphMidiStrm, LPUINT lpuDeviceID, 
-						 DWORD cMidi, DWORD dwCallback, 
-						 DWORD dwInstance, DWORD fdwOpen, BOOL bFrom32) 
+static	MMRESULT WINAPI MMSYSTEM_MidiStream_Open(HMIDISTRM* lphMidiStrm, LPUINT lpuDeviceID,
+						 DWORD cMidi, DWORD dwCallback,
+						 DWORD dwInstance, DWORD fdwOpen, BOOL bFrom32)
 {
     WINE_MIDIStream*	lpMidiStrm;
     MMRESULT		ret;
@@ -3449,20 +3449,20 @@
     lpMidiStrm->hEvent = CreateEventA(NULL, FALSE, FALSE, NULL);
     lpMidiStrm->wFlags = HIWORD(fdwOpen);
 
-    lpMidiStrm->hThread = CreateThread(NULL, 0, MMSYSTEM_MidiStream_Player, 
+    lpMidiStrm->hThread = CreateThread(NULL, 0, MMSYSTEM_MidiStream_Player,
 				       lpMidiStrm, 0, &(lpMidiStrm->dwThreadID));
 
     if (!lpMidiStrm->hThread) {
 	midiStreamClose((HMIDISTRM)hMidiOut);
-	return MMSYSERR_NOMEM;	
+	return MMSYSERR_NOMEM;
     }
 
     /* wait for thread to have started, and for its queue to be created */
     {
 	DWORD	count;
 
-	/* (Release|Restore)ThunkLock() is needed when this method is called from 16 bit code, 
-	 * (meaning the Win16Lock is set), so that it's released and the 32 bit thread running 
+	/* (Release|Restore)ThunkLock() is needed when this method is called from 16 bit code,
+	 * (meaning the Win16Lock is set), so that it's released and the 32 bit thread running
 	 * MMSYSTEM_MidiStreamPlayer can acquire Win16Lock to create its queue.
 	 */
 	ReleaseThunkLock(&count);
@@ -3470,27 +3470,27 @@
 	RestoreThunkLock(count);
     }
 
-    TRACE("=> (%u/%d) hMidi=0x%04x ret=%d lpMidiStrm=%p\n", 
-	  *lpuDeviceID, lpwm->mld.uDeviceID, *lphMidiStrm, ret, lpMidiStrm);	
+    TRACE("=> (%u/%d) hMidi=0x%04x ret=%d lpMidiStrm=%p\n",
+	  *lpuDeviceID, lpwm->mld.uDeviceID, *lphMidiStrm, ret, lpMidiStrm);
     return ret;
 }
 
 /**************************************************************************
  * 				midiStreamOpen			[WINMM.@]
  */
-MMRESULT WINAPI midiStreamOpen(HMIDISTRM* lphMidiStrm, LPUINT lpuDeviceID, 
-			       DWORD cMidi, DWORD dwCallback, 
-			       DWORD dwInstance, DWORD fdwOpen) 
+MMRESULT WINAPI midiStreamOpen(HMIDISTRM* lphMidiStrm, LPUINT lpuDeviceID,
+			       DWORD cMidi, DWORD dwCallback,
+			       DWORD dwInstance, DWORD fdwOpen)
 {
-    return MMSYSTEM_MidiStream_Open(lphMidiStrm, lpuDeviceID, cMidi, dwCallback, 
+    return MMSYSTEM_MidiStream_Open(lphMidiStrm, lpuDeviceID, cMidi, dwCallback,
 				    dwInstance, fdwOpen, TRUE);
 }
 
 /**************************************************************************
  * 				midiStreamOut			[WINMM.@]
  */
-MMRESULT WINAPI midiStreamOut(HMIDISTRM hMidiStrm, LPMIDIHDR lpMidiHdr, 
-			      UINT cbMidiHdr) 
+MMRESULT WINAPI midiStreamOut(HMIDISTRM hMidiStrm, LPMIDIHDR lpMidiHdr,
+			      UINT cbMidiHdr)
 {
     WINE_MIDIStream*	lpMidiStrm;
     DWORD		ret = MMSYSERR_NOERROR;
@@ -3502,8 +3502,8 @@
     } else if (!lpMidiHdr) {
         ret = MMSYSERR_INVALPARAM;
     } else {
-	if (!PostThreadMessageA(lpMidiStrm->dwThreadID, 
-                                WINE_MSM_HEADER, cbMidiHdr, 
+	if (!PostThreadMessageA(lpMidiStrm->dwThreadID,
+                                WINE_MSM_HEADER, cbMidiHdr,
                                 (DWORD)lpMidiHdr)) {
 	    WARN("bad PostThreadMessageA\n");
 	    ret = MMSYSERR_ERROR;
@@ -3515,7 +3515,7 @@
 /**************************************************************************
  * 				midiStreamPause			[WINMM.@]
  */
-MMRESULT WINAPI midiStreamPause(HMIDISTRM hMidiStrm) 
+MMRESULT WINAPI midiStreamPause(HMIDISTRM hMidiStrm)
 {
     WINE_MIDIStream*	lpMidiStrm;
     DWORD		ret = MMSYSERR_NOERROR;
@@ -3536,7 +3536,7 @@
 /**************************************************************************
  * 				midiStreamPosition		[WINMM.@]
  */
-MMRESULT WINAPI midiStreamPosition(HMIDISTRM hMidiStrm, LPMMTIME lpMMT, UINT cbmmt) 
+MMRESULT WINAPI midiStreamPosition(HMIDISTRM hMidiStrm, LPMMTIME lpMMT, UINT cbmmt)
 {
     WINE_MIDIStream*	lpMidiStrm;
     DWORD		ret = MMSYSERR_NOERROR;
@@ -3549,12 +3549,12 @@
 	ret = MMSYSERR_INVALPARAM;
     } else {
 	switch (lpMMT->wType) {
-	case TIME_MS:	
-	    lpMMT->u.ms = lpMidiStrm->dwPositionMS;	
+	case TIME_MS:
+	    lpMMT->u.ms = lpMidiStrm->dwPositionMS;
 	    TRACE("=> %ld ms\n", lpMMT->u.ms);
 	    break;
 	case TIME_TICKS:
-	    lpMMT->u.ticks = lpMidiStrm->dwPulses;	
+	    lpMMT->u.ticks = lpMidiStrm->dwPulses;
 	    TRACE("=> %ld ticks\n", lpMMT->u.ticks);
 	    break;
 	default:
@@ -3570,7 +3570,7 @@
 /**************************************************************************
  * 				midiStreamProperty		[WINMM.@]
  */
-MMRESULT WINAPI midiStreamProperty(HMIDISTRM hMidiStrm, LPBYTE lpPropData, DWORD dwProperty) 
+MMRESULT WINAPI midiStreamProperty(HMIDISTRM hMidiStrm, LPBYTE lpPropData, DWORD dwProperty)
 {
     WINE_MIDIStream*	lpMidiStrm;
     MMRESULT		ret = MMSYSERR_NOERROR;
@@ -3583,7 +3583,7 @@
 	ret = MMSYSERR_INVALPARAM;
     } else if (dwProperty & MIDIPROP_TEMPO) {
 	MIDIPROPTEMPO*	mpt = (MIDIPROPTEMPO*)lpPropData;
-	
+
 	if (sizeof(MIDIPROPTEMPO) != mpt->cbStruct) {
 	    ret = MMSYSERR_INVALPARAM;
 	} else if (dwProperty & MIDIPROP_SET) {
@@ -3595,7 +3595,7 @@
 	}
     } else if (dwProperty & MIDIPROP_TIMEDIV) {
 	MIDIPROPTIMEDIV*	mptd = (MIDIPROPTIMEDIV*)lpPropData;
-	
+
 	if (sizeof(MIDIPROPTIMEDIV) != mptd->cbStruct) {
 	    ret = MMSYSERR_INVALPARAM;
 	} else if (dwProperty & MIDIPROP_SET) {
@@ -3604,7 +3604,7 @@
 	} else if (dwProperty & MIDIPROP_GET) {
 	    mptd->dwTimeDiv = lpMidiStrm->dwTimeDiv;
 	    TRACE("Getting time div <= %ld\n", mptd->dwTimeDiv);
-	}    
+	}
     } else {
 	ret = MMSYSERR_INVALPARAM;
     }
@@ -3615,7 +3615,7 @@
 /**************************************************************************
  * 				midiStreamRestart		[WINMM.@]
  */
-MMRESULT WINAPI midiStreamRestart(HMIDISTRM hMidiStrm) 
+MMRESULT WINAPI midiStreamRestart(HMIDISTRM hMidiStrm)
 {
     WINE_MIDIStream*	lpMidiStrm;
     MMRESULT		ret = MMSYSERR_NOERROR;
@@ -3646,7 +3646,7 @@
 /**************************************************************************
  * 				midiStreamStop			[WINMM.@]
  */
-MMRESULT WINAPI midiStreamStop(HMIDISTRM hMidiStrm) 
+MMRESULT WINAPI midiStreamStop(HMIDISTRM hMidiStrm)
 {
     WINE_MIDIStream*	lpMidiStrm;
     MMRESULT		ret = MMSYSERR_NOERROR;
@@ -3674,9 +3674,9 @@
 /**************************************************************************
  * 				midiStreamOpen			[MMSYSTEM.251]
  */
-MMRESULT16 WINAPI midiStreamOpen16(HMIDISTRM16* phMidiStrm, LPUINT16 devid, 
-				   DWORD cMidi, DWORD dwCallback, 
-				   DWORD dwInstance, DWORD fdwOpen) 
+MMRESULT16 WINAPI midiStreamOpen16(HMIDISTRM16* phMidiStrm, LPUINT16 devid,
+				   DWORD cMidi, DWORD dwCallback,
+				   DWORD dwInstance, DWORD fdwOpen)
 {
     HMIDISTRM	hMidiStrm32;
     MMRESULT 	ret;
@@ -3685,7 +3685,7 @@
     if (!phMidiStrm || !devid)
 	return MMSYSERR_INVALPARAM;
     devid32 = *devid;
-    ret = MMSYSTEM_MidiStream_Open(&hMidiStrm32, &devid32, cMidi, dwCallback, 
+    ret = MMSYSTEM_MidiStream_Open(&hMidiStrm32, &devid32, cMidi, dwCallback,
 				   dwInstance, fdwOpen, FALSE);
     *phMidiStrm = hMidiStrm32;
     *devid = devid32;
@@ -3695,7 +3695,7 @@
 /**************************************************************************
  * 				midiStreamOut			[MMSYSTEM.254]
  */
-MMRESULT16 WINAPI midiStreamOut16(HMIDISTRM16 hMidiStrm, LPMIDIHDR16 lpMidiHdr, UINT16 cbMidiHdr) 
+MMRESULT16 WINAPI midiStreamOut16(HMIDISTRM16 hMidiStrm, LPMIDIHDR16 lpMidiHdr, UINT16 cbMidiHdr)
 {
     return midiStreamOut(hMidiStrm, (LPMIDIHDR)lpMidiHdr, cbMidiHdr);
 }
@@ -3703,7 +3703,7 @@
 /**************************************************************************
  * 				midiStreamPause			[MMSYSTEM.255]
  */
-MMRESULT16 WINAPI midiStreamPause16(HMIDISTRM16 hMidiStrm) 
+MMRESULT16 WINAPI midiStreamPause16(HMIDISTRM16 hMidiStrm)
 {
     return midiStreamPause(hMidiStrm);
 }
@@ -3711,7 +3711,7 @@
 /**************************************************************************
  * 				midiStreamPosition		[MMSYSTEM.253]
  */
-MMRESULT16 WINAPI midiStreamPosition16(HMIDISTRM16 hMidiStrm, LPMMTIME16 lpmmt16, UINT16 cbmmt) 
+MMRESULT16 WINAPI midiStreamPosition16(HMIDISTRM16 hMidiStrm, LPMMTIME16 lpmmt16, UINT16 cbmmt)
 {
     MMTIME	mmt32;
     MMRESULT	ret;
@@ -3727,7 +3727,7 @@
 /**************************************************************************
  * 				midiStreamProperty		[MMSYSTEM.250]
  */
-MMRESULT16 WINAPI midiStreamProperty16(HMIDISTRM16 hMidiStrm, LPBYTE lpPropData, DWORD dwProperty) 
+MMRESULT16 WINAPI midiStreamProperty16(HMIDISTRM16 hMidiStrm, LPBYTE lpPropData, DWORD dwProperty)
 {
     return midiStreamProperty(hMidiStrm, lpPropData, dwProperty);
 }
@@ -3735,7 +3735,7 @@
 /**************************************************************************
  * 				midiStreamRestart		[MMSYSTEM.256]
  */
-MMRESULT16 WINAPI midiStreamRestart16(HMIDISTRM16 hMidiStrm) 
+MMRESULT16 WINAPI midiStreamRestart16(HMIDISTRM16 hMidiStrm)
 {
     return midiStreamRestart(hMidiStrm);
 }
@@ -3743,14 +3743,14 @@
 /**************************************************************************
  * 				midiStreamStop			[MMSYSTEM.257]
  */
-MMRESULT16 WINAPI midiStreamStop16(HMIDISTRM16 hMidiStrm) 
+MMRESULT16 WINAPI midiStreamStop16(HMIDISTRM16 hMidiStrm)
 {
     return midiStreamStop(hMidiStrm);
 }
 
 static	UINT WINAPI MMSYSTEM_waveOpen(HANDLE* lphndl, UINT uDeviceID, UINT uType,
-				      const LPWAVEFORMATEX lpFormat, 
-				      DWORD dwCallback, DWORD dwInstance, 
+				      const LPWAVEFORMATEX lpFormat,
+				      DWORD dwCallback, DWORD dwInstance,
 				      DWORD dwFlags, BOOL bFrom32)
 {
     HANDLE		handle;
@@ -3758,8 +3758,8 @@
     DWORD		dwRet = MMSYSERR_NOERROR;
     WAVEOPENDESC	wod;
 
-    TRACE("(%p, %d, %s, %p, %08lX, %08lX, %08lX, %d);\n", 
-	  lphndl, (int)uDeviceID, (uType==MMDRV_WAVEOUT)?"Out":"In", lpFormat, dwCallback, 
+    TRACE("(%p, %d, %s, %p, %08lX, %08lX, %08lX, %d);\n",
+	  lphndl, (int)uDeviceID, (uType==MMDRV_WAVEOUT)?"Out":"In", lpFormat, dwCallback,
 	  dwInstance, dwFlags, bFrom32?32:16);
 
     if (dwFlags & WAVE_FORMAT_QUERY)	TRACE("WAVE_FORMAT_QUERY requested !\n");
@@ -3768,12 +3768,12 @@
     if ((dwFlags & WAVE_MAPPED) && (uDeviceID == (UINT)-1))
 	return MMSYSERR_INVALPARAM;
 
-    TRACE("wFormatTag=%u, nChannels=%u, nSamplesPerSec=%lu, nAvgBytesPerSec=%lu, nBlockAlign=%u, wBitsPerSample=%u, cbSize=%u\n", 
-	  lpFormat->wFormatTag, lpFormat->nChannels, lpFormat->nSamplesPerSec, 
+    TRACE("wFormatTag=%u, nChannels=%u, nSamplesPerSec=%lu, nAvgBytesPerSec=%lu, nBlockAlign=%u, wBitsPerSample=%u, cbSize=%u\n",
+	  lpFormat->wFormatTag, lpFormat->nChannels, lpFormat->nSamplesPerSec,
 	  lpFormat->nAvgBytesPerSec, lpFormat->nBlockAlign, lpFormat->wBitsPerSample, lpFormat->cbSize);
-    
-    if ((wmld = MMDRV_Alloc(sizeof(WINE_WAVE), uType, &handle, 
-			    &dwFlags, &dwCallback, &dwInstance, bFrom32)) == NULL) 
+
+    if ((wmld = MMDRV_Alloc(sizeof(WINE_WAVE), uType, &handle,
+			    &dwFlags, &dwCallback, &dwInstance, bFrom32)) == NULL)
 	return MMSYSERR_NOMEM;
 
     wod.hWave = handle;
@@ -3806,7 +3806,7 @@
 /**************************************************************************
  * 				waveOutGetNumDevs		[WINMM.@]
  */
-UINT WINAPI waveOutGetNumDevs(void) 
+UINT WINAPI waveOutGetNumDevs(void)
 {
     return MMDRV_GetNum(MMDRV_WAVEOUT);
 }
@@ -3822,7 +3822,7 @@
 /**************************************************************************
  * 				waveOutGetDevCaps		[MMSYSTEM.402]
  */
-UINT16 WINAPI waveOutGetDevCaps16(UINT16 uDeviceID, 
+UINT16 WINAPI waveOutGetDevCaps16(UINT16 uDeviceID,
 				  LPWAVEOUTCAPS16 lpCaps, UINT16 uSize)
 {
     WAVEOUTCAPSA	wocA;
@@ -3856,8 +3856,8 @@
     TRACE("(%u %p %u)!\n", uDeviceID, lpCaps, uSize);
 
     if (lpCaps == NULL)	return MMSYSERR_INVALPARAM;
-    
-    if ((wmld = MMDRV_Get(uDeviceID, MMDRV_WAVEOUT, TRUE)) == NULL) 
+
+    if ((wmld = MMDRV_Get(uDeviceID, MMDRV_WAVEOUT, TRUE)) == NULL)
 	return MMSYSERR_INVALHANDLE;
 
     return MMDRV_Message(wmld, WODM_GETDEVCAPS, (DWORD)lpCaps, uSize, TRUE);
@@ -3874,7 +3874,7 @@
     UINT 		ret;
 
     if (lpCaps == NULL)	return MMSYSERR_INVALPARAM;
-    
+
     ret = waveOutGetDevCapsA(uDeviceID, &wocA, sizeof(wocA));
 
     if (ret == MMSYSERR_NOERROR) {
@@ -3906,8 +3906,8 @@
 		* a warning for the test was always true */
 	       (/*uError >= MMSYSERR_BASE && */uError <= MMSYSERR_LASTERROR) ||
 	       (uError >= WAVERR_BASE  && uError <= WAVERR_LASTERROR)) {
-	
-	if (LoadStringA(MULTIMEDIA_GetIData()->hWinMM32Instance, 
+
+	if (LoadStringA(MULTIMEDIA_GetIData()->hWinMM32Instance,
 			uError, lpText, uSize) > 0) {
 	    ret = MMSYSERR_NOERROR;
 	}
@@ -3938,7 +3938,7 @@
 {
     LPSTR	xstr = HeapAlloc(GetProcessHeap(), 0, uSize);
     UINT	ret = WAVE_GetErrorText(uError, xstr, uSize);
-    
+
     MultiByteToWideChar( CP_ACP, 0, xstr, -1, lpText, uSize );
     HeapFree(GetProcessHeap(), 0, xstr);
     return ret;
@@ -3952,7 +3952,7 @@
 			const LPWAVEFORMATEX lpFormat, DWORD dwCallback,
 			DWORD dwInstance, DWORD dwFlags)
 {
-    return MMSYSTEM_waveOpen(lphWaveOut, uDeviceID, MMDRV_WAVEOUT, lpFormat, 
+    return MMSYSTEM_waveOpen(lphWaveOut, uDeviceID, MMDRV_WAVEOUT, lpFormat,
 			     dwCallback, dwInstance, dwFlags, TRUE);
 }
 
@@ -3968,10 +3968,10 @@
 
     /* since layout of WAVEFORMATEX is the same for 16/32 bits, we directly
      * call the 32 bit version
-     * however, we need to promote correctly the wave mapper id 
+     * however, we need to promote correctly the wave mapper id
      * (0xFFFFFFFF and not 0x0000FFFF)
      */
-    ret = MMSYSTEM_waveOpen(&hWaveOut, (uDeviceID == (UINT16)-1) ? (UINT)-1 : uDeviceID, 
+    ret = MMSYSTEM_waveOpen(&hWaveOut, (uDeviceID == (UINT16)-1) ? (UINT)-1 : uDeviceID,
 			    MMDRV_WAVEOUT, lpFormat, dwCallback, dwInstance, dwFlags, FALSE);
 
     if (lphWaveOut != NULL) *lphWaveOut = hWaveOut;
@@ -3985,10 +3985,10 @@
 {
     LPWINE_MLD		wmld;
     DWORD		dwRet;
-    
+
     TRACE("(%04X)\n", hWaveOut);
 
-    if ((wmld = MMDRV_Get(hWaveOut, MMDRV_WAVEOUT, FALSE)) == NULL) 
+    if ((wmld = MMDRV_Get(hWaveOut, MMDRV_WAVEOUT, FALSE)) == NULL)
 	return MMSYSERR_INVALHANDLE;
 
     dwRet = MMDRV_Close(wmld, WODM_CLOSE);
@@ -4018,12 +4018,12 @@
 				 WAVEHDR* lpWaveOutHdr, UINT uSize)
 {
     LPWINE_MLD		wmld;
-    
+
     TRACE("(%04X, %p, %u);\n", hWaveOut, lpWaveOutHdr, uSize);
 
     if (lpWaveOutHdr == NULL) return MMSYSERR_INVALPARAM;
 
-    if ((wmld = MMDRV_Get(hWaveOut, MMDRV_WAVEOUT, FALSE)) == NULL) 
+    if ((wmld = MMDRV_Get(hWaveOut, MMDRV_WAVEOUT, FALSE)) == NULL)
 	return MMSYSERR_INVALHANDLE;
 
     return MMDRV_Message(wmld, WODM_PREPARE, (DWORD)lpWaveOutHdr, uSize, TRUE);
@@ -4038,12 +4038,12 @@
 {
     LPWINE_MLD		wmld;
     LPWAVEHDR		lpWaveOutHdr = MapSL(lpsegWaveOutHdr);
-    
+
     TRACE("(%04X, %08lx, %u);\n", hWaveOut, lpsegWaveOutHdr, uSize);
 
     if (lpWaveOutHdr == NULL) return MMSYSERR_INVALPARAM;
 
-    if ((wmld = MMDRV_Get(hWaveOut, MMDRV_WAVEOUT, FALSE)) == NULL) 
+    if ((wmld = MMDRV_Get(hWaveOut, MMDRV_WAVEOUT, FALSE)) == NULL)
 	return MMSYSERR_INVALHANDLE;
 
     return MMDRV_Message(wmld, WODM_PREPARE, (DWORD)lpsegWaveOutHdr, uSize, FALSE);
@@ -4056,14 +4056,14 @@
 				   LPWAVEHDR lpWaveOutHdr, UINT uSize)
 {
     LPWINE_MLD		wmld;
-    
+
     TRACE("(%04X, %p, %u);\n", hWaveOut, lpWaveOutHdr, uSize);
 
     if (!(lpWaveOutHdr->dwFlags & WHDR_PREPARED)) {
 	return MMSYSERR_NOERROR;
     }
 
-    if ((wmld = MMDRV_Get(hWaveOut, MMDRV_WAVEOUT, FALSE)) == NULL) 
+    if ((wmld = MMDRV_Get(hWaveOut, MMDRV_WAVEOUT, FALSE)) == NULL)
 	return MMSYSERR_INVALHANDLE;
 
     return MMDRV_Message(wmld, WODM_UNPREPARE, (DWORD)lpWaveOutHdr, uSize, TRUE);
@@ -4078,14 +4078,14 @@
 {
     LPWINE_MLD		wmld;
     LPWAVEHDR		lpWaveOutHdr = MapSL(lpsegWaveOutHdr);
-    
+
     TRACE("(%04X, %08lx, %u);\n", hWaveOut, lpsegWaveOutHdr, uSize);
 
     if (!(lpWaveOutHdr->dwFlags & WHDR_PREPARED)) {
 	return MMSYSERR_NOERROR;
     }
 
-    if ((wmld = MMDRV_Get(hWaveOut, MMDRV_WAVEOUT, FALSE)) == NULL) 
+    if ((wmld = MMDRV_Get(hWaveOut, MMDRV_WAVEOUT, FALSE)) == NULL)
 	return MMSYSERR_INVALHANDLE;
 
     return MMDRV_Message(wmld, WODM_UNPREPARE, (DWORD)lpsegWaveOutHdr, uSize, FALSE);
@@ -4098,10 +4098,10 @@
 			 UINT uSize)
 {
     LPWINE_MLD		wmld;
-    
+
     TRACE("(%04X, %p, %u);\n", hWaveOut, lpWaveOutHdr, uSize);
 
-    if ((wmld = MMDRV_Get(hWaveOut, MMDRV_WAVEOUT, FALSE)) == NULL) 
+    if ((wmld = MMDRV_Get(hWaveOut, MMDRV_WAVEOUT, FALSE)) == NULL)
 	return MMSYSERR_INVALHANDLE;
 
     return MMDRV_Message(wmld, WODM_WRITE, (DWORD)lpWaveOutHdr, uSize, TRUE);
@@ -4115,10 +4115,10 @@
 			     UINT16 uSize)              /* [in] */
 {
     LPWINE_MLD		wmld;
-    
+
     TRACE("(%04X, %p, %u);\n", hWaveOut, lpsegWaveOutHdr, uSize);
 
-    if ((wmld = MMDRV_Get(hWaveOut, MMDRV_WAVEOUT, FALSE)) == NULL) 
+    if ((wmld = MMDRV_Get(hWaveOut, MMDRV_WAVEOUT, FALSE)) == NULL)
 	return MMSYSERR_INVALHANDLE;
 
     return MMDRV_Message(wmld, WODM_WRITE, (DWORD)lpsegWaveOutHdr, uSize, FALSE);
@@ -4246,7 +4246,7 @@
 
     TRACE("(%04X, %p, %u);\n", hWaveOut, lpTime, uSize);
 
-    if ((wmld = MMDRV_Get(hWaveOut, MMDRV_WAVEOUT, FALSE)) == NULL) 
+    if ((wmld = MMDRV_Get(hWaveOut, MMDRV_WAVEOUT, FALSE)) == NULL)
 	return MMSYSERR_INVALHANDLE;
 
     return MMDRV_Message(wmld, WODM_GETPOS, (DWORD)lpTime, uSize, TRUE);
@@ -4377,7 +4377,7 @@
 {
     return waveOutGetVolume(devid, lpdw);
 }
-    
+
 /**************************************************************************
  * 				waveOutSetVolume	[WINMM.@]
  */
@@ -4400,7 +4400,7 @@
 {
     return waveOutSetVolume(devid, dw);
 }
-    
+
 /**************************************************************************
  * 				waveOutGetID		[WINMM.@]
  */
@@ -4412,7 +4412,7 @@
 
     if (lpuDeviceID == NULL) return MMSYSERR_INVALHANDLE;
 
-    if ((wmld = MMDRV_Get(hWaveOut, MMDRV_WAVEOUT, FALSE)) == NULL) 
+    if ((wmld = MMDRV_Get(hWaveOut, MMDRV_WAVEOUT, FALSE)) == NULL)
 	return MMSYSERR_INVALHANDLE;
 
     *lpuDeviceID = wmld->uDeviceID;
@@ -4430,7 +4430,7 @@
 
     if (lpuDeviceID == NULL) return MMSYSERR_INVALHANDLE;
 
-    if ((wmld = MMDRV_Get(hWaveOut, MMDRV_WAVEOUT, FALSE)) == NULL) 
+    if ((wmld = MMDRV_Get(hWaveOut, MMDRV_WAVEOUT, FALSE)) == NULL)
 	return MMSYSERR_INVALHANDLE;
 
     *lpuDeviceID = wmld->uDeviceID;
@@ -4440,11 +4440,11 @@
 /**************************************************************************
  * 				waveOutMessage 		[WINMM.@]
  */
-DWORD WINAPI waveOutMessage(HWAVEOUT hWaveOut, UINT uMessage, 
+DWORD WINAPI waveOutMessage(HWAVEOUT hWaveOut, UINT uMessage,
 			    DWORD dwParam1, DWORD dwParam2)
 {
     LPWINE_MLD		wmld;
-    
+
     TRACE("(%04x, %u, %ld, %ld)\n", hWaveOut, uMessage, dwParam1, dwParam2);
 
     if ((wmld = MMDRV_Get(hWaveOut, MMDRV_WAVEOUT, FALSE)) == NULL) {
@@ -4464,11 +4464,11 @@
 /**************************************************************************
  * 				waveOutMessage 		[MMSYSTEM.421]
  */
-DWORD WINAPI waveOutMessage16(HWAVEOUT16 hWaveOut, UINT16 uMessage, 
+DWORD WINAPI waveOutMessage16(HWAVEOUT16 hWaveOut, UINT16 uMessage,
                               DWORD dwParam1, DWORD dwParam2)
 {
     LPWINE_MLD		wmld;
-    
+
     TRACE("(%04x, %u, %ld, %ld)\n", hWaveOut, uMessage, dwParam1, dwParam2);
 
     if ((wmld = MMDRV_Get(hWaveOut, MMDRV_WAVEOUT, FALSE)) == NULL) {
@@ -4518,7 +4518,7 @@
 	lpCaps->dwFormats = wicA.dwFormats;
 	lpCaps->wChannels = wicA.wChannels;
     }
-    
+
     return ret;
 }
 
@@ -4531,7 +4531,7 @@
 
     TRACE("(%u %p %u)!\n", uDeviceID, lpCaps, uSize);
 
-    if ((wmld = MMDRV_Get(uDeviceID, MMDRV_WAVEIN, TRUE)) == NULL) 
+    if ((wmld = MMDRV_Get(uDeviceID, MMDRV_WAVEIN, TRUE)) == NULL)
 	return MMSYSERR_INVALHANDLE;
 
     return MMDRV_Message(wmld, WIDM_GETDEVCAPS, (DWORD)lpCaps, uSize, TRUE);
@@ -4540,7 +4540,7 @@
 /**************************************************************************
  * 				waveInGetDevCaps 		[MMSYSTEM.502]
  */
-UINT16 WINAPI waveInGetDevCaps16(UINT16 uDeviceID, LPWAVEINCAPS16 lpCaps, 
+UINT16 WINAPI waveInGetDevCaps16(UINT16 uDeviceID, LPWAVEINCAPS16 lpCaps,
 				 UINT16 uSize)
 {
     WAVEINCAPSA	wicA;
@@ -4574,7 +4574,7 @@
 {
     LPSTR txt = HeapAlloc(GetProcessHeap(), 0, uSize);
     UINT	ret = WAVE_GetErrorText(uError, txt, uSize);
-    
+
     MultiByteToWideChar( CP_ACP, 0, txt, -1, lpText, uSize );
     HeapFree(GetProcessHeap(), 0, txt);
     return ret;
@@ -4595,7 +4595,7 @@
 		       const LPWAVEFORMATEX lpFormat, DWORD dwCallback,
 		       DWORD dwInstance, DWORD dwFlags)
 {
-    return MMSYSTEM_waveOpen(lphWaveIn, uDeviceID, MMDRV_WAVEIN, lpFormat, 
+    return MMSYSTEM_waveOpen(lphWaveIn, uDeviceID, MMDRV_WAVEIN, lpFormat,
 			     dwCallback, dwInstance, dwFlags, TRUE);
 }
 
@@ -4611,10 +4611,10 @@
 
     /* since layout of WAVEFORMATEX is the same for 16/32 bits, we directly
      * call the 32 bit version
-     * however, we need to promote correctly the wave mapper id 
+     * however, we need to promote correctly the wave mapper id
      * (0xFFFFFFFF and not 0x0000FFFF)
      */
-    ret = MMSYSTEM_waveOpen(&hWaveIn, (uDeviceID == (UINT16)-1) ? (UINT)-1 : uDeviceID, 
+    ret = MMSYSTEM_waveOpen(&hWaveIn, (uDeviceID == (UINT16)-1) ? (UINT)-1 : uDeviceID,
 			    MMDRV_WAVEIN, lpFormat, dwCallback, dwInstance, dwFlags, FALSE);
 
     if (lphWaveIn != NULL) *lphWaveIn = hWaveIn;
@@ -4628,10 +4628,10 @@
 {
     LPWINE_MLD		wmld;
     DWORD		dwRet;
-    
+
     TRACE("(%04X)\n", hWaveIn);
 
-    if ((wmld = MMDRV_Get(hWaveIn, MMDRV_WAVEIN, FALSE)) == NULL) 
+    if ((wmld = MMDRV_Get(hWaveIn, MMDRV_WAVEIN, FALSE)) == NULL)
 	return MMSYSERR_INVALHANDLE;
 
     dwRet = MMDRV_Message(wmld, WIDM_CLOSE, 0L, 0L, TRUE);
@@ -4656,15 +4656,15 @@
 /**************************************************************************
  * 				waveInPrepareHeader		[WINMM.@]
  */
-UINT WINAPI waveInPrepareHeader(HWAVEIN hWaveIn, WAVEHDR* lpWaveInHdr, 
+UINT WINAPI waveInPrepareHeader(HWAVEIN hWaveIn, WAVEHDR* lpWaveInHdr,
 				UINT uSize)
 {
     LPWINE_MLD		wmld;
-    
+
     TRACE("(%04X, %p, %u);\n", hWaveIn, lpWaveInHdr, uSize);
 
     if (lpWaveInHdr == NULL) return MMSYSERR_INVALPARAM;
-    if ((wmld = MMDRV_Get(hWaveIn, MMDRV_WAVEIN, FALSE)) == NULL) 
+    if ((wmld = MMDRV_Get(hWaveIn, MMDRV_WAVEIN, FALSE)) == NULL)
 	return MMSYSERR_INVALHANDLE;
 
     lpWaveInHdr->dwBytesRecorded = 0;
@@ -4682,11 +4682,11 @@
     LPWINE_MLD		wmld;
     LPWAVEHDR		lpWaveInHdr = MapSL(lpsegWaveInHdr);
     UINT16		ret;
-    
+
     TRACE("(%04X, %p, %u);\n", hWaveIn, lpWaveInHdr, uSize);
 
     if (lpWaveInHdr == NULL) return MMSYSERR_INVALHANDLE;
-    if ((wmld = MMDRV_Get(hWaveIn, MMDRV_WAVEIN, FALSE)) == NULL) 
+    if ((wmld = MMDRV_Get(hWaveIn, MMDRV_WAVEIN, FALSE)) == NULL)
 	return MMSYSERR_INVALHANDLE;
 
     lpWaveInHdr->dwBytesRecorded = 0;
@@ -4698,11 +4698,11 @@
 /**************************************************************************
  * 				waveInUnprepareHeader	[WINMM.@]
  */
-UINT WINAPI waveInUnprepareHeader(HWAVEIN hWaveIn, WAVEHDR* lpWaveInHdr, 
+UINT WINAPI waveInUnprepareHeader(HWAVEIN hWaveIn, WAVEHDR* lpWaveInHdr,
 				  UINT uSize)
 {
     LPWINE_MLD		wmld;
-    
+
     TRACE("(%04X, %p, %u);\n", hWaveIn, lpWaveInHdr, uSize);
 
     if (lpWaveInHdr == NULL) return MMSYSERR_INVALPARAM;
@@ -4710,7 +4710,7 @@
 	return MMSYSERR_NOERROR;
     }
 
-    if ((wmld = MMDRV_Get(hWaveIn, MMDRV_WAVEIN, FALSE)) == NULL) 
+    if ((wmld = MMDRV_Get(hWaveIn, MMDRV_WAVEIN, FALSE)) == NULL)
 	return MMSYSERR_INVALHANDLE;
 
     return MMDRV_Message(wmld, WIDM_UNPREPARE, (DWORD)lpWaveInHdr, uSize, TRUE);
@@ -4719,13 +4719,13 @@
 /**************************************************************************
  * 				waveInUnprepareHeader	[MMSYSTEM.507]
  */
-UINT16 WINAPI waveInUnprepareHeader16(HWAVEIN16 hWaveIn,       /* [in] */  
+UINT16 WINAPI waveInUnprepareHeader16(HWAVEIN16 hWaveIn,       /* [in] */
 				      SEGPTR lpsegWaveInHdr,   /* [???] */
 				      UINT16 uSize)            /* [in] */
 {
     LPWINE_MLD		wmld;
     LPWAVEHDR		lpWaveInHdr = MapSL(lpsegWaveInHdr);
-    
+
     TRACE("(%04X, %08lx, %u);\n", hWaveIn, lpsegWaveInHdr, uSize);
 
     if (lpWaveInHdr == NULL) return MMSYSERR_INVALPARAM;
@@ -4734,7 +4734,7 @@
 	return MMSYSERR_NOERROR;
     }
 
-    if ((wmld = MMDRV_Get(hWaveIn, MMDRV_WAVEIN, FALSE)) == NULL) 
+    if ((wmld = MMDRV_Get(hWaveIn, MMDRV_WAVEIN, FALSE)) == NULL)
 	return MMSYSERR_INVALHANDLE;
 
     return MMDRV_Message(wmld, WIDM_UNPREPARE, (DWORD)lpsegWaveInHdr, uSize, FALSE);
@@ -4747,11 +4747,11 @@
 			    WAVEHDR* lpWaveInHdr, UINT uSize)
 {
     LPWINE_MLD		wmld;
-    
+
     TRACE("(%04X, %p, %u);\n", hWaveIn, lpWaveInHdr, uSize);
 
     if (lpWaveInHdr == NULL) return MMSYSERR_INVALPARAM;
-    if ((wmld = MMDRV_Get(hWaveIn, MMDRV_WAVEIN, FALSE)) == NULL) 
+    if ((wmld = MMDRV_Get(hWaveIn, MMDRV_WAVEIN, FALSE)) == NULL)
 	return MMSYSERR_INVALHANDLE;
 
     return MMDRV_Message(wmld, WIDM_ADDBUFFER, (DWORD)lpWaveInHdr, uSize, TRUE);
@@ -4765,11 +4765,11 @@
 				UINT16 uSize)            /* [in] */
 {
     LPWINE_MLD		wmld;
-    
+
     TRACE("(%04X, %p, %u);\n", hWaveIn, lpsegWaveInHdr, uSize);
 
     if (lpsegWaveInHdr == NULL) return MMSYSERR_INVALPARAM;
-    if ((wmld = MMDRV_Get(hWaveIn, MMDRV_WAVEIN, FALSE)) == NULL) 
+    if ((wmld = MMDRV_Get(hWaveIn, MMDRV_WAVEIN, FALSE)) == NULL)
 	return MMSYSERR_INVALHANDLE;
 
     return MMDRV_Message(wmld, WIDM_ADDBUFFER, (DWORD)lpsegWaveInHdr, uSize, FALSE);
@@ -4872,7 +4872,7 @@
 
     TRACE("(%04X, %p, %u);\n", hWaveIn, lpTime, uSize);
 
-    if ((wmld = MMDRV_Get(hWaveIn, MMDRV_WAVEIN, FALSE)) == NULL) 
+    if ((wmld = MMDRV_Get(hWaveIn, MMDRV_WAVEIN, FALSE)) == NULL)
 	return MMSYSERR_INVALHANDLE;
 
     return MMDRV_Message(wmld, WIDM_GETPOS, (DWORD)lpTime, uSize, TRUE);
@@ -4904,7 +4904,7 @@
 
     if (lpuDeviceID == NULL) return MMSYSERR_INVALHANDLE;
 
-    if ((wmld = MMDRV_Get(hWaveIn, MMDRV_WAVEIN, FALSE)) == NULL) 
+    if ((wmld = MMDRV_Get(hWaveIn, MMDRV_WAVEIN, FALSE)) == NULL)
 	return MMSYSERR_INVALHANDLE;
 
     *lpuDeviceID = wmld->uDeviceID;
@@ -4922,7 +4922,7 @@
 
     if (lpuDeviceID == NULL) return MMSYSERR_INVALHANDLE;
 
-    if ((wmld = MMDRV_Get(hWaveIn, MMDRV_WAVEIN, FALSE)) == NULL) 
+    if ((wmld = MMDRV_Get(hWaveIn, MMDRV_WAVEIN, FALSE)) == NULL)
 	return MMSYSERR_INVALHANDLE;
 
     *lpuDeviceID = wmld->uDeviceID;
@@ -4936,14 +4936,14 @@
 			   DWORD dwParam1, DWORD dwParam2)
 {
     LPWINE_MLD		wmld;
-    
+
     TRACE("(%04x, %u, %ld, %ld)\n", hWaveIn, uMessage, dwParam1, dwParam2);
 
     /* from M$ KB */
     if (uMessage < DRVM_IOCTL || (uMessage >= DRVM_IOCTL_LAST && uMessage < DRVM_MAPPER))
 	return MMSYSERR_INVALPARAM;
 
-    if ((wmld = MMDRV_Get(hWaveIn, MMDRV_WAVEIN, FALSE)) == NULL) 
+    if ((wmld = MMDRV_Get(hWaveIn, MMDRV_WAVEIN, FALSE)) == NULL)
 	return MMSYSERR_INVALHANDLE;
 
     return MMDRV_Message(wmld, uMessage, dwParam1, dwParam2, TRUE);
@@ -4963,7 +4963,7 @@
     if (uMessage < DRVM_IOCTL || (uMessage >= DRVM_IOCTL_LAST && uMessage < DRVM_MAPPER))
 	return MMSYSERR_INVALPARAM;
 
-    if ((wmld = MMDRV_Get(hWaveIn, MMDRV_WAVEIN, FALSE)) == NULL) 
+    if ((wmld = MMDRV_Get(hWaveIn, MMDRV_WAVEIN, FALSE)) == NULL)
 	return MMSYSERR_INVALHANDLE;
 
     return MMDRV_Message(wmld, uMessage, dwParam1, dwParam2, TRUE);
@@ -5004,7 +5004,7 @@
     lp.cmdLine = MapLS(cmdline);
     lp.showCmd = MapLS(&showCmd);
     lp.reserved = 0;
-    
+
 #ifndef USE_MM_TSK_WINE
     handle = LoadModule16("c:\\windows\\system\\mmtask.tsk", &lp);
 #else
@@ -5074,7 +5074,7 @@
 /**************************************************************************
  * 				mmTaskSignal		[MMSYSTEM.903]
  */
-LRESULT	WINAPI mmTaskSignal16(HTASK16 ht) 
+LRESULT	WINAPI mmTaskSignal16(HTASK16 ht)
 {
     TRACE("(%04x);\n", ht);
     return PostAppMessage16(ht, WM_USER, 0, 0);
@@ -5106,12 +5106,12 @@
  * 				mmThreadCreate		[MMSYSTEM.1120]
  *
  * undocumented
- * Creates a MM thread, calling fpThreadAddr(dwPmt). 
- * dwFlags: 
+ * Creates a MM thread, calling fpThreadAddr(dwPmt).
+ * dwFlags:
  * 	bit.0 set means create a 16 bit task instead of thread calling a 16 bit proc
- *	bit.1 set means to open a VxD for this thread (unsupported) 
+ *	bit.1 set means to open a VxD for this thread (unsupported)
  */
-LRESULT	WINAPI mmThreadCreate16(FARPROC16 fpThreadAddr, LPHANDLE lpHndl, DWORD dwPmt, DWORD dwFlags) 
+LRESULT	WINAPI mmThreadCreate16(FARPROC16 fpThreadAddr, LPHANDLE lpHndl, DWORD dwPmt, DWORD dwFlags)
 {
     HANDLE16		hndl;
     LRESULT		ret;
@@ -5127,7 +5127,7 @@
 
 #if 0
 	/* force mmtask routines even if mmthread is required */
-	/* this will work only if the patch about binary cmd line and NE tasks 
+	/* this will work only if the patch about binary cmd line and NE tasks
 	 * is committed
 	 */
 	dwFlags |= 1;
@@ -5145,20 +5145,20 @@
 	lpMMThd->dwStatus    	= 0;
 	lpMMThd->dwFlags     	= dwFlags;
 	lpMMThd->hTask       	= 0;
-	
+
 	if ((dwFlags & 1) == 0 && (GetProcessFlags(GetCurrentThreadId()) & 8) == 0) {
 	    lpMMThd->hEvent = CreateEventA(0, 0, 1, 0);
 
 	    TRACE("Let's go crazy... trying new MM thread. lpMMThd=%p\n", lpMMThd);
 	    if (lpMMThd->dwFlags & 2) {
-		/* as long as we don't support MM VxD in wine, we don't need 
+		/* as long as we don't support MM VxD in wine, we don't need
 		 * to care about this flag
 		 */
 		/* FIXME("Don't know how to properly open VxD handles\n"); */
 		/* lpMMThd->hVxD = OpenVxDHandle(lpMMThd->hEvent); */
 	    }
 
-	    lpMMThd->hThread = CreateThread(0, 0, (LPTHREAD_START_ROUTINE)WINE_mmThreadEntryPoint, 
+	    lpMMThd->hThread = CreateThread(0, 0, (LPTHREAD_START_ROUTINE)WINE_mmThreadEntryPoint,
 					    (LPVOID)(DWORD)hndl, CREATE_SUSPENDED, &lpMMThd->dwThreadID);
 	    if (lpMMThd->hThread == 0) {
 		WARN("Couldn't create thread\n");
@@ -5171,7 +5171,7 @@
 		ret = 0;
 	    }
 	} else {
-	    /* get WINE_mmThreadEntryPoint() 
+	    /* get WINE_mmThreadEntryPoint()
 	     * 2047 is its ordinal in mmsystem.spec
 	     */
 	    FARPROC16	fp = GetProcAddress16(GetModuleHandle16("MMSYSTEM"), (LPCSTR)2047);
@@ -5206,7 +5206,7 @@
 /**************************************************************************
  * 				mmThreadSignal		[MMSYSTEM.1121]
  */
-void WINAPI mmThreadSignal16(HANDLE16 hndl) 
+void WINAPI mmThreadSignal16(HANDLE16 hndl)
 {
     TRACE("(%04x)!\n", hndl);
 
@@ -5240,9 +5240,9 @@
 	if (InterlockedDecrement(&lpMMThd->dwSignalCount) >= 0)
 	    break;
 	InterlockedIncrement(&lpMMThd->dwSignalCount);
-	
+
 	TRACE("S1\n");
-	
+
 	ret = MsgWaitForMultipleObjects(1, &lpMMThd->hEvent, FALSE, INFINITE, QS_ALLINPUT);
 	switch (ret) {
 	case WAIT_OBJECT_0:	/* Event */
@@ -5265,16 +5265,16 @@
 /**************************************************************************
  * 				mmThreadBlock		[MMSYSTEM.1122]
  */
-void	WINAPI mmThreadBlock16(HANDLE16 hndl) 
+void	WINAPI mmThreadBlock16(HANDLE16 hndl)
 {
     TRACE("(%04x)!\n", hndl);
 
     if (hndl) {
 	WINE_MMTHREAD*	lpMMThd = MapSL( MAKESEGPTR(hndl, 0) );
-	
+
 	if (lpMMThd->hThread != 0) {
 	    DWORD	lc;
-	    
+
 	    ReleaseThunkLock(&lc);
 	    MMSYSTEM_ThreadBlock(lpMMThd);
 	    RestoreThunkLock(lc);
@@ -5288,7 +5288,7 @@
 /**************************************************************************
  * 				mmThreadIsCurrent	[MMSYSTEM.1123]
  */
-BOOL16	WINAPI mmThreadIsCurrent16(HANDLE16 hndl) 
+BOOL16	WINAPI mmThreadIsCurrent16(HANDLE16 hndl)
 {
     BOOL16		ret = FALSE;
 
@@ -5337,7 +5337,7 @@
 /**************************************************************************
  * 				mmThreadGetTask		[MMSYSTEM.1125]
  */
-HANDLE16 WINAPI mmThreadGetTask16(HANDLE16 hndl) 
+HANDLE16 WINAPI mmThreadGetTask16(HANDLE16 hndl)
 {
     HANDLE16	ret = 0;
 
@@ -5394,7 +5394,7 @@
 /**************************************************************************
  * 			mmShowMMCPLPropertySheet	[MMSYSTEM.1150]
  */
-BOOL16	WINAPI	mmShowMMCPLPropertySheet16(HWND hWnd, LPCSTR lpStrDevice, 
+BOOL16	WINAPI	mmShowMMCPLPropertySheet16(HWND hWnd, LPCSTR lpStrDevice,
 					   LPCSTR lpStrTab, LPCSTR lpStrTitle)
 {
     HANDLE	hndl;
@@ -5413,7 +5413,7 @@
 	}
 	FreeLibrary(hndl);
     }
-    
+
     return ret;
 }
 
diff --git a/dlls/winmm/sound16.c b/dlls/winmm/sound16.c
index 1ad1f5e..bf1755c 100644
--- a/dlls/winmm/sound16.c
+++ b/dlls/winmm/sound16.c
@@ -67,7 +67,7 @@
 INT16 WINAPI SetVoiceAccent16(INT16 nVoice, INT16 nTempo, INT16 nVolume,
                               INT16 nMode, INT16 nPitch)
 {
-  FIXME("(%d,%d,%d,%d,%d): stub\n", nVoice, nTempo, 
+  FIXME("(%d,%d,%d,%d,%d): stub\n", nVoice, nTempo,
 	nVolume, nMode, nPitch);
   return 0;
 }
diff --git a/dlls/winmm/time.c b/dlls/winmm/time.c
index ca76c7f..192140e 100644
--- a/dlls/winmm/time.c
+++ b/dlls/winmm/time.c
@@ -59,11 +59,11 @@
 {
     TRACE("before CallBack => lpFunc=%p wTimerID=%04X dwUser=%08lX !\n",
 	  lpTimer->lpFunc, lpTimer->wTimerID, lpTimer->dwUser);
-	
-    /* - TimeProc callback that is called here is something strange, under Windows 3.1x it is called 
+
+    /* - TimeProc callback that is called here is something strange, under Windows 3.1x it is called
      * 		during interrupt time,  is allowed to execute very limited number of API calls (like
-     *	    	PostMessage), and must reside in DLL (therefore uses stack of active application). So I 
-     *       guess current implementation via SetTimer has to be improved upon.		
+     *	    	PostMessage), and must reside in DLL (therefore uses stack of active application). So I
+     *       guess current implementation via SetTimer has to be improved upon.
      */
     switch (lpTimer->wFlags & 0x30) {
     case TIME_CALLBACK_FUNCTION:
@@ -80,7 +80,7 @@
 	PulseEvent((HANDLE)lpTimer->lpFunc);
 	break;
     default:
-	FIXME("Unknown callback type 0x%04x for mmtime callback (%p), ignored.\n", 
+	FIXME("Unknown callback type 0x%04x for mmtime callback (%p), ignored.\n",
 	      lpTimer->wFlags, lpTimer->lpFunc);
 	break;
     }
@@ -101,23 +101,23 @@
     while (delta >= MMSYSTIME_MININTERVAL) {
 	delta -= MMSYSTIME_MININTERVAL;
 	iData->mmSysTimeMS += MMSYSTIME_MININTERVAL;
-	
+
 	/* since timeSetEvent() and timeKillEvent() can be called
 	 * from 16 bit code, there are cases where win16 lock is
-	 * locked upon entering timeSetEvent(), and then the mm timer 
+	 * locked upon entering timeSetEvent(), and then the mm timer
 	 * critical section is locked. This function cannot call the
 	 * timer callback with the crit sect locked (because callback
 	 * may need to acquire Win16 lock, thus providing a deadlock
 	 * situation).
 	 * To cope with that, we just copy the WINE_TIMERENTRY struct
 	 * that need to trigger the callback, and call it without the
-	 * mm timer crit sect locked. The bad side of this 
+	 * mm timer crit sect locked. The bad side of this
 	 * implementation is that, in some cases, the callback may be
 	 * invoked *after* a timer has been destroyed...
 	 * EPP 99/07/13
 	 */
 	idx = 0;
-	
+
 	EnterCriticalSection(&iData->cs);
 	for (lpTimer = iData->lpTimerList; lpTimer != NULL; ) {
 	    lpNextTimer = lpTimer->lpNext;
@@ -129,8 +129,8 @@
 		if (lpTimer->lpFunc) {
 		    if (idx == iData->nSizeLpTimers) {
 			iData->lpTimers = (LPWINE_TIMERENTRY)
-			    HeapReAlloc(GetProcessHeap(), 0, 
-					iData->lpTimers, 
+			    HeapReAlloc(GetProcessHeap(), 0,
+					iData->lpTimers,
 					++iData->nSizeLpTimers * sizeof(WINE_TIMERENTRY));
 		    }
 		    iData->lpTimers[idx++] = *lpTimer;
@@ -144,7 +144,7 @@
 	    lpTimer = lpNextTimer;
 	}
 	LeaveCriticalSection(&iData->cs);
-	
+
 	while (idx > 0) {
 	    TIME_TriggerCallBack(&iData->lpTimers[--idx]);
 	}
@@ -283,7 +283,7 @@
     for (lpTimer = iData->lpTimerList; lpTimer != NULL; lpTimer = lpTimer->lpNext) {
 	wNewID = max(wNewID, lpTimer->wTimerID);
     }
-    
+
     lpNewTimer->lpNext = iData->lpTimerList;
     iData->lpTimerList = lpNewTimer;
     lpNewTimer->wTimerID = wNewID + 1;
@@ -304,20 +304,20 @@
     if (wFlags & WINE_TIMER_IS32)
 	WARN("Unknown windows flag... wine internally used.. ooch\n");
 
-    return timeSetEventInternal(wDelay, wResol, (FARPROC16)lpFunc, 
+    return timeSetEventInternal(wDelay, wResol, (FARPROC16)lpFunc,
 				dwUser, wFlags|WINE_TIMER_IS32);
 }
 
 /**************************************************************************
  * 				timeSetEvent		[MMSYSTEM.602]
  */
-MMRESULT16 WINAPI timeSetEvent16(UINT16 wDelay, UINT16 wResol, LPTIMECALLBACK16 lpFunc, 
+MMRESULT16 WINAPI timeSetEvent16(UINT16 wDelay, UINT16 wResol, LPTIMECALLBACK16 lpFunc,
 				 DWORD dwUser, UINT16 wFlags)
 {
     if (wFlags & WINE_TIMER_IS32)
 	WARN("Unknown windows flag... wine internally used.. ooch\n");
 
-    return timeSetEventInternal(wDelay, wResol, (FARPROC16)lpFunc, 
+    return timeSetEventInternal(wDelay, wResol, (FARPROC16)lpFunc,
 				dwUser, wFlags & ~WINE_TIMER_IS32);
 }
 
@@ -339,7 +339,7 @@
 	}
     }
     LeaveCriticalSection(&iData->cs);
-    
+
     if (*lpTimer) {
 	LPWINE_TIMERENTRY	lpTemp = *lpTimer;
 
@@ -393,7 +393,7 @@
 {
     TRACE("(%u) !\n", wPeriod);
 
-    if (wPeriod < MMSYSTIME_MININTERVAL || wPeriod > MMSYSTIME_MAXINTERVAL) 
+    if (wPeriod < MMSYSTIME_MININTERVAL || wPeriod > MMSYSTIME_MAXINTERVAL)
 	return TIMERR_NOCANDO;
     return 0;
 }
@@ -405,7 +405,7 @@
 {
     TRACE("(%u) !\n", wPeriod);
 
-    if (wPeriod < MMSYSTIME_MININTERVAL || wPeriod > MMSYSTIME_MAXINTERVAL) 
+    if (wPeriod < MMSYSTIME_MININTERVAL || wPeriod > MMSYSTIME_MAXINTERVAL)
 	return TIMERR_NOCANDO;
     return 0;
 }
@@ -417,7 +417,7 @@
 {
     TRACE("(%u) !\n", wPeriod);
 
-    if (wPeriod < MMSYSTIME_MININTERVAL || wPeriod > MMSYSTIME_MAXINTERVAL) 
+    if (wPeriod < MMSYSTIME_MININTERVAL || wPeriod > MMSYSTIME_MAXINTERVAL)
 	return TIMERR_NOCANDO;
     return 0;
 }
@@ -429,7 +429,7 @@
 {
     TRACE("(%u) !\n", wPeriod);
 
-    if (wPeriod < MMSYSTIME_MININTERVAL || wPeriod > MMSYSTIME_MAXINTERVAL) 
+    if (wPeriod < MMSYSTIME_MININTERVAL || wPeriod > MMSYSTIME_MAXINTERVAL)
 	return TIMERR_NOCANDO;
     return 0;
 }
diff --git a/dlls/winmm/wavemap/wavemap.c b/dlls/winmm/wavemap/wavemap.c
index 9b1e6df..a30c608 100644
--- a/dlls/winmm/wavemap/wavemap.c
+++ b/dlls/winmm/wavemap/wavemap.c
@@ -1,5 +1,5 @@
 /* -*- tab-width: 8; c-basic-offset: 4 -*- */
-/*				   
+/*
  * Wine Wave mapper driver
  *
  * Copyright 	1999,2001 Eric Pouech
@@ -59,7 +59,7 @@
  *                  WAVE OUT part                                       *
  *======================================================================*/
 
-static void	CALLBACK wodCallback(HWAVE hWave, UINT uMsg, DWORD dwInstance, 
+static void	CALLBACK wodCallback(HWAVE hWave, UINT uMsg, DWORD dwInstance,
 				     DWORD dwParam1, DWORD dwParam2)
 {
     WAVEMAPDATA*	wom = (WAVEMAPDATA*)dwInstance;
@@ -71,7 +71,7 @@
 	return;
     }
 
-    if (hWave != wom->hInnerWave && uMsg != WOM_OPEN) 
+    if (hWave != wom->hInnerWave && uMsg != WOM_OPEN)
 	ERR("Shouldn't happen (%08x %08x)\n", hWave, wom->hInnerWave);
 
     switch (uMsg) {
@@ -94,12 +94,12 @@
 	ERR("Unknown msg %u\n", uMsg);
     }
 
-    DriverCallback(wom->dwCallback, HIWORD(wom->dwFlags), wom->hOuterWave, uMsg, 
+    DriverCallback(wom->dwCallback, HIWORD(wom->dwFlags), wom->hOuterWave, uMsg,
 		   wom->dwClientInstance, dwParam1, dwParam2);
 }
 
-static	DWORD	wodOpenHelper(WAVEMAPDATA* wom, UINT idx, 
-			      LPWAVEOPENDESC lpDesc, LPWAVEFORMATEX lpwfx, 
+static	DWORD	wodOpenHelper(WAVEMAPDATA* wom, UINT idx,
+			      LPWAVEOPENDESC lpDesc, LPWAVEFORMATEX lpwfx,
 			      DWORD dwFlags)
 {
     DWORD	ret;
@@ -113,7 +113,7 @@
 	ret = acmStreamOpen(&wom->hAcmStream, 0, lpDesc->lpFormat, lpwfx, NULL, 0L, 0L, 0L);
     }
     if (ret == MMSYSERR_NOERROR) {
-	ret = waveOutOpen(&wom->hInnerWave, idx, lpwfx, (DWORD)wodCallback, 
+	ret = waveOutOpen(&wom->hInnerWave, idx, lpwfx, (DWORD)wodCallback,
 			  (DWORD)wom, (dwFlags & ~CALLBACK_TYPEMASK) | CALLBACK_FUNCTION);
 	if (ret != MMSYSERR_NOERROR && !(dwFlags & WAVE_FORMAT_QUERY)) {
 	    acmStreamClose(wom->hAcmStream, 0);
@@ -154,7 +154,7 @@
 	/* if no ACM stuff is involved, no need to handle callbacks at this
 	 * level, this will be done transparently
 	 */
-	if (waveOutOpen(&wom->hInnerWave, i, lpDesc->lpFormat, (DWORD)wodCallback, 
+	if (waveOutOpen(&wom->hInnerWave, i, lpDesc->lpFormat, (DWORD)wodCallback,
 			(DWORD)wom, (dwFlags & ~CALLBACK_TYPEMASK) | CALLBACK_FUNCTION) == MMSYSERR_NOERROR) {
 	    wom->hAcmStream = 0;
 	    goto found;
@@ -176,7 +176,7 @@
 	TRY(11025, 16);
 
 	/* 2^3 => 1, 1^3 => 2, so if stereo, try mono (and the other way around) */
-	wfx.nChannels ^= 3; 
+	wfx.nChannels ^= 3;
 	TRY(44100, 16);
 	TRY(22050, 16);
 	TRY(11025, 16);
@@ -188,13 +188,13 @@
 	TRY(11025, 8);
 
 	/* 2^3 => 1, 1^3 => 2, so if stereo, try mono (and the other way around) */
-	wfx.nChannels ^= 3; 
+	wfx.nChannels ^= 3;
 	TRY(44100, 8);
 	TRY(22050, 8);
 	TRY(11025, 8);
     }
 #undef TRY
-		      
+
     HeapFree(GetProcessHeap(), 0, wom);
     return MMSYSERR_ALLOCATED;
 found:
@@ -230,14 +230,14 @@
     if (!wom->hAcmStream) {
 	return waveOutWrite(wom->hInnerWave, lpWaveHdrSrc, dwParam2);
     }
-    
+
     lpWaveHdrSrc->dwFlags |= WHDR_INQUEUE;
     ash = (PACMSTREAMHEADER)lpWaveHdrSrc->reserved;
     /* acmStreamConvert will actually check that the new size is less than initial size */
     ash->cbSrcLength = lpWaveHdrSrc->dwBufferLength;
     if (acmStreamConvert(wom->hAcmStream, ash, 0L) != MMSYSERR_NOERROR)
 	return MMSYSERR_ERROR;
-    
+
     lpWaveHdrDst = (LPWAVEHDR)((LPSTR)ash + sizeof(ACMSTREAMHEADER));
     if (ash->cbDstLengthUsed == 0)
     {
@@ -311,12 +311,12 @@
     }
     ash = (PACMSTREAMHEADER)lpWaveHdrSrc->reserved;
     dwRet1 = acmStreamUnprepareHeader(wom->hAcmStream, ash, 0L);
-    
+
     lpWaveHdrDst = (LPWAVEHDR)((LPSTR)ash + sizeof(ACMSTREAMHEADER));
     dwRet2 = waveOutUnprepareHeader(wom->hInnerWave, lpWaveHdrDst, sizeof(*lpWaveHdrDst));
 
     HeapFree(GetProcessHeap(), 0, ash);
-    
+
     lpWaveHdrSrc->dwFlags &= ~WHDR_PREPARED;
     return (dwRet1 == MMSYSERR_NOERROR) ? dwRet2 : dwRet1;
 }
@@ -339,7 +339,7 @@
 	lpWaveCaps->wPid = 0x0001;
 	lpWaveCaps->vDriverVersion = 0x0100;
 	strcpy(lpWaveCaps->szPname, "Wine wave out mapper");
-	lpWaveCaps->dwFormats = 
+	lpWaveCaps->dwFormats =
 	    WAVE_FORMAT_4M08 | WAVE_FORMAT_4S08 | WAVE_FORMAT_4M16 | WAVE_FORMAT_4S16 |
 	    WAVE_FORMAT_2M08 | WAVE_FORMAT_2S08 | WAVE_FORMAT_2M16 | WAVE_FORMAT_2S16 |
 	    WAVE_FORMAT_1M08 | WAVE_FORMAT_1S08 | WAVE_FORMAT_1M16 | WAVE_FORMAT_1S16;
@@ -349,7 +349,7 @@
 	return MMSYSERR_NOERROR;
     }
     ERR("This shouldn't happen\n");
-    return MMSYSERR_ERROR; 
+    return MMSYSERR_ERROR;
 }
 
 static	DWORD	wodGetVolume(UINT wDevID, WAVEMAPDATA* wom, LPDWORD lpVol)
@@ -392,13 +392,13 @@
     DWORD	ret = MMSYSERR_NOTSUPPORTED;
 
     switch (flags) {
-    case WAVEOUT_MAPPER_STATUS_DEVICE:	
+    case WAVEOUT_MAPPER_STATUS_DEVICE:
 	ret = waveOutGetID(wom->hInnerWave, &id);
 	*(LPDWORD)ptr = id;
 	break;
     case WAVEOUT_MAPPER_STATUS_MAPPED:
 	FIXME("Unsupported flag=%ld\n", flags);
-	*(LPDWORD)ptr = 0; /* FIXME ?? */	
+	*(LPDWORD)ptr = 0; /* FIXME ?? */
 	break;
     case WAVEOUT_MAPPER_STATUS_FORMAT:
 	FIXME("Unsupported flag=%ld\n", flags);
@@ -416,12 +416,12 @@
 /**************************************************************************
  * 				wodMessage (MSACMMAP.@)
  */
-DWORD WINAPI WAVEMAP_wodMessage(UINT wDevID, UINT wMsg, DWORD dwUser, 
+DWORD WINAPI WAVEMAP_wodMessage(UINT wDevID, UINT wMsg, DWORD dwUser,
 				DWORD dwParam1, DWORD dwParam2)
 {
     TRACE("(%u, %04X, %08lX, %08lX, %08lX);\n",
 	  wDevID, wMsg, dwUser, dwParam1, dwParam2);
-    
+
     switch (wMsg) {
     case DRVM_INIT:
     case DRVM_EXIT:
@@ -458,7 +458,7 @@
  *                  WAVE IN part                                        *
  *======================================================================*/
 
-static void	CALLBACK widCallback(HWAVE hWave, UINT uMsg, DWORD dwInstance, 
+static void	CALLBACK widCallback(HWAVE hWave, UINT uMsg, DWORD dwInstance,
 				     DWORD dwParam1, DWORD dwParam2)
 {
     WAVEMAPDATA*	wim = (WAVEMAPDATA*)dwInstance;
@@ -470,7 +470,7 @@
 	return;
     }
 
-    if (hWave != wim->hInnerWave && uMsg != WIM_OPEN) 
+    if (hWave != wim->hInnerWave && uMsg != WIM_OPEN)
 	ERR("Shouldn't happen (%08x %08x)\n", hWave, wim->hInnerWave);
 
     switch (uMsg) {
@@ -502,12 +502,12 @@
 	ERR("Unknown msg %u\n", uMsg);
     }
 
-    DriverCallback(wim->dwCallback, HIWORD(wim->dwFlags), wim->hOuterWave, uMsg, 
+    DriverCallback(wim->dwCallback, HIWORD(wim->dwFlags), wim->hOuterWave, uMsg,
 		   wim->dwClientInstance, dwParam1, dwParam2);
 }
 
-static	DWORD	widOpenHelper(WAVEMAPDATA* wim, UINT idx, 
-			      LPWAVEOPENDESC lpDesc, LPWAVEFORMATEX lpwfx, 
+static	DWORD	widOpenHelper(WAVEMAPDATA* wim, UINT idx,
+			      LPWAVEOPENDESC lpDesc, LPWAVEFORMATEX lpwfx,
 			      DWORD dwFlags)
 {
     DWORD	ret;
@@ -521,7 +521,7 @@
 	ret = acmStreamOpen(&wim->hAcmStream, 0, lpwfx, lpDesc->lpFormat, NULL, 0L, 0L, 0L);
     }
     if (ret == MMSYSERR_NOERROR) {
-	ret = waveInOpen(&wim->hInnerWave, idx, lpwfx, (DWORD)widCallback, 
+	ret = waveInOpen(&wim->hInnerWave, idx, lpwfx, (DWORD)widCallback,
 			 (DWORD)wim, (dwFlags & ~CALLBACK_TYPEMASK) | CALLBACK_FUNCTION);
 	if (ret != MMSYSERR_NOERROR && !(dwFlags & WAVE_FORMAT_QUERY)) {
 	    acmStreamClose(wim->hAcmStream, 0);
@@ -548,7 +548,7 @@
     wim->dwFlags = dwFlags;
     wim->dwClientInstance = lpDesc->dwInstance;
     wim->hOuterWave = lpDesc->hWave;
-    
+
     ndhi = waveOutGetNumDevs();
     if (dwFlags & WAVE_MAPPED) {
 	if (lpDesc->uMappedDeviceID >= ndhi) return MMSYSERR_INVALPARAM;
@@ -560,7 +560,7 @@
     }
 
     for (i = ndlo; i < ndhi; i++) {
-	if (waveInOpen(&wim->hInnerWave, i, lpDesc->lpFormat, (DWORD)widCallback, 
+	if (waveInOpen(&wim->hInnerWave, i, lpDesc->lpFormat, (DWORD)widCallback,
 			(DWORD)wim, (dwFlags & ~CALLBACK_TYPEMASK) | CALLBACK_FUNCTION) == MMSYSERR_NOERROR) {
 	    wim->hAcmStream = 0;
 	    goto found;
@@ -581,7 +581,7 @@
 	TRY(11025, 8);
 
 	/* 2^3 => 1, 1^3 => 2, so if stereo, try mono (and the other way around) */
-	wfx.nChannels ^= 3; 
+	wfx.nChannels ^= 3;
 	TRY(44100, 8);
 	TRY(22050, 8);
 	TRY(11025, 8);
@@ -627,7 +627,7 @@
 
     lpWaveHdrDst->dwFlags |= WHDR_INQUEUE;
     ash = (PACMSTREAMHEADER)lpWaveHdrDst->reserved;
-    
+
     lpWaveHdrSrc = (LPWAVEHDR)((LPSTR)ash + sizeof(ACMSTREAMHEADER));
     return waveInAddBuffer(wim->hInnerWave, lpWaveHdrSrc, sizeof(*lpWaveHdrSrc));
 }
@@ -642,7 +642,7 @@
     if (!wim->hAcmStream) {
 	return waveInPrepareHeader(wim->hInnerWave, lpWaveHdrDst, dwParam2);
     }
-    if (acmStreamSize(wim->hAcmStream, lpWaveHdrDst->dwBufferLength, &size, 
+    if (acmStreamSize(wim->hAcmStream, lpWaveHdrDst->dwBufferLength, &size,
 		      ACM_STREAMSIZEF_DESTINATION) != MMSYSERR_NOERROR)
 	return MMSYSERR_ERROR;
 
@@ -695,12 +695,12 @@
     }
     ash = (PACMSTREAMHEADER)lpWaveHdrDst->reserved;
     dwRet1 = acmStreamUnprepareHeader(wim->hAcmStream, ash, 0L);
-    
+
     lpWaveHdrSrc = (LPWAVEHDR)((LPSTR)ash + sizeof(ACMSTREAMHEADER));
     dwRet2 = waveInUnprepareHeader(wim->hInnerWave, lpWaveHdrSrc, sizeof(*lpWaveHdrSrc));
 
     HeapFree(GetProcessHeap(), 0, ash);
-    
+
     lpWaveHdrDst->dwFlags &= ~WHDR_PREPARED;
     return (dwRet1 == MMSYSERR_NOERROR) ? dwRet2 : dwRet1;
 }
@@ -723,15 +723,15 @@
 	lpWaveCaps->wPid = 0x0001;
 	lpWaveCaps->vDriverVersion = 0x0001;
 	strcpy(lpWaveCaps->szPname, "Wine wave in mapper");
-	lpWaveCaps->dwFormats = 
+	lpWaveCaps->dwFormats =
 	    WAVE_FORMAT_4M08 | WAVE_FORMAT_4S08 | WAVE_FORMAT_4M16 | WAVE_FORMAT_4S16 |
 	    WAVE_FORMAT_2M08 | WAVE_FORMAT_2S08 | WAVE_FORMAT_2M16 | WAVE_FORMAT_2S16 |
-	    WAVE_FORMAT_1M08 | WAVE_FORMAT_1S08 | WAVE_FORMAT_1M16 | WAVE_FORMAT_1S16;    
+	    WAVE_FORMAT_1M08 | WAVE_FORMAT_1S08 | WAVE_FORMAT_1M16 | WAVE_FORMAT_1S16;
 	lpWaveCaps->wChannels = 2;
 	return MMSYSERR_NOERROR;
     }
     ERR("This shouldn't happen\n");
-    return MMSYSERR_ERROR; 
+    return MMSYSERR_ERROR;
 }
 
 static	DWORD	widStop(WAVEMAPDATA* wim)
@@ -755,18 +755,18 @@
     DWORD	ret = MMSYSERR_NOTSUPPORTED;
 
     switch (flags) {
-    case WAVEIN_MAPPER_STATUS_DEVICE:	
+    case WAVEIN_MAPPER_STATUS_DEVICE:
 	ret = waveInGetID(wim->hInnerWave, &id);
 	*(LPDWORD)ptr = id;
 	break;
     case WAVEIN_MAPPER_STATUS_MAPPED:
 	FIXME("Unsupported yet flag=%ld\n", flags);
-	*(LPDWORD)ptr = 0; /* FIXME ?? */	
+	*(LPDWORD)ptr = 0; /* FIXME ?? */
 	break;
     case WAVEIN_MAPPER_STATUS_FORMAT:
 	FIXME("Unsupported flag=%ld\n", flags);
 	/* ptr points to a WAVEFORMATEX struct  - before or after streaming ? */
-	*(LPDWORD)ptr = 0; /* FIXME ?? */	
+	*(LPDWORD)ptr = 0; /* FIXME ?? */
 	break;
     default:
 	FIXME("Unsupported flag=%ld\n", flags);
@@ -779,7 +779,7 @@
 /**************************************************************************
  * 				widMessage (MSACMMAP.@)
  */
-DWORD WINAPI WAVEMAP_widMessage(WORD wDevID, WORD wMsg, DWORD dwUser, 
+DWORD WINAPI WAVEMAP_widMessage(WORD wDevID, WORD wMsg, DWORD dwUser,
 				DWORD dwParam1, DWORD dwParam2)
 {
     TRACE("(%u, %04X, %08lX, %08lX, %08lX);\n",
@@ -819,20 +819,20 @@
 static	struct WINE_WAVEMAP* oss = NULL;
 
 /**************************************************************************
- * 				WAVEMAP_drvOpen			[internal]	
+ * 				WAVEMAP_drvOpen			[internal]
  */
 static	DWORD	WAVEMAP_drvOpen(LPSTR str)
 {
     if (oss)
 	return 0;
-    
+
     /* I know, this is ugly, but who cares... */
     oss = (struct WINE_WAVEMAP*)1;
     return 1;
 }
 
 /**************************************************************************
- * 				WAVEMAP_drvClose		[internal]	
+ * 				WAVEMAP_drvClose		[internal]
  */
 static	DWORD	WAVEMAP_drvClose(DWORD dwDevID)
 {
@@ -846,12 +846,12 @@
 /**************************************************************************
  * 				DriverProc (MSACMMAP.@)
  */
-LONG CALLBACK	WAVEMAP_DriverProc(DWORD dwDevID, HDRVR hDriv, DWORD wMsg, 
+LONG CALLBACK	WAVEMAP_DriverProc(DWORD dwDevID, HDRVR hDriv, DWORD wMsg,
 				   DWORD dwParam1, DWORD dwParam2)
 {
     TRACE("(%08lX, %04X, %08lX, %08lX, %08lX)\n",
 	  dwDevID, hDriv, wMsg, dwParam1, dwParam2);
-    
+
     switch(wMsg) {
     case DRV_LOAD:		return 1;
     case DRV_FREE:		return 1;
diff --git a/dlls/winmm/winearts/arts.c b/dlls/winmm/winearts/arts.c
index eb10352..a6625c0 100644
--- a/dlls/winmm/winearts/arts.c
+++ b/dlls/winmm/winearts/arts.c
@@ -1,5 +1,5 @@
 /* -*- tab-width: 8; c-basic-offset: 4 -*- */
-/*				   
+/*
  * Wine Driver for aRts Sound Server
  *   http://www.arts-project.org
  *
@@ -34,20 +34,20 @@
 static		int arts = 0;
 
 /**************************************************************************
- * 				ARTS_drvOpen			[internal]	
+ * 				ARTS_drvOpen			[internal]
  */
 static	DWORD	ARTS_drvOpen(LPSTR str)
 {
     if (arts)
 	return 0;
-    
+
     /* I know, this is ugly, but who cares... */
     arts = 1;
     return 1;
 }
 
 /**************************************************************************
- * 				ARTS_drvClose			[internal]	
+ * 				ARTS_drvClose			[internal]
  */
 static	DWORD	ARTS_drvClose(DWORD dwDevID)
 {
@@ -63,16 +63,16 @@
 /**************************************************************************
  * 				DriverProc (WINEARTS.@)
  */
-LONG CALLBACK	ARTS_DriverProc(DWORD dwDevID, HDRVR hDriv, DWORD wMsg, 
+LONG CALLBACK	ARTS_DriverProc(DWORD dwDevID, HDRVR hDriv, DWORD wMsg,
 			       DWORD dwParam1, DWORD dwParam2)
 {
 /* EPP     TRACE("(%08lX, %04X, %08lX, %08lX, %08lX)\n",  */
 /* EPP 	  dwDevID, hDriv, wMsg, dwParam1, dwParam2); */
-    
+
     switch(wMsg) {
 #ifdef HAVE_ARTS
     case DRV_LOAD:		ARTS_WaveInit();
-/*    				ARTS_MidiInit(); FIXME: no midi 
+/*    				ARTS_MidiInit(); FIXME: no midi
 support in artsc so we don't have any in the arts driver */
 				return 1;
     case DRV_FREE:	        return ARTS_WaveClose();
diff --git a/dlls/winmm/winearts/audio.c b/dlls/winmm/winearts/audio.c
index 0db2c8a..edac29a 100644
--- a/dlls/winmm/winearts/audio.c
+++ b/dlls/winmm/winearts/audio.c
@@ -1,5 +1,5 @@
 /* -*- tab-width: 8; c-basic-offset: 4 -*- */
-/*				   
+/*
  * Wine Driver for aRts Sound Server
  *   http://www.arts-project.org
  *
@@ -24,7 +24,7 @@
  */
 /* NOTE:
  *    with arts we cannot stop the audio that is already in
- *    the servers buffer, so to reduce delays during starting 
+ *    the servers buffer, so to reduce delays during starting
  *    and stoppping of audio streams adjust the
  *    audio buffer size in the kde control center or in the
  *    artsd startup script
@@ -105,7 +105,7 @@
     HANDLE	                hEvent;	/* if message is synchronous, handle of event for synchro */
 } RING_MSG;
 
-/* implement an in-process message ring for better performance 
+/* implement an in-process message ring for better performance
  * (compared to passing thru the server)
  * this ring will be used by the input (resp output) record (resp playback) routine
  */
@@ -142,7 +142,7 @@
 
     LPWAVEHDR			lpLoopPtr;              /* pointer of first buffer in loop, if any */
     DWORD			dwLoops;		/* private copy of loop counter */
-    
+
     DWORD			dwPlayedTotal;		/* number of bytes actually played since opening */
     DWORD                       dwWrittenTotal;         /* number of bytes written to the audio device since opening */
 
@@ -156,7 +156,7 @@
 static WINE_WAVEOUT	WOutDev   [MAX_WAVEOUTDRV];
 
 static DWORD wodDsCreate(UINT wDevID, PIDSDRIVER* drv);
- 
+
 /* These strings used only for tracing */
 static const char *wodPlayerCmdString[] = {
     "WINE_WM_PAUSING",
@@ -186,7 +186,7 @@
 */
 
   if (right == -1) right = left;
-                 
+
   for(i = 0; i < length; i+=(nChannels))
   {
     v = (int) ((*(d_in++) * left) / 100);
@@ -210,9 +210,9 @@
 /*
   TRACE("length == %d, nChannels == %d\n", length, nChannels);
 */
-                        
+
   if (right == -1) right = left;
-                 
+
   for(i = 0; i < length; i+=(nChannels))
   {
     v = (char) ((*(d_in++) * left) / 100);
@@ -256,7 +256,7 @@
 {
     int iDevice;
 
-    /* close all open devices */   
+    /* close all open devices */
     for(iDevice = 0; iDevice < MAX_WAVEOUTDRV; iDevice++)
     {
       if(WOutDev[iDevice].play_stream != (arts_stream_t*)-1)
@@ -280,7 +280,7 @@
     int		errorcode;
 
     TRACE("called\n");
-    
+
     if ((errorcode = ARTS_Init()) < 0)
     {
 	ERR("arts_init() failed (%d)\n", errorcode);
@@ -294,7 +294,7 @@
 	memset(&WOutDev[i].caps, 0, sizeof(WOutDev[i].caps)); /* zero out
 							caps values */
     /* FIXME: some programs compare this string against the content of the registry
-     * for MM drivers. The names have to match in order for the program to work 
+     * for MM drivers. The names have to match in order for the program to work
      * (e.g. MS win9x mplayer.exe)
      */
 #ifdef EMULATE_SB16
@@ -310,7 +310,7 @@
     	WOutDev[i].caps.vDriverVersion = 0x0100;
     	WOutDev[i].caps.dwFormats = 0x00000000;
     	WOutDev[i].caps.dwSupport = WAVECAPS_VOLUME;
-    
+
     	WOutDev[i].caps.wChannels = 2;
     	WOutDev[i].caps.dwSupport |= WAVECAPS_LRVOLUME;
 
@@ -367,7 +367,7 @@
 static int ARTS_AddRingMessage(ARTS_MSG_RING* mr, enum win_wm_message msg, DWORD param, BOOL wait)
 {
     HANDLE      hEvent = INVALID_HANDLE_VALUE;
-        
+
     EnterCriticalSection(&mr->msg_crst);
     if ((mr->msg_toget == ((mr->msg_tosave + 1) % ARTS_RING_BUFFER_SIZE))) /* buffer overflow? */
     {
@@ -386,7 +386,7 @@
         }
         if (mr->msg_toget != mr->msg_tosave && mr->messages[mr->msg_toget].msg != WINE_WM_HEADER)
             FIXME("two fast messages in the queue!!!!\n");
-     
+
         /* fast messages have to be added at the start of the queue */
         mr->msg_toget = (mr->msg_toget + ARTS_RING_BUFFER_SIZE - 1) % ARTS_RING_BUFFER_SIZE;
 
@@ -421,7 +421,7 @@
  *
  * Get a message from the ring. Should be called by the playback/record thread.
  */
-static int ARTS_RetrieveRingMessage(ARTS_MSG_RING* mr, 
+static int ARTS_RetrieveRingMessage(ARTS_MSG_RING* mr,
                                    enum win_wm_message *msg, DWORD *param, HANDLE *hEvent)
 {
     EnterCriticalSection(&mr->msg_crst);
@@ -431,7 +431,7 @@
         LeaveCriticalSection(&mr->msg_crst);
 	return 0;
     }
-	
+
     *msg = mr->messages[mr->msg_toget].msg;
     mr->messages[mr->msg_toget].msg = 0;
     *param = mr->messages[mr->msg_toget].param;
@@ -451,13 +451,13 @@
 static DWORD wodNotifyClient(WINE_WAVEOUT* wwo, WORD wMsg, DWORD dwParam1, DWORD dwParam2)
 {
     TRACE("wMsg = 0x%04x dwParm1 = %04lX dwParam2 = %04lX\n", wMsg, dwParam1, dwParam2);
-    
+
     switch (wMsg) {
     case WOM_OPEN:
     case WOM_CLOSE:
     case WOM_DONE:
-	if (wwo->wFlags != DCB_NULL && 
-	    !DriverCallback(wwo->waveDesc.dwCallback, wwo->wFlags, wwo->waveDesc.hWave, 
+	if (wwo->wFlags != DCB_NULL &&
+	    !DriverCallback(wwo->waveDesc.dwCallback, wwo->wFlags, wwo->waveDesc.hWave,
 			    wMsg, wwo->waveDesc.dwInstance, dwParam1, dwParam2)) {
 	    WARN("can't notify client !\n");
 	    return MMSYSERR_ERROR;
@@ -477,8 +477,8 @@
 static BOOL wodUpdatePlayedTotal(WINE_WAVEOUT* wwo)
 {
     /* total played is the bytes written less the bytes to write ;-) */
-    wwo->dwPlayedTotal = wwo->dwWrittenTotal - 
-	(wwo->dwBufferSize - 
+    wwo->dwPlayedTotal = wwo->dwWrittenTotal -
+	(wwo->dwBufferSize -
 	arts_stream_get(wwo->play_stream, ARTS_P_BUFFER_SPACE));
 
     return TRUE;
@@ -556,9 +556,9 @@
  */
 static DWORD wodPlayer_DSPWait(const WINE_WAVEOUT *wwo)
 {
-	int waitvalue = (wwo->dwBufferSize - arts_stream_get(wwo->play_stream, 
-		ARTS_P_BUFFER_SPACE)) / ((wwo->format.wf.nSamplesPerSec * 
-		wwo->format.wBitsPerSample * wwo->format.wf.nChannels) 
+	int waitvalue = (wwo->dwBufferSize - arts_stream_get(wwo->play_stream,
+		ARTS_P_BUFFER_SPACE)) / ((wwo->format.wf.nSamplesPerSec *
+		wwo->format.wBitsPerSample * wwo->format.wf.nChannels)
 		/1000);
 
 	TRACE("wait value of %d\n", waitvalue);
@@ -576,7 +576,7 @@
  */
 static DWORD wodPlayer_NotifyWait(const WINE_WAVEOUT* wwo, LPWAVEHDR lpWaveHdr)
 {
-    DWORD dwMillis;    
+    DWORD dwMillis;
 
     if(lpWaveHdr->reserved < wwo->dwPlayedTotal)
     {
@@ -606,7 +606,7 @@
     int toWrite = min(dwLength, *bytes);
     int written;
 
-    TRACE("Writing wavehdr %p.%lu[%lu]\n", 
+    TRACE("Writing wavehdr %p.%lu[%lu]\n",
           wwo->lpPlayPtr, wwo->dwPartialOffset, wwo->lpPlayPtr->dwBufferLength);
 
     /* see if our buffer isn't large enough for the data we are writing */
@@ -639,18 +639,18 @@
     {
       /* apply volume to the buffer we are about to send */
       /* divide toWrite(bytes) by 2 as volume processes by 16 bits */
-      volume_effect16(wwo->lpPlayPtr->lpData + wwo->dwPartialOffset, 
-                wwo->sound_buffer, toWrite>>1, wwo->volume_left, 
+      volume_effect16(wwo->lpPlayPtr->lpData + wwo->dwPartialOffset,
+                wwo->sound_buffer, toWrite>>1, wwo->volume_left,
 		wwo->volume_right, wwo->format.wf.nChannels);
     } else if(wwo->format.wBitsPerSample == 8)
     {
       /* apply volume to the buffer we are about to send */
-      volume_effect8(wwo->lpPlayPtr->lpData + wwo->dwPartialOffset, 
-                wwo->sound_buffer, toWrite>>1, wwo->volume_left, 
+      volume_effect8(wwo->lpPlayPtr->lpData + wwo->dwPartialOffset,
+                wwo->sound_buffer, toWrite>>1, wwo->volume_left,
 		wwo->volume_right, wwo->format.wf.nChannels);
     } else
     {
-      FIXME("unsupported wwo->format.wBitsPerSample of %d\n", 
+      FIXME("unsupported wwo->format.wBitsPerSample of %d\n",
         wwo->format.wBitsPerSample);
     }
 
@@ -690,8 +690,8 @@
      * - we hit the beginning of a running loop
      * - we hit a wavehdr which hasn't finished playing
      */
-    while ((lpWaveHdr = wwo->lpQueuePtr) && 
-           (force || 
+    while ((lpWaveHdr = wwo->lpQueuePtr) &&
+           (force ||
             (lpWaveHdr != wwo->lpPlayPtr &&
              lpWaveHdr != wwo->lpLoopPtr &&
              lpWaveHdr->reserved <= wwo->dwPlayedTotal))) {
@@ -703,7 +703,7 @@
 
 	wodNotifyClient(wwo, WOM_DONE, (DWORD)lpWaveHdr, 0);
     }
-    return  (lpWaveHdr && lpWaveHdr != wwo->lpPlayPtr && lpWaveHdr != wwo->lpLoopPtr) ? 
+    return  (lpWaveHdr && lpWaveHdr != wwo->lpPlayPtr && lpWaveHdr != wwo->lpLoopPtr) ?
         wodPlayer_NotifyWait(wwo, lpWaveHdr) : INFINITE;
 }
 
@@ -750,11 +750,11 @@
             }
             ((LPWAVEHDR)param)->dwFlags &= ~WHDR_INQUEUE;
             ((LPWAVEHDR)param)->dwFlags |= WHDR_DONE;
-        
+
             wodNotifyClient(wwo, WOM_DONE, param, 0);
         }
         ResetEvent(wwo->msgRing.msg_event);
-        LeaveCriticalSection(&wwo->msgRing.msg_crst);  
+        LeaveCriticalSection(&wwo->msgRing.msg_crst);
     } else {
         if (wwo->lpLoopPtr) {
             /* complicated case, not handled yet (could imply modifying the loop counter */
@@ -794,7 +794,7 @@
 	    break;
 	case WINE_WM_HEADER:
 	    lpWaveHdr = (LPWAVEHDR)param;
-	    
+
 	    /* insert buffer at the end of queue */
 	    {
 		LPWAVEHDR*	wh;
@@ -923,9 +923,9 @@
 static DWORD wodGetDevCaps(WORD wDevID, LPWAVEOUTCAPSA lpCaps, DWORD dwSize)
 {
     TRACE("(%u, %p, %lu);\n", wDevID, lpCaps, dwSize);
-    
+
     if (lpCaps == NULL) return MMSYSERR_NOTENABLED;
-    
+
     if (wDevID >= MAX_WAVEOUTDRV) {
 	TRACE("MAX_WAVOUTDRV reached !\n");
 	return MMSYSERR_BADDEVICEID;
@@ -963,14 +963,14 @@
     if (lpDesc->lpFormat->wFormatTag != WAVE_FORMAT_PCM ||
 	lpDesc->lpFormat->nChannels == 0 ||
 	lpDesc->lpFormat->nSamplesPerSec == 0) {
-	WARN("Bad format: tag=%04X nChannels=%d nSamplesPerSec=%ld !\n", 
+	WARN("Bad format: tag=%04X nChannels=%d nSamplesPerSec=%ld !\n",
 	     lpDesc->lpFormat->wFormatTag, lpDesc->lpFormat->nChannels,
 	     lpDesc->lpFormat->nSamplesPerSec);
 	return WAVERR_BADFORMAT;
     }
 
     if (dwFlags & WAVE_FORMAT_QUERY) {
-	TRACE("Query format: tag=%04X nChannels=%d nSamplesPerSec=%ld !\n", 
+	TRACE("Query format: tag=%04X nChannels=%d nSamplesPerSec=%ld !\n",
 	     lpDesc->lpFormat->wFormatTag, lpDesc->lpFormat->nChannels,
 	     lpDesc->lpFormat->nSamplesPerSec);
 	return MMSYSERR_NOERROR;
@@ -982,10 +982,10 @@
     dwFlags &= ~WAVE_DIRECTSOUND;
 
     wwo->wFlags = HIWORD(dwFlags & CALLBACK_TYPEMASK);
-    
+
     memcpy(&wwo->waveDesc, lpDesc, 	     sizeof(WAVEOPENDESC));
     memcpy(&wwo->format,   lpDesc->lpFormat, sizeof(PCMWAVEFORMAT));
-    
+
     if (wwo->format.wBitsPerSample == 0) {
 	WARN("Resetting zeroed wBitsPerSample\n");
 	wwo->format.wBitsPerSample = 8 *
@@ -994,7 +994,7 @@
 	    wwo->format.wf.nChannels;
     }
 
-    wwo->play_stream = arts_play_stream(wwo->format.wf.nSamplesPerSec, 
+    wwo->play_stream = arts_play_stream(wwo->format.wf.nSamplesPerSec,
 	wwo->format.wBitsPerSample, wwo->format.wf.nChannels, "winearts");
 
     /* clear these so we don't have any confusion ;-) */
@@ -1005,9 +1005,9 @@
 
     if(!wwo->play_stream) return MMSYSERR_ALLOCATED;
 
-    /* Try to set buffer size from constant and store the value that it 
+    /* Try to set buffer size from constant and store the value that it
 	was set to for future use */
-    wwo->dwBufferSize = arts_stream_set(wwo->play_stream, 
+    wwo->dwBufferSize = arts_stream_set(wwo->play_stream,
 		ARTS_P_BUFFER_SIZE, BUFFER_SIZE);
     TRACE("Tried to set BUFFER_SIZE of %d, wwo->dwBufferSize is actually %ld\n", BUFFER_SIZE, wwo->dwBufferSize);
     wwo->dwPlayedTotal = 0;
@@ -1027,14 +1027,14 @@
     }
     wwo->hStartUpEvent = INVALID_HANDLE_VALUE;
 
-    TRACE("stream=0x%lx, dwBufferSize=%ld\n", 
+    TRACE("stream=0x%lx, dwBufferSize=%ld\n",
 	  (long)wwo->play_stream, wwo->dwBufferSize);
 
-    TRACE("wBitsPerSample=%u, nAvgBytesPerSec=%lu, nSamplesPerSec=%lu, nChannels=%u nBlockAlign=%u!\n", 
-	  wwo->format.wBitsPerSample, wwo->format.wf.nAvgBytesPerSec, 
+    TRACE("wBitsPerSample=%u, nAvgBytesPerSec=%lu, nSamplesPerSec=%lu, nChannels=%u nBlockAlign=%u!\n",
+	  wwo->format.wBitsPerSample, wwo->format.wf.nAvgBytesPerSec,
 	  wwo->format.wf.nSamplesPerSec, wwo->format.wf.nChannels,
 	  wwo->format.wf.nBlockAlign);
-    
+
     return wodNotifyClient(wwo, WOM_OPEN, 0L, 0L);
 }
 
@@ -1047,14 +1047,14 @@
     WINE_WAVEOUT*	wwo;
 
     TRACE("(%u);\n", wDevID);
-    
-    if (wDevID >= MAX_WAVEOUTDRV || WOutDev[wDevID].play_stream  == 
+
+    if (wDevID >= MAX_WAVEOUTDRV || WOutDev[wDevID].play_stream  ==
 	(arts_stream_t*)-1)
     {
 	WARN("bad device ID !\n");
 	return MMSYSERR_BADDEVICEID;
     }
-    
+
     wwo = &WOutDev[wDevID];
     if (wwo->lpQueuePtr) {
 	WARN("buffers still playing !\n");
@@ -1076,27 +1076,27 @@
 
 /**************************************************************************
  * 				wodWrite			[internal]
- * 
+ *
  */
 static DWORD wodWrite(WORD wDevID, LPWAVEHDR lpWaveHdr, DWORD dwSize)
 {
     TRACE("(%u, %p, %08lX);\n", wDevID, lpWaveHdr, dwSize);
-    
+
     /* first, do the sanity checks... */
-    if (wDevID >= MAX_WAVEOUTDRV || WOutDev[wDevID].play_stream == 
+    if (wDevID >= MAX_WAVEOUTDRV || WOutDev[wDevID].play_stream ==
 		(arts_stream_t*)-1)
     {
         WARN("bad dev ID !\n");
 	return MMSYSERR_BADDEVICEID;
     }
-    
-    if (lpWaveHdr->lpData == NULL || !(lpWaveHdr->dwFlags & WHDR_PREPARED)) 
+
+    if (lpWaveHdr->lpData == NULL || !(lpWaveHdr->dwFlags & WHDR_PREPARED))
     {
 	TRACE("unprepared\n");
 	return WAVERR_UNPREPARED;
     }
-    
-    if (lpWaveHdr->dwFlags & WHDR_INQUEUE) 
+
+    if (lpWaveHdr->dwFlags & WHDR_INQUEUE)
     {
 	TRACE("still playing\n");
 	return WAVERR_STILLPLAYING;
@@ -1118,15 +1118,15 @@
 static DWORD wodPrepare(WORD wDevID, LPWAVEHDR lpWaveHdr, DWORD dwSize)
 {
     TRACE("(%u, %p, %08lX);\n", wDevID, lpWaveHdr, dwSize);
-    
+
     if (wDevID >= MAX_WAVEOUTDRV) {
 	WARN("bad device ID !\n");
 	return MMSYSERR_BADDEVICEID;
     }
-    
+
     if (lpWaveHdr->dwFlags & WHDR_INQUEUE)
 	return WAVERR_STILLPLAYING;
-    
+
     lpWaveHdr->dwFlags |= WHDR_PREPARED;
     lpWaveHdr->dwFlags &= ~WHDR_DONE;
     return MMSYSERR_NOERROR;
@@ -1138,18 +1138,18 @@
 static DWORD wodUnprepare(WORD wDevID, LPWAVEHDR lpWaveHdr, DWORD dwSize)
 {
     TRACE("(%u, %p, %08lX);\n", wDevID, lpWaveHdr, dwSize);
-    
+
     if (wDevID >= MAX_WAVEOUTDRV) {
 	WARN("bad device ID !\n");
 	return MMSYSERR_BADDEVICEID;
     }
-    
+
     if (lpWaveHdr->dwFlags & WHDR_INQUEUE)
 	return WAVERR_STILLPLAYING;
-    
+
     lpWaveHdr->dwFlags &= ~WHDR_PREPARED;
     lpWaveHdr->dwFlags |= WHDR_DONE;
-    
+
     return MMSYSERR_NOERROR;
 }
 
@@ -1159,17 +1159,17 @@
 static DWORD wodPause(WORD wDevID)
 {
     TRACE("(%u);!\n", wDevID);
-    
-    if (wDevID >= MAX_WAVEOUTDRV || WOutDev[wDevID].play_stream == 
+
+    if (wDevID >= MAX_WAVEOUTDRV || WOutDev[wDevID].play_stream ==
 		(arts_stream_t*)-1)
     {
 	WARN("bad device ID !\n");
 	return MMSYSERR_BADDEVICEID;
     }
-    
+
     TRACE("imhere[3-PAUSING]\n");
     ARTS_AddRingMessage(&WOutDev[wDevID].msgRing, WINE_WM_PAUSING, 0, TRUE);
-    
+
     return MMSYSERR_NOERROR;
 }
 
@@ -1179,24 +1179,24 @@
 static DWORD wodRestart(WORD wDevID)
 {
     TRACE("(%u);\n", wDevID);
-    
-    if (wDevID >= MAX_WAVEOUTDRV || WOutDev[wDevID].play_stream == 
+
+    if (wDevID >= MAX_WAVEOUTDRV || WOutDev[wDevID].play_stream ==
 		(arts_stream_t*)-1)
     {
 	WARN("bad device ID !\n");
 	return MMSYSERR_BADDEVICEID;
     }
-    
+
     if (WOutDev[wDevID].state == WINE_WS_PAUSED) {
 	TRACE("imhere[3-RESTARTING]\n");
 	ARTS_AddRingMessage(&WOutDev[wDevID].msgRing, WINE_WM_RESTARTING, 0, TRUE);
     }
-    
+
     /* FIXME: is NotifyClient with WOM_DONE right ? (Comet Busters 1.3.3 needs this notification) */
     /* FIXME: Myst crashes with this ... hmm -MM
        return wodNotifyClient(wwo, WOM_DONE, 0L, 0L);
     */
-    
+
     return MMSYSERR_NOERROR;
 }
 
@@ -1206,17 +1206,17 @@
 static DWORD wodReset(WORD wDevID)
 {
     TRACE("(%u);\n", wDevID);
-    
-    if (wDevID >= MAX_WAVEOUTDRV || WOutDev[wDevID].play_stream == 
+
+    if (wDevID >= MAX_WAVEOUTDRV || WOutDev[wDevID].play_stream ==
 	(arts_stream_t*)-1)
     {
 	WARN("bad device ID !\n");
 	return MMSYSERR_BADDEVICEID;
     }
-    
+
     TRACE("imhere[3-RESET]\n");
     ARTS_AddRingMessage(&WOutDev[wDevID].msgRing, WINE_WM_RESETTING, 0, TRUE);
-    
+
     return MMSYSERR_NOERROR;
 }
 
@@ -1230,26 +1230,26 @@
     WINE_WAVEOUT*	wwo;
 
     TRACE("(%u, %p, %lu);\n", wDevID, lpTime, uSize);
-    
-    if (wDevID >= MAX_WAVEOUTDRV || WOutDev[wDevID].play_stream == 
+
+    if (wDevID >= MAX_WAVEOUTDRV || WOutDev[wDevID].play_stream ==
 	(arts_stream_t*)-1)
     {
 	WARN("bad device ID !\n");
 	return MMSYSERR_BADDEVICEID;
     }
-    
+
     if (lpTime == NULL)	return MMSYSERR_INVALPARAM;
 
     wwo = &WOutDev[wDevID];
     ARTS_AddRingMessage(&wwo->msgRing, WINE_WM_UPDATE, 0, TRUE);
     val = wwo->dwPlayedTotal;
 
-    TRACE("wType=%04X wBitsPerSample=%u nSamplesPerSec=%lu nChannels=%u nAvgBytesPerSec=%lu\n", 
-	  lpTime->wType, wwo->format.wBitsPerSample, 
-	  wwo->format.wf.nSamplesPerSec, wwo->format.wf.nChannels, 
-	  wwo->format.wf.nAvgBytesPerSec); 
+    TRACE("wType=%04X wBitsPerSample=%u nSamplesPerSec=%lu nChannels=%u nAvgBytesPerSec=%lu\n",
+	  lpTime->wType, wwo->format.wBitsPerSample,
+	  wwo->format.wf.nSamplesPerSec, wwo->format.wf.nChannels,
+	  wwo->format.wf.nAvgBytesPerSec);
     TRACE("dwPlayedTotal=%lu\n", val);
-    
+
     switch (lpTime->wType) {
     case TIME_BYTES:
 	lpTime->u.cb = val;
@@ -1290,8 +1290,8 @@
 static DWORD wodBreakLoop(WORD wDevID)
 {
     TRACE("(%u);\n", wDevID);
-    
-    if (wDevID >= MAX_WAVEOUTDRV || WOutDev[wDevID].play_stream == 
+
+    if (wDevID >= MAX_WAVEOUTDRV || WOutDev[wDevID].play_stream ==
 		(arts_stream_t*)-1)
     {
 	WARN("bad device ID !\n");
@@ -1300,7 +1300,7 @@
     ARTS_AddRingMessage(&WOutDev[wDevID].msgRing, WINE_WM_BREAKLOOP, 0, TRUE);
     return MMSYSERR_NOERROR;
 }
-    
+
 /**************************************************************************
  * 				wodGetVolume			[internal]
  */
@@ -1313,7 +1313,7 @@
 
     TRACE("(%u, %p);\n", wDevID, lpdwVol);
 
-    *lpdwVol = ((left * 0xFFFFl) / 100) + (((right * 0xFFFFl) / 100) << 
+    *lpdwVol = ((left * 0xFFFFl) / 100) + (((right * 0xFFFFl) / 100) <<
 		16);
 
     return MMSYSERR_NOERROR;
@@ -1327,7 +1327,7 @@
     DWORD left, right;
 
     left  = (LOWORD(dwParam) * 100) / 0xFFFFl;
-    right = (HIWORD(dwParam) * 100) / 0xFFFFl;   
+    right = (HIWORD(dwParam) * 100) / 0xFFFFl;
 
     TRACE("(%u, %08lX);\n", wDevID, dwParam);
 
@@ -1348,12 +1348,12 @@
 /**************************************************************************
  * 				wodMessage (WINEARTS.@)
  */
-DWORD WINAPI ARTS_wodMessage(UINT wDevID, UINT wMsg, DWORD dwUser, 
+DWORD WINAPI ARTS_wodMessage(UINT wDevID, UINT wMsg, DWORD dwUser,
 			    DWORD dwParam1, DWORD dwParam2)
 {
     TRACE("(%u, %04X, %08lX, %08lX, %08lX);\n",
 	  wDevID, wMsg, dwUser, dwParam1, dwParam2);
-    
+
     switch (wMsg) {
     case DRVM_INIT:
     case DRVM_EXIT:
@@ -1392,7 +1392,7 @@
  *======================================================================*/
 static DWORD wodDsCreate(UINT wDevID, PIDSDRIVER* drv)
 {
-    /* we can't perform memory mapping as we don't have a file stream 
+    /* we can't perform memory mapping as we don't have a file stream
 	interface with arts like we do with oss */
     MESSAGE("This sound card's driver does not support direct access\n");
     MESSAGE("The (slower) DirectSound HEL mode will be used instead.\n");
@@ -1404,7 +1404,7 @@
 /**************************************************************************
  * 				wodMessage (WINEARTS.@)
  */
-DWORD WINAPI ARTS_wodMessage(WORD wDevID, WORD wMsg, DWORD dwUser, 
+DWORD WINAPI ARTS_wodMessage(WORD wDevID, WORD wMsg, DWORD dwUser,
 			    DWORD dwParam1, DWORD dwParam2)
 {
     FIXME("(%u, %04X, %08lX, %08lX, %08lX):stub\n", wDevID, wMsg, dwUser, dwParam1, dwParam2);
diff --git a/dlls/winmm/winemm.h b/dlls/winmm/winemm.h
index 6d7b1c39..5f5cef3 100644
--- a/dlls/winmm/winemm.h
+++ b/dlls/winmm/winemm.h
@@ -77,7 +77,7 @@
 
 extern	BOOL		MMDRV_Init(void);
 extern	UINT		MMDRV_GetNum(UINT);
-extern	LPWINE_MLD	MMDRV_Alloc(UINT size, UINT type, LPHANDLE hndl, DWORD* dwFlags, 
+extern	LPWINE_MLD	MMDRV_Alloc(UINT size, UINT type, LPHANDLE hndl, DWORD* dwFlags,
 				    DWORD* dwCallback, DWORD* dwInstance, BOOL bFrom32);
 extern	void		MMDRV_Free(HANDLE hndl, LPWINE_MLD mld);
 extern	DWORD		MMDRV_Open(LPWINE_MLD mld, UINT wMsg, DWORD dwParam1, DWORD dwParam2);
@@ -218,7 +218,7 @@
 void		CALLBACK	WINE_mmThreadEntryPoint(DWORD _pmt);
 
 void 				MMSYSTEM_MMTIME16to32(LPMMTIME mmt32, const MMTIME16* mmt16);
-void 				MMSYSTEM_MMTIME32to16(LPMMTIME16 mmt16, const MMTIME* mmt32); 
+void 				MMSYSTEM_MMTIME32to16(LPMMTIME16 mmt16, const MMTIME* mmt32);
 
 BOOL				MULTIMEDIA_MciInit(void);
 LPWINE_MM_IDATA			MULTIMEDIA_GetIData(void);
diff --git a/dlls/winmm/wineoss/audio.c b/dlls/winmm/wineoss/audio.c
index 1db4fed..44269ae 100644
--- a/dlls/winmm/wineoss/audio.c
+++ b/dlls/winmm/wineoss/audio.c
@@ -1,5 +1,5 @@
 /* -*- tab-width: 8; c-basic-offset: 4 -*- */
-/*				   
+/*
  * Sample Wine Driver for Open Sound System (featured in Linux and FreeBSD)
  *
  * Copyright 1994 Martin Ayotte
@@ -101,7 +101,7 @@
     HANDLE	                hEvent;	/* if message is synchronous, handle of event for synchro */
 } OSS_MSG;
 
-/* implement an in-process message ring for better performance 
+/* implement an in-process message ring for better performance
  * (compared to passing thru the server)
  * this ring will be used by the input (resp output) record (resp playback) routine
  */
@@ -132,7 +132,7 @@
 
     LPWAVEHDR			lpLoopPtr;              /* pointer of first buffer in loop, if any */
     DWORD			dwLoops;		/* private copy of loop counter */
-    
+
     DWORD			dwPlayedTotal;		/* number of bytes actually played since opening */
     DWORD                       dwWrittenTotal;         /* number of bytes written to OSS buffer since opening */
 
@@ -170,7 +170,7 @@
 static WINE_WAVEIN	WInDev    [MAX_WAVEINDRV ];
 
 static DWORD wodDsCreate(UINT wDevID, PIDSDRIVER* drv);
- 
+
 /* These strings used only for tracing */
 static const char *wodPlayerCmdString[] = {
     "WINE_WM_PAUSING",
@@ -208,8 +208,8 @@
     /* FIXME: race */
     if (OSS_OpenCount == 0)
     {
-	if (access(SOUND_DEV, 0) != 0 || 
-            (OSS_OpenFD = open(SOUND_DEV, req_access|O_NDELAY, 0)) == -1) 
+	if (access(SOUND_DEV, 0) != 0 ||
+            (OSS_OpenFD = open(SOUND_DEV, req_access|O_NDELAY, 0)) == -1)
 	{
 	    WARN("Couldn't open out %s (%s)\n", SOUND_DEV, strerror(errno));
 	    return -1;
@@ -220,7 +220,7 @@
 	OSS_OpenAccess = req_access;
         OSS_OwnerThreadID = GetCurrentThreadId();
     }
-    else 
+    else
     {
         if (OSS_OpenAccess != req_access)
         {
@@ -238,7 +238,7 @@
     return OSS_OpenFD;
 #else
     int fd;
-    if (access(SOUND_DEV, 0) != 0 || (fd = open(SOUND_DEV, req_access|O_NDELAY, 0)) == -1) 
+    if (access(SOUND_DEV, 0) != 0 || (fd = open(SOUND_DEV, req_access|O_NDELAY, 0)) == -1)
     {
         WARN("Couldn't open out %s (%s)\n", SOUND_DEV, strerror(errno));
         return -1;
@@ -282,7 +282,7 @@
     int		mask;
     int 	i;
 
-    
+
     /* start with output device */
 
     /* initialize all device handles to -1 */
@@ -299,7 +299,7 @@
     ioctl(audio, SNDCTL_DSP_RESET, 0);
 
     /* FIXME: some programs compare this string against the content of the registry
-     * for MM drivers. The names have to match in order for the program to work 
+     * for MM drivers. The names have to match in order for the program to work
      * (e.g. MS win9x mplayer.exe)
      */
 #ifdef EMULATE_SB16
@@ -315,16 +315,16 @@
     WOutDev[0].caps.vDriverVersion = 0x0100;
     WOutDev[0].caps.dwFormats = 0x00000000;
     WOutDev[0].caps.dwSupport = WAVECAPS_VOLUME;
-    
+
     ioctl(audio, SNDCTL_DSP_GETFMTS, &mask);
     TRACE("OSS dsp out mask=%08x\n", mask);
 
     /* First bytespersampl, then stereo */
     bytespersmpl = (ioctl(audio, SNDCTL_DSP_SAMPLESIZE, &samplesize) != 0) ? 1 : 2;
-    
+
     WOutDev[0].caps.wChannels = (ioctl(audio, SNDCTL_DSP_STEREO, &dsp_stereo) != 0) ? 1 : 2;
     if (WOutDev[0].caps.wChannels > 1) WOutDev[0].caps.dwSupport |= WAVECAPS_LRVOLUME;
-    
+
     smplrate = 44100;
     if (ioctl(audio, SNDCTL_DSP_SPEED, &smplrate) == 0) {
 	if (mask & AFMT_U8) {
@@ -381,12 +381,12 @@
     /* then do input device */
     samplesize = 16;
     dsp_stereo = 1;
-   
+
     for (i = 0; i < MAX_WAVEINDRV; ++i)
     {
         WInDev[i].unixdev = -1;
     }
-    
+
     memset(&WInDev[0].caps, 0, sizeof(WInDev[0].caps));
 
     if ((audio = OSS_OpenDevice(0, O_RDONLY)) == -1) return -1;
@@ -404,7 +404,7 @@
 #endif
     WInDev[0].caps.dwFormats = 0x00000000;
     WInDev[0].caps.wChannels = (ioctl(audio, SNDCTL_DSP_STEREO, &dsp_stereo) != 0) ? 1 : 2;
-    
+
     WInDev[0].bTriggerSupport = FALSE;
     if (ioctl(audio, SNDCTL_DSP_GETCAPS, &caps) == 0) {
 	TRACE("OSS dsp in caps=%08X\n", caps);
@@ -532,7 +532,7 @@
         omr->messages[omr->msg_toget].hEvent = hEvent;
     }
     else
-    { 
+    {
         omr->messages[omr->msg_tosave].msg = msg;
         omr->messages[omr->msg_tosave].param = param;
         omr->messages[omr->msg_tosave].hEvent = INVALID_HANDLE_VALUE;
@@ -555,7 +555,7 @@
  *
  * Get a message from the ring. Should be called by the playback/record thread.
  */
-static int OSS_RetrieveRingMessage(OSS_MSG_RING* omr, 
+static int OSS_RetrieveRingMessage(OSS_MSG_RING* omr,
                                    enum win_wm_message *msg, DWORD *param, HANDLE *hEvent)
 {
     EnterCriticalSection(&omr->msg_crst);
@@ -565,7 +565,7 @@
         LeaveCriticalSection(&omr->msg_crst);
 	return 0;
     }
-	
+
     *msg = omr->messages[omr->msg_toget].msg;
     omr->messages[omr->msg_toget].msg = 0;
     *param = omr->messages[omr->msg_toget].param;
@@ -585,13 +585,13 @@
 static DWORD wodNotifyClient(WINE_WAVEOUT* wwo, WORD wMsg, DWORD dwParam1, DWORD dwParam2)
 {
     TRACE("wMsg = 0x%04x dwParm1 = %04lX dwParam2 = %04lX\n", wMsg, dwParam1, dwParam2);
-    
+
     switch (wMsg) {
     case WOM_OPEN:
     case WOM_CLOSE:
     case WOM_DONE:
-	if (wwo->wFlags != DCB_NULL && 
-	    !DriverCallback(wwo->waveDesc.dwCallback, wwo->wFlags, wwo->waveDesc.hWave, 
+	if (wwo->wFlags != DCB_NULL &&
+	    !DriverCallback(wwo->waveDesc.dwCallback, wwo->wFlags, wwo->waveDesc.hWave,
 			    wMsg, wwo->waveDesc.dwInstance, dwParam1, dwParam2)) {
 	    WARN("can't notify client !\n");
 	    return MMSYSERR_ERROR;
@@ -686,7 +686,7 @@
 
 /**************************************************************************
  * 			     wodPlayer_DSPWait			[internal]
- * Returns the number of milliseconds to wait for the DSP buffer to write 
+ * Returns the number of milliseconds to wait for the DSP buffer to write
  * one fragment.
  */
 static DWORD wodPlayer_DSPWait(const WINE_WAVEOUT *wwo)
@@ -729,7 +729,7 @@
     int         written;
     BOOL        ret = FALSE;
 
-    TRACE("Writing wavehdr %p.%lu[%lu]/%lu\n", 
+    TRACE("Writing wavehdr %p.%lu[%lu]/%lu\n",
           wwo->lpPlayPtr, wwo->dwPartialOffset, wwo->lpPlayPtr->dwBufferLength, toWrite);
 
     if (toWrite > 0)
@@ -772,8 +772,8 @@
      * - we hit the beginning of a running loop
      * - we hit a wavehdr which hasn't finished playing
      */
-    while ((lpWaveHdr = wwo->lpQueuePtr) && 
-           (force || 
+    while ((lpWaveHdr = wwo->lpQueuePtr) &&
+           (force ||
             (lpWaveHdr != wwo->lpPlayPtr &&
              lpWaveHdr != wwo->lpLoopPtr &&
              lpWaveHdr->reserved <= wwo->dwPlayedTotal))) {
@@ -785,7 +785,7 @@
 
 	wodNotifyClient(wwo, WOM_DONE, (DWORD)lpWaveHdr, 0);
     }
-    return  (lpWaveHdr && lpWaveHdr != wwo->lpPlayPtr && lpWaveHdr != wwo->lpLoopPtr) ? 
+    return  (lpWaveHdr && lpWaveHdr != wwo->lpPlayPtr && lpWaveHdr != wwo->lpLoopPtr) ?
         wodPlayer_NotifyWait(wwo, lpWaveHdr) : INFINITE;
 }
 
@@ -827,7 +827,7 @@
         /* return all pending headers in queue */
         while (OSS_RetrieveRingMessage(&wwo->msgRing, &msg, &param, &ev))
         {
-            if (msg != WINE_WM_HEADER) 
+            if (msg != WINE_WM_HEADER)
             {
                 FIXME("shouldn't have headers left\n");
                 SetEvent(ev);
@@ -884,7 +884,7 @@
 	    SetEvent(ev);
 	    break;
 	case WINE_WM_RESTARTING:
-            if (wwo->state == WINE_WS_PAUSED) 
+            if (wwo->state == WINE_WS_PAUSED)
             {
                 wwo->state = WINE_WS_PLAYING;
             }
@@ -892,7 +892,7 @@
 	    break;
 	case WINE_WM_HEADER:
 	    lpWaveHdr = (LPWAVEHDR)param;
-	    
+
 	    /* insert buffer at the end of queue */
 	    {
 		LPWAVEHDR*	wh;
@@ -951,7 +951,7 @@
 
     /* input queue empty and output buffer with less than one fragment to play */
     if (!wwo->lpPlayPtr && wwo->dwBufferSize < availInQ + 2 * wwo->dwFragmentSize) {
-        TRACE("Run out of wavehdr:s... flushing (%lu => %lu)\n", 
+        TRACE("Run out of wavehdr:s... flushing (%lu => %lu)\n",
               wwo->dwPlayedTotal, wwo->dwWrittenTotal);
         ioctl(wwo->unixdev, SNDCTL_DSP_SYNC, 0);
         wwo->dwPlayedTotal = wwo->dwWrittenTotal;
@@ -968,7 +968,7 @@
         /* Feed wavehdrs until we run out of wavehdrs or DSP space */
         if (wwo->dwPartialOffset == 0 && wwo->lpPlayPtr) {
             do {
-                TRACE("Setting time to elapse for %p to %lu\n", 
+                TRACE("Setting time to elapse for %p to %lu\n",
                       wwo->lpPlayPtr, wwo->dwWrittenTotal + wwo->lpPlayPtr->dwBufferLength);
                 /* note the value that dwPlayedTotal will return when this wave finishes playing */
                 wwo->lpPlayPtr->reserved = wwo->dwWrittenTotal + wwo->lpPlayPtr->dwBufferLength;
@@ -1017,9 +1017,9 @@
 static DWORD wodGetDevCaps(WORD wDevID, LPWAVEOUTCAPSA lpCaps, DWORD dwSize)
 {
     TRACE("(%u, %p, %lu);\n", wDevID, lpCaps, dwSize);
-    
+
     if (lpCaps == NULL) return MMSYSERR_NOTENABLED;
-    
+
     if (wDevID >= MAX_WAVEOUTDRV) {
 	TRACE("MAX_WAVOUTDRV reached !\n");
 	return MMSYSERR_BADDEVICEID;
@@ -1055,14 +1055,14 @@
     if (lpDesc->lpFormat->wFormatTag != WAVE_FORMAT_PCM ||
 	lpDesc->lpFormat->nChannels == 0 ||
 	lpDesc->lpFormat->nSamplesPerSec == 0) {
-	WARN("Bad format: tag=%04X nChannels=%d nSamplesPerSec=%ld !\n", 
+	WARN("Bad format: tag=%04X nChannels=%d nSamplesPerSec=%ld !\n",
 	     lpDesc->lpFormat->wFormatTag, lpDesc->lpFormat->nChannels,
 	     lpDesc->lpFormat->nSamplesPerSec);
 	return WAVERR_BADFORMAT;
     }
 
     if (dwFlags & WAVE_FORMAT_QUERY) {
-	TRACE("Query format: tag=%04X nChannels=%d nSamplesPerSec=%ld !\n", 
+	TRACE("Query format: tag=%04X nChannels=%d nSamplesPerSec=%ld !\n",
 	     lpDesc->lpFormat->wFormatTag, lpDesc->lpFormat->nChannels,
 	     lpDesc->lpFormat->nSamplesPerSec);
 	return MMSYSERR_NOERROR;
@@ -1079,17 +1079,17 @@
     if (wwo->unixdev != -1) return MMSYSERR_ALLOCATED;
     /* we want to be able to mmap() the device, which means it must be opened readable,
      * otherwise mmap() will fail (at least under Linux) */
-    wwo->unixdev = OSS_OpenDevice(wDevID, 
-                                  ((dwFlags & WAVE_DIRECTSOUND) || OSS_FullDuplex) ? 
+    wwo->unixdev = OSS_OpenDevice(wDevID,
+                                  ((dwFlags & WAVE_DIRECTSOUND) || OSS_FullDuplex) ?
                                   O_RDWR : O_WRONLY);
     if (wwo->unixdev == -1) return MMSYSERR_ALLOCATED;
 
     fcntl(wwo->unixdev, F_SETFD, 1); /* set close on exec flag */
     wwo->wFlags = HIWORD(dwFlags & CALLBACK_TYPEMASK);
-    
+
     memcpy(&wwo->waveDesc, lpDesc, 	     sizeof(WAVEOPENDESC));
     memcpy(&wwo->format,   lpDesc->lpFormat, sizeof(PCMWAVEFORMAT));
-    
+
     if (wwo->format.wBitsPerSample == 0) {
 	WARN("Resetting zeroed wBitsPerSample\n");
 	wwo->format.wBitsPerSample = 8 *
@@ -1097,7 +1097,7 @@
 	     wwo->format.wf.nSamplesPerSec) /
 	    wwo->format.wf.nChannels;
     }
-    
+
     if (dwFlags & WAVE_DIRECTSOUND) {
         if (wwo->caps.dwSupport & WAVECAPS_SAMPLEACCURATE)
 	    /* we have realtime DirectSound, fragments just waste our time,
@@ -1126,13 +1126,13 @@
 
     /* paranoid checks */
     if (format != ((wwo->format.wBitsPerSample == 16) ? AFMT_S16_LE : AFMT_U8))
-	ERR("Can't set format to %d (%d)\n", 
+	ERR("Can't set format to %d (%d)\n",
 	    (wwo->format.wBitsPerSample == 16) ? AFMT_S16_LE : AFMT_U8, format);
-    if (dsp_stereo != (wwo->format.wf.nChannels > 1) ? 1 : 0) 
-	ERR("Can't set stereo to %u (%d)\n", 
+    if (dsp_stereo != (wwo->format.wf.nChannels > 1) ? 1 : 0)
+	ERR("Can't set stereo to %u (%d)\n",
 	    (wwo->format.wf.nChannels > 1) ? 1 : 0, dsp_stereo);
     if (!NEAR_MATCH(sample_rate, wwo->format.wf.nSamplesPerSec))
-	ERR("Can't set sample_rate to %lu (%d)\n", 
+	ERR("Can't set sample_rate to %lu (%d)\n",
 	    wwo->format.wf.nSamplesPerSec, sample_rate);
 
     /* Read output space info for future reference */
@@ -1170,16 +1170,16 @@
     }
     wwo->hStartUpEvent = INVALID_HANDLE_VALUE;
 
-    TRACE("fd=%d fragmentSize=%ld\n", 
+    TRACE("fd=%d fragmentSize=%ld\n",
 	  wwo->unixdev, wwo->dwFragmentSize);
     if (wwo->dwFragmentSize % wwo->format.wf.nBlockAlign)
 	ERR("Fragment doesn't contain an integral number of data blocks\n");
 
-    TRACE("wBitsPerSample=%u, nAvgBytesPerSec=%lu, nSamplesPerSec=%lu, nChannels=%u nBlockAlign=%u!\n", 
-	  wwo->format.wBitsPerSample, wwo->format.wf.nAvgBytesPerSec, 
+    TRACE("wBitsPerSample=%u, nAvgBytesPerSec=%lu, nSamplesPerSec=%lu, nChannels=%u nBlockAlign=%u!\n",
+	  wwo->format.wBitsPerSample, wwo->format.wf.nAvgBytesPerSec,
 	  wwo->format.wf.nSamplesPerSec, wwo->format.wf.nChannels,
 	  wwo->format.wf.nBlockAlign);
-    
+
     return wodNotifyClient(wwo, WOM_OPEN, 0L, 0L);
 }
 
@@ -1192,12 +1192,12 @@
     WINE_WAVEOUT*	wwo;
 
     TRACE("(%u);\n", wDevID);
-    
+
     if (wDevID >= MAX_WAVEOUTDRV || WOutDev[wDevID].unixdev == -1) {
 	WARN("bad device ID !\n");
 	return MMSYSERR_BADDEVICEID;
     }
-    
+
     wwo = &WOutDev[wDevID];
     if (wwo->lpQueuePtr) {
 	WARN("buffers still playing !\n");
@@ -1223,22 +1223,22 @@
 
 /**************************************************************************
  * 				wodWrite			[internal]
- * 
+ *
  */
 static DWORD wodWrite(WORD wDevID, LPWAVEHDR lpWaveHdr, DWORD dwSize)
 {
     TRACE("(%u, %p, %08lX);\n", wDevID, lpWaveHdr, dwSize);
-    
+
     /* first, do the sanity checks... */
     if (wDevID >= MAX_WAVEOUTDRV || WOutDev[wDevID].unixdev == -1) {
         WARN("bad dev ID !\n");
 	return MMSYSERR_BADDEVICEID;
     }
-    
-    if (lpWaveHdr->lpData == NULL || !(lpWaveHdr->dwFlags & WHDR_PREPARED)) 
+
+    if (lpWaveHdr->lpData == NULL || !(lpWaveHdr->dwFlags & WHDR_PREPARED))
 	return WAVERR_UNPREPARED;
-    
-    if (lpWaveHdr->dwFlags & WHDR_INQUEUE) 
+
+    if (lpWaveHdr->dwFlags & WHDR_INQUEUE)
 	return WAVERR_STILLPLAYING;
 
     lpWaveHdr->dwFlags &= ~WHDR_DONE;
@@ -1256,15 +1256,15 @@
 static DWORD wodPrepare(WORD wDevID, LPWAVEHDR lpWaveHdr, DWORD dwSize)
 {
     TRACE("(%u, %p, %08lX);\n", wDevID, lpWaveHdr, dwSize);
-    
+
     if (wDevID >= MAX_WAVEOUTDRV) {
 	WARN("bad device ID !\n");
 	return MMSYSERR_BADDEVICEID;
     }
-    
+
     if (lpWaveHdr->dwFlags & WHDR_INQUEUE)
 	return WAVERR_STILLPLAYING;
-    
+
     lpWaveHdr->dwFlags |= WHDR_PREPARED;
     lpWaveHdr->dwFlags &= ~WHDR_DONE;
     return MMSYSERR_NOERROR;
@@ -1276,18 +1276,18 @@
 static DWORD wodUnprepare(WORD wDevID, LPWAVEHDR lpWaveHdr, DWORD dwSize)
 {
     TRACE("(%u, %p, %08lX);\n", wDevID, lpWaveHdr, dwSize);
-    
+
     if (wDevID >= MAX_WAVEOUTDRV) {
 	WARN("bad device ID !\n");
 	return MMSYSERR_BADDEVICEID;
     }
-    
+
     if (lpWaveHdr->dwFlags & WHDR_INQUEUE)
 	return WAVERR_STILLPLAYING;
-    
+
     lpWaveHdr->dwFlags &= ~WHDR_PREPARED;
     lpWaveHdr->dwFlags |= WHDR_DONE;
-    
+
     return MMSYSERR_NOERROR;
 }
 
@@ -1297,14 +1297,14 @@
 static DWORD wodPause(WORD wDevID)
 {
     TRACE("(%u);!\n", wDevID);
-    
+
     if (wDevID >= MAX_WAVEOUTDRV || WOutDev[wDevID].unixdev == -1) {
 	WARN("bad device ID !\n");
 	return MMSYSERR_BADDEVICEID;
     }
-    
+
     OSS_AddRingMessage(&WOutDev[wDevID].msgRing, WINE_WM_PAUSING, 0, TRUE);
-    
+
     return MMSYSERR_NOERROR;
 }
 
@@ -1314,19 +1314,19 @@
 static DWORD wodRestart(WORD wDevID)
 {
     TRACE("(%u);\n", wDevID);
-    
+
     if (wDevID >= MAX_WAVEOUTDRV || WOutDev[wDevID].unixdev == -1) {
 	WARN("bad device ID !\n");
 	return MMSYSERR_BADDEVICEID;
     }
-    
+
     OSS_AddRingMessage(&WOutDev[wDevID].msgRing, WINE_WM_RESTARTING, 0, TRUE);
-    
+
     /* FIXME: is NotifyClient with WOM_DONE right ? (Comet Busters 1.3.3 needs this notification) */
     /* FIXME: Myst crashes with this ... hmm -MM
        return wodNotifyClient(wwo, WOM_DONE, 0L, 0L);
     */
-    
+
     return MMSYSERR_NOERROR;
 }
 
@@ -1336,14 +1336,14 @@
 static DWORD wodReset(WORD wDevID)
 {
     TRACE("(%u);\n", wDevID);
-    
+
     if (wDevID >= MAX_WAVEOUTDRV || WOutDev[wDevID].unixdev == -1) {
 	WARN("bad device ID !\n");
 	return MMSYSERR_BADDEVICEID;
     }
-    
+
     OSS_AddRingMessage(&WOutDev[wDevID].msgRing, WINE_WM_RESETTING, 0, TRUE);
-    
+
     return MMSYSERR_NOERROR;
 }
 
@@ -1357,24 +1357,24 @@
     WINE_WAVEOUT*	wwo;
 
     TRACE("(%u, %p, %lu);\n", wDevID, lpTime, uSize);
-    
+
     if (wDevID >= MAX_WAVEOUTDRV || WOutDev[wDevID].unixdev == -1) {
 	WARN("bad device ID !\n");
 	return MMSYSERR_BADDEVICEID;
     }
-    
+
     if (lpTime == NULL)	return MMSYSERR_INVALPARAM;
 
     wwo = &WOutDev[wDevID];
     OSS_AddRingMessage(&wwo->msgRing, WINE_WM_UPDATE, 0, TRUE);
     val = wwo->dwPlayedTotal;
 
-    TRACE("wType=%04X wBitsPerSample=%u nSamplesPerSec=%lu nChannels=%u nAvgBytesPerSec=%lu\n", 
-	  lpTime->wType, wwo->format.wBitsPerSample, 
-	  wwo->format.wf.nSamplesPerSec, wwo->format.wf.nChannels, 
-	  wwo->format.wf.nAvgBytesPerSec); 
+    TRACE("wType=%04X wBitsPerSample=%u nSamplesPerSec=%lu nChannels=%u nAvgBytesPerSec=%lu\n",
+	  lpTime->wType, wwo->format.wBitsPerSample,
+	  wwo->format.wf.nSamplesPerSec, wwo->format.wf.nChannels,
+	  wwo->format.wf.nAvgBytesPerSec);
     TRACE("dwPlayedTotal=%lu\n", val);
-    
+
     switch (lpTime->wType) {
     case TIME_BYTES:
 	lpTime->u.cb = val;
@@ -1415,7 +1415,7 @@
 static DWORD wodBreakLoop(WORD wDevID)
 {
     TRACE("(%u);\n", wDevID);
-    
+
     if (wDevID >= MAX_WAVEOUTDRV || WOutDev[wDevID].unixdev == -1) {
 	WARN("bad device ID !\n");
 	return MMSYSERR_BADDEVICEID;
@@ -1423,7 +1423,7 @@
     OSS_AddRingMessage(&WOutDev[wDevID].msgRing, WINE_WM_BREAKLOOP, 0, TRUE);
     return MMSYSERR_NOERROR;
 }
-    
+
 /**************************************************************************
  * 				wodGetVolume			[internal]
  */
@@ -1432,10 +1432,10 @@
     int 	mixer;
     int		volume;
     DWORD	left, right;
-    
+
     TRACE("(%u, %p);\n", wDevID, lpdwVol);
-    
-    if (lpdwVol == NULL) 
+
+    if (lpdwVol == NULL)
 	return MMSYSERR_NOTENABLED;
     if ((mixer = open(MIXER_DEV, O_RDONLY|O_NDELAY)) < 0) {
 	WARN("mixer device not available !\n");
@@ -1467,7 +1467,7 @@
     left  = (LOWORD(dwParam) * 100) / 0xFFFFl;
     right = (HIWORD(dwParam) * 100) / 0xFFFFl;
     volume = left + (right << 8);
-    
+
     if ((mixer = open(MIXER_DEV, O_WRONLY|O_NDELAY)) < 0) {
 	WARN("mixer device not available !\n");
 	return MMSYSERR_NOTENABLED;
@@ -1490,7 +1490,7 @@
     DWORD	ret = 1;
     /* FIXME: For now, only one sound device (SOUND_DEV) is allowed */
     int audio = OSS_OpenDevice(0, OSS_FullDuplex ? O_RDWR : O_WRONLY);
-    
+
     if (audio == -1) {
 	if (errno != EBUSY)
 	    ret = 0;
@@ -1503,12 +1503,12 @@
 /**************************************************************************
  * 				wodMessage (WINEOSS.7)
  */
-DWORD WINAPI OSS_wodMessage(UINT wDevID, UINT wMsg, DWORD dwUser, 
+DWORD WINAPI OSS_wodMessage(UINT wDevID, UINT wMsg, DWORD dwUser,
 			    DWORD dwParam1, DWORD dwParam2)
 {
     TRACE("(%u, %04X, %08lX, %08lX, %08lX);\n",
 	  wDevID, wMsg, dwUser, dwParam1, dwParam2);
-    
+
     switch (wMsg) {
     case DRVM_INIT:
     case DRVM_EXIT:
@@ -1585,7 +1585,7 @@
 	 * clear it, or we get junk noise */
 	/* some libc implementations are buggy: their memset reads from the buffer...
 	 * to work around it, we have to zero the block by hand. We don't do the expected:
-	 * memset(wwo->mapping,0, wwo->maplen); 
+	 * memset(wwo->mapping,0, wwo->maplen);
 	 */
 	{
 	    char*	p1 = wwo->mapping;
@@ -1594,7 +1594,7 @@
 	    if (len >= 16) /* so we can have at least a 4 long area to store... */
 	    {
 		/* the mmap:ed value is (at least) dword aligned
-		 * so, start filling the complete unsigned long:s 
+		 * so, start filling the complete unsigned long:s
 		 */
 		int		b = len >> 2;
 		unsigned long*	p4 = (unsigned long*)p1;
@@ -1825,7 +1825,7 @@
     strcpy(pDesc->szDesc,"WineOSS DirectSound Driver");
     strcpy(pDesc->szDrvName,"wineoss.drv");
     pDesc->dnDevNode		= WOutDev[This->wDevID].waveDesc.dnDevNode;
-    pDesc->wVxdId		= 0; 
+    pDesc->wVxdId		= 0;
     pDesc->wReserved		= 0;
     pDesc->ulDeviceNum		= This->wDevID;
     pDesc->dwHeapType		= DSDHEAP_NOHEAP;
@@ -1994,13 +1994,13 @@
 static DWORD widNotifyClient(WINE_WAVEIN* wwi, WORD wMsg, DWORD dwParam1, DWORD dwParam2)
 {
     TRACE("wMsg = 0x%04x dwParm1 = %04lX dwParam2 = %04lX\n", wMsg, dwParam1, dwParam2);
-    
+
     switch (wMsg) {
     case WIM_OPEN:
     case WIM_CLOSE:
     case WIM_DATA:
-	if (wwi->wFlags != DCB_NULL && 
-	    !DriverCallback(wwi->waveDesc.dwCallback, wwi->wFlags, wwi->waveDesc.hWave, 
+	if (wwi->wFlags != DCB_NULL &&
+	    !DriverCallback(wwi->waveDesc.dwCallback, wwi->wFlags, wwi->waveDesc.hWave,
 			    wMsg, wwi->waveDesc.dwInstance, dwParam1, dwParam2)) {
 	    WARN("can't notify client !\n");
 	    return MMSYSERR_ERROR;
@@ -2019,9 +2019,9 @@
 static DWORD widGetDevCaps(WORD wDevID, LPWAVEINCAPSA lpCaps, DWORD dwSize)
 {
     TRACE("(%u, %p, %lu);\n", wDevID, lpCaps, dwSize);
-    
+
     if (lpCaps == NULL) return MMSYSERR_NOTENABLED;
-    
+
     if (wDevID >= MAX_WAVEINDRV) {
 	TRACE("MAX_WAVINDRV reached !\n");
 	return MMSYSERR_BADDEVICEID;
@@ -2058,7 +2058,7 @@
      * (or GETISPACE will have 0 frags all the time)
      */
     read(wwi->unixdev,&xs,4);
-    
+
 	/* make sleep time to be # of ms to output a fragment */
     dwSleepTime = (wwi->dwFragmentSize * 1000) / wwi->format.wf.nAvgBytesPerSec;
     TRACE("sleeptime=%ld ms\n", dwSleepTime);
@@ -2069,7 +2069,7 @@
 	 * ie, number of queued fragments
 	 */
 
-	if (wwi->lpQueuePtr != NULL && wwi->state == WINE_WS_PLAYING) 
+	if (wwi->lpQueuePtr != NULL && wwi->state == WINE_WS_PLAYING)
         {
             lpWaveHdr = wwi->lpQueuePtr;
 
@@ -2084,8 +2084,8 @@
                 if (lpWaveHdr->dwBufferLength - lpWaveHdr->dwBytesRecorded >= wwi->dwFragmentSize)
                 {
                     /* directly read fragment in wavehdr */
-                    bytesRead = read(wwi->unixdev, 
-		      		     lpWaveHdr->lpData + lpWaveHdr->dwBytesRecorded, 
+                    bytesRead = read(wwi->unixdev,
+		      		     lpWaveHdr->lpData + lpWaveHdr->dwBytesRecorded,
                                      wwi->dwFragmentSize);
 
                     TRACE("bytesRead=%ld (direct)\n", bytesRead);
@@ -2094,9 +2094,9 @@
 			/* update number of bytes recorded in current buffer and by this device */
                         lpWaveHdr->dwBytesRecorded += bytesRead;
 			wwi->dwTotalRecorded       += bytesRead;
-				
+
 			/* buffer is full. notify client */
-			if (lpWaveHdr->dwBytesRecorded == lpWaveHdr->dwBufferLength) 
+			if (lpWaveHdr->dwBytesRecorded == lpWaveHdr->dwBufferLength)
 			{
 			    /* must copy the value of next waveHdr, because we have no idea of what
 			     * will be done with the content of lpWaveHdr in callback
@@ -2119,7 +2119,7 @@
 
                     TRACE("bytesRead=%ld (local)\n", bytesRead);
 
-                    /* copy data in client buffers */	
+                    /* copy data in client buffers */
                     while (bytesRead != (DWORD) -1 && bytesRead > 0)
                     {
                         DWORD dwToCopy = min (bytesRead, lpWaveHdr->dwBufferLength - lpWaveHdr->dwBytesRecorded);
@@ -2133,9 +2133,9 @@
                         wwi->dwTotalRecorded += dwToCopy;
                         bytesRead -= dwToCopy;
                         pOffset   += dwToCopy;
-				
+
                         /* client buffer is full. notify client */
-                        if (lpWaveHdr->dwBytesRecorded == lpWaveHdr->dwBufferLength) 
+                        if (lpWaveHdr->dwBytesRecorded == lpWaveHdr->dwBufferLength)
                         {
 			    /* must copy the value of next waveHdr, because we have no idea of what
 			     * will be done with the content of lpWaveHdr in callback
@@ -2147,12 +2147,12 @@
                             lpWaveHdr->dwFlags |=  WHDR_DONE;
 
                             widNotifyClient(wwi, WIM_DATA, (DWORD)lpWaveHdr, 0);
-				   
+
 			    wwi->lpQueuePtr = lpWaveHdr = lpNext;
 			    if (!lpNext && bytesRead) {
-                                /* no more buffer to copy data to, but we did read more. 
+                                /* no more buffer to copy data to, but we did read more.
                                  * what hasn't been copied will be dropped
-                                 */ 
+                                 */
                                 WARN("buffer under run! %lu bytes dropped.\n", bytesRead);
                                 wwi->lpQueuePtr = NULL;
                                 break;
@@ -2162,7 +2162,7 @@
                 }
             }
 	}
-	
+
 	WaitForSingleObject(wwi->msgRing.msg_event, dwSleepTime);
 
 	while (OSS_RetrieveRingMessage(&wwi->msgRing, &msg, &param, &ev))
@@ -2183,7 +2183,7 @@
                 if (wwi->bTriggerSupport)
                 {
                     /* start the recording */
-                    if (ioctl(wwi->unixdev, SNDCTL_DSP_SETTRIGGER, &enable) < 0) 
+                    if (ioctl(wwi->unixdev, SNDCTL_DSP_SETTRIGGER, &enable) < 0)
                     {
                         ERR("ioctl(SNDCTL_DSP_SETTRIGGER) failed (%d)\n", errno);
                     }
@@ -2194,7 +2194,7 @@
                     /* read 4 bytes to start the recording */
                     read(wwi->unixdev, data, 4);
                 }
-                
+
 		SetEvent(ev);
 		break;
             }
@@ -2216,7 +2216,7 @@
 		    TRACE("reset %p %p\n", lpWaveHdr, lpWaveHdr->lpNext);
 		    lpWaveHdr->dwFlags &= ~WHDR_INQUEUE;
 		    lpWaveHdr->dwFlags |= WHDR_DONE;
-	
+
 		    widNotifyClient(wwi, WIM_DATA, (DWORD)lpWaveHdr, 0);
 		}
 		wwi->lpQueuePtr = NULL;
@@ -2226,7 +2226,7 @@
 		wwi->hThread = 0;
 		wwi->state = WINE_WS_CLOSED;
 		SetEvent(ev);
-		HeapFree(GetProcessHeap(), 0, buffer); 
+		HeapFree(GetProcessHeap(), 0, buffer);
 		ExitThread(0);
 		/* shouldn't go here */
 	    default:
@@ -2237,7 +2237,7 @@
     }
     ExitThread(0);
     /* just for not generating compilation warnings... should never be executed */
-    return 0; 
+    return 0;
 }
 
 
@@ -2264,14 +2264,14 @@
     if (lpDesc->lpFormat->wFormatTag != WAVE_FORMAT_PCM ||
 	lpDesc->lpFormat->nChannels == 0 ||
 	lpDesc->lpFormat->nSamplesPerSec == 0) {
-	WARN("Bad format: tag=%04X nChannels=%d nSamplesPerSec=%ld !\n", 
+	WARN("Bad format: tag=%04X nChannels=%d nSamplesPerSec=%ld !\n",
 	     lpDesc->lpFormat->wFormatTag, lpDesc->lpFormat->nChannels,
 	     lpDesc->lpFormat->nSamplesPerSec);
 	return WAVERR_BADFORMAT;
     }
 
     if (dwFlags & WAVE_FORMAT_QUERY) {
-	TRACE("Query format: tag=%04X nChannels=%d nSamplesPerSec=%ld !\n", 
+	TRACE("Query format: tag=%04X nChannels=%d nSamplesPerSec=%ld !\n",
 	     lpDesc->lpFormat->wFormatTag, lpDesc->lpFormat->nChannels,
 	     lpDesc->lpFormat->nSamplesPerSec);
 	return MMSYSERR_NOERROR;
@@ -2279,7 +2279,7 @@
 
     wwi = &WInDev[wDevID];
     if (wwi->unixdev != -1) return MMSYSERR_ALLOCATED;
-    if ((wwi->unixdev = OSS_OpenDevice(wDevID, OSS_FullDuplex ? O_RDWR : O_RDONLY)) == -1) 
+    if ((wwi->unixdev = OSS_OpenDevice(wDevID, OSS_FullDuplex ? O_RDWR : O_RDONLY)) == -1)
 	return MMSYSERR_ALLOCATED;
     fcntl(wwi->unixdev, F_SETFD, 1); /* set close on exec flag */
     if (wwi->lpQueuePtr) {
@@ -2319,13 +2319,13 @@
 
     /* paranoid checks */
     if (format != ((wwi->format.wBitsPerSample == 16) ? AFMT_S16_LE : AFMT_U8))
-	ERR("Can't set format to %d (%d)\n", 
+	ERR("Can't set format to %d (%d)\n",
 	    (wwi->format.wBitsPerSample == 16) ? AFMT_S16_LE : AFMT_U8, format);
-    if (dsp_stereo != (wwi->format.wf.nChannels > 1) ? 1 : 0) 
-	ERR("Can't set stereo to %u (%d)\n", 
+    if (dsp_stereo != (wwi->format.wf.nChannels > 1) ? 1 : 0)
+	ERR("Can't set stereo to %u (%d)\n",
 	    (wwi->format.wf.nChannels > 1) ? 1 : 0, dsp_stereo);
     if (!NEAR_MATCH(sample_rate, wwi->format.wf.nSamplesPerSec))
-	ERR("Can't set sample_rate to %lu (%d)\n", 
+	ERR("Can't set sample_rate to %lu (%d)\n",
 	    wwi->format.wf.nSamplesPerSec, sample_rate);
 
     ioctl(wwi->unixdev, SNDCTL_DSP_GETBLKSIZE, &fragment_size);
@@ -2337,8 +2337,8 @@
     }
     wwi->dwFragmentSize = fragment_size;
 
-    TRACE("wBitsPerSample=%u, nAvgBytesPerSec=%lu, nSamplesPerSec=%lu, nChannels=%u nBlockAlign=%u!\n", 
-	  wwi->format.wBitsPerSample, wwi->format.wf.nAvgBytesPerSec, 
+    TRACE("wBitsPerSample=%u, nAvgBytesPerSec=%lu, nSamplesPerSec=%lu, nChannels=%u nBlockAlign=%u!\n",
+	  wwi->format.wBitsPerSample, wwi->format.wf.nAvgBytesPerSec,
 	  wwi->format.wf.nSamplesPerSec, wwi->format.wf.nChannels,
 	  wwi->format.wf.nBlockAlign);
 
@@ -2405,7 +2405,7 @@
     lpWaveHdr->dwFlags &= ~WHDR_DONE;
     lpWaveHdr->dwBytesRecorded = 0;
     lpWaveHdr->lpNext = NULL;
-	
+
     OSS_AddRingMessage(&WInDev[wDevID].msgRing, WINE_WM_HEADER, (DWORD)lpWaveHdr, FALSE);
     return MMSYSERR_NOERROR;
 }
@@ -2442,7 +2442,7 @@
 
     lpWaveHdr->dwFlags &= ~WHDR_PREPARED;
     lpWaveHdr->dwFlags |= WHDR_DONE;
-    
+
     return MMSYSERR_NOERROR;
 }
 
@@ -2473,7 +2473,7 @@
     }
     /* FIXME: reset aint stop */
     OSS_AddRingMessage(&WInDev[wDevID].msgRing, WINE_WM_RESETTING, 0, TRUE);
-    
+
     return MMSYSERR_NOERROR;
 }
 
@@ -2498,7 +2498,7 @@
 {
     int			time;
     WINE_WAVEIN*	wwi;
-    
+
     TRACE("(%u, %p, %lu);\n", wDevID, lpTime, uSize);
 
     if (wDevID >= MAX_WAVEINDRV || WInDev[wDevID].unixdev == -1) {
@@ -2510,10 +2510,10 @@
     wwi = &WInDev[wDevID];
 
     TRACE("wType=%04X !\n", lpTime->wType);
-    TRACE("wBitsPerSample=%u\n", wwi->format.wBitsPerSample); 
-    TRACE("nSamplesPerSec=%lu\n", wwi->format.wf.nSamplesPerSec); 
-    TRACE("nChannels=%u\n", wwi->format.wf.nChannels); 
-    TRACE("nAvgBytesPerSec=%lu\n", wwi->format.wf.nAvgBytesPerSec); 
+    TRACE("wBitsPerSample=%u\n", wwi->format.wBitsPerSample);
+    TRACE("nSamplesPerSec=%lu\n", wwi->format.wf.nSamplesPerSec);
+    TRACE("nChannels=%u\n", wwi->format.wf.nChannels);
+    TRACE("nAvgBytesPerSec=%lu\n", wwi->format.wf.nAvgBytesPerSec);
     switch (lpTime->wType) {
     case TIME_BYTES:
 	lpTime->u.cb = wwi->dwTotalRecorded;
@@ -2554,7 +2554,7 @@
 /**************************************************************************
  * 				widMessage (WINEOSS.6)
  */
-DWORD WINAPI OSS_widMessage(WORD wDevID, WORD wMsg, DWORD dwUser, 
+DWORD WINAPI OSS_widMessage(WORD wDevID, WORD wMsg, DWORD dwUser,
 			    DWORD dwParam1, DWORD dwParam2)
 {
     TRACE("(%u, %04X, %08lX, %08lX, %08lX);\n",
@@ -2589,7 +2589,7 @@
 /**************************************************************************
  * 				wodMessage (WINEOSS.7)
  */
-DWORD WINAPI OSS_wodMessage(WORD wDevID, WORD wMsg, DWORD dwUser, 
+DWORD WINAPI OSS_wodMessage(WORD wDevID, WORD wMsg, DWORD dwUser,
 			    DWORD dwParam1, DWORD dwParam2)
 {
     FIXME("(%u, %04X, %08lX, %08lX, %08lX):stub\n", wDevID, wMsg, dwUser, dwParam1, dwParam2);
@@ -2599,7 +2599,7 @@
 /**************************************************************************
  * 				widMessage (WINEOSS.6)
  */
-DWORD WINAPI OSS_widMessage(WORD wDevID, WORD wMsg, DWORD dwUser, 
+DWORD WINAPI OSS_widMessage(WORD wDevID, WORD wMsg, DWORD dwUser,
 			    DWORD dwParam1, DWORD dwParam2)
 {
     FIXME("(%u, %04X, %08lX, %08lX, %08lX):stub\n", wDevID, wMsg, dwUser, dwParam1, dwParam2);
diff --git a/dlls/winmm/wineoss/midi.c b/dlls/winmm/wineoss/midi.c
index 08dfb2e..0c3dc9d 100644
--- a/dlls/winmm/wineoss/midi.c
+++ b/dlls/winmm/wineoss/midi.c
@@ -5,7 +5,7 @@
  *
  * Copyright 1994 	Martin Ayotte
  * Copyright 1998 	Luiz Otavio L. Zorzella (init procedures)
- * Copyright 1998/1999	Eric POUECH : 
+ * Copyright 1998/1999	Eric POUECH :
  * 		98/7 	changes for making this MIDI driver work on OSS
  * 			current support is limited to MIDI ports of OSS systems
  * 		98/9	rewriting MCI code for MIDI
@@ -76,16 +76,16 @@
 static WINE_MIDIOUT	MidiOutDev[MAX_MIDIOUTDRV];
 
 /* this is the total number of MIDI out devices found */
-static	int 		MODM_NUMDEVS = 0;				
-/* this is the number of FM synthetizers (index from 0 to 
+static	int 		MODM_NUMDEVS = 0;
+/* this is the number of FM synthetizers (index from 0 to
    NUMFMSYNTHDEVS - 1) */
-static	int		MODM_NUMFMSYNTHDEVS = 0;	
-/* this is the number of Midi ports (index from NUMFMSYNTHDEVS to 
+static	int		MODM_NUMFMSYNTHDEVS = 0;
+/* this is the number of Midi ports (index from NUMFMSYNTHDEVS to
    NUMFMSYNTHDEVS + NUMMIDIDEVS - 1) */
-static	int		MODM_NUMMIDIDEVS = 0;		
+static	int		MODM_NUMMIDIDEVS = 0;
 
 /* this is the total number of MIDI out devices found */
-static	int 		MIDM_NUMDEVS = 0;				
+static	int 		MIDM_NUMDEVS = 0;
 
 static	int		midiSeqFD = -1;
 static	int		numOpenMidiSeq = 0;
@@ -102,8 +102,8 @@
  */
 static	LPMIDIINCAPSA	midiInDevices [MAX_MIDIINDRV];
 
-/* 
- * FIXME : all tests on device ID for midXXX and modYYY are made against 
+/*
+ * FIXME : all tests on device ID for midXXX and modYYY are made against
  * MAX_MIDIxxDRV (when they are made) but should be done against the actual
  * number of midi devices found...
  */
@@ -123,16 +123,16 @@
  */
 static	int 	MIDI_UnixToWindowsDeviceType(int type)
 {
-    /* MOD_MIDIPORT     output port 
-     * MOD_SYNTH        generic internal synth 
-     * MOD_SQSYNTH      square wave internal synth 
-     * MOD_FMSYNTH      FM internal synth 
+    /* MOD_MIDIPORT     output port
+     * MOD_SYNTH        generic internal synth
+     * MOD_SQSYNTH      square wave internal synth
+     * MOD_FMSYNTH      FM internal synth
      * MOD_MAPPER       MIDI mapper
      */
-    
-    /* FIXME Is this really the correct equivalence from UNIX to 
+
+    /* FIXME Is this really the correct equivalence from UNIX to
        Windows Sound type */
-    
+
     switch (type) {
     case SYNTH_TYPE_FM:     return MOD_FMSYNTH;
     case SYNTH_TYPE_SAMPLE: return MOD_SYNTH;
@@ -162,15 +162,15 @@
 
     TRACE("Initializing the MIDI variables.\n");
     bInitDone = TRUE;
-    
+
     /* try to open device */
     if (midiOpenSeq() == -1) {
 	return TRUE;
     }
-    
+
     /* find how many Synth devices are there in the system */
     status = ioctl(midiSeqFD, SNDCTL_SEQ_NRSYNTHS, &numsynthdevs);
-    
+
     if (status == -1) {
 	ERR("ioctl for nr synth failed.\n");
 	midiCloseSeq();
@@ -182,10 +182,10 @@
 	    "Some FM devices will not be available.\n",MAX_MIDIOUTDRV,numsynthdevs);
 	numsynthdevs = MAX_MIDIOUTDRV;
     }
-    
+
     for (i = 0; i < numsynthdevs; i++) {
 	LPMIDIOUTCAPSA	tmplpCaps;
-	
+
 	sinfo.device = i;
 	status = ioctl(midiSeqFD, SNDCTL_SYNTH_INFO, &sinfo);
 	if (status == -1) {
@@ -193,32 +193,32 @@
 	    midiCloseSeq();
 	    return TRUE;
 	}
-	
+
 	tmplpCaps = HeapAlloc(GetProcessHeap(), 0, sizeof(MIDIOUTCAPSA));
 	if (!tmplpCaps)
 	    break;
 	/* We also have the information sinfo.synth_subtype, not used here
 	 */
-	
+
 	/* Manufac ID. We do not have access to this with soundcard.h
 	 * Does not seem to be a problem, because in mmsystem.h only
 	 * Microsoft's ID is listed.
 	 */
-	tmplpCaps->wMid = 0x00FF; 
+	tmplpCaps->wMid = 0x00FF;
 	tmplpCaps->wPid = 0x0001; 	/* FIXME Product ID  */
 	/* Product Version. We simply say "1" */
-	tmplpCaps->vDriverVersion = 0x001; 
+	tmplpCaps->vDriverVersion = 0x001;
 	strcpy(tmplpCaps->szPname, sinfo.name);
-	
+
 	tmplpCaps->wTechnology = MIDI_UnixToWindowsDeviceType(sinfo.synth_type);
 	tmplpCaps->wVoices     = sinfo.nr_voices;
-	
+
 	/* FIXME Is it possible to know the maximum
 	 * number of simultaneous notes of a soundcard ?
 	 * I believe we don't have this information, but
 	 * it's probably equal or more than wVoices
 	 */
-	tmplpCaps->wNotes      = sinfo.nr_voices;  
+	tmplpCaps->wNotes      = sinfo.nr_voices;
 	tmplpCaps->wChannelMask= 0xFFFF;
 
 	/* FIXME Do we have this information?
@@ -227,20 +227,20 @@
 	 * not MIDICAPS_CACHE.
 	 */
 	tmplpCaps->dwSupport   = MIDICAPS_VOLUME|MIDICAPS_LRVOLUME;
-	
+
 	midiOutDevices[i] = tmplpCaps;
-	
+
 	if (sinfo.capabilities & SYNTH_CAP_INPUT) {
 	    FIXME("Synthesizer support MIDI in. Not supported yet (please report)\n");
 	}
-	
+
 	TRACE("SynthOut[%d]\tname='%s' techn=%d voices=%d notes=%d chnMsk=%04x support=%ld\n"
-	      "\tOSS info: synth subtype=%d capa=%lx\n", 
+	      "\tOSS info: synth subtype=%d capa=%lx\n",
 	      i, tmplpCaps->szPname, tmplpCaps->wTechnology, tmplpCaps->wVoices,
 	      tmplpCaps->wNotes, tmplpCaps->wChannelMask, tmplpCaps->dwSupport,
 	      sinfo.synth_subtype, (long)sinfo.capabilities);
     }
-    
+
     /* find how many MIDI devices are there in the system */
     status = ioctl(midiSeqFD, SNDCTL_SEQ_NRMIDIS, &nummididevs);
     if (status == -1) {
@@ -248,24 +248,24 @@
 	midiCloseSeq();
 	return TRUE;
     }
-    
+
     /* FIXME: the two restrictions below could be loosen in some cases */
     if (numsynthdevs + nummididevs > MAX_MIDIOUTDRV) {
 	ERR("MAX_MIDIOUTDRV was not enough for the number of devices. "
 	    "Some MIDI devices will not be available.\n");
 	nummididevs = MAX_MIDIOUTDRV - numsynthdevs;
     }
-    
+
     if (nummididevs > MAX_MIDIINDRV) {
 	ERR("MAX_MIDIINDRV (%d) was not enough for the number of devices (%d). "
 	    "Some MIDI devices will not be available.\n",MAX_MIDIINDRV,nummididevs);
 	nummididevs = MAX_MIDIINDRV;
     }
-    
+
     for (i = 0; i < nummididevs; i++) {
 	LPMIDIOUTCAPSA	tmplpOutCaps;
 	LPMIDIINCAPSA	tmplpInCaps;
-	
+
 	minfo.device = i;
 	status = ioctl(midiSeqFD, SNDCTL_MIDI_INFO, &minfo);
 	if (status == -1) {
@@ -273,113 +273,113 @@
 	    midiCloseSeq();
 	    return TRUE;
 	}
-	
+
 	tmplpOutCaps = HeapAlloc(GetProcessHeap(), 0, sizeof(MIDIOUTCAPSA));
 	if (!tmplpOutCaps)
 	    break;
 	/* This whole part is somewhat obscure to me. I'll keep trying to dig
-	   info about it. If you happen to know, please tell us. The very 
+	   info about it. If you happen to know, please tell us. The very
 	   descritive minfo.dev_type was not used here.
 	*/
 	/* Manufac ID. We do not have access to this with soundcard.h
 	   Does not seem to be a problem, because in mmsystem.h only
 	   Microsoft's ID is listed */
-	tmplpOutCaps->wMid = 0x00FF; 	
+	tmplpOutCaps->wMid = 0x00FF;
 	tmplpOutCaps->wPid = 0x0001; 	/* FIXME Product ID */
 	/* Product Version. We simply say "1" */
-	tmplpOutCaps->vDriverVersion = 0x001; 
+	tmplpOutCaps->vDriverVersion = 0x001;
 	strcpy(tmplpOutCaps->szPname, minfo.name);
-	
+
 	tmplpOutCaps->wTechnology = MOD_MIDIPORT; /* FIXME Is this right? */
 	/* Does it make any difference? */
-	tmplpOutCaps->wVoices     = 16;            
+	tmplpOutCaps->wVoices     = 16;
 	/* Does it make any difference? */
 	tmplpOutCaps->wNotes      = 16;
 	tmplpOutCaps->wChannelMask= 0xFFFF;
 
 	/* FIXME Does it make any difference? */
-	tmplpOutCaps->dwSupport   = MIDICAPS_VOLUME|MIDICAPS_LRVOLUME; 
-	
+	tmplpOutCaps->dwSupport   = MIDICAPS_VOLUME|MIDICAPS_LRVOLUME;
+
 	midiOutDevices[numsynthdevs + i] = tmplpOutCaps;
-	
+
 	tmplpInCaps = HeapAlloc(GetProcessHeap(), 0, sizeof(MIDIINCAPSA));
 	if (!tmplpInCaps)
 	    break;
 	/* This whole part is somewhat obscure to me. I'll keep trying to dig
-	   info about it. If you happen to know, please tell us. The very 
+	   info about it. If you happen to know, please tell us. The very
 	   descritive minfo.dev_type was not used here.
 	*/
 	/* Manufac ID. We do not have access to this with soundcard.h
 	   Does not seem to be a problem, because in mmsystem.h only
 	   Microsoft's ID is listed */
-	tmplpInCaps->wMid = 0x00FF; 	
+	tmplpInCaps->wMid = 0x00FF;
 	tmplpInCaps->wPid = 0x0001; 	/* FIXME Product ID */
 	/* Product Version. We simply say "1" */
-	tmplpInCaps->vDriverVersion = 0x001; 
+	tmplpInCaps->vDriverVersion = 0x001;
 	strcpy(tmplpInCaps->szPname, minfo.name);
-	
+
 	/* FIXME : could we get better information than that ? */
-	tmplpInCaps->dwSupport   = MIDICAPS_VOLUME|MIDICAPS_LRVOLUME; 
-	
+	tmplpInCaps->dwSupport   = MIDICAPS_VOLUME|MIDICAPS_LRVOLUME;
+
 	midiInDevices[i] = tmplpInCaps;
-	
+
 	TRACE("MidiOut[%d]\tname='%s' techn=%d voices=%d notes=%d chnMsk=%04x support=%ld\n"
               "MidiIn [%d]\tname='%s' support=%ld\n"
-	      "\tOSS info: midi dev-type=%d, capa=%lx\n", 
-	      i, tmplpOutCaps->szPname, tmplpOutCaps->wTechnology, 
-	      tmplpOutCaps->wVoices, tmplpOutCaps->wNotes, 
+	      "\tOSS info: midi dev-type=%d, capa=%lx\n",
+	      i, tmplpOutCaps->szPname, tmplpOutCaps->wTechnology,
+	      tmplpOutCaps->wVoices, tmplpOutCaps->wNotes,
 	      tmplpOutCaps->wChannelMask, tmplpOutCaps->dwSupport,
 	      i, tmplpInCaps->szPname, tmplpInCaps->dwSupport,
 	      minfo.dev_type, (long)minfo.capabilities);
     }
-    
+
     /* windows does not seem to differentiate Synth from MIDI devices */
     MODM_NUMFMSYNTHDEVS = numsynthdevs;
     MODM_NUMMIDIDEVS    = nummididevs;
     MODM_NUMDEVS        = numsynthdevs + nummididevs;
-    
+
     MIDM_NUMDEVS        = nummididevs;
-    
+
     /* close file and exit */
     midiCloseSeq();
-    
+
     return TRUE;
 }
 
 /**************************************************************************
  * 			MIDI_NotifyClient			[internal]
  */
-static DWORD MIDI_NotifyClient(UINT wDevID, WORD wMsg, 
+static DWORD MIDI_NotifyClient(UINT wDevID, WORD wMsg,
 			       DWORD dwParam1, DWORD dwParam2)
 {
     DWORD 		dwCallBack;
     UINT 		uFlags;
     HANDLE		hDev;
     DWORD 		dwInstance;
-    
-    TRACE("wDevID = %04X wMsg = %d dwParm1 = %04lX dwParam2 = %04lX\n", 
+
+    TRACE("wDevID = %04X wMsg = %d dwParm1 = %04lX dwParam2 = %04lX\n",
 	  wDevID, wMsg, dwParam1, dwParam2);
-    
+
     switch (wMsg) {
     case MOM_OPEN:
     case MOM_CLOSE:
     case MOM_DONE:
-	if (wDevID > MAX_MIDIOUTDRV) 
+	if (wDevID > MAX_MIDIOUTDRV)
 	    return MCIERR_INTERNAL;
-	
+
 	dwCallBack = MidiOutDev[wDevID].midiDesc.dwCallback;
 	uFlags = MidiOutDev[wDevID].wFlags;
 	hDev = MidiOutDev[wDevID].midiDesc.hMidi;
 	dwInstance = MidiOutDev[wDevID].midiDesc.dwInstance;
 	break;
-	
+
     case MIM_OPEN:
     case MIM_CLOSE:
     case MIM_DATA:
     case MIM_ERROR:
-	if (wDevID > MAX_MIDIINDRV) 
+	if (wDevID > MAX_MIDIINDRV)
 	    return MCIERR_INTERNAL;
-	
+
 	dwCallBack = MidiInDev[wDevID].midiDesc.dwCallback;
 	uFlags = MidiInDev[wDevID].wFlags;
 	hDev = MidiInDev[wDevID].midiDesc.hMidi;
@@ -389,7 +389,7 @@
 	WARN("Unsupported MSW-MIDI message %u\n", wMsg);
 	return MCIERR_INTERNAL;
     }
-    
+
     return DriverCallback(dwCallBack, uFlags, hDev, wMsg, dwInstance, dwParam1, dwParam2) ?
 	0 : MCIERR_INTERNAL;
 }
@@ -447,8 +447,8 @@
 /* FIXME: this is a bad idea, it's even not static... */
 SEQ_DEFINEBUF(1024);
 
-/* FIXME: this is not reentrant, not static - because of global variable 
- * _seqbuf and al. 
+/* FIXME: this is not reentrant, not static - because of global variable
+ * _seqbuf and al.
  */
 /**************************************************************************
  * 			seqbuf_dump				[internal]
@@ -457,12 +457,12 @@
 {
     if (_seqbufptr) {
 	if (write(midiSeqFD, _seqbuf, _seqbufptr) == -1) {
-	    WARN("Can't write data to sequencer %d, errno %d (%s)!\n", 
+	    WARN("Can't write data to sequencer %d, errno %d (%s)!\n",
 		 midiSeqFD, errno, strerror(errno));
 	}
 	/* FIXME:
-	 *	in any case buffer is lost so that if many errors occur the buffer 
-	 * will not overrun 
+	 *	in any case buffer is lost so that if many errors occur the buffer
+	 * will not overrun
 	 */
 	_seqbufptr = 0;
     }
@@ -471,9 +471,9 @@
 static void midReceiveChar(WORD wDevID, unsigned char value, DWORD dwTime)
 {
     DWORD		toSend = 0;
-    
+
     TRACE("Adding %02xh to %d[%d]\n", value, wDevID, MidiInDev[wDevID].incLen);
-    
+
     if (wDevID >= MAX_MIDIINDRV) {
 	WARN("bad devID\n");
 	return;
@@ -489,11 +489,11 @@
 
 	if (lpMidiHdr) {
 	    LPBYTE	lpData = lpMidiHdr->lpData;
-	
+
 	    lpData[lpMidiHdr->dwBytesRecorded++] = value;
 	    if (lpMidiHdr->dwBytesRecorded == lpMidiHdr->dwBufferLength) {
 		sbfb = TRUE;
-	    } 
+	    }
 	}
 	if (value == 0xF7) { /* then end */
 	    MidiInDev[wDevID].state &= ~2;
@@ -510,10 +510,10 @@
 	}
 	return;
     }
-    
+
 #define IS_CMD(_x)	(((_x) & 0x80) == 0x80)
 #define IS_SYS_CMD(_x)	(((_x) & 0xF0) == 0xF0)
-    
+
     if (!IS_CMD(value) && MidiInDev[wDevID].incLen == 0) { /* try to reuse old cmd */
 	if (IS_CMD(MidiInDev[wDevID].incPrev) && !IS_SYS_CMD(MidiInDev[wDevID].incPrev)) {
 	    MidiInDev[wDevID].incoming[0] = MidiInDev[wDevID].incPrev;
@@ -521,7 +521,7 @@
 	    TRACE("Reusing old command %02xh\n", MidiInDev[wDevID].incPrev);
 	} else {
 	    FIXME("error for midi-in, should generate MIM_ERROR notification:"
-		  " prev=%02Xh, incLen=%02Xh\n", 
+		  " prev=%02Xh, incLen=%02Xh\n",
 		  MidiInDev[wDevID].incPrev, MidiInDev[wDevID].incLen);
 	    return;
 	}
@@ -542,7 +542,7 @@
     case MIDI_CTL_CHANGE:
     case MIDI_PITCH_BEND:
 	if (MidiInDev[wDevID].incLen == 3) {
-	    toSend = (MidiInDev[wDevID].incoming[2] << 16) | 
+	    toSend = (MidiInDev[wDevID].incoming[2] << 16) |
 		(MidiInDev[wDevID].incoming[1] <<  8) |
 		(MidiInDev[wDevID].incoming[0] <<  0);
 	}
@@ -558,7 +558,7 @@
 	if (MidiInDev[wDevID].incoming[0] == 0xF0) {
 	    MidiInDev[wDevID].state |= 2;
 	    MidiInDev[wDevID].incLen = 0;
-	} else {		
+	} else {
 	    if (MidiInDev[wDevID].incLen == 1) {
 		toSend = (MidiInDev[wDevID].incoming[0] <<  0);
 	    }
@@ -581,24 +581,24 @@
 {
     unsigned	char		buffer[256];
     int				len, idx;
-    
+
     TRACE("(%04X, %d, %d, %lu)\n", hwnd, msg, id, dwTime);
-    
+
     len = read(midiSeqFD, buffer, sizeof(buffer));
-    
+
     if (len < 0) return;
     if ((len % 4) != 0) {
 	WARN("Bad length %d, errno %d (%s)\n", len, errno, strerror(errno));
 	return;
     }
-    
+
     for (idx = 0; idx < len; ) {
 	if (buffer[idx] & 0x80) {
 	    TRACE(
-		  "Reading<8> %02x %02x %02x %02x %02x %02x %02x %02x\n", 
-		  buffer[idx + 0], buffer[idx + 1], 
-		  buffer[idx + 2], buffer[idx + 3], 
-		  buffer[idx + 4], buffer[idx + 5], 
+		  "Reading<8> %02x %02x %02x %02x %02x %02x %02x %02x\n",
+		  buffer[idx + 0], buffer[idx + 1],
+		  buffer[idx + 2], buffer[idx + 3],
+		  buffer[idx + 4], buffer[idx + 5],
 		  buffer[idx + 6], buffer[idx + 7]);
 	    idx += 8;
 	} else {
@@ -614,7 +614,7 @@
 		break;
 	    }
 	    idx += 4;
-	}				
+	}
     }
 }
 
@@ -624,12 +624,12 @@
 static DWORD midGetDevCaps(WORD wDevID, LPMIDIINCAPSA lpCaps, DWORD dwSize)
 {
     TRACE("(%04X, %p, %08lX);\n", wDevID, lpCaps, dwSize);
-    
+
     if (wDevID >= MIDM_NUMDEVS) return MMSYSERR_BADDEVICEID;
     if (lpCaps == NULL)		return MMSYSERR_INVALPARAM;
 
     memcpy(lpCaps, midiInDevices[wDevID], min(dwSize, sizeof(*lpCaps)));
-    
+
     return MMSYSERR_NOERROR;
 }
 
@@ -639,7 +639,7 @@
 static DWORD midOpen(WORD wDevID, LPMIDIOPENDESC lpDesc, DWORD dwFlags)
 {
     TRACE("(%04X, %p, %08lX);\n", wDevID, lpDesc, dwFlags);
-    
+
     if (lpDesc == NULL) {
 	WARN("Invalid Parameter !\n");
 	return MMSYSERR_INVALPARAM;
@@ -656,19 +656,19 @@
 	WARN("device already open !\n");
 	return MMSYSERR_ALLOCATED;
     }
-    if ((dwFlags & MIDI_IO_STATUS) != 0) { 
+    if ((dwFlags & MIDI_IO_STATUS) != 0) {
 	WARN("No support for MIDI_IO_STATUS in dwFlags yet, ignoring it\n");
 	dwFlags &= ~MIDI_IO_STATUS;
     }
-    if ((dwFlags & ~CALLBACK_TYPEMASK) != 0) { 
+    if ((dwFlags & ~CALLBACK_TYPEMASK) != 0) {
 	FIXME("Bad dwFlags\n");
 	return MMSYSERR_INVALFLAG;
     }
-    
+
     if (midiOpenSeq() < 0) {
 	return MMSYSERR_ERROR;
     }
-    
+
     if (numStartedMidiIn++ == 0) {
 	midiInTimerID = SetTimer(0, 0, 250, midTimeCallback);
 	if (!midiInTimerID) {
@@ -679,7 +679,7 @@
 	}
 	TRACE("Starting timer (%u) for midi-in\n", midiInTimerID);
     }
-    
+
     MidiInDev[wDevID].wFlags = HIWORD(dwFlags & CALLBACK_TYPEMASK);
 
     MidiInDev[wDevID].lpQueueHdr = NULL;
@@ -703,9 +703,9 @@
 static DWORD midClose(WORD wDevID)
 {
     int		ret = MMSYSERR_NOERROR;
-    
+
     TRACE("(%04X);\n", wDevID);
-    
+
     if (wDevID >= MAX_MIDIINDRV) {
 	WARN("wDevID too big (%u) !\n", wDevID);
 	return MMSYSERR_BADDEVICEID;
@@ -717,7 +717,7 @@
     if (MidiInDev[wDevID].lpQueueHdr != 0) {
 	return MIDIERR_STILLPLAYING;
     }
-    
+
     if (midiSeqFD == -1) {
 	WARN("ooops !\n");
 	return MMSYSERR_ERROR;
@@ -726,7 +726,7 @@
 	TRACE("Stopping timer for midi-in\n");
 	if (!KillTimer(0, midiInTimerID)) {
 	    WARN("Couldn't stop timer for midi-in\n");
-	}			
+	}
 	midiInTimerID = 0;
     }
     midiCloseSeq();
@@ -746,20 +746,20 @@
 static DWORD midAddBuffer(WORD wDevID, LPMIDIHDR lpMidiHdr, DWORD dwSize)
 {
     TRACE("(%04X, %p, %08lX);\n", wDevID, lpMidiHdr, dwSize);
-    
+
     if (lpMidiHdr == NULL)	return MMSYSERR_INVALPARAM;
     if (sizeof(MIDIHDR) > dwSize) return MMSYSERR_INVALPARAM;
     if (lpMidiHdr->dwBufferLength == 0) return MMSYSERR_INVALPARAM;
     if (lpMidiHdr->dwFlags & MHDR_INQUEUE) return MIDIERR_STILLPLAYING;
     if (!(lpMidiHdr->dwFlags & MHDR_PREPARED)) return MIDIERR_UNPREPARED;
-    
+
     if (MidiInDev[wDevID].lpQueueHdr == 0) {
 	MidiInDev[wDevID].lpQueueHdr = lpMidiHdr;
     } else {
 	LPMIDIHDR	ptr;
-	
-	for (ptr = MidiInDev[wDevID].lpQueueHdr; 
-	     ptr->lpNext != 0; 
+
+	for (ptr = MidiInDev[wDevID].lpQueueHdr;
+	     ptr->lpNext != 0;
 	     ptr = (LPMIDIHDR)ptr->lpNext);
 	ptr->lpNext = (struct midihdr_tag*)lpMidiHdr;
     }
@@ -772,16 +772,16 @@
 static DWORD midPrepare(WORD wDevID, LPMIDIHDR lpMidiHdr, DWORD dwSize)
 {
     TRACE("(%04X, %p, %08lX);\n", wDevID, lpMidiHdr, dwSize);
-    
-    if (dwSize < sizeof(MIDIHDR) || lpMidiHdr == 0 || 
-	lpMidiHdr->lpData == 0 || lpMidiHdr->dwFlags != 0 || 
+
+    if (dwSize < sizeof(MIDIHDR) || lpMidiHdr == 0 ||
+	lpMidiHdr->lpData == 0 || lpMidiHdr->dwFlags != 0 ||
 	lpMidiHdr->dwBufferLength >= 0x10000ul)
 	return MMSYSERR_INVALPARAM;
-    
+
     lpMidiHdr->lpNext = 0;
     lpMidiHdr->dwFlags |= MHDR_PREPARED;
     lpMidiHdr->dwBytesRecorded = 0;
-    
+
     return MMSYSERR_NOERROR;
 }
 
@@ -791,16 +791,16 @@
 static DWORD midUnprepare(WORD wDevID, LPMIDIHDR lpMidiHdr, DWORD dwSize)
 {
     TRACE("(%04X, %p, %08lX);\n", wDevID, lpMidiHdr, dwSize);
-    
-    if (dwSize < sizeof(MIDIHDR) || lpMidiHdr == 0 || 
+
+    if (dwSize < sizeof(MIDIHDR) || lpMidiHdr == 0 ||
 	lpMidiHdr->lpData == 0 || lpMidiHdr->dwBufferLength >= 0x10000ul)
 	return MMSYSERR_INVALPARAM;
-    
+
     if (!(lpMidiHdr->dwFlags & MHDR_PREPARED)) return MIDIERR_UNPREPARED;
     if (lpMidiHdr->dwFlags & MHDR_INQUEUE) return MIDIERR_STILLPLAYING;
-    
+
     lpMidiHdr->dwFlags &= ~MHDR_PREPARED;
-    
+
     return MMSYSERR_NOERROR;
 }
 
@@ -810,20 +810,20 @@
 static DWORD midReset(WORD wDevID)
 {
     DWORD		dwTime = GetTickCount();
-    
+
     TRACE("(%04X);\n", wDevID);
-    
+
     while (MidiInDev[wDevID].lpQueueHdr) {
 	MidiInDev[wDevID].lpQueueHdr->dwFlags &= ~MHDR_INQUEUE;
 	MidiInDev[wDevID].lpQueueHdr->dwFlags |= MHDR_DONE;
 	/* FIXME: when called from 16 bit, lpQueueHdr needs to be a segmented ptr */
-	if (MIDI_NotifyClient(wDevID, MIM_LONGDATA, 
+	if (MIDI_NotifyClient(wDevID, MIM_LONGDATA,
 			      (DWORD)MidiInDev[wDevID].lpQueueHdr, dwTime) != MMSYSERR_NOERROR) {
 	    WARN("Couldn't notify client\n");
 	}
 	MidiInDev[wDevID].lpQueueHdr = (LPMIDIHDR)MidiInDev[wDevID].lpQueueHdr->lpNext;
     }
-    
+
     return MMSYSERR_NOERROR;
 }
 
@@ -834,9 +834,9 @@
 static DWORD midStart(WORD wDevID)
 {
     TRACE("(%04X);\n", wDevID);
-    
+
     /* FIXME : should test value of wDevID */
-    
+
     MidiInDev[wDevID].state = 1;
     MidiInDev[wDevID].startTime = GetTickCount();
     return MMSYSERR_NOERROR;
@@ -848,7 +848,7 @@
 static DWORD midStop(WORD wDevID)
 {
     TRACE("(%04X);\n", wDevID);
-    
+
     /* FIXME : should test value of wDevID */
     MidiInDev[wDevID].state = 0;
     return MMSYSERR_NOERROR;
@@ -868,7 +868,7 @@
 
 typedef struct sChannel {
     int			program;
-    
+
     int			bender;
     int			benderRange;
     /* controlers */
@@ -877,7 +877,7 @@
     int			balance;	/* CTL_BALANCE     */
     int			expression;	/* CTL_EXPRESSION  */
     int			sustain;	/* CTL_SUSTAIN     */
-    
+
     unsigned char	nrgPmtMSB;	/* Non register Parameters */
     unsigned char	nrgPmtLSB;
     unsigned char	regPmtMSB;	/* Non register Parameters */
@@ -889,7 +889,7 @@
     int			drumSetMask;
     sChannel		channel[16];	/* MIDI has only 16 channels */
     sVoice		voice[1];	/* dyn allocated according to sound card */
-    /* do not append fields below voice[1] since the size of this structure 
+    /* do not append fields below voice[1] since the size of this structure
      * depends on the number of available voices on the FM synth...
      */
 } sFMextra;
@@ -904,29 +904,29 @@
 {
     int				i;
     struct sbi_instrument	sbi;
-    
+
     sbi.device = dev;
     sbi.key = FM_PATCH;
-    
+
     memset(sbi.operators + 16, 0, 16);
     for (i = 0; i < 128; i++) {
 	sbi.channel = i;
 	memcpy(sbi.operators, midiFMInstrumentPatches + i * 16, 16);
-	
+
 	if (write(midiSeqFD, (char*)&sbi, sizeof(sbi)) == -1) {
 	    WARN("Couldn't write patch for instrument %d, errno %d (%s)!\n", sbi.channel, errno, strerror(errno));
 	    return -1;
 	}
-    } 
+    }
     for (i = 0; i < 128; i++) {
 	sbi.channel = 128 + i;
 	memcpy(sbi.operators, midiFMDrumsPatches + i * 16, 16);
-	
+
 	if (write(midiSeqFD, (char*)&sbi, sizeof(sbi)) == -1) {
 	    WARN("Couldn't write patch for drum %d, errno %d (%s)!\n", sbi.channel, errno, strerror(errno));
 	    return -1;
 	}
-    } 
+    }
     return 0;
 }
 
@@ -939,7 +939,7 @@
     sVoice* 	voice   = extra->voice;
     sChannel*	channel = extra->channel;
     int		i;
-    
+
     for (i = 0; i < midiOutDevices[wDevID]->wVoices; i++) {
 	if (voice[i].status != sVS_UNUSED) {
 	    SEQ_STOP_NOTE(wDevID, i, voice[i].note, 64);
@@ -958,8 +958,8 @@
 	channel[i].bank = 0;
 	channel[i].volume = 127;
 	channel[i].balance = 64;
-	channel[i].expression = 0;	
-	channel[i].sustain = 0;	
+	channel[i].expression = 0;
+	channel[i].sustain = 0;
     }
     extra->counter = 0;
     extra->drumSetMask = 1 << 9; /* channel 10 is normally drums, sometimes 16 also */
@@ -1001,7 +1001,7 @@
 	WARN("device already open !\n");
 	return MMSYSERR_ALLOCATED;
     }
-    if ((dwFlags & ~CALLBACK_TYPEMASK) != 0) { 
+    if ((dwFlags & ~CALLBACK_TYPEMASK) != 0) {
 	WARN("bad dwFlags\n");
 	return MMSYSERR_INVALFLAG;
     }
@@ -1009,16 +1009,16 @@
 	TRACE("un-allocated wDevID\n");
 	return MMSYSERR_BADDEVICEID;
     }
-    
+
     MidiOutDev[wDevID].lpExtra = 0;
-    
+
     switch (midiOutDevices[wDevID]->wTechnology) {
     case MOD_FMSYNTH:
 	{
-	    void*	extra = HeapAlloc(GetProcessHeap(), 0, 
-					  sizeof(struct sFMextra) + 
+	    void*	extra = HeapAlloc(GetProcessHeap(), 0,
+					  sizeof(struct sFMextra) +
 					  sizeof(struct sVoice) * (midiOutDevices[wDevID]->wVoices - 1));
-	    
+
 	    if (extra == 0) {
 		WARN("can't alloc extra data !\n");
 		return MMSYSERR_NOMEM;
@@ -1044,18 +1044,18 @@
 	}
 	break;
     default:
-	WARN("Technology not supported (yet) %d !\n", 
+	WARN("Technology not supported (yet) %d !\n",
 	     midiOutDevices[wDevID]->wTechnology);
 	return MMSYSERR_NOTENABLED;
     }
-    
+
     MidiOutDev[wDevID].wFlags = HIWORD(dwFlags & CALLBACK_TYPEMASK);
 
     MidiOutDev[wDevID].lpQueueHdr = NULL;
     MidiOutDev[wDevID].dwTotalPlayed = 0;
     MidiOutDev[wDevID].bufsize = 0x3FFF;
     MidiOutDev[wDevID].midiDesc = *lpDesc;
-    
+
     if (MIDI_NotifyClient(wDevID, MOM_OPEN, 0L, 0L) != MMSYSERR_NOERROR) {
 	WARN("can't notify client !\n");
 	return MMSYSERR_INVALPARAM;
@@ -1073,35 +1073,35 @@
     int	ret = MMSYSERR_NOERROR;
 
     TRACE("(%04X);\n", wDevID);
-    
+
     if (MidiOutDev[wDevID].midiDesc.hMidi == 0) {
 	WARN("device not opened !\n");
 	return MMSYSERR_ERROR;
     }
     /* FIXME: should test that no pending buffer is still in the queue for
      * playing */
-    
+
     if (midiSeqFD == -1) {
 	WARN("can't close !\n");
 	return MMSYSERR_ERROR;
     }
-    
+
     switch (midiOutDevices[wDevID]->wTechnology) {
     case MOD_FMSYNTH:
     case MOD_MIDIPORT:
 	midiCloseSeq();
 	break;
     default:
-	WARN("Technology not supported (yet) %d !\n", 
+	WARN("Technology not supported (yet) %d !\n",
 	     midiOutDevices[wDevID]->wTechnology);
 	return MMSYSERR_NOTENABLED;
     }
-    
+
     if (MidiOutDev[wDevID].lpExtra != 0) {
         HeapFree(GetProcessHeap(), 0, MidiOutDev[wDevID].lpExtra);
 	MidiOutDev[wDevID].lpExtra = 0;
     }
-    
+
     MidiOutDev[wDevID].bufsize = 0;
     if (MIDI_NotifyClient(wDevID, MOM_CLOSE, 0L, 0L) != MMSYSERR_NOERROR) {
 	WARN("can't notify client !\n");
@@ -1119,9 +1119,9 @@
     WORD	evt = LOBYTE(LOWORD(dwParam));
     WORD	d1  = HIBYTE(LOWORD(dwParam));
     WORD	d2  = LOBYTE(HIWORD(dwParam));
-    
+
     TRACE("(%04X, %08lX);\n", wDevID, dwParam);
-    
+
     if (midiSeqFD == -1) {
 	WARN("can't play !\n");
 	return MIDIERR_NODEVICE;
@@ -1137,7 +1137,7 @@
 	    sChannel*	channel = extra->channel;
 	    int		chn = (evt & 0x0F);
 	    int		i, nv;
-	    
+
 	    switch (evt & 0xF0) {
 	    case MIDI_NOTEOFF:
 		for (i = 0; i < midiOutDevices[wDevID]->wVoices; i++) {
@@ -1147,7 +1147,7 @@
 			SEQ_STOP_NOTE(wDevID, i, d1, d2);
 		    }
 		}
-		break;	
+		break;
 	    case MIDI_NOTEON:
 		if (d2 == 0) { /* note off if velocity == 0 */
 		    for (i = 0; i < midiOutDevices[wDevID]->wVoices; i++) {
@@ -1165,7 +1165,7 @@
 		 *	- the older voice (LRU)
 		 */
 		for (i = nv = 0; i < midiOutDevices[wDevID]->wVoices; i++) {
-		    if (voice[i].status == sVS_UNUSED || 
+		    if (voice[i].status == sVS_UNUSED ||
 			(voice[i].note == d1 && voice[i].channel == chn)) {
 			nv = i;
 			break;
@@ -1176,24 +1176,24 @@
 		}
 		TRACE(
 		      "playing on voice=%d, pgm=%d, pan=0x%02X, vol=0x%02X, "
-		      "bender=0x%02X, note=0x%02X, vel=0x%02X\n", 
-		      nv, channel[chn].program, 
-		      channel[chn].balance, 
-		      channel[chn].volume, 
+		      "bender=0x%02X, note=0x%02X, vel=0x%02X\n",
+		      nv, channel[chn].program,
+		      channel[chn].balance,
+		      channel[chn].volume,
 		      channel[chn].bender, d1, d2);
-		
-		SEQ_SET_PATCH(wDevID, nv, IS_DRUM_CHANNEL(extra, chn) ? 
+
+		SEQ_SET_PATCH(wDevID, nv, IS_DRUM_CHANNEL(extra, chn) ?
 			      (128 + d1) : channel[chn].program);
 		SEQ_BENDER_RANGE(wDevID, nv, channel[chn].benderRange * 100);
 		SEQ_BENDER(wDevID, nv, channel[chn].bender);
 		SEQ_CONTROL(wDevID, nv, CTL_PAN, channel[chn].balance);
 		SEQ_CONTROL(wDevID, nv, CTL_EXPRESSION, channel[chn].expression);
-#if 0	
+#if 0
 		/* FIXME: does not really seem to work on my SB card and
 		 * screws everything up... so lay it down
 		 */
 		SEQ_CONTROL(wDevID, nv, CTL_MAIN_VOLUME, channel[chn].volume);
-#endif	
+#endif
 		SEQ_START_NOTE(wDevID, nv, d1, d2);
 		voice[nv].status = channel[chn].sustain ? sVS_SUSTAINED : sVS_PLAYING;
 		voice[nv].note = d1;
@@ -1232,10 +1232,10 @@
 		case CTL_NONREG_PARM_NUM_LSB:	channel[chn].nrgPmtLSB = d2;	break;
 		case CTL_NONREG_PARM_NUM_MSB:	channel[chn].nrgPmtMSB = d2;	break;
 		case CTL_REGIST_PARM_NUM_LSB:	channel[chn].regPmtLSB = d2;	break;
-		case CTL_REGIST_PARM_NUM_MSB:	channel[chn].regPmtMSB = d2;	break;		    
+		case CTL_REGIST_PARM_NUM_MSB:	channel[chn].regPmtMSB = d2;	break;
 		case CTL_DATA_ENTRY:
 		    switch ((channel[chn].regPmtMSB << 8) | channel[chn].regPmtLSB) {
-		    case 0x0000: 
+		    case 0x0000:
 			if (channel[chn].benderRange != d2) {
 			    channel[chn].benderRange = d2;
 			    for (i = 0; i < midiOutDevices[wDevID]->wVoices; i++) {
@@ -1245,7 +1245,7 @@
 			    }
 			}
 			break;
-			
+
 		    case 0x7F7F:
 			channel[chn].benderRange = 2;
 			for (i = 0; i < midiOutDevices[wDevID]->wVoices; i++) {
@@ -1262,9 +1262,9 @@
 			break;
 		    }
 		    break;
-		    
+
 		case 0x78: /* all sounds off */
-		    /* FIXME: I don't know if I have to take care of the channel 
+		    /* FIXME: I don't know if I have to take care of the channel
 		     * for this control ?
 		     */
 		    for (i = 0; i < midiOutDevices[wDevID]->wVoices; i++) {
@@ -1275,7 +1275,7 @@
 		    }
 		    break;
 		case 0x7B: /* all notes off */
-		    /* FIXME: I don't know if I have to take care of the channel 
+		    /* FIXME: I don't know if I have to take care of the channel
 		     * for this control ?
 		     */
 		    for (i = 0; i < midiOutDevices[wDevID]->wVoices; i++) {
@@ -1284,9 +1284,9 @@
 			    SEQ_STOP_NOTE(wDevID, i, voice[i].note, 64);
 			}
 		    }
-		    break;	
+		    break;
 		default:
-		    TRACE("Dropping MIDI control event 0x%02x(%02x) on channel %d\n", 
+		    TRACE("Dropping MIDI control event 0x%02x(%02x) on channel %d\n",
 			  d1, d2, chn);
 		    break;
 		}
@@ -1313,12 +1313,12 @@
 		switch (evt & 0x0F) {
 		case 0x0F: 	/* Reset */
 		    modFMReset(wDevID);
-		    break; 
+		    break;
 		default:
 		    WARN("Unsupported (yet) system event %02x\n", evt & 0x0F);
 		}
 		break;
-	    default:	
+	    default:
 		WARN("Internal error, shouldn't happen (event=%08x)\n", evt & 0xF0);
 		return MMSYSERR_NOTENABLED;
 	    }
@@ -1331,25 +1331,25 @@
 		WARN("Internal error on devID (%u) !\n", wDevID);
 		return MIDIERR_NODEVICE;
 	    }
-	    
+
 	    switch (evt & 0xF0) {
 	    case MIDI_NOTEOFF:
 	    case MIDI_NOTEON:
 	    case MIDI_KEY_PRESSURE:
 	    case MIDI_CTL_CHANGE:
 	    case MIDI_PITCH_BEND:
-		SEQ_MIDIOUT(dev, evt);	
-		SEQ_MIDIOUT(dev, d1);	
-		SEQ_MIDIOUT(dev, d2); 	
+		SEQ_MIDIOUT(dev, evt);
+		SEQ_MIDIOUT(dev, d1);
+		SEQ_MIDIOUT(dev, d2);
 		break;
 	    case MIDI_PGM_CHANGE:
 	    case MIDI_CHN_PRESSURE:
-		SEQ_MIDIOUT(dev, evt);	
-		SEQ_MIDIOUT(dev, d1);										
-		break;	
+		SEQ_MIDIOUT(dev, evt);
+		SEQ_MIDIOUT(dev, d1);
+		break;
 	    case MIDI_SYSTEM_PREFIX:
 		switch (evt & 0x0F) {
-		case 0x00:	/* System Exclusive, don't do it on modData, 
+		case 0x00:	/* System Exclusive, don't do it on modData,
 				 * should require modLongData*/
 		case 0x01:	/* Undefined */
 		case 0x04:	/* Undefined. */
@@ -1364,7 +1364,7 @@
 		case 0x0B:	/* Continue */
 		case 0x0C:	/* Stop */
 		case 0x0E: 	/* Active Sensing. */
-		    SEQ_MIDIOUT(dev, evt);	
+		    SEQ_MIDIOUT(dev, evt);
 		    break;
 		case 0x0F: 	/* Reset */
 				/* SEQ_MIDIOUT(dev, evt);
@@ -1377,10 +1377,10 @@
 		    SEQ_MIDIOUT(dev, 0xf7);
 		    break;
 		case 0x03:	/* Song Select. */
-		    SEQ_MIDIOUT(dev, evt);	
-		    SEQ_MIDIOUT(dev, d1);	  									
+		    SEQ_MIDIOUT(dev, evt);
+		    SEQ_MIDIOUT(dev, d1);
 		case 0x02:	/* Song Position Pointer. */
-		    SEQ_MIDIOUT(dev, evt);	
+		    SEQ_MIDIOUT(dev, evt);
 		    SEQ_MIDIOUT(dev, d1);
 		    SEQ_MIDIOUT(dev, d2);
 		}
@@ -1389,11 +1389,11 @@
 	}
 	break;
     default:
-	WARN("Technology not supported (yet) %d !\n", 
+	WARN("Technology not supported (yet) %d !\n",
 	     midiOutDevices[wDevID]->wTechnology);
 	return MMSYSERR_NOTENABLED;
     }
-    
+
     SEQ_DUMPBUF();
 
     return MMSYSERR_NOERROR;
@@ -1408,25 +1408,25 @@
     LPBYTE	lpData;
 
     TRACE("(%04X, %p, %08lX);\n", wDevID, lpMidiHdr, dwSize);
-    
+
     if (midiSeqFD == -1) {
 	WARN("can't play !\n");
 	return MIDIERR_NODEVICE;
     }
-    
+
     lpData = lpMidiHdr->lpData;
 
-    if (lpData == NULL) 
+    if (lpData == NULL)
 	return MIDIERR_UNPREPARED;
-    if (!(lpMidiHdr->dwFlags & MHDR_PREPARED)) 
+    if (!(lpMidiHdr->dwFlags & MHDR_PREPARED))
 	return MIDIERR_UNPREPARED;
-    if (lpMidiHdr->dwFlags & MHDR_INQUEUE) 
+    if (lpMidiHdr->dwFlags & MHDR_INQUEUE)
 	return MIDIERR_STILLPLAYING;
     lpMidiHdr->dwFlags &= ~MHDR_DONE;
     lpMidiHdr->dwFlags |= MHDR_INQUEUE;
 
     /* FIXME: MS doc is not 100% clear. Will lpData only contain system exclusive
-     * data, or can it also contain raw MIDI data, to be split up and sent to 
+     * data, or can it also contain raw MIDI data, to be split up and sent to
      * modShortData() ?
      * If the latest is true, then the following WARNing will fire up
      */
@@ -1436,7 +1436,7 @@
 
     TRACE("dwBufferLength=%lu !\n", lpMidiHdr->dwBufferLength);
     TRACE("                 %02X %02X %02X ... %02X %02X %02X\n",
-	  lpData[0], lpData[1], lpData[2], lpData[lpMidiHdr->dwBufferLength-3], 
+	  lpData[0], lpData[1], lpData[2], lpData[lpMidiHdr->dwBufferLength-3],
 	  lpData[lpMidiHdr->dwBufferLength-2], lpData[lpMidiHdr->dwBufferLength-1]);
 
     switch (midiOutDevices[wDevID]->wTechnology) {
@@ -1451,7 +1451,7 @@
 		 "system exclusive byte stream\n");
 	}
 	for (count = 0; count < lpMidiHdr->dwBytesRecorded; count++) {
-	    SEQ_MIDIOUT(wDevID - MODM_NUMFMSYNTHDEVS, lpData[count]);	
+	    SEQ_MIDIOUT(wDevID - MODM_NUMFMSYNTHDEVS, lpData[count]);
 	}
 	if (lpData[count - 1] != 0xF7) {
 	    /* Send end of System Exclusive */
@@ -1462,11 +1462,11 @@
 	SEQ_DUMPBUF();
 	break;
     default:
-	WARN("Technology not supported (yet) %d !\n", 
+	WARN("Technology not supported (yet) %d !\n",
 	     midiOutDevices[wDevID]->wTechnology);
 	return MMSYSERR_NOTENABLED;
     }
-    
+
     lpMidiHdr->dwFlags &= ~MHDR_INQUEUE;
     lpMidiHdr->dwFlags |= MHDR_DONE;
     if (MIDI_NotifyClient(wDevID, MOM_DONE, (DWORD)lpMidiHdr, 0L) != MMSYSERR_NOERROR) {
@@ -1482,24 +1482,24 @@
 static DWORD modPrepare(WORD wDevID, LPMIDIHDR lpMidiHdr, DWORD dwSize)
 {
     TRACE("(%04X, %p, %08lX);\n", wDevID, lpMidiHdr, dwSize);
-    
+
     if (midiSeqFD == -1) {
 	WARN("can't prepare !\n");
 	return MMSYSERR_NOTENABLED;
     }
 
-    /* MS doc says taht dwFlags must be set to zero, but (kinda funny) MS mciseq drivers 
+    /* MS doc says taht dwFlags must be set to zero, but (kinda funny) MS mciseq drivers
      * asks to prepare MIDIHDR which dwFlags != 0.
      * So at least check for the inqueue flag
      */
-    if (dwSize < sizeof(MIDIHDR) || lpMidiHdr == 0 || 
-	lpMidiHdr->lpData == 0 || (lpMidiHdr->dwFlags & MHDR_INQUEUE) != 0 || 
+    if (dwSize < sizeof(MIDIHDR) || lpMidiHdr == 0 ||
+	lpMidiHdr->lpData == 0 || (lpMidiHdr->dwFlags & MHDR_INQUEUE) != 0 ||
 	lpMidiHdr->dwBufferLength >= 0x10000ul) {
-	WARN("%p %p %08lx %d/%ld\n", lpMidiHdr, lpMidiHdr->lpData, 
+	WARN("%p %p %08lx %d/%ld\n", lpMidiHdr, lpMidiHdr->lpData,
 	           lpMidiHdr->dwFlags, sizeof(MIDIHDR), dwSize);
 	return MMSYSERR_INVALPARAM;
     }
-    
+
     lpMidiHdr->lpNext = 0;
     lpMidiHdr->dwFlags |= MHDR_PREPARED;
     lpMidiHdr->dwFlags &= ~MHDR_DONE;
@@ -1532,11 +1532,11 @@
 static DWORD modReset(WORD wDevID)
 {
     unsigned chn;
-    
+
     TRACE("(%04X);\n", wDevID);
 
     /* stop all notes */
-    /* FIXME: check if 0x78B0 is channel dependant or not. I coded it so that 
+    /* FIXME: check if 0x78B0 is channel dependant or not. I coded it so that
      * it's channel dependent...
      */
     for (chn = 0; chn < 16; chn++) {
@@ -1558,10 +1558,10 @@
 /**************************************************************************
  * 			midMessage (WINEOSS.4)
  */
-DWORD WINAPI OSS_midMessage(UINT wDevID, UINT wMsg, DWORD dwUser, 
+DWORD WINAPI OSS_midMessage(UINT wDevID, UINT wMsg, DWORD dwUser,
 			    DWORD dwParam1, DWORD dwParam2)
 {
-    TRACE("(%04X, %04X, %08lX, %08lX, %08lX);\n", 
+    TRACE("(%04X, %04X, %08lX, %08lX, %08lX);\n",
 	  wDevID, wMsg, dwUser, dwParam1, dwParam2);
     switch (wMsg) {
 #ifdef HAVE_OSS_MIDI
@@ -1583,7 +1583,7 @@
     case MIDM_GETDEVCAPS:
 	return midGetDevCaps(wDevID, (LPMIDIINCAPSA)dwParam1,dwParam2);
     case MIDM_GETNUMDEVS:
-	return MIDM_NUMDEVS; 
+	return MIDM_NUMDEVS;
     case MIDM_RESET:
 	return midReset(wDevID);
     case MIDM_START:
@@ -1600,10 +1600,10 @@
 /**************************************************************************
  * 				modMessage (WINEOSS.5)
  */
-DWORD WINAPI OSS_modMessage(UINT wDevID, UINT wMsg, DWORD dwUser, 
+DWORD WINAPI OSS_modMessage(UINT wDevID, UINT wMsg, DWORD dwUser,
 			    DWORD dwParam1, DWORD dwParam2)
 {
-    TRACE("(%04X, %04X, %08lX, %08lX, %08lX);\n", 
+    TRACE("(%04X, %04X, %08lX, %08lX, %08lX);\n",
 	  wDevID, wMsg, dwUser, dwParam1, dwParam2);
 
     switch (wMsg) {
diff --git a/dlls/winmm/wineoss/midipatch.c b/dlls/winmm/wineoss/midipatch.c
index a757987..37f47a5 100644
--- a/dlls/winmm/wineoss/midipatch.c
+++ b/dlls/winmm/wineoss/midipatch.c
@@ -20,141 +20,141 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
-/* 
+/*
  * Eric POUECH : MIDI FM patches for GM instruments
  */
 
-#define	NOT_DEFINED	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+#define	NOT_DEFINED	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
 
 unsigned char midiFMInstrumentPatches[128 * 16] = {
-/*   0 Acoustic Grand Piano             */ 0x21, 0x11, 0x4c, 0x00, 0xf1, 0xf2, 0x63, 0x72, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 
-/*   1 Bright Acoustic Piano            */ 0x01, 0x11, 0x4f, 0x00, 0xf1, 0xd2, 0x53, 0x74, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 
-/*   2 Electric Grand Piano             */ 0x01, 0x01, 0x4f, 0x04, 0xf1, 0xd2, 0x50, 0x7c, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 
-/*   3 Honky-Tonk Piano                 */ 0x81, 0x13, 0x9d, 0x00, 0xf2, 0xf2, 0x51, 0xf1, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 
-/*   4 Rhodes Piano                     */ 0x01, 0x01, 0x4f, 0x04, 0xf1, 0xd2, 0x50, 0x7c, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 
-/*   5 Chorused Piano                   */ 0x01, 0x11, 0x4d, 0x00, 0xf1, 0xd2, 0x60, 0x7b, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 
-/*   6 Harpsichord                      */ 0x32, 0x16, 0x87, 0x80, 0xa1, 0x7d, 0x10, 0x33, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 
-/*   7 Clavinet                         */ 0x13, 0x08, 0x80, 0x00, 0xfb, 0xe8, 0xff, 0xff, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 
-/*   8 Celesta                          */ 0x14, 0x04, 0x07, 0x00, 0x93, 0xb6, 0x73, 0x62, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 
-/*   9 Glockenspiel                     */ 0x07, 0x12, 0x4f, 0x00, 0xf2, 0xf2, 0x60, 0x72, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 
-/*  10 Music Box                        */ 0x07, 0x01, 0x87, 0x80, 0xf0, 0xf0, 0x05, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 
-/*  11 Vibraphone                       */ 0x44, 0x60, 0x53, 0x80, 0xf5, 0xfd, 0x33, 0x25, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 
-/*  12 Marimba                          */ 0x05, 0x01, 0x4e, 0x00, 0xda, 0xf9, 0x25, 0x15, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 
-/*  13 Xylophone                        */ 0x11, 0x31, 0x2d, 0x00, 0xc8, 0xf5, 0x2f, 0xf5, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 
-/*  14 Tubular Bells                    */ 0x03, 0x17, 0x4f, 0x03, 0xf1, 0xf2, 0x53, 0x74, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 
-/*  15 Dulcimer                         */ 0x07, 0x01, 0x87, 0x80, 0xf0, 0xf0, 0x05, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 
-/*  16 Hammond Organ                    */ 0x72, 0x71, 0xcd, 0x80, 0x91, 0x91, 0x2a, 0x2a, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 
-/*  17 Percussive Organ                 */ 0x0c, 0x00, 0x00, 0x00, 0xf8, 0xd6, 0xb5, 0x4f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-/*  18 Rock Organ                       */ 0x72, 0x70, 0xce, 0x80, 0x9f, 0x94, 0x12, 0x11, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 
-/*  19 Church Organ                     */ 0xa5, 0xb1, 0xd2, 0x80, 0x81, 0xf1, 0x03, 0x05, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 
-/*  20 Reed Organ                       */ 0x3e, 0xb1, 0x29, 0x80, 0xfb, 0xa0, 0xf0, 0x9b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-/*  21 Accordion                        */ 0x24, 0x31, 0x4f, 0x00, 0xf2, 0x52, 0x0b, 0x0b, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 
-/*  22 Harmonica                        */ 0x22, 0xf2, 0x8f, 0x40, 0x41, 0x61, 0x03, 0x05, 0x02, 0x01, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 
-/*  23 Tango Accordion                  */ 0x07, 0x01, 0x87, 0x80, 0xf0, 0xf0, 0x05, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 
-/*  24 Acoustic Nylon Guitar            */ 0x01, 0x01, 0x11, 0x00, 0xf2, 0xf5, 0x1f, 0x88, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 
-/*  25 Acoustic Steel Guitar            */ 0x01, 0xa1, 0x46, 0x03, 0xf1, 0x31, 0x83, 0x86, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 
-/*  26 Electric Jazz Guitar             */ 0x03, 0x11, 0x5e, 0x00, 0x85, 0xd2, 0x51, 0x71, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 
-/*  27 Electric Clean Guitar            */ 0x32, 0x16, 0x87, 0x80, 0xa1, 0x7d, 0x10, 0x33, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 
-/*  28 Electric Muted Guitar            */ 0x13, 0x11, 0x96, 0x80, 0xff, 0xff, 0x21, 0x03, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 
-/*  29 Overdriven Guitar                */ 0x07, 0x14, 0x8f, 0x80, 0x82, 0x82, 0x7d, 0x7d, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 
-/*  30 Distortion Guitar                */ 0x05, 0x01, 0x8f, 0x80, 0xda, 0xf9, 0x15, 0x14, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 
-/*  31 Guitar Harmonics                 */ 0xc3, 0x01, 0x05, 0x0d, 0x91, 0xf1, 0x1f, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-/*  32 Acoustic Bass                    */ 0x21, 0x01, 0x2a, 0x00, 0xf2, 0xf5, 0x1f, 0x88, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 
-/*  33 Electric Bass Fingered           */ 0x01, 0x21, 0x15, 0x80, 0x25, 0x65, 0x2f, 0x6c, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 
-/*  34 Electric Bass Picked             */ 0x01, 0x01, 0x1d, 0x00, 0xf2, 0xf5, 0xef, 0x78, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 
-/*  35 Fretless Bass                    */ 0x30, 0x21, 0x1e, 0x00, 0xf2, 0xf5, 0xef, 0x78, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 
-/*  36 Slap Bass 1                      */ 0x20, 0x21, 0x40, 0x00, 0x7b, 0x75, 0x04, 0x72, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 
-/*  37 Slap Bass 2                      */ 0x20, 0x21, 0x40, 0x00, 0x7b, 0xf5, 0x04, 0x72, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 
-/*  38 Synth Bass 1                     */ 0x41, 0x91, 0x83, 0x00, 0x65, 0x32, 0x05, 0x74, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 
-/*  39 Synth Bass 2                     */ 0x30, 0xb1, 0x88, 0x80, 0xd5, 0x61, 0x19, 0x1b, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 
-/*  40 Violin                           */ 0x72, 0x62, 0x1c, 0x05, 0x51, 0x52, 0x03, 0x13, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 
-/*  41 Viola                            */ 0x70, 0x71, 0xd0, 0x80, 0x52, 0x31, 0x11, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-/*  42 Cello                            */ 0x70, 0x71, 0xc5, 0x80, 0x52, 0x31, 0x11, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-/*  43 Contrabass                       */ 0x01, 0x00, 0x00, 0x00, 0x94, 0x83, 0xb6, 0x26, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-/*  44 Tremolo Strings                  */ 0x71, 0xa1, 0x8b, 0x40, 0x71, 0x42, 0x11, 0x15, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 
-/*  45 Pizzicato Strings                */ 0xf2, 0xe1, 0x40, 0x80, 0xf5, 0xfd, 0xa8, 0xad, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 
-/*  46 Orchestral Harp                  */ 0x21, 0x11, 0x11, 0x00, 0xa3, 0xc4, 0x43, 0x22, 0x02, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 
-/*  47 Timpani                          */ 0x07, 0x01, 0x87, 0x80, 0xf0, 0xf0, 0x05, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 
-/*  48 String Ensemble 1                */ 0xe1, 0x21, 0x4f, 0x00, 0xc1, 0x32, 0xd3, 0x74, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 
-/*  49 String Ensemble 2                */ 0xe1, 0x21, 0x4f, 0x00, 0xb1, 0x12, 0xd3, 0x74, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 
-/*  50 Synth Strings 1                  */ 0x07, 0x01, 0x87, 0x80, 0xf0, 0xf0, 0x05, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 
-/*  51 Synth Strings 2                  */ 0x07, 0x01, 0x87, 0x80, 0xf0, 0xf0, 0x05, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 
-/*  52 Choir Aahs                       */ 0x07, 0x01, 0x87, 0x80, 0xf0, 0xf0, 0x05, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 
-/*  53 Voice oohs                       */ 0x07, 0x01, 0x87, 0x80, 0xf0, 0xf0, 0x05, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 
-/*  54 Synth Voice                      */ 0x07, 0x01, 0x87, 0x80, 0xf0, 0xf0, 0x05, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 
-/*  55 Orchestra Hit                    */ 0x07, 0x01, 0x87, 0x80, 0xf0, 0xf0, 0x05, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 
-/*  56 Trumpet                          */ 0x31, 0xa1, 0x1c, 0x80, 0x41, 0x92, 0x0b, 0x3b, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 
-/*  57 Trombone                         */ 0x21, 0xa1, 0x18, 0x80, 0x53, 0x52, 0x1d, 0x3b, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 
-/*  58 Tuba                             */ 0x21, 0x21, 0x19, 0x80, 0x43, 0x85, 0x8c, 0x2f, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 
-/*  59 Muted Trumpet                    */ 0x31, 0xa1, 0x1c, 0x80, 0x41, 0x92, 0x0b, 0x3b, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 
-/*  60 French Horn                      */ 0x21, 0x21, 0x9f, 0x80, 0x53, 0xaa, 0x5a, 0x1a, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 
-/*  61 Brass Section                    */ 0x21, 0x21, 0x16, 0x00, 0x71, 0x81, 0xae, 0x9e, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 
-/*  62 Synth Brass 1                    */ 0x61, 0x60, 0x1c, 0x00, 0x71, 0x81, 0xae, 0x2e, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 
-/*  63 Synth Brass 2                    */ 0x21, 0x21, 0x8e, 0x80, 0xbb, 0x90, 0x29, 0x0a, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 
-/*  64 Soprano Sax                      */ 0x01, 0x12, 0x4f, 0x00, 0x71, 0x52, 0x53, 0x7c, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 
-/*  65 Alto Sax                         */ 0x01, 0x13, 0x4f, 0x00, 0x71, 0x62, 0x53, 0x84, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 
-/*  66 Tenor Sax                        */ 0x01, 0x13, 0x8d, 0x00, 0x51, 0x52, 0x53, 0x7c, 0x01, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 
-/*  67 Baritone Sax                     */ 0x01, 0x12, 0x4f, 0x00, 0x71, 0x22, 0x53, 0x7c, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 
-/*  68 Oboe                             */ 0x71, 0x62, 0xc5, 0x05, 0x6e, 0x8b, 0x17, 0x0e, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 
-/*  69 English Horn                     */ 0xe1, 0xe4, 0x23, 0x00, 0x71, 0x82, 0xae, 0x9e, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 
-/*  70 Bassoon                          */ 0x30, 0xb1, 0xcd, 0x80, 0xd5, 0x61, 0x19, 0x1b, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 
-/*  71 Clarinet                         */ 0x32, 0xa1, 0x1c, 0x80, 0x51, 0x82, 0x15, 0x45, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 
-/*  72 Piccolo                          */ 0xe4, 0xe4, 0x0f, 0x00, 0x70, 0x60, 0x0f, 0x9f, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 
-/*  73 Flute                            */ 0xe1, 0x61, 0x27, 0x80, 0x53, 0x53, 0x8a, 0x57, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 
-/*  74 Recorder                         */ 0x61, 0x61, 0x27, 0x80, 0x74, 0x65, 0x8f, 0x2a, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 
-/*  75 Pan Flute                        */ 0xe0, 0xa1, 0xec, 0x00, 0x6e, 0x65, 0x8f, 0x2a, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 
-/*  76 Bottle Blow                      */ 0x07, 0x01, 0x87, 0x80, 0xf0, 0xf0, 0x05, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 
-/*  77 Shakuhashi                       */ 0x07, 0x01, 0x87, 0x80, 0xf0, 0xf0, 0x05, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 
-/*  78 Whistle                          */ 0x07, 0x01, 0x87, 0x80, 0xf0, 0xf0, 0x05, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 
-/*  79 Ocarina                          */ 0x07, 0x01, 0x87, 0x80, 0xf0, 0xf0, 0x05, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 
-/*  80 Synth lead 1 - Sq wave lead      */ 0x07, 0x01, 0x87, 0x80, 0xf0, 0xf0, 0x05, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 
-/*  81 Synth lead 2 - Sawtooth Wave     */ 0x07, 0x01, 0x87, 0x80, 0xf0, 0xf0, 0x05, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 
-/*  82 Synth lead 3 - Caliope lead      */ 0x07, 0x01, 0x87, 0x80, 0xf0, 0xf0, 0x05, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 
-/*  83 Synth lead 4 - Chiff lead        */ 0x07, 0x01, 0x87, 0x80, 0xf0, 0xf0, 0x05, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 
-/*  84 Synth lead 5 - Charang           */ 0x07, 0x01, 0x87, 0x80, 0xf0, 0xf0, 0x05, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 
-/*  85 Synth lead 6 - Solo Synth Voice  */ 0x07, 0x01, 0x87, 0x80, 0xf0, 0xf0, 0x05, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 
-/*  86 Synth lead 7 - Bright Saw Wave   */ 0x07, 0x01, 0x87, 0x80, 0xf0, 0xf0, 0x05, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 
-/*  87 Synth lead 8 - Brass and Lead    */ 0x07, 0x01, 0x87, 0x80, 0xf0, 0xf0, 0x05, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 
-/*  88 Synth pad 1 - Fantasia Pad       */ 0x07, 0x01, 0x87, 0x80, 0xf0, 0xf0, 0x05, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 
-/*  89 Synth pad 2 - Warm Pad           */ 0x07, 0x01, 0x87, 0x80, 0xf0, 0xf0, 0x05, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 
-/*  90 Synth pad 3 - Poly Synth Pad     */ 0x07, 0x01, 0x87, 0x80, 0xf0, 0xf0, 0x05, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 
-/*  91 Synth pad 4 - Space Voice Pad    */ 0x07, 0x01, 0x87, 0x80, 0xf0, 0xf0, 0x05, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 
-/*  92 Synth pad 5 - Bowed Glass Pad    */ 0x07, 0x01, 0x87, 0x80, 0xf0, 0xf0, 0x05, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 
-/*  93 Synth pad 6 - Metal Pad          */ 0x07, 0x01, 0x87, 0x80, 0xf0, 0xf0, 0x05, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 
-/*  94 Synth pad 7 - Halo Pad           */ 0x07, 0x01, 0x87, 0x80, 0xf0, 0xf0, 0x05, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 
-/*  95 Synth pad 8 - Sweep Pad          */ 0x07, 0x01, 0x87, 0x80, 0xf0, 0xf0, 0x05, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 
-/*  96 Synth SFX 1 - Ice Rain           */ 0x07, 0x01, 0x87, 0x80, 0xf0, 0xf0, 0x05, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 
-/*  97 Synth SFX 2 - Soundtrack         */ 0x07, 0x01, 0x87, 0x80, 0xf0, 0xf0, 0x05, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 
-/*  98 Synth SFX 3 - Crystal            */ 0x07, 0x01, 0x87, 0x80, 0xf0, 0xf0, 0x05, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 
-/*  99 Synth SFX 4 - Athmosphere        */ 0x07, 0x01, 0x87, 0x80, 0xf0, 0xf0, 0x05, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 
-/* 100 Synth SFX 5 - Brightness         */ 0x07, 0x01, 0x87, 0x80, 0xf0, 0xf0, 0x05, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 
-/* 101 Synth SFX 6 - Goblin             */ 0x07, 0x01, 0x87, 0x80, 0xf0, 0xf0, 0x05, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 
-/* 102 Synth SFX 7 - Echo drops         */ 0x07, 0x01, 0x87, 0x80, 0xf0, 0xf0, 0x05, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 
-/* 103 Synth SFX 8 - Star Theme         */ 0x07, 0x01, 0x87, 0x80, 0xf0, 0xf0, 0x05, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 
-/* 104 Sitar                            */ 0x01, 0x08, 0x40, 0x00, 0xf2, 0xf2, 0x54, 0x45, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-/* 105 Banjo                            */ 0x31, 0x16, 0x87, 0x80, 0xa1, 0x7d, 0x11, 0x43, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 
-/* 106 Shamisen                         */ 0x07, 0x01, 0x87, 0x80, 0xf0, 0xf0, 0x05, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 
-/* 107 Koto                             */ 0x0e, 0x02, 0x40, 0x00, 0x09, 0xf7, 0x53, 0x94, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 
-/* 108 Kalimba                          */ 0x07, 0x01, 0x87, 0x80, 0xf0, 0xf0, 0x05, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 
-/* 109 Bagpipe                          */ 0x31, 0x22, 0x43, 0x05, 0x6e, 0x8b, 0x17, 0x0c, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 
-/* 110 Fiddle                           */ 0x07, 0x01, 0x87, 0x80, 0xf0, 0xf0, 0x05, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 
-/* 111 Shanai                           */ 0x07, 0x01, 0x87, 0x80, 0xf0, 0xf0, 0x05, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 
-/* 112 Tinkle Bell                      */ 0x07, 0x01, 0x87, 0x80, 0xf0, 0xf0, 0x05, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 
-/* 113 Agogo                            */ 0x07, 0x01, 0x87, 0x80, 0xf0, 0xf0, 0x05, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 
-/* 114 Steel Drums                      */ 0x00, 0x00, 0x0b, 0x00, 0xa8, 0xd6, 0x4c, 0x4f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-/* 115 Woodblock                        */ 0x02, 0x11, 0x4f, 0x00, 0x71, 0x52, 0x53, 0x7c, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 
-/* 116 Taiko Drum                       */ 0x12, 0x02, 0x0b, 0x00, 0x95, 0xd4, 0x4c, 0xdd, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-/* 117 Melodic Tom                      */ 0x01, 0x02, 0x00, 0x00, 0xfa, 0xda, 0xbf, 0xbf, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 
-/* 118 Synth Drum                       */ 0x06, 0x00, 0x00, 0x00, 0xf0, 0xf6, 0xf0, 0xb4, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 
-/* 119 Reverse Cymbal                   */ 0x64, 0x03, 0x00, 0x40, 0xb2, 0x97, 0x82, 0xd4, 0x02, 0x01, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 
-/* 120 Guitar Fret Noise                */ 0x07, 0x01, 0x87, 0x80, 0xf0, 0xf0, 0x05, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 
-/* 121 Breath Noise                     */ 0x07, 0x01, 0x87, 0x80, 0xf0, 0xf0, 0x05, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 
-/* 122 Seashore                         */ 0x07, 0x01, 0x87, 0x80, 0xf0, 0xf0, 0x05, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 
-/* 123 Bird Tweet                       */ 0x07, 0x01, 0x87, 0x80, 0xf0, 0xf0, 0x05, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 
-/* 124 Telephone Ring                   */ 0x07, 0x01, 0x87, 0x80, 0xf0, 0xf0, 0x05, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 
-/* 125 Helicopter                       */ 0xf0, 0xe2, 0x00, 0xc0, 0x1e, 0x11, 0x11, 0x11, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 
-/* 126 Applause                         */ 0x07, 0x01, 0x87, 0x80, 0xf0, 0xf0, 0x05, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 
-/* 127 Gunshot                          */ 0x0c, 0x50, 0x00, 0x21, 0xf8, 0x09, 0xb6, 0x04, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 
+/*   0 Acoustic Grand Piano             */ 0x21, 0x11, 0x4c, 0x00, 0xf1, 0xf2, 0x63, 0x72, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,
+/*   1 Bright Acoustic Piano            */ 0x01, 0x11, 0x4f, 0x00, 0xf1, 0xd2, 0x53, 0x74, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00,
+/*   2 Electric Grand Piano             */ 0x01, 0x01, 0x4f, 0x04, 0xf1, 0xd2, 0x50, 0x7c, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00,
+/*   3 Honky-Tonk Piano                 */ 0x81, 0x13, 0x9d, 0x00, 0xf2, 0xf2, 0x51, 0xf1, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00,
+/*   4 Rhodes Piano                     */ 0x01, 0x01, 0x4f, 0x04, 0xf1, 0xd2, 0x50, 0x7c, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00,
+/*   5 Chorused Piano                   */ 0x01, 0x11, 0x4d, 0x00, 0xf1, 0xd2, 0x60, 0x7b, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00,
+/*   6 Harpsichord                      */ 0x32, 0x16, 0x87, 0x80, 0xa1, 0x7d, 0x10, 0x33, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00,
+/*   7 Clavinet                         */ 0x13, 0x08, 0x80, 0x00, 0xfb, 0xe8, 0xff, 0xff, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00,
+/*   8 Celesta                          */ 0x14, 0x04, 0x07, 0x00, 0x93, 0xb6, 0x73, 0x62, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00,
+/*   9 Glockenspiel                     */ 0x07, 0x12, 0x4f, 0x00, 0xf2, 0xf2, 0x60, 0x72, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00,
+/*  10 Music Box                        */ 0x07, 0x01, 0x87, 0x80, 0xf0, 0xf0, 0x05, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,
+/*  11 Vibraphone                       */ 0x44, 0x60, 0x53, 0x80, 0xf5, 0xfd, 0x33, 0x25, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00,
+/*  12 Marimba                          */ 0x05, 0x01, 0x4e, 0x00, 0xda, 0xf9, 0x25, 0x15, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00,
+/*  13 Xylophone                        */ 0x11, 0x31, 0x2d, 0x00, 0xc8, 0xf5, 0x2f, 0xf5, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00,
+/*  14 Tubular Bells                    */ 0x03, 0x17, 0x4f, 0x03, 0xf1, 0xf2, 0x53, 0x74, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00,
+/*  15 Dulcimer                         */ 0x07, 0x01, 0x87, 0x80, 0xf0, 0xf0, 0x05, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,
+/*  16 Hammond Organ                    */ 0x72, 0x71, 0xcd, 0x80, 0x91, 0x91, 0x2a, 0x2a, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00,
+/*  17 Percussive Organ                 */ 0x0c, 0x00, 0x00, 0x00, 0xf8, 0xd6, 0xb5, 0x4f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+/*  18 Rock Organ                       */ 0x72, 0x70, 0xce, 0x80, 0x9f, 0x94, 0x12, 0x11, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00,
+/*  19 Church Organ                     */ 0xa5, 0xb1, 0xd2, 0x80, 0x81, 0xf1, 0x03, 0x05, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00,
+/*  20 Reed Organ                       */ 0x3e, 0xb1, 0x29, 0x80, 0xfb, 0xa0, 0xf0, 0x9b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+/*  21 Accordion                        */ 0x24, 0x31, 0x4f, 0x00, 0xf2, 0x52, 0x0b, 0x0b, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00,
+/*  22 Harmonica                        */ 0x22, 0xf2, 0x8f, 0x40, 0x41, 0x61, 0x03, 0x05, 0x02, 0x01, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00,
+/*  23 Tango Accordion                  */ 0x07, 0x01, 0x87, 0x80, 0xf0, 0xf0, 0x05, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,
+/*  24 Acoustic Nylon Guitar            */ 0x01, 0x01, 0x11, 0x00, 0xf2, 0xf5, 0x1f, 0x88, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00,
+/*  25 Acoustic Steel Guitar            */ 0x01, 0xa1, 0x46, 0x03, 0xf1, 0x31, 0x83, 0x86, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00,
+/*  26 Electric Jazz Guitar             */ 0x03, 0x11, 0x5e, 0x00, 0x85, 0xd2, 0x51, 0x71, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00,
+/*  27 Electric Clean Guitar            */ 0x32, 0x16, 0x87, 0x80, 0xa1, 0x7d, 0x10, 0x33, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00,
+/*  28 Electric Muted Guitar            */ 0x13, 0x11, 0x96, 0x80, 0xff, 0xff, 0x21, 0x03, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00,
+/*  29 Overdriven Guitar                */ 0x07, 0x14, 0x8f, 0x80, 0x82, 0x82, 0x7d, 0x7d, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00,
+/*  30 Distortion Guitar                */ 0x05, 0x01, 0x8f, 0x80, 0xda, 0xf9, 0x15, 0x14, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00,
+/*  31 Guitar Harmonics                 */ 0xc3, 0x01, 0x05, 0x0d, 0x91, 0xf1, 0x1f, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+/*  32 Acoustic Bass                    */ 0x21, 0x01, 0x2a, 0x00, 0xf2, 0xf5, 0x1f, 0x88, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00,
+/*  33 Electric Bass Fingered           */ 0x01, 0x21, 0x15, 0x80, 0x25, 0x65, 0x2f, 0x6c, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00,
+/*  34 Electric Bass Picked             */ 0x01, 0x01, 0x1d, 0x00, 0xf2, 0xf5, 0xef, 0x78, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00,
+/*  35 Fretless Bass                    */ 0x30, 0x21, 0x1e, 0x00, 0xf2, 0xf5, 0xef, 0x78, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00,
+/*  36 Slap Bass 1                      */ 0x20, 0x21, 0x40, 0x00, 0x7b, 0x75, 0x04, 0x72, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00,
+/*  37 Slap Bass 2                      */ 0x20, 0x21, 0x40, 0x00, 0x7b, 0xf5, 0x04, 0x72, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00,
+/*  38 Synth Bass 1                     */ 0x41, 0x91, 0x83, 0x00, 0x65, 0x32, 0x05, 0x74, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00,
+/*  39 Synth Bass 2                     */ 0x30, 0xb1, 0x88, 0x80, 0xd5, 0x61, 0x19, 0x1b, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00,
+/*  40 Violin                           */ 0x72, 0x62, 0x1c, 0x05, 0x51, 0x52, 0x03, 0x13, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00,
+/*  41 Viola                            */ 0x70, 0x71, 0xd0, 0x80, 0x52, 0x31, 0x11, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+/*  42 Cello                            */ 0x70, 0x71, 0xc5, 0x80, 0x52, 0x31, 0x11, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+/*  43 Contrabass                       */ 0x01, 0x00, 0x00, 0x00, 0x94, 0x83, 0xb6, 0x26, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+/*  44 Tremolo Strings                  */ 0x71, 0xa1, 0x8b, 0x40, 0x71, 0x42, 0x11, 0x15, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00,
+/*  45 Pizzicato Strings                */ 0xf2, 0xe1, 0x40, 0x80, 0xf5, 0xfd, 0xa8, 0xad, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00,
+/*  46 Orchestral Harp                  */ 0x21, 0x11, 0x11, 0x00, 0xa3, 0xc4, 0x43, 0x22, 0x02, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00,
+/*  47 Timpani                          */ 0x07, 0x01, 0x87, 0x80, 0xf0, 0xf0, 0x05, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,
+/*  48 String Ensemble 1                */ 0xe1, 0x21, 0x4f, 0x00, 0xc1, 0x32, 0xd3, 0x74, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00,
+/*  49 String Ensemble 2                */ 0xe1, 0x21, 0x4f, 0x00, 0xb1, 0x12, 0xd3, 0x74, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00,
+/*  50 Synth Strings 1                  */ 0x07, 0x01, 0x87, 0x80, 0xf0, 0xf0, 0x05, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,
+/*  51 Synth Strings 2                  */ 0x07, 0x01, 0x87, 0x80, 0xf0, 0xf0, 0x05, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,
+/*  52 Choir Aahs                       */ 0x07, 0x01, 0x87, 0x80, 0xf0, 0xf0, 0x05, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,
+/*  53 Voice oohs                       */ 0x07, 0x01, 0x87, 0x80, 0xf0, 0xf0, 0x05, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,
+/*  54 Synth Voice                      */ 0x07, 0x01, 0x87, 0x80, 0xf0, 0xf0, 0x05, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,
+/*  55 Orchestra Hit                    */ 0x07, 0x01, 0x87, 0x80, 0xf0, 0xf0, 0x05, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,
+/*  56 Trumpet                          */ 0x31, 0xa1, 0x1c, 0x80, 0x41, 0x92, 0x0b, 0x3b, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00,
+/*  57 Trombone                         */ 0x21, 0xa1, 0x18, 0x80, 0x53, 0x52, 0x1d, 0x3b, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00,
+/*  58 Tuba                             */ 0x21, 0x21, 0x19, 0x80, 0x43, 0x85, 0x8c, 0x2f, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00,
+/*  59 Muted Trumpet                    */ 0x31, 0xa1, 0x1c, 0x80, 0x41, 0x92, 0x0b, 0x3b, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00,
+/*  60 French Horn                      */ 0x21, 0x21, 0x9f, 0x80, 0x53, 0xaa, 0x5a, 0x1a, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00,
+/*  61 Brass Section                    */ 0x21, 0x21, 0x16, 0x00, 0x71, 0x81, 0xae, 0x9e, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00,
+/*  62 Synth Brass 1                    */ 0x61, 0x60, 0x1c, 0x00, 0x71, 0x81, 0xae, 0x2e, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00,
+/*  63 Synth Brass 2                    */ 0x21, 0x21, 0x8e, 0x80, 0xbb, 0x90, 0x29, 0x0a, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00,
+/*  64 Soprano Sax                      */ 0x01, 0x12, 0x4f, 0x00, 0x71, 0x52, 0x53, 0x7c, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00,
+/*  65 Alto Sax                         */ 0x01, 0x13, 0x4f, 0x00, 0x71, 0x62, 0x53, 0x84, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00,
+/*  66 Tenor Sax                        */ 0x01, 0x13, 0x8d, 0x00, 0x51, 0x52, 0x53, 0x7c, 0x01, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00,
+/*  67 Baritone Sax                     */ 0x01, 0x12, 0x4f, 0x00, 0x71, 0x22, 0x53, 0x7c, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00,
+/*  68 Oboe                             */ 0x71, 0x62, 0xc5, 0x05, 0x6e, 0x8b, 0x17, 0x0e, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00,
+/*  69 English Horn                     */ 0xe1, 0xe4, 0x23, 0x00, 0x71, 0x82, 0xae, 0x9e, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00,
+/*  70 Bassoon                          */ 0x30, 0xb1, 0xcd, 0x80, 0xd5, 0x61, 0x19, 0x1b, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00,
+/*  71 Clarinet                         */ 0x32, 0xa1, 0x1c, 0x80, 0x51, 0x82, 0x15, 0x45, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00,
+/*  72 Piccolo                          */ 0xe4, 0xe4, 0x0f, 0x00, 0x70, 0x60, 0x0f, 0x9f, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00,
+/*  73 Flute                            */ 0xe1, 0x61, 0x27, 0x80, 0x53, 0x53, 0x8a, 0x57, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,
+/*  74 Recorder                         */ 0x61, 0x61, 0x27, 0x80, 0x74, 0x65, 0x8f, 0x2a, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00,
+/*  75 Pan Flute                        */ 0xe0, 0xa1, 0xec, 0x00, 0x6e, 0x65, 0x8f, 0x2a, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00,
+/*  76 Bottle Blow                      */ 0x07, 0x01, 0x87, 0x80, 0xf0, 0xf0, 0x05, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,
+/*  77 Shakuhashi                       */ 0x07, 0x01, 0x87, 0x80, 0xf0, 0xf0, 0x05, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,
+/*  78 Whistle                          */ 0x07, 0x01, 0x87, 0x80, 0xf0, 0xf0, 0x05, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,
+/*  79 Ocarina                          */ 0x07, 0x01, 0x87, 0x80, 0xf0, 0xf0, 0x05, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,
+/*  80 Synth lead 1 - Sq wave lead      */ 0x07, 0x01, 0x87, 0x80, 0xf0, 0xf0, 0x05, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,
+/*  81 Synth lead 2 - Sawtooth Wave     */ 0x07, 0x01, 0x87, 0x80, 0xf0, 0xf0, 0x05, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,
+/*  82 Synth lead 3 - Caliope lead      */ 0x07, 0x01, 0x87, 0x80, 0xf0, 0xf0, 0x05, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,
+/*  83 Synth lead 4 - Chiff lead        */ 0x07, 0x01, 0x87, 0x80, 0xf0, 0xf0, 0x05, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,
+/*  84 Synth lead 5 - Charang           */ 0x07, 0x01, 0x87, 0x80, 0xf0, 0xf0, 0x05, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,
+/*  85 Synth lead 6 - Solo Synth Voice  */ 0x07, 0x01, 0x87, 0x80, 0xf0, 0xf0, 0x05, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,
+/*  86 Synth lead 7 - Bright Saw Wave   */ 0x07, 0x01, 0x87, 0x80, 0xf0, 0xf0, 0x05, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,
+/*  87 Synth lead 8 - Brass and Lead    */ 0x07, 0x01, 0x87, 0x80, 0xf0, 0xf0, 0x05, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,
+/*  88 Synth pad 1 - Fantasia Pad       */ 0x07, 0x01, 0x87, 0x80, 0xf0, 0xf0, 0x05, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,
+/*  89 Synth pad 2 - Warm Pad           */ 0x07, 0x01, 0x87, 0x80, 0xf0, 0xf0, 0x05, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,
+/*  90 Synth pad 3 - Poly Synth Pad     */ 0x07, 0x01, 0x87, 0x80, 0xf0, 0xf0, 0x05, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,
+/*  91 Synth pad 4 - Space Voice Pad    */ 0x07, 0x01, 0x87, 0x80, 0xf0, 0xf0, 0x05, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,
+/*  92 Synth pad 5 - Bowed Glass Pad    */ 0x07, 0x01, 0x87, 0x80, 0xf0, 0xf0, 0x05, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,
+/*  93 Synth pad 6 - Metal Pad          */ 0x07, 0x01, 0x87, 0x80, 0xf0, 0xf0, 0x05, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,
+/*  94 Synth pad 7 - Halo Pad           */ 0x07, 0x01, 0x87, 0x80, 0xf0, 0xf0, 0x05, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,
+/*  95 Synth pad 8 - Sweep Pad          */ 0x07, 0x01, 0x87, 0x80, 0xf0, 0xf0, 0x05, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,
+/*  96 Synth SFX 1 - Ice Rain           */ 0x07, 0x01, 0x87, 0x80, 0xf0, 0xf0, 0x05, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,
+/*  97 Synth SFX 2 - Soundtrack         */ 0x07, 0x01, 0x87, 0x80, 0xf0, 0xf0, 0x05, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,
+/*  98 Synth SFX 3 - Crystal            */ 0x07, 0x01, 0x87, 0x80, 0xf0, 0xf0, 0x05, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,
+/*  99 Synth SFX 4 - Athmosphere        */ 0x07, 0x01, 0x87, 0x80, 0xf0, 0xf0, 0x05, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,
+/* 100 Synth SFX 5 - Brightness         */ 0x07, 0x01, 0x87, 0x80, 0xf0, 0xf0, 0x05, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,
+/* 101 Synth SFX 6 - Goblin             */ 0x07, 0x01, 0x87, 0x80, 0xf0, 0xf0, 0x05, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,
+/* 102 Synth SFX 7 - Echo drops         */ 0x07, 0x01, 0x87, 0x80, 0xf0, 0xf0, 0x05, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,
+/* 103 Synth SFX 8 - Star Theme         */ 0x07, 0x01, 0x87, 0x80, 0xf0, 0xf0, 0x05, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,
+/* 104 Sitar                            */ 0x01, 0x08, 0x40, 0x00, 0xf2, 0xf2, 0x54, 0x45, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+/* 105 Banjo                            */ 0x31, 0x16, 0x87, 0x80, 0xa1, 0x7d, 0x11, 0x43, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00,
+/* 106 Shamisen                         */ 0x07, 0x01, 0x87, 0x80, 0xf0, 0xf0, 0x05, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,
+/* 107 Koto                             */ 0x0e, 0x02, 0x40, 0x00, 0x09, 0xf7, 0x53, 0x94, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00,
+/* 108 Kalimba                          */ 0x07, 0x01, 0x87, 0x80, 0xf0, 0xf0, 0x05, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,
+/* 109 Bagpipe                          */ 0x31, 0x22, 0x43, 0x05, 0x6e, 0x8b, 0x17, 0x0c, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00,
+/* 110 Fiddle                           */ 0x07, 0x01, 0x87, 0x80, 0xf0, 0xf0, 0x05, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,
+/* 111 Shanai                           */ 0x07, 0x01, 0x87, 0x80, 0xf0, 0xf0, 0x05, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,
+/* 112 Tinkle Bell                      */ 0x07, 0x01, 0x87, 0x80, 0xf0, 0xf0, 0x05, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,
+/* 113 Agogo                            */ 0x07, 0x01, 0x87, 0x80, 0xf0, 0xf0, 0x05, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,
+/* 114 Steel Drums                      */ 0x00, 0x00, 0x0b, 0x00, 0xa8, 0xd6, 0x4c, 0x4f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+/* 115 Woodblock                        */ 0x02, 0x11, 0x4f, 0x00, 0x71, 0x52, 0x53, 0x7c, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00,
+/* 116 Taiko Drum                       */ 0x12, 0x02, 0x0b, 0x00, 0x95, 0xd4, 0x4c, 0xdd, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+/* 117 Melodic Tom                      */ 0x01, 0x02, 0x00, 0x00, 0xfa, 0xda, 0xbf, 0xbf, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00,
+/* 118 Synth Drum                       */ 0x06, 0x00, 0x00, 0x00, 0xf0, 0xf6, 0xf0, 0xb4, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00,
+/* 119 Reverse Cymbal                   */ 0x64, 0x03, 0x00, 0x40, 0xb2, 0x97, 0x82, 0xd4, 0x02, 0x01, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00,
+/* 120 Guitar Fret Noise                */ 0x07, 0x01, 0x87, 0x80, 0xf0, 0xf0, 0x05, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,
+/* 121 Breath Noise                     */ 0x07, 0x01, 0x87, 0x80, 0xf0, 0xf0, 0x05, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,
+/* 122 Seashore                         */ 0x07, 0x01, 0x87, 0x80, 0xf0, 0xf0, 0x05, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,
+/* 123 Bird Tweet                       */ 0x07, 0x01, 0x87, 0x80, 0xf0, 0xf0, 0x05, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,
+/* 124 Telephone Ring                   */ 0x07, 0x01, 0x87, 0x80, 0xf0, 0xf0, 0x05, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,
+/* 125 Helicopter                       */ 0xf0, 0xe2, 0x00, 0xc0, 0x1e, 0x11, 0x11, 0x11, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00,
+/* 126 Applause                         */ 0x07, 0x01, 0x87, 0x80, 0xf0, 0xf0, 0x05, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,
+/* 127 Gunshot                          */ 0x0c, 0x50, 0x00, 0x21, 0xf8, 0x09, 0xb6, 0x04, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00,
 };
 
 unsigned char midiFMDrumsPatches[16 * 128] = {
@@ -192,8 +192,8 @@
 /*    32 Not defined					*/ NOT_DEFINED
 /*    33 Not defined					*/ NOT_DEFINED
 /*    34 Not defined					*/ NOT_DEFINED
-/*    35 Acoustic Bass Drum      */ 0x00, 0x00, 0x0d, 0x00, 0xe8, 0xa5, 0xef, 0xff, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 
-/*    36 Bass Drum 1             */ 0x00, 0x00, 0x0b, 0x00, 0xa8, 0xd6, 0x4c, 0x4f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+/*    35 Acoustic Bass Drum      */ 0x00, 0x00, 0x0d, 0x00, 0xe8, 0xa5, 0xef, 0xff, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00,
+/*    36 Bass Drum 1             */ 0x00, 0x00, 0x0b, 0x00, 0xa8, 0xd6, 0x4c, 0x4f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
 /*    37 Side Stick              */ NOT_DEFINED
 /*    38 Acoustic Snare          */ 0x2e, 0x02, 0x0a, 0x1b, 0xff, 0xf6, 0x0f, 0x4a, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, /* snare    */
 /*    39 Hand Clap               */ NOT_DEFINED
@@ -208,7 +208,7 @@
 /*    48 Hi-Mid Tom              */ NOT_DEFINED
 /*    49 Crash Cymbal 1          */ NOT_DEFINED
 /*    50 High Tom                */ NOT_DEFINED
-/*    51 Ride Cymbal 1           */ 0x64, 0x03, 0x00, 0x40, 0xb2, 0x97, 0x82, 0xd4, 0x02, 0x01, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, /* bcymbal  */ 
+/*    51 Ride Cymbal 1           */ 0x64, 0x03, 0x00, 0x40, 0xb2, 0x97, 0x82, 0xd4, 0x02, 0x01, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, /* bcymbal  */
 /*    52 Chinese Cymbal          */ NOT_DEFINED
 /*    53 Ride Bell               */ NOT_DEFINED
 /*    54 Tambourine              */ NOT_DEFINED
@@ -287,5 +287,5 @@
 /*   127 Not defined					*/ NOT_DEFINED
 /*   128 Not defined					*/ NOT_DEFINED
 };
- 
+
 
diff --git a/dlls/winmm/wineoss/mixer.c b/dlls/winmm/wineoss/mixer.c
index 194c901..6ef828d 100644
--- a/dlls/winmm/wineoss/mixer.c
+++ b/dlls/winmm/wineoss/mixer.c
@@ -73,7 +73,7 @@
     MIXERCONTROLA	ctrl;
 };
 
-struct mixer 
+struct mixer
 {
     const char*		name;
     int			volume[SOUND_MIXER_NRDEVICES];
@@ -104,8 +104,8 @@
     mc->ctrl.cbStruct = sizeof(MIXERCONTROLA);
     mc->ctrl.dwControlID = c + 1;
     mc->ctrl.dwControlType = dwType;
-    
-    switch (dwType) 
+
+    switch (dwType)
     {
     case MIXERCONTROL_CONTROLTYPE_VOLUME:
 	mc->ctrl.fdwControl = 0;
@@ -113,7 +113,7 @@
 	lstrcpynA(mc->ctrl.szShortName, "Vol", MIXER_SHORT_NAME_CHARS);
 	lstrcpynA(mc->ctrl.szName, "Volume", MIXER_LONG_NAME_CHARS);
 	memset(&mc->ctrl.Bounds, 0, sizeof(mc->ctrl.Bounds));
-	/* CONTROLTYPE_VOLUME uses the MIXER_CONTROLDETAILS_UNSIGNED struct, 
+	/* CONTROLTYPE_VOLUME uses the MIXER_CONTROLDETAILS_UNSIGNED struct,
 	 * [0, 100] is the range supported by OSS
 	 * whatever the min and max values are they must match
 	 * conversions done in (Get|Set)ControlDetails to stay in [0, 100] range
@@ -145,7 +145,7 @@
 	memset(&mc->ctrl.Bounds, 0, sizeof(mc->ctrl.Bounds));
 	memset(&mc->ctrl.Metrics, 0, sizeof(mc->ctrl.Metrics));
 	break;
-	
+
     default:
 	FIXME("Internal error: unknown type: %08lx\n", dwType);
     }
@@ -174,7 +174,7 @@
     DWORD		ret = MMSYSERR_NOERROR;
 
     TRACE("(%04X, %p, %lu);\n", wDevID, lpMod, flags);
-    
+
     /* as we partly init the mixer with MIX_Open, we can allow null open decs */
     /* EPP     if (lpMod == NULL) return MMSYSERR_INVALPARAM; */
     /* anyway, it seems that WINMM/MMSYSTEM doesn't always open the mixer device before sending
@@ -183,17 +183,17 @@
      */
     if (!(mix = MIX_Get(wDevID))) return MMSYSERR_BADDEVICEID;
 
-    if ((mixer = open(mix->name, O_RDWR)) < 0) 
+    if ((mixer = open(mix->name, O_RDWR)) < 0)
     {
-	if (errno == ENODEV || errno == ENXIO) 
-	{	
+	if (errno == ENODEV || errno == ENXIO)
+	{
 	    /* no driver present */
 	    return MMSYSERR_NODRIVER;
 	}
 	return MMSYSERR_ERROR;
     }
-    
-    if (ioctl(mixer, SOUND_MIXER_READ_DEVMASK, &mix->devMask) == -1) 
+
+    if (ioctl(mixer, SOUND_MIXER_READ_DEVMASK, &mix->devMask) == -1)
     {
 	perror("ioctl mixer SOUND_MIXER_DEVMASK");
 	ret = MMSYSERR_ERROR;
@@ -206,7 +206,7 @@
 	goto error;
     }
 
-    if (ioctl(mixer, SOUND_MIXER_READ_STEREODEVS, &mix->stereoMask) == -1) 
+    if (ioctl(mixer, SOUND_MIXER_READ_STEREODEVS, &mix->stereoMask) == -1)
     {
 	perror("ioctl mixer SOUND_MIXER_STEREODEVS");
 	ret = MMSYSERR_ERROR;
@@ -214,7 +214,7 @@
     }
     mix->stereoMask &= WINE_MIXER_MASK_SPEAKER;
 
-    if (ioctl(mixer, SOUND_MIXER_READ_RECMASK, &mix->recMask) == -1) 
+    if (ioctl(mixer, SOUND_MIXER_READ_RECMASK, &mix->recMask) == -1)
     {
 	perror("ioctl mixer SOUND_MIXER_RECMASK");
 	ret = MMSYSERR_ERROR;
@@ -228,17 +228,17 @@
 	if (WINE_CHN_SUPPORTS(mix->recMask, SOUND_MIXER_IGAIN))
 	    WARN("but it does support IGain, please report\n");
     }
-    if (ioctl(mixer, SOUND_MIXER_READ_CAPS, &caps) == -1) 
+    if (ioctl(mixer, SOUND_MIXER_READ_CAPS, &caps) == -1)
     {
 	perror("ioctl mixer SOUND_MIXER_READ_CAPS");
 	ret = MMSYSERR_ERROR;
 	goto error;
     }
     mix->singleRecChannel = caps & SOUND_CAP_EXCL_INPUT;
-    TRACE("dev=%04x rec=%04x stereo=%04x %s\n", 
-	  mix->devMask, mix->recMask, mix->stereoMask, 
+    TRACE("dev=%04x rec=%04x stereo=%04x %s\n",
+	  mix->devMask, mix->recMask, mix->stereoMask,
 	  mix->singleRecChannel ? "single" : "multiple");
-    for (i = 0; i < SOUND_MIXER_NRDEVICES; i++) 
+    for (i = 0; i < SOUND_MIXER_NRDEVICES; i++)
     {
 	mix->volume[i] = -1;
     }
@@ -250,18 +250,18 @@
 	    mix->numCtrl += 2; /* volume & mute */
 	if (WINE_CHN_SUPPORTS(mix->recMask, i))
 	    mix->numCtrl += 2; /* volume & onoff */
-	
+
     }
     if (!(mix->ctrl = HeapAlloc(GetProcessHeap(), 0, sizeof(mix->ctrl[0]) * mix->numCtrl)))
     {
 	ret = MMSYSERR_NOMEM;
 	goto error;
     }
-    
+
     j = 0;
     MIX_FillLineControls(mix, j++, MAKELONG(0, LINEID_DST), MIXERCONTROL_CONTROLTYPE_VOLUME);
     MIX_FillLineControls(mix, j++, MAKELONG(0, LINEID_DST), MIXERCONTROL_CONTROLTYPE_MUTE);
-    MIX_FillLineControls(mix, j++, MAKELONG(1, LINEID_DST), 
+    MIX_FillLineControls(mix, j++, MAKELONG(1, LINEID_DST),
 			 mix->singleRecChannel ?
 			    MIXERCONTROL_CONTROLTYPE_MUX : MIXERCONTROL_CONTROLTYPE_MIXER);
     MIX_FillLineControls(mix, j++, MAKELONG(1, LINEID_DST), MIXERCONTROL_CONTROLTYPE_MUTE/*EPP*/);
@@ -299,14 +299,14 @@
     int		mixer;
     BOOL	ret = FALSE;
 
-    if ((mixer = open(mix->name, O_RDWR)) < 0) 
+    if ((mixer = open(mix->name, O_RDWR)) < 0)
     {
 	/* FIXME: ENXIO => no mixer installed */
 	WARN("mixer device not available !\n");
-    } 
-    else 
+    }
+    else
     {
-	if (ioctl(mixer, MIXER_READ(chn), val) >= 0) 
+	if (ioctl(mixer, MIXER_READ(chn), val) >= 0)
 	{
 	    TRACE("Reading volume %x on %d\n", *val, chn);
 	    ret = TRUE;
@@ -326,14 +326,14 @@
 
     TRACE("Writing volume %x on %d\n", val, chn);
 
-    if ((mixer = open(mix->name, O_RDWR)) < 0) 
+    if ((mixer = open(mix->name, O_RDWR)) < 0)
     {
 	/* FIXME: ENXIO => no mixer installed */
 	WARN("mixer device not available !\n");
     }
-    else 
+    else
     {
-	if (ioctl(mixer, MIXER_WRITE(chn), &val) >= 0) 
+	if (ioctl(mixer, MIXER_WRITE(chn), &val) >= 0)
 	{
 	    ret = TRUE;
 	}
@@ -370,9 +370,9 @@
     int		mixer;
     BOOL	ret = FALSE;
 
-    if ((mixer = open(mix->name, O_RDWR)) >= 0) 
+    if ((mixer = open(mix->name, O_RDWR)) >= 0)
     {
-	if (ioctl(mixer, SOUND_MIXER_WRITE_RECSRC, &mask) < 0) 
+	if (ioctl(mixer, SOUND_MIXER_WRITE_RECSRC, &mask) < 0)
 	{
 	    ERR("Can't write new mixer settings\n");
 	}
@@ -391,7 +391,7 @@
     struct mixer*	mix;
 
     TRACE("(%04X, %p, %lu);\n", wDevID, lpCaps, dwSize);
-    
+
     if (lpCaps == NULL) return MMSYSERR_INVALPARAM;
     if (!(mix = MIX_Get(wDevID))) return MMSYSERR_BADDEVICEID;
 
@@ -402,7 +402,7 @@
 
     lpCaps->cDestinations = 2; /* speakers & record */
     lpCaps->fdwSupport = 0; /* No bits defined yet */
-    
+
     return MMSYSERR_NOERROR;
 }
 
@@ -410,7 +410,7 @@
  * 				MIX_GetLineInfoDst	[internal]
  */
 static	DWORD	MIX_GetLineInfoDst(struct mixer* mix, LPMIXERLINEA lpMl, DWORD dst)
-{	
+{
     unsigned mask;
     int	j;
 
@@ -434,7 +434,7 @@
     lpMl->dwSource = 0xFFFFFFFF;
     lstrcpynA(lpMl->szShortName, MIX_Labels[j], MIXER_SHORT_NAME_CHARS);
     lstrcpynA(lpMl->szName, MIX_Names[j], MIXER_LONG_NAME_CHARS);
-	
+
     /* we have all connections found in the MIX_DevMask */
     lpMl->cConnections = 0;
     for (j = 0; j < SOUND_MIXER_NRDEVICES; j++)
@@ -470,7 +470,7 @@
 	if (mix->ctrl[i].dwLineID == lpMl->dwLineID)
 	    lpMl->cControls++;
 
-    switch (idx) 
+    switch (idx)
     {
     case SOUND_MIXER_SYNTH:
 	lpMl->dwComponentType = MIXERLINE_COMPONENTTYPE_SRC_SYNTHESIZER;
@@ -503,14 +503,14 @@
     lpMl->cChannels = 1;
     if (dst == 0 && WINE_CHN_SUPPORTS(mix->stereoMask, idx))
 	lpMl->cChannels++;
-    for (i = j = 0; j < SOUND_MIXER_NRDEVICES; j++) 
+    for (i = j = 0; j < SOUND_MIXER_NRDEVICES; j++)
     {
 	if (WINE_CHN_SUPPORTS(mask, j))
 	{
 	    if (j == idx) break;
 	    i++;
 	}
-    }	
+    }
     lpMl->dwSource = i;
     return MMSYSERR_NOERROR;
 }
@@ -520,7 +520,7 @@
  */
 static BOOL MIX_CheckLine(DWORD lineID)
 {
-    return ((HIWORD(lineID) < SOUND_MIXER_NRDEVICES && LOWORD(lineID) < 2) || 
+    return ((HIWORD(lineID) < SOUND_MIXER_NRDEVICES && LOWORD(lineID) < 2) ||
 	    (HIWORD(lineID) == LINEID_DST && LOWORD(lineID) < SOUND_MIXER_NRDEVICES));
 }
 
@@ -536,17 +536,17 @@
 
     TRACE("(%04X, %p, %lu);\n", wDevID, lpMl, fdwInfo);
 
-    if (lpMl == NULL || lpMl->cbStruct != sizeof(*lpMl)) 
+    if (lpMl == NULL || lpMl->cbStruct != sizeof(*lpMl))
 	return MMSYSERR_INVALPARAM;
     if ((mix = MIX_Get(wDevID)) == NULL) return MMSYSERR_BADDEVICEID;
-    
+
     /* FIXME: set all the variables correctly... the lines below
      * are very wrong...
      */
     lpMl->fdwLine	= MIXERLINE_LINEF_ACTIVE;
     lpMl->dwUser	= 0;
-    
-    switch (fdwInfo & MIXER_GETLINEINFOF_QUERYMASK) 
+
+    switch (fdwInfo & MIXER_GETLINEINFOF_QUERYMASK)
     {
     case MIXER_GETLINEINFOF_DESTINATION:
 	TRACE("DESTINATION (%08lx)\n", lpMl->dwDestination);
@@ -564,7 +564,7 @@
 	default: return MMSYSERR_INVALPARAM;
 	}
 	i = lpMl->dwSource;
-	for (j = 0; j < SOUND_MIXER_NRDEVICES; j++) 
+	for (j = 0; j < SOUND_MIXER_NRDEVICES; j++)
 	{
 	    if (WINE_CHN_SUPPORTS(mask, j) && (i-- == 0))
 		break;
@@ -588,7 +588,7 @@
 	break;
     case MIXER_GETLINEINFOF_COMPONENTTYPE:
 	TRACE("COMPONENT TYPE (%08lx)\n", lpMl->dwComponentType);
-	switch (lpMl->dwComponentType) 
+	switch (lpMl->dwComponentType)
 	{
 	case MIXERLINE_COMPONENTTYPE_DST_SPEAKERS:
 	    ret = MIX_GetLineInfoDst(mix, lpMl, 0);
@@ -626,14 +626,14 @@
 	WARN("Unknown flag (%08lx)\n", fdwInfo & MIXER_GETLINEINFOF_QUERYMASK);
 	break;
     }
-    
+
     lpMl->Target.dwType = MIXERLINE_TARGETTYPE_AUX; /* FIXME */
     lpMl->Target.dwDeviceID = 0xFFFFFFFF;
     lpMl->Target.wMid = WINE_MIXER_MANUF_ID;
     lpMl->Target.wPid = WINE_MIXER_PRODUCT_ID;
     lpMl->Target.vDriverVersion = WINE_MIXER_VERSION;
     strcpy(lpMl->Target.szPname, WINE_MIXER_NAME);
-    
+
     return ret;
 }
 
@@ -655,21 +655,21 @@
     struct mixer*	mix;
 
     TRACE("(%04X, %p, %lu);\n", wDevID, lpMlc, flags);
-    
+
     if (lpMlc == NULL) return MMSYSERR_INVALPARAM;
     if (lpMlc->cbStruct < sizeof(*lpMlc) ||
 	lpMlc->cbmxctrl < sizeof(MIXERCONTROLA))
 	return MMSYSERR_INVALPARAM;
     if ((mix = MIX_Get(wDevID)) == NULL) return MMSYSERR_BADDEVICEID;
 
-    switch (flags & MIXER_GETLINECONTROLSF_QUERYMASK) 
+    switch (flags & MIXER_GETLINECONTROLSF_QUERYMASK)
     {
     case MIXER_GETLINECONTROLSF_ALL:
         {
 	    int		i, j;
 
 	    TRACE("line=%08lx GLCF_ALL (%ld)\n", lpMlc->dwLineID, lpMlc->cControls);
-	
+
 	    for (i = j = 0; i < mix->numCtrl; i++)
 	    {
 		if (mix->ctrl[i].dwLineID == lpMlc->dwLineID)
@@ -677,7 +677,7 @@
 	    }
 	    if (!j || lpMlc->cControls != j)		dwRet = MMSYSERR_INVALPARAM;
 	    else if (!MIX_CheckLine(lpMlc->dwLineID))	dwRet = MIXERR_INVALLINE;
-	    else 
+	    else
 	    {
 		for (i = j = 0; i < mix->numCtrl; i++)
 		{
@@ -702,7 +702,7 @@
     case MIXER_GETLINECONTROLSF_ONEBYTYPE:
 	TRACE("line=%08lx GLCF_ONEBYTYPE (%lx)\n", lpMlc->dwLineID, lpMlc->u.dwControlType);
 	if (!MIX_CheckLine(lpMlc->dwLineID))	dwRet = MIXERR_INVALLINE;
-	else 
+	else
 	{
 	    int		i;
 	    DWORD	ct = lpMlc->u.dwControlType & MIXERCONTROL_CT_CLASS_MASK;
@@ -735,13 +735,13 @@
     DWORD		ret = MMSYSERR_NOTSUPPORTED;
     DWORD		c, chnl;
     struct mixer*	mix;
-    
+
     TRACE("(%04X, %p, %lu);\n", wDevID, lpmcd, fdwDetails);
-    
+
     if (lpmcd == NULL) return MMSYSERR_INVALPARAM;
     if ((mix = MIX_Get(wDevID)) == NULL) return MMSYSERR_BADDEVICEID;
 
-    switch (fdwDetails & MIXER_GETCONTROLDETAILSF_QUERYMASK) 
+    switch (fdwDetails & MIXER_GETCONTROLDETAILSF_QUERYMASK)
     {
     case MIXER_GETCONTROLDETAILSF_VALUE:
 	TRACE("GCD VALUE (%08lx)\n", lpmcd->dwControlID);
@@ -749,9 +749,9 @@
 	{
 	    c = lpmcd->dwControlID - 1;
 	    chnl = HIWORD(mix->ctrl[c].dwLineID);
-	    if (chnl == LINEID_DST) 
+	    if (chnl == LINEID_DST)
 		chnl = LOWORD(mix->ctrl[c].dwLineID) ? SOUND_MIXER_RECLEV : SOUND_MIXER_VOLUME;
-	    switch (mix->ctrl[c].ctrl.dwControlType) 
+	    switch (mix->ctrl[c].ctrl.dwControlType)
 	    {
 	    case MIXERCONTROL_CONTROLTYPE_VOLUME:
 		{
@@ -762,8 +762,8 @@
 		    /* return value is 00RL (4 bytes)... */
 		    if ((val = mix->volume[chnl]) == -1 && !MIX_GetVal(mix, chnl, &val))
 			return MMSYSERR_INVALPARAM;
-	    
-		    switch (lpmcd->cChannels) 
+
+		    switch (lpmcd->cChannels)
 		    {
 		    case 1:
 			/* mono... so R = L */
@@ -788,7 +788,7 @@
 	    case MIXERCONTROL_CONTROLTYPE_ONOFF:
 		{
 		    LPMIXERCONTROLDETAILS_BOOLEAN	mcdb;
-		    
+
 		    TRACE(" <> %u %lu\n", sizeof(MIXERCONTROLDETAILS_BOOLEAN), lpmcd->cbDetails);
 		    /* we mute both channels at the same time */
 		    mcdb = (LPMIXERCONTROLDETAILS_BOOLEAN)lpmcd->paDetails;
@@ -808,7 +808,7 @@
 			WARN("mixer device not available !\n");
 			ret = MMSYSERR_ERROR;
 		    }
-		    else 
+		    else
 		    {
 			LPMIXERCONTROLDETAILS_BOOLEAN	mcdb;
 			int				i, j;
@@ -820,7 +820,7 @@
 			{
 			    if (WINE_CHN_SUPPORTS(mix->recMask, j))
 			    {
-				if (i >= lpmcd->u.cMultipleItems) 
+				if (i >= lpmcd->u.cMultipleItems)
 				    return MMSYSERR_INVALPARAM;
 				mcdb[i++].fValue = WINE_CHN_SUPPORTS(mask, j);
 			    }
@@ -833,7 +833,7 @@
 	    }
 	    ret = MMSYSERR_NOERROR;
 	}
-	else 
+	else
 	{
 	    ret = MMSYSERR_INVALPARAM;
 	}
@@ -883,13 +883,13 @@
     DWORD		c, chnl;
     int			val;
     struct mixer*	mix;
-    
+
     TRACE("(%04X, %p, %lu);\n", wDevID, lpmcd, fdwDetails);
-    
+
     if (lpmcd == NULL) return MMSYSERR_INVALPARAM;
     if ((mix = MIX_Get(wDevID)) == NULL) return MMSYSERR_BADDEVICEID;
-    
-    switch (fdwDetails & MIXER_GETCONTROLDETAILSF_QUERYMASK) 
+
+    switch (fdwDetails & MIXER_GETCONTROLDETAILSF_QUERYMASK)
     {
     case MIXER_GETCONTROLDETAILSF_VALUE:
 	TRACE("GCD VALUE (%08lx)\n", lpmcd->dwControlID);
@@ -897,18 +897,18 @@
 	{
 	    c = lpmcd->dwControlID - 1;
 	    chnl = HIWORD(mix->ctrl[c].dwLineID);
-	    if (chnl == LINEID_DST) 
+	    if (chnl == LINEID_DST)
 		chnl = LOWORD(mix->ctrl[c].dwLineID) ? SOUND_MIXER_RECLEV : SOUND_MIXER_VOLUME;
 
-	    switch (mix->ctrl[c].ctrl.dwControlType) 
+	    switch (mix->ctrl[c].ctrl.dwControlType)
 	    {
 	    case MIXERCONTROL_CONTROLTYPE_VOLUME:
 		{
 		    LPMIXERCONTROLDETAILS_UNSIGNED	mcdu;
-		    
+
 		    TRACE(" <> %u %lu\n", sizeof(MIXERCONTROLDETAILS_UNSIGNED), lpmcd->cbDetails);
 		    /* val should contain 00RL */
-		    switch (lpmcd->cChannels) 
+		    switch (lpmcd->cChannels)
 		    {
 		    case 1:
 			/* mono... so R = L */
@@ -929,13 +929,13 @@
 			WARN("Unknown cChannels (%ld)\n", lpmcd->cChannels);
 			return MMSYSERR_INVALPARAM;
 		    }
-		    
-		    if (mix->volume[chnl] == -1) 
+
+		    if (mix->volume[chnl] == -1)
 		    {
 			if (!MIX_SetVal(mix, chnl, val))
 			    return MMSYSERR_INVALPARAM;
 		    }
-		    else 
+		    else
 		    {
 			mix->volume[chnl] = val;
 		    }
@@ -946,17 +946,17 @@
 	    case MIXERCONTROL_CONTROLTYPE_ONOFF:
 		{
 		    LPMIXERCONTROLDETAILS_BOOLEAN	mcdb;
-		    
+
 		    TRACE(" <> %u %lu\n", sizeof(MIXERCONTROLDETAILS_BOOLEAN), lpmcd->cbDetails);
 		    mcdb = (LPMIXERCONTROLDETAILS_BOOLEAN)lpmcd->paDetails;
-		    if (mcdb->fValue) 
+		    if (mcdb->fValue)
 		    {
 			if (!MIX_GetVal(mix, chnl, &mix->volume[chnl]) || !MIX_SetVal(mix, chnl, 0))
 			    return MMSYSERR_INVALPARAM;
-		    }	
-		    else 
+		    }
+		    else
 		    {
-			if (mix->volume[chnl] == -1) 
+			if (mix->volume[chnl] == -1)
 			{
 			    ret = MMSYSERR_NOERROR;
 			    break;
@@ -984,7 +984,7 @@
 			if (WINE_CHN_SUPPORTS(mix->recMask, j) && mcdb[i++].fValue)
 			{
 			    /* a mux can only select one line at a time... */
-			    if (mix->singleRecChannel && mask != 0)	
+			    if (mix->singleRecChannel && mask != 0)
 			    {
 				FIXME("!!!\n");
 				return MMSYSERR_INVALPARAM;
@@ -994,7 +994,7 @@
 		    }
 		    if (i != lpmcd->u.cMultipleItems) FIXME("bad count\n");
 		    TRACE("writing %04x as rec src\n", mask);
-		    if (!MIX_SetRecSrc(mix, mask)) 
+		    if (!MIX_SetRecSrc(mix, mask))
 			ERR("Can't write new mixer settings\n");
 		    else
 			ret = MMSYSERR_NOERROR;
@@ -1017,10 +1017,10 @@
     int	mixer;
 
 #define MIXER_DEV "/dev/mixer"
-    if ((mixer = open(MIXER_DEV, O_RDWR)) < 0) 
+    if ((mixer = open(MIXER_DEV, O_RDWR)) < 0)
     {
-	if (errno == ENODEV || errno == ENXIO) 
-	{	
+	if (errno == ENODEV || errno == ENXIO)
+	{
 	    /* no driver present */
 	    return MMSYSERR_NODRIVER;
 	}
@@ -1048,13 +1048,13 @@
 /**************************************************************************
  * 				mixMessage (WINEOSS.3)
  */
-DWORD WINAPI OSS_mixMessage(UINT wDevID, UINT wMsg, DWORD dwUser, 
+DWORD WINAPI OSS_mixMessage(UINT wDevID, UINT wMsg, DWORD dwUser,
 			    DWORD dwParam1, DWORD dwParam2)
 {
 /* TRACE("(%04X, %04X, %08lX, %08lX, %08lX);\n", wDevID, wMsg, dwUser, dwParam1, dwParam2); */
-    
+
 #ifdef HAVE_OSS
-    switch (wMsg) 
+    switch (wMsg)
     {
     case DRVM_INIT:
 	return MIX_Init();
@@ -1063,7 +1063,7 @@
     case DRVM_DISABLE:
 	/* FIXME: Pretend this is supported */
 	return 0;
-    case MXDM_GETDEVCAPS:	
+    case MXDM_GETDEVCAPS:
 	return MIX_GetDevCaps(wDevID, (LPMIXERCAPSA)dwParam1, dwParam2);
     case MXDM_GETLINEINFO:
 	return MIX_GetLineInfo(wDevID, (LPMIXERLINEA)dwParam1, dwParam2);
diff --git a/dlls/winmm/wineoss/mmaux.c b/dlls/winmm/wineoss/mmaux.c
index 6cbad78..d2b987b 100644
--- a/dlls/winmm/wineoss/mmaux.c
+++ b/dlls/winmm/wineoss/mmaux.c
@@ -37,11 +37,11 @@
 #include "wine/debug.h"
 
 WINE_DEFAULT_DEBUG_CHANNEL(mmaux);
-    
+
 #ifdef HAVE_OSS
 
 #define MIXER_DEV "/dev/mixer"
-    
+
 static int	NumDev = 6;
 
 /*-----------------------------------------------------------------------*/
@@ -66,7 +66,7 @@
 static DWORD AUX_GetDevCaps(WORD wDevID, LPAUXCAPSA lpCaps, DWORD dwSize)
 {
     int 	mixer,volume;
-    
+
     TRACE("(%04X, %p, %lu);\n", wDevID, lpCaps, dwSize);
     if (lpCaps == NULL) return MMSYSERR_NOTENABLED;
     if ((mixer = open(MIXER_DEV, O_RDWR)) < 0) {
@@ -133,7 +133,7 @@
 static DWORD AUX_GetVolume(WORD wDevID, LPDWORD lpdwVol)
 {
     int 	mixer, volume, left, right, cmd;
-    
+
     TRACE("(%04X, %p);\n", wDevID, lpdwVol);
     if (lpdwVol == NULL) return MMSYSERR_NOTENABLED;
     if ((mixer = open(MIXER_DEV, O_RDWR)) < 0) {
@@ -189,18 +189,18 @@
     int 	mixer;
     int		volume, left, right;
     int		cmd;
-    
+
     TRACE("(%04X, %08lX);\n", wDevID, dwParam);
-    
+
     left   = (LOWORD(dwParam) * 100) >> 16;
     right  = (HIWORD(dwParam) * 100) >> 16;
     volume = (right << 8) | left;
-    
+
     if ((mixer = open(MIXER_DEV, O_RDWR)) < 0) {
 	WARN("mixer device not available !\n");
 	return MMSYSERR_NOTENABLED;
     }
-    
+
     switch(wDevID) {
     case 0:
 	TRACE("SOUND_MIXER_WRITE_PCM !\n");
@@ -243,10 +243,10 @@
 /**************************************************************************
  *		auxMessage (WINEOSS.2)
  */
-DWORD WINAPI OSS_auxMessage(UINT wDevID, UINT wMsg, DWORD dwUser, 
+DWORD WINAPI OSS_auxMessage(UINT wDevID, UINT wMsg, DWORD dwUser,
 			    DWORD dwParam1, DWORD dwParam2)
 {
-    TRACE("(%04X, %04X, %08lX, %08lX, %08lX);\n", 
+    TRACE("(%04X, %04X, %08lX, %08lX, %08lX);\n",
 	  wDevID, wMsg, dwUser, dwParam1, dwParam2);
 
 #ifdef HAVE_OSS
diff --git a/dlls/winmm/wineoss/oss.c b/dlls/winmm/wineoss/oss.c
index 8d5368b..78e6ebd 100644
--- a/dlls/winmm/wineoss/oss.c
+++ b/dlls/winmm/wineoss/oss.c
@@ -1,5 +1,5 @@
 /* -*- tab-width: 8; c-basic-offset: 4 -*- */
-/*				   
+/*
  * Wine Driver for Open Sound System
  *
  * Copyright 	1999 Eric Pouech
@@ -33,20 +33,20 @@
 static	struct WINE_OSS* oss = NULL;
 
 /**************************************************************************
- * 				OSS_drvOpen			[internal]	
+ * 				OSS_drvOpen			[internal]
  */
 static	DWORD	OSS_drvOpen(LPSTR str)
 {
     if (oss)
 	return 0;
-    
+
     /* I know, this is ugly, but who cares... */
     oss = (struct WINE_OSS*)1;
     return 1;
 }
 
 /**************************************************************************
- * 				OSS_drvClose			[internal]	
+ * 				OSS_drvClose			[internal]
  */
 static	DWORD	OSS_drvClose(DWORD dwDevID)
 {
@@ -63,17 +63,17 @@
 /**************************************************************************
  * 				DriverProc (WINEOSS.1)
  */
-LONG CALLBACK	OSS_DriverProc(DWORD dwDevID, HDRVR hDriv, DWORD wMsg, 
+LONG CALLBACK	OSS_DriverProc(DWORD dwDevID, HDRVR hDriv, DWORD wMsg,
 			       DWORD dwParam1, DWORD dwParam2)
 {
 /* EPP     TRACE("(%08lX, %04X, %08lX, %08lX, %08lX)\n",  */
 /* EPP 	  dwDevID, hDriv, wMsg, dwParam1, dwParam2); */
-    
+
     switch(wMsg) {
 #ifdef HAVE_OSS
-    case DRV_LOAD:		OSS_WaveInit(); 
+    case DRV_LOAD:		OSS_WaveInit();
 #ifdef HAVE_OSS_MIDI
-    				OSS_MidiInit(); 
+    				OSS_MidiInit();
 #endif
 				return 1;
     case DRV_FREE:		return 1;
diff --git a/dlls/winmm/wineoss/oss.h b/dlls/winmm/wineoss/oss.h
index de55cd9..5334bbe 100644
--- a/dlls/winmm/wineoss/oss.h
+++ b/dlls/winmm/wineoss/oss.h
@@ -17,9 +17,9 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
-#ifndef __WINE_CONFIG_H 
-# error You must include config.h to use this header 
-#endif 
+#ifndef __WINE_CONFIG_H
+# error You must include config.h to use this header
+#endif
 
 #if defined(HAVE_SYS_SOUNDCARD_H)
 # include <sys/soundcard.h>
diff --git a/dlls/winsock/async.c b/dlls/winsock/async.c
index 50b282b..c773605 100644
--- a/dlls/winsock/async.c
+++ b/dlls/winsock/async.c
@@ -1,5 +1,5 @@
 /* Async WINSOCK DNS services
- * 
+ *
  * Copyright (C) 1993,1994,1996,1997 John Brezak, Erik Bos, Alex Korobka.
  * Copyright (C) 1999 Marcus Meissner
  *
@@ -20,7 +20,7 @@
  * NOTE: If you make any changes to fix a particular app, make sure
  * they don't break something else like Netscape or telnet and ftp
  * clients and servers (www.winsite.com got a lot of those).
- * 
+ *
  * FIXME:
  *	- Add WSACancel* and correct handle management. (works rather well for
  *	  now without it.)
@@ -32,7 +32,7 @@
  *	- This implementation did ignore the "NOTE:" section above (since the
  *	  whole stuff did not work anyway to other changes).
  */
- 
+
 #include "config.h"
 #include "wine/port.h"
 
@@ -139,14 +139,14 @@
 {
   int i,j = 0;
   if(l)
-  { for(i=0;l[i];i++) 
+  { for(i=0;l[i];i++)
 	j += (item_size) ? item_size : strlen(l[i]) + 1;
     j += (i + 1) * sizeof(char*); }
   return j;
 }
 
 static int list_dup(char** l_src, char* ref, char* base, int item_size)
-{ 
+{
    /* base is either either equal to ref or 0 or SEGPTR */
 
    char*		p = ref;
@@ -169,9 +169,9 @@
 {
   int size = 0;
   if( p_he )
-  { size  = sizeof(struct hostent); 
+  { size  = sizeof(struct hostent);
     size += strlen(p_he->h_name) + 1;
-    size += list_size(p_he->h_aliases, 0);  
+    size += list_size(p_he->h_aliases, 0);
     size += list_size(p_he->h_addr_list, p_he->h_length ); }
   return size;
 }
@@ -204,7 +204,7 @@
 
 	if (flag & AQ_WIN16)
 	{
-	    p_to16->h_addrtype = (INT16)p_he->h_addrtype; 
+	    p_to16->h_addrtype = (INT16)p_he->h_addrtype;
 	    p_to16->h_length = (INT16)p_he->h_length;
 	    p_to16->h_name = (SEGPTR)(p_base + (p_name - p_to));
 	    p_to16->h_aliases = (SEGPTR)(p_base + (p_aliases - p_to));
@@ -212,7 +212,7 @@
 	}
 	else
 	{
-	    p_to32->h_addrtype = p_he->h_addrtype; 
+	    p_to32->h_addrtype = p_he->h_addrtype;
 	    p_to32->h_length = p_he->h_length;
 	    p_to32->h_name = (p_base + (p_name - p_to));
 	    p_to32->h_aliases = (char **)(p_base + (p_aliases - p_to));
@@ -262,13 +262,13 @@
 	{
 	    p_to16->p_proto = (INT16)p_pe->p_proto;
 	    p_to16->p_name = (SEGPTR)(p_base) + (p_name - p_to);
-	    p_to16->p_aliases = (SEGPTR)((p_base) + (p_aliases - p_to)); 
+	    p_to16->p_aliases = (SEGPTR)((p_base) + (p_aliases - p_to));
 	}
 	else
 	{
 	    p_to32->p_proto = p_pe->p_proto;
 	    p_to32->p_name = (p_base) + (p_name - p_to);
-	    p_to32->p_aliases = (char **)((p_base) + (p_aliases - p_to)); 
+	    p_to32->p_aliases = (char **)((p_base) + (p_aliases - p_to));
 	}
 
 	return size;
@@ -298,7 +298,7 @@
 	struct WS_servent *p_to32 = (struct WS_servent*)p_to;
 	int	size = servent_size(p_se) +
 		(
-		(flag & AQ_WIN16) ? sizeof(struct ws_servent16) : sizeof(struct WS_servent) 
+		(flag & AQ_WIN16) ? sizeof(struct ws_servent16) : sizeof(struct WS_servent)
 		- sizeof(struct servent)
 		);
 
@@ -319,14 +319,14 @@
 	    p_to16->s_port = (INT16)p_se->s_port;
 	    p_to16->s_name = (SEGPTR)(p_base + (p_name - p_to));
 	    p_to16->s_proto = (SEGPTR)(p_base + (p_proto - p_to));
-	    p_to16->s_aliases = (SEGPTR)(p_base + (p_aliases - p_to)); 
+	    p_to16->s_aliases = (SEGPTR)(p_base + (p_aliases - p_to));
 	}
 	else
 	{
 	    p_to32->s_port = p_se->s_port;
 	    p_to32->s_name = (p_base + (p_name - p_to));
 	    p_to32->s_proto = (p_base + (p_proto - p_to));
-	    p_to32->s_aliases = (char **)(p_base + (p_aliases - p_to)); 
+	    p_to32->s_aliases = (char **)(p_base + (p_aliases - p_to));
 	}
 
 	return size;
@@ -369,7 +369,7 @@
  * It is either called as a thread startup routine or directly. It has
  * to free the passed arg from the process heap and PostMessageA the async
  * result or the error code.
- * 
+ *
  * FIXME:
  *	- errorhandling not verified.
  */
@@ -390,7 +390,7 @@
                         int locerr = ENOBUFS;
                         he = NULL;
                         extrabuf=HeapAlloc(GetProcessHeap(),0,ebufsize) ;
-                        while(extrabuf) { 
+                        while(extrabuf) {
                             int res = (aq->flags & AQ_NAME) ?
                                 gethostbyname_r(aq->host_name,
                                                 &hostentry, extrabuf, ebufsize, &he, &locerr):
@@ -427,7 +427,7 @@
 			char *copy_protoent = targetptr;
                         EnterCriticalSection( &csWSgetXXXbyYYY );
 			pe = (aq->flags & AQ_NAME)?
-				getprotobyname(aq->proto_name) : 
+				getprotobyname(aq->proto_name) :
 				getprotobynumber(aq->proto_number);
 			if (pe) {
 				size = WS_copy_pe(copy_protoent,(char*)aq->sbuf,aq->sbuflen,pe,aq->flags);
@@ -452,7 +452,7 @@
 			char *copy_servent = targetptr;
                         EnterCriticalSection( &csWSgetXXXbyYYY );
 			se = (aq->flags & AQ_NAME)?
-				getservbyname(aq->serv_name,aq->serv_proto) : 
+				getservbyname(aq->serv_name,aq->serv_proto) :
 				getservbyport(aq->serv_port,aq->serv_proto);
 			if (se) {
 				size = WS_copy_se(copy_servent,(char*)aq->sbuf,aq->sbuflen,se,aq->flags);
@@ -464,11 +464,11 @@
                             if (aq->flags & AQ_NAME)
                                 MESSAGE("service %s protocol %s not found; You might want to add "
                                         "this to /etc/services\n", debugstr_a(aq->serv_name) ,
-                                        aq->serv_proto ? debugstr_a(aq->serv_proto ):"*"); 
+                                        aq->serv_proto ? debugstr_a(aq->serv_proto ):"*");
                             else
                                 MESSAGE("service on port %d protocol %s not found; You might want to add "
                                         "this to /etc/services\n", aq->serv_port,
-                                        aq->serv_proto ? debugstr_a(aq->serv_proto ):"*"); 
+                                        aq->serv_proto ? debugstr_a(aq->serv_proto ):"*");
                             fail = WSANO_DATA;
 			}
                         LeaveCriticalSection( &csWSgetXXXbyYYY );
@@ -481,8 +481,8 @@
 }
 
 /****************************************************************************
- * The main async help function. 
- * 
+ * The main async help function.
+ *
  * It either starts a thread or just calls the function directly for platforms
  * with no thread support. This relies on the fact that PostMessage() does
  * not actually call the windowproc before the function returns.
@@ -490,34 +490,34 @@
 static HANDLE16	__WSAsyncDBQuery(
 	HWND hWnd, UINT uMsg,INT int1,LPCSTR ptr1, INT int2, LPCSTR ptr2,
 	void *sbuf, INT sbuflen, UINT flags
-) 
+)
 {
         async_query*	aq;
 	char*		pto;
 	LPCSTR		pfm;
 	int		xbuflen = 0;
-	
+
 	/* allocate buffer to copy protocol- and service name to */
 	/* note: this is done in the calling thread so we can return */
 	/* a decent error code if the Alloc fails */
-	
+
 	switch (flags & AQ_MASKPTR1) {
 	case 0:							break;
 	case AQ_COPYPTR1:	xbuflen += int1;		break;
 	case AQ_DUPLOWPTR1:	xbuflen += strlen(ptr1) + 1;	break;
 	}
-	
+
 	switch (flags & AQ_MASKPTR2) {
 	case 0:							break;
 	case AQ_COPYPTR2:	xbuflen += int2;		break;
 	case AQ_DUPLOWPTR2:	xbuflen += strlen(ptr2) + 1;	break;
 	}
-	
+
 	if(!(aq = HeapAlloc(GetProcessHeap(),0,sizeof(async_query) + xbuflen))) {
 	        SetLastError(WSAEWOULDBLOCK); /* insufficient resources */
 		return 0;
 	}
-	
+
 	pto = aq->xbuf;
 	if (ptr1) switch (flags & AQ_MASKPTR1) {
 	case 0:											break;
@@ -576,22 +576,22 @@
 /***********************************************************************
  *       WSAAsyncGetHostByName	(WINSOCK.103)
  */
-HANDLE16 WINAPI WSAAsyncGetHostByName16(HWND16 hWnd, UINT16 uMsg, LPCSTR name, 
+HANDLE16 WINAPI WSAAsyncGetHostByName16(HWND16 hWnd, UINT16 uMsg, LPCSTR name,
                                       SEGPTR sbuf, INT16 buflen)
 {
-	TRACE("hwnd %04x, msg %04x, host %s, buffer %i\n", 
+	TRACE("hwnd %04x, msg %04x, host %s, buffer %i\n",
 	      hWnd, uMsg, (name)?name:"<null>", (int)buflen );
 	return __WSAsyncDBQuery(hWnd,uMsg,0,name,0,NULL,(void*)sbuf,buflen,
 				AQ_NAME|AQ_DUPLOWPTR1|AQ_WIN16|AQ_GETHOST);
-}                     
+}
 
 /***********************************************************************
  *       WSAAsyncGetHostByName	(WS2_32.103)
  */
-HANDLE WINAPI WSAAsyncGetHostByName(HWND hWnd, UINT uMsg, LPCSTR name, 
+HANDLE WINAPI WSAAsyncGetHostByName(HWND hWnd, UINT uMsg, LPCSTR name,
 					LPSTR sbuf, INT buflen)
 {
-	TRACE("hwnd %04x, msg %08x, host %s, buffer %i\n", 
+	TRACE("hwnd %04x, msg %08x, host %s, buffer %i\n",
 	       (HWND16)hWnd, uMsg, (name)?name:"<null>", (int)buflen );
 	return __WSAsyncDBQuery(hWnd,uMsg,0,name,0,NULL,sbuf,buflen,
 				AQ_NAME|AQ_DUPLOWPTR1|AQ_WIN32|AQ_GETHOST);
@@ -600,7 +600,7 @@
 /***********************************************************************
  *       WSAAsyncGetProtoByName	(WINSOCK.105)
  */
-HANDLE16 WINAPI WSAAsyncGetProtoByName16(HWND16 hWnd, UINT16 uMsg, LPCSTR name, 
+HANDLE16 WINAPI WSAAsyncGetProtoByName16(HWND16 hWnd, UINT16 uMsg, LPCSTR name,
                                          SEGPTR sbuf, INT16 buflen)
 {
 	TRACE("hwnd %04x, msg %08x, protocol %s\n",
@@ -647,7 +647,7 @@
 /***********************************************************************
  *       WSAAsyncGetServByName	(WINSOCK.107)
  */
-HANDLE16 WINAPI WSAAsyncGetServByName16(HWND16 hWnd, UINT16 uMsg, LPCSTR name, 
+HANDLE16 WINAPI WSAAsyncGetServByName16(HWND16 hWnd, UINT16 uMsg, LPCSTR name,
                                         LPCSTR proto, SEGPTR sbuf, INT16 buflen)
 {
 	TRACE("hwnd %04x, msg %04x, name %s, proto %s\n",
@@ -671,7 +671,7 @@
 /***********************************************************************
  *       WSAAsyncGetServByPort	(WINSOCK.106)
  */
-HANDLE16 WINAPI WSAAsyncGetServByPort16(HWND16 hWnd, UINT16 uMsg, INT16 port, 
+HANDLE16 WINAPI WSAAsyncGetServByPort16(HWND16 hWnd, UINT16 uMsg, INT16 port,
                                         LPCSTR proto, SEGPTR sbuf, INT16 buflen)
 {
 	TRACE("hwnd %04x, msg %04x, port %i, proto %s\n",
diff --git a/dlls/winsock/socket.c b/dlls/winsock/socket.c
index 3b19995..7cd7643 100644
--- a/dlls/winsock/socket.c
+++ b/dlls/winsock/socket.c
@@ -1,7 +1,7 @@
 /*
  * based on Windows Sockets 1.1 specs
  * (ftp.microsoft.com:/Advsys/winsock/spec11/WINSOCK.TXT)
- * 
+ *
  * Copyright (C) 1993,1994,1996,1997 John Brezak, Erik Bos, Alex Korobka.
  *
  * This library is free software; you can redistribute it and/or
@@ -18,8 +18,8 @@
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  *
- * NOTE: If you make any changes to fix a particular app, make sure 
- * they don't break something else like Netscape or telnet and ftp 
+ * NOTE: If you make any changes to fix a particular app, make sure
+ * they don't break something else like Netscape or telnet and ftp
  * clients and servers (www.winsite.com got a lot of those).
  */
 
@@ -188,12 +188,12 @@
   HWND        hWnd;
   UINT        uMsg;
   LONG        lEvent;
-} ws_select_info;  
+} ws_select_info;
 
 #define WS_MAX_SOCKETS_PER_PROCESS      128     /* reasonable guess */
 #define WS_MAX_UDP_DATAGRAM             1024
 
-#define PROCFS_NETDEV_FILE   "/proc/net/dev" /* Points to the file in the /proc fs 
+#define PROCFS_NETDEV_FILE   "/proc/net/dev" /* Points to the file in the /proc fs
                                                 that lists the network devices.
                                                 Do we need an #ifdef LINUX for this? */
 
@@ -222,7 +222,7 @@
 
 UINT16 wsaErrno(void);
 UINT16 wsaHerrno(int errnr);
-                                                      
+
 static HANDLE 	_WSHeap = 0;
 
 #define WS_ALLOC(size) \
@@ -495,8 +495,8 @@
 {
     /* translate Winsock fd set into local fd set */
 
-    if( wsfds ) 
-    { 
+    if( wsfds )
+    {
 #define wsfds16	((ws_fd_set16*)wsfds)
 #define wsfds32 ((WS_fd_set*)wsfds)
 	int i, count;
@@ -628,7 +628,7 @@
 }
 
 
-/* ----------------------------------- API ----- 
+/* ----------------------------------- API -----
  *
  * Init / cleanup / error checking.
  */
@@ -860,8 +860,8 @@
 
 /**********************************************************************/
 
-/* Returns the converted address if successful, NULL if it was too small to 
- * start with. Note that the returned pointer may be the original pointer 
+/* Returns the converted address if successful, NULL if it was too small to
+ * start with. Note that the returned pointer may be the original pointer
  * if no conversion is necessary.
  */
 static const struct sockaddr* ws_sockaddr_ws2u(const struct WS_sockaddr* wsaddr, int wsaddrlen, int *uaddrlen)
@@ -881,7 +881,7 @@
             uipx=malloc(*uaddrlen);
             uipx->sipx_family=AF_IPX;
             uipx->sipx_port=wsipx->sa_socket;
-            /* copy sa_netnum and sa_nodenum to sipx_network and sipx_node 
+            /* copy sa_netnum and sa_nodenum to sipx_network and sipx_node
              * in one go
              */
             memcpy(&uipx->sipx_network,wsipx->sa_netnum,sizeof(uipx->sipx_network)+sizeof(uipx->sipx_node));
@@ -976,7 +976,7 @@
     return res;
 }
 
-/* to be called to free the memory allocated by ws_sockaddr_ws2u or 
+/* to be called to free the memory allocated by ws_sockaddr_ws2u or
  * ws_sockaddr_alloc
  */
 inline void ws_sockaddr_free(const struct sockaddr* uaddr, const struct WS_sockaddr* wsaddr)
@@ -1758,7 +1758,7 @@
 /***********************************************************************
  *		getsockopt		(WS2_32.7)
  */
-INT WINAPI WS_getsockopt(SOCKET s, INT level, 
+INT WINAPI WS_getsockopt(SOCKET s, INT level,
                                   INT optname, char *optval, INT *optlen)
 {
     int fd;
@@ -1869,8 +1869,8 @@
  */
 char* WINAPI WS_inet_ntoa(struct WS_in_addr in)
 {
-  /* use "buffer for dummies" here because some applications have 
-   * propensity to decode addresses in ws_hostent structure without 
+  /* use "buffer for dummies" here because some applications have
+   * propensity to decode addresses in ws_hostent structure without
    * saving them first...
    */
     static char dbuffer[16]; /* Yes, 16: 4*3 digits + 3 '.' + 1 '\0' */
@@ -1925,11 +1925,11 @@
             int i, numInt;
             struct ifreq ifInfo;
             char ifName[512];
-            
+
 
             TRACE ("-> SIO_GET_INTERFACE_LIST request\n");
-	    
-            numInt = WSAIOCTL_GetInterfaceCount(); 
+
+            numInt = WSAIOCTL_GetInterfaceCount();
             if (numInt < 0)
             {
                ERR ("Unable to open /proc filesystem to determine number of network interfaces!\n");
@@ -1937,7 +1937,7 @@
                WSASetLastError(WSAEINVAL);
                return (SOCKET_ERROR);
             }
-            
+
             for (i=0; i<numInt; i++)
             {
                if (!WSAIOCTL_GetInterfaceName(i, ifName))
@@ -1947,12 +1947,12 @@
                   WSASetLastError(WSAEINVAL);
                   return (SOCKET_ERROR);
                }
-               
-               ifInfo.ifr_addr.sa_family = AF_INET; 
-            
+
+               ifInfo.ifr_addr.sa_family = AF_INET;
+
                /* IP Address */
                strcpy (ifInfo.ifr_name, ifName);
-               if (ioctl(fd, SIOCGIFADDR, &ifInfo) < 0) 
+               if (ioctl(fd, SIOCGIFADDR, &ifInfo) < 0)
                {
                   ERR ("Error obtaining IP address\n");
                   close(fd);
@@ -1962,12 +1962,12 @@
                else
                {
                   struct WS_sockaddr_in *ipTemp = (struct WS_sockaddr_in *)&ifInfo.ifr_addr;
-               
+
                   intArray->iiAddress.AddressIn.sin_family = AF_INET;
                   intArray->iiAddress.AddressIn.sin_port = ipTemp->sin_port;
                   intArray->iiAddress.AddressIn.sin_addr.WS_s_addr = ipTemp->sin_addr.S_un.S_addr;
                }
-               
+
                /* Broadcast Address */
                strcpy (ifInfo.ifr_name, ifName);
                if (ioctl(fd, SIOCGIFBRDADDR, &ifInfo) < 0)
@@ -1980,10 +1980,10 @@
                else
                {
                   struct WS_sockaddr_in *ipTemp = (struct WS_sockaddr_in *)&ifInfo.ifr_broadaddr;
-               
-                  intArray->iiBroadcastAddress.AddressIn.sin_family = AF_INET; 
+
+                  intArray->iiBroadcastAddress.AddressIn.sin_family = AF_INET;
                   intArray->iiBroadcastAddress.AddressIn.sin_port = ipTemp->sin_port;
-                  intArray->iiBroadcastAddress.AddressIn.sin_addr.WS_s_addr = ipTemp->sin_addr.S_un.S_addr; 
+                  intArray->iiBroadcastAddress.AddressIn.sin_addr.WS_s_addr = ipTemp->sin_addr.S_un.S_addr;
                }
 
                /* Subnet Mask */
@@ -2001,29 +2001,29 @@
                      (Linux, FreeBSD, Solaris...) */
                   #ifndef ifr_netmask
                     #ifndef ifr_addr
-                       intArray->iiNetmask.AddressIn.sin_family = AF_INET; 
+                       intArray->iiNetmask.AddressIn.sin_family = AF_INET;
                        intArray->iiNetmask.AddressIn.sin_port = 0;
-                       intArray->iiNetmask.AddressIn.sin_addr.WS_s_addr = 0; 
+                       intArray->iiNetmask.AddressIn.sin_addr.WS_s_addr = 0;
                        ERR ("Unable to determine Netmask on your platform!\n");
                     #else
                        struct WS_sockaddr_in *ipTemp = (struct WS_sockaddr_in *)&ifInfo.ifr_addr;
-            
-                       intArray->iiNetmask.AddressIn.sin_family = AF_INET; 
+
+                       intArray->iiNetmask.AddressIn.sin_family = AF_INET;
                        intArray->iiNetmask.AddressIn.sin_port = ipTemp->sin_port;
-                       intArray->iiNetmask.AddressIn.sin_addr.WS_s_addr = ipTemp->sin_addr.S_un.S_addr; 
+                       intArray->iiNetmask.AddressIn.sin_addr.WS_s_addr = ipTemp->sin_addr.S_un.S_addr;
                     #endif
                   #else
                      struct WS_sockaddr_in *ipTemp = (struct WS_sockaddr_in *)&ifInfo.ifr_netmask;
-            
-                     intArray->iiNetmask.AddressIn.sin_family = AF_INET; 
+
+                     intArray->iiNetmask.AddressIn.sin_family = AF_INET;
                      intArray->iiNetmask.AddressIn.sin_port = ipTemp->sin_port;
-                     intArray->iiNetmask.AddressIn.sin_addr.WS_s_addr = ipTemp->sin_addr.S_un.S_addr; 
+                     intArray->iiNetmask.AddressIn.sin_addr.WS_s_addr = ipTemp->sin_addr.S_un.S_addr;
                   #endif
                }
-               
+
                /* Socket Status Flags */
                strcpy(ifInfo.ifr_name, ifName);
-               if (ioctl(fd, SIOCGIFFLAGS, &ifInfo) < 0) 
+               if (ioctl(fd, SIOCGIFFLAGS, &ifInfo) < 0)
                {
                   ERR ("Error obtaining status flags for socket!\n");
                   close(fd);
@@ -2037,7 +2037,7 @@
                }
                intArray++; /* Prepare for another interface */
             }
-            
+
             /* Calculate the size of the array being returned */
             *lpcbBytesReturned = sizeof(INTERFACE_INFO) * numInt;
             break;
@@ -2054,7 +2054,7 @@
 
       /* Function executed with no errors */
       close(fd);
-      return (0); 
+      return (0);
    }
    else
    {
@@ -2064,7 +2064,7 @@
 }
 
 
-/* 
+/*
   Helper function for WSAIoctl - Get count of the number of interfaces
   by parsing /proc filesystem.
 */
@@ -2073,21 +2073,21 @@
    FILE *procfs;
    char buf[512];  /* Size doesn't matter, something big */
    int  intcnt=0;
- 
- 
-   /* Open /proc filesystem file for network devices */ 
+
+
+   /* Open /proc filesystem file for network devices */
    procfs = fopen(PROCFS_NETDEV_FILE, "r");
-   if (!procfs) 
+   if (!procfs)
    {
       /* If we can't open the file, return an error */
       return (-1);
    }
-   
+
    /* Omit first two lines, they are only headers */
-   fgets(buf, sizeof buf, procfs);	
+   fgets(buf, sizeof buf, procfs);
    fgets(buf, sizeof buf, procfs);
 
-   while (fgets(buf, sizeof buf, procfs)) 
+   while (fgets(buf, sizeof buf, procfs))
    {
       /* Each line in the file represents a network interface */
       intcnt++;
@@ -2108,16 +2108,16 @@
    char buf[512]; /* Size doesn't matter, something big */
    int  i;
 
-   /* Open /proc filesystem file for network devices */ 
+   /* Open /proc filesystem file for network devices */
    procfs = fopen(PROCFS_NETDEV_FILE, "r");
-   if (!procfs) 
+   if (!procfs)
    {
       /* If we can't open the file, return an error */
       return (-1);
    }
-   
+
    /* Omit first two lines, they are only headers */
-   fgets(buf, sizeof(buf), procfs);	
+   fgets(buf, sizeof(buf), procfs);
    fgets(buf, sizeof(buf), procfs);
 
    for (i=0; i<intNumber; i++)
@@ -2127,55 +2127,55 @@
    }
    fgets(buf, sizeof(buf), procfs); /* This is the line we want */
 
-   
+
    /* Parse out the line, grabbing only the name of the device
-      to the intName variable 
-      
+      to the intName variable
+
       The Line comes in like this: (we only care about the device name)
       lo:   21970 377 0 0 0 0 0 0 21970 377 0 0 0 0 0 0
    */
-   i=0; 
+   i=0;
    while (isspace(buf[i])) /* Skip initial space(s) */
    {
       i++;
    }
 
-   while (buf[i]) 
+   while (buf[i])
    {
       if (isspace(buf[i]))
       {
          break;
       }
-      
+
       if (buf[i] == ':')  /* FIXME: Not sure if this block (alias detection) works properly */
       {
          /* This interface could be an alias... */
          int hold = i;
          char *dotname = intName;
          *intName++ = buf[i++];
-         
+
          while (isdigit(buf[i]))
          {
             *intName++ = buf[i++];
          }
-         
-         if (buf[i] != ':') 
+
+         if (buf[i] != ':')
          {
             /* ... It wasn't, so back up */
             i = hold;
             intName = dotname;
          }
- 
+
          if (buf[i] == '\0')
          {
             fclose(procfs);
             return(FALSE);
          }
-         
+
          i++;
          break;
       }
-      
+
       *intName++ = buf[i++];
    }
    *intName++ = '\0';
@@ -2199,12 +2199,12 @@
 
     switch( cmd )
     {
-	case WS_FIONREAD:   
-		newcmd=FIONREAD; 
+	case WS_FIONREAD:
+		newcmd=FIONREAD;
 		break;
 
-	case WS_FIONBIO:    
-		newcmd=FIONBIO;  
+	case WS_FIONBIO:
+		newcmd=FIONBIO;
 		if( _get_sock_mask(s) )
 		{
 		    /* AsyncSelect()'ed sockets are always nonblocking */
@@ -2212,9 +2212,9 @@
 			close(fd);
 			return 0;
 		    }
-		    SetLastError(WSAEINVAL); 
+		    SetLastError(WSAEINVAL);
 		    close(fd);
-		    return SOCKET_ERROR; 
+		    return SOCKET_ERROR;
 		}
 		close(fd);
 		if (*argp)
@@ -2223,24 +2223,24 @@
 		    _enable_event(s, 0, 0, FD_WINE_NONBLOCKING);
 		return 0;
 
-	case WS_SIOCATMARK: 
-		newcmd=SIOCATMARK; 
+	case WS_SIOCATMARK:
+		newcmd=SIOCATMARK;
 		break;
 
-	case WS__IOW('f',125,u_long): 
+	case WS__IOW('f',125,u_long):
 		WARN("Warning: WS1.1 shouldn't be using async I/O\n");
-		SetLastError(WSAEINVAL); 
+		SetLastError(WSAEINVAL);
 		return SOCKET_ERROR;
-        
+
         case SIOCGIFBRDADDR:
         case SIOCGIFNETMASK:
         case SIOCGIFADDR:
                 /* These don't need any special handling.  They are used by
                    WsControl, and are here to suppress an unecessary warning. */
                 break;
-                   
-        
-	default:	  
+
+
+	default:
 		/* Netscape tries hard to use bogus ioctl 0x667e */
 		WARN("\tunknown WS_IOCTL cmd (%08lx)\n", cmd);
     }
@@ -2249,7 +2249,7 @@
 	close(fd);
 	return 0;
     }
-    SetLastError((errno == EBADF) ? WSAENOTSOCK : wsaErrno()); 
+    SetLastError((errno == EBADF) ? WSAENOTSOCK : wsaErrno());
     close(fd);
   }
   return SOCKET_ERROR;
@@ -2616,7 +2616,7 @@
 /***********************************************************************
  *		setsockopt		(WS2_32.21)
  */
-int WINAPI WS_setsockopt(SOCKET s, int level, int optname, 
+int WINAPI WS_setsockopt(SOCKET s, int level, int optname,
                                   const char *optval, int optlen)
 {
     int fd;
@@ -2817,13 +2817,13 @@
 {
     return (SOCKET16)WS_socket( af, type, protocol );
 }
-    
+
 
 /* ----------------------------------- DNS services
  *
  * IMPORTANT: 16-bit API structures have SEGPTR pointers inside them.
  * Also, we have to use wsock32 stubs to convert structures and
- * error codes from Unix to WSA, hence there is no direct mapping in 
+ * error codes from Unix to WSA, hence there is no direct mapping in
  * the relay32/wsock32.spec.
  */
 
@@ -2843,8 +2843,8 @@
     int locerr=ENOBUFS;
     host = NULL;
     extrabuf=HeapAlloc(GetProcessHeap(),0,ebufsize) ;
-    while(extrabuf) { 
-        int res = gethostbyaddr_r(addr, len, type, 
+    while(extrabuf) {
+        int res = gethostbyaddr_r(addr, len, type,
                                   &hostentry, extrabuf, ebufsize, &host, &locerr);
         if( res != ERANGE) break;
         ebufsize *=2;
@@ -2860,7 +2860,7 @@
     {
         if( WS_dup_he(host, dup_flag) )
             retval = he_buffer;
-        else 
+        else
             SetLastError(WSAENOBUFS);
     }
 #ifdef  HAVE_LINUX_GETHOSTBYNAME_R_6
@@ -3304,8 +3304,8 @@
 {
     /* Create a manual-reset event, with initial state: unsignealed */
     TRACE("\n");
-    
-    return CreateEventA(NULL, TRUE, FALSE, NULL);    
+
+    return CreateEventA(NULL, TRUE, FALSE, NULL);
 }
 
 /***********************************************************************
@@ -3329,12 +3329,12 @@
 {
     SOCKET ret;
 
-   /* 
+   /*
       FIXME: The "advanced" parameters of WSASocketA (lpProtocolInfo,
       g, dwFlags except WSA_FLAG_OVERLAPPED) are ignored.
    */
 
-   TRACE("af=%d type=%d protocol=%d protocol_info=%p group=%d flags=0x%lx\n", 
+   TRACE("af=%d type=%d protocol=%d protocol_info=%p group=%d flags=0x%lx\n",
          af, type, protocol, lpProtocolInfo, g, dwFlags );
 
     /* check the socket family */
@@ -3423,13 +3423,13 @@
 INT16 WINAPI __WSAFDIsSet16(SOCKET16 s, ws_fd_set16 *set)
 {
   int i = set->fd_count;
-  
+
   TRACE("(%d,%8lx(%i))\n", s,(unsigned long)set, i);
-    
+
   while (i--)
       if (set->fd_array[i] == s) return 1;
   return 0;
-}                                                            
+}
 
 /***********************************************************************
  *      __WSAFDIsSet			(WS2_32.151)
@@ -3452,8 +3452,8 @@
 BOOL WINAPI WSAIsBlocking(void)
 {
   /* By default WinSock should set all its sockets to non-blocking mode
-   * and poll in PeekMessage loop when processing "blocking" ones. This 
-   * function is supposed to tell if the program is in this loop. Our 
+   * and poll in PeekMessage loop when processing "blocking" ones. This
+   * function is supposed to tell if the program is in this loop. Our
    * blocking calls are truly blocking so we always return FALSE.
    *
    * Note: It is allowed to call this function without prior WSAStartup().
@@ -3531,14 +3531,14 @@
 {
   int i,j = 0;
   if(l)
-  { for(i=0;l[i];i++) 
+  { for(i=0;l[i];i++)
 	j += (item_size) ? item_size : strlen(l[i]) + 1;
     j += (i + 1) * sizeof(char*); }
   return j;
 }
 
 static int list_dup(char** l_src, char* ref, char* base, int item_size)
-{ 
+{
    /* base is either either equal to ref or 0 or SEGPTR */
 
    char*		p = ref;
@@ -3561,9 +3561,9 @@
 {
   int size = 0;
   if( p_he )
-  { size  = sizeof(struct hostent); 
+  { size  = sizeof(struct hostent);
     size += strlen(p_he->h_name) + 1;
-    size += list_size(p_he->h_aliases, 0);  
+    size += list_size(p_he->h_aliases, 0);
     size += list_size(p_he->h_addr_list, p_he->h_length ); }
   return size;
 }
@@ -3574,8 +3574,8 @@
  */
 static int WS_dup_he(struct hostent* p_he, int flag)
 {
-    /* Convert hostent structure into ws_hostent so that the data fits 
-     * into local_buffer. Internal pointers can be linear, SEGPTR, or 
+    /* Convert hostent structure into ws_hostent so that the data fits
+     * into local_buffer. Internal pointers can be linear, SEGPTR, or
      * relative to local_buffer depending on "flag" value. Returns size
      * of the data copied.
      */
@@ -3606,7 +3606,7 @@
 
 	if (flag & WS_DUP_SEGPTR) /* Win16 */
 	{
-	    p_to16->h_addrtype = (INT16)p_he->h_addrtype; 
+	    p_to16->h_addrtype = (INT16)p_he->h_addrtype;
 	    p_to16->h_length = (INT16)p_he->h_length;
 	    p_to16->h_name = (SEGPTR)(p_base + (p_name - p_to));
 	    p_to16->h_aliases = (SEGPTR)(p_base + (p_aliases - p_to));
@@ -3615,7 +3615,7 @@
 	}
 	else /* Win32 */
 	{
-	    p_to32->h_addrtype = p_he->h_addrtype; 
+	    p_to32->h_addrtype = p_he->h_addrtype;
 	    p_to32->h_length = p_he->h_length;
 	    p_to32->h_name = (p_base + (p_name - p_to));
 	    p_to32->h_aliases = (char **)(p_base + (p_aliases - p_to));
@@ -3665,14 +3665,14 @@
 	{
 	    p_to16->p_proto = (INT16)p_pe->p_proto;
 	    p_to16->p_name = (SEGPTR)(p_base) + (p_name - p_to);
-	    p_to16->p_aliases = (SEGPTR)((p_base) + (p_aliases - p_to)); 
+	    p_to16->p_aliases = (SEGPTR)((p_base) + (p_aliases - p_to));
 	    size += (sizeof(struct ws_protoent16) - sizeof(struct protoent));
 	}
 	else /* Win32 */
 	{
 	    p_to32->p_proto = p_pe->p_proto;
 	    p_to32->p_name = (p_base) + (p_name - p_to);
-	    p_to32->p_aliases = (char **)((p_base) + (p_aliases - p_to)); 
+	    p_to32->p_aliases = (char **)((p_base) + (p_aliases - p_to));
 	    size += (sizeof(struct WS_protoent) - sizeof(struct protoent));
 	}
     }
@@ -3717,7 +3717,7 @@
 	list_dup(p_se->s_aliases, p, p_base + (p - p_to), 0);
 
 	if (flag & WS_DUP_SEGPTR) /* Win16 */
-	{ 
+	{
 	    p_to16->s_port = (INT16)p_se->s_port;
 	    p_to16->s_name = (SEGPTR)(p_base + (p_name - p_to));
 	    p_to16->s_proto = (SEGPTR)(p_base + (p_proto - p_to));
@@ -3740,7 +3740,7 @@
 
 UINT16 wsaErrno(void)
 {
-    int	loc_errno = errno; 
+    int	loc_errno = errno;
     WARN("errno %d, (%s).\n", loc_errno, strerror(loc_errno));
 
     switch(loc_errno)
@@ -3819,7 +3819,7 @@
 	case HOST_NOT_FOUND:	return WSAHOST_NOT_FOUND;
 	case TRY_AGAIN:		return WSATRY_AGAIN;
 	case NO_RECOVERY:	return WSANO_RECOVERY;
-	case NO_DATA:		return WSANO_DATA; 
+	case NO_DATA:		return WSANO_DATA;
 	case ENOBUFS:		return WSAENOBUFS;
 
 	case 0:			return 0;
@@ -4000,26 +4000,26 @@
        TRACE("Socket  %u, sockaddr %p, addrlen %p, fnCondition %p, dwCallbackData %ld\n",
                s, addr, addrlen, lpfnCondition, dwCallbackData);
 
-       
+
        size = sizeof(src_addr);
        cs = WS_accept(s, &src_addr, &size);
-       
+
        if (cs == SOCKET_ERROR) return SOCKET_ERROR;
 
        CallerId.buf = (char *)&src_addr;
-       CallerId.len = sizeof(src_addr);  
+       CallerId.len = sizeof(src_addr);
 
        CallerData.buf = NULL;
-       CallerData.len = (ULONG)NULL;   
+       CallerData.len = (ULONG)NULL;
 
        WS_getsockname(cs, &dst_addr, &size);
 
        CalleeId.buf = (char *)&dst_addr;
-       CalleeId.len = sizeof(dst_addr);  
+       CalleeId.len = sizeof(dst_addr);
 
-       
+
        ret = (*lpfnCondition)(&CallerId, &CallerData, NULL, NULL,
-                       &CalleeId, &CalleeData, &g, dwCallbackData); 
+                       &CalleeId, &CalleeData, &g, dwCallbackData);
 
        switch (ret)
        {
diff --git a/dlls/winspool/info.c b/dlls/winspool/info.c
index f402b2c..320b81e 100644
--- a/dlls/winspool/info.c
+++ b/dlls/winspool/info.c
@@ -1,6 +1,6 @@
-/* 
+/*
  * WINSPOOL functions
- * 
+ *
  * Copyright 1996 John Harvey
  * Copyright 1998 Andreas Mohr
  * Copyright 1999 Klaas van Gend
@@ -76,7 +76,7 @@
 static WCHAR LocationW[] = {'L','o','c','a','t','i','o','n',0};
 static WCHAR MonitorW[] = {'M','o','n','i','t','o','r',0};
 static WCHAR NameW[] = {'N','a','m','e',0};
-static WCHAR ParametersW[] = {'P','a','r','a','m','e','t','e','r','s',0}; 
+static WCHAR ParametersW[] = {'P','a','r','a','m','e','t','e','r','s',0};
 static WCHAR PortW[] = {'P','o','r','t',0};
 static WCHAR Print_ProcessorW[] = {'P','r','i','n','t',' ','P','r','o','c','e',
 				   's','s','o','r',0};
@@ -94,7 +94,7 @@
 				      DWORD Level, LPBYTE pDriverInfo,
 				      DWORD cbBuf, LPDWORD pcbNeeded,
 				      BOOL unicode);
-static void 
+static void
 WINSPOOL_SetDefaultPrinter(const char *devname, const char *name,BOOL force) {
     char qbuf[200];
 
@@ -195,15 +195,15 @@
 	isps = TRUE;
     }
     /* 2. Check if this is a remote printer. These usually are postscript
-     *    capable 
+     *    capable
      */
     if (strstr(pent,":rm")) {
 	isps = TRUE;
 	TRACE("%s is remote, assuming postscript.\n",name);
     }
-    /* 3. Check if we have an input filter program. If we have one, it 
+    /* 3. Check if we have an input filter program. If we have one, it
      *    most likely is one capable of converting postscript.
-     *    (Could probably check for occurrence of 'gs' or 'ghostscript' 
+     *    (Could probably check for occurrence of 'gs' or 'ghostscript'
      *     in the if file itself.)
      */
     if (strstr(pent,":if=/")) {
@@ -332,7 +332,7 @@
 #endif
 
     /* Check for [ppd] section in config file before parsing /etc/printcap */
-    
+
     if (RegOpenKeyA(HKEY_LOCAL_MACHINE, "Software\\Wine\\Wine\\Config\\ppd",
     	    &hkPPD) == ERROR_SUCCESS)
     {
@@ -704,7 +704,7 @@
     if(fMode == 0 && ret > 0)
         ret += (CCHDEVICENAME + CCHFORMNAME);
     HeapFree(GetProcessHeap(),0,pDevModeInputA);
-    HeapFree(GetProcessHeap(),0,pDeviceNameA);    
+    HeapFree(GetProcessHeap(),0,pDeviceNameA);
     return ret;
 }
 
@@ -857,7 +857,7 @@
  *    WritePrinter  [WINSPOOL.@]
  */
 BOOL WINAPI
-WritePrinter( 
+WritePrinter(
   HANDLE  hPrinter,
   LPVOID  pBuf,
   DWORD   cbBuf,
@@ -916,7 +916,7 @@
  *
  * RETURNS:
  *    the opened hkey on success
- *    NULL on error 
+ *    NULL on error
  */
 static HKEY WINSPOOL_OpenDriverReg( LPVOID pEnvironment, BOOL unicode)
 {   HKEY  retval;
@@ -943,7 +943,7 @@
              case VER_PLATFORM_WIN32_NT:
                   p = "Windows NT x86";
                   break;
-             default: 
+             default:
                   p = "Windows 4.0";
                   break;
         }
@@ -980,7 +980,7 @@
     LONG size;
 
     TRACE("(%s,%ld,%p)\n", debugstr_w(pName), Level, pPrinter);
-    
+
     if(pName != NULL) {
         ERR("pName = %s - unsupported\n", debugstr_w(pName));
 	SetLastError(ERROR_INVALID_PARAMETER);
@@ -1022,7 +1022,7 @@
 	RegCloseKey(hkeyPrinters);
 	return 0;
     }
-    if(RegOpenKeyW(hkeyDrivers, pi->pDriverName, &hkeyDriver) != 
+    if(RegOpenKeyW(hkeyDrivers, pi->pDriverName, &hkeyDriver) !=
        ERROR_SUCCESS) {
         WARN("Can't find driver %s\n", debugstr_w(pi->pDriverName));
 	RegCloseKey(hkeyPrinters);
@@ -1195,7 +1195,7 @@
         SetLastError(ERROR_PRINTER_NOT_FOUND); /* ?? */
 	RegCloseKey(hkeyPrinters);
 	return 0;
-    }    
+    }
 
     ClosePrinter(hPrinter);
     return TRUE;
@@ -1240,7 +1240,7 @@
                  LPBYTE pForm, DWORD cbBuf, LPDWORD pcbNeeded)
 {
     FIXME("(%d,%s,%ld,%p,%ld,%p): stub\n",hPrinter,pFormName,
-         Level,pForm,cbBuf,pcbNeeded); 
+         Level,pForm,cbBuf,pcbNeeded);
     return FALSE;
 }
 
@@ -1307,7 +1307,7 @@
  *    WINSPOOL_GetDWORDFromReg
  *
  * Return DWORD associated with ValueName from hkey.
- */ 
+ */
 static DWORD WINSPOOL_GetDWORDFromReg(HKEY hkey, LPCSTR ValueName)
 {
     DWORD sz = sizeof(DWORD), type, value = 0;
@@ -1332,7 +1332,7 @@
  * Get ValueName from hkey storing result in ptr.  buflen is space left in ptr
  * String is stored either as unicode or ascii.
  * Bit of a hack here to get the ValueName if we want ascii.
- */ 
+ */
 static BOOL WINSPOOL_GetStringFromReg(HKEY hkey, LPCWSTR ValueName, LPBYTE ptr,
 				      DWORD buflen, DWORD *needed,
 				      BOOL unicode)
@@ -1437,7 +1437,7 @@
  *
  * Get ValueName from hkey storing result in ptr.  buflen is space left in ptr
  * DevMode is stored either as unicode or ascii.
- */ 
+ */
 static BOOL WINSPOOL_GetDevModeFromReg(HKEY hkey, LPCWSTR ValueName,
 				       LPBYTE ptr,
 				       DWORD buflen, DWORD *needed,
@@ -1609,7 +1609,7 @@
 	*pcbNeeded += size;
     }
     if(pi2) {
-        pi2->Attributes = WINSPOOL_GetDWORDFromReg(hkeyPrinter, "Attributes"); 
+        pi2->Attributes = WINSPOOL_GetDWORDFromReg(hkeyPrinter, "Attributes");
         pi2->Priority = WINSPOOL_GetDWORDFromReg(hkeyPrinter, "Priority");
         pi2->DefaultPriority = WINSPOOL_GetDWORDFromReg(hkeyPrinter,
 							"Default Priority");
@@ -1649,7 +1649,7 @@
 	*pcbNeeded += size;
     }
     if(pi4) {
-        pi4->Attributes = WINSPOOL_GetDWORDFromReg(hkeyPrinter, "Attributes"); 
+        pi4->Attributes = WINSPOOL_GetDWORDFromReg(hkeyPrinter, "Attributes");
     }
 
     if(!space && pi4) /* zero out pi4 if we can't completely fill buf */
@@ -1694,11 +1694,11 @@
 	*pcbNeeded += size;
     }
     if(pi5) {
-        pi5->Attributes = WINSPOOL_GetDWORDFromReg(hkeyPrinter, "Attributes"); 
+        pi5->Attributes = WINSPOOL_GetDWORDFromReg(hkeyPrinter, "Attributes");
         pi5->DeviceNotSelectedTimeout = WINSPOOL_GetDWORDFromReg(hkeyPrinter,
-								"dnsTimeout"); 
+								"dnsTimeout");
         pi5->TransmissionRetryTimeout = WINSPOOL_GetDWORDFromReg(hkeyPrinter,
-								 "txTimeout"); 
+								 "txTimeout");
     }
 
     if(!space && pi5) /* zero out pi5 if we can't completely fill buf */
@@ -1759,11 +1759,11 @@
 	needed += size;
 	break;
       }
-      
+
     case 4:
       {
 	PRINTER_INFO_4W *pi4 = (PRINTER_INFO_4W *)pPrinter;
-	
+
         size = sizeof(PRINTER_INFO_4W);
 	if(size <= cbBuf) {
 	    ptr = pPrinter + size;
@@ -1877,7 +1877,7 @@
         ERR("Can't create Printers key\n");
 	return FALSE;
     }
-  
+
     if(RegQueryInfoKeyA(hkeyPrinters, NULL, NULL, NULL, &number, NULL, NULL,
 			NULL, NULL, NULL, NULL, NULL) != ERROR_SUCCESS) {
         RegCloseKey(hkeyPrinters);
@@ -1911,7 +1911,7 @@
     pi = (used <= cbBuf) ? lpbPrinters : NULL;
 
     for(i = 0; i < number; i++) {
-        if(RegEnumKeyW(hkeyPrinters, i, PrinterName, sizeof(PrinterName)) != 
+        if(RegEnumKeyW(hkeyPrinters, i, PrinterName, sizeof(PrinterName)) !=
 	   ERROR_SUCCESS) {
 	    ERR("Can't enum key number %ld\n", i);
 	    RegCloseKey(hkeyPrinters);
@@ -1972,7 +1972,7 @@
 	return FALSE;
     }
     if(lpdwReturned)
-        *lpdwReturned = number;  
+        *lpdwReturned = number;
     SetLastError(ERROR_SUCCESS);
     return TRUE;
 }
@@ -1987,31 +1987,31 @@
  * RETURNS:
  *
  *    If level is set to 1:
- *      Not implemented yet! 
+ *      Not implemented yet!
  *      Returns TRUE with an empty list.
  *
  *    If level is set to 2:
  *		Possible flags: PRINTER_ENUM_CONNECTIONS, PRINTER_ENUM_LOCAL.
- *      Returns an array of PRINTER_INFO_2 data structures in the 
- *      lpbPrinters buffer. Note that according to MSDN also an 
+ *      Returns an array of PRINTER_INFO_2 data structures in the
+ *      lpbPrinters buffer. Note that according to MSDN also an
  *      OpenPrinter should be performed on every remote printer.
  *
  *    If level is set to 4 (officially WinNT only):
  *		Possible flags: PRINTER_ENUM_CONNECTIONS, PRINTER_ENUM_LOCAL.
  *      Fast: Only the registry is queried to retrieve printer names,
  *      no connection to the driver is made.
- *      Returns an array of PRINTER_INFO_4 data structures in the 
+ *      Returns an array of PRINTER_INFO_4 data structures in the
  *      lpbPrinters buffer.
  *
  *    If level is set to 5 (officially WinNT4/Win9x only):
  *      Fast: Only the registry is queried to retrieve printer names,
  *      no connection to the driver is made.
- *      Returns an array of PRINTER_INFO_5 data structures in the 
+ *      Returns an array of PRINTER_INFO_5 data structures in the
  *      lpbPrinters buffer.
  *
  *    If level set to 3 or 6+:
  *	    returns zero (failure!)
- *      
+ *
  *    Returns nonzero (TRUE) on success, or zero on failure, use GetLastError
  *    for information.
  *
@@ -2019,8 +2019,8 @@
  *    - Only PRINTER_ENUM_LOCAL and PRINTER_ENUM_NAME are implemented.
  *    - Only levels 2, 4 and 5 are implemented at the moment.
  *    - 16-bit printer drivers are not enumerated.
- *    - Returned amount of bytes used/needed does not match the real Windoze 
- *      implementation (as in this implementation, all strings are part 
+ *    - Returned amount of bytes used/needed does not match the real Windoze
+ *      implementation (as in this implementation, all strings are part
  *      of the buffer, whereas Win32 keeps them somewhere else)
  *    - At level 2, EnumPrinters should also call OpenPrinter for remote printers.
  *
@@ -2241,7 +2241,7 @@
     DWORD ret, type, size, needed = 0;
     LPBYTE ptr = NULL;
     HKEY hkeyPrinter, hkeyPrinters, hkeyDrivers;
-    
+
     TRACE("(%d,%s,%ld,%p,%ld,%p)\n",hPrinter,debugstr_w(pEnvironment),
 	  Level,pDriverInfo,cbBuf, pcbNeeded);
 
@@ -2336,7 +2336,7 @@
  *          GetPrinterDriverW  [WINSPOOL.@]
  */
 BOOL WINAPI GetPrinterDriverW(HANDLE hPrinter, LPWSTR pEnvironment,
-                                  DWORD Level, LPBYTE pDriverInfo, 
+                                  DWORD Level, LPBYTE pDriverInfo,
                                   DWORD cbBuf, LPDWORD pcbNeeded)
 {
     return WINSPOOL_GetPrinterDriver(hPrinter, pEnvironment, Level,
@@ -2366,7 +2366,7 @@
     }
     if(Level != 1)  /* win95 ignores this so we just carry on */
         WARN("Level = %ld - assuming 1\n", Level);
-    
+
     /* FIXME should read from registry */
     needed = GetSystemDirectoryA(pDriverDirectory, cbBuf);
     needed++;
@@ -2428,7 +2428,7 @@
 	SetLastError(ERROR_INVALID_PARAMETER);
 	return FALSE;
     }
-    
+
     if(level == 3)
         di3 = *(DRIVER_INFO_3A *)pDriverInfo;
     else {
@@ -2471,7 +2471,7 @@
 		   0);
     RegSetValueExA(hkeyName, "Data File", 0, REG_SZ, di3.pDataFile, 0);
     RegSetValueExA(hkeyName, "Driver", 0, REG_SZ, di3.pDriverPath, 0);
-    RegSetValueExA(hkeyName, "Version", 0, REG_DWORD, (LPSTR)&di3.cVersion, 
+    RegSetValueExA(hkeyName, "Version", 0, REG_DWORD, (LPSTR)&di3.cVersion,
 		   sizeof(DWORD));
     RegSetValueExA(hkeyName, "Datatype", 0, REG_SZ, di3.pDefaultDataType, 0);
     RegSetValueExA(hkeyName, "Dependent Files", 0, REG_MULTI_SZ,
@@ -2486,7 +2486,7 @@
 /*****************************************************************************
  *          AddPrinterDriverW  [WINSPOOL.@]
  */
-BOOL WINAPI AddPrinterDriverW(LPWSTR printerName,DWORD level, 
+BOOL WINAPI AddPrinterDriverW(LPWSTR printerName,DWORD level,
 				   LPBYTE pDriverInfo)
 {
     FIXME("(%s,%ld,%p): stub\n",debugstr_w(printerName),
@@ -2500,7 +2500,7 @@
  *
  *     Displays a dialog to set the properties of the printer.
  *
- * RETURNS 
+ * RETURNS
  *     nonzero on success or zero on failure
  *
  * BUGS
@@ -2546,7 +2546,7 @@
 /*****************************************************************************
  *          WINSPOOL_EnumPrinterDrivers [internal]
  *
- *    Delivers information about all printer drivers installed on the 
+ *    Delivers information about all printer drivers installed on the
  *    localhost or a given server
  *
  * RETURNS
@@ -3229,7 +3229,7 @@
 	ret = GetLastError ();
 	ERR ("HeapFree failed with code %li\n", ret);
 	return ret;
-    }	
+    }
 
     if (*pnEnumValues == 0)	/* empty key */
 	return ERROR_SUCCESS;
diff --git a/dlls/wsock32/protocol.c b/dlls/wsock32/protocol.c
index 88f7ce3..c0749e3 100644
--- a/dlls/wsock32/protocol.c
+++ b/dlls/wsock32/protocol.c
@@ -18,7 +18,7 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
-/* All we need are a couple constants for EnumProtocols. Once it is 
+/* All we need are a couple constants for EnumProtocols. Once it is
  * moved to ws2_32 we may no longer need it
  */
 #define USE_WS_PREFIX
@@ -196,7 +196,7 @@
   return iAnz;
 }
 
-/* FIXME: EnumProtocols should be moved to winsock2, and this should be 
+/* FIXME: EnumProtocols should be moved to winsock2, and this should be
  * implemented by calling out to WSAEnumProtocols. See:
  * http://support.microsoft.com/support/kb/articles/Q129/3/15.asp
  */
diff --git a/dlls/wsock32/socket.c b/dlls/wsock32/socket.c
index 79ffb52..53efd45 100644
--- a/dlls/wsock32/socket.c
+++ b/dlls/wsock32/socket.c
@@ -20,17 +20,17 @@
 
 
 /* FIXME: This hack is fixing a problem in WsControl.  When we call socket(),
- * it will call into ws2_32's WSOCK32_socket (because of the redirection in 
+ * it will call into ws2_32's WSOCK32_socket (because of the redirection in
  * our own .spec file).
- * The problem is that socket() is predefined in a linux system header that 
+ * The problem is that socket() is predefined in a linux system header that
  * we are including, which is different from the WINE definition.
  * (cdecl vs. stdapi).  The result is stack corruption.
- * Furthermore WsControl uses Unix macros and types. This forces us to include 
+ * Furthermore WsControl uses Unix macros and types. This forces us to include
  * the Unix headers which then conflict with the winsock headers. This forces
- * us to use USE_WS_PREFIX but then ioctlsocket is called WS_ioctlsocket, 
- * which causes link problems. The correct solution is to implement 
- * WsControl using calls to WSAIoctl. Then we should no longer need to use the 
- * Unix headers. This would also have the advantage of reducing code 
+ * us to use USE_WS_PREFIX but then ioctlsocket is called WS_ioctlsocket,
+ * which causes link problems. The correct solution is to implement
+ * WsControl using calls to WSAIoctl. Then we should no longer need to use the
+ * Unix headers. This would also have the advantage of reducing code
  * duplication.
  * Until that happens we need this ugly hack.
  */
@@ -90,14 +90,14 @@
 /***********************************************************************
  *		WsControl (WSOCK32.1001)
  *
- * WsControl seems to be an undocumented Win95 function. A lot of 
+ * WsControl seems to be an undocumented Win95 function. A lot of
  * discussion about WsControl can be found on the net, e.g.
  * Subject:      Re: WSOCK32.DLL WsControl Exported Function
  * From:         "Peter Rindfuss" <rindfuss-s@medea.wz-berlin.de>
  * Date:         1997/08/17
  *
  * WSCNTL_TCPIP_QUERY_INFO option is partially implemeted based
- * on observing the behaviour of WsControl with an app in 
+ * on observing the behaviour of WsControl with an app in
  * Windows 98.  It is not fully implemented, and there could
  * be (are?) errors due to incorrect assumptions made.
  *
@@ -106,7 +106,7 @@
  * STATUS_BUFFER_TOO_SMALL is returned if the output buffer length
  * (*pcbResponseInfoLen) is too small, otherwise errors return -1.
  *
- * It doesn't seem to generate errors that can be retrieved by 
+ * It doesn't seem to generate errors that can be retrieved by
  * WSAGetLastError().
  *
  */
@@ -116,93 +116,93 @@
                        LPVOID pRequestInfo,
                        LPDWORD pcbRequestInfoLen,
                        LPVOID pResponseInfo,
-                       LPDWORD pcbResponseInfoLen) 
+                       LPDWORD pcbResponseInfoLen)
 {
    /* Get the command structure into a pointer we can use,
       rather than void */
    TDIObjectID *pcommand = (TDIObjectID *)pRequestInfo;
-  
+
    TRACE ("   WsControl TOI_ID=>0x%lx<, {TEI_ENTITY=0x%lx, TEI_INSTANCE=0x%lx}, TOI_CLASS=0x%lx, TOI_TYPE=0x%lx\n",
           pcommand->toi_id, pcommand->toi_entity.tei_entity, pcommand->toi_entity.tei_instance,
           pcommand->toi_class, pcommand->toi_type );
-  
 
 
-   switch (action) 
+
+   switch (action)
    {
-      case WSCNTL_TCPIP_QUERY_INFO: 
+      case WSCNTL_TCPIP_QUERY_INFO:
       {
          switch (pcommand->toi_id)
          {
-            /* 
+            /*
                ENTITY_LIST_ID seems to get number of adapters in the system.
                (almost like an index to be used when calling other WsControl options)
             */
-            case ENTITY_LIST_ID: 
+            case ENTITY_LIST_ID:
             {
                TDIEntityID *baseptr = pResponseInfo;
                int numInt = 0, i;
 
                if (pcommand->toi_class != INFO_CLASS_GENERIC &&
-                   pcommand->toi_type != INFO_TYPE_PROVIDER) 
-               { 
+                   pcommand->toi_type != INFO_TYPE_PROVIDER)
+               {
                   FIXME ("Unexpected Option for ENTITY_LIST_ID request -> toi_class=0x%lx, toi_type=0x%lx\n",
                        pcommand->toi_class, pcommand->toi_type);
-                  return (WSAEOPNOTSUPP); 
+                  return (WSAEOPNOTSUPP);
                }
-           
-               numInt = WSCNTL_GetEntryCount(WSCNTL_COUNT_INTERFACES); 
+
+               numInt = WSCNTL_GetEntryCount(WSCNTL_COUNT_INTERFACES);
                if (numInt < 0)
                {
                   ERR ("Unable to open /proc filesystem to determine number of network interfaces!\n");
-                  return (-1); 
+                  return (-1);
                }
 
-               if (*pcbResponseInfoLen < sizeof(TDIEntityID)*(numInt*2) ) 
+               if (*pcbResponseInfoLen < sizeof(TDIEntityID)*(numInt*2) )
                {
                   return (STATUS_BUFFER_TOO_SMALL);
                }
-           
+
                /* 0 it out first */
-               memset(baseptr, 0, sizeof(TDIEntityID)*(numInt*2)); 
-               
+               memset(baseptr, 0, sizeof(TDIEntityID)*(numInt*2));
+
                for (i=0; i<numInt; i++)
                {
                   /* tei_instance is an network interface identifier.
-                     I'm not quite sure what the difference is between tei_entity values of 
+                     I'm not quite sure what the difference is between tei_entity values of
                      CL_NL_ENTITY and IF_ENTITY */
                   baseptr->tei_entity = CL_NL_ENTITY;  baseptr->tei_instance = i; baseptr++;
-                  baseptr->tei_entity = IF_ENTITY;     baseptr->tei_instance = i; baseptr++; 
+                  baseptr->tei_entity = IF_ENTITY;     baseptr->tei_instance = i; baseptr++;
                }
 
                /* Calculate size of out buffer */
                *pcbResponseInfoLen = sizeof(TDIEntityID)*(numInt*2);
-            
+
                break;
             }
-          
-          
-            /* ENTITY_TYPE_ID is used to obtain simple information about a 
+
+
+            /* ENTITY_TYPE_ID is used to obtain simple information about a
                network card, such as MAC Address, description, interface type,
                number of network addresses, etc. */
             case ENTITY_TYPE_ID:  /* ALSO: IP_MIB_STATS_ID */
             {
-               if (pcommand->toi_class == INFO_CLASS_GENERIC && pcommand->toi_type == INFO_TYPE_PROVIDER) 
+               if (pcommand->toi_class == INFO_CLASS_GENERIC && pcommand->toi_type == INFO_TYPE_PROVIDER)
                {
                   if (pcommand->toi_entity.tei_entity == IF_ENTITY)
                   {
-                     * ((ULONG *)pResponseInfo) = IF_MIB; 
+                     * ((ULONG *)pResponseInfo) = IF_MIB;
 
                      /* Calculate size of out buffer */
                      *pcbResponseInfoLen = sizeof (ULONG);
 
                   }
-                  else if (pcommand->toi_entity.tei_entity == CL_NL_ENTITY) 
+                  else if (pcommand->toi_entity.tei_entity == CL_NL_ENTITY)
                   {
-                     * ((ULONG *)pResponseInfo) = CL_NL_IP;  
+                     * ((ULONG *)pResponseInfo) = CL_NL_IP;
 
                      /* Calculate size of out buffer */
-                     *pcbResponseInfoLen = sizeof (ULONG); 
+                     *pcbResponseInfoLen = sizeof (ULONG);
                   }
                }
                else if (pcommand->toi_class == INFO_CLASS_PROTOCOL &&
@@ -210,10 +210,10 @@
                {
                   if (pcommand->toi_entity.tei_entity == IF_ENTITY)
                   {
-                     /* In this case, we are requesting specific information about a 
+                     /* In this case, we are requesting specific information about a
                         a particular network adapter. (MAC Address, speed, data transmitted/received,
                         etc.)
-                     */ 
+                     */
                      IFEntry *IntInfo = (IFEntry *) pResponseInfo;
                      char ifName[512];
 #if defined(SIOCGIFHWADDR) || defined(SIOCGENADDR)
@@ -280,7 +280,7 @@
                      IntInfo->if_descrlen= strlen (IntInfo->if_descr);
 
                      /* Obtain bytes transmitted/received for interface */
-                     if ( (WSCNTL_GetTransRecvStat(pcommand->toi_entity.tei_instance, 
+                     if ( (WSCNTL_GetTransRecvStat(pcommand->toi_entity.tei_instance,
                            &IntInfo->if_inoctets, &IntInfo->if_outoctets)) < 0)
                      {
                         ERR ("Error obtaining transmit/receive stats for the network interface!\n");
@@ -295,16 +295,16 @@
                      /************************************************************************/
 
                      closesocket(sock);
-                     *pcbResponseInfoLen = sizeof (IFEntry) + IntInfo->if_descrlen; 
+                     *pcbResponseInfoLen = sizeof (IFEntry) + IntInfo->if_descrlen;
                   }
-                  else if (pcommand->toi_entity.tei_entity == CL_NL_ENTITY) 
+                  else if (pcommand->toi_entity.tei_entity == CL_NL_ENTITY)
                   {
                      IPSNMPInfo *infoStruc = (IPSNMPInfo *) pResponseInfo;
                      int numInt, numRoutes;
-                     
-                     /* This case is used to obtain general statistics about the 
+
+                     /* This case is used to obtain general statistics about the
                         network */
-                     
+
                      if (*pcbResponseInfoLen < sizeof(IPSNMPInfo) )
                      {
                         return (STATUS_BUFFER_TOO_SMALL);
@@ -313,20 +313,20 @@
                      {
                         /* 0 it out first */
                         memset(infoStruc, 0, sizeof(IPSNMPInfo));
-            
+
                         /* Get the number of interfaces */
-                        numInt = WSCNTL_GetEntryCount(WSCNTL_COUNT_INTERFACES); 
+                        numInt = WSCNTL_GetEntryCount(WSCNTL_COUNT_INTERFACES);
                         if (numInt < 0)
                         {
                            ERR ("Unable to open /proc filesystem to determine number of network interfaces!\n");
-                           return (-1); 
+                           return (-1);
                         }
                         /* Get the number of routes */
-                        numRoutes = WSCNTL_GetEntryCount(WSCNTL_COUNT_ROUTES); 
+                        numRoutes = WSCNTL_GetEntryCount(WSCNTL_COUNT_ROUTES);
                         if (numRoutes < 0)
                         {
                            ERR ("Unable to open /proc filesystem to determine number of network routes!\n");
-                           return (-1); 
+                           return (-1);
                         }
 
                         infoStruc->ipsi_numif           = numInt; /* # of interfaces */
@@ -355,7 +355,7 @@
                         infoStruc->ipsi_fragfails       = 0x0;
                         infoStruc->ipsi_fragcreates     = 0x0;
                         /************************************************************************/
-                      
+
                         /* Calculate size of out buffer */
                         *pcbResponseInfoLen = sizeof(IPSNMPInfo);
                      }
@@ -365,17 +365,17 @@
                {
                   FIXME ("Unexpected Option for ENTITY_TYPE_ID request -> toi_class=0x%lx, toi_type=0x%lx\n",
                        pcommand->toi_class, pcommand->toi_type);
-                  
-                  return (WSAEOPNOTSUPP); 
+
+                  return (WSAEOPNOTSUPP);
                }
 
                break;
             }
 
 
-            /* IP_MIB_ADDRTABLE_ENTRY_ID is used to obtain more detailed information about a 
+            /* IP_MIB_ADDRTABLE_ENTRY_ID is used to obtain more detailed information about a
                particular network adapter */
-            case IP_MIB_ADDRTABLE_ENTRY_ID: 
+            case IP_MIB_ADDRTABLE_ENTRY_ID:
             {
                IPAddrEntry *baseIPInfo = (IPAddrEntry *) pResponseInfo;
                char ifName[IFNAMSIZ+1];
@@ -384,29 +384,29 @@
 
                if (*pcbResponseInfoLen < sizeof(IPAddrEntry))
                {
-                  return (STATUS_BUFFER_TOO_SMALL); 
+                  return (STATUS_BUFFER_TOO_SMALL);
                }
-               
+
                if (!WSCNTL_GetInterfaceName(pcommand->toi_entity.tei_instance, ifName))
                {
                   ERR ("Unable to parse /proc filesystem!\n");
                   return (-1);
                }
-               
-               
+
+
                /* Get a socket so we can use ioctl */
                if ( (sock = socket(AF_INET, SOCK_DGRAM, 0)) == INVALID_SOCKET)
                {
                   ERR ("Error creating socket!\n");
                   return (-1);
                }
-	       
+
                /* 0 it out first */
                memset(baseIPInfo, 0, sizeof(IPAddrEntry) );
-               
+
                /* Interface Id */
                baseIPInfo->iae_index     = pcommand->toi_entity.tei_instance;
-               
+
                /* IP Address */
                strcpy (ifInfo.ifr_name, ifName);
 	       ifInfo.ifr_addr.sa_family = AF_INET;
@@ -419,7 +419,7 @@
                   struct WS_sockaddr_in* ipTemp = (struct WS_sockaddr_in*)&ifInfo.ifr_addr;
                   baseIPInfo->iae_addr = ipTemp->sin_addr.S_un.S_addr;
                }
-               
+
                /* Broadcast Address */
                strcpy (ifInfo.ifr_name, ifName);
 	       if (ioctlsocket(sock, SIOCGIFBRDADDR, (ULONG *)&ifInfo) < 0)
@@ -461,7 +461,7 @@
                baseIPInfo->iae_context   = 0x0;
                baseIPInfo->iae_pad       = 0x0;
                /************************************************************************/
-             
+
                /* Calculate size of out buffer */
                *pcbResponseInfoLen = sizeof(IPAddrEntry);
                closesocket(sock);
@@ -482,22 +482,22 @@
 	    {
 		int numRoutes, foundRoutes;
 		wscntl_routeentry *routeTable, *routePtr;	/* route table */
-	        
+
                 IPRouteEntry *winRouteTable  = (IPRouteEntry *) pResponseInfo;
 
 		/* Get the number of routes */
-		numRoutes = WSCNTL_GetEntryCount(WSCNTL_COUNT_ROUTES); 
+		numRoutes = WSCNTL_GetEntryCount(WSCNTL_COUNT_ROUTES);
 		if (numRoutes < 0)
 		{
 		    ERR ("Unable to open /proc filesystem to determine number of network routes!\n");
-		    return (-1); 
+		    return (-1);
 		}
 
 		if (*pcbResponseInfoLen < (sizeof(IPRouteEntry) * numRoutes))
 		{
-		    return (STATUS_BUFFER_TOO_SMALL); 
+		    return (STATUS_BUFFER_TOO_SMALL);
 		}
-		
+
 		/* malloc space for the routeTable */
 		routeTable = (wscntl_routeentry *) malloc(sizeof(wscntl_routeentry) * numRoutes);
 		if (!routeTable)
@@ -514,13 +514,13 @@
 		    return -1;
 		}
 		routePtr = routeTable;
-		    
+
                 /* first 0 out the output buffer */
                 memset(winRouteTable, 0, *pcbResponseInfoLen);
-               
+
 		/* calculate the length of the data in the output buffer */
                 *pcbResponseInfoLen = sizeof(IPRouteEntry) * foundRoutes;
-		
+
 		for ( ; foundRoutes > 0; foundRoutes--)
 		{
 		    winRouteTable->ire_addr = routePtr->wre_dest;
@@ -539,25 +539,25 @@
 		    winRouteTable++;
 		    routePtr++;
 		}
-						    
+
 		free(routeTable);
                 break;
 	    }
-	    
 
-            default: 
+
+            default:
             {
                FIXME ("Command ID Not Supported -> toi_id=0x%lx, toi_entity={tei_entity=0x%lx, tei_instance=0x%lx}, toi_class=0x%lx, toi_type=0x%lx\n",
-                       pcommand->toi_id, pcommand->toi_entity.tei_entity, pcommand->toi_entity.tei_instance, 
+                       pcommand->toi_id, pcommand->toi_entity.tei_entity, pcommand->toi_entity.tei_instance,
                        pcommand->toi_class, pcommand->toi_type);
-              
-               return (WSAEOPNOTSUPP); 
+
+               return (WSAEOPNOTSUPP);
             }
          }
-      
+
          break;
       }
-    
+
       case WSCNTL_TCPIP_ICMP_ECHO:
       {
          unsigned int addr = *(unsigned int*)pRequestInfo;
@@ -569,8 +569,8 @@
             char ttl = *(unsigned char*)(inbuf+13);
             char service = *(unsigned char*)(inbuf+14);
             char type= *(unsigned char*)(inbuf+15); /* 0x2: don't fragment*/
-         #endif      
-      
+         #endif
+
          FIXME("(ICMP_ECHO) to 0x%08x stub \n", addr);
          break;
       }
@@ -579,18 +579,18 @@
       {
          FIXME("Protocoll Not Supported -> protocoll=0x%lx, action=0x%lx, Request=%p, RequestLen=%p, Response=%p, ResponseLen=%p\n",
 	       protocoll, action, pRequestInfo, pcbRequestInfoLen, pResponseInfo, pcbResponseInfoLen);
-      
-         return (WSAEOPNOTSUPP); 
+
+         return (WSAEOPNOTSUPP);
       }
    }
-   
-   
-   return (WSCTL_SUCCESS); 
+
+
+   return (WSCTL_SUCCESS);
 }
 
 
 
-/* 
+/*
   Helper function for WsControl - Get count of the number of interfaces
   or routes by parsing /proc filesystem.
 */
@@ -602,8 +602,8 @@
    char	*ptr;
    int  count;
    int	chrread;
- 
- 
+
+
    switch (entrytype)
    {
        case WSCNTL_COUNT_INTERFACES:
@@ -633,12 +633,12 @@
    }
 
    /* read the file and count the EOL's */
-   while ((chrread = read(fd, buf, sizeof(buf))) != 0) 
+   while ((chrread = read(fd, buf, sizeof(buf))) != 0)
    {
        ptr = buf;
-       if (chrread < 0) 
+       if (chrread < 0)
        {
-	   if (errno == EINTR) 
+	   if (errno == EINTR)
 	   {
 	       continue;	/* read interupted by a signal, try to read again */
 	   }
@@ -670,16 +670,16 @@
    char buf[512]; /* Size doesn't matter, something big */
    int  i;
 
-   /* Open /proc filesystem file for network devices */ 
+   /* Open /proc filesystem file for network devices */
    procfs = fopen(PROCFS_NETDEV_FILE, "r");
-   if (!procfs) 
+   if (!procfs)
    {
       /* If we can't open the file, return an error */
       return (-1);
    }
-   
+
    /* Omit first two lines, they are only headers */
-   fgets(buf, sizeof(buf), procfs);	
+   fgets(buf, sizeof(buf), procfs);
    fgets(buf, sizeof(buf), procfs);
 
    for (i=0; i<intNumber; i++)
@@ -689,55 +689,55 @@
    }
    fgets(buf, sizeof(buf), procfs); /* This is the line we want */
 
-   
+
    /* Parse out the line, grabbing only the name of the device
-      to the intName variable 
-      
+      to the intName variable
+
       The Line comes in like this: (we only care about the device name)
       lo:   21970 377 0 0 0 0 0 0 21970 377 0 0 0 0 0 0
    */
-   i=0; 
+   i=0;
    while (isspace(buf[i])) /* Skip initial space(s) */
    {
       i++;
    }
 
-   while (buf[i]) 
+   while (buf[i])
    {
       if (isspace(buf[i]))
       {
          break;
       }
-      
+
       if (buf[i] == ':')  /* FIXME: Not sure if this block (alias detection) works properly */
       {
          /* This interface could be an alias... */
          int hold = i;
          char *dotname = intName;
          *intName++ = buf[i++];
-         
+
          while (isdigit(buf[i]))
          {
             *intName++ = buf[i++];
          }
-         
-         if (buf[i] != ':') 
+
+         if (buf[i] != ':')
          {
             /* ... It wasn't, so back up */
             i = hold;
             intName = dotname;
          }
- 
+
          if (buf[i] == '\0')
          {
             fclose(procfs);
             return(FALSE);
          }
-         
+
          i++;
          break;
       }
-      
+
       *intName++ = buf[i++];
    }
    *intName++ = '\0';
@@ -749,7 +749,7 @@
 
 /*
    Helper function for WsControl - This function returns the bytes (octets) transmitted
-   and received for the supplied interface number from the /proc fs. 
+   and received for the supplied interface number from the /proc fs.
 */
 int WSCNTL_GetTransRecvStat(int intNumber, unsigned long *transBytes, unsigned long *recvBytes)
 {
@@ -757,16 +757,16 @@
    char buf[512], result[512]; /* Size doesn't matter, something big */
    int  i, bufPos, resultPos;
 
-   /* Open /proc filesystem file for network devices */ 
+   /* Open /proc filesystem file for network devices */
    procfs = fopen(PROCFS_NETDEV_FILE, "r");
-   if (!procfs) 
+   if (!procfs)
    {
       /* If we can't open the file, return an error */
       return (-1);
    }
-   
+
    /* Omit first two lines, they are only headers */
-   fgets(buf, sizeof(buf), procfs);	
+   fgets(buf, sizeof(buf), procfs);
    fgets(buf, sizeof(buf), procfs);
 
    for (i=0; i<intNumber; i++)
@@ -780,25 +780,25 @@
 
    /* Parse out the line, grabbing the number of bytes transmitted
       and received on the interface.
-      
+
       The Line comes in like this: (we care about columns 2 and 10)
       lo:   21970 377 0 0 0 0 0 0 21970 377 0 0 0 0 0 0
    */
 
    /* Start at character 0 in the buffer */
    bufPos=0;
-   
-   /* Skip initial space(s) */ 
-   while (isspace(buf[bufPos])) 
+
+   /* Skip initial space(s) */
+   while (isspace(buf[bufPos]))
       bufPos++;
 
 
    /* Skip the name and its trailing spaces (if any) */
-   while (buf[bufPos]) 
+   while (buf[bufPos])
    {
       if (isspace(buf[bufPos]))
          break;
- 
+
       if (buf[bufPos] == ':') /* Could be an alias */
       {
          int hold = bufPos;
@@ -812,7 +812,7 @@
             fclose(procfs);
             return(FALSE);
          }
-         
+
          bufPos++;
          break;
       }
@@ -833,13 +833,13 @@
    }
    *recvBytes = strtoul (result, NULL, 10); /* convert string to unsigned long, using base 10 */
 
-   
+
    /* Skip columns #3 to #9 (Don't need them) */
    for  (i=0; i<7; i++)
    {
       while (isspace(buf[bufPos]))
          bufPos++;
-      while (!isspace(buf[bufPos])) 
+      while (!isspace(buf[bufPos]))
          bufPos++;
    }
 
@@ -906,15 +906,15 @@
 	interface[intfNr].intfNameLen = strlen(interface[intfNr].intfName);
     }
 
-    /* Open /proc filesystem file for routes */ 
+    /* Open /proc filesystem file for routes */
     file = fopen(PROCFS_ROUTE_FILE, "r");
-    if (!file) 
+    if (!file)
     {
        	/* If we can't open the file, return an error */
 	free(interface);
 	return (-1);
     }
-    
+
     /* skip the header line */
     fgets(buf, sizeof(buf), file);
 
@@ -926,7 +926,7 @@
     while (fgets(buf, sizeof(buf), file)) {
 	intfNr = 0;
 	/* find the interface of the route */
-	while ((strncmp(buf, interface[intfNr].intfName, interface[intfNr].intfNameLen) != 0) 
+	while ((strncmp(buf, interface[intfNr].intfName, interface[intfNr].intfNameLen) != 0)
 		&& (intfNr < nrIntf))
 	{
 	    intfNr++;
diff --git a/dlls/wsock32/wscontrol.h b/dlls/wsock32/wscontrol.h
index 6db761b..1391fe3 100644
--- a/dlls/wsock32/wscontrol.h
+++ b/dlls/wsock32/wscontrol.h
@@ -30,8 +30,8 @@
 
 typedef unsigned char uchar; /* This doesn't seem to be in any standard headers */
 
-#define WSCTL_SUCCESS        0         
-#define PROCFS_NETDEV_FILE   "/proc/net/dev" /* Points to the file in the /proc fs 
+#define WSCTL_SUCCESS        0
+#define PROCFS_NETDEV_FILE   "/proc/net/dev" /* Points to the file in the /proc fs
                                                 that lists the network devices.
                                                 Do we need an #ifdef LINUX for this? */
 #define PROCFS_ROUTE_FILE    "/proc/net/route" /* Points to the file in the /proc fs
@@ -66,14 +66,14 @@
 
 
 /* Structure of an entity ID */
-typedef struct TDIEntityID 
+typedef struct TDIEntityID
 {
    unsigned long tei_entity;
    unsigned long tei_instance;
 } TDIEntityID;
 
 /* Structure of an object ID */
-typedef struct TDIObjectID 
+typedef struct TDIObjectID
 {
    TDIEntityID   toi_entity;
    unsigned long toi_class;
@@ -81,7 +81,7 @@
    unsigned long toi_id;
 } TDIObjectID;
 
-typedef struct IPSNMPInfo 
+typedef struct IPSNMPInfo
 {
    unsigned long  ipsi_forwarding;
    unsigned long  ipsi_defaultttl;
@@ -108,7 +108,7 @@
    unsigned long  ipsi_numroutes;
 } IPSNMPInfo;
 
-typedef struct IPAddrEntry 
+typedef struct IPAddrEntry
 {
    unsigned long  iae_addr;
    unsigned long  iae_index;
@@ -127,7 +127,7 @@
 
 #define	MAX_PHYSADDR_SIZE    8
 #define	MAX_IFDESCR_LEN      256
-typedef struct IFEntry 
+typedef struct IFEntry
 {
    unsigned long if_index;
    unsigned long if_type;
@@ -155,7 +155,7 @@
 } IFEntry;
 
 
-/* FIXME: real name and definition of this struct that contains 
+/* FIXME: real name and definition of this struct that contains
  * an IP route table entry is unknown */
 typedef struct IPRouteEntry {
    unsigned long ire_addr;
diff --git a/dlls/x11drv/clipboard.c b/dlls/x11drv/clipboard.c
index 4a276fb..dd0b954 100644
--- a/dlls/x11drv/clipboard.c
+++ b/dlls/x11drv/clipboard.c
@@ -151,7 +151,7 @@
 Atom X11DRV_CLIPBOARD_MapFormatToProperty(UINT wFormat)
 {
     Atom prop = None;
-    
+
     switch (wFormat)
     {
 	/* We support only CF_UNICODETEXT, other formats are synthesized */
@@ -177,7 +177,7 @@
             }
             /* Fall through to the default case in order to use the native format */
         }
-        
+
         default:
         {
             /*
@@ -200,7 +200,7 @@
     if (prop == None)
         TRACE("\tNo mapping to X property for Windows clipboard format %d(%s)\n",
               wFormat, CLIPBOARD_GetFormatName(wFormat));
-    
+
     return prop;
 }
 
@@ -213,10 +213,10 @@
 {
     char *itemFmtName = TSXGetAtomName(thread_display(), prop);
     BOOL bRet = FALSE;
-    
+
     if ( 0 == strncmp(itemFmtName, FMT_PREFIX, strlen(FMT_PREFIX)) )
         bRet = TRUE;
-    
+
     TSXFree(itemFmtName);
     return bRet;
 }
@@ -306,7 +306,7 @@
      * We must release the windows lock to enable Wine to process
      * selection messages in response to the servers requests.
      */
-    
+
     iWndsLocks = WIN_SuspendWndsLock();
 
     /* We must wait until the server finishes acquiring the selection,
@@ -350,7 +350,7 @@
     }
 
     WIN_RestoreWndsLock(iWndsLocks);
-    
+
     return TRUE;
 }
 
@@ -375,16 +375,16 @@
     Atom*	   targetList=NULL;
     Window         w;
     Window         ownerSelection = 0;
-        
+
     TRACE("enter\n");
     /*
-     * Empty the clipboard cache 
+     * Empty the clipboard cache
      */
     CLIPBOARD_EmptyCache(TRUE);
 
     cSelectionTargets = 0;
     selectionCacheSrc = SelectionName;
-    
+
     hWnd = (hWndClipWindow) ? hWndClipWindow : GetActiveWindow();
 
     ownerSelection = TSXGetSelectionOwner(display, SelectionName);
@@ -441,7 +441,7 @@
        {
           int i;
           LPWINE_CLIPFORMAT lpFormat;
-          
+
           /* Cache these formats in the clipboard cache */
 
           for (i = 0; i < cSelectionTargets; i++)
@@ -457,7 +457,7 @@
               if (wFormat)
               {
                   lpFormat = CLIPBOARD_LookupFormat( wFormat );
-                  
+
                   /* Don't replace if the property already cached is a native format,
                    * or if a PIXMAP is being replaced by a BITMAP.
                    */
@@ -477,7 +477,7 @@
                             i, itemFmtName, wFormat, lpFormat->Name);
                   }
               }
-              
+
               TSXFree(itemFmtName);
           }
        }
@@ -510,7 +510,7 @@
     BOOL              bRet = FALSE;
     HWND              hWndClipWindow = GetOpenClipboardWindow();
 
-    
+
     if(prop == None)
         return bRet;
 
@@ -535,17 +535,17 @@
        TSXFree(val);
        val = NULL;
     }
-    
+
     TRACE("\tretrieving %ld bytes...\n", itemSize * aformat/8);
     lRequestLength = (itemSize * aformat/8)/4  + 1;
 
-   bwc = aformat/8; 
-   /* we want to read the property, but not it too large of chunks or 
+   bwc = aformat/8;
+   /* we want to read the property, but not it too large of chunks or
       we could hang the cause problems. Lets go for 4k blocks */
 
     if(TSXGetWindowProperty(display,w,prop,0,4096,False,
                             AnyPropertyType/*reqType*/,
-                            &atype, &aformat, &nitems, &remain, &buffer) 
+                            &atype, &aformat, &nitems, &remain, &buffer)
         != Success)
     {
         WARN("\tcouldn't read property\n");
@@ -582,10 +582,10 @@
     {
       int 	   i,inlcount = 0;
       char*      lpstr;
- 
+
       for(i=0; i <= nitems; i++)
           if( val[i] == '\n' ) inlcount++;
- 
+
       if( (lpstr = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, nitems + inlcount + 1)) )
       {
 	  static UINT text_cp = (UINT)-1;
@@ -635,14 +635,14 @@
       /* Get the first pixmap handle passed to us */
       Pixmap *pPixmap = (Pixmap *)val;
       HANDLE hTargetImage = 0;  /* Handle to store the converted bitmap or DIB */
-      
+
       if (aformat != 32 || nitems < 1 || atype != XA_PIXMAP
           || (wFormat != CF_BITMAP && wFormat != CF_DIB))
       {
           WARN("\tUnimplemented format conversion request\n");
           goto END;
       }
-          
+
       if ( wFormat == CF_BITMAP )
       {
         /* For CF_BITMAP requests we must return an HBITMAP */
@@ -652,10 +652,10 @@
       {
         HWND hwnd = GetOpenClipboardWindow();
         HDC hdc = GetDC(hwnd);
-        
+
         /* For CF_DIB requests we must return an HGLOBAL storing a packed DIB */
         hTargetImage = X11DRV_DIB_CreateDIBFromPixmap(*pPixmap, hdc, TRUE);
-        
+
         ReleaseDC(hwnd, hdc);
       }
 
@@ -669,7 +669,7 @@
       lpFormat = CLIPBOARD_LookupFormat(wFormat);
       if (lpFormat->wDataPresent && (lpFormat->hData16 || lpFormat->hData32))
           CLIPBOARD_DeleteRecord(lpFormat, !(hWndClipWindow));
-      
+
       /* Update the clipboard record */
       lpFormat->wDataPresent = 1;
       lpFormat->hData32 = hTargetImage;
@@ -677,7 +677,7 @@
 
       bRet = TRUE;
     }
- 
+
     /* For native properties simply copy the X data without conversion */
     else if (X11DRV_CLIPBOARD_IsNativeProperty(reqType)) /* <WCF>* */
     {
@@ -697,14 +697,14 @@
         else
             hClipData = 0;
       }
-      
+
       if( hClipData )
       {
           /* delete previous clipboard record if any */
           lpFormat = CLIPBOARD_LookupFormat(wFormat);
-          if (lpFormat->wDataPresent || lpFormat->hData16 || lpFormat->hData32) 
+          if (lpFormat->wDataPresent || lpFormat->hData16 || lpFormat->hData32)
               CLIPBOARD_DeleteRecord(lpFormat, !(hWndClipWindow));
-          
+
           /* Update the clipboard record */
           lpFormat->wDataPresent = 1;
           lpFormat->hData32 = hClipData;
@@ -723,7 +723,7 @@
     /* Delete the property on the window now that we are done
      * This will send a PropertyNotify event to the selection owner. */
     TSXDeleteProperty(display,w,prop);
-    
+
     /* Free the retrieved property data */
     HeapFree(GetProcessHeap(),0,val);
     return bRet;
@@ -752,12 +752,12 @@
 	    clearAllSelections = atoi(buffer);
         RegCloseKey(hkey);
     }
-    
+
     /* w is the window that lost the selection
-     * selectionPrevWindow is nonzero if CheckSelection() was called. 
+     * selectionPrevWindow is nonzero if CheckSelection() was called.
      */
 
-    TRACE("\tevent->window = %08x (sw = %08x, spw=%08x)\n", 
+    TRACE("\tevent->window = %08x (sw = %08x, spw=%08x)\n",
 	  (unsigned)w, (unsigned)selectionWindow, (unsigned)selectionPrevWindow );
 
     if( selectionAcquired )
@@ -775,7 +775,7 @@
 
               /* We are completely giving up the selection.
                * Make sure we can open the windows clipboard first. */
-              
+
               if ( !OpenClipboard(hwnd) )
               {
                   /*
@@ -795,17 +795,17 @@
               {
                   XSetSelectionOwner(display, XA_PRIMARY, None, CurrentTime);
               }
-              
+
               /* We really lost PRIMARY but want to voluntarily lose CLIPBOARD  */
               if ( (selType == XA_PRIMARY)
                    && (selectionAcquired & S_CLIPBOARD) )
               {
                   XSetSelectionOwner(display, xaClipboard, None, CurrentTime);
               }
-              
+
               selectionWindow = None;
               PrimarySelectionOwner = ClipboardSelectionOwner = 0;
-              
+
               /* Empty the windows clipboard.
                * We should pretend that we still own the selection BEFORE calling
                * EmptyClipboard() since otherwise this has the side effect of
@@ -835,7 +835,7 @@
 	else if( w == selectionPrevWindow )
 	{
             Atom xaClipboard = TSXInternAtom(display, _CLIPBOARD, False);
-            
+
 	    w = TSXGetSelectionOwner(display, XA_PRIMARY);
 	    if( w == None )
 		TSXSetSelectionOwner(display, XA_PRIMARY, selectionWindow, CurrentTime);
@@ -852,7 +852,7 @@
         TRACE("Lost all selections, signalling to selectionClearEvent listener\n");
         SetEvent(selectionClearEvent);
     }
-    
+
     selectionPrevWindow = None;
 }
 
@@ -873,10 +873,10 @@
 	selectionAcquired   = S_NOSELECTION;
 	selectionPrevWindow = selectionWindow;
 	selectionWindow     = None;
-      
-	TRACE("\tgiving up selection (spw = %08x)\n", 
+
+	TRACE("\tgiving up selection (spw = %08x)\n",
 	     (unsigned)selectionPrevWindow);
-      
+
         wine_tsx11_lock();
 
         TRACE("Releasing CLIPBOARD selection\n");
@@ -890,7 +890,7 @@
             TRACE("Releasing XA_PRIMARY selection\n");
             selectionPrevWindow = savePrevWindow; /* May be cleared in X11DRV_CLIPBOARD_ReleaseSelection */
             XSetSelectionOwner(display, XA_PRIMARY, None, CurrentTime);
-    
+
             if( selectionPrevWindow )
                 while( !XCheckTypedWindowEvent( display, selectionPrevWindow,
                                                 SelectionClear, &xe ) );
@@ -939,7 +939,7 @@
         /* Grab PRIMARY selection if not owned */
         if ( !(selectionAcquired & S_PRIMARY) )
             TSXSetSelectionOwner(display, XA_PRIMARY, owner, CurrentTime);
-        
+
         /* Grab CLIPBOARD selection if not owned */
         if ( !(selectionAcquired & S_CLIPBOARD) )
             TSXSetSelectionOwner(display, xaClipboard, owner, CurrentTime);
@@ -999,7 +999,7 @@
 	TRACE("There is no selection owner\n");
         return FALSE;
     }
-   
+
     /* Check if the format is available in the clipboard cache */
     if ( CLIPBOARD_IsPresent(wFormat) )
         return TRUE;
@@ -1011,7 +1011,7 @@
      */
     if ( !cSelectionTargets )
         return X11DRV_GetClipboardData( wFormat );
-        
+
     TRACE("There is no selection\n");
     return FALSE;
 }
@@ -1027,7 +1027,7 @@
     Display *display = thread_display();
     Atom prop = None;
     char str[256];
-    
+
     /*
      * If an X atom is registered for this format, return that
      * Otherwise register a new atom.
@@ -1039,7 +1039,7 @@
         strncat(str, FormatName, sizeof(str) - strlen(FMT_PREFIX));
         prop = TSXInternAtom(display, str, False);
     }
-    
+
     return (prop) ? TRUE : FALSE;
 }
 
@@ -1057,7 +1057,7 @@
  *		SetClipboardData (X11DRV.@)
  *
  * We don't need to do anything special here since the clipboard code
- * maintains the cache. 
+ * maintains the cache.
  *
  */
 void X11DRV_SetClipboardData(UINT wFormat)
@@ -1100,7 +1100,7 @@
          * If the format is in the cache, use the atom associated
          * with it.
          */
-        
+
         lpFormat = CLIPBOARD_LookupFormat( wFormat );
         if (lpFormat && lpFormat->wDataPresent && lpFormat->drvData)
             propRequest = (Atom)lpFormat->drvData;
@@ -1116,9 +1116,9 @@
             XConvertSelection(display, selectionCacheSrc, propRequest,
                             TSXInternAtom(display, "SELECTION_DATA", False),
                             w, CurrentTime);
-        
+
             /* wait until SelectionNotify is received */
-    
+
             while( TRUE )
             {
                if( XCheckTypedWindowEvent(display, w, SelectionNotify, &xe) )
@@ -1143,7 +1143,7 @@
     }
 
     TRACE("Returning %d\n", bRet);
-    
+
     return bRet;
 }
 
@@ -1178,7 +1178,7 @@
 
     hWndClipOwner = GetClipboardOwner();
     xaClipboard = TSXInternAtom(display, _CLIPBOARD, False);
-    
+
     TRACE("clipboard owner = %04x, selection window = %08x\n",
           hWndClipOwner, (unsigned)selectionWindow);
 
@@ -1201,13 +1201,13 @@
         int saveSelectionState = selectionAcquired;
         selectionAcquired = False;
 
-        TRACE("\tswitching selection from %08x to %08x\n", 
+        TRACE("\tswitching selection from %08x to %08x\n",
                     (unsigned)selectionPrevWindow, (unsigned)selectionWindow);
-    
+
         /* Assume ownership for the PRIMARY and CLIPBOARD selection */
         if ( saveSelectionState & S_PRIMARY )
             TSXSetSelectionOwner(display, XA_PRIMARY, selectionWindow, CurrentTime);
-        
+
         TSXSetSelectionOwner(display, xaClipboard, selectionWindow, CurrentTime);
 
         /* Restore the selection masks */
@@ -1226,7 +1226,7 @@
             /* Update selection state */
             if (saveSelectionState & S_PRIMARY)
                PrimarySelectionOwner = selectionWindow;
-            
+
             ClipboardSelectionOwner = selectionWindow;
         }
     }
@@ -1241,7 +1241,7 @@
     {
       /* Launch the clipboard server if the selection can no longer be recyled
        * to another top level window. */
-  
+
       if ( !X11DRV_CLIPBOARD_LaunchServer() )
       {
          /* Empty the windows clipboard if the server was not launched.
@@ -1250,15 +1250,15 @@
           * triggering X11DRV_CLIPBOARD_Acquire() and causing the X selection
           * to be re-acquired by us!
           */
-  
+
          TRACE("\tLost the selection! Emptying the clipboard...\n");
-      
+
          OpenClipboard( 0 );
          selectionAcquired = (S_PRIMARY | S_CLIPBOARD);
          EmptyClipboard();
-         
+
          CloseClipboard();
-   
+
          /* Give up ownership of the windows clipboard */
          CLIPBOARD_ReleaseOwner();
       }
diff --git a/dlls/x11drv/dga2.c b/dlls/x11drv/dga2.c
index 2c9aab4..307e947 100644
--- a/dlls/x11drv/dga2.c
+++ b/dlls/x11drv/dga2.c
@@ -72,7 +72,7 @@
   if (!TSXDGAQueryExtension(gdi_display, &dga_event, &dga_error)) return;
 
   if (!TSXDGAQueryVersion(gdi_display, &major, &minor)) return;
-  
+
   if (major < 2) return; /* only bother with DGA 2+ */
 
   /* test that it works */
diff --git a/dlls/x11drv/dga2.h b/dlls/x11drv/dga2.h
index 73e9e84..983bd0c 100644
--- a/dlls/x11drv/dga2.h
+++ b/dlls/x11drv/dga2.h
@@ -20,9 +20,9 @@
 #ifndef __WINE_DGA2_H
 #define __WINE_DGA2_H
 
-#ifndef __WINE_CONFIG_H 
-# error You must include config.h to use this header 
-#endif 
+#ifndef __WINE_CONFIG_H
+# error You must include config.h to use this header
+#endif
 
 #ifdef HAVE_LIBXXF86DGA2
 #include "ddrawi.h"
diff --git a/dlls/x11drv/event.c b/dlls/x11drv/event.c
index 848f224..25d15ee 100644
--- a/dlls/x11drv/event.c
+++ b/dlls/x11drv/event.c
@@ -49,7 +49,7 @@
 
 WINE_DEFAULT_DEBUG_CHANNEL(event);
 WINE_DECLARE_DEBUG_CHANNEL(win);
-  
+
 /* X context to associate a hwnd to an X window */
 extern XContext winContext;
 
@@ -241,7 +241,7 @@
       XDGAKeyEvent *evt = (XDGAKeyEvent *) event;
 
       TRACE("DGAKeyPress/ReleaseEvent received.\n");
-      
+
       if (evt->type == DGAKeyReleaseEventType)
 	ke.type = KeyRelease;
       else
@@ -270,7 +270,7 @@
       hWnd = 0;  /* Not for a registered window */
 
   if ( !hWnd && event->xany.window != root_window
-             && event->type != PropertyNotify 
+             && event->type != PropertyNotify
              && event->type != MappingNotify)
       WARN( "Got event %s for unknown Window %08lx\n",
             event_names[event->type], event->xany.window );
@@ -324,7 +324,7 @@
       if (!hWnd) return;
       EVENT_SelectionClear( hWnd, (XSelectionClearEvent*) event );
       break;
-      
+
     case PropertyNotify:
       EVENT_PropertyNotify( (XPropertyEvent *)event );
       break;
@@ -353,7 +353,7 @@
       X11DRV_MappingNotify( (XMappingEvent *) event );
       break;
 
-    default:    
+    default:
       WARN("Unprocessed event %s for hwnd %04x\n",
 	   event_names[event->type], hWnd );
       break;
@@ -376,7 +376,7 @@
     bIsDisabled = GetWindowLongA( hWnd, GWL_STYLE ) & WS_DISABLED;
 
     /* If the window has been disabled, revert the X focus back to the last
-     * focus window. This is to disallow the window manager from switching 
+     * focus window. This is to disallow the window manager from switching
      * focus away while the app is in a modal state.
      */
     if (bIsDisabled && glastXFocusWin)
@@ -441,10 +441,10 @@
   HWND   hWnd;
   Window xW;
   int	   state;
-  
+
   TSXGetInputFocus(display, &xW, &state);
     if( xW == None ||
-        TSXFindContext(display, xW, winContext, (char **)&hWnd) ) 
+        TSXFindContext(display, xW, winContext, (char **)&hWnd) )
       return FALSE;
     return TRUE;
 }
@@ -466,7 +466,7 @@
     int xRc;
 
     TRACE("Request for %s\n", TSXGetAtomName(display, target));
-    
+
     /*
      * Count the number of items we wish to expose as selection targets.
      * We include the TARGETS item, and a PIXMAP if we have CF_DIB or CF_BITMAP
@@ -474,7 +474,7 @@
     cTargets = CountClipboardFormats() + 1;
     if ( CLIPBOARD_IsPresent(CF_DIB) ||  CLIPBOARD_IsPresent(CF_BITMAP) )
        cTargets++;
-    
+
     /* Allocate temp buffer */
     targets = (Atom*)HeapAlloc( GetProcessHeap(), 0, cTargets * sizeof(Atom));
     if(targets == NULL) return None;
@@ -500,7 +500,7 @@
             if (!bExists)
             {
                 targets[cTargets++] = prop;
-            
+
                 /* Add PIXMAP prop for bitmaps additionally */
                 if ( (wFormat == CF_DIB || wFormat == CF_BITMAP )
                      && !bHavePixmap )
@@ -525,7 +525,7 @@
             }
         }
     }
-    
+
     /* Update the X property */
     TRACE("\tUpdating property %s...\n", TSXGetAtomName(display, rprop));
 
@@ -535,7 +535,7 @@
                             XA_ATOM, 32, PropModeReplace,
                             (unsigned char *)targets, cTargets);
     TRACE("(Rc=%d)\n", xRc);
-    
+
     HeapFree( GetProcessHeap(), 0, targets );
 
     return rprop;
@@ -596,17 +596,17 @@
     WideCharToMultiByte(text_cp, 0, uni_text, -1, text, size, NULL, NULL);
 
     /* remove carriage returns */
-    
+
     lpstr = (char*)HeapAlloc( GetProcessHeap(), 0, size-- );
     if(lpstr == NULL) return None;
     for(i=0,j=0; i < size && text[i]; i++ )
     {
-        if( text[i] == '\r' && 
+        if( text[i] == '\r' &&
             (text[i+1] == '\n' || text[i+1] == '\0') ) continue;
         lpstr[j++] = text[i];
     }
     lpstr[j]='\0';
-    
+
     /* Update the X property */
     TRACE("\tUpdating property %s...\n", TSXGetAtomName(display, rprop));
     xRc = TSXChangeProperty(display, requestor, rprop,
@@ -637,7 +637,7 @@
     XSetWindowAttributes win_attr;
     XWindowAttributes win_attr_src;
 #endif
-    
+
     /*
      * Map the requested X selection property type atom name to a
      * windows clipboard format ID.
@@ -647,7 +647,7 @@
     TRACE("Request for %s (wFormat=%x %s)\n",
                   itemFmtName, wFormat, CLIPBOARD_GetFormatName( wFormat));
     TSXFree(itemFmtName);
-    
+
     hClipData = GetClipboardData(wFormat);
     if ( !hClipData )
     {
@@ -660,17 +660,17 @@
     {
         HWND hwnd = GetOpenClipboardWindow();
         HDC hdc = GetDC(hwnd);
-        
+
         /* For convert from packed DIB to Pixmap */
         pixmap = X11DRV_DIB_CreatePixmapFromDIB(hClipData, hdc);
-        
+
         ReleaseDC(hwnd, hdc);
     }
     else if (wFormat == CF_BITMAP)
     {
         HWND hwnd = GetOpenClipboardWindow();
         HDC hdc = GetDC(hwnd);
-        
+
         pixmap = X11DRV_BITMAP_CreatePixmapFromBitmap(hClipData, hdc);
 
         ReleaseDC(hwnd, hdc);
@@ -688,7 +688,7 @@
           TSXGetAtomName(display, target), pixmap);
 
     /* Store the Pixmap handle in the property */
-    xRc = TSXChangeProperty(display, requestor, rprop, target, 
+    xRc = TSXChangeProperty(display, requestor, rprop, target,
                             32, PropModeReplace,
                             (unsigned char *)&pixmap, 1);
     TRACE("(Rc=%d)\n", xRc);
@@ -714,7 +714,7 @@
      */
     X11DRV_CLIPBOARD_RegisterPixmapResource( rprop, pixmap );
 #endif
-    
+
 END:
     return rprop;
 }
@@ -734,7 +734,7 @@
     char * itemFmtName;
     int cBytes;
     int xRc;
-    
+
     /*
      * Map the requested X selection property type atom name to a
      * windows clipboard format ID.
@@ -744,21 +744,21 @@
     TRACE("Request for %s (wFormat=%x %s)\n",
           itemFmtName, wFormat, CLIPBOARD_GetFormatName( wFormat));
     TSXFree(itemFmtName);
-    
+
     hClipData = GetClipboardData(wFormat);
-    
+
     if( hClipData && (lpClipData = GlobalLock(hClipData)) )
     {
         cBytes = GlobalSize(hClipData);
-        
+
         TRACE("\tUpdating property %s, %d bytes...\n",
               TSXGetAtomName(display, rprop), cBytes);
-        
+
         xRc = TSXChangeProperty(display, requestor, rprop,
                                 target, 8, PropModeReplace,
                                 (unsigned char *)lpClipData, cBytes);
         TRACE("(Rc=%d)\n", xRc);
-        
+
         GlobalUnlock(hClipData);
     }
     else
@@ -766,7 +766,7 @@
         TRACE("\tCould not retrieve native format!\n");
         rprop = None; /* Fail the request */
     }
-    
+
     return rprop;
 }
 
@@ -793,12 +793,12 @@
     Atom*	   targetPropList=NULL;
     unsigned long  cTargetPropList = 0;
 /*  Atom           xAtomPair = TSXInternAtom(display, "ATOM_PAIR", False); */
-    
+
    /* If the specified property is None the requestor is an obsolete client.
     * We support these by using the specified target atom as the reply property.
     */
     rprop = pevent->property;
-    if( rprop == None ) 
+    if( rprop == None )
         rprop = pevent->target;
     if (!rprop)
         goto END;
@@ -827,7 +827,7 @@
        if(aformat == 32 /* atype == xAtomPair */ )
        {
           int i;
-          
+
           /* Iterate through the ATOM_PAIR list and execute a SelectionRequest
            * for each (target,property) pair */
 
@@ -841,19 +841,19 @@
                     i/2, targetName, propName);
               TSXFree(targetName);
               TSXFree(propName);
-              
+
               /* We must have a non "None" property to service a MULTIPLE target atom */
               if ( !targetPropList[i+1] )
               {
                   TRACE("\tMULTIPLE(%d): Skipping target with empty property!\n", i);
                   continue;
               }
-              
+
               /* Set up an XSelectionRequestEvent for this (target,property) pair */
               memcpy( &event, pevent, sizeof(XSelectionRequestEvent) );
               event.target = targetPropList[i];
               event.property = targetPropList[i+1];
-                  
+
               /* Fire a SelectionRequest, informing the handler that we are processing
                * a MULTIPLE selection request event.
                */
@@ -906,9 +906,9 @@
    * We support these by using the specified target atom as the reply property.
    */
   rprop = event->property;
-  if( rprop == None ) 
+  if( rprop == None )
       rprop = event->target;
-  
+
   if(event->target == xaTargets)  /*  Return a list of all supported targets */
   {
       /* TARGETS selection request */
@@ -945,11 +945,11 @@
 END:
   /* close clipboard only if we opened before */
   if(couldOpen) CloseClipboard();
-  
-  if( rprop == None) 
+
+  if( rprop == None)
       TRACE("\tRequest ignored\n");
 
-  /* reply to sender 
+  /* reply to sender
    * SelectionNotify should be sent only at the end of a MULTIPLE request
    */
   if ( !bIsMultiple )
@@ -972,7 +972,7 @@
 static void EVENT_SelectionClear( HWND hWnd, XSelectionClearEvent *event )
 {
   Atom xaClipboard = TSXInternAtom(event->display, "CLIPBOARD", False);
-    
+
   if (event->selection == XA_PRIMARY || event->selection == xaClipboard)
       X11DRV_CLIPBOARD_ReleaseSelection( event->selection, event->window, hWnd );
 }
@@ -993,7 +993,7 @@
     {
       TRACE("\tPropertyDelete for atom %s on window %ld\n",
             TSXGetAtomName(event->display, event->atom), (long)event->window);
-      
+
       if (X11DRV_IsSelectionOwner())
           X11DRV_CLIPBOARD_FreeResources( event->atom );
       break;
@@ -1005,7 +1005,7 @@
             TSXGetAtomName(event->display, event->atom), (long)event->window);
       break;
     }
-    
+
     default:
       break;
   }
@@ -1036,18 +1036,18 @@
   SEGPTR		spDragInfo = K32WOWGlobalLock16(hDragInfo);
   Window		w_aux_root, w_aux_child;
   WND*                  pWnd;
-  
+
   if( !lpDragInfo || !spDragInfo ) return;
-  
+
   pWnd = WIN_FindWndPtr(hWnd);
-  
+
   TSXQueryPointer( event->display, get_whole_window(pWnd), &w_aux_root, &w_aux_child,
                    &x, &y, (int *) &u.pt_aux.x, (int *) &u.pt_aux.y,
                    (unsigned int*)&aux_long);
-  
+
   lpDragInfo->hScope = hWnd;
   lpDragInfo->pt.x = (INT16)x; lpDragInfo->pt.y = (INT16)y;
-  
+
   /* find out drop point and drop window */
   if( x < 0 || y < 0 ||
       x > (pWnd->rectWindow.right - pWnd->rectWindow.left) ||
@@ -1059,7 +1059,7 @@
       x = lpDragInfo->pt.x; y = lpDragInfo->pt.y;
     }
   WIN_ReleaseWndPtr(pWnd);
-  
+
   GlobalFree16( hDragInfo );
 
     if (!bAccept) return;
@@ -1130,7 +1130,7 @@
 /**********************************************************************
  *           EVENT_DropURLs
  *
- * drop items are separated by \n 
+ * drop items are separated by \n
  * each item is prefixed by its mime type
  *
  * event->data.l[3], event->data.l[4] contains drop x,y position
@@ -1171,15 +1171,15 @@
 	INT len = GetShortPathNameA( p+5, NULL, 0 );
 	if (len) drop_len += len + 1;
       }
-      if (next) { 
-	*next = '\n'; 
+      if (next) {
+	*next = '\n';
 	p = next + 1;
 	next = strchr(p, '\n');
       } else {
 	p = NULL;
       }
     }
-    
+
     if( drop_len && drop_len < 65535 ) {
       TSXQueryPointer( event->display, root_window, &u.w_aux, &u.w_aux,
 		       &x, &y, &u.i, &u.i, &u.i);
@@ -1220,8 +1220,8 @@
 	  } else {
 	    WARN("unknown mime type %s\n", p);
 	  }
-	  if (next) { 
-	    *next = '\n'; 
+	  if (next) {
+	    *next = '\n';
 	    p = next + 1;
 	    next = strchr(p, '\n');
 	  } else {
@@ -1234,7 +1234,7 @@
         PostMessageA( hWnd, WM_DROPFILES, (WPARAM)hDrop, 0L );
       }
     }
-    if( p_data ) TSXFree(p_data);  
+    if( p_data ) TSXFree(p_data);
   }
 }
 
@@ -1244,7 +1244,7 @@
 static void EVENT_ClientMessage( HWND hWnd, XClientMessageEvent *event )
 {
   if (event->message_type != None && event->format == 32) {
-    if ((event->message_type == wmProtocols) && 
+    if ((event->message_type == wmProtocols) &&
 	(((Atom) event->data.l[0]) == wmDeleteWindow))
     {
         /* Ignore the delete window request if the window has been disabled */
@@ -1279,7 +1279,7 @@
 			    AnyPropertyType, &u.atom, &u.i,
 			    &u.l, &u.l, &p_data);
       TRACE("message_type=%ld, data=%ld,%ld,%ld,%ld,%ld, msg=%s\n",
-	    event->message_type, event->data.l[0], event->data.l[1], 
+	    event->message_type, event->data.l[0], event->data.l[1],
 	    event->data.l[2], event->data.l[3], event->data.l[4],
 	    p_data);
 #endif
diff --git a/dlls/x11drv/keyboard.c b/dlls/x11drv/keyboard.c
index 21bbe72..d4895b1 100644
--- a/dlls/x11drv/keyboard.c
+++ b/dlls/x11drv/keyboard.c
@@ -2,7 +2,7 @@
  * X11 keyboard driver
  *
  * Copyright 1993 Bob Amstadt
- * Copyright 1996 Albrecht Kleine 
+ * Copyright 1996 Albrecht Kleine
  * Copyright 1997 David Faure
  * Copyright 1998 Morten Welinder
  * Copyright 1998 Ulrich Weigand
@@ -728,8 +728,8 @@
 
     TSXLookupString(e, NULL, 0, &keysym, NULL);
 
-    if ((keysym >= 0xFFAE) && (keysym <= 0xFFB9) && (keysym != 0xFFAF) 
-	&& (e->state & NumLockMask)) 
+    if ((keysym >= 0xFFAE) && (keysym <= 0xFFB9) && (keysym != 0xFFAF)
+	&& (e->state & NumLockMask))
         /* Only the Keypad keys 0-9 and . send different keysyms
          * depending on the NumLock state */
         return nonchar_key_vkey[keysym & 0xFF];
@@ -788,8 +788,8 @@
 	        send_keyboard_input( vkey, scan, down, event_time );
 	        send_keyboard_input( vkey, scan, up, event_time );
 		*State=FALSE;
-		pKeyStateTable[vkey] &= ~0x01; /* Toggle state to off. */ 
-	      } 
+		pKeyStateTable[vkey] &= ~0x01; /* Toggle state to off. */
+	      }
 	  }
 	else /* it was OFF */
 	  if (Evtype==KeyPress)
@@ -865,7 +865,7 @@
  */
 void X11DRV_KeyEvent( HWND hwnd, XKeyEvent *event )
 {
-    char Str[24]; 
+    char Str[24];
     KeySym keysym;
     WORD vkey = 0, bScan;
     DWORD dwFlags;
@@ -894,7 +894,7 @@
        index instead of the modifier mask. The group index is set in bits
        13-14 of the state field in the XKeyEvent structure. So if AltGr is
        pressed, look if the group index is diferent than 0. From XKB
-       extension documentation, the group index should for AltGr should 
+       extension documentation, the group index should for AltGr should
        be 2 (event->state = 0x2000). It's probably better to not assume a
        predefined group index and find it dynamically
 
@@ -908,7 +908,7 @@
 	ksname = TSXKeysymToString(keysym);
 	if (!ksname)
 	  ksname = "No Name";
-	TRACE_(key)("%s : keysym=%lX (%s), ascii chars=%u / %X / '%s'\n", 
+	TRACE_(key)("%s : keysym=%lX (%s), ascii chars=%u / %X / '%s'\n",
                     (event->type == KeyPress) ? "KeyPress" : "KeyRelease",
                     keysym, ksname, ascii_chars, Str[0] & 0xff, Str);
     }
@@ -922,7 +922,7 @@
    {
     switch (vkey & 0xff)
     {
-    case VK_NUMLOCK:    
+    case VK_NUMLOCK:
       KEYBOARD_GenerateMsg( VK_NUMLOCK, 0x45, event->type, event_time );
       break;
     case VK_CAPITAL:
@@ -933,7 +933,7 @@
     default:
         /* Adjust the NUMLOCK state if it has been changed outside wine */
 	if (!(pKeyStateTable[VK_NUMLOCK] & 0x01) != !(event->state & NumLockMask))
-	  { 
+	  {
 	    TRACE("Adjusting NumLock state. \n");
 	    KEYBOARD_GenerateMsg( VK_NUMLOCK, 0x45, KeyPress, event_time );
 	    KEYBOARD_GenerateMsg( VK_NUMLOCK, 0x45, KeyRelease, event_time );
@@ -1105,12 +1105,12 @@
     for (i = 0; i < 8; i += 1) /* There are 8 modifier keys */
     {
         int j;
-        
+
         for (j = 0; j < mmp->max_keypermod; j += 1, kcp += 1)
 	    if (*kcp)
             {
 		int k;
-                
+
 		for (k = 0; k < keysyms_per_keycode; k += 1)
                     if (TSXKeycodeToKeysym(display, *kcp, k) == XK_Num_Lock)
 		    {
@@ -1221,7 +1221,7 @@
                 }
 
                 vkey = OEMvkey;
-		  
+
                 if (TRACE_ON(keyboard))
                 {
                     TRACE("OEM specific virtual key %X assigned to keycode %X:\n",
@@ -1230,7 +1230,7 @@
                     for (i = 0; i < keysyms_per_keycode; i += 1)
                     {
                         char	*ksname;
-                        
+
                         keysym = TSXLookupKeysym(&e2, i);
                         ksname = TSXKeysymToString(keysym);
                         if (!ksname)
@@ -1286,14 +1286,14 @@
 {
         Display *display = thread_display();
 	KeyCode keycode;
-	KeySym keysym;    	
+	KeySym keysym;
 	int i,index;
 	int highbyte=0;
 
 	/* char->keysym (same for ANSI chars) */
 	keysym=(unsigned char) cChar;/* (!) cChar is signed */
 	if (keysym<=27) keysym+=0xFF00;/*special chars : return, backspace...*/
-	
+
 	keycode = TSXKeysymToKeycode(display, keysym);  /* keysym -> keycode */
 	if (!keycode)
 	{ /* It didn't work ... let's try with deadchar code. */
@@ -1302,7 +1302,7 @@
 
 	TRACE("VkKeyScan '%c'(%#lx, %lu): got keycode %#.2x\n",
               cChar,keysym,keysym,keycode);
-	
+
 	if (keycode)
 	  {
 	    for (index=-1, i=0; (i<8) && (index<0); i++) /* find shift state */
@@ -1384,7 +1384,7 @@
 
 			if ((wCode>=VK_NUMPAD0) && (wCode<=VK_NUMPAD9))
 			  e.keycode = TSXKeysymToKeycode(e.display, wCode-VK_NUMPAD0+XK_KP_0);
-          
+
 			if (wCode==VK_DECIMAL)
 			  e.keycode = TSXKeysymToKeycode(e.display, XK_KP_Decimal);
 
@@ -1397,7 +1397,7 @@
 
 			if (TSXLookupString(&e, s, 2, &keysym, NULL))
 			  returnMVK (*s);
-			
+
 			TRACE("returning no ANSI.\n");
 			return 0;
 			}
@@ -1409,7 +1409,7 @@
 
 		default: /* reserved */
 			WARN("Unknown wMapType %d !\n", wMapType);
-			return 0;	
+			return 0;
 	}
 	return 0;
 }
@@ -1424,7 +1424,7 @@
   int keyi;
   KeySym keys;
   char *name;
-	
+
   scanCode = lParam >> 16;
   scanCode &= 0x1ff;  /* keep "extended-key" flag with code */
 
@@ -1468,7 +1468,7 @@
         *lpBuffer = toupper((char)ansi);
           *(lpBuffer+1) = 0;
           return 1;
-        } 
+        }
      else
         return 0;
   }
@@ -1577,7 +1577,7 @@
 #endif
 /* FIXME: I don't know this three.
 	    case XK_dead_iota :
-	        return 'i';	 
+	        return 'i';
 	    case XK_dead_voiced_sound :
 	        return 'v';
 	    case XK_dead_semivoiced_sound :
@@ -1666,7 +1666,7 @@
 
     if ((virtKey>=VK_NUMPAD0) && (virtKey<=VK_NUMPAD9))
         e.keycode = TSXKeysymToKeycode(e.display, virtKey-VK_NUMPAD0+XK_KP_0);
-          
+
     if (virtKey==VK_DECIMAL)
         e.keycode = TSXKeysymToKeycode(e.display, XK_KP_Decimal);
 
@@ -1715,7 +1715,7 @@
             ret = 0;
         }
 
-        /* more areas where X returns characters but Windows does not 
+        /* more areas where X returns characters but Windows does not
            CTRL + number or CTRL + symbol*/
         if (e.state & ControlMask)
         {
diff --git a/dlls/x11drv/mouse.c b/dlls/x11drv/mouse.c
index 76d6dfd..d64c4e0 100644
--- a/dlls/x11drv/mouse.c
+++ b/dlls/x11drv/mouse.c
@@ -91,7 +91,7 @@
 /***********************************************************************
  *		update_key_state
  *
- * Update the key state with what X provides us 
+ * Update the key state with what X provides us
  */
 static void update_key_state( unsigned int state )
 {
@@ -159,7 +159,7 @@
     {
         XImage *image;
         GC gc;
-        
+
         TRACE("Bitmap %dx%d planes=%d bpp=%d bytesperline=%d\n",
             ptr->nWidth, ptr->nHeight, ptr->bPlanes, ptr->bBitsPerPixel,
             ptr->nWidthBytes);
@@ -174,11 +174,11 @@
          *  the mask and the second is the image.
          */
         if (!(pixmapAll = XCreatePixmap( display, root_window,
-                  ptr->nWidth, ptr->nHeight * 2, 1 ))) 
+                  ptr->nWidth, ptr->nHeight * 2, 1 )))
             return 0;
         if (!(image = XCreateImage( display, visual,
                 1, ZPixmap, 0, (char *)(ptr + 1), ptr->nWidth,
-                ptr->nHeight * 2, 16, ptr->nWidthBytes/ptr->bBitsPerPixel))) 
+                ptr->nHeight * 2, 16, ptr->nWidthBytes/ptr->bBitsPerPixel)))
         {
             XFreePixmap( display, pixmapAll );
             return 0;
@@ -206,7 +206,7 @@
             unsigned char *theMask, *theImage, theChar;
             int     threshold, fgBits, bgBits, bitShifted;
             BYTE    pXorBits[128];   /* Up to 32x32 icons */
-            
+
             switch (ptr->bBitsPerPixel)
             {
             case 24:
@@ -233,7 +233,7 @@
             /* The location of the mask. */
             theMask = (char *)(ptr + 1);
             /* The mask should still be 1 bit per pixel. The color image
-             * should immediately follow the mask. 
+             * should immediately follow the mask.
              */
             theImage = &theMask[ptr->nWidth/8 * ptr->nHeight];
             rfg = gfg = bfg = rbg = gbg = bbg = 0;
@@ -248,7 +248,7 @@
                   ptr->nWidth, ptr->nHeight);
             }
             ymax = (ptr->nHeight > 32) ? 32 : ptr->nHeight;
-            
+
             memset(pXorBits, 0, 128);
             for (y=0; y<ymax; y++)
             {
@@ -325,7 +325,7 @@
                 XDestroyImage( image );
                 return 0;
             }
-            
+
             /* Put the mask. */
             XPutImage( display, pixmapAll, gc, image,
                    0, 0, 0, 0, ptr->nWidth, ptr->nHeight );
@@ -352,7 +352,7 @@
              * compatible between Windows and X11. Under X11, there
              * are only 3 possible color cursor: black, white and
              * masked. So we map the 4th Windows color (invert the
-             * bits on the screen) to black and an additional white bit on 
+             * bits on the screen) to black and an additional white bit on
              * an other place (+1,+1). This require some boolean arithmetic:
              *
              *         Windows          |          X11
diff --git a/dlls/x11drv/scroll.c b/dlls/x11drv/scroll.c
index ec69bdf..fd3832a 100644
--- a/dlls/x11drv/scroll.c
+++ b/dlls/x11drv/scroll.c
@@ -69,7 +69,7 @@
 
 /*************************************************************************
  *		ScrollDC   (X11DRV.@)
- * 
+ *
  * Only the hrgnUpdate is returned in device coordinates.
  * rcUpdate must be returned in logical coordinates to comply with win API.
  * FIXME: the doc explicitly states the opposite, to be checked
@@ -141,7 +141,7 @@
 /*************************************************************************
  *		ScrollWindowEx   (X11DRV.@)
  *
- * Note: contrary to what the doc says, pixels that are scrolled from the 
+ * Note: contrary to what the doc says, pixels that are scrolled from the
  *      outside of clipRect to the inside are NOT painted.
  */
 INT X11DRV_ScrollWindowEx( HWND hwnd, INT dx, INT dy,
diff --git a/dlls/x11drv/window.c b/dlls/x11drv/window.c
index b90bce9..0887068 100644
--- a/dlls/x11drv/window.c
+++ b/dlls/x11drv/window.c
@@ -926,7 +926,7 @@
 	{
 	    TRACE("CBT-hook returned !0\n");
             goto failed;
-	} 
+	}
     }
 
 
@@ -1143,7 +1143,7 @@
 
     /* SetParent additionally needs to make hwnd the topmost window
        in the x-order and send the expected WM_WINDOWPOSCHANGING and
-       WM_WINDOWPOSCHANGED notification messages. 
+       WM_WINDOWPOSCHANGED notification messages.
     */
     SetWindowPos( hwnd, HWND_TOPMOST, 0, 0, 0, 0,
                   SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE | (was_visible ? SWP_SHOWWINDOW : 0) );
diff --git a/dlls/x11drv/wineclipsrv.c b/dlls/x11drv/wineclipsrv.c
index f3d65f3..ed77dae 100644
--- a/dlls/x11drv/wineclipsrv.c
+++ b/dlls/x11drv/wineclipsrv.c
@@ -38,7 +38,7 @@
  *
  * NOTES:
  *
- *    The Wine Clipboard Server is a standalone XLib application whose 
+ *    The Wine Clipboard Server is a standalone XLib application whose
  * purpose is to manage the X selection when Wine exits.
  * The server itself is started automatically with the appropriate
  * selection masks, whenever Wine exits after acquiring the PRIMARY and/or
@@ -138,7 +138,7 @@
 #define C_TRACE          8
 
 /*
- * Global variables 
+ * Global variables
  */
 
 static Display *g_display = NULL;
@@ -154,7 +154,7 @@
 static int  g_selectionToAcquire = 0;          /* Masks for the selection to be acquired */
 static int  g_selectionAcquired = 0;           /* Contains the current selection masks */
 static int  g_clearAllSelections = 0;          /* If TRUE *all* selections are lost on SelectionClear */
-    
+
 /* Selection cache */
 typedef struct tag_CACHEENTRY
 {
@@ -185,7 +185,7 @@
 
 
 /*
- * Prototypes 
+ * Prototypes
  */
 
 int RunAsDaemon( void );
@@ -213,12 +213,12 @@
     if ( RunAsDaemon() == -1 )
     {
        ERR("could not run as daemon\n");
-       exit(1); 
+       exit(1);
     }
 
     if ( !Init(argc, argv) )
         exit(0);
-    
+
     /* Acquire the selection after retrieving all clipboard data
      * owned by the current selection owner. If we were unable to
      * Acquire any selection, terminate right away.
@@ -227,12 +227,12 @@
         TerminateServer(0);
 
     TRACE("Clipboard server running...\n");
-    
+
     /* Start an X event loop */
     while (1)
     {
         XNextEvent(g_display, &event);
-        
+
         EVENT_ProcessEvent( &event );
     }
 }
@@ -283,9 +283,9 @@
     XClassHint *class_hints = NULL;
     XTextProperty windowName;
     char *display_name = NULL;
-    
+
     progname = argv[0];
-    
+
     if (!(size_hints = XAllocSizeHints()))
     {
         ERR(g_szOutOfMemory);
@@ -301,39 +301,39 @@
         ERR(g_szOutOfMemory);
         return 0;
     }
-    
+
     /* connect to X server */
     if ( (g_display=XOpenDisplay(display_name)) == NULL )
     {
         ERR( "cannot connect to X server %s\n", XDisplayName(display_name));
         return 0;
     }
-    
+
     /* get screen size from display structure macro */
     screen_num = DefaultScreen(g_display);
     display_width = DisplayWidth(g_display, screen_num);
     display_height = DisplayHeight(g_display, screen_num);
-    
+
     /* size window with enough room for text */
     width = display_width/3, height = display_height/4;
-    
+
     /* create opaque window */
     g_win = XCreateSimpleWindow(g_display, RootWindow(g_display,screen_num),
                     0, 0, width, height, border_width, BlackPixel(g_display,
                     screen_num), WhitePixel(g_display,screen_num));
-    
-    
+
+
     /* Set size hints for window manager.  The window manager may
      * override these settings. */
-    
+
     /* x, y, width, and height hints are now taken from
      * the actual settings of the window when mapped. Note
      * that PPosition and PSize must be specified anyway. */
-    
+
     size_hints->flags = PPosition | PSize | PMinSize;
     size_hints->min_width = 300;
     size_hints->min_height = 200;
-    
+
     /* These calls store window_name into XTextProperty structures
      * and sets the other fields properly. */
     if (XStringListToTextProperty(&window_name, 1, &windowName) == 0)
@@ -341,25 +341,25 @@
        ERR( "structure allocation for windowName failed.\n");
        TerminateServer(-1);
     }
-            
+
     wm_hints->initial_state = NormalState;
     wm_hints->input = True;
     wm_hints->flags = StateHint | InputHint;
-    
+
     class_hints->res_name = progname;
     class_hints->res_class = "WineClipSrv";
 
-    XSetWMProperties(g_display, g_win, &windowName, NULL, 
-                    argv, argc, size_hints, wm_hints, 
+    XSetWMProperties(g_display, g_win, &windowName, NULL,
+                    argv, argc, size_hints, wm_hints,
                     class_hints);
 
     /* Select event types wanted */
-    XSelectInput(g_display, g_win, ExposureMask | KeyPressMask | 
+    XSelectInput(g_display, g_win, ExposureMask | KeyPressMask |
                     ButtonPressMask | StructureNotifyMask | PropertyChangeMask );
-    
+
     /* create GC for text and drawing */
     getGC(g_win, &g_gc);
-    
+
     /* Display window */
     /* XMapWindow(g_display, g_win); */
 
@@ -375,17 +375,17 @@
     if (argc > 2)
     {
         int dbgClasses = atoi(argv[2]);
-        
+
         __SET_DEBUGGING(__DBCL_FIXME, dbgClasses & C_FIXME);
         __SET_DEBUGGING(__DBCL_ERR, dbgClasses & C_ERR);
         __SET_DEBUGGING(__DBCL_WARN, dbgClasses & C_WARN);
         __SET_DEBUGGING(__DBCL_TRACE, dbgClasses & C_TRACE);
     }
-        
+
     /* Set the "ClearSelections" state from the command line argument */
     if (argc > 3)
         g_clearAllSelections = atoi(argv[3]);
-    
+
     return TRUE;
 }
 
@@ -396,7 +396,7 @@
 void TerminateServer( int ret )
 {
     TRACE("Terminating Wine clipboard server...\n");
-    
+
     /* Free Primary and Clipboard selection caches */
     EmptyCache(g_pPrimaryCache, g_cPrimaryTargets);
     EmptyCache(g_pClipboardCache, g_cClipboardTargets);
@@ -414,7 +414,7 @@
 /**************************************************************************
  *		AcquireSelection()
  *
- * Acquire the selection after retrieving all clipboard data owned by 
+ * Acquire the selection after retrieving all clipboard data owned by
  * the current selection owner.
  */
 int AcquireSelection()
@@ -446,12 +446,12 @@
         /* Acquire the PRIMARY selection */
         while (XGetSelectionOwner(g_display,XA_PRIMARY) != g_win)
             XSetSelectionOwner(g_display, XA_PRIMARY, g_win, CurrentTime);
-        
+
         g_selectionAcquired |= S_PRIMARY;
     }
     else
         TRACE("No PRIMARY targets - ownership not acquired.\n");
-    
+
     if (g_cClipboardTargets)
     {
         /* Acquire the CLIPBOARD selection */
@@ -530,7 +530,7 @@
 
     TRACE("Requesting TARGETS selection for '%s' (owner=%08x)...\n",
           XGetAtomName(g_display, SelectionSrc), (unsigned)ownerSelection );
-          
+
     XConvertSelection(g_display, SelectionSrc, aTargets,
                     XInternAtom(g_display, "SELECTION_DATA", False),
                     g_win, CurrentTime);
@@ -568,14 +568,14 @@
 
           /* Allocate the selection cache */
           *ppCache = (PCACHEENTRY)calloc(cSelectionTargets, sizeof(CACHEENTRY));
-          
+
           /* Cache these formats in the selection cache */
           for (i = 0; i < cSelectionTargets; i++)
           {
               char *itemFmtName = XGetAtomName(g_display, targetList[i]);
-          
+
               TRACE("\tAtom# %d: '%s'\n", i, itemFmtName);
-              
+
               /* Populate the cache entry */
               if (!FillCacheEntry( SelectionSrc, targetList[i], &((*ppCache)[i])))
                   ERR("Failed to fill cache entry!\n");
@@ -587,7 +587,7 @@
        /* Free the list of targets */
        XFree(targetList);
     }
-    
+
     return cSelectionTargets;
 }
 
@@ -627,13 +627,13 @@
     w = xe.xselection.requestor;
     prop = xe.xselection.property;
     reqType = xe.xselection.target;
-    
+
     if(prop == None)
     {
         TRACE("\tOwner failed to convert selection!\n");
         return bRet;
     }
-       
+
     TRACE("\tretrieving property %s from window %ld into %s\n",
           XGetAtomName(g_display,reqType), (long)w, XGetAtomName(g_display,prop) );
 
@@ -653,10 +653,10 @@
        XFree(val);
        val = NULL;
     }
-    
+
     TRACE("\tretrieving %ld bytes...\n", itemSize * aformat/8);
     lRequestLength = (itemSize * aformat/8)/4  + 1;
-    
+
     /*
      * Retrieve the actual property in the required X format.
      */
@@ -669,7 +669,7 @@
 
     TRACE("\tType %s,Format %d,nitems %ld,remain %ld,value %s\n",
           atype ? XGetAtomName(g_display,atype) : NULL, aformat,nitems,remain,val);
-    
+
     if (remain)
     {
         WARN("\tCouldn't read entire property- selection may be too large! Remain=%ld\n", remain);
@@ -699,7 +699,7 @@
     /* Delete the property on the window now that we are done
      * This will send a PropertyNotify event to the selection owner. */
     XDeleteProperty(g_display,w,prop);
-    
+
     return TRUE;
 }
 
@@ -732,7 +732,7 @@
         return FALSE;
 
     *ppCacheEntry = NULL;
-    
+
     /* Look for the target item in the cache */
     for (i = 0; i < nCachetargets; i++)
     {
@@ -755,7 +755,7 @@
 void EmptyCache(PCACHEENTRY pCache, int nItems)
 {
     int i;
-    
+
     if (!pCache)
         return;
 
@@ -768,10 +768,10 @@
             if (pCache[i].target == XA_PIXMAP || pCache[i].target == XA_BITMAP)
             {
                 Pixmap *pPixmap = (Pixmap *)pCache[i].pData;
-                
+
                 TRACE("Freeing %s (handle=%ld)...\n",
                       XGetAtomName(g_display, pCache[i].target), *pPixmap);
-                
+
                 XFreePixmap(g_display, *pPixmap);
 
                 /* Free the cached data item (allocated by us) */
@@ -781,7 +781,7 @@
             {
                 TRACE("Freeing %s (%p)...\n",
                       XGetAtomName(g_display, pCache[i].target), pCache[i].pData);
-            
+
                 /* Free the cached data item (allocated by X) */
                 XFree(pCache[i].pData);
             }
@@ -803,7 +803,7 @@
   /*
   TRACE(" event %s for Window %08lx\n", event_names[event->type], event->xany.window );
   */
-    
+
   switch (event->type)
   {
       case Expose:
@@ -814,10 +814,10 @@
           /* Output something */
           TextOut(g_win, g_gc, "Click here to terminate");
           break;
-          
+
       case ConfigureNotify:
           break;
-          
+
       case ButtonPress:
               /* fall into KeyPress (no break) */
       case KeyPress:
@@ -827,11 +827,11 @@
       case SelectionRequest:
           EVENT_SelectionRequest( (XSelectionRequestEvent *)event, FALSE );
           break;
-  
+
       case SelectionClear:
           EVENT_SelectionClear( (XSelectionClearEvent*)event );
           break;
-        
+
       case PropertyNotify:
 #if 0
           EVENT_PropertyNotify( (XPropertyEvent *)event );
@@ -840,7 +840,7 @@
 
       default: /* ignore all other events */
           break;
-          
+
   } /* end switch */
 
 }
@@ -867,12 +867,12 @@
     Atom*	   targetPropList=NULL;
     unsigned long  cTargetPropList = 0;
 /*  Atom           xAtomPair = XInternAtom(g_display, "ATOM_PAIR", False); */
-    
+
    /* If the specified property is None the requestor is an obsolete client.
     * We support these by using the specified target atom as the reply property.
     */
     rprop = pevent->property;
-    if( rprop == None ) 
+    if( rprop == None )
         rprop = pevent->target;
     if (!rprop)
         goto END;
@@ -900,7 +900,7 @@
        if(aformat == 32 /* atype == xAtomPair */ )
        {
           int i;
-          
+
           /* Iterate through the ATOM_PAIR list and execute a SelectionRequest
            * for each (target,property) pair */
 
@@ -913,19 +913,19 @@
               TRACE("MULTIPLE(%d): Target='%s' Prop='%s'\n", i/2, targetName, propName);
               XFree(targetName);
               XFree(propName);
-              
+
               /* We must have a non "None" property to service a MULTIPLE target atom */
               if ( !targetPropList[i+1] )
               {
                   TRACE("\tMULTIPLE(%d): Skipping target with empty property!\n", i);
                   continue;
               }
-              
+
               /* Set up an XSelectionRequestEvent for this (target,property) pair */
               memcpy( &event, pevent, sizeof(XSelectionRequestEvent) );
               event.target = targetPropList[i];
               event.property = targetPropList[i+1];
-                  
+
               /* Fire a SelectionRequest, informing the handler that we are processing
                * a MULTIPLE selection request event.
                */
@@ -963,7 +963,7 @@
    * We support these by using the specified target atom as the reply property.
    */
   rprop = event->property;
-  if( rprop == None ) 
+  if( rprop == None )
       rprop = event->target;
 
   TRACE("Request for %s in selection %s\n",
@@ -988,7 +988,7 @@
   TRACE("\tUpdating property %s...\n", XGetAtomName(g_display, rprop));
 
   /* If we have a request for a pixmap, return a duplicate */
-  
+
   if(event->target == XA_PIXMAP || event->target == XA_BITMAP)
   {
     Pixmap *pPixmap = (Pixmap *)pCacheEntry->pData;
@@ -997,16 +997,16 @@
   }
   else
     pData = pCacheEntry->pData;
-  
+
   XChangeProperty(g_display, request, rprop,
                     pCacheEntry->type, pCacheEntry->nFormat, PropModeReplace,
                     (unsigned char *)pData, pCacheEntry->nElements);
 
 END:
-  if( rprop == None) 
+  if( rprop == None)
       TRACE("\tRequest ignored\n");
 
-  /* reply to sender 
+  /* reply to sender
    * SelectionNotify should be sent only at the end of a MULTIPLE request
    */
   if ( !bIsMultiple )
@@ -1032,7 +1032,7 @@
 void EVENT_SelectionClear( XSelectionClearEvent *event )
 {
   Atom xaClipboard = XInternAtom(g_display, _CLIPBOARD, False);
-    
+
   TRACE("()\n");
 
   /* If we're losing the CLIPBOARD selection, or if the preferences in .winerc
@@ -1042,21 +1042,21 @@
   if ( g_clearAllSelections || (event->selection == xaClipboard) )
   {
       TRACE("Lost CLIPBOARD (+PRIMARY) selection\n");
-      
+
       /* We really lost CLIPBOARD but want to voluntarily lose PRIMARY */
       if ( (event->selection == xaClipboard)
            && (g_selectionAcquired & S_PRIMARY) )
       {
           XSetSelectionOwner(g_display, XA_PRIMARY, None, CurrentTime);
       }
-      
+
       /* We really lost PRIMARY but want to voluntarily lose CLIPBOARD  */
       if ( (event->selection == XA_PRIMARY)
            && (g_selectionAcquired & S_CLIPBOARD) )
       {
           XSetSelectionOwner(g_display, xaClipboard, None, CurrentTime);
       }
-      
+
       g_selectionAcquired = S_NOSELECTION;   /* Clear the selection masks */
   }
   else if (event->selection == XA_PRIMARY)
@@ -1087,7 +1087,7 @@
     {
       TRACE("\tPropertyDelete for atom %s on window %ld\n",
                     XGetAtomName(event->display, event->atom), (long)event->window);
-      
+
       /* FreeResources( event->atom ); */
       break;
     }
@@ -1098,7 +1098,7 @@
                     XGetAtomName(event->display, event->atom), (long)event->window);
       break;
     }
-    
+
     default:
       break;
   }
@@ -1117,7 +1117,7 @@
     unsigned int depth, width, height;
 
     TRACE("\t() Pixmap=%ld\n", (long)pixmap);
-          
+
     /* Get the Pixmap dimensions and bit depth */
     if ( 0 == XGetGeometry(g_display, pixmap, &root, &x, &y, &width, &height,
                              &border_width, &depth) )
@@ -1125,15 +1125,15 @@
 
     TRACE("\tPixmap properties: width=%d, height=%d, depth=%d\n",
           width, height, depth);
-    
+
     newPixmap = XCreatePixmap(g_display, g_win, width, height, depth);
-        
+
     xi = XGetImage(g_display, pixmap, 0, 0, width, height, AllPlanes, XYPixmap);
 
     XPutImage(g_display, newPixmap, g_gc, xi, 0, 0, 0, 0, width, height);
 
     XDestroyImage(xi);
-    
+
     TRACE("\t() New Pixmap=%ld\n", (long)newPixmap);
     return newPixmap;
 }
@@ -1157,12 +1157,12 @@
 	/* Create default Graphics Context */
 	*gc = XCreateGC(g_display, win, valuemask, &values);
 
-	/* specify black foreground since default window background is 
+	/* specify black foreground since default window background is
 	 * white and default foreground is undefined. */
 	XSetForeground(g_display, *gc, BlackPixel(g_display,screen_num));
 
 	/* set line attributes */
-	XSetLineAttributes(g_display, *gc, line_width, line_style, 
+	XSetLineAttributes(g_display, *gc, line_width, line_style,
 			cap_style, join_style);
 
 	/* set dashes */
@@ -1181,6 +1181,6 @@
 	x_offset = 2;
 
 	/* output text, centered on each line */
-	XDrawString(g_display, win, gc, x_offset, y_offset, pStr, 
+	XDrawString(g_display, win, gc, x_offset, y_offset, pStr,
 			strlen(pStr));
 }
diff --git a/dlls/x11drv/winpos.c b/dlls/x11drv/winpos.c
index 06109bc..558a207 100644
--- a/dlls/x11drv/winpos.c
+++ b/dlls/x11drv/winpos.c
@@ -1169,7 +1169,7 @@
     switch(cmd)
     {
         case SW_HIDE:
-            if (!wasVisible) goto END;;
+            if (!wasVisible) goto END;
 	    swp |= SWP_HIDEWINDOW | SWP_NOSIZE | SWP_NOMOVE |
 		        SWP_NOACTIVATE | SWP_NOZORDER;
 	    break;
diff --git a/dlls/x11drv/x11ddraw.c b/dlls/x11drv/x11ddraw.c
index cf96a39..6162a33 100644
--- a/dlls/x11drv/x11ddraw.c
+++ b/dlls/x11drv/x11ddraw.c
@@ -61,42 +61,42 @@
   }
 }
 
-static LRESULT WINAPI GrabWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) 
-{ 
+static LRESULT WINAPI GrabWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
+{
   Display *display = thread_display();
 
   if(message != X11DRV_DD_GrabMessage)
     return CallWindowProcA(X11DRV_DD_GrabOldProcedure, hWnd, message, wParam, lParam);
- 
+
   TRACE("hwnd=%d, grab=%d\n", hWnd, wParam);
 
-  if (wParam) 
-  {  
-    /* find the X11 window that ddraw uses */  
-    Window win = X11DRV_get_whole_window(hWnd);  
-    TRACE("X11 window: %ld\n", win);  
-    if (!win) {  
-      TRACE("host off desktop\n");  
-      win = root_window;  
-    }  
-
-    TSXGrabPointer(display, win, True, 0, GrabModeAsync, GrabModeAsync, win, None, CurrentTime);  
-  }  
-  else 
+  if (wParam)
   {
-    TSXUngrabPointer(display, CurrentTime);  
-  } 
+    /* find the X11 window that ddraw uses */
+    Window win = X11DRV_get_whole_window(hWnd);
+    TRACE("X11 window: %ld\n", win);
+    if (!win) {
+      TRACE("host off desktop\n");
+      win = root_window;
+    }
 
-  return 0; 
-} 
+    TSXGrabPointer(display, win, True, 0, GrabModeAsync, GrabModeAsync, win, None, CurrentTime);
+  }
+  else
+  {
+    TSXUngrabPointer(display, CurrentTime);
+  }
+
+  return 0;
+}
 
 static void GrabPointer(BOOL grab)
 {
-  if(grab) { 
-    Window window = X11DRV_get_whole_window(GetFocus()); 
+  if(grab) {
+    Window window = X11DRV_get_whole_window(GetFocus());
     if(window)
-      XSetInputFocus(thread_display(), window, RevertToParent, CurrentTime); 
-  } 
+      XSetInputFocus(thread_display(), window, RevertToParent, CurrentTime);
+  }
 
   if(!X11DRV_DD_GrabMessage)
     X11DRV_DD_GrabMessage = RegisterWindowMessageA("WINE_X11DRV_GRABPOINTER");
diff --git a/dlls/x11drv/x11ddraw.h b/dlls/x11drv/x11ddraw.h
index dcd6908..cb173f4 100644
--- a/dlls/x11drv/x11ddraw.h
+++ b/dlls/x11drv/x11ddraw.h
@@ -20,9 +20,9 @@
 #ifndef __WINE_X11DDRAW_H
 #define __WINE_X11DDRAW_H
 
-#ifndef __WINE_CONFIG_H 
-# error You must include config.h to use this header 
-#endif 
+#ifndef __WINE_CONFIG_H
+# error You must include config.h to use this header
+#endif
 
 #include "ddrawi.h"
 
diff --git a/dlls/x11drv/x11drv_main.c b/dlls/x11drv/x11drv_main.c
index 0f26b83..6942412 100644
--- a/dlls/x11drv/x11drv_main.c
+++ b/dlls/x11drv/x11drv_main.c
@@ -152,7 +152,7 @@
 /***********************************************************************
  *		get_server_startup
  *
- * Get the server startup time 
+ * Get the server startup time
  * Won't be exact, but should be sufficient
  */
 static void get_server_startup(void)
@@ -260,7 +260,7 @@
  *		setup_opengl_visual
  *
  * Setup the default visual used for OpenGL and Direct3D, and the desktop
- * window (if it exists).  If OpenGL isn't available, the visual is simply 
+ * window (if it exists).  If OpenGL isn't available, the visual is simply
  * set to the default visual for the display
  */
 #ifdef HAVE_OPENGL
@@ -268,11 +268,11 @@
 {
     int err_base, evt_base;
 
-    /* In order to support OpenGL or D3D, we require a double-buffered 
+    /* In order to support OpenGL or D3D, we require a double-buffered
      * visual */
     if (glXQueryExtension(display, &err_base, &evt_base) == True) {
 	  int dblBuf[]={GLX_RGBA,GLX_DEPTH_SIZE,16,GLX_DOUBLEBUFFER,None};
-	
+
 	  ENTER_GL();
 	  desktop_vi = glXChooseVisual(display, DefaultScreen(display), dblBuf);
 	  LEAVE_GL();
@@ -284,7 +284,7 @@
       screen_depth = desktop_vi->depth;
     }
 }
-#endif /* HAVE_OPENGL */    
+#endif /* HAVE_OPENGL */
 
 /***********************************************************************
  *           X11DRV process initialisation routine
diff --git a/dlls/x11drv/xrender.c b/dlls/x11drv/xrender.c
index 39b478f..96a1a30 100644
--- a/dlls/x11drv/xrender.c
+++ b/dlls/x11drv/xrender.c
@@ -243,7 +243,7 @@
     assert(glyphsetCache[lastfree].count == -1);
     glyphsetCache[lastfree].count = 1;
     best = lastfree;
-    lastfree = glyphsetCache[lastfree].next;    
+    lastfree = glyphsetCache[lastfree].next;
     assert(best != mru);
     glyphsetCache[best].next = mru;
     mru = best;
@@ -301,7 +301,7 @@
   mru = best;
   TRACE("new free cache slot at %d\n", mru);
   return glyphsetCache + mru;
-}    
+}
 
 static gsCacheEntry *GetCacheEntry(LFANDSIZE *plfsz)
 {
@@ -420,7 +420,7 @@
 
     if(physDev->xrender->cacheEntry)
         dec_ref_cache(physDev->xrender->cacheEntry);
-    
+
     HeapFree(GetProcessHeap(), 0, physDev->xrender);
     physDev->xrender = NULL;
     return;
@@ -677,7 +677,7 @@
 	    dc->CursPosY = INTERNAL_YDPTOWP( dc, x + xwidth, y - ywidth );
 	}
 	break;
-      
+
     case TA_CENTER:
         x -= xwidth / 2;
 	y += ywidth / 2;
@@ -773,7 +773,7 @@
 	physDev->xrender->lastTextColor = ~dc->textColor;
 
     }
-    
+
     if(dc->textColor != physDev->xrender->lastTextColor) {
         if(dc->bitsPerPixel != 1) {
 	    /* Map 0 -- 0xff onto 0 -- 0xffff */
@@ -800,7 +800,7 @@
      */
     if((dc->bitsPerPixel == 1) && ((dc->textColor & 0xffffff) == 0))
         render_op = PictOpOutReverse; /* This gives us 'black' text */
-    
+
     for(idx = 0; idx < count; idx++) {
         if(glyphs[idx] >= physDev->xrender->cacheEntry->nrealized ||
 	   physDev->xrender->cacheEntry->realized[glyphs[idx]] == FALSE) {
@@ -814,7 +814,7 @@
 
     wine_tsx11_lock();
     if(!lpDx)
-        pXRenderCompositeString16(gdi_display, render_op, 
+        pXRenderCompositeString16(gdi_display, render_op,
 				   physDev->xrender->tile_pict,
 				   physDev->xrender->pict,
 				   physDev->xrender->cacheEntry->font_format,
@@ -825,7 +825,7 @@
     else {
         INT offset = 0, xoff = 0, yoff = 0;
 	for(idx = 0; idx < count; idx++) {
-	    pXRenderCompositeString16(gdi_display, render_op, 
+	    pXRenderCompositeString16(gdi_display, render_op,
 				       physDev->xrender->tile_pict,
 				       physDev->xrender->pict,
 				       physDev->xrender->cacheEntry->font_format,
@@ -845,7 +845,7 @@
     physDev->xrender->pict = 0;
     wine_tsx11_unlock();
 
-    if (flags & ETO_CLIPPED) 
+    if (flags & ETO_CLIPPED)
         RestoreVisRgn16( hdc );
 
     X11DRV_UnlockDIBSection( physDev, TRUE );
diff --git a/dlls/x11drv/xvidmode.h b/dlls/x11drv/xvidmode.h
index 12a8b9a..b3b01b8 100644
--- a/dlls/x11drv/xvidmode.h
+++ b/dlls/x11drv/xvidmode.h
@@ -20,9 +20,9 @@
 #ifndef __WINE_XVIDMODE_H
 #define __WINE_XVIDMODE_H
 
-#ifndef __WINE_CONFIG_H 
-# error You must include config.h to use this header 
-#endif 
+#ifndef __WINE_CONFIG_H
+# error You must include config.h to use this header
+#endif
 
 #ifdef HAVE_LIBXXF86VM
 #include "ddrawi.h"