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;
On 10/17/2011 03:12 AM, Max Schwarz wrote:
We can't use BitIsSet/SetBit from the server (inputstr.h) since they
operate on byte arrays. EvdevSetBit is added in preparation for the
smooth-scrolling on wheel emulation patch.
Signed-off-by: Max Schwarz m...@x-quadraht.de
Have you looked into
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