aboutsummaryrefslogtreecommitdiff
path: root/console-client/xkb/kstoucs.c
Commit message (Collapse)AuthorAgeFilesLines
* Use our own variant of 'assert' and 'assert_perror'.Justus Winter2017-08-051-2/+2
| | | | | Our variants print stack traces on failures. This will make locating errors much easier.
* console-client: Fix lower range of binary searchDiego Nieto Cid2015-06-051-4/+4
| | | | | | | | | | | | | | 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.
* console-client: assert preconditionDiego Nieto Cid2015-06-051-0/+4
| | | | * console-client/xkb/kstoucs.c (find_ucs): assert precondition.
* console-client: fix binary searchJustus Winter2015-05-231-2/+4
| | | | | | | | 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.
* console-client: avoid nested functionJustus Winter2015-05-231-17/+18
| | | | | | * 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.
* Fix gcc warningSamuel Thibault2013-09-211-0/+1
| | | | * console-client/xkb/kstoucs.c (find_ucs): Return 0 by default.
* Fix console hang on unknown key pressSamuel Thibault2013-05-011-2/+2
| | | | | * console-client/xkb/kstoucs.c (find_ucs): Remove middle value from recursive call range.
* Print KeySymToUcs4 calls.Diego Nieto Cid2011-04-161-0/+13
|
* Reimplement KeySymToUcs4.Diego Nieto Cid2011-04-161-310/+31
| | | | | | | * 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.
* Update foreign files.Diego Nieto Cid2011-04-081-9/+8
| | | | | | | | * 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.
* Add XKB parser and implementation.Marco Gerards2011-03-171-0/+317
* 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.