From 3d31be5f871d48cf4a4b9d030307885bca785baa Mon Sep 17 00:00:00 2001 From: Daniel Stone Date: Fri, 16 Mar 2012 14:27:39 +0000 Subject: [PATCH] Also print group name in keysym error Unfortunately we can't get the actual file it was defined in this far down, but at least give the human-readable name rather than just a group index. Also, groups are not zero-indexed, such that index 0 is group 1; fix that too. Signed-off-by: Daniel Stone --- src/xkbcomp/symbols.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/xkbcomp/symbols.c b/src/xkbcomp/symbols.c index 7391251..26ee3c6 100644 --- a/src/xkbcomp/symbols.c +++ b/src/xkbcomp/symbols.c @@ -899,14 +899,14 @@ AddSymbolsToKey(KeyInfo * key, if (value->op != ExprKeysymList) { ERROR("Expected a list of symbols, found %s\n", exprOpText(value->op)); - ACTION("Ignoring symbols for group %d of %s\n", ndx, + ACTION("Ignoring symbols for group %d of %s\n", ndx + 1, longText(key->name)); return False; } if (key->syms[ndx] != NULL) { ERROR("Symbols for key %s, group %d already defined\n", - longText(key->name), ndx); + longText(key->name), ndx + 1); ACTION("Ignoring duplicate definition\n"); return False; } @@ -914,16 +914,17 @@ AddSymbolsToKey(KeyInfo * key, if (((key->numLevels[ndx] < nSyms) || (key->syms[ndx] == NULL)) && (!ResizeKeyGroup(key, ndx, nSyms, False))) { - WSGO("Could not resize group %d of key %s to contain %d levels\n", ndx, - longText(key->name), nSyms); + WSGO("Could not resize group %d of key %s to contain %d levels\n", + ndx + 1, longText(key->name), nSyms); ACTION("Symbols lost\n"); return False; } key->symsDefined |= (1 << ndx); for (i = 0; i < nSyms; i++) { if (!LookupKeysym(value->value.list.syms[i], &key->syms[ndx][i])) { - WARN("Could not resolve keysym %s for key %s, group %d, level %d\n", - value->value.list.syms[i], longText(key->name), ndx, nSyms); + WARN("Could not resolve keysym %s for key %s, group %d (%s), level %d\n", + value->value.list.syms[i], longText(key->name), ndx + 1, + XkbcAtomText(info->groupNames[ndx]), nSyms); key->syms[ndx][i] = NoSymbol; } } -- 2.7.4