ReactOS 0.4.16-dev-2104-gb84fa49
corecrt_wtime.h File Reference
#include <corecrt.h>
Include dependency graph for corecrt_wtime.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  tm
 

Functions

_ACRTIMP wchar_t *__cdecl _wasctime (const struct tm *)
 
_ACRTIMP size_t __cdecl wcsftime (wchar_t *, size_t, const wchar_t *, const struct tm *)
 
_ACRTIMP size_t __cdecl _wcsftime_l (wchar_t *, size_t, const wchar_t *, const struct tm *, _locale_t)
 
_ACRTIMP wchar_t *__cdecl _wctime32 (const __time32_t *)
 
_ACRTIMP wchar_t *__cdecl _wctime64 (const __time64_t *)
 
_ACRTIMP wchar_t *__cdecl _wstrdate (wchar_t *)
 
_ACRTIMP errno_t __cdecl _wstrdate_s (wchar_t *, size_t)
 
_ACRTIMP wchar_t *__cdecl _wstrtime (wchar_t *)
 
_ACRTIMP errno_t __cdecl _wstrtime_s (wchar_t *, size_t)
 
static wchar_t_wctime (const time_t *t)
 

Function Documentation

◆ _wasctime()

_ACRTIMP wchar_t *__cdecl _wasctime ( const struct tm mstm)

Definition at line 1677 of file time.c.

1678{
1680 char buffer[26];
1681
1682 if(!data->wasctime_buffer) {
1683 data->wasctime_buffer = malloc(26*sizeof(wchar_t));
1684 if(!data->wasctime_buffer) {
1685 *_errno() = ENOMEM;
1686 return NULL;
1687 }
1688 }
1689
1690 if(!asctime_buf(buffer, mstm))
1691 return NULL;
1692
1693 MultiByteToWideChar(CP_ACP, 0, buffer, -1, data->wasctime_buffer, 26);
1694 return data->wasctime_buffer;
1695}
#define malloc
Definition: debug_ros.c:4
#define NULL
Definition: types.h:112
#define CP_ACP
Definition: compat.h:109
#define MultiByteToWideChar
Definition: compat.h:110
int *CDECL _errno(void)
Definition: errno.c:215
#define ENOMEM
Definition: errno.h:35
thread_data_t *CDECL msvcrt_get_thread_data(void)
Definition: thread.c:45
static char * asctime_buf(char *buf, const struct tm *mstm)
Definition: time.c:1603
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
GLuint buffer
Definition: glext.h:5915

Referenced by _wctime32(), and _wctime64().

◆ _wcsftime_l()

_ACRTIMP size_t __cdecl _wcsftime_l ( wchar_t str,
size_t  max,
const wchar_t format,
const struct tm mstm,
_locale_t  loc 
)

Definition at line 1576 of file time.c.

1578{
1579 return wcsftime_helper(str, max, format, mstm, NULL, loc);
1580}
static size_t wcsftime_helper(wchar_t *str, size_t max, const wchar_t *format, const struct tm *mstm, __lc_time_data *time_data, _locale_t loc)
Definition: time.c:1543
const WCHAR * str
Definition: format.c:58
#define max(a, b)
Definition: svc.c:63

◆ _wctime()

static wchar_t * _wctime ( const time_t t)
inlinestatic

Definition at line 42 of file corecrt_wtime.h.

42{ return _wctime64(t); }
_ACRTIMP wchar_t *__cdecl _wctime64(const __time64_t *)
Definition: time.c:1782
GLdouble GLdouble t
Definition: gl.h:2047

◆ _wctime32()

_ACRTIMP wchar_t *__cdecl _wctime32 ( const __time32_t time)

Definition at line 1790 of file time.c.

1791{
1792 return _wasctime( _localtime32(time) );
1793}
struct tm *CDECL _localtime32(const __time32_t *secs)
Definition: time.c:430
wchar_t *CDECL _wasctime(const struct tm *mstm)
Definition: time.c:1677
__u16 time
Definition: mkdosfs.c:8

◆ _wctime64()

_ACRTIMP wchar_t *__cdecl _wctime64 ( const __time64_t time)

Definition at line 1782 of file time.c.

1783{
1784 return _wasctime( _localtime64(time) );
1785}
struct tm *CDECL _localtime64(const __time64_t *secs)
Definition: time.c:415

Referenced by _wctime().

◆ _wstrdate()

_ACRTIMP wchar_t *__cdecl _wstrdate ( wchar_t date)

Definition at line 594 of file time.c.

595{
596 GetDateFormatW(LOCALE_NEUTRAL, 0, NULL, L"MM'/'dd'/'yy", date, 9);
597 return date;
598}
#define L(x)
Definition: resources.c:13
INT WINAPI GetDateFormatW(LCID lcid, DWORD dwFlags, const SYSTEMTIME *lpTime, LPCWSTR lpFormat, LPWSTR lpDateStr, INT cchOut)
Definition: lcformat.c:989
__u16 date
Definition: mkdosfs.c:8
#define LOCALE_NEUTRAL

◆ _wstrdate_s()

_ACRTIMP errno_t __cdecl _wstrdate_s ( wchar_t date,
size_t  size 
)

Definition at line 603 of file time.c.

604{
605 if(date && size)
606 date[0] = '\0';
607
608 if(!date) {
609 *_errno() = EINVAL;
610 return EINVAL;
611 }
612
613 if(size < 9) {
614 *_errno() = ERANGE;
615 return ERANGE;
616 }
617
619 return 0;
620}
#define EINVAL
Definition: errno.h:44
#define ERANGE
Definition: errno.h:55
GLsizeiptr size
Definition: glext.h:5919
_wstrdate

◆ _wstrtime()

_ACRTIMP wchar_t *__cdecl _wstrtime ( wchar_t time)

Definition at line 667 of file time.c.

668{
669 GetTimeFormatW(LOCALE_NEUTRAL, 0, NULL, L"HH':'mm':'ss", time, 9);
670 return time;
671}
INT WINAPI GetTimeFormatW(LCID lcid, DWORD dwFlags, const SYSTEMTIME *lpTime, LPCWSTR lpFormat, LPWSTR lpTimeStr, INT cchOut)
Definition: lcformat.c:1089

◆ _wstrtime_s()

_ACRTIMP errno_t __cdecl _wstrtime_s ( wchar_t time,
size_t  size 
)

Definition at line 676 of file time.c.

677{
678 if(time && size)
679 time[0] = '\0';
680
681 if(!time) {
682 *_errno() = EINVAL;
683 return EINVAL;
684 }
685
686 if(size < 9) {
687 *_errno() = ERANGE;
688 return ERANGE;
689 }
690
692 return 0;
693}
_wstrtime

◆ wcsftime()

_ACRTIMP size_t __cdecl wcsftime ( wchar_t str,
size_t  max,
const wchar_t format,
const struct tm mstm 
)

Definition at line 1585 of file time.c.

1587{
1588 return wcsftime_helper(str, max, format, mstm, NULL, NULL);
1589}

Referenced by ATL::CTimeSpan::Format(), ATL::CTime::Format(), and ATL::CTime::FormatGmt().