/* * xrick/src/sysarg.c * * Copyright (C) 1998-2002 BigOrno (bigorno@bigorno.net). All rights reserved. * * The use and distribution terms for this software are contained in the file * named README, which can be found in the root of this distribution. By * using this software in any fashion, you are agreeing to be bound by the * terms of this license. * * You must not remove this notice, or any other, from this software. */ /* * 20021010 added test to prevent buffer overrun in -keys parsing. */ #include /* atoi */ #include /* strcasecmp */ #include #include "system.h" #include "config.h" #include "game.h" #include "maps.h" #include "syssnd.h" /* handle Microsoft Visual C (must come after system.h!) */ #ifdef __MSVC__ #define strcasecmp stricmp #endif typedef struct { char name[16]; int code; } sdlcodes_t; static sdlcodes_t sdlcodes[SDLK_LAST] = { #include "sdlcodes.e" }; int sysarg_args_period = 0; int sysarg_args_map = 0; int sysarg_args_submap = 0; int sysarg_args_fullscreen = 0; int sysarg_args_zoom = 0; int sysarg_args_nosound = 0; int sysarg_args_vol = 0; char *sysarg_args_data = NULL; /* * Fail */ void sysarg_fail(char *msg) { #ifdef ENABLE_SOUND printf("xrick [version #%s]: %s\nusage: xrick []\n