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/miexpose.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/miexpose.c')
-rw-r--r-- | mi/miexpose.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/mi/miexpose.c b/mi/miexpose.c index f52b49211..2072e6a0a 100644 --- a/mi/miexpose.c +++ b/mi/miexpose.c @@ -358,7 +358,7 @@ miSendGraphicsExpose (ClientPtr client, RegionPtr pRgn, XID drawable, numRects = REGION_NUM_RECTS(pRgn); pBox = REGION_RECTS(pRgn); - if(!(pEvent = xalloc(numRects * sizeof(xEvent)))) + if(!(pEvent = malloc(numRects * sizeof(xEvent)))) return; pe = pEvent; @@ -376,7 +376,7 @@ miSendGraphicsExpose (ClientPtr client, RegionPtr pRgn, XID drawable, } TryClientEvents(client, NULL, pEvent, numRects, (Mask)0, NoEventMask, NullGrab); - xfree(pEvent); + free(pEvent); } else { @@ -402,7 +402,7 @@ miSendExposures( WindowPtr pWin, RegionPtr pRgn, int dx, int dy) pBox = REGION_RECTS(pRgn); numRects = REGION_NUM_RECTS(pRgn); - if(!(pEvent = xcalloc(1, numRects * sizeof(xEvent)))) + if(!(pEvent = calloc(1, numRects * sizeof(xEvent)))) return; for (i=numRects, pe = pEvent; --i >= 0; pe++, pBox++) @@ -432,7 +432,7 @@ miSendExposures( WindowPtr pWin, RegionPtr pRgn, int dx, int dy) win = PanoramiXFindIDByScrnum(XRT_WINDOW, pWin->drawable.id, scrnum); if(!win) { - xfree(pEvent); + free(pEvent); return; } realWin = win->info[0].id; @@ -449,7 +449,7 @@ miSendExposures( WindowPtr pWin, RegionPtr pRgn, int dx, int dy) DeliverEvents(pWin, pEvent, numRects, NullWindow); - xfree(pEvent); + free(pEvent); } void @@ -646,14 +646,14 @@ miPaintWindow(WindowPtr pWin, RegionPtr prgn, int what) gcmask |= GCFillStyle | GCTile | GCTileStipXOrigin | GCTileStipYOrigin; } - prect = xalloc(REGION_NUM_RECTS(prgn) * sizeof(xRectangle)); + prect = malloc(REGION_NUM_RECTS(prgn) * sizeof(xRectangle)); if (!prect) return; pGC = GetScratchGC(drawable->depth, drawable->pScreen); if (!pGC) { - xfree(prect); + free(prect); return; } @@ -671,7 +671,7 @@ miPaintWindow(WindowPtr pWin, RegionPtr prgn, int what) } prect -= numRects; (*pGC->ops->PolyFillRect)(drawable, pGC, numRects, prect); - xfree(prect); + free(prect); FreeScratchGC(pGC); } |