diff options
author | Anselm R. Garbe | 2007-10-28 12:52:16 +0100 |
---|---|---|
committer | Anselm R. Garbe | 2007-10-28 12:52:16 +0100 |
commit | 0928f785653dec7980f0cfed3c83acde09911282 (patch) | |
tree | e439a4a0232701fd2f86264bc2ac849aeabbb533 /config.def.h | |
parent | 687baf6e26cccdacd6169e974946c72df1f89d31 (diff) | |
download | aur-0928f785653dec7980f0cfed3c83acde09911282.tar.gz |
replaced Nmacros with LENGTH(x) macro
Diffstat (limited to 'config.def.h')
-rw-r--r-- | config.def.h | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/config.def.h b/config.def.h index 2813b3f352f1..1dcd7f933390 100644 --- a/config.def.h +++ b/config.def.h @@ -11,11 +11,13 @@ #define SELBGCOLOR "#0066ff" #define SELFGCOLOR "#ffffff" +/* convenience */ +#define LENGTH(x) (sizeof x / sizeof x[0]) + /* tagging */ const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "www" }; -#define NTAGS (sizeof tags / sizeof tags[0]) -Bool seltags[NTAGS] = {[0] = True}; -Bool prevtags[NTAGS] = {[0] = True}; +Bool seltags[LENGTH(tags)] = {[0] = True}; +Bool prevtags[LENGTH(tags)] = {[0] = True}; Rule rules[] = { /* class:instance:title regex tags regex isfloating */ { "Firefox", "www", False }, @@ -23,7 +25,6 @@ Rule rules[] = { { "MPlayer", NULL, True }, { "Acroread", NULL, True }, }; -#define NRULES (sizeof rules / sizeof rules[0]) /* layout(s) */ #define MWFACT 0.6 /* master width factor [0.1 .. 0.9] */ @@ -33,7 +34,6 @@ Layout layouts[] = { { "[]=", tile }, /* first entry is default */ { "><>", floating }, }; -#define NLAYOUTS (sizeof layouts / sizeof layouts[0]) /* key definitions */ #define MODKEY Mod1Mask @@ -95,4 +95,3 @@ Key keys[] = { \ { MODKEY|ControlMask|ShiftMask, XK_9, toggletag, tags[8] }, \ { MODKEY|ShiftMask, XK_q, quit, NULL }, \ }; -#define NKEYS (sizeof keys / sizeof keys[0]) |