rogue3: make LOGFILE work with SAVEDIR
This commit is contained in:
parent
acb1a4fce9
commit
bbec0d0514
3 changed files with 2 additions and 9 deletions
|
|
@ -38,6 +38,7 @@ char **envp;
|
||||||
md_init(MD_STRIP_CTRL_KEYPAD);
|
md_init(MD_STRIP_CTRL_KEYPAD);
|
||||||
|
|
||||||
open_score();
|
open_score();
|
||||||
|
open_log();
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* check for print-score option
|
* check for print-score option
|
||||||
|
|
|
||||||
|
|
@ -119,17 +119,10 @@ open_score(void)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0 /* not necessary */
|
|
||||||
/* Same thing, but for the log file. Maybe combine them eventually. */
|
/* Same thing, but for the log file. Maybe combine them eventually. */
|
||||||
/* FIXME you don't know what this does */
|
|
||||||
void open_log(void)
|
void open_log(void)
|
||||||
{
|
{
|
||||||
#ifdef LOGFILE
|
#ifdef LOGFILE
|
||||||
if (logfi != NULL) {
|
|
||||||
rewind(logfi);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
logfi = fopen(LOGFILE, "a");
|
logfi = fopen(LOGFILE, "a");
|
||||||
|
|
||||||
if (logfi == NULL)
|
if (logfi == NULL)
|
||||||
|
|
@ -142,7 +135,6 @@ void open_log(void)
|
||||||
#endif
|
#endif
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
/* VARARGS2 */
|
/* VARARGS2 */
|
||||||
void
|
void
|
||||||
|
|
@ -355,7 +347,6 @@ void writelog(int amount, int flags, int monst)
|
||||||
else
|
else
|
||||||
return;
|
return;
|
||||||
|
|
||||||
logfi = fopen(LOGFILE, "a"); /* permissions? */
|
|
||||||
if (logfi == NULL)
|
if (logfi == NULL)
|
||||||
return;
|
return;
|
||||||
/* and write it */
|
/* and write it */
|
||||||
|
|
|
||||||
|
|
@ -609,6 +609,7 @@ void new_monster(struct linked_list *item, int type, coord *c
|
||||||
struct linked_list * new_thing(void);
|
struct linked_list * new_thing(void);
|
||||||
char * num(int n1, int n2);
|
char * num(int n1, int n2);
|
||||||
void nohaste(void);
|
void nohaste(void);
|
||||||
|
void open_log(void);
|
||||||
void open_score(void);
|
void open_score(void);
|
||||||
void option(void);
|
void option(void);
|
||||||
int pack_char(struct object *obj);
|
int pack_char(struct object *obj);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue