Commit | Line | Data |
---|---|---|
c9987f3b LM |
1 | #ifndef __DEBUG_H__ |
2 | #define __DEBUG_H__ | |
3 | ||
4 | /* constants */ | |
5 | ||
c9987f3b LM |
6 | #define DEBUG 4 |
7 | #define INFO 3 | |
8 | #define WARNING 2 | |
9 | #define ERROR 1 | |
10 | ||
11 | /* macros */ | |
12 | ||
13 | #define CEIL(x, y) (((x) + (y) - 1) / (y)) | |
14 | #define MIN(x, y) (((x) < (y)) ? (x) : (y)) | |
15 | #define MAX(x, y) (((x) > (y)) ? (x) : (y)) | |
16 | #define VERBOSE(level, statement...) do { if (level <= verbose) { statement; } } while(0) | |
c9987f3b LM |
17 | |
18 | /* gobal variables */ | |
19 | ||
20 | extern int verbose; | |
21 | ||
22 | #endif /* __DEBUG_H__ */ | |
23 | ||
5f83300c | 24 | /* vim: set ts=4 sw=4 et */ |