From 021fc5cb2cb4a7972b4a6fcb570c1da92787d68d Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Sun, 18 Mar 2007 16:31:19 -0400 Subject: Static markup and dead code cull over xkb/. The former 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. --- xkb/xkbfmisc.c | 109 +-------------------------------------------------------- 1 file changed, 1 insertion(+), 108 deletions(-) (limited to 'xkb/xkbfmisc.c') 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 #define XKBSRV_NEED_FILE_FUNCS 1 -#include +#include #include #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;imap_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) { -- cgit v1.2.3