# HG changeset patch # User meillo@marmaro.de # Date 1234797505 -3600 # Node ID 7ea91d4d0882b22580ba58c27314b76071ed7373 # Parent 3835ddb75a55efd8c62fee051b854395f2cfd28e rename eprint() -> die() diff -r 3835ddb75a55 -r 7ea91d4d0882 aewl.c --- 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();