Change logf to logfi
This commit is contained in:
parent
bd3b2e4e53
commit
70a8187173
3 changed files with 13 additions and 13 deletions
|
|
@ -23,7 +23,7 @@ WINDOW *cw; /* Window that the player sees */
|
|||
WINDOW *hw; /* Used for the help command */
|
||||
WINDOW *mw; /* Used to store mosnters */
|
||||
FILE *scoreboard = NULL;
|
||||
FILE *logf = NULL;
|
||||
FILE *logfi = NULL;
|
||||
|
||||
main(argc, argv, envp)
|
||||
char **argv;
|
||||
|
|
|
|||
22
rogue3/rip.c
22
rogue3/rip.c
|
|
@ -125,20 +125,20 @@ open_score(void)
|
|||
void open_log(void)
|
||||
{
|
||||
#ifdef LOGFILE
|
||||
if (logf != NULL) {
|
||||
rewind(logf);
|
||||
if (logfi != NULL) {
|
||||
rewind(logfi);
|
||||
return;
|
||||
}
|
||||
|
||||
logf = fopen(LOGFILE, "a");
|
||||
logfi = fopen(LOGFILE, "a");
|
||||
|
||||
if (logf == NULL)
|
||||
if (logfi == NULL)
|
||||
{
|
||||
fprintf(stderr, "Could not open %s for appending: %s\n", LOGFILE, strerror(errno));
|
||||
fflush(stderr);
|
||||
}
|
||||
#else
|
||||
logf == NULL;
|
||||
logfi == NULL;
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
|
@ -355,14 +355,14 @@ void log(int amount, int flags, int monst)
|
|||
else
|
||||
return;
|
||||
|
||||
logf = fopen(LOGFILE, "a"); /* permissions? */
|
||||
if (logf == NULL)
|
||||
logfi = fopen(LOGFILE, "a"); /* permissions? */
|
||||
if (logfi == NULL)
|
||||
return;
|
||||
/* and write it */
|
||||
md_lockfile(logf);
|
||||
fprintf(logf, "%s", logmessage);
|
||||
md_unlockfile(logf);
|
||||
fclose(logf);
|
||||
md_lockfile(logfi);
|
||||
fprintf(logfi, "%s", logmessage);
|
||||
md_unlockfile(logfi);
|
||||
fclose(logfi);
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -443,7 +443,7 @@ extern int inpack; /* Number of things in pack */
|
|||
extern int jump; /* Show running as series of jumps */
|
||||
extern int lastscore; /* Score before this turn */
|
||||
extern int level; /* What level rogue is on */
|
||||
extern FILE * logf;
|
||||
extern FILE * logfi;
|
||||
extern char lvl_mons[27];
|
||||
extern struct linked_list * lvl_obj; /* List of objects on this level */
|
||||
extern int max_hp; /* Player's max hit points */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue