Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PATCH: compilation problems
- X-seq: zsh-workers 26975
- From: Peter Stephenson <pws@xxxxxxx>
- To: zsh-workers@xxxxxxxxxx (Zsh hackers list)
- Subject: PATCH: compilation problems
- Date: Wed, 20 May 2009 10:50:19 +0100
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
Barely worth posting except to remind people (particularly me) of the
perils of signed characters and accidental use of non-C89 syntax...
I deduce zsh isn't getting compiled much on older systems.
Index: Src/builtin.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/builtin.c,v
retrieving revision 1.226
diff -u -r1.226 builtin.c
--- Src/builtin.c 12 May 2009 11:11:14 -0000 1.226
+++ Src/builtin.c 20 May 2009 09:49:43 -0000
@@ -3741,6 +3741,10 @@
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 @@
* 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)
{
--
Peter Stephenson <pws@xxxxxxx> Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK Tel: +44 (0)1223 692070
Messages sorted by:
Reverse Date,
Date,
Thread,
Author