summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--compat.c4
-rw-r--r--parseutils.c7
-rw-r--r--parseutils.h2
-rw-r--r--xkbcomp.h1
-rw-r--r--xkbparse.y4
5 files changed, 11 insertions, 7 deletions
diff --git a/compat.c b/compat.c
index a058dfb..759535a 100644
--- a/compat.c
+++ b/compat.c
@@ -658,9 +658,9 @@ HandleInterpDef(InterpDef * def, XkbDescPtr xkb, unsigned merge,
ACTION("Symbol interpretation ignored\n");
return True;
}
- if (def->sym == NoSymbol)
+ if (def->ignore)
{
- ERROR("Couldn't determine keysym\n");
+ ERROR("Couldn't lookup keysym\n");
ACTION("Symbol interpretation ignored\n");
return True;
}
diff --git a/parseutils.c b/parseutils.c
index fe0a536..ca665e2 100644
--- a/parseutils.c
+++ b/parseutils.c
@@ -220,7 +220,7 @@ BoolVarCreate(Atom nameToken, unsigned set)
}
InterpDef *
-InterpCreate(KeySym sym, ExprDef * match)
+InterpCreate(const char *sym_str, ExprDef * match)
{
InterpDef *def;
@@ -229,7 +229,10 @@ InterpCreate(KeySym sym, ExprDef * match)
{
def->common.stmtType = StmtInterpDef;
def->common.next = NULL;
- def->sym = sym;
+ if (LookupKeysym(sym_str, &def->sym) == 0)
+ def->ignore = True;
+ else
+ def->ignore = False;
def->match = match;
}
else
diff --git a/parseutils.h b/parseutils.h
index c6ac4ce..8b8a6c1 100644
--- a/parseutils.h
+++ b/parseutils.h
@@ -88,7 +88,7 @@ extern VarDef *BoolVarCreate(Atom /* nameToken */ ,
unsigned /* set */
);
-extern InterpDef *InterpCreate(KeySym /* sym */ ,
+extern InterpDef *InterpCreate(const char * /* sym_str */ ,
ExprDef * /* match */
);
diff --git a/xkbcomp.h b/xkbcomp.h
index d6a7185..fb40061 100644
--- a/xkbcomp.h
+++ b/xkbcomp.h
@@ -243,6 +243,7 @@ typedef struct _InterpDef
KeySym sym;
ExprDef *match;
VarDef *def;
+ Bool ignore;
} InterpDef;
typedef struct _IndicatorNameDef
diff --git a/xkbparse.y b/xkbparse.y
index d73b92a..51b3bf7 100644
--- a/xkbparse.y
+++ b/xkbparse.y
@@ -374,9 +374,9 @@ InterpretDecl : INTERPRET InterpretMatch OBRACE
;
InterpretMatch : KeySym PLUS Expr
- { $$= InterpCreate(XStringToKeysym($1), $3); }
+ { $$= InterpCreate($1, $3); }
| KeySym
- { $$= InterpCreate(XStringToKeysym($1), NULL); }
+ { $$= InterpCreate($1, NULL); }
;
VarDeclList : VarDeclList VarDecl