summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>2008-03-16 02:44:35 -0300
committerPeter Hutterer <peter@cs.unisa.edu.au>2008-05-05 11:59:58 +0930
commitc616070ccdafd1dede1eb263bb480c7cf6cf6145 (patch)
tree240e258ae2de68428d2e761e3756ab74a16e7c19
parenteb984da21efe2fb52e49f1578b4257875d590a5b (diff)
Don't call non existing function and compile warning fixes.
Signed-off-by: Peter Hutterer <peter@cs.unisa.edu.au>
-rw-r--r--src/xf86MagicTouch.c21
1 files changed, 8 insertions, 13 deletions
diff --git a/src/xf86MagicTouch.c b/src/xf86MagicTouch.c
index 4de6559..1a784ff 100644
--- a/src/xf86MagicTouch.c
+++ b/src/xf86MagicTouch.c
@@ -12,12 +12,9 @@
#endif
#ifdef XFREE86_V4
-
-#ifndef XFree86LOADER
#include <errno.h>
#include <string.h>
#include <unistd.h>
-#endif
#include <misc.h>
#include <xf86.h>
@@ -213,7 +210,6 @@ static int debug_level = 0;
#define read(fd, ptr, num) xf86ReadSerial(fd, ptr, num)
#define write(fd, ptr, num) xf86WriteSerial(fd, ptr, num)
#define close(fd) xf86CloseSerial(fd)
-#define strdup(str) xf86strdup(str)
#endif
@@ -549,8 +545,10 @@ xf86MagicControl(DeviceIntPtr dev,
LocalDevicePtr local = (LocalDevicePtr) dev->public.devicePrivate;
MagicPrivatePtr priv = (MagicPrivatePtr)(local->private);
unsigned char map[] = { 0, 1 };
- unsigned char req[MAGIC_PACKET_SIZE], replay[MAGIC_PACKET_SIZE];
+ unsigned char req[MAGIC_PACKET_SIZE];
+#if 0
int status_line;
+#endif
switch (mode) {
case DEVICE_INIT:
@@ -725,7 +723,6 @@ GetPacket(LocalDevicePtr local, unsigned char *buffer, int *n_rx, int fd)
int num_bytes;
int i;
Bool ok;
- MagicPrivatePtr priv=(MagicPrivatePtr) local->private;
DBG(6, ErrorF("Entering GetPacket with packet_pos == %d\n", *n_rx) );
@@ -851,11 +848,10 @@ xf86MagicReadInput(LocalDevicePtr local)
MagicPrivatePtr priv = (MagicPrivatePtr)(local->private);
int cur_x, cur_y;
Bool touch_now;
- static int n_coms = 0;
if (!priv->e_presente) {
DBG(4,
- ErrorF("<<%s[%d]>> ReadInput: Touch Controller non inizializzato\n")
+ ErrorF("xf86MagicReadInput: Touch Controller non inizializzato\n")
);
return;
}
@@ -874,8 +870,8 @@ xf86MagicReadInput(LocalDevicePtr local)
cur_y = priv->packet_buf[3];
cur_y <<= 6;
cur_y |= priv->packet_buf[4];
-
- touch_now = priv->packet_buf[0] & MGCT_TOUCH == MGCT_TOUCH;
+
+ touch_now = (priv->packet_buf[0] & MGCT_TOUCH) == MGCT_TOUCH;
/* Se c'e' pressione sul touch inizio a calcolare la posizione
e a spostare il cursore grafico */
@@ -972,8 +968,7 @@ xf86MagicConvert(LocalDevicePtr local,
return TRUE;
}
-
-
+#ifndef XFree86LOADER
/*
************************************************************************
*
@@ -1066,7 +1061,7 @@ xf86MagicAllocate(InputDriverPtr drv)
return local;
} /* xf86MagicAllocae */
-
+#endif
#ifndef XFREE86_V4