1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-10-30 05:40:58 +01:00

22075: assume we can convert characters with wctomb() with --enable-multibyte

This commit is contained in:
Peter Stephenson 2005-12-14 18:28:53 +00:00
parent 4075f65400
commit 12f20954e9
2 changed files with 9 additions and 3 deletions

View file

@ -3918,7 +3918,7 @@ dquotedzputs(char const *s, FILE *stream)
}
#endif
# if defined(HAVE_NL_LANGINFO) && defined(CODESET) && !defined(__STDC_ISO_10646__)
# if defined(HAVE_NL_LANGINFO) && defined(CODESET) && !defined(__STDC_ISO_10646__) && !defined(MULTIBYTE_SUPPORT)
/* Convert a character from UCS4 encoding to UTF-8 */
/**/
@ -3984,7 +3984,7 @@ getkeystring(char *s, int *len, int fromwhere, int *misc)
char svchar = '\0';
int meta = 0, control = 0;
int i;
#if defined(HAVE_WCHAR_H) && defined(HAVE_WCTOMB) && defined(__STDC_ISO_10646__)
#if defined(HAVE_WCHAR_H) && defined(HAVE_WCTOMB) && (defined(__STDC_ISO_10646__) || defined(MULTIBYTE_SUPPORT))
wint_t wval;
size_t count;
#else
@ -4093,7 +4093,7 @@ getkeystring(char *s, int *len, int fromwhere, int *misc)
*misc = wval;
return s+1;
}
#if defined(HAVE_WCHAR_H) && defined(HAVE_WCTOMB) && defined(__STDC_ISO_10646__)
#if defined(HAVE_WCHAR_H) && defined(HAVE_WCTOMB) && (defined(__STDC_ISO_10646__) || defined(MULTIBYTE_SUPPORT))
count = wctomb(t, (wchar_t)wval);
if (count == (size_t)-1) {
zerr("character not in range", NULL, 0);