swm

sigma window manager
git clone git://wolog.xyz/swm
Log | Files | Refs | README | LICENSE

commit 6372b62739ff4eeb2b77fa0e66a502a66664e84f
parent 7eda6bc5045a5d3843723c88d88f31ce4bae7ee2
Author: Raymond Cole <rc@wolog.xyz>
Date:   Wed, 30 Oct 2024 15:26:33 +0000

Move LENGTH() to util.h

Diffstat:
Mbar.c | 1-
Mclient.c | 1-
Mconfig.c | 1-
Mevt.c | 1-
Mlyt.c | 1-
Mmain.c | 1-
Mmisc.c | 1-
Mmonitor.c | 1-
Mswm.h | 3+--
Mutil.h | 1+
10 files changed, 2 insertions(+), 10 deletions(-)

diff --git a/bar.c b/bar.c @@ -23,7 +23,6 @@ #include "drw.h" #include "swm.h" -#include "util.h" #define TEXTW(X) (drw_fontset_getwidth(drw, (X)) + lrpad) diff --git a/client.c b/client.c @@ -16,7 +16,6 @@ #include <X11/Xutil.h> #include "swm.h" -#include "util.h" static char *gettitle(Client *c, Atom atom); static Atom getatomprop(Client *c, Atom prop); diff --git a/config.c b/config.c @@ -18,7 +18,6 @@ #include <X11/Xutil.h> #include "swm.h" -#include "util.h" #define ARGV(...) ((char **)(const char *[]){__VA_ARGS__, NULL}) #define SPAWN(...) spawn(ARGV(__VA_ARGS__)) diff --git a/evt.c b/evt.c @@ -14,7 +14,6 @@ #include <X11/Xutil.h> #include "swm.h" -#include "util.h" static void clientmessage(XEvent *e); static void configurenotify(XEvent *e); diff --git a/lyt.c b/lyt.c @@ -16,7 +16,6 @@ #include <X11/Xlib.h> #include "swm.h" -#include "util.h" enum { W, H, X, Y }; diff --git a/main.c b/main.c @@ -24,7 +24,6 @@ #include <X11/Xutil.h> #include "swm.h" -#include "util.h" extern char **environ; diff --git a/misc.c b/misc.c @@ -17,7 +17,6 @@ #include <X11/Xlib.h> #include "swm.h" -#include "util.h" #define MOUSEMASK (ButtonPressMask|ButtonReleaseMask|PointerMotionMask) diff --git a/monitor.c b/monitor.c @@ -16,7 +16,6 @@ #endif #include "swm.h" -#include "util.h" static Monitor *createmon(void); static void cleanupmon(Monitor *mon); diff --git a/swm.h b/swm.h @@ -11,8 +11,7 @@ */ #include "config.h" - -#define LENGTH(X) (sizeof(X) / sizeof(X[0])) +#include "util.h" #define ISVISIBLE(C) ((C)->tags & (C)->mon->tagset) diff --git a/util.h b/util.h @@ -13,6 +13,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]) #ifdef va_arg void vwarn(const char *fmt, va_list ap);