about summary refs log tree commit diff stats
path: root/dwm.c
diff options
context:
space:
mode:
authorAnselm R Garbe <anselm@garbe.us>2012-12-08 10:13:01 +0100
committerAnselm R Garbe <anselm@garbe.us>2012-12-08 10:13:01 +0100
commitf21d46ea7def76221c4173f644eb2188ae9edbb1 (patch)
treee5b7ad6e3f9c5385544422cbaff7c30453611055 /dwm.c
parentc0ba635c50dc53f06e4fc96392415b3d19b25826 (diff)
downloaddwm-f21d46ea7def76221c4173f644eb2188ae9edbb1.tar.gz
continued with draw.c abstraction, also started util.{h,c} implementation, that will be used by draw.c as well
Diffstat (limited to 'dwm.c')
-rw-r--r--dwm.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/dwm.c b/dwm.c
index 8b67cea..d9443da 100644
--- a/dwm.c
+++ b/dwm.c
@@ -41,6 +41,7 @@
 #endif /* XINERAMA */
 
 #include "draw.h"
+#include "util.h"
 
 /* macros */
 #define BUTTONMASK              (ButtonPressMask|ButtonReleaseMask)
@@ -49,8 +50,6 @@
                                * MAX(0, MIN((y)+(h),(m)->wy+(m)->wh) - MAX((y),(m)->wy)))
 #define ISVISIBLE(C)            ((C->tags & C->mon->tagset[C->mon->seltags]))
 #define LENGTH(X)               (sizeof X / sizeof X[0])
-#define MAX(A, B)               ((A) > (B) ? (A) : (B))
-#define MIN(A, B)               ((A) < (B) ? (A) : (B))
 #define MOUSEMASK               (BUTTONMASK|PointerMotionMask)
 #define WIDTH(X)                ((X)->w + 2 * (X)->bw)
 #define HEIGHT(X)               ((X)->h + 2 * (X)->bw)
@@ -176,7 +175,6 @@ static Monitor *createmon(void);
 static void destroynotify(XEvent *e);
 static void detach(Client *c);
 static void detachstack(Client *c);
-static void die(const char *errstr, ...);
 static Monitor *dirtomon(int dir);
 static void drawbar(Monitor *m);
 static void drawbars(void);
@@ -695,16 +693,6 @@ detachstack(Client *c) {
 	}
 }
 
-void
-die(const char *errstr, ...) {
-	va_list ap;
-
-	va_start(ap, errstr);
-	vfprintf(stderr, errstr, ap);
-	va_end(ap);
-	exit(EXIT_FAILURE);
-}
-
 Monitor *
 dirtomon(int dir) {
 	Monitor *m = NULL;