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