<commit_before>/*
	OpenLieroX CrashHandler

	registers a crash handler in the OS and handles the crashes

	code under LGPL
	created 09-07-2008 by <NAME>
*/

#include "CrashHandler.h"
#include "StringUtils.h"
#include "Version.h"
#include "AuxLib.h"
#include "LieroX.h" // for setCurThreadName
#include "StringUtils.h"
#include "CClient.h"
#include "CServer.h"
#include "DedicatedControl.h"
#include "StringUtils.h"
#include "Debug.h"
#include "ConversationLogger.h"
#include "FindFile.h"

#include "../breakpad/BreakPad.h"



class DummyCrashHandler : public CrashHandler {
public:
	DummyCrashHandler() {
		notes << "Dummy CrashHandler implementation" << endl;
	}
};


#ifdef NBREAKPAD

//
// WIN 32
//

#if defined(_MSC_VER)

#define itoa _itoa

#include <DbgHelp.h>
#include <ShlObj.h>
#include "FindFile.h" // for IsFileAvailable and mkdir
#include "Cache.h"  // For freeing the cache
#include "CGameMode.h"

LONG WINAPI CustomUnhandledExceptionFilter(PEXCEPTION_POINTERS pExInfo);

// Crash handling
class CrashHandlerImpl : public CrashHandler {
public:
	CrashHandlerImpl() {
#ifdef _DEBUG
#ifdef USE_DEFAULT_MSC_DELEAKER
		_CrtSetDbgFlag ( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF);
#endif
#endif // _DEBUG

		SetUnhandledExceptionFilter(CustomUnhandledExceptionFilter);

		notes << "Win32 Exception Filter installed" << endl;
	}

};

extern void OlxWriteCoreDump_Win32(const char* fileName, PEXCEPTION_POINTERS pExInfo);<commit_msg>MSVC fix (DbgHelp.h is broken otherwise)<commit_after>/*
	OpenLieroX CrashHandler

	registers a crash handler in the OS and handles the crashes

	code under LGPL
	created 09-07-2008 by <NAME>
*/

#include "CrashHandler.h"
#include "StringUtils.h"
#include "Version.h"
#include "AuxLib.h"
#include "LieroX.h" // for setCurThreadName
#include "StringUtils.h"
#include "CClient.h"
#include "CServer.h"
#include "DedicatedControl.h"
#include "StringUtils.h"
#include "Debug.h"
#include "ConversationLogger.h"
#include "FindFile.h"

#include "../breakpad/BreakPad.h"



class DummyCrashHandler : public CrashHandler {
public:
	DummyCrashHandler() {
		notes << "Dummy CrashHandler implementation" << endl;
	}
};


#ifdef NBREAKPAD

//
// WIN 32
//

#if defined(_MSC_VER)

#define itoa _itoa

#include <Windows.h>
#include <DbgHelp.h>
#include <ShlObj.h>
#include "FindFile.h" // for IsFileAvailable and mkdir
#include "Cache.h"  // For freeing the cache
#include "CGameMode.h"

LONG WINAPI CustomUnhandledExceptionFilter(PEXCEPTION_POINTERS pExInfo);

// Crash handling
class CrashHandlerImpl : public CrashHandler {
public:
	CrashHandlerImpl() {
#ifdef _DEBUG
#ifdef USE_DEFAULT_MSC_DELEAKER
		_CrtSetDbgFlag ( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF);
#endif
#endif // _DEBUG

		SetUnhandledExceptionFilter(CustomUnhandledExceptionFilter);

		notes << "Win32 Exception Filter installed" << endl;
	}

};

extern void OlxWriteCoreDump_Win32(const char* fileName, PEXCEPTION_POINTERS pExInfo);
{'fraction_non_alphanumeric': 0.11349693251533742, 'fraction_numerical': 0.00954328561690525, 'mean_word_length': 5.298283261802575, 'pattern_counts': {'":': 0, '<': 26, '<?xml version=': 0, '>': 10, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1976854', 'n_tokens_mistral': 1107, 'n_tokens_neox': 1051, 'n_words': 256}