aboutsummaryrefslogtreecommitdiffstats
path: root/calmwm.h
diff options
context:
space:
mode:
authorokan2011-03-22 10:57:31 +0000
committerokan2011-03-22 10:57:31 +0000
commitc5841193570edf6eca119c583d9e790eef12dcb1 (patch)
tree82cb7021fa6527f717129aceabeaa68ff00fde3a /calmwm.h
parent6744c6dfbae31f04a8b397d35d144743b5845246 (diff)
downloadcwm-c5841193570edf6eca119c583d9e790eef12dcb1.tar.gz
introduce nitems macro, with the appropriate ifndef.
ok oga@
Diffstat (limited to '')
-rw-r--r--calmwm.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/calmwm.h b/calmwm.h
index 59da0f1..0f9b18b 100644
--- a/calmwm.h
+++ b/calmwm.h
@@ -15,7 +15,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * $Id: calmwm.h,v 1.121 2011/03/22 10:52:37 okan Exp $
+ * $Id: calmwm.h,v 1.122 2011/03/22 10:57:31 okan Exp $
*/
#ifndef _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,