msvcrt: Implement _wfreopen_s.

This commit is contained in:
André Hentschel 2011-11-13 18:33:47 +01:00 committed by Alexandre Julliard
parent ba5b0c34a8
commit 947d1bf588
5 changed files with 23 additions and 4 deletions

View File

@ -1350,7 +1350,7 @@
@ cdecl _wfopen(wstr wstr) msvcrt._wfopen
@ cdecl _wfopen_s(ptr wstr wstr) msvcrt._wfopen_s
@ cdecl _wfreopen(wstr wstr ptr) msvcrt._wfreopen
@ stub _wfreopen_s
@ cdecl _wfreopen_s(ptr wstr wstr ptr) msvcrt._wfreopen_s
@ cdecl _wfsopen(wstr wstr long) msvcrt._wfsopen
@ cdecl _wfullpath(ptr wstr long) msvcrt._wfullpath
@ cdecl _wgetcwd(wstr long) msvcrt._wgetcwd

View File

@ -1203,7 +1203,7 @@
@ cdecl _wfopen(wstr wstr) msvcrt._wfopen
@ cdecl _wfopen_s(ptr wstr wstr) msvcrt._wfopen_s
@ cdecl _wfreopen(wstr wstr ptr) msvcrt._wfreopen
@ stub _wfreopen_s
@ cdecl _wfreopen_s(ptr wstr wstr ptr) msvcrt._wfreopen_s
@ cdecl _wfsopen(wstr wstr long) msvcrt._wfsopen
@ cdecl _wfullpath(ptr wstr long) msvcrt._wfullpath
@ cdecl _wgetcwd(wstr long) msvcrt._wgetcwd

View File

@ -1197,7 +1197,7 @@
@ cdecl _wfopen(wstr wstr) msvcrt._wfopen
@ cdecl _wfopen_s(ptr wstr wstr) msvcrt._wfopen_s
@ cdecl _wfreopen(wstr wstr ptr) msvcrt._wfreopen
@ stub _wfreopen_s
@ cdecl _wfreopen_s(ptr wstr wstr ptr) msvcrt._wfreopen_s
@ cdecl _wfsopen(wstr wstr long) msvcrt._wfsopen
@ cdecl _wfullpath(ptr wstr long) msvcrt._wfullpath
@ cdecl _wgetcwd(wstr long) msvcrt._wgetcwd

View File

@ -3276,6 +3276,25 @@ MSVCRT_FILE* CDECL MSVCRT__wfreopen(const MSVCRT_wchar_t *path, const MSVCRT_wch
return file;
}
/*********************************************************************
* _wfreopen_s (MSVCRT.@)
*/
int CDECL MSVCRT__wfreopen_s(MSVCRT_FILE** pFile,
const MSVCRT_wchar_t *path, const MSVCRT_wchar_t *mode, MSVCRT_FILE* file)
{
if (!MSVCRT_CHECK_PMT(pFile != NULL) || !MSVCRT_CHECK_PMT(path != NULL) ||
!MSVCRT_CHECK_PMT(mode != NULL) || !MSVCRT_CHECK_PMT(file != NULL)) {
*MSVCRT__errno() = MSVCRT_EINVAL;
return MSVCRT_EINVAL;
}
*pFile = MSVCRT__wfreopen(path, mode, file);
if(!*pFile)
return *MSVCRT__errno();
return 0;
}
/*********************************************************************
* freopen (MSVCRT.@)
*

View File

@ -1133,7 +1133,7 @@
@ cdecl _wfopen(wstr wstr) MSVCRT__wfopen
@ cdecl _wfopen_s(ptr wstr wstr) MSVCRT__wfopen_s
@ cdecl _wfreopen(wstr wstr ptr) MSVCRT__wfreopen
# stub _wfreopen_s(ptr wstr wstr ptr)
@ cdecl _wfreopen_s(ptr wstr wstr ptr) MSVCRT__wfreopen_s
@ cdecl _wfsopen(wstr wstr long) MSVCRT__wfsopen
@ cdecl _wfullpath(ptr wstr long)
# stub _wfullpath_dbg(ptr wstr long long str long)