changeset 773:d2e56ce18f5b

remove static since its only one source file now; removed empty lines
author meillo@marmaro.de
date Sat, 06 Dec 2008 11:28:48 +0100 (2008-12-06)
parents 0c1e9952a278
children c7e8fe5ac881
files aewl.c
diffstat 1 files changed, 34 insertions(+), 137 deletions(-) [+]
line wrap: on
line diff
--- a/aewl.c	Sat Dec 06 11:15:51 2008 +0100
+++ b/aewl.c	Sat Dec 06 11:28:48 2008 +0100
@@ -148,12 +148,7 @@
 static unsigned int len = 0;
 
 
-RULES
-KEYS
 
-
-
-/* client.c */
 void configure(Client *c);		/* send synthetic configure event */
 void focus(Client *c);			/* focus c, c may be NULL */
 Client *getclient(Window w);		/* return client of w */
@@ -164,36 +159,29 @@
 void updatetitle(Client *c);		/* update the name of c */
 void unmanage(Client *c);		/* destroy c */
 
-/* draw.c */
 void drawstatus(void);			/* draw the bar */
 unsigned long getcolor(const char *colstr);	/* return color of colstr */
 void setfont(const char *fontstr);	/* set the font for DC */
 unsigned int textw(const char *text);	/* return the width of text in px*/
 
-/* event.c */
 void grabkeys(void);			/* grab all keys defined in config.h */
 void procevent(void);			/* process pending X events */
 
-/* main.c */
 void sendevent(Window w, Atom a, long value);	/* send synthetic event to w */
 int xerror(Display *dsply, XErrorEvent *ee);	/* X error handler */
 
-/* tag.c */
 Client *getnext(Client *c);		/* returns next visible client */
 void settag(Client *c, Client *trans);	/* sets tag of c */
 
-/* util.c */
 void *emallocz(unsigned int size);	/* allocates zero-initialized memory, exits on error */
 void eprint(const char *errstr, ...);	/* prints errstr and exits with 1 */
 
-/* view.c */
 void detach(Client *c);			/* detaches c from global client list */
 void dotile(void);			/* arranges all windows tiled */
 void domax(void);            /* arranges all windows fullscreen */
 Bool isvisible(Client *c);		/* returns True if client is visible */
 void restack(void);			/* restores z layers of all clients */
 
-
 void toggleview(void);			/* toggle the view */
 void focusnext(void);		/* focuses next visible client  */
 void zoom(void);			/* zooms the focused client to master area */
@@ -208,6 +196,10 @@
 
 
 
+RULES
+KEYS
+
+
 
 
 
@@ -216,15 +208,14 @@
 
 
 /* from view.c */
-/* static */
 
-static Client *
+Client *
 nexttiled(Client *c) {
 	for(c = getnext(c); c && c->isfloat; c = getnext(c->next));
 	return c;
 }
 
-static void
+void
 togglemax(Client *c) {
 	XEvent ev;
 		
@@ -252,7 +243,6 @@
 
 
 
-void (*arrange)(void) = DEFMODE;
 
 void
 detach(Client *c) {
@@ -455,24 +445,8 @@
 	arrange();
 }
 
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
 /* from util.c */
 
-
 void *
 emallocz(unsigned int size) {
 	void *res = calloc(1, size);
@@ -516,22 +490,8 @@
 	wait(0);
 }
 
-
-
-
-
-
-
-
-
-
-
-
-
 /* from tag.c */
 
-/* static */
-
 Client *
 getnext(Client *c) {
 	while(c && !isvisible(c)) {
@@ -581,22 +541,9 @@
 	toggleview();
 }
 
-
-
-
-
-
-
-
+/* from event.c */
 
-
-
-/* from event.c */
-/* static */
-
-
-
-static void
+void
 movemouse(Client *c) {
 	int x1, y1, ocx, ocy, di;
 	unsigned int dui;
@@ -640,7 +587,7 @@
 	}
 }
 
-static void
+void
 resizemouse(Client *c) {
 	int ocx, ocy;
 	int nw, nh;
@@ -677,7 +624,7 @@
 	}
 }
 
-static void
+void
 buttonpress(XEvent *e) {
 	Client *c;
 	XButtonPressedEvent *ev = &e->xbutton;
@@ -699,7 +646,7 @@
 	}
 }
 
-static void
+void
 configurerequest(XEvent *e) {
 	unsigned long newmask;
 	Client *c;
@@ -748,7 +695,7 @@
 	}
 }
 
-static void
+void
 destroynotify(XEvent *e) {
 	Client *c;
 	XDestroyWindowEvent *ev = &e->xdestroywindow;
@@ -757,7 +704,7 @@
 		unmanage(c);
 }
 
