summaryrefslogtreecommitdiff
path: root/console-client/xkb/kstoucs.c
AgeCommit message (Collapse)Author
2015-06-05console-client: Fix lower range of binary searchDiego Nieto Cid
To prevent infinite recursion range checking was introduced as an exit condition adding two extra comparisons on each recursive call. By fixing the range used by the recursive call over the lower half of the array one can avoid penalizing successful lookups while still preventing infinite recursion due to `first` parameter being greater than `last` parameter. * console-client/xkb/kstoucs.c (find_ucs): don't remove middle from the lower range. Remove extra comparisons.
2015-06-05console-client: assert preconditionDiego Nieto Cid
* console-client/xkb/kstoucs.c (find_ucs): assert precondition.
2015-05-23console-client: fix binary searchJustus Winter
Previously, the binary search through the keysym map was incorrectly implemented. This resulted in infinite loops (thanks to the compilers tail call optimization) or crashes (if the stack space was exhausted). * console-client/xkb/kstoucs.c (find_ucs): Fix binary search.
2015-05-23console-client: avoid nested functionJustus Winter
* console-client/xkb/kstoucs.c (find_ucs): Previously, this function was a nested function for no reason at all. Turn it into a normal function.
2013-09-21Fix gcc warningSamuel Thibault
* console-client/xkb/kstoucs.c (find_ucs): Return 0 by default.
2013-05-01Fix console hang on unknown key pressSamuel Thibault
* console-client/xkb/kstoucs.c (find_ucs): Remove middle value from recursive call range.
2011-04-16Print KeySymToUcs4 calls.Diego Nieto Cid
2011-04-16Reimplement KeySymToUcs4.Diego Nieto Cid
* console-client/Makefile (DIST_FILES): Add xkb/kstoucs_map.sh. (kstoucs_map.c): New target. * console-client/xkb/kstoucs.c: Reimplement KeySymToUcs4. * console-client/xkb/kstoucs_map.sh: New file.
2011-04-08Update foreign files.Diego Nieto Cid
* console-client/xkb/keysymdef.h: Replaced file. * console-client/xkb/ks_tables.h: Likewise. * console-client/xkb/kstoucs.c: Likewise. * console-client/xkb/symname.c: Likewise. * console-client/xkb/HACKING: New file, added foreign files information.
2011-03-17Add XKB parser and implementation.Marco Gerards
* console-client/xkb/Compose: New file. * console-client/xkb/MISSING-FEATURES: Likewise. * console-client/xkb/README: Likewise. * console-client/xkb/TODO: Likewise. * console-client/xkb/compose.c: Likewise. * console-client/xkb/default.xkb: Likewise. * console-client/xkb/keysymdef.h: Likewise. * console-client/xkb/ks_tables.h: Likewise. * console-client/xkb/kstoucs.c: Likewise. * console-client/xkb/lex.l: Likewise. * console-client/xkb/makeconf.sh: Likewise. * console-client/xkb/parser.y: Likewise. * console-client/xkb/symname.c: Likewise. * console-client/xkb/xkb-data/keymap/hurd: Likewise. * console-client/xkb/xkb-data/symbols/hurd: Likewise. * console-client/xkb/xkb-data/types/hurd: Likewise. * console-client/xkb/xkb.c: Likewise. * console-client/xkb/xkb.h: Likewise. * console-client/xkb/xkbdata.c: Likewise. * console-client/xkb/xkbdefaults.c: Likewise. * console-client/xkb/xkbtimer.c: Likewise.