+/**
+ * @extract: command line arguments to pass to extract a file from the archive
+ * to stdout.
+ * @list: command line arguments to list the archive contents
+ * @decompress_tmp: command line arguments to pass to extract the archive
+ * into a directory.
+ * @regex_arg: whether the command can accept regex expressions
+ * @offset: the position offset of the filename on each line in the output of
+ * running the @list command
+ */
+typedef struct {
+ char *extract;
+ char *list;
+ char *decompress_tmp;
+ gboolean regex_arg;
+ gint offset;
+} ComicBookDecompressCommand;
+
+static const ComicBookDecompressCommand command_usage_def[] = {
+ /* RARLABS unrar */
+ {"%s p -c- -ierr --", "%s vb -c- -- %s", NULL , FALSE, NO_OFFSET},
+
+ /* GNA! unrar */
+ {NULL , "%s t %s" , "%s -xf %s %s" , FALSE, NO_OFFSET},
+
+ /* unzip */
+ {"%s -p -C --" , "%s %s" , NULL , TRUE , OFFSET_ZIP},
+
+ /* 7zip */
+ {NULL , "%s l -- %s" , "%s x -y %s -o%s", FALSE, OFFSET_7Z},