aboutsummaryrefslogtreecommitdiff
path: root/src/include/util.h
diff options
context:
space:
mode:
authorc2024-03-09 11:01:23 -0500
committerc2024-03-09 11:01:23 -0500
commit099fd363f7972ad7e1c48f5fd9ab83aa38a40ea2 (patch)
tree7a2b81f5fba6630ec5d1da469135539007c16f3c /src/include/util.h
parent9a7e88e33213135da7c8fa3607ca455d997f4a39 (diff)
Introduced mortality.
Diffstat (limited to 'src/include/util.h')
-rw-r--r--src/include/util.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/include/util.h b/src/include/util.h
index 08654fd..60db492 100644
--- a/src/include/util.h
+++ b/src/include/util.h
@@ -21,6 +21,8 @@
/* Call `f` on `x` if `x` exists. */
#define EDO(f, x) HIDE(if (x) {f(x);})
+#ifdef DBG
+
/* Log some debug information. */
#define LOG_DBGF(fmt, ...) HIDE( \
fprintf(stderr, "\x1b[37m[\x1b[95;1m==\x1b[0m\x1b[37m]\x1b[0m\x1b[35m "); \
@@ -36,6 +38,13 @@
fprintf(stderr, "\x1b[0m\n"); \
)
+#else // ifdef DBG
+
+#define LOG_DBGF(fmt, ...);
+#define LOG_DBG(body);
+
+#endif // ifdef DBG
+
/* c: */
#define LOG_YAYF(fmt, ...) HIDE( \
fprintf(stderr, "\x1b[37m[\x1b[92;1m==\x1b[0m\x1b[37m]\x1b[32m "); \