Oleaut32 Debug Messages

Tony Lambregts tony_lambregts at telusplanet.net
Thu Mar 13 19:52:00 CST 2003


Alexandre Julliard wrote:
> "Dimitrie O. Paun" <dimi at intelliware.ca> writes:
> 
> 
>>There are 767 DPRINTFs, and 736 MESSAGEs. I think DPRINTFs should just die,
>>they are confusing, it's not clear what they output, etc. Your patch is just 
>>perfect, as it does the obvious thing the user expects. I think we can just
>>turn most of the DPRINTFs into TRACEs, but we need to do that manually. If we
>>do so, we could probably also simplify the code in certain places, so a manual
>>process is better (in fact, a search & replace is the worse combination, as
>>we'd simply lose track of the places we need to audit).
> 
> 
> I agree most of them can be replaced by TRACE, but not all of them.
> There are cases where we want to dump debug output without the
> standard header; relay output is the obvious example. So I think a
> DPRINTF that can be compiled out would still be useful.
> 

Well that sounds like a janitorial project. The following is a sample. This 
needs Alexandre's patch applied

Change Log: Replace DPRINTF wint TRACE

Files Changed: dlls/comctl32/rebar.c

-- 

Tony Lambregts
-------------- next part --------------
Index: rebar.c
===================================================================
RCS file: /home/wine/wine/dlls/comctl32/rebar.c,v
retrieving revision 1.71
diff -u -r1.71 rebar.c
--- rebar.c	24 Feb 2003 20:48:45 -0000	1.71
+++ rebar.c	14 Mar 2003 01:49:47 -0000
@@ -406,14 +406,14 @@
     if (pB->fMask & (RBBIM_SIZE | RBBIM_IDEALSIZE | RBBIM_HEADERSIZE | RBBIM_LPARAM )) {
 	TRACE("band info:");
 	if (pB->fMask & RBBIM_SIZE)
-	    DPRINTF(" cx=%u", pB->cx);
+	    TRACE(" cx=%u", pB->cx);
 	if (pB->fMask & RBBIM_IDEALSIZE)
-	    DPRINTF(" xIdeal=%u", pB->cxIdeal);
+	    TRACE(" xIdeal=%u", pB->cxIdeal);
 	if (pB->fMask & RBBIM_HEADERSIZE)
-	    DPRINTF(" xHeader=%u", pB->cxHeader);
+	    TRACE(" xHeader=%u", pB->cxHeader);
 	if (pB->fMask & RBBIM_LPARAM)
-	    DPRINTF(" lParam=0x%08lx", pB->lParam);
-	DPRINTF("\n");
+	    TRACE(" lParam=0x%08lx", pB->lParam);
+	TRACE("\n");
     }
     if (pB->fMask & RBBIM_CHILDSIZE)
 	TRACE("band info: xMin=%u, yMin=%u, yChild=%u, yMax=%u, yIntgl=%u\n",
@@ -451,13 +451,13 @@
 	      i, pB->uMinHeight, pB->cxHeader);
 	if (pB->fMask & (RBBIM_SIZE | RBBIM_IDEALSIZE | RBBIM_LPARAM )) {
 	    if (pB->fMask & RBBIM_SIZE)
-		DPRINTF(" cx=%u", pB->cx);
+		TRACE(" cx=%u", pB->cx);
 	    if (pB->fMask & RBBIM_IDEALSIZE)
-		DPRINTF(" xIdeal=%u", pB->cxIdeal);
+		TRACE(" xIdeal=%u", pB->cxIdeal);
 	    if (pB->fMask & RBBIM_LPARAM)
-		DPRINTF(" lParam=0x%08lx", pB->lParam);
+		TRACE(" lParam=0x%08lx", pB->lParam);
 	}
-	DPRINTF("\n");
+	TRACE("\n");
 	if (RBBIM_CHILDSIZE)
 	    TRACE("band # %u: xMin=%u, yMin=%u, yChild=%u, yMax=%u, yIntgl=%u\n",
 		  i, pB->cxMinChild, pB->cyMinChild, pB->cyChild, pB->cyMaxChild, pB->cyIntegral);


More information about the wine-devel mailing list