I've just had a look at some of the code in Fl_Text_Display.cxx.
The first thing that struck me was just how much of the low-level
utf-8 implementation details are exposed. Someone unfamiliar with
the bit-twiddling can probably make some sense of the utf_len()
function, but there are lots of other places in the code that
contain things like:
if (!((c & 0x80) && !(c & 0x40))) {
ok = 1;
} else {
...
}
I suggest that one of the first passes through the code adds some
is_xyz(c) functions (or macros is speed is really a factor) so that
mere mortals like me have a chance of understanding the code.
And where tests are always grouped together, add functions/macros
to cover that case too so we can improve the high-level readability.
Cheers
D
_______________________________________________
fltk-dev mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-dev