aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/randr
diff options
context:
space:
mode:
Diffstat (limited to 'nx-X11/programs/Xserver/randr')
-rw-r--r--nx-X11/programs/Xserver/randr/randr.c14
-rw-r--r--nx-X11/programs/Xserver/randr/rrcrtc.c62
-rw-r--r--nx-X11/programs/Xserver/randr/rrdispatch.c6
-rw-r--r--nx-X11/programs/Xserver/randr/rrinfo.c12
-rw-r--r--nx-X11/programs/Xserver/randr/rrmode.c16
-rw-r--r--nx-X11/programs/Xserver/randr/rrmonitor.c24
-rw-r--r--nx-X11/programs/Xserver/randr/rroutput.c36
-rw-r--r--nx-X11/programs/Xserver/randr/rrproperty.c34
-rw-r--r--nx-X11/programs/Xserver/randr/rrprovider.c12
-rw-r--r--nx-X11/programs/Xserver/randr/rrproviderproperty.c34
-rw-r--r--nx-X11/programs/Xserver/randr/rrscreen.c42
-rw-r--r--nx-X11/programs/Xserver/randr/rrtransform.c6
12 files changed, 149 insertions, 149 deletions
diff --git a/nx-X11/programs/Xserver/randr/randr.c b/nx-X11/programs/Xserver/randr/randr.c
index b78a947c8..8ff3f9c75 100644
--- a/nx-X11/programs/Xserver/randr/randr.c
+++ b/nx-X11/programs/Xserver/randr/randr.c
@@ -131,9 +131,9 @@ RRCloseScreen(
RRMonitorClose(pScreen);
- xfree(pScrPriv->crtcs);
- xfree(pScrPriv->outputs);
- xfree(pScrPriv);
+ free(pScrPriv->crtcs);
+ free(pScrPriv->outputs);
+ free(pScrPriv);
RRNScreens -= 1; /* ok, one fewer screen with RandR running */
return (*pScreen->CloseScreen) (i, pScreen);
}
@@ -321,7 +321,7 @@ RRScreenInit(ScreenPtr pScreen)
if (!RRInit())
return FALSE;
- pScrPriv = (rrScrPrivPtr) xcalloc(1, sizeof(rrScrPrivRec));
+ pScrPriv = (rrScrPrivPtr) calloc(1, sizeof(rrScrPrivRec));
if (!pScrPriv)
return FALSE;
@@ -405,7 +405,7 @@ RRFreeClient(void *data, XID id)
*pHead = pRREvent->next;
}
}
- xfree((void *) pRREvent);
+ free((void *) pRREvent);
return 1;
}
@@ -418,9 +418,9 @@ RRFreeEvents(void *data, XID id)
for (pCur = *pHead; pCur; pCur = pNext) {
pNext = pCur->next;
FreeResource(pCur->clientResource, RRClientType);
- xfree((void *) pCur);
+ free((void *) pCur);
}
- xfree((void *) pHead);
+ free((void *) pHead);
return 1;
}
diff --git a/nx-X11/programs/Xserver/randr/rrcrtc.c b/nx-X11/programs/Xserver/randr/rrcrtc.c
index d69b5ec08..4c9b805c2 100644
--- a/nx-X11/programs/Xserver/randr/rrcrtc.c
+++ b/nx-X11/programs/Xserver/randr/rrcrtc.c
@@ -86,16 +86,16 @@ RRCrtcCreate(ScreenPtr pScreen, void *devPrivate)
crtcs = reallocarray(pScrPriv->crtcs,
pScrPriv->numCrtcs + 1, sizeof(RRCrtcPtr));
#else /* !defined(NXAGENT_SERVER) */
- crtcs = xrealloc(pScrPriv->crtcs,
+ crtcs = realloc(pScrPriv->crtcs,
(pScrPriv->numCrtcs + 1) * sizeof(RRCrtcPtr));
#endif /* !defined(NXAGENT_SERVER) */
else
- crtcs = xalloc(sizeof(RRCrtcPtr));
+ crtcs = malloc(sizeof(RRCrtcPtr));
if (!crtcs)
return FALSE;
pScrPriv->crtcs = crtcs;
- crtc = xcalloc(1, sizeof(RRCrtcRec));
+ crtc = calloc(1, sizeof(RRCrtcRec));
if (!crtc)
return NULL;
crtc->id = FakeClientID(0);
@@ -202,20 +202,20 @@ RRCrtcNotify(RRCrtcPtr crtc,
newoutputs = reallocarray(crtc->outputs,
numOutputs, sizeof(RROutputPtr));
#else /* !defined(NXAGENT_SERVER) */
- newoutputs = xrealloc(crtc->outputs,
+ newoutputs = realloc(crtc->outputs,
numOutputs * sizeof(RROutputPtr));
#endif /* !defined(NXAGENT_SERVER) */
else
#ifndef NXAGENT_SERVER
newoutputs = xallocarray(numOutputs, sizeof(RROutputPtr));
#else /* !defined(NXAGENT_SERVER) */
- newoutputs = xalloc(numOutputs * sizeof(RROutputPtr));
+ newoutputs = malloc(numOutputs * sizeof(RROutputPtr));
#endif /* !defined(NXAGENT_SERVER) */
if (!newoutputs)
return FALSE;
}
else {
- xfree(crtc->outputs);
+ free(crtc->outputs);
newoutputs = NULL;
}
crtc->outputs = newoutputs;
@@ -370,7 +370,7 @@ RRComputeContiguity(ScreenPtr pScreen)
Bool discontiguous = TRUE;
int i, n = pScrPriv->numCrtcs;
- int *reachable = xcalloc(n, sizeof(int));
+ int *reachable = calloc(n, sizeof(int));
if (!reachable)
goto out;
@@ -391,7 +391,7 @@ RRComputeContiguity(ScreenPtr pScreen)
discontiguous = FALSE;
out:
- xfree(reachable);
+ free(reachable);
pScrPriv->discontiguous = discontiguous;
}
@@ -778,10 +778,10 @@ RRCrtcDestroyResource(void *value, XID pid)
if (crtc->scanout_pixmap)
RRCrtcDetachScanoutPixmap(crtc);
- xfree(crtc->gammaRed);
+ free(crtc->gammaRed);
if (crtc->mode)
RRModeDestroy(crtc->mode);
- xfree(crtc);
+ free(crtc);
return 1;
}
@@ -892,14 +892,14 @@ RRCrtcGammaSetSize(RRCrtcPtr crtc, int size)
#ifndef NXAGENT_SERVER
gamma = xallocarray(size, 3 * sizeof(CARD16));
#else /* !defined(NXAGENT_SERVER) */
- gamma = xalloc(size * 3 * sizeof(CARD16));
+ gamma = malloc(size * 3 * sizeof(CARD16));
#endif /* !defined(NXAGENT_SERVER) */
if (!gamma)
return FALSE;
}
else
gamma = NULL;
- xfree(crtc->gammaRed);
+ free(crtc->gammaRed);
crtc->gammaRed = gamma;
crtc->gammaGreen = gamma + size;
crtc->gammaBlue = gamma + size * 2;
@@ -1047,7 +1047,7 @@ ProcRRGetCrtcInfo(ClientPtr client)
extraLen = rep.length << 2;
if (extraLen) {
- extra = xalloc(extraLen);
+ extra = malloc(extraLen);
if (!extra)
return BadAlloc;
}
@@ -1089,7 +1089,7 @@ ProcRRGetCrtcInfo(ClientPtr client)
WriteToClient(client, sizeof(xRRGetCrtcInfoReply), (char *) &rep);
if (extraLen) {
WriteToClient(client, extraLen, (char *) extra);
- xfree(extra);
+ free(extra);
}
return Success;
@@ -1136,7 +1136,7 @@ ProcRRSetCrtcConfig(ClientPtr client)
#ifndef NXAGENT_SERVER
outputs = xallocarray(numOutputs, sizeof(RROutputPtr));
#else /* !defined(NXAGENT_SERVER) */
- outputs = xalloc(numOutputs * sizeof(RROutputPtr));
+ outputs = malloc(numOutputs * sizeof(RROutputPtr));
#endif /* !defined(NXAGENT_SERVER) */
if (!outputs)
return BadAlloc;
@@ -1151,7 +1151,7 @@ ProcRRSetCrtcConfig(ClientPtr client)
RROutputType, client, DixSetAttrAccess);
if (ret != Success) {
- xfree(outputs);
+ free(outputs);
return ret;
}
#else /* !defined(NXAGENT_SERVER) */
@@ -1159,7 +1159,7 @@ ProcRRSetCrtcConfig(ClientPtr client)
if (!outputs[i]) {
client->errorValue = outputIds[i];
if (outputs)
- xfree(outputs);
+ free(outputs);
return RRErrorBase + BadRROutput;
}
#endif /* !defined(NXAGENT_SERVER) */
@@ -1168,7 +1168,7 @@ ProcRRSetCrtcConfig(ClientPtr client)
if (outputs[i]->crtcs[j] == crtc)
break;
if (j == outputs[i]->numCrtcs) {
- xfree(outputs);
+ free(outputs);
return BadMatch;
}
/* validate mode for this output */
@@ -1180,7 +1180,7 @@ ProcRRSetCrtcConfig(ClientPtr client)
break;
}
if (j == outputs[i]->numModes + outputs[i]->numUserModes) {
- xfree(outputs);
+ free(outputs);
return BadMatch;
}
}
@@ -1196,7 +1196,7 @@ ProcRRSetCrtcConfig(ClientPtr client)
break;
}
if (k == outputs[i]->numClones) {
- xfree(outputs);
+ free(outputs);
return BadMatch;
}
}
@@ -1230,7 +1230,7 @@ ProcRRSetCrtcConfig(ClientPtr client)
* Invalid rotation
*/
client->errorValue = stuff->rotation;
- xfree(outputs);
+ free(outputs);
return BadValue;
}
@@ -1240,7 +1240,7 @@ ProcRRSetCrtcConfig(ClientPtr client)
* requested rotation or reflection not supported by screen
*/
client->errorValue = stuff->rotation;
- xfree(outputs);
+ free(outputs);
return BadMatch;
}
@@ -1282,13 +1282,13 @@ ProcRRSetCrtcConfig(ClientPtr client)
&source_height);
if (stuff->x + source_width > width) {
client->errorValue = stuff->x;
- xfree(outputs);
+ free(outputs);
return BadValue;
}
if (stuff->y + source_height > height) {
client->errorValue = stuff->y;
- xfree(outputs);
+ free(outputs);
return BadValue;
}
}
@@ -1304,7 +1304,7 @@ ProcRRSetCrtcConfig(ClientPtr client)
pScrPriv->lastSetTime = time;
sendReply:
- xfree(outputs);
+ free(outputs);
rep = (xRRSetCrtcConfigReply) {
.type = X_Reply,
@@ -1514,7 +1514,7 @@ ProcRRGetCrtcGamma(ClientPtr client)
len = crtc->gammaSize * 3 * 2;
if (crtc->gammaSize) {
- extra = xalloc(len);
+ extra = malloc(len);
if (!extra)
return BadAlloc;
}
@@ -1535,7 +1535,7 @@ ProcRRGetCrtcGamma(ClientPtr client)
memcpy(extra, crtc->gammaRed, len);
client->pSwapReplyFunc = (ReplySwapPtr) CopySwap16Write;
WriteSwappedDataToClient(client, len, extra);
- xfree(extra);
+ free(extra);
}
return Success;
}
@@ -1673,7 +1673,7 @@ ProcRRGetCrtcTransform(ClientPtr client)
nextra = (transform_filter_length(pending) +
transform_filter_length(current));
- reply = xcalloc(1, sizeof(xRRGetCrtcTransformReply) + nextra);
+ reply = calloc(1, sizeof(xRRGetCrtcTransformReply) + nextra);
if (!reply)
return BadAlloc;
@@ -1700,7 +1700,7 @@ ProcRRGetCrtcTransform(ClientPtr client)
}
WriteToClient(client, sizeof(xRRGetCrtcTransformReply) + nextra,
(char *) reply);
- xfree(reply);
+ free(reply);
return Success;
}
@@ -1825,7 +1825,7 @@ RRReplaceScanoutPixmap(DrawablePtr pDrawable, PixmapPtr pPixmap, Bool enable)
PixmapPtr *saved_scanout_pixmap;
int i;
- saved_scanout_pixmap = xalloc(sizeof(PixmapPtr) * pScrPriv->numCrtcs);
+ saved_scanout_pixmap = malloc(sizeof(PixmapPtr) * pScrPriv->numCrtcs);
if (saved_scanout_pixmap == NULL)
return FALSE;
@@ -1894,7 +1894,7 @@ RRReplaceScanoutPixmap(DrawablePtr pDrawable, PixmapPtr pPixmap, Bool enable)
else
crtc->scanout_pixmap = saved_scanout_pixmap[i];
}
- xfree(saved_scanout_pixmap);
+ free(saved_scanout_pixmap);
return ret;
}
diff --git a/nx-X11/programs/Xserver/randr/rrdispatch.c b/nx-X11/programs/Xserver/randr/rrdispatch.c
index b15d1ad20..50f2011c6 100644
--- a/nx-X11/programs/Xserver/randr/rrdispatch.c
+++ b/nx-X11/programs/Xserver/randr/rrdispatch.c
@@ -125,7 +125,7 @@ ProcRRSelectInput(ClientPtr client)
if (!pRREvent) {
/* build the entry */
- pRREvent = (RREventPtr) xalloc(sizeof(RREventRec));
+ pRREvent = (RREventPtr) malloc(sizeof(RREventRec));
if (!pRREvent)
return BadAlloc;
pRREvent->next = 0;
@@ -147,7 +147,7 @@ ProcRRSelectInput(ClientPtr client)
* done through the resource database.
*/
if (!pHead) {
- pHead = (RREventPtr *) xalloc(sizeof(RREventPtr));
+ pHead = (RREventPtr *) malloc(sizeof(RREventPtr));
if (!pHead ||
!AddResource(pWin->drawable.id, RREventType,
(void *) pHead)) {
@@ -212,7 +212,7 @@ ProcRRSelectInput(ClientPtr client)
pNewRREvent->next = pRREvent->next;
else
*pHead = pRREvent->next;
- xfree(pRREvent);
+ free(pRREvent);
}
}
}
diff --git a/nx-X11/programs/Xserver/randr/rrinfo.c b/nx-X11/programs/Xserver/randr/rrinfo.c
index df9b79986..bea921436 100644
--- a/nx-X11/programs/Xserver/randr/rrinfo.c
+++ b/nx-X11/programs/Xserver/randr/rrinfo.c
@@ -59,11 +59,11 @@ RROldModeAdd(RROutputPtr output, RRScreenSizePtr size, int refresh)
modes = reallocarray(output->modes,
output->numModes + 1, sizeof(RRModePtr));
#else /* !defined(NXAGENT_SERVER) */
- modes = xrealloc(output->modes,
+ modes = realloc(output->modes,
(output->numModes + 1) * sizeof(RRModePtr));
#endif /* !defined(NXAGENT_SERVER) */
else
- modes = xalloc(sizeof(RRModePtr));
+ modes = malloc(sizeof(RRModePtr));
if (!modes) {
RRModeDestroy(mode);
FreeResource(mode->mode.id, 0);
@@ -132,7 +132,7 @@ RRScanOldConfig(ScreenPtr pScreen, Rotation rotations)
newMode = mode;
}
}
- xfree(size->pRates);
+ free(size->pRates);
}
else {
mode = RROldModeAdd(output, size, 0);
@@ -141,7 +141,7 @@ RRScanOldConfig(ScreenPtr pScreen, Rotation rotations)
}
}
if (pScrPriv->nSizes)
- xfree(pScrPriv->pSizes);
+ free(pScrPriv->pSizes);
pScrPriv->pSizes = NULL;
pScrPriv->nSizes = 0;
@@ -275,7 +275,7 @@ RRRegisterSize(ScreenPtr pScreen,
pNew = reallocarray(pScrPriv->pSizes,
pScrPriv->nSizes + 1, sizeof(RRScreenSize));
#else /* !defined(NXAGENT_SERVER) */
- pNew = xrealloc(pScrPriv->pSizes,
+ pNew = realloc(pScrPriv->pSizes,
(pScrPriv->nSizes + 1) * sizeof(RRScreenSize));
#endif /* !defined(NXAGENT_SERVER) */
if (!pNew)
@@ -302,7 +302,7 @@ RRRegisterRate(ScreenPtr pScreen, RRScreenSizePtr pSize, int rate)
#ifndef NXAGENT_SERVER
pNew = reallocarray(pSize->pRates, pSize->nRates + 1, sizeof(RRScreenRate));
#else /* !defined(NXAGENT_SERVER) */
- pNew = xrealloc(pSize->pRates, (pSize->nRates + 1) * sizeof(RRScreenRate));
+ pNew = realloc(pSize->pRates, (pSize->nRates + 1) * sizeof(RRScreenRate));
#endif /* !defined(NXAGENT_SERVER) */
if (!pNew)
return FALSE;
diff --git a/nx-X11/programs/Xserver/randr/rrmode.c b/nx-X11/programs/Xserver/randr/rrmode.c
index 918e0f221..c4718c1b4 100644
--- a/nx-X11/programs/Xserver/randr/rrmode.c
+++ b/nx-X11/programs/Xserver/randr/rrmode.c
@@ -85,7 +85,7 @@ RRModeCreate(xRRModeInfo * modeInfo, const char *name, ScreenPtr userScreen)
if (!RRInit())
return NULL;
- mode = xalloc(sizeof(RRModeRec) + modeInfo->nameLength + 1);
+ mode = malloc(sizeof(RRModeRec) + modeInfo->nameLength + 1);
if (!mode)
return NULL;
mode->refcnt = 1;
@@ -99,20 +99,20 @@ RRModeCreate(xRRModeInfo * modeInfo, const char *name, ScreenPtr userScreen)
#ifndef NXAGENT_SERVER
newModes = reallocarray(modes, num_modes + 1, sizeof(RRModePtr));
#else /* !defined(NXAGENT_SERVER) */
- newModes = xrealloc(modes, (num_modes + 1) * sizeof(RRModePtr));
+ newModes = realloc(modes, (num_modes + 1) * sizeof(RRModePtr));
#endif /* !defined(NXAGENT_SERVER) */
else
- newModes = xalloc(sizeof(RRModePtr));
+ newModes = malloc(sizeof(RRModePtr));
if (!newModes) {
- xfree(mode);
+ free(mode);
return NULL;
}
mode->mode.id = FakeClientID(0);
if (!AddResource(mode->mode.id, RRModeType, (void *) mode)) {
- xfree(newModes);
+ free(newModes);
return NULL;
}
modes = newModes;
@@ -211,7 +211,7 @@ RRModesForScreen(ScreenPtr pScreen, int *num_ret)
#ifndef NXAGENT_SERVER
screen_modes = xallocarray((num_modes ? num_modes : 1), sizeof(RRModePtr));
#else /* !defined(NXAGENT_SERVER) */
- screen_modes = xalloc((num_modes ? num_modes : 1) * sizeof(RRModePtr));
+ screen_modes = malloc((num_modes ? num_modes : 1) * sizeof(RRModePtr));
#endif /* !defined(NXAGENT_SERVER) */
if (!screen_modes)
return NULL;
@@ -285,14 +285,14 @@ RRModeDestroy(RRModePtr mode)
(num_modes - m - 1) * sizeof(RRModePtr));
num_modes--;
if (!num_modes) {
- xfree(modes);
+ free(modes);
modes = NULL;
}
break;
}
}
- xfree(mode);
+ free(mode);
}
static int
diff --git a/nx-X11/programs/Xserver/randr/rrmonitor.c b/nx-X11/programs/Xserver/randr/rrmonitor.c
index fc9b9295b..42e0de64a 100644
--- a/nx-X11/programs/Xserver/randr/rrmonitor.c
+++ b/nx-X11/programs/Xserver/randr/rrmonitor.c
@@ -95,7 +95,7 @@ RRMonitorSetFromServer(RRCrtcPtr crtc, RRMonitorPtr monitor)
monitor->name = RRMonitorCrtcName(crtc);
monitor->pScreen = crtc->pScreen;
monitor->numOutputs = crtc->numOutputs;
- monitor->outputs = xcalloc(crtc->numOutputs, sizeof(RRCrtc));
+ monitor->outputs = calloc(crtc->numOutputs, sizeof(RRCrtc));
if (!monitor->outputs)
return FALSE;
for (o = 0; o < crtc->numOutputs; o++)
@@ -173,7 +173,7 @@ RRMonitorSetFromClient(RRMonitorPtr client_monitor, RRMonitorPtr monitor)
monitor->name = client_monitor->name;
monitor->pScreen = client_monitor->pScreen;
monitor->numOutputs = client_monitor->numOutputs;
- monitor->outputs = xcalloc(client_monitor->numOutputs, sizeof(RROutput));
+ monitor->outputs = calloc(client_monitor->numOutputs, sizeof(RROutput));
if (!monitor->outputs && client_monitor->numOutputs)
return FALSE;
memcpy(monitor->outputs, client_monitor->outputs, client_monitor->numOutputs * sizeof(RROutput));
@@ -216,7 +216,7 @@ RRMonitorInitList(ScreenPtr screen, RRMonitorListPtr mon_list, Bool get_active)
#endif
mon_list->num_crtcs = numCrtcs;
- mon_list->server_crtc = xcalloc(numCrtcs * 2, sizeof(RRCrtcPtr));
+ mon_list->server_crtc = calloc(numCrtcs * 2, sizeof(RRCrtcPtr));
if (!mon_list->server_crtc)
return FALSE;
@@ -298,7 +298,7 @@ RRMonitorInitList(ScreenPtr screen, RRMonitorListPtr mon_list, Bool get_active)
static void
RRMonitorFiniList(RRMonitorListPtr list)
{
- xfree(list->server_crtc);
+ free(list->server_crtc);
}
/* Construct a complete list of protocol-visible monitors, including
@@ -321,7 +321,7 @@ RRMonitorMakeList(ScreenPtr screen, Bool get_active, RRMonitorPtr * monitors_ret
if (!RRMonitorInitList(screen, &list, get_active))
return FALSE;
- monitors = xcalloc(list.num_client + list.num_server, sizeof(RRMonitorRec));
+ monitors = calloc(list.num_client + list.num_server, sizeof(RRMonitorRec));
if (!monitors) {
RRMonitorFiniList(&list);
return FALSE;
@@ -401,7 +401,7 @@ RRMonitorCountList(ScreenPtr screen)
void
RRMonitorFree(RRMonitorPtr monitor)
{
- xfree(monitor);
+ free(monitor);
}
RRMonitorPtr
@@ -409,7 +409,7 @@ RRMonitorAlloc(int noutput)
{
RRMonitorPtr monitor;
- monitor = xcalloc(1, sizeof(RRMonitorRec) + noutput * sizeof(RROutput));
+ monitor = calloc(1, sizeof(RRMonitorRec) + noutput * sizeof(RROutput));
if (!monitor)
return NULL;
monitor->numOutputs = noutput;
@@ -512,11 +512,11 @@ RRMonitorAdd(ClientPtr client, ScreenPtr screen, RRMonitorPtr monitor)
pScrPriv->numMonitors + 1,
sizeof(RRMonitorPtr));
#else /* !defined(NXAGENT_SERVER) */
- monitors = xrealloc(pScrPriv->monitors,
+ monitors = realloc(pScrPriv->monitors,
(pScrPriv->numMonitors + 1) * sizeof(RRMonitorPtr));
#endif /* !defined(NXAGENT_SERVER) */
else
- monitors = xalloc(sizeof(RRMonitorPtr));
+ monitors = malloc(sizeof(RRMonitorPtr));
if (!monitors)
return BadAlloc;
@@ -573,8 +573,8 @@ RRMonitorFreeList(RRMonitorPtr monitors, int nmon)
int m;
for (m = 0; m < nmon; m++)
- xfree(monitors[m].outputs);
- xfree(monitors);
+ free(monitors[m].outputs);
+ free(monitors);
}
void
@@ -600,7 +600,7 @@ RRMonitorClose(ScreenPtr screen)
for (m = 0; m < pScrPriv->numMonitors; m++)
RRMonitorFree(pScrPriv->monitors[m]);
- xfree(pScrPriv->monitors);
+ free(pScrPriv->monitors);
pScrPriv->monitors = NULL;
pScrPriv->numMonitors = 0;
}
diff --git a/nx-X11/programs/Xserver/randr/rroutput.c b/nx-X11/programs/Xserver/randr/rroutput.c
index 2628fabb0..4a3d32a12 100644
--- a/nx-X11/programs/Xserver/randr/rroutput.c
+++ b/nx-X11/programs/Xserver/randr/rroutput.c
@@ -79,17 +79,17 @@ RROutputCreate(ScreenPtr pScreen,
outputs = reallocarray(pScrPriv->outputs,
pScrPriv->numOutputs + 1, sizeof(RROutputPtr));
#else /* !defined(NXAGENT_SERVER) */
- outputs = xrealloc(pScrPriv->outputs,
+ outputs = realloc(pScrPriv->outputs,
(pScrPriv->numOutputs + 1) * sizeof(RROutputPtr));
#endif /* !defined(NXAGENT_SERVER) */
else
- outputs = xalloc(sizeof(RROutputPtr));
+ outputs = malloc(sizeof(RROutputPtr));
if (!outputs)
return FALSE;
pScrPriv->outputs = outputs;
- output = xalloc(sizeof(RROutputRec) + nameLength + 1);
+ output = malloc(sizeof(RROutputRec) + nameLength + 1);
if (!output)
return NULL;
output->id = FakeClientID(0);
@@ -147,14 +147,14 @@ RROutputSetClones(RROutputPtr output, RROutputPtr * clones, int numClones)
#ifndef NXAGENT_SERVER
newClones = xallocarray(numClones, sizeof(RROutputPtr));
#else /* !defined(NXAGENT_SERVER) */
- newClones = xalloc(numClones * sizeof(RROutputPtr));
+ newClones = malloc(numClones * sizeof(RROutputPtr));
#endif /* !defined(NXAGENT_SERVER) */
if (!newClones)
return FALSE;
}
else
newClones = NULL;
- xfree(output->clones);
+ free(output->clones);
memcpy(newClones, clones, numClones * sizeof(RROutputPtr));
output->clones = newClones;
output->numClones = numClones;
@@ -184,7 +184,7 @@ RROutputSetModes(RROutputPtr output,
#ifndef NXAGENT_SERVER
newModes = xallocarray(numModes, sizeof(RRModePtr));
#else /* !defined(NXAGENT_SERVER) */
- newModes = xalloc(numModes * sizeof(RRModePtr));
+ newModes = malloc(numModes * sizeof(RRModePtr));
#endif /* !defined(NXAGENT_SERVER) */
if (!newModes)
return FALSE;
@@ -194,7 +194,7 @@ RROutputSetModes(RROutputPtr output,
if (output->modes) {
for (i = 0; i < output->numModes; i++)
RRModeDestroy(output->modes[i]);
- xfree(output->modes);
+ free(output->modes);
}
memcpy(newModes, modes, numModes * sizeof(RRModePtr));
output->modes = newModes;
@@ -232,11 +232,11 @@ RROutputAddUserMode(RROutputPtr output, RRModePtr mode)
newModes = reallocarray(output->userModes,
output->numUserModes + 1, sizeof(RRModePtr));
#else /* !defined(NXAGENT_SERVER) */
- newModes = xrealloc(output->userModes,
+ newModes = realloc(output->userModes,
(output->numUserModes + 1) * sizeof(RRModePtr));
#endif /* !defined(NXAGENT_SERVER) */
else
- newModes = xalloc(sizeof(RRModePtr));
+ newModes = malloc(sizeof(RRModePtr));
if (!newModes)
return BadAlloc;
@@ -292,14 +292,14 @@ RROutputSetCrtcs(RROutputPtr output, RRCrtcPtr * crtcs, int numCrtcs)
#ifndef NXAGENT_SERVER
newCrtcs = xallocarray(numCrtcs, sizeof(RRCrtcPtr));
#else /* !defined(NXAGENT_SERVER) */
- newCrtcs = xalloc(numCrtcs * sizeof(RRCrtcPtr));
+ newCrtcs = malloc(numCrtcs * sizeof(RRCrtcPtr));
#endif /* !defined(NXAGENT_SERVER) */
if (!newCrtcs)
return FALSE;
}
else
newCrtcs = NULL;
- xfree(output->crtcs);
+ free(output->crtcs);
memcpy(newCrtcs, crtcs, numCrtcs * sizeof(RRCrtcPtr));
output->crtcs = newCrtcs;
output->numCrtcs = numCrtcs;
@@ -404,17 +404,17 @@ RROutputDestroyResource(void *value, XID pid)
if (output->modes) {
for (m = 0; m < output->numModes; m++)
RRModeDestroy(output->modes[m]);
- xfree(output->modes);
+ free(output->modes);
}
for (m = 0; m < output->numUserModes; m++)
RRModeDestroy(output->userModes[m]);
- xfree(output->userModes);
+ free(output->userModes);
- xfree(output->crtcs);
- xfree(output->clones);
+ free(output->crtcs);
+ free(output->clones);
RRDeleteAllOutputProperties(output);
- xfree(output);
+ free(output);
return 1;
}
@@ -494,7 +494,7 @@ ProcRRGetOutputInfo(ClientPtr client)
if (extraLen) {
rep.length += bytes_to_int32(extraLen);
- extra = xalloc(extraLen);
+ extra = malloc(extraLen);
if (!extra)
return BadAlloc;
}
@@ -541,7 +541,7 @@ ProcRRGetOutputInfo(ClientPtr client)
WriteToClient(client, sizeof(xRRGetOutputInfoReply), (char *) &rep);
if (extraLen) {
WriteToClient(client, extraLen, (char *) extra);
- xfree(extra);
+ free(extra);
}
return Success;
diff --git a/nx-X11/programs/Xserver/randr/rrproperty.c b/nx-X11/programs/Xserver/randr/rrproperty.c
index 741d0310e..cf13ca23e 100644
--- a/nx-X11/programs/Xserver/randr/rrproperty.c
+++ b/nx-X11/programs/Xserver/randr/rrproperty.c
@@ -63,10 +63,10 @@ RRDeliverPropertyEvent(ScreenPtr pScreen, xEvent *event)
static void
RRDestroyOutputProperty(RRPropertyPtr prop)
{
- xfree(prop->valid_values);
- xfree(prop->current.data);
- xfree(prop->pending.data);
- xfree(prop);
+ free(prop->valid_values);
+ free(prop->current.data);
+ free(prop->pending.data);
+ free(prop);
}
static void
@@ -111,7 +111,7 @@ RRCreateOutputProperty(Atom property)
{
RRPropertyPtr prop;
- prop = (RRPropertyPtr) xalloc(sizeof(RRPropertyRec));
+ prop = (RRPropertyPtr) malloc(sizeof(RRPropertyRec));
if (!prop)
return NULL;
prop->next = NULL;
@@ -189,7 +189,7 @@ RRChangeOutputProperty(RROutputPtr output, Atom property, Atom type,
#ifndef NXAGENT_SERVER
new_value.data = xallocarray(total_len, size_in_bytes);
#else /* !defined(NXAGENT_SERVER) */
- new_value.data = xalloc(total_len * size_in_bytes);
+ new_value.data = malloc(total_len * size_in_bytes);
#endif /* !defined(NXAGENT_SERVER) */
if (!new_value.data && total_len && size_in_bytes) {
if (add)
@@ -225,12 +225,12 @@ RRChangeOutputProperty(RROutputPtr output, Atom property, Atom type,
if (pending && pScrPriv->rrOutputSetProperty &&
!pScrPriv->rrOutputSetProperty(output->pScreen, output,
prop->propertyName, &new_value)) {
- xfree(new_value.data);
+ free(new_value.data);
if (add)
RRDestroyOutputProperty(prop);
return BadValue;
}
- xfree(prop_value->data);
+ free(prop_value->data);
*prop_value = new_value;
}
@@ -362,7 +362,7 @@ RRConfigureOutputProperty(RROutputPtr output, Atom property,
#ifndef NXAGENT_SERVER
new_values = xallocarray(num_values, sizeof(INT32));
#else /* !defined(NXAGENT_SERVER) */
- new_values = xalloc(num_values * sizeof(INT32));
+ new_values = malloc(num_values * sizeof(INT32));
#endif /* !defined(NXAGENT_SERVER) */
if (!new_values && num_values) {
if (add)
@@ -377,7 +377,7 @@ RRConfigureOutputProperty(RROutputPtr output, Atom property,
* loses any pending values
*/
if (prop->is_pending && !pending) {
- xfree(prop->pending.data);
+ free(prop->pending.data);
RRInitOutputPropertyValue(&prop->pending);
}
@@ -385,7 +385,7 @@ RRConfigureOutputProperty(RROutputPtr output, Atom property,
prop->range = range;
prop->immutable = immutable;
prop->num_valid = num_values;
- xfree(prop->valid_values);
+ free(prop->valid_values);
prop->valid_values = new_values;
if (add) {
@@ -417,7 +417,7 @@ ProcRRListOutputProperties(ClientPtr client)
#ifndef NXAGENT_SERVER
if (!(pAtoms = xallocarray(numProps, sizeof(Atom))))
#else /* !defined(NXAGENT_SERVER) */
- if (!(pAtoms = xalloc(numProps * sizeof(Atom))))
+ if (!(pAtoms = malloc(numProps * sizeof(Atom))))
#endif /* !defined(NXAGENT_SERVER) */
return BadAlloc;
@@ -442,7 +442,7 @@ ProcRRListOutputProperties(ClientPtr client)
client->pSwapReplyFunc = (ReplySwapPtr) Swap32Write;
WriteSwappedDataToClient(client, numProps * sizeof(Atom), pAtoms);
- xfree(pAtoms);
+ free(pAtoms);
}
return Success;
}
@@ -469,7 +469,7 @@ ProcRRQueryOutputProperty(ClientPtr client)
#ifndef NXAGENT_SERVER
extra = xallocarray(prop->num_valid, sizeof(INT32));
#else /* !defined(NXAGENT_SERVER) */
- extra = xalloc(prop->num_valid * sizeof(INT32));
+ extra = malloc(prop->num_valid * sizeof(INT32));
#endif /* !defined(NXAGENT_SERVER) */
if (!extra)
return BadAlloc;
@@ -493,7 +493,7 @@ ProcRRQueryOutputProperty(ClientPtr client)
client->pSwapReplyFunc = (ReplySwapPtr) Swap32Write;
WriteSwappedDataToClient(client, prop->num_valid * sizeof(INT32),
extra);
- xfree(extra);
+ free(extra);
}
return Success;
}
@@ -702,7 +702,7 @@ ProcRRGetOutputProperty(ClientPtr client)
len = min(n - ind, 4 * stuff->longLength);
if (len) {
- extra = xalloc(len);
+ extra = malloc(len);
if (!extra)
return BadAlloc;
}
@@ -749,7 +749,7 @@ ProcRRGetOutputProperty(ClientPtr client)
break;
}
WriteSwappedDataToClient(client, len, extra);
- xfree(extra);
+ free(extra);
}
if (stuff->delete && (reply.bytesAfter == 0)) { /* delete the Property */
diff --git a/nx-X11/programs/Xserver/randr/rrprovider.c b/nx-X11/programs/Xserver/randr/rrprovider.c
index b2251b682..7d3096482 100644
--- a/nx-X11/programs/Xserver/randr/rrprovider.c
+++ b/nx-X11/programs/Xserver/randr/rrprovider.c
@@ -121,7 +121,7 @@ ProcRRGetProviders(ClientPtr client)
};
extraLen = rep.length << 2;
if (extraLen) {
- extra = xalloc(extraLen);
+ extra = malloc(extraLen);
if (!extra)
return BadAlloc;
} else
@@ -152,7 +152,7 @@ ProcRRGetProviders(ClientPtr client)
if (extraLen)
{
WriteToClient(client, extraLen, (char *) extra);
- xfree(extra);
+ free(extra);
}
return Success;
}
@@ -217,7 +217,7 @@ ProcRRGetProviderInfo(ClientPtr client)
extraLen = rep.length << 2;
if (extraLen) {
- extra = xalloc(extraLen);
+ extra = malloc(extraLen);
if (!extra)
return BadAlloc;
}
@@ -295,7 +295,7 @@ ProcRRGetProviderInfo(ClientPtr client)
if (extraLen)
{
WriteToClient(client, extraLen, (char *) extra);
- xfree(extra);
+ free(extra);
}
return Success;
}
@@ -380,7 +380,7 @@ RRProviderCreate(ScreenPtr pScreen, const char *name,
pScrPriv = rrGetScrPriv(pScreen);
- provider = xcalloc(1, sizeof(RRProviderRec) + nameLength + 1);
+ provider = calloc(1, sizeof(RRProviderRec) + nameLength + 1);
if (!provider)
return NULL;
@@ -427,7 +427,7 @@ RRProviderDestroyResource(void *value, XID pid)
(*pScrPriv->rrProviderDestroy) (pScreen, provider);
pScrPriv->provider = NULL;
}
- xfree(provider);
+ free(provider);
return 1;
}
diff --git a/nx-X11/programs/Xserver/randr/rrproviderproperty.c b/nx-X11/programs/Xserver/randr/rrproviderproperty.c
index a68a94ff2..b7ba8ab53 100644
--- a/nx-X11/programs/Xserver/randr/rrproviderproperty.c
+++ b/nx-X11/programs/Xserver/randr/rrproviderproperty.c
@@ -60,10 +60,10 @@ RRDeliverPropertyEvent(ScreenPtr pScreen, xEvent *event)
static void
RRDestroyProviderProperty(RRPropertyPtr prop)
{
- xfree(prop->valid_values);
- xfree(prop->current.data);
- xfree(prop->pending.data);
- xfree(prop);
+ free(prop->valid_values);
+ free(prop->current.data);
+ free(prop->pending.data);
+ free(prop);
}
static void
@@ -108,7 +108,7 @@ RRCreateProviderProperty(Atom property)
{
RRPropertyPtr prop;
- prop = (RRPropertyPtr) xalloc(sizeof(RRPropertyRec));
+ prop = (RRPropertyPtr) malloc(sizeof(RRPropertyRec));
if (!prop)
return NULL;
prop->next = NULL;
@@ -185,7 +185,7 @@ RRChangeProviderProperty(RRProviderPtr provider, Atom property, Atom type,
void *new_data = NULL, *old_data = NULL;
total_size = total_len * size_in_bytes;
- new_value.data = (void *) xalloc(total_size);
+ new_value.data = (void *) malloc(total_size);
if (!new_value.data && total_size) {
if (add)
RRDestroyProviderProperty(prop);
@@ -222,10 +222,10 @@ RRChangeProviderProperty(RRProviderPtr provider, Atom property, Atom type,
prop->propertyName, &new_value)) {
if (add)
RRDestroyProviderProperty(prop);
- xfree(new_value.data);
+ free(new_value.data);
return BadValue;
}
- xfree(prop_value->data);
+ free(prop_value->data);
*prop_value = new_value;
}
@@ -357,7 +357,7 @@ RRConfigureProviderProperty(RRProviderPtr provider, Atom property,
#ifndef NXAGENT_SERVER
new_values = xallocarray(num_values, sizeof(INT32));
#else /* !defined(NXAGENT_SERVER) */
- new_values = xalloc(num_values * sizeof(INT32));
+ new_values = malloc(num_values * sizeof(INT32));
#endif /* !defined(NXAGENT_SERVER) */
if (!new_values && num_values) {
@@ -373,7 +373,7 @@ RRConfigureProviderProperty(RRProviderPtr provider, Atom property,
* loses any pending values
*/
if (prop->is_pending && !pending) {
- xfree(prop->pending.data);
+ free(prop->pending.data);
RRInitProviderPropertyValue(&prop->pending);
}
@@ -381,7 +381,7 @@ RRConfigureProviderProperty(RRProviderPtr provider, Atom property,
prop->range = range;
prop->immutable = immutable;
prop->num_valid = num_values;
- xfree(prop->valid_values);
+ free(prop->valid_values);
prop->valid_values = new_values;
if (add) {
@@ -413,7 +413,7 @@ ProcRRListProviderProperties(ClientPtr client)
#ifndef NXAGENT_SERVER
if (!(pAtoms = xallocarray(numProps, sizeof(Atom))))
#else /* !defined(NXAGENT_SERVER) */
- if (!(pAtoms = xalloc(numProps * sizeof(Atom))))
+ if (!(pAtoms = malloc(numProps * sizeof(Atom))))
#endif /* !defined(NXAGENT_SERVER) */
return BadAlloc;
@@ -437,7 +437,7 @@ ProcRRListProviderProperties(ClientPtr client)
if (numProps) {
client->pSwapReplyFunc = (ReplySwapPtr) Swap32Write;
WriteSwappedDataToClient(client, numProps * sizeof(Atom), pAtoms);
- xfree(pAtoms);
+ free(pAtoms);
}
return Success;
}
@@ -464,7 +464,7 @@ ProcRRQueryProviderProperty(ClientPtr client)
#ifndef NXAGENT_SERVER
extra = xallocarray(prop->num_valid, sizeof(INT32));
#else /* !defined(NXAGENT_SERVER) */
- extra = xalloc(prop->num_valid * sizeof(INT32));
+ extra = malloc(prop->num_valid * sizeof(INT32));
#endif /* !defined(NXAGENT_SERVER) */
if (!extra)
return BadAlloc;
@@ -487,7 +487,7 @@ ProcRRQueryProviderProperty(ClientPtr client)
client->pSwapReplyFunc = (ReplySwapPtr) Swap32Write;
WriteSwappedDataToClient(client, prop->num_valid * sizeof(INT32),
extra);
- xfree(extra);
+ free(extra);
}
return Success;
}
@@ -694,7 +694,7 @@ ProcRRGetProviderProperty(ClientPtr client)
len = min(n - ind, 4 * stuff->longLength);
if (len) {
- extra = xalloc(len);
+ extra = malloc(len);
if (!extra)
return BadAlloc;
}
@@ -741,7 +741,7 @@ ProcRRGetProviderProperty(ClientPtr client)
break;
}
WriteSwappedDataToClient(client, len, extra);
- xfree(extra);
+ free(extra);
}
if (stuff->delete && (reply.bytesAfter == 0)) { /* delete the Property */
diff --git a/nx-X11/programs/Xserver/randr/rrscreen.c b/nx-X11/programs/Xserver/randr/rrscreen.c
index af54d66f5..017ff0143 100644
--- a/nx-X11/programs/Xserver/randr/rrscreen.c
+++ b/nx-X11/programs/Xserver/randr/rrscreen.c
@@ -334,7 +334,7 @@ ProcRRSetScreenSize(ClientPtr client)
for (j = 0; j < num_modes; j++) \
total_name_len += modes[j]->mode.nameLength; \
total_modes += num_modes; \
- xfree(modes); \
+ free(modes); \
} while(0)
static inline void
@@ -388,7 +388,7 @@ swap_modeinfos(xRRModeInfo * modeinfos, int i)
names += mode->mode.nameLength; \
mode_count++; \
} \
- xfree(modes); \
+ free(modes); \
} \
} while (0)
@@ -456,7 +456,7 @@ rrGetMultiScreenResources(ClientPtr client, Bool query, ScreenPtr pScreen)
extraLen = rep.length << 2;
if (extraLen) {
- extra = xalloc(extraLen);
+ extra = malloc(extraLen);
if (!extra) {
return BadAlloc;
}
@@ -504,7 +504,7 @@ rrGetMultiScreenResources(ClientPtr client, Bool query, ScreenPtr pScreen)
WriteToClient(client, sizeof(xRRGetScreenResourcesReply), (char *) &rep);
if (extraLen) {
WriteToClient(client, extraLen, (char *) extra);
- xfree(extra);
+ free(extra);
}
return Success;
}
@@ -595,9 +595,9 @@ rrGetScreenResources(ClientPtr client, Bool query)
extraLen = rep.length << 2;
if (extraLen) {
- extra = xalloc(extraLen);
+ extra = malloc(extraLen);
if (!extra) {
- xfree(modes);
+ free(modes);
return BadAlloc;
}
}
@@ -655,7 +655,7 @@ rrGetScreenResources(ClientPtr client, Bool query)
memcpy(names, mode->name, mode->mode.nameLength);
names += mode->mode.nameLength;
}
- xfree(modes);
+ free(modes);
assert(bytes_to_int32((char *) names - (char *) extra) == rep.length);
}
@@ -673,7 +673,7 @@ rrGetScreenResources(ClientPtr client, Bool query)
(char *) (char *) &rep);
if (extraLen) {
WriteToClient(client, extraLen, (char *) (char *) extra);
- xfree(extra);
+ free(extra);
}
return Success;
}
@@ -714,7 +714,7 @@ RR10GetData(ScreenPtr pScreen, RROutputPtr output)
Bool *used;
/* Make sure there is plenty of space for any combination */
- data = xalloc(sizeof(RR10DataRec) +
+ data = malloc(sizeof(RR10DataRec) +
sizeof(RRScreenSize) * nmode +
sizeof(RRScreenRate) * nmode + sizeof(Bool) * nmode);
if (!data)
@@ -874,9 +874,9 @@ ProcRRGetScreenInfo(ClientPtr client)
extraLen += rep.nrateEnts * sizeof(CARD16);
if (extraLen) {
- extra = (CARD8 *) xalloc(extraLen);
+ extra = (CARD8 *) malloc(extraLen);
if (!extra) {
- xfree(pData);
+ free(pData);
return BadAlloc;
}
}
@@ -916,7 +916,7 @@ ProcRRGetScreenInfo(ClientPtr client)
}
}
}
- xfree(pData);
+ free(pData);
data8 = (CARD8 *) rates;
@@ -939,7 +939,7 @@ ProcRRGetScreenInfo(ClientPtr client)
WriteToClient(client, sizeof(xRRGetScreenInfoReply), (char *) &rep);
if (extraLen) {
WriteToClient(client, extraLen, (char *) extra);
- xfree(extra);
+ free(extra);
}
return Success;
}
@@ -1035,7 +1035,7 @@ ProcRRSetScreenConfig(ClientPtr client)
* Invalid size ID
*/
client->errorValue = stuff->sizeID;
- xfree(pData);
+ free(pData);
return BadValue;
}
pSize = &pData->sizes[stuff->sizeID];
@@ -1057,7 +1057,7 @@ ProcRRSetScreenConfig(ClientPtr client)
* Invalid rotation
*/
client->errorValue = stuff->rotation;
- xfree(pData);
+ free(pData);
return BadValue;
}
@@ -1066,7 +1066,7 @@ ProcRRSetScreenConfig(ClientPtr client)
* requested rotation or reflection not supported by screen
*/
client->errorValue = stuff->rotation;
- xfree(pData);
+ free(pData);
return BadMatch;
}
@@ -1088,7 +1088,7 @@ ProcRRSetScreenConfig(ClientPtr client)
* Invalid rate
*/
client->errorValue = rate;
- xfree(pData);
+ free(pData);
return BadValue;
}
mode = pSize->pRates[i].mode;
@@ -1113,12 +1113,12 @@ ProcRRSetScreenConfig(ClientPtr client)
height = mode->mode.height;
if (width < pScrPriv->minWidth || pScrPriv->maxWidth < width) {
client->errorValue = width;
- xfree(pData);
+ free(pData);
return BadValue;
}
if (height < pScrPriv->minHeight || pScrPriv->maxHeight < height) {
client->errorValue = height;
- xfree(pData);
+ free(pData);
return BadValue;
}
@@ -1159,7 +1159,7 @@ ProcRRSetScreenConfig(ClientPtr client)
sendReply:
- xfree(pData);
+ free(pData);
rep = (xRRSetScreenConfigReply) {
.type = X_Reply,
@@ -1202,7 +1202,7 @@ RR10CurrentSizeID(ScreenPtr pScreen)
sizeID = (CARD16) i;
break;
}
- xfree(data);
+ free(data);
}
}
return sizeID;
diff --git a/nx-X11/programs/Xserver/randr/rrtransform.c b/nx-X11/programs/Xserver/randr/rrtransform.c
index 4377d09aa..f0c5dd8c7 100644
--- a/nx-X11/programs/Xserver/randr/rrtransform.c
+++ b/nx-X11/programs/Xserver/randr/rrtransform.c
@@ -37,7 +37,7 @@ RRTransformInit(RRTransformPtr transform)
void
RRTransformFini(RRTransformPtr transform)
{
- xfree(transform->params);
+ free(transform->params);
}
Bool
@@ -73,7 +73,7 @@ RRTransformSetFilter(RRTransformPtr dst,
#ifndef NXAGENT_SERVER
new_params = xallocarray(nparams, sizeof(xFixed));
#else /* !defined(NXAGENT_SERVER) */
- new_params = xalloc(nparams * sizeof(xFixed));
+ new_params = malloc(nparams * sizeof(xFixed));
#endif /* !defined(NXAGENT_SERVER) */
if (!new_params)
return FALSE;
@@ -81,7 +81,7 @@ RRTransformSetFilter(RRTransformPtr dst,
}
else
new_params = NULL;
- xfree(dst->params);
+ free(dst->params);
dst->filter = filter;
dst->params = new_params;
dst->nparams = nparams;