fix types
[compress.git] / debug.h
1 #ifndef __DEBUG_H__
2 #define __DEBUG_H__
3
4 /* constants */
5
6 #define COMPRESS 1
7 #define DECOMPRESS 2
8
9 #define NB_CHARS 256
10 #define BUFFER_SIZE 4096
11
12 #define DEBUG 4
13 #define INFO 3
14 #define WARNING 2
15 #define ERROR 1
16
17 /* macros */
18
19 #define CEIL(x, y) (((x) + (y) - 1) / (y))
20 #define MIN(x, y) (((x) < (y)) ? (x) : (y))
21 #define MAX(x, y) (((x) > (y)) ? (x) : (y))
22 #define VERBOSE(level, statement...) do { if (level <= verbose) { statement; } } while(0)
23 #define PRINTF(args...) do { fprintf (stdout, args); fflush (stdout); } while (0)
24
25 /* gobal variables */
26
27 extern int verbose;
28
29 #endif /* __DEBUG_H__ */
30
31 // vim: ts=4 sw=4 et