mirror of
https://github.com/reactos/reactos.git
synced 2025-08-02 05:25:48 +00:00
Create a branch for Aleksandar Andrejevic for his work on NTVDM. See http://jira.reactos.org/browse/CORE-7250 for more details.
svn path=/branches/ntvdm/; revision=59241
This commit is contained in:
parent
3e3200acef
commit
4f0b8d3db0
20620 changed files with 0 additions and 1232833 deletions
41
lib/sdk/crt/time/strtime.c
Normal file
41
lib/sdk/crt/time/strtime.c
Normal file
|
@ -0,0 +1,41 @@
|
|||
/*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS system libraries
|
||||
* FILE: lib/sdk/crt/time/strtime.c
|
||||
* PURPOSE: Fills a buffer with a formatted time representation
|
||||
* PROGRAMER: Ariadne
|
||||
* UPDATE HISTORY:
|
||||
* 28/12/98: Created
|
||||
*/
|
||||
#include <precomp.h>
|
||||
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
char* _strtime(char* time)
|
||||
{
|
||||
static const char format[] = "HH':'mm':'ss";
|
||||
|
||||
GetTimeFormatA(LOCALE_NEUTRAL, 0, NULL, format, time, 9);
|
||||
|
||||
return time;
|
||||
}
|
||||
|
||||
int CDECL _strtime_s(char* time, size_t size)
|
||||
{
|
||||
if(time && size)
|
||||
time[0] = '\0';
|
||||
|
||||
if(!time) {
|
||||
*_errno() = EINVAL;
|
||||
return EINVAL;
|
||||
}
|
||||
|
||||
if(size < 9) {
|
||||
*_errno() = ERANGE;
|
||||
return ERANGE;
|
||||
}
|
||||
|
||||
_strtime(time);
|
||||
return 0;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue