| 99 | } |
| 100 | |
| 101 | static int mainExtended(std::vector<Command>& subcommands, |
| 102 | const std::string& command, |
| 103 | int argc, |
| 104 | const char* argv[]) |
| 105 | { |
| 106 | if (argc == 1) |
| 107 | extendedHelp(subcommands, command); |
| 108 | |
| 109 | std::string format = argv[1]; |
| 110 | if (format == "--help") |
| 111 | extendedHelp(subcommands, command); |
| 112 | |
| 113 | for (Command& c : subcommands) |
| 114 | { |
| 115 | if (format == c.name) |
| 116 | return c.main(argc - 1, argv + 1); |
| 117 | } |
| 118 | |
| 119 | std::cerr << "fluxengine: unrecognised format (try --help)\n"; |
| 120 | return 1; |
| 121 | } |
| 122 | |
| 123 | static int mainAnalyse(int argc, const char* argv[]) |
| 124 | { |
no test coverage detected