UltraRogue: begin autoconfiscation.

Build options can now be set with configure.
This commit is contained in:
John "Elwin" Edwards 2017-09-04 21:08:09 -04:00
parent 6c46840eab
commit e3c596c443
6 changed files with 315 additions and 12 deletions

View file

@ -16,7 +16,9 @@
#include <string.h>
#include "rogue.h"
#define CHRDIR "."
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#define I_STR 0
#define I_INTEL 1
@ -38,12 +40,12 @@ static void get_chr_filename(char *filename, int size)
home = getenv("HOME");
#ifdef CHRDIR
#ifdef CHARDIR
if (use_savedir)
{
strncpy(filename, CHRDIR, size);
strncpy(filename, CHARDIR, size);
filename[size-1] = '\0';
snprintf(filename, size, "%s/%d-%.80s.chr", CHRDIR, md_getuid(),
snprintf(filename, size, "%s/%d-%.80s.chr", CHARDIR, md_getuid(),
whoami);
return;
}