summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-01-21Remove trailing whitespacesPeter Hutterer
Let's clean this up so I don't have to fight vim and git in removing them. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-11-05xkbcomp 1.4.4xkbcomp-1.4.4Peter Hutterer
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-10-21Fix lockdevbtn to be XkbSA_LockDeviceBtn actionMiroslav Koškár
2020-07-23Fix spelling/wording issuesAlan Coopersmith
Found by using: codespell --builtin clear,rare,usage,informal,code,names Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2020-06-05Don't pretend unresolved symbols are an errorPeter Hutterer
Whenever xkeyboard-config is newer than xorgproto, or libX11 just hasn't yet been rebuilt against the protocol we end up with some unresolved symbols. That's not an error, it just happens. Let's downgrade this to a warning instead. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-06-05For -R and after chdir, add the current directory to the pathPeter Hutterer
This restores the behavior pre 1aecdffaa0db7bbf85bc0aae9043e9437b25c30d, at least when -R is given. For a normal invocation without -R we don't add the current directory, because 1aecdff isn't totally wrong about whether that's a good idea. Fixes https://gitlab.freedesktop.org/xorg/app/xkbcomp/issues/3
2020-02-20xkbcomp 1.4.3xkbcomp-1.4.3Matt Turner
Signed-off-by: Matt Turner <mattst88@gmail.com>
2020-02-19Don't compare with string literalsDimitry Andric
xkbcomp.c:228:37: error: result of comparison against a string literal is unspecified (use an explicit string comparison function instead) [-Werror,-Wstring-compare] if ((argv[i][0] != '-') || (uStringEqual(argv[i], "-"))) ^~~~~~~~~~~~~~~~~~~~~~~~~~ ./utils.h:195:30: note: expanded from macro 'uStringEqual' ^~~~~~~~~~~~~~~~~~~~~ ./utils.h:198:38: note: expanded from macro 'uStringCompare' (s1)!=(s2):strcmp(s1,s2)) ^ ~~~~ Don't attempt to do this macro trickery, and simply use strcmp instead, where it applies. Bug: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=244235
2019-06-13Error out if we have no default pathPeter Hutterer
The path is set through configure.ac/Makefile.am and always defined anyway. Let's not re-define it here with a different value than our default. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-06-08xkbcomp Fix missing support for "affect" and incorrect modifier handling for ↵Andreas Wettstein
ISOLock Add missing support for "affect" flag to selectively affect locking or unlocking for for modifier locking, control locking, and ISOLock. Fix some incorrect masking and modifier handling for ISOLock. Signed-off-by: Andreas Wettstein <wettstein509@solnet.ch> Reviewed-By: Ran Benita <ran234@gmail.com> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2019-06-08Fix invalid error report on F_Accel fieldMiroslav Koškár
F_Accel is valid MovePtr field yet following error is reported: > Error: Field accel is not defined for an action of type MovePtr > Action definition ignored Signed-off-by: Miroslav Koškár <mk@mkoskar.com>
2019-02-12configure: Remove unused AC_SUBST([REQUIRED_MODULES])Andreas Boll
v2: Add square brackets back. Signed-off-by: Andreas Boll <andreas.boll.dev@gmail.com>
2019-02-11pkgconfig: Remove unneeded Requires.privateAndreas Boll
Fixes "pkg-config --exists xkbcomp" without installed pkg-config files for x11, xkbfile, and xproto >= 7.0.17. xkbcomp works fine without those pkg-config files. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=913359 Signed-off-by: Andreas Boll <andreas.boll.dev@gmail.com>
2018-12-11Suppress high-keycode warnings at the default warning levelAdam Jackson
We expect evdev to have keycodes above 255, there's no reason to warn about this. Signed-off-by: Adam Jackson <ajax@redhat.com>
2018-11-21Update configure.ac bug URL for gitlab migrationAlan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2018-06-08xkbcomp 1.4.2xkbcomp-1.4.2Peter Hutterer
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-06-08Ignore xkb_keycodes.maximum of > 255Peter Hutterer
Continuation from 7fdfabd75 "keycodes: Ignore high keycodes" A keymap with a key > 255 will have a xkb_keycodes.maximum of that keycode. Let's not throw a fatal error on that, just crop it back to the maximum of 255. This doesn't set the "high_keycode_warned" on purpose so we get this for the first key that actually matters. Reproducible with xkeyboard-config 2.24 which has a maximum of 374. https://bugzilla.redhat.com/show_bug.cgi?id=1587998 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2018-03-01xkbcomp 1.4.1xkbcomp-1.4.1Adam Jackson
Signed-off-by: Adam Jackson <ajax@redhat.com>
2018-02-13pkgconfig: add the exec_prefix substitutionPeter Hutterer
bindir gets replaced with: bindir=${exec_prefix}/bin but exec_prefix isn't set so we end up with an invalid bindir. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Jon Turney <jon.turney@dronecode.org.uk>
2017-11-06pkgconfig: Add our bindir to xkbcomp.pcAdam Jackson
Reviewed-by: Daniel Stone <daniels@collabora.com> Signed-off-by: Adam Jackson <ajax@redhat.com>
2017-05-01xkbcomp 1.4.0xkbcomp-1.4.0Daniel Stone
Signed-off-by: Daniel Stone <daniels@collabora.com>
2017-04-11keycodes: Ignore high keycodesDaniel Stone
Rather than throwing a fatal error when a keycode definition exceeds the declared maximum (i.e. 255), just ignore the definition and continue. This allows xkeyboard-config to start shipping datasets including high keycodes, which will work in xkbcommon as it ignores explicit range declarations. Signed-off-by: Daniel Stone <daniels@collabora.com> Reviewed-by: Ran Benita <ran234@gmail.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Reported-by: Christian Kellner <gicmo@gnome.org>
2017-01-26autogen: add default patch prefixMihail Konev
Signed-off-by: Mihail Konev <k.mvc@ya.ru>
2017-01-26autogen.sh: use quoted string variablesEmil Velikov
Place quotes around the $srcdir, $ORIGDIR and $0 variables to prevent fall-outs, when they contain space. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-01-26autogen.sh: use exec instead of waiting for configure to finishPeter Hutterer
Syncs the invocation of configure with the one from the server. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2016-01-08When a file contains several maps, look for a default mapRan Benita
Rather than always taking the first one in the file. This is exactly the intended use of the 'default' flag. Note that pretty much the same code is duplicated in xkbcomp.c when compiling a single file from the command line, but there it is implemented correctly (look for XkbLC_Default). https://bugs.freedesktop.org/show_bug.cgi?id=69950 Signed-off-by: Ran Benita <ran234@gmail.com> Tested-by: Benno Schulenberg <bensberg@justemail.net> Acked-by: Sergey Udaltsov <sergey.udaltsov@gmail.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-11-09When overriding a key, adjust also its number of levels (#57242).Benno Schulenberg
Specifying an explicit key type when overriding a key should adjust the number of levels to that of the specified type. This gets rid of the age-old warning of the right Alt key being ONE_LEVEL but having two symbols assigned. Fixes bug #57242 <http://bugs.freedesktop.org/show_bug.cgi?id=57242>. Signed-off-by: Benno Schulenberg <bensberg@justemail.net> Reviewed-by: Ran Benita <ran234@gmail.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-11-05xkbcomp 1.3.1xkbcomp-1.3.1Peter Hutterer
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-11-04symbols: increase the warning level for shortening a key typePeter Hutterer
Any use of the german keyboard layout or anything else using level3(ralt_switch) produces the warning Type "ONE_LEVEL" has 1 levels, but <RALT> has 2 symbols Ignoring extra symbols This warning is meaningless, the default definition for RALT comes from pc(pc105) including altwin(meta_alt) which defines it as TWO_LEVEL and { Alt_R, Meta_R }. Including level3(ralt_switch) correctly sets it as ONE_LEVEL but now we get the warning. That makes users file bug reports and we can't be having that, can we? Up the warning level for this case to one past the default. The warning is only useful when you're testing a new keyboard layout or trying to fix an actual bug with missing symbols. And then you can run xkbcomp with -w10. No need to spam the log on every server startup. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2015-07-29Adjust a NUL-string assignment to avoid const issues.Matthew Green
Signed-off-by: Thomas Klausner <wiz@NetBSD.org> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-04-09Define WIN32_LEAN_AND_MEAN when building on Win32Jon TURNEY
w32api/rpcnndr.h (included by windows.h) uses TypeString as the name of a structure member. xkbcomp.h defines it as a macro for a constant. Define WIN32_LEAN_AND_MEAN to avoid this clash. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: David Macek <david.macek.0@gmail.com>
2015-03-03Stop including <X11/Xalloca.h> in parseutils.cAlan Coopersmith
I can not find any point in our git history at which alloca() or the Xalloca.h macros ALLOCATE_LOCAL() & DEALLOCATE_LOCAL() were actually used in this source file. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2014-11-21xkbcomp 1.3.0xkbcomp-1.3.0Peter Hutterer
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-10-30xkbcomp: Improved -w option parsingVincent Lefevre
This patch improves -w option parsing even further, for cases like "xkbcomp -w6 4.xkb out.xkb" (which were not handled by the fix of the warning level is still optional (set to 0 if not present), and errors like "xkbcomp -wfoo in out" are detected and reported. https://bugs.freedesktop.org/show_bug.cgi?id=66344 Signed-off-by: Vincent Lefevre <vincent@vinc17.net> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-03-10Initialize nMatch even if WIN32 is definedAlan Coopersmith
Flagged by cppcheck 1.64: Checking app/xkbcomp/listing.c: WIN32... [app/xkbcomp/listing.c:335]: (error) Uninitialized variable: nMatch Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2014-03-10Remove useless assignment to 'outline' variableAlan Coopersmith
Flagged by cppcheck 1.64: [app/xkbcomp/geometry.c:2426] -> [app/xkbcomp/geometry.c:2427]: (performance) Variable 'outline' is reassigned a value before the old one has been used. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2014-03-10Don't dereference the pointer whose allocation failedAlan Coopersmith
Flagged by cppcheck 1.64: [app/xkbcomp/keycodes.c:264] -> [app/xkbcomp/keycodes.c:262]: (warning) Possible null pointer dereference: new - otherwise it is redundant to check it against null. [app/xkbcomp/keytypes.c:600] -> [app/xkbcomp/keytypes.c:597]: (warning) Possible null pointer dereference: old - otherwise it is redundant to check it against null. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2014-03-10Remove useless checks for NULL before free in OverlayKeyCreate()Alan Coopersmith
There is no need to ensure the pointers passed to free are not NULL, especially right after passing them to strncpy without checking for NULL. Flagged by cppcheck 1.64: [app/xkbcomp/parseutils.c:557] -> [app/xkbcomp/parseutils.c:559]: (warning) Possible null pointer dereference: over - otherwise it is redundant to check it against null. [app/xkbcomp/parseutils.c:558] -> [app/xkbcomp/parseutils.c:561]: (warning) Possible null pointer dereference: under - otherwise it is redundant to check it against null. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2014-02-05man: replace default include directory with the one from configurePeter Hutterer
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Gaetan Nadon <memsize@videotron.ca>
2013-11-01Fix many const char * warnings from gccAlan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Jasper St. Pierre <jstpierre@mecheye.net>
2013-11-01Convert remaining sprintf calls to snprintfAlan Coopersmith
Most were fixed length or length checked anyway, this just saves time doublechecking that. (A few could be replaced by asprintf, but we don't have a copy guaranteed to be reachable from this program yet.) Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Jasper St. Pierre <jstpierre@mecheye.net>
2013-11-01Remove unused uASSERT macroAlan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Jasper St. Pierre <jstpierre@mecheye.net>
2013-11-01Remove unused function entry/exit tracking frameworkAlan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Jasper St. Pierre <jstpierre@mecheye.net>
2013-08-29compat: don't warn about redefinition when nothing is defined yetPeter Hutterer
info->groupCompat[i] is bzero'd on init, define is 0. Don't warn when that is the case, otherwise any "group 2 = ..." statement will cause an error. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-08-29Making sure that a copied string is always null-terminated (#66345).Benno Schulenberg
A more minimalistic and formally correct solution. This amends and extends the previous fix for bug #66345, fixing not just yyGetKeyName() but also yyGetString(). Signed-off-by: Benno Schulenberg <bensberg@justemail.net> Fixes a typo from cdcd552 (should be sizeof - 1, not sizeof -i). Code flows that i is at most sizeof(scanBuf) - 1, so last is not needed. Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-07-18Parse -w1 flag correctly (#66344)Peter Hutterer
if the flag is "-w", then argv[i][1] is 'w' and unlikely to be a digit. Access [2] instead, which is either \0 or an actual digit. X.Org Bug 66344 <http://bugs.freedesktop.org/show_bug.cgi?id=66344> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Matt Dew <marcoz@osource.org>
2013-07-18Always terminate the scanBuf string (#66345)Peter Hutterer
If a key name exceeds 4 characters, the content of scanBuf is not null-terminated, giving error messages like syntax error: line 7 of test.xkb last scanned symbol is: FOOBARm Errors encountered in test.xkb; not compiled. (last character of the preceding 'maximum' statement in this case) X.Org Bug 66345 <http://bugs.freedesktop.org/show_bug.cgi?id=66345> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-07-13Add #include <stdlib.h> to xkbscan.cLaura
This fixes an issue with _exit not declared when building xkbcomp version 1.2.4 natively on Windows using MinGW32 (version 4.7.2) from www.mingw.org. https://bugs.freedesktop.org/show_bug.cgi?id=62365 Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-06-04Protect config.h like usual.Thomas Klausner
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-05-21man: document -help/-?, -em1, -emp, -emlPeter Hutterer
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>