DEADSOFTWARE

portability: use posix functions only on unix
[flatwaifu.git] / src / save.c
index 6cfb2b4892a3146bc4e8b27d88338e73cc3dc187..fda50f90baa7ce53a53d846e2b21fb7c8cda5729 100644 (file)
@@ -33,7 +33,9 @@
 
 #include <stdio.h> // FILE
 #include <string.h>
-#include <sys/stat.h>
+#ifdef UNIX
+#  include <sys/stat.h>
+#endif
 #include "files.h"
 #include "my.h"
 
@@ -538,12 +540,12 @@ static void WP_loadgame (FILE *h) {
 
 static char *getsavfpname (int n, int ro) {
   static char fn[] = "savgame0.dat";
-  fn[7] = n + '0';
-#ifndef WIN32
   static char p[100];
+  fn[7] = n + '0';
+#ifdef UNIX
   char *e = getenv("HOME");
   strncpy(p, e, 60);
-  strcat(p, "/.doom2d-rembo");
+  strcat(p, "/.flatwaifu");
   if (!ro) {
     mkdir(p, S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH);
   }