-static void
+void
 enternotify(XEvent *e) {
 	Client *c;
 	XCrossingEvent *ev = &e->xcrossing;
@@ -773,7 +720,7 @@
 	}
 }
 
-static void
+void
 expose(XEvent *e) {
 	XExposeEvent *ev = &e->xexpose;
 
@@ -783,7 +730,7 @@
 	}
 }
 
-static void
+void
 keypress(XEvent *e) {
 	static unsigned int len = sizeof key / sizeof key[0];
 	unsigned int i;
@@ -799,7 +746,7 @@
 	}
 }
 
-static void
+void
 leavenotify(XEvent *e) {
 	XCrossingEvent *ev = &e->xcrossing;
 
@@ -809,7 +756,7 @@
 	}
 }
 
-static void
+void
 mappingnotify(XEvent *e) {
 	XMappingEvent *ev = &e->xmapping;
 
@@ -818,7 +765,7 @@
 		grabkeys();
 }
 
-static void
+void
 maprequest(XEvent *e) {
 	static XWindowAttributes wa;
 	XMapRequestEvent *ev = &e->xmaprequest;
@@ -834,7 +781,7 @@
 		manage(ev->window, &wa);
 }
 
-static void
+void
 propertynotify(XEvent *e) {
 	Client *c;
 	Window trans;
@@ -862,7 +809,7 @@
 	}
 }
 
-static void
+void
 unmapnotify(XEvent *e) {
 	Client *c;
 	XUnmapEvent *ev = &e->xunmap;
@@ -918,24 +865,9 @@
 	}
 }
 
-
-
-
-
-
-
-
-
+/* from draw.c */
 
-
-
-
-
-
-/* from draw.c */
-/* static */
-
-static unsigned int
+unsigned int
 textnw(const char *text, unsigned int len) {
 	XRectangle r;
 
@@ -946,7 +878,7 @@
 	return XTextWidth(dc.font.xfont, text, len);
 }
 
-static void
+void
 drawtext(const char *text, unsigned long col[ColLast]) {
 	int x, y, w, h;
 	static char buf[256];
@@ -991,8 +923,6 @@
 	}
 }
 
-
-
 void
 drawstatus(void) {
 	int x;
@@ -1096,27 +1026,16 @@
 	return textnw(text, strlen(text)) + dc.font.height;
 }
 
-
-
-
-
-
-
+/* from client.c */
 
-
-
-
-/* from client.c */
-/* static */
-
-static void
+void
 detachstack(Client *c) {
 	Client **tc;
 	for(tc=&stack; *tc && *tc != c; tc=&(*tc)->snext);
 	*tc = c->snext;
 }
 
-static void
+void
 grabbuttons(Client *c, Bool focused) {
 	XUngrabButton(dpy, AnyButton, AnyModifier, c->win);
 
@@ -1153,20 +1072,18 @@
 	}
 }
 
-static void
+void
 setclientstate(Client *c, long state) {
 	long data[] = {state, None};
 	XChangeProperty(dpy, c->win, wmatom[WMState], wmatom[WMState], 32,
 			PropModeReplace, (unsigned char *)data, 2);
 }
 
-static int
+int
 xerrordummy(Display *dsply, XErrorEvent *ee) {
 	return 0;
 }
 
-
-
 void
 configure(Client *c) {
 	XEvent synev;
@@ -1453,28 +1370,9 @@
 	arrange();
 }
 
-
-
-
-
-
-
-
-
-
-
+/* from main.c */
 
-
-
-
-
-
-
-
-/* static */
-
-
-static void
+void
 cleanup(void) {
 	close(STDIN_FILENO);
 	while(stack) {
@@ -1496,7 +1394,7 @@
 	XSync(dpy, False);
 }
 
-static void
+void
 scan(void) {
 	unsigned int i, num;
 	Window *wins, d1, d2;
@@ -1517,7 +1415,7 @@
 		XFree(wins);
 }
 
-static void
+void
 setup(void) {
 	int i, j;
 	unsigned int mask;
@@ -1565,6 +1463,7 @@
 	sw = DisplayWidth(dpy, screen);
 	sh = DisplayHeight(dpy, screen);
 	nmaster = NMASTER;
+	arrange = DEFMODE;
 	/* bar */
 	dc.h = bh = dc.font.height + 2;
 	wa.override_redirect = 1;
@@ -1593,14 +1492,12 @@
  * Startup Error handler to check if another window manager
  * is already running.
  */
-static int
+int
 xerrorstart(Display *dsply, XErrorEvent *ee) {
 	otherwm = True;
 	return -1;
 }
 
-
-
 void
 sendevent(Window w, Atom a, long value) {
 	XEvent e;