On Wed, Nov 24, 2010 at 9:37 PM, Peter Hutterer
<[email protected]> wrote:
> Instead of a quadruple-nested ternary operator, just print the type_name.
>
> Signed-off-by: Peter Hutterer <[email protected]>

Acked-by: Ping Cheng <[email protected]>

Ping
> ---
>  src/wcmCommon.c |    5 +----
>  src/xf86Wacom.c |    8 ++------
>  2 files changed, 3 insertions(+), 10 deletions(-)
>
> diff --git a/src/wcmCommon.c b/src/wcmCommon.c
> index b8c5654..28521dc 100644
> --- a/src/wcmCommon.c
> +++ b/src/wcmCommon.c
> @@ -567,10 +567,7 @@ void wcmSendEvents(InputInfoPtr pInfo, const 
> WacomDeviceState* ds)
>
>        DBG(7, priv, "[%s] o_prox=%s x=%d y=%d z=%d "
>                "b=%s b=%d tx=%d ty=%d wl=%d rot=%d th=%d\n",
> -               (type == STYLUS_ID) ? "stylus" :
> -                       (type == CURSOR_ID) ? "cursor" :
> -                       (type == ERASER_ID) ? "eraser" :
> -                       (type == TOUCH_ID) ? "touch" : "pad",
> +               pInfo->type_name,
>                priv->oldProximity ? "true" : "false",
>                x, y, z, is_button ? "true" : "false", buttons,
>                tx, ty, ds->abswheel, ds->rotation, ds->throttle);
> diff --git a/src/xf86Wacom.c b/src/xf86Wacom.c
> index 417c11c..35e1703 100644
> --- a/src/xf86Wacom.c
> +++ b/src/xf86Wacom.c
> @@ -526,9 +526,7 @@ static int wcmDevInit(DeviceIntPtr pWcm)
>
>        DBG(10, priv,
>                "(%s) %d buttons, %d keys, %d axes\n",
> -               IsStylus(priv) ? "stylus" :
> -               IsCursor(priv) ? "cursor" :
> -               IsPad(priv) ? "pad" : "eraser",
> +               pInfo->type_name,
>                nbbuttons, nbkeys, nbaxes);
>
>        for(loop=1; loop<=nbbuttons; loop++)
> @@ -944,9 +942,7 @@ static int wcmDevProc(DeviceIntPtr pWcm, int what)
>        DBG(2, priv, "BEGIN dev=%p priv=%p "
>                        "type=%s flags=%d fd=%d what=%s\n",
>                        (void *)pWcm, (void *)priv,
> -                       IsStylus(priv) ? "stylus" :
> -                       IsCursor(priv) ? "cursor" :
> -                       IsPad(priv) ? "pad" : "eraser",
> +                       pInfo->type_name,
>                        priv->flags, pInfo ? pInfo->fd : -1,
>                        (what == DEVICE_INIT) ? "INIT" :
>                        (what == DEVICE_OFF) ? "OFF" :
> --
> 1.7.3.2
>
> ------------------------------------------------------------------------------
> Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
> Tap into the largest installed PC base & get more eyes on your game by
> optimizing for Intel(R) Graphics Technology. Get started today with the
> Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
> http://p.sf.net/sfu/intelisp-dev2dev
> _______________________________________________
> Linuxwacom-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel
>

------------------------------------------------------------------------------
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
_______________________________________________
Linuxwacom-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel

Reply via email to