# HG changeset patch # User Matti Hamalainen # Date 1588091164 -10800 # Node ID 1bd7387984ed405ba6fcdadd2bd87367ec513e31 # Parent ed2f56abda222492a8faf645fe2aba56280c0d5f Add few comments to the -R sub-option parsing and remove dead code. diff -r ed2f56abda22 -r 1bd7387984ed tools/gfxconv.c --- a/tools/gfxconv.c Tue Apr 28 19:16:19 2020 +0300 +++ b/tools/gfxconv.c Tue Apr 28 19:26:04 2020 +0300 @@ -990,14 +990,16 @@ break; case 42: + // Check if any flags/sub-options are specified if ((tmpStr = strchr(optArg, '+')) != NULL) { *tmpStr++ = 0; do { - char sep, *topt; - topt = dmParseValWithSep(&tmpStr, &sep, NULL, "+"); - + // Parse one sub-option + char sep, *topt = dmParseValWithSep(&tmpStr, &sep, NULL, "+"); + + // Check what option we have if (strcasecmp(topt, "remove") == 0) optRemapRemove = TRUE; else @@ -1044,6 +1046,7 @@ } while (*tmpStr != 0); } + // Check which remap mode is being requested if (strcasecmp(optArg, "auto") == 0) { if (optRemapMode != REMAP_NONE && optRemapMode != REMAP_AUTO) @@ -1052,11 +1055,6 @@ return FALSE; } - // Check if we have more? - if (optArg[4] == ':') - { - } - optRemapMode = REMAP_AUTO; } else