msvcrt: Add _wctime32_s implementation.

This commit is contained in:
Piotr Caban 2015-09-14 17:48:44 +02:00 committed by Alexandre Julliard
parent 05d2a08306
commit ecac39c19b
8 changed files with 60 additions and 15 deletions

View File

@ -1525,9 +1525,9 @@
@ cdecl _wcsupr_s_l(wstr long ptr) MSVCRT__wcsupr_s_l
@ cdecl _wcsxfrm_l(ptr wstr long ptr) MSVCRT__wcsxfrm_l
@ cdecl _wctime32(ptr) MSVCRT__wctime32
@ stub _wctime32_s
@ cdecl _wctime32_s(ptr long ptr) MSVCRT__wctime32_s
@ cdecl _wctime64(ptr) MSVCRT__wctime64
@ stub _wctime64_s
@ cdecl _wctime64_s(ptr long ptr) MSVCRT__wctime64_s
@ cdecl _wctomb_l(ptr long ptr) MSVCRT__wctomb_l
@ cdecl _wctomb_s_l(ptr ptr long long ptr) MSVCRT__wctomb_s_l
# extern _wctype

View File

@ -1884,9 +1884,9 @@
@ cdecl _wcsupr_s_l(wstr long ptr) MSVCRT__wcsupr_s_l
@ cdecl _wcsxfrm_l(ptr wstr long ptr) MSVCRT__wcsxfrm_l
@ cdecl _wctime32(ptr) MSVCRT__wctime32
@ stub _wctime32_s
@ cdecl _wctime32_s(ptr long ptr) MSVCRT__wctime32_s
@ cdecl _wctime64(ptr) MSVCRT__wctime64
@ stub _wctime64_s
@ cdecl _wctime64_s(ptr long ptr) MSVCRT__wctime64_s
@ cdecl _wctomb_l(ptr long ptr) MSVCRT__wctomb_l
@ cdecl _wctomb_s_l(ptr ptr long long ptr) MSVCRT__wctomb_s_l
# extern _wctype

View File

@ -1908,9 +1908,9 @@
@ cdecl _wcsupr_s_l(wstr long ptr) MSVCRT__wcsupr_s_l
@ cdecl _wcsxfrm_l(ptr wstr long ptr) MSVCRT__wcsxfrm_l
@ cdecl _wctime32(ptr) MSVCRT__wctime32
@ stub _wctime32_s
@ cdecl _wctime32_s(ptr long ptr) MSVCRT__wctime32_s
@ cdecl _wctime64(ptr) MSVCRT__wctime64
@ stub _wctime64_s
@ cdecl _wctime64_s(ptr long ptr) MSVCRT__wctime64_s
@ cdecl _wctomb_l(ptr long ptr) MSVCRT__wctomb_l
@ cdecl _wctomb_s_l(ptr ptr long long ptr) MSVCRT__wctomb_s_l
# extern _wctype

View File

@ -1601,9 +1601,9 @@
@ cdecl _wcsupr_s_l(wstr long ptr) msvcr120._wcsupr_s_l
@ cdecl _wcsxfrm_l(ptr wstr long ptr) msvcr120._wcsxfrm_l
@ cdecl _wctime32(ptr) msvcr120._wctime32
@ stub _wctime32_s
@ cdecl _wctime32_s(ptr long ptr) msvcr120._wctime32_s
@ cdecl _wctime64(ptr) msvcr120._wctime64
@ stub _wctime64_s
@ cdecl _wctime64_s(ptr long ptr) msvcr120._wctime64_s
@ cdecl _wctomb_l(ptr long ptr) msvcr120._wctomb_l
@ cdecl _wctomb_s_l(ptr ptr long long ptr) msvcr120._wctomb_s_l
# extern _wctype

View File

@ -1205,9 +1205,9 @@
@ cdecl _wcsupr_s_l(wstr long ptr) MSVCRT__wcsupr_s_l
@ cdecl _wcsxfrm_l(ptr wstr long ptr) MSVCRT__wcsxfrm_l
@ cdecl _wctime32(ptr) MSVCRT__wctime32
@ stub _wctime32_s
@ cdecl _wctime32_s(ptr long ptr) MSVCRT__wctime32_s
@ cdecl _wctime64(ptr) MSVCRT__wctime64
@ stub _wctime64_s
@ cdecl _wctime64_s(ptr long ptr) MSVCRT__wctime64_s
@ cdecl _wctomb_l(ptr long ptr) MSVCRT__wctomb_l
@ cdecl _wctomb_s_l(ptr ptr long long ptr) MSVCRT__wctomb_s_l
# extern _wctype

