diff options
author | Bart Schaefer <barts@users.sourceforge.net> | 2005-10-23 19:28:20 +0000 |
---|---|---|
committer | Bart Schaefer <barts@users.sourceforge.net> | 2005-10-23 19:28:20 +0000 |
commit | 533021f2ad7c7d136adbf216c8c95aaab8ee7098 (patch) | |
tree | 49833e55f338b3bd1c7ba321a299a92272e1a890 /Src | |
parent | 05b6a233622031136304bbb3dfe7012d29cae7f1 (diff) | |
download | zsh-533021f2ad7c7d136adbf216c8c95aaab8ee7098.tar.gz zsh-533021f2ad7c7d136adbf216c8c95aaab8ee7098.tar.xz zsh-533021f2ad7c7d136adbf216c8c95aaab8ee7098.zip |
Fix --disable-multibyte compile error.
Diffstat (limited to 'Src')
-rw-r--r-- | Src/prompt.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Src/prompt.c b/Src/prompt.c index fd04cc2d7..008d3a39d 100644 --- a/Src/prompt.c +++ b/Src/prompt.c @@ -1076,7 +1076,10 @@ prompttrunc(int arg, int truncchar, int doprint, int endchar) */ char *fulltextptr, *fulltext; int remw; +#ifdef ZLE_UNICODE_SUPPORT mbstate_t mbs; + memset(&mbs, 0, sizeof(mbstate_t)); +#endif fulltextptr = fulltext = ptr + ntrunc; memmove(fulltext, ptr, fullen); @@ -1086,8 +1089,6 @@ prompttrunc(int arg, int truncchar, int doprint, int endchar) while (*t) *ptr++ = *t++; - memset(&mbs, 0, sizeof(mbstate_t)); - /* * Find the point in the text at which we should * start copying, i.e. when the remaining width @@ -1169,9 +1170,10 @@ prompttrunc(int arg, int truncchar, int doprint, int endchar) * maximum width. */ char *skiptext = ptr; +#ifdef ZLE_UNICODE_SUPPORT mbstate_t mbs; - memset(&mbs, 0, sizeof(mbstate_t)); +#endif while (maxwidth > 0 && *skiptext) { if (*skiptext == Inpar) { |