move util.c to util.h

This allows single-source compilation and whole-program optimization using something like:

make CFLAGS='-flto -ffunction-sections -fdata-sections -Wl,--gc-sections'

Furthermore, move more compositor-agnostic utility functions/macros to util.h,
similar to the original dwm sources.
This commit is contained in:
Siva Mahadevan
2026-09-09 09:37:07 -04:00
parent 21be76ac80
commit 7fb20244c6
5 changed files with 61 additions and 69 deletions
+1 -1
View File
@@ -10,7 +10,7 @@ primarily in terms of functionality, and secondarily in terms of
philosophy. Like [dwm], dwl is:
- Easy to understand, hack on, and extend with patches
- One C source file (or a very small number) configurable via `config.h`
- One C source file configurable via `config.h`
- Tied to as few external dependencies as possible
## Getting Started: