summaryrefslogtreecommitdiffstats
path: root/bin/ls/extern.h
diff options
context:
space:
mode:
authortjr <tjr@FreeBSD.org>2004-05-02 11:25:37 +0000
committertjr <tjr@FreeBSD.org>2004-05-02 11:25:37 +0000
commitde72f8ed4193914556f8e7266dc1f52706213d5b (patch)
tree33ababbec3452462cff8a64581a3fc9f628a2913 /bin/ls/extern.h
parent0342c52a187a490376a081f56bf3b22a229b7cd1 (diff)
downloadFreeBSD-src-de72f8ed4193914556f8e7266dc1f52706213d5b.zip
FreeBSD-src-de72f8ed4193914556f8e7266dc1f52706213d5b.tar.gz
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.
Diffstat (limited to 'bin/ls/extern.h')
-rw-r--r--bin/ls/extern.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/bin/ls/extern.h b/bin/ls/extern.h
index 9482dad..52b6a85 100644
--- a/bin/ls/extern.h
+++ b/bin/ls/extern.h
@@ -45,6 +45,7 @@ int printname(const char *);
void printscol(const DISPLAY *);
void printstream(const DISPLAY *);
void usage(void);
+int prn_normal(const char *);
size_t len_octal(const char *, int);
int prn_octal(const char *);
int prn_printable(const char *);
OpenPOWER on IntegriCloud