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/xkbUtils.c | 57 ++------------------------------------------------------- 1 file changed, 2 insertions(+), 55 deletions(-) (limited to 'xkb/xkbUtils.c') diff --git a/xkb/xkbUtils.c b/xkb/xkbUtils.c index 062159ec6..1d2366756 100644 --- a/xkb/xkbUtils.c +++ b/xkb/xkbUtils.c @@ -41,7 +41,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include "inputstr.h" #define XKBSRV_NEED_FILE_FUNCS -#include +#include #include #include "xkb.h" @@ -172,44 +172,6 @@ register unsigned mask; return mask; } - -Bool -XkbApplyVModChanges( XkbSrvInfoPtr xkbi, - unsigned changed, - XkbChangesPtr changes, - unsigned * needChecksRtrn, - XkbEventCausePtr cause) -{ -XkbDescPtr xkb; -Bool check; - - xkb= xkbi->desc; -#ifdef DEBUG -{ -register unsigned i,bit; - for (i=0,bit=1;iserver->vmods[i]); - } -} -#endif - check= XkbApplyVirtualModChanges(xkb,changed,changes); - XkbApplyVModChangesToAllDevices(xkbi->device,xkb,changed,cause); - - if (needChecksRtrn!=NULL) { - if (check) - *needChecksRtrn= XkbStateNotifyMask|XkbIndicatorStateNotifyMask; - else *needChecksRtrn= 0; - } - else if (check) { - /* 7/12/95 (ef) -- XXX check compatibility and/or indicator state */ - } - return 1; -} - /***====================================================================***/ void @@ -658,7 +620,7 @@ int changed; return changed; } -void +static void XkbComputeCompatState(XkbSrvInfoPtr xkbi) { CARD16 grp_mask; @@ -772,21 +734,6 @@ XkbCheckSecondaryEffects( XkbSrvInfoPtr xkbi, /***====================================================================***/ -void -XkbSetPhysicalLockingKey(DeviceIntPtr dev,unsigned key) -{ -XkbDescPtr xkb; - - xkb= dev->key->xkbInfo->desc; - if ((key>=xkb->min_key_code) && (key<=xkb->max_key_code)) { - xkb->server->behaviors[key].type= XkbKB_Lock|XkbKB_Permanent; - } - else ErrorF("Internal Error! Bad XKB info in SetPhysicalLockingKey\n"); - return; -} - -/***====================================================================***/ - Bool XkbEnableDisableControls( XkbSrvInfoPtr xkbi, unsigned long change, -- cgit v1.2.3 From f34b9a20b0181d3c2641c305e91180711afbd4b9 Mon Sep 17 00:00:00 2001 From: Daniel Stone Date: Wed, 21 Mar 2007 02:03:37 +0200 Subject: XKB: Be a tiny bit more conservative with type allocation Make sure size_types will _always_ be 0 if we don't have any types. --- xkb/xkbUtils.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'xkb/xkbUtils.c') diff --git a/xkb/xkbUtils.c b/xkb/xkbUtils.c index 1d2366756..bb6d8a0ae 100644 --- a/xkb/xkbUtils.c +++ b/xkb/xkbUtils.c @@ -1140,6 +1140,9 @@ XkbCopyKeymap(XkbDescPtr src, XkbDescPtr dst, Bool sendNotifies) dtype->preserve = NULL; } } + + dst->map->size_types = src->map->num_types; + dst->map->num_types = src->map->num_types; } else { if (dst->map->types) { @@ -1155,9 +1158,9 @@ XkbCopyKeymap(XkbDescPtr src, XkbDescPtr dst, Bool sendNotifies) xfree(dst->map->types); dst->map->types = NULL; } + dst->map->num_types = 0; + dst->map->size_types = 0; } - dst->map->size_types = src->map->num_types; - dst->map->num_types = src->map->num_types; if (src->map->modmap) { if (src->max_key_code != dst->max_key_code) { -- cgit v1.2.3