changeset 778:7ea91d4d0882

rename eprint() -> die()
author meillo@marmaro.de
date Mon, 16 Feb 2009 16:18:25 +0100 (2009-02-16)
parents 3835ddb75a55
children 6f7f86762e0e
files aewl.c
diffstat 1 files changed, 8 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/aewl.c	Mon Feb 16 10:40:57 2009 +0100
+++ b/aewl.c	Mon Feb 16 16:18:25 2009 +0100
@@ -170,7 +170,7 @@
 void settag(Client *c, Client *trans);	/* sets tag of c */
 
 void *emallocz(unsigned int size);	/* allocates zero-initialized memory, exits on error */
-void eprint(const char *errstr, ...);	/* prints errstr and exits with 1 */
+void die(const char *errstr, ...);	/* prints errstr and exits with 1 */
 
 void detach(Client *c);			/* detaches c from global client list */
 void dotile(void);			/* arranges all windows tiled */
@@ -444,12 +444,12 @@
 	void *res = calloc(1, size);
 
 	if(!res)
-		eprint("fatal: could not malloc() %u bytes\n", size);
+		die("fatal: could not malloc() %u bytes\n", size);
 	return res;
 }
 
 void
-eprint(const char *errstr, ...) {
+die(const char *errstr, ...) {
 	va_list ap;
 
 	va_start(ap, errstr);
@@ -960,7 +960,7 @@
 	XColor color;
 
 	if(!XAllocNamedColor(dpy, cmap, colstr, &color, &color))
-		eprint("error, cannot allocate color '%s'\n", colstr);
+		die("error, cannot allocate color '%s'\n", colstr);
 	return color.pixel;
 }
 
@@ -997,7 +997,7 @@
 			XFreeFont(dpy, dc.font.xfont);
 		dc.font.xfont = NULL;
 		if(!(dc.font.xfont = XLoadQueryFont(dpy, fontstr)))
-			eprint("error, cannot load font: '%s'\n", fontstr);
+			die("error, cannot load font: '%s'\n", fontstr);
 		dc.font.ascent = dc.font.xfont->ascent;
 		dc.font.descent = dc.font.xfont->descent;
 	}
@@ -1469,7 +1469,6 @@
 			CWOverrideRedirect | CWBackPixmap | CWEventMask, &wa);
 	XDefineCursor(dpy, barwin, cursor[CurNormal]);
 	XMapRaised(dpy, barwin);
-	strcpy(stext, "aewl-"VERSION);
 	/* windowarea */
 	wax = sx;
 	way = sy + bh;
@@ -1542,7 +1541,7 @@
 	XSelectInput(dpy, DefaultRootWindow(dpy), SubstructureRedirectMask);
 	XSync(dpy, False);
 	if(otherwm) {
-		eprint("aewl: another window manager is already running\n");
+		die("aewl: another window manager is already running\n");
 	}
 
 	XSetErrorHandler(xerror);
@@ -1578,12 +1577,12 @@
 		fputs("forked off dwm-3.4, (C)opyright MMVI-MMVII Anselm R. Garbe\n", stdout);
 		exit(EXIT_SUCCESS);
 	} else if(argc != 1) {
-		eprint("usage: aewl [-v]\n");
+		die("usage: aewl [-v]\n");
 	}
 	setlocale(LC_CTYPE, "");
 	dpy = XOpenDisplay(0);
 	if(!dpy) {
-		eprint("aewl: cannot open display\n");
+		die("aewl: cannot open display\n");
 	}
 
 	checkotherwm();