gallium: Use custom vsnprintf in WINDDK.

EngDebugPrint does not handle float point arguments, so we need to use
our own vsnprintf implementation.
This commit is contained in:
José Fonseca 2008-03-05 11:38:21 +01:00
parent 5aa108214a
commit b1922de9f3
3 changed files with 1502 additions and 1 deletions

View file

@ -7,6 +7,7 @@ util = env.ConvenienceLibrary(
'p_tile.c',
'p_util.c',
'u_mm.c',
'u_snprintf.c',
])
auxiliaries.insert(0, util)

View file

@ -40,10 +40,28 @@
#include "pipe/p_compiler.h"
#ifdef WIN32
static INLINE void
rpl_EngDebugPrint(const char *format, ...)
{
va_list ap;
va_start(ap, format);
EngDebugPrint("", (PCHAR)format, ap);
va_end(ap);
}
int rpl_vsnprintf(char *, size_t, const char *, va_list);
#endif
void debug_vprintf(const char *format, va_list ap)
{
#ifdef WIN32
EngDebugPrint("", (PCHAR)format, ap);
/* EngDebugPrint does not handle float point arguments, so we need to use
* our own vsnprintf implementation */
char buf[512 + 1];
rpl_vsnprintf(buf, sizeof(buf), format, ap);
rpl_EngDebugPrint("%s", buf);
#else
vfprintf(stderr, format, ap);
#endif

File diff suppressed because it is too large Load diff