msvcrt: Implement _wperror.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com> Signed-off-by: Piotr Caban <piotr@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
6d21655ed9
commit
56eb4d3105
|
@ -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
|
||||
|
|
|
@ -343,6 +343,31 @@ void CDECL MSVCRT_perror(const char* str)
|
|||
MSVCRT__write( 2, "\n", 1 );
|
||||
}
|
||||
|
||||
/*********************************************************************
|
||||
* _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.@)
|
||||
*/
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue