On Tue, Feb 15, 2011 at 2:24 PM, Peter Hutterer <peter.hutte...@who-t.net>wrote:

> Signed-off-by: Peter Hutterer <peter.hutte...@who-t.net>
>

Acked-by: Ping Cheng <pingli...@gmail.com>

Ping


> ---
>  src/wcmCommon.c |   22 +++++++++++-----------
>  src/xf86Wacom.h |    6 ------
>  2 files changed, 11 insertions(+), 17 deletions(-)
>
> diff --git a/src/wcmCommon.c b/src/wcmCommon.c
> index af234e7..926fbc4 100644
> --- a/src/wcmCommon.c
> +++ b/src/wcmCommon.c
> @@ -782,23 +782,23 @@ static int wcmCheckSuppress(WacomCommonPtr common,
>        if (dsOrig->buttons != dsNew->buttons) returnV = 1;
>        if (dsOrig->stripx != dsNew->stripx) returnV = 1;
>        if (dsOrig->stripy != dsNew->stripy) returnV = 1;
> -       if (ABS(dsOrig->tiltx - dsNew->tiltx) > suppress) returnV = 1;
> -       if (ABS(dsOrig->tilty - dsNew->tilty) > suppress) returnV = 1;
> -       if (ABS(dsOrig->pressure - dsNew->pressure) > suppress) returnV =
> 1;
> -       if (ABS(dsOrig->capacity - dsNew->capacity) > suppress) returnV =
> 1;
> -       if (ABS(dsOrig->throttle - dsNew->throttle) > suppress) returnV =
> 1;
> -       if (ABS(dsOrig->rotation - dsNew->rotation) > suppress &&
> -               (1800 - ABS(dsOrig->rotation - dsNew->rotation)) >
>  suppress) returnV = 1;
> +       if (abs(dsOrig->tiltx - dsNew->tiltx) > suppress) returnV = 1;
> +       if (abs(dsOrig->tilty - dsNew->tilty) > suppress) returnV = 1;
> +       if (abs(dsOrig->pressure - dsNew->pressure) > suppress) returnV =
> 1;
> +       if (abs(dsOrig->capacity - dsNew->capacity) > suppress) returnV =
> 1;
> +       if (abs(dsOrig->throttle - dsNew->throttle) > suppress) returnV =
> 1;
> +       if (abs(dsOrig->rotation - dsNew->rotation) > suppress &&
> +               (1800 - abs(dsOrig->rotation - dsNew->rotation)) >
>  suppress) returnV = 1;
>
>        /* look for change in absolute wheel position
>         * or any relative wheel movement
>         */
> -       if ((ABS(dsOrig->abswheel - dsNew->abswheel) > suppress)
> +       if ((abs(dsOrig->abswheel - dsNew->abswheel) > suppress)
>                || (dsNew->relwheel != 0)) returnV = 1;
>
>        /* cursor moves or not? */
> -       if ((ABS(dsOrig->x - dsNew->x) > suppress) ||
> -                       (ABS(dsOrig->y - dsNew->y) > suppress))
> +       if ((abs(dsOrig->x - dsNew->x) > suppress) ||
> +                       (abs(dsOrig->y - dsNew->y) > suppress))
>        {
>                if (!returnV) /* need to check if cursor moves or not */
>                        returnV = 2;
> @@ -1307,7 +1307,7 @@ static void commonDispatchDevice(WacomCommonPtr
> common, unsigned int channel,
>                deltx *= priv->factorX;
>                delty *= priv->factorY;
>
> -               if (ABS(deltx)<1 && ABS(delty)<1)
> +               if (abs(deltx)<1 && abs(delty)<1)
>                {
>                        /* don't move the cursor */
>                        if (suppress == 1)
> diff --git a/src/xf86Wacom.h b/src/xf86Wacom.h
> index 7f04a5c..5ddb4e4 100644
> --- a/src/xf86Wacom.h
> +++ b/src/xf86Wacom.h
> @@ -66,12 +66,6 @@
>  #define DBG(lvl, priv, ...)
>  #endif
>
>
> -/*****************************************************************************
> - * General Macros
> -
> ****************************************************************************/
> -
> -#define ABS(x) ((x) > 0 ? (x) : -(x))
> -
>
>  
> /******************************************************************************
>  * WacomModule - all globals are packed in a single structure to keep the
>  *               global namespaces as clean as possible.
> --
> 1.7.3.5
>
>
> ------------------------------------------------------------------------------
> The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
> Pinpoint memory and threading errors before they happen.
> Find and fix more than 250 security defects in the development cycle.
> Locate bottlenecks in serial and parallel code that limit performance.
> http://p.sf.net/sfu/intel-dev2devfeb
> _______________________________________________
> Linuxwacom-devel mailing list
> Linuxwacom-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel
>
------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
Linuxwacom-devel mailing list
Linuxwacom-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel

Reply via email to