summaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2001-12-20 16:47:30 +0000
committerKeith Packard <keithp@keithp.com>2001-12-20 16:47:30 +0000
commit88810cfc02941d7e54924e25aa872e5cc740d274 (patch)
tree84ae49d484d53b3abb26d996d22d258a97eefebb /hw
parent83388cb23282471e80d513bd3ab472b51c110b35 (diff)
kdrive/linux/mouse.c: convert mouse data to signed values for compilersxf-4_1_99_7xf-4_1_99_6xf-4_1_99_5xf-4_1_99_4Domain-sync4Domain-sync3
with default unsigned chars
Diffstat (limited to 'hw')
-rw-r--r--hw/kdrive/linux/mouse.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/hw/kdrive/linux/mouse.c b/hw/kdrive/linux/mouse.c
index 147d1b56b..13d97f25c 100644
--- a/hw/kdrive/linux/mouse.c
+++ b/hw/kdrive/linux/mouse.c
@@ -1,5 +1,5 @@
/*
- * $XFree86: xc/programs/Xserver/hw/kdrive/linux/mouse.c,v 1.2 2001/11/08 09:35:08 keithp Exp $
+ * $XFree86: xc/programs/Xserver/hw/kdrive/linux/mouse.c,v 1.4 2001/12/07 02:18:19 keithp Exp $
*
* Copyright © 2001 Keith Packard, member of The XFree86 Project, Inc.
*
@@ -499,8 +499,8 @@ static Bool busParse (KdMouseInfo *mi, unsigned char *ev, int ne)
unsigned long flags;
flags = KD_MOUSE_DELTA;
- dx = (char) ev[1];
- dy = -(char) ev[2];
+ dx = (signed char) ev[1];
+ dy = -(signed char) ev[2];
if ((ev[0] & 4) == 0)
flags |= KD_BUTTON_1;
if ((ev[0] & 2) == 0)
@@ -538,8 +538,8 @@ static Bool msParse (KdMouseInfo *mi, unsigned char *ev, int ne)
if (ev[0] & 0x10)
flags |= KD_BUTTON_3;
- dx = (char)(((ev[0] & 0x03) << 6) | (ev[1] & 0x3F));
- dy = (char)(((ev[0] & 0x0C) << 4) | (ev[2] & 0x3F));
+ dx = (signed char)(((ev[0] & 0x03) << 6) | (ev[1] & 0x3F));
+ dy = (signed char)(((ev[0] & 0x0C) << 4) | (ev[2] & 0x3F));
if (!MouseReasonable (mi, flags, dx, dy))
return FALSE;
if (km->stage == MouseWorking)
@@ -612,8 +612,8 @@ static Bool logiParse (KdMouseInfo *mi, unsigned char *ev, int ne)
if (ev[0] & 0x10)
flags |= KD_BUTTON_3;
- dx = (char)(((ev[0] & 0x03) << 6) | (ev[1] & 0x3F));
- dy = (char)(((ev[0] & 0x0C) << 4) | (ev[2] & 0x3F));
+ dx = (signed char)(((ev[0] & 0x03) << 6) | (ev[1] & 0x3F));
+ dy = (signed char)(((ev[0] & 0x0C) << 4) | (ev[2] & 0x3F));
flags |= km->state & KD_BUTTON_2;
}
else
@@ -661,8 +661,8 @@ static Bool mscParse (KdMouseInfo *mi, unsigned char *ev, int ne)
flags |= KD_BUTTON_2;
if (!(ev[0] & 0x1))
flags |= KD_BUTTON_3;
- dx = (char)(ev[1]) + (char)(ev[3]);
- dy = - ((char)(ev[2]) + (char)(ev[4]));
+ dx = (signed char)(ev[1]) + (signed char)(ev[3]);
+ dy = - ((signed char)(ev[2]) + (signed char)(ev[4]));
if (!MouseReasonable (mi, flags, dx, dy))
return FALSE;