about summary refs log tree commit diff
diff options
context:
space:
mode:
authorokan <okan>2013-07-16 14:04:44 +0000
committerokan <okan>2013-07-16 14:04:44 +0000
commitca416b6b82ace271f29e591081d4a9fe87614d06 (patch)
tree3c83bff04b9354c4c8a8eef75d6e98f986be3fcf
parentae4ab065599ec7b0656c513f8243036b19b5703a (diff)
downloadcwm-ca416b6b82ace271f29e591081d4a9fe87614d06.tar.gz
cwm-ca416b6b82ace271f29e591081d4a9fe87614d06.tar.xz
cwm-ca416b6b82ace271f29e591081d4a9fe87614d06.zip
max -> nitems
-rw-r--r--calmwm.h6
-rw-r--r--conf.c2
-rw-r--r--parse.y2
3 files changed, 5 insertions, 5 deletions
diff --git a/calmwm.h b/calmwm.h
index bfb8653..e80f5d0 100644
--- a/calmwm.h
+++ b/calmwm.h
@@ -103,7 +103,7 @@ enum color {
 	CWM_COLOR_MENU_BG,
 	CWM_COLOR_MENU_FONT,
 	CWM_COLOR_MENU_FONT_SEL,
-	CWM_COLOR_MAX
+	CWM_COLOR_NITEMS
 };
 
 struct geom {
@@ -223,7 +223,7 @@ struct screen_ctx {
 	struct geom		 work; /* workable area, gap-applied */
 	struct gap		 gap;
 	struct cycle_entry_q	 mruq;
-	XftColor		 xftcolor[CWM_COLOR_MAX];
+	XftColor		 xftcolor[CWM_COLOR_NITEMS];
 	XftDraw			*xftdraw;
 	XftFont			*xftfont;
 	int			 xinerama_no;
@@ -297,7 +297,7 @@ struct conf {
 #define	CONF_SNAPDIST			0
 	int			 snapdist;
 	struct gap		 gap;
-	char			*color[CWM_COLOR_MAX];
+	char			*color[CWM_COLOR_NITEMS];
 	char			 termpath[MAXPATHLEN];
 	char			 lockpath[MAXPATHLEN];
 	char			 known_hosts[MAXPATHLEN];
diff --git a/conf.c b/conf.c
index 504c867..01cee6b 100644
--- a/conf.c
+++ b/conf.c
@@ -288,7 +288,7 @@ conf_clear(struct conf *c)
 		free(mb);
 	}
 
-	for (i = 0; i < CWM_COLOR_MAX; i++)
+	for (i = 0; i < CWM_COLOR_NITEMS; i++)
 		free(c->color[i]);
 
 	free(c->font);
diff --git a/parse.y b/parse.y
index 58afd25..e2a6885 100644
--- a/parse.y
+++ b/parse.y
@@ -597,7 +597,7 @@ parse_config(const char *filename, struct conf *xconf)
 		(void)strlcpy(xconf->lockpath, conf->lockpath,
 		    sizeof(xconf->lockpath));
 
-		for (i = 0; i < CWM_COLOR_MAX; i++)
+		for (i = 0; i < CWM_COLOR_NITEMS; i++)
 			xconf->color[i] = conf->color[i];
 
 		xconf->font = conf->font;