include: Add ONCE macro for making debug output less noisy

Alexandre Julliard julliard at winehq.org
Tue Jan 4 07:51:30 CST 2011


Sven Baars <sven.wine at gmail.com> writes:

> @@ -250,6 +250,12 @@ static inline const char *wine_dbgstr_longlong( ULONGLONG ll )
>  #define WINE_DPRINTF               wine_dbg_printf
>  #define WINE_MESSAGE               wine_dbg_printf
>  
> +#define WINE_ONCE(do_once) \
> +    do{ static int wine_once_var; \
> +    if (!wine_once_var) { \
> +        wine_once_var = 1; \
> +        do_once; } } while(0)

I don't think that buys anything over spelling it out explicitly.

-- 
Alexandre Julliard
julliard at winehq.org




More information about the wine-devel mailing list