main.c
changeset 76 4bd49f404f10
parent 75 f08271b7cb20
child 77 38c8f7f7d401
--- a/main.c	Sat Jul 15 16:30:50 2006 +0200
+++ b/main.c	Sat Jul 15 17:00:56 2006 +0200
@@ -3,31 +3,17 @@
  * See LICENSE file for license details.
  */
 
+#include "dwm.h"
+
 #include <errno.h>
-#include <stdarg.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
-
 #include <X11/cursorfont.h>
 #include <X11/Xatom.h>
 #include <X11/Xproto.h>
 
-#include "dwm.h"
-
-/********** CUSTOMIZE **********/
-
-char *tags[TLast] = {
-	[Tscratch] = "scratch",
-	[Tdev] = "dev",
-	[Twww] = "www",
-	[Twork] = "work",
-};
-
-/********** CUSTOMIZE **********/
-
-/* X structs */
 Display *dpy;
 Window root, barwin;
 Atom wm_atom[WMLast], net_atom[NetLast];
@@ -48,8 +34,17 @@
 	"dwm-" VERSION ", (C)opyright MMVI Anselm R. Garbe\n";
 static int (*xerrorxlib)(Display *, XErrorEvent *);
 
+/* static functions */
+
 static void
-usage() {	eprint("usage: dwm [-v]\n"); }
+cleanup()
+{
+	while(sel) {
+		resize(sel, True);
+		unmanage(sel);
+	}
+	XSetInputFocus(dpy, PointerRoot, RevertToPointerRoot, CurrentTime);
+}
 
 static void
 scan()
@@ -73,22 +68,6 @@
 		XFree(wins);
 }
 
-static void
-cleanup()
-{
-	while(sel) {
-		resize(sel, True);
-		unmanage(sel);
-	}
-	XSetInputFocus(dpy, PointerRoot, RevertToPointerRoot, CurrentTime);
-}
-
-void
-quit(Arg *arg)
-{
-	running = False;
-}
-
 static int
 win_property(Window w, Atom a, Atom t, long l, unsigned char **prop)
 {
@@ -109,6 +88,19 @@
 	return res;
 }
 
+/*
+ * Startup Error handler to check if another window manager
+ * is already running.
+ */
+static int
+xerrorstart(Display *dsply, XErrorEvent *ee)
+{
+	otherwm = True;
+	return -1;
+}
+
+/* extern functions */
+
 int
 getproto(Window w)
 {
@@ -144,15 +136,10 @@
 	XFlush(dpy);
 }
 
-/*
- * Startup Error handler to check if another window manager
- * is already running.
- */
-static int
-xerrorstart(Display *dsply, XErrorEvent *ee)
+void
+quit(Arg *arg)
 {
-	otherwm = True;
-	return -1;
+	running = False;
 }
 
 /*
@@ -201,7 +188,7 @@
 			exit(0);
 			break;
 		default:
-			usage();
+			eprint("usage: dwm [-v]\n");
 			break;
 		}
 	}