From a10e58a6907f44b7d538e39c0528b274a47915f6 Mon Sep 17 00:00:00 2001 From: engelsman Date: Tue, 20 Apr 2010 21:43:31 +0000 Subject: added implementations of fl_wcwidth_() and fl_wcwidth() to src/fl_utf.c these supercede the old fl_wcwidth() code in src/xutf8/fl_wcwidth.c. also added corresponding declarations to FL/fl_utf.c, and updated src/Fl_Text_Buffer.c to enable the call to fl_wcwidth() git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7551 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/Fl_Text_Buffer.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Fl_Text_Buffer.cxx') diff --git a/src/Fl_Text_Buffer.cxx b/src/Fl_Text_Buffer.cxx index 7ba7a76e6..5c87340b6 100644 --- a/src/Fl_Text_Buffer.cxx +++ b/src/Fl_Text_Buffer.cxx @@ -1025,8 +1025,8 @@ int Fl_Text_Buffer::character_width(const char *src, int indent, int tabDist) int len = fl_utf8len(c); int ret = 0; unsigned int ucs = fl_utf8decode(src, src+len, &ret); - int width = 1; // mk_wcwidth((wchar_t)ucs); // FIXME - // fprintf(stderr, "mk_wcwidth(%x) -> %d (%d, %d, %s)\n", ucs, width, len, ret, s); + int width = fl_wcwidth_(ucs); // FIXME + // fprintf(stderr, "mk_wcwidth(%x) -> %d (%d, %d, %s)\n", ucs, width, len, ret, src); return width; } if ((c & 0x80) && !(c & 0x40)) { // other byte of UTF-8 sequence -- cgit v1.2.3