ReactOS 0.4.16-dev-736-g28b802b
wcsftime.cpp File Reference
#include <corecrt_internal_time.h>
#include <stdlib.h>
#include <locale.h>
Include dependency graph for wcsftime.cpp:

Go to the source code of this file.

Macros

#define PROCESS_STRING(STR, CHAR, CPY, LEN)
 
#define PROCESS_NARROW_STRING(STR)    PROCESS_STRING(STR, char, strcpy_s, strlen)
 
#define PROCESS_WIDE_STRING(STR)    PROCESS_STRING(STR, wchar_t, wcscpy_s, wcslen)
 
#define PROCESS_NARROW_ARRAY(ARR)
 
#define PROCESS_WIDE_ARRAY(ARR)
 
#define WW_SDATEFMT   0
 
#define WW_LDATEFMT   1
 
#define WW_TIMEFMT   2
 
#define _CrtWcstime_Writes_and_advances_ptr_(count)    _Outptr_result_buffer_(count)
 

Enumerations

enum  {
  sunday = 0 , monday = 1 , tuesday = 2 , wednesday = 3 ,
  thursday = 4 , friday = 5 , saturday = 6
}
 

Functions

wchar_t *__cdecl _W_Getdays ()
 
wchar_t *__cdecl _W_Getmonths ()
 
void *__cdecl _W_Gettnames ()
 
static void __cdecl store_string (_In_reads_or_z_(*count) wchar_t const *in, _CrtWcstime_Writes_and_advances_ptr_(*count) wchar_t **const out, _Inout_ size_t *const count) throw ()
 
static void __cdecl store_number_without_lead_zeroes (int value, _CrtWcstime_Writes_and_advances_ptr_(*count) wchar_t **const out, _Inout_ size_t *const count) throw ()
 
static void __cdecl store_number (int value, int digits, _CrtWcstime_Writes_and_advances_ptr_(*count) wchar_t **const out, _Inout_ size_t *const count, wchar_t const pad_character) throw ()
 
static int compute_week_of_year (int const wstart, int const wday, int const yday) throw ()
 
static int __cdecl compute_iso_week_internal (int year, int wday, int yday) throw ()
 
static int __cdecl compute_iso_week (int const year, int const wday, int const yday) throw ()
 
static int __cdecl compute_iso_year (int const year, int const wday, int const yday) throw ()
 
 _Success_ (return) static bool __cdecl expand_time(_locale_t locale
 Deletes the virtual mapping and optionally gives back the page & dirty bit.
 
wchar_t tm const _CrtWcstime_Writes_and_advances_ptr_ count wchar_t _Inout_ size_t __crt_lc_time_data const bool alternate_form throw ()
 
static bool __cdecl expand_time (_locale_t const locale, wchar_t const specifier, tm const *const timeptr, wchar_t **const string, size_t *const left, __crt_lc_time_data const *const lc_time, bool const alternate_form) throw ()
 
size_t __cdecl _Wcsftime_l (wchar_t *const string, size_t const max_size, wchar_t const *const format, tm const *const timeptr, void *const lc_time_arg, _locale_t const locale)
 
size_t __cdecl _Wcsftime (wchar_t *const buffer, size_t const max_size, wchar_t const *const format, tm const *const timeptr, void *const lc_time_arg)
 
size_t __cdecl _wcsftime_l (wchar_t *const buffer, size_t const max_size, wchar_t const *const format, tm const *const timeptr, _locale_t const locale)
 
size_t __cdecl wcsftime (wchar_t *const buffer, size_t const max_size, wchar_t const *const format, tm const *const timeptr)
 

Variables

wchar_t specifier
 
wchar_t tm consttmptr
 
wchar_t tm const _CrtWcstime_Writes_and_advances_ptr_ count wchar_t ** out
 
wchar_t tm const _CrtWcstime_Writes_and_advances_ptr_ count wchar_t _Inout_ size_tcount
 
wchar_t tm const _CrtWcstime_Writes_and_advances_ptr_ count wchar_t _Inout_ size_t __crt_lc_time_data constlc_time
 
int const field_code
 

Macro Definition Documentation

◆ _CrtWcstime_Writes_and_advances_ptr_

#define _CrtWcstime_Writes_and_advances_ptr_ (   count)     _Outptr_result_buffer_(count)

Definition at line 184 of file wcsftime.cpp.

◆ PROCESS_NARROW_ARRAY

#define PROCESS_NARROW_ARRAY (   ARR)
Value:
for (size_t idx = 0; idx < _countof(src->ARR); ++idx) \
{ \
PROCESS_NARROW_STRING(ARR[idx]) \
}
unsigned int idx
Definition: utils.c:41
GLenum src
Definition: glext.h:6340
#define _countof(array)
Definition: sndvol32.h:70

◆ PROCESS_NARROW_STRING

#define PROCESS_NARROW_STRING (   STR)     PROCESS_STRING(STR, char, strcpy_s, strlen)

◆ PROCESS_STRING

#define PROCESS_STRING (   STR,
  CHAR,
  CPY,
  LEN 
)
Value:
while (bytes % sizeof(CHAR) != 0) \
{ \
++bytes; \
} \
if (phase == 1) \
{ \
dest->STR = ((CHAR *) dest) + bytes / sizeof(CHAR); \
_ERRCHECK(CPY(dest->STR, (total_bytes - bytes) / sizeof(CHAR), src->STR)); \
} \
bytes += (LEN(src->STR) + 1) * sizeof(CHAR);
static unsigned char bytes[4]
Definition: adnsresfilter.c:74
#define CHAR(Char)
#define LEN
Definition: rtl.c:127
static char * dest
Definition: rtl.c:135
char CHAR
Definition: xmlstorage.h:175

◆ PROCESS_WIDE_ARRAY

#define PROCESS_WIDE_ARRAY (   ARR)
Value:
for (size_t idx = 0; idx < _countof(src->ARR); ++idx) \
{ \
PROCESS_WIDE_STRING(ARR[idx]) \
}

◆ PROCESS_WIDE_STRING

#define PROCESS_WIDE_STRING (   STR)     PROCESS_STRING(STR, wchar_t, wcscpy_s, wcslen)

◆ WW_LDATEFMT

#define WW_LDATEFMT   1

Definition at line 180 of file wcsftime.cpp.

◆ WW_SDATEFMT

#define WW_SDATEFMT   0

Definition at line 179 of file wcsftime.cpp.

◆ WW_TIMEFMT

#define WW_TIMEFMT   2

Definition at line 181 of file wcsftime.cpp.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
sunday 
monday 
tuesday 
wednesday 
thursday 
friday 
saturday 

Definition at line 309 of file wcsftime.cpp.

310{
311 sunday = 0,
312 monday = 1,
313 tuesday = 2,
314 wednesday = 3,
315 thursday = 4,
316 friday = 5,
317 saturday = 6
318};
@ tuesday
Definition: wcsftime.cpp:313
@ saturday
Definition: wcsftime.cpp:317
@ thursday
Definition: wcsftime.cpp:315
@ friday
Definition: wcsftime.cpp:316
@ sunday
Definition: wcsftime.cpp:311
@ monday
Definition: wcsftime.cpp:312
@ wednesday
Definition: wcsftime.cpp:314

Function Documentation

◆ _Success_()

_Success_ ( return  )

Deletes the virtual mapping and optionally gives back the page & dirty bit.

Parameters
Process- The process this address belongs to, or NULL if system address.
Address- The address to unmap.
WasDirty- Optional param receiving the dirty bit of the PTE.
Page- Optional param receiving the page number previously mapped to this address.
Returns
Whether there was actually a page mapped at the given address.

Definition at line 57 of file firmware.c.

207{
210
211 /* Check input parameters */
212 if (FirmwareType == NULL)
213 {
215 return FALSE;
216 }
217
218 /* Query firmware type */
220 &BootInfo,
221 sizeof(BootInfo),
222 0);
223 if (!NT_SUCCESS(Status))
224 {
226 return FALSE;
227 }
228
229 *FirmwareType = BootInfo.FirmwareType;
230 return TRUE;
231}
LONG NTSTATUS
Definition: precomp.h:26
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:33
#define ERROR_INVALID_PARAMETER
Definition: compat.h:101
#define SetLastError(x)
Definition: compat.h:752
Status
Definition: gdiplustypes.h:25
@ SystemBootEnvironmentInformation
Definition: extypes.h:307
DWORD BaseSetLastNTError(IN NTSTATUS Status)
Definition: reactos.cpp:167
NTSYSAPI NTSTATUS NTAPI NtQuerySystemInformation(IN SYSTEM_INFORMATION_CLASS SystemInfoClass, OUT PVOID SystemInfoBuffer, IN ULONG SystemInfoBufferSize, OUT PULONG BytesReturned OPTIONAL)

◆ _W_Getdays()

wchar_t *__cdecl _W_Getdays ( )

Definition at line 19 of file wcsftime.cpp.

20{
21 _LocaleUpdate locale_update(nullptr);
22 __crt_lc_time_data const* const time_data = locale_update.GetLocaleT()->locinfo->lc_time_curr;
23
24 size_t length = 0;
25 for (size_t n = 0; n < 7; ++n)
26 {
27 length += wcslen(time_data->_W_wday_abbr[n]) + wcslen(time_data->_W_wday[n]) + 2;
28 }
29
30 __crt_unique_heap_ptr<wchar_t> buffer(_malloc_crt_t(wchar_t, length + 1));
31 if (buffer.get() == nullptr)
32 return nullptr;
33
34 wchar_t* it = buffer.get();
35 for (size_t n = 0; n < 7; ++n)
36 {
37 *it++ = L':';
38 _ERRCHECK(wcscpy_s(it, (length + 1) - (it - buffer.get()), time_data->_W_wday_abbr[n]));
39 it += wcslen(it);
40 *it++ = L':';
41 _ERRCHECK(wcscpy_s(it, (length + 1) - (it - buffer.get()), time_data->_W_wday[n]));
42 it += wcslen(it);
43 }
44 *it++ = L'\0';
45
46 return buffer.detach();
47}
#define _ERRCHECK(e)
GLdouble n
Definition: glext.h:7729
GLuint buffer
Definition: glext.h:5915
GLuint GLsizei GLsizei * length
Definition: glext.h:6040
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
#define wcscpy_s(d, l, s)
Definition: utility.h:201
#define L(x)
Definition: ntvdm.h:50
wchar_t * _W_wday_abbr[7]

◆ _W_Getmonths()

wchar_t *__cdecl _W_Getmonths ( )

Definition at line 51 of file wcsftime.cpp.

