aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2024-04-22 19:22:38 +0200
committerThomas Voss <mail@thomasvoss.com> 2024-04-22 19:23:02 +0200
commit8135b1fefb0adf85fcabfd74dbca3516d8665450 (patch)
tree3336df733bde1823f20a3d944545f8e372768e6b
parent18fe83b030af00c6e51b33a1ae70509093038743 (diff)
Add TODO() macro
-rw-r--r--README1
-rw-r--r--include/macros.h2
2 files changed, 3 insertions, 0 deletions
diff --git a/README b/README
index 9683f47..fc6e5de 100644
--- a/README
+++ b/README
@@ -78,6 +78,7 @@ FEATURES:
• Functions for printing diagnostics and optionally crashing with
strerror() support
• macros.h
+ • TODO()
• MIN()/MAX()/CLAMP()
• Better assertion macro
• More readable strcmp()/memcmp()/etc. wrappers for equality checking
diff --git a/include/macros.h b/include/macros.h
index 4a8108e..61f7ca3 100644
--- a/include/macros.h
+++ b/include/macros.h
@@ -11,6 +11,8 @@
#define streq(...) (!strcmp(__VA_ARGS__))
#define u8eq(...) (!u8cmp(__VA_ARGS__))
+#define TODO(s) err("%s:%s:%d: todo: %s", __FILE__, __func__, __LINE__, s)
+
#ifdef NDEBUG
# include <stddef.h>
# define ASSUME(p) ((p) ? (void)0 : unreachable())