xkbcomp: Use xkbcommon allocation functions s/XkbAlloc/XkbcAlloc/ so we don't know XKBlib.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207
diff --git a/src/xkbcomp/alias.c b/src/xkbcomp/alias.c
index 9fba41f..9f41645 100644
--- a/src/xkbcomp/alias.c
+++ b/src/xkbcomp/alias.c
@@ -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;
}
diff --git a/src/xkbcomp/compat.c b/src/xkbcomp/compat.c
index 21b08f2..427a033 100644
--- a/src/xkbcomp/compat.c
+++ b/src/xkbcomp/compat.c
@@ -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
diff --git a/src/xkbcomp/geometry.c b/src/xkbcomp/geometry.c
index 53ce552..298872a 100644
--- a/src/xkbcomp/geometry.c
+++ b/src/xkbcomp/geometry.c
@@ -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)
diff --git a/src/xkbcomp/indicators.c b/src/xkbcomp/indicators.c
index a88b071..adcd0fd 100644
--- a/src/xkbcomp/indicators.c
+++ b/src/xkbcomp/indicators.c
@@ -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");
diff --git a/src/xkbcomp/keycodes.c b/src/xkbcomp/keycodes.c
index 3d86e9b..b559f53 100644
--- a/src/xkbcomp/keycodes.c
+++ b/src/xkbcomp/keycodes.c
@@ -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");
diff --git a/src/xkbcomp/keytypes.c b/src/xkbcomp/keytypes.c
index f003b92..b8f97b0 100644
--- a/src/xkbcomp/keytypes.c
+++ b/src/xkbcomp/keytypes.c
@@ -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");
diff --git a/src/xkbcomp/misc.c b/src/xkbcomp/misc.c
index 800d3ce..46f1a73 100644
--- a/src/xkbcomp/misc.c
+++ b/src/xkbcomp/misc.c
@@ -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)
{
diff --git a/src/xkbcomp/symbols.c b/src/xkbcomp/symbols.c
index 236d451..74dcc47 100644
--- a/src/xkbcomp/symbols.c
+++ b/src/xkbcomp/symbols.c
@@ -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");
diff --git a/src/xkbcomp/vmod.c b/src/xkbcomp/vmod.c
index d7e586e..181fa4e 100644
--- a/src/xkbcomp/vmod.c
+++ b/src/xkbcomp/vmod.c
@@ -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;