<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.5848" name=GENERATOR></HEAD>
<BODY
style="WORD-WRAP: break-word; webkit-nbsp-mode: space; webkit-line-break: after-white-space">
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff
size=2></FONT> </DIV><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> xorg-bounces@lists.freedesktop.org
[mailto:xorg-bounces@lists.freedesktop.org] <B>On Behalf Of </B>Donald
Kayser<BR><B>Sent:</B> Friday, August 28, 2009 8:17 AM<BR><B>To:</B>
xorg@lists.freedesktop.org<BR><B>Subject:</B> xf86-input-mouse signed/unsigned
issue with Microsoft protocol<BR></FONT><BR></DIV>
<DIV></DIV>I am developing under a PPC embedded system running 2.6.30.2 Linux,
xserver from debian distribution of 7.3+19, xf86-input-mouse 1.3.0. I have a
custom board that I am sending Microsoft mouse 3 byte protocol through a pipe to
the input of xserver via the mouse driver. I was able to make small movements,
all positive, but if I moved negative, the mouse would jump a large amount in
the positive direction. I checked out from git and built the mouse driver and
turned on debug to find out and it is not accepting negative numbers correctly
in the case of PROT_MS. By changing the cast on lines 1304/1305 in mouse.c from
(char) to (signed char), I fixed the problem. I don't know if this exists on
other (non PPC) platforms. I also noticed the potential for the same
problem in a few more places. I am using gcc-4.3.
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
<DIV><SPAN class=799052614-28082009><FONT face=Arial color=#0000ff size=2>Chars
are unsigned on ppc and, I believe s390.
</FONT></SPAN></DIV></BODY></HTML>