aewl

changeset 778:7ea91d4d0882

rename eprint() -> die()
author meillo@marmaro.de
date Mon, 16 Feb 2009 16:18:25 +0100
parents 3835ddb75a55
children 6f7f86762e0e
files aewl.c
diffstat 1 files changed, 8 insertions(+), 9 deletions(-) [+]
line diff
     1.1 --- a/aewl.c	Mon Feb 16 10:40:57 2009 +0100
     1.2 +++ b/aewl.c	Mon Feb 16 16:18:25 2009 +0100
     1.3 @@ -170,7 +170,7 @@
     1.4  void settag(Client *c, Client *trans);	/* sets tag of c */
     1.5  
     1.6  void *emallocz(unsigned int size);	/* allocates zero-initialized memory, exits on error */
     1.7 -void eprint(const char *errstr, ...);	/* prints errstr and exits with 1 */
     1.8 +void die(const char *errstr, ...);	/* prints errstr and exits with 1 */
     1.9  
    1.10  void detach(Client *c);			/* detaches c from global client list */
    1.11  void dotile(void);			/* arranges all windows tiled */
    1.12 @@ -444,12 +444,12 @@
    1.13  	void *res = calloc(1, size);
    1.14  
    1.15  	if(!res)
    1.16 -		eprint("fatal: could not malloc() %u bytes\n", size);
    1.17 +		die("fatal: could not malloc() %u bytes\n", size);
    1.18  	return res;
    1.19  }
    1.20  
    1.21  void
    1.22 -eprint(const char *errstr, ...) {
    1.23 +die(const char *errstr, ...) {
    1.24  	va_list ap;
    1.25  
    1.26  	va_start(ap, errstr);
    1.27 @@ -960,7 +960,7 @@
    1.28  	XColor color;
    1.29  
    1.30  	if(!XAllocNamedColor(dpy, cmap, colstr, &color, &color))
    1.31 -		eprint("error, cannot allocate color '%s'\n", colstr);
    1.32 +		die("error, cannot allocate color '%s'\n", colstr);
    1.33  	return color.pixel;
    1.34  }
    1.35  
    1.36 @@ -997,7 +997,7 @@
    1.37  			XFreeFont(dpy, dc.font.xfont);
    1.38  		dc.font.xfont = NULL;
    1.39  		if(!(dc.font.xfont = XLoadQueryFont(dpy, fontstr)))
    1.40 -			eprint("error, cannot load font: '%s'\n", fontstr);
    1.41 +			die("error, cannot load font: '%s'\n", fontstr);
    1.42  		dc.font.ascent = dc.font.xfont->ascent;
    1.43  		dc.font.descent = dc.font.xfont->descent;
    1.44  	}
    1.45 @@ -1469,7 +1469,6 @@
    1.46  			CWOverrideRedirect | CWBackPixmap | CWEventMask, &wa);
    1.47  	XDefineCursor(dpy, barwin, cursor[CurNormal]);
    1.48  	XMapRaised(dpy, barwin);
    1.49 -	strcpy(stext, "aewl-"VERSION);
    1.50  	/* windowarea */
    1.51  	wax = sx;
    1.52  	way = sy + bh;
    1.53 @@ -1542,7 +1541,7 @@
    1.54  	XSelectInput(dpy, DefaultRootWindow(dpy), SubstructureRedirectMask);
    1.55  	XSync(dpy, False);
    1.56  	if(otherwm) {
    1.57 -		eprint("aewl: another window manager is already running\n");
    1.58 +		die("aewl: another window manager is already running\n");
    1.59  	}
    1.60  
    1.61  	XSetErrorHandler(xerror);
    1.62 @@ -1578,12 +1577,12 @@
    1.63  		fputs("forked off dwm-3.4, (C)opyright MMVI-MMVII Anselm R. Garbe\n", stdout);
    1.64  		exit(EXIT_SUCCESS);
    1.65  	} else if(argc != 1) {
    1.66 -		eprint("usage: aewl [-v]\n");
    1.67 +		die("usage: aewl [-v]\n");
    1.68  	}
    1.69  	setlocale(LC_CTYPE, "");
    1.70  	dpy = XOpenDisplay(0);
    1.71  	if(!dpy) {
    1.72 -		eprint("aewl: cannot open display\n");
    1.73 +		die("aewl: cannot open display\n");
    1.74  	}
    1.75  
    1.76  	checkotherwm();