52{
53 _LocaleUpdate locale_update(nullptr);
54 __crt_lc_time_data const* const time_data = locale_update.GetLocaleT()->locinfo->lc_time_curr;
55
56 size_t length = 0;
57 for (size_t n = 0; n < 12; ++n)
58 {
59 length += wcslen(time_data->_W_month_abbr[n]) + wcslen(time_data->_W_month[n]) + 2;
60 }
61
62 __crt_unique_heap_ptr<wchar_t> buffer(_malloc_crt_t(wchar_t, length + 1));
63 if (buffer.get() == nullptr)
64 return nullptr;
65
66 wchar_t* it = buffer.get();
67 for (size_t n = 0; n < 12; ++n)
68 {
69 *it++ = L':';
70 _ERRCHECK(wcscpy_s(it, (length + 1) - (it - buffer.get()), time_data->_W_month_abbr[n]));
71 it += wcslen(it);
72 *it++ = L':';
73 _ERRCHECK(wcscpy_s(it, (length + 1) - (it - buffer.get()), time_data->_W_month[n]));
74 it += wcslen(it);
75 }
76 *it++ = L'\0';
77
78 return buffer.detach();
79}
wchar_t * _W_month[12]
wchar_t * _W_month_abbr[12]

◆ _W_Gettnames()

void *__cdecl _W_Gettnames ( )

Definition at line 83 of file wcsftime.cpp.

84{
85 _LocaleUpdate locale_update(nullptr);
86 __crt_lc_time_data const* const src = locale_update.GetLocaleT()->locinfo->lc_time_curr;
87
88
89
90 #define PROCESS_STRING(STR, CHAR, CPY, LEN) \
91 while (bytes % sizeof(CHAR) != 0) \
92 { \
93 ++bytes; \
94 } \
95 if (phase == 1) \
96 { \
97 dest->STR = ((CHAR *) dest) + bytes / sizeof(CHAR); \
98 _ERRCHECK(CPY(dest->STR, (total_bytes - bytes) / sizeof(CHAR), src->STR)); \
99 } \
100 bytes += (LEN(src->STR) + 1) * sizeof(CHAR);
101
102 #define PROCESS_NARROW_STRING(STR) \
103 PROCESS_STRING(STR, char, strcpy_s, strlen)
104
105 #define PROCESS_WIDE_STRING(STR) \
106 PROCESS_STRING(STR, wchar_t, wcscpy_s, wcslen)
107
108 #define PROCESS_NARROW_ARRAY(ARR) \
109 for (size_t idx = 0; idx < _countof(src->ARR); ++idx) \
110 { \
111 PROCESS_NARROW_STRING(ARR[idx]) \
112 }
113
114 #define PROCESS_WIDE_ARRAY(ARR) \
115 for (size_t idx = 0; idx < _countof(src->ARR); ++idx) \
116 { \
117 PROCESS_WIDE_STRING(ARR[idx]) \
118 }
119
120
121 size_t total_bytes = 0;
122 size_t bytes = sizeof(__crt_lc_time_data);
123
124 __crt_lc_time_data* dest = nullptr;
125 for (int phase = 0; phase < 2; ++phase)
126 {
127 if (phase == 1)
128 {
129 dest = static_cast<__crt_lc_time_data*>(_malloc_crt(bytes));
130
131 if (!dest) {
132 return nullptr;
133 }
134
135 memset(dest, 0, bytes);
136
137 total_bytes = bytes;
138
139 bytes = sizeof(__crt_lc_time_data);
140 }
141
142 PROCESS_NARROW_ARRAY(wday_abbr)
144 PROCESS_NARROW_ARRAY(month_abbr)
147 PROCESS_NARROW_STRING(ww_sdatefmt)
148 PROCESS_NARROW_STRING(ww_ldatefmt)
149 PROCESS_NARROW_STRING(ww_timefmt)
150
151 if (phase == 1)
152 {
153 dest->ww_caltype = src->ww_caltype;
154 dest->refcount = 0;
155 }
156
157 PROCESS_WIDE_ARRAY(_W_wday_abbr)
158 PROCESS_WIDE_ARRAY(_W_wday)
159 PROCESS_WIDE_ARRAY(_W_month_abbr)
160 PROCESS_WIDE_ARRAY(_W_month)
161 PROCESS_WIDE_ARRAY(_W_ampm)
162 PROCESS_WIDE_STRING(_W_ww_sdatefmt)
163 PROCESS_WIDE_STRING(_W_ww_ldatefmt)
164 PROCESS_WIDE_STRING(_W_ww_timefmt)
165 PROCESS_WIDE_STRING(_W_ww_locale_name)
166 }
167
168 return dest;
169}
static const WCHAR month[12][4]
Definition: session.c:2150
#define _malloc_crt
#define memset(x, y, z)
Definition: compat.h:39
#define PROCESS_NARROW_STRING(STR)
#define PROCESS_NARROW_ARRAY(ARR)
#define PROCESS_WIDE_STRING(STR)
#define PROCESS_WIDE_ARRAY(ARR)

Referenced by _Gettnames().

◆ _Wcsftime()

size_t __cdecl _Wcsftime ( wchar_t *const  buffer,
size_t const  max_size,
wchar_t const *const  format,
tm const *const  timeptr,
void *const  lc_time_arg 
)

Definition at line 1170 of file wcsftime.cpp.

1177{
1178 return _Wcsftime_l(buffer, max_size, format, timeptr, lc_time_arg, nullptr);
1179}
static INT max_size
Definition: history.c:51
_In_ size_t _In_z_ wchar_t const _In_ tm const _In_opt_ void * lc_time_arg
_In_ size_t _In_z_ wchar_t const _In_ tm const * timeptr
Definition: format.c:58
size_t __cdecl _Wcsftime_l(wchar_t *const string, size_t const max_size, wchar_t const *const format, tm const *const timeptr, void *const lc_time_arg, _locale_t const locale)
Definition: wcsftime.cpp:1049

◆ _wcsftime_l()

size_t __cdecl _wcsftime_l ( wchar_t *const  buffer,
size_t const  max_size,
wchar_t const *const  format,
tm const *const  timeptr,
_locale_t const  locale 
)

Definition at line 1181 of file wcsftime.cpp.

1188{
1189 return _Wcsftime_l(buffer, max_size, format, timeptr, nullptr, locale);
1190}
Definition: _locale.h:75

◆ _Wcsftime_l()

size_t __cdecl _Wcsftime_l ( wchar_t *const  string,
size_t const  max_size,
wchar_t const *const  format,
tm const *const  timeptr,
void *const  lc_time_arg,
_locale_t const  locale 
)

Definition at line 1049 of file wcsftime.cpp.

1057{
1058 _VALIDATE_RETURN(string != nullptr, EINVAL, 0)
1060 *string = L'\0';
1061
1062 _VALIDATE_RETURN(format != nullptr, EINVAL, 0)
1063
1064 _LocaleUpdate locale_update(locale);
1065
1067 ? locale_update.GetLocaleT()->locinfo->lc_time_curr
1068 : static_cast<__crt_lc_time_data*>(lc_time_arg);
1069
1070 // Copy the input string to the output string expanding the format
1071 // designations appropriately. Stop copying when one of the following
1072 // is true: (1) we hit a null char in the input stream, or (2) there's
1073 // no room left in the output stream.
1074
1075 wchar_t* string_it = string;
1076 wchar_t const* format_it = format;
1077
1078 bool failed = false;
1079 size_t remaining = max_size;
1080
1081 while (remaining > 0)
1082 {
1083 switch (*format_it)
1084 {
1085 case L'\0':
1086 {
1087 // End of format input string
1088 goto done;
1089 }
1090
1091 case L'%':
1092 {
1093 // Format directive. Take appropriate action based on format control character.
1094 _VALIDATE_RETURN(timeptr != nullptr, EINVAL, 0);
1095
1096 ++format_it; // Skip '%'
1097
1098 // Process flags:
1099 bool alternate_form = false;
1100 if (*format_it == L'#')
1101 {
1102 alternate_form = true;
1103 ++format_it;
1104 }
1105
1106 // Skip ISO E and O alternative representation format modifiers. We
1107 // do not support alternative formats in any locale.
1108 if (*format_it == L'E' || *format_it == L'O')
1109 {
1110 ++format_it;
1111 }
1112
1113 if (!expand_time(locale_update.GetLocaleT(), *format_it, timeptr, &string_it, &remaining, lc_time, alternate_form))
1114 {
1115 // if we don't have any space left, do not set the failure flag:
1116 // we will simply return ERANGE and do not call the invalid
1117 // parameter handler (see below)
1118 if (remaining > 0)
1119 failed = true;
1120
1121 goto done;
1122 }
1123
1124 ++format_it; // Skip format char
1125 break;
1126 }
1127
1128 default:
1129 {
1130 // store character, bump pointers, decrement the char count:
1131 *string_it++ = *format_it++;
1132 --remaining;
1133 break;
1134 }
1135 }
1136 }
1137
1138
1139 // All done. See if we terminated because we hit a null char or because
1140 // we ran out of space:
1141 done:
1142
1143 if (!failed && remaining > 0)
1144 {
1145 // Store a terminating null char and return the number of chars we
1146 // stored in the output string:
1147 *string_it = L'\0';
1148 return max_size - remaining;
1149 }
1150 else
1151 {
1152 // Error: return an empty string:
1153 *string = L'\0';
1154
1155 // Now return our error/insufficient buffer indication:
1156 if (!failed && remaining <= 0)
1157 {
1158 // Do not report this as an error to allow the caller to resize:
1159 errno = ERANGE;
1160 }
1161 else
1162 {
1163 _VALIDATE_RETURN(false, EINVAL, 0);
1164 }
1165
1166 return 0;
1167 }
1168}
#define EINVAL
Definition: acclib.h:90
#define ERANGE
Definition: acclib.h:92
while(CdLookupNextInitialFileDirent(IrpContext, Fcb, FileContext))
#define _VALIDATE_RETURN(expr, errorcode, retexpr)
else locinfo
Definition: scanf.h:159
#define errno
Definition: errno.h:18
#define false
Definition: stdbool.h:37
static bool __cdecl expand_time(_locale_t const locale, wchar_t const specifier, tm const *const timeptr, wchar_t **const string, size_t *const left, __crt_lc_time_data const *const lc_time, bool const alternate_form)
Definition: wcsftime.cpp:657
wchar_t tm const _CrtWcstime_Writes_and_advances_ptr_ count wchar_t _Inout_ size_t __crt_lc_time_data const * lc_time
Definition: wcsftime.cpp:385
#define const
Definition: zconf.h:233

Referenced by _Wcsftime(), _wcsftime_l(), and wcsftime().

◆ compute_iso_week()

static int __cdecl compute_iso_week ( int const  year,
int const  wday,
int const  yday 
)
throw (
)
static

Definition at line 349 of file wcsftime.cpp.

