diff options
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | src/multitouch.c | 13 |
2 files changed, 13 insertions, 2 deletions
@@ -4,7 +4,7 @@ MODULES = src o_src = multitouch -TARGETS = #$(addsuffix /test,$(MODULES)) +TARGETS = $(addsuffix /test,$(MODULES)) OBJECTS = $(addsuffix .o,\ $(foreach mod,$(MODULES),\ diff --git a/src/multitouch.c b/src/multitouch.c index 2c9b98a..2dfba79 100644 --- a/src/multitouch.c +++ b/src/multitouch.c @@ -25,8 +25,19 @@ #include <xf86.h> #include <xf86_OSproc.h> #include <xf86Xinput.h> -#include <exevents.h> +//#include <exevents.h> #include <linux/input.h> +#include <errno.h> + +//////////////////////////////////////////////////////////////////////////// + +#define SYSCALL(call) while (((call) == -1) && (errno == EINTR)) + +#define LONG_BITS (sizeof(long) * 8) +#define NBITS(x) (((x) + LONG_BITS - 1) / LONG_BITS) +#define OFF(x) ((x) % LONG_BITS) +#define LONG(x) ((x) / LONG_BITS) +#define TEST_BIT(bit, array) (array[LONG(bit)] & (1 << OFF(bit))) //////////////////////////////////////////////////////////////////////////// |