shrooms-vb-native/cli.c

16 lines
362 B
C
Raw Normal View History

2024-10-15 04:24:13 +00:00
#include <cli.h>
#include <stdio.h>
int parseCLIArgs(int argc, char **argv, CLIArgs *args) {
2024-11-01 01:21:05 +00:00
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];
2024-10-15 04:24:13 +00:00
}
return 0;
}