summary refs log tree commit diff
path: root/calmwm.h
diff options
context:
space:
mode:
Diffstat (limited to 'calmwm.h')
-rw-r--r--calmwm.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/calmwm.h b/calmwm.h
index 27fc91b..87c54f8 100644
--- a/calmwm.h
+++ b/calmwm.h
@@ -51,6 +51,10 @@
 			PointerMotionMask)
 #define SearchMask	(KeyPressMask|ExposureMask)
 
+#ifndef nitems
+#define nitems(_a) (sizeof((_a)) / sizeof((_a)[0]))
+#endif
+
 enum cwmcolor {
 	CWM_COLOR_BORDOR_ACTIVE,
 	CWM_COLOR_BORDER_INACTIVE,