summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Gerecke <jason.gerecke@wacom.com>2022-02-16 16:24:16 -0800
committerPeter Hutterer <peter.hutterer@who-t.net>2022-02-22 10:41:51 +1000
commitdf632685d02939957bebc61c4df5617652ce608e (patch)
tree509409551a25a39f2c3b9d662d7f9a75c4f7e884
parent19a2ac80507aca77c9e30f445c9e245c474c7865 (diff)
downloadxf86-input-wacom-df632685d02939957bebc61c4df5617652ce608e.tar.gz
wacom-record: Print unsigned values with %u rather than %d
Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
-rw-r--r--tools/wacom-record.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/tools/wacom-record.c b/tools/wacom-record.c
index eb7cb24..77d9aa4 100644
--- a/tools/wacom-record.c
+++ b/tools/wacom-record.c
@@ -102,7 +102,7 @@ static inline void print_axes(const WacomEventData *data)
static void proximity(WacomDevice *device, gboolean is_prox_in, WacomEventData *data)
{
- printf(" - source: %d\n"
+ printf(" - source: %u\n"
" event: proximity\n"
" proximity-in: %s\n",
wacom_device_get_id(device), strbool(is_prox_in));
@@ -111,7 +111,7 @@ static void proximity(WacomDevice *device, gboolean is_prox_in, WacomEventData *
static void motion(WacomDevice *device, gboolean is_absolute, WacomEventData *data)
{
- printf(" - source: %d\n"
+ printf(" - source: %u\n"
" mode: %s\n"
" event: motion\n",
wacom_device_get_id(device),
@@ -122,7 +122,7 @@ static void motion(WacomDevice *device, gboolean is_absolute, WacomEventData *da
static void button(WacomDevice *device, gboolean is_absolute, int button,
gboolean is_press, WacomEventData *data)
{
- printf(" - source: %d\n"
+ printf(" - source: %u\n"
" event: button\n"
" button: %d\n"
" is-press: %s\n",
@@ -132,7 +132,7 @@ static void button(WacomDevice *device, gboolean is_absolute, int button,
static void key(WacomDevice *device, gboolean keycode, gboolean is_press)
{
- printf(" - source: %d\n"
+ printf(" - source: %u\n"
" event: key\n"
" key: %d\n"
" is-press: %s\n", wacom_device_get_id(device),
@@ -141,7 +141,7 @@ static void key(WacomDevice *device, gboolean keycode, gboolean is_press)
static void evdev(WacomDevice *device, const struct input_event *evdev)
{
- printf(" - { source: %d, event: evdev, data: [%6ld, %6ld, %3d, %3d, %10d] } # %s / %-20s %5d\n",
+ printf(" - { source: %u, event: evdev, data: [%6ld, %6ld, %3d, %3d, %10d] } # %s / %-20s %5d\n",
wacom_device_get_id(device),
evdev->input_event_sec,
evdev->input_event_usec,
@@ -159,7 +159,7 @@ static void device_added(WacomDriver *driver, WacomDevice *device)
WacomOptions *options = wacom_device_get_options(device);
GSList *opts = wacom_options_list_keys(options);
- printf(" - source: %d\n"
+ printf(" - source: %u\n"
" event: new-device\n"
" name: \"%s\"\n",
wacom_device_get_id(device), wacom_device_get_name(device));
@@ -248,7 +248,7 @@ static void device_added(WacomDriver *driver, WacomDevice *device)
static void device_removed(WacomDriver *driver, WacomDevice *device)
{
- printf(" - source: %d\n"
+ printf(" - source: %u\n"
" event: removed-device\n"
" name: \"%s\"\n",
wacom_device_get_id(device), wacom_device_get_name(device));
@@ -368,7 +368,7 @@ int main(int argc, char **argv)
if (grab_device)
wacom_options_set(options, "Grab", "true");
if (debug_level) {
- g_autofree char *lvl = g_strdup_printf("%d", debug_level);
+ g_autofree char *lvl = g_strdup_printf("%u", debug_level);
wacom_options_set(options, "DebugLevel", lvl);
wacom_options_set(options, "CommonDBG", lvl);
}