Mercurial > hg > sidinfo
comparison sidinfo.c @ 351:d54112385845
Reorder option indices.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Mon, 20 Jan 2020 17:13:32 +0200 |
parents | a6153837c138 |
children | 4978ff445572 |
comparison
equal
deleted
inserted
replaced
350:c2ebcb0f0d62 | 351:d54112385845 |
---|---|
122 { | 122 { |
123 { 0, '?', "help" , NULL , "Show this help", OPT_NONE }, | 123 { 0, '?', "help" , NULL , "Show this help", OPT_NONE }, |
124 { 1, 0, "license" , NULL , "Print out this program's license agreement", OPT_NONE }, | 124 { 1, 0, "license" , NULL , "Print out this program's license agreement", OPT_NONE }, |
125 { 2, 'v', "verbose" , NULL , "Be more verbose", OPT_NONE }, | 125 { 2, 'v', "verbose" , NULL , "Be more verbose", OPT_NONE }, |
126 | 126 |
127 { 3, 'p', "parsable" , NULL , "Output in script-parsable format", OPT_NONE }, | 127 { 10, 'p', "parsable" , NULL , "Output in script-parsable format", OPT_NONE }, |
128 { 4, 'x', "hex" , NULL , "Use hexadecimal values", OPT_NONE }, | 128 { 12, 'x', "hex" , NULL , "Use hexadecimal values", OPT_NONE }, |
129 { 5, 'n', "noprefix" , NULL , "Output without field name prefix", OPT_NONE }, | 129 { 14, 'n', "noprefix" , NULL , "Output without field name prefix", OPT_NONE }, |
130 { 6, 'l', "line" , "sep" , "Output in one line format, -l <field sep str>", OPT_ARGREQ }, | 130 { 16, 'l', "line" , "sep" , "Output in one line format, -l <field sep str>", OPT_ARGREQ }, |
131 { 7, 'e', "escape" , "chars" , "Escape these characters in fields (see note)", OPT_ARGREQ }, | 131 { 18, 'e', "escape" , "chars" , "Escape these characters in fields (see note)", OPT_ARGREQ }, |
132 { 8, 'f', "fields" , "fields" , "Show only specified field(s)", OPT_ARGREQ }, | 132 { 20, 'f', "fields" , "fields" , "Show only specified field(s)", OPT_ARGREQ }, |
133 { 9, 'F', "format" , "fmt" , "Use given format string (see below)", OPT_ARGREQ }, | 133 { 22, 'F', "format" , "fmt" , "Use given format string (see below)", OPT_ARGREQ }, |
134 { 10, 'H', "hvsc" , "path" , "Specify path to HVSC root directory", OPT_ARGREQ }, | 134 { 24, 'R', "recurse" , NULL , "Recurse into sub-directories", OPT_NONE }, |
135 { 11, 'S', "sldb" , "file" , "Specify Songlengths.(txt|md5) file", OPT_ARGREQ }, | 135 { 30, 'H', "hvsc" , "path" , "Specify path to HVSC root directory", OPT_ARGREQ }, |
136 { 12, 'T', "stildb" , "file" , "Specify STIL.txt file", OPT_ARGREQ }, | 136 { 32, 'S', "sldb" , "file" , "Specify Songlengths.(txt|md5) file", OPT_ARGREQ }, |
137 { 13, 'R', "recurse" , NULL , "Recurse into sub-directories", OPT_NONE }, | 137 { 34, 'T', "stildb" , "file" , "Specify STIL.txt file", OPT_ARGREQ }, |
138 }; | 138 }; |
139 | 139 |
140 static const int optListN = sizeof(optList) / sizeof(optList[0]); | 140 static const int optListN = sizeof(optList) / sizeof(optList[0]); |
141 | 141 |
142 | 142 |
652 | 652 |
653 case 2: | 653 case 2: |
654 th_verbosity++; | 654 th_verbosity++; |
655 break; | 655 break; |
656 | 656 |
657 case 3: | 657 case 10: |
658 optParsable = TRUE; | 658 optParsable = TRUE; |
659 break; | 659 break; |
660 | 660 |
661 case 4: | 661 case 12: |
662 optHexadecimal = TRUE; | 662 optHexadecimal = TRUE; |
663 break; | 663 break; |
664 | 664 |
665 case 5: | 665 case 14: |
666 optFieldNamePrefix = FALSE; | 666 optFieldNamePrefix = FALSE; |
667 break; | 667 break; |
668 | 668 |
669 case 6: | 669 case 16: |
670 optOneLineFieldSep = optArg; | 670 optOneLineFieldSep = optArg; |
671 break; | 671 break; |
672 | 672 |
673 case 7: | 673 case 18: |
674 optEscapeChars = optArg; | 674 optEscapeChars = optArg; |
675 break; | 675 break; |
676 | 676 |
677 case 8: | 677 case 20: |
678 if (!argParsePSFields(&optFormat, optArg)) | 678 if (!argParsePSFields(&optFormat, optArg)) |
679 return FALSE; | 679 return FALSE; |
680 break; | 680 break; |
681 | 681 |
682 case 9: | 682 case 22: |
683 optFieldOutput = FALSE; | 683 optFieldOutput = FALSE; |
684 if (!argParsePSFormatStr(&optFormat, optArg)) | 684 if (!argParsePSFormatStr(&optFormat, optArg)) |
685 return FALSE; | 685 return FALSE; |
686 break; | 686 break; |
687 | 687 |
688 case 10: | 688 case 24: |
689 optRecurseDirs = TRUE; | |
690 break; | |
691 | |
692 case 30: | |
689 th_pstr_cpy(&setHVSCPath, optArg); | 693 th_pstr_cpy(&setHVSCPath, optArg); |
690 break; | 694 break; |
691 | 695 |
692 case 11: | 696 case 32: |
693 th_pstr_cpy(&setSLDBPath, optArg); | 697 th_pstr_cpy(&setSLDBPath, optArg); |
694 break; | 698 break; |
695 | 699 |
696 case 12: | 700 case 34: |
697 th_pstr_cpy(&setSTILDBPath, optArg); | 701 th_pstr_cpy(&setSTILDBPath, optArg); |
698 break; | |
699 | |
700 case 13: | |
701 optRecurseDirs = TRUE; | |
702 break; | 702 break; |
703 | 703 |
704 default: | 704 default: |
705 THERR("Unknown option '%s'.\n", currArg); | 705 THERR("Unknown option '%s'.\n", currArg); |
706 return FALSE; | 706 return FALSE; |