summaryrefslogtreecommitdiff
path: root/render/glyph.c
diff options
context:
space:
mode:
authorMikhail Gusarov <dottedmag@dottedmag.net>2010-05-06 01:44:06 +0700
committerMikhail Gusarov <dottedmag@dottedmag.net>2010-05-13 00:22:37 +0700
commit3f3ff971ecff9936cebafc813af9193b97bba89c (patch)
treefdbbad794a42488b7ffe41eed7aba4e498335f55 /render/glyph.c
parent96c7ab27c383ec767f62a7a11e5fd76f86363fbc (diff)
Replace X-allocation functions with their C89 counterparts
The only remaining X-functions used in server are XNF*, the rest is converted to plain alloc/calloc/realloc/free/strdup. X* functions are still exported from server and x* macros are still defined in header file, so both ABI and API are not affected by this change. Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'render/glyph.c')
-rw-r--r--render/glyph.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/render/glyph.c b/render/glyph.c
index 6b81118ec..e5b8f8633 100644
--- a/render/glyph.c
+++ b/render/glyph.c
@@ -302,7 +302,7 @@ FreeGlyph (GlyphPtr glyph, int format)
FreeGlyphPicture(glyph);
FreeGlyphPrivates(glyph);
- xfree (glyph);
+ free(glyph);
}
}
@@ -321,7 +321,7 @@ AddGlyph (GlyphSetPtr glyphSet, GlyphPtr glyph, Glyph id)
{
FreeGlyphPicture(glyph);
FreeGlyphPrivates(glyph);
- xfree (glyph);
+ free(glyph);
glyph = gr->glyph;
}
else if (gr->glyph != glyph)
@@ -381,7 +381,7 @@ AllocateGlyph (xGlyphInfo *gi, int fdepth)
int i;
size = screenInfo.numScreens * sizeof (PicturePtr);
- glyph = (GlyphPtr) xalloc (size + sizeof (GlyphRec));
+ glyph = (GlyphPtr) malloc(size + sizeof (GlyphRec));
if (!glyph)
return 0;
glyph->refcnt = 0;
@@ -412,14 +412,14 @@ bail:
}
FreeGlyphPrivates(glyph);
- xfree (glyph);
+ free(glyph);
return 0;
}
Bool
AllocateGlyphHash (GlyphHashPtr hash, GlyphHashSetPtr hashSet)
{
- hash->table = xcalloc (hashSet->size, sizeof (GlyphRefRec));
+ hash->table = calloc(hashSet->size, sizeof (GlyphRefRec));
if (!hash->table)
return FALSE;
hash->hashSet = hashSet;
@@ -462,7 +462,7 @@ ResizeGlyphHash (GlyphHashPtr hash, CARD32 change, Bool global)
++newHash.tableEntries;
}
}
- xfree (hash->table);
+ free(hash->table);
}
*hash = newHash;
if (global)
@@ -490,13 +490,13 @@ AllocateGlyphSet (int fdepth, PictFormatPtr format)
}
size = sizeof (GlyphSetRec);
- glyphSet = xcalloc (1, size);
+ glyphSet = calloc(1, size);
if (!glyphSet)
return FALSE;
if (!AllocateGlyphHash (&glyphSet->hash, &glyphHashSets[0]))
{
- xfree (glyphSet);
+ free(glyphSet);
return FALSE;
}
glyphSet->refcnt = 1;
@@ -525,15 +525,15 @@ FreeGlyphSet (pointer value,
}
if (!globalGlyphs[glyphSet->fdepth].tableEntries)
{
- xfree (globalGlyphs[glyphSet->fdepth].table);
+ free(globalGlyphs[glyphSet->fdepth].table);
globalGlyphs[glyphSet->fdepth].table = 0;
globalGlyphs[glyphSet->fdepth].hashSet = 0;
}
else
ResizeGlyphHash (&globalGlyphs[glyphSet->fdepth], 0, TRUE);
- xfree (table);
+ free(table);
dixFreePrivates(glyphSet->devPrivates);
- xfree (glyphSet);
+ free(glyphSet);
}
return Success;
}