Commit 41472822b68bd71b2b1ac5c2cf57f28b727ef744

Ran Benita 2012-08-29T15:17:00

Use XKB_MOD_INVALID instead of XkbNoModifier Signed-off-by: Ran Benita <ran234@gmail.com>

diff --git a/src/keymap-dump.c b/src/keymap-dump.c
index 949c595..df1a3c2 100644
--- a/src/keymap-dump.c
+++ b/src/keymap-dump.c
@@ -562,7 +562,7 @@ write_compat(struct xkb_keymap *keymap, struct buf *buf)
                   SIMatchText(interp->match),
                   VModMaskText(keymap, interp->mods));
 
-        if (interp->virtual_mod != XkbNoModifier) {
+        if (interp->virtual_mod != XKB_MOD_INVALID) {
             write_buf(buf, "\t\t\tvirtualModifier= %s;\n",
                       keymap->vmod_names[interp->virtual_mod]);
         }
diff --git a/src/text.c b/src/text.c
index c98b915..12d90c4 100644
--- a/src/text.c
+++ b/src/text.c
@@ -184,7 +184,7 @@ ModIndexText(xkb_mod_index_t ndx)
     if (name)
         return name;
 
-    if (ndx == XkbNoModifier)
+    if (ndx == XKB_MOD_INVALID)
         return "none";
 
     buf = GetBuffer(32);
diff --git a/src/xkbcomp/compat.c b/src/xkbcomp/compat.c
index 1919a97..0014029 100644
--- a/src/xkbcomp/compat.c
+++ b/src/xkbcomp/compat.c
@@ -253,7 +253,7 @@ InitCompatInfo(CompatInfo *info, struct xkb_keymap *keymap, unsigned file_id,
     info->dflt.defined = 0;
     info->dflt.merge = MERGE_OVERRIDE;
     info->dflt.interp.flags = 0;
-    info->dflt.interp.virtual_mod = XkbNoModifier;
+    info->dflt.interp.virtual_mod = XKB_MOD_INVALID;
     memset(&info->dflt.interp.act, 0, sizeof(info->dflt.interp.act));
     info->dflt.interp.act.type = XkbSA_NoAction;
     ClearIndicatorMapInfo(keymap->ctx, &info->ledDflt);
@@ -274,7 +274,7 @@ ClearCompatInfo(CompatInfo *info)
     info->dflt.defined = 0;
     info->dflt.merge = MERGE_AUGMENT;
     info->dflt.interp.flags = 0;
-    info->dflt.interp.virtual_mod = XkbNoModifier;
+    info->dflt.interp.virtual_mod = XKB_MOD_INVALID;
     memset(&info->dflt.interp.act, 0, sizeof(info->dflt.interp.act));
     info->dflt.interp.act.type = XkbSA_NoAction;
     ClearIndicatorMapInfo(keymap->ctx, &info->ledDflt);
diff --git a/src/xkbcomp/expr.c b/src/xkbcomp/expr.c
index 2def311..a66f119 100644
--- a/src/xkbcomp/expr.c
+++ b/src/xkbcomp/expr.c
@@ -88,7 +88,7 @@ LookupModIndex(struct xkb_context *ctx, const void *priv, xkb_atom_t field,
     const char *name = xkb_atom_text(ctx, field);
 
     if (istreq(name, "none")) {
-        *val_rtrn = XkbNoModifier;
+        *val_rtrn = XKB_MOD_INVALID;
         return true;
     }
 
diff --git a/src/xkbcomp/keymap.c b/src/xkbcomp/keymap.c
index 3fc8915..5c1de7a 100644
--- a/src/xkbcomp/keymap.c
+++ b/src/xkbcomp/keymap.c
@@ -168,7 +168,7 @@ ApplyInterpsToKey(struct xkb_keymap *keymap, struct xkb_key *key)
 
             if ((group == 0 && level == 0) ||
                 !(interp->match & XkbSI_LevelOneOnly)) {
-                if (interp->virtual_mod != XkbNoModifier)
+                if (interp->virtual_mod != XKB_MOD_INVALID)
                     vmodmask |= (1 << interp->virtual_mod);
             }