DPRINTF->TRACE dlls/ddraw/dsurface/main.c

Tony Lambregts tony_lambregts at telusplanet.net
Sun Mar 16 10:49:08 CST 2003


Dimitrie O. Paun wrote:
> On March 15, 2003 04:22 pm, Lionel Ulmer wrote:
> 
>>Just to nitpick, in most of your patches, you have this :
>>
>>> 	if (TRACE_ON(ddraw)) {
>>>-	    DPRINTF("   Real caps are : "); DDRAW_dump_DDSCAPS2(&our_caps); DPRINTF("\n"); 
>>>+	    TRACE("   Real caps are : "); DDRAW_dump_DDSCAPS2(&our_caps); TRACE("\n");
>>
>>As we use 'TRACE' now and not 'DPRINTF', the 'TRACE_ON' constructs could be
>>removed.
> 
> 
> This is why I said these needs manual review, so we can eliminate 
> this type of tests. But personally I would have liked it a lot more
> if you could code these like so:
> 
>   	if (TRACE_ON(ddraw)) {
> -	    DPRINTF("   Real caps are : "); DDRAW_dump_DDSCAPS2(&our_caps); DPRINTF("\n"); 
> +	    TRACE("   Real caps are : %s\n", debugddscaps2(&our_caps));
> 
> That's what I did in listview.c, and the code looks a lot neater IMO.
> But then again, maybe that's just me.
> 

I agree Dimi's suggestion. One of the reasons for this exerciese is to be able 
to compile out these messages. My thoughts on this at the time was to leave 
this in place since the dump function should not print and DDRAW_dump and the 
others still use DPRINTF. If I just removed the TRACE_ON check it would always 
print and that would not be good.

I think that there is still work to be done on this. All I did was a quick 
sweep with the broom. Some of the stuff that is left will require something 
more like saws and hammers.<g>.

-- 

Tony Lambregts




More information about the wine-devel mailing list