summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile2
-rw-r--r--src/multitouch.c13
2 files changed, 13 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index b8c7ec6..22934f5 100644
--- a/Makefile
+++ b/Makefile
@@ -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)))
////////////////////////////////////////////////////////////////////////////