about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAnselm R Garbe <garbeam@gmail.com>2008-05-22 11:10:08 +0100
committerAnselm R Garbe <garbeam@gmail.com>2008-05-22 11:10:08 +0100
commitc3fa9e879f5beb5d3c37f4bbcae2306942929f13 (patch)
treeb17225b109236794be7e065ec13c3a72b361e9a8
parent8e05f6c592346f29f96c9a6cbc30f4d39e987d99 (diff)
downloaddwm-c3fa9e879f5beb5d3c37f4bbcae2306942929f13.tar.gz
s/unsigned int/uint/
-rw-r--r--dwm.c67
1 files changed, 34 insertions, 33 deletions
diff --git a/dwm.c b/dwm.c
index 1f4b881..5138752 100644
--- a/dwm.c
+++ b/dwm.c
@@ -60,6 +60,7 @@ enum { NetSupported, NetWMName, NetLast };              /* EWMH atoms */
 enum { WMProtocols, WMDelete, WMName, WMState, WMLast };/* default atoms */
 
 /* typedefs */
+typedef unsigned int uint;
 typedef struct Client Client;
 struct Client {
 	char name[256];
@@ -67,9 +68,9 @@ struct Client {
 	int basew, baseh, incw, inch, maxw, maxh, minw, minh;
 	int minax, maxax, minay, maxay;
 	long flags;
-	unsigned int bw, oldbw;
+	uint bw, oldbw;
 	Bool isbanned, isfixed, isfloating, isurgent;
-	unsigned int tags;
+	uint tags;
 	Client *next;
 	Client *prev;
 	Client *snext;
@@ -108,7 +109,7 @@ typedef struct {
 	const char *class;
 	const char *instance;
 	const char *title;
-	unsigned int tags;
+	uint tags;
 	Bool isfloating;
 } Rule;
 
@@ -130,7 +131,7 @@ void detachstack(Client *c);
 void drawbar(void);
 void drawsquare(Bool filled, Bool empty, Bool invert, unsigned long col[ColLast]);
 void drawtext(const char *text, unsigned long col[ColLast], Bool invert);
-void *emallocz(unsigned int size);
+void *emallocz(uint size);
 void enternotify(XEvent *e);
 void eprint(const char *errstr, ...);
 void expose(XEvent *e);
@@ -141,13 +142,13 @@ void focusprev(const void *arg);
 Client *getclient(Window w);
 unsigned long getcolor(const char *colstr);
 long getstate(Window w);
-Bool gettextprop(Window w, Atom atom, char *text, unsigned int size);
+Bool gettextprop(Window w, Atom atom, char *text, uint size);
 void grabbuttons(Client *c, Bool focused);
 void grabkeys(void);
 void initfont(const char *fontstr);
-Bool isoccupied(unsigned int t);
+Bool isoccupied(uint t);
 Bool isprotodel(Client *c);
-Bool isurgent(unsigned int t);
+Bool isurgent(uint t);
 Bool isvisible(Client *c);
 void keypress(XEvent *e);
 void killclient(const void *arg);
@@ -168,8 +169,8 @@ void setmfact(const void *arg);
 void setup(void);
 void spawn(const void *arg);
 void tag(const void *arg);
-unsigned int textnw(const char *text, unsigned int len);
-unsigned int textw(const char *text);
+uint textnw(const char *text, uint len);
+uint textw(const char *text);
 void tile(void);
 void tileresize(Client *c, int x, int y, int w, int h);
 void togglebar(const void *arg);
@@ -198,9 +199,9 @@ char stext[256];
 int screen, sx, sy, sw, sh;
 int bx, by, bw, bh, blw, wx, wy, ww, wh;
 int mx, my, mw, mh, tx, ty, tw, th;
-unsigned int seltags = 0;
+uint seltags = 0;
 int (*xerrorxlib)(Display *, XErrorEvent *);
-unsigned int numlockmask = 0;
+uint numlockmask = 0;
 void (*handler[LASTEvent]) (XEvent *) = {
 	[ButtonPress] = buttonpress,
 	[ConfigureRequest] = configurerequest,
@@ -218,7 +219,7 @@ void (*handler[LASTEvent]) (XEvent *) = {
 Atom wmatom[WMLast], netatom[NetLast];
 Bool otherwm, readin;
 Bool running = True;
-unsigned int tagset[] = {1, 1}; /* after start, first tag is selected */
+uint tagset[] = {1, 1}; /* after start, first tag is selected */
 Client *clients = NULL;
 Client *sel = NULL;
 Client *stack = NULL;
@@ -232,14 +233,14 @@ Window root, barwin;
 /* configuration, allows nested code to access above variables */
 #include "config.h"
 
-/* check if all tags will fit into a unsigned int bitarray. */
+/* check if all tags will fit into a uint bitarray. */
 static char tags_is_a_sign_that_your_IQ[sizeof(int) * 8 < LENGTH(tags) ? -1 : 1];
 
 /* function implementations */
 
 void
 applyrules(Client *c) {
-	unsigned int i;
+	uint i;
 	Rule *r;
 	XClassHint ch = { 0 };
 
@@ -305,7 +306,7 @@ ban(Client *c) {
 
 void
 buttonpress(XEvent *e) {
-	unsigned int i, x, mask;
+	uint i, x, mask;
 	Client *c;
 	XButtonPressedEvent *ev = &e->xbutton;
 
@@ -561,7 +562,7 @@ drawsquare(Bool filled, Bool empty, Bool invert, unsigned long col[ColLast]) {
 void
 drawtext(const char *text, unsigned long col[ColLast], Bool invert) {
 	int x, y, w, h;
-	unsigned int len, olen;
+	uint len, olen;
 	XRectangle r = { dc.x, dc.y, dc.w, dc.h };
 	char buf[256];
 
@@ -596,7 +597,7 @@ drawtext(const char *text, unsigned long col[ColLast], Bool invert) {
 }
 
 void *
-emallocz(unsigned int size) {
+emallocz(uint size) {
 	void *res = calloc(1, size);
 
 	if(!res)
@@ -735,7 +736,7 @@ getstate(Window w) {
 }
 
 Bool
-gettextprop(Window w, Atom atom, char *text, unsigned int size) {
+gettextprop(Window w, Atom atom, char *text, uint size) {
 	char **list = NULL;
 	int n;
 	XTextProperty name;
@@ -763,8 +764,8 @@ gettextprop(Window w, Atom atom, char *text, unsigned int size) {
 void
 grabbuttons(Client *c, Bool focused) {
 	int i, j;
-	unsigned int buttons[]   = { Button1, Button2, Button3 };
-	unsigned int modifiers[] = { MODKEY, MODKEY|LockMask, MODKEY|numlockmask,
+	uint buttons[]   = { Button1, Button2, Button3 };
+	uint modifiers[] = { MODKEY, MODKEY|LockMask, MODKEY|numlockmask,
 				MODKEY|numlockmask|LockMask} ;
 
 	XUngrabButton(dpy, AnyButton, AnyModifier, c->win);
@@ -780,7 +781,7 @@ grabbuttons(Client *c, Bool focused) {
 
 void
 grabkeys(void) {
-	unsigned int i, j;
+	uint i, j;
 	KeyCode code;
 	XModifierKeymap *modmap;
 
@@ -848,7 +849,7 @@ initfont(const char *fontstr) {
 }
 
 Bool
-isoccupied(unsigned int t) {
+isoccupied(uint t) {
 	Client *c;
 
 	for(c = clients; c; c = c->next)
@@ -873,7 +874,7 @@ isprotodel(Client *c) {
 }
 
 Bool
-isurgent(unsigned int t) {
+isurgent(uint t) {
 	Client *c;
 
 	for(c = clients; c; c = c->next)
@@ -889,7 +890,7 @@ isvisible(Client *c) {
 
 void
 keypress(XEvent *e) {
-	unsigned int i;
+	uint i;
 	KeySym keysym;
 	XKeyEvent *ev;
 
@@ -1004,7 +1005,7 @@ maprequest(XEvent *e) {
 void
 movemouse(Client *c) {
 	int x1, y1, ocx, ocy, di, nx, ny;
-	unsigned int dui;
+	uint dui;
 	Window dummy;
 	XEvent ev;
 
@@ -1230,7 +1231,7 @@ run(void) {
 	char sbuf[sizeof stext];
 	fd_set rd;
 	int r, xfd;
-	unsigned int len, offset;
+	uint len, offset;
 	XEvent ev;
 
 	/* main event loop, also reads status text from stdin */
@@ -1286,7 +1287,7 @@ run(void) {
 
 void
 scan(void) {
-	unsigned int i, num;
+	uint i, num;
 	Window *wins, d1, d2;
 	XWindowAttributes wa;
 
@@ -1336,7 +1337,7 @@ setmfact(const void *arg) {
 
 void
 setup(void) {
-	unsigned int i, w;
+	uint i, w;
 	XSetWindowAttributes wa;
 
 	/* init screen */
@@ -1441,8 +1442,8 @@ tag(const void *arg) {
 	}
 }
 
-unsigned int
-textnw(const char *text, unsigned int len) {
+uint
+textnw(const char *text, uint len) {
 	XRectangle r;
 
 	if(dc.font.set) {
@@ -1452,7 +1453,7 @@ textnw(const char *text, unsigned int len) {
 	return XTextWidth(dc.font.xfont, text, len);
 }
 
-unsigned int
+uint
 textw(const char *text) {
 	return textnw(text, strlen(text)) + dc.font.height;
 }
@@ -1460,7 +1461,7 @@ textw(const char *text) {
 void
 tile(void) {
 	int x, y, h, w;
-	unsigned int i, n;
+	uint i, n;
 	Client *c;
 
 	for(n = 0, c = nextunfloating(clients); c; c = nextunfloating(c->next), n++);
@@ -1524,7 +1525,7 @@ togglefloating(const void *arg) {
 
 void
 togglelayout(const void *arg) {
-	unsigned int i;
+	uint i;
 
 	if(!arg) {
 		if(++lt == &layouts[LENGTH(layouts)])
mmit/doc/ranger.gui.displayable.html?h=v1.1.1&id=f07bb12fc5c59430e995a64956b36331ce3629b9'>f07bb12f ^
62cd83ba ^

f07bb12f ^






4c13e1f2 ^

f07bb12f ^


4c13e1f2 ^

f07bb12f ^



4c13e1f2 ^


f07bb12f ^











f07bb12f ^















4c13e1f2 ^




34a60763 ^
4c13e1f2 ^
34a60763 ^
4c13e1f2 ^



f07bb12f ^
62cd83ba ^
f07bb12f ^






4c13e1f2 ^















f07bb12f ^





4c13e1f2 ^
f07bb12f ^
34a60763 ^
f07bb12f ^




4c13e1f2 ^
f07bb12f ^








f07bb12f ^



4c13e1f2 ^
f07bb12f ^


62cd83ba ^

f07bb12f ^




4c13e1f2 ^
f07bb12f ^
4c13e1f2 ^

f07bb12f ^



f07bb12f ^















4c13e1f2 ^

f07bb12f ^
4c13e1f2 ^
f07bb12f ^
34a60763 ^
f07bb12f ^
34a60763 ^
f07bb12f ^
4c13e1f2 ^
f07bb12f ^

4c13e1f2 ^
62cd83ba ^
4c13e1f2 ^

f07bb12f ^
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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294