# HG changeset patch # User Matti Hamalainen # Date 1588072610 -10800 # Node ID fce2ed3f681ff66c695fafba95e96316e598218f # Parent 79e3f824a2d07019ef62a18cca5a006a990026c2 Change dmParseIntValWithSep() separator spec from char to char *, to specify varying number of separators. diff -r 79e3f824a2d0 -r fce2ed3f681f tools/gfxconv.c --- a/tools/gfxconv.c Tue Apr 28 01:41:44 2020 +0300 +++ b/tools/gfxconv.c Tue Apr 28 14:16:50 2020 +0300 @@ -649,7 +649,7 @@ } -BOOL dmParseIntValWithSep(char **arg, unsigned int *value, char *last, const char sep) +BOOL dmParseIntValWithSep(char **arg, unsigned int *value, char *last, const char *sep) { char *ptr = *arg, *end, *start; @@ -662,7 +662,7 @@ // Find next not-xdigit/separator while (*ptr != 0 && (isxdigit(*ptr) || *ptr == 'x' || *ptr == '$') && - *ptr != sep) + strchr(sep, *ptr) == NULL) ptr++; end = ptr; @@ -820,10 +820,10 @@ optScaleMode = SCALE_SET; // Parse the values - if (dmParseIntValWithSep(&tmpOpt, &tmpUInt, &sep, ':')) + if (dmParseIntValWithSep(&tmpOpt, &tmpUInt, &sep, ":")) { if (sep == ':' && - dmParseIntValWithSep(&tmpOpt, &tmpUInt2, &sep, '*')) + dmParseIntValWithSep(&tmpOpt, &tmpUInt2, &sep, "*")) { optSpec.scaleX = tmpUInt; optSpec.scaleY = tmpUInt2;