kmalloc: Avoid code duplication.
[dragonfly.git] / usr.bin / evtranalyze / trivial.h
blob50d3f9df29d3991fab89d5a72ba6385f4d188cc8
1 #ifndef TRIVIAL_H
2 #define TRIVIAL_H
4 #define DEFINE_DEBUG_FLAG(nam, chr)\
5 nam = 1 << (chr - 'a')
7 enum debug_flags {
8 DEFINE_DEBUG_FLAG(INTV, 'i'),
9 DEFINE_DEBUG_FLAG(SVG, 's'),
10 DEFINE_DEBUG_FLAG(MISC, 'm'),
11 DEFINE_DEBUG_FLAG(PLOT, 'p'),
14 #define printd(subsys, ...) \
15 do { \
16 if (evtranalyze_debug & (subsys)) { \
17 fprintf(stderr, __VA_ARGS__); \
18 } \
19 } while (0)
21 extern unsigned evtranalyze_debug;
23 #endif /* TRIVIAL_H */