View File

@ -1180,9 +1180,9 @@
@ cdecl _wcsupr_s_l(wstr long ptr) MSVCRT__wcsupr_s_l
@ cdecl _wcsxfrm_l(ptr wstr long ptr) MSVCRT__wcsxfrm_l
@ cdecl _wctime32(ptr) MSVCRT__wctime32
@ stub _wctime32_s
@ cdecl _wctime32_s(ptr long ptr) MSVCRT__wctime32_s
@ cdecl _wctime64(ptr) MSVCRT__wctime64
@ stub _wctime64_s
@ cdecl _wctime64_s(ptr long ptr) MSVCRT__wctime64_s
@ cdecl _wctomb_l(ptr long ptr) MSVCRT__wctomb_l
@ cdecl _wctomb_s_l(ptr ptr long long ptr) MSVCRT__wctomb_s_l
# extern _wctype

View File

@ -1137,9 +1137,9 @@
@ cdecl _wcsxfrm_l(ptr wstr long ptr) MSVCRT__wcsxfrm_l
@ cdecl _wctime(ptr) MSVCRT__wctime
@ cdecl _wctime32(ptr) MSVCRT__wctime32
# stub _wctime32_s(ptr long ptr)
@ cdecl _wctime32_s(ptr long ptr) MSVCRT__wctime32_s
@ cdecl _wctime64(ptr) MSVCRT__wctime64
# stub _wctime64_s(ptr long ptr)
@ cdecl _wctime64_s(ptr long ptr) MSVCRT__wctime64_s
@ cdecl _wctomb_l(ptr long ptr) MSVCRT__wctomb_l
@ cdecl _wctomb_s_l(ptr ptr long long ptr) MSVCRT__wctomb_s_l
# extern _wctype

View File

@ -1358,7 +1358,7 @@ int CDECL MSVCRT__wasctime_s(MSVCRT_wchar_t* time, MSVCRT_size_t size, const str
if (!MSVCRT_CHECK_PMT(mstm != NULL)) return MSVCRT_EINVAL;
ret = MSVCRT_asctime_s(buffer, sizeof(buffer), mstm);
if(!ret)
if(ret)
return ret;
MultiByteToWideChar(CP_ACP, 0, buffer, -1, time, size);
return 0;
@ -1468,6 +1468,51 @@ MSVCRT_wchar_t * CDECL MSVCRT__wctime(const MSVCRT___time32_t *time)
}
#endif
/*********************************************************************
* _wctime64_s (MSVCRT.@)
*/
int CDECL MSVCRT__wctime64_s(MSVCRT_wchar_t *buf,
MSVCRT_size_t size, const MSVCRT___time64_t *time)
{
struct MSVCRT_tm tm;
int ret;
if(!MSVCRT_CHECK_PMT(buf != NULL)) return MSVCRT_EINVAL;
if(!MSVCRT_CHECK_PMT(size != 0)) return MSVCRT_EINVAL;
buf[0] = 0;
if(!MSVCRT_CHECK_PMT(time != NULL)) return MSVCRT_EINVAL;
if(!MSVCRT_CHECK_PMT(*time >= 0)) return MSVCRT_EINVAL;
if(!MSVCRT_CHECK_PMT(*time <= _MAX__TIME64_T)) return MSVCRT_EINVAL;
ret = _localtime64_s(&tm, time);
if(ret != 0)
return ret;
return MSVCRT__wasctime_s(buf, size, &tm);
}
/*********************************************************************
* _wctime32_s (MSVCRT.@)
*/
int CDECL MSVCRT__wctime32_s(MSVCRT_wchar_t *buf, MSVCRT_size_t size,
const MSVCRT___time32_t *time)
{
struct MSVCRT_tm tm;
int ret;
if(!MSVCRT_CHECK_PMT(buf != NULL)) return MSVCRT_EINVAL;
if(!MSVCRT_CHECK_PMT(size != 0)) return MSVCRT_EINVAL;
buf[0] = 0;
if(!MSVCRT_CHECK_PMT(time != NULL)) return MSVCRT_EINVAL;
if(!MSVCRT_CHECK_PMT(*time >= 0)) return MSVCRT_EINVAL;
ret = _localtime32_s(&tm, time);
if(ret != 0)
return ret;
return MSVCRT__wasctime_s(buf, size, &tm);
}
/*********************************************************************
* _get_timezone (MSVCR100.@)
*/