From 0f4c32138087a56fd554fd619939fb19d2acbafd Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Wed, 20 May 2009 09:53:13 +0000 Subject: 26975: compilation issues in bin_print() --- Src/builtin.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'Src/builtin.c') diff --git a/Src/builtin.c b/Src/builtin.c index 86bb3bb9c..60e81caa4 100644 --- a/Src/builtin.c +++ b/Src/builtin.c @@ -3741,6 +3741,10 @@ bin_print(char *name, char **args, Options ops, int func) memset(&mbs, 0, sizeof(mbstate_t)); while (l > 0) { + wchar_t wc; + size_t cnt; + int wcw; + /* * Prevent misaligned columns due to escape sequences by * skipping over them. Octals \033 and \233 are the @@ -3752,15 +3756,16 @@ bin_print(char *name, char **args, Options ops, int func) * out). */ if (*aptr == '\033' || *aptr == '\233') { - for (aptr++, l--; l && !isalpha(*aptr); aptr++, l--); + for (aptr++, l--; + l && !isalpha(STOUC(*aptr)); + aptr++, l--) + ; aptr++; l--; continue; } - wchar_t wc; - size_t cnt = mbrtowc(&wc, aptr, l, &mbs); - int wcw; + cnt = mbrtowc(&wc, aptr, l, &mbs); if (cnt == MB_INCOMPLETE || cnt == MB_INVALID) { -- cgit 1.4.1