mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-01-29 10:30:50 +08:00
098a75dc51
* libc/string/wcswidth.c (wcswidth): Convert japanese wide characters to Unicode here. Handle surrogate pairs for UTF-16 systems. Call __wcwidth rather than wcwidth. * libc/string/wcwidth.c: New implementation using Markus Kuhn's wcwidth implementation for Unicode. (bisearch): New static function. (__wcwidth): New function. Take wint_t rather than wchar_t as parameter to allow full Unicode handling on UTF-16 systems. Move old wcwidth implementation here for non-multibyte aware systems. (wcwidth): Convert japanese wide characters to Unicode here. Call __wcwidth rather than using iswprint/iswcntrl.
8 lines
195 B
C
8 lines
195 B
C
#include <_ansi.h>
|
|
|
|
/* internal function to translate JP to Unicode */
|
|
wint_t _EXFUN (_jp2uc, (wint_t));
|
|
|
|
/* internal function to compute width of wide char. */
|
|
int _EXFUN (__wcwidth, (wint_t));
|