mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-01-15 11:00:04 +08:00
c801709ed5
* libc/locale/locale.c (lc_ctype_cjk_lang): New static int. (loadlocale): In case of setting LC_CTYPE, set lc_ctype_cjk_lang to 1 if the language is "jp", "ko", or "zh", to 0 otherwise. (__locale_cjk_lang): New function. * libc/string/local.h (__locale_cjk_lang): Declare. * libc/string/wcwidth.c: Fix comments. (__wcwidth): Handle CJK Ambiguous Width characters according to setting returned by __locale_cjk_lang.
10 lines
276 B
C
10 lines
276 B
C
#include <_ansi.h>
|
|
#include <../ctype/local.h>
|
|
|
|
/* internal function to compute width of wide char. */
|
|
int _EXFUN (__wcwidth, (wint_t));
|
|
|
|
/* Defined in locale/locale.c. Returns a value != 0 if the current
|
|
language is assumed to use CJK fonts. */
|
|
int __locale_cjk_lang ();
|