(subcommand_string): New function.
archive_format = p->fmt;
}
-static const char *
+const char *
archive_format_string (enum archive_format fmt)
{
struct fmttab const *p;
_("GNU features wanted on incompatible archive format")));
}
+const char *
+subcommand_string (enum subcommand c)
+{
+ switch (c)
+ {
+ case UNKNOWN_SUBCOMMAND:
+ return "unknown?";
+
+ case APPEND_SUBCOMMAND:
+ return "-r";
+
+ case CAT_SUBCOMMAND:
+ return "-A";
+
+ case CREATE_SUBCOMMAND:
+ return "-c";
+
+ case DELETE_SUBCOMMAND:
+ return "-D";
+
+ case DIFF_SUBCOMMAND:
+ return "-d";
+
+ case EXTRACT_SUBCOMMAND:
+ return "-x";
+
+ case LIST_SUBCOMMAND:
+ return "-t";
+
+ case UPDATE_SUBCOMMAND:
+ return "-u";
+
+ default:
+ abort ();
+ }
+}
\f
/* Options. */