aboutsummaryrefslogtreecommitdiff
path: root/chad/experimental/bits.h
diff options
context:
space:
mode:
authoranon2025-09-13 22:40:09 +0200
committeranon2025-09-13 22:40:09 +0200
commitd446b79b0d22e4acc4e1626cf8ab63d09bdc75cd (patch)
treeb4a9a50c6119791f821dee5fa7beee23098aeb71 /chad/experimental/bits.h
parentf2a3da5be94a465db61c865190e5ea7d77c41232 (diff)
downloadlibchad-d446b79b0d22e4acc4e1626cf8ab63d09bdc75cd.tar.xz
libchad-d446b79b0d22e4acc4e1626cf8ab63d09bdc75cd.tar.zst
+QUOTE()
Diffstat (limited to 'chad/experimental/bits.h')
-rw-r--r--chad/experimental/bits.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/chad/experimental/bits.h b/chad/experimental/bits.h
index 6a27a5b..05ed66c 100644
--- a/chad/experimental/bits.h
+++ b/chad/experimental/bits.h
@@ -9,9 +9,17 @@
#define MIN(x, y) (((x) < (y)) ? (x) : (y))
#define MAX(x, y) (((x) > (y)) ? (x) : (y))
+/* Convert argument to a string literal.
+ */
#define _STRINGIFY(...) # __VA_ARGS__
#define STRINGIFY(...) _STRINGIFY(__VA_ARGS__)
+/* Prevent argument from being expended as a macro.
+ * Named after the POSIX shell rule that quoted strings are not checked for aliases.
+ */
+#define EMPTY()
+#define QUOTE(id) id EMPTY()
+
// could be a generic
static inline
long map(