summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/xkbfile.h4
-rw-r--r--include/xkbrules.h1
-rw-r--r--include/xkbsrv.h13
-rw-r--r--include/xkbstr.h1
-rw-r--r--xkb/ddxList.c6
-rw-r--r--xkb/ddxLoad.c3
-rw-r--r--xkb/maprules.c18
-rw-r--r--xkb/xkb.c7
-rw-r--r--xkb/xkbfmisc.c25
9 files changed, 17 insertions, 61 deletions
diff --git a/include/xkbfile.h b/include/xkbfile.h
index 346f213ec..a4b99ee07 100644
--- a/include/xkbfile.h
+++ b/include/xkbfile.h
@@ -284,10 +284,6 @@ extern _X_EXPORT Bool XkbWriteXKBGeometry(
void * /* priv */
);
-extern _X_EXPORT void XkbEnsureSafeMapName(
- char * /* name */
-);
-
extern _X_EXPORT Bool XkbWriteXKBKeymapForNames(
FILE * /* file */,
XkbComponentNamesPtr /* names */,
diff --git a/include/xkbrules.h b/include/xkbrules.h
index 0001481cd..0a15de2e0 100644
--- a/include/xkbrules.h
+++ b/include/xkbrules.h
@@ -69,7 +69,6 @@ typedef struct _XkbRF_Rule {
char * types;
char * compat;
char * geometry;
- char * keymap;
unsigned flags;
} XkbRF_RuleRec,*XkbRF_RulePtr;
diff --git a/include/xkbsrv.h b/include/xkbsrv.h
index a28967c22..b2b173627 100644
--- a/include/xkbsrv.h
+++ b/include/xkbsrv.h
@@ -962,13 +962,12 @@ extern Bool XkbCopyKeymap(
#include <X11/extensions/XKMformat.h>
#include "xkbrules.h"
-#define _XkbListKeymaps 0
-#define _XkbListKeycodes 1
-#define _XkbListTypes 2
-#define _XkbListCompat 3
-#define _XkbListSymbols 4
-#define _XkbListGeometry 5
-#define _XkbListNumComponents 6
+#define _XkbListKeycodes 0
+#define _XkbListTypes 1
+#define _XkbListCompat 2
+#define _XkbListSymbols 3
+#define _XkbListGeometry 4
+#define _XkbListNumComponents 5
typedef struct _XkbSrvListInfo {
int szPool;
diff --git a/include/xkbstr.h b/include/xkbstr.h
index 5eebe41e3..ba7debb6e 100644
--- a/include/xkbstr.h
+++ b/include/xkbstr.h
@@ -527,7 +527,6 @@ typedef struct _XkbChanges {
* database.
*/
typedef struct _XkbComponentNames {
- char * keymap;
char * keycodes;
char * types;
char * compat;
diff --git a/xkb/ddxList.c b/xkb/ddxList.c
index da2f9a8bf..3ff3d81b4 100644
--- a/xkb/ddxList.c
+++ b/xkb/ddxList.c
@@ -61,7 +61,7 @@ extern int Win32System(const char *cmdline);
/***====================================================================***/
static char *componentDirs[_XkbListNumComponents] = {
- "keymap", "keycodes", "types", "compat", "symbols", "geometry"
+ "keycodes", "types", "compat", "symbols", "geometry"
};
/***====================================================================***/
@@ -280,9 +280,7 @@ XkbDDXList(DeviceIntPtr dev,XkbSrvListInfoPtr list,ClientPtr client)
{
Status status;
- status= XkbDDXListComponent(dev,_XkbListKeymaps,list,client);
- if (status==Success)
- status= XkbDDXListComponent(dev,_XkbListKeycodes,list,client);
+ status= XkbDDXListComponent(dev,_XkbListKeycodes,list,client);
if (status==Success)
status= XkbDDXListComponent(dev,_XkbListTypes,list,client);
if (status==Success)
diff --git a/xkb/ddxLoad.c b/xkb/ddxLoad.c
index 8d7f8377b..6954dd150 100644
--- a/xkb/ddxLoad.c
+++ b/xkb/ddxLoad.c
@@ -177,7 +177,7 @@ OutputDirectory(
}
}
-static Bool
+static Bool
XkbDDXCompileKeymapByNames( XkbDescPtr xkb,
XkbComponentNamesPtr names,
unsigned want,
@@ -204,7 +204,6 @@ XkbDDXCompileKeymapByNames( XkbDescPtr xkb,
snprintf(keymap, sizeof(keymap), "server-%s", display);
- XkbEnsureSafeMapName(keymap);
OutputDirectory(xkm_output_dir, sizeof(xkm_output_dir));
#ifdef WIN32
diff --git a/xkb/maprules.c b/xkb/maprules.c
index 6dfcc9975..61c7f8680 100644
--- a/xkb/maprules.c
+++ b/xkb/maprules.c
@@ -193,15 +193,14 @@ Bool endOfFile,spacePending,slashPending,inComment;
#define TYPES 6
#define COMPAT 7
#define GEOMETRY 8
-#define KEYMAP 9
-#define MAX_WORDS 10
+#define MAX_WORDS 9
#define PART_MASK 0x000F
#define COMPONENT_MASK 0x03F0
static char * cname[MAX_WORDS] = {
"model", "layout", "variant", "option",
- "keycodes", "symbols", "types", "compat", "geometry", "keymap"
+ "keycodes", "symbols", "types", "compat", "geometry"
};
typedef struct _RemapSpec {
@@ -336,13 +335,6 @@ Bool found;
remap->num_remap= 0;
return;
}
- if (((present&COMPONENT_MASK)&(1<<KEYMAP))&&
- ((present&COMPONENT_MASK)!=(1<<KEYMAP))) {
- DebugF("Keymap cannot appear with other components\n");
- DebugF("Illegal mapping ignored\n");
- remap->num_remap= 0;
- return;
- }
remap->number++;
return;
}
@@ -459,7 +451,6 @@ Bool append = False;
rule->types= _XkbDupString(tmp.name[TYPES]);
rule->compat= _XkbDupString(tmp.name[COMPAT]);
rule->geometry= _XkbDupString(tmp.name[GEOMETRY]);
- rule->keymap= NULL;
rule->layout_num = rule->variant_num = 0;
for (i = 0; i < nread; i++) {
@@ -859,12 +850,10 @@ XkbRF_GetComponents( XkbRF_RulesPtr rules,
names->compat= XkbRF_SubstituteVars(names->compat, &mdefs);
if (names->geometry)
names->geometry= XkbRF_SubstituteVars(names->geometry, &mdefs);
- if (names->keymap)
- names->keymap= XkbRF_SubstituteVars(names->keymap, &mdefs);
FreeMultiDefs(&mdefs);
return (names->keycodes && names->symbols && names->types &&
- names->compat && names->geometry ) || names->keymap;
+ names->compat && names->geometry);
}
XkbRF_RulePtr
@@ -1045,6 +1034,7 @@ int len,headingtype;
ErrorF("Broken rules file: unknown type for line %s\n",
line.line);
ErrorF("Not parsing rules file further\n");
+ XkbRF_Free(rules, False);
FreeInputLine(&line);
return False;
}
diff --git a/xkb/xkb.c b/xkb/xkb.c
index d986b2833..b99b261e9 100644
--- a/xkb/xkb.c
+++ b/xkb/xkb.c
@@ -5492,7 +5492,6 @@ ProcXkbListComponents(ClientPtr client)
str= (unsigned char *)&stuff[1];
bzero(&list,sizeof(XkbSrvListInfoRec));
list.maxRtrn= stuff->maxNames;
- list.pattern[_XkbListKeymaps]= GetComponentSpec(&str,False,&status);
list.pattern[_XkbListKeycodes]= GetComponentSpec(&str,False,&status);
list.pattern[_XkbListTypes]= GetComponentSpec(&str,False,&status);
list.pattern[_XkbListCompat]= GetComponentSpec(&str,False,&status);
@@ -5515,7 +5514,7 @@ ProcXkbListComponents(ClientPtr client)
rep.deviceID = dev->id;
rep.sequenceNumber = client->sequence;
rep.length = XkbPaddedSize(list.nPool)/4;
- rep.nKeymaps = list.nFound[_XkbListKeymaps];
+ rep.nKeymaps = 0;
rep.nKeycodes = list.nFound[_XkbListKeycodes];
rep.nTypes = list.nFound[_XkbListTypes];
rep.nCompatMaps = list.nFound[_XkbListCompat];
@@ -5581,7 +5580,8 @@ ProcXkbGetKbdByName(ClientPtr client)
xkb = dev->key->xkbInfo->desc;
status= Success;
str= (unsigned char *)&stuff[1];
- names.keymap= GetComponentSpec(&str,True,&status);
+ if (GetComponentSpec(&str,True,&status)) /* keymap, unsupported */
+ return BadMatch;
names.keycodes= GetComponentSpec(&str,True,&status);
names.types= GetComponentSpec(&str,True,&status);
names.compat= GetComponentSpec(&str,True,&status);
@@ -5873,7 +5873,6 @@ ProcXkbGetKbdByName(ClientPtr client)
XkbFreeKeyboard(new,XkbAllComponentsMask,True);
new= NULL;
}
- if (names.keymap) { _XkbFree(names.keymap); names.keymap= NULL; }
if (names.keycodes) { _XkbFree(names.keycodes); names.keycodes= NULL; }
if (names.types) { _XkbFree(names.types); names.types= NULL; }
if (names.compat) { _XkbFree(names.compat); names.compat= NULL; }
diff --git a/xkb/xkbfmisc.c b/xkb/xkbfmisc.c
index dd403eaff..349c79a86 100644
--- a/xkb/xkbfmisc.c
+++ b/xkb/xkbfmisc.c
@@ -170,7 +170,7 @@ int multi_section;
unsigned wantNames,wantConfig,wantDflts;
complete= 0;
- if ((name=names->keymap)==NULL) name= "default";
+ name= "default";
if (COMPLETE(names->keycodes)) complete|= XkmKeyNamesMask;
if (COMPLETE(names->types)) complete|= XkmTypesMask;
if (COMPLETE(names->compat)) complete|= XkmCompatMapMask;
@@ -412,29 +412,6 @@ unsigned rtrn;
return rtrn;
}
-/* all latin-1 alphanumerics, plus parens, slash, minus, underscore and */
-/* wildcards */
-
-static unsigned char componentSpecLegal[] = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0xa7, 0xff, 0x83,
- 0xfe, 0xff, 0xff, 0x87, 0xfe, 0xff, 0xff, 0x07,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0x7f, 0xff
-};
-
-void
-XkbEnsureSafeMapName(char *name)
-{
- if (name==NULL)
- return;
- while (*name!='\0') {
- if ((componentSpecLegal[(*name)/8]&(1<<((*name)%8)))==0)
- *name= '_';
- name++;
- }
- return;
-}
-
/***====================================================================***/
#define UNMATCHABLE(c) (((c)=='(')||((c)==')')||((c)=='/'))