Removed trailing whitespace.

diff --git a/controls/button.c b/controls/button.c
index bc83af8..0826dc1 100644
--- a/controls/button.c
+++ b/controls/button.c
@@ -225,7 +225,7 @@
             set_button_state( hWnd, get_button_state( hWnd ) | BUTTON_BTNPRESSED );
 	}
 	break;
-	
+
     case WM_LBUTTONDBLCLK:
         if(style & BS_NOTIFY ||
            btn_type == BS_RADIOBUTTON ||
@@ -342,7 +342,7 @@
         if ((btn_type == BS_RADIOBUTTON || btn_type == BS_AUTORADIOBUTTON) && (GetCapture() != hWnd) &&
             !(SendMessageW(hWnd, BM_GETCHECK, 0, 0) & BST_CHECKED))
 	{
-            /* The notification is sent when the button (BS_AUTORADIOBUTTON) 
+            /* The notification is sent when the button (BS_AUTORADIOBUTTON)
                is unchecked and the focus was not given by a mouse click. */
             if (btn_type == BS_AUTORADIOBUTTON)
                 SendMessageW( hWnd, BM_SETCHECK, BUTTON_CHECKED, 0 );
@@ -581,7 +581,7 @@
          break;
 
       default:
-      empty_rect:   
+      empty_rect:
          r.right = r.left;
          r.bottom = r.top;
          return (UINT)(LONG)-1;
@@ -732,7 +732,7 @@
         SetPixel( hDC, rc.right-1, rc.bottom-1, clr_wnd);
 	InflateRect( &rc, -1, -1 );
     }
-    
+
     if (get_button_type(style) == BS_DEFPUSHBUTTON)
     {
         Rectangle(hDC, rc.left, rc.top, rc.right, rc.bottom);
@@ -845,14 +845,14 @@
     if (!hBrush) /* did the app forget to call defwindowproc ? */
         hBrush = DefWindowProcW( GetParent(hwnd), WM_CTLCOLORSTATIC, hDC, (LPARAM)hwnd );
 
-    if (style & BS_LEFTTEXT) 
+    if (style & BS_LEFTTEXT)
     {
 	/* magic +4 is what CTL3D expects */
 
         rtext.right -= checkBoxWidth + 4;
         rbox.left = rbox.right - checkBoxWidth;
     }
-    else 
+    else
     {
         rtext.left += checkBoxWidth + 4;
         rbox.right = checkBoxWidth;
@@ -860,7 +860,7 @@
 
     /* Draw the check-box bitmap */
     if (action == ODA_DRAWENTIRE || action == ODA_SELECT)
-    { 
+    {
 	/* Since WM_ERASEBKGND does nothing, first prepare background */
 	if (action == ODA_SELECT) FillRect( hDC, &rbox, hBrush );
 	else FillRect( hDC, &client, hBrush );
@@ -905,10 +905,10 @@
 
 	    if (style & WS_DISABLED) flags |= DFCS_INACTIVE;
 
-	    /* rbox must have the correct height */ 
+	    /* rbox must have the correct height */
  	    delta = rbox.bottom - rbox.top - checkBoxHeight;
-	    if (delta > 0) 
-	    {  
+	    if (delta > 0)
+	    {
 		int ofs = (abs(delta) / 2);
 		rbox.bottom -= ofs + 1;
 		rbox.top = rbox.bottom - checkBoxHeight;
diff --git a/controls/combo.c b/controls/combo.c
index bfb6fa4..cb1ac9b 100644
--- a/controls/combo.c
+++ b/controls/combo.c
@@ -1,8 +1,8 @@
 /*
  * Combo controls
- * 
+ *
  * Copyright 1997 Alex Korobka
- * 
+ *
  * 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
@@ -97,7 +97,7 @@
 static BOOL COMBO_Init()
 {
   HDC		hDC;
-  
+
   if( hComboBmp ) return TRUE;
   if( (hDC = CreateCompatibleDC(0)) )
   {
@@ -171,7 +171,7 @@
    {
        TRACE("[%04x]: freeing storage\n", lphc->self);
 
-       if( (CB_GETTYPE(lphc) != CBS_SIMPLE) && lphc->hWndLBox ) 
+       if( (CB_GETTYPE(lphc) != CBS_SIMPLE) && lphc->hWndLBox )
    	   DestroyWindow( lphc->hWndLBox );
 
        SetWindowLongA( lphc->self, 0, 0 );
@@ -183,9 +183,9 @@
 /***********************************************************************
  *           CBGetTextAreaHeight
  *
- * This method will calculate the height of the text area of the 
+ * This method will calculate the height of the text area of the
  * combobox.
- * The height of the text area is set in two ways. 
+ * The height of the text area is set in two ways.
  * It can be set explicitly through a combobox message or through a
  * WM_MEASUREITEM callback.
  * If this is not the case, the height is set to 13 dialog units.
@@ -207,19 +207,19 @@
     HDC         hDC       = GetDC(hwnd);
     HFONT       hPrevFont = 0;
     INT         baseUnitY;
-    
+
     if (lphc->hFont)
       hPrevFont = SelectObject( hDC, lphc->hFont );
-    
+
     GetTextMetricsW(hDC, &tm);
-    
+
     baseUnitY = tm.tmHeight;
-    
+
     if( hPrevFont )
       SelectObject( hDC, hPrevFont );
-    
+
     ReleaseDC(hwnd, hDC);
-    
+
     iTextItemHeight = ((13 * baseUnitY) / 8);
 
     /*
@@ -229,7 +229,7 @@
      */
     iTextItemHeight -= 2*COMBO_YBORDERSIZE();
   }
-  
+
   /*
    * Check the ownerdraw case if we haven't asked the parent the size
    * of the item yet.
@@ -246,9 +246,9 @@
      * We use the client rect for the width of the item.
      */
     GetClientRect(hwnd, &clientRect);
-    
+
     lphc->wState &= ~CBF_MEASUREITEM;
-    
+
     /*
      * Send a first one to measure the size of the text area
      */
@@ -276,9 +276,9 @@
       SendMessageW(lphc->owner, WM_MEASUREITEM, id, (LPARAM)&measureItem);
       lphc->fixedOwnerDrawHeight = measureItem.itemHeight;
     }
-    
+
     /*
-     * Keep the size for the next time 
+     * Keep the size for the next time
      */
     lphc->editHeight = iTextItemHeight;
   }
@@ -300,7 +300,7 @@
   int newComboHeight;
 
   newComboHeight = CBGetTextAreaHeight(lphc->self,lphc) + 2*COMBO_YBORDERSIZE();
-	
+
   GetWindowRect(lphc->self, &windowRect);
 
   /*
@@ -327,8 +327,8 @@
 static void CBCalcPlacement(
   HWND        hwnd,
   LPHEADCOMBO lphc,
-  LPRECT      lprEdit, 
-  LPRECT      lprButton, 
+  LPRECT      lprEdit,
+  LPRECT      lprButton,
   LPRECT      lprLB)
 {
   /*
@@ -354,7 +354,7 @@
   /*
    * If the combobox is "simple" there is no button.
    */
-  if( CB_GETTYPE(lphc) == CBS_SIMPLE ) 
+  if( CB_GETTYPE(lphc) == CBS_SIMPLE )
     lprButton->left = lprButton->right = lprButton->bottom = 0;
   else
   {
@@ -366,7 +366,7 @@
     lprButton->left = lprButton->right - GetSystemMetrics(SM_CXVSCROLL);
     lprEdit->right  = lprButton->left;
   }
-  
+
   /*
    * In the case of a dropdown, there is an additional spacing between the
    * text area and the button.
@@ -383,7 +383,7 @@
   {
     InflateRect(lprEdit, -EDIT_CONTROL_PADDING(), -EDIT_CONTROL_PADDING());
   }
-  
+
   /*
    * Adjust the size of the listbox popup.
    */
@@ -410,7 +410,7 @@
 
       /*
        * In the case of a dropdown, the popup listbox is offset to the right.
-       * so, we want to make sure it's flush with the right side of the 
+       * so, we want to make sure it's flush with the right side of the
        * combobox
        */
       if( CB_GETTYPE(lphc) == CBS_DROPDOWN )
@@ -422,11 +422,11 @@
 
   TRACE("\ttext\t= (%i,%i-%i,%i)\n",
 	lprEdit->left, lprEdit->top, lprEdit->right, lprEdit->bottom);
-  
+
   TRACE("\tbutton\t= (%i,%i-%i,%i)\n",
 	lprButton->left, lprButton->top, lprButton->right, lprButton->bottom);
-  
-  TRACE("\tlbox\t= (%i,%i-%i,%i)\n", 
+
+  TRACE("\tlbox\t= (%i,%i-%i,%i)\n",
 	lprLB->left, lprLB->top, lprLB->right, lprLB->bottom );
 }
 
@@ -437,7 +437,7 @@
 {
     /* In windows, CB_GETDROPPEDCONTROLRECT returns the upper left corner
      of the combo box and the lower right corner of the listbox */
-    
+
     GetWindowRect(lphc->self, lpRect);
 
     lpRect->right =  lpRect->left + lphc->droppedRect.right - lphc->droppedRect.left;
@@ -446,7 +446,7 @@
 }
 
 /***********************************************************************
- *           COMBO_WindowPosChanging         
+ *           COMBO_WindowPosChanging
  */
 static LRESULT COMBO_WindowPosChanging(
   HWND        hwnd,
@@ -459,7 +459,7 @@
    * always the same height. We have to make sure they are not resized
    * to another value.
    */
-  if ( ( CB_GETTYPE(lphc) != CBS_SIMPLE ) && 
+  if ( ( CB_GETTYPE(lphc) != CBS_SIMPLE ) &&
        ((posChanging->flags & SWP_NOSIZE) == 0) )
   {
     int newComboHeight;
@@ -547,7 +547,7 @@
 
       /* create listbox popup */
 
-      lbeStyle = (LBS_NOTIFY | WS_BORDER | WS_CLIPSIBLINGS | WS_CHILD) | 
+      lbeStyle = (LBS_NOTIFY | WS_BORDER | WS_CLIPSIBLINGS | WS_CHILD) |
                  (style & (WS_VSCROLL | CBS_OWNERDRAWFIXED | CBS_OWNERDRAWVARIABLE));
 
       if( lphc->dwStyle & CBS_SORT )
@@ -558,7 +558,7 @@
 	lbeStyle |= LBS_NOINTEGRALHEIGHT;
       if( lphc->dwStyle & CBS_DISABLENOSCROLL )
 	lbeStyle |= LBS_DISABLENOSCROLL;
-  
+
       if( CB_GETTYPE(lphc) == CBS_SIMPLE ) 	/* child listbox */
       {
 	lbeStyle |= WS_VISIBLE;
@@ -576,12 +576,12 @@
 
       lphc->hWndLBox = CreateWindowExW(lbeExStyle,
 				       clbName,
-				       NULL, 
-				       lbeStyle, 
-				       lphc->droppedRect.left, 
-				       lphc->droppedRect.top, 
-				       lphc->droppedRect.right - lphc->droppedRect.left, 
-				       lphc->droppedRect.bottom - lphc->droppedRect.top, 
+				       NULL,
+				       lbeStyle,
+				       lphc->droppedRect.left,
+				       lphc->droppedRect.top,
+				       lphc->droppedRect.right - lphc->droppedRect.left,
+				       lphc->droppedRect.bottom - lphc->droppedRect.top,
                                        hwnd, (HMENU)ID_CB_LISTBOX,
                                        GetWindowLongA( hwnd, GWL_HINSTANCE ), lphc );
 
@@ -591,13 +591,13 @@
 	  lbeStyle = WS_CHILD | WS_VISIBLE | ES_NOHIDESEL | ES_LEFT | ES_COMBO;
 
 	  /*
-	   * In Win95 look, the border fo the edit control is 
+	   * In Win95 look, the border fo the edit control is
 	   * provided by the combobox
 	   */
 	  if (TWEAK_WineLook == WIN31_LOOK)
 	    lbeStyle |= WS_BORDER;
-	    
-	  if( lphc->wState & CBF_EDIT ) 
+
+	  if( lphc->wState & CBF_EDIT )
 	  {
 	      if( lphc->dwStyle & CBS_OEMCONVERT )
 		  lbeStyle |= ES_OEMCONVERT;
@@ -611,18 +611,18 @@
               if (!IsWindowEnabled(hwnd)) lbeStyle |= WS_DISABLED;
 
 	      lphc->hWndEdit = CreateWindowExW(0,
-					       editName, 
-					       NULL, 
+					       editName,
+					       NULL,
 					       lbeStyle,
-					       lphc->textRect.left, lphc->textRect.top, 
+					       lphc->textRect.left, lphc->textRect.top,
 					       lphc->textRect.right - lphc->textRect.left,
-					       lphc->textRect.bottom - lphc->textRect.top, 
+					       lphc->textRect.bottom - lphc->textRect.top,
                                                hwnd, (HMENU)ID_CB_EDIT,
                                                GetWindowLongA( hwnd, GWL_HINSTANCE ), NULL );
 
 	      if( !lphc->hWndEdit )
 		bEdit = FALSE;
-	  } 
+	  }
 
           if( bEdit )
 	  {
@@ -630,7 +630,7 @@
 	    {
               /* Now do the trick with parent */
 	      SetParent(lphc->hWndLBox, HWND_DESKTOP);
-              /* 
+              /*
                * If the combo is a dropdown, we must resize the control
 	       * to fit only the text area and button. To do this,
 	       * we send a dummy resize and the WM_WINDOWPOSCHANGING message
@@ -657,11 +657,11 @@
  * Paint combo button (normal, pressed, and disabled states).
  */
 static void CBPaintButton(
-  LPHEADCOMBO lphc, 
+  LPHEADCOMBO lphc,
   HDC         hdc,
   RECT        rectButton)
 {
-    if( lphc->wState & CBF_NOREDRAW ) 
+    if( lphc->wState & CBF_NOREDRAW )
       return;
 
     if (TWEAK_WineLook == WIN31_LOOK)
@@ -671,7 +671,7 @@
 	HDC       hMemDC;
 	HBRUSH    hPrevBrush;
 	COLORREF  oldTextColor, oldBkColor;
-	
+
 
 	hPrevBrush = SelectObject(hdc, GetSysColorBrush(COLOR_BTNFACE));
 
@@ -684,26 +684,26 @@
 		rectButton.right-rectButton.left,
 		rectButton.bottom-rectButton.top,
 		PATCOPY );
-	
+
 	if( (bBool = lphc->wState & CBF_BUTTONDOWN) )
 	{
 	    DrawEdge( hdc, &rectButton, EDGE_SUNKEN, BF_RECT );
-	} 
-	else 
+	}
+	else
 	{
 	    DrawEdge( hdc, &rectButton, EDGE_RAISED, BF_RECT );
 	}
-	
+
 	/*
 	 * Remove the edge of the button from the rectangle
 	 * and calculate the position of the bitmap.
 	 */
-	InflateRect( &rectButton, -2, -2);	
-	
+	InflateRect( &rectButton, -2, -2);
+
 	x = (rectButton.left + rectButton.right - CBitWidth) >> 1;
 	y = (rectButton.top + rectButton.bottom - CBitHeight) >> 1;
-	
-	
+
+
 	hMemDC = CreateCompatibleDC( hdc );
 	SelectObject( hMemDC, hComboBmp );
 	oldTextColor = SetTextColor( hdc, GetSysColor(COLOR_BTNFACE) );
@@ -732,7 +732,7 @@
 	DrawFrameControl(hdc,
 			 &rectButton,
 			 DFC_SCROLL,
-			 buttonState);			  
+			 buttonState);
     }
 }
 
@@ -742,7 +742,7 @@
  * Paint CBS_DROPDOWNLIST text field / update edit control contents.
  */
 static void CBPaintText(
-  LPHEADCOMBO lphc, 
+  LPHEADCOMBO lphc,
   HDC         hdc,
   RECT        rectEdit)
 {
@@ -753,7 +753,7 @@
 
    TRACE("\n");
 
-   /* follow Windows combobox that sends a bunch of text 
+   /* follow Windows combobox that sends a bunch of text
     * inquiries to its listbox while processing WM_PAINT. */
 
    if( (id = SendMessageW(lphc->hWndLBox, LB_GETCURSEL, 0, 0) ) != LB_ERR )
@@ -774,7 +774,7 @@
    {
         static const WCHAR empty_stringW[] = { 0 };
 	if( CB_HASSTRINGS(lphc) ) SetWindowTextW( lphc->hWndEdit, pText ? pText : empty_stringW );
-	if( lphc->wState & CBF_FOCUSED ) 
+	if( lphc->wState & CBF_FOCUSED )
 	    SendMessageW(lphc->hWndEdit, EM_SETSEL, 0, (LPARAM)(-1));
    }
    else /* paint text field ourselves */
@@ -786,7 +786,7 @@
       * Give ourselves some space.
       */
      InflateRect( &rectEdit, -1, -1 );
-     
+
      if( CB_OWNERDRAWN(lphc) )
      {
        DRAWITEMSTRUCT dis;
@@ -794,7 +794,7 @@
        UINT ctlid = GetWindowLongA( lphc->self, GWL_ID );
 
        /* setup state for DRAWITEM message. Owner will highlight */
-       if ( (lphc->wState & CBF_FOCUSED) && 
+       if ( (lphc->wState & CBF_FOCUSED) &&
 	    !(lphc->wState & CBF_DROPPED) )
 	   itemState |= ODS_SELECTED | ODS_FOCUS;
 
@@ -804,7 +804,7 @@
 	* clip region.
 	*/
        clipRegion = CreateRectRgnIndirect(&rectEdit);
-       
+
        if (GetClipRgn(hdc, clipRegion)!=1)
        {
 	 DeleteObject(clipRegion);
@@ -821,9 +821,9 @@
        dis.itemState	= itemState;
        dis.hDC		= hdc;
        dis.rcItem	= rectEdit;
-       dis.itemData	= SendMessageW(lphc->hWndLBox, LB_GETITEMDATA, 
+       dis.itemData	= SendMessageW(lphc->hWndLBox, LB_GETITEMDATA,
 					(WPARAM)id, 0 );
-       
+
        /*
 	* Clip the DC and have the parent draw the item.
 	*/
@@ -836,33 +836,33 @@
        /*
 	* Reset the clipping region.
 	*/
-       SelectClipRgn(hdc, clipRegion);		
+       SelectClipRgn(hdc, clipRegion);
      }
      else
      {
        static const WCHAR empty_stringW[] = { 0 };
 
-       if ( (lphc->wState & CBF_FOCUSED) && 
+       if ( (lphc->wState & CBF_FOCUSED) &&
 	    !(lphc->wState & CBF_DROPPED) ) {
 
 	   /* highlight */
 	   FillRect( hdc, &rectEdit, GetSysColorBrush(COLOR_HIGHLIGHT) );
 	   SetBkColor( hdc, GetSysColor( COLOR_HIGHLIGHT ) );
 	   SetTextColor( hdc, GetSysColor( COLOR_HIGHLIGHTTEXT ) );
-       } 
-     
-       ExtTextOutW( hdc, 
-		    rectEdit.left + 1, 
+       }
+
+       ExtTextOutW( hdc,
+		    rectEdit.left + 1,
 		    rectEdit.top + 1,
-		    ETO_OPAQUE | ETO_CLIPPED, 
+		    ETO_OPAQUE | ETO_CLIPPED,
 		    &rectEdit,
 		    pText ? pText : empty_stringW , size, NULL );
-       
+
        if(lphc->wState & CBF_FOCUSED && !(lphc->wState & CBF_DROPPED))
 	 DrawFocusRect( hdc, &rectEdit );
      }
-     
-     if( hPrevFont ) 
+
+     if( hPrevFont )
        SelectObject(hdc, hPrevFont );
    }
    if (pText)
@@ -874,7 +874,7 @@
  */
 static void CBPaintBorder(
   HWND        hwnd,
-  LPHEADCOMBO lphc,   
+  LPHEADCOMBO lphc,
   HDC         hdc)
 {
   RECT clientRect;
@@ -937,7 +937,7 @@
   /*
    * Catch errors.
    */
-  if( !hBkgBrush ) 
+  if( !hBkgBrush )
     hBkgBrush = GetSysColorBrush(COLOR_WINDOW);
 
   return hBkgBrush;
@@ -947,7 +947,7 @@
  *           COMBO_EraseBackground
  */
 static LRESULT COMBO_EraseBackground(
-  HWND        hwnd, 
+  HWND        hwnd,
   LPHEADCOMBO lphc,
   HDC         hParamDC)
 {
@@ -956,14 +956,14 @@
 
   if(lphc->wState & CBF_EDIT)
       return TRUE;
-  
+
   hDC = (hParamDC) ? hParamDC
 		   : GetDC(hwnd);
   /*
    * Retrieve the background brush
    */
   hBkgBrush = COMBO_PrepareColors(lphc, hDC);
-  
+
   FillRect(hDC, &lphc->textRect, hBkgBrush);
 
   if (!hParamDC)
@@ -979,7 +979,7 @@
 {
   PAINTSTRUCT ps;
   HDC 	hDC;
-  
+
   hDC = (hParamDC) ? hParamDC
 		   : BeginPaint( lphc->self, &ps);
 
@@ -1019,7 +1019,7 @@
 
           FrameRect( hDC, &rPadEdit, GetSysColorBrush(COLOR_WINDOW) );
       }
- 
+
       if( !(lphc->wState & CBF_EDIT) )
       {
 	/*
@@ -1028,8 +1028,8 @@
 	if (TWEAK_WineLook == WIN31_LOOK)
 	{
 	  HPEN hPrevPen = SelectObject( hDC, SYSCOLOR_GetPen(COLOR_WINDOWFRAME) );
-	  
-	  Rectangle( hDC, 
+
+	  Rectangle( hDC,
 		     lphc->textRect.left, lphc->textRect.top,
 		     lphc->textRect.right - 1, lphc->textRect.bottom - 1);
 
@@ -1043,7 +1043,7 @@
 	SelectObject( hDC, hPrevBrush );
   }
 
-  if( !hParamDC ) 
+  if( !hParamDC )
     EndPaint(lphc->self, &ps);
 
   return 0;
@@ -1058,11 +1058,11 @@
 {
    INT	length, idx;
    LPWSTR pText = NULL;
-   
+
    idx = LB_ERR;
    length = SendMessageW( lphc->hWndEdit, WM_GETTEXTLENGTH, 0, 0 );
 
-   if( length > 0 ) 
+   if( length > 0 )
        pText = HeapAlloc( GetProcessHeap(), 0, (length + 1) * sizeof(WCHAR));
 
    TRACE("\t edit text length %i\n", length );
@@ -1124,7 +1124,7 @@
 
 /***********************************************************************
  *           CBDropDown
- * 
+ *
  * Show listbox popup.
  */
 static void CBDropDown( LPHEADCOMBO lphc )
@@ -1159,7 +1159,7 @@
 
    /* now set popup position */
    GetWindowRect( lphc->self, &rect );
-   
+
    /*
     * If it's a dropdown, the listbox is offset
     */
@@ -1193,14 +1193,14 @@
    if( (rect.bottom + nDroppedHeight) >= GetSystemMetrics( SM_CYSCREEN ) )
       rect.bottom = rect.top - nDroppedHeight;
 
-   SetWindowPos( lphc->hWndLBox, HWND_TOP, rect.left, rect.bottom, 
+   SetWindowPos( lphc->hWndLBox, HWND_TOP, rect.left, rect.bottom,
 		 lphc->droppedRect.right - lphc->droppedRect.left,
 		 nDroppedHeight,
 		 SWP_NOACTIVATE | SWP_SHOWWINDOW);
 
 
    if( !(lphc->wState & CBF_NOREDRAW) )
-     RedrawWindow( lphc->self, NULL, 0, RDW_INVALIDATE | 
+     RedrawWindow( lphc->self, NULL, 0, RDW_INVALIDATE |
 			   RDW_ERASE | RDW_UPDATENOW | RDW_NOCHILDREN );
 
    EnableWindow( lphc->hWndLBox, TRUE );
@@ -1217,7 +1217,7 @@
 {
    HWND	hWnd = lphc->self;
 
-   TRACE("[%04x]: sel ok? [%i] dropped? [%i]\n", 
+   TRACE("[%04x]: sel ok? [%i] dropped? [%i]\n",
 	 lphc->self, (INT)ok, (INT)(lphc->wState & CBF_DROPPED));
 
    CB_NOTIFY( lphc, (ok) ? CBN_SELENDOK : CBN_SELENDCANCEL );
@@ -1225,7 +1225,7 @@
    if( IsWindow( hWnd ) && CB_GETTYPE(lphc) != CBS_SIMPLE )
    {
 
-       if( lphc->wState & CBF_DROPPED ) 
+       if( lphc->wState & CBF_DROPPED )
        {
 	   RECT	rect;
 
@@ -1241,7 +1241,7 @@
 	   {
 	       rect = lphc->buttonRect;
 	   }
-	   else 
+	   else
            {
 	       if( bButton )
 	       {
@@ -1256,7 +1256,7 @@
 	   }
 
 	   if( bButton && !(lphc->wState & CBF_NOREDRAW) )
-	       RedrawWindow( hWnd, &rect, 0, RDW_INVALIDATE | 
+	       RedrawWindow( hWnd, &rect, 0, RDW_INVALIDATE |
 			       RDW_ERASE | RDW_UPDATENOW | RDW_NOCHILDREN );
 	   CB_NOTIFY( lphc, CBN_CLOSEUP );
        }
@@ -1347,10 +1347,10 @@
        /* ">> 8" makes gcc generate jump-table instead of cmp ladder */
 
        switch( HIWORD(wParam) >> 8 )
-       {   
+       {
 	   case (EN_SETFOCUS >> 8):
 
-		TRACE("[%04x]: edit [%04x] got focus\n", 
+		TRACE("[%04x]: edit [%04x] got focus\n",
 			     lphc->self, lphc->hWndEdit );
 
 		COMBO_SetFocus( lphc );
@@ -1363,7 +1363,7 @@
 
 		/* NOTE: it seems that Windows' edit control sends an
 		 * undocumented message WM_USER + 0x1B instead of this
-		 * notification (only when it happens to be a part of 
+		 * notification (only when it happens to be a part of
 		 * the combo). ?? - AK.
 		 */
 
@@ -1376,7 +1376,7 @@
 	        * In some circumstances (when the selection of the combobox
 		* is changed for example) we don't wans the EN_CHANGE notification
 		* to be forwarded to the parent of the combobox. This code
-		* checks a flag that is set in these occasions and ignores the 
+		* checks a flag that is set in these occasions and ignores the
 		* notification.
 	        */
 		if (lphc->wState & CBF_NOLBSELECT)
@@ -1416,7 +1416,7 @@
 	   case LBN_SELCHANGE:
 	   case LBN_SELCANCEL:
 
-		TRACE("[%04x]: lbox selection change [%04x]\n", 
+		TRACE("[%04x]: lbox selection change [%04x]\n",
 			     lphc->self, lphc->wState );
 
 		if( HIWORD(wParam) == LBN_SELCHANGE)
@@ -1433,7 +1433,7 @@
 		       InvalidateRect(lphc->self, &lphc->textRect, TRUE);
 		}
 
-		/* do not roll up if selection is being tracked 
+		/* do not roll up if selection is being tracked
 		 * by arrowkeys in the dropdown listbox */
                 if( ((lphc->wState & CBF_DROPPED) && !(lphc->wState & CBF_NOROLLUP)) )
                 {
@@ -1595,11 +1595,11 @@
 /***********************************************************************
  *           CBResetPos
  *
- * This function sets window positions according to the updated 
+ * This function sets window positions according to the updated
  * component placement struct.
  */
 static void CBResetPos(
-  LPHEADCOMBO lphc, 
+  LPHEADCOMBO lphc,
   LPRECT      rectEdit,
   LPRECT      rectLB,
   BOOL        bRedraw)
@@ -1610,7 +1610,7 @@
     * sizing messages */
 
    if( lphc->wState & CBF_EDIT )
-     SetWindowPos( lphc->hWndEdit, 0, 
+     SetWindowPos( lphc->hWndEdit, 0,
 		   rectEdit->left, rectEdit->top,
 		   rectEdit->right - rectEdit->left,
 		   rectEdit->bottom - rectEdit->top,
@@ -1618,8 +1618,8 @@
 
    SetWindowPos( lphc->hWndLBox, 0,
 		 rectLB->left, rectLB->top,
-                 rectLB->right - rectLB->left, 
-		 rectLB->bottom - rectLB->top, 
+                 rectLB->right - rectLB->left,
+		 rectLB->bottom - rectLB->top,
 		   SWP_NOACTIVATE | SWP_NOZORDER | ((bDrop) ? SWP_NOREDRAW : 0) );
 
    if( bDrop )
@@ -1643,9 +1643,9 @@
 static void COMBO_Size( LPHEADCOMBO lphc )
   {
   CBCalcPlacement(lphc->self,
-		  lphc, 
-		  &lphc->textRect, 
-		  &lphc->buttonRect, 
+		  lphc,
+		  &lphc->textRect,
+		  &lphc->buttonRect,
 		  &lphc->droppedRect);
 
   CBResetPos( lphc, &lphc->textRect, &lphc->droppedRect, TRUE );
@@ -1675,11 +1675,11 @@
   if ( CB_GETTYPE(lphc) == CBS_SIMPLE)
   {
     CBCalcPlacement(lphc->self,
-		    lphc, 
-		    &lphc->textRect, 
-		    &lphc->buttonRect, 
+		    lphc,
+		    &lphc->textRect,
+		    &lphc->buttonRect,
 		    &lphc->droppedRect);
-    
+
     CBResetPos( lphc, &lphc->textRect, &lphc->droppedRect, TRUE );
   }
   else
@@ -1708,23 +1708,23 @@
 	 if ( CB_GETTYPE(lphc) == CBS_SIMPLE)
 	 {
 	   CBCalcPlacement(lphc->self,
-			   lphc, 
-			   &lphc->textRect, 
-			   &lphc->buttonRect, 
+			   lphc,
+			   &lphc->textRect,
+			   &lphc->buttonRect,
 			   &lphc->droppedRect);
-	   
+
 	   CBResetPos( lphc, &lphc->textRect, &lphc->droppedRect, TRUE );
 	 }
 	 else
 	 {
 	   CBForceDummyResize(lphc);
 	 }
-	 	 
+
 	   lRet = height;
        }
-   } 
+   }
    else if ( CB_OWNERDRAWN(lphc) )	/* set listbox item height */
-	lRet = SendMessageW(lphc->hWndLBox, LB_SETITEMHEIGHT, 
+	lRet = SendMessageW(lphc->hWndLBox, LB_SETITEMHEIGHT,
 			      (WPARAM)index, (LPARAM)height );
    return lRet;
 }
@@ -1833,10 +1833,10 @@
 {
    POINT  pt;
    RECT   lbRect;
-   
+
    pt.x = LOWORD(lParam);
    pt.y = HIWORD(lParam);
-   
+
    if( lphc->wState & CBF_BUTTONDOWN )
    {
      BOOL bButton;
@@ -1878,23 +1878,23 @@
             hwnd, SPY_GetMsgName(message, hwnd), wParam, lParam );
 
       if( lphc || message == WM_NCCREATE )
-      switch(message) 
-      {	
+      switch(message)
+      {
 
 	/* System messages */
 
-     	case WM_NCCREATE: 
+     	case WM_NCCREATE:
 	{
 		LONG style = unicode ? ((LPCREATESTRUCTW)lParam)->style :
 				       ((LPCREATESTRUCTA)lParam)->style;
                 return COMBO_NCCreate(hwnd, style);
 	}
-     	case WM_NCDESTROY: 
+     	case WM_NCDESTROY:
 		COMBO_NCDestroy(lphc);
 		break;/* -> DefWindowProc */
 
-     	case WM_CREATE: 
-	{ 
+     	case WM_CREATE:
+	{
 		HWND hwndParent;
 		LONG style;
 		if(unicode)
@@ -1942,7 +1942,7 @@
          */
         /* fall through */
 	case WM_SIZE:
-	        if( lphc->hWndLBox && 
+	        if( lphc->hWndLBox &&
 		  !(lphc->wState & CBF_NORESIZE) ) COMBO_Size( lphc );
 		return  TRUE;
 	case WM_SETFONT:
@@ -1977,7 +1977,7 @@
                 if (j == -1) return 0;
                 return SendMessageW(lphc->hWndLBox, LB_GETTEXTLEN, j, 0);
                 }
-		else if( lphc->wState & CBF_EDIT ) 
+		else if( lphc->wState & CBF_EDIT )
 		{
 		    LRESULT ret;
 		    lphc->wState |= CBF_NOEDITNOTIFY;
@@ -1990,7 +1990,7 @@
 	case WM_CUT:
         case WM_PASTE:
 	case WM_COPY:
-		if( lphc->wState & CBF_EDIT ) 
+		if( lphc->wState & CBF_EDIT )
 		{
 		    return unicode ? SendMessageW(lphc->hWndEdit, message, wParam, lParam) :
 				     SendMessageA(lphc->hWndEdit, message, wParam, lParam);
@@ -2004,7 +2004,7 @@
 		return COMBO_ItemOp(lphc, message, lParam);
 	case WM_ENABLE:
 		if( lphc->wState & CBF_EDIT )
-		    EnableWindow( lphc->hWndEdit, (BOOL)wParam ); 
+		    EnableWindow( lphc->hWndEdit, (BOOL)wParam );
 		EnableWindow( lphc->hWndLBox, (BOOL)wParam );
 
 		/* Force the control to repaint when the enabled state changes. */
@@ -2046,15 +2046,15 @@
 		return unicode ? SendMessageW(hwndTarget, message, wParam, lParam) :
 				 SendMessageA(hwndTarget, message, wParam, lParam);
 	}
-	case WM_LBUTTONDOWN: 
+	case WM_LBUTTONDOWN:
 		if( !(lphc->wState & CBF_FOCUSED) ) SetFocus( lphc->self );
 		if( lphc->wState & CBF_FOCUSED ) COMBO_LButtonDown( lphc, lParam );
 		return  TRUE;
 	case WM_LBUTTONUP:
 		COMBO_LButtonUp( lphc );
 		return  TRUE;
-	case WM_MOUSEMOVE: 
-		if( lphc->wState & CBF_CAPTURE ) 
+	case WM_MOUSEMOVE:
+		if( lphc->wState & CBF_CAPTURE )
 		    COMBO_MouseMove( lphc, wParam, lParam );
 		return  TRUE;
 
@@ -2117,7 +2117,7 @@
 		if( (INT)wParam >= 0 )	/* listbox item */
                     return SendMessageW(lphc->hWndLBox, LB_GETITEMHEIGHT, wParam, 0);
                 return  CBGetTextAreaHeight(hwnd, lphc);
-	case CB_RESETCONTENT16: 
+	case CB_RESETCONTENT16:
 	case CB_RESETCONTENT:
 		SendMessageW(lphc->hWndLBox, LB_RESETCONTENT, 0, 0);
                 if( (lphc->wState & CBF_EDIT) && CB_HASSTRINGS(lphc) )
@@ -2150,7 +2150,7 @@
 		return  CB_ERR;
 	case CB_GETDROPPEDCONTROLRECT16:
 		lParam = (LPARAM)MapSL(lParam);
-		if( lParam ) 
+		if( lParam )
 		{
 		    RECT	r;
 		    CBGetDroppedControlRect( lphc, &r );
@@ -2163,7 +2163,7 @@
 	case CB_GETDROPPEDSTATE16:
 	case CB_GETDROPPEDSTATE:
 		return  (lphc->wState & CBF_DROPPED) ? TRUE : FALSE;
-	case CB_DIR16: 
+	case CB_DIR16:
                 lParam = (LPARAM)MapSL(lParam);
 		message = LB_DIR16;
                 /* fall through */
@@ -2181,15 +2181,15 @@
 			if( !(lphc->wState & CBF_DROPPED) )
 			    CBDropDown( lphc );
 		    }
-		    else 
-			if( lphc->wState & CBF_DROPPED ) 
+		    else
+			if( lphc->wState & CBF_DROPPED )
 		            CBRollUp( lphc, FALSE, TRUE );
 		}
 		return  TRUE;
-	case CB_GETCOUNT16: 
+	case CB_GETCOUNT16:
 	case CB_GETCOUNT:
 		return SendMessageW(lphc->hWndLBox, LB_GETCOUNT, 0, 0);
-	case CB_GETCURSEL16: 
+	case CB_GETCURSEL16:
 	case CB_GETCURSEL:
 		return SendMessageW(lphc->hWndLBox, LB_GETCURSEL, 0, 0);
 	case CB_SETCURSEL16:
@@ -2207,14 +2207,14 @@
 		    InvalidateRect(lphc->self, &lphc->textRect, TRUE);
 		lphc->wState &= ~CBF_SELCHANGE;
 	        return  lParam;
-	case CB_GETLBTEXT16: 
+	case CB_GETLBTEXT16:
 		wParam = (INT)(INT16)wParam;
 		lParam = (LPARAM)MapSL(lParam);
 		/* fall through */
 	case CB_GETLBTEXT:
 		return unicode ? SendMessageW(lphc->hWndLBox, LB_GETTEXT, wParam, lParam) :
 				 SendMessageA(lphc->hWndLBox, LB_GETTEXT, wParam, lParam);
-	case CB_GETLBTEXTLEN16: 
+	case CB_GETLBTEXTLEN16:
 		wParam = (INT)(INT16)wParam;
 		/* fall through */
 	case CB_GETLBTEXTLEN:
@@ -2229,7 +2229,7 @@
 		/* fall through */
 	case CB_SETITEMDATA:
 		return SendMessageW(lphc->hWndLBox, LB_SETITEMDATA, wParam, lParam);
-	case CB_GETEDITSEL16: 
+	case CB_GETEDITSEL16:
 		wParam = lParam = 0;   /* just in case */
 		/* fall through */
 	case CB_GETEDITSEL:
@@ -2237,9 +2237,9 @@
 		if( lphc->wState & CBF_EDIT )
 		    return SendMessageW(lphc->hWndEdit, EM_GETSEL, wParam, lParam);
 		return  CB_ERR;
-	case CB_SETEDITSEL16: 
+	case CB_SETEDITSEL16:
 	case CB_SETEDITSEL:
-		if( lphc->wState & CBF_EDIT ) 
+		if( lphc->wState & CBF_EDIT )
                     return SendMessageW(lphc->hWndEdit, EM_SETSEL,
 			  (INT)(INT16)LOWORD(lParam), (INT)(INT16)HIWORD(lParam) );
 		return  CB_ERR;
diff --git a/controls/desktop.c b/controls/desktop.c
index 73f00ea..f3df7b0 100644
--- a/controls/desktop.c
+++ b/controls/desktop.c
@@ -91,7 +91,7 @@
     _lclose( file );
     fileHeader = (BITMAPFILEHEADER *)buffer;
     bitmapInfo = (BITMAPINFO *)(buffer + sizeof(BITMAPFILEHEADER));
-    
+
       /* Check header content */
     if ((fileHeader->bfType != 0x4d42) || (size < fileHeader->bfSize))
     {
diff --git a/controls/edit.c b/controls/edit.c
index d2be39e..2209a15 100644
--- a/controls/edit.c
+++ b/controls/edit.c
@@ -214,7 +214,7 @@
 static void	EDIT_MoveWordForward(HWND hwnd, EDITSTATE *es, BOOL extend);
 static void	EDIT_PaintLine(HWND hwnd, EDITSTATE *es, HDC hdc, INT line, BOOL rev);
 static INT	EDIT_PaintText(EDITSTATE *es, HDC hdc, INT x, INT y, INT line, INT col, INT count, BOOL rev);
-static void	EDIT_SetCaretPos(HWND hwnd, EDITSTATE *es, INT pos, BOOL after_wrap); 
+static void	EDIT_SetCaretPos(HWND hwnd, EDITSTATE *es, INT pos, BOOL after_wrap);
 static void	EDIT_SetRectNP(HWND hwnd, EDITSTATE *es, LPRECT lprc);
 static void	EDIT_UnlockBuffer(HWND hwnd, EDITSTATE *es, BOOL force);
 static void	EDIT_UpdateScrollInfo(HWND hwnd, EDITSTATE *es);
@@ -357,16 +357,16 @@
  *
  * Returns the window version in case Wine emulates a later version
  * of windows then the application expects.
- * 
+ *
  * In a number of cases when windows runs an application that was
  * designed for an earlier windows version, windows reverts
  * to "old" behaviour of that earlier version.
- * 
- * An example is a disabled  edit control that needs to be painted. 
- * Old style behaviour is to send a WM_CTLCOLOREDIT message. This was 
- * changed in Win95, NT4.0 by a WM_CTLCOLORSTATIC message _only_ for 
+ *
+ * An example is a disabled  edit control that needs to be painted.
+ * Old style behaviour is to send a WM_CTLCOLOREDIT message. This was
+ * changed in Win95, NT4.0 by a WM_CTLCOLORSTATIC message _only_ for
  * applications with an expected version 0f 4.0 or higher.
- * 
+ *
  */
 static DWORD get_app_version(void)
 {
@@ -382,7 +382,7 @@
         dwEmulatedVersion = MAKELONG( info.dwMinorVersion, info.dwMajorVersion );
         /* FIXME: this may not be 100% correct; see discussion on the
          * wine developer list in Nov 1999 */
-        version = dwProcVersion < dwEmulatedVersion ? dwProcVersion : dwEmulatedVersion; 
+        version = dwProcVersion < dwEmulatedVersion ? dwProcVersion : dwEmulatedVersion;
     }
     return version;
 }
@@ -1002,8 +1002,8 @@
 		result = EDIT_WM_LButtonUp(hwnd, es);
 		break;
 
-	case WM_MBUTTONDOWN:                        
-  		DPRINTF_EDIT_MSG32("WM_MBUTTONDOWN");    
+	case WM_MBUTTONDOWN:
+  		DPRINTF_EDIT_MSG32("WM_MBUTTONDOWN");
   		result = EDIT_WM_MButtonDown(hwnd);
 		break;
 
@@ -1065,7 +1065,7 @@
 		DPRINTF_EDIT_MSG32("WM_STYLECHANGED");
                 result = EDIT_WM_StyleChanged (hwnd, es, wParam, (const STYLESTRUCT *)lParam);
                 break;
-               
+
         case WM_STYLECHANGING:
 		DPRINTF_EDIT_MSG32("WM_STYLECHANGING");
                 result = 0; /* See EDIT_WM_StyleChanged */
@@ -1173,11 +1173,11 @@
 	/* Find starting line. istart must lie inside an existing line or
 	 * at the end of buffer */
 	do {
-		if (istart < current_line->index + current_line->length || 
+		if (istart < current_line->index + current_line->length ||
 				current_line->ending == END_0)
 			break;
-		
-		previous_line = current_line;	
+
+		previous_line = current_line;
 		current_line = current_line->next;
 		line_index++;
 	} while (current_line);
@@ -1208,7 +1208,7 @@
 		{
 			if (!current_line || current_line->index + delta > current_position - es->text)
 			{
-				/* The buffer has been expanded, create a new line and 
+				/* The buffer has been expanded, create a new line and
 				   insert it into the link list */
 				LINEDEF *new_line = HeapAlloc(GetProcessHeap(), 0, sizeof(LINEDEF));
 				new_line->next = previous_line->next;
@@ -1288,15 +1288,15 @@
 					prev = 1;
 			}
 
-			/* If the first line we are calculating, wrapped before istart, we must 
+			/* If the first line we are calculating, wrapped before istart, we must
 			 * adjust istart in order for this to be reflected in the update region. */
 			if (current_line->index == nstart_index && istart > current_line->index + prev)
 				istart = current_line->index + prev;
 			/* else if we are updating the previous line before the first line we
 			 * are re-calculating and it expanded */
-			else if (current_line == start_line && 
+			else if (current_line == start_line &&
 					current_line->index != nstart_index && orig_net_length < prev)
-			{ 
+			{
 			  /* Line expanded due to an upwards line wrap so we must partially include
 			   * previous line in update region */
 				nstart_line = line_index;
@@ -1361,16 +1361,16 @@
 	if (hrgn)
 	{
 		HRGN tmphrgn;
-	   /* 
+	   /*
 		* We calculate two rectangles. One for the first line which may have
 		* an indent with respect to the format rect. The other is a format-width
 		* rectangle that spans the rest of the lines that changed or moved.
 		*/
-		rc.top = es->format_rect.top + nstart_line * es->line_height - 
+		rc.top = es->format_rect.top + nstart_line * es->line_height -
 			(es->y_offset * es->line_height); /* Adjust for vertical scrollbar */
 		rc.bottom = rc.top + es->line_height;
-		rc.left = es->format_rect.left + (INT)LOWORD(GetTabbedTextExtentW(dc, 
-					es->text + nstart_index, istart - nstart_index, 
+		rc.left = es->format_rect.left + (INT)LOWORD(GetTabbedTextExtentW(dc,
+					es->text + nstart_index, istart - nstart_index,
 					es->tabs_count, es->tabs)) - es->x_offset; /* Adjust for horz scroll */
 		rc.right = es->format_rect.right;
 		SetRectRgn(hrgn, rc.left, rc.top, rc.right, rc.bottom);
@@ -1378,9 +1378,9 @@
 		rc.top = rc.bottom;
 		rc.left = es->format_rect.left;
 		rc.right = es->format_rect.right;
-	   /* 
-		* If lines were added or removed we must re-paint the remainder of the 
-	    * lines since the remaining lines were either shifted up or down. 
+	   /*
+		* If lines were added or removed we must re-paint the remainder of the
+	    * lines since the remaining lines were either shifted up or down.
 		*/
 		if (line_count < es->line_count) /* We added lines */
 			rc.bottom = es->line_count * es->line_height;
@@ -2083,7 +2083,7 @@
  *	Move the caret one line up, on a column with the nearest
  *	x coordinate on the screen (might be a different column).
  *
- */ 
+ */
 static void EDIT_MoveUp_ML(HWND hwnd, EDITSTATE *es, BOOL extend)
 {
 	INT s = es->selection_start;
@@ -2533,7 +2533,7 @@
  *	EM_CHARFROMPOS
  *
  *      returns line number (not index) in high-order word of result.
- *      NB : Q137805 is unclear about this. POINT * pointer in lParam apply 
+ *      NB : Q137805 is unclear about this. POINT * pointer in lParam apply
  *      to Richedit, not to the edit control. Original documentation is valid.
  *	FIXME: do the specs mean to return -1 if outside client area or
  *		if outside formatting rectangle ???
@@ -3104,7 +3104,7 @@
 		INT s = min(es->selection_start, es->selection_end);
 
 		hrgn = CreateRectRgn(0, 0, 0, 0);
-		EDIT_BuildLineDefs_ML(hwnd, es, s, s + strl, 
+		EDIT_BuildLineDefs_ML(hwnd, es, s, s + strl,
 				strl - abs(es->selection_end - es->selection_start), hrgn);
 	}
 	else
@@ -3114,7 +3114,7 @@
 	es->flags |= EF_MODIFIED;
 	if (send_update) es->flags |= EF_UPDATE;
 	EDIT_EM_ScrollCaret(hwnd, es);
-	
+
 	/* force scroll info update */
 	EDIT_UpdateScrollInfo(hwnd, es);
 
@@ -3431,7 +3431,7 @@
 /*********************************************************************
  *
  *	EM_SETMARGINS
- * 
+ *
  * EC_USEFONTINFO is used as a left or right value i.e. lParam and not as an
  * action wParam despite what the docs say. EC_USEFONTINFO means one third
  * of the char's width, according to the new docs.
@@ -3521,11 +3521,11 @@
 	if (end != old_start)
         {
 /*
- * One can also do 
+ * One can also do
  *          ORDER_UINT32(end, old_start);
  *          EDIT_InvalidateText(hwnd, es, start, end);
  *          EDIT_InvalidateText(hwnd, es, old_start, old_end);
- * in place of the following if statement.                          
+ * in place of the following if statement.
  */
             if (old_start > end )
             {
@@ -3723,7 +3723,7 @@
 	case 0x18: /* ^X */
 		SendMessageW(hwnd, WM_CUT, 0, 0);
 		break;
-	
+
 	default:
 		if (!(es->style & ES_READONLY) && (c >= ' ') && (c != 127)) {
 			WCHAR str[2];
@@ -4273,7 +4273,7 @@
 		DWORD dw = SendMessageW( hwndParent, DM_GETDEFID, 0, 0 );
 		if (HIWORD(dw) == DC_HASDEFID)
 		{
-		    SendMessageW( hwndParent, WM_COMMAND, 
+		    SendMessageW( hwndParent, WM_COMMAND,
 				  MAKEWPARAM( LOWORD(dw), BN_CLICKED ),
  			      (LPARAM)GetDlgItem( hwndParent, LOWORD(dw) ) );
 		}
@@ -4376,8 +4376,8 @@
  *
  */
 static LRESULT EDIT_WM_MButtonDown(HWND hwnd)
-{  
-    SendMessageW(hwnd,WM_PASTE,0,0);  
+{
+    SendMessageW(hwnd,WM_PASTE,0,0);
     return 0;
 }
 
@@ -4507,10 +4507,10 @@
 	es->line_count = 1;
 
 	/*
-	 * In Win95 look and feel, the WS_BORDER style is replaced by the 
-	 * WS_EX_CLIENTEDGE style for the edit control. This gives the edit 
+	 * In Win95 look and feel, the WS_BORDER style is replaced by the
+	 * WS_EX_CLIENTEDGE style for the edit control. This gives the edit
 	 * control a non client area.  Not always.  This coordinates in some
-         * way with the window creation code in dialog.c  When making 
+         * way with the window creation code in dialog.c  When making
          * modifications please ensure that the code still works for edit
          * controls created directly with style 0x50800000, exStyle 0 (
          * which should have a single pixel border)
@@ -4643,7 +4643,7 @@
  *
  *	WM_SETFONT
  *
- * With Win95 look the margins are set to default font value unless 
+ * With Win95 look the margins are set to default font value unless
  * the system font (font == 0) is being set, in which case they are left
  * unchanged.
  *
@@ -4773,7 +4773,7 @@
  *
  * It appears that the Windows version of the edit control allows the style
  * (as retrieved by GetWindowLong) to be any value and maintains an internal
- * style variable which will generally be different.  In this function we 
+ * style variable which will generally be different.  In this function we
  * update the internal style based on what changed in the externally visible
  * style.
  *
@@ -4795,7 +4795,7 @@
                  */
                 style_change_mask = ES_UPPERCASE | ES_LOWERCASE |
                                     ES_NUMBER;
-                if (es->style & ES_MULTILINE) 
+                if (es->style & ES_MULTILINE)
                         style_change_mask |= ES_WANTRETURN;
 
                 new_style = style->styleNew & style_change_mask;
@@ -4809,7 +4809,7 @@
                 }  else if (new_style & ES_LOWERCASE) {
                         new_style &= ~ES_UPPERCASE;
                 }
-        
+
                 es->style = (es->style & ~style_change_mask) | new_style;
         } else if (GWL_EXSTYLE == which) {
                 ; /* FIXME - what is needed here */
diff --git a/controls/icontitle.c b/controls/icontitle.c
index afe7dc5..e24bb3f 100644
--- a/controls/icontitle.c
+++ b/controls/icontitle.c
@@ -142,10 +142,10 @@
 	hBrush = GetSysColorBrush(COLOR_ACTIVECAPTION);
 	textColor = GetSysColor(COLOR_CAPTIONTEXT);
     }
-    else 
+    else
     {
         if( GetWindowLongA( hwnd, GWL_STYLE ) & WS_CHILD )
-	{ 
+	{
 	    hBrush = (HBRUSH) GetClassLongA(hwnd, GCL_HBRBACKGROUND);
 	    if( hBrush )
 	    {
@@ -164,7 +164,7 @@
 	else
 	{
 	    hBrush = GetStockObject( BLACK_BRUSH );
-	    textColor = RGB( 0xFF, 0xFF, 0xFF );    
+	    textColor = RGB( 0xFF, 0xFF, 0xFF );
 	}
     }
 
diff --git a/controls/listbox.c b/controls/listbox.c
index e5667cd..951f548 100644
--- a/controls/listbox.c
+++ b/controls/listbox.c
@@ -253,12 +253,12 @@
     if (!(descr->style & WS_VSCROLL)) return;
     */
 
-    /*   It is important that we check descr->style, and not wnd->dwStyle, 
-       for WS_VSCROLL, as the former is exactly the one passed in 
-       argument to CreateWindow.  
-         In Windows (and from now on in Wine :) a listbox created 
-       with such a style (no WS_SCROLL) does not update 
-       the scrollbar with listbox-related data, thus letting 
+    /*   It is important that we check descr->style, and not wnd->dwStyle,
+       for WS_VSCROLL, as the former is exactly the one passed in
+       argument to CreateWindow.
+         In Windows (and from now on in Wine :) a listbox created
+       with such a style (no WS_SCROLL) does not update
+       the scrollbar with listbox-related data, thus letting
        the programmer use it for his/her own purposes. */
 
     if (descr->style & LBS_NOREDRAW) return;
@@ -1416,7 +1416,7 @@
 
     /* Important, repaint needs to be done in this order if
        you want to mimic Windows behavior:
-       1. Remove the focus and paint the item  
+       1. Remove the focus and paint the item
        2. Remove the selection and paint the item(s)
        3. Set the selection and repaint the item(s)
        4. Set the focus to 'index' and repaint the item */
@@ -2089,7 +2089,7 @@
                     nHitTestType = HTHSCROLL;
                 }
             }
-            /* Windows sends this message when a scrollbar is clicked 
+            /* Windows sends this message when a scrollbar is clicked
              */
 
             if(nHitTestType != 0)
@@ -2097,7 +2097,7 @@
                 SendMessageW(hwnd, WM_NCLBUTTONDOWN, nHitTestType,
                     MAKELONG(screenMousePos.x, screenMousePos.y));
             }
-            /* Resume the Capture after scrolling is complete 
+            /* Resume the Capture after scrolling is complete
              */
             if(hWndOldCapture != 0)
             {
@@ -3196,7 +3196,7 @@
 /***********************************************************************
  *           ComboLBWndProcA
  *
- *  NOTE: in Windows, winproc address of the ComboLBox is the same 
+ *  NOTE: in Windows, winproc address of the ComboLBox is the same
  *	  as that of the Listbox.
  */
 LRESULT WINAPI ComboLBWndProcA( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam )
diff --git a/controls/menu.c b/controls/menu.c
index f5a6683..949d71b 100644
--- a/controls/menu.c
+++ b/controls/menu.c
@@ -169,7 +169,7 @@
 static HMENU MENU_DefSysPopup = 0;  /* Default system menu popup */
 
 /* Use global popup window because there's no way 2 menus can
- * be tracked at the same time.  */ 
+ * be tracked at the same time.  */
 static HWND top_popup;
 
   /* Flag set by EndMenu() to force an exit from menu tracking */
@@ -210,7 +210,7 @@
     if (flags & (bit)) { flags &= ~(bit); MENUOUT ((text)); } \
   } while (0)
 
-static void do_debug_print_menuitem(const char *prefix, MENUITEM * mp, 
+static void do_debug_print_menuitem(const char *prefix, MENUITEM * mp,
 				    const char *postfix)
 {
     TRACE("%s ", prefix);
@@ -298,7 +298,7 @@
     POPUPMENU *menu = USER_HEAP_LIN_ADDR(hMenu);
     if (!menu || menu->wMagic != MENU_MAGIC)
     {
-        WARN("invalid menu handle=%x, ptr=%p, magic=%x\n", hMenu, menu, menu? menu->wMagic:0); 
+        WARN("invalid menu handle=%x, ptr=%p, magic=%x\n", hMenu, menu, menu? menu->wMagic:0);
         menu = NULL;
     }
     return menu;
@@ -349,8 +349,8 @@
  *
  * Create a copy of the system menu. System menu in Windows is
  * a special menu bar with the single entry - system menu popup.
- * This popup is presented to the outside world as a "system menu". 
- * However, the real system menu handle is sometimes seen in the 
+ * This popup is presented to the outside world as a "system menu".
+ * However, the real system menu handle is sometimes seen in the
  * WM_MENUSELECT parameters (and Word 6 likes it this way).
  */
 HMENU MENU_GetSysMenu( HWND hWnd, HMENU hPopupMenu )
@@ -365,7 +365,7 @@
 
 	if (hPopupMenu == (HMENU)(-1))
 	    hPopupMenu = MENU_CopySysPopup();
-	else if( !hPopupMenu ) hPopupMenu = MENU_DefSysPopup; 
+	else if( !hPopupMenu ) hPopupMenu = MENU_DefSysPopup;
 
 	if (hPopupMenu)
 	{
@@ -414,12 +414,12 @@
     } else
 	return FALSE;
 
-    if (! (hBitmap = CreateBitmap( 8, 8, 1, 1, shade_bits))) 
+    if (! (hBitmap = CreateBitmap( 8, 8, 1, 1, shade_bits)))
 	return FALSE;
 
-    if(!(hShadeBrush = CreatePatternBrush( hBitmap ))) 
+    if(!(hShadeBrush = CreatePatternBrush( hBitmap )))
 	return FALSE;
-	
+
     DeleteObject( hBitmap );
     if (!(MENU_DefSysPopup = MENU_CopySysPopup()))
 	return FALSE;
@@ -427,7 +427,7 @@
     ncm.cbSize = sizeof (NONCLIENTMETRICSA);
     if (!(SystemParametersInfoA(SPI_GETNONCLIENTMETRICS, sizeof(NONCLIENTMETRICSA), &ncm, 0)))
 	return FALSE;
-	
+
     if (!(hMenuFont = CreateFontIndirectA( &ncm.lfMenuFont )))
 	return FALSE;
 
@@ -582,7 +582,7 @@
 /***********************************************************************
  *           MENU_FindSubMenu
  *
- * Find a Sub menu. Return the position of the submenu, and modifies 
+ * Find a Sub menu. Return the position of the submenu, and modifies
  * *hmenu in case it is found in another sub-menu.
  * If the submenu cannot be found, NO_SELECTED_ITEM is returned.
  */
@@ -591,8 +591,8 @@
     POPUPMENU *menu;
     UINT i;
     MENUITEM *item;
-    if (((*hmenu)==0xffff) || 
-            (!(menu = MENU_GetMenu(*hmenu)))) 
+    if (((*hmenu)==0xffff) ||
+            (!(menu = MENU_GetMenu(*hmenu))))
         return NO_SELECTED_ITEM;
     item = menu->items;
     for (i = 0; i < menu->nItems; i++, item++) {
@@ -625,11 +625,11 @@
 /***********************************************************************
  *           MENU_FindItemByCoords
  *
- * Find the item at the specified coordinates (screen coords). Does 
- * not work for child windows and therefore should not be called for 
+ * Find the item at the specified coordinates (screen coords). Does
+ * not work for child windows and therefore should not be called for
  * an arbitrary system menu.
  */
-static MENUITEM *MENU_FindItemByCoords( POPUPMENU *menu, 
+static MENUITEM *MENU_FindItemByCoords( POPUPMENU *menu,
 					POINT pt, UINT *pos )
 {
     MENUITEM *item;
@@ -658,7 +658,7 @@
  * Find the menu item selected by a key press.
  * Return item id, -1 if none, -2 if we should close the menu.
  */
-static UINT MENU_FindItemByKey( HWND hwndOwner, HMENU hmenu, 
+static UINT MENU_FindItemByKey( HWND hwndOwner, HMENU hmenu,
 				  UINT key, BOOL forceMenuChar )
 {
     TRACE("\tlooking for '%c' in [%04x]\n", (char)key, (UINT16)hmenu );
@@ -690,7 +690,7 @@
 		}
 	     }
 	}
-	menuchar = SendMessageA( hwndOwner, WM_MENUCHAR, 
+	menuchar = SendMessageA( hwndOwner, WM_MENUCHAR,
                                    MAKEWPARAM( key, menu->wFlags ), hmenu );
 	if (HIWORD(menuchar) == 2) return LOWORD(menuchar);
 	if (HIWORD(menuchar) == 1) return (UINT)(-2);
@@ -853,7 +853,7 @@
     UINT check_bitmap_width = GetSystemMetrics( SM_CXMENUCHECK );
 
     TRACE("dc=0x%04x owner=0x%04x (%d,%d)\n", hdc, hwndOwner, orgX, orgY);
-    debug_print_menuitem("MENU_CalcItemSize: menuitem:", lpitem, 
+    debug_print_menuitem("MENU_CalcItemSize: menuitem:", lpitem,
 			 (menuBar ? " (MenuBar)" : ""));
 
     SetRect( &lpitem->rect, orgX, orgY, orgX, orgY );
@@ -880,7 +880,7 @@
  	if (menuBar)
 	{
 	     lpitem->rect.right += MENU_BAR_ITEMS_SPACE;
-	
+
 
              /* under at least win95 you seem to be given a standard
                 height for the menu and the height value is ignored */
@@ -892,11 +892,11 @@
         }
         else
             lpitem->rect.bottom += mis.itemHeight;
-	
+
 	TRACE("id=%04x size=%dx%d\n",
                      lpitem->wID, mis.itemWidth, mis.itemHeight);
         /* Fall through to get check/arrow width calculation. */
-    } 
+    }
 
     if (lpitem->fType & MF_SEPARATOR)
     {
@@ -928,14 +928,14 @@
             lpitem->rect.bottom += 2;
         }
     }
-    
+
 
     /* it must be a text item - unless it's the system menu */
     if (!(lpitem->fType & MF_SYSMENU) && IS_STRING_ITEM( lpitem->fType ))
     {   SIZE size;
 
 	GetTextExtentPoint32W(hdc, lpitem->text,  strlenW(lpitem->text), &size);
-	
+
 	lpitem->rect.right  += size.cx;
 	if (TWEAK_WineLook == WIN31_LOOK)
 	    lpitem->rect.bottom += max( size.cy, GetSystemMetrics(SM_CYMENU) );
@@ -958,7 +958,7 @@
 	{
 	    if (strchrW( lpitem->text, '\b' ))
 	        lpitem->rect.right += MENU_TAB_SPACE;
-	    lpitem->xTab = lpitem->rect.right - check_bitmap_width 
+	    lpitem->xTab = lpitem->rect.right - check_bitmap_width
 	                   - arrow_bitmap_width;
 	}
     }
@@ -983,7 +983,7 @@
     hdc = GetDC( 0 );
 
     SelectObject( hdc, hMenuFont);
-    
+
     start = 0;
     maxX = (TWEAK_WineLook == WIN31_LOOK) ? GetSystemMetrics(SM_CXBORDER) : 2+1 ;
 
@@ -1020,7 +1020,7 @@
 	    lpitem->rect.right = maxX;
 	    if (IS_STRING_ITEM(lpitem->fType) && lpitem->xTab)
 		lpitem->xTab = maxTab;
-	
+
 	}
 	lppop->Height = max( lppop->Height, orgY );
     }
@@ -1055,7 +1055,7 @@
 
     if ((lprect == NULL) || (lppop == NULL)) return;
     if (lppop->nItems == 0) return;
-    TRACE("left=%d top=%d right=%d bottom=%d\n", 
+    TRACE("left=%d top=%d right=%d bottom=%d\n",
                  lprect->left, lprect->top, lprect->right, lprect->bottom);
     lppop->Width  = lprect->right - lprect->left;
     lppop->Height = 0;
@@ -1075,7 +1075,7 @@
 	    if ((i != start) &&
 		(lpitem->fType & (MF_MENUBREAK | MF_MENUBARBREAK))) break;
 
-	    TRACE("calling MENU_CalcItemSize org=(%d, %d)\n", 
+	    TRACE("calling MENU_CalcItemSize org=(%d, %d)\n",
 			 orgX, orgY );
 	    debug_print_menuitem ("  item: ", lpitem, "");
 	    MENU_CalcItemSize( hdc, lpitem, hwndOwner, orgX, orgY, TRUE );
@@ -1132,7 +1132,7 @@
 				    lpitem->fState &
 				    (MF_HILITE | MF_MOUSESELECT) );
 	    else
-		NC_DrawSysButton( hwnd, hdc, 
+		NC_DrawSysButton( hwnd, hdc,
 				  lpitem->fState &
 				  (MF_HILITE | MF_MOUSESELECT) );
 	}
@@ -1167,7 +1167,7 @@
         dis.rcItem     = lpitem->rect;
         TRACE("Ownerdraw: owner=%04x itemID=%d, itemState=%d, itemAction=%d, "
 	      "hwndItem=%04x, hdc=%04x, rcItem={%d,%d,%d,%d}\n", hwndOwner,
-	      dis.itemID, dis.itemState, dis.itemAction, dis.hwndItem, 
+	      dis.itemID, dis.itemState, dis.itemAction, dis.hwndItem,
 	      dis.hDC, dis.rcItem.left, dis.rcItem.top, dis.rcItem.right,
 	      dis.rcItem.bottom);
         SendMessageA( hwndOwner, WM_DRAWITEM, 0, (LPARAM)&dis );
@@ -1209,14 +1209,14 @@
         /* vertical separator */
         if (!menuBar && (lpitem->fType & MF_MENUBARBREAK))
         {
-	    if (TWEAK_WineLook > WIN31_LOOK) 
+	    if (TWEAK_WineLook > WIN31_LOOK)
 	    {
 	        RECT rc = rect;
 	        rc.top = 3;
 	        rc.bottom = height - 3;
 	        DrawEdge (hdc, &rc, EDGE_ETCHED, BF_LEFT);
 	    }
-	    else 
+	    else
 	    {
 	        SelectObject( hdc, SYSCOLOR_GetPen(COLOR_WINDOWFRAME) );
 	        MoveToEx( hdc, rect.left, 0, NULL );
@@ -1227,7 +1227,7 @@
         /* horizontal separator */
         if (lpitem->fType & MF_SEPARATOR)
         {
-	    if (TWEAK_WineLook > WIN31_LOOK) 
+	    if (TWEAK_WineLook > WIN31_LOOK)
 	    {
 	        RECT rc = rect;
 	        rc.left++;
@@ -1235,7 +1235,7 @@
 	        rc.top += SEPARATOR_HEIGHT / 2;
 	        DrawEdge (hdc, &rc, EDGE_ETCHED, BF_TOP);
 	    }
-	    else 
+	    else
 	    {
 	        SelectObject( hdc, SYSCOLOR_GetPen(COLOR_WINDOWFRAME) );
 	        MoveToEx( hdc, rect.left, rect.top + SEPARATOR_HEIGHT/2, NULL );
@@ -1296,7 +1296,7 @@
 	      /* Draw the check mark
 	       *
 	       * FIXME:
-	       * Custom checkmark bitmaps are monochrome but not always 1bpp. 
+	       * Custom checkmark bitmaps are monochrome but not always 1bpp.
 	       */
             HBITMAP bm = (lpitem->fState & MF_CHECKED) ? lpitem->hCheckBit : lpitem->hUnCheckBit;
             if (bm)  /* we have a custom bitmap */
@@ -1324,7 +1324,7 @@
                 DeleteObject( bm );
             }
         }
-	
+
 	  /* Draw the popup-menu arrow */
 	if (lpitem->fType & MF_POPUP)
 	{
@@ -1360,7 +1360,7 @@
     {
 	register int i;
 	HFONT hfontOld = 0;
-	
+
 	UINT uFormat = (menuBar) ?
 			DT_CENTER | DT_VCENTER | DT_SINGLELINE :
 			DT_LEFT | DT_VCENTER | DT_SINGLELINE;
@@ -1394,7 +1394,7 @@
 	    }
 	    SetTextColor(hdc, RGB(0x80, 0x80, 0x80));
 	}
-	
+
 	DrawTextW( hdc, lpitem->text, i, &rect, uFormat);
 
 	/* paint the shortcut text */
@@ -1405,7 +1405,7 @@
 		rect.left = lpitem->xTab;
 		uFormat = DT_LEFT | DT_VCENTER | DT_SINGLELINE;
 	    }
-	    else 
+	    else
 	    {
 		uFormat = DT_RIGHT | DT_VCENTER | DT_SINGLELINE;
 	    }
@@ -1424,7 +1424,7 @@
 	    DrawTextW( hdc, lpitem->text + i + 1, -1, &rect, uFormat );
 	}
 
-	if (hfontOld) 
+	if (hfontOld)
 	    SelectObject (hdc, hfontOld);
     }
 }
@@ -1444,17 +1444,17 @@
 
     GetClientRect( hwnd, &rect );
 
-    if(TWEAK_WineLook == WIN31_LOOK) 
+    if(TWEAK_WineLook == WIN31_LOOK)
     {
 	rect.bottom -= POPUP_YSHADE * GetSystemMetrics(SM_CYBORDER);
 	rect.right -= POPUP_XSHADE * GetSystemMetrics(SM_CXBORDER);
-    } 
+    }
 
-    if((hPrevBrush = SelectObject( hdc, GetSysColorBrush(COLOR_MENU) )) 
+    if((hPrevBrush = SelectObject( hdc, GetSysColorBrush(COLOR_MENU) ))
         && (SelectObject( hdc, hMenuFont)))
     {
 	HPEN hPrevPen;
-	
+
 	Rectangle( hdc, rect.left, rect.top, rect.right, rect.bottom );
 
 	hPrevPen = SelectObject( hdc, GetStockObject( NULL_PEN ) );
@@ -1494,11 +1494,11 @@
 		UINT u;
 
 		for (u = menu->nItems, item = menu->items; u > 0; u--, item++)
-		    MENU_DrawMenuItem( hwnd, hmenu, menu->hwndOwner, hdc, item, 
+		    MENU_DrawMenuItem( hwnd, hmenu, menu->hwndOwner, hdc, item,
 				       menu->Height, FALSE, ODA_DRAWENTIRE );
 
 	    }
-	} else 
+	} else
 	{
 	    SelectObject( hdc, hPrevBrush );
 	}
@@ -1543,13 +1543,13 @@
 
     FillRect(hDC, lprect, GetSysColorBrush(COLOR_MENU) );
 
-    if (TWEAK_WineLook == WIN31_LOOK) 
+    if (TWEAK_WineLook == WIN31_LOOK)
     {
 	SelectObject( hDC, SYSCOLOR_GetPen(COLOR_WINDOWFRAME) );
 	MoveToEx( hDC, lprect->left, lprect->bottom, NULL );
 	LineTo( hDC, lprect->right, lprect->bottom );
     }
-    else 
+    else
     {
 	SelectObject( hDC, SYSCOLOR_GetPen(COLOR_3DFACE));
 	MoveToEx( hDC, lprect->left, lprect->bottom, NULL );
@@ -1605,7 +1605,7 @@
     /* adjust popup menu pos so that it fits within the desktop */
 
     width = menu->Width + GetSystemMetrics(SM_CXBORDER);
-    height = menu->Height + GetSystemMetrics(SM_CYBORDER); 
+    height = menu->Height + GetSystemMetrics(SM_CYBORDER);
 
     if( x + width > GetSystemMetrics(SM_CXSCREEN ))
     {
@@ -1670,7 +1670,7 @@
     SelectObject( hdc, hMenuFont);
 
       /* Clear previous highlighted item */
-    if (lppop->FocusedItem != NO_SELECTED_ITEM) 
+    if (lppop->FocusedItem != NO_SELECTED_ITEM)
     {
 	lppop->items[lppop->FocusedItem].fState &= ~(MF_HILITE|MF_MOUSESELECT);
 	MENU_DrawMenuItem(lppop->hWnd, hmenu, hwndOwner, hdc,&lppop->items[lppop->FocusedItem],
@@ -1680,18 +1680,18 @@
 
       /* Highlight new item (if any) */
     lppop->FocusedItem = wIndex;
-    if (lppop->FocusedItem != NO_SELECTED_ITEM) 
+    if (lppop->FocusedItem != NO_SELECTED_ITEM)
     {
         if(!(lppop->items[wIndex].fType & MF_SEPARATOR)) {
             lppop->items[wIndex].fState |= MF_HILITE;
-            MENU_DrawMenuItem( lppop->hWnd, hmenu, hwndOwner, hdc, 
+            MENU_DrawMenuItem( lppop->hWnd, hmenu, hwndOwner, hdc,
                     &lppop->items[wIndex], lppop->Height,
                     !(lppop->wFlags & MF_POPUP), ODA_SELECT );
         }
         if (sendMenuSelect)
         {
             MENUITEM *ip = &lppop->items[lppop->FocusedItem];
-	    SendMessageA( hwndOwner, WM_MENUSELECT, 
+	    SendMessageA( hwndOwner, WM_MENUSELECT,
                      MAKELONG(ip->fType & MF_POPUP ? wIndex: ip->wID,
                      ip->fType | ip->fState | MF_MOUSESELECT |
                      (lppop->wFlags & MF_SYSMENU)), hmenu);
@@ -1703,7 +1703,7 @@
             if((pos=MENU_FindSubMenu(&topmenu, hmenu))!=NO_SELECTED_ITEM){
                 POPUPMENU *ptm = MENU_GetMenu( topmenu );
                 MENUITEM *ip = &ptm->items[pos];
-                SendMessageA( hwndOwner, WM_MENUSELECT, MAKELONG(pos, 
+                SendMessageA( hwndOwner, WM_MENUSELECT, MAKELONG(pos,
                          ip->fType | ip->fState | MF_MOUSESELECT |
                          (ptm->wFlags & MF_SYSMENU)), topmenu);
             }
@@ -1733,7 +1733,7 @@
     if ( menu->FocusedItem != NO_SELECTED_ITEM )
     {
 	if( menu->nItems == 1 ) return; else
-	for (i = menu->FocusedItem + offset ; i >= 0 && i < menu->nItems 
+	for (i = menu->FocusedItem + offset ; i >= 0 && i < menu->nItems
 					    ; i += offset)
 	    if (!(menu->items[i].fType & MF_SEPARATOR))
 	    {
@@ -1742,7 +1742,7 @@
 	    }
     }
 
-    for ( i = (offset > 0) ? 0 : menu->nItems - 1; 
+    for ( i = (offset > 0) ? 0 : menu->nItems - 1;
 		  i >= 0 && i < menu->nItems ; i += offset)
 	if (!(menu->items[i].fType & MF_SEPARATOR))
 	{
@@ -1792,7 +1792,7 @@
         item->text = (LPWSTR)(HBITMAP)LOWORD(str);
     else item->text = NULL;
 
-    if (flags & MF_OWNERDRAW) 
+    if (flags & MF_OWNERDRAW)
         item->dwItemData = (DWORD)str;
     else
         item->dwItemData = 0;
@@ -1812,7 +1812,7 @@
             item->fState = 0;
 	    return FALSE;
         }
-    } 
+    }
 
     item->wID = id;
     if (flags & MF_POPUP)
@@ -1846,16 +1846,16 @@
     MENUITEM *newItems;
     POPUPMENU *menu;
 
-    if (!(menu = MENU_GetMenu(hMenu))) 
+    if (!(menu = MENU_GetMenu(hMenu)))
         return NULL;
 
     /* Find where to insert new item */
 
     if (flags & MF_BYPOSITION) {
-        if (pos > menu->nItems) 
+        if (pos > menu->nItems)
             pos = menu->nItems;
     } else {
-        if (!MENU_FindItem( &hMenu, &pos, flags )) 
+        if (!MENU_FindItem( &hMenu, &pos, flags ))
             pos = menu->nItems;
         else {
             if (!(menu = MENU_GetMenu( hMenu )))
@@ -2082,7 +2082,7 @@
     rect = item->rect;
 
     /* correct item if modified as a reaction to WM_INITMENUPOPUP message */
-    if (!(item->fState & MF_HILITE)) 
+    if (!(item->fState & MF_HILITE))
     {
         if (menu->wFlags & MF_POPUP) hdc = GetDC( menu->hWnd );
         else hdc = GetDCEx( menu->hWnd, 0, DCX_CACHE | DCX_WINDOW);
@@ -2090,7 +2090,7 @@
         SelectObject( hdc, hMenuFont);
 
         item->fState |= MF_HILITE;
-        MENU_DrawMenuItem( menu->hWnd, hmenu, hwndOwner, hdc, item, menu->Height, !(menu->wFlags & MF_POPUP), ODA_DRAWENTIRE ); 
+        MENU_DrawMenuItem( menu->hWnd, hmenu, hwndOwner, hdc, item, menu->Height, !(menu->wFlags & MF_POPUP), ODA_DRAWENTIRE );
 	ReleaseDC( menu->hWnd, hdc );
     }
     if (!item->rect.top && !item->rect.left && !item->rect.bottom && !item->rect.right)
@@ -2194,7 +2194,7 @@
 
     TRACE("%p hmenu=0x%04x\n", pmt, hMenu);
 
-    if (!menu || !menu->nItems || 
+    if (!menu || !menu->nItems ||
 	(menu->FocusedItem == NO_SELECTED_ITEM)) return -1;
 
     item = &menu->items[menu->FocusedItem];
@@ -2206,8 +2206,8 @@
     {
 	if (!(item->fState & (MF_GRAYED | MF_DISABLED)) && !(item->fType & MF_SEPARATOR))
 	{
-	    /* If TPM_RETURNCMD is set you return the id, but 
-	       do not send a message to the owner */	   
+	    /* If TPM_RETURNCMD is set you return the id, but
+	       do not send a message to the owner */
 	    if(!(wFlags & TPM_RETURNCMD))
 	    {
 		if( menu->wFlags & MF_SYSMENU )
@@ -2282,11 +2282,11 @@
 
 		/* In win31, a newly popped menu always remains opened for the next buttonup */
 		if(TWEAK_WineLook == WIN31_LOOK)
-		    ptmenu->bTimeToHide = FALSE;		    
+		    ptmenu->bTimeToHide = FALSE;
 	    }
 
 	    return TRUE;
-	} 
+	}
 	/* Else the click was on the menu bar, finish the tracking */
     }
     return FALSE;
@@ -2349,13 +2349,13 @@
 	    id = 0;
         else
             MENU_FindItemByCoords( ptmenu, pmt->pt, &id );
-    } 
+    }
 
     if( id == NO_SELECTED_ITEM )
     {
-	MENU_SelectItem( pmt->hOwnerWnd, pmt->hCurrentMenu, 
+	MENU_SelectItem( pmt->hOwnerWnd, pmt->hCurrentMenu,
 			 NO_SELECTED_ITEM, TRUE, pmt->hTopMenu);
-        
+
     }
     else if( ptmenu->FocusedItem != id )
     {
@@ -2443,21 +2443,21 @@
 
 	if( hNewMenu != pmt->hTopMenu )
 	{
-	    MENU_SelectItem( pmt->hOwnerWnd, pmt->hTopMenu, NO_SELECTED_ITEM, 
+	    MENU_SelectItem( pmt->hOwnerWnd, pmt->hTopMenu, NO_SELECTED_ITEM,
                     FALSE, 0 );
-	    if( pmt->hCurrentMenu != pmt->hTopMenu ) 
+	    if( pmt->hCurrentMenu != pmt->hTopMenu )
 		MENU_HideSubPopups( pmt->hOwnerWnd, pmt->hTopMenu, FALSE );
 	}
 
 	if( hNewWnd != pmt->hOwnerWnd )
 	{
-	    ReleaseCapture(); 
+	    ReleaseCapture();
 	    pmt->hOwnerWnd = hNewWnd;
 	    EVENT_Capture( pmt->hOwnerWnd, HTMENU );
 	}
 
 	pmt->hTopMenu = pmt->hCurrentMenu = hNewMenu; /* all subpopups are hidden */
-	MENU_SelectItem( pmt->hOwnerWnd, pmt->hTopMenu, id, TRUE, 0 ); 
+	MENU_SelectItem( pmt->hOwnerWnd, pmt->hTopMenu, id, TRUE, 0 );
 
 	return TRUE;
     }
@@ -2505,7 +2505,7 @@
 /***********************************************************************
  *           MENU_KeyEscape
  *
- * Handle a VK_ESCAPE key event in a menu. 
+ * Handle a VK_ESCAPE key event in a menu.
  */
 static BOOL MENU_KeyEscape(MTRACKER* pmt, UINT wFlags)
 {
@@ -2540,7 +2540,7 @@
 /***********************************************************************
  *           MENU_KeyLeft
  *
- * Handle a VK_LEFT key event in a menu. 
+ * Handle a VK_LEFT key event in a menu.
  */
 static void MENU_KeyLeft( MTRACKER* pmt, UINT wFlags )
 {
@@ -2552,9 +2552,9 @@
     menu = MENU_GetMenu( hmenutmp );
 
     /* Try to move 1 column left (if possible) */
-    if( (prevcol = MENU_GetStartOfPrevColumn( pmt->hCurrentMenu )) != 
+    if( (prevcol = MENU_GetStartOfPrevColumn( pmt->hCurrentMenu )) !=
 	NO_SELECTED_ITEM ) {
-	
+
 	MENU_SelectItem( pmt->hOwnerWnd, pmt->hCurrentMenu,
 			 prevcol, TRUE, 0 );
 	return;
@@ -2568,7 +2568,7 @@
     }
 
     MENU_HideSubPopups( pmt->hOwnerWnd, hmenuprev, TRUE );
-    pmt->hCurrentMenu = hmenuprev; 
+    pmt->hCurrentMenu = hmenuprev;
 
     if ( (hmenuprev == pmt->hTopMenu) && !(menu->wFlags & MF_POPUP) )
     {
@@ -2619,7 +2619,7 @@
     }
 
     /* Check to see if there's another column */
-    if( (nextcol = MENU_GetStartOfNextColumn( pmt->hCurrentMenu )) != 
+    if( (nextcol = MENU_GetStartOfNextColumn( pmt->hCurrentMenu )) !=
 	NO_SELECTED_ITEM ) {
 	TRACE("Going to %d.\n", nextcol );
 	MENU_SelectItem( pmt->hOwnerWnd, pmt->hCurrentMenu,
@@ -2641,7 +2641,7 @@
 
 	if( hmenutmp || pmt->trackFlags & TF_SUSPENDPOPUP )
 	    if( !MENU_SuspendPopup(pmt, WM_KEYDOWN) )
-		pmt->hCurrentMenu = MENU_ShowSubPopup(pmt->hOwnerWnd, 
+		pmt->hCurrentMenu = MENU_ShowSubPopup(pmt->hOwnerWnd,
 						       pmt->hTopMenu, TRUE, wFlags);
     }
 }
@@ -2675,11 +2675,11 @@
     fEndMenu = FALSE;
     if (!(menu = MENU_GetMenu( hmenu ))) return FALSE;
 
-    if (wFlags & TPM_BUTTONDOWN) 
+    if (wFlags & TPM_BUTTONDOWN)
     {
 	/* Get the result in order to start the tracking or not */
 	fRemove = MENU_ButtonDown( &mt, hmenu, wFlags );
-	fEndMenu = !fRemove;   
+	fEndMenu = !fRemove;
     }
 
     EVENT_Capture( mt.hOwnerWnd, HTMENU );
@@ -2714,14 +2714,14 @@
         }
 
 	/* check if EndMenu() tried to cancel us, by posting this message */
-        if(msg.message == WM_CANCELMODE) 
+        if(msg.message == WM_CANCELMODE)
 	{
 	    /* we are now out of the loop */
     	    fEndMenu = TRUE;
 
 	    /* remove the message from the queue */
 	    PeekMessageA( &msg, 0, msg.message, msg.message, PM_REMOVE );
-	   
+
 	    /* break out of internal loop, ala ESCAPE */
 	    break;
 	}
@@ -2735,9 +2735,9 @@
         fRemove = FALSE;
 	if ((msg.message >= WM_MOUSEFIRST) && (msg.message <= WM_MOUSELAST))
 	{
-            /* 
+            /*
              * use the mouse coordinates in lParam instead of those in the MSG
-             * struct to properly handle synthetic messages. lParam coords are 
+             * struct to properly handle synthetic messages. lParam coords are
              * relative to client area, so they must be converted; since they can
              * be negative, we must use SLOWORD/SHIWORD instead of LOWORD/HIWORD.
              */
@@ -2763,7 +2763,7 @@
 		    fRemove = MENU_ButtonDown( &mt, hmenu, wFlags );
 		    fEndMenu = !fRemove;
 		    break;
-		
+
 		case WM_RBUTTONUP:
 		    if (!(wFlags & TPM_RIGHTBUTTON)) break;
 		    /* fall through */
@@ -2782,13 +2782,13 @@
                        with the menu tracking. If not, stop it */
                     else
                         fEndMenu = ((wFlags & TPM_POPUPMENU) ? FALSE : TRUE);
-                    
+
 		    break;
-		
+
 		case WM_MOUSEMOVE:
                     /* In win95 winelook, the selected menu item must be changed every time the
                        mouse moves. In Win31 winelook, the mouse button has to be held down */
-                     
+
                     if ( hmenu && ((TWEAK_WineLook > WIN31_LOOK) ||
                          ( (msg.wParam & MK_LBUTTON) ||
                            ((wFlags & TPM_RIGHTBUTTON) && (msg.wParam & MK_RBUTTON)))) )
@@ -2807,11 +2807,11 @@
 		{
 		case VK_HOME:
 		case VK_END:
-		    MENU_SelectItem( mt.hOwnerWnd, mt.hCurrentMenu, 
+		    MENU_SelectItem( mt.hOwnerWnd, mt.hCurrentMenu,
 				     NO_SELECTED_ITEM, FALSE, 0 );
 		/* fall through */
 		case VK_UP:
-		    MENU_MoveSelection( mt.hOwnerWnd, mt.hCurrentMenu, 
+		    MENU_MoveSelection( mt.hOwnerWnd, mt.hCurrentMenu,
 				       (msg.wParam == VK_HOME)? ITEM_NEXT : ITEM_PREV );
 		    break;
 
@@ -2827,11 +2827,11 @@
 		case VK_LEFT:
 		    MENU_KeyLeft( &mt, wFlags );
 		    break;
-		    
+
 		case VK_RIGHT:
 		    MENU_KeyRight( &mt, wFlags );
 		    break;
-		    
+
 		case VK_ESCAPE:
                     fEndMenu = MENU_KeyEscape(&mt, wFlags);
 		    break;
@@ -2841,10 +2841,10 @@
 			HELPINFO hi;
 			hi.cbSize = sizeof(HELPINFO);
 			hi.iContextType = HELPINFO_MENUITEM;
-			if (menu->FocusedItem == NO_SELECTED_ITEM) 
+			if (menu->FocusedItem == NO_SELECTED_ITEM)
 			    hi.iCtrlId = 0;
-		        else	
-			    hi.iCtrlId = menu->items[menu->FocusedItem].wID; 
+		        else
+			    hi.iCtrlId = menu->items[menu->FocusedItem].wID;
 			hi.hItemHandle = hmenu;
 			hi.dwContextId = menu->dwContextHelpID;
 			hi.MousePos = msg.pt;
@@ -2863,7 +2863,7 @@
 		case VK_MENU:
 		    fEndMenu = TRUE;
 		    break;
-		    
+
 		}
 		break;  /* WM_SYSKEYDOWN */
 
@@ -2883,7 +2883,7 @@
 		      /* We will find a better way real soon... */
 		    if ((msg.wParam <= 32) || (msg.wParam >= 127)) break;
 
-		    pos = MENU_FindItemByKey( mt.hOwnerWnd, mt.hCurrentMenu, 
+		    pos = MENU_FindItemByKey( mt.hOwnerWnd, mt.hCurrentMenu,
                                               LOWORD(msg.wParam), FALSE );
 		    if (pos == (UINT)-2) fEndMenu = TRUE;
 		    else if (pos == (UINT)-1) MessageBeep(0);
@@ -2894,7 +2894,7 @@
                         executedMenuId = MENU_ExecFocusedItem(&mt,mt.hCurrentMenu, wFlags);
                         fEndMenu = (executedMenuId != -1);
 		    }
-		}		    
+		}
 		break;
 	    }  /* switch(msg.message) - kbd */
 	}
@@ -2926,7 +2926,7 @@
         {
 	    MENU_HideSubPopups( mt.hOwnerWnd, mt.hTopMenu, FALSE );
 
-	    if (menu && menu->wFlags & MF_POPUP) 
+	    if (menu && menu->wFlags & MF_POPUP)
 	    {
                 DestroyWindow( menu->hWnd );
                 menu->hWnd = 0;
@@ -2967,7 +2967,7 @@
             Recalculate menu sizes else clicks will not work */
           SetWindowPos( hWnd, 0, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE |
                         SWP_NOACTIVATE | SWP_NOZORDER | SWP_FRAMECHANGED );
-                                                        
+
        }
     }
     return TRUE;
@@ -3185,9 +3185,9 @@
     if (!(lppop = MENU_GetMenu( GetMenu(hwnd) ))) return 0;
 
     hdc = GetDCEx( hwnd, 0, DCX_CACHE | DCX_WINDOW );
-    SelectObject( hdc, hMenuFont);       
+    SelectObject( hdc, hMenuFont);
     SetRect(&rectBar, orgX, orgY, orgX+menubarWidth, orgY+GetSystemMetrics(SM_CYMENU));
-    MENU_MenuBarCalcSize( hdc, &rectBar, lppop, hwnd );    
+    MENU_MenuBarCalcSize( hdc, &rectBar, lppop, hwnd );
     ReleaseDC( hwnd, hdc );
     return lppop->Height;
 }
@@ -3305,11 +3305,11 @@
     MENUITEM *item;
     POPUPMENU *menu;
 
-    TRACE("(%04x, %04X, %04X) !\n", 
+    TRACE("(%04x, %04X, %04X) !\n",
 		 hMenu, wItemID, wFlags);
 
     /* Get the Popupmenu to access the owner menu */
-    if (!(menu = MENU_GetMenu(hMenu))) 
+    if (!(menu = MENU_GetMenu(hMenu)))
 	return (UINT)-1;
 
     if (!(item = MENU_FindItem( &hMenu, &wItemID, wFlags )))
@@ -3319,7 +3319,7 @@
     item->fState ^= (oldflags ^ wFlags) & (MF_GRAYED | MF_DISABLED);
 
     /* In win95 if the close item in the system menu change update the close button */
-    if (TWEAK_WineLook == WIN95_LOOK)    
+    if (TWEAK_WineLook == WIN95_LOOK)
 	if((item->wID == SC_CLOSE) && (oldflags != wFlags))
 	{
 	    if (menu->hSysMenuOwner != 0)
@@ -3327,7 +3327,7 @@
 		POPUPMENU* parentMenu;
 
 		/* Get the parent menu to access*/
-		if (!(parentMenu = MENU_GetMenu(menu->hSysMenuOwner))) 
+		if (!(parentMenu = MENU_GetMenu(menu->hSysMenuOwner)))
 		    return (UINT)-1;
 
 		/* Refresh the frame to reflect the change*/
@@ -3335,7 +3335,7 @@
 			     SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER);
 	    }
 	}
-	   
+
     return oldflags;
 }
 
@@ -3353,12 +3353,12 @@
 /*******************************************************************
  *         GetMenuStringA    (USER32.@)
  */
-INT WINAPI GetMenuStringA( 
+INT WINAPI GetMenuStringA(
 	HMENU hMenu,	/* [in] menuhandle */
 	UINT wItemID,	/* [in] menu item (dep. on wFlags) */
 	LPSTR str,	/* [out] outbuffer. If NULL, func returns entry length*/
 	INT nMaxSiz,	/* [in] length of buffer. if 0, func returns entry len*/
-	UINT wFlags	/* [in] MF_ flags */ 
+	UINT wFlags	/* [in] MF_ flags */
 ) {
     MENUITEM *item;
 
@@ -3401,7 +3401,7 @@
                                 UINT wHilite )
 {
     LPPOPUPMENU menu;
-    TRACE("(%04x, %04x, %04x, %04x);\n", 
+    TRACE("(%04x, %04x, %04x, %04x);\n",
                  hWnd, hMenu, wItemID, wHilite);
     if (!MENU_FindItem( &hMenu, &wItemID, wHilite )) return FALSE;
     if (!(menu = MENU_GetMenu(hMenu))) return FALSE;
@@ -3427,7 +3427,7 @@
 UINT WINAPI GetMenuState( HMENU hMenu, UINT wItemID, UINT wFlags )
 {
     MENUITEM *item;
-    TRACE("(menu=%04x, id=%04x, flags=%04x);\n", 
+    TRACE("(menu=%04x, id=%04x, flags=%04x);\n",
 		 hMenu, wItemID, wFlags);
     if (!(item = MENU_FindItem( &hMenu, &wItemID, wFlags ))) return -1;
     debug_print_menuitem ("  item: ", item, "");
@@ -3454,7 +3454,7 @@
 {
     LPPOPUPMENU	menu = MENU_GetMenu(hMenu);
     if (!menu) return -1;
-    TRACE("(%04x) returning %d\n", 
+    TRACE("(%04x) returning %d\n",
                   hMenu, menu->nItems );
     return menu->nItems;
 }
@@ -3467,7 +3467,7 @@
 {
     LPPOPUPMENU	menu = MENU_GetMenu(hMenu);
     if (!menu) return -1;
-    TRACE("(%04x) returning %d\n", 
+    TRACE("(%04x) returning %d\n",
                   hMenu, menu->nItems );
     return menu->nItems;
 }
@@ -3612,7 +3612,7 @@
     TRACE("(menu=%04x pos=%04x flags=%04x)\n",hMenu, nPos, wFlags);
     if (!(item = MENU_FindItem( &hMenu, &nPos, wFlags ))) return FALSE;
     if (!(menu = MENU_GetMenu(hMenu))) return FALSE;
-    
+
       /* Remove item */
 
     MENU_FreeItemData( item );
@@ -3884,20 +3884,20 @@
 	{
 	    if( bRevert )
 	    {
-		DestroyMenu(wndPtr->hSysMenu); 
+		DestroyMenu(wndPtr->hSysMenu);
 		wndPtr->hSysMenu = 0;
 	    }
 	    else
 	    {
 		POPUPMENU *menu = MENU_GetMenu( wndPtr->hSysMenu );
-		if( menu ) 
+		if( menu )
                 {
 		   if( menu->nItems > 0 && menu->items[0].hSubMenu == MENU_DefSysPopup )
 		      menu->items[0].hSubMenu = MENU_CopySysPopup();
 		}
-		else 
+		else
 		{
-		   WARN("Current sys-menu (%04x) of wnd %04x is broken\n", 
+		   WARN("Current sys-menu (%04x) of wnd %04x is broken\n",
 			wndPtr->hSysMenu, hWnd);
 		   wndPtr->hSysMenu = 0;
 		}
@@ -3945,7 +3945,7 @@
 /**********************************************************************
  *         GetMenu    (USER32.@)
  */
-HMENU WINAPI GetMenu( HWND hWnd ) 
+HMENU WINAPI GetMenu( HWND hWnd )
 {
     HMENU retvalue = (HMENU)GetWindowLongA( hWnd, GWL_ID );
     TRACE("for %04x returning %04x\n", hWnd, retvalue);
@@ -4033,7 +4033,7 @@
  *           DrawMenuBarTemp   (USER32.@)
  *
  * UNDOCUMENTED !!
- * 
+ *
  * called by W98SE desk.cpl Control Panel Applet
  *
  * Not 100% sure about the param names, but close.
@@ -4314,7 +4314,7 @@
 BOOL WINAPI GetMenuItemInfoA( HMENU hmenu, UINT item, BOOL bypos,
                                   LPMENUITEMINFOA lpmii)
 {
-    return GetMenuItemInfo_common (hmenu, item, bypos, 
+    return GetMenuItemInfo_common (hmenu, item, bypos,
                                     (LPMENUITEMINFOW)lpmii, FALSE);
 }
 
@@ -4371,7 +4371,7 @@
 	    menu->text = NULL;
 	}
 
-	/* make only MENU_ITEM_TYPE bits in menu->fType equal lpmii->fType */ 
+	/* make only MENU_ITEM_TYPE bits in menu->fType equal lpmii->fType */
 	menu->fType &= ~MENU_ITEM_TYPE(menu->fType);
 	menu->fType |= MENU_ITEM_TYPE(lpmii->fType);
 
@@ -4445,10 +4445,10 @@
  *		SetMenuItemInfoA    (USER32.@)
  */
 BOOL WINAPI SetMenuItemInfoA(HMENU hmenu, UINT item, BOOL bypos,
-                                 const MENUITEMINFOA *lpmii) 
+                                 const MENUITEMINFOA *lpmii)
 {
     if ((lpmii->fType & (MF_HILITE|MF_POPUP)) || (lpmii->fState)) {
-	/* QuickTime does pass invalid data into SetMenuItemInfo. 
+	/* QuickTime does pass invalid data into SetMenuItemInfo.
 	 * do some of the checks Windows does.
 	 */
         WARN("Bad masks for type (0x%08x) or state (0x%08x)\n",
@@ -4479,7 +4479,7 @@
 	UINT i;
 	POPUPMENU *menu;
 	MENUITEM *item;
-	
+
 	TRACE("(0x%x,%d,%d)\n", hmenu, uItem, bypos);
 
 	if (!(menu = MENU_GetMenu(hmenu))) return FALSE;
@@ -4490,7 +4490,7 @@
 	{
 	    item->fState &= ~MFS_DEFAULT;
 	}
-	
+
 	/* no default item */
 	if ( -1 == uItem)
 	{
@@ -4514,7 +4514,7 @@
 		     return TRUE;
 		}
 	    }
-		
+
 	}
 	return FALSE;
 }
@@ -4534,16 +4534,16 @@
 
 	/* find default item */
 	item = menu->items;
-	
+
 	/* empty menu */
 	if (! item) return -1;
-	
+
 	while ( !( item->fState & MFS_DEFAULT ) )
 	{
 	    i++; item++;
 	    if  (i >= menu->nItems ) return -1;
 	}
-	
+
 	/* default: don't return disabled items */
 	if ( (!(GMDI_USEDISABLED & flags)) && (item->fState & MFS_DISABLED )) return -1;
 
@@ -4660,10 +4660,10 @@
 /**********************************************************************
  *		GetMenuItemRect    (USER32.@)
  *
- *      ATTENTION: Here, the returned values in rect are the screen 
- *                 coordinates of the item just like if the menu was 
+ *      ATTENTION: Here, the returned values in rect are the screen
+ *                 coordinates of the item just like if the menu was
  *                 always on the upper left side of the application.
- *                 
+ *
  */
 BOOL WINAPI GetMenuItemRect (HWND hwnd, HMENU hMenu, UINT uItem,
 				 LPRECT rect)
@@ -4680,7 +4680,7 @@
      if(!hwnd)
      {
 	 itemMenu = MENU_GetMenu(hMenu);
-	 if (itemMenu == NULL) 
+	 if (itemMenu == NULL)
 	     return FALSE;
 
 	 if(itemMenu->hWnd == 0)
@@ -4688,7 +4688,7 @@
 	 referenceHwnd = itemMenu->hWnd;
      }
 
-     if ((rect == NULL) || (item == NULL)) 
+     if ((rect == NULL) || (item == NULL))
 	 return FALSE;
 
      *rect = item->rect;
@@ -4803,7 +4803,7 @@
 {
 	return GetMenuContextHelpId( hMenu );
 }
- 
+
 /**********************************************************************
  *         GetMenuContextHelpId    (USER32.@)
  */
@@ -4966,11 +4966,11 @@
     }
     else
     {
-        /*  some reasons for NOT sending the WM_{SYS}COMMAND message: 
+        /*  some reasons for NOT sending the WM_{SYS}COMMAND message:
          *   #0: unknown (please report!)
          *   #1: for WM_KEYUP,WM_SYSKEYUP
          *   #2: mouse is captured
-         *   #3: window is disabled 
+         *   #3: window is disabled
          *   #4: it's a disabled system menu option
          *   #5: it's a menu option, but window is iconic
          *   #6: it's a menu option, but disabled
diff --git a/controls/scroll.c b/controls/scroll.c
index 9ae664d..7143c56 100644
--- a/controls/scroll.c
+++ b/controls/scroll.c
@@ -111,9 +111,9 @@
 static BOOL SCROLL_MovingThumb = FALSE;
 
  /* Local functions */
-static BOOL SCROLL_ShowScrollBar( HWND hwnd, INT nBar, 
+static BOOL SCROLL_ShowScrollBar( HWND hwnd, INT nBar,
 				    BOOL fShowH, BOOL fShowV );
-static INT SCROLL_SetScrollInfo( HWND hwnd, INT nBar, 
+static INT SCROLL_SetScrollInfo( HWND hwnd, INT nBar,
 				   const SCROLLINFO *info, INT *action );
 static void SCROLL_DrawInterior_9x( HWND hwnd, HDC hdc, INT nBar,
 				    RECT *rect, INT arrowSize,
@@ -519,7 +519,7 @@
 	    r.left = rect->left + arrowSize - SCROLL_ARROW_THUMB_OVERLAP;
         if (r.left + thumbSize >
 	               rect->right - (arrowSize - SCROLL_ARROW_THUMB_OVERLAP))
-            r.left = rect->right - (arrowSize - SCROLL_ARROW_THUMB_OVERLAP) 
+            r.left = rect->right - (arrowSize - SCROLL_ARROW_THUMB_OVERLAP)
 	                                                          - thumbSize;
         r.right = r.left + thumbSize;
     }
@@ -549,7 +549,7 @@
   SCROLL_DrawInterior_9x( SCROLL_TrackingWin, hdc, SCROLL_TrackingBar,
 			  rect, arrowSize, thumbSize, pos,
 			  0, vertical, FALSE, FALSE );
-			  
+
   SCROLL_MovingThumb = !SCROLL_MovingThumb;
 }
 
@@ -567,7 +567,7 @@
  *
  * Draw the scroll bar interior (everything except the arrows).
  */
-static void SCROLL_DrawInterior_9x( HWND hwnd, HDC hdc, INT nBar, 
+static void SCROLL_DrawInterior_9x( HWND hwnd, HDC hdc, INT nBar,
 				    RECT *rect, INT arrowSize,
 				    INT thumbSize, INT thumbPos,
 				    UINT flags, BOOL vertical,
@@ -582,7 +582,7 @@
      * to correctly setup default scrollbar colors
      */
     if (nBar == SB_CTL)
-    {  
+    {
       hBrush = (HBRUSH)SendMessageA( GetParent(hwnd), WM_CTLCOLORSCROLLBAR,
 				     (WPARAM)hdc,(LPARAM)hwnd);
     }
@@ -656,7 +656,7 @@
 }
 
 
-static void SCROLL_DrawInterior( HWND hwnd, HDC hdc, INT nBar, 
+static void SCROLL_DrawInterior( HWND hwnd, HDC hdc, INT nBar,
                                  RECT *rect, INT arrowSize,
                                  INT thumbSize, INT thumbPos,
                                  UINT flags, BOOL vertical,
@@ -685,11 +685,11 @@
          * The window-owned scrollbars need to call DEFWND_ControlColor
          * to correctly setup default scrollbar colors
          */
-        if (nBar == SB_CTL) {  
+        if (nBar == SB_CTL) {
             hBrush = (HBRUSH)SendMessageA( GetParent(hwnd), WM_CTLCOLORSCROLLBAR,
                                            (WPARAM)hdc,(LPARAM)hwnd);
         } else {
-            hBrush = DEFWND_ControlColor( hdc, CTLCOLOR_SCROLLBAR ); 
+            hBrush = DEFWND_ControlColor( hdc, CTLCOLOR_SCROLLBAR );
         }
     }
     hSavePen = SelectObject( hdc, SYSCOLOR_GetPen(COLOR_WINDOWFRAME) );
@@ -792,7 +792,7 @@
  *
  * Redraw the whole scrollbar.
  */
-void SCROLL_DrawScrollBar( HWND hwnd, HDC hdc, INT nBar, 
+void SCROLL_DrawScrollBar( HWND hwnd, HDC hdc, INT nBar,
 			   BOOL arrows, BOOL interior )
 {
     INT arrowSize, thumbSize, thumbPos;
@@ -829,7 +829,7 @@
 			       (SCROLL_trackHitTest == SCROLL_TOP_ARROW),
 			       (SCROLL_trackHitTest == SCROLL_BOTTOM_ARROW) );
 	else
-	    SCROLL_DrawArrows( hdc, infoPtr, &rect, arrowSize, vertical, 
+	    SCROLL_DrawArrows( hdc, infoPtr, &rect, arrowSize, vertical,
 							       FALSE, FALSE );
     }
     if( interior )
@@ -865,7 +865,7 @@
  * Repaint the scroll bar interior after a SetScrollRange() or
  * SetScrollPos() call.
  */
-static void SCROLL_RefreshScrollBar( HWND hwnd, INT nBar, 
+static void SCROLL_RefreshScrollBar( HWND hwnd, INT nBar,
 				     BOOL arrows, BOOL interior )
 {
     HDC hdc = GetDCEx( hwnd, 0,
@@ -929,7 +929,7 @@
 
     SCROLLBAR_INFO *infoPtr = SCROLL_GetScrollInfo( hwnd, nBar );
     if (!infoPtr) return;
-    if ((SCROLL_trackHitTest == SCROLL_NOWHERE) && (msg != WM_LBUTTONDOWN)) 
+    if ((SCROLL_trackHitTest == SCROLL_NOWHERE) && (msg != WM_LBUTTONDOWN))
 		  return;
 
     hdc = GetDCEx( hwnd, 0, DCX_CACHE | ((nBar == SB_CTL) ? 0 : DCX_WINDOW));
@@ -991,7 +991,7 @@
                 SendMessageA( hwndOwner, vertical ? WM_VSCROLL : WM_HSCROLL,
                                 SB_LINEUP, (LPARAM)hwndCtl );
 	    }
-             
+
 	    SetSystemTimer( hwnd, SCROLL_TIMER, (msg == WM_LBUTTONDOWN) ?
 			    SCROLL_FIRST_DELAY : SCROLL_REPEAT_DELAY,
 			    (TIMERPROC)0 );
@@ -1207,7 +1207,7 @@
                     MoveWindow( hwnd, lpCreat->x, lpCreat->y,
                                   GetSystemMetrics(SM_CXVSCROLL)+1, lpCreat->cy, FALSE );
                 else if (lpCreat->style & SBS_RIGHTALIGN)
-                    MoveWindow( hwnd, 
+                    MoveWindow( hwnd,
                                   lpCreat->x+lpCreat->cx-GetSystemMetrics(SM_CXVSCROLL)-1,
                                   lpCreat->y,
                                   GetSystemMetrics(SM_CXVSCROLL)+1, lpCreat->cy, FALSE );
@@ -1218,7 +1218,7 @@
                     MoveWindow( hwnd, lpCreat->x, lpCreat->y,
                                   lpCreat->cx, GetSystemMetrics(SM_CYHSCROLL)+1, FALSE );
                 else if (lpCreat->style & SBS_BOTTOMALIGN)
-                    MoveWindow( hwnd, 
+                    MoveWindow( hwnd,
                                   lpCreat->x,
                                   lpCreat->y+lpCreat->cy-GetSystemMetrics(SM_CYHSCROLL)-1,
                                   lpCreat->cx, GetSystemMetrics(SM_CYHSCROLL)+1, FALSE );
@@ -1397,7 +1397,7 @@
 
 /*************************************************************************
  *           SetScrollInfo   (USER32.@)
- * SetScrollInfo can be used to set the position, upper bound, 
+ * SetScrollInfo can be used to set the position, upper bound,
  * lower bound, and page size of a scrollbar control.
  *
  * RETURNS
@@ -1409,9 +1409,9 @@
  *  (corresponding to the 76 different positions of the window on
  *  the text), and info->nPage=25.
  */
-INT WINAPI SetScrollInfo( 
-HWND hwnd /* [in] Handle of window whose scrollbar will be affected */, 
-INT nBar /* [in] One of SB_HORZ, SB_VERT, or SB_CTL */, 
+INT WINAPI SetScrollInfo(
+HWND hwnd /* [in] Handle of window whose scrollbar will be affected */,
+INT nBar /* [in] One of SB_HORZ, SB_VERT, or SB_CTL */,
 const SCROLLINFO *info /* [in] Specifies what to change and new values */,
 BOOL bRedraw /* [in] Should scrollbar be redrawn afterwards ? */)
 {
@@ -1434,10 +1434,10 @@
     return retVal;
 }
 
-INT SCROLL_SetScrollInfo( HWND hwnd, INT nBar, 
+INT SCROLL_SetScrollInfo( HWND hwnd, INT nBar,
 			    const SCROLLINFO *info, INT *action  )
 {
-    /* Update the scrollbar state and set action flags according to 
+    /* Update the scrollbar state and set action flags according to
      * what has to be done graphics wise. */
 
     SCROLLBAR_INFO *infoPtr;
@@ -1468,7 +1468,7 @@
 	{
             infoPtr->Page = info->nPage;
 	   *action |= SA_SSI_REFRESH;
-           bChangeParams = TRUE; 
+           bChangeParams = TRUE;
 	}
     }
 
@@ -1500,7 +1500,7 @@
 	    if( infoPtr->MinVal != info->nMin ||
 		infoPtr->MaxVal != info->nMax )
 	    {
-                *action |= SA_SSI_REFRESH; 
+                *action |= SA_SSI_REFRESH;
                 infoPtr->MinVal = info->nMin;
                 infoPtr->MaxVal = info->nMax;
                 bChangeParams = TRUE;
@@ -1525,7 +1525,7 @@
 		 infoPtr->Page, infoPtr->CurVal,
 		 infoPtr->MinVal, infoPtr->MaxVal );
 
-    /* don't change the scrollbar state if SetScrollInfo 
+    /* don't change the scrollbar state if SetScrollInfo
      * is just called with SIF_DISABLENOSCROLL
      */
     if(!(info->fMask & SIF_ALL)) goto done;
@@ -1572,14 +1572,14 @@
 
 /*************************************************************************
  *           GetScrollInfo   (USER32.@)
- * GetScrollInfo can be used to retrieve the position, upper bound, 
+ * GetScrollInfo can be used to retrieve the position, upper bound,
  * lower bound, and page size of a scrollbar control.
  *
  * RETURNS STD
  */
-BOOL WINAPI GetScrollInfo( 
-  HWND hwnd /* [in] Handle of window */ , 
-  INT nBar /* [in] One of SB_HORZ, SB_VERT, or SB_CTL */, 
+BOOL WINAPI GetScrollInfo(
+  HWND hwnd /* [in] Handle of window */ ,
+  INT nBar /* [in] One of SB_HORZ, SB_VERT, or SB_CTL */,
   LPSCROLLINFO info /* [in/out] (info.fMask [in] specifies which values are to retrieve) */)
 {
     SCROLLBAR_INFO *infoPtr;
@@ -1613,7 +1613,7 @@
  *    Note the ambiguity when 0 is returned.  Use GetLastError
  *    to make sure there was an error (and to know which one).
  */
-INT WINAPI SetScrollPos( 
+INT WINAPI SetScrollPos(
 HWND hwnd /* [in] Handle of window whose scrollbar will be affected */,
 INT nBar /* [in] One of SB_HORZ, SB_VERT, or SB_CTL */,
 INT nPos /* [in] New value */,
@@ -1638,13 +1638,13 @@
  *
  * RETURNS
  *    Success: Current position
- *    Failure: 0   
+ *    Failure: 0
  *
  * REMARKS
  *    Note the ambiguity when 0 is returned.  Use GetLastError
  *    to make sure there was an error (and to know which one).
  */
-INT WINAPI GetScrollPos( 
+INT WINAPI GetScrollPos(
 HWND hwnd, /* [in] Handle of window */
 INT nBar /* [in] One of SB_HORZ, SB_VERT, or SB_CTL */)
 {
@@ -1660,7 +1660,7 @@
  *
  * RETURNS STD
  */
-BOOL WINAPI SetScrollRange( 
+BOOL WINAPI SetScrollRange(
 HWND hwnd, /* [in] Handle of window whose scrollbar will be affected */
 INT nBar, /* [in] One of SB_HORZ, SB_VERT, or SB_CTL */
 INT MinVal, /* [in] New minimum value */
@@ -1720,7 +1720,7 @@
  *
  * RETURNS STD
  */
-BOOL WINAPI GetScrollRange( 
+BOOL WINAPI GetScrollRange(
 HWND hwnd, /* [in] Handle of window */
 INT nBar, /* [in] One of SB_HORZ, SB_VERT, or SB_CTL  */
 LPINT lpMin, /* [out] Where to store minimum value */
@@ -1745,7 +1745,7 @@
  *
  * Back-end for ShowScrollBar(). Returns FALSE if no action was taken.
  */
-BOOL SCROLL_ShowScrollBar( HWND hwnd, INT nBar, 
+BOOL SCROLL_ShowScrollBar( HWND hwnd, INT nBar,
 			     BOOL fShowH, BOOL fShowV )
 {
     LONG style = GetWindowLongW( hwnd, GWL_STYLE );
@@ -1847,7 +1847,7 @@
     }
     else
 	bFineWithMe = TRUE;
-   
+
     if (!(infoPtr = SCROLL_GetScrollInfo( hwnd, nBar ))) return FALSE;
     if (bFineWithMe && infoPtr->flags == flags) return FALSE;
     infoPtr->flags = flags;
diff --git a/controls/static.c b/controls/static.c
index d08979a..cce770c 100644
--- a/controls/static.c
+++ b/controls/static.c
@@ -238,7 +238,7 @@
 /*
  * FIXME
  *           DestroyIcon32( STATIC_SetIcon( wndPtr, 0 ) );
- * 
+ *
  * We don't want to do this yet because DestroyIcon32 is broken. If the icon
  * had already been loaded by the application the last thing we want to do is
  * GlobalFree16 the handle.
@@ -292,7 +292,7 @@
             STATIC_SetIcon(hwnd, hIcon, style);
 	    break;
 	}
-        case SS_BITMAP: 
+        case SS_BITMAP:
 	{
 	    HBITMAP hBitmap;
 	    if(unicode)
@@ -485,7 +485,7 @@
     HBRUSH hBrush;
 
     GetClientRect( hwnd, &rc);
-    
+
     switch (style & SS_TYPEMASK)
     {
     case SS_BLACKRECT:
diff --git a/controls/uitools.c b/controls/uitools.c
index 68fb2f9..1be5dae 100644
--- a/controls/uitools.c
+++ b/controls/uitools.c
@@ -103,9 +103,9 @@
 
 static const signed char LTRBInnerFlat[] = {
     -1, -1,              -1,              -1,
-    -1, COLOR_BTNFACE,     COLOR_BTNFACE,     COLOR_BTNFACE,    
-    -1, COLOR_BTNFACE,     COLOR_BTNFACE,     COLOR_BTNFACE,    
-    -1, COLOR_BTNFACE,     COLOR_BTNFACE,     COLOR_BTNFACE,    
+    -1, COLOR_BTNFACE,     COLOR_BTNFACE,     COLOR_BTNFACE,
+    -1, COLOR_BTNFACE,     COLOR_BTNFACE,     COLOR_BTNFACE,
+    -1, COLOR_BTNFACE,     COLOR_BTNFACE,     COLOR_BTNFACE,
 };
 
 /***********************************************************************
@@ -117,7 +117,7 @@
  *
  * See also comments with UITOOLS_DrawRectEdge()
  */
-static BOOL UITOOLS95_DrawDiagEdge(HDC hdc, LPRECT rc, 
+static BOOL UITOOLS95_DrawDiagEdge(HDC hdc, LPRECT rc,
 				     UINT uType, UINT uFlags)
 {
     POINT Points[4];
@@ -140,7 +140,7 @@
     OuterPen = InnerPen = (HPEN)GetStockObject(NULL_PEN);
     SavePen = (HPEN)SelectObject(hdc, InnerPen);
     spx = spy = epx = epy = 0; /* Satisfy the compiler... */
-    
+
     /* Determine the colors of the edges */
     if(uFlags & BF_MONO)
     {
@@ -430,7 +430,7 @@
  */
 
 
-static BOOL UITOOLS95_DrawRectEdge(HDC hdc, LPRECT rc, 
+static BOOL UITOOLS95_DrawRectEdge(HDC hdc, LPRECT rc,
 				     UINT uType, UINT uFlags)
 {
     signed char LTInnerI, LTOuterI;
@@ -447,7 +447,7 @@
     BOOL retval = !(   ((uType & BDR_INNER) == BDR_INNER
                        || (uType & BDR_OUTER) == BDR_OUTER)
                       && !(uFlags & (BF_FLAT|BF_MONO)) );
-        
+
     /* Init some vars */
     LTInnerPen = LTOuterPen = RBInnerPen = RBOuterPen = (HPEN)GetStockObject(NULL_PEN);
     SavePen = (HPEN)SelectObject(hdc, LTInnerPen);
@@ -470,7 +470,7 @@
 	 * otherwise.
 	 *                                          Dennis Björklund, 10 June, 99
 	 */
-	if( TWEAK_WineLook == WIN98_LOOK && LTInnerI != -1 )	  
+	if( TWEAK_WineLook == WIN98_LOOK && LTInnerI != -1 )
             LTInnerI = RBInnerI = COLOR_BTNFACE;
     }
     else if(uFlags & BF_SOFT)
@@ -559,8 +559,8 @@
         if(uFlags & BF_BOTTOM) InnerRect.bottom -= add;
 
         if((uFlags & BF_MIDDLE) && retval)
-	{ 
-            FillRect(hdc, &InnerRect, GetSysColorBrush(uFlags & BF_MONO ? 
+	{
+            FillRect(hdc, &InnerRect, GetSysColorBrush(uFlags & BF_MONO ?
 						       COLOR_WINDOW : COLOR_BTNFACE));
 	}
 
@@ -944,8 +944,8 @@
     {
     case DFCS_CAPTIONCLOSE:
     {
-        /* The "X" is made by drawing a series of lines.  
-         * The number of lines drawn depends on the size 
+        /* The "X" is made by drawing a series of lines.
+         * The number of lines drawn depends on the size
          * of the bounding rect.  e.g. For a 6x5 inside rect,
          * two lines are drawn from top-left to bottom-right,
          * and two lines from top-right to bottom-left.
@@ -1145,7 +1145,7 @@
 
     /*
      * This fixes a problem with really tiny "scroll" buttons. In particular
-     * with the updown control. 
+     * with the updown control.
      * Making sure that the arrow is as least 3 pixels wide (or high).
      */
     if (tri == 0)
@@ -1405,7 +1405,7 @@
     /* Win95 doesn't support drawing in other mapping modes */
     if(GetMapMode(hdc) != MM_TEXT)
         return FALSE;
-        
+
     switch(uType)
     {
     case DFC_BUTTON:
diff --git a/debugger/break.c b/debugger/break.c
index 4f12579..63f8522 100644
--- a/debugger/break.c
+++ b/debugger/break.c
@@ -178,23 +178,23 @@
 void DEBUG_SetBreakpoints( BOOL set )
 {
    int		i;
-   
+
 #ifdef __i386__
    DEBUG_context.Dr7 &= ~DR7_LOCAL_ENABLE_MASK;
 #endif
-   
+
    for (i = 0; i < next_bp; i++)
    {
       if (!(breakpoints[i].refcount && breakpoints[i].enabled))
 	 continue;
-      
+
       switch (breakpoints[i].type) {
       case DBG_BREAK:
 	 {
 #ifdef __i386__
 	    char ch = set ? INT3 : breakpoints[i].u.b.opcode;
-	    
-	    if (!DEBUG_WRITE_MEM( (void*)DEBUG_ToLinear(&breakpoints[i].addr), 
+
+	    if (!DEBUG_WRITE_MEM( (void*)DEBUG_ToLinear(&breakpoints[i].addr),
 				  &ch, sizeof(ch) ))
 	    {
 	       DEBUG_Printf(DBG_CHN_MESG, "Invalid address for breakpoint %d, disabling it\n", i);
@@ -204,14 +204,14 @@
 	 }
 	 break;
       case DBG_WATCH:
-	 if (set) 
+	 if (set)
 	 {
 #ifdef __i386__
 	    DWORD	bits;
 	    int		reg = breakpoints[i].u.w.reg;
 	    LPDWORD	lpdr = NULL;
 
-	    switch (reg) 
+	    switch (reg)
 	    {
 	       case 0: lpdr = &DEBUG_context.Dr0; break;
 	       case 1: lpdr = &DEBUG_context.Dr1; break;
@@ -219,7 +219,7 @@
 	       case 3: lpdr = &DEBUG_context.Dr3; break;
 	       default: RaiseException(DEBUG_STATUS_INTERNAL_ERROR, 0, 0, NULL);
 	    }
-	    
+
 	    *lpdr = DEBUG_ToLinear(&breakpoints[i].addr);
 	    bits = (breakpoints[i].u.w.rw) ? DR7_RW_WRITE : DR7_RW_READ;
 	    switch (breakpoints[i].u.w.len + 1)
@@ -229,7 +229,7 @@
 	       case 1: bits |= DR7_LEN_1;	break;
 	       default: RaiseException(DEBUG_STATUS_INTERNAL_ERROR, 0, 0, NULL);
 	    }
-	    
+
 	    DEBUG_context.Dr7 &= ~(0x0F << (DR7_CONTROL_SHIFT + DR7_CONTROL_SIZE * reg));
 	    DEBUG_context.Dr7 |= bits << (DR7_CONTROL_SHIFT + DR7_CONTROL_SIZE * reg);
 	    DEBUG_context.Dr7 |= DR7_ENABLE_MASK(reg) | DR7_LOCAL_SLOWDOWN;
@@ -246,22 +246,22 @@
  * Find the breakpoint for a given address. Return the breakpoint
  * number or -1 if none.
  * If type is DBG_BREAKPOINT, addr is a complete addr
- * If type is DBG_WATCHPOINT, only addr.off is meaningful and contains 
+ * If type is DBG_WATCHPOINT, only addr.off is meaningful and contains
  * linear address
  */
 static int DEBUG_FindBreakpoint( const DBG_ADDR *addr, int type )
 {
    int i;
-   
+
    for (i = 0; i < next_bp; i++)
    {
       if (breakpoints[i].refcount && breakpoints[i].enabled &&
 	  breakpoints[i].type == type )
       {
-	 if ((type == DBG_BREAK && 
+	 if ((type == DBG_BREAK &&
 	      breakpoints[i].addr.seg == addr->seg &&
 	      breakpoints[i].addr.off == addr->off) ||
-	     (type == DBG_WATCH && 
+	     (type == DBG_WATCH &&
 	      DEBUG_ToLinear(&breakpoints[i].addr) == addr->off))
 	    return i;
       }
@@ -277,11 +277,11 @@
 static	int	DEBUG_InitXPoint(int type, DBG_ADDR* addr)
 {
    int	num;
-   
-   for (num = (next_bp < MAX_BREAKPOINTS) ? next_bp++ : 1; 
-	num < MAX_BREAKPOINTS; num++) 
+
+   for (num = (next_bp < MAX_BREAKPOINTS) ? next_bp++ : 1;
+	num < MAX_BREAKPOINTS; num++)
    {
-      if (breakpoints[num].refcount == 0) 
+      if (breakpoints[num].refcount == 0)
       {
           breakpoints[num].refcount = 1;
           breakpoints[num].enabled = TRUE;
@@ -316,12 +316,12 @@
 static	BOOL	DEBUG_GetWatchedValue( int num, LPDWORD val )
 {
    BYTE		buf[4];
-   
-   if (!DEBUG_READ_MEM((void*)DEBUG_ToLinear(&breakpoints[num].addr), 
+
+   if (!DEBUG_READ_MEM((void*)DEBUG_ToLinear(&breakpoints[num].addr),
 		       buf, breakpoints[num].u.w.len + 1))
       return FALSE;
-   
-   switch (breakpoints[num].u.w.len + 1) 
+
+   switch (breakpoints[num].u.w.len + 1)
    {
       case 4:	*val = *(DWORD*)buf;	break;
       case 2:	*val = *(WORD*)buf;	break;
@@ -355,7 +355,7 @@
         value.addr.seg = seg2;
     }
 
-    if ((num = DEBUG_FindBreakpoint(&value.addr, DBG_BREAK)) >= 1) 
+    if ((num = DEBUG_FindBreakpoint(&value.addr, DBG_BREAK)) >= 1)
     {
        breakpoints[num].refcount++;
        return;
@@ -401,7 +401,7 @@
 	 return;
       }
    }
-   DEBUG_CurrProcess->delayed_bp = DBG_realloc(DEBUG_CurrProcess->delayed_bp, 
+   DEBUG_CurrProcess->delayed_bp = DBG_realloc(DEBUG_CurrProcess->delayed_bp,
 					       sizeof(DBG_DELAYED_BP) * ++DEBUG_CurrProcess->num_delayed_bp);
 
    DEBUG_CurrProcess->delayed_bp[DEBUG_CurrProcess->num_delayed_bp - 1].name = strcpy(DBG_alloc(strlen(name) + 1), name);
@@ -416,12 +416,12 @@
 void	DEBUG_AddBreakpointFromLineno(int lineno)
 {
    DBG_VALUE 			value;
-   
+
    DEBUG_GetCurrentAddress(&value.addr);
-   
+
    if (lineno != -1) {
       struct name_hash*	nh;
-      
+
       DEBUG_FindNearestSymbol(&value.addr, TRUE, &nh, 0, NULL);
       if (nh == NULL) {
 	 DEBUG_Printf(DBG_CHN_MESG, "Unable to add breakpoint\n");
@@ -429,7 +429,7 @@
       }
       DEBUG_GetLineNumberAddr(nh, lineno, &value.addr, TRUE);
    }
-   
+
    value.type = NULL;
    value.cookie = DV_TARGET;
    DEBUG_AddBreakpoint( &value, NULL );
@@ -467,13 +467,13 @@
    int		num, reg = -1;
    unsigned	seg2;
    DWORD	mask = 0;
-   
+
    assert(_value->cookie == DV_TARGET || _value->cookie == DV_HOST);
 
 #ifdef __i386__
    DEBUG_FixAddress( &value.addr, DEBUG_context.SegCs );
 #endif
-   
+
    if ( value.type != NULL && value.type == DEBUG_GetBasicType(DT_BASIC_CONST_INT) )
    {
       /*
@@ -486,10 +486,10 @@
       value.addr.off = DEBUG_GetExprValue(&value, NULL);
       value.addr.seg = seg2;
    }
-   
-   for (num = 1; num < next_bp; num++) 
+
+   for (num = 1; num < next_bp; num++)
    {
-      if (breakpoints[num].refcount && breakpoints[num].enabled && 
+      if (breakpoints[num].refcount && breakpoints[num].enabled &&
 	  breakpoints[num].type == DBG_WATCH) {
 	 mask |= (1 << breakpoints[num].u.w.reg);
       }
@@ -505,12 +505,12 @@
 
    if ((num = DEBUG_InitXPoint(DBG_WATCH, &value.addr)) == -1)
       return;
-   
+
    breakpoints[num].u.w.len = 4 - 1;
    if (_value->type && DEBUG_GetObjectSize(_value->type) < 4)
       breakpoints[num].u.w.len = 2 - 1;
-   
-   if (!DEBUG_GetWatchedValue( num, &breakpoints[num].u.w.oldval)) 
+
+   if (!DEBUG_GetWatchedValue( num, &breakpoints[num].u.w.oldval))
    {
       DEBUG_Printf(DBG_CHN_MESG, "Bad address. Watchpoint not set\n");
       breakpoints[num].refcount = 0;
@@ -519,7 +519,7 @@
    {
       breakpoints[num].u.w.rw = (is_write) ? TRUE : FALSE;
       breakpoints[reg].u.w.reg = reg;
-   
+
       DEBUG_Printf( DBG_CHN_MESG, "Watchpoint %d at ", num );
       DEBUG_PrintAddress( &breakpoints[num].addr, breakpoints[num].is32 ? MODE_32 : MODE_16, TRUE );
       DEBUG_Printf( DBG_CHN_MESG, "\n" );
@@ -534,7 +534,7 @@
 void	DEBUG_AddWatchpointFromId(const char *name)
 {
    DBG_VALUE value;
-   
+
    if( DEBUG_GetSymbolValue(name, -1, &value, TRUE) )
       DEBUG_AddWatchpoint( &value, 1 );
    else
@@ -593,7 +593,7 @@
  * 	the value watched before the TRAP
  * Return -1 if none found (*oldval is undetermined)
  *
- * Unfortunately, Linux does *NOT* (A REAL PITA) report with ptrace 
+ * Unfortunately, Linux does *NOT* (A REAL PITA) report with ptrace
  * the DR6 register value, so we have to look with our own need the
  * cause of the TRAP.
  * -EP
@@ -603,20 +603,20 @@
    int				found = -1;
 #ifdef __i386__
    int 				i;
-   
+
    /* Method 1 => get triggered watchpoint from context (doesn't work on Linux
     * 2.2.x). This should be fixed in >= 2.2.16
     */
-   for (i = 0; i < next_bp; i++) 
+   for (i = 0; i < next_bp; i++)
    {
       DWORD val = 0;
 
-      if (breakpoints[i].refcount && breakpoints[i].enabled && 
+      if (breakpoints[i].refcount && breakpoints[i].enabled &&
 	  breakpoints[i].type == DBG_WATCH &&
 	  (DEBUG_context.Dr6 & (1 << breakpoints[i].u.w.reg)))
       {
 	 DEBUG_context.Dr6 &= ~(1 << breakpoints[i].u.w.reg);
-	 
+
 	 *oldval = breakpoints[i].u.w.oldval;
 	 if (DEBUG_GetWatchedValue(i, &val)) {
 	    breakpoints[i].u.w.oldval = val;
@@ -624,23 +624,23 @@
 	 }
       }
    }
-   
+
    /* Method 1 failed, trying method 2 */
-   
+
    /* Method 2 => check if value has changed among registered watchpoints
     * this really sucks, but this is how gdb 4.18 works on my linux box
     * -EP
     */
-   for (i = 0; i < next_bp; i++) 
+   for (i = 0; i < next_bp; i++)
    {
       DWORD val = 0;
 
-      if (breakpoints[i].refcount && breakpoints[i].enabled && 
-	  breakpoints[i].type == DBG_WATCH && 
-	  DEBUG_GetWatchedValue(i, &val)) 
+      if (breakpoints[i].refcount && breakpoints[i].enabled &&
+	  breakpoints[i].type == DBG_WATCH &&
+	  DEBUG_GetWatchedValue(i, &val))
       {
 	 *oldval = breakpoints[i].u.w.oldval;
-	 if (val != *oldval) 
+	 if (val != *oldval)
 	 {
 	    DEBUG_context.Dr6 &= ~(1 << breakpoints[i].u.w.reg);
 	    breakpoints[i].u.w.oldval = val;
@@ -671,7 +671,7 @@
         if (breakpoints[i].refcount && breakpoints[i].type == DBG_BREAK)
         {
             DEBUG_Printf( DBG_CHN_MESG, "%d: %c ", i, breakpoints[i].enabled ? 'y' : 'n');
-            DEBUG_PrintAddress( &breakpoints[i].addr, 
+            DEBUG_PrintAddress( &breakpoints[i].addr,
 				breakpoints[i].is32 ? MODE_32 : MODE_16, TRUE);
             DEBUG_Printf( DBG_CHN_MESG, " (%u)\n", breakpoints[i].refcount );
 	    if( breakpoints[i].condition != NULL )
@@ -688,10 +688,10 @@
         if (breakpoints[i].refcount && breakpoints[i].type == DBG_WATCH)
         {
             DEBUG_Printf( DBG_CHN_MESG, "%d: %c ", i, breakpoints[i].enabled ? 'y' : 'n');
-            DEBUG_PrintAddress( &breakpoints[i].addr, 
+            DEBUG_PrintAddress( &breakpoints[i].addr,
 				breakpoints[i].is32 ? MODE_32 : MODE_16, TRUE);
-            DEBUG_Printf( DBG_CHN_MESG, " on %d byte%s (%c)\n", 
-		     breakpoints[i].u.w.len + 1, 
+            DEBUG_Printf( DBG_CHN_MESG, " on %d byte%s (%c)\n",
+		     breakpoints[i].u.w.len + 1,
 		     breakpoints[i].u.w.len > 0 ? "s" : "",
 		     breakpoints[i].u.w.rw ? 'W' : 'R');
 	    if( breakpoints[i].condition != NULL )
@@ -731,7 +731,7 @@
 	    return FALSE;
         }
     }
-   
+
     if ( breakpoints[bpnum].skipcount > 0 && --breakpoints[bpnum].skipcount > 0 )
         return FALSE;
 
@@ -775,7 +775,7 @@
         syminfo = DEBUG_PrintAddress( &breakpoints[bpnum].addr,
 				      breakpoints[bpnum].is32 ? MODE_32 : MODE_16, TRUE );
         DEBUG_Printf( DBG_CHN_MESG, "\n" );
-	
+
 	if( syminfo.list.sourcefile != NULL )
 	    DEBUG_List(&syminfo.list, NULL, 0);
         return FALSE;
@@ -785,7 +785,7 @@
     if ((wpnum != 0) && (wpnum != -1))
     {
        /* If not single-stepping, do not back up over the int3 instruction */
-       if (code == EXCEPTION_BREAKPOINT) 
+       if (code == EXCEPTION_BREAKPOINT)
        {
 #ifdef __i386__
 	   DEBUG_context.Eip++;
@@ -793,12 +793,12 @@
 #endif
        }
        if (!DEBUG_ShallBreak(wpnum)) return TRUE;
-       
+
        addr_mode = DEBUG_GetSelectorType( addr->seg );
        DEBUG_Printf(DBG_CHN_MESG, "Stopped on watchpoint %d at ", wpnum);
        syminfo = DEBUG_PrintAddress( addr, addr_mode, TRUE );
-       
-       DEBUG_Printf(DBG_CHN_MESG, " values: old=%lu new=%lu\n", 
+
+       DEBUG_Printf(DBG_CHN_MESG, " values: old=%lu new=%lu\n",
 	       oldval, breakpoints[wpnum].u.w.oldval);
        if (syminfo.list.sourcefile != NULL)
 	  DEBUG_List(&syminfo.list, NULL, 0);
@@ -829,7 +829,7 @@
 	 */
 	return TRUE;
     }
-    
+
     /*
      * If we are about to stop, then print out the source line if we
      * have it.
@@ -893,7 +893,7 @@
      */
     ret_mode = mode = DEBUG_CurrThread->exec_mode;
 
-    bp = DEBUG_FindBreakpoint( &addr, DBG_BREAK ); 
+    bp = DEBUG_FindBreakpoint( &addr, DBG_BREAK );
     if ( bp != -1 && bp != 0)
       {
 	/*
@@ -912,7 +912,7 @@
 	    DEBUG_Printf(DBG_CHN_MESG, "Not stopped at any breakpoint; argument ignored.\n");
 	  }
       }
-    
+
     if( mode == EXEC_FINISH && DEBUG_IsFctReturn() )
       {
 	mode = ret_mode = EXEC_STEPI_INSTR;
@@ -932,7 +932,7 @@
 	addr2 = addr;
 	DEBUG_Disasm(&addr2, FALSE);
 	addr2.off += delta;
-	
+
 	status = DEBUG_CheckLinenoStatus(&addr2);
 	/*
 	 * Anytime we have a trampoline, step over it.
@@ -946,7 +946,7 @@
 #endif
 	    mode = EXEC_STEP_OVER_TRAMPOLINE;
 	  }
-	
+
 	if( mode == EXEC_STEP_INSTR && status == FUNC_HAS_NO_LINES )
 	  {
 #if 0
@@ -964,7 +964,7 @@
 	  {
 	    DEBUG_Printf(DBG_CHN_MESG, "Single stepping until exit from function, \n");
 	    DEBUG_Printf(DBG_CHN_MESG, "which has no line number information.\n");
-	    
+
 	    ret_mode = mode = EXEC_FINISH;
 	  }
       }
@@ -986,8 +986,8 @@
        * address just after the call.
        */
 #ifdef __i386__
-      DEBUG_READ_MEM((void*)(DEBUG_context.Esp + 
-			     2 * sizeof(unsigned int)), 
+      DEBUG_READ_MEM((void*)(DEBUG_context.Esp +
+			     2 * sizeof(unsigned int)),
 		     &addr.off, sizeof(addr.off));
       DEBUG_context.EFlags &= ~STEP_FLAG;
 #endif
@@ -995,7 +995,7 @@
       breakpoints[0].enabled = TRUE;
       breakpoints[0].refcount = 1;
       breakpoints[0].skipcount = 0;
-      DEBUG_READ_MEM((void*)DEBUG_ToLinear( &addr ), &breakpoints[0].u.b.opcode, 
+      DEBUG_READ_MEM((void*)DEBUG_ToLinear( &addr ), &breakpoints[0].u.b.opcode,
 		     sizeof(char));
       DEBUG_SetBreakpoints( TRUE );
       break;
diff --git a/debugger/db_disasm.c b/debugger/db_disasm.c
index fcbd6d3..99945a1 100644
--- a/debugger/db_disasm.c
+++ b/debugger/db_disasm.c
@@ -1,25 +1,25 @@
-/* 
+/*
  * Mach Operating System
  * Copyright (c) 1991,1990 Carnegie Mellon University
  * All Rights Reserved.
- * 
+ *
  * Permission to use, copy, modify and distribute this software and its
  * documentation is hereby granted, provided that both the copyright
  * notice and this permission notice appear in all copies of the
  * software, derivative works or modified versions, and any portions
  * thereof, and that both notices appear in supporting documentation.
- * 
+ *
  * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
  * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
  * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- * 
+ *
  * Carnegie Mellon requests users of this software to return to
- * 
+ *
  *  Software Distribution Coordinator  or  Software.Distribution@CS.CMU.EDU
  *  School of Computer Science
  *  Carnegie Mellon University
  *  Pittsburgh PA 15213-3890
- * 
+ *
  * any improvements or extensions that they make and grant Carnegie Mellon
  * the rights to redistribute these changes.
  */
@@ -30,23 +30,23 @@
  * 	Add a switch to disassemble 16-bit code.
  * 	Fix spelling of 'lods' opcodes.
  * 	[91/10/30            dbg]
- * 
+ *
  * Revision 2.5  91/10/09  16:05:58  af
  * 	Supported disassemble of non current task by passing task parameter.
  * 	[91/08/29            tak]
- * 
+ *
  * Revision 2.4  91/05/14  16:05:04  mrt
  * 	Correcting copyright
- * 
+ *
  * Revision 2.3  91/02/05  17:11:03  mrt
  * 	Changed to new Mach copyright
  * 	[91/02/01  17:31:03  mrt]
- * 
+ *
  * Revision 2.2  90/08/27  21:55:56  dbg
  * 	Fix register operand for move to/from control/test/debug
  * 	register instructions.  Add i486 instructions.
  * 	[90/08/27            dbg]
- * 
+ *
  * 	Import db_sym.h.  Print instruction displacements in
  * 	current radix (signed).  Change calling sequence of
  * 	db_disasm.
@@ -55,7 +55,7 @@
  * 	[90/08/08            dbg]
  * 	Created.
  * 	[90/07/25            dbg]
- * 
+ *
  */
 
 /*
@@ -280,23 +280,23 @@
 };
 
 static const struct inst db_inst_0f4x[] = {
-/*40*/	{ "cmovo", TRUE,  NONE,  op2(E, R), 0 }, 
-/*41*/	{ "cmovno", TRUE, NONE,  op2(E, R),	0 }, 
-/*42*/	{ "cmovnae",TRUE, NONE,  op2(E, R), 0 }, 
-/*43*/	{ "cmovnb", TRUE, NONE,  op2(E, R),	0 }, 
-/*44*/	{ "cmove", TRUE,  NONE,  op2(E, R), 0 }, 
-/*45*/	{ "cmovne", TRUE, NONE,  op2(E, R), 0 }, 
-/*46*/	{ "cmovna", TRUE, NONE,  op2(E, R), 0 }, 
-/*47*/	{ "cmova",  TRUE, NONE,  op2(E, R), 0 }, 
+/*40*/	{ "cmovo", TRUE,  NONE,  op2(E, R), 0 },
+/*41*/	{ "cmovno", TRUE, NONE,  op2(E, R),	0 },
+/*42*/	{ "cmovnae",TRUE, NONE,  op2(E, R), 0 },
+/*43*/	{ "cmovnb", TRUE, NONE,  op2(E, R),	0 },
+/*44*/	{ "cmove", TRUE,  NONE,  op2(E, R), 0 },
+/*45*/	{ "cmovne", TRUE, NONE,  op2(E, R), 0 },
+/*46*/	{ "cmovna", TRUE, NONE,  op2(E, R), 0 },
+/*47*/	{ "cmova",  TRUE, NONE,  op2(E, R), 0 },
 
-/*48*/	{ "cmovs", TRUE,  NONE,  op2(E, R), 0 }, 
-/*49*/	{ "cmovns", TRUE, NONE,  op2(E, R), 0 }, 
-/*4a*/	{ "cmovpe", TRUE, NONE,  op2(E, R), 0 }, 
-/*4b*/	{ "cmovpo", TRUE, NONE,  op2(E, R), 0 }, 
-/*4c*/	{ "cmovl", TRUE,  NONE,  op2(E, R), 0 }, 
-/*4d*/	{ "cmovge", TRUE, NONE,  op2(E, R), 0 }, 
-/*4e*/	{ "cmovle", TRUE, NONE,  op2(E, R), 0 }, 
-/*4f*/	{ "cmovnle",TRUE, NONE,  op2(E, R), 0 }, 
+/*48*/	{ "cmovs", TRUE,  NONE,  op2(E, R), 0 },
+/*49*/	{ "cmovns", TRUE, NONE,  op2(E, R), 0 },
+/*4a*/	{ "cmovpe", TRUE, NONE,  op2(E, R), 0 },
+/*4b*/	{ "cmovpo", TRUE, NONE,  op2(E, R), 0 },
+/*4c*/	{ "cmovl", TRUE,  NONE,  op2(E, R), 0 },
+/*4d*/	{ "cmovge", TRUE, NONE,  op2(E, R), 0 },
+/*4e*/	{ "cmovle", TRUE, NONE,  op2(E, R), 0 },
+/*4f*/	{ "cmovnle",TRUE, NONE,  op2(E, R), 0 },
 };
 
 static const struct inst db_inst_0f5x[] = {
@@ -320,43 +320,43 @@
 };
 
 static const struct inst db_inst_0f6x[] = {
-/*60*/	{ "punpcklbw", TRUE, NONE,  op2(E, MX), 0 }, 
-/*61*/	{ "punpcklwd", TRUE, NONE,  op2(E, MX),	0 }, 
-/*62*/	{ "punpckldq", TRUE, NONE,  op2(E, MX), 0 }, 
-/*63*/	{ "packsswb",  TRUE, NONE,  op2(E, MX),	0 }, 
-/*64*/	{ "pcmpgtb",   TRUE, NONE,  op2(E, MX), 0 }, 
-/*65*/	{ "pcmpgtw",   TRUE, NONE,  op2(E, MX), 0 }, 
-/*66*/	{ "pcmpgtd",   TRUE, NONE,  op2(E, MX), 0 }, 
-/*67*/	{ "packuswb",  TRUE, NONE,  op2(E, MX), 0 }, 
+/*60*/	{ "punpcklbw", TRUE, NONE,  op2(E, MX), 0 },
+/*61*/	{ "punpcklwd", TRUE, NONE,  op2(E, MX),	0 },
+/*62*/	{ "punpckldq", TRUE, NONE,  op2(E, MX), 0 },
+/*63*/	{ "packsswb",  TRUE, NONE,  op2(E, MX),	0 },
+/*64*/	{ "pcmpgtb",   TRUE, NONE,  op2(E, MX), 0 },
+/*65*/	{ "pcmpgtw",   TRUE, NONE,  op2(E, MX), 0 },
+/*66*/	{ "pcmpgtd",   TRUE, NONE,  op2(E, MX), 0 },
+/*67*/	{ "packuswb",  TRUE, NONE,  op2(E, MX), 0 },
 
-/*68*/	{ "punpckhbw", TRUE, NONE,  op2(E, MX), 0 }, 
-/*69*/	{ "punpckhwd", TRUE, NONE,  op2(E, MX), 0 }, 
-/*6a*/	{ "punpckhdq", TRUE, NONE,  op2(E, MX), 0 }, 
-/*6b*/	{ "packssdw",  TRUE, NONE,  op2(E, MX), 0 }, 
-/*6c*/	{ "(bad)",     TRUE, NONE,  0, 0 }, 
-/*6d*/	{ "(bad)",     TRUE, NONE,  0, 0 }, 
-/*6e*/	{ "movd",      TRUE, NONE,  op2(E, MX), 0 }, 
-/*6f*/	{ "movq",      TRUE, NONE,  op2(E, MX), 0 }, 
+/*68*/	{ "punpckhbw", TRUE, NONE,  op2(E, MX), 0 },
+/*69*/	{ "punpckhwd", TRUE, NONE,  op2(E, MX), 0 },
+/*6a*/	{ "punpckhdq", TRUE, NONE,  op2(E, MX), 0 },
+/*6b*/	{ "packssdw",  TRUE, NONE,  op2(E, MX), 0 },
+/*6c*/	{ "(bad)",     TRUE, NONE,  0, 0 },
+/*6d*/	{ "(bad)",     TRUE, NONE,  0, 0 },
+/*6e*/	{ "movd",      TRUE, NONE,  op2(E, MX), 0 },
+/*6f*/	{ "movq",      TRUE, NONE,  op2(E, MX), 0 },
 };
 
 static const struct inst db_inst_0f7x[] = {
-/*70*/	{ "pshufw",    TRUE, NONE,  op2(MX, EMX), 0 }, 
+/*70*/	{ "pshufw",    TRUE, NONE,  op2(MX, EMX), 0 },
 /*71*/	{ "(grp10)",   TRUE, BYTE,  op2(EMX, I), (char*)db_Grp10 },
-/*72*/	{ "(grp11)",   TRUE, BYTE,  op2(EMX, I), (char*)db_Grp11 }, 
-/*73*/	{ "(grp12)",   TRUE, BYTE,  op2(EMX, I), (char*)db_Grp12 }, 
-/*74*/	{ "pcmpeqb",   TRUE, NONE,  op2(E, MX), 0 }, 
-/*75*/	{ "pcmpeqw",   TRUE, NONE,  op2(E, MX), 0 }, 
-/*76*/	{ "pcmpeqd",   TRUE, NONE,  op2(E, MX), 0 }, 
-/*77*/	{ "emms",      FALSE,NONE,  0, 0 }, 
+/*72*/	{ "(grp11)",   TRUE, BYTE,  op2(EMX, I), (char*)db_Grp11 },
+/*73*/	{ "(grp12)",   TRUE, BYTE,  op2(EMX, I), (char*)db_Grp12 },
+/*74*/	{ "pcmpeqb",   TRUE, NONE,  op2(E, MX), 0 },
+/*75*/	{ "pcmpeqw",   TRUE, NONE,  op2(E, MX), 0 },
+/*76*/	{ "pcmpeqd",   TRUE, NONE,  op2(E, MX), 0 },
+/*77*/	{ "emms",      FALSE,NONE,  0, 0 },
 
-/*78*/	{ "(bad)",     TRUE, NONE,  0, 0 }, 
-/*79*/	{ "(bad)",     TRUE, NONE,  0, 0 }, 
-/*7a*/	{ "(bad)",     TRUE, NONE,  0, 0 }, 
-/*7b*/	{ "(bad)",     TRUE, NONE,  0, 0 }, 
-/*7c*/	{ "(bad)",     TRUE, NONE,  0, 0 }, 
-/*7d*/	{ "(bad)",     TRUE, NONE,  0, 0 }, 
-/*7e*/	{ "movd",      TRUE, NONE,  op2(E, MX), 0 }, 
-/*7f*/	{ "movq",      TRUE, NONE,  op2(EMX, MX), 0 }, 
+/*78*/	{ "(bad)",     TRUE, NONE,  0, 0 },
+/*79*/	{ "(bad)",     TRUE, NONE,  0, 0 },
+/*7a*/	{ "(bad)",     TRUE, NONE,  0, 0 },
+/*7b*/	{ "(bad)",     TRUE, NONE,  0, 0 },
+/*7c*/	{ "(bad)",     TRUE, NONE,  0, 0 },
+/*7d*/	{ "(bad)",     TRUE, NONE,  0, 0 },
+/*7e*/	{ "movd",      TRUE, NONE,  op2(E, MX), 0 },
+/*7f*/	{ "movq",      TRUE, NONE,  op2(EMX, MX), 0 },
 };
 
 static const struct inst db_inst_0f8x[] = {
@@ -1209,11 +1209,11 @@
 	    if (addrp->index)
 		DEBUG_Printf(DBG_CHN_MESG,",%s,%d", addrp->index, 1<<addrp->ss);
 	    DEBUG_Printf(DBG_CHN_MESG,")");
-	} 
+	}
 	else {
 
 	    /* try to get destination of indirect call
-	       does not work for segmented adresses */	
+	       does not work for segmented adresses */
 	    if (!seg && byref) {
 	       void*	a1;
 	       void*	a2;
@@ -1812,7 +1812,7 @@
 			  {
 			    DEBUG_PrintAddress( &address, short_addr ? MODE_16 : MODE_32, TRUE );
 			  }
-		      
+
                     }
 		    break;
 	    }
diff --git a/debugger/debugger.h b/debugger/debugger.h
index ff5e2bf..833c63c 100644
--- a/debugger/debugger.h
+++ b/debugger/debugger.h
@@ -40,22 +40,22 @@
 #define SYM_TRAMPOLINE	 0x10
 #define SYM_STEP_THROUGH 0x20
 
-enum	debug_type {DT_BASIC, DT_POINTER, DT_ARRAY, DT_STRUCT, DT_ENUM, 
+enum	debug_type {DT_BASIC, DT_POINTER, DT_ARRAY, DT_STRUCT, DT_ENUM,
 		    DT_FUNC, DT_BITFIELD};
 
-enum    debug_type_basic {DT_BASIC_INT = 1, DT_BASIC_CHAR, DT_BASIC_LONGINT, DT_BASIC_UINT, 
-                          DT_BASIC_ULONGINT, DT_BASIC_LONGLONGINT, DT_BASIC_ULONGLONGINT, 
-                          DT_BASIC_SHORTINT, DT_BASIC_USHORTINT, DT_BASIC_SCHAR, DT_BASIC_UCHAR, 
-                          DT_BASIC_FLOAT, DT_BASIC_LONGDOUBLE, DT_BASIC_DOUBLE, 
-                          DT_BASIC_CMPLX_INT, DT_BASIC_CMPLX_FLOAT, DT_BASIC_CMPLX_DOUBLE, 
-                          DT_BASIC_CMPLX_LONGDOUBLE, DT_BASIC_VOID, 
+enum    debug_type_basic {DT_BASIC_INT = 1, DT_BASIC_CHAR, DT_BASIC_LONGINT, DT_BASIC_UINT,
+                          DT_BASIC_ULONGINT, DT_BASIC_LONGLONGINT, DT_BASIC_ULONGLONGINT,
+                          DT_BASIC_SHORTINT, DT_BASIC_USHORTINT, DT_BASIC_SCHAR, DT_BASIC_UCHAR,
+                          DT_BASIC_FLOAT, DT_BASIC_LONGDOUBLE, DT_BASIC_DOUBLE,
+                          DT_BASIC_CMPLX_INT, DT_BASIC_CMPLX_FLOAT, DT_BASIC_CMPLX_DOUBLE,
+                          DT_BASIC_CMPLX_LONGDOUBLE, DT_BASIC_VOID,
                           /* modifier on size isn't possible on current types definitions
                            * so we need to add more types... */
-                          DT_BASIC_BOOL1, DT_BASIC_BOOL2, DT_BASIC_BOOL4, 
+                          DT_BASIC_BOOL1, DT_BASIC_BOOL2, DT_BASIC_BOOL4,
                           /* this is not really a basic type... */
-                          DT_BASIC_STRING, 
+                          DT_BASIC_STRING,
                           /* this is for historical reasons... should take care of it RSN */
-                          DT_BASIC_CONST_INT, 
+                          DT_BASIC_CONST_INT,
                           /* to be kept as last... sentinel entry... do not use */
                           DT_BASIC_LAST};
 
@@ -85,7 +85,7 @@
 #	define	DV_HOST		0x50DA
 #	define	DV_INVALID      0x0000
 
-   DBG_ADDR		addr;	
+   DBG_ADDR		addr;
 } DBG_VALUE;
 
 struct list_id
@@ -157,7 +157,7 @@
 typedef struct
 {
     DBG_ADDR      addr;
-    WORD	  enabled : 1, 
+    WORD	  enabled : 1,
                   type : 1,
                   is32 : 1,
                   refcount : 13;
@@ -347,7 +347,7 @@
 extern int DEBUG_DisplayExpr(const struct expr * exp);
 
   /* debugger/hash.c */
-extern struct name_hash * DEBUG_AddSymbol( const char *name, 
+extern struct name_hash * DEBUG_AddSymbol( const char *name,
 					   const DBG_VALUE *addr,
 					   const char *sourcefile,
 					   int flags);
@@ -359,37 +359,37 @@
 					     unsigned int ebp,
 					     struct list_id * source);
 extern void DEBUG_ReadSymbolTable( const char * filename );
-extern void DEBUG_AddLineNumber( struct name_hash * func, int line_num, 
+extern void DEBUG_AddLineNumber( struct name_hash * func, int line_num,
 				 unsigned long offset );
 extern struct wine_locals *
-            DEBUG_AddLocal( struct name_hash * func, int regno, 
+            DEBUG_AddLocal( struct name_hash * func, int regno,
 			    int offset,
 			    int pc_start,
 			    int pc_end,
 			    char * name);
 extern int DEBUG_CheckLinenoStatus(const DBG_ADDR *addr);
-extern void DEBUG_GetFuncInfo(struct list_id * ret, const char * file, 
+extern void DEBUG_GetFuncInfo(struct list_id * ret, const char * file,
 			      const char * func);
 extern int DEBUG_SetSymbolSize(struct name_hash * sym, unsigned int len);
 extern int DEBUG_SetSymbolBPOff(struct name_hash * sym, unsigned int len);
 extern int DEBUG_GetSymbolAddr(struct name_hash * sym, DBG_ADDR * addr);
 extern int DEBUG_cmp_sym(const void * p1, const void * p2);
-extern BOOL DEBUG_GetLineNumberAddr( const struct name_hash *, const int lineno, 
+extern BOOL DEBUG_GetLineNumberAddr( const struct name_hash *, const int lineno,
 				     DBG_ADDR *addr, int bp_flag );
 
-extern int DEBUG_SetLocalSymbolType(struct wine_locals * sym, 
+extern int DEBUG_SetLocalSymbolType(struct wine_locals * sym,
 				    struct datatype * type);
 extern BOOL DEBUG_Normalize(struct name_hash * nh );
 
   /* debugger/info.c */
 extern void DEBUG_PrintBasic( const DBG_VALUE* value, int count, char format );
-extern struct symbol_info DEBUG_PrintAddress( const DBG_ADDR *addr, 
+extern struct symbol_info DEBUG_PrintAddress( const DBG_ADDR *addr,
 					      enum dbg_mode mode, int flag );
 extern void DEBUG_Help(void);
 extern void DEBUG_HelpInfo(void);
-extern struct symbol_info DEBUG_PrintAddressAndArgs( const DBG_ADDR *addr, 
+extern struct symbol_info DEBUG_PrintAddressAndArgs( const DBG_ADDR *addr,
 						     enum dbg_mode mode,
-						     unsigned int ebp, 
+						     unsigned int ebp,
 						     int flag );
 extern void DEBUG_InfoClass(const char* clsName);
 extern void DEBUG_WalkClasses(void);
@@ -425,27 +425,27 @@
   /* debugger/module.c */
 extern int  DEBUG_LoadEntryPoints( const char * prefix );
 extern void DEBUG_LoadModule32( const char* name, HANDLE hFile, DWORD base );
-extern DBG_MODULE* DEBUG_AddModule(const char* name, enum DbgModuleType type, 
+extern DBG_MODULE* DEBUG_AddModule(const char* name, enum DbgModuleType type,
 				   void* mod_addr, u_long size, HMODULE hmod);
 extern DBG_MODULE* DEBUG_FindModuleByName(const char* name, enum DbgModuleType type);
 extern DBG_MODULE* DEBUG_FindModuleByHandle(HANDLE handle, enum DbgModuleType type);
 extern DBG_MODULE* DEBUG_FindModuleByAddr(void* addr, enum DbgModuleType type);
 extern DBG_MODULE* DEBUG_GetProcessMainModule(DBG_PROCESS* process);
-extern DBG_MODULE* DEBUG_RegisterPEModule(HMODULE, u_long load_addr, u_long size, 
+extern DBG_MODULE* DEBUG_RegisterPEModule(HMODULE, u_long load_addr, u_long size,
 					  const char* name);
-extern DBG_MODULE* DEBUG_RegisterELFModule(u_long load_addr, u_long size, 
+extern DBG_MODULE* DEBUG_RegisterELFModule(u_long load_addr, u_long size,
 					   const char* name);
 extern enum DbgInfoLoad DEBUG_RegisterPEDebugInfo(DBG_MODULE* wmod, HANDLE hFile,
 						  void* _nth, unsigned long nth_ofs);
-extern void DEBUG_ReportDIL(enum DbgInfoLoad dil, const char* pfx, 
+extern void DEBUG_ReportDIL(enum DbgInfoLoad dil, const char* pfx,
 			    const char* filename, DWORD load_addr);
 extern void DEBUG_InfoShare(void);
 
   /* debugger/msc.c */
-extern enum DbgInfoLoad DEBUG_RegisterMSCDebugInfo(DBG_MODULE* module, HANDLE hFile, 
+extern enum DbgInfoLoad DEBUG_RegisterMSCDebugInfo(DBG_MODULE* module, HANDLE hFile,
 						   void* nth, unsigned long nth_ofs);
-extern enum DbgInfoLoad DEBUG_RegisterStabsDebugInfo(DBG_MODULE* module, 
-						     HANDLE hFile, void* nth, 
+extern enum DbgInfoLoad DEBUG_RegisterStabsDebugInfo(DBG_MODULE* module,
+						     HANDLE hFile, void* nth,
 						     unsigned long nth_ofs);
 extern void DEBUG_InitCVDataTypes(void);
 
@@ -456,7 +456,7 @@
   /* debugger/source.c */
 extern void DEBUG_ShowDir(void);
 extern void DEBUG_AddPath(const char * path);
-extern void DEBUG_List(struct list_id * line1, struct list_id * line2,  
+extern void DEBUG_List(struct list_id * line1, struct list_id * line2,
 		       int delta);
 extern void DEBUG_NukePath(void);
 extern void DEBUG_Disassemble(const DBG_VALUE *, const DBG_VALUE*, int offset);
@@ -467,40 +467,40 @@
 extern void DEBUG_BackTrace(DWORD threadID, BOOL noisy);
 extern int  DEBUG_InfoLocals(void);
 extern int  DEBUG_SetFrame(int newframe);
-extern int  DEBUG_GetCurrentFrame(struct name_hash ** name, 
+extern int  DEBUG_GetCurrentFrame(struct name_hash ** name,
 				  unsigned int * eip,
 				  unsigned int * ebp);
 
   /* debugger/stabs.c */
 extern enum DbgInfoLoad DEBUG_ReadExecutableDbgInfo(const char* exe_name);
-extern enum DbgInfoLoad DEBUG_ParseStabs(char * addr, unsigned int load_offset, 
-					 unsigned int staboff, int stablen, 
+extern enum DbgInfoLoad DEBUG_ParseStabs(char * addr, unsigned int load_offset,
+					 unsigned int staboff, int stablen,
 					 unsigned int strtaboff, int strtablen);
 
   /* debugger/types.c */
 extern int DEBUG_nchar;
 extern void DEBUG_InitTypes(void);
-extern struct datatype * DEBUG_NewDataType(enum debug_type xtype, 
+extern struct datatype * DEBUG_NewDataType(enum debug_type xtype,
 					   const char * typename);
-extern unsigned int DEBUG_TypeDerefPointer(const DBG_VALUE *value, 
+extern unsigned int DEBUG_TypeDerefPointer(const DBG_VALUE *value,
 					   struct datatype ** newtype);
-extern int DEBUG_AddStructElement(struct datatype * dt, 
-				  char * name, struct datatype * type, 
+extern int DEBUG_AddStructElement(struct datatype * dt,
+				  char * name, struct datatype * type,
 				  int offset, int size);
 extern int DEBUG_SetStructSize(struct datatype * dt, int size);
 extern int DEBUG_SetPointerType(struct datatype * dt, struct datatype * dt2);
 extern int DEBUG_SetArrayParams(struct datatype * dt, int min, int max,
 				struct datatype * dt2);
 extern void DEBUG_Print( const DBG_VALUE *addr, int count, char format, int level );
-extern unsigned int DEBUG_FindStructElement(DBG_VALUE * addr, 
+extern unsigned int DEBUG_FindStructElement(DBG_VALUE * addr,
 					    const char * ele_name, int * tmpbuf);
 extern struct datatype * DEBUG_GetPointerType(struct datatype * dt);
 extern int DEBUG_GetObjectSize(struct datatype * dt);
-extern unsigned int DEBUG_ArrayIndex(const DBG_VALUE * addr, DBG_VALUE * result, 
+extern unsigned int DEBUG_ArrayIndex(const DBG_VALUE * addr, DBG_VALUE * result,
 				     int index);
 extern struct datatype * DEBUG_FindOrMakePointerType(struct datatype * reftype);
 extern long long int DEBUG_GetExprValue(const DBG_VALUE * addr, char ** format);
-extern int DEBUG_SetBitfieldParams(struct datatype * dt, int offset, 
+extern int DEBUG_SetBitfieldParams(struct datatype * dt, int offset,
 				   int nbits, struct datatype * dt2);
 extern int DEBUG_CopyFieldlist(struct datatype * dt, struct datatype * dt2);
 extern enum debug_type DEBUG_GetType(struct datatype * dt);
@@ -518,7 +518,7 @@
 extern void	DEBUG_OutputA(int chn, const char* buffer, int len);
 extern void	DEBUG_OutputW(int chn, const WCHAR* buffer, int len);
 #ifdef __GNUC__
-extern int	DEBUG_Printf(int chn, const char* format, ...) __attribute__((format (printf,2,3)));           
+extern int	DEBUG_Printf(int chn, const char* format, ...) __attribute__((format (printf,2,3)));
 #else
 extern int	DEBUG_Printf(int chn, const char* format, ...);
 #endif
diff --git a/debugger/display.c b/debugger/display.c
index ce58c16..3219e4e 100644
--- a/debugger/display.c
+++ b/debugger/display.c
@@ -109,14 +109,14 @@
 	      DEBUG_Printf(DBG_CHN_MESG, " = ");
 	      if( displaypoints[i].format == 'i' )
 		{
-		  DEBUG_ExamineMemory( &value, 
-				       displaypoints[i].count, 
+		  DEBUG_ExamineMemory( &value,
+				       displaypoints[i].count,
 				       displaypoints[i].format);
 		}
 	      else
 		{
-		  DEBUG_Print( &value, 
-			       displaypoints[i].count, 
+		  DEBUG_Print( &value,
+			       displaypoints[i].count,
 			       displaypoints[i].format, 0);
 		}
 	    }
@@ -130,7 +130,7 @@
 DEBUG_DelDisplay(int displaynum)
 {
   int i;
-  
+
   if( displaynum >= MAX_DISPLAY || displaynum == 0 || displaynum < -1 )
     {
       DEBUG_Printf(DBG_CHN_MESG, "Invalid display number\n");
diff --git a/debugger/expr.c b/debugger/expr.c
index 727a659..ce6f9ba 100644
--- a/debugger/expr.c
+++ b/debugger/expr.c
@@ -351,7 +351,7 @@
       break;
     case EXPR_TYPE_SYMBOL:
       if( !DEBUG_GetSymbolValue(exp->un.symbol.name, -1, &rtn, FALSE) )
-      {    
+      {
 	  DEBUG_Printf(DBG_CHN_MESG, "%s\n", exp->un.symbol.name);
 	  RaiseException(DEBUG_STATUS_NO_SYMBOL, 0, 0, NULL);
       }
@@ -474,7 +474,7 @@
 	{
 	  RaiseException(DEBUG_STATUS_BAD_TYPE, 0, 0, NULL);
 	}
-      if( exp1.type == DEBUG_GetBasicType(DT_BASIC_CONST_INT) && 
+      if( exp1.type == DEBUG_GetBasicType(DT_BASIC_CONST_INT) &&
           exp2.type == DEBUG_GetBasicType(DT_BASIC_CONST_INT) )
 	{
 	  rtn.type = exp1.type;
@@ -643,11 +643,11 @@
 	   *		=> exp1 is host, result is target
 	   *	x is a pointer to internal variable x
 	   *	       	=> exp1 is host, result is host
-	   * so we force DV_TARGET, because dereferencing pointers to 
+	   * so we force DV_TARGET, because dereferencing pointers to
 	   * internal variables is very unlikely. a correct fix would be
 	   * rather large.
 	   */
-	  rtn.cookie = DV_TARGET; 
+	  rtn.cookie = DV_TARGET;
 	  rtn.addr.off = (unsigned int) DEBUG_TypeDerefPointer(&exp1, &rtn.type);
 	  if (!rtn.type)
 	    {
@@ -707,7 +707,7 @@
       DEBUG_Printf(DBG_CHN_MESG, "%d", exp->un.u_const.value);
       break;
     case EXPR_TYPE_STRING:
-      DEBUG_Printf(DBG_CHN_MESG, "\"%s\"", exp->un.string.str); 
+      DEBUG_Printf(DBG_CHN_MESG, "\"%s\"", exp->un.string.str);
       break;
     case EXPR_TYPE_SYMBOL:
       DEBUG_Printf(DBG_CHN_MESG, "%s" , exp->un.symbol.name);
diff --git a/debugger/ext_debugger.c b/debugger/ext_debugger.c
index 2379bc9..a42c07d 100644
--- a/debugger/ext_debugger.c
+++ b/debugger/ext_debugger.c
@@ -1,4 +1,4 @@
-/* 
+/*
  * Convenience functions to handle use of external debugger.
  *
  * Copyright 1999 Kevin Holbrook
@@ -104,7 +104,7 @@
     const char *dbg_external;
     const char *dbg_wine_location;
     const char *dbg_no_xterm;
-    char pid_string[DBG_BUFF_SIZE];    
+    char pid_string[DBG_BUFF_SIZE];
 
 
     /* check settings in environment for debugger to use */
@@ -134,15 +134,15 @@
     if (dbg_no_xterm)
       status = execlp(dbg_external, dbg_external, dbg_wine_location, pid_string, NULL);
     else
-      status = execlp("xterm", "xterm", "-e", dbg_external, dbg_wine_location, pid_string, NULL); 
+      status = execlp("xterm", "xterm", "-e", dbg_external, dbg_wine_location, pid_string, NULL);
 
     if (status == -1)
     {
       if (dbg_no_xterm)
-        fprintf(stderr, "DEBUG_ExternalDebugger failed to execute \"%s %s %s\" (%s)\n", 
+        fprintf(stderr, "DEBUG_ExternalDebugger failed to execute \"%s %s %s\" (%s)\n",
                 dbg_external, dbg_wine_location, pid_string, strerror(errno));
       else
-        fprintf(stderr, "DEBUG_ExternalDebugger failed to execute \"xterm -e %s %s %s\" (%s)\n", 
+        fprintf(stderr, "DEBUG_ExternalDebugger failed to execute \"xterm -e %s %s %s\" (%s)\n",
                 dbg_external, dbg_wine_location, pid_string, strerror(errno));
     }
 
@@ -154,7 +154,7 @@
   }
   else
     fprintf(stderr, "DEBUG_ExternalDebugger failed.\n");
-  
+
 }
 
 
diff --git a/debugger/hash.c b/debugger/hash.c
index 79b9d9c..7d9fb89 100644
--- a/debugger/hash.c
+++ b/debugger/hash.c
@@ -60,7 +60,7 @@
     int		       n_locals;
     int		       locals_alloc;
     WineLocals       * local_vars;
-  
+
     int		       n_lines;
     int		       lines_alloc;
     WineLineNo       * linetab;
@@ -88,7 +88,7 @@
 
     p = name;
 
-    while (*p) 
+    while (*p)
       {
 	hash = (hash << 4) + *p++;
 
@@ -170,7 +170,7 @@
 	return;
       }
 
-    addr_sorttab = (struct name_hash **) DBG_realloc(addr_sorttab, 
+    addr_sorttab = (struct name_hash **) DBG_realloc(addr_sorttab,
 					 nsym * sizeof(struct name_hash *));
 
     nsym = 0;
@@ -195,7 +195,7 @@
  * Add a symbol to the table.
  */
 struct name_hash *
-DEBUG_AddSymbol( const char * name, const DBG_VALUE *value, 
+DEBUG_AddSymbol( const char * name, const DBG_VALUE *value,
 		 const char * source, int flags)
 {
     struct name_hash  * new;
@@ -248,7 +248,7 @@
      * First see if we already have an entry for this symbol.  If so
      * return it, so we don't end up with duplicates.
      */
-    
+
     new = (struct name_hash *) DBG_alloc(sizeof(struct name_hash));
     new->value = *value;
     new->name = DBG_strdup(name);
@@ -347,7 +347,7 @@
  *
  * Get the address of a named symbol.
  */
-static int    DEBUG_GSV_Helper(const char* name, const int lineno, 
+static int    DEBUG_GSV_Helper(const char* name, const int lineno,
 			       DBG_VALUE* value, int num, int bp_flag)
 {
    struct name_hash*	nh;
@@ -369,7 +369,7 @@
    return i;
 }
 
-BOOL DEBUG_GetSymbolValue( const char * name, const int lineno, 
+BOOL DEBUG_GetSymbolValue( const char * name, const int lineno,
 			   DBG_VALUE *rtn, int bp_flag )
 {
 #define NUMDBGV 10
@@ -382,7 +382,7 @@
    if (!num && (name[0] != '_'))
    {
       char buffer[512];
-	
+
       assert(strlen(name) < sizeof(buffer) - 2); /* one for '_', one for '\0' */
       buffer[0] = '_';
       strcpy(buffer + 1, name);
@@ -390,7 +390,7 @@
    }
 
    /* now get the local symbols if any */
-   if (DEBUG_GetStackSymbolValue(name, &vtmp) && num < NUMDBGV) 
+   if (DEBUG_GetStackSymbolValue(name, &vtmp) && num < NUMDBGV)
    {
       value[num] = vtmp;
       local = num;
@@ -447,7 +447,7 @@
  *
  * Get the address of a named symbol.
  */
-BOOL DEBUG_GetLineNumberAddr( const struct name_hash * nh, const int lineno, 
+BOOL DEBUG_GetLineNumberAddr( const struct name_hash * nh, const int lineno,
 			      DBG_ADDR *addr, int bp_flag )
 {
     int i;
@@ -584,13 +584,13 @@
     low = 0;
     high = sorttab_nsym;
     if( addr_sorttab[0]->value.addr.seg > addr->seg
-	|| (   addr_sorttab[0]->value.addr.seg == addr->seg 
+	|| (   addr_sorttab[0]->value.addr.seg == addr->seg
 	    && addr_sorttab[0]->value.addr.off > addr->off) )
       {
 	nearest = NULL;
       }
     else if( addr_sorttab[high - 1]->value.addr.seg < addr->seg
-	|| (   addr_sorttab[high - 1]->value.addr.seg == addr->seg 
+	|| (   addr_sorttab[high - 1]->value.addr.seg == addr->seg
 	    && addr_sorttab[high - 1]->value.addr.off < addr->off) )
       {
 	nearest = addr_sorttab[high - 1];
@@ -602,10 +602,10 @@
 	    mid = (high + low)/2;
 	    if( mid == low )
 	      {
-		/* 
+		/*
 		 * See if there are any other entries that might also
 		 * have the same address, and would also have a line
-		 * number table.  
+		 * number table.
 		 */
 		if( mid > 0 && addr_sorttab[mid]->linetab == NULL )
 		  {
@@ -643,7 +643,7 @@
 		break;
 	      }
 	    if(    (addr_sorttab[mid]->value.addr.seg < addr->seg)
-		|| (   addr_sorttab[mid]->value.addr.seg == addr->seg 
+		|| (   addr_sorttab[mid]->value.addr.seg == addr->seg
 		    && addr_sorttab[mid]->value.addr.off <= addr->off) )
 	      {
 		low = mid;
@@ -724,7 +724,7 @@
     module = DEBUG_FindModuleByAddr((void*)DEBUG_ToLinear(addr), DMT_UNKNOWN);
     if (module) {
        char*	ptr = strrchr(module->module_name, '/');
-       
+
        if (!ptr++) ptr = module->module_name;
        sprintf( modbuf, " in %s", ptr);
     }
@@ -767,13 +767,13 @@
         sourcefile = strrchr( nearest->sourcefile, '/' );
         if (!sourcefile) sourcefile = nearest->sourcefile;
         else sourcefile++;
-	
+
 	if (addr->off == nearest->value.addr.off)
-	  sprintf( name_buffer, "%s%s [%s%s]%s", nearest->name, 
+	  sprintf( name_buffer, "%s%s [%s%s]%s", nearest->name,
 		   arglist, sourcefile, lineinfo, modbuf);
 	else
 	  sprintf( name_buffer, "%s+0x%lx%s [%s%s]%s", nearest->name,
-		   addr->off - nearest->value.addr.off, 
+		   addr->off - nearest->value.addr.off,
 		   arglist, sourcefile, lineinfo, modbuf );
       }
     else
@@ -818,17 +818,17 @@
     value.addr.seg = 0;
     value.addr.off = 0;
     value.cookie = DV_TARGET;
- 
+
     while (1)
     {
         fgets( buffer, sizeof(buffer), symbolfile );
         if (feof(symbolfile)) break;
-		
+
         /* Strip any text after a # sign (i.e. comments) */
         cpnt = buffer;
         while (*cpnt)
             if(*cpnt++ == '#') { *cpnt = 0; break; }
-		
+
         /* Quietly ignore any lines that have just whitespace */
         cpnt = buffer;
         while(*cpnt)
@@ -837,7 +837,7 @@
             cpnt++;
         }
         if (!(*cpnt) || *cpnt == '\n') continue;
-		
+
         if (sscanf(buffer, "%lx %c %s", &value.addr.off, &type, name) == 3)
 	   DEBUG_AddSymbol( name, &value, NULL, SYM_WINE );
     }
@@ -846,7 +846,7 @@
 
 
 void
-DEBUG_AddLineNumber( struct name_hash * func, int line_num, 
+DEBUG_AddLineNumber( struct name_hash * func, int line_num,
 		     unsigned long offset )
 {
   if( func == NULL )
@@ -869,7 +869,7 @@
 
 
 struct wine_locals *
-DEBUG_AddLocal( struct name_hash * func, int regno, 
+DEBUG_AddLocal( struct name_hash * func, int regno,
 		int offset,
 		int pc_start,
 		int pc_end,
@@ -942,13 +942,13 @@
     low = 0;
     high = sorttab_nsym;
     if( addr_sorttab[0]->value.addr.seg > addr->seg
-	|| (   addr_sorttab[0]->value.addr.seg == addr->seg 
+	|| (   addr_sorttab[0]->value.addr.seg == addr->seg
 	    && addr_sorttab[0]->value.addr.off > addr->off) )
       {
 	nearest = NULL;
       }
     else if( addr_sorttab[high - 1]->value.addr.seg < addr->seg
-	|| (   addr_sorttab[high - 1]->value.addr.seg == addr->seg 
+	|| (   addr_sorttab[high - 1]->value.addr.seg == addr->seg
 	    && addr_sorttab[high - 1]->value.addr.off < addr->off) )
       {
 	nearest = addr_sorttab[high - 1];
@@ -960,10 +960,10 @@
 	    mid = (high + low)/2;
 	    if( mid == low )
 	      {
-		/* 
+		/*
 		 * See if there are any other entries that might also
 		 * have the same address, and would also have a line
-		 * number table.  
+		 * number table.
 		 */
 		if( mid > 0 && addr_sorttab[mid]->linetab == NULL )
 		  {
@@ -1001,7 +1001,7 @@
 		break;
 	      }
 	    if(    (addr_sorttab[mid]->value.addr.seg < addr->seg)
-		|| (   addr_sorttab[mid]->value.addr.seg == addr->seg 
+		|| (   addr_sorttab[mid]->value.addr.seg == addr->seg
 		    && addr_sorttab[mid]->value.addr.off <= addr->off) )
 	      {
 		low = mid;
@@ -1078,7 +1078,7 @@
  * handler can deal with.
  */
 void
-DEBUG_GetFuncInfo( struct list_id * ret, const char * filename, 
+DEBUG_GetFuncInfo( struct list_id * ret, const char * filename,
 		   const char * name)
 {
     char buffer[256];
@@ -1185,14 +1185,14 @@
        * comes up with RBRAC/LBRAC stabs in particular.
        */
       if(    (curr_func->local_vars[i].pc_start != 0)
-	  && ((eip - curr_func->value.addr.off) 
+	  && ((eip - curr_func->value.addr.off)
 	      < curr_func->local_vars[i].pc_start) )
 	{
 	  continue;
 	}
 
       if(    (curr_func->local_vars[i].pc_end != 0)
-	  && ((eip - curr_func->value.addr.off) 
+	  && ((eip - curr_func->value.addr.off)
 	      > curr_func->local_vars[i].pc_end) )
 	{
 	  continue;
@@ -1209,11 +1209,11 @@
 	       * Register variable.  Point to DEBUG_context field.
 	       */
 	      assert(curr_func->local_vars[i].regno - 1 < sizeof(reg_ofs)/sizeof(reg_ofs[0]));
-	      value->addr.off = ((DWORD)&DEBUG_context) + 
+	      value->addr.off = ((DWORD)&DEBUG_context) +
 		 reg_ofs[curr_func->local_vars[i].regno - 1];
 	      value->cookie = DV_HOST;
 	    }
-	  else 
+	  else
 	    {
 	      value->addr.off = ebp + curr_func->local_vars[i].offset;
 	      value->cookie = DV_TARGET;
@@ -1252,19 +1252,19 @@
        * comes up with RBRAC/LBRAC stabs in particular.
        */
       if(    (curr_func->local_vars[i].pc_start != 0)
-	  && ((eip - curr_func->value.addr.off) 
+	  && ((eip - curr_func->value.addr.off)
 	      < curr_func->local_vars[i].pc_start) )
 	{
 	  continue;
 	}
 
       if(    (curr_func->local_vars[i].pc_end != 0)
-	  && ((eip - curr_func->value.addr.off) 
+	  && ((eip - curr_func->value.addr.off)
 	      > curr_func->local_vars[i].pc_end) )
 	{
 	  continue;
 	}
-      
+
       DEBUG_PrintTypeCast(curr_func->local_vars[i].type);
 
       if( curr_func->local_vars[i].regno != 0 )
@@ -1278,7 +1278,7 @@
 	}
       else
 	{
-	  DEBUG_READ_MEM_VERBOSE((void*)(ebp + curr_func->local_vars[i].offset), 
+	  DEBUG_READ_MEM_VERBOSE((void*)(ebp + curr_func->local_vars[i].offset),
 				 &val, sizeof(val));
 	  DEBUG_Printf(DBG_CHN_MESG, " %s == 0x%8.8x\n",
 		       curr_func->local_vars[i].name, val);
diff --git a/debugger/info.c b/debugger/info.c
index d17b060..0bc4e6d 100644
--- a/debugger/info.c
+++ b/debugger/info.c
@@ -38,39 +38,39 @@
 {
     char        * default_format;
     long long int res;
-    
+
     assert(value->cookie == DV_TARGET || value->cookie == DV_HOST);
-    if (value->type == NULL) 
+    if (value->type == NULL)
     {
         DEBUG_Printf(DBG_CHN_MESG, "Unable to evaluate expression\n");
         return;
     }
-    
+
     default_format = NULL;
     res = DEBUG_GetExprValue(value, &default_format);
-    
+
     switch (format)
     {
     case 'x':
-        if (value->addr.seg) 
+        if (value->addr.seg)
 	{
             DEBUG_nchar += DEBUG_Printf(DBG_CHN_MESG, "0x%04lx", (long unsigned int)res);
 	}
-        else 
+        else
 	{
             DEBUG_nchar += DEBUG_Printf(DBG_CHN_MESG, "0x%08lx", (long unsigned int)res);
 	}
         break;
-        
+
     case 'd':
         DEBUG_nchar += DEBUG_Printf(DBG_CHN_MESG, "%ld\n", (long int)res);
         break;
-        
+
     case 'c':
         DEBUG_nchar += DEBUG_Printf(DBG_CHN_MESG, "%d = '%c'",
                                     (char)(res & 0xff), (char)(res & 0xff));
         break;
-        
+
     case 'u':
     {
         WCHAR wch = (WCHAR)(res & 0xFFFF);
@@ -79,7 +79,7 @@
         DEBUG_Printf(DBG_CHN_MESG, "'");
     }
     break;
-    
+
     case 'i':
     case 's':
     case 'w':
@@ -92,27 +92,27 @@
 	    {
                 char* 	ptr;
                 int	state = 0;
-                
+
                 /* FIXME: simplistic implementation for default_format being
                  * foo%Sbar => will print foo, then string then bar
                  */
-                for (ptr = default_format; *ptr; ptr++) 
+                for (ptr = default_format; *ptr; ptr++)
                 {
-                    if (*ptr == '%') 
-                    { 
+                    if (*ptr == '%')
+                    {
                         state++;
-                    }       
-                    else if (state == 1) 
+                    }
+                    else if (state == 1)
 		    {
-                        if (*ptr == 'S') 
+                        if (*ptr == 'S')
                         {
                             DBG_ADDR    addr;
-                            
+
                             addr.seg = 0;
                             addr.off = (long)res;
                             DEBUG_nchar += DEBUG_PrintStringA(DBG_CHN_MESG, &addr, -1);
                         }
-                        else 
+                        else
                         {
 			    /* shouldn't happen */
 			    DEBUG_Printf(DBG_CHN_MESG, "%%%c", *ptr);
@@ -126,7 +126,7 @@
                         DEBUG_nchar++;
 		    }
                 }
-	    } 
+	    }
             else if (strcmp(default_format, "%B") == 0)
             {
                 DEBUG_nchar += DEBUG_Printf(DBG_CHN_MESG, "%s", res ? "true" : "false");
@@ -151,7 +151,7 @@
 {
     struct symbol_info rtn;
 
-    const char *name = DEBUG_FindNearestSymbol( addr, flag, &rtn.sym, 0, 
+    const char *name = DEBUG_FindNearestSymbol( addr, flag, &rtn.sym, 0,
 						&rtn.list );
 
     if (addr->seg) DEBUG_Printf( DBG_CHN_MESG, "0x%04lx:", addr->seg&0xFFFF );
@@ -173,7 +173,7 @@
 {
     struct symbol_info rtn;
 
-    const char *name = DEBUG_FindNearestSymbol( addr, flag, &rtn.sym, ebp, 
+    const char *name = DEBUG_FindNearestSymbol( addr, flag, &rtn.sym, ebp,
 						&rtn.list );
 
     if (addr->seg) DEBUG_Printf( DBG_CHN_MESG, "0x%04lx:", addr->seg );
@@ -274,7 +274,7 @@
    }
 
    DEBUG_Printf(DBG_CHN_MESG,  "Class '%s':\n", name);
-   DEBUG_Printf(DBG_CHN_MESG,  
+   DEBUG_Printf(DBG_CHN_MESG,
 		"style=%08x  wndProc=%08lx\n"
 		"inst=%p  icon=%p  cursor=%p  bkgnd=%p\n"
 		"clsExtra=%d  winExtra=%d\n",
@@ -282,7 +282,7 @@
 		wca.hIcon, wca.hCursor, wca.hbrBackground,
 		wca.cbClsExtra, wca.cbWndExtra);
 
-   /* FIXME: 
+   /* FIXME:
     * + print #windows (or even list of windows...)
     * + print extra bytes => this requires a window handle on this very class...
     */
@@ -298,7 +298,7 @@
    }
 
    DEBUG_Printf(DBG_CHN_MESG,  "Class '%s':\n", name);
-   DEBUG_Printf(DBG_CHN_MESG,  
+   DEBUG_Printf(DBG_CHN_MESG,
 		"style=%08x  wndProc=%08lx\n"
 		"inst=%p  icon=%p  cursor=%p  bkgnd=%p\n"
 		"clsExtra=%d  winExtra=%d\n",
@@ -402,20 +402,20 @@
 		"inst=%p  active=%p  idmenu=%08lx\n"
 		"style=%08lx  exstyle=%08lx  wndproc=%08lx  text='%s'\n"
 		"client=%d,%d-%d,%d  window=%d,%d-%d,%d sysmenu=%p\n",
-		GetWindow(hWnd, GW_HWNDNEXT), 
+		GetWindow(hWnd, GW_HWNDNEXT),
 		GetWindow(hWnd, GW_CHILD),
-		GetParent(hWnd), 
+		GetParent(hWnd),
 		GetWindow(hWnd, GW_OWNER),
 		clsName,
-		(HINSTANCE)GetWindowLong(hWnd, GWL_HINSTANCE), 
+		(HINSTANCE)GetWindowLong(hWnd, GWL_HINSTANCE),
 		GetLastActivePopup(hWnd),
 		GetWindowLong(hWnd, GWL_ID),
 		GetWindowLong(hWnd, GWL_STYLE),
 		GetWindowLong(hWnd, GWL_EXSTYLE),
 		GetWindowLong(hWnd, GWL_WNDPROC),
-		wndName, 
-		clientRect.left, clientRect.top, clientRect.right, clientRect.bottom, 
-		windowRect.left, windowRect.top, windowRect.right, windowRect.bottom, 
+		wndName,
+		clientRect.left, clientRect.top, clientRect.right, clientRect.bottom,
+		windowRect.left, windowRect.top, windowRect.right, windowRect.bottom,
 		GetSystemMenu(hWnd, FALSE));
 
     if (GetClassLong(hWnd, GCL_CBWNDEXTRA)) {
@@ -441,7 +441,7 @@
       hWnd = GetDesktopWindow();
 
     if (!indent)  /* first time around */
-       DEBUG_Printf(DBG_CHN_MESG,  
+       DEBUG_Printf(DBG_CHN_MESG,
 		    "%-16.16s %-17.17s %-8.8s %s\n",
 		    "hwnd", "Class Name", " Style", " WndProc Text");
 
@@ -450,7 +450,7 @@
 	  strcpy(clsName, "-- Unknown --");
        if (!GetWindowText(hWnd, wndName, sizeof(wndName)))
 	  strcpy(wndName, "-- Empty --");
-       
+
        /* FIXME: missing hmemTaskQ */
        DEBUG_Printf(DBG_CHN_MESG, "%*s%04x%*s", indent, "", (UINT)hWnd, 13-indent,"");
        DEBUG_Printf(DBG_CHN_MESG, "%-17.17s %08lx %08lx %.14s\n",
@@ -515,12 +515,12 @@
 		{
 		    DBG_PROCESS*	p = DEBUG_GetProcess(entry.th32OwnerProcessID);
 
-		    DEBUG_Printf(DBG_CHN_MESG, "%08lx%s %s\n", 
+		    DEBUG_Printf(DBG_CHN_MESG, "%08lx%s %s\n",
 				 entry.th32OwnerProcessID,  p ? " (D)" : "", p ? p->imageName : "");
 		    lastProcessId = entry.th32OwnerProcessID;
 		}
                 DEBUG_Printf(DBG_CHN_MESG, "\t%08lx %4ld%s\n",
-                             entry.th32ThreadID, entry.tpBasePri, 
+                             entry.th32ThreadID, entry.tpBasePri,
 			     (entry.th32ThreadID == current) ? " <==" : "");
 
 	    }
@@ -549,7 +549,7 @@
        if (!GetThreadSelectorEntry(DEBUG_CurrThread->handle, (i << 3)|7, &le))
 	  continue;
 
-        if (le.HighWord.Bits.Type & 0x08) 
+        if (le.HighWord.Bits.Type & 0x08)
         {
             flags[0] = (le.HighWord.Bits.Type & 0x2) ? 'r' : '-';
             flags[1] = '-';
@@ -561,12 +561,12 @@
             flags[1] = (le.HighWord.Bits.Type & 0x2) ? 'w' : '-';
             flags[2] = '-';
         }
-        DEBUG_Printf(DBG_CHN_MESG, 
+        DEBUG_Printf(DBG_CHN_MESG,
 		     "%04lx: sel=%04lx base=%08x limit=%08x %d-bit %c%c%c\n",
-		     i, (i<<3)|7, 
-		     (le.HighWord.Bits.BaseHi << 24) + 
+		     i, (i<<3)|7,
+		     (le.HighWord.Bits.BaseHi << 24) +
 		     (le.HighWord.Bits.BaseMid << 16) + le.BaseLow,
-		     ((le.HighWord.Bits.LimitHi << 8) + le.LimitLow) << 
+		     ((le.HighWord.Bits.LimitHi << 8) + le.LimitLow) <<
 		     (le.HighWord.Bits.Granularity ? 12 : 0),
 		     le.HighWord.Bits.Default_Big ? 32 : 16,
 		     flags[0], flags[1], flags[2] );
diff --git a/debugger/memory.c b/debugger/memory.c
index ea622d8..52151a5 100644
--- a/debugger/memory.c
+++ b/debugger/memory.c
@@ -71,7 +71,7 @@
 
     if (IS_VM86_MODE()) return MODE_VM86;
     if (sel == 0) return MODE_32;
-    if (GetThreadSelectorEntry( DEBUG_CurrThread->handle, sel, &le)) 
+    if (GetThreadSelectorEntry( DEBUG_CurrThread->handle, sel, &le))
         return le.HighWord.Bits.Default_Big ? MODE_32 : MODE_16;
     /* selector doesn't exist */
     return MODE_INVALID;
@@ -80,7 +80,7 @@
 #endif
 }
 #ifdef __i386__
-void DEBUG_FixAddress( DBG_ADDR *addr, DWORD def) 
+void DEBUG_FixAddress( DBG_ADDR *addr, DWORD def)
 {
    if (addr->seg == 0xffffffff) addr->seg = def;
    if (DEBUG_IsSelectorSystem(addr->seg)) addr->seg = 0;
@@ -98,12 +98,12 @@
 {
 #ifdef __i386__
    LDT_ENTRY	le;
-   
+
    if (IS_VM86_MODE()) return (DWORD)(LOWORD(addr->seg) << 4) + addr->off;
 
    if (DEBUG_IsSelectorSystem(addr->seg))
       return addr->off;
-   
+
    if (GetThreadSelectorEntry( DEBUG_CurrThread->handle, addr->seg, &le)) {
       return (le.HighWord.Bits.BaseHi << 24) + (le.HighWord.Bits.BaseMid << 16) + le.BaseLow + addr->off;
    }
@@ -151,7 +151,7 @@
  *
  * Read a memory value.
  */
-/* FIXME: this function is now getting closer and closer to 
+/* FIXME: this function is now getting closer and closer to
  * DEBUG_ExprGetValue. They should be merged...
  */
 int DEBUG_ReadMemory( const DBG_VALUE* val )
@@ -171,7 +171,7 @@
        DEBUG_FixAddress( &addr, DEBUG_context.SegDs );
 #endif
        lin = (void*)DEBUG_ToLinear( &addr );
-       
+
        DEBUG_READ_MEM_VERBOSE(lin, &value, os);
     } else {
        if (val->addr.off)
@@ -218,7 +218,7 @@
     assert(value->cookie == DV_TARGET || value->cookie == DV_HOST);
 
 #ifdef __i386__
-    DEBUG_FixAddress( &value->addr, 
+    DEBUG_FixAddress( &value->addr,
 		      (fromCode) ? DEBUG_context.SegCs : DEBUG_context.SegDs);
 #endif
 
@@ -303,10 +303,10 @@
 		DEBUG_Printf(DBG_CHN_MESG,"\n"); \
         } \
 	return
-#define DO_DUMP(_t,_l,_f) DO_DUMP2(_t,_l,_f,_v) 
+#define DO_DUMP(_t,_l,_f) DO_DUMP2(_t,_l,_f,_v)
 
         case 'x': DO_DUMP(int, 4, " %8.8x");
-	case 'd': DO_DUMP(unsigned int, 4, " %10d");	
+	case 'd': DO_DUMP(unsigned int, 4, " %10d");
 	case 'w': DO_DUMP(unsigned short, 8, " %04x");
         case 'c': DO_DUMP2(char, 32, " %c", (_v < 0x20) ? ' ' : _v);
 	case 'b': DO_DUMP2(char, 16, " %02x", (_v) & 0xff);
diff --git a/debugger/module.c b/debugger/module.c
index 3ecd97d..460e27b 100644
--- a/debugger/module.c
+++ b/debugger/module.c
@@ -28,10 +28,10 @@
 #include "winuser.h"
 
 /***********************************************************************
- * Creates and links a new module to the current process 
+ * Creates and links a new module to the current process
  *
  */
-DBG_MODULE*	DEBUG_AddModule(const char* name, enum DbgModuleType type, 
+DBG_MODULE*	DEBUG_AddModule(const char* name, enum DbgModuleType type,
 				void* mod_addr, u_long size, HMODULE hmodule)
 {
     DBG_MODULE*	wmod;
@@ -65,10 +65,10 @@
 {
      int		i;
      DBG_MODULE**	amod = DEBUG_CurrProcess->modules;
-     
+
      for (i = 0; i < DEBUG_CurrProcess->num_modules; i++) {
 	 if ((type == DMT_UNKNOWN || type == amod[i]->type) &&
-	     !strcasecmp(name, amod[i]->module_name)) 
+	     !strcasecmp(name, amod[i]->module_name))
 	     return amod[i];
      }
      return NULL;
@@ -77,7 +77,7 @@
 /***********************************************************************
  *	DEBUG_FindModuleByAddr
  *
- * either the addr where module is loaded, or any address inside the 
+ * either the addr where module is loaded, or any address inside the
  * module
  */
 DBG_MODULE*	DEBUG_FindModuleByAddr(void* addr, enum DbgModuleType type)
@@ -85,7 +85,7 @@
      int		i;
      DBG_MODULE**	amod = DEBUG_CurrProcess->modules;
      DBG_MODULE*	res = NULL;
-    
+
      for (i = 0; i < DEBUG_CurrProcess->num_modules; i++) {
 	 if ((type == DMT_UNKNOWN || type == amod[i]->type) &&
 	     (u_long)addr >= (u_long)amod[i]->load_addr &&
@@ -105,10 +105,10 @@
 {
      int		i;
      DBG_MODULE**	amod = DEBUG_CurrProcess->modules;
-     
+
      for (i = 0; i < DEBUG_CurrProcess->num_modules; i++) {
-	 if ((type == DMT_UNKNOWN || type == amod[i]->type) && 
-	     handle == amod[i]->handle) 
+	 if ((type == DMT_UNKNOWN || type == amod[i]->type) &&
+	     handle == amod[i]->handle)
 	     return amod[i];
      }
      return NULL;
@@ -120,7 +120,7 @@
 DBG_MODULE*	DEBUG_GetProcessMainModule(DBG_PROCESS* process)
 {
     if (!process || !process->num_modules)	return NULL;
- 
+
     /* main module is the first to be loaded on a given process, so it's the first
      * in the array */
     assert(process->modules[0]->main);
@@ -180,7 +180,7 @@
  * Helper function fo DEBUG_LoadModuleEPs16:
  *	finds the address of a given entry point from a given module
  */
-static BOOL DEBUG_GetEP16(char* moduleAddr, const NE_MODULE* module, 
+static BOOL DEBUG_GetEP16(char* moduleAddr, const NE_MODULE* module,
 			  WORD ordinal, DBG_ADDR* addr)
 {
     void*		idx;
@@ -196,18 +196,18 @@
 	if (!DEBUG_READ_MEM_VERBOSE(idx, &bundle, sizeof(bundle)))
 	    return FALSE;
     } while ((ordinal < bundle.first + 1) || (ordinal > bundle.last));
-    
-    if (!DEBUG_READ_MEM_VERBOSE((char*)idx + sizeof(ET_BUNDLE) + 
-				(ordinal - bundle.first - 1) * sizeof(ET_ENTRY), 
+
+    if (!DEBUG_READ_MEM_VERBOSE((char*)idx + sizeof(ET_BUNDLE) +
+				(ordinal - bundle.first - 1) * sizeof(ET_ENTRY),
 				&entry, sizeof(ET_ENTRY)))
 	return FALSE;
-    
+
     addr->seg = entry.segnum;
     addr->off = entry.offs;
-    
+
     if (addr->seg == 0xfe) addr->seg = 0xffff;  /* constant entry */
     else {
-	if (!DEBUG_READ_MEM_VERBOSE(moduleAddr + module->seg_table + 
+	if (!DEBUG_READ_MEM_VERBOSE(moduleAddr + module->seg_table +
 				    sizeof(ste) * (addr->seg - 1),
 				    &ste, sizeof(ste)))
 	    return FALSE;
@@ -235,16 +235,16 @@
     value.cookie = DV_TARGET;
     value.addr.seg = 0;
     value.addr.off = 0;
-    
+
     cpnt = moduleAddr + module->name_table;
-    
+
     /* First search the resident names */
-    
+
     /* skip module name */
     if (!DEBUG_READ_MEM_VERBOSE(cpnt, buf, sizeof(buf)) || !buf[0])
 	return;
     cpnt += 1 + buf[0] + sizeof(WORD);
-    
+
     while (DEBUG_READ_MEM_VERBOSE(cpnt, buf, sizeof(buf)) && buf[0]) {
 	sprintf(epname, "%s.%.*s", name, buf[0], &buf[1]);
 	if (DEBUG_GetEP16(moduleAddr, module, *(WORD*)&buf[1 + buf[0]], &value.addr)) {
@@ -252,7 +252,7 @@
 	}
 	cpnt += buf[0] + 1 + sizeof(WORD);
     }
-    
+
     /* Now search the non-resident names table */
     if (!module->nrname_handle) return;  /* No non-resident table */
     cpnt = (char *)GlobalLock16(module->nrname_handle);
@@ -286,10 +286,10 @@
 				 &nth_ofs, sizeof(nth_ofs)) ||
 	 !DEBUG_READ_MEM_VERBOSE((void*)(base + nth_ofs), &pe_header, sizeof(pe_header)))
 	 return;
-     
+
      pe_seg_ofs = nth_ofs + OFFSET_OF(IMAGE_NT_HEADERS, OptionalHeader) +
 	 pe_header.FileHeader.SizeOfOptionalHeader;
-     
+
      for (i = 0; i < pe_header.FileHeader.NumberOfSections; i++, pe_seg_ofs += sizeof(pe_seg)) {
 	 if (!DEBUG_READ_MEM_VERBOSE((void*)(base + pe_seg_ofs), &pe_seg, sizeof(pe_seg)))
 	     continue;
@@ -304,7 +304,7 @@
 	 if (dil != DIL_LOADED)
 	     dil = DEBUG_RegisterMSCDebugInfo(wmod, hFile, &pe_header, nth_ofs);
 	 if (dil != DIL_LOADED)
-	     dil = DEBUG_RegisterPEDebugInfo(wmod, hFile, &pe_header, nth_ofs); 
+	     dil = DEBUG_RegisterPEDebugInfo(wmod, hFile, &pe_header, nth_ofs);
 	 wmod->dil = dil;
      }
 
@@ -333,14 +333,14 @@
     value.cookie = DV_TARGET;
     value.addr.seg = 0;
     value.addr.off = 0;
-    
+
     /* Add start of DLL */
     value.addr.off = base;
     if ((prefix = strrchr(wmod->module_name, '\\' ))) prefix++;
     else prefix = wmod->module_name;
 
     DEBUG_AddSymbol(prefix, &value, NULL, SYM_WIN32 | SYM_FUNC);
-    
+
     /* Add entry point */
     snprintf(buffer, sizeof(buffer), "%s.EntryPoint", prefix);
     value.addr.off = base + nth->OptionalHeader.AddressOfEntryPoint;
@@ -349,7 +349,7 @@
     /* Add start of sections */
     pe_seg_ofs = nth_ofs + OFFSET_OF(IMAGE_NT_HEADERS, OptionalHeader) +
 	nth->FileHeader.SizeOfOptionalHeader;
-    
+
     for (i = 0; i < nth->FileHeader.NumberOfSections; i++, pe_seg_ofs += sizeof(pe_seg)) {
 	if (!DEBUG_READ_MEM_VERBOSE((void*)(base + pe_seg_ofs), &pe_seg, sizeof(pe_seg)))
 	    continue;
@@ -357,10 +357,10 @@
 	value.addr.off = base + pe_seg.VirtualAddress;
 	DEBUG_AddSymbol(buffer, &value, NULL, SYM_WIN32 | SYM_FUNC);
     }
-    
+
     /* Add exported functions */
-    dir_ofs = nth_ofs + 
-	OFFSET_OF(IMAGE_NT_HEADERS, 
+    dir_ofs = nth_ofs +
+	OFFSET_OF(IMAGE_NT_HEADERS,
 		  OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_EXPORT]);
     if (DEBUG_READ_MEM_VERBOSE((void*)(base + dir_ofs), &dir, sizeof(dir)) && dir.Size) {
 	IMAGE_EXPORT_DIRECTORY 	exports;
@@ -368,18 +368,18 @@
 	void**			functions = NULL;
 	DWORD*			names = NULL;
 	unsigned int		j;
-	
-	if (DEBUG_READ_MEM_VERBOSE((void*)(base + dir.VirtualAddress), 
+
+	if (DEBUG_READ_MEM_VERBOSE((void*)(base + dir.VirtualAddress),
 				   &exports, sizeof(exports)) &&
-	    
+
 	    ((functions = DBG_alloc(sizeof(functions[0]) * exports.NumberOfFunctions))) &&
 	    DEBUG_READ_MEM_VERBOSE((void*)(base + (DWORD)exports.AddressOfFunctions),
 				   functions, sizeof(functions[0]) * exports.NumberOfFunctions) &&
-	    
+
 	    ((ordinals = DBG_alloc(sizeof(ordinals[0]) * exports.NumberOfNames))) &&
 	    DEBUG_READ_MEM_VERBOSE((void*)(base + (DWORD)exports.AddressOfNameOrdinals),
 				   ordinals, sizeof(ordinals[0]) * exports.NumberOfNames) &&
-	    
+
 	    ((names = DBG_alloc(sizeof(names[0]) * exports.NumberOfNames))) &&
 	    DEBUG_READ_MEM_VERBOSE((void*)(base + (DWORD)exports.AddressOfNames),
 				   names, sizeof(names[0]) * exports.NumberOfNames)) {
@@ -393,7 +393,7 @@
 		value.addr.off = base + (DWORD)functions[ordinals[i]];
 		DEBUG_AddSymbol(buffer, &value, NULL, SYM_WIN32 | SYM_FUNC);
 	    }
-	    
+
 	    for (i = 0; i < exports.NumberOfFunctions; i++) {
 		if (!functions[i]) continue;
 		/* Check if we already added it with a name */
@@ -448,7 +448,7 @@
 	    rowcount = 3 + (pfx ? strlen(pfx) : 0);
 	    first = 1;
 	}
-	
+
 	len = strlen(entry.szModule);
 	if ((rowcount + len) > 76) {
 	    DEBUG_Printf(DBG_CHN_MESG, "\n   ");
@@ -456,12 +456,12 @@
 	}
 	DEBUG_Printf(DBG_CHN_MESG, " %s", entry.szModule);
 	rowcount += len + 1;
-	
+
 	DEBUG_LoadModule16(entry.hModule, &module, moduleAddr, entry.szModule);
     } while (ModuleNext16(&entry));
 #endif
-    
-    if (first) DEBUG_Printf(DBG_CHN_MESG, "\n"); 
+
+    if (first) DEBUG_Printf(DBG_CHN_MESG, "\n");
     return first;
 }
 
@@ -470,23 +470,23 @@
     const char*	fmt;
 
     switch (dil) {
-    case DIL_DEFERRED:	
+    case DIL_DEFERRED:
 	fmt = "Deferring debug information loading for %s '%s' (0x%08x)\n";
 	break;
-    case DIL_LOADED:	
-	fmt = "Loaded debug information from %s '%s' (0x%08x)\n"; 	
+    case DIL_LOADED:
+	fmt = "Loaded debug information from %s '%s' (0x%08x)\n";
 	break;
-    case DIL_NOINFO:	
-	fmt = "No debug information in %s '%s' (0x%08x)\n";		
+    case DIL_NOINFO:
+	fmt = "No debug information in %s '%s' (0x%08x)\n";
 	break;
-    case DIL_ERROR:	
-	fmt = "Can't find file for %s '%s' (0x%08x)\n";			
+    case DIL_ERROR:
+	fmt = "Can't find file for %s '%s' (0x%08x)\n";
 	break;
-    default: 
-	DEBUG_Printf(DBG_CHN_ERR, "Oooocch (%d)\n", dil); 
+    default:
+	DEBUG_Printf(DBG_CHN_ERR, "Oooocch (%d)\n", dil);
 	return;
     }
-   
+
     DEBUG_Printf(DBG_CHN_MESG, fmt, pfx, filename, load_addr);
 }
 
@@ -496,7 +496,7 @@
     case DMT_NE:    return "NE";
     case DMT_PE:    return "PE";
     case DMT_ELF:   return "ELF";
-    default:        return "???";;
+    default:        return "???";
     }
 }
 
@@ -519,7 +519,7 @@
  */
 static int	DEBUG_ModuleCompare(const void* p1, const void* p2)
 {
-    return (*((const DBG_MODULE**)p1))->load_addr - 
+    return (*((const DBG_MODULE**)p1))->load_addr -
 	   (*((const DBG_MODULE**)p2))->load_addr;
 }
 
@@ -528,22 +528,22 @@
  *
  * returns TRUE is wmod_child is contained (inside bounds) of wmod_cntnr
  */
-static inline BOOL DEBUG_IsContainer(const DBG_MODULE* wmod_cntnr, 
+static inline BOOL DEBUG_IsContainer(const DBG_MODULE* wmod_cntnr,
 				     const DBG_MODULE* wmod_child)
 {
     return wmod_cntnr->load_addr < wmod_child->load_addr &&
-	(DWORD)wmod_cntnr->load_addr + wmod_cntnr->size > 
+	(DWORD)wmod_cntnr->load_addr + wmod_cntnr->size >
 	(DWORD)wmod_child->load_addr + wmod_child->size;
 }
 
 static void	DEBUG_InfoShareModule(const DBG_MODULE* module, int ident)
 {
     if (ident) DEBUG_Printf(DBG_CHN_MESG, "  \\-");
-    DEBUG_Printf(DBG_CHN_MESG, "%s\t0x%08lx-%08lx\t%s\n", 
+    DEBUG_Printf(DBG_CHN_MESG, "%s\t0x%08lx-%08lx\t%s\n",
 		 DEBUG_GetModuleType(module->type),
 		 (DWORD)module->load_addr, (DWORD)module->load_addr + module->size,
 		 module->module_name);
-}	
+}
 
 /***********************************************************************
  *           DEBUG_InfoShare
@@ -554,16 +554,16 @@
 {
     DBG_MODULE**	ref;
     int			i, j;
-    
+
     ref = DBG_alloc(sizeof(DBG_MODULE*) * DEBUG_CurrProcess->num_modules);
     if (!ref) return;
-    
-    DEBUG_Printf(DBG_CHN_MESG, "Module\tAddress\t\t\tName\t%d modules\n", 
+
+    DEBUG_Printf(DBG_CHN_MESG, "Module\tAddress\t\t\tName\t%d modules\n",
 		 DEBUG_CurrProcess->num_modules);
-    
-    memcpy(ref, DEBUG_CurrProcess->modules, 
+
+    memcpy(ref, DEBUG_CurrProcess->modules,
 	   sizeof(DBG_MODULE*) * DEBUG_CurrProcess->num_modules);
-    qsort(ref, DEBUG_CurrProcess->num_modules, sizeof(DBG_MODULE*), 
+    qsort(ref, DEBUG_CurrProcess->num_modules, sizeof(DBG_MODULE*),
 	  DEBUG_ModuleCompare);
     for (i = 0; i < DEBUG_CurrProcess->num_modules; i++) {
 	switch (ref[i]->type) {
@@ -582,7 +582,7 @@
 		    DEBUG_IsContainer(ref[j], ref[i]))
 		    break;
 	    }
-	    if (j >= DEBUG_CurrProcess->num_modules) 
+	    if (j >= DEBUG_CurrProcess->num_modules)
 		DEBUG_InfoShareModule(ref[i], 0);
 	    break;
 	default:
@@ -621,21 +621,21 @@
 {
     DBG_MODULE**	amod;
     int			i;
-    
+
     DEBUG_Printf(DBG_CHN_MESG, "Address\t\t\tModule\tName\n");
-    
+
     amod = DBG_alloc(sizeof(DBG_MODULE*) * DEBUG_CurrProcess->num_modules);
     if (!amod) return;
-    
-    memcpy(amod, DEBUG_CurrProcess->modules, 
+
+    memcpy(amod, DEBUG_CurrProcess->modules,
 	   sizeof(DBG_MODULE*) * DEBUG_CurrProcess->num_modules);
-    qsort(amod, DEBUG_CurrProcess->num_modules, sizeof(DBG_MODULE*), 
+    qsort(amod, DEBUG_CurrProcess->num_modules, sizeof(DBG_MODULE*),
 	  DEBUG_ModuleCompare);
     for (i = 0; i < DEBUG_CurrProcess->num_modules; i++) {
 	if (amod[i]->type == DMT_ELF)	continue;
- 	
-	DEBUG_Printf(DBG_CHN_MESG, "0x%08lx-%08lx\t(%s)\t%s\n", 
-		     (DWORD)amod[i]->load_addr, 
+
+	DEBUG_Printf(DBG_CHN_MESG, "0x%08lx-%08lx\t(%s)\t%s\n",
+		     (DWORD)amod[i]->load_addr,
 		     (DWORD)amod[i]->load_addr + amod[i]->size,
 		     DEBUG_GetModuleType(amod[i]->type), amod[i]->module_name);
     }
diff --git a/debugger/msc.c b/debugger/msc.c
index a3172d2..f18933c 100644
--- a/debugger/msc.c
+++ b/debugger/msc.c
@@ -74,7 +74,7 @@
     char	  *str2 = DBG_alloc(MAX_PATHNAME_LEN*10);
     const char	  *file;
     char	  *name_part;
-    
+
     file = strrchr(filename, '\\');
     if( file == NULL ) file = filename; else file++;
 
@@ -121,7 +121,7 @@
 
     if ((*hMap = CreateFileMapping(*hFile, NULL, PAGE_READONLY, 0, 0, NULL)) == 0)
        return NULL;
-    
+
     if ((ret = MapViewOfFile(*hMap, FILE_MAP_READ, 0, g_offset, g_size)) != NULL)
        ret += offset - g_offset;
 
@@ -178,7 +178,7 @@
       {
 	 nampnt = coff_strtab + coff_sym->N.Name.Long;
       }
-   
+
    if( nampnt[0] == '_' )
       nampnt++;
    return nampnt;
@@ -193,7 +193,7 @@
 	coff_files->nfiles_alloc += 10;
 	coff_files->files = (struct CoffFile *) DBG_realloc(coff_files->files,
 							    coff_files->nfiles_alloc * sizeof(struct CoffFile));
-     }	
+     }
    file = coff_files->files + coff_files->nfiles;
    file->startaddr = 0xffffffff;
    file->endaddr   = 0;
@@ -202,7 +202,7 @@
    file->linecnt = 0;
    file->entries = NULL;
    file->neps = file->neps_alloc = 0;
-  
+
    return coff_files->nfiles++;
 }
 
@@ -211,8 +211,8 @@
    if( coff_file->neps + 1 >= coff_file->neps_alloc )
       {
 	 coff_file->neps_alloc += 10;
-	 coff_file->entries = (struct name_hash **) 
-	    DBG_realloc(coff_file->entries, 
+	 coff_file->entries = (struct name_hash **)
+	    DBG_realloc(coff_file->entries,
 			coff_file->neps_alloc * sizeof(struct name_hash *));
       }
    coff_file->entries[coff_file->neps++] = sym;
@@ -246,7 +246,7 @@
 
   coff_files.files = NULL;
   coff_files.nfiles = coff_files.nfiles_alloc = 0;
-  
+
   coff = (PIMAGE_COFF_SYMBOLS_HEADER) root;
 
   coff_symbols = (PIMAGE_SYMBOL) ((unsigned int) coff + coff->LvaToFirstSymbol);
@@ -305,7 +305,7 @@
 			   aux->Section.NumberOfLinenumbers,
 			   aux->Section.Number,
 			   aux->Section.Selection);
-	      DEBUG_Printf(DBG_CHN_TRACE, "More sect %d %s %08lx %d %d %d\n", 
+	      DEBUG_Printf(DBG_CHN_TRACE, "More sect %d %s %08lx %d %d %d\n",
 			   coff_sym->SectionNumber,
 			   DEBUG_GetCoffName( coff_sym, coff_strtab ),
 			   coff_sym->Value,
@@ -337,12 +337,12 @@
 	    {
 	      coff_files.files[curr_file_idx].startaddr = coff_sym->Value;
 	    }
-	  
+
 	  if( coff_files.files[curr_file_idx].endaddr < coff_sym->Value + aux->Section.Length )
 	    {
 	      coff_files.files[curr_file_idx].endaddr = coff_sym->Value + aux->Section.Length;
 	    }
-	  
+
 	  coff_files.files[curr_file_idx].linetab_offset = linetab_indx;
 	  coff_files.files[curr_file_idx].linecnt = aux->Section.NumberOfLinenumbers;
 	  linetab_indx += aux->Section.NumberOfLinenumbers;
@@ -370,9 +370,9 @@
 #endif
 
 	  /* FIXME: was adding symbol to this_file ??? */
-	  DEBUG_AddCoffSymbol( &coff_files.files[curr_file_idx], 
-			       DEBUG_AddSymbol( nampnt, &new_value, 
-						coff_files.files[curr_file_idx].filename, 
+	  DEBUG_AddCoffSymbol( &coff_files.files[curr_file_idx],
+			       DEBUG_AddSymbol( nampnt, &new_value,
+						coff_files.files[curr_file_idx].filename,
 						SYM_WIN32 | SYM_FUNC ) );
 	  i += naux;
 	  continue;
@@ -392,7 +392,7 @@
 #ifdef MORE_DBG
 	  DEBUG_Printf(DBG_CHN_TRACE, "%d: %lx %s\n", i, new_value.addr.off, nampnt);
 
-	  DEBUG_Printf(DBG_CHN_TRACE,"\tAdding global symbol %s (sect=%s)\n", 
+	  DEBUG_Printf(DBG_CHN_TRACE,"\tAdding global symbol %s (sect=%s)\n",
 		       nampnt, MSC_INFO(module)->sectp[coff_sym->SectionNumber - 1].Name);
 #endif
 
@@ -409,7 +409,7 @@
 		}
 	    }
 	  if (j < coff_files.nfiles) {
-	     DEBUG_AddCoffSymbol( &coff_files.files[j], 
+	     DEBUG_AddCoffSymbol( &coff_files.files[j],
 				  DEBUG_AddSymbol( nampnt, &new_value, this_file, SYM_WIN32 | SYM_FUNC ) );
 	  } else {
 	     DEBUG_AddSymbol( nampnt, &new_value, NULL, SYM_WIN32 | SYM_FUNC );
@@ -444,7 +444,7 @@
 	  i += naux;
 	  continue;
 	}
-	  
+
       if(    (coff_sym->StorageClass == IMAGE_SYM_CLASS_STATIC)
 	  && (naux == 0) )
 	{
@@ -457,7 +457,7 @@
 	}
 
 #ifdef MORE_DBG
-      DEBUG_Printf(DBG_CHN_TRACE,"Skipping unknown entry '%s' %d %d %d\n", 
+      DEBUG_Printf(DBG_CHN_TRACE,"Skipping unknown entry '%s' %d %d %d\n",
 		   DEBUG_GetCoffName( coff_sym, coff_strtab ),
 		   coff_sym->StorageClass, coff_sym->SectionNumber, naux);
 #endif
@@ -466,9 +466,9 @@
        * For now, skip past the aux entries.
        */
       i += naux;
-      
+
     }
-    
+
   /*
    * OK, we now should have a list of files, and we should have a list
    * of entrypoints.  We need to sort the entrypoints so that we are
@@ -518,10 +518,10 @@
 	       * first.
 	       */
 	      DEBUG_GetSymbolAddr(coff_files.files[j].entries[l], &new_value.addr);
-	      DEBUG_AddLineNumber(coff_files.files[j].entries[l], 
+	      DEBUG_AddLineNumber(coff_files.files[j].entries[l],
 				  linepnt->Linenumber,
-				  (unsigned int) module->load_addr 
-				  + linepnt->Type.VirtualAddress 
+				  (unsigned int) module->load_addr
+				  + linepnt->Type.VirtualAddress
 				  - new_value.addr.off);
 	    }
 	}
@@ -1164,7 +1164,7 @@
         *value = type;
     }
     else
-    { 
+    {
         switch ( type )
         {
         case LF_CHAR:
@@ -1275,7 +1275,7 @@
         return symname;
 }
 
-static 
+static
 struct datatype * DEBUG_GetCVType(unsigned int typeno)
 {
     struct datatype * dt = NULL;
@@ -1305,7 +1305,7 @@
     while ( typeno - 0x1000 >= num_cv_defined_types )
     {
         num_cv_defined_types += 0x100;
-        cv_defined_types = (struct datatype **) 
+        cv_defined_types = (struct datatype **)
             DBG_realloc( cv_defined_types,
 		         num_cv_defined_types * sizeof(struct datatype *) );
 
@@ -1334,12 +1334,12 @@
 static int
 DEBUG_AddCVType_Pointer( unsigned int typeno, unsigned int datatype )
 {
-    struct datatype *dt = 
+    struct datatype *dt =
 	    DEBUG_FindOrMakePointerType( DEBUG_GetCVType( datatype ) );
 
     return DEBUG_AddCVType( typeno, dt );
 }
-  
+
 static int
 DEBUG_AddCVType_Array( unsigned int typeno, char *name,
                        unsigned int elemtype, unsigned int arr_len )
@@ -1351,10 +1351,10 @@
 
     DEBUG_SetArrayParams( dt, 0, arr_max, elem );
     return DEBUG_AddCVType( typeno, dt );
-}    
+}
 
 static int
-DEBUG_AddCVType_Bitfield( unsigned int typeno, 
+DEBUG_AddCVType_Bitfield( unsigned int typeno,
                           unsigned int bitoff, unsigned int nbits,
                           unsigned int basetype )
 {
@@ -1364,7 +1364,7 @@
     DEBUG_SetBitfieldParams( dt, bitoff, nbits, base );
     return DEBUG_AddCVType( typeno, dt );
 }
-  
+
 static int
 DEBUG_AddCVType_EnumFieldList( unsigned int typeno, unsigned char *list, int len )
 {
@@ -1388,7 +1388,7 @@
             int value, vlen = numeric_leaf( &value, &type->enumerate.value );
             unsigned char *name = (unsigned char *)&type->enumerate.value + vlen;
 
-            DEBUG_AddStructElement( dt, terminate_string( name ), 
+            DEBUG_AddStructElement( dt, terminate_string( name ),
                                         NULL, value, 0 );
 
             ptr += 2 + 2 + vlen + (1 + name[0]);
@@ -1404,7 +1404,7 @@
 
     return DEBUG_AddCVType( typeno, dt );
 }
-  
+
 static int
 DEBUG_AddCVType_StructFieldList( unsigned int typeno, unsigned char *list, int len )
 {
@@ -1477,7 +1477,7 @@
             struct datatype *subtype = DEBUG_GetCVType( type->member.type );
             int elem_size = subtype? DEBUG_GetObjectSize( subtype ) : 0;
 
-            DEBUG_AddStructElement( dt, terminate_string( name ), 
+            DEBUG_AddStructElement( dt, terminate_string( name ),
                                         subtype, offset << 3, elem_size << 3 );
 
             ptr += 2 + 2 + 2 + olen + (1 + name[0]);
@@ -1492,7 +1492,7 @@
             struct datatype *subtype = DEBUG_GetCVType( type->member32.type );
             int elem_size = subtype? DEBUG_GetObjectSize( subtype ) : 0;
 
-            DEBUG_AddStructElement( dt, terminate_string( name ), 
+            DEBUG_AddStructElement( dt, terminate_string( name ),
                                         subtype, offset << 3, elem_size << 3 );
 
             ptr += 2 + 2 + 4 + olen + (1 + name[0]);
@@ -1533,7 +1533,7 @@
             /* FIXME: ignored for now */
             ptr += 2 + 2;
             break;
-        
+
         case LF_VFUNCTAB_32:
             /* FIXME: ignored for now */
             ptr += 2 + 2 + 4;
@@ -1560,7 +1560,7 @@
             case 4: case 6: /* (pure) introducing virtual method */
                 ptr += 2 + 2 + 4 + 4 + (1 + type->onemethod32_virt.name[0]);
                 break;
-           
+
             default:
                 ptr += 2 + 2 + 4 + (1 + type->onemethod32.name[0]);
                 break;
@@ -1576,7 +1576,7 @@
 
     return DEBUG_AddCVType( typeno, dt );
 }
-  
+
 static int
 DEBUG_AddCVType_Enum( unsigned int typeno, char *name, unsigned int fieldlist )
 {
@@ -1646,12 +1646,12 @@
         }
 
         case LF_BITFIELD:
-            retv = DEBUG_AddCVType_Bitfield( curr_type, type->bitfield.bitoff, 
+            retv = DEBUG_AddCVType_Bitfield( curr_type, type->bitfield.bitoff,
                                                         type->bitfield.nbits,
                                                         type->bitfield.type );
             break;
         case LF_BITFIELD_32:
-            retv = DEBUG_AddCVType_Bitfield( curr_type, type->bitfield32.bitoff, 
+            retv = DEBUG_AddCVType_Bitfield( curr_type, type->bitfield32.bitoff,
                                                         type->bitfield32.nbits,
                                                         type->bitfield32.type );
             break;
@@ -1742,7 +1742,7 @@
         curr_type++;
         ptr += type->generic.len + 2;
     }
-  
+
     return TRUE;
 }
 
@@ -1819,7 +1819,7 @@
    * There is one header for each segment, so that we can reach in
    * and pull bits as required.
    */
-  lt_hdr = (struct codeview_linetab_hdr *) 
+  lt_hdr = (struct codeview_linetab_hdr *)
     DBG_alloc((nseg + 1) * sizeof(*lt_hdr));
   if( lt_hdr == NULL )
     {
@@ -1865,7 +1865,7 @@
 	  lt_hdr[this_seg].segno      = *pnt2.s++;
 	  lt_hdr[this_seg].nline      = *pnt2.s++;
 	  lt_hdr[this_seg].offtab     =  pnt2.ui;
-	  lt_hdr[this_seg].linetab    = (unsigned short *) 
+	  lt_hdr[this_seg].linetab    = (unsigned short *)
 	    (pnt2.ui + lt_hdr[this_seg].nline);
 	}
     }
@@ -2039,7 +2039,7 @@
 
 
 
-static unsigned int 
+static unsigned int
 DEBUG_MapCVOffset( DBG_MODULE *module, unsigned int offset )
 {
     int        nomap = module->msc_info->nomap;
@@ -2060,7 +2060,7 @@
 static struct name_hash *
 DEBUG_AddCVSymbol( DBG_MODULE *module, char *name, int namelen,
                    int type, unsigned int seg, unsigned int offset,
-                   int size, int cookie, int flags, 
+                   int size, int cookie, int flags,
                    struct codeview_linetab_hdr *linetab )
 {
     int			  nsect = module->msc_info->nsect;
@@ -2074,7 +2074,7 @@
      * Some sanity checks
      */
 
-    if ( !name || !namelen ) 
+    if ( !name || !namelen )
         return NULL;
 
     if ( !seg || seg > nsect )
@@ -2087,7 +2087,7 @@
     value.cookie = cookie;
 
     value.addr.seg = 0;
-    value.addr.off = (unsigned int) module->load_addr + 
+    value.addr.off = (unsigned int) module->load_addr +
         DEBUG_MapCVOffset( module, sectp[seg-1].VirtualAddress + offset );
 
     memcpy( symname, name, namelen );
@@ -2112,8 +2112,8 @@
 
     /*
      * Create Wine symbol record
-     */ 
-    symbol = DEBUG_AddSymbol( symname, &value, 
+     */
+    symbol = DEBUG_AddSymbol( symname, &value,
                               linetab? linetab->sourcefile : NULL, flags );
 
     if ( size )
@@ -2181,7 +2181,7 @@
 	case S_LDATA:
 	case S_PUB:
             DEBUG_AddCVSymbol( module, sym->data.name, sym->data.namelen,
-                               sym->data.symtype, sym->data.seg, 
+                               sym->data.symtype, sym->data.seg,
                                sym->data.offset, 0,
                                DV_TARGET, SYM_WIN32 | SYM_DATA, NULL );
 	    break;
@@ -2189,7 +2189,7 @@
 	case S_LDATA_32:
 	case S_PUB_32:
             DEBUG_AddCVSymbol( module, sym->data32.name, sym->data32.namelen,
-                               sym->data32.symtype, sym->data32.seg, 
+                               sym->data32.symtype, sym->data32.seg,
                                sym->data32.offset, 0,
                                DV_TARGET, SYM_WIN32 | SYM_DATA, NULL );
 	    break;
@@ -2201,7 +2201,7 @@
          */
 	case S_THUNK:
             DEBUG_AddCVSymbol( module, sym->thunk.name, sym->thunk.namelen,
-                               0, sym->thunk.segment, 
+                               0, sym->thunk.segment,
                                sym->thunk.offset, sym->thunk.thunk_len,
                                DV_TARGET, SYM_WIN32 | SYM_FUNC, NULL );
 	    break;
@@ -2214,7 +2214,7 @@
  	    DEBUG_Normalize( curr_func );
 
             curr_func = DEBUG_AddCVSymbol( module, sym->proc.name, sym->proc.namelen,
-                                           sym->proc.proctype, sym->proc.segment, 
+                                           sym->proc.proctype, sym->proc.segment,
                                            sym->proc.offset, sym->proc.proc_len,
                                            DV_TARGET, SYM_WIN32 | SYM_FUNC, linetab );
 
@@ -2225,7 +2225,7 @@
  	    DEBUG_Normalize( curr_func );
 
             curr_func = DEBUG_AddCVSymbol( module, sym->proc32.name, sym->proc32.namelen,
-                                           sym->proc32.proctype, sym->proc32.segment, 
+                                           sym->proc32.proctype, sym->proc32.segment,
                                            sym->proc32.offset, sym->proc32.proc_len,
                                            DV_TARGET, SYM_WIN32 | SYM_FUNC, linetab );
 
@@ -2250,7 +2250,7 @@
          * These are special, in that they are always followed by an
          * additional length-prefixed string which is *not* included
          * into the symbol length count.  We need to skip it.
-         */ 
+         */
 	case S_PROCREF:
 	case S_DATAREF:
 	case S_LPROCREF:
@@ -2511,7 +2511,7 @@
     }
 }
 
-static void pdb_convert_symbols_header( PDB_SYMBOLS *symbols, 
+static void pdb_convert_symbols_header( PDB_SYMBOLS *symbols,
                                         int *header_size, char *image )
 {
     memset( symbols, 0, sizeof(PDB_SYMBOLS) );
@@ -2542,7 +2542,7 @@
     }
 }
 
-static enum DbgInfoLoad DEBUG_ProcessPDBFile( DBG_MODULE *module, 
+static enum DbgInfoLoad DEBUG_ProcessPDBFile( DBG_MODULE *module,
 					      const char *filename, DWORD timestamp )
 {
     enum DbgInfoLoad dil = DIL_ERROR;
@@ -2619,7 +2619,7 @@
     }
 
 
-    /* 
+    /*
      * Check .PDB time stamp
      */
 
@@ -2629,23 +2629,23 @@
 		      filename, root->TimeDateStamp, timestamp );
     }
 
-    /* 
+    /*
      * Read type table
      */
 
     DEBUG_ParseTypeTable( types_image + types.type_offset, types.type_size );
-    
+
     /*
      * Read type-server .PDB imports
      */
 
     if ( symbols.pdbimport_size )
-    {   
+    {
         /* FIXME */
         DEBUG_Printf(DBG_CHN_ERR, "-Type server .PDB imports ignored!\n" );
     }
 
-    /* 
+    /*
      * Read global symbol table
      */
 
@@ -2704,10 +2704,10 @@
         file_name += strlen(file_name) + 1;
         file = (char *)( (DWORD)(file_name + strlen(file_name) + 1 + 3) & ~3 );
     }
-    
+
     dil = DIL_LOADED;
 
- leave:    
+ leave:
 
     /*
      * Cleanup
@@ -2735,22 +2735,22 @@
 #define CODEVIEW_NB09_SIG  ( 'N' | ('B' << 8) | ('0' << 16) | ('9' << 24) )
 #define CODEVIEW_NB10_SIG  ( 'N' | ('B' << 8) | ('1' << 16) | ('0' << 24) )
 #define CODEVIEW_NB11_SIG  ( 'N' | ('B' << 8) | ('1' << 16) | ('1' << 24) )
- 
+
 typedef struct _CODEVIEW_HEADER
 {
     DWORD  dwSignature;
     DWORD  lfoDirectory;
- 
+
 } CODEVIEW_HEADER, *PCODEVIEW_HEADER;
- 
+
 typedef struct _CODEVIEW_PDB_DATA
 {
     DWORD  timestamp;
     DWORD  unknown;
     CHAR   name[ 1 ];
- 
+
 } CODEVIEW_PDB_DATA, *PCODEVIEW_PDB_DATA;
- 
+
 typedef struct _CV_DIRECTORY_HEADER
 {
     WORD   cbDirHeader;
@@ -2758,16 +2758,16 @@
     DWORD  cDir;
     DWORD  lfoNextDir;
     DWORD  flags;
- 
+
 } CV_DIRECTORY_HEADER, *PCV_DIRECTORY_HEADER;
- 
+
 typedef struct _CV_DIRECTORY_ENTRY
 {
     WORD   subsection;
     WORD   iMod;
     DWORD  lfo;
     DWORD  cb;
- 
+
 } CV_DIRECTORY_ENTRY, *PCV_DIRECTORY_ENTRY;
 
 
@@ -2779,7 +2779,7 @@
 {
     PCODEVIEW_HEADER cv = (PCODEVIEW_HEADER)root;
     enum DbgInfoLoad dil = DIL_ERROR;
- 
+
     switch ( cv->dwSignature )
     {
     case CODEVIEW_NB09_SIG:
@@ -2792,16 +2792,16 @@
         ent = (PCV_DIRECTORY_ENTRY)((LPBYTE)hdr + hdr->cbDirHeader);
         for ( i = 0; i < hdr->cDir; i++, ent = next )
         {
-            next = (i == hdr->cDir-1)? NULL : 
+            next = (i == hdr->cDir-1)? NULL :
                    (PCV_DIRECTORY_ENTRY)((LPBYTE)ent + hdr->cbDirEntry);
-            prev = (i == 0)? NULL : 
+            prev = (i == 0)? NULL :
                    (PCV_DIRECTORY_ENTRY)((LPBYTE)ent - hdr->cbDirEntry);
 
             if ( ent->subsection == sstAlignSym )
             {
                 /*
                  * Check the next and previous entry.  If either is a
-                 * sstSrcModule, it contains the line number info for 
+                 * sstSrcModule, it contains the line number info for
                  * this file.
                  *
                  * FIXME: This is not a general solution!
@@ -2815,7 +2815,7 @@
                 if ( prev && prev->iMod == ent->iMod
                           && prev->subsection == sstSrcModule )
                      linetab = DEBUG_SnarfLinetab( root + prev->lfo, prev->cb );
- 
+
 
                 DEBUG_SnarfCodeView( module, root + ent->lfo, sizeof(DWORD),
                                      ent->cb, linetab );
@@ -2825,7 +2825,7 @@
         dil = DIL_LOADED;
         break;
     }
- 
+
     case CODEVIEW_NB10_SIG:
     {
         PCODEVIEW_PDB_DATA pdb = (PCODEVIEW_PDB_DATA)(cv + 1);
@@ -2833,9 +2833,9 @@
         dil = DEBUG_ProcessPDBFile( module, pdb->name, pdb->timestamp );
         break;
     }
- 
+
     default:
-        DEBUG_Printf( DBG_CHN_ERR, "Unknown CODEVIEW signature %08lX in module %s\n", 
+        DEBUG_Printf( DBG_CHN_ERR, "Unknown CODEVIEW signature %08lX in module %s\n",
                       cv->dwSignature, module->module_name );
         break;
     }
@@ -2847,9 +2847,9 @@
 /*========================================================================
  * Process debug directory.
  */
-static enum DbgInfoLoad DEBUG_ProcessDebugDirectory( DBG_MODULE *module, 
+static enum DbgInfoLoad DEBUG_ProcessDebugDirectory( DBG_MODULE *module,
 						     LPBYTE file_map,
-						     PIMAGE_DEBUG_DIRECTORY dbg, 
+						     PIMAGE_DEBUG_DIRECTORY dbg,
 						     int nDbg )
 {
     enum DbgInfoLoad dil = DIL_ERROR;
@@ -2916,14 +2916,14 @@
 /*========================================================================
  * Process DBG file.
  */
-static enum DbgInfoLoad DEBUG_ProcessDBGFile( DBG_MODULE *module, 
+static enum DbgInfoLoad DEBUG_ProcessDBGFile( DBG_MODULE *module,
 					      const char *filename, DWORD timestamp )
 {
     enum DbgInfoLoad dil = DIL_ERROR;
     HANDLE hFile = INVALID_HANDLE_VALUE, hMap = 0;
     LPBYTE file_map = NULL;
     PIMAGE_SEPARATE_DEBUG_HEADER hdr;
-    PIMAGE_DEBUG_DIRECTORY dbg; 
+    PIMAGE_DEBUG_DIRECTORY dbg;
     int nDbg;
 
 
@@ -2950,8 +2950,8 @@
     }
 
 
-    dbg = (PIMAGE_DEBUG_DIRECTORY) ( file_map + sizeof(*hdr) 
-		 + hdr->NumberOfSections * sizeof(IMAGE_SECTION_HEADER) 
+    dbg = (PIMAGE_DEBUG_DIRECTORY) ( file_map + sizeof(*hdr)
+		 + hdr->NumberOfSections * sizeof(IMAGE_SECTION_HEADER)
 		 + hdr->ExportedNamesSize );
 
     nDbg = hdr->DebugDirectorySize / sizeof(*dbg);
@@ -2968,7 +2968,7 @@
 /*========================================================================
  * Process MSC debug information in PE file.
  */
-enum DbgInfoLoad DEBUG_RegisterMSCDebugInfo( DBG_MODULE *module, HANDLE hFile, 
+enum DbgInfoLoad DEBUG_RegisterMSCDebugInfo( DBG_MODULE *module, HANDLE hFile,
 					     void *_nth, unsigned long nth_ofs )
 {
     enum DbgInfoLoad	   dil = DIL_ERROR;
@@ -2989,7 +2989,7 @@
     if ( !extra_info.sectp )
         goto leave;
 
-    if ( !DEBUG_READ_MEM_VERBOSE( (char *)module->load_addr + 
+    if ( !DEBUG_READ_MEM_VERBOSE( (char *)module->load_addr +
 		                  nth_ofs + OFFSET_OF(IMAGE_NT_HEADERS, OptionalHeader) +
 		                  nth->FileHeader.SizeOfOptionalHeader,
                                   extra_info.sectp,
@@ -2999,14 +2999,14 @@
     /* Read in debug directory */
 
     nDbg = dir->Size / sizeof(IMAGE_DEBUG_DIRECTORY);
-    if ( !nDbg ) 
+    if ( !nDbg )
         goto leave;
 
     dbg = (PIMAGE_DEBUG_DIRECTORY) DBG_alloc( nDbg * sizeof(IMAGE_DEBUG_DIRECTORY) );
-    if ( !dbg ) 
+    if ( !dbg )
         goto leave;
 
-    if ( !DEBUG_READ_MEM_VERBOSE( (char *)module->load_addr + dir->VirtualAddress, 
+    if ( !DEBUG_READ_MEM_VERBOSE( (char *)module->load_addr + dir->VirtualAddress,
                                   dbg, nDbg * sizeof(IMAGE_DEBUG_DIRECTORY) ) )
         goto leave;
 
@@ -3025,10 +3025,10 @@
 
         PIMAGE_DEBUG_MISC misc = (PIMAGE_DEBUG_MISC)(file_map + dbg->PointerToRawData);
 
-        if ( nDbg != 1 || dbg->Type != IMAGE_DEBUG_TYPE_MISC 
+        if ( nDbg != 1 || dbg->Type != IMAGE_DEBUG_TYPE_MISC
                        || misc->DataType != IMAGE_DEBUG_MISC_EXENAME )
         {
-            DEBUG_Printf( DBG_CHN_ERR, "-Debug info stripped, but no .DBG file in module %s\n", 
+            DEBUG_Printf( DBG_CHN_ERR, "-Debug info stripped, but no .DBG file in module %s\n",
 	                  module->module_name );
             goto leave;
         }
@@ -3048,14 +3048,14 @@
         PIMAGE_NT_HEADERS      mpd_nth = (PIMAGE_NT_HEADERS)(file_map + nth_ofs);
         PIMAGE_DATA_DIRECTORY  mpd_dir;
         PIMAGE_DEBUG_DIRECTORY mpd_dbg = NULL;
-            
+
         /* sanity checks */
-        if ( mpd_nth->Signature != IMAGE_NT_SIGNATURE || 
+        if ( mpd_nth->Signature != IMAGE_NT_SIGNATURE ||
              mpd_nth->FileHeader.NumberOfSections != nth->FileHeader.NumberOfSections ||
              !(mpd_nth->FileHeader.Characteristics & IMAGE_FILE_DEBUG_STRIPPED ))
             goto leave;
         mpd_dir = mpd_nth->OptionalHeader.DataDirectory + IMAGE_DIRECTORY_ENTRY_DEBUG;
-        
+
         if ((mpd_dir->Size / sizeof(IMAGE_DEBUG_DIRECTORY)) != nDbg)
             goto leave;
 
@@ -3079,7 +3079,7 @@
  * look for stabs information in PE header (it's how mingw compiler provides its
  * debugging information), and also wine PE <-> ELF linking through .wsolnk sections
  */
-enum DbgInfoLoad DEBUG_RegisterStabsDebugInfo(DBG_MODULE* module, HANDLE hFile, 
+enum DbgInfoLoad DEBUG_RegisterStabsDebugInfo(DBG_MODULE* module, HANDLE hFile,
 					      void* _nth, unsigned long nth_ofs)
 {
     IMAGE_SECTION_HEADER	pe_seg;
@@ -3093,7 +3093,7 @@
 	nth->FileHeader.SizeOfOptionalHeader;
 
     for (i = 0; i < nth->FileHeader.NumberOfSections; i++, pe_seg_ofs += sizeof(pe_seg)) {
-      if (!DEBUG_READ_MEM_VERBOSE((void*)((char *)module->load_addr + pe_seg_ofs), 
+      if (!DEBUG_READ_MEM_VERBOSE((void*)((char *)module->load_addr + pe_seg_ofs),
 				  &pe_seg, sizeof(pe_seg)))
 	  continue;
 
@@ -3111,7 +3111,7 @@
 
        if (s1) {
 	  if (DEBUG_READ_MEM_VERBOSE((char*)module->load_addr + stabs, s1, stabsize) &&
-	      DEBUG_READ_MEM_VERBOSE((char*)module->load_addr + stabstr, 
+	      DEBUG_READ_MEM_VERBOSE((char*)module->load_addr + stabstr,
 				     s1 + stabsize, stabstrsize)) {
 	     dil = DEBUG_ParseStabs(s1, 0, 0, stabsize, stabsize, stabstrsize);
 	  } else {
@@ -3119,7 +3119,7 @@
 	  }
 	  DBG_free(s1);
        } else {
-	  DEBUG_Printf(DBG_CHN_MESG, "couldn't alloc %d bytes\n", 
+	  DEBUG_Printf(DBG_CHN_MESG, "couldn't alloc %d bytes\n",
 		       stabsize + stabstrsize);
        }
     } else {
diff --git a/debugger/registers.c b/debugger/registers.c
index 04b9b1e..2ea54e3 100644
--- a/debugger/registers.c
+++ b/debugger/registers.c
@@ -84,7 +84,7 @@
 /***********************************************************************
  *           DEBUG_InfoRegisters
  *
- * Display registers information. 
+ * Display registers information.
  */
 void DEBUG_InfoRegisters(void)
 {
@@ -113,11 +113,11 @@
     {
         char flag[33];
 
-        DEBUG_Printf( DBG_CHN_MESG, "\n EIP:%08lx ESP:%08lx EBP:%08lx EFLAGS:%08lx(%s)\n", 
+        DEBUG_Printf( DBG_CHN_MESG, "\n EIP:%08lx ESP:%08lx EBP:%08lx EFLAGS:%08lx(%s)\n",
 		      DEBUG_context.Eip, DEBUG_context.Esp,
 		      DEBUG_context.Ebp, DEBUG_context.EFlags,
 		      DEBUG_Flags(DEBUG_context.EFlags, flag));
-	DEBUG_Printf( DBG_CHN_MESG, " EAX:%08lx EBX:%08lx ECX:%08lx EDX:%08lx\n", 
+	DEBUG_Printf( DBG_CHN_MESG, " EAX:%08lx EBX:%08lx ECX:%08lx EDX:%08lx\n",
 		      DEBUG_context.Eax, DEBUG_context.Ebx,
 		      DEBUG_context.Ecx, DEBUG_context.Edx );
 	DEBUG_Printf( DBG_CHN_MESG, " ESI:%08lx EDI:%08lx\n",
diff --git a/debugger/source.c b/debugger/source.c
index b9db16f..3c38216 100644
--- a/debugger/source.c
+++ b/debugger/source.c
@@ -156,7 +156,7 @@
 	      break;
 	    }
 	}
-      
+
     }
 
   if( ol == NULL )
@@ -186,14 +186,14 @@
 	       * Now append the base file name.
 	       */
 	      strcat(tmppath, basename);
-	      
+
 	      status = stat(tmppath, &statbuf);
 	      if( status != -1 )
 		{
 		  break;
 		}
 	    }
-	  
+
 	  if( sl == NULL )
 	    {
 	      char	zbuf[256];
@@ -202,12 +202,12 @@
 	       */
 	      sprintf(zbuf, "Enter path to file '%s': ", sourcefile);
 	      DEBUG_ReadLine(zbuf, tmppath, sizeof(tmppath), FALSE, FALSE);
-	      
+
 	      if( tmppath[strlen(tmppath)-1] == '\n' )
 		{
 		  tmppath[strlen(tmppath)-1] = '\0';
 		}
-	      
+
 	      if( tmppath[strlen(tmppath)-1] != '/' )
 		{
 		  strcat(tmppath, "/");
@@ -216,7 +216,7 @@
 	       * Now append the base file name.
 	       */
 	      strcat(tmppath, basename);
-	      
+
 	      status = stat(tmppath, &statbuf);
 	      if( status == -1 )
 		{
@@ -302,14 +302,14 @@
 	{
 	  return FALSE;
 	}
-      
+
       addr = mmap(0, ol->size, PROT_READ, MAP_PRIVATE, fd, 0);
       if( addr == (char *) -1 )
 	{
 	  return FALSE;
 	}
     }
-  
+
   /*
    * All we need to do is to display the source lines here.
    */
@@ -325,7 +325,7 @@
       memset(&buffer, 0, sizeof(buffer));
       if( ol->linelist[i+1] != ol->linelist[i] )
 	{
-	  memcpy(&buffer, addr + ol->linelist[i], 
+	  memcpy(&buffer, addr + ol->linelist[i],
 		 (ol->linelist[i+1] - ol->linelist[i]) - 1);
 	}
       DEBUG_Printf(DBG_CHN_MESG,"%d\t%s\n", i + 1,  buffer);
@@ -351,10 +351,10 @@
    * We need to see what source file we need.  Hopefully we only have
    * one specified, otherwise we might as well punt.
    */
-  if( source1 != NULL 
-      && source2 != NULL 
+  if( source1 != NULL
+      && source2 != NULL
       && source1->sourcefile != NULL
-      && source2->sourcefile != NULL 
+      && source2->sourcefile != NULL
       && strcmp(source1->sourcefile, source2->sourcefile) != 0 )
     {
       DEBUG_Printf(DBG_CHN_MESG, "Ambiguous source file specification.\n");
@@ -367,8 +367,8 @@
       sourcefile = source1->sourcefile;
     }
 
-  if( sourcefile == NULL 
-      && source2 != NULL 
+  if( sourcefile == NULL
+      && source2 != NULL
       && source2->sourcefile != NULL )
     {
       sourcefile = source2->sourcefile;
diff --git a/debugger/stabs.c b/debugger/stabs.c
index 7824dd1..2cd53e7 100644
--- a/debugger/stabs.c
+++ b/debugger/stabs.c
@@ -129,11 +129,11 @@
 static  struct datatype**	cu_vector = NULL;
 static  int 		cu_nrofentries = 0;
 
-static 
-int	
+static
+int
 DEBUG_CreateInclude(const char* file, unsigned long val)
 {
-  if (num_include_def == num_alloc_include_def) 
+  if (num_include_def == num_alloc_include_def)
     {
       num_alloc_include_def += 256;
       include_defs = DBG_realloc(include_defs, sizeof(include_defs[0])*num_alloc_include_def);
@@ -143,35 +143,35 @@
   include_defs[num_include_def].value = val;
   include_defs[num_include_def].vector = NULL;
   include_defs[num_include_def].nrofentries = 0;
-  
+
   return num_include_def++;
 }
 
-static 
-int	
+static
+int
 DEBUG_FindInclude(const char* file, unsigned long val)
 {
   int		i;
-  
-  for (i = 0; i < num_include_def; i++) 
+
+  for (i = 0; i < num_include_def; i++)
     {
-      if (val == include_defs[i].value && 
+      if (val == include_defs[i].value &&
 	  strcmp(file, include_defs[i].name) == 0)
 	return i;
     }
   return -1;
 }
 
-static 
+static
 int
 DEBUG_AddInclude(int idx)
 {
   ++cu_include_stk_idx;
-  
+
   /* is this happen, just bump MAX_INCLUDES */
   /* we could also handle this as another dynarray */
   assert(cu_include_stk_idx < MAX_INCLUDES);
-  
+
   cu_include_stack[cu_include_stk_idx] = idx;
   return cu_include_stk_idx;
 }
@@ -193,10 +193,10 @@
 DEBUG_FreeIncludes(void)
 {
   int	i;
-  
+
   DEBUG_ResetIncludes();
-  
-  for (i = 0; i < num_include_def; i++) 
+
+  for (i = 0; i < num_include_def; i++)
     {
       DBG_free(include_defs[i].name);
       DBG_free(include_defs[i].vector);
@@ -212,18 +212,18 @@
 
 static
 struct datatype**
-DEBUG_FileSubNr2StabEnum(int filenr, int subnr) 
+DEBUG_FileSubNr2StabEnum(int filenr, int subnr)
 {
   struct datatype** ret;
-  
+
   /* DEBUG_Printf(DBG_CHN_MESG, "creating type id for (%d,%d)\n", filenr, subnr); */
-  
+
   /* FIXME: I could perhaps create a dummy include_def for each compilation
    * unit which would allow not to handle those two cases separately
    */
-  if (filenr == 0) 
+  if (filenr == 0)
     {
-      if (cu_nrofentries <= subnr) 
+      if (cu_nrofentries <= subnr)
 	{
 	  cu_vector = DBG_realloc(cu_vector, sizeof(cu_vector[0])*(subnr+1));
 	  memset(cu_vector+cu_nrofentries, 0, sizeof(cu_vector[0])*(subnr+1-cu_nrofentries));
@@ -234,11 +234,11 @@
   else
     {
       include_def*	idef;
-      
+
       assert(filenr <= cu_include_stk_idx);
-      
+
       idef = &include_defs[cu_include_stack[filenr]];
-      
+
       if (idef->nrofentries <= subnr)
 	{
 	  idef->vector = DBG_realloc(idef->vector, sizeof(idef->vector[0])*(subnr+1));
@@ -251,7 +251,7 @@
   return ret;
 }
 
-static 
+static
 struct datatype**
 DEBUG_ReadTypeEnum(char **x) {
     int filenr,subnr;
@@ -303,7 +303,7 @@
     return 0;
 }
 
-static int DEBUG_PTS_ReadTypeReference(struct ParseTypedefData* ptd, 
+static int DEBUG_PTS_ReadTypeReference(struct ParseTypedefData* ptd,
 				       int* filenr, int* subnr)
 {
     if (*ptd->ptr == '(') {
@@ -320,7 +320,7 @@
     return 0;
 }
 
-static int DEBUG_PTS_ReadRange(struct ParseTypedefData* ptd, struct datatype** dt, 
+static int DEBUG_PTS_ReadRange(struct ParseTypedefData* ptd, struct datatype** dt,
 			       int* lo, int* hi)
 {
     /* type ';' <int> ';' <int> ';' */
@@ -350,7 +350,7 @@
      * but don't store results into the struct
      * FIXME: there's a quite ugly memory leak in there...
      */
-	  
+
     /* Now parse the individual elements of the structure/union. */
     while (*ptd->ptr != ';') {
 	/* agg_name : type ',' <int:offset> ',' <int:size> */
@@ -396,7 +396,7 @@
     struct datatype*	rdt;
 
     /* ar<typeinfo_nodef>;<int>;<int>;<typeinfo> */
-	  
+
     if (*ptd->ptr++ != 'r') return -1;
     /* FIXME: range type is lost, always assume int */
     if (DEBUG_PTS_ReadRange(ptd, &rdt, &lo, &hi) == -1) return -1;
@@ -470,7 +470,7 @@
 	    } else if (!dt1 && !dt2)  {
 		new_dt = NULL;
 	    } else {
-		DEBUG_Printf(DBG_CHN_MESG, "Unknown condition %08lx %08lx (%s)\n", 
+		DEBUG_Printf(DBG_CHN_MESG, "Unknown condition %08lx %08lx (%s)\n",
 			     (unsigned long)dt1, (unsigned long)dt2, ptd->ptr);
 		return -1;
 	    }
@@ -502,13 +502,13 @@
 	    dt2 = DEBUG_TypeCast(DT_STRUCT, typename);
 	    if (!dt1) {
 		new_dt = DEBUG_NewDataType(DT_STRUCT, typename);
-		/* we need to set it here, because a struct can hold a pointer 
-		 * to itself 
+		/* we need to set it here, because a struct can hold a pointer
+		 * to itself
 		 */
 		*DEBUG_FileSubNr2StabEnum(filenr1, subnr1) = new_dt;
 	    } else {
 		if (DEBUG_GetType(dt1) != DT_STRUCT) {
-		    DEBUG_Printf(DBG_CHN_MESG, 
+		    DEBUG_Printf(DBG_CHN_MESG,
 				 "Forward declaration is not an aggregate\n");
 		    return -1;
 		}
@@ -524,10 +524,10 @@
 	    case 's':	case 'u':	lo = DT_STRUCT;	break;
 	    default: return -1;
 	    }
-	    
+
 	    idx = ptd->idx;
 	    if (DEBUG_PTS_ReadID(ptd) == -1) return -1;
-	    new_dt = DEBUG_NewDataType(lo, ptd->buf + idx); 
+	    new_dt = DEBUG_NewDataType(lo, ptd->buf + idx);
 	    ptd->idx = idx;
 	    break;
 	case '-':
@@ -538,7 +538,7 @@
                 enum debug_type_basic basic = DT_BASIC_LAST;
                 switch (lo)
                 {
-                case  1: basic = DT_BASIC_INT; break;      
+                case  1: basic = DT_BASIC_INT; break;
                 case  2: basic = DT_BASIC_CHAR; break;
                 case  3: basic = DT_BASIC_SHORTINT; break;
                 case  4: basic = DT_BASIC_LONGINT; break;
@@ -622,7 +622,7 @@
     int				ret = -1;
 
     /* check for already existing definition */
-    
+
     ptd.idx = 0;
     if ((ptd.ptr = strchr(ptr, ':'))) {
 	ptd.ptr++;
@@ -659,7 +659,7 @@
    */
   if (*c != '(')
     c++;
-  /* 
+  /*
    * The next is either an integer or a (integer,integer).
    * The DEBUG_ReadTypeEnum takes care that stab_types is large enough.
    */
@@ -667,7 +667,7 @@
 }
 
 enum DbgInfoLoad DEBUG_ParseStabs(char * addr, unsigned int load_offset,
-				  unsigned int staboff, int stablen, 
+				  unsigned int staboff, int stablen,
 				  unsigned int strtaboff, int strtablen)
 {
   struct name_hash    * curr_func = NULL;
@@ -794,7 +794,7 @@
 	  new_value.cookie = DV_TARGET;
 
           stab_strcpy(symname, sizeof(symname), ptr);
-          curr_sym = DEBUG_AddSymbol( symname, &new_value, currpath, 
+          curr_sym = DEBUG_AddSymbol( symname, &new_value, currpath,
                                       SYM_WINE | SYM_DATA );
           break;
         case N_PSYM:
@@ -804,7 +804,7 @@
           if( curr_func != NULL && !in_external_file )
             {
               stab_strcpy(symname, sizeof(symname), ptr);
-              curr_loc = DEBUG_AddLocal( curr_func, 0, 
+              curr_loc = DEBUG_AddLocal( curr_func, 0,
                                          stab_ptr->n_value, 0, 0, symname );
               DEBUG_SetLocalSymbolType( curr_loc, DEBUG_ParseStabType(ptr) );
             }
@@ -813,7 +813,7 @@
           if( curr_func != NULL && !in_external_file )
             {
               stab_strcpy(symname, sizeof(symname), ptr);
-              curr_loc = DEBUG_AddLocal( curr_func, stab_ptr->n_value + 1, 
+              curr_loc = DEBUG_AddLocal( curr_func, stab_ptr->n_value + 1,
 					 0, 0, 0, symname );
               DEBUG_SetLocalSymbolType( curr_loc, DEBUG_ParseStabType(ptr) );
             }
@@ -822,7 +822,7 @@
           if( curr_func != NULL && !in_external_file )
             {
               stab_strcpy(symname, sizeof(symname), ptr);
-              curr_loc = DEBUG_AddLocal( curr_func, 0, 
+              curr_loc = DEBUG_AddLocal( curr_func, 0,
 					 stab_ptr->n_value, 0, 0, symname );
 	      DEBUG_SetLocalSymbolType( curr_loc, DEBUG_ParseStabType(ptr) );
             }
@@ -835,7 +835,7 @@
           if( curr_func != NULL && !in_external_file )
             {
 #ifdef __ELF__
-              DEBUG_AddLineNumber(curr_func, stab_ptr->n_desc, 
+              DEBUG_AddLineNumber(curr_func, stab_ptr->n_desc,
                                   stab_ptr->n_value);
 #else
 #if 0
@@ -844,7 +844,7 @@
                * a.out, and as a result we would end up attaching the line
                * number to the wrong function.
                */
-              DEBUG_AddLineNumber(curr_func, stab_ptr->n_desc, 
+              DEBUG_AddLineNumber(curr_func, stab_ptr->n_desc,
                                   stab_ptr->n_value - curr_func->addr.off);
 #endif
 #endif
@@ -884,7 +884,7 @@
 		  curr_func = DEBUG_AddSymbol( symname, &new_value, currpath,
 					       SYM_WINE | SYM_FUNC );
 #endif
-		} 
+		}
 	      else
 		{
 		  /* some GCC seem to use a N_FUN "" to mark the end of a function */
@@ -979,7 +979,7 @@
       stabbuff[0] = '\0';
 
 #if 0
-      DEBUG_Printf(DBG_CHN_MESG, "%d %x %s\n", stab_ptr->n_type, 
+      DEBUG_Printf(DBG_CHN_MESG, "%d %x %s\n", stab_ptr->n_type,
 		   (unsigned int) stab_ptr->n_value,
 		   strs + (unsigned int) stab_ptr->n_un.n_name);
 #endif
@@ -1001,8 +1001,8 @@
  * This is all really quite easy, since we don't have to worry about line
  * numbers or local data variables.
  */
-static int DEBUG_ProcessElfSymtab(DBG_MODULE* module, char* addr, 
-				  u_long load_addr, Elf32_Shdr* symtab, 
+static int DEBUG_ProcessElfSymtab(DBG_MODULE* module, char* addr,
+				  u_long load_addr, Elf32_Shdr* symtab,
 				  Elf32_Shdr* strtab)
 {
   char		* curfile = NULL;
@@ -1058,7 +1058,7 @@
       new_value.type = NULL;
       new_value.addr.off = load_addr + symp->st_value;
       new_value.cookie = DV_TARGET;
-      flags = SYM_WINE | ((ELF32_ST_TYPE(symp->st_info) == STT_FUNC) 
+      flags = SYM_WINE | ((ELF32_ST_TYPE(symp->st_info) == STT_FUNC)
 			  ? SYM_FUNC : SYM_DATA);
       if( ELF32_ST_BIND(symp->st_info) == STB_GLOBAL )
 	  curr_sym = DEBUG_AddSymbol( symname, &new_value, NULL, flags );
@@ -1080,9 +1080,9 @@
  * Loads the symbolic information from ELF module stored in 'filename'
  * the module has been loaded at 'load_offset' address, so symbols' address
  * relocation is performed
- * returns 
+ * returns
  *	-1 if the file cannot be found/opened
- *	0 if the file doesn't contain symbolic info (or this info cannot be 
+ *	0 if the file doesn't contain symbolic info (or this info cannot be
  *	read or parsed)
  *	1 on success
  */
@@ -1112,14 +1112,14 @@
      * Now open the file, so that we can mmap() it.
      */
     if ((fd = open(module->module_name, O_RDONLY)) == -1) goto leave;
-    
+
     dil = DIL_NOINFO;
     /*
      * Now mmap() the file.
      */
     addr = mmap(0, statbuf.st_size, PROT_READ, MAP_PRIVATE, fd, 0);
     if (addr == (char*)0xffffffff) goto leave;
-    
+
     /*
      * Next, we need to find a few of the internal ELF headers within
      * this thing.  We need the main executable header, and the section
@@ -1128,27 +1128,27 @@
     ehptr = (Elf32_Ehdr*) addr;
     spnt = (Elf32_Shdr*) (addr + ehptr->e_shoff);
     shstrtab = (addr + spnt[ehptr->e_shstrndx].sh_offset);
-    
+
     stabsect = stabstrsect = -1;
-    
+
     for (i = 0; i < ehptr->e_shnum; i++) {
 	if (strcmp(shstrtab + spnt[i].sh_name, ".stab") == 0)
 	    stabsect = i;
-	
+
 	if (strcmp(shstrtab + spnt[i].sh_name, ".stabstr") == 0)
 	    stabstrsect = i;
     }
-    
+
     if (stabsect == -1 || stabstrsect == -1) {
 	DEBUG_Printf(DBG_CHN_WARN, "no .stab section\n");
 	goto leave;
     }
-    
+
     /*
      * OK, now just parse all of the stabs.
      */
-    if (DEBUG_ParseStabs(addr, 
-			 module->elf_info->elf_addr, 
+    if (DEBUG_ParseStabs(addr,
+			 module->elf_info->elf_addr,
 			 spnt[stabsect].sh_offset,
 			 spnt[stabsect].sh_size,
 			 spnt[stabstrsect].sh_offset,
@@ -1159,36 +1159,36 @@
 	DEBUG_Printf(DBG_CHN_WARN, "bad stabs\n");
 	goto leave;
     }
-    
+
     for (i = 0; i < ehptr->e_shnum; i++) {
 	if (   (strcmp(shstrtab + spnt[i].sh_name, ".symtab") == 0)
 	    && (spnt[i].sh_type == SHT_SYMTAB))
 	    DEBUG_ProcessElfSymtab(module, addr, module->elf_info->elf_addr,
 				   spnt + i, spnt + spnt[i].sh_link);
-	
+
 	if (   (strcmp(shstrtab + spnt[i].sh_name, ".dynsym") == 0)
 	    && (spnt[i].sh_type == SHT_DYNSYM))
-	    DEBUG_ProcessElfSymtab(module, addr, module->elf_info->elf_addr, 
+	    DEBUG_ProcessElfSymtab(module, addr, module->elf_info->elf_addr,
 				   spnt + i, spnt + spnt[i].sh_link);
     }
 
  leave:
     if (addr != (char*)0xffffffff) munmap(addr, statbuf.st_size);
     if (fd != -1) close(fd);
-    
+
     return dil;
 }
 
 /*
  * Loads the information for ELF module stored in 'filename'
  * the module has been loaded at 'load_offset' address
- * returns 
+ * returns
  *	-1 if the file cannot be found/opened
- *	0 if the file doesn't contain symbolic info (or this info cannot be 
+ *	0 if the file doesn't contain symbolic info (or this info cannot be
  *	read or parsed)
  *	1 on success
  */
-static enum DbgInfoLoad DEBUG_ProcessElfFile(const char* filename, 
+static enum DbgInfoLoad DEBUG_ProcessElfFile(const char* filename,
 					     unsigned int load_offset,
 					     unsigned int* dyn_addr)
 {
@@ -1210,12 +1210,12 @@
 
     /* check that the file exists, and that the module hasn't been loaded yet */
     if (stat(filename, &statbuf) == -1) goto leave;
-    
+
     /*
      * Now open the file, so that we can mmap() it.
      */
     if ((fd = open(filename, O_RDONLY)) == -1) goto leave;
-    
+
     /*
      * Now mmap() the file.
      */
@@ -1223,7 +1223,7 @@
     if (addr == (char*)0xffffffff) goto leave;
 
     dil = DIL_NOINFO;
-    
+
     /*
      * Next, we need to find a few of the internal ELF headers within
      * this thing.  We need the main executable header, and the section
@@ -1248,7 +1248,7 @@
 	if (size < ppnt[i].p_vaddr - delta + ppnt[i].p_memsz)
 	    size = ppnt[i].p_vaddr - delta + ppnt[i].p_memsz;
     }
-    
+
     for (i = 0; i < ehptr->e_shnum; i++) {
 	if (strcmp(shstrtab + spnt[i].sh_name, ".bss") == 0 &&
 	    spnt[i].sh_type == SHT_NOBITS) {
@@ -1260,8 +1260,8 @@
 	    if (dyn_addr) *dyn_addr = spnt[i].sh_addr;
 	}
     }
-    
-    module = DEBUG_RegisterELFModule((load_offset == 0) ? ehptr->e_entry : load_offset, 
+
+    module = DEBUG_RegisterELFModule((load_offset == 0) ? ehptr->e_entry : load_offset,
 				     size, filename);
     if (!module) {
 	dil = DIL_ERROR;
@@ -1280,13 +1280,13 @@
     if (addr != (char*)0xffffffff) munmap(addr, statbuf.st_size);
     if (fd != -1) close(fd);
     if (module) module->dil = dil;
-    
+
     return dil;
 }
 
-static enum DbgInfoLoad DEBUG_ProcessElfFileFromPath(const char * filename, 
-						     unsigned int load_offset, 
-						     unsigned int* dyn_addr, 
+static enum DbgInfoLoad DEBUG_ProcessElfFileFromPath(const char * filename,
+						     unsigned int load_offset,
+						     unsigned int* dyn_addr,
 						     const char* path)
 {
     enum DbgInfoLoad	dil = DIL_ERROR;
@@ -1313,7 +1313,7 @@
     return dil;
 }
 
-static enum DbgInfoLoad DEBUG_ProcessElfObject(const char* filename, 
+static enum DbgInfoLoad DEBUG_ProcessElfObject(const char* filename,
 					       unsigned int load_offset,
 					       unsigned int* dyn_addr)
 {
@@ -1335,7 +1335,7 @@
 
    return dil;
 }
-   
+
 static	BOOL	DEBUG_WalkList(struct r_debug* dbg_hdr)
 {
     u_long		lm_addr;
@@ -1361,7 +1361,7 @@
 	    DEBUG_ProcessElfObject(bufstr, (unsigned)lm.l_addr, NULL);
 	}
     }
-    
+
     return TRUE;
 }
 
@@ -1369,12 +1369,12 @@
 {
     struct r_debug        dbg_hdr;
 
-    if (!DEBUG_CurrProcess || 
+    if (!DEBUG_CurrProcess ||
 	!DEBUG_READ_MEM_VERBOSE((void*)DEBUG_CurrProcess->dbg_hdr_addr, &dbg_hdr, sizeof(dbg_hdr)))
        return FALSE;
 
     switch (dbg_hdr.r_state) {
-    case RT_CONSISTENT:	
+    case RT_CONSISTENT:
        DEBUG_WalkList(&dbg_hdr);
        DEBUG_CheckDelayedBP();
        break;
@@ -1393,35 +1393,35 @@
     struct r_debug      dbg_hdr;
     enum DbgInfoLoad	dil = DIL_NOINFO;
     unsigned int	dyn_addr;
-    
+
     /*
      * Make sure we can stat and open this file.
      */
     if (exe_name == NULL) goto leave;
     DEBUG_ProcessElfObject(exe_name, 0, &dyn_addr);
-    
+
     do {
 	if (!DEBUG_READ_MEM_VERBOSE((void*)dyn_addr, &dyn, sizeof(dyn)))
 	    goto leave;
 	dyn_addr += sizeof(dyn);
     } while (dyn.d_tag != DT_DEBUG && dyn.d_tag != DT_NULL);
     if (dyn.d_tag == DT_NULL) goto leave;
-    
+
     /*
      * OK, now dig into the actual tables themselves.
      */
     if (!DEBUG_READ_MEM_VERBOSE((void*)dyn.d_un.d_ptr, &dbg_hdr, sizeof(dbg_hdr)))
 	goto leave;
-    
+
     assert(!DEBUG_CurrProcess->dbg_hdr_addr);
     DEBUG_CurrProcess->dbg_hdr_addr = (u_long)dyn.d_un.d_ptr;
-    
+
     if (dbg_hdr.r_brk) {
 	DBG_VALUE	value;
-	
+
 	DEBUG_Printf(DBG_CHN_TRACE, "Setting up a breakpoint on r_brk(%lx)\n",
 		     (unsigned long)dbg_hdr.r_brk);
-	
+
 	DEBUG_SetBreakpoints(FALSE);
 	value.type = NULL;
 	value.cookie = DV_TARGET;
@@ -1430,9 +1430,9 @@
 	DEBUG_AddBreakpoint(&value, DEBUG_RescanElf);
 	DEBUG_SetBreakpoints(TRUE);
     }
-    
+
     dil = DEBUG_WalkList(&dbg_hdr);
-    
+
  leave:
     return dil;
 }
diff --git a/debugger/stack.c b/debugger/stack.c
index c0f460d..36333f7 100644
--- a/debugger/stack.c
+++ b/debugger/stack.c
@@ -70,7 +70,7 @@
 {
 #ifdef __i386__
     DBG_VALUE	value;
-    
+
     value.type = NULL;
     value.cookie = DV_TARGET;
     value.addr.seg = DEBUG_context.SegSs;
@@ -109,8 +109,8 @@
     if (noisy)
         frames[theframe].frame = DEBUG_PrintAddressAndArgs( code, mode, stack->off, TRUE );
     else
-      DEBUG_FindNearestSymbol( code, TRUE, 
-			       &frames[theframe].frame.sym, stack->off, 
+      DEBUG_FindNearestSymbol( code, TRUE,
+			       &frames[theframe].frame.sym, stack->off,
 			       &frames[theframe].frame.list);
     frames[theframe].ss = stack->seg;
     frames[theframe].ebp = stack->off;
@@ -126,9 +126,9 @@
     FRAME16 		frame;
     void*		p = (void*)DEBUG_ToLinear(addr);
     DBG_ADDR		code;
-    
+
     if (!p) return FALSE;
-    
+
     if (!DEBUG_READ_MEM(p, &frame, sizeof(frame))) {
         if (noisy) DEBUG_InvalAddr(addr);
 	return FALSE;
@@ -141,7 +141,7 @@
 	 * but check whether it could be anyway */
         if (((frame.cs&7)==7) && (frame.cs != *cs)) {
 	    LDT_ENTRY	le;
-	 
+
 	    if (GetThreadSelectorEntry( thread->handle, frame.cs, &le) &&
 		(le.HighWord.Bits.Type & 0x08)) { /* code segment */
 	        /* it is very uncommon to push a code segment cs as
@@ -164,9 +164,9 @@
     void*		p = (void*)DEBUG_ToLinear(addr);
     DBG_ADDR		code;
     DWORD		old_bp = addr->off;
-    
+
     if (!p) return FALSE;
-    
+
     if (!DEBUG_READ_MEM(p, &frame, sizeof(frame))) {
        if (noisy) DEBUG_InvalAddr(addr);
        return FALSE;
@@ -204,7 +204,7 @@
     int 		copy_nframe = 0;
     int			copy_curr_frame = 0;
     struct bt_info* 	copy_frames = NULL;
-    
+
     if (noisy) DEBUG_Printf( DBG_CHN_MESG, "Backtrace:\n" );
 
     if (tid == DEBUG_CurrTid)
@@ -284,8 +284,8 @@
 	return;
     }
 
-    /* cur_switch holds address of curr_stack's field in TEB in debuggee 
-     * address space 
+    /* cur_switch holds address of curr_stack's field in TEB in debuggee
+     * address space
      */
     cur_switch = (DWORD)thread->teb + OFFSET_OF(TEB, cur_stack);
     if (!DEBUG_READ_MEM((void*)cur_switch, &next_switch, sizeof(next_switch))) {
@@ -295,7 +295,7 @@
 
     if (is16) {
         if (!DEBUG_READ_MEM((void*)next_switch, &frame32, sizeof(STACK32FRAME))) {
-	    if (noisy) DEBUG_Printf( DBG_CHN_MESG, "Bad stack frame 0x%08lx\n", 
+	    if (noisy) DEBUG_Printf( DBG_CHN_MESG, "Bad stack frame 0x%08lx\n",
 				     (unsigned long)(STACK32FRAME*)next_switch );
 	    return;
 	}
@@ -306,9 +306,9 @@
         tmp.seg = SELECTOROF(next_switch);
 	tmp.off = OFFSETOF(next_switch);
 	p = DEBUG_ToLinear(&tmp);
-	
+
 	if (!DEBUG_READ_MEM((void*)p, &frame16, sizeof(STACK16FRAME))) {
-	    if (noisy) DEBUG_Printf( DBG_CHN_MESG, "Bad stack frame 0x%08lx\n", 
+	    if (noisy) DEBUG_Printf( DBG_CHN_MESG, "Bad stack frame 0x%08lx\n",
 				     (unsigned long)(STACK16FRAME*)p );
 	    return;
 	}
@@ -320,7 +320,7 @@
         sw_addr.seg = (DWORD)-1;
 	sw_addr.off = (DWORD)-1;
     }
-    
+
     for (ok = TRUE; ok;) {
         if ((frames[frameno].ss == sw_addr.seg) &&
             sw_addr.off && (frames[frameno].ebp >= sw_addr.off))
@@ -328,65 +328,65 @@
 	   /* 16<->32 switch...
 	    * yes, I know this is confusing, it gave me a headache too */
 	   if (is16) {
-	      
+
 	       if (!DEBUG_READ_MEM((void*)next_switch, &frame32, sizeof(STACK32FRAME))) {
-		  if (noisy) DEBUG_Printf( DBG_CHN_MESG, "Bad stack frame 0x%08lx\n", 
+		  if (noisy) DEBUG_Printf( DBG_CHN_MESG, "Bad stack frame 0x%08lx\n",
 					   (unsigned long)(STACK32FRAME*)next_switch );
 		  return;
 	       }
 
 	       code.seg  = 0;
 	       code.off  = frame32.retaddr;
-	       
+
 	       cs = 0;
 	       addr.seg = 0;
 	       addr.off = frame32.ebp;
 	       DEBUG_ForceFrame( &addr, &code, ++frameno, MODE_32, noisy, NULL );
-	       
+
 	       next_switch = cur_switch;
 	       tmp.seg = SELECTOROF(next_switch);
 	       tmp.off = OFFSETOF(next_switch);
 	       p = DEBUG_ToLinear(&tmp);
-	       
+
 	       if (!DEBUG_READ_MEM((void*)p, &frame16, sizeof(STACK16FRAME))) {
-		   if (noisy) DEBUG_Printf( DBG_CHN_MESG, "Bad stack frame 0x%08lx\n", 
+		   if (noisy) DEBUG_Printf( DBG_CHN_MESG, "Bad stack frame 0x%08lx\n",
 					    (unsigned long)(STACK16FRAME*)p );
 		   return;
 	       }
 	       cur_switch = (DWORD)frame16.frame32;
 	       sw_addr.seg = 0;
 	       sw_addr.off = cur_switch;
-	       
+
 	       is16 = FALSE;
 	   } else {
 	      tmp.seg = SELECTOROF(next_switch);
 	      tmp.off = OFFSETOF(next_switch);
 	      p = DEBUG_ToLinear(&tmp);
-	      
+
 	      if (!DEBUG_READ_MEM((void*)p, &frame16, sizeof(STACK16FRAME))) {
 		  if (noisy) DEBUG_Printf( DBG_CHN_MESG, "Bad stack frame 0x%08lx\n",
 					   (unsigned long)(STACK16FRAME*)p );
 		  return;
 	      }
-	      
+
 	      code.seg  = frame16.cs;
 	      code.off  = frame16.ip;
-	      
+
 	      cs = frame16.cs;
 	      addr.seg = SELECTOROF(next_switch);
 	      addr.off = frame16.bp;
 	      DEBUG_ForceFrame( &addr, &code, ++frameno, MODE_16, noisy, NULL );
-	      
+
 	      next_switch = cur_switch;
 	      if (!DEBUG_READ_MEM((void*)next_switch, &frame32, sizeof(STACK32FRAME))) {
-		 if (noisy) DEBUG_Printf( DBG_CHN_MESG, "Bad stack frame 0x%08lx\n", 
+		 if (noisy) DEBUG_Printf( DBG_CHN_MESG, "Bad stack frame 0x%08lx\n",
 					  (unsigned long)(STACK32FRAME*)next_switch );
 		 return;
 	      }
 	      cur_switch = (DWORD)frame32.frame16;
 	      sw_addr.seg = SELECTOROF(cur_switch);
 	      sw_addr.off = OFFSETOF(cur_switch);
-	      
+
 	      is16 = TRUE;
 	   }
 	   if (!DEBUG_READ_MEM((void*)DEBUG_ToLinear(&sw_addr), &ch, sizeof(ch))) {
diff --git a/debugger/types.c b/debugger/types.c
index 298e5af..2a5805e 100644
--- a/debugger/types.c
+++ b/debugger/types.c
@@ -116,7 +116,7 @@
 
     p = name;
 
-    while (*p) 
+    while (*p)
       {
 	hash = (hash << 4) + *p++;
 
@@ -131,7 +131,7 @@
 
 
 static struct datatype *
-DEBUG_InitBasic(int type, char * name, int size, int b_signed, 
+DEBUG_InitBasic(int type, char * name, int size, int b_signed,
 			    char * output_format)
 {
   int hash;
@@ -174,12 +174,12 @@
     {
       for( dt = type_hash_table[hash]; dt; dt = dt->next )
 	{
-	  if( xtype != dt->type || dt->name == NULL 
+	  if( xtype != dt->type || dt->name == NULL
 	      || dt->name[0] != typename[0])
 	    {
 	      continue;
 	    }
-	  	  
+
 	  if( strcmp(dt->name, typename) == 0 )
 	    {
 	      return dt;
@@ -223,11 +223,11 @@
   if( dt == NULL )
     {
       dt = (struct datatype *) DBG_alloc(sizeof(struct datatype));
-      
+
       if( dt != NULL )
 	{
 	  memset(dt, 0, sizeof(*dt));
-      
+
 	  dt->type = xtype;
 	  if( typename != NULL )
 	    {
@@ -266,7 +266,7 @@
 	    {
 	      continue;
 	    }
-	  	  
+
 	  if( dt->un.pointer.pointsto == reftype )
 	    {
 	      return dt;
@@ -277,7 +277,7 @@
   if( dt == NULL )
     {
       dt = (struct datatype *) DBG_alloc(sizeof(struct datatype));
-      
+
       if( dt != NULL )
 	{
 	  dt->type = DT_POINTER;
@@ -351,33 +351,33 @@
    struct en_values * e;
    char * def_format = "0x%x";
    DBG_VALUE value = *_value;
-   
+
    assert(_value->cookie == DV_TARGET || _value->cookie == DV_HOST);
-   
+
    rtn = 0; rtn2 = 0;
    /* FIXME? I don't quite get this...
-    * if this is wrong, value.addr shall be linearized 
+    * if this is wrong, value.addr shall be linearized
     */
-   value.addr.seg = 0; 
+   value.addr.seg = 0;
    assert(value.type != NULL);
-   
+
    switch (value.type->type) {
    case DT_BASIC:
-      
+
       if (value.type->un.basic.basic_size > sizeof(rtn)) {
-	 DEBUG_Printf(DBG_CHN_ERR, "Size too large (%d)\n", 
+	 DEBUG_Printf(DBG_CHN_ERR, "Size too large (%d)\n",
 		      value.type->un.basic.basic_size);
 	 return 0;
       }
       /* FIXME: following code implies i386 byte ordering */
       if (_value->cookie == DV_TARGET) {
-	 if (!DEBUG_READ_MEM_VERBOSE((void*)value.addr.off, &rtn, 
+	 if (!DEBUG_READ_MEM_VERBOSE((void*)value.addr.off, &rtn,
 				     value.type->un.basic.basic_size))
 	    return 0;
       } else {
 	 memcpy(&rtn, (void*)value.addr.off, value.type->un.basic.basic_size);
       }
-      
+
       if (    (value.type->un.basic.b_signed)
 	  && ((value.type->un.basic.basic_size & 3) != 0)
 	  && ((rtn >> (value.type->un.basic.basic_size * 8 - 1)) != 0)) {
@@ -394,12 +394,12 @@
       if (value.type->un.basic.output_format != NULL) {
 	 def_format = value.type->un.basic.output_format;
       }
-      
+
       /*
        * Check for single character prints that are out of range.
        */
       if (   value.type->un.basic.basic_size == 1
-	  && strcmp(def_format, "'%c'") == 0 
+	  && strcmp(def_format, "'%c'") == 0
 	  && ((rtn < 0x20) || (rtn > 0x80))) {
 	 def_format = "%d";
       }
@@ -411,16 +411,16 @@
       } else {
 	 rtn2 = *(unsigned int*)(value.addr.off);
       }
-      
+
       type2 = value.type->un.pointer.pointsto;
-      
+
       if (!type2) {
 	 def_format = "Internal symbol error: unable to access memory location 0x%08x";
 	 rtn = 0;
 	 break;
       }
-      
-      if (type2->type == DT_BASIC && type2->un.basic.basic_size == 1) {	
+
+      if (type2->type == DT_BASIC && type2->un.basic.basic_size == 1) {
 	 if (_value->cookie == DV_TARGET) {
 	    char ch;
 	    def_format = "\"%S\"";
@@ -461,8 +461,8 @@
       rtn = 0;
       break;
    }
-   
-   
+
+
    if (format != NULL) {
       *format = def_format;
    }
@@ -594,7 +594,7 @@
 }
 
 int
-DEBUG_AddStructElement(struct datatype * dt, char * name, struct datatype * type, 
+DEBUG_AddStructElement(struct datatype * dt, char * name, struct datatype * type,
 		       int offset, int size)
 {
   struct member * m;
@@ -605,7 +605,7 @@
     {
       for(last = dt->un.structure.members; last; last = last->next)
 	{
-	  if(    (last->name[0] == name[0]) 
+	  if(    (last->name[0] == name[0])
 	      && (strcmp(last->name, name) == 0) )
 	    {
 	      return TRUE;
@@ -620,7 +620,7 @@
 	{
 	  return FALSE;
 	}
-      
+
       m->name = DBG_strdup(name);
       m->type = type;
       m->offset = offset;
@@ -653,7 +653,7 @@
 	{
 	  return FALSE;
 	}
-      
+
       e->name = DBG_strdup(name);
       e->value = offset;
       e->next = dt->un.enumeration.members;
@@ -666,7 +666,7 @@
   return TRUE;
 }
 
-struct datatype * 
+struct datatype *
 DEBUG_GetPointerType(struct datatype * dt)
 {
   if( dt->type == DT_POINTER )
@@ -707,7 +707,7 @@
 }
 
 int
-DEBUG_SetBitfieldParams(struct datatype * dt, int offset, int nbits, 
+DEBUG_SetBitfieldParams(struct datatype * dt, int offset, int nbits,
 			struct datatype * dt2)
 {
   assert(dt->type == DT_BITFIELD);
@@ -736,7 +736,7 @@
     case DT_ENUM:
       return sizeof(int);
     case DT_ARRAY:
-      return (dt->un.array.end - dt->un.array.start) 
+      return (dt->un.array.end - dt->un.array.start)
 	* DEBUG_GetObjectSize(dt->un.array.basictype);
     case DT_BITFIELD:
       /*
@@ -780,7 +780,7 @@
       size = DEBUG_GetObjectSize(value->type->un.array.basictype);
       result->type = value->type->un.array.basictype;
       result->addr.off = value->addr.off + size * (index - value->type->un.array.start);
-  
+
       /* Contents of array must be on same target */
       result->cookie = value->cookie;
     }
@@ -814,7 +814,7 @@
       DEBUG_Printf( DBG_CHN_MESG, "Count other than 1 is meaningless in 'print' command\n" );
       return;
     }
-  
+
   if( value->type == NULL )
   {
       /* No type, just print the addr value */
@@ -823,7 +823,7 @@
       DEBUG_nchar += DEBUG_Printf( DBG_CHN_MESG, "0x%08lx", value->addr.off );
       goto leave;
   }
-  
+
   if( level == 0 )
     {
       DEBUG_nchar = 0;
@@ -897,7 +897,7 @@
           default: assert(0);
           }
           DEBUG_nchar += clen;
-          if (clen != len) 
+          if (clen != len)
           {
               DEBUG_Printf(DBG_CHN_MESG, "...\"");
               goto leave;
@@ -929,7 +929,7 @@
       break;
     case DT_FUNC:
       DEBUG_Printf(DBG_CHN_MESG, "Function at ???\n");
-      break; 
+      break;
     default:
       DEBUG_Printf(DBG_CHN_MESG, "Unknown type (%d)\n", value->type->type);
       assert(FALSE);
@@ -986,7 +986,7 @@
 		      nm++;
 		    }
 		}
-	      DEBUG_Printf(DBG_CHN_MESG, "0x%08lx - STRUCT(%s) %d %d %s\n", 
+	      DEBUG_Printf(DBG_CHN_MESG, "0x%08lx - STRUCT(%s) %d %d %s\n",
 			   (unsigned long)dt, name, dt->un.structure.size, nm, member_name);
 	      break;
 	    case DT_ARRAY:
@@ -994,11 +994,11 @@
 			   (unsigned long)dt, name, (unsigned long)dt->un.array.basictype);
 	      break;
 	    case DT_ENUM:
-	      DEBUG_Printf(DBG_CHN_MESG, "0x%08lx - ENUM(%s)\n", 
+	      DEBUG_Printf(DBG_CHN_MESG, "0x%08lx - ENUM(%s)\n",
 			   (unsigned long)dt, name);
 	      break;
 	    case DT_BITFIELD:
-	      DEBUG_Printf(DBG_CHN_MESG, "0x%08lx - BITFIELD(%s)\n", 
+	      DEBUG_Printf(DBG_CHN_MESG, "0x%08lx - BITFIELD(%s)\n",
 			   (unsigned long)dt, name);
 	      break;
 	    case DT_FUNC:
@@ -1093,7 +1093,7 @@
 {
    assert(value->cookie == DV_TARGET || value->cookie == DV_HOST);
 
-   if (!value->type) 
+   if (!value->type)
    {
       DEBUG_Printf(DBG_CHN_MESG, "Unknown type\n");
       return FALSE;
diff --git a/debugger/winedbg.c b/debugger/winedbg.c
index cf7acad..c256532 100644
--- a/debugger/winedbg.c
+++ b/debugger/winedbg.c
@@ -113,7 +113,7 @@
     for (i = 0; i < DBG_IV_LAST; i++) {
 	if (read) {
 	    if (!DEBUG_IntVars[i].pval) {
-		if (!RegQueryValueEx(hkey, DEBUG_IntVars[i].name, 0, 
+		if (!RegQueryValueEx(hkey, DEBUG_IntVars[i].name, 0,
 				     &type, (LPSTR)&val, &count))
 		    DEBUG_IntVars[i].val = val;
 		DEBUG_IntVars[i].pval = &DEBUG_IntVars[i].val;
@@ -123,7 +123,7 @@
 	} else {
 	    /* FIXME: type should be infered from basic type -if any- of intvar */
 	    if (DEBUG_IntVars[i].pval == &DEBUG_IntVars[i].val)
-		RegSetValueEx(hkey, DEBUG_IntVars[i].name, 0, 
+		RegSetValueEx(hkey, DEBUG_IntVars[i].name, 0,
 			      type, (LPCVOID)DEBUG_IntVars[i].pval, count);
 	}
     }
@@ -141,7 +141,7 @@
     }
     return NULL;
 }
-		       
+
 static WINE_EXCEPTION_FILTER(wine_dbg)
 {
     DEBUG_Printf(DBG_CHN_MESG, "\nwine_dbg: Exception (%lx) inside debugger, continuing...\n", GetExceptionCode());
@@ -152,7 +152,7 @@
 DBG_PROCESS*	DEBUG_GetProcess(DWORD pid)
 {
     DBG_PROCESS*	p;
-    
+
     for (p = DEBUG_ProcessList; p; p = p->next)
 	if (p->pid == pid) break;
     return p;
@@ -220,11 +220,11 @@
 {
     LPVOID	ad;
     DWORD	sz;
-    
-    if (   addr 
-	&& ReadProcessMemory(hp, addr, &ad, sizeof(ad), &sz) 
-	&& sz == sizeof(ad) 
-        && ad 
+
+    if (   addr
+	&& ReadProcessMemory(hp, addr, &ad, sizeof(ad), &sz)
+	&& sz == sizeof(ad)
+        && ad
         && ReadProcessMemory(hp, ad, buffer, size, &sz))
 	return TRUE;
     *(WCHAR*)buffer = 0;
@@ -234,19 +234,19 @@
 DBG_THREAD*	DEBUG_GetThread(DBG_PROCESS* p, DWORD tid)
 {
     DBG_THREAD*	t;
-    
+
     for (t = p->threads; t; t = t->next)
 	if (t->tid == tid) break;
     return t;
 }
 
-static	DBG_THREAD*	DEBUG_AddThread(DBG_PROCESS* p, DWORD tid, 
+static	DBG_THREAD*	DEBUG_AddThread(DBG_PROCESS* p, DWORD tid,
 					HANDLE h, LPVOID start, LPVOID teb)
 {
     DBG_THREAD*	t = DBG_alloc(sizeof(DBG_THREAD));
     if (!t)
 	return NULL;
-    
+
     t->handle = h;
     t->tid = tid;
     t->start = start;
@@ -270,10 +270,10 @@
 static	void			DEBUG_InitCurrThread(void)
 {
     if (DEBUG_CurrThread->start) {
-	if (DEBUG_CurrThread->process->num_threads == 1 || 
+	if (DEBUG_CurrThread->process->num_threads == 1 ||
 	    DBG_IVAR(BreakAllThreadsStartup)) {
 	    DBG_VALUE	value;
-	    
+
 	    DEBUG_SetBreakpoints(FALSE);
 	    value.type = NULL;
 	    value.cookie = DV_TARGET;
@@ -315,7 +315,7 @@
 {
     /* remove all set breakpoints in debuggee code */
     DEBUG_SetBreakpoints(FALSE);
-    /* needed for single stepping (ugly). 
+    /* needed for single stepping (ugly).
      * should this be handled inside the server ??? */
 #ifdef __i386__
     DEBUG_context.EFlags &= ~STEP_FLAG;
@@ -357,11 +357,11 @@
         }
 	DEBUG_Printf(DBG_CHN_MESG, ".\n");
     }
- 
+
     DEBUG_LoadEntryPoints("Loading new modules symbols:\n");
 
-    if (!force && is_debug && 
-	DEBUG_ShouldContinue(&addr, code, 
+    if (!force && is_debug &&
+	DEBUG_ShouldContinue(&addr, code,
 			     &DEBUG_CurrThread->exec_count))
 	return FALSE;
 
@@ -407,7 +407,7 @@
 	DEBUG_DisassembleInstruction(&addr);
 
 	/* resets list internal arguments so we can look at source code when needed */
-	DEBUG_FindNearestSymbol(&addr, TRUE, NULL, 0, &list); 
+	DEBUG_FindNearestSymbol(&addr, TRUE, NULL, 0, &list);
 	if (list.sourcefile) DEBUG_List(&list, NULL, 0);
     }
     return TRUE;
@@ -490,7 +490,7 @@
             break;
         case EXCEPTION_ACCESS_VIOLATION:
             if (rec->NumberParameters == 2)
-                DEBUG_Printf(DBG_CHN_MESG, "page fault on %s access to 0x%08lx", 
+                DEBUG_Printf(DBG_CHN_MESG, "page fault on %s access to 0x%08lx",
 			      rec->ExceptionInformation[0] ? "write" : "read",
 			      rec->ExceptionInformation[1]);
             else
@@ -548,10 +548,10 @@
     }
 
 #if 0
-    DEBUG_Printf(DBG_CHN_TRACE, 
+    DEBUG_Printf(DBG_CHN_TRACE,
 		 "Entering debugger 	PC=%lx EFL=%08lx mode=%d count=%d\n",
 #ifdef __i386__
-		 DEBUG_context.Eip, DEBUG_context.EFlags, 
+		 DEBUG_context.Eip, DEBUG_context.EFlags,
 #else
 		 0L, 0L,
 #endif
@@ -583,10 +583,10 @@
     DEBUG_ExceptionEpilog();
 
 #if 0
-    DEBUG_Printf(DBG_CHN_TRACE, 
+    DEBUG_Printf(DBG_CHN_TRACE,
 		 "Exiting debugger 	PC=%lx EFL=%08lx mode=%d count=%d\n",
 #ifdef __i386__
-		 DEBUG_context.Eip, DEBUG_context.EFlags, 
+		 DEBUG_context.Eip, DEBUG_context.EFlags,
 #else
 		 0L, 0L,
 #endif
@@ -605,9 +605,9 @@
     __TRY {
 	if ((DEBUG_CurrProcess = DEBUG_GetProcess(de->dwProcessId)) != NULL)
 	    DEBUG_CurrThread = DEBUG_GetThread(DEBUG_CurrProcess, de->dwThreadId);
-	else 
+	else
 	    DEBUG_CurrThread = NULL;
-	
+
 	switch (de->dwDebugEventCode) {
 	case EXCEPTION_DEBUG_EVENT:
 	    if (!DEBUG_CurrThread) {
@@ -615,9 +615,9 @@
 			     de->dwProcessId, de->dwThreadId);
 		break;
 	    }
-	    
-	    DEBUG_Printf(DBG_CHN_TRACE, "%08lx:%08lx: exception code=%08lx\n", 
-			 de->dwProcessId, de->dwThreadId, 
+
+	    DEBUG_Printf(DBG_CHN_TRACE, "%08lx:%08lx: exception code=%08lx\n",
+			 de->dwProcessId, de->dwThreadId,
 			 de->u.Exception.ExceptionRecord.ExceptionCode);
 
 	    if (DEBUG_CurrProcess->continue_on_first_exception) {
@@ -641,20 +641,20 @@
 		DEBUG_Printf(DBG_CHN_WARN, "Can't get thread's context\n");
 		break;
 	    }
-	    
-	    DEBUG_HandleException(&de->u.Exception.ExceptionRecord, 
-                                  de->u.Exception.dwFirstChance, 
+
+	    DEBUG_HandleException(&de->u.Exception.ExceptionRecord,
+                                  de->u.Exception.dwFirstChance,
                                   DEBUG_CurrThread->wait_for_first_exception);
 	    if (DEBUG_CurrThread) {
 		DEBUG_CurrThread->wait_for_first_exception = 0;
 		SetThreadContext(DEBUG_CurrThread->handle, &DEBUG_context);
 	    }
 	    break;
-	    
+
 	case CREATE_THREAD_DEBUG_EVENT:
-	    DEBUG_Printf(DBG_CHN_TRACE, "%08lx:%08lx: create thread D @%08lx\n", de->dwProcessId, de->dwThreadId, 
+	    DEBUG_Printf(DBG_CHN_TRACE, "%08lx:%08lx: create thread D @%08lx\n", de->dwProcessId, de->dwThreadId,
 			 (unsigned long)(LPVOID)de->u.CreateThread.lpStartAddress);
-	    
+
 	    if (DEBUG_CurrProcess == NULL) {
 		DEBUG_Printf(DBG_CHN_ERR, "Unknown process\n");
 		break;
@@ -663,11 +663,11 @@
 		DEBUG_Printf(DBG_CHN_TRACE, "Thread already listed, skipping\n");
 		break;
 	    }
-	    
-	    DEBUG_CurrThread = DEBUG_AddThread(DEBUG_CurrProcess, 
-					       de->dwThreadId, 
-					       de->u.CreateThread.hThread, 
-					       de->u.CreateThread.lpStartAddress, 
+
+	    DEBUG_CurrThread = DEBUG_AddThread(DEBUG_CurrProcess,
+					       de->dwThreadId,
+					       de->u.CreateThread.hThread,
+					       de->u.CreateThread.lpStartAddress,
 					       de->u.CreateThread.lpThreadLocalBase);
 	    if (!DEBUG_CurrThread) {
 		DEBUG_Printf(DBG_CHN_ERR, "Couldn't create thread\n");
@@ -675,20 +675,20 @@
 	    }
 	    DEBUG_InitCurrThread();
 	    break;
-	    
+
 	case CREATE_PROCESS_DEBUG_EVENT:
-	    DEBUG_ProcessGetStringIndirect(buffer, sizeof(buffer), 
-                                           de->u.CreateProcessInfo.hProcess, 
+	    DEBUG_ProcessGetStringIndirect(buffer, sizeof(buffer),
+                                           de->u.CreateProcessInfo.hProcess,
                                            de->u.CreateProcessInfo.lpImageName);
 
 	    /* FIXME unicode ? de->u.CreateProcessInfo.fUnicode */
-	    DEBUG_Printf(DBG_CHN_TRACE, "%08lx:%08lx: create process '%s'/%p @%08lx (%ld<%ld>)\n", 
-			 de->dwProcessId, de->dwThreadId, 
+	    DEBUG_Printf(DBG_CHN_TRACE, "%08lx:%08lx: create process '%s'/%p @%08lx (%ld<%ld>)\n",
+			 de->dwProcessId, de->dwThreadId,
 			 buffer, de->u.CreateProcessInfo.lpImageName,
 			 (unsigned long)(LPVOID)de->u.CreateProcessInfo.lpStartAddress,
 			 de->u.CreateProcessInfo.dwDebugInfoFileOffset,
 			 de->u.CreateProcessInfo.nDebugInfoSize);
-	    
+
 	    if ((DEBUG_CurrProcess = DEBUG_GetProcess(de->dwProcessId)) != NULL) {
 		if (DEBUG_CurrProcess->handle) {
 		    DEBUG_Printf(DBG_CHN_ERR, "Skipping already defined process\n");
@@ -707,44 +707,44 @@
 		    break;
 		}
 	    }
-	    
-	    DEBUG_Printf(DBG_CHN_TRACE, "%08lx:%08lx: create thread I @%08lx\n", 
-			 de->dwProcessId, de->dwThreadId, 
+
+	    DEBUG_Printf(DBG_CHN_TRACE, "%08lx:%08lx: create thread I @%08lx\n",
+			 de->dwProcessId, de->dwThreadId,
 			 (unsigned long)(LPVOID)de->u.CreateProcessInfo.lpStartAddress);
-	    
-	    DEBUG_CurrThread = DEBUG_AddThread(DEBUG_CurrProcess, 	
-					       de->dwThreadId, 
-					       de->u.CreateProcessInfo.hThread, 
-					       de->u.CreateProcessInfo.lpStartAddress, 
+
+	    DEBUG_CurrThread = DEBUG_AddThread(DEBUG_CurrProcess,
+					       de->dwThreadId,
+					       de->u.CreateProcessInfo.hThread,
+					       de->u.CreateProcessInfo.lpStartAddress,
 					       de->u.CreateProcessInfo.lpThreadLocalBase);
 	    if (!DEBUG_CurrThread) {
 		DEBUG_Printf(DBG_CHN_ERR, "Couldn't create thread\n");
 		break;
 	    }
-	    
+
 	    DEBUG_InitCurrProcess();
 	    DEBUG_InitCurrThread();
 
             /* module is either PE, NE or ELF module (for WineLib), but all
              * are loaded with wine, so load its symbols, then the main module
              */
-            do 
+            do
             {
                 char*   ptr = getenv("WINELOADER");
-                    
+
                 if (!ptr || DEBUG_ReadExecutableDbgInfo( ptr ) == DIL_ERROR)
                     DEBUG_ReadExecutableDbgInfo( "wine" );
             } while (0);
 
-	    DEBUG_LoadModule32(DEBUG_CurrProcess->imageName, de->u.CreateProcessInfo.hFile, 
+	    DEBUG_LoadModule32(DEBUG_CurrProcess->imageName, de->u.CreateProcessInfo.hFile,
 			       (DWORD)de->u.CreateProcessInfo.lpBaseOfImage);
 
 	    break;
-	    
+
 	case EXIT_THREAD_DEBUG_EVENT:
-	    DEBUG_Printf(DBG_CHN_TRACE, "%08lx:%08lx: exit thread (%ld)\n", 
+	    DEBUG_Printf(DBG_CHN_TRACE, "%08lx:%08lx: exit thread (%ld)\n",
 			 de->dwProcessId, de->dwThreadId, de->u.ExitThread.dwExitCode);
-	    
+
 	    if (DEBUG_CurrThread == NULL) {
 		DEBUG_Printf(DBG_CHN_ERR, "Unknown thread\n");
 		break;
@@ -752,11 +752,11 @@
 	    /* FIXME: remove break point set on thread startup */
 	    DEBUG_DelThread(DEBUG_CurrThread);
 	    break;
-	    
+
 	case EXIT_PROCESS_DEBUG_EVENT:
-	    DEBUG_Printf(DBG_CHN_TRACE, "%08lx:%08lx: exit process (%ld)\n", 
+	    DEBUG_Printf(DBG_CHN_TRACE, "%08lx:%08lx: exit process (%ld)\n",
 			 de->dwProcessId, de->dwThreadId, de->u.ExitProcess.dwExitCode);
-	    
+
 	    if (DEBUG_CurrProcess == NULL) {
 		DEBUG_Printf(DBG_CHN_ERR, "Unknown process\n");
 		break;
@@ -769,19 +769,19 @@
 
 	    DEBUG_Printf(DBG_CHN_MESG, "Process of pid=%08lx has terminated\n", DEBUG_CurrPid);
 	    break;
-	    
+
 	case LOAD_DLL_DEBUG_EVENT:
 	    if (DEBUG_CurrThread == NULL) {
 		DEBUG_Printf(DBG_CHN_ERR, "Unknown thread\n");
 		break;
 	    }
-	    DEBUG_ProcessGetStringIndirect(buffer, sizeof(buffer), 
-                                           DEBUG_CurrThread->process->handle, 
+	    DEBUG_ProcessGetStringIndirect(buffer, sizeof(buffer),
+                                           DEBUG_CurrThread->process->handle,
                                            de->u.LoadDll.lpImageName);
-	    
+
 	    /* FIXME unicode: de->u.LoadDll.fUnicode */
-	    DEBUG_Printf(DBG_CHN_TRACE, "%08lx:%08lx: loads DLL %s @%08lx (%ld<%ld>)\n", 
-			 de->dwProcessId, de->dwThreadId, 
+	    DEBUG_Printf(DBG_CHN_TRACE, "%08lx:%08lx: loads DLL %s @%08lx (%ld<%ld>)\n",
+			 de->dwProcessId, de->dwThreadId,
 			 buffer, (unsigned long)de->u.LoadDll.lpBaseOfDll,
 			 de->u.LoadDll.dwDebugInfoFileOffset,
 			 de->u.LoadDll.nDebugInfoSize);
@@ -789,43 +789,43 @@
 	    DEBUG_LoadModule32(buffer, de->u.LoadDll.hFile, (DWORD)de->u.LoadDll.lpBaseOfDll);
 	    DEBUG_CheckDelayedBP();
 	    if (DBG_IVAR(BreakOnDllLoad)) {
-		DEBUG_Printf(DBG_CHN_MESG, "Stopping on DLL %s loading at %08lx\n", 
+		DEBUG_Printf(DBG_CHN_MESG, "Stopping on DLL %s loading at %08lx\n",
 			     buffer, (unsigned long)de->u.LoadDll.lpBaseOfDll);
 		DEBUG_Parser();
 	    }
 	    break;
-	    
+
 	case UNLOAD_DLL_DEBUG_EVENT:
-	    DEBUG_Printf(DBG_CHN_TRACE, "%08lx:%08lx: unload DLL @%08lx\n", de->dwProcessId, de->dwThreadId, 
+	    DEBUG_Printf(DBG_CHN_TRACE, "%08lx:%08lx: unload DLL @%08lx\n", de->dwProcessId, de->dwThreadId,
 			 (unsigned long)de->u.UnloadDll.lpBaseOfDll);
 	    break;
-	    
+
 	case OUTPUT_DEBUG_STRING_EVENT:
 	    if (DEBUG_CurrThread == NULL) {
 		DEBUG_Printf(DBG_CHN_ERR, "Unknown thread\n");
 		break;
 	    }
-	    
-	    DEBUG_ProcessGetString(buffer, sizeof(buffer), 
-				   DEBUG_CurrThread->process->handle, 
+
+	    DEBUG_ProcessGetString(buffer, sizeof(buffer),
+				   DEBUG_CurrThread->process->handle,
 				   de->u.DebugString.lpDebugStringData);
-	    
+
 	    /* FIXME unicode de->u.DebugString.fUnicode ? */
-	    DEBUG_Printf(DBG_CHN_TRACE, "%08lx:%08lx: output debug string (%s)\n", 
+	    DEBUG_Printf(DBG_CHN_TRACE, "%08lx:%08lx: output debug string (%s)\n",
 			 de->dwProcessId, de->dwThreadId, buffer);
 	    break;
-	    
+
 	case RIP_EVENT:
-	    DEBUG_Printf(DBG_CHN_TRACE, "%08lx:%08lx: rip error=%ld type=%ld\n", 
-			 de->dwProcessId, de->dwThreadId, de->u.RipInfo.dwError, 
+	    DEBUG_Printf(DBG_CHN_TRACE, "%08lx:%08lx: rip error=%ld type=%ld\n",
+			 de->dwProcessId, de->dwThreadId, de->u.RipInfo.dwError,
 			 de->u.RipInfo.dwType);
 	    break;
-	    
+
 	default:
-	    DEBUG_Printf(DBG_CHN_TRACE, "%08lx:%08lx: unknown event (%ld)\n", 
+	    DEBUG_Printf(DBG_CHN_TRACE, "%08lx:%08lx: unknown event (%ld)\n",
 			 de->dwProcessId, de->dwThreadId, de->dwDebugEventCode);
 	}
-	
+
     } __EXCEPT(wine_dbg) {
 	DEBUG_ExitMode = EXIT_CONTINUE;
     }
@@ -837,8 +837,8 @@
     DEBUG_EVENT		de;
 
     DEBUG_Printf(DBG_CHN_MESG, " on pid %lx\n", DEBUG_CurrPid);
-    
-    while (DEBUG_ExitMode == EXIT_CONTINUE) 
+
+    while (DEBUG_ExitMode == EXIT_CONTINUE)
     {
 	/* wait until we get at least one loaded process */
 	while (!DEBUG_ProcessList)
@@ -848,12 +848,12 @@
         }
 	if (DEBUG_ExitMode != EXIT_CONTINUE) break;
 
-	while ((DEBUG_ExitMode == EXIT_CONTINUE || DEBUG_ExitMode == EXIT_PASS) && 
-               DEBUG_ProcessList && 
-               WaitForDebugEvent(&de, INFINITE)) 
+	while ((DEBUG_ExitMode == EXIT_CONTINUE || DEBUG_ExitMode == EXIT_PASS) &&
+               DEBUG_ProcessList &&
+               WaitForDebugEvent(&de, INFINITE))
         {
 	    DEBUG_HandleDebugEvent(&de);
-	    ContinueDebugEvent(de.dwProcessId, de.dwThreadId, 
+	    ContinueDebugEvent(de.dwProcessId, de.dwThreadId,
                                (DEBUG_ExitMode == EXIT_PASS) ? DBG_EXCEPTION_NOT_HANDLED : DBG_CONTINUE);
 	}
         if (DEBUG_ExitMode == EXIT_DETACH && DEBUG_Detach())
@@ -865,7 +865,7 @@
             DEBUG_ExitMode = EXIT_QUIT;
         }
     }
-    
+
     DEBUG_Printf(DBG_CHN_MESG, "WineDbg terminated on pid %lx\n", DEBUG_CurrPid);
 
     return 0;
@@ -878,11 +878,11 @@
     DEBUG_Printf(DBG_CHN_MESG, " on pid %lx\n", DEBUG_CurrPid);
 
     while ((DEBUG_ExitMode == EXIT_CONTINUE || DEBUG_ExitMode == EXIT_PASS) &&
-           DEBUG_ProcessList && 
+           DEBUG_ProcessList &&
            WaitForDebugEvent(&de, INFINITE))
     {
         DEBUG_HandleDebugEvent(&de);
-        ContinueDebugEvent(de.dwProcessId, de.dwThreadId, 
+        ContinueDebugEvent(de.dwProcessId, de.dwThreadId,
                            (DEBUG_ExitMode == EXIT_PASS) ? DBG_EXCEPTION_NOT_HANDLED : DBG_CONTINUE);
     }
     /* print some extra information */
@@ -904,8 +904,8 @@
     startup.cb = sizeof(startup);
     startup.dwFlags = STARTF_USESHOWWINDOW;
     startup.wShowWindow = SW_SHOWNORMAL;
-    
-    if (!CreateProcess(NULL, cmdLine, NULL, NULL, 
+
+    if (!CreateProcess(NULL, cmdLine, NULL, NULL,
 		       FALSE, DEBUG_PROCESS|DETACHED_PROCESS, NULL, NULL, &startup, &info)) {
 	DEBUG_Printf(DBG_CHN_MESG, "Couldn't start process '%s'\n", cmdLine);
 	return FALSE;
@@ -938,10 +938,10 @@
     SMALL_RECT	sr;
     DWORD	mode;
 
-    /* keep it as a cuiexe for now, so that Wine won't touch the Unix stdin, 
+    /* keep it as a cuiexe for now, so that Wine won't touch the Unix stdin,
      * stdout and stderr streams
      */
-    if (DBG_IVAR(UseXTerm)) 
+    if (DBG_IVAR(UseXTerm))
     {
 	FreeConsole();
 	AllocConsole();
@@ -970,7 +970,7 @@
 
     /* Initialize the type handling stuff. */
     DEBUG_InitTypes();
-    DEBUG_InitCVDataTypes();    
+    DEBUG_InitCVDataTypes();
 
     /* Initialize internal vars (types must have been initialized before) */
     if (!DEBUG_IntVarsRW(TRUE)) return -1;
@@ -988,9 +988,9 @@
     }
 
     DEBUG_InitConsole();
-    
+
     DEBUG_Printf(DBG_CHN_MESG, "WineDbg starting... ");
-	
+
     if (argc == 3) {
 	HANDLE	hEvent;
 	DWORD	pid;
@@ -1009,11 +1009,11 @@
 	    DEBUG_CurrPid = pid;
 	}
     }
-	
+
     if (DEBUG_CurrPid == 0 && argc > 1) {
 	int	i, len;
 	LPSTR	cmdLine;
-		
+
 	if (!(cmdLine = DBG_alloc(len = 1))) goto oom_leave;
 	cmdLine[0] = '\0';
 
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"
diff --git a/files/change.c b/files/change.c
index 32370c0..55477cd 100644
--- a/files/change.c
+++ b/files/change.c
@@ -39,7 +39,7 @@
  *		FindFirstChangeNotificationA (KERNEL32.@)
  */
 HANDLE WINAPI FindFirstChangeNotificationA( LPCSTR lpPathName, BOOL bWatchSubtree,
-                                            DWORD dwNotifyFilter ) 
+                                            DWORD dwNotifyFilter )
 {
     HANDLE ret = INVALID_HANDLE_VALUE;
 
@@ -60,7 +60,7 @@
  */
 HANDLE WINAPI FindFirstChangeNotificationW( LPCWSTR lpPathName,
                                                 BOOL bWatchSubtree,
-                                                DWORD dwNotifyFilter) 
+                                                DWORD dwNotifyFilter)
 {
     HANDLE ret = INVALID_HANDLE_VALUE;
 
@@ -79,7 +79,7 @@
 /****************************************************************************
  *		FindNextChangeNotification (KERNEL32.@)
  */
-BOOL WINAPI FindNextChangeNotification( HANDLE handle ) 
+BOOL WINAPI FindNextChangeNotification( HANDLE handle )
 {
     /* FIXME: do something */
     return TRUE;
@@ -88,7 +88,7 @@
 /****************************************************************************
  *		FindCloseChangeNotification (KERNEL32.@)
  */
-BOOL WINAPI FindCloseChangeNotification( HANDLE handle) 
+BOOL WINAPI FindCloseChangeNotification( HANDLE handle)
 {
     return CloseHandle( handle );
 }
diff --git a/files/directory.c b/files/directory.c
index 37acb3e..9d5cae6 100644
--- a/files/directory.c
+++ b/files/directory.c
@@ -67,7 +67,7 @@
     PROFILE_GetWineIniString( "wine", keyname, defval, path, sizeof(path) );
     if (!DOSFS_GetFullName( path, TRUE, full_name ) ||
         (!FILE_Stat( full_name->long_name, &info ) && (mess=strerror(errno)))||
-        (!(info.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) && (mess="not a directory")) || 
+        (!(info.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) && (mess="not a directory")) ||
         (!(GetLongPathNameA(full_name->short_name, longname, MAX_PATHNAME_LEN))) )
     {
         if (warn)
@@ -168,7 +168,7 @@
     {
         TRACE("USERPROFILE= %s\n", longpath );
         SetEnvironmentVariableA( "USERPROFILE", longpath );
-    }	
+    }
 
     TRACE("SYSTEMROOT = %s\n", DIR_Windows.short_name );
     SetEnvironmentVariableA( "SYSTEMROOT", DIR_Windows.short_name );
@@ -409,7 +409,7 @@
     if (!DOSFS_GetFullName( path, FALSE, &full_name )) return 0;
     if (mkdir( full_name.long_name, 0777 ) == -1) {
         WARN_(file)("Error '%s' trying to create directory '%s'\n", strerror(errno), full_name.long_name);
-	/* the FILE_SetDosError() generated error codes don't match the 
+	/* the FILE_SetDosError() generated error codes don't match the
 	 * CreateDirectory ones for some errnos */
 	switch (errno) {
 	case EEXIST: SetLastError(ERROR_ALREADY_EXISTS); break;
@@ -534,7 +534,7 @@
     LPSTR next, buffer = NULL;
     INT len = strlen(name), newlen, currlen = 0;
     BOOL ret = FALSE;
-   
+
     next = pathlist;
     while (!ret && next)
     {
@@ -737,7 +737,7 @@
     /* Try the "App Paths" entry if existing (undocumented ??) */
     if (DIR_TryAppPath(name, full_name))
 	goto done;
-    
+
     /* Try all directories in path */
 
     ret = DIR_TryEnvironmentPath( name, full_name, NULL );
@@ -771,7 +771,7 @@
  *             longer than the length of the buffer, the length of the
  *             filename is returned.
  *    Failure: Zero
- * 
+ *
  * NOTES
  *    If the file is not found, calls SetLastError(ERROR_FILE_NOT_FOUND)
  *    (tested on NT 4.0)
@@ -917,7 +917,7 @@
  *             longer than the length of the buffer, the length of the
  *             filename is returned.
  *    Failure: Zero
- * 
+ *
  * NOTES
  *    If the file is not found, calls SetLastError(ERROR_FILE_NOT_FOUND)
  */
diff --git a/files/dos_fs.c b/files/dos_fs.c
index 7947b35..c045a98 100644
--- a/files/dos_fs.c
+++ b/files/dos_fs.c
@@ -32,7 +32,7 @@
 #include <string.h>
 #include <stdlib.h>
 #include <sys/stat.h>
-#ifdef HAVE_SYS_IOCTL_H 
+#ifdef HAVE_SYS_IOCTL_H
 #include <sys/ioctl.h>
 #endif
 #include <time.h>
@@ -268,7 +268,7 @@
     buffer[11] = '\0';
 
     /* at most 3 character of the extension are processed
-     * is something behind this ? 
+     * is something behind this ?
      */
     while (*p == '*' || *p == ' ') p++; /* skip wildcards and spaces */
     return IS_END_OF_NAME(*p);
@@ -326,7 +326,7 @@
  * t*t				test1.ta.tornado.txt			*
  * ?est*			test1.txt				*
  * ?est???			test1.txt				-
- * *test1.txt*			test1.txt				* 
+ * *test1.txt*			test1.txt				*
  * h?l?o*t.dat			hellothisisatest.dat			*
  */
 static int DOSFS_MatchLong( const char *mask, const char *name,
@@ -796,8 +796,8 @@
 				return 0;
 			}
 			if (!DuplicateHandle( GetCurrentProcess(), to_dup, GetCurrentProcess(),
-					      &handle, 0, 
-					      sa && (sa->nLength>=sizeof(*sa)) && sa->bInheritHandle, 
+					      &handle, 0,
+					      sa && (sa->nLength>=sizeof(*sa)) && sa->bInheritHandle,
 					      DUPLICATE_SAME_ACCESS ))
 			    handle = 0;
 			return handle;
@@ -841,7 +841,7 @@
         {
             MESSAGE("Warning: %s not accessible from a configured DOS drive\n", *name );
             /* Assume it really was a DOS name */
-            drive = DRIVE_GetCurrentDrive();            
+            drive = DRIVE_GetCurrentDrive();
         }
     }
     else drive = DRIVE_GetCurrentDrive();
@@ -1007,10 +1007,10 @@
  *  observed:
  *  longpath=NULL: LastError=ERROR_INVALID_PARAMETER, ret=0
  *  longpath="" or invalid: LastError=ERROR_BAD_PATHNAME, ret=0
- * 
+ *
  * more observations ( with NT 3.51 (WinDD) ):
  * longpath <= 8.3 -> just copy longpath to shortpath
- * longpath > 8.3  -> 
+ * longpath > 8.3  ->
  *             a) file does not exist -> return 0, LastError = ERROR_FILE_NOT_FOUND
  *             b) file does exist     -> set the short filename.
  * - trailing slashes are reproduced in the short name, even if the
@@ -1067,7 +1067,7 @@
 
       /* check for path delimiters and reproduce them */
       if ( longpath[lp] == '\\' || longpath[lp] == '/' ) {
-	if (!sp || tmpshortpath[sp-1]!= '\\') 
+	if (!sp || tmpshortpath[sp-1]!= '\\')
         {
 	    /* strip double "\\" */
 	    tmpshortpath[sp] = '\\';
@@ -1078,9 +1078,9 @@
 	continue;
       }
 
-      tmplen = strcspn ( longpath + lp, "\\/" ); 
+      tmplen = strcspn ( longpath + lp, "\\/" );
       lstrcpynA ( tmpshortpath+sp, longpath + lp, tmplen+1 );
-      
+
       /* Check, if the current element is a valid dos name */
       if ( DOSFS_ValidDOSName ( longpath + lp, !(flags & DRIVE_CASE_SENSITIVE) ) ) {
 	sp += tmplen;
@@ -1106,7 +1106,7 @@
     TRACE("returning %s\n", debugstr_a(shortpath) );
     tmplen = strlen ( tmpshortpath );
     HeapFree ( GetProcessHeap(), 0, tmpshortpath );
-    
+
     return tmplen;
 }
 
@@ -1171,29 +1171,29 @@
        while ((ss[0]=='\\') && (ss>=longpath)) ss--;
        p=ss;
        while ((ss[0]!='\\') && (ss>=longpath)) ss--;
-       if (ss>=longpath) 
+       if (ss>=longpath)
          {
          /* FIXME: aren't we more paranoid, than needed? */
          while ((ll[0]=='/') && (ll>=full_name.long_name)) ll--;
          while ((ll[0]!='/') && (ll>=full_name.long_name)) ll--;
-         if (ll<full_name.long_name) 
-              { 
+         if (ll<full_name.long_name)
+              {
               ERR("Bad longname! (ss=%s ll=%s)\n This should never happen !\n"
-		  ,ss ,ll ); 
+		  ,ss ,ll );
               return 0;
               }
          }
      }
 
    /* FIXME: fix for names like "C:\\" (ie. with more '\'s) */
-      if (p && p[2]) 
+      if (p && p[2])
         {
 	p+=1;
 	if ((p-longpath)>0) longlen -= (p-longpath);
 	lstrcpynA( p, ll , longlen);
 
         /* Now, change all '/' to '\' */
-        for (r=p; r<(p+longlen); r++ ) 
+        for (r=p; r<(p+longlen); r++ )
           if (r[0]=='/') r[0]='\\';
         return strlen(longpath) - strlen(p) + longlen;
         }
@@ -1232,7 +1232,7 @@
  * Implementation of GetFullPathNameA/W.
  *
  * bon@elektron 000331:
- * A test for GetFullPathName with many pathological cases 
+ * A test for GetFullPathName with many pathological cases
  * now gives identical output for Wine and OSR2
  */
 static DWORD DOSFS_DoGetFullPathName( LPCSTR name, DWORD len, LPSTR result,
@@ -1348,7 +1348,7 @@
     namelen=strlen(full_name.short_name);
     if (!strcmp(full_name.short_name+namelen-3,"\\.."))
 	{
-	  /* one more strange case: "c:\test\test1\.." 
+	  /* one more strange case: "c:\test\test1\.."
 	   return "c:\test" */
 	  *(full_name.short_name+namelen-3)=0;
 	  q = strrchr(full_name.short_name,'\\');
@@ -1361,8 +1361,8 @@
 	full_name.short_name[(namelen--)-1] =0;
     TRACE("got %s\n",full_name.short_name);
 
-    /* If the lpBuffer buffer is too small, the return value is the 
-    size of the buffer, in characters, required to hold the path 
+    /* If the lpBuffer buffer is too small, the return value is the
+    size of the buffer, in characters, required to hold the path
     plus the terminating \0 (tested against win95osr2, bon 001118)
     . */
     ret = strlen(full_name.short_name);
@@ -1388,7 +1388,7 @@
 /***********************************************************************
  *           GetFullPathNameA   (KERNEL32.@)
  * NOTES
- *   if the path closed with '\', *lastpart is 0 
+ *   if the path closed with '\', *lastpart is 0
  */
 DWORD WINAPI GetFullPathNameA( LPCSTR name, DWORD len, LPSTR buffer,
                                  LPSTR *lastpart )
@@ -1426,7 +1426,7 @@
             while ((p > buffer + 2) && (*p != (WCHAR)'\\')) p--;
             *lastpart = p + 1;
         }
-        else *lastpart = NULL;  
+        else *lastpart = NULL;
     }
     return ret;
 }
@@ -1472,7 +1472,7 @@
         entry->dwReserved0       = 0;
         entry->dwReserved1       = 0;
         DOSFS_ToDosDTAFormat( DRIVE_GetLabel( info->drive ), entry->cFileName );
-        strcpy( entry->cAlternateFileName, entry->cFileName ); 
+        strcpy( entry->cAlternateFileName, entry->cFileName );
         info->cur_pos++;
         TRACE("returning %s (%s) as label\n",
                entry->cFileName, entry->cAlternateFileName);
@@ -1588,7 +1588,7 @@
     if (!(info.dir && info.path == path && info.short_mask == short_mask
                    && info.long_mask == long_mask && info.drive == drive
                    && info.attr == attr && info.cur_pos <= skip))
-    {  
+    {
         /* Not in the cache, open it anew */
         if (info.dir) DOSFS_CloseDir( info.dir );
 
@@ -1638,7 +1638,7 @@
     DOS_FULL_NAME full_name;
     HGLOBAL handle;
     FIND_FIRST_INFO *info;
-    
+
     if ((fSearchOp != FindExSearchNameMatch) || (dwAdditionalFlags != 0))
     {
         FIXME("options not implemented 0x%08x 0x%08lx\n", fSearchOp, dwAdditionalFlags );
@@ -1727,7 +1727,7 @@
     handle = FindFirstFileExA(pathA, fInfoLevelId, _lpFindFileData, fSearchOp, lpSearchFilter, dwAdditionalFlags);
     HeapFree( GetProcessHeap(), 0, pathA );
     if (handle == INVALID_HANDLE_VALUE) return handle;
-    
+
     switch(fInfoLevelId)
     {
       case FindExInfoStandard:
@@ -1769,7 +1769,7 @@
 {
     FIND_FIRST_INFO *info;
 
-    if ((handle == INVALID_HANDLE_VALUE) || 
+    if ((handle == INVALID_HANDLE_VALUE) ||
        !(info = (FIND_FIRST_INFO *)GlobalLock( handle )))
     {
         SetLastError( ERROR_INVALID_HANDLE );
@@ -1863,7 +1863,7 @@
 {
     /* NOTES:
 
-       CONSTANTS: 
+       CONSTANTS:
        The time difference between 1 January 1601, 00:00:00 and
        1 January 1970, 00:00:00 is 369 years, plus the leap years
        from 1604 to 1968, excluding 1700, 1800, 1900.
@@ -1890,7 +1890,7 @@
        will run.
 
        DETAILS:
-       
+
        Take care not to remove the casts. I have tested these functions
        (in both versions) for a lot of numbers. I would be interested in
        results on other compilers than GCC.
@@ -2020,7 +2020,7 @@
     else                        a1 += (1 << 16) - 54590 - carry, carry = 1;
 
     a2 -= 27111902 + carry;
-    
+
     /* If a is negative, replace a by (-1-a) */
     negative = (a2 >= ((UINT)1) << 31);
     if (negative)
@@ -2074,7 +2074,7 @@
  *	-1: Overflow occurred or Divisor was 0
  */
 INT WINAPI MulDiv(
-	     INT nMultiplicand, 
+	     INT nMultiplicand,
 	     INT nMultiplier,
 	     INT nDivisor)
 {
@@ -2113,9 +2113,9 @@
     if ( ( (nMultiplicand <  0) && (nMultiplier <  0) ) ||
 	 ( (nMultiplicand >= 0) && (nMultiplier >= 0) ) )
       return ((nMultiplicand * nMultiplier) + (nDivisor/2)) / nDivisor;
- 
+
     return ((nMultiplicand * nMultiplier) - (nDivisor/2)) / nDivisor;
-    
+
 #endif
 }
 
@@ -2182,7 +2182,7 @@
     utctime = mktime(xtm);
     if(xtm->tm_isdst > 0) utctime-=3600;
     DOSFS_UnixTimeToFileTime( utctime, utcft, remainder );
-    return TRUE; 
+    return TRUE;
 }
 
 
@@ -2211,7 +2211,7 @@
     if(xtm->tm_isdst > 0) time-=3600;
     DOSFS_UnixTimeToFileTime( 2*unixtime-time, localft, remainder );
 #endif
-    return TRUE; 
+    return TRUE;
 }
 
 
@@ -2232,7 +2232,7 @@
     syst->wMinute       = xtm->tm_min;
     syst->wSecond       = xtm->tm_sec;
     syst->wMilliseconds	= remainder / 10000;
-    return TRUE; 
+    return TRUE;
 }
 
 /***********************************************************************
@@ -2255,7 +2255,7 @@
     /* In theory all that are possible and have been defined.
      * Now just those below, since mirc uses it to check for special files.
      *
-     * (It is more complex, and supports netmounted stuff, and \\.\ stuff, 
+     * (It is more complex, and supports netmounted stuff, and \\.\ stuff,
      *  but currently we just ignore that.)
      */
 #define CHECK(x) (strstr(devname,#x)==devname)
@@ -2318,16 +2318,16 @@
     xtm.tm_isdst = -1;
 #ifdef HAVE_TIMEGM
     utctime = timegm(&xtm);
-    DOSFS_UnixTimeToFileTime( utctime, ft, 
+    DOSFS_UnixTimeToFileTime( utctime, ft,
 			      syst->wMilliseconds * 10000 );
 #else
     localtim = mktime(&xtm);    /* now we've got local time */
     utc_tm = gmtime(&localtim);
     utctime = mktime(utc_tm);
-    DOSFS_UnixTimeToFileTime( 2*localtim -utctime, ft, 
+    DOSFS_UnixTimeToFileTime( 2*localtim -utctime, ft,
 			      syst->wMilliseconds * 10000 );
 #endif
-    return TRUE; 
+    return TRUE;
 }
 
 /***********************************************************************
diff --git a/files/drive.c b/files/drive.c
index d4736b4..9e5b453 100644
--- a/files/drive.c
+++ b/files/drive.c
@@ -282,7 +282,7 @@
         else WARN("%s: not defined\n", name );
     }
 
-    if (!count) 
+    if (!count)
     {
         MESSAGE("Warning: no valid DOS drive found, check your configuration file.\n" );
         /* Create a C drive pointing to Unix root dir */
@@ -528,7 +528,7 @@
 /***********************************************************************
  *           DRIVE_ReadSuperblock
  *
- * NOTE 
+ * NOTE
  *      DRIVE_SetLabel and DRIVE_SetSerialNumber use this in order
  * to check, that they are writing on a FAT filesystem !
  */
@@ -568,12 +568,12 @@
             break;
     }
 
-    if ((offs) && (lseek(fd,offs,SEEK_SET)!=offs)) 
+    if ((offs) && (lseek(fd,offs,SEEK_SET)!=offs))
     {
         ret = -4;
         goto the_end;
     }
-    if (read(fd,buff,DRIVE_SUPER)!=DRIVE_SUPER) 
+    if (read(fd,buff,DRIVE_SUPER)!=DRIVE_SUPER)
     {
         ret = -2;
         goto the_end;
@@ -625,24 +625,24 @@
 {
     int fd;
 
-    if ((fd=open(DOSDrives[drive].device,O_WRONLY))==-1) 
+    if ((fd=open(DOSDrives[drive].device,O_WRONLY))==-1)
     {
         ERR("Cannot open the device %s (for writing)\n",
-            DOSDrives[drive].device); 
+            DOSDrives[drive].device);
         return -1;
     }
     if (lseek(fd,ofs,SEEK_SET)!=ofs)
     {
         ERR("lseek failed on device %s !\n",
-            DOSDrives[drive].device); 
+            DOSDrives[drive].device);
         close(fd);
         return -2;
     }
-    if (write(fd,buff,len)!=len) 
+    if (write(fd,buff,len)!=len)
     {
         close(fd);
         ERR("Cannot write on %s !\n",
-            DOSDrives[drive].device); 
+            DOSDrives[drive].device);
         return -3;
     }
     return close (fd);
@@ -673,18 +673,18 @@
     WORD offs = CDROM_Data_FindBestVoldesc(dev);
     WCHAR label_read[LABEL_LEN]; /* Unicode possible, too */
     DWORD unicode_id = 0;
- 
+
     if (offs)
     {
         if ((lseek(dev, offs+0x58, SEEK_SET) == offs+0x58)
         &&  (read(dev, &unicode_id, 3) == 3))
         {
             int ver = (unicode_id & 0xff0000) >> 16;
- 
+
             if ((lseek(dev, offs+0x28, SEEK_SET) != offs+0x28)
             ||  (read(dev, &label_read, LABEL_LEN) != LABEL_LEN))
                 goto failure;
- 
+
             close(dev);
             if ((LOWORD(unicode_id) == 0x2f25) /* Unicode ID */
             &&  ((ver == 0x40) || (ver == 0x43) || (ver == 0x45)))
@@ -758,7 +758,7 @@
     if (!DRIVE_IsValid( drive )) return NULL;
     if (DOSDrives[drive].type == DRIVE_CDROM)
     {
-	read = CDROM_GetLabel(drive, DOSDrives[drive].label_read); 
+	read = CDROM_GetLabel(drive, DOSDrives[drive].label_read);
     }
     else
     if (DOSDrives[drive].flags & DRIVE_READ_VOL_INFO)
@@ -812,11 +812,11 @@
     dwStart = FRAME_OF_TOC(toc, toc.FirstTrack);
 
     for (i = 0; i <= toc.LastTrack - toc.FirstTrack; i++) {
-        serial += (toc.TrackData[i].Address[0] << 16) | 
+        serial += (toc.TrackData[i].Address[0] << 16) |
             (toc.TrackData[i].Address[1] << 8) | toc.TrackData[i].Address[2];
     }
     dwEnd = FRAME_OF_TOC(toc, toc.LastTrack + 1);
- 
+
     if (toc.LastTrack - toc.FirstTrack + 1 < 3)
         serial += wMagic + (dwEnd - dwStart);
 
@@ -835,7 +835,7 @@
         unsigned char p[4];
     } serial;
     BYTE b0 = 0, b1 = 1, b2 = 2, b3 = 3;
- 
+
 
     if (dev == -1) return 0;
     offs = CDROM_Data_FindBestVoldesc(dev);
@@ -846,7 +846,7 @@
         BYTE buf[2048];
         OSVERSIONINFOA ovi;
         int i;
- 
+
         lseek(dev, offs, SEEK_SET);
         read(dev, buf, 2048);
         /*
@@ -872,7 +872,7 @@
     close(dev);
     return serial.val;
 }
-        
+
 /**************************************************************************
  *				CDROM_GetSerial			[internal]
  */
@@ -900,7 +900,7 @@
     case 0:
         break;
     }
-    
+
     if (serial)
         TRACE("CD serial number is %04x-%04x.\n", HIWORD(serial), LOWORD(serial));
 
@@ -918,7 +918,7 @@
     char buff[DRIVE_SUPER];
 
     if (!DRIVE_IsValid( drive )) return 0;
-    
+
     if (DOSDrives[drive].flags & DRIVE_READ_VOL_INFO)
     {
 	switch(DOSDrives[drive].type)
@@ -939,7 +939,7 @@
             FIXME("Serial number reading from file system on drive %c: not supported yet.\n", drive+'A');
 	}
     }
-		
+
     return (serial) ? serial : DOSDrives[drive].serial_conf;
 }
 
@@ -957,7 +957,7 @@
     {
         if ((DOSDrives[drive].type != DRIVE_REMOVABLE) &&
             (DOSDrives[drive].type != DRIVE_FIXED)) return 0;
-        /* check, if the drive has a FAT filesystem */ 
+        /* check, if the drive has a FAT filesystem */
         if (DRIVE_ReadSuperblock(drive, buff)) return 0;
         if (DRIVE_WriteSuperblockEntry(drive, 0x27, 4, (char *) &serial)) return 0;
         return 1;
@@ -1023,7 +1023,7 @@
     DOSDrives[drive].dos_cwd  = heap_strdup( full_name.short_name + 3 );
     DOSDrives[drive].unix_cwd = heap_strdup( unix_cwd );
 
-    if (pTask && (pTask->curdrive & 0x80) && 
+    if (pTask && (pTask->curdrive & 0x80) &&
         ((pTask->curdrive & ~0x80) == drive))
     {
         lstrcpynA( pTask->curdir, full_name.short_name + 2,
@@ -1072,9 +1072,9 @@
 {
  /* If new_drive is already valid, do nothing and return 0
     otherwise, copy DOSDrives[existing_drive] to DOSDrives[new_drive] */
-  
+
     DOSDRIVE *old, *new;
-    
+
     old = DOSDrives + existing_drive;
     new = DOSDrives + new_drive;
 
@@ -1185,7 +1185,7 @@
 /***********************************************************************
  *           DRIVE_GetFreeSpace
  */
-static int DRIVE_GetFreeSpace( int drive, PULARGE_INTEGER size, 
+static int DRIVE_GetFreeSpace( int drive, PULARGE_INTEGER size,
 			       PULARGE_INTEGER available )
 {
     struct statfs info;
@@ -1229,7 +1229,7 @@
  *       DRIVE_GetCurrentDirectory
  * Returns "X:\\path\\etc\\".
  *
- * Despite the API description, return required length including the 
+ * Despite the API description, return required length including the
  * terminating null when buffer too small. This is the real behaviour.
 */
 
@@ -1293,7 +1293,7 @@
  * Fails if expression resulting from current drive's dir and "root"
  * is not a root dir of the target drive.
  *
- * UNDOC: setting some LPDWORDs to NULL is perfectly possible 
+ * UNDOC: setting some LPDWORDs to NULL is perfectly possible
  * if the corresponding info is unneeded.
  *
  * FIXME: needs to support UNC names from Win95 OSR2 on.
@@ -1491,7 +1491,7 @@
 
 /***********************************************************************
  *           GetDriveType   (KERNEL.136)
- * This function returns the type of a drive in Win16. 
+ * This function returns the type of a drive in Win16.
  * Note that it returns DRIVE_REMOTE for CD-ROMs, since MSCDEX uses the
  * remote drive API. The return value DRIVE_REMOTE for CD-ROMs has been
  * verified on Win 3.11 and Windows 95. Some programs rely on it, so don't
@@ -1818,7 +1818,7 @@
 BOOL WINAPI SetVolumeLabelA( LPCSTR root, LPCSTR volname )
 {
     int drive;
-    
+
     /* FIXME, SetLastErrors missing */
 
     if (!root) drive = DRIVE_GetCurrentDrive();
diff --git a/files/file.c b/files/file.c
index 06bdf0f..214fcea 100644
--- a/files/file.c
+++ b/files/file.c
@@ -829,7 +829,7 @@
         *        Linux and Windows privileges. Under Linux only the owner of
         *        the file is allowed to change file attributes. Under Windows,
         *        applications expect that if you can write to a file, you can also
-        *        change its attributes (see GENERIC_WRITE). We could try to be 
+        *        change its attributes (see GENERIC_WRITE). We could try to be
         *        clever here but that would break multi-user installations where
         *        users share read-only DLLs. This is because some installers like
         *        to change attributes of already installed DLLs.
@@ -923,7 +923,7 @@
     p = buffer + strlen(buffer);
 
     /* add a \, if there isn't one and path is more than just the drive letter ... */
-    if ( !((strlen(buffer) == 2) && (buffer[1] == ':')) 
+    if ( !((strlen(buffer) == 2) && (buffer[1] == ':'))
 	&& ((p == buffer) || (p[-1] != '\\'))) *p++ = '\\';
 
     if (isWin16) *p++ = '~';
@@ -1038,7 +1038,7 @@
     char *p;
 
     if (!ofs) return HFILE_ERROR;
-    
+
     TRACE("%s %s %s %s%s%s%s%s%s%s%s%s\n",name,
 	  ((mode & 0x3 )==OF_READ)?"OF_READ":
 	  ((mode & 0x3 )==OF_WRITE)?"OF_WRITE":
@@ -1058,7 +1058,7 @@
 	  ((mode & OF_EXIST )==OF_EXIST)?"OF_EXIST ":"",
 	  ((mode & OF_REOPEN )==OF_REOPEN)?"OF_REOPEN ":""
 	  );
-      
+
 
     ofs->cBytes = sizeof(OFSTRUCT);
     ofs->nErrCode = 0;
@@ -1072,7 +1072,7 @@
     TRACE("%s %04x\n", name, mode );
 
     /* the watcom 10.6 IDE relies on a valid path returned in ofs->szPathName
-       Are there any cases where getting the path here is wrong? 
+       Are there any cases where getting the path here is wrong?
        Uwe Bonnes 1997 Apr 2 */
     if (!GetFullPathNameA( name, sizeof(ofs->szPathName),
 			     ofs->szPathName, NULL )) goto error;
@@ -1125,7 +1125,7 @@
                  sizeof(ofs->szPathName) );
 
     if (mode & OF_SHARE_EXCLUSIVE)
-      /* Some InstallShield version uses OF_SHARE_EXCLUSIVE 
+      /* Some InstallShield version uses OF_SHARE_EXCLUSIVE
 	 on the file <tempdir>/_ins0432._mp to determine how
 	 far installation has proceeded.
 	 _ins0432._mp is an executable and while running the
@@ -1197,7 +1197,7 @@
 
 error:  /* We get here if there was an error opening the file */
     ofs->nErrCode = GetLastError();
-    WARN("(%s): return = HFILE_ERROR error= %d\n", 
+    WARN("(%s): return = HFILE_ERROR error= %d\n",
 		  name,ofs->nErrCode );
     return HFILE_ERROR;
 }
@@ -1391,7 +1391,7 @@
  *
  * BUGS
  *
- * Currently only works for WaitCommEvent, ReadFile, WriteFile 
+ * Currently only works for WaitCommEvent, ReadFile, WriteFile
  *   with communications ports.
  *
  */
@@ -1507,7 +1507,7 @@
  *              FILE_ReadFileEx                (INTERNAL)
  */
 static BOOL FILE_ReadFileEx(HANDLE hFile, LPVOID buffer, DWORD bytesToRead,
-			 LPOVERLAPPED overlapped, 
+			 LPOVERLAPPED overlapped,
 			 LPOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine,
                          HANDLE hEvent)
 {
@@ -1565,7 +1565,7 @@
  *              ReadFileEx                (KERNEL32.@)
  */
 BOOL WINAPI ReadFileEx(HANDLE hFile, LPVOID buffer, DWORD bytesToRead,
-			 LPOVERLAPPED overlapped, 
+			 LPOVERLAPPED overlapped,
 			 LPOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine)
 {
     overlapped->InternalHigh = 0;
@@ -1600,7 +1600,7 @@
     int unix_handle, result, flags;
     enum fd_type type;
 
-    TRACE("%d %p %ld %p %p\n", hFile, buffer, bytesToRead, 
+    TRACE("%d %p %ld %p %p\n", hFile, buffer, bytesToRead,
           bytesRead, overlapped );
 
     if (bytesRead) *bytesRead = 0;  /* Do this before anything else */
@@ -1618,10 +1618,10 @@
             SetLastError(ERROR_INVALID_PARAMETER);
             return FALSE;
         }
-        
+
         close(unix_handle);
         overlapped->InternalHigh = 0;
-        
+
         if(!FILE_ReadFileEx(hFile, buffer, bytesToRead, overlapped, NULL, overlapped->hEvent))
             return FALSE;
 
@@ -1649,7 +1649,7 @@
     default:
 	/* normal unix files */
 	if (unix_handle == -1)
-	    return FALSE;    
+	    return FALSE;
 	if (overlapped)
 	{
 	    close(unix_handle);
@@ -1787,11 +1787,11 @@
  *              WriteFileEx                (KERNEL32.@)
  */
 BOOL WINAPI WriteFileEx(HANDLE hFile, LPCVOID buffer, DWORD bytesToWrite,
-			 LPOVERLAPPED overlapped, 
+			 LPOVERLAPPED overlapped,
 			 LPOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine)
 {
     overlapped->InternalHigh = 0;
- 
+
     return FILE_WriteFileEx(hFile, buffer, bytesToWrite, overlapped, lpCompletionRoutine, INVALID_HANDLE_VALUE);
 }
 
@@ -1804,7 +1804,7 @@
     int unix_handle, result, flags;
     enum fd_type type;
 
-    TRACE("%d %p %ld %p %p\n", hFile, buffer, bytesToWrite, 
+    TRACE("%d %p %ld %p %p\n", hFile, buffer, bytesToWrite,
           bytesWritten, overlapped );
 
     if (bytesWritten) *bytesWritten = 0;  /* Do this before anything else */
@@ -1842,7 +1842,7 @@
     switch(type)
     {
     case FD_TYPE_CONSOLE:
-	TRACE("%d %s %ld %p %p\n", hFile, debugstr_an(buffer, bytesToWrite), bytesToWrite, 
+	TRACE("%d %s %ld %p %p\n", hFile, debugstr_an(buffer, bytesToWrite), bytesToWrite,
 	      bytesWritten, overlapped );
 	return WriteConsoleA(hFile, buffer, bytesToWrite, bytesWritten, NULL);
     default:
@@ -1867,7 +1867,7 @@
     return TRUE;
 }
 
-  
+
 /***********************************************************************
  *           _hread (KERNEL.349)
  */
@@ -2060,11 +2060,11 @@
  *           _hwrite   (KERNEL32.@)
  *
  *	experimentation yields that _lwrite:
- *		o truncates the file at the current position with 
+ *		o truncates the file at the current position with
  *		  a 0 len write
  *		o returns 0 on a 0 length write
  *		o works with console handles
- *		
+ *
  */
 LONG WINAPI _hwrite( HFILE handle, LPCSTR buffer, LONG count )
 {
@@ -2323,7 +2323,7 @@
     /* FIXME: <Gerhard W. Gruber>sparhawk@gmx.at
        In case of W9x and lesser this function should return 120 (ERROR_CALL_NOT_IMPLEMENTED)
        to be really compatible. Most programs wont have any problems though. In case
-       you encounter one, this is what you should return here. I don't know what's up 
+       you encounter one, this is what you should return here. I don't know what's up
        with NT 3.5. Is this function available there or not?
        Does anybody really care about 3.5? :)
     */
@@ -2377,7 +2377,7 @@
         if (flag & MOVEFILE_DELAY_UNTIL_REBOOT)
         {
             /* FIXME: (bon@elektron.ikp.physik.th-darmstadt.de 970706)
-               Perhaps we should queue these command and execute it 
+               Perhaps we should queue these command and execute it
                when exiting... What about using on_exit(2)
             */
             FIXME("Please move existing file '%s' to file '%s' when Wine has finished\n",
@@ -2420,13 +2420,13 @@
     {
         if (flag & MOVEFILE_DELAY_UNTIL_REBOOT)
         {
-            if (flag & MOVEFILE_COPY_ALLOWED) {  
+            if (flag & MOVEFILE_COPY_ALLOWED) {
                 WARN("Illegal flag\n");
                 SetLastError( ERROR_GEN_FAILURE );
                 return FALSE;
             }
             /* FIXME: (bon@elektron.ikp.physik.th-darmstadt.de 970706)
-               Perhaps we should queue these command and execute it 
+               Perhaps we should queue these command and execute it
                when exiting... What about using on_exit(2)
             */
             FIXME("Please delete file '%s' when Wine has finished\n", fn1);
@@ -2951,12 +2951,12 @@
 {
     DOS_FULL_NAME full_name;
     BY_HANDLE_FILE_INFORMATION info;
-    
+
     if (lpFileName == NULL) return FALSE;
     if (lpFileInformation == NULL) return FALSE;
 
     if (fInfoLevelId == GetFileExInfoStandard) {
-	LPWIN32_FILE_ATTRIBUTE_DATA lpFad = 
+	LPWIN32_FILE_ATTRIBUTE_DATA lpFad =
 	    (LPWIN32_FILE_ATTRIBUTE_DATA) lpFileInformation;
 	if (!DOSFS_GetFullName( lpFileName, TRUE, &full_name )) return FALSE;
 	if (!FILE_Stat( full_name.long_name, &info )) return FALSE;
@@ -2985,7 +2985,7 @@
 	LPVOID lpFileInformation)
 {
     LPSTR nameA = HEAP_strdupWtoA( GetProcessHeap(), 0, lpFileName );
-    BOOL res = 
+    BOOL res =
 	GetFileAttributesExA( nameA, fInfoLevelId, lpFileInformation);
     HeapFree( GetProcessHeap(), 0, nameA );
     return res;
diff --git a/files/profile.c b/files/profile.c
index cb68ae7..455e1b0 100644
--- a/files/profile.c
+++ b/files/profile.c
@@ -465,7 +465,7 @@
     p = section_name + strlen(section_name) - 1;
     while ((p > section_name) && PROFILE_isspace(*p)) p--;
     seclen = p - section_name + 1;
-    
+
     while (PROFILE_isspace(*key_name)) key_name++;
     p = key_name + strlen(key_name) - 1;
     while ((p > key_name) && PROFILE_isspace(*p)) p--;
@@ -552,7 +552,7 @@
         file = fopen( buffer, "w" );
         unix_name = buffer;
     }
-    
+
     if (!file)
     {
         WARN("could not save profile file %s\n", CurProfile->dos_name);
@@ -622,7 +622,7 @@
 
     /* Check for a match */
 
-    if (strchr( filename, '/' ) || strchr( filename, '\\' ) || 
+    if (strchr( filename, '/' ) || strchr( filename, '\\' ) ||
         strchr( filename, ':' ))
     {
         if (!DOSFS_GetFullName( filename, FALSE, &full_name )) return FALSE;
@@ -759,7 +759,7 @@
             *buffer = '\0';
             if (len <= 1)
                 /*If either lpszSection or lpszKey is NULL and the supplied
-                  destination buffer is too small to hold all the strings, 
+                  destination buffer is too small to hold all the strings,
                   the last string is truncated and followed by two null characters.
                   In this case, the return value is equal to cchReturnBuffer
                   minus two. */
@@ -834,8 +834,8 @@
  * NULL		"1"		"x"		0	""		(!)
  * ""		"1"		"x"		1	"x"
  * NULL		NULL		""		0	""
- * 
- *	
+ *
+ *
  */
 static INT PROFILE_GetString( LPCSTR section, LPCSTR key_name,
 			      LPCSTR def_val, LPSTR buffer, UINT len )
@@ -904,7 +904,7 @@
         if (!key) return FALSE;
         if (key->value)
         {
-	    /* strip the leading spaces. We can safely strip \n\r and 
+	    /* strip the leading spaces. We can safely strip \n\r and
 	     * friends too, they should not happen here anyway. */
 	    while (PROFILE_isspace(*value)) value++;
 
@@ -1145,7 +1145,7 @@
     int		ret;
     LPSTR	pDefVal = NULL;
 
-    if (!filename) 
+    if (!filename)
 	filename = "win.ini";
 
     /* strip any trailing ' ' of def_val. */
@@ -1187,7 +1187,7 @@
 
     if (pDefVal != def_val) /* allocated */
 	HeapFree(GetProcessHeap(), 0, pDefVal);
-    
+
     return ret;
 }
 
@@ -1327,7 +1327,7 @@
     if (!buffer[0]) return (UINT)def_val;
 
     /* Don't use strtol() here !
-     * (returns LONG_MAX/MIN on overflow instead of "proper" overflow) 
+     * (returns LONG_MAX/MIN on overflow instead of "proper" overflow)
      YES, scan for unsigned format ! (otherwise compatibility error) */
     if (!sscanf(buffer, "%lu", &result)) return 0;
     return (UINT)result;
@@ -1371,7 +1371,7 @@
     if (PROFILE_Open( filename ))
         ret = PROFILE_GetSection(CurProfile->section, section, buffer, len,
 				 FALSE, TRUE);
-    
+
     LeaveCriticalSection( &PROFILE_CritSect );
 
     return ret;
@@ -1388,7 +1388,7 @@
     LPSTR sectionA  = HEAP_strdupWtoA( GetProcessHeap(), 0, section );
     LPSTR filenameA = HEAP_strdupWtoA( GetProcessHeap(), 0, filename );
     LPSTR bufferA   = HeapAlloc( GetProcessHeap(), 0, len );
-    INT ret = GetPrivateProfileSectionA( sectionA, bufferA, len, 
+    INT ret = GetPrivateProfileSectionA( sectionA, bufferA, len,
 						filenameA );
     MultiByteToWideChar(CP_ACP,0,bufferA,ret,buffer,len);
     HeapFree( GetProcessHeap(), 0, sectionA );
@@ -1480,7 +1480,7 @@
 /***********************************************************************
  *           WritePrivateProfileSection   (KERNEL.416)
  */
-BOOL16 WINAPI WritePrivateProfileSection16( LPCSTR section, 
+BOOL16 WINAPI WritePrivateProfileSection16( LPCSTR section,
 				 	    LPCSTR string, LPCSTR filename )
 {
     return WritePrivateProfileSectionA( section, string, filename );
@@ -1489,7 +1489,7 @@
 /***********************************************************************
  *           WritePrivateProfileSectionA   (KERNEL32.@)
  */
-BOOL WINAPI WritePrivateProfileSectionA( LPCSTR section, 
+BOOL WINAPI WritePrivateProfileSectionA( LPCSTR section,
 					 LPCSTR string, LPCSTR filename )
 {
     BOOL ret = FALSE;
@@ -1551,7 +1551,7 @@
  *           WriteProfileSectionA   (KERNEL32.@)
  */
 BOOL WINAPI WriteProfileSectionA( LPCSTR section, LPCSTR keys_n_values)
-                                     
+
 {
     return WritePrivateProfileSectionA( section, keys_n_values, "win.ini");
 }
@@ -1589,36 +1589,36 @@
  *
  * Returns the section names contained in the specified file.
  * FIXME: Where do we find this file when the path is relative?
- * The section names are returned as a list of strings with an extra 
- * '\0' to mark the end of the list. Except for that the behavior 
+ * The section names are returned as a list of strings with an extra
+ * '\0' to mark the end of the list. Except for that the behavior
  * depends on the Windows version.
  *
  * Win95:
- * - if the buffer is 0 or 1 character long then it is as if it was of 
+ * - if the buffer is 0 or 1 character long then it is as if it was of
  *   infinite length.
- * - otherwise, if the buffer is to small only the section names that fit 
+ * - otherwise, if the buffer is to small only the section names that fit
  *   are returned.
- * - note that this means if the buffer was to small to return even just 
+ * - note that this means if the buffer was to small to return even just
  *   the first section name then a single '\0' will be returned.
- * - the return value is the number of characters written in the buffer, 
+ * - the return value is the number of characters written in the buffer,
  *   except if the buffer was too smal in which case len-2 is returned
  *
  * Win2000:
- * - if the buffer is 0, 1 or 2 characters long then it is filled with 
+ * - if the buffer is 0, 1 or 2 characters long then it is filled with
  *   '\0' and the return value is 0
- * - otherwise if the buffer is too small then the first section name that 
- *   does not fit is truncated so that the string list can be terminated 
+ * - otherwise if the buffer is too small then the first section name that
+ *   does not fit is truncated so that the string list can be terminated
  *   correctly (double '\0')
- * - the return value is the number of characters written in the buffer 
- *   except for the trailing '\0'. If the buffer is too small, then the 
+ * - the return value is the number of characters written in the buffer
+ *   except for the trailing '\0'. If the buffer is too small, then the
  *   return value is len-2
- * - Win2000 has a bug that triggers when the section names and the 
- *   trailing '\0' fit exactly in the buffer. In that case the trailing 
+ * - Win2000 has a bug that triggers when the section names and the
+ *   trailing '\0' fit exactly in the buffer. In that case the trailing
  *   '\0' is missing.
  *
  * Wine implements the observed Win2000 behavior (except for the bug).
  *
- * Note that when the buffer is big enough then the return value may be any 
+ * Note that when the buffer is big enough then the return value may be any
  * value between 1 and len-1 (or len in Win95), including len-2.
  */
 DWORD WINAPI GetPrivateProfileSectionNamesA( LPSTR buffer, DWORD size,
@@ -1660,7 +1660,7 @@
 /***********************************************************************
  *           GetPrivateProfileStruct (KERNEL.407)
  */
-BOOL16 WINAPI GetPrivateProfileStruct16(LPCSTR section, LPCSTR key, 
+BOOL16 WINAPI GetPrivateProfileStruct16(LPCSTR section, LPCSTR key,
  				        LPVOID buf, UINT16 len, LPCSTR filename)
 {
     return GetPrivateProfileStructA( section, key, buf, len, filename );
@@ -1671,7 +1671,7 @@
  *
  * Should match Win95's behaviour pretty much
  */
-BOOL WINAPI GetPrivateProfileStructA (LPCSTR section, LPCSTR key, 
+BOOL WINAPI GetPrivateProfileStructA (LPCSTR section, LPCSTR key,
 				      LPVOID buf, UINT len, LPCSTR filename)
 {
     BOOL	ret = FALSE;
@@ -1706,7 +1706,7 @@
 		    BOOL highnibble = TRUE;
 		    BYTE b = 0, val;
 		    LPBYTE binbuf = (LPBYTE)buf;
-		    
+
 	            end -= 2; /* don't include checksum in output data */
 	            /* translate ASCII hex format into binary data */
                     for (p=k->value; p < end; p++)
@@ -1769,7 +1769,7 @@
 /***********************************************************************
  *           WritePrivateProfileStruct (KERNEL.406)
  */
-BOOL16 WINAPI WritePrivateProfileStruct16 (LPCSTR section, LPCSTR key, 
+BOOL16 WINAPI WritePrivateProfileStruct16 (LPCSTR section, LPCSTR key,
 	LPVOID buf, UINT16 bufsize, LPCSTR filename)
 {
     return WritePrivateProfileStructA( section, key, buf, bufsize, filename );
@@ -1778,7 +1778,7 @@
 /***********************************************************************
  *           WritePrivateProfileStructA (KERNEL32.@)
  */
-BOOL WINAPI WritePrivateProfileStructA (LPCSTR section, LPCSTR key, 
+BOOL WINAPI WritePrivateProfileStructA (LPCSTR section, LPCSTR key,
                                         LPVOID buf, UINT bufsize, LPCSTR filename)
 {
     BOOL ret = FALSE;
@@ -1804,7 +1804,7 @@
 
     EnterCriticalSection( &PROFILE_CritSect );
 
-    if (PROFILE_Open( filename )) 
+    if (PROFILE_Open( filename ))
         ret = PROFILE_SetString( section, key, outstring, FALSE);
 
     LeaveCriticalSection( &PROFILE_CritSect );
diff --git a/files/smb.c b/files/smb.c
index 881106e..5e092e7 100644
--- a/files/smb.c
+++ b/files/smb.c
@@ -125,7 +125,7 @@
     NBR_ADDWORD(&buffer[i],0x0000); i+=2;
 
     i += netbios_name(host,&buffer[i]);
-    
+
     NBR_ADDWORD(&buffer[i],0x0020); i+=2;
     NBR_ADDWORD(&buffer[i],0x0001); i+=2;
 
@@ -415,7 +415,7 @@
     DWORD id;
 
     /* 0 */
-    SMB_ADDHEADER(buffer,len);  
+    SMB_ADDHEADER(buffer,len);
 
     /* 4 */
     buffer[len++] = command;
@@ -455,7 +455,7 @@
     memset(buffer,0,sizeof buffer);
 
     len = SMB_Header(buffer, SMB_COM_NEGOTIATE, 0, 0);
- 
+
     /* parameters */
     buffer[len++] = 0; /* no parameters */
 
@@ -574,7 +574,7 @@
     SMB_ADDWORD(&buffer[len],0); len += 2; /* AndXOffset */
     SMB_ADDWORD(&buffer[len],0); len += 2; /* Flags */
     SMB_ADDWORD(&buffer[len],1); len += 2; /* Password length */
-    
+
     /* SMB command buffer */
     SMB_ADDWORD(&buffer[len],3); len += 2; /* command buffer len */
     buffer[len++] = 0; /* null terminated password */
@@ -585,7 +585,7 @@
     else
         return FALSE;
     len += slen+1;
- 
+
     /* name of the service */
     buffer[len++] = 0;
 
@@ -638,21 +638,21 @@
 
     /* 0x1c */
     SMB_ADDDWORD(&buffer[len],0);      len += 4; /* initial allocation */
-    SMB_ADDDWORD(&buffer[len],0);      len += 4; 
- 
+    SMB_ADDDWORD(&buffer[len],0);      len += 4;
+
     /* 0x24 */
     SMB_ADDDWORD(&buffer[len],attributes);      len += 4; /* ExtFileAttributes*/
 
     /* 0x28 */
     SMB_ADDDWORD(&buffer[len],sharing);      len += 4; /* ShareAccess */
-    
+
     /* 0x2c */
     ERR("creation = %08lx\n",creation);
     SMB_ADDDWORD(&buffer[len],creation);      len += 4; /* CreateDisposition */
-    
+
     /* 0x30 */
     SMB_ADDDWORD(&buffer[len],creation);      len += 4; /* CreateOptions */
-    
+
     /* 0x34 */
     SMB_ADDDWORD(&buffer[len],0);      len += 4; /* Impersonation */
 
@@ -667,7 +667,7 @@
     else
         return FALSE;
     len += slen+1;
- 
+
     /* name of the file */
     buffer[len++] = 0;
 
@@ -811,7 +811,7 @@
     unsigned char *buffer;
     int len,buf_size,n,i;
 
-    ERR("user %04x tree %04x file %04x count %04x offset %08lx\n",  
+    ERR("user %04x tree %04x file %04x count %04x offset %08lx\n",
         user_id, tree_id, file_id, count, offset);
 
     buf_size = count+0x100;
@@ -865,7 +865,7 @@
     *read = n;
 
     HeapFree(GetProcessHeap(),0,buffer);
-    
+
     return TRUE;
 }
 
@@ -1001,7 +1001,7 @@
         goto done;
 
 #if 0
-    if(!SMB_NtCreateOpen(fd, tree_id, user_id, dialect, file, 
+    if(!SMB_NtCreateOpen(fd, tree_id, user_id, dialect, file,
                     access, sharing, sa, creation, attributes, template, &file_id ))
     {
         close(fd);
@@ -1009,7 +1009,7 @@
         goto done;
     }
 #endif
-    if(!SMB_Open(fd, tree_id, user_id, dialect, file, 
+    if(!SMB_Open(fd, tree_id, user_id, dialect, file,
                     access, sharing, creation, attributes, &file_id ))
     {
         close(fd);
@@ -1023,7 +1023,7 @@
         ERR("register failed\n");
         close(fd);
     }
- 
+
 done:
     HeapFree(GetProcessHeap(),0,name);
     return handle;
diff --git a/files/tape.c b/files/tape.c
index fe1ad04..ab0f383 100644
--- a/files/tape.c
+++ b/files/tape.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
  *
- * TODO: 
+ * TODO:
  *    Everything, all functions are stubs.
  */
 
@@ -39,7 +39,7 @@
   FIXME("(%04x, %p, %ld, %p, %d, %d, %p) stub!\n", hFile, lpBuffer,
     nNumberOfBytesToRead, lpNumberOfBytesRead, bAbort, bProcessSecurity,
     lpContext);
-    
+
   SetLastError( ERROR_NOT_SUPPORTED );
 
   return FALSE;
@@ -58,8 +58,8 @@
 
   SetLastError( ERROR_NOT_SUPPORTED );
 
-  return FALSE;  
-}  
+  return FALSE;
+}
 
 
 /************************************************************************
@@ -128,7 +128,7 @@
 DWORD WINAPI GetTapePosition( HANDLE hDevice, DWORD dwPositionType,
 			LPDWORD lpdwPartition, LPDWORD lpdwOffsetLow,
 			LPDWORD lpdwOffsetHigh )
-{ 
+{
   FIXME("(%04x, %ld, %p, %p, %p) stub!\n", hDevice, dwPositionType,
     lpdwPartition, lpdwOffsetLow, lpdwOffsetHigh);
 
@@ -155,7 +155,7 @@
  *		PrepareTape  (KERNEL32.@)
  */
 DWORD WINAPI PrepareTape( HANDLE hDevice,  DWORD dwOperation,  BOOL bImmediate )
-{ 
+{
   FIXME("(%04x, %ld, %d) stub!\n", hDevice, dwOperation, bImmediate);
 
   SetLastError( ERROR_NOT_SUPPORTED );
diff --git a/graphics/bitblt.c b/graphics/bitblt.c
index d876fc6..818c8fb 100644
--- a/graphics/bitblt.c
+++ b/graphics/bitblt.c
@@ -112,7 +112,7 @@
 BOOL WINAPI StretchBlt( HDC hdcDst, INT xDst, INT yDst,
                             INT widthDst, INT heightDst,
                             HDC hdcSrc, INT xSrc, INT ySrc,
-                            INT widthSrc, INT heightSrc, 
+                            INT widthSrc, INT heightSrc,
 			DWORD rop )
 {
     BOOL ret = FALSE;
@@ -176,7 +176,7 @@
              hbmMask,xMask,yMask,dwRop);
     return 1;
 }
-  
+
 /*********************************************************************
  *      PlgBlt [GDI32.@]
  *
@@ -188,4 +188,4 @@
     FIXME("PlgBlt, stub\n");
         return 1;
 }
- 
+
diff --git a/graphics/dispdib.c b/graphics/dispdib.c
index 8c1989f..8036f36 100644
--- a/graphics/dispdib.c
+++ b/graphics/dispdib.c
@@ -1,6 +1,6 @@
 /*
  * DISPDIB.dll
- * 
+ *
  * Copyright 1998 Ove Kåven (with some help from Marcus Meissner)
  *
  * This library is free software; you can redistribute it and/or
diff --git a/graphics/env.c b/graphics/env.c
index 727affe..eab4107 100644
--- a/graphics/env.c
+++ b/graphics/env.c
@@ -1,4 +1,4 @@
-/* 
+/*
  * Driver Environment functions
  *
  * Note: This has NOTHING to do with the task/process environment!
@@ -41,7 +41,7 @@
 static ENVTABLE *SearchEnvTable(ATOM atom)
 {
     INT16 i;
-    
+
     for (i = 19; i >= 0; i--) {
       if (EnvTable[i].atom == atom)
 	return &EnvTable[i];
@@ -55,7 +55,7 @@
     if (!NullPortAtom)
     {
         char NullPort[256];
-        
+
         GetProfileStringA( "windows", "nullport", "none",
                              NullPort, sizeof(NullPort) );
         NullPortAtom = AddAtomA( NullPort );
@@ -113,7 +113,7 @@
  */
 INT16 WINAPI SetEnvironment16(LPCSTR lpPortName, LPDEVMODEA lpdev, UINT16 nCount)
 {
-    ATOM atom; 
+    ATOM atom;
     BOOL16 nullport = FALSE;
     LPSTR p;
     ENVTABLE *env;
diff --git a/graphics/fontengine.c b/graphics/fontengine.c
index ade4d8a..606eefd 100644
--- a/graphics/fontengine.c
+++ b/graphics/fontengine.c
@@ -23,14 +23,14 @@
 #include <stdlib.h>
 #include "winbase.h"
 #include "font.h"
-#include "wine/debug.h"     
+#include "wine/debug.h"
 
 WINE_DEFAULT_DEBUG_CHANNEL(font);
 
 /***********************************************************************
  *		EngineEnumerateFont (GDI.300)
  */
-WORD WINAPI 
+WORD WINAPI
 EngineEnumerateFont16(LPSTR fontname, FARPROC16 proc, DWORD data )
 {
     FIXME("(%s,%p,%lx),stub\n",fontname,proc,data);
@@ -46,7 +46,7 @@
 
     /*	untested, don't know if it works.
 	We seem to access some structure that is located after the
-	FONTINFO. The FONTINFO documentation says that there may 
+	FONTINFO. The FONTINFO documentation says that there may
 	follow some char-width table or font bitmap or vector info.
 	I think it is some kind of font bitmap that begins at offset 0x52,
 	as FONTINFO goes up to 0x51.
@@ -69,7 +69,7 @@
 WORD WINAPI EngineRealizeFont16(LPLOGFONT16 lplogFont, LPTEXTXFORM16 lptextxform, LPFONTINFO16 lpfontInfo)
 {
     FIXME("(%p,%p,%p),stub\n",lplogFont,lptextxform,lpfontInfo);
-    
+
     return 0;
 }
 
@@ -79,7 +79,7 @@
 WORD WINAPI EngineRealizeFontExt16(LONG l1, LONG l2, LONG l3, LONG l4)
 {
     FIXME("(%08lx,%08lx,%08lx,%08lx),stub\n",l1,l2,l3,l4);
-    
+
     return 0;
 }
 
@@ -121,5 +121,5 @@
 {
    FIXME(" stub! (always fails)\n");
     return -1; /* error */
-    
+
 }
diff --git a/graphics/painting.c b/graphics/painting.c
index e75ca26..20ac608 100644
--- a/graphics/painting.c
+++ b/graphics/painting.c
@@ -151,8 +151,8 @@
 /***********************************************************************
  *           ArcTo    (GDI32.@)
  */
-BOOL WINAPI ArcTo( HDC hdc, 
-                     INT left,   INT top, 
+BOOL WINAPI ArcTo( HDC hdc,
+                     INT left,   INT top,
                      INT right,  INT bottom,
                      INT xstart, INT ystart,
                      INT xend,   INT yend )
@@ -169,7 +169,7 @@
         return result;
     }
     GDI_ReleaseObj( hdc );
-    /* 
+    /*
      * Else emulate it.
      * According to the documentation, a line is drawn from the current
      * position to the starting point of the arc.
@@ -212,7 +212,7 @@
     if (!dc) return FALSE;
 
     if(PATH_IsPathOpen(dc->path))
-        ret = PATH_Arc(dc,left,top,right,bottom,xstart,ystart,xend,yend,2); 
+        ret = PATH_Arc(dc,left,top,right,bottom,xstart,ystart,xend,yend,2);
     else if(dc->funcs->pPie)
         ret = dc->funcs->pPie(dc->physDev,left,top,right,bottom,xstart,ystart,xend,yend);
 
@@ -302,7 +302,7 @@
     BOOL ret = FALSE;
     DC * dc = DC_GetDCUpdate( hdc );
     if (dc)
-    {  
+    {
     if(PATH_IsPathOpen(dc->path))
             ret = PATH_Rectangle(dc, left, top, right, bottom);
         else if (dc->funcs->pRectangle)
@@ -434,13 +434,13 @@
     DC * dc = DC_GetDCPtr( hdc );
 
     TRACE("(%08x,%p)\n",hdc,ppfd);
-  
+
     if (!dc) return 0;
 
     if (!dc->funcs->pChoosePixelFormat) FIXME(" :stub\n");
     else ret = dc->funcs->pChoosePixelFormat(dc->physDev,ppfd);
 
-    GDI_ReleaseObj( hdc );  
+    GDI_ReleaseObj( hdc );
     return ret;
 }
 
@@ -469,7 +469,7 @@
     if (!dc->funcs->pSetPixelFormat) FIXME(" :stub\n");
     else bRet = dc->funcs->pSetPixelFormat(dc->physDev,iPixelFormat,ppfd);
 
-    GDI_ReleaseObj( hdc );  
+    GDI_ReleaseObj( hdc );
     return bRet;
 }
 
@@ -497,7 +497,7 @@
     if (!dc->funcs->pGetPixelFormat) FIXME(" :stub\n");
     else ret = dc->funcs->pGetPixelFormat(dc->physDev);
 
-    GDI_ReleaseObj( hdc );  
+    GDI_ReleaseObj( hdc );
     return ret;
 }
 
@@ -535,7 +535,7 @@
     }
     else ret = dc->funcs->pDescribePixelFormat(dc->physDev,iPixelFormat,nBytes,ppfd);
 
-    GDI_ReleaseObj( hdc );  
+    GDI_ReleaseObj( hdc );
     return ret;
 }
 
@@ -565,7 +565,7 @@
     }
     else bRet = dc->funcs->pSwapBuffers(dc->physDev);
 
-    GDI_ReleaseObj( hdc );  
+    GDI_ReleaseObj( hdc );
     return bRet;
 }
 
@@ -603,7 +603,7 @@
     return FillRgn( hdc, hrgn, hbrush );
 }
 
-    
+
 /***********************************************************************
  *           FillRgn    (GDI32.@)
  */
@@ -829,7 +829,7 @@
 	return FALSE;
     }
     for (i=polygons;i--;) counts32[i]=counts[i];
-   
+
     ret = PolyPolygon(hdc,pt32,counts32,polygons);
     HeapFree( GetProcessHeap(), 0, counts32 );
     HeapFree( GetProcessHeap(), 0, pt32 );
@@ -981,7 +981,7 @@
 	    HeapFree( GetProcessHeap(), 0, Pts );
 	}
     }
- 
+
     GDI_ReleaseObj( hdc );
     return ret;
 }
@@ -1035,12 +1035,12 @@
     BOOL result;
     DC *dc;
 
-    if( (signed int)dwRadius < 0 ) 
+    if( (signed int)dwRadius < 0 )
 	return FALSE;
 
     dc = DC_GetDCUpdate( hdc );
-    if(!dc) return FALSE; 
-    
+    if(!dc) return FALSE;
+
     if(dc->funcs->pAngleArc)
     {
         result = dc->funcs->pAngleArc( dc->physDev, x, y, dwRadius, eStartAngle, eSweepAngle );
@@ -1049,27 +1049,27 @@
         return result;
     }
     GDI_ReleaseObj( hdc );
- 
+
     /* AngleArc always works counterclockwise */
     arcdir = GetArcDirection( hdc );
-    SetArcDirection( hdc, AD_COUNTERCLOCKWISE ); 
+    SetArcDirection( hdc, AD_COUNTERCLOCKWISE );
 
     x1 = x + cos(eStartAngle*M_PI/180) * dwRadius;
     y1 = y - sin(eStartAngle*M_PI/180) * dwRadius;
     x2 = x + cos((eStartAngle+eSweepAngle)*M_PI/180) * dwRadius;
     y2 = x - sin((eStartAngle+eSweepAngle)*M_PI/180) * dwRadius;
- 
+
     LineTo( hdc, x1, y1 );
     if( eSweepAngle >= 0 )
-        result = Arc( hdc, x-dwRadius, y-dwRadius, x+dwRadius, y+dwRadius, 
+        result = Arc( hdc, x-dwRadius, y-dwRadius, x+dwRadius, y+dwRadius,
 		      x1, y1, x2, y2 );
     else
-	result = Arc( hdc, x-dwRadius, y-dwRadius, x+dwRadius, y+dwRadius, 
+	result = Arc( hdc, x-dwRadius, y-dwRadius, x+dwRadius, y+dwRadius,
 		      x2, y2, x1, y1 );
- 
+
     if( result ) MoveToEx( hdc, x2, y2, NULL );
     SetArcDirection( hdc, arcdir );
-    return result; 
+    return result;
 }
 
 /***********************************************************************
@@ -1084,7 +1084,7 @@
     int i;
 
     dc = DC_GetDCUpdate( hdc );
-    if(!dc) return FALSE; 
+    if(!dc) return FALSE;
 
     if(dc->funcs->pPolyDraw)
     {
@@ -1114,7 +1114,7 @@
     {
 	if( lpbTypes[i] == PT_MOVETO )
 	{
-	    MoveToEx( hdc, lppt[i].x, lppt[i].y, NULL ); 				
+	    MoveToEx( hdc, lppt[i].x, lppt[i].y, NULL );
 	    lastmove.x = dc->CursPosX;
 	    lastmove.y = dc->CursPosY;
 	}
@@ -1125,24 +1125,24 @@
 	    PolyBezierTo( hdc, &lppt[i], 3 );
 	    i += 2;
 	}
-	else 
-	    return FALSE; 
+	else
+	    return FALSE;
 
 	if( lpbTypes[i] & PT_CLOSEFIGURE )
 	{
 	    if( PATH_IsPathOpen( dc->path ) )
 		CloseFigure( hdc );
-	    else 
+	    else
 		LineTo( hdc, lastmove.x, lastmove.y );
 	}
     }
 
-    return TRUE; 
+    return TRUE;
 }
 
 /******************************************************************
- * 
- *   *Very* simple bezier drawing code, 
+ *
+ *   *Very* simple bezier drawing code,
  *
  *   It uses a recursive algorithm to divide the curve in a series
  *   of straight line segements. Not ideal but for me sufficient.
@@ -1152,7 +1152,7 @@
  *   7 July 1998 Rein Klazes
  */
 
- /* 
+ /*
   * some macro definitions for bezier drawing
   *
   * to avoid trucation errors the coordinates are
@@ -1161,12 +1161,12 @@
   * and avoiding floating point arithmatic
   * 4 bits should allow 27 bits coordinates which I saw
   * somewere in the win32 doc's
-  * 
+  *
   */
 
 #define BEZIERSHIFTBITS 4
 #define BEZIERSHIFTUP(x)    ((x)<<BEZIERSHIFTBITS)
-#define BEZIERPIXEL        BEZIERSHIFTUP(1)    
+#define BEZIERPIXEL        BEZIERSHIFTUP(1)
 #define BEZIERSHIFTDOWN(x)  (((x)+(1<<(BEZIERSHIFTBITS-1)))>>BEZIERSHIFTBITS)
 /* maximum depth of recursion */
 #define BEZIERMAXDEPTH  8
@@ -1175,14 +1175,14 @@
 /* enough for one curve */
 #define BEZIER_INITBUFSIZE    (150)
 
-/* calculate Bezier average, in this case the middle 
+/* calculate Bezier average, in this case the middle
  * correctly rounded...
  * */
 
 #define BEZIERMIDDLE(Mid, P1, P2) \
     (Mid).x=((P1).x+(P2).x + 1)/2;\
     (Mid).y=((P1).y+(P2).y + 1)/2;
-    
+
 /**********************************************************
 * BezierCheck helper function to check
 * that recursion can be terminated
@@ -1192,7 +1192,7 @@
 *       returns true if the recusion can be terminated
 */
 static BOOL BezierCheck( int level, POINT *Points)
-{ 
+{
     INT dx, dy;
     dx=Points[3].x-Points[0].x;
     dy=Points[3].y-Points[0].y;
@@ -1244,7 +1244,7 @@
             return TRUE;
     }
 }
-    
+
 /* Helper for GDI_Bezier.
  * Just handles one Bezier, so Points should point to four POINTs
  */
@@ -1286,7 +1286,7 @@
 }
 
 
-    
+
 /***********************************************************************
  *           GDI_Bezier   [INTERNAL]
  *   Calculate line segments that approximate -what microsoft calls- a bezier
@@ -1301,7 +1301,7 @@
  *  count   [I] Number of Points.  Must be 3n+1.
  *  nPtsOut [O] Will contain no of points that have been produced (i.e. no. of
  *              lines+1).
- *   
+ *
  *  RETURNS
  *
  *  Ptr to an array of POINTs that contain the lines that approximinate the
diff --git a/graphics/path.c b/graphics/path.c
index 694bf4a..522066d 100644
--- a/graphics/path.c
+++ b/graphics/path.c
@@ -111,7 +111,7 @@
 {
     BOOL ret = TRUE;
     DC *dc = DC_GetDCPtr( hdc );
-   
+
     if(!dc) return FALSE;
 
     if(dc->funcs->pBeginPath)
@@ -150,7 +150,7 @@
 {
     BOOL ret = TRUE;
     DC *dc = DC_GetDCPtr( hdc );
-   
+
     if(!dc) return FALSE;
 
     if(dc->funcs->pEndPath)
@@ -196,7 +196,7 @@
 {
     BOOL ret = TRUE;
     DC *dc = DC_GetDCPtr( hdc );
-   
+
     if(!dc) return FALSE;
 
     if(dc->funcs->pAbortPath)
@@ -220,13 +220,13 @@
 /***********************************************************************
  *           CloseFigure    (GDI32.@)
  *
- * FIXME: Check that SetLastError is being called correctly 
+ * FIXME: Check that SetLastError is being called correctly
  */
 BOOL WINAPI CloseFigure(HDC hdc)
 {
     BOOL ret = TRUE;
     DC *dc = DC_GetDCPtr( hdc );
-   
+
     if(!dc) return FALSE;
 
     if(dc->funcs->pCloseFigure)
@@ -277,18 +277,18 @@
    INT ret = -1;
    GdiPath *pPath;
    DC *dc = DC_GetDCPtr( hdc );
-   
+
    if(!dc) return -1;
-   
+
    pPath = &dc->path;
-   
+
    /* Check that path is closed */
    if(pPath->state!=PATH_Closed)
    {
       SetLastError(ERROR_CAN_NOT_COMPLETE);
       goto done;
    }
-   
+
    if(nSize==0)
       ret = pPath->numEntriesUsed;
    else if(nSize<pPath->numEntriesUsed)
@@ -326,8 +326,8 @@
 /***********************************************************************
  *           PathToRegion    (GDI32.@)
  *
- * FIXME 
- *   Check that SetLastError is being called correctly 
+ * FIXME
+ *   Check that SetLastError is being called correctly
  *
  * The documentation does not state this explicitly, but a test under Windows
  * shows that the region which is returned should be in device coordinates.
@@ -340,9 +340,9 @@
 
    /* Get pointer to path */
    if(!dc) return -1;
-   
+
     pPath = &dc->path;
-   
+
    /* Check that path is closed */
    if(pPath->state!=PATH_Closed) SetLastError(ERROR_CAN_NOT_COMPLETE);
    else
@@ -374,7 +374,7 @@
       SetLastError(ERROR_CAN_NOT_COMPLETE);
       return FALSE;
    }
-   
+
    /* Construct a region from the path and fill it */
    if(PATH_PathToRegion(pPath, dc->polyFillMode, &hrgn))
    {
@@ -385,14 +385,14 @@
        * transform would be easier but would require more overhead, especially
        * now that SaveDC saves the current path.
        */
-       
+
       /* Save the information about the old mapping mode */
       mapMode=GetMapMode(dc->hSelf);
       GetViewportExtEx(dc->hSelf, &ptViewportExt);
       GetViewportOrgEx(dc->hSelf, &ptViewportOrg);
       GetWindowExtEx(dc->hSelf, &ptWindowExt);
       GetWindowOrgEx(dc->hSelf, &ptWindowOrg);
-      
+
       /* Save world transform
        * NB: The Windows documentation on world transforms would lead one to
        * believe that this has to be done only in GM_ADVANCED; however, my
@@ -400,7 +400,7 @@
        * not reset the world transform.
        */
       GetWorldTransform(dc->hSelf, &xform);
-      
+
       /* Set MM_TEXT */
       SetMapMode(dc->hSelf, MM_TEXT);
       SetViewportOrgEx(dc->hSelf, 0, 0, NULL);
@@ -431,20 +431,20 @@
  */
 BOOL16 WINAPI FillPath16(HDC16 hdc)
 {
-  return (BOOL16) FillPath((HDC) hdc); 
+  return (BOOL16) FillPath((HDC) hdc);
 }
 
 /***********************************************************************
  *           FillPath    (GDI32.@)
  *
  * FIXME
- *    Check that SetLastError is being called correctly 
+ *    Check that SetLastError is being called correctly
  */
 BOOL WINAPI FillPath(HDC hdc)
 {
     DC *dc = DC_GetDCPtr( hdc );
     BOOL bRet = FALSE;
-   
+
     if(!dc) return FALSE;
 
     if(dc->funcs->pFillPath)
@@ -473,8 +473,8 @@
 
 /***********************************************************************
  *           SelectClipPath    (GDI32.@)
- * FIXME 
- *  Check that SetLastError is being called correctly 
+ * FIXME
+ *  Check that SetLastError is being called correctly
  */
 BOOL WINAPI SelectClipPath(HDC hdc, INT iMode)
 {
@@ -482,7 +482,7 @@
    HRGN  hrgnPath;
    BOOL  success = FALSE;
    DC *dc = DC_GetDCPtr( hdc );
-   
+
    if(!dc) return FALSE;
 
    if(dc->funcs->pSelectClipPath)
@@ -490,7 +490,7 @@
    else
    {
        pPath = &dc->path;
-   
+
        /* Check that path is closed */
        if(pPath->state!=PATH_Closed)
            SetLastError(ERROR_CAN_NOT_COMPLETE);
@@ -582,7 +582,7 @@
 BOOL PATH_MoveTo(DC *dc)
 {
    GdiPath *pPath = &dc->path;
-   
+
    /* Check that path is open */
    if(pPath->state!=PATH_Open)
       /* FIXME: Do we have to call SetLastError? */
@@ -605,7 +605,7 @@
 {
    GdiPath *pPath = &dc->path;
    POINT point, pointCurPos;
-   
+
    /* Check that path is open */
    if(pPath->state!=PATH_Open)
       return FALSE;
@@ -615,7 +615,7 @@
    point.y=y;
    if(!LPtoDP(dc->hSelf, &point, 1))
       return FALSE;
-   
+
    /* Add a PT_MOVETO if necessary */
    if(pPath->newStroke)
    {
@@ -627,7 +627,7 @@
       if(!PATH_AddEntry(pPath, &pointCurPos, PT_MOVETO))
          return FALSE;
    }
-   
+
    /* Add a PT_LINETO entry */
    return PATH_AddEntry(pPath, &point, PT_LINETO);
 }
@@ -637,7 +637,7 @@
  * Should be called when a call to RoundRect is performed on a DC that has
  * an open path. Returns TRUE if successful, else FALSE.
  *
- * FIXME: it adds the same entries to the path as windows does, but there 
+ * FIXME: it adds the same entries to the path as windows does, but there
  * is an error in the bezier drawing code so that there are small pixel-size
  * gaps when the resulting path is drawn by StrokePath()
  */
@@ -646,7 +646,7 @@
    GdiPath *pPath = &dc->path;
    POINT corners[2], pointTemp;
    FLOAT_POINT ellCorners[2];
- 
+
    /* Check that path is open */
    if(pPath->state!=PATH_Open)
       return FALSE;
@@ -654,11 +654,11 @@
    if(!PATH_CheckCorners(dc,corners,x1,y1,x2,y2))
       return FALSE;
 
-   /* Add points to the roundrect path */ 
+   /* Add points to the roundrect path */
    ellCorners[0].x = corners[1].x-ell_width;
-   ellCorners[0].y = corners[0].y; 
-   ellCorners[1].x = corners[1].x; 
-   ellCorners[1].y = corners[0].y+ell_height; 
+   ellCorners[0].y = corners[0].y;
+   ellCorners[1].x = corners[1].x;
+   ellCorners[1].y = corners[0].y+ell_height;
    if(!PATH_DoArcPart(pPath, ellCorners, 0, -M_PI_2, TRUE))
       return FALSE;
    pointTemp.x = corners[0].x+ell_width/2;
@@ -684,8 +684,8 @@
    ellCorners[0].x = corners[1].x-ell_width;
    ellCorners[1].x = corners[1].x;
    if(!PATH_DoArcPart(pPath, ellCorners, M_PI_2, 0, FALSE))
-      return FALSE;    
-   
+      return FALSE;
+
    /* Close the roundrect figure */
    if(!CloseFigure(dc->hSelf))
       return FALSE;
@@ -744,14 +744,14 @@
 }
 
 /* PATH_Ellipse
- * 
+ *
  * Should be called when a call to Ellipse is performed on a DC that has
  * an open path. This adds four Bezier splines representing the ellipse
  * to the path. Returns TRUE if successful, else FALSE.
  */
 BOOL PATH_Ellipse(DC *dc, INT x1, INT y1, INT x2, INT y2)
 {
-   return( PATH_Arc(dc, x1, y1, x2, y2, x1, (y1+y2)/2, x1, (y1+y2)/2,0) && 
+   return( PATH_Arc(dc, x1, y1, x2, y2, x1, (y1+y2)/2, x1, (y1+y2)/2,0) &&
            CloseFigure(dc->hSelf) );
 }
 
@@ -777,7 +777,7 @@
 
    /* FIXME: This function should check for all possible error returns */
    /* FIXME: Do we have to respect newStroke? */
-   
+
    /* Check that path is open */
    if(pPath->state!=PATH_Open)
       return FALSE;
@@ -786,7 +786,7 @@
    /* FIXME: Only in GM_COMPATIBLE? */
    if(x1==x2 || y1==y2)
       return TRUE;
-   
+
    /* Convert points to device coordinates */
    corners[0].x=(FLOAT)x1;
    corners[0].y=(FLOAT)y1;
@@ -845,7 +845,7 @@
       corners[1].x--;
       corners[1].y--;
    }
-   
+
    /* Add the arc to the path with one Bezier spline per quadrant that the
     * arc spans */
    start=TRUE;
@@ -895,12 +895,12 @@
    }
    else if(lines==2)
    {
-      centre.x = (corners[0].x+corners[1].x)/2; 
+      centre.x = (corners[0].x+corners[1].x)/2;
       centre.y = (corners[0].y+corners[1].y)/2;
       if(!PATH_AddEntry(pPath, &centre, PT_LINETO | PT_CLOSEFIGURE))
          return FALSE;
    }
-	
+
    return TRUE;
 }
 
@@ -934,7 +934,7 @@
    }
    return TRUE;
 }
-   
+
 BOOL PATH_PolyBezier(DC *dc, const POINT *pts, DWORD cbPoints)
 {
    GdiPath     *pPath = &dc->path;
@@ -972,7 +972,7 @@
    }
    return TRUE;
 }
-   
+
 BOOL PATH_PolylineTo(DC *dc, const POINT *pts, DWORD cbPoints)
 {
    GdiPath     *pPath = &dc->path;
@@ -1073,14 +1073,14 @@
    }
    return TRUE;
 }
-   
+
 /***********************************************************************
  * Internal functions
  */
 
 /* PATH_CheckCorners
  *
- * Helper function for PATH_RoundRect() and PATH_Rectangle() 
+ * Helper function for PATH_RoundRect() and PATH_Rectangle()
  */
 static BOOL PATH_CheckCorners(DC *dc, POINT corners[], INT x1, INT y1, INT x2, INT y2)
 {
@@ -1093,7 +1093,7 @@
    corners[1].y=y2;
    if(!LPtoDP(dc->hSelf, corners, 2))
       return FALSE;
-   
+
    /* Make sure first corner is top left and second corner is bottom right */
    if(corners[0].x>corners[1].x)
    {
@@ -1107,7 +1107,7 @@
       corners[0].y=corners[1].y;
       corners[1].y=temp;
    }
-   
+
    /* In GM_COMPATIBLE, don't include bottom and right edges */
    if(dc->GraphicsMode==GM_COMPATIBLE)
    {
@@ -1129,7 +1129,7 @@
     if(!pts) return FALSE;
 
     for(i = 1; i < no; i++)
-        PATH_AddEntry(pPath, &pts[i], 
+        PATH_AddEntry(pPath, &pts[i],
 	    (i == no-1 && closed) ? PT_LINETO | PT_CLOSEFIGURE : PT_LINETO);
     HeapFree( GetProcessHeap(), 0, pts );
     return TRUE;
@@ -1166,7 +1166,7 @@
     PATH_EmptyPath(&newPath);
     return TRUE;
 }
-	  
+
 /* PATH_PathToRegion
  *
  * Creates a region from the specified path using the specified polygon
@@ -1188,7 +1188,7 @@
    PATH_FlattenPath(pPath);
 
    /* FIXME: What happens when number of points is zero? */
-   
+
    /* First pass: Find out how many strokes there are in the path */
    /* FIXME: We could eliminate this with some bookkeeping in GdiPath */
    numStrokes=0;
@@ -1197,14 +1197,14 @@
          numStrokes++;
 
    /* Allocate memory for number-of-points-in-stroke array */
-   pNumPointsInStroke=(int *)HeapAlloc( GetProcessHeap(), 0, 
+   pNumPointsInStroke=(int *)HeapAlloc( GetProcessHeap(), 0,
 					sizeof(int) * numStrokes );
    if(!pNumPointsInStroke)
    {
       SetLastError(ERROR_NOT_ENOUGH_MEMORY);
       return FALSE;
    }
-   
+
    /* Second pass: remember number of points in each polygon */
    iStroke=-1;  /* Will get incremented to 0 at beginning of first stroke */
    for(i=0; i<pPath->numEntriesUsed; i++)
@@ -1257,7 +1257,7 @@
 BOOL PATH_AddEntry(GdiPath *pPath, const POINT *pPoint, BYTE flags)
 {
    assert(pPath!=NULL);
-   
+
    /* FIXME: If newStroke is true, perhaps we want to check that we're
     * getting a PT_MOVETO
     */
@@ -1266,7 +1266,7 @@
    /* Check that path is open */
    if(pPath->state!=PATH_Open)
       return FALSE;
-   
+
    /* Reserve enough memory for an extra path entry */
    if(!PATH_ReserveEntries(pPath, pPath->numEntriesUsed+1))
       return FALSE;
@@ -1296,7 +1296,7 @@
    INT   numEntriesToAllocate;
    POINT *pPointsNew;
    BYTE    *pFlagsNew;
-   
+
    assert(pPath!=NULL);
    assert(numEntries>=0);
 
@@ -1317,11 +1317,11 @@
          numEntriesToAllocate=numEntries;
 
       /* Allocate new arrays */
-      pPointsNew=(POINT *)HeapAlloc( GetProcessHeap(), 0, 
+      pPointsNew=(POINT *)HeapAlloc( GetProcessHeap(), 0,
 				     numEntriesToAllocate * sizeof(POINT) );
       if(!pPointsNew)
          return FALSE;
-      pFlagsNew=(BYTE *)HeapAlloc( GetProcessHeap(), 0, 
+      pFlagsNew=(BYTE *)HeapAlloc( GetProcessHeap(), 0,
 				   numEntriesToAllocate * sizeof(BYTE) );
       if(!pFlagsNew)
       {
@@ -1391,7 +1391,7 @@
 	 xNorm[i]=cos(angleStart);
 	 yNorm[i]=sin(angleStart);
       }
-   
+
    /* Add starting point to path if desired */
    if(addMoveTo)
    {
@@ -1465,7 +1465,7 @@
     if(!dc) return FALSE;
 
     if(dc->funcs->pFlattenPath) ret = dc->funcs->pFlattenPath(dc->physDev);
-    else 
+    else
     {
 	GdiPath *pPath = &dc->path;
         if(pPath->state != PATH_Closed)
@@ -1499,7 +1499,7 @@
     GetWindowExtEx(dc->hSelf, &szWindowExt);
     GetWindowOrgEx(dc->hSelf, &ptWindowOrg);
     GetWorldTransform(dc->hSelf, &xform);
-      
+
     /* Set MM_TEXT */
     SetMapMode(dc->hSelf, MM_TEXT);
     SetViewportOrgEx(dc->hSelf, 0, 0, NULL);
@@ -1522,7 +1522,7 @@
 	    break;
 	case PT_BEZIERTO:
 	    TRACE("Got PT_BEZIERTO\n");
-	    if(pPath->pFlags[i+1] != PT_BEZIERTO || 
+	    if(pPath->pFlags[i+1] != PT_BEZIERTO ||
 	       (pPath->pFlags[i+2] & ~PT_CLOSEFIGURE) != PT_BEZIERTO) {
 	        ERR("Path didn't contain 3 successive PT_BEZIERTOs\n");
 		ret = FALSE;
@@ -1647,7 +1647,7 @@
 {
    DC *dc = DC_GetDCPtr( hdc );
    BOOL ret = FALSE;
-   
+
    if(!dc) return FALSE;
 
    if(dc->funcs->pWidenPath)
diff --git a/graphics/x11drv/bitblt.c b/graphics/x11drv/bitblt.c
index c4da3b2..5dd2904 100644
--- a/graphics/x11drv/bitblt.c
+++ b/graphics/x11drv/bitblt.c
@@ -48,7 +48,7 @@
 #define OP_ARGS(src,dst)  (((src) << 2) | (dst))
 
 #define OP_SRC(opcode)    ((opcode) >> 6)
-#define OP_DST(opcode)    (((opcode) >> 4) & 3) 
+#define OP_DST(opcode)    (((opcode) >> 4) & 3)
 #define OP_SRCDST(opcode) ((opcode) >> 4)
 #define OP_ROP(opcode)    ((opcode) & 0x0f)
 
@@ -786,7 +786,7 @@
                 ysrc += yinc;
                 ydst++;
             }
-        }        
+        }
     }
     else  /* Shrinking */
     {
@@ -838,7 +838,7 @@
             else if (((ydst + yinc) >> 16 == ydst >> 16) &&
                      (ysrc < visRectSrc->bottom-1))
                 continue;  /* Restart loop for next overlapping row */
-        
+
             /* Store the destination row */
             pixel = rowDst + visRectDst->right - 1;
             y = (ydst >> 16) - visRectDst->top;
@@ -848,7 +848,7 @@
                 memset( rowDst, (mode == STRETCH_ANDSCANS) ? 0xff : 0x00,
                         widthDst*sizeof(int) );
         }
-    }        
+    }
     HeapFree( GetProcessHeap(), 0, rowSrc );
 }
 
@@ -935,7 +935,7 @@
                 /* MSDN says if StretchBlt must convert a bitmap from monochrome
                    to color or vice versa, the forground and background color of
                    the device context are used.  In fact, it also applies to the
-                   case when it is converted from mono to mono. */ 
+                   case when it is converted from mono to mono. */
                 XSetBackground( gdi_display, gc, physDevDst->textPixel );
                 XSetForeground( gdi_display, gc, physDevDst->backgroundPixel );
                 XCopyPlane( gdi_display, physDevSrc->drawable, pixmap, gc,
@@ -1136,9 +1136,9 @@
     rect.bottom = ySrc + heightSrc;
     if (widthSrc < 0) SWAP_INT32( &rect.left, &rect.right );
     if (heightSrc < 0) SWAP_INT32( &rect.top, &rect.bottom );
-    /* Apparently the clipping and visible regions are only for output, 
+    /* Apparently the clipping and visible regions are only for output,
        so just check against totalExtent here to avoid BadMatch errors */
-    if (!IntersectRect( visRectSrc, &rect, &dcSrc->totalExtent )) 
+    if (!IntersectRect( visRectSrc, &rect, &dcSrc->totalExtent ))
         return FALSE;
 
       /* Intersect the rectangles */
@@ -1323,7 +1323,7 @@
                 XSetFillStyle( gdi_display, physDevDst->gc, FillSolid );
             }
             XFillRectangle( gdi_display, physDevDst->drawable, physDevDst->gc,
-                            visRectDst.left, visRectDst.top, width, height ); 
+                            visRectDst.left, visRectDst.top, width, height );
             wine_tsx11_unlock();
             return TRUE;
         }
diff --git a/graphics/x11drv/bitmap.c b/graphics/x11drv/bitmap.c
index 9902e81..7ce26c7 100644
--- a/graphics/x11drv/bitmap.c
+++ b/graphics/x11drv/bitmap.c
@@ -163,7 +163,7 @@
 
 /***********************************************************************
  *           GetBitmapBits   (X11DRV.@)
- * 
+ *
  * RETURNS
  *    Success: Number of bytes copied
  *    Failure: 0
@@ -322,9 +322,9 @@
         GDI_ReleaseObj( hbitmap );
         return 0;
     }
-    
+
     /* copy 16 bit padded image buffer with real bitsperpixel to XImage */
-    
+
     startline = bits;
 
     switch (bmp->bitmap.bmBitsPixel)
@@ -388,7 +388,7 @@
             startline += bmp->bitmap.bmWidthBytes;
         }
         break;
-    case 32: 
+    case 32:
         for (h=0;h<height;h++)
         {
 	    sbuf = startline;
@@ -451,7 +451,7 @@
 
     TRACE("\tPixmap properties: width=%d, height=%d, depth=%d\n",
           width, height, depth);
-    
+
     /*
      * Create an HBITMAP with the same dimensions and BPP as the pixmap,
      * and make it a container for the pixmap passed.
@@ -459,7 +459,7 @@
     hBmp = CreateBitmap( width, height, 1, depth, NULL );
 
     pBmp = (BITMAPOBJ *)GDI_GetObjPtr( hBmp, BITMAP_MAGIC );
-    
+
     pBmp->funcs = X11DRV_DC_Funcs;
     pBmp->physBitmap = (void *)pixmap;
     GDI_ReleaseObj( hBmp );
@@ -493,7 +493,7 @@
     /* Get the bitmap dimensions */
     width = pBmp->bitmap.bmWidth;
     height = pBmp->bitmap.bmHeight;
-                 
+
     hBmpCopy = CopyImage(hBmp, IMAGE_BITMAP, width, height, LR_CREATEDIBSECTION);
 
     /* We can now get rid of the HBITMAP wrapper we created earlier.
@@ -501,13 +501,13 @@
      */
     if (!bDeletePixmap)
     {
-        /* Manually clear the bitmap internals to prevent the Pixmap 
+        /* Manually clear the bitmap internals to prevent the Pixmap
          * from being deleted by DeleteObject.
          */
         pBmp->physBitmap = NULL;
         pBmp->funcs = NULL;
     }
-    DeleteObject(hBmp);  
+    DeleteObject(hBmp);
 
 END:
     TRACE("\tReturning HBITMAP %x\n", hBmpCopy);
diff --git a/graphics/x11drv/brush.c b/graphics/x11drv/brush.c
index abe72d6..1d3955c 100644
--- a/graphics/x11drv/brush.c
+++ b/graphics/x11drv/brush.c
@@ -44,7 +44,7 @@
 };
 
   /* Levels of each primary for dithering */
-#define PRIMARY_LEVELS  3  
+#define PRIMARY_LEVELS  3
 #define TOTAL_LEVELS    (PRIMARY_LEVELS*PRIMARY_LEVELS*PRIMARY_LEVELS)
 
  /* Dithering matrix size  */
@@ -142,7 +142,7 @@
 	}
 	prevColor = color;
     }
-    
+
     pixmap = XCreatePixmap( gdi_display, root_window, MATRIX_SIZE, MATRIX_SIZE, screen_depth );
     XPutImage( gdi_display, pixmap, BITMAP_colorGC, ditherImage, 0, 0,
 	       0, 0, MATRIX_SIZE, MATRIX_SIZE );
@@ -201,7 +201,7 @@
         TSXCopyArea( gdi_display, (Pixmap)bmp->physBitmap, physDev->brush.pixmap,
                      BITMAP_GC(bmp), 0, 0, 8, 8, 0, 0 );
     }
-    
+
     if (bmp->bitmap.bmBitsPixel > 1)
     {
 	physDev->brush.fillStyle = FillTiled;
@@ -240,7 +240,7 @@
 	physDev->brush.pixmap = 0;
     }
     physDev->brush.style = logbrush.lbStyle;
-    
+
     switch(logbrush.lbStyle)
     {
       case BS_NULL:
@@ -251,7 +251,7 @@
         TRACE("BS_SOLID\n" );
 	BRUSH_SelectSolidBrush( physDev, logbrush.lbColor );
 	break;
-	
+
       case BS_HATCHED:
 	TRACE("BS_HATCHED\n" );
 	physDev->brush.pixel = X11DRV_PALETTE_ToPhysical( physDev, logbrush.lbColor );
@@ -259,7 +259,7 @@
 				 HatchBrushes[logbrush.lbHatch], 8, 8 );
 	physDev->brush.fillStyle = FillStippled;
 	break;
-	
+
       case BS_PATTERN:
 	TRACE("BS_PATTERN\n");
 	if (!BRUSH_SelectPatternBrush( physDev, (HBITMAP)logbrush.lbHatch )) return 0;
@@ -276,9 +276,9 @@
                                         (WORD)logbrush.lbColor );
 	    BRUSH_SelectPatternBrush( physDev, hBitmap );
 	    DeleteObject( hBitmap );
-	    GlobalUnlock16( (HGLOBAL16)logbrush.lbHatch );	    
+	    GlobalUnlock16( (HGLOBAL16)logbrush.lbHatch );
 	}
-	
+
 	break;
     }
     return hbrush;
diff --git a/graphics/x11drv/codepage.c b/graphics/x11drv/codepage.c
index d76a20f..24090eb 100644
--- a/graphics/x11drv/codepage.c
+++ b/graphics/x11drv/codepage.c
@@ -461,19 +461,19 @@
 			? 1 : pdf->dfUnderline;
 
     pTM->tmOverhang = 0;
-    if( pfo->fo_flags & FO_SYNTH_ITALIC ) 
+    if( pfo->fo_flags & FO_SYNTH_ITALIC )
     {
 	pTM->tmOverhang += pTM->tmHeight/3;
 	pTM->tmItalic = 1;
-    } else 
+    } else
 	pTM->tmItalic = pdf->dfItalic;
 
     pTM->tmWeight = pdf->dfWeight;
-    if( pfo->fo_flags & FO_SYNTH_BOLD ) 
+    if( pfo->fo_flags & FO_SYNTH_BOLD )
     {
-	pTM->tmOverhang++; 
+	pTM->tmOverhang++;
 	pTM->tmWeight += 100;
-    } 
+    }
 
     pTM->tmFirstChar = pdf->dfFirstChar;
     pTM->tmLastChar = pdf->dfLastChar;
@@ -652,19 +652,19 @@
 			? 1 : pdf->dfUnderline;
 
     pTM->tmOverhang = 0;
-    if( pfo->fo_flags & FO_SYNTH_ITALIC ) 
+    if( pfo->fo_flags & FO_SYNTH_ITALIC )
     {
 	pTM->tmOverhang += pTM->tmHeight/3;
 	pTM->tmItalic = 1;
-    } else 
+    } else
 	pTM->tmItalic = pdf->dfItalic;
 
     pTM->tmWeight = pdf->dfWeight;
-    if( pfo->fo_flags & FO_SYNTH_BOLD ) 
+    if( pfo->fo_flags & FO_SYNTH_BOLD )
     {
-	pTM->tmOverhang++; 
+	pTM->tmOverhang++;
 	pTM->tmWeight += 100;
-    } 
+    }
 
     pTM->tmFirstChar = pdf_ansi->dfFirstChar;
     pTM->tmLastChar = pdf_ansi->dfLastChar;
diff --git a/graphics/x11drv/dib.c b/graphics/x11drv/dib.c
index d362437..9d4e023 100644
--- a/graphics/x11drv/dib.c
+++ b/graphics/x11drv/dib.c
@@ -202,7 +202,7 @@
  * Build the color map from the bitmap palette. Should not be called
  * for a >8-bit deep bitmap.
  */
-int *X11DRV_DIB_BuildColorMap( X11DRV_PDEVICE *physDev, WORD coloruse, WORD depth, 
+int *X11DRV_DIB_BuildColorMap( X11DRV_PDEVICE *physDev, WORD coloruse, WORD depth,
                                const BITMAPINFO *info, int *nColors )
 {
     int colors;
@@ -232,7 +232,7 @@
     if (coloruse == (WORD)-1) colorPtr = NULL;
 
     if (!(colorMapping = (int *)HeapAlloc(GetProcessHeap(), 0,
-                                          colors * sizeof(int) ))) 
+                                          colors * sizeof(int) )))
 	return NULL;
 
     *nColors = colors;
@@ -289,7 +289,7 @@
  *         X11DRV_DIB_MaskToShift
  *
  * Helper for X11DRV_DIB_GetDIBits.
- * Returns the by how many bits to shift a given color so that it is 
+ * Returns the by how many bits to shift a given color so that it is
  * in the proper position.
  */
 static INT X11DRV_DIB_MaskToShift(DWORD mask)
@@ -310,10 +310,10 @@
 /***********************************************************************
  *           X11DRV_DIB_Convert_any_asis
  *
- * All X11DRV_DIB_Convert_Xxx functions take at least the following 
+ * All X11DRV_DIB_Convert_Xxx functions take at least the following
  * parameters:
  * - width
- *   This is the width in pixel of the surface to copy. This may be less 
+ *   This is the width in pixel of the surface to copy. This may be less
  *   than the full width of the image.
  * - height
  *   The number of lines to copy. This may be less than the full height
@@ -332,15 +332,15 @@
  *   Same as srclinebytes but for the destination.
  *
  * Notes:
- * - The supported Dib formats are: pal1, pal4, pal8, rgb555, bgr555, 
+ * - The supported Dib formats are: pal1, pal4, pal8, rgb555, bgr555,
  *   rgb565, bgr565, rgb888 and any 32bit (0888) format.
- *   The supported XImage (Bmp) formats are: pal1, pal4, pal8, 
+ *   The supported XImage (Bmp) formats are: pal1, pal4, pal8,
  *   rgb555, bgr555, rgb565, bgr565, rgb888, bgr888, rgb0888, bgr0888.
  * - Rgb formats are those for which the masks are such that:
  *   red_mask > green_mask > blue_mask
  * - Bgr formats are those for which the masks sort in the other direction.
  * - Many conversion functions handle both rgb->bgr and bgr->rgb conversions
- *   so the comments use h, g, l to mean respectively the source color in the 
+ *   so the comments use h, g, l to mean respectively the source color in the
  *   high bits, the green, and the source color in the low bits.
  */
 static void X11DRV_DIB_Convert_any_asis(int width, int height,
@@ -1373,12 +1373,12 @@
 
     /* Here is how we proceed. Assume we have rsrc=0x0000ff00 and our pixel
      * contains 0x11223344.
-     * - first we shift 0x11223344 right by rRightShift to bring the most 
+     * - first we shift 0x11223344 right by rRightShift to bring the most
      *   significant bits of the red components in the bottom 5 (or 6) bits
      *   -> 0x4488c
      * - then we remove non red bits by anding with the modified rdst (0x1f)
      *   -> 0x0c
-     * - finally shift these bits left by rLeftShift so that they end up in 
+     * - finally shift these bits left by rLeftShift so that they end up in
      *   the right place
      *   -> 0x3000
      */
@@ -1620,7 +1620,7 @@
  */
 static void X11DRV_DIB_GetImageBits_1( int lines, BYTE *dstbits,
 				       DWORD dstwidth, DWORD srcwidth,
-				       RGBQUAD *colors, PALETTEENTRY *srccolors, 
+				       RGBQUAD *colors, PALETTEENTRY *srccolors,
                                 XImage *bmpImage, DWORD linebytes )
 {
     DWORD x;
@@ -1992,7 +1992,7 @@
  */
 static void X11DRV_DIB_GetImageBits_4( int lines, BYTE *dstbits,
 				       DWORD srcwidth, DWORD dstwidth,
-				       RGBQUAD *colors, PALETTEENTRY *srccolors, 
+				       RGBQUAD *colors, PALETTEENTRY *srccolors,
 				       XImage *bmpImage, DWORD linebytes )
 {
     DWORD x;
@@ -2566,7 +2566,7 @@
  */
 static void X11DRV_DIB_GetImageBits_8( int lines, BYTE *dstbits,
 				       DWORD srcwidth, DWORD dstwidth,
-				       RGBQUAD *colors, PALETTEENTRY *srccolors, 
+				       RGBQUAD *colors, PALETTEENTRY *srccolors,
 				       XImage *bmpImage, DWORD linebytes )
 {
     DWORD x;
@@ -2580,11 +2580,11 @@
        linebytes = -linebytes;
     }
 
-    /* 
-     * Hack for now 
-     * This condition is true when GetImageBits has been called by 
-     * UpdateDIBSection. For now, GetNearestIndex is too slow to support 
-     * 256 colormaps, so we'll just use for for GetDIBits calls. 
+    /*
+     * Hack for now
+     * This condition is true when GetImageBits has been called by
+     * UpdateDIBSection. For now, GetNearestIndex is too slow to support
+     * 256 colormaps, so we'll just use for for GetDIBits calls.
      * (In somes cases, in a updateDIBSection, the returned colors are bad too)
      */
     if (!srccolors) goto updatesection;
@@ -2819,13 +2819,13 @@
  * SetDIBits for an 8-bit deep compressed DIB.
  *
  * This function rewritten 941113 by James Youngman.  WINE blew out when I
- * first ran it because my desktop wallpaper is a (large) RLE8 bitmap.  
+ * first ran it because my desktop wallpaper is a (large) RLE8 bitmap.
  *
- * This was because the algorithm assumed that all RLE8 bitmaps end with the  
+ * This was because the algorithm assumed that all RLE8 bitmaps end with the
  * 'End of bitmap' escape code.  This code is very much laxer in what it
- * allows to end the expansion.  Possibly too lax.  See the note by 
+ * allows to end the expansion.  Possibly too lax.  See the note by
  * case RleDelta.  BTW, MS's documentation implies that a correct RLE8
- * bitmap should end with RleEnd, but on the other hand, software exists 
+ * bitmap should end with RleEnd, but on the other hand, software exists
  * that produces ones that don't and Windows 3.1 doesn't complain a bit
  * about it.
  *
@@ -2857,25 +2857,25 @@
     {
         length = *pIn++;
 
-        /* 
+        /*
          * If the length byte is not zero (which is the escape value),
-         * We have a run of length pixels all the same colour.  The colour 
-         * index is stored next. 
+         * We have a run of length pixels all the same colour.  The colour
+         * index is stored next.
          *
          * If the length byte is zero, we need to read the next byte to
          * know what to do.			[JAY]
          */
         if (length != 0)
         {
-            /* 
-             * [Run-Length] Encoded mode 
+            /*
+             * [Run-Length] Encoded mode
              */
             int color = colors[*pIn++];
             while (length-- && x < dstwidth) XPutPixel(bmpImage, x++, y, color);
         }
         else
         {
-            /* 
+            /*
              * Escape codes (may be an absolute sequence though)
              */
             escape_code = (*pIn++);
@@ -3164,7 +3164,7 @@
 
             srcbits+=2*left;
 
-            /* We could split it into four separate cases to optimize 
+            /* We could split it into four separate cases to optimize
              * but it is probably not worth it.
              */
             for (h=lines-1; h>=0; h--) {
@@ -4518,7 +4518,7 @@
     case 4:
         if (descr->compression) {
 	    XGetSubImage( gdi_display, descr->drawable, descr->xDest, descr->yDest,
-			  descr->width, descr->height, AllPlanes, ZPixmap, 
+			  descr->width, descr->height, AllPlanes, ZPixmap,
 			  bmpImage, descr->xSrc, descr->ySrc );
 
 	    X11DRV_DIB_SetImageBits_RLE4( descr->lines, descr->bits,
@@ -4534,11 +4534,11 @@
     case 8:
         if (descr->compression) {
 	    XGetSubImage( gdi_display, descr->drawable, descr->xDest, descr->yDest,
-			  descr->width, descr->height, AllPlanes, ZPixmap, 
+			  descr->width, descr->height, AllPlanes, ZPixmap,
 			  bmpImage, descr->xSrc, descr->ySrc );
 	    X11DRV_DIB_SetImageBits_RLE8( descr->lines, descr->bits,
 					  descr->infoWidth, descr->width,
-					  descr->xSrc, (int *)(descr->colorMap), 
+					  descr->xSrc, (int *)(descr->colorMap),
 					  bmpImage );
 	} else
 	    X11DRV_DIB_SetImageBits_8( descr->lines, descr->bits,
@@ -4557,7 +4557,7 @@
     case 24:
 	X11DRV_DIB_SetImageBits_24( descr->lines, descr->bits,
 				    descr->infoWidth, descr->width,
-				    descr->xSrc, descr->physDev, 
+				    descr->xSrc, descr->physDev,
                                     descr->rMask, descr->gMask, descr->bMask,
 				    bmpImage, descr->dibpitch);
 	break;
@@ -4624,7 +4624,7 @@
     if (descr->useShm)
     {
         int saveRed, saveGreen, saveBlue;
- 
+
         TRACE("XShmGetImage(%p, %ld, %p, %d, %d, %ld)\n",
                             gdi_display, descr->drawable, bmpImage,
                             descr->xSrc, descr->ySrc, AllPlanes);
@@ -4632,12 +4632,12 @@
  	/* We must save and restore the bmpImage's masks in order
  	 * to preserve them across the call to XShmGetImage, which
  	 * decides to eleminate them since it doesn't happen to know
- 	 * what the format of the image is supposed to be, even though 
+ 	 * what the format of the image is supposed to be, even though
  	 * we do. */
         saveRed = bmpImage->red_mask;
         saveBlue= bmpImage->blue_mask;
         saveGreen = bmpImage->green_mask;
- 
+
         XShmGetImage( gdi_display, descr->drawable, bmpImage,
                       descr->xSrc, descr->ySrc, AllPlanes);
 
@@ -4654,7 +4654,7 @@
                       descr->width, lines, AllPlanes, ZPixmap,
                       bmpImage, descr->xDest, descr->yDest );
     }
- 
+
     TRACE("Dib: depth=%2d r=%lx g=%lx b=%lx\n",
           descr->infoBpp,descr->rMask,descr->gMask,descr->bMask);
     TRACE("Bmp: depth=%2d/%2d r=%lx g=%lx b=%lx\n",
@@ -4664,9 +4664,9 @@
     switch(descr->infoBpp)
     {
     case 1:
-          X11DRV_DIB_GetImageBits_1( descr->lines,(LPVOID)descr->bits, 
+          X11DRV_DIB_GetImageBits_1( descr->lines,(LPVOID)descr->bits,
 				     descr->infoWidth, descr->width,
-				     descr->colorMap, descr->palentry, 
+				     descr->colorMap, descr->palentry,
                                      bmpImage, descr->dibpitch );
        break;
 
@@ -4674,9 +4674,9 @@
        if (descr->compression)
 	   FIXME("Compression not yet supported!\n");
        else
-	   X11DRV_DIB_GetImageBits_4( descr->lines,(LPVOID)descr->bits, 
-				      descr->infoWidth, descr->width, 
-				      descr->colorMap, descr->palentry, 
+	   X11DRV_DIB_GetImageBits_4( descr->lines,(LPVOID)descr->bits,
+				      descr->infoWidth, descr->width,
+				      descr->colorMap, descr->palentry,
 				      bmpImage, descr->dibpitch );
        break;
 
@@ -4739,7 +4739,7 @@
     int height, tmpheight;
     DC *dc = physDev->dc;
 
-    if (DIB_GetBitmapInfo( &info->bmiHeader, &width, &height, 
+    if (DIB_GetBitmapInfo( &info->bmiHeader, &width, &height,
 			   &descr.infoBpp, &descr.compression ) == -1)
         return 0;
     tmpheight = height;
@@ -4761,7 +4761,7 @@
        case 1:
        case 4:
        case 8:
-               descr.colorMap = (RGBQUAD *)X11DRV_DIB_BuildColorMap( 
+               descr.colorMap = (RGBQUAD *)X11DRV_DIB_BuildColorMap(
                                             coloruse == DIB_PAL_COLORS ? physDev : NULL, coloruse,
                                             dc->bitsPerPixel, info, &descr.nColorMap );
                if (!descr.colorMap) return 0;
@@ -4794,7 +4794,7 @@
     descr.drawable  = physDev->drawable;
     descr.gc        = physDev->gc;
     descr.xSrc      = xSrc;
-    descr.ySrc      = tmpheight >= 0 ? lines-(ySrc-startscan)-cy+(oldcy-cy) 
+    descr.ySrc      = tmpheight >= 0 ? lines-(ySrc-startscan)-cy+(oldcy-cy)
                                      : ySrc - startscan;
     descr.xDest     = dc->DCOrgX + XLPTODP( dc, xDest );
     descr.yDest     = dc->DCOrgY + YLPTODP( dc, yDest ) +
@@ -4942,7 +4942,7 @@
       lines = 0;
       goto done;
   }
-  
+
   if (DIB_GetBitmapInfo( &info->bmiHeader, &descr.infoWidth, &descr.lines,
                         &descr.infoBpp, &descr.compression ) == -1)
   {
@@ -4985,7 +4985,7 @@
   descr.xDest     = 0;
   descr.yDest     = 0;
   descr.xSrc      = 0;
-  
+
   if (descr.lines > 0)
   {
      descr.ySrc = (descr.height-1) - (startscan + (lines-1));
@@ -5058,7 +5058,7 @@
 {
   X11DRV_DIBSECTION *dib = (X11DRV_DIBSECTION *) bmp->dib;
   X11DRV_DIB_IMAGEBITS_DESCR descr;
-  
+
   if (DIB_GetBitmapInfo( &dib->dibSection.dsBmih, &descr.infoWidth, &descr.lines,
 			 &descr.infoBpp, &descr.compression ) == -1)
     return;
@@ -5116,7 +5116,7 @@
     }
   else
     {
-      TRACE("Copying from DIB bits to Pixmap\n"); 
+      TRACE("Copying from DIB bits to Pixmap\n");
       X11DRV_DIB_SetImageBits( &descr );
     }
 }
@@ -5205,7 +5205,7 @@
 {
   BITMAPOBJ *bmp;
   INT state;
-  
+
   bmp = (BITMAPOBJ *)GDI_GetObjPtr( (HBITMAP)res, BITMAP_MAGIC );
   if (!bmp) return FALSE;
 
@@ -5635,7 +5635,7 @@
   X11DRV_DIBSECTION *dib = NULL;
   int *colorMap = NULL;
   int nColorMap;
-  
+
   /* Fill BITMAP32 structure with DIB data */
   BITMAPINFOHEADER *bi = &bmi->bmiHeader;
   INT effHeight, totalSize;
@@ -5645,7 +5645,7 @@
   TRACE("format (%ld,%ld), planes %d, bpp %d, size %ld, colors %ld (%s)\n",
 	bi->biWidth, bi->biHeight, bi->biPlanes, bi->biBitCount,
 	bi->biSizeImage, bi->biClrUsed, usage == DIB_PAL_COLORS? "PAL" : "RGB");
-  
+
   effHeight = bi->biHeight >= 0 ? bi->biHeight : -bi->biHeight;
   bm.bmType = 0;
   bm.bmWidth = bi->biWidth;
@@ -5655,12 +5655,12 @@
   bm.bmPlanes = bi->biPlanes;
   bm.bmBitsPixel = bi->biBitCount;
   bm.bmBits = NULL;
-  
+
   /* Get storage location for DIB bits.  Only use biSizeImage if it's valid and
      we're dealing with a compressed bitmap.  Otherwise, use width * height. */
   totalSize = bi->biSizeImage && bi->biCompression != BI_RGB
     ? bi->biSizeImage : bm.bmWidthBytes * effHeight;
-  
+
   if (section)
   {
       SYSTEM_INFO SystemInfo;
@@ -5671,7 +5671,7 @@
       mapOffset = offset - (offset % SystemInfo.dwAllocationGranularity);
       mapSize = totalSize + (offset - mapOffset);
       mapBits = MapViewOfFile( section,
-			       FILE_MAP_ALL_ACCESS, 
+			       FILE_MAP_ALL_ACCESS,
 			       0L,
 			       mapOffset,
 			       mapSize );
@@ -5681,10 +5681,10 @@
     bm.bmBits = (LPVOID) offset;
   else {
     offset = 0;
-    bm.bmBits = VirtualAlloc(NULL, totalSize, 
+    bm.bmBits = VirtualAlloc(NULL, totalSize,
 			     MEM_RESERVE|MEM_COMMIT, PAGE_READWRITE);
   }
-  
+
   /* Create Color Map */
   if (bm.bmBits && bm.bmBitsPixel <= 8)
       colorMap = X11DRV_DIB_BuildColorMap( usage == DIB_PAL_COLORS? physDev : NULL,
@@ -5722,14 +5722,14 @@
        }
       dib->dibSection.dshSection = section;
       dib->dibSection.dsOffset = offset;
-      
+
       dib->status    = DIB_Status_None;
       dib->nColorMap = nColorMap;
       dib->colorMap  = colorMap;
     }
-  
+
   /* Create Device Dependent Bitmap and add DIB pointer */
-  if (dib) 
+  if (dib)
     {
       res = CreateDIBitmap(physDev->hdc, bi, 0, NULL, bmi, usage);
       if (res)
@@ -5738,7 +5738,7 @@
 	  if (bmp) bmp->dib = (DIBSECTION *) dib;
 	}
     }
-  
+
   /* Create XImage */
   if (dib && bmp)
   {
@@ -5756,7 +5756,7 @@
       dib->image = X11DRV_DIB_CreateXImage( bm.bmWidth, effHeight, bmp->bitmap.bmBitsPixel );
 #endif
   }
-  
+
   /* Clean up in case of errors */
   if (!res || !bmp || !dib || !bm.bmBits || (bm.bmBitsPixel <= 8 && !colorMap))
     {
@@ -5769,7 +5769,7 @@
 	  else if (!offset)
 	    VirtualFree(bm.bmBits, 0L, MEM_RELEASE), bm.bmBits = NULL;
         }
-      
+
       if (dib && dib->image) { XDestroyImage(dib->image); dib->image = NULL; }
       if (colorMap) { HeapFree(GetProcessHeap(), 0, colorMap); colorMap = NULL; }
       if (dib) { HeapFree(GetProcessHeap(), 0, dib); dib = NULL; }
@@ -5800,7 +5800,7 @@
 {
   X11DRV_DIBSECTION *dib = (X11DRV_DIBSECTION *) bmp->dib;
 
-  if (dib->image) 
+  if (dib->image)
   {
 #ifdef HAVE_LIBXXSHM
       if (dib->shminfo.shmid != -1)
@@ -5814,7 +5814,7 @@
 #endif
           XDestroyImage( dib->image );
   }
-  
+
   if (dib->colorMap)
     HeapFree(GetProcessHeap(), 0, dib->colorMap);
 
@@ -5842,7 +5842,7 @@
          * of the bitmap object.
          */
         X11DRV_DIB_Lock(bmp, DIB_Status_AppMod, FALSE);
-        X11DRV_DIB_GenColorMap( physDev, dib->colorMap, DIB_RGB_COLORS, 
+        X11DRV_DIB_GenColorMap( physDev, dib->colorMap, DIB_RGB_COLORS,
                                 dib->dibSection.dsBm.bmBitsPixel,
                                 TRUE, colors, start, end );
         X11DRV_DIB_Unlock(bmp, TRUE);
@@ -5907,7 +5907,7 @@
      * an optional color palette and the pixel data.
      */
     hPackedDIB = DIB_CreateDIBFromBitmap(hdc, hBmp);
-    
+
     /* Get a pointer to the BITMAPOBJ structure */
     pBmp = (BITMAPOBJ *)GDI_GetObjPtr( hBmp, BITMAP_MAGIC );
 
@@ -5921,8 +5921,8 @@
         pBmp->funcs = NULL;
     }
     GDI_ReleaseObj( hBmp );
-    DeleteObject(hBmp);  
-    
+    DeleteObject(hBmp);
+
 END:
     TRACE("\tReturning packed DIB %x\n", hPackedDIB);
     return hPackedDIB;
@@ -5943,16 +5943,16 @@
     LPBITMAPINFO pbmi = NULL;
     LPBITMAPINFOHEADER pbmiHeader = NULL;
     LPBYTE pbits = NULL;
-    
+
     /* Get a pointer to the packed DIB's data  */
     pPackedDIB = (LPBYTE)GlobalLock(hPackedDIB);
     pbmiHeader = (LPBITMAPINFOHEADER)pPackedDIB;
     pbmi = (LPBITMAPINFO)pPackedDIB;
     pbits = (LPBYTE)(pPackedDIB
                      + DIB_BitmapInfoSize( (LPBITMAPINFO)pbmiHeader, DIB_RGB_COLORS ));
-    
+
     /* Create a DDB from the DIB */
-     
+
     hBmp = CreateDIBitmap(hdc,
                           pbmiHeader,
                           CBM_INIT,
@@ -5965,7 +5965,7 @@
     TRACE("CreateDIBitmap returned %x\n", hBmp);
 
     /* Retrieve the internal Pixmap from the DDB */
-     
+
     pBmp = (BITMAPOBJ *) GDI_GetObjPtr( hBmp, BITMAP_MAGIC );
 
     pixmap = (Pixmap)pBmp->physBitmap;
@@ -5976,7 +5976,7 @@
     /* Delete the DDB we created earlier now that we have stolen its pixmap */
     GDI_ReleaseObj( hBmp );
     DeleteObject(hBmp);
-    
+
     TRACE("\tReturning Pixmap %ld\n", pixmap);
     return pixmap;
 }
diff --git a/graphics/x11drv/graphics.c b/graphics/x11drv/graphics.c
index 7ea2e13..2f20249 100644
--- a/graphics/x11drv/graphics.c
+++ b/graphics/x11drv/graphics.c
@@ -286,7 +286,7 @@
 		   GCFunction | GCForeground | GCBackground | GCFillStyle |
 		   GCFont, &val );
 	return TRUE;
-    } 
+    }
     WARN("Physical font failure\n" );
     return FALSE;
 }
@@ -319,7 +319,7 @@
 		  dc->DCOrgY + end.y);
 
 	/* Update the DIBSection from the pixmap */
-	X11DRV_UnlockDIBSection(physDev, TRUE); 
+	X11DRV_UnlockDIBSection(physDev, TRUE);
     }
     return TRUE;
 }
@@ -361,8 +361,8 @@
 
     if( dc->ArcDirection == AD_CLOCKWISE )
         { INT tmp = xstart; xstart = xend; xend = tmp;
-	  tmp = ystart; ystart = yend; yend = tmp; } 
-	
+	  tmp = ystart; ystart = yend; yend = tmp; }
+
     oldwidth = width = physDev->pen.width;
     oldendcap = physDev->pen.endcap;
     if (!width) width = 1;
@@ -434,13 +434,13 @@
                     cos(end_angle) * (right-left-width*2+2) / 2. + 0.5);
             points[1].y = (int) floor(dc->DCOrgY + (top+bottom)/2.0 -
                     sin(end_angle) * (bottom-top-width*2+2) / 2. + 0.5);
-                    
-            /* OK, this stuff is optimized for Xfree86 
+
+            /* OK, this stuff is optimized for Xfree86
              * which is probably the server most used by
-             * wine users. Other X servers will not 
+             * wine users. Other X servers will not
              * display correctly. (eXceed for instance)
              * so if you feel you must make changes, make sure that
-             * you either use Xfree86 or separate your changes 
+             * you either use Xfree86 or separate your changes
              * from these (compile switch or whatever)
              */
             if (lines == 2) {
@@ -465,7 +465,7 @@
                 dy1=points[3].y-points[2].y;
                 if(((top-bottom) | -2 ) == -2)
                     if(dy1 < 0) points[2].y--;
-                if( dx1<0){ 
+                if( dx1<0){
                     if( dy1>0) points[3].y--;
                     if(((right-left) | -2) == -2 ) points[2].x--;
                 }else {
@@ -542,7 +542,7 @@
 
     if (right < left) { INT tmp = right; right = left; left = tmp; }
     if (bottom < top) { INT tmp = bottom; bottom = top; top = tmp; }
-    
+
     oldwidth = width = physDev->pen.width;
     if (!width) width = 1;
     if(physDev->pen.style == PS_NULL) width = 0;
@@ -579,7 +579,7 @@
 
     /* Update the DIBSection from the pixmap */
     X11DRV_UnlockDIBSection(physDev, update);
-    
+
     physDev->pen.width = oldwidth;
     return TRUE;
 }
@@ -595,7 +595,7 @@
     DC *dc = physDev->dc;
     BOOL update = FALSE;
 
-    TRACE("(%d %d %d %d)\n", 
+    TRACE("(%d %d %d %d)\n",
     	left, top, right, bottom);
 
     left   = INTERNAL_XWPTODP( dc, left, top );
@@ -629,7 +629,7 @@
 
     /* Update the pixmap from the DIB section */
     X11DRV_LockDIBSection(physDev, DIB_Status_GdiMod, FALSE);
-    
+
     if ((right > left + width) && (bottom > top + width))
         if (X11DRV_SetupGCForBrush( physDev ))
 	{
@@ -649,7 +649,7 @@
 
     /* Update the DIBSection from the pixmap */
     X11DRV_UnlockDIBSection(physDev, update);
-   
+
     physDev->pen.width = oldwidth;
     physDev->pen.linejoin = oldjoinstyle;
     return TRUE;
@@ -666,7 +666,7 @@
     DC *dc = physDev->dc;
     BOOL update = FALSE;
 
-    TRACE("(%d %d %d %d  %d %d\n", 
+    TRACE("(%d %d %d %d  %d %d\n",
     	left, top, right, bottom, ell_width, ell_height);
 
     left   = XLPTODP( dc, left );
@@ -868,7 +868,7 @@
 {
     Pixel pixel;
     DC *dc = physDev->dc;
-    
+
     x = dc->DCOrgX + INTERNAL_XWPTODP( dc, x, y );
     y = dc->DCOrgY + INTERNAL_YWPTODP( dc, x, y );
     pixel = X11DRV_PALETTE_ToPhysical( physDev, color );
@@ -993,7 +993,7 @@
     {
 	/* Update the pixmap from the DIB section */
 	X11DRV_LockDIBSection(physDev, DIB_Status_GdiMod, FALSE);
- 
+
         TSXDrawLines( gdi_display, physDev->drawable, physDev->gc,
                       points, count, CoordModeOrigin );
 
@@ -1032,7 +1032,7 @@
 
     /* Update the pixmap from the DIB section */
     X11DRV_LockDIBSection(physDev, DIB_Status_GdiMod, FALSE);
- 
+
     if (X11DRV_SetupGCForBrush( physDev ))
     {
         TSXFillPolygon( gdi_display, physDev->drawable, physDev->gc,
@@ -1045,7 +1045,7 @@
                       points, count+1, CoordModeOrigin );
 	update = TRUE;
     }
-   
+
     /* Update the DIBSection from the pixmap */
     X11DRV_UnlockDIBSection(physDev, update);
 
@@ -1057,7 +1057,7 @@
 /**********************************************************************
  *          X11DRV_PolyPolygon
  */
-BOOL 
+BOOL
 X11DRV_PolyPolygon( X11DRV_PDEVICE *physDev, const POINT* pt, const INT* counts, UINT polygons)
 {
     HRGN hrgn;
@@ -1079,7 +1079,7 @@
 
 	/* Update the pixmap from the DIB section */
 	X11DRV_LockDIBSection(physDev, DIB_Status_GdiMod, FALSE);
- 
+
 	for (i = 0; i < polygons; i++) if (counts[i] > max) max = counts[i];
         if (!(points = HeapAlloc( GetProcessHeap(), 0, sizeof(XPoint) * (max+1) )))
         {
@@ -1098,7 +1098,7 @@
             TSXDrawLines( gdi_display, physDev->drawable, physDev->gc,
                           points, j + 1, CoordModeOrigin );
 	}
-	
+
 	/* Update the DIBSection of the dc's bitmap */
 	X11DRV_UnlockDIBSection(physDev, TRUE);
 
@@ -1111,11 +1111,11 @@
 /**********************************************************************
  *          X11DRV_PolyPolyline
  */
-BOOL 
+BOOL
 X11DRV_PolyPolyline( X11DRV_PDEVICE *physDev, const POINT* pt, const DWORD* counts, DWORD polylines )
 {
     DC *dc = physDev->dc;
-    
+
     if (X11DRV_SetupGCForPen ( physDev ))
     {
         int i, j, max = 0;
@@ -1123,7 +1123,7 @@
 
 	/* Update the pixmap from the DIB section */
     	X11DRV_LockDIBSection(physDev, DIB_Status_GdiMod, FALSE);
- 
+
         for (i = 0; i < polylines; i++) if (counts[i] > max) max = counts[i];
         if (!(points = HeapAlloc( GetProcessHeap(), 0, sizeof(XPoint) * max )))
         {
@@ -1141,7 +1141,7 @@
             TSXDrawLines( gdi_display, physDev->drawable, physDev->gc,
 			  points, j, CoordModeOrigin );
         }
-	
+
 	/* Update the DIBSection of the dc's bitmap */
     	X11DRV_UnlockDIBSection(physDev, TRUE);
 
@@ -1216,7 +1216,7 @@
                                      xOrg, yOrg, pixel, fillType );
         }
     }
-#undef TO_FLOOD    
+#undef TO_FLOOD
 }
 
 
diff --git a/graphics/x11drv/init.c b/graphics/x11drv/init.c
index 72b5762..7205b2a 100644
--- a/graphics/x11drv/init.c
+++ b/graphics/x11drv/init.c
@@ -223,7 +223,7 @@
     case CAPS1:
         FIXME("(%04x): CAPS1 is unimplemented, will return 0\n", physDev->hdc );
         /* please see wingdi.h for the possible bit-flag values that need
-           to be returned. also, see 
+           to be returned. also, see
            http://msdn.microsoft.com/library/ddkdoc/win95ddk/graphcnt_1m0p.htm */
         return 0;
     case SIZEPALETTE:
diff --git a/graphics/x11drv/opengl.c b/graphics/x11drv/opengl.c
index 223637e..7b83789 100644
--- a/graphics/x11drv/opengl.c
+++ b/graphics/x11drv/opengl.c
@@ -1,4 +1,4 @@
-/* 
+/*
  * X11DRV OpenGL functions
  *
  * Copyright 2000 Lionel Ulmer
@@ -56,21 +56,21 @@
   TEST_AND_DUMP(ppfd->dwFlags, PFD_SWAP_LAYER_BUFFERS);
 #undef TEST_AND_DUMP
   DPRINTF("\n");
-  
+
   DPRINTF("  - iPixelType : ");
   switch (ppfd->iPixelType) {
   case PFD_TYPE_RGBA: DPRINTF("PFD_TYPE_RGBA"); break;
   case PFD_TYPE_COLORINDEX: DPRINTF("PFD_TYPE_COLORINDEX"); break;
   }
   DPRINTF("\n");
-  
+
   DPRINTF("  - Color   : %d\n", ppfd->cColorBits);
   DPRINTF("  - Alpha   : %d\n", ppfd->cAlphaBits);
   DPRINTF("  - Accum   : %d\n", ppfd->cAccumBits);
   DPRINTF("  - Depth   : %d\n", ppfd->cDepthBits);
   DPRINTF("  - Stencil : %d\n", ppfd->cStencilBits);
   DPRINTF("  - Aux     : %d\n", ppfd->cAuxBuffers);
-  
+
   DPRINTF("  - iLayerType : ");
   switch (ppfd->iLayerType) {
   case PFD_MAIN_PLANE: DPRINTF("PFD_MAIN_PLANE"); break;
@@ -79,7 +79,7 @@
   }
   DPRINTF("\n");
 }
-     
+
 /* X11DRV_ChoosePixelFormat
 
      Equivalent of glXChooseVisual
@@ -90,15 +90,15 @@
 #define TEST_AND_ADD2(t,a,b) if (t) { att_list[att_pos++] = a; att_list[att_pos++] = b; }
 #define NULL_TEST_AND_ADD2(tv,a,b) att_list[att_pos++] = a; att_list[att_pos++] = ((tv) == 0 ? 0 : b)
 #define ADD2(a,b) att_list[att_pos++] = a; att_list[att_pos++] = b
-  
+
   int att_list[64];
   int att_pos = 0;
   XVisualInfo *vis;
   int i;
-  
+
   if (TRACE_ON(opengl)) {
     TRACE("(%p,%p)\n", physDev, ppfd);
-    
+
     dump_PIXELFORMATDESCRIPTOR((PIXELFORMATDESCRIPTOR *) ppfd);
   }
 
@@ -116,13 +116,13 @@
 
   NULL_TEST_AND_ADD2(ppfd->cDepthBits, GLX_DEPTH_SIZE, 8);
   /* These flags are not supported yet...
-     
+
      NULL_TEST_AND_ADD2(ppfd->cAlphaBits, GLX_ALPHA_SIZE, 8);
      ADD2(GLX_ACCUM_SIZE, ppfd->cAccumBits); */
   ADD2(GLX_STENCIL_SIZE, ppfd->cStencilBits); /* now suported */
   /*   ADD2(GLX_AUX_BUFFERS, ppfd->cAuxBuffers); */
   att_list[att_pos] = None;
-  
+
   ENTER_GL(); {
     /*
        This command cannot be used as we need to use the default visual...
@@ -139,7 +139,7 @@
     TRACE("Found visual : %p - returns %d\n", vis, physDev->used_visuals + 1);
   }
   LEAVE_GL();
-  
+
   if (vis == NULL) {
     ERR("No visual found !\n");
     /* Should SetError here... */
@@ -159,7 +159,7 @@
     return 0;
   }
   physDev->visuals[physDev->used_visuals++] = vis;
-  
+
   return physDev->used_visuals;
 }
 
@@ -174,14 +174,14 @@
   XVisualInfo *vis;
   int value;
   int rb,gb,bb,ab;
-  
+
   TRACE("(%p,%d,%d,%p)\n", physDev, iPixelFormat, nBytes, ppfd);
 
   if (ppfd == NULL) {
     /* The application is only querying the number of visuals */
     return MAX_PIXELFORMATS;
   }
-  
+
   if (nBytes < sizeof(PIXELFORMATDESCRIPTOR)) {
     ERR("Wrong structure size !\n");
     /* Should set error */
@@ -194,7 +194,7 @@
     /* Should set error */
     return 0;
   }
-      
+
   if (iPixelFormat == physDev->used_visuals + 1) {
     int dblBuf[]={GLX_RGBA,GLX_DEPTH_SIZE,16,GLX_DOUBLEBUFFER,None};
 
@@ -202,7 +202,7 @@
     ENTER_GL();
     vis = glXChooseVisual(gdi_display, DefaultScreen(gdi_display), dblBuf);
     LEAVE_GL();
-    
+
     WARN("Uninitialized Visual. Creating standard (%p) !\n", vis);
 
     if (vis == NULL) {
@@ -210,7 +210,7 @@
       /* Should set error */
       return 0;
     }
-    
+
     physDev->visuals[physDev->used_visuals++] = vis;
   }
   vis = physDev->visuals[iPixelFormat - 1];
@@ -218,7 +218,7 @@
   memset(ppfd, 0, sizeof(PIXELFORMATDESCRIPTOR));
   ppfd->nSize = sizeof(PIXELFORMATDESCRIPTOR);
   ppfd->nVersion = 1;
-  
+
   /* These flags are always the same... */
   ppfd->dwFlags = PFD_DRAW_TO_WINDOW | PFD_SUPPORT_OPENGL | PFD_GENERIC_ACCELERATED;
   /* Now the flags extraced from the Visual */
@@ -263,7 +263,7 @@
     ppfd->cAlphaShift = 0;
   }
   /* Accums : to do ... */
-  
+
   /* Depth bits */
   glXGetConfig(gdi_display, vis, GLX_DEPTH_SIZE, &value);
   ppfd->cDepthBits = value;
@@ -271,17 +271,17 @@
   /* stencil bits */
   glXGetConfig( gdi_display, vis, GLX_STENCIL_SIZE, &value );
   ppfd->cStencilBits = value;
-  
+
   LEAVE_GL();
 
   /* Aux : to do ... */
 
   ppfd->iLayerType = PFD_MAIN_PLANE;
-  
+
   if (TRACE_ON(opengl)) {
     dump_PIXELFORMATDESCRIPTOR(ppfd);
   }
-  
+
   return MAX_PIXELFORMATS;
 }
 
@@ -305,7 +305,7 @@
   TRACE("(%p,%d,%p)\n", physDev, iPixelFormat, ppfd);
 
   physDev->current_pf = iPixelFormat;
-  
+
   return TRUE;
 }
 
@@ -319,7 +319,7 @@
   ENTER_GL();
   glXSwapBuffers(gdi_display, physDev->drawable);
   LEAVE_GL();
-  
+
   return TRUE;
 }
 
@@ -337,13 +337,13 @@
 			       UINT nBytes,
 			       PIXELFORMATDESCRIPTOR *ppfd) {
   ERR("No OpenGL support compiled in.\n");
-  
+
   return 0;
 }
 
 int X11DRV_GetPixelFormat(X11DRV_PDEVICE *physDev) {
   ERR("No OpenGL support compiled in.\n");
-  
+
   return 0;
 }
 
@@ -351,13 +351,13 @@
 			   int iPixelFormat,
 			   const PIXELFORMATDESCRIPTOR *ppfd) {
   ERR("No OpenGL support compiled in.\n");
-  
+
   return FALSE;
 }
 
 BOOL X11DRV_SwapBuffers(X11DRV_PDEVICE *physDev) {
   ERR("No OpenGL support compiled in.\n");
-  
+
   return FALSE;
 }
 
diff --git a/graphics/x11drv/palette.c b/graphics/x11drv/palette.c
index 18508d5..70ff116 100644
--- a/graphics/x11drv/palette.c
+++ b/graphics/x11drv/palette.c
@@ -1,4 +1,4 @@
-/* 
+/*
  * X11DRV OEM bitmap objects
  *
  * Copyright 1994, 1995 Alexandre Julliard
@@ -37,15 +37,15 @@
 
 /* Palette indexed mode:
  *	logical palette -> mapping -> pixel
- *				     
  *
- * Windows needs contiguous color space ( from 0 to n ) but 
+ *
+ * Windows needs contiguous color space ( from 0 to n ) but
  * it is possible only with the private colormap. Otherwise we
- * have to map DC palette indices to real pixel values. With 
+ * have to map DC palette indices to real pixel values. With
  * private colormaps it boils down to the identity mapping. The
- * other special case is when we have a fixed color visual with 
- * the screendepth > 8 - we abandon palette mappings altogether 
- * because pixel values can be calculated without X server 
+ * other special case is when we have a fixed color visual with
+ * the screendepth > 8 - we abandon palette mappings altogether
+ * because pixel values can be calculated without X server
  * assistance.
  *
  * Windows palette manager is described in the
@@ -81,7 +81,7 @@
 static int palette_size;
 
 /* First free dynamic color cell, 0 = full palette, -1 = fixed palette */
-static int           X11DRV_PALETTE_firstFree = 0; 
+static int           X11DRV_PALETTE_firstFree = 0;
 static unsigned char X11DRV_PALETTE_freeList[256];
 
 /**********************************************************************/
@@ -232,7 +232,7 @@
 
     X11DRV_PALETTE_FillDefaultColors();
 
-    if( X11DRV_PALETTE_PaletteFlags & X11DRV_PALETTE_VIRTUAL ) 
+    if( X11DRV_PALETTE_PaletteFlags & X11DRV_PALETTE_VIRTUAL )
         palette_size = 0;
     else
         palette_size = visual->map_entries;
@@ -248,8 +248,8 @@
 void X11DRV_PALETTE_Cleanup(void)
 {
   if( COLOR_gapFilled )
-    TSXFreeColors(gdi_display, X11DRV_PALETTE_PaletteXColormap, 
-		  (unsigned long*)(X11DRV_PALETTE_PaletteToXPixel + COLOR_gapStart), 
+    TSXFreeColors(gdi_display, X11DRV_PALETTE_PaletteXColormap,
+		  (unsigned long*)(X11DRV_PALETTE_PaletteToXPixel + COLOR_gapStart),
 		  COLOR_gapFilled, 0);
 }
 
@@ -309,7 +309,7 @@
     /* Private colormap - identity mapping */
 
     XColor color;
-    int i; 
+    int i;
 
     if((COLOR_sysPal = (PALETTEENTRY*)HeapAlloc(GetProcessHeap(), 0, sizeof(PALETTEENTRY)*palette_size)) == NULL) {
         WARN("Can not allocate system palette\n");
@@ -318,7 +318,7 @@
 
     TRACE("Building private map - %i palette entries\n", palette_size);
 
-      /* Allocate system palette colors */ 
+      /* Allocate system palette colors */
 
     for( i=0; i < palette_size; i++ )
     {
@@ -393,11 +393,11 @@
 	count = sizeof(buffer);
 	if(!RegQueryValueExA(hkey, "AllocSystemColors", 0, &type, buffer, &count))
 	    COLOR_max = atoi(buffer);
-		
+
 	RegCloseKey(hkey);
    }
 
-   /* Copy the first bunch of colors out of the default colormap to prevent 
+   /* Copy the first bunch of colors out of the default colormap to prevent
     * colormap flashing as much as possible.  We're likely to get the most
     * important Window Manager colors, etc in the first 128 colors */
    defaultCM = DefaultColormap( gdi_display, DefaultScreen(gdi_display) );
@@ -407,7 +407,7 @@
    TSXQueryColors(gdi_display, defaultCM, &defaultColors[0], defaultCM_max_copy);
    for (i = 0; i < defaultCM_max_copy; i++)
        TSXAllocColor( gdi_display, X11DRV_PALETTE_PaletteXColormap, &defaultColors[i] );
-              
+
    if (COLOR_max > 256) COLOR_max = 256;
    else if (COLOR_max < 20) COLOR_max = 20;
    TRACE("%d colors configured.\n", COLOR_max);
@@ -417,17 +417,17 @@
    /* Be nice and allocate system colors as read-only */
 
    for( i = 0; i < NB_RESERVED_COLORS; i++ )
-     { 
+     {
         color.red   = COLOR_sysPalTemplate[i].peRed * 65535 / 255;
         color.green = COLOR_sysPalTemplate[i].peGreen * 65535 / 255;
         color.blue  = COLOR_sysPalTemplate[i].peBlue * 65535 / 255;
         color.flags = DoRed | DoGreen | DoBlue;
 
         if (!TSXAllocColor( gdi_display, X11DRV_PALETTE_PaletteXColormap, &color ))
-        { 
+        {
 	     XColor	best, c;
-	     
-             if( !warn++ ) 
+
+             if( !warn++ )
 	     {
 		  WARN("Not enough colors for the full system palette.\n");
 
@@ -435,7 +435,7 @@
 	          wp = WhitePixel(gdi_display, DefaultScreen(gdi_display));
 
 	          max = (0xffffffff)>>(32 - screen_depth);
-	          if( max > 256 ) 
+	          if( max > 256 )
 	          {
 	  	      step = max/256;
 		      max = 256;
@@ -453,8 +453,8 @@
 	     for( c.pixel = 0, diff = 0x7fffffff; c.pixel < max; c.pixel += step )
 	     {
 		TSXQueryColor(gdi_display, X11DRV_PALETTE_PaletteXColormap, &c);
-		r = (c.red - color.red)>>8; 
-		g = (c.green - color.green)>>8; 
+		r = (c.red - color.red)>>8;
+		g = (c.green - color.green)>>8;
 		b = (c.blue - color.blue)>>8;
 		r = r*r + g*g + b*b;
 		if( r < diff ) { best = c; diff = r; }
@@ -480,13 +480,13 @@
 
    /* now allocate changeable set */
 
-   if( !(X11DRV_PALETTE_PaletteFlags & X11DRV_PALETTE_FIXED) )  
+   if( !(X11DRV_PALETTE_PaletteFlags & X11DRV_PALETTE_FIXED) )
      {
 	int c_min = 0, c_max = palette_size, c_val;
 
 	TRACE("Dynamic colormap... \n");
 
-	/* let's become the first client that actually follows 
+	/* let's become the first client that actually follows
 	 * X guidelines and does binary search...
 	 */
 
@@ -512,7 +512,7 @@
                }
           }
 
-	if( c_min > COLOR_max - NB_RESERVED_COLORS) 
+	if( c_min > COLOR_max - NB_RESERVED_COLORS)
 	    c_min = COLOR_max - NB_RESERVED_COLORS;
 
 	c_min = (c_min/2) + (c_min/2);		/* need even set for split palette */
@@ -531,10 +531,10 @@
 
 	TRACE("adjusted size %i colorcells\n", palette_size);
      }
-   else if( X11DRV_PALETTE_PaletteFlags & X11DRV_PALETTE_VIRTUAL ) 
+   else if( X11DRV_PALETTE_PaletteFlags & X11DRV_PALETTE_VIRTUAL )
 	{
-          /* virtual colorspace - ToPhysical takes care of 
-           * color translations but we have to allocate full palette 
+          /* virtual colorspace - ToPhysical takes care of
+           * color translations but we have to allocate full palette
 	   * to maintain compatibility
 	   */
 	  palette_size = 256;
@@ -553,8 +553,8 @@
    else
      { COLOR_gapStart = palette_size/2; COLOR_gapEnd = 255 - palette_size/2; }
 
-   X11DRV_PALETTE_firstFree = ( palette_size > NB_RESERVED_COLORS && 
-		      (X11DRV_PALETTE_PaletteFlags & X11DRV_PALETTE_VIRTUAL || !(X11DRV_PALETTE_PaletteFlags & X11DRV_PALETTE_FIXED)) ) 
+   X11DRV_PALETTE_firstFree = ( palette_size > NB_RESERVED_COLORS &&
+		      (X11DRV_PALETTE_PaletteFlags & X11DRV_PALETTE_VIRTUAL || !(X11DRV_PALETTE_PaletteFlags & X11DRV_PALETTE_FIXED)) )
 		     ? NB_RESERVED_COLORS/2 : -1;
 
    COLOR_sysPal = (PALETTEENTRY*)HeapAlloc(GetProcessHeap(),0,sizeof(PALETTEENTRY)*256);
@@ -577,7 +577,7 @@
    }
 
    /* for hicolor visuals PaletteToPixel mapping is used to skip
-    * RGB->pixel calculation in X11DRV_PALETTE_ToPhysical(). 
+    * RGB->pixel calculation in X11DRV_PALETTE_ToPhysical().
     */
 
    X11DRV_PALETTE_PaletteToXPixel = (int*)HeapAlloc(GetProcessHeap(),0,sizeof(int)*256);
@@ -588,7 +588,7 @@
 
    for( i = j = 0; i < 256; i++ )
    {
-      if( i >= COLOR_gapStart && i <= COLOR_gapEnd ) 
+      if( i >= COLOR_gapStart && i <= COLOR_gapEnd )
       {
          X11DRV_PALETTE_PaletteToXPixel[i] = NB_PALETTE_EMPTY_VALUE;
          COLOR_sysPal[i].peFlags = 0;	/* mark as unused */
@@ -602,7 +602,7 @@
       }
       else if( i >= 256 - NB_RESERVED_COLORS/2 )
       {
-        X11DRV_PALETTE_PaletteToXPixel[i] = sysPixel[(i + NB_RESERVED_COLORS) - 256]; 
+        X11DRV_PALETTE_PaletteToXPixel[i] = sysPixel[(i + NB_RESERVED_COLORS) - 256];
         COLOR_sysPal[i] = COLOR_sysPalTemplate[(i + NB_RESERVED_COLORS) - 256];
       }
       else if( pixDynMapping )
@@ -626,13 +626,13 @@
  */
 static void X11DRV_PALETTE_FillDefaultColors(void)
 {
- /* initialize unused entries to what Windows uses as a color 
-  * cube - based on Greg Kreider's code. 
+ /* initialize unused entries to what Windows uses as a color
+  * cube - based on Greg Kreider's code.
   */
 
   int i = 0, idx = 0;
   int red, no_r, inc_r;
-  int green, no_g, inc_g; 
+  int green, no_g, inc_g;
   int blue, no_b, inc_b;
 
   if (palette_size <= NB_RESERVED_COLORS)
@@ -659,7 +659,7 @@
          COLOR_sysPal[idx].peRed = red;
          COLOR_sysPal[idx].peGreen = green;
          COLOR_sysPal[idx].peBlue = blue;
-         
+
 	 /* set X color */
 
 	 if( X11DRV_PALETTE_PaletteFlags & X11DRV_PALETTE_VIRTUAL )
@@ -711,7 +711,7 @@
 	     if( --max <= 0 ) break;
 	  }
 	}
-    COLOR_gapFilled = idx - COLOR_gapStart;    
+    COLOR_gapFilled = idx - COLOR_gapStart;
   }
 }
 
@@ -779,7 +779,7 @@
 
     if ((screen_depth <= 8) && (pixel < 256) &&
         !(X11DRV_PALETTE_PaletteFlags & (X11DRV_PALETTE_VIRTUAL | X11DRV_PALETTE_FIXED)) ) {
-         return  ( *(COLORREF*)(COLOR_sysPal + 
+         return  ( *(COLORREF*)(COLOR_sysPal +
 		   ((X11DRV_PALETTE_XPixelToPalette)?X11DRV_PALETTE_XPixelToPalette[pixel]:pixel)) ) & 0x00ffffff;
     }
 
@@ -807,7 +807,7 @@
     if ( X11DRV_PALETTE_PaletteFlags & X11DRV_PALETTE_FIXED )
     {
         /* there is no colormap limitation; we are going to have to compute
-         * the pixel value from the visual information stored earlier 
+         * the pixel value from the visual information stored earlier
 	 */
 
 	unsigned 	long red, green, blue;
@@ -824,7 +824,7 @@
                 return 0;
             }
 
-            if( palPtr->mapping ) 
+            if( palPtr->mapping )
 	    {
                 int ret = palPtr->mapping[idx];
 		GDI_ReleaseObj( hPal );
@@ -878,10 +878,10 @@
             return (red << X11DRV_PALETTE_PRed.shift) | (green << X11DRV_PALETTE_PGreen.shift) | (blue << X11DRV_PALETTE_PBlue.shift);
         }
     }
-    else 
+    else
     {
 
-	if( !palPtr->mapping ) 
+	if( !palPtr->mapping )
             WARN("Palette %04x is not realized\n", dc->hPalette);
 
 	switch(spec_type)	/* we have to peruse DC and system palette */
@@ -898,7 +898,7 @@
 			    ((color >> 8) & 0xff) + (color & 0xff) > 255*3/2) ? 1 : 0;
 		}
 
-	    	index = COLOR_PaletteLookupPixel( COLOR_sysPal, 256, 
+	    	index = COLOR_PaletteLookupPixel( COLOR_sysPal, 256,
 						  X11DRV_PALETTE_PaletteToXPixel, color, FALSE);
 
 		/* TRACE(palette,"RGB(%lx) -> pixel %i\n", color, index);
@@ -908,14 +908,14 @@
 		index = color & 0xffff;
 
 	        if( index >= palPtr->logpalette.palNumEntries )
-		    WARN("RGB(%lx) : index %i is out of bounds\n", color, index); 
+		    WARN("RGB(%lx) : index %i is out of bounds\n", color, index);
 		else if( palPtr->mapping ) index = palPtr->mapping[index];
 
 		/*  TRACE(palette,"PALETTEINDEX(%04x) -> pixel %i\n", (WORD)color, index);
 		 */
 		break;
             case 2:  /* PALETTERGB */
-		index = COLOR_PaletteLookupPixel( palPtr->logpalette.palPalEntry, 
+		index = COLOR_PaletteLookupPixel( palPtr->logpalette.palPalEntry,
                                              palPtr->logpalette.palNumEntries,
                                              palPtr->mapping, color, FALSE);
 		/* TRACE(palette,"PALETTERGB(%lx) -> pixel %i\n", color, index);
@@ -953,7 +953,7 @@
 
       if( r < diff ) { best = i; diff = r; }
     }
- 
+
  return (X11DRV_PALETTE_PaletteToXPixel)? X11DRV_PALETTE_PaletteToXPixel[best] : best;
 }
 
@@ -963,7 +963,7 @@
 static void X11DRV_PALETTE_FormatSystemPalette(void)
 {
  /* Build free list so we'd have an easy way to find
-  * out if there are any available colorcells. 
+  * out if there are any available colorcells.
   */
 
   int i, j = X11DRV_PALETTE_firstFree = NB_RESERVED_COLORS/2;
@@ -994,7 +994,7 @@
 /***********************************************************************
  *           X11DRV_PALETTE_SetMapping
  *
- * Set the color-mapping table for selected palette. 
+ * Set the color-mapping table for selected palette.
  * Return number of entries which mapping has changed.
  */
 int X11DRV_PALETTE_SetMapping( PALETTEOBJ* palPtr, UINT uStart, UINT uNum, BOOL mapOnly )
@@ -1010,7 +1010,7 @@
          X11DRV_PALETTE_FormatSystemPalette();
 
     /* initialize palette mapping table */
- 
+
     mapping = HeapReAlloc( GetProcessHeap(), 0, palPtr->mapping,
                            sizeof(int)*palPtr->logpalette.palNumEntries);
     if(mapping == NULL) {
@@ -1028,9 +1028,9 @@
         {
 	case PC_EXPLICIT:   /* palette entries are indices into system palette */
             index = *(WORD*)(palPtr->logpalette.palPalEntry + uStart);
-            if( index > 255 || (index >= COLOR_gapStart && index <= COLOR_gapEnd) ) 
+            if( index > 255 || (index >= COLOR_gapStart && index <= COLOR_gapEnd) )
             {
-                WARN("PC_EXPLICIT: idx %d out of system palette, assuming black.\n", index); 
+                WARN("PC_EXPLICIT: idx %d out of system palette, assuming black.\n", index);
                 index = 0;
             }
             break;
@@ -1040,10 +1040,10 @@
 
             /* fall through */
 	default:	    /* try to collapse identical colors */
-            index = COLOR_PaletteLookupExactIndex(COLOR_sysPal, 256,  
+            index = COLOR_PaletteLookupExactIndex(COLOR_sysPal, 256,
                              *(COLORREF*)(palPtr->logpalette.palPalEntry + uStart));
             /* fall through */
-	case PC_NOCOLLAPSE: 
+	case PC_NOCOLLAPSE:
             if( index < 0 )
             {
                 if( X11DRV_PALETTE_firstFree > 0 && !(X11DRV_PALETTE_PaletteFlags & X11DRV_PALETTE_FIXED) )
@@ -1066,16 +1066,16 @@
                     if( X11DRV_PALETTE_PaletteToXPixel ) index = X11DRV_PALETTE_PaletteToXPixel[index];
                     break;
                 }
-                else if ( X11DRV_PALETTE_PaletteFlags & X11DRV_PALETTE_VIRTUAL ) 
+                else if ( X11DRV_PALETTE_PaletteFlags & X11DRV_PALETTE_VIRTUAL )
                 {
                     index = X11DRV_PALETTE_ToPhysical( NULL, 0x00ffffff &
                              *(COLORREF*)(palPtr->logpalette.palPalEntry + uStart));
-                    break;     
+                    break;
                 }
 
                 /* we have to map to existing entry in the system palette */
 
-                index = COLOR_PaletteLookupPixel(COLOR_sysPal, 256, NULL, 
+                index = COLOR_PaletteLookupPixel(COLOR_sysPal, 256, NULL,
                        *(COLORREF*)(palPtr->logpalette.palPalEntry + uStart), TRUE);
             }
 	    palPtr->logpalette.palPalEntry[uStart].peFlags |= PC_SYS_USED;
@@ -1087,9 +1087,9 @@
         if( !prevMapping || palPtr->mapping[uStart] != index ) iRemapped++;
         palPtr->mapping[uStart] = index;
 
-        TRACE("entry %i (%lx) -> pixel %i\n", uStart, 
+        TRACE("entry %i (%lx) -> pixel %i\n", uStart,
 				*(COLORREF*)(palPtr->logpalette.palPalEntry + uStart), index);
-	
+
     }
     return iRemapped;
 }
@@ -1097,25 +1097,25 @@
 /***********************************************************************
  *           X11DRV_PALETTE_UpdateMapping
  *
- * Update the color-mapping table for selected palette. 
+ * Update the color-mapping table for selected palette.
  * Return number of entries which mapping has changed.
  */
 int X11DRV_PALETTE_UpdateMapping(PALETTEOBJ *palPtr)
 {
-  int i, index, realized = 0;    
-  
+  int i, index, realized = 0;
+
   if (!palette_size)
     return 0;
 
   for( i = 0; i < 20; i++ )
     {
       index = X11DRV_PALETTE_LookupSystemXPixel(*(COLORREF*)(palPtr->logpalette.palPalEntry + i));
-      
+
       /* mapping is allocated in COLOR_InitPalette() */
-      
+
       if( index != palPtr->mapping[i] ) { palPtr->mapping[i]=index; realized++; }
     }
-  
+
     return realized;
 }
 
diff --git a/graphics/x11drv/text.c b/graphics/x11drv/text.c
index 01de6ad..325eac0 100644
--- a/graphics/x11drv/text.c
+++ b/graphics/x11drv/text.c
@@ -57,7 +57,7 @@
     BOOL		rotated = FALSE;
     XChar2b		*str2b = NULL;
     BOOL		dibUpdateFlag = FALSE;
-    BOOL                result = TRUE; 
+    BOOL                result = TRUE;
     DC *dc = physDev->dc;
 
     if(dc->gdiFont)
@@ -242,7 +242,7 @@
             }
         }
     }
-    
+
     /* Draw the text (count > 0 verified) */
     if (!(str2b = X11DRV_cptable[pfo->fi->cptable].punicode_to_char2b( pfo, wstr, count )))
         goto FAIL;
@@ -265,7 +265,7 @@
 
         pitem = items = HeapAlloc( GetProcessHeap(), 0,
                                    count * sizeof(XTextItem16) );
-	if(items == NULL) goto FAIL; 
+	if(items == NULL) goto FAIL;
         delta = i = 0;
 	if( lpDx ) /* explicit character widths */
 	{
@@ -321,7 +321,7 @@
 		    pitem->nchars++;
                 } while ((++i < count) && !delta);
 		pitem++;
-            } 
+            }
         }
 
 	X11DRV_cptable[pfo->fi->cptable].pDrawText( pfo, gdi_display,
@@ -331,14 +331,14 @@
       }
     }
     else /* rotated */
-    {  
+    {
       /* have to render character by character. */
       double offset = 0.0;
       int i;
 
       for (i=0; i<count; i++)
       {
-	int char_metric_offset = str2b[i].byte2 + (str2b[i].byte1 << 8) 
+	int char_metric_offset = str2b[i].byte2 + (str2b[i].byte1 << 8)
 	  - font->min_char_or_byte2;
 	int x_i = IROUND((double) (dc->DCOrgX + x) + offset *
 			 pfo->lpX11Trans->a / pfo->lpX11Trans->pixelsize );
@@ -370,7 +370,7 @@
 
     if (lfUnderline)
     {
-	long linePos, lineWidth;       
+	long linePos, lineWidth;
 
 	if (!TSXGetFontProperty( font, XA_UNDERLINE_POSITION, &linePos ))
 	    linePos = descent - 1;
@@ -378,7 +378,7 @@
 	    lineWidth = 0;
 	else if (lineWidth == 1) lineWidth = 0;
 	TSXSetLineAttributes( gdi_display, physDev->gc, lineWidth,
-			      LineSolid, CapRound, JoinBevel ); 
+			      LineSolid, CapRound, JoinBevel );
         TSXDrawLine( gdi_display, physDev->drawable, physDev->gc,
 		     dc->DCOrgX + x, dc->DCOrgY + y + linePos,
 		     dc->DCOrgX + x + width, dc->DCOrgY + y + linePos );
@@ -391,7 +391,7 @@
 	if (!TSXGetFontProperty( font, XA_STRIKEOUT_DESCENT, &lineDescent ))
 	    lineDescent = -lineAscent * 2 / 3;
 	TSXSetLineAttributes( gdi_display, physDev->gc, lineAscent + lineDescent,
-			    LineSolid, CapRound, JoinBevel ); 
+			    LineSolid, CapRound, JoinBevel );
 	TSXDrawLine( gdi_display, physDev->drawable, physDev->gc,
 		   dc->DCOrgX + x, dc->DCOrgY + y - lineAscent,
 		   dc->DCOrgX + x + width, dc->DCOrgY + y - lineAscent );
@@ -399,11 +399,11 @@
 
     if (flags & ETO_CLIPPED) RestoreVisRgn16( dc->hSelf );
     goto END;
-	    
+
 FAIL:
     if(str2b != NULL) HeapFree( GetProcessHeap(), 0, str2b );
     result = FALSE;
-    
+
 END:
     if (dibUpdateFlag) X11DRV_UnlockDIBSection( physDev, TRUE );
     return result;
@@ -438,14 +438,14 @@
 	    float x = 0.0, y = 0.0;
 	    /* FIXME: Deal with *_char_or_byte2 != 0 situations */
 	    for(i = 0; i < count; i++) {
-	        x += pfo->fs->per_char ? 
-	   pfo->fs->per_char[p[i].byte2 - pfo->fs->min_char_or_byte2].attributes : 
+	        x += pfo->fs->per_char ?
+	   pfo->fs->per_char[p[i].byte2 - pfo->fs->min_char_or_byte2].attributes :
 	   pfo->fs->min_bounds.attributes;
 	    }
 	    y = pfo->lpX11Trans->RAW_ASCENT + pfo->lpX11Trans->RAW_DESCENT;
 	    TRACE("x = %f y = %f\n", x, y);
 	    x *= pfo->lpX11Trans->pixelsize / 1000.0;
-	    y *= pfo->lpX11Trans->pixelsize / 1000.0; 
+	    y *= pfo->lpX11Trans->pixelsize / 1000.0;
 	    size->cx = fabs((x + dc->breakRem + count * dc->charExtra) *
 			    dc->xformVport2World.eM11);
 	    size->cy = fabs(y * dc->xformVport2World.eM22);
diff --git a/graphics/x11drv/xfont.c b/graphics/x11drv/xfont.c
index 93a5bd7..563829c 100644
--- a/graphics/x11drv/xfont.c
+++ b/graphics/x11drv/xfont.c
@@ -127,12 +127,12 @@
 static const SuffixCharset sufch_iso8859[] = {
     {  "1", ANSI_CHARSET, 28591, X11DRV_CPTABLE_SBCS },
     {  "2", EE_CHARSET, 28592, X11DRV_CPTABLE_SBCS },
-    {  "3", ISO3_CHARSET, 28593, X11DRV_CPTABLE_SBCS }, 
-    {  "4", ISO4_CHARSET, 28594, X11DRV_CPTABLE_SBCS }, 
+    {  "3", ISO3_CHARSET, 28593, X11DRV_CPTABLE_SBCS },
+    {  "4", ISO4_CHARSET, 28594, X11DRV_CPTABLE_SBCS },
     {  "5", RUSSIAN_CHARSET, 28595, X11DRV_CPTABLE_SBCS },
     {  "6", ARABIC_CHARSET, 28596, X11DRV_CPTABLE_SBCS },
     {  "7", GREEK_CHARSET, 28597, X11DRV_CPTABLE_SBCS },
-    {  "8", HEBREW_CHARSET, 28598, X11DRV_CPTABLE_SBCS }, 
+    {  "8", HEBREW_CHARSET, 28598, X11DRV_CPTABLE_SBCS },
     {  "9", TURKISH_CHARSET, 28599, X11DRV_CPTABLE_SBCS },
     { "10", ISO10_CHARSET, 28600, X11DRV_CPTABLE_SBCS },
     { "11", THAI_CHARSET, 874, X11DRV_CPTABLE_SBCS }, /* FIXME */
@@ -172,8 +172,8 @@
     { "1251", RUSSIAN_CHARSET, 1251, X11DRV_CPTABLE_SBCS },
     { "1252", ANSI_CHARSET, 1252, X11DRV_CPTABLE_SBCS },
     { "1253", GREEK_CHARSET, 1253, X11DRV_CPTABLE_SBCS },
-    { "1254", TURKISH_CHARSET, 1254, X11DRV_CPTABLE_SBCS }, 
-    { "1255", HEBREW_CHARSET, 1255, X11DRV_CPTABLE_SBCS }, 
+    { "1254", TURKISH_CHARSET, 1254, X11DRV_CPTABLE_SBCS },
+    { "1255", HEBREW_CHARSET, 1255, X11DRV_CPTABLE_SBCS },
     { "1256", ARABIC_CHARSET, 1256, X11DRV_CPTABLE_SBCS },
     { "1257", BALTIC_CHARSET, 1257, X11DRV_CPTABLE_SBCS },
     {  NULL,  ANSI_CHARSET, 1252, X11DRV_CPTABLE_SBCS }};
@@ -453,7 +453,7 @@
 	lfd_fld[i] = NULL;
     if (*lpch)
 	WARN("Extra ignored in font '%s'\n", lpFont);
-    
+
     lfd = HeapAlloc( GetProcessHeap(), 0, sizeof(LFD) );
     if (lfd)
     {
@@ -506,7 +506,7 @@
 	const char* sp = lfd_fld[i];
 	if (!sp || !buf_size)
 	    break;
-	
+
 	*dp++ = HYPHEN;
 	buf_size--;
 	while (buf_size > 0 && *sp)
@@ -523,12 +523,12 @@
 static void LFD_GetWeight( fontInfo* fi, LPCSTR lpStr)
 {
     int j = strlen(lpStr);
-    if( j == 1 && *lpStr == '0') 
+    if( j == 1 && *lpStr == '0')
 	fi->fi_flags |= FI_POLYWEIGHT;
     else if( j == 4 )
     {
 	if( !strcasecmp( "bold", lpStr) )
-	    fi->df.dfWeight = FW_BOLD; 
+	    fi->df.dfWeight = FW_BOLD;
 	else if( !strcasecmp( "demi", lpStr) )
 	{
 	    fi->fi_flags |= FI_FW_DEMI;
@@ -548,9 +548,9 @@
 	    fi->df.dfWeight = FW_BLACK;
     }
     else if( j == 6 && !strcasecmp( "medium", lpStr) )
-	fi->df.dfWeight = FW_REGULAR; 
+	fi->df.dfWeight = FW_REGULAR;
     else if( j == 8 && !strcasecmp( "demibold", lpStr) )
-	fi->df.dfWeight = FW_DEMIBOLD; 
+	fi->df.dfWeight = FW_DEMIBOLD;
     else
 	fi->df.dfWeight = FW_DONTCARE; /* FIXME: try to get something
 					* from the weight property */
@@ -583,18 +583,18 @@
     if( j > 3 )	/* find out is there "sans" or "script" */
     {
 	j = 0;
-	
-	if( strstr(lpstr, "sans") ) 
-	{ 
-	    fi->df.dfPitchAndFamily |= FF_SWISS; 
-	    j = 1; 
+
+	if( strstr(lpstr, "sans") )
+	{
+	    fi->df.dfPitchAndFamily |= FF_SWISS;
+	    j = 1;
 	}
-	if( strstr(lpstr, "script") ) 
-	{ 
-	    fi->df.dfPitchAndFamily |= FF_SCRIPT; 
-	    j = 1; 
+	if( strstr(lpstr, "script") )
+	{
+	    fi->df.dfPitchAndFamily |= FF_SCRIPT;
+	    j = 1;
 	}
-	if( !j && dec_style_check ) 
+	if( !j && dec_style_check )
 	    fi->df.dfPitchAndFamily |= FF_DECORATIVE;
    }
 }
@@ -731,7 +731,7 @@
 
 /* charset registry, charset encoding - */
    lpstr = lfd->charset_registry;
-   if( strstr(lpstr, "ksc") || 
+   if( strstr(lpstr, "ksc") ||
        strstr(lpstr, "gb2312") ||
        strstr(lpstr, "big5") )
    {
@@ -806,7 +806,7 @@
     */
    fi->fi_encoding = 256 * (UINT16)i + (UINT16)j;
 
-   return TRUE;					
+   return TRUE;
 }
 
 
@@ -832,7 +832,7 @@
  *       should be bulletproof enough to allow us to avoid hacks like
  *	 this despite LFD being so braindead.
  */
-static BOOL LFD_ComposeLFD( const fontObject* fo, 
+static BOOL LFD_ComposeLFD( const fontObject* fo,
 			    INT height, LPSTR lpLFD, UINT uRelax )
 {
    int		i, h;
@@ -842,8 +842,8 @@
 
 /* Get the worst case over with first */
 
-/* RealizeFont() will call us repeatedly with increasing uRelax 
- * until XLoadFont() succeeds. 
+/* RealizeFont() will call us repeatedly with increasing uRelax
+ * until XLoadFont() succeeds.
  * to avoid an infinite loop; these will always match
  */
    if (uRelax >= 5)
@@ -889,7 +889,7 @@
 	   aLFD.slant = "o";
        else
 	   aLFD.slant = "i";
-   else 
+   else
        aLFD.slant = (uRelax < 1) ? "r" : any;
 
 /* add width */
@@ -901,7 +901,7 @@
 /* ignore style */
    aLFD.add_style = any;
 
-/* add pixelheight 
+/* add pixelheight
  *
  * FIXME: fill in lpXForm and lpPixmap for rotated fonts
  */
@@ -911,7 +911,7 @@
    {
        h = (fo->fi->lfd_height * height + (fo->fi->df.dfPixHeight>>1));
        h /= fo->fi->df.dfPixHeight;
-   } 
+   }
    if (h < MIN_FONT_SIZE) /* Resist rounding down to 0 */
        h = MIN_FONT_SIZE;
    else if (h > MAX_FONT_SIZE) /* Sanity check as huge fonts can lock up the font server */
@@ -919,12 +919,12 @@
        WARN("Huge font size %d pixels has been reduced to %d\n", h, MAX_FONT_SIZE);
        h = MAX_FONT_SIZE;
    }
-       
+
    if (uRelax <= 2)
        /* handle rotated fonts */
        if (fo->lf.lfEscapement) {
 	   /* escapement is in tenths of degrees, theta is in radians */
-	   double theta = M_PI*fo->lf.lfEscapement/1800.;  
+	   double theta = M_PI*fo->lf.lfEscapement/1800.;
 	   LFD_AngleMatrix(h_string, h, theta);
        }
        else
@@ -948,11 +948,11 @@
        aLFD.resolution_x = resx_string;
 
        strcpy(resy_string, resx_string);
-       if( uRelax == 0  && text_caps & TC_SF_X_YINDEP ) 
+       if( uRelax == 0  && text_caps & TC_SF_X_YINDEP )
        {
 	   if( fo->lf.lfWidth && !(fo->fo_flags & FO_SYNTH_WIDTH))
 	   {
-	       int resy = 0.5 + fo->fi->lfd_resolution *	
+	       int resy = 0.5 + fo->fi->lfd_resolution *
 		   (fo->fi->df.dfAvgWidth * height) /
 		   (fo->lf.lfWidth * fo->fi->df.dfPixHeight) ;
 	       sprintf(resy_string,  "%d", resy);
@@ -961,7 +961,7 @@
 	   {
 	       /* FIXME - synth width */
            }
-       }	   
+       }
        aLFD.resolution_y = resy_string;
    }
    else
@@ -973,11 +973,11 @@
    {
        char* w;
 
-       if( fo->fi->fi_flags & FI_FIXEDPITCH ) 
+       if( fo->fi->fi_flags & FI_FIXEDPITCH )
 	   w = ( fo->fi->fi_flags & FI_FIXEDEX ) ? "c" : "m";
-       else 
-	   w = ( fo->fi->fi_flags & FI_VARIABLEPITCH ) ? "p" : any; 
-       
+       else
+	   w = ( fo->fi->fi_flags & FI_VARIABLEPITCH ) ? "p" : any;
+
        aLFD.spacing = (uRelax <= 1) ? w : any;
    }
 
@@ -989,18 +989,18 @@
 
        for(i = fo->fi->fi_encoding >> 8; i; i--) boba = boba->next;
        aLFD.charset_registry = boba->prefix ? boba->prefix : any;
-       
+
        i = fo->fi->fi_encoding & 255;
        switch( i )
        {
        default:
 	   aLFD.charset_encoding = boba->sufch[i].psuffix;
 	   break;
-	   
+
        case 254:
 	   aLFD.charset_encoding = any;
 	   break;
-	   
+
        case 255: /* no suffix - it ends eg "-ascii" */
 	   aLFD.charset_encoding = NULL;
 	   break;
@@ -1011,7 +1011,7 @@
        aLFD.charset_registry = any;
        aLFD.charset_encoding = any;
    }
-    
+
    LFD_UnParse(lpLFD, MAX_LFD_LENGTH, &aLFD);
 
    TRACE("\tLFD(uRelax=%d): %s\n", uRelax, lpLFD );
@@ -1025,7 +1025,7 @@
  * font info		- http://www.microsoft.com/kb/articles/q65/1/23.htm
  * Windows font metrics	- http://www.microsoft.com/kb/articles/q32/6/67.htm
  */
-static void XFONT_GetLeading( const LPIFONTINFO16 pFI, const XFontStruct* x_fs, 
+static void XFONT_GetLeading( const LPIFONTINFO16 pFI, const XFontStruct* x_fs,
 			      INT16* pIL, INT16* pEL, const XFONTTRANS *XFT )
 {
     unsigned long height;
@@ -1037,13 +1037,13 @@
     if(XFT) {
         Atom RAW_CAP_HEIGHT = TSXInternAtom(gdi_display, "RAW_CAP_HEIGHT", TRUE);
 	if(TSXGetFontProperty((XFontStruct*)x_fs, RAW_CAP_HEIGHT, &height))
-	    *pIL = XFT->ascent - 
+	    *pIL = XFT->ascent -
                             (INT)(XFT->pixelsize / 1000.0 * height);
 	else
 	    *pIL = 0;
 	return;
     }
-       
+
     if( TSXGetFontProperty((XFontStruct*)x_fs, XA_CAP_HEIGHT, &height) == FALSE )
     {
         if( x_fs->per_char )
@@ -1058,7 +1058,7 @@
 		    if( pEL )
 			*pEL = x_fs->max_bounds.ascent - height;
 		}
-	else 
+	else
 	    height = x_fs->min_bounds.ascent;
     }
 
@@ -1070,7 +1070,7 @@
  */
 static int XFONT_CharWidth(const XFontStruct* x_fs,
 			   const XFONTTRANS *XFT, int ch)
-{   
+{
     if(!XFT)
 	return x_fs->per_char[ch].width;
     else
@@ -1097,7 +1097,7 @@
 	    /* FIXME - should use a weighted average */
 	    for( j = 0; j < 26; j++ )
 		width += XFONT_CharWidth(x_fs, XFT, 'a' + j - min) +
-		         XFONT_CharWidth(x_fs, XFT, 'A' + j - min);	    
+		         XFONT_CharWidth(x_fs, XFT, 'A' + j - min);
 	    chars = 52;
 	}
 	else /* unweighted average of everything */
@@ -1110,7 +1110,7 @@
 		}
 	}
 	if (chars) avg = (width + (chars-1))/ chars; /* always round up*/
-	else       avg = 0; /* No characters exist at all */ 
+	else       avg = 0; /* No characters exist at all */
     }
     else /* uniform width */
 	avg = x_fs->min_bounds.width;
@@ -1135,7 +1135,7 @@
 	if( !CI_NONEXISTCHAR(xfs->per_char + j) )
 	    if(maxwidth < xfs->per_char[j].attributes)
 		maxwidth = xfs->per_char[j].attributes;
-    
+
     maxwidth *= XFT->pixelsize / 1000.0;
     return maxwidth;
 }
@@ -1165,11 +1165,11 @@
 
     if( xfs->min_bounds.width != xfs->max_bounds.width )
         fi->df.dfPitchAndFamily |= TMPF_FIXED_PITCH; /* au contraire! */
-    if( fi->fi_flags & FI_SCALABLE ) 
+    if( fi->fi_flags & FI_SCALABLE )
     {
 	fi->df.dfType = DEVICE_FONTTYPE;
         fi->df.dfPitchAndFamily |= TMPF_DEVICE;
-    } 
+    }
     else if( fi->fi_flags & FI_TRUETYPE )
 	fi->df.dfType = TRUETYPE_FONTTYPE;
     else
@@ -1229,7 +1229,7 @@
     ptm->tmLastChar = pfi->df.dfLastChar;
     ptm->tmDefaultChar = pfi->df.dfDefaultChar;
     ptm->tmBreakChar = pfi->df.dfBreakChar;
- 
+
     TRACE("Calling Enum proc with FaceName %s FullName %s\n",
 	  debugstr_w(pLF->elfLogFont.lfFaceName),
 	  debugstr_w(pLF->elfFullName));
@@ -1245,7 +1245,7 @@
  *           XFONT_FixupFlags
  *
  * INIT ONLY
- * 
+ *
  * dfPitchAndFamily flags for some common typefaces.
  */
 static BYTE XFONT_FixupFlags( LPCSTR lfFaceName )
@@ -1263,7 +1263,7 @@
         case 'c':
         case 'C': if(!strncasecmp(lfFaceName, "Courier", 7))
 	            return FF_MODERN;
-	
+
 	          if (!strcasecmp(lfFaceName, "Charter") )
 		      return FF_ROMAN;
 		  break;
@@ -1293,7 +1293,7 @@
  */
 static BOOL XFONT_SameFoundryAndFamily( const LFD* lfd1, const LFD* lfd2 )
 {
-    return ( !strcasecmp( lfd1->foundry, lfd2->foundry ) && 
+    return ( !strcasecmp( lfd1->foundry, lfd2->foundry ) &&
 	     !strcasecmp( lfd1->family,  lfd2->family ) );
 }
 
@@ -1312,7 +1312,7 @@
 
     for( i = 0, up = TRUE; *lpch; lpch++, i++ )
     {
-	if( isspace(*lpch) ) 
+	if( isspace(*lpch) )
 	{
 	    if (!up)  /* Not already got one */
 	    {
@@ -1321,11 +1321,11 @@
 	    }
 	}
 	else if( isalpha(*lpch) && up )
-	{ 
-	    *lpstr++ = toupper(*lpch); 
+	{
+	    *lpstr++ = toupper(*lpch);
 	    up = FALSE;
 	}
-	else 
+	else
 	{
 	    *lpstr++ = *lpch;
 	    up = FALSE;
@@ -1382,9 +1382,9 @@
 		    fi->df.dfPitchAndFamily |= bFamilyStyle;
 	    }
 	}
-	    
+
 	TRACE("typeface '%s'\n", fr->lfFaceName);
-	
+
 	fr->fr_flags |= FR_NAMESET;
     }
 }
@@ -1413,7 +1413,7 @@
 	    fr = pfr;
 	}
 	if (!pfr)
-	    WARN("Default %sfont '-%s-%s-' not available\n", fonttype, 
+	    WARN("Default %sfont '-%s-%s-' not available\n", fonttype,
 		 lfd->foundry, lfd->family);
     }
 }
@@ -1438,7 +1438,7 @@
 	    LFD* lfd;
 	    char* pch = buffer;
 	    while( *pch && isspace(*pch) ) pch++;
-	    
+
 	    TRACE("Using '%s' as default %sfont\n", pch, fonttype);
 	    lfd = LFD_Parse(pch);
 	    if (lfd && lfd->foundry && lfd->family)
@@ -1472,7 +1472,7 @@
 	/* check if we already got one */
 	if( !strcasecmp( pfa->faTypeFace, lpAlias ) )
 	{
-	    TRACE("redundant alias '%s' -> '%s'\n", 
+	    TRACE("redundant alias '%s' -> '%s'\n",
 		  lpAlias, lpTypeFace );
 	    return NULL;
 	}
@@ -1488,7 +1488,7 @@
 	    aliasTable = pfa;
 	else
 	    prev->next = pfa;
-    
+
 	pfa->next = NULL;
 	pfa->faTypeFace = (LPSTR)(pfa + 1);
 	strcpy( pfa->faTypeFace, lpTypeFace );
@@ -1554,9 +1554,9 @@
                 }
 		prev = pfa;
 	    }
-						
+
 	    TRACE("\tsubstituted '%s' with '%s'\n", frMatch->lfFaceName, lpAlias );
-		
+
 	    lstrcpynA( frMatch->lfFaceName, lpAlias, LF_FACESIZE );
 	    frMatch->fr_flags |= FR_NAMESET;
 	}
@@ -1570,12 +1570,12 @@
     {
 	WARN("Font alias '-%s-%s-' is not available\n", lfd->foundry, lfd->family);
     }
-} 
+}
 
 /***********************************************************************
  *  Just a copy of PROFILE_GetStringItem
  *
- *  Convenience function that turns a string 'xxx, yyy, zzz' into 
+ *  Convenience function that turns a string 'xxx, yyy, zzz' into
  *  the 'xxx\0 yyy, zzz' and returns a pointer to the 'yyy, zzz'.
  */
 static char *XFONT_GetStringItem( char *start )
@@ -1602,7 +1602,7 @@
 /***********************************************************************
  *           XFONT_LoadAliases
  *
- * INIT ONLY 
+ * INIT ONLY
  *
  * Create font aliases for some standard windows fonts using user's
  * default choice of (sans-)serif fonts
@@ -1612,7 +1612,7 @@
  * Alias# = [Windows font name],[LFD font name], <substitute original name>
  *
  * Example:
- *   Alias0 = Arial, -adobe-helvetica- 
+ *   Alias0 = Arial, -adobe-helvetica-
  *   Alias1 = Times New Roman, -bitstream-courier-, 1
  *   ...
  *
@@ -1653,7 +1653,7 @@
 	XFONT_LoadDefaultLFD( lfd, "serif ");
 	HeapFree(GetProcessHeap(), 0, lfd);
     }
-	
+
     strcpy(buffer, "-adobe-helvetica-");
     if(!RegOpenKeyA(HKEY_LOCAL_MACHINE, INIFontSection, &hkey))
     {
@@ -1723,10 +1723,10 @@
     {
 	fontAlias* fa;
 	XFONT_InitialCapitals(font); /* to remove extra white space */
-    
+
 	for( fa = aliasTable; fa; fa = fa->next )
 	    /* use case insensitive matching to handle eg "MS Sans Serif" */
-	    if( !strcasecmp( fa->faAlias, font ) ) 
+	    if( !strcasecmp( fa->faAlias, font ) )
 	    {
 		TRACE("found alias '%s'->%s'\n", font, fa->faTypeFace );
 		strcpy(font, fa->faTypeFace);
@@ -1765,7 +1765,7 @@
 /***********************************************************************
  *           XFONT_LoadIgnores
  *
- * INIT ONLY 
+ * INIT ONLY
  *
  * Removes specified fonts from the font table to prevent Wine from
  * using it.
@@ -1791,7 +1791,7 @@
 	    {
 		TRACE("Ignoring '-%s-%s-'\n",
 		      (*ppfr)->resource->foundry, (*ppfr)->resource->family  );
-			
+
 		XFONT_RemoveFontResource( ppfr );
 		break;
 	    }
@@ -1799,7 +1799,7 @@
     }
     else
 	WARN("Malformed font resource\n");
-    
+
     HeapFree(GetProcessHeap(), 0, lfd);
 }
 
@@ -1833,7 +1833,7 @@
 	    while( *pch && isspace(*pch) ) pch++;
 	    XFONT_LoadIgnore(pch);
 	}
-	else 
+	else
 	    break;
     } while(TRUE);
 }
@@ -1841,7 +1841,7 @@
 
 /***********************************************************************
  *           XFONT_UserMetricsCache
- * 
+ *
  * Returns expanded name for the cachedmetrics file.
  * Now it also appends the current value of the $DISPLAY variable.
  */
@@ -1939,7 +1939,7 @@
     }
     else pfi->fi_flags &= ~FI_SUBSET;
 
-    prev = pfi; 
+    prev = pfi;
     pfi = pfi->next;
   }
 
@@ -1987,7 +1987,7 @@
 
 /***********************************************************************
  *           XFONT_BuildMetrics
- * 
+ *
  * Build font metrics from X font
  */
 static int XFONT_BuildMetrics(char** x_pattern, int res, unsigned x_checksum, int x_count)
@@ -2019,30 +2019,30 @@
 	}
 
 	/* find a family to insert into */
-	  
+
 	for( pfr = NULL, fr = fontList; fr; fr = fr->next )
 	{
 	    if( XFONT_SameFoundryAndFamily(fr->resource, lfd))
 		break;
 	    pfr = fr;
-	}  
-	
+	}
+
 	if( !fi ) fi = (fontInfo*) HeapAlloc(GetProcessHeap(), 0, sizeof(fontInfo));
-	
+
 	if( !LFD_InitFontInfo( fi, lfd, x_pattern[i]) )
 	    goto nextfont;
-	    
+
 	if( !fr ) /* add new family */
 	{
 	    n_ff++;
-	    fr = (fontResource*) HeapAlloc(GetProcessHeap(), 0, sizeof(fontResource)); 
+	    fr = (fontResource*) HeapAlloc(GetProcessHeap(), 0, sizeof(fontResource));
 	    if (fr)
 	    {
 		memset(fr, 0, sizeof(fontResource));
-	      
-		fr->resource = (LFD*) HeapAlloc(GetProcessHeap(), 0, sizeof(LFD)); 
+
+		fr->resource = (LFD*) HeapAlloc(GetProcessHeap(), 0, sizeof(LFD));
 		memset(fr->resource, 0, sizeof(LFD));
-	      
+
 		TRACE("family: -%s-%s-\n", lfd->foundry, lfd->family );
 		fr->resource->foundry = HeapAlloc(GetProcessHeap(), 0, strlen(lfd->foundry)+1);
 		strcpy( (char *)fr->resource->foundry, lfd->foundry );
@@ -2058,18 +2058,18 @@
 	}
 
 	/* check if we already have something better than "fi" */
-	
-	for( pfi = fr->fi, j = 0; pfi && j <= 0; pfi = pfi->next ) 
-	    if( (j = XFONT_IsSubset( pfi, fi )) < 0 ) 
+
+	for( pfi = fr->fi, j = 0; pfi && j <= 0; pfi = pfi->next )
+	    if( (j = XFONT_IsSubset( pfi, fi )) < 0 )
 		pfi->fi_flags |= FI_SUBSET; /* superseded by "fi" */
 	if( j > 0 ) goto nextfont;
-	
+
 	/* add new font instance "fi" to the "fr" font resource */
-	
+
 	if( fi->fi_flags & FI_SCALABLE )
 	{
 	    LFD lfd1;
-	    char pxl_string[4], res_string[4]; 
+	    char pxl_string[4], res_string[4];
 	    /* set scalable font height to get an basis for extrapolation */
 
 	    fi->lfd_height = DEF_SCALABLE_HEIGHT;
@@ -2077,7 +2077,7 @@
 
 	    sprintf(pxl_string, "%d", fi->lfd_height);
 	    sprintf(res_string, "%d", fi->lfd_resolution);
-	   
+
 	    lfd1 = *lfd;
 	    lfd1.pixel_size = pxl_string;
 	    lfd1.point_size = "*";
@@ -2085,20 +2085,20 @@
 	    lfd1.resolution_y = res_string;
 
 	    LFD_UnParse(buffer, sizeof buffer, &lfd1);
-	    
+
 	    lpstr = buffer;
 	}
 	else lpstr = x_pattern[i];
 
 	if( (x_fs = TSXLoadQueryFont(gdi_display, lpstr)) )
-	{	      
+	{
 	    XFONT_SetFontMetric( fi, fr, x_fs );
 	    TSXFreeFont( gdi_display, x_fs );
 
 	    XFONT_FixupPointSize(fi);
 
 	    TRACE("\t[% 2ipt] '%s'\n", fi->df.dfPoints, x_pattern[i] );
-	      
+
 	    XFONT_CheckFIList( fr, fi, REMOVE_SUBSETS );
 	    fi = NULL;	/* preventing reuse */
 	}
@@ -2114,45 +2114,45 @@
     }
     if( fi ) HeapFree(GetProcessHeap(), 0, fi);
 
-    /* Scan through the font list and remove FontResource(s) (fr) 
-     * that have no associated Fontinfo(s) (fi). 
+    /* Scan through the font list and remove FontResource(s) (fr)
+     * that have no associated Fontinfo(s) (fi).
      * This code is necessary because XFONT_ReadCachedMetrics
-     * assumes that there is at least one fi associated with a fr.  
+     * assumes that there is at least one fi associated with a fr.
      * This assumption is invalid for TT font
      *  -altsys-ms outlook-medium-r-normal--0-0-0-0-p-0-microsoft-symbol.
      */
-    
+
     fr = fontList;
-    
-    while (!fr->fi_count) 
+
+    while (!fr->fi_count)
     {
        fontList = fr->next;
-    
+
        HeapFree(GetProcessHeap(), 0, fr->resource);
        HeapFree(GetProcessHeap(), 0, fr);
-       
+
        fr = fontList;
        n_ff--;
     }
-    	    
+
     fr = fontList;
-    
+
     while (fr->next)
     {
       	if (!fr->next->fi_count)
 	{
 	    pfr = fr->next;
 	    fr->next = fr->next->next;
-			    
+
 	    HeapFree(GetProcessHeap(), 0, pfr->resource);
 	    HeapFree(GetProcessHeap(), 0, pfr);
-	
+
 	    n_ff--;
 	}
-	else 
-	    fr = fr->next; 
-    }  
-	  
+	else
+	    fr = fr->next;
+    }
+
     return n_ff;
 }
 
@@ -2232,7 +2232,7 @@
 			{
 			    pfr->next = (fontResource*)(pfi + 1);
 			    pfr = pfr->next;
-			} 
+			}
 			else break;
 		    }
 		    if( pfr->next == NULL &&
@@ -2302,7 +2302,7 @@
 	write( fd, &x_checksum, sizeof(unsigned) );
 	write( fd, &x_count, sizeof(int) );
 
-	for( j = i = 0, pfr = fontList; pfr; pfr = pfr->next ) 
+	for( j = i = 0, pfr = fontList; pfr; pfr = pfr->next )
 	{
 	    LFD_UnParse(buffer, sizeof buffer, pfr->resource);
 	    i += strlen( buffer) + 1;
@@ -2320,7 +2320,7 @@
 	    TRACE("\t-%s-%s-, %i instances\n", pfr->resource->foundry, pfr->resource->family, pfr->fi_count );
 
 	    i = write( fd, pfr, sizeof(fontResource) );
-	    if( i == sizeof(fontResource) ) 
+	    if( i == sizeof(fontResource) )
 	    {
 		for( k = 1, pfi = pfr->fi; pfi; pfi = pfi->next )
 		{
@@ -2364,7 +2364,7 @@
  */
 static int XFONT_GetPointResolution( int *log_pixels_x, int *log_pixels_y )
 {
-    int i, j, point_resolution, num = 3; 
+    int i, j, point_resolution, num = 3;
     int allowed_xfont_resolutions[3] = { 72, 75, 100 };
     int best = 0, best_diff = 65536;
     HKEY hkey;
@@ -2536,7 +2536,7 @@
    if( plf->lfWidth )
    {
        int h;
-       if( bR6 || bScale ) h = 0; 
+       if( bR6 || bScale ) h = 0;
        else
        {
 	   /* FIXME: not complete */
@@ -2564,11 +2564,11 @@
 /* Underline */
    if( plf->lfUnderline ) pfm->flags |= FO_SYNTH_UNDERLINE;
 
-/* Strikeout */   
+/* Strikeout */
    if( plf->lfStrikeOut ) pfm->flags |= FO_SYNTH_STRIKEOUT;
 
 
-   if( penalty && !bScale && pfi->lfd_resolution != DefResolution ) 
+   if( penalty && !bScale && pfi->lfd_resolution != DefResolution )
        penalty++;
 
    TRACE("  returning %i\n", penalty );
@@ -2624,9 +2624,9 @@
     fontMatch           fm = *pfm;
     UINT          current_score, score = (UINT)(-1);
     fontResource**	ppfr;
-    
+
     TRACE("(%u) '%s' h=%i weight=%i %s\n",
-	  pfm->plf->lfCharSet, pfm->plf->lfFaceName, pfm->plf->lfHeight, 
+	  pfm->plf->lfCharSet, pfm->plf->lfFaceName, pfm->plf->lfHeight,
 	  pfm->plf->lfWeight, (pfm->plf->lfItalic) ? "Italic" : "" );
 
     pfm->pfi = NULL;
@@ -2661,7 +2661,7 @@
 	if( fm.pfr ) /* match family */
 	{
 	    TRACE("found facename '%s'\n", fm.pfr->lfFaceName );
-	    
+
 	    if( fm.pfr->fr_flags & FR_REMOVED )
 		fm.pfr = 0;
 	    else
@@ -2703,11 +2703,11 @@
 		XFONT_RemoveFontResource( ppfr );
 	    continue;
 	}
-	
+
 	fm.pfr = *ppfr;
-	
+
 	TRACE("%s\n", fm.pfr->lfFaceName );
-	    
+
 	current_score = XFONT_MatchFIList( &fm );
 	if( current_score < score )
 	{
@@ -2735,14 +2735,14 @@
 	fontCache[start].count = -1;
 	fontCache[start].lru = start + 1;
 	start++;
-   } 
+   }
 }
 
 static fontObject* XFONT_LookupCachedFont( const LPLOGFONT16 plf, UINT16* checksum )
 {
     UINT16	cs = __lfCheckSum( plf );
     int		i = fontMRU, prev = -1;
-   
+
    *checksum = cs;
     while( i >= 0 )
     {
@@ -2758,7 +2758,7 @@
 		/* remove temporarily from the lru list */
 		if( prev >= 0 )
 		    fontCache[prev].lru = fontCache[i].lru;
-		else 
+		else
 		    fontMRU = (INT16)fontCache[i].lru;
 		return (fontCache + i);
 	    }
@@ -2821,14 +2821,14 @@
 
 	    TRACE("\tgrowing font cache from %i to %i\n", fontCacheSize, prev_i );
 
-	    if( (newCache = (fontObject*)HeapReAlloc(GetProcessHeap(), 0,  
+	    if( (newCache = (fontObject*)HeapReAlloc(GetProcessHeap(), 0,
 						     fontCache, prev_i)) )
 	    {
 		i = fontCacheSize;
 		fontCacheSize  = prev_i;
 		fontCache = newCache;
 		XFONT_GrowFreeList( i, fontCacheSize - 1);
-	    } 
+	    }
 	    else return NULL;
 	}
     }
@@ -2882,7 +2882,7 @@
   x_pattern = TSXListFonts(gdi_display, "*", MAX_FONTS, &x_count );
 
   TRACE("Font Mapper: initializing %i x11 fonts\n", x_count);
-  if (x_count == MAX_FONTS)      
+  if (x_count == MAX_FONTS)
       MESSAGE("There may be more fonts available - try increasing the value of MAX_FONTS\n");
 
   for( i = x_checksum = 0; i < x_count; i++ )
@@ -3067,14 +3067,14 @@
 
 	    if(abs(plf->lfHeight) > MAX_FONT_SIZE) {
 		ERR(
-  "plf->lfHeight = %d, Creating a 100 pixel font and rescaling metrics \n", 
+  "plf->lfHeight = %d, Creating a 100 pixel font and rescaling metrics \n",
 		    plf->lfHeight);
 		pfo->rescale = fabs(plf->lfHeight / 100.0);
 		if(plf->lfHeight > 0) plf->lfHeight = 100;
 		else plf->lfHeight = -100;
 	    } else
 		pfo->rescale = 1.0;
-	    
+
 	    XFONT_MatchDeviceFont( fontList, &fm );
 	    pfo->fr = fm.pfr;
 	    pfo->fi = fm.pfi;
@@ -3090,7 +3090,7 @@
 		if( (pfo->fs = TSXLoadQueryFont( gdi_display, lpLFD )) ) break;
 	    } while( uRelaxLevel );
 
-		
+
 	    if(pfo->lf.lfEscapement != 0) {
 		pfo->lpX11Trans = HeapAlloc(GetProcessHeap(), 0, sizeof(XFONTTRANS));
 		if(!XFONT_SetX11Trans( pfo )) {
@@ -3102,7 +3102,7 @@
 			      &pfo->foInternalLeading, NULL, pfo->lpX11Trans );
 	    pfo->foAvgCharWidth = (INT16)XFONT_GetAvgCharWidth(&pfo->fi->df, pfo->fs, pfo->lpX11Trans );
 	    pfo->foMaxCharWidth = (INT16)XFONT_GetMaxCharWidth(pfo->fs, pfo->lpX11Trans);
-	    
+
 	    /* FIXME: If we've got a soft font or
 	     * there are FO_SYNTH_... flags for the
 	     * non PROOF_QUALITY request, the engine
@@ -3110,7 +3110,7 @@
 	     * pixmaps and store them in the pfo->lpPixmap
 	     * array (pfo->fs should be updated as well).
 	     * array (pfo->fs should be updated as well).
-	     * X11DRV_ExtTextOut() must be heavily modified 
+	     * X11DRV_ExtTextOut() must be heavily modified
 	     * to support pixmap blitting and FO_SYNTH_...
 	     * styles.
 	     */
@@ -3155,7 +3155,7 @@
 	{
 	    UINT		current_score, score = (UINT)(-1);
 
-	    i = index = fontMRU; 
+	    i = index = fontMRU;
 	    fm.flags |= FO_MATCH_PAF;
             do
             {
@@ -3175,7 +3175,7 @@
     /* attach at the head of the lru list */
     pfo->lru = fontMRU;
     index = fontMRU = (pfo - fontCache);
- 
+
 END:
     pfo->count++;
 
@@ -3244,7 +3244,7 @@
 
     if(fontList == NULL) X11DRV_FONT_InitX11Metrics();
 
-    if( CHECK_PFONT(physDev->font) ) 
+    if( CHECK_PFONT(physDev->font) )
         XFONT_ReleaseCacheEntry( __PFONT(physDev->font) );
 
     FONT_LogFontWTo16(&logfont, &lf);
@@ -3284,7 +3284,7 @@
 					   FALSE, lf.lfCharSet,
 					   &charsetMatched );
 
-	/* set face to the requested facename if it matched 
+	/* set face to the requested facename if it matched
 	 * so that GetTextFace can get the correct face name
 	 */
 	if (alias && !strcmp(faceMatched, lf.lfFaceName))
@@ -3343,7 +3343,7 @@
 
 	        if(lf16.lfCharSet == DEFAULT_CHARSET ||
 		   lf16.lfCharSet == pfi->df.dfCharSet) {
-		    if( (b = (*proc)( &lf, &tm, 
+		    if( (b = (*proc)( &lf, &tm,
 			       XFONT_GetFontMetric( pfi, &lf, &tm ), lp )) )
 		        bRet = b;
 		    else break;
@@ -3356,7 +3356,7 @@
 	{
             if(pfr->fi)
             {
-	        if( (b = (*proc)( &lf, &tm, 
+	        if( (b = (*proc)( &lf, &tm,
 			   XFONT_GetFontMetric( pfr->fi, &lf, &tm ), lp )) )
 		    bRet = b;
 		else break;
@@ -3418,11 +3418,11 @@
 		UINT ch_f; /* character code in the font encoding */
 		WideCharToMultiByte( pfo->fi->codepage, 0, &wch, 1, &ch, 1, NULL, NULL );
 		ch_f = ch;
-		if (ch_f >= pfo->fs->min_char_or_byte2 && 
+		if (ch_f >= pfo->fs->min_char_or_byte2 &&
 		    ch_f <= pfo->fs->max_char_or_byte2)
 		{
-		    cs = &pfo->fs->per_char[(ch_f - pfo->fs->min_char_or_byte2)]; 
-		    if (CI_NONEXISTCHAR(cs)) cs = def; 
+		    cs = &pfo->fs->per_char[(ch_f - pfo->fs->min_char_or_byte2)];
+		    if (CI_NONEXISTCHAR(cs)) cs = def;
   		} else cs = def;
 		if(pfo->lpX11Trans)
 		    *buffer++ = max(cs->attributes, 0) *
diff --git a/if1632/relay.c b/if1632/relay.c
index 3f8bbec..1263cc2 100644
--- a/if1632/relay.c
+++ b/if1632/relay.c
@@ -61,11 +61,11 @@
       /* Patch the return addresses for CallTo16 routines */
 
     CallTo16_DataSelector = wine_get_ds();
-    CallTo16_RetAddr = 
+    CallTo16_RetAddr =
         MAKESEGPTR( codesel, (char*)CallTo16_Ret - (char*)Call16_Ret_Start );
-    CALL32_CBClient_RetAddr = 
+    CALL32_CBClient_RetAddr =
         MAKESEGPTR( codesel, (char*)CALL32_CBClient_Ret - (char*)Call16_Ret_Start );
-    CALL32_CBClientEx_RetAddr = 
+    CALL32_CBClientEx_RetAddr =
         MAKESEGPTR( codesel, (char*)CALL32_CBClientEx_Ret - (char*)Call16_Ret_Start );
 #endif
     return TRUE;
@@ -164,7 +164,7 @@
     max_offset = 0;
     *pOrd = 0;
     bundle = (ET_BUNDLE *)((BYTE *)pModule + pModule->entry_table);
-    do 
+    do
     {
         entry = (ET_ENTRY *)((BYTE *)bundle+6);
 	for (i = bundle->first + 1; i <= bundle->last; i++)
@@ -183,7 +183,7 @@
 
     /* Search for the name in the resident names table */
     /* (built-in modules have no non-resident table)   */
-    
+
     p = (BYTE *)pModule + pModule->name_table;
     while (*p)
     {
@@ -360,7 +360,7 @@
  *
  * 'target' contains either the function to call (normal CallTo16)
  * or a pointer to the CONTEXT86 struct (register CallTo16).
- * 'nb_args' is the number of argument bytes on the 16-bit stack; 
+ * 'nb_args' is the number of argument bytes on the 16-bit stack;
  * 'reg_func' specifies whether we have a register CallTo16 or not.
  */
 void RELAY_DebugCallTo16( LPVOID target, int nb_args, BOOL reg_func )
diff --git a/if1632/snoop.c b/if1632/snoop.c
index a61917d..74f40db 100644
--- a/if1632/snoop.c
+++ b/if1632/snoop.c
@@ -295,7 +295,7 @@
 	SNOOP16_RETURNENTRY	*ret = (SNOOP16_RETURNENTRY*)((char *) MapSL( MAKESEGPTR(context->SegCs,LOWORD(context->Eip)) )-5);
 
 	/* We haven't found out the nrofargs yet. If we called a cdecl
-	 * function it is too late anyway and we can just set '0' (which 
+	 * function it is too late anyway and we can just set '0' (which
 	 * will be the difference between orig and current SP
 	 * If pascal -> everything ok.
 	 */
@@ -311,7 +311,7 @@
 		max = ret->dll->funs[ret->ordinal].nrofargs;
 		if (max>16)
 			max=16;
-		if (max<0) 
+		if (max<0)
 			max=0;
 
 		for (i=max;i--;)
diff --git a/include/commctrl.h b/include/commctrl.h
index 46e74a7..893a20f 100644
--- a/include/commctrl.h
+++ b/include/commctrl.h
@@ -247,7 +247,7 @@
 	DWORD	dwDrawStage;
 	HDC	hdc;
 	RECT	rc;
-	DWORD	dwItemSpec; 
+	DWORD	dwItemSpec;
 	UINT	uItemState;
 	LPARAM	lItemlParam;
 } NMCUSTOMDRAW, *LPNMCUSTOMDRAW;
@@ -513,7 +513,7 @@
     DWORD       dwRop;
 } IMAGELISTDRAWPARAMS, *LPIMAGELISTDRAWPARAMS;
 
- 
+
 INT      WINAPI ImageList_Add(HIMAGELIST,HBITMAP,HBITMAP);
 INT      WINAPI ImageList_AddIcon (HIMAGELIST, HICON);
 INT      WINAPI ImageList_AddMasked(HIMAGELIST,HBITMAP,COLORREF);
@@ -522,13 +522,13 @@
 HIMAGELIST WINAPI ImageList_Create(INT,INT,UINT,INT,INT);
 BOOL     WINAPI ImageList_Destroy(HIMAGELIST);
 BOOL     WINAPI ImageList_DragEnter(HWND,INT,INT);
-BOOL     WINAPI ImageList_DragLeave(HWND); 
+BOOL     WINAPI ImageList_DragLeave(HWND);
 BOOL     WINAPI ImageList_DragMove(INT,INT);
 BOOL     WINAPI ImageList_DragShowNolock (BOOL);
 BOOL     WINAPI ImageList_Draw(HIMAGELIST,INT,HDC,INT,INT,UINT);
 BOOL     WINAPI ImageList_DrawEx(HIMAGELIST,INT,HDC,INT,INT,INT,
                                    INT,COLORREF,COLORREF,UINT);
-BOOL     WINAPI ImageList_DrawIndirect(IMAGELISTDRAWPARAMS*); 
+BOOL     WINAPI ImageList_DrawIndirect(IMAGELISTDRAWPARAMS*);
 HIMAGELIST WINAPI ImageList_Duplicate(HIMAGELIST);
 BOOL     WINAPI ImageList_EndDrag(VOID);
 COLORREF   WINAPI ImageList_GetBkColor(HIMAGELIST);
@@ -641,17 +641,17 @@
 
 /* Header control */
 
-#define WC_HEADER16		"SysHeader" 
-#define WC_HEADERA		"SysHeader32" 
+#define WC_HEADER16		"SysHeader"
+#define WC_HEADERA		"SysHeader32"
 static const WCHAR WC_HEADERW[] = { 'S','y','s','H','e','a','d','e','r','3','2',0 };
 #define WC_HEADER		WINELIB_NAME_AW(WC_HEADER)
- 
-#define HDS_HORZ                0x0000 
-#define HDS_BUTTONS             0x0002 
-#define HDS_HOTTRACK            0x0004 
-#define HDS_HIDDEN              0x0008 
-#define HDS_DRAGDROP            0x0040 
-#define HDS_FULLDRAG            0x0080 
+
+#define HDS_HORZ                0x0000
+#define HDS_BUTTONS             0x0002
+#define HDS_HOTTRACK            0x0004
+#define HDS_HIDDEN              0x0008
+#define HDS_DRAGDROP            0x0040
+#define HDS_FULLDRAG            0x0080
 
 #define HDI_WIDTH               0x0001
 #define HDI_HEIGHT              HDI_WIDTH
@@ -887,7 +887,7 @@
 
 /* Toolbar */
 
-#define TOOLBARCLASSNAME16      "ToolbarWindow" 
+#define TOOLBARCLASSNAME16      "ToolbarWindow"
 #define TOOLBARCLASSNAMEA       "ToolbarWindow32"
 static const WCHAR TOOLBARCLASSNAMEW[] = { 'T','o','o','l','b','a','r',
   'W','i','n','d','o','w','3','2',0 };
@@ -905,7 +905,7 @@
 #define TBSTATE_MARKED          0x80
 
 
-/* as of _WIN32_IE >= 0x0500 the following symbols are obsolete, 
+/* as of _WIN32_IE >= 0x0500 the following symbols are obsolete,
  * "everyone" should use the BTNS_... stuff below
  */
 #define TBSTYLE_BUTTON          0x00
@@ -932,7 +932,7 @@
 #define TBSTYLE_ALTDRAG         0x0400
 #define TBSTYLE_FLAT            0x0800
 #define TBSTYLE_LIST            0x1000
-#define TBSTYLE_CUSTOMERASE     0x2000 
+#define TBSTYLE_CUSTOMERASE     0x2000
 #define TBSTYLE_REGISTERDROP    0x4000
 #define TBSTYLE_TRANSPARENT     0x8000
 #define TBSTYLE_EX_DRAWDDARROWS         0x00000001
@@ -949,7 +949,7 @@
 #define TBIF_COMMAND            0x00000020
 #define TBIF_SIZE               0x00000040
 
-#define TBBF_LARGE		0x0001 
+#define TBBF_LARGE		0x0001
 
 #define TB_ENABLEBUTTON          (WM_USER+1)
 #define TB_CHECKBUTTON           (WM_USER+2)
@@ -957,9 +957,9 @@
 #define TB_HIDEBUTTON            (WM_USER+4)
 #define TB_INDETERMINATE         (WM_USER+5)
 #define TB_MARKBUTTON		 (WM_USER+6)
-#define TB_ISBUTTONENABLED       (WM_USER+9) 
-#define TB_ISBUTTONCHECKED       (WM_USER+10) 
-#define TB_ISBUTTONPRESSED       (WM_USER+11) 
+#define TB_ISBUTTONENABLED       (WM_USER+9)
+#define TB_ISBUTTONCHECKED       (WM_USER+10)
+#define TB_ISBUTTONPRESSED       (WM_USER+11)
 #define TB_ISBUTTONHIDDEN        (WM_USER+12)
 #define TB_ISBUTTONINDETERMINATE (WM_USER+13)
 #define TB_ISBUTTONHIGHLIGHTED   (WM_USER+14)
@@ -981,8 +981,8 @@
 #define TB_SAVERESTOREW        (WM_USER+76)
 #define TB_SAVERESTORE WINELIB_NAME_AW(TB_SAVERESTORE)
 #define TB_CUSTOMIZE             (WM_USER+27)
-#define TB_ADDSTRINGA          (WM_USER+28) 
-#define TB_ADDSTRINGW          (WM_USER+77) 
+#define TB_ADDSTRINGA          (WM_USER+28)
+#define TB_ADDSTRINGW          (WM_USER+77)
 #define TB_ADDSTRING WINELIB_NAME_AW(TB_ADDSTRING)
 #define TB_GETITEMRECT           (WM_USER+29)
 #define TB_BUTTONSTRUCTSIZE      (WM_USER+30)
@@ -1352,7 +1352,7 @@
 #define HICF_LMOUSE         0x00000080   /* left mouse button selected     */
 #define HICF_TOGGLEDROPDOWN 0x00000100   /* Toggle button's dropdown state */
 
-typedef struct 
+typedef struct
 {
     int   iButton;
     DWORD dwFlags;
@@ -1362,15 +1362,15 @@
 
 HWND WINAPI
 CreateToolbar(HWND, DWORD, UINT, INT, HINSTANCE,
-              UINT, LPCOLDTBBUTTON, INT); 
- 
+              UINT, LPCOLDTBBUTTON, INT);
+
 HWND WINAPI
 CreateToolbarEx(HWND, DWORD, UINT, INT,
-                HINSTANCE, UINT, LPCTBBUTTON, 
-                INT, INT, INT, INT, INT, UINT); 
+                HINSTANCE, UINT, LPCTBBUTTON,
+                INT, INT, INT, INT, INT, UINT);
 
 HBITMAP WINAPI
-CreateMappedBitmap (HINSTANCE, INT, UINT, LPCOLORMAP, INT); 
+CreateMappedBitmap (HINSTANCE, INT, UINT, LPCOLORMAP, INT);
 
 
 /* Tool tips */
@@ -1382,7 +1382,7 @@
 #define TOOLTIPS_CLASS          WINELIB_NAME_AW(TOOLTIPS_CLASS)
 
 #define INFOTIPSIZE             1024
- 
+
 #define TTS_ALWAYSTIP           0x01
 #define TTS_NOPREFIX            0x02
 
@@ -2098,7 +2098,7 @@
 #define TVS_FULLROWSELECT	  0x1000
 #define TVS_NOSCROLL     	  0x2000
 #define TVS_NONEVENHEIGHT	  0x4000
-#define TVS_NOHSCROLL         0x8000 
+#define TVS_NOHSCROLL         0x8000
 
 #define TVS_SHAREDIMAGELISTS  0x0000
 #define TVS_PRIVATEIMAGELISTS 0x0400
@@ -2341,7 +2341,7 @@
 #define TreeView_InsertItemW(hwnd,phdi) \
   (HTREEITEM)SendMessageW((hwnd), TVM_INSERTITEMW, 0, \
                             (LPARAM)(LPTVINSERTSTRUCTW)(phdi))
-#define TreeView_InsertItem WINELIB_NAME_AW(TreeView_InsertItem) 
+#define TreeView_InsertItem WINELIB_NAME_AW(TreeView_InsertItem)
 
 #define TreeView_DeleteItem(hwnd, hItem) \
   (BOOL)SendMessageA((hwnd), TVM_DELETEITEM, 0, (LPARAM)(HTREEITEM)(hItem))
@@ -2416,12 +2416,12 @@
  (BOOL)SendMessageA((hwnd), TVM_GETITEMA, 0, (LPARAM) (TVITEMA *)(pitem))
 #define TreeView_GetItemW(hwnd, pitem) \
  (BOOL)SendMessageW((hwnd), TVM_GETITEMA, 0, (LPARAM) (TVITEMA *)(pitem))
-#define TreeView_GetItem WINELIB_NAME_AW(TreeView_GetItem) 
+#define TreeView_GetItem WINELIB_NAME_AW(TreeView_GetItem)
 
 #define TreeView_SetItemA(hwnd, pitem) \
- (BOOL)SendMessageA((hwnd), TVM_SETITEMA, 0, (LPARAM)(const TVITEMA *)(pitem)) 
+ (BOOL)SendMessageA((hwnd), TVM_SETITEMA, 0, (LPARAM)(const TVITEMA *)(pitem))
 #define TreeView_SetItemW(hwnd, pitem) \
- (BOOL)SendMessageW((hwnd), TVM_SETITEMA, 0, (LPARAM)(const TVITEMA *)(pitem)) 
+ (BOOL)SendMessageW((hwnd), TVM_SETITEMA, 0, (LPARAM)(const TVITEMA *)(pitem))
 #define TreeView_SetItem WINELIB_NAME_AW(TreeView_SetItem)
 
 #define TreeView_EditLabel(hwnd, hitem) \
@@ -2597,7 +2597,7 @@
 #define LVFI_PARAM              0X0001
 #define LVFI_STRING             0X0002
 #define LVFI_PARTIAL            0X0008
-#define LVFI_WRAP               0X0020  
+#define LVFI_WRAP               0X0020
 #define LVFI_NEARESTXY          0X0040
 
 #define LVIF_TEXT               0x0001
@@ -2611,7 +2611,7 @@
 #define LVIR_BOUNDS             0x0000
 #define LVIR_LABEL              0x0002
 #define LVIR_ICON               0x0001
-#define LVIR_SELECTBOUNDS       0x0003 
+#define LVIR_SELECTBOUNDS       0x0003
 
 #define LVIS_FOCUSED            0x0001
 #define LVIS_SELECTED           0x0002
@@ -3181,10 +3181,10 @@
 
 #define ListView_SetItemTextA(hwndLV, i, _iSubItem, _pszText) \
 { LVITEMA _LVi; _LVi.iSubItem = _iSubItem; _LVi.pszText = _pszText;\
-  SendMessageA(hwndLV, LVM_SETITEMTEXTA, (WPARAM)i, (LPARAM) (LVITEMA*)&_LVi);}                
+  SendMessageA(hwndLV, LVM_SETITEMTEXTA, (WPARAM)i, (LPARAM) (LVITEMA*)&_LVi);}
 #define ListView_SetItemTextW(hwndLV, i, _iSubItem, _pszText) \
 { LVITEMW _LVi; _LVi.iSubItem = _iSubItem; _LVi.pszText = _pszText;\
-  SendMessageW(hwndLV, LVM_SETITEMTEXTW, (WPARAM)i, (LPARAM) (LVITEMW*)& _LVi);}                
+  SendMessageW(hwndLV, LVM_SETITEMTEXTW, (WPARAM)i, (LPARAM) (LVITEMW*)& _LVi);}
 #define ListView_SetItemText WINELIB_NAME_AW(ListView_SetItemText)
 
 #define ListView_DeleteItem(hwndLV, i) \
@@ -3755,12 +3755,12 @@
 #define MCN_GETDAYSTATE       (MCN_FIRST + 3)
 #define MCN_SELECT            (MCN_FIRST + 4)
 
-#define MCSC_BACKGROUND   0   
-#define MCSC_TEXT         1   
-#define MCSC_TITLEBK      2   
+#define MCSC_BACKGROUND   0
+#define MCSC_TEXT         1
+#define MCSC_TITLEBK      2
 #define MCSC_TITLETEXT    3
-#define MCSC_MONTHBK      4   
-#define MCSC_TRAILINGTEXT 5   
+#define MCSC_MONTHBK      4
+#define MCSC_TRAILINGTEXT 5
 
 #define MCS_DAYSTATE           0x0001
 #define MCS_MULTISELECT        0x0002
@@ -3772,8 +3772,8 @@
 #define MCHT_CALENDAR          0x00020000
 #define MCHT_TODAYLINK         0x00030000
 
-#define MCHT_NEXT              0x01000000   
-#define MCHT_PREV              0x02000000  
+#define MCHT_NEXT              0x01000000
+#define MCHT_PREV              0x02000000
 #define MCHT_NOWHERE           0x00000000
 #define MCHT_TITLEBK           (MCHT_TITLE)
 #define MCHT_TITLEMONTH        (MCHT_TITLE | 0x0001)
@@ -3790,8 +3790,8 @@
 
 
 
-#define GMR_VISIBLE     0      
-#define GMR_DAYSTATE    1     
+#define GMR_VISIBLE     0
+#define GMR_DAYSTATE    1
 
 
 /*  Month calendar's structures */
@@ -3800,13 +3800,13 @@
 typedef struct {
         UINT cbSize;
         POINT pt;
-        UINT uHit;   
+        UINT uHit;
         SYSTEMTIME st;
 } MCHITTESTINFO, *PMCHITTESTINFO;
 
 typedef struct tagNMSELCHANGE
 {
-    NMHDR           nmhdr; 
+    NMHDR           nmhdr;
     SYSTEMTIME      stSelStart;
     SYSTEMTIME      stSelEnd;
 } NMSELCHANGE, *LPNMSELCHANGE;
@@ -3816,7 +3816,7 @@
 
 typedef struct tagNMDAYSTATE
 {
-    NMHDR           nmhdr;  
+    NMHDR           nmhdr;
     SYSTEMTIME      stStart;
     int             cDayState;
     LPMONTHDAYSTATE prgDayState;
@@ -3903,13 +3903,13 @@
 
 /* Datetime Notifications */
 
-#define DTN_DATETIMECHANGE  (DTN_FIRST + 1) 
-#define DTN_USERSTRINGA     (DTN_FIRST + 2) 
-#define DTN_WMKEYDOWNA      (DTN_FIRST + 3) 
-#define DTN_FORMATA         (DTN_FIRST + 4) 
-#define DTN_FORMATQUERYA    (DTN_FIRST + 5) 
+#define DTN_DATETIMECHANGE  (DTN_FIRST + 1)
+#define DTN_USERSTRINGA     (DTN_FIRST + 2)
+#define DTN_WMKEYDOWNA      (DTN_FIRST + 3)
+#define DTN_FORMATA         (DTN_FIRST + 4)
+#define DTN_FORMATQUERYA    (DTN_FIRST + 5)
 #define DTN_DROPDOWN        (DTN_FIRST + 6)
-#define DTN_CLOSEUP         (DTN_FIRST + 7) 
+#define DTN_CLOSEUP         (DTN_FIRST + 7)
 #define DTN_USERSTRINGW     (DTN_FIRST + 15)
 #define DTN_WMKEYDOWNW      (DTN_FIRST + 16)
 #define DTN_FORMATW         (DTN_FIRST + 17)
@@ -3920,35 +3920,35 @@
 #define DTN_FORMAT          WINELIB_NAME_AW(DTN_FORMAT)
 #define DTN_FORMATQUERY     WINELIB_NAME_AW(DTN_FORMATQUERY)
 
-#define DTS_SHORTDATEFORMAT 0x0000 
-#define DTS_UPDOWN          0x0001 
-#define DTS_SHOWNONE        0x0002 
-#define DTS_LONGDATEFORMAT  0x0004 
-#define DTS_TIMEFORMAT      0x0009 
-#define DTS_APPCANPARSE     0x0010 
-#define DTS_RIGHTALIGN      0x0020 
+#define DTS_SHORTDATEFORMAT 0x0000
+#define DTS_UPDOWN          0x0001
+#define DTS_SHOWNONE        0x0002
+#define DTS_LONGDATEFORMAT  0x0004
+#define DTS_TIMEFORMAT      0x0009
+#define DTS_APPCANPARSE     0x0010
+#define DTS_RIGHTALIGN      0x0020
 
 typedef struct tagNMDATETIMECHANGE
 {
     NMHDR       nmhdr;
-    DWORD       dwFlags;    
-    SYSTEMTIME  st;         
+    DWORD       dwFlags;
+    SYSTEMTIME  st;
 } NMDATETIMECHANGE, *LPNMDATETIMECHANGE;
 
 typedef struct tagNMDATETIMESTRINGA
 {
     NMHDR      nmhdr;
-    LPCSTR     pszUserString; 
-    SYSTEMTIME st;      
-    DWORD      dwFlags;  
+    LPCSTR     pszUserString;
+    SYSTEMTIME st;
+    DWORD      dwFlags;
 } NMDATETIMESTRINGA, *LPNMDATETIMESTRINGA;
 
 typedef struct tagNMDATETIMESTRINGW
 {
     NMHDR      nmhdr;
     LPCWSTR    pszUserString;
-    SYSTEMTIME st;          
-    DWORD      dwFlags;    
+    SYSTEMTIME st;
+    DWORD      dwFlags;
 } NMDATETIMESTRINGW, *LPNMDATETIMESTRINGW;
 
 DECL_WINELIB_TYPE_AW(NMDATETIMESTRING)
@@ -3957,17 +3957,17 @@
 typedef struct tagNMDATETIMEWMKEYDOWNA
 {
     NMHDR      nmhdr;
-    int        nVirtKey;  
-    LPCSTR     pszFormat; 
-    SYSTEMTIME st;       
+    int        nVirtKey;
+    LPCSTR     pszFormat;
+    SYSTEMTIME st;
 } NMDATETIMEWMKEYDOWNA, *LPNMDATETIMEWMKEYDOWNA;
 
 typedef struct tagNMDATETIMEWMKEYDOWNW
 {
     NMHDR      nmhdr;
-    int        nVirtKey;  
-    LPCWSTR    pszFormat; 
-    SYSTEMTIME st;       
+    int        nVirtKey;
+    LPCWSTR    pszFormat;
+    SYSTEMTIME st;
 } NMDATETIMEWMKEYDOWNW, *LPNMDATETIMEWMKEYDOWNW;
 
 DECL_WINELIB_TYPE_AW(NMDATETIMEWMKEYDOWN)
@@ -3976,18 +3976,18 @@
 typedef struct tagNMDATETIMEFORMATA
 {
     NMHDR nmhdr;
-    LPCSTR  pszFormat;   
-    SYSTEMTIME st;      
-    LPCSTR pszDisplay;  
-    CHAR szDisplay[64]; 
+    LPCSTR  pszFormat;
+    SYSTEMTIME st;
+    LPCSTR pszDisplay;
+    CHAR szDisplay[64];
 } NMDATETIMEFORMATA, *LPNMDATETIMEFORMATA;
 
 
 typedef struct tagNMDATETIMEFORMATW
 {
     NMHDR nmhdr;
-    LPCWSTR pszFormat;  
-    SYSTEMTIME st;     
+    LPCWSTR pszFormat;
+    SYSTEMTIME st;
     LPCWSTR pszDisplay;
     WCHAR szDisplay[64];
 } NMDATETIMEFORMATW, *LPNMDATETIMEFORMATW;
@@ -3998,15 +3998,15 @@
 typedef struct tagNMDATETIMEFORMATQUERYA
 {
     NMHDR nmhdr;
-    LPCSTR pszFormat; 
-    SIZE szMax;       
+    LPCSTR pszFormat;
+    SIZE szMax;
 } NMDATETIMEFORMATQUERYA, *LPNMDATETIMEFORMATQUERYA;
 
 typedef struct tagNMDATETIMEFORMATQUERYW
 {
     NMHDR nmhdr;
-    LPCWSTR pszFormat; 
-    SIZE szMax;        
+    LPCWSTR pszFormat;
+    SIZE szMax;
 } NMDATETIMEFORMATQUERYW, *LPNMDATETIMEFORMATQUERYW;
 
 DECL_WINELIB_TYPE_AW(NMDATETIMEFORMATQUERY)
@@ -4023,11 +4023,11 @@
 
 
 #define DateTime_GetSystemtime(hdp, pst)   \
-  (DWORD)SendMessageA (hdp, DTM_GETSYSTEMTIME , 0, (LPARAM)(pst)) 
+  (DWORD)SendMessageA (hdp, DTM_GETSYSTEMTIME , 0, (LPARAM)(pst))
 #define DateTime_SetSystemtime(hdp, gd, pst)   \
   (BOOL)SendMessageA (hdp, DTM_SETSYSTEMTIME, (LPARAM)(gd), (LPARAM)(pst))
 #define DateTime_GetRange(hdp, rgst)  \
-  (DWORD)SendMessageA (hdp, DTM_GETRANGE, 0, (LPARAM)(rgst)) 
+  (DWORD)SendMessageA (hdp, DTM_GETRANGE, 0, (LPARAM)(rgst))
 #define DateTime_SetRange(hdp, gd, rgst) \
    (BOOL)SendMessageA (hdp, DTM_SETRANGE, (WPARAM)(gd), (LPARAM)(rgst))
 #define DateTime_SetFormat WINELIB_NAME_AW(DateTime_SetFormat)
@@ -4101,7 +4101,7 @@
 typedef struct _DPA
 {
     INT    nItemCount;
-    LPVOID   *ptrs; 
+    LPVOID   *ptrs;
     HANDLE hHeap;
     INT    nGrow;
     INT    nMaxCount;
@@ -4125,7 +4125,7 @@
 #define DPAS_SORTED             0x0001
 #define DPAS_INSERTBEFORE       0x0002
 #define DPAS_INSERTAFTER        0x0004
- 
+
 INT  WINAPI DPA_Search (const HDPA, LPVOID, INT, PFNDPACOMPARE, LPARAM, UINT);
 
 #define DPAM_NOSORT             0x0001
diff --git a/include/commdlg.h b/include/commdlg.h
index 0f563fa..7a45061 100644
--- a/include/commdlg.h
+++ b/include/commdlg.h
@@ -45,7 +45,7 @@
 #define OFN_SHAREAWARE               0x00004000
 #define OFN_NOREADONLYRETURN         0x00008000
 #define OFN_NOTESTFILECREATE         0x00010000
-#define OFN_NONETWORKBUTTON          0x00020000 
+#define OFN_NONETWORKBUTTON          0x00020000
 #define OFN_NOLONGNAMES              0x00040000
 #define OFN_EXPLORER                 0x00080000
 #define OFN_NODEREFERENCELINKS       0x00100000
@@ -65,7 +65,7 @@
 
 #define SAVE_DIALOG  1
 #define OPEN_DIALOG  2
-    
+
 typedef UINT (CALLBACK *LPOFNHOOKPROC)(HWND,UINT,WPARAM,LPARAM);
 
 typedef struct {
@@ -133,7 +133,7 @@
 
 DECL_WINELIB_TYPE_AW(OFNOTIFY)
 DECL_WINELIB_TYPE_AW(LPOFNOTIFY)
- 
+
 typedef UINT (CALLBACK *LPCCHOOKPROC) (HWND, UINT, WPARAM, LPARAM);
 
 typedef struct {
@@ -205,10 +205,10 @@
         LPFRHOOKPROC    lpfnHook;
 	LPCWSTR		lpTemplateName;
 } FINDREPLACEW, *LPFINDREPLACEW;
-	
+
 DECL_WINELIB_TYPE_AW(FINDREPLACE)
 DECL_WINELIB_TYPE_AW(LPFINDREPLACE)
-	
+
 #define FR_DOWN                         0x00000001
 #define FR_WHOLEWORD                    0x00000002
 #define FR_MATCHCASE                    0x00000004
@@ -231,42 +231,42 @@
 
 typedef struct
 {
-	UINT  	lStructSize; 
-	HWND 		hwndOwner; 
-	HDC  		hDC; 
-	LPLOGFONTA    lpLogFont; 
-	INT		iPointSize; 
-	DWORD		Flags; 
-	COLORREF	rgbColors; 
-	LPARAM		lCustData; 
-	LPCFHOOKPROC 	lpfnHook; 
-	LPCSTR		lpTemplateName; 
-	HINSTANCE	hInstance; 
-	LPSTR		lpszStyle; 
-	WORD		nFontType; 
-	WORD	___MISSING_ALIGNMENT__; 
-	INT   	nSizeMin; 
-	INT		nSizeMax; 
+	UINT  	lStructSize;
+	HWND 		hwndOwner;
+	HDC  		hDC;
+	LPLOGFONTA    lpLogFont;
+	INT		iPointSize;
+	DWORD		Flags;
+	COLORREF	rgbColors;
+	LPARAM		lCustData;
+	LPCFHOOKPROC 	lpfnHook;
+	LPCSTR		lpTemplateName;
+	HINSTANCE	hInstance;
+	LPSTR		lpszStyle;
+	WORD		nFontType;
+	WORD	___MISSING_ALIGNMENT__;
+	INT   	nSizeMin;
+	INT		nSizeMax;
 } CHOOSEFONTA, *LPCHOOSEFONTA;
 
 typedef struct
 {
-	UINT  	lStructSize; 
-	HWND 		hwndOwner; 
-	HDC  		hDC; 
-	LPLOGFONTW    lpLogFont; 
-	INT		iPointSize; 
-	DWORD		Flags; 
-	COLORREF	rgbColors; 
-	LPARAM		lCustData; 
-	LPCFHOOKPROC 	lpfnHook; 
-	LPCWSTR		lpTemplateName; 
-	HINSTANCE	hInstance; 
-	LPWSTR		lpszStyle; 
-	WORD		nFontType; 
-	WORD	___MISSING_ALIGNMENT__; 
-	INT   	nSizeMin; 
-	INT		nSizeMax; 
+	UINT  	lStructSize;
+	HWND 		hwndOwner;
+	HDC  		hDC;
+	LPLOGFONTW    lpLogFont;
+	INT		iPointSize;
+	DWORD		Flags;
+	COLORREF	rgbColors;
+	LPARAM		lCustData;
+	LPCFHOOKPROC 	lpfnHook;
+	LPCWSTR		lpTemplateName;
+	HINSTANCE	hInstance;
+	LPWSTR		lpszStyle;
+	WORD		nFontType;
+	WORD	___MISSING_ALIGNMENT__;
+	INT   	nSizeMin;
+	INT		nSizeMax;
 } CHOOSEFONTW, *LPCHOOSEFONTW;
 
 DECL_WINELIB_TYPE_AW(CHOOSEFONT)
@@ -627,7 +627,7 @@
 BOOL  WINAPI ChooseFontW(LPCHOOSEFONTW);
 #define ChooseFont WINELIB_NAME_AW(ChooseFont)
 
-void COMDLG32_SetCommDlgExtendedError(DWORD err); 
+void COMDLG32_SetCommDlgExtendedError(DWORD err);
 
 
 #include "poppack.h"
diff --git a/include/cursoricon.h b/include/cursoricon.h
index 8b39444..f902d34 100644
--- a/include/cursoricon.h
+++ b/include/cursoricon.h
@@ -91,8 +91,8 @@
                                 int width, int height, int colors,
                                 BOOL fCursor, UINT loadflags);
 
-extern HGLOBAL CURSORICON_ExtCopy(HGLOBAL handle, UINT type, 
-				  INT desiredx, INT desiredy, 
+extern HGLOBAL CURSORICON_ExtCopy(HGLOBAL handle, UINT type,
+				  INT desiredx, INT desiredy,
 				  UINT flags);
 extern void CURSORICON_FreeModuleIcons( HMODULE hModule );
 
diff --git a/include/d3d.h b/include/d3d.h
index c65b1d6..8d6d956 100644
--- a/include/d3d.h
+++ b/include/d3d.h
@@ -234,7 +234,7 @@
     IDirect3D2_METHODS
 ICOM_DEFINE(IDirect3D2,IUnknown)
 #undef ICOM_INTERFACE
-  
+
 /*** IUnknown methods ***/
 #define IDirect3D2_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
 #define IDirect3D2_AddRef(p)             ICOM_CALL (AddRef,p)
@@ -267,7 +267,7 @@
     IDirect3D3_METHODS
 ICOM_DEFINE(IDirect3D3,IUnknown)
 #undef ICOM_INTERFACE
-  
+
 /*** IUnknown methods ***/
 #define IDirect3D3_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
 #define IDirect3D3_AddRef(p)             ICOM_CALL (AddRef,p)
@@ -324,7 +324,7 @@
     IDirect3DLight_METHODS
 ICOM_DEFINE(IDirect3DLight,IUnknown)
 #undef ICOM_INTERFACE
-  
+
 /*** IUnknown methods ***/
 #define IDirect3DLight_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
 #define IDirect3DLight_AddRef(p)             ICOM_CALL (AddRef,p)
@@ -387,7 +387,7 @@
 #define IDirect3DMaterial2_SetMaterial(p,a) ICOM_CALL1(SetMaterial,p,a)
 #define IDirect3DMaterial2_GetMaterial(p,a) ICOM_CALL1(GetMaterial,p,a)
 #define IDirect3DMaterial2_GetHandle(p,a,b) ICOM_CALL2(GetHandle,p,a,b)
-  
+
 
 /*****************************************************************************
  * IDirect3DMaterial3 interface
@@ -411,7 +411,7 @@
 #define IDirect3DMaterial3_SetMaterial(p,a) ICOM_CALL1(SetMaterial,p,a)
 #define IDirect3DMaterial3_GetMaterial(p,a) ICOM_CALL1(GetMaterial,p,a)
 #define IDirect3DMaterial3_GetHandle(p,a,b) ICOM_CALL2(GetHandle,p,a,b)
-  
+
 
 /*****************************************************************************
  * IDirect3DTexture interface
@@ -983,7 +983,7 @@
 #define IDirect3DVertexBuffer_ProcessVertices(p,a,b,c,d,e,f,g) ICOM_CALL7(ProcessVertices,p,a,b,c,d,e,f,g)
 #define IDirect3DVertexBuffer_GetVertexBufferDesc(p,a)         ICOM_CALL1(GetVertexBufferDesc,p,a)
 #define IDirect3DVertexBuffer_Optimize(p,a,b)                  ICOM_CALL2(Optimize,p,a,b)
-  
+
 /*****************************************************************************
  * IDirect3DVertexBuffer7 interface
  */
diff --git a/include/d3dtypes.h b/include/d3dtypes.h
index effd5fe..908ff24 100644
--- a/include/d3dtypes.h
+++ b/include/d3dtypes.h
@@ -696,7 +696,7 @@
   D3DTBLEND_ADD           = 8,
   D3DTBLEND_FORCE_DWORD   = 0x7fffffff
 } D3DTEXTUREBLEND;
- 
+
 typedef enum _D3DTEXTUREADDRESS {
     D3DTADDRESS_WRAP           = 1,
     D3DTADDRESS_MIRROR         = 2,
diff --git a/include/dde.h b/include/dde.h
index 7062c90..d80888f 100644
--- a/include/dde.h
+++ b/include/dde.h
@@ -75,7 +75,7 @@
 BOOL WINAPI DdeSetQualityOfService(HWND hwndClient,
 				   CONST SECURITY_QUALITY_OF_SERVICE *pqosNew,
 				   PSECURITY_QUALITY_OF_SERVICE pqosPrev);
- 
+
 BOOL WINAPI ImpersonateDdeClientWindow(HWND hWndClient, HWND hWndServer);
 
 /* lParam packing/unpacking API */
diff --git a/include/ddeml.h b/include/ddeml.h
index b055f8f..5b7a576 100644
--- a/include/ddeml.h
+++ b/include/ddeml.h
@@ -34,7 +34,7 @@
 #define CP_WINANSI      1004
 #define CP_WINUNICODE   1200
 
-/* DDE synchronisation constants 
+/* DDE synchronisation constants
  */
 
 #define MSGF_DDEMGR 0x8001
@@ -348,7 +348,7 @@
 BOOL      WINAPI DdeFreeDataHandle(HDDEDATA);
 BOOL      WINAPI DdeKeepStringHandle(DWORD,HSZ);
 HDDEDATA  WINAPI DdeClientTransaction(LPBYTE,DWORD,HCONV,HSZ,UINT,UINT,DWORD,LPDWORD);
-BOOL	  WINAPI DdeAbandonTransaction(DWORD idInst, HCONV hConv, DWORD idTransaction); 
+BOOL	  WINAPI DdeAbandonTransaction(DWORD idInst, HCONV hConv, DWORD idTransaction);
 BOOL      WINAPI DdeImpersonateClient(HCONV);
 BOOL      WINAPI DdePostAdvise(DWORD,HSZ,HSZ);
 HDDEDATA  WINAPI DdeAddData(HDDEDATA,LPBYTE,DWORD,DWORD);
diff --git a/include/ddraw.h b/include/ddraw.h
index 7ac35da..29e7943 100644
--- a/include/ddraw.h
+++ b/include/ddraw.h
@@ -965,7 +965,7 @@
 		DWORD	dwMipMapCount;/* 18:number of mip-map levels requested*/
 		DWORD	dwZBufferBitDepth;/*18: depth of Z buffer requested*/
 		DWORD	dwRefreshRate;/* 18:refresh rate (used when display mode is described)*/
-	} DUMMYUNIONNAME2;		
+	} DUMMYUNIONNAME2;
 	DWORD	dwAlphaBitDepth;/* 1C:depth of alpha buffer requested*/
 	DWORD	dwReserved;	/* 20:reserved*/
 	LPVOID	lpSurface;	/* 24:pointer to the associated surface memory*/
@@ -1006,7 +1006,7 @@
 
 	union {
 		DDPIXELFORMAT	ddpfPixelFormat;/* 48: pixel format description of the surface*/
-		DWORD 		dwFVF;	/* 48: vertex format description of vertex buffers */	
+		DWORD 		dwFVF;	/* 48: vertex format description of vertex buffers */
 	} DUMMYUNIONNAME4;
 	DDSCAPS2	ddsCaps;  /* 68: DDraw surface caps */
 	DWORD		dwTextureStage; /* 78: stage in multitexture cascade */
@@ -1320,7 +1320,7 @@
 /*****************************************************************************
  * IDirectDraw2 interface
  */
-/* Note: IDirectDraw2 cannot derive from IDirectDraw because the number of 
+/* Note: IDirectDraw2 cannot derive from IDirectDraw because the number of
  * arguments of SetDisplayMode has changed !
  */
 #define ICOM_INTERFACE IDirectDraw2
@@ -1622,7 +1622,7 @@
 /*****************************************************************************
  * IDirectDrawSurface2 interface
  */
-/* Cannot inherit from IDirectDrawSurface because the LPDIRECTDRAWSURFACE parameters 
+/* Cannot inherit from IDirectDrawSurface because the LPDIRECTDRAWSURFACE parameters
  * have been converted to LPDIRECTDRAWSURFACE2.
  */
 #define ICOM_INTERFACE IDirectDrawSurface2
@@ -1717,7 +1717,7 @@
 /*****************************************************************************
  * IDirectDrawSurface3 interface
  */
-/* Cannot inherit from IDirectDrawSurface2 because the LPDIRECTDRAWSURFACE2 parameters 
+/* Cannot inherit from IDirectDrawSurface2 because the LPDIRECTDRAWSURFACE2 parameters
  * have been converted to LPDIRECTDRAWSURFACE3.
  */
 #define ICOM_INTERFACE IDirectDrawSurface3
diff --git a/include/dinput.h b/include/dinput.h
index d8ce8d1..9eb90e1 100644
--- a/include/dinput.h
+++ b/include/dinput.h
@@ -788,8 +788,8 @@
   CHAR        szFriendlyName[MAX_PATH];
 } DIFILEEFFECT, *LPDIFILEEFFECT;
 
-typedef const DIFILEEFFECT *LPCDIFILEEFFECT;                                            
-typedef BOOL (CALLBACK *LPDIENUMEFFECTSINFILECALLBACK)(LPCDIFILEEFFECT , LPVOID); 
+typedef const DIFILEEFFECT *LPCDIFILEEFFECT;
+typedef BOOL (CALLBACK *LPDIENUMEFFECTSINFILECALLBACK)(LPCDIFILEEFFECT , LPVOID);
 
 
 /*****************************************************************************
@@ -1092,7 +1092,7 @@
 	/*** IDirectInput7A methods ***/
 #define IDirectInput7A_CreateDeviceEx(p,a,b,c,d) ICOM_CALL4(CreateDeviceEx,p,a,b,c,d)
 
-/* Export functions */ 
+/* Export functions */
 
 #ifdef __cplusplus
 extern "C" {
diff --git a/include/dispdib.h b/include/dispdib.h
index aaae52c..d4702e7 100644
--- a/include/dispdib.h
+++ b/include/dispdib.h
@@ -1,6 +1,6 @@
 /*
  * DISPDIB.dll
- * 
+ *
  * Copyright 1998 Ove KÅven
  *
  * This library is free software; you can redistribute it and/or
diff --git a/include/dlgs.h b/include/dlgs.h
index 74c5772..0debdc6 100644
--- a/include/dlgs.h
+++ b/include/dlgs.h
@@ -204,7 +204,7 @@
 #define FORMATDLGORD31		1543
 #define FORMATDLGORD30		1544
 #define PAGESETUPDLGORD		1546
-#define NEWFILEOPENORD		1547 
+#define NEWFILEOPENORD		1547
 #define PRINTDLGEXORD		1549
 #define PAGESETUPDLGORDMOTIF	1550
 #define COLORMGMTDLGORD		1551
diff --git a/include/docobj.h b/include/docobj.h
index 7b0e54f..4cbdaef 100644
--- a/include/docobj.h
+++ b/include/docobj.h
@@ -60,8 +60,8 @@
 	WCHAR rgwz[1];
 } OLECMDTEXT;
 
-typedef enum 
-{ 
+typedef enum
+{
 	PRINTFLAG_MAYBOTHERUSER = 1,
 	PRINTFLAG_PROMPTUSER  = 2,
 	PRINTFLAG_USERMAYCHANGEPRINTER  = 4,
@@ -93,7 +93,7 @@
 	OLECMDTEXTF_STATUS  = 2
 } OLECMDTEXTF;
 
-typedef enum 
+typedef enum
 {
 	OLECMDEXECOPT_DODEFAULT = 0,
 	OLECMDEXECOPT_PROMPTUSER  = 1,
@@ -144,39 +144,39 @@
 	OLECMDID_PREREFRESH = 39
 	/* iexplorer uses ... 44 */
 }	OLECMDID;
-															  
+
 #define OLECMDERR_E_FIRST            (OLE_E_LAST+1)
 #define OLECMDERR_E_NOTSUPPORTED     (OLECMDERR_E_FIRST)
 #define OLECMDERR_E_DISABLED         (OLECMDERR_E_FIRST+1)
 #define OLECMDERR_E_NOHELP           (OLECMDERR_E_FIRST+2)
 #define OLECMDERR_E_CANCELED         (OLECMDERR_E_FIRST+3)
 #define OLECMDERR_E_UNKNOWNGROUP     (OLECMDERR_E_FIRST+4)
- 
+
 /*****************************************************************************
  * Predeclare the interfaces
  */
 DEFINE_GUID(IID_IOleDocument, 0xb722bcc5,0x4e68,0x101b,0xa2,0xbc,0x00,0xaa,0x00,0x40,0x47,0x70);
 typedef struct IOleDocument IOleDocument, *LPOLEDOCUMENT;
- 
+
 DEFINE_GUID(IID_IOleDocumentSite, 0xb722bcc7,0x4e68,0x101b,0xa2,0xbc,0x00,0xaa,0x00,0x40,0x47,0x70);
 typedef struct IOleDocumentSite IOleDocumentSite, *LPOLEDOCUMENTSITE;
- 
+
 DEFINE_GUID(IID_IOleDocumentView, 0xb722bcc6,0x4e68,0x101b,0xa2,0xbc,0x00,0xaa,0x00,0x40,0x47,0x70);
 typedef struct IOleDocumentView IOleDocumentView, *LPOLEDOCUMENTVIEW;
- 
+
 DEFINE_GUID(IID_IEnumOleDocumentViews, 0xb722bcc6,0x4e68,0x101b,0xa2,0xbc,0x00,0xaa,0x00,0x40,0x47,0x70);
 typedef struct IEnumOleDocumentViews IEnumOleDocumentViews, *LPENUMOLEDOCUMENTVIEWS;
- 
+
 DEFINE_GUID(IID_IOleCommandTarget, 0xb722bccb,0x4e68,0x101b,0xa2,0xbc,0x00,0xaa,0x00,0x40,0x47,0x70);
 typedef struct IOleCommandTarget IOleCommandTarget, *LPOLECOMMANDTARGET;
- 
+
 DEFINE_GUID(IID_IContinueCallback, 0xb722bcca,0x4e68,0x101b,0xa2,0xbc,0x00,0xaa,0x00,0x40,0x47,0x70);
 typedef struct IContinueCallback IContinueCallback, *LPCONTINUECALLBACK;
- 
+
 DEFINE_GUID(IID_IPrint, 0xb722bcc9,0x4e68,0x101b,0xa2,0xbc,0x00,0xaa,0x00,0x40,0x47,0x70);
 typedef struct IPrint IPrint, *LPPRINT;
- 
- 
+
+
 /*****************************************************************************
  * IOleDocument interface
  */
@@ -238,7 +238,7 @@
 	ICOM_METHOD1(HRESULT,CloseView, DWORD,dwReserved) \
 	ICOM_METHOD1(HRESULT,SaveViewState, LPSTREAM,pstm) \
 	ICOM_METHOD1(HRESULT,ApplyViewState,LPSTREAM,pstm) \
-	ICOM_METHOD2(HRESULT,Clone, IOleInPlaceSite*,pIPSiteNew, IOleDocumentView**,ppViewNew) 
+	ICOM_METHOD2(HRESULT,Clone, IOleInPlaceSite*,pIPSiteNew, IOleDocumentView**,ppViewNew)
 #define IOleDocumentView_IMETHODS \
 	IUnknown_IMETHODS \
 	IOleDocumentView_METHODS
@@ -273,7 +273,7 @@
 	ICOM_METHOD3(HRESULT,Next, ULONG,cViews, IOleDocumentView**,rgpView, ULONG*,pcFetched) \
 	ICOM_METHOD1(HRESULT,Skip, ULONG,cViews) \
 	ICOM_METHOD (HRESULT,Reset) \
-	ICOM_METHOD1(HRESULT,Clone, IEnumOleDocumentViews**,ppEnum) 
+	ICOM_METHOD1(HRESULT,Clone, IEnumOleDocumentViews**,ppEnum)
 #define IEnumOleDocumentViews_IMETHODS \
 	IUnknown_IMETHODS \
 	IEnumOleDocumentViews_METHODS
@@ -290,7 +290,7 @@
 #define IEnumOleDocumentViews_Reset(p)                ICOM_CALL (Reset,p)
 #define IEnumOleDocumentViews_Clone(p,a)              ICOM_CALL1(Clone,p,a)
 
-				  
+
 /*****************************************************************************
  * IOleCommandTarget interface
  */
@@ -342,13 +342,13 @@
 #define IPrint_METHODS \
 	ICOM_METHOD1(HRESULT,SetInitialPageNum, LONG,nFirstPage) \
 	ICOM_METHOD2(HRESULT,GetPageInfo, LONG*,pnFirstPage, LONG*,pcPages) \
-	ICOM_METHOD8(HRESULT,Print, DWORD,grfFlags, DVTARGETDEVICE**,pptd, PAGESET**,ppPageSet, STGMEDIUM*,pstgmOptions, IContinueCallback*,pcallback, LONG,nFirstPage, LONG*,pcPagesPrinted, LONG*,pnLastPage) 
+	ICOM_METHOD8(HRESULT,Print, DWORD,grfFlags, DVTARGETDEVICE**,pptd, PAGESET**,ppPageSet, STGMEDIUM*,pstgmOptions, IContinueCallback*,pcallback, LONG,nFirstPage, LONG*,pcPagesPrinted, LONG*,pnLastPage)
 #define IPrint_IMETHODS \
 	IUnknown_IMETHODS \
 	IPrint_METHODS
 ICOM_DEFINE(IPrint,IUnknown)
 #undef ICOM_INTERFACE
-				
+
 /*** IUnknown methods ***/
 #define IPrint_QueryInterface(p,a,b)   ICOM_CALL2(QueryInterface,p,a,b)
 #define IPrint_AddRef(p)               ICOM_CALL (AddRef,p)
@@ -357,8 +357,8 @@
 #define IPrint_SetInitialPageNum(p,a)  ICOM_CALL1(SetInitialPageNum,p,a)
 #define IPrint_GetPageInfo(p,a,b)      ICOM_CALL2(GetPageInfo,p,a,b)
 #define IPrint_Print(p,a,b,c,d,e,f,g)  ICOM_CALL7(Print,p,a,b,c,d,e,f,g)
-				
-				
+
+
 #define LPMSODOCUMENT                  LPOLEDOCUMENT
 #define LPMSODOCUMENTSITE              LPOLEDOCUMENTSITE
 #define LPMSOVIEW                      LPOLEDOCUMENTVIEW
@@ -369,6 +369,6 @@
 #define IID_IMsoView                   IID_IOleDocumentView
 #define IID_IEnumMsoView               IID_IEnumOleDocumentViews
 #define IID_IMsoCommandTarget          IID_IOleCommandTarget
-				
+
 
 #endif /* __WINE_DOCOBJ_H */
diff --git a/include/dplay.h b/include/dplay.h
index 4524084..882aefc 100644
--- a/include/dplay.h
+++ b/include/dplay.h
@@ -168,12 +168,12 @@
 typedef struct tagDPCAPS
 {
     DWORD dwSize;               /* Size of structure in bytes */
-    DWORD dwFlags;              
-    DWORD dwMaxBufferSize;      
+    DWORD dwFlags;
+    DWORD dwMaxBufferSize;
     DWORD dwMaxQueueSize;       /* Obsolete. */
     DWORD dwMaxPlayers;         /* Maximum players/groups (local + remote) */
     DWORD dwHundredBaud;        /* Bandwidth in 100 bits per second units;
-                                 * i.e. 24 is 2400, 96 is 9600, etc. 
+                                 * i.e. 24 is 2400, 96 is 9600, etc.
                                  */
     DWORD dwLatency;            /* Estimated latency; 0 = unknown */
     DWORD dwMaxLocalPlayers;    /* Maximum # of locally created players */
@@ -186,19 +186,19 @@
 
 typedef struct tagDPNAME
 {
-    DWORD   dwSize;             
+    DWORD   dwSize;
     DWORD   dwFlags;            /* Not used must be 0 */
 
     union /*playerShortName */      /* Player's Handle? */
-    {                           
-        LPWSTR  lpszShortName;  
-        LPSTR   lpszShortNameA; 
+    {
+        LPWSTR  lpszShortName;
+        LPSTR   lpszShortNameA;
     } DUMMYUNIONNAME1;
 
     union /*playerLongName */       /* Player's formal/real name */
-    {                         
-        LPWSTR  lpszLongName;  
-        LPSTR   lpszLongNameA;  
+    {
+        LPWSTR  lpszLongName;
+        LPSTR   lpszLongNameA;
     } DUMMYUNIONNAME2;
 
 } DPNAME, *LPDPNAME;
@@ -230,31 +230,31 @@
 
 typedef struct tagDPSESSIONDESC2
 {
-    DWORD   dwSize;             
-    DWORD   dwFlags;           
-    GUID    guidInstance;      
+    DWORD   dwSize;
+    DWORD   dwFlags;
+    GUID    guidInstance;
     GUID    guidApplication;   /* GUID of the DP application, GUID_NULL if
                                 * all applications! */
-                               
-    DWORD   dwMaxPlayers;      
+
+    DWORD   dwMaxPlayers;
     DWORD   dwCurrentPlayers;   /* (read only value) */
 
     union  /* Session name */
-    {                             
-        LPWSTR  lpszSessionName;  
-        LPSTR   lpszSessionNameA; 
+    {
+        LPWSTR  lpszSessionName;
+        LPSTR   lpszSessionNameA;
     } DUMMYUNIONNAME1;
 
     union  /* Optional password */
-    {                           
-        LPWSTR  lpszPassword;   
-        LPSTR   lpszPasswordA;  
+    {
+        LPWSTR  lpszPassword;
+        LPSTR   lpszPasswordA;
     } DUMMYUNIONNAME2;
 
-    DWORD   dwReserved1;       
+    DWORD   dwReserved1;
     DWORD   dwReserved2;
 
-    DWORD   dwUser1;        /* For use by the application */  
+    DWORD   dwUser1;        /* For use by the application */
     DWORD   dwUser2;
     DWORD   dwUser3;
     DWORD   dwUser4;
@@ -279,11 +279,11 @@
 
 typedef struct tagDPLCONNECTION
 {
-    DWORD               dwSize;          
-    DWORD               dwFlags;          
-    LPDPSESSIONDESC2    lpSessionDesc;  /* Ptr to session desc to use for connect */  
+    DWORD               dwSize;
+    DWORD               dwFlags;
+    LPDPSESSIONDESC2    lpSessionDesc;  /* Ptr to session desc to use for connect */
     LPDPNAME            lpPlayerName;   /* Ptr to player name structure */
-    GUID                guidSP;         /* GUID of Service Provider to use */ 
+    GUID                guidSP;         /* GUID of Service Provider to use */
     LPVOID              lpAddress;      /* Ptr to Address of Service Provider to use */
     DWORD               dwAddressSize;  /* Size of address data */
 } DPLCONNECTION, *LPDPLCONNECTION;
@@ -366,7 +366,7 @@
     LPGUID      lpguidSP,
     LPSTR       lpSPName,       /* ptr to str w/ driver description */
     DWORD       dwMajorVersion, /* Major # of driver spec in lpguidSP */
-    DWORD       dwMinorVersion, /* Minor # of driver spec in lpguidSP */ 
+    DWORD       dwMinorVersion, /* Minor # of driver spec in lpguidSP */
     LPVOID      lpContext);     /* User given */
 
 #ifndef __LPCGUID_DEFINED__
@@ -633,7 +633,7 @@
 #define IDirectPlay3_GetPlayerFlags(p,a,b)                 ICOM_CALL2(GetPlayerFlags,p,a,b)
 
 /*****************************************************************************
- * IDirectPlay4 and IDirectPlay4A interface 
+ * IDirectPlay4 and IDirectPlay4A interface
  */
 #define ICOM_INTERFACE IDirectPlay4
 #define IDirectPlay4_METHODS \
@@ -646,7 +646,7 @@
 
 #define IDirectPlay4_IMETHODS \
     IDirectPlay3_IMETHODS \
-    IDirectPlay4_METHODS 
+    IDirectPlay4_METHODS
 ICOM_DEFINE(IDirectPlay4,IDirectPlay3)
 #undef ICOM_INTERFACE
 
@@ -732,7 +732,7 @@
 #define DPENUMGROUPS_HIDDEN         0x00001000
 
 
-/* For DirectPlay::CreatePlayer */ 
+/* For DirectPlay::CreatePlayer */
 #define DPPLAYER_SERVERPLAYER  DPENUMPLAYERS_SERVERPLAYER
 #define DPPLAYER_SPECTATOR     DPENUMPLAYERS_SPECTATOR
 #define DPPLAYER_LOCAL         DPENUMPLAYERS_LOCAL
@@ -780,8 +780,8 @@
 #define DPSEND_MAX_PRIORITY  DPSEND_MAX_PRI
 
 
-/* For  DirectPlay::SetGroupData, DirectPlay::SetGroupName, 
- * DirectPlay::SetPlayerData, DirectPlay::SetPlayerName and 
+/* For  DirectPlay::SetGroupData, DirectPlay::SetGroupName,
+ * DirectPlay::SetPlayerData, DirectPlay::SetPlayerName and
  * DirectPlay::SetSessionDesc.
  */
 #define DPSET_REMOTE      0x00000000
@@ -846,7 +846,7 @@
 /* An async send is done (finished normally, failed or cancelled) */
 #define DPSYS_SENDCOMPLETE          0x010d
 
-/** DirectPlay System Messages **/ 
+/** DirectPlay System Messages **/
 
 #define DPPLAYERTYPE_GROUP   0x00000000
 #define DPPLAYERTYPE_PLAYER  0x00000001
@@ -856,7 +856,7 @@
 typedef struct tagDPMSG_GENERIC
 {
    DWORD       dwType; /* Use message type as described above */
-} DPMSG_GENERIC,     *LPDPMSG_GENERIC, 
+} DPMSG_GENERIC,     *LPDPMSG_GENERIC,
   DPMSG_HOST,        *LPDPMSG_HOST,
   DPMSG_SESSIONLOST, *LPDPMSG_SESSIONLOST;
 
@@ -871,9 +871,9 @@
    DPNAME  dpnName;          /* Name info */
 
    /* dpIdParent and dwFlags are only valid in DirectPlay3 and later. What
-    * does that mean about the message size before? -PH */ 
+    * does that mean about the message size before? -PH */
    DPID   dpIdParent;  /* id of parent group */
-   DWORD  dwFlags;     /* Flags for the player/group */ 
+   DWORD  dwFlags;     /* Flags for the player/group */
 } DPMSG_CREATEPLAYERORGROUP, *LPDPMSG_CREATEPLAYERORGROUP;
 
 typedef struct tagDPMSG_DESTROYPLAYERORGROUP
@@ -899,8 +899,8 @@
    DWORD  dwType;      /* Use message type as described above */
    DPID   dpIdGroup;   /* Group ID to add player into */
    DPID   dpIdPlayer;  /* ID of player to add */
-} DPMSG_ADDPLAYERTOGROUP,      *LPDPMSG_ADDPLAYERTOGROUP, 
-  DPMSG_DELETEPLAYERFROMGROUP, *LPDPMSG_DELETEPLAYERFROMGROUP; 
+} DPMSG_ADDPLAYERTOGROUP,      *LPDPMSG_ADDPLAYERTOGROUP,
+  DPMSG_DELETEPLAYERFROMGROUP, *LPDPMSG_DELETEPLAYERFROMGROUP;
 
 /* NOTE: DPMSG_ADDGROUPTOGROUP and DPMSG_DELETEGROUPFROMGROUP are the same */
 typedef struct tagDPMSG_ADDGROUPTOGROUP
@@ -914,7 +914,7 @@
 typedef struct tagDPMSG_SETPLAYERORGROUPDATA
 {
    DWORD   dwType;       /* Use message type as described above */
-   DWORD   dwPlayerType; /* Use DPPLAYERTYPE_GROUP or DPPLAYERTYPE_PLAYER */ 
+   DWORD   dwPlayerType; /* Use DPPLAYERTYPE_GROUP or DPPLAYERTYPE_PLAYER */
    DPID    dpId;         /* ID of player/group */
    LPVOID  lpData;       /* Pointer to data */
    DWORD   dwDataSize;   /* Size of data */
@@ -971,14 +971,14 @@
 {
    DWORD    dwType;      /* Use message type as described above */
    DPID     idFrom;      /* ID from */
-   DPID     idTo;        /* ID to */ 
-   DWORD    dwFlags;    
+   DPID     idTo;        /* ID to */
+   DWORD    dwFlags;
    DWORD    dwPriority;
    DWORD    dwTimeout;
    LPVOID   lpvContext;
    DWORD    dwMsgID;
    HRESULT  hr;
-   DWORD    dwSendTime;  /* When sent ? */ 
+   DWORD    dwSendTime;  /* When sent ? */
 } DPMSG_SENDCOMPLETE, *LPDPMSG_SENDCOMPLETE;
 
 
diff --git a/include/dplobby.h b/include/dplobby.h
index 289220b..470b2ad 100644
--- a/include/dplobby.h
+++ b/include/dplobby.h
@@ -54,7 +54,7 @@
  * DirectPlayLobby Property GUIDs used in lobby messages
  */
 
-/* DPLPROPERTY_MessagesSupported {762CCDA1-D916-11d0-BA39-00C04FD7ED67}. 
+/* DPLPROPERTY_MessagesSupported {762CCDA1-D916-11d0-BA39-00C04FD7ED67}.
  * Purpose: Request if the lobby supports standard (?).
  * Response: Answer is a BOOL. TRUE if supports the standard (?) and FALSE otherwise. Of course, it might not respond at all.
  */
@@ -62,7 +62,7 @@
 
 /* DPLPROPERTY_LobbyGuid {F56920A0-D218-11d0-BA39-00C04FD7ED67}.
  * Purpose: Request the GUID that identifies the lobby version that the application is communicating with.
- * Response: The GUID which identifies the lobby version 
+ * Response: The GUID which identifies the lobby version
  */
 DEFINE_GUID(DPLPROPERTY_LobbyGuid, 0xf56920a0, 0xd218, 0x11d0, 0xba, 0x39, 0x0, 0xc0, 0x4f, 0xd7, 0xed, 0x67);
 
@@ -199,8 +199,8 @@
  * EnumAddresses function is used to parse the address data chunks.
  */
 
-/* DPAID_TotalSize {1318F560-912C-11d0-9DAA-00A0C90A43CB} 
- * Chunk purpose: Chunk is a DWORD containing the size of the entire DPADDRESS struct 
+/* DPAID_TotalSize {1318F560-912C-11d0-9DAA-00A0C90A43CB}
+ * Chunk purpose: Chunk is a DWORD containing the size of the entire DPADDRESS struct
  */
 DEFINE_GUID(DPAID_TotalSize, 0x1318f560, 0x912c, 0x11d0, 0x9d, 0xaa, 0x0, 0xa0, 0xc9, 0xa, 0x43, 0xcb);
 
@@ -216,7 +216,7 @@
 
 /* DPAID_Phone  {78EC89A0-E0AF-11cf-9C4E-00A0C905425E} -- ANSI
  * DPAID_PhoneW {BA5A7A70-9DBF-11d0-9CC1-00A0C905425E} -- UNICODE
- * Chunk purpose: Chunk is a phone number in ANSI or UNICODE format 
+ * Chunk purpose: Chunk is a phone number in ANSI or UNICODE format
  */
 DEFINE_GUID(DPAID_Phone, 0x78ec89a0, 0xe0af, 0x11cf, 0x9c, 0x4e, 0x0, 0xa0, 0xc9, 0x5, 0x42, 0x5e);
 DEFINE_GUID(DPAID_PhoneW, 0xba5a7a70, 0x9dbf, 0x11d0, 0x9c, 0xc1, 0x0, 0xa0, 0xc9, 0x5, 0x42, 0x5e);
@@ -255,7 +255,7 @@
 
 
 /* Used for specification of a communication port. Baud rate, stop bits and
- * parity bits can be found in winbase.h. These are flow control constants only. 
+ * parity bits can be found in winbase.h. These are flow control constants only.
  */
 #define DPCPA_NOFLOW        0           /* no flow control */
 #define DPCPA_XONXOFFFLOW   1           /* software flow control */
@@ -274,18 +274,18 @@
 
 
 
-/**************************************************************************** 
+/****************************************************************************
  * Miscellaneous
  */
 
 typedef struct tagDPLAPPINFO
 {
-    DWORD       dwSize;            
-    GUID        guidApplication;   
+    DWORD       dwSize;
+    GUID        guidApplication;
 
-    union 
+    union
     {
-        LPSTR   lpszAppNameA;      
+        LPSTR   lpszAppNameA;
         LPWSTR  lpszAppName;
     } DUMMYUNIONNAME;
 
diff --git a/include/dsdriver.h b/include/dsdriver.h
index 8426ea6..bee365f 100644
--- a/include/dsdriver.h
+++ b/include/dsdriver.h
@@ -201,7 +201,7 @@
 
 /* Defined property sets */
 DEFINE_GUID(DSPROPSETID_DirectSound3DListener,	  0x6D047B40, 0x7AF9, 0x11D0, 0x92, 0x94, 0x44, 0x45, 0x53, 0x54, 0x0, 0x0);
-typedef enum 
+typedef enum
 {
     DSPROPERTY_DIRECTSOUND3DLISTENER_ALL,
     DSPROPERTY_DIRECTSOUND3DLISTENER_POSITION,
@@ -215,7 +215,7 @@
 } DSPROPERTY_DIRECTSOUND3DLISTENER;
 
 DEFINE_GUID(DSPROPSETID_DirectSound3DBuffer,	  0x6D047B41, 0x7AF9, 0x11D0, 0x92, 0x94, 0x44, 0x45, 0x53, 0x54, 0x0, 0x0);
-typedef enum 
+typedef enum
 {
     DSPROPERTY_DIRECTSOUND3DBUFFER_ALL,
     DSPROPERTY_DIRECTSOUND3DBUFFER_POSITION,
@@ -229,7 +229,7 @@
 } DSPROPERTY_DIRECTSOUND3DBUFFER;
 
 DEFINE_GUID(DSPROPSETID_DirectSoundSpeakerConfig, 0x6D047B42, 0x7AF9, 0x11D0, 0x92, 0x94, 0x44, 0x45, 0x53, 0x54, 0x0, 0x0);
-typedef enum 
+typedef enum
 {
     DSPROPERTY_DIRECTSOUNDSPEAKERCONFIG_SPEAKERCONFIG
 } DSPROPERTY_DIRECTSOUNDSPEAKERCONFIG;
diff --git a/include/dsound.h b/include/dsound.h
index 6e45b05..dd32f94 100644
--- a/include/dsound.h
+++ b/include/dsound.h
@@ -35,7 +35,7 @@
 DEFINE_GUID(IID_IDirectSound,		0x279AFA83,0x4981,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60);
 typedef struct IDirectSound IDirectSound,*LPDIRECTSOUND;
 
-DEFINE_GUID(IID_IDirectSoundBuffer,	0x279AFA85,0x4981,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60); 
+DEFINE_GUID(IID_IDirectSoundBuffer,	0x279AFA85,0x4981,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60);
 typedef struct IDirectSoundBuffer IDirectSoundBuffer,*LPDIRECTSOUNDBUFFER,**LPLPDIRECTSOUNDBUFFER;
 
 DEFINE_GUID(IID_IDirectSoundNotify,	0xB0210783,0x89cd,0x11d0,0xAF,0x08,0x00,0xA0,0xC9,0x25,0xCD,0x16);
@@ -44,7 +44,7 @@
 DEFINE_GUID(IID_IDirectSound3DListener,	0x279AFA84,0x4981,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60);
 typedef struct IDirectSound3DListener IDirectSound3DListener,*LPDIRECTSOUND3DLISTENER;
 
-DEFINE_GUID(IID_IDirectSound3DBuffer,	0x279AFA86,0x4981,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60); 
+DEFINE_GUID(IID_IDirectSound3DBuffer,	0x279AFA86,0x4981,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60);
 typedef struct IDirectSound3DBuffer IDirectSound3DBuffer,*LPDIRECTSOUND3DBUFFER;
 
 DEFINE_GUID(IID_IDirectSoundCapture,	0xB0210781,0x89CD,0x11D0,0xAF,0x08,0x00,0xA0,0xC9,0x25,0xCD,0x16);
@@ -52,7 +52,7 @@
 
 DEFINE_GUID(IID_IDirectSoundCaptureBuffer,0xB0210782,0x89CD,0x11D0,0xAF,0x08,0x00,0xA0,0xC9,0x25,0xCD,0x16);
 typedef struct IDirectSoundCaptureBuffer IDirectSoundCaptureBuffer,*LPDIRECTSOUNDCAPTUREBUFFER;
-  
+
 DEFINE_GUID(DSDEVID_WinePlayback, 0x40316A1D,0x605B,0xD611,0x87,0xC6,0x00,0x80,0xAD,0x00,0x02,0xFE);
 
 DEFINE_GUID(IID_IKsPropertySet,		0x31EFAC30,0x515C,0x11D0,0xA9,0xAA,0x00,0xAA,0x00,0x61,0xBE,0x93);
@@ -233,7 +233,7 @@
 #ifndef __LPCGUID_DEFINED__
 #define __LPCGUID_DEFINED__
 typedef const GUID *LPCGUID;
-#endif 
+#endif
 
 typedef LPVOID* LPLPVOID;
 
@@ -353,8 +353,8 @@
 #undef ICOM_INTERFACE
 
 #define IDirectSoundCapture_QueryInterface(p,a,b)        ICOM_CALL2(QueryInterface,p,a,b)
-#define IDirectSoundCapture_AddRef(p)                    ICOM_CALL (AddRef,p) 
-#define IDirectSoundCapture_Release(p)                   ICOM_CALL (Release,p) 
+#define IDirectSoundCapture_AddRef(p)                    ICOM_CALL (AddRef,p)
+#define IDirectSoundCapture_Release(p)                   ICOM_CALL (Release,p)
 #define IDirectSoundCapture_CreateCaptureBuffer(p,a,b,c) ICOM_CALL3(CreateCaptureBuffer,p,a,b,c)
 #define IDirectSoundCapture_GetCaps(p,a)                 ICOM_CALL (GetCaps,p,a)
 #define IDirectSoundCapture_Initialize(p,a)              ICOM_CALL (Initialize,p,a)
@@ -372,7 +372,7 @@
     ICOM_METHOD7(HRESULT,Lock,                DWORD,dwReadCusor, DWORD,dwReadBytes, LPVOID*,lplpvAudioPtr1, LPDWORD,lpdwAudioBytes1, LPVOID*,lplpvAudioPtr2, LPDWORD,lpdwAudioBytes2, DWORD,dwFlags) \
     ICOM_METHOD1(HRESULT,Start,               DWORD,dwFlags) \
     ICOM_METHOD (HRESULT,Stop) \
-    ICOM_METHOD4(HRESULT,Unlock,              LPVOID,lpvAudioPtr1, DWORD,dwAudioBytes1, LPVOID,lpvAudioPtr2, DWORD,dwAudioBytes2)               
+    ICOM_METHOD4(HRESULT,Unlock,              LPVOID,lpvAudioPtr1, DWORD,dwAudioBytes1, LPVOID,lpvAudioPtr2, DWORD,dwAudioBytes2)
 
 #define IDirectSoundCaptureBuffer_IMETHODS \
     IUnknown_IMETHODS \
@@ -381,14 +381,14 @@
 #undef ICOM_INTERFACE
 
 #define IDirectSoundCaptureBuffer_QueryInterface(p,a,b)     ICOM_CALL2(QueryInterface,p,a,b)
-#define IDirectSoundCaptureBuffer_AddRef(p)                 ICOM_CALL (AddRef,p) 
-#define IDirectSoundCaptureBuffer_Release(p)                ICOM_CALL (Release,p) 
+#define IDirectSoundCaptureBuffer_AddRef(p)                 ICOM_CALL (AddRef,p)
+#define IDirectSoundCaptureBuffer_Release(p)                ICOM_CALL (Release,p)
 #define IDirectSoundCaptureBuffer_GetCurrentPosition(p,a,b) ICOM_CALL2(GetCurrentPosition,p,a,b)
-#define IDirectSoundCaptureBuffer_GetFormat(p,a,b,c)        ICOM_CALL3(GetFormat,p,a,b,c) 
-#define IDirectSoundCaptureBuffer_GetStatus(p,a)            ICOM_CALL1(GetStatus,p,a) 
-#define IDirectSoundCaptureBuffer_Initialize(p,a,b)         ICOM_CALL2(Initialize,p,a,b) 
+#define IDirectSoundCaptureBuffer_GetFormat(p,a,b,c)        ICOM_CALL3(GetFormat,p,a,b,c)
+#define IDirectSoundCaptureBuffer_GetStatus(p,a)            ICOM_CALL1(GetStatus,p,a)
+#define IDirectSoundCaptureBuffer_Initialize(p,a,b)         ICOM_CALL2(Initialize,p,a,b)
 #define IDirectSoundCaptureBuffer_Lock(p,a,b,c,d,e,f,g)     ICOM_CALL7(Lock,p,a,b,c,d,e,f,g)
-#define IDirectSoundCaptureBuffer_Start(p,a)                ICOM_CALL1(Start,p,a) 
+#define IDirectSoundCaptureBuffer_Start(p,a)                ICOM_CALL1(Start,p,a)
 #define IDirectSoundCaptureBuffer_Stop(p)                   ICOM_CALL (Stop,p)
 #define IDirectSoundCaptureBuffer_Unlock(p,a,b,c,d)         ICOM_CALL4(Unlock,p,a,b,c,d)
 
@@ -459,7 +459,7 @@
 } DS3DLISTENER, *LPDS3DLISTENER;
 
 typedef const DS3DLISTENER *LPCDS3DLISTENER;
-	
+
 #define ICOM_INTERFACE IDirectSound3DListener
 #define IDirectSound3DListener_METHODS \
     ICOM_METHOD1(HRESULT,GetAllParameters,  LPDS3DLISTENER,lpListener) \
diff --git a/include/file.h b/include/file.h
index 09e1f59..25549cc 100644
--- a/include/file.h
+++ b/include/file.h
@@ -117,8 +117,8 @@
 extern HANDLE DEVICE_Open( LPCSTR filename, DWORD access, LPSECURITY_ATTRIBUTES sa );
 
 /* ntdll/cdrom.c.c */
-extern BOOL CDROM_DeviceIoControl(DWORD clientID, HANDLE hDevice, DWORD dwIoControlCode, 
-                                  LPVOID lpInBuffer, DWORD nInBufferSize, 
+extern BOOL CDROM_DeviceIoControl(DWORD clientID, HANDLE hDevice, DWORD dwIoControlCode,
+                                  LPVOID lpInBuffer, DWORD nInBufferSize,
                                   LPVOID lpOutBuffer, DWORD nOutBufferSize,
                                   LPDWORD lpBytesReturned, LPOVERLAPPED lpOverlapped);
 
diff --git a/include/gdi.h b/include/gdi.h
index 9fd0550..69af1af 100644
--- a/include/gdi.h
+++ b/include/gdi.h
@@ -273,7 +273,7 @@
 #define DC_MEMORY     0x0001   /* It is a memory DC */
 #define DC_SAVED      0x0002   /* It is a saved DC */
 #define DC_DIRTY      0x0004   /* hVisRgn has to be updated */
-#define DC_THUNKHOOK  0x0008   /* DC hook is in the 16-bit code */ 
+#define DC_THUNKHOOK  0x0008   /* DC hook is in the 16-bit code */
 
 #define GDI_HEAP_SIZE 0xffe0
 
@@ -303,7 +303,7 @@
 static inline BOOL WINE_UNUSED INTERNAL_DPTOLP_FLOAT(DC *dc, FLOAT_POINT *point)
 {
     FLOAT x, y;
-    
+
     /* Check that the viewport-to-world transformation is valid */
     if (!dc->vport2WorldValid)
         return FALSE;
@@ -327,13 +327,13 @@
 static inline BOOL WINE_UNUSED INTERNAL_DPTOLP(DC *dc, LPPOINT point)
 {
     FLOAT_POINT floatPoint;
-    
+
     /* Perform operation with floating point */
     floatPoint.x=(FLOAT)point->x;
     floatPoint.y=(FLOAT)point->y;
     if (!INTERNAL_DPTOLP_FLOAT(dc, &floatPoint))
         return FALSE;
-    
+
     /* Round to integers */
     point->x = GDI_ROUND(floatPoint.x);
     point->y = GDI_ROUND(floatPoint.y);
@@ -347,7 +347,7 @@
 static inline void WINE_UNUSED INTERNAL_LPTODP_FLOAT(DC *dc, FLOAT_POINT *point)
 {
     FLOAT x, y;
-    
+
     /* Perform the transformation */
     x = point->x;
     y = point->y;
@@ -365,12 +365,12 @@
 static inline void WINE_UNUSED INTERNAL_LPTODP(DC *dc, LPPOINT point)
 {
     FLOAT_POINT floatPoint;
-    
+
     /* Perform operation with floating point */
     floatPoint.x=(FLOAT)point->x;
     floatPoint.y=(FLOAT)point->y;
     INTERNAL_LPTODP_FLOAT(dc, &floatPoint);
-    
+
     /* Round to integers */
     point->x = GDI_ROUND(floatPoint.x);
     point->y = GDI_ROUND(floatPoint.y);
diff --git a/include/guiddef.h b/include/guiddef.h
index 310cf61..a9dbc40 100644
--- a/include/guiddef.h
+++ b/include/guiddef.h
@@ -79,11 +79,11 @@
 {
     return !(guidOne == guidOther);
 }
-#endif 
+#endif
 
 extern const IID GUID_NULL;
 #define IID_NULL            GUID_NULL
 #define CLSID_NULL GUID_NULL
 #define FMTID_NULL          GUID_NULL
-   
+
 #endif /* _GUIDDEF_H_ */
diff --git a/include/imagehlp.h b/include/imagehlp.h
index 0574171..d0cad79 100644
--- a/include/imagehlp.h
+++ b/include/imagehlp.h
@@ -32,7 +32,7 @@
  * Types
  */
 
-typedef PVOID DIGEST_HANDLE; 
+typedef PVOID DIGEST_HANDLE;
 
 /***********************************************************************
  * Enums/Defines
@@ -161,7 +161,7 @@
 
 typedef struct _WIN_CERTIFICATE {
   DWORD dwLength;
-  WORD  wRevision;                   /*  WIN_CERT_REVISON_xxx */ 
+  WORD  wRevision;                   /*  WIN_CERT_REVISON_xxx */
   WORD  wCertificateType;            /*  WIN_CERT_TYPE_xxx */
   BYTE  bCertificate[ANYSIZE_ARRAY];
 } WIN_CERTIFICATE, *PWIN_CERTIFICATE;
@@ -182,7 +182,7 @@
   DWORD        CheckSum;
   DWORD        ImageBase;
   DWORD        SizeOfImage;
-  
+
   DWORD NumberOfSections;
   PIMAGE_SECTION_HEADER Sections;
 
@@ -305,12 +305,12 @@
 );
 
 typedef BOOL (CALLBACK *PSYM_ENUMSYMBOLS_CALLBACK)(
-  LPSTR SymbolName, ULONG SymbolAddress, ULONG SymbolSize, 
+  LPSTR SymbolName, ULONG SymbolAddress, ULONG SymbolSize,
   PVOID UserContext
 );
 
 typedef BOOL (CALLBACK *PENUMLOADED_MODULES_CALLBACK)(
-  LPSTR ModuleName, ULONG ModuleBase, ULONG ModuleSize, 
+  LPSTR ModuleName, ULONG ModuleBase, ULONG ModuleSize,
   PVOID UserContext
 );
 
@@ -351,7 +351,7 @@
   PIMAGEHLP_STATUS_ROUTINE StatusRoutine
 );
 PIMAGE_NT_HEADERS WINAPI CheckSumMappedFile(
-  LPVOID BaseAddress, DWORD FileLength, 
+  LPVOID BaseAddress, DWORD FileLength,
   LPDWORD HeaderSum, LPDWORD CheckSum
 );
 BOOL WINAPI EnumerateLoadedModules(
@@ -366,7 +366,7 @@
   LPSTR FileName, LPSTR SymbolPath, LPSTR ImageFilePath
 );
 BOOL WINAPI GetImageConfigInformation(
-  PLOADED_IMAGE LoadedImage, 
+  PLOADED_IMAGE LoadedImage,
   PIMAGE_LOAD_CONFIG_DIRECTORY ImageConfigInformation
 );
 DWORD WINAPI GetImageUnusedHeaderBytes(
@@ -418,7 +418,7 @@
   PLOADED_IMAGE LoadedImage
 );
 PAPI_VERSION WINAPI ImagehlpApiVersion(
-  void 
+  void
 );
 PAPI_VERSION WINAPI ImagehlpApiVersionEx(
   PAPI_VERSION AppVersion
@@ -460,7 +460,7 @@
   PIMAGE_LOAD_CONFIG_DIRECTORY ImageConfigInformation
 );
 BOOL WINAPI SplitSymbols(
-  LPSTR ImageName, LPSTR SymbolsPath, 
+  LPSTR ImageName, LPSTR SymbolsPath,
   LPSTR SymbolFilePath, DWORD Flags
 );
 BOOL WINAPI StackWalk(
diff --git a/include/initguid.h b/include/initguid.h
index 53993eb..976dd78 100644
--- a/include/initguid.h
+++ b/include/initguid.h
@@ -1,5 +1,5 @@
 /*
- * Defines a minimum set of macros create GUID's to keep the size 
+ * Defines a minimum set of macros create GUID's to keep the size
  * small
  *
  * This file should be included into "only GUID definition *.h" like
diff --git a/include/instance.h b/include/instance.h
index 93d4f08..5afe987 100644
--- a/include/instance.h
+++ b/include/instance.h
@@ -30,7 +30,7 @@
     WORD null;        /* Always 0 */
     DWORD old_ss_sp WINE_PACKED;  /* Stack pointer; used by SwitchTaskTo() */
     WORD heap;        /* Pointer to the local heap information (if any) */
-    WORD atomtable;   /* Pointer to the local atom table (if any) */ 
+    WORD atomtable;   /* Pointer to the local atom table (if any) */
     WORD stacktop;    /* Top of the stack */
     WORD stackmin;    /* Lowest stack address used so far */
     WORD stackbottom; /* Bottom of the stack */
diff --git a/include/miscemu.h b/include/miscemu.h
index fd10e63..14f9e72 100644
--- a/include/miscemu.h
+++ b/include/miscemu.h
@@ -146,7 +146,7 @@
 
 #include "poppack.h"
 
-/* Index for bios structures stored at f000:e000 */ 
+/* Index for bios structures stored at f000:e000 */
 enum {OFF_VIDEOSTATE,OFF_VIDEOFUNCTIONALITY,OFF_VESAINFO,OFF_VESASTRING,OFF_VESAMODELIST};
 
 extern WORD DOSMEM_AddBiosSysStruct(int,int);
@@ -242,8 +242,8 @@
 #define PTR_REAL_TO_LIN(seg,off) \
    ((void*)(((unsigned int)(seg) << 4) + LOWORD(off)))
 
-/* NOTE: Interrupts might get called from three modes: real mode, 16-bit, and 
- *        (via DeviceIoControl) 32-bit. For automatic conversion of pointer 
+/* NOTE: Interrupts might get called from three modes: real mode, 16-bit, and
+ *        (via DeviceIoControl) 32-bit. For automatic conversion of pointer
  *       parameters, interrupt handlers should use CTX_SEG_OFF_TO_LIN with
  *       the contents of a segment register as second and the contents of
  *       a *32-bit* general register as third parameter, e.g.
diff --git a/include/mmddk.h b/include/mmddk.h
index 2b98e63..f3f917a 100644
--- a/include/mmddk.h
+++ b/include/mmddk.h
@@ -23,7 +23,7 @@
  *
  *****************************************************************************
  */
-#ifndef __MMDDK_H 
+#ifndef __MMDDK_H
 #define __MMDDK_H
 
 #include "mmsystem.h"
@@ -38,7 +38,7 @@
  */
 #define MAX_MIDIOUTDRV 	(16)
 
-/* ================================== 
+/* ==================================
  *   Multimedia DDK compatible part
  * ================================== */
 
@@ -94,7 +94,7 @@
 #define WODM_WRITE		 9
 #define WODM_PAUSE		10
 #define WODM_RESTART		11
-#define WODM_RESET		12 
+#define WODM_RESET		12
 #define WODM_GETPOS		13
 #define WODM_GETPITCH		14
 #define WODM_SETPITCH		15
@@ -139,8 +139,8 @@
 #define MODM_RESET          	9
 #define MODM_GETVOLUME		10
 #define MODM_SETVOLUME		11
-#define MODM_CACHEPATCHES	12      
-#define MODM_CACHEDRUMPATCHES	13     
+#define MODM_CACHEPATCHES	12
+#define MODM_CACHEDRUMPATCHES	13
 
 #define MIDM_INIT		DRVM_INIT
 #define MIDM_GETNUMDEVS  	53
@@ -513,9 +513,9 @@
 #define DCB_TYPEMASK		0x0007
 #define DCB_NOSWITCH		0x0008			/* don't switch stacks for callback */
 
-BOOL16			WINAPI	DriverCallback16(DWORD dwCallBack, UINT16 uFlags, HANDLE16 hDev, 
+BOOL16			WINAPI	DriverCallback16(DWORD dwCallBack, UINT16 uFlags, HANDLE16 hDev,
 						 WORD wMsg, DWORD dwUser, DWORD dwParam1, DWORD dwParam2);
-BOOL		 	WINAPI	DriverCallback(DWORD dwCallBack, UINT uFlags, HANDLE hDev, 
+BOOL		 	WINAPI	DriverCallback(DWORD dwCallBack, UINT uFlags, HANDLE hDev,
 					       UINT wMsg, DWORD dwUser, DWORD dwParam1, DWORD dwParam2);
 
 #include "poppack.h"
diff --git a/include/mmreg.h b/include/mmreg.h
index b899169..7c5c7a5 100644
--- a/include/mmreg.h
+++ b/include/mmreg.h
@@ -59,7 +59,7 @@
    DWORD           dwDelay;
 } ECHOWAVEFILTER, *PECHOWAVEFILTER, *NPECHOWAVEFILTER, *LPECHOWAVEFILTER;
 #endif  /* WAVEFILTER_ECHO */
-    
+
 #ifndef _WAVEFORMATEX_
 #define _WAVEFORMATEX_
 typedef struct _WAVEFORMATEX {
@@ -122,7 +122,7 @@
 	short   iCoef1;
 	short   iCoef2;
 } ADPCMCOEFSET;
-typedef ADPCMCOEFSET *PADPCMCOEFSET, 
+typedef ADPCMCOEFSET *PADPCMCOEFSET,
 	*NPADPCMCOEFSET, *LPADPCMCOEFSET;
 
 typedef struct adpcmwaveformat_tag {
@@ -132,35 +132,35 @@
 	/* FIXME: this should be aCoef[0] */
 	ADPCMCOEFSET    aCoef[1];
 } ADPCMWAVEFORMAT;
-typedef ADPCMWAVEFORMAT *PADPCMWAVEFORMAT, 
+typedef ADPCMWAVEFORMAT *PADPCMWAVEFORMAT,
 	*NPADPCMWAVEFORMAT, *LPADPCMWAVEFORMAT;
 
 typedef struct dvi_adpcmwaveformat_tag {
 	WAVEFORMATEX    wfx;
 	WORD            wSamplesPerBlock;
 } DVIADPCMWAVEFORMAT;
-typedef DVIADPCMWAVEFORMAT *PDVIADPCMWAVEFORMAT, 
+typedef DVIADPCMWAVEFORMAT *PDVIADPCMWAVEFORMAT,
 	*NPDVIADPCMWAVEFORMAT, *LPDVIADPCMWAVEFORMAT;
 
 typedef struct ima_adpcmwaveformat_tag {
 	WAVEFORMATEX    wfx;
 	WORD            wSamplesPerBlock;
 } IMAADPCMWAVEFORMAT;
-typedef IMAADPCMWAVEFORMAT *PIMAADPCMWAVEFORMAT, *NPIMAADPCMWAVEFORMAT, 
+typedef IMAADPCMWAVEFORMAT *PIMAADPCMWAVEFORMAT, *NPIMAADPCMWAVEFORMAT,
 	*LPIMAADPCMWAVEFORMAT;
 
 typedef struct mediaspace_adpcmwaveformat_tag {
 	WAVEFORMATEX    wfx;
 	WORD            wRevision;
 } MEDIASPACEADPCMWAVEFORMAT;
-typedef MEDIASPACEADPCMWAVEFORMAT *PMEDIASPACEADPCMWAVEFORMAT, 
+typedef MEDIASPACEADPCMWAVEFORMAT *PMEDIASPACEADPCMWAVEFORMAT,
 	*NPMEDIASPACEADPCMWAVEFORMAT, *LPMEDIASPACEADPCMWAVEFORMAT;
 
 typedef struct sierra_adpcmwaveformat_tag {
 	WAVEFORMATEX    wfx;
 	WORD            wRevision;
 } SIERRAADPCMWAVEFORMAT;
-typedef SIERRAADPCMWAVEFORMAT *PSIERRAADPCMWAVEFORMAT, 
+typedef SIERRAADPCMWAVEFORMAT *PSIERRAADPCMWAVEFORMAT,
 	*NPSIERRAADPCMWAVEFORMAT, *LPSIERRAADPCMWAVEFORMAT;
 
 typedef struct g723_adpcmwaveformat_tag {
@@ -168,7 +168,7 @@
 	WORD            cbExtraSize;
 	WORD            nAuxBlockSize;
 } G723_ADPCMWAVEFORMAT;
-typedef G723_ADPCMWAVEFORMAT *PG723_ADPCMWAVEFORMAT, 
+typedef G723_ADPCMWAVEFORMAT *PG723_ADPCMWAVEFORMAT,
 	*NPG723_ADPCMWAVEFORMAT, *LPG723_ADPCMWAVEFORMAT;
 
 typedef struct digistdwaveformat_tag {
@@ -199,7 +199,7 @@
 	WAVEFORMATEX    wfx;
 	WORD            wCompType;
 } SONARCWAVEFORMAT;
-typedef SONARCWAVEFORMAT *PSONARCWAVEFORMAT, 
+typedef SONARCWAVEFORMAT *PSONARCWAVEFORMAT,
 	*NPSONARCWAVEFORMAT,*LPSONARCWAVEFORMAT;
 
 typedef struct truespeechwaveformat_tag {
@@ -208,31 +208,31 @@
 	WORD            nSamplesPerBlock;
 	BYTE            abReserved[28];
 } TRUESPEECHWAVEFORMAT;
-typedef TRUESPEECHWAVEFORMAT *PTRUESPEECHWAVEFORMAT, 
+typedef TRUESPEECHWAVEFORMAT *PTRUESPEECHWAVEFORMAT,
 	*NPTRUESPEECHWAVEFORMAT, *LPTRUESPEECHWAVEFORMAT;
 
 typedef struct echosc1waveformat_tag {
 	WAVEFORMATEX    wfx;
 } ECHOSC1WAVEFORMAT;
-typedef ECHOSC1WAVEFORMAT *PECHOSC1WAVEFORMAT, 
+typedef ECHOSC1WAVEFORMAT *PECHOSC1WAVEFORMAT,
 	*NPECHOSC1WAVEFORMAT, *LPECHOSC1WAVEFORMAT;
 
 typedef struct audiofile_af36waveformat_tag {
 	WAVEFORMATEX    wfx;
 } AUDIOFILE_AF36WAVEFORMAT;
-typedef AUDIOFILE_AF36WAVEFORMAT *PAUDIOFILE_AF36WAVEFORMAT, 
+typedef AUDIOFILE_AF36WAVEFORMAT *PAUDIOFILE_AF36WAVEFORMAT,
 	*NPAUDIOFILE_AF36WAVEFORMAT, *LPAUDIOFILE_AF36WAVEFORMAT;
 
 typedef struct aptxwaveformat_tag {
 	WAVEFORMATEX    wfx;
 } APTXWAVEFORMAT;
-typedef APTXWAVEFORMAT *PAPTXWAVEFORMAT, 
+typedef APTXWAVEFORMAT *PAPTXWAVEFORMAT,
 	*NPAPTXWAVEFORMAT, *LPAPTXWAVEFORMAT;
 
 typedef struct audiofile_af10waveformat_tag {
 	WAVEFORMATEX    wfx;
 } AUDIOFILE_AF10WAVEFORMAT;
-typedef AUDIOFILE_AF10WAVEFORMAT *PAUDIOFILE_AF10WAVEFORMAT, 
+typedef AUDIOFILE_AF10WAVEFORMAT *PAUDIOFILE_AF10WAVEFORMAT,
 	*NPAUDIOFILE_AF10WAVEFORMAT,  *LPAUDIOFILE_AF10WAVEFORMAT;
 
 typedef struct dolbyac2waveformat_tag {
@@ -244,49 +244,49 @@
 	WAVEFORMATEX    wfx;
 	WORD            wSamplesPerBlock;
 } GSM610WAVEFORMAT;
-typedef GSM610WAVEFORMAT *PGSM610WAVEFORMAT, 
+typedef GSM610WAVEFORMAT *PGSM610WAVEFORMAT,
 	*NPGSM610WAVEFORMAT, *LPGSM610WAVEFORMAT;
 
 typedef struct adpcmewaveformat_tag {
 	WAVEFORMATEX    wfx;
 	WORD            wSamplesPerBlock;
 } ADPCMEWAVEFORMAT;
-typedef ADPCMEWAVEFORMAT *PADPCMEWAVEFORMAT, 
+typedef ADPCMEWAVEFORMAT *PADPCMEWAVEFORMAT,
 	*NPADPCMEWAVEFORMAT, *LPADPCMEWAVEFORMAT;
 
 typedef struct contres_vqlpcwaveformat_tag {
 	WAVEFORMATEX    wfx;
 	WORD            wSamplesPerBlock;
 } CONTRESVQLPCWAVEFORMAT;
-typedef CONTRESVQLPCWAVEFORMAT *PCONTRESVQLPCWAVEFORMAT, 
+typedef CONTRESVQLPCWAVEFORMAT *PCONTRESVQLPCWAVEFORMAT,
 	*NPCONTRESVQLPCWAVEFORMAT, *LPCONTRESVQLPCWAVEFORMAT;
 
 typedef struct digirealwaveformat_tag {
 	WAVEFORMATEX    wfx;
 	WORD            wSamplesPerBlock;
 } DIGIREALWAVEFORMAT;
-typedef DIGIREALWAVEFORMAT *PDIGIREALWAVEFORMAT, 
+typedef DIGIREALWAVEFORMAT *PDIGIREALWAVEFORMAT,
 	*NPDIGIREALWAVEFORMAT, *LPDIGIREALWAVEFORMAT;
 
 typedef struct digiadpcmmwaveformat_tag {
 	WAVEFORMATEX    wfx;
 	WORD            wSamplesPerBlock;
 } DIGIADPCMWAVEFORMAT;
-typedef DIGIADPCMWAVEFORMAT *PDIGIADPCMWAVEFORMAT, 
+typedef DIGIADPCMWAVEFORMAT *PDIGIADPCMWAVEFORMAT,
 	*NPDIGIADPCMWAVEFORMAT, *LPDIGIADPCMWAVEFORMAT;
 
 typedef struct contres_cr10waveformat_tag {
 	WAVEFORMATEX    wfx;
 	WORD            wSamplesPerBlock;
 } CONTRESCR10WAVEFORMAT;
-typedef CONTRESCR10WAVEFORMAT *PCONTRESCR10WAVEFORMAT, 
+typedef CONTRESCR10WAVEFORMAT *PCONTRESCR10WAVEFORMAT,
 	*NPCONTRESCR10WAVEFORMAT, *LPCONTRESCR10WAVEFORMAT;
 
 typedef struct nms_vbxadpcmmwaveformat_tag {
 	WAVEFORMATEX    wfx;
 	WORD            wSamplesPerBlock;
 } NMS_VBXADPCMWAVEFORMAT;
-typedef NMS_VBXADPCMWAVEFORMAT *PNMS_VBXADPCMWAVEFORMAT, 
+typedef NMS_VBXADPCMWAVEFORMAT *PNMS_VBXADPCMWAVEFORMAT,
 	*NPNMS_VBXADPCMWAVEFORMAT, *LPNMS_VBXADPCMWAVEFORMAT;
 
 typedef struct g721_adpcmwaveformat_tag {
@@ -300,21 +300,21 @@
 	WAVEFORMATEX    wfx;
 	WORD            wRevision;
 } CREATIVEADPCMWAVEFORMAT;
-typedef CREATIVEADPCMWAVEFORMAT *PCREATIVEADPCMWAVEFORMAT, 
+typedef CREATIVEADPCMWAVEFORMAT *PCREATIVEADPCMWAVEFORMAT,
 	*NPCREATIVEADPCMWAVEFORMAT, *LPCREATIVEADPCMWAVEFORMAT;
 
 typedef struct creative_fastspeech8format_tag {
 	WAVEFORMATEX    wfx;
 	WORD wRevision;
 } CREATIVEFASTSPEECH8WAVEFORMAT;
-typedef CREATIVEFASTSPEECH8WAVEFORMAT *PCREATIVEFASTSPEECH8WAVEFORMAT, 
+typedef CREATIVEFASTSPEECH8WAVEFORMAT *PCREATIVEFASTSPEECH8WAVEFORMAT,
 	*NPCREATIVEFASTSPEECH8WAVEFORMAT, *LPCREATIVEFASTSPEECH8WAVEFORMAT;
 
 typedef struct creative_fastspeech10format_tag {
 	WAVEFORMATEX    wfx;
 	WORD wRevision;
 } CREATIVEFASTSPEECH10WAVEFORMAT;
-typedef CREATIVEFASTSPEECH10WAVEFORMAT *PCREATIVEFASTSPEECH10WAVEFORMAT, 
+typedef CREATIVEFASTSPEECH10WAVEFORMAT *PCREATIVEFASTSPEECH10WAVEFORMAT,
 	*NPCREATIVEFASTSPEECH10WAVEFORMAT, *LPCREATIVEFASTSPEECH10WAVEFORMAT;
 
 typedef struct fmtowns_snd_waveformat_tag {
@@ -327,37 +327,37 @@
 typedef struct oligsmwaveformat_tag {
 	WAVEFORMATEX    wfx;
 } OLIGSMWAVEFORMAT;
-typedef OLIGSMWAVEFORMAT *POLIGSMWAVEFORMAT, 
+typedef OLIGSMWAVEFORMAT *POLIGSMWAVEFORMAT,
 	*NPOLIGSMWAVEFORMAT, *LPOLIGSMWAVEFORMAT;
 
 typedef struct oliadpcmwaveformat_tag {
 	WAVEFORMATEX    wfx;
 } OLIADPCMWAVEFORMAT;
-typedef OLIADPCMWAVEFORMAT *POLIADPCMWAVEFORMAT, 
+typedef OLIADPCMWAVEFORMAT *POLIADPCMWAVEFORMAT,
 	*NPOLIADPCMWAVEFORMAT, *LPOLIADPCMWAVEFORMAT;
 
 typedef struct olicelpwaveformat_tag {
 	WAVEFORMATEX    wfx;
 } OLICELPWAVEFORMAT;
-typedef OLICELPWAVEFORMAT *POLICELPWAVEFORMAT, 
+typedef OLICELPWAVEFORMAT *POLICELPWAVEFORMAT,
 	*NPOLICELPWAVEFORMAT, *LPOLICELPWAVEFORMAT;
 
 typedef struct olisbcwaveformat_tag {
 	WAVEFORMATEX    wfx;
 } OLISBCWAVEFORMAT;
-typedef OLISBCWAVEFORMAT *POLISBCWAVEFORMAT, 
+typedef OLISBCWAVEFORMAT *POLISBCWAVEFORMAT,
 	*NPOLISBCWAVEFORMAT, *LPOLISBCWAVEFORMAT;
 
 typedef struct olioprwaveformat_tag {
 	WAVEFORMATEX    wfx;
 } OLIOPRWAVEFORMAT;
-typedef OLIOPRWAVEFORMAT *POLIOPRWAVEFORMAT, 
+typedef OLIOPRWAVEFORMAT *POLIOPRWAVEFORMAT,
 	*NPOLIOPRWAVEFORMAT, *LPOLIOPRWAVEFORMAT;
 
 typedef struct csimaadpcmwaveformat_tag {
 	WAVEFORMATEX    wfx;
 } CSIMAADPCMWAVEFORMAT;
-typedef CSIMAADPCMWAVEFORMAT *PCSIMAADPCMWAVEFORMAT, 
+typedef CSIMAADPCMWAVEFORMAT *PCSIMAADPCMWAVEFORMAT,
 	*NPCSIMAADPCMWAVEFORMAT, *LPCSIMAADPCMWAVEFORMAT;
 
 typedef struct
diff --git a/include/mmsystem.h b/include/mmsystem.h
index 6480927..e84a142 100644
--- a/include/mmsystem.h
+++ b/include/mmsystem.h
@@ -25,7 +25,7 @@
 
 #ifdef __cplusplus
 extern "C" {
-#endif 
+#endif
 
 typedef LPSTR		HPSTR;          /* a huge version of LPSTR */
 typedef LPCSTR		HPCSTR;         /* a huge version of LPCSTR */
@@ -43,7 +43,7 @@
 DECLARE_OLD_HANDLE(HMMIO);
 
 #include "pshpack1.h"
-   
+
 typedef LRESULT (CALLBACK *DRIVERPROC)(DWORD,HDRVR,UINT,LPARAM,LPARAM);
 
 #define MAXWAVEDRIVERS	10
@@ -51,11 +51,11 @@
 #define MAXAUXDRIVERS	10
 #define MAXMCIDRIVERS	32
 #define MAXMIXERDRIVERS	10
-   
+
 #define MAXPNAMELEN      32     /* max product name length (including NULL) */
 #define MAXERRORLENGTH   128    /* max error text length (including NULL) */
 #define MAX_JOYSTICKOEMVXDNAME	260
-   
+
 typedef WORD    VERSION;        /* major (high byte), minor (low byte) */
 
 #ifndef _MCIERROR_
@@ -250,7 +250,7 @@
 UINT 		WINAPI 	mmsystemGetVersion(void);
 BOOL 		WINAPI	sndPlaySoundA(LPCSTR lpszSound, UINT fuSound);
 BOOL 		WINAPI	sndPlaySoundW(LPCWSTR lpszSound, UINT fuSound);
-#define 		sndPlaySound WINELIB_NAME_AW(sndPlaySound) 
+#define 		sndPlaySound WINELIB_NAME_AW(sndPlaySound)
 BOOL 		WINAPI 	PlaySoundA(LPCSTR pszSound, HMODULE hmod, DWORD fdwSound);
 BOOL 		WINAPI 	PlaySoundW(LPCWSTR pszSound, HMODULE hmod, DWORD fdwSound);
 #define 		PlaySound WINELIB_NAME_AW(PlaySound)
@@ -493,8 +493,8 @@
 /* Only on Win95 and up */
 #define MIDI_IO_STATUS	0x00000020L
 
-/* flags for wFlags parm of 
-	midiOutCachePatches(), 
+/* flags for wFlags parm of
+	midiOutCachePatches(),
 	midiOutCacheDrumPatches() */
 #define MIDI_CACHE_ALL      1
 #define MIDI_CACHE_BESTFIT  2
@@ -569,7 +569,7 @@
     DWORD	dwFlags;	/* assorted flags (see defines) */
     struct midihdr_tag *lpNext;	/* reserved for driver */
     DWORD	reserved;	/* reserved for driver */
-    DWORD	dwOffset;	/* offset of playback in case of 
+    DWORD	dwOffset;	/* offset of playback in case of
 				 * MIDISTRM buffer */
     DWORD_PTR	dwReserved[8];	/* reserved for driver */
 } MIDIHDR, *LPMIDIHDR;
@@ -594,14 +594,14 @@
 #define MIDIPROP_TEMPO		0x00000002
 #define MIDIPROP_TIMEDIV	0x00000001
 
-typedef struct {  
-    DWORD dwDeltaTime;	/* Time, in MIDI ticks, between the previous 
+typedef struct {
+    DWORD dwDeltaTime;	/* Time, in MIDI ticks, between the previous
 			 * event and the current event. */
-    DWORD dwStreamID;	/* Reserved; must be zero. */ 
+    DWORD dwStreamID;	/* Reserved; must be zero. */
     DWORD dwEvent;  	/* event => see MEVT_XXX macros */
     DWORD dwParms[1];	/* extra pmts to dwEvent if F_LONG is set */
 } MIDIEVENT, *LPMIDIEVENT;
-          
+
 #define MEVT_EVENTTYPE(x) ((BYTE) (((x)>>24)&0xFF))
 #define MEVT_EVENTPARM(x) ((DWORD) ((x)&0x00FFFFFFL))
 
@@ -655,7 +655,7 @@
 DWORD		WINAPI	midiInMessage(HMIDIIN,UINT,DWORD,DWORD);
 MMRESULT	WINAPI	midiStreamClose(HMIDISTRM hms);
 MMRESULT	WINAPI	midiStreamOpen(HMIDISTRM* phms, LPUINT uDeviceID, DWORD cMidi,
-				       DWORD dwCallback, DWORD dwInstance, DWORD fdwOpen); 
+				       DWORD dwCallback, DWORD dwInstance, DWORD fdwOpen);
 MMRESULT	WINAPI	midiStreamOut(HMIDISTRM hms, LPMIDIHDR lpMidiHdr, UINT cbMidiHdr);
 MMRESULT	WINAPI	midiStreamPause(HMIDISTRM hms);
 MMRESULT	WINAPI	midiStreamPosition(HMIDISTRM hms, LPMMTIME lpmmt, UINT cbmmt);
@@ -2207,6 +2207,6 @@
 
 #ifdef __cplusplus
 }
-#endif 
+#endif
 
 #endif /* __WINE_MMSYSTEM_H */
diff --git a/include/module.h b/include/module.h
index 1e0146a..44e2df9 100644
--- a/include/module.h
+++ b/include/module.h
@@ -106,7 +106,7 @@
     FARPROC16 BootApp;       /* startup procedure */
     FARPROC16 LoadAppSeg;    /* procedure to load a segment */
     FARPROC16 reserved2;
-    FARPROC16 MyAlloc;       /* memory allocation procedure, 
+    FARPROC16 MyAlloc;       /* memory allocation procedure,
                               * wine must write this field */
     FARPROC16 EntryAddrProc;
     FARPROC16 ExitProc;      /* exit procedure */
@@ -114,7 +114,7 @@
     FARPROC16 SetOwner;      /* Set Owner procedure, exported by wine */
 } SELFLOADHEADER;
 
-typedef struct 
+typedef struct
 {
     LPSTR lpEnvAddress;
     LPSTR lpCmdLine;
diff --git a/include/msacm.h b/include/msacm.h
index d0ea9e7..2eeeec8 100644
--- a/include/msacm.h
+++ b/include/msacm.h
@@ -318,7 +318,7 @@
 
   DWORD         fdwEnum;
   PWAVEFILTER   pwfltrEnum;
-    
+
   HINSTANCE   hInstance;
   LPCSTR        pszTemplateName;
   LPARAM        lCustData;
@@ -344,7 +344,7 @@
 
   DWORD         fdwEnum;
   PWAVEFILTER   pwfltrEnum;
-    
+
   HINSTANCE   hInstance;
   LPCWSTR       pszTemplateName;
   LPARAM        lCustData;
@@ -411,22 +411,22 @@
 {
   DWORD           cbStruct;
   DWORD           fdwStyle;
- 
+
   HWND          hwndOwner;
 
   PWAVEFORMATEX   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;
   PWAVEFORMATEX   pwfxEnum;
-    
+
   HINSTANCE     hInstance;
   LPCSTR          pszTemplateName;
   LPARAM          lCustData;
@@ -437,22 +437,22 @@
 {
   DWORD           cbStruct;
   DWORD           fdwStyle;
-    
+
   HWND          hwndOwner;
 
   PWAVEFORMATEX   pwfx;
   DWORD           cbwfx;
   LPCWSTR         pszTitle;
-    
+
   WCHAR           szFormatTag[ACMFORMATTAGDETAILS_FORMATTAG_CHARS];
-  WCHAR           szFormat[ACMFORMATDETAILS_FORMAT_CHARS];    
+  WCHAR           szFormat[ACMFORMATDETAILS_FORMAT_CHARS];
 
   LPWSTR          pszName;
   DWORD           cchName;
 
   DWORD           fdwEnum;
   LPWAVEFORMATEX  pwfxEnum;
-    
+
   HINSTANCE     hInstance;
   LPCWSTR         pszTemplateName;
   LPARAM          lCustData;
@@ -643,11 +643,11 @@
 #define acmFilterDetails WINELIB_NAME_AW(acmFilterDetails)
 
 MMRESULT WINAPI acmFilterEnumA(
-  HACMDRIVER had, PACMFILTERDETAILSA pafd, 
+  HACMDRIVER had, PACMFILTERDETAILSA pafd,
   ACMFILTERENUMCBA fnCallback, DWORD dwInstance, DWORD fdwEnum
 );
 MMRESULT WINAPI acmFilterEnumW(
-  HACMDRIVER had, PACMFILTERDETAILSW pafd, 
+  HACMDRIVER had, PACMFILTERDETAILSW pafd,
   ACMFILTERENUMCBW fnCallback, DWORD dwInstance, DWORD fdwEnum
 );
 #define acmFilterEnum WINELIB_NAME_AW(acmFilterEnum)
@@ -744,7 +744,7 @@
   HACMSTREAM has, DWORD fdwReset
 );
 MMRESULT WINAPI acmStreamSize(
-  HACMSTREAM has, DWORD cbInput, 
+  HACMSTREAM has, DWORD cbInput,
   LPDWORD pdwOutputBytes, DWORD fdwSize
 );
 MMRESULT WINAPI acmStreamUnprepareHeader(
diff --git a/include/msdos.h b/include/msdos.h
index fca4c06..8b50f67 100644
--- a/include/msdos.h
+++ b/include/msdos.h
@@ -126,7 +126,7 @@
 #define setword(a,b)	do { *(BYTE*)(a)	  = (b) & 0xff; \
                              *((BYTE*)((a)+1)) = ((b)>>8) & 0xff;\
                         } while(0)
-			
+
 
 /* dos file attributes */
 
diff --git a/include/msvcrt/stdio.h b/include/msvcrt/stdio.h
index 5572e4d..9757714 100644
--- a/include/msvcrt/stdio.h
+++ b/include/msvcrt/stdio.h
@@ -26,14 +26,14 @@
 #define _IORW            0x0080
 #define _IOAPPEND        0x0200
 #else
-#define MSVCRT__IOREAD   0x0001 
-#define MSVCRT__IOWRT    0x0002 
-#define MSVCRT__IOMYBUF  0x0008 
-#define MSVCRT__IOEOF    0x0010 
-#define MSVCRT__IOERR    0x0020 
-#define MSVCRT__IOSTRG   0x0040 
-#define MSVCRT__IORW     0x0080 
-#define MSVCRT__IOAPPEND 0x0200 
+#define MSVCRT__IOREAD   0x0001
+#define MSVCRT__IOWRT    0x0002
+#define MSVCRT__IOMYBUF  0x0008
+#define MSVCRT__IOEOF    0x0010
+#define MSVCRT__IOERR    0x0020
+#define MSVCRT__IOSTRG   0x0040
+#define MSVCRT__IORW     0x0080
+#define MSVCRT__IOAPPEND 0x0200
 #endif /* USE_MSVCRT_PREFIX */
 
 
diff --git a/include/msvcrt/wctype.h b/include/msvcrt/wctype.h
index ff0cc4e..fce0b11 100644
--- a/include/msvcrt/wctype.h
+++ b/include/msvcrt/wctype.h
@@ -22,7 +22,7 @@
 #define __WINE_USE_MSVCRT
 
 
-/* FIXME: winnt.h includes 'ctype.h' which includes 'wctype.h'. So we get 
+/* FIXME: winnt.h includes 'ctype.h' which includes 'wctype.h'. So we get
  * there but WCHAR is not defined.
  */
 /* Some systems might have wchar_t, but we really need 16 bit characters */
diff --git a/include/netspi.h b/include/netspi.h
index a1e9e18..acecf46 100644
--- a/include/netspi.h
+++ b/include/netspi.h
@@ -32,7 +32,7 @@
 #define HPROVIDER LPVOID
 typedef HPROVIDER *PHPROVIDER;
 
-typedef struct 
+typedef struct
 {
     DWORD  cbStructure;
     HWND   hwndOwner;
@@ -94,7 +94,7 @@
 #define NOTIFY_PRE              0x00
 #define NOTIFY_POST             0x01
 
-typedef struct 
+typedef struct
 {
     DWORD   cbStructure;
     DWORD   dwNotifyStatus;
@@ -103,7 +103,7 @@
 
 } NOTIFYINFO, *LPNOTIFYINFO;
 
-typedef struct 
+typedef struct
 {
     DWORD        cbStructure;
     HWND         hwndOwner;
@@ -121,7 +121,7 @@
 #define CONNECT_CTXT_PROVIDER  0x00000004
 #define CONNECT_CTXT_SINGLE    0x00000008
 
-typedef struct 
+typedef struct
 {
     DWORD  cbStructure;
     LPSTR  lpName;
@@ -131,7 +131,7 @@
 
 } NOTIFYCANCELA, *LPNOTIFYCANCELA;
 
-typedef struct 
+typedef struct
 {
     DWORD                  cbStructure;
     LPSTR                  lpRemoteName;
diff --git a/include/nspapi.h b/include/nspapi.h
index 64c1b8f..92e81a1 100644
--- a/include/nspapi.h
+++ b/include/nspapi.h
@@ -47,7 +47,7 @@
 /*
  * structures
  */
-typedef  struct _PROTOCOL_INFOA 
+typedef  struct _PROTOCOL_INFOA
 {
          DWORD   dwServiceFlags;
          INT     iAddressFamily;
@@ -59,7 +59,7 @@
          LPSTR   lpProtocol;
 } PROTOCOL_INFOA;
 
-typedef  struct _PROTOCOL_INFOW 
+typedef  struct _PROTOCOL_INFOW
 {
          DWORD   dwServiceFlags;
          INT     iAddressFamily;
diff --git a/include/ntddk.h b/include/ntddk.h
index 42a354c..00500b5 100644
--- a/include/ntddk.h
+++ b/include/ntddk.h
@@ -31,24 +31,24 @@
 extern "C" {
 #endif
 
-/****************** 
- * asynchronous I/O 
+/******************
+ * asynchronous I/O
  */
 #undef Status	/* conflict with X11-includes*/
 
-typedef struct _IO_STATUS_BLOCK 
+typedef struct _IO_STATUS_BLOCK
 {
 	union {
 	  NTSTATUS Status;
 	  PVOID Pointer;
 	} DUMMYUNIONNAME;
 	ULONG_PTR Information;
-} IO_STATUS_BLOCK, *PIO_STATUS_BLOCK;    
+} IO_STATUS_BLOCK, *PIO_STATUS_BLOCK;
 
 typedef VOID (NTAPI *PIO_APC_ROUTINE) ( PVOID ApcContext, PIO_STATUS_BLOCK IoStatusBlock, ULONG Reserved );
 
 /*
-	registry 
+	registry
  */
 
  /* key information */
@@ -59,7 +59,7 @@
 	WCHAR		Name[1];
 } KEY_BASIC_INFORMATION, *PKEY_BASIC_INFORMATION;
 
-typedef struct _KEY_NODE_INFORMATION 
+typedef struct _KEY_NODE_INFORMATION
 {
 	LARGE_INTEGER	LastWriteTime;
 	ULONG		TitleIndex;
@@ -70,7 +70,7 @@
 /*	Class[1]; */
 } KEY_NODE_INFORMATION, *PKEY_NODE_INFORMATION;
 
-typedef struct _KEY_FULL_INFORMATION 
+typedef struct _KEY_FULL_INFORMATION
 {
 	LARGE_INTEGER	LastWriteTime;
 	ULONG		TitleIndex;
@@ -85,14 +85,14 @@
 	WCHAR		Class[1];
 } KEY_FULL_INFORMATION, *PKEY_FULL_INFORMATION;
 
-typedef enum _KEY_INFORMATION_CLASS 
+typedef enum _KEY_INFORMATION_CLASS
 {
 	KeyBasicInformation,
 	KeyNodeInformation,
 	KeyFullInformation
 } KEY_INFORMATION_CLASS;
 
-typedef struct _KEY_VALUE_ENTRY 
+typedef struct _KEY_VALUE_ENTRY
 {
 	PUNICODE_STRING	ValueName;
 	ULONG		DataLength;
@@ -101,7 +101,7 @@
 } KEY_VALUE_ENTRY, *PKEY_VALUE_ENTRY;
 
 /* value information */
-typedef struct _KEY_VALUE_BASIC_INFORMATION 
+typedef struct _KEY_VALUE_BASIC_INFORMATION
 {
 	ULONG   TitleIndex;
 	ULONG   Type;
@@ -109,7 +109,7 @@
 	WCHAR   Name[1];
 } KEY_VALUE_BASIC_INFORMATION, *PKEY_VALUE_BASIC_INFORMATION;
 
-typedef struct _KEY_VALUE_FULL_INFORMATION 
+typedef struct _KEY_VALUE_FULL_INFORMATION
 {
 	ULONG   TitleIndex;
 	ULONG   Type;
@@ -120,7 +120,7 @@
 /*	UCHAR 	Data[1];*/
 } KEY_VALUE_FULL_INFORMATION, *PKEY_VALUE_FULL_INFORMATION;
 
-typedef struct _KEY_VALUE_PARTIAL_INFORMATION 
+typedef struct _KEY_VALUE_PARTIAL_INFORMATION
 {
 	ULONG   TitleIndex;
 	ULONG   Type;
@@ -128,7 +128,7 @@
 	UCHAR   Data[1];
 } KEY_VALUE_PARTIAL_INFORMATION, *PKEY_VALUE_PARTIAL_INFORMATION;
 
-typedef enum _KEY_VALUE_INFORMATION_CLASS 
+typedef enum _KEY_VALUE_INFORMATION_CLASS
 {
 	KeyValueBasicInformation,
 	KeyValueFullInformation,
@@ -142,7 +142,7 @@
 
 /*	thread information */
 
-typedef enum _THREADINFOCLASS 
+typedef enum _THREADINFOCLASS
 {	ThreadBasicInformation,
 	ThreadTimes,
 	ThreadPriority,
@@ -232,13 +232,13 @@
 	FileFsMaximumInformation
 } FS_INFORMATION_CLASS, *PFS_INFORMATION_CLASS;
 
-typedef enum _SECTION_INHERIT 
+typedef enum _SECTION_INHERIT
 {
 	ViewShare = 1,
 	ViewUnmap = 2
 
 } SECTION_INHERIT;
- 
+
 /*	object information */
 
 typedef enum _OBJECT_INFORMATION_CLASS
@@ -440,11 +440,11 @@
 
 } SYSTEM_TIME_ADJUSTMENT, *PSYSTEM_TIME_ADJUSTMENT;
 
-typedef struct _SYSTEM_CONFIGURATION_INFO 
+typedef struct _SYSTEM_CONFIGURATION_INFO
 {
-	union 
+	union
 	{ ULONG	OemId;
-	  struct 
+	  struct
 	  { WORD	ProcessorArchitecture;
 	    WORD	Reserved;
 	  } tag1;
@@ -468,7 +468,7 @@
 
 /* parameter ProcessInformationClass */
 
-typedef enum _PROCESSINFOCLASS 
+typedef enum _PROCESSINFOCLASS
 {	ProcessBasicInformation,
 	ProcessQuotaLimits,
 	ProcessIoCounters,
@@ -501,7 +501,7 @@
 
 /* parameter ProcessInformation (depending on ProcessInformationClass) */
 
-typedef struct _PROCESS_BASIC_INFORMATION 
+typedef struct _PROCESS_BASIC_INFORMATION
 {	DWORD	ExitStatus;
 	DWORD	PebBaseAddress;
 	DWORD	AffinityMask;
@@ -523,7 +523,7 @@
  *	timer
  */
 
-typedef enum _TIMER_TYPE 
+typedef enum _TIMER_TYPE
 {
 	NotificationTimer,
 	SynchronizationTimer
@@ -531,15 +531,15 @@
 } TIMER_TYPE;
 
 /*	token functions */
- 
+
 NTSTATUS WINAPI NtOpenProcessToken(
 	HANDLE ProcessHandle,
-	DWORD DesiredAccess, 
+	DWORD DesiredAccess,
 	HANDLE *TokenHandle);
-	
+
 NTSTATUS WINAPI NtOpenThreadToken(
 	HANDLE ThreadHandle,
-	DWORD DesiredAccess, 
+	DWORD DesiredAccess,
 	BOOLEAN OpenAsSelf,
 	HANDLE *TokenHandle);
 
@@ -553,7 +553,7 @@
 
 NTSTATUS WINAPI NtQueryInformationToken(
 	HANDLE token,
-	DWORD tokeninfoclass, 
+	DWORD tokeninfoclass,
 	LPVOID tokeninfo,
 	DWORD tokeninfolength,
 	LPDWORD retlen );
@@ -568,19 +568,19 @@
 	DWORD nSubAuthority4, DWORD nSubAuthority5,
 	DWORD nSubAuthority6, DWORD nSubAuthority7,
 	PSID *pSid );
-	
+
 BOOL WINAPI RtlInitializeSid(
 	PSID pSid,
 	PSID_IDENTIFIER_AUTHORITY pIdentifierAuthority,
 	BYTE nSubAuthorityCount);
-	
+
 DWORD WINAPI RtlFreeSid(
 	PSID pSid);
 
 BOOL WINAPI RtlEqualSid(
 	PSID pSid1,
 	PSID pSid2 );
-	
+
 DWORD WINAPI RtlLengthRequiredSid(
 	DWORD nrofsubauths);
 
@@ -598,7 +598,7 @@
 	DWORD len,
 	PSID to,
 	PSID from);
-	
+
 BOOL WINAPI RtlValidSid(
 	PSID pSid);
 
@@ -692,7 +692,7 @@
 	DWORD xnrofaces,
 	PACE_HEADER acestart,
 	DWORD acelen);
-	
+
 BOOL WINAPI RtlAddAccessAllowedAce(
 	IN OUT PACL pAcl,
 	IN DWORD dwAceRevision,
@@ -775,25 +775,25 @@
 
 VOID   WINAPI RtlInitializeResource(
 	LPRTL_RWLOCK);
-	
+
 VOID   WINAPI RtlDeleteResource(
 	LPRTL_RWLOCK);
-	
+
 BYTE   WINAPI RtlAcquireResourceExclusive(
 	LPRTL_RWLOCK, BYTE fWait);
-	
+
 BYTE   WINAPI RtlAcquireResourceShared(
 	LPRTL_RWLOCK, BYTE fWait);
-	
+
 VOID   WINAPI RtlReleaseResource(
 	LPRTL_RWLOCK);
-	
+
 VOID   WINAPI RtlDumpResource(
 	LPRTL_RWLOCK);
 
 /*	time functions */
 
-typedef struct _TIME_FIELDS 
+typedef struct _TIME_FIELDS
 {   CSHORT Year;
     CSHORT Month;
     CSHORT Day;
@@ -817,11 +817,11 @@
 BOOLEAN WINAPI RtlTimeFieldsToTime(
 	PTIME_FIELDS tfTimeFields,
 	PLARGE_INTEGER Time);
-	
+
 VOID WINAPI RtlTimeToElapsedTimeFields(
 	PLARGE_INTEGER liTime,
 	PTIME_FIELDS TimeFields);
-	
+
 void    WINAPI NtQuerySystemTime( LARGE_INTEGER *time );
 
 BOOLEAN WINAPI RtlTimeToSecondsSince1980( const FILETIME *time, LPDWORD res );
@@ -920,8 +920,8 @@
 
 DWORD WINAPI RtlDeleteSecurityObject(
 	DWORD x1);
-	
-NTSTATUS WINAPI 
+
+NTSTATUS WINAPI
 NtQuerySecurityObject(
 	IN HANDLE Object,
 	IN SECURITY_INFORMATION RequestedInformation,
@@ -1056,7 +1056,7 @@
 BOOLEAN WINAPI RtlDosPathNameToNtPathName_U( LPWSTR from,PUNICODE_STRING us,DWORD x2,DWORD x3);
 BOOL WINAPI RtlImpersonateSelf(SECURITY_IMPERSONATION_LEVEL ImpersonationLevel);
 
-NTSTATUS WINAPI 
+NTSTATUS WINAPI
 NtAccessCheck(
 	IN PSECURITY_DESCRIPTOR SecurityDescriptor,
 	IN HANDLE ClientToken,
diff --git a/include/ntddstor.h b/include/ntddstor.h
index 1f8f134..7c08940 100644
--- a/include/ntddstor.h
+++ b/include/ntddstor.h
@@ -131,7 +131,7 @@
     SYQUEST_EZFLYER,
     SYQUEST_SYJET,
     AVATAR_F2,
-    MP2_8mm 
+    MP2_8mm
 } STORAGE_MEDIA_TYPE, *PSTORAGE_MEDIA_TYPE;
 
 #define MEDIA_ERASEABLE         0x00000001
@@ -179,7 +179,7 @@
     PropertyStandardQuery = 0,
     PropertyExistsQuery,
     PropertyMaskQuery,
-    PropertyQueryMaxDefined 
+    PropertyQueryMaxDefined
 } STORAGE_QUERY_TYPE, *PSTORAGE_QUERY_TYPE;
 
 typedef enum _STORAGE_PROPERTY_ID {
diff --git a/include/ntdef.h b/include/ntdef.h
index 21f3e0b..61d5b58 100644
--- a/include/ntdef.h
+++ b/include/ntdef.h
@@ -26,7 +26,7 @@
 extern "C" {
 #endif
 
-#define NTAPI   __stdcall 
+#define NTAPI   __stdcall
 
 #ifndef IN
 #define IN
@@ -48,7 +48,7 @@
 typedef NTSTATUS *PNTSTATUS;
 
 typedef short CSHORT;
-typedef CSHORT *PCSHORT;  
+typedef CSHORT *PCSHORT;
 
 
 /* NT lowlevel Strings (handled by Rtl* functions in NTDLL)
@@ -86,7 +86,7 @@
 #define OBJ_KERNEL_HANDLE       0x00000200L
 #define OBJ_VALID_ATTRIBUTES    0x000003F2L
 
-typedef struct _OBJECT_ATTRIBUTES 
+typedef struct _OBJECT_ATTRIBUTES
 {   ULONG Length;
     HANDLE RootDirectory;
     PUNICODE_STRING ObjectName;
diff --git a/include/ntsecapi.h b/include/ntsecapi.h
index b7765e2..3c548b4 100644
--- a/include/ntsecapi.h
+++ b/include/ntsecapi.h
@@ -33,7 +33,7 @@
 
 NTSTATUS WINAPI LsaOpenPolicy(PLSA_UNICODE_STRING,PLSA_OBJECT_ATTRIBUTES,ACCESS_MASK,PLSA_HANDLE);
 
-typedef enum 
+typedef enum
 {
 	PolicyAuditLogInformation = 1,
 	PolicyAuditEventsInformation,
diff --git a/include/objbase.h b/include/objbase.h
index 9484adb..4aa2c45 100644
--- a/include/objbase.h
+++ b/include/objbase.h
@@ -60,7 +60,7 @@
 #endif
 
 #ifndef __WINE__
-/* These macros are msdev's way of defining COM objects. 
+/* These macros are msdev's way of defining COM objects.
  * They are provided here for use by Winelib developpers.
  */
 #define FARSTRUCT
diff --git a/include/ole.h b/include/ole.h
index 8f00d26..d9ef4cb 100644
--- a/include/ole.h
+++ b/include/ole.h
@@ -207,9 +207,9 @@
 	OLESTATUS	(CALLBACK *CreateFromTemplate)(LPOLESERVER,LHSERVERDOC,LPCOLESTR16,LPCOLESTR16,LPCOLESTR16,LPOLESERVERDOC *);
 	OLESTATUS	(CALLBACK *Edit)(LPOLESERVER,LHSERVERDOC,LPCOLESTR16,LPCOLESTR16,LPOLESERVERDOC *);
 	OLESTATUS	(CALLBACK *Exit)(LPOLESERVER);
-	OLESTATUS	(CALLBACK *Release)(LPOLESERVER); 
-	OLESTATUS	(CALLBACK *Execute)(LPOLESERVER); 
-} OLESERVERVTBL; 
+	OLESTATUS	(CALLBACK *Release)(LPOLESERVER);
+	OLESTATUS	(CALLBACK *Execute)(LPOLESERVER);
+} OLESERVERVTBL;
 typedef OLESERVERVTBL	*LPOLESERVERVTBL;
 typedef struct _OLESERVER {
 	LPOLESERVERVTBL	lpvtbl;
diff --git a/include/ole2.h b/include/ole2.h
index 582fe31..6bed8ee 100644
--- a/include/ole2.h
+++ b/include/ole2.h
@@ -73,11 +73,11 @@
 
 
 HRESULT     WINAPI OleSave(LPPERSISTSTORAGE pPS, LPSTORAGE pStg, BOOL fSameAsLoad);
-HRESULT     WINAPI OleRegGetUserType(REFCLSID clsid, 
+HRESULT     WINAPI OleRegGetUserType(REFCLSID clsid,
 				     DWORD dwFormOfType,
 				     LPOLESTR* pszUserType);
 HRESULT     WINAPI OleRegGetMiscStatus (REFCLSID clsid, DWORD dwAspect, DWORD* pdwStatus);
-HRESULT     WINAPI OleRegEnumFormatEtc (REFCLSID clsid, 
+HRESULT     WINAPI OleRegEnumFormatEtc (REFCLSID clsid,
 					DWORD    dwDirection,
 					LPENUMFORMATETC* ppenumFormatetc);
 HRESULT     WINAPI CreateStreamOnHGlobal (HGLOBAL hGlobal, BOOL fDeleteOnRelease, LPSTREAM* ppstm);
@@ -97,7 +97,7 @@
 HRESULT     WINAPI OleIsCurrentClipboard(LPDATAOBJECT);
 HRESULT     WINAPI OleSetClipboard(LPDATAOBJECT);
 HRESULT     WINAPI OleCreateStaticFromData(LPDATAOBJECT pSrcDataObj, REFIID iid,
-                DWORD renderopt, LPFORMATETC pFormatEtc, LPOLECLIENTSITE pClientSite, 
+                DWORD renderopt, LPFORMATETC pFormatEtc, LPOLECLIENTSITE pClientSite,
                 LPSTORAGE pStg, LPVOID* ppvObj);
 HRESULT     WINAPI ReadFmtUserTypeStg(LPSTORAGE pstg, CLIPFORMAT* pcf, LPOLESTR* lplpszUserType);
 HRESULT     WINAPI OleLoad(LPSTORAGE pStg, REFIID riid, LPOLECLIENTSITE pClientSite, LPVOID* ppvObj);
diff --git a/include/ole2ver.h b/include/ole2ver.h
index 037ab19..8c2f57d 100644
--- a/include/ole2ver.h
+++ b/include/ole2ver.h
@@ -31,7 +31,7 @@
  * Win98 SE original files:
  * COMPOBJ: CoBuildVersion 23/700
  * OLE2: OleBuildVersion -> COMPOBJ.CoBuildVersion
- * OLE32: CoBuildVersion and Ole~ 23/824 
+ * OLE32: CoBuildVersion and Ole~ 23/824
  *
  * We probably should reorganize the OLE version stuff, i.e.
  * use different values for every *BuildVersion function and Win version.
diff --git a/include/oleauto.h b/include/oleauto.h
index 0badc6d..0cae376 100644
--- a/include/oleauto.h
+++ b/include/oleauto.h
@@ -66,64 +66,64 @@
 HRESULT WINAPI
 SafeArrayAllocDescriptor(UINT cDims, struct tagSAFEARRAY **ppsaOut);
 
-HRESULT WINAPI 
+HRESULT WINAPI
 SafeArrayAllocData(struct tagSAFEARRAY *psa);
 
 struct tagSAFEARRAY * WINAPI
 SafeArrayCreate(VARTYPE vt, UINT cDims, struct tagSAFEARRAYBOUND *rgsabound);
 
-HRESULT WINAPI 
+HRESULT WINAPI
 SafeArrayDestroyDescriptor(struct tagSAFEARRAY *psa);
 
-HRESULT WINAPI 
+HRESULT WINAPI
 SafeArrayPutElement(struct tagSAFEARRAY *psa, LONG *rgIndices, void *pv);
 
-HRESULT WINAPI 
+HRESULT WINAPI
 SafeArrayGetElement(struct tagSAFEARRAY *psa, LONG *rgIndices, void *pv);
 
-HRESULT WINAPI 
+HRESULT WINAPI
 SafeArrayLock(struct tagSAFEARRAY *psa);
 
-HRESULT WINAPI 
+HRESULT WINAPI
 SafeArrayUnlock(struct tagSAFEARRAY *psa);
 
-HRESULT WINAPI 
+HRESULT WINAPI
 SafeArrayGetUBound(struct tagSAFEARRAY *psa, UINT nDim, LONG *plUbound);
 
-HRESULT WINAPI 
+HRESULT WINAPI
 SafeArrayGetLBound(struct tagSAFEARRAY *psa, UINT nDim, LONG *plLbound);
 
-UINT  WINAPI 
+UINT  WINAPI
 SafeArrayGetDim(struct tagSAFEARRAY *psa);
 
-UINT  WINAPI 
+UINT  WINAPI
 SafeArrayGetElemsize(struct tagSAFEARRAY *psa);
 
-HRESULT WINAPI 
+HRESULT WINAPI
 SafeArrayAccessData(struct tagSAFEARRAY *psa, void **ppvData);
 
-HRESULT WINAPI 
+HRESULT WINAPI
 SafeArrayUnaccessData(struct tagSAFEARRAY *psa);
 
-HRESULT WINAPI 
+HRESULT WINAPI
 SafeArrayPtrOfIndex(struct tagSAFEARRAY *psa, LONG *rgIndices, void **ppvData);
 
-HRESULT WINAPI 
+HRESULT WINAPI
 SafeArrayCopyData(struct tagSAFEARRAY *psaSource, struct tagSAFEARRAY **psaTarget);
 
-HRESULT WINAPI 
+HRESULT WINAPI
 SafeArrayDestroyData(struct tagSAFEARRAY *psa);
 
-HRESULT WINAPI 
+HRESULT WINAPI
 SafeArrayDestroy(struct tagSAFEARRAY *psa);
 
-HRESULT WINAPI 
+HRESULT WINAPI
 SafeArrayCopy(struct tagSAFEARRAY *psa, struct tagSAFEARRAY **ppsaOut);
 
 struct tagSAFEARRAY * WINAPI
 SafeArrayCreateVector(VARTYPE vt, LONG lLbound, ULONG cElements);
 
-HRESULT WINAPI 
+HRESULT WINAPI
 SafeArrayRedim(struct tagSAFEARRAY *psa, struct tagSAFEARRAYBOUND *psaboundNew);
 
 
@@ -626,7 +626,7 @@
 
 #ifdef __cplusplus
 } /* extern "C" */
-#endif 
+#endif
 
 
 #endif /*__WINE_OLEAUTO_H*/
diff --git a/include/olectl.h b/include/olectl.h
index 83d78ba..5cb1184 100644
--- a/include/olectl.h
+++ b/include/olectl.h
@@ -68,7 +68,7 @@
             0x66504308,0xBE0F,0x101A,0x8B,0xBB,0x00,0xAA,0x00,0x30,0x0C,0xAB);
 DEFINE_GUID(GUID_YSIZE,
             0x66504309,0xBE0F,0x101A,0x8B,0xBB,0x00,0xAA,0x00,0x30,0x0C,0xAB);
- 
+
 typedef struct tagOCPFIPARAMS
 {
 	ULONG cbStructSize;
@@ -154,18 +154,18 @@
 HRESULT WINAPI OleCreatePropertyFrameIndirect( LPOCPFIPARAMS lpParams);
 
 HRESULT WINAPI OleCreatePropertyFrame(
-	HWND hwndOwner, UINT x, UINT y, 
-	LPCOLESTR lpszCaption, ULONG cObjects, LPUNKNOWN* ppUnk, 
-	ULONG cPages, LPCLSID pPageClsID, LCID lcid, DWORD dwReserved, 
+	HWND hwndOwner, UINT x, UINT y,
+	LPCOLESTR lpszCaption, ULONG cObjects, LPUNKNOWN* ppUnk,
+	ULONG cPages, LPCLSID pPageClsID, LCID lcid, DWORD dwReserved,
 	LPVOID pvReserved );
 
-HRESULT WINAPI OleLoadPicture(	LPSTREAM lpstream, LONG lSize, BOOL fRunmode, 
+HRESULT WINAPI OleLoadPicture(	LPSTREAM lpstream, LONG lSize, BOOL fRunmode,
 		REFIID reed, LPVOID *lplpvObj );
 
-HRESULT WINAPI OleCreatePictureIndirect(LPPICTDESC lpPictDesc, REFIID riid, 
+HRESULT WINAPI OleCreatePictureIndirect(LPPICTDESC lpPictDesc, REFIID riid,
 		BOOL fOwn, LPVOID * lplpvObj );
 
-HRESULT WINAPI OleCreateFontIndirect(LPFONTDESC lpFontDesc, REFIID riid, 
+HRESULT WINAPI OleCreateFontIndirect(LPFONTDESC lpFontDesc, REFIID riid,
 		LPVOID* lplpvObj);
 
 HRESULT WINAPI OleTranslateColor( OLE_COLOR clr, HPALETTE hpal,
@@ -253,7 +253,7 @@
 #define	DISPID_PICT_WIDTH	4
 #define	DISPID_PICT_HEIGHT	5
 #define	DISPID_PICT_RENDER	6
- 
+
 /* Reflected Window Message IDs */
 #define OCM__BASE           (WM_USER+0x1c00)
 #define OCM_COMMAND         (OCM__BASE + WM_COMMAND)
diff --git a/include/oledlg.h b/include/oledlg.h
index 5ef5ea1..97a089c 100644
--- a/include/oledlg.h
+++ b/include/oledlg.h
@@ -102,7 +102,7 @@
 
 #define OLEUI_FALSE   0
 #define OLEUI_SUCCESS 1 /* Same as OLEUI_OK */
-#define OLEUI_OK      1 /* OK button pressed */ 
+#define OLEUI_OK      1 /* OK button pressed */
 #define OLEUI_CANCEL  2 /* Cancel button pressed */
 
 #define OPF_OBJECTISLINK                0x00000001L
@@ -117,54 +117,54 @@
  */
 typedef struct tagOLEUIINSERTOBJECTA
 {
-    DWORD           cbStruct;       
-    DWORD           dwFlags;        
-    HWND            hWndOwner;      
-    LPCSTR          lpszCaption;    
-    LPFNOLEUIHOOK   lpfnHook;       
-    LPARAM          lCustData;      
-    HINSTANCE       hInstance;      
-    LPCSTR          lpszTemplate;   
-    HRSRC           hResource;      
-    CLSID           clsid;          
-    LPSTR           lpszFile;       
-    UINT            cchFile;        
-    UINT            cClsidExclude;  
-    LPCLSID         lpClsidExclude; 
-    IID             iid;            
-    DWORD           oleRender;      
-    LPFORMATETC     lpFormatEtc;    
-    LPOLECLIENTSITE lpIOleClientSite;   
-    LPSTORAGE       lpIStorage;     
-    LPVOID          *ppvObj;        
-    SCODE           sc;             
-    HGLOBAL         hMetaPict;      
+    DWORD           cbStruct;
+    DWORD           dwFlags;
+    HWND            hWndOwner;
+    LPCSTR          lpszCaption;
+    LPFNOLEUIHOOK   lpfnHook;
+    LPARAM          lCustData;
+    HINSTANCE       hInstance;
+    LPCSTR          lpszTemplate;
+    HRSRC           hResource;
+    CLSID           clsid;
+    LPSTR           lpszFile;
+    UINT            cchFile;
+    UINT            cClsidExclude;
+    LPCLSID         lpClsidExclude;
+    IID             iid;
+    DWORD           oleRender;
+    LPFORMATETC     lpFormatEtc;
+    LPOLECLIENTSITE lpIOleClientSite;
+    LPSTORAGE       lpIStorage;
+    LPVOID          *ppvObj;
+    SCODE           sc;
+    HGLOBAL         hMetaPict;
 } OLEUIINSERTOBJECTA, *POLEUIINSERTOBJECTA, *LPOLEUIINSERTOBJECTA;
 
 typedef struct tagOLEUIINSERTOBJECTW
 {
-    DWORD           cbStruct;       
-    DWORD           dwFlags;        
-    HWND            hWndOwner;      
-    LPCWSTR         lpszCaption;    
-    LPFNOLEUIHOOK   lpfnHook;       
-    LPARAM          lCustData;      
-    HINSTANCE       hInstance;      
-    LPCWSTR         lpszTemplate;   
-    HRSRC           hResource;      
-    CLSID           clsid;          
-    LPWSTR          lpszFile;       
-    UINT            cchFile;        
-    UINT            cClsidExclude;  
-    LPCLSID         lpClsidExclude; 
-    IID             iid;            
-    DWORD           oleRender;      
-    LPFORMATETC     lpFormatEtc;    
-    LPOLECLIENTSITE lpIOleClientSite;   
-    LPSTORAGE       lpIStorage;     
-    LPVOID          *ppvObj;        
-    SCODE           sc;             
-    HGLOBAL         hMetaPict;      
+    DWORD           cbStruct;
+    DWORD           dwFlags;
+    HWND            hWndOwner;
+    LPCWSTR         lpszCaption;
+    LPFNOLEUIHOOK   lpfnHook;
+    LPARAM          lCustData;
+    HINSTANCE       hInstance;
+    LPCWSTR         lpszTemplate;
+    HRSRC           hResource;
+    CLSID           clsid;
+    LPWSTR          lpszFile;
+    UINT            cchFile;
+    UINT            cClsidExclude;
+    LPCLSID         lpClsidExclude;
+    IID             iid;
+    DWORD           oleRender;
+    LPFORMATETC     lpFormatEtc;
+    LPOLECLIENTSITE lpIOleClientSite;
+    LPSTORAGE       lpIStorage;
+    LPVOID          *ppvObj;
+    SCODE           sc;
+    HGLOBAL         hMetaPict;
 } OLEUIINSERTOBJECTW, *POLEUIINSERTOBJECTW, *LPOLEUIINSERTOBJECTW;
 
 DECL_WINELIB_TYPE_AW(OLEUIINSERTOBJECT)
@@ -177,54 +177,54 @@
  */
 typedef struct tagOLEUICONVERTA
 {
-    DWORD           cbStruct;       
-    DWORD           dwFlags;        
-    HWND            hWndOwner;      
-    LPCSTR          lpszCaption;    
-    LPFNOLEUIHOOK   lpfnHook;       
-    LPARAM          lCustData;      
-    HINSTANCE       hInstance;      
-    LPCSTR          lpszTemplate;   
-    HRSRC           hResource;      
-    CLSID           clsid;          
-    CLSID           clsidConvertDefault;    
-    CLSID           clsidActivateDefault;   
-    CLSID           clsidNew;       
-    DWORD           dvAspect;       
-    WORD            wFormat;        
+    DWORD           cbStruct;
+    DWORD           dwFlags;
+    HWND            hWndOwner;
+    LPCSTR          lpszCaption;
+    LPFNOLEUIHOOK   lpfnHook;
+    LPARAM          lCustData;
+    HINSTANCE       hInstance;
+    LPCSTR          lpszTemplate;
+    HRSRC           hResource;
+    CLSID           clsid;
+    CLSID           clsidConvertDefault;
+    CLSID           clsidActivateDefault;
+    CLSID           clsidNew;
+    DWORD           dvAspect;
+    WORD            wFormat;
     BOOL            fIsLinkedObject;
-    HGLOBAL         hMetaPict;      
-    LPSTR           lpszUserType;   
-    BOOL            fObjectsIconChanged; 
-    LPSTR           lpszDefLabel;   
-    UINT            cClsidExclude;  
-    LPCLSID         lpClsidExclude; 
+    HGLOBAL         hMetaPict;
+    LPSTR           lpszUserType;
+    BOOL            fObjectsIconChanged;
+    LPSTR           lpszDefLabel;
+    UINT            cClsidExclude;
+    LPCLSID         lpClsidExclude;
 } OLEUICONVERTA, *POLEUICONVERTA, *LPOLEUICONVERTA;
 
 typedef struct tagOLEUICONVERTW
 {
-    DWORD           cbStruct;       
-    DWORD           dwFlags;        
-    HWND            hWndOwner;      
-    LPCWSTR         lpszCaption;    
-    LPFNOLEUIHOOK   lpfnHook;       
-    LPARAM          lCustData;      
-    HINSTANCE       hInstance;      
-    LPCWSTR         lpszTemplate;   
-    HRSRC           hResource;      
-    CLSID           clsid;          
-    CLSID           clsidConvertDefault;    
-    CLSID           clsidActivateDefault;   
-    CLSID           clsidNew;       
-    DWORD           dvAspect;       
-    WORD            wFormat;        
+    DWORD           cbStruct;
+    DWORD           dwFlags;
+    HWND            hWndOwner;
+    LPCWSTR         lpszCaption;
+    LPFNOLEUIHOOK   lpfnHook;
+    LPARAM          lCustData;
+    HINSTANCE       hInstance;
+    LPCWSTR         lpszTemplate;
+    HRSRC           hResource;
+    CLSID           clsid;
+    CLSID           clsidConvertDefault;
+    CLSID           clsidActivateDefault;
+    CLSID           clsidNew;
+    DWORD           dvAspect;
+    WORD            wFormat;
     BOOL            fIsLinkedObject;
-    HGLOBAL         hMetaPict;      
-    LPWSTR          lpszUserType;   
-    BOOL            fObjectsIconChanged; 
-    LPWSTR          lpszDefLabel;   
-    UINT            cClsidExclude;  
-    LPCLSID         lpClsidExclude; 
+    HGLOBAL         hMetaPict;
+    LPWSTR          lpszUserType;
+    BOOL            fObjectsIconChanged;
+    LPWSTR          lpszDefLabel;
+    UINT            cClsidExclude;
+    LPCLSID         lpClsidExclude;
 } OLEUICONVERTW, *POLEUICONVERTW, *LPOLEUICONVERTW;
 
 DECL_WINELIB_TYPE_AW(OLEUICONVERT)
@@ -236,36 +236,36 @@
  */
 typedef struct tagOLEUICHANGEICONA
 {
-    DWORD           cbStruct;       
-    DWORD           dwFlags;        
-    HWND            hWndOwner;      
-    LPCSTR          lpszCaption;    
-    LPFNOLEUIHOOK   lpfnHook;       
-    LPARAM          lCustData;      
-    HINSTANCE       hInstance;      
-    LPCSTR          lpszTemplate;   
-    HRSRC           hResource;      
-    HGLOBAL         hMetaPict;      
-    CLSID           clsid;          
-    CHAR            szIconExe[MAX_PATH];    
-    INT             cchIconExe;     
+    DWORD           cbStruct;
+    DWORD           dwFlags;
+    HWND            hWndOwner;
+    LPCSTR          lpszCaption;
+    LPFNOLEUIHOOK   lpfnHook;
+    LPARAM          lCustData;
+    HINSTANCE       hInstance;
+    LPCSTR          lpszTemplate;
+    HRSRC           hResource;
+    HGLOBAL         hMetaPict;
+    CLSID           clsid;
+    CHAR            szIconExe[MAX_PATH];
+    INT             cchIconExe;
 } OLEUICHANGEICONA, *POLEUICHANGEICONA, *LPOLEUICHANGEICONA;
 
 typedef struct tagOLEUICHANGEICONW
 {
-    DWORD           cbStruct;       
-    DWORD           dwFlags;        
-    HWND            hWndOwner;      
-    LPCWSTR         lpszCaption;    
-    LPFNOLEUIHOOK   lpfnHook;       
-    LPARAM          lCustData;      
-    HINSTANCE       hInstance;      
-    LPCWSTR         lpszTemplate;   
-    HRSRC           hResource;      
-    HGLOBAL         hMetaPict;      
-    CLSID           clsid;          
-    WCHAR           szIconExe[MAX_PATH];    
-    INT             cchIconExe;     
+    DWORD           cbStruct;
+    DWORD           dwFlags;
+    HWND            hWndOwner;
+    LPCWSTR         lpszCaption;
+    LPFNOLEUIHOOK   lpfnHook;
+    LPARAM          lCustData;
+    HINSTANCE       hInstance;
+    LPCWSTR         lpszTemplate;
+    HRSRC           hResource;
+    HGLOBAL         hMetaPict;
+    CLSID           clsid;
+    WCHAR           szIconExe[MAX_PATH];
+    INT             cchIconExe;
 } OLEUICHANGEICONW, *POLEUICHANGEICONW, *LPOLEUICHANGEICONW;
 
 DECL_WINELIB_TYPE_AW(OLEUICHANGEICON)
@@ -279,7 +279,7 @@
 
 typedef enum tagOLEUIPASTEFLAG
 {
-   OLEUIPASTE_ENABLEICON    = 2048,     
+   OLEUIPASTE_ENABLEICON    = 2048,
    OLEUIPASTE_PASTEONLY     = 0,
    OLEUIPASTE_PASTE         = 512,
    OLEUIPASTE_LINKANYTYPE   = 1024,
@@ -291,24 +291,24 @@
    OLEUIPASTE_LINKTYPE6     = 32,
    OLEUIPASTE_LINKTYPE7     = 64,
    OLEUIPASTE_LINKTYPE8     = 128
-} OLEUIPASTEFLAG;    
+} OLEUIPASTEFLAG;
 
 typedef struct tagOLEUIPASTEENTRYA
 {
-   FORMATETC        fmtetc;         
+   FORMATETC        fmtetc;
    LPCSTR           lpstrFormatName;
    LPCSTR           lpstrResultText;
-   DWORD            dwFlags;        
-   DWORD            dwScratchSpace; 
+   DWORD            dwFlags;
+   DWORD            dwScratchSpace;
 } OLEUIPASTEENTRYA, *POLEUIPASTEENTRYA, *LPOLEUIPASTEENTRYA;
 
 typedef struct tagOLEUIPASTEENTRYW
 {
-   FORMATETC        fmtetc;         
+   FORMATETC        fmtetc;
    LPCWSTR          lpstrFormatName;
    LPCWSTR          lpstrResultText;
-   DWORD            dwFlags;        
-   DWORD            dwScratchSpace; 
+   DWORD            dwFlags;
+   DWORD            dwScratchSpace;
 } OLEUIPASTEENTRYW, *POLEUIPASTEENTRYW, *LPOLEUIPASTEENTRYW;
 
 DECL_WINELIB_TYPE_AW(OLEUIPASTEENTRY)
@@ -317,50 +317,50 @@
 
 typedef struct tagOLEUIPASTESPECIALA
 {
-    DWORD           cbStruct;       
-    DWORD           dwFlags;        
-    HWND            hWndOwner;      
-    LPCSTR          lpszCaption;    
-    LPFNOLEUIHOOK   lpfnHook;       
-    LPARAM          lCustData;      
-    HINSTANCE       hInstance;      
-    LPCSTR          lpszTemplate;   
-    HRSRC           hResource;      
-    LPDATAOBJECT    lpSrcDataObj;   
+    DWORD           cbStruct;
+    DWORD           dwFlags;
+    HWND            hWndOwner;
+    LPCSTR          lpszCaption;
+    LPFNOLEUIHOOK   lpfnHook;
+    LPARAM          lCustData;
+    HINSTANCE       hInstance;
+    LPCSTR          lpszTemplate;
+    HRSRC           hResource;
+    LPDATAOBJECT    lpSrcDataObj;
     LPOLEUIPASTEENTRYA arrPasteEntries;
-    INT             cPasteEntries;  
-    UINT*           arrLinkTypes;   
-    INT             cLinkTypes;     
-    UINT            cClsidExclude;  
-    LPCLSID         lpClsidExclude; 
-    INT             nSelectedIndex; 
-    BOOL            fLink;          
-    HGLOBAL         hMetaPict;      
-    SIZEL           sizel;          
+    INT             cPasteEntries;
+    UINT*           arrLinkTypes;
+    INT             cLinkTypes;
+    UINT            cClsidExclude;
+    LPCLSID         lpClsidExclude;
+    INT             nSelectedIndex;
+    BOOL            fLink;
+    HGLOBAL         hMetaPict;
+    SIZEL           sizel;
 } OLEUIPASTESPECIALA, *POLEUIPASTESPECIALA, *LPOLEUIPASTESPECIALA;
 
 typedef struct tagOLEUIPASTESPECIALW
 {
-    DWORD           cbStruct;       
-    DWORD           dwFlags;        
-    HWND            hWndOwner;      
-    LPCWSTR         lpszCaption;    
-    LPFNOLEUIHOOK   lpfnHook;       
-    LPARAM          lCustData;      
-    HINSTANCE       hInstance;      
-    LPCWSTR         lpszTemplate;   
-    HRSRC           hResource;      
-    LPDATAOBJECT    lpSrcDataObj;   
+    DWORD           cbStruct;
+    DWORD           dwFlags;
+    HWND            hWndOwner;
+    LPCWSTR         lpszCaption;
+    LPFNOLEUIHOOK   lpfnHook;
+    LPARAM          lCustData;
+    HINSTANCE       hInstance;
+    LPCWSTR         lpszTemplate;
+    HRSRC           hResource;
+    LPDATAOBJECT    lpSrcDataObj;
     LPOLEUIPASTEENTRYW arrPasteEntries;
-    INT             cPasteEntries;  
-    UINT*           arrLinkTypes;   
-    INT             cLinkTypes;     
-    UINT            cClsidExclude;  
-    LPCLSID         lpClsidExclude; 
-    INT             nSelectedIndex; 
-    BOOL            fLink;          
-    HGLOBAL         hMetaPict;      
-    SIZEL           sizel;          
+    INT             cPasteEntries;
+    UINT*           arrLinkTypes;
+    INT             cLinkTypes;
+    UINT            cClsidExclude;
+    LPCLSID         lpClsidExclude;
+    INT             nSelectedIndex;
+    BOOL            fLink;
+    HGLOBAL         hMetaPict;
+    SIZEL           sizel;
 } OLEUIPASTESPECIALW, *POLEUIPASTESPECIALW, *LPOLEUIPASTESPECIALW;
 
 DECL_WINELIB_TYPE_AW(OLEUIPASTESPECIAL)
@@ -391,30 +391,30 @@
 
 typedef struct tagOLEUIEDITLINKSW
 {
-    DWORD           cbStruct;       
-    DWORD           dwFlags;        
-    HWND            hWndOwner;      
-    LPCWSTR         lpszCaption;    
-    LPFNOLEUIHOOK   lpfnHook;       
-    LPARAM          lCustData;      
-    HINSTANCE       hInstance;      
-    LPCWSTR         lpszTemplate;   
-    HRSRC           hResource;      
-    LPOLEUILINKCONTAINERW lpOleUILinkContainer;  
+    DWORD           cbStruct;
+    DWORD           dwFlags;
+    HWND            hWndOwner;
+    LPCWSTR         lpszCaption;
+    LPFNOLEUIHOOK   lpfnHook;
+    LPARAM          lCustData;
+    HINSTANCE       hInstance;
+    LPCWSTR         lpszTemplate;
+    HRSRC           hResource;
+    LPOLEUILINKCONTAINERW lpOleUILinkContainer;
 } OLEUIEDITLINKSW, *POLEUIEDITLINKSW, *LPOLEUIEDITLINKSW;
 
 typedef struct tagOLEUIEDITLINKSA
 {
-    DWORD           cbStruct;       
-    DWORD           dwFlags;        
-    HWND            hWndOwner;      
-    LPCSTR          lpszCaption;    
-    LPFNOLEUIHOOK   lpfnHook;       
-    LPARAM          lCustData;      
-    HINSTANCE       hInstance;      
-    LPCSTR          lpszTemplate;   
-    HRSRC           hResource;      
-    LPOLEUILINKCONTAINERA lpOleUILinkContainer;  
+    DWORD           cbStruct;
+    DWORD           dwFlags;
+    HWND            hWndOwner;
+    LPCSTR          lpszCaption;
+    LPFNOLEUIHOOK   lpfnHook;
+    LPARAM          lCustData;
+    HINSTANCE       hInstance;
+    LPCSTR          lpszTemplate;
+    HRSRC           hResource;
+    LPOLEUILINKCONTAINERA lpOleUILinkContainer;
 } OLEUIEDITLINKSA, *POLEUIEDITLINKSA, *LPOLEUIEDITLINKSA;
 
 DECL_WINELIB_TYPE_AW(OLEUIEDITLINKS)
@@ -427,32 +427,32 @@
  */
 typedef struct tagOLEUIBUSYA
 {
-    DWORD           cbStruct;       
-    DWORD           dwFlags;        
-    HWND            hWndOwner;      
-    LPCSTR          lpszCaption;    
-    LPFNOLEUIHOOK   lpfnHook;       
-    LPARAM          lCustData;      
-    HINSTANCE       hInstance;      
-    LPCSTR          lpszTemplate;   
-    HRSRC           hResource;      
-    HTASK           hTask;          
-    HWND*           lphWndDialog;   
+    DWORD           cbStruct;
+    DWORD           dwFlags;
+    HWND            hWndOwner;
+    LPCSTR          lpszCaption;
+    LPFNOLEUIHOOK   lpfnHook;
+    LPARAM          lCustData;
+    HINSTANCE       hInstance;
+    LPCSTR          lpszTemplate;
+    HRSRC           hResource;
+    HTASK           hTask;
+    HWND*           lphWndDialog;
 } OLEUIBUSYA, *POLEUIBUSYA, *LPOLEUIBUSYA;
 
 typedef struct tagOLEUIBUSYW
 {
-    DWORD           cbStruct;       
-    DWORD           dwFlags;        
-    HWND            hWndOwner;      
-    LPCWSTR         lpszCaption;    
-    LPFNOLEUIHOOK   lpfnHook;       
-    LPARAM          lCustData;      
-    HINSTANCE       hInstance;      
-    LPCWSTR         lpszTemplate;   
-    HRSRC           hResource;      
-    HTASK           hTask;          
-    HWND*           lphWndDialog;   
+    DWORD           cbStruct;
+    DWORD           dwFlags;
+    HWND            hWndOwner;
+    LPCWSTR         lpszCaption;
+    LPFNOLEUIHOOK   lpfnHook;
+    LPARAM          lCustData;
+    HINSTANCE       hInstance;
+    LPCWSTR         lpszTemplate;
+    HRSRC           hResource;
+    HTASK           hTask;
+    HWND*           lphWndDialog;
 } OLEUIBUSYW, *POLEUIBUSYW, *LPOLEUIBUSYW;
 
 DECL_WINELIB_TYPE_AW(OLEUIBUSY)
@@ -465,25 +465,25 @@
 
 typedef struct tagOLEUIGNRLPROPSA
 {
-    DWORD           cbStruct;       
-    DWORD           dwFlags;        
+    DWORD           cbStruct;
+    DWORD           dwFlags;
     DWORD           dwReserved1[2];
-    LPFNOLEUIHOOK   lpfnHook;       
-    LPARAM          lCustData;      
+    LPFNOLEUIHOOK   lpfnHook;
+    LPARAM          lCustData;
     DWORD           dwReserved2[3];
-    struct tagOLEUIOBJECTPROPSA* lpOP;   
+    struct tagOLEUIOBJECTPROPSA* lpOP;
 
 } OLEUIGNRLPROPSA, *POLEUIGNRLPROPSA, *LPOLEUIGNRLPROPSA;
 
 typedef struct tagOLEUIGNRLPROPSW
 {
-    DWORD           cbStruct;       
-    DWORD           dwFlags;        
+    DWORD           cbStruct;
+    DWORD           dwFlags;
     DWORD           dwReserved1[2];
-    LPFNOLEUIHOOK   lpfnHook;       
-    LPARAM          lCustData;      
+    LPFNOLEUIHOOK   lpfnHook;
+    LPARAM          lCustData;
     DWORD           dwReserved2[3];
-    struct tagOLEUIOBJECTPROPSW* lpOP;   
+    struct tagOLEUIOBJECTPROPSW* lpOP;
 } OLEUIGNRLPROPSW, *POLEUIGNRLPROPSW, *LPOLEUIGNRLPROPSW;
 
 DECL_WINELIB_TYPE_AW(OLEUIGNRLPROPS)
@@ -492,27 +492,27 @@
 
 typedef struct tagOLEUIVIEWPROPSA
 {
-    DWORD           cbStruct;       
-    DWORD           dwFlags;        
+    DWORD           cbStruct;
+    DWORD           dwFlags;
     DWORD           dwReserved1[2];
-    LPFNOLEUIHOOK   lpfnHook;       
-    LPARAM          lCustData;      
+    LPFNOLEUIHOOK   lpfnHook;
+    LPARAM          lCustData;
     DWORD           dwReserved2[3];
-    struct tagOLEUIOBJECTPROPSA* lpOP; 
-    INT             nScaleMin;      
+    struct tagOLEUIOBJECTPROPSA* lpOP;
+    INT             nScaleMin;
     INT             nScaleMax;
 } OLEUIVIEWPROPSA, *POLEUIVIEWPROPSA, *LPOLEUIVIEWPROPSA;
 
 typedef struct tagOLEUIVIEWPROPSW
 {
-    DWORD           cbStruct;       
-    DWORD           dwFlags;        
+    DWORD           cbStruct;
+    DWORD           dwFlags;
     DWORD           dwReserved1[2];
-    LPFNOLEUIHOOK   lpfnHook;       
-    LPARAM          lCustData;      
+    LPFNOLEUIHOOK   lpfnHook;
+    LPARAM          lCustData;
     DWORD           dwReserved2[3];
-    struct tagOLEUIOBJECTPROPSW* lpOP; 
-    INT             nScaleMin;      
+    struct tagOLEUIOBJECTPROPSW* lpOP;
+    INT             nScaleMin;
     INT             nScaleMax;
 } OLEUIVIEWPROPSW, *POLEUIVIEWPROPSW, *LPOLEUIVIEWPROPSW;
 
@@ -521,30 +521,30 @@
 DECL_WINELIB_TYPE_AW(LPOLEUIVIEWPROPS)
 
 
-#define VPF_SELECTRELATIVE          0x00000001L 
-#define VPF_DISABLERELATIVE         0x00000002L 
-#define VPF_DISABLESCALE            0x00000004L 
+#define VPF_SELECTRELATIVE          0x00000001L
+#define VPF_DISABLERELATIVE         0x00000002L
+#define VPF_DISABLESCALE            0x00000004L
 
 typedef struct tagOLEUILINKPROPSA
 {
-    DWORD           cbStruct;       
-    DWORD           dwFlags;        
+    DWORD           cbStruct;
+    DWORD           dwFlags;
     DWORD           dwReserved1[2];
-    LPFNOLEUIHOOK   lpfnHook;       
-    LPARAM          lCustData;      
+    LPFNOLEUIHOOK   lpfnHook;
+    LPARAM          lCustData;
     DWORD           dwReserved2[3];
-    struct tagOLEUIOBJECTPROPSA* lpOP; 
+    struct tagOLEUIOBJECTPROPSA* lpOP;
 } OLEUILINKPROPSA, *POLEUILINKPROPSA, *LPOLEUILINKPROPSA;
 
 typedef struct tagOLEUILINKPROPSW
 {
-    DWORD           cbStruct;       
-    DWORD           dwFlags;        
+    DWORD           cbStruct;
+    DWORD           dwFlags;
     DWORD           dwReserved1[2];
-    LPFNOLEUIHOOK   lpfnHook;       
-    LPARAM          lCustData;      
+    LPFNOLEUIHOOK   lpfnHook;
+    LPARAM          lCustData;
     DWORD           dwReserved2[3];
-    struct tagOLEUIOBJECTPROPSW* lpOP; 
+    struct tagOLEUIOBJECTPROPSW* lpOP;
 } OLEUILINKPROPSW, *POLEUILINKPROPSW, *LPOLEUILINKPROPSW;
 
 DECL_WINELIB_TYPE_AW(OLEUILINKPROPS)
@@ -553,30 +553,30 @@
 
 typedef struct tagOLEUIOBJECTPROPSA
 {
-    DWORD                cbStruct;       
-    DWORD                dwFlags;        
-    LPPROPSHEETHEADERA   lpPS;         
-    DWORD                dwObject;       
-    LPOLEUIOBJINFOA      lpObjInfo;      
-    DWORD                dwLink;         
-    LPOLEUILINKINFOA     lpLinkInfo;     
-    LPOLEUIGNRLPROPSA    lpGP;          
-    LPOLEUIVIEWPROPSA    lpVP;          
-    LPOLEUILINKPROPSA    lpLP;          
+    DWORD                cbStruct;
+    DWORD                dwFlags;
+    LPPROPSHEETHEADERA   lpPS;
+    DWORD                dwObject;
+    LPOLEUIOBJINFOA      lpObjInfo;
+    DWORD                dwLink;
+    LPOLEUILINKINFOA     lpLinkInfo;
+    LPOLEUIGNRLPROPSA    lpGP;
+    LPOLEUIVIEWPROPSA    lpVP;
+    LPOLEUILINKPROPSA    lpLP;
 } OLEUIOBJECTPROPSA, *POLEUIOBJECTPROPSA, *LPOLEUIOBJECTPROPSA;
 
 typedef struct tagOLEUIOBJECTPROPSW
 {
-    DWORD                cbStruct;       
-    DWORD                dwFlags;        
-    LPPROPSHEETHEADERW   lpPS;         
-    DWORD                dwObject;       
-    LPOLEUIOBJINFOW      lpObjInfo;      
-    DWORD                dwLink;         
-    LPOLEUILINKINFOW     lpLinkInfo;     
-    LPOLEUIGNRLPROPSW    lpGP;          
-    LPOLEUIVIEWPROPSW    lpVP;          
-    LPOLEUILINKPROPSW    lpLP;          
+    DWORD                cbStruct;
+    DWORD                dwFlags;
+    LPPROPSHEETHEADERW   lpPS;
+    DWORD                dwObject;
+    LPOLEUIOBJINFOW      lpObjInfo;
+    DWORD                dwLink;
+    LPOLEUILINKINFOW     lpLinkInfo;
+    LPOLEUIGNRLPROPSW    lpGP;
+    LPOLEUIVIEWPROPSW    lpVP;
+    LPOLEUILINKPROPSW    lpLP;
 } OLEUIOBJECTPROPSW, *POLEUIOBJECTPROPSW, *LPOLEUIOBJECTPROPSW;
 
 DECL_WINELIB_TYPE_AW(OLEUIOBJECTPROPS)
@@ -590,45 +590,45 @@
 
 typedef struct tagOLEUICHANGESOURCEW
 {
-    DWORD           cbStruct;       
-    DWORD           dwFlags;        
-    HWND            hWndOwner;      
-    LPCWSTR         lpszCaption;    
-    LPFNOLEUIHOOK   lpfnHook;       
-    LPARAM          lCustData;      
-    HINSTANCE       hInstance;      
-    LPCWSTR         lpszTemplate;   
-    HRSRC           hResource;      
-    OPENFILENAMEW*lpOFN;          
-    DWORD           dwReserved1[4]; 
-    LPOLEUILINKCONTAINERW lpOleUILinkContainer;  
-    DWORD           dwLink;         
+    DWORD           cbStruct;
+    DWORD           dwFlags;
+    HWND            hWndOwner;
+    LPCWSTR         lpszCaption;
+    LPFNOLEUIHOOK   lpfnHook;
+    LPARAM          lCustData;
+    HINSTANCE       hInstance;
+    LPCWSTR         lpszTemplate;
+    HRSRC           hResource;
+    OPENFILENAMEW*lpOFN;
+    DWORD           dwReserved1[4];
+    LPOLEUILINKCONTAINERW lpOleUILinkContainer;
+    DWORD           dwLink;
     LPWSTR          lpszDisplayName;
-    ULONG           nFileLength;    
-    LPWSTR          lpszFrom;       
-    LPWSTR          lpszTo;         
+    ULONG           nFileLength;
+    LPWSTR          lpszFrom;
+    LPWSTR          lpszTo;
 } OLEUICHANGESOURCEW, *POLEUICHANGESOURCEW, *LPOLEUICHANGESOURCEW;
 
 
 typedef struct tagOLEUICHANGESOURCEA
 {
-    DWORD           cbStruct;       
-    DWORD           dwFlags;        
-    HWND            hWndOwner;      
-    LPCSTR          lpszCaption;    
-    LPFNOLEUIHOOK   lpfnHook;       
-    LPARAM          lCustData;      
-    HINSTANCE       hInstance;      
-    LPCSTR          lpszTemplate;   
-    HRSRC           hResource;      
-    OPENFILENAMEA*  lpOFN;          
-    DWORD           dwReserved1[4]; 
-    LPOLEUILINKCONTAINERA lpOleUILinkContainer;  
-    DWORD           dwLink;         
+    DWORD           cbStruct;
+    DWORD           dwFlags;
+    HWND            hWndOwner;
+    LPCSTR          lpszCaption;
+    LPFNOLEUIHOOK   lpfnHook;
+    LPARAM          lCustData;
+    HINSTANCE       hInstance;
+    LPCSTR          lpszTemplate;
+    HRSRC           hResource;
+    OPENFILENAMEA*  lpOFN;
+    DWORD           dwReserved1[4];
+    LPOLEUILINKCONTAINERA lpOleUILinkContainer;
+    DWORD           dwLink;
     LPSTR           lpszDisplayName;
-    ULONG           nFileLength;    
-    LPSTR           lpszFrom;       
-    LPSTR           lpszTo;         
+    ULONG           nFileLength;
+    LPSTR           lpszFrom;
+    LPSTR           lpszTo;
 } OLEUICHANGESOURCEA, *POLEUICHANGESOURCEA, *LPOLEUICHANGESOURCEA;
 
 
@@ -678,7 +678,7 @@
     ICOM_METHOD1(HRESULT,CancelLink,							DWORD,dwLink)
 #define IOleUILinkContainerW_IMETHODS \
     IUnknown_IMETHODS \
-    IOleUILinkContainerW_METHODS 
+    IOleUILinkContainerW_METHODS
 ICOM_DEFINE(IOleUILinkContainerW, IUnknown)
 #undef ICOM_INTERFACE
 
@@ -698,8 +698,8 @@
 #define IOleUILinkContainer_SetLinkSource(p,a,b,c,d,e)     ICOM_CALL5(SetLinkSource,p,a,b,c,d,e)
 #define IOleUILinkContainer_GetLinkSource(p,a,b,c,d,e,f,g) ICOM_CALL7(GetLinkSource,p,a,b,c,d,e,f,g)
 #define IOleUILinkContainer_OpenLinkSource(p,a)            ICOM_CALL1(OpenLinkSource,p,a)
-#define IOleUILinkContainer_UpdateLink(p,a,b,c)            ICOM_CALL3(UpdateLink,p,a,b,c)        
-#define IOleUILinkContainer_CancelLink(p,a)                ICOM_CALL1(CancelLink,p,a)           
+#define IOleUILinkContainer_UpdateLink(p,a,b,c)            ICOM_CALL3(UpdateLink,p,a,b,c)
+#define IOleUILinkContainer_CancelLink(p,a)                ICOM_CALL1(CancelLink,p,a)
 #endif
 
 
@@ -711,7 +711,7 @@
     ICOM_METHOD2(HRESULT,GetLastUpdate,           DWORD,dwLink,  FILETIME*,lpLastUpdate)
 #define IOleUILinkInfoA_IMETHODS \
     IOleUILinkContainerA_IMETHODS \
-    IOleUILinkInfoA_METHODS 
+    IOleUILinkInfoA_METHODS
 ICOM_DEFINE(IOleUILinkInfoA, IOleUILinkContainerA)
 #undef ICOM_INTERFACE
 
@@ -720,7 +720,7 @@
     ICOM_METHOD2(HRESULT,GetLastUpdate,           DWORD,dwLink,  FILETIME*,lpLastUpdate)
 #define IOleUILinkInfoW_IMETHODS \
     IOleUILinkContainerW_IMETHODS \
-    IOleUILinkInfoW_METHODS 
+    IOleUILinkInfoW_METHODS
 ICOM_DEFINE(IOleUILinkInfoW, IOleUILinkContainerW)
 #undef  ICOM_INTERFACE
 
@@ -741,8 +741,8 @@
 #define IOleUILinkInfo_OpenLinkSource(p,a)            ICOM_CALL1(OpenLinkSource,p,a)
 #define IOleUILinkInfo_UpdateLink(p,a,b,c)            ICOM_CALL3(UpdateLink,p,a,b,c)
 #define IOleUILinkInfo_CancelLink(p,a)                ICOM_CALL1(CancelLink,p,a)
-/*** IOleUILinkInfo methods ***/                                                                 
-#define IOleUILinkInfo_GetLastUpdate(p,a,b)           ICOM_CALL2(GetLastUpdate,p,a,b)                        
+/*** IOleUILinkInfo methods ***/
+#define IOleUILinkInfo_GetLastUpdate(p,a,b)           ICOM_CALL2(GetLastUpdate,p,a,b)
 
 
 /*****************************************************************************
@@ -762,7 +762,7 @@
                 INT,nCurrentScale,  BOOL,bRelativeToOrig)
 #define IOleUIObjInfoA_IMETHODS \
     IUnknown_IMETHODS \
-    IOleUIObjInfoA_METHODS 
+    IOleUIObjInfoA_METHODS
 ICOM_DEFINE(IOleUIObjInfoA, IUnknown)
 #undef ICOM_INTERFACE
 
@@ -780,7 +780,7 @@
                 INT,nCurrentScale,  BOOL,bRelativeToOrig)
 #define IOleUIObjInfoW_IMETHODS \
     IUnknown_IMETHODS \
-    IOleUIObjInfoW_METHODS 
+    IOleUIObjInfoW_METHODS
 ICOM_DEFINE(IOleUIObjInfoW, IUnknown)
 #undef ICOM_INTERFACE
 
@@ -830,7 +830,7 @@
 #define      OleUIAddVerbMenu WINELIB_NAME_AW(OleUIAddVerbMenu)
 UINT WINAPI  OleUIPasteSpecialA(LPOLEUIPASTESPECIALA lpOleUIPasteSpecial);
 UINT WINAPI  OleUIPasteSpecialW(LPOLEUIPASTESPECIALW lpOleUIPasteSpecial);
-#define      OleUIPasteSpecial WINELIB_NAME_AW(OleUIPasteSpecial) 
+#define      OleUIPasteSpecial WINELIB_NAME_AW(OleUIPasteSpecial)
 
 
 #ifdef __cplusplus
diff --git a/include/path.h b/include/path.h
index 944121e..4eba03d 100644
--- a/include/path.h
+++ b/include/path.h
@@ -75,8 +75,8 @@
 			      DWORD polylines);
 extern BOOL PATH_PolyPolygon(struct tagDC *dc, const POINT *pt, const INT *counts,
 			     UINT polygons);
-extern BOOL PATH_RoundRect(struct tagDC *dc, INT x1, INT y1, INT x2, INT y2, INT ell_width, 
-				INT ell_height); 
+extern BOOL PATH_RoundRect(struct tagDC *dc, INT x1, INT y1, INT x2, INT y2, INT ell_width,
+				INT ell_height);
 extern BOOL PATH_AddEntry(GdiPath *pPath, const POINT *pPoint, BYTE flags);
 #endif /* __WINE_PATH_H */
 
diff --git a/include/prsht.h b/include/prsht.h
index 0f52bd6..0e3f9a0 100644
--- a/include/prsht.h
+++ b/include/prsht.h
@@ -58,7 +58,7 @@
     DWORD              dwSize;
     DWORD              dwFlags;
     HINSTANCE        hInstance;
-    union 
+    union
     {
         LPCSTR           pszTemplate;
         LPCDLGTEMPLATEA  pResource;
@@ -84,7 +84,7 @@
     DWORD               dwSize;
     DWORD               dwFlags;
     HINSTANCE         hInstance;
-    union 
+    union
     {
         LPCWSTR          pszTemplate;
         LPCDLGTEMPLATEW  pResource;
@@ -200,13 +200,13 @@
  * Property sheet support (UNICODE-Winelib)
  */
 
-DECL_WINELIB_TYPE_AW(PROPSHEETPAGE) 
-DECL_WINELIB_TYPE_AW(LPPROPSHEETPAGE) 
-DECL_WINELIB_TYPE_AW(LPCPROPSHEETPAGE) 
-DECL_WINELIB_TYPE_AW(PROPSHEETHEADER) 
-DECL_WINELIB_TYPE_AW(LPPROPSHEETHEADER) 
-DECL_WINELIB_TYPE_AW(LPCPROPSHEETHEADER) 
-DECL_WINELIB_TYPE_AW(LPFNPSPCALLBACK) 
+DECL_WINELIB_TYPE_AW(PROPSHEETPAGE)
+DECL_WINELIB_TYPE_AW(LPPROPSHEETPAGE)
+DECL_WINELIB_TYPE_AW(LPCPROPSHEETPAGE)
+DECL_WINELIB_TYPE_AW(PROPSHEETHEADER)
+DECL_WINELIB_TYPE_AW(LPPROPSHEETHEADER)
+DECL_WINELIB_TYPE_AW(LPCPROPSHEETHEADER)
+DECL_WINELIB_TYPE_AW(LPFNPSPCALLBACK)
 
 
 /*
@@ -247,7 +247,7 @@
 #define PSH_WIZARDCONTEXTHELP   0x00001000
 
      /*
-      * for below IE 5 
+      * for below IE 5
       * PSH_WIZARD97            0x00002000
       */
 #define PSH_WATERMARK           0x00008000
@@ -272,7 +272,7 @@
    NMHDR hdr;
    LPARAM lParam;
 } PSHNOTIFY, *LPPSHNOTIFY;
- 
+
 #define PSN_FIRST               (0U-200U)
 #define PSN_LAST                (0U-299U)
 
@@ -293,7 +293,7 @@
 #define PSNRET_NOERROR              0
 #define PSNRET_INVALID              1
 #define PSNRET_INVALID_NOCHANGEPAGE 2
- 
+
 
 #define PSM_SETCURSEL           (WM_USER + 101)
 #define PSM_REMOVEPAGE          (WM_USER + 102)
@@ -359,58 +359,58 @@
 
 #define PropSheet_SetCurSel(hDlg, hpage, index) \
 	SendMessageA(hDlg, PSM_SETCURSEL, (WPARAM)index, (LPARAM)hpage)
-	 
+
 #define PropSheet_RemovePage(hDlg, index, hpage) \
 	SNDMSG(hDlg, PSM_REMOVEPAGE, index, (LPARAM)hpage)
-	 
+
 #define PropSheet_AddPage(hDlg, hpage) \
 	SNDMSG(hDlg, PSM_ADDPAGE, 0, (LPARAM)hpage)
-	 
+
 #define PropSheet_Changed(hDlg, hwnd) \
 	SNDMSG(hDlg, PSM_CHANGED, (WPARAM)hwnd, 0L)
-	 
+
 #define PropSheet_RestartWindows(hDlg) \
 	SNDMSG(hDlg, PSM_RESTARTWINDOWS, 0, 0L)
-	 
+
 #define PropSheet_RebootSystem(hDlg) \
 	SNDMSG(hDlg, PSM_REBOOTSYSTEM, 0, 0L)
-	 
+
 #define PropSheet_CancelToClose(hDlg) \
 	PostMessage(hDlg, PSM_CANCELTOCLOSE, 0, 0L)
-	 
+
 #define PropSheet_QuerySiblings(hDlg, wParam, lParam) \
 	SNDMSG(hDlg, PSM_QUERYSIBLINGS, wParam, lParam)
-	 
+
 #define PropSheet_UnChanged(hDlg, hwnd) \
 	SNDMSG(hDlg, PSM_UNCHANGED, (WPARAM)hwnd, 0L)
-	 
+
 #define PropSheet_Apply(hDlg) \
 	SNDMSG(hDlg, PSM_APPLY, 0, 0L)
-	  
+
 #define PropSheet_SetTitle(hDlg, wStyle, lpszText)\
 	SNDMSG(hDlg, PSM_SETTITLE, wStyle, (LPARAM)(LPCTSTR)lpszText)
-	 
+
 #define PropSheet_SetWizButtons(hDlg, dwFlags) \
 	PostMessage(hDlg, PSM_SETWIZBUTTONS, 0, (LPARAM)dwFlags)
-	 
+
 #define PropSheet_PressButton(hDlg, iButton) \
 	PostMessage(hDlg, PSM_PRESSBUTTON, (WPARAM)iButton, 0)
-	 
+
 #define PropSheet_SetCurSelByID(hDlg, id) \
 	SNDMSG(hDlg, PSM_SETCURSELID, 0, (LPARAM)id)
 
 #define PropSheet_SetFinishText(hDlg, lpszText) \
 	SNDMSG(hDlg, PSM_SETFINISHTEXT, 0, (LPARAM)lpszText)
-	 
+
 #define PropSheet_GetTabControl(hDlg) \
 	(HWND)SNDMSG(hDlg, PSM_GETTABCONTROL, 0, 0)
-	 
+
 #define PropSheet_IsDialogMessage(hDlg, pMsg) \
 	(BOOL)SNDMSG(hDlg, PSM_ISDIALOGMESSAGE, 0, (LPARAM)pMsg)
-	 
+
 #define PropSheet_GetCurrentPageHwnd(hDlg) \
 	(HWND)SNDMSG(hDlg, PSM_GETCURRENTPAGEHWND, 0, 0L)
-	 
+
 
 #ifdef __cplusplus
 }
diff --git a/include/psapi.h b/include/psapi.h
index 79f57d5..738e625 100644
--- a/include/psapi.h
+++ b/include/psapi.h
@@ -29,16 +29,16 @@
   LPVOID EntryPoint;
 } MODULEINFO, *LPMODULEINFO;
 
-typedef struct _PROCESS_MEMORY_COUNTERS {  
-  DWORD cb;    
+typedef struct _PROCESS_MEMORY_COUNTERS {
+  DWORD cb;
   DWORD PageFaultCount;
   DWORD PeakWorkingSetSize;
   DWORD WorkingSetSize;
   DWORD QuotaPeakPagedPoolUsage;
   DWORD QuotaPagedPoolUsage;
-  DWORD QuotaPeakNonPagedPoolUsage;  
+  DWORD QuotaPeakNonPagedPoolUsage;
   DWORD QuotaNonPagedPoolUsage;
-  DWORD PagefileUsage;    
+  DWORD PagefileUsage;
   DWORD PeakPagefileUsage;
 } PROCESS_MEMORY_COUNTERS;
 typedef PROCESS_MEMORY_COUNTERS *PPROCESS_MEMORY_COUNTERS;
diff --git a/include/queue.h b/include/queue.h
index 996e1d6..b53c7b7 100644
--- a/include/queue.h
+++ b/include/queue.h
@@ -35,7 +35,7 @@
  * It might be necessary to store a pointer to the system message queue
  * as well since windows 9x maintains per thread system message queues
  */
-typedef struct tagPERQUEUEDATA      
+typedef struct tagPERQUEUEDATA
 {
   HWND    hWndFocus;              /* Focus window */
   HWND    hWndActive;             /* Active window */
@@ -66,7 +66,7 @@
   HANDLE16  hooks[WH_NB_HOOKS];     /* Task hooks list */
 
   PERQUEUEDATA *pQData;             /* pointer to (shared) PERQUEUEDATA structure */
-  
+
 } MESSAGEQUEUE;
 
 
diff --git a/include/ras.h b/include/ras.h
index 77b864b..ea4ae72 100644
--- a/include/ras.h
+++ b/include/ras.h
@@ -102,11 +102,11 @@
 DWORD WINAPI RasEnumConnectionsA(LPRASCONNA,LPDWORD,LPDWORD);
 DWORD WINAPI RasEnumConnectionsW(LPRASCONNW,LPDWORD,LPDWORD);
 #define      RasEnumConnections WINELIB_NAME_AW(RasEnumConnections)
-DWORD WINAPI RasEnumEntriesA(LPCSTR,LPCSTR,LPRASENTRYNAMEA,LPDWORD,LPDWORD); 
-DWORD WINAPI RasEnumEntriesW(LPCWSTR,LPCWSTR,LPRASENTRYNAMEW,LPDWORD,LPDWORD); 
+DWORD WINAPI RasEnumEntriesA(LPCSTR,LPCSTR,LPRASENTRYNAMEA,LPDWORD,LPDWORD);
+DWORD WINAPI RasEnumEntriesW(LPCWSTR,LPCWSTR,LPRASENTRYNAMEW,LPDWORD,LPDWORD);
 #define      RasEnumEntries WINELIB_NAME_AW(RasEnumEntries)
-DWORD WINAPI RasGetEntryDialParamsA(LPCSTR,LPRASDIALPARAMSA,LPBOOL); 
-DWORD WINAPI RasGetEntryDialParamsW(LPCWSTR,LPRASDIALPARAMSW,LPBOOL); 
+DWORD WINAPI RasGetEntryDialParamsA(LPCSTR,LPRASDIALPARAMSA,LPBOOL);
+DWORD WINAPI RasGetEntryDialParamsW(LPCWSTR,LPRASDIALPARAMSW,LPBOOL);
 #define      RasGetEntryDialParams WINELIB_NAME_AW(RasGetEntryDialParams)
 DWORD WINAPI RasHangUpA(HRASCONN);
 DWORD WINAPI RasHangUpW(HRASCONN);
diff --git a/include/richedit.h b/include/richedit.h
index 16214f0..5f305de 100644
--- a/include/richedit.h
+++ b/include/richedit.h
@@ -131,12 +131,12 @@
 #define EM_GETSCROLLPOS         (WM_USER + 221)
 #define EM_SETSCROLLPOS         (WM_USER + 222)
 
-#define EM_SETFONTSIZE          (WM_USER + 223)  
+#define EM_SETFONTSIZE          (WM_USER + 223)
 #define EM_GETZOOM		(WM_USER + 224)
 #define EM_SETZOOM		(WM_USER + 225)
 
 /* New notifications */
-#define EN_MSGFILTER                    0x0700   
+#define EN_MSGFILTER                    0x0700
 #define EN_REQUESTRESIZE                0x0701
 #define EN_SELCHANGE                    0x0702
 #define EN_DROPFILES                    0x0703
diff --git a/include/rpcdce.h b/include/rpcdce.h
index 02912b9..f6d6b64 100644
--- a/include/rpcdce.h
+++ b/include/rpcdce.h
@@ -83,7 +83,7 @@
 typedef RPC_STATUS RPC_ENTRY RPC_IF_CALLBACK_FN( RPC_IF_HANDLE InterfaceUuid, LPVOID Context );
 typedef void (__RPC_USER *RPC_AUTH_KEY_RETRIEVAL_FN)();
 
-typedef struct _RPC_POLICY 
+typedef struct _RPC_POLICY
 {
   UINT  Length;
   ULONG EndpointFlags;
@@ -120,11 +120,11 @@
 
 RPCRTAPI RPC_STATUS RPC_ENTRY
   RpcServerRegisterIf( RPC_IF_HANDLE IfSpec, UUID* MgrTypeUuid, RPC_MGR_EPV* MgrEpv );
-  
+
 RPCRTAPI RPC_STATUS RPC_ENTRY
   RpcServerRegisterIfEx( RPC_IF_HANDLE IfSpec, UUID* MgrTypeUuid, RPC_MGR_EPV* MgrEpv,
                          UINT Flags, UINT MaxCalls, RPC_IF_CALLBACK_FN* IfCallbackFn );
-			 
+
 RPCRTAPI RPC_STATUS RPC_ENTRY
   RpcServerRegisterIf2( RPC_IF_HANDLE IfSpec, UUID* MgrTypeUuid, RPC_MGR_EPV* MgrEpv,
                         UINT Flags, UINT MaxCalls, UINT MaxRpcSize, RPC_IF_CALLBACK_FN* IfCallbackFn );
diff --git a/include/shellapi.h b/include/shellapi.h
index e9a8470..223c138 100644
--- a/include/shellapi.h
+++ b/include/shellapi.h
@@ -33,7 +33,7 @@
  * DragObject
  */
 
-typedef struct _DRAGINFOA 
+typedef struct _DRAGINFOA
 {	UINT uSize;
 	POINT pt;
 	BOOL fNC;
@@ -41,7 +41,7 @@
 	DWORD grfKeyState;
 } DRAGINFOA, * LPDRAGINFOA;
 
-typedef struct _DRAGINFOW 
+typedef struct _DRAGINFOW
 {	UINT uSize;
 	POINT pt;
 	BOOL fNC;
@@ -96,7 +96,7 @@
 #define ABE_RIGHT		2
 #define ABE_BOTTOM		3
 
-typedef struct _AppBarData 
+typedef struct _AppBarData
 {	DWORD	cbSize;
 	HWND	hWnd;
 	UINT	uCallbackMessage;
@@ -131,7 +131,7 @@
 #define SHGFI_SELECTED          0x000010000     /* show icon in selected state */
 #define SHGFI_ATTR_SPECIFIED    0x000020000     /* get only specified attributes */
 
-typedef struct tagSHFILEINFOA 
+typedef struct tagSHFILEINFOA
 {	HICON	hIcon;			/* icon */
 	int	iIcon;			/* icon index */
 	DWORD	dwAttributes;		/* SFGAO_ flags */
@@ -139,7 +139,7 @@
 	CHAR	szTypeName[80];		/* type name */
 } SHFILEINFOA;
 
-typedef struct tagSHFILEINFOW 
+typedef struct tagSHFILEINFOW
 {	HICON	hIcon;			/* icon */
 	int	iIcon;			/* icon index */
 	DWORD	dwAttributes;		/* SFGAO_ flags */
@@ -167,21 +167,21 @@
 
 #define FOF_MULTIDESTFILES         0x0001
 #define FOF_CONFIRMMOUSE           0x0002
-#define FOF_SILENT                 0x0004  
+#define FOF_SILENT                 0x0004
 #define FOF_RENAMEONCOLLISION      0x0008
-#define FOF_NOCONFIRMATION         0x0010  
-#define FOF_WANTMAPPINGHANDLE      0x0020  
+#define FOF_NOCONFIRMATION         0x0010
+#define FOF_WANTMAPPINGHANDLE      0x0020
 #define FOF_ALLOWUNDO              0x0040
-#define FOF_FILESONLY              0x0080  
-#define FOF_SIMPLEPROGRESS         0x0100  
-#define FOF_NOCONFIRMMKDIR         0x0200  
-#define FOF_NOERRORUI              0x0400  
+#define FOF_FILESONLY              0x0080
+#define FOF_SIMPLEPROGRESS         0x0100
+#define FOF_NOCONFIRMMKDIR         0x0200
+#define FOF_NOERRORUI              0x0400
 
 typedef WORD FILEOP_FLAGS;
 
-#define PO_DELETE       0x0013  
-#define PO_RENAME       0x0014  
-#define PO_PORTCHANGE   0x0020  
+#define PO_DELETE       0x0013
+#define PO_RENAME       0x0014
+#define PO_PORTCHANGE   0x0020
 
 typedef WORD PRINTEROP_FLAGS;
 
@@ -210,7 +210,7 @@
 #define  SHFILEOPSTRUCT WINELIB_NAME_AW(SHFILEOPSTRUCT)
 #define  LPSHFILEOPSTRUCT WINELIB_NAME_AW(LPSHFILEOPSTRUCT)
 
-DWORD	WINAPI SHFileOperationA (LPSHFILEOPSTRUCTA lpFileOp);  
+DWORD	WINAPI SHFileOperationA (LPSHFILEOPSTRUCTA lpFileOp);
 DWORD	WINAPI SHFileOperationW (LPSHFILEOPSTRUCTW lpFileOp);
 #define  SHFileOperation WINELIB_NAME_AW(SHFileOperation)
 
diff --git a/include/shlobj.h b/include/shlobj.h
index 6c1891d..74b9d50 100644
--- a/include/shlobj.h
+++ b/include/shlobj.h
@@ -30,7 +30,7 @@
 #endif /* defined(__cplusplus) */
 
 /****************************************************************************
-* SHITEMID, ITEMIDLIST, PIDL API 
+* SHITEMID, ITEMIDLIST, PIDL API
 */
 #include "pshpack1.h"
 typedef struct
@@ -194,7 +194,7 @@
         LPCSTR   lpClass;
         HKEY hkeyClass;
         DWORD dwHotKey;
-        union 
+        union
         { HANDLE hIcon;
           HANDLE hMonitor;
         } DUMMYUNIONNAME;
@@ -261,7 +261,7 @@
     BFFCALLBACK   lpfn;
     LPARAM        lParam;
     INT         iImage;
-} BROWSEINFOW, *PBROWSEINFOW, *LPBROWSEINFOW; 
+} BROWSEINFOW, *PBROWSEINFOW, *LPBROWSEINFOW;
 
 #define BROWSEINFO   WINELIB_NAME_AW(BROWSEINFO)
 #define PBROWSEINFO  WINELIB_NAME_AW(PBROWSEINFO)
@@ -274,7 +274,7 @@
 #define BIF_RETURNFSANCESTORS  0x0008
 #define BIF_EDITBOX            0x0010
 #define BIF_VALIDATE           0x0020
- 
+
 #define BIF_BROWSEFORCOMPUTER  0x1000
 #define BIF_BROWSEFORPRINTER   0x2000
 #define BIF_BROWSEINCLUDEFILES 0x4000
@@ -324,7 +324,7 @@
 #define SHDID_NET_RESTOFNET         16
 #define SHDID_NET_OTHER             17
 
-typedef struct _SHDESCRIPTIONID 
+typedef struct _SHDESCRIPTIONID
 {   DWORD   dwDescriptionId;
     CLSID   clsid;
 } SHDESCRIPTIONID, *LPSHDESCRIPTIONID;
@@ -349,7 +349,7 @@
 *  we got using SHCreateShellViewEx()), to notify us of the various things that
 *  are happening to the shellview (and ask for things too).
 *
-*  You don't have to support anything here - anything you don't want to 
+*  You don't have to support anything here - anything you don't want to
 *  handle, the shell will do itself if you just return E_NOTIMPL. This parameters
 *  that the shell passes to this function are entirely undocumented.
 *
diff --git a/include/snoop.h b/include/snoop.h
index 4cb2a15..d950258 100644
--- a/include/snoop.h
+++ b/include/snoop.h
@@ -1,4 +1,4 @@
-/* 
+/*
  * Definitions for inter-dll snooping
  *
  * Copyright 1998 Marcus Meissner
diff --git a/include/spy.h b/include/spy.h
index 938a77c..cbbb38f 100644
--- a/include/spy.h
+++ b/include/spy.h
@@ -2,7 +2,7 @@
  * Message Logging functions
  *
  * Copyright 1994 Bob Amstadt
- * Copyright 1995 Alex Korobka  
+ * Copyright 1995 Alex Korobka
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
diff --git a/include/sql.h b/include/sql.h
index 5cc4192..82a7979 100644
--- a/include/sql.h
+++ b/include/sql.h
@@ -638,7 +638,7 @@
 SQLRETURN WINAPI   SQLGetEnvAttr(SQLHENV EnvironmentHandle,
            SQLINTEGER Attribute, SQLPOINTER Value,
            SQLINTEGER BufferLength, SQLINTEGER *StringLength);
-#endif 
+#endif
 
 SQLRETURN WINAPI   SQLGetFunctions(SQLHDBC ConnectionHandle,
            SQLUSMALLINT FunctionId, SQLUSMALLINT *Supported);
@@ -743,4 +743,4 @@
 #ifdef __cplusplus
 }
 #endif
-#endif	
+#endif
diff --git a/include/sqlext.h b/include/sqlext.h
index 743cfb2..906997b 100644
--- a/include/sqlext.h
+++ b/include/sqlext.h
@@ -60,7 +60,7 @@
 
 #define SQL_CP_STRICT_MATCH					0UL
 #define SQL_CP_RELAXED_MATCH				1UL
-#define SQL_CP_MATCH_DEFAULT				SQL_CP_STRICT_MATCH		
+#define SQL_CP_MATCH_DEFAULT				SQL_CP_STRICT_MATCH
 
 #define SQL_OV_ODBC2						2UL
 #define	SQL_OV_ODBC3						3UL
@@ -139,7 +139,7 @@
 #define SQL_DB_DEFAULT					SQL_DB_RETURN_TO_POOL
 
 #define SQL_DTC_DONE					0L
-#endif 
+#endif
 
 #define SQL_CD_TRUE					1L
 #define SQL_CD_FALSE					0L
@@ -187,9 +187,9 @@
 #define SQL_ATTR_ROW_OPERATION_PTR			24
 #define	SQL_ATTR_ROW_STATUS_PTR				25
 #define	SQL_ATTR_ROWS_FETCHED_PTR			26
-#define SQL_ATTR_ROW_ARRAY_SIZE				27	
+#define SQL_ATTR_ROW_ARRAY_SIZE				27
 #define SQL_ATTR_SIMULATE_CURSOR			SQL_SIMULATE_CURSOR
-#define SQL_ATTR_USE_BOOKMARKS				SQL_USE_BOOKMARKS	
+#define SQL_ATTR_USE_BOOKMARKS				SQL_USE_BOOKMARKS
 
 #endif
 
@@ -303,13 +303,13 @@
 #if (ODBCVER >= 0x0300)
 #define SQL_DIAG_CURSOR_ROW_COUNT			(-1249)
 #define SQL_DIAG_ROW_NUMBER				(-1248)
-#define SQL_DIAG_COLUMN_NUMBER				(-1247)	
+#define SQL_DIAG_COLUMN_NUMBER				(-1247)
 #endif
 
 #define SQL_DATE                                9
 #if (ODBCVER >= 0x0300)
 #define SQL_INTERVAL				10
-#endif 
+#endif
 #define SQL_TIME                                10
 #define SQL_TIMESTAMP                           11
 #define SQL_LONGVARCHAR                         (-1)
@@ -321,7 +321,7 @@
 #define SQL_BIT                                 (-7)
 #if (ODBCVER >= 0x0350)
 #define SQL_GUID				(-11)
-#endif 
+#endif
 
 #if (ODBCVER >= 0x0300)
 #define SQL_CODE_YEAR				1
@@ -434,7 +434,7 @@
 #define SQL_C_ULONG      (SQL_C_LONG+SQL_UNSIGNED_OFFSET)
 #define SQL_C_USHORT     (SQL_C_SHORT+SQL_UNSIGNED_OFFSET)
 #define SQL_C_UTINYINT   (SQL_TINYINT+SQL_UNSIGNED_OFFSET)
-#define SQL_C_BOOKMARK   SQL_C_ULONG                      
+#define SQL_C_BOOKMARK   SQL_C_ULONG
 
 #if (ODBCVER >= 0x0350)
 #define SQL_C_GUID	SQL_GUID
@@ -554,7 +554,7 @@
 
 #endif
 
-#define SQL_INFO_FIRST                       0		
+#define SQL_INFO_FIRST                       0
 #define SQL_ACTIVE_CONNECTIONS               0
 #define SQL_ACTIVE_STATEMENTS                1
 #define SQL_DRIVER_HDBC                      3
@@ -682,7 +682,7 @@
 #define	SQL_DROP_VIEW							143
 #define SQL_DYNAMIC_CURSOR_ATTRIBUTES1			144
 #define SQL_DYNAMIC_CURSOR_ATTRIBUTES2			145
-#define SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES1		146		
+#define SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES1		146
 #define SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES2		147
 #define SQL_INDEX_KEYWORDS				148
 #define SQL_INFO_SCHEMA_VIEWS				149
@@ -695,8 +695,8 @@
 #define SQL_SCHEMA_TERM					SQL_OWNER_TERM
 #define SQL_SCHEMA_USAGE				SQL_OWNER_USAGE
 #define SQL_SQL92_DATETIME_FUNCTIONS			155
-#define SQL_SQL92_FOREIGN_KEY_DELETE_RULE		156		
-#define SQL_SQL92_FOREIGN_KEY_UPDATE_RULE		157		
+#define SQL_SQL92_FOREIGN_KEY_DELETE_RULE		156
+#define SQL_SQL92_FOREIGN_KEY_UPDATE_RULE		157
 #define SQL_SQL92_GRANT					158
 #define SQL_SQL92_NUMERIC_VALUE_FUNCTIONS		159
 #define SQL_SQL92_PREDICATES				160
@@ -706,7 +706,7 @@
 #define SQL_SQL92_STRING_FUNCTIONS			164
 #define SQL_SQL92_VALUE_EXPRESSIONS			165
 #define SQL_STANDARD_CLI_CONFORMANCE			166
-#define SQL_STATIC_CURSOR_ATTRIBUTES1			167	
+#define SQL_STATIC_CURSOR_ATTRIBUTES1			167
 #define SQL_STATIC_CURSOR_ATTRIBUTES2			168
 
 #define SQL_AGGREGATE_FUNCTIONS				169
@@ -720,16 +720,16 @@
 
 #if (ODBCVER >= 0x0300)
 
-#define	SQL_AT_ADD_COLUMN_SINGLE				0x00000020L	
+#define	SQL_AT_ADD_COLUMN_SINGLE				0x00000020L
 #define	SQL_AT_ADD_COLUMN_DEFAULT				0x00000040L
 #define	SQL_AT_ADD_COLUMN_COLLATION				0x00000080L
 #define	SQL_AT_SET_COLUMN_DEFAULT				0x00000100L
 #define	SQL_AT_DROP_COLUMN_DEFAULT				0x00000200L
 #define	SQL_AT_DROP_COLUMN_CASCADE				0x00000400L
 #define	SQL_AT_DROP_COLUMN_RESTRICT				0x00000800L
-#define SQL_AT_ADD_TABLE_CONSTRAINT				0x00001000L		
-#define SQL_AT_DROP_TABLE_CONSTRAINT_CASCADE			0x00002000L		
-#define SQL_AT_DROP_TABLE_CONSTRAINT_RESTRICT			0x00004000L		
+#define SQL_AT_ADD_TABLE_CONSTRAINT				0x00001000L
+#define SQL_AT_DROP_TABLE_CONSTRAINT_CASCADE			0x00002000L
+#define SQL_AT_DROP_TABLE_CONSTRAINT_RESTRICT			0x00004000L
 #define SQL_AT_CONSTRAINT_NAME_DEFINITION			0x00008000L
 #define SQL_AT_CONSTRAINT_INITIALLY_DEFERRED			0x00010000L
 #define SQL_AT_CONSTRAINT_INITIALLY_IMMEDIATE			0x00020000L
@@ -799,7 +799,7 @@
 #endif
 
 #if (ODBCVER >= 0x0300)
-#define SQL_SSF_CONVERT					0x00000001L	
+#define SQL_SSF_CONVERT					0x00000001L
 #define SQL_SSF_LOWER					0x00000002L
 #define SQL_SSF_UPPER					0x00000004L
 #define SQL_SSF_SUBSTRING				0x00000008L
@@ -841,7 +841,7 @@
 #define SQL_SNVF_EXTRACT				0x00000008L
 #define SQL_SNVF_OCTET_LENGTH				0x00000010L
 #define SQL_SNVF_POSITION				0x00000020L
-#endif 
+#endif
 
 #define SQL_FN_TD_NOW                       0x00000001L
 #define SQL_FN_TD_CURDATE                   0x00000002L
@@ -871,7 +871,7 @@
 #define SQL_SDF_CURRENT_DATE				0x00000001L
 #define SQL_SDF_CURRENT_TIME				0x00000002L
 #define SQL_SDF_CURRENT_TIMESTAMP			0x00000004L
-#endif 
+#endif
 
 #define SQL_FN_SYS_USERNAME                 0x00000001L
 #define SQL_FN_SYS_DBNAME                   0x00000002L
@@ -1064,7 +1064,7 @@
 #define SQL_AF_MIN						0x00000008L
 #define SQL_AF_SUM						0x00000010L
 #define SQL_AF_DISTINCT					0x00000020L
-#define SQL_AF_ALL						0x00000040L	
+#define SQL_AF_ALL						0x00000040L
 
 #define	SQL_SC_SQL92_ENTRY				0x00000001L
 #define	SQL_SC_FIPS127_2_TRANSITIONAL	0x00000002L
@@ -1104,7 +1104,7 @@
 #define SQL_PARC_NO_BATCH	2
 
 #define SQL_PAS_BATCH				1
-#define SQL_PAS_NO_BATCH			2		
+#define SQL_PAS_NO_BATCH			2
 #define SQL_PAS_NO_SELECT			3
 
 #define SQL_IK_NONE							0x00000000L
@@ -1140,7 +1140,7 @@
 #define	SQL_AM_CONNECTION	1
 #define	SQL_AM_STATEMENT	2
 
-#define SQL_AD_CONSTRAINT_NAME_DEFINITION			0x00000001L	
+#define SQL_AD_CONSTRAINT_NAME_DEFINITION			0x00000001L
 #define	SQL_AD_ADD_DOMAIN_CONSTRAINT	 			0x00000002L
 #define	SQL_AD_DROP_DOMAIN_CONSTRAINT	 			0x00000004L
 #define	SQL_AD_ADD_DOMAIN_DEFAULT   	 			0x00000008L
@@ -1250,7 +1250,7 @@
 #define SQL_SG_REFERENCES_COLUMN				0x00000200L
 #define SQL_SG_SELECT_TABLE						0x00000400L
 #define SQL_SG_UPDATE_TABLE						0x00000800L
-#define SQL_SG_UPDATE_COLUMN					0x00001000L	
+#define SQL_SG_UPDATE_COLUMN					0x00001000L
 
 #define SQL_SP_EXISTS							0x00000001L
 #define SQL_SP_ISNOTNULL						0x00000002L
@@ -1318,7 +1318,7 @@
 #if (ODBCVER >= 0x0300)
 #define SQL_FETCH_FIRST_USER				31
 #define SQL_FETCH_FIRST_SYSTEM				32
-#endif 
+#endif
 
 #define SQL_ENTIRE_ROWSET            0
 
@@ -1593,12 +1593,12 @@
 #define SQL_DAY							SQL_CODE_DAY
 #define SQL_HOUR						SQL_CODE_HOUR
 #define SQL_MINUTE						SQL_CODE_MINUTE
-#define SQL_SECOND						SQL_CODE_SECOND	
+#define SQL_SECOND						SQL_CODE_SECOND
 #define SQL_YEAR_TO_MONTH				SQL_CODE_YEAR_TO_MONTH
 #define SQL_DAY_TO_HOUR					SQL_CODE_DAY_TO_HOUR
 #define SQL_DAY_TO_MINUTE				SQL_CODE_DAY_TO_MINUTE
 #define SQL_DAY_TO_SECOND				SQL_CODE_DAY_TO_SECOND
-#define SQL_HOUR_TO_MINUTE				SQL_CODE_HOUR_TO_MINUTE	
+#define SQL_HOUR_TO_MINUTE				SQL_CODE_HOUR_TO_MINUTE
 #define SQL_HOUR_TO_SECOND				SQL_CODE_HOUR_TO_SECOND
 #define SQL_MINUTE_TO_SECOND			SQL_CODE_MINUTE_TO_SECOND
 #endif
@@ -1621,7 +1621,7 @@
 #define SQL_CR_CLOSE                    SQL_CB_CLOSE
 #define SQL_CC_PRESERVE                 SQL_CB_PRESERVE
 #define SQL_CR_PRESERVE                 SQL_CB_PRESERVE
-#define SQL_SCROLL_FORWARD_ONLY         0L 
+#define SQL_SCROLL_FORWARD_ONLY         0L
 #define SQL_SCROLL_KEYSET_DRIVEN        (-1L)
 #define SQL_SCROLL_DYNAMIC              (-2L)
 #define SQL_SCROLL_STATIC               (-3L)
@@ -1640,9 +1640,9 @@
 DWORD	 TraceVersion();
 
 /*#define TRACE_ON		0x00000001L*/
-#define TRACE_VS_EVENT_ON	0x00000002L	
+#define TRACE_VS_EVENT_ON	0x00000002L
 
-RETCODE	TraceVSControl(DWORD);			
+RETCODE	TraceVSControl(DWORD);
 
 #define ODBC_VS_FLAG_UNICODE_ARG	0x00000001L
 #define	ODBC_VS_FLAG_UNICODE_COR	0x00000002L
@@ -1653,7 +1653,7 @@
 	const GUID	*pguidEvent;
 	DWORD	dwFlags;
 	union {
-		WCHAR	*wszArg;	
+		WCHAR	*wszArg;
 		CHAR	*szArg;
 	} DUMMYUNIONNAME1;
 	union {
diff --git a/include/storage.h b/include/storage.h
index 665187a..ade3fd1 100644
--- a/include/storage.h
+++ b/include/storage.h
@@ -20,7 +20,7 @@
 #define __WINE_STORAGE_H
 
 /* "storage.h" is obsolete, you should include "objbase.h" instead */
-  
+
 #include "objbase.h"
 
 #endif
diff --git a/include/tapi.h b/include/tapi.h
index ffc8ef5..f64a911 100644
--- a/include/tapi.h
+++ b/include/tapi.h
@@ -1,6 +1,6 @@
 /*
  * TAPI definitions
- * 
+ *
  * Copyright (c) 1999 Andreas Mohr
  *
  * This library is free software; you can redistribute it and/or
@@ -359,7 +359,7 @@
     DWORD dwNumEntries;
     LINEFORWARD ForwardList[1];
 } LINEFORWARDLIST, *LPLINEFORWARDLIST;
-    
+
 typedef struct linegeneratetone_tag {
     DWORD dwFrequency;
     DWORD dwCadenceOn;
diff --git a/include/task.h b/include/task.h
index 6865523..a4fc200 100644
--- a/include/task.h
+++ b/include/task.h
@@ -73,8 +73,8 @@
                                         HINSTANCE16, HQUEUE16);
 
   /* Task database. See 'Windows Internals' p. 226.
-   * Note that 16-bit OLE 2 libs like to read it directly 
-   * so we have to keep entry offsets as they are. 
+   * Note that 16-bit OLE 2 libs like to read it directly
+   * so we have to keep entry offsets as they are.
    */
 typedef struct _TDB
 {
diff --git a/include/tchar.h b/include/tchar.h
index 01de609..deead02 100644
--- a/include/tchar.h
+++ b/include/tchar.h
@@ -220,9 +220,9 @@
 typedef UCHAR  _TUCHARA;
 typedef WCHAR _TUCHARW;
 DECL_WINELIB_TYPE_AW(_TUCHAR)
-	 
+
 #ifdef __cplusplus
 } /* extern "C" */
 #endif
-				 
+
 #endif /* __WINE_TCHAR_H */
diff --git a/include/thread.h b/include/thread.h
index 18aa4ae..44648ab 100644
--- a/include/thread.h
+++ b/include/thread.h
@@ -54,7 +54,7 @@
     WORD         stack_sel;      /* 1--  0e 16-bit stack selector */
     DWORD        selman_list;    /* 1-n  10 Selector manager list */
     DWORD        user_ptr;       /* 12n  14 User pointer */
-/* end of NT_TIB */  
+/* end of NT_TIB */
     struct _TEB *self;           /* 12-  18 Pointer to this structure */
     WORD         tibflags;       /* 1!n  1c Flags (NT: EnvironmentPointer) */
     WORD         mutex_count;    /* 1-n  1e Win16 mutex count */
diff --git a/include/tlhelp32.h b/include/tlhelp32.h
index 1463398..e0fa176 100644
--- a/include/tlhelp32.h
+++ b/include/tlhelp32.h
@@ -37,54 +37,54 @@
 HANDLE WINAPI CreateToolhelp32Snapshot(DWORD,DWORD);
 
 /*
- * thread entry list as created by CreateToolHelp32Snapshot 
+ * thread entry list as created by CreateToolHelp32Snapshot
  */
 
 typedef struct tagTHREADENTRY32
 {
-    DWORD dwSize; 
-    DWORD cntUsage; 
-    DWORD th32ThreadID; 
-    DWORD th32OwnerProcessID; 
-    LONG  tpBasePri; 
-    LONG  tpDeltaPri; 
-    DWORD dwFlags; 
-} THREADENTRY32, *PTHREADENTRY32, *LPTHREADENTRY32; 
+    DWORD dwSize;
+    DWORD cntUsage;
+    DWORD th32ThreadID;
+    DWORD th32OwnerProcessID;
+    LONG  tpBasePri;
+    LONG  tpDeltaPri;
+    DWORD dwFlags;
+} THREADENTRY32, *PTHREADENTRY32, *LPTHREADENTRY32;
 
 BOOL WINAPI Thread32First(HANDLE,LPTHREADENTRY32);
 BOOL WINAPI Thread32Next(HANDLE,LPTHREADENTRY32);
 
 /*
- * Process entry list as created by CreateToolHelp32Snapshot 
+ * Process entry list as created by CreateToolHelp32Snapshot
  */
 
 typedef struct tagPROCESSENTRY32
 {
-    DWORD dwSize; 
-    DWORD cntUsage; 
-    DWORD th32ProcessID; 
-    DWORD th32DefaultHeapID; 
-    DWORD th32ModuleID; 
-    DWORD cntThreads; 
-    DWORD th32ParentProcessID; 
-    LONG  pcPriClassBase; 
-    DWORD dwFlags; 
-    char szExeFile[MAX_PATH]; 
-} PROCESSENTRY32, *PPROCESSENTRY32, *LPPROCESSENTRY32; 
+    DWORD dwSize;
+    DWORD cntUsage;
+    DWORD th32ProcessID;
+    DWORD th32DefaultHeapID;
+    DWORD th32ModuleID;
+    DWORD cntThreads;
+    DWORD th32ParentProcessID;
+    LONG  pcPriClassBase;
+    DWORD dwFlags;
+    char szExeFile[MAX_PATH];
+} PROCESSENTRY32, *PPROCESSENTRY32, *LPPROCESSENTRY32;
 
 typedef struct tagPROCESSENTRY32W
 {
-    DWORD dwSize; 
-    DWORD cntUsage; 
-    DWORD th32ProcessID; 
-    DWORD th32DefaultHeapID; 
-    DWORD th32ModuleID; 
-    DWORD cntThreads; 
-    DWORD th32ParentProcessID; 
-    LONG  pcPriClassBase; 
-    DWORD dwFlags; 
-    WCHAR szExeFile[MAX_PATH]; 
-} PROCESSENTRY32W, *PPROCESSENTRY32W, *LPPROCESSENTRY32W; 
+    DWORD dwSize;
+    DWORD cntUsage;
+    DWORD th32ProcessID;
+    DWORD th32DefaultHeapID;
+    DWORD th32ModuleID;
+    DWORD cntThreads;
+    DWORD th32ParentProcessID;
+    LONG  pcPriClassBase;
+    DWORD dwFlags;
+    WCHAR szExeFile[MAX_PATH];
+} PROCESSENTRY32W, *PPROCESSENTRY32W, *LPPROCESSENTRY32W;
 
 BOOL WINAPI Process32First(HANDLE,LPPROCESSENTRY32);
 BOOL WINAPI Process32FirstW(HANDLE,LPPROCESSENTRY32W);
@@ -100,38 +100,38 @@
 #endif
 
 /*
- * Module entry list as created by CreateToolHelp32Snapshot 
+ * Module entry list as created by CreateToolHelp32Snapshot
  */
 
 #define MAX_MODULE_NAME32 255
 
 typedef struct tagMODULEENTRY32
 {
-    DWORD  dwSize; 
+    DWORD  dwSize;
     DWORD  th32ModuleID;
-    DWORD  th32ProcessID; 
+    DWORD  th32ProcessID;
     DWORD  GlblcntUsage;
     DWORD  ProccntUsage;
     BYTE  *modBaseAddr;
     DWORD  modBaseSize;
     DWORD  hModule;
     char   szModule[MAX_MODULE_NAME32 + 1];
-    char   szExePath[MAX_PATH]; 
-} MODULEENTRY32, *PMODULEENTRY32, *LPMODULEENTRY32; 
+    char   szExePath[MAX_PATH];
+} MODULEENTRY32, *PMODULEENTRY32, *LPMODULEENTRY32;
 
 typedef struct tagMODULEENTRY32W
 {
-    DWORD  dwSize; 
+    DWORD  dwSize;
     DWORD  th32ModuleID;
-    DWORD  th32ProcessID; 
+    DWORD  th32ProcessID;
     DWORD  GlblcntUsage;
     DWORD  ProccntUsage;
     BYTE  *modBaseAddr;
     DWORD  modBaseSize;
     DWORD  hModule;
     WCHAR  szModule[MAX_MODULE_NAME32 + 1];
-    WCHAR  szExePath[MAX_PATH]; 
-} MODULEENTRY32W, *PMODULEENTRY32W, *LPMODULEENTRY32W; 
+    WCHAR  szExePath[MAX_PATH];
+} MODULEENTRY32W, *PMODULEENTRY32W, *LPMODULEENTRY32W;
 
 BOOL WINAPI Module32First(HANDLE,LPMODULEENTRY32);
 BOOL WINAPI Module32FirstW(HANDLE,LPMODULEENTRY32W);
diff --git a/include/ver.h b/include/ver.h
index 65ebd61..b224608 100644
--- a/include/ver.h
+++ b/include/ver.h
@@ -1,5 +1,5 @@
 /* Definitions for the VERsion infolibrary (VER.DLL)
- * 
+ *
  * Copyright 1996 Marcus Meissner
  *
  * This library is free software; you can redistribute it and/or
diff --git a/include/vfw.h b/include/vfw.h
index 4bc7ae0..cb90022 100644
--- a/include/vfw.h
+++ b/include/vfw.h
@@ -401,7 +401,7 @@
 
 LRESULT	VFWAPI	ICSendMessage(HIC hic, UINT msg, DWORD dw1, DWORD dw2);
 
-inline static LRESULT VFWAPI ICDecompressEx(HIC hic, DWORD dwFlags, 
+inline static LRESULT VFWAPI ICDecompressEx(HIC hic, DWORD dwFlags,
 					    LPBITMAPINFOHEADER lpbiSrc, LPVOID lpSrc,
 					    int xSrc, int ySrc, int dxSrc, int dySrc,
 					    LPBITMAPINFOHEADER lpbiDst, LPVOID lpDst,
@@ -501,7 +501,7 @@
 #define ICDrawOpen(fccType, fccHandler, lpbiIn) \
     ICLocate(fccType, fccHandler, lpbiIn, NULL, ICMODE_DRAW)
 
-HANDLE VFWAPI ICImageCompress(HIC hic, UINT uiFlags, LPBITMAPINFO lpbiIn, 
+HANDLE VFWAPI ICImageCompress(HIC hic, UINT uiFlags, LPBITMAPINFO lpbiIn,
 			      LPVOID lpBits, LPBITMAPINFO lpbiOut, LONG lQuality,
 			      LONG* plSize);
 
@@ -625,7 +625,7 @@
 
 inline static LRESULT VFWAPI ICDrawSuggestFormat(HIC hic, LPBITMAPINFOHEADER lpbiIn,
 						 LPBITMAPINFOHEADER lpbiOut,
-						 int dxSrc, int dySrc, 
+						 int dxSrc, int dySrc,
 						 int dxDst, int dyDst,
 						 HIC hicDecomp)
 {
@@ -819,7 +819,7 @@
     WORD	wPriority;
     WORD	wLanguage;
     DWORD	dwInitialFrames;
-    DWORD	dwScale;        
+    DWORD	dwScale;
     DWORD	dwRate; /* dwRate / dwScale == samples/second */
     DWORD	dwStart;
     DWORD	dwLength; /* In units above... */
@@ -924,7 +924,7 @@
     DWORD               dwSuggestedBufferSize;
     DWORD               dwWidth;
     DWORD               dwHeight;
-    DWORD               dwScale;        
+    DWORD               dwScale;
     DWORD               dwRate;
     DWORD               dwLength;
     DWORD               dwEditCount;
@@ -938,7 +938,7 @@
     DWORD               dwSuggestedBufferSize;
     DWORD               dwWidth;
     DWORD               dwHeight;
-    DWORD               dwScale;        
+    DWORD               dwScale;
     DWORD               dwRate;
     DWORD               dwLength;
     DWORD               dwEditCount;
@@ -1020,7 +1020,7 @@
 #define IAVIStream_WriteData(p,a,b,c)     ICOM_CALL3(WriteData,p,a,b,c)
 #define IAVIStream_SetInfo(p,a,b)         ICOM_CALL2(SetInfo,p,a,b)
 
-HRESULT WINAPI AVIMakeCompressedStream(PAVISTREAM*ppsCompressed,PAVISTREAM ppsSource,AVICOMPRESSOPTIONS *lpOptions,CLSID*pclsidHandler); 
+HRESULT WINAPI AVIMakeCompressedStream(PAVISTREAM*ppsCompressed,PAVISTREAM ppsSource,AVICOMPRESSOPTIONS *lpOptions,CLSID*pclsidHandler);
 
 HRESULT WINAPI AVIStreamCreate(PAVISTREAM*,LONG,LONG,CLSID*);
 HRESULT WINAPI AVIStreamInfoA(PAVISTREAM iface,AVISTREAMINFOA *asi,LONG size);
@@ -1047,7 +1047,7 @@
 #define AVIStreamOpenFromFile WINELIB_NAME_AW(AVIStreamOpenFromFile)
 
 #define AVIStreamFormatSize(pavi, lPos, plSize) \
-    AVIStreamReadFormat(pavi, lPos, NULL, plSize) 
+    AVIStreamReadFormat(pavi, lPos, NULL, plSize)
 
 /*****************************************************************************
  * IAVIFile interface
@@ -1378,7 +1378,7 @@
 			 LPBITMAPINFOHEADER lpbi, INT dxSrc, INT dySrc, UINT wFlags);
 
 BOOL VFWAPI DrawDibDraw(HDRAWDIB hdd, HDC hdc, INT xDst, INT yDst, INT dxDst, INT dyDst,
-			LPBITMAPINFOHEADER lpbi, LPVOID lpBits,	
+			LPBITMAPINFOHEADER lpbi, LPVOID lpBits,
 			INT xSrc, INT ySrc, INT dxSrc, INT dySrc, UINT wFlags);
 
 /* DrawDibDraw flags */
diff --git a/include/winbase.h b/include/winbase.h
index 19447c3..8de1617 100644
--- a/include/winbase.h
+++ b/include/winbase.h
@@ -371,9 +371,9 @@
 #define CLRBREAK	9
 
 /* Purge functions for Comm Port */
-#define PURGE_TXABORT       0x0001  /* Kill the pending/current writes to the 
+#define PURGE_TXABORT       0x0001  /* Kill the pending/current writes to the
 				       comm port */
-#define PURGE_RXABORT       0x0002  /*Kill the pending/current reads to 
+#define PURGE_RXABORT       0x0002  /*Kill the pending/current reads to
 				     the comm port */
 #define PURGE_TXCLEAR       0x0004  /* Kill the transmit queue if there*/
 #define PURGE_RXCLEAR       0x0008  /* Kill the typeahead buffer if there*/
@@ -395,7 +395,7 @@
 #define	DTR_CONTROL_HANDSHAKE	2
 
 
-#define LMEM_FIXED          0   
+#define LMEM_FIXED          0
 #define LMEM_MOVEABLE       0x0002
 #define LMEM_NOCOMPACT      0x0010
 #define LMEM_NODISCARD      0x0020
@@ -694,10 +694,10 @@
 	struct {
 	    BYTE	BaseMid;
 	    BYTE	Flags1;/*Declare as bytes to avoid alignment problems */
-	    BYTE	Flags2; 
+	    BYTE	Flags2;
 	    BYTE	BaseHi;
 	} Bytes;
-	struct {	    
+	struct {
 	    unsigned	BaseMid		: 8;
 	    unsigned	Type		: 5;
 	    unsigned	Dpl		: 2;
@@ -730,7 +730,7 @@
  * This one seems to be a Win32 only definition. It also is defined with
  * WINAPI instead of CALLBACK in the windows headers.
  */
-typedef DWORD (CALLBACK *LPPROGRESS_ROUTINE)(LARGE_INTEGER, LARGE_INTEGER, LARGE_INTEGER, 
+typedef DWORD (CALLBACK *LPPROGRESS_ROUTINE)(LARGE_INTEGER, LARGE_INTEGER, LARGE_INTEGER,
                                            LARGE_INTEGER, DWORD, DWORD, HANDLE,
                                            HANDLE, LPVOID);
 
@@ -1363,7 +1363,7 @@
 #define     LookupAccountSid WINELIB_NAME_AW(LookupAccountSid)
 BOOL        WINAPI LocalFileTimeToFileTime(const FILETIME*,LPFILETIME);
 BOOL        WINAPI LockFile(HANDLE,DWORD,DWORD,DWORD,DWORD);
-BOOL        WINAPI LockFileEx(HANDLE, DWORD, DWORD, DWORD, DWORD, LPOVERLAPPED);    
+BOOL        WINAPI LockFileEx(HANDLE, DWORD, DWORD, DWORD, DWORD, LPOVERLAPPED);
 BOOL        WINAPI LookupPrivilegeValueA(LPCSTR,LPCSTR,LPVOID);
 BOOL        WINAPI LookupPrivilegeValueW(LPCWSTR,LPCWSTR,LPVOID);
 #define     LookupPrivilegeValue WINELIB_NAME_AW(LookupPrivilegeValue)
diff --git a/include/windowsx.h b/include/windowsx.h
index be08c7a..545d081 100644
--- a/include/windowsx.h
+++ b/include/windowsx.h
@@ -17,7 +17,7 @@
 
 #ifndef _INC_WINDOWSX
 #define _INC_WINDOWSX
-	
+
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -239,7 +239,7 @@
 	((int)SendMessage((hwndCtl), CB_ADDSTRING, 0L, (LPARAM)(LPCTSTR)(data)))
 
 #define ComboBox_AddString(hwndCtl, lpsz) \
-	((int)SendMessage((hwndCtl), CB_ADDSTRING, 0L, (LPARAM)(LPCTSTR)(lpsz)))    
+	((int)SendMessage((hwndCtl), CB_ADDSTRING, 0L, (LPARAM)(LPCTSTR)(lpsz)))
 
 #define ComboBox_DeleteString(hwndCtl, index) \
 	((int)SendMessage((hwndCtl), CB_DELETESTRING, (WPARAM)(int)(index), 0L))
@@ -254,7 +254,7 @@
 	((int)SendMessage((hwndCtl), CB_FINDSTRING, (WPARAM)(int)(indexStart), (LPARAM)(data)))
 
 #define ComboBox_FindString(hwndCtl, indexStart, lpszFind) \
-	((int)SendMessage((hwndCtl), CB_FINDSTRING, (WPARAM)(int)(indexStart), (LPARAM)(LPCTSTR)(lpszFind))) 
+	((int)SendMessage((hwndCtl), CB_FINDSTRING, (WPARAM)(int)(indexStart), (LPARAM)(LPCTSTR)(lpszFind)))
 
 #define ComboBox_FindStringExact(hwndCtl, indexStart, lpszFind) \
 	((int)SendMessage((hwndCtl), CB_FINDSTRINGEXACT, (WPARAM)(int)(indexStart), (LPARAM)(LPCTSTR)(lpszFind)))
@@ -1384,7 +1384,7 @@
 #define FORWARD_WM_DRAWITEM(hwnd, lpDrawItem, fn) \
         (void)(fn)((hwnd), WM_DRAWITEM, (WPARAM)(((const DRAWITEMSTRUCT *)lpDrawItem)->CtlID), (LPARAM)(const DRAWITEMSTRUCT *)(lpDrawItem))
 
-				 				 
+
 /****** C runtime porting macros ****************************************/
 
 #define _ncalloc    calloc
@@ -1432,6 +1432,6 @@
 #ifdef __cplusplus
 }
 #endif
-				
+
 #endif
 
diff --git a/include/wine/icmpapi.h b/include/wine/icmpapi.h
index 98cbf13..ba8fab0 100644
--- a/include/wine/icmpapi.h
+++ b/include/wine/icmpapi.h
@@ -1,7 +1,7 @@
 /*
  * Interface to the ICMP functions.
  *
- * This header is not part of the standard headers, it is usually 
+ * This header is not part of the standard headers, it is usually
  * delivered separately and this is why it is not directly in 'include'.
  *
  * Depends on ipexport.h (there is no include directive in the original)
diff --git a/include/wine/ipexport.h b/include/wine/ipexport.h
index 9df85fb..371404e 100644
--- a/include/wine/ipexport.h
+++ b/include/wine/ipexport.h
@@ -1,7 +1,7 @@
 /*
  * Defines the types and macros used by the ICMP API, see icmpapi.h.
  *
- * This header is not part of the standard headers, it is usually 
+ * This header is not part of the standard headers, it is usually
  * delivered separately and this is why it is not directly in 'include'.
  *
  * Copyright (C) 1999 Francois Gouget
diff --git a/include/wine/obj_base.h b/include/wine/obj_base.h
index 817f56d..57f2e79 100644
--- a/include/wine/obj_base.h
+++ b/include/wine/obj_base.h
@@ -1,5 +1,5 @@
 /*
- * This file defines the macros and types necessary to define COM interfaces, 
+ * This file defines the macros and types necessary to define COM interfaces,
  * and the three most basic COM interfaces: IUnknown, IMalloc and IClassFactory.
  *
  * Copyright (C) 1999 Francois Gouget
@@ -38,7 +38,7 @@
  *
  * The preferable method for using ICOM_USE_COM_INTERFACE_ATTRIBUTE macro
  * would be to define it only for your Winelib application. This allows you
- * to have both binary and Winelib compatibility for C and C++ at the same 
+ * to have both binary and Winelib compatibility for C and C++ at the same
  * time :)
  */
 /* #define ICOM_MSVTABLE_COMPAT 1 */
@@ -85,26 +85,26 @@
  * Macros to define a COM interface
  */
 /*
- * The goal of the following set of definitions is to provide a way to use the same 
- * header file definitions to provide both a C interface and a C++ object oriented 
- * interface to COM interfaces. The type of interface is selected automatically 
- * depending on the language but it is always possible to get the C interface in C++ 
+ * The goal of the following set of definitions is to provide a way to use the same
+ * header file definitions to provide both a C interface and a C++ object oriented
+ * interface to COM interfaces. The type of interface is selected automatically
+ * depending on the language but it is always possible to get the C interface in C++
  * by defining CINTERFACE.
  *
  * It is based on the following assumptions:
  *  - all COM interfaces derive from IUnknown, this should not be a problem.
- *  - the header file only defines the interface, the actual fields are defined 
+ *  - the header file only defines the interface, the actual fields are defined
  *    separately in the C file implementing the interface.
  *
- * The natural approach to this problem would be to make sure we get a C++ class and 
+ * The natural approach to this problem would be to make sure we get a C++ class and
  * virtual methods in C++ and a structure with a table of pointer to functions in C.
- * Unfortunately the layout of the virtual table is compiler specific, the layout of 
- * g++ virtual tables is not the same as that of an egcs virtual table which is not the 
- * same as that generated by Visual C+. There are workarounds to make the virtual tables 
+ * Unfortunately the layout of the virtual table is compiler specific, the layout of
+ * g++ virtual tables is not the same as that of an egcs virtual table which is not the
+ * same as that generated by Visual C+. There are workarounds to make the virtual tables
  * compatible via padding but unfortunately the one which is imposed to the WINE emulator
  * by the Windows binaries, i.e. the Visual C++ one, is the most compact of all.
  *
- * So the solution I finally adopted does not use virtual tables. Instead I use inline 
+ * So the solution I finally adopted does not use virtual tables. Instead I use inline
  * non virtual methods that dereference the method pointer themselves and perform the call.
  *
  * Let's take Direct3D as an example:
@@ -138,41 +138,41 @@
  *    #endif
  *
  * Comments:
- *  - The ICOM_INTERFACE macro is used in the ICOM_METHOD macros to define the type of the 'this' 
- *    pointer. Defining this macro here saves us the trouble of having to repeat the interface 
- *    name everywhere. Note however that because of the way macros work, a macro like ICOM_METHOD1 
- *    cannot use 'ICOM_INTERFACE##_VTABLE' because this would give 'ICOM_INTERFACE_VTABLE' and not 
+ *  - The ICOM_INTERFACE macro is used in the ICOM_METHOD macros to define the type of the 'this'
+ *    pointer. Defining this macro here saves us the trouble of having to repeat the interface
+ *    name everywhere. Note however that because of the way macros work, a macro like ICOM_METHOD1
+ *    cannot use 'ICOM_INTERFACE##_VTABLE' because this would give 'ICOM_INTERFACE_VTABLE' and not
  *    'IDirect3D_VTABLE'.
- *  - ICOM_METHODS defines the methods specific to this interface. It is then aggregated with the 
+ *  - ICOM_METHODS defines the methods specific to this interface. It is then aggregated with the
  *    inherited methods to form ICOM_IMETHODS.
- *  - ICOM_IMETHODS defines the list of methods that are inheritable from this interface. It must 
- *    be written manually (rather than using a macro to generate the equivalent code) to avoid 
+ *  - ICOM_IMETHODS defines the list of methods that are inheritable from this interface. It must
+ *    be written manually (rather than using a macro to generate the equivalent code) to avoid
  *    macro recursion (which compilers don't like).
- *  - The ICOM_DEFINE finally declares all the structures necessary for the interface. We have to 
+ *  - The ICOM_DEFINE finally declares all the structures necessary for the interface. We have to
  *    explicitly use the interface name for macro expansion reasons again.
- *    Inherited methods are inherited in C by using the IDirect3D_METHODS macro and the parent's 
- *    Xxx_IMETHODS macro. In C++ we need only use the IDirect3D_METHODS since method inheritance 
+ *    Inherited methods are inherited in C by using the IDirect3D_METHODS macro and the parent's
+ *    Xxx_IMETHODS macro. In C++ we need only use the IDirect3D_METHODS since method inheritance
  *    is taken care of by the language.
- *  - In C++ the ICOM_METHOD macros generate a function prototype and a call to a function pointer 
- *    method. This means using once 't1 p1, t2 p2, ...' and once 'p1, p2' without the types. The 
- *    only way I found to handle this is to have one ICOM_METHOD macro per number of parameters and 
+ *  - In C++ the ICOM_METHOD macros generate a function prototype and a call to a function pointer
+ *    method. This means using once 't1 p1, t2 p2, ...' and once 'p1, p2' without the types. The
+ *    only way I found to handle this is to have one ICOM_METHOD macro per number of parameters and
  *    to have it take only the type information (with const if necessary) as parameters.
- *    The 'undef ICOM_INTERFACE' is here to remind you that using ICOM_INTERFACE in the following 
- *    macros will not work. This time it's because the ICOM_CALL macro expansion is done only once 
- *    the 'IDirect3D_Xxx' macro is expanded. And by that time ICOM_INTERFACE will be long gone 
+ *    The 'undef ICOM_INTERFACE' is here to remind you that using ICOM_INTERFACE in the following
+ *    macros will not work. This time it's because the ICOM_CALL macro expansion is done only once
+ *    the 'IDirect3D_Xxx' macro is expanded. And by that time ICOM_INTERFACE will be long gone
  *    anyway.
- *  - You may have noticed the double commas after each parameter type. This allows you to put the 
- *    name of that parameter which I think is good for documentation. It is not required and since 
- *    I did not know what to put there for this example (I could only find doc about IDirect3D2), 
+ *  - You may have noticed the double commas after each parameter type. This allows you to put the
+ *    name of that parameter which I think is good for documentation. It is not required and since
+ *    I did not know what to put there for this example (I could only find doc about IDirect3D2),
  *    I left them blank.
- *  - Finally the set of 'IDirect3D_Xxx' macros is a standard set of macros defined to ease access 
- *    to the interface methods in C. Unfortunately I don't see any way to avoid having to duplicate 
- *    the inherited method definitions there. This time I could have used a trick to use only one 
+ *  - Finally the set of 'IDirect3D_Xxx' macros is a standard set of macros defined to ease access
+ *    to the interface methods in C. Unfortunately I don't see any way to avoid having to duplicate
+ *    the inherited method definitions there. This time I could have used a trick to use only one
  *    macro whatever the number of parameters but I prefered to have it work the same way as above.
- *  - You probably have noticed that we don't define the fields we need to actually implement this 
- *    interface: reference count, pointer to other resources and miscellaneous fields. That's 
- *    because these interfaces are just that: interfaces. They may be implemented more than once, in 
- *    different contexts and sometimes not even in Wine. Thus it would not make sense to impose 
+ *  - You probably have noticed that we don't define the fields we need to actually implement this
+ *    interface: reference count, pointer to other resources and miscellaneous fields. That's
+ *    because these interfaces are just that: interfaces. They may be implemented more than once, in
+ *    different contexts and sometimes not even in Wine. Thus it would not make sense to impose
  *    that the interface contains some specific fields.
  *
  *
@@ -191,7 +191,7 @@
  *        HRESULT (*CreateMaterial)(IDirect3D* me, LPDIRECT3DMATERIAL* a, IUnknown* b);
  *        HRESULT (*CreateViewport)(IDirect3D* me, LPDIRECT3DVIEWPORT* a, IUnknown* b);
  *        HRESULT (*FindDevice)(IDirect3D* me, LPD3DFINDDEVICESEARCH a, LPD3DFINDDEVICERESULT b);
- *    }; 
+ *    };
  *
  *    #ifdef ICOM_CINTERFACE
  *    // *** IUnknown methods *** //
@@ -208,20 +208,20 @@
  *    #endif
  *
  * Comments:
- *  - IDirect3D only contains a pointer to the IDirect3D virtual/jump table. This is the only thing 
- *    the user needs to know to use the interface. Of course the structure we will define to 
+ *  - IDirect3D only contains a pointer to the IDirect3D virtual/jump table. This is the only thing
+ *    the user needs to know to use the interface. Of course the structure we will define to
  *    implement this interface will have more fields but the first one will match this pointer.
- *  - The code generated by ICOM_DEFINE defines both the structure representing the interface and 
- *    the structure for the jump table. ICOM_DEFINE uses the parent's Xxx_IMETHODS macro to 
- *    automatically repeat the prototypes of all the inherited methods and then uses IDirect3D_METHODS 
+ *  - The code generated by ICOM_DEFINE defines both the structure representing the interface and
+ *    the structure for the jump table. ICOM_DEFINE uses the parent's Xxx_IMETHODS macro to
+ *    automatically repeat the prototypes of all the inherited methods and then uses IDirect3D_METHODS
  *    to define the IDirect3D methods.
- *  - Each method is declared as a pointer to function field in the jump table. The implementation 
- *    will fill this jump table with appropriate values, probably using a static variable, and 
+ *  - Each method is declared as a pointer to function field in the jump table. The implementation
+ *    will fill this jump table with appropriate values, probably using a static variable, and
  *    initialize the lpVtbl field to point to this variable.
- *  - The IDirect3D_Xxx macros then just derefence the lpVtbl pointer and use the function pointer 
- *    corresponding to the macro name. This emulates the behavior of a virtual table and should be 
+ *  - The IDirect3D_Xxx macros then just derefence the lpVtbl pointer and use the function pointer
+ *    corresponding to the macro name. This emulates the behavior of a virtual table and should be
  *    just as fast.
- *  - This C code should be quite compatible with the Windows headers both for code that uses COM 
+ *  - This C code should be quite compatible with the Windows headers both for code that uses COM
  *    interfaces and for code implementing a COM interface.
  *
  *
@@ -245,31 +245,31 @@
  *        private:  HRESULT (*FindDevice)(IDirect3D* me, LPD3DFINDDEVICESEARCH a, LPD3DFINDDEVICERESULT b);
  *        public: inline HRESULT FindDevice(LPD3DFINDDEVICESEARCH a, LPD3DFINDDEVICERESULT b)
  *            { return ((IDirect3D*)t.lpVtbl)->FindDevice(this,a,b); };
- *    }; 
+ *    };
  *
  * Comments:
- *  - In C++ IDirect3D does double duty as both the virtual/jump table and as the interface 
- *    definition. The reason for this is to avoid having to duplicate the mehod definitions: once 
- *    to have the function pointers in the jump table and once to have the methods in the interface 
- *    class. Here one macro can generate both. This means though that the first pointer, t.lpVtbl 
- *    defined in IUnknown,  must be interpreted as the jump table pointer if we interpret the 
- *    structure as the the interface class, and as the function pointer to the QueryInterface 
- *    method, t.QueryInterface, if we interpret the structure as the jump table. Fortunately this 
+ *  - In C++ IDirect3D does double duty as both the virtual/jump table and as the interface
+ *    definition. The reason for this is to avoid having to duplicate the mehod definitions: once
+ *    to have the function pointers in the jump table and once to have the methods in the interface
+ *    class. Here one macro can generate both. This means though that the first pointer, t.lpVtbl
+ *    defined in IUnknown,  must be interpreted as the jump table pointer if we interpret the
+ *    structure as the the interface class, and as the function pointer to the QueryInterface
+ *    method, t.QueryInterface, if we interpret the structure as the jump table. Fortunately this
  *    gymnastic is entirely taken care of in the header of IUnknown.
- *  - Of course in C++ we use inheritance so that we don't have to duplicate the method definitions. 
- *  - Since IDirect3D does double duty, each ICOM_METHOD macro defines both a function pointer and 
- *    a non-vritual inline method which dereferences it and calls it. This way this method behaves 
- *    just like a virtual method but does not create a true C++ virtual table which would break the 
- *    structure layout. If you look at the implementation of these methods you'll notice that they 
- *    would not work for void functions. We have to return something and fortunately this seems to 
+ *  - Of course in C++ we use inheritance so that we don't have to duplicate the method definitions.
+ *  - Since IDirect3D does double duty, each ICOM_METHOD macro defines both a function pointer and
+ *    a non-vritual inline method which dereferences it and calls it. This way this method behaves
+ *    just like a virtual method but does not create a true C++ virtual table which would break the
+ *    structure layout. If you look at the implementation of these methods you'll notice that they
+ *    would not work for void functions. We have to return something and fortunately this seems to
  *    be what all the COM methods do (otherwise we would need another set of macros).
- *  - Note how the ICOM_METHOD generates both function prototypes mixing types and formal parameter 
- *    names and the method invocation using only the formal parameter name. This is the reason why 
+ *  - Note how the ICOM_METHOD generates both function prototypes mixing types and formal parameter
+ *    names and the method invocation using only the formal parameter name. This is the reason why
  *    we need different macros to handle different numbers of parameters.
- *  - Finally there is no IDirect3D_Xxx macro. These are not needed in C++ unless the CINTERFACE 
+ *  - Finally there is no IDirect3D_Xxx macro. These are not needed in C++ unless the CINTERFACE
  *    macro is defined in which case we would not be here.
- *  - This C++ code works well for code that just uses COM interfaces. But it will not work with 
- *    C++ code implement a COM interface. That's because such code assumes the interface methods 
+ *  - This C++ code works well for code that just uses COM interfaces. But it will not work with
+ *    C++ code implement a COM interface. That's because such code assumes the interface methods
  *    are declared as virtual C++ methods which is not the case here.
  *
  *
@@ -305,12 +305,12 @@
  *    };
  *
  * Comments:
- *  - We first define what the interface really contains. This is th e_IDirect3D structure. The 
+ *  - We first define what the interface really contains. This is th e_IDirect3D structure. The
  *    first field must of course be the virtual table pointer. Everything else is free.
- *  - Then we predeclare our static virtual table variable, we will need its address in some 
+ *  - Then we predeclare our static virtual table variable, we will need its address in some
  *    methods to initialize the virtual table pointer of the returned interface objects.
- *  - Then we implement the interface methods. To match what has been declared in the header file 
- *    they must take a pointer to a IDirect3D structure and we must cast it to an _IDirect3D so that 
+ *  - Then we implement the interface methods. To match what has been declared in the header file
+ *    they must take a pointer to a IDirect3D structure and we must cast it to an _IDirect3D so that
  *    we can manipulate the fields. This is performed by the ICOM_THIS macro.
  *  - Finally we initialize the virtual table.
  */
@@ -663,7 +663,7 @@
 struct IUnknown {
     ICOM_VFIELD(IUnknown);
 #if defined(ICOM_USE_COM_INTERFACE_ATTRIBUTE)
-} __attribute__ ((com_interface)); 
+} __attribute__ ((com_interface));
 #else
 };
 #endif /* ICOM_US_COM_INTERFACE_ATTRIBUTE */
@@ -683,7 +683,7 @@
     ICOM_METHOD (ULONG,AddRef)
     ICOM_METHOD (ULONG,Release)
 #if defined(ICOM_USE_COM_INTERFACE_ATTRIBUTE)
-} __attribute__ ((com_interface)); 
+} __attribute__ ((com_interface));
 #else
 };
 #endif /* ICOM_US_COM_INTERFACE_ATTRIBUTE */
@@ -821,7 +821,7 @@
 HRESULT WINAPI CoRevokeClassObject(DWORD dwRegister);
 
 HRESULT WINAPI CoGetPSClsid(REFIID riid,CLSID *pclsid);
-                    
+
 /*****************************************************************************
  *	COM Server dll - exports
  */
diff --git a/include/wine/obj_cache.h b/include/wine/obj_cache.h
index f29d50f..6bf5ce8 100644
--- a/include/wine/obj_cache.h
+++ b/include/wine/obj_cache.h
@@ -71,7 +71,7 @@
 #define IOleCache_EnumCache(p,a)             ICOM_CALL1(EnumCache,p,a)
 #define IOleCache_InitCache(p,a)             ICOM_CALL1(InitCache,p,a)
 #define IOleCache_SetData(p,a,b,c)           ICOM_CALL3(SetData,p,a,b,c)
-				 
+
 
 /*****************************************************************************
  * IOleCache2 interface
diff --git a/include/wine/obj_comcat.h b/include/wine/obj_comcat.h
index bc3e45c..203197c 100644
--- a/include/wine/obj_comcat.h
+++ b/include/wine/obj_comcat.h
@@ -61,7 +61,7 @@
 DEFINE_GUID(CATID_PersistsToPropertyBag,	  0x0DE86A57, 0x2BAA, 0x11CF, 0xA2, 0x29, 0x00, 0xAA, 0x00, 0x3D, 0x73, 0x52);
 DEFINE_GUID(CATID_InternetAware,		  0x0DE86A58, 0x2BAA, 0x11CF, 0xA2, 0x29, 0x00, 0xAA, 0x00, 0x3D, 0x73, 0x52);
 DEFINE_GUID(CATID_DesignTimeUIActivatableControl, 0xF2BB56D1, 0xDB07, 0x11D1, 0xAA, 0x6B, 0x00, 0x60, 0x97, 0xDB, 0x95, 0x39);
- 
+
 /*****************************************************************************
  * Aliases for EnumGUID
  */
diff --git a/include/wine/obj_connection.h b/include/wine/obj_connection.h
index b2f8d85..5f761ce 100644
--- a/include/wine/obj_connection.h
+++ b/include/wine/obj_connection.h
@@ -36,7 +36,7 @@
 				  IUnknown *pUnk;
 					  DWORD dwCookie;
 } CONNECTDATA, *LPCONNECTDATA;
- 
+
 /*****************************************************************************
  * Predeclare the interfaces
  */
@@ -151,7 +151,7 @@
 #define IEnumConnectionPoints_Skip(p,a)                  ICOM_CALL1(Skip,p,a)
 #define IEnumConnectionPoints_Reset(p)                   ICOM_CALL (Reset,p)
 #define IEnumConnectionPoints_Clone(p,a)                 ICOM_CALL1(Clone,p,a)
-				
+
 #ifdef __cplusplus
 } /* extern "C" */
 #endif /* defined(__cplusplus) */
diff --git a/include/wine/obj_contextmenu.h b/include/wine/obj_contextmenu.h
index 9493120..2ccedaa 100644
--- a/include/wine/obj_contextmenu.h
+++ b/include/wine/obj_contextmenu.h
@@ -3,7 +3,7 @@
  *
  * Undocumented:
  * word95 gets a IContextMenu Interface and calls HandleMenuMsg()
- * which should only a member of IContextMenu2. 
+ * which should only a member of IContextMenu2.
  *
  * Copyright (C) 1999 Juergen Schmied
  *
@@ -79,7 +79,7 @@
 #define CMIC_MASK_PTINVOKE      0x20000000
 
 /*NOTE: When SEE_MASK_HMONITOR is set, hIcon is treated as hMonitor */
-typedef struct tagCMINVOKECOMMANDINFO 
+typedef struct tagCMINVOKECOMMANDINFO
 {	DWORD cbSize;        /* sizeof(CMINVOKECOMMANDINFO) */
 	DWORD fMask;         /* any combination of CMIC_MASK_* */
 	HWND hwnd;         /* might be NULL (indicating no owner window) */
@@ -92,7 +92,7 @@
 	HANDLE hIcon;
 } CMINVOKECOMMANDINFO,  *LPCMINVOKECOMMANDINFO;
 
-typedef struct tagCMInvokeCommandInfoEx 
+typedef struct tagCMInvokeCommandInfoEx
 {	DWORD cbSize;        /* must be sizeof(CMINVOKECOMMANDINFOEX) */
 	DWORD fMask;         /* any combination of CMIC_MASK_* */
 	HWND hwnd;         /* might be NULL (indicating no owner window) */
diff --git a/include/wine/obj_control.h b/include/wine/obj_control.h
index b40c21b..e4a4791 100644
--- a/include/wine/obj_control.h
+++ b/include/wine/obj_control.h
@@ -45,7 +45,7 @@
 	READYSTATE_INTERACTIVE  = 3,
 	READYSTATE_COMPLETE = 4
 } READYSTATE;
-																 
+
 typedef struct tagExtentInfo
 {
 	ULONG cb;
@@ -118,7 +118,7 @@
 	DVASPECT_TRANSPARENT = 32
 } DVASPECT2;
 
-typedef enum tagHITRESULT 
+typedef enum tagHITRESULT
 {
 	HITRESULT_OUTSIDE = 0,
 	HITRESULT_TRANSPARENT = 1,
@@ -168,13 +168,13 @@
 
 DEFINE_GUID(IID_IViewObjectEx, 0x00000000, 0x0000, 0x0000, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00); /* FIXME need GUID */
 typedef struct IViewObjectEx IViewObjectEx, *LPVIEWOBJECTEX;
- 
+
 DEFINE_GUID(IID_IProvideClassInfo, 0xb196b283, 0xbab4, 0x101a, 0xb6, 0x9c, 0x00, 0xaa, 0x00, 0x34, 0x1d, 0x07);
 typedef struct IProvideClassInfo IProvideClassInfo, *LPPROVIDECLASSINFO;
- 
+
 DEFINE_GUID(IID_IProvideClassInfo2, 0xa6bc3ac0, 0xdbaa, 0x11ce, 0x9d, 0xe3, 0x00, 0xaa, 0x00, 0x4b, 0xb8, 0x51);
 typedef struct IProvideClassInfo2 IProvideClassInfo2, *LPPROVIDECLASSINFO2;
- 
+
 /*****************************************************************************
  * IOleControl interface
  */
@@ -199,12 +199,12 @@
 #define IOleControl_OnMnemonic(p,a)              ICOM_CALL1(OnMnemonic,p,a)
 #define IOleControl_OnAmbientPropertyChange(p,a) ICOM_CALL1(OnAmbientPropertyChange,p,a)
 #define IOleControl_FreezeEvents(p,a)            ICOM_CALL1(FreezeEvents,p,a)
-				
+
 
 /*****************************************************************************
  * IOleControlSite interface
  */
-#define ICOM_INTERFACE IOleControlSite 
+#define ICOM_INTERFACE IOleControlSite
 #define IOleControlSite_METHODS \
 	ICOM_METHOD (HRESULT,OnControlInfoChanged) \
 	ICOM_METHOD1(HRESULT,LockInPlaceActive, BOOL,fLock) \
@@ -231,8 +231,8 @@
 #define IOleControlSite_TranslateAccelerator(p,a,b)  ICOM_CALL1(TranslateAccelerator,p,a,b)
 #define IOleControlSite_OnFocus(p,a)                 ICOM_CALL1(OnFocus,p,a)
 #define IOleControlSite_ShowPropertyFrame(p)         ICOM_CALL1(ShowPropertyFrame,p)
-				
-				
+
+
 /*****************************************************************************
  * IOleInPlaceSiteEx interface
  */
@@ -269,7 +269,7 @@
 #define IOleInPlaceSiteEx_OnInPlaceActivateEx(p,a,b) ICOM_CALL2(OnInPlaceActivateEx,p,a,b)
 #define IOleInPlaceSiteEx_OnInPlaceDeactivateEx(p,a) ICOM_CALL1(OnInPlaceDeactivateEx,p,a)
 #define IOleInPlaceSiteEx_RequestUIActivate(p)       ICOM_CALL (RequestUIActivate,p)
-				 
+
 
 /*****************************************************************************
  * IOleInPlaceSiteWindowless interface
@@ -355,7 +355,7 @@
 /*** IOleInPlaceObjectWindowless methods ***/
 #define IOleInPlaceObjectWindowless_OnWindowMessage(p,a,b,c,d) ICOM_CALL4(OnWindowMessage,p,a,b,c,d)
 #define IOleInPlaceObjectWindowless_GetDropTarget(p,a)         ICOM_CALL1(GetDropTarget,p,a)
-				 
+
 
 /*****************************************************************************
  * IClassFactory2 interface
@@ -430,7 +430,7 @@
 
 #define ICOM_INTERFACE IProvideClassInfo
 #define IProvideClassInfo_METHODS \
-	ICOM_METHOD1(HRESULT,GetClassInfo, ITypeInfo**,ppTI) 
+	ICOM_METHOD1(HRESULT,GetClassInfo, ITypeInfo**,ppTI)
 #define IProvideClassInfo_IMETHODS \
 	IUnknown_IMETHODS \
 	IProvideClassInfo_METHODS
@@ -445,7 +445,7 @@
 #define IProvideClassInfo_GetClassInfo(p,a)            ICOM_CALL1(GetClassInfo,p,a)
 
 
-				
+
 /*****************************************************************************
  * IProvideClassInfo2 interface
  */
@@ -463,7 +463,7 @@
 #define IProvideClassInfo2_AddRef(p)               ICOM_CALL (AddRef,p)
 #define IProvideClassInfo2_Release(p)              ICOM_CALL (Release,p)
 /*** IProvideClassInfo methods ***/
-#define IProvideClassInfo2_GetClassInfo(p,a)       ICOM_CALL1(GetClassInfo,p,a) 
+#define IProvideClassInfo2_GetClassInfo(p,a)       ICOM_CALL1(GetClassInfo,p,a)
 /*** IProvideClassInfo2 methods ***/
 #define IProvideClassInfo2_GetGUID(p,a,b)          ICOM_CALL2(GetGUID,p,a,b)
 
diff --git a/include/wine/obj_dataobject.h b/include/wine/obj_dataobject.h
index 21b01a1..a46778f 100644
--- a/include/wine/obj_dataobject.h
+++ b/include/wine/obj_dataobject.h
@@ -33,7 +33,7 @@
 	DATADIR_GET = 1,
 	DATADIR_SET = 2
 } DATADIR;
- 
+
 typedef struct DVTARGETDEVICE16 DVTARGETDEVICE16, *LPDVTARGETDEVICE16;
 typedef struct DVTARGETDEVICE DVTARGETDEVICE, *LPDVTARGETDEVICE;
 
@@ -107,7 +107,7 @@
 	TYMED_ENHMF     = 64,
 	TYMED_NULL      = 0
 } TYMED;
-  
+
 typedef struct tagRemSTGMEDIUM
 {
 	DWORD tymed;
@@ -132,7 +132,7 @@
         IStorage *pstg;
     } DUMMYUNIONNAME;
     IUnknown *pUnkForRelease;
-};   
+};
 
 typedef enum tagADVF
 {
diff --git a/include/wine/obj_inplace.h b/include/wine/obj_inplace.h
index fe877c0..663d5d4 100644
--- a/include/wine/obj_inplace.h
+++ b/include/wine/obj_inplace.h
@@ -1,6 +1,6 @@
 /*
  * Defines the COM interfaces and APIs related to structured data storage.
- * 
+ *
  * Depends on 'obj_base.h'.
  *
  * Copyright (C) 1999 Paul Quinn
@@ -90,7 +90,7 @@
 	DWORD fuFlags;
 	DWORD grfAttribs;
 } OLEVERB, *LPOLEVERB;
-	
+
 typedef enum tagOLELINKBIND
 {
 	OLELINKBIND_EVENIFCLASSDIFF = 1
@@ -118,12 +118,12 @@
 	OLECONTF_OLNYUSER = 8,
 	OLECONTF_ONLYIFRUNNING = 16
 } OLECONTF;
- 
+
 typedef HGLOBAL HOLEMENU;
 typedef LPRECT LPBORDERWIDTHS;
 typedef LPCRECT LPCBORDERWIDTHS;
-	
-	
+
+
 /*****************************************************************************
  * Predeclare the interfaces
  */
@@ -267,7 +267,7 @@
 #define IOleInPlaceUIWindow_RequestBorderSpace(p,a)   ICOM_CALL1(RequestBorderSpace,p,a)
 #define IOleInPlaceUIWindow_SetBorderSpace(p,a)       ICOM_CALL1(SetBorderSpace,p,a)
 #define IOleInPlaceUIWindow_SetActiveObject(p,a,b)    ICOM_CALL2(SetActiveObject,p,a,b)
-				  
+
 
 /*****************************************************************************
  * IOleInPlaceFrame interface
@@ -305,7 +305,7 @@
 #define IOleInPlaceFrame_SetStatusText            ICOM_CALL1(SetStatusText,p,a)
 #define IOleInPlaceFrame_EnableModeless           ICOM_CALL1(EnableModeless,p,a)
 #define IOleInPlaceFrame_TranslateAccelerator     ICOM_CALL2(TranslateAccelerator,p,a,b)
-				 
+
 
 /*****************************************************************************
  * IOleInPlaceSite interface
@@ -389,15 +389,15 @@
 	IParseDisplayName_METHODS
 ICOM_DEFINE(IParseDisplayName,IUnknown)
 #undef ICOM_INTERFACE
-				
+
 /*** IUnknown methods ***/
 #define IParseDisplayName_QueryInterface(p,a,b)      ICOM_CALL2(QueryInterface,p,a,b)
 #define IParseDisplayName_AddRef(p)                  ICOM_CALL (AddRef,p)
 #define IParseDisplayName_Release(p)                 ICOM_CALL (Release,p)
 /*** IParseDisplayName methods ***/
 #define IParseDisplayName_ParseDisplayName(p,a,b,c,d) ICOM_CALL4(ParseDisplayName,p,a,b,c,d)
-				 
-				
+
+
 /*****************************************************************************
  * IOleContainer interface
  */
diff --git a/include/wine/obj_marshal.h b/include/wine/obj_marshal.h
index 4d442ec..74e3ef7 100644
--- a/include/wine/obj_marshal.h
+++ b/include/wine/obj_marshal.h
@@ -1,5 +1,5 @@
 /*
- * Defines the COM interfaces and APIs that allow an interface to 
+ * Defines the COM interfaces and APIs that allow an interface to
  * specify a custom marshaling for its objects.
  *
  * Copyright (C) 1999 Francois Gouget
diff --git a/include/wine/obj_misc.h b/include/wine/obj_misc.h
index c79ec32..19719f3 100644
--- a/include/wine/obj_misc.h
+++ b/include/wine/obj_misc.h
@@ -1,7 +1,7 @@
 /*
  * Defines miscellaneous COM interfaces and APIs defined in objidl.h.
- * These did not really fit into the other categories, whould have 
- * required their own specific category or are too rarely used to be 
+ * These did not really fit into the other categories, whould have
+ * required their own specific category or are too rarely used to be
  * put in 'obj_base.h'.
  *
  * Copyright (C) the Wine project
@@ -188,9 +188,9 @@
 /* FIXME: unimplemented */
 HRESULT WINAPI CoTreatAsClass(REFCLSID clsidOld, REFCLSID clsidNew);
 
-HRESULT WINAPI CoCreateInstanceEx(REFCLSID      rclsid, 
+HRESULT WINAPI CoCreateInstanceEx(REFCLSID      rclsid,
 				  LPUNKNOWN     pUnkOuter,
-				  DWORD         dwClsContext, 
+				  DWORD         dwClsContext,
 				  COSERVERINFO* pServerInfo,
 				  ULONG         cmq,
 				  MULTI_QI*     pResults);
diff --git a/include/wine/obj_oleaut.h b/include/wine/obj_oleaut.h
index dc2921b..8bfc8e1 100644
--- a/include/wine/obj_oleaut.h
+++ b/include/wine/obj_oleaut.h
@@ -71,7 +71,7 @@
  */
 
 /*****************************************************************
- *  SafeArray defines and structs 
+ *  SafeArray defines and structs
  */
 
 #define FADF_AUTO        ( 0x1 )
@@ -87,18 +87,18 @@
 #define FADF_VARIANT     ( 0x800 )
 #define FADF_RESERVED    ( 0xf008 )
 
-/* Undocumented flags */                                                                                  
-#define FADF_CREATEVECTOR ( 0x2000 ) /* set when the safe array is created using SafeArrayCreateVector */ 
+/* Undocumented flags */
+#define FADF_CREATEVECTOR ( 0x2000 ) /* set when the safe array is created using SafeArrayCreateVector */
 
 
-typedef struct  tagSAFEARRAYBOUND 
+typedef struct  tagSAFEARRAYBOUND
 {
   ULONG cElements;                  /* Number of elements in dimension */
   LONG  lLbound;                    /* Lower bound of dimension */
 } SAFEARRAYBOUND;
 
 typedef struct  tagSAFEARRAY
-{ 
+{
   USHORT          cDims;            /* Count of array dimension */
   USHORT          fFeatures;        /* Flags describing the array */
   ULONG           cbElements;       /* Size of each element */
@@ -241,7 +241,7 @@
   UINT      cNamedArgs;
 } DISPPARAMS;
 
-typedef struct tagEXCEPINFO 
+typedef struct tagEXCEPINFO
 {
     WORD  wCode;
     WORD  wReserved;
@@ -290,7 +290,7 @@
 	} DUMMYUNIONNAME;
 	VARTYPE vt;
 } TYPEDESC;
- 
+
 typedef struct tagELEMDESC
 {
 	TYPEDESC tdesc;
@@ -658,7 +658,7 @@
 #define ITypeInfo_ReleaseTypeAttr(p,a)          ICOM_CALL1(ReleaseTypeAttr,p,a)
 #define ITypeInfo_ReleaseFuncDesc(p,a)          ICOM_CALL1(ReleaseFuncDesc,p,a)
 #define ITypeInfo_ReleaseVarDesc(p,a)           ICOM_CALL1(ReleaseVarDesc,p,a)
-				  
+
 
 /*****************************************************************************
  * ITypeInfo2 interface
@@ -696,10 +696,10 @@
 #define ITypeInfo2_IMETHODS \
 	IUnknown_IMETHODS \
 	ITypeInfo_METHODS \
-	ITypeInfo2_METHODS 
+	ITypeInfo2_METHODS
 ICOM_DEFINE(ITypeInfo2,ITypeInfo)
 #undef ICOM_INTERFACE
-	
+
 /*** IUnknown methods ***/
 #define ITypeInfo2_QueryInterface(p,a,b)         ICOM_CALL2(QueryInterface,p,a,b)
 #define ITypeInfo2_AddRef(p)                     ICOM_CALL (AddRef,p)
@@ -822,7 +822,7 @@
 #define ICOM_INTERFACE ITypeComp
 #define ITypeComp_METHODS \
 	ICOM_METHOD6(HRESULT,Bind, LPOLESTR,szName, ULONG,lHashVal, WORD,wFlags, ITypeInfo**,ppTInfo, DESCKIND*,pDescKind, BINDPTR*,pBindPtr) \
-	ICOM_METHOD4(HRESULT,BindType, LPOLESTR,szName, ULONG,lHashVal, ITypeInfo**,ppTInfo, ITypeComp**,ppTComp) 
+	ICOM_METHOD4(HRESULT,BindType, LPOLESTR,szName, ULONG,lHashVal, ITypeInfo**,ppTInfo, ITypeComp**,ppTComp)
 #define ITypeComp_IMETHODS \
 	IUnknown_IMETHODS \
 	ITypeComp_METHODS
@@ -836,7 +836,7 @@
 /*** ITypeComp methods ***/
 #define ITypeComp_Bind(p,a,b,c,d,e,f)           ICOM_CALL6(Bind,p,a,b,c,d,e,f)
 #define ITypeComp_BindType(p,a,b,c,d)           ICOM_CALL4(BindType,p,a,b,c,d)
-				 
+
 /*****************************************************************************
  * IEnumVARIANT interface
  */
@@ -845,7 +845,7 @@
 	ICOM_METHOD3(HRESULT,Next, ULONG,celt, VARIANT*,rgVar, ULONG*,pCeltFetched) \
 	ICOM_METHOD1(HRESULT,Skip, ULONG,celt) \
 	ICOM_METHOD (HRESULT,Reset) \
-	ICOM_METHOD1(HRESULT,Clone, IEnumVARIANT**,ppEnum) 
+	ICOM_METHOD1(HRESULT,Clone, IEnumVARIANT**,ppEnum)
 #define IEnumVARIANT_IMETHODS \
 	IUnknown_IMETHODS \
 	IEnumVARIANT_METHODS
@@ -861,6 +861,6 @@
 #define IEnumVARIANT_Skip(p,a)               ICOM_CALL1(Skip,p,a)
 #define IEnumVARIANT_Reset(p)                ICOM_CALL (Reset,p)
 #define IEnumVARIANT_Clone(p,a)              ICOM_CALL1(Clone,p,a)
-				 
+
 #endif /* __WINE_WINE_OBJ_OLEAUT_H */
 
diff --git a/include/wine/obj_olefont.h b/include/wine/obj_olefont.h
index 2761d12..14456e4 100644
--- a/include/wine/obj_olefont.h
+++ b/include/wine/obj_olefont.h
@@ -66,7 +66,7 @@
   ICOM_METHOD1(HRESULT, QueryTextMetrics, TEXTMETRICOLE*, ptm) \
   ICOM_METHOD1(HRESULT, AddRefHfont, HFONT, hfont) \
   ICOM_METHOD1(HRESULT, ReleaseHfont, HFONT, hfont) \
-  ICOM_METHOD1(HRESULT, SetHdc, HDC, hdc)     
+  ICOM_METHOD1(HRESULT, SetHdc, HDC, hdc)
 #define IFont_IMETHODS \
 	IUnknown_IMEHTODS \
 	IFont_METHODS
@@ -108,7 +108,7 @@
  * IFont interface
  */
 #define ICOM_INTERFACE IFontDisp
-#define IFontDisp_METHODS 
+#define IFontDisp_METHODS
 #define IFontDisp_IMETHODS \
   IUnknown_IMETHODS \
 	IFontDisp_METHODS
diff --git a/include/wine/obj_oleobj.h b/include/wine/obj_oleobj.h
index 5727142..9a351db 100644
--- a/include/wine/obj_oleobj.h
+++ b/include/wine/obj_oleobj.h
@@ -1,6 +1,6 @@
 /*
  * Defines IOleObject COM and other oleidl.h interfaces
- * 
+ *
  * Depends on 'obj_base.h'.
  *
  * Copyright (C) 1999 Paul Quinn
@@ -44,7 +44,7 @@
 	DWORD dwFullUserTypeName;
 	DWORD dwSrcOfCopy;
 } OBJECTDESCRIPTOR, *LPOBJECTDESCRIPTOR;
-	
+
 typedef enum tagOLEMISC
 {
 	OLEMISC_RECOMPOSEONRESIZE = 0x1,
@@ -88,7 +88,7 @@
 
 DEFINE_OLEGUID(IID_IEnumOLEVERB,  0x00000104L, 0, 0);
 typedef struct IEnumOLEVERB IEnumOLEVERB, *LPENUMOLEVERB;
-  
+
 /*****************************************************************************
  * IOleObject interface
  */
@@ -120,7 +120,7 @@
 	IOleObject_METHODS
 ICOM_DEFINE(IOleObject,IUnknown)
 #undef ICOM_INTERFACE
-				 
+
 /*** IUnknown methods ***/
 #define IOleObject_QueryInterface(p,a,b)      ICOM_CALL2(QueryInterface,p,a,b)
 #define IOleObject_AddRef(p)                  ICOM_CALL (AddRef,p)
@@ -147,7 +147,7 @@
 #define IOleObject_EnumAdvise(p,a,b)        ICOM_CALL1(EnumAdvise,p,a)
 #define IOleObject_GetMiscStatus(p,a,b)     ICOM_CALL2(GetMiscStatus,p,a,b)
 #define IOleObject_SetColorScheme(p,a,b)    ICOM_CALL1(SetColorScheme,p,a)
-				 
+
 
 /*****************************************************************************
  * IOleAdviseHolder interface
@@ -177,7 +177,7 @@
 #define IOleAdviseHolder_SendOnRename(p,a)          ICOM_CALL1(SendOnRename,p,a)
 #define IOleAdviseHolder_SendOnSave(p)              ICOM_CALL (SendOnSave,p)
 #define IOleAdviseHolder_SendOnClose(p)             ICOM_CALL (SendOnClose,p)
-				 
+
 
 /*****************************************************************************
  *  IEnumOLEVERB interface
@@ -207,6 +207,6 @@
 #ifdef __cplusplus
 } /* extern "C" */
 #endif /* defined(__cplusplus) */
-				  
+
 #endif /* __WINE_WINE_OBJ_OLEOBJ_H */
 
diff --git a/include/wine/obj_oleundo.h b/include/wine/obj_oleundo.h
index db82f82..62930fe 100644
--- a/include/wine/obj_oleundo.h
+++ b/include/wine/obj_oleundo.h
@@ -32,7 +32,7 @@
  */
 DEFINE_GUID(IID_IQuickActivate, 0xcf51ed10, 0x62fe, 0x11cf, 0xbf, 0x86, 0x00, 0xa0, 0xc9, 0x03, 0x48, 0x36);
 typedef struct IQuickActivate IQuickActivate,*LPQUICKACTIVATE;
- 
+
 DEFINE_GUID(IID_IPointerInactive, 0x55980ba0, 0x35aa, 0x11cf, 0xb6, 0x71, 0x00, 0xaa, 0x00, 0x4c, 0xd6, 0xd8);
 typedef struct IPointerInactive IPointerInactive,*LPPOINTERINACTIVE;
 
@@ -127,7 +127,7 @@
 #define IPointerInactive_METHODS \
 	ICOM_METHOD1(HRESULT,GetActivationPolicy, DWORD*,pdwPolicy) \
 	ICOM_METHOD4(HRESULT,OnInactiveMouseMove, LPCRECT,pRectBounds, LONG,x, LONG,y, DWORD,grfKeyState) \
-	ICOM_METHOD5(HRESULT,OnInactiveSetCursor, LPCRECT,pRectBounds, LONG,x, LONG,y, DWORD,dwMouseMsg, BOOL,fSetAlways) 
+	ICOM_METHOD5(HRESULT,OnInactiveSetCursor, LPCRECT,pRectBounds, LONG,x, LONG,y, DWORD,dwMouseMsg, BOOL,fSetAlways)
 #define IPointerInactive_IMETHODS \
 	IUnknown_IMETHODS \
 	IPointerInactive_METHODS
@@ -140,7 +140,7 @@
 #define IPointerInactive_Release(p)            ICOM_CALL (Release,p)
 /*** IPointerInactive methods ***/
 #define IPointerInactive_GetActivationPolicy(p,a)         ICOM_CALL1(GetActivationPolicy,p,a)
-#define IPointerInactive_OnInactiveMoveMouse(p,a,b,c,d)   ICOM_CALL4(OnInactiveMoveMouse,p,a,b,c,d) 
+#define IPointerInactive_OnInactiveMoveMouse(p,a,b,c,d)   ICOM_CALL4(OnInactiveMoveMouse,p,a,b,c,d)
 #define IPointerInactive_OnInactiveSetCursor(p,a,b,c,d,e) ICOM_CALL5(OnInactiveSetCursor,p,a,b,d,e)
 
 
diff --git a/include/wine/obj_oleview.h b/include/wine/obj_oleview.h
index 7efda2b..2f799e2 100644
--- a/include/wine/obj_oleview.h
+++ b/include/wine/obj_oleview.h
@@ -54,7 +54,7 @@
 	ICOM_METHOD4(HRESULT,Freeze, DWORD,dwDrawAspect, LONG,lindex, void*,pvAspect, DWORD*,pdwFreeze) \
 	ICOM_METHOD1(HRESULT,Unfreeze, DWORD,dwFreeze) \
 	ICOM_METHOD3(HRESULT,SetAdvise, DWORD,aspects, DWORD,advf, IAdviseSink*,pAdvSink) \
-	ICOM_METHOD3(HRESULT,GetAdvise, DWORD*,pAspects, DWORD*,pAdvf, IAdviseSink**,ppAdvSink) 
+	ICOM_METHOD3(HRESULT,GetAdvise, DWORD*,pAspects, DWORD*,pAdvf, IAdviseSink**,ppAdvSink)
 #define IViewObject_IMETHODS \
 	IUnknown_IMETHODS \
 	IViewObject_METHODS
@@ -72,7 +72,7 @@
 #define IViewObject_Unfreeze(p,a)                ICOM_CALL1(Unfreeze,p,a)
 #define IViewObject_SetAdvise(p,a,b,c)           ICOM_CALL3(SetAdvise,p,a,b,c)
 #define IViewObject_GetAdvise(p,a,b,c)           ICOM_CALL3(GetAdvise,p,a,b,c)
-				  
+
 
 
 /*****************************************************************************
@@ -80,7 +80,7 @@
  */
 #define ICOM_INTERFACE IViewObject2
 #define IViewObject2_METHODS \
-	ICOM_METHOD4(HRESULT,GetExtent, DWORD,dwDrawAspect, LONG,lindex, DVTARGETDEVICE*,ptd, LPSIZEL,lpsizel) 
+	ICOM_METHOD4(HRESULT,GetExtent, DWORD,dwDrawAspect, LONG,lindex, DVTARGETDEVICE*,ptd, LPSIZEL,lpsizel)
 #define IViewObject2_IMETHODS \
 	IViewObject_IMETHODS \
 	IViewObject2_METHODS
diff --git a/include/wine/obj_picture.h b/include/wine/obj_picture.h
index a555624..90e8d2e 100644
--- a/include/wine/obj_picture.h
+++ b/include/wine/obj_picture.h
@@ -68,7 +68,7 @@
   ICOM_METHOD1(HRESULT,put_KeepOriginalFormat, BOOL,Keep) \
   ICOM_METHOD (HRESULT,PictureChanged) \
   ICOM_METHOD3(HRESULT,SaveAsFile, LPSTREAM,pStream, BOOL,fSaveMemCopy, LONG*,pCbSize) \
-  ICOM_METHOD1(HRESULT,get_Attributes, DWORD*,pDwAttr) 
+  ICOM_METHOD1(HRESULT,get_Attributes, DWORD*,pDwAttr)
 #define IPicture_IMETHODS \
 	IUnknown_IMETHODS \
 	IPicture_METHODS
@@ -100,7 +100,7 @@
  * IPictureDisp interface
  */
 #define ICOM_INTERFACE IPictureDisp
-#define IPictureDisp_METHODS 
+#define IPictureDisp_METHODS
 #define IPictureDisp_IMETHODS \
 				IDispatch_IMETHODS \
 				IPictureDisp_METHODS
diff --git a/include/wine/obj_property.h b/include/wine/obj_property.h
index 4dfc883..516fc3f 100644
--- a/include/wine/obj_property.h
+++ b/include/wine/obj_property.h
@@ -82,9 +82,9 @@
 	DWORD dwType;
 	VARTYPE vt;
 	CLIPFORMAT cfType;
-	DWORD dwHint; 
-	LPOLESTR pstrName; 
-	CLSID clsid; 
+	DWORD dwHint;
+	LPOLESTR pstrName;
+	CLSID clsid;
 } PROPBAG2;
 
 /*****************************************************************************
@@ -110,10 +110,10 @@
 
 DEFINE_GUID(IID_IPersistMemory, 0xbd1ae5e0L, 0xa6ae, 0x11ce, 0xbd, 0x37, 0x50, 0x42, 0x00, 0xc1, 0x00, 0x00);
 typedef struct IPersistMemory IPersistMemory,*LPPERSISTMEMORY;
- 
+
 DEFINE_GUID(IID_IPersistPropertyBag, 0x37d84f60, 0x42cb, 0x11ce, 0x81, 0x35, 0x00, 0xaa, 0x00, 0x4b, 0xb8, 0x51);
 typedef struct IPersistPropertyBag IPersistPropertyBag,*LPPERSISTPROPERTYBAG;
- 
+
 DEFINE_GUID(IID_IPersistPropertyBag2, 0x22f55881, 0x280b, 0x11d0, 0xa8, 0xa9, 0x00, 0xa0, 0xc9, 0x0c, 0x20, 0x04);
 typedef struct IPersistPropertyBag2 IPersistPropertyBag2,*LPPERSISTPROPERTYBAG2;
 
@@ -122,16 +122,16 @@
 
 DEFINE_GUID(IID_IPropertyBag, 0x55272a00L, 0x42cb, 0x11ce, 0x81, 0x35, 0x00, 0xaa, 0x00, 0x4b, 0xb8, 0x51);
 typedef struct IPropertyBag IPropertyBag,*LPPROPERTYBAG;
- 
+
 DEFINE_GUID(IID_IPropertyBag2, 0x22f55882, 0x280b, 0x11d0, 0xa8, 0xa9, 0x00, 0xa0, 0xc9, 0x0c, 0x20, 0x04);
 typedef struct IPropertyBag2 IPropertyBag2,*LPPROPERTYBAG2;
 
 DEFINE_GUID(IID_ISpecifyPropertyPages, 0xb196b28b, 0xbab4, 0x101a, 0xb6, 0x9c, 0x00, 0xaa, 0x00, 0x34, 0x1d, 0x07);
 typedef struct ISpecifyPropertyPages ISpecifyPropertyPages,*LPSPECIFYPROPERTYPAGES;
- 
+
 DEFINE_GUID(IID_IPerPropertyBrowsing, 0xb196b28b, 0xbab4, 0x101a, 0xb6, 0x9c, 0x00, 0xaa, 0x00, 0x34, 0x1d, 0x07);
 typedef struct IPerPropertyBrowsing IPerPropertyBrowsing,*LPPERPROPERTYBROWSING;
- 
+
 
 /*****************************************************************************
  * IPropertPage interface
@@ -148,7 +148,7 @@
  	ICOM_METHOD (HRESULT,IsPageDirty) \
  	ICOM_METHOD (HRESULT,Apply) \
  	ICOM_METHOD1(HRESULT,Help, LPCOLESTR,pszHelpDir) \
- 	ICOM_METHOD1(HRESULT,TranslateAccelerator, MSG*,pMsg) 
+ 	ICOM_METHOD1(HRESULT,TranslateAccelerator, MSG*,pMsg)
 #define IPropertyPage_IMETHODS \
 	IUnknown_IMETHODS \
 	IPropertyPage_METHODS
@@ -171,7 +171,7 @@
 #define IPropertyPage_Apply(p)                  ICOM_CALL (Apply,p)
 #define IPropertyPage_Help(p,a)                 ICOM_CALL1(Help,p,a)
 #define IPropertyPage_TranslateAccelerator(p,a) ICOM_CALL1(TranslateAccelerator,p,a)
-				 
+
 
 /*****************************************************************************
  * IPropertPage2 interface
@@ -203,7 +203,7 @@
 #define IPropertyPage2_TranslateAccelerator(p,a) ICOM_CALL1(TranslateAccelerator,p,a)
 /*** IPropertyPage2 methods ***/
 #define IPropertyPage2_EditProperty(p,a)         ICOM_CALL1(EditProperty,p,a)
-				 
+
 
 /*****************************************************************************
  * IPropertPageSite interface
@@ -218,7 +218,7 @@
 	IUnknown_IMETHODS \
 	IPropertyPageSite_METHODS
 ICOM_DEFINE(IPropertyPageSite,IUnknown)
-#undef ICOM_INTERFACE 
+#undef ICOM_INTERFACE
 
 /*** IUnknown methods ***/
 #define IPropertyPageSite_QueryInterface(p,a,b)     ICOM_CALL2(QueryInterface,p,a,b)
@@ -229,7 +229,7 @@
 #define IPropertyPageSite_GetLocaleID(p,a)          ICOM_CALL1(GetLocaleID,p,a)
 #define IPropertyPageSite_GetPageContainer(p,a)     ICOM_CALL1(GetPageContainer,p,a)
 #define IPropertyPageSite_TranslateAccelerator(p,a) ICOM_CALL1(TranslateAccelerator,p,a)
-						 
+
 
 /*****************************************************************************
  * IPropertyNotifySink interface
@@ -252,14 +252,14 @@
 #define IPropertyNotifySink_OnChanged(p,a)            ICOM_CALL1(OnChanged,p,a)
 #define IPropertyNotifySink_OnRequestEdit(p,a)        ICOM_CALL1(OnRequestEdit,p,a)
 
-				 
+
 /*****************************************************************************
  * IPropertyNotifySink interface
  */
 #define ICOM_INTERFACE ISimpleFrameSite
 #define ISimpleFrameSite_METHODS \
 	ICOM_METHOD6(HRESULT,PreMessageFilter, HWND,hWnd, UINT,msg, WPARAM,wp, LPARAM,lp, LRESULT*,plResult, DWORD*,pwdCookie) \
-	ICOM_METHOD6(HRESULT,PostMessageFilter, HWND,hWnd, UINT,msg, WPARAM,wp, LPARAM,lp, LRESULT*,plResult, DWORD,pwdCookie) 
+	ICOM_METHOD6(HRESULT,PostMessageFilter, HWND,hWnd, UINT,msg, WPARAM,wp, LPARAM,lp, LRESULT*,plResult, DWORD,pwdCookie)
 #define ISimpleFrameSite_IMETHODS \
 	IUnknown_IMETHODS \
 	ISimpleFrameSite_METHODS
@@ -304,7 +304,7 @@
 #define IPersistStreamInit_GetSizeMax(p,a) ICOM_CALL1(GetSizeMax,p,a)
 #define IPersistStreamInit_InitNew(p)      ICOM_CALL (InitNew,p)
 
-				 
+
 /*****************************************************************************
  * IPersistMemory interface
  */
@@ -407,7 +407,7 @@
 #define IErrorLog_Release(p)            ICOM_CALL (Release,p)
 /*** IErrorLog methods ***/
 #define IErrorLog_AddError(p,a,b)       ICOM_CALL2(GetClassID,p,a,b)
-				 
+
 
 /*****************************************************************************
  * IPropertyBag interface
@@ -464,7 +464,7 @@
  */
 #define ICOM_INTERFACE ISpecifyPropertyPages
 #define ISpecifyPropertyPages_METHODS \
-	ICOM_METHOD1(HRESULT,GetPages, CAUUID*,pPages) 
+	ICOM_METHOD1(HRESULT,GetPages, CAUUID*,pPages)
 #define ISpecifyPropertyPages_IMETHODS \
 	IUnknown_IMETHODS \
 	ISpecifyPropertyPages_METHODS
@@ -477,7 +477,7 @@
 #define ISpecifyPropertyPages_Release(p)            ICOM_CALL (Release,p)
 /*** ISpecifyPropertyPages methods ***/
 #define ISpecifyPropertyPages_GetPages(p,a)         ICOM_CALL1(GetPages,p,a)
-				  
+
 
 /*****************************************************************************
  * IPerPropertyBrowsing interface
@@ -487,7 +487,7 @@
 	ICOM_METHOD2(HRESULT,GetDisplayString, DISPID,dispID, BSTR*,pBstr) \
 	ICOM_METHOD2(HRESULT,MapPropertyToPage, DISPID,dispID, CLSID*,pClsid) \
 	ICOM_METHOD3(HRESULT,GetPredefinedStrings, DISPID,dispID, CALPOLESTR*,pCaStringsOut, CADWORD*,pCaCookiesOut) \
-	ICOM_METHOD3(HRESULT,GetPredefinedValue, DISPID,dispID, DWORD,dwCookie, VARIANT*,pVarOut) 
+	ICOM_METHOD3(HRESULT,GetPredefinedValue, DISPID,dispID, DWORD,dwCookie, VARIANT*,pVarOut)
 #define IPerPropertyBrowsing_IMETHODS \
 	IUnknown_IMETHODS \
 	IPerPropertyBrowsing_METHODS
diff --git a/include/wine/obj_propertystorage.h b/include/wine/obj_propertystorage.h
index 451e8bd..bbda9a0 100644
--- a/include/wine/obj_propertystorage.h
+++ b/include/wine/obj_propertystorage.h
@@ -102,7 +102,7 @@
 typedef struct tagPROPSPEC
 {
     ULONG ulKind;
-    union 
+    union
     {
         PROPID propid;
         LPOLESTR lpwstr;
@@ -179,7 +179,7 @@
     ICOM_METHOD1(HRESULT,Clone, IEnumSTATPROPSTG**,ppenum)
 #define IEnumSTATPROPSTG_IMETHODS \
 		IUnknown_IMETHODS \
-		IEnumSTATPROPSTG_METHODS 
+		IEnumSTATPROPSTG_METHODS
 ICOM_DEFINE(IEnumSTATPROPSTG,IUnknown)
 #undef ICOM_INTERFACE
 
@@ -356,9 +356,9 @@
     WORD wReserved1;
     WORD wReserved2;
     WORD wReserved3;
-    union 
+    union
     {
-         /* Empty union arm */ 
+         /* Empty union arm */
         UCHAR bVal;
         short iVal;
         USHORT uiVal;
diff --git a/include/wine/obj_queryassociations.h b/include/wine/obj_queryassociations.h
index 4b66048..ed964dc 100644
--- a/include/wine/obj_queryassociations.h
+++ b/include/wine/obj_queryassociations.h
@@ -54,16 +54,16 @@
 	ASSOCSTR_DDEIFEXEC,
 	ASSOCSTR_DDEAPPLICATION,
 	ASSOCSTR_DDETOPIC,
-	ASSOCSTR_MAX 
+	ASSOCSTR_MAX
 } ASSOCSTR;
 
 typedef enum
 {
 	ASSOCKEY_SHELLEXECCLASS = 1,
-	ASSOCKEY_APP,  
+	ASSOCKEY_APP,
 	ASSOCKEY_CLASS,
 	ASSOCKEY_BASECLASS,
-	ASSOCKEY_MAX   
+	ASSOCKEY_MAX
 } ASSOCKEY;
 
 typedef enum
diff --git a/include/wine/obj_shellfolder.h b/include/wine/obj_shellfolder.h
index 320857a..def4a9c 100644
--- a/include/wine/obj_shellfolder.h
+++ b/include/wine/obj_shellfolder.h
@@ -35,11 +35,11 @@
 
 #define	STRRET_OFFSETA	0x0001
 #define STRRET_OFFSETW	0x0004
-#define STRRET_OFFSET WINELIB_NAME_AW(STRRET_OFFSET) 
+#define STRRET_OFFSET WINELIB_NAME_AW(STRRET_OFFSET)
 
 #define	STRRET_CSTRA	0x0002
 #define STRRET_CSTRW	0x0005
-#define STRRET_CSTR WINELIB_NAME_AW(STRRET_CSTR) 
+#define STRRET_CSTR WINELIB_NAME_AW(STRRET_CSTR)
 
 typedef struct _STRRET
 { UINT uType;		/* STRRET_xxx */
@@ -65,7 +65,7 @@
 DEFINE_GUID(IID_IShellFolder2,  0xB82C5AA8, 0xA41B, 0x11D2, 0xBE, 0x32, 0x0, 0xc0, 0x4F, 0xB9, 0x36, 0x61);
 typedef struct IShellFolder2 IShellFolder2, *LPSHELLFOLDER2;
 
-DEFINE_GUID(IID_IEnumExtraSearch,  0xE700BE1, 0x9DB6, 0x11D1, 0xA1, 0xCE, 0x0, 0xc0, 0x4F, 0xD7, 0x5D, 0x13); 
+DEFINE_GUID(IID_IEnumExtraSearch,  0xE700BE1, 0x9DB6, 0x11D1, 0xA1, 0xCE, 0x0, 0xc0, 0x4F, 0xD7, 0x5D, 0x13);
 typedef struct IEnumExtraSearch IEnumExtraSearch, *LPENUMEXTRASEARCH;
 
 /*****************************************************************************
@@ -107,7 +107,7 @@
 #define IEnumIDList_Clone(p,a)			ICOM_CALL1(Clone,p,a)
 
 /*****************************************************************************
- * IShellFolder::GetDisplayNameOf/SetNameOf uFlags 
+ * IShellFolder::GetDisplayNameOf/SetNameOf uFlags
  */
 typedef enum
 {	SHGDN_NORMAL		= 0,		/* default (display purpose) */
@@ -116,7 +116,7 @@
 } SHGNO;
 
 /*****************************************************************************
- * IShellFolder::EnumObjects 
+ * IShellFolder::EnumObjects
  */
 typedef enum tagSHCONTF
 {	SHCONTF_FOLDERS		= 32,	/* for shell browser */
@@ -125,7 +125,7 @@
 } SHCONTF;
 
 /*****************************************************************************
- * IShellFolder::GetAttributesOf flags 
+ * IShellFolder::GetAttributesOf flags
  */
 #define SFGAO_CANCOPY		DROPEFFECT_COPY /* Objects can be copied */
 #define SFGAO_CANMOVE		DROPEFFECT_MOVE /* Objects can be moved */
@@ -242,7 +242,7 @@
 /* IShellFolder2 */
 
 /* GetDefaultColumnState */
-typedef enum 
+typedef enum
 {
 	SHCOLSTATE_TYPE_STR	= 0x00000001,
 	SHCOLSTATE_TYPE_INT	= 0x00000002,
@@ -274,7 +274,7 @@
 	STRRET	str;
 } SHELLDETAILS, *LPSHELLDETAILS;
 
-#define ICOM_INTERFACE IShellFolder2 
+#define ICOM_INTERFACE IShellFolder2
 #define IShellFolder2_METHODS \
     ICOM_METHOD1( HRESULT, GetDefaultSearchGUID, LPGUID, lpguid)\
     ICOM_METHOD1( HRESULT, EnumSearches, LPENUMEXTRASEARCH *, ppEnum) \
@@ -318,7 +318,7 @@
  */
 
 /* ClassID's */
-DEFINE_GUID (CLSID_SFMyComp,0x20D04FE0,0x3AEA,0x1069,0xA2,0xD8,0x08,0x00,0x2B,0x30,0x30,0x9D); 
+DEFINE_GUID (CLSID_SFMyComp,0x20D04FE0,0x3AEA,0x1069,0xA2,0xD8,0x08,0x00,0x2B,0x30,0x30,0x9D);
 DEFINE_GUID (CLSID_SFINet,  0x871C5380,0x42A0,0x1069,0xA2,0xEA,0x08,0x00,0x2B,0x30,0x30,0x9D);
 DEFINE_GUID (CLSID_SFFile,  0xF3364BA0,0x65B9,0x11CE,0xA9,0xBA,0x00,0xAA,0x00,0x4A,0xE8,0x37);
 
@@ -332,7 +332,7 @@
 #undef ICOM_INTERFACE
 
 /*** IUnknown methods ***/
-#define IPersistFolder_QueryInterface(p,a,b)	ICOM_CALL2(QueryInterface,p,a,b) 
+#define IPersistFolder_QueryInterface(p,a,b)	ICOM_CALL2(QueryInterface,p,a,b)
 #define IPersistFolder_AddRef(p)		ICOM_CALL (AddRef,p)
 #define IPersistFolder_Release(p)		ICOM_CALL (Release,p)
 /*** IPersist methods ***/
@@ -355,7 +355,7 @@
 #undef ICOM_INTERFACE
 
 /*** IUnknown methods ***/
-#define IPersistFolder2_QueryInterface(p,a,b)	ICOM_CALL2(QueryInterface,p,a,b) 
+#define IPersistFolder2_QueryInterface(p,a,b)	ICOM_CALL2(QueryInterface,p,a,b)
 #define IPersistFolder2_AddRef(p)		ICOM_CALL (AddRef,p)
 #define IPersistFolder2_Release(p)		ICOM_CALL (Release,p)
 /*** IPersist methods ***/
diff --git a/include/wine/obj_shelllink.h b/include/wine/obj_shelllink.h
index 4129e97..63d5184 100644
--- a/include/wine/obj_shelllink.h
+++ b/include/wine/obj_shelllink.h
@@ -34,18 +34,18 @@
 typedef struct IShellLinkW IShellLinkW,*LPSHELLLINKW;
 
 /*****************************************************************************
- * 
+ *
  */
-typedef enum 
+typedef enum
 {	SLR_NO_UI	= 0x0001,
 	SLR_ANY_MATCH	= 0x0002,
 	SLR_UPDATE	= 0x0004
 } SLR_FLAGS;
 
 /*****************************************************************************
- * GetPath fFlags 
+ * GetPath fFlags
  */
-typedef enum 
+typedef enum
 {	SLGP_SHORTPATH		= 0x0001,
 	SLGP_UNCPRIORITY	= 0x0002
 } SLGP_FLAGS;
diff --git a/include/wine/obj_shellview.h b/include/wine/obj_shellview.h
index f6a9240..4fcb0dd 100644
--- a/include/wine/obj_shellview.h
+++ b/include/wine/obj_shellview.h
@@ -26,7 +26,7 @@
 #endif /* defined(__cplusplus) */
 
 /****************************************************************************
- * IShellBrowser is here defined because of a cyclic dependance between 
+ * IShellBrowser is here defined because of a cyclic dependance between
  * IShellBrowser and IShellView
  */
 typedef struct IShellBrowser IShellBrowser, *LPSHELLBROWSER;
@@ -72,10 +72,10 @@
 
 #define FCIDM_SHVIEW_BIGICON	0x7029
 #define FCIDM_SHVIEW_SMALLICON	0x702A
-#define FCIDM_SHVIEW_LISTVIEW	0x702B	
+#define FCIDM_SHVIEW_LISTVIEW	0x702B
 #define FCIDM_SHVIEW_REPORTVIEW	0x702C
 /* 0x7030-0x703f are used by the shellbrowser */
-#define FCIDM_SHVIEW_AUTOARRANGE 0x7031  
+#define FCIDM_SHVIEW_AUTOARRANGE 0x7031
 #define FCIDM_SHVIEW_SNAPTOGRID	0x7032
 
 #define FCIDM_SHVIEW_HELP	0x7041
@@ -120,7 +120,7 @@
 #define FCIDM_STATUS       (FCIDM_BROWSERFIRST + 1)
 
 /* uState values for IShellView::UIActivate */
-typedef enum 
+typedef enum
 { SVUIA_DEACTIVATE       = 0,
   SVUIA_ACTIVATE_NOFOCUS = 1,
   SVUIA_ACTIVATE_FOCUS   = 2,
diff --git a/include/wine/unicode.h b/include/wine/unicode.h
index 1d48a98..53cdabf 100644
--- a/include/wine/unicode.h
+++ b/include/wine/unicode.h
@@ -177,7 +177,7 @@
 #endif
 }
 
-static inline WCHAR *strcpyW( WCHAR *dst, const WCHAR *src ) 
+static inline WCHAR *strcpyW( WCHAR *dst, const WCHAR *src )
 {
 #if defined(__i386__) && defined(__GNUC__)
     int dummy1, dummy2, dummy3;
@@ -196,7 +196,7 @@
     return dst;
 }
 
-static inline int strcmpW( const WCHAR *str1, const WCHAR *str2 ) 
+static inline int strcmpW( const WCHAR *str1, const WCHAR *str2 )
 {
     while (*str1 && (*str1 == *str2)) { str1++; str2++; }
     return *str1 - *str2;
@@ -228,13 +228,13 @@
     for ( ; *str; str++) if (*str == ch) return (WCHAR *)str;
     return NULL;
 }
- 
+
 static inline WCHAR *strrchrW( const WCHAR *str, WCHAR ch )
 {
     WCHAR *ret = NULL;
     for ( ; *str; str++) if (*str == ch) ret = (WCHAR *)str;
     return ret;
-}               
+}
 
 static inline WCHAR *strlwrW( WCHAR *str )
 {
diff --git a/include/wine/windef16.h b/include/wine/windef16.h
index 4870c9b..ff36f3a 100644
--- a/include/wine/windef16.h
+++ b/include/wine/windef16.h
@@ -47,7 +47,7 @@
 	typedef HANDLE16 a##16; \
 	typedef a##16 *P##a##16; \
 	typedef a##16 *NP##a##16; \
-	typedef a##16 *LP##a##16 
+	typedef a##16 *LP##a##16
 
 DECLARE_HANDLE16(HACMDRIVERID);
 DECLARE_HANDLE16(HACMDRIVER);
diff --git a/include/wine/wingdi16.h b/include/wine/wingdi16.h
index 2e97696..dc9afd4 100644
--- a/include/wine/wingdi16.h
+++ b/include/wine/wingdi16.h
@@ -47,7 +47,7 @@
 } BITMAP16, *LPBITMAP16;
 
 typedef struct
-{ 
+{
     UINT16     lbStyle;
     COLORREF   lbColor;
     INT16      lbHatch;
@@ -86,7 +86,7 @@
   BYTE       elfScript[LF_FACESIZE];
 } ENUMLOGFONTEX16, *LPENUMLOGFONTEX16;
 
-typedef struct 
+typedef struct
 {
     INT16  txfHeight;
     INT16  txfWidth;
@@ -259,7 +259,7 @@
 
 typedef struct
 {
-    UINT16   lopnStyle; 
+    UINT16   lopnStyle;
     POINT16  lopnWidth;
     COLORREF lopnColor;
 } LOGPEN16, *LPLOGPEN16;
@@ -308,7 +308,7 @@
 
 typedef INT16 (CALLBACK *MFENUMPROC16)(HDC16,HANDLETABLE16*,METARECORD*,
                                        INT16,LPARAM);
-typedef struct 
+typedef struct
 {
     INT16    cbSize;
     SEGPTR   lpszDocName;
diff --git a/include/wine/winnet16.h b/include/wine/winnet16.h
index f882451..63d08ce 100644
--- a/include/wine/winnet16.h
+++ b/include/wine/winnet16.h
@@ -1,4 +1,4 @@
-/* 
+/*
  * Definitions for windows network service
  *
  * Copyright 1997 Andreas Mohr
@@ -31,7 +31,7 @@
  * Remote printing
  */
 
-typedef struct 
+typedef struct
 {
     WORD    pqName;
     WORD    pqComment;
@@ -47,7 +47,7 @@
 #define WNPRQ_PENDING   0x3
 #define WNPRQ_PROBLEM   0x4
 
-typedef struct 
+typedef struct
 {
     WORD    pjId;
     WORD    pjUsername;
diff --git a/include/wine/winuser16.h b/include/wine/winuser16.h
index 794a035..9151cdc 100644
--- a/include/wine/winuser16.h
+++ b/include/wine/winuser16.h
@@ -21,7 +21,7 @@
 
 #include "wine/wingdi16.h" /* wingdi.h needed for COLORREF */
 #include "winuser.h" /* winuser.h needed for MSGBOXCALLBACK */
-                     
+
 #include "pshpack1.h"
 
 typedef struct tagCOMSTAT16
@@ -299,7 +299,7 @@
     BYTE    rgbReserved[16];
 } PAINTSTRUCT16, *LPPAINTSTRUCT16;
 
-typedef struct 
+typedef struct
 {
     HMENU16   hWindowMenu;
     UINT16    idFirstChild;
diff --git a/include/wine_gl.h b/include/wine_gl.h
index c2b2c40..555272e 100644
--- a/include/wine_gl.h
+++ b/include/wine_gl.h
@@ -22,9 +22,9 @@
 #ifndef __WINE_WINE_GL_H
 #define __WINE_WINE_GL_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
 
 #if defined(HAVE_OPENGL)
 
diff --git a/include/winerror.h b/include/winerror.h
index 0814797..21eb8af 100644
--- a/include/winerror.h
+++ b/include/winerror.h
@@ -1494,7 +1494,7 @@
 #define E_POINTER                                          0x80004003L
 #define E_ABORT                                            0x80004004L
 #define E_FAIL                                             0x80004005L
-/* FIXME: E_UNSPEC is not a standard value but it is used by 
+/* FIXME: E_UNSPEC is not a standard value but it is used by
  * FileMoniker, IOleLink and DoDragDrop as a return value.
  */
 #define E_UNSPEC                                           E_FAIL
diff --git a/include/wingdi.h b/include/wingdi.h
index 0918af7..59b0981 100644
--- a/include/wingdi.h
+++ b/include/wingdi.h
@@ -124,7 +124,7 @@
 #define ILLUMINANT_MAX_INDEX        ILLUMINANT_F2
 
 #define ILLUMINANT_TUNGSTEN         ILLUMINANT_A
-#define ILLUMINANT_DAYLIGHT         ILLUMINANT_C 
+#define ILLUMINANT_DAYLIGHT         ILLUMINANT_C
 #define ILLUMINANT_FLUORESCENT      ILLUMINANT_F2
 #define ILLUMINANT_NTSC             ILLUMINANT_C
 
@@ -405,7 +405,7 @@
 #define WHITEONBLACK         2
 #define COLORONCOLOR	     3
 #define HALFTONE             4
-#define MAXSTRETCHBLTMODE    4 
+#define MAXSTRETCHBLTMODE    4
 
 #define STRETCH_ANDSCANS     BLACKONWHITE
 #define STRETCH_ORSCANS      WHITEONBLACK
@@ -468,7 +468,7 @@
   /* Brushes */
 
 typedef struct
-{ 
+{
     UINT     lbStyle;
     COLORREF   lbColor;
     INT      lbHatch;
@@ -592,7 +592,7 @@
  *        for which the font provides glyphs.
  *
  * fsCsb  64-bit bitmap. The low 32 bits map the Windows codepages for
- *        which the font provides glyphs. The high 32 bits are for 
+ *        which the font provides glyphs. The high 32 bits are for
  *        non Windows codepages.
  */
 typedef struct
@@ -601,7 +601,7 @@
   DWORD fsCsb[2];
 } FONTSIGNATURE, *PFONTSIGNATURE, *LPFONTSIGNATURE;
 
-typedef struct 
+typedef struct
 {
   UINT	ciCharset; /* character set */
   UINT	ciACP; /* ANSI code page */
@@ -626,7 +626,7 @@
 #define MWT_LEFTMULTIPLY  2
 #define MWT_RIGHTMULTIPLY 3
 #define MWT_MIN           MWT_IDENTITY
-#define MWT_MAX           MWT_RIGHTMULTIPLY      
+#define MWT_MAX           MWT_RIGHTMULTIPLY
 
 /* Object Definitions for EnumObjects() */
 #define OBJ_PEN             1
@@ -1239,7 +1239,7 @@
 #define GGO_GRAY4_BITMAP    5
 #define GGO_GRAY8_BITMAP    6
 #define GGO_GLYPH_INDEX     0x80
- 
+
 typedef struct
 {
     WORD    fract;
@@ -1365,7 +1365,7 @@
 
 #define TT_PRIM_LINE    1
 #define TT_PRIM_QSPLINE 2
-#define TT_POLYGON_TYPE 24 
+#define TT_POLYGON_TYPE 24
 
 /* Get/SetSystemPaletteUse() values */
 #define SYSPAL_ERROR    0
@@ -1383,7 +1383,7 @@
 #define PC_NOCOLLAPSE   0x04
 
 typedef struct tagLOGPALETTE
-{ 
+{
     WORD           palVersion;
     WORD           palNumEntries;
     PALETTEENTRY   palPalEntry[1];
@@ -1393,7 +1393,7 @@
 
 typedef struct
 {
-    UINT     lopnStyle; 
+    UINT     lopnStyle;
     POINT    lopnWidth;
     COLORREF lopnColor;
 } LOGPEN, *LPLOGPEN;
@@ -1769,7 +1769,7 @@
 #define DIB_PAL_COLORS   1
 #define CBM_INIT         4
 
-typedef struct 
+typedef struct
 {
 	BITMAP		dsBm;
 	BITMAPINFOHEADER	dsBmih;
@@ -1931,20 +1931,20 @@
 /* note that ENHMETAHEADER is just a particular kind of ENHMETARECORD,
    ie. the header is just the first record in the metafile */
 typedef struct {
-    DWORD iType; 
-    DWORD nSize; 
-    RECTL rclBounds; 
-    RECTL rclFrame; 
-    DWORD dSignature; 
-    DWORD nVersion; 
-    DWORD nBytes; 
-    DWORD nRecords; 
-    WORD  nHandles; 
-    WORD  sReserved; 
-    DWORD nDescription; 
-    DWORD offDescription; 
-    DWORD nPalEntries; 
-    SIZEL szlDevice; 
+    DWORD iType;
+    DWORD nSize;
+    RECTL rclBounds;
+    RECTL rclFrame;
+    DWORD dSignature;
+    DWORD nVersion;
+    DWORD nBytes;
+    DWORD nRecords;
+    WORD  nHandles;
+    WORD  sReserved;
+    DWORD nDescription;
+    DWORD offDescription;
+    DWORD nPalEntries;
+    SIZEL szlDevice;
     SIZEL szlMillimeters;
 
     /* Fields for winver >= win95 */
@@ -1952,16 +1952,16 @@
     DWORD offPixelFormat;
     DWORD bOpenGL;
 
-    /* Fields for winver >= win98 */ 
+    /* Fields for winver >= win98 */
     SIZEL szlMicrometers;
 
-} ENHMETAHEADER, *PENHMETAHEADER, *LPENHMETAHEADER; 
+} ENHMETAHEADER, *PENHMETAHEADER, *LPENHMETAHEADER;
 
 typedef struct {
-    DWORD iType; 
-    DWORD nSize; 
-    DWORD dParm[1]; 
-} ENHMETARECORD, *LPENHMETARECORD; 
+    DWORD iType;
+    DWORD nSize;
+    DWORD dParm[1];
+} ENHMETARECORD, *LPENHMETARECORD;
 
 typedef struct {
     DWORD iType;
@@ -2270,7 +2270,7 @@
     DWORD    iUsageMask;
     DWORD    offBmiMask;
     DWORD    cbBmiMask;
-    DWORD    offBitsMask; 
+    DWORD    offBitsMask;
     DWORD    cbBitsMask;
 } EMRPLGBLT, *PEMRPLGBLT;
 
@@ -2291,7 +2291,7 @@
     DWORD  cptl;
     POINTL aptl[1];
     BYTE   abTypes[1];
-} EMRPOLYDRAW, *PEMRPOLYDRAW; 
+} EMRPOLYDRAW, *PEMRPOLYDRAW;
 
 typedef struct {
     EMR     emr;
@@ -2475,8 +2475,8 @@
 } EMRSTRETCHDIBITS, *PEMRSTRETCHDIBITS;
 
 typedef struct {
-    EMR                   emr; 
-    PIXELFORMATDESCRIPTOR pfd; 
+    EMR                   emr;
+    PIXELFORMATDESCRIPTOR pfd;
 } EMRPIXELFORMAT, *PEMRPIXELFORMAT;
 
 typedef struct tagEMRGLSRECORD {
@@ -2490,9 +2490,9 @@
   RECTL rclBounds;
   DWORD cbData;
   BYTE  Data[1];
-} EMRGLSBOUNDEDRECORD, *PEMRGLSBOUNDEDRECORD; 
+} EMRGLSBOUNDEDRECORD, *PEMRGLSBOUNDEDRECORD;
 
-typedef INT (CALLBACK *ENHMFENUMPROC)(HDC, LPHANDLETABLE, 
+typedef INT (CALLBACK *ENHMFENUMPROC)(HDC, LPHANDLETABLE,
 					  LPENHMETARECORD, INT, LPVOID);
 
 #define EMR_HEADER	1
@@ -2931,7 +2931,7 @@
 #define DMDITHER_GRAYSCALE      5
 #define DMDITHER_USER           256
 
-typedef struct 
+typedef struct
 {
     INT    cbSize;
     LPCSTR   lpszDocName;
@@ -2940,7 +2940,7 @@
     DWORD    fwType;
 } DOCINFOA, *LPDOCINFOA;
 
-typedef struct 
+typedef struct
 {
     INT    cbSize;
     LPCWSTR  lpszDocName;
@@ -2984,7 +2984,7 @@
     DWORD	StateFlags;
     CHAR	DeviceID[128];
     CHAR	DeviceKey[128];
-} DISPLAY_DEVICEA,*PDISPLAY_DEVICEA,*LPDISPLAY_DEVICEA;      
+} DISPLAY_DEVICEA,*PDISPLAY_DEVICEA,*LPDISPLAY_DEVICEA;
 
 typedef struct {
     DWORD	cb;
@@ -2993,7 +2993,7 @@
     DWORD	StateFlags;
     WCHAR	DeviceID[128];
     WCHAR	DeviceKey[128];
-} DISPLAY_DEVICEW,*PDISPLAY_DEVICEW,*LPDISPLAY_DEVICEW;      
+} DISPLAY_DEVICEW,*PDISPLAY_DEVICEW,*LPDISPLAY_DEVICEW;
 DECL_WINELIB_TYPE_AW(DISPLAY_DEVICE)
 DECL_WINELIB_TYPE_AW(PDISPLAY_DEVICE)
 DECL_WINELIB_TYPE_AW(LPDISPLAY_DEVICE)
@@ -3055,7 +3055,7 @@
 BOOL        WINAPI AngleArc(HDC, INT, INT, DWORD, FLOAT, FLOAT);
 BOOL        WINAPI AnimatePalette(HPALETTE,UINT,UINT,const PALETTEENTRY*);
 BOOL        WINAPI Arc(HDC,INT,INT,INT,INT,INT,INT,INT,INT);
-BOOL        WINAPI ArcTo(HDC, INT, INT, INT, INT, INT, INT, INT, INT); 
+BOOL        WINAPI ArcTo(HDC, INT, INT, INT, INT, INT, INT, INT, INT);
 BOOL        WINAPI BeginPath(HDC);
 BOOL        WINAPI BitBlt(HDC,INT,INT,INT,INT,HDC,INT,INT,DWORD);
 INT         WINAPI ChoosePixelFormat(HDC,const LPPIXELFORMATDESCRIPTOR);
diff --git a/include/wininet.h b/include/wininet.h
index 5cb4992..6775229 100644
--- a/include/wininet.h
+++ b/include/wininet.h
@@ -23,7 +23,7 @@
 extern "C" {
 #endif
 
-#define INTERNETAPI 
+#define INTERNETAPI
 #define BOOLAPI INTERNETAPI BOOL WINAPI
 
 typedef LPVOID HINTERNET;
@@ -33,62 +33,62 @@
 typedef INTERNET_PORT * LPINTERNET_PORT;
 
 
-#define INTERNET_INVALID_PORT_NUMBER    0           
+#define INTERNET_INVALID_PORT_NUMBER    0
 
-#define INTERNET_DEFAULT_FTP_PORT       21          
-#define INTERNET_DEFAULT_GOPHER_PORT    70          
-#define INTERNET_DEFAULT_HTTP_PORT      80          
-#define INTERNET_DEFAULT_HTTPS_PORT     443         
-#define INTERNET_DEFAULT_SOCKS_PORT     1080        
+#define INTERNET_DEFAULT_FTP_PORT       21
+#define INTERNET_DEFAULT_GOPHER_PORT    70
+#define INTERNET_DEFAULT_HTTP_PORT      80
+#define INTERNET_DEFAULT_HTTPS_PORT     443
+#define INTERNET_DEFAULT_SOCKS_PORT     1080
 
 #define INTERNET_MAX_HOST_NAME_LENGTH   256
 #define INTERNET_MAX_USER_NAME_LENGTH   128
 #define INTERNET_MAX_PASSWORD_LENGTH    128
-#define INTERNET_MAX_PORT_NUMBER_LENGTH 5           
-#define INTERNET_MAX_PORT_NUMBER_VALUE  65535       
+#define INTERNET_MAX_PORT_NUMBER_LENGTH 5
+#define INTERNET_MAX_PORT_NUMBER_VALUE  65535
 #define INTERNET_MAX_PATH_LENGTH        2048
-#define INTERNET_MAX_SCHEME_LENGTH      32          
+#define INTERNET_MAX_SCHEME_LENGTH      32
 #define INTERNET_MAX_URL_LENGTH         (INTERNET_MAX_SCHEME_LENGTH + sizeof("://")+ INTERNET_MAX_PATH_LENGTH)
 #define INTERNET_KEEP_ALIVE_UNKNOWN     ((DWORD)-1)
 #define INTERNET_KEEP_ALIVE_ENABLED     1
 #define INTERNET_KEEP_ALIVE_DISABLED    0
-#define INTERNET_REQFLAG_FROM_CACHE     0x00000001  
-#define INTERNET_REQFLAG_ASYNC          0x00000002  
-#define INTERNET_REQFLAG_VIA_PROXY      0x00000004  
-#define INTERNET_REQFLAG_NO_HEADERS     0x00000008  
-#define INTERNET_REQFLAG_PASSIVE        0x00000010  
-#define INTERNET_REQFLAG_CACHE_WRITE_DISABLED 0x00000040  
-#define INTERNET_FLAG_RELOAD            0x80000000  
-#define INTERNET_FLAG_RAW_DATA          0x40000000  
-#define INTERNET_FLAG_EXISTING_CONNECT  0x20000000  
-#define INTERNET_FLAG_ASYNC             0x10000000  
-#define INTERNET_FLAG_PASSIVE           0x08000000  
-#define INTERNET_FLAG_NO_CACHE_WRITE    0x04000000  
+#define INTERNET_REQFLAG_FROM_CACHE     0x00000001
+#define INTERNET_REQFLAG_ASYNC          0x00000002
+#define INTERNET_REQFLAG_VIA_PROXY      0x00000004
+#define INTERNET_REQFLAG_NO_HEADERS     0x00000008
+#define INTERNET_REQFLAG_PASSIVE        0x00000010
+#define INTERNET_REQFLAG_CACHE_WRITE_DISABLED 0x00000040
+#define INTERNET_FLAG_RELOAD            0x80000000
+#define INTERNET_FLAG_RAW_DATA          0x40000000
+#define INTERNET_FLAG_EXISTING_CONNECT  0x20000000
+#define INTERNET_FLAG_ASYNC             0x10000000
+#define INTERNET_FLAG_PASSIVE           0x08000000
+#define INTERNET_FLAG_NO_CACHE_WRITE    0x04000000
 #define INTERNET_FLAG_DONT_CACHE        INTERNET_FLAG_NO_CACHE_WRITE
-#define INTERNET_FLAG_MAKE_PERSISTENT   0x02000000  
-#define INTERNET_FLAG_FROM_CACHE        0x01000000  
+#define INTERNET_FLAG_MAKE_PERSISTENT   0x02000000
+#define INTERNET_FLAG_FROM_CACHE        0x01000000
 #define INTERNET_FLAG_OFFLINE           INTERNET_FLAG_FROM_CACHE
-#define INTERNET_FLAG_SECURE            0x00800000  
-#define INTERNET_FLAG_KEEP_CONNECTION   0x00400000  
-#define INTERNET_FLAG_NO_AUTO_REDIRECT  0x00200000  
-#define INTERNET_FLAG_READ_PREFETCH     0x00100000  
-#define INTERNET_FLAG_NO_COOKIES        0x00080000  
-#define INTERNET_FLAG_NO_AUTH           0x00040000  
-#define INTERNET_FLAG_CACHE_IF_NET_FAIL 0x00010000  
-#define INTERNET_FLAG_IGNORE_REDIRECT_TO_HTTP   0x00008000 
-#define INTERNET_FLAG_IGNORE_REDIRECT_TO_HTTPS  0x00004000 
-#define INTERNET_FLAG_IGNORE_CERT_DATE_INVALID  0x00002000 
-#define INTERNET_FLAG_IGNORE_CERT_CN_INVALID    0x00001000 
-#define INTERNET_FLAG_RESYNCHRONIZE     0x00000800  
-#define INTERNET_FLAG_HYPERLINK         0x00000400  
-#define INTERNET_FLAG_NO_UI             0x00000200  
-#define INTERNET_FLAG_PRAGMA_NOCACHE    0x00000100  
-#define INTERNET_FLAG_CACHE_ASYNC       0x00000080  
-#define INTERNET_FLAG_FORMS_SUBMIT      0x00000040  
-#define INTERNET_FLAG_NEED_FILE         0x00000010  
+#define INTERNET_FLAG_SECURE            0x00800000
+#define INTERNET_FLAG_KEEP_CONNECTION   0x00400000
+#define INTERNET_FLAG_NO_AUTO_REDIRECT  0x00200000
+#define INTERNET_FLAG_READ_PREFETCH     0x00100000
+#define INTERNET_FLAG_NO_COOKIES        0x00080000
+#define INTERNET_FLAG_NO_AUTH           0x00040000
+#define INTERNET_FLAG_CACHE_IF_NET_FAIL 0x00010000
+#define INTERNET_FLAG_IGNORE_REDIRECT_TO_HTTP   0x00008000
+#define INTERNET_FLAG_IGNORE_REDIRECT_TO_HTTPS  0x00004000
+#define INTERNET_FLAG_IGNORE_CERT_DATE_INVALID  0x00002000
+#define INTERNET_FLAG_IGNORE_CERT_CN_INVALID    0x00001000
+#define INTERNET_FLAG_RESYNCHRONIZE     0x00000800
+#define INTERNET_FLAG_HYPERLINK         0x00000400
+#define INTERNET_FLAG_NO_UI             0x00000200
+#define INTERNET_FLAG_PRAGMA_NOCACHE    0x00000100
+#define INTERNET_FLAG_CACHE_ASYNC       0x00000080
+#define INTERNET_FLAG_FORMS_SUBMIT      0x00000040
+#define INTERNET_FLAG_NEED_FILE         0x00000010
 #define INTERNET_FLAG_MUST_CACHE_REQUEST INTERNET_FLAG_NEED_FILE
-#define INTERNET_FLAG_TRANSFER_ASCII    FTP_TRANSFER_TYPE_ASCII     
-#define INTERNET_FLAG_TRANSFER_BINARY   FTP_TRANSFER_TYPE_BINARY    
+#define INTERNET_FLAG_TRANSFER_ASCII    FTP_TRANSFER_TYPE_ASCII
+#define INTERNET_FLAG_TRANSFER_BINARY   FTP_TRANSFER_TYPE_BINARY
 #define SECURITY_INTERNET_MASK  (INTERNET_FLAG_IGNORE_CERT_CN_INVALID|\
 INTERNET_FLAG_IGNORE_CERT_DATE_INVALID|\
 INTERNET_FLAG_IGNORE_REDIRECT_TO_HTTPS|\
@@ -124,9 +124,9 @@
 #define INTERNET_ERROR_MASK_INSERT_CDROM                    0x1
 
 #define INTERNET_OPTIONS_MASK   (~INTERNET_FLAGS_MASK)
-#define WININET_API_FLAG_ASYNC          0x00000001  
-#define WININET_API_FLAG_SYNC           0x00000004  
-#define WININET_API_FLAG_USE_CONTEXT    0x00000008  
+#define WININET_API_FLAG_ASYNC          0x00000001
+#define WININET_API_FLAG_SYNC           0x00000004
+#define WININET_API_FLAG_USE_CONTEXT    0x00000008
 #define INTERNET_NO_CALLBACK            0
 
 typedef enum {
@@ -184,7 +184,7 @@
 #define ISO_FORCE_DISCONNECTED  0x00000001
 
 typedef struct {
-    DWORD   dwStructSize;       
+    DWORD   dwStructSize;
     LPSTR   lpszScheme;
     DWORD   dwSchemeLength;
     INTERNET_SCHEME nScheme;
@@ -194,29 +194,29 @@
     LPSTR   lpszUserName;
     DWORD   dwUserNameLength;
     LPSTR   lpszPassword;
-    DWORD   dwPasswordLength;   
-    LPSTR   lpszUrlPath;        
-    DWORD   dwUrlPathLength;    
-    LPSTR   lpszExtraInfo;      
-    DWORD   dwExtraInfoLength;  
+    DWORD   dwPasswordLength;
+    LPSTR   lpszUrlPath;
+    DWORD   dwUrlPathLength;
+    LPSTR   lpszExtraInfo;
+    DWORD   dwExtraInfoLength;
 } URL_COMPONENTSA,* LPURL_COMPONENTSA;
 
 typedef struct {
-    DWORD   dwStructSize;       
-    LPWSTR  lpszScheme;         
-    DWORD   dwSchemeLength;     
-    INTERNET_SCHEME nScheme;    
-    LPWSTR  lpszHostName;       
-    DWORD   dwHostNameLength;   
-    INTERNET_PORT nPort;        
-    LPWSTR  lpszUserName;       
-    DWORD   dwUserNameLength;   
-    LPWSTR  lpszPassword;       
-    DWORD   dwPasswordLength;   
-    LPWSTR  lpszUrlPath;        
-    DWORD   dwUrlPathLength;    
-    LPWSTR  lpszExtraInfo;      
-    DWORD   dwExtraInfoLength;  
+    DWORD   dwStructSize;
+    LPWSTR  lpszScheme;
+    DWORD   dwSchemeLength;
+    INTERNET_SCHEME nScheme;
+    LPWSTR  lpszHostName;
+    DWORD   dwHostNameLength;
+    INTERNET_PORT nPort;
+    LPWSTR  lpszUserName;
+    DWORD   dwUserNameLength;
+    LPWSTR  lpszPassword;
+    DWORD   dwPasswordLength;
+    LPWSTR  lpszUrlPath;
+    DWORD   dwUrlPathLength;
+    LPWSTR  lpszExtraInfo;
+    DWORD   dwExtraInfoLength;
 } URL_COMPONENTSW,* LPURL_COMPONENTSW;
 
 DECL_WINELIB_TYPE_AW(URL_COMPONENTS)
@@ -250,28 +250,28 @@
 DECL_WINELIB_TYPE_AW(LPINTERNET_CERTIFICATE_INFO)
 
 typedef struct _INTERNET_BUFFERSA {
-    DWORD dwStructSize;                 
-    struct _INTERNET_BUFFERSA * Next;   
-    LPCSTR   lpcszHeader;               
-    DWORD dwHeadersLength;              
-    DWORD dwHeadersTotal;               
-    LPVOID lpvBuffer;                   
-    DWORD dwBufferLength;               
-    DWORD dwBufferTotal;                
-    DWORD dwOffsetLow;                  
+    DWORD dwStructSize;
+    struct _INTERNET_BUFFERSA * Next;
+    LPCSTR   lpcszHeader;
+    DWORD dwHeadersLength;
+    DWORD dwHeadersTotal;
+    LPVOID lpvBuffer;
+    DWORD dwBufferLength;
+    DWORD dwBufferTotal;
+    DWORD dwOffsetLow;
     DWORD dwOffsetHigh;
 } INTERNET_BUFFERSA,* LPINTERNET_BUFFERSA;
 
 typedef struct _INTERNET_BUFFERSW {
-    DWORD dwStructSize;                 
-    struct _INTERNET_BUFFERSW * Next;   
-    LPCWSTR  lpcszHeader;               
-    DWORD dwHeadersLength;              
-    DWORD dwHeadersTotal;               
-    LPVOID lpvBuffer;                   
-    DWORD dwBufferLength;               
-    DWORD dwBufferTotal;                
-    DWORD dwOffsetLow;                  
+    DWORD dwStructSize;
+    struct _INTERNET_BUFFERSW * Next;
+    LPCWSTR  lpcszHeader;
+    DWORD dwHeadersLength;
+    DWORD dwHeadersTotal;
+    LPVOID lpvBuffer;
+    DWORD dwBufferLength;
+    DWORD dwBufferTotal;
+    DWORD dwOffsetLow;
     DWORD dwOffsetHigh;
 } INTERNET_BUFFERSW,* LPINTERNET_BUFFERSW;
 
@@ -304,22 +304,22 @@
 BOOLAPI InternetCombineUrlW(LPCWSTR ,LPCWSTR ,LPWSTR ,LPDWORD ,DWORD);
 #define InternetCombineUrl  WINELIB_NAME_AW(InternetCombineUrl)
 
-#define ICU_ESCAPE      0x80000000  
-#define ICU_USERNAME    0x40000000  
-#define ICU_NO_ENCODE   0x20000000  
-#define ICU_DECODE      0x10000000  
-#define ICU_NO_META     0x08000000  
-#define ICU_ENCODE_SPACES_ONLY 0x04000000  
-#define ICU_BROWSER_MODE 0x02000000 
+#define ICU_ESCAPE      0x80000000
+#define ICU_USERNAME    0x40000000
+#define ICU_NO_ENCODE   0x20000000
+#define ICU_DECODE      0x10000000
+#define ICU_NO_META     0x08000000
+#define ICU_ENCODE_SPACES_ONLY 0x04000000
+#define ICU_BROWSER_MODE 0x02000000
 
 INTERNETAPI HINTERNET WINAPI InternetOpenA(LPCSTR ,DWORD ,LPCSTR lpszProxy ,LPCSTR lpszProxyBypass ,DWORD);
 INTERNETAPI HINTERNET WINAPI InternetOpenW(LPCWSTR ,DWORD ,LPCWSTR lpszProxy ,LPCWSTR lpszProxyBypass ,DWORD);
 #define InternetOpen  WINELIB_NAME_AW(InternetOpen)
 
-#define INTERNET_OPEN_TYPE_PRECONFIG                    0   
-#define INTERNET_OPEN_TYPE_DIRECT                       1   
-#define INTERNET_OPEN_TYPE_PROXY                        3   
-#define INTERNET_OPEN_TYPE_PRECONFIG_WITH_NO_AUTOPROXY  4   
+#define INTERNET_OPEN_TYPE_PRECONFIG                    0
+#define INTERNET_OPEN_TYPE_DIRECT                       1
+#define INTERNET_OPEN_TYPE_PROXY                        3
+#define INTERNET_OPEN_TYPE_PRECONFIG_WITH_NO_AUTOPROXY  4
 #define PRE_CONFIG_INTERNET_ACCESS  INTERNET_OPEN_TYPE_PRECONFIG
 #define LOCAL_INTERNET_ACCESS       INTERNET_OPEN_TYPE_DIRECT
 #define CERN_PROXY_INTERNET_ACCESS  INTERNET_OPEN_TYPE_PROXY
@@ -352,7 +352,7 @@
 INTERNETAPI HINTERNET WINAPI InternetOpenUrlW(HINTERNET ,LPCWSTR ,LPCWSTR lpszHeaders ,DWORD ,DWORD ,DWORD);
 #define InternetOpenUrl  WINELIB_NAME_AW(InternetOpenUrl)
 
-BOOLAPI InternetReadFile( HINTERNET ,LPVOID ,DWORD ,LPDWORD ); 
+BOOLAPI InternetReadFile( HINTERNET ,LPVOID ,DWORD ,LPDWORD );
 INTERNETAPI BOOL WINAPI InternetReadFileExA( HINTERNET ,LPINTERNET_BUFFERSA ,DWORD ,DWORD );
 INTERNETAPI BOOL WINAPI InternetReadFileExW( HINTERNET ,LPINTERNET_BUFFERSW ,DWORD ,DWORD );
 #define InternetReadFileEx  WINELIB_NAME_AW(InternetReadFileEx)
@@ -363,7 +363,7 @@
 #define IRF_NO_WAIT     0x00000008
 
 INTERNETAPI DWORD WINAPI InternetSetFilePointer(HINTERNET ,LONG ,PVOID ,DWORD ,DWORD);
-BOOLAPI InternetWriteFile(HINTERNET ,LPCVOID ,DWORD ,LPDWORD); 
+BOOLAPI InternetWriteFile(HINTERNET ,LPCVOID ,DWORD ,LPDWORD);
 BOOLAPI InternetQueryDataAvailable(HINTERNET ,LPDWORD lpdwNumberOfBytesAvailable ,DWORD ,DWORD);
 BOOLAPI InternetFindNextFileA(HINTERNET ,LPVOID);
 BOOLAPI InternetFindNextFileW(HINTERNET ,LPVOID);
@@ -384,8 +384,8 @@
 BOOLAPI InternetLockRequestFile(HINTERNET ,HANDLE *);
 BOOLAPI InternetUnlockRequestFile(HANDLE);
 
-#define ISO_GLOBAL      0x00000001  
-#define ISO_REGISTRY    0x00000002  
+#define ISO_GLOBAL      0x00000001
+#define ISO_REGISTRY    0x00000002
 
 #define ISO_VALID_FLAGS (ISO_GLOBAL | ISO_REGISTRY)
 #define INTERNET_OPTION_CALLBACK                1
@@ -460,7 +460,7 @@
 #define INTERNET_HANDLE_TYPE_GOPHER_FILE        11
 #define INTERNET_HANDLE_TYPE_GOPHER_FILE_HTML   12
 #define INTERNET_HANDLE_TYPE_HTTP_REQUEST       13
-#define SECURITY_FLAG_SECURE                    0x00000001 
+#define SECURITY_FLAG_SECURE                    0x00000001
 #define SECURITY_FLAG_STRENGTH_WEAK             0x10000000
 #define SECURITY_FLAG_STRENGTH_MEDIUM           0x40000000
 #define SECURITY_FLAG_STRENGTH_STRONG           0x20000000
@@ -518,11 +518,11 @@
 #define INTERNET_STATUS_REDIRECT                110
 #define INTERNET_STATUS_INTERMEDIATE_RESPONSE   120
 #define INTERNET_STATUS_STATE_CHANGE            200
-#define INTERNET_STATE_CONNECTED                0x00000001  
-#define INTERNET_STATE_DISCONNECTED             0x00000002  
-#define INTERNET_STATE_DISCONNECTED_BY_USER     0x00000010  
-#define INTERNET_STATE_IDLE                     0x00000100  
-#define INTERNET_STATE_BUSY                     0x00000200  
+#define INTERNET_STATE_CONNECTED                0x00000001
+#define INTERNET_STATE_DISCONNECTED             0x00000002
+#define INTERNET_STATE_DISCONNECTED_BY_USER     0x00000010
+#define INTERNET_STATE_IDLE                     0x00000100
+#define INTERNET_STATE_BUSY                     0x00000200
 
 #define INTERNET_INVALID_STATUS_CALLBACK        ((INTERNET_STATUS_CALLBACK)(-1L))
 
@@ -593,7 +593,7 @@
 
 typedef struct {
     CHAR   DisplayString[MAX_GOPHER_DISPLAY_TEXT + 1];
-    DWORD GopherType;   
+    DWORD GopherType;
     DWORD SizeLow;
     DWORD SizeHigh;
     FILETIME LastModificationTime;
@@ -602,7 +602,7 @@
 
 typedef struct {
     WCHAR  DisplayString[MAX_GOPHER_DISPLAY_TEXT + 1];
-    DWORD GopherType;   
+    DWORD GopherType;
     DWORD SizeLow;
     DWORD SizeHigh;
     FILETIME LastModificationTime;
@@ -820,8 +820,8 @@
 DECL_WINELIB_TYPE_AW(LPGOPHER_UNKNOWN_ATTRIBUTE_TYPE)
 
 typedef struct {
-    DWORD CategoryId;   
-    DWORD AttributeId;  
+    DWORD CategoryId;
+    DWORD AttributeId;
     union {
         GOPHER_ADMIN_ATTRIBUTE_TYPEA Admin;
         GOPHER_MOD_DATE_ATTRIBUTE_TYPE ModDate;
@@ -844,8 +844,8 @@
 } GOPHER_ATTRIBUTE_TYPEA, *LPGOPHER_ATTRIBUTE_TYPEA;
 
 typedef struct {
-    DWORD CategoryId;   
-    DWORD AttributeId;  
+    DWORD CategoryId;
+    DWORD AttributeId;
     union {
         GOPHER_ADMIN_ATTRIBUTE_TYPEW Admin;
         GOPHER_MOD_DATE_ATTRIBUTE_TYPE ModDate;
@@ -870,9 +870,9 @@
 DECL_WINELIB_TYPE_AW(GOPHER_ATTRIBUTE_TYPE)
 DECL_WINELIB_TYPE_AW(LPGOPHER_ATTRIBUTE_TYPE)
 
-#define MAX_GOPHER_CATEGORY_NAME    128     
-#define MAX_GOPHER_ATTRIBUTE_NAME   128     
-#define MIN_GOPHER_ATTRIBUTE_LENGTH 256     
+#define MAX_GOPHER_CATEGORY_NAME    128
+#define MAX_GOPHER_ATTRIBUTE_NAME   128
+#define MIN_GOPHER_ATTRIBUTE_LENGTH 256
 
 #define GOPHER_INFO_CATEGORY        TEXT("+INFO")
 #define GOPHER_ADMIN_CATEGORY       TEXT("+ADMIN")
@@ -976,11 +976,11 @@
 #define HTTP_QUERY_COST                         15
 #define HTTP_QUERY_LINK                         16
 #define HTTP_QUERY_PRAGMA                       17
-#define HTTP_QUERY_VERSION                      18  
-#define HTTP_QUERY_STATUS_CODE                  19  
-#define HTTP_QUERY_STATUS_TEXT                  20  
-#define HTTP_QUERY_RAW_HEADERS                  21  
-#define HTTP_QUERY_RAW_HEADERS_CRLF             22  
+#define HTTP_QUERY_VERSION                      18
+#define HTTP_QUERY_STATUS_CODE                  19
+#define HTTP_QUERY_STATUS_TEXT                  20
+#define HTTP_QUERY_RAW_HEADERS                  21
+#define HTTP_QUERY_RAW_HEADERS_CRLF             22
 #define HTTP_QUERY_CONNECTION                   23
 #define HTTP_QUERY_ACCEPT                       24
 #define HTTP_QUERY_ACCEPT_CHARSET               25
@@ -1003,7 +1003,7 @@
 #define HTTP_QUERY_ACCEPT_RANGES                42
 #define HTTP_QUERY_SET_COOKIE                   43
 #define HTTP_QUERY_COOKIE                       44
-#define HTTP_QUERY_REQUEST_METHOD               45  
+#define HTTP_QUERY_REQUEST_METHOD               45
 #define HTTP_QUERY_REFRESH                      46
 #define HTTP_QUERY_CONTENT_DISPOSITION          47
 #define HTTP_QUERY_AGE                          48
@@ -1039,44 +1039,44 @@
                                                 )
 #define HTTP_QUERY_HEADER_MASK                  (~HTTP_QUERY_MODIFIER_FLAGS_MASK)
 
-#define HTTP_STATUS_CONTINUE            100 
-#define HTTP_STATUS_SWITCH_PROTOCOLS    101 
-#define HTTP_STATUS_OK                  200 
-#define HTTP_STATUS_CREATED             201 
-#define HTTP_STATUS_ACCEPTED            202 
-#define HTTP_STATUS_PARTIAL             203 
-#define HTTP_STATUS_NO_CONTENT          204 
-#define HTTP_STATUS_RESET_CONTENT       205 
-#define HTTP_STATUS_PARTIAL_CONTENT     206 
-#define HTTP_STATUS_AMBIGUOUS           300 
-#define HTTP_STATUS_MOVED               301 
-#define HTTP_STATUS_REDIRECT            302 
-#define HTTP_STATUS_REDIRECT_METHOD     303 
-#define HTTP_STATUS_NOT_MODIFIED        304 
-#define HTTP_STATUS_USE_PROXY           305 
-#define HTTP_STATUS_REDIRECT_KEEP_VERB  307 
-#define HTTP_STATUS_BAD_REQUEST         400 
-#define HTTP_STATUS_DENIED              401 
-#define HTTP_STATUS_PAYMENT_REQ         402 
-#define HTTP_STATUS_FORBIDDEN           403 
-#define HTTP_STATUS_NOT_FOUND           404 
-#define HTTP_STATUS_BAD_METHOD          405 
-#define HTTP_STATUS_NONE_ACCEPTABLE     406 
-#define HTTP_STATUS_PROXY_AUTH_REQ      407 
-#define HTTP_STATUS_REQUEST_TIMEOUT     408 
-#define HTTP_STATUS_CONFLICT            409 
-#define HTTP_STATUS_GONE                410 
-#define HTTP_STATUS_LENGTH_REQUIRED     411 
-#define HTTP_STATUS_PRECOND_FAILED      412 
-#define HTTP_STATUS_REQUEST_TOO_LARGE   413 
-#define HTTP_STATUS_URI_TOO_LONG        414 
-#define HTTP_STATUS_UNSUPPORTED_MEDIA   415 
-#define HTTP_STATUS_SERVER_ERROR        500 
-#define HTTP_STATUS_NOT_SUPPORTED       501 
-#define HTTP_STATUS_BAD_GATEWAY         502 
-#define HTTP_STATUS_SERVICE_UNAVAIL     503 
-#define HTTP_STATUS_GATEWAY_TIMEOUT     504 
-#define HTTP_STATUS_VERSION_NOT_SUP     505 
+#define HTTP_STATUS_CONTINUE            100
+#define HTTP_STATUS_SWITCH_PROTOCOLS    101
+#define HTTP_STATUS_OK                  200
+#define HTTP_STATUS_CREATED             201
+#define HTTP_STATUS_ACCEPTED            202
+#define HTTP_STATUS_PARTIAL             203
+#define HTTP_STATUS_NO_CONTENT          204
+#define HTTP_STATUS_RESET_CONTENT       205
+#define HTTP_STATUS_PARTIAL_CONTENT     206
+#define HTTP_STATUS_AMBIGUOUS           300
+#define HTTP_STATUS_MOVED               301
+#define HTTP_STATUS_REDIRECT            302
+#define HTTP_STATUS_REDIRECT_METHOD     303
+#define HTTP_STATUS_NOT_MODIFIED        304
+#define HTTP_STATUS_USE_PROXY           305
+#define HTTP_STATUS_REDIRECT_KEEP_VERB  307
+#define HTTP_STATUS_BAD_REQUEST         400
+#define HTTP_STATUS_DENIED              401
+#define HTTP_STATUS_PAYMENT_REQ         402
+#define HTTP_STATUS_FORBIDDEN           403
+#define HTTP_STATUS_NOT_FOUND           404
+#define HTTP_STATUS_BAD_METHOD          405
+#define HTTP_STATUS_NONE_ACCEPTABLE     406
+#define HTTP_STATUS_PROXY_AUTH_REQ      407
+#define HTTP_STATUS_REQUEST_TIMEOUT     408
+#define HTTP_STATUS_CONFLICT            409
+#define HTTP_STATUS_GONE                410
+#define HTTP_STATUS_LENGTH_REQUIRED     411
+#define HTTP_STATUS_PRECOND_FAILED      412
+#define HTTP_STATUS_REQUEST_TOO_LARGE   413
+#define HTTP_STATUS_URI_TOO_LONG        414
+#define HTTP_STATUS_UNSUPPORTED_MEDIA   415
+#define HTTP_STATUS_SERVER_ERROR        500
+#define HTTP_STATUS_NOT_SUPPORTED       501
+#define HTTP_STATUS_BAD_GATEWAY         502
+#define HTTP_STATUS_SERVICE_UNAVAIL     503
+#define HTTP_STATUS_GATEWAY_TIMEOUT     504
+#define HTTP_STATUS_VERSION_NOT_SUP     505
 #define HTTP_STATUS_FIRST               HTTP_STATUS_CONTINUE
 #define HTTP_STATUS_LAST                HTTP_STATUS_VERSION_NOT_SUP
 
@@ -1110,12 +1110,12 @@
 	LPINTERNET_BUFFERSW lpBuffersOut ,DWORD ,DWORD);
 #define HttpSendRequestEx  WINELIB_NAME_AW(HttpSendRequestEx)
 
-#define HSR_ASYNC       WININET_API_FLAG_ASYNC          
-#define HSR_SYNC        WININET_API_FLAG_SYNC           
-#define HSR_USE_CONTEXT WININET_API_FLAG_USE_CONTEXT    
-#define HSR_INITIATE    0x00000008                      
-#define HSR_DOWNLOAD    0x00000010                      
-#define HSR_CHUNKED     0x00000020                      
+#define HSR_ASYNC       WININET_API_FLAG_ASYNC
+#define HSR_SYNC        WININET_API_FLAG_SYNC
+#define HSR_USE_CONTEXT WININET_API_FLAG_USE_CONTEXT
+#define HSR_INITIATE    0x00000008
+#define HSR_DOWNLOAD    0x00000010
+#define HSR_CHUNKED     0x00000020
 
 INTERNETAPI BOOL WINAPI HttpEndRequestA(HINTERNET ,LPINTERNET_BUFFERSA lpBuffersOut ,DWORD ,DWORD);
 INTERNETAPI BOOL WINAPI HttpEndRequestW(HINTERNET ,LPINTERNET_BUFFERSW lpBuffersOut ,DWORD ,DWORD);
@@ -1151,10 +1151,10 @@
 
 typedef struct
 {
-    DWORD            cbStruct;    
-    DWORD            dwOptions;   
-    PFN_AUTH_NOTIFY  pfnNotify;   
-    DWORD            dwContext;   
+    DWORD            cbStruct;
+    DWORD            dwOptions;
+    PFN_AUTH_NOTIFY  pfnNotify;
+    DWORD            dwContext;
 }
 INTERNET_AUTH_NOTIFY_DATA;
 
@@ -1271,43 +1271,43 @@
 
 
 typedef struct _INTERNET_CACHE_ENTRY_INFOA {
-    DWORD dwStructSize;         
-    LPSTR lpszSourceUrlName;    
-    LPSTR   lpszLocalFileName;  
-    DWORD CacheEntryType;       
-    DWORD dwUseCount;           
-    DWORD dwHitRate;            
-    DWORD dwSizeLow;            
-    DWORD dwSizeHigh;           
-    FILETIME LastModifiedTime;  
-    FILETIME ExpireTime;        
-    FILETIME LastAccessTime;    
-    FILETIME LastSyncTime;      
-                                
-    LPBYTE lpHeaderInfo;        
-    DWORD dwHeaderInfoSize;     
-    LPSTR lpszFileExtension;  
-    union {                     
+    DWORD dwStructSize;
+    LPSTR lpszSourceUrlName;
+    LPSTR   lpszLocalFileName;
+    DWORD CacheEntryType;
+    DWORD dwUseCount;
+    DWORD dwHitRate;
+    DWORD dwSizeLow;
+    DWORD dwSizeHigh;
+    FILETIME LastModifiedTime;
+    FILETIME ExpireTime;
+    FILETIME LastAccessTime;
+    FILETIME LastSyncTime;
+
+    LPBYTE lpHeaderInfo;
+    DWORD dwHeaderInfoSize;
+    LPSTR lpszFileExtension;
+    union {
       DWORD dwReserved;
       DWORD dwExemptDelta;
     } u;
 } INTERNET_CACHE_ENTRY_INFOA,* LPINTERNET_CACHE_ENTRY_INFOA;
 
 typedef struct _INTERNET_CACHE_ENTRY_INFOW {
-    DWORD dwStructSize;         
-    LPWSTR lpszSourceUrlName;    
-    LPWSTR  lpszLocalFileName;  
-    DWORD CacheEntryType;       
-    DWORD dwUseCount;           
-    DWORD dwHitRate;            
-    DWORD dwSizeLow;            
-    DWORD dwSizeHigh;           
-    FILETIME LastModifiedTime;  
-    FILETIME ExpireTime;        
-    FILETIME LastAccessTime;    
-    FILETIME LastSyncTime;      
-                                
-    LPBYTE lpHeaderInfo;        
+    DWORD dwStructSize;
+    LPWSTR lpszSourceUrlName;
+    LPWSTR  lpszLocalFileName;
+    DWORD CacheEntryType;
+    DWORD dwUseCount;
+    DWORD dwHitRate;
+    DWORD dwSizeLow;
+    DWORD dwSizeHigh;
+    FILETIME LastModifiedTime;
+    FILETIME ExpireTime;
+    FILETIME LastAccessTime;
+    FILETIME LastSyncTime;
+
+    LPBYTE lpHeaderInfo;
     DWORD dwHeaderInfoSize;
     LPWSTR  lpszFileExtension;
     union {
@@ -1441,11 +1441,11 @@
 #define INTERNET_DIALSTATE_DISCONNECTED     1
 
 BOOLAPI InternetCheckConnectionA(LPCSTR lpszUrl,DWORD dwFlags,DWORD dwReserved);
-BOOLAPI InternetCheckConnectionW(LPCWSTR lpszUrl,DWORD dwFlags,DWORD dwReserved); 
+BOOLAPI InternetCheckConnectionW(LPCWSTR lpszUrl,DWORD dwFlags,DWORD dwReserved);
 #define InternetCheckConnection WINELIB_NAME_AW(InternetCheckConnection)
 
 #ifdef __cplusplus
 }
 #endif
 
-#endif 
+#endif
diff --git a/include/winioctl.h b/include/winioctl.h
index f1064cd..d73cc30 100644
--- a/include/winioctl.h
+++ b/include/winioctl.h
@@ -105,7 +105,7 @@
 #define FSCTL_DISMOUNT_VOLUME           CTL_CODE(FILE_DEVICE_FILE_SYSTEM,  8, METHOD_BUFFERED, FILE_ANY_ACCESS)
 /* decommissioned fsctl value                                              9                                     */
 #define FSCTL_IS_VOLUME_MOUNTED         CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 10, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define FSCTL_IS_PATHNAME_VALID         CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 11, METHOD_BUFFERED, FILE_ANY_ACCESS) 
+#define FSCTL_IS_PATHNAME_VALID         CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 11, METHOD_BUFFERED, FILE_ANY_ACCESS)
 #define FSCTL_MARK_VOLUME_DIRTY         CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 12, METHOD_BUFFERED, FILE_ANY_ACCESS)
 /* decommissioned fsctl value                                             13                                     */
 #define FSCTL_QUERY_RETRIEVAL_POINTERS  CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 14,  METHOD_NEITHER, FILE_ANY_ACCESS)
@@ -121,10 +121,10 @@
 #define FSCTL_FILESYSTEM_GET_STATISTICS CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 24, METHOD_BUFFERED, FILE_ANY_ACCESS)
 /* Start: _WIN32_WINNT >= 0x0400 */
 #define FSCTL_GET_NTFS_VOLUME_DATA      CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 25, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define FSCTL_GET_NTFS_FILE_RECORD      CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 26, METHOD_BUFFERED, FILE_ANY_ACCESS) 
-#define FSCTL_GET_VOLUME_BITMAP         CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 27,  METHOD_NEITHER, FILE_ANY_ACCESS) 
-#define FSCTL_GET_RETRIEVAL_POINTERS    CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 28,  METHOD_NEITHER, FILE_ANY_ACCESS) 
-#define FSCTL_MOVE_FILE                 CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 29, METHOD_BUFFERED, FILE_ANY_ACCESS) 
+#define FSCTL_GET_NTFS_FILE_RECORD      CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 26, METHOD_BUFFERED, FILE_ANY_ACCESS)
+#define FSCTL_GET_VOLUME_BITMAP         CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 27,  METHOD_NEITHER, FILE_ANY_ACCESS)
+#define FSCTL_GET_RETRIEVAL_POINTERS    CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 28,  METHOD_NEITHER, FILE_ANY_ACCESS)
+#define FSCTL_MOVE_FILE                 CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 29, METHOD_BUFFERED, FILE_ANY_ACCESS)
 #define FSCTL_IS_VOLUME_DIRTY           CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 30, METHOD_BUFFERED, FILE_ANY_ACCESS)
 #define FSCTL_GET_HFS_INFORMATION       CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 31, METHOD_BUFFERED, FILE_ANY_ACCESS)
 #define FSCTL_ALLOW_EXTENDED_DASD_IO    CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 32, METHOD_NEITHER,  FILE_ANY_ACCESS)
@@ -136,28 +136,28 @@
 #define FSCTL_FIND_FILES_BY_SID         CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 35, METHOD_NEITHER, FILE_ANY_ACCESS)
 /* decommissioned fsctl value                                             36                                     */
 #define FSCTL_DUMP_PROPERTY_DATA        CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 37,  METHOD_NEITHER, FILE_ANY_ACCESS)
-#define FSCTL_SET_OBJECT_ID             CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 38, METHOD_BUFFERED, FILE_WRITE_DATA) 
-#define FSCTL_GET_OBJECT_ID             CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 39, METHOD_BUFFERED, FILE_ANY_ACCESS) 
+#define FSCTL_SET_OBJECT_ID             CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 38, METHOD_BUFFERED, FILE_WRITE_DATA)
+#define FSCTL_GET_OBJECT_ID             CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 39, METHOD_BUFFERED, FILE_ANY_ACCESS)
 #define FSCTL_DELETE_OBJECT_ID          CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 40, METHOD_BUFFERED, FILE_WRITE_DATA)
-#define FSCTL_SET_REPARSE_POINT         CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 41, METHOD_BUFFERED, FILE_WRITE_DATA) 
-#define FSCTL_GET_REPARSE_POINT         CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 42, METHOD_BUFFERED, FILE_ANY_ACCESS) 
-#define FSCTL_DELETE_REPARSE_POINT      CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 43, METHOD_BUFFERED, FILE_WRITE_DATA) 
-#define FSCTL_ENUM_USN_DATA             CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 44,  METHOD_NEITHER, FILE_READ_DATA)  
-#define FSCTL_SECURITY_ID_CHECK         CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 45,  METHOD_NEITHER, FILE_READ_DATA)  
-#define FSCTL_READ_USN_JOURNAL          CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 46,  METHOD_NEITHER, FILE_READ_DATA)  
+#define FSCTL_SET_REPARSE_POINT         CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 41, METHOD_BUFFERED, FILE_WRITE_DATA)
+#define FSCTL_GET_REPARSE_POINT         CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 42, METHOD_BUFFERED, FILE_ANY_ACCESS)
+#define FSCTL_DELETE_REPARSE_POINT      CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 43, METHOD_BUFFERED, FILE_WRITE_DATA)
+#define FSCTL_ENUM_USN_DATA             CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 44,  METHOD_NEITHER, FILE_READ_DATA)
+#define FSCTL_SECURITY_ID_CHECK         CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 45,  METHOD_NEITHER, FILE_READ_DATA)
+#define FSCTL_READ_USN_JOURNAL          CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 46,  METHOD_NEITHER, FILE_READ_DATA)
 #define FSCTL_SET_OBJECT_ID_EXTENDED    CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 47, METHOD_BUFFERED, FILE_WRITE_DATA
-#define FSCTL_CREATE_OR_GET_OBJECT_ID   CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 48, METHOD_BUFFERED, FILE_ANY_ACCESS) 
+#define FSCTL_CREATE_OR_GET_OBJECT_ID   CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 48, METHOD_BUFFERED, FILE_ANY_ACCESS)
 #define FSCTL_SET_SPARSE                CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 49, METHOD_BUFFERED, FILE_WRITE_DATA)
-#define FSCTL_SET_ZERO_DATA             CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 50, METHOD_BUFFERED, FILE_WRITE_DATA) 
-#define FSCTL_QUERY_ALLOCATED_RANGES    CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 51,  METHOD_NEITHER, FILE_READ_DATA)  
+#define FSCTL_SET_ZERO_DATA             CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 50, METHOD_BUFFERED, FILE_WRITE_DATA)
+#define FSCTL_QUERY_ALLOCATED_RANGES    CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 51,  METHOD_NEITHER, FILE_READ_DATA)
 #define FSCTL_ENABLE_UPGRADE            CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 52, METHOD_BUFFERED, FILE_WRITE_DATA)
-#define FSCTL_SET_ENCRYPTION            CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 53, METHOD_BUFFERED, FILE_ANY_ACCESS) 
+#define FSCTL_SET_ENCRYPTION            CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 53, METHOD_BUFFERED, FILE_ANY_ACCESS)
 #define FSCTL_ENCRYPTION_FSCTL_IO       CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 54,  METHOD_NEITHER, FILE_ANY_ACCESS)
-#define FSCTL_WRITE_RAW_ENCRYPTED       CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 55,  METHOD_NEITHER, FILE_ANY_ACCESS) 
-#define FSCTL_READ_RAW_ENCRYPTED        CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 56,  METHOD_NEITHER, FILE_ANY_ACCESS) 
-#define FSCTL_CREATE_USN_JOURNAL        CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 57,  METHOD_NEITHER, FILE_READ_DATA)  
-#define FSCTL_READ_FILE_USN_DATA        CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 58,  METHOD_NEITHER, FILE_READ_DATA)  
-#define FSCTL_WRITE_USN_CLOSE_RECORD    CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 59,  METHOD_NEITHER, FILE_READ_DATA)  
+#define FSCTL_WRITE_RAW_ENCRYPTED       CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 55,  METHOD_NEITHER, FILE_ANY_ACCESS)
+#define FSCTL_READ_RAW_ENCRYPTED        CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 56,  METHOD_NEITHER, FILE_ANY_ACCESS)
+#define FSCTL_CREATE_USN_JOURNAL        CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 57,  METHOD_NEITHER, FILE_READ_DATA)
+#define FSCTL_READ_FILE_USN_DATA        CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 58,  METHOD_NEITHER, FILE_READ_DATA)
+#define FSCTL_WRITE_USN_CLOSE_RECORD    CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 59,  METHOD_NEITHER, FILE_READ_DATA)
 #define FSCTL_EXTEND_VOLUME             CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 60, METHOD_BUFFERED, FILE_ANY_ACCESS)
 /* End: _WIN32_WINNT >= 0x0500 */
 
@@ -173,7 +173,7 @@
 #define IOCTL_STORAGE_FIND_NEW_DEVICES   CTL_CODE(IOCTL_STORAGE_BASE, 0x0206, METHOD_BUFFERED, FILE_READ_ACCESS)
 #define IOCTL_STORAGE_EJECTION_CONTROL   CTL_CODE(IOCTL_STORAGE_BASE, 0x0250, METHOD_BUFFERED, FILE_ANY_ACCESS)
 #define IOCTL_STORAGE_MCN_CONTROL        CTL_CODE(IOCTL_STORAGE_BASE, 0x0251, METHOD_BUFFERED, FILE_ANY_ACCESS)
- 
+
 #define IOCTL_STORAGE_GET_MEDIA_TYPES    CTL_CODE(IOCTL_STORAGE_BASE, 0x0300, METHOD_BUFFERED, FILE_ANY_ACCESS)
 #define IOCTL_STORAGE_GET_MEDIA_TYPES_EX CTL_CODE(IOCTL_STORAGE_BASE, 0x0301, METHOD_BUFFERED, FILE_ANY_ACCESS)
 
@@ -209,12 +209,12 @@
 #define IOCTL_DISK_GET_MEDIA_TYPES      CTL_CODE(IOCTL_DISK_BASE, 0x0300, METHOD_BUFFERED, FILE_ANY_ACCESS)
 
 
-/* Start: For _WIN32_WINNT >= 0x0400 */ 
+/* Start: For _WIN32_WINNT >= 0x0400 */
 #define IOCTL_DISK_CONTROLLER_NUMBER    CTL_CODE(IOCTL_DISK_BASE, 0x0011, METHOD_BUFFERED, FILE_ANY_ACCESS)
 #define SMART_GET_VERSION               CTL_CODE(IOCTL_DISK_BASE, 0x0020, METHOD_BUFFERED, FILE_READ_ACCESS)
 #define SMART_SEND_DRIVE_COMMAND        CTL_CODE(IOCTL_DISK_BASE, 0x0021, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
 #define SMART_RCV_DRIVE_DATA            CTL_CODE(IOCTL_DISK_BASE, 0x0022, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
-/* End: For _WIN32_WINNT >= 0x0400 */ 
+/* End: For _WIN32_WINNT >= 0x0400 */
 
 #define IOCTL_SERIAL_LSRMST_INSERT      CTL_CODE(FILE_DEVICE_SERIAL_PORT,31,METHOD_BUFFERED,FILE_ANY_ACCESS)
 
@@ -240,7 +240,7 @@
     Unknown, F5_1Pt2_512, F3_1Pt44_512, F3_2Pt88_512, F3_20Pt8_512, F3_720_512, F5_360_512,
     F5_320_512, F5_320_1024, F5_180_512, F5_160_512, RemovableMedia, FixedMedia, F3_120M_512,
     F3_640_512, F5_640_512, F5_720_512, F3_1Pt2_512, F3_1Pt23_1024, F5_1Pt23_1024, F3_128Mb_512,
-    F3_230Mb_512, F8_256_128 
+    F3_230Mb_512, F8_256_128
 } MEDIA_TYPE, *PMEDIA_TYPE;
 
 typedef struct _FORMAT_PARAMETERS {
@@ -250,10 +250,10 @@
    DWORD                StartHeadNumber;
    DWORD                EndHeadNumber;
 } FORMAT_PARAMETERS, *PFORMAT_PARAMETERS;
- 
+
 typedef WORD   BAD_TRACK_NUMBER;
 typedef WORD   *PBAD_TRACK_NUMBER;
- 
+
 typedef struct _FORMAT_EX_PARAMETERS {
    MEDIA_TYPE           MediaType;
    DWORD                StartCylinderNumber;
@@ -264,7 +264,7 @@
    WORD                 SectorsPerTrack;
    WORD                 SectorNumber[1];
 } FORMAT_EX_PARAMETERS, *PFORMAT_EX_PARAMETERS;
- 
+
 typedef struct _DISK_GEOMETRY {
     LARGE_INTEGER       Cylinders;
     MEDIA_TYPE          MediaType;
@@ -272,7 +272,7 @@
     DWORD               SectorsPerTrack;
     DWORD               BytesPerSector;
 } DISK_GEOMETRY, *PDISK_GEOMETRY;
- 
+
 typedef struct _PARTITION_INFORMATION {
     LARGE_INTEGER       StartingOffset;
     LARGE_INTEGER       PartitionLength;
@@ -283,28 +283,28 @@
     BOOLEAN             RecognizedPartition;
     BOOLEAN             RewritePartition;
 } PARTITION_INFORMATION, *PPARTITION_INFORMATION;
- 
+
 typedef struct _SET_PARTITION_INFORMATION {
     BYTE                PartitionType;
 } SET_PARTITION_INFORMATION, *PSET_PARTITION_INFORMATION;
- 
+
 typedef struct _DRIVE_LAYOUT_INFORMATION {
     DWORD               PartitionCount;
     DWORD               Signature;
     PARTITION_INFORMATION PartitionEntry[1];
 } DRIVE_LAYOUT_INFORMATION, *PDRIVE_LAYOUT_INFORMATION;
- 
+
 typedef struct _VERIFY_INFORMATION {
     LARGE_INTEGER       StartingOffset;
     DWORD               Length;
 } VERIFY_INFORMATION, *PVERIFY_INFORMATION;
- 
+
 typedef struct _REASSIGN_BLOCKS {
     WORD                Reserved;
     WORD                Count;
     DWORD               BlockNumber[1];
 } REASSIGN_BLOCKS, *PREASSIGN_BLOCKS;
- 
+
 #if(_WIN32_WINNT >= 0x0400)
 typedef struct _DISK_CONTROLLER_NUMBER {
     DWORD               ControllerNumber;
@@ -317,15 +317,15 @@
  */
 typedef struct tagDIOCRegs {
     DWORD   reg_EBX;
-    DWORD   reg_EDX;      
-    DWORD   reg_ECX;      
+    DWORD   reg_EDX;
+    DWORD   reg_ECX;
     DWORD   reg_EAX;
     DWORD   reg_EDI;
     DWORD   reg_ESI;
     DWORD   reg_Flags;
-} DIOC_REGISTERS, *PDIOC_REGISTERS;         
+} DIOC_REGISTERS, *PDIOC_REGISTERS;
 
-/* Start VWIN32 information: 
+/* Start VWIN32 information:
  * VWIN32 is a VxD which supports the MSDOS Io routines.
  */
 #define VWIN32_DIOC_DOS_IOCTL     1 /* This is the specified MS-DOS device I/O ctl - Interrupt 21h Function 4400h - 4411h */
@@ -368,7 +368,7 @@
 
 /* FileFsLabelInformation = 2 */
 /*
- unknown 
+ unknown
 */
 
 /* FileFsSizeInformation = 3 */
diff --git a/include/winnls.h b/include/winnls.h
index 9d31397..7cec81b 100644
--- a/include/winnls.h
+++ b/include/winnls.h
@@ -27,12 +27,12 @@
 #endif
 
 
-#define MB_PRECOMPOSED              0x00000001 
+#define MB_PRECOMPOSED              0x00000001
 #define MB_COMPOSITE                0x00000002
 #define MB_USEGLYPHCHARS            0x00000004
 #define MB_ERR_INVALID_CHARS        0x00000008
 
-#define LCID_INSTALLED              0x00000001 
+#define LCID_INSTALLED              0x00000001
 
 /* flags to GetLocaleInfo */
 #define	LOCALE_NOUSEROVERRIDE	    0x80000000
@@ -44,106 +44,106 @@
 /* When adding new defines, don't forget to add an entry to the
  * locale_name2id map in ole/ole2nls.c
  */
-#define LOCALE_ILANGUAGE            0x00000001   
-#define LOCALE_SLANGUAGE            0x00000002   
-#define LOCALE_SENGLANGUAGE         0x00001001   
-#define LOCALE_SABBREVLANGNAME      0x00000003   
-#define LOCALE_SNATIVELANGNAME      0x00000004   
-#define LOCALE_ICOUNTRY             0x00000005   
-#define LOCALE_SCOUNTRY             0x00000006   
-#define LOCALE_SENGCOUNTRY          0x00001002   
-#define LOCALE_SABBREVCTRYNAME      0x00000007   
-#define LOCALE_SNATIVECTRYNAME      0x00000008   
-#define LOCALE_IDEFAULTLANGUAGE     0x00000009   
-#define LOCALE_IDEFAULTCOUNTRY      0x0000000A   
-#define LOCALE_IDEFAULTCODEPAGE     0x0000000B   
-#define LOCALE_IDEFAULTANSICODEPAGE 0x00001004   
+#define LOCALE_ILANGUAGE            0x00000001
+#define LOCALE_SLANGUAGE            0x00000002
+#define LOCALE_SENGLANGUAGE         0x00001001
+#define LOCALE_SABBREVLANGNAME      0x00000003
+#define LOCALE_SNATIVELANGNAME      0x00000004
+#define LOCALE_ICOUNTRY             0x00000005
+#define LOCALE_SCOUNTRY             0x00000006
+#define LOCALE_SENGCOUNTRY          0x00001002
+#define LOCALE_SABBREVCTRYNAME      0x00000007
+#define LOCALE_SNATIVECTRYNAME      0x00000008
+#define LOCALE_IDEFAULTLANGUAGE     0x00000009
+#define LOCALE_IDEFAULTCOUNTRY      0x0000000A
+#define LOCALE_IDEFAULTCODEPAGE     0x0000000B
+#define LOCALE_IDEFAULTANSICODEPAGE 0x00001004
 #define LOCALE_IDEFAULTMACCODEPAGE  0x00001011
-#define LOCALE_SLIST                0x0000000C   
-#define LOCALE_IMEASURE             0x0000000D   
-#define LOCALE_SDECIMAL             0x0000000E   
-#define LOCALE_STHOUSAND            0x0000000F   
-#define LOCALE_SGROUPING            0x00000010   
-#define LOCALE_IDIGITS              0x00000011   
-#define LOCALE_ILZERO               0x00000012   
-#define LOCALE_INEGNUMBER           0x00001010   
-#define LOCALE_SNATIVEDIGITS        0x00000013   
-#define LOCALE_SCURRENCY            0x00000014   
-#define LOCALE_SINTLSYMBOL          0x00000015   
-#define LOCALE_SMONDECIMALSEP       0x00000016   
-#define LOCALE_SMONTHOUSANDSEP      0x00000017   
-#define LOCALE_SMONGROUPING         0x00000018   
-#define LOCALE_ICURRDIGITS          0x00000019   
-#define LOCALE_IINTLCURRDIGITS      0x0000001A   
-#define LOCALE_ICURRENCY            0x0000001B   
-#define LOCALE_INEGCURR             0x0000001C   
-#define LOCALE_SDATE                0x0000001D   
-#define LOCALE_STIME                0x0000001E   
-#define LOCALE_SSHORTDATE           0x0000001F   
-#define LOCALE_SLONGDATE            0x00000020   
-#define LOCALE_STIMEFORMAT          0x00001003   
-#define LOCALE_IDATE                0x00000021   
-#define LOCALE_ILDATE               0x00000022   
-#define LOCALE_ITIME                0x00000023   
-#define LOCALE_ITIMEMARKPOSN        0x00001005   
-#define LOCALE_ICENTURY             0x00000024   
-#define LOCALE_ITLZERO              0x00000025   
-#define LOCALE_IDAYLZERO            0x00000026   
-#define LOCALE_IMONLZERO            0x00000027   
-#define LOCALE_S1159                0x00000028   
-#define LOCALE_S2359                0x00000029   
-#define LOCALE_ICALENDARTYPE        0x00001009   
-#define LOCALE_IOPTIONALCALENDAR    0x0000100B   
-#define LOCALE_IFIRSTDAYOFWEEK      0x0000100C   
-#define LOCALE_IFIRSTWEEKOFYEAR     0x0000100D   
-#define LOCALE_SDAYNAME1            0x0000002A   
-#define LOCALE_SDAYNAME2            0x0000002B   
-#define LOCALE_SDAYNAME3            0x0000002C   
-#define LOCALE_SDAYNAME4            0x0000002D   
-#define LOCALE_SDAYNAME5            0x0000002E   
-#define LOCALE_SDAYNAME6            0x0000002F   
-#define LOCALE_SDAYNAME7            0x00000030   
-#define LOCALE_SABBREVDAYNAME1      0x00000031   
-#define LOCALE_SABBREVDAYNAME2      0x00000032   
-#define LOCALE_SABBREVDAYNAME3      0x00000033   
-#define LOCALE_SABBREVDAYNAME4      0x00000034   
-#define LOCALE_SABBREVDAYNAME5      0x00000035   
-#define LOCALE_SABBREVDAYNAME6      0x00000036   
-#define LOCALE_SABBREVDAYNAME7      0x00000037   
-#define LOCALE_SMONTHNAME1          0x00000038   
-#define LOCALE_SMONTHNAME2          0x00000039   
-#define LOCALE_SMONTHNAME3          0x0000003A   
-#define LOCALE_SMONTHNAME4          0x0000003B   
-#define LOCALE_SMONTHNAME5          0x0000003C   
-#define LOCALE_SMONTHNAME6          0x0000003D   
-#define LOCALE_SMONTHNAME7          0x0000003E   
-#define LOCALE_SMONTHNAME8          0x0000003F   
-#define LOCALE_SMONTHNAME9          0x00000040   
-#define LOCALE_SMONTHNAME10         0x00000041   
-#define LOCALE_SMONTHNAME11         0x00000042   
-#define LOCALE_SMONTHNAME12         0x00000043   
-#define LOCALE_SMONTHNAME13         0x0000100E   
-#define LOCALE_SABBREVMONTHNAME1    0x00000044   
-#define LOCALE_SABBREVMONTHNAME2    0x00000045   
-#define LOCALE_SABBREVMONTHNAME3    0x00000046   
-#define LOCALE_SABBREVMONTHNAME4    0x00000047   
-#define LOCALE_SABBREVMONTHNAME5    0x00000048   
-#define LOCALE_SABBREVMONTHNAME6    0x00000049   
-#define LOCALE_SABBREVMONTHNAME7    0x0000004A   
-#define LOCALE_SABBREVMONTHNAME8    0x0000004B   
-#define LOCALE_SABBREVMONTHNAME9    0x0000004C   
-#define LOCALE_SABBREVMONTHNAME10   0x0000004D   
-#define LOCALE_SABBREVMONTHNAME11   0x0000004E   
-#define LOCALE_SABBREVMONTHNAME12   0x0000004F   
-#define LOCALE_SABBREVMONTHNAME13   0x0000100F   
-#define LOCALE_SPOSITIVESIGN        0x00000050   
-#define LOCALE_SNEGATIVESIGN        0x00000051   
-#define LOCALE_IPOSSIGNPOSN         0x00000052   
-#define LOCALE_INEGSIGNPOSN         0x00000053   
-#define LOCALE_IPOSSYMPRECEDES      0x00000054   
-#define LOCALE_IPOSSEPBYSPACE       0x00000055   
-#define LOCALE_INEGSYMPRECEDES      0x00000056   
-#define LOCALE_INEGSEPBYSPACE       0x00000057   
+#define LOCALE_SLIST                0x0000000C
+#define LOCALE_IMEASURE             0x0000000D
+#define LOCALE_SDECIMAL             0x0000000E
+#define LOCALE_STHOUSAND            0x0000000F
+#define LOCALE_SGROUPING            0x00000010
+#define LOCALE_IDIGITS              0x00000011
+#define LOCALE_ILZERO               0x00000012
+#define LOCALE_INEGNUMBER           0x00001010
+#define LOCALE_SNATIVEDIGITS        0x00000013
+#define LOCALE_SCURRENCY            0x00000014
+#define LOCALE_SINTLSYMBOL          0x00000015
+#define LOCALE_SMONDECIMALSEP       0x00000016
+#define LOCALE_SMONTHOUSANDSEP      0x00000017
+#define LOCALE_SMONGROUPING         0x00000018
+#define LOCALE_ICURRDIGITS          0x00000019
+#define LOCALE_IINTLCURRDIGITS      0x0000001A
+#define LOCALE_ICURRENCY            0x0000001B
+#define LOCALE_INEGCURR             0x0000001C
+#define LOCALE_SDATE                0x0000001D
+#define LOCALE_STIME                0x0000001E
+#define LOCALE_SSHORTDATE           0x0000001F
+#define LOCALE_SLONGDATE            0x00000020
+#define LOCALE_STIMEFORMAT          0x00001003
+#define LOCALE_IDATE                0x00000021
+#define LOCALE_ILDATE               0x00000022
+#define LOCALE_ITIME                0x00000023
+#define LOCALE_ITIMEMARKPOSN        0x00001005
+#define LOCALE_ICENTURY             0x00000024
+#define LOCALE_ITLZERO              0x00000025
+#define LOCALE_IDAYLZERO            0x00000026
+#define LOCALE_IMONLZERO            0x00000027
+#define LOCALE_S1159                0x00000028
+#define LOCALE_S2359                0x00000029
+#define LOCALE_ICALENDARTYPE        0x00001009
+#define LOCALE_IOPTIONALCALENDAR    0x0000100B
+#define LOCALE_IFIRSTDAYOFWEEK      0x0000100C
+#define LOCALE_IFIRSTWEEKOFYEAR     0x0000100D
+#define LOCALE_SDAYNAME1            0x0000002A
+#define LOCALE_SDAYNAME2            0x0000002B
+#define LOCALE_SDAYNAME3            0x0000002C
+#define LOCALE_SDAYNAME4            0x0000002D
+#define LOCALE_SDAYNAME5            0x0000002E
+#define LOCALE_SDAYNAME6            0x0000002F
+#define LOCALE_SDAYNAME7            0x00000030
+#define LOCALE_SABBREVDAYNAME1      0x00000031
+#define LOCALE_SABBREVDAYNAME2      0x00000032
+#define LOCALE_SABBREVDAYNAME3      0x00000033
+#define LOCALE_SABBREVDAYNAME4      0x00000034
+#define LOCALE_SABBREVDAYNAME5      0x00000035
+#define LOCALE_SABBREVDAYNAME6      0x00000036
+#define LOCALE_SABBREVDAYNAME7      0x00000037
+#define LOCALE_SMONTHNAME1          0x00000038
+#define LOCALE_SMONTHNAME2          0x00000039
+#define LOCALE_SMONTHNAME3          0x0000003A
+#define LOCALE_SMONTHNAME4          0x0000003B
+#define LOCALE_SMONTHNAME5          0x0000003C
+#define LOCALE_SMONTHNAME6          0x0000003D
+#define LOCALE_SMONTHNAME7          0x0000003E
+#define LOCALE_SMONTHNAME8          0x0000003F
+#define LOCALE_SMONTHNAME9          0x00000040
+#define LOCALE_SMONTHNAME10         0x00000041
+#define LOCALE_SMONTHNAME11         0x00000042
+#define LOCALE_SMONTHNAME12         0x00000043
+#define LOCALE_SMONTHNAME13         0x0000100E
+#define LOCALE_SABBREVMONTHNAME1    0x00000044
+#define LOCALE_SABBREVMONTHNAME2    0x00000045
+#define LOCALE_SABBREVMONTHNAME3    0x00000046
+#define LOCALE_SABBREVMONTHNAME4    0x00000047
+#define LOCALE_SABBREVMONTHNAME5    0x00000048
+#define LOCALE_SABBREVMONTHNAME6    0x00000049
+#define LOCALE_SABBREVMONTHNAME7    0x0000004A
+#define LOCALE_SABBREVMONTHNAME8    0x0000004B
+#define LOCALE_SABBREVMONTHNAME9    0x0000004C
+#define LOCALE_SABBREVMONTHNAME10   0x0000004D
+#define LOCALE_SABBREVMONTHNAME11   0x0000004E
+#define LOCALE_SABBREVMONTHNAME12   0x0000004F
+#define LOCALE_SABBREVMONTHNAME13   0x0000100F
+#define LOCALE_SPOSITIVESIGN        0x00000050
+#define LOCALE_SNEGATIVESIGN        0x00000051
+#define LOCALE_IPOSSIGNPOSN         0x00000052
+#define LOCALE_INEGSIGNPOSN         0x00000053
+#define LOCALE_IPOSSYMPRECEDES      0x00000054
+#define LOCALE_IPOSSEPBYSPACE       0x00000055
+#define LOCALE_INEGSYMPRECEDES      0x00000056
+#define LOCALE_INEGSEPBYSPACE       0x00000057
 #define	LOCALE_FONTSIGNATURE        0x00000058
 #define LOCALE_SISO639LANGNAME      0x00000059
 #define LOCALE_SISO3166CTRYNAME     0x0000005A
@@ -214,7 +214,7 @@
 	IS_TEXT_UNICODE_SIGNATURE| \
 	IS_TEXT_UNICODE_ODD_LENGTH
 
-        
+
 /* Character Type Flags */
 #define	CT_CTYPE1		0x00000001	/* usual ctype */
 #define	CT_CTYPE2		0x00000002	/* bidirectional layout info */
diff --git a/include/winnt.h b/include/winnt.h
index 92d4d36..a3fa086 100644
--- a/include/winnt.h
+++ b/include/winnt.h
@@ -30,12 +30,12 @@
 #endif
 
 
-/* On Windows winnt.h depends on a few windef.h types and macros and thus 
- * is not self-contained. Furthermore windef.h includes winnt.h so that it 
+/* On Windows winnt.h depends on a few windef.h types and macros and thus
+ * is not self-contained. Furthermore windef.h includes winnt.h so that it
  * would be pointless to try to use winnt.h directly.
- * But for Wine and Winelib I decided to make winnt.h self-contained by 
- * moving these definitions to winnt.h. It makes no difference to Winelib 
- * programs since they are not using winnt.h directly anyway, and it allows 
+ * But for Wine and Winelib I decided to make winnt.h self-contained by
+ * moving these definitions to winnt.h. It makes no difference to Winelib
+ * programs since they are not using winnt.h directly anyway, and it allows
  * us to use winnt.h and get a minimal set of definitions.
  */
 
@@ -327,17 +327,17 @@
 typedef const WCHAR    *PCWSTR,     *LPCWSTR;
 
 /* Neutral character and string types */
-/* These are only defined for Winelib, i.e. _not_ defined for 
- * the emulator. The reason is they depend on the UNICODE 
+/* These are only defined for Winelib, i.e. _not_ defined for
+ * the emulator. The reason is they depend on the UNICODE
  * macro which only exists in the user's code.
  */
 #ifndef __WINE__
 # ifdef WINE_UNICODE_REWRITE
 
-/* Use this if your compiler does not provide a 16bit wchar_t type. 
+/* Use this if your compiler does not provide a 16bit wchar_t type.
  * Note that you will need to specify -fwritable-strings or an option
  * to this effect.
- * In C++ both WINE_UNICODE_TEXT('c') and WINE_UNICODE_TEXT("str") are 
+ * In C++ both WINE_UNICODE_TEXT('c') and WINE_UNICODE_TEXT("str") are
  * supported, but only the string form can be supported in C.
  */
 EXTERN_C unsigned short* wine_rewrite_s4tos2(const wchar_t* str4);
@@ -358,12 +358,12 @@
 # else  /* WINE_UNICODE_REWRITE */
 
 /* Define WINE_UNICODE_NATIVE if:
- * - your compiler provides a 16bit wchar_t type, e.g. gcc >= 2.96 with 
+ * - your compiler provides a 16bit wchar_t type, e.g. gcc >= 2.96 with
  *   -fshort-wchar option
- * - or if you decide to use the native 32bit Unix wchar_t type. Be aware 
- *   though that the Wine APIs only support 16bit WCHAR characters for 
+ * - or if you decide to use the native 32bit Unix wchar_t type. Be aware
+ *   though that the Wine APIs only support 16bit WCHAR characters for
  *   binary compatibility reasons.
- * - or define nothing at all if you don't use Unicode, and blissfully 
+ * - or define nothing at all if you don't use Unicode, and blissfully
  *   ignore the issue :-)
  */
 #  define WINE_UNICODE_TEXT(string)   L##string
@@ -403,15 +403,15 @@
  * Here is the plan to convert Wine to STRICT:
  *
  * Types will be converted one at a time by volunteers who will compile
- * Wine with STRICT turned on. Handles that have not been converted yet 
- * will be declared with DECLARE_OLD_HANDLE. Converted handles are 
+ * Wine with STRICT turned on. Handles that have not been converted yet
+ * will be declared with DECLARE_OLD_HANDLE. Converted handles are
  * declared with DECLARE_HANDLE.
  * See the bug report 90 for more details:
  *    http://wine.codeweavers.com/bugzilla/show_bug.cgi?id=90
  */
 /*
- * when compiling Wine we always treat HANDLE as an UINT. Then when 
- * we're ready we'll remove the '!defined(__WINE__)' (the equivalent 
+ * when compiling Wine we always treat HANDLE as an UINT. Then when
+ * we're ready we'll remove the '!defined(__WINE__)' (the equivalent
  * of converting it from DECLARE_OLD_HANDLE to DECLARE_HANDLE).
  */
 #if defined(STRICT) && !defined(__WINE__)
@@ -604,11 +604,11 @@
 {
     DWORD   ControlWord;
     DWORD   StatusWord;
-    DWORD   TagWord;    
+    DWORD   TagWord;
     DWORD   ErrorOffset;
     DWORD   ErrorSelector;
     DWORD   DataOffset;
-    DWORD   DataSelector;    
+    DWORD   DataSelector;
     BYTE    RegisterArea[SIZE_OF_80387_REGISTERS];
     DWORD   Cr0NpxState;
 } FLOATING_SAVE_AREA, *PFLOATING_SAVE_AREA;
@@ -634,18 +634,18 @@
     DWORD   SegGs;
     DWORD   SegFs;
     DWORD   SegEs;
-    DWORD   SegDs;    
+    DWORD   SegDs;
 
     /* These are selected by CONTEXT_INTEGER */
     DWORD   Edi;
     DWORD   Esi;
     DWORD   Ebx;
-    DWORD   Edx;    
+    DWORD   Edx;
     DWORD   Ecx;
     DWORD   Eax;
 
     /* These are selected by CONTEXT_CONTROL */
-    DWORD   Ebp;    
+    DWORD   Ebp;
     DWORD   Eip;
     DWORD   SegCs;
     DWORD   EFlags;
@@ -684,7 +684,7 @@
 #ifdef _ALPHA_
 
 #define CONTEXT_ALPHA   0x00020000
- 
+
 #define CONTEXT_CONTROL		(CONTEXT_ALPHA | 0x00000001L)
 #define CONTEXT_FLOATING_POINT	(CONTEXT_ALPHA | 0x00000002L)
 #define CONTEXT_INTEGER		(CONTEXT_ALPHA | 0x00000004L)
@@ -999,10 +999,10 @@
 
 #ifdef __sparc__
 
-/* 
- * FIXME:  
+/*
+ * FIXME:
  *
- * There is no official CONTEXT structure defined for the SPARC 
+ * There is no official CONTEXT structure defined for the SPARC
  * architecture, so I just made one up.
  *
  * This structure is valid only for 32-bit SPARC architectures,
@@ -1012,8 +1012,8 @@
  * the rest of the register window chain is not visible.
  *
  * The layout follows the Solaris 'prgregset_t' structure.
- * 
- */ 
+ *
+ */
 
 #define CONTEXT_SPARC            0x10000000
 
@@ -1234,7 +1234,7 @@
 #define LANG_SYSTEM_DEFAULT	(MAKELANGID(LANG_NEUTRAL, SUBLANG_SYS_DEFAULT))
 #define LANG_USER_DEFAULT	(MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT))
 #define LOCALE_SYSTEM_DEFAULT	(MAKELCID(LANG_SYSTEM_DEFAULT, SORT_DEFAULT))
-#define LOCALE_USER_DEFAULT	(MAKELCID(LANG_USER_DEFAULT, SORT_DEFAULT)) 
+#define LOCALE_USER_DEFAULT	(MAKELCID(LANG_USER_DEFAULT, SORT_DEFAULT))
 #define LOCALE_NEUTRAL		(MAKELCID(MAKELANGID(LANG_NEUTRAL,SUBLANG_NEUTRAL),SORT_DEFAULT))
 
 /* FIXME: are the symbolic names correct for LIDs:  0x17, 0x20, 0x28,
@@ -1544,8 +1544,8 @@
 #define STATUS_IMAGE_MACHINE_TYPE_MISMATCH_EXE 0x40000023
 #define STATUS_NO_YIELD_PERFORMED        0x40000024
 #define STATUS_TIMER_RESUME_IGNORED      0x40000025
-	
-#define STATUS_GUARD_PAGE_VIOLATION      0x80000001    
+
+#define STATUS_GUARD_PAGE_VIOLATION      0x80000001
 #define STATUS_DATATYPE_MISALIGNMENT     0x80000002
 #define STATUS_BREAKPOINT                0x80000003
 #define STATUS_SINGLE_STEP               0x80000004
@@ -1707,7 +1707,7 @@
 #define STATUS_NO_TOKEN                  0xC000007C
 #define STATUS_BAD_INHERITANCE_ACL       0xC000007D
 #define STATUS_RANGE_NOT_LOCKED          0xC000007E
-#define STATUS_DISK_FULL                 0xC000007F 
+#define STATUS_DISK_FULL                 0xC000007F
 #define STATUS_SERVER_DISABLED           0xC0000080
 #define STATUS_SERVER_NOT_DISABLED       0xC0000081
 #define STATUS_TOO_MANY_GUIDS_REQUESTED  0xC0000082
@@ -2216,9 +2216,9 @@
 
 #define EXCEPTION_CONTINUABLE        0
 #define EXCEPTION_NONCONTINUABLE     EH_NONCONTINUABLE
- 
+
 /*
- * The exception record used by Win32 to give additional information 
+ * The exception record used by Win32 to give additional information
  * about exception to exception handlers.
  */
 
@@ -2239,8 +2239,8 @@
  * The exception pointers structure passed to exception filters
  * in except() and the UnhandledExceptionFilter().
  */
- 
-typedef struct _EXCEPTION_POINTERS 
+
+typedef struct _EXCEPTION_POINTERS
 {
   PEXCEPTION_RECORD  ExceptionRecord;
   PCONTEXT           ContextRecord;
@@ -2248,8 +2248,8 @@
 
 
 /*
- * The exception frame, used for registering exception handlers 
- * Win32 cares only about this, but compilers generally emit 
+ * The exception frame, used for registering exception handlers
+ * Win32 cares only about this, but compilers generally emit
  * larger exception frames for their own use.
  */
 
@@ -2283,7 +2283,7 @@
 #define DBG_CONTROL_BREAK           0x40010008
 #define DBG_EXCEPTION_NOT_HANDLED   0x80010001
 
-typedef struct _NT_TIB 
+typedef struct _NT_TIB
 {
 	struct _EXCEPTION_REGISTRATION_RECORD *ExceptionList;
 	PVOID StackBase;
@@ -2357,7 +2357,7 @@
  * This is the Windows executable (NE) header.
  * the name IMAGE_OS2_HEADER is misleading, but in the SDK this way.
  */
-typedef struct 
+typedef struct
 {
     WORD  ne_magic;             /* 00 NE signature 'NE' */
     BYTE  ne_ver;               /* 02 Linker version number */
@@ -2473,7 +2473,7 @@
 #define	IMAGE_FILE_MACHINE_R4000	0x166
 #define	IMAGE_FILE_MACHINE_R10000	0x168
 #define	IMAGE_FILE_MACHINE_ALPHA	0x184
-#define	IMAGE_FILE_MACHINE_POWERPC	0x1F0  
+#define	IMAGE_FILE_MACHINE_POWERPC	0x1F0
 
 #define	IMAGE_SIZEOF_FILE_HEADER	20
 
@@ -2621,8 +2621,8 @@
 #define IMAGE_SCN_CNT_INITIALIZED_DATA		0x00000040
 #define IMAGE_SCN_CNT_UNINITIALIZED_DATA	0x00000080
 
-#define	IMAGE_SCN_LNK_OTHER			0x00000100 
-#define	IMAGE_SCN_LNK_INFO			0x00000200  
+#define	IMAGE_SCN_LNK_OTHER			0x00000100
+#define	IMAGE_SCN_LNK_INFO			0x00000200
 /* #define	IMAGE_SCN_TYPE_OVER		0x00000400 - Reserved */
 #define	IMAGE_SCN_LNK_REMOVE			0x00000800
 #define	IMAGE_SCN_LNK_COMDAT			0x00001000
@@ -2877,7 +2877,7 @@
 	DWORD	ForwarderChain;	/* -1 if no forwarders */
 	DWORD	Name;
 	/* RVA to IAT (if bound this IAT has actual addresses) */
-	PIMAGE_THUNK_DATA FirstThunk;	
+	PIMAGE_THUNK_DATA FirstThunk;
 } IMAGE_IMPORT_DESCRIPTOR,*PIMAGE_IMPORT_DESCRIPTOR;
 
 #define	IMAGE_ORDINAL_FLAG		0x80000000
@@ -3261,7 +3261,7 @@
 } IMAGE_FUNCTION_ENTRY, *PIMAGE_FUNCTION_ENTRY;
 
 #define IMAGE_DEBUG_MISC_EXENAME    1
- 
+
 typedef struct _IMAGE_DEBUG_MISC {
     DWORD       DataType;
     DWORD       Length;
@@ -3311,7 +3311,7 @@
 
 /*
  * Here follows typedefs for security and tokens.
- */ 
+ */
 
 /*
  * First a constant for the following typdefs.
@@ -3327,17 +3327,17 @@
  */
 
 typedef enum _TOKEN_INFORMATION_CLASS {
-  TokenUser = 1, 
-  TokenGroups, 
-  TokenPrivileges, 
-  TokenOwner, 
-  TokenPrimaryGroup, 
-  TokenDefaultDacl, 
-  TokenSource, 
-  TokenType, 
-  TokenImpersonationLevel, 
-  TokenStatistics 
-} TOKEN_INFORMATION_CLASS; 
+  TokenUser = 1,
+  TokenGroups,
+  TokenPrivileges,
+  TokenOwner,
+  TokenPrimaryGroup,
+  TokenDefaultDacl,
+  TokenSource,
+  TokenType,
+  TokenImpersonationLevel,
+  TokenStatistics
+} TOKEN_INFORMATION_CLASS;
 
 #define TOKEN_TOKEN_ADJUST_DEFAULT   0x0080
 #define TOKEN_ADJUST_GROUPS          0x0040
@@ -3401,8 +3401,8 @@
 #define	SID_RECOMMENDED_SUB_AUTHORITIES	(1)	/* recommended subauths */
 
 
-/* 
- * ACL 
+/*
+ * ACL
  */
 
 #define ACL_REVISION1 1
@@ -3458,19 +3458,19 @@
     PACL Dacl;
 } SECURITY_DESCRIPTOR, *PSECURITY_DESCRIPTOR;
 
-#define SECURITY_DESCRIPTOR_MIN_LENGTH   (sizeof(SECURITY_DESCRIPTOR)) 
+#define SECURITY_DESCRIPTOR_MIN_LENGTH   (sizeof(SECURITY_DESCRIPTOR))
 
 #endif /* _SECURITY_DEFINED */
 
-/* 
+/*
  * SID_AND_ATTRIBUTES
  */
 
 typedef struct _SID_AND_ATTRIBUTES {
-  PSID  Sid; 
-  DWORD Attributes; 
-} SID_AND_ATTRIBUTES ; 
- 
+  PSID  Sid;
+  DWORD Attributes;
+} SID_AND_ATTRIBUTES ;
+
 /* security entities */
 #define SECURITY_NULL_RID			(0x00000000L)
 #define SECURITY_WORLD_RID			(0x00000000L)
@@ -3486,7 +3486,7 @@
 
 /* S-1-3 */
 #define SECURITY_CREATOR_SID_AUTHORITY		{0,0,0,0,0,3}
-#define SECURITY_CREATOR_OWNER_RID		(0x00000000L) 
+#define SECURITY_CREATOR_OWNER_RID		(0x00000000L)
 #define SECURITY_CREATOR_GROUP_RID		(0x00000001L)
 #define SECURITY_CREATOR_OWNER_SERVER_RID	(0x00000002L)
 #define SECURITY_CREATOR_GROUP_SERVER_RID	(0x00000003L)
@@ -3495,7 +3495,7 @@
 #define SECURITY_NON_UNIQUE_AUTHORITY		{0,0,0,0,0,4}
 
 /* S-1-5 */
-#define SECURITY_NT_AUTHORITY			{0,0,0,0,0,5} 
+#define SECURITY_NT_AUTHORITY			{0,0,0,0,0,5}
 #define SECURITY_DIALUP_RID                     0x00000001L
 #define SECURITY_NETWORK_RID                    0x00000002L
 #define SECURITY_BATCH_RID                      0x00000003L
@@ -3530,17 +3530,17 @@
  */
 
 typedef struct _TOKEN_USER {
-  SID_AND_ATTRIBUTES User; 
-} TOKEN_USER; 
+  SID_AND_ATTRIBUTES User;
+} TOKEN_USER;
 
 /*
  * TOKEN_GROUPS
  */
 
 typedef struct _TOKEN_GROUPS  {
-  DWORD GroupCount; 
-  SID_AND_ATTRIBUTES Groups[ANYSIZE_ARRAY]; 
-} TOKEN_GROUPS; 
+  DWORD GroupCount;
+  SID_AND_ATTRIBUTES Groups[ANYSIZE_ARRAY];
+} TOKEN_GROUPS;
 
 /*
  * LUID_AND_ATTRIBUTES
@@ -3603,63 +3603,63 @@
  */
 
 typedef struct _TOKEN_PRIVILEGES {
-  DWORD PrivilegeCount; 
-  LUID_AND_ATTRIBUTES Privileges[ANYSIZE_ARRAY]; 
-} TOKEN_PRIVILEGES, *PTOKEN_PRIVILEGES; 
+  DWORD PrivilegeCount;
+  LUID_AND_ATTRIBUTES Privileges[ANYSIZE_ARRAY];
+} TOKEN_PRIVILEGES, *PTOKEN_PRIVILEGES;
 
 /*
  * TOKEN_OWNER
  */
 
 typedef struct _TOKEN_OWNER {
-  PSID Owner; 
-} TOKEN_OWNER; 
+  PSID Owner;
+} TOKEN_OWNER;
 
 /*
  * TOKEN_PRIMARY_GROUP
  */
 
 typedef struct _TOKEN_PRIMARY_GROUP {
-  PSID PrimaryGroup; 
-} TOKEN_PRIMARY_GROUP; 
+  PSID PrimaryGroup;
+} TOKEN_PRIMARY_GROUP;
 
 
 /*
  * TOKEN_DEFAULT_DACL
  */
 
-typedef struct _TOKEN_DEFAULT_DACL { 
-  PACL DefaultDacl; 
-} TOKEN_DEFAULT_DACL; 
+typedef struct _TOKEN_DEFAULT_DACL {
+  PACL DefaultDacl;
+} TOKEN_DEFAULT_DACL;
 
 /*
  * TOKEN_SOURCEL
  */
 
 typedef struct _TOKEN_SOURCE {
-  char Sourcename[8]; 
-  LUID SourceIdentifier; 
-} TOKEN_SOURCE; 
+  char Sourcename[8];
+  LUID SourceIdentifier;
+} TOKEN_SOURCE;
 
 /*
  * TOKEN_TYPE
  */
 
 typedef enum tagTOKEN_TYPE {
-  TokenPrimary = 1, 
-  TokenImpersonation 
-} TOKEN_TYPE; 
+  TokenPrimary = 1,
+  TokenImpersonation
+} TOKEN_TYPE;
 
 /*
  * SECURITY_IMPERSONATION_LEVEL
  */
 
 typedef enum _SECURITY_IMPERSONATION_LEVEL {
-  SecurityAnonymous, 
-  SecurityIdentification, 
-  SecurityImpersonation, 
-  SecurityDelegation 
-} SECURITY_IMPERSONATION_LEVEL, *PSECURITY_IMPERSONATION_LEVEL; 
+  SecurityAnonymous,
+  SecurityIdentification,
+  SecurityImpersonation,
+  SecurityDelegation
+} SECURITY_IMPERSONATION_LEVEL, *PSECURITY_IMPERSONATION_LEVEL;
 
 
 typedef BOOLEAN SECURITY_CONTEXT_TRACKING_MODE,
@@ -3680,20 +3680,20 @@
  */
 
 typedef struct _TOKEN_STATISTICS {
-  LUID  TokenId; 
-  LUID  AuthenticationId; 
-  LARGE_INTEGER ExpirationTime; 
-  TOKEN_TYPE    TokenType; 
-  SECURITY_IMPERSONATION_LEVEL ImpersonationLevel; 
-  DWORD DynamicCharged; 
-  DWORD DynamicAvailable; 
-  DWORD GroupCount; 
-  DWORD PrivilegeCount; 
-  LUID  ModifiedId; 
-} TOKEN_STATISTICS; 
+  LUID  TokenId;
+  LUID  AuthenticationId;
+  LARGE_INTEGER ExpirationTime;
+  TOKEN_TYPE    TokenType;
+  SECURITY_IMPERSONATION_LEVEL ImpersonationLevel;
+  DWORD DynamicCharged;
+  DWORD DynamicAvailable;
+  DWORD GroupCount;
+  DWORD PrivilegeCount;
+  LUID  ModifiedId;
+} TOKEN_STATISTICS;
 
-/* 
- *	ACLs of NT 
+/*
+ *	ACLs of NT
  */
 
 #define	ACL_REVISION	2
@@ -3725,7 +3725,7 @@
 #define	SUCCESSFUL_ACCESS_ACE_FLAG	0x40
 #define	FAILED_ACCESS_ACE_FLAG		0x80
 
-/* different ACEs depending on AceType 
+/* different ACEs depending on AceType
  * SidStart marks the begin of a SID
  * so the thing finally looks like this:
  * 0: ACE_HEADER
@@ -3830,8 +3830,8 @@
 #define THREAD_DIRECT_IMPERSONATION 0x0200
 #define THREAD_ALL_ACCESS          (STANDARD_RIGHTS_REQUIRED|SYNCHRONIZE|0x3ff)
 
-#define THREAD_BASE_PRIORITY_LOWRT  15 
-#define THREAD_BASE_PRIORITY_MAX    2 
+#define THREAD_BASE_PRIORITY_LOWRT  15
+#define THREAD_BASE_PRIORITY_MAX    2
 #define THREAD_BASE_PRIORITY_MIN   -2
 #define THREAD_BASE_PRIORITY_IDLE  -15
 
@@ -4027,7 +4027,7 @@
                            SERVICE_DRIVER | SERVICE_INTERACTIVE_PROCESS )
 
 
-typedef enum _CM_SERVICE_NODE_TYPE 
+typedef enum _CM_SERVICE_NODE_TYPE
 {
   DriverType               = SERVICE_KERNEL_DRIVER,
   FileSystemType           = SERVICE_FILE_SYSTEM_DRIVER,
@@ -4037,7 +4037,7 @@
   RecognizerType           = SERVICE_RECOGNIZER_DRIVER
 } SERVICE_NODE_TYPE;
 
-typedef enum _CM_SERVICE_LOAD_TYPE 
+typedef enum _CM_SERVICE_LOAD_TYPE
 {
   BootLoad    = SERVICE_BOOT_START,
   SystemLoad  = SERVICE_SYSTEM_START,
@@ -4046,7 +4046,7 @@
   DisableLoad = SERVICE_DISABLED
 } SERVICE_LOAD_TYPE;
 
-typedef enum _CM_ERROR_CONTROL_TYPE 
+typedef enum _CM_ERROR_CONTROL_TYPE
 {
   IgnoreError   = SERVICE_ERROR_IGNORE,
   NormalError   = SERVICE_ERROR_NORMAL,
@@ -4064,7 +4064,7 @@
 
 #include "guiddef.h"
 
-typedef struct _RTL_CRITICAL_SECTION_DEBUG 
+typedef struct _RTL_CRITICAL_SECTION_DEBUG
 {
   WORD   Type;
   WORD   CreatorBackTraceIndex;
diff --git a/include/winreg.h b/include/winreg.h
index 098cb55..c5e7b63 100644
--- a/include/winreg.h
+++ b/include/winreg.h
@@ -39,7 +39,7 @@
 /*
  *	registry provider structs
  */
-typedef struct value_entA 
+typedef struct value_entA
 {   LPSTR	ve_valuename;
     DWORD	ve_valuelen;
     DWORD_PTR	ve_valueptr;
diff --git a/include/winsock.h b/include/winsock.h
index bc9f42a..e6452df 100644
--- a/include/winsock.h
+++ b/include/winsock.h
@@ -58,10 +58,10 @@
  */
 
 #ifndef __WINE_USE_MSVCRT
-/* Get the u_xxx types from the Unix headers. They will do and doing it 
- * this way will avoid redefinitions. But on FreeBSD we may get macros 
- * and prototypes for htonl & co. This means the functions will not be 
- * called because of the macros. So this should not harm us too much unless 
+/* Get the u_xxx types from the Unix headers. They will do and doing it
+ * this way will avoid redefinitions. But on FreeBSD we may get macros
+ * and prototypes for htonl & co. This means the functions will not be
+ * called because of the macros. So this should not harm us too much unless
  * we try to define our own prototypes (different calling convention).
  */
 # include <sys/types.h>
@@ -69,7 +69,7 @@
 #  define WS_DEFINE_HTONL
 # endif /* htonl */
 #else
-/* Since we are using the MSVCRT headers, we must define the u_xxx 
+/* Since we are using the MSVCRT headers, we must define the u_xxx
  * types ourselves.
  */
 typedef unsigned char u_char;
@@ -350,14 +350,14 @@
  */
 
 #if !defined(USE_WS_PREFIX) && !defined(__WINE_USE_MSVCRT)
-/* We are not using the WS_ prefix and not using the MSVCRT either so we 
+/* We are not using the WS_ prefix and not using the MSVCRT either so we
  * risk getting conflicts for everything related to select.
  */
 # ifdef FD_CLR
-/* Too late, the Unix version of stdlib.h was included before winsock.h. 
- * This means select and all the related stuff is already defined and we 
+/* Too late, the Unix version of stdlib.h was included before winsock.h.
+ * This means select and all the related stuff is already defined and we
  * cannot override types and function prototypes.
- * All we can do is disable all these symbols so that they are not used 
+ * All we can do is disable all these symbols so that they are not used
  * inadvertantly.
  */
 #  undef FD_SETSIZE
@@ -374,8 +374,8 @@
 #  define fd_set     Include_winsock_h_before_stdlib_h_or_use_the_MSVCRT_library
 #  define select     Include_winsock_h_before_stdlib_h_or_use_the_MSVCRT_library
 # else
-/* stdlib.h has not been included yet so it's not too late. Include it now 
- * making sure that none of the select symbols is affected. Then we can 
+/* stdlib.h has not been included yet so it's not too late. Include it now
+ * making sure that none of the select symbols is affected. Then we can
  * define them with our own values.
  */
 #  define fd_set unix_fd_set
@@ -449,7 +449,7 @@
     if (((cast*)(set))->fd_count < FD_SETSIZE) \
         ((cast*)(set))->fd_array[((cast*)(set))->fd_count++]=(fd); \
 } while(0)
-/* This version checks if the filedesc is already in the list, and appends it 
+/* This version checks if the filedesc is already in the list, and appends it
  * only if it's not the case
  */
 #define __WS_FD_SET2(fd, set, cast) do { \
@@ -486,8 +486,8 @@
 #endif /* WS_DEFINE_SELECT */
 
 
-/* 
- * Internet address (old style... should be updated) 
+/*
+ * Internet address (old style... should be updated)
  */
 
 #ifndef USE_WS_PREFIX
@@ -879,7 +879,7 @@
 /*
  * Prototypes
  *
- * Remember to keep this section in sync with the 
+ * Remember to keep this section in sync with the
  * "Winsock Function Typedefs" section in winsock2.h.
  */
 #if !defined(__WINE_WINSOCK2__) || WS_API_PROTOTYPES
diff --git a/include/winsock2.h b/include/winsock2.h
index 5f5eae6..15eb6af 100644
--- a/include/winsock2.h
+++ b/include/winsock2.h
@@ -263,7 +263,7 @@
 typedef struct _QUALITYOFSERVICE {
         FLOWSPEC           SendingFlowspec;
         FLOWSPEC           ReceivingFlowspec;
-        WSABUF             ProviderSpecific; 
+        WSABUF             ProviderSpecific;
    } QOS, *LPQOS;
 
 typedef int (CALLBACK *LPCONDITIONPROC)
@@ -291,7 +291,7 @@
 /*
  * Winsock Function Typedefs
  *
- * Remember to keep this section in sync with the 
+ * Remember to keep this section in sync with the
  * "Prototypes" section in winsock.h.
  */
 #if WS_API_TYPEDEFS
@@ -351,7 +351,7 @@
 /*
  * Winsock2 Prototypes
  *
- * Remember to keep this section in sync with the 
+ * Remember to keep this section in sync with the
  * "Winsock2 Function Typedefs" section below.
  */
 #if WS_API_PROTOTYPES
@@ -416,7 +416,7 @@
 /*
  * Winsock2 Function Typedefs
  *
- * Remember to keep this section in sync with the 
+ * Remember to keep this section in sync with the
  * "Winsock2 Prototypes" section above.
  */
 #if WS_API_TYPEDEFS
diff --git a/include/winspool.h b/include/winspool.h
index 1fece02..00954df 100644
--- a/include/winspool.h
+++ b/include/winspool.h
@@ -2,7 +2,7 @@
  *
  * Copyright 1998 Huw Davies, Andreas Mohr
  *
- * Portions Copyright (c) 1999 Corel Corporation 
+ * Portions Copyright (c) 1999 Corel Corporation
  *                             (Paul Quinn, Albert Den Haan)
  *
  * This library is free software; you can redistribute it and/or
@@ -285,16 +285,16 @@
   LPSTR     pName;
   LPSTR     pEnvironment;
   LPSTR     pDriverPath;
-  LPSTR     pDataFile; 
+  LPSTR     pDataFile;
   LPSTR     pConfigFile;
 } DRIVER_INFO_2A, *PDRIVER_INFO_2A, *LPDRIVER_INFO_2A;
 
 typedef struct _DRIVER_INFO_2W {
   DWORD   cVersion;
-  LPWSTR    pName;     
+  LPWSTR    pName;
   LPWSTR    pEnvironment;
   LPWSTR    pDriverPath;
-  LPWSTR    pDataFile; 
+  LPWSTR    pDataFile;
   LPWSTR    pConfigFile;
 } DRIVER_INFO_2W, *PDRIVER_INFO_2W, *LPDRIVER_INFO_2W;
 
@@ -351,7 +351,7 @@
 DECL_WINELIB_TYPE_AW(LPPRINTER_INFO_1)
 
 /* FIXME: winspool.h declares some structure members with the name Status.
- * unfortunatly <X11/ICE/ICElib.h> #defines Status to the type 'int' 
+ * unfortunatly <X11/ICE/ICElib.h> #defines Status to the type 'int'
  * therfore the following hack */
 #ifndef Status
 
@@ -410,7 +410,7 @@
 typedef struct _PRINTER_INFO_3 {
   PSECURITY_DESCRIPTOR pSecurityDescriptor;
 } PRINTER_INFO_3, *PPRINTER_INFO_3, *LPPRINTER_INFO_3;
-  
+
 typedef struct _PRINTER_INFO_4A {
   LPSTR     pPrinterName;
   LPSTR     pServerName;
@@ -512,7 +512,7 @@
   DWORD Time;
   DWORD PagesPrinted;
 } JOB_INFO_2A, *PJOB_INFO_2A, *LPJOB_INFO_2A;
-  
+
 typedef struct _JOB_INFO_2W {
   DWORD JobID;
   LPWSTR pPrinterName;
@@ -538,7 +538,7 @@
   DWORD Time;
   DWORD PagesPrinted;
 } JOB_INFO_2W, *PJOB_INFO_2W, *LPJOB_INFO_2W;
-  
+
 DECL_WINELIB_TYPE_AW(JOB_INFO_2)
 DECL_WINELIB_TYPE_AW(PJOB_INFO_2)
 DECL_WINELIB_TYPE_AW(LPJOB_INFO_2)
@@ -765,13 +765,13 @@
   LPSTR pName;
   LPSTR pEnvironment;
   LPSTR pDLLName;
-} PROVIDOR_INFO_1A, *PPROVIDOR_INFO_1A, *LPPROVIDOR_INFO_1A; 
+} PROVIDOR_INFO_1A, *PPROVIDOR_INFO_1A, *LPPROVIDOR_INFO_1A;
 
 typedef struct _PROVIDOR_INFO_1W {
   LPWSTR pName;
   LPWSTR pEnvironment;
   LPWSTR pDLLName;
-} PROVIDOR_INFO_1W, *PPROVIDOR_INFO_1W, *LPPROVIDOR_INFO_1W; 
+} PROVIDOR_INFO_1W, *PPROVIDOR_INFO_1W, *LPPROVIDOR_INFO_1W;
 
 DECL_WINELIB_TYPE_AW(PROVIDOR_INFO_1)
 DECL_WINELIB_TYPE_AW(PPROVIDOR_INFO_1)
@@ -879,15 +879,15 @@
 BOOL WINAPI DeletePrinter(HANDLE hPrinter);
 
 BOOL WINAPI SetPrinterA(HANDLE hPrinter, DWORD Level, LPBYTE pPrinter,
-			DWORD Command); 
+			DWORD Command);
 BOOL WINAPI SetPrinterW(HANDLE hPrinter, DWORD Level, LPBYTE pPrinter,
-			DWORD Command); 
+			DWORD Command);
 #define SetPrinter WINELIB_NAME_AW(SetPrinter)
 
 BOOL WINAPI GetPrinterA(HANDLE hPrinter, DWORD Level, LPBYTE pPrinter,
-			DWORD cbBuf, LPDWORD pcbNeeded); 
+			DWORD cbBuf, LPDWORD pcbNeeded);
 BOOL WINAPI GetPrinterW(HANDLE hPrinter, DWORD Level, LPBYTE pPrinter,
-			DWORD cbBuf, LPDWORD pcbNeeded); 
+			DWORD cbBuf, LPDWORD pcbNeeded);
 #define GetPrinter WINELIB_NAME_AW(GetPrinter)
 
 BOOL WINAPI AddPrinterDriverA(LPSTR pName, DWORD Level, LPBYTE pDriverInfo);
@@ -929,7 +929,7 @@
 #define EnumPrintProcessors WINELIB_NAME_AW(EnumPrintProcessors)
 
 BOOL WINAPI GetPrintProcessorDirectoryA(LPSTR pName, LPSTR pEnvironment,
-					DWORD Level, 
+					DWORD Level,
 					LPBYTE pPrintProcessorInfo,
 					DWORD cbBuf, LPDWORD pcbNeeded);
 
@@ -979,11 +979,11 @@
 BOOL WINAPI ScheduleJob(HANDLE hPrinter, DWORD JobID);
 
 LONG WINAPI AdvancedDocumentPropertiesA(HWND hWnd, HANDLE hPrinter,
-					LPSTR pDeviceName, 
+					LPSTR pDeviceName,
 					PDEVMODEA pDevModeOutput,
 					PDEVMODEA pDevModeInput);
 LONG WINAPI AdvancedDocumentPropertiesW(HWND hWnd, HANDLE hPrinter,
-					LPWSTR pDeviceName, 
+					LPWSTR pDeviceName,
 					PDEVMODEW pDevModeOutput,
 					PDEVMODEW pDevModeInput);
 #define AdvancedDocumentProperties WINELIB_NAME_AW(AdvancedDocumentProperties)
diff --git a/include/winuser.h b/include/winuser.h
index 5de2b96..b9bec44 100644
--- a/include/winuser.h
+++ b/include/winuser.h
@@ -1046,7 +1046,7 @@
 #define WM_IME_COMPOSITION          0x010f
 #define WM_IME_KEYLAST              0x010f
 
-#define WM_INITDIALOG       0x0110 
+#define WM_INITDIALOG       0x0110
 #define WM_COMMAND          0x0111
 #define WM_SYSCOMMAND       0x0112
 #define WM_TIMER	    0x0113
@@ -1103,7 +1103,7 @@
 
 #define WM_MOUSEFIRST       0x0200
 #define WM_MOUSELAST        0x020D
- 
+
 #define WHEEL_DELTA      120
 #define WHEEL_PAGESCROLL  (UINT_MAX)
 #define WM_PARENTNOTIFY     0x0210
@@ -1230,7 +1230,7 @@
 #define IDYES               6
 #define IDNO                7
 #define IDCLOSE             8
-#define IDHELP              9      
+#define IDHELP              9
 
 /****** Window classes ******/
 
@@ -1279,7 +1279,7 @@
     BYTE    rgbReserved[32];
 } PAINTSTRUCT, *PPAINTSTRUCT, *LPPAINTSTRUCT;
 
-typedef struct 
+typedef struct
 {
     HMENU   hWindowMenu;
     UINT    idFirstChild;
@@ -1315,7 +1315,7 @@
 DECL_WINELIB_TYPE_AW(MDICREATESTRUCT)
 DECL_WINELIB_TYPE_AW(LPMDICREATESTRUCT)
 
-#define MDITILE_VERTICAL     0x0000   
+#define MDITILE_VERTICAL     0x0000
 #define MDITILE_HORIZONTAL   0x0001
 #define MDITILE_SKIPDISABLED 0x0002
 
@@ -1521,7 +1521,7 @@
 #define PRF_ERASEBKGND      0x00000008L
 #define PRF_CHILDREN        0x00000010L
 #define PRF_OWNED           0x00000020L
- 
+
   /* Offsets for GetClassLong() and GetClassWord() */
 #define GCL_MENUNAME        (-8)
 #define GCL_HBRBACKGROUND   (-10)
@@ -1760,7 +1760,7 @@
 
 #define POINTSTOPOINT(pt, pts)                          \
         { (pt).x = (LONG)(SHORT)LOWORD(*(LONG*)&pts);   \
-          (pt).y = (LONG)(SHORT)HIWORD(*(LONG*)&pts); }          
+          (pt).y = (LONG)(SHORT)HIWORD(*(LONG*)&pts); }
 
 #define POINTTOPOINTS(pt)      (MAKELONG((short)((pt).x), (short)((pt).y)))
 
@@ -1800,7 +1800,7 @@
 #define TPM_NONOTIFY      0x0080
 #define TPM_RETURNCMD     0x0100
 
-typedef struct 
+typedef struct
 {
     UINT   cbSize;
     RECT   rcExclude;
@@ -1974,7 +1974,7 @@
 #define BST_CHECKED          0x0001
 #define BST_INDETERMINATE    0x0002
 #define BST_PUSHED           0x0004
-#define BST_FOCUS            0x0008      
+#define BST_FOCUS            0x0008
 
 /* Static Control Styles */
 #define SS_LEFT             0x00000000L
@@ -2043,7 +2043,7 @@
 
 typedef const SCROLLINFO *LPCSCROLLINFO;
 
-/* GetScrollInfo() flags */ 
+/* GetScrollInfo() flags */
 #define SIF_RANGE           0x0001
 #define SIF_PAGE            0x0002
 #define SIF_POS             0x0004
@@ -2520,7 +2520,7 @@
 #define MNC_IGNORE 0
 #define MNC_CLOSE 1
 #define MNC_EXECUTE 2
-#define MNC_SELECT 3 
+#define MNC_SELECT 3
 
 /* SystemParametersInfo */
 /* defines below are for all win versions */
@@ -3340,7 +3340,7 @@
 #define VK_NONAME           0xFC
 #define VK_PA1              0xFD
 #define VK_OEM_CLEAR        0xFE
-  
+
   /* Key status flags for mouse events */
 #define MK_LBUTTON	    0x0001
 #define MK_RBUTTON	    0x0002
diff --git a/include/winver.h b/include/winver.h
index e0cca01..7b8f907 100644
--- a/include/winver.h
+++ b/include/winver.h
@@ -1,5 +1,5 @@
 /* Definitions for the VERsion infolibrary (VER.DLL)
- * 
+ *
  * Copyright 1996 Marcus Meissner
  *
  * This library is free software; you can redistribute it and/or
diff --git a/include/wnaspi32.h b/include/wnaspi32.h
index 55327a5..9f89873 100644
--- a/include/wnaspi32.h
+++ b/include/wnaspi32.h
@@ -219,7 +219,7 @@
     SRB_GetDiskInfo	diskinfo;
 } SRB, *PSRB, *LPSRB;
 
-typedef struct tagASPI32BUFF { 
+typedef struct tagASPI32BUFF {
     LPBYTE AB_BufPointer;	/* pointer to buffer */
     DWORD AB_BufLen;		/* length of buffer */
     DWORD AB_ZeroFill;		/* set to 1 if zeroing */
diff --git a/include/wownt32.h b/include/wownt32.h
index 305b9ea..4d27fe5 100644
--- a/include/wownt32.h
+++ b/include/wownt32.h
@@ -1,5 +1,5 @@
 /*
- * WOW Generic Thunk API 
+ * WOW Generic Thunk API
  *
  * Copyright (C) 1999 Ulrich Weigand
  *
diff --git a/include/wtypes.h b/include/wtypes.h
index bc2dc4d..3960a83 100644
--- a/include/wtypes.h
+++ b/include/wtypes.h
@@ -59,10 +59,10 @@
 #endif
 
 typedef enum tagDVASPECT
-{ 
+{
        DVASPECT_CONTENT   = 1,
        DVASPECT_THUMBNAIL = 2,
-       DVASPECT_ICON      = 4,   
+       DVASPECT_ICON      = 4,
        DVASPECT_DOCPRINT  = 8
 } DVASPECT;
 
@@ -76,7 +76,7 @@
 } STGC;
 
 typedef enum tagSTGMOVE
-{   
+{
 	STGMOVE_MOVE = 0,
 	STGMOVE_COPY = 1,
 	STGMOVE_SHALLOWCOPY = 2
@@ -256,7 +256,7 @@
 } SID,*PSID;
 
 /*
- * ACL 
+ * ACL
  */
 
 typedef struct _ACL {
diff --git a/include/x11drv.h b/include/x11drv.h
index 3e6cd7b..ebcefb1 100644
--- a/include/x11drv.h
+++ b/include/x11drv.h
@@ -22,9 +22,9 @@
 #ifndef __WINE_X11DRV_H
 #define __WINE_X11DRV_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 <X11/Xlib.h>
 #include <X11/Xresource.h>
@@ -147,9 +147,9 @@
 extern BOOL X11DRV_PaintRgn( X11DRV_PDEVICE *physDev, HRGN hrgn );
 extern BOOL X11DRV_Polyline( X11DRV_PDEVICE *physDev,const POINT* pt,INT count);
 extern BOOL X11DRV_Polygon( X11DRV_PDEVICE *physDev, const POINT* pt, INT count );
-extern BOOL X11DRV_PolyPolygon( X11DRV_PDEVICE *physDev, const POINT* pt, 
+extern BOOL X11DRV_PolyPolygon( X11DRV_PDEVICE *physDev, const POINT* pt,
 				  const INT* counts, UINT polygons);
-extern BOOL X11DRV_PolyPolyline( X11DRV_PDEVICE *physDev, const POINT* pt, 
+extern BOOL X11DRV_PolyPolyline( X11DRV_PDEVICE *physDev, const POINT* pt,
 				  const DWORD* counts, DWORD polylines);
 
 extern COLORREF X11DRV_SetBkColor( X11DRV_PDEVICE *physDev, COLORREF color );
@@ -172,7 +172,7 @@
 /* OpenGL / X11 driver functions */
 extern int X11DRV_ChoosePixelFormat(X11DRV_PDEVICE *physDev,
 		                      const PIXELFORMATDESCRIPTOR *pppfd);
-extern int X11DRV_DescribePixelFormat(X11DRV_PDEVICE *physDev, 
+extern int X11DRV_DescribePixelFormat(X11DRV_PDEVICE *physDev,
 		                        int iPixelFormat, UINT nBytes,
 					PIXELFORMATDESCRIPTOR *ppfd);
 extern int X11DRV_GetPixelFormat(X11DRV_PDEVICE *physDev);
diff --git a/include/x11font.h b/include/x11font.h
index 17e02a0..eb05db3 100644
--- a/include/x11font.h
+++ b/include/x11font.h
@@ -25,7 +25,7 @@
 #include "x11drv.h"
 #include "pshpack1.h"
 
-/* this is a part of the font resource header, should 
+/* this is a part of the font resource header, should
  * make it easier to implement dynamic softfont loading */
 
 typedef struct
diff --git a/library/port.c b/library/port.c
index 96f0412..def9469 100644
--- a/library/port.c
+++ b/library/port.c
@@ -629,8 +629,8 @@
         return (unsigned short*)str4;
     }
 
-    /* Note that we can also end up here if the string has a single 
-     * character. In such a case we will convert the string over and 
+    /* Note that we can also end up here if the string has a single
+     * character. In such a case we will convert the string over and
      * over again. But this is harmless.
      */
     str2=s2=(unsigned short*)str4;
@@ -655,7 +655,7 @@
 {
     static char buf[40]; /* ought to be enough */
     char *dec;
-    sprintf(buf, "%.*e", ndigits /* FIXME wrong */, number); 
+    sprintf(buf, "%.*e", ndigits /* FIXME wrong */, number);
     *sign = (number < 0);
     dec = strchr(buf, '.');
     *decpt = (dec) ? (int)dec - (int)buf : -1;
@@ -727,8 +727,8 @@
 /*
  * As the earlier Sparc processors lack necessary atomic instructions,
  * I'm simply falling back to the library-provided _lwp_mutex routines
- * to ensure mutual exclusion in a way appropriate for the current 
- * architecture.  
+ * to ensure mutual exclusion in a way appropriate for the current
+ * architecture.
  *
  * FIXME:  If we have the compare-and-swap instruction (Sparc v9 and above)
  *         we could use this to speed up the Interlocked operations ...
diff --git a/loader/elf.c b/loader/elf.c
index 8dabd90..c861908 100644
--- a/loader/elf.c
+++ b/loader/elf.c
@@ -1,6 +1,6 @@
-/* 
+/*
  *	UNIX dynamic loader
- * 
+ *
  * Currently only supports stuff using the dl* API.
  *
  * Copyright 1998 Marcus Meissner
@@ -20,11 +20,11 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  *
  * FIXME: 	Small reentrancy problem.
- * IDEA(s):	could be used to split up shell32,comctl32... 
+ * IDEA(s):	could be used to split up shell32,comctl32...
  */
 
 #include "config.h"
-#include "wine/port.h" 
+#include "wine/port.h"
 
 #include <assert.h>
 #include <stdio.h>
@@ -70,19 +70,19 @@
 	PIMAGE_SECTION_HEADER	sh;
 	HMODULE hmod;
 
-	hmod = (HMODULE)HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, 
-                                     sizeof(IMAGE_DOS_HEADER) + 
+	hmod = (HMODULE)HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY,
+                                     sizeof(IMAGE_DOS_HEADER) +
                                      sizeof(IMAGE_NT_HEADERS) +
                                      sizeof(IMAGE_SECTION_HEADER) + STUBSIZE );
 	dh = (PIMAGE_DOS_HEADER)hmod;
 	dh->e_magic = IMAGE_DOS_SIGNATURE;
 	dh->e_lfanew = sizeof(IMAGE_DOS_HEADER);
 	nth = PE_HEADER(hmod);
-	nth->Signature = IMAGE_NT_SIGNATURE; 
+	nth->Signature = IMAGE_NT_SIGNATURE;
 	nth->FileHeader.Machine = IMAGE_FILE_MACHINE_I386;
 	nth->FileHeader.NumberOfSections = 1;
 	nth->FileHeader.SizeOfOptionalHeader = sizeof(IMAGE_OPTIONAL_HEADER);
-	nth->FileHeader.Characteristics = 
+	nth->FileHeader.Characteristics =
 		IMAGE_FILE_RELOCS_STRIPPED|IMAGE_FILE_LINE_NUMS_STRIPPED|
 		IMAGE_FILE_LOCAL_SYMS_STRIPPED|IMAGE_FILE_32BIT_MACHINE|
 		IMAGE_FILE_DLL|IMAGE_FILE_DEBUG_STRIPPED;
@@ -203,7 +203,7 @@
             }
         }
 	if (!fun) {
-		/* Function@nrofargs usually marks a stdcall function 
+		/* Function@nrofargs usually marks a stdcall function
 		 * with nrofargs bytes that are popped at the end
 		 */
             LPCSTR t;
@@ -218,7 +218,7 @@
                 HeapFree( GetProcessHeap(), 0, fn );
             }
 	}
-	/* We sometimes have Win32 dlls implemented using stdcall but UNIX 
+	/* We sometimes have Win32 dlls implemented using stdcall but UNIX
 	 * dlls using cdecl. If we find out the number of args the function
 	 * uses, we remove them from the stack using two small stubs.
 	 */
@@ -238,7 +238,7 @@
 		stub->origfun=(DWORD)fun; /* just a marker */
 
 	if (fun && nrofargs) { /* we don't need it for 0 args */
-		/* Selfmodifying entry/return stub for stdcall -> cdecl 
+		/* Selfmodifying entry/return stub for stdcall -> cdecl
 		 * conversion.
 		 *  - Pop returnaddress directly into our return code
 		 * 		popl <into code below>
diff --git a/loader/loadorder.c b/loader/loadorder.c
index 38412be..6b35877 100644
--- a/loader/loadorder.c
+++ b/loader/loadorder.c
@@ -520,28 +520,28 @@
 
         if ( ! GetSystemDirectoryA ( sysdir, MAX_PATH ) ) goto done;
 
-	/* Strip path information for 16 bit modules or if the module 
+	/* Strip path information for 16 bit modules or if the module
 	   resides in the system directory */
 	if ( !win32 || !FILE_strncasecmp ( sysdir, path, strlen (sysdir) ) )
 	{
-	
+
 	    cptr = strrchr(path, '\\');
 	    if(!cptr)
 	        name = strrchr(path, '/');
 	    else
 	        name = strrchr(cptr, '/');
-	    
+
 	    if(!name)
 	        name = cptr ? cptr+1 : (char *)path;
 	    else
 	        name++;
-	    
+
 	    if((cptr = strchr(name, ':')) != NULL)	/* Also strip drive if in format 'C:MODULE.DLL' */
 	        name = cptr+1;
 	}
-	else 
+	else
 	  name = (char *)path;
-    
+
 	len = strlen(name);
 	if(len >= sizeof(fname) || len <= 0)
 	{
diff --git a/loader/module.c b/loader/module.c
index ad09e2a..52e4f7e 100644
--- a/loader/module.c
+++ b/loader/module.c
@@ -73,7 +73,7 @@
 {
     WINE_MODREF	*wm;
 
-    if (!hmod) 
+    if (!hmod)
     	return exe_modref;
 
     if (!HIWORD(hmod)) {
@@ -137,7 +137,7 @@
 {
     BOOL retv = TRUE;
 
-    static LPCSTR typeName[] = { "PROCESS_DETACH", "PROCESS_ATTACH", 
+    static LPCSTR typeName[] = { "PROCESS_DETACH", "PROCESS_ATTACH",
                                  "THREAD_ATTACH", "THREAD_DETACH" };
     assert( wm );
 
@@ -160,14 +160,14 @@
 
 /*************************************************************************
  *		MODULE_DllProcessAttach
- * 
+ *
  * Send the process attach notification to all DLLs the given module
  * depends on (recursively). This is somewhat complicated due to the fact that
  *
  * - we have to respect the module dependencies, i.e. modules implicitly
  *   referenced by another module have to be initialized before the module
  *   itself can be initialized
- * 
+ *
  * - the initialization routine of a DLL can itself call LoadLibrary,
  *   thereby introducing a whole new set of dependencies (even involving
  *   the 'old' modules) at any time during the whole process
@@ -178,7 +178,7 @@
  *
  * Furthermore, we need to rearrange the main WINE_MODREF list to allow
  * the process *detach* notifications to be sent in the correct order.
- * This must not only take into account module dependencies, but also 
+ * This must not only take into account module dependencies, but also
  * 'hidden' dependencies created by modules calling LoadLibrary in their
  * attach notification routine.
  *
@@ -247,8 +247,8 @@
 
 /*************************************************************************
  *		MODULE_DllProcessDetach
- * 
- * Send DLL process detach notifications.  See the comment about calling 
+ *
+ * Send DLL process detach notifications.  See the comment about calling
  * sequence at MODULE_DllProcessAttach.  Unless the bForceDetach flag
  * is set, only DLLs with zero refcount are notified.
  */
@@ -283,7 +283,7 @@
 
 /*************************************************************************
  *		MODULE_DllThreadAttach
- * 
+ *
  * Send DLL thread attach notifications. These are sent in the
  * reverse sequence of process detach notification.
  *
@@ -319,7 +319,7 @@
 
 /*************************************************************************
  *		MODULE_DllThreadDetach
- * 
+ *
  * Send DLL thread detach notifications. These are sent in the
  * same sequence as process detach notification.
  *
@@ -399,7 +399,7 @@
                     + strlen(filename) + 1;
     size = sizeof(NE_MODULE) +
                  /* loaded file info */
-                 ((of_size + 3) & ~3) + 
+                 ((of_size + 3) & ~3) +
                  /* segment table: DS,CS */
                  2 * sizeof(SEGTABLEENTRY) +
                  /* name table */
@@ -826,7 +826,7 @@
       else /* yes, even valid with trailing '"' missing */
 	  name_end = lpCmdLine+strlen(lpCmdLine);
     }
-    else 
+    else
     {
       name_beg = lpCmdLine;
       args = strchr( lpCmdLine, ' ' );
@@ -934,7 +934,7 @@
 /**********************************************************************
  *	    LoadModule    (KERNEL32.@)
  */
-HINSTANCE WINAPI LoadModule( LPCSTR name, LPVOID paramBlock ) 
+HINSTANCE WINAPI LoadModule( LPCSTR name, LPVOID paramBlock )
 {
     LOADPARAMS *params = (LOADPARAMS *)paramBlock;
     PROCESS_INFORMATION info;
@@ -967,7 +967,7 @@
         startup.dwFlags = STARTF_USESHOWWINDOW;
         startup.wShowWindow = params->lpCmdShow[1];
     }
-    
+
     if (CreateProcessA( filename, cmdline, NULL, NULL, FALSE, 0,
                         params->lpEnvAddress, NULL, &startup, &info ))
     {
@@ -1028,7 +1028,7 @@
  * by checking if exe version >= 4.0.
  * (SDK docu doesn't mention this)
  */
-DWORD WINAPI GetModuleFileNameA( 
+DWORD WINAPI GetModuleFileNameA(
 	HMODULE hModule,	/* [in] module handle (32bit) */
 	LPSTR lpFileName,	/* [out] filenamebuffer */
         DWORD size )		/* [in] size of filenamebuffer */
@@ -1044,8 +1044,8 @@
     RtlLeaveCriticalSection( &loader_section );
     TRACE("%s\n", lpFileName );
     return strlen(lpFileName);
-}                   
- 
+}
+
 
 /***********************************************************************
  *              GetModuleFileNameW      (KERNEL32.@)
@@ -1134,7 +1134,7 @@
  *
  * helper for MODULE_LoadLibraryExA.  Allocate space to hold the directory
  * portion of the provided name and put the name in it.
- * 
+ *
  */
 static LPCSTR allocate_lib_dir(LPCSTR libname)
 {
@@ -1172,9 +1172,9 @@
  *
  * libdir is used to support LOAD_WITH_ALTERED_SEARCH_PATH during the recursion
  *        on this function.  When first called from LoadLibraryExA it will be
- *        NULL but thereafter it may point to a buffer containing the path 
- *        portion of the library name.  Note that the recursion all occurs 
- *        within a Critical section (see LoadLibraryExA) so the use of a 
+ *        NULL but thereafter it may point to a buffer containing the path
+ *        portion of the library name.  Note that the recursion all occurs
+ *        within a Critical section (see LoadLibraryExA) so the use of a
  *        static is acceptable.
  *        (We have to use a static variable at some point anyway, to pass the
  *        information from BUILTIN32_dlopen through dlopen and the builtin's
@@ -1215,16 +1215,16 @@
 	/* build the modules filename */
         if (!found)
 	{
-	    if ( ! GetSystemDirectoryA ( filename, MAX_PATH ) ) 
+	    if ( ! GetSystemDirectoryA ( filename, MAX_PATH ) )
   	        goto error;
 
 	    /* if the library name contains a path and can not be found,
-	     * return an error. 
+	     * return an error.
 	     * exception: if the path is the system directory, proceed,
 	     * so that modules which are not PE modules can be loaded.
 	     * If the library name does not contain a path and can not
 	     * be found, assume the system directory is meant */
-	    
+
 	    if ( ! FILE_strncasecmp ( filename, libname, strlen ( filename ) ))
 	        strcpy ( filename, libname );
 	    else
@@ -1233,7 +1233,7 @@
                 strcat ( filename, "\\" );
                 strcat ( filename, libname );
 	    }
-      
+
 	    /* if the filename doesn't have an extension, append .DLL */
 	    if (!(p = strrchr( filename, '.')) || strchr( p, '/' ) || strchr( p, '\\'))
 	        strcat( filename, ".dll" );
@@ -1245,7 +1245,7 @@
 	    LPSTR	fn = HeapAlloc ( GetProcessHeap(), 0, MAX_PATH + 1 );
 	    if (fn)
 	    {
-	    	/* since the default loading mechanism uses a more detailed algorithm 
+	    	/* since the default loading mechanism uses a more detailed algorithm
 		 * than SearchPath (like using PATH, which can even be modified between
 		 * two attempts of loading the same DLL), the look-up above (with
 		 * SearchPath) can have put the file in system directory, whereas it
@@ -1627,7 +1627,7 @@
 /***********************************************************************
  *           MODULE_GetProcAddress   		(internal)
  */
-FARPROC MODULE_GetProcAddress( 
+FARPROC MODULE_GetProcAddress(
 	HMODULE hModule, 	/* [in] current module handle */
 	LPCSTR function,	/* [in] function to be looked up */
 	BOOL snoop )
@@ -1671,7 +1671,7 @@
     int gpOrdinal;
     SEGPTR gpPtr;
     GPHANDLERDEF *gpHandler;
-   
+
     if (    (hModule = FarGetOwner16( SELECTOROF(address) )) != 0
          && (gpOrdinal = NE_GetOrdinal( hModule, "__GP" )) != 0
          && (gpPtr = (SEGPTR)NE_GetEntryPointEx( hModule, gpOrdinal, FALSE )) != 0
diff --git a/loader/ne/convert.c b/loader/ne/convert.c
index 13391bc..cc5c16f 100644
--- a/loader/ne/convert.c
+++ b/loader/ne/convert.c
@@ -59,7 +59,7 @@
     switch (*((WORD *)p))
     {
     case 0x0000:  ((WORD *)p)++; *((BYTE *)dialog16)++ = 0; break;
-    case 0xffff:  ((WORD *)p)++; *((BYTE *)dialog16)++ = 0xff; 
+    case 0xffff:  ((WORD *)p)++; *((BYTE *)dialog16)++ = 0xff;
                   *((WORD *)dialog16)++ = *((WORD *)p)++; break;
     default:      WideCharToMultiByte( CP_ACP, 0, (LPWSTR)p, -1, (LPSTR)dialog16, 0x7fffffff, NULL,NULL );
                   ((LPSTR)dialog16) += strlen( (LPSTR)dialog16 ) + 1;
@@ -71,7 +71,7 @@
     switch (*((WORD *)p))
     {
     case 0x0000:  ((WORD *)p)++; *((BYTE *)dialog16)++ = 0; break;
-    case 0xffff:  ((WORD *)p)++; *((BYTE *)dialog16)++ = 0xff; 
+    case 0xffff:  ((WORD *)p)++; *((BYTE *)dialog16)++ = 0xff;
                   *((WORD *)dialog16)++ = *((WORD *)p)++; break;
     default:      WideCharToMultiByte( CP_ACP, 0, (LPWSTR)p, -1, (LPSTR)dialog16, 0x7fffffff, NULL,NULL );
                   ((LPSTR)dialog16) += strlen( (LPSTR)dialog16 ) + 1;
@@ -133,7 +133,7 @@
         switch (*((WORD *)p))
         {
         case 0x0000:  ((WORD *)p)++; *((BYTE *)dialog16)++ = 0; break;
-        case 0xffff:  ((WORD *)p)++; 
+        case 0xffff:  ((WORD *)p)++;
                       *((BYTE *)dialog16)++ = (BYTE)*((WORD *)p)++; break;
         default:      WideCharToMultiByte( CP_ACP, 0, (LPWSTR)p, -1, (LPSTR)dialog16, 0x7fffffff, NULL,NULL );
                       ((LPSTR)dialog16) += strlen( (LPSTR)dialog16 ) + 1;
@@ -145,22 +145,22 @@
         switch (*((WORD *)p))
         {
         case 0x0000:  ((WORD *)p)++; *((BYTE *)dialog16)++ = 0; break;
-        case 0xffff:  ((WORD *)p)++; *((BYTE *)dialog16)++ = 0xff; 
+        case 0xffff:  ((WORD *)p)++; *((BYTE *)dialog16)++ = 0xff;
                       *((WORD *)dialog16)++ = *((WORD *)p)++; break;
         default:      WideCharToMultiByte( CP_ACP, 0, (LPWSTR)p, -1, (LPSTR)dialog16, 0x7fffffff, NULL,NULL );
                       ((LPSTR)dialog16) += strlen( (LPSTR)dialog16 ) + 1;
                       ((LPWSTR)p) += strlenW( (LPWSTR)p ) + 1;
                       break;
         }
-       
+
         /* Transfer data */
-        data = *((WORD *)p)++; 
+        data = *((WORD *)p)++;
         if (dialogEx)
             *((WORD *)dialog16)++ = data;
         else
             *((BYTE *)dialog16)++ = (BYTE)data;
 
-        if (data) 
+        if (data)
         {
             memcpy( dialog16, p, data );
             (LPSTR)dialog16 += data;
@@ -215,7 +215,7 @@
     }
 
     /* Skip window caption */
-    ((LPWSTR)p) += strlenW( (LPWSTR)p ) + 1; 
+    ((LPWSTR)p) += strlenW( (LPWSTR)p ) + 1;
 
     /* Skip font info */
     if (style & DS_SETFONT)
@@ -272,9 +272,9 @@
         case 0xffff:  ((WORD *)p) += 2; break;
         default:      ((LPWSTR)p) += strlenW( (LPWSTR)p ) + 1; break;
         }
-       
+
         /* Skip data */
-        data = *((WORD *)p)++; 
+        data = *((WORD *)p)++;
         (LPSTR)p += data;
 
         /* Next item */
@@ -309,7 +309,7 @@
                 *((WORD *)menu16)++ = *((WORD *)p)++;  /* ID */
             else
                 level++;
-       
+
             WideCharToMultiByte( CP_ACP, 0, (LPWSTR)p, -1, (LPSTR)menu16, 0x7fffffff, NULL,NULL );
             ((LPSTR)menu16) += strlen( (LPSTR)menu16 ) + 1;
             ((LPWSTR)p) += strlenW( (LPWSTR)p ) + 1;
@@ -322,8 +322,8 @@
             *((DWORD *)menu16)++ = *((DWORD *)p)++;  /* fType */
             *((DWORD *)menu16)++ = *((DWORD *)p)++;  /* fState */
             *((WORD *)menu16)++ = (WORD)*((DWORD *)p)++; /* ID */
-            flags = *((BYTE *)menu16)++ = (BYTE)*((WORD *)p)++;  
-       
+            flags = *((BYTE *)menu16)++ = (BYTE)*((WORD *)p)++;
+
             WideCharToMultiByte( CP_ACP, 0, (LPWSTR)p, -1, (LPSTR)menu16, 0x7fffffff, NULL,NULL );
             ((LPSTR)menu16) += strlen( (LPSTR)menu16 ) + 1;
             ((LPWSTR)p) += strlenW( (LPWSTR)p ) + 1;
@@ -363,7 +363,7 @@
                 ((WORD *)p)++;  /* ID */
             else
                 level++;
-       
+
             ((LPWSTR)p) += strlenW( (LPWSTR)p ) + 1;
 
             if ( flags & MF_END )
@@ -374,8 +374,8 @@
             ((DWORD *)p)++; /* fType */
             ((DWORD *)p)++; /* fState */
             ((DWORD *)p)++; /* ID */
-            flags = *((WORD *)p)++; 
-       
+            flags = *((WORD *)p)++;
+
             ((LPWSTR)p) += strlenW( (LPWSTR)p ) + 1;
 
             /* align on DWORD boundary (32-bit only) */
@@ -428,7 +428,7 @@
     if (!pModule || !bits || !size) return 0;
 
     handle = GlobalAlloc16( 0, size );
-   
+
     switch (type)
     {
     case RT_MENU16:
diff --git a/loader/ne/module.c b/loader/ne/module.c
index fac36ce..2eebe40 100644
--- a/loader/ne/module.c
+++ b/loader/ne/module.c
@@ -19,7 +19,7 @@
  */
 
 #include "config.h"
-#include "wine/port.h" 
+#include "wine/port.h"
 
 #include <assert.h>
 #include <fcntl.h>
@@ -174,7 +174,7 @@
       /* Dump the entry table */
     DPRINTF( "---\n" );
     DPRINTF( "Entry table:\n" );
-    bundle = (ET_BUNDLE *)((BYTE *)pModule+pModule->entry_table);    
+    bundle = (ET_BUNDLE *)((BYTE *)pModule+pModule->entry_table);
     do {
 	entry = (ET_ENTRY *)((BYTE *)bundle+6);
 	DPRINTF( "Bundle %d-%d: %02x\n", bundle->first, bundle->last, entry->type);
@@ -476,7 +476,7 @@
              /* resident names table */
            ne_header.ne_modtab - ne_header.ne_restab +
              /* module ref table */
-           ne_header.ne_cmod * sizeof(WORD) + 
+           ne_header.ne_cmod * sizeof(WORD) +
              /* imported names table */
            ne_header.ne_enttab - ne_header.ne_imptab +
              /* entry table length */
@@ -570,7 +570,7 @@
         pModule->res_table = pData - (BYTE *)pModule;
         if (!READ(mz_header.e_lfanew + ne_header.ne_rsrctab,
                   ne_header.ne_restab - ne_header.ne_rsrctab,
-                  pData )) 
+                  pData ))
             return (HMODULE16)11;  /* invalid exe */
         pData += ne_header.ne_restab - ne_header.ne_rsrctab;
 	NE_InitResourceHandler( hModule );
@@ -612,7 +612,7 @@
     /* Get the imported names table */
 
     pModule->import_table = pData - (BYTE *)pModule;
-    if (!READ( mz_header.e_lfanew + ne_header.ne_imptab, 
+    if (!READ( mz_header.e_lfanew + ne_header.ne_imptab,
                ne_header.ne_enttab - ne_header.ne_imptab,
                pData ))
     {
@@ -862,17 +862,17 @@
 /**********************************************************************
  *	    NE_LoadModule
  *
- * Load first instance of NE module. (Note: caller is responsible for 
+ * Load first instance of NE module. (Note: caller is responsible for
  * ensuring the module isn't already loaded!)
  *
- * If the module turns out to be an executable module, only a 
+ * If the module turns out to be an executable module, only a
  * handle to a module stub is returned; this needs to be initialized
  * by calling NE_DoLoadModule later, in the context of the newly
  * created process.
  *
  * If lib_only is TRUE, however, the module is perforce treated
  * like a DLL module, even if it is an executable module.
- * 
+ *
  */
 static HINSTANCE16 NE_LoadModule( LPCSTR name, BOOL lib_only )
 {
@@ -1083,8 +1083,8 @@
      *  At this point, we need to create a new process.
      *
      *  pModule points either to an already loaded module, whose refcount
-     *  has already been incremented (to avoid having the module vanish 
-     *  in the meantime), or else to a stub module which contains only header 
+     *  has already been incremented (to avoid having the module vanish
+     *  in the meantime), or else to a stub module which contains only header
      *  information.
      */
     params = (LOADPARAMS16 *)paramBlock;
@@ -1285,7 +1285,7 @@
         else
             call_wep = FALSE;  /* We are freeing a task -> no more WEPs */
     }
-    
+
 
     /* Clear magic number just in case */
 
@@ -1377,7 +1377,7 @@
     NE_MODULE *pModule = NE_GetPtr( hModule );
     if ( !pModule ) return 0;
 
-    /* 
+    /*
      * For built-in modules, fake the expected version the module should
      * have according to the Windows version emulated by Wine
      */
@@ -1387,7 +1387,7 @@
         versionInfo.dwOSVersionInfoSize = sizeof(versionInfo);
 
         if ( GetVersionExA( &versionInfo ) )
-            pModule->expected_version =   
+            pModule->expected_version =
                      (versionInfo.dwMajorVersion & 0xff) << 8
                    | (versionInfo.dwMinorVersion & 0xff);
     }
@@ -1546,7 +1546,7 @@
 
     /* If the extension of 'name' is '.EXE' and the base filename of 'name'
      * matches the base filename of the module filename of some 32-bit module:
-     * Return the corresponding 16-bit dummy module handle. 
+     * Return the corresponding 16-bit dummy module handle.
      */
     if (len >= 4 && !FILE_strcasecmp(name+len-4, ".EXE"))
     {
diff --git a/loader/ne/resource.c b/loader/ne/resource.c
index 5716eb1..b7139be 100644
--- a/loader/ne/resource.c
+++ b/loader/ne/resource.c
@@ -21,7 +21,7 @@
  */
 
 #include "config.h"
-#include "wine/port.h" 
+#include "wine/port.h"
 
 #include <stdio.h>
 #include <stdlib.h>
@@ -71,7 +71,7 @@
 	{
             TRACE("NameTable entry: type=%04x id=%04x\n",
                               pTypeInfo->type_id, pNameInfo->id );
-            handle = LoadResource16( pModule->self, 
+            handle = LoadResource16( pModule->self,
 				   (HRSRC16)((int)pNameInfo - (int)pModule) );
             for(p = (WORD*)LockResource16(handle); p && *p; p = (WORD *)((char*)p+*p))
             {
@@ -94,7 +94,7 @@
                 {
                     if (!HIWORD(resId)) continue;
                     if (strcasecmp( resId, (char*)(p+3)+strlen((char*)(p+3))+1 )) continue;
-                    
+
                 }
                 else if (HIWORD(resId) || (((DWORD)resId & ~0x8000) != p[2]))
                   continue;
@@ -117,7 +117,7 @@
  *
  * Find header struct for a particular resource type.
  */
-NE_TYPEINFO *NE_FindTypeSection( LPBYTE pResTab, 
+NE_TYPEINFO *NE_FindTypeSection( LPBYTE pResTab,
 			 	 NE_TYPEINFO *pTypeInfo, LPCSTR typeId )
 {
     /* start from pTypeInfo */
@@ -186,7 +186,7 @@
     {
         WORD id = LOWORD(resId) | 0x8000;
         for (count = pTypeInfo->count; count > 0; count--, pNameInfo++)
-            if (pNameInfo->id == id) 
+            if (pNameInfo->id == id)
 	        return pNameInfo;
     }
     return NULL;
@@ -196,7 +196,7 @@
 /***********************************************************************
  *           DefResourceHandler (KERNEL.456)
  *
- * This is the default LoadProc() function. 
+ * This is the default LoadProc() function.
  */
 HGLOBAL16 WINAPI NE_DefResourceHandler( HGLOBAL16 hMemObj, HMODULE16 hModule,
                                         HRSRC16 hRsrc )
@@ -208,7 +208,7 @@
 	HGLOBAL16 handle;
 	WORD sizeShift = *(WORD *)((char *)pModule + pModule->res_table);
 	NE_NAMEINFO* pNameInfo = (NE_NAMEINFO*)((char*)pModule + hRsrc);
-    
+
         if ( hMemObj )
             handle = GlobalReAlloc16( hMemObj, pNameInfo->length << sizeShift, 0 );
         else
@@ -217,7 +217,7 @@
 	if ( handle )
         {
             /* NOTE: hRsrcMap points to start of built-in resource data */
-            memcpy( GlobalLock16( handle ), 
+            memcpy( GlobalLock16( handle ),
                     (char *)pModule->hRsrcMap + (pNameInfo->offset << sizeShift),
                     pNameInfo->length << sizeShift );
         }
@@ -486,7 +486,7 @@
 		pNameInfo = (NE_NAMEINFO *)(((char *)pModule) + hRsrc);
 		break;
 	    }
-	    else 
+	    else
 		break; /* NE_NAMEINFO boundary mismatch */
 	}
 	pTypeInfo = (NE_TYPEINFO *)(((char *)pModule) + d);
diff --git a/loader/ne/segment.c b/loader/ne/segment.c
index c0e0af9..6124bf4 100644
--- a/loader/ne/segment.c
+++ b/loader/ne/segment.c
@@ -137,7 +137,7 @@
     }
 
     if (!pSeg->filepos) return TRUE;  /* No file image, just return */
-	
+
     pModuleTable = NE_MODULE_TABLE( pModule );
 
     hf = NE_OpenFile( pModule );
@@ -261,7 +261,7 @@
                 NE_MODULE *pTarget = NE_GetPtr( module );
                 if (!pTarget)
                     WARN_(module)("Module not found: %04x, reference %d of module %*.*s\n",
-                             module, rep->target1, 
+                             module, rep->target1,
                              *((BYTE *)pModule + pModule->name_table),
                              *((BYTE *)pModule + pModule->name_table),
                              (char *)pModule + pModule->name_table + 1 );
@@ -277,14 +277,14 @@
             if (TRACE_ON(fixup))
             {
                 NE_MODULE *pTarget = NE_GetPtr( module );
-                TRACE_(fixup)("%d: %.*s.%d=%04x:%04x %s\n", i + 1, 
+                TRACE_(fixup)("%d: %.*s.%d=%04x:%04x %s\n", i + 1,
                        *((BYTE *)pTarget + pTarget->name_table),
                        (char *)pTarget + pTarget->name_table + 1,
                        ordinal, HIWORD(address), LOWORD(address),
                        NE_GetRelocAddrName( rep->address_type, additive ) );
             }
 	    break;
-	    
+
 	  case NE_RELTYPE_NAME:
             module = pModuleTable[rep->target1-1];
             func_name = (char *)pModule + pModule->import_table + rep->target2;
@@ -305,14 +305,14 @@
             if (TRACE_ON(fixup))
             {
 	        NE_MODULE *pTarget = NE_GetPtr( module );
-                TRACE_(fixup)("%d: %.*s.%s=%04x:%04x %s\n", i + 1, 
+                TRACE_(fixup)("%d: %.*s.%s=%04x:%04x %s\n", i + 1,
                        *((BYTE *)pTarget + pTarget->name_table),
                        (char *)pTarget + pTarget->name_table + 1,
                        func_name, HIWORD(address), LOWORD(address),
                        NE_GetRelocAddrName( rep->address_type, additive ) );
             }
 	    break;
-	    
+
 	  case NE_RELTYPE_INTERNAL:
 	    if ((rep->target1 & 0xff) == 0xff)
 	    {
@@ -322,8 +322,8 @@
 	    {
                 address = (FARPROC16)MAKESEGPTR( SEL(pSegTable[rep->target1-1].hSeg), rep->target2 );
 	    }
-	    
-	    TRACE_(fixup)("%d: %04x:%04x %s\n", 
+
+	    TRACE_(fixup)("%d: %04x:%04x %s\n",
                    i + 1, HIWORD(address), LOWORD(address),
                    NE_GetRelocAddrName( rep->address_type, additive ) );
 	    break;
@@ -420,7 +420,7 @@
 unknown:
     WARN_(fixup)("WARNING: %d: unknown ADDR TYPE %d,  "
          "TYPE %d,  OFFSET %04x,  TARGET %04x %04x\n",
-         i + 1, rep->address_type, rep->relocation_type, 
+         i + 1, rep->address_type, rep->relocation_type,
          rep->offset, rep->target1, rep->target2);
     HeapFree(GetProcessHeap(), 0, reloc_entries);
     return FALSE;
@@ -506,7 +506,7 @@
     if (!pModule->dgroup) return;
 
     if (!(dgroup = SEL(pSegTable[pModule->dgroup-1].hSeg))) return;
-    
+
     pSeg = MapSL( MAKESEGPTR(sel, 0) );
 
     bundle = (ET_BUNDLE *)((BYTE *)pModule+pModule->entry_table);
@@ -587,7 +587,7 @@
 /***********************************************************************
  *           NE_GetDLLInitParams
  */
-static VOID NE_GetDLLInitParams( NE_MODULE *pModule, 
+static VOID NE_GetDLLInitParams( NE_MODULE *pModule,
 				 WORD *hInst, WORD *ds, WORD *heap )
 {
     SEGTABLEENTRY *pSegTable = NE_SEG_TABLE( pModule );
@@ -669,7 +669,7 @@
 
 
     pModule->cs = 0;  /* Don't initialize it twice */
-    TRACE_(dll)("Calling LibMain, cs:ip=%04lx:%04lx ds=%04lx di=%04x cx=%04x\n", 
+    TRACE_(dll)("Calling LibMain, cs:ip=%04lx:%04lx ds=%04lx di=%04x cx=%04x\n",
                  context.SegCs, context.Eip, context.SegDs,
                  LOWORD(context.Edi), LOWORD(context.Ecx) );
     wine_call_to_16_regs_short( &context, 0 );
@@ -679,7 +679,7 @@
 /***********************************************************************
  *           NE_InitializeDLLs
  *
- * Recursively initialize all DLLs (according to the order in which 
+ * Recursively initialize all DLLs (according to the order in which
  * they where loaded).
  */
 void NE_InitializeDLLs( HMODULE16 hModule )
@@ -707,7 +707,7 @@
 /***********************************************************************
  *           NE_CallDllEntryPoint
  *
- * Call the DllEntryPoint of DLLs with subsystem >= 4.0 
+ * Call the DllEntryPoint of DLLs with subsystem >= 4.0
  */
 typedef DWORD (WINAPI *WinNEEntryProc)(DWORD,WORD,WORD,WORD,DWORD,WORD);
 
@@ -759,12 +759,12 @@
 
 /***********************************************************************
  *           NE_DllProcessAttach
- * 
+ *
  * Call the DllEntryPoint of all modules this one (recursively)
  * depends on, according to the order in which they were loaded.
  *
  * Note that --as opposed to the PE module case-- there is no notion
- * of 'module loaded into a process' for NE modules, and hence we 
+ * of 'module loaded into a process' for NE modules, and hence we
  * have no place to store the fact that the DllEntryPoint of a
  * given module was already called on behalf of this process (e.g.
  * due to some earlier LoadLibrary16 call).
@@ -773,7 +773,7 @@
  * appears to behave this way as well ...
  *
  * This routine must only be called with the Win16Lock held.
- * 
+ *
  * FIXME:  We should actually abort loading in case the DllEntryPoint
  *         returns FALSE ...
  *
@@ -791,7 +791,7 @@
     if ( list->count == list->size )
     {
         int newSize = list->size + 128;
-        NE_MODULE **newModule = HeapReAlloc( GetProcessHeap(), 0, 
+        NE_MODULE **newModule = HeapReAlloc( GetProcessHeap(), 0,
                                              list->module, newSize*sizeof(NE_MODULE *) );
         if ( !newModule )
         {
@@ -876,12 +876,12 @@
  * This function translates NE segment flags to GlobalAlloc flags
  */
 static WORD NE_Ne2MemFlags(WORD flags)
-{ 
+{
     WORD memflags = 0;
 #if 1
-    if (flags & NE_SEGFLAGS_DISCARDABLE) 
+    if (flags & NE_SEGFLAGS_DISCARDABLE)
       memflags |= GMEM_DISCARDABLE;
-    if (flags & NE_SEGFLAGS_MOVEABLE || 
+    if (flags & NE_SEGFLAGS_MOVEABLE ||
 	( ! (flags & NE_SEGFLAGS_DATA) &&
 	  ! (flags & NE_SEGFLAGS_LOADED) &&
 	  ! (flags & NE_SEGFLAGS_ALLOCATED)
@@ -936,7 +936,7 @@
         pSeg = NE_SEG_TABLE( pModule ) + pModule->dgroup - 1;
         return pSeg->hSeg;
     }
-}    
+}
 
 /***********************************************************************
  *           NE_CreateSegment
diff --git a/loader/pe_image.c b/loader/pe_image.c
index cd2c744..35a1ab1 100644
--- a/loader/pe_image.c
+++ b/loader/pe_image.c
@@ -1,4 +1,4 @@
-/* 
+/*
  *  Copyright	1994	Eric Youndale & Erik Bos
  *  Copyright	1995	Martin von Löwis
  *  Copyright   1996-98 Marcus Meissner
@@ -23,12 +23,12 @@
 /* Notes:
  * Before you start changing something in this file be aware of the following:
  *
- * - There are several functions called recursively. In a very subtle and 
+ * - There are several functions called recursively. In a very subtle and
  *   obscure way. DLLs can reference each other recursively etc.
  * - If you want to enhance, speed up or clean up something in here, think
  *   twice WHY it is implemented in that strange way. There is usually a reason.
  *   Though sometimes it might just be lazyness ;)
- * - In PE_MapImage, right before PE_fixup_imports() all external and internal 
+ * - In PE_MapImage, right before PE_fixup_imports() all external and internal
  *   state MUST be correct since this function can be called with the SAME image
  *   AGAIN. (Thats recursion for you.) That means MODREF.module and
  *   NE_MODULE.module32.
@@ -82,7 +82,7 @@
 #define AdjustPtr(ptr,delta) ((char *)(ptr) + (delta))
 
 void dump_exports( HMODULE hModule )
-{ 
+{
   char		*Module;
   int		i, j;
   WORD		*ordinal;
@@ -98,7 +98,7 @@
 
   Module = (char*)RVA(pe_exports->Name);
   TRACE("*******EXPORT DATA*******\n");
-  TRACE("Module name is %s, %ld functions, %ld names\n", 
+  TRACE("Module name is %s, %ld functions, %ld names\n",
         Module, pe_exports->NumberOfFunctions, pe_exports->NumberOfNames);
 
   ordinal = RVA(pe_exports->AddressOfNameOrdinals);
@@ -128,13 +128,13 @@
 
 /* Look up the specified function or ordinal in the export list:
  * If it is a string:
- * 	- look up the name in the name list. 
+ * 	- look up the name in the name list.
  *	- look up the ordinal with that index.
  *	- use the ordinal as offset into the functionlist
  * If it is an ordinal:
  *	- use ordinal-pe_export->Base as offset into the function list
  */
-static FARPROC PE_FindExportedFunction( 
+static FARPROC PE_FindExportedFunction(
 	WINE_MODREF *wm,	/* [in] WINE modreference */
 	LPCSTR funcName,	/* [in] function name */
         BOOL snoop )
@@ -287,10 +287,10 @@
     wm->nDeps = i;
     wm->deps  = HeapAlloc( GetProcessHeap(), 0, i*sizeof(WINE_MODREF *) );
 
-    /* load the imported modules. They are automatically 
+    /* load the imported modules. They are automatically
      * added to the modref list of the process.
      */
- 
+
     for (i = 0, pe_imp = imports; pe_imp->Name ; pe_imp++) {
     	WINE_MODREF		*wmImp;
 	IMAGE_IMPORT_BY_NAME	*pe_name;
@@ -465,8 +465,8 @@
 /**********************************************************************
  *			PE_LoadImage
  * Load one PE format DLL/EXE into memory
- * 
- * Unluckily we can't just mmap the sections where we want them, for 
+ *
+ * Unluckily we can't just mmap the sections where we want them, for
  * (at least) Linux does only support offsets which are page-aligned.
  *
  * BUT we have to map the whole image anyway, for Win32 programs sometimes
@@ -629,7 +629,7 @@
     }
     wm->hDummyMod = hModule16;
 
-    if ( builtin ) 
+    if ( builtin )
     {
         NE_MODULE *pModule = (NE_MODULE *)GlobalLock16( hModule16 );
         pModule->flags |= NE_FFLAGS_BUILTIN;
@@ -702,7 +702,7 @@
 }
 
 /******************************************************************************
- * The PE Library Loader frontend. 
+ * The PE Library Loader frontend.
  * FIXME: handle the flags.
  */
 WINE_MODREF *PE_LoadLibraryExA (LPCSTR name, DWORD flags)
@@ -710,11 +710,11 @@
 	HMODULE		hModule32;
 	WINE_MODREF	*wm;
 	HANDLE		hFile;
-       
+
 	hFile = CreateFileA( name, GENERIC_READ, FILE_SHARE_READ,
                              NULL, OPEN_EXISTING, 0, 0 );
 	if ( hFile == INVALID_HANDLE_VALUE ) return NULL;
-	
+
 	/* Load PE module */
 	hModule32 = PE_LoadImage( hFile, name, flags );
 	if (!hModule32)
@@ -792,7 +792,7 @@
 	LPVOID			mem;
 	PIMAGE_TLS_DIRECTORY	pdir;
         int delta;
-	
+
 	for (wm = MODULE_modref_list;wm;wm=wm->next) {
 		peh = PE_HEADER(wm->module);
 		delta = wm->module - peh->OptionalHeader.ImageBase;
@@ -800,8 +800,8 @@
 			continue;
 		pdir = (LPVOID)(wm->module + peh->OptionalHeader.
 			DataDirectory[IMAGE_FILE_THREAD_LOCAL_STORAGE].VirtualAddress);
-		
-		
+
+
 		if ( wm->tlsindex == -1 ) {
 			LPDWORD xaddr;
 			wm->tlsindex = TlsAlloc();
@@ -815,7 +815,7 @@
 		mem=VirtualAlloc(0,size,MEM_RESERVE|MEM_COMMIT,PAGE_READWRITE);
 		memcpy(mem,_fixup_address(&(peh->OptionalHeader),delta,(LPVOID)pdir->StartAddressOfRawData),datasize);
 		if (pdir->AddressOfCallBacks) {
-		     PIMAGE_TLS_CALLBACK *cbs; 
+		     PIMAGE_TLS_CALLBACK *cbs;
 
 		     cbs = _fixup_address(&(peh->OptionalHeader),delta,pdir->AddressOfCallBacks);
 		     if (*cbs)
diff --git a/loader/resource.c b/loader/resource.c
index 26ee26f..e4d3e85 100644
--- a/loader/resource.c
+++ b/loader/resource.c
@@ -68,7 +68,7 @@
     /* On first call, initialize HRSRC map */
     if ( !map )
     {
-        if ( !(map = (HRSRC_MAP *)HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, 
+        if ( !(map = (HRSRC_MAP *)HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY,
                                              sizeof(HRSRC_MAP) ) ) )
         {
             ERR("Cannot allocate HRSRC map\n" );
@@ -85,9 +85,9 @@
     /* If no space left, grow table */
     if ( map->nUsed == map->nAlloc )
     {
-        if ( !(newElem = (HRSRC_ELEM *)HeapReAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, 
-                                                    map->elem, 
-                                                    (map->nAlloc + HRSRC_MAP_BLOCKSIZE) 
+        if ( !(newElem = (HRSRC_ELEM *)HeapReAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY,
+                                                    map->elem,
+                                                    (map->nAlloc + HRSRC_MAP_BLOCKSIZE)
                                                     * sizeof(HRSRC_ELEM) ) ))
         {
             ERR("Cannot grow HRSRC map\n" );
@@ -137,11 +137,11 @@
 }
 
 static HRSRC RES_FindResource2( HMODULE hModule, LPCSTR type,
-				LPCSTR name, WORD lang, 
+				LPCSTR name, WORD lang,
 				BOOL bUnicode, BOOL bRet16 )
 {
     HRSRC hRsrc = 0;
-    
+
     TRACE("(%08x, %08x%s, %08x%s, %04x, %s, %s)\n",
 	  hModule,
 	  (UINT)type, HIWORD(type)? (bUnicode? debugstr_w((LPWSTR)type) : debugstr_a(type)) : "",
@@ -159,7 +159,7 @@
         {
 	    /* 16-bit NE module */
 	    LPSTR typeStr, nameStr;
-	    
+
 	    if ( HIWORD( type ) && bUnicode )
 		typeStr = HEAP_strdupWtoA( GetProcessHeap(), 0, (LPCWSTR)type );
 	    else
@@ -168,14 +168,14 @@
 		nameStr = HEAP_strdupWtoA( GetProcessHeap(), 0, (LPCWSTR)name );
 	    else
 		nameStr = (LPSTR)name;
-	    
+
 	    hRsrc = NE_FindResource( pModule, nameStr, typeStr );
-	    
-	    if ( HIWORD( type ) && bUnicode ) 
+
+	    if ( HIWORD( type ) && bUnicode )
 		HeapFree( GetProcessHeap(), 0, typeStr );
-	    if ( HIWORD( name ) && bUnicode ) 
+	    if ( HIWORD( name ) && bUnicode )
 		HeapFree( GetProcessHeap(), 0, nameStr );
-	    
+
 	    /* If we need to return 32-bit HRSRC, no conversion is necessary,
 	       we simply use the 16-bit HRSRC as 32-bit HRSRC */
         }
@@ -185,7 +185,7 @@
             hRsrc = RES_FindResource2( pModule->module32, type, name, lang, bUnicode, FALSE );
             /* If we need to return 16-bit HRSRC, perform conversion */
             if ( bRet16 )
-                hRsrc = MapHRsrc32To16( pModule, hRsrc, 
+                hRsrc = MapHRsrc32To16( pModule, hRsrc,
                                         HIWORD( type )? 0 : LOWORD( type ) );
         }
     }
@@ -193,7 +193,7 @@
     {
         /* 32-bit PE module */
         LPWSTR typeStr, nameStr;
-	    
+
         if ( HIWORD( type ) && !bUnicode )
             typeStr = HEAP_strdupAtoW( GetProcessHeap(), 0, type );
         else
@@ -211,10 +211,10 @@
 	    hRsrc = PE_FindResourceW( hModule, nameStr, typeStr );
 	else
 	    hRsrc = PE_FindResourceExW( hModule, nameStr, typeStr, lang );
-	    
-        if ( HIWORD( type ) && !bUnicode ) 
+
+        if ( HIWORD( type ) && !bUnicode )
             HeapFree( GetProcessHeap(), 0, typeStr );
-        if ( HIWORD( name ) && !bUnicode ) 
+        if ( HIWORD( name ) && !bUnicode )
             HeapFree( GetProcessHeap(), 0, nameStr );
     }
     return hRsrc;
@@ -225,7 +225,7 @@
  */
 
 static HRSRC RES_FindResource( HMODULE hModule, LPCSTR type,
-                               LPCSTR name, WORD lang, 
+                               LPCSTR name, WORD lang,
                                BOOL bUnicode, BOOL bRet16 )
 {
     HRSRC hRsrc;
@@ -341,27 +341,27 @@
  */
 HRSRC WINAPI FindResourceA( HMODULE hModule, LPCSTR name, LPCSTR type )
 {
-    return RES_FindResource( hModule, type, name, 
+    return RES_FindResource( hModule, type, name,
                     MAKELANGID(LANG_NEUTRAL, SUBLANG_NEUTRAL), FALSE, FALSE );
 }
 
 /**********************************************************************
  *	    FindResourceExA  (KERNEL32.@)
  */
-HRSRC WINAPI FindResourceExA( HMODULE hModule, 
+HRSRC WINAPI FindResourceExA( HMODULE hModule,
                                LPCSTR type, LPCSTR name, WORD lang )
 {
-    return RES_FindResource( hModule, type, name, 
+    return RES_FindResource( hModule, type, name,
                              lang, FALSE, FALSE );
 }
 
 /**********************************************************************
  *	    FindResourceExW  (KERNEL32.@)
  */
-HRSRC WINAPI FindResourceExW( HMODULE hModule, 
+HRSRC WINAPI FindResourceExW( HMODULE hModule,
                               LPCWSTR type, LPCWSTR name, WORD lang )
 {
-    return RES_FindResource( hModule, (LPCSTR)type, (LPCSTR)name, 
+    return RES_FindResource( hModule, (LPCSTR)type, (LPCSTR)name,
                              lang, TRUE, FALSE );
 }
 
@@ -370,7 +370,7 @@
  */
 HRSRC WINAPI FindResourceW(HINSTANCE hModule, LPCWSTR name, LPCWSTR type)
 {
-    return RES_FindResource( hModule, (LPCSTR)type, (LPCSTR)name, 
+    return RES_FindResource( hModule, (LPCSTR)type, (LPCSTR)name,
                     MAKELANGID(LANG_NEUTRAL, SUBLANG_NEUTRAL), TRUE, FALSE );
 }
 
diff --git a/loader/task.c b/loader/task.c
index 8826f22..dce3a75 100644
--- a/loader/task.c
+++ b/loader/task.c
@@ -88,7 +88,7 @@
     TDB* pTask = TASK_GetPtr( hTask );
 
     if (pTask->hNext) return pTask->hNext;
-    return (hFirstTask != hTask) ? hFirstTask : 0; 
+    return (hFirstTask != hTask) ? hFirstTask : 0;
 }
 
 
@@ -470,14 +470,14 @@
  */
 void TASK_ExitTask(void)
 {
-    TDB *pTask; 
+    TDB *pTask;
     DWORD lockCount;
 
     /* Enter the Win16Lock to protect global data structures */
     _EnterWin16Lock();
 
     pTask = TASK_GetCurrent();
-    if ( !pTask ) 
+    if ( !pTask )
     {
         _LeaveWin16Lock();
         return;
@@ -537,7 +537,7 @@
     context->Eax = 0;
     if (!(pTask = TASK_GetCurrent())) return;
 
-    /* Note: we need to trust that BX/CX contain the stack/heap sizes, 
+    /* Note: we need to trust that BX/CX contain the stack/heap sizes,
        as some apps, notably Visual Basic apps, *modify* the heap/stack
        size of the instance data segment before calling InitTask() */
 
@@ -851,8 +851,8 @@
 
 /**********************************************************************
  *	    TASK_GetCodeSegment
- * 
- * Helper function for GetCodeHandle/GetCodeInfo: Retrieve the module 
+ *
+ * Helper function for GetCodeHandle/GetCodeInfo: Retrieve the module
  * and logical segment number of a given code segment.
  *
  * 'proc' either *is* already a pair of module handle and segment number,
@@ -865,7 +865,7 @@
  *        the function the snoop code will return to ...
  *
  */
-static BOOL TASK_GetCodeSegment( FARPROC16 proc, NE_MODULE **ppModule, 
+static BOOL TASK_GetCodeSegment( FARPROC16 proc, NE_MODULE **ppModule,
                                  SEGTABLEENTRY **ppSeg, int *pSegNr )
 {
     NE_MODULE *pModule = NULL;
@@ -882,7 +882,7 @@
     }
 
     /* Try thunk or function */
-    else 
+    else
     {
         BYTE *thunk = MapSL( (SEGPTR)proc );
         WORD selector;
@@ -1336,8 +1336,8 @@
     TDB *pTask = TASK_GetCurrent();
     if ( !pTask || !pTask->userhandler ) return;
 
-    TASK_CallTo16_word_wwwww( pTask->userhandler, 
-                              hTaskOrModule, uCode, 0, 
+    TASK_CallTo16_word_wwwww( pTask->userhandler,
+                              hTaskOrModule, uCode, 0,
                               pTask->hInstance, pTask->hQueue );
 }
 
diff --git a/memory/atom.c b/memory/atom.c
index 67c356f..8485791 100644
--- a/memory/atom.c
+++ b/memory/atom.c
@@ -66,7 +66,7 @@
     WORD        size;
     HANDLE16    entries[1];
 } ATOMTABLE;
-		
+
 static WORD ATOM_UserDS = 0;  /* USER data segment */
 
 /***********************************************************************
@@ -120,7 +120,7 @@
     WORD i, hash = 0;
 
     TRACE("%x, %s, %x\n", entries, str, len);
-    
+
     for (i = 0; i < len; i++) hash ^= toupper(str[i]) + i;
     return hash % entries;
 }
@@ -200,14 +200,14 @@
     HANDLE16 handle;
     ATOMTABLE *table;
 
-      /* We consider the first table to be initialized as the global table. 
-       * This works, as USER (both built-in and native) is the first one to 
-       * register ... 
+      /* We consider the first table to be initialized as the global table.
+       * This works, as USER (both built-in and native) is the first one to
+       * register ...
        */
 
     if (!ATOM_UserDS)
     {
-        ATOM_UserDS = CURRENT_DS; 
+        ATOM_UserDS = CURRENT_DS;
         /* return dummy local handle */
         return LocalAlloc16( LMEM_FIXED, 1 );
     }
@@ -262,7 +262,7 @@
     if (ATOM_IsIntAtomA( str, &iatom )) return iatom;
 
     TRACE("%s\n",debugstr_a(buffer));
-    
+
     /* Make a copy of the string to be sure it doesn't move in linear memory. */
     lstrcpynA( buffer, str, sizeof(buffer) );
 
@@ -275,7 +275,7 @@
     while (entry)
     {
 	entryPtr = ATOM_MakePtr( entry );
-	if ((entryPtr->length == len) && 
+	if ((entryPtr->length == len) &&
 	    (!strncasecmp( entryPtr->str, buffer, len )))
 	{
 	    entryPtr->refCount++;
@@ -329,7 +329,7 @@
     {
 	ATOMENTRY * prevEntryPtr = ATOM_MakePtr( *prevEntry );
 	prevEntry = &prevEntryPtr->next;
-    }    
+    }
     if (!*prevEntry) return atom;
 
     /* Delete atom */
@@ -337,7 +337,7 @@
     {
 	*prevEntry = entryPtr->next;
         LocalFree16( entry );
-    }    
+    }
     return 0;
 }
 
@@ -364,7 +364,7 @@
     while (entry)
     {
 	ATOMENTRY * entryPtr = ATOM_MakePtr( entry );
-	if ((entryPtr->length == len) && 
+	if ((entryPtr->length == len) &&
 	    (!strncasecmp( entryPtr->str, str, len )))
         {
             TRACE("-- found %x\n", entry);
@@ -390,9 +390,9 @@
     char text[8];
 
     if (CURRENT_DS == ATOM_UserDS) return GlobalGetAtomNameA( atom, buffer, count );
-    
+
     TRACE("%x\n",atom);
-    
+
     if (!count) return 0;
     if (atom < MAXINTATOM)
     {
@@ -573,7 +573,7 @@
  */
 ATOM WINAPI DeleteAtom( ATOM atom /* [in] Atom to delete */ )
 {
-    return ATOM_DeleteAtom( atom, TRUE ); 
+    return ATOM_DeleteAtom( atom, TRUE );
 }
 
 
diff --git a/memory/codepage.c b/memory/codepage.c
index 21915ad..2ed3ebb 100644
--- a/memory/codepage.c
+++ b/memory/codepage.c
@@ -163,7 +163,7 @@
 {
     const union cptable *table = get_codepage_table( codepage );
 
-    if (!table) 
+    if (!table)
     {
         SetLastError( ERROR_INVALID_PARAMETER );
         return FALSE;
diff --git a/memory/environ.c b/memory/environ.c
index 8fa917a..c52fcbc 100644
--- a/memory/environ.c
+++ b/memory/environ.c
@@ -312,13 +312,13 @@
  * Note that it does NOT necessarily include the file name.
  * Sometimes we don't even have any command line options at all.
  *
- * We must quote and escape characters so that the argv array can be rebuilt 
+ * We must quote and escape characters so that the argv array can be rebuilt
  * from the command line:
  * - spaces and tabs must be quoted
  *   'a b'   -> '"a b"'
  * - quotes must be escaped
  *   '"'     -> '\"'
- * - if '\'s are followed by a '"', they must be doubled and followed by '\"', 
+ * - if '\'s are followed by a '"', they must be doubled and followed by '\"',
  *   resulting in an odd number of '\' followed by a '"'
  *   '\"'    -> '\\\"'
  *   '\\"'   -> '\\\\\"'
@@ -351,7 +351,7 @@
                 if (*a==' ' || *a=='\t') {
                     has_space=1;
                 } else if (*a=='"') {
-                    /* doubling of '\' preceeding a '"', 
+                    /* doubling of '\' preceeding a '"',
                      * plus escaping of said '"'
                      */
                     len+=2*bcount+1;
@@ -448,14 +448,14 @@
  * whereas Windows NT only returns the full file path plus arguments
  * in case the program has been started with a full path.
  * Win9x seems to have inherited NT behaviour.
- * 
+ *
  * Note that both Start Menu Execute and Explorer start programs with
  * fully specified quoted app file paths, which is why probably the only case
  * where you'll see single file names is in case of direct launch
  * via CreateProcess or WinExec.
  *
  * Perhaps we should take care of Win3.1 programs here (Win32s "feature").
- * 
+ *
  * References: MS KB article q102762.txt (special Win32s handling)
  */
 LPSTR WINAPI GetCommandLineA(void)
diff --git a/memory/global.c b/memory/global.c
index ffa2b89..17e6b00 100644
--- a/memory/global.c
+++ b/memory/global.c
@@ -181,7 +181,7 @@
     GLOBALARENA *pArena;
 
     if (!handle) return TRUE;
-    sel = GlobalHandleToSel16( handle ); 
+    sel = GlobalHandleToSel16( handle );
     if (!VALID_HANDLE(sel))
     	return FALSE;
     pArena = GET_ARENA_PTR(sel);
@@ -199,7 +199,7 @@
     GLOBALARENA *pArena;
 
     if (!handle) return TRUE;
-    sel = GlobalHandleToSel16( handle ); 
+    sel = GlobalHandleToSel16( handle );
     if (!VALID_HANDLE(sel))
     	return FALSE;
     pArena = GET_ARENA_PTR(sel);
@@ -291,7 +291,7 @@
     TRACE("%04x %ld flags=%04x\n",
                     handle, size, flags );
     if (!handle) return 0;
-    
+
     if (!VALID_HANDLE(handle)) {
     	WARN("Invalid handle 0x%04x!\n", handle);
     	return 0;
@@ -308,7 +308,7 @@
         HeapFree( GetProcessHeap(), 0, (void *)pArena->base );
         pArena->base = 0;
 
-        /* Note: we rely on the fact that SELECTOR_ReallocBlock won't 
+        /* Note: we rely on the fact that SELECTOR_ReallocBlock won't
          * change the selector if we are shrinking the block.
 	 * FIXME: shouldn't we keep selectors until the block is deleted?
 	 */
@@ -377,7 +377,7 @@
         return 0;
     }
 
-      /* Fill the new arena block 
+      /* Fill the new arena block
          As we may have used HEAP_REALLOC_IN_PLACE_ONLY, areas may overlap*/
 
     if (pNewArena != pArena) memmove( pNewArena, pArena, sizeof(GLOBALARENA) );
@@ -438,7 +438,7 @@
 	    WARN("Invalid handle 0x%04x passed to WIN16_GlobalLock16!\n",handle);
 	    sel = 0;
 	}
-	else if (!GET_ARENA_PTR(handle)->base) 
+	else if (!GET_ARENA_PTR(handle)->base)
             sel = 0;
         else
             GET_ARENA_PTR(handle)->lockCount++;
@@ -462,7 +462,7 @@
  *           GlobalLock16   (KERNEL32.25)
  *
  * This is the GlobalLock16() function used by 32-bit code.
- * 
+ *
  * RETURNS
  *	Pointer to first byte of memory block
  *	NULL: Failure
@@ -735,7 +735,7 @@
        HMODULE16 hModule = GetModuleHandle16("KERNEL");
        WORD	 wSelector;
        GLOBALARENA *pArena;
-   
+
        wSelector = GLOBAL_CreateBlock(GMEM_FIXED, lpBlock, size, hModule, WINE_LDT_FLAGS_DATA );
        pArena = GET_ARENA_PTR(wSelector);
        pArena->flags |= GA_DOSMEM;
@@ -756,7 +756,7 @@
 ) {
    DWORD   block = GetSelectorBase(sel);
 
-   if( block && block < 0x100000 ) 
+   if( block && block < 0x100000 )
    {
        LPVOID lpBlock = DOSMEM_MapDosToLinear( block );
        if( DOSMEM_FreeBlock( lpBlock ) )
@@ -976,7 +976,7 @@
     MEMORYSTATUS status;
 
     /*
-     * Not unsurprisingly although the documention says you 
+     * Not unsurprisingly although the documention says you
      * _must_ provide the size in the dwSize field, this function
      * (under Windows) always fills the structure and returns true.
      */
@@ -1007,12 +1007,12 @@
 /*
  * Win32 Global heap functions (GlobalXXX).
  * These functions included in Win32 for compatibility with 16 bit Windows
- * Especially the moveable blocks and handles are oldish. 
+ * Especially the moveable blocks and handles are oldish.
  * But the ability to directly allocate memory with GPTR and LPTR is widely
  * used.
  *
  * The handle stuff looks horrible, but it's implemented almost like Win95
- * does it. 
+ * does it.
  *
  */
 
@@ -1051,9 +1051,9 @@
       hpflags=HEAP_ZERO_MEMORY;
    else
       hpflags=0;
-   
+
    TRACE("() flags=%04x\n",  flags );
-   
+
    if((flags & GMEM_MOVEABLE)==0) /* POINTER */
    {
       palloc=HeapAlloc(GetProcessHeap(), hpflags, size);
@@ -1079,9 +1079,9 @@
       pintern->Magic=MAGIC_GLOBAL_USED;
       pintern->Flags=flags>>8;
       pintern->LockCount=0;
-      
+
       /* HeapUnlock(heap); */
-       
+
       return INTERN_TO_HANDLE(pintern);
    }
 }
@@ -1103,7 +1103,7 @@
       return (LPVOID) hmem;
 
    /* HeapLock(GetProcessHeap()); */
-   
+
    pintern=HANDLE_TO_INTERN(hmem);
    if(pintern->Magic==MAGIC_GLOBAL_USED)
    {
@@ -1396,7 +1396,7 @@
    DWORD                retval;
    PGLOBAL32_INTERN     pintern;
 
-   if(ISPOINTER(hmem)) 
+   if(ISPOINTER(hmem))
    {
       retval=HeapSize(GetProcessHeap(), 0,  (LPVOID) hmem);
    }
@@ -1404,7 +1404,7 @@
    {
       /* HeapLock(heap); */
       pintern=HANDLE_TO_INTERN(hmem);
-      
+
       if(pintern->Magic==MAGIC_GLOBAL_USED)
       {
         if (!pintern->Pointer) /* handle case of GlobalAlloc( ??,0) */
@@ -1478,7 +1478,7 @@
 ) {
    DWORD                retval;
    PGLOBAL32_INTERN     pintern;
-   
+
    if(ISPOINTER(hmem))
    {
       retval=0;
@@ -1488,7 +1488,7 @@
       /* HeapLock(GetProcessHeap()); */
       pintern=HANDLE_TO_INTERN(hmem);
       if(pintern->Magic==MAGIC_GLOBAL_USED)
-      {               
+      {
 	 retval=pintern->LockCount + (pintern->Flags<<8);
 	 if(pintern->Pointer==0)
 	    retval|= GMEM_DISCARDED;
@@ -1616,7 +1616,7 @@
 	    lpmem->dwMemoryLoad = 0;
 	}
 	free(tmp);
-	
+
     }
 #endif
     /* FIXME: should do something for other systems */
diff --git a/memory/heap.c b/memory/heap.c
index 171599d..cb1dacc 100644
--- a/memory/heap.c
+++ b/memory/heap.c
@@ -314,7 +314,7 @@
     if ( !(base = VirtualAlloc( NULL, totSize, MEM_RESERVE, PAGE_READWRITE )) )
         return 0;
 
-    if ( !VirtualAlloc( base, segSize + HTABLE_PAGESIZE, 
+    if ( !VirtualAlloc( base, segSize + HTABLE_PAGESIZE,
                         MEM_COMMIT, PAGE_READWRITE ) )
     {
         VirtualFree( base, 0, MEM_RELEASE );
@@ -329,7 +329,7 @@
 
 
     /* Set up header and handle table */
-    
+
     header = (LOCAL32HEADER *)(base + segSize);
     header->base    = base;
     header->limit   = HTABLE_PAGESIZE-1;
@@ -348,8 +348,8 @@
 
 
     /* Set up selector table */
-  
-    nrBlocks      = (totSize + 0x7fff) >> 15; 
+
+    nrBlocks      = (totSize + 0x7fff) >> 15;
     selectorTable = (LPWORD) HeapAlloc( header->heap,  0, nrBlocks * 2 );
     selectorEven  = SELECTOR_AllocBlock( base, totSize, WINE_LDT_FLAGS_DATA );
     selectorOdd   = SELECTOR_AllocBlock( base + 0x8000, totSize - 0x8000, WINE_LDT_FLAGS_DATA );
@@ -384,7 +384,7 @@
         GLOBAL_MoveBlock( segment, base, totSize );
         HeapFree( GetProcessHeap(), 0, oldBase );
     }
-    
+
     return (HANDLE)header;
 }
 
@@ -409,7 +409,7 @@
 /***********************************************************************
  *           Local32_ToHandle
  */
-static VOID Local32_ToHandle( LOCAL32HEADER *header, INT16 type, 
+static VOID Local32_ToHandle( LOCAL32HEADER *header, INT16 type,
                               DWORD addr, LPDWORD *handle, LPBYTE *ptr )
 {
     *handle = NULL;
@@ -428,8 +428,8 @@
             break;
 
         case 0:     /* handle */
-            if (    addr >= sizeof(LOCAL32HEADER) 
-                 && addr <  header->limit && !(addr & 3) 
+            if (    addr >= sizeof(LOCAL32HEADER)
+                 && addr <  header->limit && !(addr & 3)
                  && *(LPDWORD)((LPBYTE)header + addr) >= HTABLE_SIZE )
             {
                 *handle = (LPDWORD)((LPBYTE)header + addr);
@@ -452,7 +452,7 @@
 /***********************************************************************
  *           Local32_FromHandle
  */
-static VOID Local32_FromHandle( LOCAL32HEADER *header, INT16 type, 
+static VOID Local32_FromHandle( LOCAL32HEADER *header, INT16 type,
                                 DWORD *addr, LPDWORD handle, LPBYTE ptr )
 {
     switch (type)
@@ -462,7 +462,7 @@
         {
             WORD *selTable = (LPWORD)(header->base + header->selectorTableOffset);
             DWORD offset   = (LPBYTE)ptr - header->base;
-            *addr = MAKELONG( offset & 0x7fff, selTable[offset >> 15] ); 
+            *addr = MAKELONG( offset & 0x7fff, selTable[offset >> 15] );
         }
         break;
 
@@ -488,7 +488,7 @@
     DWORD addr;
 
     /* Allocate memory */
-    ptr = HeapAlloc( header->heap, 
+    ptr = HeapAlloc( header->heap,
                      (flags & LMEM_MOVEABLE)? HEAP_ZERO_MEMORY : 0, size );
     if (!ptr) return 0;
 
@@ -512,24 +512,24 @@
         /* If virgin page, initialize it */
         if (header->freeListFirst[page] == 0xffff)
         {
-            if ( !VirtualAlloc( (LPBYTE)header + (page << 12), 
+            if ( !VirtualAlloc( (LPBYTE)header + (page << 12),
                                 0x1000, MEM_COMMIT, PAGE_READWRITE ) )
             {
                 WARN("Cannot grow handle table!\n" );
                 HeapFree( header->heap, 0, ptr );
                 return 0;
             }
-            
+
             header->limit += HTABLE_PAGESIZE;
 
             header->freeListFirst[page] = 0;
             header->freeListLast[page]  = HTABLE_PAGESIZE - 4;
             header->freeListSize[page]  = HTABLE_PAGESIZE / 4;
-           
+
             for (i = 0; i < HTABLE_PAGESIZE; i += 4)
                 *(DWORD *)((LPBYTE)header + i) = i+4;
 
-            if (page < HTABLE_NPAGES-1) 
+            if (page < HTABLE_NPAGES-1)
                 header->freeListFirst[page+1] = 0xffff;
         }
 
@@ -573,8 +573,8 @@
     if (!handle) return FALSE;
 
     /* Reallocate memory block */
-    ptr = HeapReAlloc( header->heap, 
-                       (flags & LMEM_MOVEABLE)? HEAP_ZERO_MEMORY : 0, 
+    ptr = HeapReAlloc( header->heap,
+                       (flags & LMEM_MOVEABLE)? HEAP_ZERO_MEMORY : 0,
                        ptr, size );
     if (!ptr) return 0;
 
@@ -620,7 +620,7 @@
         /* Shrink handle table when possible */
         while (page > 0 && header->freeListSize[page] == HTABLE_PAGESIZE / 4)
         {
-            if ( VirtualFree( (LPBYTE)header + 
+            if ( VirtualFree( (LPBYTE)header +
                               (header->limit & ~(HTABLE_PAGESIZE-1)),
                               HTABLE_PAGESIZE, MEM_DECOMMIT ) )
                 break;
@@ -694,8 +694,8 @@
 static LOCAL32HEADER *Local32_GetHeap( HGLOBAL16 handle )
 {
     WORD selector = GlobalHandleToSel16( handle );
-    DWORD base  = GetSelectorBase( selector ); 
-    DWORD limit = GetSelectorLimit16( selector ); 
+    DWORD base  = GetSelectorBase( selector );
+    DWORD limit = GetSelectorLimit16( selector );
 
     /* Hmmm. This is a somewhat stupid heuristic, but Windows 95 does
        it this way ... */
diff --git a/memory/instr.c b/memory/instr.c
index 78c4f41..bbea64a 100644
--- a/memory/instr.c
+++ b/memory/instr.c
@@ -64,7 +64,7 @@
  * Try to replace an invalid selector by a valid one.
  * The only selector where it is allowed to do "mov ax,40;mov es,ax"
  * is the so called 'bimodal' selector 0x40, which points to the BIOS
- * data segment. Used by (at least) Borland products (and programs compiled 
+ * data segment. Used by (at least) Borland products (and programs compiled
  * using Borland products).
  *
  * See Undocumented Windows, Chapter 5, __0040.
@@ -74,7 +74,7 @@
     extern char Call16_Start, Call16_End;
 
     if (IS_SELECTOR_SYSTEM(context->SegCs))
-        if (    (char *)context->Eip >= &Call16_Start 
+        if (    (char *)context->Eip >= &Call16_Start
              && (char *)context->Eip <  &Call16_End   )
         {
             /* Saved selector may have become invalid when the relay code */
@@ -604,7 +604,7 @@
                       if (long_addr) context->Edi += step;
                       else ADD_LOWORD(context->Edi,step);
                   }
-                  
+
 		  switch (typ)
                   {
 		    case 0x6c:
@@ -682,7 +682,7 @@
                 return TRUE;
             }
             break;  /* Unable to emulate it */
-            
+
         case 0xcd: /* int <XX> */
             if (long_op)
             {
diff --git a/memory/local.c b/memory/local.c
index 4041ea3..a4402c0 100644
--- a/memory/local.c
+++ b/memory/local.c
@@ -80,8 +80,8 @@
 
 /*
  * We make addr = 4n + 2 and set *((WORD *)addr - 1) = &addr like Windows does
- * in case something actually relies on this.   
- * Note that if the architecture does not allow unaligned accesses, we make 
+ * in case something actually relies on this.
+ * Note that if the architecture does not allow unaligned accesses, we make
  * addr = 4n + 4 to avoid returning unaligned pointers from LocalAlloc etc.
  *
  * An unused handle has lock = flags = 0xff. In windows addr is that of next
@@ -188,7 +188,7 @@
     pArena = ARENA_PTR( baseptr, block );
     pArena->prev = (pArena->prev & ~3) | LOCAL_ARENA_FREE;
     pArena->size = pArena->next - block;
-    
+
       /* Find the next free block (last block is always free) */
 
     next = pArena->next;
@@ -292,7 +292,7 @@
     LOCALHEAPINFO *pInfo;
     WORD arena;
 
-    /* FIXME - the test should be done when calling the function! 
+    /* FIXME - the test should be done when calling the function!
                plus is not clear that we should print this info
                only when TRACE_ON is on! */
     if(!TRACE_ON(local)) return;
@@ -378,7 +378,7 @@
         }
     }
 
-    if (start == 0) 
+    if (start == 0)
     {
         /* start == 0 means: put the local heap at the end of the segment */
 
@@ -490,7 +490,7 @@
     WORD freeArena, lastArena;
     LOCALARENA *pArena, *pLastArena;
     char *ptr;
-    
+
     hseg = GlobalHandle16( ds );
     /* maybe mem allocated by Virtual*() ? */
     if (!hseg) return FALSE;
@@ -513,7 +513,7 @@
     freeArena = pHeapInfo->last;
     pHeapInfo->last = lastArena;
     pHeapInfo->minsize += end - oldsize;
-    
+
       /* grow the old last block */
     pArena = ARENA_PTR( ptr, freeArena );
     pArena->size      = lastArena - freeArena;
@@ -528,7 +528,7 @@
     pLastArena->size      = LALIGN(sizeof(LOCALARENA));
     pLastArena->free_prev = freeArena;
     pLastArena->free_next = lastArena;  /* this one */
-    
+
     /* If block before freeArena is also free then merge them */
     if((ARENA_PTR(ptr, (pArena->prev & ~3))->prev & 3) == LOCAL_ARENA_FREE)
     {
@@ -678,7 +678,7 @@
     LOCALARENA *pArena;
     WORD arena;
     WORD freespace = 0;
-    
+
     if (!(pInfo = LOCAL_GetHeap( ds )))
     {
         ERR("Local heap not found\n" );
@@ -774,7 +774,7 @@
                     memcpy((char *)pFinalArena + ARENA_HEADER_SIZE,
                            (char *)pMoveArena + ARENA_HEADER_SIZE,
                            movesize - ARENA_HEADER_SIZE );
-                    /* Free the old location */  
+                    /* Free the old location */
                     LOCAL_FreeArena(ds, movearena);
 		    if (pInfo->notify)
 		        LOCAL_CallTo16_word_www(pInfo->notify, LN_MOVE,
@@ -1080,14 +1080,14 @@
 
     pEntry->addr = 0;  /* just in case */
     pEntry->lock = 0xff;
-    pEntry->flags = 0xff; 
+    pEntry->flags = 0xff;
     /* Now check if all entries in this table are free */
 
     table = *pTable;
     pEntry = (LOCALHANDLEENTRY *)(ptr + table + sizeof(WORD));
     count = *(WORD *)(ptr + table);
     for (i = count; i > 0; i--, pEntry++) if (pEntry->lock != 0xff) return;
-    
+
     /* Remove the table from the linked list and free it */
 
     TRACE("(%04x): freeing table %04x\n",
@@ -1107,7 +1107,7 @@
     char *ptr = MapSL( MAKESEGPTR( ds, 0 ) );
 
     TRACE("%04x ds=%04x\n", handle, ds );
-    
+
     if (!handle) { WARN("Handle is 0.\n" ); return 0; }
     if (HANDLE_FIXED( handle ))
     {
@@ -1140,7 +1140,7 @@
 {
     char *ptr;
     HLOCAL16 handle;
-    
+
     TRACE("%04x %d ds=%04x\n", flags, size, ds );
 
     if(size > 0 && size <= 4) size = 5;
@@ -1211,7 +1211,7 @@
     TRACE("%04x %d %04x ds=%04x\n",
                    handle, size, flags, ds );
     if (!(pInfo = LOCAL_GetHeap( ds ))) return 0;
-    
+
     if (HANDLE_FIXED( handle ))
 	blockhandle = handle;
     else
@@ -1407,7 +1407,7 @@
         if (pEntry->lock < 0xfe) pEntry->lock++;
         handle = pEntry->addr;
     }
-    TRACE("%04x returning %04x\n", 
+    TRACE("%04x returning %04x\n",
 		   old_handle, handle );
     return handle;
 }
@@ -1456,7 +1456,7 @@
     TRACE("%04x ds=%04x\n", handle, ds );
 
     if (!handle) return 0;
-    if (HANDLE_MOVEABLE( handle )) 
+    if (HANDLE_MOVEABLE( handle ))
     {
         handle = *(WORD *)(ptr + handle);
         if (!handle) return 0;
@@ -1547,7 +1547,7 @@
  * Implementation of LocalHandle().
  */
 HLOCAL16 LOCAL_Handle( HANDLE16 ds, WORD addr )
-{ 
+{
     char *ptr = MapSL( MAKESEGPTR( ds, 0 ) );
     LOCALHEAPINFO *pInfo;
     WORD table;
@@ -1639,7 +1639,7 @@
  *           LocalHandle   (KERNEL.11)
  */
 HLOCAL16 WINAPI LocalHandle16( WORD addr )
-{ 
+{
     return LOCAL_Handle( CURRENT_DS, addr );
 }
 
diff --git a/memory/registry.c b/memory/registry.c
index 9bd7024..2010b99 100644
--- a/memory/registry.c
+++ b/memory/registry.c
@@ -52,7 +52,7 @@
  *           RegCreateKeyExA   [ADVAPI32.@]
  */
 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;
@@ -377,7 +377,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 )
diff --git a/memory/selector.c b/memory/selector.c
index 6ff3e13..657f3b6 100644
--- a/memory/selector.c
+++ b/memory/selector.c
@@ -736,7 +736,7 @@
  */
 static void
 x_SMapLS_IP_EBP_x(CONTEXT86 *context,int argoff) {
-    DWORD	val,ptr; 
+    DWORD	val,ptr;
 
     val =*(DWORD*)(context->Ebp + argoff);
     if (val<0x10000) {
@@ -875,7 +875,7 @@
 /**********************************************************************
  * 		AllocMappedBuffer	(KERNEL32.38)
  *
- * This is a undocumented KERNEL32 function that 
+ * This is a undocumented KERNEL32 function that
  * SMapLS's a GlobalAlloc'ed buffer.
  *
  * Input:   EDI register: size of buffer to allocate
diff --git a/memory/virtual.c b/memory/virtual.c
index d41c24a..afa1418 100644
--- a/memory/virtual.c
+++ b/memory/virtual.c
@@ -450,7 +450,7 @@
     if ((ptr = wine_anon_mmap( base, view_size, prot, flags )) == (void *)-1)
     {
         /* KB: Q125713, 25-SEP-1995, "Common File Mapping Problems and
-	 * Platform Differences": 
+	 * Platform Differences":
 	 * Windows NT: ERROR_INVALID_PARAMETER
 	 * Windows 95: ERROR_INVALID_ADDRESS.
 	 */
@@ -559,7 +559,7 @@
         MESSAGE(")\n");
         goto error;
     }
-    
+
     /* retrieve the shared sections file */
 
     if (shared_size)
@@ -980,7 +980,7 @@
 /***********************************************************************
  *             VirtualFree   (KERNEL32.@)
  * Release or decommits a region of pages in virtual address space.
- * 
+ *
  * RETURNS
  *	TRUE: Success
  *	FALSE: Failure
@@ -1047,7 +1047,7 @@
 /***********************************************************************
  *             VirtualLock   (KERNEL32.@)
  * Locks the specified region of virtual address space
- * 
+ *
  * NOTE
  *	Always returns TRUE
  *
@@ -1433,8 +1433,8 @@
  *             CreateFileMappingW   (KERNEL32.@)
  * See CreateFileMappingA
  */
-HANDLE WINAPI CreateFileMappingW( HANDLE hFile, LPSECURITY_ATTRIBUTES sa, 
-                                  DWORD protect, DWORD size_high,  
+HANDLE WINAPI CreateFileMappingW( HANDLE hFile, LPSECURITY_ATTRIBUTES sa,
+                                  DWORD protect, DWORD size_high,
                                   DWORD size_low, LPCWSTR name )
 {
     HANDLE ret;
diff --git a/misc/cpu.c b/misc/cpu.c
index e9d8bd1..8f70080 100644
--- a/misc/cpu.c
+++ b/misc/cpu.c
@@ -49,11 +49,11 @@
  *							Identifier (CPU x86)
  * Note that there is a hierarchy for every processor installed, so this
  * supports multiprocessor systems. This is done like Win95 does it, I think.
- *							
+ *
  * It also creates a cached flag array for IsProcessorFeaturePresent().
  *
  * No NULL ptr check for LPSYSTEM_INFO in Win9x.
- * 
+ *
  * RETURNS
  *	nothing, really
  */
@@ -157,7 +157,7 @@
 		}
 		/* old 2.0 method */
 		if (!strncasecmp(line, "cpu",strlen("cpu"))) {
-			if (	isdigit (value[0]) && value[1] == '8' && 
+			if (	isdigit (value[0]) && value[1] == '8' &&
 				value[2] == '6' && value[3] == 0
 			) {
 				switch (value[0] - '0') {
diff --git a/misc/error.c b/misc/error.c
index 6fe2e95..2f47321 100644
--- a/misc/error.c
+++ b/misc/error.c
@@ -1,5 +1,5 @@
 /*
- * Log internal errors 
+ * Log internal errors
  *
  * Copyright 1997 Andrew Taylor
  *
@@ -199,7 +199,7 @@
 /***********************************************************************
 *	GetErrorString (internal)
 */
-static const char *GetErrorString(UINT16 uErr) 
+static const char *GetErrorString(UINT16 uErr)
 {
   static char buffer[80];
   unsigned int n;
@@ -270,7 +270,7 @@
 	UINT16 uErr = LOWORD(context->Ebx);
         FARPROC16 lpfn = (FARPROC16)MAKESEGPTR( context->SegCs, context->Eip );
         LPVOID lpvParam = (LPVOID)MAKELONG( LOWORD(context->Eax), LOWORD(context->Ecx) );
-	
+
 	LogParamError16( uErr, lpfn, lpvParam );
 
 	if (!(uErr & ERR_WARNING))
diff --git a/misc/options.c b/misc/options.c
index a181974..1c6c9cd 100644
--- a/misc/options.c
+++ b/misc/options.c
@@ -142,7 +142,7 @@
 		    s = p + 7;
 		    /* if there are n ':', there are n+1 modules, and we need
                        n+2 slots, last one being for the sentinel (NULL) */
-		    i = 2;	
+		    i = 2;
 		    while((s = strchr(s, ':'))) i++, s++;
 		    *output = malloc(sizeof(char **) * i);
 		    i = 0;
diff --git a/misc/registry.c b/misc/registry.c
index d4f0f01..d9f6191 100644
--- a/misc/registry.c
+++ b/misc/registry.c
@@ -320,7 +320,7 @@
 
             memcpy(tail,&txt[key->string_off],key->length);
             tail[key->length]='\0';
-            /* all toplevel entries AND the entries in the 
+            /* all toplevel entries AND the entries in the
              * toplevel subdirectory belong to \SOFTWARE\Classes
              */
             if (!level && !strcmp(tail,".classes")) {
@@ -350,7 +350,7 @@
 /******************************************************************************
  * _w31_loadreg [Internal]
  */
-void _w31_loadreg(void) 
+void _w31_loadreg(void)
 {
     HFILE hf;
     struct _w31_header	head;
@@ -382,7 +382,7 @@
     /* read and dump index table */
     tab = _xmalloc(len);
     if (len!=_lread(hf,tab,len)) {
-        ERR("couldn't read %d bytes.\n",len); 
+        ERR("couldn't read %d bytes.\n",len);
         free(tab);
         _lclose(hf);
         return;
@@ -391,14 +391,14 @@
     /* read text */
     txt = _xmalloc(head.textsize);
     if (-1==_llseek(hf,head.textoff,SEEK_SET)) {
-        ERR("couldn't seek to textblock.\n"); 
+        ERR("couldn't seek to textblock.\n");
         free(tab);
         free(txt);
         _lclose(hf);
         return;
     }
     if (head.textsize!=_lread(hf,txt,head.textsize)) {
-        ERR("textblock too short (%d instead of %ld).\n",len,head.textsize); 
+        ERR("textblock too short (%d instead of %ld).\n",len,head.textsize);
         free(tab);
         free(txt);
         _lclose(hf);
@@ -406,7 +406,7 @@
     }
 
     if (!GetFileInformationByHandle(hf,&hfinfo)) {
-        ERR("GetFileInformationByHandle failed?.\n"); 
+        ERR("GetFileInformationByHandle failed?.\n");
         free(tab);
         free(txt);
         _lclose(hf);
@@ -466,8 +466,8 @@
  * The "hash"-value is a value representing the key's name. Windows will not
  * search for the name, but for a matching hash-value. if it finds one, it
  * will compare the actual string info, otherwise continue with the next key.
- * To calculate the hash initialize a D-Word with 0 and add all ASCII-values 
- * of the string which are smaller than 0x80 (128) to this D-Word.   
+ * To calculate the hash initialize a D-Word with 0 and add all ASCII-values
+ * of the string which are smaller than 0x80 (128) to this D-Word.
  *
  * If you want to modify key names, also modify the hash-values, since they
  * cannot be found again (although they would be displayed in REGEDIT)
@@ -664,7 +664,7 @@
             }
         }
 
-        /* write the key path (something like [Software\\Microsoft\\..]) only if: 
+        /* write the key path (something like [Software\\Microsoft\\..]) only if:
            1) key has some values
            2) key has no values and no subkeys
         */
@@ -739,7 +739,7 @@
     DWORD	uk6;		/* 0x20 */
     DWORD	RootKeyBlock;	/* 0x24 */
     DWORD	BlockSize;	/* 0x28 */
-    DWORD   uk7[116];	
+    DWORD   uk7[116];
     DWORD	Checksum; /* at offset 0x1FC */
 } nt_regf;
 
@@ -883,17 +883,17 @@
  * this structure contains the hash of a keyname and points to all
  * subkeys
  *
- * exception: if the id is 'il' there are no hash values and every 
+ * exception: if the id is 'il' there are no hash values and every
  * dword is a offset
  */
 static int _nt_dump_lf(LPSTR key_name, char *base, int subkeys, nt_lf *lf, FILE *f, int level)
 {
     int i;
-    
+
     if (lf->id == NT_REG_HASH_BLOCK_ID) {
         if (subkeys != lf->nr_keys) goto error1;
-    
-        for (i=0; i<lf->nr_keys; i++) 
+
+        for (i=0; i<lf->nr_keys; i++)
             if (!_nt_dump_nk(key_name, base, (nt_nk*)(base+lf->hash_rec[i].off_nk+4), f, level)) goto error;
     } else if (lf->id == NT_REG_NOHASH_BLOCK_ID) {
         nt_li * li = (nt_li*)lf;
@@ -966,7 +966,7 @@
         if (strcmp(new_key_name,"") != 0) strcat(new_key_name,"\\");
         strncat(new_key_name,nk->name,nk->name_len);
 
-        /* write the key path (something like [Software\\Microsoft\\..]) only if: 
+        /* write the key path (something like [Software\\Microsoft\\..]) only if:
            1) key has some values
            2) key has no values and no subkeys
         */
@@ -1067,7 +1067,7 @@
 
 /******************************************************************************
  * _allocate_default_keys [Internal]
- * Registry initialisation, allocates some default keys. 
+ * Registry initialisation, allocates some default keys.
  */
 static void _allocate_default_keys(void) {
 	HKEY	hkey;
diff --git a/misc/system.c b/misc/system.c
index 4196aa3..a5d2d2a 100644
--- a/misc/system.c
+++ b/misc/system.c
@@ -192,7 +192,7 @@
  */
 WORD WINAPI SYSTEM_KillSystemTimer( WORD timer )
 {
-    if ( !timer || timer > NB_SYS_TIMERS || !SYS_Timers[timer-1].callback ) 
+    if ( !timer || timer > NB_SYS_TIMERS || !SYS_Timers[timer-1].callback )
         return timer;  /* Error */
     SYS_Timers[timer-1].callback = NULL;
     if (!--SYS_NbTimers) SYSTEM_StopTicks();
diff --git a/misc/version.c b/misc/version.c
index 1d86a82..a02d9dd 100644
--- a/misc/version.c
+++ b/misc/version.c
@@ -53,7 +53,7 @@
 
 typedef struct
 {
-    LONG             getVersion16; 
+    LONG             getVersion16;
     LONG             getVersion32;
     OSVERSIONINFOEXA getVersionEx;
 } VERSION_DATA;
@@ -345,7 +345,7 @@
  *	VERSION_GetSystemDLLVersion
  *
  * This function tries to figure out if a given (native) dll comes from
- * win95/98 or winnt. Since all values in the OptionalHeader are not a 
+ * win95/98 or winnt. Since all values in the OptionalHeader are not a
  * usable hint, we test if a dll imports the ntdll.
  * This is at least working for all system dlls like comctl32, comdlg32 and
  * shell32.
@@ -362,7 +362,7 @@
         {
 	    char * name = (char *)hmod + (unsigned int)pe_imp->Name;
 	    TRACE("%s\n", name);
-	    
+
 	    if (!strncasecmp(name, "ntdll", 5))
 	    {
 	      switch(PE_HEADER(hmod)->OptionalHeader.MajorOperatingSystemVersion) {
@@ -389,8 +389,8 @@
  *
  * x.xx/1.00/0.00/3.10	Win32s		(any version ?)
  * 2.39/1.00/0.00/3.10	Win32s		freecell.exe (any version)
- * 2.50/1.00/4.00/4.00	Win32s 1.30	winhlp32.exe	
- * 2.60/3.51/3.51/3.51	NT351SP5	system dlls 
+ * 2.50/1.00/4.00/4.00	Win32s 1.30	winhlp32.exe
+ * 2.60/3.51/3.51/3.51	NT351SP5	system dlls
  * 2.60/3.51/3.51/4.00	NT351SP5	comctl32 dll
  * 2.xx/1.00/0.00/4.00	Win95 		system files
  * x.xx/4.00/0.00/4.00	Win95		most applications
@@ -430,7 +430,7 @@
 	      if (!strncasecmp(wm->modname, special_dlls[i], strlen(special_dlls[i]) ))
 	      {
 	        DWORD DllVersion = VERSION_GetSystemDLLVersion(wm->module);
-	        if (WinVersion == NB_WINDOWS_VERSIONS) 
+	        if (WinVersion == NB_WINDOWS_VERSIONS)
 	          WinVersion = DllVersion;
 	        else {
 	          if (WinVersion != DllVersion) {
@@ -446,12 +446,12 @@
 	    }
 	  }
 	}
-	
+
 	if(WinVersion != NB_WINDOWS_VERSIONS) return WinVersion;
-	
+
 	/* we are using no external system dlls, look at the exe */
 	ophd = &(PE_HEADER(GetModuleHandleA(NULL))->OptionalHeader);
-	
+
 	TRACE("%02x.%02x/%02x.%02x/%02x.%02x/%02x.%02x\n",
 	    ophd->MajorLinkerVersion, ophd->MinorLinkerVersion,
 	    ophd->MajorOperatingSystemVersion, ophd->MinorOperatingSystemVersion,
@@ -467,17 +467,17 @@
 	/* the MajorSubsystemVersion is the only usable sign */
 	if (ophd->MajorSubsystemVersion < 4)
 	{
-	  if ( ophd->MajorOperatingSystemVersion == 1 
+	  if ( ophd->MajorOperatingSystemVersion == 1
 	    && ophd->MinorOperatingSystemVersion == 0)
 	  {
 	    return WIN31; /* win32s */
 	  }
-	  
+
 	  if (ophd->Subsystem == IMAGE_SUBSYSTEM_WINDOWS_CUI)
 	    return NT351; /* FIXME: NT 3.1, not tested */
 	  else
 	    return WIN95;
-	}	
+	}
 
 	return WIN95;
 }
diff --git a/miscemu/main.c b/miscemu/main.c
index e248d8a..e216859 100644
--- a/miscemu/main.c
+++ b/miscemu/main.c
@@ -62,7 +62,7 @@
         }
 
         MESSAGE( "%s: can't exec '%s': ", argv0, GetCommandLineA() );
-        switch (instance) 
+        switch (instance)
         {
         case  2: MESSAGE("file not found\n" ); break;
         case 11: MESSAGE("invalid exe file\n" ); break;
diff --git a/msdos/dosconf.c b/msdos/dosconf.c
index 03a214a..9612711 100644
--- a/msdos/dosconf.c
+++ b/msdos/dosconf.c
@@ -1,7 +1,7 @@
 /*
  * DOS CONFIG.SYS parser
  *
- * Copyright 1998 Andreas Mohr 
+ * Copyright 1998 Andreas Mohr
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -54,7 +54,7 @@
 static int DOSCONF_Buffers(char **confline);
 static void DOSCONF_Parse(char *menuname);
 
-DOSCONF DOSCONF_config = 
+DOSCONF DOSCONF_config =
 {
     'E',  /* lastdrive */
     0,    /* brk_flag */
@@ -97,7 +97,7 @@
     { "FCBS", DOSCONF_Fcbs },
     { "BREAK", DOSCONF_Break },
     { "FILES", DOSCONF_Files },
-    { "SHELL", DOSCONF_Shell },    
+    { "SHELL", DOSCONF_Shell },
     { "STACKS", DOSCONF_Stacks },
     { "BUFFERS", DOSCONF_Buffers },
     { "COUNTRY", DOSCONF_Country },
@@ -116,16 +116,16 @@
 static void DOSCONF_skip(char **pconfline)
 {
     char *p;
-    
+
     p = *pconfline;
     while ( (*p == ' ') || (*p == '\t') ) p++;
     *pconfline = p;
 }
-		
+
 static int DOSCONF_JumpToEntry(char **pconfline, char separator)
 {
     char *p;
-    
+
     p = *pconfline;
     while ( (*p != separator) && (*p != '\0') ) p++;
 
@@ -364,7 +364,7 @@
 {
     fpos_t oldpos;
     char *temp;
-    
+
     *confline += 7; /* strlen("INCLUDE") */
     if (!(DOSCONF_JumpToEntry(confline, '='))) return 0;
     fgetpos(cfg_fd, &oldpos);
@@ -383,7 +383,7 @@
    char confline[256];
    char *p, *trail;
    int i;
-    
+
     if (menuname != NULL) /* we need to jump to a certain sub menu */
     {
 	while (fgets(confline, 255, cfg_fd))
diff --git a/msdos/dosmem.c b/msdos/dosmem.c
index 94f57f4..ca173f5 100644
--- a/msdos/dosmem.c
+++ b/msdos/dosmem.c
@@ -161,17 +161,17 @@
 {
     SEGPTR *isr = (SEGPTR*)DOSMEM_sysmem;
     int x;
- 
+
     for (x=0; x<256; x++) isr[x]=MAKESEGPTR(VM_STUB_SEGMENT,x*4);
-} 
+}
 
 static void DOSMEM_MakeIsrStubs(void)
 {
     DWORD *stub = (DWORD*)(DOSMEM_dosmem + (VM_STUB_SEGMENT << 4));
     int x;
- 
+
     for (x=0; x<256; x++) stub[x]=VM_STUB(x);
-} 
+}
 
 /***********************************************************************
  *           DOSMEM_InitDPMI
@@ -243,16 +243,16 @@
 }
 
 /* Add a structure in the BiosSys area (with size and index) and
-   return its offset */ 
+   return its offset */
 WORD DOSMEM_AddBiosSysStruct(int size,int index)
 {
   int Offset = CurrentStructOffset;
-  StructOffset[index]= CurrentStructOffset;     
+  StructOffset[index]= CurrentStructOffset;
   CurrentStructOffset += size;
   return Offset;
 }
 
-/* Return the offset of a structure specified by the index */ 
+/* Return the offset of a structure specified by the index */
 WORD DOSMEM_GetBiosSysStructOffset(int index)
 {
   return StructOffset[index];
@@ -344,7 +344,7 @@
     pVidFunc->SavePointerFlags    = 0x3f;
 
                                     /* FIXME: always real mode ? */
-    pVidState->StaticFuncTable    = (0xf000<<16)+DOSMEM_GetBiosSysStructOffset(OFF_VIDEOFUNCTIONALITY);                                     
+    pVidState->StaticFuncTable    = (0xf000<<16)+DOSMEM_GetBiosSysStructOffset(OFF_VIDEOFUNCTIONALITY);
     pVidState->VideoMode          = pBiosData->VideoMode; /* needs updates! */
     pVidState->NumberColumns      = pBiosData->VideoColumns; /* needs updates! */
     pVidState->RegenBufLen        = 0;
@@ -432,7 +432,7 @@
         /* FIXME - There is still something wrong... */
 
         /* FIXME - Find hex values for opcodes...
-           
+
            (On call, AX contains message number
                      DI contains 'offset' (??)
             Resturn, ES:DI points to counted string )
@@ -445,9 +445,9 @@
            RET
 
         */
-           
-        const int	code = 4;	
-        const int	buffer = 80; 
+
+        const int	code = 4;
+        const int	buffer = 80;
         const int 	SIZE_TO_ALLOCATE = code + buffer;
 
         /* FIXME - Complete rewrite of the table system to save */
@@ -456,8 +456,8 @@
         /* as a special case and programs will use the alternate */
         /* interface (a farcall returned with INT 24 (AX = 0x122e, DL = */
         /* 0x08) which lets us have a smaller memory footprint anyway. */
- 
- 	x = GlobalDOSAlloc16(SIZE_TO_ALLOCATE);  
+
+ 	x = GlobalDOSAlloc16(SIZE_TO_ALLOCATE);
 
 	DOSMEM_ErrorCall = MAKELONG(0,(x>>16));
         DOSMEM_ErrorBuffer = DOSMEM_ErrorCall + code;
@@ -466,7 +466,7 @@
 
         memset(call, 0, SIZE_TO_ALLOCATE);
 #endif
-        /* FIXME - Copy assembly into buffer here */        
+        /* FIXME - Copy assembly into buffer here */
 }
 
 /***********************************************************************
@@ -490,7 +490,7 @@
 
     dm = NEXT_BLOCK(root_block);
     dm->size = DM_BLOCK_TERMINAL;
-    root_block->size |= DM_BLOCK_FREE 
+    root_block->size |= DM_BLOCK_FREE
 #ifdef __DOSMEM_DEBUG__
 		     | DM_BLOCK_DEBUG
 #endif
@@ -623,7 +623,7 @@
 #ifdef __DOSMEM_DEBUG_
    dosmem_entry *prev = NULL;
 #endif
- 
+
    if( size > info_block->free ) return NULL;
    dm = DOSMEM_RootBlock();
 
@@ -659,10 +659,10 @@
 
 	           dm->size = (((size + 0xf + sizeof(dosmem_entry)) & ~0xf) -
 			         	      sizeof(dosmem_entry));
-	           next = (dosmem_entry*)(((char*)dm) + 
+	           next = (dosmem_entry*)(((char*)dm) +
 	 		   sizeof(dosmem_entry) + dm->size);
-	           next->size = (blocksize - (dm->size + 
-			   sizeof(dosmem_entry))) | DM_BLOCK_FREE 
+	           next->size = (blocksize - (dm->size +
+			   sizeof(dosmem_entry))) | DM_BLOCK_FREE
 #ifdef __DOSMEM_DEBUG__
 					          | DM_BLOCK_DEBUG
 #endif
@@ -753,10 +753,10 @@
 
 	             dm->size = (((size + 0xf + sizeof(dosmem_entry)) & ~0xf) -
 			         	        sizeof(dosmem_entry));
-	             next = (dosmem_entry*)(((char*)dm) + 
+	             next = (dosmem_entry*)(((char*)dm) +
 	 		     sizeof(dosmem_entry) + dm->size);
-	             next->size = (blocksize - (dm->size + 
-			     sizeof(dosmem_entry))) | DM_BLOCK_FREE 
+	             next->size = (blocksize - (dm->size +
+			     sizeof(dosmem_entry))) | DM_BLOCK_FREE
 						    ;
 	         } else dm->size &= DM_BLOCK_MASK;
 
@@ -785,10 +785,10 @@
 
 			 dm->size = (((orgsize + 0xf + sizeof(dosmem_entry)) & ~0xf) -
 						       sizeof(dosmem_entry));
-			 next = (dosmem_entry*)(((char*)dm) + 
+			 next = (dosmem_entry*)(((char*)dm) +
 				 sizeof(dosmem_entry) + dm->size);
-			 next->size = (blocksize - (dm->size + 
-				 sizeof(dosmem_entry))) | DM_BLOCK_FREE 
+			 next->size = (blocksize - (dm->size +
+				 sizeof(dosmem_entry))) | DM_BLOCK_FREE
 							;
 		     } else dm->size &= DM_BLOCK_MASK;
 		 }
@@ -806,7 +806,7 @@
 {
    UINT  	 blocksize, available = 0;
    dosmem_entry *dm;
-   
+
    dm = DOSMEM_RootBlock();
 
    while (dm && dm->size != DM_BLOCK_TERMINAL)
diff --git a/msdos/dpmi.c b/msdos/dpmi.c
index 598b0cc..6ea5340 100644
--- a/msdos/dpmi.c
+++ b/msdos/dpmi.c
@@ -93,14 +93,14 @@
 			ret=VirtualAlloc(lastvalloced,len,MEM_COMMIT|MEM_RESERVE,PAGE_EXECUTE_READWRITE);
 			if (!ret)
 				lastvalloced = (char *) lastvalloced + 0x10000;
-			/* we failed to allocate one in the first round. 
+			/* we failed to allocate one in the first round.
 			 * try non-linear
 			 */
 			if (!xflag && (lastvalloced<oldlastv)) { /* wrapped */
 				FIXME("failed to allocate lineary growing memory (%d bytes), using non-linear growing...\n",len);
 				xflag++;
 			}
-			/* if we even fail to allocate something in the next 
+			/* if we even fail to allocate something in the next
 			 * round, return NULL
 			 */
 			if ((xflag==1) && (lastvalloced >= oldlastv))
@@ -214,26 +214,26 @@
 
       /*
        * After this function returns to relay code, protected mode
-       * 16 bit stack will contain STACK16FRAME and single WORD 
+       * 16 bit stack will contain STACK16FRAME and single WORD
        * (EFlags, see next comment).
        */
-      NtCurrentTeb()->cur_stack = 
-        MAKESEGPTR( context->SegSs, 
+      NtCurrentTeb()->cur_stack =
+        MAKESEGPTR( context->SegSs,
                     context->Esp - sizeof(STACK16FRAME) - sizeof(WORD) );
 
       /*
        * After relay code returns to glue function, protected
        * mode 16 bit stack will contain interrupt return record:
-       * IP, CS and EFlags. Since EFlags is ignored, it won't 
+       * IP, CS and EFlags. Since EFlags is ignored, it won't
        * need to be initialized.
        */
       context->Esp -= 3 * sizeof(WORD);
 
       /*
        * Restore stack frame so that relay code won't be confused.
-       * It should be noted that relay code overwrites IP and CS 
+       * It should be noted that relay code overwrites IP and CS
        * in STACK16FRAME with values taken from current CONTEXT86.
-       * These values are what is returned to glue function 
+       * These values are what is returned to glue function
        * (see previous comment).
        */
       *CURRENT_STACK16 = frame;
@@ -256,7 +256,7 @@
     DWORD dw;
     BYTE *ptr;
 
-    if (context->SegCs == DOSMEM_dpmi_sel) { 
+    if (context->SegCs == DOSMEM_dpmi_sel) {
         RawModeSwitch( context );
         return;
     }
@@ -312,7 +312,7 @@
 	    	context->Eax = DOSMEM_AllocSelector(BX_reg(context));
                 break;
             }
-            if (entryPoint) 
+            if (entryPoint)
                 context->Eax = LOWORD(GetProcAddress16( GetModuleHandle16( "KERNEL" ),
                                                         (LPCSTR)(ULONG_PTR)entryPoint ));
         }
@@ -585,7 +585,7 @@
         FIXME("map real to linear (0x%08lx)\n",MAKELONG(CX_reg(context),BX_reg(context)));
          if(!(ptr=DOSMEM_MapRealToLinear(MAKELONG(CX_reg(context),BX_reg(context)))))
          {
-             AX_reg(context) = 0x8021; 
+             AX_reg(context) = 0x8021;
              SET_CFLAG(context);
          }
          else
diff --git a/msdos/int11.c b/msdos/int11.c
index c07b396..d7ac9d7 100644
--- a/msdos/int11.c
+++ b/msdos/int11.c
@@ -42,7 +42,7 @@
     int serialports = 0;
     int x;
 
-/* borrowed from Ralph Brown's interrupt lists 
+/* borrowed from Ralph Brown's interrupt lists
 
 		    bits 15-14: number of parallel devices
 		    bit     13: [Conv] Internal modem
@@ -62,7 +62,7 @@
 		    bit      0: =1 if diskette available for boot
 */
 /*  Currently the only of these bits correctly set are:
-		bits 15-14 		} Added by William Owen Smith, 
+		bits 15-14 		} Added by William Owen Smith,
 		bits 11-9		} wos@dcs.warwick.ac.uk
 		bits 7-6
 		bit  2			(always set)
@@ -71,7 +71,7 @@
     if (GetDriveTypeA("A:\\") == DRIVE_REMOVABLE) diskdrives++;
     if (GetDriveTypeA("B:\\") == DRIVE_REMOVABLE) diskdrives++;
     if (diskdrives) diskdrives--;
-	
+
     for (x=0; x < 9; x++)
     {
         char temp[16],name[16];
@@ -90,7 +90,7 @@
         serialports=7;
     if (parallelports > 3)		/* 2 bits -- maximum value = 3 */
         parallelports=3;
-    
-    AX_reg(context) = (diskdrives << 6) | (serialports << 9) | 
+
+    AX_reg(context) = (diskdrives << 6) | (serialports << 9) |
                       (parallelports << 14) | 0x02;
 }
diff --git a/msdos/int15.c b/msdos/int15.c
index c0d5c58..dd17a1f 100644
--- a/msdos/int15.c
+++ b/msdos/int15.c
@@ -77,7 +77,7 @@
 	{
 	case 0x00: /* Enable-Disable Pointing Device (mouse) */
 	    /* BH = newstate, 00h = disabled 01h = enabled */
-	    switch(BH_reg(context))	    
+	    switch(BH_reg(context))
 	    {
 	        case 0x00:
 	    	    FIXME("Disable Pointing Device - not implemented\n");
diff --git a/msdos/int1a.c b/msdos/int1a.c
index 596244b..3c4a10d 100644
--- a/msdos/int1a.c
+++ b/msdos/int1a.c
@@ -56,10 +56,10 @@
 /**********************************************************************
  *	    INT_Int1aHandler (WPROCS.126)
  *
- * Handler for int 1ah 
+ * Handler for int 1ah
  *     0x00 - 0x07 - date and time
  *     0x?? - 0x?? - Microsoft Real Time Compression Interface
- */ 
+ */
 void WINAPI INT_Int1aHandler( CONTEXT86 *context )
 {
     time_t ltime;
@@ -75,11 +75,11 @@
             AX_reg(context) = 0;  /* No midnight rollover */
             TRACE("int1a: AH=00 -- ticks=%ld\n", ticks);
             break;
-		
-	case 0x02: 
+
+	case 0x02:
 		ltime = time(NULL);
 		bdtime = localtime(&ltime);
-		
+
 		CX_reg(context) = (BIN_TO_BCD(bdtime->tm_hour)<<8) |
                                    BIN_TO_BCD(bdtime->tm_min);
 		DX_reg(context) = (BIN_TO_BCD(bdtime->tm_sec)<<8);
@@ -96,7 +96,7 @@
 		/* setting the time,date or RTC is not allow -EB */
 	case 0x01:
 		/* set system time */
-	case 0x03: 
+	case 0x03:
 		/* set RTC time */
 	case 0x05:
 		/* set RTC date */
@@ -116,7 +116,7 @@
                         INT_BARF(context, 0x1a);
                 }
                 break;
-                
+
 	default:
 		INT_BARF( context, 0x1a );
     }
diff --git a/msdos/int21.c b/msdos/int21.c
index 09e3b6a..9e4b37c 100644
--- a/msdos/int21.c
+++ b/msdos/int21.c
@@ -156,7 +156,7 @@
     TDB *pTask = TASK_GetCurrent();
 
     /* FIXME: This assumes DTA was set correctly! */
-    return (BYTE *)CTX_SEG_OFF_TO_LIN( context, SELECTOROF(pTask->dta), 
+    return (BYTE *)CTX_SEG_OFF_TO_LIN( context, SELECTOROF(pTask->dta),
                                                 (DWORD)OFFSETOF(pTask->dta) );
 }
 
@@ -198,7 +198,7 @@
 		    data[0x21] = 7;
 		    setword(&data[0x22], 2);
 		}
-	}	
+	}
 }
 
 static int INT21_GetFreeDiskSpace( CONTEXT86 *context )
@@ -260,7 +260,7 @@
                 heap->dpb.free_search = 0;
                 heap->dpb.free_clusters = 0xFFFF;    /* unknown */
 				return 1;
-		}	
+		}
 
 		return 0;
 }
@@ -286,7 +286,7 @@
     const DOS_DEVICE *dev;
 
     TRACE("(%d)\n", BX_reg(context));
-    
+
     RESET_CFLAG(context);
 
     /* DOS device ? */
@@ -298,7 +298,7 @@
 
     /* it seems to be a file */
     curr_drive = DRIVE_GetCurrentDrive();
-    DX_reg(context) = 0x0140 + curr_drive + ((curr_drive > 1) ? 0x0800 : 0); 
+    DX_reg(context) = 0x0140 + curr_drive + ((curr_drive > 1) ? 0x0800 : 0);
     /* no floppy */
     /* bits 0-5 are current drive
      * bit 6 - file has NOT been written..FIXME: correct?
@@ -326,7 +326,7 @@
             return FALSE;
 	}
 
-	switch (CL_reg(context)) 
+	switch (CL_reg(context))
 	{
 		case 0x4a: /* lock logical volume */
 			TRACE("lock logical volume (%d) level %d mode %d\n",drive,BH_reg(context),DX_reg(context));
@@ -337,7 +337,7 @@
 			memset(dataptr, 0, 0x20); /* DOS 6.22 uses 0x20 bytes */
 			dataptr[0] = 0x04;
 			dataptr[6] = 0; /* media type */
-			if (drive > 1) 
+			if (drive > 1)
 			{
 				dataptr[1] = 0x05; /* fixed disk */
 				setword(&dataptr[2], 0x01); /* non removable */
@@ -357,7 +357,7 @@
 		case 0x61: /* read logical device track */
 			{
 				BYTE drive = BL_reg(context) ?
-						BL_reg(context) : DRIVE_GetCurrentDrive(); 
+						BL_reg(context) : DRIVE_GetCurrentDrive();
 				WORD head   = *(WORD *)dataptr+1;
 				WORD cyl    = *(WORD *)dataptr+3;
 				WORD sect   = *(WORD *)dataptr+5;
@@ -378,7 +378,7 @@
 			}
 			break;
 		case 0x66:/*  get disk serial number */
-			{	
+			{
 				char	label[12],fsname[9],path[4];
 				DWORD	serial;
 
@@ -399,7 +399,7 @@
 
 		case 0x6f:
 			memset(dataptr+1, '\0', dataptr[0]-1);
-			dataptr[1] = dataptr[0]; 
+			dataptr[1] = dataptr[0];
 			dataptr[2] = 0x07; /* protected mode driver; no eject; no notification */
 			dataptr[3] = 0xFF; /* no physical drive */
 			break;
@@ -473,7 +473,7 @@
 
 /* Many calls translate a drive argument like this:
    drive number (00h = default, 01h = A:, etc)
-   */  
+   */
 static char drivestring[]="default";
 
 char *INT21_DriveName(int drive)
@@ -538,10 +538,10 @@
 	  SET_CFLAG(context);
 	  WARN("extended open/create: failed because file exists \n");
       }
-      else if ((action & 0x07) == 2) 
+      else if ((action & 0x07) == 2)
       {
 	/* Truncate it, but first check if opened for write */
-	if ((BL_reg(context) & 0x0007)== 0) 
+	if ((BL_reg(context) & 0x0007)== 0)
 	{
             _lclose16( AX_reg(context) );
             WARN("extended open/create: failed, trunc on ro file\n");
@@ -573,7 +573,7 @@
 		}
 		uReturnCX = 0x3;
 	}
-      } 
+      }
       else uReturnCX = 0x1;
 
       CX_reg(context) = uReturnCX;
@@ -708,7 +708,7 @@
     char *name = CTX_SEG_OFF_TO_LIN(context,  context->SegDs, context->Edx );
     char *p = name + strlen(name);
 
-    /* despite what Ralf Brown says, some programs seem to call without 
+    /* despite what Ralf Brown says, some programs seem to call without
      * ending backslash (DOS accepts that, so we accept it too) */
     if ((p == name) || (p[-1] != '\\')) *p++ = '\\';
 
@@ -727,7 +727,7 @@
 }
 
 
-static BOOL INT21_GetCurrentDirectory( CONTEXT86 *context ) 
+static BOOL INT21_GetCurrentDirectory( CONTEXT86 *context )
 {
     int drive = DOS_GET_DRIVE( DL_reg(context) );
     char *ptr = (char *)CTX_SEG_OFF_TO_LIN(context,  context->SegDs, context->Esi );
@@ -762,13 +762,13 @@
 {
     BYTE *dataptr = CTX_SEG_OFF_TO_LIN(context, context->SegDs, context->Edx);
     int drive = DOS_GET_DRIVE( BL_reg(context) );
-	
+
     if (!DRIVE_IsValid(drive))
     {
         SetLastError( ERROR_INVALID_DRIVE );
         return 0;
     }
-    
+
     *(WORD *)dataptr = 0;
     *(DWORD *)(dataptr + 2) = DRIVE_GetSerialNumber( drive );
     memcpy( dataptr + 6, DRIVE_GetLabel( drive ), 11 );
@@ -936,7 +936,7 @@
 	  SET_CFLAG(context);
 	  return;
      }
-} 
+}
 
 static BOOL
 INT21_networkfunc (CONTEXT86 *context)
@@ -1131,7 +1131,7 @@
     }
     RESET_CFLAG(context);  /* Not sure if this is a good idea */
 
-    switch(AH_reg(context)) 
+    switch(AH_reg(context))
     {
     case 0x01: /* READ CHARACTER FROM STANDARD INPUT, WITH ECHO */
     case 0x02: /* WRITE CHARACTER TO STANDARD OUTPUT */
@@ -1144,7 +1144,7 @@
     case 0x0b: /* GET STDIN STATUS */
     case 0x0f: /* OPEN FILE USING FCB */
     case 0x10: /* CLOSE FILE USING FCB */
-    case 0x14: /* SEQUENTIAL READ FROM FCB FILE */		
+    case 0x14: /* SEQUENTIAL READ FROM FCB FILE */
     case 0x15: /* SEQUENTIAL WRITE TO FCB FILE */
     case 0x16: /* CREATE OR TRUNCATE FILE USING FCB */
     case 0x21: /* READ RANDOM RECORD FROM FCB FILE */
@@ -1181,10 +1181,10 @@
 
     case 0x0a: /* BUFFERED INPUT */
       {
-	char *buffer = ((char *)CTX_SEG_OFF_TO_LIN(context,  context->SegDs, 
+	char *buffer = ((char *)CTX_SEG_OFF_TO_LIN(context,  context->SegDs,
 						   context->Edx ));
 	int res;
-	
+
 	TRACE("BUFFERED INPUT (size=%d)\n",buffer[0]);
 	if (buffer[1])
 	  TRACE("Handle old chars in buffer!\n");
@@ -1207,7 +1207,7 @@
     case 0x6b: /* NULL FUNCTION */
         AL_reg(context) = 0;
         break;
-	
+
     case 0x5c: /* "FLOCK" - RECORD LOCKING */
         fLock(context);
         break;
@@ -1224,7 +1224,7 @@
         break;
 
     case 0x11: /* FIND FIRST MATCHING FILE USING FCB */
-	TRACE("FIND FIRST MATCHING FILE USING FCB %p\n", 
+	TRACE("FIND FIRST MATCHING FILE USING FCB %p\n",
 	      CTX_SEG_OFF_TO_LIN(context, context->SegDs, context->Edx));
         if (!INT21_FindFirstFCB(context))
         {
@@ -1240,7 +1240,7 @@
     case 0x13: /* DELETE FILE USING FCB */
         DeleteFileFCB(context);
         break;
-            
+
     case 0x17: /* RENAME FILE USING FCB */
         RenameFileFCB(context);
         break;
@@ -1261,7 +1261,7 @@
         DL_reg(context) = 0;
         if (!INT21_GetDriveAllocInfo(context)) AX_reg(context) = 0xffff;
         break;
-	
+
     case 0x1c: /* GET ALLOCATION INFORMATION FOR SPECIFIC DRIVE */
         if (!INT21_GetDriveAllocInfo(context)) AX_reg(context) = 0xffff;
         break;
@@ -1269,7 +1269,7 @@
     case 0x1f: /* GET DRIVE PARAMETER BLOCK FOR DEFAULT DRIVE */
         GetDrivePB(context, DRIVE_GetCurrentDrive());
         break;
-		
+
     case 0x25: /* SET INTERRUPT VECTOR */
         INT_SetPMHandler( AL_reg(context), (FARPROC16)MAKESEGPTR( context->SegDs, DX_reg(context)));
         break;
@@ -1307,7 +1307,7 @@
             BX_reg(context) = OFFSETOF( pTask->dta );
         }
         break;
-            
+
     case 0x30: /* GET DOS VERSION */
         TRACE("GET DOS VERSION %s requested\n",
 	      (AL_reg(context) == 0x00)?"OEM number":"version flag");
@@ -1345,8 +1345,8 @@
 		TRACE("SET CURRENT EXTENDED BREAK STATE\n");
                 INT21_ReadConfigSys();
 		DOSCONF_config.brk_flag = (DL_reg(context) > 0);
-		break;		
-		
+		break;
+
 	      case 0x02: /* GET AND SET EXTENDED CONTROL-BREAK CHECKING STATE*/
 		TRACE("GET AND SET EXTENDED CONTROL-BREAK CHECKING STATE\n");
                 INT21_ReadConfigSys();
@@ -1368,7 +1368,7 @@
 		DL_reg(context) = 3;
 		/* c: is Wine's bootdrive (a: is 1)*/
 		break;
-				
+
 	      case 0x06: /* GET TRUE VERSION NUMBER */
 		TRACE("GET TRUE VERSION NUMBER\n");
 		BX_reg(context) = (HIWORD(GetVersion16() >> 8)) |
@@ -1378,10 +1378,10 @@
 
 	      default:
                 INT_BARF( context, 0x21 );
-		break;			
+		break;
         }
-        break;	
-	    
+        break;
+
     case 0x34: /* GET ADDRESS OF INDOS FLAG */
         TRACE("GET ADDRESS OF INDOS FLAG\n");
         if (!heap) INT21_CreateHeap();
@@ -1404,7 +1404,7 @@
         if (!INT21_GetFreeDiskSpace(context)) AX_reg(context) = 0xffff;
         break;
 
-    case 0x37: 
+    case 0x37:
       {
 	unsigned char switchchar='/';
 	switch (AL_reg(context))
@@ -1454,7 +1454,7 @@
 		}
 	}
         break;
-	
+
     case 0x3a: /* "RMDIR" - REMOVE SUBDIRECTORY */
         TRACE("RMDIR %s\n",
 	      (LPCSTR)CTX_SEG_OFF_TO_LIN(context,  context->SegDs, context->Edx));
@@ -1467,7 +1467,7 @@
 	      (LPCSTR)CTX_SEG_OFF_TO_LIN(context,  context->SegDs, context->Edx));
         bSetDOSExtendedError = !INT21_ChangeDir(context);
         break;
-	
+
     case 0x3c: /* "CREAT" - CREATE OR TRUNCATE FILE */
         TRACE("CREAT flag 0x%02x %s\n",CX_reg(context),
 	      (LPCSTR)CTX_SEG_OFF_TO_LIN(context,  context->SegDs, context->Edx));
@@ -1546,7 +1546,7 @@
         switch (AL_reg(context))
         {
         case 0x00:
-            TRACE("GET FILE ATTRIBUTES for %s\n", 
+            TRACE("GET FILE ATTRIBUTES for %s\n",
 		  (LPCSTR)CTX_SEG_OFF_TO_LIN(context,  context->SegDs, context->Edx));
             AX_reg(context) = (WORD)GetFileAttributesA(
                                           CTX_SEG_OFF_TO_LIN(context, context->SegDs,
@@ -1558,8 +1558,8 @@
         case 0x01:
             TRACE("SET FILE ATTRIBUTES 0x%02x for %s\n", CX_reg(context),
 		  (LPCSTR)CTX_SEG_OFF_TO_LIN(context,  context->SegDs, context->Edx));
-            bSetDOSExtendedError = 
-		(!SetFileAttributesA( CTX_SEG_OFF_TO_LIN(context, context->SegDs, 
+            bSetDOSExtendedError =
+		(!SetFileAttributesA( CTX_SEG_OFF_TO_LIN(context, context->SegDs,
 							   context->Edx),
                                        			   CX_reg(context) ));
             break;
@@ -1568,7 +1568,7 @@
 		  (LPCSTR)CTX_SEG_OFF_TO_LIN(context,  context->SegDs, context->Edx));
         }
         break;
-	
+
     case 0x44: /* IOCTL */
         switch (AL_reg(context))
         {
@@ -1619,7 +1619,7 @@
 
         case 0x09:   /* CHECK IF BLOCK DEVICE REMOTE */
             TRACE("IOCTL - CHECK IF BLOCK DEVICE REMOTE for drive %s\n",
-		 INT21_DriveName( BL_reg(context))); 
+		 INT21_DriveName( BL_reg(context)));
             switch(GetDriveType16( DOS_GET_DRIVE( BL_reg(context) )))
             {
             case DRIVE_UNKNOWN:
@@ -1660,7 +1660,7 @@
 	    {
 	    int drive;
             TRACE("IOCTL - SET LOGICAL DRIVE MAP for drive %s\n",
-		  INT21_DriveName( BL_reg(context))); 
+		  INT21_DriveName( BL_reg(context)));
 	    drive = DOS_GET_DRIVE ( BL_reg(context) );
 	    if ( ! DRIVE_SetLogicalMapping ( drive, drive+1 ) )
 	    {
@@ -1673,7 +1673,7 @@
         case 0xe0:  /* Sun PC-NFS API */
             /* not installed */
             break;
-	
+
 	case 0x52:  /* DR-DOS version */
             /* This is not DR-DOS */
 
@@ -1683,7 +1683,7 @@
             SET_CFLAG(context);       /* Error */
             SetLastError( ERROR_INVALID_FUNCTION );
             break;
-                
+
         default:
             INT_BARF( context, 0x21 );
             break;
@@ -1719,7 +1719,7 @@
     case 0x48: /* ALLOCATE MEMORY */
         TRACE("ALLOCATE MEMORY for %d paragraphs\n", BX_reg(context));
         {
-            LPVOID *mem; 
+            LPVOID *mem;
 	    if (ISV86(context))
 	      {
 		mem= DOSMEM_GetBlock((DWORD)BX_reg(context)<<4,NULL);
@@ -1836,7 +1836,7 @@
         TRACE("RENAME %s to %s\n",
 	      (LPCSTR)CTX_SEG_OFF_TO_LIN(context, context->SegDs,context->Edx),
 	      (LPCSTR)CTX_SEG_OFF_TO_LIN(context, context->SegEs,context->Edi));
-        bSetDOSExtendedError = 
+        bSetDOSExtendedError =
 		(!MoveFileA( CTX_SEG_OFF_TO_LIN(context, context->SegDs,context->Edx),
 			       CTX_SEG_OFF_TO_LIN(context, context->SegEs,context->Edi)));
         break;
@@ -1863,7 +1863,7 @@
 		      BX_reg(context));
                 DosDateTimeToFileTime( DX_reg(context), CX_reg(context),
                                        &filetime );
-                bSetDOSExtendedError = 
+                bSetDOSExtendedError =
 			(!SetFileTime( DosFileHandleToWin32Handle(BX_reg(context)),
                                       NULL, NULL, &filetime ));
             }
@@ -1897,7 +1897,7 @@
     case 0x5b: /* CREATE NEW FILE */
         TRACE("CREATE NEW FILE 0x%02x for %s\n", CX_reg(context),
 	      (LPCSTR)CTX_SEG_OFF_TO_LIN(context,  context->SegDs, context->Edx));
-        bSetDOSExtendedError = ((AX_reg(context) = 
+        bSetDOSExtendedError = ((AX_reg(context) =
                _lcreat16_uniq( CTX_SEG_OFF_TO_LIN(context, context->SegDs,context->Edx),
                                CX_reg(context) )) == (WORD)HFILE_ERROR16);
         break;
@@ -1931,7 +1931,7 @@
             {
                 SetLastError( ERROR_INVALID_DRIVE );
 		bSetDOSExtendedError = TRUE;
-            } 
+            }
             break;
 
         default:
@@ -2000,10 +2000,10 @@
                 while (len--) { *ptr = toupper(*ptr); ptr++; }
             }
             break;
-        case 0x22:            
+        case 0x22:
             TRACE("\tConvert ASCIIZ string to uppercase\n");
             _strupr( (LPSTR)CTX_SEG_OFF_TO_LIN(context,context->SegDs,context->Edx) );
-            break;    
+            break;
 	default:
 	    TRACE("\tunimplemented function %d\n",AL_reg(context));
             INT_BARF( context, 0x21 );
@@ -2019,8 +2019,8 @@
 	    TRACE("GET GLOBAL CODE PAGE TABLE\n");
             DX_reg(context) = BX_reg(context) = CodePage;
             RESET_CFLAG(context);
-            break;			
-        case 0x02: 
+            break;
+        case 0x02:
 	    TRACE("SET GLOBAL CODE PAGE TABLE active page %d system page %d\n",
 		  BX_reg(context),DX_reg(context));
             CodePage = BX_reg(context);
@@ -2039,8 +2039,8 @@
     case 0x6a: /* COMMIT FILE */
         TRACE("FFLUSH/COMMIT handle %d\n",BX_reg(context));
         bSetDOSExtendedError = (!FlushFileBuffers( DosFileHandleToWin32Handle(BX_reg(context)) ));
-        break;		
-	
+        break;
+
     case 0x69: /* DISK SERIAL NUMBER */
         switch (AL_reg(context))
         {
@@ -2059,13 +2059,13 @@
             break;
         }
         break;
-    
+
     case 0x6C: /* Extended Open/Create*/
         TRACE("EXTENDED OPEN/CREATE %s\n",
 	      (LPCSTR)CTX_SEG_OFF_TO_LIN(context,  context->SegDs, context->Edi));
         bSetDOSExtendedError = INT21_ExtendedOpenCreateFile(context);
         break;
-	
+
     case 0x71: /* MS-DOS 7 (Windows95) - LONG FILENAME FUNCTIONS */
 	if ((GetVersion()&0xC0000004)!=0xC0000004) {
 	    /* not supported on anything but Win95 */
@@ -2078,7 +2078,7 @@
         case 0x39:  /* Create directory */
 	    TRACE("LONG FILENAME - MAKE DIRECTORY %s\n",
 		  (LPCSTR)CTX_SEG_OFF_TO_LIN(context,  context->SegDs,context->Edx));
-            bSetDOSExtendedError = (!CreateDirectoryA( 
+            bSetDOSExtendedError = (!CreateDirectoryA(
 					CTX_SEG_OFF_TO_LIN(context,  context->SegDs,
                                                   context->Edx ), NULL));
 	    /* FIXME: CreateDirectory's LastErrors will clash with the ones
@@ -2100,7 +2100,7 @@
         case 0x3a:  /* Remove directory */
 	    TRACE("LONG FILENAME - REMOVE DIRECTORY %s\n",
 		  (LPCSTR)CTX_SEG_OFF_TO_LIN(context,  context->SegDs,context->Edx));
-            bSetDOSExtendedError = (!RemoveDirectoryA( 
+            bSetDOSExtendedError = (!RemoveDirectoryA(
 					CTX_SEG_OFF_TO_LIN(context,  context->SegDs,
                                                         context->Edx )));
             break;
@@ -2118,7 +2118,7 @@
             break;
         case 0x01:
             TRACE("\tset attributes 0x%04x\n",CX_reg(context));
-            bSetDOSExtendedError = (!SetFileAttributesA( 
+            bSetDOSExtendedError = (!SetFileAttributesA(
 				  	CTX_SEG_OFF_TO_LIN(context, context->SegDs,
                                                            context->Edx),
                                         CX_reg(context)  ) );
@@ -2181,7 +2181,7 @@
 		  BX_reg(context));
             bSetDOSExtendedError = (!FindClose16( BX_reg(context) ));
             break;
-        case 0x60:  
+        case 0x60:
 	  switch(CL_reg(context))
 	  {
 	    case 0x01:  /* Get short filename or path */
@@ -2212,15 +2212,15 @@
 	  break;
         case 0x6c:  /* Create or open file */
             TRACE("LONG FILENAME - CREATE OR OPEN FILE %s\n",
-		 (LPCSTR)CTX_SEG_OFF_TO_LIN(context,  context->SegDs, context->Esi)); 
+		 (LPCSTR)CTX_SEG_OFF_TO_LIN(context,  context->SegDs, context->Esi));
 	  /* translate Dos 7 action to Dos 6 action */
 	    bSetDOSExtendedError = INT21_ExtendedOpenCreateFile(context);
 	    break;
 
         case 0x3b:  /* Change directory */
             TRACE("LONG FILENAME - CHANGE DIRECTORY %s\n",
-		 (LPCSTR)CTX_SEG_OFF_TO_LIN(context,  context->SegDs, context->Edx)); 
-	    if (!SetCurrentDirectoryA(CTX_SEG_OFF_TO_LIN(context, 
+		 (LPCSTR)CTX_SEG_OFF_TO_LIN(context,  context->SegDs, context->Edx));
+	    if (!SetCurrentDirectoryA(CTX_SEG_OFF_TO_LIN(context,
 	    					context->SegDs,
 				        	context->Edx
 					))
@@ -2231,8 +2231,8 @@
 	    break;
         case 0x41:  /* Delete file */
             TRACE("LONG FILENAME - DELETE FILE %s\n",
-		 (LPCSTR)CTX_SEG_OFF_TO_LIN(context,  context->SegDs, context->Edx)); 
-	    if (!DeleteFileA(CTX_SEG_OFF_TO_LIN(context, 
+		 (LPCSTR)CTX_SEG_OFF_TO_LIN(context,  context->SegDs, context->Edx));
+	    if (!DeleteFileA(CTX_SEG_OFF_TO_LIN(context,
 	    				context->SegDs,
 					context->Edx)
 	    )) {
@@ -2310,7 +2310,7 @@
 					edpb->edpb_flags = 0;
 					edpb->next_edpb = 0;
 					edpb->free_cluster = edpb->free_cluster2 = 0;
-					
+
 					/* determine free disk space */
 				    *root += DOS_GET_DRIVE( DX_reg(context) );
 				    GetDiskFreeSpaceA( root, &cluster_sectors, &sector_bytes,
@@ -2326,9 +2326,9 @@
 					edpb->max_cluster = total_clusters;
 					edpb->fat_clusters = 32;	/* made-up value */
 					edpb->root_cluster = 0;
-				
+
 					RESET_CFLAG(context);	/* clear carry */
-					AX_reg(context) = 0;	
+					AX_reg(context) = 0;
 				}
 				else
 				{
@@ -2346,7 +2346,7 @@
 			AL_reg(context) = 0;
 			break;
 		}
-		
+
 		break;
 
 
@@ -2361,14 +2361,14 @@
     } /* END OF SWITCH */
 
     if( bSetDOSExtendedError )		/* set general error condition */
-    {   
+    {
 	AX_reg(context) = GetLastError();
 	SET_CFLAG(context);
     }
 
     if ((context->EFlags & 0x0001))
         TRACE("failed, error %ld\n", GetLastError() );
- 
+
     TRACE("returning: AX=%04x BX=%04x CX=%04x DX=%04x "
                  "SI=%04x DI=%04x DS=%04x ES=%04x EFL=%08lx\n",
                  AX_reg(context), BX_reg(context), CX_reg(context),
diff --git a/msdos/int26.c b/msdos/int26.c
index 31fc796..3a473c4 100644
--- a/msdos/int26.c
+++ b/msdos/int26.c
@@ -57,7 +57,7 @@
         begin  = LOWORD(context->Edx);
         length = LOWORD(context->Ecx);
     }
-		
+
     TRACE("int26: abs diskwrite, drive %d, sector %ld, "
                  "count %ld, buffer %p\n",
                  AL_reg(context), begin, length, dataptr );
diff --git a/msdos/int2a.c b/msdos/int2a.c
index c9a1efa..a170a56 100644
--- a/msdos/int2a.c
+++ b/msdos/int2a.c
@@ -20,7 +20,7 @@
     {
     case 0x00:                             /* NETWORK INSTALLATION CHECK */
         break;
-		
+
     default:
 	INT_BARF( context, 0x2a );
     }
diff --git a/msdos/int2f.c b/msdos/int2f.c
index 9f83b67..5f3fa6a 100644
--- a/msdos/int2f.c
+++ b/msdos/int2f.c
@@ -84,14 +84,14 @@
             case 0x05:
             case 0x07:
             case 0x09:
-                break; 
+                break;
             /* Instead of having a message table in DOS-space, */
             /* we can use a special case for MS-DOS to force   */
             /* the secondary interface.			       */
             case 0x00:
             case 0x02:
             case 0x04:
-            case 0x06: 
+            case 0x06:
                 context->SegEs = 0x0001;
                 DI_reg(context) = 0x0000;
                 break;
@@ -104,9 +104,9 @@
             break;
         default:
            INT_BARF(context, 0x2f);
-        }  
+        }
         break;
-   
+
     case 0x15: /* mscdex */
         MSCDEX_Handler(context);
         break;
@@ -143,7 +143,7 @@
     	break;
 
     case 0x45:
-       switch (LOBYTE(context->Eax)) 
+       switch (LOBYTE(context->Eax))
        {
        case 0x00:
        case 0x01:
@@ -204,7 +204,7 @@
         switch (LOBYTE(context->Eax))
         {
 	case 0x0:  /* Low-level Netware installation check AL=0 not installed.*/
-            AL_reg(context) = 0;    
+            AL_reg(context) = 0;
             break;
         case 0x20:  /* Get VLM Call Address */
             /* return nothing -> NetWare not installed */
@@ -246,7 +246,7 @@
 	switch(LOBYTE(context->Eax))
 	{
 	case 0x01: /* Quarterdeck RPCI - QEMM/QRAM - PCL-838.EXE functions */
-	    if(BX_reg(context) == 0x5145 && CX_reg(context) == 0x4D4D 
+	    if(BX_reg(context) == 0x5145 && CX_reg(context) == 0x4D4D
 	      && DX_reg(context) == 0x3432)
 		TRACE("Check for QEMM v5.0+ (not installed)\n");
 		break;
@@ -270,7 +270,7 @@
 	switch(LOBYTE(context->Eax))
 	{
 	case 0x01:   /* Quarterdeck QDPMI.SYS - DESQview */
-	    if(BX_reg(context) == 0x4450 && CX_reg(context) == 0x4d49 
+	    if(BX_reg(context) == 0x4450 && CX_reg(context) == 0x4d49
 	      && DX_reg(context) == 0x8f4f)
 		TRACE("Check for QDPMI.SYS (not installed)\n");
 		break;
@@ -301,7 +301,7 @@
         AX_reg(context) = (GetWinFlags16() & WF_ENHANCED) ?
                                                   LOWORD(GetVersion16()) : 0;
         break;
-	
+
     case 0x0a:  /* Get Windows version and type */
         AX_reg(context) = 0;
         BX_reg(context) = (LOWORD(GetVersion16()) << 8) |
@@ -314,8 +314,8 @@
         break;
 
     case 0x11:  /* Get Shell Parameters - (SHELL= in CONFIG.SYS) */
-        /* We can mock this up. But not today... */ 
-        FIXME("Get Shell Parameters\n");       
+        /* We can mock this up. But not today... */
+        FIXME("Get Shell Parameters\n");
         break;
 
     case 0x80:  /* Release time-slice */
@@ -377,7 +377,7 @@
     }
 }
 
-/* FIXME: this macro may have to be changed on architectures where <size> reads/writes 
+/* FIXME: this macro may have to be changed on architectures where <size> reads/writes
  * must be <size> aligned
  * <size> could be WORD, DWORD...
  * in this case, we would need two macros, one for read, the other one for write
@@ -398,7 +398,7 @@
     BYTE	buf[2048];
     BYTE*	ptr;
     BYTE*	ios;
-    
+
     ptr = buf;
     ptr += sprintf(ptr, "%s\tCommand => ", pfx);
     for (i = 0; i < req[0]; i++) {
@@ -428,7 +428,7 @@
 #endif
 
 #define CDFRAMES_PERSEC                 75
-#define CDFRAMES_PERMIN                 (CDFRAMES_PERSEC * 60) 
+#define CDFRAMES_PERMIN                 (CDFRAMES_PERSEC * 60)
 #define FRAME_OF_ADDR(a)        ((a)[1] * CDFRAMES_PERMIN + (a)[2] * CDFRAMES_PERSEC + (a)[3])
 #define FRAME_OF_TOC(toc, idx)  FRAME_OF_ADDR((toc).TrackData[idx - (toc).FirstTrack].Address)
 #define CTRL_OF_TOC(toc, idx)   (((toc).TrackData[idx - (toc).FirstTrack].Control << 4) | \
@@ -468,17 +468,17 @@
 	BX_reg(context) = count;
 	CX_reg(context) = (drive < 26) ? drive : 0;
 	break;
-	
+
     case 0x0B: /* drive check */
 	AX_reg(context) = is_cdrom(CX_reg(context));
 	BX_reg(context) = 0xADAD;
 	break;
-	
+
     case 0x0C: /* get version */
 	BX_reg(context) = 0x020a;
 	TRACE("Version number => %04x\n", BX_reg(context));
 	break;
-	
+
     case 0x0D: /* get drive letters */
 	p = CTX_SEG_OFF_TO_LIN(context, context->SegEs, context->Ebx);
 	memset(p, 0, 26);
@@ -487,12 +487,12 @@
 	}
 	TRACE("Get drive letters\n");
 	break;
-	
+
     case 0x10: /* direct driver access */
 	{
 	    BYTE* 	driver_request;
-	    BYTE* 	io_stru;	
-	    BYTE 	Error = 255; /* No Error */ 
+	    BYTE* 	io_stru;
+	    BYTE 	Error = 255; /* No Error */
 	    int		dorealmode = ISV86(context);
             char        devName[] = "\\\\.\\@:";
 	    HANDLE      h;
@@ -503,7 +503,7 @@
             DWORD                       present = TRUE;
 
 	    driver_request = CTX_SEG_OFF_TO_LIN(context, context->SegEs, context->Ebx);
-	    
+
 	    if (!driver_request) {
 		/* FIXME - to be deleted ?? */
 		ERR("ES:BX==0 ! SEGFAULT ?\n");
@@ -518,7 +518,7 @@
              * tray to be closed with a CD inside
 	     */
 	    TRACE("CDROM device driver -> command <%d>\n", (unsigned char)driver_request[2]);
-	    
+
 	    if (!is_cdrom(CX_reg(context))) {
 		WARN("Request made doesn't match a CD ROM drive (%d)\n", CX_reg(context));
 		driver_request[4] |= 0x80;
@@ -527,7 +527,7 @@
 	    }
 
 	    MSCDEX_Dump("Beg", driver_request, dorealmode);
-	    
+
 	    /* set status to 0 */
 	    PTR_AT(driver_request, 3, WORD) = 0;
             devName[4] = 'A' + CX_reg(context);
@@ -541,7 +541,7 @@
 
             fmt.Format = IOCTL_CDROM_CURRENT_POSITION;
             if (!DeviceIoControl(h, IOCTL_CDROM_READ_TOC, NULL, 0, &toc, sizeof(toc), &br, NULL) ||
-                !DeviceIoControl(h, IOCTL_CDROM_READ_Q_CHANNEL, &fmt, sizeof(fmt), 
+                !DeviceIoControl(h, IOCTL_CDROM_READ_Q_CHANNEL, &fmt, sizeof(fmt),
                                  &data, sizeof(data), &br, NULL)) {
                 if (GetLastError() == STATUS_NO_MEDIA_IN_DEVICE)
                 {
@@ -562,14 +562,14 @@
                     return;
                 }
             }
-               
+
 	    switch (driver_request[2]) {
 	    case 3:
-		io_stru = (dorealmode) ? 
+		io_stru = (dorealmode) ?
                     PTR_REAL_TO_LIN( PTR_AT(driver_request, 16, WORD), PTR_AT(driver_request, 14, WORD) ) :
 			MapSL( MAKESEGPTR(PTR_AT(driver_request, 16, WORD), PTR_AT(driver_request, 14, WORD)));
-		
-		TRACE(" --> IOCTL INPUT <%d>\n", io_stru[0]); 
+
+		TRACE(" --> IOCTL INPUT <%d>\n", io_stru[0]);
 		switch (io_stru[0]) {
 #if 0
 		case 0: /* Get device Header */
@@ -597,24 +597,24 @@
 		    }
 		    break;
 #endif
-		    
+
 		case 1: /* location of head */
 		    switch (io_stru[1]) {
 		    case 0:
-			PTR_AT(io_stru, 2, DWORD) = 
+			PTR_AT(io_stru, 2, DWORD) =
                             FRAME_OF_ADDR(data.CurrentPosition.AbsoluteAddress);
 			break;
 		    case 1:
-			MSCDEX_StoreMSF(FRAME_OF_ADDR(data.CurrentPosition.AbsoluteAddress), 
+			MSCDEX_StoreMSF(FRAME_OF_ADDR(data.CurrentPosition.AbsoluteAddress),
                                         io_stru + 2);
 			break;
 		    default:
 			ERR("CD-ROM driver: unsupported addressing mode !!\n");
 			Error = 0x0c;
-		    }	
-		    TRACE(" ----> HEAD LOCATION <%ld>\n", PTR_AT(io_stru, 2, DWORD)); 
+		    }
+		    TRACE(" ----> HEAD LOCATION <%ld>\n", PTR_AT(io_stru, 2, DWORD));
 		    break;
-		    
+
 		case 4: /* Audio channel info */
 		    io_stru[1] = 0;
 		    io_stru[2] = 0xff;
@@ -624,16 +624,16 @@
 		    io_stru[6] = 0;
 		    io_stru[7] = 3;
 		    io_stru[8] = 0;
-		    TRACE(" ----> AUDIO CHANNEL INFO\n"); 
+		    TRACE(" ----> AUDIO CHANNEL INFO\n");
 		    break;
-		    
+
 		case 6: /* device status */
 		    PTR_AT(io_stru, 1, DWORD) = 0x00000290;
-		    /* 290 => 
-		     * 1	Supports HSG and Red Book addressing modes	
-		     * 0	Supports audio channel manipulation	
+		    /* 290 =>
+		     * 1	Supports HSG and Red Book addressing modes
+		     * 0	Supports audio channel manipulation
 		     *
-		     * 1	Supports prefetching requests	
+		     * 1	Supports prefetching requests
 		     * 0	Reserved
 		     * 0	No interleaving
 		     * 1	Data read and plays audio/video tracks
@@ -646,29 +646,29 @@
 		    if (!present) PTR_AT(io_stru, 1, DWORD) |= 1;
 		    TRACE(" ----> DEVICE STATUS <0x%08lx>\n", PTR_AT(io_stru, 1, DWORD));
 		    break;
-		    
+
 		case 8: /* Volume size */
 		    PTR_AT(io_stru, 1, DWORD) = FRAME_OF_TOC(toc, toc.LastTrack + 1) -
                         FRAME_OF_TOC(toc, toc.FirstTrack) - 1;
 		    TRACE(" ----> VOLUME SIZE <%ld>\n", PTR_AT(io_stru, 1, DWORD));
 		    break;
-		    
+
 		case 9: /* media changed ? */
 		    /* answers don't know... -1/1 for yes/no would be better */
 		    io_stru[1] = 0; /* FIXME? 1? */
-		    TRACE(" ----> MEDIA CHANGED <%d>\n", io_stru[1]); 
+		    TRACE(" ----> MEDIA CHANGED <%d>\n", io_stru[1]);
 		    break;
-		    
+
 		case 10: /* audio disk info */
 		    io_stru[1] = toc.FirstTrack; /* starting track of the disc */
 		    io_stru[2] = toc.LastTrack;  /* ending track */
 		    MSCDEX_StoreMSF(FRAME_OF_TOC(toc, toc.LastTrack + 1) -
                                     FRAME_OF_TOC(toc, toc.FirstTrack) - 1, io_stru + 3);
-		    
+
 		    TRACE(" ----> AUDIO DISK INFO <%d-%d/%08lx>\n",
 			  io_stru[1], io_stru[2], PTR_AT(io_stru, 3, DWORD));
 		    break;
-		    
+
 		case 11: /* audio track info */
 		    if (io_stru[1] >= toc.FirstTrack && io_stru[1] <= toc.LastTrack) {
 			MSCDEX_StoreMSF(FRAME_OF_TOC(toc, io_stru[1]), io_stru + 2);
@@ -679,13 +679,13 @@
 			io_stru[6] = 0;
 		    }
 		    TRACE(" ----> AUDIO TRACK INFO[%d] = [%08lx:%d]\n",
-			  io_stru[1], PTR_AT(io_stru, 2, DWORD), io_stru[6]); 
+			  io_stru[1], PTR_AT(io_stru, 2, DWORD), io_stru[6]);
 		    break;
-		    
+
 		case 12: /* get Q-Channel info */
 		    io_stru[1] = CTRL_OF_TOC(toc, data.CurrentPosition.TrackNumber);
 		    io_stru[2] = data.CurrentPosition.TrackNumber;
-		    io_stru[3] = 0; /* FIXME ?? */ 
+		    io_stru[3] = 0; /* FIXME ?? */
 
 		    /* why the heck did MS use another format for 0MSF information... sigh */
 		    {
@@ -702,15 +702,15 @@
 			io_stru[ 9] = bTmp[1];
 			io_stru[10] = bTmp[0];
 			io_stru[11] = 0;
-		    }		    
+		    }
 		    TRACE("Q-Channel info: Ctrl/adr=%02x TNO=%02x X=%02x rtt=%02x:%02x:%02x rtd=%02x:%02x:%02x (cf=%08x, tp=%08x)\n",
-			  io_stru[ 1], io_stru[ 2], io_stru[ 3], 
-			  io_stru[ 4], io_stru[ 5], io_stru[ 6], 
+			  io_stru[ 1], io_stru[ 2], io_stru[ 3],
+			  io_stru[ 4], io_stru[ 5], io_stru[ 6],
 			  io_stru[ 8], io_stru[ 9], io_stru[10],
-			  FRAME_OF_ADDR(data.CurrentPosition.AbsoluteAddress), 
+			  FRAME_OF_ADDR(data.CurrentPosition.AbsoluteAddress),
                           FRAME_OF_TOC(toc, data.CurrentPosition.TrackNumber));
 		    break;
-		    
+
 		case 15: /* Audio status info */
 		    /* !!!! FIXME FIXME FIXME !! */
 		    PTR_AT(io_stru, 1,  WORD) = 2 | ((data.CurrentPosition.Header.AudioStatus == AUDIO_STATUS_PAUSED) ? 1 : 0);
@@ -724,46 +724,46 @@
 		    TRACE("Audio status info: status=%04x startLoc=%ld endLoc=%ld\n",
 			  PTR_AT(io_stru, 1, WORD), PTR_AT(io_stru, 3, DWORD), PTR_AT(io_stru, 7, DWORD));
 		    break;
-		    
+
 		default:
-		    FIXME("IOCTL INPUT: Unimplemented <%d>!!\n", io_stru[0]); 
-		    Error = 0x0c; 
-		    break;	
-		}	
+		    FIXME("IOCTL INPUT: Unimplemented <%d>!!\n", io_stru[0]);
+		    Error = 0x0c;
+		    break;
+		}
 		break;
-		
+
 	    case 12:
-		io_stru = (dorealmode) ? 
+		io_stru = (dorealmode) ?
 		    PTR_REAL_TO_LIN( PTR_AT(driver_request, 16, WORD), PTR_AT(driver_request, 14, WORD)) :
 			MapSL( MAKESEGPTR(PTR_AT(driver_request, 16, WORD), PTR_AT(driver_request, 14, WORD)));
-		
-		TRACE(" --> IOCTL OUTPUT <%d>\n", io_stru[0]); 
+
+		TRACE(" --> IOCTL OUTPUT <%d>\n", io_stru[0]);
 		switch (io_stru[0]) {
-		case 0: /* eject */ 
+		case 0: /* eject */
                     DeviceIoControl(h, IOCTL_STORAGE_EJECT_MEDIA, NULL, 0, NULL, 0, &br, NULL);
-		    TRACE(" ----> EJECT\n"); 
+		    TRACE(" ----> EJECT\n");
 		    break;
 		case 2: /* reset drive */
 		    DeviceIoControl(h, IOCTL_STORAGE_RESET_DEVICE, NULL, 0, NULL, 0, &br, NULL);
-		    TRACE(" ----> RESET\n"); 
+		    TRACE(" ----> RESET\n");
 		    break;
 		case 3: /* Audio Channel Control */
 		    FIXME(" ----> AUDIO CHANNEL CONTROL (NIY)\n");
 		    break;
 		case 5: /* close tray */
                     DeviceIoControl(h, IOCTL_STORAGE_LOAD_MEDIA, NULL, 0, NULL, 0, &br, NULL);
-		    TRACE(" ----> CLOSE TRAY\n"); 
+		    TRACE(" ----> CLOSE TRAY\n");
 		    break;
 		default:
-		    FIXME(" IOCTL OUTPUT: Unimplemented <%d>!!\n", io_stru[0]); 
+		    FIXME(" IOCTL OUTPUT: Unimplemented <%d>!!\n", io_stru[0]);
 		    Error = 0x0c;
-		    break;	
-		}	
+		    break;
+		}
 		break;
-		
+
             case 128: /* read long */
                 {
-                    LPVOID              dst = MapSL(MAKESEGPTR(PTR_AT(driver_request, 16, WORD), 
+                    LPVOID              dst = MapSL(MAKESEGPTR(PTR_AT(driver_request, 16, WORD),
                                                                PTR_AT(driver_request, 14, WORD)));
                     DWORD               at = PTR_AT(driver_request, 20, DWORD);
                     WORD                num = PTR_AT(driver_request, 18, WORD);
@@ -790,7 +790,7 @@
                             rri.DiskOffset.s.LowPart = at << 11;
                             rri.TrackMode = YellowMode2;
                             rri.SectorCount = num;
-                            DeviceIoControl(h, IOCTL_CDROM_RAW_READ, &rri, sizeof(rri), 
+                            DeviceIoControl(h, IOCTL_CDROM_RAW_READ, &rri, sizeof(rri),
                                             dst, num * 2352, &br, NULL);
 			break;
                         default:
@@ -813,10 +813,10 @@
                     CDROM_SEEK_AUDIO_MSF        seek;
 
 		    at = PTR_AT(driver_request, 20, DWORD);
-		    
-		    TRACE(" --> SEEK AUDIO mode :<0x%02X>, [%ld]\n", 
+
+		    TRACE(" --> SEEK AUDIO mode :<0x%02X>, [%ld]\n",
 			  (BYTE)driver_request[13], at);
-		    
+
 		    switch (driver_request[13]) {
 		    case 1: /* Red book addressing mode = 0:m:s:f */
 			/* FIXME : frame <=> msf conversion routines could be shared
@@ -830,7 +830,7 @@
                         seek.M = at / CDFRAMES_PERMIN;
                         seek.S = (at / CDFRAMES_PERSEC) % 60;
                         seek.F = at % CDFRAMES_PERSEC;
-                        DeviceIoControl(h, IOCTL_CDROM_SEEK_AUDIO_MSF, &seek, sizeof(seek), 
+                        DeviceIoControl(h, IOCTL_CDROM_SEEK_AUDIO_MSF, &seek, sizeof(seek),
                                         NULL, 0, &br, NULL);
 			break;
 		    default:
@@ -848,12 +848,12 @@
 
 		    beg = end = PTR_AT(driver_request, 14, DWORD);
 		    end += PTR_AT(driver_request, 18, DWORD);
-		    
-		    TRACE(" --> PLAY AUDIO mode :<0x%02X>, [%ld-%ld]\n", 
+
+		    TRACE(" --> PLAY AUDIO mode :<0x%02X>, [%ld-%ld]\n",
 			  (BYTE)driver_request[13], beg, end);
-		    
+
 		    switch (driver_request[13]) {
-		    case 1: 
+		    case 1:
 			/* Red book addressing mode = 0:m:s:f */
 			/* FIXME : frame <=> msf conversion routines could be shared
 			 * between mscdex and mcicda
@@ -872,7 +872,7 @@
                         play.EndingM   = end / CDFRAMES_PERMIN;
                         play.EndingS   = (end / CDFRAMES_PERSEC) % 60;
                         play.EndingF   = end % CDFRAMES_PERSEC;
-                        DeviceIoControl(h, IOCTL_CDROM_PLAY_AUDIO_MSF, &play, sizeof(play), 
+                        DeviceIoControl(h, IOCTL_CDROM_PLAY_AUDIO_MSF, &play, sizeof(play),
                                         NULL, 0, &br, NULL);
 			break;
 		    default:
@@ -882,7 +882,7 @@
 		    }
 		}
 		break;
-		
+
 	    case 133:
 		if (data.CurrentPosition.Header.AudioStatus == AUDIO_STATUS_IN_PROGRESS) {
                     DeviceIoControl(h, IOCTL_CDROM_PAUSE_AUDIO, NULL, 0, NULL, 0, &br, NULL);
@@ -892,17 +892,17 @@
 		    TRACE(" --> STOP AUDIO (Stopped)\n");
 		}
 		break;
-		
+
 	    case 136:
 		TRACE(" --> RESUME AUDIO\n");
                 DeviceIoControl(h, IOCTL_CDROM_PAUSE_AUDIO, NULL, 0, NULL, 0, &br, NULL);
 		break;
-		
+
 	    default:
-		FIXME(" ioctl unimplemented <%d>\n", driver_request[2]); 
-		Error = 0x0c;	
+		FIXME(" ioctl unimplemented <%d>\n", driver_request[2]);
+		Error = 0x0c;
 	    }
-	    
+
 	    /* setting error codes if any */
 	    if (Error < 255) {
 		driver_request[4] |= 0x80;
@@ -912,11 +912,11 @@
 	    CloseHandle(h);
 	    /* setting status bits
 	     * 3 == playing && done
-	     * 1 == done 
+	     * 1 == done
 	     */
-	    driver_request[4] |= 
+	    driver_request[4] |=
                 (data.CurrentPosition.Header.AudioStatus == AUDIO_STATUS_IN_PROGRESS) ? 3 : 1;
-	    
+
 	    MSCDEX_Dump("End", driver_request, dorealmode);
 	}
 	break;
diff --git a/msdos/int41.c b/msdos/int41.c
index c9ac67f..1506dad 100644
--- a/msdos/int41.c
+++ b/msdos/int41.c
@@ -1,6 +1,6 @@
 /*
  * DOS interrupt 41h handler  -- Windows Kernel Debugger
- * 
+ *
  * Check debugsys.inc from the DDK for docu.
  *
  * Copyright 1998 Ulrich Weigand
diff --git a/msdos/int4b.c b/msdos/int4b.c
index 1056ea9..93c59c3 100644
--- a/msdos/int4b.c
+++ b/msdos/int4b.c
@@ -16,10 +16,10 @@
 {
     switch(AH_reg(context))
     {
-    case 0x81: /* Virtual DMA Spec (IBM SCSI interface) */   
+    case 0x81: /* Virtual DMA Spec (IBM SCSI interface) */
         if(AL_reg(context) != 0x02) /* if not install check */
         {
-            SET_CFLAG(context);		 
+            SET_CFLAG(context);
             AL_reg(context) = 0x0f; /* function is not implemented */
         }
         break;
diff --git a/msdos/int5c.c b/msdos/int5c.c
index 3c30d75..f207309 100644
--- a/msdos/int5c.c
+++ b/msdos/int5c.c
@@ -28,7 +28,7 @@
  *           NetBIOSCall      (KERNEL.103)
  *           INT_Int5cHandler (WPROCS.192)
  *
- * Also handler for interrupt 5c. 
+ * Also handler for interrupt 5c.
  */
 void WINAPI NetBIOSCall16( CONTEXT86 *context )
 {
diff --git a/msdos/ioports.c b/msdos/ioports.c
index 46e52cb..69d275c 100644
--- a/msdos/ioports.c
+++ b/msdos/ioports.c
@@ -138,14 +138,14 @@
 {
 	int j;
 	if (val1 != -1) {
-		if (val == -1) val = 0x3ff;		
+		if (val == -1) val = 0x3ff;
 		for (j = val1; j <= val; j++)
-			port_permissions[j] |= rw;		
+			port_permissions[j] |= rw;
 
 		do_direct_port_access = 1;
 
 		val1 = -1;
-	} else if (val != -1) {		
+	} else if (val != -1) {
 		do_direct_port_access = 1;
 
 		port_permissions[val] |= rw;
@@ -171,7 +171,7 @@
 	} else if (!(!strcmp(temp, "*") || *temp == '\0')) {
 		len = strlen(temp);
 		val = -1;
-		val1 = -1;		
+		val1 = -1;
 		for (i = 0; i < len; i++) {
 			switch (temp[i]) {
 			case '0':
@@ -203,7 +203,7 @@
 				}
 			}
 		}
-		set_IO_permissions(val1, val, rw);		
+		set_IO_permissions(val1, val, rw);
 	}
 }
 
@@ -267,7 +267,7 @@
 /**********************************************************************
  *	    IO_inport
  *
- * Note: The size argument has to be handled correctly _externally_ 
+ * Note: The size argument has to be handled correctly _externally_
  * (as we always return a DWORD)
  */
 DWORD IO_inport( int port, int size )
@@ -277,7 +277,7 @@
     TRACE("%d-byte value from port 0x%02x\n", size, port );
 
 #ifdef HAVE_PPDEV
-    if (do_pp_port_access == -1) 
+    if (do_pp_port_access == -1)
       do_pp_port_access =IO_pp_init();
     if ((do_pp_port_access == 0 ) && (size == 1))
       if (!IO_pp_inp(port,&res))
@@ -398,7 +398,7 @@
                  value, size, port );
 
 #ifdef HAVE_PPDEV
-    if (do_pp_port_access == -1) 
+    if (do_pp_port_access == -1)
       do_pp_port_access = IO_pp_init();
     if ((do_pp_port_access == 0) && (size == 1))
       if (!IO_pp_outp(port,&value))
@@ -469,7 +469,7 @@
 	    (tmr_8253[chan].countmax != tmr_8253[chan].oldval))
             set_timer_maxval(chan, tmr_8253[chan].countmax);
     }
-    break;          
+    break;
     case 0x43:
     {
 	BYTE chan = ((BYTE)value & 0xc0) >> 6;
diff --git a/msdos/ppdev.c b/msdos/ppdev.c
index 5444e30..ac33337 100644
--- a/msdos/ppdev.c
+++ b/msdos/ppdev.c
@@ -57,7 +57,7 @@
   return ((PPDeviceStruct*)p1)->userbase - ((PPDeviceStruct*)p2)->userbase;
 }
 
-/* IO_pp_init 
+/* IO_pp_init
  *
  * Read the ppdev entries from wine.conf, open the device and check
  * for nescessary IOCTRL
@@ -82,9 +82,9 @@
     {
         DWORD type, count = sizeof(buffer), name_len = sizeof(name);
 
-        if (RegEnumValueA( hkey, idx, name, &name_len, NULL, &type, buffer, &count )!= ERROR_SUCCESS) 
+        if (RegEnumValueA( hkey, idx, name, &name_len, NULL, &type, buffer, &count )!= ERROR_SUCCESS)
 	  break;
-	
+
 	idx++;
 	if(nports >4)
 	  {
@@ -112,7 +112,7 @@
 	    WARN("Rejecting configuration item\n");
 	    continue;
 	  }
-	if (ioctl (fd,PPCLAIM,0)) 
+	if (ioctl (fd,PPCLAIM,0))
 	  {
 	    ERR("PPCLAIM rejected %s\n",buffer);
 	    ERR("Perhaps the device is already in use or non-existant\n");
@@ -141,7 +141,7 @@
 	    ERR("PPUSER IOCTL not available for parport device %s\n",temp);
 	    continue;
 	  }
-	if (ioctl (fd,PPRELEASE,0)) 
+	if (ioctl (fd,PPRELEASE,0))
 	  {
 	    ERR("PPRELEASE rejected %s\n",buffer);
 	    ERR("Perhaps the device is already in use or non-existant\n");
@@ -178,7 +178,7 @@
     if (nports > 1)
       /* sort in accending order for userbase for faster access*/
       qsort (PPDeviceList,PPDeviceNum,sizeof(PPDeviceStruct),IO_pp_sort);
-    
+
     if (nports)
       ret=0;
     for (idx= 0;idx<PPDeviceNum; idx++)
@@ -225,7 +225,7 @@
 int IO_pp_inp(int port, DWORD* res)
 {
     int idx,j=0;
-    
+
     for (idx=0;idx<PPDeviceNum ;idx++)
       {
        j = port - PPDeviceList[idx].userbase;
@@ -261,7 +261,7 @@
 BOOL IO_pp_outp(int port, DWORD* res)
 {
     int idx,j=0;
-    
+
     for (idx=0;idx<PPDeviceNum ;idx++)
       {
        j = port - PPDeviceList[idx].userbase;
diff --git a/msdos/vxd.c b/msdos/vxd.c
index 5816b28..91d2dc8 100644
--- a/msdos/vxd.c
+++ b/msdos/vxd.c
@@ -104,7 +104,7 @@
     case 0x01: /* get swap file info */
 	TRACE("VxD PageFile: returning swap file info\n");
 	AX_reg(context) = 0x00; /* paging disabled */
-	context->Ecx = 0;   /* maximum size of paging file */	
+	context->Ecx = 0;   /* maximum size of paging file */
 	/* FIXME: do I touch DS:SI or DS:DI? */
 	RESET_CFLAG(context);
 	break;
@@ -230,7 +230,7 @@
 	AX_reg(context) = 0x000B; /* invalid function number */
 	SET_CFLAG(context);
 	break;
-    }	
+    }
 }
 
 /***********************************************************************
@@ -487,20 +487,20 @@
  *
  * This is an implementation of the services of the Win32s VxD.
  * Since official documentation of these does not seem to be available,
- * certain arguments of some of the services remain unclear.  
+ * certain arguments of some of the services remain unclear.
  *
- * FIXME: The following services are currently unimplemented: 
+ * FIXME: The following services are currently unimplemented:
  *        Exception handling      (0x01, 0x1C)
  *        Debugger support        (0x0C, 0x14, 0x17)
  *        Low-level memory access (0x02, 0x03, 0x0A, 0x0B)
  *        Memory Statistics       (0x1B)
- *        
+ *
  *
  * We have a specific problem running Win32s on Linux (and probably also
  * the other x86 unixes), since Win32s tries to allocate its main 'flat
  * code/data segment' selectors with a base of 0xffff0000 (and limit 4GB).
- * The rationale for this seems to be that they want one the one hand to 
- * be able to leave the Win 3.1 memory (starting with the main DOS memory) 
+ * The rationale for this seems to be that they want one the one hand to
+ * be able to leave the Win 3.1 memory (starting with the main DOS memory)
  * at linear address 0, but want at other hand to have offset 0 of the
  * flat data/code segment point to an unmapped page (to catch NULL pointer
  * accesses). Hence they allocate the flat segments with a base of 0xffff0000
@@ -532,7 +532,7 @@
  *
  * The offset is set the first time any application calls the GetVersion()
  * service of the Win32s VxD. (Note that the offset is never reset.)
- * 
+ *
  */
 
 void WINAPI VXD_Win32s( CONTEXT86 *context )
@@ -552,25 +552,25 @@
          *
          *          EDX: Debugging Flags
          *
-         *          EDI: Error Flag 
+         *          EDI: Error Flag
          *               0 if OK,
          *               1 if VMCPD VxD not found
          */
 
         TRACE("GetVersion()\n");
-        
+
 	context->Eax = VXD_WinVersion() | (200 << 16);
         context->Ebx = 0;
         context->Ecx = 0;
         context->Edx = 0;
         context->Edi = 0;
 
-        /* 
+        /*
          * If this is the first time we are called for this process,
          * hack the memory image of WIN32S16 so that it doesn't try
          * to access the GDT directly ...
          *
-         * The first code segment of WIN32S16 (version 1.30) contains 
+         * The first code segment of WIN32S16 (version 1.30) contains
          * an unexported function somewhere between the exported functions
          * SetFS and StackLinearToSegmented that tries to find a selector
          * in the LDT that maps to the memory image of the LDT itself.
@@ -615,7 +615,7 @@
             SEGPTR func1 = (SEGPTR)GetProcAddress16(hModule, "SetFS");
             SEGPTR func2 = (SEGPTR)GetProcAddress16(hModule, "StackLinearToSegmented");
 
-            if (   hModule && func1 && func2 
+            if (   hModule && func1 && func2
                 && SELECTOROF(func1) == SELECTOROF(func2))
             {
                 BYTE *start = MapSL(func1);
@@ -634,7 +634,7 @@
                 {
                     TRACE("PERF130 hack: "
                                "Replacing byte %02X at offset %04X:%04X\n",
-                               *(retv+1), SELECTOROF(func1), 
+                               *(retv+1), SELECTOROF(func1),
                                           OFFSETOF(func1) + retv+1-start);
 
                     *(retv+1) = (BYTE)0xCB;
@@ -642,7 +642,7 @@
             }
         }
 
-        /* 
+        /*
          * Mark process as Win32s, so that subsequent DPMI calls
          * will perform the W32S_APP2WINE/W32S_WINE2APP address shift.
          */
@@ -657,7 +657,7 @@
          *          ECX: LoWord: Flat Code Selector
          *               HiWord: Flat Data Selector
          *
-         *          EDX: Flat address of W32SKRNL Exception Handler 
+         *          EDX: Flat address of W32SKRNL Exception Handler
          *               (this is equal to W32S_BackTo32 + 0x40)
          *
          *          ESI: SEGPTR KERNEL.HASGPHANDLER
@@ -667,7 +667,7 @@
          * Output:  EAX: 0 if OK
          */
 
-        TRACE("[0001] EBX=%lx ECX=%lx EDX=%lx ESI=%lx EDI=%lx\n", 
+        TRACE("[0001] EBX=%lx ECX=%lx EDX=%lx ESI=%lx EDI=%lx\n",
                    context->Ebx, context->Ecx, context->Edx,
                    context->Esi, context->Edi);
 
@@ -690,7 +690,7 @@
          * Output:  EAX: Size of area changed
          */
 
-        TRACE("[0002] EBX=%lx ECX=%lx EDX=%lx\n", 
+        TRACE("[0002] EBX=%lx ECX=%lx EDX=%lx\n",
                    context->Ebx, context->Ecx, context->Edx);
 
         /* FIXME */
@@ -747,14 +747,14 @@
             DWORD  relocDelta;
         };
 
-        /* 
-         * Note: This function should set up a demand-paged memory image 
+        /*
+         * Note: This function should set up a demand-paged memory image
          *       of the given module. Since mmap does not allow file offsets
          *       not aligned at 1024 bytes, we simply load the image fully
          *       into memory.
          */
 
-        struct Win32sModule *moduleTable = 
+        struct Win32sModule *moduleTable =
                             (struct Win32sModule *)W32S_APP2WINE(context->Edx);
         struct Win32sModule *module = moduleTable + context->Ecx;
 
@@ -767,8 +767,8 @@
 
         TRACE("MapModule: Loading %s\n", module->pathName);
 
-        for (i = 0; 
-             !error && i < nt_header->FileHeader.NumberOfSections; 
+        for (i = 0;
+             !error && i < nt_header->FileHeader.NumberOfSections;
              i++, pe_seg++)
             if(!(pe_seg->Characteristics & IMAGE_SCN_CNT_UNINITIALIZED_DATA))
             {
@@ -777,14 +777,14 @@
                 LPBYTE addr = module->baseAddr + pe_seg->VirtualAddress;
 
                 TRACE("MapModule: "
-                           "Section %d at %08lx from %08lx len %08lx\n", 
+                           "Section %d at %08lx from %08lx len %08lx\n",
                            i, (DWORD)addr, off, len);
 
                 if (   _llseek(image, off, SEEK_SET) != off
                     || _lread(image, addr, len) != len)
                     error = TRUE;
             }
-        
+
         _lclose(image);
 
         if (error)
@@ -805,7 +805,7 @@
                 WORD *TypeOffset = (WORD *)(r + 1);
                 int count = (r->SizeOfBlock - sizeof(*r)) / sizeof(*TypeOffset);
 
-                TRACE("MapModule: %d relocations for page %08lx\n", 
+                TRACE("MapModule: %d relocations for page %08lx\n",
                            count, (DWORD)page);
 
                 for(i = 0; i < count; i++)
@@ -814,7 +814,7 @@
                     int type   = TypeOffset[i] >> 12;
                     switch(type)
                     {
-                    case IMAGE_REL_BASED_ABSOLUTE: 
+                    case IMAGE_REL_BASED_ABSOLUTE:
                         break;
                     case IMAGE_REL_BASED_HIGH:
                         *(WORD *)(page+offset) += HIWORD(module->relocDelta);
@@ -843,11 +843,11 @@
 
     case 0x0005: /* UnMap Module */
         /*
-         * Input:   EDX: Flat address of module image 
+         * Input:   EDX: Flat address of module image
          *
          * Output:  EAX: 1 if OK
          */
-        
+
         TRACE("UnMapModule: %lx\n", (DWORD)W32S_APP2WINE(context->Edx));
 
         /* As we didn't map anything, there's nothing to unmap ... */
@@ -857,11 +857,11 @@
 
 
     case 0x0006: /* VirtualAlloc */
-        /* 
+        /*
          * Input:   ECX: Current Process
          *
          *          EDX: Flat address of arguments on stack
-         * 
+         *
          *   DWORD *retv     [out] Flat base address of allocated region
          *   LPVOID base     [in]  Flat address of region to reserve/commit
          *   DWORD  size     [in]  Size of region
@@ -879,7 +879,7 @@
         DWORD  prot   = stack[4];
         DWORD  result;
 
-        TRACE("VirtualAlloc(%lx, %lx, %lx, %lx, %lx)\n", 
+        TRACE("VirtualAlloc(%lx, %lx, %lx, %lx, %lx)\n",
                    (DWORD)retv, (DWORD)base, size, type, prot);
 
         if (type & 0x80000000)
@@ -907,11 +907,11 @@
 
 
     case 0x0007: /* VirtualFree */
-        /* 
+        /*
          * Input:   ECX: Current Process
          *
          *          EDX: Flat address of arguments on stack
-         * 
+         *
          *   DWORD *retv     [out] TRUE if success, FALSE if failure
          *   LPVOID base     [in]  Flat address of region
          *   DWORD  size     [in]  Size of region
@@ -927,7 +927,7 @@
         DWORD  type   = stack[3];
         DWORD  result;
 
-        TRACE("VirtualFree(%lx, %lx, %lx, %lx)\n", 
+        TRACE("VirtualFree(%lx, %lx, %lx, %lx)\n",
                    (DWORD)retv, (DWORD)base, size, type);
 
         result = VirtualFree(base, size, type);
@@ -943,11 +943,11 @@
 
 
     case 0x0008: /* VirtualProtect */
-        /* 
+        /*
          * Input:   ECX: Current Process
          *
          *          EDX: Flat address of arguments on stack
-         * 
+         *
          *   DWORD *retv     [out] TRUE if success, FALSE if failure
          *   LPVOID base     [in]  Flat address of region
          *   DWORD  size     [in]  Size of region
@@ -965,7 +965,7 @@
         DWORD *old_prot = (DWORD *)W32S_APP2WINE(stack[4]);
         DWORD  result;
 
-        TRACE("VirtualProtect(%lx, %lx, %lx, %lx, %lx)\n", 
+        TRACE("VirtualProtect(%lx, %lx, %lx, %lx, %lx)\n",
                    (DWORD)retv, (DWORD)base, size, new_prot, (DWORD)old_prot);
 
         result = VirtualProtect(base, size, new_prot, old_prot);
@@ -981,11 +981,11 @@
 
 
     case 0x0009: /* VirtualQuery */
-        /* 
+        /*
          * Input:   ECX: Current Process
          *
          *          EDX: Flat address of arguments on stack
-         * 
+         *
          *   DWORD *retv                     [out] Nr. bytes returned
          *   LPVOID base                     [in]  Flat address of region
          *   LPMEMORY_BASIC_INFORMATION info [out] Info buffer
@@ -997,12 +997,12 @@
         DWORD *stack  = (DWORD *)W32S_APP2WINE(context->Edx);
         DWORD *retv   = (DWORD *)W32S_APP2WINE(stack[0]);
         LPVOID base   = (LPVOID) W32S_APP2WINE(stack[1]);
-        LPMEMORY_BASIC_INFORMATION info = 
+        LPMEMORY_BASIC_INFORMATION info =
                         (LPMEMORY_BASIC_INFORMATION)W32S_APP2WINE(stack[2]);
         DWORD  len    = stack[3];
         DWORD  result;
 
-        TRACE("VirtualQuery(%lx, %lx, %lx, %lx)\n", 
+        TRACE("VirtualQuery(%lx, %lx, %lx, %lx)\n",
                    (DWORD)retv, (DWORD)base, (DWORD)info, len);
 
         result = VirtualQuery(base, info, len);
@@ -1062,9 +1062,9 @@
 
 
     case 0x000D: /* NtCreateSection */
-        /* 
+        /*
          * Input:   EDX: Flat address of arguments on stack
-         * 
+         *
          *   HANDLE32 *retv      [out] Handle of Section created
          *   DWORD  flags1       [in]  (?? unknown ??)
          *   DWORD  atom         [in]  Name of Section to create
@@ -1098,9 +1098,9 @@
         {
             TRACE("NtCreateSection: name=%s\n", atom? name : NULL);
 
-            result = CreateFileMappingA(hFile, NULL, protect, 
-                                          size? size->s.HighPart : 0, 
-                                          size? size->s.LowPart  : 0, 
+            result = CreateFileMappingA(hFile, NULL, protect,
+                                          size? size->s.HighPart : 0,
+                                          size? size->s.LowPart  : 0,
                                           atom? name : NULL);
         }
 
@@ -1120,9 +1120,9 @@
 
 
     case 0x000E: /* NtOpenSection */
-        /* 
+        /*
          * Input:   EDX: Flat address of arguments on stack
-         * 
+         *
          *   HANDLE32 *retv  [out] Handle of Section opened
          *   DWORD  protect  [in]  Access protection
          *   DWORD  atom     [in]  Name of Section to create
@@ -1138,7 +1138,7 @@
         HANDLE result = INVALID_HANDLE_VALUE;
         char name[128];
 
-        TRACE("NtOpenSection(%lx, %lx, %lx)\n", 
+        TRACE("NtOpenSection(%lx, %lx, %lx)\n",
                    (DWORD)retv, protect, atom);
 
         if (atom && GlobalGetAtomNameA(atom, name, sizeof(name)))
@@ -1164,9 +1164,9 @@
 
 
     case 0x000F: /* NtCloseSection */
-        /* 
+        /*
          * Input:   EDX: Flat address of arguments on stack
-         * 
+         *
          *   HANDLE32 handle  [in]  Handle of Section to close
          *   DWORD *id        [out] Unique ID  (?? unclear ??)
          *
@@ -1188,9 +1188,9 @@
 
 
     case 0x0010: /* NtDupSection */
-        /* 
+        /*
          * Input:   EDX: Flat address of arguments on stack
-         * 
+         *
          *   HANDLE32 handle  [in]  Handle of Section to duplicate
          *
          * Output:  EAX: NtStatus
@@ -1201,7 +1201,7 @@
         HANDLE new_handle;
 
         TRACE("NtDupSection(%lx)\n", (DWORD)handle);
- 
+
         DuplicateHandle( GetCurrentProcess(), handle,
                          GetCurrentProcess(), &new_handle,
                          0, FALSE, DUPLICATE_SAME_ACCESS );
@@ -1211,9 +1211,9 @@
 
 
     case 0x0011: /* NtMapViewOfSection */
-        /* 
+        /*
          * Input:   EDX: Flat address of arguments on stack
-         * 
+         *
          *   HANDLE32 SectionHandle       [in]     Section to be mapped
          *   DWORD    ProcessHandle       [in]     Process to be mapped into
          *   DWORD *  BaseAddress         [in/out] Address to be mapped at
@@ -1257,16 +1257,16 @@
 
         TRACE("NtMapViewOfSection"
                    "(%lx, %lx, %lx, %lx, %lx, %lx, %lx, %lx, %lx, %lx)\n",
-                   (DWORD)SectionHandle, ProcessHandle, (DWORD)BaseAddress, 
+                   (DWORD)SectionHandle, ProcessHandle, (DWORD)BaseAddress,
                    ZeroBits, CommitSize, (DWORD)SectionOffset, (DWORD)ViewSize,
                    InheritDisposition, AllocationType, Protect);
         TRACE("NtMapViewOfSection: "
-                   "base=%lx, offset=%lx, size=%lx, access=%lx\n", 
-                   (DWORD)address, SectionOffset? SectionOffset->s.LowPart : 0, 
+                   "base=%lx, offset=%lx, size=%lx, access=%lx\n",
+                   (DWORD)address, SectionOffset? SectionOffset->s.LowPart : 0,
                    ViewSize? *ViewSize : 0, access);
 
-        result = (DWORD)MapViewOfFileEx(SectionHandle, access, 
-                            SectionOffset? SectionOffset->s.HighPart : 0, 
+        result = (DWORD)MapViewOfFileEx(SectionHandle, access,
+                            SectionOffset? SectionOffset->s.HighPart : 0,
                             SectionOffset? SectionOffset->s.LowPart  : 0,
                             ViewSize? *ViewSize : 0, address);
 
@@ -1284,9 +1284,9 @@
 
 
     case 0x0012: /* NtUnmapViewOfSection */
-        /* 
+        /*
          * Input:   EDX: Flat address of arguments on stack
-         * 
+         *
          *   DWORD  ProcessHandle  [in]  Process (defining address space)
          *   LPBYTE BaseAddress    [in]  Base address of view to be unmapped
          *
@@ -1297,7 +1297,7 @@
         DWORD  ProcessHandle  = stack[0]; /* ignored */
         LPBYTE BaseAddress    = (LPBYTE)W32S_APP2WINE(stack[1]);
 
-        TRACE("NtUnmapViewOfSection(%lx, %lx)\n", 
+        TRACE("NtUnmapViewOfSection(%lx, %lx)\n",
                    ProcessHandle, (DWORD)BaseAddress);
 
         UnmapViewOfFile(BaseAddress);
@@ -1308,9 +1308,9 @@
 
 
     case 0x0013: /* NtFlushVirtualMemory */
-        /* 
+        /*
          * Input:   EDX: Flat address of arguments on stack
-         * 
+         *
          *   DWORD   ProcessHandle  [in]  Process (defining address space)
          *   LPBYTE *BaseAddress    [in?] Base address of range to be flushed
          *   DWORD  *ViewSize       [in?] Number of bytes to be flushed
@@ -1324,14 +1324,14 @@
         DWORD *BaseAddress    = (DWORD *)W32S_APP2WINE(stack[1]);
         DWORD *ViewSize       = (DWORD *)W32S_APP2WINE(stack[2]);
         DWORD *unknown        = (DWORD *)W32S_APP2WINE(stack[3]);
-        
+
         LPBYTE address = (LPBYTE)(BaseAddress? W32S_APP2WINE(*BaseAddress) : 0);
         DWORD  size    = ViewSize? *ViewSize : 0;
 
-        TRACE("NtFlushVirtualMemory(%lx, %lx, %lx, %lx)\n", 
-                   ProcessHandle, (DWORD)BaseAddress, (DWORD)ViewSize, 
+        TRACE("NtFlushVirtualMemory(%lx, %lx, %lx, %lx)\n",
+                   ProcessHandle, (DWORD)BaseAddress, (DWORD)ViewSize,
                    (DWORD)unknown);
-        TRACE("NtFlushVirtualMemory: base=%lx, size=%lx\n", 
+        TRACE("NtFlushVirtualMemory: base=%lx, size=%lx\n",
                    (DWORD)address, size);
 
         FlushViewOfFile(address, size);
@@ -1352,7 +1352,7 @@
          * Output:  None
          */
 
-        FIXME("[0014] ECX=%lx EDX=%lx\n", 
+        FIXME("[0014] ECX=%lx EDX=%lx\n",
                    context->Ecx, context->Edx);
 
         /* FIXME */
@@ -1385,7 +1385,7 @@
          *                  HiWord: Paragraph of Win32s VxD PSP (DOSMEM)
          *     Output: None
          */
- 
+
         if (context->Ebx == 0)
             context->Edx = 0x80;
         else
@@ -1406,7 +1406,7 @@
          * Output:  None
          */
 
-        FIXME("[0017] EBX=%lx CX=%x\n", 
+        FIXME("[0017] EBX=%lx CX=%x\n",
                    context->Ebx, CX_reg(context));
 
         /* FIXME */
@@ -1414,11 +1414,11 @@
 
 
     case 0x0018: /* VirtualLock */
-        /* 
+        /*
          * Input:   ECX: Current Process
          *
          *          EDX: Flat address of arguments on stack
-         * 
+         *
          *   DWORD *retv     [out] TRUE if success, FALSE if failure
          *   LPVOID base     [in]  Flat address of range to lock
          *   DWORD  size     [in]  Size of range
@@ -1432,7 +1432,7 @@
         DWORD  size   = stack[2];
         DWORD  result;
 
-        TRACE("VirtualLock(%lx, %lx, %lx)\n", 
+        TRACE("VirtualLock(%lx, %lx, %lx)\n",
                    (DWORD)retv, (DWORD)base, size);
 
         result = VirtualLock(base, size);
@@ -1448,11 +1448,11 @@
 
 
     case 0x0019: /* VirtualUnlock */
-        /* 
+        /*
          * Input:   ECX: Current Process
          *
          *          EDX: Flat address of arguments on stack
-         * 
+         *
          *   DWORD *retv     [out] TRUE if success, FALSE if failure
          *   LPVOID base     [in]  Flat address of range to unlock
          *   DWORD  size     [in]  Size of range
@@ -1466,7 +1466,7 @@
         DWORD  size   = stack[2];
         DWORD  result;
 
-        TRACE("VirtualUnlock(%lx, %lx, %lx)\n", 
+        TRACE("VirtualUnlock(%lx, %lx, %lx)\n",
                    (DWORD)retv, (DWORD)base, size);
 
         result = VirtualUnlock(base, size);
@@ -1490,10 +1490,10 @@
          */
 
         TRACE("KGetSystemInfo()\n");
-        
+
         /*
-         * Note: Win32s reserves 0GB - 2GB for Win 3.1 and uses 2GB - 4GB as 
-         *       sparse memory arena. We do it the other way around, since 
+         * Note: Win32s reserves 0GB - 2GB for Win 3.1 and uses 2GB - 4GB as
+         *       sparse memory arena. We do it the other way around, since
          *       we have to reserve 3GB - 4GB for Linux, and thus use
          *       0GB - 3GB as sparse memory arena.
          *
@@ -1523,7 +1523,7 @@
             DWORD SparseFree;         /* Free size of sparse arena (bytes ?) */
         };
 
-        struct Win32sMemoryInfo *info = 
+        struct Win32sMemoryInfo *info =
                        (struct Win32sMemoryInfo *)W32S_APP2WINE(context->Esi);
 
         FIXME("KGlobalMemStat(%lx)\n", (DWORD)info);
@@ -1547,9 +1547,9 @@
 
 
     case 0x001D: /* VirtualAlloc called from 16-bit code */
-        /* 
+        /*
          * Input:   EDX: Segmented address of arguments on stack
-         * 
+         *
          *   LPVOID base     [in]  Flat address of region to reserve/commit
          *   DWORD  size     [in]  Size of region
          *   DWORD  type     [in]  Type of allocation
@@ -1566,7 +1566,7 @@
         DWORD  prot   = stack[3];
         DWORD  result;
 
-        TRACE("VirtualAlloc16(%lx, %lx, %lx, %lx)\n", 
+        TRACE("VirtualAlloc16(%lx, %lx, %lx, %lx)\n",
                    (DWORD)base, size, type, prot);
 
         if (type & 0x80000000)
@@ -1589,9 +1589,9 @@
 
 
     case 0x001E: /* VirtualFree called from 16-bit code */
-        /* 
+        /*
          * Input:   EDX: Segmented address of arguments on stack
-         * 
+         *
          *   LPVOID base     [in]  Flat address of region
          *   DWORD  size     [in]  Size of region
          *   DWORD  type     [in]  Type of operation
@@ -1606,7 +1606,7 @@
         DWORD  type   = stack[2];
         DWORD  result;
 
-        TRACE("VirtualFree16(%lx, %lx, %lx)\n", 
+        TRACE("VirtualFree16(%lx, %lx, %lx)\n",
                    (DWORD)base, size, type);
 
         result = VirtualFree(base, size, type);
@@ -1633,7 +1633,7 @@
     {
         DWORD *ptr = (DWORD *)W32S_APP2WINE(context->Ecx);
         BOOL set = context->Edx;
-        
+
         TRACE("FWorkingSetSize(%lx, %lx)\n", (DWORD)ptr, (DWORD)set);
 
         if (set)
diff --git a/objects/bitmap.c b/objects/bitmap.c
index 7b5e0a9..b57baed 100644
--- a/objects/bitmap.c
+++ b/objects/bitmap.c
@@ -93,7 +93,7 @@
 /***********************************************************************
  *           CreateUserDiscardableBitmap    (GDI.409)
  */
-HBITMAP16 WINAPI CreateUserDiscardableBitmap16( WORD dummy, 
+HBITMAP16 WINAPI CreateUserDiscardableBitmap16( WORD dummy,
                                                 INT16 width, INT16 height )
 {
     HDC hdc = CreateDCA( "DISPLAY", NULL, NULL, NULL );
@@ -215,9 +215,9 @@
 	      width, height );
     } else {
         /* MS doc says if width or height is 0, return 1-by-1 pixel, monochrome bitmap */
-        if (!width || !height) 
+        if (!width || !height)
 	   hbmpRet = CreateBitmap( 1, 1, 1, 1, NULL );
-	else 
+	else
 	   hbmpRet = CreateBitmap( width, height, 1, dc->bitsPerPixel, NULL );
 
         if (!BITMAP_SetOwnerDC( hbmpRet, dc ))
@@ -268,7 +268,7 @@
 
 /***********************************************************************
  * GetBitmapBits [GDI32.@]  Copies bitmap bits of bitmap to buffer
- * 
+ *
  * RETURNS
  *    Success: Number of bytes copied
  *    Failure: 0
@@ -280,9 +280,9 @@
 {
     BITMAPOBJ *bmp = (BITMAPOBJ *) GDI_GetObjPtr( hbitmap, BITMAP_MAGIC );
     LONG height, ret;
-    
+
     if (!bmp) return 0;
-    
+
     /* If the bits vector is null, the function should return the read size */
     if(bits == NULL)
     {
@@ -361,7 +361,7 @@
 {
     BITMAPOBJ *bmp = (BITMAPOBJ *) GDI_GetObjPtr( hbitmap, BITMAP_MAGIC );
     LONG height, ret;
-    
+
     if ((!bmp) || (!bits))
 	return 0;
 
@@ -609,7 +609,7 @@
 	return count;
     }
 }
-    
+
 
 /***********************************************************************
  *           BITMAP_GetObject
@@ -639,7 +639,7 @@
 	return count;
     }
 }
-    
+
 
 /***********************************************************************
  *           CreateDiscardableBitmap    (GDI.156)
diff --git a/objects/brush.c b/objects/brush.c
index 16e107b..d46bd07 100644
--- a/objects/brush.c
+++ b/objects/brush.c
@@ -267,22 +267,22 @@
  *
  *	Create a logical brush which has the pattern specified by the DIB
  *
- *	Function call is for compatibility only.  CreateDIBPatternBrushPt should be used.   
+ *	Function call is for compatibility only.  CreateDIBPatternBrushPt should be used.
  *
  * RETURNS
  *
  *	Handle to a logical brush on success, NULL on failure.
  *
  * BUGS
- *	
+ *
  */
-HBRUSH WINAPI CreateDIBPatternBrush( 
+HBRUSH WINAPI CreateDIBPatternBrush(
 		HGLOBAL hbitmap, /* [in] Global object containg BITMAPINFO structure */
 		UINT coloruse 	 /* [in] Specifies color format, if provided */
 )
 {
     LOGBRUSH logbrush;
-    
+
     TRACE("%04x\n", hbitmap );
 
     logbrush.lbStyle = BS_DIBPATTERN;
@@ -304,16 +304,16 @@
  *	Handle to a logical brush on success, NULL on failure.
  *
  * BUGS
- *	
+ *
  */
 HBRUSH WINAPI CreateDIBPatternBrushPt(
-		const void* data, /* [in] Pointer to a BITMAPINFO structure followed by more data */ 
+		const void* data, /* [in] Pointer to a BITMAPINFO structure followed by more data */
 		UINT coloruse 	  /* [in] Specifies color format, if provided */
 )
 {
     BITMAPINFO *info=(BITMAPINFO*)data;
     LOGBRUSH logbrush;
-    
+
     TRACE("%p %ldx%ld %dbpp\n", info, info->bmiHeader.biWidth,
 	  info->bmiHeader.biHeight,  info->bmiHeader.biBitCount);
 
diff --git a/objects/clipping.c b/objects/clipping.c
index 0051119..d9af64c 100644
--- a/objects/clipping.c
+++ b/objects/clipping.c
@@ -107,12 +107,12 @@
         }
         else
         {
-            FIXME("Unimplemented: hrgn NULL in mode: %d\n", fnMode); 
+            FIXME("Unimplemented: hrgn NULL in mode: %d\n", fnMode);
             GDI_ReleaseObj( hdc );
             return ERROR;
         }
     }
-    else 
+    else
     {
         if (!dc->hClipRgn)
         {
@@ -194,7 +194,7 @@
 {
     INT16 retval;
     DC * dc = DC_GetDCUpdate( hdc );
-    if (!dc) return ERROR;    
+    if (!dc) return ERROR;
     TRACE("%04x %d,%d\n", hdc, x, y );
     retval = OffsetRgn( dc->hVisRgn, x, y );
     CLIPPING_UpdateGCRegion( dc );
@@ -388,7 +388,7 @@
     if (!dc) return FALSE;
     if (dc->hGCClipRgn)
     {
-        ret = PtInRegion( dc->hGCClipRgn, XLPTODP(dc,x) + dc->DCOrgX, 
+        ret = PtInRegion( dc->hGCClipRgn, XLPTODP(dc,x) + dc->DCOrgX,
                                            YLPTODP(dc,y) + dc->DCOrgY );
     }
     GDI_ReleaseObj( hdc );
@@ -484,7 +484,7 @@
     if (hRgn && (dc = DC_GetDCPtr( hdc )))
     {
       if( dc->hClipRgn )
-      { 
+      {
 	/* this assumes that dc->hClipRgn is in coordinates
 	   relative to the device (not DC origin) */
 
@@ -522,7 +522,7 @@
         GDI_ReleaseObj( dc->hVisRgn );
         GDI_ReleaseObj( hdc );
         return 0;
-    }  
+    }
     CombineRgn( copy, dc->hVisRgn, 0, RGN_COPY );
     if (!(copyObj = GDI_GetObjPtr( copy, REGION_MAGIC )))
     {
diff --git a/objects/color.c b/objects/color.c
index 311a926..2df9d01 100644
--- a/objects/color.c
+++ b/objects/color.c
@@ -28,7 +28,7 @@
 
 
 /***********************************************************************
- * System color space. 
+ * System color space.
  *
  * First 10 and last 10 colors in COLOR_sysPalette are
  * "guarded". RealizePalette changes only the rest of colorcells. For
@@ -37,7 +37,7 @@
 
 PALETTEENTRY *COLOR_sysPal = NULL; /* current system palette */
 
-const PALETTEENTRY COLOR_sysPalTemplate[NB_RESERVED_COLORS] = 
+const PALETTEENTRY COLOR_sysPalTemplate[NB_RESERVED_COLORS] =
 {
     /* first 10 entries in the system palette */
     /* red  green blue  flags */
@@ -148,7 +148,7 @@
 
   else if( spec_type == 1 ) /* PALETTEINDEX */
   {
-    if( (i = color & 0x0000ffff) >= size ) 
+    if( (i = color & 0x0000ffff) >= size )
       {
 	WARN("RGB(%lx) : idx %d is out of bounds, assuming NULL\n", color, i);
 	color = *(COLORREF*)palPalEntry;
diff --git a/objects/dc.c b/objects/dc.c
index 6a0e788..e06d67e 100644
--- a/objects/dc.c
+++ b/objects/dc.c
@@ -212,7 +212,7 @@
 static BOOL DC_InvertXform( const XFORM *xformSrc, XFORM *xformDest )
 {
     FLOAT determinant;
-    
+
     determinant = xformSrc->eM11*xformSrc->eM22 -
         xformSrc->eM12*xformSrc->eM21;
     if (determinant > -1e-12 && determinant < 1e-12)
@@ -245,7 +245,7 @@
 {
     XFORM xformWnd2Vport;
     FLOAT scaleX, scaleY;
-    
+
     /* Construct a transformation to do the window-to-viewport conversion */
     scaleX = (FLOAT)dc->vportExtX / (FLOAT)dc->wndExtX;
     scaleY = (FLOAT)dc->vportExtY / (FLOAT)dc->wndExtY;
@@ -275,7 +275,7 @@
 {
     DC * newdc, * dc;
     HGDIOBJ handle;
-    
+
     if (!(dc = DC_GetDCPtr( hdc ))) return 0;
     if (!(newdc = GDI_AllocObject( sizeof(DC), DC_MAGIC, &handle, &dc_funcs )))
     {
@@ -285,12 +285,12 @@
     TRACE("(%04x): returning %04x\n", hdc, handle );
 
     newdc->flags            = dc->flags | DC_SAVED;
-    newdc->hPen             = dc->hPen;       
-    newdc->hBrush           = dc->hBrush;     
-    newdc->hFont            = dc->hFont;      
-    newdc->hBitmap          = dc->hBitmap;    
+    newdc->hPen             = dc->hPen;
+    newdc->hBrush           = dc->hBrush;
+    newdc->hFont            = dc->hFont;
+    newdc->hBitmap          = dc->hBitmap;
     newdc->hDevice          = dc->hDevice;
-    newdc->hPalette         = dc->hPalette;   
+    newdc->hPalette         = dc->hPalette;
     newdc->totalExtent      = dc->totalExtent;
     newdc->bitsPerPixel     = dc->bitsPerPixel;
     newdc->ROPmode          = dc->ROPmode;
@@ -335,7 +335,7 @@
     newdc->saveLevel = 0;
 
     PATH_InitGdiPath( &newdc->path );
-    
+
     newdc->pAbortProc = NULL;
     newdc->hookThunk  = NULL;
     newdc->hookProc   = 0;
@@ -538,7 +538,7 @@
     }
 
     if (level == -1) level = dc->saveLevel;
-    if ((level < 1) 
+    if ((level < 1)
             /* This pair of checks disagrees with MSDN "Platform SDK:
                Windows GDI" July 2000 which says all negative values
                for level will be interpreted as an instance relative
@@ -549,7 +549,7 @@
         GDI_ReleaseObj( hdc );
         return FALSE;
     }
-    
+
     success=TRUE;
     while (dc->saveLevel >= level)
     {
@@ -558,7 +558,7 @@
 	{
 	  GDI_ReleaseObj( hdc );
 	  return FALSE;
-	}	
+	}
 	dc->header.hNext = dcs->header.hNext;
 	if (--dc->saveLevel < level)
 	{
@@ -646,7 +646,7 @@
  */
 HDC WINAPI CreateDCW( LPCWSTR driver, LPCWSTR device, LPCWSTR output,
                           const DEVMODEW *initData )
-{ 
+{
     LPSTR driverA = HEAP_strdupWtoA( GetProcessHeap(), 0, driver );
     LPSTR deviceA = HEAP_strdupWtoA( GetProcessHeap(), 0, device );
     LPSTR outputA = HEAP_strdupWtoA( GetProcessHeap(), 0, output );
@@ -811,7 +811,7 @@
         PATH_DestroyGdiPath(&dcs->path);
         GDI_FreeObject( hdcs, dcs );
     }
-    
+
     if (!(dc->flags & DC_SAVED))
     {
 	SelectObject( hdc, GetStockObject(BLACK_PEN) );
@@ -1017,7 +1017,7 @@
 {
     POINT	pt;
     if( GetDCOrgEx( hdc, &pt) )
-  	return MAKELONG( (WORD)pt.x, (WORD)pt.y );    
+  	return MAKELONG( (WORD)pt.x, (WORD)pt.y );
     return 0;
 }
 
@@ -1215,7 +1215,7 @@
     const XFORM *xform2 )
 {
     XFORM xformTemp;
-    
+
     /* Check for illegal parameters */
     if (!xformResult || !xform1 || !xform2)
         return FALSE;
@@ -1387,7 +1387,7 @@
 HCOLORSPACE WINAPI CreateColorSpaceA( LPLOGCOLORSPACEA lpLogColorSpace )
 {
   FIXME( "stub\n" );
-  return 0; 
+  return 0;
 }
 
 /***********************************************************************
@@ -1405,7 +1405,7 @@
 BOOL WINAPI DeleteColorSpace( HCOLORSPACE hColorSpace )
 {
   FIXME( "stub\n" );
-  
+
   return TRUE;
 }
 
@@ -1435,7 +1435,7 @@
     FIXME("(): stub\n");
     return DCB_RESET;   /* bounding rectangle always empty */
 }
- 
+
 /***********************************************************************
  *           SetBoundsRect    (GDI.193)
  */
diff --git a/objects/dib.c b/objects/dib.c
index e4962ef..b8490ac 100644
--- a/objects/dib.c
+++ b/objects/dib.c
@@ -191,7 +191,7 @@
 	   /* when RLE compression is used, there may be some gaps (ie the DIB doesn't
 	    * contain all the rectangle described in bmiHeader, but only part of it.
 	    * This mean that those undescribed pixels must be left untouched.
-	    * So, we first copy on a memory bitmap the current content of the 
+	    * So, we first copy on a memory bitmap the current content of the
 	    * destination rectangle, blit the DIB bits on top of it - hence leaving
 	    * the gaps untouched -, and blitting the rectangle back.
 	    * This insure that gaps are untouched on the destination rectangle
@@ -202,17 +202,17 @@
 	    * pStretchDIBits function shall be implemented.
 	    * ericP (2000/09/09)
 	    */
-	   hBitmap = CreateCompatibleBitmap(hdc, info->bmiHeader.biWidth, 
+	   hBitmap = CreateCompatibleBitmap(hdc, info->bmiHeader.biWidth,
 					    info->bmiHeader.biHeight);
 	   hOldBitmap = SelectObject( hdcMem, hBitmap );
-	   
+
 	   /* copy existing bitmap from destination dc */
 	   StretchBlt( hdcMem, xSrc, abs(info->bmiHeader.biHeight) - heightSrc - ySrc,
 		       widthSrc, heightSrc, hdc, xDst, yDst, widthDst, heightDst,
 		       dwRop );
-	   SetDIBits(hdcMem, hBitmap, 0, info->bmiHeader.biHeight, bits, 
-		     info, DIB_RGB_COLORS); 
-	   
+	   SetDIBits(hdcMem, hBitmap, 0, info->bmiHeader.biHeight, bits,
+		     info, DIB_RGB_COLORS);
+
 	} else {
 	   hBitmap = CreateDIBitmap( hdc, &info->bmiHeader, CBM_INIT,
 				     bits, info, wUsage );
@@ -222,7 +222,7 @@
         /* Origin for DIBitmap may be bottom left (positive biHeight) or top
            left (negative biHeight) */
         StretchBlt( hdc, xDst, yDst, widthDst, heightDst,
-		    hdcMem, xSrc, abs(info->bmiHeader.biHeight) - heightSrc - ySrc, 
+		    hdcMem, xSrc, abs(info->bmiHeader.biHeight) - heightSrc - ySrc,
 		    widthSrc, heightSrc, dwRop );
 	SelectObject( hdcMem, hOldBitmap );
 	DeleteDC( hdcMem );
@@ -388,7 +388,7 @@
    NB. RGBQUAD and PALETTEENTRY have different orderings of red, green
    and blue - sigh */
 
-static RGBQUAD EGAColors[16] = { 
+static RGBQUAD EGAColors[16] = {
 /* rgbBlue, rgbGreen, rgbRed, rgbReserverd */
     { 0x00, 0x00, 0x00, 0x00 },
     { 0x00, 0x00, 0x80, 0x00 },
@@ -706,7 +706,7 @@
 
                             for( y = 0; y < lines; y++) {
                                 for( x = 0; x < srcwidth; x++, srcbits+=3 )
-                                    *dstbits++ = ((DWORD)*srcbits) & 0x00ffffff; 
+                                    *dstbits++ = ((DWORD)*srcbits) & 0x00ffffff;
                                 dstbits=(LPDWORD)(dbits+=dstwidthb);
                                 srcbits=(sbits+=srcwidthb);
                             }
@@ -748,7 +748,7 @@
             }
         }
     }
-    else if( info->bmiHeader.biSize >= sizeof(BITMAPINFOHEADER) ) 
+    else if( info->bmiHeader.biSize >= sizeof(BITMAPINFOHEADER) )
     {
 	/* fill in struct members */
 
@@ -758,7 +758,7 @@
 	    info->bmiHeader.biHeight = bmp->bitmap.bmHeight;
 	    info->bmiHeader.biPlanes = 1;
 	    info->bmiHeader.biBitCount = bmp->bitmap.bmBitsPixel;
-	    info->bmiHeader.biSizeImage = 
+	    info->bmiHeader.biSizeImage =
                              DIB_GetDIBImageBytes( bmp->bitmap.bmWidth,
 						   bmp->bitmap.bmHeight,
 						   bmp->bitmap.bmBitsPixel );
@@ -828,7 +828,7 @@
             RGBQUAD *rgb = data->bmiColors;
             DWORD col = RGB( rgb->rgbRed, rgb->rgbGreen, rgb->rgbBlue );
 
-	    /* Check if the first color of the colormap is black */ 
+	    /* Check if the first color of the colormap is black */
 	    if ((col == RGB(0,0,0)))
             {
                 rgb++;
@@ -836,9 +836,9 @@
 		/* If the second color is white, create a monochrome bitmap */
                 fColor =  (col != RGB(0xff,0xff,0xff));
             }
-	    /* Note : If the first color of the colormap is white 
-	       followed by black, we have to create a color bitmap. 
-	       If we don't the white will be displayed in black later on!*/ 
+	    /* Note : If the first color of the colormap is white
+	       followed by black, we have to create a color bitmap.
+	       If we don't the white will be displayed in black later on!*/
             else fColor = TRUE;
         }
         else if (data->bmiHeader.biSize == sizeof(BITMAPCOREHEADER))
@@ -858,7 +858,7 @@
             RGBQUAD *rgb = data->bmiColors;
             DWORD col = RGB( rgb->rgbRed, rgb->rgbGreen, rgb->rgbBlue );
 
-	    /* Check if the first color of the colormap is black */ 
+	    /* Check if the first color of the colormap is black */
 	    if ((col == RGB(0,0,0)))
             {
                 rgb++;
@@ -866,9 +866,9 @@
 		/* If the second color is white, create a monochrome bitmap */
                 fColor =  (col != RGB(0xff,0xff,0xff));
             }
-	    /* Note : If the first color of the colormap is white 
-	       followed by black, we have to create a color bitmap. 
-	       If we don't the white will be displayed in black later on!*/ 
+	    /* Note : If the first color of the colormap is white
+	       followed by black, we have to create a color bitmap.
+	       If we don't the white will be displayed in black later on!*/
             else fColor = TRUE;
         }
         else
@@ -1003,7 +1003,7 @@
     width = pBmp->bitmap.bmWidth;
     height = pBmp->bitmap.bmHeight;
     depth = pBmp->bitmap.bmBitsPixel;
-                 
+
     /*
      * A packed DIB contains a BITMAPINFO structure followed immediately by
      * an optional color palette and the pixel data.
@@ -1026,7 +1026,7 @@
         WARN("Could not allocate packed DIB!\n");
         goto END;
     }
-    
+
     /* A packed DIB starts with a BITMAPINFOHEADER */
     pPackedDIB = (LPBYTE)GlobalLock(hPackedDIB);
     pbmiHeader = (LPBITMAPINFOHEADER)pPackedDIB;
@@ -1045,7 +1045,7 @@
 
     /* Retrieve the DIB bits from the bitmap and fill in the
      * DIB color table if present */
-    
+
     nLinesCopied = GetDIBits(hdc,                       /* Handle to device context */
                              hBmp,                      /* Handle to bitmap */
                              0,                         /* First scan line to set in dest bitmap */
diff --git a/objects/enhmetafile.c b/objects/enhmetafile.c
index 065d1f1..aa4d9fb 100644
--- a/objects/enhmetafile.c
+++ b/objects/enhmetafile.c
@@ -1,7 +1,7 @@
 /*
  * Enhanced metafile functions
  * Copyright 1998 Douglas Ridgway
- *           1999 Huw D M Davies 
+ *           1999 Huw D M Davies
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -19,17 +19,17 @@
  *
  * NOTES:
  *
- * The enhanced format consists of the following elements: 
+ * The enhanced format consists of the following elements:
  *
- *    A header 
- *    A table of handles to GDI objects 
- *    An array of metafile records 
- *    A private palette 
+ *    A header
+ *    A table of handles to GDI objects
+ *    An array of metafile records
+ *    A private palette
  *
- * 
- *  The standard format consists of a header and an array of metafile records. 
  *
- */ 
+ *  The standard format consists of a header and an array of metafile records.
+ *
+ */
 
 #include "config.h"
 #include "wine/port.h"
@@ -112,7 +112,7 @@
 {
     ENHMETAHEADER *emh;
     HANDLE hMapping;
-    
+
     hMapping = CreateFileMappingA( hFile, NULL, PAGE_READONLY, 0, 0, NULL );
     emh = MapViewOfFile( hMapping, FILE_MAP_READ, 0, 0, 0 );
     CloseHandle( hMapping );
@@ -134,7 +134,7 @@
  *
  *
  */
-HENHMETAFILE WINAPI GetEnhMetaFileA( 
+HENHMETAFILE WINAPI GetEnhMetaFileA(
 	     LPCSTR lpszMetaFile  /* [in] filename of enhanced metafile */
     )
 {
@@ -156,7 +156,7 @@
  *          GetEnhMetaFileW  (GDI32.@)
  */
 HENHMETAFILE WINAPI GetEnhMetaFileW(
-             LPCWSTR lpszMetaFile)  /* [in] filename of enhanced metafile */ 
+             LPCWSTR lpszMetaFile)  /* [in] filename of enhanced metafile */
 {
     HENHMETAFILE hmf;
     HANDLE hFile;
@@ -176,13 +176,13 @@
  *        GetEnhMetaFileHeader  (GDI32.@)
  *
  *  If buf is NULL, returns the size of buffer required.
- *  Otherwise, copy up to bufsize bytes of enhanced metafile header into 
+ *  Otherwise, copy up to bufsize bytes of enhanced metafile header into
  *  buf.
  */
-UINT WINAPI GetEnhMetaFileHeader( 
+UINT WINAPI GetEnhMetaFileHeader(
        HENHMETAFILE hmf,   /* [in] enhanced metafile */
        UINT bufsize,       /* [in] size of buffer */
-       LPENHMETAHEADER buf /* [out] buffer */ 
+       LPENHMETAHEADER buf /* [out] buffer */
     )
 {
     LPENHMETAHEADER emh;
@@ -201,9 +201,9 @@
 /*****************************************************************************
  *          GetEnhMetaFileDescriptionA  (GDI32.@)
  */
-UINT WINAPI GetEnhMetaFileDescriptionA( 
+UINT WINAPI GetEnhMetaFileDescriptionA(
        HENHMETAFILE hmf, /* [in] enhanced metafile */
-       UINT size,        /* [in] size of buf */ 
+       UINT size,        /* [in] size of buf */
        LPSTR buf         /* [out] buffer to receive description */
     )
 {
@@ -226,15 +226,15 @@
 /*****************************************************************************
  *          GetEnhMetaFileDescriptionW  (GDI32.@)
  *
- *  Copies the description string of an enhanced metafile into a buffer 
+ *  Copies the description string of an enhanced metafile into a buffer
  *  _buf_.
  *
  *  If _buf_ is NULL, returns size of _buf_ required. Otherwise, returns
  *  number of characters copied.
  */
-UINT WINAPI GetEnhMetaFileDescriptionW( 
+UINT WINAPI GetEnhMetaFileDescriptionW(
        HENHMETAFILE hmf, /* [in] enhanced metafile */
-       UINT size,        /* [in] size of buf */ 
+       UINT size,        /* [in] size of buf */
        LPWSTR buf        /* [out] buffer to receive description */
     )
 {
@@ -265,10 +265,10 @@
  *
  */
 UINT WINAPI GetEnhMetaFileBits(
-    HENHMETAFILE hmf, 
-    UINT bufsize, 
-    LPBYTE buf  
-) 
+    HENHMETAFILE hmf,
+    UINT bufsize,
+    LPBYTE buf
+)
 {
     LPENHMETAHEADER emh = EMF_GetEnhMetaHeader( hmf );
     UINT size;
@@ -294,23 +294,23 @@
  *    Many unimplemented records.
  *    No error handling on record play failures (ie checking return codes)
  */
-BOOL WINAPI PlayEnhMetaFileRecord( 
+BOOL WINAPI PlayEnhMetaFileRecord(
      HDC hdc,                   /* [in] device context in which to render EMF record */
      LPHANDLETABLE handletable, /* [in] array of handles to be used in rendering record */
      const ENHMETARECORD *mr,   /* [in] EMF record to render */
      UINT handles               /* [in] size of handle array */
-     ) 
+     )
 {
   int type;
   TRACE(
-	"hdc = %08x, handletable = %p, record = %p, numHandles = %d\n", 
+	"hdc = %08x, handletable = %p, record = %p, numHandles = %d\n",
 	  hdc, handletable, mr, handles);
   if (!mr) return FALSE;
 
   type = mr->iType;
 
   TRACE(" type=%d\n", type);
-  switch(type) 
+  switch(type)
     {
     case EMR_HEADER:
       break;
@@ -322,7 +322,7 @@
         /* In an enhanced metafile, there can be both public and private GDI comments */
         GdiComment( hdc, lpGdiComment->cbData, lpGdiComment->Data );
         break;
-      } 
+      }
     case EMR_SETMAPMODE:
       {
 	PEMRSETMAPMODE pSetMapMode = (PEMRSETMAPMODE) mr;
@@ -451,7 +451,7 @@
     case EMR_CREATEPEN:
       {
 	PEMRCREATEPEN pCreatePen = (PEMRCREATEPEN) mr;
-	(handletable->objectHandle)[pCreatePen->ihPen] = 
+	(handletable->objectHandle)[pCreatePen->ihPen] =
 	  CreatePenIndirect(&pCreatePen->lopn);
 	break;
       }
@@ -466,22 +466,22 @@
 	if(pPen->offBmi || pPen->offBits)
 	  FIXME("EMR_EXTCREATEPEN: Need to copy brush bitmap\n");
 
-	(handletable->objectHandle)[pPen->ihPen] = 
-	  ExtCreatePen(pPen->elp.elpPenStyle, pPen->elp.elpWidth, &lb, 
+	(handletable->objectHandle)[pPen->ihPen] =
+	  ExtCreatePen(pPen->elp.elpPenStyle, pPen->elp.elpWidth, &lb,
 		       pPen->elp.elpNumEntries, pPen->elp.elpStyleEntry);
 	break;
       }
     case EMR_CREATEBRUSHINDIRECT:
       {
 	PEMRCREATEBRUSHINDIRECT pBrush = (PEMRCREATEBRUSHINDIRECT) mr;
-	(handletable->objectHandle)[pBrush->ihBrush] = 
+	(handletable->objectHandle)[pBrush->ihBrush] =
 	  CreateBrushIndirect(&pBrush->lb);
 	break;
       }
     case EMR_EXTCREATEFONTINDIRECTW:
       {
 	PEMREXTCREATEFONTINDIRECTW pFont = (PEMREXTCREATEFONTINDIRECTW) mr;
-	(handletable->objectHandle)[pFont->ihFont] = 
+	(handletable->objectHandle)[pFont->ihFont] =
 	  CreateFontIndirectW(&pFont->elfw.elfLogFont);
 	break;
       }
@@ -667,7 +667,7 @@
       {
 	PEMRCREATEPALETTE lpCreatePal = (PEMRCREATEPALETTE)mr;
 
-	(handletable->objectHandle)[ lpCreatePal->ihPal ] = 
+	(handletable->objectHandle)[ lpCreatePal->ihPal ] =
 		CreatePalette( &lpCreatePal->lgpl );
 
 	break;
@@ -717,7 +717,7 @@
 
     case EMR_POLYBEZIER:
       {
-        PEMRPOLYBEZIER lpPolyBez = (PEMRPOLYBEZIER)mr; 
+        PEMRPOLYBEZIER lpPolyBez = (PEMRPOLYBEZIER)mr;
         PolyBezier(hdc, (const LPPOINT)lpPolyBez->aptl, (UINT)lpPolyBez->cptl);
         break;
       }
@@ -733,7 +733,7 @@
       {
         PEMRPOLYLINE lpPolyLine = (PEMRPOLYLINE)mr;
         Polyline(hdc, (const LPPOINT)lpPolyLine->aptl, (UINT)lpPolyLine->cptl);
-        break; 
+        break;
       }
 
     case EMR_POLYBEZIERTO:
@@ -741,7 +741,7 @@
         PEMRPOLYBEZIERTO lpPolyBezierTo = (PEMRPOLYBEZIERTO)mr;
         PolyBezierTo( hdc, (const LPPOINT)lpPolyBezierTo->aptl,
 		      (UINT)lpPolyBezierTo->cptl );
-        break; 
+        break;
       }
 
     case EMR_POLYLINETO:
@@ -758,9 +758,9 @@
 	/* NB Points at pPolyPolyline->aPolyCounts + pPolyPolyline->nPolys */
 
         PolyPolyline(hdc, (LPPOINT)(pPolyPolyline->aPolyCounts +
-				    pPolyPolyline->nPolys), 
-		     pPolyPolyline->aPolyCounts, 
-		     pPolyPolyline->nPolys ); 
+				    pPolyPolyline->nPolys),
+		     pPolyPolyline->aPolyCounts,
+		     pPolyPolyline->nPolys );
 
         break;
       }
@@ -781,21 +781,21 @@
       {
         PEMRSETBRUSHORGEX lpSetBrushOrgEx = (PEMRSETBRUSHORGEX)mr;
 
-        SetBrushOrgEx( hdc, 
-                       (INT)lpSetBrushOrgEx->ptlOrigin.x, 
-                       (INT)lpSetBrushOrgEx->ptlOrigin.y, 
+        SetBrushOrgEx( hdc,
+                       (INT)lpSetBrushOrgEx->ptlOrigin.x,
+                       (INT)lpSetBrushOrgEx->ptlOrigin.y,
                        NULL );
 
         break;
       }
- 
+
     case EMR_SETPIXELV:
       {
         PEMRSETPIXELV lpSetPixelV = (PEMRSETPIXELV)mr;
 
-        SetPixelV( hdc, 
-                   (INT)lpSetPixelV->ptlPixel.x, 
-                   (INT)lpSetPixelV->ptlPixel.y, 
+        SetPixelV( hdc,
+                   (INT)lpSetPixelV->ptlPixel.x,
+                   (INT)lpSetPixelV->ptlPixel.y,
                    lpSetPixelV->crColor );
 
         break;
@@ -804,7 +804,7 @@
     case EMR_SETMAPPERFLAGS:
       {
         PEMRSETMAPPERFLAGS lpSetMapperFlags = (PEMRSETMAPPERFLAGS)mr;
-   
+
         SetMapperFlags( hdc, lpSetMapperFlags->dwFlags );
 
         break;
@@ -812,7 +812,7 @@
 
     case EMR_SETCOLORADJUSTMENT:
       {
-        PEMRSETCOLORADJUSTMENT lpSetColorAdjust = (PEMRSETCOLORADJUSTMENT)mr; 
+        PEMRSETCOLORADJUSTMENT lpSetColorAdjust = (PEMRSETCOLORADJUSTMENT)mr;
 
         SetColorAdjustment( hdc, &lpSetColorAdjust->ColorAdjustment );
 
@@ -823,21 +823,21 @@
       {
         PEMROFFSETCLIPRGN lpOffsetClipRgn = (PEMROFFSETCLIPRGN)mr;
 
-        OffsetClipRgn( hdc, 
+        OffsetClipRgn( hdc,
                        (INT)lpOffsetClipRgn->ptlOffset.x,
                        (INT)lpOffsetClipRgn->ptlOffset.y );
 
         break;
-      } 
+      }
 
     case EMR_EXCLUDECLIPRECT:
       {
         PEMREXCLUDECLIPRECT lpExcludeClipRect = (PEMREXCLUDECLIPRECT)mr;
 
-        ExcludeClipRect( hdc, 
-                         lpExcludeClipRect->rclClip.left, 
-                         lpExcludeClipRect->rclClip.top, 
-                         lpExcludeClipRect->rclClip.right, 
+        ExcludeClipRect( hdc,
+                         lpExcludeClipRect->rclClip.left,
+                         lpExcludeClipRect->rclClip.top,
+                         lpExcludeClipRect->rclClip.right,
                          lpExcludeClipRect->rclClip.bottom  );
 
          break;
@@ -847,16 +847,16 @@
       {
         PEMRSCALEVIEWPORTEXTEX lpScaleViewportExtEx = (PEMRSCALEVIEWPORTEXTEX)mr;
 
-        ScaleViewportExtEx( hdc, 
+        ScaleViewportExtEx( hdc,
                             lpScaleViewportExtEx->xNum,
                             lpScaleViewportExtEx->xDenom,
                             lpScaleViewportExtEx->yNum,
                             lpScaleViewportExtEx->yDenom,
                             NULL );
-     
+
         break;
       }
- 
+
     case EMR_SCALEWINDOWEXTEX:
       {
         PEMRSCALEWINDOWEXTEX lpScaleWindowExtEx = (PEMRSCALEWINDOWEXTEX)mr;
@@ -865,7 +865,7 @@
                           lpScaleWindowExtEx->xNum,
                           lpScaleWindowExtEx->xDenom,
                           lpScaleWindowExtEx->yNum,
-                          lpScaleWindowExtEx->yDenom, 
+                          lpScaleWindowExtEx->yDenom,
                           NULL );
 
         break;
@@ -883,21 +883,21 @@
 
     case EMR_ANGLEARC:
       {
-        PEMRANGLEARC lpAngleArc = (PEMRANGLEARC)mr; 
+        PEMRANGLEARC lpAngleArc = (PEMRANGLEARC)mr;
 
-        AngleArc( hdc, 
+        AngleArc( hdc,
                  (INT)lpAngleArc->ptlCenter.x, (INT)lpAngleArc->ptlCenter.y,
-                 lpAngleArc->nRadius, lpAngleArc->eStartAngle, 
+                 lpAngleArc->nRadius, lpAngleArc->eStartAngle,
                  lpAngleArc->eSweepAngle );
 
         break;
       }
- 
-    case EMR_ROUNDRECT: 
+
+    case EMR_ROUNDRECT:
       {
         PEMRROUNDRECT lpRoundRect = (PEMRROUNDRECT)mr;
 
-        RoundRect( hdc, 
+        RoundRect( hdc,
                    lpRoundRect->rclBox.left,
                    lpRoundRect->rclBox.top,
                    lpRoundRect->rclBox.right,
@@ -905,24 +905,24 @@
                    lpRoundRect->szlCorner.cx,
                    lpRoundRect->szlCorner.cy );
 
-        break; 
+        break;
       }
 
     case EMR_ARC:
       {
         PEMRARC lpArc = (PEMRARC)mr;
 
-        Arc( hdc,  
+        Arc( hdc,
              (INT)lpArc->rclBox.left,
              (INT)lpArc->rclBox.top,
              (INT)lpArc->rclBox.right,
              (INT)lpArc->rclBox.bottom,
-             (INT)lpArc->ptlStart.x, 
+             (INT)lpArc->ptlStart.x,
              (INT)lpArc->ptlStart.y,
              (INT)lpArc->ptlEnd.x,
              (INT)lpArc->ptlEnd.y );
 
-        break;  
+        break;
       }
 
     case EMR_CHORD:
@@ -959,7 +959,7 @@
        break;
       }
 
-    case EMR_ARCTO: 
+    case EMR_ARCTO:
       {
         PEMRARC lpArcTo = (PEMRARC)mr;
 
@@ -980,7 +980,7 @@
       {
         PEMREXTFLOODFILL lpExtFloodFill = (PEMREXTFLOODFILL)mr;
 
-        ExtFloodFill( hdc, 
+        ExtFloodFill( hdc,
                       (INT)lpExtFloodFill->ptlStart.x,
                       (INT)lpExtFloodFill->ptlStart.y,
                       lpExtFloodFill->crColor,
@@ -992,13 +992,13 @@
     case EMR_POLYDRAW:
       {
         PEMRPOLYDRAW lpPolyDraw = (PEMRPOLYDRAW)mr;
-        PolyDraw( hdc, 
+        PolyDraw( hdc,
                   (const LPPOINT)lpPolyDraw->aptl,
                   lpPolyDraw->abTypes,
                   (INT)lpPolyDraw->cptl );
- 
+
         break;
-      } 
+      }
 
     case EMR_SETARCDIRECTION:
       {
@@ -1012,7 +1012,7 @@
         PEMRSETMITERLIMIT lpSetMiterLimit = (PEMRSETMITERLIMIT)mr;
         SetMiterLimit( hdc, lpSetMiterLimit->eMiterLimit, NULL );
         break;
-      } 
+      }
 
     case EMR_BEGINPATH:
       {
@@ -1020,7 +1020,7 @@
         break;
       }
 
-    case EMR_ENDPATH: 
+    case EMR_ENDPATH:
       {
         EndPath( hdc );
         break;
@@ -1055,7 +1055,7 @@
 
     case EMR_FLATTENPATH:
       {
-        FlattenPath( hdc ); 
+        FlattenPath( hdc );
         break;
       }
 
@@ -1071,7 +1071,7 @@
         SelectClipPath( hdc, (INT)lpSelectClipPath->iMode );
         break;
       }
- 
+
     case EMR_ABORTPATH:
       {
         AbortPath( hdc );
@@ -1081,15 +1081,15 @@
     case EMR_CREATECOLORSPACE:
       {
         PEMRCREATECOLORSPACE lpCreateColorSpace = (PEMRCREATECOLORSPACE)mr;
-        (handletable->objectHandle)[lpCreateColorSpace->ihCS] = 
-           CreateColorSpaceA( &lpCreateColorSpace->lcs ); 
+        (handletable->objectHandle)[lpCreateColorSpace->ihCS] =
+           CreateColorSpaceA( &lpCreateColorSpace->lcs );
         break;
       }
 
     case EMR_SETCOLORSPACE:
       {
-        PEMRSETCOLORSPACE lpSetColorSpace = (PEMRSETCOLORSPACE)mr; 
-        SetColorSpace( hdc, 
+        PEMRSETCOLORSPACE lpSetColorSpace = (PEMRSETCOLORSPACE)mr;
+        SetColorSpace( hdc,
                        (handletable->objectHandle)[lpSetColorSpace->ihCS] );
         break;
       }
@@ -1098,7 +1098,7 @@
       {
         PEMRDELETECOLORSPACE lpDeleteColorSpace = (PEMRDELETECOLORSPACE)mr;
         DeleteColorSpace( (handletable->objectHandle)[lpDeleteColorSpace->ihCS] );
-        break; 
+        break;
       }
 
     case EMR_SETICMMODE:
@@ -1108,26 +1108,26 @@
         break;
       }
 
-    case EMR_PIXELFORMAT: 
+    case EMR_PIXELFORMAT:
       {
         INT iPixelFormat;
         PEMRPIXELFORMAT lpPixelFormat = (PEMRPIXELFORMAT)mr;
 
         iPixelFormat = ChoosePixelFormat( hdc, &lpPixelFormat->pfd );
-        SetPixelFormat( hdc, iPixelFormat, &lpPixelFormat->pfd ); 
-         
+        SetPixelFormat( hdc, iPixelFormat, &lpPixelFormat->pfd );
+
         break;
       }
 
-    case EMR_SETPALETTEENTRIES:  
+    case EMR_SETPALETTEENTRIES:
       {
         PEMRSETPALETTEENTRIES lpSetPaletteEntries = (PEMRSETPALETTEENTRIES)mr;
 
         SetPaletteEntries( (handletable->objectHandle)[lpSetPaletteEntries->ihPal],
                            (UINT)lpSetPaletteEntries->iStart,
                            (UINT)lpSetPaletteEntries->cEntries,
-                           lpSetPaletteEntries->aPalEntries ); 
-                           
+                           lpSetPaletteEntries->aPalEntries );
+
         break;
       }
 
@@ -1146,22 +1146,22 @@
         PEMRCREATEDIBPATTERNBRUSHPT lpCreate = (PEMRCREATEDIBPATTERNBRUSHPT)mr;
 
         /* This is a BITMAPINFO struct followed directly by bitmap bits */
-        LPVOID lpPackedStruct = HeapAlloc( GetProcessHeap(), 
-                                           0, 
+        LPVOID lpPackedStruct = HeapAlloc( GetProcessHeap(),
+                                           0,
                                            lpCreate->cbBmi + lpCreate->cbBits );
         /* Now pack this structure */
-        memcpy( lpPackedStruct, 
+        memcpy( lpPackedStruct,
                 ((BYTE*)lpCreate) + lpCreate->offBmi,
-                lpCreate->cbBmi ); 
+                lpCreate->cbBmi );
         memcpy( ((BYTE*)lpPackedStruct) + lpCreate->cbBmi,
                 ((BYTE*)lpCreate) + lpCreate->offBits,
                 lpCreate->cbBits );
 
-        (handletable->objectHandle)[lpCreate->ihBrush] = 
+        (handletable->objectHandle)[lpCreate->ihBrush] =
            CreateDIBPatternBrushPt( lpPackedStruct,
-                                    (UINT)lpCreate->iUsage ); 
+                                    (UINT)lpCreate->iUsage );
 
-        break; 
+        break;
       }
 
     case EMR_CREATEMONOBRUSH:
@@ -1490,7 +1490,7 @@
     case EMR_GLSRECORD:
     case EMR_GLSBOUNDEDRECORD:
     default:
-      /* From docs: If PlayEnhMetaFileRecord doesn't recognize a 
+      /* From docs: If PlayEnhMetaFileRecord doesn't recognize a
                     record then ignore and return TRUE. */
       FIXME("type %d is unimplemented\n", type);
       break;
@@ -1505,7 +1505,7 @@
  *
  *  Walk an enhanced metafile, calling a user-specified function _EnhMetaFunc_
  *  for each
- *  record. Returns when either every record has been used or 
+ *  record. Returns when either every record has been used or
  *  when _EnhMetaFunc_ returns FALSE.
  *
  *
@@ -1516,10 +1516,10 @@
  * BUGS
  *   Ignores rect.
  */
-BOOL WINAPI EnumEnhMetaFile( 
+BOOL WINAPI EnumEnhMetaFile(
      HDC hdc,                /* [in] device context to pass to _EnhMetaFunc_ */
      HENHMETAFILE hmf,       /* [in] EMF to walk */
-     ENHMFENUMPROC callback, /* [in] callback function */ 
+     ENHMFENUMPROC callback, /* [in] callback function */
      LPVOID data,            /* [in] optional data for callback function */
      const RECT *lpRect      /* [in] bounding rectangle for rendered metafile */
     )
@@ -1633,7 +1633,7 @@
 {
     return PlayEnhMetaFileRecord(hdc, ht, emr, handles);
 }
-						
+
 /**************************************************************************
  *    PlayEnhMetaFile  (GDI32.@)
  *
@@ -1641,7 +1641,7 @@
  *    in device context hdc.
  *
  */
-BOOL WINAPI PlayEnhMetaFile( 
+BOOL WINAPI PlayEnhMetaFile(
        HDC hdc,           /* [in] DC to render into */
        HENHMETAFILE hmf,  /* [in] metafile to render */
        const RECT *lpRect /* [in] rectangle to place metafile inside */
@@ -1664,10 +1664,10 @@
 /*****************************************************************************
  *  CopyEnhMetaFileA (GDI32.@)  Duplicate an enhanced metafile
  *
- *   
+ *
  */
 HENHMETAFILE WINAPI CopyEnhMetaFileA(
-    HENHMETAFILE hmfSrc, 
+    HENHMETAFILE hmfSrc,
     LPCSTR file)
 {
     ENHMETAHEADER *emrSrc = EMF_GetEnhMetaHeader( hmfSrc ), *emrDst;
@@ -1697,10 +1697,10 @@
    LPPALETTEENTRY lpPe;
 } EMF_PaletteCopy;
 
-/***************************************************************  
+/***************************************************************
  * Find the EMR_EOF record and then use it to find the
- * palette entries for this enhanced metafile. 
- * The lpData is actually a pointer to a EMF_PaletteCopy struct  
+ * palette entries for this enhanced metafile.
+ * The lpData is actually a pointer to a EMF_PaletteCopy struct
  * which contains the max number of elements to copy and where
  * to copy them to.
  *
@@ -1712,7 +1712,7 @@
                                INT c,
                                LPVOID lpData )
 {
- 
+
   if ( lpEMR->iType == EMR_EOF )
   {
     PEMREOF lpEof = (PEMREOF)lpEMR;
@@ -1721,25 +1721,25 @@
 
     TRACE( "copying 0x%08lx palettes\n", dwNumPalToCopy );
 
-    memcpy( (LPVOID)info->lpPe, 
-            (LPVOID)(((LPSTR)lpEof) + lpEof->offPalEntries), 
+    memcpy( (LPVOID)info->lpPe,
+            (LPVOID)(((LPSTR)lpEof) + lpEof->offPalEntries),
             sizeof( *(info->lpPe) ) * dwNumPalToCopy );
 
     /* Update the passed data as a return code */
     info->lpPe     = NULL; /* Palettes were copied! */
-    info->cEntries = (UINT)dwNumPalToCopy;  
+    info->cEntries = (UINT)dwNumPalToCopy;
 
     return FALSE; /* That's all we need */
   }
-  
+
   return TRUE;
 }
 
 /*****************************************************************************
- *  GetEnhMetaFilePaletteEntries (GDI32.@)  
- * 
- *  Copy the palette and report size  
- * 
+ *  GetEnhMetaFilePaletteEntries (GDI32.@)
+ *
+ *  Copy the palette and report size
+ *
  *  BUGS: Error codes (SetLastError) are not set on failures
  */
 UINT WINAPI GetEnhMetaFilePaletteEntries( HENHMETAFILE hEmf,
@@ -1747,9 +1747,9 @@
 					  LPPALETTEENTRY lpPe )
 {
   ENHMETAHEADER* enhHeader = EMF_GetEnhMetaHeader( hEmf );
-  EMF_PaletteCopy infoForCallBack; 
+  EMF_PaletteCopy infoForCallBack;
 
-  TRACE( "(%04x,%d,%p)\n", hEmf, cEntries, lpPe ); 
+  TRACE( "(%04x,%d,%p)\n", hEmf, cEntries, lpPe );
 
   /* First check if there are any palettes associated with
      this metafile. */
@@ -1760,9 +1760,9 @@
 
   /* Copy cEntries worth of PALETTEENTRY structs into the buffer */
   infoForCallBack.cEntries = cEntries;
-  infoForCallBack.lpPe     = lpPe; 
+  infoForCallBack.lpPe     = lpPe;
 
-  if ( !EnumEnhMetaFile( 0, hEmf, cbEnhPaletteCopy, 
+  if ( !EnumEnhMetaFile( 0, hEmf, cbEnhPaletteCopy,
                          &infoForCallBack, NULL ) )
       return GDI_ERROR;
 
@@ -1779,7 +1779,7 @@
 
 /******************************************************************
  *         SetWinMetaFileBits   (GDI32.@)
- *      
+ *
  *         Translate from old style to new style.
  *
  * BUGS: - This doesn't take the DC and scaling into account
@@ -1790,7 +1790,7 @@
 					   CONST BYTE *lpbBuffer,
 					   HDC hdcRef,
 					   CONST METAFILEPICT *lpmfp
-					   ) 
+					   )
 {
      HENHMETAFILE    hMf;
      LPVOID          lpNewEnhMetaFileBuffer = NULL;
@@ -1802,15 +1802,15 @@
      /* 1. Get the header - skip over this and get straight to the records  */
 
      uNewEnhMetaFileBufferSize = sizeof( ENHMETAHEADER );
-     lpNewEnhMetaFileBuffer = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, 
+     lpNewEnhMetaFileBuffer = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY,
                                          uNewEnhMetaFileBufferSize );
 
      if( lpNewEnhMetaFileBuffer == NULL )
      {
-       goto error; 
+       goto error;
      }
 
-     /* Fill in the header record */ 
+     /* Fill in the header record */
      {
        LPENHMETAHEADER lpNewEnhMetaFileHeader = (LPENHMETAHEADER)lpNewEnhMetaFileBuffer;
 
@@ -1840,7 +1840,7 @@
 
         lpNewEnhMetaFileHeader->nHandles = 0; /* No handles yet */
         lpNewEnhMetaFileHeader->nRecords = 0;
-        
+
         /* I am pretty sure this starts at 0 and grows as entries are added */
         lpNewEnhMetaFileHeader->nPalEntries = 0;
 
@@ -1858,13 +1858,13 @@
        /* cbPixelFormat
           offPixelFormat,
           bOpenGL */
-     } 
+     }
 
-     (char*)lpbBuffer += ((METAHEADER*)lpbBuffer)->mtHeaderSize * 2; /* Point past the header - FIXME: metafile quirk? */ 
+     (char*)lpbBuffer += ((METAHEADER*)lpbBuffer)->mtHeaderSize * 2; /* Point past the header - FIXME: metafile quirk? */
 
      /* 2. Enum over individual records and convert them to the new type of records */
      while( !bFoundEOF )
-     { 
+     {
 
         LPMETARECORD lpMetaRecord = (LPMETARECORD)lpbBuffer;
 
@@ -1882,18 +1882,18 @@
 
         switch( lpMetaRecord->rdFunction )
         {
-          case META_EOF:  
-          { 
+          case META_EOF:
+          {
              PEMREOF lpRecord;
              size_t uRecord = sizeof(*lpRecord);
 
              EMF_ReAllocAndAdjustPointers(PEMREOF,uRecord);
-              
+
              /* Fill the new record - FIXME: This is not right */
-             lpRecord->emr.iType = EMR_EOF; 
+             lpRecord->emr.iType = EMR_EOF;
              lpRecord->emr.nSize = sizeof( *lpRecord );
              lpRecord->nPalEntries = 0;     /* FIXME */
-             lpRecord->offPalEntries = 0;   /* FIXME */ 
+             lpRecord->offPalEntries = 0;   /* FIXME */
              lpRecord->nSizeLast = 0;       /* FIXME */
 
              /* No more records after this one */
@@ -1904,7 +1904,7 @@
           }
 
           case META_SETMAPMODE:
-          {  
+          {
              PEMRSETMAPMODE lpRecord;
              size_t uRecord = sizeof(*lpRecord);
 
@@ -1919,7 +1919,7 @@
           }
 
           case META_DELETEOBJECT: /* Select and Delete structures are the same */
-          case META_SELECTOBJECT: 
+          case META_SELECTOBJECT:
           {
             PEMRDELETEOBJECT lpRecord;
             size_t uRecord = sizeof(*lpRecord);
@@ -1943,7 +1943,7 @@
 
           case META_POLYGON: /* This is just plain busted. I don't know what I'm doing */
           {
-             PEMRPOLYGON16 lpRecord; /* FIXME: Should it be a poly or poly16? */  
+             PEMRPOLYGON16 lpRecord; /* FIXME: Should it be a poly or poly16? */
              size_t uRecord = sizeof(*lpRecord);
 
              EMF_ReAllocAndAdjustPointers(PEMRPOLYGON16,uRecord);
@@ -1977,7 +1977,7 @@
              lpRecord->emr.nSize = sizeof( *lpRecord );
 
              lpRecord->iMode = lpMetaRecord->rdParm[0];
-             
+
              break;
           }
 
@@ -2032,10 +2032,10 @@
              lpRecord->emr.nSize = sizeof( *lpRecord );
 
              lpRecord->ihBrush    = ((LPENHMETAHEADER)lpNewEnhMetaFileBuffer)->nHandles;
-             lpRecord->lb.lbStyle = ((LPLOGBRUSH16)lpMetaRecord->rdParm)->lbStyle; 
-             lpRecord->lb.lbColor = ((LPLOGBRUSH16)lpMetaRecord->rdParm)->lbColor; 
-             lpRecord->lb.lbHatch = ((LPLOGBRUSH16)lpMetaRecord->rdParm)->lbHatch; 
-             
+             lpRecord->lb.lbStyle = ((LPLOGBRUSH16)lpMetaRecord->rdParm)->lbStyle;
+             lpRecord->lb.lbColor = ((LPLOGBRUSH16)lpMetaRecord->rdParm)->lbColor;
+             lpRecord->lb.lbHatch = ((LPLOGBRUSH16)lpMetaRecord->rdParm)->lbHatch;
+
              ((LPENHMETAHEADER)lpNewEnhMetaFileBuffer)->nHandles += 1; /* New handle */
 
              break;
@@ -2116,7 +2116,7 @@
           case META_TEXTOUT:
           case META_POLYPOLYGON:
           case META_POLYLINE:
-          case META_RESTOREDC:  
+          case META_RESTOREDC:
           case META_CHORD:
           case META_CREATEPATTERNBRUSH:
           case META_CREATEPENINDIRECT:
@@ -2156,7 +2156,7 @@
           case META_ENDDOC:
           case META_CREATEBRUSH:
           case META_CREATEBITMAPINDIRECT:
-          case META_CREATEBITMAP:    
+          case META_CREATEBITMAP:
           /* Fall through to unimplemented */
           default:
           {
@@ -2167,16 +2167,16 @@
        }
 
        /* Move to the next record */
-       (char*)lpbBuffer += ((LPMETARECORD)lpbBuffer)->rdSize * 2; /* FIXME: Seem to be doing this in metafile.c */ 
+       (char*)lpbBuffer += ((LPMETARECORD)lpbBuffer)->rdSize * 2; /* FIXME: Seem to be doing this in metafile.c */
 
 #undef ReAllocAndAdjustPointers
-     } 
+     }
 
      /* We know the last of the header information now */
      ((LPENHMETAHEADER)lpNewEnhMetaFileBuffer)->nBytes = uNewEnhMetaFileBufferSize;
 
      /* Create the enhanced metafile */
-     hMf = SetEnhMetaFileBits( uNewEnhMetaFileBufferSize, (const BYTE*)lpNewEnhMetaFileBuffer ); 
+     hMf = SetEnhMetaFileBits( uNewEnhMetaFileBufferSize, (const BYTE*)lpNewEnhMetaFileBuffer );
 
      if( !hMf )
        ERR( "Problem creating metafile. Did the conversion fail somewhere?\n" );
@@ -2185,9 +2185,9 @@
 
 error:
      /* Free the data associated with our copy since it's been copied */
-     HeapFree( GetProcessHeap(), 0, lpNewEnhMetaFileBuffer ); 
+     HeapFree( GetProcessHeap(), 0, lpNewEnhMetaFileBuffer );
 
-     return 0;  
+     return 0;
 }
 
 
diff --git a/objects/font.c b/objects/font.c
index e26bdaa..096b10a 100644
--- a/objects/font.c
+++ b/objects/font.c
@@ -76,7 +76,7 @@
   DC                 *dc;
   PHYSDEV             physDev;
 } fontEnum32;
- 
+
 /*
  *  For TranslateCharsetInfo
  */
@@ -107,7 +107,7 @@
   { GB2312_CHARSET, 936, FS(18)},
   { HANGEUL_CHARSET, 949, FS(19)},
   { CHINESEBIG5_CHARSET, 950, FS(20)},
-  { JOHAB_CHARSET, 1361, FS(21)}, 
+  { JOHAB_CHARSET, 1361, FS(21)},
   /* reserved for alternate ANSI and OEM */
   { DEFAULT_CHARSET, 0, FS(0)},
   { DEFAULT_CHARSET, 0, FS(0)},
@@ -493,7 +493,7 @@
 	    memcpy( &fontPtr->logfont, plf, sizeof(LOGFONTW) );
 
 	    TRACE("(%ld %ld %ld %ld %x) %s %s %s => %04x\n",
-                  plf->lfHeight, plf->lfWidth, 
+                  plf->lfHeight, plf->lfWidth,
                   plf->lfEscapement, plf->lfOrientation,
                   plf->lfPitchAndFamily,
                   debugstr_w(plf->lfFaceName),
@@ -504,7 +504,7 @@
 	      /* this should really depend on whether GM_ADVANCED is set */
 	      fontPtr->logfont.lfOrientation = fontPtr->logfont.lfEscapement;
 	      WARN("orientation angle %f set to "
-                   "escapement angle %f for new font %04x\n", 
+                   "escapement angle %f for new font %04x\n",
                    plf->lfOrientation/10., plf->lfEscapement/10., hFont);
 	    }
 	    GDI_ReleaseObj( hFont );
@@ -539,10 +539,10 @@
     logfont.lfClipPrecision = clippres;
     logfont.lfQuality = quality;
     logfont.lfPitchAndFamily = pitch;
-   
-    if (name) 
+
+    if (name)
 	lstrcpynA(logfont.lfFaceName,name,sizeof(logfont.lfFaceName));
-    else 
+    else
 	logfont.lfFaceName[0] = '\0';
 
     return CreateFontIndirect16( &logfont );
@@ -572,10 +572,10 @@
     logfont.lfClipPrecision = clippres;
     logfont.lfQuality = quality;
     logfont.lfPitchAndFamily = pitch;
-   
-    if (name) 
+
+    if (name)
 	lstrcpynA(logfont.lfFaceName,name,sizeof(logfont.lfFaceName));
-    else 
+    else
 	logfont.lfFaceName[0] = '\0';
 
     return CreateFontIndirectA( &logfont );
@@ -605,11 +605,11 @@
     logfont.lfClipPrecision = clippres;
     logfont.lfQuality = quality;
     logfont.lfPitchAndFamily = pitch;
-   
-    if (name) 
-	lstrcpynW(logfont.lfFaceName, name, 
+
+    if (name)
+	lstrcpynW(logfont.lfFaceName, name,
 		  sizeof(logfont.lfFaceName) / sizeof(WCHAR));
-    else 
+    else
 	logfont.lfFaceName[0] = '\0';
 
     return CreateFontIndirectW( &logfont );
@@ -721,7 +721,7 @@
     INT ret = 1;
     DC *dc;
 
-    if( pfe->lpLogFontParam->lfCharSet == DEFAULT_CHARSET || 
+    if( pfe->lpLogFontParam->lfCharSet == DEFAULT_CHARSET ||
 	pfe->lpLogFontParam->lfCharSet == plf->elfLogFont.lfCharSet )
     {
         FONT_EnumLogFontExWTo16(plf, pfe->lpLogFont);
@@ -753,7 +753,7 @@
     DC *dc;
 
     /* lfCharSet is at the same offset in both LOGFONTA and LOGFONTW */
-    if( pfe->lpLogFontParam->lfCharSet == DEFAULT_CHARSET || 
+    if( pfe->lpLogFontParam->lfCharSet == DEFAULT_CHARSET ||
 	pfe->lpLogFontParam->lfCharSet == plf->elfLogFont.lfCharSet )
     {
 	/* convert font metrics */
@@ -828,7 +828,7 @@
  *		FONT_EnumFontFamiliesEx
  */
 static INT FONT_EnumFontFamiliesEx( HDC hDC, LPLOGFONTW plf,
-				    FONTENUMPROCEXW efproc, 
+				    FONTENUMPROCEXW efproc,
 				    LPARAM lParam, DWORD dwUnicode)
 {
     INT ret = 1, ret2;
@@ -873,7 +873,7 @@
  *              EnumFontFamiliesExW	(GDI32.@)
  */
 INT WINAPI EnumFontFamiliesExW( HDC hDC, LPLOGFONTW plf,
-                                    FONTENUMPROCEXW efproc, 
+                                    FONTENUMPROCEXW efproc,
                                     LPARAM lParam, DWORD dwFlags )
 {
     return  FONT_EnumFontFamiliesEx( hDC, plf, efproc, lParam, ENUM_UNICODE );
@@ -883,7 +883,7 @@
  *              EnumFontFamiliesExA	(GDI32.@)
  */
 INT WINAPI EnumFontFamiliesExA( HDC hDC, LPLOGFONTA plf,
-                                    FONTENUMPROCEXA efproc, 
+                                    FONTENUMPROCEXA efproc,
                                     LPARAM lParam, DWORD dwFlags)
 {
     LOGFONTW lfW;
@@ -1077,7 +1077,7 @@
     INT res = GetTextFaceW(hdc, 0, NULL);
     LPWSTR nameW = HeapAlloc( GetProcessHeap(), 0, res * 2 );
     GetTextFaceW( hdc, res, nameW );
-    
+
     if (name)
         res = WideCharToMultiByte( CP_ACP, 0, nameW, -1, name, count,
 				   NULL, NULL);
@@ -1285,7 +1285,7 @@
  * - kerning? see below
  *
  * Kerning.  Since kerning would be carried out by the rendering code it should
- * be done by the driver.  However they don't support it yet.  Also I am not 
+ * be done by the driver.  However they don't support it yet.  Also I am not
  * yet persuaded that (certainly under Win95) any kerning is actually done.
  *
  * str: According to MSDN this should be null-terminated.  That is not true; a
@@ -1392,7 +1392,7 @@
 #define HDPTOLP(y) ((y<0)?					\
 		(-abs((y)*dc->wndExtY/dc->vportExtY)):		\
 		(abs((y)*dc->wndExtY/dc->vportExtY)))
-	
+
     metrics->tmHeight           = HDPTOLP(metrics->tmHeight);
     metrics->tmAscent           = HDPTOLP(metrics->tmAscent);
     metrics->tmDescent          = HDPTOLP(metrics->tmDescent);
@@ -1478,19 +1478,19 @@
     needed = sizeof(OUTLINETEXTMETRICA);
     if(lpOTMW->otmpFamilyName)
         needed += WideCharToMultiByte(CP_ACP, 0,
-	   (WCHAR*)((char*)lpOTMW + (ptrdiff_t)lpOTMW->otmpFamilyName), -1, 
+	   (WCHAR*)((char*)lpOTMW + (ptrdiff_t)lpOTMW->otmpFamilyName), -1,
 				      NULL, 0, NULL, NULL);
     if(lpOTMW->otmpFaceName)
         needed += WideCharToMultiByte(CP_ACP, 0,
-	   (WCHAR*)((char*)lpOTMW + (ptrdiff_t)lpOTMW->otmpFaceName), -1, 
+	   (WCHAR*)((char*)lpOTMW + (ptrdiff_t)lpOTMW->otmpFaceName), -1,
 				      NULL, 0, NULL, NULL);
     if(lpOTMW->otmpStyleName)
         needed += WideCharToMultiByte(CP_ACP, 0,
-	   (WCHAR*)((char*)lpOTMW + (ptrdiff_t)lpOTMW->otmpStyleName), -1, 
+	   (WCHAR*)((char*)lpOTMW + (ptrdiff_t)lpOTMW->otmpStyleName), -1,
 				      NULL, 0, NULL, NULL);
     if(lpOTMW->otmpFullName)
         needed += WideCharToMultiByte(CP_ACP, 0,
-	   (WCHAR*)((char*)lpOTMW + (ptrdiff_t)lpOTMW->otmpFullName), -1, 
+	   (WCHAR*)((char*)lpOTMW + (ptrdiff_t)lpOTMW->otmpFullName), -1,
 				      NULL, 0, NULL, NULL);
 
     if(!lpOTM) {
@@ -1540,7 +1540,7 @@
     if(lpOTMW->otmpFamilyName) {
         lpOTM->otmpFamilyName = (LPSTR)(ptr - (char*)lpOTM);
 	len = WideCharToMultiByte(CP_ACP, 0,
-	     (WCHAR*)((char*)lpOTMW + (ptrdiff_t)lpOTMW->otmpFamilyName), -1, 
+	     (WCHAR*)((char*)lpOTMW + (ptrdiff_t)lpOTMW->otmpFamilyName), -1,
 				  ptr, left, NULL, NULL);
 	left -= len;
 	ptr += len;
@@ -1550,7 +1550,7 @@
     if(lpOTMW->otmpFaceName) {
         lpOTM->otmpFaceName = (LPSTR)(ptr - (char*)lpOTM);
 	len = WideCharToMultiByte(CP_ACP, 0,
-	     (WCHAR*)((char*)lpOTMW + (ptrdiff_t)lpOTMW->otmpFaceName), -1, 
+	     (WCHAR*)((char*)lpOTMW + (ptrdiff_t)lpOTMW->otmpFaceName), -1,
 				  ptr, left, NULL, NULL);
 	left -= len;
 	ptr += len;
@@ -1560,7 +1560,7 @@
     if(lpOTMW->otmpStyleName) {
         lpOTM->otmpStyleName = (LPSTR)(ptr - (char*)lpOTM);
 	len = WideCharToMultiByte(CP_ACP, 0,
-	     (WCHAR*)((char*)lpOTMW + (ptrdiff_t)lpOTMW->otmpStyleName), -1, 
+	     (WCHAR*)((char*)lpOTMW + (ptrdiff_t)lpOTMW->otmpStyleName), -1,
 				  ptr, left, NULL, NULL);
 	left -= len;
 	ptr += len;
@@ -1570,14 +1570,14 @@
     if(lpOTMW->otmpFullName) {
         lpOTM->otmpFullName = (LPSTR)(ptr - (char*)lpOTM);
 	len = WideCharToMultiByte(CP_ACP, 0,
-	     (WCHAR*)((char*)lpOTMW + (ptrdiff_t)lpOTMW->otmpFullName), -1, 
+	     (WCHAR*)((char*)lpOTMW + (ptrdiff_t)lpOTMW->otmpFullName), -1,
 				  ptr, left, NULL, NULL);
 	left -= len;
     } else
         lpOTM->otmpFullName = 0;
-    
+
     assert(left == 0);
-    
+
     ret = needed;
 
 end:
@@ -1708,7 +1708,7 @@
     BOOL ret = TRUE;
 
     if(count <= 0) return FALSE;
-    
+
     str = HeapAlloc(GetProcessHeap(), 0, count);
     for(i = 0; i < count; i++)
 	str[i] = (BYTE)(firstChar + i);
@@ -1733,7 +1733,7 @@
 
 
 /* FIXME: all following APIs ******************************************/
- 
+
 
 /***********************************************************************
  *           SetMapperFlags    (GDI.349)
@@ -1750,7 +1750,7 @@
 DWORD WINAPI SetMapperFlags( HDC hDC, DWORD dwFlag )
 {
     DC *dc = DC_GetDCPtr( hDC );
-    DWORD ret = 0; 
+    DWORD ret = 0;
     if(!dc) return 0;
     if(dc->funcs->pSetMapperFlags)
         ret = dc->funcs->pSetMapperFlags( dc->physDev, dwFlag );
@@ -1814,7 +1814,7 @@
     BOOL ret = TRUE;
 
     if(count <= 0) return FALSE;
-    
+
     str = HeapAlloc(GetProcessHeap(), 0, count);
     for(i = 0; i < count; i++)
 	str[i] = (BYTE)(firstChar + i);
@@ -2012,7 +2012,7 @@
     int i;
     FIXME("(%x,%d,%p): almost empty stub!\n", hDC, cPairs, lpKerningPairs);
     if (lpKerningPairs)
-        for (i = 0; i < cPairs; i++) 
+        for (i = 0; i < cPairs; i++)
             lpKerningPairs[i].iKernAmount = 0;
  /* FIXME: Should this function call SetLastError (0)?  This is yet another
   * Microsoft function that can return 0 on success or failure
@@ -2030,7 +2030,7 @@
 {
     int i;
     FIXME("(%x,%ld,%p): almost empty stub!\n", hDC, cPairs, lpKerningPairs);
-    for (i = 0; i < cPairs; i++) 
+    for (i = 0; i < cPairs; i++)
         lpKerningPairs[i].iKernAmount = 0;
     return 0;
 }
@@ -2051,7 +2051,7 @@
  *
  * Fills a CHARSETINFO structure for a character set, code page, or
  * font. This allows making the correspondance between different labelings
- * (character set, Windows, ANSI, and OEM codepages, and Unicode ranges) 
+ * (character set, Windows, ANSI, and OEM codepages, and Unicode ranges)
  * of the same encoding.
  *
  * Only one codepage will be set in lpCs->fs. If TCI_SRCFONTSIG is used,
@@ -2112,15 +2112,15 @@
  *
  * RETURNS
  *
- * success: Number of bytes returned 
+ * success: Number of bytes returned
  * failure: GDI_ERROR
  *
  * NOTES
  *
- * Calls SetLastError()  
+ * Calls SetLastError()
  *
  */
-DWORD WINAPI GetFontData(HDC hdc, DWORD table, DWORD offset, 
+DWORD WINAPI GetFontData(HDC hdc, DWORD table, DWORD offset,
     LPVOID buffer, DWORD length)
 {
     DC *dc = DC_GetDCPtr(hdc);
@@ -2274,7 +2274,7 @@
     {
       int c;
       for (i = 0; i < nSet; i++)
-      { 
+      {
         if (GetCharWidth32W(hdc, lpString[i], lpString[i], &c))
           lpResults->lpDx[i]= c;
       }
@@ -2328,7 +2328,7 @@
        FIXME_(gdi)("GetCharWidthFloatW, stub\n");
        return 0;
 }
- 
+
 
 /***********************************************************************
  *								       *
@@ -2344,8 +2344,8 @@
  * 	   fixup dfPoints if all metrics are identical, otherwise create
  *	   new fontAlias. When soft font support is ready this will
  *	   simply create a new fontResource ('filename' will go into
- *	   the pfr->resource field) with FR_SOFTFONT/FR_SOFTRESOURCE 
- *	   flag set. 
+ *	   the pfr->resource field) with FR_SOFTFONT/FR_SOFTRESOURCE
+ *	   flag set.
  */
 INT16 WINAPI AddFontResource16( LPCSTR filename )
 {
diff --git a/objects/gdiobj.c b/objects/gdiobj.c
index 45fcf9e..7e8b30f 100644
--- a/objects/gdiobj.c
+++ b/objects/gdiobj.c
@@ -44,7 +44,7 @@
 /* ### stop build ### */
 
 /***********************************************************************
- *          GDI stock objects 
+ *          GDI stock objects
  */
 
 static const LOGBRUSH WhiteBrush = { BS_SOLID, RGB(255,255,255), 0 };
@@ -688,7 +688,7 @@
     case METAFILE_DC_MAGIC:
     case ENHMETAFILE_MAGIC:
     case ENHMETAFILE_DC_MAGIC:
-    case BITMAP_MAGIC:   
+    case BITMAP_MAGIC:
         if (!(obj = alloc_large_heap( size, handle ))) goto error;
         break;
     default:
@@ -734,7 +734,7 @@
     assert( new_handle == handle );  /* moveable handle cannot change */
     return LOCAL_Lock( GDI_HeapSel, handle );
 }
- 
+
 
 /***********************************************************************
  *           GDI_FreeObject
@@ -983,16 +983,16 @@
     TRACE("%08x\n", handle );
 
     if (!(ptr = GDI_GetObjPtr( handle, MAGIC_DONTCARE ))) return 0;
-    
+
     switch(GDIMAGIC(ptr->wMagic))
     {
       case PEN_MAGIC:
 	  result = OBJ_PEN;
 	  break;
-      case BRUSH_MAGIC: 
+      case BRUSH_MAGIC:
 	  result = OBJ_BRUSH;
 	  break;
-      case BITMAP_MAGIC: 
+      case BITMAP_MAGIC:
 	  result = OBJ_BITMAP;
 	  break;
       case FONT_MAGIC:
@@ -1038,7 +1038,7 @@
     HANDLE ret = 0;
     DC * dc = DC_GetDCPtr( hdc );
 
-    if (dc) 
+    if (dc)
     {
     switch (type) {
 	case OBJ_PEN:	 ret = dc->hPen; break;
@@ -1134,7 +1134,7 @@
 RGB(0x80,0x00,0x80), RGB(0x00,0x80,0x80),
 RGB(0x80,0x80,0x80), RGB(0xc0,0xc0,0xc0)
 };
-    
+
 /***********************************************************************
  *           EnumObjects    (GDI.71)
  */
@@ -1266,7 +1266,7 @@
 
 /***********************************************************************
  *           IsGDIObject    (GDI.462)
- * 
+ *
  * returns type of object if valid (W95 system programming secrets p. 264-5)
  */
 BOOL16 WINAPI IsGDIObject16( HGDIOBJ16 handle )
@@ -1418,7 +1418,7 @@
  *           MulDiv   (GDI.128)
  */
 INT16 WINAPI MulDiv16(
-	     INT16 nMultiplicand, 
+	     INT16 nMultiplicand,
 	     INT16 nMultiplier,
 	     INT16 nDivisor)
 {
@@ -1430,7 +1430,7 @@
       nMultiplicand = - nMultiplicand;
       nDivisor = -nDivisor;
     }
-    /* If the result is positive, we "add" to round. else, 
+    /* If the result is positive, we "add" to round. else,
      * we subtract to round. */
     if ( ( (nMultiplicand <  0) && (nMultiplier <  0) ) ||
 	 ( (nMultiplicand >= 0) && (nMultiplier >= 0) ) )
@@ -1495,4 +1495,4 @@
         FIXME("SetColorAdjustment, stub\n");
         return 0;
 }
- 
+
diff --git a/objects/metafile.c b/objects/metafile.c
index 2953e98..cc9b6d3 100644
--- a/objects/metafile.c
+++ b/objects/metafile.c
@@ -24,7 +24,7 @@
  * that touches a HMETAFILE.
  * For recording of metafiles look in graphics/metafiledrv/
  *
- * Note that (32 bit) HMETAFILEs are GDI objects, while HMETAFILE16s are 
+ * Note that (32 bit) HMETAFILEs are GDI objects, while HMETAFILE16s are
  * global memory handles so these cannot be interchanged.
  *
  * Memory-based metafiles are just stored as a continuous block of memory with
@@ -41,7 +41,7 @@
  * the file (METAHEADERDISK). I've copied this for 16bit compatibility.
  *
  * HDMD - 14/4/1999
- */  
+ */
 
 #include "config.h"
 
@@ -243,7 +243,7 @@
 {
     METAHEADER *mh;
     HANDLE hFile;
- 
+
     TRACE("%s\n", lpFilename);
 
     if(!lpFilename)
@@ -268,7 +268,7 @@
 {
     METAHEADER *mh;
     HANDLE hFile;
- 
+
     TRACE("%s\n", lpFilename);
 
     if(!lpFilename)
@@ -293,7 +293,7 @@
 {
     METAHEADER *mh;
     HANDLE hFile;
- 
+
     TRACE("%s\n", debugstr_w(lpFilename));
 
     if(!lpFilename)
@@ -341,7 +341,7 @@
  *         MF_CreateMetaHeaderDisk
  *
  * Take a memory based METAHEADER and change it to a disk based METAHEADER
- * assosiated with filename.  Note: Trashes contents of old one. 
+ * assosiated with filename.  Note: Trashes contents of old one.
  */
 METAHEADER *MF_CreateMetaHeaderDisk(METAHEADER *mh, LPCSTR filename)
 {
@@ -367,9 +367,9 @@
     HANDLE hFile;
 
     TRACE("(%08x,%s)\n", hSrcMetaFile, lpFilename);
-    
+
     if(!mh) return 0;
-    
+
     if(mh->mtType == METAFILE_DISK)
         mh2 = MF_LoadDiskBasedMetaFile(mh);
     else {
@@ -417,9 +417,9 @@
     HANDLE hFile;
 
     TRACE("(%08x,%s)\n", hSrcMetaFile, lpFilename);
-    
+
     if(!mh) return 0;
-    
+
     if(mh->mtType == METAFILE_DISK)
         mh2 = MF_LoadDiskBasedMetaFile(mh);
     else {
@@ -481,14 +481,14 @@
     BOOL16 res=FALSE;
     METAHEADER *mh = MF_GetMetaHeader16(hmf);
     if (mh) {
-        if (mh->mtType == METAFILE_MEMORY || mh->mtType == METAFILE_DISK) 
+        if (mh->mtType == METAFILE_MEMORY || mh->mtType == METAFILE_DISK)
 	    if (mh->mtHeaderSize == MFHEADERSIZE/sizeof(INT16))
 	        if (mh->mtVersion == MFVERSION)
 		    res=TRUE;
 	MF_ReleaseMetaHeader16(hmf);
     }
     TRACE("IsValidMetaFile %x => %d\n",hmf,res);
-    return res;         
+    return res;
 }
 
 
@@ -525,7 +525,7 @@
     ht = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY,
 		    sizeof(HANDLETABLE16) * mh->mtNoObjects);
     if(!ht) return FALSE;
-    
+
     /* loop through metafile playing records */
     offset = mh->mtHeaderSize * 2;
     while (offset < mh->mtSize * 2)
@@ -551,7 +551,7 @@
     for(i = 0; i < mh->mtNoObjects; i++)
       if(*(ht->objectHandle + i) != 0)
         DeleteObject(*(ht->objectHandle + i));
-    
+
     /* free handle table */
     HeapFree( GetProcessHeap(), 0, ht );
     if(loaded)
@@ -578,7 +578,7 @@
  *  Renders the metafile specified by hmf in the DC specified by
  *  hdc. Returns FALSE on failure, TRUE on success.
  */
-BOOL WINAPI PlayMetaFile( 
+BOOL WINAPI PlayMetaFile(
 			     HDC hdc,      /* [in] handle of DC to render in */
 			     HMETAFILE hmf /* [in] handle of metafile to render */
 )
@@ -624,16 +624,16 @@
     hFont = GetCurrentObject(hdc, OBJ_FONT);
 
     /* create the handle table */
-    
+
     hHT = GlobalAlloc16(GMEM_MOVEABLE | GMEM_ZEROINIT,
 		     sizeof(HANDLETABLE16) * mh->mtNoObjects);
     spht = K32WOWGlobalLock16(hHT);
-   
+
     seg = hmf | 7;
     offset = mh->mtHeaderSize * 2;
-    
+
     /* loop through metafile records */
-    
+
     while (offset < (mh->mtSize * 2))
     {
 	mr = (METARECORD *)((char *)mh + offset);
@@ -645,7 +645,7 @@
 	    result = FALSE;
 	    break;
 	}
-	
+
 
 	offset += (mr->rdSize * 2);
     }
@@ -675,19 +675,19 @@
  *  Loop through the metafile records in hmf, calling the user-specified
  *  function for each one, stopping when the user's function returns FALSE
  *  (which is considered to be failure)
- *  or when no records are left (which is considered to be success). 
+ *  or when no records are left (which is considered to be success).
  *
  * RETURNS
  *  TRUE on success, FALSE on failure.
- * 
+ *
  * HISTORY
  *   Niels de carpentier, april 1996
  */
-BOOL WINAPI EnumMetaFile( 
-			     HDC hdc, 
+BOOL WINAPI EnumMetaFile(
+			     HDC hdc,
 			     HMETAFILE hmf,
-			     MFENUMPROC lpEnumFunc, 
-			     LPARAM lpData 
+			     MFENUMPROC lpEnumFunc,
+			     LPARAM lpData
 ) {
     METAHEADER *mhTemp = NULL, *mh = MF_GetMetaHeader(hmf);
     METARECORD *mr;
@@ -713,12 +713,12 @@
     hBrush = GetCurrentObject(hdc, OBJ_BRUSH);
     hFont = GetCurrentObject(hdc, OBJ_FONT);
 
-    ht = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, 
+    ht = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY,
 			    sizeof(HANDLETABLE) * mh->mtNoObjects);
 
     /* loop through metafile records */
     offset = mh->mtHeaderSize * 2;
-    
+
     while (offset < (mh->mtSize * 2))
     {
 	mr = (METARECORD *)((char *)mh + offset);
@@ -733,7 +733,7 @@
 	    result = FALSE;
 	    break;
 	}
-	
+
 	offset += (mr->rdSize * 2);
     }
 
@@ -760,7 +760,7 @@
  *             PlayMetaFileRecord   (GDI.176)
  *
  *   Render a single metafile record specified by *mr in the DC hdc, while
- *   using the handle table *ht, of length nHandles, 
+ *   using the handle table *ht, of length nHandles,
  *   to store metafile objects.
  *
  * BUGS
@@ -771,7 +771,7 @@
  *  ABORTDOC, ENDDOC, CREATEBRUSH, CREATEBITMAPINDIRECT, and CREATEBITMAP.
  *
  */
-void WINAPI PlayMetaFileRecord16( 
+void WINAPI PlayMetaFileRecord16(
 	  HDC16 hdc,         /* [in] DC to render metafile into */
 	  HANDLETABLE16 *ht, /* [in] pointer to handle table for metafile objects */
 	  METARECORD *mr,    /* [in] pointer to metafile record to render */
@@ -784,7 +784,7 @@
 
     TRACE("(%04x %08lx %08lx %04x) function %04x\n",
 		 hdc,(LONG)ht, (LONG)mr, nHandles, mr->rdFunction);
-    
+
     switch (mr->rdFunction)
     {
     case META_EOF:
@@ -936,7 +936,7 @@
     case META_TEXTOUT:
 	s1 = *(mr->rdParm);
 	TextOut16(hdc, *(mr->rdParm + ((s1 + 1) >> 1) + 2),
-                  *(mr->rdParm + ((s1 + 1) >> 1) + 1), 
+                  *(mr->rdParm + ((s1 + 1) >> 1) + 1),
                   (char *)(mr->rdParm + 1), s1);
 	break;
 
@@ -946,7 +946,7 @@
 
     case META_POLYPOLYGON:
       PolyPolygon16(hdc, (LPPOINT16)(mr->rdParm + *(mr->rdParm) + 1),
-                    (LPINT16)(mr->rdParm + 1), *(mr->rdParm)); 
+                    (LPINT16)(mr->rdParm + 1), *(mr->rdParm));
       break;
 
     case META_POLYLINE:
@@ -974,11 +974,11 @@
 	case BS_PATTERN:
 	    infohdr = (BITMAPINFOHEADER *)(mr->rdParm + 2);
 	    MF_AddHandle(ht, nHandles,
-			 CreatePatternBrush(CreateBitmap(infohdr->biWidth, 
-				      infohdr->biHeight, 
-				      infohdr->biPlanes, 
+			 CreatePatternBrush(CreateBitmap(infohdr->biWidth,
+				      infohdr->biHeight,
+				      infohdr->biPlanes,
 				      infohdr->biBitCount,
-				      (LPSTR)(mr->rdParm + 
+				      (LPSTR)(mr->rdParm +
 				      (sizeof(BITMAPINFOHEADER) / 2) + 4))));
 	    break;
 
@@ -999,24 +999,24 @@
 	    break;
 	}
 	break;
-	
+
     case META_CREATEPENINDIRECT:
-	MF_AddHandle(ht, nHandles, 
+	MF_AddHandle(ht, nHandles,
 		     CreatePenIndirect16((LOGPEN16 *)(&(mr->rdParm))));
 	break;
 
     case META_CREATEFONTINDIRECT:
-	MF_AddHandle(ht, nHandles, 
+	MF_AddHandle(ht, nHandles,
 		     CreateFontIndirect16((LOGFONT16 *)(&(mr->rdParm))));
 	break;
 
     case META_CREATEBRUSHINDIRECT:
-	MF_AddHandle(ht, nHandles, 
+	MF_AddHandle(ht, nHandles,
 		     CreateBrushIndirect16((LOGBRUSH16 *)(&(mr->rdParm))));
 	break;
 
     case META_CREATEPALETTE:
-	MF_AddHandle(ht, nHandles, 
+	MF_AddHandle(ht, nHandles,
 		     CreatePalette16((LPLOGPALETTE)mr->rdParm));
 	break;
 
@@ -1044,7 +1044,7 @@
     case META_EXTTEXTOUT:
         MF_Play_MetaExtTextOut( hdc, mr );
 	break;
-    
+
     case META_STRETCHDIB:
       {
 	LPBITMAPINFO info = (LPBITMAPINFO) &(mr->rdParm[11]);
@@ -1058,14 +1058,14 @@
 
     case META_DIBSTRETCHBLT:
       {
-	LPBITMAPINFO info = (LPBITMAPINFO) &(mr->rdParm[10]); 
+	LPBITMAPINFO info = (LPBITMAPINFO) &(mr->rdParm[10]);
 	LPSTR bits = (LPSTR)info + DIB_BitmapInfoSize( info, mr->rdParm[2] );
 	StretchDIBits16(hdc,mr->rdParm[9],mr->rdParm[8],mr->rdParm[7],
                        mr->rdParm[6],mr->rdParm[5],mr->rdParm[4],
                        mr->rdParm[3],mr->rdParm[2],bits,info,
                        DIB_RGB_COLORS,MAKELONG(mr->rdParm[0],mr->rdParm[1]));
       }
-      break;		  
+      break;
 
     case META_STRETCHBLT:
       {
@@ -1081,7 +1081,7 @@
 		    hdcSrc,mr->rdParm[5],mr->rdParm[4],
 		    mr->rdParm[3],mr->rdParm[2],
 		    MAKELONG(mr->rdParm[0],mr->rdParm[1]));
-	DeleteDC(hdcSrc);		    
+	DeleteDC(hdcSrc);
       }
       break;
 
@@ -1098,14 +1098,14 @@
                 (INT16)mr->rdParm[4],(INT16)mr->rdParm[3],
                 hdcSrc, (INT16)mr->rdParm[2],(INT16)mr->rdParm[1],
                 MAKELONG(0,mr->rdParm[0]));
-	DeleteDC(hdcSrc);		    
+	DeleteDC(hdcSrc);
       }
       break;
 
     case META_CREATEREGION:
       {
 	HRGN hrgn = CreateRectRgn(0,0,0,0);
- 
+
 	MF_Play_MetaCreateRegion(mr, hrgn);
 	MF_AddHandle(ht, nHandles, hrgn);
       }
@@ -1124,7 +1124,7 @@
 
     case META_INVERTREGION:
         InvertRgn16(hdc, *(ht->objectHandle + *(mr->rdParm)));
-        break; 
+        break;
 
     case META_PAINTREGION:
         PaintRgn16(hdc, *(ht->objectHandle + *(mr->rdParm)));
@@ -1172,8 +1172,8 @@
 		          mr->rdParm[6], mr->rdParm[5],
 		          MAKELONG(mr->rdParm[0], mr->rdParm[1]));
 	}
-	break;	
-       
+	break;
+
     case META_SETTEXTCHAREXTRA:
         SetTextCharacterExtra16(hdc, (INT16)*(mr->rdParm));
 	break;
@@ -1227,18 +1227,18 @@
 /******************************************************************
  *         PlayMetaFileRecord   (GDI32.@)
  */
-BOOL WINAPI PlayMetaFileRecord( HDC hdc,  HANDLETABLE *handletable, 
+BOOL WINAPI PlayMetaFileRecord( HDC hdc,  HANDLETABLE *handletable,
 				METARECORD *metarecord, UINT handles )
 {
-    HANDLETABLE16 * ht = (void *)GlobalAlloc(GPTR, 
+    HANDLETABLE16 * ht = (void *)GlobalAlloc(GPTR,
 					     handles*sizeof(HANDLETABLE16));
     unsigned int i = 0;
     TRACE("(%08x,%p,%p,%d)\n", hdc, handletable, metarecord,
-	  handles); 
-    for (i=0; i<handles; i++)  
+	  handles);
+    for (i=0; i<handles; i++)
         ht->objectHandle[i] =  handletable->objectHandle[i];
     PlayMetaFileRecord16(hdc, ht, metarecord, handles);
-    for (i=0; i<handles; i++) 
+    for (i=0; i<handles; i++)
         handletable->objectHandle[i] = ht->objectHandle[i];
     GlobalFree((HGLOBAL)ht);
     return TRUE;
@@ -1267,8 +1267,8 @@
  * problems will occur when it is used. Validity of the memory is not
  * checked. The function is essentially just the identity function.
  */
-HMETAFILE16 WINAPI SetMetaFileBits16( 
-				   HGLOBAL16 hMem 
+HMETAFILE16 WINAPI SetMetaFileBits16(
+				   HGLOBAL16 hMem
 			/* [in] handle to a memory region holding a metafile */
 )
 {
@@ -1290,20 +1290,20 @@
 HMETAFILE16 WINAPI SetMetaFileBitsBetter16( HMETAFILE16 hMeta )
 {
     if( IsValidMetaFile16( hMeta ) )
-        return (HMETAFILE16)GlobalReAlloc16( hMeta, 0, 
+        return (HMETAFILE16)GlobalReAlloc16( hMeta, 0,
 			   GMEM_SHARE | GMEM_NODISCARD | GMEM_MODIFY);
     return (HMETAFILE16)0;
 }
 
 /******************************************************************
  *         SetMetaFileBitsEx    (GDI32.@)
- * 
+ *
  *  Create a metafile from raw data. No checking of the data is performed.
  *  Use _GetMetaFileBitsEx_ to get raw data from a metafile.
  */
-HMETAFILE WINAPI SetMetaFileBitsEx( 
+HMETAFILE WINAPI SetMetaFileBitsEx(
      UINT size,         /* [in] size of metafile, in bytes */
-     const BYTE *lpData /* [in] pointer to metafile data */  
+     const BYTE *lpData /* [in] pointer to metafile data */
     )
 {
     METAHEADER *mh = HeapAlloc( GetProcessHeap(), 0, size );
@@ -1314,15 +1314,15 @@
 
 /*****************************************************************
  *  GetMetaFileBitsEx     (GDI32.@)  Get raw metafile data
- * 
+ *
  *  Copies the data from metafile _hmf_ into the buffer _buf_.
  *  If _buf_ is zero, returns size of buffer required. Otherwise,
  *  returns number of bytes copied.
  */
-UINT WINAPI GetMetaFileBitsEx( 
+UINT WINAPI GetMetaFileBitsEx(
      HMETAFILE hmf, /* [in] metafile */
-     UINT nSize,    /* [in] size of buf */ 
-     LPVOID buf     /* [out] buffer to receive raw metafile data */  
+     UINT nSize,    /* [in] size of buf */
+     LPVOID buf     /* [out] buffer to receive raw metafile data */
 ) {
     METAHEADER *mh = MF_GetMetaHeader(hmf);
     UINT mfSize;
@@ -1361,7 +1361,7 @@
 
 /*
  *	The layout of the record looks something like this:
- *	 
+ *
  *	 rdParm	meaning
  *	 0		Always 0?
  *	 1		Always 6?
@@ -1424,7 +1424,7 @@
     DeleteObject( hrgn2 );
     return TRUE;
  }
- 
+
 
 /******************************************************************
  *         MF_Play_MetaExtTextOut
@@ -1435,24 +1435,24 @@
 static BOOL MF_Play_MetaExtTextOut(HDC16 hdc, METARECORD *mr)
 {
     LPINT16 dxx;
-    LPSTR sot; 
+    LPSTR sot;
     DWORD len;
     WORD s1;
 
     s1 = mr->rdParm[2];                              /* String length */
     len = sizeof(METARECORD) + (((s1 + 1) >> 1) * 2) + 2 * sizeof(short)
-      + sizeof(UINT16) +  (mr->rdParm[3] ? sizeof(RECT16) : 0); 
+      + sizeof(UINT16) +  (mr->rdParm[3] ? sizeof(RECT16) : 0);
                                            /* rec len without dx array */
 
     sot = (LPSTR)&mr->rdParm[4];		      /* start_of_text */
     if (mr->rdParm[3])
         sot += sizeof(RECT16);  /* there is a rectangle, so add offset */
-	 
+
     if (mr->rdSize == len / 2)
         dxx = NULL;                      /* determine if array present */
-    else 
+    else
         if (mr->rdSize == (len + s1 * sizeof(INT16)) / 2)
-	    dxx = (LPINT16)(sot+(((s1+1)>>1)*2));	   
+	    dxx = (LPINT16)(sot+(((s1+1)>>1)*2));
 	else {
 	    TRACE("%s  len: %ld\n",  sot, mr->rdSize);
 	    WARN(
@@ -1463,11 +1463,11 @@
     ExtTextOut16( hdc, mr->rdParm[1],              /* X position */
 		       mr->rdParm[0],              /* Y position */
 	               mr->rdParm[3],              /* options */
-		       mr->rdParm[3] ? (LPRECT16) &mr->rdParm[4]:NULL,  
+		       mr->rdParm[3] ? (LPRECT16) &mr->rdParm[4]:NULL,
                                                    /* rectangle */
 		       sot,			       /* string */
                        s1, dxx);                   /* length, dx array */
-    if (dxx)                      
+    if (dxx)
         TRACE("%s  len: %ld  dx0: %d\n", sot, mr->rdSize, dxx[0]);
     return TRUE;
 }
diff --git a/objects/palette.c b/objects/palette.c
index e577f57..a506056 100644
--- a/objects/palette.c
+++ b/objects/palette.c
@@ -139,7 +139,7 @@
     PALETTEOBJ * palettePtr;
     HPALETTE hpalette;
     int size;
-    
+
     if (!palette) return 0;
     TRACE("entries=%i\n", palette->palNumEntries);
 
@@ -148,7 +148,7 @@
     if (!(palettePtr = GDI_AllocObject( size + sizeof(int*) +sizeof(GDIOBJHDR),
                                         PALETTE_MAGIC, &hpalette, &palette_funcs ))) return 0;
     memcpy( &palettePtr->logpalette, palette, size );
-    PALETTE_ValidateFlags(palettePtr->logpalette.palPalEntry, 
+    PALETTE_ValidateFlags(palettePtr->logpalette.palPalEntry,
 			  palettePtr->logpalette.palNumEntries);
     palettePtr->mapping = NULL;
     GDI_ReleaseObj( hpalette );
@@ -171,7 +171,7 @@
     return CreateHalftonePalette(hdc);
 }
 
-	
+
 /***********************************************************************
  * CreateHalftonePalette [GDI32.@]  Creates a halftone palette
  *
@@ -219,7 +219,7 @@
         Palette.aEntries[i].peGreen=(i==2)?0x80:(i==3)?0x80:(i==6)?0x80:0;
         Palette.aEntries[i].peBlue=(i>3)?0x80:0;
     }
-    
+
     for (i=7;  i <= 12; i++)
     {
         switch(i)
@@ -239,7 +239,7 @@
                 Palette.aEntries[i].peGreen=0xca;
                 Palette.aEntries[i].peBlue=0xf0;
                 break;
-            case 10:    
+            case 10:
                 Palette.aEntries[i].peRed=0xff;
                 Palette.aEntries[i].peGreen=0xfb;
                 Palette.aEntries[i].peBlue=0xf0;
@@ -294,13 +294,13 @@
     UINT numEntries;
 
     TRACE("hpal = %04x, count=%i\n", hpalette, count );
-        
+
     palPtr = (PALETTEOBJ *) GDI_GetObjPtr( hpalette, PALETTE_MAGIC );
     if (!palPtr) return 0;
-    
+
     /* NOTE: not documented but test show this to be the case */
     if (count == 0)
-    {   
+    {
         int rc = palPtr->logpalette.palNumEntries;
 	    GDI_ReleaseObj( hpalette );
         return rc;
@@ -309,8 +309,8 @@
     numEntries = palPtr->logpalette.palNumEntries;
     if (start+count > numEntries) count = numEntries - start;
     if (entries)
-    { 
-      if (start >= numEntries) 
+    {
+      if (start >= numEntries)
       {
 	GDI_ReleaseObj( hpalette );
 	return 0;
@@ -359,7 +359,7 @@
     if (!palPtr) return 0;
 
     numEntries = palPtr->logpalette.palNumEntries;
-    if (start >= numEntries) 
+    if (start >= numEntries)
     {
       GDI_ReleaseObj( hpalette );
       return 0;
@@ -367,7 +367,7 @@
     if (start+count > numEntries) count = numEntries - start;
     memcpy( &palPtr->logpalette.palPalEntry[start], entries,
 	    count * sizeof(PALETTEENTRY) );
-    PALETTE_ValidateFlags(palPtr->logpalette.palPalEntry, 
+    PALETTE_ValidateFlags(palPtr->logpalette.palPalEntry,
 			  palPtr->logpalette.palNumEntries);
     HeapFree( GetProcessHeap(), 0, palPtr->mapping );
     palPtr->mapping = NULL;
@@ -411,14 +411,14 @@
 	      				sizeof(int*) + sizeof(GDIOBJHDR);
     size += sizeof(int*) + sizeof(GDIOBJHDR);
     mapping = palPtr->mapping;
-    
+
     if (!(palPtr = GDI_ReallocObject( size, hPal, palPtr ))) return FALSE;
 
-    if( mapping ) 
+    if( mapping )
     {
-        int *newMap = (int*) HeapReAlloc(GetProcessHeap(), 0, 
+        int *newMap = (int*) HeapReAlloc(GetProcessHeap(), 0,
                                     mapping, cEntries * sizeof(int) );
-	if(newMap == NULL) 
+	if(newMap == NULL)
         {
             ERR("Can not resize mapping -- out of memory!\n");
             GDI_ReleaseObj( hPal );
@@ -427,12 +427,12 @@
         palPtr->mapping = newMap;
     }
 
-    if( cEntries > cPrevEnt ) 
+    if( cEntries > cPrevEnt )
     {
 	if( mapping )
 	    memset(palPtr->mapping + cPrevEnt, 0, (cEntries - cPrevEnt)*sizeof(int));
 	memset( (BYTE*)palPtr + prevsize, 0, size - prevsize );
-        PALETTE_ValidateFlags((PALETTEENTRY*)((BYTE*)palPtr + prevsize), 
+        PALETTE_ValidateFlags((PALETTEENTRY*)((BYTE*)palPtr + prevsize),
 						     cEntries - cPrevEnt );
     }
     palPtr->logpalette.palNumEntries = cEntries;
@@ -611,7 +611,7 @@
 
     if( palObj )
     {
-      index = COLOR_PaletteLookupPixel(palObj->logpalette.palPalEntry, 
+      index = COLOR_PaletteLookupPixel(palObj->logpalette.palPalEntry,
 				       palObj->logpalette.palNumEntries,
 				       NULL, color, FALSE );
 
@@ -731,7 +731,7 @@
     prev = dc->hPalette;
     dc->hPalette = hpal;
     GDI_ReleaseObj( hdc );
-    if (!wBkg) hPrimaryPalette = hpal; 
+    if (!wBkg) hPrimaryPalette = hpal;
     return prev;
 }
 
@@ -748,7 +748,7 @@
     if (!dc) return 0;
 
     TRACE("%04x...\n", hdc );
-    
+
     if(dc->hPalette != hLastRealizedPalette )
     {
 	if( dc->hPalette == GetStockObject( DEFAULT_PALETTE )) {
@@ -814,7 +814,7 @@
 BOOL16 WINAPI IsDCCurrentPalette16(HDC16 hDC)
 {
     DC *dc = DC_GetDCPtr( hDC );
-    if (dc) 
+    if (dc)
     {
       BOOL bRet = dc->hPalette == hPrimaryPalette;
       GDI_ReleaseObj( hDC );
@@ -951,9 +951,9 @@
     /* behavior 1: if lpszFilename is NULL, return size of string and no error */
     if ((DWORD)lpszFilename == (DWORD)0x00000000)
  	return TRUE;
-    
+
     /* behavior 2: if buffer size too small, return size of string and error */
-    if (callerLen < strlen(WINEICM)) 
+    if (callerLen < strlen(WINEICM))
     {
 	SetLastError(ERROR_INSUFFICIENT_BUFFER);
 	return FALSE;
diff --git a/objects/pen.c b/objects/pen.c
index 9e73a13..fdb7580 100644
--- a/objects/pen.c
+++ b/objects/pen.c
@@ -61,7 +61,7 @@
 
     TRACE("%d %d %06lx\n", style, width, color );
 
-    logpen.lopnStyle = style; 
+    logpen.lopnStyle = style;
     logpen.lopnWidth.x = width;
     logpen.lopnWidth.y = 0;
     logpen.lopnColor = color;
@@ -79,7 +79,7 @@
 
     TRACE("%d %d %06lx\n", style, width, color );
 
-    logpen.lopnStyle = style; 
+    logpen.lopnStyle = style;
     logpen.lopnWidth.x = width;
     logpen.lopnWidth.y = 0;
     logpen.lopnColor = color;
@@ -142,14 +142,14 @@
 	    FIXME("Hatches not implemented\n");
 
     if (!(penPtr = GDI_AllocObject( sizeof(PENOBJ), PEN_MAGIC, &hpen, &pen_funcs ))) return 0;
-    penPtr->logpen.lopnStyle = style & ~PS_TYPE_MASK; 
-    
-    /* PS_USERSTYLE workaround */   
+    penPtr->logpen.lopnStyle = style & ~PS_TYPE_MASK;
+
+    /* PS_USERSTYLE workaround */
     if((penPtr->logpen.lopnStyle & PS_STYLE_MASK) == PS_USERSTYLE)
-       penPtr->logpen.lopnStyle = 
+       penPtr->logpen.lopnStyle =
          (penPtr->logpen.lopnStyle & ~PS_STYLE_MASK) | PS_SOLID;
 
-    penPtr->logpen.lopnWidth.x = (style & PS_GEOMETRIC) ? width : 1; 
+    penPtr->logpen.lopnWidth.x = (style & PS_GEOMETRIC) ? width : 1;
     penPtr->logpen.lopnWidth.y = 0;
     penPtr->logpen.lopnColor = brush->lbColor;
     GDI_ReleaseObj( hpen );
diff --git a/objects/region.c b/objects/region.c
index ea220e1..6b4cfe7 100644
--- a/objects/region.c
+++ b/objects/region.c
@@ -51,13 +51,13 @@
 
 			All Rights Reserved
 
-Permission to use, copy, modify, and distribute this software and its 
-documentation for any purpose and without fee is hereby granted, 
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
 provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in 
+both that copyright notice and this permission notice appear in
 supporting documentation, and that the name of Digital not be
 used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.  
+software without specific, written prior permission.
 
 DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
 ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
@@ -320,7 +320,7 @@
  *     the polygon by incrementing the y coordinate.  We
  *     keep a list of edges which the current scanline crosses,
  *     sorted by x.  This list is called the Active Edge Table (AET)
- *     As we change the y-coordinate, we update each entry in 
+ *     As we change the y-coordinate, we update each entry in
  *     in the active edge table to reflect the edges new xcoord.
  *     This list must be sorted at each scanline in case
  *     two edges intersect.
@@ -347,7 +347,7 @@
  * for the winding number rule
  */
 #define CLOCKWISE          1
-#define COUNTERCLOCKWISE  -1 
+#define COUNTERCLOCKWISE  -1
 
 typedef struct _EdgeTableEntry {
      INT ymax;           /* ycoord at which we exit this edge. */
@@ -576,7 +576,7 @@
     if(x || y) {
 	int nbox = obj->rgn->numRects;
 	RECT *pbox = obj->rgn->rects;
-	
+
 	if(nbox) {
 	    while(nbox--) {
 	        pbox->left += x;
@@ -706,9 +706,9 @@
 {
     RGNOBJ * obj;
 
-    TRACE(" %04x %d,%d-%d,%d\n", 
+    TRACE(" %04x %d,%d-%d,%d\n",
 	  hrgn, left, top, right, bottom );
-    
+
     if (!(obj = (RGNOBJ *) GDI_GetObjPtr( hrgn, REGION_MAGIC ))) return FALSE;
 
     if (left > right) { INT tmp = left; left = right; right = tmp; }
@@ -735,7 +735,7 @@
  *
  * If either ellipse dimension is zero we call CreateRectRgn16 for its
  * `special' behaviour. -ve ellipse dimensions can result in GPFs under win3.1
- * we just let CreateRoundRectRgn convert them to +ve values. 
+ * we just let CreateRoundRectRgn convert them to +ve values.
  */
 
 HRGN16 WINAPI CreateRoundRectRgn16( INT16 left, INT16 top,
@@ -902,7 +902,7 @@
 
 /***********************************************************************
  *           GetRegionData   (GDI32.@)
- * 
+ *
  * MSDN: GetRegionData, Return Values:
  *
  * "If the function succeeds and dwCount specifies an adequate number of bytes,
@@ -916,7 +916,7 @@
 {
     DWORD size;
     RGNOBJ *obj = (RGNOBJ *) GDI_GetObjPtr( hrgn, REGION_MAGIC );
-    
+
     TRACE(" %04x count = %ld, rgndata = %p\n",
 		   hrgn, count, rgndata);
 
@@ -958,7 +958,7 @@
 
 /***********************************************************************
  *           ExtCreateRegion   (GDI32.@)
- * 
+ *
  */
 HRGN WINAPI ExtCreateRegion( const XFORM* lpXform, DWORD dwCount, const RGNDATA* rgndata)
 {
@@ -968,7 +968,7 @@
 
     if( lpXform )
         WARN("(Xform not implemented - ignored)\n");
-    
+
     if( rgndata->rdh.iType != RDH_RECTANGLES )
     {
 	/* FIXME: We can use CreatePolyPolygonRgn() here
@@ -1015,7 +1015,7 @@
 {
     RGNOBJ * obj;
     BOOL ret = FALSE;
-    
+
     if ((obj = (RGNOBJ *) GDI_GetObjPtr( hrgn, REGION_MAGIC )))
     {
 	int i;
@@ -1055,11 +1055,11 @@
 {
     RGNOBJ * obj;
     BOOL ret = FALSE;
-    
+
     if ((obj = (RGNOBJ *) GDI_GetObjPtr( hrgn, REGION_MAGIC )))
     {
 	RECT *pCurRect, *pRectEnd;
-    
+
     /* this is (just) a useful optimization */
 	if ((obj->rgn->numRects > 0) && EXTENTCHECK(&obj->rgn->extents,
 						      rect))
@@ -1106,9 +1106,9 @@
     RGNOBJ *obj1, *obj2;
     BOOL ret = FALSE;
 
-    if ((obj1 = (RGNOBJ *) GDI_GetObjPtr( hrgn1, REGION_MAGIC ))) 
+    if ((obj1 = (RGNOBJ *) GDI_GetObjPtr( hrgn1, REGION_MAGIC )))
     {
-	if ((obj2 = (RGNOBJ *) GDI_GetObjPtr( hrgn2, REGION_MAGIC ))) 
+	if ((obj2 = (RGNOBJ *) GDI_GetObjPtr( hrgn2, REGION_MAGIC )))
 	{
 	    int i;
 
@@ -1117,7 +1117,7 @@
             {
                 ret = TRUE;
                 goto done;
-            
+
             }
             if (obj1->rgn->extents.left   != obj2->rgn->extents.left) goto done;
             if (obj1->rgn->extents.right  != obj2->rgn->extents.right) goto done;
@@ -1167,18 +1167,18 @@
     RGNOBJ *srcObj = (RGNOBJ*) GDI_GetObjPtr( hSrc, REGION_MAGIC );
 
     if (!srcObj) return FALSE;
-    if (srcObj->rgn->numRects != 0) 
+    if (srcObj->rgn->numRects != 0)
     {
 	RGNOBJ* destObj = (RGNOBJ*) GDI_GetObjPtr( hDest, REGION_MAGIC );
 	RECT *pRect, *pEndRect;
 	RECT tempRect;
 
 	EMPTY_REGION( destObj->rgn );
-	
+
 	pEndRect = srcObj->rgn->rects + srcObj->rgn->numRects;
 	for(pRect = srcObj->rgn->rects; pRect < pEndRect; pRect++)
 	{
-	    tempRect.left = pRect->left - x;        
+	    tempRect.left = pRect->left - x;
 	    tempRect.top = pRect->top - y;
 	    tempRect.right = pRect->right + x;
 	    tempRect.bottom = pRect->bottom + y;
@@ -1214,7 +1214,7 @@
     RGNOBJ *destObj = (RGNOBJ *) GDI_GetObjPtr( hDest, REGION_MAGIC);
     INT result = ERROR;
 
-    TRACE(" %04x,%04x -> %04x mode=%x\n", 
+    TRACE(" %04x,%04x -> %04x mode=%x\n",
 	  hSrc1, hSrc2, hDest, mode );
     if (destObj)
     {
@@ -1223,7 +1223,7 @@
 	if (src1Obj)
 	{
 	    TRACE("dump src1Obj:\n");
-	    if(TRACE_ON(region)) 
+	    if(TRACE_ON(region))
 	      REGION_DumpRegion(src1Obj->rgn);
 	    if (mode == RGN_COPY)
 	    {
@@ -1237,7 +1237,7 @@
 		if (src2Obj)
 		{
 		    TRACE("dump src2Obj:\n");
-		    if(TRACE_ON(region)) 
+		    if(TRACE_ON(region))
 		        REGION_DumpRegion(src2Obj->rgn);
 		    switch (mode)
 		    {
@@ -1261,7 +1261,7 @@
 	    GDI_ReleaseObj( hSrc1 );
 	}
 	TRACE("dump destObj:\n");
-	if(TRACE_ON(region)) 
+	if(TRACE_ON(region))
 	  REGION_DumpRegion(destObj->rgn);
 
 	GDI_ReleaseObj( hDest );
@@ -1320,7 +1320,7 @@
 static void REGION_CopyRegion(WINEREGION *dst, WINEREGION *src)
 {
     if (dst != src) /*  don't want to copy to itself */
-    {  
+    {
 	if (dst->size < src->numRects)
 	{
 	    if (! (dst->rects = HeapReAlloc( GetProcessHeap(), 0, dst->rects,
@@ -1385,7 +1385,7 @@
     {
 	pCurRect++;
     }
-    
+
     if (pCurRect != pRegEnd)
     {
 	/*
@@ -1402,7 +1402,7 @@
 	curStart = pRegEnd - pReg->rects;
 	pRegEnd = pReg->rects + pReg->numRects;
     }
-	
+
     if ((curNumRects == prevNumRects) && (curNumRects != 0)) {
 	pCurRect -= curNumRects;
 	/*
@@ -1470,7 +1470,7 @@
 		    *pPrevRect++ = *pCurRect++;
 		} while (pCurRect != pRegEnd);
 	    }
-	    
+
 	}
     }
     return (curStart);
@@ -1524,7 +1524,7 @@
     RECT *r2BandEnd;                  /* End of current band in r2 */
     INT top;                          /* Top of non-overlapping band */
     INT bot;                          /* Bottom of non-overlapping band */
-    
+
     /*
      * Initialization:
      *  set r1, r2, r1End and r2End appropriately, preserve the important
@@ -1536,12 +1536,12 @@
     r2 = reg2->rects;
     r1End = r1 + reg1->numRects;
     r2End = r2 + reg2->numRects;
-    
+
 
     /*
-     * newReg may be one of the src regions so we can't empty it. We keep a 
+     * newReg may be one of the src regions so we can't empty it. We keep a
      * note of its rects pointer (so that we can free them later), preserve its
-     * extents and simply set numRects to zero. 
+     * extents and simply set numRects to zero.
      */
 
     oldRects = newReg->rects;
@@ -1556,13 +1556,13 @@
      */
     newReg->size = max(reg1->numRects,reg2->numRects) * 2;
 
-    if (! (newReg->rects = HeapAlloc( GetProcessHeap(), 0, 
+    if (! (newReg->rects = HeapAlloc( GetProcessHeap(), 0,
 			          sizeof(RECT) * newReg->size )))
     {
 	newReg->size = 0;
 	return;
     }
-    
+
     /*
      * Initialize ybot and ytop.
      * In the upcoming loop, ybot and ytop serve different functions depending
@@ -1580,7 +1580,7 @@
 	ybot = reg1->extents.top;
     else
 	ybot = reg2->extents.top;
-    
+
     /*
      * prevBand serves to mark the start of the previous band so rectangles
      * can be coalesced into larger rectangles. qv. miCoalesce, above.
@@ -1591,7 +1591,7 @@
      * array of rectangles.
      */
     prevBand = 0;
-    
+
     do
     {
 	curBand = newReg->numRects;
@@ -1608,13 +1608,13 @@
 	{
 	    r1BandEnd++;
 	}
-	
+
 	r2BandEnd = r2;
 	while ((r2BandEnd != r2End) && (r2BandEnd->top == r2->top))
 	{
 	    r2BandEnd++;
 	}
-	
+
 	/*
 	 * First handle the band that doesn't intersect, if any.
 	 *
@@ -1674,7 +1674,7 @@
 	    (* overlapFunc) (newReg, r1, r1BandEnd, r2, r2BandEnd, ytop, ybot);
 
 	}
-	
+
 	if (newReg->numRects != curBand)
 	{
 	    prevBand = REGION_Coalesce (newReg, prevBand, curBand);
@@ -1851,9 +1851,9 @@
 	(!EXTENTCHECK(&reg1->extents, &reg2->extents)))
 	newReg->numRects = 0;
     else
-	REGION_RegionOp (newReg, reg1, reg2, 
+	REGION_RegionOp (newReg, reg1, reg2,
 	 (voidProcp) REGION_IntersectO, (voidProcp) NULL, (voidProcp) NULL);
-    
+
     /*
      * Can't alter newReg's extents before we call miRegionOp because
      * it might be one of the source regions and miRegionOp depends
@@ -1922,7 +1922,7 @@
 			   RECT *r2, RECT *r2End, INT top, INT bottom)
 {
     RECT *pNextRect;
-    
+
     pNextRect = &pReg->rects[pReg->numRects];
 
 #define MERGERECT(r) \
@@ -1947,7 +1947,7 @@
 	pNextRect += 1;  \
     }  \
     r++;
-    
+
     while ((r1 != r1End) && (r2 != r2End))
     {
 	if (r1->left < r2->left)
@@ -1959,7 +1959,7 @@
 	    MERGERECT(r2);
 	}
     }
-    
+
     if (r1 != r1End)
     {
 	do
@@ -2005,7 +2005,7 @@
     /*
      * Region 1 completely subsumes region 2
      */
-    if ((reg1->numRects == 1) && 
+    if ((reg1->numRects == 1) &&
 	(reg1->extents.left <= reg2->extents.left) &&
 	(reg1->extents.top <= reg2->extents.top) &&
 	(reg1->extents.right >= reg2->extents.right) &&
@@ -2019,7 +2019,7 @@
     /*
      * Region 2 completely subsumes region 1
      */
-    if ((reg2->numRects == 1) && 
+    if ((reg2->numRects == 1) &&
 	(reg2->extents.left <= reg1->extents.left) &&
 	(reg2->extents.top <= reg1->extents.top) &&
 	(reg2->extents.right >= reg1->extents.right) &&
@@ -2030,7 +2030,7 @@
 	return;
     }
 
-    REGION_RegionOp (newReg, reg1, reg2, (voidProcp) REGION_UnionO, 
+    REGION_RegionOp (newReg, reg1, reg2, (voidProcp) REGION_UnionO,
 		(voidProcp) REGION_UnionNonO, (voidProcp) REGION_UnionNonO);
 
     newReg->extents.left = min(reg1->extents.left, reg2->extents.left);
@@ -2056,13 +2056,13 @@
  *      pReg may be affected.
  *
  */
-static void REGION_SubtractNonO1 (WINEREGION *pReg, RECT *r, RECT *rEnd, 
+static void REGION_SubtractNonO1 (WINEREGION *pReg, RECT *r, RECT *rEnd,
 		INT top, INT bottom)
 {
     RECT *pNextRect;
-	
+
     pNextRect = &pReg->rects[pReg->numRects];
-	
+
     while (r != rEnd)
     {
 	MEMCHECK(pReg, pNextRect, pReg->rects);
@@ -2091,12 +2091,12 @@
  *      pReg may have rectangles added to it.
  *
  */
-static void REGION_SubtractO (WINEREGION *pReg, RECT *r1, RECT *r1End, 
+static void REGION_SubtractO (WINEREGION *pReg, RECT *r1, RECT *r1End,
 		RECT *r2, RECT *r2End, INT top, INT bottom)
 {
     RECT *pNextRect;
     INT left;
-    
+
     left = r1->left;
     pNextRect = &pReg->rects[pReg->numRects];
 
@@ -2205,7 +2205,7 @@
     }
     return;
 }
-	
+
 /***********************************************************************
  *	     REGION_SubtractRegion
  *
@@ -2229,8 +2229,8 @@
 	REGION_CopyRegion(regD, regM);
 	return;
     }
- 
-    REGION_RegionOp (regD, regM, regS, (voidProcp) REGION_SubtractO, 
+
+    REGION_RegionOp (regD, regM, regS, (voidProcp) REGION_SubtractO,
 		(voidProcp) REGION_SubtractNonO1, (voidProcp) NULL);
 
     /*
@@ -2251,7 +2251,7 @@
 {
     WINEREGION *tra, *trb;
 
-    if ((! (tra = REGION_AllocWineRegion(sra->numRects + 1))) || 
+    if ((! (tra = REGION_AllocWineRegion(sra->numRects + 1))) ||
 	(! (trb = REGION_AllocWineRegion(srb->numRects + 1))))
 	return;
     REGION_SubtractRegion(tra,sra,srb);
@@ -2265,7 +2265,7 @@
 /**************************************************************************
  *
  *    Poly Regions
- * 
+ *
  *************************************************************************/
 
 #define LARGE_COORDINATE  0x7fffffff /* FIXME */
@@ -2293,7 +2293,7 @@
      */
     pPrevSLL = &ET->scanlines;
     pSLL = pPrevSLL->next;
-    while (pSLL && (pSLL->scanline < scanline)) 
+    while (pSLL && (pSLL->scanline < scanline))
     {
         pPrevSLL = pSLL;
         pSLL = pSLL->next;
@@ -2302,9 +2302,9 @@
     /*
      * reassign pSLL (pointer to ScanLineList) if necessary
      */
-    if ((!pSLL) || (pSLL->scanline > scanline)) 
+    if ((!pSLL) || (pSLL->scanline > scanline))
     {
-        if (*iSLLBlock > SLLSPERBLOCK-1) 
+        if (*iSLLBlock > SLLSPERBLOCK-1)
         {
             tmpSLLBlock = HeapAlloc( GetProcessHeap(), 0, sizeof(ScanLineListBlock));
 	    if(!tmpSLLBlock)
@@ -2330,7 +2330,7 @@
      */
     prev = (EdgeTableEntry *)NULL;
     start = pSLL->edgelist;
-    while (start && (start->bres.minor_axis < ETE->bres.minor_axis)) 
+    while (start && (start->bres.minor_axis < ETE->bres.minor_axis))
     {
         prev = start;
         start = start->next;
@@ -2347,7 +2347,7 @@
  *     REGION_CreateEdgeTable
  *
  *     This routine creates the edge table for
- *     scan converting polygons. 
+ *     scan converting polygons.
  *     The Edge Table (ET) looks like:
  *
  *    EdgeTable
@@ -2367,7 +2367,7 @@
  *     which an edge is initially entered.
  *
  */
-static void REGION_CreateETandAET(const INT *Count, INT nbpolygons, 
+static void REGION_CreateETandAET(const INT *Count, INT nbpolygons,
             const POINT *pts, EdgeTable *ET, EdgeTableEntry *AET,
             EdgeTableEntry *pETEs, ScanLineListBlock *pSLLBlock)
 {
@@ -2377,7 +2377,7 @@
     int iSLLBlock = 0;
     int dy;
 
-    
+
     /*
      *  initialize the Active Edge Table
      */
@@ -2401,7 +2401,7 @@
         EndPt += count;
         if(count < 2)
 	    continue;
-	
+
 	PrevPt = EndPt;
 
     /*
@@ -2409,19 +2409,19 @@
      *  In this loop we are dealing with two vertices at
      *  a time -- these make up one edge of the polygon.
      */
-	while (count--) 
+	while (count--)
 	{
 	    CurrPt = pts++;
 
         /*
          *  find out which point is above and which is below.
          */
-	    if (PrevPt->y > CurrPt->y) 
+	    if (PrevPt->y > CurrPt->y)
 	    {
 	        bottom = PrevPt, top = CurrPt;
 		pETEs->ClockWise = 0;
 	    }
-	    else 
+	    else
 	    {
 	        bottom = CurrPt, top = PrevPt;
 		pETEs->ClockWise = 1;
@@ -2430,7 +2430,7 @@
         /*
          * don't add horizontal edges to the Edge table.
          */
-	    if (bottom->y != top->y) 
+	    if (bottom->y != top->y)
 	    {
 	        pETEs->ymax = bottom->y-1;
 				/* -1 so we don't get last scanline */
@@ -2441,7 +2441,7 @@
 		dy = bottom->y - top->y;
 		BRESINITPGONSTRUCT(dy, top->x, bottom->x, pETEs->bres);
 
-		REGION_InsertEdgeInET(ET, pETEs, top->y, &pSLLBlock, 
+		REGION_InsertEdgeInET(ET, pETEs, top->y, &pSLLBlock,
 								&iSLLBlock);
 
 		if (PrevPt->y > ET->ymax)
@@ -2471,9 +2471,9 @@
 
     pPrevAET = AET;
     AET = AET->next;
-    while (ETEs) 
+    while (ETEs)
     {
-        while (AET && (AET->bres.minor_axis < ETEs->bres.minor_axis)) 
+        while (AET && (AET->bres.minor_axis < ETEs->bres.minor_axis))
         {
             pPrevAET = AET;
             AET = AET->next;
@@ -2495,13 +2495,13 @@
  *
  *     This routine links the AET by the
  *     nextWETE (winding EdgeTableEntry) link for
- *     use by the winding number rule.  The final 
+ *     use by the winding number rule.  The final
  *     Active Edge Table (AET) might look something
  *     like:
  *
  *     AET
  *     ----------  ---------   ---------
- *     |ymax    |  |ymax    |  |ymax    | 
+ *     |ymax    |  |ymax    |  |ymax    |
  *     | ...    |  |...     |  |...     |
  *     |next    |->|next    |->|next    |->...
  *     |nextWETE|  |nextWETE|  |nextWETE|
@@ -2519,7 +2519,7 @@
     AET->nextWETE = (EdgeTableEntry *)NULL;
     pWETE = AET;
     AET = AET->next;
-    while (AET) 
+    while (AET)
     {
         if (AET->ClockWise)
             isInside++;
@@ -2527,7 +2527,7 @@
             isInside--;
 
         if ((!inside && !isInside) ||
-            ( inside &&  isInside)) 
+            ( inside &&  isInside))
         {
             pWETE->nextWETE = AET;
             pWETE = AET;
@@ -2554,7 +2554,7 @@
     BOOL changed = FALSE;
 
     AET = AET->next;
-    while (AET) 
+    while (AET)
     {
         pETEinsert = AET;
         pETEchase = AET;
@@ -2562,7 +2562,7 @@
             pETEchase = pETEchase->back;
 
         AET = AET->next;
-        if (pETEchase != pETEinsert) 
+        if (pETEchase != pETEinsert)
         {
             pETEchaseBackTMP = pETEchase->back;
             pETEinsert->back->next = AET;
@@ -2587,7 +2587,7 @@
 {
     ScanLineListBlock   *tmpSLLBlock;
 
-    while (pSLLBlock) 
+    while (pSLLBlock)
     {
         tmpSLLBlock = pSLLBlock->next;
         HeapFree( GetProcessHeap(), 0, pSLLBlock );
@@ -2601,7 +2601,7 @@
  *
  *     Create an array of rectangles from a list of points.
  */
-static int REGION_PtsToRegion(int numFullPtBlocks, int iCurPtBlock, 
+static int REGION_PtsToRegion(int numFullPtBlocks, int iCurPtBlock,
 		       POINTBLOCK *FirstPtBlock, WINEREGION *reg)
 {
     RECT *rects;
@@ -2610,21 +2610,21 @@
     int i;
     RECT *extents;
     INT numRects;
- 
+
     extents = &reg->extents;
- 
+
     numRects = ((numFullPtBlocks * NUMPTSTOBUFFER) + iCurPtBlock) >> 1;
- 
-    if (!(reg->rects = HeapReAlloc( GetProcessHeap(), 0, reg->rects, 
+
+    if (!(reg->rects = HeapReAlloc( GetProcessHeap(), 0, reg->rects,
 			   sizeof(RECT) * numRects )))
         return(0);
- 
+
     reg->size = numRects;
     CurPtBlock = FirstPtBlock;
     rects = reg->rects - 1;
     numRects = 0;
     extents->left = LARGE_COORDINATE,  extents->right = SMALL_COORDINATE;
- 
+
     for ( ; numFullPtBlocks >= 0; numFullPtBlocks--) {
 	/* the loop uses 2 points per iteration */
 	i = NUMPTSTOBUFFER >> 1;
@@ -2662,14 +2662,14 @@
 	extents->bottom = 0;
     }
     reg->numRects = numRects;
- 
+
     return(TRUE);
 }
 
 /***********************************************************************
  *           CreatePolyPolygonRgn    (GDI32.@)
  */
-HRGN WINAPI CreatePolyPolygonRgn(const POINT *Pts, const INT *Count, 
+HRGN WINAPI CreatePolyPolygonRgn(const POINT *Pts, const INT *Count,
 		      INT nbpolygons, INT mode)
 {
     HRGN hrgn;
@@ -2710,12 +2710,12 @@
 	  (Pts[2].x == Pts[3].x) &&
 	  (Pts[3].y == Pts[0].y))))
     {
-        SetRectRgn( hrgn, min(Pts[0].x, Pts[2].x), min(Pts[0].y, Pts[2].y), 
+        SetRectRgn( hrgn, min(Pts[0].x, Pts[2].x), min(Pts[0].y, Pts[2].y),
 		            max(Pts[0].x, Pts[2].x), max(Pts[0].y, Pts[2].y) );
 	GDI_ReleaseObj( hrgn );
 	return hrgn;
     }
-    
+
     for(poly = total = 0; poly < nbpolygons; poly++)
         total += Count[poly];
     if (! (pETEs = HeapAlloc( GetProcessHeap(), 0, sizeof(EdgeTableEntry) * total )))
@@ -2727,7 +2727,7 @@
     REGION_CreateETandAET(Count, nbpolygons, Pts, &ET, &AET, pETEs, &SLLBlock);
     pSLL = ET.scanlines.next;
     curPtBlock = &FirstPtBlock;
- 
+
     if (mode != WINDING) {
         /*
          *  for each scanline
@@ -2743,14 +2743,14 @@
             }
             pPrevAET = &AET;
             pAET = AET.next;
- 
+
             /*
              *  for each active edge
              */
             while (pAET) {
                 pts->x = pAET->bres.minor_axis,  pts->y = y;
                 pts++, iPts++;
- 
+
                 /*
                  *  send out the buffer
                  */
@@ -2788,7 +2788,7 @@
             pPrevAET = &AET;
             pAET = AET.next;
             pWETE = pAET;
- 
+
             /*
              *  for each active edge
              */
@@ -2800,7 +2800,7 @@
                 if (pWETE == pAET) {
                     pts->x = pAET->bres.minor_axis,  pts->y = y;
                     pts++, iPts++;
- 
+
                     /*
                      *  send out the buffer
                      */
@@ -2821,7 +2821,7 @@
                 }
                 EVALUATEEDGEWINDING(pAET, pPrevAET, y, fixWAET);
             }
- 
+
             /*
              *  recompute the winding active edge table if
              *  we just resorted or have exited an edge.
@@ -2832,7 +2832,7 @@
             }
         }
     }
-    REGION_FreeStorage(SLLBlock.next);	
+    REGION_FreeStorage(SLLBlock.next);
     REGION_PtsToRegion(numFullPtBlocks, iPts, &FirstPtBlock, region);
 
     for (curPtBlock = FirstPtBlock.next; --numFullPtBlocks >= 0;) {
@@ -2912,7 +2912,7 @@
 	    /*
 	     *     On Windows NT/2000,
 	     *           the region returned is in screen coordinates.
-	     *     On Windows 95/98, 
+	     *     On Windows 95/98,
 	     *           the region returned is in window coordinates
 	     */
 	    vi.dwOSVersionInfoSize = sizeof(vi);
@@ -2950,7 +2950,7 @@
 	{
 	    if( off->x || off->y )
 		xrect = rgnDst->rects;
-	    else 
+	    else
 		return TRUE;
 	}
 	else
@@ -3020,7 +3020,7 @@
 
 	if((rgnDst != rgnSrc) && (rgnDst->size < (i = (clipb - clipa))))
 	{
-	    rgnDst->rects = HeapReAlloc( GetProcessHeap(), 0, 
+	    rgnDst->rects = HeapReAlloc( GetProcessHeap(), 0,
 				rgnDst->rects, i * sizeof(RECT));
 	    if( !rgnDst->rects ) return FALSE;
 	    rgnDst->size = i;
@@ -3103,9 +3103,9 @@
 {
 /*  Optimization of the following generic code:
 
-    HRGN h; 
+    HRGN h;
 
-    if( lpRect ) 
+    if( lpRect )
 	h = CreateRectRgn( lpRect->left, lpRect->top, lpRect->right, lpRect->bottom );
     else
 	h = CreateRectRgn( 0, 0, 0, 0 );
@@ -3157,7 +3157,7 @@
 	        TRACE("src %p -> dst %p (%i,%i)-(%i,%i) by (%li,%li)\n", objSrc->rgn, rgnDst,
 		      lpRect->left, lpRect->top, lpRect->right, lpRect->bottom, lpPt->x, lpPt->y );
 	    else
-		TRACE("src %p -> dst %p by (%li,%li)\n", objSrc->rgn, rgnDst, lpPt->x, lpPt->y ); 
+		TRACE("src %p -> dst %p by (%li,%li)\n", objSrc->rgn, rgnDst, lpPt->x, lpPt->y );
 
 	    if( REGION_CropAndOffsetRegion( lpPt, lpRect, objSrc->rgn, rgnDst ) == FALSE )
 	    {
diff --git a/objects/text.c b/objects/text.c
index 79e6a4c..fae786d 100644
--- a/objects/text.c
+++ b/objects/text.c
@@ -115,7 +115,7 @@
 	lpdx32 = (LPINT)HeapAlloc( GetProcessHeap(),0, sizeof(INT)*count );
 	if(lpdx32 == NULL) return FALSE;
 	for (i=count;i--;) lpdx32[i]=lpDx[i];
-    }    
+    }
     if (lprect)	CONV_RECT16TO32(lprect,&rect32);
     ret = ExtTextOutA(hdc,x,y,flags,lprect?&rect32:NULL,str,count,lpdx32);
     if (lpdx32) HeapFree( GetProcessHeap(), 0, lpdx32 );
@@ -273,7 +273,7 @@
  * Draw several Strings
  */
 BOOL WINAPI PolyTextOutA (
-			  HDC hdc,               /* [in] Handle to device context */			  
+			  HDC hdc,               /* [in] Handle to device context */
 			  PPOLYTEXTA pptxt,      /* [in] Array of strings */
 			  INT cStrings           /* [in] Number of strings in array */
 			  )
@@ -290,8 +290,8 @@
  *
  * Draw several Strings
  */
-BOOL WINAPI PolyTextOutW ( 
-			  HDC hdc,               /* [in] Handle to device context */			  
+BOOL WINAPI PolyTextOutW (
+			  HDC hdc,               /* [in] Handle to device context */
 			  PPOLYTEXTW pptxt,      /* [in] Array of strings */
 			  INT cStrings           /* [in] Number of strings in array */
 			  )
diff --git a/ole/ole2nls.c b/ole/ole2nls.c
index fc969da..c63aa42 100644
--- a/ole/ole2nls.c
+++ b/ole/ole2nls.c
@@ -42,10 +42,10 @@
 
 WINE_DEFAULT_DEBUG_CHANNEL(string);
 
-/* Locale name to id map. used by EnumSystemLocales, GetLocaleInfoA 
+/* Locale name to id map. used by EnumSystemLocales, GetLocaleInfoA
  * MUST contain all #defines from winnls.h
  * last entry has NULL name, 0 id.
- */ 
+ */
 #define LOCALE_ENTRY(x)	{#x,LOCALE_##x}
 static const struct tagLOCALE_NAME2ID {
     const char	*name;
@@ -368,17 +368,17 @@
         ok:
 		if (!strcmp(buf,"POSIX") || !strcmp(buf,"C"))
                     return userLCID = MAKELANGID( LANG_ENGLISH, SUBLANG_DEFAULT );
-		
+
 		lang=buf;
-		
+
 		do {
 			next=strchr(lang,':'); if (next) *next++='\0';
 			dialect=strchr(lang,'@'); if (dialect) *dialect++='\0';
 			charset=strchr(lang,'.'); if (charset) *charset++='\0';
 			country=strchr(lang,'_'); if (country) *country++='\0';
-			
+
 			userLCID = NLS_GetLanguageID(lang, country, charset, dialect);
-			
+
 			lang=next;
 		} while (lang && !userLCID);
 
@@ -411,7 +411,7 @@
 	     return GetUserDefaultLCID();
 	   case LOCALE_NEUTRAL:
 	     return MAKELCID (LANG_NEUTRAL, SUBLANG_NEUTRAL);
-	}  
+	}
 	return MAKELANGID( PRIMARYLANGID(lcid), SUBLANG_NEUTRAL);
 }
 
@@ -438,14 +438,14 @@
     if(!hrsrc) return 0;
     hmem = LoadResource(hModule, hrsrc);
     if(!hmem) return 0;
-    
+
     p = LockResource(hmem);
     string_num = res_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) {
@@ -464,7 +464,7 @@
 /******************************************************************************
  *		GetLocaleInfoA (KERNEL32.@)
  *
- * NOTES 
+ * NOTES
  *  LANG_NEUTRAL is equal to LOCALE_SYSTEM_DEFAULT
  *
  *  MS online documentation states that the string returned is NULL terminated
@@ -490,7 +490,7 @@
 	if (lcid == LOCALE_NEUTRAL || lcid == LANG_SYSTEM_DEFAULT)
 	{
             lcid = GetSystemDefaultLCID();
-	} 
+	}
 	else if (lcid == LANG_USER_DEFAULT) /*0x800*/
 	{
             lcid = GetUserDefaultLCID();
@@ -511,10 +511,10 @@
 
         sprintf( acRealKey, "Control Panel\\International\\%s", pacKey );
 
-        if ( RegOpenKeyExA( HKEY_CURRENT_USER, acRealKey, 
+        if ( RegOpenKeyExA( HKEY_CURRENT_USER, acRealKey,
                             0, KEY_READ, &hKey) == ERROR_SUCCESS )
         {
-            if ( RegQueryValueExA( hKey, NULL, NULL, NULL, (LPBYTE)acBuffer, 
+            if ( RegQueryValueExA( hKey, NULL, NULL, NULL, (LPBYTE)acBuffer,
                                    &dwBufferSize ) == ERROR_SUCCESS )
             {
                 retString = acBuffer;
@@ -559,7 +559,7 @@
 		"and submit patch for inclusion into the next Wine release.\n",
 			retString, LOWORD(lcid));
 	SetLastError(ERROR_INVALID_PARAMETER);
-	return 0;			
+	return 0;
     }
 
     /* a FONTSIGNATURE is not a string, just 6 DWORDs  */
@@ -592,7 +592,7 @@
 INT WINAPI GetLocaleInfoW(LCID lcid,LCTYPE LCType,LPWSTR wbuf,INT len)
 {	WORD wlen;
 	LPSTR abuf;
-	
+
 	if (len && (! wbuf) )
 	{ SetLastError(ERROR_INSUFFICIENT_BUFFER);
 	  return 0;
@@ -713,7 +713,7 @@
         pacKey = "sCurrency";
         break;
 
-    /* The following are not listed under MSDN as supported, 
+    /* The following are not listed under MSDN as supported,
      * but seem to be used and also stored in the registry.
      */
 
@@ -749,10 +749,10 @@
     if ( (pacKey = GetLocaleSubkeyName(lctype)) )
     {
         sprintf( acRealKey, "Control Panel\\International\\%s", pacKey );
-        if ( RegCreateKeyA( HKEY_CURRENT_USER, acRealKey, 
+        if ( RegCreateKeyA( HKEY_CURRENT_USER, acRealKey,
                                &hKey ) == ERROR_SUCCESS )
         {
-            if ( RegSetValueExA( hKey, NULL, 0, REG_SZ, 
+            if ( RegSetValueExA( hKey, NULL, 0, REG_SZ,
                                  data, strlen(data)+1 ) != ERROR_SUCCESS )
             {
                 ERR("SetLocaleInfoA: %s did not work\n", pacKey );
@@ -851,39 +851,39 @@
     return GetLocaleInfoW(MAKELCID(wLang, SORT_DEFAULT), LOCALE_SENGLANGUAGE, szLang, nSize);
 }
 
- 
+
 static const unsigned char LCM_Unicode_LUT[] = {
-  6      ,   3, /*   -   1 */  
-  6      ,   4, /*   -   2 */  
-  6      ,   5, /*   -   3 */  
-  6      ,   6, /*   -   4 */  
-  6      ,   7, /*   -   5 */  
-  6      ,   8, /*   -   6 */  
-  6      ,   9, /*   -   7 */  
-  6      ,  10, /*   -   8 */  
-  7      ,   5, /*   -   9 */  
-  7      ,   6, /*   -  10 */  
-  7      ,   7, /*   -  11 */  
-  7      ,   8, /*   -  12 */  
-  7      ,   9, /*   -  13 */  
-  6      ,  11, /*   -  14 */  
-  6      ,  12, /*   -  15 */  
-  6      ,  13, /*   -  16 */  
-  6      ,  14, /*   -  17 */  
-  6      ,  15, /*   -  18 */  
-  6      ,  16, /*   -  19 */  
-  6      ,  17, /*   -  20 */  
-  6      ,  18, /*   -  21 */  
-  6      ,  19, /*   -  22 */  
-  6      ,  20, /*   -  23 */  
-  6      ,  21, /*   -  24 */  
-  6      ,  22, /*   -  25 */  
-  6      ,  23, /*   -  26 */  
-  6      ,  24, /*   -  27 */  
-  6      ,  25, /*   -  28 */  
-  6      ,  26, /*   -  29 */  
-  6      ,  27, /*   -  30 */  
-  6      ,  28, /*   -  31 */  
+  6      ,   3, /*   -   1 */
+  6      ,   4, /*   -   2 */
+  6      ,   5, /*   -   3 */
+  6      ,   6, /*   -   4 */
+  6      ,   7, /*   -   5 */
+  6      ,   8, /*   -   6 */
+  6      ,   9, /*   -   7 */
+  6      ,  10, /*   -   8 */
+  7      ,   5, /*   -   9 */
+  7      ,   6, /*   -  10 */
+  7      ,   7, /*   -  11 */
+  7      ,   8, /*   -  12 */
+  7      ,   9, /*   -  13 */
+  6      ,  11, /*   -  14 */
+  6      ,  12, /*   -  15 */
+  6      ,  13, /*   -  16 */
+  6      ,  14, /*   -  17 */
+  6      ,  15, /*   -  18 */
+  6      ,  16, /*   -  19 */
+  6      ,  17, /*   -  20 */
+  6      ,  18, /*   -  21 */
+  6      ,  19, /*   -  22 */
+  6      ,  20, /*   -  23 */
+  6      ,  21, /*   -  24 */
+  6      ,  22, /*   -  25 */
+  6      ,  23, /*   -  26 */
+  6      ,  24, /*   -  27 */
+  6      ,  25, /*   -  28 */
+  6      ,  26, /*   -  29 */
+  6      ,  27, /*   -  30 */
+  6      ,  28, /*   -  31 */
   7      ,   2, /*   -  32 */
   7      ,  28, /* ! -  33 */
   7      ,  29, /* " -  34 */ /* " */
@@ -1113,7 +1113,7 @@
 
 #define LCM_Diacritic_Start 131
 
-static const unsigned char LCM_Diacritic_LUT[] = { 
+static const unsigned char LCM_Diacritic_LUT[] = {
 123,  /* ƒ - 131 */
   2,  /* „ - 132 */
   2,  /* … - 133 */
@@ -1244,11 +1244,11 @@
 /******************************************************************************
  * OLE2NLS_isPunctuation [INTERNAL]
  */
-static int OLE2NLS_isPunctuation(unsigned char c) 
+static int OLE2NLS_isPunctuation(unsigned char c)
 {
-  /* "punctuation character" in this context is a character which is 
+  /* "punctuation character" in this context is a character which is
      considered "less important" during word sort comparison.
-     See LCMapString implementation for the precise definition 
+     See LCMapString implementation for the precise definition
      of "less important". */
 
   return (LCM_Unicode_LUT[-2+2*c]==6);
@@ -1257,9 +1257,9 @@
 /******************************************************************************
  * OLE2NLS_isNonSpacing [INTERNAL]
  */
-static int OLE2NLS_isNonSpacing(unsigned char c) 
+static int OLE2NLS_isNonSpacing(unsigned char c)
 {
-  /* This function is used by LCMapStringA.  Characters 
+  /* This function is used by LCMapStringA.  Characters
      for which it returns true are ignored when mapping a
      string with NORM_IGNORENONSPACE */
   return ((c==136) || (c==170) || (c==186));
@@ -1269,9 +1269,9 @@
  * OLE2NLS_isSymbol [INTERNAL]
  * FIXME: handle current locale
  */
-static int OLE2NLS_isSymbol(unsigned char c) 
+static int OLE2NLS_isSymbol(unsigned char c)
 {
-  /* This function is used by LCMapStringA.  Characters 
+  /* This function is used by LCMapStringA.  Characters
      for which it returns true are ignored when mapping a
      string with NORM_IGNORESYMBOLS */
   return ( (c!=0) && !(isalpha(c) || isdigit(c)) );
@@ -1300,20 +1300,20 @@
  *
  * NOTES
  *    If called with scrlen = -1, the function will compute the length
- *      of the 0-terminated string strsrc by itself.      
- * 
- *    If called with dstlen = 0, returns the buffer length that 
+ *      of the 0-terminated string strsrc by itself.
+ *
+ *    If called with dstlen = 0, returns the buffer length that
  *      would be required.
  *
  *    NORM_IGNOREWIDTH means to compare ASCII and wide characters
- *    as if they are equal.  
+ *    as if they are equal.
  *    In the only code page implemented so far, there may not be
  *    wide characters in strings passed to LCMapStringA,
  *    so there is nothing to be done for this flag.
  */
 INT WINAPI LCMapStringA(
-	LCID lcid,      /* [in] locale identifier created with MAKELCID; 
-		                LOCALE_SYSTEM_DEFAULT and LOCALE_USER_DEFAULT are 
+	LCID lcid,      /* [in] locale identifier created with MAKELCID;
+		                LOCALE_SYSTEM_DEFAULT and LOCALE_USER_DEFAULT are
                                 predefined values. */
 	DWORD mapflags, /* [in] flags */
 	LPCSTR srcstr,  /* [in] source buffer */
@@ -1333,7 +1333,7 @@
     SetLastError(ERROR_INVALID_PARAMETER);
     return 0;
   }
-  if (srclen == -1) 
+  if (srclen == -1)
     srclen = strlen(srcstr) + 1 ;    /* (include final '\0') */
 
 #define LCMAPSTRINGA_SUPPORTED_FLAGS (LCMAP_UPPERCASE     | \
@@ -1344,7 +1344,7 @@
                                         SORT_STRINGSORT     | \
                                         NORM_IGNOREWIDTH    | \
                                         NORM_IGNOREKANATYPE)
-  /* FIXME: as long as we don't support Katakana nor Hiragana 
+  /* FIXME: as long as we don't support Katakana nor Hiragana
    * characters, we can support NORM_IGNOREKANATYPE
    */
   if (mapflags & ~LCMAPSTRINGA_SUPPORTED_FLAGS)
@@ -1364,13 +1364,13 @@
   if ( !(mapflags & LCMAP_SORTKEY) )
   {
     int i,j;
-    int (*f)(int) = identity; 
+    int (*f)(int) = identity;
     int flag_ignorenonspace = mapflags & NORM_IGNORENONSPACE;
     int flag_ignoresymbols = mapflags & NORM_IGNORESYMBOLS;
 
     if (flag_ignorenonspace || flag_ignoresymbols)
     {
-      /* For some values of mapflags, the length of the resulting 
+      /* For some values of mapflags, the length of the resulting
 	 string is not known at this point.  Windows does map the string
 	 and does not SetLastError ERROR_INSUFFICIENT_BUFFER in
 	 these cases. */
@@ -1389,8 +1389,8 @@
     else
     {
       if (dstlen==0)
-	return srclen;  
-      if (dstlen<srclen) 
+	return srclen;
+      if (dstlen<srclen)
 	   {
 	     SetLastError(ERROR_INSUFFICIENT_BUFFER);
 	     return 0;
@@ -1431,7 +1431,7 @@
     {
       int ofs;
       unsigned char source_char = srcstr[i];
-      if (source_char!='\0') 
+      if (source_char!='\0')
       {
 	if (flag_stringsort || !OLE2NLS_isPunctuation(source_char))
 	{
@@ -1442,11 +1442,11 @@
 	else
 	{
 	  delayed_punctuation_len++;
-	}	  
+	}
       }
-	  
+
       if (isupper(source_char))
-	case_len=unicode_len; 
+	case_len=unicode_len;
 
       ofs = source_char - LCM_Diacritic_Start;
       if ((ofs>=0) && (LCM_Diacritic_LUT[ofs]!=2))
@@ -1454,7 +1454,7 @@
     }
 
     if (mapflags & NORM_IGNORECASE)
-      case_len=0;                   
+      case_len=0;
     if (mapflags & NORM_IGNORENONSPACE)
       diacritic_len=0;
 
@@ -1465,7 +1465,7 @@
       +     4                            /* four '\1' separators */
       +     1  ;                         /* terminal '\0' */
     if (dstlen==0)
-      return room;      
+      return room;
     else if (dstlen<room)
     {
       SetLastError(ERROR_INSUFFICIENT_BUFFER);
@@ -1481,25 +1481,25 @@
 #endif
     /* locate each component, write separators */
     diacritic_component = dststr + 2*unicode_len ;
-    *diacritic_component++ = '\1'; 
+    *diacritic_component++ = '\1';
     case_component = diacritic_component + diacritic_len ;
-    *case_component++ = '\1'; 
+    *case_component++ = '\1';
     delayed_punctuation_component = case_component + case_len ;
     *delayed_punctuation_component++ = '\1';
     *delayed_punctuation_component++ = '\1';
 
-    /* read source string char by char, write 
+    /* read source string char by char, write
        corresponding weight in each component. */
     for (i=0,count=0;i<srclen;i++)
     {
       unsigned char source_char=srcstr[i];
-      if (source_char!='\0') 
+      if (source_char!='\0')
       {
 	int type,longcode;
 	type = LCM_Unicode_LUT[-2+2*source_char];
 	longcode = type >> 4;
 	type &= 15;
-	if (!flag_stringsort && OLE2NLS_isPunctuation(source_char)) 
+	if (!flag_stringsort && OLE2NLS_isPunctuation(source_char))
 	{
 	  WORD encrypted_location = (1<<15) + 7 + 4*count;
 	  *delayed_punctuation_component++ = (unsigned char) (encrypted_location>>8);
@@ -1508,14 +1508,14 @@
 			compatible with numerical comparison */
 
 	  *delayed_punctuation_component++ = type;
-	  *delayed_punctuation_component++ = LCM_Unicode_LUT[-1+2*source_char];  
-                     /* assumption : a punctuation character is never a 
+	  *delayed_punctuation_component++ = LCM_Unicode_LUT[-1+2*source_char];
+                     /* assumption : a punctuation character is never a
 			double or accented letter */
 	}
 	else
 	{
 	  dststr[2*count] = type;
-	  dststr[2*count+1] = LCM_Unicode_LUT[-1+2*source_char];  
+	  dststr[2*count+1] = LCM_Unicode_LUT[-1+2*source_char];
 	  if (longcode)
 	  {
 	    if (count<case_len)
@@ -1524,11 +1524,11 @@
 	      diacritic_component[count] = 2; /* assumption: a double letter
 						 is never accented */
 	    count++;
-	    
+
 	    dststr[2*count] = type;
-	    dststr[2*count+1] = *(LCM_Unicode_LUT_2 - 1 + longcode); 
-	    /* 16 in the first column of LCM_Unicode_LUT  -->  longcode = 1 
-	       32 in the first column of LCM_Unicode_LUT  -->  longcode = 2 
+	    dststr[2*count+1] = *(LCM_Unicode_LUT_2 - 1 + longcode);
+	    /* 16 in the first column of LCM_Unicode_LUT  -->  longcode = 1
+	       32 in the first column of LCM_Unicode_LUT  -->  longcode = 2
 	       48 in the first column of LCM_Unicode_LUT  -->  longcode = 3 */
 	  }
 
@@ -1547,7 +1547,7 @@
     return room;
   }
 }
-		     
+
 /*************************************************************************
  *              LCMapStringW                [KERNEL32.@]
  *
@@ -1562,24 +1562,24 @@
 	INT dstlen)
 {
   int i;
- 
+
   TRACE("(0x%04lx,0x%08lx,%p,%d,%p,%d)\n",
                  lcid, mapflags, srcstr, srclen, dststr, dstlen);
-  
+
   if ( ((dstlen!=0) && (dststr==NULL)) || (srcstr==NULL) )
   {
     ERR("(src=%p,dst=%p): Invalid NULL string\n", srcstr, dststr);
     SetLastError(ERROR_INVALID_PARAMETER);
     return 0;
   }
-  if (srclen==-1) 
+  if (srclen==-1)
     srclen = strlenW(srcstr)+1;
 
   /* FIXME: Both this function and it's companion LCMapStringA()
    * completely ignore the "lcid" parameter.  In place of the "lcid"
    * parameter the application must set the "LC_COLLATE" or "LC_ALL"
    * environment variable prior to invoking this function.  */
-  if (mapflags & LCMAP_SORTKEY) 
+  if (mapflags & LCMAP_SORTKEY)
   {
       /* Possible values of LC_COLLATE. */
       char *lc_collate_default = 0; /* value prior to this function */
@@ -1636,7 +1636,7 @@
       /* FIXME: Prior to to setting the LC_COLLATE locale category the
        * current value is backed up so it can be restored after the
        * last LC_COLLATE sensitive function returns.
-       * 
+       *
        * Even though the locale is adjusted for a minimum amount of
        * time a race condition exists where other threads may be
        * affected if they invoke LC_COLLATE sensitive functions.  One
@@ -1686,7 +1686,7 @@
       else if(returned_len > src_native_len)
       {
           src_native[src_native_len - 1] = 0;
-          ERR("wcstombs returned a string (%s) that was longer (%d bytes) " 
+          ERR("wcstombs returned a string (%s) that was longer (%d bytes) "
               "than expected (%d bytes).\n", src_native, returned_len,
               dst_native_len);
 
@@ -1728,11 +1728,11 @@
        * various tables as it is done in LCMapStringA().  However, I'm
        * not sure what those tables are. */
       returned_len = strxfrm(dst_native, src_native, dst_native_len) + 1;
-      
+
       if(returned_len > dst_native_len)
       {
           dst_native[dst_native_len - 1] = 0;
-          ERR("strxfrm returned a string (%s) that was longer (%d bytes) " 
+          ERR("strxfrm returned a string (%s) that was longer (%d bytes) "
               "than expected (%d bytes).\n", dst_native, returned_len,
               dst_native_len);
 
@@ -1747,7 +1747,7 @@
           return 0;
       }
       dst_native_len = returned_len;
-      
+
       TRACE("dst_native = %s  dst_native_len = %d\n",
              dst_native, dst_native_len);
 
@@ -1770,7 +1770,7 @@
 
       /* Restore LC_COLLATE now that the last LC_COLLATE sensitive
        * function has returned. */
-      setlocale(LC_COLLATE, lc_collate_default); 
+      setlocale(LC_COLLATE, lc_collate_default);
 
       if(returned_len == 0)
       {
@@ -1787,7 +1787,7 @@
       {
           if(returned_len > dstlen)
           {
-              ERR("mbstowcs returned a string that was longer (%d chars) " 
+              ERR("mbstowcs returned a string that was longer (%d chars) "
                   "than the buffer provided (%d chars).\n", returned_len,
                   dstlen);
               SetLastError(ERROR_INSUFFICIENT_BUFFER);
@@ -1795,7 +1795,7 @@
               if(src_native) HeapFree(GetProcessHeap(), 0, src_native);
               if(dst_native) HeapFree(GetProcessHeap(), 0, dst_native);
               if(dststr_libc) HeapFree(GetProcessHeap(), 0, dststr_libc);
-              return 0;          
+              return 0;
           }
           dstlen = returned_len;
 
@@ -1823,11 +1823,11 @@
   }
   else
   {
-    int (*f)(int)=identity; 
+    int (*f)(int)=identity;
 
     if (dstlen==0)
-        return srclen;  
-    if (dstlen<srclen) 
+        return srclen;
+    if (dstlen<srclen)
     {
         SetLastError(ERROR_INSUFFICIENT_BUFFER);
         return 0;
@@ -1878,13 +1878,13 @@
  * Defaults to a word sort, but uses a string sort if
  * SORT_STRINGSORT is set.
  * Calls SetLastError for ERROR_INVALID_FLAGS, ERROR_INVALID_PARAMETER.
- * 
+ *
  * BUGS
  *
  * This implementation ignores the locale
  *
  * FIXME
- * 
+ *
  * Quite inefficient.
  */
 int WINAPI CompareStringA(
@@ -1903,7 +1903,7 @@
 	debugstr_an (s1,l1), debugstr_an (s2,l2));
 
   if ( (s1==NULL) || (s2==NULL) )
-  {    
+  {
     ERR("(s1=%s,s2=%s): Invalid NULL string\n",
 	debugstr_an(s1,l1), debugstr_an(s2,l2));
     SetLastError(ERROR_INVALID_PARAMETER);
@@ -1915,7 +1915,7 @@
 
   if (l1 == -1) l1 = strlen(s1);
   if (l2 == -1) l2 = strlen(s2);
-  	
+
   mapstring_flags = LCMAP_SORTKEY | fdwStyle ;
   len1 = OLE2NLS_EstimateMappingLength(lcid, mapstring_flags, s1, l1);
   len2 = OLE2NLS_EstimateMappingLength(lcid, mapstring_flags, s2, l2);
@@ -1985,7 +1985,7 @@
  * FIXME
  *    If datelen == 0, it should return the reguired string length.
  *
- This function implements stuff for GetDateFormat() and 
+ This function implements stuff for GetDateFormat() and
  GetTimeFormat().
 
   d    single-digit (no leading zero) day (of month)
@@ -2013,7 +2013,7 @@
   ''   used to quote literal characters
   ''   (within a quoted string) indicates a literal '
 
- These functions REQUIRE valid locale, date,  and format. 
+ These functions REQUIRE valid locale, date,  and format.
  */
 static INT OLE_GetFormatA(LCID locale,
 			    DWORD flags,
@@ -2031,14 +2031,14 @@
    int buflen;
 
    const char * _dgfmt[] = { "%d", "%02d" };
-   const char ** dgfmt = _dgfmt - 1; 
+   const char ** dgfmt = _dgfmt - 1;
 
    /* report, for debugging */
    TRACE("(0x%lx,0x%lx, 0x%lx, time(y=%d m=%d wd=%d d=%d,h=%d,m=%d,s=%d), fmt=%p \'%s\' , %p, len=%d)\n",
    	 locale, flags, tflags,
 	 xtime->wYear,xtime->wMonth,xtime->wDayOfWeek,xtime->wDay, xtime->wHour, xtime->wMinute, xtime->wSecond,
 	 _format, _format, date, datelen);
-  
+
    if(datelen == 0) {
      FIXME("datelen = 0, returning 255\n");
      return 255;
@@ -2049,11 +2049,11 @@
    count = 0; inquote = 0; Overflow = 0;
    type = '\0';
    date[0] = buf[0] = '\0';
-      
+
    strcpy(format,_format);
 
    /* alter the formatstring, while it works for all languages now in wine
-   its possible that it fails when the time looks like ss:mm:hh as example*/   
+   its possible that it fails when the time looks like ss:mm:hh as example*/
    if (tflags & (TIME_NOMINUTESORSECONDS))
    { if ((pos = strstr ( format, ":mm")))
      { memcpy ( pos, pos+3, strlen(format)-(pos-format)-2 );
@@ -2064,7 +2064,7 @@
      { memcpy ( pos, pos+3, strlen(format)-(pos-format)-2 );
      }
    }
-   
+
    for (inpos = 0;; inpos++) {
       /* TRACE("STATE inpos=%2d outpos=%2d count=%d inquote=%d type=%c buf,date = %c,%c\n", inpos, outpos, count, inquote, type, buf[inpos], date[outpos]); */
       if (inquote) {
@@ -2100,8 +2100,8 @@
 				   + (xtime->wDayOfWeek+6)%7,
 				   buf, sizeof(buf));
 	       } else if (count == 3) {
-			   GetLocaleInfoA(locale, 
-					    LOCALE_SABBREVDAYNAME1 
+			   GetLocaleInfoA(locale,
+					    LOCALE_SABBREVDAYNAME1
 					    + (xtime->wDayOfWeek+6)%7,
 					    buf, sizeof(buf));
 		      } else {
@@ -2109,7 +2109,7 @@
 	       }
 	    } else if (type == 'M') {
 	       if (count == 3) {
-		  GetLocaleInfoA(locale, 
+		  GetLocaleInfoA(locale,
 				   LOCALE_SABBREVMONTHNAME1
 				   + xtime->wMonth - 1,
 				   buf, sizeof(buf));
@@ -2156,16 +2156,16 @@
                } else if (count == 2) {
                  /* sprintf(buf, "%s", (xtime->wHour < 12) ? "AM" : "PM"); */
                   GetLocaleInfoA(locale,
-                           (xtime->wHour<12) 
+                           (xtime->wHour<12)
                            ? LOCALE_S1159 : LOCALE_S2359,
                            buf, sizeof(buf));
                }
 	    };
 
-	    /* we need to check the next char in the format string 
+	    /* we need to check the next char in the format string
 	       again, no matter what happened */
 	    inpos--;
-	    
+
 	    /* add the contents of buf to the output */
 	    buflen = strlen(buf);
 	    if (outpos + buflen < datelen) {
@@ -2210,7 +2210,7 @@
        return 0;
       }
    }
-   
+
    if (Overflow) {
       SetLastError(ERROR_INSUFFICIENT_BUFFER);
    };
@@ -2220,7 +2220,7 @@
    /* sanity check */
    if (outpos > datelen-1) outpos = datelen-1;
    date[outpos] = '\0';
-   
+
    TRACE("returns string '%s', len %d\n", date, outpos);
    return outpos;
 }
@@ -2254,7 +2254,7 @@
 	 locale, flags, tflags,
 	 xtime->wDay, xtime->wHour, xtime->wMinute, xtime->wSecond,
 	 debugstr_w(format), format, output, outlen);
-   
+
    if(outlen == 0) {
      FIXME("outlen = 0, returning 255\n");
      return 255;
@@ -2266,7 +2266,7 @@
    inquote = Overflow = 0;
    /* this is really just a sanity check */
    output[0] = buf[0] = 0;
-   
+
    /* this loop is the core of the function */
    for (inpos = 0; /* we have several break points */ ; inpos++) {
       if (inquote) {
@@ -2286,7 +2286,7 @@
 	    output[outpos++] = format[inpos]; /* copy input */
 	    if (outpos > outlen) {
 	       Overflow = 1;
-	       output[outpos-1] = 0; 
+	       output[outpos-1] = 0;
 	       break;
 	    }
 	 }
@@ -2385,7 +2385,7 @@
             break;
           }
 
-	 /* no matter what happened,  we need to check this next 
+	 /* no matter what happened,  we need to check this next
 	    character the next time we loop through */
 	 inpos--;
 
@@ -2404,8 +2404,8 @@
 	 count = 0;
 	 type = '\0';
       } else if (format[inpos] == 0) {
-	 /* we can't check for this at the beginning,  because that 
-	 would keep us from printing a format spec that ended the 
+	 /* we can't check for this at the beginning,  because that
+	 would keep us from printing a format spec that ended the
 	 string */
 	 output[outpos] = 0;
 	 break;  /*  NORMAL EXIT  */
@@ -2445,9 +2445,9 @@
    output[outpos] = '0';
 
    TRACE(" returning %s\n", debugstr_w(output));
-	
+
    return (!Overflow) ? outlen : 0;
-   
+
 }
 
 
@@ -2475,9 +2475,9 @@
  */
 INT WINAPI GetDateFormatA(LCID locale,DWORD flags,
 			      const SYSTEMTIME* xtime,
-			      LPCSTR format, LPSTR date,INT datelen) 
+			      LPCSTR format, LPSTR date,INT datelen)
 {
-   
+
   char format_buf[40];
   LPCSTR thisformat;
   SYSTEMTIME t;
@@ -2489,11 +2489,11 @@
 
   TRACE("(0x%04lx,0x%08lx,%p,%s,%p,%d)\n",
 	      locale,flags,xtime,format,date,datelen);
-  
+
   if (!locale) {
      locale = LOCALE_SYSTEM_DEFAULT;
      };
-  
+
   if (locale == LOCALE_SYSTEM_DEFAULT) {
      thislocale = GetSystemDefaultLCID();
   } else if (locale == LOCALE_USER_DEFAULT) {
@@ -2514,13 +2514,13 @@
 	  SetLastError(ERROR_INVALID_PARAMETER);
 	  return 0;
 	}
-      FileTimeToSystemTime(&ft,&t); 
-     
+      FileTimeToSystemTime(&ft,&t);
+
   };
   thistime = &t;
 
   if (format == NULL) {
-     GetLocaleInfoA(thislocale, ((flags&DATE_LONGDATE) 
+     GetLocaleInfoA(thislocale, ((flags&DATE_LONGDATE)
 				   ? LOCALE_SLONGDATE
 				   : LOCALE_SSHORTDATE),
 		      format_buf, sizeof(format_buf));
@@ -2529,10 +2529,10 @@
      thisformat = format;
   };
 
-  
-  ret = OLE_GetFormatA(thislocale, flags, 0, thistime, thisformat, 
+
+  ret = OLE_GetFormatA(thislocale, flags, 0, thistime, thisformat,
 		       date, datelen);
-  
+
 
    TRACE(
 	       "GetDateFormatA() returning %d, with data=%s\n",
@@ -2555,11 +2555,11 @@
 {
    unsigned short datearr[] = {'1','9','9','4','-','1','-','1',0};
 
-   FIXME("STUB (should call OLE_GetFormatW)\n");   
+   FIXME("STUB (should call OLE_GetFormatW)\n");
    lstrcpynW(date, datearr, datelen);
    return (  datelen < 9) ? datelen : 9;
-   
-   
+
+
 }
 
 /**************************************************************************
@@ -2568,7 +2568,7 @@
 BOOL WINAPI EnumDateFormatsA(
   DATEFMT_ENUMPROCA lpDateFmtEnumProc, LCID Locale,  DWORD dwFlags)
 {
-  LCID Loc = GetUserDefaultLCID(); 
+  LCID Loc = GetUserDefaultLCID();
   if(!lpDateFmtEnumProc)
     {
       SetLastError(ERROR_INVALID_PARAMETER);
@@ -2594,11 +2594,11 @@
         if(!(*lpDateFmtEnumProc)("d. MMM yyyy")) return TRUE;
 	return TRUE;
       default:
-	FIXME("Unknown date format (%ld)\n", dwFlags); 
+	FIXME("Unknown date format (%ld)\n", dwFlags);
 	SetLastError(ERROR_INVALID_PARAMETER);
 	return FALSE;
      }
-   }       
+   }
 
    case 0x0000040c:  /* (Loc,"fr_FR") */
    {
@@ -2616,7 +2616,7 @@
         if(!(*lpDateFmtEnumProc)("d MMMM yyyy")) return TRUE;
 	return TRUE;
       default:
-	FIXME("Unknown date format (%ld)\n", dwFlags); 
+	FIXME("Unknown date format (%ld)\n", dwFlags);
 	SetLastError(ERROR_INVALID_PARAMETER);
 	return FALSE;
      }
@@ -2637,14 +2637,14 @@
         if(!(*lpDateFmtEnumProc)("d MMM yyyy")) return TRUE;
 	return TRUE;
       default:
-	FIXME("Unknown date format (%ld)\n", dwFlags); 
+	FIXME("Unknown date format (%ld)\n", dwFlags);
 	SetLastError(ERROR_INVALID_PARAMETER);
 	return FALSE;
      }
    }
 
-   case 0x00000809:  /* (Loc,"en_UK") */ 
-  {    
+   case 0x00000809:  /* (Loc,"en_UK") */
+  {
    switch(dwFlags)
     {
       case DATE_SHORTDATE:
@@ -2658,14 +2658,14 @@
         if(!(*lpDateFmtEnumProc)("d MMMM yyyy")) return TRUE;
 	return TRUE;
       default:
-	FIXME("Unknown date format (%ld)\n", dwFlags); 
+	FIXME("Unknown date format (%ld)\n", dwFlags);
 	SetLastError(ERROR_INVALID_PARAMETER);
 	return FALSE;
     }
   }
 
-   case 0x00000c09:  /* (Loc,"en_AU") */   
-  {    
+   case 0x00000c09:  /* (Loc,"en_AU") */
+  {
    switch(dwFlags)
     {
       case DATE_SHORTDATE:
@@ -2678,14 +2678,14 @@
         if(!(*lpDateFmtEnumProc)("d MMMM yyyy")) return TRUE;
 	return TRUE;
       default:
-	FIXME("Unknown date format (%ld)\n", dwFlags); 
+	FIXME("Unknown date format (%ld)\n", dwFlags);
 	SetLastError(ERROR_INVALID_PARAMETER);
 	return FALSE;
     }
   }
 
-   case 0x00001009:  /* (Loc,"en_CA") */ 
-  {    
+   case 0x00001009:  /* (Loc,"en_CA") */
+  {
    switch(dwFlags)
     {
       case DATE_SHORTDATE:
@@ -2699,14 +2699,14 @@
         if(!(*lpDateFmtEnumProc)("MMMM d, yyyy")) return TRUE;
 	return TRUE;
       default:
-	FIXME("Unknown date format (%ld)\n", dwFlags); 
+	FIXME("Unknown date format (%ld)\n", dwFlags);
 	SetLastError(ERROR_INVALID_PARAMETER);
 	return FALSE;
     }
   }
 
-   case 0x00001409:  /* (Loc,"en_NZ") */ 
-  {    
+   case 0x00001409:  /* (Loc,"en_NZ") */
+  {
    switch(dwFlags)
     {
       case DATE_SHORTDATE:
@@ -2719,14 +2719,14 @@
         if(!(*lpDateFmtEnumProc)("dddd, d MMMM yyyy")) return TRUE;
 	return TRUE;
       default:
-	FIXME("Unknown date format (%ld)\n", dwFlags); 
+	FIXME("Unknown date format (%ld)\n", dwFlags);
 	SetLastError(ERROR_INVALID_PARAMETER);
 	return FALSE;
     }
   }
 
-   case 0x00001809:  /* (Loc,"en_IE") */   
-  {    
+   case 0x00001809:  /* (Loc,"en_IE") */
+  {
    switch(dwFlags)
     {
       case DATE_SHORTDATE:
@@ -2739,14 +2739,14 @@
         if(!(*lpDateFmtEnumProc)("d MMMM yyyy")) return TRUE;
 	return TRUE;
       default:
-	FIXME("Unknown date format (%ld)\n", dwFlags); 
+	FIXME("Unknown date format (%ld)\n", dwFlags);
 	SetLastError(ERROR_INVALID_PARAMETER);
 	return FALSE;
     }
   }
 
-   case 0x00001c09:  /* (Loc,"en_ZA") */   
-  {    
+   case 0x00001c09:  /* (Loc,"en_ZA") */
+  {
    switch(dwFlags)
     {
       case DATE_SHORTDATE:
@@ -2756,14 +2756,14 @@
         if(!(*lpDateFmtEnumProc)("dd MMMM yyyy")) return TRUE;
 	return TRUE;
       default:
-	FIXME("Unknown date format (%ld)\n", dwFlags); 
+	FIXME("Unknown date format (%ld)\n", dwFlags);
 	SetLastError(ERROR_INVALID_PARAMETER);
 	return FALSE;
     }
   }
 
-   case 0x00002009:  /* (Loc,"en_JM") */  
-  {    
+   case 0x00002009:  /* (Loc,"en_JM") */
+  {
    switch(dwFlags)
     {
       case DATE_SHORTDATE:
@@ -2776,15 +2776,15 @@
         if(!(*lpDateFmtEnumProc)("dd MMMM,yyyy")) return TRUE;
 	return TRUE;
       default:
-	FIXME("Unknown date format (%ld)\n", dwFlags); 
+	FIXME("Unknown date format (%ld)\n", dwFlags);
 	SetLastError(ERROR_INVALID_PARAMETER);
 	return FALSE;
     }
   }
 
    case 0x00002809:  /* (Loc,"en_BZ") */
-   case 0x00002c09:  /* (Loc,"en_TT") */  
-  {    
+   case 0x00002c09:  /* (Loc,"en_TT") */
+  {
    switch(dwFlags)
     {
       case DATE_SHORTDATE:
@@ -2794,7 +2794,7 @@
         if(!(*lpDateFmtEnumProc)("dddd,dd MMMM yyyy")) return TRUE;
 	return TRUE;
       default:
-	FIXME("Unknown date format (%ld)\n", dwFlags); 
+	FIXME("Unknown date format (%ld)\n", dwFlags);
 	SetLastError(ERROR_INVALID_PARAMETER);
 	return FALSE;
     }
@@ -2819,7 +2819,7 @@
         if(!(*lpDateFmtEnumProc)("dd MMMM, yyyy")) return TRUE;
 	return TRUE;
       default:
-	FIXME("Unknown date format (%ld)\n", dwFlags); 
+	FIXME("Unknown date format (%ld)\n", dwFlags);
 	SetLastError(ERROR_INVALID_PARAMETER);
 	return FALSE;
     }
@@ -2844,7 +2844,7 @@
 BOOL WINAPI EnumTimeFormatsA(
   TIMEFMT_ENUMPROCA lpTimeFmtEnumProc, LCID Locale, DWORD dwFlags)
 {
-  LCID Loc = GetUserDefaultLCID(); 
+  LCID Loc = GetUserDefaultLCID();
   if(!lpTimeFmtEnumProc)
     {
       SetLastError(ERROR_INVALID_PARAMETER);
@@ -2852,20 +2852,20 @@
     }
   if(dwFlags)
     {
-      FIXME("Unknown time format (%ld)\n", dwFlags); 
+      FIXME("Unknown time format (%ld)\n", dwFlags);
     }
 
   switch( Loc )
  {
    case 0x00000407:  /* (Loc,"de_DE") */
    {
-    if(!(*lpTimeFmtEnumProc)("HH.mm")) return TRUE; 
+    if(!(*lpTimeFmtEnumProc)("HH.mm")) return TRUE;
     if(!(*lpTimeFmtEnumProc)("HH:mm:ss")) return TRUE;
     if(!(*lpTimeFmtEnumProc)("H:mm:ss")) return TRUE;
     if(!(*lpTimeFmtEnumProc)("H.mm")) return TRUE;
     if(!(*lpTimeFmtEnumProc)("H.mm'Uhr'")) return TRUE;
     return TRUE;
-   }       
+   }
 
    case 0x0000040c:  /* (Loc,"fr_FR") */
    case 0x00000c0c:  /* (Loc,"fr_CA") */
@@ -2879,9 +2879,9 @@
    }
 
    case 0x00000809:  /* (Loc,"en_UK") */
-   case 0x00000c09:  /* (Loc,"en_AU") */ 
+   case 0x00000c09:  /* (Loc,"en_AU") */
    case 0x00001409:  /* (Loc,"en_NZ") */
-   case 0x00001809:  /* (Loc,"en_IE") */ 
+   case 0x00001809:  /* (Loc,"en_IE") */
    {
     if(!(*lpTimeFmtEnumProc)("h:mm:ss tt")) return TRUE;
     if(!(*lpTimeFmtEnumProc)("HH:mm:ss")) return TRUE;
@@ -2889,16 +2889,16 @@
     return TRUE;
    }
 
-   case 0x00001c09:  /* (Loc,"en_ZA") */   
+   case 0x00001c09:  /* (Loc,"en_ZA") */
    case 0x00002809:  /* (Loc,"en_BZ") */
-   case 0x00002c09:  /* (Loc,"en_TT") */ 
+   case 0x00002c09:  /* (Loc,"en_TT") */
    {
     if(!(*lpTimeFmtEnumProc)("h:mm:ss tt")) return TRUE;
-    if(!(*lpTimeFmtEnumProc)("hh:mm:ss tt")) return TRUE; 
-    return TRUE;  
+    if(!(*lpTimeFmtEnumProc)("hh:mm:ss tt")) return TRUE;
+    return TRUE;
    }
 
-   default:  /* default to US style "en_US" */   
+   default:  /* default to US style "en_US" */
    {
     if(!(*lpTimeFmtEnumProc)("h:mm:ss tt")) return TRUE;
     if(!(*lpTimeFmtEnumProc)("hh:mm:ss tt")) return TRUE;
@@ -2923,9 +2923,9 @@
 /**************************************************************************
  *           This function is used just locally !
  *  Description: Inverts a string.
- */ 
+ */
 static void OLE_InvertString(char* string)
-{    
+{
     char    sTmpArray[128];
     INT     counter, i = 0;
 
@@ -2942,12 +2942,12 @@
  *           This function is used just locally !
  *  Description: Test if the given string (psNumber) is valid or not.
  *               The valid characters are the following:
- *               - Characters '0' through '9'. 
- *               - One decimal point (dot) if the number is a floating-point value. 
- *               - A minus sign in the first character position if the number is 
+ *               - Characters '0' through '9'.
+ *               - One decimal point (dot) if the number is a floating-point value.
+ *               - A minus sign in the first character position if the number is
  *                 a negative value.
  *              If the function succeeds, psBefore/psAfter will point to the string
- *              on the right/left of the decimal symbol. pbNegative indicates if the 
+ *              on the right/left of the decimal symbol. pbNegative indicates if the
  *              number is negative.
  */
 static INT OLE_GetNumberComponents(char* pInput, char* psBefore, char* psAfter, BOOL* pbNegative)
@@ -2961,7 +2961,7 @@
 		*pbNegative = TRUE;
 		pInput++; /* Jump to the next character. */
 	}
-	
+
 	while(*pInput != '\0')
 	{
 		/* Do we have a valid numeric character */
@@ -2993,17 +2993,17 @@
 		}
         pInput++;
 	}
-	
+
 	/* Add an End of Line character to the output buffers */
 	*psBefore = '\0';
 	*psAfter = '\0';
 
-	return 0; 
+	return 0;
 }
 
 /**************************************************************************
  *           This function is used just locally !
- *  Description: A number could be formatted using different numbers 
+ *  Description: A number could be formatted using different numbers
  *               of "digits in group" (example: 4;3;2;0).
  *               The first parameter of this function is an array
  *               containing the rule to be used. Its format is the following:
@@ -3026,16 +3026,16 @@
     {
         memcpy(sData, sRule+index, 1);
         memcpy(sData+1, "\0", 1);
-        nData = atoi(sData);            
+        nData = atoi(sData);
     }
-        
+
     else
     {
         memcpy(sData, sRule+nRuleSize-1, 1);
         memcpy(sData+1, "\0", 1);
-        nData = atoi(sData);            
+        nData = atoi(sData);
     }
-    
+
     return nData;
 }
 
@@ -3049,11 +3049,11 @@
     char   sNumberDigits[3], sDecimalSymbol[5], sDigitsInGroup[11], sDigitGroupSymbol[5], sILZero[2];
     INT    nNumberDigits, nNumberDecimal, i, j, nCounter, nStep, nRuleIndex, nGrouping, nDigits, retVal, nLZ;
     char   sNumber[128], sDestination[128], sDigitsAfterDecimal[10], sDigitsBeforeDecimal[128];
-    char   sRule[10], sSemiColumn[]=";", sBuffer[5], sNegNumber[2];    
+    char   sRule[10], sSemiColumn[]=";", sBuffer[5], sNegNumber[2];
     char   *pStr = NULL, *pTmpStr = NULL;
     LCID   systemDefaultLCID;
     BOOL   bNegative = FALSE;
-    enum   Operations 
+    enum   Operations
     {
         USE_PARAMETER,
         USE_LOCALEINFO,
@@ -3084,7 +3084,7 @@
     if (lpFormat != NULL)
     {
         if (dwflags == 0)
-            used_operation = USE_PARAMETER; 
+            used_operation = USE_PARAMETER;
     }
     else
     {
@@ -3128,7 +3128,7 @@
     }
 
     nNumberDigits = atoi(sNumberDigits);
-    
+
     /* Remove the ";" */
     i=0;
     j = 1;
@@ -3144,9 +3144,9 @@
     sprintf(sBuffer, "%d", i);
     memcpy(sRule, sBuffer, 1); /* Number of digits in the groups ( used by OLE_GetGrouping() ) */
     memcpy(sRule + j, "\0", 1);
-    
+
     /* First, format the digits before the decimal. */
-    if ((nNumberDecimal>0) && (atoi(sDigitsBeforeDecimal) != 0)) 
+    if ((nNumberDecimal>0) && (atoi(sDigitsBeforeDecimal) != 0))
     {
         /* Working on an inverted string is easier ! */
         OLE_InvertString(sDigitsBeforeDecimal);
@@ -3154,9 +3154,9 @@
         nStep = nCounter = i = j = 0;
         nRuleIndex = 1;
         nGrouping = OLE_GetGrouping(sRule, nRuleIndex);
-        
+
         /* Here, we will loop until we reach the end of the string.
-         * An internal counter (j) is used in order to know when to 
+         * An internal counter (j) is used in order to know when to
          * insert the "digit group symbol".
          */
         while (nNumberDecimal > 0)
@@ -3186,7 +3186,7 @@
      {
         nLZ = atoi(sILZero);
         if (nLZ != 0)
-        {        
+        {
             /* Use 0.xxx instead of .xxx */
             memcpy(sDestination, "0", 1);
             memcpy(sDestination+1, "\0", 1);
@@ -3201,29 +3201,29 @@
     nCounter = nNumberDigits;
     if ( (nDigits>0) && (pStr = strstr (sNumber, ".")) )
     {
-        i = strlen(sNumber) - strlen(pStr) + 1;        
+        i = strlen(sNumber) - strlen(pStr) + 1;
         strncpy ( sDigitsAfterDecimal, sNumber + i, nNumberDigits);
         j = strlen(sDigitsAfterDecimal);
         if (j < nNumberDigits)
-            nCounter = nNumberDigits-j;            
+            nCounter = nNumberDigits-j;
     }
     for (i=0;i<nCounter;i++)
-         memcpy(sDigitsAfterDecimal+i+j, "0", 1);    
-    memcpy(sDigitsAfterDecimal + nNumberDigits, "\0", 1);    
+         memcpy(sDigitsAfterDecimal+i+j, "0", 1);
+    memcpy(sDigitsAfterDecimal + nNumberDigits, "\0", 1);
 
     i = strlen(sDestination);
     j = strlen(sDigitsAfterDecimal);
     /* Finally, construct the resulting formatted string. */
-        
+
     for (nCounter=0; nCounter<i; nCounter++)
         memcpy(sNumber + nCounter, sDestination + nCounter, 1);
-       
+
     memcpy(sNumber + nCounter, sDecimalSymbol, strlen(sDecimalSymbol));
 
     for (i=0; i<j; i++)
         memcpy(sNumber + nCounter+i+strlen(sDecimalSymbol), sDigitsAfterDecimal + i, 1);
     memcpy(sNumber + nCounter+i+strlen(sDecimalSymbol), "\0", 1);
-        
+
     /* Is it a negative number */
     if (bNegative == TRUE)
     {
@@ -3231,13 +3231,13 @@
         pStr = sDestination;
         pTmpStr = sNumber;
         switch (i)
-        {          
+        {
         case 0:
             *pStr++ = '(';
             while (*sNumber != '\0')
                 *pStr++ =  *pTmpStr++;
-            *pStr++ = ')';                
-            break;  
+            *pStr++ = ')';
+            break;
         case 1:
             *pStr++ = '-';
             while (*pTmpStr != '\0')
@@ -3269,7 +3269,7 @@
     else
         strcpy(sDestination, sNumber);
 
-    /* If cchNumber is zero, then returns the number of bytes or characters 
+    /* If cchNumber is zero, then returns the number of bytes or characters
      * required to hold the formatted number string
      */
     retVal = strlen(sDestination) + 1;
@@ -3309,7 +3309,7 @@
     char   *pNumberFormated = sNumberFormated;
     LCID   systemDefaultLCID;
     BOOL   bIsPositive = FALSE, bValidFormat = FALSE;
-    enum   Operations 
+    enum   Operations
     {
         USE_PARAMETER,
         USE_LOCALEINFO,
@@ -3324,7 +3324,7 @@
     if (lpFormat != NULL)
     {
         if (dwflags == 0)
-            used_operation = USE_PARAMETER; 
+            used_operation = USE_PARAMETER;
     }
     else
     {
@@ -3337,28 +3337,28 @@
     /* Load the fields we need */
     switch(used_operation)
     {
-    case USE_LOCALEINFO:        
+    case USE_LOCALEINFO:
         /* Specific to CURRENCYFMTA */
         GetLocaleInfoA(locale, LOCALE_INEGCURR, sNegOrder, sizeof(sNegOrder));
         GetLocaleInfoA(locale, LOCALE_ICURRENCY, sPosOrder, sizeof(sPosOrder));
         GetLocaleInfoA(locale, LOCALE_SCURRENCY, sCurrencySymbol, sizeof(sCurrencySymbol));
-        
+
         nPosOrder = atoi(sPosOrder);
         nNegOrder = atoi(sNegOrder);
         break;
-    case USE_PARAMETER:        
+    case USE_PARAMETER:
         /* Specific to CURRENCYFMTA */
         nNegOrder = lpFormat->NegativeOrder;
         nPosOrder = lpFormat->PositiveOrder;
         strcpy(sCurrencySymbol, lpFormat->lpCurrencySymbol);
         break;
     case USE_SYSTEMDEFAULT:
-        systemDefaultLCID = GetSystemDefaultLCID();        
+        systemDefaultLCID = GetSystemDefaultLCID();
         /* Specific to CURRENCYFMTA */
         GetLocaleInfoA(systemDefaultLCID, LOCALE_INEGCURR, sNegOrder, sizeof(sNegOrder));
         GetLocaleInfoA(systemDefaultLCID, LOCALE_ICURRENCY, sPosOrder, sizeof(sPosOrder));
         GetLocaleInfoA(systemDefaultLCID, LOCALE_SCURRENCY, sCurrencySymbol, sizeof(sCurrencySymbol));
-        
+
         nPosOrder = atoi(sPosOrder);
         nNegOrder = atoi(sNegOrder);
         break;
@@ -3366,7 +3366,7 @@
         SetLastError(ERROR_INVALID_PARAMETER);
         return 0;
     }
-    
+
     /* Construct a temporary number format structure */
     if (lpFormat != NULL)
     {
@@ -3390,7 +3390,7 @@
         bIsPositive = TRUE;
         retVal = GetNumberFormatA(locale,0,lpvalue,(bValidFormat)?&numberFmt:NULL,pNumberFormated,128);
     }
-        
+
     if (retVal == 0)
         return 0;
 
@@ -3505,14 +3505,14 @@
             strcat (pDestination, sCurrencySymbol);
             break;
         case 14:   /* format: ($ 1.1) */
-            strcpy (pDestination, "("); 
+            strcpy (pDestination, "(");
             strcat (pDestination, sCurrencySymbol);
             strcat (pDestination, " ");
             strcat (pDestination, pNumberFormated);
             strcat (pDestination, ")");
             break;
         case 15:   /* format: (1.1 $) */
-            strcpy (pDestination, "("); 
+            strcpy (pDestination, "(");
             strcat (pDestination, pNumberFormated);
             strcat (pDestination, " ");
             strcat (pDestination, sCurrencySymbol);
@@ -3547,17 +3547,17 @@
 
 /******************************************************************************
  *		OLE2NLS_CheckLocale	[intern]
- */ 
+ */
 static LCID OLE2NLS_CheckLocale (LCID locale)
 {
-	if (!locale) 
+	if (!locale)
 	{ locale = LOCALE_SYSTEM_DEFAULT;
 	}
-  
-	if (locale == LOCALE_SYSTEM_DEFAULT) 
+
+	if (locale == LOCALE_SYSTEM_DEFAULT)
   	{ return GetSystemDefaultLCID();
-	} 
-	else if (locale == LOCALE_USER_DEFAULT) 
+	}
+	else if (locale == LOCALE_USER_DEFAULT)
 	{ return GetUserDefaultLCID();
 	}
 	else
@@ -3583,13 +3583,13 @@
  * tt time marker (AM, PM)
  *
  */
-INT WINAPI 
+INT WINAPI
 GetTimeFormatA(LCID locale,        /* [in]  */
 	       DWORD flags,        /* [in]  */
 	       const SYSTEMTIME* xtime, /* [in]  */
 	       LPCSTR format,      /* [in]  */
 	       LPSTR timestr,      /* [out] */
-	       INT timelen         /* [in]  */) 
+	       INT timelen         /* [in]  */)
 { char format_buf[40];
   LPCSTR thisformat;
   SYSTEMTIME t;
@@ -3597,26 +3597,26 @@
   LCID thislocale=0;
   DWORD thisflags=LOCALE_STIMEFORMAT; /* standard timeformat */
   INT ret;
-    
+
   TRACE("GetTimeFormat(0x%04lx,0x%08lx,%p,%s,%p,%d)\n",locale,flags,xtime,format,timestr,timelen);
 
   thislocale = OLE2NLS_CheckLocale ( locale );
 
-  if (format == NULL) 
+  if (format == NULL)
   { if (flags & LOCALE_NOUSEROVERRIDE)  /* use system default */
     { thislocale = GetSystemDefaultLCID();
     }
     GetLocaleInfoA(thislocale, thisflags, format_buf, sizeof(format_buf));
     thisformat = format_buf;
   }
-  else 
+  else
   { thisformat = format;
   }
-  
+
   if (xtime == NULL) /* NULL means use the current local time */
   { GetLocalTime(&t);
     thistime = &t;
-  } 
+  }
   else
   { thistime = xtime;
   /* Check that hour,min and sec is in range */
@@ -3631,13 +3631,13 @@
  *		GetTimeFormatW	[KERNEL32.@]
  * Makes a Unicode string of the time
  */
-INT WINAPI 
+INT WINAPI
 GetTimeFormatW(LCID locale,        /* [in]  */
 	       DWORD flags,        /* [in]  */
 	       const SYSTEMTIME* xtime, /* [in]  */
 	       LPCWSTR format,     /* [in]  */
 	       LPWSTR timestr,     /* [out] */
-	       INT timelen         /* [in]  */) 
+	       INT timelen         /* [in]  */)
 {	WCHAR format_buf[40];
 	LPCWSTR thisformat;
 	SYSTEMTIME t;
@@ -3645,27 +3645,27 @@
 	LCID thislocale=0;
 	DWORD thisflags=LOCALE_STIMEFORMAT; /* standard timeformat */
 	INT ret;
-	    
+
 	TRACE("GetTimeFormat(0x%04lx,0x%08lx,%p,%s,%p,%d)\n",locale,flags,
 	xtime,debugstr_w(format),timestr,timelen);
 
 	thislocale = OLE2NLS_CheckLocale ( locale );
 
-	if (format == NULL) 
+	if (format == NULL)
 	{ if (flags & LOCALE_NOUSEROVERRIDE)  /* use system default */
 	  { thislocale = GetSystemDefaultLCID();
 	  }
 	  GetLocaleInfoW(thislocale, thisflags, format_buf, 40);
 	  thisformat = format_buf;
-	}	  
-	else 
+	}
+	else
 	{ thisformat = format;
 	}
- 
+
 	if (xtime == NULL) /* NULL means use the current local time */
 	{ GetLocalTime(&t);
 	  thistime = &t;
-	} 
+	}
 	else
 	{ thistime = xtime;
 	}
diff --git a/programs/avitools/aviinfo.c b/programs/avitools/aviinfo.c
index 1f717f8..fca40ac 100644
--- a/programs/avitools/aviinfo.c
+++ b/programs/avitools/aviinfo.c
@@ -62,7 +62,7 @@
 	XXT(AVIStreamInfo);
 #undef XX
 #undef XXT
-    
+
     fnAVIFileInit();
     if (-1==GetFileAttributes(cmdline)) {
     	fprintf(stderr,"Usage: aviinfo <avifilename>\n");
@@ -139,7 +139,7 @@
 	    case streamtypeVIDEO:
 	    	vids = ast;
 		break;
-	    case streamtypeAUDIO: 
+	    case streamtypeAUDIO:
 	    	auds = ast;
 		break;
 	    default:  {
@@ -154,5 +154,5 @@
     }
     fnAVIFileRelease(avif);
     fnAVIFileExit();
-    return 0;    
+    return 0;
 }
diff --git a/programs/avitools/aviplay.c b/programs/avitools/aviplay.c
index b013ff3..64e857d 100644
--- a/programs/avitools/aviplay.c
+++ b/programs/avitools/aviplay.c
@@ -1,6 +1,6 @@
 /*
  * Very simple AVIPLAYER
- * 
+ *
  * Copyright 1999 Marcus Meissner
  *
  * This library is free software; you can redistribute it and/or
@@ -16,7 +16,7 @@
  * 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
- * 
+ *
  * Status:
  * 	- plays .avi streams, video only
  *	- requires MicroSoft avifil32.dll and builtin msvfw32.dll.
@@ -25,9 +25,9 @@
  *	- audio support (including synchronization etc)
  *	- replace DirectDraw by a 'normal' window, including dithering, controls
  *	  etc.
- *	
+ *
  * Bugs:
- *	- no time scheduling, video plays too fast using DirectDraw/XF86DGA 
+ *	- no time scheduling, video plays too fast using DirectDraw/XF86DGA
  *	- requires DirectDraw with all disadvantages.
  */
 
@@ -98,7 +98,7 @@
 #undef XX
 #undef XXT
 
-    
+
     fnAVIFileInit();
     if (-1==GetFileAttributes(cmdline)) {
     	fprintf(stderr,"Usage: aviplay <avifilename>\n");
@@ -137,7 +137,7 @@
 	    case streamtypeVIDEO:
 	    	vids = ast;
 		break;
-	    case streamtypeAUDIO: 
+	    case streamtypeAUDIO:
 	    	auds = ast;
 		break;
 	    default:  {
@@ -277,5 +277,5 @@
     fprintf(stderr,"%d frames at %g frames/s\n",pos,pos*1.0/(tend-tstart));
     fnAVIFileRelease(avif);
     fnAVIFileExit();
-    return 0;    
+    return 0;
 }
diff --git a/programs/avitools/icinfo.c b/programs/avitools/icinfo.c
index 64b9b7e..7bad5ac 100644
--- a/programs/avitools/icinfo.c
+++ b/programs/avitools/icinfo.c
@@ -89,6 +89,6 @@
 		ICConfigure(hic,0);
 	fnICClose(hic);
     }
-    return 0;    
+    return 0;
 }
 
diff --git a/programs/clock/language.c b/programs/clock/language.c
index 54f2af0..5495680 100644
--- a/programs/clock/language.c
+++ b/programs/clock/language.c
@@ -30,9 +30,9 @@
 VOID LANGUAGE_UpdateMenuCheckmarks(VOID) {
 
     if(Globals.bAnalog == TRUE) {
-    
+
         /* analog clock */
-        
+
         CheckMenuItem(Globals.hPropertiesMenu, 0x100, \
                        MF_BYCOMMAND | MF_CHECKED);
         CheckMenuItem(Globals.hPropertiesMenu, 0x101, \
@@ -40,20 +40,20 @@
         EnableMenuItem(Globals.hPropertiesMenu, 0x103, \
                        MF_BYCOMMAND | MF_GRAYED);
     }
-        else 
+        else
     {
-    
+
         /* digital clock */
-        
+
         CheckMenuItem(Globals.hPropertiesMenu, 0x100, \
                        MF_BYCOMMAND | MF_UNCHECKED);
         CheckMenuItem(Globals.hPropertiesMenu, 0x101, \
                        MF_BYCOMMAND | MF_CHECKED);
         EnableMenuItem(Globals.hPropertiesMenu, 0x103, \
                        MF_BYCOMMAND);
-                       
+
     }
-    
+
     CheckMenuItem(Globals.hPropertiesMenu, 0x105, MF_BYCOMMAND | \
                  (Globals.bWithoutTitle ? MF_CHECKED : MF_UNCHECKED));
     CheckMenuItem(Globals.hSystemMenu, 0x10D, MF_BYCOMMAND | \
@@ -68,9 +68,9 @@
 
   CHAR szCaption[MAX_STRING_LEN];
   CHAR szDate[MAX_STRING_LEN];
-  
+
   LPSTR date = szDate;
-  
+
   SYSTEMTIME st;
   LPSYSTEMTIME lpst = &st;
 
@@ -110,7 +110,7 @@
   /* specific for Clock: */
 
   LANGUAGE_UpdateMenuCheckmarks();
-  LANGUAGE_UpdateWindowCaption();   
+  LANGUAGE_UpdateWindowCaption();
 
   Globals.hSystemMenu = GetSystemMenu(Globals.hMainWnd, TRUE);
 
diff --git a/programs/clock/license.h b/programs/clock/license.h
index 6dac3b2..94dd3e8 100644
--- a/programs/clock/license.h
+++ b/programs/clock/license.h
@@ -21,7 +21,7 @@
 
 
 /* function prototypes */
- 
+
 VOID WineLicense(HWND hWnd);
 VOID WineWarranty(HWND hWnd);
 
@@ -37,7 +37,7 @@
 
 /* external references */
 
-/* 
+/*
 extern LICENSE WineLicense_Ca;
 extern LICENSE WineLicense_Cz;
 extern LICENSE WineLicense_Da;
diff --git a/programs/clock/main.c b/programs/clock/main.c
index 9b39a70..c439676 100644
--- a/programs/clock/main.c
+++ b/programs/clock/main.c
@@ -43,23 +43,23 @@
  */
 
 int CLOCK_MenuCommand (WPARAM wParam)
-{  
+{
 CHAR szApp[MAX_STRING_LEN];
 CHAR szAppRelease[MAX_STRING_LEN];
    switch (wParam) {
 	/* switch to analog */
-     case 0x100: { 
+     case 0x100: {
          Globals.bAnalog = TRUE;
          LANGUAGE_UpdateMenuCheckmarks();
 	 SendMessage(Globals.hMainWnd, WM_PAINT, 0, 0);
-	 break;	     
-       } 
+	 break;
+       }
 	/* switch to digital */
      case 0x101: {
          Globals.bAnalog = FALSE;
          LANGUAGE_UpdateMenuCheckmarks();
 	 SendMessage(Globals.hMainWnd, WM_PAINT, 0, 0);
-	 break;	       
+	 break;
        }
 	/* change font */
      case 0x103: {
@@ -67,18 +67,18 @@
          break;
        }
 	/* hide title bar */
-     case 0x105: {     
+     case 0x105: {
          Globals.bWithoutTitle = !Globals.bWithoutTitle;
          LANGUAGE_UpdateWindowCaption();
          LANGUAGE_UpdateMenuCheckmarks();
          break;
-       } 
+       }
 	/* always on top */
      case 0x10D: {
          Globals.bAlwaysOnTop = !Globals.bAlwaysOnTop;
          LANGUAGE_UpdateMenuCheckmarks();
          break;
-       }  
+       }
 	/* show or hide seconds */
      case 0x107: {
          Globals.bSeconds = !Globals.bSeconds;
@@ -113,7 +113,7 @@
        }
      /* Handle languages */
 /*     default:
-         LANGUAGE_DefaultHandle(wParam); 
+         LANGUAGE_DefaultHandle(wParam);
 */
    }
    return 0;
@@ -166,7 +166,7 @@
         case WM_RBUTTONUP: {
 	    printf("WM_RBUTTONUP\n");
             Globals.bWithoutTitle = !Globals.bWithoutTitle;
-            LANGUAGE_UpdateMenuCheckmarks();               
+            LANGUAGE_UpdateMenuCheckmarks();
             LANGUAGE_UpdateWindowCaption();
             UpdateWindow (Globals.hMainWnd);
             break;
@@ -179,7 +179,7 @@
 	        DrawFace(context);
 	        Idle(context);
 	    }
-	       else 
+	       else
             {
                /* do nothing */
             }
@@ -196,11 +196,11 @@
             OldSecond.DontRedraw = TRUE;
 	    break;
         }
-	  
+
         case WM_COMMAND: {
             CLOCK_MenuCommand(wParam);
             break;
-        } 
+        }
 
         case WM_DESTROY: {
             printf("WM_DESTROY\n");
@@ -225,7 +225,7 @@
 {
     MSG      msg;
     WNDCLASS class;
-    
+
     char szClassName[] = "CLClass";  /* To make sure className >= 0x10000 */
     char szWinName[]   = "Clock";
 
@@ -236,10 +236,10 @@
     Globals.lpszIcoFile     = "clock.ico";
 
     Globals.hInstance       = hInstance;
-    Globals.hMainIcon       = ExtractIcon(Globals.hInstance, 
+    Globals.hMainIcon       = ExtractIcon(Globals.hInstance,
                                           Globals.lpszIcoFile, 0);
-                                          
-    if (!Globals.hMainIcon) Globals.hMainIcon = 
+
+    if (!Globals.hMainIcon) Globals.hMainIcon =
                                   LoadIcon(0, MAKEINTRESOURCE(DEFAULTICON));
 
     if (!prev){
@@ -260,7 +260,7 @@
     Globals.hMainWnd = CreateWindow (szClassName, szWinName, WS_OVERLAPPEDWINDOW,
         CW_USEDEFAULT, CW_USEDEFAULT, Globals.MaxX, Globals.MaxY, 0,
         LoadMenu(Globals.hInstance, STRING_MENU_Xx), Globals.hInstance, 0);
-			
+
     LANGUAGE_LoadMenus();
     SetMenu(Globals.hMainWnd, Globals.hMainMenu);
 
@@ -281,6 +281,6 @@
     }
 
     /* We will never reach the following statement !   */
-    return 0;    
+    return 0;
 }
 
diff --git a/programs/clock/main.h b/programs/clock/main.h
index 79f08b0..7e8f8b6 100644
--- a/programs/clock/main.h
+++ b/programs/clock/main.h
@@ -50,7 +50,7 @@
   BOOL    bAlwaysOnTop;
   BOOL    bWithoutTitle;
   BOOL    bSeconds;
-  BOOL    bDate;  
+  BOOL    bDate;
 
   int     MaxX;
   int     MaxY;
@@ -67,11 +67,11 @@
 extern CHAR STRING_MENU_Xx[];
 
    #define STRINGID(id) (0x##id + Globals.wStringTableOffset)
-   
+
 #else  /* RC_INVOKED */
 
    #define STRINGID(id) id
-   
+
 #endif
 
 /* string table index */
diff --git a/programs/clock/winclock.c b/programs/clock/winclock.c
index b96839b..16c8926 100644
--- a/programs/clock/winclock.c
+++ b/programs/clock/winclock.c
@@ -1,4 +1,4 @@
-/* 
+/*
  *  Clock (winclock.c)
  *
  *  Copyright 1998 by Marcel Baur <mbaur@g26.ethz.ch>
@@ -45,7 +45,7 @@
 int MiddleX(void) {
   int X, diff;
 
-  X    = (Globals.MaxX/2);  
+  X    = (Globals.MaxX/2);
   diff = (Globals.MaxX-Globals.MaxY);
   if (diff>0) { X = (X-(diff/2)); }
   return X;
@@ -53,7 +53,7 @@
 
 int MiddleY(void) {
   int Y, diff;
-  
+
   Y    = (Globals.MaxY/2);
   diff = (Globals.MaxX-Globals.MaxY);
   if (diff<0) { Y = Y+(diff/2); }
@@ -63,7 +63,7 @@
 void DrawFace(HDC dc)
 {
   int MidX, MidY, t, DiffX, DiffY;
-  
+
   MidX = MiddleX();
   MidY = MiddleY();
   DiffX = (Globals.MaxX-MidX*2)/2;
@@ -119,7 +119,7 @@
   Sx = MidX; Sy = MidY;
   Ex = MidX+sin(Pos*Pi/6000)*XExt;
   Ey = MidY-cos(Pos*Pi/6000)*YExt;
-  rv = ( Sx!=OldHour.StartX || Ex!=OldHour.EndX || 
+  rv = ( Sx!=OldHour.StartX || Ex!=OldHour.EndX ||
 	 Sy!=OldHour.StartY || Ey!=OldHour.EndY );
   if (Globals.bAnalog && rv)DrawHourHand(dc);
   OldHour.StartX = Sx; OldHour.EndX = Ex;
@@ -152,7 +152,7 @@
   BOOL rv;
 
   rv = FALSE;
-  
+
   if (Globals.bSeconds) {
     Sx = MidX; Sy = MidY;
     Ex = MidX+sin(Pos*Pi/3000)*XExt;
@@ -164,7 +164,7 @@
     OldSecond.StartY = Sy; OldSecond.EndY = Ey;
     OldSecond.DontRedraw=FALSE;
   }
-  
+
   return rv;
 }
 
@@ -174,23 +174,23 @@
   LPSTR time = szTime;
   static short xChar, yChar;
   TEXTMETRIC tm;
-  
+
   SYSTEMTIME st;
   LPSYSTEMTIME lpst = &st;
-  
+
   GetLocalTime(&st);
-  GetTimeFormat(LOCALE_USER_DEFAULT, LOCALE_STIMEFORMAT, lpst, NULL, time, 
+  GetTimeFormat(LOCALE_USER_DEFAULT, LOCALE_STIMEFORMAT, lpst, NULL, time,
                 MAX_STRING_LEN);
-                
+
   SelectObject(dc,CreatePen(PS_SOLID,1,FaceColor));
   xChar = tm.tmAveCharWidth;
   yChar = tm.tmHeight;
-  
+
   xChar = 100;
   yChar = 100;
-  TextOut (dc, xChar, yChar, szTime, strlen (szTime)); 
+  TextOut (dc, xChar, yChar, szTime, strlen (szTime));
   DeleteObject(SelectObject(dc,GetStockObject(NULL_PEN)));
-              
+
 }
 
 
@@ -231,8 +231,8 @@
         DrawMinuteHand(dc);
         DrawHourHand(dc);
       }
-  DeleteObject(SelectObject(dc,GetStockObject(NULL_PEN))); 
-  
+  DeleteObject(SelectObject(dc,GetStockObject(NULL_PEN)));
+
 }
 
 void Idle(HDC idc)
@@ -250,7 +250,7 @@
   {
     AnalogClock(context);
   }
-  else 
+  else
   {
     DigitalClock(context);
   }
diff --git a/programs/clock/winclock.h b/programs/clock/winclock.h
index 199b9ab..3f5e8b4 100644
--- a/programs/clock/winclock.h
+++ b/programs/clock/winclock.h
@@ -1,4 +1,4 @@
-/* 
+/*
  *  Clock (winclock.h)
  *
  *  Copyright 1998 by Marcel Baur <mbaur@g26.ethz.ch>
@@ -22,7 +22,7 @@
  */
 
  #include <windows.h>
- 
+
 typedef struct
 {
   int StartX,StartY,EndX,EndY;
diff --git a/programs/control/control.c b/programs/control/control.c
index e4de144..3e8261c 100644
--- a/programs/control/control.c
+++ b/programs/control/control.c
@@ -1,4 +1,4 @@
-/* 
+/*
  *   Control
  *   Copyright (C) 1998 by Marcel Baur <mbaur@g26.ethz.ch>
  *
@@ -31,7 +31,7 @@
   exit(0);
 }
 
-int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrev, CHAR *szParam, INT argc) 
+int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrev, CHAR *szParam, INT argc)
 {
 
   char szParams[255];
@@ -69,5 +69,5 @@
 
     default: printf("Syntax error.");
   }
-  return 0;  
+  return 0;
 }
diff --git a/programs/control/params.h b/programs/control/params.h
index e721357..dcdb49f 100644
--- a/programs/control/params.h
+++ b/programs/control/params.h
@@ -1,4 +1,4 @@
-/* 
+/*
  *   Control
  *   Copyright (C) 1998 by Marcel Baur <mbaur@g26.ethz.ch>
  *
diff --git a/programs/notepad/dialog.c b/programs/notepad/dialog.c
index e92313f..7daa511 100644
--- a/programs/notepad/dialog.c
+++ b/programs/notepad/dialog.c
@@ -36,15 +36,15 @@
 
 int AlertIDS(UINT ids_message, UINT ids_caption, WORD type) {
   /*
-   * Given some ids strings, this acts as a language-aware wrapper for 
+   * Given some ids strings, this acts as a language-aware wrapper for
    * "MessageBox"
    */
    CHAR szMessage[MAX_STRING_LEN];
    CHAR szCaption[MAX_STRING_LEN];
-   
+
    LoadString(Globals.hInstance, ids_message, szMessage, sizeof(szMessage));
    LoadString(Globals.hInstance, ids_caption, szCaption, sizeof(szCaption));
-   
+
    return (MessageBox(Globals.hMainWnd, szMessage, szCaption, type));
 }
 
@@ -57,7 +57,7 @@
    /* Load and format szMessage */
    LoadString(Globals.hInstance, STRING_NOTFOUND, szRessource, sizeof(szRessource));
    wsprintf(szMessage, szRessource, szFileName);
-   
+
    /* Load szCaption */
    LoadString(Globals.hInstance, STRING_ERROR,  szRessource, sizeof(szRessource));
 
@@ -76,7 +76,7 @@
 
    LoadString(Globals.hInstance, STRING_NOTSAVED, szRessource, sizeof(szRessource));
    wsprintf(szMessage, szRessource, szFileName);
-   
+
    /* Load Caption */
 
    LoadString(Globals.hInstance, STRING_ERROR,  szRessource, sizeof(szRessource));
@@ -89,7 +89,7 @@
 
 VOID AlertOutOfMemory(void) {
    int nResult;
-   
+
    nResult = AlertIDS(STRING_OUT_OF_MEMORY, STRING_ERROR, MB_ICONEXCLAMATION);
    PostQuitMessage(1);
 }
@@ -102,9 +102,9 @@
  */
    WIN32_FIND_DATA entry;
    HANDLE hFile;
-   
+
    hFile = FindFirstFile(szFilename, &entry);
-   
+
    return (hFile!=INVALID_HANDLE_VALUE);
 }
 
@@ -120,7 +120,7 @@
 /*               FALSE - User cancelled close by selecting "Cancel" */
 
     int nResult;
-   
+
     if (strlen(Globals.szFileName)>0) {
         /* prompt user to save changes */
         nResult = AlertFileNotSaved(Globals.szFileName);
@@ -132,12 +132,12 @@
 
             case IDCANCEL:  return(FALSE);
                             break;
-                      
+
             default:        return(FALSE);
                             break;
         } /* switch */
     } /* if */
-  
+
     /* Forget file name  */
     lstrcpy(Globals.szFileName, "");
     LANGUAGE_UpdateWindowCaption();
@@ -211,12 +211,12 @@
         openfilename.lpTemplateName    = 0;
 
         if (GetOpenFileName(&openfilename)) {
-                
+
                 if (FileExists(openfilename.lpstrFile))
                     DoOpenFile(openfilename.lpstrFile);
-                else 
+                else
                     AlertFileNotFound(openfilename.lpstrFile);
-                    
+
         }
 }
 
@@ -234,7 +234,7 @@
         CHAR szDir[MAX_PATHNAME_LEN];
         CHAR szDefaultExt[4];
         CHAR szzFilter[2 * MAX_STRING_LEN + 100];
-       
+
         LPSTR p = szzFilter;
 
         lstrcpy(szDefaultExt, "txt");
@@ -356,7 +356,7 @@
         if (TRUE) {
              /* Remove "Print Selection" if there is no selection */
              bFlags = bFlags + PD_NOSELECTION;
-        } 
+        }
 
         printer.Flags                 = bFlags;
 /*
@@ -414,7 +414,7 @@
                        AlertOutOfMemory();
                        break;
                default:
-                       MessageBox(Globals.hMainWnd, "Default", "Print", MB_ICONEXCLAMATION); 
+                       MessageBox(Globals.hMainWnd, "Default", "Print", MB_ICONEXCLAMATION);
             } /* switch */
             nResult = EndDoc(hContext);
             assert(nResult>=0);
@@ -454,7 +454,7 @@
         printer.lpSetupTemplateName  = 0;
         printer.hPrintTemplate       = 0;
         printer.hSetupTemplate       = 0;
-        
+
         if (PrintDlg(&printer)) {
             /* do nothing */
         };
@@ -538,7 +538,7 @@
     LPSYSTEMTIME lpst = &st;
     CHAR         szDate[MAX_STRING_LEN];
     LPSTR        date = szDate;
-    
+
     GetLocalTime(&st);
     GetDateFormat(LOCALE_USER_DEFAULT, LOCALE_SLONGDATE, lpst, NULL, date, MAX_STRING_LEN);
     GetTimeFormat(LOCALE_USER_DEFAULT, LOCALE_STIMEFORMAT, lpst, NULL, date, MAX_STRING_LEN);
@@ -548,7 +548,7 @@
 VOID DIALOG_EditWrap(VOID)
 {
         Globals.bWrapLongLines = !Globals.bWrapLongLines;
-        CheckMenuItem(Globals.hEditMenu, 0x119, MF_BYCOMMAND | 
+        CheckMenuItem(Globals.hEditMenu, 0x119, MF_BYCOMMAND |
         (Globals.bWrapLongLines ? MF_CHECKED : MF_UNCHECKED));
 }
 
diff --git a/programs/notepad/language.c b/programs/notepad/language.c
index 9f239e1..53ac7d1 100644
--- a/programs/notepad/language.c
+++ b/programs/notepad/language.c
@@ -33,12 +33,12 @@
       Notepad - (untitled)      if no file is open
       Notepad - [filename]      if a file is given
   */
-  
+
   CHAR szCaption[MAX_STRING_LEN];
   CHAR szUntitled[MAX_STRING_LEN];
 
   LoadString(Globals.hInstance, STRING_NOTEPAD, szCaption, sizeof(szCaption));
-  
+
   if (strlen(Globals.szFileName)>0) {
       lstrcat(szCaption, " - [");
       lstrcat(szCaption, Globals.szFileName);
@@ -50,9 +50,9 @@
       lstrcat(szCaption, " - ");
       lstrcat(szCaption, szUntitled);
   }
-    
+
   SetWindowText(Globals.hMainWnd, szCaption);
-  
+
 }
 
 
@@ -75,7 +75,7 @@
 
   /* Set frame caption */
   LANGUAGE_UpdateWindowCaption();
-  
+
   /* Change Resource names */
 //  lstrcpyn(STRING_MENU_Xx      + sizeof(STRING_MENU_Xx)      - 3, lang, 3);
 //  lstrcpyn(STRING_PAGESETUP_Xx + sizeof(STRING_PAGESETUP_Xx) - 3, lang, 3);
diff --git a/programs/notepad/license.h b/programs/notepad/license.h
index adbed7a..418bb66 100644
--- a/programs/notepad/license.h
+++ b/programs/notepad/license.h
@@ -27,7 +27,7 @@
   LPCSTR Warranty, WarrantyCaption;
 } LICENSE;
 
-/* 
+/*
 extern LICENSE WineLicense_Ca;
 extern LICENSE WineLicense_Cz;
 extern LICENSE WineLicense_Da;
@@ -36,7 +36,7 @@
 
 extern LICENSE WineLicense_En;
 
-/* 
+/*
 extern LICENSE WineLicense_Eo;
 extern LICENSE WineLicense_Es;
 extern LICENSE WineLicense_Fi;
diff --git a/programs/notepad/main.c b/programs/notepad/main.c
index 15feec1..770ab36 100644
--- a/programs/notepad/main.c
+++ b/programs/notepad/main.c
@@ -106,11 +106,11 @@
 
     if(y>dwLines)
         return size.cx;
-    if(lpBuffer == NULL) 
+    if(lpBuffer == NULL)
         return size.cx;
     if(lpBuffer[y].lpLine == NULL)
         return size.cx;
-    len = (x<lpBuffer[y].dwWidth) ? 
+    len = (x<lpBuffer[y].dwWidth) ?
            x : lpBuffer[y].dwWidth;
     GetTextExtentPoint(hDC, lpBuffer[y].lpLine, len, &size);
 
@@ -152,10 +152,10 @@
     hPrev = SelectObject(hDC, GetStockObject(WHITE_PEN));
     Rectangle(hDC, rect.left, rect.top, rect.right, rect.bottom);
     SelectObject(hDC, hPrev);
-    
+
     if(lpBuffer && lpBuffer[lineno].lpLine)
     {
-        TextOut(hDC, 0, rect.top, lpBuffer[lineno].lpLine, 
+        TextOut(hDC, 0, rect.top, lpBuffer[lineno].lpLine,
                        lpBuffer[lineno].dwWidth);
     }
 }
@@ -176,7 +176,7 @@
     }
 }
 
-/* 
+/*
  * Check that correct buffers exist to access line y pos x
  * Only manages memory.
  *
@@ -317,7 +317,7 @@
         RenderLine(hDC, dwYpos);
         CalcCaretPos(hDC,dwXpos,dwYpos);
     }
-    else 
+    else
     {
         /* Erase a newline. To do this we join two lines */
         LPSTR src, dest;
@@ -412,7 +412,7 @@
     BOOL nomore)
 {
     DWORD i;
-    
+
     if(size == 0)
         return 0;
 
@@ -446,8 +446,8 @@
 }
 
 
-/* 
- * This is probably overcomplicated by lpBuffer data structure... 
+/*
+ * This is probably overcomplicated by lpBuffer data structure...
  * Read blocks from the file, then add each line from the
  *  block to the buffer until there is none left. If all
  *  a slab isn't used, try load some more data from the file.
@@ -470,15 +470,15 @@
     bytes_left = 0;
     while(bytes_read)
     {
-        if(!ReadFile(hFile, 
-                     &pTemp[bytes_left], 
-                     size-bytes_left, 
+        if(!ReadFile(hFile,
+                     &pTemp[bytes_left],
+                     size-bytes_left,
                      &bytes_read, NULL))
             break;
         bytes_left+=bytes_read;
 
         /* add strings to buffer */
-        for(i = 0; 
+        for(i = 0;
             (i<size) &&
             (len  = CreateLine(&pTemp[i], bytes_left, !bytes_read));
             i+= len,bytes_left-=len );
@@ -546,7 +546,7 @@
         dwXpos--;
         return TRUE;
     }
-    if(GotoUp(hWnd))   
+    if(GotoUp(hWnd))
         return GotoEndOfLine(hWnd);
     return FALSE;
 }
@@ -672,7 +672,7 @@
                 caretx--;
         }
     }
-    
+
     /* set the caret's position */
     dwXpos = caretx;
     dwYpos = carety;
@@ -715,7 +715,7 @@
  */
 
 int NOTEPAD_MenuCommand (WPARAM wParam)
-{  
+{
    switch (wParam) {
      case 0x100:          DIALOG_FileNew(); break;
      case 0x101:         DIALOG_FileOpen(); break;
@@ -744,7 +744,7 @@
      case 0x135:      DIALOG_HelpLicense(); break;
      case 0x136:  DIALOG_HelpNoWarranty(); break;
      case 0x137:   DIALOG_HelpAboutWine(); break;
-     
+
 //     default:
 //      LANGUAGE_DefaultHandle(wParam);
    }
@@ -848,7 +848,7 @@
           DragQueryFile(hDrop, 0, (CHAR *) &szFileName, sizeof(szFileName));
           DragFinish(hDrop);
           DoOpenFile(szFileName);
-          break;        
+          break;
 
        default:
           return DefWindowProc (hWnd, msg, wParam, lParam);
@@ -865,20 +865,20 @@
    LoadString(Globals.hInstance, STRING_DOESNOTEXIST, szRessource,
               sizeof(szRessource));
    wsprintf(szMessage, szRessource, szFileName);
-   
+
    LoadString(Globals.hInstance, STRING_ERROR,  szRessource, sizeof(szRessource));
 
    nResult = MessageBox(Globals.hMainWnd, szMessage, szRessource,
                         MB_ICONEXCLAMATION | MB_YESNO);
-   
+
    return(nResult);
 }
 
 void HandleCommandLine(LPSTR cmdline)
 {
-    
-    while (*cmdline && (*cmdline == ' ' || *cmdline == '-')) 
-    
+
+    while (*cmdline && (*cmdline == ' ' || *cmdline == '-'))
+
     {
         CHAR   option;
 
@@ -897,22 +897,22 @@
         }
     }
 
-    if (*cmdline) 
+    if (*cmdline)
     {
         /* file name is passed in the command line */
         char *file_name;
         BOOL file_exists;
         char buf[MAX_PATH];
 
-        if (FileExists(cmdline)) 
+        if (FileExists(cmdline))
         {
             file_exists = TRUE;
             file_name = cmdline;
         }
-        else 
+        else
         {
-            /* try to find file with ".txt" extention */ 
-            if (!strcmp(".txt", cmdline + strlen(cmdline) - strlen(".txt"))) 
+            /* try to find file with ".txt" extention */
+            if (!strcmp(".txt", cmdline + strlen(cmdline) - strlen(".txt")))
             {
                 file_exists = FALSE;
                 file_name = cmdline;
@@ -969,7 +969,7 @@
     Globals.hInstance       = hInstance;
 
 #ifndef LCC
-    Globals.hMainIcon       = ExtractIcon(Globals.hInstance, 
+    Globals.hMainIcon       = ExtractIcon(Globals.hInstance,
                                         Globals.lpszIcoFile, 0);
 #endif
     if (!Globals.hMainIcon) {
@@ -1004,9 +1004,9 @@
     /* Setup windows */
 
 
-    Globals.hMainWnd = CreateWindow (className, winName, 
+    Globals.hMainWnd = CreateWindow (className, winName,
        WS_OVERLAPPEDWINDOW + WS_HSCROLL + WS_VSCROLL,
-       CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, 0, 
+       CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, 0,
        LoadMenu(Globals.hInstance, STRING_MENU_Xx),
        Globals.hInstance, 0);
 
@@ -1014,8 +1014,8 @@
 
    LANGUAGE_LoadMenus();
 
-    SetMenu(Globals.hMainWnd, Globals.hMainMenu);               
-                        
+    SetMenu(Globals.hMainWnd, Globals.hMainMenu);
+
     ShowWindow (Globals.hMainWnd, show);
     UpdateWindow (Globals.hMainWnd);
 
@@ -1025,7 +1025,7 @@
 
     Globals.nCommdlgFindReplaceMsg = RegisterWindowMessage("commdlg_FindReplace");
     if (Globals.nCommdlgFindReplaceMsg==0) {
-       MessageBox(Globals.hMainWnd, "Could not register commdlg_FindReplace window message", 
+       MessageBox(Globals.hMainWnd, "Could not register commdlg_FindReplace window message",
                   "Error", MB_ICONEXCLAMATION);
     }
 
@@ -1036,14 +1036,14 @@
     DragAcceptFiles(Globals.hMainWnd, TRUE);
 
     /* now enter mesage loop     */
-    
+
     while (GetMessage (&msg, 0, 0, 0)) {
         if (IsDialogMessage(Globals.hFindReplaceDlg, &msg)!=0) {
           /* Message belongs to FindReplace dialog */
           /* We just let IsDialogMessage handle it */
-        } 
+        }
           else
-        { 
+        {
           /* Message belongs to the Notepad Main Window */
           TranslateMessage (&msg);
           DispatchMessage (&msg);
diff --git a/programs/notepad/main.h b/programs/notepad/main.h
index cf68941..a3da15d 100644
--- a/programs/notepad/main.h
+++ b/programs/notepad/main.h
@@ -86,7 +86,7 @@
 /* Resource names */
 extern CHAR STRING_MENU_Xx[];
 extern CHAR STRING_PAGESETUP_Xx[];
-   
+
 #else  /* RC_INVOKED */
-   
+
 #endif
diff --git a/programs/notepad/search.c b/programs/notepad/search.c
index 75d41b0..f5b8698 100644
--- a/programs/notepad/search.c
+++ b/programs/notepad/search.c
@@ -24,22 +24,22 @@
  */
 
 #include <windows.h>
- 
+
  #define CHARSETSIZE 255
-  
+
  int delta[CHARSETSIZE];
- 
+
  /* rightmostpos: return rightmost position of ch in szSP (or -1) */
  int rightmostpos(char ch, LPSTR szSP, int nSPLen) {
     int i = nSPLen;
     while ((i>0) & (szSP[i]!=ch)) i--;
     return(i);
  }
- 
+
  /* setup_delta: setup delta1 cache */
  void setup_delta(LPSTR szSP, int nSPLen) {
     int i;
-    
+
     for (i=0; i<CHARSETSIZE; i++) {
        delta[i] = nSPLen;
     }
@@ -52,7 +52,7 @@
  int bm_search(LPSTR szBuf, int nBufLen, LPSTR szSP, int nSPLen) {
     int i = nSPLen;
     int j = nSPLen;
-    
+
     do {
        if ((szBuf[i] = szSP[j])) {
          i--; j--;
@@ -66,4 +66,4 @@
     } while (j>0 && i<=nBufLen);
     return(i+1);
  }
- 
+
diff --git a/programs/progman/grpfile.c b/programs/progman/grpfile.c
index 6594e4f..88c2d85 100644
--- a/programs/progman/grpfile.c
+++ b/programs/progman/grpfile.c
@@ -188,7 +188,7 @@
   lpszName = buffer + GET_USHORT(buffer, 22);
   if (lpszName >= buffer + size) return(0);
 
-  /* unknown bytes 24 - 31 ignored */ 
+  /* unknown bytes 24 - 31 ignored */
   /*
     Unknown bytes should be:
     wLogPixelsX = GET_SHORT(buffer, 24);
@@ -470,14 +470,14 @@
 /***********************************************************************
  *
  *           GRPFILE_WriteWithChecksum
- * 
+ *
  * Looks crazier than it is:
- * 
+ *
  * chksum = 0;
  * chksum = cksum - 1. word;
  * chksum = cksum - 2. word;
  * ...
- * 
+ *
  * if (filelen is even)
  *      great I'm finished
  * else
@@ -488,7 +488,7 @@
 {
 	UINT i;
 	if (GRPFILE_checksum_half_word) {
-		GRPFILE_checksum -= GRPFILE_checksum_last_byte;	
+		GRPFILE_checksum -= GRPFILE_checksum_last_byte;
 	}
 	for (i=0; i < size; i++) {
 		if (GRPFILE_checksum_half_word) {
@@ -498,12 +498,12 @@
 		}
 		GRPFILE_checksum_half_word ^= 1;
 	}
-	
+
 	if (GRPFILE_checksum_half_word) {
 		GRPFILE_checksum_last_byte = str[size-1];
 		GRPFILE_checksum += GRPFILE_checksum_last_byte;
 	}
-	
+
 	return _lwrite(file, str, size);
 }
 
@@ -523,9 +523,9 @@
   LPCSTR lpszTitle = LocalLock(group->hName);
 
   UINT16 checksum;
-	
+
   GRPFILE_InitChecksum();
-	
+
   /* Calculate offsets */
   NumProg = 0;
   Icons   = 0;
@@ -554,9 +554,9 @@
   /* Header */
   buffer[0] = 'P';
   buffer[1] = 'M';
-  buffer[2] = 'C'; 
+  buffer[2] = 'C';
   buffer[3] = 'C';
-	
+
   PUT_SHORT(buffer,  4, 0); /* Checksum zero for now, written later */
   PUT_SHORT(buffer,  6, Extension);
   /* Update group->nCmdShow */
@@ -588,7 +588,7 @@
       PROGRAM *program = LocalLock(hProgram);
 
       PUT_SHORT(buffer, 0, CurrProg);
-      if ((UINT)HFILE_ERROR == GRPFILE_WriteWithChecksum(file, buffer, 2)) 
+      if ((UINT)HFILE_ERROR == GRPFILE_WriteWithChecksum(file, buffer, 2))
 	      return FALSE;
 
       GRPFILE_CalculateSizes(program, &CurrProg, &CurrIcon);
@@ -596,7 +596,7 @@
     }
 
   /* Title */
-  if ((UINT)HFILE_ERROR == GRPFILE_WriteWithChecksum(file, lpszTitle, 
+  if ((UINT)HFILE_ERROR == GRPFILE_WriteWithChecksum(file, lpszTitle,
 					       lstrlen(lpszTitle) + 1))
     return FALSE;
 
@@ -675,7 +675,7 @@
       PUT_SHORT(buffer, 4, 0x000a);
       buffer[6] = 'P', buffer[7] = 'M';
       buffer[8] = 'C', buffer[9] = 'C';
-      if ((UINT)HFILE_ERROR == GRPFILE_WriteWithChecksum(file, buffer, 10)) 
+      if ((UINT)HFILE_ERROR == GRPFILE_WriteWithChecksum(file, buffer, 10))
 	      return FALSE;
 
       seqnum = 0;
diff --git a/programs/progman/progman.h b/programs/progman/progman.h
index 3dd37d9..4fbc9e9 100644
--- a/programs/progman/progman.h
+++ b/programs/progman/progman.h
@@ -62,7 +62,7 @@
   /* pointer to iconANDbits */ /* 16 - 17 */ /* sometimes iconXORbits ?! */
   HLOCAL   hName;              /* 18 - 19 */
   HLOCAL   hCmdLine;           /* 20 - 21 */
-  HLOCAL   hIconFile;          /* 22 - 23 */        
+  HLOCAL   hIconFile;          /* 22 - 23 */
   HLOCAL   hWorkDir;           /* Extension 0x8101 */
   INT      nHotKey;            /* Extension 0x8102 */
   /* Modifier: bit 8... */
@@ -103,7 +103,7 @@
   HLOCAL   hPrograms;          /* 34 ...  */
 
   /**/                        /* Extensions */
-  /* Extension type */         /*  0 -  1 */           
+  /* Extension type */         /*  0 -  1 */
   /* Program number */         /*  2 -  3 */
   /* Size of entry  */         /*  4 -  5 */
   /* Data           */         /*  6 ...  */
diff --git a/programs/progman/program.c b/programs/progman/program.c
index 8ac6362..1060dd9 100644
--- a/programs/progman/program.c
+++ b/programs/progman/program.c
@@ -296,7 +296,7 @@
     ((PROGRAM*)LocalLock(program->hPrior))->hNext = program->hNext;
   else
     ((PROGGROUP*)LocalLock(program->hGroup))->hPrograms = program->hNext;
-	
+
   if (program->hNext)
     ((PROGRAM*)LocalLock(program->hNext))->hPrior = program->hPrior;
 
diff --git a/programs/regapi/regapi.c b/programs/regapi/regapi.c
index 79aa54f..e08c727 100644
--- a/programs/regapi/regapi.c
+++ b/programs/regapi/regapi.c
@@ -32,10 +32,10 @@
 /******************************************************************************
  * Defines and consts
  */
-#define IDENTICAL             0 
+#define IDENTICAL             0
 #define COMMAND_COUNT         7
 
-#define KEY_MAX_LEN             1024 
+#define KEY_MAX_LEN             1024
 #define STDIN_MAX_LEN         102400
 
 /* Return values */
@@ -56,16 +56,16 @@
 static BOOL  bTheKeyIsOpen    = FALSE;
 
 /* Delimiters used to parse the "value"="data" pair for setValue*/
-#define SET_VALUE_MAX_ARGS    2 
+#define SET_VALUE_MAX_ARGS    2
 /* Delimiters used to parse the "value" to query queryValue*/
-#define QUERY_VALUE_MAX_ARGS  1 
+#define QUERY_VALUE_MAX_ARGS  1
 
 static const char *setValueDelim[SET_VALUE_MAX_ARGS]   = {"=", ""};
 static const char *queryValueDelim[QUERY_VALUE_MAX_ARGS]   = {""};
 
 
-/* 
- * Forward declaration 
+/*
+ * Forward declaration
  */
 typedef void (*commandAPI)(LPSTR lpsLine);
 
@@ -81,8 +81,8 @@
  * Currently supported api
  */
 static const char* commandNames[COMMAND_COUNT] = {
-  "setValue", 
-  "deleteValue", 
+  "setValue",
+  "deleteValue",
   "createKey",
   "deleteKey",
   "queryValue",
@@ -94,8 +94,8 @@
  * Pointers to processing entry points
  */
 static const commandAPI commandAPIs[COMMAND_COUNT] = {
-  doSetValue, 
-  doDeleteValue, 
+  doSetValue,
+  doDeleteValue,
   doCreateKey,
   doDeleteKey,
   doQueryValue,
@@ -103,8 +103,8 @@
   doUnregisterDLL
 };
 
-/* 
- * This array controls the registry saving needs at the end of the process 
+/*
+ * This array controls the registry saving needs at the end of the process
  */
 static const BOOL commandSaveRegistry[COMMAND_COUNT] = {
   TRUE,
@@ -116,7 +116,7 @@
   TRUE
 };
 
-/* 
+/*
  * Generic prototypes
  */
 static DWORD   getDataType(LPSTR *lpValue, DWORD* parse_type);
@@ -131,13 +131,13 @@
 static HRESULT openKey(LPSTR stdInput);
 static void    closeKey();
 
-/* 
+/*
  * api setValue prototypes
  */
 static void    processSetValue(LPSTR cmdline);
 static HRESULT setValue(LPSTR *argv);
 
-/* 
+/*
  * api queryValue prototypes
  */
 static void    processQueryValue(LPSTR cmdline);
@@ -205,8 +205,8 @@
 
 
 /******************************************************************************
- * This function returns the HKEY associated with the data type encoded in the 
- * value.  It modifies the input parameter (key value) in order to skip this 
+ * This function returns the HKEY associated with the data type encoded in the
+ * value.  It modifies the input parameter (key value) in order to skip this
  * "now useless" data type information.
  *
  * Note: Updated based on the algorithm used in 'server/registry.c'
@@ -256,10 +256,10 @@
 }
 
 /******************************************************************************
- * Extracts from a [HKEY\some\key\path] type of line the key name (what starts 
+ * Extracts from a [HKEY\some\key\path] type of line the key name (what starts
  * after the first '\' and end before the ']'
  */
-LPSTR getRegKeyName(LPSTR lpLine) 
+LPSTR getRegKeyName(LPSTR lpLine)
 {
   LPSTR keyNameBeg = NULL;
   LPSTR keyNameEnd = NULL;
@@ -274,25 +274,25 @@
   keyNameBeg++;                            /* but is not part of the key name */
   keyNameEnd  = strstr(lpLineCopy, "]");   /* The key name end by ']' */
   *keyNameEnd = '\0';                      /* Isolate the key name */
- 
+
   currentKeyName = HeapAlloc(GetProcessHeap(), 0, strlen(keyNameBeg)+1);
   if (currentKeyName != NULL)
     strcpy(currentKeyName, keyNameBeg);
- 
+
   return currentKeyName;
 }
 
 /******************************************************************************
- * Extracts from a [HKEY/some/key/path] type of line the key class (what 
+ * Extracts from a [HKEY/some/key/path] type of line the key class (what
  * starts after the '[' and ends before the first '\'
  */
-static HKEY getRegClass(LPSTR lpClass) 
+static HKEY getRegClass(LPSTR lpClass)
 {
   LPSTR classNameEnd;
   LPSTR classNameBeg;
 
   char  lpClassCopy[KEY_MAX_LEN];
-  
+
   if (lpClass == NULL)
     return (HKEY)ERROR_INVALID_PARAMETER;
 
@@ -301,7 +301,7 @@
   classNameEnd  = strstr(lpClassCopy, "\\");  /* The class name end by '\' */
   *classNameEnd = '\0';                       /* Isolate the class name */
   classNameBeg  = &lpClassCopy[1];            /* Skip the '[' */
-  
+
   if      (strcmp( classNameBeg, "HKEY_LOCAL_MACHINE") == IDENTICAL )
     return  HKEY_LOCAL_MACHINE;
   else if (strcmp( classNameBeg, "HKEY_USERS") == IDENTICAL )
@@ -343,7 +343,7 @@
 }
 
 /******************************************************************************
- * Returns an allocated buffer with a cleaned copy (removed the surrounding 
+ * Returns an allocated buffer with a cleaned copy (removed the surrounding
  * dbl quotes) of the passed value.
  */
 static LPSTR getArg( LPSTR arg)
@@ -357,7 +357,7 @@
   /*
    * Get rid of surrounding quotes
    */
-  len = strlen(arg); 
+  len = strlen(arg);
 
   if( arg[len-1] == '\"' ) arg[len-1] = '\0';
   if( arg[0]     == '\"' ) arg++;
@@ -375,7 +375,7 @@
 {
   INT count;
   for (count=0; count < COMMAND_COUNT; count++)
-    if ( strcmp(commandName, commandNames[count]) == IDENTICAL) 
+    if ( strcmp(commandName, commandNames[count]) == IDENTICAL)
       return count;
 
   return COMMAND_NOT_FOUND;
@@ -397,7 +397,7 @@
 }
 
 /******************************************************************************
- * Converts a hex buffer into a hex comma separated values 
+ * Converts a hex buffer into a hex comma separated values
  */
 static char* convertHexToHexCSV(BYTE *buf, ULONG bufLen)
 {
@@ -420,7 +420,7 @@
     sprintf(res, "%02x", (unsigned int)*&bCur);
     strcat(str, res);
     strcat(str, ",");
-  }                                   
+  }
 
   /* Get rid of the last comma */
   str[strlen(str)-1] = '\0';
@@ -479,14 +479,14 @@
     s+=3;
     strPos+=3;
     byteCount++;
-  }                                   
+  }
 
   return byteCount;
 }
 
 
 /******************************************************************************
- * Sets the value in argv[0] to the data in argv[1] for the currently 
+ * Sets the value in argv[0] to the data in argv[1] for the currently
  * opened key.
  */
 static HRESULT setValue(LPSTR *argv)
@@ -507,7 +507,7 @@
 
   lpsCurrentValue=HeapAlloc(GetProcessHeap(), 0,KEY_MAX_LEN);
   /*
-   * Default registry values are encoded in the input stream as '@' but as 
+   * Default registry values are encoded in the input stream as '@' but as
    * blank in the wine registry.
    */
   if( (keyValue[0] == '@') && (strlen(keyValue) == 1) )
@@ -518,11 +518,11 @@
 
   memset(lpsCurrentValue, 0, KEY_MAX_LEN);
   hRes = RegQueryValueExA(
-          currentKeyHandle, 
-          keyValue, 
-          NULL, 
-          &dwType, 
-          (LPBYTE)lpsCurrentValue, 
+          currentKeyHandle,
+          keyValue,
+          NULL,
+          &dwType,
+          (LPBYTE)lpsCurrentValue,
           &dwSize);
 
   while(hRes==ERROR_MORE_DATA){
@@ -532,8 +532,8 @@
   }
 
   if( ( strlen(lpsCurrentValue) == 0 ) ||  /* The value is not existing */
-      ( bForce ))         /* -force option */ 
-  { 
+      ( bForce ))         /* -force option */
+  {
     LPBYTE lpbData;
     BYTE   convert[KEY_MAX_LEN];
     DWORD  dwLen;
@@ -547,7 +547,7 @@
         keyData[dwLen]='\0';
       }
       lpbData = keyData;
-    } 
+    }
     else if (dwParseType == REG_DWORD)  /* Convert the dword types */
     {
       dwLen   = convertHexToDWord(keyData, convert);
@@ -560,7 +560,7 @@
     }
 
     hRes = RegSetValueEx(
-            currentKeyHandle, 
+            currentKeyHandle,
             keyValue,
             0,                  /* Reserved */
             dwDataType,
@@ -594,11 +594,11 @@
  */
 static HRESULT openKey( LPSTR stdInput)
 {
-  DWORD   dwDisp;  
+  DWORD   dwDisp;
   HRESULT hRes;
 
   /* Sanity checks */
-  if (stdInput == NULL) 
+  if (stdInput == NULL)
     return ERROR_INVALID_PARAMETER;
 
   /* Get the registry class */
@@ -610,8 +610,8 @@
   currentKeyName = getRegKeyName(stdInput); /* Sets global variable */
   if (currentKeyName == NULL)
     return ERROR_INVALID_PARAMETER;
-    
-  hRes = RegCreateKeyEx( 
+
+  hRes = RegCreateKeyEx(
           currentKeyClass,          /* Class     */
           currentKeyName,           /* Sub Key   */
           0,                        /* MUST BE 0 */
@@ -630,7 +630,7 @@
 
 }
 /******************************************************************************
- * This function is a wrapper for the setValue function.  It prepares the 
+ * This function is a wrapper for the setValue function.  It prepares the
  * land and clean the area once completed.
  */
 static void processSetValue(LPSTR cmdline)
@@ -648,7 +648,7 @@
   for (counter=0; counter<SET_VALUE_MAX_ARGS; counter++)
     argv[counter]=NULL;
 
-  while( (token = getToken(&cmdline, setValueDelim[argCounter])) != NULL ) 
+  while( (token = getToken(&cmdline, setValueDelim[argCounter])) != NULL )
   {
     argv[argCounter++] = token;
 
@@ -657,29 +657,29 @@
   }
 
   hRes = setValue(argv);
-  if ( hRes == ERROR_SUCCESS ) 
+  if ( hRes == ERROR_SUCCESS )
     printf(
-      "regapi: Value \"%s\" has been set to \"%s\" in key [%s]\n", 
-      argv[0], 
+      "regapi: Value \"%s\" has been set to \"%s\" in key [%s]\n",
+      argv[0],
       argv[1],
       currentKeyName);
 
-  else if ( hRes == KEY_VALUE_ALREADY_SET ) 
+  else if ( hRes == KEY_VALUE_ALREADY_SET )
     printf(
-      "regapi: Value \"%s\" already set to \"%s\" in key [%s]\n", 
-      argv[0], 
-      argv[1], 
+      "regapi: Value \"%s\" already set to \"%s\" in key [%s]\n",
+      argv[0],
+      argv[1],
       currentKeyName);
 
   else
     printf("regapi: ERROR Key %s not created. Value: %s, Data: %s\n",
       currentKeyName,
-      argv[0], 
+      argv[0],
       argv[1]);
 }
 
 /******************************************************************************
- * This function is a wrapper for the queryValue function.  It prepares the 
+ * This function is a wrapper for the queryValue function.  It prepares the
  * land and clean the area once completed.
  */
 static void processQueryValue(LPSTR cmdline)
@@ -698,7 +698,7 @@
   for (counter=0; counter<QUERY_VALUE_MAX_ARGS; counter++)
     argv[counter]=NULL;
 
-  while( (token = getToken(&cmdline, queryValueDelim[argCounter])) != NULL ) 
+  while( (token = getToken(&cmdline, queryValueDelim[argCounter])) != NULL )
   {
     argv[argCounter++] = getArg(token);
 
@@ -710,18 +710,18 @@
   if ( argv[0] == NULL )
     return; /* SHOULD NOT HAPPEN */
   else
-    keyValue = argv[0]; 
+    keyValue = argv[0];
 
-  if( (keyValue[0] == '@') && (strlen(keyValue) == 1) ) 
+  if( (keyValue[0] == '@') && (strlen(keyValue) == 1) )
   {
     LONG  lLen  = KEY_MAX_LEN;
     CHAR*  lpsData=HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,KEY_MAX_LEN);
-    /* 
+    /*
      * We need to query the key default value
      */
     hRes = RegQueryValue(
-             currentKeyHandle, 
-             currentKeyName, 
+             currentKeyHandle,
+             currentKeyName,
              (LPBYTE)lpsData,
              &lLen);
 
@@ -737,20 +737,20 @@
       lpsRes[lLen-1]='\0';
     }
   }
-  else 
+  else
   {
     DWORD  dwLen  = KEY_MAX_LEN;
     BYTE*  lpbData=HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,KEY_MAX_LEN);
     DWORD  dwType;
-    /* 
+    /*
      * We need to query a specific value for the key
      */
     hRes = RegQueryValueEx(
-             currentKeyHandle, 
-             keyValue, 
-             0, 
-             &dwType, 
-             (LPBYTE)lpbData, 
+             currentKeyHandle,
+             keyValue,
+             0,
+             &dwType,
+             (LPBYTE)lpbData,
              &dwLen);
 
     if (hRes==ERROR_MORE_DATA) {
@@ -760,7 +760,7 @@
 
     if (hRes == ERROR_SUCCESS)
     {
-      /* 
+      /*
        * Convert the returned data to a displayable format
        */
       switch ( dwType )
@@ -783,25 +783,25 @@
           lpsRes = convertHexToHexCSV(lpbData, dwLen);
           break;
         }
-      } 
+      }
     }
 
     HeapFree(GetProcessHeap(), 0, lpbData);
   }
- 
- 
-  if ( hRes == ERROR_SUCCESS ) 
+
+
+  if ( hRes == ERROR_SUCCESS )
     printf(
-      "regapi: Value \"%s\" = \"%s\" in key [%s]\n", 
-      keyValue, 
+      "regapi: Value \"%s\" = \"%s\" in key [%s]\n",
+      keyValue,
       lpsRes,
       currentKeyName);
 
   else
     printf("regapi: ERROR Value \"%s\" not found. for key \"%s\"\n",
-      keyValue, 
+      keyValue,
       currentKeyName);
-    
+
   /*
    * Do some cleanup
    */
@@ -819,7 +819,7 @@
  */
 static void closeKey()
 {
-  RegCloseKey(currentKeyHandle); 
+  RegCloseKey(currentKeyHandle);
 
   HeapFree(GetProcessHeap(), 0, currentKeyName); /* Allocated by getKeyName */
 
@@ -831,119 +831,119 @@
 }
 
 /******************************************************************************
- * This funtion is the main entry point to the setValue type of action.  It 
- * receives the currently read line and dispatch the work depending on the 
+ * This funtion is the main entry point to the setValue type of action.  It
+ * receives the currently read line and dispatch the work depending on the
  * context.
  */
 static void doSetValue(LPSTR stdInput)
 {
-  /* 
-   * We encoutered the end of the file, make sure we 
+  /*
+   * We encoutered the end of the file, make sure we
    * close the opened key and exit
-   */ 
-  if (stdInput == NULL)             
+   */
+  if (stdInput == NULL)
   {
-    if (bTheKeyIsOpen != FALSE) 
-      closeKey();                    
+    if (bTheKeyIsOpen != FALSE)
+      closeKey();
 
     return;
   }
-    
+
   if      ( stdInput[0] == '[')      /* We are reading a new key */
   {
-    if ( bTheKeyIsOpen != FALSE )      
+    if ( bTheKeyIsOpen != FALSE )
       closeKey();                    /* Close the previous key before */
 
     if ( openKey(stdInput) != ERROR_SUCCESS )
       printf ("regapi: doSetValue failed to open key %s\n", stdInput);
   }
-  else if( ( bTheKeyIsOpen ) && 
+  else if( ( bTheKeyIsOpen ) &&
            (( stdInput[0] == '@') || /* reading a default @=data pair */
             ( stdInput[0] == '\"'))) /* reading a new value=data pair */
   {
     processSetValue(stdInput);
   }
   else                               /* since we are assuming that the */
-  {                                  /* file format is valid we must   */ 
+  {                                  /* file format is valid we must   */
     if ( bTheKeyIsOpen )             /* be reading a blank line which  */
-      closeKey();                    /* indicate end of this key processing */ 
+      closeKey();                    /* indicate end of this key processing */
   }
 }
 
 /******************************************************************************
- * This funtion is the main entry point to the queryValue type of action.  It 
- * receives the currently read line and dispatch the work depending on the 
+ * This funtion is the main entry point to the queryValue type of action.  It
+ * receives the currently read line and dispatch the work depending on the
  * context.
  */
-static void doQueryValue(LPSTR stdInput) { 
-  /* 
-   * We encoutered the end of the file, make sure we 
+static void doQueryValue(LPSTR stdInput) {
+  /*
+   * We encoutered the end of the file, make sure we
    * close the opened key and exit
-   */ 
-  if (stdInput == NULL)             
+   */
+  if (stdInput == NULL)
   {
-    if (bTheKeyIsOpen != FALSE) 
-      closeKey();                    
+    if (bTheKeyIsOpen != FALSE)
+      closeKey();
 
     return;
   }
-    
+
   if      ( stdInput[0] == '[')      /* We are reading a new key */
   {
-    if ( bTheKeyIsOpen != FALSE )      
+    if ( bTheKeyIsOpen != FALSE )
       closeKey();                    /* Close the previous key before */
 
     if ( openKey(stdInput) != ERROR_SUCCESS )
       printf ("regapi: doSetValue failed to open key %s\n", stdInput);
   }
-  else if( ( bTheKeyIsOpen ) && 
+  else if( ( bTheKeyIsOpen ) &&
            (( stdInput[0] == '@') || /* reading a default @=data pair */
             ( stdInput[0] == '\"'))) /* reading a new value=data pair */
   {
     processQueryValue(stdInput);
   }
   else                               /* since we are assuming that the */
-  {                                  /* file format is valid we must   */ 
+  {                                  /* file format is valid we must   */
     if ( bTheKeyIsOpen )             /* be reading a blank line which  */
-      closeKey();                    /* indicate end of this key processing */ 
+      closeKey();                    /* indicate end of this key processing */
   }
 }
 
 /******************************************************************************
- * This funtion is the main entry point to the deletetValue type of action.  It 
- * receives the currently read line and dispatch the work depending on the 
+ * This funtion is the main entry point to the deletetValue type of action.  It
+ * receives the currently read line and dispatch the work depending on the
  * context.
  */
-static void doDeleteValue(LPSTR line) { 
+static void doDeleteValue(LPSTR line) {
   printf ("regapi: deleteValue not yet implemented\n");
 }
 /******************************************************************************
- * This funtion is the main entry point to the deleteKey type of action.  It 
- * receives the currently read line and dispatch the work depending on the 
+ * This funtion is the main entry point to the deleteKey type of action.  It
+ * receives the currently read line and dispatch the work depending on the
  * context.
  */
-static void doDeleteKey(LPSTR line)   { 
+static void doDeleteKey(LPSTR line)   {
   printf ("regapi: deleteKey not yet implemented\n");
 }
 /******************************************************************************
- * This funtion is the main entry point to the createKey type of action.  It 
- * receives the currently read line and dispatch the work depending on the 
+ * This funtion is the main entry point to the createKey type of action.  It
+ * receives the currently read line and dispatch the work depending on the
  * context.
  */
-static void doCreateKey(LPSTR line)   { 
+static void doCreateKey(LPSTR line)   {
   printf ("regapi: createKey not yet implemented\n");
 }
 
 /******************************************************************************
- * This funtion is the main entry point to the registerDLL action.  It 
+ * This funtion is the main entry point to the registerDLL action.  It
  * receives the currently read line, then loads and registers the requested DLLs
  */
-static void doRegisterDLL(LPSTR stdInput) { 
+static void doRegisterDLL(LPSTR stdInput) {
   HMODULE theLib = 0;
   UINT retVal = 0;
 
   /* Check for valid input */
-  if (stdInput == NULL)             
+  if (stdInput == NULL)
     return;
 
   /* Load and register the library, then free it */
@@ -957,26 +957,26 @@
       printf("regapi: Couldn't find DllRegisterServer proc in '%s'.\n", stdInput);
 
     if (retVal != S_OK)
-      printf("regapi: DLLRegisterServer error 0x%x in '%s'.\n", retVal, stdInput);      
+      printf("regapi: DLLRegisterServer error 0x%x in '%s'.\n", retVal, stdInput);
 
     FreeLibrary(theLib);
   }
   else
   {
-    printf("regapi: Could not load DLL '%s'.\n", stdInput); 
+    printf("regapi: Could not load DLL '%s'.\n", stdInput);
   }
 }
 
 /******************************************************************************
- * This funtion is the main entry point to the unregisterDLL action.  It 
+ * This funtion is the main entry point to the unregisterDLL action.  It
  * receives the currently read line, then loads and unregisters the requested DLLs
  */
-static void doUnregisterDLL(LPSTR stdInput) { 
+static void doUnregisterDLL(LPSTR stdInput) {
   HMODULE theLib = 0;
   UINT retVal = 0;
 
   /* Check for valid input */
-  if (stdInput == NULL)             
+  if (stdInput == NULL)
     return;
 
   /* Load and unregister the library, then free it */
@@ -990,13 +990,13 @@
       printf("regapi: Couldn't find DllUnregisterServer proc in '%s'.\n", stdInput);
 
     if (retVal != S_OK)
-      printf("regapi: DLLUnregisterServer error 0x%x in '%s'.\n", retVal, stdInput);      
+      printf("regapi: DLLUnregisterServer error 0x%x in '%s'.\n", retVal, stdInput);
 
     FreeLibrary(theLib);
   }
   else
   {
-    printf("regapi: Could not load DLL '%s'.\n", stdInput); 
+    printf("regapi: Could not load DLL '%s'.\n", stdInput);
   }
 }
 
@@ -1013,7 +1013,7 @@
   LPSTR nextLine        = NULL;
   ULONG  currentSize    = STDIN_MAX_LEN;
 
-  stdInput = HeapAlloc(GetProcessHeap(), 0, STDIN_MAX_LEN); 
+  stdInput = HeapAlloc(GetProcessHeap(), 0, STDIN_MAX_LEN);
   nextLine = HeapAlloc(GetProcessHeap(), 0, STDIN_MAX_LEN);
 
   if (stdInput == NULL || nextLine== NULL)
@@ -1021,9 +1021,9 @@
 
   /*
    * get the command, should be the first arg (modify cmdLine)
-   */ 
-  token = getToken(&cmdline, " "); 
-  if (token != NULL) 
+   */
+  token = getToken(&cmdline, " ");
+  if (token != NULL)
   {
     cmdIndex = getCommand(token);
     if (cmdIndex == COMMAND_NOT_FOUND)
@@ -1032,7 +1032,7 @@
       printf(helpText);
       return COMMAND_NOT_SUPPORTED;
     }
-  }    
+  }
   else
   {
     printf(
@@ -1041,8 +1041,8 @@
     return COMMAND_NOT_SUPPORTED;
   }
 
-  /* 
-   * check to see wether we force the action 
+  /*
+   * check to see wether we force the action
    * (meaning differs depending on the command performed)
    */
   if ( cmdline != NULL ) /* will be NULL if '-force' is not provided */
@@ -1053,18 +1053,18 @@
 
   while ( TRUE )
   {
-    /* 
+    /*
      * read a line
      */
       ULONG curSize=STDIN_MAX_LEN;
       char* s=NULL;
-   
+
       while((NULL!=(stdInput=fgets(stdInput,curSize,stdin))) && (NULL==(s=strchr(stdInput,'\n'))) ){
           fseek(stdin,-curSize,SEEK_CUR+1);
           stdInput=HeapReAlloc(GetProcessHeap(), 0,stdInput,curSize+=STDIN_MAX_LEN);
       }
-    /* 
-     * Make some handy generic stuff here... 
+    /*
+     * Make some handy generic stuff here...
      */
     if ( stdInput != NULL )
     {
@@ -1093,19 +1093,19 @@
 
     }
 
-    /* 
-     * We process every lines even the NULL (last) line, to indicate the 
+    /*
+     * We process every lines even the NULL (last) line, to indicate the
      * end of the processing to the specific process.
      */
-    commandAPIs[cmdIndex](stdInput);       
+    commandAPIs[cmdIndex](stdInput);
 
     if (stdInput == NULL)  /* EOF encountered */
       break;
   }
 
-#if 0 
-  /* 
-   * Save the registry only if it was modified 
+#if 0
+  /*
+   * Save the registry only if it was modified
    */
  if ( commandSaveRegistry[cmdIndex] != FALSE )
        SHELL_SaveRegistry();
diff --git a/programs/regedit/regedit.c b/programs/regedit/regedit.c
index 18fcc6c..8236044 100644
--- a/programs/regedit/regedit.c
+++ b/programs/regedit/regedit.c
@@ -84,18 +84,18 @@
     REGEDIT_ACTION action = ACTION_UNDEF;
     LPSTR s = lpCmdLine;        /* command line pointer */
     CHAR ch = *s;               /* current character */
-    
+
     setAppName("regedit");
     while (ch && ((ch == '-') || (ch == '/')))
     {
         char chu;
         char ch2;
-        
+
         s++;
         ch = *s;
         ch2 = *(s+1);
         chu = toupper(ch);
-        if (!ch2 || isspace(ch2)) 
+        if (!ch2 || isspace(ch2))
         {
             if (chu == 'S' || chu == 'V')
             {
diff --git a/programs/regedit/regproc.c b/programs/regedit/regproc.c
index ad580d0..6153af0 100644
--- a/programs/regedit/regproc.c
+++ b/programs/regedit/regproc.c
@@ -32,7 +32,7 @@
 #define REG_VAL_BUF_SIZE        4096
 
 /* Delimiters used to parse the "value" to query queryValue*/
-#define QUERY_VALUE_MAX_ARGS  1 
+#define QUERY_VALUE_MAX_ARGS  1
 
 /* maximal number of characters in hexadecimal data line,
    not including '\' character */
@@ -184,7 +184,7 @@
 }
 
 /******************************************************************************
- * Converts a hex buffer into a hex comma separated values 
+ * Converts a hex buffer into a hex comma separated values
  */
 char* convertHexToHexCSV(BYTE *buf, ULONG bufLen)
 {
@@ -207,7 +207,7 @@
     sprintf(res, "%02x", (unsigned int)*&bCur);
     strcat(str, res);
     strcat(str, ",");
-  }                                   
+  }
 
   /* Get rid of the last comma */
   str[strlen(str)-1] = '\0';
@@ -267,14 +267,14 @@
     s+=3;
     strPos+=3;
     byteCount++;
-  }                                   
+  }
 
   return byteCount;
 }
 
 /******************************************************************************
- * This function returns the HKEY associated with the data type encoded in the 
- * value.  It modifies the input parameter (key value) in order to skip this 
+ * This function returns the HKEY associated with the data type encoded in the
+ * value.  It modifies the input parameter (key value) in order to skip this
  * "now useless" data type information.
  *
  * Note: Updated based on the algorithm used in 'server/registry.c'
@@ -324,7 +324,7 @@
 }
 
 /******************************************************************************
- * Returns an allocated buffer with a cleaned copy (removed the surrounding 
+ * Returns an allocated buffer with a cleaned copy (removed the surrounding
  * dbl quotes) of the passed value.
  */
 LPSTR getArg( LPSTR arg)
@@ -338,7 +338,7 @@
   /*
    * Get rid of surrounding quotes
    */
-  len = strlen(arg); 
+  len = strlen(arg);
 
   if( arg[len-1] == '\"' ) arg[len-1] = '\0';
   if( arg[0]     == '\"' ) arg++;
@@ -385,7 +385,7 @@
 }
 
 /******************************************************************************
- * Sets the value with name val_name to the data in val_data for the currently 
+ * Sets the value with name val_name to the data in val_data for the currently
  * opened key.
  *
  * Parameters:
@@ -417,7 +417,7 @@
     dwLen++;
     REGPROC_unescape_string(val_data);
     lpbData = val_data;
-  } 
+  }
   else if (dwParseType == REG_DWORD)  /* Convert the dword types */
   {
     dwLen   = convertHexToDWord(val_data, convert);
@@ -430,7 +430,7 @@
   }
 
   hRes = RegSetValueEx(
-          currentKeyHandle, 
+          currentKeyHandle,
           val_name,
           0,                  /* Reserved */
           dwDataType,
@@ -446,11 +446,11 @@
  */
 HRESULT openKey( LPSTR stdInput)
 {
-  DWORD   dwDisp;  
+  DWORD   dwDisp;
   HRESULT hRes;
 
   /* Sanity checks */
-  if (stdInput == NULL) 
+  if (stdInput == NULL)
     return ERROR_INVALID_PARAMETER;
 
   /* Get the registry class */
@@ -462,8 +462,8 @@
   currentKeyName = getRegKeyName(stdInput); /* Sets global variable */
   if (currentKeyName == NULL)
     return ERROR_INVALID_PARAMETER;
-    
-  hRes = RegCreateKeyEx( 
+
+  hRes = RegCreateKeyEx(
           currentKeyClass,          /* Class     */
           currentKeyName,           /* Sub Key   */
           0,                        /* MUST BE 0 */
@@ -486,11 +486,11 @@
  * Extracts from [HKEY\some\key\path] or HKEY\some\key\path types of line
  * the key name (what starts after the first '\')
  */
-LPSTR getRegKeyName(LPSTR lpLine) 
+LPSTR getRegKeyName(LPSTR lpLine)
 {
   LPSTR keyNameBeg;
   char  lpLineCopy[KEY_MAX_LEN];
-  
+
   if (lpLine == NULL)
     return NULL;
 
@@ -520,14 +520,14 @@
  * Extracts from [HKEY\some\key\path] or HKEY\some\key\path types of line
  * the key class (what ends before the first '\')
  */
-HKEY getRegClass(LPSTR lpClass) 
+HKEY getRegClass(LPSTR lpClass)
 {
   LPSTR classNameEnd;
   LPSTR classNameBeg;
   int i;
-  
+
   char  lpClassCopy[KEY_MAX_LEN];
-  
+
   if (lpClass == NULL)
     return (HKEY)ERROR_INVALID_PARAMETER;
 
@@ -550,7 +550,7 @@
       classNameBeg = lpClassCopy;
   }
 
-  for (i = 0; i < REG_CLASS_NUMBER; i++) 
+  for (i = 0; i < REG_CLASS_NUMBER; i++)
   {
       if (!strcmp(classNameBeg, reg_class_names[i]))
       {
@@ -565,7 +565,7 @@
  */
 void closeKey()
 {
-  RegCloseKey(currentKeyHandle); 
+  RegCloseKey(currentKeyHandle);
 
   HeapFree(GetProcessHeap(), 0, currentKeyName); /* Allocated by getKeyName */
 
@@ -577,113 +577,113 @@
 }
 
 /******************************************************************************
- * This funtion is the main entry point to the setValue type of action.  It 
- * receives the currently read line and dispatch the work depending on the 
+ * This funtion is the main entry point to the setValue type of action.  It
+ * receives the currently read line and dispatch the work depending on the
  * context.
  */
 void doSetValue(LPSTR stdInput)
 {
-  /* 
-   * We encoutered the end of the file, make sure we 
+  /*
+   * We encoutered the end of the file, make sure we
    * close the opened key and exit
-   */ 
-  if (stdInput == NULL)             
+   */
+  if (stdInput == NULL)
   {
-    if (bTheKeyIsOpen != FALSE) 
-      closeKey();                    
+    if (bTheKeyIsOpen != FALSE)
+      closeKey();
 
     return;
   }
-    
+
   if      ( stdInput[0] == '[')      /* We are reading a new key */
   {
-    if ( bTheKeyIsOpen != FALSE )      
+    if ( bTheKeyIsOpen != FALSE )
       closeKey();                    /* Close the previous key before */
 
     if ( openKey(stdInput) != ERROR_SUCCESS )
       printf ("%s: doSetValue failed to open key %s\n", getAppName(), stdInput);
   }
-  else if( ( bTheKeyIsOpen ) && 
+  else if( ( bTheKeyIsOpen ) &&
            (( stdInput[0] == '@') || /* reading a default @=data pair */
             ( stdInput[0] == '\"'))) /* reading a new value=data pair */
   {
     processSetValue(stdInput);
   }
   else                               /* since we are assuming that the */
-  {                                  /* file format is valid we must   */ 
+  {                                  /* file format is valid we must   */
     if ( bTheKeyIsOpen )             /* be reading a blank line which  */
-      closeKey();                    /* indicate end of this key processing */ 
+      closeKey();                    /* indicate end of this key processing */
   }
 }
 
 /******************************************************************************
- * This funtion is the main entry point to the queryValue type of action.  It 
- * receives the currently read line and dispatch the work depending on the 
+ * This funtion is the main entry point to the queryValue type of action.  It
+ * receives the currently read line and dispatch the work depending on the
  * context.
  */
-void doQueryValue(LPSTR stdInput) { 
-  /* 
-   * We encoutered the end of the file, make sure we 
+void doQueryValue(LPSTR stdInput) {
+  /*
+   * We encoutered the end of the file, make sure we
    * close the opened key and exit
-   */ 
-  if (stdInput == NULL)             
+   */
+  if (stdInput == NULL)
   {
-    if (bTheKeyIsOpen != FALSE) 
-      closeKey();                    
+    if (bTheKeyIsOpen != FALSE)
+      closeKey();
 
     return;
   }
-    
+
   if      ( stdInput[0] == '[')      /* We are reading a new key */
   {
-    if ( bTheKeyIsOpen != FALSE )      
+    if ( bTheKeyIsOpen != FALSE )
       closeKey();                    /* Close the previous key before */
 
     if ( openKey(stdInput) != ERROR_SUCCESS )
       printf ("%s: doSetValue failed to open key %s\n", getAppName(), stdInput);
   }
-  else if( ( bTheKeyIsOpen ) && 
+  else if( ( bTheKeyIsOpen ) &&
            (( stdInput[0] == '@') || /* reading a default @=data pair */
             ( stdInput[0] == '\"'))) /* reading a new value=data pair */
   {
     processQueryValue(stdInput);
   }
   else                               /* since we are assuming that the */
-  {                                  /* file format is valid we must   */ 
+  {                                  /* file format is valid we must   */
     if ( bTheKeyIsOpen )             /* be reading a blank line which  */
-      closeKey();                    /* indicate end of this key processing */ 
+      closeKey();                    /* indicate end of this key processing */
   }
 }
 
 /******************************************************************************
- * This funtion is the main entry point to the deletetValue type of action.  It 
- * receives the currently read line and dispatch the work depending on the 
+ * This funtion is the main entry point to the deletetValue type of action.  It
+ * receives the currently read line and dispatch the work depending on the
  * context.
  */
-void doDeleteValue(LPSTR line) { 
+void doDeleteValue(LPSTR line) {
   printf ("%s: deleteValue not yet implemented\n", getAppName());
 }
 
 /******************************************************************************
- * This funtion is the main entry point to the deleteKey type of action.  It 
- * receives the currently read line and dispatch the work depending on the 
+ * This funtion is the main entry point to the deleteKey type of action.  It
+ * receives the currently read line and dispatch the work depending on the
  * context.
  */
-void doDeleteKey(LPSTR line)   { 
+void doDeleteKey(LPSTR line)   {
   printf ("%s: deleteKey not yet implemented\n", getAppName());
 }
 
 /******************************************************************************
- * This funtion is the main entry point to the createKey type of action.  It 
- * receives the currently read line and dispatch the work depending on the 
+ * This funtion is the main entry point to the createKey type of action.  It
+ * receives the currently read line and dispatch the work depending on the
  * context.
  */
-void doCreateKey(LPSTR line)   { 
+void doCreateKey(LPSTR line)   {
   printf ("%s: createKey not yet implemented\n", getAppName());
 }
 
 /******************************************************************************
- * This function is a wrapper for the setValue function.  It prepares the 
+ * This function is a wrapper for the setValue function.  It prepares the
  * land and clean the area once completed.
  * Note: this function modifies the line parameter.
  *
@@ -733,7 +733,7 @@
       }
 
   }
-  else 
+  else
   {
       printf("Warning! uncrecognized line:\n%s\n", line);
       return;
@@ -747,12 +747,12 @@
     printf("%s: ERROR Key %s not created. Value: %s, Data: %s\n",
            getAppName(),
            currentKeyName,
-           val_name, 
+           val_name,
            val_data);
 }
 
 /******************************************************************************
- * This function is a wrapper for the queryValue function.  It prepares the 
+ * This function is a wrapper for the queryValue function.  It prepares the
  * land and clean the area once completed.
  */
 void processQueryValue(LPSTR cmdline)
@@ -774,7 +774,7 @@
   for (counter=0; counter<QUERY_VALUE_MAX_ARGS; counter++)
     argv[counter]=NULL;
 
-  while( (token = getToken(&cmdline, queryValueDelim[argCounter])) != NULL ) 
+  while( (token = getToken(&cmdline, queryValueDelim[argCounter])) != NULL )
   {
     argv[argCounter++] = getArg(token);
 
@@ -786,18 +786,18 @@
   if ( argv[0] == NULL )
     return; /* SHOULD NOT HAPPEN */
   else
-    keyValue = argv[0]; 
+    keyValue = argv[0];
 
-  if( (keyValue[0] == '@') && (strlen(keyValue) == 1) ) 
+  if( (keyValue[0] == '@') && (strlen(keyValue) == 1) )
   {
     LONG  lLen  = KEY_MAX_LEN;
     CHAR*  lpsData=HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,KEY_MAX_LEN);
-    /* 
+    /*
      * We need to query the key default value
      */
     hRes = RegQueryValue(
-             currentKeyHandle, 
-             currentKeyName, 
+             currentKeyHandle,
+             currentKeyName,
              (LPBYTE)lpsData,
              &lLen);
 
@@ -813,20 +813,20 @@
       lpsRes[lLen-1]='\0';
     }
   }
-  else 
+  else
   {
     DWORD  dwLen  = KEY_MAX_LEN;
     BYTE*  lpbData=HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,KEY_MAX_LEN);
     DWORD  dwType;
-    /* 
+    /*
      * We need to query a specific value for the key
      */
     hRes = RegQueryValueEx(
-             currentKeyHandle, 
-             keyValue, 
-             0, 
-             &dwType, 
-             (LPBYTE)lpbData, 
+             currentKeyHandle,
+             keyValue,
+             0,
+             &dwType,
+             (LPBYTE)lpbData,
              &dwLen);
 
     if (hRes==ERROR_MORE_DATA) {
@@ -836,7 +836,7 @@
 
     if (hRes == ERROR_SUCCESS)
     {
-      /* 
+      /*
        * Convert the returned data to a displayable format
        */
       switch ( dwType )
@@ -859,27 +859,27 @@
           lpsRes = convertHexToHexCSV(lpbData, dwLen);
           break;
         }
-      } 
+      }
     }
 
     HeapFree(GetProcessHeap(), 0, lpbData);
   }
- 
- 
-  if ( hRes == ERROR_SUCCESS ) 
+
+
+  if ( hRes == ERROR_SUCCESS )
     printf(
       "%s: Value \"%s\" = \"%s\" in key [%s]\n",
       getAppName(),
-      keyValue, 
+      keyValue,
       lpsRes,
       currentKeyName);
 
   else
     printf("%s: ERROR Value \"%s\" not found. for key \"%s\"\n",
       getAppName(),
-      keyValue, 
+      keyValue,
       currentKeyName);
-    
+
   /*
    * Do some cleanup
    */
@@ -909,7 +909,7 @@
     {
         LPSTR readRes   = "";       /* result of the last read */
         ULONG curLen    = 0;        /* length of a read string */
-        while ( readRes ) 
+        while ( readRes )
         {
             if (strchr(*pLine, '\n'))
             {
@@ -944,7 +944,7 @@
     ULONG lineSize       = REG_VAL_BUF_SIZE;
     ULONG nextLineSize   = REG_VAL_BUF_SIZE;
 
-    line = HeapAlloc(GetProcessHeap(), 0, lineSize); 
+    line = HeapAlloc(GetProcessHeap(), 0, lineSize);
     nextLine = HeapAlloc(GetProcessHeap(), 0, nextLineSize);
 
     if (!line || !nextLine)
@@ -957,10 +957,10 @@
     while (!feof(in))
     {
         ULONG curLen;
-        
+
         readLine(in, &line, &lineSize);
         curLen = strlen(line);
-        
+
         if ( curLen )
         {
             if( line[0] == '#' )    /* this is a comment */
@@ -983,9 +983,9 @@
     }
     command(NULL);
 
-#if 0 
-    /* 
-     * Save the registry only if it was modified 
+#if 0
+    /*
+     * Save the registry only if it was modified
      */
     if ( commandSaveRegistry[cmdIndex] )
         SHELL_SaveRegistry();
@@ -995,15 +995,15 @@
 }
 
 /******************************************************************************
- * This funtion is the main entry point to the registerDLL action.  It 
+ * This funtion is the main entry point to the registerDLL action.  It
  * receives the currently read line, then loads and registers the requested DLLs
  */
-void doRegisterDLL(LPSTR stdInput) { 
+void doRegisterDLL(LPSTR stdInput) {
   HMODULE theLib = 0;
   UINT retVal = 0;
 
   /* Check for valid input */
-  if (stdInput == NULL)             
+  if (stdInput == NULL)
     return;
 
   /* Load and register the library, then free it */
@@ -1019,26 +1019,26 @@
 
     if (retVal != S_OK)
       printf("%s: DLLRegisterServer error 0x%x in '%s'.\n",
-             getAppName(), retVal, stdInput);      
+             getAppName(), retVal, stdInput);
 
     FreeLibrary(theLib);
   }
   else
   {
-    printf("%s: Could not load DLL '%s'.\n", getAppName(), stdInput); 
+    printf("%s: Could not load DLL '%s'.\n", getAppName(), stdInput);
   }
 }
 
 /******************************************************************************
- * This funtion is the main entry point to the unregisterDLL action.  It 
+ * This funtion is the main entry point to the unregisterDLL action.  It
  * receives the currently read line, then loads and unregisters the requested DLLs
  */
-void doUnregisterDLL(LPSTR stdInput) { 
+void doUnregisterDLL(LPSTR stdInput) {
   HMODULE theLib = 0;
   UINT retVal = 0;
 
   /* Check for valid input */
-  if (stdInput == NULL)             
+  if (stdInput == NULL)
     return;
 
   /* Load and unregister the library, then free it */
@@ -1222,7 +1222,7 @@
             } else {
                 fputs("@=", file);
             }
-            
+
             switch (value_type)
             {
             case REG_SZ:
@@ -1270,7 +1270,7 @@
             }
         }
     }
-    
+
     /*fputs("\n", file);*/
 
     i = 0;
@@ -1397,7 +1397,7 @@
 
         /* export all registry classes */
         file = REGPROC_open_export_file(file_name);
-        for (i = 0; i < REG_CLASS_NUMBER; i++) 
+        for (i = 0; i < REG_CLASS_NUMBER; i++)
         {
             strcpy(reg_key_name_buf, reg_class_names[i]);
             export_hkey(file, reg_class_keys[i],
@@ -1416,7 +1416,7 @@
 }
 
 /******************************************************************************
- * Recursive function which removes the registry key with all subkeys. 
+ * Recursive function which removes the registry key with all subkeys.
  */
 void delete_branch(HKEY key,
                    CHAR **reg_key_name_buf, DWORD *reg_key_name_len)
diff --git a/programs/regedit/regproc.h b/programs/regedit/regproc.h
index 7ee198e..ab54fae 100644
--- a/programs/regedit/regproc.h
+++ b/programs/regedit/regproc.h
@@ -20,7 +20,7 @@
 /******************************************************************************
  * Defines and consts
  */
-#define KEY_MAX_LEN             1024 
+#define KEY_MAX_LEN             1024
 
 /* Return values */
 #define SUCCESS               0
@@ -44,7 +44,7 @@
 
 void processRegLines(FILE *in, CommandAPI command);
 
-/* 
+/*
  * Generic prototypes
  */
 char*   getToken(char** str, const char* delims);
@@ -60,13 +60,13 @@
 HRESULT openKey(LPSTR stdInput);
 void    closeKey();
 
-/* 
+/*
  * api setValue prototypes
  */
 void    processSetValue(LPSTR cmdline);
 HRESULT setValue(LPSTR val_name, LPSTR val_data);
 
-/* 
+/*
  * api queryValue prototypes
  */
 void    processQueryValue(LPSTR cmdline);
diff --git a/programs/regsvr32/regsvr32.c b/programs/regsvr32/regsvr32.c
index 587e6fb..5908641 100644
--- a/programs/regsvr32/regsvr32.c
+++ b/programs/regsvr32/regsvr32.c
@@ -136,7 +136,7 @@
     return 0;
 }
 
-int InstallDll(BOOL install, char *strDll, WCHAR *command_line) 
+int InstallDll(BOOL install, char *strDll, WCHAR *command_line)
 {
     HRESULT hr;
     DLLINSTALL pfInstall;
@@ -169,7 +169,7 @@
     BOOL            DllFound = FALSE;
     WCHAR*          wsCommandLine = NULL;
     WCHAR           EmptyLine[1] = {0};
-    
+
 
     for(i = 1; i < argc; i++)
     {
@@ -180,9 +180,9 @@
         else if (!strnicmp(argv[i], "/i", strlen("/i")))
         {
             CHAR* command_line = argv[i] + strlen("/i");
-            
+
             CallInstall = TRUE;
-            if (command_line[0] == ':' && command_line[1]) 
+            if (command_line[0] == ':' && command_line[1])
             {
                 int len = strlen(command_line);
 
@@ -214,7 +214,7 @@
                     wsCommandLine = EmptyLine;
                 }
             }
-            else 
+            else
             {
                 wsCommandLine = EmptyLine;
             }
@@ -236,7 +236,7 @@
                 else
                     res = RegisterDll(DllName);
             }
-            
+
             if (res)
                 return res;
 
@@ -244,7 +244,7 @@
             {
                 res = InstallDll(!Unregister, DllName, wsCommandLine);
             }
-            
+
             return res;
         }
     }
diff --git a/programs/regtest/regtest.c b/programs/regtest/regtest.c
index 30accb1..fb9b72a 100644
--- a/programs/regtest/regtest.c
+++ b/programs/regtest/regtest.c
@@ -152,13 +152,13 @@
     char keyname[]="regtest1";
 
     lSts = RegOpenKeyEx(HKEY_LOCAL_MACHINE,"SOFTWARE",0,1,&hkeyP);
-    if (lSts != ERROR_SUCCESS) 
+    if (lSts != ERROR_SUCCESS)
       {
 	xERROR(1,lSts);
 	return;
       }
     lSts = RegCreateKeyEx(hkeyP,keyname,0,0,0,0xf003f,0,&hkey,&dwDisp);
-    if (lSts != ERROR_SUCCESS) 
+    if (lSts != ERROR_SUCCESS)
     {
       xERROR(2,lSts);
       RegCloseKey(hkeyP);
diff --git a/programs/uninstaller/main.c b/programs/uninstaller/main.c
index 560ea24..69873bd 100644
--- a/programs/uninstaller/main.c
+++ b/programs/uninstaller/main.c
@@ -1,6 +1,6 @@
 /*
  * Q&D Uninstaller (main.c)
- * 
+ *
  * Copyright 2000 Andreas Mohr <andi@lisas.de>
  *
  * This library is free software; you can redistribute it and/or
@@ -42,7 +42,7 @@
 #include <stdio.h>
 #define DEBUG(x...) fprintf(stderr,x)
 #else
-#define DEBUG(x...) 
+#define DEBUG(x...)
 #endif
 
 /* use multi-select listbox */
@@ -93,7 +93,7 @@
 void ListUninstallPrograms(void)
 {
     int i;
-    
+
     if (! FetchUninstallInformation())
         return;
 
@@ -128,7 +128,7 @@
 
 
 int WINAPI WinMain( HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR cmdline, int cmdshow )
-{ 
+{
     MSG msg;
     WNDCLASS wc;
     HWND hWnd;
@@ -165,15 +165,15 @@
     wc.hbrBackground = (HBRUSH) GetStockObject( LTGRAY_BRUSH );
     wc.lpszMenuName = NULL;
     wc.lpszClassName = appname;
-    
+
     if (!RegisterClass(&wc)) exit(1);
-    hWnd = CreateWindow( appname, appname, 
-        WS_OVERLAPPEDWINDOW & ~WS_THICKFRAME & ~WS_MAXIMIZEBOX, 
-        CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, 
+    hWnd = CreateWindow( appname, appname,
+        WS_OVERLAPPEDWINDOW & ~WS_THICKFRAME & ~WS_MAXIMIZEBOX,
+        CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT,
         NULL_HANDLE, NULL_HANDLE, hInst, NULL );
-    
+
     if (!hWnd) exit(1);
-    
+
     ShowWindow( hWnd, cmdshow );
     UpdateWindow( hWnd );
 
@@ -198,7 +198,7 @@
     char key_app[1024];
     char *p;
 
-    
+
     numentries = 0;
     oldsel = -1;
     if ( RegOpenKeyEx(HKEY_LOCAL_MACHINE, REGSTR_PATH_UNINSTALL,
@@ -207,7 +207,7 @@
 	MessageBox(0, "Uninstall registry key not available (yet), nothing to do !", appname, MB_OK);
 	return 0;
     }
-	
+
     strcpy(key_app, REGSTR_PATH_UNINSTALL);
     strcat(key_app, "\\");
     p = key_app+strlen(REGSTR_PATH_UNINSTALL)+1;
@@ -324,7 +324,7 @@
 		cxChar * 50 + GetSystemMetrics(SM_CXVSCROLL), cyChar * 20,
 		hWnd, (HMENU) 1,
 		(HINSTANCE)GetWindowLong(hWnd, GWL_HINSTANCE), NULL);
-	
+
 	GetWindowRect(hwndList, &rect);
 	y = by;
 	maxx += (rect.right - rect.left)*1.1;
@@ -402,14 +402,14 @@
     case WM_DESTROY:
         PostQuitMessage( 0 );
         return 0;
-    
+
     case WM_COMMAND:
 	if ((HWND)lParam == hwndList)
 	{
 	    if (HIWORD(wParam) == LBN_SELCHANGE)
 	    {
 		int sel = SendMessage(hwndList, LB_GETCURSEL, 0, 0);
-		
+
 #ifndef USE_MULTIPLESEL
 		if (oldsel != -1)
 		{
@@ -427,7 +427,7 @@
 	if ((HWND)lParam == button[0].hwnd) /* Uninstall button */
         {
 	    UninstallProgram();
-   
+
 	    InvalidateRect(hWnd, NULL, TRUE);
 	    UpdateWindow(hWnd);
 
@@ -440,6 +440,6 @@
 	    PostQuitMessage(0);
 	return 0;
     }
-	
+
     return( DefWindowProc( hWnd, msg, wParam, lParam ));
 }
diff --git a/programs/view/globals.h b/programs/view/globals.h
index 17edfc7..eeee749 100644
--- a/programs/view/globals.h
+++ b/programs/view/globals.h
@@ -17,8 +17,8 @@
  */
 
 /* for SMALL_RECT */
-#include "wincon.h" 
-#include "resource.h" 
+#include "wincon.h"
+#include "resource.h"
 
 /*  Add global function prototypes here */
 
diff --git a/programs/view/init.c b/programs/view/init.c
index 92585e5..15cdfa7 100644
--- a/programs/view/init.c
+++ b/programs/view/init.c
@@ -31,7 +31,7 @@
   WNDCLASSEX wc;
 
   /* Load the application name and description strings */
-  
+
   LoadString(hInstance, IDS_APPNAME, szAppName, sizeof(szAppName));
   LoadString(hInstance, IDS_DESCRIPTION, szTitle, sizeof(szTitle));
 
@@ -41,7 +41,7 @@
   wc.cbSize = sizeof(WNDCLASSEX);
 
   /* Load small icon image */
-  wc.hIconSm = LoadImage(hInstance,		
+  wc.hIconSm = LoadImage(hInstance,
 			 MAKEINTRESOURCEA(IDI_APPICON),
 			 IMAGE_ICON,
 			 16, 16,
@@ -73,7 +73,7 @@
 
 BOOL InitInstance(HINSTANCE hInstance, int nCmdShow)
 {
-    HWND hwnd; 
+    HWND hwnd;
 
     /* Save the instance handle in a global variable for later use */
     hInst = hInstance;
@@ -86,9 +86,9 @@
                         CW_USEDEFAULT, 0,    /* size */
                         NULL,                /* Overlapped has no parent */
                         NULL,                /* Use the window class menu */
-                        hInstance,           
-                        NULL);               
-    
+                        hInstance,
+                        NULL);
+
     if (!hwnd)
         return FALSE;
 
diff --git a/programs/view/view.c b/programs/view/view.c
index d8c5fc8..b42bcee 100644
--- a/programs/view/view.c
+++ b/programs/view/view.c
@@ -19,7 +19,7 @@
 #include <windows.h>
 #include "resource.h"
 
-/* 
+/*
 #include <windowsx.h>
    Wine doesn't have windowsx.h, so we use this
 */
@@ -28,7 +28,7 @@
 /* Wine seems to need this */
 #include <commdlg.h>
 
-#include "globals.h"        
+#include "globals.h"
 #include <stdio.h>
 
 BOOL FileIsPlaceable( LPCSTR szFileName );
@@ -44,7 +44,7 @@
 BOOL FileOpen(HWND hWnd, char *fn)
 {
   OPENFILENAME ofn = { sizeof(OPENFILENAME),
-		       0, 0, NULL, NULL, 0, 0, NULL, 
+		       0, 0, NULL, NULL, 0, 0, NULL,
 		       FN_LENGTH, NULL, 0, NULL, NULL, OFN_CREATEPROMPT |
 		       OFN_SHOWHELP, 0, 0, NULL, 0, NULL };
   ofn.lpstrFilter = "Metafiles\0*.wmf\0";
@@ -61,9 +61,9 @@
 {
   switch (uMessage)
     {
-    case WM_PAINT: 
+    case WM_PAINT:
       {
-	PAINTSTRUCT ps; 
+	PAINTSTRUCT ps;
 	BeginPaint(hwnd, &ps);
 	SetMapMode(ps.hdc, MM_ANISOTROPIC);
 	SetViewportExtEx(ps.hdc, width, height, NULL);
@@ -99,7 +99,7 @@
 	    }
 	  }
 	  break;
-	  
+
 	case IDM_SET_EXT_TO_WIN:
 	  {
 	    RECT r;
@@ -110,7 +110,7 @@
 	  }
 	  break;
 
-	  
+
 	case IDM_LEFT:
 	  deltax += 100;
 	  InvalidateRect( hwnd, NULL, TRUE );
@@ -155,7 +155,7 @@
   if( (hInFile = _lopen( szFileName, OF_READ ) ) == HFILE_ERROR )
     return FALSE;
 
-  if( _lread( hInFile, &apmh, sizeof(APMFILEHEADER) ) 
+  if( _lread( hInFile, &apmh, sizeof(APMFILEHEADER) )
       != sizeof(APMFILEHEADER) )
     {
       _lclose( hInFile );
@@ -184,11 +184,11 @@
   checksum = 0;
   p = (WORD *) &APMHeader;
 
-  for(i=0; i<10; i++) 
+  for(i=0; i<10; i++)
     checksum ^= *p++;
   if (checksum != APMHeader.checksum) {
     char msg[128];
-    sprintf(msg, "Computed checksum %04x != stored checksum %04x\n", 
+    sprintf(msg, "Computed checksum %04x != stored checksum %04x\n",
 	   checksum, APMHeader.checksum);
         MessageBox(hwnd, msg, "Checksum failed", MB_OK);
     return 0;
@@ -207,10 +207,10 @@
   }
   _lclose(fh);
 
-  if (!(hmf = SetMetaFileBitsEx(mfHeader.mtSize*2, lpData))) 
+  if (!(hmf = SetMetaFileBitsEx(mfHeader.mtSize*2, lpData)))
     return 0;
 
-  
+
   width = APMHeader.bbox.Right - APMHeader.bbox.Left;
   height = APMHeader.bbox.Bottom - APMHeader.bbox.Top;
 
diff --git a/programs/view/winmain.c b/programs/view/winmain.c
index 7024c6d..1dba678 100644
--- a/programs/view/winmain.c
+++ b/programs/view/winmain.c
@@ -16,25 +16,25 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
-#include <windows.h>            /* required for all Windows applications */ 
+#include <windows.h>            /* required for all Windows applications */
 #include "globals.h"            /* prototypes specific to this application */
 
 
 int APIENTRY WinMain(HINSTANCE hInstance,
-                     HINSTANCE hPrevInstance, 
-                     LPSTR     lpCmdLine, 
+                     HINSTANCE hPrevInstance,
+                     LPSTR     lpCmdLine,
                      int       nCmdShow)
 {
     MSG msg;
     HANDLE hAccelTable;
-    
+
     /* Other instances of app running? */
     if (!hPrevInstance)
     {
       /* stuff to be done once */
       if (!InitApplication(hInstance))
       {
-	return FALSE;              /* exit */ 
+	return FALSE;              /* exit */
       }
     }
 
@@ -56,7 +56,7 @@
       if (!TranslateAccelerator(msg.hwnd, hAccelTable, &msg))
         {
             TranslateMessage(&msg);
-            DispatchMessage(&msg); 
+            DispatchMessage(&msg);
         }
     }
 
diff --git a/programs/wcmd/batch.c b/programs/wcmd/batch.c
index b73e3ef..c925251 100644
--- a/programs/wcmd/batch.c
+++ b/programs/wcmd/batch.c
@@ -112,8 +112,8 @@
 char *p, *s, *t;
 int i;
 
-  /* Get working version of command line */                  
-  strcpy(cmd1, line);                                    
+  /* Get working version of command line */
+  strcpy(cmd1, line);
 
   /* Expand environment variables in a batch file %{0-9} first  */
   /*   Then env vars, and if any left (ie use of undefined vars,*/
@@ -122,8 +122,8 @@
   /*   contents of fred, then the digit 1. Would need to remove */
   /*   ExpandEnvStrings to achieve this                         */
 
-  /* Replace use of %0...%9 */                                
-  p = cmd1;                                                   
+  /* Replace use of %0...%9 */
+  p = cmd1;
   while ((p = strchr(p, '%'))) {
     i = *(p+1) - '0';
     if ((i >= 0) && (i <= 9)) {
@@ -132,8 +132,8 @@
       strcpy (p, t);
       strcat (p, s);
       free (s);
-    } else {                                                  
-      p++;                                                    
+    } else {
+      p++;
     }
   }
 
@@ -146,25 +146,25 @@
 
   /* In a batch program, unknown variables are replace by nothing */
   /* so remove any remaining %var%                                */
-  p = cmd2;                                                   
-  while ((p = strchr(p, '%'))) {                              
-    s = strchr(p+1, '%');                                     
-    if (!s) {                                                 
-      *p=0x00;                                                
-    } else {                                                  
-      t = strdup(s+1);                                        
-      strcpy(p, t);                                           
-      free(t);                                                
-    }                                                         
-  }                                                           
+  p = cmd2;
+  while ((p = strchr(p, '%'))) {
+    s = strchr(p+1, '%');
+    if (!s) {
+      *p=0x00;
+    } else {
+      t = strdup(s+1);
+      strcpy(p, t);
+      free(t);
+    }
+  }
 
   /* Show prompt before batch line IF echo is on */
-  if (echo_mode && (line[0] != '@')) {                        
-    WCMD_show_prompt();                                       
-    WCMD_output ("%s\n", cmd2);                               
-  }                                                           
+  if (echo_mode && (line[0] != '@')) {
+    WCMD_show_prompt();
+    WCMD_output ("%s\n", cmd2);
+  }
 
-  WCMD_process_command (cmd2);                             
+  WCMD_process_command (cmd2);
 }
 
 /*******************************************************************
diff --git a/programs/wcmd/builtins.c b/programs/wcmd/builtins.c
index ee15396..95e81cc 100644
--- a/programs/wcmd/builtins.c
+++ b/programs/wcmd/builtins.c
@@ -227,7 +227,7 @@
     echo_mode = 0;
     return;
   }
-  WCMD_output_asis (command);    
+  WCMD_output_asis (command);
   WCMD_output (newline);
 
 }
@@ -628,7 +628,7 @@
 LPVOID env;
 char *p;
 int status;
-char buffer[1048];                                                   
+char buffer[1048];
 
   if (strlen(param1) == 0) {
     env = GetEnvironmentStrings ();
@@ -642,22 +642,22 @@
     p = strchr (s, '=');
     if (p == NULL) {
 
-      /* FIXME: Emulate Win98 for now, ie "SET C" looks ONLY for an    
-         environment variable C, whereas on NT it shows ALL variables  
-         starting with C.                                              
-       */                                                            
-      status = GetEnvironmentVariable(s, buffer, sizeof(buffer));    
-      if (status) {                                                  
-        WCMD_output("%s=%s\n", s, buffer);                           
-      } else {                                                       
-        WCMD_output ("Environment variable %s not defined\n", s);    
-      }                                                              
+      /* FIXME: Emulate Win98 for now, ie "SET C" looks ONLY for an
+         environment variable C, whereas on NT it shows ALL variables
+         starting with C.
+       */
+      status = GetEnvironmentVariable(s, buffer, sizeof(buffer));
+      if (status) {
+        WCMD_output("%s=%s\n", s, buffer);
+      } else {
+        WCMD_output ("Environment variable %s not defined\n", s);
+      }
       return;
     }
     *p++ = '\0';
 
-    if (strlen(p) == 0) p = 0x00;                                    
-    status = SetEnvironmentVariable (s, p);   
+    if (strlen(p) == 0) p = 0x00;
+    status = SetEnvironmentVariable (s, p);
     if (!status) WCMD_print_error();
   }
   /* WCMD_output (newline);   @JED*/
diff --git a/programs/wcmd/directory.c b/programs/wcmd/directory.c
index 317df7b..2a1faff 100644
--- a/programs/wcmd/directory.c
+++ b/programs/wcmd/directory.c
@@ -41,7 +41,7 @@
 extern char quals[MAX_PATH], param1[MAX_PATH], param2[MAX_PATH];
 extern DWORD errorlevel;
 
-int file_total, dir_total, line_count, page_mode, recurse, wide, bare, 
+int file_total, dir_total, line_count, page_mode, recurse, wide, bare,
     max_width;
 __int64 byte_total;
 
@@ -100,7 +100,7 @@
      if (recurse) {
        WCMD_output ("\n\n     Total files listed:\n%8d files%25s bytes\n",
             file_total, WCMD_filesize64 (byte_total));
-       WCMD_output ("%8d directories %18s bytes free\n\n", 
+       WCMD_output ("%8d directories %18s bytes free\n\n",
             dir_total, WCMD_filesize64 (free.QuadPart));
      } else {
        WCMD_output (" %18s bytes free\n\n", WCMD_filesize64 (free.QuadPart));
@@ -117,7 +117,7 @@
  * FIXME: Entries sorted by name only. Should we support DIRCMD??
  * FIXME: Assumes 24-line display for the /P qualifier.
  * FIXME: Other command qualifiers not supported.
- * FIXME: DIR /S FILENAME fails if at least one matching file is not found in the top level. 
+ * FIXME: DIR /S FILENAME fails if at least one matching file is not found in the top level.
  */
 
 void WCMD_list_directory (char *search_path, int level) {
@@ -258,7 +258,7 @@
       	     datestring, timestring, (fd+i)->cFileName);
          linesout++;
       } else {
-         if (!((strcmp((fd+i)->cFileName, ".") == 0) || 
+         if (!((strcmp((fd+i)->cFileName, ".") == 0) ||
                (strcmp((fd+i)->cFileName, "..") == 0))) {
             WCMD_output ("%s%s\n", recurse?real_path:"", (fd+i)->cFileName);
             linesout++;
diff --git a/programs/wcmd/wcmd.h b/programs/wcmd/wcmd.h
index 7ce15e3..8f0e29a 100644
--- a/programs/wcmd/wcmd.h
+++ b/programs/wcmd/wcmd.h
@@ -1,5 +1,5 @@
 /*
- * WCMD - Wine-compatible command line interface. 
+ * WCMD - Wine-compatible command line interface.
  *
  * Copyright (C) 1999 D A Pickles
  *
@@ -46,7 +46,7 @@
 void WCMD_if (char *);
 void WCMD_move (void);
 void WCMD_output (char *format, ...);
-void WCMD_output_asis (char *message);                   
+void WCMD_output_asis (char *message);
 void WCMD_parse (char *s, char *q, char *p1, char *p2);
 void WCMD_pause (void);
 void WCMD_pipe (char *command);
diff --git a/programs/wcmd/wcmdmain.c b/programs/wcmd/wcmdmain.c
index 1bb1043..a4b6539 100644
--- a/programs/wcmd/wcmdmain.c
+++ b/programs/wcmd/wcmdmain.c
@@ -1,5 +1,5 @@
 /*
- * WCMD - Wine-compatible command line interface. 
+ * WCMD - Wine-compatible command line interface.
  *
  * Copyright (C) 1999 - 2001 D A Pickles
  *
@@ -198,11 +198,11 @@
     }
     if ((p = strchr(cmd,'<')) != NULL) *p = '\0';
 
-/*                                                               
- * Strip leading whitespaces, and a '@' if supplied              
- */                                                            
-    whichcmd = WCMD_strtrim_leading_spaces(cmd);               
-    if (whichcmd[0] == '@') whichcmd++;                        
+/*
+ * Strip leading whitespaces, and a '@' if supplied
+ */
+    whichcmd = WCMD_strtrim_leading_spaces(cmd);
+    if (whichcmd[0] == '@') whichcmd++;
 
 /*
  *	Check if the command entered is internal. If it is, pass the rest of the
@@ -210,14 +210,14 @@
  */
 
     count = 0;
-    while (IsCharAlphaNumeric(whichcmd[count])) {              
+    while (IsCharAlphaNumeric(whichcmd[count])) {
       count++;
     }
     for (i=0; i<=WCMD_EXIT; i++) {
       if (CompareString (LOCALE_USER_DEFAULT, NORM_IGNORECASE | SORT_STRINGSORT,
-      	  whichcmd, count, inbuilt[i], -1) == 2) break;        
+      	  whichcmd, count, inbuilt[i], -1) == 2) break;
     }
-    p = WCMD_strtrim_leading_spaces (&whichcmd[count]);       
+    p = WCMD_strtrim_leading_spaces (&whichcmd[count]);
     WCMD_parse (p, quals, param1, param2);
     switch (i) {
 
@@ -253,11 +253,11 @@
       case WCMD_ECHO:
         /* Use the unstripped version of the following data - step over the space */
         /* but only if a parameter follows                                        */
-        if (strlen(&whichcmd[count]) > 0)                                       
-          WCMD_echo(&whichcmd[count+1]);                                        
-        else                                                                    
-          WCMD_echo(&whichcmd[count]);                                          
-        break;                         
+        if (strlen(&whichcmd[count]) > 0)
+          WCMD_echo(&whichcmd[count+1]);
+        else
+          WCMD_echo(&whichcmd[count]);
+        break;
       case WCMD_FOR:
         WCMD_for (p);
         break;
@@ -309,8 +309,8 @@
         WCMD_setshow_time ();
         break;
       case WCMD_TITLE:
-        if (strlen(&whichcmd[count]) > 0)                                       
-          WCMD_title(&whichcmd[count+1]);                                        
+        if (strlen(&whichcmd[count]) > 0)
+          WCMD_title(&whichcmd[count+1]);
         break;
       case WCMD_TYPE:
         WCMD_type ();
@@ -327,7 +327,7 @@
       case WCMD_EXIT:
         ExitProcess (0);
       default:
-        WCMD_run_program (whichcmd);                   
+        WCMD_run_program (whichcmd);
     };
     if (old_stdin) {
       CloseHandle (GetStdHandle (STD_INPUT_HANDLE));
@@ -582,7 +582,7 @@
   va_end(ap);
 }
 
-/******************************************************************* 
+/*******************************************************************
  * WCMD_output_asis - send output to current standard output device.
  *        without formatting eg. when message contains '%'
  */
diff --git a/programs/wineconsole/dialog.c b/programs/wineconsole/dialog.c
index 945fb31..61bb8e0 100644
--- a/programs/wineconsole/dialog.c
+++ b/programs/wineconsole/dialog.c
@@ -29,7 +29,7 @@
 
 enum WCUSER_ApplyTo {
     /* Prop sheet CFG */
-    WCUSER_ApplyToCursorSize, 
+    WCUSER_ApplyToCursorSize,
     WCUSER_ApplyToHistorySize, WCUSER_ApplyToHistoryMode, WCUSER_ApplyToMenuMask,
     WCUSER_ApplyToEditMode,
     /* Prop sheet FNT */
@@ -38,13 +38,13 @@
     WCUSER_ApplyToBufferSize, WCUSER_ApplyToWindow
 };
 
-struct dialog_info 
+struct dialog_info
 {
     struct config_data* config;         /* pointer to configuration used for dialog box */
     struct inner_data*	data;	        /* pointer to current winecon info */
     HWND		hDlg;		/* handle to active propsheet */
     int			nFont;		/* number of font size in size LB */
-    struct font_info 
+    struct font_info
     {
         UINT                    height;
         UINT                    weight;
@@ -80,7 +80,7 @@
             LOGFONT     lf;
             HFONT       hFont;
 
-            WCUSER_FillLogFont(&lf, di->font[val].faceName, 
+            WCUSER_FillLogFont(&lf, di->font[val].faceName,
                                di->font[val].height, di->font[val].weight);
             hFont = WCUSER_CopyFont(di->config, PRIVATE(di->data)->hWnd, &lf);
             DeleteObject(hFont);
@@ -127,7 +127,7 @@
     case WCUSER_ApplyToFont:
         {
             LOGFONT lf;
-            WCUSER_FillLogFont(&lf, di->font[val].faceName, 
+            WCUSER_FillLogFont(&lf, di->font[val].faceName,
                                di->font[val].height, di->font[val].weight);
             WCUSER_SetFont(di->data, &lf);
         }
@@ -156,8 +156,8 @@
 {
     struct dialog_info*		di;
     unsigned 			idc;
-    
-    switch (msg) 
+
+    switch (msg)
     {
     case WM_INITDIALOG:
 	di = (struct dialog_info*)((PROPSHEETPAGEA*)lParam)->lParam;
@@ -171,11 +171,11 @@
 	SetDlgItemInt(hDlg, IDC_OPT_HIST_SIZE, WINECON_GetHistorySize(di->data->hConIn),  FALSE);
 	if (WINECON_GetHistoryMode(di->data->hConIn))
 	    SendDlgItemMessage(hDlg, IDC_OPT_HIST_DOUBLE, BM_SETCHECK, BST_CHECKED, 0L);
-        SendDlgItemMessage(hDlg, IDC_OPT_CONF_CTRL, BM_SETCHECK, 
+        SendDlgItemMessage(hDlg, IDC_OPT_CONF_CTRL, BM_SETCHECK,
                            (di->config->menu_mask & MK_CONTROL) ? BST_CHECKED : BST_UNCHECKED, 0L);
-        SendDlgItemMessage(hDlg, IDC_OPT_CONF_SHIFT, BM_SETCHECK, 
+        SendDlgItemMessage(hDlg, IDC_OPT_CONF_SHIFT, BM_SETCHECK,
                            (di->config->menu_mask & MK_SHIFT) ? BST_CHECKED : BST_UNCHECKED, 0L);
-        SendDlgItemMessage(hDlg, IDC_OPT_QUICK_EDIT, BM_SETCHECK, 
+        SendDlgItemMessage(hDlg, IDC_OPT_QUICK_EDIT, BM_SETCHECK,
                            (di->config->quick_edit) ? BST_CHECKED : BST_UNCHECKED, 0L);
 	return FALSE; /* because we set the focus */
     case WM_COMMAND:
@@ -188,14 +188,14 @@
 
 	di = (struct dialog_info*)GetWindowLong(hDlg, DWL_USER);
 
-	switch (nmhdr->code) 
+	switch (nmhdr->code)
 	{
 	case PSN_SETACTIVE:
 	    /* needed in propsheet to keep properly the selected radio button
 	     * otherwise, the focus would be set to the first tab stop in the
 	     * propsheet, which would always activate the first radio button
 	     */
-	    if (IsDlgButtonChecked(hDlg, IDC_OPT_CURSOR_SMALL) == BST_CHECKED) 
+	    if (IsDlgButtonChecked(hDlg, IDC_OPT_CURSOR_SMALL) == BST_CHECKED)
 		idc = IDC_OPT_CURSOR_SMALL;
 	    else if (IsDlgButtonChecked(hDlg, IDC_OPT_CURSOR_MEDIUM) == BST_CHECKED)
 		idc = IDC_OPT_CURSOR_MEDIUM;
@@ -213,7 +213,7 @@
  	    val = GetDlgItemInt(hDlg, IDC_OPT_HIST_SIZE, &done, FALSE);
 	    if (done) (di->apply)(di, hDlg, WCUSER_ApplyToHistorySize, val);
 
-	    (di->apply)(di, hDlg, WCUSER_ApplyToHistoryMode, 
+	    (di->apply)(di, hDlg, WCUSER_ApplyToHistoryMode,
                         IsDlgButtonChecked(hDlg, IDC_OPT_HIST_DOUBLE) & BST_CHECKED);
 
             val = 0;
@@ -272,13 +272,13 @@
             int		        size_idx;
             struct dialog_info*	di;
             HFONT	        hFont, hOldFont;
-            
+
             di = (struct dialog_info*)GetWindowLong(GetParent(hWnd), DWL_USER);
             BeginPaint(hWnd, &ps);
 
             font_idx = SendDlgItemMessage(di->hDlg, IDC_FNT_LIST_FONT, LB_GETCURSEL, 0L, 0L);
             size_idx = SendDlgItemMessage(di->hDlg, IDC_FNT_LIST_SIZE, LB_GETCURSEL, 0L, 0L);
-            
+
             hFont = (HFONT)GetWindowLong(hWnd, 0L);
             if (hFont)
             {
@@ -286,12 +286,12 @@
                 WCHAR	buf2[256];
                 int	len1, len2;
 
-                len1 = LoadString(GetModuleHandle(NULL), IDS_FNT_PREVIEW_1, 
+                len1 = LoadString(GetModuleHandle(NULL), IDS_FNT_PREVIEW_1,
                                   buf1, sizeof(buf1) / sizeof(WCHAR));
                 len2 = LoadString(GetModuleHandle(NULL), IDS_FNT_PREVIEW_2,
                                   buf2, sizeof(buf2) / sizeof(WCHAR));
                 buf1[len1] = buf2[len2] = 0;
-                if (len1) 
+                if (len1)
                 {
                     hOldFont = SelectObject(ps.hdc, hFont);
                     SetBkColor(ps.hdc, WCUSER_ColorMap[GetWindowLong(GetDlgItem(di->hDlg, IDC_FNT_COLOR_BK), 0)]);
@@ -326,11 +326,11 @@
             int             i, step;
             RECT            client, r;
             HBRUSH          hbr;
-            
+
             BeginPaint(hWnd, &ps);
             GetClientRect(hWnd, &client);
             step = client.right / 8;
-            
+
             for (i = 0; i < 16; i++)
             {
                 r.top = (i / 8) * (client.bottom / 2);
@@ -370,7 +370,7 @@
         {
             int             i, step;
             RECT            client;
-            
+
             GetClientRect(hWnd, &client);
             step = client.right / 8;
             i = (HIWORD(lParam) >= client.bottom / 2) ? 8 : 0;
@@ -391,7 +391,7 @@
  *
  * enumerates all the font names with at least one valid font
  */
-static int CALLBACK font_enum_size2(const LOGFONT* lf, const TEXTMETRIC* tm, 
+static int CALLBACK font_enum_size2(const LOGFONT* lf, const TEXTMETRIC* tm,
 				    DWORD FontType, LPARAM lParam)
 {
     struct dialog_info*	di = (struct dialog_info*)lParam;
@@ -405,7 +405,7 @@
     return 1;
 }
 
-static int CALLBACK font_enum(const LOGFONT* lf, const TEXTMETRIC* tm, 
+static int CALLBACK font_enum(const LOGFONT* lf, const TEXTMETRIC* tm,
 			      DWORD FontType, LPARAM lParam)
 {
     struct dialog_info*	di = (struct dialog_info*)lParam;
@@ -420,10 +420,10 @@
         }
         else
             di->nFont = 1;
-        
+
         if (di->nFont)
 	{
- 	    SendDlgItemMessage(di->hDlg, IDC_FNT_LIST_FONT, LB_ADDSTRING, 
+ 	    SendDlgItemMessage(di->hDlg, IDC_FNT_LIST_FONT, LB_ADDSTRING,
                                0, (LPARAM)lf->lfFaceName);
         }
     }
@@ -436,7 +436,7 @@
  *
  *
  */
-static int CALLBACK font_enum_size(const LOGFONT* lf, const TEXTMETRIC* tm, 
+static int CALLBACK font_enum_size(const LOGFONT* lf, const TEXTMETRIC* tm,
 				   DWORD FontType, LPARAM lParam)
 {
     struct dialog_info*	di = (struct dialog_info*)lParam;
@@ -477,11 +477,11 @@
 	 * do the job by hand... get where to insert the new string
 	 */
 	for (idx = 0; idx < di->nFont && tm->tmHeight > di->font[idx].height; idx++);
-        while (idx < di->nFont && 
-               tm->tmHeight == di->font[idx].height && 
+        while (idx < di->nFont &&
+               tm->tmHeight == di->font[idx].height &&
                tm->tmWeight > di->font[idx].weight)
             idx++;
-        if (idx == di->nFont || 
+        if (idx == di->nFont ||
             tm->tmHeight != di->font[idx].height ||
             tm->tmWeight < di->font[idx].weight)
         {
@@ -521,8 +521,8 @@
 
     if (font_idx < 0 || size_idx < 0 || size_idx >= di->nFont)
 	return FALSE;
-    
-    WCUSER_FillLogFont(&lf, di->font[size_idx].faceName, 
+
+    WCUSER_FillLogFont(&lf, di->font[size_idx].faceName,
                        di->font[size_idx].height, di->font[size_idx].weight);
     hFont = WCUSER_CopyFont(&config, PRIVATE(di->data)->hWnd, &lf);
     if (!hFont) return FALSE;
@@ -555,7 +555,7 @@
 
     idx = SendDlgItemMessage(di->hDlg, IDC_FNT_LIST_FONT, LB_GETCURSEL, 0L, 0L);
     if (idx < 0) return FALSE;
-    
+
     SendDlgItemMessage(di->hDlg, IDC_FNT_LIST_FONT, LB_GETTEXT, idx, (LPARAM)lfFaceName);
     SendDlgItemMessage(di->hDlg, IDC_FNT_LIST_SIZE, LB_RESETCONTENT, 0L, 0L);
     if (di->font) HeapFree(GetProcessHeap(), 0, di->font);
@@ -596,7 +596,7 @@
 {
     SendDlgItemMessage(di->hDlg, IDC_FNT_LIST_FONT, LB_RESETCONTENT, 0L, 0L);
     EnumFontFamilies(PRIVATE(di->data)->hMemDC, NULL, font_enum, (LPARAM)di);
-    if (SendDlgItemMessage(di->hDlg, IDC_FNT_LIST_FONT, LB_SELECTSTRING, 
+    if (SendDlgItemMessage(di->hDlg, IDC_FNT_LIST_FONT, LB_SELECTSTRING,
 			   (WPARAM)-1, (LPARAM)di->config->face_name) == LB_ERR)
 	SendDlgItemMessage(di->hDlg, IDC_FNT_LIST_FONT, LB_SETCURSEL, 0L, 0L);
     fill_list_size(di, TRUE);
@@ -612,7 +612,7 @@
 {
     struct dialog_info*		di;
 
-    switch (msg) 
+    switch (msg)
     {
     case WM_INITDIALOG:
 	di = (struct dialog_info*)((PROPSHEETPAGEA*)lParam)->lParam;
@@ -626,15 +626,15 @@
 	break;
     case WM_COMMAND:
 	di = (struct dialog_info*)GetWindowLong(hDlg, DWL_USER);
-	switch (LOWORD(wParam)) 
+	switch (LOWORD(wParam))
 	{
-	case IDC_FNT_LIST_FONT:	
+	case IDC_FNT_LIST_FONT:
 	    if (HIWORD(wParam) == LBN_SELCHANGE)
 	    {
 		fill_list_size(di, FALSE);
 	    }
 	    break;
-	case IDC_FNT_LIST_SIZE:	
+	case IDC_FNT_LIST_SIZE:
 	    if (HIWORD(wParam) == LBN_SELCHANGE)
 	    {
 		select_font(di);
@@ -648,7 +648,7 @@
         DWORD   val;
 
 	di = (struct dialog_info*)GetWindowLong(hDlg, DWL_USER);
-	switch (nmhdr->code) 
+	switch (nmhdr->code)
 	{
         case PSN_SETACTIVE:
             di->hDlg = hDlg;
@@ -658,7 +658,7 @@
 
 	    if (val < di->nFont) (di->apply)(di, hDlg, WCUSER_ApplyToFont, val);
 
-            (di->apply)(di, hDlg, WCUSER_ApplyToAttribute, 
+            (di->apply)(di, hDlg, WCUSER_ApplyToAttribute,
                         (GetWindowLong(GetDlgItem(hDlg, IDC_FNT_COLOR_BK), 0) << 4) |
                         GetWindowLong(GetDlgItem(hDlg, IDC_FNT_COLOR_FG), 0));
 
@@ -684,7 +684,7 @@
 {
     struct dialog_info*		di;
 
-    switch (msg) 
+    switch (msg)
     {
     case WM_INITDIALOG:
 	di = (struct dialog_info*)((PROPSHEETPAGEA*)lParam)->lParam;
@@ -697,7 +697,7 @@
 	break;
     case WM_COMMAND:
 	di = (struct dialog_info*)GetWindowLong(hDlg, DWL_USER);
-	switch (LOWORD(wParam)) 
+	switch (LOWORD(wParam))
 	{
 	}
 	break;
@@ -709,7 +709,7 @@
         BOOL	        st_w, st_h;
 
 	di = (struct dialog_info*)GetWindowLong(hDlg, DWL_USER);
-	switch (nmhdr->code) 
+	switch (nmhdr->code)
 	{
         case PSN_SETACTIVE:
             di->hDlg = hDlg;
@@ -721,10 +721,10 @@
             {
                 (di->apply)(di, hDlg, WCUSER_ApplyToBufferSize, (DWORD)&sb);
             }
-            
+
             pos.Right  = GetDlgItemInt(hDlg, IDC_CNF_WIN_WIDTH,  &st_w, FALSE);
             pos.Bottom = GetDlgItemInt(hDlg, IDC_CNF_WIN_HEIGHT, &st_h, FALSE);
-            if (st_w && st_h && 
+            if (st_w && st_h &&
                 (pos.Right != di->config->win_width || pos.Bottom != di->config->win_height))
             {
                 pos.Left = pos.Top = 0;
@@ -821,8 +821,8 @@
     memset(&psHead, 0, sizeof(psHead));
     psHead.dwSize = sizeof(psHead);
 
-    if (!LoadString(GetModuleHandle(NULL), 
-                    (current) ? IDS_DLG_TIT_CURRENT : IDS_DLG_TIT_DEFAULT, 
+    if (!LoadString(GetModuleHandle(NULL),
+                    (current) ? IDS_DLG_TIT_CURRENT : IDS_DLG_TIT_DEFAULT,
                     buff, sizeof(buff) / sizeof(buff[0])))
     {
         buff[0] = 'S';
@@ -837,7 +837,7 @@
     psHead.nPages = 3;
     psHead.hwndParent = PRIVATE(data)->hWnd;
     psHead.u3.phpage = psPage;
- 
+
     PropertySheet(&psHead);
 
     return TRUE;
diff --git a/programs/wineconsole/registry.c b/programs/wineconsole/registry.c
index a1c9e4e..a74ad0b 100644
--- a/programs/wineconsole/registry.c
+++ b/programs/wineconsole/registry.c
@@ -56,63 +56,63 @@
     if (RegOpenKey(HKEY_CURRENT_USER, wszConsole, &hConKey)) hConKey = 0;
 
     count = sizeof(val);
-    if (!hConKey || RegQueryValueEx(hConKey, wszCursorSize, 0, &type, (char*)&val, &count)) 
+    if (!hConKey || RegQueryValueEx(hConKey, wszCursorSize, 0, &type, (char*)&val, &count))
         val = 25;
     cfg->cursor_size = val;
 
     count = sizeof(val);
-    if (!hConKey || RegQueryValueEx(hConKey, wszCursorVisible, 0, &type, (char*)&val, &count)) 
+    if (!hConKey || RegQueryValueEx(hConKey, wszCursorVisible, 0, &type, (char*)&val, &count))
         val = 1;
     cfg->cursor_visible = val;
 
     count = sizeof(val);
-    if (!hConKey || RegQueryValueEx(hConKey, wszExitOnDie, 0, &type, (char*)&val, &count)) 
+    if (!hConKey || RegQueryValueEx(hConKey, wszExitOnDie, 0, &type, (char*)&val, &count))
         val = 1;
     cfg->exit_on_die = val;
 
-    count = sizeof(cfg->face_name); 
+    count = sizeof(cfg->face_name);
     if (!hConKey || RegQueryValueEx(hConKey, wszFaceName, 0, &type, (char*)&cfg->face_name, &count))
         cfg->face_name[0] = 0;
 
     count = sizeof(val);
-    if (!hConKey || RegQueryValueEx(hConKey, wszFontSize, 0, &type, (char*)&val, &count)) 
+    if (!hConKey || RegQueryValueEx(hConKey, wszFontSize, 0, &type, (char*)&val, &count))
         val = 0x000C0008;
     cfg->cell_height = HIWORD(val);
     cfg->cell_width  = LOWORD(val);
 
     count = sizeof(val);
-    if (!hConKey || RegQueryValueEx(hConKey, wszFontWeight, 0, &type, (char*)&val, &count)) 
+    if (!hConKey || RegQueryValueEx(hConKey, wszFontWeight, 0, &type, (char*)&val, &count))
         val = 0;
     cfg->font_weight = val;
 
     count = sizeof(val);
-    if (!hConKey || RegQueryValueEx(hConKey, wszHistoryBufferSize, 0, &type, (char*)&val, &count)) 
+    if (!hConKey || RegQueryValueEx(hConKey, wszHistoryBufferSize, 0, &type, (char*)&val, &count))
         val = 0;
     cfg->history_size = val;
 
     count = sizeof(val);
-    if (!hConKey || RegQueryValueEx(hConKey, wszMenuMask, 0, &type, (char*)&val, &count)) 
+    if (!hConKey || RegQueryValueEx(hConKey, wszMenuMask, 0, &type, (char*)&val, &count))
         val = 0;
     cfg->menu_mask = val;
 
     count = sizeof(val);
-    if (!hConKey || RegQueryValueEx(hConKey, wszQuickEdit, 0, &type, (char*)&val, &count)) 
+    if (!hConKey || RegQueryValueEx(hConKey, wszQuickEdit, 0, &type, (char*)&val, &count))
         val = 0;
     cfg->quick_edit = val;
 
     count = sizeof(val);
-    if (!hConKey || RegQueryValueEx(hConKey, wszScreenBufferSize, 0, &type, (char*)&val, &count)) 
+    if (!hConKey || RegQueryValueEx(hConKey, wszScreenBufferSize, 0, &type, (char*)&val, &count))
         val = 0x00190050;
     cfg->sb_height = HIWORD(val);
     cfg->sb_width  = LOWORD(val);
 
     count = sizeof(val);
-    if (!hConKey || RegQueryValueEx(hConKey, wszScreenColors, 0, &type, (char*)&val, &count)) 
+    if (!hConKey || RegQueryValueEx(hConKey, wszScreenColors, 0, &type, (char*)&val, &count))
         val = 0x000F;
     cfg->def_attr = val;
 
     count = sizeof(val);
-    if (!hConKey || RegQueryValueEx(hConKey, wszWindowSize, 0, &type, (char*)&val, &count)) 
+    if (!hConKey || RegQueryValueEx(hConKey, wszWindowSize, 0, &type, (char*)&val, &count))
         val = 0x00190050;
     cfg->win_height = HIWORD(val);
     cfg->win_width  = LOWORD(val);
@@ -133,12 +133,12 @@
     HKEY        hConKey;
     DWORD       val;
 
-    if (RegCreateKey(HKEY_CURRENT_USER, wszConsole, &hConKey)) 
+    if (RegCreateKey(HKEY_CURRENT_USER, wszConsole, &hConKey))
     {
         WINE_ERR("Can't open registry for saving\n");
         return FALSE;
     }
-   
+
     val = cfg->cursor_size;
     RegSetValueEx(hConKey, wszCursorSize, 0, REG_DWORD, (char*)&val, sizeof(val));
 
diff --git a/programs/wineconsole/user.c b/programs/wineconsole/user.c
index 62ae7f1..0e3e9a4 100644
--- a/programs/wineconsole/user.c
+++ b/programs/wineconsole/user.c
@@ -28,7 +28,7 @@
 WINE_DECLARE_DEBUG_CHANNEL(wc_font);
 
 /* mapping console colors to RGB values */
-COLORREF	WCUSER_ColorMap[16] = 
+COLORREF	WCUSER_ColorMap[16] =
 {
     RGB(0x00, 0x00, 0x00), RGB(0x00, 0x00, 0x80), RGB(0x00, 0x80, 0x00), RGB(0x00, 0x80, 0x80),
     RGB(0x80, 0x00, 0x00), RGB(0x80, 0x00, 0x80), RGB(0x80, 0x80, 0x00), RGB(0x80, 0x80, 0x80),
@@ -49,7 +49,7 @@
     WORD		attr;
     WCHAR*		line;
 
-    /* no font has been set up yet, don't worry about filling the bitmap, 
+    /* no font has been set up yet, don't worry about filling the bitmap,
      * we'll do it once a font is chosen
      */
     if (!PRIVATE(data)->hFont) return;
@@ -70,7 +70,7 @@
 	    {
 		line[k - i] = cell[k].Char.UnicodeChar;
 	    }
-	    TextOut(PRIVATE(data)->hMemDC, i * data->curcfg.cell_width, j * data->curcfg.cell_height, 
+	    TextOut(PRIVATE(data)->hMemDC, i * data->curcfg.cell_width, j * data->curcfg.cell_height,
 		    line, k - i);
 	    i = k - 1;
 	}
@@ -90,11 +90,11 @@
     HDC         hDC;
     HBITMAP	hnew, hold;
 
-    if (!data->curcfg.sb_width || !data->curcfg.sb_height || 
+    if (!data->curcfg.sb_width || !data->curcfg.sb_height ||
         !PRIVATE(data)->hFont || !(hDC = GetDC(PRIVATE(data)->hWnd)))
         return;
-    hnew = CreateCompatibleBitmap(hDC, 
-				  data->curcfg.sb_width  * data->curcfg.cell_width, 
+    hnew = CreateCompatibleBitmap(hDC,
+				  data->curcfg.sb_width  * data->curcfg.cell_width,
 				  data->curcfg.sb_height * data->curcfg.cell_height);
     ReleaseDC(PRIVATE(data)->hWnd, hDC);
     hold = SelectObject(PRIVATE(data)->hMemDC, hnew);
@@ -130,9 +130,9 @@
 {
     if (PRIVATE(data)->hWnd != GetFocus() || !data->curcfg.cursor_visible) return;
 
-    SetCaretPos((data->cursor.X - data->curcfg.win_pos.X) * data->curcfg.cell_width, 
+    SetCaretPos((data->cursor.X - data->curcfg.win_pos.X) * data->curcfg.cell_width,
 		(data->cursor.Y - data->curcfg.win_pos.Y) * data->curcfg.cell_height);
-    ShowCaret(PRIVATE(data)->hWnd); 
+    ShowCaret(PRIVATE(data)->hWnd);
 }
 
 /******************************************************************
@@ -164,7 +164,7 @@
 		    ptr[w16b * j + (i / 8)] |= 0x80 >> (i & 7);
 		}
 	    }
-	    PRIVATE(data)->cursor_bitmap = CreateBitmap(data->curcfg.cell_width, 
+	    PRIVATE(data)->cursor_bitmap = CreateBitmap(data->curcfg.cell_width,
                                                data->curcfg.cell_height, 1, 1, ptr);
 	    HeapFree(GetProcessHeap(), 0, ptr);
 	}
@@ -180,7 +180,7 @@
 	{
 	    if (vis)
 	    {
-		CreateCaret(PRIVATE(data)->hWnd, PRIVATE(data)->cursor_bitmap, 
+		CreateCaret(PRIVATE(data)->hWnd, PRIVATE(data)->cursor_bitmap,
                             data->curcfg.cell_width, data->curcfg.cell_height);
 		WCUSER_PosCursor(data);
 	    }
@@ -219,7 +219,7 @@
     if (data->curcfg.sb_width > data->curcfg.win_width)
     {
 	dy = GetSystemMetrics(SM_CYHSCROLL);
-	SetScrollRange(PRIVATE(data)->hWnd, SB_HORZ, 0, 
+	SetScrollRange(PRIVATE(data)->hWnd, SB_HORZ, 0,
                        data->curcfg.sb_width - data->curcfg.win_width, FALSE);
 	SetScrollPos(PRIVATE(data)->hWnd, SB_HORZ, 0, FALSE); /* FIXME */
 	ShowScrollBar(PRIVATE(data)->hWnd, SB_HORZ, TRUE);
@@ -232,11 +232,11 @@
     if (data->curcfg.sb_height > data->curcfg.win_height)
     {
 	dx = GetSystemMetrics(SM_CXVSCROLL);
-	SetScrollRange(PRIVATE(data)->hWnd, SB_VERT, 0, 
+	SetScrollRange(PRIVATE(data)->hWnd, SB_VERT, 0,
                        data->curcfg.sb_height - data->curcfg.win_height, FALSE);
 	SetScrollPos(PRIVATE(data)->hWnd, SB_VERT, 0, FALSE); /* FIXME */
 	ShowScrollBar(PRIVATE(data)->hWnd, SB_VERT, TRUE);
-    }	
+    }
     else
     {
 	ShowScrollBar(PRIVATE(data)->hWnd, SB_VERT, FALSE);
@@ -255,7 +255,7 @@
  */
 static void	WCUSER_SetTitle(const struct inner_data* data)
 {
-    WCHAR	buffer[256];	
+    WCHAR	buffer[256];
 
     if (WINECON_GetConsoleTitle(data->hConIn, buffer, sizeof(buffer)))
 	SetWindowText(PRIVATE(data)->hWnd, buffer);
@@ -269,13 +269,13 @@
                          "\tlf.lfCharSet=%u lf.lfOutPrecision=%u lf.lfClipPrecision=%u lf.lfQuality=%u\n"
                          "\tlf->lfPitchAndFamily=%u lf.lfFaceName=%s\n",
                          pfx,
-                         (ft & RASTER_FONTTYPE) ? "raster" : "", 
-                         (ft & TRUETYPE_FONTTYPE) ? "truetype" : "", 
-                         ((ft & (RASTER_FONTTYPE|TRUETYPE_FONTTYPE)) == 0) ? "vector" : "", 
-                         (ft & DEVICE_FONTTYPE) ? "|device" : "", 
-                         lf->lfHeight, lf->lfWidth, lf->lfEscapement, lf->lfOrientation, 
+                         (ft & RASTER_FONTTYPE) ? "raster" : "",
+                         (ft & TRUETYPE_FONTTYPE) ? "truetype" : "",
+                         ((ft & (RASTER_FONTTYPE|TRUETYPE_FONTTYPE)) == 0) ? "vector" : "",
+                         (ft & DEVICE_FONTTYPE) ? "|device" : "",
+                         lf->lfHeight, lf->lfWidth, lf->lfEscapement, lf->lfOrientation,
                          lf->lfWeight, lf->lfItalic, lf->lfUnderline, lf->lfStrikeOut, lf->lfCharSet,
-                         lf->lfOutPrecision, lf->lfClipPrecision, lf->lfQuality, lf->lfPitchAndFamily, 
+                         lf->lfOutPrecision, lf->lfClipPrecision, lf->lfQuality, lf->lfPitchAndFamily,
                          wine_dbgstr_w(lf->lfFaceName));
 }
 
@@ -287,13 +287,13 @@
                          "\ttmDigitizedAspectX=%ld tmDigitizedAspectY=%ld\n"
                          "\ttmFirstChar=%d tmLastChar=%d tmDefaultChar=%d tmBreakChar=%d\n"
                          "\ttmItalic=%u tmUnderlined=%u tmStruckOut=%u tmPitchAndFamily=%u tmCharSet=%u\n",
-                         (ft & RASTER_FONTTYPE) ? "raster" : "", 
-                         (ft & TRUETYPE_FONTTYPE) ? "truetype" : "", 
-                         ((ft & (RASTER_FONTTYPE|TRUETYPE_FONTTYPE)) == 0) ? "vector" : "", 
-                         (ft & DEVICE_FONTTYPE) ? "|device" : "", 
-                         tm->tmHeight, tm->tmAscent, tm->tmDescent, tm->tmInternalLeading, tm->tmExternalLeading, tm->tmAveCharWidth, 
-                         tm->tmMaxCharWidth, tm->tmWeight, tm->tmOverhang, tm->tmDigitizedAspectX, tm->tmDigitizedAspectY, 
-                         tm->tmFirstChar, tm->tmLastChar, tm->tmDefaultChar, tm->tmBreakChar, tm->tmItalic, tm->tmUnderlined, tm->tmStruckOut, 
+                         (ft & RASTER_FONTTYPE) ? "raster" : "",
+                         (ft & TRUETYPE_FONTTYPE) ? "truetype" : "",
+                         ((ft & (RASTER_FONTTYPE|TRUETYPE_FONTTYPE)) == 0) ? "vector" : "",
+                         (ft & DEVICE_FONTTYPE) ? "|device" : "",
+                         tm->tmHeight, tm->tmAscent, tm->tmDescent, tm->tmInternalLeading, tm->tmExternalLeading, tm->tmAveCharWidth,
+                         tm->tmMaxCharWidth, tm->tmWeight, tm->tmOverhang, tm->tmDigitizedAspectX, tm->tmDigitizedAspectY,
+                         tm->tmFirstChar, tm->tmLastChar, tm->tmDefaultChar, tm->tmBreakChar, tm->tmItalic, tm->tmUnderlined, tm->tmStruckOut,
                          tm->tmPitchAndFamily, tm->tmCharSet);
 }
 
@@ -310,7 +310,7 @@
         !lstrcmp(lf->lfFaceName, config->face_name);
 }
 
-struct font_chooser 
+struct font_chooser
 {
     struct inner_data*	data;
     int			done;
@@ -339,7 +339,7 @@
  */
 BOOL	WCUSER_ValidateFont(const struct inner_data* data, const LOGFONT* lf)
 {
-    return (lf->lfPitchAndFamily & 3) == FIXED_PITCH && 
+    return (lf->lfPitchAndFamily & 3) == FIXED_PITCH &&
         /* (lf->lfPitchAndFamily & 0xF0) == FF_MODERN && */
         (lf->lfCharSet == DEFAULT_CHARSET || lf->lfCharSet == ANSI_CHARSET);
 }
@@ -350,7 +350,7 @@
  *
  * Helper functions to get a decent font for the renderer
  */
-static int CALLBACK get_first_font_enum_2(const LOGFONT* lf, const TEXTMETRIC* tm, 
+static int CALLBACK get_first_font_enum_2(const LOGFONT* lf, const TEXTMETRIC* tm,
 					  DWORD FontType, LPARAM lParam)
 {
     struct font_chooser*	fc = (struct font_chooser*)lParam;
@@ -361,7 +361,7 @@
         LOGFONT mlf = *lf;
 
         /* Use the default sizes for the font (this is needed, especially for
-         * TrueType fonts, so that we get a decent size, not the max size) 
+         * TrueType fonts, so that we get a decent size, not the max size)
          */
         mlf.lfWidth  = fc->data->curcfg.cell_width;
         mlf.lfHeight = fc->data->curcfg.cell_height;
@@ -369,7 +369,7 @@
         {
             WCUSER_DumpLogFont("InitChoosing: ", &mlf, FontType);
             fc->done = 1;
-            /* since we've modified the current config with new font information, 
+            /* since we've modified the current config with new font information,
              * set this information as the new default.
              */
             fc->data->defcfg.cell_width = fc->data->curcfg.cell_width;
@@ -385,7 +385,7 @@
     return 1;
 }
 
-static int CALLBACK get_first_font_enum(const LOGFONT* lf, const TEXTMETRIC* tm, 
+static int CALLBACK get_first_font_enum(const LOGFONT* lf, const TEXTMETRIC* tm,
 					DWORD FontType, LPARAM lParam)
 {
     struct font_chooser*	fc = (struct font_chooser*)lParam;
@@ -393,7 +393,7 @@
     WCUSER_DumpLogFont("InitFamily: ", lf, FontType);
     if (WCUSER_ValidateFont(fc->data, lf))
     {
-	EnumFontFamilies(PRIVATE(fc->data)->hMemDC, lf->lfFaceName, 
+	EnumFontFamilies(PRIVATE(fc->data)->hMemDC, lf->lfFaceName,
                          get_first_font_enum_2, lParam);
 	return !fc->done; /* we just need the first matching one... */
     }
@@ -426,7 +426,7 @@
      *  - the average width
      *  - the largest width
      *  - the width of all characters in the font
-     * This isn't true in Wine. As a temporary workaound, we get as the width of the 
+     * This isn't true in Wine. As a temporary workaound, we get as the width of the
      * cell, the width of the first character in the font, after checking that all
      * characters in the font have the same width (I hear paranoïa coming)
      * when this gets fixed, the should be using tm.tmAveCharWidth or tm.tmMaxCharWidth
@@ -436,15 +436,15 @@
     for (i = tm.tmFirstChar + 1; i <= tm.tmLastChar; i += sizeof(buf) / sizeof(buf[0]))
     {
         int j, l;
-            
+
         l = min(tm.tmLastChar - i, sizeof(buf) / sizeof(buf[0]) - 1);
         GetCharWidth32(hDC, i, i + l, buf);
-        for (j = 0; j <= l; j++) 
+        for (j = 0; j <= l; j++)
         {
             if (buf[j] != w)
             {
                 WINE_WARN("Non uniform cell width: [%d]=%d [%d]=%d\n"
-                          "This may be caused by old freetype libraries, >= 2.0.8 is recommended\n", 
+                          "This may be caused by old freetype libraries, >= 2.0.8 is recommended\n",
                           i + j, buf[j], tm.tmFirstChar, w);
                 goto err;
             }
@@ -486,7 +486,7 @@
     lf->lfStrikeOut     = FALSE;
     lf->lfCharSet       = DEFAULT_CHARSET;
     lf->lfOutPrecision  = OUT_DEFAULT_PRECIS;
-    lf->lfClipPrecision = CLIP_DEFAULT_PRECIS; 
+    lf->lfClipPrecision = CLIP_DEFAULT_PRECIS;
     lf->lfQuality       = DEFAULT_QUALITY;
     lf->lfPitchAndFamily = FIXED_PITCH | FF_DONTCARE;
     lstrcpy(lf->lfFaceName, name);
@@ -501,7 +501,7 @@
 {
     HFONT       hFont;
 
-    if (PRIVATE(data)->hFont != 0 && WCUSER_AreFontsEqual(&data->curcfg, logfont)) 
+    if (PRIVATE(data)->hFont != 0 && WCUSER_AreFontsEqual(&data->curcfg, logfont))
         return TRUE;
 
     hFont = WCUSER_CopyFont(&data->curcfg, PRIVATE(data)->hWnd, logfont);
@@ -535,11 +535,11 @@
     {
         LOGFONT             lf;
 
-        WCUSER_FillLogFont(&lf, data->curcfg.face_name, 
+        WCUSER_FillLogFont(&lf, data->curcfg.face_name,
                            data->curcfg.cell_height, data->curcfg.font_weight);
         if (PRIVATE(data)->hFont != 0) WINE_FIXME("Oh strange\n");
 
-        if (WCUSER_SetFont(data, &lf)) 
+        if (WCUSER_SetFont(data, &lf))
         {
             WCUSER_DumpLogFont("InitReuses: ", &lf, 0);
             return TRUE;
@@ -668,7 +668,7 @@
 
 	c.X = data->curcfg.win_pos.X + min(PRIVATE(data)->selectPt1.X, PRIVATE(data)->selectPt2.X);
 	c.Y = data->curcfg.win_pos.Y + min(PRIVATE(data)->selectPt1.Y, PRIVATE(data)->selectPt2.Y);
-	
+
 	for (y = 0; y < h; y++, c.Y++)
 	{
 	    ReadConsoleOutputCharacter(data->hConOut, &p[y * w], w - 1, c, NULL);
@@ -712,10 +712,10 @@
 	    ir[0].Event.KeyEvent.wVirtualKeyCode = LOBYTE(sh);
 	    ir[0].Event.KeyEvent.wVirtualScanCode = MapVirtualKey(LOBYTE(sh), 0);
 	    ir[0].Event.KeyEvent.uChar.UnicodeChar = ptr[i];
-	    
+
 	    ir[1] = ir[0];
 	    ir[1].Event.KeyEvent.bKeyDown = FALSE;
-	    
+
 	    WriteConsoleInput(data->hConIn, ir, 2, &n);
 	}
 	GlobalUnlock(h);
@@ -754,11 +754,11 @@
     PAINTSTRUCT		ps;
 
     BeginPaint(PRIVATE(data)->hWnd, &ps);
-    BitBlt(ps.hdc, 0, 0, 
-           data->curcfg.win_width * data->curcfg.cell_width, 
+    BitBlt(ps.hdc, 0, 0,
+           data->curcfg.win_width * data->curcfg.cell_width,
            data->curcfg.win_height * data->curcfg.cell_height,
-	   PRIVATE(data)->hMemDC, 
-           data->curcfg.win_pos.X * data->curcfg.cell_width, 
+	   PRIVATE(data)->hMemDC,
+           data->curcfg.win_pos.X * data->curcfg.cell_width,
            data->curcfg.win_pos.Y * data->curcfg.cell_height,
 	   SRCCOPY);
     if (PRIVATE(data)->has_selection)
@@ -867,10 +867,10 @@
 {
     if (!hMenu) {WINE_ERR("Issue in getting menu bits\n");return;}
 
-    EnableMenuItem(hMenu, IDS_COPY, 
+    EnableMenuItem(hMenu, IDS_COPY,
                    MF_BYCOMMAND|(PRIVATE(data)->has_selection ? MF_ENABLED : MF_GRAYED));
-    EnableMenuItem(hMenu, IDS_PASTE, 
-		   MF_BYCOMMAND|(IsClipboardFormatAvailable(CF_UNICODETEXT) 
+    EnableMenuItem(hMenu, IDS_PASTE,
+		   MF_BYCOMMAND|(IsClipboardFormatAvailable(CF_UNICODETEXT)
 				 ? MF_ENABLED : MF_GRAYED));
     EnableMenuItem(hMenu, IDS_SCROLL, MF_BYCOMMAND|MF_GRAYED);
     EnableMenuItem(hMenu, IDS_SEARCH, MF_BYCOMMAND|MF_GRAYED);
@@ -892,10 +892,10 @@
     if (keyState[VK_RCONTROL] & 0x80)	ret |= RIGHT_CTRL_PRESSED;
     if (keyState[VK_LMENU]    & 0x80)	ret |= LEFT_ALT_PRESSED;
     if (keyState[VK_RMENU]    & 0x80)	ret |= RIGHT_ALT_PRESSED;
-    if (keyState[VK_CAPITAL]  & 0x01)	ret |= CAPSLOCK_ON;	    
+    if (keyState[VK_CAPITAL]  & 0x01)	ret |= CAPSLOCK_ON;
     if (keyState[VK_NUMLOCK]  & 0x01)	ret |= NUMLOCK_ON;
     if (keyState[VK_SCROLL]   & 0x01)	ret |= SCROLLLOCK_ON;
-    
+
     return ret;
 }
 
@@ -904,7 +904,7 @@
  *
  * Handles keys while selecting an area
  */
-static void WCUSER_HandleSelectionKey(struct inner_data* data, BOOL down, 
+static void WCUSER_HandleSelectionKey(struct inner_data* data, BOOL down,
                                       WPARAM wParam, LPARAM lParam)
 {
     BYTE	keyState[256];
@@ -1010,7 +1010,7 @@
  *
  * generates input_record from windows WM_KEYUP/WM_KEYDOWN messages
  */
-static void    WCUSER_GenerateKeyInputRecord(struct inner_data* data, BOOL down, 
+static void    WCUSER_GenerateKeyInputRecord(struct inner_data* data, BOOL down,
                                              WPARAM wParam, LPARAM lParam, BOOL sys)
 {
     INPUT_RECORD	ir;
@@ -1023,9 +1023,9 @@
     ir.Event.KeyEvent.bKeyDown = down;
     ir.Event.KeyEvent.wRepeatCount = LOWORD(lParam);
     ir.Event.KeyEvent.wVirtualKeyCode = wParam;
-    
+
     ir.Event.KeyEvent.wVirtualScanCode = HIWORD(lParam) & 0xFF;
-    
+
     ir.Event.KeyEvent.uChar.UnicodeChar = 0;
     ir.Event.KeyEvent.dwControlKeyState = WCUSER_GetCtrlKeyState(keyState);
     if (lParam & (1L << 24))		ir.Event.KeyEvent.dwControlKeyState |= ENHANCED_KEY;
@@ -1040,7 +1040,7 @@
 	    case 2:
 		/* FIXME... should generate two events... */
 		/* fall thru */
-	    case 1:	
+	    case 1:
 		last = buf[0];
 		break;
 	    default:
@@ -1060,7 +1060,7 @@
  *
  *
  */
-static void    WCUSER_GenerateMouseInputRecord(struct inner_data* data, COORD c, 
+static void    WCUSER_GenerateMouseInputRecord(struct inner_data* data, COORD c,
                                                WPARAM wParam, DWORD event)
 {
     INPUT_RECORD	ir;
@@ -1130,7 +1130,7 @@
                 PRIVATE(data)->has_selection = TRUE;
             }
         }
-        else 
+        else
         {
             WCUSER_GenerateMouseInputRecord(data, WCUSER_GetCell(data, lParam), wParam, 0);
         }
@@ -1152,7 +1152,7 @@
     case WM_LBUTTONUP:
         if (data->curcfg.quick_edit)
         {
-            if (GetCapture() == PRIVATE(data)->hWnd && PRIVATE(data)->has_selection && 
+            if (GetCapture() == PRIVATE(data)->hWnd && PRIVATE(data)->has_selection &&
                 (wParam& MK_LBUTTON))
             {
                 WCUSER_MoveSelection(data, PRIVATE(data)->selectPt1, WCUSER_GetCell(data, lParam), TRUE);
@@ -1170,91 +1170,91 @@
 
             GetWindowRect(hWnd, &r);
             WCUSER_SetMenuDetails(data, PRIVATE(data)->hPopMenu);
-            TrackPopupMenu(PRIVATE(data)->hPopMenu, TPM_LEFTALIGN|TPM_TOPALIGN, 
+            TrackPopupMenu(PRIVATE(data)->hPopMenu, TPM_LEFTALIGN|TPM_TOPALIGN,
                            r.left + LOWORD(lParam), r.top + HIWORD(lParam), 0, hWnd, NULL);
         }
         else
         {
             WCUSER_GenerateMouseInputRecord(data, WCUSER_GetCell(data, lParam), wParam, 0);
         }
-	break;    
+	break;
     case WM_RBUTTONUP:
         /* no need to track for rbutton up when opening the popup... the event will be
          * swallowed by TrackPopupMenu */
         WCUSER_GenerateMouseInputRecord(data, WCUSER_GetCell(data, lParam), wParam, 0);
-	break;    
+	break;
     case WM_MOUSEWHEEL:
         /* FIXME: should we scroll too ? */
         WCUSER_GenerateMouseInputRecord(data, WCUSER_GetCell(data, lParam), wParam, MOUSE_WHEELED);
-	break;    
+	break;
     case WM_SETFOCUS:
 	if (data->curcfg.cursor_visible)
 	{
-	    CreateCaret(PRIVATE(data)->hWnd, PRIVATE(data)->cursor_bitmap, 
-                        data->curcfg.cell_width, data->curcfg.cell_height); 
+	    CreateCaret(PRIVATE(data)->hWnd, PRIVATE(data)->cursor_bitmap,
+                        data->curcfg.cell_width, data->curcfg.cell_height);
 	    WCUSER_PosCursor(data);
 	}
-        break; 
-    case WM_KILLFOCUS: 
+        break;
+    case WM_KILLFOCUS:
 	if (data->curcfg.cursor_visible)
-	    DestroyCaret(); 
+	    DestroyCaret();
 	break;
-    case WM_HSCROLL: 
+    case WM_HSCROLL:
         {
             int	pos = data->curcfg.win_pos.X;
 
-            switch (LOWORD(wParam)) 
-            { 
-            case SB_PAGEUP: 	pos -= 8; 		break; 
-            case SB_PAGEDOWN: 	pos += 8; 		break; 
+            switch (LOWORD(wParam))
+            {
+            case SB_PAGEUP: 	pos -= 8; 		break;
+            case SB_PAGEDOWN: 	pos += 8; 		break;
             case SB_LINEUP: 	pos--;			break;
             case SB_LINEDOWN: 	pos++;	 		break;
             case SB_THUMBTRACK: pos = HIWORD(wParam);	break;
             default: 					break;
-            } 
+            }
             if (pos < 0) pos = 0;
-            if (pos > data->curcfg.sb_width - data->curcfg.win_width) 
+            if (pos > data->curcfg.sb_width - data->curcfg.win_width)
                 pos = data->curcfg.sb_width - data->curcfg.win_width;
             if (pos != data->curcfg.win_pos.X)
             {
-                ScrollWindow(hWnd, (data->curcfg.win_pos.X - pos) * data->curcfg.cell_width, 0, 
+                ScrollWindow(hWnd, (data->curcfg.win_pos.X - pos) * data->curcfg.cell_width, 0,
                              NULL, NULL);
                 data->curcfg.win_pos.X = pos;
-                SetScrollPos(hWnd, SB_HORZ, pos, TRUE); 
-                UpdateWindow(hWnd); 
+                SetScrollPos(hWnd, SB_HORZ, pos, TRUE);
+                UpdateWindow(hWnd);
                 WCUSER_PosCursor(data);
                 WINECON_NotifyWindowChange(data);
             }
         }
 	break;
-    case WM_VSCROLL: 
+    case WM_VSCROLL:
         {
 	    int	pos = data->curcfg.win_pos.Y;
 
-	    switch (LOWORD(wParam)) 
-	    { 
-            case SB_PAGEUP: 	pos -= 8; 		break; 
-            case SB_PAGEDOWN: 	pos += 8; 		break; 
+	    switch (LOWORD(wParam))
+	    {
+            case SB_PAGEUP: 	pos -= 8; 		break;
+            case SB_PAGEDOWN: 	pos += 8; 		break;
             case SB_LINEUP: 	pos--;			break;
 	    case SB_LINEDOWN: 	pos++;	 		break;
             case SB_THUMBTRACK: pos = HIWORD(wParam);	break;
             default: 					break;
-	    } 
+	    }
 	    if (pos < 0) pos = 0;
-	    if (pos > data->curcfg.sb_height - data->curcfg.win_height) 
+	    if (pos > data->curcfg.sb_height - data->curcfg.win_height)
                 pos = data->curcfg.sb_height - data->curcfg.win_height;
 	    if (pos != data->curcfg.win_pos.Y)
 	    {
-		ScrollWindow(hWnd, 0, (data->curcfg.win_pos.Y - pos) * data->curcfg.cell_height, 
+		ScrollWindow(hWnd, 0, (data->curcfg.win_pos.Y - pos) * data->curcfg.cell_height,
                              NULL, NULL);
 		data->curcfg.win_pos.Y = pos;
-		SetScrollPos(hWnd, SB_VERT, pos, TRUE); 
-		UpdateWindow(hWnd); 
+		SetScrollPos(hWnd, SB_VERT, pos, TRUE);
+		UpdateWindow(hWnd);
 		WCUSER_PosCursor(data);
 		WINECON_NotifyWindowChange(data);
 	    }
 
-        } 
+        }
     case WM_SYSCOMMAND:
 	switch (wParam)
 	{
@@ -1264,7 +1264,7 @@
 	case IDS_PROPERTY:
 	    WCUSER_GetProperties(data, TRUE);
 	    break;
-	default: 
+	default:
 	    return DefWindowProc(hWnd, uMsg, wParam, lParam);
 	}
 	break;
@@ -1305,7 +1305,7 @@
 	case IDS_SEARCH:
 	    WINE_FIXME("Unhandled yet command: %x\n", wParam);
 	    break;
-	default: 
+	default:
 	    return DefWindowProc(hWnd, uMsg, wParam, lParam);
 	}
 	break;
@@ -1344,7 +1344,7 @@
 {
     MSG		msg;
 
-    for (;;) 
+    for (;;)
     {
 	switch (MsgWaitForMultipleObjects(1, &data->hSynchro, FALSE, INFINITE, QS_ALLINPUT))
 	{
@@ -1369,7 +1369,7 @@
 	    /* err */
 	    break;
 	}
-    }	
+    }
 }
 
 /******************************************************************
@@ -1407,12 +1407,12 @@
     wndclass.hbrBackground = GetStockObject(BLACK_BRUSH);
     wndclass.lpszMenuName  = NULL;
     wndclass.lpszClassName = wClassName;
-  
+
     RegisterClass(&wndclass);
 
     CreateWindow(wndclass.lpszClassName, NULL,
-		 WS_OVERLAPPED|WS_CAPTION|WS_SYSMENU|WS_THICKFRAME|WS_MINIMIZEBOX|WS_HSCROLL|WS_VSCROLL, 
-		 CW_USEDEFAULT, CW_USEDEFAULT, 0, 0, 0, 0, wndclass.hInstance, data);   
+		 WS_OVERLAPPED|WS_CAPTION|WS_SYSMENU|WS_THICKFRAME|WS_MINIMIZEBOX|WS_HSCROLL|WS_VSCROLL,
+		 CW_USEDEFAULT, CW_USEDEFAULT, 0, 0, 0, 0, wndclass.hInstance, data);
     if (!PRIVATE(data)->hWnd) return FALSE;
 
     /* force update of current data */
diff --git a/programs/wineconsole/winecon_private.h b/programs/wineconsole/winecon_private.h
index 9f6e95a..bb8fd2a 100644
--- a/programs/wineconsole/winecon_private.h
+++ b/programs/wineconsole/winecon_private.h
@@ -25,7 +25,7 @@
 
 /* this is the configuration stored & loaded into the registry */
 struct config_data {
-    unsigned	cell_width;	/* width in pixels of a character */	
+    unsigned	cell_width;	/* width in pixels of a character */
     unsigned	cell_height;	/* height in pixels of a character */
     int		cursor_size;	/* in % of cell height */
     int		cursor_visible;
diff --git a/programs/wineconsole/winecon_user.h b/programs/wineconsole/winecon_user.h
index 7810f81..d62e662 100644
--- a/programs/wineconsole/winecon_user.h
+++ b/programs/wineconsole/winecon_user.h
@@ -45,12 +45,12 @@
 extern BOOL WCUSER_GetProperties(struct inner_data*, BOOL);
 extern BOOL WCUSER_SetFont(struct inner_data* data, const LOGFONT* font);
 extern BOOL WCUSER_ValidateFont(const struct inner_data* data, const LOGFONT* lf);
-extern BOOL WCUSER_ValidateFontMetric(const struct inner_data* data, 
+extern BOOL WCUSER_ValidateFontMetric(const struct inner_data* data,
                                       const TEXTMETRIC* tm, DWORD fontType);
-extern BOOL WCUSER_AreFontsEqual(const struct config_data* config, 
+extern BOOL WCUSER_AreFontsEqual(const struct config_data* config,
                                  const LOGFONT* lf);
 extern HFONT WCUSER_CopyFont(struct config_data* config, HWND hWnd, const LOGFONT* lf);
-extern void WCUSER_FillLogFont(LOGFONT* lf, const WCHAR* name, 
+extern void WCUSER_FillLogFont(LOGFONT* lf, const WCHAR* name,
                                UINT height, UINT weight);
 
 extern void WCUSER_DumpLogFont(const char* pfx, const LOGFONT* lf, DWORD ft);
diff --git a/programs/wineconsole/wineconsole.c b/programs/wineconsole/wineconsole.c
index 7f2a87d..aec56d9 100644
--- a/programs/wineconsole/wineconsole.c
+++ b/programs/wineconsole/wineconsole.c
@@ -194,7 +194,7 @@
     }
     SERVER_END_REQ;
     if (!num) {WINE_WARN("hmm renderer signaled but no events available\n"); return 1;}
-    
+
     /* FIXME: should do some event compression here (cursor pos, update) */
     /* step 1: keep only last cursor pos event */
     for (i = num - 1; i >= 0; i--)
@@ -232,7 +232,7 @@
             }
         }
     }
-   
+
     WINE_TRACE("Events:");
     for (i = 0; i < num; i++)
     {
@@ -251,7 +251,7 @@
 		h = wine_server_call_err( req ) ? 0 : (HANDLE)reply->handle;
 	    }
 	    SERVER_END_REQ;
-	    if (WINE_TRACE_ON(wineconsole)) 
+	    if (WINE_TRACE_ON(wineconsole))
                 WINE_DPRINTF(" active(%d)", (int)h);
 	    if (h)
 	    {
@@ -260,14 +260,14 @@
 	    }
 	    break;
 	case CONSOLE_RENDERER_SB_RESIZE_EVENT:
-	    if (data->curcfg.sb_width != evts[i].u.resize.width || 
+	    if (data->curcfg.sb_width != evts[i].u.resize.width ||
 		data->curcfg.sb_height != evts[i].u.resize.height)
 	    {
-		if (WINE_TRACE_ON(wineconsole)) 
+		if (WINE_TRACE_ON(wineconsole))
                     WINE_DPRINTF(" resize(%d,%d)", evts[i].u.resize.width, evts[i].u.resize.height);
 		data->curcfg.sb_width  = evts[i].u.resize.width;
 		data->curcfg.sb_height = evts[i].u.resize.height;
-		
+
 		data->cells = HeapReAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, data->cells,
 					  data->curcfg.sb_width * data->curcfg.sb_height * sizeof(CHAR_INFO));
 		if (!data->cells) {WINE_ERR("OOM\n"); exit(0);}
@@ -276,28 +276,28 @@
 	    }
 	    break;
 	case CONSOLE_RENDERER_UPDATE_EVENT:
-	    if (WINE_TRACE_ON(wineconsole)) 
+	    if (WINE_TRACE_ON(wineconsole))
                 WINE_DPRINTF(" update(%d,%d)", evts[i].u.update.top, evts[i].u.update.bottom);
 	    WINECON_FetchCells(data, evts[i].u.update.top, evts[i].u.update.bottom);
 	    break;
 	case CONSOLE_RENDERER_CURSOR_POS_EVENT:
 	    if (evts[i].u.cursor_pos.x != data->cursor.X || evts[i].u.cursor_pos.y != data->cursor.Y)
-	    {	
+	    {
 		data->cursor.X = evts[i].u.cursor_pos.x;
 		data->cursor.Y = evts[i].u.cursor_pos.y;
 		data->fnPosCursor(data);
-		if (WINE_TRACE_ON(wineconsole)) 
+		if (WINE_TRACE_ON(wineconsole))
                     WINE_DPRINTF(" curs-pos(%d,%d)",evts[i].u.cursor_pos.x, evts[i].u.cursor_pos.y);
 	    }
 	    break;
 	case CONSOLE_RENDERER_CURSOR_GEOM_EVENT:
-	    if (evts[i].u.cursor_geom.size != data->curcfg.cursor_size || 
+	    if (evts[i].u.cursor_geom.size != data->curcfg.cursor_size ||
 		evts[i].u.cursor_geom.visible != data->curcfg.cursor_visible)
 	    {
-		data->fnShapeCursor(data, evts[i].u.cursor_geom.size, 
+		data->fnShapeCursor(data, evts[i].u.cursor_geom.size,
 				    evts[i].u.cursor_geom.visible, FALSE);
-		if (WINE_TRACE_ON(wineconsole)) 
-                    WINE_DPRINTF(" curs-geom(%d,%d)", 
+		if (WINE_TRACE_ON(wineconsole))
+                    WINE_DPRINTF(" curs-geom(%d,%d)",
                                  evts[i].u.cursor_geom.size, evts[i].u.cursor_geom.visible);
 	    }
 	    break;
@@ -306,20 +306,20 @@
 	    {
 		data->fnScroll(data, evts[i].u.display.left, TRUE);
 		data->fnPosCursor(data);
-		if (WINE_TRACE_ON(wineconsole)) 
+		if (WINE_TRACE_ON(wineconsole))
                     WINE_DPRINTF(" h-scroll(%d)", evts[i].u.display.left);
 	    }
 	    if (evts[i].u.display.top != data->curcfg.win_pos.Y)
 	    {
 		data->fnScroll(data, evts[i].u.display.top, FALSE);
 		data->fnPosCursor(data);
-		if (WINE_TRACE_ON(wineconsole)) 
+		if (WINE_TRACE_ON(wineconsole))
                     WINE_DPRINTF(" v-scroll(%d)", evts[i].u.display.top);
 	    }
-	    if (evts[i].u.display.width != data->curcfg.win_width || 
+	    if (evts[i].u.display.width != data->curcfg.win_width ||
 		evts[i].u.display.height != data->curcfg.win_height)
 	    {
-		if (WINE_TRACE_ON(wineconsole)) 
+		if (WINE_TRACE_ON(wineconsole))
                     WINE_DPRINTF(" win-size(%d,%d)", evts[i].u.display.width, evts[i].u.display.height);
 		data->curcfg.win_width = evts[i].u.display.width;
 		data->curcfg.win_height = evts[i].u.display.height;
@@ -439,9 +439,9 @@
      */
     if (!DuplicateHandle(GetCurrentProcess(), data->hConIn,  GetCurrentProcess(),
 			 &startup.hStdInput, GENERIC_READ|GENERIC_WRITE|SYNCHRONIZE, TRUE, 0) ||
-	!DuplicateHandle(GetCurrentProcess(), data->hConOut, GetCurrentProcess(), 
+	!DuplicateHandle(GetCurrentProcess(), data->hConOut, GetCurrentProcess(),
 			 &startup.hStdOutput, GENERIC_READ|GENERIC_WRITE, TRUE, 0) ||
-	!DuplicateHandle(GetCurrentProcess(), data->hConOut, GetCurrentProcess(), 
+	!DuplicateHandle(GetCurrentProcess(), data->hConOut, GetCurrentProcess(),
 			     &startup.hStdError, GENERIC_READ|GENERIC_WRITE, TRUE, 0))
     {
 	WINE_ERR("Can't dup handles\n");
@@ -457,7 +457,7 @@
     while (*ptr && *ptr++ != ' ');
 
     done = *ptr && CreateProcess(NULL, ptr, NULL, NULL, TRUE, 0L, NULL, NULL, &startup, &info);
-    
+
     /* we no longer need the handles passed to the child for the console */
     CloseHandle(startup.hStdInput);
     CloseHandle(startup.hStdOutput);
diff --git a/programs/winemine/dialog.c b/programs/winemine/dialog.c
index 5525efb..b7acda3 100644
--- a/programs/winemine/dialog.c
+++ b/programs/winemine/dialog.c
@@ -1,6 +1,6 @@
 /*
  * WineMine (dialog.c)
- * 
+ *
  * Copyright 2000 Joshua Thielen <jt85296@ltu.edu>
  *
  * This library is free software; you can redistribute it and/or
@@ -35,7 +35,7 @@
         SetDlgItemInt( hDlg, IDC_EDITCOLS, p_board->cols, FALSE );
         SetDlgItemInt( hDlg, IDC_EDITMINES, p_board->mines, FALSE );
         return TRUE;
-    
+
     case WM_COMMAND:
         switch( LOWORD( wParam ) ) {
         case IDOK:
@@ -45,13 +45,13 @@
             CheckLevel( p_board );
             EndDialog( hDlg, 0 );
             return TRUE;
-        
+
         case IDCANCEL:
             EndDialog( hDlg, 0 );
             return TRUE;
         }
         break;
-    }     
+    }
     return FALSE;
 }
 
@@ -65,22 +65,22 @@
         SetDlgItemText( hDlg, IDC_EDITNAME,
                 p_board->best_name[p_board->difficulty] );
         return TRUE;
-    
+
     case WM_COMMAND:
         switch( LOWORD( wParam ) ) {
         case IDOK:
-            GetDlgItemText( hDlg, IDC_EDITNAME, 
+            GetDlgItemText( hDlg, IDC_EDITNAME,
                 p_board->best_name[p_board->difficulty],
                 sizeof( p_board->best_name[p_board->difficulty] ) );
             EndDialog( hDlg, 0 );
             return TRUE;
-    
+
         case IDCANCEL:
             EndDialog( hDlg, 0 );
             return TRUE;
         }
         break;
-    }     
+    }
     return FALSE;
 }
 
@@ -96,12 +96,12 @@
         /* set best names */
         for( i = 0; i < 3; i++ )
             SetDlgItemText( hDlg, (IDC_NAME1) + i, p_board->best_name[i] );
-    
+
     	/* set best times */
         for( i = 0; i < 3; i++ )
             SetDlgItemInt( hDlg, (IDC_TIME1) + i, p_board->best_time[i], FALSE );
         return TRUE;
-    
+
     case WM_COMMAND:
         switch( LOWORD( wParam ) ) {
         case IDOK:
@@ -109,7 +109,7 @@
             return TRUE;
         }
         break;
-    }     
+    }
     return FALSE;
 }
 
@@ -118,7 +118,7 @@
     switch( uMsg ) {
     case WM_INITDIALOG:
         return TRUE;
-    
+
     case WM_COMMAND:
         switch( LOWORD( wParam ) ) {
         case IDOK:
diff --git a/programs/winemine/dialog.h b/programs/winemine/dialog.h
index e40bf64..b4e0fc4 100644
--- a/programs/winemine/dialog.h
+++ b/programs/winemine/dialog.h
@@ -1,6 +1,6 @@
 /*
  * WineMine (dialog.h)
- * 
+ *
  * Copyright 2000 Joshua Thielen <jt85296@ltu.edu>
  *
  * This library is free software; you can redistribute it and/or
diff --git a/programs/winemine/main.c b/programs/winemine/main.c
index 62c253a..38f26a6 100644
--- a/programs/winemine/main.c
+++ b/programs/winemine/main.c
@@ -1,6 +1,6 @@
 /*
  * WineMine (main.c)
- * 
+ *
  * Copyright 2000 Joshua Thielen <jt85296@ltu.edu>
  *
  * This library is free software; you can redistribute it and/or
@@ -37,15 +37,15 @@
 #include <stdio.h>
 #define DEBUG(x) fprintf(stderr,x)
 #else
-#define DEBUG(x) 
+#define DEBUG(x)
 #endif
 
 int WINAPI WinMain( HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR cmdline, int cmdshow )
-{ 
+{
     MSG msg;
     WNDCLASS wc;
     HWND hWnd;
-    HACCEL haccel;        
+    HACCEL haccel;
     char appname[9];
 
     LoadString( hInst, IDS_APPNAME, appname, sizeof(appname));
@@ -60,15 +60,15 @@
     wc.hbrBackground = (HBRUSH) GetStockObject( BLACK_BRUSH );
     wc.lpszMenuName = "MENU_WINEMINE";
     wc.lpszClassName = appname;
-    
+
     if (!RegisterClass(&wc)) exit(1);
-    hWnd = CreateWindow( appname, appname, 
-        WS_OVERLAPPEDWINDOW & ~WS_THICKFRAME & ~WS_MAXIMIZEBOX, 
-        CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, 
+    hWnd = CreateWindow( appname, appname,
+        WS_OVERLAPPEDWINDOW & ~WS_THICKFRAME & ~WS_MAXIMIZEBOX,
+        CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT,
         NULL_HANDLE, NULL_HANDLE, hInst, NULL );
-    
+
     if (!hWnd) exit(1);
-    
+
     ShowWindow( hWnd, cmdshow );
     UpdateWindow( hWnd );
 
@@ -78,7 +78,7 @@
     while( GetMessage(&msg, NULL_HANDLE, 0, 0) ) {
         if (!TranslateAccelerator( hWnd, haccel, &msg ))
             TranslateMessage( &msg );
-        
+
         DispatchMessage( &msg );
     }
     return msg.wParam;
@@ -88,11 +88,11 @@
 {
     HDC hdc;
     PAINTSTRUCT ps;
-    HMENU hMenu;        
-    static BOARD board;     
+    HMENU hMenu;
+    static BOARD board;
 
     switch( msg ) {
-    case WM_CREATE:         
+    case WM_CREATE:
         board.hInst = ((LPCREATESTRUCT) lParam)->hInstance;
         board.hWnd = hWnd;
         InitBoard( &board );
@@ -118,27 +118,27 @@
     case WM_MOVE:
         DEBUG("WM_MOVE\n");
         board.pos.x = (unsigned) LOWORD(lParam);
-        board.pos.y = (unsigned) HIWORD(lParam);    
+        board.pos.y = (unsigned) HIWORD(lParam);
         return 0;
 
     case WM_DESTROY:
         SaveBoard( &board );
-        DestroyBoard( &board ); 
+        DestroyBoard( &board );
         PostQuitMessage( 0 );
         return 0;
-    
+
     case WM_TIMER:
         if( board.status == PLAYING ) {
             board.time++;
-                  RedrawWindow( hWnd, &board.timer_rect, NULL_HANDLE, 
-                    RDW_INVALIDATE | RDW_UPDATENOW );      
+                  RedrawWindow( hWnd, &board.timer_rect, NULL_HANDLE,
+                    RDW_INVALIDATE | RDW_UPDATENOW );
         }
         return 0;
 
     case WM_LBUTTONDOWN:
         DEBUG("WM_LBUTTONDOWN\n");
         if( wParam & MK_RBUTTON )
-            msg = WM_MBUTTONDOWN;        
+            msg = WM_MBUTTONDOWN;
         TestBoard( hWnd, &board, LOWORD(lParam), HIWORD(lParam), msg );
         SetCapture( hWnd );
         return 0;
@@ -146,25 +146,25 @@
     case WM_LBUTTONUP:
         DEBUG("WM_LBUTTONUP\n");
         if( wParam & MK_RBUTTON )
-            msg = WM_MBUTTONUP;    
+            msg = WM_MBUTTONUP;
         TestBoard( hWnd, &board, LOWORD(lParam), HIWORD(lParam), msg );
         ReleaseCapture();
         return 0;
 
     case WM_RBUTTONDOWN:
         DEBUG("WM_RBUTTONDOWN\n");
-        if( wParam & MK_LBUTTON ) {    
+        if( wParam & MK_LBUTTON ) {
             board.press.x = 0;
-            board.press.y = 0;    
+            board.press.y = 0;
             msg = WM_MBUTTONDOWN;
-        }    
+        }
         TestBoard( hWnd, &board, LOWORD(lParam), HIWORD(lParam), msg );
         return 0;
 
     case WM_RBUTTONUP:
         DEBUG("WM_RBUTTONUP\n");
-        if( wParam & MK_LBUTTON ) 
-            msg = WM_MBUTTONUP;    
+        if( wParam & MK_LBUTTON )
+            msg = WM_MBUTTONUP;
         TestBoard( hWnd, &board, LOWORD(lParam), HIWORD(lParam), msg );
         return 0;
 
@@ -192,8 +192,8 @@
 
         TestBoard( hWnd, &board, LOWORD(lParam), HIWORD(lParam),  msg );
 
-        return 0;    
-    } 
+        return 0;
+    }
 
     case WM_COMMAND:
         switch(LOWORD(wParam)) {
@@ -202,26 +202,26 @@
             return 0;
 
         case IDM_MARKQ:
-            hMenu = GetMenu( hWnd );     
+            hMenu = GetMenu( hWnd );
             board.IsMarkQ = !board.IsMarkQ;
             if( board.IsMarkQ )
                 CheckMenuItem( hMenu, IDM_MARKQ, MF_CHECKED );
-            else 
+            else
                 CheckMenuItem( hMenu, IDM_MARKQ, MF_UNCHECKED );
             return 0;
 
         case IDM_BEGINNER:
-            SetDifficulty( &board, BEGINNER );    
+            SetDifficulty( &board, BEGINNER );
             CreateBoard( &board );
             return 0;
 
         case IDM_ADVANCED:
-            SetDifficulty( &board, ADVANCED );    
+            SetDifficulty( &board, ADVANCED );
             CreateBoard( &board );
             return 0;
 
         case IDM_EXPERT:
-            SetDifficulty( &board, EXPERT );    
+            SetDifficulty( &board, EXPERT );
             CreateBoard( &board );
             return 0;
 
@@ -235,7 +235,7 @@
             return 0;
 
         case IDM_TIMES:
-            DialogBoxParam( board.hInst, "DLG_TIMES", hWnd, 
+            DialogBoxParam( board.hInst, "DLG_TIMES", hWnd,
                     TimesDlgProc, (LPARAM) &board);
             return 0;
 
@@ -246,7 +246,7 @@
             DEBUG("Unknown WM_COMMAND command message received\n");
             break;
         }
-    } 
+    }
     return( DefWindowProc( hWnd, msg, wParam, lParam ));
 }
 
@@ -256,16 +256,16 @@
 
     p_board->hMinesBMP = LoadBitmap( p_board->hInst, "mines");
     p_board->hFacesBMP = LoadBitmap( p_board->hInst, "faces");
-    p_board->hLedsBMP = LoadBitmap( p_board->hInst, "leds");     
-    
-    LoadBoard( p_board );    
-    
+    p_board->hLedsBMP = LoadBitmap( p_board->hInst, "leds");
+
+    LoadBoard( p_board );
+
     if( p_board->pos.x < (unsigned) GetSystemMetrics( SM_CXFIXEDFRAME ))
         p_board->pos.x = GetSystemMetrics( SM_CXFIXEDFRAME );
 
-    if( p_board->pos.x > (unsigned) (GetSystemMetrics( SM_CXSCREEN ) 
+    if( p_board->pos.x > (unsigned) (GetSystemMetrics( SM_CXSCREEN )
     - GetSystemMetrics( SM_CXFIXEDFRAME ))) {
-        p_board->pos.x = GetSystemMetrics( SM_CXSCREEN ) 
+        p_board->pos.x = GetSystemMetrics( SM_CXSCREEN )
         - GetSystemMetrics( SM_CXFIXEDFRAME );
     }
 
@@ -277,23 +277,23 @@
         GetSystemMetrics( SM_CYFIXEDFRAME );
     }
 
-    if( p_board->pos.y > (unsigned) (GetSystemMetrics( SM_CYSCREEN ) 
+    if( p_board->pos.y > (unsigned) (GetSystemMetrics( SM_CYSCREEN )
     - GetSystemMetrics( SM_CYFIXEDFRAME ))) {
         p_board->pos.y = GetSystemMetrics( SM_CYSCREEN )
         - GetSystemMetrics( SM_CYFIXEDFRAME );
     }
-    
+
     hMenu = GetMenu( p_board->hWnd );
-    CheckMenuItem( hMenu, IDM_BEGINNER + (unsigned) p_board->difficulty, 
+    CheckMenuItem( hMenu, IDM_BEGINNER + (unsigned) p_board->difficulty,
             MF_CHECKED );
     if( p_board->IsMarkQ )
         CheckMenuItem( hMenu, IDM_MARKQ, MF_CHECKED );
-    else 
+    else
         CheckMenuItem( hMenu, IDM_MARKQ, MF_UNCHECKED );
     CheckLevel( p_board );
 }
 
-void LoadBoard( BOARD *p_board ) 
+void LoadBoard( BOARD *p_board )
 {
     DWORD size;
     DWORD type;
@@ -303,80 +303,80 @@
     unsigned i;
 
 
-    RegOpenKeyEx( HKEY_LOCAL_MACHINE, "Software\\Wine\\WineMine", 
+    RegOpenKeyEx( HKEY_LOCAL_MACHINE, "Software\\Wine\\WineMine",
             0, KEY_QUERY_VALUE, &hkey );
-    
+
     size = sizeof( data );
-    if( RegQueryValueEx( hkey, "Xpos", NULL, (LPDWORD) &type, 
+    if( RegQueryValueEx( hkey, "Xpos", NULL, (LPDWORD) &type,
             (LPBYTE) data, (LPDWORD) &size ) == ERROR_SUCCESS ) {
         p_board->pos.x = atoi( data );
     }
-    else 
+    else
         p_board->pos.x = GetSystemMetrics( SM_CXFIXEDFRAME );
 
     size = sizeof( data );
-    if( RegQueryValueEx( hkey, "Ypos", NULL, (LPDWORD) &type, 
+    if( RegQueryValueEx( hkey, "Ypos", NULL, (LPDWORD) &type,
             (LPBYTE) data, (LPDWORD) &size ) == ERROR_SUCCESS )
         p_board->pos.y = atoi( data );
-    else 
+    else
         p_board->pos.y = GetSystemMetrics( SM_CYMENU )
-        + GetSystemMetrics( SM_CYCAPTION ) 
+        + GetSystemMetrics( SM_CYCAPTION )
         + GetSystemMetrics( SM_CYFIXEDFRAME );
 
     size = sizeof( data );
-    if( RegQueryValueEx( hkey, "Rows", NULL, (LPDWORD) &type, 
+    if( RegQueryValueEx( hkey, "Rows", NULL, (LPDWORD) &type,
             (LPBYTE) data, (LPDWORD) &size ) == ERROR_SUCCESS )
         p_board->rows = atoi( data );
     else
         p_board->rows = BEGINNER_ROWS;
 
     size = sizeof( data );
-    if( RegQueryValueEx( hkey, "Cols", NULL, (LPDWORD) &type, 
+    if( RegQueryValueEx( hkey, "Cols", NULL, (LPDWORD) &type,
             (LPBYTE) data, (LPDWORD) &size ) == ERROR_SUCCESS )
         p_board->cols = atoi( data );
     else
-        p_board->cols = BEGINNER_COLS;    
-    
+        p_board->cols = BEGINNER_COLS;
+
     size = sizeof( data );
-    if( RegQueryValueEx( hkey, "Mines", NULL, (LPDWORD) &type, 
+    if( RegQueryValueEx( hkey, "Mines", NULL, (LPDWORD) &type,
             (LPBYTE) data, (LPDWORD) &size ) == ERROR_SUCCESS )
         p_board->mines = atoi( data );
-    else 
+    else
         p_board->rows = BEGINNER_ROWS;
 
     size = sizeof( data );
-    if( RegQueryValueEx( hkey, "Difficulty", NULL, (LPDWORD) &type, 
+    if( RegQueryValueEx( hkey, "Difficulty", NULL, (LPDWORD) &type,
             (LPBYTE) data, (LPDWORD) &size ) == ERROR_SUCCESS )
         p_board->difficulty = (DIFFICULTY) atoi( data );
-    else 
+    else
         p_board->difficulty = BEGINNER;
 
     size = sizeof( data );
-    if( RegQueryValueEx( hkey, "MarkQ", NULL, (LPDWORD) &type, 
+    if( RegQueryValueEx( hkey, "MarkQ", NULL, (LPDWORD) &type,
             (LPBYTE) data, (LPDWORD) &size ) == ERROR_SUCCESS )
         p_board->IsMarkQ = atoi( data );
-    else 
+    else
         p_board->IsMarkQ = TRUE;
-        
+
     for( i = 0; i < 3; i++ ) {
         wsprintf( key_name, "Name%d", i );
         size = sizeof( data );
-        if( RegQueryValueEx( hkey, key_name, NULL, (LPDWORD) &type, 
-                (LPBYTE) data, 
+        if( RegQueryValueEx( hkey, key_name, NULL, (LPDWORD) &type,
+                (LPBYTE) data,
                 (LPDWORD) &size ) == ERROR_SUCCESS )
                     strncpy( p_board->best_name[i], data, sizeof( data ) );
-        else 
+        else
             wsprintf( p_board->best_name[i], "Nobody");
     }
-    
+
     for( i = 0; i < 3; i++ ) {
         wsprintf( key_name, "Time%d", i );
         size = sizeof( data );
-        if( RegQueryValueEx( hkey, key_name, NULL, (LPDWORD) &type, 
-                (LPBYTE) data, 
+        if( RegQueryValueEx( hkey, key_name, NULL, (LPDWORD) &type,
+                (LPBYTE) data,
                 (LPDWORD) &size ) == ERROR_SUCCESS )
             p_board->best_time[i] = atoi( data );
-        else 
+        else
             p_board->best_time[i] = 999;
     }
     RegCloseKey( hkey );
@@ -390,12 +390,12 @@
     unsigned i;
     char data[16];
     char key_name[8];
-    
-    if( RegCreateKeyEx( HKEY_LOCAL_MACHINE, 
+
+    if( RegCreateKeyEx( HKEY_LOCAL_MACHINE,
                 "Software\\Wine\\WineMine", 0, NULL,
-                REG_OPTION_NON_VOLATILE, KEY_WRITE, &sa, 
+                REG_OPTION_NON_VOLATILE, KEY_WRITE, &sa,
                 &hkey, &disp ) != ERROR_SUCCESS)
-        return;    
+        return;
 
     wsprintf( data, "%d", p_board->pos.x );
     RegSetValueEx( hkey, "Xpos", 0, REG_SZ, (LPBYTE) data, strlen(data)+1 );
@@ -444,17 +444,17 @@
     HMENU hMenu = GetMenu( p_board->hWnd );
 
     CheckMenuItem( hMenu, IDM_BEGINNER + p_board->difficulty, MF_UNCHECKED );
-    p_board->difficulty = difficulty; 
+    p_board->difficulty = difficulty;
     CheckMenuItem( hMenu, IDM_BEGINNER + difficulty, MF_CHECKED );
-    
+
     switch( difficulty ) {
-    case BEGINNER:    
+    case BEGINNER:
         p_board->cols = BEGINNER_COLS;
         p_board->rows = BEGINNER_ROWS;
         p_board->mines = BEGINNER_MINES;
         break;
 
-    case ADVANCED:    
+    case ADVANCED:
         p_board->cols = ADVANCED_COLS;
         p_board->rows = ADVANCED_ROWS;
         p_board->mines = ADVANCED_MINES;
@@ -463,13 +463,13 @@
     case EXPERT:
         p_board->cols = EXPERT_COLS;
         p_board->rows = EXPERT_ROWS;
-        p_board->mines = EXPERT_MINES;        
-        break;    
+        p_board->mines = EXPERT_MINES;
+        break;
 
     case CUSTOM:
-        DialogBoxParam( p_board->hInst, "DLG_CUSTOM", p_board->hWnd, 
+        DialogBoxParam( p_board->hInst, "DLG_CUSTOM", p_board->hWnd,
                 CustomDlgProc, (LPARAM) p_board);
-        break;    
+        break;
     }
 }
 
@@ -480,59 +480,59 @@
     p_board->mb = MB_NONE;
     p_board->boxes_left = p_board->cols * p_board->rows - p_board->mines;
     p_board->num_flags = 0;
-    
+
     CreateBoxes( p_board );
 
     p_board->width = p_board->cols * MINE_WIDTH + BOARD_WMARGIN * 2;
-    
-    p_board->height = p_board->rows * MINE_HEIGHT + LED_HEIGHT 
+
+    p_board->height = p_board->rows * MINE_HEIGHT + LED_HEIGHT
         + BOARD_HMARGIN * 3;
 
     wnd_x = p_board->pos.x - GetSystemMetrics( SM_CXFIXEDFRAME );
-    wnd_y = p_board->pos.y - GetSystemMetrics( SM_CYMENU ) 
-        - GetSystemMetrics( SM_CYCAPTION ) 
+    wnd_y = p_board->pos.y - GetSystemMetrics( SM_CYMENU )
+        - GetSystemMetrics( SM_CYCAPTION )
         - GetSystemMetrics( SM_CYFIXEDFRAME );
-    wnd_width = p_board->width 
+    wnd_width = p_board->width
         + GetSystemMetrics( SM_CXFIXEDFRAME ) * 2;
-    wnd_height = p_board->height 
-        + GetSystemMetrics( SM_CYMENU ) 
-        + GetSystemMetrics( SM_CYCAPTION ) 
+    wnd_height = p_board->height
+        + GetSystemMetrics( SM_CYMENU )
+        + GetSystemMetrics( SM_CYCAPTION )
         + GetSystemMetrics( SM_CYFIXEDFRAME ) * 2;
 
-    /* setting the mines rectangle boundary */    
-    left = BOARD_WMARGIN; 
-    top = BOARD_HMARGIN * 2 + LED_HEIGHT; 
+    /* setting the mines rectangle boundary */
+    left = BOARD_WMARGIN;
+    top = BOARD_HMARGIN * 2 + LED_HEIGHT;
     right = left + p_board->cols * MINE_WIDTH;
     bottom = top + p_board->rows * MINE_HEIGHT;
     SetRect( &p_board->mines_rect, left, top, right, bottom );
 
-    /* setting the face rectangle boundary */    
+    /* setting the face rectangle boundary */
     left = p_board->width / 2 - FACE_WIDTH / 2;
     top = BOARD_HMARGIN;
     right = left + FACE_WIDTH;
-    bottom = top + FACE_HEIGHT; 
+    bottom = top + FACE_HEIGHT;
     SetRect( &p_board->face_rect, left, top, right, bottom );
-    
-    /* setting the timer rectangle boundary */    
+
+    /* setting the timer rectangle boundary */
     left = BOARD_WMARGIN;
     top = BOARD_HMARGIN;
     right = left + LED_WIDTH * 3;
-    bottom = top + LED_HEIGHT; 
+    bottom = top + LED_HEIGHT;
     SetRect( &p_board->timer_rect, left, top, right, bottom );
-        
-    /* setting the counter rectangle boundary */    
+
+    /* setting the counter rectangle boundary */
     left =  p_board->width - BOARD_WMARGIN - LED_WIDTH * 3;
     top = BOARD_HMARGIN;
     right = p_board->width - BOARD_WMARGIN;
-    bottom = top + LED_HEIGHT; 
+    bottom = top + LED_HEIGHT;
     SetRect( &p_board->counter_rect, left, top, right, bottom );
-        
+
     p_board->status = WAITING;
-    p_board->face_bmp = SMILE_BMP;     
+    p_board->face_bmp = SMILE_BMP;
     p_board->time = 0;
 
     MoveWindow( p_board->hWnd, wnd_x, wnd_y, wnd_width, wnd_height, TRUE );
-    RedrawWindow( p_board->hWnd, NULL, NULL_HANDLE, 
+    RedrawWindow( p_board->hWnd, NULL, NULL_HANDLE,
             RDW_INVALIDATE | RDW_UPDATENOW | RDW_ERASE );
 }
 
@@ -544,7 +544,7 @@
 
     if( p_board->rows > MAX_ROWS )
         p_board->rows = MAX_ROWS;
-        
+
     if( p_board->cols < BEGINNER_COLS )
         p_board->cols = BEGINNER_COLS;
 
@@ -552,10 +552,10 @@
         p_board->cols = MAX_COLS;
 
     if( p_board->mines < BEGINNER_MINES )
-        p_board->mines = BEGINNER_MINES;               
+        p_board->mines = BEGINNER_MINES;
 
-    if( p_board->mines > p_board->cols * p_board->rows - 1 ) 
-        p_board->mines = p_board->cols * p_board->rows - 1; 
+    if( p_board->mines > p_board->cols * p_board->rows - 1 )
+        p_board->mines = p_board->cols * p_board->rows - 1;
 }
 
 
@@ -566,14 +566,14 @@
 
     srand( (unsigned) time( NULL ) );
 
-    /* Create the boxes...  
+    /* Create the boxes...
      * We actually create them with an empty border,
      * so special care doesn't have to be taken on the edges
      */
-    
+
     for( col = 0; col <= p_board->cols + 1; col++ )
       for( row = 0; row <= p_board->rows + 1; row++ ) {
-        p_board->box[col][row].IsPressed = FALSE;  
+        p_board->box[col][row].IsPressed = FALSE;
         p_board->box[col][row].IsMine = FALSE;
         p_board->box[col][row].FlagType = NORMAL;
         p_board->box[col][row].NumMines = 0;
@@ -613,9 +613,9 @@
     unsigned col, row;
     hOldObj = SelectObject (hMemDC, p_board->hMinesBMP);
 
-    for( row = 1; row <= p_board->rows; row++ ) { 
+    for( row = 1; row <= p_board->rows; row++ ) {
       for( col = 1; col <= p_board->cols; col++ ) {
-        DrawMine( hdc, hMemDC, p_board, col, row, FALSE );    
+        DrawMine( hdc, hMemDC, p_board, col, row, FALSE );
       }
     }
     SelectObject( hMemDC, hOldObj );
@@ -626,7 +626,7 @@
     MINEBMP_OFFSET offset = BOX_BMP;
 
     if( col == 0 || col > p_board->cols || row == 0 || row > p_board->rows )
-           return;    
+           return;
 
     if( p_board->status == GAMEOVER ) {
         if( p_board->box[col][row].IsMine ) {
@@ -635,60 +635,60 @@
                 offset = FLAG_BMP;
                 break;
             case COMPLETE:
-                offset = EXPLODE_BMP;                        
+                offset = EXPLODE_BMP;
                 break;
             case NORMAL:
                 offset = MINE_BMP;
             }
         } else {
-            switch( p_board->box[col][row].FlagType ) {    
+            switch( p_board->box[col][row].FlagType ) {
             case QUESTION:
-                offset = QUESTION_BMP;     
+                offset = QUESTION_BMP;
                 break;
             case FLAG:
                 offset = WRONG_BMP;
                 break;
-            case NORMAL:    
+            case NORMAL:
                 offset = BOX_BMP;
                 break;
             case COMPLETE:
                 /* Do nothing */
                 break;
             default:
-                DEBUG("Unknown FlagType during game over in DrawMine\n"); 
+                DEBUG("Unknown FlagType during game over in DrawMine\n");
                 break;
             }
-        } 
+        }
     } else {    /* WAITING or PLAYING */
         switch( p_board->box[col][row].FlagType ) {
         case QUESTION:
-            if( !IsPressed )    
-                offset = QUESTION_BMP;     
+            if( !IsPressed )
+                offset = QUESTION_BMP;
             else
-                offset = QPRESS_BMP;    
+                offset = QPRESS_BMP;
             break;
         case FLAG:
             offset = FLAG_BMP;
             break;
-        case NORMAL:    
+        case NORMAL:
             if( !IsPressed )
                 offset = BOX_BMP;
-            else 
+            else
                 offset = MPRESS_BMP;
             break;
         case COMPLETE:
             /* Do nothing */
             break;
         default:
-            DEBUG("Unknown FlagType while playing in DrawMine\n"); 
+            DEBUG("Unknown FlagType while playing in DrawMine\n");
             break;
         }
-    } 
+    }
 
-    if( p_board->box[col][row].FlagType == COMPLETE  
+    if( p_board->box[col][row].FlagType == COMPLETE
         && !p_board->box[col][row].IsMine )
           offset = (MINEBMP_OFFSET) p_board->box[col][row].NumMines;
-    
+
     BitBlt( hdc,
             (col - 1) * MINE_WIDTH + p_board->mines_rect.left,
             (row - 1) * MINE_HEIGHT + p_board->mines_rect.top,
@@ -700,7 +700,7 @@
 {
     HGDIOBJ hOldObj;
     unsigned led[3], i;
-    int count;     
+    int count;
 
     count = number;
     if( count < 1000 ) {
@@ -724,8 +724,8 @@
     /* use unlit led if not playing */
     if( p_board->status == WAITING )
         for( i = 0; i < 3; i++ )
-            led[i] = 11;  
-    
+            led[i] = 11;
+
     hOldObj = SelectObject (hMemDC, p_board->hLedsBMP);
 
     for( i = 0; i < 3; i++ ) {
@@ -734,19 +734,19 @@
             y,
             LED_WIDTH,
             LED_HEIGHT,
-            hMemDC, 
-            0, 
-            led[i] * LED_HEIGHT, 
+            hMemDC,
+            0,
+            led[i] * LED_HEIGHT,
             SRCCOPY);
     }
-    
+
     SelectObject( hMemDC, hOldObj );
 }
 
 
 void DrawFace( HDC hdc, HDC hMemDC, BOARD *p_board )
 {
-    HGDIOBJ hOldObj; 
+    HGDIOBJ hOldObj;
 
     hOldObj = SelectObject (hMemDC, p_board->hFacesBMP);
 
@@ -756,96 +756,96 @@
         FACE_WIDTH,
         FACE_HEIGHT,
         hMemDC, 0, p_board->face_bmp * FACE_HEIGHT, SRCCOPY);
-    
+
     SelectObject( hMemDC, hOldObj );
 }
 
 
 void DrawBoard( HDC hdc, HDC hMemDC, PAINTSTRUCT *ps, BOARD *p_board )
 {
-    RECT tmp_rect;    
-    
-    if( IntersectRect( &tmp_rect, &ps->rcPaint, &p_board->counter_rect ) )    
+    RECT tmp_rect;
+
+    if( IntersectRect( &tmp_rect, &ps->rcPaint, &p_board->counter_rect ) )
         DrawLeds( hdc, hMemDC, p_board, p_board->mines - p_board->num_flags,
                   p_board->counter_rect.left,
                   p_board->counter_rect.top );
 
-    if( IntersectRect( &tmp_rect, &ps->rcPaint, &p_board->timer_rect ) )    
+    if( IntersectRect( &tmp_rect, &ps->rcPaint, &p_board->timer_rect ) )
         DrawLeds( hdc, hMemDC, p_board, p_board->time,
-                  p_board->timer_rect.left, 
+                  p_board->timer_rect.left,
                   p_board->timer_rect.top );
-    
-    if( IntersectRect( &tmp_rect, &ps->rcPaint, &p_board->face_rect ) )    
+
+    if( IntersectRect( &tmp_rect, &ps->rcPaint, &p_board->face_rect ) )
         DrawFace( hdc, hMemDC, p_board );
-    
-    if( IntersectRect( &tmp_rect, &ps->rcPaint, &p_board->mines_rect ) )    
+
+    if( IntersectRect( &tmp_rect, &ps->rcPaint, &p_board->mines_rect ) )
         DrawMines( hdc, hMemDC, p_board );
-}    
+}
 
 
 void TestBoard( HWND hWnd, BOARD *p_board, unsigned x, unsigned y, int msg )
 {
     POINT pt;
-    
+
     pt.x = x;
     pt.y = y;
 
     if( PtInRect( &p_board->mines_rect, pt ) && p_board->status != GAMEOVER
-    && p_board->status != WON ) 
+    && p_board->status != WON )
         TestMines( p_board, pt, msg );
     else {
-        UnpressBoxes( p_board, 
-            p_board->press.x, 
-            p_board->press.y );    
+        UnpressBoxes( p_board,
+            p_board->press.x,
+            p_board->press.y );
         p_board->press.x = 0;
         p_board->press.y = 0;
     }
 
     if( p_board->boxes_left == 0 ) {
         p_board->status = WON;
-       
+
         if( p_board->difficulty != CUSTOM &&
                     p_board->time < p_board->best_time[p_board->difficulty] ) {
             p_board->best_time[p_board->difficulty] = p_board->time;
-        
-            DialogBoxParam( p_board->hInst, "DLG_CONGRATS", hWnd, 
+
+            DialogBoxParam( p_board->hInst, "DLG_CONGRATS", hWnd,
                     CongratsDlgProc, (LPARAM) p_board);
-    
-            DialogBoxParam( p_board->hInst, "DLG_TIMES", hWnd, 
+
+            DialogBoxParam( p_board->hInst, "DLG_TIMES", hWnd,
                     TimesDlgProc, (LPARAM) p_board);
         }
     }
-    TestFace( p_board, pt, msg );    
+    TestFace( p_board, pt, msg );
 }
 
 void TestMines( BOARD *p_board, POINT pt, int msg )
 {
     BOOL draw = TRUE;
-    unsigned col, row;    
+    unsigned col, row;
 
     col = (pt.x - p_board->mines_rect.left) / MINE_WIDTH + 1;
     row = (pt.y - p_board->mines_rect.top ) / MINE_HEIGHT + 1;
-    
+
     switch ( msg ) {
     case WM_LBUTTONDOWN:
         if( p_board->press.x != col || p_board->press.y != row ) {
-            UnpressBox( p_board, 
+            UnpressBox( p_board,
                     p_board->press.x, p_board->press.y );
             p_board->press.x = col;
             p_board->press.y = row;
-            PressBox( p_board, col, row );    
-        }    
-        draw = FALSE;    
+            PressBox( p_board, col, row );
+        }
+        draw = FALSE;
         break;
 
     case WM_LBUTTONUP:
         if( p_board->press.x != col || p_board->press.y != row )
-            UnpressBox( p_board, 
+            UnpressBox( p_board,
                     p_board->press.x, p_board->press.y );
         p_board->press.x = 0;
         p_board->press.y = 0;
         if( p_board->box[col][row].FlagType != FLAG )
-            p_board->status = PLAYING;    
+            p_board->status = PLAYING;
         CompleteBox( p_board, col, row );
         break;
 
@@ -856,7 +856,7 @@
 
     case WM_MBUTTONUP:
         if( p_board->press.x != col || p_board->press.y != row )
-            UnpressBoxes( p_board, 
+            UnpressBoxes( p_board,
                     p_board->press.x, p_board->press.y );
         p_board->press.x = 0;
         p_board->press.y = 0;
@@ -865,7 +865,7 @@
 
     case WM_RBUTTONDOWN:
         AddFlag( p_board, col, row );
-        p_board->status = PLAYING;    
+        p_board->status = PLAYING;
         break;
     default:
         DEBUG("Unknown message type received in TestMines\n");
@@ -874,10 +874,10 @@
 
     if( draw )
     {
-        RedrawWindow( p_board->hWnd, NULL, NULL_HANDLE, 
+        RedrawWindow( p_board->hWnd, NULL, NULL_HANDLE,
             RDW_INVALIDATE | RDW_UPDATENOW );
     }
-}    
+}
 
 
 void TestFace( BOARD *p_board, POINT pt, int msg )
@@ -887,20 +887,20 @@
             p_board->face_bmp = OOH_BMP;
         else p_board->face_bmp = SMILE_BMP;
     }
-    else if( p_board->status == GAMEOVER ) 
+    else if( p_board->status == GAMEOVER )
         p_board->face_bmp = DEAD_BMP;
-    else if( p_board->status == WON ) 
+    else if( p_board->status == WON )
             p_board->face_bmp = COOL_BMP;
 
-    if( PtInRect( &p_board->face_rect, pt ) ) {        
-        if( msg == WM_LBUTTONDOWN )     
+    if( PtInRect( &p_board->face_rect, pt ) ) {
+        if( msg == WM_LBUTTONDOWN )
             p_board->face_bmp = SPRESS_BMP;
-        
-        if( msg == WM_LBUTTONUP )     
-            CreateBoard( p_board );    
+
+        if( msg == WM_LBUTTONUP )
+            CreateBoard( p_board );
     }
 
-    RedrawWindow( p_board->hWnd, &p_board->face_rect, NULL_HANDLE, 
+    RedrawWindow( p_board->hWnd, &p_board->face_rect, NULL_HANDLE,
         RDW_INVALIDATE | RDW_UPDATENOW );
 }
 
@@ -909,26 +909,26 @@
 {
     int i, j;
 
-    if( p_board->box[col][row].FlagType != COMPLETE && 
-            p_board->box[col][row].FlagType != FLAG && 
-            col > 0 && col < p_board->cols + 1 && 
+    if( p_board->box[col][row].FlagType != COMPLETE &&
+            p_board->box[col][row].FlagType != FLAG &&
+            col > 0 && col < p_board->cols + 1 &&
             row > 0 && row < p_board->rows + 1 ) {
         p_board->box[col][row].FlagType = COMPLETE;
-    
+
         if( p_board->box[col][row].IsMine ) {
-            p_board->face_bmp = DEAD_BMP; 
+            p_board->face_bmp = DEAD_BMP;
             p_board->status = GAMEOVER;
         }
-        else if( p_board->status != GAMEOVER ) 
+        else if( p_board->status != GAMEOVER )
             p_board->boxes_left--;
 
-        if( p_board->box[col][row].NumMines == 0 ) 
+        if( p_board->box[col][row].NumMines == 0 )
         {
             for( i = -1; i <= 1; i++ )
             for( j = -1; j <= 1; j++ )
                 CompleteBox( p_board, col + i, row + j  );
         }
-    } 
+    }
 }
 
 
@@ -940,14 +940,14 @@
     if( p_board->box[col][row].FlagType == COMPLETE ) {
         for( i = -1; i <= 1; i++ )
           for( j = -1; j <= 1; j++ ) {
-            if( p_board->box[col+i][row+j].FlagType == FLAG ) 
+            if( p_board->box[col+i][row+j].FlagType == FLAG )
                 numFlags++;
           }
-    
+
         if( numFlags == p_board->box[col][row].NumMines ) {
             for( i = -1; i <= 1; i++ )
               for( j = -1; j <= 1; j++ ) {
-                if( p_board->box[col+i][row+j].FlagType != FLAG ) 
+                if( p_board->box[col+i][row+j].FlagType != FLAG )
                     CompleteBox( p_board, col+i, row+j );
               }
         }
@@ -962,7 +962,7 @@
         case FLAG:
             if( p_board->IsMarkQ )
                 p_board->box[col][row].FlagType = QUESTION;
-            else 
+            else
                 p_board->box[col][row].FlagType = NORMAL;
             p_board->num_flags--;
             break;
@@ -970,19 +970,19 @@
         case QUESTION:
             p_board->box[col][row].FlagType = NORMAL;
             break;
-        
+
         default:
             p_board->box[col][row].FlagType = FLAG;
             p_board->num_flags++;
-        }    
-    }    
+        }
+    }
 }
 
 
 void PressBox( BOARD *p_board, unsigned col, unsigned row )
 {
-    HDC hdc;      
-    HGDIOBJ hOldObj; 
+    HDC hdc;
+    HGDIOBJ hOldObj;
     HDC hMemDC;
 
     hdc = GetDC( p_board->hWnd );
@@ -991,7 +991,7 @@
 
     DrawMine( hdc, hMemDC, p_board, col, row, TRUE );
 
-    SelectObject( hMemDC, hOldObj ); 
+    SelectObject( hMemDC, hOldObj );
     DeleteDC( hMemDC );
     ReleaseDC( p_board->hWnd, hdc );
 }
@@ -1003,31 +1003,31 @@
 
     for( i = -1; i <= 1; i++ )
       for( j = -1; j <= 1; j++ ) {
-        p_board->box[col + i][row + j].IsPressed = TRUE;    
+        p_board->box[col + i][row + j].IsPressed = TRUE;
         PressBox( p_board, col + i, row + j );
     }
 
     for( i = -1; i <= 1; i++ )
       for( j = -1; j <= 1; j++ ) {
-        if( !p_board->box[p_board->press.x + i][p_board->press.y + j].IsPressed )    
+        if( !p_board->box[p_board->press.x + i][p_board->press.y + j].IsPressed )
             UnpressBox( p_board, p_board->press.x + i, p_board->press.y + j );
     }
 
     for( i = -1; i <= 1; i++ )
       for( j = -1; j <= 1; j++ ) {
-        p_board->box[col + i][row + j].IsPressed = FALSE;    
+        p_board->box[col + i][row + j].IsPressed = FALSE;
         PressBox( p_board, col + i, row + j );
     }
 
     p_board->press.x = col;
-    p_board->press.y = row;    
+    p_board->press.y = row;
 }
 
 
 void UnpressBox( BOARD *p_board, unsigned col, unsigned row )
 {
-    HDC hdc; 
-    HGDIOBJ hOldObj; 
+    HDC hdc;
+    HGDIOBJ hOldObj;
     HDC hMemDC;
 
     hdc = GetDC( p_board->hWnd );
@@ -1036,7 +1036,7 @@
 
     DrawMine( hdc, hMemDC, p_board, col, row, FALSE );
 
-    SelectObject( hMemDC, hOldObj ); 
+    SelectObject( hMemDC, hOldObj );
     DeleteDC( hMemDC );
     ReleaseDC( p_board->hWnd, hdc );
 }
@@ -1044,8 +1044,8 @@
 
 void UnpressBoxes( BOARD *p_board, unsigned col, unsigned row )
 {
-    int i, j;    
-    
+    int i, j;
+
     for( i = -1; i <= 1; i++ )
       for( j = -1; j <= 1; j++ ) {
         UnpressBox( p_board, col + i, row + j );
diff --git a/programs/winemine/main.h b/programs/winemine/main.h
index 41741b3..1f8b4cc 100644
--- a/programs/winemine/main.h
+++ b/programs/winemine/main.h
@@ -69,14 +69,14 @@
     RECT mines_rect;
     RECT face_rect;
     RECT timer_rect;
-    RECT counter_rect;    
+    RECT counter_rect;
 
     unsigned width;
     unsigned height;
     POINT pos;
 
     unsigned time;
-    unsigned num_flags;     
+    unsigned num_flags;
     unsigned boxes_left;
     unsigned num_mines;
 
@@ -89,7 +89,7 @@
     DIFFICULTY difficulty;
 
     POINT press;
-    
+
     /* defines for mb */
     #define MB_NONE 0
     #define MB_LEFTDOWN 1
@@ -99,7 +99,7 @@
     #define MB_BOTHDOWN 5
     #define MB_BOTHUP 6
     unsigned mb;
-    
+
     FACE_BMP face_bmp;
     GAME_STATUS status;
     struct BOX_STRUCT
diff --git a/programs/winemine/resource.h b/programs/winemine/resource.h
index 56ea59e..6f1b600 100644
--- a/programs/winemine/resource.h
+++ b/programs/winemine/resource.h
@@ -1,6 +1,6 @@
 /*
  * WineMine (resource.h)
- * 
+ *
  * Copyright 2000 Joshua Thielen <jt85296@ltu.edu>
  *
  * This library is free software; you can redistribute it and/or
diff --git a/programs/winepath/winepath.c b/programs/winepath/winepath.c
index ef54e50..6e44709 100644
--- a/programs/winepath/winepath.c
+++ b/programs/winepath/winepath.c
@@ -26,7 +26,7 @@
 
 #define VERSION "0.1 (" PACKAGE_STRING ")"
 
-enum { 
+enum {
     SHORTFORMAT = 1,
     LONGFORMAT  = 2,
     UNIXFORMAT  = 4
@@ -69,13 +69,13 @@
             return SHORTFORMAT;
         case 'u':
             return UNIXFORMAT;
-    } 
+    }
 
     fprintf(stderr, "%s: invalid option ", progname);
     if (longopt)
         fprintf(stderr, "'%s'\n", longopt);
     else
-        fprintf(stderr, "'-%c'\n", shortopt); 
+        fprintf(stderr, "'-%c'\n", shortopt);
     fprintf(stderr, "Try '%s --help' for help\n", progname);
     exit(2);
 }
@@ -112,7 +112,7 @@
         } else {
             /* short options */
             for (j = 1; argv[i][j]; j++)
-                outputformats |= option(argv[i][j], NULL); 
+                outputformats |= option(argv[i][j], NULL);
         }
 
         /* remove option */
diff --git a/programs/winhelp/hlpfile.c b/programs/winhelp/hlpfile.c
index a52afac..76e0aa0 100644
--- a/programs/winhelp/hlpfile.c
+++ b/programs/winhelp/hlpfile.c
@@ -289,7 +289,7 @@
   UINT      titlesize;
 
   for (pageptr = &hlpfile->first_page; *pageptr; pageptr = &(*pageptr)->next)
-    /* Nothing */; 
+    /* Nothing */;
 
   if (buf + 0x31 > end) {Report("page1"); return(FALSE);};
   title = buf + GET_UINT(buf, 0x10);
@@ -342,7 +342,7 @@
 
   for (page = hlpfile->first_page; page->next; page = page->next) /* Nothing */;
   for (paragraphptr = &page->first_paragraph; *paragraphptr;
-       paragraphptr = &(*paragraphptr)->next) /* Nothing */; 
+       paragraphptr = &(*paragraphptr)->next) /* Nothing */;
 
   if (buf + 0x19 > end) {Report("paragraph2"); return(FALSE);};
 
@@ -580,7 +580,7 @@
   if (_hread(hFile, file_buffer + 16, size - 16) != size - 16)
     {Report("filesize1"); return(FALSE);};
 
-  if (_hread(hFile, dummy, 1) != 0) Report("filesize2"); 
+  if (_hread(hFile, dummy, 1) != 0) Report("filesize2");
 
   file_buffer[size] = '0';
 
diff --git a/programs/winhelp/macro.c b/programs/winhelp/macro.c
index 622bec2..9912aa9 100644
--- a/programs/winhelp/macro.c
+++ b/programs/winhelp/macro.c
@@ -474,7 +474,7 @@
 VOID MACRO_Print(VOID)
 {
     PRINTDLG printer;
-    
+
     printer.lStructSize         = sizeof(printer);
     printer.hwndOwner           = Globals.active_win->hMainWnd;
     printer.hInstance           = Globals.hInstance;
@@ -494,7 +494,7 @@
     printer.lpSetupTemplateName = 0;
     printer.hPrintTemplate      = 0;
     printer.hSetupTemplate      = 0;
-        
+
     if (PrintDlgA(&printer)) {
         fprintf(stderr, "Print()\n");
     };
diff --git a/programs/winhelp/winhelp.c b/programs/winhelp/winhelp.c
index be5df91..8dc9467 100644
--- a/programs/winhelp/winhelp.c
+++ b/programs/winhelp/winhelp.c
@@ -288,7 +288,7 @@
 
 	  for (button = oldwin->first_button; button; button = button->next)
 	    DestroyWindow(button->hWnd);
-  
+
 	  WINHELP_DeleteWindow(oldwin);
 	  return;
 	}
@@ -384,7 +384,7 @@
 	  /* Menu Info */
 	case 0x113:			MACRO_About();          break;
 
-	case 0x114: 
+	case 0x114:
 	  ShellAbout(hWnd, "WINE", "Help", 0);
 	  break;
 
@@ -541,7 +541,7 @@
 	  new_window_size.cx = old_window_size.cx - old_client_size.cx + new_client_size.cx;
 	  new_window_size.cy = old_window_size.cy - old_client_size.cy + new_client_size.cy;
 
-	  win->hShadowWnd = 
+	  win->hShadowWnd =
 	    CreateWindow(SHADOW_WIN_CLASS_NAME, "", WS_POPUP | WS_VISIBLE,
 			 origin.x + SHADOW_DX, origin.y + SHADOW_DY,
 			 new_window_size.cx, new_window_size.cy,
@@ -847,7 +847,7 @@
       line->rect.left   = space->cx;
       line->rect.right  = space->cx;
 
-      if (**linep) *linep = &(**linep)->next; 
+      if (**linep) *linep = &(**linep)->next;
       **linep = line;
       space->cy = 0;
     }
diff --git a/relay32/snoop.c b/relay32/snoop.c
index bd691fb..59f8ba3 100644
--- a/relay32/snoop.c
+++ b/relay32/snoop.c
@@ -216,7 +216,7 @@
 		return origfun;
 	assert(ordinal < dll->nrofordinals);
 	fun = dll->funs+ordinal;
-	if (!fun->name) 
+	if (!fun->name)
 	  {
 	    fun->name = HeapAlloc(GetProcessHeap(),0,strlen(name)+1);
 	    strcpy( fun->name, name );
diff --git a/scheduler/process.c b/scheduler/process.c
index e91bd88..8439943 100644
--- a/scheduler/process.c
+++ b/scheduler/process.c
@@ -135,7 +135,7 @@
  *
  * FIXME:  Some of the signals aren't sent correctly!
  *
- * The exact meaning of the USER signals is undocumented, but this 
+ * The exact meaning of the USER signals is undocumented, but this
  * should cover the basic idea:
  *
  * USIG_DLL_UNLOAD_WIN16
@@ -195,7 +195,7 @@
  * USIG_FLAGS_GUI
  *     Current process is a (Win32) GUI process.
  *
- * USIG_FLAGS_FEEDBACK 
+ * USIG_FLAGS_FEEDBACK
  *     Current process needs 'feedback' (determined from the STARTUPINFO
  *     flags STARTF_FORCEONFEEDBACK / STARTF_FORCEOFFFEEDBACK).
  *
@@ -397,7 +397,7 @@
 
     if (main_create_flags == 0 &&
 	current_startupinfo.hStdInput  == 0 &&
-	current_startupinfo.hStdOutput == 0 && 
+	current_startupinfo.hStdOutput == 0 &&
 	current_startupinfo.hStdError  == 0)
     {
 	/* no parent, and no new console requested, create a simple console with bare handles to
@@ -505,7 +505,7 @@
      *       context of the parent process.  Actually, the USER signal proc
      *       doesn't really care about that, but it *does* require that the
      *       startup parameters are correctly set up, so that GetProcessDword
-     *       works.  Furthermore, before calling the USER signal proc the 
+     *       works.  Furthermore, before calling the USER signal proc the
      *       16-bit stack must be set up, which it is only after TASK_Create
      *       in the case of a 16-bit process. Thus, we send the signal here.
      */
@@ -709,14 +709,14 @@
         } else if (*s=='"') {
             /* '"' */
             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 '"' which we discard.
                  */
                 d-=bcount/2;
                 s++;
                 in_quotes=!in_quotes;
             } 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;
@@ -1305,7 +1305,7 @@
         return 0;
     }
 
-    switch ( offset ) 
+    switch ( offset )
     {
     case GPD_APP_COMPAT_FLAGS:
         return GetAppCompatFlags16(0);
@@ -1380,7 +1380,7 @@
         return;
     }
 
-    switch ( offset ) 
+    switch ( offset )
     {
     case GPD_APP_COMPAT_FLAGS:
     case GPD_LOAD_DONE_EVENT:
@@ -1400,7 +1400,7 @@
         break;
 
     case GPD_USERDATA:
-        current_process.process_dword = value; 
+        current_process.process_dword = value;
         break;
 
     default:
@@ -1707,7 +1707,7 @@
  * GetExitCodeProcess [KERNEL32.@]
  *
  * Gets termination status of specified process
- * 
+ *
  * RETURNS
  *   Success: TRUE
  *   Failure: FALSE
@@ -1824,7 +1824,7 @@
  * TlsFree [KERNEL32.@]  Releases a TLS index.
  *
  * Releases a thread local storage index, making it available for reuse
- * 
+ *
  * RETURNS
  *    Success: TRUE
  *    Failure: FALSE
diff --git a/scheduler/pthread.c b/scheduler/pthread.c
index 0dd7330..9ed1513 100644
--- a/scheduler/pthread.c
+++ b/scheduler/pthread.c
@@ -89,8 +89,8 @@
 extern pid_t LIBC_FORK(void);
 
 #define LIBC_SIGACTION __sigaction
-extern int LIBC_SIGACTION(int signum, 
-                         const struct sigaction *act, 
+extern int LIBC_SIGACTION(int signum,
+                         const struct sigaction *act,
                          struct sigaction *oldact);
 
 /* NOTE: This is a truly extremely incredibly ugly hack!
@@ -98,7 +98,7 @@
 
 /* assume that pthread_mutex_t has room for at least one pointer,
  * and hope that the users of pthread_mutex_t considers it opaque
- * (never checks what's in it) 
+ * (never checks what's in it)
  * also: assume that static initializer sets pointer to NULL
  */
 typedef struct {
@@ -129,11 +129,11 @@
 struct pthread_thread_init {
 	 void* (*start_routine)(void*);
 	 void* arg;
-}; 
+};
 
 static DWORD CALLBACK pthread_thread_start(LPVOID data)
 {
-  struct pthread_thread_init init = *(struct pthread_thread_init*)data; 
+  struct pthread_thread_init init = *(struct pthread_thread_init*)data;
   HeapFree(GetProcessHeap(),0,data);
   return (DWORD)init.start_routine(init.arg);
 }
@@ -142,10 +142,10 @@
         (*start_routine)(void *), void* arg)
 {
   HANDLE hThread;
-  struct pthread_thread_init* idata = HeapAlloc(GetProcessHeap(), 0, 
+  struct pthread_thread_init* idata = HeapAlloc(GetProcessHeap(), 0,
 		sizeof(struct pthread_thread_init));
 
-  idata->start_routine = start_routine; 
+  idata->start_routine = start_routine;
   idata->arg = arg;
   hThread = CreateThread(NULL, 0, pthread_thread_start, idata, 0, thread);
 
@@ -156,29 +156,29 @@
     HeapFree(GetProcessHeap(),0,idata); /* free idata struct on failure */
     return EAGAIN;
   }
- 
+
   return 0;
 }
- 
+
 int pthread_cancel(pthread_t thread)
 {
   HANDLE hThread = OpenThread(THREAD_ALL_ACCESS, FALSE, thread);
-    
+
   if(!TerminateThread(hThread, 0))
   {
     CloseHandle(hThread);
     return EINVAL;      /* return error */
   }
- 
+
   CloseHandle(hThread);
- 
+
   return 0;             /* return success */
-}   
+}
 
 int pthread_join(pthread_t thread, void **value_ptr)
 {
   HANDLE hThread = OpenThread(THREAD_ALL_ACCESS, FALSE, thread);
- 
+
   WaitForSingleObject(hThread, INFINITE);
   if(!GetExitCodeThread(hThread, (LPDWORD)value_ptr))
   {
@@ -188,7 +188,7 @@
 
   CloseHandle(hThread);
   return 0;
-}   
+}
 
 /*FIXME: not sure what to do with this one... */
 int pthread_detach(pthread_t thread)
@@ -211,7 +211,7 @@
   P_OUTPUT("FIXME:pthread_attr_setscope\n");
   return 0; /* return success */
 }
-  
+
 /* FIXME: no win32 equivalent for schedule param */
 int pthread_attr_setschedparam(pthread_attr_t *attr,
     const struct sched_param *param)
@@ -318,7 +318,7 @@
 int __pthread_mutex_lock(pthread_mutex_t *mutex)
 {
   if (!init_done) return 0;
-  if (!((wine_mutex)mutex)->critsect) 
+  if (!((wine_mutex)mutex)->critsect)
     mutex_real_init( mutex );
 
   EnterCriticalSection(((wine_mutex)mutex)->critsect);
@@ -329,7 +329,7 @@
 int __pthread_mutex_trylock(pthread_mutex_t *mutex)
 {
   if (!init_done) return 0;
-  if (!((wine_mutex)mutex)->critsect) 
+  if (!((wine_mutex)mutex)->critsect)
     mutex_real_init( mutex );
 
   if (!TryEnterCriticalSection(((wine_mutex)mutex)->critsect)) {
diff --git a/scheduler/syslevel.c b/scheduler/syslevel.c
index d5d4715..9d87553 100644
--- a/scheduler/syslevel.c
+++ b/scheduler/syslevel.c
@@ -66,7 +66,7 @@
     InitializeCriticalSection( &lock->crst );
     lock->level = level;
 
-    TRACE("(%p, %d): handle is %d\n", 
+    TRACE("(%p, %d): handle is %d\n",
                   lock, level, lock->crst.LockSemaphore );
 }
 
@@ -79,14 +79,14 @@
     TEB *teb = NtCurrentTeb();
     int i;
 
-    TRACE("(%p, level %d): thread %p (fs %04x, pid %ld) count before %ld\n", 
+    TRACE("(%p, level %d): thread %p (fs %04x, pid %ld) count before %ld\n",
                   lock, lock->level, teb->tid, teb->teb_sel, (long) getpid(),
                   teb->sys_count[lock->level] );
 
     for ( i = 3; i > lock->level; i-- )
         if ( teb->sys_count[i] > 0 )
         {
-            ERR("(%p, level %d): Holding %p, level %d. Expect deadlock!\n", 
+            ERR("(%p, level %d): Holding %p, level %d. Expect deadlock!\n",
                         lock, lock->level, teb->sys_mutex[i], i );
         }
 
@@ -96,7 +96,7 @@
     teb->sys_mutex[lock->level] = lock;
 
     TRACE("(%p, level %d): thread %p (fs %04x, pid %ld) count after  %ld\n",
-                  lock, lock->level, teb->tid, teb->teb_sel, (long) getpid(), 
+                  lock, lock->level, teb->tid, teb->teb_sel, (long) getpid(),
                   teb->sys_count[lock->level] );
 
     if (lock == &Win16Mutex)
@@ -111,14 +111,14 @@
 {
     TEB *teb = NtCurrentTeb();
 
-    TRACE("(%p, level %d): thread %p (fs %04x, pid %ld) count before %ld\n", 
+    TRACE("(%p, level %d): thread %p (fs %04x, pid %ld) count before %ld\n",
                   lock, lock->level, teb->tid, teb->teb_sel, (long) getpid(),
                   teb->sys_count[lock->level] );
 
     if ( teb->sys_count[lock->level] <= 0 || teb->sys_mutex[lock->level] != lock )
     {
         ERR("(%p, level %d): Invalid state: count %ld mutex %p.\n",
-                    lock, lock->level, teb->sys_count[lock->level], 
+                    lock, lock->level, teb->sys_count[lock->level],
                     teb->sys_mutex[lock->level] );
     }
     else
@@ -130,7 +130,7 @@
     LeaveCriticalSection( &lock->crst );
 
     TRACE("(%p, level %d): thread %p (fs %04x, pid %ld) count after  %ld\n",
-                  lock, lock->level, teb->tid, teb->teb_sel, (long) getpid(), 
+                  lock, lock->level, teb->tid, teb->teb_sel, (long) getpid(),
                   teb->sys_count[lock->level] );
 }
 
@@ -223,7 +223,7 @@
     for ( i = 3; i >= level; i-- )
         if ( NtCurrentTeb()->sys_count[i] > 0 )
         {
-            ERR("(%d): Holding lock of level %d!\n", 
+            ERR("(%d): Holding lock of level %d!\n",
                        level, i );
             DbgBreakPoint();
             break;
diff --git a/scheduler/thread.c b/scheduler/thread.c
index a8f1407..382f45c 100644
--- a/scheduler/thread.c
+++ b/scheduler/thread.c
@@ -516,11 +516,11 @@
 /**********************************************************************
  * SetThreadPriorityBoost [KERNEL32.@]  Sets priority boost for thread.
  *
- * Priority boost is not implemented. Thsi function always returns 
+ * Priority boost is not implemented. Thsi function always returns
  * FALSE and sets last error to ERROR_CALL_NOT_IMPLEMENTED
  *
  * RETURNS
- *    Always returns FALSE to indicate a failure 
+ *    Always returns FALSE to indicate a failure
  */
 BOOL WINAPI SetThreadPriorityBoost(
     HANDLE hthread, /* [in] Handle to thread */
@@ -556,7 +556,7 @@
  *    Success: Value of last call to SetThreadIdealProcessor
  *    Failure: -1
  */
-DWORD WINAPI SetThreadIdealProcessor( 
+DWORD WINAPI SetThreadIdealProcessor(
     HANDLE hThread,          /* [in] Specifies the thread of interest */
     DWORD dwIdealProcessor)  /* [in] Specifies the new preferred processor */
 {
@@ -585,7 +585,7 @@
  *		GetExitCodeThread (KERNEL32.@)
  *
  * Gets termination status of thread.
- * 
+ *
  * RETURNS
  *    Success: TRUE
  *    Failure: FALSE
@@ -682,7 +682,7 @@
  *    Success: TRUE
  *    Failure: FALSE
  */
-BOOL WINAPI GetThreadTimes( 
+BOOL WINAPI GetThreadTimes(
     HANDLE thread,         /* [in]  Specifies the thread of interest */
     LPFILETIME creationtime, /* [out] When the thread was created */
     LPFILETIME exittime,     /* [out] When the thread was destroyed */
@@ -782,13 +782,13 @@
  *
  * Informs the system that activity is taking place for
  * power management purposes.
- */ 
+ */
 EXECUTION_STATE WINAPI SetThreadExecutionState(EXECUTION_STATE flags)
 {
     static EXECUTION_STATE current =
 	    ES_SYSTEM_REQUIRED|ES_DISPLAY_REQUIRED|ES_USER_PRESENT;
     EXECUTION_STATE old = current;
-    
+
     if (!(current & ES_CONTINUOUS) || (flags & ES_CONTINUOUS))
         current = flags;
     FIXME("(0x%lx): stub, harmless (power management).\n", flags);
@@ -822,14 +822,14 @@
  */
 /* DWORD WINAPI GetCurrentProcessId(void) */
 __ASM_GLOBAL_FUNC( GetCurrentProcessId, ".byte 0x64\n\tmovl 0x20,%eax\n\tret" );
-                   
+
 /***********************************************************************
  *		GetCurrentThreadId (KERNEL.462)
  *		GetCurrentThreadId (KERNEL32.@)
  */
 /* DWORD WINAPI GetCurrentThreadId(void) */
 __ASM_GLOBAL_FUNC( GetCurrentThreadId, ".byte 0x64\n\tmovl 0x24,%eax\n\tret" );
-                   
+
 #else  /* __i386__ */
 
 /**********************************************************************
diff --git a/server/async.h b/server/async.h
index 37b528f..31df5ab 100644
--- a/server/async.h
+++ b/server/async.h
@@ -26,7 +26,7 @@
 
 struct async_queue;
 
-struct async 
+struct async
 {
     struct object       *obj;
     struct thread       *thread;
@@ -49,11 +49,11 @@
 void async_notify(struct async *async, int status);
 struct async *find_async(struct async_queue *q, struct thread *thread, void *overlapped);
 void async_insert(struct async_queue *q, struct async *async);
-struct async *create_async(struct object *obj, struct thread *thread, 
+struct async *create_async(struct object *obj, struct thread *thread,
                            void *overlapped);
 void async_add_timeout(struct async *async, int timeout);
-static inline void init_async_queue(struct async_queue *q) 
-{ 
+static inline void init_async_queue(struct async_queue *q)
+{
     q->head = q->tail = NULL;
 }
 
diff --git a/server/console.c b/server/console.c
index 66787f8..6ddd077 100644
--- a/server/console.c
+++ b/server/console.c
@@ -63,7 +63,7 @@
 static void console_input_events_destroy( struct object *obj );
 static int  console_input_events_signaled( struct object *obj, struct thread *thread );
 
-struct console_input_events 
+struct console_input_events
 {
     struct object         obj;         /* object header */
     int			  num_alloc;   /* number of allocated events */
@@ -138,7 +138,7 @@
 {
     struct console_input_events *evts = (struct console_input_events *)obj;
     assert( obj->ops == &console_input_events_ops );
-    fprintf( stderr, "Console input events: %d/%d events\n", 
+    fprintf( stderr, "Console input events: %d/%d events\n",
 	     evts->num_used, evts->num_alloc );
 }
 
@@ -159,7 +159,7 @@
 }
 
 /* add an event to the console's renderer events list */
-static void console_input_events_append( struct console_input_events* evts, 
+static void console_input_events_append( struct console_input_events* evts,
 					 struct console_renderer_event* evt)
 {
     /* to be done even when the renderer generates the events ? */
@@ -504,7 +504,7 @@
     {
 	struct screen_buffer *screen_buffer;
 
-	screen_buffer = (struct screen_buffer *)get_handle_obj( current->process, req->active_sb, 
+	screen_buffer = (struct screen_buffer *)get_handle_obj( current->process, req->active_sb,
 								GENERIC_READ, &screen_buffer_ops );
 	if (!screen_buffer || screen_buffer->input != console)
 	{
@@ -540,7 +540,7 @@
     {
 	console->history_mode = req->history_mode;
     }
-    if ((req->mask & SET_CONSOLE_INPUT_INFO_HISTORY_SIZE) && 
+    if ((req->mask & SET_CONSOLE_INPUT_INFO_HISTORY_SIZE) &&
 	console->history_size != req->history_size)
     {
 	WCHAR**	mem = NULL;
@@ -554,7 +554,7 @@
 	    memset( mem, 0, req->history_size * sizeof(WCHAR*) );
 	}
 
-	delta = (console->history_index > req->history_size) ? 
+	delta = (console->history_index > req->history_size) ?
 	    (console->history_index - req->history_size) : 0;
 
 	for (i = delta; i < console->history_index; i++)
@@ -642,7 +642,7 @@
 	    set_error( STATUS_INVALID_PARAMETER );
 	    return 0;
 	}
-        if (screen_buffer->cursor_size != req->cursor_size || 
+        if (screen_buffer->cursor_size != req->cursor_size ||
 	    screen_buffer->cursor_visible != req->cursor_visible)
 	{
 	    screen_buffer->cursor_size    = req->cursor_size;
@@ -655,7 +655,7 @@
     }
     if (req->mask & SET_CONSOLE_OUTPUT_INFO_CURSOR_POS)
     {
-	if (req->cursor_x < 0 || req->cursor_x >= screen_buffer->width || 
+	if (req->cursor_x < 0 || req->cursor_x >= screen_buffer->width ||
 	    req->cursor_y < 0 || req->cursor_y >= screen_buffer->height)
 	{
 	    set_error( STATUS_INVALID_PARAMETER );
@@ -681,7 +681,7 @@
 	evt.u.resize.height = req->height;
 	console_input_events_append( screen_buffer->input->evt, &evt );
 
-	if (screen_buffer == screen_buffer->input->active && 
+	if (screen_buffer == screen_buffer->input->active &&
 	    screen_buffer->input->mode & ENABLE_WINDOW_INPUT)
 	{
 	    INPUT_RECORD	ir;
@@ -697,9 +697,9 @@
     }
     if (req->mask & SET_CONSOLE_OUTPUT_INFO_DISPLAY_WINDOW)
     {
-	if (req->win_left < 0 || req->win_left > req->win_right || 
+	if (req->win_left < 0 || req->win_left > req->win_right ||
 	    req->win_right >= screen_buffer->width ||
-	    req->win_top < 0  || req->win_top > req->win_bottom || 
+	    req->win_top < 0  || req->win_top > req->win_bottom ||
 	    req->win_bottom >= screen_buffer->height)
 	{
 	    set_error( STATUS_INVALID_PARAMETER );
@@ -773,7 +773,7 @@
     else
     {
 	free( console->history[0]) ;
-	memmove( &console->history[0], &console->history[1], 
+	memmove( &console->history[0], &console->history[1],
 		 (console->history_size - 1) * sizeof(WCHAR*) );
 	console->history[console->history_size - 1] = ptr;
     }
@@ -798,7 +798,7 @@
 {
     struct console_input *console = (struct console_input *)obj;
     assert( obj->ops == &console_input_ops );
-    fprintf( stderr, "Console input active=%p evt=%p\n", 
+    fprintf( stderr, "Console input active=%p evt=%p\n",
 	     console->active, console->evt );
 }
 
@@ -1080,7 +1080,7 @@
 
 	for (j = 0; j < h; j++)
 	{
-	    /* we use memmove here because when psrc and pdst are the same, 
+	    /* we use memmove here because when psrc and pdst are the same,
 	     * copies are done on the same row, so the dst and src blocks
 	     * can overlap */
 	    memmove( pdst, psrc, w * sizeof(*pdst) );
@@ -1287,7 +1287,7 @@
     screen_buffer = create_console_output( console );
     if (screen_buffer)
     {
-        /* FIXME: should store sharing and test it when opening the CONOUT$ device 
+        /* FIXME: should store sharing and test it when opening the CONOUT$ device
          * see file.c on how this could be done */
         reply->handle_out = alloc_handle( current->process, screen_buffer,
                                           req->access, req->inherit );
@@ -1382,6 +1382,6 @@
 /* move a rect of data in a screen buffer */
 DECL_HANDLER(move_console_output)
 {
-    scroll_console_output( req->handle, req->x_src, req->y_src, req->x_dst, req->y_dst, 
+    scroll_console_output( req->handle, req->x_src, req->y_src, req->x_dst, req->y_dst,
 			   req->w, req->h );
 }
diff --git a/server/named_pipe.c b/server/named_pipe.c
index 68c4f20..a244651 100644
--- a/server/named_pipe.c
+++ b/server/named_pipe.c
@@ -409,7 +409,7 @@
             set_error(STATUS_SUCCESS);
             if( (partner = find_partner(pipe,ps_wait_open)) )
             {
-                /* this should use notify_waiter, 
+                /* this should use notify_waiter,
                    but no pipe_user object exists now... */
                 thread_queue_apc(current,NULL,req->func,
                     APC_ASYNC,1,2,req->overlapped,STATUS_SUCCESS);
diff --git a/server/registry.c b/server/registry.c
index 1e88867..573ee67 100644
--- a/server/registry.c
+++ b/server/registry.c
@@ -465,7 +465,7 @@
     key->flags |= KEY_DELETED;
     key->parent = NULL;
     release_object( key );
-    
+
     /* try to shrink the array */
     nb_subkeys = key->nb_subkeys;
     if (nb_subkeys > MIN_SUBKEYS && key->last_subkey < nb_subkeys / 2)
@@ -1062,7 +1062,7 @@
 {
     struct data_type { const char *tag; int len; int type; int parse_type; };
 
-    static const struct data_type data_types[] = 
+    static const struct data_type data_types[] =
     {                   /* actual type */  /* type to assume for parsing */
         { "\"",        1,   REG_SZ,              REG_SZ },
         { "str:\"",    5,   REG_SZ,              REG_SZ },
diff --git a/server/smb.c b/server/smb.c
index 790f503..49127b0 100644
--- a/server/smb.c
+++ b/server/smb.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
  *
- * FIXME: if you can't find something to fix, 
+ * FIXME: if you can't find something to fix,
  *          you're not looking hard enough
  */
 
diff --git a/server/sock.c b/server/sock.c
index 4f79d94..d8d6c5b 100644
--- a/server/sock.c
+++ b/server/sock.c
@@ -213,7 +213,7 @@
 inline static int sock_error(int s)
 {
     unsigned int optval = 0, optlen;
-    
+
     optlen = sizeof(optval);
     getsockopt(s, SOL_SOCKET, SO_ERROR, (void *) &optval, &optlen);
     return optval ? sock_get_error(optval) : 0;
@@ -729,9 +729,9 @@
     if (sock->mask)
         sock->state |= FD_WINE_NONBLOCKING;
 
-    /* if a network event is pending, signal the event object 
+    /* if a network event is pending, signal the event object
        it is possible that FD_CONNECT or FD_ACCEPT network events has happened
-       before a WSAEventSelect() was done on it. 
+       before a WSAEventSelect() was done on it.
        (when dealing with Asynchronous socket)  */
     if (sock->pmask & sock->mask) sock_wake_up( sock, pollev );
 
diff --git a/tools/bin2res.c b/tools/bin2res.c
index e88e496..49441ad 100644
--- a/tools/bin2res.c
+++ b/tools/bin2res.c
@@ -95,7 +95,7 @@
 	     {
 	       usage();
 	     }
-	     
+
 	   }
 	   else if ( argv[i][1] == 'f')
 	   {
@@ -105,7 +105,7 @@
 	   {
 	     usage();
 	   }
-	 } 
+	 }
 	 if( i == argc - 1 )
 	 {
 	   g_lpstrInputFile = argv[i];
@@ -123,7 +123,7 @@
 	struct stat	st;
 	LPBYTE p_in_file = NULL;
 
-	if( (fd = open( infile, O_RDONLY))==-1 ) 
+	if( (fd = open( infile, O_RDONLY))==-1 )
 	{
 	  fprintf(stderr, errorOpenFile );
 	  exit(1);
@@ -205,10 +205,10 @@
         strcat( tmpfile, "-tmp" );
         /* FIXME: should use better tmp name and create with O_EXCL */
 	if( (ftemp = fopen( tmpfile, "w")) == NULL ) goto error_open_file;
-	
+
 	if( (fin = fopen( g_lpstrInputFile, "r")) == NULL || stat(g_lpstrInputFile, &st)) goto error_open_file;
 	tinput = st.st_ctime;
-	
+
 	while ( NULL != fgets(buffer, 255, fin))
 	{
 	  fputs(buffer, ftemp);
@@ -221,7 +221,7 @@
 	    while ( pos[len] != ' ') len++;
 	    strncpy(infile, pos, len);
 	    infile[len]=0;
-	    
+
 	    if ( (!stat(infile, &st) && st.st_ctime > tinput) || b_force_overwrite)
 	    {
 	      /* write a output file */
@@ -239,7 +239,7 @@
 	    }
 	  }
 	}
-	
+
         fclose(fin);
 	fclose(ftemp);
 	if (rename(tmpfile, g_lpstrInputFile) == -1)
@@ -248,13 +248,13 @@
             unlink(tmpfile);
             return 0;
         }
-	return 1;	
+	return 1;
 
 error_open_file:
 	fprintf(stderr, errorOpenFile );
 	return 0;
 
-error_rc_format:	
+error_rc_format:
 	fprintf(stderr, errorRCFormat, line);
 	return 0;
 }
@@ -270,10 +270,10 @@
 	struct stat	st;
 	int line = 0;
 	time_t	tinput;
-		
+
 	if( (fin = fopen( g_lpstrInputFile, "r")) == NULL || stat(g_lpstrInputFile, &st)) goto error_open_file;
 	tinput = st.st_ctime;
-	
+
 	while ( NULL != fgets(buffer, 255, fin))
 	{
 	  line++;
@@ -285,7 +285,7 @@
 	    while ( pos[len] != ' ') len++;
 	    strncpy(outfile, pos, len);
 	    outfile[len]=0;
-	    
+
 	    if ( stat(outfile, &st) || st.st_ctime < tinput || b_force_overwrite)
 	    {
 	      /* write a output file */
@@ -312,7 +312,7 @@
 	          if ( ! isxdigit(buffer[index])) goto error_rc_format;
 		  index += sscanf(&buffer[index], "%02x", &byte);
 		  fputc(byte, fout);
-	        }  
+	        }
 	      }
 	      fclose(fout);
 	    }
@@ -323,15 +323,15 @@
 end_of_resource: ;
 	  }
 	}
-	
+
         fclose(fin);
-	return 1;	
+	return 1;
 
 error_open_file:
 	fprintf(stderr, errorOpenFile );
 	return 0;
 
-error_rc_format:	
+error_rc_format:
 	fprintf(stderr, errorRCFormat, line);
 	return 0;
 }
diff --git a/tools/fnt2bdf.c b/tools/fnt2bdf.c
index a7571cc..c0a855e 100644
--- a/tools/fnt2bdf.c
+++ b/tools/fnt2bdf.c
@@ -78,15 +78,15 @@
 int   ret_val = 0;
 
     switch(dtype) {
-        case (dfChar): 
+        case (dfChar):
             ret_val = (int) *(unsigned char *)pChr;
             break;
-            
-        case(dfShort): 
+
+        case(dfShort):
             ret_val = *(unsigned char *)pChr;
             ret_val += (*((unsigned char *)pChr + 1) << 8);
             break;
-            
+
         case(dfLong): {
             int  i;
 
@@ -97,7 +97,7 @@
             }
 		case(dfString):
 			break;
-        } 
+        }
     return ret_val;
 }
 
@@ -108,7 +108,7 @@
 
   if( !g_lpstrFileName )
   {
-    if( !l_nameoffset || 
+    if( !l_nameoffset ||
          l_nameoffset > return_data_value(dfLong, &cpe_font_struct->hdr.dfSize) + 1 )
          return ERROR_DATA;
     lpChar =  (char*)(file_buffer + l_nameoffset);
@@ -117,7 +117,7 @@
 
   strcpy( name, lpChar );
 
-  while( (lpChar = strchr( name, ' ')) ) 
+  while( (lpChar = strchr( name, ' ')) )
          *lpChar = '-';
 
   /* construct a filename from the font typeface, slant, weight, and size */
@@ -136,7 +136,7 @@
 
 int parse_fnt_data(unsigned char* file_buffer, int length)
 {
-  fnt_fontS	cpe_font_struct; 
+  fnt_fontS	cpe_font_struct;
   int     	ic=0, t;
 
   memcpy((char *) &cpe_font_struct.hdr, file_buffer, sizeof(fnt_hdrS));
@@ -149,11 +149,11 @@
   t = return_data_value(dfLong, &cpe_font_struct.hdr.dfSize);
   if( t > length ) return ERROR_SIZE;
   else
-  {    	
+  {
     /* set up the charWidth/charOffset  structure pairs (dfCharTable)... */
 
     int l_fchar = return_data_value(dfChar, &cpe_font_struct.hdr.fi.dfFirstChar),
-	l_lchar = return_data_value(dfChar, &cpe_font_struct.hdr.fi.dfLastChar); 
+	l_lchar = return_data_value(dfChar, &cpe_font_struct.hdr.fi.dfLastChar);
     int l_len   = l_lchar - l_fchar + 1;
     int l_ptr = sizeof(fnt_hdrS);
 
@@ -163,7 +163,7 @@
 
     /* malloc size = (# chars) * sizeof(WinCharS) */
 
-    if((cpe_font_struct.dfCharTable = (WinCharS *) calloc(sizeof(WinCharS), l_len)) == NULL) 
+    if((cpe_font_struct.dfCharTable = (WinCharS *) calloc(sizeof(WinCharS), l_len)) == NULL)
 	return ERROR_MEMORY;
 
     /* NOW, convert them all to UNIX (lton) notation... */
@@ -174,12 +174,12 @@
 
 
 	if( return_data_value(dfShort, &cpe_font_struct.hdr.dfVersion) == 0x200) {
-	    cpe_font_struct.dfCharTable[ic].charOffset = 
+	    cpe_font_struct.dfCharTable[ic].charOffset =
 			return_data_value(dfShort, &file_buffer[l_ptr]);
 	    l_ptr += 2;	/* bump by sizeof(long) */
 	    }
 	else { 	/*  Windows Version 3.0 type font */
-	    cpe_font_struct.dfCharTable[ic].charOffset = 
+	    cpe_font_struct.dfCharTable[ic].charOffset =
 			return_data_value(dfLong, &file_buffer[l_ptr]);
 	    l_ptr += 4;	/* bump by sizeof(long) */
 	    }
@@ -194,18 +194,18 @@
 {
   FILE*   fp;
   int	  ic;
-  int	  l_fchar = return_data_value(dfChar, &cpe_font_struct->hdr.fi.dfFirstChar), 
-	  l_lchar = return_data_value(dfChar, &cpe_font_struct->hdr.fi.dfLastChar); 
+  int	  l_fchar = return_data_value(dfChar, &cpe_font_struct->hdr.fi.dfFirstChar),
+	  l_lchar = return_data_value(dfChar, &cpe_font_struct->hdr.fi.dfLastChar);
 
   int     l_len = l_lchar-l_fchar + 1,
-	  l_hgt = return_data_value(dfChar, &cpe_font_struct->hdr.fi.dfPixHeight); 
+	  l_hgt = return_data_value(dfChar, &cpe_font_struct->hdr.fi.dfPixHeight);
   int	  l_ascent = return_data_value(dfShort, &cpe_font_struct->hdr.fi.dfAscent);
   char    l_filename[256];
 
     if( (ic = make_bdf_filename(l_filename, cpe_font_struct, file_buffer)) )
 	return ic;
 
-    if((fp = fopen(l_filename, "w")) == (FILE *) 0)   
+    if((fp = fopen(l_filename, "w")) == (FILE *) 0)
     {
       fprintf(stderr, "Couldn't open \"%s\" for output.\n", l_filename);
       return ERROR_FILE;
@@ -220,19 +220,19 @@
 	int rowidx, l_span,		/* how many char-cols wide is char? */
 	    l_idx = cpe_font_struct->dfCharTable[ic].charOffset;
 
-	l_span = (int) (cpe_font_struct->dfCharTable[ic].charWidth-1)/8; 
+	l_span = (int) (cpe_font_struct->dfCharTable[ic].charWidth-1)/8;
 
 	fprintf(fp, "STARTCHAR %d  \n", ic);
 	fprintf(fp, "ENCODING %d\n",   l_fchar);
-	fprintf(fp, "SWIDTH    %d    %d \n", 
-		cpe_font_struct->dfCharTable[ic].charWidth*1000, 
+	fprintf(fp, "SWIDTH    %d    %d \n",
+		cpe_font_struct->dfCharTable[ic].charWidth*1000,
 		0);
 
-	fprintf(fp, "DWIDTH    %d    %d \n", 
+	fprintf(fp, "DWIDTH    %d    %d \n",
 		cpe_font_struct->dfCharTable[ic].charWidth, 0);
 
 	fprintf(fp, "BBX  %d  %d  %d   %d\n",
-		cpe_font_struct->dfCharTable[ic].charWidth, l_hgt, 0, 
+		cpe_font_struct->dfCharTable[ic].charWidth, l_hgt, 0,
 		l_ascent - l_hgt);
 
 	fprintf(fp, "BITMAP\n");
@@ -243,10 +243,10 @@
 		    fprintf(fp, "%02X\n", (int) file_buffer[l_idx+rowidx]);
 		    break;
 		    }
-		
+
 		case(1):	/* 8-15 pixels wide font */
 		    {
-		    fprintf(fp, "%02X%02X", 
+		    fprintf(fp, "%02X%02X",
 			(int) file_buffer[l_idx+rowidx], file_buffer[l_idx+l_hgt+rowidx]);
 		    fprintf(fp, "\n");
 		    break;
@@ -254,7 +254,7 @@
 
 		case(2):	/* 16-23 pixels wide font */
 		    {
-		    fprintf(fp, "%02X%02X%02X", 
+		    fprintf(fp, "%02X%02X%02X",
 			file_buffer[l_idx+rowidx],
 		        file_buffer[l_idx+l_hgt+rowidx],
 		        file_buffer[l_idx+(2*l_hgt)+rowidx]);
@@ -264,7 +264,7 @@
 
 		case(3):	/* 24-31 pixels wide font */
 		    {
-		    fprintf(fp, "%02X%02X%02X%02X", 
+		    fprintf(fp, "%02X%02X%02X%02X",
 			file_buffer[l_idx+rowidx],
 			file_buffer[l_idx+l_hgt+rowidx],
 			file_buffer[l_idx+(2*l_hgt)+rowidx],
@@ -301,7 +301,7 @@
 
 int dump_bdf_hdr(FILE* fs, fnt_fontS* cpe_font_struct, unsigned char* file_buffer)
 {
-int	l_fchar = return_data_value(dfChar, &cpe_font_struct->hdr.fi.dfFirstChar), 
+int	l_fchar = return_data_value(dfChar, &cpe_font_struct->hdr.fi.dfFirstChar),
 	l_lchar = return_data_value(dfChar, &cpe_font_struct->hdr.fi.dfLastChar);
 int     l_len = l_lchar - l_fchar + 1;
 long	l_nameoffset = return_data_value(dfLong, &cpe_font_struct->hdr.fi.dfFace);
@@ -312,14 +312,14 @@
 
     /* Compose font name */
 
-    if( l_nameoffset && 
+    if( l_nameoffset &&
 	l_nameoffset < return_data_value(dfLong, &cpe_font_struct->hdr.dfSize) )
     {
       int     dpi, point_size;
       char*   lpFace = (char*)(file_buffer + l_nameoffset), *lpChar;
       short   tmWeight = return_data_value(dfShort, &cpe_font_struct->hdr.fi.dfWeight);
 
-      while((lpChar = strchr(lpFace, '-')) ) 
+      while((lpChar = strchr(lpFace, '-')) )
 	    *lpChar = ' ';
 
       fprintf(fs, "FONT -windows-%s-", lpFace );
@@ -351,7 +351,7 @@
       point_size = 10 * return_data_value(dfShort, &cpe_font_struct->hdr.fi.dfPoints );
       dpi = (l_cellheight * 720) / point_size;
 
-      fprintf(fs, "%d-%d-%d-%d-",l_cellheight, point_size, 
+      fprintf(fs, "%d-%d-%d-%d-",l_cellheight, point_size,
             return_data_value (dfShort, &cpe_font_struct->hdr.fi.dfHorizRes),
             return_data_value (dfShort, &cpe_font_struct->hdr.fi.dfVertRes));
 
@@ -359,7 +359,7 @@
 
       if( return_data_value(dfShort, &cpe_font_struct->hdr.fi.dfPixWidth) ) fputs("c-", fs);
       else fputs("p-", fs);
-	
+
       /* average width */
 
       fprintf( fs, "%d-", 10 * return_data_value(dfShort, &cpe_font_struct->hdr.fi.dfAvgWidth) );
@@ -379,20 +379,20 @@
 	case ARABIC_CHARSET: 	fputs("microsoft-cp1256\n", fs); break;
 	case BALTIC_CHARSET: 	fputs("microsoft-cp1257\n", fs); break;
 	case RUSSIAN_CHARSET: 	fputs("microsoft-cp1251\n", fs); break;
-	case EE_CHARSET: 	fputs("microsoft-cp1250\n", fs); break; 
+	case EE_CHARSET: 	fputs("microsoft-cp1250\n", fs); break;
 	case SYMBOL_CHARSET: 	fputs("microsoft-symbol\n", fs); break;
 	case SHIFTJIS_CHARSET: 	fputs("jisx0208.1983-0\n", fs); break;
 	case DEFAULT_CHARSET:	fputs("iso8859-1\n", fs); break;
 
 	default:
-	case OEM_CHARSET: 
-		    fputs("Undefined charset, use -c option.\n", stderr); 
-		    return ERROR_DATA; 
+	case OEM_CHARSET:
+		    fputs("Undefined charset, use -c option.\n", stderr);
+		    return ERROR_DATA;
       }
     }
     else return ERROR_DATA;
 
-    fprintf(fs, "SIZE  %d  %d   %d\n",  
+    fprintf(fs, "SIZE  %d  %d   %d\n",
         return_data_value(dfShort, &cpe_font_struct->hdr.fi.dfPoints ),
 	return_data_value(dfShort, &cpe_font_struct->hdr.fi.dfHorizRes),
 	return_data_value(dfShort, &cpe_font_struct->hdr.fi.dfVertRes));   /* dfVertRes[2] */
@@ -439,10 +439,10 @@
 	   if( argv[i][0] != '-' ||
 	       strlen(argv[i]) != 2 ) break;
 
-	   if( argv[i][1] == 'c' ) 
+	   if( argv[i][1] == 'c' )
 	       g_lpstrCharSet = argv[i+1];
-	   else 
-	   if( argv[i][1] == 'f' ) 
+	   else
+	   if( argv[i][1] == 'f' )
 	       g_lpstrFileName = argv[i+1];
 	   else
 	   if( argv[i][1] == 't' )
@@ -454,7 +454,7 @@
 	   usage();
 
 	   i++;
-	 } 
+	 }
 	 if( i == argc - 1 )
 	 {
 	   g_lpstrInputFile = argv[i];
@@ -462,7 +462,7 @@
 	 }
     default: usage();
   }
-    
+
 }
 
 /* read file data and return file type */
@@ -476,7 +476,7 @@
 
   lseek( fd, 0, SEEK_SET );
 
-  if( read(fd, &mz_header, sizeof(mz_header)) != sizeof(mz_header) ) 
+  if( read(fd, &mz_header, sizeof(mz_header)) != sizeof(mz_header) )
       return FILE_ERROR;
 
   s = return_data_value(dfShort, &mz_header.e_magic);
@@ -494,7 +494,7 @@
     if( s == IMAGE_NT_SIGNATURE)
     {
        fprintf( stderr, "Do not know how to handle 32-bit Windows DLLs.\n");
-       return FILE_ERROR; 
+       return FILE_ERROR;
     }
     else if ( s != IMAGE_OS2_SIGNATURE) return FILE_ERROR;
 
@@ -515,7 +515,7 @@
 
     if( size != fsize ) return FILE_ERROR;
     offset  = 0;
-    retval = FILE_FNT; 
+    retval = FILE_FNT;
   }
   else return FILE_ERROR;
 
@@ -540,7 +540,7 @@
 
   parse_options( argc, argv);
 
-  if( (fd = open( g_lpstrInputFile, O_RDONLY)) ) 
+  if( (fd = open( g_lpstrInputFile, O_RDONLY)) )
   {
     int    i;
     struct stat file_stat;
@@ -557,7 +557,7 @@
 	       NE_TYPEINFO* pTInfo = (NE_TYPEINFO*)(lpdata + 2);
 	       NE_NAMEINFO* pFontStorage = NULL;
 
-	       while( (i = return_data_value(dfShort, &pTInfo->type_id)) ) 
+	       while( (i = return_data_value(dfShort, &pTInfo->type_id)) )
 	       {
 		  j = return_data_value(dfShort, &pTInfo->count);
 		  if( i == NE_RSCTYPE_FONT )
@@ -580,7 +580,7 @@
 		 {
 		    length = return_data_value(dfShort, &pFontStorage->length) << size_shift;
 		    offset = return_data_value(dfShort, &pFontStorage->offset) << size_shift;
-		    
+
 		    if( !(lpfont = (unsigned char*) realloc( lpfont, length )) )
 		    {
 			fprintf(stderr, errorMemory );
diff --git a/tools/fnt2bdf.h b/tools/fnt2bdf.h
index 43bdebe..e8a1ea2 100644
--- a/tools/fnt2bdf.h
+++ b/tools/fnt2bdf.h
@@ -28,7 +28,7 @@
 #define ERROR_MEMORY	4
 #define ERROR_FILE	5
 
-typedef struct tagFontHeader 
+typedef struct tagFontHeader
 {
     short dfVersion;		/* Version */
     long dfSize;		/* Total File Size */
@@ -41,7 +41,7 @@
     unsigned int charWidth;
     long charOffset;
 } WinCharS;
- 
+
 typedef struct fntFontStruct
 {
     fnt_hdrS 	 	hdr;
diff --git a/tools/winebuild/import.c b/tools/winebuild/import.c
index b9795ed..5b21bec 100644
--- a/tools/winebuild/import.c
+++ b/tools/winebuild/import.c
@@ -600,8 +600,8 @@
     }
     fprintf( outfile, "  }\n};\n\n" );
 
-    /* check if there's some stub defined. if so, exception struct 
-     *  is already defined, so don't emit it twice 
+    /* check if there's some stub defined. if so, exception struct
+     *  is already defined, so don't emit it twice
      */
     for (i = 0; i < nb_entry_points; i++) if (EntryPoints[i]->type == TYPE_STUB) break;
 
diff --git a/tools/winebuild/main.c b/tools/winebuild/main.c
index 802af1f..346be12 100644
--- a/tools/winebuild/main.c
+++ b/tools/winebuild/main.c
@@ -160,7 +160,7 @@
 
 static void do_output( const char *arg )
 {
-    if ( ( unlink ( arg ) ) == -1 && ( errno != ENOENT ) ) 
+    if ( ( unlink ( arg ) ) == -1 && ( errno != ENOENT ) )
     {
         fprintf ( stderr, "Unable to create output file '%s'\n", arg );
         exit (1);
diff --git a/tools/winebuild/parser.c b/tools/winebuild/parser.c
index af91c3d..27c0106 100644
--- a/tools/winebuild/parser.c
+++ b/tools/winebuild/parser.c
@@ -163,7 +163,7 @@
     n_values = 0;
     value_array_size = 25;
     value_array = xmalloc(sizeof(*value_array) * value_array_size);
-    
+
     for (;;)
     {
         token = GetToken(0);
@@ -174,10 +174,10 @@
 	if (n_values == value_array_size)
 	{
 	    value_array_size += 25;
-	    value_array = xrealloc(value_array, 
+	    value_array = xrealloc(value_array,
 				   sizeof(*value_array) * value_array_size);
 	}
-	
+
 	if (endptr == NULL || *endptr != '\0')
 	    fatal_error( "Expected number value, got '%s'\n", token );
     }
diff --git a/tools/winebuild/relay.c b/tools/winebuild/relay.c
index 6332543..582e54a 100644
--- a/tools/winebuild/relay.c
+++ b/tools/winebuild/relay.c
@@ -62,18 +62,18 @@
  *
  * These routines are intended to be called via a far call (with 32-bit
  * operand size) from 16-bit code.  The 16-bit code stub must push %bp,
- * the 32-bit entry point to be called, and the argument conversion 
- * routine to be used (see stack layout below).  
+ * the 32-bit entry point to be called, and the argument conversion
+ * routine to be used (see stack layout below).
  *
  * The core routine completes the STACK16FRAME on the 16-bit stack and
- * switches to the 32-bit stack.  Then, the argument conversion routine 
- * is called; it gets passed the 32-bit entry point and a pointer to the 
- * 16-bit arguments (on the 16-bit stack) as parameters. (You can either 
- * use conversion routines automatically generated by BuildCallFrom16, 
+ * switches to the 32-bit stack.  Then, the argument conversion routine
+ * is called; it gets passed the 32-bit entry point and a pointer to the
+ * 16-bit arguments (on the 16-bit stack) as parameters. (You can either
+ * use conversion routines automatically generated by BuildCallFrom16,
  * or write your own for special purposes.)
- * 
+ *
  * The conversion routine must call the 32-bit entry point, passing it
- * the converted arguments, and return its return value to the core.  
+ * the converted arguments, and return its return value to the core.
  * After the conversion routine has returned, the core switches back
  * to the 16-bit stack, converts the return value to the DX:AX format
  * (CallFrom16Long), and returns to the 16-bit call stub.  All parameters,
@@ -84,13 +84,13 @@
  *
  * In the case of a 'register' function, CallFrom16Register fills a
  * CONTEXT86 structure with the values all registers had at the point
- * the first instruction of the 16-bit call stub was about to be 
- * executed.  A pointer to this CONTEXT86 is passed as third parameter 
+ * the first instruction of the 16-bit call stub was about to be
+ * executed.  A pointer to this CONTEXT86 is passed as third parameter
  * to the argument conversion routine, which typically passes it on
  * to the called 32-bit entry point.
  *
- * CallFrom16Thunk is a special variant used by the implementation of 
- * the Win95 16->32 thunk functions C16ThkSL and C16ThkSL01 and is 
+ * CallFrom16Thunk is a special variant used by the implementation of
+ * the Win95 16->32 thunk functions C16ThkSL and C16ThkSL01 and is
  * implemented as follows:
  * On entry, the EBX register is set up to contain a flat pointer to the
  * 16-bit stack such that EBX+22 points to the first argument.
@@ -261,7 +261,7 @@
     {
         fprintf( outfile, "\tsubl $%d, %%esp\n", sizeof(CONTEXT86) );
 
-        fprintf( outfile, "\tmovl %%ecx, %d(%%esp)\n", CONTEXTOFFSET(EFlags) );  
+        fprintf( outfile, "\tmovl %%ecx, %d(%%esp)\n", CONTEXTOFFSET(EFlags) );
 
         fprintf( outfile, "\tmovl %%eax, %d(%%esp)\n", CONTEXTOFFSET(Eax) );
         fprintf( outfile, "\tmovl %%ebx, %d(%%esp)\n", CONTEXTOFFSET(Ebx) );
@@ -413,7 +413,7 @@
         fprintf( outfile, "\tmovl %d(%%ebx), %%edx\n", CONTEXTOFFSET(Edx) );
         fprintf( outfile, "\tmovl %d(%%ebx), %%ecx\n", CONTEXTOFFSET(Ecx) );
         fprintf( outfile, "\tmovl %d(%%ebx), %%ebx\n", CONTEXTOFFSET(Ebx) );
-  
+
         fprintf( outfile, "\tpopl %%ds\n" );
         fprintf( outfile, "\tpopfl\n" );
         fprintf( outfile, "\tlret\n" );
@@ -443,7 +443,7 @@
         fprintf( outfile, "\tlret $12\n" );
     }
 }
-  
+
 
 /*******************************************************************
  *         BuildCallTo16Core
@@ -455,18 +455,18 @@
  *   extern void WINAPI wine_call_to_16_regs_short( const CONTEXT86 *context, int nb_args );
  *   extern void WINAPI wine_call_to_16_regs_long ( const CONTEXT86 *context, int nb_args );
  *
- * These routines can be called directly from 32-bit code. 
+ * These routines can be called directly from 32-bit code.
  *
- * All routines expect that the 16-bit stack contents (arguments) were 
- * already set up by the caller; nb_args must contain the number of bytes 
+ * All routines expect that the 16-bit stack contents (arguments) were
+ * already set up by the caller; nb_args must contain the number of bytes
  * to be conserved.  The 16-bit SS:SP will be set accordinly.
  *
- * All other registers are either taken from the CONTEXT86 structure 
+ * All other registers are either taken from the CONTEXT86 structure
  * or else set to default values.  The target routine address is either
  * given directly or taken from the CONTEXT86.
  *
- * If you want to call a 16-bit routine taking only standard argument types 
- * (WORD and LONG), you can also have an appropriate argument conversion 
+ * If you want to call a 16-bit routine taking only standard argument types
+ * (WORD and LONG), you can also have an appropriate argument conversion
  * stub automatically generated (see BuildCallTo16); you'd then call this
  * stub, which in turn would prepare the 16-bit stack and call the appropiate
  * core routine.
@@ -556,7 +556,7 @@
     }
     else
     {
-        /* 
+        /*
          * Modify CONTEXT86 structure to contain new values
          *
          * NOTE:  We restore only EAX, EBX, EDX, EDX, EBP, and ESP.
@@ -565,7 +565,7 @@
          *        any case.  [If necessary, we could restore them as well,
          *        at the cost of a somewhat less efficient return path.]
          */
-        
+
         fprintf( outfile, "\tmovl %d(%%esp), %%edi\n", STACK32OFFSET(target)-12 );
         fprintf( outfile, "\tmovl %%eax, %d(%%edi)\n", CONTEXTOFFSET(Eax) );
         fprintf( outfile, "\tmovl %%ebx, %d(%%edi)\n", CONTEXTOFFSET(Ebx) );
@@ -644,13 +644,13 @@
     /* Add the specified offset to the new sp */
     fprintf( outfile, "\tsubw %d(%%edx), %%sp\n", STACK32OFFSET(nb_args) );
 
-    /* Push the return address 
+    /* Push the return address
      * With sreg suffix, we push 16:16 address (normal lret)
      * With lreg suffix, we push 16:32 address (0x66 lret, for KERNEL32_45)
      */
     if (reg_func != 2)
         fprintf( outfile, "\tpushl %%ecx\n" );
-    else 
+    else
     {
         fprintf( outfile, "\tshldl $16, %%ecx, %%eax\n" );
         fprintf( outfile, "\tpushw $0\n" );
@@ -711,7 +711,7 @@
  */
 static void BuildRet16Func( FILE *outfile )
 {
-    /* 
+    /*
      *  Note: This must reside in the .data section to allow
      *        run-time relocation of the SYSLEVEL_Win16CurrentTeb symbol
      */
@@ -764,7 +764,7 @@
  * Call a CBClient relay stub from 32-bit code (KERNEL.620).
  *
  * Since the relay stub is itself 32-bit, this should not be a problem;
- * unfortunately, the relay stubs are expected to switch back to a 
+ * unfortunately, the relay stubs are expected to switch back to a
  * 16-bit stack (and 16-bit code) after completion :-(
  *
  * This would conflict with our 16- vs. 32-bit stack handling, so
@@ -793,7 +793,7 @@
  * The 32-bit side glue code accesses both the original arguments (via ebp)
  * and the temporary copies prepared by the 16-bit side glue (via ebx).
  * After completion, the stub will load ss:sp from the buffer at ebx
- * and perform a far return to 16-bit code.  
+ * and perform a far return to 16-bit code.
  *
  * To trick the relay stub into returning to us, we replace the 16-bit
  * return address to the glue code by a cs:ip pair pointing to our
@@ -831,11 +831,11 @@
  *     (ebx+0)  16-bit sp  (points to ebx+4)
  *
  * Note that we ensure that DS is not changed and remains the flat segment,
- * and the 32-bit stack pointer our own return stub needs fits just 
+ * and the 32-bit stack pointer our own return stub needs fits just
  * perfectly into the 8 bytes that are skipped by the Windows stub.
  * One problem is that we have to determine the number of removed arguments,
- * as these have to be really removed in KERNEL.621. Thus, the BP value 
- * that we place in the temporary area to be restored, contains the value 
+ * as these have to be really removed in KERNEL.621. Thus, the BP value
+ * that we place in the temporary area to be restored, contains the value
  * that SP would have if no arguments were removed. By comparing the actual
  * value of SP with this value in our return stub we can compute the number
  * of removed arguments. This is then returned to KERNEL.621.
@@ -872,7 +872,7 @@
     /* Get the 16-bit stack */
 
     fprintf( outfile, "\t.byte 0x64\n\tmovl (%d),%%ebx\n", STACKOFFSET);
-    
+
     /* Convert it to a flat address */
 
     fprintf( outfile, "\tshldl $16,%%ebx,%%eax\n" );
diff --git a/tools/winebuild/spec16.c b/tools/winebuild/spec16.c
index f14ea40..773c2c8 100644
--- a/tools/winebuild/spec16.c
+++ b/tools/winebuild/spec16.c
@@ -288,34 +288,34 @@
 /*******************************************************************
  *         BuildCallFrom16Func
  *
- * Build a 16-bit-to-Wine callback glue function. 
+ * Build a 16-bit-to-Wine callback glue function.
  *
- * The generated routines are intended to be used as argument conversion 
+ * The generated routines are intended to be used as argument conversion
  * routines to be called by the CallFrom16... core. Thus, the prototypes of
  * the generated routines are (see also CallFrom16):
  *
  *  extern WORD WINAPI PREFIX_CallFrom16_C_word_xxx( FARPROC func, LPBYTE args );
  *  extern LONG WINAPI PREFIX_CallFrom16_C_long_xxx( FARPROC func, LPBYTE args );
- *  extern void WINAPI PREFIX_CallFrom16_C_regs_xxx( FARPROC func, LPBYTE args, 
+ *  extern void WINAPI PREFIX_CallFrom16_C_regs_xxx( FARPROC func, LPBYTE args,
  *                                                   CONTEXT86 *context );
- *  extern void WINAPI PREFIX_CallFrom16_C_intr_xxx( FARPROC func, LPBYTE args, 
+ *  extern void WINAPI PREFIX_CallFrom16_C_intr_xxx( FARPROC func, LPBYTE args,
  *                                                   CONTEXT86 *context );
  *
- * where 'C' is the calling convention ('p' for pascal or 'c' for cdecl), 
- * and each 'x' is an argument  ('w'=word, 's'=signed word, 'l'=long, 
+ * where 'C' is the calling convention ('p' for pascal or 'c' for cdecl),
+ * and each 'x' is an argument  ('w'=word, 's'=signed word, 'l'=long,
  * 'p'=linear pointer, 't'=linear pointer to null-terminated string,
  * 'T'=segmented pointer to null-terminated string).
  *
  * The generated routines fetch the arguments from the 16-bit stack (pointed
- * to by 'args'); the offsets of the single argument values are computed 
+ * to by 'args'); the offsets of the single argument values are computed
  * according to the calling convention and the argument types.  Then, the
  * 32-bit entry point is called with these arguments.
- * 
+ *
  * For register functions, the arguments (if present) are converted just
- * the same as for normal functions, but in addition the CONTEXT86 pointer 
+ * the same as for normal functions, but in addition the CONTEXT86 pointer
  * filled with the current register values is passed to the 32-bit routine.
- * (An 'intr' interrupt handler routine is treated exactly like a register 
- * routine, except that upon return, the flags word pushed onto the stack 
+ * (An 'intr' interrupt handler routine is treated exactly like a register
+ * routine, except that upon return, the flags word pushed onto the stack
  * by the interrupt is removed by the 16-bit call stub.)
  *
  */
@@ -435,18 +435,18 @@
 /*******************************************************************
  *         BuildCallTo16Func
  *
- * Build a Wine-to-16-bit callback glue function. 
+ * Build a Wine-to-16-bit callback glue function.
  *
  * Prototypes for the CallTo16 functions:
  *   extern WORD CALLBACK PREFIX_CallTo16_word_xxx( FARPROC16 func, args... );
  *   extern LONG CALLBACK PREFIX_CallTo16_long_xxx( FARPROC16 func, args... );
- * 
+ *
  * These routines are provided solely for convenience; they simply
  * write the arguments onto the 16-bit stack, and call the appropriate
  * wine_call_to_16... core routine.
  *
  * If you have more sophisticated argument conversion requirements than
- * are provided by these routines, you might as well call the core 
+ * are provided by these routines, you might as well call the core
  * routines by yourself.
  *
  */
diff --git a/tools/winebuild/utils.c b/tools/winebuild/utils.c
index 7e4bb4f..68b6e31 100644
--- a/tools/winebuild/utils.c
+++ b/tools/winebuild/utils.c
@@ -191,15 +191,15 @@
  * provides other directives that work consistantly across
  * architectures, but of course we want to work on all arches with or
  * without gas.  Hence this function.
- * 
+ *
  *
  *  Parameters:
  *                alignBoundary  --  the number of bytes to align to.
- *                                   If we're on an architecture where 
+ *                                   If we're on an architecture where
  *                                   the assembler requires a 'number
  *                                   of low-order zero bits' as a
  *                                   .align argument, then this number
- *                                   must be a power of 2.  
+ *                                   must be a power of 2.
  *
  */
 int get_alignment(int alignBoundary)
diff --git a/tools/winedump/cvinclude.h b/tools/winedump/cvinclude.h
index 2c9deda..a0420ef 100644
--- a/tools/winedump/cvinclude.h
+++ b/tools/winedump/cvinclude.h
@@ -44,13 +44,13 @@
  * CodeView headers
  */
 
-typedef struct OMFSignature 
+typedef struct OMFSignature
 {
     char        Signature[4];
     long        filepos;
 } OMFSignature;
 
-typedef struct OMFDirHeader 
+typedef struct OMFDirHeader
 {
     unsigned short  cbDirHeader;
     unsigned short  cbDirEntry;
@@ -59,7 +59,7 @@
     unsigned long   flags;
 } OMFDirHeader;
 
-typedef struct OMFDirEntry 
+typedef struct OMFDirEntry
 {
     unsigned short  SubSection;
     unsigned short  iMod;
@@ -72,7 +72,7 @@
  * sstModule subsection
  */
 
-typedef struct OMFSegDesc 
+typedef struct OMFSegDesc
 {
     unsigned short  Seg;
     unsigned short  pad;
@@ -84,7 +84,7 @@
  * struct out to a file.  If we write the whole struct out, we'll end up
  * with (*OMFSegDesc), not (OMFSegDesc).  See OMFModuleFull.
  */
-typedef struct OMFModule 
+typedef struct OMFModule
 {
     unsigned short  ovlNumber;
     unsigned short  iLib;
@@ -113,7 +113,7 @@
 
 /* Header for symbol table.
  */
-typedef struct OMFSymHash 
+typedef struct OMFSymHash
 {
     unsigned short  symhash;
     unsigned short  addrhash;
@@ -124,7 +124,7 @@
 
 /* Symbol table entry.
  */
-typedef struct DATASYM32 
+typedef struct DATASYM32
 {
     unsigned short  reclen;
     unsigned short  rectyp;
diff --git a/tools/winedump/debug.c b/tools/winedump/debug.c
index 1f1ddfd..5fa3a41 100644
--- a/tools/winedump/debug.c
+++ b/tools/winedump/debug.c
@@ -57,7 +57,7 @@
 /*
  * Descriptions:
  *
- * (hdr)  IMAGE_SEPARATE_DEBUG_HEADER - .DBG-specific file header; holds info that 
+ * (hdr)  IMAGE_SEPARATE_DEBUG_HEADER - .DBG-specific file header; holds info that
  *        applies to the file as a whole, including # of COFF sections, file offsets, etc.
  * (hdr)  IMAGE_SECTION_HEADER - list of COFF sections copied verbatim from .EXE;
  *        although this directory contains file offsets, these offsets are meaningless
@@ -73,7 +73,7 @@
  * (data) IMAGE_DEBUG_TYPE_CODEVIEW - *** THE GOOD STUFF ***
  *        This block of data contains all the symbol tables, line number info, etc.,
  *        that the Visual C++ debugger needs.
- * (hdr)  OMFDirHeader (CV) - 
+ * (hdr)  OMFDirHeader (CV) -
  * (hdr)  OMFDirEntry (CV) - list of subsections within CodeView debug data section
  */
 
@@ -106,7 +106,7 @@
     printf("    iLib:               %u\n", module->iLib);
     printf("    cSeg:               %u\n", module->cSeg);
     printf("    Style:              %c%c\n", module->Style[0], module->Style[1]);
-    printf("    Name:               %.*s\n", 
+    printf("    Name:               %.*s\n",
 	   *(BYTE*)((char*)(module + 1) + sizeof(OMFSegDesc) * module->cSeg),
 	   (char*)(module + 1) + sizeof(OMFSegDesc) * module->cSeg + 1);
 
@@ -217,7 +217,7 @@
 
     segMapDesc = PRD(Offset(segMap + 1), segMap->cSeg * sizeof(OMFSegDesc));
     if (!segMapDesc) {printf("Can't get SegDescr array, aborting\n");return FALSE;}
-    
+
     for (i = 0; i < segMap->cSeg; i++)
     {
 	printf("    SegDescr #%2d\n", i + 1);
@@ -256,7 +256,7 @@
 
     /* FIXME: check ptr validity */
     sourceModule = (void*)rawdata;
-    printf ("    Module table: Found %d file(s) and %d segment(s)\n", 
+    printf ("    Module table: Found %d file(s) and %d segment(s)\n",
 	    sourceModule->cFile, sourceModule->cSeg);
     for (i = 0; i < sourceModule->cFile; i++)
     {
@@ -265,16 +265,16 @@
     }
 
     /* FIXME: check ptr validity */
-    seg_info_dw = (void*)((char*)(sourceModule + 1) + 
+    seg_info_dw = (void*)((char*)(sourceModule + 1) +
 			  sizeof(unsigned long) * (sourceModule->cFile - 1));
     seg_info_w = (unsigned short*)(&seg_info_dw[sourceModule->cSeg * 2]);
     for (i = 0; i <  sourceModule->cSeg; i++)
     {
 	printf ("      Segment #%2d start = 0x%lx, end = 0x%lx, seg index = %u\n",
-		i + 1, seg_info_dw[i * 2], seg_info_dw[(i * 2) + 1], 
+		i + 1, seg_info_dw[i * 2], seg_info_dw[(i * 2) + 1],
 		seg_info_w[i]);
     }
-    ofs = sizeof(OMFSourceModule) + sizeof(unsigned long) * (sourceModule->cFile - 1) + 
+    ofs = sizeof(OMFSourceModule) + sizeof(unsigned long) * (sourceModule->cFile - 1) +
 	sourceModule->cSeg * (2 * sizeof(unsigned long) + sizeof(unsigned short));
     ofs = (ofs + 3) & ~3;
 
@@ -291,12 +291,12 @@
      */
     /* FIXME: check ptr validity */
     sourceFile = (void*)(rawdata + ofs);
-    seg_info_dw = (void*)((char*)sourceFile + 2 * sizeof(unsigned short) + 
+    seg_info_dw = (void*)((char*)sourceFile + 2 * sizeof(unsigned short) +
 			  sourceFile->cSeg * sizeof(unsigned long));
 
     ofs += 2 * sizeof(unsigned short) + 3 * sourceFile->cSeg * sizeof(unsigned long);
 
-    printf("    File table: %.*s\n", 
+    printf("    File table: %.*s\n",
 	   *(BYTE*)((char*)sourceModule + ofs), (char*)sourceModule + ofs + 1);
 
     for (i = 0; i < sourceFile->cSeg; i++)
@@ -308,21 +308,21 @@
     ofs += *(BYTE*)((char*)sourceModule + ofs) + 1;
     ofs = (ofs + 3) & ~3;
 
-    for (i = 0; i < sourceModule->cSeg; i++) 
+    for (i = 0; i < sourceModule->cSeg; i++)
     {
 	sourceLine = (void*)(rawdata + ofs);
 	seg_info_dw = (void*)((char*)sourceLine + 2 * sizeof(unsigned short));
 	seg_info_w = (void*)(&seg_info_dw[sourceLine->cLnOff]);
-	
+
 	printf ("    Line table #%2d: Found %d line numbers for segment index %d\n",
 		i, sourceLine->cLnOff, sourceLine->Seg);
-	
+
 	for (j = 0; j < sourceLine->cLnOff; j++)
 	{
 	    printf ("      Pair #%2d: offset = [0x%8lx], linenumber = %d\n",
 		    j + 1, seg_info_dw[j], seg_info_w[j]);
 	}
-	ofs += 2 * sizeof(unsigned short) + 
+	ofs += 2 * sizeof(unsigned short) +
 	    sourceLine->cLnOff * (sizeof(unsigned long) + sizeof(unsigned short));
 	ofs = (ofs + 3) & ~3;
     }
@@ -399,7 +399,7 @@
     int modulecount = 0, alignsymcount = 0, srcmodulecount = 0, librariescount = 0;
     int globalsymcount = 0, globalpubcount = 0, globaltypescount = 0;
     int segmapcount = 0, fileindexcount = 0, staticsymcount = 0;
-    
+
     cv_base = PRD(base, len);
     if (!cv_base) {printf("Can't get full debug content, aborting\n");return;}
 
@@ -415,12 +415,12 @@
 	struct {DWORD TimeStamp; DWORD  Dunno; char Name[1];}* pdb_data;
 	pdb_data = (void*)(signature + 1);
 
-	printf("        TimeStamp:            %08lX (%s)\n", 
+	printf("        TimeStamp:            %08lX (%s)\n",
 	       pdb_data->TimeStamp, get_time_str(pdb_data->TimeStamp));
 	printf("        Dunno:                %08lX\n", pdb_data->Dunno);
 	printf("        Filename:             %s\n", pdb_data->Name);
 	return;
-    } 
+    }
 
     if (memcmp(signature->Signature, "NB09", 4) != 0 && memcmp(signature->Signature, "NB11", 4) != 0)
     {
@@ -456,7 +456,7 @@
 	case sstSegMap:		segmapcount++;		break;
 	case sstFileIndex:	fileindexcount++;	break;
 	case sstStaticSym:	staticsymcount++;	break;
-	}	
+	}
     }
 
     /* This one has to be > 0
diff --git a/tools/winedump/main.c b/tools/winedump/main.c
index 07fa8ad..1ec0b50 100644
--- a/tools/winedump/main.c
+++ b/tools/winedump/main.c
@@ -64,7 +64,7 @@
 static void do_dump (const char *arg)
 {
     if (globals.mode != NONE) fatal("Only one mode can be specified\n");
-    globals.mode = DUMP; 
+    globals.mode = DUMP;
     globals.do_code = 1;
 }
 
@@ -253,7 +253,7 @@
 	opt->func (arg);
     else
 	opt->func ("");
-    
+
     ptr++;
   }
 
@@ -364,7 +364,7 @@
 	    output_spec_symbol (&symbol);
 	    output_header_symbol (&symbol);
 	    output_c_symbol (&symbol);
-	    
+
 	    symbol_clear (&symbol);
 	}
 
diff --git a/tools/winedump/msmangle.c b/tools/winedump/msmangle.c
index 283e0b2..8e314c5 100644
--- a/tools/winedump/msmangle.c
+++ b/tools/winedump/msmangle.c
@@ -505,7 +505,7 @@
         /* FIXME: P6 = Function pointer, others who knows.. */
         if (isdigit (*iter))
 	{
-	  if (*iter == '6') 
+	  if (*iter == '6')
 	  {
 	      /* FIXME: there are a tons of memory leaks here */
 	      /* FIXME: this is still broken in some cases and it has to be
@@ -531,7 +531,7 @@
 	      ct->expression = str_create(2, ct->expression, ")");
 	      FREE_CT (sub_ct);
 	  }
-	  else 
+	  else
 	      return NULL;
 	}
 	else
diff --git a/tools/winedump/pe.c b/tools/winedump/pe.c
index 6ad41e4..d5611a9 100644
--- a/tools/winedump/pe.c
+++ b/tools/winedump/pe.c
@@ -46,8 +46,8 @@
 {
     time_t 	t = (time_t)_t;
     static char	buf[128];
-    
-    /* FIXME: I don't get the same values from MS' pedump running under Wine... 
+
+    /* FIXME: I don't get the same values from MS' pedump running under Wine...
      * I wonder if Wine isn't broken wrt to GMT settings...
      */
     strncpy(buf, ctime(&t), sizeof(buf));
@@ -89,26 +89,26 @@
 {
     IMAGE_SECTION_HEADER*	sectHead;
     int				i;
-    
-    sectHead = (IMAGE_SECTION_HEADER*)((char*)nt_headers + sizeof(DWORD) + 
-				       sizeof(IMAGE_FILE_HEADER) + 
+
+    sectHead = (IMAGE_SECTION_HEADER*)((char*)nt_headers + sizeof(DWORD) +
+				       sizeof(IMAGE_FILE_HEADER) +
 				       nt_headers->FileHeader.SizeOfOptionalHeader);
-    
+
     if (rva == 0) return NULL;
-    
+
     for (i = nt_headers->FileHeader.NumberOfSections - 1; i >= 0; i--)
     {
         if (sectHead[i].VirtualAddress <= rva &&
             rva + len <= (DWORD)sectHead[i].VirtualAddress + sectHead[i].SizeOfRawData)
             break;
     }
-    
-    if (i < 0) 
+
+    if (i < 0)
     {
 	printf("rva not found in any section (%lu)\n", rva);
         return NULL;
     }
-    
+
     /* return image import directory offset */
     return PRD(sectHead[i].PointerToRawData + rva - sectHead[i].VirtualAddress, len);
 }
@@ -122,9 +122,9 @@
 }
 
 static const char*	DirectoryNames[16] = {
-    "EXPORT",		"IMPORT",	"RESOURCE", 	"EXCEPTION", 	
-    "SECURITY", 	"BASERELOC", 	"DEBUG", 	"ARCHITECTURE", 
-    "GLOBALPTR", 	"TLS", 		"LOAD_CONFIG",	"Bound IAT", 
+    "EXPORT",		"IMPORT",	"RESOURCE", 	"EXCEPTION",
+    "SECURITY", 	"BASERELOC", 	"DEBUG", 	"ARCHITECTURE",
+    "GLOBALPTR", 	"TLS", 		"LOAD_CONFIG",	"Bound IAT",
     "IAT", 		"Delay IAT",	"COM Descript", ""
 };
 
@@ -134,15 +134,15 @@
     IMAGE_FILE_HEADER		*fileHeader;
     IMAGE_OPTIONAL_HEADER	*optionalHeader;
     unsigned			i;
-    
+
     printf("File Header\n");
     fileHeader = &nt_headers->FileHeader;
-    
-    printf("  Machine:                      %04X (%s)\n", 
+
+    printf("  Machine:                      %04X (%s)\n",
 	   fileHeader->Machine, get_machine_str(fileHeader->Machine));
     printf("  Number of Sections:           %d\n", fileHeader->NumberOfSections);
-    printf("  TimeDateStamp:                %08lX (%s) offset %ld\n", 
-	   fileHeader->TimeDateStamp, get_time_str(fileHeader->TimeDateStamp), 
+    printf("  TimeDateStamp:                %08lX (%s) offset %ld\n",
+	   fileHeader->TimeDateStamp, get_time_str(fileHeader->TimeDateStamp),
 	   Offset(&(fileHeader->TimeDateStamp)));
     printf("  PointerToSymbolTable:         %08lX\n", fileHeader->PointerToSymbolTable);
     printf("  NumberOfSymbols:              %08lX\n", fileHeader->NumberOfSymbols);
@@ -162,42 +162,42 @@
     X(IMAGE_FILE_BYTES_REVERSED_HI, 	"BYTES_REVERSED_HI");
 #undef X
     printf("\n");
-    
+
     /* hope we have the right size */
     printf("Optional Header\n");
     optionalHeader = &nt_headers->OptionalHeader;
-    printf("  Magic                              0x%-4X         %u\n", 
+    printf("  Magic                              0x%-4X         %u\n",
 	   optionalHeader->Magic, optionalHeader->Magic);
-    printf("  linker version                     %u.%02u\n", 
+    printf("  linker version                     %u.%02u\n",
 	   optionalHeader->MajorLinkerVersion, optionalHeader->MinorLinkerVersion);
-    printf("  size of code                       0x%-8lx     %lu\n", 
+    printf("  size of code                       0x%-8lx     %lu\n",
 	   optionalHeader->SizeOfCode, optionalHeader->SizeOfCode);
-    printf("  size of initialized data           0x%-8lx     %lu\n", 
+    printf("  size of initialized data           0x%-8lx     %lu\n",
 	   optionalHeader->SizeOfInitializedData, optionalHeader->SizeOfInitializedData);
-    printf("  size of uninitialized data         0x%-8lx     %lu\n", 
+    printf("  size of uninitialized data         0x%-8lx     %lu\n",
 	   optionalHeader->SizeOfUninitializedData, optionalHeader->SizeOfUninitializedData);
-    printf("  entrypoint RVA                     0x%-8lx     %lu\n", 
+    printf("  entrypoint RVA                     0x%-8lx     %lu\n",
 	   optionalHeader->AddressOfEntryPoint, optionalHeader->AddressOfEntryPoint);
-    printf("  base of code                       0x%-8lx     %lu\n", 
+    printf("  base of code                       0x%-8lx     %lu\n",
 	   optionalHeader->BaseOfCode, optionalHeader->BaseOfCode);
-    printf("  base of data                       0x%-8lX     %lu\n", 
+    printf("  base of data                       0x%-8lX     %lu\n",
 	   optionalHeader->BaseOfData, optionalHeader->BaseOfData);
-    printf("  image base                         0x%-8lX     %lu\n", 
+    printf("  image base                         0x%-8lX     %lu\n",
 	   optionalHeader->ImageBase, optionalHeader->ImageBase);
-    printf("  section align                      0x%-8lx     %lu\n", 
+    printf("  section align                      0x%-8lx     %lu\n",
 	   optionalHeader->SectionAlignment, optionalHeader->SectionAlignment);
-    printf("  file align                         0x%-8lx     %lu\n", 
+    printf("  file align                         0x%-8lx     %lu\n",
 	   optionalHeader->FileAlignment, optionalHeader->FileAlignment);
-    printf("  required OS version                %u.%02u\n", 
+    printf("  required OS version                %u.%02u\n",
 	   optionalHeader->MajorOperatingSystemVersion, optionalHeader->MinorOperatingSystemVersion);
-    printf("  image version                      %u.%02u\n", 
+    printf("  image version                      %u.%02u\n",
 	   optionalHeader->MajorImageVersion, optionalHeader->MinorImageVersion);
-    printf("  subsystem version                  %u.%02u\n", 
+    printf("  subsystem version                  %u.%02u\n",
 	   optionalHeader->MajorSubsystemVersion, optionalHeader->MinorSubsystemVersion);
     printf("  Win32 Version                      0x%lX\n", optionalHeader->Win32VersionValue);
-    printf("  size of image                      0x%-8lx     %lu\n", 
+    printf("  size of image                      0x%-8lx     %lu\n",
 	   optionalHeader->SizeOfImage, optionalHeader->SizeOfImage);
-    printf("  size of headers                    0x%-8lx     %lu\n", 
+    printf("  size of headers                    0x%-8lx     %lu\n",
 	   optionalHeader->SizeOfHeaders, optionalHeader->SizeOfHeaders);
     printf("  checksum                           0x%lX\n", optionalHeader->CheckSum);
     switch (optionalHeader->Subsystem)
@@ -212,25 +212,25 @@
     }
     printf("  Subsystem                          0x%X (%s)\n", optionalHeader->Subsystem, str);
     printf("  DLL flags                          0x%X\n", optionalHeader->DllCharacteristics);
-    printf("  stack reserve size                 0x%-8lx     %lu\n", 
+    printf("  stack reserve size                 0x%-8lx     %lu\n",
 	   optionalHeader->SizeOfStackReserve, optionalHeader->SizeOfStackReserve);
     printf("  stack commit size                  0x%-8lx     %lu\n",
 	   optionalHeader->SizeOfStackCommit, optionalHeader->SizeOfStackCommit);
-    printf("  heap reserve size                  0x%-8lx     %lu\n", 
+    printf("  heap reserve size                  0x%-8lx     %lu\n",
 	   optionalHeader->SizeOfHeapReserve, optionalHeader->SizeOfHeapReserve);
-    printf("  heap commit size                   0x%-8lx     %lu\n", 
+    printf("  heap commit size                   0x%-8lx     %lu\n",
 	   optionalHeader->SizeOfHeapCommit, optionalHeader->SizeOfHeapCommit);
     printf("  loader flags                       0x%lX\n", optionalHeader->LoaderFlags);
     printf("  RVAs & sizes                       0x%lX\n", optionalHeader->NumberOfRvaAndSizes);
     printf("\n");
-    
+
     printf("Data Directory\n");
     printf("%ld\n", optionalHeader->NumberOfRvaAndSizes * sizeof(IMAGE_DATA_DIRECTORY));
-    
+
     for (i = 0; i < optionalHeader->NumberOfRvaAndSizes && i < 16; i++)
     {
-	printf("  %-12s rva: 0x%-8lX  size: %8lu\n", 
-	       DirectoryNames[i], optionalHeader->DataDirectory[i].VirtualAddress, 
+	printf("  %-12s rva: 0x%-8lX  size: %8lu\n",
+	       DirectoryNames[i], optionalHeader->DataDirectory[i].VirtualAddress,
 	       optionalHeader->DataDirectory[i].Size);
     }
     printf("\n");
@@ -240,16 +240,16 @@
 {
     IMAGE_SECTION_HEADER*	sectHead = addr;
     unsigned			i;
-    
+
     printf("Section Table\n");
     for (i = 0; i < num_sect; i++, sectHead++)
     {
-	printf("  %02d %-8s   VirtSize: %-8lu  VirtAddr:  %-8lu 0x%08lx\n", 
-	       i + 1, sectHead->Name, sectHead->Misc.VirtualSize, sectHead->VirtualAddress, 
+	printf("  %02d %-8s   VirtSize: %-8lu  VirtAddr:  %-8lu 0x%08lx\n",
+	       i + 1, sectHead->Name, sectHead->Misc.VirtualSize, sectHead->VirtualAddress,
 	       sectHead->VirtualAddress);
-	printf("    raw data offs: %-8lu raw data size: %-8lu\n", 
+	printf("    raw data offs: %-8lu raw data size: %-8lu\n",
 	       sectHead->PointerToRawData, sectHead->SizeOfRawData);
-	printf("    relocation offs: %-8lu  relocations:   %-8u\n", 
+	printf("    relocation offs: %-8lu  relocations:   %-8u\n",
 	       sectHead->PointerToRelocations, sectHead->NumberOfRelocations);
 	printf("    line # offs:     %-8lu  line #'s:      %-8u\n",
 	       sectHead->PointerToLinenumbers, sectHead->NumberOfLinenumbers);
@@ -262,27 +262,27 @@
 /* #define IMAGE_SCN_TYPE_GROUP			0x00000004 - Reserved */
 /* #define IMAGE_SCN_TYPE_NO_PAD		0x00000008 - Reserved */
 /* #define IMAGE_SCN_TYPE_COPY			0x00000010 - Reserved */
-	
+
 	X(IMAGE_SCN_CNT_CODE, 			"CODE");
 	X(IMAGE_SCN_CNT_INITIALIZED_DATA, 	"INITIALIZED_DATA");
 	X(IMAGE_SCN_CNT_UNINITIALIZED_DATA, 	"UNINITIALIZED_DATA");
-	
+
 	X(IMAGE_SCN_LNK_OTHER, 			"LNK_OTHER");
 	X(IMAGE_SCN_LNK_INFO, 			"LNK_INFO");
 /* #define	IMAGE_SCN_TYPE_OVER		0x00000400 - Reserved */
 	X(IMAGE_SCN_LNK_REMOVE, 		"LNK_REMOVE");
 	X(IMAGE_SCN_LNK_COMDAT, 		"LNK_COMDAT");
-	
+
 /* 						0x00002000 - Reserved */
 /* #define IMAGE_SCN_MEM_PROTECTED 		0x00004000 - Obsolete */
 	X(IMAGE_SCN_MEM_FARDATA, 		"MEM_FARDATA");
-	
+
 /* #define IMAGE_SCN_MEM_SYSHEAP		0x00010000 - Obsolete */
 	X(IMAGE_SCN_MEM_PURGEABLE, 		"MEM_PURGEABLE");
 	X(IMAGE_SCN_MEM_16BIT, 			"MEM_16BIT");
 	X(IMAGE_SCN_MEM_LOCKED, 		"MEM_LOCKED");
 	X(IMAGE_SCN_MEM_PRELOAD, 		"MEM_PRELOAD");
-	
+
 	X(IMAGE_SCN_ALIGN_1BYTES, 		"ALIGN_1BYTES");
 	X(IMAGE_SCN_ALIGN_2BYTES, 		"ALIGN_2BYTES");
 	X(IMAGE_SCN_ALIGN_4BYTES, 		"ALIGN_4BYTES");
@@ -291,9 +291,9 @@
 	X(IMAGE_SCN_ALIGN_32BYTES, 		"ALIGN_32BYTES");
 	X(IMAGE_SCN_ALIGN_64BYTES, 		"ALIGN_64BYTES");
 /* 						0x00800000 - Unused */
-	
+
 	X(IMAGE_SCN_LNK_NRELOC_OVFL, 		"LNK_NRELOC_OVFL");
-	
+
 	X(IMAGE_SCN_MEM_DISCARDABLE, 		"MEM_DISCARDABLE");
 	X(IMAGE_SCN_MEM_NOT_CACHED, 		"MEM_NOT_CACHED");
 	X(IMAGE_SCN_MEM_NOT_PAGED, 		"MEM_NOT_PAGED");
@@ -316,14 +316,14 @@
     WORD*			pOrdl;
     DWORD*			map;
     parsed_symbol		symbol;
-    
+
     if (!exportDir) return;
-    
+
     printf("Exports table:\n");
     printf("\n");
     printf("  Name:            %s\n", (char*)RVA(exportDir->Name, sizeof(DWORD)));
     printf("  Characteristics: %08lx\n", exportDir->Characteristics);
-    printf("  TimeDateStamp:   %08lX %s\n", 
+    printf("  TimeDateStamp:   %08lX %s\n",
 	   exportDir->TimeDateStamp, get_time_str(exportDir->TimeDateStamp));
     printf("  Version:         %u.%02u\n", exportDir->MajorVersion, exportDir->MinorVersion);
     printf("  Ordinal base:    %lu\n", exportDir->Base);
@@ -334,24 +334,24 @@
     printf("Adresses of names: %08lX\n", exportDir->AddressOfNames);
     printf("\n");
     printf("  Entry Pt  Ordn  Name\n");
-    
+
     pFunc = RVA(exportDir->AddressOfFunctions, exportDir->NumberOfFunctions * sizeof(DWORD));
     if (!pFunc) {printf("Can't grab functions' address table\n"); return;}
     pName = RVA(exportDir->AddressOfNames, exportDir->NumberOfNames * sizeof(DWORD));
     if (!pName) {printf("Can't grab functions' name table\n"); return;}
     pOrdl = RVA(exportDir->AddressOfNameOrdinals, exportDir->NumberOfNames * sizeof(WORD));
     if (!pOrdl) {printf("Can't grab functions' ordinal table\n"); return;}
-    
+
     /* bit map of used funcs */
     map = calloc(((exportDir->NumberOfFunctions + 31) & ~31) / 32, sizeof(DWORD));
     if (!map) fatal("no memory");
-    
+
     for (i = 0; i < exportDir->NumberOfNames; i++, pName++, pOrdl++)
     {
 	char*	name;
-	
+
 	map[*pOrdl / 32] |= 1 << (*pOrdl % 32);
-	
+
 	name = (char*)RVA(*pName, sizeof(DWORD));
 	if (name && globals.do_demangle)
 	{
@@ -389,21 +389,21 @@
 {
     IMAGE_IMPORT_DESCRIPTOR	*importDesc = get_dir(IMAGE_FILE_IMPORT_DIRECTORY);
     unsigned			nb_imp, i;
-    
+
     if (!importDesc)	return;
-    nb_imp = nt_headers->OptionalHeader.DataDirectory[IMAGE_FILE_IMPORT_DIRECTORY].Size / 
+    nb_imp = nt_headers->OptionalHeader.DataDirectory[IMAGE_FILE_IMPORT_DIRECTORY].Size /
 	sizeof(*importDesc);
     if (!nb_imp) return;
-    
-    printf("Import Table size: %lu\n", 
+
+    printf("Import Table size: %lu\n",
 	   nt_headers->OptionalHeader.DataDirectory[IMAGE_FILE_IMPORT_DIRECTORY].Size);/* FIXME */
-    
+
     for (i = 0; i < nb_imp - 1; i++) /* the last descr is set as 0 as a sentinel */
     {
 	IMAGE_THUNK_DATA*	il;
 	IMAGE_IMPORT_BY_NAME*	iibn;
-	
-	if (!importDesc->Name || 
+
+	if (!importDesc->Name ||
 	    (importDesc->u.OriginalFirstThunk == NULL && importDesc->FirstThunk == NULL))
 	{
 	    /* FIXME */
@@ -412,32 +412,32 @@
 	}
 	printf("  offset %lu %s\n", Offset(importDesc), (char*)RVA(importDesc->Name, sizeof(DWORD)));
 	printf("  Hint/Name Table: %08lX\n", (DWORD)importDesc->u.OriginalFirstThunk);
-	printf("  TimeDataStamp:   %08lX (%s)\n", 
+	printf("  TimeDataStamp:   %08lX (%s)\n",
 	       importDesc->TimeDateStamp, get_time_str(importDesc->TimeDateStamp));
 	printf("  ForwarderChain:  %08lX\n", importDesc->ForwarderChain);
-	printf("  First thunk RVA: %08lX (delta: %u 0x%x)\n", 
+	printf("  First thunk RVA: %08lX (delta: %u 0x%x)\n",
 	       (DWORD)importDesc->FirstThunk, -1, -1); /* FIXME */
-	
+
 	printf("  Ordn  Name\n");
-	
-	il = (importDesc->u.OriginalFirstThunk != 0) ? 
-	    RVA((DWORD)importDesc->u.OriginalFirstThunk, sizeof(DWORD)) : 
+
+	il = (importDesc->u.OriginalFirstThunk != 0) ?
+	    RVA((DWORD)importDesc->u.OriginalFirstThunk, sizeof(DWORD)) :
 	    RVA((DWORD)importDesc->FirstThunk, sizeof(DWORD));
-	
+
 	if (!il) {printf("Can't grab thunk data, going to next imported DLL\n"); continue;}
-	
+
 	for (; il->u1.Ordinal; il++)
 	{
-	    if (IMAGE_SNAP_BY_ORDINAL(il->u1.Ordinal)) 
+	    if (IMAGE_SNAP_BY_ORDINAL(il->u1.Ordinal))
 	    {
 		printf("  %4lu  <by ordinal>\n", IMAGE_ORDINAL(il->u1.Ordinal));
 	    }
 	    else
 	    {
 		iibn = RVA((DWORD)il->u1.AddressOfData, sizeof(DWORD));
-		if (!il) 
+		if (!il)
 		{
-		    printf("Can't grab import by name info, skipping to next ordinal\n"); 
+		    printf("Can't grab import by name info, skipping to next ordinal\n");
 		}
 		else
 		{
@@ -454,10 +454,10 @@
 static	void	dump_dir_debug_dir(IMAGE_DEBUG_DIRECTORY* idd, int idx)
 {
     const	char*	str;
-    
+
     printf("Directory %02u\n", idx + 1);
     printf("  Characteristics:   %08lX\n", idd->Characteristics);
-    printf("  TimeDateStamp:     %08lX %s\n", 
+    printf("  TimeDateStamp:     %08lX %s\n",
 	   idd->TimeDateStamp, get_time_str(idd->TimeDateStamp));
     printf("  Version            %u.%02u\n", idd->MajorVersion, idd->MinorVersion);
     switch (idd->Type)
@@ -479,24 +479,24 @@
     printf("  SizeOfData:        %lu\n", idd->SizeOfData);
     printf("  AddressOfRawData:  %08lX\n", idd->AddressOfRawData);
     printf("  PointerToRawData:  %08lX\n", idd->PointerToRawData);
-    
+
     switch (idd->Type)
     {
-    case IMAGE_DEBUG_TYPE_UNKNOWN:		
+    case IMAGE_DEBUG_TYPE_UNKNOWN:
 	break;
-    case IMAGE_DEBUG_TYPE_COFF:		
+    case IMAGE_DEBUG_TYPE_COFF:
 	break;
     case IMAGE_DEBUG_TYPE_CODEVIEW:
 	dump_codeview(idd->PointerToRawData, idd->SizeOfData);
 	break;
-    case IMAGE_DEBUG_TYPE_FPO:	
+    case IMAGE_DEBUG_TYPE_FPO:
 	break;
     case IMAGE_DEBUG_TYPE_MISC:
     {
 	IMAGE_DEBUG_MISC* misc = PRD(idd->PointerToRawData, idd->SizeOfData);
 	if (!misc) {printf("Can't get misc debug information\n"); break;}
-	printf("    DataType:          %lu (%s)\n", 
-	       misc->DataType, 
+	printf("    DataType:          %lu (%s)\n",
+	       misc->DataType,
 	       (misc->DataType == IMAGE_DEBUG_MISC_EXENAME) ? "Exe name" : "Unknown");
 	printf("    Length:            %lu\n", misc->Length);
 	printf("    Unicode:           %s\n", misc->Unicode ? "Yes" : "No");
@@ -505,13 +505,13 @@
     break;
     case IMAGE_DEBUG_TYPE_EXCEPTION:
 	break;
-    case IMAGE_DEBUG_TYPE_FIXUP:	
+    case IMAGE_DEBUG_TYPE_FIXUP:
 	break;
     case IMAGE_DEBUG_TYPE_OMAP_TO_SRC:
 	break;
     case IMAGE_DEBUG_TYPE_OMAP_FROM_SRC:
 	break;
-    case IMAGE_DEBUG_TYPE_BORLAND:		
+    case IMAGE_DEBUG_TYPE_BORLAND:
 	break;
     case IMAGE_DEBUG_TYPE_RESERVED10:
 	break;
@@ -523,14 +523,14 @@
 {
     IMAGE_DEBUG_DIRECTORY*	debugDir = get_dir(IMAGE_FILE_DEBUG_DIRECTORY);
     unsigned			nb_dbg, i;
-    
+
     if (!debugDir) return;
-    nb_dbg = nt_headers->OptionalHeader.DataDirectory[IMAGE_FILE_DEBUG_DIRECTORY].Size / 
+    nb_dbg = nt_headers->OptionalHeader.DataDirectory[IMAGE_FILE_DEBUG_DIRECTORY].Size /
 	sizeof(*debugDir);
     if (!nb_dbg) return;
-    
+
     printf("Debug Table (%u directories)\n", nb_dbg);
-    
+
     for (i = 0; i < nb_dbg; i++)
     {
 	dump_dir_debug_dir(debugDir, i);
@@ -545,16 +545,16 @@
     unsigned			nb_dbg;
     unsigned			i;
     IMAGE_DEBUG_DIRECTORY*	debugDir;
-    
+
     if (!separateDebugHead) {printf("Can't grab the separate header, aborting\n"); return;}
-    
-    printf ("Signature:          %.2s (0x%4X)\n", 
+
+    printf ("Signature:          %.2s (0x%4X)\n",
 	    (char*)&separateDebugHead->Signature, separateDebugHead->Signature);
     printf ("Flags:              0x%04X\n", separateDebugHead->Flags);
-    printf ("Machine:            0x%04X (%s)\n", 
+    printf ("Machine:            0x%04X (%s)\n",
 	    separateDebugHead->Machine, get_machine_str(separateDebugHead->Machine));
     printf ("Characteristics:    0x%04X\n", separateDebugHead->Characteristics);
-    printf ("TimeDateStamp:      0x%08lX (%s)\n", 
+    printf ("TimeDateStamp:      0x%08lX (%s)\n",
 	    separateDebugHead->TimeDateStamp, get_time_str(separateDebugHead->TimeDateStamp));
     printf ("CheckSum:           0x%08lX\n", separateDebugHead->CheckSum);
     printf ("ImageBase:          0x%08lX\n", separateDebugHead->ImageBase);
@@ -562,22 +562,22 @@
     printf ("NumberOfSections:   0x%08lX\n", separateDebugHead->NumberOfSections);
     printf ("ExportedNamesSize:  0x%08lX\n", separateDebugHead->ExportedNamesSize);
     printf ("DebugDirectorySize: 0x%08lX\n", separateDebugHead->DebugDirectorySize);
-    
-    if (!PRD(sizeof(IMAGE_SEPARATE_DEBUG_HEADER), 
+
+    if (!PRD(sizeof(IMAGE_SEPARATE_DEBUG_HEADER),
 	     separateDebugHead->NumberOfSections * sizeof(IMAGE_SECTION_HEADER)))
     {printf("Can't get the sections, aborting\n"); return;}
-    
+
     dump_sections(separateDebugHead + 1, separateDebugHead->NumberOfSections);
-    
+
     nb_dbg = separateDebugHead->DebugDirectorySize / sizeof(IMAGE_DEBUG_DIRECTORY);
-    debugDir = PRD(sizeof(IMAGE_SEPARATE_DEBUG_HEADER) + 	
+    debugDir = PRD(sizeof(IMAGE_SEPARATE_DEBUG_HEADER) +
 		   separateDebugHead->NumberOfSections * sizeof(IMAGE_SECTION_HEADER) +
 		   separateDebugHead->ExportedNamesSize,
 		   nb_dbg * sizeof(IMAGE_DEBUG_DIRECTORY));
     if (!debugDir) {printf("Couldn't get the debug directory info, aborting\n");return;}
-    
+
     printf("Debug Table (%u directories)\n", nb_dbg);
-    
+
     for (i = 0; i < nb_dbg; i++)
     {
 	dump_dir_debug_dir(debugDir, i);
@@ -731,7 +731,7 @@
     {
 	dump_pe_header();
 	/* FIX%E: should check ptr */
-	dump_sections((char*)nt_headers + sizeof(DWORD) + 
+	dump_sections((char*)nt_headers + sizeof(DWORD) +
 		      sizeof(IMAGE_FILE_HEADER) + nt_headers->FileHeader.SizeOfOptionalHeader,
 		      nt_headers->FileHeader.NumberOfSections);
     }
@@ -765,13 +765,13 @@
     DWORD*		pdw;
     IMAGE_DOS_HEADER*	dh;
     enum FileSig	sig;
-    
+
     pw = PRD(0, sizeof(WORD));
     if (!pw) {printf("Can't get main signature, aborting\n"); return 0;}
-    
+
     switch (*pw)
     {
-    case IMAGE_DOS_SIGNATURE:	
+    case IMAGE_DOS_SIGNATURE:
 	sig = SIG_DOS;
 	dh = PRD(0, sizeof(IMAGE_DOS_HEADER));
 	if (dh && dh->e_lfanew >= sizeof(*dh)) /* reasonable DOS header ? */
@@ -792,7 +792,7 @@
 	    }
 	    else
 	    {
-		printf("Can't get the extented signature, aborting\n"); 
+		printf("Can't get the extented signature, aborting\n");
 	    }
 	}
 	break;
@@ -800,10 +800,10 @@
 	sig = SIG_DBG;
 	break;
     default:
-	printf("No known main signature (%.2s/%x), aborting\n", (char*)pw, *pw); 
+	printf("No known main signature (%.2s/%x), aborting\n", (char*)pw, *pw);
 	sig = SIG_UNKNOWN;
     }
-    
+
     return sig;
 }
 
@@ -818,15 +818,15 @@
 
     fd = open(name, O_RDONLY);
     if (fd == -1) fatal("Can't open file");
-    
+
     if (fstat(fd, &s) < 0) fatal("Can't get size");
     total_len = s.st_size;
-    
+
     base = mmap(NULL, total_len, PROT_READ, MAP_PRIVATE, fd, 0);
     if (base == (void*)-1) fatal("Can't map file");
-    
+
     effective_sig = check_headers();
-    
+
     if (effective_sig == SIG_UNKNOWN)
     {
 	printf("Can't get a recognized file signature, aborting\n");
@@ -854,11 +854,11 @@
 	printf("Can't get a suitable file signature, aborting\n");
 	ret = 0;
     }
-    
+
     if (ret) printf("Done dumping %s\n", name);
     munmap(base, total_len);
     close(fd);
-    
+
     return ret;
 }
 
@@ -901,7 +901,7 @@
 
     if (!dll_symbols) {
 	fatal("No symbols");
-    }    
+    }
     for (ds = dll_symbols; ds->symbol; ds++)
 	free(ds->symbol);
     free (dll_symbols);
@@ -918,26 +918,26 @@
     WORD*			pOrdl;
     char*			ptr;
     DWORD*			map;
-    
+
     if (!exportDir) return;
-    
+
     pName = RVA(exportDir->AddressOfNames, exportDir->NumberOfNames * sizeof(DWORD));
     if (!pName) {printf("Can't grab functions' name table\n"); return;}
     pOrdl = RVA(exportDir->AddressOfNameOrdinals, exportDir->NumberOfNames * sizeof(WORD));
     if (!pOrdl) {printf("Can't grab functions' ordinal table\n"); return;}
-    
+
     /* dll_close(); */
-    
-    if (!(dll_symbols = (dll_symbol *) malloc((exportDir->NumberOfFunctions + 1) * 
+
+    if (!(dll_symbols = (dll_symbol *) malloc((exportDir->NumberOfFunctions + 1) *
 					      sizeof (dll_symbol))))
 	fatal ("Out of memory");
     if (exportDir->AddressOfFunctions != exportDir->NumberOfNames || exportDir->Base > 1)
 	globals.do_ordinals = 1;
-    
+
     /* bit map of used funcs */
     map = calloc(((exportDir->NumberOfFunctions + 31) & ~31) / 32, sizeof(DWORD));
     if (!map) fatal("no memory");
-    
+
     for (j = 0; j < exportDir->NumberOfNames; j++, pOrdl++)
     {
 	map[*pOrdl / 32] |= 1 << (*pOrdl % 32);
@@ -949,7 +949,7 @@
     }
     pFunc = RVA(exportDir->AddressOfFunctions, exportDir->NumberOfFunctions * sizeof(DWORD));
     if (!pFunc) {printf("Can't grab functions' address table\n"); return;}
-        
+
     for (i = 0; i < exportDir->NumberOfFunctions; i++)
     {
 	if (pFunc[i] && !(map[i / 32] & (1 << (i % 32))))
@@ -968,15 +968,15 @@
 	}
     }
     free(map);
-    
+
     if (NORMAL)
-	printf("%lu named symbols in DLL, %lu total\n", 
+	printf("%lu named symbols in DLL, %lu total\n",
 	       exportDir->NumberOfNames, exportDir->NumberOfFunctions);
-    
+
     qsort( dll_symbols, exportDir->NumberOfFunctions, sizeof(dll_symbol), symbol_cmp );
-    
+
     dll_symbols[exportDir->NumberOfFunctions].symbol = NULL;
-    
+
     dll_current_symbol = dll_symbols;
 }
 
@@ -999,9 +999,9 @@
 {
     if (!dll_current_symbol->symbol)
 	return 1;
-    
+
     assert (dll_symbols);
-    
+
     sym->symbol = strdup (dll_current_symbol->symbol);
     sym->ordinal = dll_current_symbol->ordinal;
     dll_current_symbol++;
diff --git a/tools/winedump/winedump.h b/tools/winedump/winedump.h
index 58371fe..8d4dce9 100644
--- a/tools/winedump/winedump.h
+++ b/tools/winedump/winedump.h
@@ -124,7 +124,7 @@
 
   /* Option arguments: dump mode */
   const char *dumpsect;    /* -j */
-    
+
   /* internal options */
   int   do_ordinals;
 } _globals;
diff --git a/tools/wmc/mcl.c b/tools/wmc/mcl.c
index 8e584e9..b040711 100644
--- a/tools/wmc/mcl.c
+++ b/tools/wmc/mcl.c
@@ -49,7 +49,7 @@
  * sequence to identify the file.
  * -- FIXME --
  *
- * 
+ *
  * Keywords:
  *	Codepages
  *	Facility
@@ -669,7 +669,7 @@
 					int t = char_table[ch];
 					if((t & CH_PUNCT) || !(t & CH_SHORTNAME))
 						break;
-					
+
 					push_unichar(ch);
 					n++;
 					ch = get_unichar();
@@ -716,7 +716,7 @@
 
 			if(isspace(ch))	/* Ignore space */
 				continue;
-	
+
 			if(isdigit(ch))
 				return scan_number(ch);
 		}
diff --git a/tools/wmc/wmc.h b/tools/wmc/wmc.h
index 154be60..19eee29 100644
--- a/tools/wmc/wmc.h
+++ b/tools/wmc/wmc.h
@@ -33,7 +33,7 @@
 #define WMC_RELEASEDATE		"(12-Jun-2000)"
 
 #define WMC_STRINGIZE(a)	#a
-#define WMC_VERSIONIZE(a,b,c)	WMC_STRINGIZE(a) "." WMC_STRINGIZE(b) "." WMC_STRINGIZE(c)  
+#define WMC_VERSIONIZE(a,b,c)	WMC_STRINGIZE(a) "." WMC_STRINGIZE(b) "." WMC_STRINGIZE(c)
 #define WMC_VERSION		WMC_VERSIONIZE(WMC_MAJOR_VERSION, WMC_MINOR_VERSION, WMC_MICRO_VERSION)
 #define WMC_FULLVERSION 	WMC_VERSION " " WMC_RELEASEDATE
 
@@ -62,7 +62,7 @@
 extern char *output_name;
 extern char *input_name;
 extern char *header_name;
-extern char *cmdline;			
+extern char *cmdline;
 extern time_t now;
 
 extern int line_number;
diff --git a/tools/wmc/write.c b/tools/wmc/write.c
index b04d5ee..4c16cdd 100644
--- a/tools/wmc/write.c
+++ b/tools/wmc/write.c
@@ -443,7 +443,7 @@
 
 	for(lbp = lanblockhead; lbp; lbp = lbp->next)
 	{
-		unsigned offs = 4 * (lbp->nblk * 3 + 1); 
+		unsigned offs = 4 * (lbp->nblk * 3 + 1);
 		fprintf(fp, "\n1 MESSAGETABLE\n");
 		fprintf(fp, "LANGUAGE 0x%x, 0x%x\n", lbp->lan & 0x3ff, lbp->lan >> 10);
 		fprintf(fp, "{\n");
diff --git a/tools/wrc/dumpres.c b/tools/wrc/dumpres.c
index 3ff8137..0a9f8b5 100644
--- a/tools/wrc/dumpres.c
+++ b/tools/wrc/dumpres.c
@@ -242,7 +242,7 @@
 
 	for(n = 0; n < d->size; n++)
 	{
-		if((n % 16) == 0) 
+		if((n % 16) == 0)
                 {
 			if(n)
 			{
@@ -579,7 +579,7 @@
 		assert(dlg->style != NULL);
 		assert(dlg->style->and_mask == 0);
 		printf("Style: %08lx\n", dlg->style->or_mask);
-		
+
 	}
 	if(dlg->gotexstyle)
 	{
@@ -909,7 +909,7 @@
 	      		printf("   SEPARATOR");
 
 		printf("\n");
-	      
+
 		items = items->next;
 	}
 }
diff --git a/tools/wrc/genres.c b/tools/wrc/genres.c
index 9e4eaa5..ca5b4ef 100644
--- a/tools/wrc/genres.c
+++ b/tools/wrc/genres.c
@@ -22,7 +22,7 @@
  * 			  extra functions also aid unaligned access, but
  * 			  this is not yet implemented.
  * 25-May-1998 BS	- Added simple unicode -> char conversion for resource
- *			  names in .s and .h files.  
+ *			  names in .s and .h files.
  */
 
 #include "config.h"
@@ -723,7 +723,7 @@
 
 			/* FIXME: What is this extra byte doing here? */
 			put_byte(res, 0);
-			
+
 			nctrl++;
 			ctrl = ctrl->next;
 		}
@@ -1742,7 +1742,7 @@
 		put_word(res, 1);		/* Menuheader: Version */
 		put_word(res, toolbar->button_width); /* (in pixels?) */
 		put_word(res, toolbar->button_height); /* (in pixels?) */
-		put_word(res, toolbar->nitems); 
+		put_word(res, toolbar->nitems);
 		put_pad(res);
 		toolbaritem2res(res, toolbar->items);
 		/* Set ResourceSize */
diff --git a/tools/wrc/newstruc.c b/tools/wrc/newstruc.c
index f9991fd..63d55eb 100644
--- a/tools/wrc/newstruc.c
+++ b/tools/wrc/newstruc.c
@@ -722,7 +722,7 @@
 static void handle_ani_list(riff_tag_t *lst, enum res_e type, int isswapped)
 {
 	riff_tag_t *rtp = lst+1;	/* Skip the "LIST" tag */
-	
+
 	while((char *)rtp < (char *)lst + lst->size + sizeof(*lst))
 	{
 		if(!memcmp(rtp->tag, info, sizeof(info)))
@@ -998,7 +998,7 @@
 						yyerror("Message 0x%08lx is unicode (block %d), but has odd length (%d)", id, (int)i, mep->length);
 					for(n = 0; n < l; n++)
 						wp[n] = BYTESWAP_WORD(wp[n]);
-						
+
 				}
 				next_mep = (msgtab_entry_t *)(((char *)mep) + mep->length);
 				mep->length = BYTESWAP_WORD(mep->length);
@@ -1051,7 +1051,7 @@
 						yyerror("Message 0x%08lx is unicode (block %d), but has odd length (%d)", id, (int)i, mep->length);
 					for(n = 0; n < l; n++)
 						wp[n] = BYTESWAP_WORD(wp[n]);
-						
+
 				}
 				mep = (msgtab_entry_t *)(((char *)mep) + mep->length);
 			}
diff --git a/tools/wrc/utils.c b/tools/wrc/utils.c
index a475e89..d8db7a6 100644
--- a/tools/wrc/utils.c
+++ b/tools/wrc/utils.c
@@ -315,7 +315,7 @@
 		ret->size     = strlenW(str->str.wstr);
 		ret->str.wstr = xmalloc(sizeof(WCHAR)*(ret->size+1));
 		strcpyW(ret->str.wstr, str->str.wstr);
-	}  
+	}
 	else /* str->type == str_char */
         {
 	        ret->type     = str_char;
diff --git a/tools/wrc/wrc.h b/tools/wrc/wrc.h
index 15aa70d..de19d52 100644
--- a/tools/wrc/wrc.h
+++ b/tools/wrc/wrc.h
@@ -34,7 +34,7 @@
 
 #define WRC_STRINGIZE(a)	#a
 #define WRC_EXP_STRINGIZE(a)	WRC_STRINGIZE(a)
-#define WRC_VERSIONIZE(a,b,c)	WRC_STRINGIZE(a) "." WRC_STRINGIZE(b) "." WRC_STRINGIZE(c)  
+#define WRC_VERSIONIZE(a,b,c)	WRC_STRINGIZE(a) "." WRC_STRINGIZE(b) "." WRC_STRINGIZE(c)
 #define WRC_VERSION		WRC_VERSIONIZE(WRC_MAJOR_VERSION, WRC_MINOR_VERSION, WRC_MICRO_VERSION)
 #define WRC_FULLVERSION 	WRC_VERSION " " WRC_RELEASEDATE
 
@@ -74,7 +74,7 @@
 extern char *output_name;
 extern char *input_name;
 extern char *header_name;
-extern char *cmdline;			
+extern char *cmdline;
 extern time_t now;
 
 extern int line_number;
diff --git a/tools/wrc/wrctypes.h b/tools/wrc/wrctypes.h
index fd54507..b78c54e 100644
--- a/tools/wrc/wrctypes.h
+++ b/tools/wrc/wrctypes.h
@@ -59,7 +59,7 @@
 #define WRC_RT_ANIICON		(22)
 #define WRC_RT_HTML		(23)
 #define WRC_RT_DLGINIT          (240)
-#define WRC_RT_TOOLBAR		(241)  
+#define WRC_RT_TOOLBAR		(241)
 
 /* Default class type IDs */
 #define CT_BUTTON	0x80
@@ -571,7 +571,7 @@
 /* Toolbar structures */
 typedef struct toolbar_item {
 	struct toolbar_item	*next;
-	struct toolbar_item	*prev;        
+	struct toolbar_item	*prev;
 	int			id;
 } toolbar_item_t;
 
diff --git a/tools/wrc/writeres.c b/tools/wrc/writeres.c
index ae91caa..0c7ed0a 100644
--- a/tools/wrc/writeres.c
+++ b/tools/wrc/writeres.c
@@ -99,7 +99,7 @@
 /* Variables used for resource sorting */
 res_count_t *rcarray = NULL;	/* Type-level count array */
 int rccount = 0;		/* Nr of entries in the type-level array */
-int n_id_entries = 0;		/* win32 only: Nr of unique ids in the type-level array */ 
+int n_id_entries = 0;		/* win32 only: Nr of unique ids in the type-level array */
 int n_name_entries = 0;		/* win32 only: Nr of unique namess in the type-level array */
 
 static int direntries;		/* win32 only: Total number of unique resources */
@@ -813,7 +813,7 @@
 static void write_rsc_names(FILE *fp)
 {
 	int i, j;
-	
+
 	if(win32)
 	{
 		/* Write the names */
@@ -873,7 +873,7 @@
 			}
 		}
 		/* EndNames */
-		
+
 		/* This is to end the NE resource table */
 		if(create_dir)
 			fprintf(fp, "\t.byte\t0\n");
@@ -932,7 +932,7 @@
 
 	if(create_dir)
 		fprintf(fo, ".LResTabEnd:\n");
-	
+
 	if(!indirect_only)
 	{
 		/* Write the resource data */
diff --git a/win32/console.c b/win32/console.c
index a0bb0fa..1c21889 100644
--- a/win32/console.c
+++ b/win32/console.c
@@ -90,7 +90,7 @@
     attr.ObjectName               = NULL;
     attr.SecurityDescriptor       = NULL;
     attr.SecurityQualityOfService = NULL;
-    
+
     NtCreateEvent(&hEvent, EVENT_ALL_ACCESS, &attr, TRUE, FALSE);
     if (!hEvent) return FALSE;
 
@@ -115,10 +115,10 @@
 
     goto the_end;
 
- succeed:    
+ succeed:
     if (WaitForSingleObject(hEvent, INFINITE) != WAIT_OBJECT_0) goto the_end;
     CloseHandle(hEvent);
-    
+
     TRACE("Started wineconsole pid=%08lx tid=%08lx\n", pi.dwProcessId, pi.dwThreadId);
 
     return TRUE;
@@ -143,7 +143,7 @@
 
     TRACE("()\n");
 
-    handle_in = CreateFileA( "CONIN$", GENERIC_READ|GENERIC_WRITE|SYNCHRONIZE, 
+    handle_in = CreateFileA( "CONIN$", GENERIC_READ|GENERIC_WRITE|SYNCHRONIZE,
 			     0, NULL, OPEN_EXISTING, 0, 0 );
 
     if (handle_in != INVALID_HANDLE_VALUE)
@@ -156,18 +156,18 @@
     if (!start_console_renderer())
 	goto the_end;
 
-    handle_in = CreateFileA( "CONIN$", GENERIC_READ|GENERIC_WRITE|SYNCHRONIZE, 
+    handle_in = CreateFileA( "CONIN$", GENERIC_READ|GENERIC_WRITE|SYNCHRONIZE,
 			     0, NULL, OPEN_EXISTING, 0, 0 );
     if (handle_in == INVALID_HANDLE_VALUE) goto the_end;
 
-    handle_out = CreateFileA( "CONOUT$", GENERIC_READ|GENERIC_WRITE, 
+    handle_out = CreateFileA( "CONOUT$", GENERIC_READ|GENERIC_WRITE,
 			     0, NULL, OPEN_EXISTING, 0, 0 );
     if (handle_out == INVALID_HANDLE_VALUE) goto the_end;
 
     if (!DuplicateHandle(GetCurrentProcess(), handle_out, GetCurrentProcess(), &handle_err,
 			 0, TRUE, DUPLICATE_SAME_ACCESS))
 	goto the_end;
-    
+
     /* NT resets the STD_*_HANDLEs on console alloc */
     SetStdHandle(STD_INPUT_HANDLE,  handle_in);
     SetStdHandle(STD_OUTPUT_HANDLE, handle_out);
@@ -269,13 +269,13 @@
     DWORD	charsread;
     LPWSTR	xbuf = (LPWSTR)lpBuffer;
     DWORD	mode;
-    
+
     TRACE("(%d,%p,%ld,%p,%p)\n",
 	  hConsoleInput, lpBuffer, nNumberOfCharsToRead, lpNumberOfCharsRead, lpReserved);
-    
+
     if (!GetConsoleMode(hConsoleInput, &mode))
         return FALSE;
-    
+
     if (mode & ENABLE_LINE_INPUT)
     {
 	if (!S_EditString || S_EditString[S_EditStrPos] == 0)
@@ -294,7 +294,7 @@
     {
 	INPUT_RECORD 	ir;
 	DWORD 		count;
-	
+
 	/* FIXME: should we read at least 1 char? The SDK does not say */
 	/* wait for at least one available input record (it doesn't mean we'll have
 	 * chars stored in xbuf...
@@ -325,13 +325,13 @@
                               DWORD nLength, LPDWORD lpNumberOfEventsRead)
 {
     DWORD count;
-	
+
     if (!nLength)
     {
         if (lpNumberOfEventsRead) *lpNumberOfEventsRead = 0;
         return TRUE;
     }
-    
+
     /* loop until we get at least one event */
     for (;;)
     {
@@ -361,7 +361,7 @@
  * RETURNS
  *    Success: TRUE
  *    Failure: FALSE
- * 
+ *
  */
 BOOL WINAPI WriteConsoleOutputCharacterW( HANDLE hConsoleOutput, LPCWSTR str, DWORD length,
                                           COORD coord, LPDWORD lpNumCharsWritten )
@@ -427,7 +427,7 @@
 
 /******************************************************************************
  *  SetConsoleInputExeNameW	 [KERNEL32.@]
- * 
+ *
  * BUGS
  *   Unimplemented
  */
@@ -441,7 +441,7 @@
 
 /******************************************************************************
  *  SetConsoleInputExeNameA	 [KERNEL32.@]
- * 
+ *
  * BUGS
  *   Unimplemented
  */
@@ -494,9 +494,9 @@
 BOOL WINAPI SetConsoleCtrlHandler(PHANDLER_ROUTINE func, BOOL add)
 {
     int alloc_loop = sizeof(handlers)/sizeof(handlers[0]) - 1;
-    
+
     FIXME("(%p,%i) - no error checking or testing yet\n", func, add);
-    
+
     if (!func)
     {
 	console_ignore_ctrl_c = add;
@@ -565,9 +565,9 @@
     if (dwProcessGroupID == GetCurrentProcessId() || dwProcessGroupID == 0)
     {
 	int	i;
-	
+
 	FIXME("Attempt to send event %ld to self groupID, doing locally only\n", dwCtrlEvent);
-	
+
 	/* this is only meaningfull when done locally, otherwise it will have to be done on
 	 * the 'receive' side of the event generation
 	 */
@@ -616,21 +616,21 @@
  *    Success: Handle to new console screen buffer
  *    Failure: INVALID_HANDLE_VALUE
  */
-HANDLE WINAPI CreateConsoleScreenBuffer(DWORD dwDesiredAccess, DWORD dwShareMode, 
-					LPSECURITY_ATTRIBUTES sa, DWORD dwFlags, 
+HANDLE WINAPI CreateConsoleScreenBuffer(DWORD dwDesiredAccess, DWORD dwShareMode,
+					LPSECURITY_ATTRIBUTES sa, DWORD dwFlags,
 					LPVOID lpScreenBufferData)
 {
     HANDLE	ret = INVALID_HANDLE_VALUE;
-    
-    TRACE("(%ld,%ld,%p,%ld,%p)\n", 
+
+    TRACE("(%ld,%ld,%p,%ld,%p)\n",
 	  dwDesiredAccess, dwShareMode, sa, dwFlags, lpScreenBufferData);
-    
+
     if (dwFlags != CONSOLE_TEXTMODE_BUFFER || lpScreenBufferData != NULL)
     {
 	SetLastError(ERROR_INVALID_PARAMETER);
 	return INVALID_HANDLE_VALUE;
     }
-    
+
     SERVER_START_REQ(create_console_output)
     {
 	req->handle_in = 0;
@@ -640,7 +640,7 @@
 	if (!wine_server_call_err( req )) ret = reply->handle_out;
     }
     SERVER_END_REQ;
-    
+
     return ret;
 }
 
@@ -707,7 +707,7 @@
 BOOL WINAPI GetConsoleMode(HANDLE hcon, LPDWORD mode)
 {
     BOOL ret;
-    
+
     SERVER_START_REQ(get_console_mode)
     {
 	req->handle = hcon;
@@ -733,9 +733,9 @@
 BOOL WINAPI SetConsoleMode(HANDLE hcon, DWORD mode)
 {
     BOOL ret;
-    
+
     TRACE("(%x,%lx)\n", hcon, mode);
-    
+
     SERVER_START_REQ(set_console_mode)
     {
 	req->handle = hcon;
@@ -785,7 +785,7 @@
  */
 static int	next_line(HANDLE hCon, CONSOLE_SCREEN_BUFFER_INFO* csbi)
 {
-    SMALL_RECT	src; 
+    SMALL_RECT	src;
     CHAR_INFO	ci;
     COORD	dst;
 
@@ -794,17 +794,17 @@
 
     if (csbi->dwCursorPosition.Y < csbi->dwSize.Y) return 1;
 
-    src.Top    = 1; 
-    src.Bottom = csbi->dwSize.Y - 1; 
-    src.Left   = 0; 
-    src.Right  = csbi->dwSize.X - 1; 
-    
-    dst.X      = 0; 
+    src.Top    = 1;
+    src.Bottom = csbi->dwSize.Y - 1;
+    src.Left   = 0;
+    src.Right  = csbi->dwSize.X - 1;
+
+    dst.X      = 0;
     dst.Y      = 0;
-	
+
     ci.Attributes = csbi->wAttributes;
-    ci.Char.UnicodeChar = ' '; 
-    
+    ci.Char.UnicodeChar = ' ';
+
     csbi->dwCursorPosition.Y--;
     if (!ScrollConsoleScreenBufferW(hCon, &src, NULL, dst, &ci))
 	return 0;
@@ -849,7 +849,7 @@
         if (blk < len)
         {
             csbi->dwCursorPosition.X = csbi->dwSize.X - 1;
-            /* all remaining chars should be written on last column, 
+            /* all remaining chars should be written on last column,
              * so only overwrite the last column with last char in block
              */
             if (write_char(hCon, ptr + len - 1, 1, &csbi->dwCursorPosition) != 1)
@@ -859,7 +859,7 @@
     }
 
     return 1;
-}   
+}
 
 /***********************************************************************
  *            WriteConsoleW   (KERNEL32.@)
@@ -872,21 +872,21 @@
     WCHAR*			psz = (WCHAR*)lpBuffer;
     CONSOLE_SCREEN_BUFFER_INFO	csbi;
     int				k, first = 0;
-    
-    TRACE("%d %s %ld %p %p\n", 
+
+    TRACE("%d %s %ld %p %p\n",
 	  hConsoleOutput, debugstr_wn(lpBuffer, nNumberOfCharsToWrite),
 	  nNumberOfCharsToWrite, lpNumberOfCharsWritten, lpReserved);
-    
+
     if (lpNumberOfCharsWritten) *lpNumberOfCharsWritten = 0;
-    
-    if (!GetConsoleMode(hConsoleOutput, &mode) || 
+
+    if (!GetConsoleMode(hConsoleOutput, &mode) ||
 	!GetConsoleScreenBufferInfo(hConsoleOutput, &csbi))
 	return FALSE;
-    
+
     if (mode & ENABLE_PROCESSED_OUTPUT)
     {
 	int	i;
-	
+
 	for (i = 0; i < nNumberOfCharsToWrite; i++)
 	{
 	    switch (psz[i])
@@ -910,8 +910,8 @@
 	    case '\t':
 	        {
 		    WCHAR tmp[8] = {' ',' ',' ',' ',' ',' ',' ',' '};
-		    
-		    if (!write_block(hConsoleOutput, &csbi, mode, tmp, 
+
+		    if (!write_block(hConsoleOutput, &csbi, mode, tmp,
 				     ((csbi.dwCursorPosition.X + 8) & ~7) - csbi.dwCursorPosition.X))
 			goto the_end;
 		}
@@ -921,7 +921,7 @@
 		break;
  	    case '\a':
 		Beep(400, 300);
- 		break; 
+ 		break;
 	    case '\r':
 		csbi.dwCursorPosition.X = 0;
 		break;
@@ -930,7 +930,7 @@
 	    }
 	}
     }
-    
+
     /* write the remaining block (if any) if processed output is enabled, or the
      * entire buffer otherwise
      */
@@ -940,7 +940,7 @@
 	    goto the_end;
 	nw += k;
     }
-    
+
  the_end:
     SetConsoleCursorPosition(hConsoleOutput, csbi.dwCursorPosition);
     if (lpNumberOfCharsWritten) *lpNumberOfCharsWritten = nw;
@@ -957,19 +957,19 @@
     BOOL	ret;
     LPWSTR	xstring;
     DWORD 	n;
-    
+
     n = MultiByteToWideChar(CP_ACP, 0, lpBuffer, nNumberOfCharsToWrite, NULL, 0);
-    
+
     if (lpNumberOfCharsWritten) *lpNumberOfCharsWritten = 0;
     xstring = HeapAlloc(GetProcessHeap(), 0, n * sizeof(WCHAR));
     if (!xstring) return 0;
-    
+
     MultiByteToWideChar(CP_ACP, 0, lpBuffer, nNumberOfCharsToWrite, xstring, n);
-    
+
     ret = WriteConsoleW(hConsoleOutput, xstring, n, lpNumberOfCharsWritten, 0);
-    
+
     HeapFree(GetProcessHeap(), 0, xstring);
-    
+
     return ret;
 }
 
@@ -1012,7 +1012,7 @@
     {
 	csbi.srWindow.Left   = min(pos.X, csbi.dwSize.X - w);
 	do_move++;
-    } 
+    }
     else if (pos.X > csbi.srWindow.Right)
     {
 	csbi.srWindow.Left   = max(pos.X, w) - w + 1;
@@ -1163,7 +1163,7 @@
 
 
 /******************************************************************************
- * SetConsoleScreenBufferSize [KERNEL32.@]  Changes size of console 
+ * SetConsoleScreenBufferSize [KERNEL32.@]  Changes size of console
  *
  * PARAMS
  *    hConsoleOutput [I] Handle to console screen buffer
@@ -1192,18 +1192,18 @@
 
 /******************************************************************************
  * ScrollConsoleScreenBufferA [KERNEL32.@]
- * 
+ *
  */
-BOOL WINAPI ScrollConsoleScreenBufferA(HANDLE hConsoleOutput, LPSMALL_RECT lpScrollRect, 
-				       LPSMALL_RECT lpClipRect, COORD dwDestOrigin, 
+BOOL WINAPI ScrollConsoleScreenBufferA(HANDLE hConsoleOutput, LPSMALL_RECT lpScrollRect,
+				       LPSMALL_RECT lpClipRect, COORD dwDestOrigin,
 				       LPCHAR_INFO lpFill)
 {
     CHAR_INFO	ciw;
-    
+
     ciw.Attributes = lpFill->Attributes;
     MultiByteToWideChar(CP_ACP, 0, &lpFill->Char.AsciiChar, 1, &ciw.Char.UnicodeChar, 1);
-    
-    return ScrollConsoleScreenBufferW(hConsoleOutput, lpScrollRect, lpClipRect, 
+
+    return ScrollConsoleScreenBufferW(hConsoleOutput, lpScrollRect, lpClipRect,
 				      dwDestOrigin, &ciw);
 }
 
@@ -1232,11 +1232,11 @@
 
 /******************************************************************************
  * ScrollConsoleScreenBufferW [KERNEL32.@]
- * 
+ *
  */
 
-BOOL WINAPI ScrollConsoleScreenBufferW(HANDLE hConsoleOutput, LPSMALL_RECT lpScrollRect, 
-				       LPSMALL_RECT lpClipRect, COORD dwDestOrigin, 
+BOOL WINAPI ScrollConsoleScreenBufferW(HANDLE hConsoleOutput, LPSMALL_RECT lpScrollRect,
+				       LPSMALL_RECT lpClipRect, COORD dwDestOrigin,
 				       LPCHAR_INFO lpFill)
 {
     SMALL_RECT			dst;
@@ -1246,20 +1246,20 @@
     SMALL_RECT			clip;
     CONSOLE_SCREEN_BUFFER_INFO	csbi;
     BOOL			inside;
-	
+
     if (lpClipRect)
-	TRACE("(%d,(%d,%d-%d,%d),(%d,%d-%d,%d),%d-%d,%p)\n", hConsoleOutput, 
+	TRACE("(%d,(%d,%d-%d,%d),(%d,%d-%d,%d),%d-%d,%p)\n", hConsoleOutput,
 	      lpScrollRect->Left, lpScrollRect->Top,
 	      lpScrollRect->Right, lpScrollRect->Bottom,
 	      lpClipRect->Left, lpClipRect->Top,
 	      lpClipRect->Right, lpClipRect->Bottom,
 	      dwDestOrigin.X, dwDestOrigin.Y, lpFill);
     else
-	TRACE("(%d,(%d,%d-%d,%d),(nil),%d-%d,%p)\n", hConsoleOutput, 
+	TRACE("(%d,(%d,%d-%d,%d),(nil),%d-%d,%p)\n", hConsoleOutput,
 	      lpScrollRect->Left, lpScrollRect->Top,
 	      lpScrollRect->Right, lpScrollRect->Bottom,
 	      dwDestOrigin.X, dwDestOrigin.Y, lpFill);
-    
+
     if (!GetConsoleScreenBufferInfo(hConsoleOutput, &csbi))
 	return FALSE;
 
@@ -1268,7 +1268,7 @@
     dst.Top = dwDestOrigin.Y;
     dst.Right = dst.Left + (lpScrollRect->Right - lpScrollRect->Left);
     dst.Bottom = dst.Top + (lpScrollRect->Bottom - lpScrollRect->Top);
-    
+
     /* step 2a: compute the final clip rect (optional passed clip and screen buffer limits */
     if (lpClipRect)
     {
@@ -1291,7 +1291,7 @@
     if (dst.Top    < clip.Top   ) dst.Top    = clip.Top;
     if (dst.Right  > clip.Right ) dst.Right  = clip.Right;
     if (dst.Bottom > clip.Bottom) dst.Bottom = clip.Bottom;
-    
+
     /* step 3: transfer the bits */
     SERVER_START_REQ(move_console_output)
     {
diff --git a/win32/device.c b/win32/device.c
index 2ddc907..662f3ab4 100644
--- a/win32/device.c
+++ b/win32/device.c
@@ -56,17 +56,17 @@
 WINE_DEFAULT_DEBUG_CHANNEL(file);
 
 
-static BOOL DeviceIo_VTDAPI(DWORD dwIoControlCode, 
+static BOOL DeviceIo_VTDAPI(DWORD dwIoControlCode,
 			      LPVOID lpvInBuffer, DWORD cbInBuffer,
 			      LPVOID lpvOutBuffer, DWORD cbOutBuffer,
 			      LPDWORD lpcbBytesReturned,
 			      LPOVERLAPPED lpOverlapped);
-static BOOL DeviceIo_MONODEBG(DWORD dwIoControlCode, 
+static BOOL DeviceIo_MONODEBG(DWORD dwIoControlCode,
 			      LPVOID lpvInBuffer, DWORD cbInBuffer,
 			      LPVOID lpvOutBuffer, DWORD cbOutBuffer,
 			      LPDWORD lpcbBytesReturned,
 			      LPOVERLAPPED lpOverlapped);
-static BOOL DeviceIo_MMDEVLDR(DWORD dwIoControlCode, 
+static BOOL DeviceIo_MMDEVLDR(DWORD dwIoControlCode,
 			      LPVOID lpvInBuffer, DWORD cbInBuffer,
 			      LPVOID lpvOutBuffer, DWORD cbOutBuffer,
 			      LPDWORD lpcbBytesReturned,
@@ -74,13 +74,13 @@
 
 static DWORD VxDCall_VMM( DWORD service, CONTEXT86 *context );
 
-static BOOL DeviceIo_IFSMgr(DWORD dwIoControlCode, 
+static BOOL DeviceIo_IFSMgr(DWORD dwIoControlCode,
 			      LPVOID lpvInBuffer, DWORD cbInBuffer,
 			      LPVOID lpvOutBuffer, DWORD cbOutBuffer,
 			      LPDWORD lpcbBytesReturned,
 			      LPOVERLAPPED lpOverlapped);
 
-static BOOL DeviceIo_VCD(DWORD dwIoControlCode, 
+static BOOL DeviceIo_VCD(DWORD dwIoControlCode,
 			      LPVOID lpvInBuffer, DWORD cbInBuffer,
 			      LPVOID lpvOutBuffer, DWORD cbOutBuffer,
 			      LPDWORD lpcbBytesReturned,
@@ -88,19 +88,19 @@
 
 static DWORD VxDCall_VWin32( DWORD service, CONTEXT86 *context );
 
-static BOOL DeviceIo_VWin32(DWORD dwIoControlCode, 
+static BOOL DeviceIo_VWin32(DWORD dwIoControlCode,
 			      LPVOID lpvInBuffer, DWORD cbInBuffer,
 			      LPVOID lpvOutBuffer, DWORD cbOutBuffer,
 			      LPDWORD lpcbBytesReturned,
 			      LPOVERLAPPED lpOverlapped);
 
-static BOOL DeviceIo_PCCARD (DWORD dwIoControlCode, 
+static BOOL DeviceIo_PCCARD (DWORD dwIoControlCode,
 			      LPVOID lpvInBuffer, DWORD cbInBuffer,
 			      LPVOID lpvOutBuffer, DWORD cbOutBuffer,
 			      LPDWORD lpcbBytesReturned,
 			      LPOVERLAPPED lpOverlapped);
 
-static BOOL DeviceIo_HASP (DWORD dwIoControlCode, 
+static BOOL DeviceIo_HASP (DWORD dwIoControlCode,
 			      LPVOID lpvInBuffer, DWORD cbInBuffer,
 			      LPVOID lpvOutBuffer, DWORD cbOutBuffer,
 			      LPDWORD lpcbBytesReturned,
@@ -114,11 +114,11 @@
     LPCSTR  name;
     WORD    id;
     DWORD (*vxdcall)(DWORD, CONTEXT86 *);
-    BOOL  (*deviceio)(DWORD, LPVOID, DWORD, 
+    BOOL  (*deviceio)(DWORD, LPVOID, DWORD,
                         LPVOID, DWORD, LPDWORD, LPOVERLAPPED);
 };
 
-static const struct VxDInfo VxDList[] = 
+static const struct VxDInfo VxDList[] =
 {
     /* Standard VxD IDs */
     { "VMM",      0x0001, VxDCall_VMM, NULL },
@@ -262,7 +262,7 @@
 #define N_VMM_SERVICE 41
 
 LPCSTR VMM_Service_Name[N_VMM_SERVICE] =
-{ 
+{
     "PageReserve",            /* 0x0000 */
     "PageCommit",             /* 0x0001 */
     "PageDecommit",           /* 0x0002 */
@@ -372,7 +372,7 @@
 static const struct VxDInfo *DEVICE_GetInfo( DWORD clientID )
 {
     const struct VxDInfo *info = NULL;
-    
+
     if (clientID & 0x10000)
     {
         for (info = VxDList; info->name; info++)
@@ -390,7 +390,7 @@
  * A return value of FALSE indicates that something has gone wrong which
  * GetLastError can decipher.
  */
-BOOL WINAPI DeviceIoControl(HANDLE hDevice, DWORD dwIoControlCode, 
+BOOL WINAPI DeviceIoControl(HANDLE hDevice, DWORD dwIoControlCode,
 			      LPVOID lpvInBuffer, DWORD cbInBuffer,
 			      LPVOID lpvOutBuffer, DWORD cbOutBuffer,
 			      LPDWORD lpcbBytesReturned,
@@ -418,14 +418,14 @@
                 }
                 else if ( info->deviceio )
 		{
-			return info->deviceio( dwIoControlCode, 
-                                        lpvInBuffer, cbInBuffer, 
-                                        lpvOutBuffer, cbOutBuffer, 
+			return info->deviceio( dwIoControlCode,
+                                        lpvInBuffer, cbInBuffer,
+                                        lpvOutBuffer, cbOutBuffer,
                                         lpcbBytesReturned, lpOverlapped );
 		}
 		else
 		{
-			FIXME( "Unimplemented control %ld for VxD device %s\n", 
+			FIXME( "Unimplemented control %ld for VxD device %s\n",
                                dwIoControlCode, info->name ? info->name : "???" );
 			/* FIXME: this is for invalid calls on W98SE,
 			 * but maybe we should use ERROR_CALL_NOT_IMPLEMENTED
@@ -489,7 +489,7 @@
 	}
    	return FALSE;
 }
- 
+
 /***********************************************************************
  *           DeviceIo_VTDAPI
  */
@@ -634,7 +634,7 @@
         LPDWORD lpdwType   = (LPDWORD)stack32_pop( context );
         LPBYTE  lpbData    = (LPBYTE) stack32_pop( context );
         LPDWORD lpcbData   = (LPDWORD)stack32_pop( context );
-        return RegEnumValueA( hkey, iValue, lpszValue, lpcchValue, 
+        return RegEnumValueA( hkey, iValue, lpszValue, lpcchValue,
                               lpReserved, lpdwType, lpbData, lpcbData );
     }
 
@@ -646,7 +646,7 @@
         LPDWORD lpdwType   = (LPDWORD)stack32_pop( context );
         LPBYTE  lpbData    = (LPBYTE) stack32_pop( context );
         LPDWORD lpcbData   = (LPDWORD)stack32_pop( context );
-        return RegQueryValueExA( hkey, lpszValue, lpReserved, 
+        return RegQueryValueExA( hkey, lpszValue, lpReserved,
                                  lpdwType, lpbData, lpcbData );
     }
 
@@ -658,7 +658,7 @@
         DWORD   dwType     = (DWORD) stack32_pop( context );
         LPBYTE  lpbData    = (LPBYTE)stack32_pop( context );
         DWORD   cbData     = (DWORD) stack32_pop( context );
-        return RegSetValueExA( hkey, lpszValue, dwReserved, 
+        return RegSetValueExA( hkey, lpszValue, dwReserved,
                                dwType, lpbData, cbData );
     }
 
@@ -741,7 +741,7 @@
 	   address-spaces we now have */
 	if ( page == PR_PRIVATE || page == PR_SHARED ) page = 0;
 	/* FIXME: Handle flags in some way */
-	address = (LPVOID )(page * psize); 
+	address = (LPVOID )(page * psize);
 	ret = VirtualAlloc ( address, ( npages * psize ), MEM_RESERVE, 0 );
 	TRACE("PageReserve: returning: %08lx\n", (DWORD )ret );
 	if ( ret == NULL )
@@ -765,7 +765,7 @@
 	TRACE("PageCommit: page: %08lx, npages: %08lx, hpd: %08lx pagerdata: "
 	      "%08lx, flags: %08lx partial stub\n",
 	      page, npages, hpd, pagerdata, flags );
-	
+
 	if ( flags & PC_USER )
 	  if ( flags & PC_WRITEABLE )
 	    virt_perm = PAGE_EXECUTE_READWRITE;
@@ -774,7 +774,7 @@
 	else
 	  virt_perm = PAGE_NOACCESS;
 
-	address = (LPVOID )(page * psize); 
+	address = (LPVOID )(page * psize);
 	ret = VirtualAlloc ( address, ( npages * psize ), MEM_COMMIT, virt_perm );
 	TRACE("PageCommit: Returning: %08lx\n", (DWORD )ret );
 	return (DWORD )ret;
@@ -792,12 +792,12 @@
 	TRACE("PageDecommit: page: %08lx, npages: %08lx, flags: %08lx partial stub\n",
 	      page, npages, flags );
 	address = (LPVOID )( page * psize );
-	ret = VirtualFree ( address, ( npages * psize ), MEM_DECOMMIT ); 
+	ret = VirtualFree ( address, ( npages * psize ), MEM_DECOMMIT );
 	TRACE("PageDecommit: Returning: %s\n", ret ? "TRUE" : "FALSE" );
 	return ret;
       }
     case 0x000d: /* PageModifyPermissions */
-      {	
+      {
 	DWORD pg_old_perm;
 	DWORD pg_new_perm;
 	DWORD virt_old_perm;
@@ -828,12 +828,12 @@
 	case PAGE_EXECUTE_READWRITE:
 	case PAGE_EXECUTE_WRITECOPY:
 	  pg_old_perm = PC_USER | PC_WRITEABLE;
-	  break; 
+	  break;
 	case PAGE_NOACCESS:
 	default:
 	  pg_old_perm = 0;
 	  break;
-	}	
+	}
 	pg_new_perm = pg_old_perm;
 	pg_new_perm &= permand & ~PC_STATIC;
 	pg_new_perm |= permor  & ~PC_STATIC;
@@ -846,7 +846,7 @@
 	  else
 	    virt_new_perm |= PAGE_EXECUTE_READ;
 	}
-  
+
 	if ( ! VirtualProtect ( address, ( npages * psize ), virt_new_perm, &virt_old_perm ) ) {
 	  ERR("Can't change page permissions for %08lx\n", (DWORD )address );
 	  return 0xffffffff;
@@ -859,7 +859,7 @@
 	BOOL ret;
 	LPVOID hmem = (LPVOID) stack32_pop( context );
 	DWORD flags = (DWORD ) stack32_pop( context );
-	
+
 	TRACE("PageFree: hmem: %08lx, flags: %08lx partial stub\n",
 	      (DWORD )hmem, flags );
 
@@ -872,7 +872,7 @@
     case 0x001e: /* GetDemandPageInfo */
       {
 	 DWORD dinfo = (DWORD)stack32_pop( context );
-         DWORD flags = (DWORD)stack32_pop( context );   
+         DWORD flags = (DWORD)stack32_pop( context );
 
 	 /* GetDemandPageInfo is supposed to fill out the struct at
           * "dinfo" with various low-level memory management information.
@@ -903,10 +903,10 @@
  * NOTES
  *   These ioctls are used by 'MSNET32.DLL'.
  *
- *   I have been unable to uncover any documentation about the ioctls so 
+ *   I have been unable to uncover any documentation about the ioctls so
  *   the implementation of the cases IFS_IOCTL_21 and IFS_IOCTL_2F are
  *   based on reasonable guesses on information found in the Windows 95 DDK.
- *   
+ *
  */
 
 /*
@@ -920,13 +920,13 @@
 
 struct win32apireq {
 	unsigned long 	ar_proid;
-	unsigned long  	ar_eax;		
-	unsigned long  	ar_ebx;	
-	unsigned long  	ar_ecx;	
-	unsigned long  	ar_edx;	
-	unsigned long  	ar_esi;	
+	unsigned long  	ar_eax;
+	unsigned long  	ar_ebx;
+	unsigned long  	ar_ecx;
+	unsigned long  	ar_edx;
+	unsigned long  	ar_esi;
 	unsigned long  	ar_edi;
-	unsigned long  	ar_ebp;		
+	unsigned long  	ar_ebp;
 	unsigned short 	ar_error;
 	unsigned short  ar_pad;
 };
@@ -1000,8 +1000,8 @@
 			pIn->ar_proid, pIn->ar_eax, pIn->ar_ebx, pIn->ar_ecx,
 			pIn->ar_edx, pIn->ar_esi, pIn->ar_edi, pIn->ar_ebp,
 			pIn->ar_error, pIn->ar_pad
-		);				
-		
+		);
+
 		win32apieq_2_CONTEXT(pIn,&cxt);
 
 		if(dwIoControlCode==IFS_IOCTL_21)
@@ -1010,9 +1010,9 @@
 		} else {
 			INT_Int2fHandler(&cxt); /* Call int 2Fh */
 		}
-		
+
 		CONTEXT_2_win32apieq(&cxt,pOut);
-			
+
         retv = TRUE;
 	} break;
 	case IFS_IOCTL_GET_RES:{
@@ -1022,7 +1022,7 @@
 	case IFS_IOCTL_GET_NETPRO_NAME_A:{
         FIXME( "Control 'IFS_IOCTL_GET_NETPRO_NAME_A' not implemented\n");
         retv = FALSE;
-	} break;	 
+	} break;
     default:
         FIXME( "Control %ld not implemented\n", dwIoControlCode);
         retv = FALSE;
@@ -1068,11 +1068,11 @@
     {
 	DWORD callnum = (DWORD) stack32_pop(context);
         DWORD parm    = (DWORD) stack32_pop(context);
- 
+
         TRACE("Int31/DPMI dispatch(%08lx)\n", callnum);
 
 	AX_reg(context) = callnum;
-        CX_reg(context) = parm;  
+        CX_reg(context) = parm;
 	INT_Int31Handler(context);
 
 	return LOWORD(context->Eax);
@@ -1094,12 +1094,12 @@
 
   return 0xffffffff;
 }
-                         
+
 
 /***********************************************************************
  *           DeviceIo_VCD
  */
-static BOOL DeviceIo_VCD(DWORD dwIoControlCode, 
+static BOOL DeviceIo_VCD(DWORD dwIoControlCode,
 			      LPVOID lpvInBuffer, DWORD cbInBuffer,
 			      LPVOID lpvOutBuffer, DWORD cbOutBuffer,
 			      LPDWORD lpcbBytesReturned,
@@ -1125,7 +1125,7 @@
     return retv;
 }
 
- 
+
 /***********************************************************************
  *           DeviceIo_VWin32
  */
@@ -1386,7 +1386,7 @@
     }
 }
 
-static BOOL DeviceIo_VWin32(DWORD dwIoControlCode, 
+static BOOL DeviceIo_VWin32(DWORD dwIoControlCode,
 			      LPVOID lpvInBuffer, DWORD cbInBuffer,
 			      LPVOID lpvOutBuffer, DWORD cbOutBuffer,
 			      LPDWORD lpcbBytesReturned,
@@ -1422,7 +1422,7 @@
                "edx=0x%08lx, esi=0x%08lx, edi=0x%08lx \n",
                (dwIoControlCode == VWIN32_DIOC_DOS_IOCTL)? "VWIN32_DIOC_DOS_IOCTL" :
                (dwIoControlCode == VWIN32_DIOC_DOS_INT25)? "VWIN32_DIOC_DOS_INT25" :
-               (dwIoControlCode == VWIN32_DIOC_DOS_INT26)? "VWIN32_DIOC_DOS_INT26" : 
+               (dwIoControlCode == VWIN32_DIOC_DOS_INT26)? "VWIN32_DIOC_DOS_INT26" :
                (dwIoControlCode == VWIN32_DIOC_DOS_DRIVEINFO)? "VWIN32_DIOC_DOS_DRIVEINFO" :  "???",
                pIn->reg_EAX, pIn->reg_EBX, pIn->reg_ECX,
                pIn->reg_EDX, pIn->reg_ESI, pIn->reg_EDI );
@@ -1461,7 +1461,7 @@
 }
 
 /* this is the main multimedia device loader */
-static BOOL DeviceIo_MMDEVLDR(DWORD dwIoControlCode, 
+static BOOL DeviceIo_MMDEVLDR(DWORD dwIoControlCode,
 			      LPVOID lpvInBuffer, DWORD cbInBuffer,
 			      LPVOID lpvOutBuffer, DWORD cbOutBuffer,
 			      LPDWORD lpcbBytesReturned,
@@ -1484,7 +1484,7 @@
 	return FALSE;
 }
 /* this is used by some Origin games */
-static BOOL DeviceIo_MONODEBG(DWORD dwIoControlCode, 
+static BOOL DeviceIo_MONODEBG(DWORD dwIoControlCode,
 			      LPVOID lpvInBuffer, DWORD cbInBuffer,
 			      LPVOID lpvOutBuffer, DWORD cbOutBuffer,
 			      LPDWORD lpcbBytesReturned,
@@ -1510,7 +1510,7 @@
 	return TRUE;
 }
 /* pccard */
-static BOOL DeviceIo_PCCARD (DWORD dwIoControlCode, 
+static BOOL DeviceIo_PCCARD (DWORD dwIoControlCode,
 			      LPVOID lpvInBuffer, DWORD cbInBuffer,
 			      LPVOID lpvOutBuffer, DWORD cbOutBuffer,
 			      LPDWORD lpcbBytesReturned,
diff --git a/win32/editline.c b/win32/editline.c
index a96e6ab..33d4c3c 100644
--- a/win32/editline.c
+++ b/win32/editline.c
@@ -39,13 +39,13 @@
 
 struct WCEL_Context;
 
-typedef struct 
+typedef struct
 {
     WCHAR			val;		/* vk or unicode char */
     void			(*func)(struct WCEL_Context* ctx);
 } KeyEntry;
 
-typedef struct 
+typedef struct
 {
     DWORD			keyState;	/* keyState (from INPUT_RECORD) to match */
     BOOL			chkChar;	/* check vk or char */
@@ -73,9 +73,9 @@
 static void WCEL_Dump(WCEL_Context* ctx, const char* pfx)
 {
     MESSAGE("%s: [line=%s[alloc=%u] ofs=%u len=%u start=(%d,%d) mask=%c%c\n"
-	    "\t\thist=(size=%u pos=%u curr=%s)\n", 
-	    pfx, debugstr_w(ctx->line), ctx->alloc, ctx->ofs, ctx->len, 
-	    ctx->csbi.dwCursorPosition.X, ctx->csbi.dwCursorPosition.Y, 
+	    "\t\thist=(size=%u pos=%u curr=%s)\n",
+	    pfx, debugstr_w(ctx->line), ctx->alloc, ctx->ofs, ctx->len,
+	    ctx->csbi.dwCursorPosition.X, ctx->csbi.dwCursorPosition.Y,
 	    ctx->done ? 'D' : 'd', ctx->error ? 'E' : 'e',
 	    ctx->histSize, ctx->histPos, debugstr_w(ctx->histCurr));
 }
@@ -91,13 +91,13 @@
 {
     DWORD		retv;
 
-    for (;;) 
+    for (;;)
     {
 	/* data available ? */
 	if (ReadConsoleInputW(ctx->hConIn, ir, 1, &retv) && retv == 1)
 	    return TRUE;
 	/* then wait... */
-	switch (WaitForSingleObject(ctx->hConIn, INFINITE)) 
+	switch (WaitForSingleObject(ctx->hConIn, INFINITE))
 	{
 	case WAIT_OBJECT_0:
 	    break;
@@ -201,7 +201,7 @@
     WCHAR	buffer[2];
 
     /* do not insert 0..31 control characters */
-    if (c < ' ') 
+    if (c < ' ')
     {
 	if (c != '\t') return;
     }
@@ -248,7 +248,7 @@
 {
     WCHAR*	ptr;
 
-    if (idx == ctx->histSize - 1) 
+    if (idx == ctx->histSize - 1)
     {
 	ptr = HeapAlloc(GetProcessHeap(), 0, (lstrlenW(ctx->histCurr) + 1) * sizeof(WCHAR));
 	lstrcpyW(ptr, ctx->histCurr);
@@ -256,7 +256,7 @@
     else
     {
 	int	len = CONSOLE_GetHistory(idx, NULL, 0);
-	
+
 	if ((ptr = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR))))
 	{
 	    CONSOLE_GetHistory(idx, ptr, len);
@@ -314,7 +314,7 @@
        else ctx->histPos = (ctx->histSize-1);
 
        len = lstrlenW(data) + 1;
-       if ((len >= ctx->ofs) && 
+       if ((len >= ctx->ofs) &&
            (memcmp(ctx->line, data, ctx->ofs * sizeof(WCHAR)) == 0)) {
 
            /* need to clean also the screen if new string is shorter than old one */
@@ -332,7 +332,7 @@
            }
        }
     } while (ctx->histPos != startPos);
-    
+
     return;
 }
 
@@ -389,7 +389,7 @@
 }
 
 static void WCEL_ExchangeMark(WCEL_Context* ctx)
-{   
+{
     unsigned tmp;
 
     if (ctx->mark > ctx->len) return;
@@ -441,7 +441,7 @@
 	int	i;
 	for (i = ctx->ofs; i <= new_ofs; i++)
 	    ctx->line[i] = tolowerW(ctx->line[i]);
-	WriteConsoleOutputCharacterW(ctx->hConOut, &ctx->line[ctx->ofs], new_ofs - ctx->ofs + 1, 
+	WriteConsoleOutputCharacterW(ctx->hConOut, &ctx->line[ctx->ofs], new_ofs - ctx->ofs + 1,
 				     WCEL_GetCoord(ctx, ctx->ofs), NULL);
 	ctx->ofs = new_ofs;
     }
@@ -455,7 +455,7 @@
 	int	i;
 	for (i = ctx->ofs; i <= new_ofs; i++)
 	    ctx->line[i] = toupperW(ctx->line[i]);
-	WriteConsoleOutputCharacterW(ctx->hConOut, &ctx->line[ctx->ofs], new_ofs - ctx->ofs + 1, 
+	WriteConsoleOutputCharacterW(ctx->hConOut, &ctx->line[ctx->ofs], new_ofs - ctx->ofs + 1,
 				     WCEL_GetCoord(ctx, ctx->ofs), NULL);
 	ctx->ofs = new_ofs;
     }
@@ -467,11 +467,11 @@
     if (new_ofs != ctx->ofs)
     {
 	int	i;
-	
+
 	ctx->line[ctx->ofs] = toupperW(ctx->line[ctx->ofs]);
 	for (i = ctx->ofs + 1; i <= new_ofs; i++)
 	    ctx->line[i] = tolowerW(ctx->line[i]);
-	WriteConsoleOutputCharacterW(ctx->hConOut, &ctx->line[ctx->ofs], new_ofs - ctx->ofs + 1, 
+	WriteConsoleOutputCharacterW(ctx->hConOut, &ctx->line[ctx->ofs], new_ofs - ctx->ofs + 1,
 				     WCEL_GetCoord(ctx, ctx->ofs), NULL);
 	ctx->ofs = new_ofs;
     }
@@ -569,7 +569,7 @@
  * ====================================================================*/
 
 #define CTRL(x)	((x) - '@')
-static KeyEntry StdKeyMap[] = 
+static KeyEntry StdKeyMap[] =
 {
     {/*BACK*/0x08,	WCEL_DeletePrevChar 	},
     {/*RETURN*/0x0d,	WCEL_Done		},
@@ -577,14 +577,14 @@
     {	0,		NULL			}
 };
 
-static KeyEntry Win32ExtraStdKeyMap[] = 
+static KeyEntry Win32ExtraStdKeyMap[] =
 {
     {/*VK_F8*/   0x77,	WCEL_FindPrevInHist	},
     {	0,		NULL			}
 };
 
 
-static	KeyEntry EmacsKeyMapCtrl[] = 
+static	KeyEntry EmacsKeyMapCtrl[] =
 {
     {	CTRL('@'),	WCEL_SetMark		},
     {	CTRL('A'),	WCEL_MoveToBeg		},
@@ -616,7 +616,7 @@
     {	0,		NULL			}
 };
 
-static KeyEntry EmacsKeyMapAlt[] = 
+static KeyEntry EmacsKeyMapAlt[] =
 {
     {/*DEL*/127,	WCEL_DeleteLeftWord	},
     {	'<',		WCEL_MoveToFirstHist	},
@@ -633,7 +633,7 @@
     {	0,		NULL			}
 };
 
-static KeyEntry EmacsKeyMapExtended[] = 
+static KeyEntry EmacsKeyMapExtended[] =
 {
     {/*RETURN*/  0x0d,	WCEL_Done },
     {/*VK_PRIOR*/0x21, 	WCEL_MoveToPrevHist	},
@@ -645,7 +645,7 @@
     {	0,		NULL 			}
 };
 
-static KeyMap	EmacsKeyMap[] = 
+static KeyMap	EmacsKeyMap[] =
 {
     {0x00000000, 1, StdKeyMap},
     {0x00000001, 1, EmacsKeyMapAlt},	/* left  alt  */
@@ -656,7 +656,7 @@
     {0,		 0, 0}
 };
 
-static	KeyEntry Win32KeyMapExtended[] = 
+static	KeyEntry Win32KeyMapExtended[] =
 {
     {/*VK_LEFT*/ 0x25, 	WCEL_MoveLeft 		},
     {/*VK_RIGHT*/0x27,	WCEL_MoveRight		},
@@ -668,7 +668,7 @@
     {	0,		NULL 			}
 };
 
-static	KeyEntry Win32KeyMapCtrlExtended[] = 
+static	KeyEntry Win32KeyMapCtrlExtended[] =
 {
     {/*VK_LEFT*/ 0x25, 	WCEL_MoveToLeftWord 	},
     {/*VK_RIGHT*/0x27,	WCEL_MoveToRightWord	},
@@ -676,7 +676,7 @@
     {	0,		NULL 			}
 };
 
-KeyMap	Win32KeyMap[] = 
+KeyMap	Win32KeyMap[] =
 {
     {0x00000000, 1, StdKeyMap},
     {0x00000000, 0, Win32ExtraStdKeyMap},
@@ -706,7 +706,7 @@
     memset(&ctx, 0, sizeof(ctx));
     ctx.hConIn = hConsoleIn;
     WCEL_HistoryInit(&ctx);
-    if ((ctx.hConOut = CreateFileA("CONOUT$", GENERIC_READ|GENERIC_WRITE, 0, NULL, 
+    if ((ctx.hConOut = CreateFileA("CONOUT$", GENERIC_READ|GENERIC_WRITE, 0, NULL,
 				    OPEN_EXISTING, 0, 0 )) == INVALID_HANDLE_VALUE ||
 	!GetConsoleScreenBufferInfo(ctx.hConOut, &ctx.csbi))
 	return NULL;
@@ -720,7 +720,7 @@
 /* EPP     WCEL_Dump(&ctx, "init"); */
 
     while (!ctx.done && !ctx.error && WCEL_Get(&ctx, &ir))
-    {	
+    {
 	if (ir.EventType != KEY_EVENT || !ir.Event.KeyEvent.bKeyDown) continue;
 	TRACE("key%s repeatCount=%u, keyCode=%02x scanCode=%02x char=%02x keyState=%08lx\n",
 	      ir.Event.KeyEvent.bKeyDown ? "Down" : "Up  ", ir.Event.KeyEvent.wRepeatCount,
@@ -734,7 +734,7 @@
 
 	func = NULL;
 	for (km = (use_emacs) ? EmacsKeyMap : Win32KeyMap; km->entries != NULL; km++)
-	{	
+	{
 	    if (km->keyState != ks)
 		continue;
 	    if (km->chkChar)
@@ -765,7 +765,7 @@
 	if (ctx.ofs != ofs)
 	    SetConsoleCursorPosition(ctx.hConOut, WCEL_GetCoord(&ctx, ctx.ofs));
     }
-    if (ctx.error) 
+    if (ctx.error)
     {
 	HeapFree(GetProcessHeap(), 0, ctx.line);
 	ctx.line = NULL;
diff --git a/win32/except.c b/win32/except.c
index f1a628e..c10af02 100644
--- a/win32/except.c
+++ b/win32/except.c
@@ -23,15 +23,15 @@
  *  __try{...}__except(..){....}  and
  *  __try{...}__finally{...}
  *  statements is simply not documented by Microsoft. There could be different
- *  reasons for this: 
- *  One reason could be that they try to hide the fact that exception 
- *  handling in Win32 looks almost the same as in OS/2 2.x.  
+ *  reasons for this:
+ *  One reason could be that they try to hide the fact that exception
+ *  handling in Win32 looks almost the same as in OS/2 2.x.
  *  Another reason could be that Microsoft does not want others to write
- *  binary compatible implementations of the Win32 API (like us).  
+ *  binary compatible implementations of the Win32 API (like us).
  *
- *  Whatever the reason, THIS SUCKS!! Ensuring portability or future 
- *  compatibility may be valid reasons to keep some things undocumented. 
- *  But exception handling is so basic to Win32 that it should be 
+ *  Whatever the reason, THIS SUCKS!! Ensuring portability or future
+ *  compatibility may be valid reasons to keep some things undocumented.
+ *  But exception handling is so basic to Win32 that it should be
  *  documented!
  *
  */
@@ -64,8 +64,8 @@
 {
     EXCEPTION_RECORD record;
 
-    /* Compose an exception record */ 
-    
+    /* Compose an exception record */
+
     record.ExceptionCode    = code;
     record.ExceptionFlags   = flags & EH_NONCONTINUABLE;
     record.ExceptionRecord  = NULL;
@@ -219,7 +219,7 @@
 
     MESSAGE("wine: Unhandled exception, starting debugger...\n");
 
-    if (!RegOpenKeyA(HKEY_LOCAL_MACHINE, 
+    if (!RegOpenKeyA(HKEY_LOCAL_MACHINE,
 		     "Software\\Microsoft\\Windows NT\\CurrentVersion\\AeDebug", &hDbgConf)) {
        DWORD 	type;
        DWORD 	count;
@@ -345,11 +345,11 @@
 	    }
 	    return ret;
 	}
-	
+
 	/* someone beat us here... */
 	CloseHandle( hEvent );
     }
-	
+
     /* and wait for the winner to have actually created the debugger */
     WaitForSingleObject( hRunOnce, INFINITE );
     /* in fact, here, we only know that someone has tried to start the debugger,
@@ -373,9 +373,9 @@
 	status = send_debug_event( epointers->ExceptionRecord, FALSE, epointers->ContextRecord );
 	switch (status)
 	{
-	case DBG_CONTINUE: 
+	case DBG_CONTINUE:
 	    return EXCEPTION_CONTINUE_EXECUTION;
-	case DBG_EXCEPTION_NOT_HANDLED: 
+	case DBG_EXCEPTION_NOT_HANDLED:
 	    TerminateProcess( GetCurrentProcess(), epointers->ExceptionRecord->ExceptionCode );
 	    break; /* not reached */
 	case 0: /* no debugger is present */
@@ -387,7 +387,7 @@
 	    /* second try, the debugger isn't present... */
 	    if (loop == 1) return EXCEPTION_EXECUTE_HANDLER;
 	    break;
-	default: 	
+	default:
 	    FIXME("Unsupported yet debug continue value %d (please report)\n", status);
 	    return EXCEPTION_EXECUTE_HANDLER;
 	}
@@ -399,14 +399,14 @@
 	    DWORD ret = top_filter( epointers );
 	    if (ret != EXCEPTION_CONTINUE_SEARCH) return ret;
 	}
-	
+
 	/* FIXME: Should check the current error mode */
-	
+
 	if (!start_debugger_atomic( epointers ))
 	    return EXCEPTION_EXECUTE_HANDLER;
 	/* now that we should have a debugger attached, try to resend event */
-    }	
-	
+    }
+
     return EXCEPTION_EXECUTE_HANDLER;
 }
 
diff --git a/win32/init.c b/win32/init.c
index a9490b5..f7c05bd 100644
--- a/win32/init.c
+++ b/win32/init.c
@@ -32,7 +32,7 @@
 #include "wine/debug.h"
 
 WINE_DEFAULT_DEBUG_CHANNEL(win32);
-  
+
 /* filter for page-fault exceptions */
 static WINE_EXCEPTION_FILTER(page_fault)
 {
diff --git a/win32/newfns.c b/win32/newfns.c
index c3e85d4..80219c6 100644
--- a/win32/newfns.c
+++ b/win32/newfns.c
@@ -52,7 +52,7 @@
     double		cpuMHz;
 
     TRACE("()\n");
-    
+
     if (IsProcessorFeaturePresent( PF_RDTSC_INSTRUCTION_AVAILABLE ))
     {
 	/* rdtsc is available.  However, in order to use it
@@ -97,7 +97,7 @@
     QUERYPERF_Initialized = TRUE;
 }
 
-		    
+
 /****************************************************************************
  *		QueryPerformanceCounter (KERNEL32.@)
  */
@@ -140,7 +140,7 @@
 	return TRUE;
     }
 #endif
-    
+
     frequency->s.LowPart	= 1000000;
     frequency->s.HighPart	= 0;
     return TRUE;
@@ -201,7 +201,7 @@
 
 /******************************************************************************
  * CreateMailslotW [KERNEL32.@]  Creates a mailslot with specified name
- * 
+ *
  * PARAMS
  *    lpName          [I] Pointer to string for mailslot name
  *    nMaxMessageSize [I] Maximum message size
@@ -215,7 +215,7 @@
 HANDLE WINAPI CreateMailslotW( LPCWSTR lpName, DWORD nMaxMessageSize,
                                    DWORD lReadTimeout, LPSECURITY_ATTRIBUTES sa )
 {
-    FIXME("(%s,%ld,%ld,%p): stub\n", debugstr_w(lpName), 
+    FIXME("(%s,%ld,%ld,%p): stub\n", debugstr_w(lpName),
           nMaxMessageSize, lReadTimeout, sa);
     return 1;
 }
@@ -230,7 +230,7 @@
  *    lpNextSize       [O] Address of size of next message
  *    lpMessageCount   [O] Address of number of messages
  *    lpReadTimeout    [O] Address of read time-out
- * 
+ *
  * RETURNS
  *    Success: TRUE
  *    Failure: FALSE
@@ -264,8 +264,8 @@
 
 
 /******************************************************************************
- * GetCompressedFileSizeW [KERNEL32.@]  
- * 
+ * GetCompressedFileSizeW [KERNEL32.@]
+ *
  * RETURNS
  *    Success: Low-order doubleword of number of bytes
  *    Failure: 0xffffffff
@@ -280,7 +280,7 @@
 
 
 /******************************************************************************
- * SetComputerNameA [KERNEL32.@]  
+ * SetComputerNameA [KERNEL32.@]
  */
 BOOL WINAPI SetComputerNameA( LPCSTR lpComputerName )
 {
@@ -300,7 +300,7 @@
  *
  * PARAMS
  *    lpComputerName [I] Address of new computer name
- * 
+ *
  * RETURNS STD
  */
 BOOL WINAPI SetComputerNameW( LPCWSTR lpComputerName )
diff --git a/windows/caret.c b/windows/caret.c
index 52ceaf9..1d278ab 100644
--- a/windows/caret.c
+++ b/windows/caret.c
@@ -100,7 +100,7 @@
     ReleaseDC( Caret.hwnd, hdc );
 }
 
-  
+
 /*****************************************************************
  *               CARET_Callback
  */
@@ -128,7 +128,7 @@
  */
 static void CARET_ResetTimer(void)
 {
-    if (Caret.timerid) 
+    if (Caret.timerid)
     {
 	KillSystemTimer( (HWND)0, Caret.timerid );
 	Caret.timerid = SetSystemTimer( (HWND)0, 0, Caret.timeout,
@@ -142,7 +142,7 @@
  */
 static void CARET_KillTimer(void)
 {
-    if (Caret.timerid) 
+    if (Caret.timerid)
     {
 	KillSystemTimer( (HWND)0, Caret.timerid );
 	Caret.timerid = 0;
@@ -171,8 +171,8 @@
         Caret.height = bmp.bmHeight;
 	bmp.bmBits = NULL;
 	Caret.hBmp = CreateBitmapIndirect(&bmp);
- 
-	if (Caret.hBmp) 
+
+	if (Caret.hBmp)
 	{
 	    /* copy the bitmap */
 	    LPBYTE buf = HeapAlloc(GetProcessHeap(), 0, bmp.bmWidthBytes * bmp.bmHeight);
@@ -201,7 +201,7 @@
 		r.left = r.top = 0;
 		r.right = Caret.width;
 		r.bottom = Caret.height;
-		    
+
 		if ((Caret.hBmp = CreateCompatibleBitmap(hMemDC, Caret.width, Caret.height)))
 		{
 		    HBITMAP hPrevBmp = SelectObject(hMemDC, Caret.hBmp);
@@ -223,7 +223,7 @@
     Caret.timeout = GetProfileIntA( "windows", "CursorBlinkRate", 500 );
     return TRUE;
 }
-   
+
 
 /*****************************************************************
  *		DestroyCaret (USER.164)
diff --git a/windows/class.c b/windows/class.c
index 4a2df8e..6229abf 100644
--- a/windows/class.c
+++ b/windows/class.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
  *
- * FIXME: In win32 all classes are local. They are registered at 
+ * FIXME: In win32 all classes are local. They are registered at
  *	  program start. Processes CANNOT share classes. (Source: some
  *	  win31->NT migration book)
  *
@@ -312,8 +312,8 @@
  * NOTES
  *  980805 a local class will be found now if registred with hInst=0
  *  and looed up with a hInst!=0. msmoney does it (jsch)
- *  
- *  Local class registered with a USER instance handle are found as if 
+ *
+ *  Local class registered with a USER instance handle are found as if
  *  they were global classes.
  */
 static CLASS *CLASS_FindClassByAtom( ATOM atom, HINSTANCE hinstance )
@@ -342,7 +342,7 @@
             }
         }
     }
-    
+
     /* Then search global classes */
 
     for (class = firstClass; (class); class = class->next)
@@ -368,7 +368,7 @@
         WARN("-- found local Class registred with hInst=0\n");
         return tclass;
     }
-    
+
     TRACE("-- not found\n");
     return 0;
 }
@@ -594,10 +594,10 @@
                    wc->hbrBackground, wc->style, wc->cbClsExtra,
                    wc->cbWndExtra, classPtr,
                    HIWORD(wc->lpszClassName) ? wc->lpszClassName : "" );
-    
+
     iSmIconWidth  = GetSystemMetrics(SM_CXSMICON);
     iSmIconHeight = GetSystemMetrics(SM_CYSMICON);
-    
+
     classPtr->hIcon         = wc->hIcon;
     classPtr->hIconSm       = CopyImage(wc->hIcon, IMAGE_ICON,
 					iSmIconWidth, iSmIconHeight,
@@ -634,7 +634,7 @@
                    atom, (DWORD)wc->lpfnWndProc, wc->hInstance,
                    wc->hbrBackground, wc->style, wc->cbClsExtra,
                    wc->cbWndExtra, classPtr );
-    
+
     iSmIconWidth  = GetSystemMetrics(SM_CXSMICON);
     iSmIconHeight = GetSystemMetrics(SM_CYSMICON);
 
@@ -673,7 +673,7 @@
                    atom, (DWORD)wc->lpfnWndProc, hInstance,
                    wc->hbrBackground, wc->style, wc->cbClsExtra,
                    wc->cbWndExtra, classPtr );
-    
+
     classPtr->hIcon         = wc->hIcon;
     classPtr->hIconSm       = wc->hIconSm;
     classPtr->hCursor       = wc->hCursor;
@@ -707,7 +707,7 @@
                    atom, (DWORD)wc->lpfnWndProc, wc->hInstance,
                    wc->hbrBackground, wc->style, wc->cbClsExtra,
                    wc->cbWndExtra, classPtr );
-    
+
     classPtr->hIcon         = (HICON16)wc->hIcon;
     classPtr->hIconSm       = (HICON16)wc->hIconSm;
     classPtr->hCursor       = (HCURSOR16)wc->hCursor;
@@ -740,7 +740,7 @@
                    atom, (DWORD)wc->lpfnWndProc, wc->hInstance,
                    wc->hbrBackground, wc->style, wc->cbClsExtra,
                    wc->cbWndExtra, classPtr );
-    
+
     classPtr->hIcon         = (HICON16)wc->hIcon;
     classPtr->hIconSm       = (HICON16)wc->hIconSm;
     classPtr->hCursor       = (HCURSOR16)wc->hCursor;
@@ -1257,9 +1257,9 @@
     CLASS *classPtr;
 
     TRACE("%x %p %p\n",hInstance, name, wc);
-    
+
     if (!(atom = GlobalFindAtomA( name )) ||
-        !(classPtr = CLASS_FindClassByAtom( atom, hInstance )) 
+        !(classPtr = CLASS_FindClassByAtom( atom, hInstance ))
 	/*|| (hInstance != classPtr->hInstance) */ ) return FALSE;
     wc->style         = classPtr->style;
     wc->lpfnWndProc   = (WNDPROC)CLASS_GetProc( classPtr, WIN_PROC_32A );
@@ -1288,7 +1288,7 @@
     CLASS *classPtr;
 
     TRACE("%x %p %p\n",hInstance, name, wc);
-    
+
     if (!(atom = GlobalFindAtomW( name )) ||
         !(classPtr = CLASS_FindClassByAtom( atom, hInstance )) ||
         (hInstance != classPtr->hInstance)) return FALSE;
@@ -1331,7 +1331,7 @@
     CLASS *class = firstClass;
 
     TRACE("%p\n",pClassEntry);
-   
+
     if (!pClassEntry->wNext) return FALSE;
     for (i = 1; (i < pClassEntry->wNext) && class; i++) class = class->next;
     if (!class)
diff --git a/windows/clipboard.c b/windows/clipboard.c
index 3a8a879..9927eda 100644
--- a/windows/clipboard.c
+++ b/windows/clipboard.c
@@ -132,7 +132,7 @@
    */
   if ( hClipLock == hTaskCur )
       bIsLocked = FALSE;
-      
+
   else if ( hTaskCur == hTaskClipOwner )
   {
       /* Check if we're currently executing inside a window procedure
@@ -143,7 +143,7 @@
        */
 #if 0
       MESSAGEQUEUE *queue = QUEUE_Current();
-      
+
       if ( queue
            && queue->smWaiting
            && queue->smWaiting->msg == WM_RENDERFORMAT
@@ -196,7 +196,7 @@
 void CLIPBOARD_DeleteRecord(LPWINE_CLIPFORMAT lpFormat, BOOL bChange)
 {
     if( (lpFormat->wFormatID >= CF_GDIOBJFIRST &&
-	 lpFormat->wFormatID <= CF_GDIOBJLAST) || lpFormat->wFormatID == CF_BITMAP 
+	 lpFormat->wFormatID <= CF_GDIOBJLAST) || lpFormat->wFormatID == CF_BITMAP
 	    || lpFormat->wFormatID == CF_PALETTE)
     {
       if (lpFormat->hData32)
@@ -220,9 +220,9 @@
           PostMessageA(hWndClipOwner, WM_TIMER,
                        (WPARAM)lpFormat->hDataSrc32, (LPARAM)CLIPBOARD_GlobalFreeProc);
         }
-          
+
 	if (lpFormat->hData16)
-	  /* HMETAFILE16 and HMETAFILE32 are apparently the same thing, 
+	  /* HMETAFILE16 and HMETAFILE32 are apparently the same thing,
 	     and a shallow copy is enough to share a METAFILEPICT
 	     structure between 16bit and 32bit clipboards.  The MetaFile
 	     should of course only be deleted once. */
@@ -234,7 +234,7 @@
 	GlobalFree16(lpFormat->hData16);
       }
     }
-    else 
+    else
     {
       if (lpFormat->hData32)
       {
@@ -258,7 +258,7 @@
 	GlobalFree16(lpFormat->hData16);
     }
 
-    lpFormat->wDataPresent = 0; 
+    lpFormat->wDataPresent = 0;
     lpFormat->hData16 = 0;
     lpFormat->hData32 = 0;
     lpFormat->hDataSrc32 = 0;
@@ -272,7 +272,7 @@
  */
 void CLIPBOARD_EmptyCache( BOOL bChange )
 {
-    LPWINE_CLIPFORMAT lpFormat = ClipFormats; 
+    LPWINE_CLIPFORMAT lpFormat = ClipFormats;
 
     while(lpFormat)
     {
@@ -312,16 +312,16 @@
 BOOL CLIPBOARD_IsCacheRendered()
 {
     LPWINE_CLIPFORMAT lpFormat = ClipFormats;
-    
+
     /* check if all formats were rendered */
     while(lpFormat)
     {
         if( lpFormat->wDataPresent && !lpFormat->hData16 && !lpFormat->hData32 )
             return FALSE;
-        
+
         lpFormat = lpFormat->NextFormat;
     }
-    
+
     return TRUE;
 }
 
@@ -356,7 +356,7 @@
     HGLOBAL hGlobalDest;
     PVOID pGlobalSrc, pGlobalDest;
     DWORD cBytes;
-    
+
     if ( !hGlobalSrc )
       return 0;
 
@@ -369,14 +369,14 @@
                                cBytes );
     if ( !hGlobalDest )
       return 0;
-    
+
     pGlobalSrc = GlobalLock(hGlobalSrc);
     pGlobalDest = GlobalLock(hGlobalDest);
     if ( !pGlobalSrc || !pGlobalDest )
       return 0;
 
     memcpy(pGlobalDest, pGlobalSrc, cBytes);
-        
+
     GlobalUnlock(hGlobalSrc);
     GlobalUnlock(hGlobalDest);
 
@@ -404,7 +404,7 @@
    * we must ask the driver to render the data to the clipboard cache.
    */
   TRACE("enter format=%d\n", lpFormat->wFormatID);
-  if ( !USER_Driver.pIsSelectionOwner() 
+  if ( !USER_Driver.pIsSelectionOwner()
        && USER_Driver.pIsClipboardFormatAvailable( lpFormat->wFormatID ) )
   {
     if ( !USER_Driver.pGetClipboardData( lpFormat->wFormatID ) )
@@ -426,7 +426,7 @@
     }
     else
     {
-      WARN("\thWndClipOwner (%04x) is lost!\n", 
+      WARN("\thWndClipOwner (%04x) is lost!\n",
 	   hWndClipOwner);
       CLIPBOARD_ReleaseOwner();
       lpFormat->wDataPresent = 0;
@@ -502,10 +502,10 @@
  */
 static LPWINE_CLIPFORMAT CLIPBOARD_RenderText( UINT wFormat )
 {
-    LPWINE_CLIPFORMAT lpSource = ClipFormats; 
+    LPWINE_CLIPFORMAT lpSource = ClipFormats;
     LPWINE_CLIPFORMAT lpTarget = NULL;
     BOOL foundData = FALSE;
- 
+
     /* Asked for CF_TEXT */
     if( wFormat == CF_TEXT)
     {
@@ -588,7 +588,7 @@
 	}
     }
     if (!foundData)
-    {   
+    {
         if ((wFormat == CF_TEXT) || (wFormat == CF_OEMTEXT))
         {
             lpSource = &ClipFormats[CF_UNICODETEXT-1];
@@ -608,9 +608,9 @@
     if( lpTarget != lpSource && !lpTarget->hData16 && !lpTarget->hData32 )
     {
         INT src_chars, dst_chars, alloc_size;
-        LPCSTR lpstrS; 
+        LPCSTR lpstrS;
         LPSTR  lpstrT;
-    
+
         if (lpSource->hData32)
         {
           lpstrS = (LPSTR)GlobalLock(lpSource->hData32);
@@ -619,7 +619,7 @@
         {
           lpstrS = (LPSTR)GlobalLock16(lpSource->hData16);
         }
-    
+
         if( !lpstrS ) return NULL;
 
 	/* Text always NULL terminated */
@@ -678,12 +678,12 @@
     {
 	/* walk up to the specified format record */
 
-	if( !(lpFormat = __lookup_format( lpFormat, wFormat )) ) 
+	if( !(lpFormat = __lookup_format( lpFormat, wFormat )) )
 	    return 0;
 	lpFormat = lpFormat->NextFormat; /* right */
     }
 
-    while(TRUE) 
+    while(TRUE)
     {
 	if (lpFormat == NULL) return 0;
 
@@ -721,7 +721,7 @@
 
 
 /**************************************************************************
- *                WIN32 Clipboard implementation 
+ *                WIN32 Clipboard implementation
  **************************************************************************/
 
 /**************************************************************************
@@ -800,7 +800,7 @@
         WARN("Clipboard not opened by calling task!\n");
         return FALSE;
     }
-    
+
     /* destroy private objects */
 
     if (hWndClipOwner) SendMessageW( hWndClipOwner, WM_DESTROYCLIPBOARD, 0, 0 );
@@ -813,7 +813,7 @@
 
     /* Save the current task */
     hTaskClipOwner = GetCurrentTask();
-    
+
     /* Tell the driver to acquire the selection */
     USER_Driver.pAcquireClipboard();
 
@@ -858,7 +858,7 @@
     /* Pass on the request to the driver */
     USER_Driver.pSetClipboardData(wFormat);
 
-    if ( lpFormat->wDataPresent || lpFormat->hData16 || lpFormat->hData32 ) 
+    if ( lpFormat->wDataPresent || lpFormat->hData16 || lpFormat->hData32 )
     {
 	CLIPBOARD_DeleteRecord(lpFormat, TRUE);
 
@@ -950,7 +950,7 @@
         lpFormat->hData32 = CLIPBOARD_GlobalDupMem( hData );
     else
         lpFormat->hData32 = hData;          /* 0 is legal, see WM_RENDERFORMAT */
-    
+
     lpFormat->hData16 = 0;
 
     return lpFormat->hData32;   /* Should we return lpFormat->hDataSrc32 */
@@ -962,7 +962,7 @@
  */
 HANDLE16 WINAPI GetClipboardData16( UINT16 wFormat )
 {
-    LPWINE_CLIPFORMAT lpRender = ClipFormats; 
+    LPWINE_CLIPFORMAT lpRender = ClipFormats;
 
     TRACE("(%04X)\n", wFormat);
 
@@ -982,7 +982,7 @@
 	lpRender = __lookup_format( ClipFormats, wFormat );
         if( !lpRender || !CLIPBOARD_RenderFormat(lpRender) ) return 0;
     }
-   
+
     /* Convert between 32 -> 16 bit data, if necessary */
     if( lpRender->hData32 && !lpRender->hData16
         && CLIPBOARD_IsMemoryObject(wFormat) )
@@ -992,7 +992,7 @@
 	size = sizeof( METAFILEPICT16 );
       else
           size = GlobalSize(lpRender->hData32);
-      
+
       lpRender->hData16 = GlobalAlloc16(GMEM_ZEROINIT, size);
       if( !lpRender->hData16 )
 	ERR("(%04X) -- not enough memory in 16b heap\n", wFormat);
@@ -1003,14 +1003,14 @@
           FIXME("\timplement function CopyMetaFilePict32to16\n");
           FIXME("\tin the appropriate file.\n");
   #ifdef SOMEONE_IMPLEMENTED_ME
-          CopyMetaFilePict32to16( GlobalLock16(lpRender->hData16), 
+          CopyMetaFilePict32to16( GlobalLock16(lpRender->hData16),
                                   GlobalLock(lpRender->hData32) );
   #endif
         }
         else
         {
-          memcpy( GlobalLock16(lpRender->hData16), 
-                  GlobalLock(lpRender->hData32), 
+          memcpy( GlobalLock16(lpRender->hData16),
+                  GlobalLock(lpRender->hData32),
                   size );
         }
 	GlobalUnlock16(lpRender->hData16);
@@ -1018,7 +1018,7 @@
       }
     }
 
-    TRACE("\treturning %04x (type %i)\n", 
+    TRACE("\treturning %04x (type %i)\n",
 			      lpRender->hData16, lpRender->wFormatID);
     return lpRender->hData16;
 }
@@ -1029,7 +1029,7 @@
  */
 HANDLE WINAPI GetClipboardData( UINT wFormat )
 {
-    LPWINE_CLIPFORMAT lpRender = ClipFormats; 
+    LPWINE_CLIPFORMAT lpRender = ClipFormats;
 
     TRACE("(%08X)\n", wFormat);
 
@@ -1049,7 +1049,7 @@
 	lpRender = __lookup_format( ClipFormats, wFormat );
         if( !lpRender || !CLIPBOARD_RenderFormat(lpRender) ) return 0;
     }
-   
+
     /* Convert between 16 -> 32 bit data, if necessary */
     if( lpRender->hData16 && !lpRender->hData32
         && CLIPBOARD_IsMemoryObject(wFormat) )
@@ -1066,21 +1066,21 @@
 	FIXME("\timplement function CopyMetaFilePict16to32\n");
 	FIXME("\tin the appropriate file.\n");
 #ifdef SOMEONE_IMPLEMENTED_ME
-	CopyMetaFilePict16to32( GlobalLock16(lpRender->hData32), 
+	CopyMetaFilePict16to32( GlobalLock16(lpRender->hData32),
 			        GlobalLock(lpRender->hData16) );
 #endif
       }
       else
       {
-	memcpy( GlobalLock(lpRender->hData32), 
-		GlobalLock16(lpRender->hData16), 
+	memcpy( GlobalLock(lpRender->hData32),
+		GlobalLock16(lpRender->hData16),
 		size );
       }
       GlobalUnlock(lpRender->hData32);
       GlobalUnlock16(lpRender->hData16);
     }
 
-    TRACE("\treturning %04x (type %i)\n", 
+    TRACE("\treturning %04x (type %i)\n",
 			      lpRender->hData32, lpRender->wFormatID);
     return lpRender->hData32;
 }
@@ -1101,11 +1101,11 @@
 INT WINAPI CountClipboardFormats(void)
 {
     INT FormatCount = 0;
-    LPWINE_CLIPFORMAT lpFormat = ClipFormats; 
+    LPWINE_CLIPFORMAT lpFormat = ClipFormats;
 
     TRACE("()\n");
 
-    while(TRUE) 
+    while(TRUE)
     {
 	if (lpFormat == NULL) break;
 
@@ -1170,8 +1170,8 @@
  */
 UINT WINAPI RegisterClipboardFormatA( LPCSTR FormatName )
 {
-    LPWINE_CLIPFORMAT lpNewFormat; 
-    LPWINE_CLIPFORMAT lpFormat = ClipFormats; 
+    LPWINE_CLIPFORMAT lpNewFormat;
+    LPWINE_CLIPFORMAT lpFormat = ClipFormats;
 
     if (FormatName == NULL) return 0;
 
@@ -1179,14 +1179,14 @@
 
     /* walk format chain to see if it's already registered */
 
-    while(TRUE) 
+    while(TRUE)
     {
 	if ( !strcmp(lpFormat->Name,FormatName) )
 	{
 	     lpFormat->wRefCount++;
 	     return lpFormat->wFormatID;
 	}
- 
+
 	if ( lpFormat->NextFormat == NULL ) break;
 
 	lpFormat = lpFormat->NextFormat;
@@ -1221,7 +1221,7 @@
 
     /* Pass on the registration request to the driver */
     USER_Driver.pRegisterClipboardFormat( FormatName );
-    
+
     return LastRegFormat++;
 }
 
@@ -1265,7 +1265,7 @@
 
     TRACE("(%04X, %p, %d) !\n", wFormat, retStr, maxlen);
 
-    if (lpFormat == NULL || lpFormat->Name == NULL || 
+    if (lpFormat == NULL || lpFormat->Name == NULL ||
 	lpFormat->wFormatID < CF_REGFORMATBASE) return 0;
 
     TRACE("Name='%s' !\n", lpFormat->Name);
@@ -1283,7 +1283,7 @@
     INT ret;
     LPSTR p = HeapAlloc( GetProcessHeap(), 0, maxlen );
     if(p == NULL) return 0; /* FIXME: is this the correct failure value? */
-    
+
     ret = GetClipboardFormatNameA( wFormat, p, maxlen );
 
     if (maxlen > 0 && !MultiByteToWideChar( CP_ACP, 0, p, -1, retStr, maxlen ))
diff --git a/windows/cursoricon.c b/windows/cursoricon.c
index 022b735..615bdee 100644
--- a/windows/cursoricon.c
+++ b/windows/cursoricon.c
@@ -101,7 +101,7 @@
  *             map_fileW
  *
  * Helper function to map a file to memory:
- *  name			-	file name 
+ *  name			-	file name
  *  [RETURN] ptr		-	pointer to mapped file
  */
 static void *map_fileW( LPCWSTR name )
@@ -149,12 +149,12 @@
 }
 
 /*************************************************************************
- * CURSORICON_FindCache 
+ * CURSORICON_FindCache
  *
  * Given a handle, find the corresponding cache element
  *
  * PARAMS
- *      Handle     [I] handle to an Image 
+ *      Handle     [I] handle to an Image
  *
  * RETURNS
  *     Success: The cache entry
@@ -247,7 +247,7 @@
         {
             ICONCACHE *freePtr = *ptr;
             *ptr = freePtr->next;
-            
+
             GlobalFree16( freePtr->handle );
             HeapFree( GetProcessHeap(), 0, freePtr );
             continue;
@@ -266,7 +266,7 @@
 static CURSORICONDIRENTRY *CURSORICON_FindBestIcon( CURSORICONDIR *dir, int width,
                                               int height, int colors )
 {
-    int i; 
+    int i;
     CURSORICONDIRENTRY *entry, *bestEntry = NULL;
     UINT iTotalDiff, iXDiff=0, iYDiff=0, iColorDiff;
     UINT iTempXDiff, iTempYDiff, iTempColorDiff;
@@ -393,7 +393,7 @@
     if ( *(LPDWORD)bits==0x46464952 ) /* "RIFF" */
     { LPBYTE pos = (LPBYTE) bits;
       FIXME_(cursor)("Animated icons not correctly implemented! %p \n", bits);
-	
+
       for (;;)
       { if (*(LPDWORD)pos==0x6e6f6369)		/* "icon" */
         { FIXME_(cursor)("icon entry found! %p\n", bits);
@@ -415,7 +415,7 @@
 
     for (i=0; i < entries; i++)
       size += bits->idEntries[i].dwDIBSize + (fCursor ? sizeof(POINT16): 0);
-    
+
     if (!(*ptr = HeapAlloc( GetProcessHeap(), 0,
                             entries * sizeof (CURSORICONDIRENTRY*)))) goto fail;
     if (!(*res = HeapAlloc( GetProcessHeap(), 0, size))) goto fail;
@@ -447,7 +447,7 @@
       _free += (*res)->idEntries[i].dwBytesInRes;
     }
     UnmapViewOfFile( bits );
-    return TRUE;    
+    return TRUE;
 fail:
     if (*res) HeapFree( GetProcessHeap(), 0, *res );
     if (*ptr) HeapFree( GetProcessHeap(), 0, *ptr );
@@ -459,13 +459,13 @@
 /**********************************************************************
  *	    CURSORICON_CreateFromResource
  *
- * Create a cursor or icon from in-memory resource template. 
+ * Create a cursor or icon from in-memory resource template.
  *
  * FIXME: Convert to mono when cFlag is LR_MONOCHROME. Do something
  *        with cbSize parameter as well.
  */
 static HGLOBAL16 CURSORICON_CreateFromResource( HINSTANCE16 hInstance, HGLOBAL16 hObj, LPBYTE bits,
-	 					UINT cbSize, BOOL bIcon, DWORD dwVersion, 
+	 					UINT cbSize, BOOL bIcon, DWORD dwVersion,
 						INT width, INT height, UINT loadflags )
 {
     static HDC hdcMem;
@@ -521,7 +521,7 @@
 
         /* Make sure we have room for the monochrome bitmap later on.
 	 * Note that BITMAPINFOINFO and BITMAPCOREHEADER are the same
-	 * up to and including the biBitCount. In-memory icon resource 
+	 * up to and including the biBitCount. In-memory icon resource
 	 * format is as follows:
 	 *
 	 *   BITMAPINFOHEADER   icHeader  // DIB header
@@ -530,10 +530,10 @@
 	 *   BYTE            icAND[]      // DIB bits for AND mask
 	 */
 
-    	if ((pInfo = (BITMAPINFO *)HeapAlloc( GetProcessHeap(), 0, 
+    	if ((pInfo = (BITMAPINFO *)HeapAlloc( GetProcessHeap(), 0,
 	  max(size, sizeof(BITMAPINFOHEADER) + 2*sizeof(RGBQUAD)))))
-	{	
-	    memcpy( pInfo, bmi, size );	
+	{
+	    memcpy( pInfo, bmi, size );
 	    pInfo->bmiHeader.biHeight /= 2;
 
 	    /* Create the XOR bitmap */
@@ -611,11 +611,11 @@
 
 		if( !hAndBits ) DeleteObject( hXorBits );
 	    }
-	    HeapFree( GetProcessHeap(), 0, pInfo ); 
+	    HeapFree( GetProcessHeap(), 0, pInfo );
 	}
     }
 
-    if( !hXorBits || !hAndBits ) 
+    if( !hXorBits || !hAndBits )
     {
 	WARN_(cursor)("\tunable to create an icon bitmap.\n");
 	return 0;
@@ -627,9 +627,9 @@
     sizeXor = bmpXor.bmHeight * bmpXor.bmWidthBytes;
     sizeAnd = bmpAnd.bmHeight * bmpAnd.bmWidthBytes;
 
-    if (hObj) hObj = GlobalReAlloc16( hObj, 
+    if (hObj) hObj = GlobalReAlloc16( hObj,
 		     sizeof(CURSORICONINFO) + sizeXor + sizeAnd, GMEM_MOVEABLE );
-    if (!hObj) hObj = GlobalAlloc16( GMEM_MOVEABLE, 
+    if (!hObj) hObj = GlobalAlloc16( GMEM_MOVEABLE,
 		     sizeof(CURSORICONINFO) + sizeXor + sizeAnd );
     if (hObj)
     {
@@ -669,7 +669,7 @@
 HICON16 WINAPI CreateIconFromResourceEx16( LPBYTE bits, UINT16 cbSize, BOOL16 bIcon,
                                     DWORD dwVersion, INT16 width, INT16 height, UINT16 cFlag )
 {
-    return CreateIconFromResourceEx(bits, cbSize, bIcon, dwVersion, 
+    return CreateIconFromResourceEx(bits, cbSize, bIcon, dwVersion,
       width, height, cFlag);
 }
 
@@ -721,7 +721,7 @@
         else
             dirEntry = (CURSORICONDIRENTRY *)CURSORICON_FindBestIcon(dir, width, height, colors);
         bits = ptr[dirEntry->wResId-1];
-        h = CURSORICON_CreateFromResource( 0, 0, bits, dirEntry->dwBytesInRes, 
+        h = CURSORICON_CreateFromResource( 0, 0, bits, dirEntry->dwBytesInRes,
                                            !fCursor, 0x00030000, width, height, loadflags);
         HeapFree( GetProcessHeap(), 0, dir );
         HeapFree( GetProcessHeap(), 0, ptr );
@@ -738,7 +738,7 @@
         }
 
         /* Normalize hInstance (must be uniquely represented for icon cache) */
-        
+
         if ( HIWORD( hInstance ) )
             hInstance = MapHModuleLS( hInstance );
         else
@@ -752,7 +752,7 @@
 	hGroupRsrc = hRsrc;
 
         /* Find the best entry in the directory */
- 
+
         if (!(handle = LoadResource( hInstance, hRsrc ))) return 0;
         if (!(dir = (CURSORICONDIR*)LockResource( handle ))) return 0;
         if (fCursor)
@@ -770,15 +770,15 @@
 
         if (!(hRsrc = FindResourceW(hInstance,MAKEINTRESOURCEW(wResId),
                                       fCursor ? RT_CURSORW : RT_ICONW ))) return 0;
-        
+
         /* If shared icon, check whether it was already loaded */
-        if (    (loadflags & LR_SHARED) 
+        if (    (loadflags & LR_SHARED)
              && (h = CURSORICON_FindSharedIcon( hInstance, hRsrc ) ) != 0 )
             return h;
-        
+
         if (!(handle = LoadResource( hInstance, hRsrc ))) return 0;
         bits = (LPBYTE)LockResource( handle );
-        h = CURSORICON_CreateFromResource( 0, 0, bits, dwBytesInRes, 
+        h = CURSORICON_CreateFromResource( 0, 0, bits, dwBytesInRes,
                                            !fCursor, 0x00030000, width, height, loadflags);
         FreeResource( handle );
 
@@ -815,12 +815,12 @@
 }
 
 /*************************************************************************
- * CURSORICON_ExtCopy 
+ * CURSORICON_ExtCopy
  *
  * Copies an Image from the Cache if LR_COPYFROMRESOURCE is specified
  *
  * PARAMS
- *      Handle     [I] handle to an Image 
+ *      Handle     [I] handle to an Image
  *      nType      [I] Type of Handle (IMAGE_CURSOR | IMAGE_ICON)
  *      iDesiredCX [I] The Desired width of the Image
  *      iDesiredCY [I] The desired height of the Image
@@ -834,16 +834,16 @@
  *     LR_MONOCHROME should be implemented by CURSORICON_CreateFromResource.
  *     LR_COPYFROMRESOURCE will only work if the Image is in the Cache.
  *
- *     
+ *
  */
 
-HGLOBAL CURSORICON_ExtCopy(HGLOBAL Handle, UINT nType, 
-			   INT iDesiredCX, INT iDesiredCY, 
+HGLOBAL CURSORICON_ExtCopy(HGLOBAL Handle, UINT nType,
+			   INT iDesiredCX, INT iDesiredCY,
 			   UINT nFlags)
 {
     HGLOBAL16 hNew=0;
 
-    TRACE_(icon)("Handle %u, uType %u, iDesiredCX %i, iDesiredCY %i, nFlags %u\n", 
+    TRACE_(icon)("Handle %u, uType %u, iDesiredCX %i, iDesiredCY %i, nFlags %u\n",
         Handle, nType, iDesiredCX, iDesiredCY, nFlags);
 
     if(Handle == 0)
@@ -854,7 +854,7 @@
     /* Best Fit or Monochrome */
     if( (nFlags & LR_COPYFROMRESOURCE
         && (iDesiredCX > 0 || iDesiredCY > 0))
-        || nFlags & LR_MONOCHROME) 
+        || nFlags & LR_MONOCHROME)
     {
         ICONCACHE* pIconCache = CURSORICON_FindCache(Handle);
 
@@ -885,25 +885,25 @@
             if(((nFlags & LR_MONOCHROME) && !(nFlags & LR_COPYFROMRESOURCE))
                 || (iDesiredCX == 0 && iDesiredCY == 0))
             {
-                iDesiredCY = GetSystemMetrics(bIsIcon ? 
+                iDesiredCY = GetSystemMetrics(bIsIcon ?
                     SM_CYICON : SM_CYCURSOR);
-                iDesiredCX = GetSystemMetrics(bIsIcon ? 
+                iDesiredCX = GetSystemMetrics(bIsIcon ?
                     SM_CXICON : SM_CXCURSOR);
             }
 
-            /* Retrieve the CURSORICONDIRENTRY 
+            /* Retrieve the CURSORICONDIRENTRY
             */
-            if (!(hMem = LoadResource( pIconCache->hModule , 
-                            pIconCache->hGroupRsrc))) 
+            if (!(hMem = LoadResource( pIconCache->hModule ,
+                            pIconCache->hGroupRsrc)))
             {
                 return 0;
             }
-            if (!(pDir = (CURSORICONDIR*)LockResource( hMem ))) 
+            if (!(pDir = (CURSORICONDIR*)LockResource( hMem )))
             {
                 return 0;
             }
 
-            /* Find Best Fit 
+            /* Find Best Fit
             */
             if(bIsIcon)
             {
@@ -912,7 +912,7 @@
             }
             else
             {
-                pDirEntry = (CURSORICONDIRENTRY *)CURSORICON_FindBestCursor( 
+                pDirEntry = (CURSORICONDIRENTRY *)CURSORICON_FindBestCursor(
                                 pDir, iDesiredCX, iDesiredCY, 1);
             }
 
@@ -920,24 +920,24 @@
             dwBytesInRes = pDirEntry->dwBytesInRes;
             FreeResource(hMem);
 
-            TRACE_(icon)("ResID %u, BytesInRes %lu, Width %d, Height %d DX %d, DY %d\n", 
-                wResId, dwBytesInRes,  pDirEntry->ResInfo.icon.bWidth, 
+            TRACE_(icon)("ResID %u, BytesInRes %lu, Width %d, Height %d DX %d, DY %d\n",
+                wResId, dwBytesInRes,  pDirEntry->ResInfo.icon.bWidth,
                 pDirEntry->ResInfo.icon.bHeight, iDesiredCX, iDesiredCY);
 
             /* Get the Best Fit
             */
             if (!(hRsrc = FindResourceW(pIconCache->hModule ,
-                MAKEINTRESOURCEW(wResId), bIsIcon ? RT_ICONW : RT_CURSORW))) 
+                MAKEINTRESOURCEW(wResId), bIsIcon ? RT_ICONW : RT_CURSORW)))
             {
                 return 0;
             }
-            if (!(hMem = LoadResource( pIconCache->hModule , hRsrc ))) 
+            if (!(hMem = LoadResource( pIconCache->hModule , hRsrc )))
             {
                 return 0;
             }
 
             pBits = (LPBYTE)LockResource( hMem );
-         
+
 	    if(nFlags & LR_DEFAULTSIZE)
 	    {
 	        iTargetCY = GetSystemMetrics(SM_CYICON);
@@ -946,7 +946,7 @@
 
             /* Create a New Icon with the proper dimension
             */
-            hNew = CURSORICON_CreateFromResource( 0, 0, pBits, dwBytesInRes, 
+            hNew = CURSORICON_CreateFromResource( 0, 0, pBits, dwBytesInRes,
                        bIsIcon, 0x00030000, iTargetCX, iTargetCY, nFlags);
             FreeResource(hMem);
         }
@@ -972,11 +972,11 @@
        {
            hRet = CURSORICON_Copy( 0, hIcon );
 
- 
+
 	   pIcon = GlobalLock16(hRet);
 
 	   pIcon->ptHotSpot.x = pIcon->ptHotSpot.y = 15;
- 
+
 	   GlobalUnlock16(hRet);
        }
        else
@@ -990,7 +990,7 @@
 
            CURSORICONINFO cI;
 
-	   TRACE_(icon)("[%04x] %ix%i %ibpp (bogus %ibps)\n", 
+	   TRACE_(icon)("[%04x] %ix%i %ibpp (bogus %ibps)\n",
 		hIcon, pIcon->nWidth, pIcon->nHeight, pIcon->bBitsPerPixel, pIcon->nWidthBytes );
 
 	   xor_width = BITMAP_GetWidthBytes( pIcon->nWidth, bpp );
@@ -1008,9 +1008,9 @@
 
            for( iy = 0; iy < maxy; iy++ )
            {
-	      unsigned shift = iy % 2; 
+	      unsigned shift = iy % 2;
 
-              memcpy( pAndBits + iy * 4, (BYTE *)(pIcon + 1) + iy * and_width, 
+              memcpy( pAndBits + iy * 4, (BYTE *)(pIcon + 1) + iy * and_width,
 					 (and_width > 4) ? 4 : and_width );
               for( ix = 0; ix < maxx; ix++ )
               {
@@ -1146,33 +1146,33 @@
 /***********************************************************************
  *		CreateIcon (USER32.@)
  *
- *  Creates an icon based on the specified bitmaps. The bitmaps must be 
- *  provided in a device dependent format and will be resized to 
- *  (SM_CXICON,SM_CYICON) and depth converted to match the screen's color 
+ *  Creates an icon based on the specified bitmaps. The bitmaps must be
+ *  provided in a device dependent format and will be resized to
+ *  (SM_CXICON,SM_CYICON) and depth converted to match the screen's color
  *  depth. The provided bitmaps must be top-down bitmaps.
- *  Although Windows does not support 15bpp(*) this API must support it 
+ *  Although Windows does not support 15bpp(*) this API must support it
  *  for Winelib applications.
  *
- *  (*) Windows does not support 15bpp but it supports the 555 RGB 16bpp 
+ *  (*) Windows does not support 15bpp but it supports the 555 RGB 16bpp
  *      format!
  *
  * BUGS
  *
  *  - The provided bitmaps are not resized!
- *  - The documentation says the lpXORbits bitmap must be in a device 
- *    dependent format. But we must still resize it and perform depth 
+ *  - The documentation says the lpXORbits bitmap must be in a device
+ *    dependent format. But we must still resize it and perform depth
  *    conversions if necessary.
  *  - I'm a bit unsure about the how the 'device dependent format' thing works.
- *    I did some tests on windows and found that if you provide a 16bpp bitmap 
- *    in lpXORbits, then its format but be 565 RGB if the screen's bit depth 
+ *    I did some tests on windows and found that if you provide a 16bpp bitmap
+ *    in lpXORbits, then its format but be 565 RGB if the screen's bit depth
  *    is 16bpp but it must be 555 RGB if the screen's bit depth is anything
- *    else. I don't know if this is part of the GDI specs or if this is a 
+ *    else. I don't know if this is part of the GDI specs or if this is a
  *    quirk of the graphics card driver.
- *  - You may think that we check whether the bit depths match or not 
- *    as an optimization. But the truth is that the conversion using 
- *    CreateDIBitmap does not work for some bit depth (e.g. 8bpp) and I have 
+ *  - You may think that we check whether the bit depths match or not
+ *    as an optimization. But the truth is that the conversion using
+ *    CreateDIBitmap does not work for some bit depth (e.g. 8bpp) and I have
  *    no idea why.
- *  - I'm pretty sure that all the things we do in CreateIcon should 
+ *  - I'm pretty sure that all the things we do in CreateIcon should
  *    also be done in CreateIconIndirect...
  */
 HICON WINAPI CreateIcon(
@@ -1304,8 +1304,8 @@
  *		DestroyIcon32 (USER32.@)
  *
  * This routine is actually exported from Win95 USER under the name
- * DestroyIcon32 ...  The behaviour implemented here should mimic 
- * the Win95 one exactly, especially the return values, which 
+ * DestroyIcon32 ...  The behaviour implemented here should mimic
+ * the Win95 one exactly, especially the return values, which
  * depend on the setting of various flags.
  */
 WORD WINAPI DestroyIcon32( HGLOBAL16 handle, UINT16 flags )
@@ -1571,7 +1571,7 @@
  */
 BOOL WINAPI GetClipCursor( RECT *rect )
 {
-    if (rect) 
+    if (rect)
     {
        CopyRect( rect, &CURSOR_ClipRect );
        return TRUE;
@@ -1628,7 +1628,7 @@
  */
 INT16 WINAPI LookupIconIdFromDirectory16( LPBYTE dir, BOOL16 bIcon )
 {
-    return LookupIconIdFromDirectoryEx16( dir, bIcon, 
+    return LookupIconIdFromDirectoryEx16( dir, bIcon,
 	   bIcon ? GetSystemMetrics(SM_CXICON) : GetSystemMetrics(SM_CXCURSOR),
 	   bIcon ? GetSystemMetrics(SM_CYICON) : GetSystemMetrics(SM_CYCURSOR), bIcon ? 0 : LR_MONOCHROME );
 }
@@ -1638,7 +1638,7 @@
  */
 INT WINAPI LookupIconIdFromDirectory( LPBYTE dir, BOOL bIcon )
 {
-    return LookupIconIdFromDirectoryEx( dir, bIcon, 
+    return LookupIconIdFromDirectoryEx( dir, bIcon,
 	   bIcon ? GetSystemMetrics(SM_CXICON) : GetSystemMetrics(SM_CXCURSOR),
 	   bIcon ? GetSystemMetrics(SM_CYICON) : GetSystemMetrics(SM_CYCURSOR), bIcon ? 0 : LR_MONOCHROME );
 }
@@ -1656,7 +1656,7 @@
     switch(resType)
     {
 	case RT_CURSOR16:
-	     return (WORD)LookupIconIdFromDirectoryEx16( lpDir, FALSE, 
+	     return (WORD)LookupIconIdFromDirectoryEx16( lpDir, FALSE,
 			  GetSystemMetrics(SM_CXCURSOR), GetSystemMetrics(SM_CYCURSOR), LR_MONOCHROME );
 	case RT_ICON16:
 	     return (WORD)LookupIconIdFromDirectoryEx16( lpDir, TRUE,
@@ -1674,14 +1674,14 @@
  */
 HGLOBAL16 WINAPI LoadCursorIconHandler16( HGLOBAL16 hResource, HMODULE16 hModule, HRSRC16 hRsrc )
 {
-    FIXME_(cursor)("(%04x,%04x,%04x): old 2.x resources are not supported!\n", 
+    FIXME_(cursor)("(%04x,%04x,%04x): old 2.x resources are not supported!\n",
 	  hResource, hModule, hRsrc);
     return (HGLOBAL16)0;
 }
 
 /**********************************************************************
  *		LoadDIBIconHandler (USER.357)
- * 
+ *
  * RT_ICON resource loader, installed by USER_SignalProc when module
  * is initialized.
  */
@@ -1689,7 +1689,7 @@
 {
     /* If hResource is zero we must allocate a new memory block, if it's
      * non-zero but GlobalLock() returns NULL then it was discarded and
-     * we have to recommit some memory, otherwise we just need to check 
+     * we have to recommit some memory, otherwise we just need to check
      * the block size. See LoadProc() in 16-bit SDK for more.
      */
 
@@ -1697,8 +1697,8 @@
      if( hMemObj )
      {
 	 LPBYTE bits = (LPBYTE)GlobalLock16( hMemObj );
-	 hMemObj = CURSORICON_CreateFromResource( hModule, hMemObj, bits, 
-		   SizeofResource16(hModule, hRsrc), TRUE, 0x00030000, 
+	 hMemObj = CURSORICON_CreateFromResource( hModule, hMemObj, bits,
+		   SizeofResource16(hModule, hRsrc), TRUE, 0x00030000,
 		   GetSystemMetrics(SM_CXICON), GetSystemMetrics(SM_CYICON), LR_DEFAULTCOLOR );
      }
      return hMemObj;
@@ -1731,7 +1731,7 @@
 
     TRACE_(cursor)("hRes=%04x\n",hResource);
 
-    return CURSORICON_CreateFromResource( 0, 0, bits, 0, TRUE, 
+    return CURSORICON_CreateFromResource( 0, 0, bits, 0, TRUE,
 		      bNew ? 0x00030000 : 0x00020000, 0, 0, LR_DEFAULTCOLOR );
 }
 
@@ -1740,7 +1740,7 @@
  */
 HCURSOR WINAPI LoadCursorW(HINSTANCE hInstance, LPCWSTR name)
 {
-    return LoadImageW( hInstance, name, IMAGE_CURSOR, 0, 0, 
+    return LoadImageW( hInstance, name, IMAGE_CURSOR, 0, 0,
                        LR_SHARED | LR_DEFAULTSIZE );
 }
 
@@ -1749,7 +1749,7 @@
  */
 HCURSOR WINAPI LoadCursorA(HINSTANCE hInstance, LPCSTR name)
 {
-    return LoadImageA( hInstance, name, IMAGE_CURSOR, 0, 0, 
+    return LoadImageA( hInstance, name, IMAGE_CURSOR, 0, 0,
                        LR_SHARED | LR_DEFAULTSIZE );
 }
 
@@ -1758,7 +1758,7 @@
  */
 HCURSOR WINAPI LoadCursorFromFileW (LPCWSTR name)
 {
-    return LoadImageW( 0, name, IMAGE_CURSOR, 0, 0, 
+    return LoadImageW( 0, name, IMAGE_CURSOR, 0, 0,
                        LR_LOADFROMFILE | LR_DEFAULTSIZE );
 }
 
@@ -1767,16 +1767,16 @@
  */
 HCURSOR WINAPI LoadCursorFromFileA (LPCSTR name)
 {
-    return LoadImageA( 0, name, IMAGE_CURSOR, 0, 0, 
+    return LoadImageA( 0, name, IMAGE_CURSOR, 0, 0,
                        LR_LOADFROMFILE | LR_DEFAULTSIZE );
 }
-  
+
 /***********************************************************************
  *		LoadIconW (USER32.@)
  */
 HICON WINAPI LoadIconW(HINSTANCE hInstance, LPCWSTR name)
 {
-    return LoadImageW( hInstance, name, IMAGE_ICON, 0, 0, 
+    return LoadImageW( hInstance, name, IMAGE_ICON, 0, 0,
                        LR_SHARED | LR_DEFAULTSIZE );
 }
 
@@ -1785,7 +1785,7 @@
  */
 HICON WINAPI LoadIconA(HINSTANCE hInstance, LPCSTR name)
 {
-    return LoadImageA( hInstance, name, IMAGE_ICON, 0, 0, 
+    return LoadImageA( hInstance, name, IMAGE_ICON, 0, 0,
                        LR_SHARED | LR_DEFAULTSIZE );
 }
 
@@ -1857,7 +1857,7 @@
     sizeXor = bmpXor.bmHeight * bmpXor.bmWidthBytes;
     sizeAnd = bmpAnd.bmHeight * bmpAnd.bmWidthBytes;
 
-    hObj = GlobalAlloc16( GMEM_MOVEABLE, 
+    hObj = GlobalAlloc16( GMEM_MOVEABLE,
 		     sizeof(CURSORICONINFO) + sizeXor + sizeAnd );
     if (hObj)
     {
@@ -1927,7 +1927,7 @@
  *    Failure: FALSE
  */
 BOOL WINAPI DrawIconEx( HDC hdc, INT x0, INT y0, HICON hIcon,
-                            INT cxWidth, INT cyWidth, UINT istep, 
+                            INT cxWidth, INT cyWidth, UINT istep,
                             HBRUSH hbr, UINT flags )
 {
     CURSORICONINFO *ptr = (CURSORICONINFO *)GlobalLock16 (hIcon);
@@ -2007,17 +2007,17 @@
 	    HBITMAP hBitTemp = SelectObject( hMemDC, hAndBits );
 	    if (flags & DI_MASK)
             {
-	      if (DoOffscreen) 
+	      if (DoOffscreen)
 		StretchBlt (hDC_off, 0, 0, cxWidth, cyWidth,
 			      hMemDC, 0, 0, ptr->nWidth, ptr->nHeight, SRCAND);
-	      else 
+	      else
 	        StretchBlt (hdc, x0, y0, cxWidth, cyWidth,
 			      hMemDC, 0, 0, ptr->nWidth, ptr->nHeight, SRCAND);
             }
 	    SelectObject( hMemDC, hXorBits );
 	    if (flags & DI_IMAGE)
             {
-	      if (DoOffscreen) 
+	      if (DoOffscreen)
 		StretchBlt (hDC_off, 0, 0, cxWidth, cyWidth,
 			  hMemDC, 0, 0, ptr->nWidth, ptr->nHeight, SRCPAINT);
 	      else
@@ -2077,8 +2077,8 @@
       case 1: pix = pix >> 7; break;
       case 4: pix = pix >> 4; break;
       case 8: break;
-      default: 
-        WARN_(resource)("(%d): Unsupported depth\n", bmi->bmiHeader.biBitCount); 
+      default:
+        WARN_(resource)("(%d): Unsupported depth\n", bmi->bmiHeader.biBitCount);
 	return;
     }
     if (pix >= colors) {
@@ -2095,19 +2095,19 @@
     for (i=0; i<colors; i++) {
       ptr = (RGBQUAD*)((char*)bmi->bmiColors+i*incr);
       c_C = RGB(ptr->rgbRed, ptr->rgbGreen, ptr->rgbBlue);
-      if (c_C == RGB(128, 128, 128)) { 
+      if (c_C == RGB(128, 128, 128)) {
 	ptr->rgbRed = GetRValue(c_S);
 	ptr->rgbGreen = GetGValue(c_S);
 	ptr->rgbBlue = GetBValue(c_S);
-      } else if (c_C == RGB(192, 192, 192)) { 
+      } else if (c_C == RGB(192, 192, 192)) {
 	ptr->rgbRed = GetRValue(c_F);
 	ptr->rgbGreen = GetGValue(c_F);
 	ptr->rgbBlue = GetBValue(c_F);
-      } else if (c_C == RGB(223, 223, 223)) { 
+      } else if (c_C == RGB(223, 223, 223)) {
 	ptr->rgbRed = GetRValue(c_L);
 	ptr->rgbGreen = GetGValue(c_L);
 	ptr->rgbBlue = GetBValue(c_L);
-      } 
+      }
     }
 }
 
@@ -2187,7 +2187,7 @@
 
 /**********************************************************************
  *		LoadImageA (USER32.@)
- * 
+ *
  * FIXME: implementation lacks some features, see LR_ defines in winuser.h
  */
 
diff --git a/windows/dce.c b/windows/dce.c
index 4d0d41c..ab395a9 100644
--- a/windows/dce.c
+++ b/windows/dce.c
@@ -19,9 +19,9 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  *
  *
- * Note: Visible regions of CS_OWNDC/CS_CLASSDC window DCs 
- * have to be updated dynamically. 
- * 
+ * Note: Visible regions of CS_OWNDC/CS_CLASSDC window DCs
+ * have to be updated dynamically.
+ *
  * Internal DCX flags:
  *
  * DCX_DCEEMPTY    - dce is uninitialized
@@ -57,16 +57,16 @@
 static void DCE_DumpCache(void)
 {
     DCE *dce;
-    
+
     USER_Lock();
     dce = firstDCE;
-    
+
     DPRINTF("DCE:\n");
     while( dce )
     {
 	DPRINTF("\t[0x%08x] hWnd 0x%04x, dcx %08x, %s %s\n",
-	     (unsigned)dce, dce->hwndCurrent, (unsigned)dce->DCXflags, 
-	     (dce->DCXflags & DCX_CACHE) ? "Cache" : "Owned", 
+	     (unsigned)dce, dce->hwndCurrent, (unsigned)dce->DCXflags,
+	     (dce->DCXflags & DCX_CACHE) ? "Cache" : "Owned",
 	     (dce->DCXflags & DCX_DCEBUSY) ? "InUse" : "" );
 	dce = dce->next;
     }
@@ -82,7 +82,7 @@
 DCE *DCE_AllocDCE( HWND hWnd, DCE_TYPE type )
 {
     DCE * dce;
-    
+
     if (!(dce = HeapAlloc( GetProcessHeap(), 0, sizeof(DCE) ))) return NULL;
     if (!(dce->hDC = CreateDCA( "DISPLAY", NULL, NULL, NULL )))
     {
@@ -110,7 +110,7 @@
 	SetHookFlags16(dce->hDC,DCHF_INVALIDATEVISRGN);
     }
     else dce->DCXflags = DCX_CACHE | DCX_DCEEMPTY;
-    
+
     USER_Lock();
     dce->next = firstDCE;
     firstDCE = dce;
@@ -180,10 +180,10 @@
 	    {
 		if( pDCE->DCXflags & DCX_DCEBUSY ) /* shared cache DCE */
 		{
-                    /* FIXME: AFAICS we are doing the right thing here so 
-                     * this should be a WARN. But this is best left as an ERR 
-                     * because the 'application error' is likely to come from 
-                     * another part of Wine (i.e. it's our fault after all). 
+                    /* FIXME: AFAICS we are doing the right thing here so
+                     * this should be a WARN. But this is best left as an ERR
+                     * because the 'application error' is likely to come from
+                     * another part of Wine (i.e. it's our fault after all).
                      * We should change this to WARN when Wine is more stable
                      * (for 1.0?).
                      */
@@ -244,7 +244,7 @@
         dce->DCXflags &= ~DCX_DCEBUSY;
 	if (dce->DCXflags & DCX_DCEDIRTY)
 	{
-	    /* don't keep around invalidated entries 
+	    /* don't keep around invalidated entries
 	     * because SetDCState() disables hVisRgn updates
 	     * by removing dirty bit. */
 
@@ -277,7 +277,7 @@
 	TRACE("scope hwnd = %04x, (%i,%i - %i,%i)\n",
 		     hwndScope, pRectUpdate->left,pRectUpdate->top,
 		     pRectUpdate->right,pRectUpdate->bottom);
-	if(TRACE_ON(dc)) 
+	if(TRACE_ON(dc))
 	  DCE_DumpCache();
 
  	/* walk all DCEs and fixup non-empty entries */
@@ -328,7 +328,7 @@
 
 /***********************************************************************
  *           DCE_ExcludeRgn
- * 
+ *
  *  Translate given region from the wnd client to the DC coordinates
  *  and add it to the clipping region.
  */
@@ -371,7 +371,7 @@
     BOOL	bUpdateClipOrigin = FALSE;
     HWND parent, full;
 
-    TRACE("hwnd %04x, hrgnClip %04x, flags %08x\n", 
+    TRACE("hwnd %04x, hrgnClip %04x, flags %08x\n",
           hwnd, hrgnClip, (unsigned)flags);
 
     if (!hwnd) hwnd = GetDesktopWindow();
@@ -425,7 +425,7 @@
 
     /* find a suitable DCE */
 
-    dcxFlags = flags & (DCX_PARENTCLIP | DCX_CLIPSIBLINGS | DCX_CLIPCHILDREN | 
+    dcxFlags = flags & (DCX_PARENTCLIP | DCX_CLIPSIBLINGS | DCX_CLIPCHILDREN |
 		        DCX_CACHE | DCX_WINDOW);
 
     if (flags & DCX_CACHE)
@@ -453,9 +453,9 @@
 		   ((dce->DCXflags & (DCX_CLIPSIBLINGS | DCX_CLIPCHILDREN |
 				      DCX_CACHE | DCX_WINDOW | DCX_PARENTCLIP)) == dcxFlags))
 		{
-		    TRACE("\tfound valid %08x dce [%04x], flags %08x\n", 
+		    TRACE("\tfound valid %08x dce [%04x], flags %08x\n",
 					(unsigned)dce, hwnd, (unsigned)dcxFlags );
-		    bUpdateVisRgn = FALSE; 
+		    bUpdateVisRgn = FALSE;
 		    bUpdateClipOrigin = TRUE;
 		    break;
 		}
@@ -463,14 +463,14 @@
 	}
 
 	if (!dce) dce = (dceEmpty) ? dceEmpty : dceUnused;
-        
+
         /* if there's no dce empty or unused, allocate a new one */
         if (!dce)
         {
             dce = DCE_AllocDCE( 0, DCE_CACHE_DC );
         }
     }
-    else 
+    else
     {
         dce = wndPtr->dce;
         if (dce && dce->hwndCurrent == hwnd)
@@ -545,8 +545,8 @@
  *	1: Success
  *	0: Failure
  */
-INT WINAPI ReleaseDC( 
-             HWND hwnd /* [in] Handle of window - ignored */, 
+INT WINAPI ReleaseDC(
+             HWND hwnd /* [in] Handle of window - ignored */,
              HDC hdc   /* [in] Handle of device context */
 ) {
     DCE * dce;
@@ -554,12 +554,12 @@
 
     USER_Lock();
     dce = firstDCE;
-    
+
     TRACE("%04x %04x\n", hwnd, hdc );
-        
+
     while (dce && (dce->hDC != hdc)) dce = dce->next;
 
-    if ( dce ) 
+    if ( dce )
 	if ( dce->DCXflags & DCX_DCEBUSY )
             nRet = DCE_ReleaseDC( dce );
 
@@ -571,7 +571,7 @@
 /***********************************************************************
  *		DCHook (USER.362)
  *
- * See "Undoc. Windows" for hints (DC, SetDCHook, SetHookFlags)..  
+ * See "Undoc. Windows" for hints (DC, SetDCHook, SetHookFlags)..
  */
 BOOL16 WINAPI DCHook16( HDC16 hDC, WORD code, DWORD data, LPARAM lParam )
 {
@@ -637,12 +637,12 @@
 
     USER_Lock();
     dce = firstDCE;
-    
+
     while (dce && (dce->hDC != hDC)) dce = dce->next;
 
     hwnd = dce ? dce->hwndCurrent : 0;
     USER_Unlock();
-    
+
     return hwnd;
 }
 
diff --git a/windows/defdlg.c b/windows/defdlg.c
index de11848..018348d 100644
--- a/windows/defdlg.c
+++ b/windows/defdlg.c
@@ -134,10 +134,10 @@
 {
     DWORD dlgcode=0; /* initialize just to avoid a warning */
     if (hwndNew &&
-        !((dlgcode=SendMessageW(hwndNew, WM_GETDLGCODE, 0, 0 )) 
+        !((dlgcode=SendMessageW(hwndNew, WM_GETDLGCODE, 0, 0 ))
             & (DLGC_UNDEFPUSHBUTTON | DLGC_BUTTON)))
         return FALSE;  /* Destination is not a push button */
-    
+
     if (dlgInfo->idResult)  /* There's already a default pushbutton */
     {
         HWND hwndOld = GetDlgItem( hwndDlg, dlgInfo->idResult );
@@ -251,14 +251,14 @@
             }
 	    return DefWindowProcA( hwnd, msg, wParam, lParam );
 
-	case WM_GETFONT: 
+	case WM_GETFONT:
 	    return dlgInfo->hUserFont;
 
         case WM_CLOSE:
             PostMessageA( hwnd, WM_COMMAND, IDCANCEL,
                             (LPARAM)GetDlgItem( hwnd, IDCANCEL ) );
             return 0;
-    
+
         case WM_NOTIFYFORMAT:
 	    return DefWindowProcA( hwnd, msg, wParam, lParam );
     }
@@ -276,7 +276,7 @@
 	 msg == WM_CTLCOLOR || msg == WM_COMPAREITEM ||
          msg == WM_VKEYTOITEM || msg == WM_CHARTOITEM ||
          msg == WM_QUERYDRAGICON || msg == WM_INITDIALOG)
-        return fResult; 
+        return fResult;
 
     return GetWindowLongA( hwnd, DWL_MSGRESULT );
 }
diff --git a/windows/defwnd.c b/windows/defwnd.c
index 240a756..6d0b02c 100644
--- a/windows/defwnd.c
+++ b/windows/defwnd.c
@@ -160,9 +160,9 @@
            SetTextColor( hDC, GetSysColor(COLOR_3DFACE));
            SetBkColor( hDC, bk);
 
-           /* if COLOR_WINDOW happens to be the same as COLOR_3DHILIGHT 
+           /* if COLOR_WINDOW happens to be the same as COLOR_3DHILIGHT
             * we better use 0x55aa bitmap brush to make scrollbar's background
-            * look different from the window background. 
+            * look different from the window background.
             */
            if (bk == GetSysColor(COLOR_WINDOW)) {
                return CACHE_GetPattern55AABrush();
@@ -373,9 +373,9 @@
 
     case WM_NCRBUTTONUP:
         /*
-         * FIXME : we must NOT send WM_CONTEXTMENU on a WM_NCRBUTTONUP (checked 
-         * in Windows), but what _should_ we do? According to MSDN : 
-         * "If it is appropriate to do so, the system sends the WM_SYSCOMMAND 
+         * FIXME : we must NOT send WM_CONTEXTMENU on a WM_NCRBUTTONUP (checked
+         * in Windows), but what _should_ we do? According to MSDN :
+         * "If it is appropriate to do so, the system sends the WM_SYSCOMMAND
          * message to the window". When is it appropriate?
          */
         break;
@@ -428,7 +428,7 @@
 	{
 	    PAINTSTRUCT ps;
 	    HDC hdc = BeginPaint( hwnd, &ps );
-	    if( hdc ) 
+	    if( hdc )
 	    {
               HICON hIcon;
 	      if (IsIconic(hwnd) && ((hIcon = GetClassLongW( hwnd, GCL_HICON))) )
@@ -467,7 +467,7 @@
 	    if (ret) return ret;
 	}
 
-	/* Caption clicks are handled by the NC_HandleNCLButtonDown() */ 
+	/* Caption clicks are handled by the NC_HandleNCLButtonDown() */
         return (LOWORD(lParam) >= HTCLIENT) ? MA_ACTIVATE : MA_NOACTIVATE;
 
     case WM_ACTIVATE:
@@ -516,7 +516,7 @@
 
     case WM_CTLCOLOR:
 	return (LRESULT)DEFWND_ControlColor( (HDC)wParam, HIWORD(lParam) );
-	
+
     case WM_SETCURSOR:
         if (GetWindowLongW( hwnd, GWL_STYLE ) & WS_CHILD)
 	{
@@ -545,7 +545,7 @@
 		iMenuSysKey = 1;
 	      else
 		iMenuSysKey = 0;
-	    
+
 	    iF10Key = 0;
 
 	    if( wParam == VK_F4 )	/* try to close the window */
@@ -554,7 +554,7 @@
                 if (!(GetClassLongW( top, GCL_STYLE ) & CS_NOCLOSE))
                     PostMessageW( top, WM_SYSCOMMAND, SC_CLOSE, 0 );
 	    }
-	} 
+	}
 	else if( wParam == VK_F10 )
 	        iF10Key = 1;
 	     else
@@ -577,7 +577,7 @@
         {
             PostMessageW( hwnd, WM_SYSCOMMAND, SC_RESTORE, 0L );
 	    break;
-        } 
+        }
 	if ((HIWORD(lParam) & KEYDATA_ALT) && wParam)
         {
 	    if (wParam == VK_TAB || wParam == VK_ESCAPE) break;
@@ -585,7 +585,7 @@
                 SendMessageW( GetParent(hwnd), msg, wParam, lParam );
 	    else
                 SendMessageW( hwnd, WM_SYSCOMMAND, SC_KEYMENU, wParam );
-        } 
+        }
 	else /* check for Ctrl-Esc */
             if (wParam != VK_ESCAPE) MessageBeep(0);
 	break;
@@ -612,7 +612,7 @@
 	return -1;
 
     case WM_DROPOBJECT:
-	return DRAG_FILE;  
+	return DRAG_FILE;
 
     case WM_QUERYDROPOBJECT:
         return (GetWindowLongA( hwnd, GWL_EXSTYLE ) & WS_EX_ACCEPTFILES) != 0;
@@ -642,7 +642,7 @@
     case WM_NOTIFYFORMAT:
       if (IsWindowUnicode(hwnd)) return NFR_UNICODE;
       else return NFR_ANSI;
-        
+
     case WM_QUERYOPEN:
     case WM_QUERYENDSESSION:
 	return 1;
@@ -871,14 +871,14 @@
 
 /***********************************************************************
  *		DefWindowProcW (USER32.@) Calls default window message handler
- * 
- * Calls default window procedure for messages not processed 
+ *
+ * Calls default window procedure for messages not processed
  *  by application.
  *
  *  RETURNS
  *     Return value is dependent upon the message.
 */
-LRESULT WINAPI DefWindowProcW( 
+LRESULT WINAPI DefWindowProcW(
     HWND hwnd,      /* [in] window procedure receiving message */
     UINT msg,       /* [in] message identifier */
     WPARAM wParam,  /* [in] first message parameter */
diff --git a/windows/dialog.c b/windows/dialog.c
index 1e31de0..453c8f0 100644
--- a/windows/dialog.c
+++ b/windows/dialog.c
@@ -19,7 +19,7 @@
  */
 
 #include "config.h"
-#include "wine/port.h" 
+#include "wine/port.h"
 
 #include <ctype.h>
 #include <errno.h>
@@ -84,7 +84,7 @@
 } DLG_TEMPLATE;
 
   /* Radio button group */
-typedef struct 
+typedef struct
 {
     UINT firstID;
     UINT lastID;
@@ -141,7 +141,7 @@
     if (IsWindowEnabled( hOwner ))
     {
         EnableWindow( hOwner, FALSE );
-        return TRUE;    
+        return TRUE;
     }
     else
         return FALSE;
@@ -166,7 +166,7 @@
     pSize->cx = xBaseUnit;
     pSize->cy = yBaseUnit;
 
-    if(!hDC) return FALSE; 
+    if(!hDC) return FALSE;
 
     if(hFont) hFontPrev = SelectFont(hDC, hFont);
     if(!GetTextMetricsA(hDC, &tm)) return FALSE;
@@ -189,7 +189,7 @@
 static BOOL DIALOG_GetCharSize( HFONT hFont, SIZE * pSize )
 {
     HDC  hDC = GetDC(0);
-    BOOL Success = DIALOG_GetCharSizeFromDC( hDC, hFont, pSize );    
+    BOOL Success = DIALOG_GetCharSizeFromDC( hDC, hFont, pSize );
     ReleaseDC(0, hDC);
     return Success;
 }
@@ -262,7 +262,7 @@
         info->className = buffer;
         p++;
     }
-    else 
+    else
     {
 	info->className = p;
 	p += strlen(p) + 1;
@@ -377,7 +377,7 @@
         p += strlenW( (LPCWSTR)p ) + 1;
     }
 
-    TRACE("    %s %s %d, %d, %d, %d, %d, %08lx, %08lx, %08lx\n", 
+    TRACE("    %s %s %d, %d, %d, %d, %d, %08lx, %08lx, %08lx\n",
           debugstr_w( (LPCWSTR)info->className ),
           debugstr_w( (LPCWSTR)info->windowName ),
           info->id, info->x, info->y, info->cx, info->cy,
@@ -492,7 +492,7 @@
             hwndDefButton = hwndCtrl;
             dlgInfo->idResult = GetWindowLongA( hwndCtrl, GWL_ID );
         }
-    }    
+    }
     TRACE(" END\n" );
     return TRUE;
 }
@@ -790,7 +790,7 @@
 
             if( !(template.style & DS_ABSALIGN) )
                 ClientToScreen( owner, (POINT *)&rect );
-	    
+
             /* try to fit it into the desktop */
 
             if( (dX = rect.left + rect.right + GetSystemMetrics(SM_CXDLGFRAME)
@@ -872,7 +872,7 @@
             if ((GetFocus() == hwndPreInitFocus) &&
                 (GetWindowLongW( hwnd, GWL_STYLE ) & WS_VISIBLE))
             {
-                dlgInfo->hwndFocus = GetNextDlgTabItem( hwnd, 0, FALSE); 
+                dlgInfo->hwndFocus = GetNextDlgTabItem( hwnd, 0, FALSE);
                 if( dlgInfo->hwndFocus )
                     SetFocus( dlgInfo->hwndFocus );
             }
@@ -1234,7 +1234,7 @@
                  | SWP_NOZORDER | SWP_NOACTIVATE | SWP_HIDEWINDOW);
 
     /* unblock dialog loop */
-    PostMessageA(hwnd, WM_NULL, 0, 0); 
+    PostMessageA(hwnd, WM_NULL, 0, 0);
     return TRUE;
 }
 
@@ -1396,7 +1396,7 @@
                 return TRUE;
             }
             break;
-            
+
         case VK_RIGHT:
         case VK_DOWN:
         case VK_LEFT:
@@ -1404,7 +1404,7 @@
             if (!(dlgCode & DLGC_WANTARROWS))
             {
                 BOOL fPrevious = (wParam == VK_LEFT || wParam == VK_UP);
-                HWND hwndNext = 
+                HWND hwndNext =
                     GetNextDlgGroupItem (hwndDlg, GetFocus(), fPrevious );
                 SendMessageA( hwndDlg, WM_NEXTDLGCTL, (WPARAM)hwndNext, 1 );
                 return TRUE;
@@ -1421,7 +1421,7 @@
                 DWORD dw = SendMessageW( hwndDlg, DM_GETDEFID, 0, 0 );
                 if (HIWORD(dw) == DC_HASDEFID)
                 {
-                    SendMessageA( hwndDlg, WM_COMMAND, 
+                    SendMessageA( hwndDlg, WM_COMMAND,
                                     MAKEWPARAM( LOWORD(dw), BN_CLICKED ),
                                     (LPARAM)GetDlgItem(hwndDlg, LOWORD(dw)));
                 }
@@ -1429,7 +1429,7 @@
                 {
                     SendMessageA( hwndDlg, WM_COMMAND, IDOK,
                                     (LPARAM)GetDlgItem( hwndDlg, IDOK ) );
-    
+
                 }
             }
             return TRUE;
@@ -1653,7 +1653,7 @@
     char str[30];
     char * endptr;
     long result = 0;
-    
+
     if (translated) *translated = FALSE;
     if (!SendDlgItemMessageA(hwnd, id, WM_GETTEXT, sizeof(str), (LPARAM)str))
         return 0;
@@ -1698,8 +1698,8 @@
 
 /***********************************************************************
  *           CheckRB
- * 
- * Callback function used to check/uncheck radio buttons that fall 
+ *
+ * Callback function used to check/uncheck radio buttons that fall
  * within a specific range of IDs.
  */
 static BOOL CALLBACK CheckRB(HWND hwndChild, LPARAM lParam)
@@ -1707,7 +1707,7 @@
     LONG lChildID = GetWindowLongA(hwndChild, GWL_ID);
     RADIOGROUP *lpRadioGroup = (RADIOGROUP *) lParam;
 
-    if ((lChildID >= lpRadioGroup->firstID) && 
+    if ((lChildID >= lpRadioGroup->firstID) &&
         (lChildID <= lpRadioGroup->lastID))
     {
         if (lChildID == lpRadioGroup->checkID)
@@ -1736,8 +1736,8 @@
     radioGroup.firstID = min(min(firstID, lastID), checkID);
     radioGroup.lastID = max(max(firstID, lastID), checkID);
     radioGroup.checkID = checkID;
-    
-    return EnumChildWindows(hwndDlg, (WNDENUMPROC)CheckRB, 
+
+    return EnumChildWindows(hwndDlg, (WNDENUMPROC)CheckRB,
                             (LPARAM)&radioGroup);
 }
 
@@ -1840,7 +1840,7 @@
     HWND retWnd = 0;
     HWND hChildFirst = 0;
 
-    if(!hwndCtrl) 
+    if(!hwndCtrl)
     {
         hChildFirst = GetWindow(hwndDlg,GW_CHILD);
         if(fPrevious) hChildFirst = GetWindow(hChildFirst,GW_HWNDLAST);
@@ -1912,7 +1912,7 @@
 {
     hwndDlg = WIN_GetFullHandle( hwndDlg );
     hwndCtrl = WIN_GetFullHandle( hwndCtrl );
-    return DIALOG_GetNextTabItem(hwndDlg,hwndDlg,hwndCtrl,fPrevious); 
+    return DIALOG_GetNextTabItem(hwndDlg,hwndDlg,hwndCtrl,fPrevious);
 }
 
 /**********************************************************************
diff --git a/windows/driver.c b/windows/driver.c
index 02d250c..ff30f29 100644
--- a/windows/driver.c
+++ b/windows/driver.c
@@ -48,7 +48,7 @@
 static LPWINE_DRIVER	lpDrvItemList = NULL;
 
 /* TODO list :
- *	- LoadModule count and clean up is not handled correctly (it's not a 
+ *	- LoadModule count and clean up is not handled correctly (it's not a
  *	  problem as long as FreeLibrary is not working correctly)
  */
 
@@ -62,7 +62,7 @@
 static void WINE_UNUSED DRIVER_LoadStartupDrivers(void)
 {
     char  	str[256];
-    
+
     if (GetPrivateProfileStringA("drivers", NULL, "", str, sizeof(str), "SYSTEM.INI") < 2) {
     	ERR("Can't find drivers section in system.ini\n");
     } else {
@@ -87,7 +87,7 @@
 {
     LPWINE_DRIVER	lpDrv;
     WORD		count = 0;
-    
+
     for (lpDrv = lpDrvItemList; lpDrv; lpDrv = lpDrv->lpNextItem) {
 	if (lpDrv->hModule16 == lpNewDrv->hModule16) {
 	    count++;
@@ -102,9 +102,9 @@
  * From a hDrvr being 16 bits, returns the WINE internal structure.
  */
 static	LPWINE_DRIVER	DRIVER_FindFromHDrvr16(HDRVR16 hDrvr)
-{    
+{
     LPWINE_DRIVER	lpDrv;
-    
+
     for (lpDrv = lpDrvItemList; lpDrv; lpDrv = lpDrv->lpNextItem) {
 	if (lpDrv->hDriver16 == hDrvr) {
 	    break;
@@ -116,10 +116,10 @@
 /**************************************************************************
  *				DRIVER_SendMessage		[internal]
  */
-static LRESULT inline DRIVER_SendMessage(LPWINE_DRIVER lpDrv, UINT16 msg, 
+static LRESULT inline DRIVER_SendMessage(LPWINE_DRIVER lpDrv, UINT16 msg,
 					 LPARAM lParam1, LPARAM lParam2)
 {
-    TRACE("Before CallDriverProc proc=%p driverID=%08lx wMsg=%04x p1=%08lx p2=%08lx\n", 
+    TRACE("Before CallDriverProc proc=%p driverID=%08lx wMsg=%04x p1=%08lx p2=%08lx\n",
 	  lpDrv->lpDrvProc, lpDrv->dwDriverID, msg, lParam1, lParam2);
     return DRIVER_CallTo16_long_lwwll((FARPROC16)lpDrv->lpDrvProc, lpDrv->dwDriverID,
 				      lpDrv->hDriver16, msg, lParam1, lParam2);
@@ -134,15 +134,15 @@
 {
     LPWINE_DRIVER 	lpDrv;
     LRESULT 		retval = 0;
-    
+
     TRACE("(%04x, %04X, %08lX, %08lX)\n", hDriver, msg, lParam1, lParam2);
-    
+
     if ((lpDrv = DRIVER_FindFromHDrvr16(hDriver)) != NULL) {
 	retval = DRIVER_SendMessage(lpDrv, msg, lParam1, lParam2);
     } else {
 	WARN("Bad driver handle %u\n", hDriver);
     }
-    
+
     TRACE("retval = %ld\n", retval);
     return retval;
 }
@@ -160,7 +160,7 @@
 	DRIVER_SendMessage(lpDrv, DRV_DISABLE, 0L, 0L);
 	DRIVER_SendMessage(lpDrv, DRV_FREE,    0L, 0L);
     }
-    
+
     if (lpDrv->lpPrevItem)
 	lpDrv->lpPrevItem->lpNextItem = lpDrv->lpNextItem;
     else
@@ -197,7 +197,7 @@
 	LPWINE_DRIVER	lpDrv = lpDrvItemList;	/* find end of list */
 	while (lpDrv->lpNextItem != NULL)
 	    lpDrv = lpDrv->lpNextItem;
-	
+
 	lpDrv->lpNextItem = lpNewDrv;
 	lpNewDrv->lpPrevItem = lpDrv;
     }
@@ -209,7 +209,7 @@
 	DRIVER_RemoveFromList(lpNewDrv);
 	return FALSE;
     }
-    
+
     return TRUE;
 }
 
@@ -226,7 +226,7 @@
     DRIVERPROC16	lpProc;
     LPCSTR		lpSFN;
     LPSTR		ptr;
-    
+
     TRACE("('%s', %08lX);\n", lpFileName, lParam2);
 
     if (strlen(lpFileName) < 1) return lpDrv;
@@ -240,7 +240,7 @@
 	while (*ptr == ' ') ptr++;
 	if (*ptr == '\0') ptr = NULL;
     }
-    
+
     if ((hModule = LoadLibrary16(lpFileName)) < 32) goto exit;
     if ((lpProc = (DRIVERPROC16)GetProcAddress16(hModule, "DRIVERPROC")) == NULL)
 	goto exit;
@@ -254,7 +254,7 @@
     lstrcpynA(lpDrv->szAliasName, lpSFN, sizeof(lpDrv->szAliasName));
     lpDrv->hModule16   = hModule;
     lpDrv->lpDrvProc   = lpProc;
-    
+
     if (!DRIVER_AddToList(lpDrv, (LPARAM)ptr, lParam2)) goto exit;
 
     return lpDrv;
@@ -280,13 +280,13 @@
 
     if (lpSectionName == NULL) {
 	strcpy(drvName, lpDriverName);
-    
+
 	if ((lpDrv = DRIVER_TryOpenDriver16(drvName, lParam2)))
 	    goto the_end;
 	/* in case hDriver is NULL, search in Drivers section */
 	lpSectionName = "Drivers";
     }
-    if (GetPrivateProfileStringA(lpSectionName, lpDriverName, "", 
+    if (GetPrivateProfileStringA(lpSectionName, lpDriverName, "",
 				 drvName, sizeof(drvName), "SYSTEM.INI") > 0) {
 	lpDrv = DRIVER_TryOpenDriver16(drvName, lParam2);
     }
@@ -308,10 +308,10 @@
     LPWINE_DRIVER	lpDrv;
 
     TRACE("(%04x, %08lX, %08lX);\n", hDrvr, lParam1, lParam2);
-    
+
     if ((lpDrv = DRIVER_FindFromHDrvr16(hDrvr)) != NULL) {
 	DRIVER_SendMessage(lpDrv, DRV_CLOSE, lParam1, lParam2);
-    
+
 	if (DRIVER_RemoveFromList(lpDrv)) {
 	    HeapFree(GetProcessHeap(), 0, lpDrv);
 	    return TRUE;
@@ -329,9 +329,9 @@
 {
     LPWINE_DRIVER 	lpDrv;
     HMODULE16 		hModule = 0;
-    
+
     TRACE("(%04x);\n", hDrvr);
-    
+
     if ((lpDrv = DRIVER_FindFromHDrvr16(hDrvr)) != NULL) {
 	hModule = lpDrv->hModule16;
     }
@@ -343,29 +343,29 @@
  *		DefDriverProc (USER.255)
  *		DefDriverProc16 (USER32.@)
  */
-LRESULT WINAPI DefDriverProc16(DWORD dwDevID, HDRVR16 hDriv, UINT16 wMsg, 
+LRESULT WINAPI DefDriverProc16(DWORD dwDevID, HDRVR16 hDriv, UINT16 wMsg,
                                LPARAM lParam1, LPARAM lParam2)
 {
     TRACE("devID=0x%08lx hDrv=0x%04x wMsg=%04x lP1=0x%08lx lP2=0x%08lx\n",
 	  dwDevID, hDriv, wMsg, lParam1, lParam2);
 
     switch(wMsg) {
-    case DRV_LOAD:		
-    case DRV_FREE:		
+    case DRV_LOAD:
+    case DRV_FREE:
     case DRV_ENABLE:
     case DRV_DISABLE:
 	return (LRESULT)1L;
-    case DRV_OPEN:		
-    case DRV_CLOSE:		
+    case DRV_OPEN:
+    case DRV_CLOSE:
     case DRV_QUERYCONFIGURE:
 	return (LRESULT)0L;
-    case DRV_CONFIGURE:		
-	MessageBoxA(0, "Driver isn't configurable !", "Wine Driver", MB_OK); 
+    case DRV_CONFIGURE:
+	MessageBoxA(0, "Driver isn't configurable !", "Wine Driver", MB_OK);
 	return (LRESULT)0L;
-    case DRV_INSTALL:		
-    case DRV_REMOVE:		
+    case DRV_INSTALL:
+    case DRV_REMOVE:
 	return DRV_SUCCESS;
-    default:			
+    default:
 	return (LRESULT)0L;
     }
 }
@@ -377,19 +377,19 @@
 {
     LPWINE_DRIVER 	lpDrv;
     BOOL16		ret = FALSE;
-    
+
     TRACE("(%04x, %p);\n", hDrvr, lpDrvInfo);
-    
-    if (lpDrvInfo == NULL || lpDrvInfo->length != sizeof(DRIVERINFOSTRUCT16)) 
+
+    if (lpDrvInfo == NULL || lpDrvInfo->length != sizeof(DRIVERINFOSTRUCT16))
 	return FALSE;
-    
+
     if ((lpDrv = DRIVER_FindFromHDrvr16(hDrvr)) != NULL) {
 	lpDrvInfo->hDriver = lpDrv->hDriver16;
 	lpDrvInfo->hModule = lpDrv->hModule16;
 	lstrcpynA(lpDrvInfo->szAliasName, lpDrv->szAliasName, sizeof(lpDrvInfo->szAliasName));
 	ret = TRUE;
     }
-    
+
     return ret;
 }
 
@@ -400,16 +400,16 @@
 {
     HDRVR16 		hRetDrv = 0;
     LPWINE_DRIVER 	lpDrv;
-    
+
     TRACE("(%04x, %08lX);\n", hDrvr, dwFlags);
-    
+
     if (hDrvr == 0) {
 	if (lpDrvItemList == NULL) {
 	    FIXME("drivers list empty !\n");
-	    /* FIXME: code was using DRIVER_LoadStartupDrivers(); before ? 
-	     * I (EPP) don't quite understand this 
+	    /* FIXME: code was using DRIVER_LoadStartupDrivers(); before ?
+	     * I (EPP) don't quite understand this
 	     */
-	    if (lpDrvItemList == NULL) 
+	    if (lpDrvItemList == NULL)
 		return 0;
 	}
 	lpDrv = lpDrvItemList;
@@ -426,7 +426,7 @@
 	    }
 	}
     }
-    
+
     hRetDrv = (lpDrv) ? lpDrv->hDriver16 : (HDRVR16)0;
     TRACE("return %04x !\n", hRetDrv);
     return hRetDrv;
diff --git a/windows/focus.c b/windows/focus.c
index 3d4db25..61898da 100644
--- a/windows/focus.c
+++ b/windows/focus.c
@@ -35,7 +35,7 @@
 
 
 /*****************************************************************
- *	         FOCUS_SwitchFocus 
+ *	         FOCUS_SwitchFocus
  * pMsgQ is the queue whose perQData focus is to be modified
  */
 void FOCUS_SwitchFocus( MESSAGEQUEUE *pMsgQ, HWND hFocusFrom, HWND hFocusTo )
@@ -112,13 +112,13 @@
 
         /* Get the current focus window from the perQ data */
         hWndFocus = PERQDATA_GetFocusWnd( pMsgQ->pQData );
-        
+
         if( hwnd == hWndFocus )
         {
 	    bRet = 1;      /* Success */
 	    goto CLEANUP;  /* Nothing to do */
         }
-        
+
 	/* call hooks */
 	if( HOOK_CallHooksA( WH_CBT, HCBT_SETFOCUS, (WPARAM)hwnd, (LPARAM)hWndFocus) )
 	    goto CLEANUP;
@@ -133,7 +133,7 @@
 
         /* Get the current focus window from the perQ data */
         hWndFocus = PERQDATA_GetFocusWnd( pMsgQ->pQData );
-        
+
         /* Change focus and send messages */
         FOCUS_SwitchFocus( pMsgQ, hWndFocus, hwnd );
     }
@@ -150,7 +150,7 @@
     }
 
     bRet = 1;      /* Success */
-    
+
 CLEANUP:
 
     /* Unlock the queues before returning */
diff --git a/windows/hook.c b/windows/hook.c
index 0f8bb6a..c9ab59d 100644
--- a/windows/hook.c
+++ b/windows/hook.c
@@ -77,7 +77,7 @@
 {
     LRESULT ret = HOOK_CallTo16_long_wwl( proc, code, wparam, lparam );
     /* Grrr. While the hook procedure is supposed to have an LRESULT return
-       value even in Win16, it seems that for those hook types where the 
+       value even in Win16, it seems that for those hook types where the
        return value is interpreted as BOOL, Windows doesn't actually check
        the HIWORD ...  Some buggy Win16 programs, notably WINFILE, rely on
        that, because they neglect to clear DX ... */
@@ -674,7 +674,7 @@
         data->next = HOOK_systemHooks[id - WH_MINHOOK];
         HOOK_systemHooks[id - WH_MINHOOK] = handle;
     }
-    TRACE("Setting hook %d: ret=%04x [next=%04x]\n", 
+    TRACE("Setting hook %d: ret=%04x [next=%04x]\n",
 			   id, handle, data->next );
 
     return (HHOOK)( handle? MAKELONG( handle, HOOK_MAGIC ) : 0 );
@@ -703,7 +703,7 @@
     }
 
     if (data->id == WH_JOURNALPLAYBACK) EnableHardwareInput16(TRUE);
-     
+
     /* Remove it from the linked list */
 
     if (data->ownerQueue)
@@ -794,7 +794,7 @@
 LRESULT HOOK_CallHooks16( INT16 id, INT16 code, WPARAM16 wParam,
                           LPARAM lParam )
 {
-    HANDLE16 hook; 
+    HANDLE16 hook;
 
     if (!(hook = HOOK_GetHook( id ))) return 0;
     if (!(hook = HOOK_FindValidHook(hook))) return 0;
@@ -809,7 +809,7 @@
 LRESULT HOOK_CallHooksA( INT id, INT code, WPARAM wParam,
                            LPARAM lParam )
 {
-    HANDLE16 hook; 
+    HANDLE16 hook;
 
     if (!(hook = HOOK_GetHook( id ))) return 0;
     if (!(hook = HOOK_FindValidHook(hook))) return 0;
@@ -824,7 +824,7 @@
 LRESULT HOOK_CallHooksW( INT id, INT code, WPARAM wParam,
                            LPARAM lParam )
 {
-    HANDLE16 hook; 
+    HANDLE16 hook;
 
     if (!(hook = HOOK_GetHook( id ))) return 0;
     if (!(hook = HOOK_FindValidHook(hook))) return 0;
@@ -1082,7 +1082,7 @@
     if (wHaveParamHigh == FALSE)
     {
         lpmsg16_32->wParamHigh = 0;
-        /* WARNING: msg16_32->msg has to be the first variable in the struct */ 
+        /* WARNING: msg16_32->msg has to be the first variable in the struct */
         return CallMsgFilter16(msg16_32, code);
     }
     else
diff --git a/windows/input.c b/windows/input.c
index 7e876ab..3b0dd95 100644
--- a/windows/input.c
+++ b/windows/input.c
@@ -2,7 +2,7 @@
  * USER Input processing
  *
  * Copyright 1993 Bob Amstadt
- * Copyright 1996 Albrecht Kleine 
+ * Copyright 1996 Albrecht Kleine
  * Copyright 1997 David Faure
  * Copyright 1998 Morten Welinder
  * Copyright 1998 Ulrich Weigand
@@ -599,14 +599,14 @@
 /**********************************************************************
  *		GetAsyncKeyState (USER32.@)
  *
- *	Determine if a key is or was pressed.  retval has high-order 
+ *	Determine if a key is or was pressed.  retval has high-order
  * bit set to 1 if currently pressed, low-order bit set to 1 if key has
  * been pressed.
  *
  *	This uses the variable AsyncMouseButtonsStates and
  * AsyncKeyStateTable (set in event.c) which have the mouse button
  * number or key number (whichever is applicable) set to true if the
- * mouse or key had been depressed since the last call to 
+ * mouse or key had been depressed since the last call to
  * GetAsyncKeyState.
  */
 SHORT WINAPI GetAsyncKeyState(INT nKey)
@@ -768,7 +768,7 @@
 /***********************************************************************
  *		GetKeyboardLayout (USER32.@)
  *
- * FIXME: - device handle for keyboard layout defaulted to 
+ * FIXME: - device handle for keyboard layout defaulted to
  *          the language id. This is the way Windows default works.
  *        - the thread identifier (dwLayout) is also ignored.
  */
@@ -886,10 +886,10 @@
 /***********************************************************************
  *		GetKeyboardLayoutList (USER32.@)
  *
- * FIXME: Supports only the system default language and layout and 
+ * FIXME: Supports only the system default language and layout and
  *          returns only 1 value.
  *
- * Return number of values available if either input parm is 
+ * Return number of values available if either input parm is
  *  0, per MS documentation.
  *
  */
@@ -928,7 +928,7 @@
 {
     TRACE_(keyboard)("(%s, %d)\n", pwszKLID, Flags);
     ERR_(keyboard)("Only default system keyboard layout supported. Call ignored.\n");
-  return 0; 
+  return 0;
 }
 
 /***********************************************************************
@@ -937,7 +937,7 @@
 HKL WINAPI LoadKeyboardLayoutW(LPCWSTR pwszKLID, UINT Flags)
 {
     char buf[9];
-    
+
     WideCharToMultiByte( CP_ACP, 0, pwszKLID, -1, buf, sizeof(buf), NULL, NULL );
     buf[8] = 0;
     return LoadKeyboardLayoutA(buf, Flags);
@@ -948,7 +948,7 @@
     TRACKMOUSEEVENT tme;
     POINT pos; /* center of hover rectangle */
     INT iHoverTime; /* elapsed time the cursor has been inside of the hover rect */
-} _TRACKINGLIST; 
+} _TRACKINGLIST;
 
 static _TRACKINGLIST TrackingList[10];
 static int iTrackMax = 0;
@@ -986,8 +986,8 @@
         /* see if we are tracking hovering for this hwnd */
         if(TrackingList[i].tme.dwFlags & TME_HOVER) {
             /* add the timer interval to the hovering time */
-            TrackingList[i].iHoverTime+=iTimerInterval;  
-     
+            TrackingList[i].iHoverTime+=iTimerInterval;
+
             /* has the cursor moved outside the rectangle centered around pos? */
             if((abs(pos.x - TrackingList[i].pos.x) > (hoverwidth / 2.0))
               || (abs(pos.y - TrackingList[i].pos.y) > (hoverheight / 2.0)))
@@ -1016,7 +1016,7 @@
             TrackingList[i] = TrackingList[--iTrackMax];
         }
     }
-	
+
     /* stop the timer if the tracking list is empty */
     if(iTrackMax == 0) {
         KillTimer(0, timer);
@@ -1068,24 +1068,24 @@
     }
 
     flags = ptme->dwFlags;
-    
+
     /* if HOVER_DEFAULT was specified replace this with the systems current value */
     if(ptme->dwHoverTime == HOVER_DEFAULT)
         SystemParametersInfoA(SPI_GETMOUSEHOVERTIME, 0, &(ptme->dwHoverTime), 0);
 
     GetCursorPos(&pos);
-    hwnd = WindowFromPoint(pos);    
+    hwnd = WindowFromPoint(pos);
 
     if ( flags & TME_CANCEL ) {
         flags &= ~ TME_CANCEL;
         cancel = 1;
     }
-    
+
     if ( flags & TME_HOVER  ) {
         flags &= ~ TME_HOVER;
         hover = 1;
     }
-    
+
     if ( flags & TME_LEAVE ) {
         flags &= ~ TME_LEAVE;
         leave = 1;
@@ -1107,7 +1107,7 @@
             *ptme = TrackingList[i].tme;
         else
             ptme->dwFlags = 0;
-    
+
         return TRUE; /* return here, TME_QUERY is retrieving information */
     }
 
@@ -1130,7 +1130,7 @@
                  (TrackingList[i].tme.dwFlags & TME_LEAVE)))
             {
                 TrackingList[i] = TrackingList[--iTrackMax];
-        
+
                 if(iTrackMax == 0) {
                     KillTimer(0, timer);
                     timer = 0;
@@ -1151,16 +1151,16 @@
                         TrackingList[i].tme.dwFlags |= TME_HOVER;
                         TrackingList[i].tme.dwHoverTime = ptme->dwHoverTime;
                     }
- 
+
                     if(leave)
                         TrackingList[i].tme.dwFlags |= TME_LEAVE;
 
                     /* reset iHoverTime as per winapi specs */
-                    TrackingList[i].iHoverTime = 0;                  
-  
+                    TrackingList[i].iHoverTime = 0;
+
                     return TRUE;
                 }
-            } 		
+            }
 
             /* if the tracking list is full return FALSE */
             if (iTrackMax == sizeof (TrackingList) / sizeof(*TrackingList)) {
diff --git a/windows/keyboard.c b/windows/keyboard.c
index fa1e5ff..50df439 100644
--- a/windows/keyboard.c
+++ b/windows/keyboard.c
@@ -2,7 +2,7 @@
  * 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
@@ -55,14 +55,14 @@
 /***********************************************************************
  *		Inquire (KEYBOARD.1)
  */
-WORD WINAPI KEYBOARD_Inquire(LPKBINFO kbInfo) 
+WORD WINAPI KEYBOARD_Inquire(LPKBINFO kbInfo)
 {
   kbInfo->Begin_First_Range = 0;
   kbInfo->End_First_Range = 0;
   kbInfo->Begin_Second_Range = 0;
   kbInfo->End_Second_Range = 0;
-  kbInfo->StateSize = 16; 
-  
+  kbInfo->StateSize = 16;
+
   return sizeof(KBINFO);
 }
 
@@ -175,8 +175,8 @@
  * FIXME : should do the above (return 2 for non matching deadchar+char combinations)
  *
  */
-INT16 WINAPI ToAscii16(UINT16 virtKey,UINT16 scanCode, LPBYTE lpKeyState, 
-                       LPVOID lpChar, UINT16 flags) 
+INT16 WINAPI ToAscii16(UINT16 virtKey,UINT16 scanCode, LPBYTE lpKeyState,
+                       LPVOID lpChar, UINT16 flags)
 {
     return ToAscii( virtKey, scanCode, lpKeyState, lpChar, flags );
 }
diff --git a/windows/mdi.c b/windows/mdi.c
index 7d96174..bc0f87b 100644
--- a/windows/mdi.c
+++ b/windows/mdi.c
@@ -22,7 +22,7 @@
  *
  * Notes: Fairly complete implementation.
  *        Also, Excel and WinWord do _not_ use MDI so if you're trying
- *	  to fix them look elsewhere. 
+ *	  to fix them look elsewhere.
  *
  * Notes on how the "More Windows..." is implemented:
  *
@@ -110,7 +110,7 @@
 #define WM_MDICALCCHILDSCROLL   0x10ac /* this is exactly what Windows uses */
 
 /* "More Windows..." definitions */
-#define MDI_MOREWINDOWSLIMIT    9       /* after this number of windows, a "More Windows..." 
+#define MDI_MOREWINDOWSLIMIT    9       /* after this number of windows, a "More Windows..."
                                            option will appear under the Windows menu */
 #define MDI_IDC_LISTBOX         100
 #define MDI_IDS_MOREWINDOWS     13
@@ -246,10 +246,10 @@
     id = GetWindowLongA( hWndChild, GWL_ID );
     DeleteMenu(clientInfo->hWindowMenu,id,MF_BYCOMMAND);
 
- /* walk the rest of MDI children to prevent gaps in the id 
+ /* walk the rest of MDI children to prevent gaps in the id
   * sequence and in the menu child list */
 
-    for( index = id+1; index <= clientInfo->nActiveChildren + 
+    for( index = id+1; index <= clientInfo->nActiveChildren +
 				clientInfo->idFirstChild; index++ )
     {
         HWND hwnd = MDI_GetChildByID(client,index);
@@ -265,12 +265,12 @@
 	n = wsprintfW(buffer, format ,index - clientInfo->idFirstChild);
         GetWindowTextW( hwnd, buffer + n, sizeof(buffer)/sizeof(WCHAR) - n );
 
-	/*  change menu if the current child is to be shown in the 
+	/*  change menu if the current child is to be shown in the
          *  "Windows" menu
          */
-        if (index <= clientInfo->idFirstChild + MDI_MOREWINDOWSLIMIT) 
+        if (index <= clientInfo->idFirstChild + MDI_MOREWINDOWSLIMIT)
 	ModifyMenuW(clientInfo->hWindowMenu ,index ,MF_BYCOMMAND | MF_STRING,
-                      index - 1 , buffer ); 
+                      index - 1 , buffer );
     }
 
     /*  We must restore the "More Windows..." option if there are enough children
@@ -335,10 +335,10 @@
     INT  nstagger;
     RECT rect;
     INT  spacing = GetSystemMetrics(SM_CYCAPTION) +
-		     GetSystemMetrics(SM_CYFRAME) - 1; 
+		     GetSystemMetrics(SM_CYFRAME) - 1;
 
     GetClientRect( hwnd, &rect );
-    if( rect.bottom - rect.top - delta >= spacing ) 
+    if( rect.bottom - rect.top - delta >= spacing )
 	rect.bottom -= delta;
 
     nstagger = (rect.bottom - rect.top)/(3 * spacing);
@@ -365,7 +365,7 @@
 	WARN("hmenuFrame is not a menu handle\n");
 	return 0L;
     }
-	
+
     if (hmenuWindow && !IsMenu(hmenuWindow))
     {
 	WARN("hmenuWindow is not a menu handle\n");
@@ -379,7 +379,7 @@
 
     if( hmenuWindow && ci->hWindowMenu && hmenuWindow!=ci->hWindowMenu )
     {
-        /* delete menu items from ci->hWindowMenu 
+        /* delete menu items from ci->hWindowMenu
          * and add them to hmenuWindow */
 
         INT i = GetMenuItemCount(ci->hWindowMenu) - 1;
@@ -426,10 +426,10 @@
         }
 
         /* remove separator */
-        DeleteMenu(ci->hWindowMenu, i, MF_BYPOSITION); 
+        DeleteMenu(ci->hWindowMenu, i, MF_BYPOSITION);
 
         ci->hWindowMenu = hmenuWindow;
-    } 
+    }
 
     if (hmenuFrame)
     {
@@ -489,14 +489,14 @@
 static HWND MDICreateChild( HWND parent, MDICLIENTINFO *ci,
 			    LPMDICREATESTRUCTA cs, BOOL unicode )
 {
-    POINT          pos[2]; 
+    POINT          pos[2];
     DWORD	     style = cs->style | (WS_CHILD | WS_CLIPSIBLINGS);
     HWND 	     hwnd, hwndMax = 0;
     UINT wIDmenu = ci->idFirstChild + ci->nActiveChildren;
     WND *wndParent;
     static const WCHAR lpstrDef[] = {'j','u','n','k','!',0};
 
-    TRACE("origin %i,%i - dim %i,%i, style %08lx\n", 
+    TRACE("origin %i,%i - dim %i,%i, style %08lx\n",
                 cs->x, cs->y, cs->cx, cs->cy, cs->style);
     /* calculate placement */
     MDI_CalcDefaultChildPos(parent, ci->nTotalCreated++, pos, 0);
@@ -545,12 +545,12 @@
 	if(unicode)
 	{
 	    MDICREATESTRUCTW *csW = (MDICREATESTRUCTW *)cs;
-	    hwnd = CreateWindowW( csW->szClass, csW->szTitle, style, 
+	    hwnd = CreateWindowW( csW->szClass, csW->szTitle, style,
                                 csW->x, csW->y, csW->cx, csW->cy, parent,
                                 (HMENU)wIDmenu, csW->hOwner, csW );
 	}
 	else
-	    hwnd = CreateWindowA( cs->szClass, cs->szTitle, style, 
+	    hwnd = CreateWindowA( cs->szClass, cs->szTitle, style,
                                 cs->x, cs->y, cs->cx, cs->cy, parent,
                                 (HMENU)wIDmenu, cs->hOwner, cs );
     }
@@ -589,8 +589,8 @@
 
 	MDI_MenuModifyItem(parent, hwnd);
 
-        /* Have we hit the "More Windows..." limit? If so, we must 
-         * add a "More Windows..." option 
+        /* Have we hit the "More Windows..." limit? If so, we must
+         * add a "More Windows..." option
          */
         if (ci->nActiveChildren == MDI_MOREWINDOWSLIMIT + 1)
         {
@@ -598,9 +598,9 @@
             LoadStringW(GetModuleHandleA("USER32"), MDI_IDS_MOREWINDOWS, szTmp, sizeof(szTmp)/sizeof(szTmp[0]));
 
             ModifyMenuW(ci->hWindowMenu,
-                        ci->idFirstChild + MDI_MOREWINDOWSLIMIT, 
-                        MF_BYCOMMAND | MF_STRING, 
-                        ci->idFirstChild + MDI_MOREWINDOWSLIMIT, 
+                        ci->idFirstChild + MDI_MOREWINDOWSLIMIT,
+                        MF_BYCOMMAND | MF_STRING,
+                        ci->idFirstChild + MDI_MOREWINDOWSLIMIT,
                         szTmp);
         }
 
@@ -613,7 +613,7 @@
 	{
             /* WS_VISIBLE is clear if a) the MDI client has
              * MDIS_ALLCHILDSTYLES style and 2) the flag is cleared in the
-             * MDICreateStruct. If so the created window is not shown nor 
+             * MDICreateStruct. If so the created window is not shown nor
              * activated.
              */
             if (IsWindowVisible(hwnd)) ShowWindow(hwnd, SW_SHOW);
@@ -627,14 +627,14 @@
 	if( IsWindow(hwndMax) )
 	    ShowWindow(hwndMax, SW_SHOWMAXIMIZED);
     }
-	
+
     return hwnd;
 }
 
 /**********************************************************************
  *			MDI_ChildGetMinMaxInfo
  *
- * Note: The rule here is that client rect of the maximized MDI child 
+ * Note: The rule here is that client rect of the maximized MDI child
  *	 is equal to the client rect of the MDI client window.
  */
 static void MDI_ChildGetMinMaxInfo( HWND client, HWND hwnd, MINMAXINFO* lpMinMax )
@@ -649,17 +649,17 @@
     lpMinMax->ptMaxSize.y = rect.bottom -= rect.top;
 
     lpMinMax->ptMaxPosition.x = rect.left;
-    lpMinMax->ptMaxPosition.y = rect.top; 
+    lpMinMax->ptMaxPosition.y = rect.top;
 
-    TRACE("max rect (%i,%i - %i, %i)\n", 
+    TRACE("max rect (%i,%i - %i, %i)\n",
                         rect.left,rect.top,rect.right,rect.bottom);
 }
 
 /**********************************************************************
  *			MDI_SwitchActiveChild
- * 
+ *
  * Note: SetWindowPos sends WM_CHILDACTIVATE to the child window that is
- *       being activated 
+ *       being activated
  */
 static void MDI_SwitchActiveChild( HWND clientHwnd, HWND childHwnd,
                                    BOOL bNextWindow )
@@ -678,11 +678,11 @@
 
     if ( hwndTo != hwndPrev )
     {
-	SetWindowPos( hwndTo, HWND_TOP, 0, 0, 0, 0, 
+	SetWindowPos( hwndTo, HWND_TOP, 0, 0, 0, 0,
                       SWP_NOMOVE | SWP_NOSIZE );
 
 	if( bNextWindow && hwndPrev )
-	    SetWindowPos( hwndPrev, HWND_BOTTOM, 0, 0, 0, 0, 
+	    SetWindowPos( hwndPrev, HWND_BOTTOM, 0, 0, 0, 0,
                           SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE );
     }
 }
@@ -741,7 +741,7 @@
 
     if (child && (!IsWindowEnabled( child ))) return 0;
 
-    /* Don't activate if it is already active. Might happen 
+    /* Don't activate if it is already active. Might happen
        since ShowWindow DOES activate MDI children */
     if (clientInfo->hwndActiveChild == child) return 0;
 
@@ -839,7 +839,7 @@
 
  BitBlt(hDCDest, 0, 0, GetSystemMetrics(SM_CXSIZE), GetSystemMetrics(SM_CYSIZE),
           hDCSrc, GetSystemMetrics(SM_CXSIZE), 0, SRCCOPY);
-  
+
  SelectObject(hDCSrc, hobjSrc);
  DeleteObject(hbClose);
  DeleteDC(hDCSrc);
@@ -896,7 +896,7 @@
         /* walk the list (backwards) and move windows */
         for (i = total - 1; i >= 0; i--)
         {
-            TRACE("move %04x to (%ld,%ld) size [%ld,%ld]\n", 
+            TRACE("move %04x to (%ld,%ld) size [%ld,%ld]\n",
                   win_array[i], pos[0].x, pos[0].y, pos[1].x, pos[1].y);
 
             MDI_CalcDefaultChildPos(client, n++, pos, delta);
@@ -1063,10 +1063,10 @@
 
     if( !InsertMenuA(menu,0,MF_BYPOSITION | MF_BITMAP | MF_POPUP,
                     hSysPopup, (LPSTR)(DWORD)hSysMenuBitmap))
-    {  
+    {
         TRACE("not inserted\n");
-	DestroyMenu(hSysPopup); 
-	return 0; 
+	DestroyMenu(hSysPopup);
+	return 0;
     }
 
     /* The close button is only present in Win 95 look */
@@ -1100,7 +1100,7 @@
     TRACE("frame %04x,child %04x,nIt=%d,iId=%d\n",frame,hChild,nItems,iId);
 
     if(!(iId == SC_RESTORE || iId == SC_CLOSE) )
-	return 0; 
+	return 0;
 
     /*
      * Remove the system menu, If that menu is the icon of the window
@@ -1111,7 +1111,7 @@
     menuInfo.fMask  = MIIM_DATA | MIIM_TYPE;
 
     GetMenuItemInfoW(menu,
-		     0, 
+		     0,
 		     TRUE,
 		     &menuInfo);
 
@@ -1143,7 +1143,7 @@
 /**********************************************************************
  *				        MDI_UpdateFrameText
  *
- * used when child window is maximized/restored 
+ * used when child window is maximized/restored
  *
  * Note: lpTitle can be NULL
  */
@@ -1164,7 +1164,7 @@
     }
 
     /* store new "default" title if lpTitle is not NULL */
-    if (lpTitle) 
+    if (lpTitle)
     {
 	if (ci->frameTitle) HeapFree( GetProcessHeap(), 0, ci->frameTitle );
 	if ((ci->frameTitle = HeapAlloc( GetProcessHeap(), 0, (strlenW(lpTitle)+1)*sizeof(WCHAR))))
@@ -1241,7 +1241,7 @@
 	    ci->idFirstChild	= ccs->idFirstChild;
 #undef ccs
 	}
-        else    
+        else
 	{
 	    LPCLIENTCREATESTRUCT16 ccs = MapSL((SEGPTR)cs->lpCreateParams);
 	    ci->hWindowMenu	= ccs->hWindowMenu;
@@ -1322,7 +1322,7 @@
       case WM_MDINEXT: /* lParam != 0 means previous window */
 	MDI_SwitchActiveChild( hwnd, WIN_GetFullHandle( (HWND)wParam ), !lParam );
 	break;
-	
+
       case WM_MDIRESTORE:
         SendMessageW( (HWND)wParam, WM_SYSCOMMAND, SC_RESTORE, 0);
         return 0;
@@ -1541,7 +1541,7 @@
 	    SendMessageW(hwndMDIClient, message, wParam, lParam);
 	    break;
 
-        case WM_SETTEXT: 
+        case WM_SETTEXT:
             MDI_UpdateFrameText(hwnd, hwndMDIClient, MDI_REPAINTFRAME, (LPWSTR)lParam );
 	    return 1; /* success. FIXME: check text length */
 
@@ -1559,7 +1559,7 @@
 
                 if (!IsIconic(hwnd) && ci->hwndActiveChild && !ci->hwndChildMaximized)
                 {
-                    /* control menu is between the frame system menu and 
+                    /* control menu is between the frame system menu and
                      * the first entry of menu bar */
                     WND *wndPtr = WIN_GetPtr(hwnd);
 
@@ -1981,7 +1981,7 @@
 	case SB_BOTH:
 			SCROLL_SetNCSbState( hwnd, vmin, vmax, vpos,
                                              hmin, hmax, hpos);
-    }    
+    }
 }
 
 
@@ -2017,30 +2017,30 @@
 
     switch( wParam )
     {
-	case SB_LINEUP:	
+	case SB_LINEUP:
 		        newPos = curPos - shift;
 			break;
-	case SB_LINEDOWN:    
+	case SB_LINEDOWN:
 			newPos = curPos + shift;
 			break;
-	case SB_PAGEUP:	
+	case SB_PAGEUP:
 			newPos = curPos - length;
 			break;
-	case SB_PAGEDOWN:    
+	case SB_PAGEDOWN:
 			newPos = curPos + length;
 			break;
 
-	case SB_THUMBPOSITION: 
+	case SB_THUMBPOSITION:
 			newPos = LOWORD(lParam);
 			break;
 
-	case SB_THUMBTRACK:  
+	case SB_THUMBTRACK:
 			return;
 
-	case SB_TOP:		
+	case SB_TOP:
 			newPos = minPos;
 			break;
-	case SB_BOTTOM:	
+	case SB_BOTTOM:
 			newPos = maxPos;
 			break;
 	case SB_ENDSCROLL:
@@ -2050,14 +2050,14 @@
 
     if( newPos > maxPos )
 	newPos = maxPos;
-    else 
+    else
 	if( newPos < minPos )
 	    newPos = minPos;
 
     SetScrollPos(hWnd, (uMsg == WM_VSCROLL)?SB_VERT:SB_HORZ , newPos, TRUE);
 
     if( uMsg == WM_VSCROLL )
-	ScrollWindowEx(hWnd ,0 ,curPos - newPos, NULL, NULL, 0, NULL, 
+	ScrollWindowEx(hWnd ,0 ,curPos - newPos, NULL, NULL, 0, NULL,
 			SW_INVALIDATE | SW_ERASE | SW_SCROLLCHILDREN );
     else
 	ScrollWindowEx(hWnd ,curPos - newPos, 0, NULL, NULL, 0, NULL,
@@ -2231,8 +2231,8 @@
  *
  *      Will swap the menu IDs for the given 2 positions.
  *      pos1 and pos2 are menu IDs
- *     
- *    
+ *
+ *
  */
 
 static void MDI_SwapMenuItems(HWND parent, UINT pos1, UINT pos2)
diff --git a/windows/message.c b/windows/message.c
index 4e474a1..856bbb1 100644
--- a/windows/message.c
+++ b/windows/message.c
@@ -202,7 +202,7 @@
 /***********************************************************************
  *          MSG_JournalPlayBackMsg
  *
- * Get an EVENTMSG struct via call JOURNALPLAYBACK hook function 
+ * Get an EVENTMSG struct via call JOURNALPLAYBACK hook function
  */
 void MSG_JournalPlayBackMsg(void)
 {
@@ -916,8 +916,8 @@
 	 * different places :-( ), if you use turkish uncomment these and
 	 * comment out the lines in iso-8859-2 and iso-8859-3 sections
 	 * FIXME: should be dynamic according to chosen language
-	 *	  if/when Wine has turkish support.  
-	 */ 
+	 *	  if/when Wine has turkish support.
+	 */
 /*  collision whith G( from iso-8859-3 !!!   */
 /*  {'(', 'G', '\320'},  {'(', 'g', '\360'}, */	/* breve */
 /*  collision whith S, from iso-8859-2 !!! */
@@ -1079,7 +1079,7 @@
  * parameter of the WM_TIMER message is not NULL, the lParam parameter
  * points to the function that is called instead of the window
  * procedure.
- *  
+ *
  * The message must be valid.
  *
  * RETURNS
@@ -1088,7 +1088,7 @@
  *
  * CONFORMANCE
  *
- *   ECMA-234, Win32 
+ *   ECMA-234, Win32
  *
  */
 LONG WINAPI DispatchMessageW( const MSG* msg )
diff --git a/windows/msgbox.c b/windows/msgbox.c
index 788cdaf..7db5fc3 100644
--- a/windows/msgbox.c
+++ b/windows/msgbox.c
@@ -127,7 +127,7 @@
          */
 	break;
     }
-    
+
     /* Position everything */
     GetWindowRect(hwnd, &rect);
     borheight = rect.bottom - rect.top;
@@ -135,18 +135,18 @@
     GetClientRect(hwnd, &rect);
     borheight -= rect.bottom - rect.top;
     borwidth  -= rect.right - rect.left;
-    
+
     /* Get the icon height */
     GetWindowRect(GetDlgItem(hwnd, MSGBOX_IDICON), &rect);
     MapWindowPoints(0, hwnd, (LPPOINT)&rect, 2);
     iheight = rect.bottom - rect.top;
     ileft = rect.left;
     iwidth = rect.right - ileft;
-    
+
     hdc = GetDC(hwnd);
     if (hFont)
 	hPrevFont = SelectObject(hdc, hFont);
-    
+
     /* Get the number of visible buttons and their size */
     bh = bw = 1; /* Minimum button sizes */
     for (buttons = 0, i = 1; i < 8; i++)
@@ -172,7 +172,7 @@
     bh = bh * 2;
     bw = bw * 2;
     bspace = bw/3; /* Space between buttons */
-    
+
     /* Get the text size */
     GetClientRect(GetDlgItem(hwnd, MSGBOX_IDTEXT), &rect);
     rect.top = rect.left = rect.bottom = 0;
@@ -182,15 +182,15 @@
     tleft = 2 * ileft + iwidth;
     twidth = max((bw + bspace) * buttons + bspace - tleft, rect.right);
     theight = rect.bottom;
-    
+
     if (hFont)
 	SelectObject(hdc, hPrevFont);
     ReleaseDC(hItem, hdc);
-    
+
     tiheight = 16 + max(iheight, theight);
     wwidth  = tleft + twidth + ileft + borwidth;
     wheight = 8 + tiheight + bh + borheight;
-    
+
     /* Resize the window */
     SetWindowPos(hwnd, 0, 0, 0, wwidth, wheight,
 		 SWP_NOMOVE | SWP_NOZORDER | SWP_NOACTIVATE | SWP_NOREDRAW);
@@ -198,11 +198,11 @@
     /* Position the icon */
     SetWindowPos(GetDlgItem(hwnd, MSGBOX_IDICON), 0, ileft, (tiheight - iheight) / 2, 0, 0,
 		 SWP_NOSIZE | SWP_NOZORDER | SWP_NOACTIVATE | SWP_NOREDRAW);
-    
+
     /* Position the text */
     SetWindowPos(GetDlgItem(hwnd, MSGBOX_IDTEXT), 0, tleft, (tiheight - theight) / 2, twidth, theight,
 		 SWP_NOZORDER | SWP_NOACTIVATE | SWP_NOREDRAW);
-    
+
     /* Position the buttons */
     bpos = (wwidth - (bw + bspace) * buttons + bspace) / 2;
     for (buttons = i = 0; i < 7; i++) {
@@ -234,7 +234,7 @@
     }
     if (lpmb->dwStyle & MB_APPLMODAL)
 	FIXME("app modal msgbox ! Not modal yet.\n");
-    
+
     return hFont;
 }
 
@@ -246,13 +246,13 @@
  */
 static LRESULT CALLBACK MSGBOX_DlgProc( HWND hwnd, UINT message,
                                         WPARAM wParam, LPARAM lParam )
-{  
+{
   static HFONT hFont;
   switch(message) {
    case WM_INITDIALOG:
     hFont = MSGBOX_OnInit(hwnd, (LPMSGBOXPARAMSA)lParam);
     return 0;
-    
+
    case WM_COMMAND:
     switch (wParam)
     {
@@ -318,7 +318,7 @@
     LPSTR titleA = HEAP_strdupWtoA( GetProcessHeap(), 0, title );
     LPSTR textA  = HEAP_strdupWtoA( GetProcessHeap(), 0, text );
     INT ret;
-    
+
     WARN("Messagebox\n");
 
     ret = MessageBoxA( hwnd, textA, titleA, type );
diff --git a/windows/multimon.c b/windows/multimon.c
index 4a4092f..895fe06 100644
--- a/windows/multimon.c
+++ b/windows/multimon.c
@@ -71,8 +71,8 @@
     if (dwFlags & (MONITOR_DEFAULTTOPRIMARY | MONITOR_DEFAULTTONEAREST))
         return xPRIMARY_MONITOR;
 
-    if (IsIconic(hWnd) ? 
-            GetWindowPlacement(hWnd, &wp) : 
+    if (IsIconic(hWnd) ?
+            GetWindowPlacement(hWnd, &wp) :
             GetWindowRect(hWnd, &wp.rcNormalPosition)) {
 
         return MonitorFromRect(&wp.rcNormalPosition, dwFlags);
@@ -98,7 +98,7 @@
                  GetSystemMetrics(SM_CYSCREEN) );
         lpMonitorInfo->rcWork = rcWork;
         lpMonitorInfo->dwFlags = MONITORINFOF_PRIMARY;
-	
+
 	if (lpMonitorInfo->cbSize >= sizeof(MONITORINFOEXA))
             strcpy(((MONITORINFOEXA*)lpMonitorInfo)->szDevice, "DISPLAY");
 
diff --git a/windows/nonclient.c b/windows/nonclient.c
index 1ca2b33..658b741 100644
--- a/windows/nonclient.c
+++ b/windows/nonclient.c
@@ -43,13 +43,13 @@
 static HBITMAP hbitmapClose;
 
 static const BYTE lpGrayMask[] = { 0xAA, 0xA0,
-		      0x55, 0x50,  
+		      0x55, 0x50,
 		      0xAA, 0xA0,
-		      0x55, 0x50,  
+		      0x55, 0x50,
 		      0xAA, 0xA0,
-		      0x55, 0x50,  
+		      0x55, 0x50,
 		      0xAA, 0xA0,
-		      0x55, 0x50,  
+		      0x55, 0x50,
 		      0xAA, 0xA0,
 		      0x55, 0x50};
 
@@ -159,7 +159,7 @@
     int adjust;
     if(style & WS_ICONIC) return;
 
-    if ((exStyle & (WS_EX_STATICEDGE|WS_EX_DLGMODALFRAME)) == 
+    if ((exStyle & (WS_EX_STATICEDGE|WS_EX_DLGMODALFRAME)) ==
         WS_EX_STATICEDGE)
     {
         adjust = 1; /* for the outer frame always present */
@@ -173,7 +173,7 @@
     if (style & WS_THICKFRAME)
         adjust +=  ( GetSystemMetrics (SM_CXFRAME)
                    - GetSystemMetrics (SM_CXDLGFRAME)); /* The resize border */
-    if ((style & (WS_BORDER|WS_DLGFRAME)) || 
+    if ((style & (WS_BORDER|WS_DLGFRAME)) ||
         (exStyle & WS_EX_DLGMODALFRAME))
         adjust++; /* The other border */
 
@@ -677,9 +677,9 @@
 	    return HTMENU;
     }
 
-    /* Has to return HTNOWHERE if nothing was found  
+    /* Has to return HTNOWHERE if nothing was found
        Could happen when a window has a customized non client area */
-    return HTNOWHERE;  
+    return HTNOWHERE;
 }
 
 
@@ -823,7 +823,7 @@
 	    return HTMENU;
     }
 
-    /* Has to return HTNOWHERE if nothing was found  
+    /* Has to return HTNOWHERE if nothing was found
        Could happen when a window has a customized non client area */
     return HTNOWHERE;
 }
@@ -1084,7 +1084,7 @@
     if (dlgFrame)
     {
 	InflateRect( rect, -width, -height );
-    } 
+    }
     else
     {
         INT decYOff = GetSystemMetrics(SM_CXFRAME) + GetSystemMetrics(SM_CXSIZE) - 1;
@@ -1142,7 +1142,7 @@
  *        you LIKE thick borders in Win95/NT4.0 -- I've been working with
  *        them lately, but just to get this code right).  Even so, it doesn't
  *        appear to be so.  It's being worked on...
- * 
+ *
  *   Revision history
  *        06-Jul-1997 Dave Cuthbert (dacut@ece.cmu.edu)
  *             Original implementation (based on NC_DrawFrame)
@@ -1232,7 +1232,7 @@
     {
 	if (!(hbitmapClose = LoadBitmapA( 0, MAKEINTRESOURCEA(OBM_OLD_CLOSE) ))) return;
     }
-    
+
     if (GetWindowLongA( hwnd, GWL_EXSTYLE) & WS_EX_DLGMODALFRAME)
     {
         HBRUSH hbrushOld = SelectObject(hdc, GetSysColorBrush(COLOR_WINDOW) );
@@ -1330,7 +1330,7 @@
 	    r.left += GetSystemMetrics(SM_CYCAPTION) - 1;
     }
 
-    if (style & WS_SYSMENU) 
+    if (style & WS_SYSMENU)
     {
 	UINT state;
 
@@ -1339,7 +1339,7 @@
 	state = GetMenuState(hSysMenu, SC_CLOSE, MF_BYCOMMAND);
 
 	/* Draw a grayed close button if disabled and a normal one if SC_CLOSE is not there */
-	NC_DrawCloseButton95 (hwnd, hdc, FALSE, 
+	NC_DrawCloseButton95 (hwnd, hdc, FALSE,
 			      ((((state & MF_DISABLED) || (state & MF_GRAYED))) && (state != 0xFFFFFFFF)));
 	r.right -= GetSystemMetrics(SM_CYCAPTION) - 1;
 
@@ -1350,7 +1350,7 @@
 
 	    NC_DrawMaxButton95( hwnd, hdc, FALSE, (!(style & WS_MAXIMIZEBOX)));
 	    r.right -= GetSystemMetrics(SM_CXSIZE) + 1;
-	    
+
 	    NC_DrawMinButton95( hwnd, hdc, FALSE,  (!(style & WS_MINIMIZEBOX)));
 	    r.right -= GetSystemMetrics(SM_CXSIZE) + 1;
 	}
@@ -1397,7 +1397,7 @@
     if (!(wndPtr = WIN_GetPtr( hwnd )) || wndPtr == WND_OTHER_PROCESS) return;
     has_menu = HAS_MENU(wndPtr);
     dwStyle = wndPtr->dwStyle;
-    dwExStyle = wndPtr->dwExStyle;    
+    dwExStyle = wndPtr->dwExStyle;
     flags = wndPtr->flags;
     rectClient = wndPtr->rectClient;
     rectWindow = wndPtr->rectWindow;
@@ -1475,7 +1475,7 @@
 	  r.top++;
 	}
         FillRect( hdc, &r, GetSysColorBrush(COLOR_SCROLLBAR) );
-    }    
+    }
 
     ReleaseDC( hwnd, hdc );
 }
@@ -1522,7 +1522,7 @@
     if (!(wndPtr = WIN_GetPtr( hwnd )) || wndPtr == WND_OTHER_PROCESS) return;
     has_menu = HAS_MENU(wndPtr);
     dwStyle = wndPtr->dwStyle;
-    dwExStyle = wndPtr->dwExStyle;    
+    dwExStyle = wndPtr->dwExStyle;
     flags = wndPtr->flags;
     rectClient = wndPtr->rectClient;
     rectWindow = wndPtr->rectWindow;
@@ -1599,7 +1599,7 @@
     {
 	RECT r = rect;
 	r.bottom = rect.top + GetSystemMetrics(SM_CYMENU);
-	
+
 	TRACE("Calling DrawMenuBar with rect (%d, %d)-(%d, %d)\n",
               r.left, r.top, r.right, r.bottom);
 
@@ -1626,7 +1626,7 @@
         r.left = r.right - GetSystemMetrics(SM_CXVSCROLL) + 1;
         r.top  = r.bottom - GetSystemMetrics(SM_CYHSCROLL) + 1;
         FillRect( hdc, &r,  GetSysColorBrush(COLOR_SCROLLBAR) );
-    }    
+    }
 
     ReleaseDC( hwnd, hdc );
 }
@@ -1725,7 +1725,7 @@
 	return (LONG)SetCursor( LoadCursorA( 0, IDC_SIZENSA ) );
 
     case HTTOPLEFT:
-    case HTBOTTOMRIGHT:	
+    case HTBOTTOMRIGHT:
 	return (LONG)SetCursor( LoadCursorA( 0, IDC_SIZENWSEA ) );
 
     case HTTOPRIGHT:
@@ -1793,7 +1793,7 @@
 
 	/* Check if the sysmenu item for minimize is there  */
 	state = GetMenuState(hSysMenu, SC_MINIMIZE, MF_BYCOMMAND);
-	
+
 	paintButton = &NC_DrawMinButton95;
     }
     else
@@ -1804,7 +1804,7 @@
 
 	/* Check if the sysmenu item for maximize is there  */
 	state = GetMenuState(hSysMenu, SC_MAXIMIZE, MF_BYCOMMAND);
-	
+
 	paintButton = &NC_DrawMaxButton95;
     }
 
@@ -1841,7 +1841,7 @@
     if ((!pressed) || (state == 0xFFFFFFFF))
 	return;
 
-    if (wParam == HTMINBUTTON) 
+    if (wParam == HTMINBUTTON)
         SendMessageA( hwnd, WM_SYSCOMMAND, SC_MINIMIZE, MAKELONG(msg.pt.x,msg.pt.y) );
     else
         SendMessageA( hwnd, WM_SYSCOMMAND,
@@ -1895,7 +1895,7 @@
 
     if (!pressed) return;
 
-    if (wParam == HTMINBUTTON) 
+    if (wParam == HTMINBUTTON)
         SendMessageA( hwnd, WM_SYSCOMMAND, SC_MINIMIZE, MAKELONG(msg.pt.x,msg.pt.y) );
     else
         SendMessageA( hwnd, WM_SYSCOMMAND,
@@ -1921,7 +1921,7 @@
 	return;
 
     state = GetMenuState(hSysMenu, SC_CLOSE, MF_BYCOMMAND);
-	    
+
     /* If the item close of the sysmenu is disabled or not there do nothing */
     if((state & MF_DISABLED) || (state & MF_GRAYED) || (state == 0xFFFFFFFF))
 	return;
@@ -2037,14 +2037,14 @@
 	if (TWEAK_WineLook == WIN31_LOOK)
 	    NC_TrackMinMaxBox( hwnd, wParam );
 	else
-	    NC_TrackMinMaxBox95( hwnd, wParam );	    
+	    NC_TrackMinMaxBox95( hwnd, wParam );
 	break;
 
     case HTCLOSE:
 	if (TWEAK_WineLook >= WIN95_LOOK)
 	    NC_TrackCloseButton95 (hwnd, wParam);
 	break;
-	
+
     case HTLEFT:
     case HTRIGHT:
     case HTTOP:
@@ -2079,7 +2079,7 @@
     {
         SendMessageW( hwnd, WM_SYSCOMMAND, SC_RESTORE, lParam );
         return 0;
-    } 
+    }
 
     switch(wParam)  /* Hit test */
     {
@@ -2127,7 +2127,7 @@
     case SC_MINIMIZE:
         if (hwnd == GetForegroundWindow())
             ShowOwnedPopups(hwnd,FALSE);
-	ShowWindow( hwnd, SW_MINIMIZE ); 
+	ShowWindow( hwnd, SW_MINIMIZE );
 	break;
 
     case SC_MAXIMIZE:
@@ -2169,7 +2169,7 @@
 	break;
 
     case SC_TASKLIST:
-	WinExec( "taskman.exe", SW_SHOWNORMAL ); 
+	WinExec( "taskman.exe", SW_SHOWNORMAL );
 	break;
 
     case SC_SCREENSAVE:
@@ -2183,11 +2183,11 @@
                 FreeLibrary( hmodule );
             }
         }
-	else 
+	else
 	  if (wParam == SC_PUTMARK)
             TRACE_(shell)("Mark requested by user\n");
 	break;
-  
+
     case SC_HOTKEY:
     case SC_ARRANGE:
     case SC_NEXTWINDOW:
@@ -2212,21 +2212,21 @@
     HBRUSH hOldBrush;
 
     hMaskBmp = CreateBitmap (12, 10, 1, 1, lpGrayMask);
-    
+
     if(hMaskBmp == 0)
 	return FALSE;
-    
+
     SelectObject (hdcMask, hMaskBmp);
-    
+
     /* Draw the grayed bitmap using the mask */
     hOldBrush = SelectObject (hdc, RGB(128, 128, 128));
     BitBlt (hdc, x, y, 12, 10,
 	    hdcMask, 0, 0, 0xB8074A);
-    
+
     /* Clean up */
     SelectObject (hdc, hOldBrush);
     DeleteObject(hMaskBmp);
     DeleteDC (hdcMask);
-    
+
     return TRUE;
 }
diff --git a/windows/painting.c b/windows/painting.c
index b7ae05b..1acf921 100644
--- a/windows/painting.c
+++ b/windows/painting.c
@@ -96,7 +96,7 @@
  *           WIN_HaveToDelayNCPAINT
  *
  * Currently, in the Wine painting mechanism, the WM_NCPAINT message
- * is generated as soon as a region intersecting the non-client area 
+ * is generated as soon as a region intersecting the non-client area
  * of a window is invalidated.
  *
  * This technique will work fine for all windows whose parents
@@ -108,7 +108,7 @@
  * non-client area.
  *
  * This method looks at the current state of a window to determine
- * if the sending of the WM_NCPAINT message should be delayed until 
+ * if the sending of the WM_NCPAINT message should be delayed until
  * the BeginPaint call.
  *
  * PARAMS:
@@ -118,12 +118,12 @@
  *              function. This is a shortcut for the cases when
  *              we already know when to avoid scanning all the
  *              parents of a window. If you already know that this
- *              window's NCPAINT should be delayed, set the 
- *              UNC_DELAY_NCPAINT flag for this parameter. 
+ *              window's NCPAINT should be delayed, set the
+ *              UNC_DELAY_NCPAINT flag for this parameter.
  *
  *              This shortcut behavior is implemented in the
  *              RDW_Paint() method.
- * 
+ *
  */
 static BOOL WIN_HaveToDelayNCPAINT( HWND hwnd, UINT uncFlags)
 {
@@ -145,7 +145,7 @@
   /*
    * Scan all the parents of this window to find a window
    * that doesn't have the WS_CLIPCHILDREN style and that
-   * has an invalid region. 
+   * has an invalid region.
    */
   while ((hwnd = GetAncestor( hwnd, GA_PARENT )))
   {
@@ -171,7 +171,7 @@
  *  NOTE: UNC_REGION is mainly for the RDW_Paint() chunk that sends WM_ERASEBKGND message.
  *	  The trick is that when the returned region handle may be different from hRgn.
  *	  In this case the old hRgn must be considered gone. BUT, if the returned value
- *	  is 1 then the hRgn is preserved and RDW_Paint() will have to get 
+ *	  is 1 then the hRgn is preserved and RDW_Paint() will have to get
  *	  a DC without extra clipping region.
  */
 static HRGN WIN_UpdateNCRgn(WND* wnd, HRGN hRgn, UINT uncFlags )
@@ -180,7 +180,7 @@
     HRGN  hClip = 0;
     HRGN  hrgnRet = 0;
 
-    TRACE_(nonclient)("hwnd %04x [%04x] hrgn %04x, unc %04x, ncf %i\n", 
+    TRACE_(nonclient)("hwnd %04x [%04x] hrgn %04x, unc %04x, ncf %i\n",
                       wnd->hwndSelf, wnd->hrgnUpdate, hRgn, uncFlags, wnd->flags & WIN_NEEDS_NCPAINT);
 
     /* desktop window doesn't have a nonclient area */
@@ -189,7 +189,7 @@
         wnd->flags &= ~WIN_NEEDS_NCPAINT;
 	if( wnd->hrgnUpdate > 1 )
 	    hrgnRet = REGION_CropRgn( hRgn, wnd->hrgnUpdate, NULL, NULL );
-	else 
+	else
 	{
 	    hrgnRet = wnd->hrgnUpdate;
 	}
@@ -200,21 +200,21 @@
         !(wnd->flags & WIN_NCACTIVATED) )
     {
 	wnd->flags |= WIN_NCACTIVATED;
-	uncFlags |= UNC_ENTIRE; 
+	uncFlags |= UNC_ENTIRE;
     }
 
     /*
-     * If the window's non-client area needs to be painted, 
+     * If the window's non-client area needs to be painted,
      */
     if ( ( wnd->flags & WIN_NEEDS_NCPAINT ) &&
 	 !WIN_HaveToDelayNCPAINT(wnd->hwndSelf, uncFlags) )
     {
 	    RECT r2, r3;
 
-	    wnd->flags &= ~WIN_NEEDS_NCPAINT;  
+	    wnd->flags &= ~WIN_NEEDS_NCPAINT;
 	    GETCLIENTRECTW( wnd, r );
 
-	    TRACE_(nonclient)( "\tclient box (%i,%i-%i,%i), hrgnUpdate %04x\n", 
+	    TRACE_(nonclient)( "\tclient box (%i,%i-%i,%i), hrgnUpdate %04x\n",
 				r.left, r.top, r.right, r.bottom, wnd->hrgnUpdate );
 	    if( wnd->hrgnUpdate > 1 )
 	    {
@@ -222,7 +222,7 @@
 
 		GetRgnBox( wnd->hrgnUpdate, &r2 );
 		UnionRect( &r3, &r2, &r );
-		if( r3.left != r.left || r3.top != r.top || 
+		if( r3.left != r.left || r3.top != r.top ||
 		    r3.right != r.right || r3.bottom != r.bottom ) /* it does */
 		{
 		    /* crop hrgnUpdate, save old one in hClip - the only
@@ -238,7 +238,7 @@
 		    GetRgnBox( wnd->hrgnUpdate, &r3 );
 		    if( IsRectEmpty( &r3 ) )
 		    {
-			/* delete the update region since all invalid 
+			/* delete the update region since all invalid
 			 * parts were in the nonclient area */
 
 			DeleteObject( wnd->hrgnUpdate );
@@ -252,7 +252,7 @@
 
 		if(!hClip && wnd->hrgnUpdate ) goto copyrgn;
 	    }
-	    else 
+	    else
 	    if( wnd->hrgnUpdate == 1 )/* entire window */
 	    {
 		if( uncFlags & UNC_UPDATE ) wnd->hrgnUpdate = CreateRectRgnIndirect( &r );
@@ -271,7 +271,7 @@
 	else
 	if( wnd->hrgnUpdate == 1 && (uncFlags & UNC_UPDATE) )
 	{
-	    GETCLIENTRECTW( wnd, r ); 
+	    GETCLIENTRECTW( wnd, r );
 	    wnd->hrgnUpdate = CreateRectRgnIndirect( &r );
 	    if( uncFlags & UNC_REGION ) hrgnRet = 1;
 	}
@@ -311,7 +311,7 @@
 
 
 /***********************************************************************
- * 		RDW_ValidateParent [RDW_UpdateRgns() helper] 
+ * 		RDW_ValidateParent [RDW_UpdateRgns() helper]
  *
  *  Validate the portions of parents that are covered by a validated child
  *  wndPtr = child
@@ -369,7 +369,7 @@
 }
 
 /***********************************************************************
- * 		RDW_UpdateRgns [RedrawWindow() helper] 
+ * 		RDW_UpdateRgns [RedrawWindow() helper]
  *
  *  Walks the window tree and adds/removes parts of the hRgn to/from update
  *  regions of windows that overlap it. Also, manages internal paint flags.
@@ -379,7 +379,7 @@
  */
 static void RDW_UpdateRgns( WND* wndPtr, HRGN hRgn, UINT flags, BOOL firstRecursLevel )
 {
-    /* 
+    /*
      * Called only when one of the following is set:
      * (RDW_INVALIDATE | RDW_VALIDATE | RDW_INTERNALPAINT | RDW_NOINTERNALPAINT)
      */
@@ -406,8 +406,8 @@
 			CombineRgn( wndPtr->hrgnUpdate, wndPtr->hrgnUpdate, hRgn, RGN_OR );
 			/* fall through */
 		case 0:
-			wndPtr->hrgnUpdate = REGION_CropRgn( wndPtr->hrgnUpdate, 
-							     wndPtr->hrgnUpdate ? wndPtr->hrgnUpdate : hRgn, 
+			wndPtr->hrgnUpdate = REGION_CropRgn( wndPtr->hrgnUpdate,
+							     wndPtr->hrgnUpdate ? wndPtr->hrgnUpdate : hRgn,
 							     &r, NULL );
 			if( !bHadOne )
 			{
@@ -577,7 +577,7 @@
 static HRGN RDW_Paint( WND* wndPtr, HRGN hrgn, UINT flags, UINT ex )
 {
 /* NOTE: wndPtr is locked by caller.
- * 
+ *
  * FIXME: Windows uses WM_SYNCPAINT to cut down the number of intertask
  * SendMessage() calls. This is a comment inside DefWindowProc() source
  * from 16-bit SDK:
@@ -616,10 +616,10 @@
 	UINT dcx = DCX_INTERSECTRGN | DCX_USESTYLE | DCX_KEEPCLIPRGN | DCX_WINDOWPAINT | DCX_CACHE;
 	HRGN hrgnRet;
 
-	hrgnRet = WIN_UpdateNCRgn(wndPtr, 
-				  hrgn, 
-				  UNC_REGION | UNC_CHECK | 
-				  ((ex & RDW_EX_DELAY_NCPAINT) ? UNC_DELAY_NCPAINT : 0) ); 
+	hrgnRet = WIN_UpdateNCRgn(wndPtr,
+				  hrgn,
+				  UNC_REGION | UNC_CHECK |
+				  ((ex & RDW_EX_DELAY_NCPAINT) ? UNC_DELAY_NCPAINT : 0) );
 
         if( hrgnRet )
 	{
@@ -627,9 +627,9 @@
 	    if( wndPtr->flags & WIN_NEEDS_ERASEBKGND )
 	    {
 		if( bIcon ) dcx |= DCX_WINDOW;
-		else 
+		else
 		if( hrgnRet )
-		    OffsetRgn( hrgnRet, wndPtr->rectWindow.left - wndPtr->rectClient.left, 
+		    OffsetRgn( hrgnRet, wndPtr->rectWindow.left - wndPtr->rectClient.left,
 			                wndPtr->rectWindow.top  - wndPtr->rectClient.top);
 		else
 		    dcx &= ~DCX_INTERSECTRGN;
@@ -704,7 +704,7 @@
 	    else
 		SetRectEmpty( &r );
 	    TRACE( "%04x (%04x) %s %d,%d-%d,%d %04x flags=%04x\n",
-			hwnd, wndPtr->hrgnUpdate, rectUpdate ? "rect" : "NULL", r.left, 
+			hwnd, wndPtr->hrgnUpdate, rectUpdate ? "rect" : "NULL", r.left,
 			r.top, r.right, r.bottom, hrgnUpdate, flags );
 	}
     }
@@ -736,8 +736,8 @@
 	{
 	    if( wndPtr->hrgnUpdate )
 	        hRgn = REGION_CropRgn( 0, hrgnUpdate, NULL, &pt );
-	    else 
-		wndPtr->hrgnUpdate = REGION_CropRgn( 0, hrgnUpdate, &r, &pt ); 
+	    else
+		wndPtr->hrgnUpdate = REGION_CropRgn( 0, hrgnUpdate, &r, &pt );
 	}
 	else if( rectUpdate )
 	{
@@ -782,7 +782,7 @@
 	}
 	else /* entire window or client depending on RDW_FRAME */
         {
-	    if( flags & RDW_FRAME ) 
+	    if( flags & RDW_FRAME )
 		hRgn = 1;
 	    else
 	    {
@@ -888,7 +888,7 @@
 	    GetClientRect( hwnd, rect );
 	    if (erase) RedrawWindow( hwnd, NULL, 0, RDW_FRAME | RDW_ERASENOW | RDW_NOCHILDREN );
 	}
-	else 
+	else
 	    SetRectEmpty( rect );
     }
     retvalue = (wndPtr->hrgnUpdate >= 1);
@@ -953,7 +953,7 @@
 	if( wndPtr->hrgnUpdate > 1 )
 	{
 	    CombineRgn(hrgn, wndPtr->hrgnUpdate, 0, RGN_COPY);
-	    OffsetRgn(hrgn, wndPtr->rectWindow.left - wndPtr->rectClient.left, 
+	    OffsetRgn(hrgn, wndPtr->rectWindow.left - wndPtr->rectClient.left,
 			    wndPtr->rectWindow.top - wndPtr->rectClient.top );
 	}
 
@@ -963,7 +963,7 @@
 	DeleteObject( hrgn );
         WIN_ReleaseWndPtr(wndPtr);
 	return ret;
-    } 
+    }
     WIN_ReleaseWndPtr(wndPtr);
     return GetClipBox( hdc, &rect );
 }
@@ -1028,7 +1028,7 @@
 BOOL WINAPI InvertRect( HDC hdc, const RECT *rect )
 {
     return PatBlt( hdc, rect->left, rect->top,
-		     rect->right - rect->left, rect->bottom - rect->top, 
+		     rect->right - rect->left, rect->bottom - rect->top,
 		     DSTINVERT );
 }
 
@@ -1043,7 +1043,7 @@
 
     if ( (r.right <= r.left) || (r.bottom <= r.top) ) return 0;
     if (!(prevBrush = SelectObject( hdc, hbrush ))) return 0;
-    
+
     PatBlt( hdc, r.left, r.top, 1,
 	      r.bottom - r.top, PATCOPY );
     PatBlt( hdc, r.right - 1, r.top, 1,
@@ -1135,7 +1135,7 @@
     BOOL retval;
     INT cx = rc->right - rc->left;
     INT cy = rc->bottom - rc->top;
-    
+
     switch(opcode)
     {
     case DST_TEXT:
@@ -1152,7 +1152,7 @@
         memdc = CreateCompatibleDC(hdc);
         if(!memdc) return FALSE;
         hbmsave = (HBITMAP)SelectObject(memdc, (HBITMAP)lp);
-        if(!hbmsave) 
+        if(!hbmsave)
         {
             DeleteDC(memdc);
             return FALSE;
@@ -1161,7 +1161,7 @@
         SelectObject(memdc, hbmsave);
         DeleteDC(memdc);
         return retval;
-            
+
     case DST_COMPLEX:
         if(func) {
 	    BOOL bRet;
@@ -1220,14 +1220,14 @@
                 retval = GetTextExtentPoint32A(hdc, (LPSTR)lp, len, &s);
             if(!retval) return FALSE;
             break;
-            
+
         case DST_ICON:
             ici = (CURSORICONINFO *)GlobalLock16((HGLOBAL16)lp);
             if(!ici) return FALSE;
             s.cx = ici->nWidth;
             s.cy = ici->nHeight;
             GlobalUnlock16((HGLOBAL16)lp);
-            break;            
+            break;
 
         case DST_BITMAP:
 	    if(!GetObjectA((HBITMAP)lp, sizeof(bm), &bm))
@@ -1235,11 +1235,11 @@
             s.cx = bm.bmWidth;
             s.cy = bm.bmHeight;
             break;
-            
+
         case DST_COMPLEX: /* cx and cy must be set in this mode */
             return FALSE;
 	}
-	            
+
         if(!cx) cx = s.cx;
         if(!cy) cy = s.cy;
     }
@@ -1267,7 +1267,7 @@
     hbm = (HBITMAP)NULL; hbmsave = (HBITMAP)NULL;
     memdc = (HDC)NULL; hbsave = (HBRUSH)NULL;
     retval = FALSE; /* assume failure */
-    
+
     /* From here on we must use "goto cleanup" when something goes wrong */
     hbm     = CreateBitmap(cx, cy, 1, 1, NULL);
     if(!hbm) goto cleanup;
@@ -1290,7 +1290,7 @@
     tmp = PAINTING_DrawStateJam(memdc, opcode, func, lp, len, &rc, dtflags, unicode);
     if(hfsave) SelectObject(memdc, hfsave);
     if(!tmp) goto cleanup;
-    
+
     /* This state cause the image to be dithered */
     if(flags & DSS_UNION)
     {
@@ -1329,12 +1329,12 @@
     }
 
     hbsave = (HBRUSH)SelectObject(hdc, hbr);
-    
+
     if(!BitBlt(hdc, x, y, cx, cy, memdc, 0, 0, 0x00B8074A)) goto cleanup;
-    
+
     retval = TRUE; /* We succeeded */
-    
-cleanup:    
+
+cleanup:
     SetTextColor(hdc, fg);
     SetBkColor(hdc, bg);
 
diff --git a/windows/queue.c b/windows/queue.c
index 5f0b6d4..88d2f74 100644
--- a/windows/queue.c
+++ b/windows/queue.c
@@ -101,9 +101,9 @@
 static PERQUEUEDATA * PERQDATA_CreateInstance(void)
 {
     PERQUEUEDATA *pQData;
-    
+
     BOOL16 bIsWin16 = 0;
-    
+
     TRACE_(msg)("()\n");
 
     /* Share a single instance of perQData for all 16 bit tasks */
@@ -137,7 +137,7 @@
     /* Save perQData globally for 16 bit tasks */
     if ( bIsWin16 )
         pQDataWin16 = pQData;
-        
+
     return pQData;
 }
 
@@ -331,7 +331,7 @@
                 CloseHandle( queue->server_queue );
             GlobalFree16( queue->self );
         }
-    
+
         HeapUnlock( GetProcessHeap() );
     }
 }
@@ -378,10 +378,10 @@
     msgQueue->self = hQueue;
     msgQueue->lockCount = 1;
     msgQueue->magic = QUEUE_MAGIC;
-    
+
     /* Create and initialize our per queue data */
     msgQueue->pQData = bCreatePerQData ? PERQDATA_CreateInstance() : NULL;
-    
+
     return hQueue;
 }
 
@@ -471,7 +471,7 @@
             ERR_(msg)("failed!\n");
             return FALSE;
 	}
-        
+
         /* Link new queue into list */
         queuePtr = QUEUE_Lock( hQueue );
         queuePtr->teb = NtCurrentTeb();
@@ -480,7 +480,7 @@
         SetThreadQueue16( 0, hQueue );
         NtCurrentTeb()->queue = hQueue;
         HeapUnlock( GetProcessHeap() );
-        
+
         QUEUE_Unlock( queuePtr );
     }
 
@@ -525,13 +525,13 @@
 /***********************************************************************
  *		GetMessagePos (USER.119)
  *		GetMessagePos (USER32.@)
- * 
+ *
  * The GetMessagePos() function returns a long value representing a
  * cursor position, in screen coordinates, when the last message
  * retrieved by the GetMessage() function occurs. The x-coordinate is
  * in the low-order word of the return value, the y-coordinate is in
  * the high-order word. The application can use the MAKEPOINT()
- * macro to obtain a POINT structure from the return value. 
+ * macro to obtain a POINT structure from the return value.
  *
  * For the current cursor position, use GetCursorPos().
  *
@@ -571,7 +571,7 @@
  * CONFORMANCE
  *
  * ECMA-234, Win32
- *  
+ *
  */
 LONG WINAPI GetMessageTime(void)
 {
@@ -608,7 +608,7 @@
  * TODO:
  *    1. Reset the Key State (currenly per thread key state is not maintained)
  */
-BOOL WINAPI AttachThreadInput( 
+BOOL WINAPI AttachThreadInput(
     DWORD idAttach,   /* [in] Thread to attach */
     DWORD idAttachTo, /* [in] Thread to attach to */
     BOOL fAttach)   /* [in] Attach or detach */
@@ -627,7 +627,7 @@
      */
     if ( HOOK_IsHooked( WH_JOURNALRECORD ) )
         goto CLEANUP;
-        
+
     /* Retrieve message queues corresponding to the thread id's */
     pTgtMsgQ = QUEUE_Lock( GetThreadQueue16( idAttach ) );
     pSrcMsgQ = QUEUE_Lock( GetThreadQueue16( idAttachTo ) );
@@ -645,7 +645,7 @@
         {
             /* First release the target threads perQData */
             PERQDATA_Release( pTgtMsgQ->pQData );
-        
+
             /* Share a reference to the source threads perQDATA */
             PERQDATA_Addref( pSrcMsgQ->pQData );
             pTgtMsgQ->pQData = pSrcMsgQ->pQData;
@@ -658,7 +658,7 @@
         {
             /* First release the target threads perQData */
             PERQDATA_Release( pTgtMsgQ->pQData );
-        
+
             /* Give the target thread its own private perQDATA once more */
             pTgtMsgQ->pQData = PERQDATA_CreateInstance();
         }
@@ -667,7 +667,7 @@
     /* TODO: Reset the Key State */
 
     bRet = 1;      /* Success */
-    
+
 CLEANUP:
 
     /* Unlock the queues before returning */
@@ -675,6 +675,6 @@
         QUEUE_Unlock( pSrcMsgQ );
     if ( pTgtMsgQ )
         QUEUE_Unlock( pTgtMsgQ );
-    
+
     return bRet;
 }
diff --git a/windows/rect.c b/windows/rect.c
index 73ffe0e..bba18ef 100644
--- a/windows/rect.c
+++ b/windows/rect.c
@@ -145,7 +145,7 @@
     rect->left   += x;
     rect->right  += x;
     rect->top    += y;
-    rect->bottom += y;    
+    rect->bottom += y;
 }
 
 
@@ -158,7 +158,7 @@
     rect->left   += x;
     rect->right  += x;
     rect->top    += y;
-    rect->bottom += y;    
+    rect->bottom += y;
     return TRUE;
 }
 
@@ -255,7 +255,7 @@
 	    dest->left   = min( src1->left, src2->left );
 	    dest->right  = max( src1->right, src2->right );
 	    dest->top    = min( src1->top, src2->top );
-	    dest->bottom = max( src1->bottom, src2->bottom );	    
+	    dest->bottom = max( src1->bottom, src2->bottom );
 	}
     }
     return TRUE;
@@ -286,7 +286,7 @@
 	    dest->left   = min( src1->left, src2->left );
 	    dest->right  = max( src1->right, src2->right );
 	    dest->top    = min( src1->top, src2->top );
-	    dest->bottom = max( src1->bottom, src2->bottom );	    
+	    dest->bottom = max( src1->bottom, src2->bottom );
 	}
     }
     return TRUE;
diff --git a/windows/scroll.c b/windows/scroll.c
index ac215dc..976e4aa 100644
--- a/windows/scroll.c
+++ b/windows/scroll.c
@@ -64,7 +64,7 @@
 
 /*************************************************************************
  *		ScrollDC (USER32.@)
- * 
+ *
  *   Only the hrgnUpdate is return in device coordinate.
  *   rcUpdate must be returned in logical coordinate to comply with win API.
  *
diff --git a/windows/spy.c b/windows/spy.c
index ad5b656..2467e42 100644
--- a/windows/spy.c
+++ b/windows/spy.c
@@ -2,7 +2,7 @@
  * Message spying routines
  *
  * Copyright 1994, Bob Amstadt
- *           1995, Alex Korobka  
+ *           1995, Alex Korobka
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -41,8 +41,8 @@
 static const char * const MessageTypeNames[SPY_MAX_MSGNUM + 1] =
 {
     "WM_NULL",			/* 0x00 */
-    "WM_CREATE",	
-    "WM_DESTROY",    
+    "WM_CREATE",
+    "WM_DESTROY",
     "WM_MOVE",
     "wm_sizewait",
     "WM_SIZE",
@@ -90,38 +90,38 @@
     "WM_CHARTOITEM",
     "WM_SETFONT",		/* 0x30 */
     "WM_GETFONT",
-    "WM_SETHOTKEY", 
-    "WM_GETHOTKEY", 
-    "wm_filesyschange", 
+    "WM_SETHOTKEY",
+    "WM_GETHOTKEY",
+    "wm_filesyschange",
     "wm_isactiveicon",
     "wm_queryparkicon",
     "WM_QUERYDRAGICON",
     "wm_querysavestate",
-    "WM_COMPAREITEM", 
+    "WM_COMPAREITEM",
     "wm_testing",
-    NULL, 
-    "wm_otherwindowcreated", 
-    "wm_otherwindowdestroyed", 
+    NULL,
+    "wm_otherwindowcreated",
+    "wm_otherwindowdestroyed",
     "wm_activateshellwindow",
     NULL,
 
     NULL, 		        /* 0x40 */
-    "wm_compacting", NULL, NULL, 
-    "WM_COMMNOTIFY", NULL, 
+    "wm_compacting", NULL, NULL,
+    "WM_COMMNOTIFY", NULL,
     "WM_WINDOWPOSCHANGING",	/* 0x0046 */
     "WM_WINDOWPOSCHANGED",	/* 0x0047 */
-    "WM_POWER", NULL, 
-    "WM_COPYDATA", 
-    "WM_CANCELJOURNAL", NULL, NULL, 
+    "WM_POWER", NULL,
+    "WM_COPYDATA",
+    "WM_CANCELJOURNAL", NULL, NULL,
     "WM_NOTIFY", NULL,
 
     /* 0x0050 */
     "WM_INPUTLANGCHANGEREQUEST",
-    "WM_INPUTLANGCHANGE", 
-    "WM_TCARD", 
-    "WM_HELP", 
-    "WM_USERCHANGED", 
-    "WM_NOTIFYFORMAT", NULL, NULL, 
+    "WM_INPUTLANGCHANGE",
+    "WM_TCARD",
+    "WM_HELP",
+    "WM_USERCHANGED",
+    "WM_NOTIFYFORMAT", NULL, NULL,
     NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
 
     /* 0x0060 */
@@ -130,11 +130,11 @@
 
     /* 0x0070 */
     NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
-    NULL, NULL, NULL, 
-    "WM_CONTEXTMENU", 
-    "WM_STYLECHANGING", 
-    "WM_STYLECHANGED", 
-    "WM_DISPLAYCHANGE", 
+    NULL, NULL, NULL,
+    "WM_CONTEXTMENU",
+    "WM_STYLECHANGING",
+    "WM_STYLECHANGED",
+    "WM_DISPLAYCHANGE",
     "WM_GETICON",
 
     "WM_SETICON",		/* 0x0080 */
@@ -145,7 +145,7 @@
     "WM_NCPAINT",          	/* 0x0085 */
     "WM_NCACTIVATE",       	/* 0x0086 */
     "WM_GETDLGCODE",		/* 0x0087 */
-    "WM_SYNCPAINT", 
+    "WM_SYNCPAINT",
     "WM_SYNCTASK", NULL, NULL, NULL, NULL, NULL, NULL,
 
     /* 0x0090 */
@@ -421,10 +421,10 @@
     "WM_ENTERMENULOOP",         /* 0x0211 */
     "WM_EXITMENULOOP",          /* 0x0212 */
     "WM_NEXTMENU", 		/* 0x0213 */
-    "WM_SIZING", 
+    "WM_SIZING",
     "WM_CAPTURECHANGED",
     "WM_MOVING", NULL,
-    "WM_POWERBROADCAST", 
+    "WM_POWERBROADCAST",
     "WM_DEVICECHANGE", NULL, NULL, NULL, NULL, NULL, NULL,
 
     "WM_MDICREATE",             /* 0x0220 */
@@ -438,22 +438,22 @@
     "WM_MDIICONARRANGE",        /* 0x0228 */
     "WM_MDIGETACTIVE",          /* 0x0229 */
 
-    "WM_DROPOBJECT", 
-    "WM_QUERYDROPOBJECT", 
+    "WM_DROPOBJECT",
+    "WM_QUERYDROPOBJECT",
     "WM_BEGINDRAG",
     "WM_DRAGLOOP",
     "WM_DRAGSELECT",
     "WM_DRAGMOVE",
-     
+
     /* 0x0230*/
     "WM_MDISETMENU",            /* 0x0230 */
     "WM_ENTERSIZEMOVE",		/* 0x0231 */
     "WM_EXITSIZEMOVE",		/* 0x0232 */
     "WM_DROPFILES", 		/* 0x0233 */
-    "WM_MDIREFRESHMENU", NULL, NULL, NULL, 
+    "WM_MDIREFRESHMENU", NULL, NULL, NULL,
     /* 0x0238*/
     NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
-    
+
     /* 0x0240 */
     NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
     NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
@@ -461,7 +461,7 @@
     /* 0x0250 */
     NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
     NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
-    
+
     /* 0x0260 */
     NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
     NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
@@ -492,18 +492,18 @@
     NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
 
     "WM_CUT", 			/* 0x0300 */
-    "WM_COPY", 
-    "WM_PASTE", 
-    "WM_CLEAR", 
-    "WM_UNDO", 
-    "WM_RENDERFORMAT", 
-    "WM_RENDERALLFORMATS", 
+    "WM_COPY",
+    "WM_PASTE",
+    "WM_CLEAR",
+    "WM_UNDO",
+    "WM_RENDERFORMAT",
+    "WM_RENDERALLFORMATS",
     "WM_DESTROYCLIPBOARD",
-    "WM_DRAWCLIPBOARD", 
-    "WM_PAINTCLIPBOARD", 
-    "WM_VSCROLLCLIPBOARD", 
-    "WM_SIZECLIPBOARD", 
-    "WM_ASKCBFORMATNAME", 
+    "WM_DRAWCLIPBOARD",
+    "WM_PAINTCLIPBOARD",
+    "WM_VSCROLLCLIPBOARD",
+    "WM_SIZECLIPBOARD",
+    "WM_ASKCBFORMATNAME",
     "WM_CHANGECBCHAIN",
     "WM_HSCROLLCLIPBOARD",
     "WM_QUERYNEWPALETTE",	/* 0x030f*/
@@ -511,10 +511,10 @@
     "WM_PALETTEISCHANGING",
     "WM_PALETTECHANGED",
     "WM_HOTKEY", 		/* 0x0312 */
-	  NULL, NULL, NULL, NULL, 
-    "WM_PRINT", 
-    "WM_PRINTCLIENT", 
-    NULL, NULL, NULL, NULL, NULL, NULL, NULL, 
+	  NULL, NULL, NULL, NULL,
+    "WM_PRINT",
+    "WM_PRINTCLIENT",
+    NULL, NULL, NULL, NULL, NULL, NULL, NULL,
 
     NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
     NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
@@ -570,23 +570,23 @@
     NULL, NULL, NULL, NULL, NULL, NULL, NULL,
     NULL, NULL, NULL, NULL, NULL, NULL, NULL,
     "WM_COALESCE_LAST",         /* 0x039F */
-    
+
     /* 0x03a0 */
-    "MM_JOY1MOVE", 
-    "MM_JOY2MOVE", 
-    "MM_JOY1ZMOVE", 
-    "MM_JOY2ZMOVE", 
+    "MM_JOY1MOVE",
+    "MM_JOY2MOVE",
+    "MM_JOY1ZMOVE",
+    "MM_JOY2ZMOVE",
                             NULL, NULL, NULL, NULL,
     NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
 
     /* 0x03b0 */
-    NULL, NULL, NULL, NULL, NULL, 
-    "MM_JOY1BUTTONDOWN", 
-    "MM_JOY2BUTTONDOWN", 
+    NULL, NULL, NULL, NULL, NULL,
+    "MM_JOY1BUTTONDOWN",
+    "MM_JOY2BUTTONDOWN",
     "MM_JOY1BUTTONUP",
     "MM_JOY2BUTTONUP",
     "MM_MCINOTIFY",
-                NULL, 
+                NULL,
     "MM_WOM_OPEN",
     "MM_WOM_CLOSE",
     "MM_WOM_DONE",
@@ -620,7 +620,7 @@
     "WM_DDE_EXECUTE",	/* 0x3E8 */
     NULL, NULL, NULL, NULL, NULL, NULL, NULL,
 
-    
+
     /* 0x03f0 */
     NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
     NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
@@ -1279,41 +1279,41 @@
 /* number. (First method prefered.)                         */
 
 static const USER_MSG rebar_array[] = {
-          USM(RB_INSERTBANDA,          0), 
-          USM(RB_DELETEBAND,           0), 
-          USM(RB_GETBARINFO,           0), 
-          USM(RB_SETBARINFO,           0), 
-          USM(RB_GETBANDINFO,          0), 
-          USM(RB_SETBANDINFOA,         0), 
-          USM(RB_SETPARENT,            0), 
-          USM(RB_HITTEST,              0), 
-          USM(RB_GETRECT,              0), 
-          USM(RB_INSERTBANDW,          0), 
-          USM(RB_SETBANDINFOW,         0), 
-          USM(RB_GETBANDCOUNT,         0), 
-          USM(RB_GETROWCOUNT,          0), 
-          USM(RB_GETROWHEIGHT,         0), 
-          USM(RB_IDTOINDEX,            0), 
-          USM(RB_GETTOOLTIPS,          0), 
-          USM(RB_SETTOOLTIPS,          0),  
-          USM(RB_SETBKCOLOR,           0), 
-          USM(RB_GETBKCOLOR,           0), 
-          USM(RB_SETTEXTCOLOR,         0), 
-          USM(RB_GETTEXTCOLOR,         0), 
-          USM(RB_SIZETORECT,           0), 
-          USM(RB_BEGINDRAG,            0), 
-          USM(RB_ENDDRAG,              0), 
-          USM(RB_DRAGMOVE,             0), 
-          USM(RB_GETBARHEIGHT,         0), 
-          USM(RB_GETBANDINFOW,         0), 
-          USM(RB_GETBANDINFOA,         0), 
-          USM(RB_MINIMIZEBAND,         0), 
-          USM(RB_MAXIMIZEBAND,         0), 
-          USM(RB_GETBANDBORDERS,       0), 
-          USM(RB_SHOWBAND,             0), 
-          USM(RB_SETPALETTE,           0), 
-          USM(RB_GETPALETTE,           0), 
-          USM(RB_MOVEBAND,             0), 
+          USM(RB_INSERTBANDA,          0),
+          USM(RB_DELETEBAND,           0),
+          USM(RB_GETBARINFO,           0),
+          USM(RB_SETBARINFO,           0),
+          USM(RB_GETBANDINFO,          0),
+          USM(RB_SETBANDINFOA,         0),
+          USM(RB_SETPARENT,            0),
+          USM(RB_HITTEST,              0),
+          USM(RB_GETRECT,              0),
+          USM(RB_INSERTBANDW,          0),
+          USM(RB_SETBANDINFOW,         0),
+          USM(RB_GETBANDCOUNT,         0),
+          USM(RB_GETROWCOUNT,          0),
+          USM(RB_GETROWHEIGHT,         0),
+          USM(RB_IDTOINDEX,            0),
+          USM(RB_GETTOOLTIPS,          0),
+          USM(RB_SETTOOLTIPS,          0),
+          USM(RB_SETBKCOLOR,           0),
+          USM(RB_GETBKCOLOR,           0),
+          USM(RB_SETTEXTCOLOR,         0),
+          USM(RB_GETTEXTCOLOR,         0),
+          USM(RB_SIZETORECT,           0),
+          USM(RB_BEGINDRAG,            0),
+          USM(RB_ENDDRAG,              0),
+          USM(RB_DRAGMOVE,             0),
+          USM(RB_GETBARHEIGHT,         0),
+          USM(RB_GETBANDINFOW,         0),
+          USM(RB_GETBANDINFOA,         0),
+          USM(RB_MINIMIZEBAND,         0),
+          USM(RB_MAXIMIZEBAND,         0),
+          USM(RB_GETBANDBORDERS,       0),
+          USM(RB_SHOWBAND,             0),
+          USM(RB_SETPALETTE,           0),
+          USM(RB_GETPALETTE,           0),
+          USM(RB_MOVEBAND,             0),
           {0,0,0} };
 
 static const USER_MSG toolbar_array[] = {
@@ -1323,9 +1323,9 @@
           USM(TB_HIDEBUTTON            ,0),
           USM(TB_INDETERMINATE         ,0),
           USM(TB_MARKBUTTON	       ,0),
-          USM(TB_ISBUTTONENABLED       ,0), 
-          USM(TB_ISBUTTONCHECKED       ,0), 
-          USM(TB_ISBUTTONPRESSED       ,0), 
+          USM(TB_ISBUTTONENABLED       ,0),
+          USM(TB_ISBUTTONCHECKED       ,0),
+          USM(TB_ISBUTTONPRESSED       ,0),
           USM(TB_ISBUTTONHIDDEN        ,0),
           USM(TB_ISBUTTONINDETERMINATE ,0),
           USM(TB_ISBUTTONHIGHLIGHTED   ,0),
@@ -1340,7 +1340,7 @@
           USM(TB_COMMANDTOINDEX        ,0),
           USM(TB_SAVERESTOREA          ,0),
           USM(TB_CUSTOMIZE             ,0),
-          USM(TB_ADDSTRINGA            ,0), 
+          USM(TB_ADDSTRINGA            ,0),
           USM(TB_GETITEMRECT           ,0),
           USM(TB_BUTTONSTRUCTSIZE      ,0),
           USM(TB_SETBUTTONSIZE         ,0),
@@ -1387,7 +1387,7 @@
           USM(TB_GETANCHORHIGHLIGHT    ,0),
           USM(TB_GETBUTTONTEXTW        ,0),
           USM(TB_SAVERESTOREW          ,0),
-          USM(TB_ADDSTRINGW            ,0), 
+          USM(TB_ADDSTRINGW            ,0),
           USM(TB_MAPACCELERATORA       ,0),
           USM(TB_GETINSERTMARK         ,0),
           USM(TB_SETINSERTMARK         ,0),
@@ -1481,12 +1481,12 @@
 /* locate the correct 'value'.                             */
 static const SPY_NOTIFY spnfy_array[] = {
     /*  common        0U       to  0U-99U  */
-    SPNFY(NM_OUTOFMEMORY,        NMHDR), 
-    SPNFY(NM_CLICK,              NMHDR),    
+    SPNFY(NM_OUTOFMEMORY,        NMHDR),
+    SPNFY(NM_CLICK,              NMHDR),
     SPNFY(NM_DBLCLK,             NMHDR),
-    SPNFY(NM_RETURN,             NMHDR),  
+    SPNFY(NM_RETURN,             NMHDR),
     SPNFY(NM_RCLICK,             NMHDR),
-    SPNFY(NM_RDBLCLK,            NMHDR),       
+    SPNFY(NM_RDBLCLK,            NMHDR),
     SPNFY(NM_SETFOCUS,           NMHDR),
     SPNFY(NM_KILLFOCUS,          NMHDR),
     SPNFY(NM_CUSTOMDRAW,         NMCUSTOMDRAW),
@@ -1496,7 +1496,7 @@
     SPNFY(NM_RELEASEDCAPTURE,    NMHDR),
     SPNFY(NM_SETCURSOR,          NMMOUSE),
     SPNFY(NM_CHAR,               NMCHAR),
-    SPNFY(NM_TOOLTIPSCREATED,    NMTOOLTIPSCREATED),  
+    SPNFY(NM_TOOLTIPSCREATED,    NMTOOLTIPSCREATED),
     /* Listview       0U-100U  to  0U-199U  */
     SPNFY(LVN_ITEMCHANGING,      NMLISTVIEW),
     SPNFY(LVN_ITEMCHANGED,       NMLISTVIEW),
@@ -1613,7 +1613,7 @@
     SPNFY(TBN_GETINFOTIPW,       NMTBGETINFOTIPW),
     SPNFY(TBN_GETBUTTONINFOW,    NMTOOLBARW),
     /* Up/Down        0U-721U  to  0U-740U  */
-    SPNFY(UDN_DELTAPOS,          NMHDR),           
+    SPNFY(UDN_DELTAPOS,          NMHDR),
     /* Month Calendar 0U-750U  to  0U-759U  */
     /* ******************* WARNING ***************************** */
     /* The following appear backwards but needs to be this way.  */
@@ -1631,9 +1631,9 @@
     /* Thank you MS for your obvious quality control!!           */
     /* ******************* WARNING ***************************** */
     /* Date/Time      0U-760U  to  0U-799U  */
-    /* SPNFY(MCN_SELECT,            NMHDR), */        
-    /* SPNFY(MCN_GETDAYSTATE,       NMHDR), */        
-    /* SPNFY(MCN_SELCHANGE,         NMHDR), */        
+    /* SPNFY(MCN_SELECT,            NMHDR), */
+    /* SPNFY(MCN_GETDAYSTATE,       NMHDR), */
+    /* SPNFY(MCN_SELCHANGE,         NMHDR), */
     /* ******************* WARNING ***************************** */
     /* The following appear backwards but needs to be this way.  */
     /* The reason is that MS (and us) define the MCNs as         */
@@ -1642,20 +1642,20 @@
     /*         TBN_FIRST - n                                     */
     /* The only place that this is important is in this list     */
     /* ******************* WARNING ***************************** */
-    SPNFY(DTN_FORMATQUERYW,      NMHDR),      
-    SPNFY(DTN_FORMATW,           NMHDR),      
-    SPNFY(DTN_WMKEYDOWNW,        NMHDR),        
-    SPNFY(DTN_USERSTRINGW,       NMHDR),         
-    SPNFY(MCN_SELECT,            NMHDR),        
-    SPNFY(MCN_GETDAYSTATE,       NMHDR),        
-    SPNFY(MCN_SELCHANGE,         NMHDR),        
-    SPNFY(DTN_CLOSEUP,           NMHDR),      
-    SPNFY(DTN_DROPDOWN,          NMHDR),      
-    SPNFY(DTN_FORMATQUERYA,      NMHDR),       
-    SPNFY(DTN_FORMATA,           NMHDR),      
-    SPNFY(DTN_WMKEYDOWNA,        NMHDR),      
-    SPNFY(DTN_USERSTRINGA,       NMHDR),      
-    SPNFY(DTN_DATETIMECHANGE,    NMHDR),      
+    SPNFY(DTN_FORMATQUERYW,      NMHDR),
+    SPNFY(DTN_FORMATW,           NMHDR),
+    SPNFY(DTN_WMKEYDOWNW,        NMHDR),
+    SPNFY(DTN_USERSTRINGW,       NMHDR),
+    SPNFY(MCN_SELECT,            NMHDR),
+    SPNFY(MCN_GETDAYSTATE,       NMHDR),
+    SPNFY(MCN_SELCHANGE,         NMHDR),
+    SPNFY(DTN_CLOSEUP,           NMHDR),
+    SPNFY(DTN_DROPDOWN,          NMHDR),
+    SPNFY(DTN_FORMATQUERYA,      NMHDR),
+    SPNFY(DTN_FORMATA,           NMHDR),
+    SPNFY(DTN_WMKEYDOWNA,        NMHDR),
+    SPNFY(DTN_USERSTRINGA,       NMHDR),
+    SPNFY(DTN_DATETIMECHANGE,    NMHDR),
     /* ComboBoxEx     0U-800U  to  0U-830U  */
     SPNFY(CBEN_GETDISPINFOA,     NMCOMBOBOXEXA),
     SPNFY(CBEN_INSERTITEM,       NMCOMBOBOXEXA),
@@ -1677,7 +1677,7 @@
     SPNFY(RBN_DELETEDBAND,       NMREBAR),
     SPNFY(RBN_CHILDSIZE,         NMREBARCHILDSIZE),
     /* IP Adderss     0U-860U  to  0U-879U  */
-    SPNFY(IPN_FIELDCHANGED,      NMHDR),         
+    SPNFY(IPN_FIELDCHANGED,      NMHDR),
     /* Status bar     0U-880U  to  0U-899U  */
     SPNFY(SBN_SIMPLEMODECHANGE,  NMHDR),
     /* Pager          0U-900U  to  0U-950U  */
@@ -1842,8 +1842,8 @@
 	       strcmpW(cc_array[i].classname, sp_e->wnd_class) !=0) i++;
 
 	if (!cc_array[i].classname) return;
-	/* TRACE("process class %s, first %p, last %p\n", 
-	      debugstr_w(cc_array[i].classname), cc_array[i].classmsg, 
+	/* TRACE("process class %s, first %p, last %p\n",
+	      debugstr_w(cc_array[i].classname), cc_array[i].classmsg,
 	      cc_array[i].lastmsg); */
 	p = SPY_Bsearch_Msg (cc_array[i].classmsg, cc_array[i].lastmsg,
 			 sp_e->msgnum);
@@ -1857,7 +1857,7 @@
 /***********************************************************************
  *           SPY_GetWndName
  *
- *  Sets the value of "wnd_name" and "wnd_class" members of the 
+ *  Sets the value of "wnd_name" and "wnd_class" members of the
  *  instance structure.
  *
  */
@@ -1866,7 +1866,7 @@
     DWORD save_error;
     INT len;
 
-    /* save and restore error code over the next call */	
+    /* save and restore error code over the next call */
     save_error = GetLastError();
     GetClassNameW(sp_e->msg_hwnd, sp_e->wnd_class, sizeof(sp_e->wnd_class)/sizeof(WCHAR));
     SetLastError(save_error);
@@ -1887,7 +1887,7 @@
 /***********************************************************************
  *           SPY_GetMsgName
  *
- *  ****  External function  **** 
+ *  ****  External function  ****
  *
  *  Get message name
  */
@@ -2008,7 +2008,7 @@
 	    {
 		LPRECT rc = (LPRECT) sp_e->lParam;
 		if (rc) {
-		    TRACE("lParam rect (%d,%d)-(%d,%d)\n", 
+		    TRACE("lParam rect (%d,%d)-(%d,%d)\n",
 			  rc->left, rc->top, rc->right, rc->bottom);
 		}
 		break;
@@ -2035,7 +2035,7 @@
 	    {
 		LPINT ptmin = (LPINT) sp_e->wParam;
 		LPINT ptmax = (LPINT) sp_e->lParam;
-		if (ptmin && ptmax) 
+		if (ptmin && ptmax)
 		    TRACE("min=%d max=%d\n", *ptmin, *ptmax);
 		else if (ptmin)
 		    TRACE("min=%d max=n/a\n", *ptmin);
@@ -2045,24 +2045,24 @@
 	    }
 	case WM_DRAWITEM:
 	    if (!enter) break;
-	    {   
+	    {
 		DRAWITEMSTRUCT *lpdis = (DRAWITEMSTRUCT*) sp_e->lParam;
-		TRACE("DRAWITEMSTRUCT: CtlType=0x%08x CtlID=0x%08x\n", 
+		TRACE("DRAWITEMSTRUCT: CtlType=0x%08x CtlID=0x%08x\n",
 		      lpdis->CtlType, lpdis->CtlID);
-		TRACE("itemID=0x%08x itemAction=0x%08x itemState=0x%08x\n", 
+		TRACE("itemID=0x%08x itemAction=0x%08x itemState=0x%08x\n",
 		      lpdis->itemID, lpdis->itemAction, lpdis->itemState);
 		TRACE("hWnd=0x%04x hDC=0x%04x (%d,%d)-(%d,%d) itemData=0x%08lx\n",
-		      lpdis->hwndItem, lpdis->hDC, lpdis->rcItem.left, 
+		      lpdis->hwndItem, lpdis->hDC, lpdis->rcItem.left,
 		      lpdis->rcItem.top, lpdis->rcItem.right,
 		      lpdis->rcItem.bottom, lpdis->itemData);
 	    }
 	    break;
 	case WM_MEASUREITEM:
-	    {   
+	    {
 		MEASUREITEMSTRUCT *lpmis = (MEASUREITEMSTRUCT*) sp_e->lParam;
-		TRACE("MEASUREITEMSTRUCT: CtlType=0x%08x CtlID=0x%08x\n", 
+		TRACE("MEASUREITEMSTRUCT: CtlType=0x%08x CtlID=0x%08x\n",
 		      lpmis->CtlType, lpmis->CtlID);
-		TRACE("itemID=0x%08x itemWidth=0x%08x itemHeight=0x%08x\n", 
+		TRACE("itemID=0x%08x itemWidth=0x%08x itemHeight=0x%08x\n",
 		      lpmis->itemID, lpmis->itemWidth, lpmis->itemHeight);
 		TRACE("itemData=0x%08lx\n", lpmis->itemData);
 	    }
@@ -2070,7 +2070,7 @@
 	case WM_WINDOWPOSCHANGED:
 	    if (!enter) break;
 	case WM_WINDOWPOSCHANGING:
-	    {   
+	    {
 		WINDOWPOS *lpwp = (WINDOWPOS *)sp_e->lParam;
 		TRACE("WINDOWPOS hwnd=0x%04x, after=0x%04x, at (%d,%d) w=%d h=%d, flags=0x%08x\n",
 		      lpwp->hwnd, lpwp->hwndInsertAfter, lpwp->x, lpwp->y,
@@ -2080,10 +2080,10 @@
 	case WM_STYLECHANGED:
 	    if (!enter) break;
 	case WM_STYLECHANGING:
-	    {   
+	    {
 		LPSTYLESTRUCT ss = (LPSTYLESTRUCT) sp_e->lParam;
 		TRACE("STYLESTRUCT: StyleOld=0x%08lx, StyleNew=0x%08lx\n",
-		      ss->styleOld, ss->styleNew); 
+		      ss->styleOld, ss->styleNew);
 	    }
 	    break;
 	case WM_NCCALCSIZE:
@@ -2095,14 +2095,14 @@
 	    break;
 	case WM_NOTIFY:
 	    /* if (!enter) break; */
-	    {   
+	    {
 		NMHDR * pnmh = (NMHDR*) sp_e->lParam;
 		UINT *q, dumplen;
 		const SPY_NOTIFY *p;
 		WCHAR from_class[60];
 		DWORD save_error;
 
-		p = SPY_Bsearch_Notify (&spnfy_array[0], end_spnfy_array, 
+		p = SPY_Bsearch_Notify (&spnfy_array[0], end_spnfy_array,
 					pnmh->code);
 		if (p) {
 		    TRACE("NMHDR hwndFrom=0x%08x idFrom=0x%08x code=%s<0x%08x>, extra=0x%x\n",
@@ -2111,12 +2111,12 @@
 
 		    /* for CUSTOMDRAW, dump all the data for TOOLBARs */
 		    if (pnmh->code == NM_CUSTOMDRAW) {
-			/* save and restore error code over the next call */	
+			/* save and restore error code over the next call */
 			save_error = GetLastError();
-			GetClassNameW(pnmh->hwndFrom, from_class, 
+			GetClassNameW(pnmh->hwndFrom, from_class,
 				      sizeof(from_class)/sizeof(WCHAR));
 			SetLastError(save_error);
-			if (strcmpW(TOOLBARCLASSNAMEW, from_class) == 0) 
+			if (strcmpW(TOOLBARCLASSNAMEW, from_class) == 0)
 			    dumplen = sizeof(NMTBCUSTOMDRAW)-sizeof(NMHDR);
 		    }
 		    if (dumplen > 0) {
@@ -2133,7 +2133,7 @@
 		SPY_DumpMem ("MSG lParam", (UINT *)sp_e->lParam, sp_e->data_len);
 	    break;
 	}
-	
+
 }
 /***********************************************************************
  *           SPY_EnterMessage
@@ -2165,7 +2165,7 @@
 
     case SPY_DISPATCHMESSAGE:
         TRACE("%*s(%08x) %-16s message [%04x] %s dispatched  wp=%08x lp=%08lx\n",
-                        indent, "", hWnd, debugstr_w(sp_e.wnd_name), msg, 
+                        indent, "", hWnd, debugstr_w(sp_e.wnd_name), msg,
                         sp_e.msg_name, wParam, lParam);
         break;
 
@@ -2194,7 +2194,7 @@
 		SPY_DumpStructure(&sp_e, TRUE);
 	    }
         }
-        break;   
+        break;
 
     case SPY_DEFWNDPROC16:
 	if( SPY_ExcludeDWP ) return;
@@ -2262,7 +2262,7 @@
                         indent, "", hWnd, debugstr_w(sp_e.wnd_name), msg,
                         sp_e.msg_name, lReturn );
 	SPY_DumpStructure(&sp_e, FALSE);
-        break; 
+        break;
 
     case SPY_RESULT_INVALIDHWND16:
         WARN(" %*s(%04x) %-16s message [%04x] %s HAS INVALID HWND\n",
@@ -2348,7 +2348,7 @@
     p--;
     end_spnfy_array = p;
 
-    /* find last good entry in each common control message array 
+    /* find last good entry in each common control message array
      *  and save addr for b-search.
      */
     i = 0;
diff --git a/windows/syscolor.c b/windows/syscolor.c
index 83f8383..47a6398 100644
--- a/windows/syscolor.c
+++ b/windows/syscolor.c
@@ -162,7 +162,7 @@
     if (SysColorPens[index])
     {
         SYSCOLOR_MakeObjectSystem(SysColorPens[index], FALSE);
-	DeleteObject( SysColorPens[index] ); 
+	DeleteObject( SysColorPens[index] );
     }
     SysColorPens[index] = CreatePen( PS_SOLID, 1, color );
     SYSCOLOR_MakeObjectSystem(SysColorPens[index], TRUE);
@@ -193,7 +193,7 @@
       {
 	DWORD dwDataSize = sizeof(buffer);
 	if (!(RegQueryValueExA(hKey,(LPSTR)p[i*2], 0, 0, buffer, &dwDataSize)))
-	  if (sscanf( buffer, "%d %d %d", &r, &g, &b ) == 3) 
+	  if (sscanf( buffer, "%d %d %d", &r, &g, &b ) == 3)
 	    bOk = TRUE;
       }
 
@@ -203,13 +203,13 @@
 	if (sscanf( buffer, " %d %d %d", &r, &g, &b ) == 3)
 	  bOk = TRUE;
       }
-      
+
       /* last chance, take the default */
       if (!bOk)
       { int iNumColors = sscanf( p[i*2+1], " %d %d %d", &r, &g, &b );
 	assert (iNumColors==3);
       }
-      
+
       SYSCOLOR_SetColor( i, RGB(r,g,b) );
     }
     if (!bNoReg)
@@ -290,7 +290,7 @@
  *		SetSysColorsTemp (USER32.@)
  *
  * UNDOCUMENTED !!
- * 
+ *
  * Called by W98SE desk.cpl Control Panel Applet:
  * handle = SetSysColorsTemp(ptr, ptr, nCount);     ("set" call)
  * result = SetSysColorsTemp(NULL, NULL, handle);   ("restore" call)
diff --git a/windows/sysmetrics.c b/windows/sysmetrics.c
index 0b3b7da..047170e 100644
--- a/windows/sysmetrics.c
+++ b/windows/sysmetrics.c
@@ -40,13 +40,13 @@
  *
  * Convert a a dimension value that was obtained from the registry.  These are
  * quoted as being "twips" values if negative and pixels if positive.
- * See for example 
+ * See for example
  *   MSDN Library - April 2001 -> Resource Kits ->
  *       Windows 2000 Resource Kit Reference ->
  *       Technical Reference to the Windows 2000 Registry ->
  *       HKEY_CURRENT_USE -> Control Panel -> Desktop -> WindowMetrics
  *
- * This is written as a function to prevent repeated evaluation of the 
+ * This is written as a function to prevent repeated evaluation of the
  * argument.
  */
 inline static int RegistryTwips2Pixels(int x)
@@ -107,9 +107,9 @@
  * SM_CYMENU           x-1      x	Already fixed
  * SM_CYFULLSCREEN     x-1      x
  * SM_CXFRAME                           Fixed July 6, 2001 - Bill Medland
- * 
+ *
  * (collides with TWEAK_WineLook sometimes,
- * so changing anything might be difficult) 
+ * so changing anything might be difficult)
  *
  * Starting at Win95 there are now a large number or Registry entries in the
  * [WindowMetrics] section that are probably relevant here.
@@ -231,7 +231,7 @@
     sysMetrics[SM_CYMINIMIZED] = 24;
 
     /* FIXME: How do I calculate these? */
-    sysMetrics[SM_CXMAXTRACK] = 
+    sysMetrics[SM_CXMAXTRACK] =
 	sysMetrics[SM_CXSCREEN] + 4 + 2 * sysMetrics[SM_CXFRAME];
     sysMetrics[SM_CYMAXTRACK] =
 	sysMetrics[SM_CYSCREEN] + 4 + 2 * sysMetrics[SM_CYFRAME];
diff --git a/windows/sysparams.c b/windows/sysparams.c
index f7fce71..a23f61c 100644
--- a/windows/sysparams.c
+++ b/windows/sysparams.c
@@ -356,7 +356,7 @@
                 SendMessageA(HWND_BROADCAST, WM_SETTINGCHANGE,
                              uiAction, (LPARAM) "");
         }
-        else 
+        else
         {
             /* FIXME notify other wine processes with internal message */
         }
@@ -543,9 +543,9 @@
 
     BOOL ret = TRUE;
     unsigned spi_idx = 0;
-    
+
     TRACE("(%u, %u, %p, %u)\n", uiAction, uiParam, pvParam, fWinIni);
-    
+
     switch (uiAction)
     {
     case SPI_GETBEEP:				/*      1 */
@@ -553,12 +553,12 @@
         if (!spi_loaded[spi_idx])
         {
             char buf[5];
-            
+
             if (SYSPARAMS_Load( SPI_SETBEEP_REGKEY, SPI_SETBEEP_VALNAME, buf ))
                 beep_active  = !strcasecmp( "Yes", buf );
             spi_loaded[spi_idx] = TRUE;
         }
-        
+
 	*(BOOL *)pvParam = beep_active;
         break;
 
@@ -595,7 +595,7 @@
         ((INT *)pvParam)[1] = mouse_threshold2;
         ((INT *)pvParam)[2] = mouse_speed;
         break;
-        
+
     case SPI_SETMOUSE:                          /*      4 */
     {
         char buf[10];
@@ -656,7 +656,7 @@
         if (SYSPARAMS_Save( SPI_SETBORDER_REGKEY, SPI_SETBORDER_VALNAME,
                             buf, fWinIni ))
         {
-            if (uiParam > 0) 
+            if (uiParam > 0)
             {
                 border = uiParam;
                 spi_loaded[spi_idx] = TRUE;
@@ -718,7 +718,7 @@
             if (!spi_loaded[spi_idx])
             {
                 char buf[10];
-            
+
                 if (SYSPARAMS_Load( SPI_ICONHORIZONTALSPACING_REGKEY,
                                     SPI_ICONHORIZONTALSPACING_VALNAME, buf ))
                 {
@@ -782,7 +782,7 @@
             ret = FALSE;
         break;
     }
-        
+
     case SPI_GETSCREENSAVEACTIVE:               /*     16 */
 	*(BOOL *)pvParam = USER_Driver.pGetScreenSaveActive();
         break;
@@ -799,7 +799,7 @@
                         buf, fWinIni );
         break;
     }
-        
+
     case SPI_GETGRIDGRANULARITY:                /*     18 */
         spi_idx = SPI_SETGRIDGRANULARITY_IDX;
         if (!spi_loaded[spi_idx])
@@ -810,7 +810,7 @@
                                 SPI_SETGRIDGRANULARITY_VALNAME,
                                 buf ))
                 grid_granularity = atoi( buf );
-            
+
             spi_loaded[spi_idx] = TRUE;
         }
 	*(INT *)pvParam = grid_granularity;
@@ -844,8 +844,8 @@
 	if ((INT16)uiParam == -1)
 	{
 	    char buffer[256];
-	    GetProfileStringA( "Desktop", "Pattern", 
-			       "170 85 170 85 170 85 170 85", 
+	    GetProfileStringA( "Desktop", "Pattern",
+			       "170 85 170 85 170 85 170 85",
 			       buffer, sizeof(buffer) );
 	    ret = DESKTOP_SetPattern( (LPSTR)buffer );
 	} else
@@ -865,7 +865,7 @@
                 int i = atoi( buf );
                 if ( (i >= 0) && (i <= 3)) keyboard_delay = i;
             }
-            
+
             spi_loaded[spi_idx] = TRUE;
         }
 	*(INT *)pvParam = keyboard_delay;
@@ -898,7 +898,7 @@
             if (!spi_loaded[spi_idx])
             {
                 char buf[10];
-            
+
                 if (SYSPARAMS_Load( SPI_ICONVERTICALSPACING_REGKEY,
                                     SPI_ICONVERTICALSPACING_VALNAME, buf ))
                 {
@@ -926,7 +926,7 @@
             else
                 ret = FALSE;
         }
-        
+
 	break;
 
     case SPI_GETICONTITLEWRAP:                  /*     25 */
@@ -940,7 +940,7 @@
                 icon_title_wrap  = atoi(buf);
             spi_loaded[spi_idx] = TRUE;
         }
-        
+
 	*(BOOL *)pvParam = icon_title_wrap;
         break;
 
@@ -961,14 +961,14 @@
             ret = FALSE;
         break;
     }
-    
+
     case SPI_GETMENUDROPALIGNMENT:              /*     27 */
         spi_idx = SPI_SETMENUDROPALIGNMENT_IDX;
 
         if (!spi_loaded[spi_idx])
         {
             char buf[5];
-            
+
             if (SYSPARAMS_Load( SPI_SETMENUDROPALIGNMENT_REGKEY,
                                 SPI_SETMENUDROPALIGNMENT_VALNAME, buf ))
             {
@@ -976,7 +976,7 @@
             }
             spi_loaded[spi_idx] = TRUE;
         }
-        
+
 
         *(BOOL *)pvParam = GetSystemMetrics( SM_MENUDROPALIGNMENT );
         break;
@@ -1048,7 +1048,7 @@
 	SYSPARAMS_GetGUIFont( &lfDefault );
 
 	GetProfileStringA( "Desktop", "IconTitleFaceName",
-			   lfDefault.lfFaceName, 
+			   lfDefault.lfFaceName,
 			   lpLogFont->lfFaceName, LF_FACESIZE );
 	lpLogFont->lfHeight = -GetProfileIntA( "Desktop", "IconTitleSize", 13 );
 	lpLogFont->lfWidth = 0;
@@ -1113,7 +1113,7 @@
         /* the action is disabled */
         ret = FALSE;
         break;
-    
+
     case SPI_SETDRAGFULLWINDOWS:                /*     37  WINVER >= 0x0400 */
     {
         char buf[5];
@@ -1143,18 +1143,18 @@
                 drag_full_windows  = atoi(buf);
             spi_loaded[spi_idx] = TRUE;
         }
-        
+
 	*(BOOL *)pvParam = drag_full_windows;
         break;
 
     case SPI_GETNONCLIENTMETRICS: 		/*     41  WINVER >= 0x400 */
     {
 	LPNONCLIENTMETRICSA lpnm = (LPNONCLIENTMETRICSA)pvParam;
-		
+
 	if (lpnm->cbSize == sizeof(NONCLIENTMETRICSA))
 	{
 	    LPLOGFONTA lpLogFont = &(lpnm->lfMenuFont);
-	    
+
 	    /* clear the struct, so we have 'sane' members */
 	    memset(
 		(char *)pvParam + sizeof(lpnm->cbSize),
@@ -1180,11 +1180,11 @@
 	    /* menus, FIXME: names of wine.conf entries are bogus */
 
 	    lpnm->iMenuWidth = GetProfileIntA( "Desktop", "MenuWidth", 13 );	/* size of the menu buttons*/
-	    lpnm->iMenuHeight = GetProfileIntA( "Desktop", "MenuHeight", 
+	    lpnm->iMenuHeight = GetProfileIntA( "Desktop", "MenuHeight",
 						(TWEAK_WineLook > WIN31_LOOK) ? 13 : 27 );
 
-	    GetProfileStringA( "Desktop", "MenuFont", 
-			       (TWEAK_WineLook > WIN31_LOOK) ? lpnm->lfCaptionFont.lfFaceName : "System", 
+	    GetProfileStringA( "Desktop", "MenuFont",
+			       (TWEAK_WineLook > WIN31_LOOK) ? lpnm->lfCaptionFont.lfFaceName : "System",
 			       lpLogFont->lfFaceName, LF_FACESIZE );
 
 	    lpLogFont->lfHeight = -GetProfileIntA( "Desktop", "MenuFontSize", 13 );
@@ -1270,7 +1270,7 @@
           SetRect( &work_area, 0, 0,
                    GetSystemMetrics( SM_CXSCREEN ),
                    GetSystemMetrics( SM_CYSCREEN ) );
-          
+
           if (SYSPARAMS_Load( SPI_SETWORKAREA_REGKEY,
                               SPI_SETWORKAREA_VALNAME,
                               buf ))
@@ -1353,7 +1353,7 @@
         if (!spi_loaded[spi_idx])
         {
             char buf[10];
-            
+
             if (SYSPARAMS_Load( SPI_SETSHOWSOUNDS_REGKEY,
                                 SPI_SETSHOWSOUNDS_VALNAME, buf ))
             {
@@ -1361,7 +1361,7 @@
             }
             spi_loaded[spi_idx] = TRUE;
         }
-        
+
 
         *(INT *)pvParam = GetSystemMetrics( SM_SHOWSOUNDS );
         break;
@@ -1466,7 +1466,7 @@
         break;
     }
     WINE_SPI_FIXME(SPI_SETSOUNDSENTRY);		/*     65 */
-    
+
     case SPI_GETHIGHCONTRAST:			/*     66  WINVER >= 0x400 */
     {
 	LPHIGHCONTRASTA lpHighContrastA = (LPHIGHCONTRASTA)pvParam;
@@ -1496,7 +1496,7 @@
                 keyboard_pref  = atoi(buf);
             spi_loaded[spi_idx] = TRUE;
         }
-        
+
 	*(BOOL *)pvParam = keyboard_pref;
         break;
 
@@ -1529,7 +1529,7 @@
                 screen_reader  = atoi(buf);
             spi_loaded[spi_idx] = TRUE;
         }
-        
+
 	*(BOOL *)pvParam = screen_reader;
         break;
 
@@ -1554,7 +1554,7 @@
     case SPI_GETANIMATION:			/*     72  WINVER >= 0x400 */
     {
 	LPANIMATIONINFO lpAnimInfo = (LPANIMATIONINFO)pvParam;
- 
+
 	/* Tell it "disabled" */
 	if (lpAnimInfo->cbSize == sizeof(ANIMATIONINFO))
 	    lpAnimInfo->iMinAnimate = 0; /* Minimise and restore animation is disabled (nonzero == enabled) */
@@ -1580,7 +1580,7 @@
     WINE_SPI_FIXME(SPI_GETPOWEROFFACTIVE);	/*     84  WINVER >= 0x400 */
     WINE_SPI_FIXME(SPI_SETLOWPOWERACTIVE);	/*     85  WINVER >= 0x400 */
     WINE_SPI_FIXME(SPI_SETPOWEROFFACTIVE);	/*     86  WINVER >= 0x400 */
-    
+
     WINE_SPI_FIXME(SPI_SETCURSORS);		/*     87  WINVER >= 0x400 */
     WINE_SPI_FIXME(SPI_SETICONS);		/*     88  WINVER >= 0x400 */
 
@@ -1596,7 +1596,7 @@
 
     WINE_SPI_FIXME(SPI_SETMOUSETRAILS);		/*     93  WINVER >= 0x400 */
     WINE_SPI_FIXME(SPI_GETMOUSETRAILS);		/*     94  WINVER >= 0x400 */
-	
+
     case SPI_SETSCREENSAVERRUNNING:             /*     97  WINVER >= 0x400 */
         {
         /* SPI_SCREENSAVERRUNNING is an alias for SPI_SETSCREENSAVERRUNNING */
@@ -1632,9 +1632,9 @@
 	*(UINT *)pvParam = 400; /* default for menu dropdowns */
 	break;
     WINE_SPI_FIXME(SPI_SETMOUSEHOVERTIME);	/*    103  _WIN32_WINNT >= 0x400 || _WIN32_WINDOW > 0x400 */
-              
+
     case SPI_GETWHEELSCROLLLINES:		/*    104  _WIN32_WINNT >= 0x400 || _WIN32_WINDOW > 0x400 */
-	*(UINT *)pvParam = 3; /* default for num scroll lines */  
+	*(UINT *)pvParam = 3; /* default for num scroll lines */
 	break;
 
     WINE_SPI_FIXME(SPI_SETWHEELSCROLLLINES);	/*    105  _WIN32_WINNT >= 0x400 || _WIN32_WINDOW > 0x400 */
@@ -1651,13 +1651,13 @@
         if (!spi_loaded[spi_idx])
         {
             char buf[5];
-            
+
             if (SYSPARAMS_Load( SPI_SETSCREENSAVERRUNNING_REGKEY,
                                 SPI_SETSCREENSAVERRUNNING_VALNAME, buf ))
                 screensaver_running  = atoi( buf );
             spi_loaded[spi_idx] = TRUE;
         }
-        
+
 	*(BOOL *)pvParam = screensaver_running;
         break;
 
@@ -1695,7 +1695,7 @@
     if (ret)
         SYSPARAMS_NotifyChange( uiAction, fWinIni );
     return ret;
-    
+
 #undef WINE_SPI_FIXME
 #undef WINE_SPI_WARN
 }
@@ -1710,7 +1710,7 @@
     BOOL16 ret;
 
     TRACE("(%u, %u, %p, %u)\n", uAction, uParam, lpvParam, fuWinIni);
-    
+
     switch (uAction)
     {
     case SPI_GETBEEP:				/*      1 */
@@ -1774,7 +1774,7 @@
 	    ret = SystemParametersInfoA( uAction, uParam, lpvParam, fuWinIni );
 	break;
     }
-    
+
     case SPI_GETWORKAREA:			/*     48  WINVER >= 0x400 */
     {
 	RECT tmp;
@@ -1783,7 +1783,7 @@
 	    CONV_RECT32TO16( &tmp, (RECT16 *)lpvParam );
 	break;
     }
-	
+
     case SPI_GETMOUSEHOVERWIDTH:		/*     98  _WIN32_WINNT >= 0x400 || _WIN32_WINDOW > 0x400 */
     case SPI_GETMOUSEHOVERHEIGHT:		/*    100  _WIN32_WINNT >= 0x400 || _WIN32_WINDOW > 0x400 */
     case SPI_GETMOUSEHOVERTIME:			/*    102  _WIN32_WINNT >= 0x400 || _WIN32_WINDOW > 0x400 */
@@ -1811,7 +1811,7 @@
     BOOL ret;
 
     TRACE("(%u, %u, %p, %u)\n", uiAction, uiParam, pvParam, fuWinIni);
-    
+
     switch (uiAction)
     {
     case SPI_SETDESKWALLPAPER:			/*     20 */
@@ -1890,7 +1890,7 @@
 	    ret = FALSE;
 	break;
     }
-    
+
     default:
         ret = SystemParametersInfoA( uiAction, uiParam, pvParam, fuWinIni );
         break;
diff --git a/windows/timer.c b/windows/timer.c
index f4e8a55..4ba0c3c 100644
--- a/windows/timer.c
+++ b/windows/timer.c
@@ -79,7 +79,7 @@
     TIMER *pTimer;
 
     EnterCriticalSection( &csTimer );
-    
+
     for (i = NB_TIMERS, pTimer = TimersArray; i > 0; i--, pTimer++)
 	if ((pTimer->hwnd == hwnd) && pTimer->timeout)
             TIMER_ClearTimer( pTimer );
@@ -99,11 +99,11 @@
     TIMER *pTimer;
 
     EnterCriticalSection( &csTimer );
-    
+
     for (i = NB_TIMERS, pTimer = TimersArray; i > 0; i--, pTimer++)
 	if ((pTimer->hq == hqueue) && pTimer->timeout)
             TIMER_ClearTimer( pTimer );
-    
+
     LeaveCriticalSection( &csTimer );
 }
 
@@ -127,11 +127,11 @@
     if (!timeout)
       {       /* timeout==0 is a legal argument  UB 990821*/
        WARN("Timeout== 0 not implemented, using timeout=1\n");
-        timeout=1; 
+        timeout=1;
       }
 
     EnterCriticalSection( &csTimer );
-    
+
       /* Check if there's already a timer with the same hwnd and id */
 
     for (i = 0, pTimer = TimersArray; i < NB_TIMERS; i++, pTimer++)
@@ -145,7 +145,7 @@
     if ( i == NB_TIMERS )
     {
           /* Find a free timer */
-    
+
         for (i = 0, pTimer = TimersArray; i < NB_TIMERS; i++, pTimer++)
             if (!pTimer->timeout) break;
 
@@ -158,7 +158,7 @@
     }
 
     if (!hwnd) id = i + 1;
-    
+
     if (proc) WINPROC_SetProc( &winproc, proc, type, WIN_PROC_TIMER );
 
     SERVER_START_REQ( set_win_timer )
@@ -181,12 +181,12 @@
     pTimer->timeout = timeout;
     pTimer->proc    = winproc;
 
-    TRACE("Timer added: %p, %04x, %04x, %04x, %08lx\n", 
+    TRACE("Timer added: %p, %04x, %04x, %04x, %08lx\n",
 		   pTimer, pTimer->hwnd, pTimer->msg, pTimer->id,
                    (DWORD)pTimer->proc );
 
     LeaveCriticalSection( &csTimer );
-    
+
     if (!id) return TRUE;
     else return id;
 }
@@ -199,7 +199,7 @@
 {
     int i;
     TIMER * pTimer;
-    
+
     SERVER_START_REQ( kill_win_timer )
     {
         req->win = hwnd;
@@ -210,9 +210,9 @@
     SERVER_END_REQ;
 
     EnterCriticalSection( &csTimer );
-    
+
     /* Find the timer */
-    
+
     for (i = 0, pTimer = TimersArray; i < NB_TIMERS; i++, pTimer++)
 	if ((pTimer->hwnd == hwnd) && (pTimer->id == id) &&
 	    (pTimer->timeout != 0)) break;
@@ -229,9 +229,9 @@
     /* Delete the timer */
 
     TIMER_ClearTimer( pTimer );
-    
+
     LeaveCriticalSection( &csTimer );
-    
+
     return TRUE;
 }
 
@@ -292,7 +292,7 @@
 UINT16 WINAPI SetSystemTimer16( HWND16 hwnd, UINT16 id, UINT16 timeout,
                                 TIMERPROC16 proc )
 {
-    TRACE("%04x %d %d %08lx\n", 
+    TRACE("%04x %d %d %08lx\n",
                    hwnd, id, timeout, (LONG)proc );
     return TIMER_SetTimer( WIN_Handle32(hwnd), id, timeout, (WNDPROC16)proc,
                            WIN_PROC_16, TRUE );
@@ -305,7 +305,7 @@
 UINT WINAPI SetSystemTimer( HWND hwnd, UINT id, UINT timeout,
                                 TIMERPROC proc )
 {
-    TRACE("%04x %d %d %08lx\n", 
+    TRACE("%04x %d %d %08lx\n",
                    hwnd, id, timeout, (LONG)proc );
     return TIMER_SetTimer( hwnd, id, timeout, (WNDPROC16)proc, WIN_PROC_32A, TRUE );
 }
diff --git a/windows/user.c b/windows/user.c
index 1abf7d9..d7864c2 100644
--- a/windows/user.c
+++ b/windows/user.c
@@ -2,7 +2,7 @@
  * Misc. USER functions
  *
  * Copyright 1993 Robert J. Amstadt
- *	     1996 Alex Korobka 
+ *	     1996 Alex Korobka
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -166,7 +166,7 @@
  *		SignalProc32 (USER.391)
  *		UserSignalProc (USER32.@)
  *
- * For comments about the meaning of uCode and dwFlags 
+ * For comments about the meaning of uCode and dwFlags
  * see PROCESS_CallUserSignalProc.
  *
  */
@@ -278,7 +278,7 @@
   MESSAGE("\tflags=");_dump_CDS_flags(flags);MESSAGE("\n");
   if (devmode==NULL)
     FIXME_(system)("   devmode=NULL (return to default mode)\n");
-  else if ( (devmode->dmBitsPerPel != GetSystemMetrics(SM_WINE_BPP)) 
+  else if ( (devmode->dmBitsPerPel != GetSystemMetrics(SM_WINE_BPP))
 	    || (devmode->dmPelsHeight != GetSystemMetrics(SM_CYSCREEN))
 	    || (devmode->dmPelsWidth != GetSystemMetrics(SM_CXSCREEN)) )
 
@@ -290,9 +290,9 @@
       FIXME_(system)("   width=%ld\n",devmode->dmPelsWidth);
     if (devmode->dmFields & DM_PELSHEIGHT)
       FIXME_(system)("   height=%ld\n",devmode->dmPelsHeight);
-    FIXME_(system)(" (Putting X in this mode beforehand might help)\n"); 
+    FIXME_(system)(" (Putting X in this mode beforehand might help)\n");
     /* we don't, but the program ... does not need to know */
-    return DISP_CHANGE_SUCCESSFUL; 
+    return DISP_CHANGE_SUCCESSFUL;
   }
   return DISP_CHANGE_SUCCESSFUL;
 }
@@ -309,7 +309,7 @@
 /***********************************************************************
  *		ChangeDisplaySettingsExA (USER32.@)
  */
-LONG WINAPI ChangeDisplaySettingsExA( 
+LONG WINAPI ChangeDisplaySettingsExA(
 	LPCSTR devname, LPDEVMODEA devmode, HWND hwnd, DWORD flags,
 	LPARAM lparam
 ) {
@@ -329,9 +329,9 @@
       FIXME_(system)("   width=%ld\n",devmode->dmPelsWidth);
     if (devmode->dmFields & DM_PELSHEIGHT)
       FIXME_(system)("   height=%ld\n",devmode->dmPelsHeight);
-    FIXME_(system)(" (Putting X in this mode beforehand might help)\n"); 
+    FIXME_(system)(" (Putting X in this mode beforehand might help)\n");
     /* we don't, but the program ... does not need to know */
-    return DISP_CHANGE_SUCCESSFUL; 
+    return DISP_CHANGE_SUCCESSFUL;
   }
   return DISP_CHANGE_SUCCESSFUL;
 }
@@ -415,7 +415,7 @@
  *		EnumDisplaySettingsExA (USER32.@)
  */
 BOOL WINAPI EnumDisplaySettingsExA(LPCSTR lpszDeviceName, DWORD iModeNum,
-				   LPDEVMODEA lpDevMode, DWORD dwFlags) 
+				   LPDEVMODEA lpDevMode, DWORD dwFlags)
 {
         TRACE_(system)("(%s,%lu,%p,%08lx): stub\n",
 		       debugstr_a(lpszDeviceName), iModeNum, lpDevMode, dwFlags);
@@ -427,7 +427,7 @@
  *		EnumDisplaySettingsExW (USER32.@)
  */
 BOOL WINAPI EnumDisplaySettingsExW(LPCWSTR lpszDeviceName, DWORD iModeNum,
-				   LPDEVMODEW lpDevMode, DWORD dwFlags) 
+				   LPDEVMODEW lpDevMode, DWORD dwFlags)
 {
 	TRACE_(system)("(%s,%lu,%p,%08lx): stub\n",
 			debugstr_w(lpszDeviceName), iModeNum, lpDevMode, dwFlags);
@@ -500,7 +500,7 @@
     case USUD_LOCALHEAP:
         return USER_HeapSel;
     case USUD_FIRSTCLASS:
-        FIXME_(local)("return a pointer to the first window class.\n"); 
+        FIXME_(local)("return a pointer to the first window class.\n");
         return (DWORD)-1;
     default:
         WARN_(local)("wReqType %04x (unknown)", wReqType);
diff --git a/windows/win.c b/windows/win.c
index 6f21aba..f88d1e1 100644
--- a/windows/win.c
+++ b/windows/win.c
@@ -872,7 +872,7 @@
     else
     {
 	/* neither x nor cx are default. Check the y values .
-	 * In the trace we see Outlook and Outlook Express using 
+	 * In the trace we see Outlook and Outlook Express using
 	 * cy set to CW_USEDEFAULT when opening the address book.
 	 */
 	if (cs->cy == CW_USEDEFAULT || cs->cy == CW_USEDEFAULT16) {
@@ -1912,15 +1912,15 @@
             * code using illegal offset value. Hopefully this is
             * what those programs really expect.
             */
-           if (type == WIN_PROC_16 && 
+           if (type == WIN_PROC_16 &&
                wndPtr->cbWndExtra >= 4 &&
                offset == wndPtr->cbWndExtra - sizeof(WORD))
            {
                INT offset2 = wndPtr->cbWndExtra - sizeof(LONG);
-             
+
                ERR( "- replaced invalid offset %d with %d\n",
                     offset, offset2 );
-           
+
                 retvalue = *(LONG *)(((char *)wndPtr->wExtra) + offset2);
                 WIN_ReleasePtr( wndPtr );
                 return retvalue;
diff --git a/windows/winhelp.c b/windows/winhelp.c
index 49c6bbc..e6123dd 100644
--- a/windows/winhelp.c
+++ b/windows/winhelp.c
@@ -83,7 +83,7 @@
 	int size,dsize,nlen;
 
 
-	if(!WM_WINHELP) 
+	if(!WM_WINHELP)
 	  {
 	    WM_WINHELP=RegisterWindowMessageA("WM_WINHELP");
 	    if(!WM_WINHELP)
diff --git a/windows/winpos.c b/windows/winpos.c
index 228a95f..98b8bd3 100644
--- a/windows/winpos.c
+++ b/windows/winpos.c
@@ -122,7 +122,7 @@
 
     if( lpPos )
     {
-	if( IsWindow(lpPos->hwndIconTitle) ) 
+	if( IsWindow(lpPos->hwndIconTitle) )
 	    DestroyWindow( lpPos->hwndIconTitle );
 	HeapFree( GetProcessHeap(), 0, lpPos );
     }
@@ -823,10 +823,10 @@
  */
 BOOL WINAPI MoveWindow( HWND hwnd, INT x, INT y, INT cx, INT cy,
                             BOOL repaint )
-{    
+{
     int flags = SWP_NOZORDER | SWP_NOACTIVATE;
     if (!repaint) flags |= SWP_NOREDRAW;
-    TRACE("%04x %d,%d %dx%d %d\n", 
+    TRACE("%04x %d,%d %dx%d %d\n",
 	    hwnd, x, y, cx, cy, repaint );
     return SetWindowPos( hwnd, 0, x, y, cx, cy, flags );
 }
@@ -840,7 +840,7 @@
                                                       atomInternalPos );
     if( !lpPos )
     {
-	/* this happens when the window is minimized/maximized 
+	/* this happens when the window is minimized/maximized
 	 * for the first time (rectWindow is not adjusted yet) */
 
 	lpPos = HeapAlloc( GetProcessHeap(), 0, sizeof(INTERNALPOS) );
@@ -852,11 +852,11 @@
 	*(UINT*)&lpPos->ptIconPos = *(UINT*)&lpPos->ptMaxPos = 0xFFFFFFFF;
     }
 
-    if( wnd->dwStyle & WS_MINIMIZE ) 
+    if( wnd->dwStyle & WS_MINIMIZE )
 	CONV_POINT32TO16( &pt, &lpPos->ptIconPos );
-    else if( wnd->dwStyle & WS_MAXIMIZE ) 
+    else if( wnd->dwStyle & WS_MAXIMIZE )
 	CONV_POINT32TO16( &pt, &lpPos->ptMaxPos );
-    else if( restoreRect ) 
+    else if( restoreRect )
 	CONV_RECT32TO16( restoreRect, &lpPos->rectNormal );
 
     return lpPos;
@@ -1016,7 +1016,7 @@
                                       LPPOINT16 ptIcon )
 {
     WINDOWPLACEMENT16 wndpl;
-    if (GetWindowPlacement16( hwnd, &wndpl )) 
+    if (GetWindowPlacement16( hwnd, &wndpl ))
     {
 	if (rectWnd) *rectWnd = wndpl.rcNormalPosition;
 	if (ptIcon)  *ptIcon = wndpl.ptMinPosition;
@@ -1095,7 +1095,7 @@
 	    if( wndpl->flags & WPF_SETMINPOSITION && !EMPTYPOINT(lpPos->ptIconPos))
 		SetWindowPos( hwnd, 0, lpPos->ptIconPos.x, lpPos->ptIconPos.y,
 				0, 0, SWP_NOSIZE | SWP_NOZORDER | SWP_NOACTIVATE );
-	} 
+	}
 	else if( pWnd->dwStyle & WS_MAXIMIZE )
 	{
 	    if( !EMPTYPOINT(lpPos->ptMaxPos) )
@@ -1288,7 +1288,7 @@
     /* if prev wnd is minimized redraw icon title */
     if( IsIconic( hwndPrevActive ) ) WINPOS_RedrawIconTitle(hwndPrevActive);
 
-    /* managed windows will get ConfigureNotify event */  
+    /* managed windows will get ConfigureNotify event */
     if (wndPtr && !(wndPtr->dwStyle & WS_CHILD) && !(wndPtr->dwExStyle & WS_EX_MANAGED))
     {
 	/* check Z-order and bring hWnd to the top */
@@ -1297,9 +1297,9 @@
             tmp = GetWindow( tmp, GW_HWNDNEXT );
 
         if( tmp != hWnd )
-	    SetWindowPos(hWnd, HWND_TOP, 0,0,0,0, 
+	    SetWindowPos(hWnd, HWND_TOP, 0,0,0,0,
 			   SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE );
-        if (!IsWindow(hWnd))  
+        if (!IsWindow(hWnd))
 	    goto CLEANUP;
     }
 
@@ -1336,7 +1336,7 @@
             }
             HeapFree( GetProcessHeap(), 0, list );
         }
-        
+
 	if (hWnd && !IsWindow(hWnd)) goto CLEANUP;
     }
 
@@ -1367,13 +1367,13 @@
             HWND hOldFocus = PERQDATA_GetFocusWnd( pNewActiveQueue->pQData );
 
             if ( !hOldFocus || GetAncestor( hOldFocus, GA_ROOT ) != hwndActive )
-                FOCUS_SwitchFocus( pNewActiveQueue, hOldFocus, 
+                FOCUS_SwitchFocus( pNewActiveQueue, hOldFocus,
                                    (wndPtr && (wndPtr->dwStyle & WS_MINIMIZE))?
                                    0 : hwndActive );
         }
 
-        if ( pOldActiveQueue && 
-             ( !pNewActiveQueue || 
+        if ( pOldActiveQueue &&
+             ( !pNewActiveQueue ||
                 pNewActiveQueue->pQData != pOldActiveQueue->pQData ) )
         {
             HWND hOldFocus = PERQDATA_GetFocusWnd( pOldActiveQueue->pQData );
@@ -1391,7 +1391,7 @@
     if( IsIconic(hwndActive) ) WINPOS_RedrawIconTitle(hwndActive);
 
     bRet = (hWnd == hwndActive);  /* Success? */
-    
+
 CLEANUP: /* Unlock the message queues before returning */
 
     if ( pNewActiveQueue )
@@ -1544,7 +1544,7 @@
     HDWP handle;
     DWP *pDWP;
 
-    if (count < 0) 
+    if (count < 0)
     {
         SetLastError(ERROR_INVALID_PARAMETER);
         return 0;
@@ -1700,7 +1700,7 @@
  *                |   |   |-> tooltips_class32
  *                |   |
  *                |   |-> SysHeader32
- *                |   
+ *                |
  *                |-> ProxyTarget
  */
 HWND WINAPI SetShellWindowEx ( HWND hwndProgman, HWND hwndListView )
@@ -1714,7 +1714,7 @@
 /***********************************************************************
  *		SetTaskmanWindow (USER32.@)
  * NOTES
- *   hwnd = MSTaskSwWClass 
+ *   hwnd = MSTaskSwWClass
  *          |-> SysTabControl32
  */
 HWND WINAPI SetTaskmanWindow ( HWND hwnd )
diff --git a/windows/winproc.c b/windows/winproc.c
index 48dea55..36ec375 100644
--- a/windows/winproc.c
+++ b/windows/winproc.c
@@ -424,10 +424,10 @@
  *
  * 3) timer  -> wp                   	-	SetTimer()
  *
- * Initially, winproc of the window points to the current winproc 
- * thunk of its class. Subclassing prepends a new thunk to the 
- * window winproc chain at the head of the list. Thus, window thunk 
- * list includes class thunks and the latter are preserved when the 
+ * Initially, winproc of the window points to the current winproc
+ * thunk of its class. Subclassing prepends a new thunk to the
+ * window winproc chain at the head of the list. Thus, window thunk
+ * list includes class thunks and the latter are preserved when the
  * window is destroyed.
  *
  */
@@ -476,7 +476,7 @@
                 break;
             }
         }
-            
+
         /* WPF_CLASS thunk terminates window thunk list */
         if ((*ppPrev)->user != user) break;
         ppPrev = &(*ppPrev)->next;
@@ -568,7 +568,7 @@
  *
  * FIXME:
  *  WM_GETTEXT/WM_SETTEXT and static control with SS_ICON style:
- *  the first four bytes are the handle of the icon 
+ *  the first four bytes are the handle of the icon
  *  when the WM_SETTEXT message has been used to set the icon
  */
 INT WINPROC_MapMsg32ATo32W( HWND hwnd, UINT msg, WPARAM *pwparam, LPARAM *plparam )
@@ -603,7 +603,7 @@
     case WM_NCCREATE:
     case WM_CREATE:
         {
-	    struct s 
+	    struct s
 	    { CREATESTRUCTW cs;		/* new structure */
 	      LPCWSTR lpszName;		/* allocated Name */
 	      LPCWSTR lpszClass;	/* allocated Class */
@@ -743,7 +743,7 @@
     case WM_NCCREATE:
     case WM_CREATE:
         {
-	    struct s 
+	    struct s
 	    { CREATESTRUCTW cs;		/* new structure */
 	      LPWSTR lpszName;		/* allocated Name */
 	      LPWSTR lpszClass;		/* allocated Class */
@@ -1360,7 +1360,7 @@
     case WM_SIZECLIPBOARD:
         FIXME_(msg)("message %04x needs translation\n",msg16 );
         return -1;
-    case WM_DDE_INITIATE: 
+    case WM_DDE_INITIATE:
     case WM_DDE_TERMINATE:
     case WM_DDE_UNADVISE:
     case WM_DDE_REQUEST:
@@ -1398,7 +1398,7 @@
 	    switch (flag)
 	    {
 	    case 0:
-		if (hi) 
+		if (hi)
 		{
 		    MESSAGE("DDE_ACK: neither atom nor handle!!!\n");
 		    hi = 0;
@@ -2144,7 +2144,7 @@
     case WM_STYLECHANGING:
     case WM_STYLECHANGED:
         return -1;
-    case WM_DDE_INITIATE: 
+    case WM_DDE_INITIATE:
     case WM_DDE_TERMINATE:
     case WM_DDE_UNADVISE:
     case WM_DDE_REQUEST:
@@ -2179,7 +2179,7 @@
 	    switch (flag)
 	    {
 	    case 0:
-		if (hi) 
+		if (hi)
 		{
 		    MESSAGE("DDE_ACK: neither atom nor handle!!!\n");
 		    hi = 0;
@@ -2212,7 +2212,7 @@
  * Unmap a message that was mapped from 32-bit Ansi to 16-bit.
  */
 void WINPROC_UnmapMsg32ATo16( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam,
-                              MSGPARAM16* p16 ) 
+                              MSGPARAM16* p16 )
 {
     switch(msg)
     {
@@ -2723,7 +2723,7 @@
     func = WINPROC_GetProc( (HWINDOWPROC)proc, WIN_PROC_16 );
     return WINPROC_CallWndProc16( func, hwnd, msg, wParam, lParam );
 #endif
-    
+
     switch(proc->type)
     {
     case WIN_PROC_16:
@@ -2765,9 +2765,9 @@
  *
  * CONFORMANCE
  *
- *   ECMA-234, Win32 
+ *   ECMA-234, Win32
  */
-LRESULT WINAPI CallWindowProcA( 
+LRESULT WINAPI CallWindowProcA(
     WNDPROC func,  /* [in] window procedure */
     HWND hwnd,     /* [in] target window */
     UINT msg,      /* [in] message */