cleanup patch

Andreas Mohr andi at rhlx01.fht-esslingen.de
Sun Nov 18 10:09:20 CST 2001


Hi all,

you get used to it, don't you ? ;-)

- fix wrong hexadecimal GetLastError() output
  NOTE: never ever use hexadecimal GLE output again !!
- fix wrong decimal hkey output
- misc fixes
- changed my email address

Alexandre: these three patches most probably conflict with my patches sent
last week. Use these instead.

-- 
Andreas Mohr                        Stauferstr. 6, D-71272 Renningen, Germany
-------------- next part --------------
Determining best CVS host...
Using CVSROOT :pserver:cvs at rhlx01.fht-esslingen.de:/home/wine
Index: dlls/ddraw/dsurface/dib.c
===================================================================
RCS file: /home/wine/wine/dlls/ddraw/dsurface/dib.c,v
retrieving revision 1.5
diff -u -r1.5 dib.c
--- dlls/ddraw/dsurface/dib.c	10 Sep 2001 23:12:16 -0000	1.5
+++ dlls/ddraw/dsurface/dib.c	18 Nov 2001 13:47:22 -0000
@@ -386,7 +386,11 @@
 
     dbuf = (BYTE*)ddesc.lpSurface+(xdst.top*ddesc.u1.lPitch)+(xdst.left*bpp);
 
-    dwFlags &= ~(DDBLT_WAIT|DDBLT_ASYNC);/* FIXME: can't handle right now */
+    if (dwFlags & (DDBLT_WAIT|DDBLT_ASYNC))
+    {
+	FIXME("dwFlags DDBLT_WAIT and/or DDBLT_ASYNC: can't handle right now.\n");
+        dwFlags &= ~(DDBLT_WAIT|DDBLT_ASYNC);
+    }
 
     /* First, all the 'source-less' blits */
     if (dwFlags & DDBLT_COLORFILL) {
Index: dlls/dplayx/dplayx_global.c
===================================================================
RCS file: /home/wine/wine/dlls/dplayx/dplayx_global.c,v
retrieving revision 1.13
diff -u -r1.13 dplayx_global.c
--- dlls/dplayx/dplayx_global.c	25 Jul 2001 00:43:30 -0000	1.13
+++ dlls/dplayx/dplayx_global.c	18 Nov 2001 13:47:22 -0000
@@ -221,7 +221,7 @@
   }
   else
   {
-    ERR( ": semaphore error 0x%08lx\n", GetLastError() );
+    ERR( ": semaphore error %ld\n", GetLastError() );
     return FALSE;
   }
 
@@ -246,7 +246,7 @@
   }
   else
   {
-    ERR( ": unable to create shared memory 0x%08lx\n", GetLastError() );
+    ERR( ": unable to create shared memory (%ld)\n", GetLastError() );
     return FALSE;
   }
 
