xkbcomp: Use xkbcommon allocation functions

s/XkbAlloc/XkbcAlloc/ so we don't know XKBlib.
master
Dan Nicholson 2009-03-28 11:45:05 -07:00
parent b9335d5810
commit 39d7be43c8
9 changed files with 21 additions and 21 deletions

View 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;
status = XkbAllocGeometry(xkb, &sizes);
status = XkbcAllocGeometry(xkb, &sizes);
}
else
{
status = XkbAllocGeomKeyAliases(xkb->geom, nOld + nNew);
status = XkbcAllocGeomKeyAliases(xkb->geom, nOld + nNew);
}
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;
}

View File

@ -819,7 +819,7 @@ CompileCompatMap(XkbFile *file, XkbcDescPtr xkb, unsigned merge,
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");
@ -828,7 +828,7 @@ CompileCompatMap(XkbFile *file, XkbcDescPtr xkb, unsigned merge,
}
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

View 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;
if (XkbAllocGeometry(xkb, &sizes) != Success)
if (XkbcAllocGeometry(xkb, &sizes) != Success)
{
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 (XkbAllocNames(xkb, XkbGeometryNameMask, 0, 0) == Success)
if (XkbcAllocNames(xkb, XkbGeometryNameMask, 0, 0) == Success)
xkb->names->geometry = geom->name;
}
if (info.fontSpec != None)

View File

@ -373,12 +373,12 @@ CopyIndicatorMapDefs(XkbcDescPtr xkb, LEDInfo *leds, LEDInfo **unboundRtrn)
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");
}
if (XkbAllocIndicatorMaps(xkb) != Success)
if (XkbcAllocIndicatorMaps(xkb) != Success)
{
WSGO("Can't allocate indicator maps\n");
ACTION("Indicator map definitions may be lost\n");

View 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;
if (XkbAllocNames(xkb, XkbKeyNamesMask | XkbIndicatorNamesMask, 0, 0)
if (XkbcAllocNames(xkb, XkbKeyNamesMask | XkbIndicatorNamesMask, 0, 0)
== Success)
{
register int i;
@ -862,7 +862,7 @@ CompileKeycodes(XkbFile *file, XkbcDescPtr xkb, unsigned merge)
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");

View File

@ -1214,7 +1214,7 @@ CompileKeyTypes(XkbFile *file, XkbcDescPtr xkb, unsigned merge)
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
{
@ -1232,7 +1232,7 @@ CompileKeyTypes(XkbFile *file, XkbcDescPtr xkb, unsigned merge)
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");

View File

@ -384,7 +384,7 @@ ComputeKbdDefaults(XkbcDescPtr xkb)
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++)
@ -506,7 +506,7 @@ FindNamedKey(XkbcDescPtr xkb,
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)
{

View File

@ -2212,27 +2212,27 @@ CompileSymbols(XkbFile *file, XkbcDescPtr xkb, unsigned merge)
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;
}
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;
}
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;
}
if (XkbAllocControls(xkb, XkbPerKeyRepeatMask) != Success)
if (XkbcAllocControls(xkb, XkbPerKeyRepeatMask) != Success)
{
WSGO("Could not allocate controls in CompileSymbols\n");
ACTION("Symbols not added\n");

View File

@ -49,9 +49,9 @@ ClearVModInfo(VModInfo * info, XkbcDescPtr xkb)
{
register int i;
if (XkbAllocNames(xkb, XkbVirtualModNamesMask, 0, 0) != Success)
if (XkbcAllocNames(xkb, XkbVirtualModNamesMask, 0, 0) != Success)
return;
if (XkbAllocServerMap(xkb, XkbVirtualModsMask, 0) != Success)
if (XkbcAllocServerMap(xkb, XkbVirtualModsMask, 0) != Success)
return;
info->xkb = xkb;
info->newlyDefined = info->defined = info->available = 0;