]> git.sur5r.net Git - c128-kasse/blobdiff - src/config.c
Use unlink() instead of _sysremove(), cleanup makefile
[c128-kasse] / src / config.c
index a094c05fb0a8c6717e926207ecffef4d886445eb..b1e6a5816be8c8ecc89d5ab7289b5f148cf7d7df 100644 (file)
 #include <string.h>
 #include <stdio.h>
 #include <stdbool.h>
+#include <unistd.h>
 
 #include "kasse.h"
 #include "general.h"
 #include "config.h"
 
 /* undocumented function which scratches files */
-unsigned char __fastcall__ _sysremove(const char *name);
+//unsigned char __fastcall__ _sysremove(const char *name);
 
 unsigned long int money = 0;
 unsigned long int items_sold = 0;
@@ -68,14 +69,14 @@ void load_credits() {
 
 void save_items() {
        if (items_exists)
-               _sysremove("items");
+               unlink("items");
        cbm_save("items", (BYTE)8, &status, sizeof(struct status_array_t));
        items_exists = true;
 }
 
 void save_credits() {
        if (credits_exists)
-               _sysremove("credits");
+               unlink("credits");
        cbm_save("credits", (BYTE)8, &credits, sizeof(struct credits_array_t));
        credits_exists = true;
 }