diff options
author | Anselm R. Garbe | 2007-08-16 18:41:22 +0200 |
---|---|---|
committer | Anselm R. Garbe | 2007-08-16 18:41:22 +0200 |
commit | 04dec4c94390fdf57893615de5b5872dd5abbce4 (patch) | |
tree | 70baf422ae086ea7467c4550a0cfd0b9f288b4d7 /tag.c | |
parent | e40448fd6340620354d82d801d975eaa53dbd924 (diff) |
made plural arrays
Diffstat (limited to 'tag.c')
-rw-r--r-- | tag.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -59,19 +59,19 @@ compileregs(void) { if(regs) return; - nrules = sizeof rule / sizeof rule[0]; + nrules = sizeof rules / sizeof rules[0]; regs = emallocz(nrules * sizeof(Regs)); for(i = 0; i < nrules; i++) { - if(rule[i].prop) { + if(rules[i].prop) { reg = emallocz(sizeof(regex_t)); - if(regcomp(reg, rule[i].prop, REG_EXTENDED)) + if(regcomp(reg, rules[i].prop, REG_EXTENDED)) free(reg); else regs[i].propregex = reg; } - if(rule[i].tags) { + if(rules[i].tags) { reg = emallocz(sizeof(regex_t)); - if(regcomp(reg, rule[i].tags, REG_EXTENDED)) + if(regcomp(reg, rules[i].tags, REG_EXTENDED)) free(reg); else regs[i].tagregex = reg; @@ -124,7 +124,7 @@ settags(Client *c, Client *trans) { ch.res_name ? ch.res_name : "", c->name); for(i = 0; i < nrules; i++) if(regs[i].propregex && !regexec(regs[i].propregex, prop, 1, &tmp, 0)) { - c->isfloating = rule[i].isfloating; + c->isfloating = rules[i].isfloating; for(j = 0; regs[i].tagregex && j < ntags; j++) { if(!regexec(regs[i].tagregex, tags[j], 1, &tmp, 0)) { matched = True; |