aewl

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 diff
     1.1 --- a/tag.c	Sun Nov 26 13:31:36 2006 +0100
     1.2 +++ b/tag.c	Sun Nov 26 14:26:53 2006 +0100
     1.3 @@ -50,7 +50,7 @@
     1.4  
     1.5  	if(rreg)
     1.6  		return;
     1.7 -	len = sizeof(rule) / sizeof(rule[0]);
     1.8 +	len = sizeof rule / sizeof rule[0];
     1.9  	rreg = emallocz(len * sizeof(RReg));
    1.10  	for(i = 0; i < len; i++) {
    1.11  		if(rule[i].clpattern) {
    1.12 @@ -83,7 +83,7 @@
    1.13  			c->tags[i] = trans->tags[i];
    1.14  	}
    1.15  	else if(XGetClassHint(dpy, c->win, &ch)) {
    1.16 -		snprintf(prop, sizeof(prop), "%s:%s:%s",
    1.17 +		snprintf(prop, sizeof prop, "%s:%s:%s",
    1.18  				ch.res_class ? ch.res_class : "",
    1.19  				ch.res_name ? ch.res_name : "", c->name);
    1.20  		for(i = 0; !matched && i < len; i++)