On Wed, Oct 06, 2004 at 04:12:46PM -0700, Paul Eggert wrote:
OK, here's a proposed patch to the tz code. It is relative to the latest published code on elsie. It incorporates most of Arthur's patch circulated yesterday, except it addresses the issues I mentioned with C99IPMOD, with floating point, and with integer overflow checking; the resulting code uses int arithmetic instead of assuming that long and double are wider than int.
For the most part, I like it. Two things bother me a little though: 1) I think it's a shame that isleap_sum() needs the compiler to do a % more than isleap() does, but I certainly don't see any clean way of getting around this. (There are ways, but the cures I'm coming up with are all worse than the "disease".) Not a big deal, but I felt a need to mention it in case someone else does have a bright idea. 2) More importantly, I think that there are too many duplicate definitions in zdump.c. Given the comment about independence at the top of zdump.c this means that or tzfile.h should be broken up into two files: one which includes basic #define's such as isleap(), TM_YEAR_BASE, and SECSPERMIN (all conditionalized as zdump.c currently does), and the other which contains the more internals-specific definitions of tzcode.h. Attached is a patch, relative to Paul's most recent patch, which does this. --Ken Pizzini