summaryrefslogtreecommitdiff
path: root/mi/miexpose.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/miexpose.c
parent3633ae6efb57c5405c26e8ae132b9371e5f920de (diff)
mi: Remove usage of alloca
Replace with heap allocations.
Diffstat (limited to 'mi/miexpose.c')
-rw-r--r--mi/miexpose.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/mi/miexpose.c b/mi/miexpose.c
index 6ace9f589..2d3b0d510 100644
--- a/mi/miexpose.c
+++ b/mi/miexpose.c
@@ -369,7 +369,7 @@ miSendGraphicsExpose (client, pRgn, drawable, major, minor)
numRects = REGION_NUM_RECTS(pRgn);
pBox = REGION_RECTS(pRgn);
- if(!(pEvent = (xEvent *)ALLOCATE_LOCAL(numRects * sizeof(xEvent))))
+ if(!(pEvent = (xEvent *)xalloc(numRects * sizeof(xEvent))))
return;
pe = pEvent;
@@ -387,7 +387,7 @@ miSendGraphicsExpose (client, pRgn, drawable, major, minor)
}
TryClientEvents(client, pEvent, numRects,
(Mask)0, NoEventMask, NullGrab);
- DEALLOCATE_LOCAL(pEvent);
+ xfree(pEvent);
}
else
{
@@ -415,7 +415,7 @@ miSendExposures(pWin, pRgn, dx, dy)
pBox = REGION_RECTS(pRgn);
numRects = REGION_NUM_RECTS(pRgn);
- if(!(pEvent = (xEvent *) ALLOCATE_LOCAL(numRects * sizeof(xEvent))))
+ if(!(pEvent = (xEvent *) xalloc(numRects * sizeof(xEvent))))
return;
for (i=numRects, pe = pEvent; --i >= 0; pe++, pBox++)
@@ -445,7 +445,7 @@ miSendExposures(pWin, pRgn, dx, dy)
win = PanoramiXFindIDByScrnum(XRT_WINDOW,
pWin->drawable.id, scrnum);
if(!win) {
- DEALLOCATE_LOCAL(pEvent);
+ xfree(pEvent);
return;
}
realWin = win->info[0].id;
@@ -462,7 +462,7 @@ miSendExposures(pWin, pRgn, dx, dy)
DeliverEvents(pWin, pEvent, numRects, NullWindow);
- DEALLOCATE_LOCAL(pEvent);
+ xfree(pEvent);
}
_X_EXPORT void
@@ -620,7 +620,7 @@ miPaintWindow(WindowPtr pWin, RegionPtr prgn, int what)
gcmask |= GCFillStyle | GCTile | GCTileStipXOrigin | GCTileStipYOrigin;
}
- prect = (xRectangle *)ALLOCATE_LOCAL(REGION_NUM_RECTS(prgn) *
+ prect = (xRectangle *)xalloc(REGION_NUM_RECTS(prgn) *
sizeof(xRectangle));
if (!prect)
return;
@@ -628,7 +628,7 @@ miPaintWindow(WindowPtr pWin, RegionPtr prgn, int what)
pGC = GetScratchGC(drawable->depth, drawable->pScreen);
if (!pGC)
{
- DEALLOCATE_LOCAL(prect);
+ xfree(prect);
return;
}
@@ -646,7 +646,7 @@ miPaintWindow(WindowPtr pWin, RegionPtr prgn, int what)
}
prect -= numRects;
(*pGC->ops->PolyFillRect)(drawable, pGC, numRects, prect);
- DEALLOCATE_LOCAL(prect);
+ xfree(prect);
FreeScratchGC(pGC);
}