comparison sidinfo.c @ 327:b6f88c150573

Use the newly added (in th-libs th_args module) option argument name field.
author Matti Hamalainen <ccr@tnsp.org>
date Sun, 12 Jan 2020 18:04:38 +0200
parents 589bd78cc67d
children 04ed43ef97e7
comparison
equal deleted inserted replaced
326:589bd78cc67d 327:b6f88c150573
117 117
118 118
119 // Define option arguments 119 // Define option arguments
120 static const th_optarg optList[] = 120 static const th_optarg optList[] =
121 { 121 {
122 { 0, '?', "help", "Show this help", OPT_NONE }, 122 { 0, '?', "help" , NULL , "Show this help", OPT_NONE },
123 { 1, 0, "license", "Print out this program's license agreement", OPT_NONE }, 123 { 1, 0, "license" , NULL , "Print out this program's license agreement", OPT_NONE },
124 { 2, 'v', "verbose", "Be more verbose", OPT_NONE }, 124 { 2, 'v', NULL , NULL , "Be more verbose", OPT_NONE },
125 125
126 { 3, 'p', "parsable", "Output in script-parsable format", OPT_NONE }, 126 { 3, 'p', "parsable" , NULL , "Output in script-parsable format", OPT_NONE },
127 { 4, 'x', "hex", "Use hexadecimal values", OPT_NONE }, 127 { 4, 'x', "hex" , NULL , "Use hexadecimal values", OPT_NONE },
128 { 5, 'n', "noprefix", "Output without field name prefix", OPT_NONE }, 128 { 5, 'n', "noprefix" , NULL , "Output without field name prefix", OPT_NONE },
129 { 6, 'l', "line", "Output in one line format, -l <field separator>", OPT_ARGREQ }, 129 { 6, 'l', "line" , "sep" , "Output in one line format, -l <field sep str>", OPT_ARGREQ },
130 { 7, 'e', "escape", "Escape these characters in fields (see note)", OPT_ARGREQ }, 130 { 7, 'e', "escape" , "chars" , "Escape these characters in fields (see note)", OPT_ARGREQ },
131 { 8, 'f', "fields", "Show only specified field(s)", OPT_ARGREQ }, 131 { 8, 'f', "fields" , "fields" , "Show only specified field(s)", OPT_ARGREQ },
132 { 9, 'F', "format", "Use given format string (see below)", OPT_ARGREQ }, 132 { 9, 'F', "format" , "fmt" , "Use given format string (see below)", OPT_ARGREQ },
133 { 19, 'H', "hvsc", "Specify path to HVSC root directory", OPT_ARGREQ }, 133 { 19, 'H', "hvsc" , "path" , "Specify path to HVSC root directory", OPT_ARGREQ },
134 { 11, 'S', "sldb", "Specify Songlengths.(txt|md5) file", OPT_ARGREQ }, 134 { 11, 'S', "sldb" , "file" , "Specify Songlengths.(txt|md5) file", OPT_ARGREQ },
135 { 12, 'T', "stildb", "Specify STIL.txt file", OPT_ARGREQ }, 135 { 12, 'T', "stildb" , "file" , "Specify STIL.txt file", OPT_ARGREQ },
136 { 13, 'R', "recurse", "Recurse into sub-directories", OPT_NONE }, 136 { 13, 'R', "recurse" , NULL , "Recurse into sub-directories", OPT_NONE },
137 }; 137 };
138 138
139 static const int optListN = sizeof(optList) / sizeof(optList[0]); 139 static const int optListN = sizeof(optList) / sizeof(optList[0]);
140 140
141 141