350{
351 int const week_number{compute_iso_week_internal(year, wday, yday)};
352
353 if (week_number == 0)
354 return compute_iso_week_internal(year - 1, wday + 7 - yday, __crt_time_is_leap_year(year - 1) ? 366 : 365);
355
356 if (0 < week_number)
357 return week_number;
358
359 return 1;
360}
bool __cdecl __crt_time_is_leap_year(TimeType const yr)
static int __cdecl compute_iso_week_internal(int year, int wday, int yday)
Definition: wcsftime.cpp:326

Referenced by expand_time().

◆ compute_iso_week_internal()

static int __cdecl compute_iso_week_internal ( int  year,
int  wday,
int  yday 
)
throw (
)
static

Definition at line 326 of file wcsftime.cpp.

327{
328 int const week_number{compute_week_of_year(monday, wday, yday)};
329 bool const is_leap_year{__crt_time_is_leap_year(year)};
330
331 int const yunleap{yday - is_leap_year};
332 int const jan1{(371 - yday + wday) % 7};
333 int const dec32{(jan1 + is_leap_year + 365) % 7};
334
335 if ((364 <= yunleap && dec32 == tuesday ) ||
336 (363 <= yunleap && dec32 == wednesday) ||
337 (362 <= yunleap && dec32 == thursday ))
338 {
339 return -1; // Push into the next year
340 }
341 else if (jan1 == tuesday || jan1 == wednesday || jan1 == thursday)
342 {
343 return week_number + 1;
344 }
345
346 return week_number;
347}
static int compute_week_of_year(int const wstart, int const wday, int const yday)
Definition: wcsftime.cpp:320

Referenced by compute_iso_week(), and compute_iso_year().

◆ compute_iso_year()

static int __cdecl compute_iso_year ( int const  year,
int const  wday,
int const  yday 
)
throw (
)
static

Definition at line 362 of file wcsftime.cpp.

363{
364 int const week_number{compute_iso_week_internal(year, wday, yday)};
365
366 if (week_number == 0)
367 return year - 1;
368
369 if (0 < week_number)
370 return year;
371
372 return year + 1;
373}

Referenced by expand_time().

◆ compute_week_of_year()

static int compute_week_of_year ( int const  wstart,
int const  wday,
int const  yday 
)
throw (
)
static

Definition at line 320 of file wcsftime.cpp.

321{
322 int const adjusted_wday{(wday + 7 - wstart) % 7};
323 return (yday + 7 - adjusted_wday) / 7;
324}

Referenced by compute_iso_week_internal().

◆ expand_time()

static bool __cdecl expand_time ( _locale_t const  locale,
wchar_t const  specifier,
tm const *const  timeptr,
wchar_t **const  string,
size_t *const  left,
__crt_lc_time_data const *const  lc_time,
bool const  alternate_form 
)
throw (
)
static

Definition at line 657 of file wcsftime.cpp.

