From a087369f91d2ba6ed274463610cb58f1f20f7508 Mon Sep 17 00:00:00 2001 From: Paulo Cesar Pereira de Andrade Date: Fri, 1 Feb 2008 00:15:27 -0200 Subject: [PATCH] Replace ALLOCATE_LOCAL/DEALLOCATE_LOCAL with xalloc/xfree. The other missing symbols is MGAGetClientPointer, that I believe should be provided by matrox's libHAL.a, that I am afraid if someone still has a copy of it, it won't work with X Org's loader. --- src/mga_dri.c | 26 +++++++++++++------------- 1 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/mga_dri.c b/src/mga_dri.c index 43fcaa8..7556399 100644 --- a/src/mga_dri.c +++ b/src/mga_dri.c @@ -981,11 +981,11 @@ static void MGADRIMoveBuffersXAA(WindowPtr pParent, DDXPointRec ptOldOrg, if (nbox>1) { /* Keep ordering in each band, reverse order of bands */ - pboxNew1 = (BoxPtr)ALLOCATE_LOCAL(sizeof(BoxRec)*nbox); + pboxNew1 = (BoxPtr)xalloc(sizeof(BoxRec)*nbox); if (!pboxNew1) return; - pptNew1 = (DDXPointPtr)ALLOCATE_LOCAL(sizeof(DDXPointRec)*nbox); + pptNew1 = (DDXPointPtr)xalloc(sizeof(DDXPointRec)*nbox); if (!pptNew1) { - DEALLOCATE_LOCAL(pboxNew1); + xfree(pboxNew1); return; } pboxBase = pboxNext = pbox+nbox-1; @@ -1016,14 +1016,14 @@ static void MGADRIMoveBuffersXAA(WindowPtr pParent, DDXPointRec ptOldOrg, if (nbox > 1) { /*reverse orderof rects in each band */ - pboxNew2 = (BoxPtr)ALLOCATE_LOCAL(sizeof(BoxRec)*nbox); - pptNew2 = (DDXPointPtr)ALLOCATE_LOCAL(sizeof(DDXPointRec)*nbox); + pboxNew2 = (BoxPtr)xalloc(sizeof(BoxRec)*nbox); + pptNew2 = (DDXPointPtr)xalloc(sizeof(DDXPointRec)*nbox); if (!pboxNew2 || !pptNew2) { - if (pptNew2) DEALLOCATE_LOCAL(pptNew2); - if (pboxNew2) DEALLOCATE_LOCAL(pboxNew2); + if (pptNew2) xfree(pptNew2); + if (pboxNew2) xfree(pboxNew2); if (pboxNew1) { - DEALLOCATE_LOCAL(pptNew1); - DEALLOCATE_LOCAL(pboxNew1); + xfree(pptNew1); + xfree(pboxNew1); } return; } @@ -1074,12 +1074,12 @@ static void MGADRIMoveBuffersXAA(WindowPtr pParent, DDXPointRec ptOldOrg, MGASelectBuffer(pScrn, MGA_FRONT); if (pboxNew2) { - DEALLOCATE_LOCAL(pptNew2); - DEALLOCATE_LOCAL(pboxNew2); + xfree(pptNew2); + xfree(pboxNew2); } if (pboxNew1) { - DEALLOCATE_LOCAL(pptNew1); - DEALLOCATE_LOCAL(pboxNew1); + xfree(pptNew1); + xfree(pboxNew1); } pMga->AccelInfoRec->NeedToSync = TRUE; -- 1.5.3.2