Synchronise with FreeBSD:
authorJeroen Ruigrok/asmodai <asmodai@dragonflybsd.org>
Sun, 18 Sep 2005 18:35:23 +0000 (18:35 +0000)
committerJeroen Ruigrok/asmodai <asmodai@dragonflybsd.org>
Sun, 18 Sep 2005 18:35:23 +0000 (18:35 +0000)
commitaae9ea87f736cdd91c25858a9c2df58f35c6bfa2
tree787467e8095785da2ed1220672ddb70312f2b1d0
parent20d719bf84eac32b6aed550642707e33bfa61279
Synchronise with FreeBSD:

Treat filenames as multibyte character strings (according to the current
LC_CTYPE setting) when determining which characters are printable.
This is an often-requested feature.

Use wcwidth() to determine the number of column positions a character
takes up, although there are still a few places left where we assume
1 byte = 1 column position, e.g. line-wrapping when handling the -m option.

The error handling here is somewhat more complicated than usual: we do
our best to show what we can of a filename in the presence of conversion
errors, instead of simply aborting.
bin/ls/extern.h
bin/ls/print.c
bin/ls/util.c