msvcrt: Implement _wasctime_s.
This commit is contained in:
parent
35722cb4ce
commit
f012242037
|
@ -1277,7 +1277,7 @@
|
|||
@ cdecl _waccess(wstr long) msvcrt._waccess
|
||||
@ cdecl _waccess_s(wstr long) msvcrt._waccess_s
|
||||
@ cdecl _wasctime(ptr) msvcrt._wasctime
|
||||
@ stub _wasctime_s
|
||||
@ cdecl _wasctime_s(ptr long ptr) msvcrt._wasctime_s
|
||||
@ cdecl _wassert(wstr wstr long) msvcrt._wassert
|
||||
@ cdecl _wchdir(wstr) msvcrt._wchdir
|
||||
@ cdecl _wchmod(wstr long) msvcrt._wchmod
|
||||
|
|
|
@ -1130,7 +1130,7 @@
|
|||
@ cdecl _waccess(wstr long) msvcrt._waccess
|
||||
@ cdecl _waccess_s(wstr long) msvcrt._waccess_s
|
||||
@ cdecl _wasctime(ptr) msvcrt._wasctime
|
||||
@ stub _wasctime_s
|
||||
@ cdecl _wasctime_s(ptr long ptr) msvcrt._wasctime_s
|
||||
@ cdecl _wassert(wstr wstr long) msvcrt._wassert
|
||||
@ cdecl _wchdir(wstr) msvcrt._wchdir
|
||||
@ cdecl _wchmod(wstr long) msvcrt._wchmod
|
||||
|
|
|
@ -1124,7 +1124,7 @@
|
|||
@ cdecl _waccess(wstr long) msvcrt._waccess
|
||||
@ cdecl _waccess_s(wstr long) msvcrt._waccess_s
|
||||
@ cdecl _wasctime(ptr) msvcrt._wasctime
|
||||
@ stub _wasctime_s
|
||||
@ cdecl _wasctime_s(ptr long ptr) msvcrt._wasctime_s
|
||||
@ cdecl _wassert(wstr wstr long) msvcrt._wassert
|
||||
@ cdecl _wchdir(wstr) msvcrt._wchdir
|
||||
@ cdecl _wchmod(wstr long) msvcrt._wchmod
|
||||
|
|
|
@ -1060,7 +1060,7 @@
|
|||
@ cdecl _waccess(wstr long) MSVCRT__waccess
|
||||
@ cdecl _waccess_s(wstr long)
|
||||
@ cdecl _wasctime(ptr) MSVCRT__wasctime
|
||||
# stub _wasctime_s(ptr long ptr)
|
||||
@ cdecl _wasctime_s(ptr long ptr) MSVCRT__wasctime_s
|
||||
@ cdecl _wassert(wstr wstr long) MSVCRT__wassert
|
||||
@ cdecl _wchdir(wstr) MSVCRT__wchdir
|
||||
@ cdecl _wchmod(wstr long) MSVCRT__wchmod
|
||||
|
|
|
@ -36,6 +36,7 @@
|
|||
#include "winbase.h"
|
||||
#include "winnls.h"
|
||||
#include "wine/debug.h"
|
||||
#include "wine/unicode.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(msvcrt);
|
||||
|
||||
|
@ -949,6 +950,31 @@ MSVCRT_wchar_t * CDECL MSVCRT__wasctime(const struct MSVCRT_tm *mstm)
|
|||
return data->wasctime_buffer;
|
||||
}
|
||||
|
||||
/*********************************************************************
|
||||
* _wasctime_s (MSVCRT.@)
|
||||
*/
|
||||
int CDECL MSVCRT__wasctime_s(MSVCRT_wchar_t* time, MSVCRT_size_t size, const struct MSVCRT_tm *mstm)
|
||||
{
|
||||
WCHAR* asc;
|
||||
unsigned int len;
|
||||
|
||||
if (!MSVCRT_CHECK_PMT(time != NULL) || !MSVCRT_CHECK_PMT(mstm != NULL)) {
|
||||
*MSVCRT__errno() = MSVCRT_EINVAL;
|
||||
return MSVCRT_EINVAL;
|
||||
}
|
||||
|
||||
asc = MSVCRT__wasctime(mstm);
|
||||
len = (strlenW(asc) + 1) * sizeof(WCHAR);
|
||||
|
||||
if(!MSVCRT_CHECK_PMT(size >= len)) {
|
||||
*MSVCRT__errno() = MSVCRT_ERANGE;
|
||||
return MSVCRT_ERANGE;
|
||||
}
|
||||
|
||||
strcpyW(time, asc);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*********************************************************************
|
||||
* _ctime64 (MSVCRT.@)
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue