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