summaryrefslogtreecommitdiff
path: root/.suckless/dmenu/util.h
diff options
context:
space:
mode:
authorDominic DiTaranto <domdit@gmail.com>2024-08-30 11:58:58 -0400
committerDominic DiTaranto <domdit@gmail.com>2024-08-30 11:58:58 -0400
commitd83125bacfeb7d0119de5e4e9a261f428897acb5 (patch)
tree2261fe07765d81950a0238e2f781ac4a7389a17e /.suckless/dmenu/util.h
init
Diffstat (limited to '.suckless/dmenu/util.h')
-rw-r--r--.suckless/dmenu/util.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/.suckless/dmenu/util.h b/.suckless/dmenu/util.h
new file mode 100644
index 0000000..c0a50d4
--- /dev/null
+++ b/.suckless/dmenu/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);