aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorarg@mig29 <unknown>2006-12-03 11:21:25 +0100
committerarg@mig29 <unknown>2006-12-03 11:21:25 +0100
commitc53d9d516a871661414ff8110cd3c17c3dc525ec (patch)
treec84fa754ba96986c9cb17134f1d7a10a00f33efa
parent7739e6b466481e66ad6b6fc8fb49fd884035431b (diff)
applied Manuel's regex patch
-rw-r--r--tag.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/tag.c b/tag.c
index 20a0a17..609ce9c 100644
--- a/tag.c
+++ b/tag.c
@@ -55,14 +55,14 @@ initrregs(void) {
for(i = 0; i < len; i++) {
if(rule[i].clpattern) {
reg = emallocz(sizeof(regex_t));
- if(regcomp(reg, rule[i].clpattern, 0))
+ if(regcomp(reg, rule[i].clpattern, REG_EXTENDED))
free(reg);
else
rreg[i].clregex = reg;
}
if(rule[i].tpattern) {
reg = emallocz(sizeof(regex_t));
- if(regcomp(reg, rule[i].tpattern, 0))
+ if(regcomp(reg, rule[i].tpattern, REG_EXTENDED))
free(reg);
else
rreg[i].tregex = reg;
@@ -86,7 +86,7 @@ settags(Client *c, Client *trans) {
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++)
+ for(i = 0; i < len; i++)
if(rreg[i].clregex && !regexec(rreg[i].clregex, prop, 1, &tmp, 0)) {
c->isfloat = rule[i].isfloat;
for(j = 0; rreg[i].tregex && j < ntags; j++) {