Lines Matching refs:pt
193 _fmt(const char *format, const struct tm *t, char *pt, in _fmt() argument
205 pt = _add((t->tm_wday < 0 || in _fmt()
208 pt, ptlim, modifier); in _fmt()
211 pt = _add((t->tm_wday < 0 || in _fmt()
214 pt, ptlim, modifier); in _fmt()
217 pt = _add((t->tm_mon < 0 || in _fmt()
220 pt, ptlim, modifier); in _fmt()
224 pt = _add((t->tm_mon < 0 || in _fmt()
227 pt, ptlim, modifier); in _fmt()
237 pt = _yconv(t->tm_year, TM_YEAR_BASE, in _fmt()
238 true, false, pt, ptlim, modifier); in _fmt()
244 pt = _fmt(Locale->c_fmt, t, pt, ptlim, &warn2); in _fmt()
252 pt = _fmt("%m/%d/%y", t, pt, ptlim, warnp); in _fmt()
255 … pt = _conv(t->tm_mday, getformat(modifier, "%02d", "%2d", "%d", "%02d"), pt, ptlim); in _fmt()
277 pt = _conv(t->tm_mday, getformat(modifier, "%2d", "%2d", "%d", "%02d"), pt, ptlim); in _fmt()
280 pt = _fmt("%Y-%m-%d", t, pt, ptlim, warnp); in _fmt()
283 pt = _conv(t->tm_hour, getformat(modifier, "%02d", "%2d", "%d", "%02d"), pt, ptlim); in _fmt()
286 pt = _conv((t->tm_hour % 12) ? in _fmt()
288 getformat(modifier, "%02d", "%2d", "%d", "%02d"), pt, ptlim); in _fmt()
291 … pt = _conv(t->tm_yday + 1, getformat(modifier, "%03d", "%3d", "%d", "%03d"), pt, ptlim); in _fmt()
304 pt = _conv(t->tm_hour, getformat(modifier, "%2d", "%2d", "%d", "%02d"), pt, ptlim); in _fmt()
311 pt = _add("kitchen sink", pt, ptlim); in _fmt()
324 pt = _conv((t->tm_hour % 12) ? in _fmt()
326 getformat(modifier, "%2d", "%2d", "%d", "%02d"), pt, ptlim); in _fmt()
329 pt = _conv(t->tm_min, getformat(modifier, "%02d", "%2d", "%d", "%02d"), pt, ptlim); in _fmt()
332 … pt = _conv(t->tm_mon + 1, getformat(modifier, "%02d", "%2d", "%d", "%02d"), pt, ptlim); in _fmt()
335 pt = _add("\n", pt, ptlim, modifier); in _fmt()
339 pt = _add((t->tm_hour >= (HOURSPERDAY / 2)) ? in _fmt()
342 pt, ptlim, (*format == 'P') ? FORCE_LOWER_CASE : modifier); in _fmt()
345 pt = _fmt("%H:%M", t, pt, ptlim, warnp); in _fmt()
348 pt = _fmt("%I:%M:%S %p", t, pt, ptlim, warnp); in _fmt()
351 pt = _conv(t->tm_sec, getformat(modifier, "%02d", "%2d", "%d", "%02d"), pt, ptlim); in _fmt()
367 pt = _add(buf, pt, ptlim, modifier); in _fmt()
371 pt = _fmt("%H:%M:%S", t, pt, ptlim, warnp); in _fmt()
374 pt = _add("\t", pt, ptlim, modifier); in _fmt()
377 pt = _conv((t->tm_yday + DAYSPERWEEK - in _fmt()
379 getformat(modifier, "%02d", "%2d", "%d", "%02d"), pt, ptlim); in _fmt()
388 pt = _conv((t->tm_wday == 0) ? in _fmt()
390 "%d", pt, ptlim); in _fmt()
470 pt = _conv(w, getformat(modifier, "%02d", "%2d", "%d", "%02d"), in _fmt()
471 pt, ptlim); in _fmt()
474 pt = _yconv(year, base, in _fmt()
476 pt, ptlim, modifier); in _fmt()
477 } else pt = _yconv(year, base, in _fmt()
479 pt, ptlim, modifier); in _fmt()
488 pt = _fmt("%e-%b-%Y", t, pt, ptlim, warnp); in _fmt()
491 pt = _conv((t->tm_yday + DAYSPERWEEK - in _fmt()
495 getformat(modifier, "%02d", "%2d", "%d", "%02d"), pt, ptlim); in _fmt()
498 pt = _conv(t->tm_wday, "%d", pt, ptlim); in _fmt()
501 pt = _fmt(Locale->X_fmt, t, pt, ptlim, warnp); in _fmt()
507 pt = _fmt(Locale->x_fmt, t, pt, ptlim, &warn2); in _fmt()
516 pt = _yconv(t->tm_year, TM_YEAR_BASE, in _fmt()
518 pt, ptlim, modifier); in _fmt()
521 pt = _yconv(t->tm_year, TM_YEAR_BASE, in _fmt()
523 pt, ptlim, modifier); in _fmt()
541 pt = _add(zone, pt, ptlim, modifier); in _fmt()
546 pt = _add(tzname[t->tm_isdst != 0], in _fmt()
547 pt, ptlim); in _fmt()
601 pt = _add(sign, pt, ptlim, modifier); in _fmt()
605 pt = _conv(diff, getformat(modifier, "%04d", "%4d", "%d", "%04d"), pt, ptlim); in _fmt()
609 pt = _fmt(Locale->date_fmt, t, pt, ptlim, in _fmt()
622 if (pt == ptlim) in _fmt()
624 *pt++ = *format; in _fmt()
626 return pt; in _fmt()
630 _conv(int n, const char *format, char *pt, const char *ptlim) in _conv() argument
635 return _add(buf, pt, ptlim, 0); in _conv()
639 _add(const char *str, char *pt, const char *const ptlim, int modifier) in _add() argument
645 while (pt < ptlim && (*pt = tolower(*str++)) != '\0') { in _add()
646 ++pt; in _add()
651 while (pt < ptlim && (*pt = toupper(*str++)) != '\0') { in _add()
652 ++pt; in _add()
657 while (pt < ptlim && (c = *str++) != '\0') { in _add()
663 *pt = c; in _add()
664 ++pt; in _add()
670 while (pt < ptlim && (*pt = *str++) != '\0') { in _add()
671 ++pt; in _add()
675 return pt; in _add()
688 char *pt, const char *ptlim, int modifier) in _yconv() argument
706 pt = _add("-0", pt, ptlim, modifier); in _yconv()
707 else pt = _conv(lead, getformat(modifier, "%02d", "%2d", "%d", "%02d"), pt, ptlim); in _yconv()
710 …pt = _conv(((trail < 0) ? -trail : trail), getformat(modifier, "%02d", "%2d", "%d", "%02d"), pt, p… in _yconv()
711 return pt; in _yconv()