+/*
+ * Print a message and execute some statement(s) if the expression evaluates
+ * to zero. Intended to help verify that assumed constraints on the file
+ * format actually are not violated.
+ */
+#define format_assert(expr, body) do { \
+ if (!(expr)) { \
+ fprintf(stderr, "%s: %d: %s: format assertion failed: %s\n", \
+ __FILE__, __LINE__, __func__, #expr); \
+ body; \
+ } \
+} while (0)
+