goahead and goback
Arthur David Olson
olsona at lecserver.nci.nih.gov
Tue Jan 15 18:34:26 UTC 2008
This is the type of change needed to handle Pacific Presidential Election Time.
--ado
------- localtime.c -------
*** /tmp/geta22490 Tue Jan 15 13:31:40 2008
--- /tmp/getb22490 Tue Jan 15 13:31:40 2008
***************
*** 5,11 ****
#ifndef lint
#ifndef NOID
! static char elsieid[] = "@(#)localtime.c 8.8";
#endif /* !defined NOID */
#endif /* !defined lint */
--- 5,11 ----
#ifndef lint
#ifndef NOID
! static char elsieid[] = "@(#)localtime.c 8.9";
#endif /* !defined NOID */
#endif /* !defined lint */
***************
*** 555,570 ****
sp->ttis[sp->typecnt++] = ts.ttis[1];
}
}
! i = 2 * YEARSPERREPEAT;
! sp->goback = sp->goahead = sp->timecnt > i;
! sp->goback = sp->goback &&
! typesequiv(sp, sp->types[i], sp->types[0]) &&
! differ_by_repeat(sp->ats[i], sp->ats[0]);
! sp->goahead = sp->goahead &&
! typesequiv(sp, sp->types[sp->timecnt - 1],
! sp->types[sp->timecnt - 1 - i]) &&
! differ_by_repeat(sp->ats[sp->timecnt - 1],
! sp->ats[sp->timecnt - 1 - i]);
return 0;
}
--- 555,577 ----
sp->ttis[sp->typecnt++] = ts.ttis[1];
}
}
! sp->goback = sp->goahead = FALSE;
! if (sp->timecnt > 1) {
! for (i = 1; i < sp->timecnt; ++i)
! if (typesequiv(sp, sp->types[i], sp->types[0]) &&
! differ_by_repeat(sp->ats[i], sp->ats[0])) {
! sp->goback = TRUE;
! break;
! }
! for (i = sp->timecnt - 2; i >= 0; --i)
! if (typesequiv(sp, sp->types[sp->timecnt - 1],
! sp->types[i]) &&
! differ_by_repeat(sp->ats[sp->timecnt - 1],
! sp->ats[i])) {
! sp->goahead = TRUE;
! break;
! }
! }
return 0;
}
More information about the tz
mailing list