-static const char sopts[] = "qbiVH";
-static const struct option lopts[] = {
- { "quiet", 0, NULL, 'q' },
- { "batch", 0, NULL, 'b' },
- { "interactive", 0, NULL, 'i' },
- { "version", 0, NULL, 'V' },
- { "help", 0, NULL, 'H' },
- { 0 }
-};
+static bool batch_mode;
+
+void print_error(const char *fmt, ...)
+{
+ va_list(ap);
+
+ if (batch_mode)
+ fprintf(stderr, "%s: ", progname);
+ fprintf(stderr, "%s", _("error: "));
+
+ va_start(ap, fmt);
+ vfprintf(stderr, fmt, ap);
+ va_end(ap);
+
+ fprintf(stderr, "\n");
+}