Files
VCCPlusOSS/platforms/windows/_xDebug.cpp
T

60 lines
1.2 KiB
C++

/*****************************************************************************/
/**
xDebug.c
uEng - micro cross platform engine
Copyright 2010 by Wes Gale All rights reserved.
Used by permission in VccX
*/
/*****************************************************************************/
#include "xDebug.h"
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <Windows.h>
/*****************************************************************************/
int g_bTraceMessageLogging = TRUE;
/*****************************************************************************/
#if 0
void _xDbgTrace(const void * pFile, const int iLine, const void * pFormat, ...)
{
va_list args;
va_start(args,pFormat);
fprintf(stdout,"%s(%d) : ", (char *)pFile, iLine);
vfprintf(stdout,(char *)pFormat,args);
va_end(args);
fflush(stdout);
}
#else
void _xDbgTrace(const char* pFile, const int iLine, const char* pFormat, ...)
{
va_list args;
char temp[1024];
va_start(args, pFormat);
sprintf(temp, "%s(%d) : ", pFile, iLine);
OutputDebugString(temp);
vsprintf(temp, pFormat, args);
OutputDebugString(temp);
va_end(args);
// fflush(stdout);
}
#endif
/*****************************************************************************/