summaryrefslogtreecommitdiff
path: root/xkb/xkbfmisc.c
diff options
context:
space:
mode:
authorAdam Jackson <ajax@benzedrine.nwnk.net>2007-03-18 16:31:19 -0400
committerAdam Jackson <ajax@benzedrine.nwnk.net>2007-03-20 18:37:02 -0400
commit021fc5cb2cb4a7972b4a6fcb570c1da92787d68d (patch)
tree58063be57aef43d15f51822264d4a7a789ee7c77 /xkb/xkbfmisc.c
parent9398d62f27ee1b287e4458fd8b011c10f7b59efd (diff)
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.
Diffstat (limited to 'xkb/xkbfmisc.c')
-rw-r--r--xkb/xkbfmisc.c109
1 files changed, 1 insertions, 108 deletions
diff --git a/xkb/xkbfmisc.c b/xkb/xkbfmisc.c
index 4130bd998..05344b475 100644
--- a/xkb/xkbfmisc.c
+++ b/xkb/xkbfmisc.c
@@ -44,7 +44,7 @@
#include "dix.h"
#include <X11/extensions/XKBstr.h>
#define XKBSRV_NEED_FILE_FUNCS 1
-#include <X11/extensions/XKBsrv.h>
+#include <xkbsrv.h>
#include <X11/extensions/XKBgeom.h>
#include "xkb.h"
@@ -133,76 +133,6 @@ unsigned set,rtrn;
/***===================================================================***/
-Bool
-XkbLookupGroupAndLevel( XkbDescPtr xkb,
- int key,
- int * mods_inout,
- int * grp_inout,
- int * lvl_rtrn)
-{
-int nG,eG;
-
- if ((!xkb)||(!XkbKeycodeInRange(xkb,key))||(!grp_inout))
- return False;
-
- nG= XkbKeyNumGroups(xkb,key);
- eG= *grp_inout;
-
- if ( nG==0 ) {
- *grp_inout= 0;
- if (lvl_rtrn!=NULL)
- *lvl_rtrn= 0;
- return False;
- }
- else if ( nG==1 ) {
- eG= 0;
- }
- else if ( eG>=nG ) {
- unsigned gI= XkbKeyGroupInfo(xkb,key);
- switch (XkbOutOfRangeGroupAction(gI)) {
- default:
- eG %= nG;
- break;
- case XkbClampIntoRange:
- eG = nG-1;
- break;
- case XkbRedirectIntoRange:
- eG = XkbOutOfRangeGroupNumber(gI);
- if (eG>=nG)
- eG= 0;
- break;
- }
- }
- *grp_inout= eG;
- if (mods_inout!=NULL) {
- XkbKeyTypePtr type;
- int preserve;
-
- type = XkbKeyKeyType(xkb,key,eG);
- if (lvl_rtrn!=NULL)
- *lvl_rtrn= 0;
- preserve= 0;
- if (type->map) { /* find the shift level */
- register int i;
- register XkbKTMapEntryPtr entry;
- for (i=0,entry=type->map;i<type->map_count;i++,entry++) {
- if ((entry->active)&&
- (((*mods_inout)&type->mods.mask)==entry->mods.mask)){
- if (lvl_rtrn!=NULL)
- *lvl_rtrn= entry->level;
- if (type->preserve)
- preserve= type->preserve[i].mask;
- break;
- }
- }
- }
- (*mods_inout)&= ~(type->mods.mask&(~preserve));
- }
- return True;
-}
-
-/***===================================================================***/
-
static Bool
XkbWriteSectionFromName(FILE *file,char *sectionName,char *name)
{
@@ -416,15 +346,6 @@ XkbFileInfo finfo;
/***====================================================================***/
-/*ARGSUSED*/
-Status
-XkbMergeFile(XkbDescPtr xkb,XkbFileInfo finfo)
-{
- return BadImplementation;
-}
-
-/***====================================================================***/
-
int
XkbFindKeycodeByName(XkbDescPtr xkb,char *name,Bool use_aliases)
{
@@ -484,34 +405,6 @@ unsigned rtrn;
return rtrn;
}
-unsigned
-XkbConvertXkbComponents(Bool toXkm,unsigned orig)
-{
-unsigned rtrn;
-
- rtrn= 0;
- if (toXkm) {
- if (orig&XkbClientMapMask) rtrn|= XkmTypesMask|XkmSymbolsMask;
- if (orig&XkbServerMapMask) rtrn|= XkmTypesMask|XkmSymbolsMask;
- if (orig&XkbCompatMapMask) rtrn|= XkmCompatMapMask;
- if (orig&XkbIndicatorMapMask) rtrn|= XkmIndicatorsMask;
- if (orig&XkbNamesMask) rtrn|= XkmKeyNamesMask;
- if (orig&XkbGeometryMask) rtrn|= XkmGeometryMask;
- }
- else {
- if (orig!=0) rtrn|= XkbNamesMask;
- if (orig&XkmTypesMask) rtrn|= XkbClientMapMask;
- if (orig&XkmCompatMapMask)
- rtrn|= XkbCompatMapMask|XkbIndicatorMapMask;
- if (orig&XkmSymbolsMask) rtrn|=XkbClientMapMask|XkbServerMapMask;
- if (orig&XkmIndicatorsMask) rtrn|= XkbIndicatorMapMask;
- if (orig&XkmKeyNamesMask)
- rtrn|= XkbNamesMask|XkbIndicatorMapMask;
- if (orig&XkmGeometryMask) rtrn|= XkbGeometryMask;
- }
- return rtrn;
-}
-
Bool
XkbDetermineFileType(XkbFileInfoPtr finfo,int format,int *opts_missing)
{