Differences From Artifact [d08e29e35b]:
- File
src/of_strptime.m
— part of check-in
[2a27cf3000]
at
2016-01-03 00:41:26
on branch trunk
— Update copyright
While at it, also update the mail address. (user: js, size: 2624) [annotate] [blame] [check-ins using]
To Artifact [e62baac3c8]:
- File src/of_strptime.m — part of check-in [e0b9167693] at 2016-02-21 15:37:42 on branch trunk — Make use of C99-style for loops (user: js, size: 2632) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
25 26 27 28 29 30 31 | const char* of_strptime(const char *buffer, const char *format, struct tm *tm) { enum { SEARCH_CONVERSION_SPECIFIER, IN_CONVERSION_SPECIFIER } state = SEARCH_CONVERSION_SPECIFIER; | | > | | 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 | const char* of_strptime(const char *buffer, const char *format, struct tm *tm) { enum { SEARCH_CONVERSION_SPECIFIER, IN_CONVERSION_SPECIFIER } state = SEARCH_CONVERSION_SPECIFIER; size_t j, buffer_len, format_len; buffer_len = strlen(buffer); format_len = strlen(format); j = 0; for (size_t i = 0; i < format_len; i++) { if (j >= buffer_len) return NULL; switch (state) { case SEARCH_CONVERSION_SPECIFIER: if (format[i] == '%') state = IN_CONVERSION_SPECIFIER; |
︙ | ︙ |