line |
true |
false |
branch |
298
|
0 |
0 |
if (!gmt_is_set) { |
323
|
0 |
0 |
return (y >= 0) ? (y / 4 - y / 100 + y / 400) : |
344
|
0 |
0 |
i = (sp == NULL) ? 0 : sp->leapcnt; |
345
|
0 |
0 |
while (--i >= 0) { |
347
|
0 |
0 |
if (*timep >= lp->ls_trans) { |
348
|
0 |
0 |
if (*timep == lp->ls_trans) { |
349
|
0 |
0 |
hit = ((i == 0 && lp->ls_corr > 0) || |
|
0 |
0 |
hit = ((i == 0 && lp->ls_corr > 0) || |
|
0 |
0 |
hit = ((i == 0 && lp->ls_corr > 0) || |
351
|
0 |
0 |
if (hit) |
352
|
0 |
0 |
while (i > 0 && |
|
0 |
0 |
while (i > 0 && |
354
|
0 |
0 |
sp->lsis[i - 1].ls_trans + 1 && |
368
|
0 |
0 |
while (tdays < 0 || tdays >= year_lengths[isleap(y)]) { |
|
0 |
0 |
while (tdays < 0 || tdays >= year_lengths[isleap(y)]) { |
|
0 |
0 |
while (tdays < 0 || tdays >= year_lengths[isleap(y)]) { |
|
0 |
0 |
while (tdays < 0 || tdays >= year_lengths[isleap(y)]) { |
|
0 |
0 |
while (tdays < 0 || tdays >= year_lengths[isleap(y)]) { |
375
|
0 |
0 |
if (! ((! TYPE_SIGNED(time_t) || INT_MIN <= tdelta) |
|
0 |
0 |
if (! ((! TYPE_SIGNED(time_t) || INT_MIN <= tdelta) |
379
|
0 |
0 |
if (idelta == 0) |
380
|
0 |
0 |
idelta = (tdays < 0) ? -1 : 1; |
382
|
0 |
0 |
if (increment_overflow(&newy, idelta)) |
402
|
0 |
0 |
while (rem < 0) { |
406
|
0 |
0 |
while (rem >= SECSPERDAY) { |
410
|
0 |
0 |
while (idays < 0) { |
411
|
0 |
0 |
if (increment_overflow(&y, -1)) |
413
|
0 |
0 |
idays += year_lengths[isleap(y)]; |
|
0 |
0 |
idays += year_lengths[isleap(y)]; |
|
0 |
0 |
idays += year_lengths[isleap(y)]; |
415
|
0 |
0 |
while (idays >= year_lengths[isleap(y)]) { |
|
0 |
0 |
while (idays >= year_lengths[isleap(y)]) { |
|
0 |
0 |
while (idays >= year_lengths[isleap(y)]) { |
|
0 |
0 |
while (idays >= year_lengths[isleap(y)]) { |
416
|
0 |
0 |
idays -= year_lengths[isleap(y)]; |
|
0 |
0 |
idays -= year_lengths[isleap(y)]; |
|
0 |
0 |
idays -= year_lengths[isleap(y)]; |
417
|
0 |
0 |
if (increment_overflow(&y, 1)) |
421
|
0 |
0 |
if (increment_overflow(&tmp->tm_year, -TM_YEAR_BASE)) |
434
|
0 |
0 |
if (tmp->tm_wday < 0) |
444
|
0 |
0 |
ip = mon_lengths[isleap(y)]; |
|
0 |
0 |
ip = mon_lengths[isleap(y)]; |
|
0 |
0 |
ip = mon_lengths[isleap(y)]; |
445
|
0 |
0 |
for (tmp->tm_mon = 0; idays >= ip[tmp->tm_mon]; ++(tmp->tm_mon)) |
483
|
0 |
0 |
if ((i >= 0) ? (j > INT_MAX - i) : (j < INT_MIN - i)) |
|
0 |
0 |
if ((i >= 0) ? (j > INT_MAX - i) : (j < INT_MIN - i)) |
494
|
0 |
0 |
if ((l >= 0) ? (m > INT_FAST32_MAX - l) : (m < INT_FAST32_MIN - l)) |
|
0 |
0 |
if ((l >= 0) ? (m > INT_FAST32_MAX - l) : (m < INT_FAST32_MIN - l)) |
506
|
0 |
0 |
(*unitsptr / base) : |
519
|
0 |
0 |
(*unitsptr / base) : |
531
|
0 |
0 |
if (atmp->tm_year != btmp->tm_year) |
532
|
0 |
0 |
return atmp->tm_year < btmp->tm_year ? -1 : 1; |
533
|
0 |
0 |
if ((result = (atmp->tm_mon - btmp->tm_mon)) == 0 && |
|
0 |
0 |
if ((result = (atmp->tm_mon - btmp->tm_mon)) == 0 && |
534
|
0 |
0 |
(result = (atmp->tm_mday - btmp->tm_mday)) == 0 && |
535
|
0 |
0 |
(result = (atmp->tm_hour - btmp->tm_hour)) == 0 && |
562
|
0 |
0 |
if (do_norm_secs) { |
563
|
0 |
0 |
if (normalize_overflow(&yourtm.tm_min, &yourtm.tm_sec, |
567
|
0 |
0 |
if (normalize_overflow(&yourtm.tm_hour, &yourtm.tm_min, MINSPERHOUR)) |
569
|
0 |
0 |
if (normalize_overflow(&yourtm.tm_mday, &yourtm.tm_hour, HOURSPERDAY)) |
572
|
0 |
0 |
if (normalize_overflow32(&y, &yourtm.tm_mon, MONSPERYEAR)) |
578
|
0 |
0 |
if (increment_overflow32(&y, TM_YEAR_BASE)) |
580
|
0 |
0 |
while (yourtm.tm_mday <= 0) { |
581
|
0 |
0 |
if (increment_overflow32(&y, -1)) |
584
|
0 |
0 |
yourtm.tm_mday += year_lengths[isleap(li)]; |
|
0 |
0 |
yourtm.tm_mday += year_lengths[isleap(li)]; |
|
0 |
0 |
yourtm.tm_mday += year_lengths[isleap(li)]; |
586
|
0 |
0 |
while (yourtm.tm_mday > DAYSPERLYEAR) { |
588
|
0 |
0 |
yourtm.tm_mday -= year_lengths[isleap(li)]; |
|
0 |
0 |
yourtm.tm_mday -= year_lengths[isleap(li)]; |
|
0 |
0 |
yourtm.tm_mday -= year_lengths[isleap(li)]; |
589
|
0 |
0 |
if (increment_overflow32(&y, 1)) |
593
|
0 |
0 |
i = mon_lengths[isleap(y)][yourtm.tm_mon]; |
|
0 |
0 |
i = mon_lengths[isleap(y)][yourtm.tm_mon]; |
|
0 |
0 |
i = mon_lengths[isleap(y)][yourtm.tm_mon]; |
594
|
0 |
0 |
if (yourtm.tm_mday <= i) |
597
|
0 |
0 |
if (++yourtm.tm_mon >= MONSPERYEAR) { |
599
|
0 |
0 |
if (increment_overflow32(&y, 1)) |
603
|
0 |
0 |
if (increment_overflow32(&y, -TM_YEAR_BASE)) |
606
|
0 |
0 |
if (yourtm.tm_year != y) |
608
|
0 |
0 |
if (yourtm.tm_sec >= 0 && yourtm.tm_sec < SECSPERMIN) |
|
0 |
0 |
if (yourtm.tm_sec >= 0 && yourtm.tm_sec < SECSPERMIN) |
610
|
0 |
0 |
else if (y + TM_YEAR_BASE < EPOCH_YEAR) { |
619
|
0 |
0 |
if (increment_overflow(&yourtm.tm_sec, 1 - SECSPERMIN)) |
635
|
0 |
0 |
for (i = 0; i < (int) TYPE_BIT(time_t) - 1; ++i) |
641
|
0 |
0 |
if (t < lo) |
643
|
0 |
0 |
else if (t > hi) |
645
|
0 |
0 |
if ((*funcp)(&t, offset, &mytm) == NULL) { |
651
|
0 |
0 |
dir = (t > 0) ? 1 : -1; |
653
|
0 |
0 |
if (dir != 0) { |
654
|
0 |
0 |
if (t == lo) { |
655
|
0 |
0 |
if (t == time_t_max) |
659
|
0 |
0 |
} else if (t == hi) { |
660
|
0 |
0 |
if (t == time_t_min) |
665
|
0 |
0 |
if (lo > hi) |
667
|
0 |
0 |
if (dir > 0) |
672
|
0 |
0 |
if (yourtm.tm_isdst < 0 || mytm.tm_isdst == yourtm.tm_isdst) |
|
0 |
0 |
if (yourtm.tm_isdst < 0 || mytm.tm_isdst == yourtm.tm_isdst) |
681
|
0 |
0 |
if (sp == NULL) |
683
|
0 |
0 |
for (i = sp->typecnt - 1; i >= 0; --i) { |
684
|
0 |
0 |
if (sp->ttis[i].tt_isdst != yourtm.tm_isdst) |
686
|
0 |
0 |
for (j = sp->typecnt - 1; j >= 0; --j) { |
687
|
0 |
0 |
if (sp->ttis[j].tt_isdst == yourtm.tm_isdst) |
691
|
0 |
0 |
if ((*funcp)(&newt, offset, &mytm) == NULL) |
693
|
0 |
0 |
if (tmcomp(&mytm, &yourtm) != 0) |
695
|
0 |
0 |
if (mytm.tm_isdst != yourtm.tm_isdst) |
708
|
0 |
0 |
if ((newt < t) != (saved_seconds < 0)) |
711
|
0 |
0 |
if ((*funcp)(&t, offset, tmp)) |
730
|
0 |
0 |
return *okayp ? t : time2sub(tmp, funcp, offset, okayp, true); |
748
|
0 |
0 |
if (tmp == NULL) { |
752
|
0 |
0 |
if (tmp->tm_isdst > 1) |
755
|
0 |
0 |
if (okay) |
757
|
0 |
0 |
if (tmp->tm_isdst < 0) |
773
|
0 |
0 |
if (sp == NULL) |
775
|
0 |
0 |
for (i = 0; i < sp->typecnt; ++i) |
778
|
0 |
0 |
for (i = sp->timecnt - 1; i >= 0; --i) |
779
|
0 |
0 |
if (!seen[sp->types[i]]) { |
783
|
0 |
0 |
for (sameind = 0; sameind < nseen; ++sameind) { |
785
|
0 |
0 |
if (sp->ttis[samei].tt_isdst != tmp->tm_isdst) |
787
|
0 |
0 |
for (otherind = 0; otherind < nseen; ++otherind) { |
789
|
0 |
0 |
if (sp->ttis[otheri].tt_isdst == tmp->tm_isdst) |
795
|
0 |
0 |
if (okay) |
808
|
0 |
0 |
if (tmp != NULL) |