From acf87144d019f18e646501657d9082c6eba77f54 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Sun, 26 Jun 2016 01:38:22 +0200 Subject: nx-X11/programs/Xserver: Drop {X,x}free() macros, use free() instead. Fixes ArcticaProject/nx-libs#105 --- nx-X11/programs/Xserver/mi/miarc.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'nx-X11/programs/Xserver/mi/miarc.c') diff --git a/nx-X11/programs/Xserver/mi/miarc.c b/nx-X11/programs/Xserver/mi/miarc.c index 8db188a6e..b268c1140 100644 --- a/nx-X11/programs/Xserver/mi/miarc.c +++ b/nx-X11/programs/Xserver/mi/miarc.c @@ -450,7 +450,7 @@ miFreeArcCache (data, id) { cent->lrustamp = 0; cent->lw = 0; - xfree(cent->spdata); + free(cent->spdata); cent->spdata = NULL; } } @@ -911,7 +911,7 @@ miComputeWideEllipse( if (!spdata || spdata->k != k) { if (spdata) - xfree(spdata); + free(spdata); spdata = (miArcSpanData *)xalloc(sizeof(miArcSpanData) + sizeof(miArcSpan) * (k + 2)); lruent->spdata = spdata; @@ -1054,7 +1054,7 @@ miFillWideEllipse( } } if (mustFree) - xfree(spdata); + free(spdata); (*pGC->ops->FillSpans)(pDraw, pGC, pts - points, points, widths, FALSE); DEALLOCATE_LOCAL(widths); @@ -1412,7 +1412,7 @@ miArcJoin(DrawablePtr pDraw, GCPtr pGC, miArcFacePtr pLeft, * rest of the line */ miFillSppPoly(pDraw, pGC, cpt, pArcPts, xOrg, yOrg, xFtrans, yFtrans); } - xfree(pArcPts); + free(pArcPts); return; case JoinMiter: /* @@ -1543,7 +1543,7 @@ miRoundCap( * rest of the line */ miFillSppPoly(pDraw, pGC, cpt, pArcPts, -xOrg, -yOrg, xFtrans, yFtrans); } - xfree(pArcPts); + free(pArcPts); } /* @@ -1840,13 +1840,13 @@ miFreeArcs( iphase--) { if (arcs[iphase].narcs > 0) - xfree(arcs[iphase].arcs); + free(arcs[iphase].arcs); if (arcs[iphase].njoins > 0) - xfree(arcs[iphase].joins); + free(arcs[iphase].joins); if (arcs[iphase].ncaps > 0) - xfree(arcs[iphase].caps); + free(arcs[iphase].caps); } - xfree(arcs); + free(arcs); } /* @@ -3169,11 +3169,11 @@ disposeFinalSpans (void) for (chunk = chunks; chunk; chunk = next) { next = chunk->next; - xfree (chunk); + free (chunk); } chunks = 0; freeFinalSpans = 0; - xfree(finalSpans); + free(finalSpans); finalSpans = 0; } @@ -3265,7 +3265,7 @@ realFindSpan (int y) memmove(((char *) newSpans) + (finalMiny-newMiny) * sizeof (struct finalSpan *), (char *) finalSpans, finalSize * sizeof (struct finalSpan *)); - xfree (finalSpans); + free (finalSpans); } if ((i = finalMiny - newMiny) > 0) bzero ((char *)newSpans, i * sizeof (struct finalSpan *)); @@ -3610,7 +3610,7 @@ drawArc ( } } if (mustFree) - xfree(spdata); + free(spdata); } static void -- cgit v1.2.3 From 2646fc254e75c4a7fc10d03d1139d0bd708ceae9 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Sun, 26 Jun 2016 01:51:18 +0200 Subject: nx-X11/programs/Xserver: Drop {X,x}alloc() macros, use malloc() instead. --- nx-X11/programs/Xserver/mi/miarc.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'nx-X11/programs/Xserver/mi/miarc.c') diff --git a/nx-X11/programs/Xserver/mi/miarc.c b/nx-X11/programs/Xserver/mi/miarc.c index b268c1140..c1e07f175 100644 --- a/nx-X11/programs/Xserver/mi/miarc.c +++ b/nx-X11/programs/Xserver/mi/miarc.c @@ -912,7 +912,7 @@ miComputeWideEllipse( { if (spdata) free(spdata); - spdata = (miArcSpanData *)xalloc(sizeof(miArcSpanData) + + spdata = (miArcSpanData *)malloc(sizeof(miArcSpanData) + sizeof(miArcSpan) * (k + 2)); lruent->spdata = spdata; if (!spdata) @@ -1396,7 +1396,7 @@ miArcJoin(DrawablePtr pDraw, GCPtr pGC, miArcFacePtr pLeft, arc.height = width; arc.angle1 = -miDatan2 (corner.y - center.y, corner.x - center.x); arc.angle2 = a; - pArcPts = (SppPointPtr) xalloc (3 * sizeof (SppPointRec)); + pArcPts = (SppPointPtr) malloc (3 * sizeof (SppPointRec)); if (!pArcPts) return; pArcPts[0].x = otherCorner.x; @@ -1641,10 +1641,10 @@ miDatan2 (double dy, double dx) * This procedure allocates the space necessary to fit the arc points. * Sometimes it's convenient for those points to be at the end of an existing * array. (For example, if we want to leave a spare point to make sectors - * instead of segments.) So we pass in the xalloc()ed chunk that contains the + * instead of segments.) So we pass in the malloc()ed chunk that contains the * array and an index saying where we should start stashing the points. * If there isn't an array already, we just pass in a null pointer and - * count on xrealloc() to handle the null pointer correctly. + * count on realloc() to handle the null pointer correctly. */ static int miGetArcPts( @@ -1691,7 +1691,7 @@ miGetArcPts( count++; cdt = 2 * miDcos(dt); - if (!(poly = (SppPointPtr) xrealloc((void *)*ppPts, + if (!(poly = (SppPointPtr) realloc((void *)*ppPts, (cpt + count) * sizeof(SppPointRec)))) return(0); *ppPts = poly; @@ -1933,7 +1933,7 @@ miComputeArcs ( data = (struct arcData *) ALLOCATE_LOCAL (narcs * sizeof (struct arcData)); if (!data) return (miPolyArcPtr)NULL; - arcs = (miPolyArcPtr) xalloc (sizeof (*arcs) * (isDoubleDash ? 2 : 1)); + arcs = (miPolyArcPtr) malloc (sizeof (*arcs) * (isDoubleDash ? 2 : 1)); if (!arcs) { DEALLOCATE_LOCAL(data); @@ -3146,7 +3146,7 @@ realAllocSpan () register struct finalSpan *span; register int i; - newChunk = (struct finalSpanChunk *) xalloc (sizeof (struct finalSpanChunk)); + newChunk = (struct finalSpanChunk *) malloc (sizeof (struct finalSpanChunk)); if (!newChunk) return (struct finalSpan *) NULL; newChunk->next = chunks; @@ -3251,7 +3251,7 @@ realFindSpan (int y) else change = SPAN_REALLOC; newSize = finalSize + change; - newSpans = (struct finalSpan **) xalloc + newSpans = (struct finalSpan **) malloc (newSize * sizeof (struct finalSpan *)); if (!newSpans) return (struct finalSpan **)NULL; -- cgit v1.2.3 From 74a5450bc058354e55c1589e64ef8e73775cebc4 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Sun, 26 Jun 2016 02:08:32 +0200 Subject: nx-X11/programs/Xserver: Drop {X,x}realloc() macros, use realloc() instead. --- nx-X11/programs/Xserver/mi/miarc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'nx-X11/programs/Xserver/mi/miarc.c') diff --git a/nx-X11/programs/Xserver/mi/miarc.c b/nx-X11/programs/Xserver/mi/miarc.c index c1e07f175..9c3bcb7ad 100644 --- a/nx-X11/programs/Xserver/mi/miarc.c +++ b/nx-X11/programs/Xserver/mi/miarc.c @@ -1754,7 +1754,7 @@ addCap ( if (*ncapsp == *sizep) { newsize = *sizep + ADD_REALLOC_STEP; - cap = (miArcCapPtr) xrealloc (*capsp, + cap = (miArcCapPtr) realloc (*capsp, newsize * sizeof (**capsp)); if (!cap) return; @@ -1785,7 +1785,7 @@ addJoin ( if (*njoinsp == *sizep) { newsize = *sizep + ADD_REALLOC_STEP; - join = (miArcJoinPtr) xrealloc (*joinsp, + join = (miArcJoinPtr) realloc (*joinsp, newsize * sizeof (**joinsp)); if (!join) return; @@ -1815,7 +1815,7 @@ addArc ( if (*narcsp == *sizep) { newsize = *sizep + ADD_REALLOC_STEP; - arc = (miArcDataPtr) xrealloc (*arcsp, + arc = (miArcDataPtr) realloc (*arcsp, newsize * sizeof (**arcsp)); if (!arc) return (miArcDataPtr)NULL; -- cgit v1.2.3