raised the debug level required for messaging out
| author |
Yoshiki Yazawa <yaz@honeyplanet.jp> |
| date |
Wed, 05 Jan 2011 22:31:47 +0900 |
| parents |
b16b82dbfe87 |
| children |
37e662c427a1 |
| rev |
line source |
|
2
|
1 #ifndef __RCCTL_DEBUG_H__
|
|
|
2 #define __RCCTL_DEBUG_H__
|
|
|
3
|
|
|
4 extern int debug;
|
|
|
5
|
|
|
6 /* print debug message if specified level is greater enough */
|
|
|
7 #define debug(level, fmt, ...) \
|
|
|
8 do { \
|
|
|
9 if(debug >= level) { \
|
|
|
10 fprintf(stderr, "%s: %s():%4d: " fmt, __FILE__, __FUNCTION__, (int) __LINE__, ## __VA_ARGS__); \
|
|
|
11 } \
|
|
|
12 } while(0);
|
|
|
13
|
|
|
14 #endif
|