Floats in the protocol
Simon Thum
simon.thum at gmx.de
Tue Jan 6 04:41:18 PST 2009
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?
More information about the xorg
mailing list