Move groupNames mask definition to its user
authorDaniel Stone <daniel@fooishbar.org>
Mon, 20 Feb 2012 16:35:39 +0000 (16:35 +0000)
committerDaniel Stone <daniel@fooishbar.org>
Mon, 20 Feb 2012 16:35:39 +0000 (16:35 +0000)
groupNames was declared in compat.c as a global to anything which
included compat.h (for which groupNames was its sole reason to exist),
but only ever used in indicators.c.

Which is kind of fortunate, given that e314931e removed identical
definitions of groupNames (as integers, not masks) from both action.c
and symbols.c.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
src/xkbcomp/Makefile.am
src/xkbcomp/compat.c
src/xkbcomp/compat.h [deleted file]
src/xkbcomp/indicators.c

index db54c55..ecee7d4 100644 (file)
@@ -9,7 +9,6 @@ libxkbcomp_la_SOURCES = \
        alias.c \
        alias.h \
        compat.c \
-       compat.h \
        expr.c \
        expr.h \
        geometry.c \
index 1fb52ce..7a66281 100644 (file)
@@ -34,7 +34,6 @@
 #include "misc.h"
 #include "indicators.h"
 #include "action.h"
-#include "compat.h"
 #include "parseutils.h"
 
 typedef struct _SymInterpInfo
@@ -580,30 +579,6 @@ SetInterpField(SymInterpInfo * si,
     return ok;
 }
 
-LookupEntry groupNames[] = {
-    {"group1", 0x01}
-    ,
-    {"group2", 0x02}
-    ,
-    {"group3", 0x04}
-    ,
-    {"group4", 0x08}
-    ,
-    {"group5", 0x10}
-    ,
-    {"group6", 0x20}
-    ,
-    {"group7", 0x40}
-    ,
-    {"group8", 0x80}
-    ,
-    {"none", 0x00}
-    ,
-    {"all", 0xff}
-    ,
-    {NULL, 0}
-};
-
 static int
 HandleInterpVar(VarDef * stmt, struct xkb_desc * xkb, CompatInfo * info)
 {
diff --git a/src/xkbcomp/compat.h b/src/xkbcomp/compat.h
deleted file mode 100644 (file)
index 799b215..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-
-#ifndef COMPAT_H
-#define COMPAT_H 1
-
-extern LookupEntry groupNames[];
-
-#endif /* COMPAT_H */
index 4cb7f0d..d999144 100644 (file)
@@ -33,7 +33,6 @@
 #include "vmod.h"
 #include "indicators.h"
 #include "action.h"
-#include "compat.h"
 
 /***====================================================================***/
 
@@ -197,6 +196,30 @@ static LookupEntry groupComponentNames[] = {
     {NULL, 0}
 };
 
+static LookupEntry groupNames[] = {
+    {"group1", 0x01}
+    ,
+    {"group2", 0x02}
+    ,
+    {"group3", 0x04}
+    ,
+    {"group4", 0x08}
+    ,
+    {"group5", 0x10}
+    ,
+    {"group6", 0x20}
+    ,
+    {"group7", 0x40}
+    ,
+    {"group8", 0x80}
+    ,
+    {"none", 0x00}
+    ,
+    {"all", 0xff}
+    ,
+    {NULL, 0}
+};
+
 int
 SetIndicatorMapField(LEDInfo * led,
                      struct xkb_desc * xkb,