Hi I noticed that the last line of a zone file like # Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Asia/Kabul 4:36:48 - LMT 1890 4:00 - +04 1945 4:30 - +0430 does not suffer a trailing TAB character, behind the +0430 I think the zone file compiling mechanism could be a bit more tolerant of trailing white space. The issue came about because I employ a zone file generator utility, which accidentally created such trailing tabs in some cases. I fixed my generator, but wanted to mention this anyway.
On 4/1/22 09:33, Alois Treindl via tz wrote:
I noticed that the last line of a zone file like
# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Asia/Kabul 4:36:48 - LMT 1890 4:00 - +04 1945 4:30 - +0430
does not suffer a trailing TAB character, behind the +0430 I'm not seeing the problem. When I run 'zic -d . kabul.zi', where kabul.zi is the attached file, zic creates a file Asia/Kabul that looks correct (also attached). I'm using development-version zic.
Could you give a self-contained recipe for reproducing the problem that you're observing, including your zic version? Thanks.
On 4/1/22 10:27, Paul Eggert wrote:
does not suffer a trailing TAB character, behind the +0430 I'm not seeing the problem.
Although I'm still not seeing a problem with a trailing TAB, after staring at the code a bit I do see problems if the input contains a NUL byte, along with misleading diagnostics if the input ends in a non-newline and/or has a very long input line. Also, POSIX raised its line length limit from 512 to 2048 bytes, and zic's memory allocation can be simplified a bit. I installed the attached proposed patches to fix the issues I found. However, I don't think these changes will affect the problem you mentioned.
participants (2)
-
Alois Treindl -
Paul Eggert