Lines Matching refs:tmptr

681 mktime1(struct tm *tmptr, int usetz)
695 t = tmptr->tm_sec + SECSPERMIN * tmptr->tm_min +
696 SECSPERHOUR * tmptr->tm_hour +
697 SECSPERDAY * (tmptr->tm_mday - 1);
699 if (tmptr->tm_mon >= 12) {
700 tmptr->tm_year += tmptr->tm_mon / 12;
701 tmptr->tm_mon %= 12;
702 } else if (tmptr->tm_mon < 0) {
703 temp = -tmptr->tm_mon;
704 tmptr->tm_mon = 0; /* If tm_mon divides by 12. */
705 tmptr->tm_year -= (temp / 12);
707 tmptr->tm_year--;
708 tmptr->tm_mon = 12 - temp;
715 if (!year_is_cached || (cached_year != tmptr->tm_year)) {
716 cached_year = tmptr->tm_year;
724 if (isleap(tmptr->tm_year + TM_YEAR_BASE))
725 t += SECSPERDAY * __lyday_to_month[tmptr->tm_mon];
727 t += SECSPERDAY * __yday_to_month[tmptr->tm_mon];
739 t += (tmptr->tm_isdst > 0) ? altzone : timezone;
743 tmptr->tm_year < 1 || tmptr->tm_year > 138;
748 if (tmptr->tm_isdst < 0) {
822 *tmptr = _tm;
834 mktime(struct tm *tmptr)
836 return (mktime1(tmptr, TRUE));
840 timegm(struct tm *tmptr)
842 return (mktime1(tmptr, FALSE));
1188 offtime_u(time_t t, long offset, struct tm *tmptr)
1207 tmptr->tm_hour = (int)(rem / SECSPERHOUR);
1209 tmptr->tm_min = (int)(rem / SECSPERMIN);
1210 tmptr->tm_sec = (int)(rem % SECSPERMIN);
1212 tmptr->tm_wday = (int)((EPOCH_WDAY + days) % DAYSPERWEEK);
1213 if (tmptr->tm_wday < 0)
1214 tmptr->tm_wday += DAYSPERWEEK;
1227 tmptr->tm_year = (int)(y - TM_YEAR_BASE);
1228 tmptr->tm_yday = (int)days;
1230 for (tmptr->tm_mon = 0; days >=
1231 (long)ip[tmptr->tm_mon]; ++(tmptr->tm_mon)) {
1232 days = days - (long)ip[tmptr->tm_mon];
1234 tmptr->tm_mday = (int)(days + 1);
1235 tmptr->tm_isdst = 0;
1245 return (tmptr);