diff options
| author | engelsman <engelsman> | 2010-04-20 21:43:31 +0000 |
|---|---|---|
| committer | engelsman <engelsman> | 2010-04-20 21:43:31 +0000 |
| commit | a10e58a6907f44b7d538e39c0528b274a47915f6 (patch) | |
| tree | af3f81820b50dd5a3b17838d6829ee11aa2df4d4 /FL | |
| parent | d50ca53788aa062b84fa7fddeb691d735eeb3d3b (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 'FL')
| -rw-r--r-- | FL/fl_utf8.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/FL/fl_utf8.h b/FL/fl_utf8.h index 27499de12..bc35ab4b6 100644 --- a/FL/fl_utf8.h +++ b/FL/fl_utf8.h @@ -142,6 +142,15 @@ FL_EXPORT int fl_utf8locale(); * type of the src text. */ FL_EXPORT int fl_utf8test(const char *src, unsigned len); +/* XX: return width of "raw" ucs character in columns. + * for internal use only */ +FL_EXPORT int fl_wcwidth_(unsigned int ucs); + +/* XX: return width of utf-8 character string in columns. + * NOTE: this may also do C1 control character (0x80 to 0x9f) to CP1252 mapping, + * depending on original build options */ +FL_EXPORT int fl_wcwidth(const char *src); + /* OD: Return true if the character is non-spacing */ FL_EXPORT unsigned int fl_nonspacing(unsigned int ucs); |
