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.
This commit is contained in:
parent
ea4244de91
commit
e3620a3781
14 changed files with 105 additions and 14 deletions
|
|
@ -16,8 +16,6 @@
|
|||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <signal.h>
|
||||
#include <sys/types.h>
|
||||
#include <fcntl.h>
|
||||
#ifdef BSD
|
||||
#include <sys/time.h>
|
||||
#else
|
||||
|
|
@ -33,8 +31,6 @@ extern struct uwdata wdata, oldwin;
|
|||
extern char oldtext[WTXTNUM][WTXTLEN];
|
||||
#endif
|
||||
|
||||
int scorefd = -1;
|
||||
FILE *logfile = NULL;
|
||||
void open_records(void);
|
||||
|
||||
main(argc, argv, envp)
|
||||
|
|
@ -553,7 +549,7 @@ void
|
|||
open_records(void)
|
||||
{
|
||||
if (scorefd == -1)
|
||||
scorefd = open(score_file, O_RDWR | O_CREAT, 0666);
|
||||
md_reopen_score();
|
||||
#ifdef LOGFILE
|
||||
if (logfile == NULL)
|
||||
logfile = fopen(LOGFILE, "a");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue