summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDevin J. Pohly <djpohly@gmail.com>2020-07-31 09:57:59 -0500
committerDevin J. Pohly <djpohly@gmail.com>2020-07-31 09:57:59 -0500
commit50aa44c59b97c59f08dc482fa9d93bd1dc281ab0 (patch)
treeca7ef4b98e28bbf540d7b2a00b14722f731d895c
parent4e57dbd9223c647ece506f5f1fc1465802c13c85 (diff)
add tag bitset check from dwm
-rw-r--r--dwl.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/dwl.c b/dwl.c
index 3cacba3..f0c599b 100644
--- a/dwl.c
+++ b/dwl.c
@@ -274,6 +274,9 @@ static struct wl_listener xwayland_ready = {.notify = xwaylandready};
/* configuration, allows nested code to access above variables */
#include "config.h"
+/* compile-time check if all tags fit into an unsigned int bit array. */
+struct NumTags { char limitexceeded[LENGTH(tags) > 31 ? -1 : 1]; };
+
/* function implementations */
void
activatex11(struct wl_listener *listener, void *data)