From b9a2f26240c2bcc081bb826d1f20e9fc91d020f5 Mon Sep 17 00:00:00 2001 From: Micah Cowan Date: Wed, 6 Feb 2008 16:53:46 -0800 Subject: [PATCH] ChangeLog entries for NLS progress-bar changes; use correct conditional checks in progress.c. --- ChangeLog | 4 ++++ src/ChangeLog | 9 +++++++++ src/progress.c | 6 ++---- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index cde46e57..3997090f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2008-02-06 Micah Cowan + + * configure.ac (AC_CHECK_FUNCS): Added check for mbtowc. + 2008-02-03 Micah Cowan * configure.in: Add checks for wchar.h, wcwidth function (to diff --git a/src/ChangeLog b/src/ChangeLog index caeb3b77..b446f04f 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,12 @@ +2008-02-06 Micah Cowan + + * progress.c (countcols): Use strlen() when mbtowc or wcwidth + not available (or not using NLS). + * utils.c: Ensure we use single-byte separators when not doing + NLS progress-bars. + * wget.h: Determine whether to use NLS for progress-bars, based + on whether wcwidth and mbtowc are available. + 2008-02-03 Micah Cowan * progress.c (create_image): Use number of characters/columns diff --git a/src/progress.c b/src/progress.c index 80dab04a..edb30530 100644 --- a/src/progress.c +++ b/src/progress.c @@ -767,7 +767,7 @@ update_speed_ring (struct bar_progress *bp, wgint howmuch, double dltime) #endif } -#if HAVE_MBTOWC && HAVE_WCWIDTH +#if USE_NLS_PROGRESS_BAR int count_cols (const char *mbs) { @@ -795,8 +795,6 @@ count_cols (const char *mbs) } #else # define count_cols(mbs) ((int)(strlen(mbs))) -# undef wcwidth -# define wcwidth(wc) (1) #endif /* Translation note: "ETA" is English-centric, but this must @@ -813,7 +811,7 @@ get_eta (void) int nbytes; int ncols; -#if HAVE_WCWIDTH && HAVE_MBTOWC +#if USE_NLS_PROGRESS_BAR eta_trans = _(eta_str); #else eta_trans = eta_str;