1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
#ifndef IVY_DEBUG_H
#define IVY_DEBUG_H
#ifdef WIN32
#ifdef DEBUG
#define TRACE(format,...) \
fprintf (stderr, format , __VA_ARGS__ )
#define TRACE_IF( cond, format, ...) \
if ( cond ) fprintf (stderr, format , __VA_ARGS__ )
#else
#define TRACE(format, ...) /**/
#define TRACE_IF( cond, format, ...) /**/
#endif
#else
#ifdef DEBUG
#include <stdio.h>
#define TRACE(format, args...) \
fprintf (stderr, format , ## args)
#define TRACE_IF( cond, format, args...) \
if ( cond ) fprintf (stderr, format , ## args)
#else
#define TRACE(format, args...) /**/
#define TRACE_IF( cond, format, args...) /**/
#endif
#endif
#endif
|