diff options
author | José Fonseca <[email protected]> | 2008-03-05 11:38:21 +0100 |
---|---|---|
committer | José Fonseca <[email protected]> | 2008-03-05 11:39:11 +0100 |
commit | b1922de9f3478869c6788ef4e954c06c20e7aa9c (patch) | |
tree | 94b6f5e47e6148b52b0148a338127f76336b3418 /src/gallium/auxiliary/util/p_debug.c | |
parent | 5aa108214a21181406ec38a2fd5e82a279348f77 (diff) |
gallium: Use custom vsnprintf in WINDDK.
EngDebugPrint does not handle float point arguments, so we need to use
our own vsnprintf implementation.
Diffstat (limited to 'src/gallium/auxiliary/util/p_debug.c')
-rw-r--r-- | src/gallium/auxiliary/util/p_debug.c | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/util/p_debug.c b/src/gallium/auxiliary/util/p_debug.c index 0da3b66a4d7..7b3c0309565 100644 --- a/src/gallium/auxiliary/util/p_debug.c +++ b/src/gallium/auxiliary/util/p_debug.c @@ -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 |