| 200 | } |
| 201 | |
| 202 | static void PrintOptions(const CommandLineOptionDefinition* options) |
| 203 | { |
| 204 | // Print options for main commands |
| 205 | size_t maxOptionLength = 0; |
| 206 | const CommandLineOptionDefinition* option = options; |
| 207 | for (; option->Type != 255; option++) |
| 208 | { |
| 209 | char buffer[128]; |
| 210 | GetOptionCaption(buffer, sizeof(buffer), option); |
| 211 | size_t optionCaptionLength = String::lengthOf(buffer); |
| 212 | maxOptionLength = std::max(maxOptionLength, optionCaptionLength); |
| 213 | } |
| 214 | |
| 215 | option = options; |
| 216 | for (; option->Type != 255; option++) |
| 217 | { |
| 218 | Console::WriteSpace(4); |
| 219 | |
| 220 | char buffer[128]; |
| 221 | GetOptionCaption(buffer, sizeof(buffer), option); |
| 222 | size_t optionCaptionLength = String::lengthOf(buffer); |
| 223 | Console::Write(buffer); |
| 224 | |
| 225 | Console::WriteSpace(maxOptionLength - optionCaptionLength + 4); |
| 226 | Console::Write(option->Description); |
| 227 | Console::WriteLine(); |
| 228 | } |
| 229 | Console::WriteLine(); |
| 230 | } |
| 231 | |
| 232 | static void PrintExamples(const CommandLineExample* examples) |
| 233 | { |
no test coverage detected