Lines Matching defs:tmp
1497 struct tm *const tmp)
1506 return gmtsub(gmtptr, timep, 0, tmp);
1532 result = localsub(sp, &newt, setname, tmp);
1575 ** timesub(&t, 0L, sp, tmp);
1577 result = timesub(&t, ttisp->tt_utoff, sp, tmp);
1593 struct tm *restrict tmp)
1595 return localsub(sp, timep, 0, tmp);
1601 localtime_tzset(time_t const *timep, struct tm *tmp, bool setname)
1610 tmp = localsub(lclptr, timep, setname, tmp);
1612 return tmp;
1625 localtime_r(const time_t *restrict timep, struct tm *restrict tmp)
1627 return localtime_tzset(timep, tmp, false);
1636 int_fast32_t offset, struct tm *tmp)
1640 result = timesub(timep, offset, gmtptr, tmp);
1647 tmp->TM_ZONE = ((char *)
1658 gmtime_r(time_t const *restrict timep, struct tm *restrict tmp)
1661 return gmtsub(gmtptr, timep, 0, tmp);
1712 const struct state *sp, struct tm *tmp)
1776 if (ckd_add(&tmp->tm_year, y, -TM_YEAR_BASE)) {
1783 tmp->tm_year = signed_y - TM_YEAR_BASE;
1786 tmp->tm_year = y - TM_YEAR_BASE;
1792 tmp->tm_yday = idays;
1796 tmp->tm_wday = (TM_WDAY_BASE
1797 + ((tmp->tm_year % DAYSPERWEEK)
1802 tmp->tm_wday %= DAYSPERWEEK;
1803 if (tmp->tm_wday < 0)
1804 tmp->tm_wday += DAYSPERWEEK;
1805 tmp->tm_hour = rem / SECSPERHOUR;
1807 tmp->tm_min = rem / SECSPERMIN;
1808 tmp->tm_sec = rem % SECSPERMIN;
1812 tmp->tm_sec += secs_since_posleap <= tmp->tm_sec;
1815 for (tmp->tm_mon = 0; idays >= ip[tmp->tm_mon]; ++(tmp->tm_mon))
1816 idays -= ip[tmp->tm_mon];
1817 tmp->tm_mday = idays + 1;
1818 tmp->tm_isdst = 0;
1820 tmp->TM_GMTOFF = offset;
1822 return tmp;
1956 time2sub(struct tm *const tmp,
1976 mktmcpy(&yourtm, tmp);
2155 if (funcp(sp, &t, offset, tmp))
2161 time2(struct tm * const tmp,
2175 t = time2sub(tmp, funcp, sp, offset, okayp, false);
2176 return *okayp ? t : time2sub(tmp, funcp, sp, offset, okayp, true);
2180 time1(struct tm *const tmp,
2195 if (tmp == NULL) {
2199 if (tmp->tm_isdst > 1)
2200 tmp->tm_isdst = 1;
2201 t = time2(tmp, funcp, sp, offset, &okay);
2204 if (tmp->tm_isdst < 0)
2209 tmp->tm_isdst = 0; /* reset to std and try again */
2231 if (sp->ttis[samei].tt_isdst != tmp->tm_isdst)
2235 if (sp->ttis[otheri].tt_isdst == tmp->tm_isdst)
2237 tmp->tm_sec += (sp->ttis[otheri].tt_utoff
2239 tmp->tm_isdst = !tmp->tm_isdst;
2240 t = time2(tmp, funcp, sp, offset, &okay);
2243 tmp->tm_sec -= (sp->ttis[otheri].tt_utoff
2245 tmp->tm_isdst = !tmp->tm_isdst;
2252 mktime_tzname(struct state *sp, struct tm *tmp, bool setname)
2255 return time1(tmp, localsub, sp, setname);
2258 return time1(tmp, gmtsub, gmtptr, 0);
2265 mktime_z(struct state *restrict sp, struct tm *restrict tmp)
2267 return mktime_tzname(sp, tmp, false);
2273 mktime(struct tm *tmp)
2282 t = mktime_tzname(lclptr, tmp, true);
2291 timelocal(struct tm *tmp)
2293 if (tmp != NULL)
2294 tmp->tm_isdst = -1; /* in case it wasn't initialized */
2295 return mktime(tmp);
2309 timeoff(struct tm *tmp, long offset)
2311 if (tmp)
2312 tmp->tm_isdst = 0;
2314 return time1(tmp, gmtsub, gmtptr, offset);
2318 timegm(struct tm *tmp)
2322 mktmcpy(&tmcpy, tmp);
2326 *tmp = tmcpy;