@@ -256,7 +256,7 @@
 
   if( lpSharedStaticData == NULL )
   {
-    ERR( ": unable to map static data into process memory space: 0x%08lx\n", 
+    ERR( ": unable to map static data into process memory space (%ld)\n", 
          GetLastError() );
     return FALSE;
   }
Index: dlls/ole32/compobj.c
===================================================================
RCS file: /home/wine/wine/dlls/ole32/compobj.c,v
retrieving revision 1.47
diff -u -r1.47 compobj.c
--- dlls/ole32/compobj.c	23 Oct 2001 19:52:08 -0000	1.47
+++ dlls/ole32/compobj.c	18 Nov 2001 13:47:23 -0000
@@ -1454,7 +1454,7 @@
 			  (LPVOID)&lpclf);
 
   if (FAILED(hres)) {
-    FIXME("no classfactory created for %s, hres is 0x%08lx\n",
+    FIXME("no classfactory created for CLSID %s, hres is 0x%08lx\n",
 	  debugstr_guid(rclsid),hres);
     return hres;
   }
Index: dlls/oleaut32/typelib.c
===================================================================
RCS file: /home/wine/wine/dlls/oleaut32/typelib.c,v
retrieving revision 1.56
diff -u -r1.56 typelib.c
--- dlls/oleaut32/typelib.c	12 Nov 2001 15:50:01 -0000	1.56
+++ dlls/oleaut32/typelib.c	18 Nov 2001 13:47:25 -0000
@@ -1942,7 +1942,7 @@
     if(*ppTypeLib)
       ret = S_OK;
     else
-      ERR("Loading of typelib %s failed with error 0x%08lx\n",
+      ERR("Loading of typelib %s failed with error %ld\n",
 	  debugstr_w(pszFileName), GetLastError());
 
     return ret;
Index: dlls/x11drv/dga2.c
===================================================================
RCS file: /home/wine/wine/dlls/x11drv/dga2.c,v
retrieving revision 1.5
diff -u -r1.5 dga2.c
--- dlls/x11drv/dga2.c	11 Sep 2001 00:32:33 -0000	1.5
+++ dlls/x11drv/dga2.c	18 Nov 2001 13:47:25 -0000
@@ -63,7 +63,7 @@
 
   /* test that it works */
   if (!TSXDGAOpenFramebuffer(gdi_display, DefaultScreen(gdi_display))) {
-    TRACE("disabling XF86DGA2 (insufficient permissions?)\n");
+    WARN("disabling XF86DGA2 (insufficient permissions?)\n");
     return;
   }
   TSXDGACloseFramebuffer(gdi_display, DefaultScreen(gdi_display));
@@ -84,7 +84,7 @@
   for (i=0; i<nmodes; i++)
     convert_mode(&modes[i], &xf86dga2_modes[i+1]);
 
-  TRACE("Enabling DGA\n");
+  TRACE("Enabling XF86DGA2 mode\n");
 }
 
 void X11DRV_XF86DGA2_Cleanup(void)
Index: files/directory.c
===================================================================
RCS file: /home/wine/wine/files/directory.c,v
retrieving revision 1.41
diff -u -r1.41 directory.c
--- files/directory.c	24 Aug 2001 21:13:02 -0000	1.41
+++ files/directory.c	18 Nov 2001 13:47:25 -0000
@@ -121,7 +121,7 @@
                              path, sizeof(path) );
     if (strchr(path, '/'))
     {
-	MESSAGE("No '/' allowed in [wine] 'Path=' statement of wine config!\n");
+	MESSAGE("Fix your wine config to use DOS drive syntax in [wine] 'Path=' statement! (no '/' allowed)\n");
 	PROFILE_UsageWineIni();
 	ExitProcess(1);
     }
Index: files/dos_fs.c
===================================================================
RCS file: /home/wine/wine/files/dos_fs.c,v
retrieving revision 1.97
diff -u -r1.97 dos_fs.c
--- files/dos_fs.c	24 Oct 2001 00:23:25 -0000	1.97
+++ files/dos_fs.c	18 Nov 2001 13:47:26 -0000
@@ -1222,13 +1222,13 @@
     int namelen,drive=0;
 
     if ((strlen(name) >1)&& (name[1]==':'))
-      /*drive letter given */
+      /* drive letter given */
       {
 	driveletter = name[0];
       }
     if ((strlen(name) >2)&& (name[1]==':') &&
 	     ((name[2]=='\\') || (name[2]=='/')))
-      /*absolute path given */
+      /* absolute path given */
       {
 	lstrcpynA(full_name.short_name,name,MAX_PATHNAME_LEN);
 	drive = (int)FILE_toupper(name[0]) - 'A';
@@ -1285,7 +1285,7 @@
 	if ( *p == '/' )
 	  *p = '\\';
       }
