aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver
diff options
context:
space:
mode:
Diffstat (limited to 'nx-X11/programs/Xserver')
-rw-r--r--nx-X11/programs/Xserver/Xext/panoramiX.c8
-rw-r--r--nx-X11/programs/Xserver/Xext/panoramiXprocs.c2
-rw-r--r--nx-X11/programs/Xserver/Xi/listdev.c2
-rw-r--r--nx-X11/programs/Xserver/dbe/dbe.c2
-rw-r--r--nx-X11/programs/Xserver/dix/colormap.c2
-rw-r--r--nx-X11/programs/Xserver/dix/dispatch.c2
-rw-r--r--nx-X11/programs/Xserver/dix/main.c4
-rw-r--r--nx-X11/programs/Xserver/fb/fbpseudocolor.c2
-rw-r--r--nx-X11/programs/Xserver/mi/mibank.c4
-rw-r--r--nx-X11/programs/Xserver/mi/mioverlay.c2
-rw-r--r--nx-X11/programs/Xserver/randr/randr.c2
-rw-r--r--nx-X11/programs/Xserver/randr/rrcrtc.c6
-rw-r--r--nx-X11/programs/Xserver/randr/rrmonitor.c10
-rw-r--r--nx-X11/programs/Xserver/randr/rrprovider.c2
-rw-r--r--nx-X11/programs/Xserver/record/set.c10
15 files changed, 26 insertions, 34 deletions
diff --git a/nx-X11/programs/Xserver/Xext/panoramiX.c b/nx-X11/programs/Xserver/Xext/panoramiX.c
index 3c72cec22..c00d003a5 100644
--- a/nx-X11/programs/Xserver/Xext/panoramiX.c
+++ b/nx-X11/programs/Xserver/Xext/panoramiX.c
@@ -525,7 +525,7 @@ void PanoramiXExtensionInit(int argc, char *argv[])
*/
panoramiXdataPtr = (PanoramiXData *)
- xcalloc(PanoramiXNumScreens, sizeof(PanoramiXData));
+ calloc(PanoramiXNumScreens, sizeof(PanoramiXData));
BREAK_IF(!panoramiXdataPtr);
BREAK_IF((PanoramiXGCIndex = AllocateGCPrivateIndex()) < 0);
@@ -769,16 +769,16 @@ void PanoramiXConsolidate(void)
Bool foundDepth, missingDepth;
if(!PanoramiXVisualTable)
- PanoramiXVisualTable = xcalloc(256 * MAXSCREENS, sizeof(XID));
+ PanoramiXVisualTable = calloc(256 * MAXSCREENS, sizeof(XID));
pScreen = screenInfo.screens[0];
pVisual = pScreen->visuals;
pDepth = pScreen->allowedDepths;
PanoramiXNumDepths = 0;
- PanoramiXDepths = xcalloc(pScreen->numDepths,sizeof(DepthRec));
+ PanoramiXDepths = calloc(pScreen->numDepths,sizeof(DepthRec));
PanoramiXNumVisuals = 0;
- PanoramiXVisuals = xcalloc(pScreen->numVisuals,sizeof(VisualRec));
+ PanoramiXVisuals = calloc(pScreen->numVisuals,sizeof(VisualRec));
for (i = 0; i < pScreen->numDepths; i++, pDepth++) {
missingDepth = FALSE;
diff --git a/nx-X11/programs/Xserver/Xext/panoramiXprocs.c b/nx-X11/programs/Xserver/Xext/panoramiXprocs.c
index 9682f2427..36ebfac21 100644
--- a/nx-X11/programs/Xserver/Xext/panoramiXprocs.c
+++ b/nx-X11/programs/Xserver/Xext/panoramiXprocs.c
@@ -1036,7 +1036,7 @@ int PanoramiXCopyArea(ClientPtr client)
VERIFY_DRAWABLE(drawables[j], src->info[j].id, client);
pitch = PixmapBytePad(stuff->width, drawables[0]->depth);
- if(!(data = xcalloc(1, stuff->height * pitch)))
+ if(!(data = calloc(1, stuff->height * pitch)))
return BadAlloc;
XineramaGetImageData(drawables, srcx, srcy,
diff --git a/nx-X11/programs/Xserver/Xi/listdev.c b/nx-X11/programs/Xserver/Xi/listdev.c
index 2e78aa339..7f3b49e89 100644
--- a/nx-X11/programs/Xserver/Xi/listdev.c
+++ b/nx-X11/programs/Xserver/Xi/listdev.c
@@ -129,7 +129,7 @@ ProcXListInputDevices (client)
SizeDeviceInfo (d, &namesize, &size);
total_length = numdevs * sizeof (xDeviceInfo) + size + namesize;
- devbuf = (char *) xcalloc (1, total_length);
+ devbuf = (char *) calloc (1, total_length);
classbuf = devbuf + (numdevs * sizeof (xDeviceInfo));
namebuf = classbuf + size;
savbuf = devbuf;
diff --git a/nx-X11/programs/Xserver/dbe/dbe.c b/nx-X11/programs/Xserver/dbe/dbe.c
index 743099763..5687f3d56 100644
--- a/nx-X11/programs/Xserver/dbe/dbe.c
+++ b/nx-X11/programs/Xserver/dbe/dbe.c
@@ -1874,7 +1874,7 @@ DbeExtensionInit()
if (!AllocateWindowPrivate(pScreen, dbeWindowPrivIndex, 0) ||
!(pDbeScreenPriv =
- (DbeScreenPrivPtr)Xcalloc(sizeof(DbeScreenPrivRec))))
+ (DbeScreenPrivPtr)calloc(1, sizeof(DbeScreenPrivRec))))
{
/* If we can not alloc a window or screen private,
* then free any privates that we already alloc'ed and return
diff --git a/nx-X11/programs/Xserver/dix/colormap.c b/nx-X11/programs/Xserver/dix/colormap.c
index 8129e9c3d..44095b729 100644
--- a/nx-X11/programs/Xserver/dix/colormap.c
+++ b/nx-X11/programs/Xserver/dix/colormap.c
@@ -395,7 +395,7 @@ CreateColormap (Colormap mid, ScreenPtr pScreen, VisualPtr pVisual,
pmap->devPrivates = NULL;
else
{
- pmap->devPrivates = (DevUnion *) xcalloc (
+ pmap->devPrivates = (DevUnion *) calloc (
sizeof(DevUnion), colormapPrivateCount);
if (!pmap->devPrivates)
{
diff --git a/nx-X11/programs/Xserver/dix/dispatch.c b/nx-X11/programs/Xserver/dix/dispatch.c
index ed908d03f..aac3284a7 100644
--- a/nx-X11/programs/Xserver/dix/dispatch.c
+++ b/nx-X11/programs/Xserver/dix/dispatch.c
@@ -2188,7 +2188,7 @@ DoGetImage(register ClientPtr client, int format, Drawable drawable,
xgi.length = length;
if (im_return) {
- pBuf = (char *)xcalloc(1, sz_xGetImageReply + length);
+ pBuf = (char *)calloc(1, sz_xGetImageReply + length);
if (!pBuf)
return (BadAlloc);
if (widthBytesLine == 0)
diff --git a/nx-X11/programs/Xserver/dix/main.c b/nx-X11/programs/Xserver/dix/main.c
index a95b8b4a9..de53a6593 100644
--- a/nx-X11/programs/Xserver/dix/main.c
+++ b/nx-X11/programs/Xserver/dix/main.c
@@ -689,11 +689,11 @@ AddScreen(
if (i == MAXSCREENS)
return -1;
- pScreen = (ScreenPtr) xcalloc(1, sizeof(ScreenRec));
+ pScreen = (ScreenPtr) calloc(1, sizeof(ScreenRec));
if (!pScreen)
return -1;
- pScreen->devPrivates = (DevUnion *)xcalloc(sizeof(DevUnion),
+ pScreen->devPrivates = (DevUnion *)calloc(sizeof(DevUnion),
screenPrivateCount);
if (!pScreen->devPrivates && screenPrivateCount)
{
diff --git a/nx-X11/programs/Xserver/fb/fbpseudocolor.c b/nx-X11/programs/Xserver/fb/fbpseudocolor.c
index 71f39b52f..c22309a93 100644
--- a/nx-X11/programs/Xserver/fb/fbpseudocolor.c
+++ b/nx-X11/programs/Xserver/fb/fbpseudocolor.c
@@ -1150,7 +1150,7 @@ xxSetup(ScreenPtr pScreen, int myDepth, int baseDepth, char* addr, xxSyncFunc sy
pScrPriv->sync = sync;
pScreen->maxInstalledCmaps += MAX_NUM_XX_INSTALLED_CMAPS;
- pScrPriv->InstalledCmaps = xcalloc(MAX_NUM_XX_INSTALLED_CMAPS,
+ pScrPriv->InstalledCmaps = calloc(MAX_NUM_XX_INSTALLED_CMAPS,
sizeof(ColormapPtr));
if (!pScrPriv->InstalledCmaps)
return FALSE;
diff --git a/nx-X11/programs/Xserver/mi/mibank.c b/nx-X11/programs/Xserver/mi/mibank.c
index 754b0916f..a651c021e 100644
--- a/nx-X11/programs/Xserver/mi/mibank.c
+++ b/nx-X11/programs/Xserver/mi/mibank.c
@@ -2243,11 +2243,11 @@ miInitializeBanking(
(sizeof(miBankGCRec) - sizeof(RegionPtr))))
return FALSE;
- if (!(pScreenPriv = (miBankScreenPtr)Xcalloc(sizeof(miBankScreenRec))))
+ if (!(pScreenPriv = (miBankScreenPtr)calloc(1, sizeof(miBankScreenRec))))
return FALSE;
if (!(pScreenPriv->pBanks = /* Allocate and clear */
- (RegionPtr *)Xcalloc(nBanks * sizeof(RegionPtr))))
+ (RegionPtr *)calloc(1, nBanks * sizeof(RegionPtr))))
{
free(pScreenPriv);
return FALSE;
diff --git a/nx-X11/programs/Xserver/mi/mioverlay.c b/nx-X11/programs/Xserver/mi/mioverlay.c
index cff29ee2a..3a85863ed 100644
--- a/nx-X11/programs/Xserver/mi/mioverlay.c
+++ b/nx-X11/programs/Xserver/mi/mioverlay.c
@@ -196,7 +196,7 @@ miOverlayCreateWindow(WindowPtr pWin)
pWinPriv->tree = NULL;
if(!pWin->parent || !((*pScreenPriv->InOverlay)(pWin))) {
- if(!(pTree = (miOverlayTreePtr)xcalloc(1, sizeof(miOverlayTreeRec))))
+ if(!(pTree = (miOverlayTreePtr)calloc(1, sizeof(miOverlayTreeRec))))
return FALSE;
}
diff --git a/nx-X11/programs/Xserver/randr/randr.c b/nx-X11/programs/Xserver/randr/randr.c
index afce35d7d..8ff3f9c75 100644
--- a/nx-X11/programs/Xserver/randr/randr.c
+++ b/nx-X11/programs/Xserver/randr/randr.c
@@ -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;
diff --git a/nx-X11/programs/Xserver/randr/rrcrtc.c b/nx-X11/programs/Xserver/randr/rrcrtc.c
index 95f02b8cd..4c9b805c2 100644
--- a/nx-X11/programs/Xserver/randr/rrcrtc.c
+++ b/nx-X11/programs/Xserver/randr/rrcrtc.c
@@ -95,7 +95,7 @@ RRCrtcCreate(ScreenPtr pScreen, void *devPrivate)
return FALSE;
pScrPriv->crtcs = crtcs;
- crtc = xcalloc(1, sizeof(RRCrtcRec));
+ crtc = calloc(1, sizeof(RRCrtcRec));
if (!crtc)
return NULL;
crtc->id = FakeClientID(0);
@@ -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;
@@ -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;
diff --git a/nx-X11/programs/Xserver/randr/rrmonitor.c b/nx-X11/programs/Xserver/randr/rrmonitor.c
index 651dd47f8..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;
@@ -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;
@@ -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;
diff --git a/nx-X11/programs/Xserver/randr/rrprovider.c b/nx-X11/programs/Xserver/randr/rrprovider.c
index 1c292b05e..7d3096482 100644
--- a/nx-X11/programs/Xserver/randr/rrprovider.c
+++ b/nx-X11/programs/Xserver/randr/rrprovider.c
@@ -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;
diff --git a/nx-X11/programs/Xserver/record/set.c b/nx-X11/programs/Xserver/record/set.c
index b8e4cc44c..b7360a565 100644
--- a/nx-X11/programs/Xserver/record/set.c
+++ b/nx-X11/programs/Xserver/record/set.c
@@ -75,14 +75,6 @@ typedef unsigned short CARD16;
#define ALLOCATE_LOCAL malloc
#define DEALLOCATE_LOCAL free
-void *Xcalloc(size)
- int size;
-{
- void *p = malloc(size);
- if (p) memset(p, 0, size);
- return p;
-}
-
#ifndef max
#define max(_a, _b) ( ((_a) > (_b)) ? (_a) : (_b) )
#endif
@@ -258,7 +250,7 @@ BitVectorCreateSet(pIntervals, nIntervals, pMem, memsize)
}
else
{
- pbvs = (BitVectorSetPtr)Xcalloc(memsize);
+ pbvs = (BitVectorSetPtr)calloc(1, memsize);
if (!pbvs) return NULL;
pbvs->baseSet.ops = &BitVectorSetOperations;
}