On 10 Apr 2010, at 11:33, Duncan Gibson wrote:
>
>     src/xutf8/fl_wcwidth.c
>         #include "mk_wcwidth.c"
>         int fl_wcwidth(unsigned int ucs) {
>             return mk_wcwidth(ucs);
>         }
>

I liked my version better...

>
> but then it struck me that there are no existing fl_* files in xutf8.
> If there's a logic to how the files are partitioned, I can't see it.

I think the xutf8 stuff was originally sort of X11 specific (though  
may not be now...) and the fltk stuff was in fl_utf.c, or some such.  
Then there was fl_utf8.cxx as well... I'm not sure which of those two  
is best though: one is derived from OksiD's stuff, the other from the  
fltk2 port. There is some overlap of functionality...

I think fl_utf.c is the one we want, maybe...

>
> [*] Some thoughts on tweaks:
> I only have a Linux box, and this first step seems to work without
> obvious problem, but there's still the issue of wchar_t on Win32.
> So we probably need to remove the #include wchar.h from MK's original
> file and add a typedef wchar_t unsigned int.
> Also, by adding forward declarations of MK's routines as 'static'
> before the #include "mk_wcwidth.c" line we can ensure that they do
> not leak out into the global namespace and cause problems.

Yes. and we can probably lose the "compatibility" *_cjk functions  
from wcwidth.c too, as they are not useful to us here.
-- 
Ian



_______________________________________________
fltk-dev mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-dev

Reply via email to