> #ifdef WIN32
> #define wchar_t unsigned
> #endif
In FL/fl_utf8.h there are already some hooks in place:
#ifdef WIN32
# ...
# define xchar wchar_t
# ...
#elif defined(__APPLE__)
# ...
# define xchar wchar_t
#else /* X11 */
# ...
# include "Xutf8.h"
# ...
# define xchar unsigned short
but maybe these also need to be re-examined. Would it not make
sense to define an Fl_ucs_t or Fl_unicode_t and avoid any use of
wchar_t except at the lowest levels, unseen by users. [*]
Maybe it's easier to have an fl_wcwidth.c wrapper so that fl_wcwidth()
is defined with Fl_ucs_t for the outside world, and subverts wchar_t
internally by doing:
#define wchar_t unsigned
#include "wcwidth.c"
There are things in Xutf8.h that use int, and some unsigned int.
Do they all need to be checked too?
D.
[*] In fact, in the Unicode and UTF-8 Support chapter of the 1.3.x
dox, there's reference to a "int fl_unichar_to_utf8_size(Fl_Unichar)"
which I was never able to find in the code...
_______________________________________________
fltk-dev mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-dev