tWindows client now uses log file throughout the program - vaccinewars - be a d… | |
git clone git://src.adamsgaard.dk/vaccinewars | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
commit 9ca101a62654cbc527b08a96d8ca5e0e9e1692cc | |
parent c36da537a319cbf1fe6096f8ddf214655a298a66 | |
Author: Ben Webb <[email protected]> | |
Date: Sun, 21 Oct 2001 18:44:12 +0000 | |
Windows client now uses log file throughout the program | |
Diffstat: | |
M src/winmain.c | 9 +++++---- | |
1 file changed, 5 insertions(+), 4 deletions(-) | |
--- | |
diff --git a/src/winmain.c b/src/winmain.c | |
t@@ -87,7 +87,10 @@ static void LogFileStart() { | |
} | |
static void LogFilePrintFunc(const gchar *string) { | |
- if (LogFile) fprintf(LogFile,string); | |
+ if (LogFile) { | |
+ fprintf(LogFile,string); | |
+ fflush(LogFile); | |
+ } | |
} | |
static void LogFileEnd() { | |
t@@ -118,7 +121,6 @@ int APIENTRY WinMain(HINSTANCE hInstance,HINSTANCE hPrevIn… | |
"# informative messages resulting from configuration\n" | |
"# file processing and the like.\n\n")); | |
if (GeneralStartup(argc,split)==0) { | |
- LogFileEnd(); | |
if (WantVersion || WantHelp) { | |
WindowPrintStart(); | |
g_set_print_handler(WindowPrintFunc); | |
t@@ -186,9 +188,8 @@ int APIENTRY WinMain(HINSTANCE hInstance,HINSTANCE hPrevIn… | |
StopNetworking(); | |
#endif | |
} | |
- } else { | |
- LogFileEnd(); | |
} | |
+ LogFileEnd(); | |
g_strfreev(split); | |
CloseHighScoreFile(); | |
if (PidFile) g_free(PidFile); |