summaryrefslogtreecommitdiffstats
path: root/dwm.c
diff options
context:
space:
mode:
authorAnselm R Garbe <garbeam@gmail.com>2008-05-22 11:08:07 +0100
committerAnselm R Garbe <garbeam@gmail.com>2008-05-22 11:08:07 +0100
commit8e05f6c592346f29f96c9a6cbc30f4d39e987d99 (patch)
treea4a645a91f2c4ce747b6bc2fbd968267f979d46e /dwm.c
parentapplied Gottox bitmask + void *arg patch (diff)
downloaddwm-8e05f6c592346f29f96c9a6cbc30f4d39e987d99.tar.gz
dwm-8e05f6c592346f29f96c9a6cbc30f4d39e987d99.zip
s/void */const void */
Diffstat (limited to 'dwm.c')
-rw-r--r--dwm.c64
1 files changed, 32 insertions, 32 deletions
diff --git a/dwm.c b/dwm.c
index 66a2cb4..1f4b881 100644
--- a/dwm.c
+++ b/dwm.c
@@ -94,8 +94,8 @@ typedef struct {
94typedef struct { 94typedef struct {
95 unsigned long mod; 95 unsigned long mod;
96 KeySym keysym; 96 KeySym keysym;
97 void (*func)(void *arg); 97 void (*func)(const void *arg);
98 void *arg; 98 const void *arg;
99} Key; 99} Key;
100 100
101typedef struct { 101typedef struct {
@@ -136,8 +136,8 @@ void eprint(const char *errstr, ...);
136void expose(XEvent *e); 136void expose(XEvent *e);
137void focus(Client *c); 137void focus(Client *c);
138void focusin(XEvent *e); 138void focusin(XEvent *e);
139void focusnext(void *arg); 139void focusnext(const void *arg);
140void focusprev(void *arg); 140void focusprev(const void *arg);
141Client *getclient(Window w); 141Client *getclient(Window w);
142unsigned long getcolor(const char *colstr); 142unsigned long getcolor(const char *colstr);
143long getstate(Window w); 143long getstate(Window w);
@@ -150,33 +150,33 @@ Bool isprotodel(Client *c);
150Bool isurgent(unsigned int t); 150Bool isurgent(unsigned int t);
151Bool isvisible(Client *c); 151Bool isvisible(Client *c);
152void keypress(XEvent *e); 152void keypress(XEvent *e);
153void killclient(void *arg); 153void killclient(const void *arg);
154void manage(Window w, XWindowAttributes *wa); 154void manage(Window w, XWindowAttributes *wa);
155void mappingnotify(XEvent *e); 155void mappingnotify(XEvent *e);
156void maprequest(XEvent *e); 156void maprequest(XEvent *e);
157void movemouse(Client *c); 157void movemouse(Client *c);
158Client *nextunfloating(Client *c); 158Client *nextunfloating(Client *c);
159void propertynotify(XEvent *e); 159void propertynotify(XEvent *e);
160void quit(void *arg); 160void quit(const void *arg);
161void resize(Client *c, int x, int y, int w, int h, Bool sizehints); 161void resize(Client *c, int x, int y, int w, int h, Bool sizehints);
162void resizemouse(Client *c); 162void resizemouse(Client *c);
163void restack(void); 163void restack(void);
164void run(void); 164void run(void);
165void scan(void); 165void scan(void);
166void setclientstate(Client *c, long state); 166void setclientstate(Client *c, long state);
167void setmfact(void *arg); 167void setmfact(const void *arg);
168void setup(void); 168void setup(void);
169void spawn(void *arg); 169void spawn(const void *arg);
170void tag(void *arg); 170void tag(const void *arg);
171unsigned int textnw(const char *text, unsigned int len); 171unsigned int textnw(const char *text, unsigned int len);
172unsigned int textw(const char *text); 172unsigned int textw(const char *text);
173void tile(void); 173void tile(void);
174void tileresize(Client *c, int x, int y, int w, int h); 174void tileresize(Client *c, int x, int y, int w, int h);
175void togglebar(void *arg); 175void togglebar(const void *arg);
176void togglefloating(void *arg); 176void togglefloating(const void *arg);
177void togglelayout(void *arg); 177void togglelayout(const void *arg);
178void toggletag(void *arg); 178void toggletag(const void *arg);
179void toggleview(void *arg); 179void toggleview(const void *arg);
180void unban(Client *c); 180void unban(Client *c);
181void unmanage(Client *c); 181void unmanage(Client *c);
182void unmapnotify(XEvent *e); 182void unmapnotify(XEvent *e);
@@ -186,12 +186,12 @@ void updatesizehints(Client *c);
186void updatetilegeom(void); 186void updatetilegeom(void);
187void updatetitle(Client *c); 187void updatetitle(Client *c);
188void updatewmhints(Client *c); 188void updatewmhints(Client *c);
189void view(void *arg); 189void view(const void *arg);
190void viewprevtag(void *arg); 190void viewprevtag(const void *arg);
191int xerror(Display *dpy, XErrorEvent *ee); 191int xerror(Display *dpy, XErrorEvent *ee);
192int xerrordummy(Display *dpy, XErrorEvent *ee); 192int xerrordummy(Display *dpy, XErrorEvent *ee);
193int xerrorstart(Display *dpy, XErrorEvent *ee); 193int xerrorstart(Display *dpy, XErrorEvent *ee);
194void zoom(void *arg); 194void zoom(const void *arg);
195 195
196/* variables */ 196/* variables */
197char stext[256]; 197char stext[256];
@@ -667,7 +667,7 @@ focusin(XEvent *e) { /* there are some broken focus acquiring clients */
667} 667}
668 668
669void 669void
670focusnext(void *arg) { 670focusnext(const void *arg) {
671 Client *c; 671 Client *c;
672 672
673 if(!sel) 673 if(!sel)
@@ -682,7 +682,7 @@ focusnext(void *arg) {
682} 682}
683 683
684void 684void
685focusprev(void *arg) { 685focusprev(const void *arg) {
686 Client *c; 686 Client *c;
687 687
688 if(!sel) 688 if(!sel)
@@ -905,7 +905,7 @@ keypress(XEvent *e) {
905} 905}
906 906
907void 907void
908killclient(void *arg) { 908killclient(const void *arg) {
909 XEvent ev; 909 XEvent ev;
910 910
911 if(!sel) 911 if(!sel)
@@ -1088,7 +1088,7 @@ propertynotify(XEvent *e) {
1088} 1088}
1089 1089
1090void 1090void
1091quit(void *arg) { 1091quit(const void *arg) {
1092 readin = running = False; 1092 readin = running = False;
1093} 1093}
1094 1094
@@ -1321,7 +1321,7 @@ setclientstate(Client *c, long state) {
1321 1321
1322/* arg > 1.0 will set mfact absolutly */ 1322/* arg > 1.0 will set mfact absolutly */
1323void 1323void
1324setmfact(void *arg) { 1324setmfact(const void *arg) {
1325 double d = *((double*) arg); 1325 double d = *((double*) arg);
1326 1326
1327 if(!d || lt->arrange != tile) 1327 if(!d || lt->arrange != tile)
@@ -1412,7 +1412,7 @@ setup(void) {
1412} 1412}
1413 1413
1414void 1414void
1415spawn(void *arg) { 1415spawn(const void *arg) {
1416 static char *shell = NULL; 1416 static char *shell = NULL;
1417 1417
1418 if(!shell && !(shell = getenv("SHELL"))) 1418 if(!shell && !(shell = getenv("SHELL")))
@@ -1434,7 +1434,7 @@ spawn(void *arg) {
1434} 1434}
1435 1435
1436void 1436void
1437tag(void *arg) { 1437tag(const void *arg) {
1438 if(sel && *(int *)arg & TAGMASK) { 1438 if(sel && *(int *)arg & TAGMASK) {
1439 sel->tags = *(int *)arg & TAGMASK; 1439 sel->tags = *(int *)arg & TAGMASK;
1440 arrange(); 1440 arrange();
@@ -1505,7 +1505,7 @@ tileresize(Client *c, int x, int y, int w, int h) {
1505} 1505}
1506 1506
1507void 1507void
1508togglebar(void *arg) { 1508togglebar(const void *arg) {
1509 showbar = !showbar; 1509 showbar = !showbar;
1510 updategeom(); 1510 updategeom();
1511 updatebar(); 1511 updatebar();
@@ -1513,7 +1513,7 @@ togglebar(void *arg) {
1513} 1513}
1514 1514
1515void 1515void
1516togglefloating(void *arg) { 1516togglefloating(const void *arg) {
1517 if(!sel) 1517 if(!sel)
1518 return; 1518 return;
1519 sel->isfloating = !sel->isfloating; 1519 sel->isfloating = !sel->isfloating;
@@ -1523,7 +1523,7 @@ togglefloating(void *arg) {
1523} 1523}
1524 1524
1525void 1525void
1526togglelayout(void *arg) { 1526togglelayout(const void *arg) {
1527 unsigned int i; 1527 unsigned int i;
1528 1528
1529 if(!arg) { 1529 if(!arg) {
@@ -1545,7 +1545,7 @@ togglelayout(void *arg) {
1545} 1545}
1546 1546
1547void 1547void
1548toggletag(void *arg) { 1548toggletag(const void *arg) {
1549 int i, m = *(int *)arg; 1549 int i, m = *(int *)arg;
1550 for(i = 0; i < sizeof(int) * 8; i++) 1550 for(i = 0; i < sizeof(int) * 8; i++)
1551 fputc(m & 1 << i ? '1' : '0', stdout); 1551 fputc(m & 1 << i ? '1' : '0', stdout);
@@ -1561,7 +1561,7 @@ toggletag(void *arg) {
1561} 1561}
1562 1562
1563void 1563void
1564toggleview(void *arg) { 1564toggleview(const void *arg) {
1565 if((tagset[seltags] ^ ((*(int *)arg) & TAGMASK))) { 1565 if((tagset[seltags] ^ ((*(int *)arg) & TAGMASK))) {
1566 tagset[seltags] ^= (*(int *)arg) & TAGMASK; 1566 tagset[seltags] ^= (*(int *)arg) & TAGMASK;
1567 arrange(); 1567 arrange();
@@ -1737,7 +1737,7 @@ updatewmhints(Client *c) {
1737} 1737}
1738 1738
1739void 1739void
1740view(void *arg) { 1740view(const void *arg) {
1741 if(*(int *)arg & TAGMASK) { 1741 if(*(int *)arg & TAGMASK) {
1742 seltags ^= 1; /* toggle sel tagset */ 1742 seltags ^= 1; /* toggle sel tagset */
1743 tagset[seltags] = *(int *)arg & TAGMASK; 1743 tagset[seltags] = *(int *)arg & TAGMASK;
@@ -1746,7 +1746,7 @@ view(void *arg) {
1746} 1746}
1747 1747
1748void 1748void
1749viewprevtag(void *arg) { 1749viewprevtag(const void *arg) {
1750 seltags ^= 1; /* toggle sel tagset */ 1750 seltags ^= 1; /* toggle sel tagset */
1751 arrange(); 1751 arrange();
1752} 1752}
@@ -1785,7 +1785,7 @@ xerrorstart(Display *dpy, XErrorEvent *ee) {
1785} 1785}
1786 1786
1787void 1787void
1788zoom(void *arg) { 1788zoom(const void *arg) {
1789 Client *c = sel; 1789 Client *c = sel;
1790 1790
1791 if(c == nextunfloating(clients)) 1791 if(c == nextunfloating(clients))