tordered variables in structs and source files alphabetically - dwm - [fork] cu… | |
git clone git://src.adamsgaard.dk/dwm | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
commit bf357945070a9f4722b8dcbf61d61b34d1aae0aa | |
parent e7438365417ba4bb0cff56b44b029c797be18fe5 | |
Author: Anselm R. Garbe <[email protected]> | |
Date: Mon, 17 Jul 2006 09:12:29 +0200 | |
ordered variables in structs and source files alphabetically | |
Diffstat: | |
M draw.c | 4 ++-- | |
M dwm.h | 38 +++++++++++++++--------------… | |
M dwm.html | 7 +++---- | |
M event.c | 35 +++++++++++++++--------------… | |
M main.c | 38 +++++++++++++++--------------… | |
M tag.c | 21 ++++++++++----------- | |
M util.c | 4 ++-- | |
7 files changed, 70 insertions(+), 77 deletions(-) | |
--- | |
diff --git a/draw.c b/draw.c | |
t@@ -8,7 +8,7 @@ | |
#include <string.h> | |
#include <X11/Xlocale.h> | |
-/* static functions */ | |
+/* static */ | |
static void | |
drawborder(void) | |
t@@ -90,7 +90,7 @@ drawtext(const char *text, Bool invert, Bool border) | |
} | |
} | |
-/* extern functions */ | |
+/* extern */ | |
void | |
drawall() | |
diff --git a/dwm.h b/dwm.h | |
t@@ -37,28 +37,28 @@ union Arg { | |
}; | |
/* atoms */ | |
-enum { WMProtocols, WMDelete, WMLast }; | |
enum { NetSupported, NetWMName, NetLast }; | |
+enum { WMProtocols, WMDelete, WMLast }; | |
/* cursor */ | |
-enum { CurNormal, CurResize, CurMove, CurInput, CurLast }; | |
+enum { CurNormal, CurResize, CurMove, CurLast }; | |
struct Fnt { | |
- XFontStruct *xfont; | |
- XFontSet set; | |
int ascent; | |
int descent; | |
int height; | |
+ XFontSet set; | |
+ XFontStruct *xfont; | |
}; | |
struct DC { /* draw context */ | |
- GC gc; | |
- Drawable drawable; | |
int x, y, w, h; | |
- Fnt font; | |
unsigned long bg; | |
unsigned long fg; | |
unsigned long border; | |
+ Drawable drawable; | |
+ Fnt font; | |
+ GC gc; | |
}; | |
struct Client { | |
t@@ -72,10 +72,10 @@ struct Client { | |
unsigned int border; | |
long flags; | |
Bool isfloat; | |
- Window win; | |
- Window title; | |
Client *next; | |
Client *revert; | |
+ Window win; | |
+ Window title; | |
}; | |
struct Rule { | |
t@@ -92,20 +92,18 @@ struct Key { | |
Arg arg; | |
}; | |
-extern Display *dpy; | |
-extern Window root, barwin; | |
-extern Atom wmatom[WMLast], netatom[NetLast]; | |
-extern Cursor cursor[CurLast]; | |
-extern Bool running, issel; | |
+extern char *tags[TLast], stext[1024]; | |
+extern int tsel, screen, sx, sy, sw, sh, bx, by, bw, bh, mw; | |
extern void (*handler[LASTEvent])(XEvent *); | |
extern void (*arrange)(Arg *); | |
-extern Key key[]; | |
- | |
-extern int tsel, screen, sx, sy, sw, sh, bx, by, bw, bh, mw; | |
-extern char *tags[TLast], stext[1024]; | |
- | |
-extern DC dc; | |
+extern Atom wmatom[WMLast], netatom[NetLast]; | |
+extern Bool running, issel; | |
extern Client *clients, *sel; | |
+extern Cursor cursor[CurLast]; | |
+extern DC dc; | |
+extern Display *dpy; | |
+extern Key key[]; | |
+extern Window root, barwin; | |
/* client.c */ | |
extern void ban(Client *c); | |
diff --git a/dwm.html b/dwm.html | |
t@@ -39,10 +39,9 @@ | |
</p> | |
<ul> | |
<li> | |
- dwm has no 9P support, no menu, no editable tagbars, | |
- no shell-based configuration and remote control and co… | |
- any additional tools like printing the selection or wa… | |
- mouse. | |
+ dwm has no 9P support, no editable tagbars, no shell-b… | |
+ configuration and remote control and comes without any… | |
+ tools like printing the selection or warping the mouse. | |
</li> | |
<li> | |
dwm is only a single binary, it's source code is inten… | |
diff --git a/event.c b/event.c | |
t@@ -11,45 +11,44 @@ | |
#define ButtonMask (ButtonPressMask | ButtonReleaseMask) | |
#define MouseMask (ButtonMask | PointerMotionMask) | |
-/********** CUSTOMIZE **********/ | |
- | |
+/* CUSTOMIZE */ | |
+const char *browse[] = { "firefox", NULL }; | |
+const char *gimp[] = { "gimp", NULL }; | |
const char *term[] = { | |
"urxvtc", "-tr", "+sb", "-bg", "black", "-fg", "white", "-cr", "white", | |
"-fn", "-*-terminus-medium-*-*-*-13-*-*-*-*-*-iso10646-*", NULL | |
}; | |
-const char *browse[] = { "firefox", NULL }; | |
const char *xlock[] = { "xlock", NULL }; | |
Key key[] = { | |
/* modifier key … | |
- { Mod1Mask, XK_Return, zoom, … | |
- { Mod1Mask, XK_k, focusp… | |
- { Mod1Mask, XK_j, focusn… | |
- { Mod1Mask, XK_m, maximi… | |
+ { ControlMask, XK_0, appendtag, … | |
+ { ControlMask, XK_1, appendtag, … | |
+ { ControlMask, XK_2, appendtag, … | |
+ { ControlMask, XK_3, appendtag, … | |
{ Mod1Mask, XK_0, view, … | |
{ Mod1Mask, XK_1, view, … | |
{ Mod1Mask, XK_2, view, … | |
{ Mod1Mask, XK_3, view, … | |
+ { Mod1Mask, XK_j, focusn… | |
+ { Mod1Mask, XK_k, focusp… | |
+ { Mod1Mask, XK_m, maximi… | |
{ Mod1Mask, XK_space, dotile, … | |
- { Mod1Mask|ShiftMask, XK_space, dofloat, { 0 } }, | |
+ { Mod1Mask, XK_Return, zoom, … | |
{ Mod1Mask|ShiftMask, XK_0, replacetag, … | |
{ Mod1Mask|ShiftMask, XK_1, replacetag, … | |
{ Mod1Mask|ShiftMask, XK_2, replacetag, … | |
{ Mod1Mask|ShiftMask, XK_3, replacetag, … | |
{ Mod1Mask|ShiftMask, XK_c, killclient, … | |
+ { Mod1Mask|ShiftMask, XK_g, spawn, … | |
+ { Mod1Mask|ShiftMask, XK_l, spawn, … | |
{ Mod1Mask|ShiftMask, XK_q, quit, … | |
- { Mod1Mask|ShiftMask, XK_Return, spawn, {… | |
+ { Mod1Mask|ShiftMask, XK_space, dofloat, { 0 } }, | |
{ Mod1Mask|ShiftMask, XK_w, spawn, … | |
- { Mod1Mask|ShiftMask, XK_l, spawn, … | |
- { ControlMask, XK_0, appendtag, … | |
- { ControlMask, XK_1, appendtag, … | |
- { ControlMask, XK_2, appendtag, … | |
- { ControlMask, XK_3, appendtag, … | |
+ { Mod1Mask|ShiftMask, XK_Return, spawn, {… | |
}; | |
-/********** CUSTOMIZE **********/ | |
- | |
-/* static functions */ | |
+/* static */ | |
static void | |
movemouse(Client *c) | |
t@@ -337,7 +336,7 @@ unmapnotify(XEvent *e) | |
unmanage(c); | |
} | |
-/* extern functions */ | |
+/* extern */ | |
void (*handler[LASTEvent]) (XEvent *) = { | |
[ButtonPress] = buttonpress, | |
diff --git a/main.c b/main.c | |
t@@ -14,26 +14,12 @@ | |
#include <X11/Xatom.h> | |
#include <X11/Xproto.h> | |
-Display *dpy; | |
-Window root, barwin; | |
-Atom wmatom[WMLast], netatom[NetLast]; | |
-Cursor cursor[CurLast]; | |
-Bool running = True; | |
-Bool issel = True; | |
- | |
-int tsel = Tdev; /* default tag */ | |
-int screen, sx, sy, sw, sh, bx, by, bw, bh, mw; | |
-char stext[1024]; | |
-DC dc = {0}; | |
-Client *clients = NULL; | |
-Client *sel = NULL; | |
+/* static */ | |
static Bool otherwm; | |
static int (*xerrorxlib)(Display *, XErrorEvent *); | |
-/* static functions */ | |
- | |
static void | |
cleanup() | |
{ | |
t@@ -97,7 +83,20 @@ xerrorstart(Display *dsply, XErrorEvent *ee) | |
return -1; | |
} | |
-/* extern functions */ | |
+/* extern */ | |
+ | |
+char stext[1024]; | |
+int tsel = Tdev; /* default tag */ | |
+int screen, sx, sy, sw, sh, bx, by, bw, bh, mw; | |
+Atom wmatom[WMLast], netatom[NetLast]; | |
+Bool running = True; | |
+Bool issel = True; | |
+Client *clients = NULL; | |
+Client *sel = NULL; | |
+Cursor cursor[CurLast]; | |
+Display *dpy; | |
+DC dc = {0}; | |
+Window root, barwin; | |
int | |
getproto(Window w) | |
t@@ -141,10 +140,9 @@ quit(Arg *arg) | |
} | |
/* | |
- * There's no way to check accesses to destroyed windows, thus | |
- * those cases are ignored (especially on UnmapNotify's). | |
- * Other types of errors call Xlib's default error handler, which | |
- * calls exit(). | |
+ * There's no way to check accesses to destroyed windows, thus those cases are | |
+ * ignored (especially on UnmapNotify's). Other types of errors call Xlibs | |
+ * default error handler, which calls exit(). | |
*/ | |
int | |
xerror(Display *dpy, XErrorEvent *ee) | |
diff --git a/tag.c b/tag.c | |
t@@ -7,24 +7,23 @@ | |
#include <string.h> | |
#include <X11/Xutil.h> | |
-/********** CUSTOMIZE **********/ | |
- | |
-char *tags[TLast] = { | |
- [Tscratch] = "scratch", | |
- [Tdev] = "dev", | |
- [Twww] = "www", | |
- [Twork] = "work", | |
-}; | |
+/* static */ | |
+/* CUSTOMIZE */ | |
static Rule rule[] = { | |
/* class instance tags … | |
{ "Firefox-bin", "Gecko", { [Twww] = "www" }, … | |
}; | |
-/********** CUSTOMIZE **********/ | |
- | |
-/* extern functions */ | |
+/* extern */ | |
+/* CUSTOMIZE */ | |
+char *tags[TLast] = { | |
+ [Tscratch] = "scratch", | |
+ [Tdev] = "dev", | |
+ [Twww] = "www", | |
+ [Twork] = "work", | |
+}; | |
void (*arrange)(Arg *) = dotile; | |
void | |
diff --git a/util.c b/util.c | |
t@@ -10,7 +10,7 @@ | |
#include <sys/wait.h> | |
#include <unistd.h> | |
-/* static functions */ | |
+/* static */ | |
static void | |
bad_malloc(unsigned int size) | |
t@@ -20,7 +20,7 @@ bad_malloc(unsigned int size) | |
exit(1); | |
} | |
-/* extern functions */ | |
+/* extern */ | |
void * | |
emallocz(unsigned int size) |