Lines Matching defs:tmptr
694 mktime(struct tm *tmptr)
708 t = tmptr->tm_sec + SECSPERMIN * tmptr->tm_min +
709 SECSPERHOUR * tmptr->tm_hour +
710 SECSPERDAY * (tmptr->tm_mday - 1);
712 if (tmptr->tm_mon >= 12) {
713 tmptr->tm_year += tmptr->tm_mon / 12;
714 tmptr->tm_mon %= 12;
715 } else if (tmptr->tm_mon < 0) {
716 temp = -tmptr->tm_mon;
717 tmptr->tm_mon = 0; /* If tm_mon divides by 12. */
718 tmptr->tm_year -= (temp / 12);
720 tmptr->tm_year--;
721 tmptr->tm_mon = 12 - temp;
728 if (!year_is_cached || (cached_year != tmptr->tm_year)) {
729 cached_year = tmptr->tm_year;
737 if (isleap(tmptr->tm_year + TM_YEAR_BASE))
738 t += SECSPERDAY * __lyday_to_month[tmptr->tm_mon];
740 t += SECSPERDAY * __yday_to_month[tmptr->tm_mon];
745 t += (tmptr->tm_isdst > 0) ? altzone : timezone;
749 tmptr->tm_year < 1 || tmptr->tm_year > 138;
754 if (tmptr->tm_isdst < 0) {
810 *tmptr = _tm;
1276 offtime_u(int64_t t, long offset, struct tm *tmptr)
1295 tmptr->tm_hour = (int)(rem / SECSPERHOUR);
1297 tmptr->tm_min = (int)(rem / SECSPERMIN);
1298 tmptr->tm_sec = (int)(rem % SECSPERMIN);
1300 tmptr->tm_wday = (int)((EPOCH_WDAY + days) % DAYSPERWEEK);
1301 if (tmptr->tm_wday < 0)
1302 tmptr->tm_wday += DAYSPERWEEK;
1315 tmptr->tm_year = (int)(y - TM_YEAR_BASE);
1316 tmptr->tm_yday = (int)days;
1318 for (tmptr->tm_mon = 0; days >=
1319 (long)ip[tmptr->tm_mon]; ++(tmptr->tm_mon)) {
1320 days = days - (long)ip[tmptr->tm_mon];
1322 tmptr->tm_mday = (int)(days + 1);
1323 tmptr->tm_isdst = 0;
1333 return (tmptr);