-/* Root of the chain of complaints that have at some point been issued.
- This is used to reset the counters, and/or report the total counts. */
+/* Register a complaint. This is a macro around complaint_internal to
+ avoid computing complaint's arguments when complaints are disabled.
+ Running FMT via gettext [i.e., _(FMT)] can be quite expensive, for
+ example. */
+#define complaint(FMT, ...) \
+ do \
+ { \
+ extern int stop_whining; \
+ \
+ if (stop_whining > 0) \
+ complaint_internal (FMT, ##__VA_ARGS__); \
+ } \
+ while (0)