Files
libremetaverse/applications/snowcrash/snowflake/stdafx.cpp
John Hurliman a22cc1de4c * Updated all the keywords/protocol files for 1.11.3.1
* Moved snowcrash to the applications directory
* Removed the Release folder from SLIRC

git-svn-id: http://libopenmetaverse.googlecode.com/svn/trunk@133 52acb1d6-8a22-11de-b505-999d5b087335
2006-08-09 19:06:41 +00:00

68 lines
1.2 KiB
C++

// stdafx.cpp : source file that includes just the standard includes
// snowflake.pch will be the pre-compiled header
// stdafx.obj will contain the pre-compiled type information
#include "stdafx.h"
#ifdef ECHO
FILE *fpLog = NULL;
#endif
#ifdef ECHODEBUG
void dprintf(TCHAR *format, ...)
{
LPTSTR pBuffer = new TCHAR[8192];
if (pBuffer != NULL)
{
va_list args;
DWORD dwWrote;
va_start(args, format);
_vsntprintf(pBuffer, 8192, format, args);
va_end(args);
WriteConsole(GetStdHandle(STD_OUTPUT_HANDLE), pBuffer, (DWORD)_tcslen(pBuffer), &dwWrote, NULL);
if (fpLog)
{
fwrite(pBuffer, 1, _tcslen(pBuffer), fpLog);
fflush(fpLog);
}
delete [] pBuffer;
}
}
#else
#define dprintf
#endif
#ifdef ECHONORMAL
void myprintf(TCHAR *format, ...)
{
LPTSTR pBuffer = new TCHAR[8192];
if (pBuffer != NULL)
{
va_list args;
DWORD dwWrote;
va_start(args, format);
_vsntprintf(pBuffer, 8192, format, args);
va_end(args);
WriteConsole(GetStdHandle(STD_OUTPUT_HANDLE), pBuffer, (DWORD)_tcslen(pBuffer), &dwWrote, NULL);
if (fpLog)
{
fwrite(pBuffer, 1, _tcslen(pBuffer), fpLog);
fflush(fpLog);
}
delete [] pBuffer;
}
}
#else
#define myprintf
#endif