shrooms-vb-native/cli.c

16 lines
362 B
C

#include <cli.h>
#include <stdio.h>
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;
}