debug logging
Remove unused variables.
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
/* NetHack 3.6 files.c $NHDT-Date: 1524950534 2018/04/28 21:22:14 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.238 $ */
|
/* NetHack 3.6 files.c $NHDT-Date: 1526382938 2018/05/15 11:15:38 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.240 $ */
|
||||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||||
/*-Copyright (c) Derek S. Ray, 2015. */
|
/*-Copyright (c) Derek S. Ray, 2015. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
@@ -3579,7 +3579,6 @@ const char *reason; /* explanation */
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*ARGSUSED*/
|
|
||||||
void
|
void
|
||||||
testinglog(filenm, type, reason)
|
testinglog(filenm, type, reason)
|
||||||
const char *filenm; /* ad hoc file name */
|
const char *filenm; /* ad hoc file name */
|
||||||
@@ -3589,14 +3588,13 @@ const char *reason; /* explanation */
|
|||||||
FILE *lfile;
|
FILE *lfile;
|
||||||
char fnbuf[BUFSZ];
|
char fnbuf[BUFSZ];
|
||||||
|
|
||||||
if (!filenm) return;
|
if (!filenm)
|
||||||
|
return;
|
||||||
Strcpy(fnbuf, filenm);
|
Strcpy(fnbuf, filenm);
|
||||||
if (index(fnbuf, '.') == 0)
|
if (index(fnbuf, '.') == 0)
|
||||||
Strcat(fnbuf, ".log");
|
Strcat(fnbuf, ".log");
|
||||||
lfile = fopen_datafile(fnbuf, "a", TROUBLEPREFIX);
|
lfile = fopen_datafile(fnbuf, "a", TROUBLEPREFIX);
|
||||||
if (lfile) {
|
if (lfile) {
|
||||||
time_t now = getnow();
|
|
||||||
int uid = getuid();
|
|
||||||
(void) fprintf(lfile, "%s\n%s\n", type, reason);
|
(void) fprintf(lfile, "%s\n%s\n", type, reason);
|
||||||
(void) fclose(lfile);
|
(void) fclose(lfile);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user