[Mplayer-cvslog] CVS: main mp_msg.h,1.3,1.4

Adam Tla/lka atlka at mplayer.dev.hu
Fri Aug 17 09:26:10 CEST 2001


Update of /cvsroot/mplayer/main
In directory mplayer:/var/tmp.root/cvs-serv17269

Modified Files:
	mp_msg.h 
Log Message:

modifications to use variable number of arguments in #define with GCC


Index: mp_msg.h
===================================================================
RCS file: /cvsroot/mplayer/main/mp_msg.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- mp_msg.h	17 Aug 2001 00:39:49 -0000	1.3
+++ mp_msg.h	17 Aug 2001 07:26:07 -0000	1.4
@@ -47,11 +47,23 @@
 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, args... ) mp_msg_c((mod<<8)|lev, ## args )
+#else
+// these messages are only usefull for developers, disable them
+#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__)
+#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,...) 
+#define mp_dbg(mod,lev, ... ) 
+#endif
 #endif




More information about the MPlayer-cvslog mailing list