-     /* Use memmove, as areas overlap*/
+     /* Use memmove, as areas overlap */
      /* Delete .. */
     while ((p = strstr(full_name.short_name,"\\..\\")))
       {
@@ -1317,8 +1317,8 @@
     namelen=strlen(full_name.short_name);
     if (!strcmp(full_name.short_name+namelen-3,"\\.."))
 	{
-	  /* one more starnge case: "c:\test\test1\.." 
-	   return "c:\test"*/
+	  /* one more strange case: "c:\test\test1\.." 
+	   return "c:\test" */
 	  *(full_name.short_name+namelen-3)=0;
 	  q = strrchr(full_name.short_name,'\\');
 	  *q =0;
@@ -1332,7 +1332,7 @@
 
     /* 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 win95osr, bon 001118)
+    plus the terminating \0 (tested against win95osr2, bon 001118)
     . */
     ret = strlen(full_name.short_name);
     if (ret >= len )
Index: misc/cdrom.c
===================================================================
RCS file: /home/wine/wine/misc/cdrom.c,v
retrieving revision 1.25
diff -u -r1.25 cdrom.c
--- misc/cdrom.c	22 May 2001 19:19:12 -0000	1.25
+++ misc/cdrom.c	18 Nov 2001 13:47:27 -0000
@@ -869,7 +869,7 @@
 
 	    case CDS_MIXED:
 		cdname = "Mixed mode";
-		ERR("We don't have a way of determining the label of a mixed mode CD - Linux doesn't allow raw access !!\n");
+		FIXME("Need to get the label of a mixed mode CD: not implemented yet !\n");
 		/* fall through */
 
 	    case CDS_NO_INFO:
Index: msdos/int21.c
===================================================================
RCS file: /home/wine/wine/msdos/int21.c,v
retrieving revision 1.64
diff -u -r1.64 int21.c
--- msdos/int21.c	24 Jul 2001 21:45:24 -0000	1.64
+++ msdos/int21.c	18 Nov 2001 13:47:28 -0000
@@ -2448,7 +2448,7 @@
     }
 
     if ((context->EFlags & 0x0001))
-        TRACE("failed, error 0x%04lx\n", GetLastError() );
+        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",
Index: programs/uninstaller/main.c
===================================================================
RCS file: /home/wine/wine/programs/uninstaller/main.c,v
retrieving revision 1.3
diff -u -r1.3 main.c
--- programs/uninstaller/main.c	8 Jul 2001 20:28:23 -0000	1.3
+++ programs/uninstaller/main.c	18 Nov 2001 13:47:28 -0000
@@ -1,7 +1,7 @@
 /*
  * Q&D Uninstaller (main.c)
  * 
- * Copyright 2000 Andreas Mohr <a.mohr at mailto.de>
+ * Copyright 2000 Andreas Mohr <andi at lisas.de>
  * To be distributed under the Wine License
  */
 
@@ -40,7 +40,7 @@
 char appname[18];
 
 static char about_string[] =
-    "Windows program uninstaller (C) 2000 by Andreas Mohr <a.mohr at mailto.de>";
+    "Windows program uninstaller (C) 2000 by Andreas Mohr <andi at lisas.de>";
 static char program_description[] =
 	"Welcome to the Wine uninstaller !\n\nThe purpose of this program is to let you get rid of all those fantastic programs that somehow manage to always take way too much space on your HDD :-)";
 
Index: programs/uninstaller/rsrc.rc
===================================================================
RCS file: /home/wine/wine/programs/uninstaller/rsrc.rc,v
retrieving revision 1.1
diff -u -r1.1 rsrc.rc
--- programs/uninstaller/rsrc.rc	1 Aug 2000 00:27:35 -0000	1.1
+++ programs/uninstaller/rsrc.rc	18 Nov 2001 13:47:28 -0000
@@ -1,7 +1,7 @@
 /*
  * Uninstaller (rsrc.rc)
  * 
- * Copyright 2000 Andreas Mohr <a.mohr at mailto.de>
+ * Copyright 2000 Andreas Mohr <andi at lisas.de>
  * To be distributed under the Wine License
  */
 
Index: scheduler/pthread.c
===================================================================
RCS file: /home/wine/wine/scheduler/pthread.c,v
retrieving revision 1.17
diff -u -r1.17 pthread.c
--- scheduler/pthread.c	9 Oct 2001 21:59:16 -0000	1.17
+++ scheduler/pthread.c	18 Nov 2001 13:47:28 -0000
@@ -2,7 +2,7 @@
  * pthread emulation for re-entrant libcs
  *
  * We can't use pthreads directly, so why not let libcs
- * that wants pthreads use Wine's own threading instead...
+ * that want pthreads use Wine's own threading instead...
  *
  * Copyright 1999 Ove K?ven
  */
Index: server/trace.c
===================================================================
RCS file: /home/wine/wine/server/trace.c,v
retrieving revision 1.114
diff -u -r1.114 trace.c
--- server/trace.c	13 Nov 2001 22:23:48 -0000	1.114
+++ server/trace.c	18 Nov 2001 13:47:29 -0000
@@ -1198,7 +1198,7 @@
 
 static void dump_create_key_reply( const struct create_key_request *req )
 {
-    fprintf( stderr, " hkey=%d,", req->hkey );
+    fprintf( stderr, " hkey=%04x,", req->hkey );
     fprintf( stderr, " created=%d", req->created );
 }
 
@@ -1212,17 +1212,17 @@
 
 static void dump_open_key_reply( const struct open_key_request *req )
 {
-    fprintf( stderr, " hkey=%d", req->hkey );
+    fprintf( stderr, " hkey=%04x", req->hkey );
 }
 
 static void dump_delete_key_request( const struct delete_key_request *req )
 {
-    fprintf( stderr, " hkey=%d", req->hkey );
+    fprintf( stderr, " hkey=%04x", req->hkey );
 }
 
 static void dump_enum_key_request( const struct enum_key_request *req )
 {
-    fprintf( stderr, " hkey=%d,", req->hkey );
+    fprintf( stderr, " hkey=%04x,", req->hkey );
     fprintf( stderr, " index=%d,", req->index );
     fprintf( stderr, " full=%d", req->full );
 }
@@ -1245,7 +1245,7 @@
 
 static void dump_set_key_value_request( const struct set_key_value_request *req )
 {
-    fprintf( stderr, " hkey=%d,", req->hkey );
+    fprintf( stderr, " hkey=%04x,", req->hkey );
     fprintf( stderr, " type=%d,", req->type );
     fprintf( stderr, " total=%08x,", req->total );
     fprintf( stderr, " offset=%08x,", req->offset );
@@ -1258,7 +1258,7 @@
 
 static void dump_get_key_value_request( const struct get_key_value_request *req )
 {
-    fprintf( stderr, " hkey=%d,", req->hkey );
+    fprintf( stderr, " hkey=%04x,", req->hkey );
     fprintf( stderr, " offset=%08x,", req->offset );
     fprintf( stderr, " name=" );
     cur_pos += dump_varargs_unicode_len_str( req );
@@ -1274,7 +1274,7 @@
 
 static void dump_enum_key_value_request( const struct enum_key_value_request *req )
 {
-    fprintf( stderr, " hkey=%d,", req->hkey );
+    fprintf( stderr, " hkey=%04x,", req->hkey );
     fprintf( stderr, " index=%d,", req->index );
     fprintf( stderr, " offset=%08x", req->offset );
 }
@@ -1292,14 +1292,14 @@
 
 static void dump_delete_key_value_request( const struct delete_key_value_request *req )
 {
-    fprintf( stderr, " hkey=%d,", req->hkey );
+    fprintf( stderr, " hkey=%04x,", req->hkey );
     fprintf( stderr, " name=" );
     cur_pos += dump_varargs_unicode_str( req );
 }
 
 static void dump_load_registry_request( const struct load_registry_request *req )
 {
-    fprintf( stderr, " hkey=%d,", req->hkey );
+    fprintf( stderr, " hkey=%04x,", req->hkey );
     fprintf( stderr, " file=%d,", req->file );
     fprintf( stderr, " name=" );
     cur_pos += dump_varargs_unicode_str( req );
@@ -1307,13 +1307,13 @@
 
 static void dump_save_registry_request( const struct save_registry_request *req )
 {
-    fprintf( stderr, " hkey=%d,", req->hkey );
+    fprintf( stderr, " hkey=%04x,", req->hkey );
     fprintf( stderr, " file=%d", req->file );
 }
 
 static void dump_save_registry_atexit_request( const struct save_registry_atexit_request *req )
 {
-    fprintf( stderr, " hkey=%d,", req->hkey );
+    fprintf( stderr, " hkey=%04x,", req->hkey );
     fprintf( stderr, " file=" );
     cur_pos += dump_varargs_string( req );
 }
Index: win32/except.c
===================================================================
RCS file: /home/wine/wine/win32/except.c,v
retrieving revision 1.48
diff -u -r1.48 except.c
--- win32/except.c	23 Oct 2001 00:25:46 -0000	1.48
+++ win32/except.c	18 Nov 2001 13:47:29 -0000
@@ -202,8 +202,7 @@
     DWORD		format_size;
     BOOL		ret = FALSE;
 
-    MESSAGE("wine: Unhandled exception, starting debugger...\n");
-
+    MESSAGE("Wine: Crash/exception occurred -> trying to start debugger as configured in registry file...\n");
     if (!RegOpenKeyA(HKEY_LOCAL_MACHINE, 
 		     "Software\\Microsoft\\Windows NT\\CurrentVersion\\AeDebug", &hDbgConf)) {
        DWORD 	type;
@@ -291,12 +290,12 @@
 /******************************************************************
  *		start_debugger_atomic
  *
- * starts the debugger is an atomic way:
+ * starts the debugger in an atomic way:
  *	- either the debugger is not started and it is started
- *	- either the debugger has already been started by an other thread
- *	- either the debugger couldn't be started
+ *	- or the debugger has already been started by another thread
+ *	- or the debugger couldn't be started
  *
- * returns TRUE for the two first condition, FALSE for the last
+ * returns TRUE for the two first conditions, FALSE for the last
  */
 static	int	start_debugger_atomic(PEXCEPTION_POINTERS epointers)
 {
@@ -314,9 +313,8 @@
 	attr.SecurityDescriptor       = NULL;
 	attr.SecurityQualityOfService = NULL;
 
-	/* ask for manual reset, so that once the debugger is started, every thread will be
-	 * know it
-	 */
+	/* ask for manual reset, so that once the debugger is started,
+	 * every thread will know it */
 	NtCreateEvent( &hEvent, EVENT_ALL_ACCESS, &attr, TRUE, FALSE );
 	if (InterlockedCompareExchange( (LPLONG)&hRunOnce, hEvent, 0 ) == 0)
 	{
@@ -338,9 +336,9 @@
 	
     /* 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, we'll know
-     * by reposting the exception if it has actually attached to the current process
-     */
+    /* in fact, here, we only know that someone has tried to start the debugger,
+     * we'll know by reposting the exception if it has actually attached
+     * to the current process */
     return TRUE;
 }
 
Index: windows/win.c
===================================================================
RCS file: /home/wine/wine/windows/win.c,v
retrieving revision 1.169
diff -u -r1.169 win.c
--- windows/win.c	14 Nov 2001 21:28:37 -0000	1.169
+++ windows/win.c	18 Nov 2001 13:47:30 -0000
@@ -1608,7 +1608,7 @@
 HWND WINAPI GetDesktopWindow(void)
 {
     if (pWndDesktop) return pWndDesktop->hwndSelf;
-    ERR( "You need the -desktop option when running with native USER\n" );
+    ERR( "Grave Wine init error: either you're trying to use an invalid native USER.EXE config, or some graphics/GUI libraries or DLLs didn't initialize properly. Aborting.\n" );
     ExitProcess(1);
     return 0;
 }
@@ -2133,7 +2133,7 @@
  * The user data is reserved for use by the application which created
  * the window.
  *
- * Do not use GWL_STYLE to change the window's WS_DISABLE style;
+ * Do not use GWL_STYLE to change the window's WS_DISABLED style;
  * instead, call the EnableWindow() function to change the window's
  * disabled state.
  *


More information about the wine-patches mailing list