PKGBUILDs/extra/xf86-input-magictouch/git-c616070c.patch
2009-10-09 21:23:22 -05:00

97 lines
2.6 KiB
Diff

From c616070ccdafd1dede1eb263bb480c7cf6cf6145 Mon Sep 17 00:00:00 2001
From: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>
Date: Sun, 16 Mar 2008 05:44:35 +0000
Subject: Don't call non existing function and compile warning fixes.
Signed-off-by: Peter Hutterer <peter@cs.unisa.edu.au>
---
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
--
cgit v0.8.2