Commit f0122420 authored by André Hentschel's avatar André Hentschel Committed by Alexandre Julliard

msvcrt: Implement _wasctime_s.

parent 35722cb4
......@@ -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);
......@@ -950,6 +951,31 @@ MSVCRT_wchar_t * CDECL MSVCRT__wasctime(const struct MSVCRT_tm *mstm)
}
/*********************************************************************
* _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.@)
*/
char * CDECL MSVCRT__ctime64(const MSVCRT___time64_t *time)
......
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