xkbcomp: Use xkbcommon allocation functions
authorDan Nicholson <dbn.lists@gmail.com>
Sat, 28 Mar 2009 18:45:05 +0000 (11:45 -0700)
committerDan Nicholson <dbn.lists@gmail.com>
Sat, 28 Mar 2009 21:22:41 +0000 (14:22 -0700)
s/XkbAlloc/XkbcAlloc/ so we don't know XKBlib.

src/xkbcomp/alias.c
src/xkbcomp/compat.c
src/xkbcomp/geometry.c
src/xkbcomp/indicators.c
src/xkbcomp/keycodes.c
src/xkbcomp/keytypes.c
src/xkbcomp/misc.c
src/xkbcomp/symbols.c
src/xkbcomp/vmod.c

index 9fba41ff051dba054182ed062f8ae73cdb4920cc..9f416450d9a7350289481691669bc99898634ca8 100644 (file)
@@ -238,18 +238,18 @@ ApplyAliases(XkbcDescPtr xkb, Bool toGeom, AliasInfo ** info_in)
             bzero((char *) &sizes, sizeof(XkbGeometrySizesRec));
             sizes.which = XkbGeomKeyAliasesMask;
             sizes.num_key_aliases = nOld + nNew;
             bzero((char *) &sizes, sizeof(XkbGeometrySizesRec));
             sizes.which = XkbGeomKeyAliasesMask;
             sizes.num_key_aliases = nOld + nNew;
-            status = XkbAllocGeometry(xkb, &sizes);
+            status = XkbcAllocGeometry(xkb, &sizes);
         }
         else
         {
         }
         else
         {
-            status = XkbAllocGeomKeyAliases(xkb->geom, nOld + nNew);
+            status = XkbcAllocGeomKeyAliases(xkb->geom, nOld + nNew);
         }
         if (xkb->geom)
             old = xkb->geom->key_aliases;
     }
     else
     {
         }
         if (xkb->geom)
             old = xkb->geom->key_aliases;
     }
     else
     {
-        status = XkbAllocNames(xkb, XkbKeyAliasesMask, 0, nOld + nNew);
+        status = XkbcAllocNames(xkb, XkbKeyAliasesMask, 0, nOld + nNew);
         if (xkb->names)
             old = xkb->names->key_aliases;
     }
         if (xkb->names)
             old = xkb->names->key_aliases;
     }
