From 5fcf308ef895cf94110849c42065b04dcb8030b7 Mon Sep 17 00:00:00 2001 From: gerstrong Date: Sat, 25 Jul 2009 17:11:51 +0000 Subject: [PATCH] make win32 compilable. WIP git-svn-id: https://clonekeenplus.svn.sourceforge.net/svnroot/clonekeenplus/cgenius/trunk@169 4df4b0f3-56ce-47cb-b001-ed939b7d65a6 --- src/Debug.cpp | 33 +++++++++++---------------------- 1 file changed, 11 insertions(+), 22 deletions(-) diff --git a/src/Debug.cpp b/src/Debug.cpp index 3fb9f1aa6..39a5ccddd 100644 --- a/src/Debug.cpp +++ b/src/Debug.cpp @@ -121,25 +121,14 @@ void RaiseDebugger() { #ifdef WIN32 -#include "AuxLib.h" // for Windows.h - -#include -#include - -#include "LieroX.h" -#include "CClient.h" -#include "CServer.h" -#include "DedicatedControl.h" #include "StringUtils.h" -#include "ConversationLogger.h" -#include "CGameMode.h" #define itoa _itoa void *ReadGameStateForReport(char *buffer, size_t bufsize) { memset(buffer, 0, bufsize); - __try { + /*__try { if (cClient) { strncat(buffer, "Game state:\n", bufsize); if (cClient->getStatus() == NET_CONNECTED) { @@ -159,7 +148,7 @@ void *ReadGameStateForReport(char *buffer, size_t bufsize) } buffer[bufsize - 1] = '\0'; } __except (EXCEPTION_EXECUTE_HANDLER) - { return buffer; } + { return buffer; }*/ return buffer; } @@ -170,7 +159,7 @@ void *ReadGameInfoForReport(char *buffer, size_t bufsize) if (!tLXOptions || !tLX) return buffer; char tmp[32]; - __try { + /*__try { // Game type strncat(buffer, "iGameType = ", bufsize); @@ -285,7 +274,7 @@ void *ReadGameInfoForReport(char *buffer, size_t bufsize) buffer[bufsize - 1] = '\0'; } __except (EXCEPTION_EXECUTE_HANDLER) { return buffer; - } + }*/ return buffer; } @@ -343,7 +332,7 @@ void OlxWriteCoreDump_Win32(const char* fileName, PEXCEPTION_POINTERS pExInfo ) CloseHandle(hFile); } -void OlxWriteCoreDump(const char* fileName) +void OlxWriteCoreDump(const char* fileName) { OlxWriteCoreDump_Win32(fileName, NULL); } @@ -449,7 +438,7 @@ void DumpCallstack(void (*PrintOutFct) (const std::string&)) { #elif defined(WIN32) -#include "StackWalker.h" // Call Luke Stackwalker for help +//#include "StackWalker.h" // Call Luke Stackwalker for help typedef void (*PrintOutFct) (const std::string&); @@ -465,7 +454,7 @@ public: } - void OnOutput(LPCSTR szText) + void OnOutput(LPCSTR szText) { if (m_print == NULL) printf(szText); @@ -475,14 +464,14 @@ public: } }; -void DumpCallstackPrintf(void* callpnt) +void DumpCallstackPrintf(void* callpnt) { PrintStackWalker sw; sw.ShowCallstack(); - + } -void DumpCallstack(void (*LineOutFct) (const std::string&)) -{ +void DumpCallstack(void (*LineOutFct) (const std::string&)) +{ PrintStackWalker sw(LineOutFct); sw.ShowCallstack(); }