about summary refs log tree commit diff stats
path: root/manage.c
diff options
context:
space:
mode:
Diffstat (limited to 'manage.c')
-rw-r--r--manage.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/manage.c b/manage.c
index 1e0cb5c..9db139b 100644
--- a/manage.c
+++ b/manage.c
@@ -16,20 +16,20 @@ unsigned int nmaster = NMASTER;
 /* static */
 
 typedef struct {
-	const char *clpattern;
-	const char *tpattern;
+	const char *prop;
+	const char *tags;
 	Bool isfloat;
 } Rule;
 
 typedef struct {
-	regex_t *clregex;
-	regex_t *tregex;
-} RReg;
+	regex_t *propregex;
+	regex_t *tagregex;
+} Regexps;
 
 TAGS
 RULES
 
-static RReg *rreg = NULL;
+static Regexps *regexps = NULL;
 static unsigned int len = 0;
 
 static Client *
@@ -77,24 +77,24 @@ compileregexps(void) {
 	unsigned int i;
 	regex_t *reg;
 
-	if(rreg)
+	if(regexps)
 		return;
 	len = sizeof rule / sizeof rule[0];
-	rreg = emallocz(len * sizeof(RReg));
+	regexps = emallocz(len * sizeof(Regexps));
 	for(i = 0; i < len; i++) {
-		if(rule[i].clpattern) {
+		if(rule[i].prop) {
 			reg = emallocz(sizeof(regex_t));
-			if(regcomp(reg, rule[i].clpattern, REG_EXTENDED))
+			if(regcomp(reg, rule[i].prop, REG_EXTENDED))
 				free(reg);
 			else
-				rreg[i].clregex = reg;
+				regexps[i].propregex = reg;
 		}
-		if(rule[i].tpattern) {
+		if(rule[i].tags) {
 			reg = emallocz(sizeof(regex_t));
-			if(regcomp(reg, rule[i].tpattern, REG_EXTENDED))
+			if(regcomp(reg, rule[i].tags, REG_EXTENDED))
 				free(reg);
 			else
-				rreg[i].tregex = reg;
+				regexps[i].tagregex = reg;
 		}
 	}
 }
@@ -310,10 +310,10 @@ settags(Client *c, Client *trans) {
 				ch.res_class ? ch.res_class : "",
 				ch.res_name ? ch.res_name : "", c->name);
 		for(i = 0; i < len; i++)
-			if(rreg[i].clregex && !regexec(rreg[i].clregex, prop, 1, &tmp, 0)) {
+			if(regexps[i].propregex && !regexec(regexps[i].propregex, prop, 1, &tmp, 0)) {
 				c->isfloat = rule[i].isfloat;
-				for(j = 0; rreg[i].tregex && j < ntags; j++) {
-					if(!regexec(rreg[i].tregex, tags[j], 1, &tmp, 0)) {
+				for(j = 0; regexps[i].tagregex && j < ntags; j++) {
+					if(!regexec(regexps[i].tagregex, tags[j], 1, &tmp, 0)) {
 						matched = True;
 						c->tags[j] = True;
 					}
fa04a1e ^
10dd23f ^


8126d82 ^





aeb7005
648ca98 ^



a21afda ^




1767e4f ^
a21afda ^

a0be5e8 ^

b275a39 ^

39c93d2 ^
60b351b ^
f406bf5 ^



b60999c ^
8126d82 ^



b275a39 ^
8126d82 ^




de122b1 ^
8126d82 ^





f406bf5 ^
8126d82 ^
b60999c ^

f406bf5 ^
77a0f68 ^


1418e1b ^
60b351b ^
de122b1 ^
1418e1b ^
661e3ec ^

305446a ^
6394e38 ^
aeb7005
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107