diff --git a/include/xkbfile.h b/include/xkbfile.h index df2221313..706f94018 100644 --- a/include/xkbfile.h +++ b/include/xkbfile.h @@ -86,14 +86,6 @@ extern _X_EXPORT int XkbFindKeycodeByName(XkbDescPtr /* xkb */ , Bool /* use_aliases */ ); -/***====================================================================***/ - -extern _X_EXPORT unsigned XkbConvertGetByNameComponents(Bool /* toXkm */ , - unsigned /* orig */ - ); - -/***====================================================================***/ - extern _X_EXPORT Bool XkbWriteXKBKeycodes(FILE * /* file */ , XkbDescPtr /* result */ , Bool /* topLevel */ , diff --git a/xkb/xkb.c b/xkb/xkb.c index 9ede6f969..f553ef739 100644 --- a/xkb/xkb.c +++ b/xkb/xkb.c @@ -5906,6 +5906,45 @@ ProcXkbListComponents(ClientPtr client) return Success; } +static unsigned +XkbConvertGetByNameComponents(Bool toXkm, unsigned orig) +{ + unsigned rtrn; + + rtrn = 0; + if (toXkm) { + if (orig & XkbGBN_TypesMask) + rtrn |= XkmTypesMask; + if (orig & XkbGBN_CompatMapMask) + rtrn |= XkmCompatMapMask; + if (orig & XkbGBN_SymbolsMask) + rtrn |= XkmSymbolsMask; + if (orig & XkbGBN_IndicatorMapMask) + rtrn |= XkmIndicatorsMask; + if (orig & XkbGBN_KeyNamesMask) + rtrn |= XkmKeyNamesMask; + if (orig & XkbGBN_GeometryMask) + rtrn |= XkmGeometryMask; + } + else { + if (orig & XkmTypesMask) + rtrn |= XkbGBN_TypesMask; + if (orig & XkmCompatMapMask) + rtrn |= XkbGBN_CompatMapMask; + if (orig & XkmSymbolsMask) + rtrn |= XkbGBN_SymbolsMask; + if (orig & XkmIndicatorsMask) + rtrn |= XkbGBN_IndicatorMapMask; + if (orig & XkmKeyNamesMask) + rtrn |= XkbGBN_KeyNamesMask; + if (orig & XkmGeometryMask) + rtrn |= XkbGBN_GeometryMask; + if (orig != 0) + rtrn |= XkbGBN_OtherNamesMask; + } + return rtrn; +} + /***====================================================================***/ int ProcXkbGetKbdByName(ClientPtr client) diff --git a/xkb/xkbfmisc.c b/xkb/xkbfmisc.c index 146e36683..a2063e40f 100644 --- a/xkb/xkbfmisc.c +++ b/xkb/xkbfmisc.c @@ -390,42 +390,3 @@ XkbFindKeycodeByName(XkbDescPtr xkb, char *name, Bool use_aliases) } return 0; } - -unsigned -XkbConvertGetByNameComponents(Bool toXkm, unsigned orig) -{ - unsigned rtrn; - - rtrn = 0; - if (toXkm) { - if (orig & XkbGBN_TypesMask) - rtrn |= XkmTypesMask; - if (orig & XkbGBN_CompatMapMask) - rtrn |= XkmCompatMapMask; - if (orig & XkbGBN_SymbolsMask) - rtrn |= XkmSymbolsMask; - if (orig & XkbGBN_IndicatorMapMask) - rtrn |= XkmIndicatorsMask; - if (orig & XkbGBN_KeyNamesMask) - rtrn |= XkmKeyNamesMask; - if (orig & XkbGBN_GeometryMask) - rtrn |= XkmGeometryMask; - } - else { - if (orig & XkmTypesMask) - rtrn |= XkbGBN_TypesMask; - if (orig & XkmCompatMapMask) - rtrn |= XkbGBN_CompatMapMask; - if (orig & XkmSymbolsMask) - rtrn |= XkbGBN_SymbolsMask; - if (orig & XkmIndicatorsMask) - rtrn |= XkbGBN_IndicatorMapMask; - if (orig & XkmKeyNamesMask) - rtrn |= XkbGBN_KeyNamesMask; - if (orig & XkmGeometryMask) - rtrn |= XkbGBN_GeometryMask; - if (orig != 0) - rtrn |= XkbGBN_OtherNamesMask; - } - return rtrn; -}