#include <stdint.h>
#include <stdio.h>
-#ifndef EC_COUNT_OF //XXX
-#define EC_COUNT_OF(x) ((sizeof(x)/sizeof(0[x])) / \
- ((size_t)(!(sizeof(x) % sizeof(0[x])))))
-#endif
-
struct ec_config;
struct ec_dict;
*/
struct ec_strvec *ec_strvec(void);
-#ifndef EC_COUNT_OF
-#define EC_COUNT_OF(x) ((sizeof(x)/sizeof(0[x])) / \
- ((size_t)(!(sizeof(x) % sizeof(0[x])))))
-#endif
-
/**
* Allocate a new string vector
*
*/
#define EC_VA_END ((void *)1)
+/**
+ * Count number of elements in an array.
+ */
+#define EC_COUNT_OF(x) ((sizeof(x)/sizeof(0[x])) / \
+ ((size_t)(!(sizeof(x) % sizeof(0[x])))))
+
#endif
/** @} */