diff rogue4/extern.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 e7aab31362af
children 0250220d8cdd
line wrap: on
line diff
--- a/rogue4/extern.c	Sun Sep 10 17:30:13 2017 -0400
+++ b/rogue4/extern.c	Fri Sep 15 19:57:54 2017 -0400
@@ -100,8 +100,6 @@
 int food_left;				/* Amount of food in hero's stomach */
 int group = 2;				/* Current group number */
 int hungry_state = 0;			/* How hungry is he */
-int fd;					/* File descriptor for score file */
-int lfd;				/* File descriptor for log file */
 int a_chances[MAXARMORS] = {		/* Chance for each armor type */
     20,
     35,
@@ -136,6 +134,9 @@
 THING *mlist = NULL;			/* List of monsters on the level */
 THING *_monst[MAXLINES*MAXCOLS];	/* Pointers for monsters at each spot */
 
+FILE *score_file = NULL;		/* Scoreboard */
+FILE *log_file = NULL;			/* Log file */
+
 WINDOW *hw;				/* Used as a scratch window */
 
 #define INIT_STATS { 16, 0, 1, 10, 12, "1d4", 12 }