better dmusic debug traces

Dimitrie O. Paun dpaun at rogers.com
Sun Feb 22 01:23:59 CST 2004


On February 21, 2004 02:13 pm, Rok Mandeljc wrote:

Nice, but this:

> +void DMUSIC_dump_flags_ (DWORD flags, const flag_info* names, size_t num_names, int newline) {
> +       unsigned int i;
> +       
> +       for (i=0; i < num_names; i++) {
> +               if ((flags & names[i].val) ||      /* standard flag value */
> +               ((!flags) && (!names[i].val))) /* zero value only */
> +               DPRINTF("%s ", names[i].name);
> +       }
> +       
> +    if (newline) DPRINTF("\n");
> +}

and other like this are much better served if you use the 
	wine_dbg_sprintf("...")
trick that you used in debugstr_dmguid(), so they end up 
returning a string instead of printing stuff. 

Not only is it conceptually nicer, but in my experience it 
also cleans up the code as well...

-- 
Dimi.




More information about the wine-devel mailing list