diff arogue7/mdport.c @ 279:d3968e9cb98d

Use C stdio functions for score files and save files. Switching from Unix file descriptor operations to C standard FILE* functions will reduce portability problems.
author John "Elwin" Edwards
date Fri, 15 Sep 2017 19:57:54 -0400
parents 3d4252fa2ed3
children 8b6aba552f6f
line wrap: on
line diff
--- a/arogue7/mdport.c	Sun Sep 10 17:30:13 2017 -0400
+++ b/arogue7/mdport.c	Fri Sep 15 19:57:54 2017 -0400
@@ -155,10 +155,10 @@
 }
 
 int
-md_unlink_open_file(char *file, int inf)
+md_unlink_open_file(char *file, FILE *inf)
 {
 #ifdef _WIN32
-    close(inf);
+    fclose(inf);
     chmod(file, 0600);
     return( _unlink(file) );
 #else
@@ -677,17 +677,6 @@
 #endif
 }
 
-extern int scorefd;
-extern char score_file[];
-
-void
-md_reopen_score(void)
-{
-    if (scorefd > 0)
-        close(scorefd);
-    scorefd = open(score_file, O_RDWR | O_CREAT, 0666);
-}
-
 /*
     Cursor/Keypad Support