8 static bool is_spacing(
char c) {
return c ==
' ' || c==10 || c==13 || c ==
'\t';}
11 for(
t_size walk = 0; walk < len; ++walk)
if (!
is_spacing(str[walk]))
return false;
19 for(
t_size walk = 0; walk < len; ++walk) {
20 const char c = ptr[walk];
22 ret = ret * 10 + (unsigned)(c -
'0');
31 t_size remaining = strlen(date);
33 st.wDay = 1; st.wMonth = 1;
35 #define ADVANCE(n) { PFC_ASSERT( remaining >= n); date += n; remaining -= n; } 36 #define ADVANCE_TEST(n) { if (remaining < n) throw exception_time_error(); } 37 #define PARSE(var, digits) { ADVANCE_TEST(digits); var = (WORD) ParseDateElem(date, digits); ADVANCE(digits) ; } 38 #define TEST_END( durationIncrement ) 39 #define SKIP(c) { ADVANCE_TEST(1); if (date[0] != c) throw exception_time_error(); ADVANCE(1); } 40 #define SKIP_SPACING() {while(remaining > 0 && is_spacing(*date)) ADVANCE(1);} 43 TEST_END(wYear); SKIP(
'-');
45 TEST_END(wMonth); SKIP(
'-');
47 TEST_END(wDay); SKIP(
' ');
49 TEST_END(wHour); SKIP(
':');
51 TEST_END(wMinute); SKIP(
':');
66 if (!LocalFileTimeToFileTime((
const FILETIME*)&base, (FILETIME*)&out))
throw exception_time_error();
77 SYSTEMTIME st; FILETIME ft;
78 if (FileTimeToLocalFileTime((FILETIME*)&p_timestamp,&ft)) {
79 if (FileTimeToSystemTime(&ft,&st)) {
93 if (FileTimeToSystemTime((
const FILETIME*)&p_timestamp,&st)) {
const t_filetimestamp filetimestamp_invalid
Invalid/unknown file timestamp constant. Also see: t_filetimestamp.
t_uint64 t_filetimestamp
Type used for file timestamp related variables. 64-bit value representing the number of 100-nanosecon...
t_filetimestamp filetimestamp_from_string(const char *date)