diff options
author | atlka <atlka@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2001-08-17 07:26:07 +0000 |
---|---|---|
committer | atlka <atlka@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2001-08-17 07:26:07 +0000 |
commit | 4e876e1d56fbc85102eafc5b2d740c2b0058d38e (patch) | |
tree | 412e1b80de42cefad27b6a281c378dd200a30f95 /mp_msg.h | |
parent | b824ef36e216df026d08f08e4c249f51cd149490 (diff) | |
download | mpv-4e876e1d56fbc85102eafc5b2d740c2b0058d38e.tar.bz2 mpv-4e876e1d56fbc85102eafc5b2d740c2b0058d38e.tar.xz |
modifications to use variable number of arguments in #define with GCC
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@1569 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'mp_msg.h')
-rw-r--r-- | mp_msg.h | 18 |
1 files changed, 15 insertions, 3 deletions
@@ -47,11 +47,23 @@ extern int verbose; // defined in mplayer.c void mp_msg_init(int verbose); void mp_msg_c( int x, const char *format, ... ); -#define mp_msg(mod,lev,...) mp_msg_c((mod<<8)|lev,__VA_ARGS__) + +#ifdef __GNUC__ +#define mp_msg(mod,lev, args... ) mp_msg_c((mod<<8)|lev, ## args ) #ifdef MP_DEBUG -#define mp_dbg(mod,lev,...) mp_msg_c((mod<<8)|lev,__VA_ARGS__) +#define mp_dbg(mod,lev, args... ) mp_msg_c((mod<<8)|lev, ## args ) #else // these messages are only usefull for developers, disable them -#define mp_dbg(mod,lev,...) +#define mp_dbg(mod,lev, args... ) +#endif +#else // not GNU C +#define mp_msg(mod,lev, ... ) mp_msg_c((mod<<8)|lev, __VA_ARGS__) + +#ifdef MP_DEBUG +#define mp_dbg(mod,lev, ... ) mp_msg_c((mod<<8)|lev, __VA_ARGS__) +#else +// these messages are only usefull for developers, disable them +#define mp_dbg(mod,lev, ... ) +#endif #endif |