Xinqi Bao's Git
projects
/
dwm.git
/ diff
summary
|
log
|
commit
|
diff
|
tree
raw
|
patch
|
inline
| side by side (parent:
9f569fa
)
removed debug output, sanitized tag limit check
author
Anselm R Garbe <
[email protected]
>
Thu, 22 May 2008 12:35:45 +0000
(13:35 +0100)
committer
Anselm R Garbe <
[email protected]
>
Thu, 22 May 2008 12:35:45 +0000
(13:35 +0100)
dwm.c
diff
|
blob
|
history
diff --git
a/dwm.c
b/dwm.c
index
53f0c12
..
f46f069
100644
(file)
--- a/
dwm.c
+++ b/
dwm.c
@@
-234,11
+234,10
@@
Window root, barwin;
/* configuration, allows nested code to access above variables */
#include "config.h"
/* configuration, allows nested code to access above variables */
#include "config.h"
-/* c
heck if all tags will fit into a uint bit
array. */
-st
atic char tags_is_a_sign_that_your_IQ[sizeof(int) * 8 < LENGTH(tags) ? -1 : 1]
;
+/* c
ompile-time check if all tags fit into an uint bit
array. */
+st
ruct NumTags { char limitexceeded[sizeof(uint) * 8 < LENGTH(tags) ? -1 : 1]; }
;
/* function implementations */
/* function implementations */
-
void
applyrules(Client *c) {
uint i;
void
applyrules(Client *c) {
uint i;
@@
-1548,14
+1547,6
@@
togglelayout(const void *arg) {
void
toggletag(const void *arg) {
void
toggletag(const void *arg) {
- int i, m = *(int *)arg;
- for(i = 0; i < sizeof(int) * 8; i++)
- fputc(m & 1 << i ? '1' : '0', stdout);
- puts("");
- for(i = 0; i < sizeof(int) * 8; i++)
- fputc(TAGMASK & 1 << i ? '1' : '0', stdout);
- puts("aaa");
-
if(sel && (sel->tags ^ ((*(int *)arg) & TAGMASK))) {
sel->tags ^= (*(int *)arg) & TAGMASK;
arrange();
if(sel && (sel->tags ^ ((*(int *)arg) & TAGMASK))) {
sel->tags ^= (*(int *)arg) & TAGMASK;
arrange();