about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--client.c2
-rw-r--r--draw.c6
-rw-r--r--menu.c24
-rw-r--r--wm.c10
-rw-r--r--wm.h15
5 files changed, 25 insertions, 32 deletions
diff --git a/client.c b/client.c
index a5141ea..1e693f7 100644
--- a/client.c
+++ b/client.c
@@ -14,7 +14,7 @@ update_client_name(Client *c)
 {
 	XTextProperty name;
 	int n;
-	char **list = 0;
+	char **list = NULL;
 
 	name.nitems = 0;
 	c->name[0] = 0;
diff --git a/draw.c b/draw.c
index b89c365..a3c526e 100644
--- a/draw.c
+++ b/draw.c
@@ -116,7 +116,7 @@ loadfont(Display *dpy, Fnt *font, const char *fontstr)
 	char **missing, *def;
 	int n;
 
-	missing = 0;
+	missing = NULL;
 	def = "?";
 	setlocale(LC_ALL, "");
 	if(font->set)
@@ -128,7 +128,7 @@ loadfont(Display *dpy, Fnt *font, const char *fontstr)
 		XFreeStringList(missing);
 		if(font->set) {
 			XFreeFontSet(dpy, font->set);
-			font->set = 0;
+			font->set = NULL;
 		}
 	}
 	if(font->set) {
@@ -151,7 +151,7 @@ loadfont(Display *dpy, Fnt *font, const char *fontstr)
 	else {
 		if(font->xfont)
 			XFreeFont(dpy, font->xfont);
-		font->xfont = 0;
+		font->xfont = NULL;
 		font->xfont = XLoadQueryFont(dpy, fontstr);
 		if (!font->xfont)
 			font->xfont = XLoadQueryFont(dpy, "fixed");
diff --git a/menu.c b/menu.c
index d2e50ec..6d8843e 100644
--- a/menu.c
+++ b/menu.c
@@ -34,15 +34,15 @@ static Window win;
 static XRectangle rect;
 static Bool done = False;
 
-static Item *allitem = 0;	/* first of all items */
-static Item *item = 0;	/* first of pattern matching items */
-static Item *sel = 0;
-static Item *nextoff = 0;
-static Item *prevoff = 0;
-static Item *curroff = 0;
+static Item *allitem = NULL;	/* first of all items */
+static Item *item = NULL;	/* first of pattern matching items */
+static Item *sel = NULL;
+static Item *nextoff = NULL;
+static Item *prevoff = NULL;
+static Item *curroff = NULL;
 
 static int screen;
-static char *title = 0;
+static char *title = NULL;
 static char text[4096];
 static int ret = 0;
 static int nitem = 0;
@@ -107,7 +107,7 @@ update_items(char *pattern)
 	else
 		cmdw = twidth;
 
-	item = j = 0;
+	item = j = NULL;
 	nitem = 0;
 
 	for(i = allitem; i; i=i->next)
@@ -117,7 +117,7 @@ update_items(char *pattern)
 			else
 				j->right = i;
 			i->left = j;
-			i->right = 0;
+			i->right = NULL;
 			j = i;
 			nitem++;
 		}
@@ -129,7 +129,7 @@ update_items(char *pattern)
 			else
 				j->right = i;
 			i->left = j;
-			i->right = 0;
+			i->right = NULL;
 			j = i;
 			nitem++;
 		}
@@ -319,7 +319,7 @@ kpress(XKeyEvent * e)
 static char *
 read_allitems()
 {
-	static char *maxname = 0;
+	static char *maxname = NULL;
 	char *p, buf[1024];
 	unsigned int len = 0, max = 0;
 	Item *i, *new;
@@ -336,7 +336,7 @@ read_allitems()
 		}
 
 		new = emalloc(sizeof(Item));
-		new->next = new->left = new->right = 0;
+		new->next = new->left = new->right = NULL;
 		new->text = p;
 		if(!i)
 			allitem = new;
diff --git a/wm.c b/wm.c
index 843aaac..a4caf64 100644
--- a/wm.c
+++ b/wm.c
@@ -20,8 +20,9 @@ Atom wm_atom[WMLast], net_atom[NetLast];
 Cursor cursor[CurLast];
 XRectangle rect, barrect;
 Bool running = True;
+Client *client = NULL;
 
-char *bartext;
+char *bartext, tag[256];
 int screen, sel_screen;
 unsigned int lock_mask, numlock_mask;
 
@@ -74,12 +75,11 @@ win_property(Window w, Atom a, Atom t, long l, unsigned char **prop)
 	status = XGetWindowProperty(dpy, w, a, 0L, l, False, t, &real, &format,
 			&res, &extra, prop);
 
-	if(status != Success || *prop == 0) {
+	if(status != Success || *prop == NULL) {
 		return 0;
 	}
-	if(res == 0) {
+	if(res == 0)
 		free((void *) *prop);
-	}
 	return res;
 }
 
@@ -264,7 +264,7 @@ main(int argc, char *argv[])
 			barrect.width, barrect.height, 0, DefaultDepth(dpy, screen),
 			CopyFromParent, DefaultVisual(dpy, screen),
 			CWOverrideRedirect | CWBackPixmap | CWEventMask, &wa);
-	bartext = 0;
+	bartext = NULL;
 	XDefineCursor(dpy, barwin, cursor[CurNormal]);
 	XMapRaised(dpy, barwin);
 	draw_bar();
diff --git a/wm.h b/wm.h
index c4d65ea..01bbee4 100644
--- a/wm.h
+++ b/wm.h
@@ -20,11 +20,10 @@ enum { CurNormal, CurResize, CurMove, CurInput, CurLast };
 enum { RFloat, RGrid, RLast };
 
 typedef struct Client Client;
-typedef struct Tag Tag;
 
 struct Client {
-	Tag *tag;
 	char name[256];
+	char tag[256];
 	int proto;
 	unsigned int border;
 	Bool fixedsize;
@@ -37,27 +36,21 @@ struct Client {
 	Client *snext;
 };
 
-struct Tag {
-	char name[256];
-	Client *stack;
-	XRectangle r;
-	Tag *next;
-	Tag *cnext;
-};
-
 extern Display *dpy;
 extern Window root, barwin;
 extern Atom wm_atom[WMLast], net_atom[NetLast];
 extern Cursor cursor[CurLast];
 extern XRectangle rect, barrect;
 extern Bool running;
+extern Bool grid;
 extern void (*handler[LASTEvent]) (XEvent *);
 
 extern int screen, sel_screen;
 extern unsigned int lock_mask, numlock_mask;
-extern char *bartext;
+extern char *bartext, tag[256];
 
 extern Brush brush;
+extern Client *client;
 
 /* bar.c */
 extern void draw_bar();
lame/054dilated_reagent.cc?h=hlt&id=d18d1d3d2ac7ba0909db010649a94d01a65d98d4'>^
79eef536 ^
a796831f ^


































d5f89e0f ^
a796831f ^




4ad0f652 ^
a796831f ^


c4e143d6 ^

1b76245c ^
c4e143d6 ^


1b76245c ^
c4e143d6 ^







08cf048f ^
79eef536 ^
b74443e5 ^
eb4eecea ^
a17f9186 ^
79eef536 ^
a17f9186 ^
a796831f ^
a796831f ^



79eef536 ^
a796831f ^
a072f674 ^
eb4eecea ^
a072f674 ^

a796831f ^

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132