about summary refs log tree commit diff
path: root/Src/Zle/zle_hist.c
diff options
context:
space:
mode:
authorWayne Davison <wayned@users.sourceforge.net>2005-11-15 08:44:17 +0000
committerWayne Davison <wayned@users.sourceforge.net>2005-11-15 08:44:17 +0000
commite79af955f0620a699b01f11b584788404ba81767 (patch)
tree3cea0f78df60c7622321e1835ff8b67b347e796f /Src/Zle/zle_hist.c
parent915e6ff66ad4e64c66eb9be3ced6bc6fdd26c0cf (diff)
downloadzsh-e79af955f0620a699b01f11b584788404ba81767.tar.gz
zsh-e79af955f0620a699b01f11b584788404ba81767.tar.xz
zsh-e79af955f0620a699b01f11b584788404ba81767.zip
Got rid of some unsigned-char/char pointer casts.
Diffstat (limited to 'Src/Zle/zle_hist.c')
-rw-r--r--Src/Zle/zle_hist.c30
1 files changed, 13 insertions, 17 deletions
diff --git a/Src/Zle/zle_hist.c b/Src/Zle/zle_hist.c
index 38540a032..a26aee764 100644
--- a/Src/Zle/zle_hist.c
+++ b/Src/Zle/zle_hist.c
@@ -85,8 +85,7 @@ zletext(Histent ent, struct zle_text *zt)
     }
 
     duptext = ztrdup(ent->text);
-    zt->text = stringaszleline((unsigned char *)duptext, 0,
-			       &zt->len, NULL, NULL);
+    zt->text = stringaszleline(duptext, 0, &zt->len, NULL, NULL);
     zsfree(duptext);
     zt->alloced = 1;
 }
@@ -355,9 +354,9 @@ historysearchbackward(char **args)
 	zmult = n;
 	return ret;
     }
-    if (*args) {
-	str = stringaszleline((unsigned char *)*args, 0, &hp, NULL, NULL);
-    } else {
+    if (*args)
+	str = stringaszleline(*args, 0, &hp, NULL, NULL);
+    else {
 	if (histline == curhist || histline != srch_hl || zlecs != srch_cs ||
 	    mark != 0 || ZS_memcmp(srch_str, zleline, histpos) != 0) {
 	    zfree(srch_str, histpos);
@@ -414,9 +413,9 @@ historysearchforward(char **args)
 	zmult = n;
 	return ret;
     }
-    if (*args) {
-	str = stringaszleline((unsigned char *)*args, 0, &hp, NULL, NULL);
-    } else {
+    if (*args)
+	str = stringaszleline(*args, 0, &hp, NULL, NULL);
+    else {
 	if (histline == curhist || histline != srch_hl || zlecs != srch_cs ||
 	    mark != 0 || ZS_memcmp(srch_str, zleline, histpos) != 0) {
 	    zfree(srch_str, histpos * ZLE_CHAR_SIZE);
@@ -539,7 +538,7 @@ insertlastword(char **args)
     if (lastinsert && lastlen &&
 	lastpos <= zlemetacs &&
 	lastlen == zlemetacs - lastpos &&
-	memcmp(lastinsert, (char *)&zlemetaline[lastpos], lastlen) == 0)
+	memcmp(lastinsert, &zlemetaline[lastpos], lastlen) == 0)
 	deleteword = 1;
     else
 	lasthist = curhist;
@@ -644,7 +643,7 @@ insertlastword(char **args)
 
     unmetafy_line();
 
-    zs = stringaszleline((unsigned char *)s, 0, &len, NULL, NULL);
+    zs = stringaszleline(s, 0, &len, NULL, NULL);
     doinsert(zs, len);
     free(zs);
     zmult = n;
@@ -749,8 +748,7 @@ pushlineoredit(char **args)
     if (zmult < 0)
 	return 1;
     if (hline && *hline) {
-	ZLE_STRING_T zhline = stringaszleline((unsigned char *)hline, 0,
-					      &ics, NULL, NULL);
+	ZLE_STRING_T zhline = stringaszleline(hline, 0, &ics, NULL, NULL);
 
 	sizeline(ics + zlell + 1);
 	/* careful of overlapping copy */
@@ -787,7 +785,7 @@ pushinput(char **args)
 int
 zgetline(UNUSED(char **args))
 {
-    unsigned char *s = (unsigned char *)getlinknode(bufstack);
+    char *s = getlinknode(bufstack);
 
     if (!s) {
 	return 1;
@@ -1270,8 +1268,7 @@ getvisrchstr(void)
 	    	cmd == Th(z_vicmdmode)) {
 	    int newlen;
 	    sbuf[sptr] = ZWC('\0');
-	    visrchstr = (char *)zlelineasstring(sbuf + 1, sptr - 1, 0, &newlen,
-						NULL, 0);
+	    visrchstr = zlelineasstring(sbuf+1, sptr-1, 0, &newlen, NULL, 0);
 	    if (!newlen) {
 	        zsfree(visrchstr);
 		visrchstr = ztrdup(vipenultsrchstr);
@@ -1391,8 +1388,7 @@ virepeatsearch(UNUSED(char **args))
 	n = -n;
 	visrchsense = -visrchsense;
     }
-    srcstr = stringaszleline((unsigned char *)visrchstr, 0,
-			     &srclen, NULL, NULL);
+    srcstr = stringaszleline(visrchstr, 0, &srclen, NULL, NULL);
     if (!(he = quietgethist(histline)))
 	return 1;
     while ((he = movehistent(he, visrchsense, hist_skip_flags))) {