summaryrefslogtreecommitdiff
path: root/src/ivydebug.h
blob: 8c43575048c00534deed94f0db5c96861b49b3ab (plain)
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