On 01/14/2016 10:18 AM, Steve Summit wrote:
* Would you mind if we changed "if(" to "if (" ... Not at all. (Not my style, but I truly don't care.)
OK, thanks, attached are a few followup patches. The first adjusts white space, the second fixes a glitch I introduced earlier. The test cases still fail, though. I wonder why they fail for me and not for you? Some more things I noticed. testsuite.c assumes time_t is equivalent to long, by using the %ld printf format to print it. That's not portable. time_t might have a different width from long, and time_t might be unsigned. zdump.c's tformat function gets it right. Adding 1900 to tm_year can overflow, if tm_year is close to INT_MAX. quick_timegm is full of gotchas like that. As it's not needed and is likely to have bugs in testing, how about if we remove it? This is in the 3rd attached patch. The remaining uses of isleap have a similar problem. It would be better to use isleap_sum; see tzfile.h.