[Fribidi-discuss] (Justified?) compilation warning
Behdad Esfahbod
behdad at bamdad.org
Mon Sep 23 05:34:07 EST 2002
On Sat, 14 Sep 2002, Shachar Shemesh wrote:
> Behdad Esfahbod wrote:
>
> >Well, I must confess that it was a real bug report. Thank you
> >Shachar.
>
> As opposed to so far, where I have just been moving my lips and no
> useful information came out ;-)?
You should mean moving fingers ;).
> 3. Support all encoding lengths using the same code - The
> suggestion was already made. Use a preprocessor to mark the character
> begining and end, and have the reordering code work on a byte by byte basis.
I don't like the idea of having different binaries for different
encodings, niether I like the idea of having FriBidiChar type of
different sizes on unices. So I will stick to the third
solution, which the same code & same binary will support all
Unicode encodings (say UTF-8, UTF-16, and UTF-32). About the
interface, I've found some reasonable way to implement it. We
will have three different versions of each function, ending with
1, 2, and 4. And a macro definition which *selects* which one
to call. I've attached an example code, but it generates
warnings that I can't get rid of. Any alternative solutions is
welcome (I'm wondering if I should use 1, 2, 4, or 8, 16, 32.)
Another question is about fribidi types. IMHO FriBidiChar should
remain 32bits. I don't like different size of types on different
machines. Another solution is to have FriBidiChar1,
FriBidiChar2, and FriBidiChar4, and define FriBidiChar to point
to one of them based on defined symbols, but I don't like it.
Ok, That's enough for now. Let me know what you think.
--
Behdad Esfahbod 1 Mehr 1381, 2002 Sep 23
http://behdad.org/ [Finger for Geek Code]
#define is_persian_leap(y) ((((y)-474)%2820+2820)%2820*31%128<31)
More information about the FriBidi
mailing list