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 | |||
| 4 | 4 | ||
| 5 | o_src = multitouch | 5 | o_src = multitouch |
| 6 | 6 | ||
| 7 | TARGETS = #$(addsuffix /test,$(MODULES)) | 7 | TARGETS = $(addsuffix /test,$(MODULES)) |
| 8 | 8 | ||
| 9 | OBJECTS = $(addsuffix .o,\ | 9 | OBJECTS = $(addsuffix .o,\ |
| 10 | $(foreach mod,$(MODULES),\ | 10 | $(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 @@ | |||
| 25 | #include <xf86.h> | 25 | #include <xf86.h> |
| 26 | #include <xf86_OSproc.h> | 26 | #include <xf86_OSproc.h> |
| 27 | #include <xf86Xinput.h> | 27 | #include <xf86Xinput.h> |
| 28 | #include <exevents.h> | 28 | //#include <exevents.h> |
| 29 | #include <linux/input.h> | 29 | #include <linux/input.h> |
| 30 | #include <errno.h> | ||
| 31 | |||
| 32 | //////////////////////////////////////////////////////////////////////////// | ||
| 33 | |||
| 34 | #define SYSCALL(call) while (((call) == -1) && (errno == EINTR)) | ||
| 35 | |||
| 36 | #define LONG_BITS (sizeof(long) * 8) | ||
| 37 | #define NBITS(x) (((x) + LONG_BITS - 1) / LONG_BITS) | ||
| 38 | #define OFF(x) ((x) % LONG_BITS) | ||
| 39 | #define LONG(x) ((x) / LONG_BITS) | ||
| 40 | #define TEST_BIT(bit, array) (array[LONG(bit)] & (1 << OFF(bit))) | ||
| 30 | 41 | ||
| 31 | //////////////////////////////////////////////////////////////////////////// | 42 | //////////////////////////////////////////////////////////////////////////// |
| 32 | 43 | ||