666{
667 switch (specifier)
668 {
669 case L'a': // abbreviated weekday name
670 {
671 _VALIDATE_RETURN(timeptr->tm_wday >= 0 && timeptr->tm_wday <= 6, EINVAL, false);
672 store_string(lc_time->_W_wday_abbr[timeptr->tm_wday], string, left);
673 return true;
674 }
675
676 case L'A': // full weekday name
677 {
678 _VALIDATE_RETURN(timeptr->tm_wday >= 0 && timeptr->tm_wday <= 6, EINVAL, false);
679 store_string(lc_time->_W_wday[timeptr->tm_wday], string, left);
680 return true;
681 }
682
683 case L'b': // abbreviated month name
684 {
685 _VALIDATE_RETURN(timeptr->tm_mon >= 0 && timeptr->tm_mon <= 11, EINVAL, false);
686 store_string(lc_time->_W_month_abbr[timeptr->tm_mon], string, left);
687 return true;
688 }
689
690 case L'B': // full month name
691 {
692 _VALIDATE_RETURN(timeptr->tm_mon >= 0 && timeptr->tm_mon <= 11, EINVAL, false);
693 store_string(lc_time->_W_month[timeptr->tm_mon], string, left);
694 return true;
695 }
696
697 case L'c': // appropriate date and time representation
698 {
699 // In the C locale, %c is equivalent to "%a %b %e %T %Y". This format
700 // is not achievable using the Windows API date and time format APIs
701 // (it's hard to interleave date and time together, and there's no way
702 // to format %e). Therefore, we special case this specifier for the C
703 // locale.
704 if (lc_time == &__lc_time_c && !alternate_form)
705 {
706 _VALIDATE_RETURN_NOEXC(expand_time(locale, L'a', timeptr, string, left, lc_time, false), EINVAL, false);
707 store_string(L" ", string, left);
708 _VALIDATE_RETURN_NOEXC(expand_time(locale, L'b', timeptr, string, left, lc_time, false), EINVAL, false);
709 store_string(L" ", string, left);
710 _VALIDATE_RETURN_NOEXC(expand_time(locale, L'e', timeptr, string, left, lc_time, false), EINVAL, false);
711 store_string(L" ", string, left);
712 _VALIDATE_RETURN_NOEXC(expand_time(locale, L'T', timeptr, string, left, lc_time, false), EINVAL, false);
713 store_string(L" ", string, left);
714 _VALIDATE_RETURN_NOEXC(expand_time(locale, L'Y', timeptr, string, left, lc_time, false), EINVAL, false);
715 }
716 // Otherwise, if we're not in the C locale, use the locale-provided
717 // format strings:
718 else
719 {
720 int const field_code = alternate_form ? WW_LDATEFMT : WW_SDATEFMT;
721
722 _VALIDATE_RETURN_NOEXC(store_winword(locale, field_code, timeptr, string, left, lc_time), EINVAL, false);
723 store_string(L" ", string, left);
724 _VALIDATE_RETURN_NOEXC(store_winword(locale, WW_TIMEFMT, timeptr, string, left, lc_time), EINVAL, false);
725 }
726
727 return true;
728 }
729
730 case L'C': // century in decimal (00-99)
731 {
732 _VALIDATE_RETURN(timeptr->tm_year >= -1900 && timeptr->tm_year <= 8099, EINVAL, false);
733 store_number(__crt_get_century(timeptr->tm_year), 2, string, left, alternate_form ? '\0' : '0');
734 return true;
735 }
736
737 case L'd': // day of the month in decimal (01-31)
738 {
739 _VALIDATE_RETURN(timeptr->tm_mday >= 1 && timeptr->tm_mday <= 31, EINVAL, false);
740 store_number(timeptr->tm_mday, 2, string, left, alternate_form ? '\0' : '0');
741 return true;
742 }
743
744 case L'D': // equivalent to "%m/%d/%y"
745 {
746 _VALIDATE_RETURN_NOEXC(expand_time(locale, L'm', timeptr, string, left, lc_time, alternate_form), EINVAL, false);
747 store_string(L"/", string, left);
748 _VALIDATE_RETURN_NOEXC(expand_time(locale, L'd', timeptr, string, left, lc_time, alternate_form), EINVAL, false);
749 store_string(L"/", string, left);
750 _VALIDATE_RETURN_NOEXC(expand_time(locale, L'y', timeptr, string, left, lc_time, alternate_form), EINVAL, false);
751 return true;
752 }
753
754 case L'e': // day of month as a decimal number (1-31); space padded:
755 {
756 _VALIDATE_RETURN(timeptr->tm_mday >= 1 && timeptr->tm_mday <= 31, EINVAL, false);
757 store_number(timeptr->tm_mday, 2, string, left, alternate_form ? '\0' : ' ');
758 return true;
759 }
760
761 case L'F': // equivalent to "%Y-%m-%d" (ISO 8601):
762 {
763 _VALIDATE_RETURN_NOEXC(expand_time(locale, L'Y', timeptr, string, left, lc_time, alternate_form), EINVAL, false);
764 store_string(L"-", string, left);
765 _VALIDATE_RETURN_NOEXC(expand_time(locale, L'm', timeptr, string, left, lc_time, alternate_form), EINVAL, false);
766 store_string(L"-", string, left);
767 _VALIDATE_RETURN_NOEXC(expand_time(locale, L'd', timeptr, string, left, lc_time, alternate_form), EINVAL, false);
768 return true;
769 }
770
771 case L'g': // last two digits of the week-based year:
772 {
773 _VALIDATE_RETURN(timeptr->tm_year >= -1900 && timeptr->tm_year <= 8099, EINVAL, false);
774 int const iso_year{compute_iso_year(timeptr->tm_year, timeptr->tm_wday, timeptr->tm_yday) + 1900};
775 store_number(iso_year % 100, 2, string, left, '0');
776 return true;
777 }
778
779 case L'G': // week-based year:
780 {
781 _VALIDATE_RETURN(timeptr->tm_year >= -1900 && timeptr->tm_year <= 8099, EINVAL, false);
782 int const iso_year{compute_iso_year(timeptr->tm_year, timeptr->tm_wday, timeptr->tm_yday) + 1900};
783 store_number(iso_year, 4, string, left, '0');
784 return true;
785 }
786
787 case L'h': // equivalent to "%b":
788 {
789 return expand_time(locale, L'b', timeptr, string, left, lc_time, alternate_form);
790 }
791
792 case L'H': // 24-hour decimal (00-23)
793 {
794 _VALIDATE_RETURN(timeptr->tm_hour >= 0 && timeptr->tm_hour <= 23, EINVAL, false);
795 store_number(timeptr->tm_hour, 2, string, left, alternate_form ? '\0' : '0');
796 return true;
797 }
798
799 case L'I': // 12-hour decimal (01-12)
800 {
801 _VALIDATE_RETURN(timeptr->tm_hour >= 0 && timeptr->tm_hour <= 23, EINVAL, false);
802 unsigned hour = timeptr->tm_hour % 12;
803 if (hour == 0)
804 hour = 12;
805
806 store_number(hour, 2, string, left, alternate_form ? '\0' : '0');
807 return true;
808 }
809
810 case L'j': // yday in decimal (001-366)
811 {
812 _VALIDATE_RETURN(timeptr->tm_yday >= 0 && timeptr->tm_yday <= 365, EINVAL, false);
813 store_number(timeptr->tm_yday + 1, 3, string, left, alternate_form ? '\0' : '0');
814 return true;
815 }
816
817 case L'm': // month in decimal (01-12)
818 {
819 _VALIDATE_RETURN(timeptr->tm_mon >= 0 && timeptr->tm_mon <= 11, EINVAL, false);
820 store_number(timeptr->tm_mon + 1, 2, string, left, alternate_form ? '\0' : '0');
821 return true;
822 }
823
824 case L'M': // minute in decimal (00-59)
825 {
826 _VALIDATE_RETURN(timeptr->tm_min >= 0 && timeptr->tm_min <= 59, EINVAL, false);
827 store_number(timeptr->tm_min, 2, string, left, alternate_form ? '\0' : '0');
828 return true;
829 }
830
831 case L'n': // newline character
832 {
833 store_string(L"\n", string, left);
834 return true;
835 }
836
837 case L'p': // AM/PM designation
838 {
839 _VALIDATE_RETURN(timeptr->tm_hour >= 0 && timeptr->tm_hour <= 23, EINVAL, false);
840 wchar_t const* const ampm_string = timeptr->tm_hour <= 11
841 ? lc_time->_W_ampm[0]
842 : lc_time->_W_ampm[1];
843
844 store_string(ampm_string, string, left);
845 return true;
846 }
847
848 case L'r': // Locale-specific 12-hour clock time
849 {
850 // In the C locale, %r is equivalent to "%I:%M:%S %p". This is the only
851 // locale in which we guarantee that %r is a 12-hour time; in all other
852 // locales we only have one time format which may or may not be a 12-hour
853 // format.
854 if (lc_time == &__lc_time_c)
855 {
856 _VALIDATE_RETURN_NOEXC(expand_time(locale, 'I', timeptr, string, left, lc_time, alternate_form), EINVAL, false);
857 store_string(L":", string, left);
858 _VALIDATE_RETURN_NOEXC(expand_time(locale, 'M', timeptr, string, left, lc_time, alternate_form), EINVAL, false);
859 store_string(L":", string, left);
860 _VALIDATE_RETURN_NOEXC(expand_time(locale, 'S', timeptr, string, left, lc_time, alternate_form), EINVAL, false);
861 store_string(L" ", string, left);
862 _VALIDATE_RETURN_NOEXC(expand_time(locale, 'p', timeptr, string, left, lc_time, alternate_form), EINVAL, false);
863 }
864 else
865 {
866 _VALIDATE_RETURN_NOEXC(expand_time(locale, 'X', timeptr, string, left, lc_time, alternate_form), EINVAL, false);
867 }
868
869 return true;
870 }
871
872 case L'R': // Equivalent to "%H:%M"
873 {
874 _VALIDATE_RETURN_NOEXC(expand_time(locale, 'H', timeptr, string, left, lc_time, alternate_form), EINVAL, false);
875 store_string(L":", string, left);
876 _VALIDATE_RETURN_NOEXC(expand_time(locale, 'M', timeptr, string, left, lc_time, alternate_form), EINVAL, false);
877 return true;
878 }
879
880 case L'S': // seconds in decimal (00-60) allowing for a leap second
881 {
882 _VALIDATE_RETURN(timeptr->tm_sec >= 0 && timeptr->tm_sec <= 60, EINVAL, false);
883 store_number(timeptr->tm_sec, 2, string, left, alternate_form ? '\0' : '0');
884 return true;
885 }
886
887 case L't': // tab character
888 {
889 store_string(L"\t", string, left);
890 return true;
891 }
892
893 case L'T': // Equivalent to "%H:%M:%S" (ISO 8601)
894 {
895 _VALIDATE_RETURN_NOEXC(expand_time(locale, 'H', timeptr, string, left, lc_time, alternate_form), EINVAL, false);
896 store_string(L":", string, left);
897 _VALIDATE_RETURN_NOEXC(expand_time(locale, 'M', timeptr, string, left, lc_time, alternate_form), EINVAL, false);
898 store_string(L":", string, left);
899 _VALIDATE_RETURN_NOEXC(expand_time(locale, 'S', timeptr, string, left, lc_time, alternate_form), EINVAL, false);
900 return true;
901 }
902
903 case L'u': // week day in decimal (1-7)
904 case L'w': // week day in decimal (0-6)
905 {
906 _VALIDATE_RETURN(timeptr->tm_wday >= 0 && timeptr->tm_wday <= 6, EINVAL, false);
907
908 int const weekday_number = timeptr->tm_wday == 0 && specifier == L'u'
909 ? 7
910 : timeptr->tm_wday;
911
912 store_number(weekday_number, 1, string, left, alternate_form ? '\0' : '0');
913 return true;
914 }
915
916 case L'U': // sunday week number (00-53)
917 case L'W': // monday week number (00-53)
918 {
919 _VALIDATE_RETURN(timeptr->tm_wday >= 0 && timeptr->tm_wday <= 6, EINVAL, false);
920 int wdaytemp = timeptr->tm_wday;
921 if (specifier == L'W')
922 {
923 if (timeptr->tm_wday == 0) // Monday-based
924 wdaytemp = 6;
925 else
926 wdaytemp = timeptr->tm_wday - 1;
927 }
928
929 _VALIDATE_RETURN(timeptr->tm_yday >= 0 && timeptr->tm_yday <= 365, EINVAL, false);
930 unsigned week_number = 0;
931 if (timeptr->tm_yday >= wdaytemp)
932 {
933 week_number = timeptr->tm_yday / 7;
934 if (timeptr->tm_yday % 7 >= wdaytemp)
935 ++week_number;
936 }
937
938 store_number(week_number, 2, string, left, alternate_form ? '\0' : '0');
939 return true;
940 }
941
942 case L'V': // ISO 8601 week number (01-53):
943 {
945 store_number(iso_week, 2, string, left, alternate_form ? '\0' : '0');
946 return true;
947 }
948
949 case L'x': // date display
950 {
951 int const field_code = alternate_form ? WW_LDATEFMT : WW_SDATEFMT;
952 _VALIDATE_RETURN_NOEXC(store_winword(locale, field_code, timeptr, string, left, lc_time), EINVAL, false);
953 return true;
954 }
955 case L'X': // time display
956 {
957 _VALIDATE_RETURN_NOEXC(store_winword(locale, WW_TIMEFMT, timeptr, string, left, lc_time), EINVAL, false);
958 return true;
959 }
960
961 case L'y': // year without century (00-99)
962 {
963 _VALIDATE_RETURN(timeptr->tm_year >= -1900 && timeptr->tm_year <= 8099, EINVAL, false);
964 unsigned const two_digit_year = __crt_get_2digit_year(timeptr->tm_year);
965 store_number(two_digit_year, 2, string, left, alternate_form ? '\0' : '0');
966 return true;
967 }
968
969 case L'Y': // year with century
970 {
971 _VALIDATE_RETURN(timeptr->tm_year >= -1900 && timeptr->tm_year <= 8099, EINVAL, false);
972 unsigned const full_year = timeptr->tm_year + 1900;
973
974 store_number(full_year, 4, string, left, alternate_form ? '\0' : '0');
975 return true;
976 }
977
978 case L'z': // time zone in ISO 8601 form ("-0430" = 4 hours 30 minutes)
979 {
980 __tzset();
981
982 // Get the current time zone offset from UTC and, if we are currently in
983 // daylight savings time, adjust appropriately:
984 long offset{};
986
987 if (timeptr->tm_isdst)
988 {
989 long dst_bias{};
990 _VALIDATE_RETURN(_get_dstbias(&dst_bias) == 0, EINVAL, false);
991
992 offset += dst_bias;
993 }
994
995 long const positive_offset{offset < 0 ? -offset : offset};
996 long const hours_offset {(positive_offset / 60) / 60};
997 long const minutes_offset{(positive_offset / 60) % 60};
998
999 // This looks wrong, but it is correct: The offset is the difference
1000 // between UTC and the local time zone, so it is a positive value if
1001 // the local time zone is behind UTC.
1002 wchar_t const* const sign_string{offset <= 0 ? L"+" : L"-"};
1003
1004 store_string(sign_string, string, left);
1005 store_number(hours_offset, 2, string, left, '0');
1006 store_number(minutes_offset, 2, string, left, '0');
1007 return true;
1008 }
1009
1010 case L'Z': // time zone name, if any
1011 {
1012 __tzset();
1013 store_string(__wide_tzname()[timeptr->tm_isdst ? 1 : 0], string, left);
1014 return true;
1015 }
1016
1017 case L'%': // percent sign
1018 {
1019 store_string(L"%", string, left);
1020 return true;
1021 }
1022
1023 default: // unknown format directive
1024 {
1025 // We do not raise the invalid parameter handler here. Our caller will
1026 // raise the invalid parameter handler when we return failure.
1027 return false;
1028 }
1029 }
1030
1031 // Unreachable. All switch case statements return.
1032}
__crt_lc_time_data const __lc_time_c
Definition: nlsdata.cpp:33
_Check_return_ _Deref_ret_z_ wchar_t **__cdecl __wide_tzname()
Definition: timeset.cpp:185
void __cdecl __tzset()
Definition: tzset.cpp:392
int __crt_get_century(int const year)
int __crt_get_2digit_year(int const year)
GLintptr offset
Definition: glext.h:5920
GLint left
Definition: glext.h:7726
#define _VALIDATE_RETURN_NOEXC(expr, errorcode, retexpr)
_CRTIMP errno_t __cdecl _get_dstbias(_Out_ long *_Daylight_savings_bias)
_CRTIMP errno_t __cdecl _get_timezone(_Out_ long *_Timezone)
int tm_mon
Definition: time.h:73
int tm_year
Definition: time.h:74
int tm_hour
Definition: time.h:71
int tm_sec
Definition: time.h:69
int tm_isdst
Definition: time.h:77
int tm_yday
Definition: time.h:76
int tm_mday
Definition: time.h:72
int tm_min
Definition: time.h:70
int tm_wday
Definition: time.h:75
static void __cdecl store_string(_In_reads_or_z_(*count) wchar_t const *in, _CrtWcstime_Writes_and_advances_ptr_(*count) wchar_t **const out, _Inout_ size_t *const count)
Definition: wcsftime.cpp:193
static int __cdecl compute_iso_year(int const year, int const wday, int const yday)
Definition: wcsftime.cpp:362
wchar_t specifier
Definition: wcsftime.cpp:381
static void __cdecl store_number(int value, int digits, _CrtWcstime_Writes_and_advances_ptr_(*count) wchar_t **const out, _Inout_ size_t *const count, wchar_t const pad_character)
Definition: wcsftime.cpp:261
#define WW_SDATEFMT
Definition: wcsftime.cpp:179
#define WW_TIMEFMT
Definition: wcsftime.cpp:181
static int __cdecl compute_iso_week(int const year, int const wday, int const yday)
Definition: wcsftime.cpp:349
#define WW_LDATEFMT
Definition: wcsftime.cpp:180
int const field_code
Definition: wcsftime.cpp:402

Referenced by _Wcsftime_l(), expand_time(), and throw().

◆ store_number()

static void __cdecl store_number ( int  value,
int  digits,
_CrtWcstime_Writes_and_advances_ptr_ *count wchar_t **const  out,
_Inout_ size_t *const  count,
wchar_t const  pad_character 
)
throw (
)
static

Definition at line 261 of file wcsftime.cpp.

