summaryrefslogtreecommitdiff
path: root/mi/mifillarc.c
diff options
context:
space:
mode:
authorDaniel Stone <daniel@fooishbar.org>2007-11-05 14:08:51 +0000
committerDaniel Stone <daniel@fooishbar.org>2007-11-05 14:34:41 +0000
commitbe9ee17f960cc3d8a8f999cab1579e83d9aea520 (patch)
treef563ce4405d197063ed262da3f5355d334335e43 /mi/mifillarc.c
parent3633ae6efb57c5405c26e8ae132b9371e5f920de (diff)
mi: Remove usage of alloca
Replace with heap allocations.
Diffstat (limited to 'mi/mifillarc.c')
-rw-r--r--mi/mifillarc.c40
1 files changed, 20 insertions, 20 deletions
diff --git a/mi/mifillarc.c b/mi/mifillarc.c
index c561b1f5b..f68ddf468 100644
--- a/mi/mifillarc.c
+++ b/mi/mifillarc.c
@@ -551,13 +551,13 @@ miFillEllipseI(
int *widths;
int *wids;
- points = (DDXPointPtr)ALLOCATE_LOCAL(sizeof(DDXPointRec) * arc->height);
+ points = (DDXPointPtr)xalloc(sizeof(DDXPointRec) * arc->height);
if (!points)
return;
- widths = (int *)ALLOCATE_LOCAL(sizeof(int) * arc->height);
+ widths = (int *)xalloc(sizeof(int) * arc->height);
if (!widths)
{
- DEALLOCATE_LOCAL(points);
+ xfree(points);
return;
}
miFillArcSetup(arc, &info);
@@ -575,8 +575,8 @@ miFillEllipseI(
ADDSPANS();
}
(*pGC->ops->FillSpans)(pDraw, pGC, pts - points, points, widths, FALSE);
- DEALLOCATE_LOCAL(widths);
- DEALLOCATE_LOCAL(points);
+ xfree(widths);
+ xfree(points);
}
static void
@@ -594,13 +594,13 @@ miFillEllipseD(
int *widths;
int *wids;
- points = (DDXPointPtr)ALLOCATE_LOCAL(sizeof(DDXPointRec) * arc->height);
+ points = (DDXPointPtr)xalloc(sizeof(DDXPointRec) * arc->height);
if (!points)
return;
- widths = (int *)ALLOCATE_LOCAL(sizeof(int) * arc->height);
+ widths = (int *)xalloc(sizeof(int) * arc->height);
if (!widths)
{
- DEALLOCATE_LOCAL(points);
+ xfree(points);
return;
}
miFillArcDSetup(arc, &info);
@@ -618,8 +618,8 @@ miFillEllipseD(
ADDSPANS();
}
(*pGC->ops->FillSpans)(pDraw, pGC, pts - points, points, widths, FALSE);
- DEALLOCATE_LOCAL(widths);
- DEALLOCATE_LOCAL(points);
+ xfree(widths);
+ xfree(points);
}
#define ADDSPAN(l,r) \
@@ -666,13 +666,13 @@ miFillArcSliceI(
slw = arc->height;
if (slice.flip_top || slice.flip_bot)
slw += (arc->height >> 1) + 1;
- points = (DDXPointPtr)ALLOCATE_LOCAL(sizeof(DDXPointRec) * slw);
+ points = (DDXPointPtr)xalloc(sizeof(DDXPointRec) * slw);
if (!points)
return;
- widths = (int *)ALLOCATE_LOCAL(sizeof(int) * slw);
+ widths = (int *)xalloc(sizeof(int) * slw);
if (!widths)
{
- DEALLOCATE_LOCAL(points);
+ xfree(points);
return;
}
if (pGC->miTranslate)
@@ -703,8 +703,8 @@ miFillArcSliceI(
}
}
(*pGC->ops->FillSpans)(pDraw, pGC, pts - points, points, widths, FALSE);
- DEALLOCATE_LOCAL(widths);
- DEALLOCATE_LOCAL(points);
+ xfree(widths);
+ xfree(points);
}
static void
@@ -730,13 +730,13 @@ miFillArcSliceD(
slw = arc->height;
if (slice.flip_top || slice.flip_bot)
slw += (arc->height >> 1) + 1;
- points = (DDXPointPtr)ALLOCATE_LOCAL(sizeof(DDXPointRec) * slw);
+ points = (DDXPointPtr)xalloc(sizeof(DDXPointRec) * slw);
if (!points)
return;
- widths = (int *)ALLOCATE_LOCAL(sizeof(int) * slw);
+ widths = (int *)xalloc(sizeof(int) * slw);
if (!widths)
{
- DEALLOCATE_LOCAL(points);
+ xfree(points);
return;
}
if (pGC->miTranslate)
@@ -767,8 +767,8 @@ miFillArcSliceD(
}
}
(*pGC->ops->FillSpans)(pDraw, pGC, pts - points, points, widths, FALSE);
- DEALLOCATE_LOCAL(widths);
- DEALLOCATE_LOCAL(points);
+ xfree(widths);
+ xfree(points);
}
/* MIPOLYFILLARC -- The public entry for the PolyFillArc request.