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!

ref.
https://git.suckless.org/dwm/commit/8933ebcf50024f4378a78e556b1ac08091197206.html#h0-1
This commit is contained in:
bakkeby
2024-10-29 22:15:32 +01:00
parent 36cbcf53a2
commit 8ae6f04654
3 changed files with 91 additions and 77 deletions

1
util.h
View File

@@ -7,6 +7,7 @@
#define MIN(A, B) ((A) < (B) ? (A) : (B))
#endif
#define BETWEEN(X, A, B) ((A) <= (X) && (X) <= (B))
#define LENGTH(X) (sizeof (X) / sizeof (X)[0])
#ifdef _DEBUG
#define DEBUG(...) fprintf(stderr, __VA_ARGS__)