diff options
author | Mikhail Gusarov <dottedmag@dottedmag.net> | 2010-05-06 01:44:06 +0700 |
---|---|---|
committer | Mikhail Gusarov <dottedmag@dottedmag.net> | 2010-05-13 00:22:37 +0700 |
commit | 3f3ff971ecff9936cebafc813af9193b97bba89c (patch) | |
tree | fdbbad794a42488b7ffe41eed7aba4e498335f55 /mi/miwideline.c | |
parent | 96c7ab27c383ec767f62a7a11e5fd76f86363fbc (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 'mi/miwideline.c')
-rw-r--r-- | mi/miwideline.c | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/mi/miwideline.c b/mi/miwideline.c index 181b12e48..57dda2202 100644 --- a/mi/miwideline.c +++ b/mi/miwideline.c @@ -122,13 +122,13 @@ miFillPolyHelper (DrawablePtr pDrawable, GCPtr pGC, unsigned long pixel, if (!spanData) { - pptInit = xalloc (overall_height * sizeof(*ppt)); + pptInit = malloc(overall_height * sizeof(*ppt)); if (!pptInit) return; - pwidthInit = xalloc (overall_height * sizeof(*pwidth)); + pwidthInit = malloc(overall_height * sizeof(*pwidth)); if (!pwidthInit) { - xfree (pptInit); + free(pptInit); return; } ppt = pptInit; @@ -143,13 +143,13 @@ miFillPolyHelper (DrawablePtr pDrawable, GCPtr pGC, unsigned long pixel, } else { - spanRec.points = xalloc (overall_height * sizeof (*ppt)); + spanRec.points = malloc(overall_height * sizeof (*ppt)); if (!spanRec.points) return; - spanRec.widths = xalloc (overall_height * sizeof (int)); + spanRec.widths = malloc(overall_height * sizeof (int)); if (!spanRec.widths) { - xfree (spanRec.points); + free(spanRec.points); return; } ppt = spanRec.points; @@ -229,8 +229,8 @@ miFillPolyHelper (DrawablePtr pDrawable, GCPtr pGC, unsigned long pixel, if (!spanData) { (*pGC->ops->FillSpans) (pDrawable, pGC, ppt - pptInit, pptInit, pwidthInit, TRUE); - xfree (pwidthInit); - xfree (pptInit); + free(pwidthInit); + free(pptInit); if (pixel != oldPixel) { DoChangeGC (pGC, GCForeground, &oldPixel, FALSE); @@ -283,13 +283,13 @@ miFillRectPolyHelper ( } else { - spanRec.points = xalloc (h * sizeof (*ppt)); + spanRec.points = malloc(h * sizeof (*ppt)); if (!spanRec.points) return; - spanRec.widths = xalloc (h * sizeof (int)); + spanRec.widths = malloc(h * sizeof (int)); if (!spanRec.widths) { - xfree (spanRec.points); + free(spanRec.points); return; } ppt = spanRec.points; @@ -1107,13 +1107,13 @@ miLineArc ( } if (!spanData) { - points = xalloc(sizeof(DDXPointRec) * pGC->lineWidth); + points = malloc(sizeof(DDXPointRec) * pGC->lineWidth); if (!points) return; - widths = xalloc(sizeof(int) * pGC->lineWidth); + widths = malloc(sizeof(int) * pGC->lineWidth); if (!widths) { - xfree(points); + free(points); return; } oldPixel = pGC->fgPixel; @@ -1126,13 +1126,13 @@ miLineArc ( } else { - points = xalloc (pGC->lineWidth * sizeof (DDXPointRec)); + points = malloc(pGC->lineWidth * sizeof (DDXPointRec)); if (!points) return; - widths = xalloc (pGC->lineWidth * sizeof (int)); + widths = malloc(pGC->lineWidth * sizeof (int)); if (!widths) { - xfree (points); + free(points); return; } spanRec.points = points; @@ -1148,8 +1148,8 @@ miLineArc ( if (!spanData) { (*pGC->ops->FillSpans)(pDraw, pGC, n, points, widths, TRUE); - xfree(widths); - xfree(points); + free(widths); + free(points); if (pixel != oldPixel) { DoChangeGC(pGC, GCForeground, &oldPixel, FALSE); |