Got questions, comments, patches, etc.?
Contact Jason Woofenden
gitweb
/
vor.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
destroy some rocks with bang dots
[vor.git]
/
args.c
diff --git
a/args.c
b/args.c
index
f194690
..
5056239
100644
(file)
--- a/
args.c
+++ b/
args.c
@@
-2,12
+2,15
@@
#include <stdlib.h>
#include <stdio.h>
#include "args.h"
#include <stdlib.h>
#include <stdio.h>
#include "args.h"
-#include "config.h"
+#include <config.h>
+#include "vorconfig.h"
// Look and Feel
int opt_fullscreen;
int opt_sound;
// Look and Feel
int opt_fullscreen;
int opt_sound;
+int opt_autopilot;
+
static void
show_help(void)
{
static void
show_help(void)
{
@@
-18,9
+21,6
@@
show_help(void)
puts(" -V, --version Print program version");
puts(" -?, --help Give this help list");
putchar('\n');
puts(" -V, --version Print program version");
puts(" -?, --help Give this help list");
putchar('\n');
- puts("Mandatory or optional arguments to long options are also mandatory or optional");
- puts("for any corresponding short options.");
- putchar('\n');
puts("Report bugs at http://jasonwoof.com/contact.html");
}
puts("Report bugs at http://jasonwoof.com/contact.html");
}
@@
-31,10
+31,11
@@
short_opt(char c, char *arg)
case 'f': opt_fullscreen = 1; break;
case 's': opt_sound = 0; break;
case 'V':
case 'f': opt_fullscreen = 1; break;
case 's': opt_sound = 0; break;
case 'V':
- printf("Variations on Rockdodger %s\n", VERSION);
+ printf("Variations on Rockdodger %s\n", PACKAGE_VERSION);
exit(0);
case '?':
case 'h': return 0;
exit(0);
case '?':
case 'h': return 0;
+ case 'a': opt_autopilot = 1; break;
default:
fprintf(stderr, "unknown option -%c\n\n", c);
return 0;
default:
fprintf(stderr, "unknown option -%c\n\n", c);
return 0;
@@
-49,9
+50,9
@@
parse_short_opts(const char *s, char *arg)
return short_opt(*s, 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)
int
parse_long_opt(const char *s, char *arg)
@@
-70,6
+71,7
@@
init_opts(void)
{
opt_fullscreen = 0;
opt_sound = 1;
{
opt_fullscreen = 0;
opt_sound = 1;
+ opt_autopilot = 0;
}
int
}
int