Index: trunk/src/winmm/driver.c
===================================================================
--- trunk/src/winmm/driver.c	(revision 6638)
+++ trunk/src/winmm/driver.c	(revision 6639)
@@ -1,5 +1,6 @@
 /* -*- tab-width: 8; c-basic-offset: 4 -*- */
 
-/*
+/* $Id: driver.c,v 1.2 2001-09-05 10:30:21 bird Exp $
+ *
  * WINE Drivers functions
  *
@@ -32,27 +33,27 @@
 DEFAULT_DEBUG_CHANNEL(driver);
 
-static LPWINE_DRIVER	lpDrvItemList = NULL;
+static LPWINE_DRIVER    lpDrvItemList = NULL;
 
 /* TODO list :
- *	- LoadModule count and clean up is not handled correctly (it's not a 
- *	  problem as long as FreeLibrary is not working correctly)
- */
-
-/**************************************************************************
- *			DRIVER_GetNumberOfModuleRefs		[internal]
+ *  - LoadModule count and clean up is not handled correctly (it's not a
+ *    problem as long as FreeLibrary is not working correctly)
+ */
+
+/**************************************************************************
+ *          DRIVER_GetNumberOfModuleRefs        [internal]
  *
  * Returns the number of open drivers which share the same module.
  */
-static	WORD	DRIVER_GetNumberOfModuleRefs(LPWINE_DRIVER lpNewDrv)
-{
-    LPWINE_DRIVER	lpDrv;
-    WORD		count = 0;
+static  WORD    DRIVER_GetNumberOfModuleRefs(LPWINE_DRIVER lpNewDrv)
+{
+    LPWINE_DRIVER   lpDrv;
+    WORD        count = 0;
 
     if (lpNewDrv->dwFlags & WINE_GDF_16BIT) ERR("OOOch");
     for (lpDrv = lpDrvItemList; lpDrv; lpDrv = lpDrv->lpNextItem) {
-	if (!(lpDrv->dwFlags & WINE_GDF_16BIT) &&
-	    lpDrv->d.d32.hModule == lpNewDrv->d.d32.hModule) {
-	    count++;
-	}
+    if (!(lpDrv->dwFlags & WINE_GDF_16BIT) &&
+        lpDrv->d.d32.hModule == lpNewDrv->d.d32.hModule) {
+        count++;
+    }
     }
     return count;
@@ -60,14 +61,14 @@
 
 /**************************************************************************
- *				DRIVER_FindFromHDrvr		[internal]
- * 
+ *              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;
+LPWINE_DRIVER   DRIVER_FindFromHDrvr(HDRVR hDrvr)
+{
+    LPWINE_DRIVER   d = (LPWINE_DRIVER)hDrvr;
 
     if (hDrvr && HeapValidate(GetProcessHeap(), 0, d) && d->dwMagic == WINE_DI_MAGIC) {
-	return d;
+    return d;
     }
     return NULL;
@@ -76,5 +77,5 @@
 #ifndef __WIN32OS2__
 /**************************************************************************
- *				DRIVER_MapMsg32To16		[internal]
+ *              DRIVER_MapMsg32To16     [internal]
  *
  * Map a 32 bit driver message to a 16 bit driver message.
@@ -86,6 +87,6 @@
 static int DRIVER_MapMsg32To16(WORD wMsg, DWORD* lParam1, DWORD* lParam2)
 {
-    int	ret = -1;
-    
+    int ret = -1;
+
     switch (wMsg) {
     case DRV_LOAD:
@@ -96,56 +97,56 @@
     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 thru */
-	/* lParam1 and lParam2 are not used */
-	ret = 0;
-	break;
-	break;
+    case DRV_CLOSE: /* should be 0/0 */
+    case DRV_OPEN:  /* pass thru */
+    /* lParam1 and lParam2 are not used */
+    ret = 0;
+    break;
+    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 
-	 */
-	if (*lParam2) {
-            LPDRVCONFIGINFO16	dci16 = (LPDRVCONFIGINFO16)SEGPTR_ALLOC(sizeof(DRVCONFIGINFO16));
-            LPDRVCONFIGINFO	dci32 = (LPDRVCONFIGINFO)(*lParam2);
-	    
-	    if (dci16) {
-		LPSTR	str1, str2;
-		
-		dci16->dwDCISize = sizeof(DRVCONFIGINFO16);
-		
-		if ((str1 = HEAP_strdupWtoA(GetProcessHeap(), 0, dci32->lpszDCISectionName)) != NULL &&
-		    (str2 = SEGPTR_STRDUP(str1)) != NULL) {
-		    dci16->lpszDCISectionName = SEGPTR_GET(str2);
-		    if (!HeapFree(GetProcessHeap(), 0, str1))
-			FIXME("bad free line=%d\n", __LINE__);
-		} else {
-		    return -2;
-		}
-		if ((str1 = HEAP_strdupWtoA(GetProcessHeap(), 0, dci32->lpszDCIAliasName)) != NULL &&
-		    (str2 = SEGPTR_STRDUP(str1)) != NULL) {
-		    dci16->lpszDCIAliasName = SEGPTR_GET(str2);
-		    if (!HeapFree(GetProcessHeap(), 0, str1))
-			FIXME("bad free line=%d\n", __LINE__);
-		} else {
-		    return -2;
-		}
-	    } else {
-		return -2;
-	    }
-	    *lParam2 = (LPARAM)SEGPTR_GET(dci16);
-	    ret = 1;
-	} else {
-	    ret = 0;
-	}
-	break;
+    /* 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 = (LPDRVCONFIGINFO16)SEGPTR_ALLOC(sizeof(DRVCONFIGINFO16));
+            LPDRVCONFIGINFO dci32 = (LPDRVCONFIGINFO)(*lParam2);
+
+        if (dci16) {
+        LPSTR   str1, str2;
+
+        dci16->dwDCISize = sizeof(DRVCONFIGINFO16);
+
+        if ((str1 = HEAP_strdupWtoA(GetProcessHeap(), 0, dci32->lpszDCISectionName)) != NULL &&
+            (str2 = SEGPTR_STRDUP(str1)) != NULL) {
+            dci16->lpszDCISectionName = SEGPTR_GET(str2);
+            if (!HeapFree(GetProcessHeap(), 0, str1))
+            FIXME("bad free line=%d\n", __LINE__);
+        } else {
+            return -2;
+        }
+        if ((str1 = HEAP_strdupWtoA(GetProcessHeap(), 0, dci32->lpszDCIAliasName)) != NULL &&
+            (str2 = SEGPTR_STRDUP(str1)) != NULL) {
+            dci16->lpszDCIAliasName = SEGPTR_GET(str2);
+            if (!HeapFree(GetProcessHeap(), 0, str1))
+            FIXME("bad free line=%d\n", __LINE__);
+        } else {
+            return -2;
+        }
+        } else {
+        return -2;
+        }
+        *lParam2 = (LPARAM)SEGPTR_GET(dci16);
+        ret = 1;
+    } else {
+        ret = 0;
+    }
+    break;
     default:
-	if (!((wMsg >= 0x800 && wMsg < 0x900) || (wMsg >= 0x4000 && wMsg < 0x4100))) {
-	   FIXME("Unknown message 0x%04x\n", wMsg);
-	}
-	ret = 0;
+    if (!((wMsg >= 0x800 && wMsg < 0x900) || (wMsg >= 0x4000 && wMsg < 0x4100))) {
+       FIXME("Unknown message 0x%04x\n", wMsg);
+    }
+    ret = 0;
     }
     return ret;
@@ -153,5 +154,5 @@
 
 /**************************************************************************
- *				DRIVER_UnMapMsg32To16		[internal]
+ *              DRIVER_UnMapMsg32To16       [internal]
  *
  * UnMap a 32 bit driver message to a 16 bit driver message.
@@ -162,6 +163,6 @@
 static int DRIVER_UnMapMsg32To16(WORD wMsg, DWORD lParam1, DWORD lParam2)
 {
-    int	ret = -1;
-    
+    int ret = -1;
+
     switch (wMsg) {
     case DRV_LOAD:
@@ -176,26 +177,26 @@
     case DRV_OPEN:
     case DRV_CLOSE:
-	/* lParam1 and lParam2 are not used */
-	break;
-    case DRV_CONFIGURE: 
+    /* lParam1 and lParam2 are not used */
+    break;
+    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) {
-	    LPDRVCONFIGINFO16	dci16 = MapSL(lParam2);
-	    
-	    if (!SEGPTR_FREE(MapSL(dci16->lpszDCISectionName)))
-		FIXME("bad free line=%d\n", __LINE__);
-	    if (!SEGPTR_FREE(MapSL(dci16->lpszDCIAliasName)))
-		FIXME("bad free line=%d\n", __LINE__);
-	    if (!SEGPTR_FREE(dci16))
-		FIXME("bad free line=%d\n", __LINE__);
-	}
-	ret = 0;
-	break;
+    /* lParam1 is a handle to a window (or not used), lParam2 is a pointer to DRVCONFIGINFO, lParam2 */
+    if (lParam2) {
+        LPDRVCONFIGINFO16   dci16 = MapSL(lParam2);
+
+        if (!SEGPTR_FREE(MapSL(dci16->lpszDCISectionName)))
+        FIXME("bad free line=%d\n", __LINE__);
+        if (!SEGPTR_FREE(MapSL(dci16->lpszDCIAliasName)))
+        FIXME("bad free line=%d\n", __LINE__);
+        if (!SEGPTR_FREE(dci16))
+        FIXME("bad free line=%d\n", __LINE__);
+    }
+    ret = 0;
+    break;
     default:
-	if (!((wMsg >= 0x800 && wMsg < 0x900) || (wMsg >= 0x4000 && wMsg < 0x4100))) {
-	    FIXME("Unknown message 0x%04x\n", wMsg);
-	}
-	ret = 0;
+    if (!((wMsg >= 0x800 && wMsg < 0x900) || (wMsg >= 0x4000 && wMsg < 0x4100))) {
+        FIXME("Unknown message 0x%04x\n", wMsg);
+    }
+    ret = 0;
     }
     return ret;
