1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-10-03 08:11:03 +02:00

- One minor change to handle the ZLE_STRING_T change.

- A few brace-position twiddles.
This commit is contained in:
Wayne Davison 2005-11-01 03:26:57 +00:00
parent 957b5cf3cd
commit 781711e733

View file

@ -68,8 +68,7 @@ sizeline(int sz)
{ {
int cursz = (zlemetaline != NULL) ? metalinesz : linesz; int cursz = (zlemetaline != NULL) ? metalinesz : linesz;
while (sz > cursz) while (sz > cursz) {
{
if (cursz < 256) if (cursz < 256)
cursz = 256; cursz = 256;
else else
@ -170,7 +169,7 @@ zlelineasstring(ZLE_STRING_T instr, int inll, int incs, int *outllp,
#ifdef MULTIBYTE_SUPPORT #ifdef MULTIBYTE_SUPPORT
unsigned char *strp = (unsigned char *)s; unsigned char *strp = (unsigned char *)s;
#else #else
unsigned char *strp = instr; unsigned char *strp = (unsigned char *)instr;
#endif #endif
unsigned char *stopcs = strp + outcs; unsigned char *stopcs = strp + outcs;
unsigned char *stopll = strp + outll; unsigned char *stopll = strp + outll;
@ -190,8 +189,7 @@ zlelineasstring(ZLE_STRING_T instr, int inll, int incs, int *outllp,
} }
#ifdef MULTIBYTE_SUPPORT #ifdef MULTIBYTE_SUPPORT
if (useheap) if (useheap) {
{
unsigned char *ret = unsigned char *ret =
(unsigned char *) metafy((char *) s, mb_len, META_HEAPDUP); (unsigned char *) metafy((char *) s, mb_len, META_HEAPDUP);
@ -199,10 +197,7 @@ zlelineasstring(ZLE_STRING_T instr, int inll, int incs, int *outllp,
return ret; return ret;
} }
else return (unsigned char *) metafy((char *) s, mb_len, META_REALLOC);
{
return (unsigned char *) metafy((char *) s, mb_len, META_REALLOC);
}
#else #else
return (unsigned char *) metafy((char *) instr, inll, return (unsigned char *) metafy((char *) instr, inll,
useheap ? META_HEAPDUP : META_DUP); useheap ? META_HEAPDUP : META_DUP);
@ -824,11 +819,8 @@ showmsg(char const *msg)
n = nicechar(*p); n = nicechar(*p);
ret = 1; ret = 1;
width = strlen(n); width = strlen(n);
} } else
else
{
n = wcs_nicechar(c, &width, NULL); n = wcs_nicechar(c, &width, NULL);
}
ulen -= ret; ulen -= ret;
p += ret; p += ret;