From 92465d59c678c5a8e8c4c0985eb6ecec4c391df9 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Tue, 23 Dec 2008 19:06:31 +0100 Subject: cleanup/modernize: don't test HAVE_MBRTOWC; now gnulib provides it * bootstrap.conf (gnulib_modules): Include mbrtowc explicitly. * src/ls.c (quote_name): Don't test HAVE_MBRTOWC, now that we're guaranteed to have the function. * src/wc.c (wc): Likewise. --- src/ls.c | 4 ---- src/wc.c | 4 ++-- 2 files changed, 2 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/ls.c b/src/ls.c index 008186595..b03aebc1f 100644 --- a/src/ls.c +++ b/src/ls.c @@ -3681,7 +3681,6 @@ quote_name (FILE *out, const char *name, struct quoting_options const *options, if (qmark_funny_chars) { -#if HAVE_MBRTOWC if (MB_CUR_MAX > 1) { char const *p = buf; @@ -3784,7 +3783,6 @@ quote_name (FILE *out, const char *name, struct quoting_options const *options, len = q - buf; } else -#endif { char *p = buf; char const *plimit = buf + len; @@ -3800,11 +3798,9 @@ quote_name (FILE *out, const char *name, struct quoting_options const *options, } else if (width != NULL) { -#if HAVE_MBRTOWC if (MB_CUR_MAX > 1) displayed_width = mbsnwidth (buf, len, 0); else -#endif { char const *p = buf; char const *plimit = buf + len; diff --git a/src/wc.c b/src/wc.c index 65368f994..b1afe1495 100644 --- a/src/wc.c +++ b/src/wc.c @@ -196,7 +196,7 @@ wc (int fd, char const *file_x, struct fstatus *fstatus) /* If in the current locale, chars are equivalent to bytes, we prefer counting bytes, because that's easier. */ -#if HAVE_MBRTOWC && (MB_LEN_MAX > 1) +#if MB_LEN_MAX > 1 if (MB_CUR_MAX > 1) { count_bytes = print_bytes; @@ -272,7 +272,7 @@ wc (int fd, char const *file_x, struct fstatus *fstatus) bytes += bytes_read; } } -#if HAVE_MBRTOWC && (MB_LEN_MAX > 1) +#if MB_LEN_MAX > 1 # define SUPPORT_OLD_MBRTOWC 1 else if (MB_CUR_MAX > 1) { -- cgit v1.2.3-70-g09d2