Lines Matching refs:buf
106 match_string (const char **buf, const char **strs) in match_string() argument
113 if (strncasecmp (*buf, strs[i], len) == 0) { in match_string()
114 *buf += len; in match_string()
128 parse_number (const char **buf, int n, int *num) in parse_number() argument
138 for (; **buf != '\0' && isspace((unsigned char)(**buf)); (*buf)++) in parse_number()
142 for (i = 0; **buf != '\0' && i < n && isdigit((unsigned char)(**buf)); i++, (*buf)++) in parse_number()
143 str[i] = **buf; in parse_number()
241 strptime (const char *buf, const char *format, struct tm *timeptr) in strptime() argument
250 while (isspace ((unsigned char)*buf)) in strptime()
251 ++buf; in strptime()
258 ret = match_string (&buf, full_weekdays); in strptime()
264 ret = match_string (&buf, abb_weekdays); in strptime()
270 ret = match_string (&buf, full_month); in strptime()
277 ret = match_string (&buf, abb_month); in strptime()
283 if (parse_number(&buf, 2, &ret)) in strptime()
290 s = strptime (buf, "%m/%d/%y", timeptr); in strptime()
293 buf = s; in strptime()
297 if (parse_number(&buf, 2, &ret)) in strptime()
303 if (parse_number(&buf, 2, &ret)) in strptime()
309 if (parse_number(&buf, 2, &ret)) in strptime()
317 if (parse_number(&buf, 3, &ret)) in strptime()
324 if (parse_number(&buf, 2, &ret)) in strptime()
331 if (parse_number(&buf, 2, &ret)) in strptime()
336 while (isspace ((unsigned char)*buf)) in strptime()
337 buf++; in strptime()
340 ret = match_string (&buf, ampm); in strptime()
350 s = strptime (buf, "%I:%M:%S %p", timeptr); in strptime()
353 buf = s; in strptime()
356 s = strptime (buf, "%H:%M", timeptr); in strptime()
359 buf = s; in strptime()
362 if (parse_number(&buf, 2, &ret)) in strptime()
367 while (isspace ((unsigned char)*buf)) in strptime()
368 buf++; in strptime()
372 s = strptime (buf, "%H:%M:%S", timeptr); in strptime()
375 buf = s; in strptime()
378 if (parse_number(&buf, 1, &ret)) in strptime()
385 if (parse_number(&buf, 1, &ret)) in strptime()
390 if (parse_number(&buf, 2, &ret)) in strptime()
395 if (parse_number(&buf, 2, &ret)) in strptime()
400 if (parse_number(&buf, 2, &ret)) in strptime()
405 s = strptime (buf, "%Y:%m:%d", timeptr); in strptime()
408 buf = s; in strptime()
411 if (parse_number(&buf, 2, &ret)) in strptime()
419 if (parse_number(&buf, 4, &ret)) in strptime()
429 if (*buf == '%') in strptime()
430 ++buf; in strptime()
435 if (*buf == '%' || *++buf == c) in strptime()
436 ++buf; in strptime()
442 if (*buf == c) in strptime()
443 ++buf; in strptime()
448 return rk_UNCONST(buf); in strptime()