268{
269 if (pad_character == '\0')
270 {
272 return;
273 }
274
275 if (static_cast<size_t>(digits) < *count)
276 {
277 int temp = 0;
278 for (digits--; digits + 1 != 0; --digits)
279 {
280 if (value != 0)
281 {
282 (*out)[digits] = static_cast<wchar_t>(L'0' + value % 10);
283 }
284 else
285 {
286 (*out)[digits] = pad_character;
287 }
288
289 value /= 10;
290 temp++;
291 }
292
293 *out += temp;
294 *count -= temp;
295 }
296 else
297 {
298 *count = 0;
299 }
300}
GLuint GLuint GLsizei count
Definition: gl.h:1545
static const int digits[]
Definition: decode.c:71
static calc_node_t temp
Definition: rpn_ieee.c:38
Definition: pdh_main.c:94
wchar_t tm const _CrtWcstime_Writes_and_advances_ptr_ count wchar_t ** out
Definition: wcsftime.cpp:383
static void __cdecl store_number_without_lead_zeroes(int value, _CrtWcstime_Writes_and_advances_ptr_(*count) wchar_t **const out, _Inout_ size_t *const count)
Definition: wcsftime.cpp:214

Referenced by expand_time().

◆ store_number_without_lead_zeroes()

static void __cdecl store_number_without_lead_zeroes ( int  value,
_CrtWcstime_Writes_and_advances_ptr_ *count wchar_t **const  out,
_Inout_ size_t *const  count 
)
throw (
)
static

Definition at line 214 of file wcsftime.cpp.

219{
220 // Put the digits in the buffer in reverse order:
221 wchar_t* out_it = *out;
222 if (*count > 1)
223 {
224 do
225 {
226 *out_it++ = static_cast<wchar_t>(value % 10 + L'0');
227
228 value /= 10;
229 --*count;
230 }
231 while (value > 0 && *count > 1);
232 }
233 else
234 {
235 // Indicate buffer too small.
236 *out -= *count;
237 *count = 0;
238 return;
239 }
240
241 wchar_t* left = *out;
242 wchar_t* right = out_it - 1;
243
244 // Update the output iterator to point to the next space:
245 *out = out_it;
246
247 // Reverse the buffer:
248 while (left < right)
249 {
250 wchar_t const x = *right;
251 *right-- = *left;
252 *left++ = x;
253 }
254}
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
GLdouble GLdouble right
Definition: glext.h:10859
wchar_t tm const _CrtWcstime_Writes_and_advances_ptr_ count wchar_t _Inout_ size_t * count
Definition: wcsftime.cpp:384

Referenced by store_number().

◆ store_string()

static void __cdecl store_string ( _In_reads_or_z_ *count wchar_t const in,
_CrtWcstime_Writes_and_advances_ptr_ *count wchar_t **const  out,
_Inout_ size_t *const  count 
)
throw (
)
static

Definition at line 193 of file wcsftime.cpp.

198{
199 while (*count != 0 && *in != L'\0')
200 {
201 *(*out)++ = *in++;
202 --*count;
203 }
204}
GLuint in
Definition: glext.h:9616

Referenced by expand_time().

◆ throw()

Definition at line 407 of file wcsftime.cpp.

408{
409 wchar_t const* format;
410 switch (field_code)
411 {
412 case WW_SDATEFMT:
413 format = lc_time->_W_ww_sdatefmt;
414 break;
415
416 case WW_LDATEFMT:
417 format = lc_time->_W_ww_ldatefmt;
418 break;
419
420 case WW_TIMEFMT:
421 default:
422 format = lc_time->_W_ww_timefmt;
423 break;
424 }
425
426 if (lc_time->ww_caltype != 1)
427 {
428 // We have something other than the basic Gregorian calendar
429 bool const is_time_format = field_code == WW_TIMEFMT;
430
431 // We leave the verification of the SYSTEMTIME up to the Windows API
432 // that we call; if one of those functions returns zero to indicate
433 // failure, we fall through and call expand_time() again.
434 SYSTEMTIME system_time;
435 system_time.wYear = static_cast<WORD>(tmptr->tm_year + 1900);
436 system_time.wMonth = static_cast<WORD>(tmptr->tm_mon + 1);
437 system_time.wDay = static_cast<WORD>(tmptr->tm_mday);
438 system_time.wHour = static_cast<WORD>(tmptr->tm_hour);
439 system_time.wMinute = static_cast<WORD>(tmptr->tm_min);
440 system_time.wSecond = static_cast<WORD>(tmptr->tm_sec);
441 system_time.wMilliseconds = 0;
442
443 // Find buffer size required:
444 int cch;
445 if (is_time_format)
446 cch = __acrt_GetTimeFormatEx(lc_time->_W_ww_locale_name, 0, &system_time, format, nullptr, 0);
447 else
448 cch = __acrt_GetDateFormatEx(lc_time->_W_ww_locale_name, 0, &system_time, format, nullptr, 0, nullptr);
449
450 if (cch != 0)
451 {
452 __crt_scoped_stack_ptr<wchar_t> const buffer(_malloca_crt_t(wchar_t, cch));
453 if (buffer.get() != nullptr)
454 {
455 // Do actual date/time formatting:
456 if (is_time_format)
457 cch = __acrt_GetTimeFormatEx(lc_time->_W_ww_locale_name, 0, &system_time, format, buffer.get(), cch);
458 else
459 cch = __acrt_GetDateFormatEx(lc_time->_W_ww_locale_name, 0, &system_time, format, buffer.get(), cch, nullptr);
460
461 // Copy to output buffer:
462 wchar_t const* buffer_it = buffer.get();
463 while (--cch > 0 && *count > 0)
464 {
465 *(*out)++ = *buffer_it++;
466 (*count)--;
467 }
468
469 return true;
470 }
471 }
472
473 // If an error occurs, just fall through to localized Gregorian...
474 }
475
476 while (*format && *count != 0)
477 {
478 wchar_t specifier = 0;
479 bool no_lead_zeros = false;
480
481 // Count the number of repetitions of this character
482 int repeat = 0;
483 wchar_t const* p = format;
484 for (; *p++ == *format; ++repeat);
485 // Leave p pointing to the beginning of the next token
486 p--;
487
488 // Switch on ASCII format character and determine specifier:
489 switch (*format)
490 {
491 case L'M':
492 {
493 switch (repeat)
494 {
495 case 1: no_lead_zeros = true; // fall through
496 case 2: specifier = L'm'; break;
497 case 3: specifier = L'b'; break;
498 case 4: specifier = L'B'; break;
499 }
500 break;
501 }
502
503 case L'd':
504 {
505 switch (repeat)
506 {
507 case 1: no_lead_zeros = true; // fall through
508 case 2: specifier = L'd'; break;
509 case 3: specifier = L'a'; break;
510 case 4: specifier = L'A'; break;
511 }
512 break;
513 }
514
515 case L'y':
516 {
517 switch (repeat)
518 {
519 case 2: specifier = L'y'; break;
520 case 4: specifier = L'Y'; break;
521 }
522 break;
523 }
524
525 case L'h':
526 {
527 switch (repeat)
528 {
529 case 1: no_lead_zeros = true; // fall through
530 case 2: specifier = L'I'; break;
531 }
532 break;
533 }
534
535 case L'H':
536 {
537 switch (repeat)
538 {
539 case 1: no_lead_zeros = true; // fall through
540 case 2: specifier = L'H'; break;
541 }
542 break;
543 }
544
545 case L'm':
546 {
547 switch (repeat)
548 {
549 case 1: no_lead_zeros = true; // fall through
550 case 2: specifier = L'M'; break;
551 }
552 break;
553 }
554
555 case L's': // for compatibility; not strictly WinWord
556 {
557 switch (repeat)
558 {
559 case 1: no_lead_zeros = true; // fall through
560 case 2: specifier = L'S'; break;
561 }
562 break;
563 }
564
565 case L'A':
566 case L'a':
567 {
568 if (!_wcsicmp(format, L"am/pm"))
569 {
570 p = format + 5;
571 }
572 else if (!_wcsicmp(format, L"a/p"))
573 {
574 p = format + 3;
575 }
576
577 specifier = L'p';
578 break;
579 }
580
581 case L't': // t or tt time marker suffix
582 {
583 wchar_t* ampmstr = tmptr->tm_hour <= 11
584 ? lc_time->_W_ampm[0]
585 : lc_time->_W_ampm[1];
586
587 if (repeat == 1 && *count > 0)
588 {
589 *(*out)++ = *ampmstr++;
590 (*count)--;
591 }
592 else
593 {
594 while (*ampmstr != 0 && *count > 0)
595 {
596 *(*out)++ = *ampmstr++;
597 --*count;
598 }
599 }
600 format = p;
601 continue;
602 }
603
604 case L'\'': // literal string
605 {
606 if (repeat % 2 == 0) // even number
607 {
608 format += repeat;
609 }
610 else // odd number
611 {
612 format += repeat;
613 while (*format && *count != 0)
614 {
615 if (*format == L'\'')
616 {
617 format++;
618 break;
619 }
620
621 *(*out)++ = *format++;
622 --*count;
623 }
624 }
625
626 continue;
627 }
628
629 default: // non-control char, print it
630 {
631 break;
632 }
633 }
634
635 // expand specifier, or copy literal if specifier not found
636 if (specifier)
637 {
639
640 format = p; // bump format up to the next token
641 }
642 else
643 {
644 *(*out)++ = *format++;
645 --*count;
646 }
647 }
648
649 return true;
650}
int WINAPI __acrt_GetDateFormatEx(_In_opt_ LPCWSTR locale_name, _In_ DWORD flags, _In_opt_ SYSTEMTIME CONST *date, _In_opt_ LPCWSTR format, _Out_writes_opt_(buffer_count) LPWSTR buffer, _In_opt_ int buffer_count, _In_opt_ LPCWSTR calendar)
int WINAPI __acrt_GetTimeFormatEx(_In_opt_ LPCWSTR locale_name, _In_ DWORD flags, _In_opt_ SYSTEMTIME CONST *time, _In_opt_ LPCWSTR format, _Out_writes_opt_(buffer_count) LPWSTR buffer, _In_opt_ int buffer_count)
unsigned short WORD
Definition: ntddk_ex.h:93
GLfloat GLfloat p
Definition: glext.h:8902
static DWORD DWORD void LPSTR DWORD cch
Definition: str.c:202
_Check_return_ _CRTIMP int __cdecl _wcsicmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)
WORD wYear
Definition: winbase.h:930
WORD wMilliseconds
Definition: winbase.h:937
WORD wMonth
Definition: winbase.h:931
WORD wHour
Definition: winbase.h:934
WORD wSecond
Definition: winbase.h:936
WORD wMinute
Definition: winbase.h:935
WORD wDay
Definition: winbase.h:933
wchar_t tm const * tmptr
Definition: wcsftime.cpp:382
static int repeat
Definition: xmllint.c:137

