Mercurial > dwm-meillo
diff tag.c @ 581:601842ee4484
applied Jukka's sizeof K&R compliance patch, applied Manuels' last-line printage proposal for stdin reading.
author | arg@mig29 |
---|---|
date | Sun, 26 Nov 2006 14:26:53 +0100 |
parents | 797e27162b43 |
children | f7dcd3ac8d6f |
line wrap: on
line diff
--- a/tag.c Sun Nov 26 13:31:36 2006 +0100 +++ b/tag.c Sun Nov 26 14:26:53 2006 +0100 @@ -50,7 +50,7 @@ if(rreg) return; - len = sizeof(rule) / sizeof(rule[0]); + len = sizeof rule / sizeof rule[0]; rreg = emallocz(len * sizeof(RReg)); for(i = 0; i < len; i++) { if(rule[i].clpattern) { @@ -83,7 +83,7 @@ c->tags[i] = trans->tags[i]; } else if(XGetClassHint(dpy, c->win, &ch)) { - snprintf(prop, sizeof(prop), "%s:%s:%s", + snprintf(prop, sizeof prop, "%s:%s:%s", ch.res_class ? ch.res_class : "", ch.res_name ? ch.res_name : "", c->name); for(i = 0; !matched && i < len; i++)