From b8aca433e32346c9293acc34a9e2242809ac5692 Mon Sep 17 00:00:00 2001 From: Wiimm Date: Fri, 23 Feb 2024 16:02:06 +0100 Subject: SZS v2.41b --- project/dclib/dclib-debug.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'project/dclib/dclib-debug.h') diff --git a/project/dclib/dclib-debug.h b/project/dclib/dclib-debug.h index b10c1b8..9b41751 100644 --- a/project/dclib/dclib-debug.h +++ b/project/dclib/dclib-debug.h @@ -287,6 +287,10 @@ __attribute__ ((__format__(__printf__,1,2))); // xTRACELINE // xBINGO // +// The macros with a preceding 'y' are active if enable_ydebug>0: +// yTRACELINE +// yBINGO +// /////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////// @@ -487,6 +491,7 @@ void WAIT_ARG_FUNC ( ccp format, va_list arg ); #undef BINGOD #undef xBINGO +#undef YBINGO #undef PRINT_TIME // always disabled @@ -544,6 +549,10 @@ void WAIT_ARG_FUNC ( ccp format, va_list arg ); #define xBINGO BINGO_FUNC(__FUNCTION__,__LINE__,__FILE__) #define xTRACELINE TRACE_FUNC("%s() line #%d @ %s\n",__FUNCTION__,__LINE__,__FILE__) +extern int enable_ydebug; +#define yBINGO if (enable_ydebug) BINGO_FUNC(__FUNCTION__,__LINE__,__FILE__) +#define yTRACELINE f (enable_ydebug) TRACE_FUNC("%s() line #%d @ %s\n",__FUNCTION__,__LINE__,__FILE__) + #undef PRINTF #define PRINTF PRINT -- cgit v1.3.1