Commit 8667b8d1 authored by Alexandre Julliard's avatar Alexandre Julliard

regedit: Use the standard va_list instead of __ms_va_list.

parent 942f9f71
...@@ -44,7 +44,7 @@ struct edit_params ...@@ -44,7 +44,7 @@ struct edit_params
DWORD size; DWORD size;
}; };
static int vmessagebox(HWND hwnd, int buttons, int titleId, int resId, __ms_va_list va_args) static int vmessagebox(HWND hwnd, int buttons, int titleId, int resId, va_list va_args)
{ {
WCHAR title[256]; WCHAR title[256];
WCHAR fmt[1024]; WCHAR fmt[1024];
...@@ -64,23 +64,23 @@ static int vmessagebox(HWND hwnd, int buttons, int titleId, int resId, __ms_va_l ...@@ -64,23 +64,23 @@ static int vmessagebox(HWND hwnd, int buttons, int titleId, int resId, __ms_va_l
int WINAPIV messagebox(HWND hwnd, int buttons, int titleId, int resId, ...) int WINAPIV messagebox(HWND hwnd, int buttons, int titleId, int resId, ...)
{ {
__ms_va_list ap; va_list ap;
INT result; INT result;
__ms_va_start(ap, resId); va_start(ap, resId);
result = vmessagebox(hwnd, buttons, titleId, resId, ap); result = vmessagebox(hwnd, buttons, titleId, resId, ap);
__ms_va_end(ap); va_end(ap);
return result; return result;
} }
static void WINAPIV error_code_messagebox(HWND hwnd, unsigned int msg_id, ...) static void WINAPIV error_code_messagebox(HWND hwnd, unsigned int msg_id, ...)
{ {
__ms_va_list ap; va_list ap;
__ms_va_start(ap, msg_id); va_start(ap, msg_id);
vmessagebox(hwnd, MB_OK|MB_ICONERROR, IDS_ERROR, msg_id, ap); vmessagebox(hwnd, MB_OK|MB_ICONERROR, IDS_ERROR, msg_id, ap);
__ms_va_end(ap); va_end(ap);
} }
static BOOL change_dword_base(HWND hwndDlg, BOOL toHex) static BOOL change_dword_base(HWND hwndDlg, BOOL toHex)
......
...@@ -50,7 +50,7 @@ static void output_writeconsole(const WCHAR *str, DWORD wlen) ...@@ -50,7 +50,7 @@ static void output_writeconsole(const WCHAR *str, DWORD wlen)
} }
} }
static void output_formatstring(const WCHAR *fmt, __ms_va_list va_args) static void output_formatstring(const WCHAR *fmt, va_list va_args)
{ {
WCHAR *str; WCHAR *str;
DWORD len; DWORD len;
...@@ -69,31 +69,31 @@ static void output_formatstring(const WCHAR *fmt, __ms_va_list va_args) ...@@ -69,31 +69,31 @@ static void output_formatstring(const WCHAR *fmt, __ms_va_list va_args)
void WINAPIV output_message(unsigned int id, ...) void WINAPIV output_message(unsigned int id, ...)
{ {
WCHAR fmt[1536]; WCHAR fmt[1536];
__ms_va_list va_args; va_list va_args;
if (!LoadStringW(GetModuleHandleW(NULL), id, fmt, ARRAY_SIZE(fmt))) if (!LoadStringW(GetModuleHandleW(NULL), id, fmt, ARRAY_SIZE(fmt)))
{ {
WINE_FIXME("LoadString failed with %d\n", GetLastError()); WINE_FIXME("LoadString failed with %d\n", GetLastError());
return; return;
} }
__ms_va_start(va_args, id); va_start(va_args, id);
output_formatstring(fmt, va_args); output_formatstring(fmt, va_args);
__ms_va_end(va_args); va_end(va_args);
} }
void WINAPIV error_exit(unsigned int id, ...) void WINAPIV error_exit(unsigned int id, ...)
{ {
WCHAR fmt[1536]; WCHAR fmt[1536];
__ms_va_list va_args; va_list va_args;
if (!LoadStringW(GetModuleHandleW(NULL), id, fmt, ARRAY_SIZE(fmt))) if (!LoadStringW(GetModuleHandleW(NULL), id, fmt, ARRAY_SIZE(fmt)))
{ {
WINE_FIXME("LoadString failed with %u\n", GetLastError()); WINE_FIXME("LoadString failed with %u\n", GetLastError());
return; return;
} }
__ms_va_start(va_args, id); va_start(va_args, id);
output_formatstring(fmt, va_args); output_formatstring(fmt, va_args);
__ms_va_end(va_args); va_end(va_args);
exit(0); /* regedit.exe always terminates with error code zero */ exit(0); /* regedit.exe always terminates with error code zero */
} }
......
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