summaryrefslogtreecommitdiff
path: root/debug.h
diff options
context:
space:
mode:
Diffstat (limited to 'debug.h')
-rw-r--r--debug.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/debug.h b/debug.h
index 2e04745..4b67b0a 100644
--- a/debug.h
+++ b/debug.h
@@ -3,6 +3,12 @@
#include <stdio.h>
-#define debug(...) fprintf(stderr, __VA_ARGS__)
+extern int verbose;
+
+#define debug(...) do { \
+ if (verbose) { \
+ fprintf(stderr, __VA_ARGS__); \
+ } \
+} while (0)
#endif /* DEBUG_H */