On Wed, Oct 19, 2011 at 09:34:47AM +0200, Max Schwarz wrote:
EvdevBitIsSet(array, KEY_A):array[0] (1 30)
BitIsOn(ptr, KEY_A):((BYTE*)ptr)[3] (1 6)
That is true on little-endian. Big-endian machines have that byte in position
0, so that one would need to be
EvdevBitIsSet(array, KEY_A):array[0] (1 30)
BitIsOn(ptr, KEY_A):((BYTE*)ptr)[3] (1 6)
That is true on little-endian. Big-endian machines have that byte in position
0, so that one would need to be ((BYTE*)ptr)[0] (1 6).
Another simpler example:
long a = 0x04030201;
Have you looked into switching the evdev bit arrays from longs to bytes
so we can standardize on one type of bit array?
That would be possible. Longs are used because the linux evdev layer uses
longs and we can let ioctl() write directly into our bitmask arrays. I can
change the occurences of