summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* xkbcomp 1.4.1xkbcomp-1.4.1Adam Jackson2018-03-011-1/+1
| | | | Signed-off-by: Adam Jackson <ajax@redhat.com>
* pkgconfig: add the exec_prefix substitutionPeter Hutterer2018-02-131-0/+1
| | | | | | | | | 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>
* pkgconfig: Add our bindir to xkbcomp.pcAdam Jackson2017-11-061-0/+1
| | | | | Reviewed-by: Daniel Stone <daniels@collabora.com> Signed-off-by: Adam Jackson <ajax@redhat.com>
* xkbcomp 1.4.0xkbcomp-1.4.0Daniel Stone2017-05-011-1/+1
| | | | Signed-off-by: Daniel Stone <daniels@collabora.com>
* keycodes: Ignore high keycodesDaniel Stone2017-04-111-8/+20
| | | | | | | | | | | | | | 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>
* autogen: add default patch prefixMihail Konev2017-01-261-0/+3
| | | | Signed-off-by: Mihail Konev <k.mvc@ya.ru>
* autogen.sh: use quoted string variablesEmil Velikov2017-01-261-4/+4
| | | | | | | | | 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>
* autogen.sh: use exec instead of waiting for configure to finishPeter Hutterer2017-01-261-1/+1
| | | | | | | 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>
* When a file contains several maps, look for a default mapRan Benita2016-01-081-4/+25
| | | | | | | | | | | | | | | | | 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>
* When overriding a key, adjust also its number of levels (#57242).Benno Schulenberg2015-11-091-7/+8
| | | | | | | | | | | | | 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>
* xkbcomp 1.3.1xkbcomp-1.3.1Peter Hutterer2015-11-051-1/+1
| | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* symbols: increase the warning level for shortening a key typePeter Hutterer2015-11-041-1/+1
| | | | | | | | | | | | | | | | | | | | 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>
* Adjust a NUL-string assignment to avoid const issues.Matthew Green2015-07-291-2/+2
| | | | | Signed-off-by: Thomas Klausner <wiz@NetBSD.org> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* Define WIN32_LEAN_AND_MEAN when building on Win32Jon TURNEY2015-04-091-0/+1
| | | | | | | | | | | 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>
* Stop including <X11/Xalloca.h> in parseutils.cAlan Coopersmith2015-03-031-1/+0
| | | | | | | | 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>
* xkbcomp 1.3.0xkbcomp-1.3.0Peter Hutterer2014-11-211-1/+1
| | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* xkbcomp: Improved -w option parsingVincent Lefevre2014-10-301-6/+26
| | | | | | | | | | | | | 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>
* Initialize nMatch even if WIN32 is definedAlan Coopersmith2014-03-101-1/+1
| | | | | | | | | | 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>
* Remove useless assignment to 'outline' variableAlan Coopersmith2014-03-101-1/+0
| | | | | | | | | | | 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>
* Don't dereference the pointer whose allocation failedAlan Coopersmith2014-03-102-2/+2
| | | | | | | | | | | | | | 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>
* Remove useless checks for NULL before free in OverlayKeyCreate()Alan Coopersmith2014-03-101-4/+2
| | | | | | | | | | | | | | | | | | 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>
* man: replace default include directory with the one from configurePeter Hutterer2014-02-052-1/+3
| | | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Gaetan Nadon <memsize@videotron.ca>
* Fix many const char * warnings from gccAlan Coopersmith2013-11-019-33/+33
| | | | | Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Jasper St. Pierre <jstpierre@mecheye.net>
* Convert remaining sprintf calls to snprintfAlan Coopersmith2013-11-014-12/+13
| | | | | | | | | 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>
* Remove unused uASSERT macroAlan Coopersmith2013-11-011-9/+0
| | | | | Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Jasper St. Pierre <jstpierre@mecheye.net>
* Remove unused function entry/exit tracking frameworkAlan Coopersmith2013-11-013-120/+0
| | | | | Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Jasper St. Pierre <jstpierre@mecheye.net>
* compat: don't warn about redefinition when nothing is defined yetPeter Hutterer2013-08-291-1/+1
| | | | | | | 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>
* Making sure that a copied string is always null-terminated (#66345).Benno Schulenberg2013-08-291-12/+2
| | | | | | | | | | | | | | 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>
* Parse -w1 flag correctly (#66344)Peter Hutterer2013-07-181-2/+2
| | | | | | | | | | | 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>
* Always terminate the scanBuf string (#66345)Peter Hutterer2013-07-181-1/+10
| | | | | | | | | | | | | | | 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>
* Add #include <stdlib.h> to xkbscan.cLaura2013-07-131-0/+1
| | | | | | | | | | | 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>
* Protect config.h like usual.Thomas Klausner2013-06-041-0/+2
| | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* man: document -help/-?, -em1, -emp, -emlPeter Hutterer2013-05-211-0/+12
| | | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Use DEBUG, not DEBUG_ON to determine whether debugging is enabledPeter Hutterer2013-04-091-1/+1
| | | | | | | Nothing else looks at DEBUG_ON. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* config: Add missing AC_CONFIG_SRCDIRbaserock/morphAlan Coopersmith2013-01-221-2/+5
| | | | | | | Regroup AC statements under the Autoconf initialization section. Regroup AM statements under the Automake initialization section. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* autogen.sh: Honor NOCONFIGURE=1Colin Walters2013-01-161-2/+3
| | | | | | See http://people.gnome.org/~walters/docs/build-api.txt Signed-off-by: Adam Jackson <ajax@redhat.com>
* configure: Drop AM_MAINTAINER_MODEAdam Jackson2013-01-161-1/+0
| | | | Signed-off-by: Adam Jackson <ajax@redhat.com>
* unifdef -U__UNIXOS2__Alan Coopersmith2013-01-042-6/+0
| | | | Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Include Xwindows.h rather than windows.hRyan Pavlik2012-11-051-1/+1
| | | | | | | | | | Include the specially wrapped windows.h in Xwindows.h, rather than including it directly to avoid compilation errors due to clashing definitions Signed-off-by: Ryan Pavlik <rpavlik@iastate.edu> Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
* Reset scan state when opening a new fileDaniel Stone2012-11-014-5/+12
| | | | | | | | | | | | | | | | | When we opened a new file after encountering a parse error, we weren't resetting our scan state, and continued to read out of the old buffer rather than that of the new file. Fixes a regression introduced in 9887842e ('Use fread() instead of getc()'). Test case: xkbcomp -lfhlpR "path/to/xkeyboard-config.git/symbols/*" The Makefiles in that tree would cause parse errors, the resulting directory file is incomplete (down from ~12000 to ~230 lines). Reported-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Daniel Stone <daniel@fooishbar.org>
* Add parsing support for multiple keysyms per levelDaniel Stone2012-10-311-1/+9
| | | | | | | | | | | Parse, but ignore, level definitions in the form of: key <FOO> { [ normal_sym, { M, U, L, T, I, S, Y, M } ] }; normal_sym will be carried, but the latter will be turned into NoSymbol. http://bugs.freedesktop.org/show_bug.cgi?id=25025 Signed-off-by: Daniel Stone <daniel@fooishbar.org>
* xkbcomp 1.2.4xkbcomp-1.2.4Alan Coopersmith2012-03-221-1/+1
| | | | Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Delete redundant redeclarations of extern Atoms in symbols.cAlan Coopersmith2011-12-281-4/+0
| | | | | | | | | | | | | Fixes gcc warnings of: symbols.c:43: warning: redundant redeclaration of 'tok_ONE_LEVEL' tokens.h:99: warning: previous declaration of 'tok_ONE_LEVEL' was here symbols.c:44: warning: redundant redeclaration of 'tok_TWO_LEVEL' tokens.h:100: warning: previous declaration of 'tok_TWO_LEVEL' was here symbols.c:45: warning: redundant redeclaration of 'tok_KEYPAD' tokens.h:102: warning: previous declaration of 'tok_KEYPAD' was here Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Make sure to leave room for trailing nil byte in yyGetNumberAlan Coopersmith2011-12-281-3/+3
| | | | | | | | | | | | | | | | | | | ...though really, by the time you've added 1023 digits to the number you want to parse, you've got much bigger problems than an off-by-one error in your buffer count. Fixes parfait warnings: Buffer overflow (CWE 120): In array dereference of (*buf)[nInBuf] with index 'nInBuf' Array size is 1024 bytes, nInBuf >= 1 and nInBuf <= 1024 at line 625 of xkbscan.c in function 'yyGetNumber'. Buffer overflow (CWE 120): In array dereference of (*buf)[nInBuf] with index 'nInBuf' Array size is 1024 bytes, nInBuf <= 1025 at line 632 of xkbscan.c in function 'yyGetNumber'. [ This bug was found by the Parfait 0.4.2 bug checking tool. For more information see http://labs.oracle.com/projects/parfait/ ] Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* include resets group compatibility modifiers #43091Andreas Wettstein2011-12-061-2/+4
| | | | | | | | | This change makes sure that include does not overwrite previous compatibility modifier settings when the included files does not explicitly specify them. Signed-off-by: Andreas Wettstein <wettstein509@solnet.ch> Reviewed-by: Daniel Stone <daniel@fooishbar.org>
* Silence -Wparentheses-equalityJeremy Huddleston2011-11-111-1/+1
| | | | | | warning: equality comparison with extraneous parentheses [-Wparentheses-equality] Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
* Silence -Wshadow warningsJeremy Huddleston2011-11-113-15/+15
| | | | | | warning: declaration shadows a local variable [-Wshadow] Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
* Correct our zeroing out of the row in InitRowInfoJeremy Huddleston2011-11-111-1/+1
| | | | | | | | | | geometry.c:369:20: warning: argument to 'sizeof' in '__builtin___memset_chk' call is the same pointer type 'RowInfo *' (aka 'struct _RowInfo *') as the destination; expected 'RowInfo' (aka 'struct _RowInfo') or an explicit length [-Wsizeof-pointer-memaccess] bzero(row, sizeof(RowInfo *)); ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~ Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
* Fix -Wformat warningsJeremy Huddleston2011-11-112-3/+3
| | | | Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
* Add missing _X_NORETURN to uFatalErrorJeremy Huddleston2011-11-112-2/+2
| | | | Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>