changeset 772:0c1e9952a278

naming change from dwm to aewl; cleanups
author meillo@marmaro.de
date Sat, 06 Dec 2008 11:15:51 +0100 (2008-12-06)
parents 59a6f0ba5478
children d2e56ce18f5b
files aewl.c
diffstat 1 files changed, 19 insertions(+), 27 deletions(-) [+]
line wrap: on
line diff
--- a/aewl.c	Sat Dec 06 10:56:43 2008 +0100
+++ b/aewl.c	Sat Dec 06 11:15:51 2008 +0100
@@ -132,26 +132,25 @@
 void (*handler[LASTEvent])(XEvent *);	/* event handler */
 void (*arrange)(void);			/* arrange function, indicates mode  */
 Atom wmatom[WMLast], netatom[NetLast];
-Bool running, selscreen, seltag;
-Client *clients, *sel, *stack;		/* global client list and stack */
+Bool running = True;
+Bool selscreen = True;
+Bool seltag;
+Client* clients = NULL;		/* global client list */
+Client* stack = NULL;		/* global client stack */
+Client* sel = NULL;		/* selected client */
 Cursor cursor[CurLast];
-DC dc;					/* global draw context */
+DC dc = {0};					/* global draw context */
 Display *dpy;
 Window root, barwin;
 
-Bool running = True;
-Bool selscreen = True;
-Client *clients = NULL;
-Client *sel = NULL;
-Client *stack = NULL;
-DC dc = {0};
-
 static int (*xerrorxlib)(Display *, XErrorEvent *);
 static Bool otherwm, readin;
 static unsigned int len = 0;
 
 
 RULES
+KEYS
+
 
 
 /* client.c */
@@ -177,7 +176,7 @@
 
 /* main.c */
 void sendevent(Window w, Atom a, long value);	/* send synthetic event to w */
-int xerror(Display *dsply, XErrorEvent *ee);	/* dwm's X error handler */
+int xerror(Display *dsply, XErrorEvent *ee);	/* X error handler */
 
 /* tag.c */
 Client *getnext(Client *c);		/* returns next visible client */
@@ -199,7 +198,7 @@
 void focusnext(void);		/* focuses next visible client  */
 void zoom(void);			/* zooms the focused client to master area */
 void killclient(void);		/* kill c nicely */
-void quit(void);			/* quit dwm nicely */
+void quit(void);			/* quit nicely */
 void togglemode(void);		/* toggles global arrange function (dotile/domax) */
 void togglefloat(void);		/* toggles focusesd client between floating/non-floating state */
 void incnmaster(void);		/* increments nmaster */
@@ -509,7 +508,7 @@
 				close(ConnectionNumber(dpy));
 			setsid();
 			execl(shell, shell, "-c", cmd, (char *)NULL);
-			fprintf(stderr, "dwm: execl '%s -c %s'", shell, cmd);
+			fprintf(stderr, "aewl: execl '%s -c %s'", shell, cmd);
 			perror(" failed");
 		}
 		exit(0);
@@ -592,17 +591,9 @@
 
 
 
-
-
-
-
-
-
 /* from event.c */
 /* static */
 
-KEYS
-
 
 
 static void
@@ -1584,7 +1575,7 @@
 			CWOverrideRedirect | CWBackPixmap | CWEventMask, &wa);
 	XDefineCursor(dpy, barwin, cursor[CurNormal]);
 	XMapRaised(dpy, barwin);
-	strcpy(stext, "dwm-"VERSION);
+	strcpy(stext, "aewl-"VERSION);
 	/* windowarea */
 	wax = sx;
 	way = sy + bh;
@@ -1644,7 +1635,7 @@
 	|| (ee->request_code == X_GrabKey && ee->error_code == BadAccess)
 	|| (ee->request_code == X_CopyArea && ee->error_code == BadDrawable))
 		return 0;
-	fprintf(stderr, "dwm: fatal error: request code=%d, error code=%d\n",
+	fprintf(stderr, "aewl: fatal error: request code=%d, error code=%d\n",
 		ee->request_code, ee->error_code);
 	return xerrorxlib(dpy, ee); /* may call exit */
 }
@@ -1656,15 +1647,16 @@
 	fd_set rd;
 
 	if(argc == 2 && !strncmp("-v", argv[1], 3)) {
-		fputs("dwm-"VERSION", (C)opyright MMVI-MMVII Anselm R. Garbe\n", stdout);
+		fputs("aewl-"VERSION", Copyright 2008  markus schnalke <meillo@marmaro.de>\n", stdout);
+		fputs("forked off dwm-3.4, (C)opyright MMVI-MMVII Anselm R. Garbe\n", stdout);
 		exit(EXIT_SUCCESS);
 	} else if(argc != 1) {
-		eprint("usage: dwm [-v]\n");
+		eprint("usage: aewl [-v]\n");
 	}
 	setlocale(LC_CTYPE, "");
 	dpy = XOpenDisplay(0);
 	if(!dpy) {
-		eprint("dwm: cannot open display\n");
+		eprint("aewl: cannot open display\n");
 	}
 	xfd = ConnectionNumber(dpy);
 	screen = DefaultScreen(dpy);
@@ -1675,7 +1667,7 @@
 	XSelectInput(dpy, root, SubstructureRedirectMask);
 	XSync(dpy, False);
 	if(otherwm) {
-		eprint("dwm: another window manager is already running\n");
+		eprint("aewl: another window manager is already running\n");
 	}
 
 	XSync(dpy, False);