summaryrefslogtreecommitdiff
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
parentfeb29659f1be2d94569afed60919b351a685abc8 (diff)
downloadzsh-0f4c32138087a56fd554fd619939fb19d2acbafd.tar.gz
zsh-0f4c32138087a56fd554fd619939fb19d2acbafd.zip
26975: compilation issues in bin_print()
-rw-r--r--ChangeLog4
-rw-r--r--Src/builtin.c13
2 files changed, 12 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index f30f025fb..3cd2912ce 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
2009-05-20 Peter Stephenson <pws@csr.com>
+ * 26975: Src/builtin.c: compilation issues in bin_print().
+
* users/14143 plus extra fix in padding code: Doc/Zsh/params.yo,
Src/subst.c, Src/utils.c: use default IFS if IFS is unset.
@@ -11738,5 +11740,5 @@
*****************************************************
* This is used by the shell to define $ZSH_PATCHLEVEL
-* $Revision: 1.4691 $
+* $Revision: 1.4692 $
*****************************************************
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)
{