aboutsummaryrefslogtreecommitdiff
path: root/dmenu/util.h
diff options
context:
space:
mode:
authorpml68 <tutorialmester@gmail.com>2023-12-27 00:46:22 +0100
committerpml68 <tutorialmester@gmail.com>2023-12-27 00:46:22 +0100
commitf9a968b6818c858d15f459ab9e8315b6df56952a (patch)
tree97f19f54e5fbc2be7c987edadd1a681cb52de015 /dmenu/util.h
downloadsuckless-setup-f9a968b6818c858d15f459ab9e8315b6df56952a.tar.gz
Initial commit
Diffstat (limited to 'dmenu/util.h')
-rw-r--r--dmenu/util.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/dmenu/util.h b/dmenu/util.h
new file mode 100644
index 0000000..c0a50d4
--- /dev/null
+++ b/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);