|
From: | Ian Brown |
Subject: | [Devel] trace messages on Win32 --- freetype 2.0.4 |
Date: | Thu, 5 Jul 2001 12:33:58 +0200 |
FreeType sends its trace messages to stdout, which is not very useful when developing a Win32 application.
I made some small changes so that for a WIN32 build, the trace output would go to the debugger window. The changes are below if anyone else is interested. Note that you also need to enable language extensions in the project settings or you will get errors when including windows.h
Ian
File: base/ftdebug.c ... the changes are bracketed in #ifdef WIN32
--------------------------------------------------------------------------------
#ifdef WIN32
#include <windows.h>
#endif
#include <stdarg.h>
#include <stdlib.h>
#include <string.h>
FT_EXPORT_DEF( void ) FT_Message( const char* fmt, ... )
{
static char szOutBuff [ 1024 ] ;
va_list args ;
va_start (args , fmt) ;
#ifdef WIN32
vsprintf (szOutBuff , fmt , args) ;
OutputDebugStringA ( szOutBuff ) ;
#else
vprintf (fmt ,args) ;
#endif
va_end ( args ) ;
}
[Prev in Thread] | Current Thread | [Next in Thread] |