Lines Matching refs:s

19 static const char *consume_chars(const char *s, char *dest, unsigned int cnt)  in consume_chars()  argument
21 if (strlen(s) < cnt) { in consume_chars()
25 memcpy(dest, s, cnt); in consume_chars()
28 return s + cnt; in consume_chars()
31 static const char *consume_char(const char *s, char ch) in consume_char() argument
33 if (*s != ch) { in consume_char()
36 return ++s; in consume_char()
39 static const char *consume_date(const char *s, struct tm *tm_time) in consume_date() argument
45 s = consume_chars(s, year, 4); in consume_date()
46 if (!s) { in consume_date()
50 s = consume_char(s, '-'); in consume_date()
51 if (!s) { in consume_date()
55 s = consume_chars(s, month, 2); in consume_date()
56 if (!s) { in consume_date()
60 s = consume_char(s, '-'); in consume_date()
61 if (!s) { in consume_date()
65 s = consume_chars(s, day, 2); in consume_date()
66 if (!s) { in consume_date()
74 return s; in consume_date()
77 static const char *consume_time(const char *s, struct tm *tm_time) in consume_time() argument
83 s = consume_chars(s, hour, 2); in consume_time()
84 if (!s) { in consume_time()
88 s = consume_char(s, ':'); in consume_time()
89 if (!s) { in consume_time()
93 s = consume_chars(s, minute, 2); in consume_time()
94 if (!s) { in consume_time()
98 s = consume_char(s, ':'); in consume_time()
99 if (!s) { in consume_time()
103 s = consume_chars(s, second, 2); in consume_time()
104 if (!s) { in consume_time()
112 return s; in consume_time()
115 static char *strptime(const char *s, const char *format, struct tm *tm_time) in strptime() argument
121 s = consume_date(s, tm_time); in strptime()
122 if (!s) { in strptime()
126 s = consume_char(s, 'T'); in strptime()
127 if (!s) { in strptime()
131 s = consume_time(s, tm_time); in strptime()
132 if (!s) { in strptime()
136 return (char *)s; in strptime()
139 return (char *)consume_time(s, tm_time); in strptime()
142 return (char *)consume_date(s, tm_time); in strptime()