Mercurial > hg > dmlib
changeset 2485:fce2ed3f681f
Change dmParseIntValWithSep() separator spec from char to char *, to specify
varying number of separators.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Tue, 28 Apr 2020 14:16:50 +0300 |
parents | 79e3f824a2d0 |
children | 6d12670e0248 |
files | tools/gfxconv.c |
diffstat | 1 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- 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;