Lines Matching refs:_tmbuf
526 static struct tm _tmbuf; variable
535 memset(&_tmbuf, 0, sizeof(_tmbuf)); /* get any nonstandard fields */
536 _tmbuf.tm_wday = (days + EPOCH_WDAY) % 7;
537 _tmbuf.tm_year = EPOCH_YEAR - TM_YEAR_BASE;
538 isleap = leap(_tmbuf.tm_year + TM_YEAR_BASE);
541 _tmbuf.tm_year++;
542 isleap = leap(_tmbuf.tm_year + TM_YEAR_BASE);
544 _tmbuf.tm_mon = 0;
545 _tmbuf.tm_yday = days;
546 while (days >= mon_lengths[isleap][_tmbuf.tm_mon])
547 days -= mon_lengths[isleap][_tmbuf.tm_mon++];
548 _tmbuf.tm_mday = days + 1;
549 _tmbuf.tm_isdst = 0;
550 _tmbuf.tm_sec = secs % SECSPERMIN;
551 _tmbuf.tm_min = (secs / SECSPERMIN) % SECSPERMIN;
552 _tmbuf.tm_hour = secs / SECSPERHOUR;
553 return &_tmbuf;