summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de>2004-03-17 20:31:18 +0000
committerAlexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de>2004-03-17 20:31:18 +0000
commitc2fe3d18851a1d2f48b9a7eb3681eae227fba988 (patch)
tree91ff8c54591411139422a3146fdf36c3f7ad00e9
parent6162e7a92ff46fcd9247929a08ae9b7811966759 (diff)
merge with XORG-RELEASE-1 (tag XORG-CYGWIN-LAST-MERGE)
-rw-r--r--README.sgml2
-rw-r--r--man/mouse.man2
-rw-r--r--src/mouse.c11
-rw-r--r--src/pnp.c2
4 files changed, 13 insertions, 4 deletions
diff --git a/README.sgml b/README.sgml
index 88c647c..6b8f626 100644
--- a/README.sgml
+++ b/README.sgml
@@ -8,7 +8,7 @@
<date>17 December 2002
<ident>
-$XFree86: xc/programs/Xserver/hw/xfree86/doc/sgml/mouse.sgml,v 1.13 2002/12/17 20:55:22 dawes Exp $
+$XFree86: xc/programs/Xserver/hw/xfree86/doc/sgml/mouse.sgml,v 1.12 2002/02/22 21:45:13 dawes Exp $
</ident>
<toc>
diff --git a/man/mouse.man b/man/mouse.man
index 0b2dac1..4316f3a 100644
--- a/man/mouse.man
+++ b/man/mouse.man
@@ -1,4 +1,4 @@
-.\" $XFree86: xc/programs/Xserver/hw/xfree86/input/mouse/mouse.man,v 1.7 2003/05/29 21:48:10 herrb Exp $
+.\" $XFree86: xc/programs/Xserver/hw/xfree86/input/mouse/mouse.man,v 1.6 2003/04/03 22:18:31 dawes Exp $
.\" shorthand for double quote that works everywhere.
.ds q \N'34'
.TH MOUSE __drivermansuffix__ __vendorversion__
diff --git a/src/mouse.c b/src/mouse.c
index 0cbca6f..a1a2ca9 100644
--- a/src/mouse.c
+++ b/src/mouse.c
@@ -1,3 +1,4 @@
+/* $XdotOrg: xc/programs/Xserver/hw/xfree86/input/mouse/mouse.c,v 1.1.4.2.4.2 2004/03/04 20:16:41 kaleb Exp $ */
/* $XFree86: xc/programs/Xserver/hw/xfree86/input/mouse/mouse.c,v 1.79 2003/11/03 05:11:48 tsi Exp $ */
/*
*
@@ -1388,7 +1389,11 @@ MouseReadInput(InputInfoPtr pInfo)
(pBuf[0] & 0x80) >> 3; /* button 5 */
dx = (pBuf[0] & 0x10) ? pBuf[1]-256 : pBuf[1];
dy = (pBuf[0] & 0x20) ? -(pBuf[2]-256) : -pBuf[2];
- dz = (char)(pBuf[3] | ((pBuf[3] & 0x08) ? 0xf8 : 0));
+ /*
+ * The next cast must be 'signed char' for platforms (like PPC)
+ * where char defaults to unsigned.
+ */
+ dz = (signed char)(pBuf[3] | ((pBuf[3] & 0x08) ? 0xf8 : 0));
if ((pBuf[3] & 0xf8) && ((pBuf[3] & 0xf8) != 0xf8)) {
if (pMse->autoProbe) {
SetMouseProto(pMse, PROT_EXPPS2);
@@ -1498,6 +1503,10 @@ MouseReadInput(InputInfoPtr pInfo)
dy = - ((char)(pBuf[2]) + (char)(pBuf[4]));
/* FreeBSD sysmouse sends additional data bytes */
if (pMse->protoPara[4] >= 8) {
+ /*
+ * These casts must be 'signed char' for platforms (like PPC)
+ * where char defaults to unsigned.
+ */
dz = ((signed char)(pBuf[5] << 1) +
(signed char)(pBuf[6] << 1)) >> 1;
buttons |= (int)(~pBuf[7] & 0x7f) << 3;
diff --git a/src/pnp.c b/src/pnp.c
index 0ae100f..80dc667 100644
--- a/src/pnp.c
+++ b/src/pnp.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/input/mouse/pnp.c,v 1.21 2003/11/03 05:11:49 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/input/mouse/pnp.c,v 1.20tsi Exp $ */
/*
* Copyright 1998 by Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp>
*