summaryrefslogtreecommitdiffstats
path: root/mdmon.h
diff options
context:
space:
mode:
Diffstat (limited to 'mdmon.h')
-rw-r--r--mdmon.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/mdmon.h b/mdmon.h
index 11320ef..f1b6d76 100644
--- a/mdmon.h
+++ b/mdmon.h
@@ -1,3 +1,10 @@
+#ifdef DEBUG
+#define dprintf(fmt, arg...) \
+ fprintf(stderr, fmt, ##arg)
+#else
+#define dprintf(fmt, arg...) \
+ ({ if (0) fprintf(stderr, fmt, ##arg); 0; })
+#endif
enum array_state { clear, inactive, suspended, readonly, read_auto,
clean, active, write_pending, active_idle, bad_word};