-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 interactive = true;
+
+void print_error(const char *fmt, ...)
+{
+ va_list(ap);
+
+ if (!interactive)
+ fprintf(stderr, "%s: ", progname);
+ fprintf(stderr, "%s", _("error: "));
+
+ va_start(ap, fmt);
+ vfprintf(stderr, fmt, ap);
+ va_end(ap);
+
+ fprintf(stderr, "\n");
+}