From e9c60da89a9c55b81b2dedcf6ee3d1aefb4ff591 Mon Sep 17 00:00:00 2001 From: "Zephaniah E. Hull" Date: Sun, 14 May 2006 11:55:50 +0000 Subject: Tweak credits and references. Change the longs to unsigned longs in the bitfields. Cleanup our includes. Stop pulling in asm/types.h and asm/bitops.h. Conditionally define the stuff that used to come from the above, including our own test_bit, set_bit and clear_bit. Change the longs to unsigned longs in the bitfields. Change the longs to unsigned longs in the bitfields. Use the bitop defines in evdev.h properly. Change the longs to unsigned longs in the bitfields. Change the longs to unsigned longs in the bitfields. Use the bitop defines in evdev.h properly. Change the longs to unsigned longs in the bitfields. Use the bitop defines in evdev.h properly. Add HPPA/HPPA64 entries. (Thanks to Fabio M. Di Nitto ) --- src/evdev_key.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'src/evdev_key.c') diff --git a/src/evdev_key.c b/src/evdev_key.c index af2c943..8917c3b 100644 --- a/src/evdev_key.c +++ b/src/evdev_key.c @@ -81,11 +81,6 @@ #define ArrayLength(a) (sizeof(a) / (sizeof((a)[0]))) -#define BITS_PER_LONG (sizeof(long) * 8) -#define NBITS(x) ((((x)-1)/BITS_PER_LONG)+1) -#define OFF(x) ((x)%BITS_PER_LONG) -#define LONG(x) ((x)/BITS_PER_LONG) -#define TestBit(bit, array) ((array[LONG(bit)] >> OFF(bit)) & 1) #define MIN_KEYCODE 8 #define GLYPHS_PER_KEY 2 @@ -356,13 +351,13 @@ EvdevKeyNew (InputInfoPtr pInfo) int i, keys = 0; for (i = 0; i <= KEY_UNKNOWN; i++) - if (TestBit (i, pEvdev->bits.key)) { + if (test_bit (i, pEvdev->bits.key)) { keys = 1; break; } if (!keys) for (i = KEY_OK; i <= KEY_MAX; i++) - if (TestBit (i, pEvdev->bits.key)) { + if (test_bit (i, pEvdev->bits.key)) { keys = 1; break; } -- cgit v1.2.3