[MPlayer-dev-eng] cleanups of a few macros in Gui/
Arpi
arpi at thot.banki.hu
Mon Oct 8 17:04:12 CEST 2001
Hi,
> -#define IZE(x) printf("@@@ " x " @@@\n");
> +#define IZE(x) do { printf("@@@ " x " @@@\n"); } while(0)
What is the sense of this change?
Please show me an example where original fails and do{}while version works!
(I can't find one)
> -#define gtkShow( w ) gtkShMem->vs.window=w; gtkSendMessage( evShowWindow );
> +#define gtkShow( w ) do { gtkShMem->vs.window=(w); gtkSendMessage( evShowWindow ); } while(0)
this is ok.
> #define CHECKDEFLIST( str ) \
> -{ \
> +do { \
> if ( defList == NULL ) \
> { \
> - message( False,MSGTR_SKIN_WARNING1,linenumber,str ); \
> + message( False,MSGTR_SKIN_WARNING1,linenumber,(str) ); \
> return 1; \
> } \
> -}
strange again. why isn't enough the simple { } ?
> -#define wsClearWindow( win ); XClearWindow( wsDisplay,win.WindowID );
> +#define wsClearWindow( win ) XClearWindow( wsDisplay,(win).WindowID )
:)))
A'rpi / Astral & ESP-team
--
mailto:arpi at thot.banki.hu
http://esp-team.scene.hu
More information about the MPlayer-dev-eng
mailing list