msvcrt: Implement _ctime32/64_s.
This commit is contained in:
parent
01ab7df67f
commit
504e68ac24
|
@ -560,9 +560,9 @@
|
|||
@ varargs _cscanf_s(str) msvcrt._cscanf_s
|
||||
@ varargs _cscanf_s_l(str ptr) msvcrt._cscanf_s_l
|
||||
@ cdecl _ctime32(ptr) msvcrt._ctime32
|
||||
@ stub _ctime32_s
|
||||
@ cdecl _ctime32_s(str long ptr) msvcrt._ctime32_s
|
||||
@ cdecl _ctime64(ptr) msvcrt._ctime64
|
||||
@ stub _ctime64_s
|
||||
@ cdecl _ctime64_s(str long ptr) msvcrt._ctime64_s
|
||||
@ cdecl _cwait(ptr long long) msvcrt._cwait
|
||||
@ varargs _cwprintf(wstr) msvcrt._cwprintf
|
||||
@ stub _cwprintf_l
|
||||
|
|
|
@ -399,9 +399,9 @@
|
|||
@ varargs _cscanf_s(str) msvcrt._cscanf_s
|
||||
@ varargs _cscanf_s_l(str ptr) msvcrt._cscanf_s_l
|
||||
@ cdecl _ctime32(ptr) msvcrt._ctime32
|
||||
@ stub _ctime32_s
|
||||
@ cdecl _ctime32_s(str ptr long) msvcrt._ctime32_s
|
||||
@ cdecl _ctime64(ptr) msvcrt._ctime64
|
||||
@ stub _ctime64_s
|
||||
@ cdecl _ctime64_s(str ptr long) msvcrt._ctime64_s
|
||||
@ cdecl _cwait(ptr long long) msvcrt._cwait
|
||||
@ varargs _cwprintf(wstr) msvcrt._cwprintf
|
||||
@ stub _cwprintf_l
|
||||
|
|
|
@ -391,9 +391,9 @@
|
|||
@ varargs _cscanf_s(str) msvcrt._cscanf_s
|
||||
@ varargs _cscanf_s_l(str ptr) msvcrt._cscanf_s_l
|
||||
@ cdecl _ctime32(ptr) msvcrt._ctime32
|
||||
@ stub _ctime32_s
|
||||
@ cdecl _ctime32_s(str long ptr) msvcrt._ctime32_s
|
||||
@ cdecl _ctime64(ptr) msvcrt._ctime64
|
||||
@ stub _ctime64_s
|
||||
@ cdecl _ctime64_s(str long ptr) msvcrt._ctime64_s
|
||||
@ cdecl _cwait(ptr long long) msvcrt._cwait
|
||||
@ varargs _cwprintf(wstr) msvcrt._cwprintf
|
||||
@ stub _cwprintf_l
|
||||
|
|
|
@ -356,9 +356,9 @@
|
|||
@ varargs _cscanf_s(str)
|
||||
@ varargs _cscanf_s_l(str ptr)
|
||||
@ cdecl _ctime32(ptr) MSVCRT__ctime32
|
||||
# stub _ctime32_s
|
||||
@ cdecl _ctime32_s(str long ptr) MSVCRT__ctime32_s
|
||||
@ cdecl _ctime64(ptr) MSVCRT__ctime64
|
||||
# stub _ctime64_s
|
||||
@ cdecl _ctime64_s(str long ptr) MSVCRT__ctime64_s
|
||||
@ extern _ctype MSVCRT__ctype
|
||||
@ cdecl _cwait(ptr long long)
|
||||
@ varargs _cwprintf(wstr)
|
||||
|
|
|
@ -901,6 +901,28 @@ char * CDECL MSVCRT__ctime64(const MSVCRT___time64_t *time)
|
|||
return MSVCRT_asctime( t );
|
||||
}
|
||||
|
||||
/*********************************************************************
|
||||
* _ctime64_s (MSVCRT.@)
|
||||
*/
|
||||
int CDECL MSVCRT__ctime64_s(char *res, MSVCRT_size_t len, const MSVCRT___time64_t *time)
|
||||
{
|
||||
struct MSVCRT_tm *t;
|
||||
if( !MSVCRT_CHECK_PMT( res != NULL ) || !MSVCRT_CHECK_PMT( len >= 26 ) )
|
||||
{
|
||||
*MSVCRT__errno() = MSVCRT_EINVAL;
|
||||
return MSVCRT_EINVAL;
|
||||
}
|
||||
res[0] = '\0';
|
||||
if( !MSVCRT_CHECK_PMT( time != NULL ) || !MSVCRT_CHECK_PMT( time > 0 ) )
|
||||
{
|
||||
*MSVCRT__errno() = MSVCRT_EINVAL;
|
||||
return MSVCRT_EINVAL;
|
||||
}
|
||||
t = MSVCRT__localtime64( time );
|
||||
strcpy( res, MSVCRT_asctime( t ) );
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*********************************************************************
|
||||
* _ctime32 (MSVCRT.@)
|
||||
*/
|
||||
|
@ -912,6 +934,28 @@ char * CDECL MSVCRT__ctime32(const MSVCRT___time32_t *time)
|
|||
return MSVCRT_asctime( t );
|
||||
}
|
||||
|
||||
/*********************************************************************
|
||||
* _ctime32_s (MSVCRT.@)
|
||||
*/
|
||||
int CDECL MSVCRT__ctime32_s(char *res, MSVCRT_size_t len, const MSVCRT___time32_t *time)
|
||||
{
|
||||
struct MSVCRT_tm *t;
|
||||
if( !MSVCRT_CHECK_PMT( res != NULL ) || !MSVCRT_CHECK_PMT( len >= 26 ) )
|
||||
{
|
||||
*MSVCRT__errno() = MSVCRT_EINVAL;
|
||||
return MSVCRT_EINVAL;
|
||||
}
|
||||
res[0] = '\0';
|
||||
if( !MSVCRT_CHECK_PMT( time != NULL ) || !MSVCRT_CHECK_PMT( time > 0 ) )
|
||||
{
|
||||
*MSVCRT__errno() = MSVCRT_EINVAL;
|
||||
return MSVCRT_EINVAL;
|
||||
}
|
||||
t = MSVCRT__localtime32( time );
|
||||
strcpy( res, MSVCRT_asctime( t ) );
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*********************************************************************
|
||||
* ctime (MSVCRT.@)
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue