From 97d6e0e6c0bdada386ac68ffb95719721f1c54ce Mon Sep 17 00:00:00 2001 From: rubidium Date: Fri, 11 Jan 2008 00:30:32 +0000 Subject: (svn r11811) -Fix: make compilation without networking work again (and thus move the debugdumpcommand stuff out of the network 'area'). --- src/debug.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'src/debug.cpp') diff --git a/src/debug.cpp b/src/debug.cpp index 1b811b9cc..d6104f9b0 100644 --- a/src/debug.cpp +++ b/src/debug.cpp @@ -176,3 +176,20 @@ const char *GetDebugString() return dbgstr; } + +#ifdef DEBUG_DUMP_COMMANDS +#include "fileio.h" + +void CDECL DebugDumpCommands(const char *s, ...) +{ + static FILE *f = FioFOpenFile("commands-out.log", "wb", AUTOSAVE_DIR); + if (f == NULL) return; + + va_list va; + va_start(va, s); + vfprintf(f, s, va); + va_end(va); + + fflush(f); +} +#endif /* DEBUG_DUMP_COMMANDS */ -- cgit v1.2.3-54-g00ecf