incorrect. I must have written that binary search idiom a hundred
times, so it's rather embarrassing that I can't _automatically_ get
it right! This was causing all kinds of characters to be classified
as ON when they should have been various other classes.
Also while I'm here, I've added another test case to utf8.txt (a
small piece of Arabic within a predominantly L->R line), and also
supplied a means to compile minibidi.c with -DTEST_GETTYPE to
produce a command-line character class lookup tool. (Not sure what
use that'll be _other_ than debugging this precise problem, but I
don't like to throw it away now I've written it :-)
[originally from svn r5016]
searches a list of (start,end,type) tuples. This increases data size
by about 5Kb, which is a shame; but on the plus side, it boosts
performance from O(N) to O(log N). As an added bonus, the table now
covers _all_ of Unicode, not just the BMP.
[originally from svn r4964]
- rewrote the reversal loop in flipThisRun to be considerably clearer
- rewrote leastGreaterOdd and leastGreaterEven as bit-twiddling macros
- replaced malloc/free with snewn/sfree
- lost some gratuitous repeat calls of getType on the same character
And most noticeably:
- got rid of minibidi.h, since it was entirely full of minibidi.c
internals (including constant data definitions!) and wasn't used
to provide an external interface at all. Everything in it has
been folded into minibidi.c.
[originally from svn r4963]