diff srogue/global.c @ 173:78fa1d0e5d25

srogue: open the score and log files when the program starts. Super-Rogue can now use the same privilege-dropping scheme as the other games.
author John "Elwin" Edwards
date Sat, 01 Aug 2015 15:12:11 -0400
parents ee250e3646fd
children d3968e9cb98d
line wrap: on
line diff
--- a/srogue/global.c	Thu Jul 23 19:28:12 2015 -0400
+++ b/srogue/global.c	Sat Aug 01 15:12:11 2015 -0400
@@ -54,6 +54,7 @@
 int hungry_state = F_OKAY;	/* How hungry is he */
 int foodlev = 1;			/* how fast he eats food */
 int ringfood = 0;			/* rings affect on food consumption */
+int scorefd = -1;			/* Scoreboard file descriptor */
 char take;					/* Thing the rogue is taking */
 char runch;					/* Direction player is running */
 char curpurch[15];			/* name of item ready to buy */
@@ -101,6 +102,8 @@
 char callit[] =		{ "Call it: " };
 char starlist[] =	{ " (* for a list)" };
 
+FILE *logfile = NULL;
+
 struct coord oldpos;		/* Pos before last look() call */
 struct coord delta;			/* Change indicated to get_dir() */
 struct coord stairs;		/* where the stairs are put */