@@ -204,73 +205,73 @@
 
 /**************************************************************************
- *				DRIVER_SendMessage		[internal]
- */
-static LRESULT inline DRIVER_SendMessage(LPWINE_DRIVER lpDrv, UINT msg, 
-					LPARAM lParam1, LPARAM lParam2)
+ *              DRIVER_SendMessage      [internal]
+ */
+static LRESULT inline DRIVER_SendMessage(LPWINE_DRIVER lpDrv, UINT msg,
+                    LPARAM lParam1, LPARAM lParam2)
 {
 #ifndef __WIN32OS2__
     if (lpDrv->dwFlags & WINE_GDF_16BIT) {
-	LRESULT		ret;
-	int		map = 0;
-	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) {
-	    ret = SendDriverMessage16(lpDrv->d.d16.hDriver16, msg, lParam1, lParam2);
-	    if (map == 1)
-		DRIVER_UnMapMsg32To16(msg, lParam1, lParam2);
-	} else {
-	    ret = 0;
-	}
-	return ret;
+    LRESULT     ret;
+    int     map = 0;
+    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) {
+        ret = SendDriverMessage16(lpDrv->d.d16.hDriver16, msg, lParam1, lParam2);
+        if (map == 1)
+        DRIVER_UnMapMsg32To16(msg, lParam1, lParam2);
+    } else {
+        ret = 0;
+    }
+    return ret;
     }
 #endif
-    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);
+    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);
 }
 
 /**************************************************************************
- *				SendDriverMessage		[WINMM.19]
+ *              SendDriverMessage       [WINMM.19]
  */
 LRESULT WINAPI SendDriverMessage(HDRVR hDriver, UINT msg, LPARAM lParam1,
-				 LPARAM lParam2)
-{
-    LPWINE_DRIVER	lpDrv;
-    LRESULT 		retval = 0;
-    
+                 LPARAM lParam2)
+{
+    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);
+    retval = DRIVER_SendMessage(lpDrv, msg, lParam1, lParam2);
     } else {
-	WARN("Bad driver handle %u\n", hDriver);
+    WARN("Bad driver handle %u\n", hDriver);
     }
     TRACE("retval = %ld\n", retval);
