diff options
author | Diego Nieto Cid <dnietoc@gmail.com> | 2010-07-31 01:51:47 -0300 |
---|---|---|
committer | Diego Nieto Cid <dnietoc@gmail.com> | 2011-04-08 14:36:17 -0300 |
commit | effb6217301ea3c63341fc8998f462e0ecacb11a (patch) | |
tree | 672ca051271fb161b7974cc66b87f3a6a78955d3 | |
parent | a8b17a86351e4d800d9308bd9fd58e6c28828500 (diff) |
Rule vmod returns an int with the vmod's bit on.
This allows to combine virtual modifiers safely.
-rw-r--r-- | console-client/xkb/parser.y | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/console-client/xkb/parser.y b/console-client/xkb/parser.y index 328fa606..d6e27c79 100644 --- a/console-client/xkb/parser.y +++ b/console-client/xkb/parser.y @@ -315,7 +315,10 @@ vmods_def: /* Return the number of the virtual modifier. */ vmod: - IDENTIFIER { $$ = vmod_find ($1); } + IDENTIFIER + { if (($$ = vmod_find ($1)) != 0) + $$ = 1 << ($$ - 1); + } ; /* A single realmodifier. */ |