From 3cf29e75139ec3753868ef8d064d2d5729371b6f Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Sun, 20 Apr 2008 21:19:52 +0000 Subject: 24853: bits missed from patch --- Src/Zle/zle.h | 4 ++-- Src/Zle/zle_hist.c | 6 +++--- Src/Zle/zle_misc.c | 4 ++-- Src/Zle/zle_move.c | 4 ++-- Src/Zle/zle_utils.c | 5 ++++- 5 files changed, 13 insertions(+), 10 deletions(-) (limited to 'Src') diff --git a/Src/Zle/zle.h b/Src/Zle/zle.h index a91d84400..1fd6d87a2 100644 --- a/Src/Zle/zle.h +++ b/Src/Zle/zle.h @@ -163,8 +163,8 @@ static inline int ZS_strncmp(ZLE_STRING_T s1, ZLE_STRING_T s2, size_t l) /* Combining character alignment: none in this mode */ #define CCLEFT() #define CCRIGHT() -#define CCLEFTPOS() -#define CCRIGHTPOS() +#define CCLEFTPOS(pos) +#define CCRIGHTPOS(pos) /* * Increment or decrement the cursor position: simple in this case. */ diff --git a/Src/Zle/zle_hist.c b/Src/Zle/zle_hist.c index 9d65b3516..5af482f9e 100644 --- a/Src/Zle/zle_hist.c +++ b/Src/Zle/zle_hist.c @@ -454,7 +454,7 @@ downhistory(UNUSED(char **args)) * srch_str is the metafied search string, as extracted from the start * of zleline. */ -static int srch_hl, srch_cs = -1; +static int histpos, srch_hl, srch_cs = -1; static char *srch_str; /**/ @@ -462,7 +462,7 @@ int historysearchbackward(char **args) { Histent he; - int n = zmult, histpos; + int n = zmult; char *str; struct zle_text zt; @@ -520,7 +520,7 @@ int historysearchforward(char **args) { Histent he; - int n = zmult, histpos; + int n = zmult; char *str; struct zle_text zt; diff --git a/Src/Zle/zle_misc.c b/Src/Zle/zle_misc.c index fd3ab37a9..27253a333 100644 --- a/Src/Zle/zle_misc.c +++ b/Src/Zle/zle_misc.c @@ -921,9 +921,9 @@ executenamedcommand(char *prmt) /* prmt may be constant */ prmt = ztrdup(prmt); l = strlen(prmt); - cmdbuf = (char *)zhalloc(l + NAMLEN + 2 + + cmdbuf = (char *)zhalloc(l + NAMLEN + 2 #ifdef MULTIBYTE_SUPPORT - 2 * MB_CUR_MAX + + 2 * MB_CUR_MAX #endif ); strcpy(cmdbuf, prmt); diff --git a/Src/Zle/zle_move.c b/Src/Zle/zle_move.c index 5bfe8ffcb..5e4ebed5b 100644 --- a/Src/Zle/zle_move.c +++ b/Src/Zle/zle_move.c @@ -169,11 +169,11 @@ decpos(int *pos) /**/ char * -backwardmetafiedchar(char *start, char *ptr, convchar_t *retchr) +backwardmetafiedchar(char *start, char *endptr, convchar_t *retchr) { #ifdef MULTIBYTE_SUPPORT int charlen = 0; - char *last = NULL, *bufptr, *endptr = ptr; + char *last = NULL, *bufptr, *ptr = endptr; convchar_t lastc; mbstate_t mbs; size_t ret; diff --git a/Src/Zle/zle_utils.c b/Src/Zle/zle_utils.c index 06c6ebd09..0f14d57a4 100644 --- a/Src/Zle/zle_utils.c +++ b/Src/Zle/zle_utils.c @@ -148,8 +148,11 @@ zlecharasstring(ZLE_CHAR_T inchar, char *buf) if (imeta(inchar)) { buf[0] = Meta; buf[1] = inchar ^ 32; - } else + return 2; + } else { buf[0] = inchar; + return 1; + } #endif } -- cgit 1.4.1