diff options
-rw-r--r-- | console-client/xkb/lex.l | 3 | ||||
-rw-r--r-- | console-client/xkb/parser.y | 16 | ||||
-rw-r--r-- | console-client/xkb/xkbdata.c | 4 |
3 files changed, 17 insertions, 6 deletions
diff --git a/console-client/xkb/lex.l b/console-client/xkb/lex.l index 8887e7a5..71d6dfc9 100644 --- a/console-client/xkb/lex.l +++ b/console-client/xkb/lex.l @@ -323,6 +323,8 @@ overlay2 { yylval.val = 2; return OVERLAY; } { YY_BUFFER_STATE buffer; + debug_printf ("including file %s\n.", fname); + if (include_stack_ptr >= MAX_INCLUDE_DEPTH) { fprintf (stderr, "Includes nested too deeply\n"); @@ -358,6 +360,7 @@ overlay2 { yylval.val = 2; return OVERLAY; } lineno = include_stack[include_stack_ptr].currline; filename = include_stack[include_stack_ptr].filename; yy_switch_to_buffer (include_stack[include_stack_ptr].buffer); + debug_printf ("closing file. going back to %s.\n", filename); return (0); } } diff --git a/console-client/xkb/parser.y b/console-client/xkb/parser.y index 79dfdbba..66134f89 100644 --- a/console-client/xkb/parser.y +++ b/console-client/xkb/parser.y @@ -266,6 +266,7 @@ keycodesect: | "minimum" '=' NUM ';' keycodesect { min_keys = $3; + debug_printf ("working on key: %d\n", $3); current_key = &keys[$3]; } | MAXIMUM '=' NUM ';' keycodesect @@ -1053,7 +1054,7 @@ symbolssect: { include_sections ($3, XKBSYMBOLS, "symbols", $2); } symbolinclude | symbolssect actiondef -| symbolssect "key" '.' {current_key = default_key; } keydesc ';' +| symbolssect "key" '.' {debug_printf ("working on default key.\n"); current_key = default_key; } keydesc ';' | symbolssect error ';' { yyerror ("Error in symbol section\n"); } ; @@ -1253,7 +1254,7 @@ include_section (char *incl, int sectionsymbol, char *dirname, } include_file (includefile, new_mm, strdup (filename)); - + debug_printf ("skipping to section %s\n", (sectionname ? sectionname : "default")); /* If there is a sectionname not the entire file should be included, the scanner should be positioned at the required section. */ int err; @@ -1389,10 +1390,12 @@ key_set_keysym (struct key *key, group_t group, int level, symbol ks) } else /* For NoSymbol leave the old symbol intact. */ - if (!ks) + if (!ks) { + debug_printf ("symbol %d was not added to key.\n", ks); return; + } - + debug_printf ("symbol '%c'(%d) added to key for group %d and level %d.\n", ks, ks, group, level); keysyms[level++] = ks; } @@ -1459,6 +1462,7 @@ key_new (char *keyname) if (!isempty ((char *) &keys[kc], sizeof (struct key))) { current_key = &dummy_key; + debug_printf ("working on dummy key due to merge mode.\n"); return; } else @@ -1474,8 +1478,11 @@ key_new (char *keyname) current_key = &keys[kc]; } + debug_printf ("working on key %s(%d)", keyname, kc); + if (current_key->numgroups == 0 || merge_mode == replace) { + debug_printf (" cloned default key"); /* Clone the default key. */ memcpy (current_key, default_key, sizeof (struct key)); for (group = 0; group < 3; group++) @@ -1486,6 +1493,7 @@ key_new (char *keyname) current_key->groups[group].width = 0; } } + debug_printf ("\n"); } /* Load the XKB configuration from the section XKBKEYMAP in the diff --git a/console-client/xkb/xkbdata.c b/console-client/xkb/xkbdata.c index ad71e0b3..767bf38a 100644 --- a/console-client/xkb/xkbdata.c +++ b/console-client/xkb/xkbdata.c @@ -83,7 +83,7 @@ keyname_add (char *keyname, int keycode) kn->rmods = 0; kn_int = keyname_hash(keyname); - debug_printf ("add : %d\n", kn_mapping.locp_offset); + debug_printf ("add key %s(%d) hash: %d\n", keyname, keycode, kn_int); hurd_ihash_add (&kn_mapping, kn_int, kn); return 0; @@ -449,7 +449,7 @@ set_rmod_keycode (char *keyname, int rmod) { keycode_t kc = keyname_find (keyname); keys[kc].mods.rmods = rmod; - debug_printf ("kc %d = %d\n", kc, rmod); + debug_printf ("%s (kc %d) rmod: %d\n", keyname, kc, rmod); } /* Initialize XKB data structures. */ |