Date: Sun, 2 May 2004 04:25:37 -0700 (PDT) From: "Tim J. Robbins" <tjr@FreeBSD.org> To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/bin/ls extern.h ls.1 print.c util.c Message-ID: <200405021125.i42BPbNk027010@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
tjr 2004/05/02 04:25:37 PDT
FreeBSD src repository
Modified files:
bin/ls extern.h ls.1 print.c util.c
Log:
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.
Revision Changes Path
1.23 +1 -0 src/bin/ls/extern.h
1.80 +1 -5 src/bin/ls/ls.1
1.71 +2 -1 src/bin/ls/print.c
1.34 +130 -61 src/bin/ls/util.c
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200405021125.i42BPbNk027010>
