-
Notifications
You must be signed in to change notification settings - Fork 29
Expand file tree
/
Copy path_xDebug.cpp
More file actions
59 lines (41 loc) · 1.23 KB
/
_xDebug.cpp
File metadata and controls
59 lines (41 loc) · 1.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
/*****************************************************************************/
/**
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
/*****************************************************************************/