about summary refs log tree commit diff
path: root/Src/Zle/zle_main.c
diff options
context:
space:
mode:
authorWayne Davison <wayned@users.sourceforge.net>2005-11-15 08:44:28 +0000
committerWayne Davison <wayned@users.sourceforge.net>2005-11-15 08:44:28 +0000
commit62c71d5d50809e566dff026b1ecd11c709c028b3 (patch)
treeef8f67ede41cd21e1b53257f9be98124f578f2ef /Src/Zle/zle_main.c
parent0f0d610401c5dd5a62f8a50e5a4a50974175fec2 (diff)
downloadzsh-62c71d5d50809e566dff026b1ecd11c709c028b3.tar.gz
zsh-62c71d5d50809e566dff026b1ecd11c709c028b3.tar.xz
zsh-62c71d5d50809e566dff026b1ecd11c709c028b3.zip
Changed zleread() to return a normal char pointer, not unsigned char.
Got rid of some unsigned-char/char pointer casts.
Diffstat (limited to 'Src/Zle/zle_main.c')
-rw-r--r--Src/Zle/zle_main.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/Src/Zle/zle_main.c b/Src/Zle/zle_main.c
index 22dd5779b..abcd06221 100644
--- a/Src/Zle/zle_main.c
+++ b/Src/Zle/zle_main.c
@@ -908,10 +908,10 @@ zlecore(void)
 /* Read a line.  It is returned metafied. */
 
 /**/
-unsigned char *
+char *
 zleread(char **lp, char **rp, int flags, int context)
 {
-    unsigned char *s;
+    char *s;
     int old_errno = errno;
     int tmout = getiparam("TMOUT");
     Thingy initthingy;
@@ -932,7 +932,7 @@ zleread(char **lp, char **rp, int flags, int context)
 			  &pptlen);
 	write(2, (WRITE_ARG_2_T)pptbuf, pptlen);
 	free(pptbuf);
-	return (unsigned char *)shingetline();
+	return shingetline();
     }
 
     keytimeout = getiparam("KEYTIMEOUT");
@@ -976,9 +976,9 @@ zleread(char **lp, char **rp, int flags, int context)
     selectkeymap("main", 1);
     selectlocalmap(NULL);
     fixsuffix();
-    if ((s = (unsigned char *)getlinknode(bufstack))) {
-	setline((char *)s, ZSL_TOEND);
-	zsfree((char *)s);
+    if ((s = getlinknode(bufstack))) {
+	setline(s, ZSL_TOEND);
+	zsfree(s);
 	if (stackcs != -1) {
 	    zlecs = stackcs;
 	    stackcs = -1;
@@ -1350,8 +1350,7 @@ bin_vared(char *name, char **args, Options ops, UNUSED(int func))
     if (OPT_ISSET(ops,'h'))
 	hbegin(2);
     isfirstln = OPT_ISSET(ops,'e');
-    t = (char *) zleread(&p1, &p2, OPT_ISSET(ops,'h') ? ZLRF_HISTORY : 0,
-			 ZLCON_VARED);
+    t = zleread(&p1, &p2, OPT_ISSET(ops,'h') ? ZLRF_HISTORY : 0, ZLCON_VARED);
     if (OPT_ISSET(ops,'h'))
 	hend(NULL);
     isfirstln = ifl;