-    
+
     return retval;
 }
 
 /**************************************************************************
- *				DRIVER_RemoveFromList		[internal]
+ *              DRIVER_RemoveFromList       [internal]
  *
  * Generates all the logic to handle driver closure / deletion
  * Removes a driver struct to the list of open drivers.
  */
-static	BOOL	DRIVER_RemoveFromList(LPWINE_DRIVER lpDrv)
+static  BOOL    DRIVER_RemoveFromList(LPWINE_DRIVER lpDrv)
 {
     if (!(lpDrv->dwFlags & WINE_GDF_16BIT)) {
-	if (DRIVER_GetNumberOfModuleRefs(lpDrv) == 1) {
-	    DRIVER_SendMessage(lpDrv, DRV_DISABLE, 0L, 0L);
-	    DRIVER_SendMessage(lpDrv, DRV_FREE,    0L, 0L);
-	}
-    }
-    
+    if (DRIVER_GetNumberOfModuleRefs(lpDrv) == 1) {
+        DRIVER_SendMessage(lpDrv, DRV_DISABLE, 0L, 0L);
+        DRIVER_SendMessage(lpDrv, DRV_FREE,    0L, 0L);
+    }
+    }
+
     if (lpDrv->lpPrevItem)
-	lpDrv->lpPrevItem->lpNextItem = lpDrv->lpNextItem;
+    lpDrv->lpPrevItem->lpNextItem = lpDrv->lpNextItem;
     else
-	lpDrvItemList = lpDrv->lpNextItem;
+    lpDrvItemList = lpDrv->lpNextItem;
     if (lpDrv->lpNextItem)
-	lpDrv->lpNextItem->lpPrevItem = lpDrv->lpPrevItem;
+    lpDrv->lpNextItem->lpPrevItem = lpDrv->lpPrevItem;
 
     return TRUE;
@@ -278,46 +279,46 @@
 
 /**************************************************************************
- *				DRIVER_AddToList		[internal]
+ *              DRIVER_AddToList        [internal]
  *
  * Adds a driver struct to the list of open drivers.
  * Generates all the logic to handle driver creation / open.
  */