index 21b08f26e115b21054b4e7b30e8fed646c78b277..427a0338d4013727d25b45904dccc9a57b55e575 100644 (file)
@@ -819,7 +819,7 @@ CompileCompatMap(XkbFile *file, XkbcDescPtr xkb, unsigned merge,
     if (info.errorCount == 0)
     {
         int size;
     if (info.errorCount == 0)
     {
         int size;
-        if (XkbAllocCompatMap(xkb, XkbAllCompatMask, info.nInterps) !=
+        if (XkbcAllocCompatMap(xkb, XkbAllCompatMask, info.nInterps) !=
             Success)
         {
             WSGO("Couldn't allocate compatibility map\n");
             Success)
         {
             WSGO("Couldn't allocate compatibility map\n");
@@ -828,7 +828,7 @@ CompileCompatMap(XkbFile *file, XkbcDescPtr xkb, unsigned merge,
         }
         if (info.name != NULL)
         {
         }
         if (info.name != NULL)
         {
-            if (XkbAllocNames(xkb, XkbCompatNameMask, 0, 0) == Success)
+            if (XkbcAllocNames(xkb, XkbCompatNameMask, 0, 0) == Success)
                 xkb->names->compat =
                     XkbcInternAtom(info.name, False);
             else
                 xkb->names->compat =
                     XkbcInternAtom(info.name, False);
             else
index 53ce552f55a1881a3cd9ee185b27e45c75f603f1..298872a59ea362178d2d9bef88ffa13e2e7b7734 100644 (file)
@@ -3614,7 +3614,7 @@ CompileGeometry(XkbFile *file, XkbcDescPtr xkb, unsigned merge)
         sizes.num_shapes = info.nShapes;
         sizes.num_sections = info.nSections;
         sizes.num_doodads = info.nDoodads;
         sizes.num_shapes = info.nShapes;
         sizes.num_sections = info.nSections;
         sizes.num_doodads = info.nDoodads;
-        if (XkbAllocGeometry(xkb, &sizes) != Success)
+        if (XkbcAllocGeometry(xkb, &sizes) != Success)
         {
             WSGO("Couldn't allocate GeometryRec\n");
             ACTION("Geometry not compiled\n");
         {
             WSGO("Couldn't allocate GeometryRec\n");
             ACTION("Geometry not compiled\n");
@@ -3627,7 +3627,7 @@ CompileGeometry(XkbFile *file, XkbcDescPtr xkb, unsigned merge)
         if (info.name != NULL)
         {
             geom->name = XkbcInternAtom(info.name, False);
         if (info.name != NULL)
         {
             geom->name = XkbcInternAtom(info.name, False);
-            if (XkbAllocNames(xkb, XkbGeometryNameMask, 0, 0) == Success)
+            if (XkbcAllocNames(xkb, XkbGeometryNameMask, 0, 0) == Success)
                 xkb->names->geometry = geom->name;
         }
         if (info.fontSpec != None)
                 xkb->names->geometry = geom->name;
         }
         if (info.fontSpec != None)
index a88b07112b78531c6cfff72d0e381bc623d657b0..adcd0fd46224964573f11e95544ea7b1d727491b 100644 (file)
@@ -373,12 +373,12 @@ CopyIndicatorMapDefs(XkbcDescPtr xkb, LEDInfo *leds, LEDInfo **unboundRtrn)
     LEDInfo *led, *next;
     LEDInfo *unbound, *last;
 
     LEDInfo *led, *next;
     LEDInfo *unbound, *last;
 
-    if (XkbAllocNames(xkb, XkbIndicatorNamesMask, 0, 0) != Success)
+    if (XkbcAllocNames(xkb, XkbIndicatorNamesMask, 0, 0) != Success)
     {
         WSGO("Couldn't allocate names\n");
         ACTION("Indicator names may be incorrect\n");
     }
     {
         WSGO("Couldn't allocate names\n");
         ACTION("Indicator names may be incorrect\n");
     }
-    if (XkbAllocIndicatorMaps(xkb) != Success)
+    if (XkbcAllocIndicatorMaps(xkb) != Success)
     {
         WSGO("Can't allocate indicator maps\n");
         ACTION("Indicator map definitions may be lost\n");
     {
         WSGO("Can't allocate indicator maps\n");
         ACTION("Indicator map definitions may be lost\n");
index 3d86e9ba51f66f056893755207bfdc7b091451ba..b559f538b0f3430526d55f33744d5abe97e8c139 100644 (file)
@@ -840,7 +840,7 @@ CompileKeycodes(XkbFile *file, XkbcDescPtr xkb, unsigned merge)
             xkb->max_key_code = info.effectiveMax;
         else
             xkb->max_key_code = info.computedMax;
             xkb->max_key_code = info.effectiveMax;
         else
             xkb->max_key_code = info.computedMax;
-        if (XkbAllocNames(xkb, XkbKeyNamesMask | XkbIndicatorNamesMask, 0, 0)
+        if (XkbcAllocNames(xkb, XkbKeyNamesMask | XkbIndicatorNamesMask, 0, 0)
                 == Success)
         {
             register int i;
                 == Success)
         {
             register int i;
@@ -862,7 +862,7 @@ CompileKeycodes(XkbFile *file, XkbcDescPtr xkb, unsigned merge)
         if (info.leds)
         {
             IndicatorNameInfo *ii;
         if (info.leds)
         {
             IndicatorNameInfo *ii;
-            if (XkbAllocIndicatorMaps(xkb) != Success)
+            if (XkbcAllocIndicatorMaps(xkb) != Success)
             {
                 WSGO("Couldn't allocate IndicatorRec in CompileKeycodes\n");
                 ACTION("Physical indicators not set\n");
             {
                 WSGO("Couldn't allocate IndicatorRec in CompileKeycodes\n");
                 ACTION("Physical indicators not set\n");
index f003b921b131e5275c58a1ff618ae791fe50b804..b8f97b07e1c1130b0b502930cda5a6dc8b4ab01f 100644 (file)
@@ -1214,7 +1214,7 @@ CompileKeyTypes(XkbFile *file, XkbcDescPtr xkb, unsigned merge)
 
         if (info.name != NULL)
         {
 
         if (info.name != NULL)
         {
-            if (XkbAllocNames(xkb, XkbTypesNameMask, 0, 0) == Success)
+            if (XkbcAllocNames(xkb, XkbTypesNameMask, 0, 0) == Success)
                 xkb->names->types = XkbcInternAtom(info.name, False);
             else
             {
                 xkb->names->types = XkbcInternAtom(info.name, False);
             else
             {
@@ -1232,7 +1232,7 @@ CompileKeyTypes(XkbFile *file, XkbcDescPtr xkb, unsigned merge)
             i++;
         if ((info.stdPresent & XkbAlphabeticMask) == 0)
             i++;
             i++;
         if ((info.stdPresent & XkbAlphabeticMask) == 0)
             i++;
-        if (XkbAllocClientMap(xkb, XkbKeyTypesMask, i) != Success)
+        if (XkbcAllocClientMap(xkb, XkbKeyTypesMask, i) != Success)
         {
             WSGO("Couldn't allocate client map\n");
             ACTION("Exiting\n");
         {
             WSGO("Couldn't allocate client map\n");
             ACTION("Exiting\n");
index 800d3ce90c3762edf7c39c597f720658fefdf3af..46f1a73e6132efa854c673841bd41d35142ab534 100644 (file)
@@ -384,7 +384,7 @@ ComputeKbdDefaults(XkbcDescPtr xkb)
 
     if ((xkb->names == NULL) || (xkb->names->keys == NULL))
     {
 
     if ((xkb->names == NULL) || (xkb->names->keys == NULL))
     {
-        if ((rtrn = XkbAllocNames(xkb, XkbKeyNamesMask, 0, 0)) != Success)
+        if ((rtrn = XkbcAllocNames(xkb, XkbKeyNamesMask, 0, 0)) != Success)
             return rtrn;
     }
     for (name = dfltKeys; (name->name[0] != '\0'); name++)
             return rtrn;
     }
     for (name = dfltKeys; (name->name[0] != '\0'); name++)
@@ -506,7 +506,7 @@ FindNamedKey(XkbcDescPtr xkb,
                 xkb->min_key_code = XkbMinLegalKeyCode;
                 xkb->max_key_code = XkbMaxLegalKeyCode;
             }
                 xkb->min_key_code = XkbMinLegalKeyCode;
                 xkb->max_key_code = XkbMaxLegalKeyCode;
             }
-            if (XkbAllocNames(xkb, XkbKeyNamesMask, 0, 0) != Success)
+            if (XkbcAllocNames(xkb, XkbKeyNamesMask, 0, 0) != Success)
             {
                 if (warningLevel > 0)
                 {
             {
                 if (warningLevel > 0)
                 {
index 236d451211feb31190345baf9ca3724aaf47cb29..74dcc4781be88ad15d85c28b253fe58b911ab03e 100644 (file)
@@ -2212,27 +2212,27 @@ CompileSymbols(XkbFile *file, XkbcDescPtr xkb, unsigned merge)
         KeyInfo *key;
 
         /* alloc memory in the xkb struct */
         KeyInfo *key;
 
         /* alloc memory in the xkb struct */
-        if (XkbAllocNames(xkb, XkbSymbolsNameMask | XkbGroupNamesMask, 0, 0)
+        if (XkbcAllocNames(xkb, XkbSymbolsNameMask | XkbGroupNamesMask, 0, 0)
             != Success)
         {
             WSGO("Can not allocate names in CompileSymbols\n");
             ACTION("Symbols not added\n");
             return False;
         }
             != Success)
         {
             WSGO("Can not allocate names in CompileSymbols\n");
             ACTION("Symbols not added\n");
             return False;
         }
-        if (XkbAllocClientMap(xkb, XkbKeySymsMask | XkbModifierMapMask, 0)
+        if (XkbcAllocClientMap(xkb, XkbKeySymsMask | XkbModifierMapMask, 0)
             != Success)
         {
             WSGO("Could not allocate client map in CompileSymbols\n");
             ACTION("Symbols not added\n");
             return False;
         }
             != Success)
         {
             WSGO("Could not allocate client map in CompileSymbols\n");
             ACTION("Symbols not added\n");
             return False;
         }
-        if (XkbAllocServerMap(xkb, XkbAllServerInfoMask, 32) != Success)
+        if (XkbcAllocServerMap(xkb, XkbAllServerInfoMask, 32) != Success)
         {
             WSGO("Could not allocate server map in CompileSymbols\n");
             ACTION("Symbols not added\n");
             return False;
         }
         {
             WSGO("Could not allocate server map in CompileSymbols\n");
             ACTION("Symbols not added\n");
             return False;
         }
-        if (XkbAllocControls(xkb, XkbPerKeyRepeatMask) != Success)
+        if (XkbcAllocControls(xkb, XkbPerKeyRepeatMask) != Success)
         {
             WSGO("Could not allocate controls in CompileSymbols\n");
             ACTION("Symbols not added\n");
         {
             WSGO("Could not allocate controls in CompileSymbols\n");
             ACTION("Symbols not added\n");
index d7e586e28a32cc6c5f5e56386d700d4cd3b9080d..181fa4e50fff97f72647b5b7e449d42528ec499e 100644 (file)
@@ -49,9 +49,9 @@ ClearVModInfo(VModInfo * info, XkbcDescPtr xkb)
 {
     register int i;
 
 {
     register int i;
 
-    if (XkbAllocNames(xkb, XkbVirtualModNamesMask, 0, 0) != Success)
+    if (XkbcAllocNames(xkb, XkbVirtualModNamesMask, 0, 0) != Success)
         return;
         return;
-    if (XkbAllocServerMap(xkb, XkbVirtualModsMask, 0) != Success)
+    if (XkbcAllocServerMap(xkb, XkbVirtualModsMask, 0) != Success)
         return;
     info->xkb = xkb;
     info->newlyDefined = info->defined = info->available = 0;
         return;
     info->xkb = xkb;
     info->newlyDefined = info->defined = info->available = 0;