[tz] tabs vs spaces

James Cloos cloos at jhcloos.com
Wed May 1 23:51:50 UTC 2013


>>>>> "GH" == Guy Harris <guy at alum.mit.edu> writes:

GH> If you mean "not all white space characters are valid separators", I
GH> suspect that none of Vertical Tab, Carriage Return, or Line Feed/New
GH> Line would be considered valid separators,

zic.c uses isascii(3) and isspace(3), so it is libc and locale dependent,
although in practice the use of isascii(3) should minimize that dependence.
Maybe even eliminate it.

In the C and POSIX locales, ' ', '\f', '\n', '\r', '\t' and '\v'
all are valid whitespace, as confirmed by various man pages.  The
freebsd man page notes that that definition comes from ISO C90.

By the time getfields() is called, the buffer is limited to one line,
so '\n' would never be seen.  Strings of any of the rest will be treated
as token separators  Or initial or terminal white space, at the start
of end of the line.

-JimC
-- 
James Cloos <cloos at jhcloos.com>         OpenPGP: 1024D/ED7DAEA6


More information about the tz mailing list