tablet: check the button range before we use it

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Stephen Chandler Paul <thatslyude@gmail.com>
tablet: rename flags to mask

This is a simple button mask, use that naming.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Stephen Chandler Paul <thatslyude@gmail.com>
tablet: use "int32_t", not "signed"

stdint is a lot nicer, and safer once we're in the habit.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Stephen Chandler Paul <thatslyude@gmail.com>
tablet: print invalid evdev types/codes as string for debugging purposes

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
evdev: remove parantheses around tablet_(un)set_status

Having parantheses around tablet_has_status() is completely appropriate, but not
for setting/unsetting a status. There's no legitimate reason we'd ever be
checking the return value of tablet_(un)set_status() since it already stores
it's result in a variable. As such, having it expand with parantheses around it
means that if it's accidentally used in a conditional instead of
tablet_has_status() our compiler won't throw any sort of warning. And the subtle
differences between tablet_has_status() and tablet_set_status() are very easy to
miss when trying to debug this. Removing the parantheses causes gcc to warn if
the function is used as a conditional unintentionally.

Signed-off-by: Stephen Chandler Paul <thatslyude@gmail.com>
tools: print tablet axis debugging on one line

Print all axes on the same line, with a * for those that changed. This makes
changes on axes a lot more obvious than when broken up per line.

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