debug.h revision ca233087ebca08c826cc9f43f6ac01d6ff94243c
1#ifndef _DEBUG_H
2#define _DEBUG_H
3
4#include <features.h>
5
6/* debug levels:
7 */
8enum {
9	DEBUG_EVENT    = 010,
10	DEBUG_PROCESS  = 020,
11	DEBUG_FUNCTION = 040
12};
13
14void debug_(int level, const char *file, int line,
15		const char *fmt, ...) __attribute__((format(printf,4,5)));
16
17int xinfdump(long, void *, int);
18
19# define debug(level, expr...) debug_(level, __FILE__, __LINE__, expr)
20
21#endif
22