◆ wcsftime()

size_t __cdecl wcsftime ( wchar_t *const  buffer,
size_t const  max_size,
wchar_t const *const  format,
tm const *const  timeptr 
)

Definition at line 1192 of file wcsftime.cpp.

1198{
1199 return _Wcsftime_l(buffer, max_size, format, timeptr, nullptr, nullptr);
1200}

Variable Documentation

◆ count

◆ field_code

int const field_code

Definition at line 402 of file wcsftime.cpp.

Referenced by expand_time(), and throw().

◆ lc_time

◆ out

Definition at line 383 of file wcsftime.cpp.

Referenced by __convert_float_buffer(), __crtGetStringTypeW(), __get_floor_digits(), __gluMultMatrixVecd(), __rpc_uaddr2taddr_af(), _Dispatch_type_(), _Getdays(), _Getmonths(), _nfs41_CreateSrvCall(), _rdpdr_check_fds(), _test_readyState(), _WLocale_ctype(), _wsetlocale_set_cat(), abs_path_link(), acpi_disable_wakeup_device_power(), acpi_enable_wakeup_device_power(), add_calc_job_comp(), add_calc_job_decomp(), asciiToUTF8(), assembly_create(), assembly_from_hmodule(), attr_cache_entry_create(), attr_cache_find_or_create(), attr_cache_init(), authsspi_create_default(), BaseRendererImpl_Run(), bc_give(), bind_callback_QueryInterface(), BindStatusCallback_OnObjectAvailable(), RequestHandler::bindump(), blake2b(), blake2b_final(), btrfs_file_read(), btrfs_read_extent_inline(), btrfs_read_extent_reg(), btrfs_readlink(), buffered_fullread(), bus_query_hardware_ids(), cache_insert(), cancel_lock(), cancel_open(), cb_compound_argop(), cb_compound_resop(), cb_notify_deviceid_change(), cb_notify_deviceid_delete(), charactersDebug(), CharLowerTest(), CharUpperTest(), check_nfs41_create_args(), check_nfs41_getacl_args(), check_nfs41_getreparse_args(), check_nfs41_queryea_args(), check_nfs41_setacl_args(), check_nfs41_setattr_args(), check_nfs41_setea_args(), check_nfs41_setreparse_args(), check_nfs41_write_args(), CheckCircularConnection(), chmc_encint(), chomp(), cl_exid_compare(), class_object_GetMethod(), Subdivider::classify_headonleft_s(), Subdivider::classify_headonleft_t(), Subdivider::classify_headonright_s(), Subdivider::classify_headonright_t(), Subdivider::classify_tailonleft_s(), Subdivider::classify_tailonleft_t(), Subdivider::classify_tailonright_s(), Subdivider::classify_tailonright_t(), clnt_cb_thread(), cnv_unicode(), coclass1_QueryInterface(), coclass2_QueryInterface(), compat_catpath(), compound_encode_send_decode(), computeBracketPairs(), config_init(), config_load(), config_parse_pair(), context_create(), conv_s16_to_f32(), conv_s16_to_s32(), convert_nfs4acl_2_dacl(), copy_outval(), copy_remote_record(), CRAM_DecompressBegin(), CRAM_DecompressGetFormat(), CRAM_DecompressQuery(), create_directinput_instance(), create_new_rpc_auth(), create_nls_file(), create_open_state(), create_rpcsec_auth_client(), create_silly_rename(), create_sub_stream(), create_writer_output(), CreateProxyFromTypeInfo(), CreateXmlWriterOutputWithEncodingCodePage(), CreateXmlWriterOutputWithEncodingName(), CredMarshalCredentialA(), CredMarshalCredentialW(), CredUnmarshalCredentialA(), CredUnmarshalCredentialW(), CRYPT_AppendAttribute(), CRYPT_AsnEncodeAltName(), CRYPT_AsnEncodeAuthorityInfoAccess(), CRYPT_AsnEncodeCertPolicies(), CRYPT_AsnEncodeCertPolicyMappings(), CRYPT_AsnEncodeCertPolicyQualifiers(), CRYPT_AsnEncodeConstructed(), CRYPT_AsnEncodeCRLDistPoints(), CRYPT_AsnEncodeCRLEntries(), CRYPT_AsnEncodeCTLEntries(), CRYPT_AsnEncodeEnhancedKeyUsage(), CRYPT_AsnEncodeExtensions(), CRYPT_AsnEncodeName(), CRYPT_AsnEncodeNoticeNumbers(), CRYPT_AsnEncodeSequence(), CRYPT_AsnEncodeSMIMECapabilities(), CRYPT_AsnEncodeUnicodeName(), CRYPT_ConstructAlgorithmId(), CRYPT_ConstructAttribute(), CRYPT_ConstructAttributes(), CRYPT_ConstructBitBlob(), CRYPT_ConstructBlob(), CRYPT_CopyAlgorithmId(), CRYPT_CopyAttributes(), CRYPT_CopyBlob(), CRYPT_CopyCMSSignerInfo(), CRYPT_CopyRecipientInfo(), CRYPT_CopySignerCertInfo(), CRYPT_CopySignerInfo(), CRYPT_GetLen(), CRYPT_GetLengthIndefinite(), custom_uri_QueryInterface(), d3d8_device_QueryInterface(), d3d8_QueryInterface(), d3d8_surface_QueryInterface(), d3d8_swapchain_QueryInterface(), d3d8_texture_2d_QueryInterface(), d3d8_texture_3d_QueryInterface(), d3d8_texture_cube_QueryInterface(), d3d8_volume_QueryInterface(), d3d9_device_QueryInterface(), d3d9_indexbuffer_QueryInterface(), d3d9_pixelshader_QueryInterface(), d3d9_query_QueryInterface(), d3d9_QueryInterface(), d3d9_stateblock_QueryInterface(), d3d9_surface_QueryInterface(), d3d9_swapchain_QueryInterface(), d3d9_texture_2d_QueryInterface(), d3d9_texture_3d_QueryInterface(), d3d9_texture_cube_QueryInterface(), d3d9_vertex_declaration_QueryInterface(), d3d9_vertexbuffer_QueryInterface(), d3d9_vertexshader_QueryInterface(), d3d9_volume_QueryInterface(), d3d_device1_QueryInterface(), d3d_device2_QueryInterface(), d3d_device3_QueryInterface(), d3d_device7_QueryInterface(), d3d_device_inner_QueryInterface(), d3d_execute_buffer_QueryInterface(), d3d_viewport_TransformVertices(), d3drm1_CreateObject(), d3drm1_QueryInterface(), d3drm2_CreateObject(), d3drm2_QueryInterface(), d3drm3_CreateObject(), d3drm3_QueryInterface(), d3drm_animation1_Clone(), d3drm_animation1_QueryInterface(), d3drm_animation2_Clone(), d3drm_animation2_QueryInterface(), d3drm_device1_Clone(), d3drm_device1_QueryInterface(), d3drm_device2_Clone(), d3drm_device2_QueryInterface(), d3drm_device3_Clone(), d3drm_device3_QueryInterface(), d3drm_device_win_Clone(), d3drm_device_win_QueryInterface(), d3drm_face1_Clone(), d3drm_face1_QueryInterface(), d3drm_face2_Clone(), d3drm_face2_QueryInterface(), d3drm_frame1_Clone(), d3drm_frame1_QueryInterface(), d3drm_frame2_Clone(), d3drm_frame2_QueryInterface(), d3drm_frame3_Clone(), d3drm_frame3_QueryInterface(), d3drm_frame_array_QueryInterface(), d3drm_light_array_QueryInterface(), d3drm_light_Clone(), d3drm_light_QueryInterface(), d3drm_material_Clone(), d3drm_material_QueryInterface(), d3drm_mesh_builder2_Clone(), d3drm_mesh_builder2_QueryInterface(), d3drm_mesh_builder3_Clone(), d3drm_mesh_builder3_QueryInterface(), d3drm_mesh_Clone(), d3drm_mesh_QueryInterface(), d3drm_texture1_Clone(), d3drm_texture1_QueryInterface(), d3drm_texture2_Clone(), d3drm_texture2_QueryInterface(), d3drm_texture3_Clone(), d3drm_texture3_QueryInterface(), d3drm_viewport1_Clone(), d3drm_viewport1_QueryInterface(), d3drm_viewport2_Clone(), d3drm_viewport2_QueryInterface(), d3drm_visual_array_QueryInterface(), d3drm_wrap_Clone(), d3drm_wrap_QueryInterface(), d3dx9_animation_controller_QueryInterface(), d3dx9_file_data_QueryInterface(), d3dx9_file_enum_object_QueryInterface(), d3dx9_file_QueryInterface(), d3dx9_fragment_linker_QueryInterface(), d3dx9_line_QueryInterface(), d3dx9_mesh_QueryInterface(), d3dx9_skin_info_QueryInterface(), d3dx9_sprite_QueryInterface(), d3dx9_texture_shader_QueryInterface(), D3DXCreateRenderToEnvMap(), D3DXCreateRenderToSurface(), D3DXMatrixAffineTransformation(), D3DXMatrixAffineTransformation2D(), D3DXMatrixLookAtLH(), D3DXMatrixLookAtRH(), D3DXMatrixMultiply(), D3DXMatrixRotationAxis(), D3DXMatrixRotationYawPitchRoll(), D3DXMatrixTransformation(), D3DXMatrixTransformation2D(), D3DXPlaneNormalize(), D3DXPlaneTransformArray(), D3DXQuaternionExp(), D3DXQuaternionLn(), D3DXQuaternionMultiply(), D3DXQuaternionNormalize(), D3DXQuaternionRotationAxis(), D3DXQuaternionRotationMatrix(), D3DXQuaternionRotationYawPitchRoll(), D3DXQuaternionSlerp(), D3DXRenderToEnvMap_QueryInterface(), D3DXRenderToSurface_QueryInterface(), D3DXSHAdd(), D3DXSHEvalDirection(), D3DXSHMultiply2(), D3DXSHMultiply3(), D3DXSHMultiply4(), D3DXSHRotate(), D3DXSHRotateZ(), D3DXSHScale(), D3DXVec2Transform(), D3DXVec2TransformArray(), D3DXVec2TransformCoordArray(), D3DXVec2TransformNormalArray(), D3DXVec3ProjectArray(), D3DXVec3Transform(), D3DXVec3TransformArray(), D3DXVec3TransformCoord(), D3DXVec3TransformCoordArray(), D3DXVec3TransformNormalArray(), D3DXVec3Unproject(), D3DXVec3UnprojectArray(), D3DXVec4Cross(), D3DXVec4Transform(), D3DXVec4TransformArray(), ddraw7_QueryInterface(), ddraw_class_factory_CreateInstance(), ddraw_class_factory_QueryInterface(), DDSD2_to_DDSD(), DDSD_to_DDSD2(), de_casteljau_surf(), DECLARE_INTERFACE_(), DECLARE_INTERFACE_IID_(), decode_base64_blob(), decode_inner_content(), decode_streamname(), delegation_create(), delegation_return(), DEVENUM_ICreateDevEnum_CreateClassEnumerator(), device_load_logo(), DirectInput8Create(), disk_query_directory(), disk_query_information(), disk_query_volume_information(), disp_obj_QueryInterface(), dispatch_create_proxy(), dispatch_typelib_ps_CreateProxy(), dispatch_typelib_ps_QueryInterface(), DllGetClassObject(), dns_strcpyX(), DnsRecordCopyEx(), DnsRecordSetCopyEx(), do_authorization(), do_open(), doit(), doitW(), DrawDibRealize(), DriverEntry(), RequestHandler::dump_one_line(), dump_stream_to_file(), dwarf2_init_zsection(), dwarfpctoline(), dwarfunwind(), encode_streamname(), XMLStorage::EncodeXMLString(), encrypt_block_impl(), enter_shift(), EnumTfLanguageProfiles_Constructor(), event_client(), exception_code_to_gdb(), exec_baselinefont3(), exec_bold(), exec_browsemode(), exec_composesettings(), exec_delete(), exec_editmode(), exec_font(), exec_fontname(), exec_fontsize(), exec_forecolor(), exec_from_table(), exec_horizontalline(), exec_htmleditmode(), exec_hyperlink(), exec_indent(), exec_italic(), exec_justifycenter(), exec_justifyleft(), exec_justifyright(), exec_mshtml_copy(), exec_mshtml_cut(), exec_mshtml_paste(), exec_orderlist(), exec_outdent(), exec_respectvisibility_indesign(), exec_select_all(), exec_setdirty(), exec_underline(), exec_unorderlist(), exit_shift(), expand_input(), ExpandAlias(), Ext2InspectReparseData(), Ext2TruncateSymlink(), Ext2WriteSymlink(), ext4_ext_create_new_leaf(), ext4_ext_get_blocks(), ext4_ext_grow_indepth(), ext4_ext_remove_space(), ext4_ext_rm_leaf(), ext4_split_extent_at(), fcbopen_main(), feed_read(), file_device_create(), file_layout_read_thread(), file_layout_recall(), file_layout_return(), file_layout_write_thread(), fill_cube_positive_x(), fill_DataFormat(), FilterGraph2_Connect(), FilterGraph2_RenderRecurse(), find_next(), find_subvol(), flush_output_data(), for(), format_abs_path(), format_filelist_filename(), format_lex(), format_uuid(), FSE_writeNCount_generic(), ft_bitmap_assure_buffer(), FT_GlyphLoader_CopyPoints(), FT_Outline_EmboldenXY(), fwpolicy2_QueryInterface(), gdf_driver_proc(), GDI_Bezier(), GdipGetMatrixElements(), get_body(), get_client_for_netaddr(), get_constants_desc(), get_dword_from_reg(), get_ea_list(), get_ea_value(), get_name(), get_param_flags(), get_relevant_argb_components(), get_retrieval_pointers(), get_string_from_reg(), get_subvol_path(), get_superblock_attrs(), get_ttf_nametable_entry(), get_volume_size_info(), getdomainname(), GetExpandedNameA(), GetExpandedNameW(), getPath(), getregdw(), GetUserNameExW(), gif_compress(), gluProject(), gluUnProject(), gluUnProject4(), handle_cb_compound(), handle_cb_sequence(), handle_close(), handle_getacl(), handle_getattr(), handle_lock(), handle_mount(), handle_nfs41_set_size(), handle_open(), handle_read(), handle_readdir(), handle_setacl(), handle_setexattr(), handle_symlink(), handle_upcall(), handle_write(), hash_mac_addrs(), horner_bezier_curve(), horner_bezier_surf(), HTTP_DoAuthorization(), HTTP_ProcessHeader(), I_CryptCreateLruCache(), ICCVID_DecompressBegin(), ICCVID_DecompressGetFormat(), ICCVID_DecompressQuery(), ICGetDisplayFormat(), ICLocate(), ID3DXConstantTableImpl_QueryInterface(), ID3DXFontImpl_QueryInterface(), ID3DXMatrixStackImpl_QueryInterface(), idmap_lookup_group(), idmap_lookup_user(), idmap_query_attrs(), IdnToAscii(), IdnToNameprepUnicode(), IdnToUnicode(), IDxDiagContainerImpl_GetChildContainer(), ignorableWhitespaceDebug(), implicit_handle(), inflate(), inflate_fast(), inflateBack(), inflateSync(), info_to_fattr4(), InternetExplorerManager_QueryInterface(), interpolate_aux(), interpolate_aux_color(), interpolate_aux_color_tex2(), interpolate_aux_tex2(), invert_matrix(), invert_matrix_3d(), invert_matrix_general(), is_valid_name(), is_valid_ncname(), is_valid_pubid(), isaxdecl_QueryInterface(), isaxlexical_QueryInterface(), isolat1ToUTF8(), journal_get_superblock(), journal_update_superblock(), JSGlobal_decodeURI(), layout_allocate_copy(), layout_fetch(), layout_state_create(), layout_update(), lookup_entry(), lookup_rpc(), lookup_symlink(), lznt1_decompress(), lzo_do_compress(), main(), make_surrogate(), map_dacl_2_nfs4acl(), map_name_2_sid(), map_nfs4ace_who(), map_user_to_ids(), marshal_nfs41_close(), marshal_nfs41_dirquery(), marshal_nfs41_eaget(), marshal_nfs41_easet(), marshal_nfs41_filequery(), marshal_nfs41_fileset(), marshal_nfs41_getacl(), marshal_nfs41_header(), marshal_nfs41_lock(), marshal_nfs41_mount(), marshal_nfs41_open(), marshal_nfs41_rw(), marshal_nfs41_setacl(), marshal_nfs41_symlink(), marshal_nfs41_unlock(), marshal_nfs41_volume(), marshal_STGMEDIUM(), marshal_WdtpInterfacePointer(), marshall_getacl(), marshall_getattr(), marshall_getexattr(), marshall_mount(), marshall_open(), marshall_rw(), marshall_symlink(), marshall_unicode_as_utf8(), marshall_volume(), matrix_multiply(), MCIQTZ_mciUpdate(), MCIQTZ_mciWhere(), mdbr_GetReaderByIndex(), mdbr_QueryInterface(), mdr_QueryInterface(), mds_commit(), MediaControl_Pause(), MediaControl_Run(), MetadataQueryReader_CreateInstance(), MetadataQueryWriter_CreateInstance(), midi_IDirectMusicPort_DeviceIoControl(), MIDIMAP_LoadSettings(), MimeOleObjectFromMoniker(), module_fill_module(), mpg123_read(), msi_get_remote(), MSI_RecordCopyField(), MsiCloseHandle(), msihandle2msiinfo(), name_cache_entry_create(), name_cache_entry_update(), name_cache_find_or_create(), name_cache_lookup(), names_dump(), next_slot(), nfs41_access(), nfs41_bind_conn_to_session(), nfs41_client_create(), nfs41_client_delegation_recovery(), nfs41_client_owner(), nfs41_client_renew(), nfs41_client_state_revoked(), nfs41_close(), nfs41_CloseSrvOpen(), nfs41_commit(), nfs41_create(), nfs41_Create(), nfs41_create_session(), nfs41_CreateConnection(), nfs41_CreateVNetRoot(), nfs41_delegate_open(), nfs41_delegation_getattr(), nfs41_delegation_granted(), nfs41_delegation_recall(), nfs41_delegation_return(), nfs41_delegpurge(), nfs41_delegreturn(), nfs41_DeleteConnection(), nfs41_destroy_clientid(), nfs41_destroy_session(), nfs41_downcall(), nfs41_ea_set(), nfs41_exchange_id(), nfs41_FinalizeNetRoot(), nfs41_FinalizeSrvCall(), nfs41_free_stateid(), nfs41_fs_locations(), nfs41_FsdDispatch(), nfs41_getattr(), nfs41_GetConnectionInfoFromBuffer(), nfs41_GetReparsePoint(), nfs41_handle_callback(), nfs41_idmap_create(), nfs41_idmap_gid_to_group(), nfs41_idmap_group_to_gid(), nfs41_idmap_name_to_ids(), nfs41_idmap_principal_to_ids(), nfs41_idmap_uid_to_name(), nfs41_link(), nfs41_lock(), nfs41_Lock(), nfs41_lookup(), nfs41_mount(), nfs41_name_cache_create(), nfs41_open(), nfs41_open_stateid_arg(), nfs41_QueryDirectory(), nfs41_QueryEaInformation(), nfs41_QueryFileInformation(), nfs41_QuerySecurityInformation(), nfs41_QueryVolumeInformation(), nfs41_read(), nfs41_Read(), nfs41_readdir(), nfs41_readlink(), nfs41_reclaim_complete(), nfs41_remove(), nfs41_rename(), nfs41_root_create(), nfs41_root_mount_addrs(), nfs41_rpc_clnt_create(), nfs41_rpc_openattr(), nfs41_secinfo(), nfs41_secinfo_noname(), nfs41_send_compound(), nfs41_send_sequence(), nfs41_server_resolve(), nfs41_session_bad_slot(), nfs41_session_create(), nfs41_session_set_lease(), nfs41_setattr(), nfs41_SetEaInformation(), nfs41_SetFileInformation(), nfs41_SetReparsePoint(), nfs41_SetSecurityInformation(), nfs41_shutdown_daemon(), nfs41_SrvCallWinnerNotify(), nfs41_Start(), nfs41_superblock_for_fh(), nfs41_superblock_getattr(), nfs41_symlink_follow(), nfs41_symlink_target(), nfs41_test_stateid(), nfs41_unlock(), nfs41_Unlock(), nfs41_unmount(), nfs41_upcall(), nfs41_UpcallCreate(), nfs41_UpcallWaitForReply(), nfs41_want_delegation(), nfs41_write(), nfs41_Write(), np_enum(), NPAddConnection3(), op_cb_getattr_args(), op_cb_getattr_res(), op_cb_layoutrecall_args(), op_cb_layoutrecall_file(), op_cb_layoutrecall_fsid(), op_cb_layoutrecall_res(), op_cb_notify_args(), op_cb_notify_deviceid_args(), op_cb_notify_deviceid_res(), op_cb_notify_lock_args(), op_cb_notify_lock_res(), op_cb_notify_res(), op_cb_push_deleg_args(), op_cb_push_deleg_res(), op_cb_recall_any_args(), op_cb_recall_any_res(), op_cb_recall_args(), op_cb_recall_res(), op_cb_recall_slot_args(), op_cb_recall_slot_res(), op_cb_recallable_obj_avail_args(), op_cb_recallable_obj_avail_res(), op_cb_sequence_args(), op_cb_sequence_ref(), op_cb_sequence_ref_list(), op_cb_sequence_res(), op_cb_sequence_res_ok(), op_cb_wants_cancelled_args(), op_cb_wants_cancelled_res(), open_deleg_cmp(), XMLStorage::XMLNode::original_write_worker(), parse_abs_path(), parse_close(), parse_cmdlineargs(), parse_getacl(), parse_getattr(), parse_getexattr(), parse_lock(), parse_mount(), parse_open(), parse_prop(), parse_readdir(), parse_rw(), parse_setacl(), parse_setattr(), parse_setexattr(), parse_symlink(), parse_unlock(), parse_url_from_outside(), parse_volume(), parseAndPrintFile(), ParseRegExp(), ParseURLFromOutsideSourceA(), ParseURLFromOutsideSourceW(), PathAllocCombine(), PathCchCanonicalize(), PathCchCanonicalizeEx(), PathCchCombine(), PathCchCombineEx(), pattern_fork(), pattern_init(), pattern_threads_init(), pbuf_skip(), pdo_query_device_id(), pdo_query_hardware_ids(), XMLStorage::XMLNode::plain_write_worker(), pnfs_client_init(), pnfs_data_server_client(), pnfs_file_device_get(), pnfs_file_device_list_create(), pnfs_file_device_notify(), pnfs_file_layout_recall(), pnfs_layout_list_create(), pnfs_layout_state_open(), pnfs_layout_state_prepare(), pnfs_read(), pnfs_rpc_getdeviceinfo(), pnfs_rpc_layoutcommit(), pnfs_rpc_layoutget(), pnfs_rpc_layoutreturn(), pnfs_write(), pointer_default(), prepare_for_binding(), pres_bool_from_value(), pres_float_from_bool(), pres_float_from_int(), pres_int_from_bool(), pres_int_from_float(), XMLStorage::XMLNode::pretty_write_worker(), XMLStorage::StyleSheet::print(), XMLStorage::XMLFormat::print_header(), proc_cb_compound_args(), proc_cb_compound_res(), process_compressed_8x8_brush_data(), process_get_owner(), process_plane(), profile_AtoW(), propschema_QueryInterface(), pswitch(), QueryCygwinEA(), QueryCygwinSymlink(), raid6_recover2(), rdpdr_process_irp(), rdpsnd_process_negotiate(), rdpsnd_process_servertick(), rdssl_mod_exp(), read_entire_dir(), read_from_mds(), read_from_pnfs(), read_hex_data(), readdir_add_dots(), readdir_copy_entry(), recover_delegation_open(), recover_delegation_want(), recover_open(), recover_open_no_grace(), referral_resolve(), reg_create_key(), reg_enum_key(), reg_enum_values(), reg_get_stringvalue(), regexp_new(), regstore_set_data(), remove_dot_segments(), replay_cache_read(), CQueryAssociations::ReturnData(), CQueryAssociations::ReturnString(), root_client_create(), rotate_X(), rpc_array_putfh(), rpc_call(), RPC_GetLocalClassObject(), RPCRT4_default_authorize(), rsa_exptmod(), RSAENH_CPDecrypt(), RSAENH_CPEncrypt(), RSAENH_CPSignHash(), RtlRegisterWait(), run_ex(), File::SaveFromString(), sec_hash_16(), sec_hash_48(), sec_hash_sha1_16(), sec_hash_to_string(), sec_rsa_encrypt(), security_get_sd(), security_set_sd(), SendFurther(), serial_device_control(), server_create(), server_lookup(), server_lookup_loop(), service_pause_service(), service_resume_service(), service_start_service(), service_stop_service(), session_alloc(), session_get_lease(), set(), set_constants(), set_ea_value(), set_rotation_xform(), CGridView::SetFont(), SetFont(), SharedMemoryInit(), SHELL_ArgifyW(), SHEnumClassesOfCategories(), SHGetIniStringW(), XMLStorage::XMLNode::smart_write_worker(), snarf_tokens(), SQLInstallDriverEx(), SQLInstallTranslatorEx(), squash_guid(), src_float_to_int_array(), src_float_to_short_array(), src_int_to_float_array(), src_short_to_float_array(), sspi_wrap(), START_TEST(), stateid_array(), STATUSBAR_GetBorders(), store_number(), store_number_without_lead_zeroes(), StoreConnectionInfo(), XMLStorage::XMLError::str(), XMLStorage::XMLErrorList::str(), FstreamTest::streambuf_output(), SstreamTest::streambuf_output(), string2intW(), string_enumerator_Clone(), StripQuotes(), super_navigate(), superblock_create(), SystemClockImpl_Unadvise(), SystemFunction004(), SystemFunction005(), SystemFunction012(), SystemFunction013(), SystemFunction024(), SystemFunction025(), test1_QueryInterface(), test__get_doserrno(), test__get_errno(), test_accel2(), test_BreakawayOk(), test_cf_CreateInstance(), test_cf_QueryInterface(), test_crtGetStringTypeW(), test_D3DXFloat_Array(), test_D3DXSHAdd(), test_D3DXSHRotate(), test_D3DXSHRotateZ(), test_data_cache_contents(), test_DateFromUDate(), test_demangle(), test_dos2dt(), test_DuplicateHandle(), test_exec(), test_exec_fontname(), test_fm2_enummatchingfilters(), test_format_message(), test_get_atom_name(), test_GetMouseMovePointsEx(), test_GetTempFileNameA(), test_I10_OUTPUT(), test_IdnToAscii(), test_IdnToNameprepUnicode(), test_IdnToUnicode(), test_ifiltermapper_from_filtergraph(), test_IsProcessInJob(), test_jobInheritance(), test_kernel32_tp_io(), test_local_get_atom_name(), test_marshal_array(), test_marshal_bstr(), test_marshal_coclass(), test_marshal_pointer(), test_marshal_safearray(), test_marshal_struct(), test_marshal_variant(), test_message_from_hmodule(), test_message_from_string(), test_message_from_string_wide(), test_message_ignore_inserts(), test_message_ignore_inserts_wide(), test_message_insufficient_buffer(), test_message_insufficient_buffer_wide(), test_message_invalid_flags(), test_message_invalid_flags_wide(), test_message_wrap(), test_parse_filter_data(), test_PathCommonPrefixA(), test_PathSearchAndQualify(), test_persist_QueryInterface(), test_ports_client(), test_proxy_indirect(), test_PSPropertyKeyFromString(), test_PSStringFromPropertyKey(), test_register_filter_with_null_clsMinorType(), test_SetDefaults(), test_setting_arrays_table(), test_setting_basic_table(), test_setting_matrices_table(), test_SetValue(), test_shell_imagelist(), test_SHGetIniString(), test_SHPropertyBag_ReadLONG(), test_st2dt(), test_StdRegProv(), test_swscanf_s(), test_SystemFunction004(), test_SystemFunction005(), test_SystemSecurity(), test_tp_io(), test_transform(), test_TreatAsClass(), test_UrlEscapeW(), test_VarDateFromStr(), test_VarDecAdd(), test_VarDecCmp(), test_VarDecDiv(), test_VarDecMul(), test_VarDecRound(), test_VarFormat(), test_VarR8Round(), test_VarUI1FromDisp(), test_VarWeekdayName(), test_vswprintf(), test_Win32_ComputerSystem(), test_Win32_Process(), test_Win32_Service(), TestAdviseAndCanonical(), throw(), XMLStorage::XMLMessage::toString(), tp_alloc_wait(), tp_group_alloc(), tp_threadpool_alloc(), tp_threadpool_lock(), tp_waitqueue_lock(), TpAllocCleanupGroup(), TpAllocIoCompletion(), TpAllocPool(), TpAllocTimer(), TpAllocWait(), TpAllocWork(), translate15to16(), translate15to24(), translate15to32(), translate16to16(), translate16to24(), translate16to32(), translate24to16(), translate24to24(), translate24to32(), translate8to16(), translate8to24(), translate8to32(), translate8to8(), translate_image(), translate_record(), TranslateColors(), transpose_matrix(), truncate_path(), TTIsEmbeddingEnabledForFacename(), typelib_proxy_init(), uni2char(), unmarshal_nfs41_getacl(), unmarshal_nfs41_open(), unmarshal_record(), unsquash_guid(), upcall_handle(), upcall_marshall(), upcall_parse(), update_server(), UrlApplySchemeA(), RequestHandler::urldec(), RequestHandler::urlenc(), UrlGetPartA(), URLSubRegQueryA(), usage(), utf16_to_utf8(), UTF16BEToUTF8(), UTF16LEToUTF8(), utf8_to_utf16(), UTF8ToUTF8(), VarCat(), VBArray_getItem(), virtqueue_add_buf_packed(), virtqueue_add_buf_split(), virtqueue_kick_prepare_packed(), warning(), wave_out_play(), WdfDeleteKmdfVersionFromRegistry(), WdfWriteKmdfVersionToRegistry(), weightedcapintegrale(), Widget_array(), Widget_bstr(), Widget_Coclass_ptr(), Widget_iface_ptr(), Widget_int_ptr(), Widget_int_ptr_ptr(), Widget_mystruct(), Widget_rect(), Widget_safearray(), Widget_variant(), Widget_variant_array(), FstreamTest::win32_file_format(), win_iconv(), win_time_to_unix(), XMLStorage::XMLNode::write(), XMLStorage::XMLDoc::write(), write_byte(), write_data(), write_default_value(), XMLStorage::XMLDoc::write_file(), XMLStorage::XMLDoc::write_formating(), write_if_change(), write_int_value(), write_lb_ranges(), write_string_value(), write_to_mds(), write_to_pnfs(), write_unicode2cp_table(), WsNcEntryInitializeFromRegistry(), XCOPY_ParseCommandLine(), xmlBuildURI(), xmlCharEncFirstLine(), xmlCharEncFirstLineInput(), xmlCharEncFirstLineInt(), xmlCharEncInFunc(), xmlCharEncInput(), xmlCharEncOutFunc(), xmlCopyChar(), xmlCopyCharMultiByte(), xmlEncInputChunk(), xmlEncOutputChunk(), xmlNormalizeURIPath(), xmlParseReference(), xmlPrintURI(), xmlURIEscapeStr(), xmlURIUnescapeString(), xsltGetNamespace(), xsltGetPlainNamespace(), and ZSTD_compressBlock_internal().

◆ specifier

◆ tmptr

Definition at line 382 of file wcsftime.cpp.

Referenced by throw().