Floats in the protocol
Walter Harms
wharms at bfs.de
Tue Jan 6 06:08:31 PST 2009
<zitiere wer="Simon Thum">
> Hello people,
>
> I'm trying to get some consensus about floats on the wire. I cc'ed some
> who spoke about the issue on the list in a non-exhaustive search.
>
> Recap: Peter and I want to transfer floats in input properties, see there:
> http://lists.freedesktop.org/archives/xorg/2008-December/041647.html
>
> On XDS 08, Keith suggested simply putting them on the wire. That is,
> require IEEE756 32 bit and account for endianness.
>
> Roland suggested to drop the binary representation, and favored a string
> rep. specified in C99. He claims interchange of binary representations
> is unsafe due to platform details:
> http://lists.freedesktop.org/archives/xorg/2008-December/041650.html
>
> While I see benefits of a string rep, X isn't C99 AFAIK. Also, the
> protocol in general is built on binary representations, so a string
> encoding seems somewhat odd to me.
>
> I don't actually need floats badly, but they're more natural than fixed.
>
> Comments/Suggestions please?
if floats are realy needed i would go with an already established like XDR
it is already in glibc and it is a defined RFC.
the next best thing is to use plain ascii as it removes the need to think
about endians.
just my 2 cents,
wh
More information about the xorg
mailing list