about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAnselm R. Garbe <arg@suckless.org>2007-02-19 14:52:19 +0100
committerAnselm R. Garbe <arg@suckless.org>2007-02-19 14:52:19 +0100
commit2e95bc04135936ff8adc75e57e21f5edab56e0d6 (patch)
tree6bd7991a7cb484c29f06eaee7af0abf5341755ed
parent4cdbd523e5f02f7cf392dda8690f95ce6eaff9dd (diff)
downloaddwm-2e95bc04135936ff8adc75e57e21f5edab56e0d6.tar.gz
renamed Rule members, renamed RReg into Regexps
-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;
 					}
ef='#n229'>229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386