summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin-Éric Racine <martin-eric.racine@iki.fi>2011-03-13 17:38:45 +0200
committerMartin-Éric Racine <martin-eric.racine@iki.fi>2011-03-13 17:38:45 +0200
commit66f895773b970fb181de1b5c7e23b4867216b7a9 (patch)
tree4463f0c7d21ec16dc5795752e4fd8ef56b0dc2ed
parent0fee3839515d9eb979adbf075afe6a549b9f0bb5 (diff)
Replace xalloc/xrealloc/xfree/xcalloc with malloc/realloc/free/calloc
-rw-r--r--src/nsc_driver.c6
-rw-r--r--src/nsc_gx1_dga.c6
-rw-r--r--src/nsc_gx1_driver.c12
-rw-r--r--src/nsc_gx1_video.c26
-rw-r--r--src/nsc_gx2_dga.c2
-rw-r--r--src/nsc_gx2_driver.c12
-rw-r--r--src/nsc_gx2_video.c26
7 files changed, 45 insertions, 45 deletions
diff --git a/src/nsc_driver.c b/src/nsc_driver.c
index 06393ac..cf1c013 100644
--- a/src/nsc_driver.c
+++ b/src/nsc_driver.c
@@ -560,7 +560,7 @@ NscProbe(DriverPtr drv, int flags)
break;
}
}
- xfree(pEnt);
+ free(pEnt);
GeodeDebug(("NscProbe: CPUDetected %d!\n", CPUDetected));
pScrn->driverName = NSC_DRIVER_NAME;
@@ -586,9 +586,9 @@ NscProbe(DriverPtr drv, int flags)
#endif
if (usedChips)
- xfree(usedChips);
+ free(usedChips);
if (devSections)
- xfree(devSections);
+ free(devSections);
GeodeDebug(("NscProbe: result (%d)!\n", foundScreen));
return foundScreen;
}
diff --git a/src/nsc_gx1_dga.c b/src/nsc_gx1_dga.c
index 0a39e91..1ec14fb 100644
--- a/src/nsc_gx1_dga.c
+++ b/src/nsc_gx1_dga.c
@@ -219,15 +219,15 @@ GX1DGAInit(ScreenPtr pScreen)
/* memory is allocated for dga to
*setup the viewport and mode parameters
*/
- newmodes = xrealloc(modes, (num + 2) * sizeof(DGAModeRec));
+ newmodes = realloc(modes, (num + 2) * sizeof(DGAModeRec));
oneMore = TRUE;
} else {
/* one record is allocated here */
- newmodes = xrealloc(modes, (num + 1) * sizeof(DGAModeRec));
+ newmodes = realloc(modes, (num + 1) * sizeof(DGAModeRec));
oneMore = FALSE;
}
if (!newmodes) {
- xfree(modes);
+ free(modes);
return FALSE;
}
modes = newmodes;
diff --git a/src/nsc_gx1_driver.c b/src/nsc_gx1_driver.c
index ef1511c..0ebd5d1 100644
--- a/src/nsc_gx1_driver.c
+++ b/src/nsc_gx1_driver.c
@@ -364,7 +364,7 @@ GX1FreeRec(ScrnInfoPtr pScreenInfo)
if (pScreenInfo->driverPrivate == NULL) {
return;
}
- xfree(pScreenInfo->driverPrivate);
+ free(pScreenInfo->driverPrivate);
pScreenInfo->driverPrivate = NULL;
}
@@ -1643,13 +1643,13 @@ GX1CloseScreen(int scrnIndex, ScreenPtr pScreen)
XAADestroyInfoRec(pGeode->AccelInfoRec);
pScreenInfo->vtSema = FALSE;
if (pGeode->DGAModes)
- xfree(pGeode->DGAModes);
+ free(pGeode->DGAModes);
pGeode->DGAModes = 0;
if (pGeode->ShadowPtr)
- xfree(pGeode->ShadowPtr);
+ free(pGeode->ShadowPtr);
if (pGeode->AccelImageWriteBufferOffsets) {
- xfree(pGeode->AccelImageWriteBufferOffsets);
+ free(pGeode->AccelImageWriteBufferOffsets);
pGeode->AccelImageWriteBufferOffsets = 0x0;
}
/* free the allocated off screen area */
@@ -1863,7 +1863,7 @@ GX1ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
if (pGeode->NoOfImgBuffers > 0) {
if (pGeode->NoOfImgBuffers <= (AvailBox.y2 - AvailBox.y1)) {
pGeode->AccelImageWriteBufferOffsets =
- xalloc(sizeof(unsigned long) * pGeode->NoOfImgBuffers);
+ malloc(sizeof(unsigned long) * pGeode->NoOfImgBuffers);
pGeode->AccelImageWriteBufferOffsets[0] =
((unsigned char *)pGeode->FBBase) +
@@ -1959,7 +1959,7 @@ GX1ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
}
if (pGeode->ShadowFB) {
pGeode->ShadowPitch = BitmapBytePad(pScreenInfo->bitsPerPixel * width);
- pGeode->ShadowPtr = xalloc(pGeode->ShadowPitch * height);
+ pGeode->ShadowPtr = malloc(pGeode->ShadowPitch * height);
displayWidth = pGeode->ShadowPitch / (pScreenInfo->bitsPerPixel >> 3);
FBStart = pGeode->ShadowPtr;
} else {
diff --git a/src/nsc_gx1_video.c b/src/nsc_gx1_video.c
index 8c29bdf..108d9c0 100644
--- a/src/nsc_gx1_video.c
+++ b/src/nsc_gx1_video.c
@@ -263,7 +263,7 @@ GX1InitVideo(ScreenPtr pScreen)
adaptors = &newAdaptor;
} else {
newAdaptors = /* need to free this someplace */
- xalloc((num_adaptors + 1) * sizeof(XF86VideoAdaptorPtr *));
+ malloc((num_adaptors + 1) * sizeof(XF86VideoAdaptorPtr *));
if (newAdaptors) {
memcpy(newAdaptors, adaptors, num_adaptors *
sizeof(XF86VideoAdaptorPtr));
@@ -278,7 +278,7 @@ GX1InitVideo(ScreenPtr pScreen)
xf86XVScreenInit(pScreen, adaptors, num_adaptors);
if (newAdaptors)
- xfree(newAdaptors);
+ free(newAdaptors);
}
/* client libraries expect an encoding */
@@ -450,7 +450,7 @@ GX1SetupImageVideo(ScreenPtr pScreen)
GeodePortPrivPtr pPriv;
DEBUGMSG(0, (0, X_NONE, "SetupImageVideo\n"));
- if (!(adapt = xcalloc(1, sizeof(XF86VideoAdaptorRec) +
+ if (!(adapt = calloc(1, sizeof(XF86VideoAdaptorRec) +
sizeof(GeodePortPrivRec) + sizeof(DevUnion))))
return NULL;
@@ -1423,15 +1423,15 @@ GX1AllocateSurface(ScrnInfoPtr pScrn,
surface->width = w;
surface->height = h;
- if (!(surface->pitches = xalloc(sizeof(int))))
+ if (!(surface->pitches = malloc(sizeof(int))))
return BadAlloc;
- if (!(surface->offsets = xalloc(sizeof(int)))) {
- xfree(surface->pitches);
+ if (!(surface->offsets = malloc(sizeof(int)))) {
+ free(surface->pitches);
return BadAlloc;
}
- if (!(pPriv = xalloc(sizeof(OffscreenPrivRec)))) {
- xfree(surface->pitches);
- xfree(surface->offsets);
+ if (!(pPriv = malloc(sizeof(OffscreenPrivRec)))) {
+ free(surface->pitches);
+ free(surface->offsets);
return BadAlloc;
}
@@ -1469,9 +1469,9 @@ GX1FreeSurface(XF86SurfacePtr surface)
if (pPriv->isOn)
GX1StopSurface(surface);
xf86FreeOffscreenArea(pPriv->area);
- xfree(surface->pitches);
- xfree(surface->offsets);
- xfree(surface->devPrivate.ptr);
+ free(surface->pitches);
+ free(surface->offsets);
+ free(surface->devPrivate.ptr);
return Success;
}
@@ -1563,7 +1563,7 @@ GX1InitOffscreenImages(ScreenPtr pScreen)
DEBUGMSG(0, (0, X_NONE, "InitOffscreenImages\n"));
/* need to free this someplace */
- if (!(offscreenImages = xalloc(sizeof(XF86OffscreenImageRec))))
+ if (!(offscreenImages = malloc(sizeof(XF86OffscreenImageRec))))
return;
offscreenImages[0].image = &Images[0];
diff --git a/src/nsc_gx2_dga.c b/src/nsc_gx2_dga.c
index 71f5245..23c70ef 100644
--- a/src/nsc_gx2_dga.c
+++ b/src/nsc_gx2_dga.c
@@ -226,7 +226,7 @@ GX2DGAInit(ScreenPtr pScreen)
oneMore = FALSE;
}
if (!newmodes) {
- xfree(modes);
+ free(modes);
return FALSE;
}
modes = newmodes;
diff --git a/src/nsc_gx2_driver.c b/src/nsc_gx2_driver.c
index 057733b..5ccd60f 100644
--- a/src/nsc_gx2_driver.c
+++ b/src/nsc_gx2_driver.c
@@ -315,7 +315,7 @@ GX2GetRec(ScrnInfoPtr pScreenInfo)
pGeode = pScreenInfo->driverPrivate = xnfcalloc(sizeof(GeodeRec), 1);
#if INT10_SUPPORT
- pGeode->vesa = xcalloc(sizeof(VESARec), 1);
+ pGeode->vesa = calloc(sizeof(VESARec), 1);
#endif
}
return GEODEPTR(pScreenInfo);
@@ -342,7 +342,7 @@ GX2FreeRec(ScrnInfoPtr pScreenInfo)
if (pScreenInfo->driverPrivate == NULL) {
return;
}
- xfree(pScreenInfo->driverPrivate);
+ free(pScreenInfo->driverPrivate);
pScreenInfo->driverPrivate = NULL;
}
@@ -1581,7 +1581,7 @@ GX2CloseScreen(int scrnIndex, ScreenPtr pScreen)
GeodePtr pGeode = GEODEPTR(pScreenInfo);
if (pGeode->ShadowPtr)
- xfree(pGeode->ShadowPtr);
+ free(pGeode->ShadowPtr);
DEBUGMSG(0, (scrnIndex, X_PROBED, "GX2CloseScreen %d\n",
pScreenInfo->vtSema));
@@ -1592,7 +1592,7 @@ GX2CloseScreen(int scrnIndex, ScreenPtr pScreen)
XAADestroyInfoRec(pGeode->AccelInfoRec);
if (pGeode->AccelImageWriteBufferOffsets) {
- xfree(pGeode->AccelImageWriteBufferOffsets);
+ free(pGeode->AccelImageWriteBufferOffsets);
pGeode->AccelImageWriteBufferOffsets = 0x0;
}
/* free the allocated off screen area */
@@ -1783,7 +1783,7 @@ GX2ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
if (pGeode->NoOfImgBuffers > 0) {
if (pGeode->NoOfImgBuffers <= (AvailBox.y2 - AvailBox.y1)) {
pGeode->AccelImageWriteBufferOffsets =
- xalloc(sizeof(unsigned long) * pGeode->NoOfImgBuffers);
+ malloc(sizeof(unsigned long) * pGeode->NoOfImgBuffers);
pGeode->AccelImageWriteBufferOffsets[0] =
((unsigned char *)pGeode->FBBase) +
@@ -1876,7 +1876,7 @@ GX2ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
}
if (pGeode->ShadowFB) {
pGeode->ShadowPitch = BitmapBytePad(pScreenInfo->bitsPerPixel * width);
- pGeode->ShadowPtr = xalloc(pGeode->ShadowPitch * height);
+ pGeode->ShadowPtr = malloc(pGeode->ShadowPitch * height);
displayWidth = pGeode->ShadowPitch / (pScreenInfo->bitsPerPixel >> 3);
FBStart = pGeode->ShadowPtr;
} else {
diff --git a/src/nsc_gx2_video.c b/src/nsc_gx2_video.c
index d09a2a0..45590b0 100644
--- a/src/nsc_gx2_video.c
+++ b/src/nsc_gx2_video.c
@@ -256,7 +256,7 @@ GX2InitVideo(ScreenPtr pScreen)
adaptors = &newAdaptor;
} else {
newAdaptors = /* need to free this someplace */
- xalloc((num_adaptors + 1) * sizeof(XF86VideoAdaptorPtr *));
+ malloc((num_adaptors + 1) * sizeof(XF86VideoAdaptorPtr *));
if (newAdaptors) {
memcpy(newAdaptors, adaptors, num_adaptors *
sizeof(XF86VideoAdaptorPtr));
@@ -271,7 +271,7 @@ GX2InitVideo(ScreenPtr pScreen)
xf86XVScreenInit(pScreen, adaptors, num_adaptors);
if (newAdaptors)
- xfree(newAdaptors);
+ free(newAdaptors);
}
/* client libraries expect an encoding */
@@ -450,7 +450,7 @@ GX2SetupImageVideo(ScreenPtr pScreen)
XF86VideoAdaptorPtr adapt;
GeodePortPrivPtr pPriv;
- if (!(adapt = xcalloc(1, sizeof(XF86VideoAdaptorRec) +
+ if (!(adapt = calloc(1, sizeof(XF86VideoAdaptorRec) +
sizeof(GeodePortPrivRec) + sizeof(DevUnion))))
return NULL;
@@ -1366,15 +1366,15 @@ GX2AllocateSurface(ScrnInfoPtr pScrn,
surface->width = w;
surface->height = h;
- if (!(surface->pitches = xalloc(sizeof(int))))
+ if (!(surface->pitches = malloc(sizeof(int))))
return BadAlloc;
- if (!(surface->offsets = xalloc(sizeof(int)))) {
- xfree(surface->pitches);
+ if (!(surface->offsets = malloc(sizeof(int)))) {
+ free(surface->pitches);
return BadAlloc;
}
- if (!(pPriv = xalloc(sizeof(OffscreenPrivRec)))) {
- xfree(surface->pitches);
- xfree(surface->offsets);
+ if (!(pPriv = malloc(sizeof(OffscreenPrivRec)))) {
+ free(surface->pitches);
+ free(surface->offsets);
return BadAlloc;
}
@@ -1410,9 +1410,9 @@ GX2FreeSurface(XF86SurfacePtr surface)
if (pPriv->isOn)
GX2StopSurface(surface);
xf86FreeOffscreenArea(pPriv->area);
- xfree(surface->pitches);
- xfree(surface->offsets);
- xfree(surface->devPrivate.ptr);
+ free(surface->pitches);
+ free(surface->offsets);
+ free(surface->devPrivate.ptr);
return Success;
}
@@ -1503,7 +1503,7 @@ GX2InitOffscreenImages(ScreenPtr pScreen)
XF86OffscreenImagePtr offscreenImages;
/* need to free this someplace */
- if (!(offscreenImages = xalloc(sizeof(XF86OffscreenImageRec))))
+ if (!(offscreenImages = malloc(sizeof(XF86OffscreenImageRec))))
return;
offscreenImages[0].image = &Images[0];