-static	BOOL	DRIVER_AddToList(LPWINE_DRIVER lpNewDrv, LPARAM lParam1, LPARAM lParam2)
+static  BOOL    DRIVER_AddToList(LPWINE_DRIVER lpNewDrv, LPARAM lParam1, LPARAM lParam2)
 {
     lpNewDrv->dwMagic = WINE_DI_MAGIC;
     /* First driver to be loaded for this module, need to load correctly the module */
     if (!(lpNewDrv->dwFlags & WINE_GDF_16BIT)) {
-	if (DRIVER_GetNumberOfModuleRefs(lpNewDrv) == 0) {
-	    if (DRIVER_SendMessage(lpNewDrv, DRV_LOAD, 0L, 0L) != DRV_SUCCESS) {
-		TRACE("DRV_LOAD failed on driver 0x%08lx\n", (DWORD)lpNewDrv);
-		return FALSE;
-	    }
-	    /* returned value is not checked */
-	    DRIVER_SendMessage(lpNewDrv, DRV_ENABLE, 0L, 0L);
-	}
+    if (DRIVER_GetNumberOfModuleRefs(lpNewDrv) == 0) {
+        if (DRIVER_SendMessage(lpNewDrv, DRV_LOAD, 0L, 0L) != DRV_SUCCESS) {
+        TRACE("DRV_LOAD failed on driver 0x%08lx\n", (DWORD)lpNewDrv);
+        return FALSE;
+        }
+        /* returned value is not checked */
+        DRIVER_SendMessage(lpNewDrv, DRV_ENABLE, 0L, 0L);
+    }
     }
 
     lpNewDrv->lpNextItem = NULL;
     if (lpDrvItemList == NULL) {
-	lpDrvItemList = lpNewDrv;
-	lpNewDrv->lpPrevItem = NULL;
+    lpDrvItemList = lpNewDrv;
+    lpNewDrv->lpPrevItem = NULL;
     } else {
-	LPWINE_DRIVER	lpDrv = lpDrvItemList;	/* find end of list */
-	while (lpDrv->lpNextItem != NULL)
-	    lpDrv = lpDrv->lpNextItem;
-	
-	lpDrv->lpNextItem = lpNewDrv;
-	lpNewDrv->lpPrevItem = lpDrv;
+    LPWINE_DRIVER   lpDrv = lpDrvItemList;  /* find end of list */
+    while (lpDrv->lpNextItem != NULL)
+        lpDrv = lpDrv->lpNextItem;
+
+    lpDrv->lpNextItem = lpNewDrv;
+    lpNewDrv->lpPrevItem = lpDrv;
     }
 
     if (!(lpNewDrv->dwFlags & WINE_GDF_16BIT)) {
-	/* Now just open a new instance of a driver on this module */
-	lpNewDrv->d.d32.dwDriverID = DRIVER_SendMessage(lpNewDrv, DRV_OPEN, lParam1, lParam2);
-
-	if (lpNewDrv->d.d32.dwDriverID == 0) {
-	    TRACE("DRV_OPEN failed on driver 0x%08lx\n", (DWORD)lpNewDrv);
-	    DRIVER_RemoveFromList(lpNewDrv);
-	    return FALSE;
-	}
+    /* Now just open a new instance of a driver on this module */
+    lpNewDrv->d.d32.dwDriverID = DRIVER_SendMessage(lpNewDrv, DRV_OPEN, lParam1, lParam2);
+
+    if (lpNewDrv->d.d32.dwDriverID == 0) {
+        TRACE("DRV_OPEN failed on driver 0x%08lx\n", (DWORD)lpNewDrv);
+        DRIVER_RemoveFromList(lpNewDrv);
+        return FALSE;
+    }
     }
     return TRUE;
@@ -325,8 +326,8 @@
 
 /**************************************************************************
- *				DRIVER_GetLibName		[internal]
- *
- */
-BOOL	DRIVER_GetLibName(LPCSTR keyName, LPCSTR sectName, LPSTR buf, int sz)
+ *              DRIVER_GetLibName       [internal]
+ *
+ */
+BOOL    DRIVER_GetLibName(LPCSTR keyName, LPCSTR sectName, LPSTR buf, int sz)
 {
     /* should also do some registry diving */
@@ -335,21 +336,21 @@
 
 /**************************************************************************
- *				DRIVER_TryOpenDriver32		[internal]
+ *              DRIVER_TryOpenDriver32      [internal]
  *
  * Tries to load a 32 bit driver whose DLL's (module) name is fn
  */
-LPWINE_DRIVER	DRIVER_TryOpenDriver32(LPCSTR fn, LPARAM lParam2)
-{
-    LPWINE_DRIVER 	lpDrv = NULL;
-    HMODULE		hModule = 0;
-    LPSTR		ptr;
-    LPCSTR		cause = 0;
+LPWINE_DRIVER   DRIVER_TryOpenDriver32(LPCSTR fn, LPARAM lParam2)
+{
+    LPWINE_DRIVER   lpDrv = NULL;
+    HMODULE     hModule = 0;
+    LPSTR       ptr;
+    LPCSTR      cause = 0;
 
     TRACE("('%s', %08lX);\n", fn, lParam2);
-    
+
     if ((ptr = strchr(fn, ' ')) != NULL) {
-	*ptr++ = '\0';
-	while (*ptr == ' ') ptr++;
-	if (*ptr == '\0') ptr = NULL;
+    *ptr++ = '\0';
+    while (*ptr == ' ') ptr++;
+    if (*ptr == '\0') ptr = NULL;
     }
 
@@ -378,5 +379,5 @@
 #ifdef __WIN32OS2__
 /**************************************************************************
- *				DRIVER_OpenDriverA		        [internal]
+ *              DRIVER_OpenDriverA              [internal]
  * (0,1,DRV_LOAD  ,0       ,0)
  * (0,1,DRV_ENABLE,0       ,0)
@@ -384,10 +385,10 @@
  *
  */
-static	LPWINE_DRIVER	DRIVER_TryOpenDriver16(LPCSTR lpDriverName, LPCSTR lpSectionName, LPARAM lParam)
+static  LPWINE_DRIVER   DRIVER_TryOpenDriver16(LPCSTR lpDriverName, LPCSTR lpSectionName, LPARAM lParam)
 {
   LPWINE_DRIVER lpDrv = NULL;
-  char 		drvName[128];
+  char      drvName[128];
   LPCSTR        cause = 0;
-  
+
   TRACE("Entering DRIVER_OpenDriverA: lpDriverName: %s lpSectionName: %s\n",lpDriverName,lpSectionName);
 
@@ -396,30 +397,30 @@
 
   if (lpSectionName == NULL) {
-	lstrcpynA(drvName, lpDriverName, sizeof(drvName));
-	lpDrv = DRIVER_TryOpenDriver32(lpDriverName, lParam);
-	if (!lpDrv) {
+    lstrcpynA(drvName, lpDriverName, sizeof(drvName));
+    lpDrv = DRIVER_TryOpenDriver32(lpDriverName, lParam);
+    if (!lpDrv) {
       if (GetPrivateProfileStringA("Drivers32", lpDriverName, "", drvName,
                                    sizeof(drvName), "SYSTEM.INI")) {
 
-		lpDrv = DRIVER_TryOpenDriver32(drvName, lParam);		
+        lpDrv = DRIVER_TryOpenDriver32(drvName, lParam);
       }
-	}
+    }
   } else {/* of if (lpSectionName == NULL) */
     //dprintf(("driver name %x '%s'\n",drvName,drvName));
-    drvName[0]=0;    
-
-	if (GetPrivateProfileStringA(lpSectionName, lpDriverName, "", drvName,
+    drvName[0]=0;
+
+    if (GetPrivateProfileStringA(lpSectionName, lpDriverName, "", drvName,
                                  sizeof(drvName)-1, "SYSTEM.INI")) {
 #if 0
       dprintf(("driver name %x '%s'\n",drvName,drvName));
-#endif      
+#endif
       lpDrv = DRIVER_TryOpenDriver32(drvName, lParam);
-	}/* GetPrivate... */
+    }/* GetPrivate... */
   }
   if (!lpDrv)
-	TRACE("OpenDriverA: Failed to open driver %s from section %s\n", lpDriverName, lpSectionName);
-
-  else 
-	TRACE("OpenDriverA success: Driver handle => %08x\n", lpDrv);
+    TRACE("OpenDriverA: Failed to open driver %s from section %s\n", lpDriverName, lpSectionName);
+
+  else
+    TRACE("OpenDriverA success: Driver handle => %08x\n", lpDrv);
 
   return lpDrv;
@@ -432,21 +433,21 @@
 #else
 /**************************************************************************
- *				DRIVER_TryOpenDriver16		[internal]
+ *              DRIVER_TryOpenDriver16      [internal]
  *
  * Tries to load a 16 bit driver whose DLL's (module) name is lpFileName.
  */
-static	LPWINE_DRIVER	DRIVER_TryOpenDriver16(LPCSTR fn, LPCSTR sn, LPARAM lParam2)
-{
-    LPWINE_DRIVER 	lpDrv = NULL;
-    LPCSTR		cause = 0;
+static  LPWINE_DRIVER   DRIVER_TryOpenDriver16(LPCSTR fn, LPCSTR sn, LPARAM lParam2)
+{
+    LPWINE_DRIVER   lpDrv = NULL;
+    LPCSTR      cause = 0;
 
     TRACE("('%s', %08lX);\n", sn, lParam2);
-    
+
     lpDrv = HeapAlloc(GetProcessHeap(), 0, sizeof(WINE_DRIVER));
     if (lpDrv == NULL) {cause = "OOM"; goto exit;}
 
     /* FIXME: shall we do some black magic here on sn ?
-     *	drivers32 => drivers
-     *	mci32 => mci
+     *  drivers32 => drivers
+     *  mci32 => mci
      * ...
      */
@@ -467,45 +468,45 @@
 
 /**************************************************************************
- *				OpenDriverA		        [WINMM.15]
+ *              OpenDriverA             [WINMM.15]
  * (0,1,DRV_LOAD  ,0       ,0)
  * (0,1,DRV_ENABLE,0       ,0)
  * (0,1,DRV_OPEN  ,buf[256],0)
  */
-HDRVR WINAPI OpenDriverA(LPCSTR lpDriverName, LPCSTR lpSectionName, LPARAM lParam2) 
-{
-    LPWINE_DRIVER	lpDrv = NULL;
-    char 		libName[128];
-    LPCSTR		lsn = lpSectionName;
+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));
-
-	if ((lpDrv = DRIVER_TryOpenDriver32(libName, lParam2)))
-	    goto the_end;
-	lsn = "Drivers32";
+    lstrcpynA(libName, lpDriverName, sizeof(libName));
+
+    if ((lpDrv = DRIVER_TryOpenDriver32(libName, lParam2)))
+        goto the_end;
+    lsn = "Drivers32";
     }
     if (DRIVER_GetLibName(lpDriverName, lsn, libName, sizeof(libName)) &&
-	(lpDrv = DRIVER_TryOpenDriver32(libName, lParam2)))
-	goto the_end;
+    (lpDrv = DRIVER_TryOpenDriver32(libName, lParam2)))
+    goto the_end;
 
     if (!(lpDrv = DRIVER_TryOpenDriver16(lpDriverName, lpSectionName, lParam2)))
-	TRACE("Failed to open driver %s from system.ini file, section %s\n", lpDriverName, lpSectionName);
+    TRACE("Failed to open driver %s from system.ini file, section %s\n", lpDriverName, lpSectionName);
 
  the_end:
-    if (lpDrv)	TRACE("=> %08lx\n", (DWORD)lpDrv);
+    if (lpDrv)  TRACE("=> %08lx\n", (DWORD)lpDrv);
     return (DWORD)lpDrv;
 }
 
 /**************************************************************************
- *				OpenDriverW		        [WINMM.15]
+ *              OpenDriverW             [WINMM.15]
  */
 HDRVR WINAPI OpenDriverW(LPCWSTR lpDriverName, LPCWSTR lpSectionName, LPARAM lParam)
 {
-    LPSTR 		dn = HEAP_strdupWtoA(GetProcessHeap(), 0, lpDriverName);
-    LPSTR 		sn = HEAP_strdupWtoA(GetProcessHeap(), 0, lpSectionName);
-    HDRVR		ret = OpenDriverA(dn, sn, lParam);
-    
+    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);
@@ -514,23 +515,23 @@
 
 /**************************************************************************
- *			CloseDriver				[WINMM.4]
+ *          CloseDriver             [WINMM.4]
  */
 LRESULT WINAPI CloseDriver(HDRVR hDrvr, LPARAM lParam1, LPARAM lParam2)
 {
-    LPWINE_DRIVER	lpDrv;
+    LPWINE_DRIVER   lpDrv;
 
     TRACE("(%04x, %08lX, %08lX);\n", hDrvr, lParam1, lParam2);
-    
+
     if ((lpDrv = DRIVER_FindFromHDrvr(hDrvr)) != NULL) {
 #ifndef __WIN32OS2__
-	if (lpDrv->dwFlags & WINE_GDF_16BIT)
-	    CloseDriver16(lpDrv->d.d16.hDriver16, lParam1, lParam2);
-	else
+    if (lpDrv->dwFlags & WINE_GDF_16BIT)
+        CloseDriver16(lpDrv->d.d16.hDriver16, lParam1, lParam2);
+    else
 #endif
-	    DRIVER_SendMessage(lpDrv, DRV_CLOSE, lParam1, lParam2);
-	if (DRIVER_RemoveFromList(lpDrv)) {
-	    HeapFree(GetProcessHeap(), 0, lpDrv);
-	    return TRUE;
-	}
+        DRIVER_SendMessage(lpDrv, DRV_CLOSE, lParam1, lParam2);
+    if (DRIVER_RemoveFromList(lpDrv)) {
+        HeapFree(GetProcessHeap(), 0, lpDrv);
+        return TRUE;
+    }
     }
     WARN("Failed to close driver\n");
@@ -539,25 +540,25 @@
 
 /**************************************************************************
- *				GetDriverFlags		[WINMM.13]
+ *              GetDriverFlags      [WINMM.13]
  * [in] hDrvr handle to the driver
  *
  * Returns:
- *	0x00000000 if hDrvr is an invalid handle
- *	0x80000000 if hDrvr is a valid 32 bit driver
- *	0x90000000 if hDrvr is a valid 16 bit driver
+ *  0x00000000 if hDrvr is an invalid handle
+ *  0x80000000 if hDrvr is a valid 32 bit driver
+ *  0x90000000 if hDrvr is a valid 16 bit driver
  *
  * native WINMM doesn't return those flags
- *	0x80000000 for a valid 32 bit driver and that's it
- *	(I may have mixed up the two flags :-(
- */
-DWORD	WINAPI GetDriverFlags(HDRVR hDrvr)
-{
-    LPWINE_DRIVER 	lpDrv;
-    DWORD		ret = 0;
+ *  0x80000000 for a valid 32 bit driver and that's it
+ *  (I may have mixed up the two flags :-(
+ */
+DWORD   WINAPI GetDriverFlags(HDRVR hDrvr)
+{
+    LPWINE_DRIVER   lpDrv;
+    DWORD       ret = 0;
 
     TRACE("(%04x)\n", hDrvr);
 
     if ((lpDrv = DRIVER_FindFromHDrvr(hDrvr)) != NULL) {
-	ret = WINE_GDF_EXIST | lpDrv->dwFlags;
+    ret = WINE_GDF_EXIST | lpDrv->dwFlags;
     }
     return ret;
@@ -565,16 +566,16 @@
 
 /**************************************************************************
- *				GetDriverModuleHandle	[WINMM.14]
+ *              GetDriverModuleHandle   [WINMM.14]
  */
 HMODULE WINAPI GetDriverModuleHandle(HDRVR hDrvr)
 {
-    LPWINE_DRIVER 	lpDrv;
-    HMODULE		hModule = 0;
-    
+    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;
+    if (!(lpDrv->dwFlags & WINE_GDF_16BIT))
+        hModule = lpDrv->d.d32.hModule;
     }
     TRACE("=> %04x\n", hModule);
@@ -584,5 +585,5 @@
 #ifndef __WIN32OS2__
 /**************************************************************************
- * 				DrvOpen	       		[MMSYSTEM.1100]
+ *              DrvOpen             [MMSYSTEM.1100]
  */
 HDRVR16 WINAPI DrvOpen16(LPSTR lpDriverName, LPSTR lpSectionName, LPARAM lParam)
@@ -592,5 +593,5 @@
 
 /**************************************************************************
- * 				DrvClose       		[MMSYSTEM.1101]
+ *              DrvClose            [MMSYSTEM.1101]
  */
 LRESULT WINAPI DrvClose16(HDRVR16 hDrv, LPARAM lParam1, LPARAM lParam2)
@@ -600,8 +601,8 @@
 
 /**************************************************************************
- * 				DrvSendMessage		[MMSYSTEM.1102]
+ *              DrvSendMessage      [MMSYSTEM.1102]
  */
 LRESULT WINAPI DrvSendMessage16(HDRVR16 hDrv, WORD msg, LPARAM lParam1,
-				LPARAM lParam2)
+                LPARAM lParam2)
 {
     return SendDriverMessage16(hDrv, msg, lParam1, lParam2);
@@ -609,5 +610,5 @@
 
 /**************************************************************************
- * 				DrvGetModuleHandle	[MMSYSTEM.1103]
+ *              DrvGetModuleHandle  [MMSYSTEM.1103]
  */
 HANDLE16 WINAPI DrvGetModuleHandle16(HDRVR16 hDrv)
@@ -617,8 +618,8 @@
 
 /**************************************************************************
- * 				DrvDefDriverProc	[MMSYSTEM.1104]
- */
-LRESULT WINAPI DrvDefDriverProc16(DWORD dwDriverID, HDRVR16 hDrv, WORD wMsg, 
-				  DWORD dwParam1, DWORD dwParam2)
+ *              DrvDefDriverProc    [MMSYSTEM.1104]
+ */
+LRESULT WINAPI DrvDefDriverProc16(DWORD dwDriverID, HDRVR16 hDrv, WORD wMsg,
+                  DWORD dwParam1, DWORD dwParam2)
 {
     return DefDriverProc16(dwDriverID, hDrv, wMsg, dwParam1, dwParam2);
@@ -627,8 +628,8 @@
 
 /**************************************************************************
- * 				DefDriverProc			  [WINMM.5]
+ *              DefDriverProc             [WINMM.5]
  */
 LRESULT WINAPI DefDriverProc(DWORD dwDriverIdentifier, HDRVR hDrv,
-			     UINT Msg, LPARAM lParam1, LPARAM lParam2)
+                 UINT Msg, LPARAM lParam1, LPARAM lParam2)
 {
     switch (Msg) {
@@ -648,11 +649,11 @@
 #ifndef __WIN32OS2__
 /**************************************************************************
- * 				DriverProc			[MMSYSTEM.6]
- */
-LRESULT WINAPI DriverProc16(DWORD dwDevID, HDRVR16 hDrv, WORD wMsg, 
-			    DWORD dwParam1, DWORD dwParam2)
+ *              DriverProc          [MMSYSTEM.6]
+ */
+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",
-	  dwDevID, hDrv, wMsg, dwParam1, dwParam2);
+      dwDevID, hDrv, wMsg, dwParam1, dwParam2);
 
     return DrvDefDriverProc16(dwDevID, hDrv, wMsg, dwParam1, dwParam2);
@@ -662,64 +663,64 @@
 #ifdef __WIN32OS2__
 /**************************************************************************
- * 				DriverCallback			[MMSYSTEM.31]
- */
-BOOL WINAPI DriverCallback(DWORD dwCallBack, UINT uFlags, HDRVR hDev, 
-			   UINT wMsg, DWORD dwUser, DWORD dwParam1, 
-			   DWORD dwParam2)
+ *              DriverCallback          [MMSYSTEM.31]
+ */
+BOOL WINAPI DriverCallback(DWORD dwCallBack, UINT uFlags, HDRVR hDev,
+               UINT wMsg, DWORD dwUser, DWORD dwParam1,
+               DWORD dwParam2)
 {
     TRACE("DriverCallback (%08lX, %04X, %04X, %04X, %08lX, %08lX, %08lX); !\n",
-	  dwCallBack, uFlags, hDev, wMsg, dwUser, dwParam1, dwParam2);
+      dwCallBack, uFlags, hDev, wMsg, dwUser, dwParam1, dwParam2);
 
     switch (uFlags & DCB_TYPEMASK) {
     case DCB_NULL:
-	TRACE("Null !\n");
-	if (dwCallBack)
-	    WARN("uFlags=%04X has null DCB value, but dwCallBack=%08lX is not null !\n", uFlags, dwCallBack);
-	break;
+    TRACE("Null !\n");
+    if (dwCallBack)
+        WARN("uFlags=%04X has null DCB value, but dwCallBack=%08lX is not null !\n", uFlags, dwCallBack);
+    break;
     case DCB_WINDOW:
-	TRACE("Window(%04lX) handle=%04X!\n", dwCallBack, hDev);
-	if (!IsWindow(dwCallBack))
-	    return FALSE;
-	PostMessageA((HWND)dwCallBack, wMsg, hDev, dwParam1);
-	break;
+    TRACE("Window(%04lX) handle=%04X!\n", dwCallBack, hDev);
+    if (!IsWindow(dwCallBack))
+        return FALSE;
+    PostMessageA((HWND)dwCallBack, wMsg, hDev, dwParam1);
+    break;
     case DCB_TASK: /* aka DCB_THREAD */
-	TRACE("Task(%04lx) !\n", dwCallBack);
-	PostThreadMessageA(dwCallBack, wMsg, hDev, dwParam1);
-	break;
+    TRACE("Task(%04lx) !\n", dwCallBack);
+    PostThreadMessageA(dwCallBack, wMsg, hDev, dwParam1);
+    break;
     case DCB_FUNCTION:
-	TRACE("Function (32 bit) !\n");
-	((LPDRVCALLBACK)dwCallBack)(hDev, wMsg, dwUser, dwParam1, dwParam2);
-	break;
+    TRACE("Function (32 bit) !\n");
+    ((LPDRVCALLBACK)dwCallBack)(hDev, wMsg, dwUser, dwParam1, dwParam2);
+    break;
     case DCB_EVENT:
-	TRACE("Event(%08lx) !\n", dwCallBack);
-	SetEvent((HANDLE)dwCallBack);
-	break;
+    TRACE("Event(%08lx) !\n", dwCallBack);
+    SetEvent((HANDLE)dwCallBack);
+    break;
     case 6: /* I would dub it DCB_MMTHREADSIGNAL */
-	/* this is an undocumented DCB_ value used for mmThreads
-	 * loword of dwCallBack contains the handle of the lpMMThd block
-	 * which dwSignalCount has to be incremented
-	 */
-	{
+    /* this is an undocumented DCB_ value used for mmThreads
+     * loword of dwCallBack contains the handle of the lpMMThd block
+     * which dwSignalCount has to be incremented
+     */
+    {
 #ifdef __WIN32OS2__
-	    WINE_MMTHREAD*	lpMMThd = (WINE_MMTHREAD*)dwCallBack;
+        WINE_MMTHREAD*  lpMMThd = (WINE_MMTHREAD*)dwCallBack;
 #else
-	    WINE_MMTHREAD*	lpMMThd = MapSL( MAKESEGPTR(LOWORD(dwCallBack), 0) );
+        WINE_MMTHREAD*  lpMMThd = MapSL( MAKESEGPTR(LOWORD(dwCallBack), 0) );
 #endif
 
-	    TRACE("mmThread (%04x, %p) !\n", LOWORD(dwCallBack), lpMMThd);
-	    /* same as mmThreadSignal16 */
-	    InterlockedIncrement(&lpMMThd->dwSignalCount);
-	    SetEvent(lpMMThd->hEvent);
-	    /* some other stuff on lpMMThd->hVxD */
-	}
-	break;	
+        TRACE("mmThread (%04x, %p) !\n", LOWORD(dwCallBack), lpMMThd);
+        /* same as mmThreadSignal16 */
+        InterlockedIncrement(&lpMMThd->dwSignalCount);
+        SetEvent(lpMMThd->hEvent);
+        /* some other stuff on lpMMThd->hVxD */
+    }
+    break;
 #if 0
     case 4:
-	/* this is an undocumented DCB_ value for... I don't know */
-	break;
+    /* this is an undocumented DCB_ value for... I don't know */
+    break;
 #endif
     default:
-	WARN("Unknown callback type %d\n", uFlags & DCB_TYPEMASK);
-	return FALSE;
+    WARN("Unknown callback type %d\n", uFlags & DCB_TYPEMASK);
+    return FALSE;
     }
     TRACE("Done\n");
Index: trunk/src/winmm/initterm.cpp
===================================================================
--- trunk/src/winmm/initterm.cpp	(revision 6638)
+++ trunk/src/winmm/initterm.cpp	(revision 6639)
@@ -1,3 +1,4 @@
-/*
+/*  $Id: initterm.cpp,v 1.19 2001-09-05 10:30:21 bird Exp $
+ *
  * WINMM DLL entry point
  *
Index: trunk/src/wnaspi32/initterm.cpp
===================================================================
--- trunk/src/wnaspi32/initterm.cpp	(revision 6638)
+++ trunk/src/wnaspi32/initterm.cpp	(revision 6639)
@@ -1,3 +1,4 @@
-/*
+/* $Id: initterm.cpp,v 1.7 2001-09-05 10:28:28 bird Exp $
+ *
  * DLL entry point
  *
@@ -52,30 +53,30 @@
    case DLL_PROCESS_ATTACH:
         aspi = new scsiObj();
-	if(aspi == NULL) {
-		dprintf(("WNASPI32: LibMain; can't allocate aspi object!"));
-		return FALSE;
-	}
-    	if(aspi->init(65535) == FALSE)
+    if(aspi == NULL) {
+        dprintf(("WNASPI32: LibMain; can't allocate aspi object!"));
+        return FALSE;
+    }
+        if(aspi->init(65535) == FALSE)
         {
-		delete aspi;
-		aspi = NULL;
-		dprintf(("WNASPI32: LibMain; can't init aspi object!"));
-		return FALSE;
-	}
-	dprintf(("WNASPI32: LibMain; aspi object created successfully"));
-	return TRUE;
+        delete aspi;
+        aspi = NULL;
+        dprintf(("WNASPI32: LibMain; can't init aspi object!"));
+        return FALSE;
+    }
+    dprintf(("WNASPI32: LibMain; aspi object created successfully"));
+    return TRUE;
 
    case DLL_THREAD_ATTACH:
    case DLL_THREAD_DETACH:
-	return TRUE;
+    return TRUE;
 
    case DLL_PROCESS_DETACH:
-	if(aspi) {
-        	aspi->close();
-		delete aspi;
-		aspi = NULL;
-	}
-	ctordtorTerm();
-	return TRUE;
+    if(aspi) {
+            aspi->close();
+        delete aspi;
+        aspi = NULL;
+    }
+    ctordtorTerm();
+    return TRUE;
    }
    return FALSE;
@@ -107,12 +108,12 @@
          CheckVersionFromHMOD(PE2LX_VERSION, hModule); /*PLF Wed  98-03-18 05:28:48*/
 
-	 dllHandle = RegisterLxDll(hModule, LibMain, (PVOID)&_Resource_PEResTab);
-         if(dllHandle == 0) 
-		return 0UL;
+     dllHandle = RegisterLxDll(hModule, LibMain, (PVOID)&_Resource_PEResTab);
+         if(dllHandle == 0)
+        return 0UL;
 
          break;
       case 1:
          if(dllHandle) {
-	 	UnregisterLxDll(dllHandle);
+        UnregisterLxDll(dllHandle);
          }
          break;
Index: trunk/src/wnetap32/oslibnet.cpp
===================================================================
--- trunk/src/wnetap32/oslibnet.cpp	(revision 6638)
+++ trunk/src/wnetap32/oslibnet.cpp	(revision 6639)
@@ -1,4 +1,4 @@
-/* $Id */
-/*
+/*  $Id: oslibnet.cpp,v 1.4 2001-09-05 10:27:54 bird Exp $
+ *
  * Wrappers for OS/2 Netbios/Network/LAN API
  *
@@ -66,7 +66,7 @@
   case NERR_BadEventName:      return NERR_BadEventName;
   case NERR_BASE + 44:         return NERR_BASE + 44; // NERR_DupNameReboot
-    
+
   // ...
-    
+
     case NO_ERROR: //0
         return ERROR_SUCCESS_W;
@@ -208,5 +208,5 @@
  * Name      : NET_API_STATUS OSLibNetWkstaGetInfo
  * Purpose   :
- * Parameters: 
+ * Parameters:
  * Variables :
  * Result    :
@@ -218,11 +218,11 @@
 
 DWORD OSLibNetWkstaGetInfo (const unsigned char * pszServer,
-                    unsigned long         ulLevel,       
+                    unsigned long         ulLevel,
                     unsigned char       * pbBuffer,
-                    unsigned long         ulBuffer,      
-                    unsigned long       * pulTotalAvail) 
+                    unsigned long         ulBuffer,
+                    unsigned long       * pulTotalAvail)
 {
   USHORT sel = RestoreOS2FS();
-  
+
   APIRET rc = error2WinError(Net32WkstaGetInfo(pszServer, ulLevel, pbBuffer, ulBuffer, pulTotalAvail));
   SetFS(sel);
@@ -234,5 +234,5 @@
  * Name      : NET_API_STATUS OSLibNetStatisticsGet
  * Purpose   :
- * Parameters: 
+ * Parameters:
  * Variables :
  * Result    :
Index: trunk/src/ws2_32/initterm.cpp
===================================================================
--- trunk/src/ws2_32/initterm.cpp	(revision 6638)
+++ trunk/src/ws2_32/initterm.cpp	(revision 6639)
@@ -1,3 +1,4 @@
-/*
+/* $Id: initterm.cpp,v 1.2 2001-09-05 10:27:06 bird Exp $
+ *
  * DLL entry point
  *
@@ -36,5 +37,5 @@
 #include <initdll.h>
 
-#define DBG_LOCALLOG	DBG_initterm
+#define DBG_LOCALLOG    DBG_initterm
 #include "dbglocal.h"
 
@@ -52,13 +53,13 @@
    {
    case DLL_PROCESS_ATTACH:
-	return TRUE;
+    return TRUE;
 
    case DLL_THREAD_ATTACH:
    case DLL_THREAD_DETACH:
-	return TRUE;
+    return TRUE;
 
    case DLL_PROCESS_DETACH:
-	ctordtorTerm();
-	return TRUE;
+    ctordtorTerm();
+    return TRUE;
    }
    return FALSE;
@@ -91,12 +92,12 @@
          CheckVersionFromHMOD(PE2LX_VERSION, hModule); /*PLF Wed  98-03-18 05:28:48*/
 
-	 dllHandle = RegisterLxDll(hModule, OdinLibMain, (PVOID)&_Resource_PEResTab);
-         if(dllHandle == 0) 
-		return 0UL;
+     dllHandle = RegisterLxDll(hModule, OdinLibMain, (PVOID)&_Resource_PEResTab);
+         if(dllHandle == 0)
+        return 0UL;
 
          break;
       case 1 :
          if(dllHandle) {
-	   	UnregisterLxDll(dllHandle);
+        UnregisterLxDll(dllHandle);
          }
          break;
Index: trunk/src/wsock32/initterm.cpp
===================================================================
--- trunk/src/wsock32/initterm.cpp	(revision 6638)
+++ trunk/src/wsock32/initterm.cpp	(revision 6639)
@@ -1,3 +1,4 @@
-/*
+/* $Id: initterm.cpp,v 1.17 2001-09-05 10:26:30 bird Exp $
+ *
  * DLL entry point
  *
@@ -36,5 +37,5 @@
 #include <initdll.h>
 
-#define DBG_LOCALLOG	DBG_initterm
+#define DBG_LOCALLOG    DBG_initterm
 #include "dbglocal.h"
 
Index: trunk/src/wsock32/initwsock32.cpp
===================================================================
--- trunk/src/wsock32/initwsock32.cpp	(revision 6638)
+++ trunk/src/wsock32/initwsock32.cpp	(revision 6639)
@@ -1,3 +1,4 @@
-/*
+/* $Id: initwsock32.cpp,v 1.3 2001-09-05 10:26:30 bird Exp $
+ *
  * DLL entry point
  *
@@ -36,5 +37,5 @@
 #include <initdll.h>
 
-#define DBG_LOCALLOG	DBG_initterm
+#define DBG_LOCALLOG    DBG_initterm
 #include "dbglocal.h"
 
@@ -68,12 +69,12 @@
          ParseLogStatusWSOCK32();
 
-	 dllHandle = RegisterLxDll(hModule, NULL, (PVOID)&wsock32_PEResTab);
-         if(dllHandle == 0) 
-		return 0UL;
+     dllHandle = RegisterLxDll(hModule, NULL, (PVOID)&wsock32_PEResTab);
+         if(dllHandle == 0)
+        return 0UL;
 
          break;
       case 1 :
          if(dllHandle) {
-	   	UnregisterLxDll(dllHandle);
+        UnregisterLxDll(dllHandle);
          }
          break;
