Update of /cvsroot/perfparse/_perfparse/libpp_common
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9112/libpp_common
Modified Files:
libpp_common.h
Log Message:
advanced logging macros - is it a problem to use C99 Style macros?
Index: libpp_common.h
===================================================================
RCS file: /cvsroot/perfparse/_perfparse/libpp_common/libpp_common.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** libpp_common.h 10 Dec 2007 18:55:09 -0000 1.8
--- libpp_common.h 15 Dec 2007 23:30:56 -0000 1.9
***************
*** 72,75 ****
--- 72,88 ----
extern int pp_log_count;
+ // make function name makro work
+ #if __STDC_VERSION__ < 199901L
+ # if __GNUC__ >= 2
+ # define __func__ __FUNCTION__
+ # else
+ # define __func__ "<unknown>"
+ # endif
+ #endif
+
+
+ #define pp_log_fl(...) pp_log(__FILE__,__LINE__,__VA_ARGS__)
+ #define pp_log_func pp_log(__FILE__,__LINE__,LOG_DEBUG_FUNCTION,_("Function %s called"),__func__)
+
/* compress_file() returns 0 when OK,
* -1 if pb in the original file,
|