diff options
| author | Scott Gasch <[email protected]> | 2026-10-05 10:43:26 -0700 |
|---|---|---|
| committer | Scott Gasch <[email protected]> | 2026-10-05 10:43:26 -0700 |
| commit | e5c845d7e0b936641158909dbc516a79958c74e8 (patch) | |
| tree | eaa8113b67d21ecea04a2dbae860c7fe0e3b10cd /src/main.c | |
| parent | 64b5d3307a7a95975f7f8c0248f3f1febedd8617 (diff) | |
Update makefile and logfile to work with linux.
Diffstat (limited to 'src/main.c')
| -rw-r--r-- | src/main.c | 11 |
1 files changed, 5 insertions, 6 deletions
@@ -21,6 +21,7 @@ Revision History: **/ #include "chess.h" +#include <errno.h> FILE *g_pfLogfile = NULL; GAME_OPTIONS g_Options; @@ -157,12 +158,10 @@ Return value: g_pfLogfile = fopen(g_Options.szLogfile, "wb+"); if (NULL == g_pfLogfile) { - UtilPanic(INITIALIZATION_FAILURE, - (void *)"Can't open logfile", - (void *)&(g_Options.szLogfile), - (void *)"write", - NULL, - __FILE__, __LINE__); + Trace("WARNING: Can't open logfile %s for write (%s); " + "continuing without logging.\n", + g_Options.szLogfile, strerror(errno)); + return(FALSE); } return(TRUE); } |
