Commit 96742389 authored by Alexandre Julliard's avatar Alexandre Julliard

include: Add va_list version of the debug printf functions.

parent 4d0468e3
......@@ -168,28 +168,46 @@ extern int __cdecl __wine_dbg_header( enum __wine_debug_class cls, struct __wine
# define __wine_dbg_cdecl
#endif
static const char * __wine_dbg_cdecl wine_dbg_vsprintf( const char *format, va_list args ) __WINE_PRINTF_ATTR(1,0);
static inline const char * __wine_dbg_cdecl wine_dbg_vsprintf( const char *format, va_list args )
{
char buffer[200];
vsnprintf( buffer, sizeof(buffer), format, args );
return __wine_dbg_strdup( buffer );
}
static const char * __wine_dbg_cdecl wine_dbg_sprintf( const char *format, ... ) __WINE_PRINTF_ATTR(1,2);
static inline const char * __wine_dbg_cdecl wine_dbg_sprintf( const char *format, ... )
{
char buffer[200];
const char *ret;
va_list args;
va_start( args, format );
vsnprintf( buffer, sizeof(buffer), format, args );
ret = wine_dbg_vsprintf( format, args );
va_end( args );
return __wine_dbg_strdup( buffer );
return ret;
}
static int __wine_dbg_cdecl wine_dbg_vprintf( const char *format, va_list args ) __WINE_PRINTF_ATTR(1,0);
static inline int __wine_dbg_cdecl wine_dbg_vprintf( const char *format, va_list args )
{
char buffer[1024];
vsnprintf( buffer, sizeof(buffer), format, args );
return __wine_dbg_output( buffer );
}
static int __wine_dbg_cdecl wine_dbg_printf( const char *format, ... ) __WINE_PRINTF_ATTR(1,2);
static inline int __wine_dbg_cdecl wine_dbg_printf( const char *format, ... )
{
char buffer[1024];
int ret;
va_list args;
va_start( args, format );
vsnprintf( buffer, sizeof(buffer), format, args );
ret = wine_dbg_vprintf( format, args );
va_end( args );
return __wine_dbg_output( buffer );
return ret;
}
static int __wine_dbg_cdecl wine_dbg_log( enum __wine_debug_class cls,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment