Added -v option to print version info
This commit is contained in:
parent
9000847ee3
commit
4dd2faad2b
8
rc.c
8
rc.c
|
@ -177,12 +177,18 @@ int main (int argc, char **argv) {
|
|||
sprintf(hiscoreserver, "ratcatcher.nethack.net");
|
||||
hiscoreport = 80;
|
||||
|
||||
// set program name (including version string)
|
||||
sprintf(progname, "Rat Catcher v0.%d", REV);
|
||||
|
||||
/* handle arguments */
|
||||
if (argc >= 2) {
|
||||
for (i = 1; i < argc; i++) {
|
||||
if (!strcmp(argv[i], "-fs")) {
|
||||
printf("Fullscreen mode enabled.\n");
|
||||
fullscreen = B_TRUE;
|
||||
} else if (!strcmp(argv[i], "-v")) {
|
||||
printf("%s\n",progname);
|
||||
exit(1);
|
||||
} else if (!strcmp(argv[i], "-d")) {
|
||||
if (++i >= argc) {
|
||||
printf("Missing data dir.\n");
|
||||
|
@ -247,8 +253,6 @@ int main (int argc, char **argv) {
|
|||
datadir = strdup("data");
|
||||
}
|
||||
|
||||
// set program name (including version string)
|
||||
sprintf(progname, "Rat Catcher v0.%d", REV);
|
||||
|
||||
initsdl();
|
||||
if (TTF_Init()) {
|
||||
|
|
Loading…
Reference in New Issue