From a35755c5de808df027675688855d1b621a4fb428 Mon Sep 17 00:00:00 2001 From: Lasse Collin Date: Tue, 14 Jul 2009 21:10:36 +0300 Subject: Allow extra commas in filter-specific options on xz command line. This may slightly ease writing scripts that construct filter-specific option strings dynamically. --- src/xz/options.c | 7 +++++++ 1 file changed, 7 insertions(+) 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'; -- cgit v1.2.3