about summary refs log tree commit diff
diff options
context:
space:
mode:
authorClint Adams <clint@users.sourceforge.net>2005-01-22 16:26:32 +0000
committerClint Adams <clint@users.sourceforge.net>2005-01-22 16:26:32 +0000
commit8ae8a91b8b34514f3b3d5f695e6d5658cc875a66 (patch)
tree394ace3bd7d7b56c338ea2ebfd06f3966b7e0a7e
parent92a3a287693dc9d4812eca736e6997c9a4003e2a (diff)
downloadzsh-8ae8a91b8b34514f3b3d5f695e6d5658cc875a66.tar.gz
zsh-8ae8a91b8b34514f3b3d5f695e6d5658cc875a66.tar.xz
zsh-8ae8a91b8b34514f3b3d5f695e6d5658cc875a66.zip
* 20736: Src/Zle/zle_utils.c: change zlegetline() to return a metafied string.
-rw-r--r--ChangeLog3
-rw-r--r--Src/Zle/zle_utils.c9
2 files changed, 5 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index d6925bc6c..bd4284ebb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2005-01-22  Clint Adams  <clint@zsh.org>
 
+	* 20736: Src/Zle/zle_utils.c: change zlegetline() to return
+	a metafied string.
+
 	* unposted (cf. zsh-users/8412): Config/version.mk: fix
 	year typo.
 
diff --git a/Src/Zle/zle_utils.c b/Src/Zle/zle_utils.c
index d769e8363..3696d781b 100644
--- a/Src/Zle/zle_utils.c
+++ b/Src/Zle/zle_utils.c
@@ -72,14 +72,11 @@ sizeline(int sz)
 
 /*
  * Insert a character, called from main shell.
- *
- * WCHAR: type is wrong, should be a genuine wide character,
- * when available in the caller.
  */
 
 /**/
 mod_export void
-zleaddtoline(int chr)
+zleaddtoline(ZLE_CHAR_T chr)
 {
     spaceinline(1);
     zleline[zlecs++] = chr;
@@ -109,15 +106,13 @@ zlegetline(int *ll, int *cs)
     }
 
     *ll = mb_len;
-
-    return (unsigned char *)s;
 #else
     *ll = zlell;
     *cs = zlecs;
 
     s = ztrdup(zleline);
-    return (unsigned char *)s;
 #endif
+    return (unsigned char *) metafy((char *) s, zlell, META_REALLOC);
 }