summaryrefslogtreecommitdiff
path: root/util.h
diff options
context:
space:
mode:
authorHiltjo Posthuma <hiltjo@codemadness.org>2024-10-05 13:01:49 +0200
committerHiltjo Posthuma <hiltjo@codemadness.org>2024-10-05 13:06:08 +0200
commit8933ebcf50024f4378a78e556b1ac08091197206 (patch)
tree5afad27f94d2b0b444a230ba7019ff13aaaa8996 /util.h
parent5687f4696472ba6029bbba18e293e3e8b9e154ea (diff)
sync drw.{c,h} from dmenu
- drw: minor improvement to the nomatches cache - overhaul utf8decoding and render invalid utf8 sequences as U+FFFD. Thanks NRK for these improvements!
Diffstat (limited to 'util.h')
-rw-r--r--util.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/util.h b/util.h
index f633b51..c0a50d4 100644
--- a/util.h
+++ b/util.h
@@ -3,6 +3,7 @@
#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);