summaryrefslogtreecommitdiff
path: root/uxa
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2010-06-04 16:04:37 -0700
committerEric Anholt <eric@anholt.net>2010-06-06 15:56:35 -0700
commit2c1fda08e889cad07acb452230da06f9c383d21c (patch)
tree365ebf1e27b2a2ac784ab469d109d86e2edf6597 /uxa
parentb586624d4f2908d2a998ba87fe0ae31c10f46b91 (diff)
Use libc instead of deprecated libc wrappers for malloc/calloc/free.
Diffstat (limited to 'uxa')
-rw-r--r--uxa/uxa-accel.c14
-rw-r--r--uxa/uxa-glyphs.c10
-rw-r--r--uxa/uxa-render.c4
-rw-r--r--uxa/uxa.c8
4 files changed, 18 insertions, 18 deletions
diff --git a/uxa/uxa-accel.c b/uxa/uxa-accel.c
index 6b177cff..ed643c61 100644
--- a/uxa/uxa-accel.c
+++ b/uxa/uxa-accel.c
@@ -727,7 +727,7 @@ uxa_poly_point(DrawablePtr pDrawable, GCPtr pGC, int mode, int npt,
return;
}
- prect = xalloc(sizeof(xRectangle) * npt);
+ prect = malloc(sizeof(xRectangle) * npt);
if (!prect)
return;
for (i = 0; i < npt; i++) {
@@ -741,7 +741,7 @@ uxa_poly_point(DrawablePtr pDrawable, GCPtr pGC, int mode, int npt,
prect[i].height = 1;
}
pGC->ops->PolyFillRect(pDrawable, pGC, npt, prect);
- xfree(prect);
+ free(prect);
}
/**
@@ -764,7 +764,7 @@ uxa_poly_lines(DrawablePtr pDrawable, GCPtr pGC, int mode, int npt,
return;
}
- prect = xalloc(sizeof(xRectangle) * (npt - 1));
+ prect = malloc(sizeof(xRectangle) * (npt - 1));
if (!prect)
return;
x1 = ppt[0].x;
@@ -780,7 +780,7 @@ uxa_poly_lines(DrawablePtr pDrawable, GCPtr pGC, int mode, int npt,
}
if (x1 != x2 && y1 != y2) {
- xfree(prect);
+ free(prect);
uxa_check_poly_lines(pDrawable, pGC, mode, npt, ppt);
return;
}
@@ -804,7 +804,7 @@ uxa_poly_lines(DrawablePtr pDrawable, GCPtr pGC, int mode, int npt,
y1 = y2;
}
pGC->ops->PolyFillRect(pDrawable, pGC, npt - 1, prect);
- xfree(prect);
+ free(prect);
}
/**
@@ -833,7 +833,7 @@ uxa_poly_segment(DrawablePtr pDrawable, GCPtr pGC, int nseg, xSegment * pSeg)
}
}
- prect = xalloc(sizeof(xRectangle) * nseg);
+ prect = malloc(sizeof(xRectangle) * nseg);
if (!prect)
return;
for (i = 0; i < nseg; i++) {
@@ -861,7 +861,7 @@ uxa_poly_segment(DrawablePtr pDrawable, GCPtr pGC, int nseg, xSegment * pSeg)
}
}
pGC->ops->PolyFillRect(pDrawable, pGC, nseg, prect);
- xfree(prect);
+ free(prect);
}
static Bool uxa_fill_region_solid(DrawablePtr pDrawable, RegionPtr pRegion,
diff --git a/uxa/uxa-glyphs.c b/uxa/uxa-glyphs.c
index 9e596584..fde40287 100644
--- a/uxa/uxa-glyphs.c
+++ b/uxa/uxa-glyphs.c
@@ -110,7 +110,7 @@ static void uxa_unrealize_glyph_caches(ScreenPtr pScreen)
FreePicture(cache->picture, 0);
if (cache->glyphs)
- xfree(cache->glyphs);
+ free(cache->glyphs);
}
}
@@ -171,7 +171,7 @@ static Bool uxa_realize_glyph_caches(ScreenPtr pScreen)
ValidatePicture(picture);
cache->picture = picture;
- cache->glyphs = xcalloc(sizeof(GlyphPtr), GLYPH_CACHE_SIZE);
+ cache->glyphs = calloc(sizeof(GlyphPtr), GLYPH_CACHE_SIZE);
if (!cache->glyphs)
goto bail;
@@ -285,7 +285,7 @@ uxa_glyph_unrealize(ScreenPtr pScreen,
priv->cache->glyphs[priv->pos] = NULL;
uxa_glyph_set_private(pGlyph, NULL);
- xfree(priv);
+ free(priv);
}
/* Cut and paste from render/glyph.c - probably should export it instead */
@@ -587,7 +587,7 @@ uxa_glyph_cache(ScreenPtr screen, GlyphPtr glyph, int *out_x, int *out_y)
GlyphPtr evicted = cache->glyphs[pos + s];
if (evicted != NULL) {
if (priv != NULL)
- xfree(priv);
+ free(priv);
priv = uxa_glyph_get_private(evicted);
uxa_glyph_set_private(evicted, NULL);
@@ -601,7 +601,7 @@ uxa_glyph_cache(ScreenPtr screen, GlyphPtr glyph, int *out_x, int *out_y)
}
if (priv == NULL) {
- priv = xalloc(sizeof(struct uxa_glyph));
+ priv = malloc(sizeof(struct uxa_glyph));
if (priv == NULL)
return NULL;
}
diff --git a/uxa/uxa-render.c b/uxa/uxa-render.c
index 0e4fa91d..abfef8ea 100644
--- a/uxa/uxa-render.c
+++ b/uxa/uxa-render.c
@@ -911,7 +911,7 @@ _pixman_region_init_rectangles(pixman_region16_t *region,
int i;
if (num_rects > sizeof(stack_boxes) / sizeof(stack_boxes[0])) {
- boxes = xalloc(sizeof(pixman_box16_t) * num_rects);
+ boxes = malloc(sizeof(pixman_box16_t) * num_rects);
if (boxes == NULL)
return FALSE;
}
@@ -926,7 +926,7 @@ _pixman_region_init_rectangles(pixman_region16_t *region,
ret = pixman_region_init_rects(region, boxes, num_rects);
if (boxes != stack_boxes)
- xfree(boxes);
+ free(boxes);
return ret;
}
diff --git a/uxa/uxa.c b/uxa/uxa.c
index a9a705c2..32b007d6 100644
--- a/uxa/uxa.c
+++ b/uxa/uxa.c
@@ -405,7 +405,7 @@ static Bool uxa_close_screen(int i, ScreenPtr pScreen)
}
#endif
- xfree(uxa_screen);
+ free(uxa_screen);
return (*pScreen->CloseScreen) (i, pScreen);
}
@@ -416,13 +416,13 @@ static Bool uxa_close_screen(int i, ScreenPtr pScreen)
* without breaking ABI between UXA and the drivers. The driver's
* responsibility is to check beforehand that the UXA module has a matching
* major number and sufficient minor. Drivers are responsible for freeing the
- * driver structure using xfree().
+ * driver structure using free().
*
* @return a newly allocated, zero-filled driver structure
*/
uxa_driver_t *uxa_driver_alloc(void)
{
- return xcalloc(1, sizeof(uxa_driver_t));
+ return calloc(1, sizeof(uxa_driver_t));
}
/**
@@ -467,7 +467,7 @@ Bool uxa_driver_init(ScreenPtr screen, uxa_driver_t * uxa_driver)
"non-NULL\n", screen->myNum);
return FALSE;
}
- uxa_screen = xcalloc(sizeof(uxa_screen_t), 1);
+ uxa_screen = calloc(sizeof(uxa_screen_t), 1);
if (!uxa_screen) {
LogMessage(X_WARNING,