diff urogue/getplay.c @ 273:51ddbe7b992d

UltraRogue: begin autoconfiscation. Build options can now be set with configure.
author John "Elwin" Edwards
date Mon, 04 Sep 2017 21:08:09 -0400
parents 778938a5c21d
children 0250220d8cdd
line wrap: on
line diff
--- a/urogue/getplay.c	Sun Sep 03 19:58:22 2017 -0400
+++ b/urogue/getplay.c	Mon Sep 04 21:08:09 2017 -0400
@@ -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 @@
  
     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;
     }