+/*
+ * We don't need a real snprintf for testing help functionality; substitute
+ * using vsprintf to ease testing on C89 implementations.
+ */
+#define help_do_snprintf help_do_snprintf
+static inline int help_do_snprintf(char *buf, size_t n, const char *fmt, ...)
+{
+ va_list ap;
+ int ret;
+
+ va_start(ap, fmt);
+ ret = vsprintf(buf, fmt, ap);
+ va_end(ap);
+
+ return ret;
+}
+