Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
libinput
libinput
Commits
d616218c
Commit
d616218c
authored
Sep 12, 2018
by
Peter Hutterer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tools: fix a bunch of format conversion complaints
Fixes
#137
Signed-off-by:
Peter Hutterer
<
peter.hutterer@who-t.net
>
parent
14e47ed2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
33 deletions
+33
-33
tools/libinput-record.c
tools/libinput-record.c
+32
-32
tools/shared.c
tools/shared.c
+1
-1
No files found.
tools/libinput-record.c
View file @
d616218c
...
...
@@ -379,8 +379,8 @@ buffer_key_event(struct record_context *ctx,
snprintf
(
event
->
u
.
libinput
.
msg
,
sizeof
(
event
->
u
.
libinput
.
msg
),
"{time: %ld.%06ld, type: %s, key: %d, state: %s}"
,
time
/
(
int
)
1e6
,
time
%
(
int
)
1e6
,
(
long
)(
time
/
(
int
)
1e6
)
,
(
long
)(
time
%
(
int
)
1e6
)
,
type
,
key
,
state
==
LIBINPUT_KEY_STATE_PRESSED
?
"pressed"
:
"released"
);
...
...
@@ -414,8 +414,8 @@ buffer_motion_event(struct record_context *ctx,
snprintf
(
event
->
u
.
libinput
.
msg
,
sizeof
(
event
->
u
.
libinput
.
msg
),
"{time: %ld.%06ld, type: %s, delta: [%6.2f, %6.2f], unaccel: [%6.2f, %6.2f]}"
,
time
/
(
int
)
1e6
,
time
%
(
int
)
1e6
,
(
long
)(
time
/
(
int
)
1e6
)
,
(
long
)(
time
%
(
int
)
1e6
)
,
type
,
x
,
y
,
uax
,
uay
);
...
...
@@ -449,8 +449,8 @@ buffer_absmotion_event(struct record_context *ctx,
snprintf
(
event
->
u
.
libinput
.
msg
,
sizeof
(
event
->
u
.
libinput
.
msg
),
"{time: %ld.%06ld, type: %s, point: [%6.2f, %6.2f], transformed: [%6.2f, %6.2f]}"
,
time
/
(
int
)
1e6
,
time
%
(
int
)
1e6
,
(
long
)(
time
/
(
int
)
1e6
)
,
(
long
)(
time
%
(
int
)
1e6
)
,
type
,
x
,
y
,
tx
,
ty
);
...
...
@@ -484,8 +484,8 @@ buffer_pointer_button_event(struct record_context *ctx,
snprintf
(
event
->
u
.
libinput
.
msg
,
sizeof
(
event
->
u
.
libinput
.
msg
),
"{time: %ld.%06ld, type: %s, button: %d, state: %s, seat_count: %u}"
,
time
/
(
int
)
1e6
,
time
%
(
int
)
1e6
,
(
long
)(
time
/
(
int
)
1e6
)
,
(
long
)(
time
%
(
int
)
1e6
)
,
type
,
button
,
state
==
LIBINPUT_BUTTON_STATE_PRESSED
?
"pressed"
:
"released"
,
...
...
@@ -541,8 +541,8 @@ buffer_pointer_axis_event(struct record_context *ctx,
snprintf
(
event
->
u
.
libinput
.
msg
,
sizeof
(
event
->
u
.
libinput
.
msg
),
"{time: %ld.%06ld, type: %s, axes: [%2.2f, %2.2f], discrete: [%d, %d], source: %s}"
,
time
/
(
int
)
1e6
,
time
%
(
int
)
1e6
,
(
long
)(
time
/
(
int
)
1e6
)
,
(
long
)(
time
%
(
int
)
1e6
)
,
type
,
h
,
v
,
hd
,
vd
,
...
...
@@ -596,8 +596,8 @@ buffer_touch_event(struct record_context *ctx,
snprintf
(
event
->
u
.
libinput
.
msg
,
sizeof
(
event
->
u
.
libinput
.
msg
),
"{time: %ld.%06ld, type: %s}"
,
time
/
(
int
)
1e6
,
time
%
(
int
)
1e6
,
(
long
)(
time
/
(
int
)
1e6
)
,
(
long
)(
time
%
(
int
)
1e6
)
,
type
);
break
;
case
LIBINPUT_EVENT_TOUCH_DOWN
:
...
...
@@ -609,8 +609,8 @@ buffer_touch_event(struct record_context *ctx,
snprintf
(
event
->
u
.
libinput
.
msg
,
sizeof
(
event
->
u
.
libinput
.
msg
),
"{time: %ld.%06ld, type: %s, slot: %d, seat_slot: %d, point: [%6.2f, %6.2f], transformed: [%6.2f, %6.2f]}"
,
time
/
(
int
)
1e6
,
time
%
(
int
)
1e6
,
(
long
)(
time
/
(
int
)
1e6
)
,
(
long
)(
time
%
(
int
)
1e6
)
,
type
,
slot
,
seat_slot
,
...
...
@@ -622,8 +622,8 @@ buffer_touch_event(struct record_context *ctx,
snprintf
(
event
->
u
.
libinput
.
msg
,
sizeof
(
event
->
u
.
libinput
.
msg
),
"{time: %ld.%06ld, type: %s, slot: %d, seat_slot: %d}"
,
time
/
(
int
)
1e6
,
time
%
(
int
)
1e6
,
(
long
)(
time
/
(
int
)
1e6
)
,
(
long
)(
time
%
(
int
)
1e6
)
,
type
,
slot
,
seat_slot
);
...
...
@@ -679,8 +679,8 @@ buffer_gesture_event(struct record_context *ctx,
"{time: %ld.%06ld, type: %s, nfingers: %d, "
"delta: [%6.2f, %6.2f], unaccel: [%6.2f, %6.2f], "
"angle_delta: %6.2f, scale: %6.2f}"
,
time
/
(
int
)
1e6
,
time
%
(
int
)
1e6
,
(
long
)(
time
/
(
int
)
1e6
)
,
(
long
)(
time
%
(
int
)
1e6
)
,
type
,
libinput_event_gesture_get_finger_count
(
g
),
libinput_event_gesture_get_dx
(
g
),
...
...
@@ -698,8 +698,8 @@ buffer_gesture_event(struct record_context *ctx,
sizeof
(
event
->
u
.
libinput
.
msg
),
"{time: %ld.%06ld, type: %s, nfingers: %d, "
"delta: [%6.2f, %6.2f], unaccel: [%6.2f, %6.2f]}"
,
time
/
(
int
)
1e6
,
time
%
(
int
)
1e6
,
(
long
)(
time
/
(
int
)
1e6
)
,
(
long
)(
time
%
(
int
)
1e6
)
,
type
,
libinput_event_gesture_get_finger_count
(
g
),
libinput_event_gesture_get_dx
(
g
),
...
...
@@ -875,8 +875,8 @@ buffer_tablet_tool_proximity_event(struct record_context *ctx,
snprintf
(
event
->
u
.
libinput
.
msg
,
sizeof
(
event
->
u
.
libinput
.
msg
),
"{time: %ld.%06ld, type: %s, proximity: %s, tool-type: %s, serial: %"
PRIu64
", axes: %s, %s}"
,
time
/
(
int
)
1e6
,
time
%
(
int
)
1e6
,
(
long
)(
time
/
(
int
)
1e6
)
,
(
long
)(
time
%
(
int
)
1e6
)
,
type
,
prox
?
"in"
:
"out"
,
tool_type
,
...
...
@@ -917,8 +917,8 @@ buffer_tablet_tool_button_event(struct record_context *ctx,
snprintf
(
event
->
u
.
libinput
.
msg
,
sizeof
(
event
->
u
.
libinput
.
msg
),
"{time: %ld.%06ld, type: %s, button: %d, state: %s}"
,
time
/
(
int
)
1e6
,
time
%
(
int
)
1e6
,
(
long
)(
time
/
(
int
)
1e6
)
,
(
long
)(
time
%
(
int
)
1e6
)
,
type
,
button
,
state
?
"pressed"
:
"released"
);
...
...
@@ -974,8 +974,8 @@ buffer_tablet_tool_event(struct record_context *ctx,
snprintf
(
event
->
u
.
libinput
.
msg
,
sizeof
(
event
->
u
.
libinput
.
msg
),
"{time: %ld.%06ld, type: %s%s, tip: %s, %s}"
,
time
/
(
int
)
1e6
,
time
%
(
int
)
1e6
,
(
long
)(
time
/
(
int
)
1e6
)
,
(
long
)(
time
%
(
int
)
1e6
)
,
type
,
btn_buffer
,
/* may be empty string */
tip
?
"down"
:
"up"
,
...
...
@@ -1016,8 +1016,8 @@ buffer_tablet_pad_button_event(struct record_context *ctx,
snprintf
(
event
->
u
.
libinput
.
msg
,
sizeof
(
event
->
u
.
libinput
.
msg
),
"{time: %ld.%06ld, type: %s, button: %d, state: %s, mode: %d, is-toggle: %s}"
,
time
/
(
int
)
1e6
,
time
%
(
int
)
1e6
,
(
long
)(
time
/
(
int
)
1e6
)
,
(
long
)(
time
%
(
int
)
1e6
)
,
type
,
button
,
state
==
LIBINPUT_BUTTON_STATE_PRESSED
?
"pressed"
:
"released"
,
...
...
@@ -1083,8 +1083,8 @@ buffer_tablet_pad_ringstrip_event(struct record_context *ctx,
snprintf
(
event
->
u
.
libinput
.
msg
,
sizeof
(
event
->
u
.
libinput
.
msg
),
"{time: %ld.%06ld, type: %s, number: %d, position: %.2f, source: %s, mode: %d}"
,
time
/
(
int
)
1e6
,
time
%
(
int
)
1e6
,
(
long
)(
time
/
(
int
)
1e6
)
,
(
long
)(
time
%
(
int
)
1e6
)
,
type
,
number
,
pos
,
...
...
@@ -1121,8 +1121,8 @@ buffer_switch_event(struct record_context *ctx,
snprintf
(
event
->
u
.
libinput
.
msg
,
sizeof
(
event
->
u
.
libinput
.
msg
),
"{time: %ld.%06ld, type: %s, switch: %d, state: %s}"
,
time
/
(
int
)
1e6
,
time
%
(
int
)
1e6
,
(
long
)(
time
/
(
int
)
1e6
)
,
(
long
)(
time
%
(
int
)
1e6
)
,
type
,
sw
,
state
==
LIBINPUT_SWITCH_STATE_ON
?
"on"
:
"off"
);
...
...
tools/shared.c
View file @
d616218c
...
...
@@ -697,7 +697,7 @@ tools_list_device_quirks(struct quirks_context *ctx,
case
QUIRK_ATTR_SIZE_HINT
:
case
QUIRK_ATTR_RESOLUTION_HINT
:
quirks_get_dimensions
(
quirks
,
*
q
,
&
dim
);
snprintf
(
buf
,
sizeof
(
buf
),
"%s=%
l
dx%
l
d"
,
name
,
dim
.
x
,
dim
.
y
);
snprintf
(
buf
,
sizeof
(
buf
),
"%s=%
z
dx%
z
d"
,
name
,
dim
.
x
,
dim
.
y
);
callback
(
userdata
,
buf
);
break
;
case
QUIRK_ATTR_TOUCH_SIZE_RANGE
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment