Lines Matching refs:buf
79 _strptime(const char *buf, const char *fmt, struct tm *tm, int *GMTp, in _strptime() argument
103 while (*buf != 0 && in _strptime()
104 isspace_l((unsigned char)*buf, locale)) in _strptime()
105 buf++; in _strptime()
106 else if (c != *buf++) in _strptime()
117 if (*buf++ != '%') in _strptime()
122 buf = _strptime(buf, tptr->date_fmt, tm, GMTp, locale); in _strptime()
123 if (buf == NULL) in _strptime()
129 if (!isdigit_l((unsigned char)*buf, locale)) in _strptime()
134 for (i = 0; len && *buf != 0 && in _strptime()
135 isdigit_l((unsigned char)*buf, locale); buf++) { in _strptime()
137 i += *buf - '0'; in _strptime()
149 buf = _strptime(buf, tptr->c_fmt, tm, GMTp, locale); in _strptime()
150 if (buf == NULL) in _strptime()
156 buf = _strptime(buf, "%m/%d/%y", tm, GMTp, locale); in _strptime()
157 if (buf == NULL) in _strptime()
175 buf = _strptime(buf, "%Y-%m-%d", tm, GMTp, locale); in _strptime()
176 if (buf == NULL) in _strptime()
182 buf = _strptime(buf, "%H:%M", tm, GMTp, locale); in _strptime()
183 if (buf == NULL) in _strptime()
188 buf = _strptime(buf, tptr->ampm_fmt, tm, GMTp, locale); in _strptime()
189 if (buf == NULL) in _strptime()
194 buf = _strptime(buf, "%H:%M:%S", tm, GMTp, locale); in _strptime()
195 if (buf == NULL) in _strptime()
200 buf = _strptime(buf, tptr->X_fmt, tm, GMTp, locale); in _strptime()
201 if (buf == NULL) in _strptime()
206 buf = _strptime(buf, tptr->x_fmt, tm, GMTp, locale); in _strptime()
207 if (buf == NULL) in _strptime()
213 if (!isdigit_l((unsigned char)*buf, locale)) in _strptime()
217 for (i = 0; len && *buf != 0 && in _strptime()
218 isdigit_l((unsigned char)*buf, locale); buf++){ in _strptime()
220 i += *buf - '0'; in _strptime()
233 if (*buf == 0 || in _strptime()
234 isspace_l((unsigned char)*buf, locale)) in _strptime()
237 if (!isdigit_l((unsigned char)*buf, locale)) in _strptime()
241 for (i = 0; len && *buf != 0 && in _strptime()
242 isdigit_l((unsigned char)*buf, locale); buf++){ in _strptime()
244 i += *buf - '0'; in _strptime()
272 if (!isdigit_l((unsigned char)*buf, locale)) in _strptime()
276 for (i = 0; len && *buf != 0 && in _strptime()
277 isdigit_l((unsigned char)*buf, locale); buf++) { in _strptime()
279 i += *buf - '0'; in _strptime()
298 if (strncasecmp_l(buf, tptr->am, len, locale) == 0) { in _strptime()
303 buf += len; in _strptime()
308 if (strncasecmp_l(buf, tptr->pm, len, locale) == 0) { in _strptime()
313 buf += len; in _strptime()
323 if (strncasecmp_l(buf, tptr->weekday[i], in _strptime()
327 if (strncasecmp_l(buf, tptr->wday[i], in _strptime()
334 buf += len; in _strptime()
347 if (!isdigit_l((unsigned char)*buf, locale)) in _strptime()
351 for (i = 0; len && *buf != 0 && in _strptime()
352 isdigit_l((unsigned char)*buf, locale); buf++) { in _strptime()
354 i += *buf - '0'; in _strptime()
371 if (!isdigit_l((unsigned char)*buf, locale)) in _strptime()
374 i = *buf - '0'; in _strptime()
375 buf++; in _strptime()
389 if (*buf != 0 && in _strptime()
390 isspace_l((unsigned char)*buf, locale)) in _strptime()
391 buf++; in _strptime()
403 if (!isdigit_l((unsigned char)*buf, locale)) in _strptime()
407 for (i = 0; len && *buf != 0 && in _strptime()
408 isdigit_l((unsigned char)*buf, locale); buf++) { in _strptime()
410 i += *buf - '0'; in _strptime()
428 if (strncasecmp_l(buf, in _strptime()
435 if (strncasecmp_l(buf, tptr->month[i], in _strptime()
447 if (strncasecmp_l(buf, tptr->mon[i], in _strptime()
456 buf += len; in _strptime()
462 if (!isdigit_l((unsigned char)*buf, locale)) in _strptime()
466 for (i = 0; len && *buf != 0 && in _strptime()
467 isdigit_l((unsigned char)*buf, locale); buf++) { in _strptime()
469 i += *buf - '0'; in _strptime()
489 n = strtol_l(buf, &cp, 10, locale); in _strptime()
495 buf = cp; in _strptime()
506 if (*buf == 0 || in _strptime()
507 isspace_l((unsigned char)*buf, locale)) in _strptime()
510 if (!isdigit_l((unsigned char)*buf, locale)) in _strptime()
514 for (i = 0; len && *buf != 0 && in _strptime()
515 isdigit_l((unsigned char)*buf, locale); buf++) { in _strptime()
517 i += *buf - '0'; in _strptime()
537 for (cp = buf; *cp && in _strptime()
540 if (cp - buf) { in _strptime()
541 zonestr = alloca(cp - buf + 1); in _strptime()
542 strncpy(zonestr, buf, cp - buf); in _strptime()
543 zonestr[cp - buf] = '\0'; in _strptime()
555 buf += cp - buf; in _strptime()
565 if (*buf != '+') { in _strptime()
566 if (*buf == '-') in _strptime()
568 else if (*buf == 'Z') /* ISO 8601 Z (UTC) */ in _strptime()
574 buf++; in _strptime()
577 if (isdigit_l((unsigned char)*buf, locale)) { in _strptime()
579 i += *buf - '0'; in _strptime()
580 buf++; in _strptime()
581 } else if (*buf == ':' && len == 2) { in _strptime()
582 buf++; /* ISO 8601 +hh:mm */ in _strptime()
583 if (isdigit_l((unsigned char)*buf, in _strptime()
586 i += *buf - '0'; in _strptime()
587 buf++; in _strptime()
607 while (isspace_l((unsigned char)*buf, locale)) in _strptime()
608 buf++; in _strptime()
674 return ((char *)buf); in _strptime()
678 strptime_l(const char * __restrict buf, const char * __restrict fmt, in strptime_l() argument
686 ret = _strptime(buf, fmt, tm, &gmt, loc); in strptime_l()
697 strptime(const char * __restrict buf, const char * __restrict fmt, in strptime() argument
700 return strptime_l(buf, fmt, tm, __get_locale()); in strptime()