Commit 56eb4d31 authored by Hugh McMaster's avatar Hugh McMaster Committed by Alexandre Julliard

msvcrt: Implement _wperror.

parent 6d21655e
......@@ -1568,7 +1568,7 @@
@ cdecl _wmktemp(wstr) MSVCRT__wmktemp
@ cdecl _wmktemp_s(wstr long) MSVCRT__wmktemp_s
@ varargs _wopen(wstr long) MSVCRT__wopen
@ stub _wperror(wstr)
@ cdecl _wperror(wstr) MSVCRT__wperror
@ extern _wpgmptr MSVCRT__wpgmptr
@ cdecl _wpopen(wstr wstr) MSVCRT__wpopen
@ stub _wprintf_l
......
......@@ -1925,7 +1925,7 @@
@ cdecl _wmktemp(wstr) MSVCRT__wmktemp
@ cdecl _wmktemp_s(wstr long) MSVCRT__wmktemp_s
@ varargs _wopen(wstr long) MSVCRT__wopen
@ stub _wperror(wstr)
@ cdecl _wperror(wstr) MSVCRT__wperror
@ extern _wpgmptr MSVCRT__wpgmptr
@ cdecl _wpopen(wstr wstr) MSVCRT__wpopen
@ stub _wprintf_l
......
......@@ -1949,7 +1949,7 @@
@ cdecl _wmktemp(wstr) MSVCRT__wmktemp
@ cdecl _wmktemp_s(wstr long) MSVCRT__wmktemp_s
@ varargs _wopen(wstr long) MSVCRT__wopen
@ stub _wperror(wstr)
@ cdecl _wperror(wstr) MSVCRT__wperror
@ extern _wpgmptr MSVCRT__wpgmptr
@ cdecl _wpopen(wstr wstr) MSVCRT__wpopen
@ stub _wprintf_l
......
......@@ -641,7 +641,7 @@
@ cdecl _wmkdir(wstr) MSVCRT__wmkdir
@ cdecl _wmktemp(wstr) MSVCRT__wmktemp
@ varargs _wopen(wstr long) MSVCRT__wopen
@ stub _wperror(wstr)
@ cdecl _wperror(wstr) MSVCRT__wperror
@ extern _wpgmptr MSVCRT__wpgmptr
@ cdecl _wpopen(wstr wstr) MSVCRT__wpopen
@ cdecl _wputenv(wstr)
......
......@@ -637,7 +637,7 @@
@ cdecl _wmkdir(wstr) MSVCRT__wmkdir
@ cdecl _wmktemp(wstr) MSVCRT__wmktemp
@ varargs _wopen(wstr long) MSVCRT__wopen
@ stub _wperror(wstr)
@ cdecl _wperror(wstr) MSVCRT__wperror
@ extern _wpgmptr MSVCRT__wpgmptr
@ cdecl _wpopen(wstr wstr) MSVCRT__wpopen
@ cdecl _wputenv(wstr)
......
......@@ -1250,7 +1250,7 @@
@ cdecl _wmktemp(wstr) MSVCRT__wmktemp
@ cdecl _wmktemp_s(wstr long) MSVCRT__wmktemp_s
@ varargs _wopen(wstr long) MSVCRT__wopen
@ stub _wperror(wstr)
@ cdecl _wperror(wstr) MSVCRT__wperror
@ extern _wpgmptr MSVCRT__wpgmptr
@ cdecl _wpopen(wstr wstr) MSVCRT__wpopen
@ stub _wprintf_l
......
......@@ -1223,7 +1223,7 @@
@ cdecl _wmktemp(wstr) MSVCRT__wmktemp
@ cdecl _wmktemp_s(wstr long) MSVCRT__wmktemp_s
@ varargs _wopen(wstr long) MSVCRT__wopen
@ stub _wperror(wstr)
@ cdecl _wperror(wstr) MSVCRT__wperror
@ extern _wpgmptr MSVCRT__wpgmptr
@ cdecl _wpopen(wstr wstr) MSVCRT__wpopen
@ stub _wprintf_l
......
......@@ -344,6 +344,31 @@ void CDECL MSVCRT_perror(const char* str)
}
/*********************************************************************
* _wperror (MSVCRT.@)
*/
void CDECL MSVCRT__wperror(const MSVCRT_wchar_t* str)
{
MSVCRT_size_t size;
char *buffer = NULL;
if (str && *str)
{
size = MSVCRT_wcstombs(NULL, str, 0);
if (size == -1) return;
size++;
buffer = MSVCRT_malloc(size);
if (!buffer) return;
if (MSVCRT_wcstombs(buffer, str, size) == -1)
{
MSVCRT_free(buffer);
return;
}
}
MSVCRT_perror(buffer);
if (buffer) MSVCRT_free(buffer);
}
/*********************************************************************
* _wcserror_s (MSVCRT.@)
*/
int CDECL MSVCRT__wcserror_s(MSVCRT_wchar_t* buffer, MSVCRT_size_t nc, int err)
......
......@@ -1184,7 +1184,7 @@
@ cdecl _wmktemp_s(wstr long) MSVCRT__wmktemp_s
@ varargs _wopen(wstr long) MSVCRT__wopen
# stub _woutput_s
@ stub _wperror(wstr)
@ cdecl _wperror(wstr) MSVCRT__wperror
@ extern _wpgmptr MSVCRT__wpgmptr
@ cdecl _wpopen (wstr wstr) MSVCRT__wpopen
# stub _wprintf_l(wstr ptr)
......
......@@ -2097,7 +2097,7 @@
@ cdecl _wmktemp(wstr) MSVCRT__wmktemp
@ cdecl _wmktemp_s(wstr long) MSVCRT__wmktemp_s
@ varargs _wopen(wstr long) MSVCRT__wopen
@ stub _wperror(wstr)
@ cdecl _wperror(wstr) MSVCRT__wperror
@ cdecl _wpopen(wstr wstr) MSVCRT__wpopen
@ cdecl _wputenv(wstr)
@ cdecl _wputenv_s(wstr wstr)
......
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