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.