Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/orxonox/trunk/src/debug.h @ 3274

Last change on this file since 3274 was 3212, checked in by bensch, 20 years ago

orxonox/trunk: nicer debug.h

File size: 849 bytes
RevLine 
[3204]1#ifndef _DEBUG_H
2#define _DEBUG_H
3
4#ifdef  DEBUG
[3205]5#define PRINTF(x) \
6           PRINTF ## x
7
8#if DEBUG >= 1
9#define PRINTF1 \
10    if (verbose >= 1 ) \
[3212]11      printf("%s:%d::", __FILE__, __LINE__) && printf
[3205]12#else
[3206]13#define PRINTF1 //
[3205]14#endif
15     
16#if DEBUG >= 2
17#define PRINTF2 \
18     if (verbose >= 2 ) \
[3212]19       printf("%s:%d::", __FILE__, __LINE__) && printf
[3206]20         
[3205]21#else
[3206]22#define PRINTF2 //
[3205]23#endif
24     
25#if DEBUG >= 3
26#define PRINTF3 \
27     if (verbose >= 3 ) \
[3212]28       printf("%s:%d::", __FILE__, __LINE__) && printf
[3205]29#else
[3206]30#define PRINTF3 //
[3205]31#endif
32     
33#if DEBUG >= 4
34#define PRINTF4 \
35     if (verbose >= 4 ) \
[3212]36       printf("%s:%d::", __FILE__, __LINE__) && printf
[3205]37#else
[3206]38#define PRINTF4 //
[3205]39#endif
40     
41     
[3204]42#else 
[3206]43#define PRINTF(x) //
[3204]44#endif
45
[3206]46#define PRINTF0 \
[3212]47    printf("%s:%d::", __FILE__, __LINE__) && printf
[3204]48
49#endif /* _DEBUG_H */
Note: See TracBrowser for help on using the repository browser.