about summary refs log tree commit diff
path: root/Src/builtin.c
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2009-05-20 09:53:13 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2009-05-20 09:53:13 +0000
commit0f4c32138087a56fd554fd619939fb19d2acbafd (patch)
tree2264a8ca1444e9b3683d4ea7c3a0eb67c2beac6f /Src/builtin.c
parentfeb29659f1be2d94569afed60919b351a685abc8 (diff)
downloadzsh-0f4c32138087a56fd554fd619939fb19d2acbafd.tar.gz
zsh-0f4c32138087a56fd554fd619939fb19d2acbafd.tar.xz
zsh-0f4c32138087a56fd554fd619939fb19d2acbafd.zip
26975: compilation issues in bin_print()
Diffstat (limited to 'Src/builtin.c')
-rw-r--r--Src/builtin.c13
1 files changed, 9 insertions, 4 deletions
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)
 		    {