diff arogue7/mdport.c @ 145:aac28331e71d

Advanced Rogue family: fix the "score" option. Changing the score file (when permitted) now works again, closing the old score file and opening the new one.
author John "Elwin" Edwards
date Wed, 20 May 2015 08:42:17 -0400
parents 708bb2dea17c
children 9aa9b9a2e159
line wrap: on
line diff
--- a/arogue7/mdport.c	Mon May 18 10:53:22 2015 -0400
+++ b/arogue7/mdport.c	Wed May 20 08:42:17 2015 -0400
@@ -677,6 +677,17 @@
 #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