Lines Matching refs:buf

54 __strptime(const char *_RESTRICT_KYWD buf, const char *_RESTRICT_KYWD fmt,
70 if (*buf == 0)
77 while (isspace(*buf))
78 buf++;
79 else if (c != *buf++)
91 if (*buf++ != '%')
96 buf = __strptime(buf, tptr->date_fmt, tm, flagsp, loc);
97 if (buf == NULL)
102 if (!isdigit(*buf))
107 for (i = 0; len && isdigit(*buf); buf++) {
109 i += *buf - '0';
119 buf = __strptime(buf, tptr->c_fmt, tm, flagsp, loc);
120 if (buf == NULL)
125 buf = __strptime(buf, "%m/%d/%y", tm, flagsp, loc);
126 if (buf == NULL)
143 buf = __strptime(buf, "%Y-%m-%d", tm, flagsp, loc);
144 if (buf == NULL)
149 buf = __strptime(buf, "%H:%M", tm, flagsp, loc);
150 if (buf == NULL)
155 buf = __strptime(buf, tptr->ampm_fmt, tm, flagsp, loc);
156 if (buf == NULL)
161 buf = __strptime(buf, "%H:%M:%S", tm, flagsp, loc);
162 if (buf == NULL)
167 buf = __strptime(buf, tptr->X_fmt, tm, flagsp, loc);
168 if (buf == NULL)
173 buf = __strptime(buf, tptr->x_fmt, tm, flagsp, loc);
174 if (buf == NULL)
179 if (!isdigit(*buf))
183 for (i = 0; len && isdigit(*buf); buf++) {
185 i += *buf - '0';
196 if (*buf == 0 || isspace(*buf))
199 if (!isdigit(*buf))
203 for (i = 0; len && isdigit(*buf); buf++) {
205 i += *buf - '0';
233 if (!isdigit(*buf))
237 for (i = 0; len && isdigit(*buf); buf++) {
239 i += *buf - '0';
258 if (strncasecmp(buf, tptr->am, len) == 0) {
263 buf += len;
268 if (strncasecmp(buf, tptr->pm, len) == 0) {
273 buf += len;
283 if (strncasecmp(buf, tptr->weekday[i], len) ==
287 if (strncasecmp(buf, tptr->wday[i], len) == 0)
294 buf += len;
305 if (!isdigit(*buf))
309 for (i = 0; len && isdigit(*buf); buf++) {
311 i += *buf - '0';
320 if (!isdigit(*buf))
323 i = *buf - '0';
337 if (isspace(*buf))
338 buf++;
347 if (!isdigit(*buf))
351 for (i = 0; len && isdigit(*buf); buf++) {
353 i += *buf - '0';
368 if (strncasecmp(buf, tptr->month[i], len) == 0)
378 if (strncasecmp(buf, tptr->mon[i],
387 buf += len;
391 if (!isdigit(*buf))
395 for (i = 0; len && isdigit(*buf); buf++) {
397 i += *buf - '0';
415 t = strtol(buf, &cp, 10);
421 buf = cp;
429 if (*buf == NULL || isspace(*buf))
432 if (!isdigit(*buf))
436 for (i = 0; len && isdigit(*buf); buf++) {
438 i += *buf - '0';
454 const char *cp = buf;
459 if (cp - buf) {
460 zonestr = alloca(cp - buf + 1);
461 (void) strncpy(zonestr, buf, cp - buf);
462 zonestr[cp - buf] = '\0';
473 buf += cp - buf;
482 if (*buf != '+') {
483 if (*buf == '-')
488 buf++;
491 if (!isdigit(*buf))
494 i += *buf - '0';
495 buf++;
505 while (isspace(*buf))
506 buf++;
512 if (buf && (*flagsp & F_GMT)) {
518 return ((char *)buf);
522 strptime(const char *_RESTRICT_KYWD buf, const char *_RESTRICT_KYWD fmt,
529 return (__strptime(buf, fmt, tm, &flags, uselocale(NULL)));
537 __strptime_dontzero(const char *_RESTRICT_KYWD buf,
542 return (__strptime(buf, fmt, tm, &flags, uselocale(NULL)));
556 strptime_l(const char *_RESTRICT_KYWD buf, const char *_RESTRICT_KYWD fmt,
563 return (__strptime(buf, fmt, tm, &flags, loc));