#include #include int parseCLIArgs(int argc, char **argv, CLIArgs *args) { int arg; args->filename = NULL; for (arg = 1; arg < argc; ++arg) { if (args->filename) { fprintf(stderr, "usage: %s /path/to/rom.vb\n", argv[0]); return 1; } args->filename = argv[arg]; } return 0; }