W
William.Joseph.Batson
Hi,
I found the following c++ code, but I need help in understand what it
is trying to do:
if the caller does this
DPRINTF(D_MINI_FS, ("CHXMiniFileSystem()\n"));
what will happen according to the following macro?
extern void dprintf( const char *, ... )
#ifdef __GNUC__
__attribute__((format(printf,1,2)))
#endif /* __GNUC__ */
;
extern void dprintfx( const char *, ... )
#ifdef __GNUC__
__attribute__((format(printf,1,2)))
#endif /* __GNUC__ */
;
#ifdef DEVEL_DEBUG
#define DPRINTF(mask,x) if (debug_level() & (mask)) { \
dprintf("%s:%d ", __FILE__, __LINE__); dprintfx x; } else
#else
#define DPRINTF(mask,x) if (debug_level() & (mask)) dprintf x; else
#endif /* DEVEL_DEBUG */
I found the following c++ code, but I need help in understand what it
is trying to do:
if the caller does this
DPRINTF(D_MINI_FS, ("CHXMiniFileSystem()\n"));
what will happen according to the following macro?
extern void dprintf( const char *, ... )
#ifdef __GNUC__
__attribute__((format(printf,1,2)))
#endif /* __GNUC__ */
;
extern void dprintfx( const char *, ... )
#ifdef __GNUC__
__attribute__((format(printf,1,2)))
#endif /* __GNUC__ */
;
#ifdef DEVEL_DEBUG
#define DPRINTF(mask,x) if (debug_level() & (mask)) { \
dprintf("%s:%d ", __FILE__, __LINE__); dprintfx x; } else
#else
#define DPRINTF(mask,x) if (debug_level() & (mask)) dprintf x; else
#endif /* DEVEL_DEBUG */