summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
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>
2013-04-09Use DEBUG, not DEBUG_ON to determine whether debugging is enabledPeter Hutterer
Nothing else looks at DEBUG_ON. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-01-22config: Add missing AC_CONFIG_SRCDIRAlan Coopersmith
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>
2013-01-16autogen.sh: Honor NOCONFIGURE=1Colin Walters
See http://people.gnome.org/~walters/docs/build-api.txt Signed-off-by: Adam Jackson <ajax@redhat.com>
2013-01-16configure: Drop AM_MAINTAINER_MODEAdam Jackson
Signed-off-by: Adam Jackson <ajax@redhat.com>
2013-01-04unifdef -U__UNIXOS2__Alan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2012-11-05Include Xwindows.h rather than windows.hRyan Pavlik
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>
2012-11-01Reset scan state when opening a new fileDaniel Stone
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>
2012-10-31Add parsing support for multiple keysyms per levelDaniel Stone
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>
2012-03-22xkbcomp 1.2.4xkbcomp-1.2.4Alan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-12-28Delete redundant redeclarations of extern Atoms in symbols.cAlan Coopersmith
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>
2011-12-28Make sure to leave room for trailing nil byte in yyGetNumberAlan Coopersmith
...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>
2011-12-06include resets group compatibility modifiers #43091Andreas Wettstein
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>
2011-11-11Silence -Wparentheses-equalityJeremy Huddleston
warning: equality comparison with extraneous parentheses [-Wparentheses-equality] Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-11-11Silence -Wshadow warningsJeremy Huddleston
warning: declaration shadows a local variable [-Wshadow] Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-11-11Correct our zeroing out of the row in InitRowInfoJeremy Huddleston
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>
2011-11-11Fix -Wformat warningsJeremy Huddleston
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-11-11Add missing _X_NORETURN to uFatalErrorJeremy Huddleston
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-11-11Include strings.h for strcasecmp and string.h for strdupJeremy Huddleston
Our minimum requirement for X11 is currently Unix98. Unix98 provides strcasecmp in <strings.h>. This commit fixes implicit declarations of this function on systems that closely adhere to the standard. Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-07-07Add .pc file for version exportPeter Hutterer
Exports xkbcomp version and the xkb base directory. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Gaetan Nadon <memsize@videotron.ca>
2011-06-22Print version number on -version.Peter Hutterer
This commit isn't playing the WARN/M/M1 macro game. Version numbers to to stdout, full stop. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-06-21Bump to 1.2.3xkbcomp-1.2.3Daniel Stone
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2011-06-21Interp: Allow explicit Any/NoSymbol mappingsDaniel Stone
Brown paper bag in full effect. The previous fix, while crushing the previous problem where an unknown keysym for an interp def would lead to every key matching it, also ignored explicit Any+AnyOfOrNone(All) mappings. Such as the one xkeyboard-config relied on for Control to actually update the modifier state. Fix this by allowing mappings explicitly declared as Any/NoSymbol, while ignoring only those with failed keysym lookups. Unfortunately, due to the structure of the parser, it's a deeply inelegant fix. Verified with a quick check of all layouts (albeit using default variants only) in xkeyboard-config that this results in no changes to the output at all, compared to xkbcomp 1.1.1. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2011-06-21Constify LookupKeysym input argumentDaniel Stone
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2011-06-21Bump to 1.2.2xkbcomp-1.2.2Daniel Stone
Emergency bugfix for the syminterp declarations. They've been broken since the beginning of time, but I guess we just haven't added new interpreted symbols since around then. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2011-06-21Interp: Ignore NoSymbol definitionsDaniel Stone
A NoSymbol syminterp leads to a Any+AnyOfOrAll(None) definition, which is never what anyone would actually ever want in a sym interp. The failure mode here was: interpret XF86SomeKeysymYouDontHaveYet { action=Something() } leading to: interpret Any+AnyOfOrAll(None) { action=Something() } leading to every single non-action key triggering your shiny new action that was only supposed to come from a new keysym. At least you could VT switch or zap, I guess. Later, more invasive, revisions will bring a more useful error message. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2011-06-21Interp: Don't make modifier lookup failure fatalDaniel Stone
If we can't look up a modifier in a SymInterp declaration, don't make that fatal enough to kill the entire file, just ignore it and move on. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2011-06-15config: move pre-processor flags to AM_CPPFLAGSGaetan Nadon
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2011-06-15config: let Automake handle Yacc dist and cleaningGaetan Nadon
BUILT_SOURCES and MAINTAINERCLEANFILES are already handled by Automake. Automake generates all the rules to handle building, distribution and cleaning. Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2011-06-08Replace repeated checks for gcc with _X_ATTRIBUTE_PRINTF from xprotoAlan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
2011-04-04xkbcomp: Stop possible overflow in yyGetnumber. #31647Alistair Leslie-Hughes
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=31647 Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com> Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-02-13Inline the oiText macro in the only place it's usedJulien Cristau
Gets rid of a compiler warning: geometry.c: In function 'HandleOverlayDef': geometry.c:2578: warning: the address of 'ol' will always evaluate as 'true' X.Org bug#34219 <https://bugs.freedesktop.org/show_bug.cgi?id=34219> Signed-off-by: Julien Cristau <jcristau@debian.org> Reviewed-by: Dirk Wallenstein <halsmit@t-online.de>
2011-02-11xkbcomp 1.2.1xkbcomp-1.2.1Peter Hutterer
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-01-19config: move man pages into their own directoryGaetan Nadon
Use services provided by XORG_MANPAGE_SECTIONS. Use standard Makefile for man pages. Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2011-01-13man: remove trailing spaces and tabsGaetan Nadon
Using s/[ \t]*$// Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2011-01-12config: replace deprecated AM_CONFIG_HEADER with AC_CONFIG_HEADERSGaetan Nadon
This silences an Autoconf warning
2011-01-12config: replace deprecated AC_HELP_STRING with AS_HELP_STRINGGaetan Nadon
This silences an Automake warning. Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2011-01-04Remove out-of-date copies of README.config & README.enhancingAlan Coopersmith
The up-to-date master copies of those documents are found in the xorg-docs module, and posted on the X.Org website. Also, x-docs.org no longer carries X11 docs, so point to X.Org's website instead in the README. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2010-11-01config: replace AC_CHECK_FILE with test -f as it fails to cross-compileGaetan Nadon
Testing for the presence of xkbparse.c is legitimate as this is a build file, but the Autoconf macro assumes it is testing on the host system and fails. Tested-by: Abdoulaye Walsimou Gaye <awg@embtoolkit.org> Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2010-11-01man: Improve description of device selection optionDirk Wallenstein
The device selection option takes effect when loading keymaps, too. Signed-off-by: Dirk Wallenstein <halsmit@t-online.de> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-11-01Allow uploading a keymap to a single deviceDirk Wallenstein
Signed-off-by: Dirk Wallenstein <halsmit@t-online.de> Reviewed-by: Julien Cristau <jcristau@debian.org> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-10-30xkbcomp 1.2.0xkbcomp-1.2.0Alan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>