[Mplayer-cvslog] CVS: main/libaf af.h,1.16,1.17 af_mp.h,1.2,1.3 af_resample.h,1.1,1.2 filter.h,1.2,1.3

Moritz Bunkus CVS mosu at mplayerhq.hu
Wed Jan 15 12:17:02 CET 2003


Update of /cvsroot/mplayer/main/libaf
In directory mail:/var/tmp.root/cvs-serv14644/libaf

Modified Files:
	af.h af_mp.h af_resample.h filter.h 
Log Message:
bunkus: Encapsulated arguments to #define in ( ... ) so that the #defines can be safely used like functions: mydef(flag ? val1 : val2)

Index: af.h
===================================================================
RCS file: /cvsroot/mplayer/main/libaf/af.h,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- af.h	10 Jan 2003 01:45:34 -0000	1.16
+++ af.h	15 Jan 2003 11:16:29 -0000	1.17
@@ -247,8 +247,8 @@
 /* Macro for printing error messages */
 #ifndef af_msg
 #define af_msg(lev, args... ) \
-((lev<AF_MSG_WARN)?(fprintf(af_msg_cfg.err?af_msg_cfg.err:stderr, ## args )): \
-((lev<=af_msg_cfg.level)?(fprintf(af_msg_cfg.msg?af_msg_cfg.msg:stdout, ## args )):0))
+(((lev)<AF_MSG_WARN)?(fprintf(af_msg_cfg.err?af_msg_cfg.err:stderr, ## args )): \
+(((lev)<=af_msg_cfg.level)?(fprintf(af_msg_cfg.msg?af_msg_cfg.msg:stdout, ## args )):0))
 #endif
 
 #endif /* __aop_h__ */

Index: af_mp.h
===================================================================
RCS file: /cvsroot/mplayer/main/libaf/af_mp.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- af_mp.h	3 Jan 2003 12:36:14 -0000	1.2
+++ af_mp.h	15 Jan 2003 11:16:29 -0000	1.3
@@ -18,7 +18,7 @@
 #undef af_msg
 #endif
 #define af_msg(lev, args... ) \
-  mp_msg(MSGT_AFILTER,((lev<0)?(lev+3):((lev==0)?MSGL_INFO:(lev+5))), ##args )
+  mp_msg(MSGT_AFILTER,(((lev)<0)?((lev)+3):(((lev)==0)?MSGL_INFO:((lev)+5))), ##args )
 
 /* Decodes the format from mplayer format to libaf format */
 extern int af_format_decode(int format);

Index: af_resample.h
===================================================================
RCS file: /cvsroot/mplayer/main/libaf/af_resample.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- af_resample.h	28 Dec 2002 13:59:53 -0000	1.1
+++ af_resample.h	15 Jan 2003 11:16:29 -0000	1.2
@@ -66,8 +66,8 @@
 
 // Macro to add data to circular que 
 #define ADDQUE(xi,xq,in)\
-  xq[xi]=xq[xi+L]=(*in);\
-  xi=(xi-1)&(L-1);
+  xq[xi]=xq[(xi)+L]=*(in);\
+  xi=((xi)-1)&(L-1);
 
 #if defined(UP)
 

Index: filter.h
===================================================================
RCS file: /cvsroot/mplayer/main/libaf/filter.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- filter.h	7 Jan 2003 10:33:30 -0000	1.2
+++ filter.h	15 Jan 2003 11:16:29 -0000	1.3
@@ -63,7 +63,7 @@
    long. 
 */
 #define updateq(n,xi,xq,in)\
-  xq[xi]=xq[xi+n]=*in;\
-  xi=(++xi)&(n-1);
+  xq[xi]=(xq)[(xi)+(n)]=*(in);\
+  xi=(++(xi))&((n)-1);
 
 #endif



More information about the MPlayer-cvslog mailing list