Commit f8313855 authored by Alexandre Julliard's avatar Alexandre Julliard

ntdll: Convert the DbgPrint* functions to use MS ABI varargs.

parent 649a576f
......@@ -156,6 +156,9 @@ extern int ntdll_umbstowcs(DWORD flags, const char* src, int srclen, WCHAR* dst,
extern int ntdll_wcstoumbs(DWORD flags, const WCHAR* src, int srclen, char* dst, int dstlen,
const char* defchar, int *used );
extern int CDECL NTDLL__vsnprintf( char *str, SIZE_T len, const char *format, __ms_va_list args );
extern int CDECL NTDLL__vsnwprintf( WCHAR *str, SIZE_T len, const WCHAR *format, __ms_va_list args );
/* load order */
enum loadorder
......
......@@ -303,11 +303,11 @@ void WINAPI RtlDumpResource(LPRTL_RWLOCK rwl)
NTSTATUS WINAPIV DbgPrint(LPCSTR fmt, ...)
{
char buf[512];
va_list args;
__ms_va_list args;
va_start(args, fmt);
vsprintf(buf,fmt, args);
va_end(args);
__ms_va_start(args, fmt);
NTDLL__vsnprintf(buf, sizeof(buf), fmt, args);
__ms_va_end(args);
MESSAGE("DbgPrint says: %s",buf);
/* hmm, raise exception? */
......@@ -321,18 +321,18 @@ NTSTATUS WINAPIV DbgPrint(LPCSTR fmt, ...)
NTSTATUS WINAPIV DbgPrintEx(ULONG iComponentId, ULONG Level, LPCSTR fmt, ...)
{
NTSTATUS ret;
va_list args;
__ms_va_list args;
va_start(args, fmt);
__ms_va_start(args, fmt);
ret = vDbgPrintEx(iComponentId, Level, fmt, args);
va_end(args);
__ms_va_end(args);
return ret;
}
/******************************************************************************
* vDbgPrintEx [NTDLL.@]
*/
NTSTATUS WINAPI vDbgPrintEx( ULONG id, ULONG level, LPCSTR fmt, va_list args )
NTSTATUS WINAPI vDbgPrintEx( ULONG id, ULONG level, LPCSTR fmt, __ms_va_list args )
{
return vDbgPrintExWithPrefix( "", id, level, fmt, args );
}
......@@ -340,11 +340,11 @@ NTSTATUS WINAPI vDbgPrintEx( ULONG id, ULONG level, LPCSTR fmt, va_list args )
/******************************************************************************
* vDbgPrintExWithPrefix [NTDLL.@]
*/
NTSTATUS WINAPI vDbgPrintExWithPrefix( LPCSTR prefix, ULONG id, ULONG level, LPCSTR fmt, va_list args )
NTSTATUS WINAPI vDbgPrintExWithPrefix( LPCSTR prefix, ULONG id, ULONG level, LPCSTR fmt, __ms_va_list args )
{
char buf[1024];
vsprintf(buf, fmt, args);
NTDLL__vsnprintf(buf, sizeof(buf), fmt, args);
switch (level & DPFLTR_MASK)
{
......
......@@ -2508,8 +2508,8 @@ NTSYSAPI NTSTATUS WINAPI RtlpNtCreateKey(PHANDLE,ACCESS_MASK,const OBJECT_ATTRI
NTSYSAPI NTSTATUS WINAPI RtlpNtEnumerateSubKey(HANDLE,UNICODE_STRING *, ULONG);
NTSYSAPI NTSTATUS WINAPI RtlpWaitForCriticalSection(RTL_CRITICAL_SECTION *);
NTSYSAPI NTSTATUS WINAPI RtlpUnWaitCriticalSection(RTL_CRITICAL_SECTION *);
NTSYSAPI NTSTATUS WINAPI vDbgPrintEx(ULONG,ULONG,LPCSTR,va_list);
NTSYSAPI NTSTATUS WINAPI vDbgPrintExWithPrefix(LPCSTR,ULONG,ULONG,LPCSTR,va_list);
NTSYSAPI NTSTATUS WINAPI vDbgPrintEx(ULONG,ULONG,LPCSTR,__ms_va_list);
NTSYSAPI NTSTATUS WINAPI vDbgPrintExWithPrefix(LPCSTR,ULONG,ULONG,LPCSTR,__ms_va_list);
/* Wine internal functions */
......
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