about summary refs log tree commit diff
path: root/Src/Zle
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2008-04-20 21:19:52 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2008-04-20 21:19:52 +0000
commit3cf29e75139ec3753868ef8d064d2d5729371b6f (patch)
tree0ca1455c2d6917021277a2a5bc5b68919333a69e /Src/Zle
parentb8ec06c870ac09d5949907640dca4c1a2b711ed5 (diff)
downloadzsh-3cf29e75139ec3753868ef8d064d2d5729371b6f.tar.gz
zsh-3cf29e75139ec3753868ef8d064d2d5729371b6f.tar.xz
zsh-3cf29e75139ec3753868ef8d064d2d5729371b6f.zip
24853: bits missed from patch
Diffstat (limited to 'Src/Zle')
-rw-r--r--Src/Zle/zle.h4
-rw-r--r--Src/Zle/zle_hist.c6
-rw-r--r--Src/Zle/zle_misc.c4
-rw-r--r--Src/Zle/zle_move.c4
-rw-r--r--Src/Zle/zle_utils.c5
5 files changed, 13 insertions, 10 deletions
diff --git a/Src/Zle/zle.h b/Src/Zle/zle.h
index a91d84400..1fd6d87a2 100644
--- a/Src/Zle/zle.h
+++ b/Src/Zle/zle.h
@@ -163,8 +163,8 @@ static inline int ZS_strncmp(ZLE_STRING_T s1, ZLE_STRING_T s2, size_t l)
 /* Combining character alignment: none in this mode */
 #define CCLEFT()
 #define CCRIGHT()
-#define CCLEFTPOS()
-#define CCRIGHTPOS()
+#define CCLEFTPOS(pos)
+#define CCRIGHTPOS(pos)
 /*
  * Increment or decrement the cursor position: simple in this case.
  */
diff --git a/Src/Zle/zle_hist.c b/Src/Zle/zle_hist.c
index 9d65b3516..5af482f9e 100644
--- a/Src/Zle/zle_hist.c
+++ b/Src/Zle/zle_hist.c
@@ -454,7 +454,7 @@ downhistory(UNUSED(char **args))
  * srch_str is the metafied search string, as extracted from the start
  *   of zleline.
  */
-static int srch_hl, srch_cs = -1;
+static int histpos, srch_hl, srch_cs = -1;
 static char *srch_str;
 
 /**/
@@ -462,7 +462,7 @@ int
 historysearchbackward(char **args)
 {
     Histent he;
-    int n = zmult, histpos;
+    int n = zmult;
     char *str;
     struct zle_text zt;
 
@@ -520,7 +520,7 @@ int
 historysearchforward(char **args)
 {
     Histent he;
-    int n = zmult, histpos;
+    int n = zmult;
     char *str;
     struct zle_text zt;
 
diff --git a/Src/Zle/zle_misc.c b/Src/Zle/zle_misc.c
index fd3ab37a9..27253a333 100644
--- a/Src/Zle/zle_misc.c
+++ b/Src/Zle/zle_misc.c
@@ -921,9 +921,9 @@ executenamedcommand(char *prmt)
     /* prmt may be constant */
     prmt = ztrdup(prmt);
     l = strlen(prmt);
-    cmdbuf = (char *)zhalloc(l + NAMLEN + 2 +
+    cmdbuf = (char *)zhalloc(l + NAMLEN + 2
 #ifdef MULTIBYTE_SUPPORT
-			     2 * MB_CUR_MAX
+			     + 2 * MB_CUR_MAX
 #endif
 			     );
     strcpy(cmdbuf, prmt);
diff --git a/Src/Zle/zle_move.c b/Src/Zle/zle_move.c
index 5bfe8ffcb..5e4ebed5b 100644
--- a/Src/Zle/zle_move.c
+++ b/Src/Zle/zle_move.c
@@ -169,11 +169,11 @@ decpos(int *pos)
 
 /**/
 char *
-backwardmetafiedchar(char *start, char *ptr, convchar_t *retchr)
+backwardmetafiedchar(char *start, char *endptr, convchar_t *retchr)
 {
 #ifdef MULTIBYTE_SUPPORT
     int charlen = 0;
-    char *last = NULL, *bufptr, *endptr = ptr;
+    char *last = NULL, *bufptr, *ptr = endptr;
     convchar_t lastc;
     mbstate_t mbs;
     size_t ret;
diff --git a/Src/Zle/zle_utils.c b/Src/Zle/zle_utils.c
index 06c6ebd09..0f14d57a4 100644
--- a/Src/Zle/zle_utils.c
+++ b/Src/Zle/zle_utils.c
@@ -148,8 +148,11 @@ zlecharasstring(ZLE_CHAR_T inchar, char *buf)
     if (imeta(inchar)) {
 	buf[0] = Meta;
 	buf[1] = inchar ^ 32;
-    } else
+	return 2;
+    } else {
 	buf[0] = inchar;
+	return 1;
+    }
 #endif
 }