diff --git a/util/util.h b/util/util.h
index 505bdcb465561c8023184feeac40385df866d5b6..363ad72c1ecb7051d1a465aad7fdcc6b6cfb0115 100644 (file)
--- a/util/util.h
+++ b/util/util.h
/* Other utilities..
*/
+extern int debug;
int check_args(int argc, char **argv);
#define FOURCC(a, b, c, d) ((uint32_t)(uint8_t)(a) | ((uint32_t)(uint8_t)(b) << 8) | ((uint32_t)(uint8_t)(c) << 16) | ((uint32_t)(uint8_t)(d) << 24 ))
#define FOURCC_STR(str) FOURCC(str[0], str[1], str[2], str[3])
+/* Dynamic debug. */
+#define DBG(fmt, ...) \
+ do { if (debug) fprintf(stderr, fmt "\n", ##__VA_ARGS__); } while (0)
+
#define MSG(fmt, ...) \
do { fprintf(stderr, fmt "\n", ##__VA_ARGS__); } while (0)
#define ERROR(fmt, ...) \