summaryrefslogtreecommitdiff
path: root/Src/Zle/zle_hist.c
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2005-07-28 14:45:32 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2005-07-28 14:45:32 +0000
commit8665549030043b6eee46f60d52c57e8519372286 (patch)
tree8f2e50a6f567d9294e754f2569bec7b319ae8316 /Src/Zle/zle_hist.c
parenta680faf0502063ae7488b20a95d3d82f49a12120 (diff)
downloadzsh-8665549030043b6eee46f60d52c57e8519372286.tar.gz
zsh-8665549030043b6eee46f60d52c57e8519372286.zip
21541: remove some warnings from ZLE_UNICODE_SUPPORT
Diffstat (limited to 'Src/Zle/zle_hist.c')
-rw-r--r--Src/Zle/zle_hist.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/Src/Zle/zle_hist.c b/Src/Zle/zle_hist.c
index 67827d530..bed66ac0e 100644
--- a/Src/Zle/zle_hist.c
+++ b/Src/Zle/zle_hist.c
@@ -1068,7 +1068,8 @@ doisearch(char **args, int dir)
rpt:
if (!sbptr && previous_search_len) {
if (previous_search_len > sibuf - FIRST_SEARCH_CHAR - 2) {
- ibuf = hrealloc(ibuf, sibuf, (sibuf + previous_search_len)
+ ibuf = hrealloc((char *)ibuf, sibuf * ZLE_CHAR_SIZE,
+ (sibuf + previous_search_len)
* ZLE_CHAR_SIZE);
sbuf = ibuf + FIRST_SEARCH_CHAR;
sibuf += previous_search_len;
@@ -1096,7 +1097,7 @@ doisearch(char **args, int dir)
} else if (cmd == Th(z_selfinsert)) {
#ifdef ZLE_UNICODE_SUPPORT
if (!lastchar_wide_valid)
- getfullcharrest(lastchar);
+ getrestchar(lastchar);
#else
;
#endif
@@ -1113,7 +1114,8 @@ doisearch(char **args, int dir)
}
set_isrch_spot(top_spot++, hl, pos, zlecs, sbptr, dir, nomatch);
if (sbptr >= sibuf - FIRST_SEARCH_CHAR - 2) {
- ibuf = hrealloc(ibuf, sibuf, sibuf * 2 * ZLE_CHAR_SIZE);
+ ibuf = hrealloc((char *)ibuf, sibuf * ZLE_CHAR_SIZE,
+ sibuf * 2 * ZLE_CHAR_SIZE);
sbuf = ibuf + FIRST_SEARCH_CHAR;
sibuf *= 2;
}
@@ -1298,9 +1300,10 @@ getvisrchstr(void)
#endif
}
ins:
- if(sptr == ssbuf - 1) {
- char *newbuf = zhalloc(ssbuf *= 2);
- strcpy(newbuf, sbuf);
+ if (sptr == ssbuf - 1) {
+ ZLE_STRING_T newbuf =
+ (ZLE_STRING_T) zhalloc((ssbuf *= 2) * ZLE_CHAR_SIZE);
+ ZS_strcpy(newbuf, sbuf);
statusline = sbuf = newbuf;
}
sbuf[sptr++] = LASTFULLCHAR;