X-Git-Url: https://jasonwoof.com/gitweb/?p=vor.git;a=blobdiff_plain;f=args.c;h=f747033f2e527a9fe04c8afa6342656bba3830fc;hp=f1946900269009ec28b1807677bef28b3b4d1c6f;hb=0c92fe510799dde8568e4d787908704c35a0864c;hpb=adaa8776a400d807bc859d6669e282010fef3b10 diff --git a/args.c b/args.c index f194690..f747033 100644 --- a/args.c +++ b/args.c @@ -8,6 +8,8 @@ int opt_fullscreen; int opt_sound; +int opt_autopilot; + static void show_help(void) { @@ -35,6 +37,7 @@ short_opt(char c, char *arg) exit(0); case '?': case 'h': return 0; + case 'a': opt_autopilot = 1; break; default: fprintf(stderr, "unknown option -%c\n\n", c); return 0; @@ -49,9 +52,9 @@ parse_short_opts(const char *s, char *arg) return short_opt(*s, arg); } -static char *long_opts[] = { "full-screen", "silent", "version", "help" }; +static char *long_opts[] = { "full-screen", "silent", "version", "help", "autopilot" }; -static char short_opts[] = { 'f', 's', 'V', 'h' }; +static char short_opts[] = { 'f', 's', 'V', 'h', 'a' }; int parse_long_opt(const char *s, char *arg) @@ -70,6 +73,7 @@ init_opts(void) { opt_fullscreen = 0; opt_sound = 1; + opt_autopilot = 0; } int