aboutsummaryrefslogtreecommitdiff
path: root/src/xz/options.c
diff options
context:
space:
mode:
authorLasse Collin <lasse.collin@tukaani.org>2009-07-14 21:10:36 +0300
committerLasse Collin <lasse.collin@tukaani.org>2009-07-14 21:10:36 +0300
commita35755c5de808df027675688855d1b621a4fb428 (patch)
tree3183feb67552ffa965b87a9acf3c8c9316f29456 /src/xz/options.c
parentAccept --lzma2=preset=6e where "e" is equivalent to --extreme (diff)
downloadxz-a35755c5de808df027675688855d1b621a4fb428.tar.xz
Allow extra commas in filter-specific options on xz command line.
This may slightly ease writing scripts that construct filter-specific option strings dynamically.
Diffstat (limited to '')
-rw-r--r--src/xz/options.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/xz/options.c b/src/xz/options.c
index 3d5d8870..8ac67504 100644
--- a/src/xz/options.c
+++ b/src/xz/options.c
@@ -69,6 +69,13 @@ parse_options(const char *str, const option_map *opts,
char *name = s;
while (true) {
+ if (*name == ',') {
+ if (*++name == '\0')
+ break;
+
+ continue;
+ }
+
char *split = strchr(name, ',');
if (split != NULL)
*split = '\0';