From: Lasse Collin Date: Tue, 14 Jul 2009 18:10:36 +0000 (+0300) Subject: Allow extra commas in filter-specific options on xz command line. X-Git-Tag: upstream/5.1.3~488 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a35755c5de808df027675688855d1b621a4fb428;p=platform%2Fupstream%2Fxz.git Allow extra commas in filter-specific options on xz command line. This may slightly ease writing scripts that construct filter-specific option strings dynamically. --- diff --git a/src/xz/options.c b/src/xz/options.c index 3d5d887..8ac6750 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';