[tz] CRLF terminated leap-seconds.list fix

Brian Inglis Brian.Inglis at SystematicSw.ab.ca
Sat Jul 27 19:39:32 UTC 2019

On 2019-07-26 23:47, Chris Woodbury via tz wrote:
> NIST has yet again generated a leap-seconds.list file with CRLF line
> terminations. If the file is transferred in FTP binary mode and used, it
> breaks leapseconds.awk.
> Using int() around the last column variable eliminates this problem.
> Therefore, I propose the attached patch.

A clearer, more awkish, idiomatic approach would be to add a BEGIN rule which
prefixes the record separator RS with (an) optional return(s):

	BEGIN { RS = "\r?\n" }
	BEGIN { RS = "\r*\n" }

Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

This email may be disturbing to some readers as it contains
too much technical detail. Reader discretion is advised.

More information about the tz mailing list