api documentation for ec_parse
[protos/libecoli.git] / include / ecoli_utils.h
index 5a14192..7d6afcb 100644 (file)
@@ -2,6 +2,14 @@
  * Copyright 2018, Olivier MATZ <zer0@droids-corp.org>
  */
 
+/**
+ * @defgroup utils Utils
+ * @{
+ *
+ * @brief Misc utils
+ */
+
+
 #ifndef ECOLI_UTILS_
 #define ECOLI_UTILS_
 
        (new_type)__x;                          \
        })
 
+/**
+ * Mark the end of the arguments list in some functions.
+ */
+#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
+
+/** @} */