Introduction
Introduction Statistics Contact Development Disclaimer Help
tmade plural arrays - dwm - [fork] customized build of dwm, the dynamic window …
git clone git://src.adamsgaard.dk/dwm
Log
Files
Refs
README
LICENSE
---
commit 04dec4c94390fdf57893615de5b5872dd5abbce4
parent e40448fd6340620354d82d801d975eaa53dbd924
Author: Anselm R. Garbe <[email protected]>
Date: Thu, 16 Aug 2007 18:41:22 +0200
made plural arrays
Diffstat:
M config.arg.h | 6 +++---
M config.default.h | 6 +++---
M event.c | 22 +++++++++++-----------
M layout.c | 12 ++++++------
M tag.c | 12 ++++++------
5 files changed, 29 insertions(+), 29 deletions(-)
---
diff --git a/config.arg.h b/config.arg.h
t@@ -15,7 +15,7 @@
#define TAGS \
const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9", NULL };
#define RULES \
-static Rule rule[] = { \
+static Rule rules[] = { \
/* class:instance:title regex tags regex isfloating */ \
{ "Firefox", "3", False }, \
{ "Gimp", NULL, True }, \
t@@ -26,7 +26,7 @@ static Rule rule[] = { \
/* layout(s) */
#include "tile.h"
#define LAYOUTS \
-static Layout layout[] = { \
+static Layout layouts[] = { \
/* symbol function */ \
{ "[]=", tile }, /* first entry is default */ \
{ "><>", floating }, \
t@@ -37,7 +37,7 @@ static Layout layout[] = { \
/* key definitions */
#define MODKEY Mod1Mask
#define KEYS \
-Key key[] = { \
+Key keys[] = { \
/* modifier key function …
{ MODKEY, XK_p, spawn, \
"exe=`dmenu_path | dmenu -fn '"FONT"' -nb '"NORMBGCOLOR"' -nf …
diff --git a/config.default.h b/config.default.h
t@@ -17,7 +17,7 @@ const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8…
/* Query class:instance:title for regex matching info with following command:
* xprop | awk -F '"' '/^WM_CLASS/ { printf("%s:%s:",$4,$2) }; /^WM_NAME/ { pr…
#define RULES \
-static Rule rule[] = { \
+static Rule rules[] = { \
/* class:instance:title regex tags regex isfloating */ \
{ "Gimp", NULL, True }, \
{ "MPlayer", NULL, True }, \
t@@ -27,7 +27,7 @@ static Rule rule[] = { \
/* layout(s) */
#include "tile.h"
#define LAYOUTS \
-static Layout layout[] = { \
+static Layout layouts[] = { \
/* symbol function */ \
{ "[]=", tile }, /* first entry is default */ \
{ "><>", floating }, \
t@@ -38,7 +38,7 @@ static Layout layout[] = { \
/* key definitions */
#define MODKEY Mod1Mask
#define KEYS \
-Key key[] = { \
+Key keys[] = { \
/* modifier key function …
{ MODKEY|ShiftMask, XK_Return, spawn, …
{ MODKEY, XK_p, spawn, …
diff --git a/event.c b/event.c
t@@ -252,18 +252,18 @@ expose(XEvent *e) {
static void
keypress(XEvent *e) {
KEYS
- unsigned int len = sizeof key / sizeof key[0];
+ unsigned int len = sizeof keys / sizeof keys[0];
unsigned int i;
KeySym keysym;
XKeyEvent *ev = &e->xkey;
keysym = XKeycodeToKeysym(dpy, (KeyCode)ev->keycode, 0);
for(i = 0; i < len; i++)
- if(keysym == key[i].keysym
- && CLEANMASK(key[i].mod) == CLEANMASK(ev->state))
+ if(keysym == keys[i].keysym
+ && CLEANMASK(keys[i].mod) == CLEANMASK(ev->state))
{
- if(key[i].func)
- key[i].func(key[i].arg);
+ if(keys[i].func)
+ keys[i].func(keys[i].arg);
}
}
t@@ -358,20 +358,20 @@ void (*handler[LASTEvent]) (XEvent *) = {
void
grabkeys(void) {
KEYS
- unsigned int len = sizeof key / sizeof key[0];
+ unsigned int len = sizeof keys / sizeof keys[0];
unsigned int i;
KeyCode code;
XUngrabKey(dpy, AnyKey, AnyModifier, root);
for(i = 0; i < len; i++) {
- code = XKeysymToKeycode(dpy, key[i].keysym);
- XGrabKey(dpy, code, key[i].mod, root, True,
+ code = XKeysymToKeycode(dpy, keys[i].keysym);
+ XGrabKey(dpy, code, keys[i].mod, root, True,
GrabModeAsync, GrabModeAsync);
- XGrabKey(dpy, code, key[i].mod | LockMask, root, True,
+ XGrabKey(dpy, code, keys[i].mod | LockMask, root, True,
GrabModeAsync, GrabModeAsync);
- XGrabKey(dpy, code, key[i].mod | numlockmask, root, True,
+ XGrabKey(dpy, code, keys[i].mod | numlockmask, root, True,
GrabModeAsync, GrabModeAsync);
- XGrabKey(dpy, code, key[i].mod | numlockmask | LockMask, root,…
+ XGrabKey(dpy, code, keys[i].mod | numlockmask | LockMask, root…
GrabModeAsync, GrabModeAsync);
}
}
diff --git a/layout.c b/layout.c
t@@ -94,10 +94,10 @@ void
initlayouts(void) {
unsigned int i, w;
- lt = &layout[0];
- nlayouts = sizeof layout / sizeof layout[0];
+ lt = &layouts[0];
+ nlayouts = sizeof layouts / sizeof layouts[0];
for(blw = i = 0; i < nlayouts; i++) {
- w = textw(layout[i].symbol);
+ w = textw(layouts[i].symbol);
if(w > blw)
blw = w;
}
t@@ -144,14 +144,14 @@ setlayout(const char *arg) {
if(!arg) {
lt++;
- if(lt == layout + nlayouts)
- lt = layout;
+ if(lt == layouts + nlayouts)
+ lt = layouts;
}
else {
i = atoi(arg);
if(i < 0 || i >= nlayouts)
return;
- lt = &layout[i];
+ lt = &layouts[i];
}
if(sel)
arrange();
diff --git a/tag.c b/tag.c
t@@ -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;
t@@ -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, pr…
- 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],…
matched = True;
You are viewing proxied material from mx1.adamsgaard.dk. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.