mirror of
git://source.winehq.org/git/wine.git
synced 2024-07-21 14:24:11 +00:00
include: Add va_list version of the debug printf functions.
This commit is contained in:
parent
4d0468e316
commit
96742389f6
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue