aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/xkb/XKBMAlloc.c
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2017-02-16 20:18:42 +0000
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2018-07-03 16:29:17 +0200
commite734ca2175ffeafcce0e1435d304880cebe7561c (patch)
tree481cebd16244a32359c8d9cf3ee161bfb53b7ff8 /nx-X11/programs/Xserver/xkb/XKBMAlloc.c
parentec0cfcecf31dbb504e8a09e59dd877f883a1c030 (diff)
downloadnx-libs-e734ca2175ffeafcce0e1435d304880cebe7561c.tar.gz
nx-libs-e734ca2175ffeafcce0e1435d304880cebe7561c.tar.bz2
nx-libs-e734ca2175ffeafcce0e1435d304880cebe7561c.zip
Removal of dead code in Xserver/xkb. Follow-up commit for 3739a9b.
Spotted in and backported from X.org: commit 021fc5cb2cb4a7972b4a6fcb570c1da92787d68d Author: Adam Jackson <ajax@benzedrine.nwnk.net> Date: Sun Mar 18 16:31:19 2007 -0400 Static markup and dead code cull over xkb/. The former <X11/extensions/XKBsrv.h> has been pulled into the server now as include/xkbsrv.h, and the world updated to look for it in the new place, since it made no sense to define server API in an extension header. Any further work along this line will need to do similar things with XKBgeom.h and friends. Backported-to-NX-by: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
Diffstat (limited to 'nx-X11/programs/Xserver/xkb/XKBMAlloc.c')
-rw-r--r--nx-X11/programs/Xserver/xkb/XKBMAlloc.c77
1 files changed, 1 insertions, 76 deletions
diff --git a/nx-X11/programs/Xserver/xkb/XKBMAlloc.c b/nx-X11/programs/Xserver/xkb/XKBMAlloc.c
index dbd9b25a0..100e827b9 100644
--- a/nx-X11/programs/Xserver/xkb/XKBMAlloc.c
+++ b/nx-X11/programs/Xserver/xkb/XKBMAlloc.c
@@ -217,7 +217,7 @@ XkbServerMapPtr map;
/***====================================================================***/
-Status
+static Status
XkbCopyKeyType(XkbKeyTypePtr from,XkbKeyTypePtr into)
{
if ((!from)||(!into))
@@ -272,81 +272,6 @@ register int i,rtrn;
return Success;
}
-XkbKeyTypePtr
-XkbAddKeyType( XkbDescPtr xkb,
- Atom name,
- int map_count,
- Bool want_preserve,
- int num_lvls)
-{
-register int i;
-unsigned tmp;
-XkbKeyTypePtr type;
-XkbClientMapPtr map;
-
- if ((!xkb)||(num_lvls<1))
- return NULL;
- map= xkb->map;
- if ((map)&&(map->types)) {
- for (i=0;i<map->num_types;i++) {
- if (map->types[i].name==name) {
- Status status;
- status=XkbResizeKeyType(xkb,i,map_count,want_preserve,num_lvls);
- return (status==Success?&map->types[i]:NULL);
- }
- }
- }
- if ((!map)||(!map->types)||(!(map->num_types<XkbNumRequiredTypes))) {
- tmp= XkbNumRequiredTypes+1;
- if (XkbAllocClientMap(xkb,XkbKeyTypesMask,tmp)!=Success)
- return NULL;
- tmp= 0;
- if (map->num_types<=XkbKeypadIndex)
- tmp|= XkbKeypadMask;
- if (map->num_types<=XkbAlphabeticIndex)
- tmp|= XkbAlphabeticMask;
- if (map->num_types<=XkbTwoLevelIndex)
- tmp|= XkbTwoLevelMask;
- if (map->num_types<=XkbOneLevelIndex)
- tmp|= XkbOneLevelMask;
- if (XkbInitCanonicalKeyTypes(xkb,tmp,XkbNoModifier)==Success) {
- for (i=0;i<map->num_types;i++) {
- Status status;
- if (map->types[i].name!=name)
- continue;
- status=XkbResizeKeyType(xkb,i,map_count,want_preserve,num_lvls);
- return (status==Success?&map->types[i]:NULL);
- }
- }
- }
- if ((map->num_types<=map->size_types)&&
- (XkbAllocClientMap(xkb,XkbKeyTypesMask,map->num_types+1)!=Success)) {
- return NULL;
- }
- type= &map->types[map->num_types];
- map->num_types++;
- bzero((char *)type,sizeof(XkbKeyTypeRec));
- type->num_levels= num_lvls;
- type->map_count= map_count;
- type->name= name;
- if (map_count>0) {
- type->map= _XkbTypedCalloc(map_count,XkbKTMapEntryRec);
- if (!type->map) {
- map->num_types--;
- return NULL;
- }
- if (want_preserve) {
- type->preserve= _XkbTypedCalloc(map_count,XkbModsRec);
- if (!type->preserve) {
- _XkbFree(type->map);
- map->num_types--;
- return NULL;
- }
- }
- }
- return type;
-}
-
Status
XkbResizeKeyType( XkbDescPtr xkb,
int type_ndx,