summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--Src/Zle/complist.c4
-rw-r--r--Src/prompt.c3
-rw-r--r--Src/utils.c3
4 files changed, 12 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index fb32b2df1..5934a824d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2006-09-21  Peter Stephenson  <pws@csr.com>
+
+	* 22753: Src/prompt.c, Src/utils.c, Src/Zle/complist.c:
+	minor bugs with using characters spotted from warnings on
+	Cygwin.
+
 2006-09-20  Peter Stephenson  <pws@csr.com>
 
 	* users/10748: Doc/Zsh/compsys.yo: improve example, make one
diff --git a/Src/Zle/complist.c b/Src/Zle/complist.c
index 886b4a685..1152dff7c 100644
--- a/Src/Zle/complist.c
+++ b/Src/Zle/complist.c
@@ -982,7 +982,7 @@ compprintfmt(char *fmt, int n, int dopr, int doesc, int ml, int *stop)
 	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 @@ compprintfmt(char *fmt, int n, int dopr, int doesc, int ml, int *stop)
 		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;
 
diff --git a/Src/prompt.c b/Src/prompt.c
index fc0c7ea47..b4b55a0ea 100644
--- a/Src/prompt.c
+++ b/Src/prompt.c
@@ -1130,7 +1130,8 @@ prompttrunc(int arg, int truncchar, int doprint, int endchar)
 			     * Normal text: build up a multibyte character.
 			     */
 			    char inchar;
-			    wchar_t cc, wcw;
+			    wchar_t cc;
+			    int wcw;
 
 			    /*
 			     * careful: string is still metafied (we
diff --git a/Src/utils.c b/Src/utils.c
index 415e86151..e91baf970 100644
--- a/Src/utils.c
+++ b/Src/utils.c
@@ -2019,9 +2019,10 @@ mod_export int
 noquery(int purge)
 {
     int val = 0;
-    char c;
 
 #ifdef FIONREAD
+    char c;
+
     ioctl(SHTTY, FIONREAD, (char *)&val);
     if (purge) {
 	for (; val; val--)