# HG changeset patch # User Matti Hamalainen # Date 1578775022 -7200 # Node ID 5dfce66cc390055f488b544f79f783736bfb2cdb # Parent 3bb2e0bdd1f0129503ec60505cca324f27507a93 Reorder / clean up the commandline option indices. diff -r 3bb2e0bdd1f0 -r 5dfce66cc390 sidinfo.c --- a/sidinfo.c Sat Jan 11 21:58:45 2020 +0200 +++ b/sidinfo.c Sat Jan 11 22:37:02 2020 +0200 @@ -120,20 +120,20 @@ static const th_optarg optList[] = { { 0, '?', "help", "Show this help", OPT_NONE }, - { 10, 0, "license", "Print out this program's license agreement", OPT_NONE }, - { 1, 'v', "verbose", "Be more verbose", OPT_NONE }, + { 1, 0, "license", "Print out this program's license agreement", OPT_NONE }, + { 2, 'v', "verbose", "Be more verbose", OPT_NONE }, - { 2, 'p', "parsable", "Output in script-parsable format", OPT_NONE }, + { 3, 'p', "parsable", "Output in script-parsable format", OPT_NONE }, + { 4, 'x', "hex", "Use hexadecimal values", OPT_NONE }, { 5, 'n', "noprefix", "Output without field name prefix", OPT_NONE }, { 6, 'l', "line", "Output in one line format, -l ", OPT_ARGREQ }, - { 11, 'e', "escape", "Escape these characters in fields (see note)", OPT_ARGREQ }, - { 3, 'f', "fields", "Show only specified field(s)", OPT_ARGREQ }, - { 4, 'x', "hex", "Use hexadecimal values", OPT_NONE }, - { 7, 'F', "format", "Use given format string (see below)", OPT_ARGREQ }, - { 8, 'H', "hvsc", "Specify path to HVSC root directory", OPT_ARGREQ }, - { 9, 'S', "sldb", "Specify Songlengths.(txt|md5) file", OPT_ARGREQ }, - { 13, 'T', "stildb", "Specify STIL.txt file", OPT_ARGREQ }, - { 12, 'R', "recurse", "Recurse into sub-directories", OPT_NONE }, + { 7, 'e', "escape", "Escape these characters in fields (see note)", OPT_ARGREQ }, + { 8, 'f', "fields", "Show only specified field(s)", OPT_ARGREQ }, + { 9, 'F', "format", "Use given format string (see below)", OPT_ARGREQ }, + { 19, 'H', "hvsc", "Specify path to HVSC root directory", OPT_ARGREQ }, + { 11, 'S', "sldb", "Specify Songlengths.(txt|md5) file", OPT_ARGREQ }, + { 12, 'T', "stildb", "Specify STIL.txt file", OPT_ARGREQ }, + { 13, 'R', "recurse", "Recurse into sub-directories", OPT_NONE }, }; static const int optListN = sizeof(optList) / sizeof(optList[0]); @@ -632,24 +632,19 @@ exit(0); break; - case 10: + case 1: sidutil_print_license(); exit(0); break; - case 1: + case 2: th_verbosity++; break; - case 2: + case 3: optParsable = TRUE; break; - case 3: - if (!argParsePSFields(&optFormat, optArg)) - return FALSE; - break; - case 4: optHexadecimal = TRUE; break; @@ -663,29 +658,33 @@ break; case 7: + optEscapeChars = optArg; + break; + + case 8: + if (!argParsePSFields(&optFormat, optArg)) + return FALSE; + break; + + case 9: optFieldOutput = FALSE; - optParsable = FALSE; if (!argParsePSFormatStr(&optFormat, optArg)) return FALSE; break; - case 8: + case 10: th_pstr_cpy(&setHVSCPath, optArg); break; - case 9: + case 11: th_pstr_cpy(&setSLDBPath, optArg); break; + case 12: + th_pstr_cpy(&setSTILDBPath, optArg); + break; + case 13: - th_pstr_cpy(&setSTILDBPath, optArg); - break; - - case 11: - optEscapeChars = optArg; - break; - - case 12: optRecurseDirs = TRUE; break;