| 434 | } |
| 435 | |
| 436 | std::optional<int> runCommandLineOnlyCommand(const CommandLineOptions& options) |
| 437 | { |
| 438 | switch (options.action) |
| 439 | { |
| 440 | case CommandLineAction::help: |
| 441 | printHelp(); |
| 442 | return EXIT_FAILURE; |
| 443 | case CommandLineAction::version: |
| 444 | printVersion(); |
| 445 | return EXIT_FAILURE; |
| 446 | case CommandLineAction::uncompress: |
| 447 | return uncompressFile(options); |
| 448 | case CommandLineAction::simulate: |
| 449 | return simulate(options); |
| 450 | case CommandLineAction::compare: |
| 451 | return compare(options); |
| 452 | default: |
| 453 | return std::nullopt; |
| 454 | } |
| 455 | } |
| 456 | |
| 457 | static int uncompressFile(const CommandLineOptions& options) |
| 458 | { |
no test coverage detected