#include "sandbox.h" #include "utils.h" #include "command.h" #include #include #include #include int main(int argc, char* argv[]) { if (argc < 2) { show_help(); return 0; } Command* command = find_command(argv[1]); if (command == NULL) { log_message(LOG_ERROR, "Unknown command '%s'.", argv[1]); return 1; } switch (command->id) { case CMD_HELP: return cmd_help(argc - 2, argv + 2); case CMD_VERSION: return cmd_version(argc - 2, argv + 2); default: log_message(LOG_ERROR, "Command '%s' is not implemented.", command->name); break; } return 0; }