Remove unused stuff from XKBcommonint.h Signed-off-by: Ran Benita <ran234@gmail.com>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260
diff --git a/src/XKBcommonint.h b/src/XKBcommonint.h
index 272274a..396c0bd 100644
--- a/src/XKBcommonint.h
+++ b/src/XKBcommonint.h
@@ -88,39 +88,28 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include "xkbcommon/xkbcommon.h"
/* From XKM.h */
-#define XkmFileVersion 15
-
-#define XkmIllegalFile -1
#define XkmSemanticsFile 20
#define XkmLayoutFile 21
#define XkmKeymapFile 22
-#define XkmGeometryFile 23
#define XkmRulesFile 24
#define XkmTypesIndex 0
#define XkmCompatMapIndex 1
#define XkmSymbolsIndex 2
-#define XkmIndicatorsIndex 3
#define XkmKeyNamesIndex 4
#define XkmGeometryIndex 5
-#define XkmVirtualModsIndex 6
-#define XkmLastIndex XkmVirtualModsIndex
#define XkmTypesMask (1<<0)
#define XkmCompatMapMask (1<<1)
#define XkmSymbolsMask (1<<2)
-#define XkmIndicatorsMask (1<<3)
#define XkmKeyNamesMask (1<<4)
#define XkmGeometryMask (1<<5)
-#define XkmVirtualModsMask (1<<6)
-#define XkmLegalIndexMask (0x7f)
-#define XkmAllIndicesMask (0x7f)
#define XkmSemanticsRequired (XkmCompatMapMask)
-#define XkmSemanticsOptional (XkmTypesMask|XkmVirtualModsMask|XkmIndicatorsMask|XkmGeometryMask)
+#define XkmSemanticsOptional (XkmTypesMask|XkmGeometryMask)
#define XkmSemanticsLegal (XkmSemanticsRequired|XkmSemanticsOptional)
#define XkmLayoutRequired (XkmKeyNamesMask|XkmSymbolsMask|XkmTypesMask)
-#define XkmLayoutOptional (XkmVirtualModsMask|XkmGeometryMask)
+#define XkmLayoutOptional (XkmGeometryMask)
#define XkmLayoutLegal (XkmLayoutRequired|XkmLayoutOptional)
#define XkmKeymapRequired (XkmSemanticsRequired|XkmLayoutRequired)
#define XkmKeymapOptional ((XkmSemanticsOptional|XkmLayoutOptional)&(~XkmKeymapRequired))
@@ -293,13 +282,6 @@ struct xkb_sym_map {
unsigned int size_syms; /* size of 'syms' */
};
-#define XkbNumGroups(g) ((g)&0x0f)
-#define XkbOutOfRangeGroupInfo(g) ((g)&0xf0)
-#define XkbOutOfRangeGroupAction(g) ((g)&0xc0)
-#define XkbOutOfRangeGroupNumber(g) (((g)&0x30)>>4)
-#define XkbSetGroupInfo(g,w,n) (((w)&0xc0)|(((n)&3)<<4)|((g)&0x0f))
-#define XkbSetNumGroups(g,n) (((g)&0xf0)|((n)&0x0f))
-
struct xkb_client_map {
unsigned char size_types;
unsigned char num_types;
@@ -317,17 +299,11 @@ struct xkb_server_map {
unsigned short num_acts;
unsigned short size_acts;
-#if defined(__cplusplus) || defined(c_plusplus)
- /* explicit is a C++ reserved word */
- unsigned char * c_explicit;
-#else
unsigned char * explicit;
-#endif
union xkb_action *acts;
struct xkb_behavior *behaviors;
unsigned short *key_acts;
- unsigned char *explicits;
uint32_t vmods[XkbNumVirtualMods]; /* vmod -> mod mapping */
uint32_t *vmodmap; /* key -> vmod mapping */
};
@@ -343,7 +319,6 @@ struct xkb_indicator_map {
};
struct xkb_indicator {
- unsigned long phys_indicators;
struct xkb_indicator_map maps[XkbNumIndicators];
};
@@ -391,7 +366,6 @@ struct xkb_keymap {
struct xkb_context *context;
unsigned int refcnt;
- unsigned int defined;
unsigned short flags;
xkb_keycode_t min_key_code;
xkb_keycode_t max_key_code;
@@ -404,6 +378,13 @@ struct xkb_keymap {
struct xkb_compat_map * compat;
};
+#define XkbNumGroups(g) ((g)&0x0f)
+#define XkbOutOfRangeGroupInfo(g) ((g)&0xf0)
+#define XkbOutOfRangeGroupAction(g) ((g)&0xc0)
+#define XkbOutOfRangeGroupNumber(g) (((g)&0x30)>>4)
+#define XkbSetGroupInfo(g,w,n) (((w)&0xc0)|(((n)&3)<<4)|((g)&0x0f))
+#define XkbSetNumGroups(g,n) (((g)&0xf0)|((n)&0x0f))
+
#define XkbKeyGroupInfo(d,k) ((d)->map->key_sym_map[k].group_info)
#define XkbKeyNumGroups(d,k) (XkbNumGroups((d)->map->key_sym_map[k].group_info))
#define XkbKeyGroupWidth(d,k,g) (XkbKeyType(d,k,g)->num_levels)
@@ -431,11 +412,6 @@ struct xkb_keymap {
((k)<=(d)->max_key_code))
#define XkbNumKeys(d) ((d)->max_key_code-(d)->min_key_code+1)
-struct xkb_component_name {
- unsigned short flags;
- char * name;
-};
-
struct xkb_state {
xkb_group_index_t base_group; /**< depressed */
xkb_group_index_t latched_group;
@@ -455,13 +431,4 @@ struct xkb_state {
struct xkb_keymap *xkb;
};
-#define XkbStateFieldFromRec(s) XkbBuildCoreState((s)->lookup_mods,(s)->group)
-#define XkbGrabStateFromRec(s) XkbBuildCoreState((s)->grab_mods,(s)->group)
-
-#define XkbNumGroups(g) ((g)&0x0f)
-#define XkbOutOfRangeGroupInfo(g) ((g)&0xf0)
-#define XkbOutOfRangeGroupAction(g) ((g)&0xc0)
-#define XkbOutOfRangeGroupNumber(g) (((g)&0x30)>>4)
-#define XkbSetNumGroups(g,n) (((g)&0xf0)|((n)&0x0f))
-
#endif /* _XKBCOMMONINT_H_ */
diff --git a/src/text.c b/src/text.c
index d8c70a2..c4d81c5 100644
--- a/src/text.c
+++ b/src/text.c
@@ -206,12 +206,8 @@ XkbcConfigText(unsigned config)
return "CompatMap";
case XkmSymbolsIndex:
return "Symbols";
- case XkmIndicatorsIndex:
- return "Indicators";
case XkmKeyNamesIndex:
return "KeyNames";
- case XkmVirtualModsIndex:
- return "VirtualMods";
default:
return "unknown";
}
diff --git a/src/xkbcomp/indicators.c b/src/xkbcomp/indicators.c
index ce1606c..8f614f9 100644
--- a/src/xkbcomp/indicators.c
+++ b/src/xkbcomp/indicators.c
@@ -473,7 +473,6 @@ BindIndicators(struct xkb_keymap * xkb, bool force, LEDInfo *unbound,
{
xkb->names->indicators[i] = XkbcAtomGetString(led->name);
led->indicator = i + 1;
- xkb->indicators->phys_indicators &= ~(1 << i);
break;
}
}
diff --git a/src/xkbcomp/keycodes.c b/src/xkbcomp/keycodes.c
index b1e7937..4715645 100644
--- a/src/xkbcomp/keycodes.c
+++ b/src/xkbcomp/keycodes.c
@@ -918,15 +918,6 @@ CompileKeycodes(XkbFile *file, struct xkb_keymap * xkb, unsigned merge)
{
free(UNCONSTIFY(xkb->names->indicators[ii->ndx - 1]));
xkb->names->indicators[ii->ndx - 1] = XkbcAtomGetString(ii->name);
- if (xkb->indicators != NULL)
- {
- unsigned bit;
- bit = 1 << (ii->ndx - 1);
- if (ii->virtual)
- xkb->indicators->phys_indicators &= ~bit;
- else
- xkb->indicators->phys_indicators |= bit;
- }
}
}
if (info.aliases)
diff --git a/src/xkbcomp/keymap.c b/src/xkbcomp/keymap.c
index e6cbf52..635167d 100644
--- a/src/xkbcomp/keymap.c
+++ b/src/xkbcomp/keymap.c
@@ -72,8 +72,8 @@ CompileKeymap(struct xkb_context *context, XkbFile *file)
legal = XkmKeymapLegal;
break;
case XkmKeymapFile:
- required = XkmKeyNamesIndex | XkmTypesIndex | XkmSymbolsIndex | \
- XkmCompatMapIndex | XkmVirtualModsIndex;
+ required = XkmKeyNamesIndex | XkmTypesIndex | XkmSymbolsIndex |
+ XkmCompatMapIndex;
legal = XkmKeymapLegal;
break;
default:
@@ -116,11 +116,6 @@ CompileKeymap(struct xkb_context *context, XkbFile *file)
break;
case XkmGeometryIndex:
continue;
- case XkmVirtualModsIndex:
- case XkmIndicatorsIndex:
- WSGO("Found an isolated %s section\n", XkbcConfigText(file->type));
- ACTION("Ignored\n");
- continue;
default:
WSGO("Unknown file type %d\n", file->type);
ACTION("Ignored\n");
@@ -184,8 +179,6 @@ CompileKeymap(struct xkb_context *context, XkbFile *file)
goto err;
}
- xkb->defined = have;
-
ok = BindIndicators(xkb, true, unbound, NULL);
if (!ok)
goto err;
diff --git a/src/xkbcomp/parseutils.c b/src/xkbcomp/parseutils.c
index bc82a26..06183c5 100644
--- a/src/xkbcomp/parseutils.c
+++ b/src/xkbcomp/parseutils.c
@@ -838,7 +838,6 @@ FreeXKBFile(XkbFile *file)
case XkmSymbolsIndex:
case XkmKeyNamesIndex:
case XkmGeometryIndex:
- case XkmGeometryFile:
FreeStmt(file->defs);
break;
}
diff --git a/src/xkbcomp/vmod.c b/src/xkbcomp/vmod.c
index 7765930..dfb6443 100644
--- a/src/xkbcomp/vmod.c
+++ b/src/xkbcomp/vmod.c
@@ -49,10 +49,10 @@ ClearVModInfo(VModInfo * info, struct xkb_keymap * xkb)
info->newlyDefined = info->defined = info->available = 0;
- if (XkbcAllocNames(xkb, XkbVirtualModNamesMask, 0) != Success)
+ if (XkbcAllocNames(xkb, 0, 0) != Success)
return;
- if (XkbcAllocServerMap(xkb, XkbVirtualModsMask, 0) != Success)
+ if (XkbcAllocServerMap(xkb, 0, 0) != Success)
return;
info->xkb = xkb;
diff --git a/src/xkbcomp/xkbpath.c b/src/xkbcomp/xkbpath.c
index 298f9be..884e08a 100644
--- a/src/xkbcomp/xkbpath.c
+++ b/src/xkbcomp/xkbpath.c
@@ -163,7 +163,6 @@ XkbDirectoryForInclude(unsigned type)
return "symbols";
case XkmCompatMapIndex:
return "compat";
- case XkmGeometryFile:
case XkmGeometryIndex:
return "geometry";
case XkmRulesFile: