Use RageLog::GetAdditionalLog.

This commit is contained in:
Glenn Maynard
2003-07-23 21:47:41 +00:00
parent 9ef2f59eed
commit 524d376299
2 changed files with 6 additions and 13 deletions
+6 -12
View File
@@ -30,6 +30,8 @@
#include "disasm.h"
#include "CrashList.h"
#include "RageLog.h" /* for RageLog::GetAdditionalLog only */
#include "GotoURL.h"
static void DoSave(const EXCEPTION_POINTERS *pExc);
@@ -1583,21 +1585,13 @@ static void ReportStaticLog(HWND hwnd, HANDLE hFile)
// Report(hwnd, hFile, "%s", staticlog);
}
static const int ADDLOG_SIZE = 1024*32;
static char addlog[ADDLOG_SIZE]="";
void AdditionalLog(const char *str)
{
strncpy(addlog, str, ADDLOG_SIZE-1);
addlog[ADDLOG_SIZE-1]=0;
}
static void ReportAdditionalLog(HWND hwnd, HANDLE hFile)
{
DWORD dwActual;
/* We crashed, so this data might well be bogus; don't use strlen. */
const char *p = (const char *) memchr(addlog, '\0', ADDLOG_SIZE);
int len = p? p-addlog: 0;
WriteFile(hFile, addlog, len, &dwActual, NULL);
const char *p;
int len;
RageLog::GetAdditionalLog( p, len );
WriteFile(hFile, p, len, &dwActual, NULL);
}
-1
View File
@@ -54,7 +54,6 @@ extern long __stdcall CrashHandler(struct _EXCEPTION_POINTERS *ExceptionInfo);
void CrashLog(const char *str);
void StaticLog(const char *str);
void AdditionalLog(const char *str);
/* Exactly as advertised. (This will bring up the crash handler even
* in the debugger.) */