summaryrefslogtreecommitdiff
path: root/console-client/xkb
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.
2015-02-02Explicit the keymap compatibility flagsSamuel Thibault
Since "default" is not provided any more by xkb * console-client/xkb/xkb-data/keymap/hurd: Replace "default" xkb_compatibility by "basic+mousekeys+accessx(basic)+misc+iso9995+level5+caps(caps_lock)" for all keymaps.
2015-01-03console-client: Fix typos in commentsStefan Weil
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2014-05-26Avoid compiler warning about empty bodiesJustus Winter
Make empty bodies of control flow statements more explicit. Doing so will allow us to use stricter compiler settings. This would have cought 4ece292c. * console-client/xkb/xkb.c: Make empty bodies more explicit * libpipe/pipe.c: Likewise. * mach-defpager/default_pager.c: Likewise. * pfinet/linux-src/net/ipv4/fib_hash.c: Likewise. * pflocal/connq.c: Likewise. * pflocal/socket.c: Likewise.
2013-11-09Normalize whitespace at the end of each file to '\n'Justus Winter
Some files were not normalized. In console/motd.UTF8 the additional newline is intentional. Empty files were excluded as well.
2013-09-21Fix gcc warningSamuel Thibault
* console-client/xkb/kstoucs.c (find_ucs): Return 0 by default.
2013-06-01Fix descriptor leakMiguel Figueiredo
* console-client/xkb/compose.c (read_composefile): Always fclose `fc'.
2013-05-01Fix console hang on unknown key pressSamuel Thibault
* console-client/xkb/kstoucs.c (find_ucs): Remove middle value from recursive call range.
2012-09-23Add more keymapsSamuel Thibault
* console-client/xkb/xkb-data/keymap/hurd: Add keymaps used by the Debian installer.
2012-07-01Merge branch 'master' of git.savannah.gnu.org:/srv/git/hurd/hurdSamuel Thibault
2012-07-01Use path to x11 locales from x11.pc instead of our prefixSamuel Thibault
* configure.in (X11_PREFIX): Define from x11.pc's prefix variable. * console-client/xkb/compose.c (get_compile_file_for_locale): Use X11_PREFIX "/share" instead of DATADIR.
2012-07-01TODO: make xkb use rulesSamuel Thibault
2011-04-16Print KeySymToUcs4 calls.Diego Nieto Cid
2011-04-16Use locale's compose file by default.Diego Nieto Cid
* console-client/Makefile [HAVE_X11=yes](compose-CFLAGS): Define DATADIR. * console-client/pc-kbd.c (pc_kbd_init): Load compose file unconditionally. * console-client/xkb/compose.c: Include fcntl.h, unistd.h and locale.h (struct map_entry, enum callback_result, map_callback): New types. (map_iterate): New function. (struct matcher_context): New type. (match_left_set_right, match_right_set_left): New functions. (get_compose_file_for_locale): Likewise. (read_composefile): Use get_compose_file_for_locale result when argument composefn is NULL.
2011-04-16Avoid redefinition of NoSymbol.Diego Nieto Cid
* console-client/xkb/xkb.c: Remove macro NoSymbol. * console-client/xkb/compose.c: Likewise.
2011-04-16Delete xkb/HACKING file.Diego Nieto Cid
2011-04-16Cleanup.Diego Nieto Cid
2011-04-16Deallocate memory on errors.Diego Nieto Cid
* console-client/xkb/parser.y(parse_xkbconfig): Free cwd.
2011-04-16Remove default keymap.Diego Nieto Cid
* console-client/xkb/default.xkb: Removed file. * console-client/xkb/makeconf.sh: Likewise. * console-client/xkb/xkbdefaults.c: Likewise. * console-client/xkb/parser.y(parse_xkbconfig): Don't use harcoded defaults, return error when no keymap file is given.
2011-04-16Delete Compose file.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-08Depend on X11 for string to keysym mappings.Diego Nieto Cid
* config.make.in (HAVE_X11,X11_CFLAGS,X11_LIBS,XKB_BASE): New variables. * configure.in: Check for x11 module. * console-client/Makefile (PC_KBD_SO_SRCS): Move XKB sources... * console-client/Makefile (XKB_SRCS): ... here. New variable. * console-client/Makefile (SRCS): Add $(XKB_SRCS). * console-client/Makefile (LCLHDRS): Add xkb/xkb.h. * console-client/Makefile (XKB_DATA_DIR): Removed variable. * console-client/Makefile (pc_kbd.so.$(hurd-version)): Use patsubst. Depend on XKB objects when HAVE_X11 = yes. * console-client/Makefile (install): Depend on XKB datafiles when HAVE_X11 = yes. * console-client/Makefile (pc-kbd-CFLAGS): Set variable when HAVE_X11 = yes * console-client/Makefile ($(XKB_DATA_DIR),$(XKB_DATA_DIR)/%): Replaced by... * console-client/Makefile[HAVE_X11=yes]($(XKB_BASE),$(XKB_BASE)/%): ... this targets. * console-client/Makefile[HAVE_X11=yes](pc_kbd-LDLIBS): New variable. * console-client/xkb/keysymdef.h: Removed file. * console-client/xkb/ks_tables.h: Likewise. * console-client/xkb/symname.c: Likewise. * console-client/xkb/xkb.c: Include <X11/keysymdef.h>. * console-client/xkb/compose.c: Likewise. * console-client/xkb/xkb.h: Remove XStringToKeysym prototype. Include <X11/Xlib.h>.
2011-04-08Update xkb/README.Diego Nieto Cid
* console-client/xkb/README: Refer to this artifact as "module" instead of "input driver". Key repeater is now implemented by pc-kbd. Update the module's installation and usage procedures.
2011-04-08Use first section when there's no default.Diego Nieto Cid
* console-client/xkb/parser.y (skip_to_firstsection): New function. (include_section): Call skip_to_firstsection when skip_to_defaultsection fails.
2011-04-08* console-client/xkb/parser.y (include_section): Free filename.Diego Nieto Cid
2011-04-08* console-client/xkb/parser.y (include_section): Remove superflous strdup.Diego Nieto Cid
2011-04-08Added an example for selecting the keymap.Arne Babenhauserheide
* console-client/xkb/README: Keymap selection example.
2011-04-08Symbols 0..9 stand for their ascii character.Diego Nieto Cid
* console-client/xkb/parser.y(symbolname): Shift by '0' numbers [0..9].
2011-04-08Add support for hexadecimal symbols.Diego Nieto Cid
* console-client/xkb/parser.y(symbolname): Match and return hex value.
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-04-08Document new options.Diego Nieto Cid
* console-client/xkb/README: Updated.
2011-04-08* console-client/xkb/xkb.c (iskeypad): Access up to 'width' symbols.Diego Nieto Cid
2011-04-08'vmods' is an alias for 'virtual_modifiers'.Diego Nieto Cid
2011-04-08Fix handling of error conditions.Diego Nieto Cid
* console-client/xkb/parser.y (key_set_action): Test actions variable. (key_set_keysym): Test keysyms instead of keys.
2011-04-08Fix memory errors.Diego Nieto Cid
* console-client/xkb/parser.y (key_set_keysym): Consider symbol's size when reallocing. (key_set_action): Consider (xkb_action_t *)'s size when reallocing. Start clearing levels from 'width' and up to 'level'.
2011-04-08Add neo supportAlexander Preisinger
* console-client/xkb/xkb-data/keymap/hurd: New keymap neo.
2011-04-08README updateAlexander Preisinger
2011-04-08Enable hurd extensions in every layout.Diego Nieto Cid
2011-04-08Remove obsolete variable declaration.Diego Nieto Cid
2011-04-08Use vfprintf in debug_printf and write to stderr.Diego Nieto Cid
2011-04-08Add debugging messages.Diego Nieto Cid
* console-client/xkb/lex.l(include_file): Log file changes. * console-client/xkb/parser.y(key_set_keysym): Log symbol associations. (include_section): Log section being read. (symbolssect,keycodesect,key_new): Log current key. * console-client/xkb/xkbdata.c(keyname_add): Log keyname, keycode and hash. (set_rmod_keycode): Log modifier, keyname and keycode.
2011-04-08Emit warnings on undeclared virtual modifiers.Diego Nieto Cid
2011-04-08Report inexistent section.Diego Nieto Cid
* console-client/xkb/parser.y (include_section): Declare scanner_get_current_location and scanner_get_current_file prototypes. New local variables current_location, current_file and err. Report error and exit when a section cannot be processed successfully.
2011-04-08Add function to read the state of the scanner.Diego Nieto Cid
* console-client/xkb/lex.l (scanner_get_current_location): New function. (scanner_get_current_file): Likewise.
2011-04-08Check for end of file.Diego Nieto Cid
* console-client/xkb/parser.y [!YY_NULL]: Define YY_NULL, the end of file token. * console-client/xkb/parser.y (skip_to_sectionname): If the end of file is reached while skipping symbols return an error. Return 0 on success. * console-client/xkb/parser.y (skip_to_defaultsection): Likewise.
2011-04-08Propagate error on unexpected end of files.Diego Nieto Cid
* console-client/xkb/lex.l (close_include): Return an error code on failure. (yywrap): Indicate termination when close_include fails.
2011-04-08Give the file name and line number where an unexpected end of file was found.Diego Nieto Cid