From 62c71d5d50809e566dff026b1ecd11c709c028b3 Mon Sep 17 00:00:00 2001 From: Wayne Davison Date: Tue, 15 Nov 2005 08:44:28 +0000 Subject: Changed zleread() to return a normal char pointer, not unsigned char. Got rid of some unsigned-char/char pointer casts. --- Src/Zle/zle_main.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'Src/Zle') 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; -- cgit 1.4.1