Add INFGetBollean method
[tedtools.git] / tools.h
diff --git a/tools.h b/tools.h
index f4ee5b7..a7c9b09 100644 (file)
--- a/tools.h
+++ b/tools.h
@@ -46,6 +46,10 @@ double elapsedtime(struct timeval *begin);
 #define offsetof(type, field)   ((int) &((type *)0)->field)
 #endif   /* offsetof */
 
+#ifndef lengthof
+#define lengthof(array) (sizeof (array) / sizeof ((array)[0]))
+#endif
+
 #ifndef TYPEALIGN
 #define TYPEALIGN(ALIGNVAL,LEN)  \
         (((long) (LEN) + ((ALIGNVAL) - 1)) & ~((long) ((ALIGNVAL) - 1)))