master
Support UTF-8: use wcwidth(3) for column adjustment and replace non-printable Unicode codepoints and invalid bytes with ASCII question marks. No change for the SMALL version.
Replace use of the old BSD st_*timensec members in struct stat with the POSIX-standard st_*tim.tv_nsec members.
Unify wording for LC_CTYPE in ENVIRONMENT: * Consistently use "character encoding locale" as suggested by stsp@. * Resolve various gratuitious wording variations. OK jmc@.
Simplify the display() function by getting rid of a useless buffer on the stack. No functional change, +8 -15 LOC.
Improve horizontal alignment in long format when printing minor device numbers greater than 999 by measuring the two widths needed for device numbers just like it is already done for other numbers. In the output, this only changes whitespace, but not the text.
remove some unnecessary sys/cdefs.h inclusions
printtime: use the Unix epoch if the file's timestamp is invalid Fixes a crash in "ls -l" for files with bogus timestamp values. OK miod@ denis@
Fix a regression (and POSIX violation) introduced with UTF-8 support: When neither running on a terminal nor with -q, names must be passed through as they are, nothing must be replaced with question marks. Effectively, -q was always in effect. SMALL was not affected.