aboutsummaryrefslogtreecommitdiff
path: root/console-client/xkb/parser.y
Commit message (Collapse)AuthorAgeFilesLines
* console-client: use xkbcommon instead of x11 for xkb extended supportEtienne Brateau2024-03-101-1605/+0
| | | | | | | | | | | | | | | | | | This allow to reduce the dependencies, only xkbcommon (keyboard support only) is required instead of the whole x11 library + lex + yacc. This replacement allow to reduce the code size, now features are handled by xkbcommon itself. The functionnalites remain the sames (actions are reimplemented but in the code directly as it’s impossible to add custom actions). The custom xkb data files are removed as we can now directly use the standard ones from xkeyboard-config. The configuration to launch the console keyboard modules changed to now directly configure the model+layout+variat+options directly. Tested by compiling with and without xkbcommon. Tested X11 (ran i3 correctly). Composing is still working. Message-ID: <20240309234838.31923-1-etienne.brateau@gmail.com>
* Further modernize Hurd code by enforcing strict prototypes and no implicit ↵Flavio Cruz2023-04-081-3/+3
| | | | | | | | | | | | | | | | | | function declarations. Most of the changes land in one of these buckets: * Removed unused declarations. * Used (void) to represent no parameters instead of () which means an undeterminate number of parameters. * Included missing header files whenever necessary (stdlib.h, sys/mman.h, etc) * Typedefed function pointers to be able to fully declare the parameter types. * Added declarations of library functions that are used elsewhere (example is libps/ps.h). * Made functions static whenever they are only used in that file. * Forwarded declarations of some methods that were made static. Message-Id: <ZDD1o7/tVYeZew+G@jupiter.tail36e24.ts.net>
* console-client: Fix typos in commentsStefan Weil2015-01-031-3/+3
| | | | Signed-off-by: Stefan Weil <sw@weilnetz.de>
* Cleanup.Diego Nieto Cid2011-04-161-12/+0
|
* Deallocate memory on errors.Diego Nieto Cid2011-04-161-1/+7
| | | | * console-client/xkb/parser.y(parse_xkbconfig): Free cwd.
* Remove default keymap.Diego Nieto Cid2011-04-161-16/+3
| | | | | | | | * 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.
* Use first section when there's no default.Diego Nieto Cid2011-04-081-2/+30
| | | | | | * console-client/xkb/parser.y (skip_to_firstsection): New function. (include_section): Call skip_to_firstsection when skip_to_defaultsection fails.
* * console-client/xkb/parser.y (include_section): Free filename.Diego Nieto Cid2011-04-081-0/+3
|
* * console-client/xkb/parser.y (include_section): Remove superflous strdup.Diego Nieto Cid2011-04-081-1/+1
|
* Symbols 0..9 stand for their ascii character.Diego Nieto Cid2011-04-081-1/+7
| | | | * console-client/xkb/parser.y(symbolname): Shift by '0' numbers [0..9].
* Add support for hexadecimal symbols.Diego Nieto Cid2011-04-081-0/+1
| | | | * console-client/xkb/parser.y(symbolname): Match and return hex value.
* Fix handling of error conditions.Diego Nieto Cid2011-04-081-2/+2
| | | | | * console-client/xkb/parser.y (key_set_action): Test actions variable. (key_set_keysym): Test keysyms instead of keys.
* Fix memory errors.Diego Nieto Cid2011-04-081-4/+4
| | | | | | | * 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'.
* Add debugging messages.Diego Nieto Cid2011-04-081-4/+12
| | | | | | | | | * 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.
* Emit warnings on undeclared virtual modifiers.Diego Nieto Cid2011-04-081-0/+2
|
* Report inexistent section.Diego Nieto Cid2011-04-081-6/+36
| | | | | | | * 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.
* Check for end of file.Diego Nieto Cid2011-04-081-7/+19
| | | | | | | | | * 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.
* Rule vmod returns an int with the vmod's bit on.Diego Nieto Cid2011-04-081-1/+4
| | | | This allows to combine virtual modifiers safely.
* Skip to main file's default section when needed.Diego Nieto Cid2011-04-081-0/+2
|
* Add missing semicolons bison was inserting.Diego Nieto Cid2011-04-041-157/+157
| | | | * console-client/xkb/parser.y: Add semicolons where needed.
* Add type to $$ in mid-rules.Diego Nieto Cid2011-04-041-2/+2
| | | | (see http://www.mail-archive.com/help-bison@gnu.org/msg02159.html )
* Add XKB parser and implementation.Marco Gerards2011-03-171-0/+1529
* 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.