summaryrefslogtreecommitdiff
path: root/src/Fl_Text_Buffer.cxx
diff options
context:
space:
mode:
authorengelsman <engelsman>2010-04-20 21:43:31 +0000
committerengelsman <engelsman>2010-04-20 21:43:31 +0000
commita10e58a6907f44b7d538e39c0528b274a47915f6 (patch)
treeaf3f81820b50dd5a3b17838d6829ee11aa2df4d4 /src/Fl_Text_Buffer.cxx
parentd50ca53788aa062b84fa7fddeb691d735eeb3d3b (diff)
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
Diffstat (limited to 'src/Fl_Text_Buffer.cxx')
-rw-r--r--src/Fl_Text_Buffer.cxx4
1 files changed, 2 insertions, 2 deletions
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