Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

PATCH: minor character tweaks



A few things that turned from a compilation under Cygwin, which produced
some different warnings.

Index: Src/prompt.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/prompt.c,v
retrieving revision 1.41
diff -u -r1.41 prompt.c
--- Src/prompt.c	15 Sep 2006 13:17:27 -0000	1.41
+++ Src/prompt.c	21 Sep 2006 16:05:38 -0000
@@ -1130,7 +1130,8 @@
 			     * Normal text: build up a multibyte character.
 			     */
 			    char inchar;
-			    wchar_t cc, wcw;
+			    wchar_t cc;
+			    int wcw;
 
 			    /*
 			     * careful: string is still metafied (we
Index: Src/utils.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/utils.c,v
retrieving revision 1.138
diff -u -r1.138 utils.c
--- Src/utils.c	15 Sep 2006 13:17:27 -0000	1.138
+++ Src/utils.c	21 Sep 2006 16:05:40 -0000
@@ -2019,9 +2019,10 @@
 noquery(int purge)
 {
     int val = 0;
-    char c;
 
 #ifdef FIONREAD
+    char c;
+
     ioctl(SHTTY, FIONREAD, (char *)&val);
     if (purge) {
 	for (; val; val--)
Index: Src/Zle/complist.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Zle/complist.c,v
retrieving revision 1.95
diff -u -r1.95 complist.c
--- Src/Zle/complist.c	20 Aug 2006 22:28:17 -0000	1.95
+++ Src/Zle/complist.c	21 Sep 2006 16:05:41 -0000
@@ -982,7 +982,7 @@
 	len = MB_METACHARLENCONV(p, &cchar);
 #ifdef MULTIBYTE_SUPPORT
 	if (cchar == WEOF) {
-	    cchar = (wchar_t)p;
+	    cchar = (wchar_t)(*p == Meta ? p[1] ^ 32 : *p);
 	    width = 1;
 	}
 	else
@@ -995,7 +995,7 @@
 		len = MB_METACHARLENCONV(p, &cchar);
 #ifdef MULTIBYTE_SUPPORT
 		if (cchar == WEOF)
-		    cchar = (wchar_t)p;
+		    cchar = (wchar_t)(*p == Meta ? p[1] ^ 32 : *p);
 #endif
 		p += len;
 

-- 
Peter Stephenson <pws@xxxxxxx>                  Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK                          Tel: +44 (0)1223 692070


To access the latest news from CSR copy this link into a web browser:  http://www.csr.com/email_sig.php



Messages sorted by: Reverse Date, Date, Thread, Author