| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
The order of dict values is not deterministic in python leading to differing
header file generation which results in differing build output for the same
configuration. Sort to remove this inconsistency and make the output
reproducible.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Reviewed-by: Filipe Laíns <lains@archlinux.org>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
|
|
| |
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
|
|
|
|
|
| |
Mostly whitespace changes, two semicolon removals and one change to "foo is
None".
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
|
|
|
|
| |
It's well past time. If you need this to run on python2, patch it out locally.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
|
|
| |
Signed-off-by: Michael Forney <mforney@mforney.org>
|
|
|
|
|
|
|
|
| |
This is a GNU C extension, and is not available in ISO C.
Instead, just explicitly initialize other indices to -1.
Signed-off-by: Michael Forney <mforney@mforney.org>
|
|
|
|
|
|
| |
Don't rely on cat, just let our script read everything as required.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
|
|
| |
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
|
|
|
|
|
|
|
|
| |
ABS_MT_TOOL_TYPE values are an enum, not a numerical value like all other
axes. So let's allow converting those values to string.
Fixes https://gitlab.freedesktop.org/libevdev/libevdev/issues/1
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
|
|
|
|
|
|
|
|
|
|
| |
Some of the *_MAX names are duplicates and have a real define. These were not
resolved until now.
Fixes https://gitlab.freedesktop.org/libevdev/libevdev/issues/3
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
|
|
|
|
|
|
|
|
| |
Two variable renames for less ambiguity
Two changes from an long if condition to a "if foo in [...]"
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
They have the same value, so the _MAX code would shadow the real code, causing
issues in any client that needs to get all event names from libevdev.
Specifically, the loop of:
for each code in 0 to max-for-type:
print(name)
would not show up the code (but the _MAX) code instead. This causes issues
with clients that rely on name resolution that works. And the _MAX values are
special values anyway.
Blacklist it in the script here, causing it to resolve from name to code, but
not from code to name (like other duplicated codes).
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
They have the same value, so the _MAX code would shadow the real code, causing
issues in any client that needs to get all event names from libevdev.
Specifically, the loop of:
for each code in 0 to max-for-type:
print(name)
would not show up the code (but the _MAX) code instead. This causes issues
with clients that rely on name resolution that works. And the _MAX values are
special values anyway.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
|
|
|
|
|
|
|
| |
leftover from when this was part of evemu
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
|
|
|
|
|
|
|
|
|
|
| |
The kernel has split most of the event codes out to a new header but the FF_
bits are missing from that header. Until this is fixed upstream, change the
event code parsing so it can take two files (using cat and stdin) so we can
update the kernel headers again.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
|
|
|
|
|
|
|
|
| |
clang looks at GCC pragmas, but doesn't understand -Woverride-init. Instead,
it uses -Winitializer-overrides.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
|
|
|
|
|
|
|
|
|
| |
12717d79 "Add libevdev_event_type/code_from_name() resolvers" added the
lookup functions for types and codes, this commit adds the missing ones for
input properties.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
|
|
|
|
|
|
|
|
|
| |
We only take one option (path to linux/input.h) anyway so drop the argparse
requirement. This way libevdev builds on RHEL6 too which doesn't ship
argparse.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
|
|
|
|
|
|
|
|
| |
This is a leftover from when the file was in evemu and used to generate python
headers too.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
|
|
|
|
|
| |
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Additionally to type->string mapping tables we now also create
string->type lookup tables. The lookup tables are sorted by their name
so binary-search will work.
We create one lookup table for EV_* types and one for all event-codes.
More tables (like bus-names, input-properties, ..) can be added later.
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
|
|
|
|
| |
Rather than a hardcoded path inside the source.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
|
|
|
|
|
|
|
| |
Will be defined as 0xf in 3.12, see
http://git.kernel.org/cgit/linux/kernel/git/dtor/input.git/commit/?h=next&id=52764fed5049655926bcecaefd52f0a415ceb105
And add the required ifdef guards for kernels before that.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Having the declarations in the form of [0...EV_MAX] = NULL together
with the actual definitions causes warnings for every true definition if
-Woverride-init is enabled.
We can drop them for most as they're zero, but still need them for
ev_max (which defaults to -1), not zero. So use the GCC pragma to
disable the warnings for this file.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Python 3 doesn't have a print statement, only a print function.
Fixed with:
2to3 make-event-names.py | git apply
Print as function requires Python 2.6 which is reasonable enough given
that even RHEL6 ships that.
Even though it's not needed for 2.6, use
from __future__ import print_function
to avoid accidentally introducing a print statement in the future.
With this line, print "blah" is now a syntax error in python 2.
This line was added manually, after the 2to3 conversion.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
|
|
| |
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
|
|
| |
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
|
|
| |
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|