Commit 747b9753 authored by Alexandre Julliard's avatar Alexandre Julliard

ntdll: Use the standard va_list instead of __ms_va_list.

parent d8ed47ec
...@@ -515,7 +515,7 @@ ULONG WINAPI EtwLogTraceEvent( TRACEHANDLE SessionHandle, PEVENT_TRACE_HEADER Ev ...@@ -515,7 +515,7 @@ ULONG WINAPI EtwLogTraceEvent( TRACEHANDLE SessionHandle, PEVENT_TRACE_HEADER Ev
* EtwTraceMessageVa (NTDLL.@) * EtwTraceMessageVa (NTDLL.@)
*/ */
ULONG WINAPI EtwTraceMessageVa( TRACEHANDLE handle, ULONG flags, LPGUID guid, USHORT number, ULONG WINAPI EtwTraceMessageVa( TRACEHANDLE handle, ULONG flags, LPGUID guid, USHORT number,
__ms_va_list args ) va_list args )
{ {
FIXME("(%s %x %s %d) : stub\n", wine_dbgstr_longlong(handle), flags, debugstr_guid(guid), number); FIXME("(%s %x %s %d) : stub\n", wine_dbgstr_longlong(handle), flags, debugstr_guid(guid), number);
return ERROR_SUCCESS; return ERROR_SUCCESS;
...@@ -526,12 +526,12 @@ ULONG WINAPI EtwTraceMessageVa( TRACEHANDLE handle, ULONG flags, LPGUID guid, US ...@@ -526,12 +526,12 @@ ULONG WINAPI EtwTraceMessageVa( TRACEHANDLE handle, ULONG flags, LPGUID guid, US
*/ */
ULONG WINAPIV EtwTraceMessage( TRACEHANDLE handle, ULONG flags, LPGUID guid, /*USHORT*/ ULONG number, ... ) ULONG WINAPIV EtwTraceMessage( TRACEHANDLE handle, ULONG flags, LPGUID guid, /*USHORT*/ ULONG number, ... )
{ {
__ms_va_list valist; va_list valist;
ULONG ret; ULONG ret;
__ms_va_start( valist, number ); va_start( valist, number );
ret = EtwTraceMessageVa( handle, flags, guid, number, valist ); ret = EtwTraceMessageVa( handle, flags, guid, number, valist );
__ms_va_end( valist ); va_end( valist );
return ret; return ret;
} }
......
...@@ -85,8 +85,8 @@ extern const struct unix_funcs *unix_funcs DECLSPEC_HIDDEN; ...@@ -85,8 +85,8 @@ extern const struct unix_funcs *unix_funcs DECLSPEC_HIDDEN;
extern struct _KUSER_SHARED_DATA *user_shared_data DECLSPEC_HIDDEN; extern struct _KUSER_SHARED_DATA *user_shared_data DECLSPEC_HIDDEN;
extern int CDECL NTDLL__vsnprintf( char *str, SIZE_T len, const char *format, __ms_va_list args ) DECLSPEC_HIDDEN; extern int CDECL NTDLL__vsnprintf( char *str, SIZE_T len, const char *format, va_list args ) DECLSPEC_HIDDEN;
extern int CDECL NTDLL__vsnwprintf( WCHAR *str, SIZE_T len, const WCHAR *format, __ms_va_list args ) DECLSPEC_HIDDEN; extern int CDECL NTDLL__vsnwprintf( WCHAR *str, SIZE_T len, const WCHAR *format, va_list args ) DECLSPEC_HIDDEN;
struct dllredirect_data struct dllredirect_data
{ {
......
...@@ -52,7 +52,7 @@ typedef struct pf_flags_t ...@@ -52,7 +52,7 @@ typedef struct pf_flags_t
/********************************************************************* /*********************************************************************
* _vsnprintf (NTDLL.@) * _vsnprintf (NTDLL.@)
*/ */
int CDECL _vsnprintf( char *str, size_t len, const char *format, __ms_va_list args ) int CDECL _vsnprintf( char *str, size_t len, const char *format, va_list args )
{ {
pf_output_a out = { str, len }; pf_output_a out = { str, len };
int r = pf_vsnprintf_a( &out, format, args ); int r = pf_vsnprintf_a( &out, format, args );
...@@ -65,7 +65,7 @@ int CDECL _vsnprintf( char *str, size_t len, const char *format, __ms_va_list ar ...@@ -65,7 +65,7 @@ int CDECL _vsnprintf( char *str, size_t len, const char *format, __ms_va_list ar
/*********************************************************************** /***********************************************************************
* _vsnwprintf (NTDLL.@) * _vsnwprintf (NTDLL.@)
*/ */
int CDECL _vsnwprintf( WCHAR *str, size_t len, const WCHAR *format, __ms_va_list args ) int CDECL _vsnwprintf( WCHAR *str, size_t len, const WCHAR *format, va_list args )
{ {
pf_output_w out = { str, len }; pf_output_w out = { str, len };
int r = pf_vsnprintf_w( &out, format, args ); int r = pf_vsnprintf_w( &out, format, args );
...@@ -81,11 +81,11 @@ int CDECL _vsnwprintf( WCHAR *str, size_t len, const WCHAR *format, __ms_va_list ...@@ -81,11 +81,11 @@ int CDECL _vsnwprintf( WCHAR *str, size_t len, const WCHAR *format, __ms_va_list
int WINAPIV NTDLL__snprintf( char *str, size_t len, const char *format, ... ) int WINAPIV NTDLL__snprintf( char *str, size_t len, const char *format, ... )
{ {
int ret; int ret;
__ms_va_list valist; va_list valist;
__ms_va_start( valist, format ); va_start( valist, format );
ret = _vsnprintf( str, len, format, valist ); ret = _vsnprintf( str, len, format, valist );
__ms_va_end( valist ); va_end( valist );
return ret; return ret;
} }
...@@ -96,11 +96,11 @@ int WINAPIV NTDLL__snprintf( char *str, size_t len, const char *format, ... ) ...@@ -96,11 +96,11 @@ int WINAPIV NTDLL__snprintf( char *str, size_t len, const char *format, ... )
int WINAPIV _snwprintf( WCHAR *str, size_t len, const WCHAR *format, ... ) int WINAPIV _snwprintf( WCHAR *str, size_t len, const WCHAR *format, ... )
{ {
int ret; int ret;
__ms_va_list valist; va_list valist;
__ms_va_start(valist, format); va_start(valist, format);
ret = _vsnwprintf( str, len, format, valist ); ret = _vsnwprintf( str, len, format, valist );
__ms_va_end(valist); va_end(valist);
return ret; return ret;
} }
...@@ -108,7 +108,7 @@ int WINAPIV _snwprintf( WCHAR *str, size_t len, const WCHAR *format, ... ) ...@@ -108,7 +108,7 @@ int WINAPIV _snwprintf( WCHAR *str, size_t len, const WCHAR *format, ... )
/********************************************************************* /*********************************************************************
* _vsnprintf_s (NTDLL.@) * _vsnprintf_s (NTDLL.@)
*/ */
int CDECL _vsnprintf_s( char *str, size_t size, size_t len, const char *format, __ms_va_list args ) int CDECL _vsnprintf_s( char *str, size_t size, size_t len, const char *format, va_list args )
{ {
pf_output_a out = { str, min( size, len ) }; pf_output_a out = { str, min( size, len ) };
int r = pf_vsnprintf_a( &out, format, args ); int r = pf_vsnprintf_a( &out, format, args );
...@@ -123,7 +123,7 @@ int CDECL _vsnprintf_s( char *str, size_t size, size_t len, const char *format, ...@@ -123,7 +123,7 @@ int CDECL _vsnprintf_s( char *str, size_t size, size_t len, const char *format,
/*********************************************************************** /***********************************************************************
* _vsnwprintf_s (NTDLL.@) * _vsnwprintf_s (NTDLL.@)
*/ */
int CDECL _vsnwprintf_s( WCHAR *str, size_t size, size_t len, const WCHAR *format, __ms_va_list args ) int CDECL _vsnwprintf_s( WCHAR *str, size_t size, size_t len, const WCHAR *format, va_list args )
{ {
pf_output_w out = { str, min( size, len ) }; pf_output_w out = { str, min( size, len ) };
int r = pf_vsnprintf_w( &out, format, args ); int r = pf_vsnprintf_w( &out, format, args );
...@@ -141,11 +141,11 @@ int CDECL _vsnwprintf_s( WCHAR *str, size_t size, size_t len, const WCHAR *forma ...@@ -141,11 +141,11 @@ int CDECL _vsnwprintf_s( WCHAR *str, size_t size, size_t len, const WCHAR *forma
int WINAPIV _snprintf_s( char *str, size_t size, size_t len, const char *format, ... ) int WINAPIV _snprintf_s( char *str, size_t size, size_t len, const char *format, ... )
{ {
int ret; int ret;
__ms_va_list valist; va_list valist;
__ms_va_start( valist, format ); va_start( valist, format );
ret = _vsnprintf_s( str, size, len, format, valist ); ret = _vsnprintf_s( str, size, len, format, valist );
__ms_va_end( valist ); va_end( valist );
return ret; return ret;
} }
...@@ -156,11 +156,11 @@ int WINAPIV _snprintf_s( char *str, size_t size, size_t len, const char *format, ...@@ -156,11 +156,11 @@ int WINAPIV _snprintf_s( char *str, size_t size, size_t len, const char *format,
int WINAPIV _snwprintf_s( WCHAR *str, size_t size, size_t len, const WCHAR *format, ... ) int WINAPIV _snwprintf_s( WCHAR *str, size_t size, size_t len, const WCHAR *format, ... )
{ {
int ret; int ret;
__ms_va_list valist; va_list valist;
__ms_va_start( valist, format ); va_start( valist, format );
ret = _vsnwprintf_s( str, size, len, format, valist ); ret = _vsnwprintf_s( str, size, len, format, valist );
__ms_va_end( valist ); va_end( valist );
return ret; return ret;
} }
...@@ -168,7 +168,7 @@ int WINAPIV _snwprintf_s( WCHAR *str, size_t size, size_t len, const WCHAR *form ...@@ -168,7 +168,7 @@ int WINAPIV _snwprintf_s( WCHAR *str, size_t size, size_t len, const WCHAR *form
/********************************************************************* /*********************************************************************
* vsprintf (NTDLL.@) * vsprintf (NTDLL.@)
*/ */
int CDECL vsprintf( char *str, const char *format, __ms_va_list args ) int CDECL vsprintf( char *str, const char *format, va_list args )
{ {
return _vsnprintf( str, size_max, format, args ); return _vsnprintf( str, size_max, format, args );
} }
...@@ -177,7 +177,7 @@ int CDECL vsprintf( char *str, const char *format, __ms_va_list args ) ...@@ -177,7 +177,7 @@ int CDECL vsprintf( char *str, const char *format, __ms_va_list args )
/********************************************************************* /*********************************************************************
* vsprintf_s (NTDLL.@) * vsprintf_s (NTDLL.@)
*/ */
int CDECL vsprintf_s( char *str, size_t size, const char *format, __ms_va_list args ) int CDECL vsprintf_s( char *str, size_t size, const char *format, va_list args )
{ {
return _vsnprintf_s( str, size, size, format, args ); return _vsnprintf_s( str, size, size, format, args );
} }
...@@ -186,7 +186,7 @@ int CDECL vsprintf_s( char *str, size_t size, const char *format, __ms_va_list a ...@@ -186,7 +186,7 @@ int CDECL vsprintf_s( char *str, size_t size, const char *format, __ms_va_list a
/********************************************************************* /*********************************************************************
* _vswprintf (NTDLL.@) * _vswprintf (NTDLL.@)
*/ */
int CDECL _vswprintf( WCHAR *str, const WCHAR *format, __ms_va_list args ) int CDECL _vswprintf( WCHAR *str, const WCHAR *format, va_list args )
{ {
return _vsnwprintf( str, size_max, format, args ); return _vsnwprintf( str, size_max, format, args );
} }
...@@ -195,7 +195,7 @@ int CDECL _vswprintf( WCHAR *str, const WCHAR *format, __ms_va_list args ) ...@@ -195,7 +195,7 @@ int CDECL _vswprintf( WCHAR *str, const WCHAR *format, __ms_va_list args )
/********************************************************************* /*********************************************************************
* vswprintf_s (NTDLL.@) * vswprintf_s (NTDLL.@)
*/ */
int CDECL vswprintf_s( WCHAR *str, size_t size, const WCHAR *format, __ms_va_list args ) int CDECL vswprintf_s( WCHAR *str, size_t size, const WCHAR *format, va_list args )
{ {
return _vsnwprintf_s( str, size, size, format, args ); return _vsnwprintf_s( str, size, size, format, args );
} }
...@@ -207,11 +207,11 @@ int CDECL vswprintf_s( WCHAR *str, size_t size, const WCHAR *format, __ms_va_lis ...@@ -207,11 +207,11 @@ int CDECL vswprintf_s( WCHAR *str, size_t size, const WCHAR *format, __ms_va_lis
int WINAPIV NTDLL_sprintf( char *str, const char *format, ... ) int WINAPIV NTDLL_sprintf( char *str, const char *format, ... )
{ {
int ret; int ret;
__ms_va_list valist; va_list valist;
__ms_va_start( valist, format ); va_start( valist, format );
ret = _vsnprintf( str, size_max, format, valist ); ret = _vsnprintf( str, size_max, format, valist );
__ms_va_end( valist ); va_end( valist );
return ret; return ret;
} }
...@@ -222,11 +222,11 @@ int WINAPIV NTDLL_sprintf( char *str, const char *format, ... ) ...@@ -222,11 +222,11 @@ int WINAPIV NTDLL_sprintf( char *str, const char *format, ... )
int WINAPIV sprintf_s( char *str, size_t size, const char *format, ... ) int WINAPIV sprintf_s( char *str, size_t size, const char *format, ... )
{ {
int ret; int ret;
__ms_va_list valist; va_list valist;
__ms_va_start( valist, format ); va_start( valist, format );
ret = vsprintf_s( str, size, format, valist ); ret = vsprintf_s( str, size, format, valist );
__ms_va_end( valist ); va_end( valist );
return ret; return ret;
} }
...@@ -237,11 +237,11 @@ int WINAPIV sprintf_s( char *str, size_t size, const char *format, ... ) ...@@ -237,11 +237,11 @@ int WINAPIV sprintf_s( char *str, size_t size, const char *format, ... )
int WINAPIV NTDLL_swprintf( WCHAR *str, const WCHAR *format, ... ) int WINAPIV NTDLL_swprintf( WCHAR *str, const WCHAR *format, ... )
{ {
int ret; int ret;
__ms_va_list valist; va_list valist;
__ms_va_start(valist, format); va_start(valist, format);
ret = _vsnwprintf( str, size_max, format, valist ); ret = _vsnwprintf( str, size_max, format, valist );
__ms_va_end(valist); va_end(valist);
return ret; return ret;
} }
...@@ -252,10 +252,10 @@ int WINAPIV NTDLL_swprintf( WCHAR *str, const WCHAR *format, ... ) ...@@ -252,10 +252,10 @@ int WINAPIV NTDLL_swprintf( WCHAR *str, const WCHAR *format, ... )
int WINAPIV swprintf_s( WCHAR *str, size_t size, const WCHAR *format, ... ) int WINAPIV swprintf_s( WCHAR *str, size_t size, const WCHAR *format, ... )
{ {
int ret; int ret;
__ms_va_list valist; va_list valist;
__ms_va_start(valist, format); va_start(valist, format);
ret = vswprintf_s( str, size, format, valist ); ret = vswprintf_s( str, size, format, valist );
__ms_va_end(valist); va_end(valist);
return ret; return ret;
} }
...@@ -283,7 +283,7 @@ static void FUNC_NAME(pf_integer_conv)( APICHAR *buf, pf_flags *flags, LONGLONG ...@@ -283,7 +283,7 @@ static void FUNC_NAME(pf_integer_conv)( APICHAR *buf, pf_flags *flags, LONGLONG
} }
} }
static int FUNC_NAME(pf_vsnprintf)( FUNC_NAME(pf_output) *out, const APICHAR *format, __ms_va_list valist ) static int FUNC_NAME(pf_vsnprintf)( FUNC_NAME(pf_output) *out, const APICHAR *format, va_list valist )
{ {
int r; int r;
const APICHAR *q, *p = format; const APICHAR *q, *p = format;
......
...@@ -311,11 +311,11 @@ static LONG WINAPI debug_exception_handler( EXCEPTION_POINTERS *eptr ) ...@@ -311,11 +311,11 @@ static LONG WINAPI debug_exception_handler( EXCEPTION_POINTERS *eptr )
NTSTATUS WINAPIV DbgPrint(LPCSTR fmt, ...) NTSTATUS WINAPIV DbgPrint(LPCSTR fmt, ...)
{ {
NTSTATUS ret; NTSTATUS ret;
__ms_va_list args; va_list args;
__ms_va_start(args, fmt); va_start(args, fmt);
ret = vDbgPrintEx(0, DPFLTR_ERROR_LEVEL, fmt, args); ret = vDbgPrintEx(0, DPFLTR_ERROR_LEVEL, fmt, args);
__ms_va_end(args); va_end(args);
return ret; return ret;
} }
...@@ -326,18 +326,18 @@ NTSTATUS WINAPIV DbgPrint(LPCSTR fmt, ...) ...@@ -326,18 +326,18 @@ NTSTATUS WINAPIV DbgPrint(LPCSTR fmt, ...)
NTSTATUS WINAPIV DbgPrintEx(ULONG iComponentId, ULONG Level, LPCSTR fmt, ...) NTSTATUS WINAPIV DbgPrintEx(ULONG iComponentId, ULONG Level, LPCSTR fmt, ...)
{ {
NTSTATUS ret; NTSTATUS ret;
__ms_va_list args; va_list args;
__ms_va_start(args, fmt); va_start(args, fmt);
ret = vDbgPrintEx(iComponentId, Level, fmt, args); ret = vDbgPrintEx(iComponentId, Level, fmt, args);
__ms_va_end(args); va_end(args);
return ret; return ret;
} }
/****************************************************************************** /******************************************************************************
* vDbgPrintEx [NTDLL.@] * vDbgPrintEx [NTDLL.@]
*/ */
NTSTATUS WINAPI vDbgPrintEx( ULONG id, ULONG level, LPCSTR fmt, __ms_va_list args ) NTSTATUS WINAPI vDbgPrintEx( ULONG id, ULONG level, LPCSTR fmt, va_list args )
{ {
return vDbgPrintExWithPrefix( "", id, level, fmt, args ); return vDbgPrintExWithPrefix( "", id, level, fmt, args );
} }
...@@ -345,7 +345,7 @@ NTSTATUS WINAPI vDbgPrintEx( ULONG id, ULONG level, LPCSTR fmt, __ms_va_list arg ...@@ -345,7 +345,7 @@ NTSTATUS WINAPI vDbgPrintEx( ULONG id, ULONG level, LPCSTR fmt, __ms_va_list arg
/****************************************************************************** /******************************************************************************
* vDbgPrintExWithPrefix [NTDLL.@] * vDbgPrintExWithPrefix [NTDLL.@]
*/ */
NTSTATUS WINAPI vDbgPrintExWithPrefix( LPCSTR prefix, ULONG id, ULONG level, LPCSTR fmt, __ms_va_list args ) NTSTATUS WINAPI vDbgPrintExWithPrefix( LPCSTR prefix, ULONG id, ULONG level, LPCSTR fmt, va_list args )
{ {
ULONG level_mask = level <= 31 ? (1 << level) : level; ULONG level_mask = level <= 31 ? (1 << level) : level;
SIZE_T len = strlen( prefix ); SIZE_T len = strlen( prefix );
......
...@@ -1709,7 +1709,7 @@ struct format_message_args ...@@ -1709,7 +1709,7 @@ struct format_message_args
{ {
int last; /* last used arg */ int last; /* last used arg */
ULONG_PTR *array; /* args array */ ULONG_PTR *array; /* args array */
__ms_va_list *list; /* args va_list */ va_list *list; /* args va_list */
UINT64 arglist[102]; /* arguments fetched from va_list */ UINT64 arglist[102]; /* arguments fetched from va_list */
}; };
...@@ -1808,7 +1808,7 @@ static NTSTATUS add_format( WCHAR **buffer, WCHAR *end, const WCHAR **src, int i ...@@ -1808,7 +1808,7 @@ static NTSTATUS add_format( WCHAR **buffer, WCHAR *end, const WCHAR **src, int i
* RtlFormatMessage (NTDLL.@) * RtlFormatMessage (NTDLL.@)
*/ */
NTSTATUS WINAPI RtlFormatMessage( const WCHAR *src, ULONG width, BOOLEAN ignore_inserts, NTSTATUS WINAPI RtlFormatMessage( const WCHAR *src, ULONG width, BOOLEAN ignore_inserts,
BOOLEAN ansi, BOOLEAN is_array, __ms_va_list *args, BOOLEAN ansi, BOOLEAN is_array, va_list *args,
WCHAR *buffer, ULONG size, ULONG *retsize ) WCHAR *buffer, ULONG size, ULONG *retsize )
{ {
return RtlFormatMessageEx( src, width, ignore_inserts, ansi, is_array, args, buffer, size, retsize, 0 ); return RtlFormatMessageEx( src, width, ignore_inserts, ansi, is_array, args, buffer, size, retsize, 0 );
...@@ -1819,7 +1819,7 @@ NTSTATUS WINAPI RtlFormatMessage( const WCHAR *src, ULONG width, BOOLEAN ignore_ ...@@ -1819,7 +1819,7 @@ NTSTATUS WINAPI RtlFormatMessage( const WCHAR *src, ULONG width, BOOLEAN ignore_
* RtlFormatMessageEx (NTDLL.@) * RtlFormatMessageEx (NTDLL.@)
*/ */
NTSTATUS WINAPI RtlFormatMessageEx( const WCHAR *src, ULONG width, BOOLEAN ignore_inserts, NTSTATUS WINAPI RtlFormatMessageEx( const WCHAR *src, ULONG width, BOOLEAN ignore_inserts,
BOOLEAN ansi, BOOLEAN is_array, __ms_va_list *args, BOOLEAN ansi, BOOLEAN is_array, va_list *args,
WCHAR *buffer, ULONG size, ULONG *retsize, ULONG flags ) WCHAR *buffer, ULONG size, ULONG *retsize, ULONG flags )
{ {
static const WCHAR spaceW = ' '; static const WCHAR spaceW = ' ';
......
...@@ -1007,7 +1007,7 @@ static int char2digit( char c, int base ) ...@@ -1007,7 +1007,7 @@ static int char2digit( char c, int base )
} }
static int vsscanf( const char *str, const char *format, __ms_va_list ap) static int vsscanf( const char *str, const char *format, va_list ap)
{ {
int rd = 0, consumed = 0; int rd = 0, consumed = 0;
int nch; int nch;
...@@ -1445,10 +1445,10 @@ static int vsscanf( const char *str, const char *format, __ms_va_list ap) ...@@ -1445,10 +1445,10 @@ static int vsscanf( const char *str, const char *format, __ms_va_list ap)
int WINAPIV sscanf( const char *str, const char *format, ... ) int WINAPIV sscanf( const char *str, const char *format, ... )
{ {
int ret; int ret;
__ms_va_list valist; va_list valist;
__ms_va_start( valist, format ); va_start( valist, format );
ret = vsscanf( str, format, valist ); ret = vsscanf( str, format, valist );
__ms_va_end( valist ); va_end( valist );
return ret; return ret;
} }
......
...@@ -3524,20 +3524,20 @@ static LONG CALLBACK test_dbg_print_except_handler( EXCEPTION_POINTERS *eptrs ) ...@@ -3524,20 +3524,20 @@ static LONG CALLBACK test_dbg_print_except_handler( EXCEPTION_POINTERS *eptrs )
static NTSTATUS WINAPIV test_vDbgPrintEx( ULONG id, ULONG level, const char *fmt, ... ) static NTSTATUS WINAPIV test_vDbgPrintEx( ULONG id, ULONG level, const char *fmt, ... )
{ {
NTSTATUS status; NTSTATUS status;
__ms_va_list args; va_list args;
__ms_va_start( args, fmt ); va_start( args, fmt );
status = vDbgPrintEx( id, level, fmt, args ); status = vDbgPrintEx( id, level, fmt, args );
__ms_va_end( args ); va_end( args );
return status; return status;
} }
static NTSTATUS WINAPIV test_vDbgPrintExWithPrefix( const char *prefix, ULONG id, ULONG level, const char *fmt, ... ) static NTSTATUS WINAPIV test_vDbgPrintExWithPrefix( const char *prefix, ULONG id, ULONG level, const char *fmt, ... )
{ {
NTSTATUS status; NTSTATUS status;
__ms_va_list args; va_list args;
__ms_va_start( args, fmt ); va_start( args, fmt );
status = vDbgPrintExWithPrefix( prefix, id, level, fmt, args ); status = vDbgPrintExWithPrefix( prefix, id, level, fmt, args );
__ms_va_end( args ); va_end( args );
return status; return status;
} }
......
...@@ -72,7 +72,7 @@ static BOOLEAN (WINAPI *pRtlIsTextUnicode)(LPVOID, INT, INT *); ...@@ -72,7 +72,7 @@ static BOOLEAN (WINAPI *pRtlIsTextUnicode)(LPVOID, INT, INT *);
static NTSTATUS (WINAPI *pRtlHashUnicodeString)(PCUNICODE_STRING,BOOLEAN,ULONG,ULONG*); static NTSTATUS (WINAPI *pRtlHashUnicodeString)(PCUNICODE_STRING,BOOLEAN,ULONG,ULONG*);
static NTSTATUS (WINAPI *pRtlUnicodeToUTF8N)(CHAR *, ULONG, ULONG *, const WCHAR *, ULONG); static NTSTATUS (WINAPI *pRtlUnicodeToUTF8N)(CHAR *, ULONG, ULONG *, const WCHAR *, ULONG);
static NTSTATUS (WINAPI *pRtlUTF8ToUnicodeN)(WCHAR *, ULONG, ULONG *, const CHAR *, ULONG); static NTSTATUS (WINAPI *pRtlUTF8ToUnicodeN)(WCHAR *, ULONG, ULONG *, const CHAR *, ULONG);
static NTSTATUS (WINAPI *pRtlFormatMessage)(const WCHAR*,ULONG,BOOLEAN,BOOLEAN,BOOLEAN,__ms_va_list*,LPWSTR,ULONG,ULONG*); static NTSTATUS (WINAPI *pRtlFormatMessage)(const WCHAR*,ULONG,BOOLEAN,BOOLEAN,BOOLEAN,va_list*,LPWSTR,ULONG,ULONG*);
/*static VOID (WINAPI *pRtlFreeOemString)(PSTRING);*/ /*static VOID (WINAPI *pRtlFreeOemString)(PSTRING);*/
/*static VOID (WINAPI *pRtlCopyUnicodeString)(UNICODE_STRING *, const UNICODE_STRING *);*/ /*static VOID (WINAPI *pRtlCopyUnicodeString)(UNICODE_STRING *, const UNICODE_STRING *);*/
...@@ -2614,27 +2614,27 @@ static void test_RtlUTF8ToUnicodeN(void) ...@@ -2614,27 +2614,27 @@ static void test_RtlUTF8ToUnicodeN(void)
static NTSTATUS WINAPIV fmt( const WCHAR *src, ULONG width, BOOLEAN ignore_inserts, BOOLEAN ansi, static NTSTATUS WINAPIV fmt( const WCHAR *src, ULONG width, BOOLEAN ignore_inserts, BOOLEAN ansi,
WCHAR *buffer, ULONG size, ULONG *retsize, ... ) WCHAR *buffer, ULONG size, ULONG *retsize, ... )
{ {
__ms_va_list args; va_list args;
NTSTATUS status; NTSTATUS status;
*retsize = 0xdeadbeef; *retsize = 0xdeadbeef;
__ms_va_start( args, retsize ); va_start( args, retsize );
status = pRtlFormatMessage( src, width, ignore_inserts, ansi, FALSE, &args, buffer, size, retsize ); status = pRtlFormatMessage( src, width, ignore_inserts, ansi, FALSE, &args, buffer, size, retsize );
__ms_va_end( args ); va_end( args );
return status; return status;
} }
static void WINAPIV testfmt( const WCHAR *src, const WCHAR *expect, ULONG width, BOOL ansi, ... ) static void WINAPIV testfmt( const WCHAR *src, const WCHAR *expect, ULONG width, BOOL ansi, ... )
{ {
__ms_va_list args; va_list args;
NTSTATUS status; NTSTATUS status;
WCHAR buffer[128]; WCHAR buffer[128];
ULONG size = 0xdeadbeef; ULONG size = 0xdeadbeef;
memset( buffer, 0xcc, sizeof(buffer) ); memset( buffer, 0xcc, sizeof(buffer) );
__ms_va_start( args, ansi ); va_start( args, ansi );
status = pRtlFormatMessage( src, width, FALSE, ansi, FALSE, &args, buffer, sizeof(buffer), &size ); status = pRtlFormatMessage( src, width, FALSE, ansi, FALSE, &args, buffer, sizeof(buffer), &size );
__ms_va_end( args ); va_end( args );
ok( !status, "%s: failed %x\n", debugstr_w(src), status ); ok( !status, "%s: failed %x\n", debugstr_w(src), status );
ok( !lstrcmpW( buffer, expect ), "%s: got %s expected %s\n", debugstr_w(src), ok( !lstrcmpW( buffer, expect ), "%s: got %s expected %s\n", debugstr_w(src),
debugstr_w(buffer), debugstr_w(expect) ); debugstr_w(buffer), debugstr_w(expect) );
...@@ -2689,11 +2689,11 @@ static void test_RtlFormatMessage(void) ...@@ -2689,11 +2689,11 @@ static void test_RtlFormatMessage(void)
ULONG_PTR args[] = { 19, 17, 15, 13, 11, 9, 7 }; ULONG_PTR args[] = { 19, 17, 15, 13, 11, 9, 7 };
memset( buffer, 0xcc, sizeof(buffer) ); memset( buffer, 0xcc, sizeof(buffer) );
status = pRtlFormatMessage( L"%2!*.*I64x! %1!u! %4!u! %2!u!", 0, FALSE, FALSE, TRUE, status = pRtlFormatMessage( L"%2!*.*I64x! %1!u! %4!u! %2!u!", 0, FALSE, FALSE, TRUE,
(__ms_va_list *)args, buffer, sizeof(buffer), &size ); (va_list *)args, buffer, sizeof(buffer), &size );
ok( !lstrcmpW( buffer, L" 00000000000000d 19 13 17" ), "got %s\n", wine_dbgstr_w(buffer) ); ok( !lstrcmpW( buffer, L" 00000000000000d 19 13 17" ), "got %s\n", wine_dbgstr_w(buffer) );
memset( buffer, 0xcc, sizeof(buffer) ); memset( buffer, 0xcc, sizeof(buffer) );
status = pRtlFormatMessage( L"%1!I64u! %2!u! %4!.*I64x! %5!I64u!", 0, FALSE, FALSE, TRUE, status = pRtlFormatMessage( L"%1!I64u! %2!u! %4!.*I64x! %5!I64u!", 0, FALSE, FALSE, TRUE,
(__ms_va_list *)args, buffer, sizeof(buffer), &size ); (va_list *)args, buffer, sizeof(buffer), &size );
ok( !lstrcmpW( buffer, L"19 17 000000000000b 11" ), "got %s\n", wine_dbgstr_w(buffer) ); ok( !lstrcmpW( buffer, L"19 17 000000000000b 11" ), "got %s\n", wine_dbgstr_w(buffer) );
} }
#else #else
...@@ -2712,11 +2712,11 @@ static void test_RtlFormatMessage(void) ...@@ -2712,11 +2712,11 @@ static void test_RtlFormatMessage(void)
ULONG_PTR args[] = { 19, 17, 15, 13, 11, 9, 7 }; ULONG_PTR args[] = { 19, 17, 15, 13, 11, 9, 7 };
memset( buffer, 0xcc, sizeof(buffer) ); memset( buffer, 0xcc, sizeof(buffer) );
status = pRtlFormatMessage( L"%2!*.*I64x! %1!u! %4!u! %2!u!", 0, FALSE, FALSE, TRUE, status = pRtlFormatMessage( L"%2!*.*I64x! %1!u! %4!u! %2!u!", 0, FALSE, FALSE, TRUE,
(__ms_va_list *)args, buffer, sizeof(buffer), &size ); (va_list *)args, buffer, sizeof(buffer), &size );
ok( !lstrcmpW( buffer, L" d0000000f 19 13 17" ), "got %s\n", wine_dbgstr_w(buffer) ); ok( !lstrcmpW( buffer, L" d0000000f 19 13 17" ), "got %s\n", wine_dbgstr_w(buffer) );
memset( buffer, 0xcc, sizeof(buffer) ); memset( buffer, 0xcc, sizeof(buffer) );
status = pRtlFormatMessage( L"%1!I64u! %2!u! %4!.*I64x! %5!I64u!", 0, FALSE, FALSE, TRUE, status = pRtlFormatMessage( L"%1!I64u! %2!u! %4!.*I64x! %5!I64u!", 0, FALSE, FALSE, TRUE,
(__ms_va_list *)args, buffer, sizeof(buffer), &size ); (va_list *)args, buffer, sizeof(buffer), &size );
ok( !lstrcmpW( buffer, L"19 17 0000b00000000 11" ), "got %s\n", wine_dbgstr_w(buffer) ); ok( !lstrcmpW( buffer, L"19 17 0000b00000000 11" ), "got %s\n", wine_dbgstr_w(buffer) );
} }
} }
...@@ -2775,11 +2775,11 @@ static void test_RtlFormatMessage(void) ...@@ -2775,11 +2775,11 @@ static void test_RtlFormatMessage(void)
{ {
ULONG_PTR args[] = { 6, 4, 2, 5, 3, 1 }; ULONG_PTR args[] = { 6, 4, 2, 5, 3, 1 };
memset( buffer, 0xcc, sizeof(buffer) ); memset( buffer, 0xcc, sizeof(buffer) );
status = pRtlFormatMessage( L"%1!*.*u!,%1!*.*u!", 0, FALSE, FALSE, TRUE, (__ms_va_list *)args, status = pRtlFormatMessage( L"%1!*.*u!,%1!*.*u!", 0, FALSE, FALSE, TRUE, (va_list *)args,
buffer, sizeof(buffer), &size ); buffer, sizeof(buffer), &size );
ok( !lstrcmpW( buffer, L" 0002, 00003" ), "got %s\n", wine_dbgstr_w(buffer) ); ok( !lstrcmpW( buffer, L" 0002, 00003" ), "got %s\n", wine_dbgstr_w(buffer) );
memset( buffer, 0xcc, sizeof(buffer) ); memset( buffer, 0xcc, sizeof(buffer) );
status = pRtlFormatMessage( L"%1!*.*u!,%4!*.*u!", 0, FALSE, FALSE, TRUE, (__ms_va_list *)args, status = pRtlFormatMessage( L"%1!*.*u!,%4!*.*u!", 0, FALSE, FALSE, TRUE, (va_list *)args,
buffer, sizeof(buffer), &size ); buffer, sizeof(buffer), &size );
ok( !lstrcmpW( buffer, L" 0002, 001" ), "got %s\n", wine_dbgstr_w(buffer) ); ok( !lstrcmpW( buffer, L" 0002, 001" ), "got %s\n", wine_dbgstr_w(buffer) );
} }
......
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