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

msvcrt: Implement asctime_s.

parent 66db270d
......@@ -1424,7 +1424,7 @@
@ cdecl abs(long) msvcrt.abs
@ cdecl acos(double) msvcrt.acos
@ cdecl asctime(ptr) msvcrt.asctime
@ stub asctime_s
@ cdecl asctime_s(ptr long ptr) msvcrt.asctime_s
@ cdecl asin(double) msvcrt.asin
@ cdecl atan(double) msvcrt.atan
@ cdecl atan2(double double) msvcrt.atan2
......
......@@ -1280,7 +1280,7 @@
@ cdecl abs(long) msvcrt.abs
@ cdecl acos(double) msvcrt.acos
@ cdecl asctime(ptr) msvcrt.asctime
@ stub asctime_s
@ cdecl asctime_s(ptr long ptr) msvcrt.asctime_s
@ cdecl asin(double) msvcrt.asin
@ cdecl atan(double) msvcrt.atan
@ cdecl atan2(double double) msvcrt.atan2
......
......@@ -1272,7 +1272,7 @@
@ cdecl acos(double) msvcrt.acos
@ cdecl -arch=x86_64 acosf(float) msvcrt.acosf
@ cdecl asctime(ptr) msvcrt.asctime
@ stub asctime_s
@ cdecl asctime_s(ptr long ptr) msvcrt.asctime_s
@ cdecl asin(double) msvcrt.asin
@ cdecl atan(double) msvcrt.atan
@ cdecl atan2(double double) msvcrt.atan2
......
......@@ -1214,7 +1214,7 @@
@ cdecl acos(double) MSVCRT_acos
@ cdecl -arch=x86_64 acosf(float) MSVCRT_acosf
@ cdecl asctime(ptr) MSVCRT_asctime
# stub asctime_s(ptr long ptr)
@ cdecl asctime_s(ptr long ptr) MSVCRT_asctime_s
@ cdecl asin(double) MSVCRT_asin
@ cdecl atan(double) MSVCRT_atan
@ cdecl atan2(double double) MSVCRT_atan2
......
......@@ -903,6 +903,31 @@ char * CDECL MSVCRT_asctime(const struct MSVCRT_tm *mstm)
}
/*********************************************************************
* asctime_s (MSVCRT.@)
*/
int CDECL MSVCRT_asctime_s(char* time, MSVCRT_size_t size, const struct MSVCRT_tm *mstm)
{
char* asc;
unsigned int len;
if (!MSVCRT_CHECK_PMT(time != NULL) || !MSVCRT_CHECK_PMT(mstm != NULL)) {
*MSVCRT__errno() = MSVCRT_EINVAL;
return MSVCRT_EINVAL;
}
asc = MSVCRT_asctime(mstm);
len = strlen(asc) + 1;
if(!MSVCRT_CHECK_PMT(size >= len)) {
*MSVCRT__errno() = MSVCRT_ERANGE;
return MSVCRT_ERANGE;
}
strcpy(time, asc);
return 0;
}
/*********************************************************************
* _wasctime (MSVCRT.@)
*/
MSVCRT_wchar_t * CDECL MSVCRT__wasctime(const struct MSVCRT_tm *mstm)
......
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