This matches commit 78a894231ae8ec4959007b6d9b8d2a15d6333a1e from
libX11:
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
Signed-off-by: Ran Benita <ran234@gmail.com>
This matches commit 24283d40b1e4314c6647dda49d2a159833341a8b from
libX11:
Since makekeys is built using build environment's compiler and
runs natively, we have to make sure that the size of the
Signature type is the same on both the native environment
and the target, otherwise we get mismatches upon running X,
and some LSB test failures (xts5).
Use an unsigned 32-bit integer on all platforms.
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Signed-off-by: Ran Benita <ran234@gmail.com>
Fix all reported null dereferences from clang-analyzer.
There seems to be one false negative (in file indicators.c), but it is
fixed anyway.
Signed-off-by: Ran Benita <ran234@gmail.com>
Every caller did the exact same check on the group bounds after calling
ExprResolveGroup, so might as well do it inside.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
We never want to solely lookup a virtual modifier without also looking
up core modifiers. So, rather than chaining the vmod lookup inside the
core modifier lookup, invert the ordering.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
None of the lookup functions anyone ever used supported field
references, so don't pretend we do in the API.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
groupNames was declared in compat.c as a global to anything which
included compat.h (for which groupNames was its sole reason to exist),
but only ever used in indicators.c.
Which is kind of fortunate, given that e314931e removed identical
definitions of groupNames (as integers, not masks) from both action.c
and symbols.c.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Move the bulk of ExprResolveInteger into an internal function called
ExprResolveIntegerLookup, and introduce ExprResolveInteger as a simple
wrapper which doesn't take priv/lookup arguments.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Because, joke's on you, it wasn't actually looking up radio groups.
Just checking to see if it was a string that was "none", or an integer.
Lord give me strength.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Which is just a slightly more typesafe wrapper around the chained
ExprResolveModMask everyone was using earlier.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Make sure we carry over an explicit minimum/maximum keycode setting,
rather than just using the computed minimum/maximum; this got broken
while changing the keycode range to be unsigned.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Reported-by: Pekka Paalanen <ppaalanen@gmail.com>
Thanks to autotools happily building stale generated sources, I hadn't
actually ever built my xkbparse.y changes. Fix that so it not only
compiles, but works. This seems to parse long keycodes correctly,
although I very much would not recommend testing this by declaring
0x1fffffff as your highest keycode.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Some error paths don't set info->xkb correctly, so just do like most
utility functions and pass the xkb_desc explicitly.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
And use it consistently everywhere, including with a special long-safe
internal keycode type, to ease the transition to large keycodes.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
For some reason, lex decided to reduce a strcpy into an assignment,
leading to entirely justified valgrind warnings about invalid reads,
when scanFile was set to a string which may have only ever lived on the
stack of a now-exited function.
Make it a strdup() instead.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Some routes through HandleGeometryVar do not set a return value. Set a default
value for the return variable to avoid returning an uninitialised value.
Which just calls XkbcFreeKeyboard with the only arguments you'd ever
pass it.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Signed-off-by: Daniel Stone <daniel@fooishbar.org>