summaryrefslogtreecommitdiff
path: root/dwm/util.h
diff options
context:
space:
mode:
authorauric <auric7@protonmail.com>2025-09-07 16:09:42 -0500
committerauric <auric7@protonmail.com>2025-09-07 16:09:42 -0500
commitb59b8b8e5d16af7f0daccb280a4991e3fe428e41 (patch)
tree96ed0e580730ab6315e9322e2bb2933c9f5c8097 /dwm/util.h
Add files
Diffstat (limited to 'dwm/util.h')
-rw-r--r--dwm/util.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/dwm/util.h b/dwm/util.h
new file mode 100644
index 0000000..c0a50d4
--- /dev/null
+++ b/dwm/util.h
@@ -0,0 +1,9 @@
+/* See LICENSE file for copyright and license details. */
+
+#define MAX(A, B) ((A) > (B) ? (A) : (B))
+#define MIN(A, B) ((A) < (B) ? (A) : (B))
+#define BETWEEN(X, A, B) ((A) <= (X) && (X) <= (B))
+#define LENGTH(X) (sizeof (X) / sizeof (X)[0])
+
+void die(const char *fmt, ...);
+void *ecalloc(size_t nmemb, size_t size);