From 590df28cc539b70e07150b0640bacbb5ab63d8b7 Mon Sep 17 00:00:00 2001 From: Daniel Stone Date: Mon, 20 Feb 2012 16:35:39 +0000 Subject: [PATCH] Move groupNames mask definition to its user 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 --- src/xkbcomp/Makefile.am | 1 - src/xkbcomp/compat.c | 25 ------------------------- src/xkbcomp/compat.h | 7 ------- src/xkbcomp/indicators.c | 25 ++++++++++++++++++++++++- 4 files changed, 24 insertions(+), 34 deletions(-) delete mode 100644 src/xkbcomp/compat.h diff --git a/src/xkbcomp/Makefile.am b/src/xkbcomp/Makefile.am index db54c55..ecee7d4 100644 --- a/src/xkbcomp/Makefile.am +++ b/src/xkbcomp/Makefile.am @@ -9,7 +9,6 @@ libxkbcomp_la_SOURCES = \ alias.c \ alias.h \ compat.c \ - compat.h \ expr.c \ expr.h \ geometry.c \ diff --git a/src/xkbcomp/compat.c b/src/xkbcomp/compat.c index 1fb52ce..7a66281 100644 --- a/src/xkbcomp/compat.c +++ b/src/xkbcomp/compat.c @@ -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 index 799b215..0000000 --- a/src/xkbcomp/compat.h +++ /dev/null @@ -1,7 +0,0 @@ - -#ifndef COMPAT_H -#define COMPAT_H 1 - -extern LookupEntry groupNames[]; - -#endif /* COMPAT_H */ diff --git a/src/xkbcomp/indicators.c b/src/xkbcomp/indicators.c index 4cb7f0d..d999144 100644 --- a/src/xkbcomp/indicators.c +++ b/src/xkbcomp/indicators.c @@ -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, -- 2.7.4