This is the equivalent of DEFNULL except that it sets a zero value instead
of a NULL for a missing argument.
* use in macros arguments.
*/
#define DEFNULL(...) _FIRST_ARG(NULL, ##__VA_ARGS__, NULL)
+
+/* DEFZERO() returns either the argument as-is, or 0 if absent. This is for
+ * use in macros arguments.
+ */
+#define DEFZERO(...) _FIRST_ARG(NULL, ##__VA_ARGS__, 0)
+
#define _FIRST_ARG(a, b, ...) b
/* options flags for parse_line() */