aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/dix
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2016-07-02 14:11:38 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2016-07-02 14:11:38 +0200
commit1dbd3c888a3eee51db5303bd93e95b84999f5d31 (patch)
tree84db92271726b42b8c0864c8b7c77b2330566fc1 /nx-X11/programs/Xserver/dix
parent279d37127db241a9ee685f6b671f51aa21a972ea (diff)
parente85808245810d0cc6918104deef25213d5f9e06c (diff)
downloadnx-libs-1dbd3c888a3eee51db5303bd93e95b84999f5d31.tar.gz
nx-libs-1dbd3c888a3eee51db5303bd93e95b84999f5d31.tar.bz2
nx-libs-1dbd3c888a3eee51db5303bd93e95b84999f5d31.zip
Merge branch 'sunweaver-pr/backport-Xorg-memory-handling' into 3.6.x
Attributes GH PR #159: https://github.com/ArcticaProject/nx-libs/pull/159 Reviewed by: Vadim Troshchinskiy <vadim@qindel.com> -- Fri, 01 Jul 2016 12:47:46 -0700
Diffstat (limited to 'nx-X11/programs/Xserver/dix')
-rw-r--r--nx-X11/programs/Xserver/dix/atom.c20
-rw-r--r--nx-X11/programs/Xserver/dix/colormap.c92
-rw-r--r--nx-X11/programs/Xserver/dix/cursor.c42
-rw-r--r--nx-X11/programs/Xserver/dix/devices.c92
-rw-r--r--nx-X11/programs/Xserver/dix/dispatch.c26
-rw-r--r--nx-X11/programs/Xserver/dix/dixfonts.c136
-rw-r--r--nx-X11/programs/Xserver/dix/dixutils.c36
-rw-r--r--nx-X11/programs/Xserver/dix/events.c22
-rw-r--r--nx-X11/programs/Xserver/dix/extension.c36
-rw-r--r--nx-X11/programs/Xserver/dix/gc.c26
-rw-r--r--nx-X11/programs/Xserver/dix/glyphcurs.c4
-rw-r--r--nx-X11/programs/Xserver/dix/grabs.c14
-rw-r--r--nx-X11/programs/Xserver/dix/main.c30
-rw-r--r--nx-X11/programs/Xserver/dix/pixmap.c4
-rw-r--r--nx-X11/programs/Xserver/dix/privates.c16
-rw-r--r--nx-X11/programs/Xserver/dix/property.c26
-rw-r--r--nx-X11/programs/Xserver/dix/region.c32
-rw-r--r--nx-X11/programs/Xserver/dix/resource.c30
-rw-r--r--nx-X11/programs/Xserver/dix/window.c28
19 files changed, 356 insertions, 356 deletions
diff --git a/nx-X11/programs/Xserver/dix/atom.c b/nx-X11/programs/Xserver/dix/atom.c
index 29e60be03..6a1f17854 100644
--- a/nx-X11/programs/Xserver/dix/atom.c
+++ b/nx-X11/programs/Xserver/dix/atom.c
@@ -109,7 +109,7 @@ MakeAtom(const char *string, unsigned len, Bool makeit)
{
register NodePtr nd;
- nd = (NodePtr) xalloc(sizeof(NodeRec));
+ nd = (NodePtr) malloc(sizeof(NodeRec));
if (!nd)
return BAD_RESOURCE;
if (lastAtom < XA_LAST_PREDEFINED)
@@ -118,9 +118,9 @@ MakeAtom(const char *string, unsigned len, Bool makeit)
}
else
{
- nd->string = (char *) xalloc(len + 1);
+ nd->string = (char *) malloc(len + 1);
if (!nd->string) {
- xfree(nd);
+ free(nd);
return BAD_RESOURCE;
}
strncpy(nd->string, string, (int)len);
@@ -129,12 +129,12 @@ MakeAtom(const char *string, unsigned len, Bool makeit)
if ((lastAtom + 1) >= tableLength) {
NodePtr *table;
- table = (NodePtr *) xrealloc(nodeTable,
+ table = (NodePtr *) realloc(nodeTable,
tableLength * (2 * sizeof(NodePtr)));
if (!table) {
if (nd->string != string)
- xfree(nd->string);
- xfree(nd);
+ free(nd->string);
+ free(nd);
return BAD_RESOURCE;
}
tableLength <<= 1;
@@ -180,8 +180,8 @@ FreeAtom(NodePtr patom)
if(patom->right)
FreeAtom(patom->right);
if (patom->a > XA_LAST_PREDEFINED)
- xfree(patom->string);
- xfree(patom);
+ free(patom->string);
+ free(patom);
}
void
@@ -191,7 +191,7 @@ FreeAllAtoms()
return;
FreeAtom(atomRoot);
atomRoot = (NodePtr)NULL;
- xfree(nodeTable);
+ free(nodeTable);
nodeTable = (NodePtr *)NULL;
lastAtom = None;
}
@@ -201,7 +201,7 @@ InitAtoms()
{
FreeAllAtoms();
tableLength = InitialTableSize;
- nodeTable = (NodePtr *)xalloc(InitialTableSize*sizeof(NodePtr));
+ nodeTable = (NodePtr *)malloc(InitialTableSize*sizeof(NodePtr));
if (!nodeTable)
AtomError();
nodeTable[None] = (NodePtr)NULL;
diff --git a/nx-X11/programs/Xserver/dix/colormap.c b/nx-X11/programs/Xserver/dix/colormap.c
index 4acfdc1bb..44095b729 100644
--- a/nx-X11/programs/Xserver/dix/colormap.c
+++ b/nx-X11/programs/Xserver/dix/colormap.c
@@ -274,7 +274,7 @@ CreateColormap (Colormap mid, ScreenPtr pScreen, VisualPtr pVisual,
if ((class | DynamicClass) == DirectColor)
sizebytes *= 3;
sizebytes += sizeof(ColormapRec);
- pmap = (ColormapPtr) xalloc(sizebytes);
+ pmap = (ColormapPtr) malloc(sizebytes);
if (!pmap)
return (BadAlloc);
pmap->red = (EntryPtr)((char *)pmap + sizeof(ColormapRec));
@@ -303,10 +303,10 @@ CreateColormap (Colormap mid, ScreenPtr pScreen, VisualPtr pVisual,
for (pent = &pmap->red[size - 1]; pent >= pmap->red; pent--)
pent->refcnt = AllocPrivate;
pmap->freeRed = 0;
- ppix = (Pixel *)xalloc(size * sizeof(Pixel));
+ ppix = (Pixel *)malloc(size * sizeof(Pixel));
if (!ppix)
{
- xfree(pmap);
+ free(pmap);
return (BadAlloc);
}
pmap->clientPixelsRed[client] = ppix;
@@ -349,11 +349,11 @@ CreateColormap (Colormap mid, ScreenPtr pScreen, VisualPtr pVisual,
for(pent = &pmap->green[size-1]; pent >= pmap->green; pent--)
pent->refcnt = AllocPrivate;
pmap->freeGreen = 0;
- ppix = (Pixel *) xalloc(size * sizeof(Pixel));
+ ppix = (Pixel *) malloc(size * sizeof(Pixel));
if (!ppix)
{
- xfree(pmap->clientPixelsRed[client]);
- xfree(pmap);
+ free(pmap->clientPixelsRed[client]);
+ free(pmap);
return(BadAlloc);
}
pmap->clientPixelsGreen[client] = ppix;
@@ -365,12 +365,12 @@ CreateColormap (Colormap mid, ScreenPtr pScreen, VisualPtr pVisual,
for(pent = &pmap->blue[size-1]; pent >= pmap->blue; pent--)
pent->refcnt = AllocPrivate;
pmap->freeBlue = 0;
- ppix = (Pixel *) xalloc(size * sizeof(Pixel));
+ ppix = (Pixel *) malloc(size * sizeof(Pixel));
if (!ppix)
{
- xfree(pmap->clientPixelsGreen[client]);
- xfree(pmap->clientPixelsRed[client]);
- xfree(pmap);
+ free(pmap->clientPixelsGreen[client]);
+ free(pmap->clientPixelsRed[client]);
+ free(pmap);
return(BadAlloc);
}
pmap->clientPixelsBlue[client] = ppix;
@@ -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)
{
@@ -438,7 +438,7 @@ FreeColormap (void * value, XID mid)
if(pmap->clientPixelsRed)
{
for(i = 0; i < MAXCLIENTS; i++)
- xfree(pmap->clientPixelsRed[i]);
+ free(pmap->clientPixelsRed[i]);
}
if ((pmap->class == PseudoColor) || (pmap->class == GrayScale))
@@ -450,11 +450,11 @@ FreeColormap (void * value, XID mid)
if(pent->fShared)
{
if (--pent->co.shco.red->refcnt == 0)
- xfree(pent->co.shco.red);
+ free(pent->co.shco.red);
if (--pent->co.shco.green->refcnt == 0)
- xfree(pent->co.shco.green);
+ free(pent->co.shco.green);
if (--pent->co.shco.blue->refcnt == 0)
- xfree(pent->co.shco.blue);
+ free(pent->co.shco.blue);
}
}
}
@@ -462,15 +462,15 @@ FreeColormap (void * value, XID mid)
{
for(i = 0; i < MAXCLIENTS; i++)
{
- xfree(pmap->clientPixelsGreen[i]);
- xfree(pmap->clientPixelsBlue[i]);
+ free(pmap->clientPixelsGreen[i]);
+ free(pmap->clientPixelsBlue[i]);
}
}
if (pmap->devPrivates)
- xfree(pmap->devPrivates);
+ free(pmap->devPrivates);
- xfree(pmap);
+ free(pmap);
return(Success);
}
@@ -721,11 +721,11 @@ FreeCell (ColormapPtr pmap, Pixel i, int channel)
if (pent->fShared)
{
if(--pent->co.shco.red->refcnt == 0)
- xfree(pent->co.shco.red);
+ free(pent->co.shco.red);
if(--pent->co.shco.green->refcnt == 0)
- xfree(pent->co.shco.green);
+ free(pent->co.shco.green);
if(--pent->co.shco.blue->refcnt == 0)
- xfree(pent->co.shco.blue);
+ free(pent->co.shco.blue);
pent->fShared = FALSE;
}
pent->refcnt = 0;
@@ -841,7 +841,7 @@ AllocColor (ColormapPtr pmap,
*pgreen = pmap->red[pixR].co.local.green;
*pblue = pmap->red[pixR].co.local.blue;
npix = pmap->numPixelsRed[client];
- ppix = (Pixel *) xrealloc(pmap->clientPixelsRed[client],
+ ppix = (Pixel *) realloc(pmap->clientPixelsRed[client],
(npix + 1) * sizeof(Pixel));
if (!ppix)
return (BadAlloc);
@@ -864,21 +864,21 @@ AllocColor (ColormapPtr pmap,
*pgreen = pmap->green[pixG].co.local.green;
*pblue = pmap->blue[pixB].co.local.blue;
npix = pmap->numPixelsRed[client];
- ppix = (Pixel *) xrealloc(pmap->clientPixelsRed[client],
+ ppix = (Pixel *) realloc(pmap->clientPixelsRed[client],
(npix + 1) * sizeof(Pixel));
if (!ppix)
return (BadAlloc);
ppix[npix] = pixR;
pmap->clientPixelsRed[client] = ppix;
npix = pmap->numPixelsGreen[client];
- ppix = (Pixel *) xrealloc(pmap->clientPixelsGreen[client],
+ ppix = (Pixel *) realloc(pmap->clientPixelsGreen[client],
(npix + 1) * sizeof(Pixel));
if (!ppix)
return (BadAlloc);
ppix[npix] = pixG;
pmap->clientPixelsGreen[client] = ppix;
npix = pmap->numPixelsBlue[client];
- ppix = (Pixel *) xrealloc(pmap->clientPixelsBlue[client],
+ ppix = (Pixel *) realloc(pmap->clientPixelsBlue[client],
(npix + 1) * sizeof(Pixel));
if (!ppix)
return (BadAlloc);
@@ -963,7 +963,7 @@ AllocColor (ColormapPtr pmap,
{
colorResource *pcr;
- pcr = (colorResource *) xalloc(sizeof(colorResource));
+ pcr = (colorResource *) malloc(sizeof(colorResource));
if (!pcr)
{
(void)FreeColors(pmap, client, 1, pPix, (Pixel)0);
@@ -1348,7 +1348,7 @@ gotit:
break;
}
npix = nump[client];
- ppix = (Pixel *) xrealloc (pixp[client], (npix + 1) * sizeof(Pixel));
+ ppix = (Pixel *) realloc (pixp[client], (npix + 1) * sizeof(Pixel));
if (!ppix)
{
pent->refcnt--;
@@ -1518,7 +1518,7 @@ FreePixels(register ColormapPtr pmap, register int client)
}
}
- xfree(ppixStart);
+ free(ppixStart);
pmap->clientPixelsRed[client] = (Pixel *) NULL;
pmap->numPixelsRed[client] = 0;
if ((class | DynamicClass) == DirectColor)
@@ -1527,7 +1527,7 @@ FreePixels(register ColormapPtr pmap, register int client)
if (class & DynamicClass)
for (ppix = ppixStart, n = pmap->numPixelsGreen[client]; --n >= 0;)
FreeCell(pmap, *ppix++, GREENMAP);
- xfree(ppixStart);
+ free(ppixStart);
pmap->clientPixelsGreen[client] = (Pixel *) NULL;
pmap->numPixelsGreen[client] = 0;
@@ -1535,7 +1535,7 @@ FreePixels(register ColormapPtr pmap, register int client)
if (class & DynamicClass)
for (ppix = ppixStart, n = pmap->numPixelsBlue[client]; --n >= 0; )
FreeCell(pmap, *ppix++, BLUEMAP);
- xfree(ppixStart);
+ free(ppixStart);
pmap->clientPixelsBlue[client] = (Pixel *) NULL;
pmap->numPixelsBlue[client] = 0;
}
@@ -1556,7 +1556,7 @@ FreeClientPixels (void * value, XID fakeid)
pmap = (ColormapPtr) LookupIDByType(pcr->mid, RT_COLORMAP);
if (pmap)
FreePixels(pmap, pcr->client);
- xfree(pcr);
+ free(pcr);
return Success;
}
@@ -1578,7 +1578,7 @@ AllocColorCells (int client, ColormapPtr pmap, int colors, int planes,
oldcount += pmap->numPixelsGreen[client] + pmap->numPixelsBlue[client];
if (!oldcount && (CLIENT_ID(pmap->mid) != client))
{
- pcr = (colorResource *) xalloc(sizeof(colorResource));
+ pcr = (colorResource *) malloc(sizeof(colorResource));
if (!pcr)
return (BadAlloc);
}
@@ -1626,7 +1626,7 @@ AllocColorCells (int client, ColormapPtr pmap, int colors, int planes,
if (!AddResource(FakeClientID(client), RT_CMAPENTRY, (void *)pcr))
ok = BadAlloc;
} else if (pcr)
- xfree(pcr);
+ free(pcr);
return (ok);
}
@@ -1653,7 +1653,7 @@ AllocColorPlanes (int client, ColormapPtr pmap, int colors,
oldcount += pmap->numPixelsGreen[client] + pmap->numPixelsBlue[client];
if (!oldcount && (CLIENT_ID(pmap->mid) != client))
{
- pcr = (colorResource *) xalloc(sizeof(colorResource));
+ pcr = (colorResource *) malloc(sizeof(colorResource));
if (!pcr)
return (BadAlloc);
}
@@ -1717,7 +1717,7 @@ AllocColorPlanes (int client, ColormapPtr pmap, int colors,
if (!AddResource(FakeClientID(client), RT_CMAPENTRY, (void *)pcr))
ok = BadAlloc;
} else if (pcr)
- xfree(pcr);
+ free(pcr);
return (ok);
}
@@ -1762,17 +1762,17 @@ AllocDirect (int client, ColormapPtr pmap, int c, int r, int g, int b, Bool cont
if (okR && okG && okB)
{
- rpix = (Pixel *) xrealloc(pmap->clientPixelsRed[client],
+ rpix = (Pixel *) realloc(pmap->clientPixelsRed[client],
(pmap->numPixelsRed[client] + (c << r)) *
sizeof(Pixel));
if (rpix)
pmap->clientPixelsRed[client] = rpix;
- gpix = (Pixel *) xrealloc(pmap->clientPixelsGreen[client],
+ gpix = (Pixel *) realloc(pmap->clientPixelsGreen[client],
(pmap->numPixelsGreen[client] + (c << g)) *
sizeof(Pixel));
if (gpix)
pmap->clientPixelsGreen[client] = gpix;
- bpix = (Pixel *) xrealloc(pmap->clientPixelsBlue[client],
+ bpix = (Pixel *) realloc(pmap->clientPixelsBlue[client],
(pmap->numPixelsBlue[client] + (c << b)) *
sizeof(Pixel));
if (bpix)
@@ -1861,7 +1861,7 @@ AllocPseudo (int client, ColormapPtr pmap, int c, int r, Bool contig,
/* all the allocated pixels are added to the client pixel list,
* but only the unique ones are returned to the client */
- ppix = (Pixel *)xrealloc(pmap->clientPixelsRed[client],
+ ppix = (Pixel *)realloc(pmap->clientPixelsRed[client],
(pmap->numPixelsRed[client] + npix) * sizeof(Pixel));
if (!ppix)
{
@@ -2089,10 +2089,10 @@ AllocShared (ColormapPtr pmap, Pixel *ppix, int c, int r, int g, int b,
ppshared = psharedList;
for (z = npixShared; --z >= 0; )
{
- if (!(ppshared[z] = (SHAREDCOLOR *)xalloc(sizeof(SHAREDCOLOR))))
+ if (!(ppshared[z] = (SHAREDCOLOR *)malloc(sizeof(SHAREDCOLOR))))
{
for (z++ ; z < npixShared; z++)
- xfree(ppshared[z]);
+ free(ppshared[z]);
return FALSE;
}
}
@@ -2364,7 +2364,7 @@ FreeCo (ColormapPtr pmap, int client, int color, int npixIn, Pixel *ppixIn, Pixe
npix++;
}
}
- pptr = (Pixel *)xrealloc(ppixClient, npixNew * sizeof(Pixel));
+ pptr = (Pixel *)realloc(ppixClient, npixNew * sizeof(Pixel));
if (pptr)
ppixClient = pptr;
npixClient = npixNew;
@@ -2372,7 +2372,7 @@ FreeCo (ColormapPtr pmap, int client, int color, int npixIn, Pixel *ppixIn, Pixe
else
{
npixClient = 0;
- xfree(ppixClient);
+ free(ppixClient);
ppixClient = (Pixel *)NULL;
}
switch(color)
@@ -2729,7 +2729,7 @@ ResizeVisualArray(ScreenPtr pScreen, int new_visual_count, DepthPtr depth)
vids = reallocarray(depth->vids, depth->numVids + new_visual_count,
sizeof(XID));
#else
- vids = xrealloc(depth->vids, sizeof(XID) *
+ vids = realloc(depth->vids, sizeof(XID) *
(depth->numVids + new_visual_count));
#endif
if (!vids)
@@ -2742,7 +2742,7 @@ ResizeVisualArray(ScreenPtr pScreen, int new_visual_count, DepthPtr depth)
#if 0 /* !defined(NXAGENT_SERVER) */
visuals = reallocarray(pScreen->visuals, numVisuals, sizeof(VisualRec));
#else
- visuals = xrealloc(pScreen->visuals, sizeof(VisualRec) * numVisuals);
+ visuals = realloc(pScreen->visuals, sizeof(VisualRec) * numVisuals);
#endif
if (!visuals) {
return FALSE;
diff --git a/nx-X11/programs/Xserver/dix/cursor.c b/nx-X11/programs/Xserver/dix/cursor.c
index 1e1dba36b..875e19480 100644
--- a/nx-X11/programs/Xserver/dix/cursor.c
+++ b/nx-X11/programs/Xserver/dix/cursor.c
@@ -81,10 +81,10 @@ FreeCursorBits(CursorBitsPtr bits)
{
if (--bits->refcnt > 0)
return;
- xfree(bits->source);
- xfree(bits->mask);
+ free(bits->source);
+ free(bits->mask);
#ifdef ARGB_CURSOR
- xfree(bits->argb);
+ free(bits->argb);
#endif
if (bits->refcnt == 0)
{
@@ -98,9 +98,9 @@ FreeCursorBits(CursorBitsPtr bits)
{
*prev = this->next;
CloseFont(this->font, (Font)0);
- xfree(this);
+ free(this);
}
- xfree(bits);
+ free(bits);
}
}
@@ -126,7 +126,7 @@ FreeCursor(void * value, XID cid)
(void)( *pscr->UnrealizeCursor)( pscr, pCurs);
}
FreeCursorBits(pCurs->bits);
- xfree( pCurs);
+ free( pCurs);
return(Success);
}
@@ -174,11 +174,11 @@ AllocCursorARGB(unsigned char *psrcbits, unsigned char *pmaskbits, CARD32 *argb,
int nscr;
ScreenPtr pscr;
- pCurs = (CursorPtr)xalloc(sizeof(CursorRec) + sizeof(CursorBits));
+ pCurs = (CursorPtr)malloc(sizeof(CursorRec) + sizeof(CursorBits));
if (!pCurs)
{
- xfree(psrcbits);
- xfree(pmaskbits);
+ free(psrcbits);
+ free(pmaskbits);
return (CursorPtr)NULL;
}
bits = (CursorBitsPtr)((char *)pCurs + sizeof(CursorRec));
@@ -223,7 +223,7 @@ AllocCursorARGB(unsigned char *psrcbits, unsigned char *pmaskbits, CARD32 *argb,
( *pscr->UnrealizeCursor)( pscr, pCurs);
}
FreeCursorBits(bits);
- xfree(pCurs);
+ free(pCurs);
return (CursorPtr)NULL;
}
}
@@ -292,7 +292,7 @@ AllocGlyphCursor(Font source, unsigned sourceChar, Font mask, unsigned maskChar,
}
if (pShare)
{
- pCurs = (CursorPtr)xalloc(sizeof(CursorRec));
+ pCurs = (CursorPtr)malloc(sizeof(CursorRec));
if (!pCurs)
return BadAlloc;
bits = pShare->bits;
@@ -311,7 +311,7 @@ AllocGlyphCursor(Font source, unsigned sourceChar, Font mask, unsigned maskChar,
register unsigned char *mskptr;
n = BitmapBytePad(cm.width)*(long)cm.height;
- mskptr = mskbits = (unsigned char *)xalloc(n);
+ mskptr = mskbits = (unsigned char *)malloc(n);
if (!mskptr)
return BadAlloc;
while (--n >= 0)
@@ -329,12 +329,12 @@ AllocGlyphCursor(Font source, unsigned sourceChar, Font mask, unsigned maskChar,
}
if ((res = ServerBitsFromGlyph(sourcefont, sourceChar, &cm, &srcbits)) != 0)
{
- xfree(mskbits);
+ free(mskbits);
return res;
}
if (sourcefont != maskfont)
{
- pCurs = (CursorPtr)xalloc(sizeof(CursorRec) + sizeof(CursorBits));
+ pCurs = (CursorPtr)malloc(sizeof(CursorRec) + sizeof(CursorBits));
if (pCurs)
bits = (CursorBitsPtr)((char *)pCurs + sizeof(CursorRec));
else
@@ -342,17 +342,17 @@ AllocGlyphCursor(Font source, unsigned sourceChar, Font mask, unsigned maskChar,
}
else
{
- pCurs = (CursorPtr)xalloc(sizeof(CursorRec));
+ pCurs = (CursorPtr)malloc(sizeof(CursorRec));
if (pCurs)
- bits = (CursorBitsPtr)xalloc(sizeof(CursorBits));
+ bits = (CursorBitsPtr)malloc(sizeof(CursorBits));
else
bits = (CursorBitsPtr)NULL;
}
if (!bits)
{
- xfree(pCurs);
- xfree(mskbits);
- xfree(srcbits);
+ free(pCurs);
+ free(mskbits);
+ free(srcbits);
return BadAlloc;
}
bits->source = srcbits;
@@ -369,7 +369,7 @@ AllocGlyphCursor(Font source, unsigned sourceChar, Font mask, unsigned maskChar,
else
{
bits->refcnt = 1;
- pShare = (GlyphSharePtr)xalloc(sizeof(GlyphShare));
+ pShare = (GlyphSharePtr)malloc(sizeof(GlyphShare));
if (!pShare)
{
FreeCursorBits(bits);
@@ -414,7 +414,7 @@ AllocGlyphCursor(Font source, unsigned sourceChar, Font mask, unsigned maskChar,
( *pscr->UnrealizeCursor)( pscr, pCurs);
}
FreeCursorBits(pCurs->bits);
- xfree(pCurs);
+ free(pCurs);
return BadAlloc;
}
}
diff --git a/nx-X11/programs/Xserver/dix/devices.c b/nx-X11/programs/Xserver/dix/devices.c
index 49ab80529..69a72fbad 100644
--- a/nx-X11/programs/Xserver/dix/devices.c
+++ b/nx-X11/programs/Xserver/dix/devices.c
@@ -86,7 +86,7 @@ _AddInputDevice(DeviceProc deviceProc, Bool autoStart)
if (inputInfo.numDevices >= MAX_DEVICES)
return (DeviceIntPtr)NULL;
- dev = (DeviceIntPtr) xalloc(sizeof(DeviceIntRec));
+ dev = (DeviceIntPtr) malloc(sizeof(DeviceIntRec));
if (!dev)
return (DeviceIntPtr)NULL;
dev->name = (char *)NULL;
@@ -208,29 +208,29 @@ CloseDevice(register DeviceIntPtr dev)
if (dev->inited)
(void)(*dev->deviceProc)(dev, DEVICE_CLOSE);
- xfree(dev->name);
+ free(dev->name);
if (dev->key)
{
#ifdef XKB
if (dev->key->xkbInfo)
XkbFreeInfo(dev->key->xkbInfo);
#endif
- xfree(dev->key->curKeySyms.map);
- xfree(dev->key->modifierKeyMap);
- xfree(dev->key);
+ free(dev->key->curKeySyms.map);
+ free(dev->key->modifierKeyMap);
+ free(dev->key);
}
- xfree(dev->valuator);
+ free(dev->valuator);
#ifdef XKB
if ((dev->button)&&(dev->button->xkb_acts))
- xfree(dev->button->xkb_acts);
+ free(dev->button->xkb_acts);
#endif
- xfree(dev->button);
+ free(dev->button);
if (dev->focus)
{
- xfree(dev->focus->trace);
- xfree(dev->focus);
+ free(dev->focus->trace);
+ free(dev->focus);
}
- xfree(dev->proximity);
+ free(dev->proximity);
for (k=dev->kbdfeed; k; k=knext)
{
knext = k->next;
@@ -238,29 +238,29 @@ CloseDevice(register DeviceIntPtr dev)
if (k->xkb_sli)
XkbFreeSrvLedInfo(k->xkb_sli);
#endif
- xfree(k);
+ free(k);
}
for (p=dev->ptrfeed; p; p=pnext)
{
pnext = p->next;
- xfree(p);
+ free(p);
}
for (i=dev->intfeed; i; i=inext)
{
inext = i->next;
- xfree(i);
+ free(i);
}
for (s=dev->stringfeed; s; s=snext)
{
snext = s->next;
- xfree(s->ctrl.symbols_supported);
- xfree(s->ctrl.symbols_displayed);
- xfree(s);
+ free(s->ctrl.symbols_supported);
+ free(s->ctrl.symbols_displayed);
+ free(s);
}
for (b=dev->bell; b; b=bnext)
{
bnext = b->next;
- xfree(b);
+ free(b);
}
for (l=dev->leds; l; l=lnext)
{
@@ -269,15 +269,15 @@ CloseDevice(register DeviceIntPtr dev)
if (l->xkb_sli)
XkbFreeSrvLedInfo(l->xkb_sli);
#endif
- xfree(l);
+ free(l);
}
#ifdef XKB
while (dev->xkb_interest) {
XkbRemoveResourceClient((DevicePtr)dev,dev->xkb_interest->resource);
}
#endif
- xfree(dev->sync.event);
- xfree(dev);
+ free(dev->sync.event);
+ free(dev);
}
void
@@ -369,7 +369,7 @@ _RegisterPointerDevice(DeviceIntPtr device)
if (!device->name)
{
char *p = "pointer";
- device->name = (char *)xalloc(strlen(p) + 1);
+ device->name = (char *)malloc(strlen(p) + 1);
strcpy(device->name, p);
}
}
@@ -392,7 +392,7 @@ _RegisterKeyboardDevice(DeviceIntPtr device)
if (!device->name)
{
char *k = "keyboard";
- device->name = (char *)xalloc(strlen(k) + 1);
+ device->name = (char *)malloc(strlen(k) + 1);
strcpy(device->name, k);
}
}
@@ -461,7 +461,7 @@ SetKeySymsMap(register KeySymsPtr dst, register KeySymsPtr src)
KeySym *map;
int bytes = sizeof(KeySym) * src->mapWidth *
(dst->maxKeyCode - dst->minKeyCode + 1);
- map = (KeySym *)xalloc(bytes);
+ map = (KeySym *)malloc(bytes);
if (!map)
return FALSE;
bzero((char *)map, bytes);
@@ -471,7 +471,7 @@ SetKeySymsMap(register KeySymsPtr dst, register KeySymsPtr src)
memmove((char *)&map[i*src->mapWidth],
(char *)&dst->map[i*dst->mapWidth],
dst->mapWidth * sizeof(KeySym));
- xfree(dst->map);
+ free(dst->map);
}
dst->mapWidth = src->mapWidth;
dst->map = map;
@@ -504,7 +504,7 @@ InitModMap(register KeyClassPtr keyc)
}
}
}
- keyc->modifierKeyMap = (KeyCode *)xalloc(8*keyc->maxKeysPerModifier);
+ keyc->modifierKeyMap = (KeyCode *)malloc(8*keyc->maxKeysPerModifier);
if (!keyc->modifierKeyMap && keyc->maxKeysPerModifier)
return (FALSE);
bzero((char *)keyc->modifierKeyMap, 8*(int)keyc->maxKeysPerModifier);
@@ -531,7 +531,7 @@ InitKeyClassDeviceStruct(DeviceIntPtr dev, KeySymsPtr pKeySyms, CARD8 pModifiers
int i;
register KeyClassPtr keyc;
- keyc = (KeyClassPtr)xalloc(sizeof(KeyClassRec));
+ keyc = (KeyClassPtr)malloc(sizeof(KeyClassRec));
if (!keyc)
return FALSE;
keyc->curKeySyms.map = (KeySym *)NULL;
@@ -550,9 +550,9 @@ InitKeyClassDeviceStruct(DeviceIntPtr dev, KeySymsPtr pKeySyms, CARD8 pModifiers
keyc->modifierKeyCount[i] = 0;
if (!SetKeySymsMap(&keyc->curKeySyms, pKeySyms) || !InitModMap(keyc))
{
- xfree(keyc->curKeySyms.map);
- xfree(keyc->modifierKeyMap);
- xfree(keyc);
+ free(keyc->curKeySyms.map);
+ free(keyc->modifierKeyMap);
+ free(keyc);
return FALSE;
}
dev->key = keyc;
@@ -570,7 +570,7 @@ InitButtonClassDeviceStruct(register DeviceIntPtr dev, int numButtons,
register ButtonClassPtr butc;
int i;
- butc = (ButtonClassPtr)xalloc(sizeof(ButtonClassRec));
+ butc = (ButtonClassPtr)malloc(sizeof(ButtonClassRec));
if (!butc)
return FALSE;
butc->numButtons = numButtons;
@@ -595,7 +595,7 @@ InitValuatorClassDeviceStruct(DeviceIntPtr dev, int numAxes,
int i;
register ValuatorClassPtr valc;
- valc = (ValuatorClassPtr)xalloc(sizeof(ValuatorClassRec) +
+ valc = (ValuatorClassPtr)malloc(sizeof(ValuatorClassRec) +
numAxes * sizeof(AxisInfo) +
numAxes * sizeof(unsigned int));
if (!valc)
@@ -618,7 +618,7 @@ InitFocusClassDeviceStruct(DeviceIntPtr dev)
{
register FocusClassPtr focc;
- focc = (FocusClassPtr)xalloc(sizeof(FocusClassRec));
+ focc = (FocusClassPtr)malloc(sizeof(FocusClassRec));
if (!focc)
return FALSE;
focc->win = PointerRootWin;
@@ -637,7 +637,7 @@ InitKbdFeedbackClassDeviceStruct(DeviceIntPtr dev, BellProcPtr bellProc,
{
register KbdFeedbackPtr feedc;
- feedc = (KbdFeedbackPtr)xalloc(sizeof(KbdFeedbackClassRec));
+ feedc = (KbdFeedbackPtr)malloc(sizeof(KbdFeedbackClassRec));
if (!feedc)
return FALSE;
feedc->BellProc = bellProc;
@@ -664,7 +664,7 @@ InitPtrFeedbackClassDeviceStruct(DeviceIntPtr dev, PtrCtrlProcPtr controlProc)
{
register PtrFeedbackPtr feedc;
- feedc = (PtrFeedbackPtr)xalloc(sizeof(PtrFeedbackClassRec));
+ feedc = (PtrFeedbackPtr)malloc(sizeof(PtrFeedbackClassRec));
if (!feedc)
return FALSE;
feedc->CtrlProc = controlProc;
@@ -708,7 +708,7 @@ InitStringFeedbackClassDeviceStruct (
int i;
register StringFeedbackPtr feedc;
- feedc = (StringFeedbackPtr)xalloc(sizeof(StringFeedbackClassRec));
+ feedc = (StringFeedbackPtr)malloc(sizeof(StringFeedbackClassRec));
if (!feedc)
return FALSE;
feedc->CtrlProc = controlProc;
@@ -716,16 +716,16 @@ InitStringFeedbackClassDeviceStruct (
feedc->ctrl.num_symbols_displayed = 0;
feedc->ctrl.max_symbols = max_symbols;
feedc->ctrl.symbols_supported = (KeySym *)
- xalloc (sizeof (KeySym) * num_symbols_supported);
+ malloc (sizeof (KeySym) * num_symbols_supported);
feedc->ctrl.symbols_displayed = (KeySym *)
- xalloc (sizeof (KeySym) * max_symbols);
+ malloc (sizeof (KeySym) * max_symbols);
if (!feedc->ctrl.symbols_supported || !feedc->ctrl.symbols_displayed)
{
if (feedc->ctrl.symbols_supported)
- xfree(feedc->ctrl.symbols_supported);
+ free(feedc->ctrl.symbols_supported);
if (feedc->ctrl.symbols_displayed)
- xfree(feedc->ctrl.symbols_displayed);
- xfree(feedc);
+ free(feedc->ctrl.symbols_displayed);
+ free(feedc);
return FALSE;
}
for (i=0; i<num_symbols_supported; i++)
@@ -746,7 +746,7 @@ InitBellFeedbackClassDeviceStruct (DeviceIntPtr dev, BellProcPtr bellProc,
{
register BellFeedbackPtr feedc;
- feedc = (BellFeedbackPtr)xalloc(sizeof(BellFeedbackClassRec));
+ feedc = (BellFeedbackPtr)malloc(sizeof(BellFeedbackClassRec));
if (!feedc)
return FALSE;
feedc->CtrlProc = controlProc;
@@ -765,7 +765,7 @@ InitLedFeedbackClassDeviceStruct (DeviceIntPtr dev, LedCtrlProcPtr controlProc)
{
register LedFeedbackPtr feedc;
- feedc = (LedFeedbackPtr)xalloc(sizeof(LedFeedbackClassRec));
+ feedc = (LedFeedbackPtr)malloc(sizeof(LedFeedbackClassRec));
if (!feedc)
return FALSE;
feedc->CtrlProc = controlProc;
@@ -786,7 +786,7 @@ InitIntegerFeedbackClassDeviceStruct (DeviceIntPtr dev, IntegerCtrlProcPtr contr
{
register IntegerFeedbackPtr feedc;
- feedc = (IntegerFeedbackPtr)xalloc(sizeof(IntegerFeedbackClassRec));
+ feedc = (IntegerFeedbackPtr)malloc(sizeof(IntegerFeedbackClassRec));
if (!feedc)
return FALSE;
feedc->CtrlProc = controlProc;
@@ -997,11 +997,11 @@ ProcSetModifierMapping(ClientPtr client)
* Now build the keyboard's modifier bitmap from the
* list of keycodes.
*/
- map = (KeyCode *)xalloc(inputMapLen);
+ map = (KeyCode *)malloc(inputMapLen);
if (!map && inputMapLen)
return BadAlloc;
if (keyc->modifierKeyMap)
- xfree(keyc->modifierKeyMap);
+ free(keyc->modifierKeyMap);
keyc->modifierKeyMap = map;
memmove((char *)map, (char *)inputMap, inputMapLen);
diff --git a/nx-X11/programs/Xserver/dix/dispatch.c b/nx-X11/programs/Xserver/dix/dispatch.c
index 803870369..aac3284a7 100644
--- a/nx-X11/programs/Xserver/dix/dispatch.c
+++ b/nx-X11/programs/Xserver/dix/dispatch.c
@@ -214,7 +214,7 @@ void
InitSelections()
{
if (CurrentSelections)
- xfree(CurrentSelections);
+ free(CurrentSelections);
CurrentSelections = (Selection *)NULL;
NumCurrentSelections = 0;
}
@@ -1021,9 +1021,9 @@ ProcSetSelectionOwner(register ClientPtr client)
Selection *newsels;
if (i == 0)
- newsels = (Selection *)xalloc(sizeof(Selection));
+ newsels = (Selection *)malloc(sizeof(Selection));
else
- newsels = (Selection *)xrealloc(CurrentSelections,
+ newsels = (Selection *)realloc(CurrentSelections,
(NumCurrentSelections + 1) * sizeof(Selection));
if (!newsels)
return BadAlloc;
@@ -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)
@@ -3084,13 +3084,13 @@ ProcCreateCursor (register ClientPtr client)
return (BadMatch);
n = BitmapBytePad(width)*height;
- srcbits = (unsigned char *)xalloc(n);
+ srcbits = (unsigned char *)malloc(n);
if (!srcbits)
return (BadAlloc);
- mskbits = (unsigned char *)xalloc(n);
+ mskbits = (unsigned char *)malloc(n);
if (!mskbits)
{
- xfree(srcbits);
+ free(srcbits);
return (BadAlloc);
}
@@ -3332,7 +3332,7 @@ ProcListHosts(register ClientPtr client)
client->pSwapReplyFunc = (ReplySwapPtr) SLHostsExtend;
WriteSwappedDataToClient(client, len, pdata);
}
- xfree(pdata);
+ free(pdata);
return (client->noClientException);
}
@@ -3600,7 +3600,7 @@ CloseDownClient(register ClientPtr client)
#ifdef SMART_SCHEDULE
SmartLastClient = NullClient;
#endif
- xfree(client);
+ free(client);
while (!clients[currentMaxClients-1])
currentMaxClients--;
@@ -3716,7 +3716,7 @@ InitClientPrivates(ClientPtr client)
ppriv = (DevUnion *)(client + 1);
else
{
- ppriv = (DevUnion *)xalloc(totalClientSize - sizeof(ClientRec));
+ ppriv = (DevUnion *)malloc(totalClientSize - sizeof(ClientRec));
if (!ppriv)
return 0;
}
@@ -3753,14 +3753,14 @@ ClientPtr NextAvailableClient(void * ospriv)
i = nextFreeClientID;
if (i == MAXCLIENTS)
return (ClientPtr)NULL;
- clients[i] = client = (ClientPtr)xalloc(totalClientSize);
+ clients[i] = client = (ClientPtr)malloc(totalClientSize);
if (!client)
return (ClientPtr)NULL;
InitClient(client, i, ospriv);
InitClientPrivates(client);
if (!InitClientResources(client))
{
- xfree(client);
+ free(client);
return (ClientPtr)NULL;
}
data.reqType = 1;
@@ -3768,7 +3768,7 @@ ClientPtr NextAvailableClient(void * ospriv)
if (!InsertFakeRequest(client, (char *)&data, sz_xReq))
{
FreeClientResources(client);
- xfree(client);
+ free(client);
return (ClientPtr)NULL;
}
if (i == currentMaxClients)
diff --git a/nx-X11/programs/Xserver/dix/dixfonts.c b/nx-X11/programs/Xserver/dix/dixfonts.c
index 58e562411..0ebb4e68d 100644
--- a/nx-X11/programs/Xserver/dix/dixfonts.c
+++ b/nx-X11/programs/Xserver/dix/dixfonts.c
@@ -170,7 +170,7 @@ QueueFontWakeup(FontPathElementPtr fpe)
}
if (num_slept_fpes == size_slept_fpes) {
new = (FontPathElementPtr *)
- xrealloc(slept_fpes,
+ realloc(slept_fpes,
sizeof(FontPathElementPtr) * (size_slept_fpes + 4));
if (!new)
return;
@@ -226,8 +226,8 @@ FreeFPE (FontPathElementPtr fpe)
fpe->refcount--;
if (fpe->refcount == 0) {
(*fpe_functions[fpe->type].free_fpe) (fpe);
- xfree(fpe->name);
- xfree(fpe);
+ free(fpe->name);
+ free(fpe);
}
}
@@ -302,7 +302,7 @@ doOpenFont(ClientPtr client, OFclosurePtr c)
if (err == FontNameAlias && alias) {
newlen = strlen(alias);
- newname = (char *) xrealloc(c->fontname, newlen);
+ newname = (char *) realloc(c->fontname, newlen);
if (!newname) {
err = AllocError;
break;
@@ -377,9 +377,9 @@ bail:
for (i = 0; i < c->num_fpes; i++) {
FreeFPE(c->fpe_list[i]);
}
- xfree(c->fpe_list);
- xfree(c->fontname);
- xfree(c);
+ free(c->fpe_list);
+ free(c->fontname);
+ free(c);
return TRUE;
}
#endif /* NXAGENT_SERVER */
@@ -393,11 +393,11 @@ OpenFont(ClientPtr client, XID fid, Mask flags, unsigned lenfname, char *pfontna
#ifdef FONTDEBUG
char *f;
- f = (char *)xalloc(lenfname + 1);
+ f = (char *)malloc(lenfname + 1);
memmove(f, pfontname, lenfname);
f[lenfname] = '\0';
ErrorF("OpenFont: fontname is \"%s\"\n", f);
- xfree(f);
+ free(f);
#endif
if (!lenfname || lenfname > XLFDMAXFONTNAMELEN)
return BadName;
@@ -430,14 +430,14 @@ OpenFont(ClientPtr client, XID fid, Mask flags, unsigned lenfname, char *pfontna
return Success;
}
}
- c = (OFclosurePtr) xalloc(sizeof(OFclosureRec));
+ c = (OFclosurePtr) malloc(sizeof(OFclosureRec));
if (!c)
return BadAlloc;
- c->fontname = (char *) xalloc(lenfname);
+ c->fontname = (char *) malloc(lenfname);
c->origFontName = pfontname;
c->origFontNameLen = lenfname;
if (!c->fontname) {
- xfree(c);
+ free(c);
return BadAlloc;
}
/*
@@ -445,10 +445,10 @@ OpenFont(ClientPtr client, XID fid, Mask flags, unsigned lenfname, char *pfontna
* while we're blocking, the request still appears atomic
*/
c->fpe_list = (FontPathElementPtr *)
- xalloc(sizeof(FontPathElementPtr) * num_fpes);
+ malloc(sizeof(FontPathElementPtr) * num_fpes);
if (!c->fpe_list) {
- xfree(c->fontname);
- xfree(c);
+ free(c->fontname);
+ free(c);
return BadAlloc;
}
memmove(c->fontname, pfontname, lenfname);
@@ -679,8 +679,8 @@ doListFontsAndAliases(ClientPtr client, LFclosurePtr c)
return TRUE;
}
if (err == FontNameAlias) {
- if (resolved) xfree(resolved);
- resolved = (char *) xalloc(resolvedlen + 1);
+ if (resolved) free(resolved);
+ resolved = (char *) malloc(resolvedlen + 1);
if (resolved)
memmove(resolved, tmpname, resolvedlen + 1);
}
@@ -734,8 +734,8 @@ doListFontsAndAliases(ClientPtr client, LFclosurePtr c)
c->saved = c->current;
c->haveSaved = TRUE;
if (c->savedName)
- xfree(c->savedName);
- c->savedName = (char *)xalloc(namelen + 1);
+ free(c->savedName);
+ c->savedName = (char *)malloc(namelen + 1);
if (c->savedName)
memmove(c->savedName, name, namelen + 1);
c->savedNameLen = namelen;
@@ -829,11 +829,11 @@ bail:
ClientWakeup(client);
for (i = 0; i < c->num_fpes; i++)
FreeFPE(c->fpe_list[i]);
- xfree(c->fpe_list);
- if (c->savedName) xfree(c->savedName);
+ free(c->fpe_list);
+ if (c->savedName) free(c->savedName);
FreeFontNames(names);
- xfree(c);
- if (resolved) xfree(resolved);
+ free(c);
+ if (resolved) free(resolved);
return TRUE;
}
@@ -853,19 +853,19 @@ ListFonts(ClientPtr client, unsigned char *pattern, unsigned length,
if (length > XLFDMAXFONTNAMELEN)
return BadAlloc;
- if (!(c = (LFclosurePtr) xalloc(sizeof *c)))
+ if (!(c = (LFclosurePtr) malloc(sizeof *c)))
return BadAlloc;
c->fpe_list = (FontPathElementPtr *)
- xalloc(sizeof(FontPathElementPtr) * num_fpes);
+ malloc(sizeof(FontPathElementPtr) * num_fpes);
if (!c->fpe_list) {
- xfree(c);
+ free(c);
return BadAlloc;
}
c->names = MakeFontNamesRecord(max_names < 100 ? max_names : 100);
if (!c->names)
{
- xfree(c->fpe_list);
- xfree(c);
+ free(c->fpe_list);
+ free(c);
return BadAlloc;
}
memmove( c->current.pattern, pattern, length);
@@ -994,8 +994,8 @@ doListFontsWithInfo(ClientPtr client, LFWIclosurePtr c)
c->haveSaved = TRUE;
c->savedNumFonts = numFonts;
if (c->savedName)
- xfree(c->savedName);
- c->savedName = (char *)xalloc(namelen + 1);
+ free(c->savedName);
+ c->savedName = (char *)malloc(namelen + 1);
if (c->savedName)
memmove(c->savedName, name, namelen + 1);
aliascount = 20;
@@ -1038,7 +1038,7 @@ doListFontsWithInfo(ClientPtr client, LFWIclosurePtr c)
reply = c->reply;
if (c->length < length)
{
- reply = (xListFontsWithInfoReply *) xrealloc(c->reply, length);
+ reply = (xListFontsWithInfoReply *) realloc(c->reply, length);
if (!reply)
{
err = AllocError;
@@ -1084,8 +1084,8 @@ doListFontsWithInfo(ClientPtr client, LFWIclosurePtr c)
(void) WriteToClient(client, namelen, name);
if (pFontInfo == &fontInfo)
{
- xfree(fontInfo.props);
- xfree(fontInfo.isStringProp);
+ free(fontInfo.props);
+ free(fontInfo.isStringProp);
}
--c->current.max_names;
}
@@ -1103,10 +1103,10 @@ bail:
ClientWakeup(client);
for (i = 0; i < c->num_fpes; i++)
FreeFPE(c->fpe_list[i]);
- xfree(c->reply);
- xfree(c->fpe_list);
- if (c->savedName) xfree(c->savedName);
- xfree(c);
+ free(c->reply);
+ free(c->fpe_list);
+ if (c->savedName) free(c->savedName);
+ free(c);
return TRUE;
}
#endif /* NXAGENT_SERVER */
@@ -1127,13 +1127,13 @@ StartListFontsWithInfo(ClientPtr client, int length, unsigned char *pattern,
if (length > XLFDMAXFONTNAMELEN)
return BadAlloc;
- if (!(c = (LFWIclosurePtr) xalloc(sizeof *c)))
+ if (!(c = (LFWIclosurePtr) malloc(sizeof *c)))
goto badAlloc;
c->fpe_list = (FontPathElementPtr *)
- xalloc(sizeof(FontPathElementPtr) * num_fpes);
+ malloc(sizeof(FontPathElementPtr) * num_fpes);
if (!c->fpe_list)
{
- xfree(c);
+ free(c);
goto badAlloc;
}
memmove(c->current.pattern, pattern, length);
@@ -1317,7 +1317,7 @@ doPolyText(ClientPtr client, register PTclosurePtr c)
/* Step 1 */
/* Allocate a malloc'd closure structure to replace
the local one we were passed */
- new_closure = (PTclosurePtr) xalloc(sizeof(PTclosureRec));
+ new_closure = (PTclosurePtr) malloc(sizeof(PTclosureRec));
if (!new_closure)
{
err = BadAlloc;
@@ -1327,10 +1327,10 @@ doPolyText(ClientPtr client, register PTclosurePtr c)
c = new_closure;
len = c->endReq - c->pElt;
- c->data = (unsigned char *)xalloc(len);
+ c->data = (unsigned char *)malloc(len);
if (!c->data)
{
- xfree(c);
+ free(c);
err = BadAlloc;
goto bail;
}
@@ -1343,8 +1343,8 @@ doPolyText(ClientPtr client, register PTclosurePtr c)
pGC = GetScratchGC(c->pGC->depth, c->pGC->pScreen);
if (!pGC)
{
- xfree(c->data);
- xfree(c);
+ free(c->data);
+ free(c);
err = BadAlloc;
goto bail;
}
@@ -1366,8 +1366,8 @@ doPolyText(ClientPtr client, register PTclosurePtr c)
Success)
{
FreeScratchGC(pGC);
- xfree(c->data);
- xfree(c);
+ free(c->data);
+ free(c);
err = BadAlloc;
goto bail;
}
@@ -1434,8 +1434,8 @@ bail:
c->pGC->font = NullFont;
FreeScratchGC(c->pGC);
- xfree(c->data);
- xfree(c);
+ free(c->data);
+ free(c);
}
return TRUE;
}
@@ -1517,7 +1517,7 @@ doImageText(ClientPtr client, register ITclosurePtr c)
in doPolyText, but much simpler because the
request structure is much simpler. */
- new_closure = (ITclosurePtr) xalloc(sizeof(ITclosureRec));
+ new_closure = (ITclosurePtr) malloc(sizeof(ITclosureRec));
if (!new_closure)
{
err = BadAlloc;
@@ -1527,10 +1527,10 @@ doImageText(ClientPtr client, register ITclosurePtr c)
*new_closure = *c;
c = new_closure;
- data = (unsigned char *)xalloc(c->nChars * c->itemSize);
+ data = (unsigned char *)malloc(c->nChars * c->itemSize);
if (!data)
{
- xfree(c);
+ free(c);
c = old_closure;
err = BadAlloc;
goto bail;
@@ -1541,8 +1541,8 @@ doImageText(ClientPtr client, register ITclosurePtr c)
pGC = GetScratchGC(c->pGC->depth, c->pGC->pScreen);
if (!pGC)
{
- xfree(c->data);
- xfree(c);
+ free(c->data);
+ free(c);
c = old_closure;
err = BadAlloc;
goto bail;
@@ -1562,8 +1562,8 @@ doImageText(ClientPtr client, register ITclosurePtr c)
GCClipYOrigin | GCClipMask)) != Success)
{
FreeScratchGC(pGC);
- xfree(c->data);
- xfree(c);
+ free(c->data);
+ free(c);
c = old_closure;
err = BadAlloc;
goto bail;
@@ -1602,8 +1602,8 @@ bail:
c->pGC->font = NullFont;
FreeScratchGC(c->pGC);
- xfree(c->data);
- xfree(c);
+ free(c->data);
+ free(c);
}
return TRUE;
}
@@ -1677,7 +1677,7 @@ FreeFontPath(FontPathElementPtr *list, int n, Bool force)
}
FreeFPE(list[i]);
}
- xfree((char *) list);
+ free((char *) list);
}
static FontPathElementPtr
@@ -1704,7 +1704,7 @@ SetFontPathElements(int npaths, unsigned char *paths, int *bad, Bool persist)
FontPathElementPtr fpe = NULL, *fplist;
fplist = (FontPathElementPtr *)
- xalloc(sizeof(FontPathElementPtr) * npaths);
+ malloc(sizeof(FontPathElementPtr) * npaths);
if (!fplist) {
*bad = 0;
return BadAlloc;
@@ -1745,16 +1745,16 @@ SetFontPathElements(int npaths, unsigned char *paths, int *bad, Bool persist)
/* if error or can't do it, act like it's a new one */
if (!fpe)
{
- fpe = (FontPathElementPtr) xalloc(sizeof(FontPathElementRec));
+ fpe = (FontPathElementPtr) malloc(sizeof(FontPathElementRec));
if (!fpe)
{
err = BadAlloc;
goto bail;
}
- fpe->name = (char *) xalloc(len + 1);
+ fpe->name = (char *) malloc(len + 1);
if (!fpe->name)
{
- xfree(fpe);
+ free(fpe);
err = BadAlloc;
goto bail;
}
@@ -1777,8 +1777,8 @@ SetFontPathElements(int npaths, unsigned char *paths, int *bad, Bool persist)
fpe->name);
}
#endif /* NXAGENT_SERVER */
- xfree (fpe->name);
- xfree (fpe);
+ free (fpe->name);
+ free (fpe);
}
}
}
@@ -1805,7 +1805,7 @@ bail:
*bad = i;
while (--valid_paths >= 0)
FreeFPE(fplist[valid_paths]);
- xfree(fplist);
+ free(fplist);
return FontToXError(err);
}
@@ -1998,7 +1998,7 @@ RegisterFPEFunctions(NameCheckFunc name_func,
FPEFunctions *new;
/* grow the list */
- new = (FPEFunctions *) xrealloc(fpe_functions,
+ new = (FPEFunctions *) realloc(fpe_functions,
(num_fpe_types + 1) * sizeof(FPEFunctions));
if (!new)
return -1;
@@ -2037,7 +2037,7 @@ FreeFonts()
FreeFontPath(font_path_elements, num_fpes, TRUE);
font_path_elements = 0;
num_fpes = 0;
- xfree(fpe_functions);
+ free(fpe_functions);
num_fpe_types = 0;
fpe_functions = (FPEFunctions *) 0;
}
diff --git a/nx-X11/programs/Xserver/dix/dixutils.c b/nx-X11/programs/Xserver/dix/dixutils.c
index e91303851..d43b57a2c 100644
--- a/nx-X11/programs/Xserver/dix/dixutils.c
+++ b/nx-X11/programs/Xserver/dix/dixutils.c
@@ -351,7 +351,7 @@ AlterSaveSetForClient(ClientPtr client, WindowPtr pWin, unsigned mode,
if (j < numnow) /* duplicate */
return(Success);
numnow++;
- pTmp = (SaveSetElt *)xrealloc(client->saveSet, sizeof(*pTmp) * numnow);
+ pTmp = (SaveSetElt *)realloc(client->saveSet, sizeof(*pTmp) * numnow);
if (!pTmp)
return(BadAlloc);
client->saveSet = pTmp;
@@ -371,13 +371,13 @@ AlterSaveSetForClient(ClientPtr client, WindowPtr pWin, unsigned mode,
numnow--;
if (numnow)
{
- pTmp = (SaveSetElt *)xrealloc(client->saveSet, sizeof(*pTmp) * numnow);
+ pTmp = (SaveSetElt *)realloc(client->saveSet, sizeof(*pTmp) * numnow);
if (pTmp)
client->saveSet = pTmp;
}
else
{
- xfree(client->saveSet);
+ free(client->saveSet);
client->saveSet = (SaveSetElt *)NULL;
}
client->numSaved = numnow;
@@ -504,7 +504,7 @@ RegisterBlockAndWakeupHandlers (BlockHandlerProcPtr blockHandler,
if (numHandlers >= sizeHandlers)
{
- new = (BlockHandlerPtr) xrealloc (handlers, (numHandlers + 1) *
+ new = (BlockHandlerPtr) realloc (handlers, (numHandlers + 1) *
sizeof (BlockHandlerRec));
if (!new)
return FALSE;
@@ -549,7 +549,7 @@ RemoveBlockAndWakeupHandlers (BlockHandlerProcPtr blockHandler,
void
InitBlockAndWakeupHandlers ()
{
- xfree (handlers);
+ free (handlers);
handlers = (BlockHandlerPtr) 0;
numHandlers = 0;
sizeHandlers = 0;
@@ -581,7 +581,7 @@ ProcessWorkQueue(void)
{
/* remove q from the list */
*p = q->next; /* don't fetch until after func called */
- xfree (q);
+ free (q);
}
else
{
@@ -604,7 +604,7 @@ ProcessWorkQueueZombies(void)
(void) (*q->function) (q->client, q->closure);
/* remove q from the list */
*p = q->next; /* don't fetch until after func called */
- xfree (q);
+ free (q);
}
else
{
@@ -621,7 +621,7 @@ QueueWorkProc (
{
WorkQueuePtr q;
- q = (WorkQueuePtr) xalloc (sizeof *q);
+ q = (WorkQueuePtr) malloc (sizeof *q);
if (!q)
return FALSE;
q->function = function;
@@ -655,7 +655,7 @@ ClientSleep (ClientPtr client, ClientSleepProcPtr function, void * closure)
{
SleepQueuePtr q;
- q = (SleepQueuePtr) xalloc (sizeof *q);
+ q = (SleepQueuePtr) malloc (sizeof *q);
if (!q)
return FALSE;
@@ -692,7 +692,7 @@ ClientWakeup (ClientPtr client)
if (q->client == client)
{
*prev = q->next;
- xfree (q);
+ free (q);
if (client->clientGone)
/* Oops -- new zombie cleanup code ensures this only
* happens from inside CloseDownClient; don't want to
@@ -735,7 +735,7 @@ _AddCallback(
{
CallbackPtr cbr;
- cbr = (CallbackPtr) xalloc(sizeof(CallbackRec));
+ cbr = (CallbackPtr) malloc(sizeof(CallbackRec));
if (!cbr)
return FALSE;
cbr->proc = callback;
@@ -775,7 +775,7 @@ _DeleteCallback(
cbl->list = cbr->next;
else
pcbr->next = cbr->next;
- xfree(cbr);
+ free(cbr);
}
return TRUE;
}
@@ -820,12 +820,12 @@ _CallCallbacks(
if (pcbr)
{
cbr = cbr->next;
- xfree(pcbr->next);
+ free(pcbr->next);
pcbr->next = cbr;
} else
{
cbr = cbr->next;
- xfree(cbl->list);
+ free(cbl->list);
cbl->list = cbr;
}
cbl->numDeleted--;
@@ -865,9 +865,9 @@ _DeleteCallbackList(
for (cbr = cbl->list; cbr != NULL; cbr = nextcbr)
{
nextcbr = cbr->next;
- xfree(cbr);
+ free(cbr);
}
- xfree(cbl);
+ free(cbl);
*pcbl = NULL;
}
@@ -888,7 +888,7 @@ CreateCallbackList(CallbackListPtr *pcbl, CallbackFuncsPtr cbfuncs)
int i;
if (!pcbl) return FALSE;
- cbl = (CallbackListPtr) xalloc(sizeof(CallbackListRec));
+ cbl = (CallbackListPtr) malloc(sizeof(CallbackListRec));
if (!cbl) return FALSE;
cbl->funcs = cbfuncs ? *cbfuncs : default_cbfuncs;
cbl->inCallback = 0;
@@ -955,7 +955,7 @@ InitCallbackManager()
{
DeleteCallbackList(listsToCleanup[i]);
}
- if (listsToCleanup) xfree(listsToCleanup);
+ if (listsToCleanup) free(listsToCleanup);
numCallbackListsToCleanup = 0;
listsToCleanup = NULL;
diff --git a/nx-X11/programs/Xserver/dix/events.c b/nx-X11/programs/Xserver/dix/events.c
index 31b76e38f..676640f01 100644
--- a/nx-X11/programs/Xserver/dix/events.c
+++ b/nx-X11/programs/Xserver/dix/events.c
@@ -1027,7 +1027,7 @@ EnqueueEvent(xEvent *xE, DeviceIntPtr device, int count)
return;
}
}
- qe = (QdEventPtr)xalloc(sizeof(QdEventRec) + (count * sizeof(xEvent)));
+ qe = (QdEventPtr)malloc(sizeof(QdEventRec) + (count * sizeof(xEvent)));
if (!qe)
return;
qe->next = (QdEventPtr)NULL;
@@ -1076,7 +1076,7 @@ PlayReleasedEvents(void)
#endif
(*qe->device->public.processInputProc)(qe->event, qe->device,
qe->evcount);
- xfree(qe);
+ free(qe);
for (dev = inputInfo.devices; dev && dev->sync.frozen; dev = dev->next)
;
if (!dev)
@@ -1952,7 +1952,7 @@ XYToWindow(int x, int y)
{
spriteTraceSize += 10;
Must_have_memory = TRUE; /* XXX */
- spriteTrace = (WindowPtr *)xrealloc(
+ spriteTrace = (WindowPtr *)realloc(
spriteTrace, spriteTraceSize*sizeof(WindowPtr));
Must_have_memory = FALSE; /* XXX */
}
@@ -2467,7 +2467,7 @@ CheckPassiveGrabsOnWindow(
if (device->sync.evcount < count)
{
Must_have_memory = TRUE; /* XXX */
- device->sync.event = (xEvent *)xrealloc(device->sync.event,
+ device->sync.event = (xEvent *)realloc(device->sync.event,
count*
sizeof(xEvent));
Must_have_memory = FALSE; /* XXX */
@@ -2639,7 +2639,7 @@ DeliverGrabbedEvent(register xEvent *xE, register DeviceIntPtr thisDev,
if (thisDev->sync.evcount < count)
{
Must_have_memory = TRUE; /* XXX */
- thisDev->sync.event = (xEvent *)xrealloc(thisDev->sync.event,
+ thisDev->sync.event = (xEvent *)realloc(thisDev->sync.event,
count*sizeof(xEvent));
Must_have_memory = FALSE; /* XXX */
}
@@ -2959,7 +2959,7 @@ OtherClientGone(void * value, XID id)
if (!(pWin->optional->otherClients = other->next))
CheckWindowOptionalNeed (pWin);
}
- xfree(other);
+ free(other);
RecalculateDeliverableEvents(pWin);
return(Success);
}
@@ -3030,7 +3030,7 @@ EventSelectForWindow(register WindowPtr pWin, register ClientPtr client, Mask ma
check = 0;
if (!pWin->optional && !MakeWindowOptional (pWin))
return BadAlloc;
- others = (OtherClients *) xalloc(sizeof(OtherClients));
+ others = (OtherClients *) malloc(sizeof(OtherClients));
if (!others)
return BadAlloc;
others->mask = mask;
@@ -3530,7 +3530,7 @@ SetInputFocus(
{
focus->traceSize = depth+1;
Must_have_memory = TRUE; /* XXX */
- focus->trace = (WindowPtr *)xrealloc(focus->trace,
+ focus->trace = (WindowPtr *)realloc(focus->trace,
focus->traceSize *
sizeof(WindowPtr));
Must_have_memory = FALSE; /* XXX */
@@ -3929,7 +3929,7 @@ InitEvents()
if (spriteTraceSize == 0)
{
spriteTraceSize = 32;
- spriteTrace = (WindowPtr *)xalloc(32*sizeof(WindowPtr));
+ spriteTrace = (WindowPtr *)malloc(32*sizeof(WindowPtr));
if (!spriteTrace)
FatalError("failed to allocate spriteTrace");
}
@@ -3948,7 +3948,7 @@ InitEvents()
while (syncEvents.pending)
{
QdEventPtr next = syncEvents.pending->next;
- xfree(syncEvents.pending);
+ free(syncEvents.pending);
syncEvents.pending = next;
}
syncEvents.pendtail = &syncEvents.pending;
@@ -3968,7 +3968,7 @@ InitEvents()
void
CloseDownEvents(void)
{
- xfree(spriteTrace);
+ free(spriteTrace);
spriteTrace = NULL;
spriteTraceSize = 0;
}
diff --git a/nx-X11/programs/Xserver/dix/extension.c b/nx-X11/programs/Xserver/dix/extension.c
index fe51f8916..b0859757b 100644
--- a/nx-X11/programs/Xserver/dix/extension.c
+++ b/nx-X11/programs/Xserver/dix/extension.c
@@ -95,25 +95,25 @@ AddExtension(char *name, int NumEvents, int NumErrors,
(unsigned)(lastError + NumErrors > LAST_ERROR))
return((ExtensionEntry *) NULL);
- ext = (ExtensionEntry *) xalloc(sizeof(ExtensionEntry));
+ ext = (ExtensionEntry *) malloc(sizeof(ExtensionEntry));
if (!ext)
return((ExtensionEntry *) NULL);
- ext->name = (char *)xalloc(strlen(name) + 1);
+ ext->name = (char *)malloc(strlen(name) + 1);
ext->num_aliases = 0;
ext->aliases = (char **)NULL;
if (!ext->name)
{
- xfree(ext);
+ free(ext);
return((ExtensionEntry *) NULL);
}
strcpy(ext->name, name);
i = NumExtensions;
- newexts = (ExtensionEntry **) xrealloc(extensions,
+ newexts = (ExtensionEntry **) realloc(extensions,
(i + 1) * sizeof(ExtensionEntry *));
if (!newexts)
{
- xfree(ext->name);
- xfree(ext);
+ free(ext->name);
+ free(ext);
return((ExtensionEntry *) NULL);
}
NumExtensions++;
@@ -159,12 +159,12 @@ Bool AddExtensionAlias(char *alias, ExtensionEntry *ext)
char *name;
char **aliases;
- aliases = (char **)xrealloc(ext->aliases,
+ aliases = (char **)realloc(ext->aliases,
(ext->num_aliases + 1) * sizeof(char *));
if (!aliases)
return FALSE;
ext->aliases = aliases;
- name = (char *)xalloc(strlen(alias) + 1);
+ name = (char *)malloc(strlen(alias) + 1);
if (!name)
return FALSE;
strcpy(name, alias);
@@ -263,13 +263,13 @@ CloseDownExtensions()
if (extensions[i]->CloseDown)
(* extensions[i]->CloseDown)(extensions[i]);
NumExtensions = i;
- xfree(extensions[i]->name);
+ free(extensions[i]->name);
for (j = extensions[i]->num_aliases; --j >= 0;)
- xfree(extensions[i]->aliases[j]);
- xfree(extensions[i]->aliases);
- xfree(extensions[i]);
+ free(extensions[i]->aliases[j]);
+ free(extensions[i]->aliases);
+ free(extensions[i]);
}
- xfree(extensions);
+ free(extensions);
extensions = (ExtensionEntry **)NULL;
lastEvent = EXTENSION_EVENT_BASE;
lastError = FirstExtensionError;
@@ -280,9 +280,9 @@ CloseDownExtensions()
while (spentry->num)
{
spentry->num--;
- xfree(spentry->procList[spentry->num].name);
+ free(spentry->procList[spentry->num].name);
}
- xfree(spentry->procList);
+ free(spentry->procList);
spentry->procList = (ProcEntryPtr)NULL;
}
}
@@ -438,15 +438,15 @@ RegisterScreenProc(char *name, ScreenPtr pScreen, ExtensionLookupProc proc)
procEntry->proc = proc;
else
{
- newname = (char *)xalloc(strlen(name)+1);
+ newname = (char *)malloc(strlen(name)+1);
if (!newname)
return FALSE;
procEntry = (ProcEntryPtr)
- xrealloc(spentry->procList,
+ realloc(spentry->procList,
sizeof(ProcEntryRec) * (spentry->num+1));
if (!procEntry)
{
- xfree(newname);
+ free(newname);
return FALSE;
}
spentry->procList = procEntry;
diff --git a/nx-X11/programs/Xserver/dix/gc.c b/nx-X11/programs/Xserver/dix/gc.c
index 2c17de3d6..9566bb8f7 100644
--- a/nx-X11/programs/Xserver/dix/gc.c
+++ b/nx-X11/programs/Xserver/dix/gc.c
@@ -457,7 +457,7 @@ dixChangeGC(ClientPtr client, register GC *pGC, register BITS32 mask, CARD32 *pC
{
if (pGC->dash != DefaultDash)
{
- xfree(pGC->dash);
+ free(pGC->dash);
pGC->numInDashList = 2;
pGC->dash = DefaultDash;
}
@@ -466,11 +466,11 @@ dixChangeGC(ClientPtr client, register GC *pGC, register BITS32 mask, CARD32 *pC
{
unsigned char *dash;
- dash = (unsigned char *)xalloc(2 * sizeof(unsigned char));
+ dash = (unsigned char *)malloc(2 * sizeof(unsigned char));
if (dash)
{
if (pGC->dash != DefaultDash)
- xfree(pGC->dash);
+ free(pGC->dash);
pGC->numInDashList = 2;
pGC->dash = dash;
dash[0] = newdash;
@@ -580,7 +580,7 @@ AllocateGC(ScreenPtr pScreen)
register unsigned size;
register int i;
- pGC = (GCPtr)xalloc(pScreen->totalGCSize);
+ pGC = (GCPtr)malloc(pScreen->totalGCSize);
if (pGC)
{
ppriv = (DevUnion *)(pGC + 1);
@@ -838,7 +838,7 @@ CopyGC(register GC *pgcSrc, register GC *pgcDst, register BITS32 mask)
{
if (pgcDst->dash != DefaultDash)
{
- xfree(pgcDst->dash);
+ free(pgcDst->dash);
pgcDst->numInDashList = pgcSrc->numInDashList;
pgcDst->dash = pgcSrc->dash;
}
@@ -848,12 +848,12 @@ CopyGC(register GC *pgcSrc, register GC *pgcDst, register BITS32 mask)
unsigned char *dash;
unsigned int i;
- dash = (unsigned char *)xalloc(pgcSrc->numInDashList *
+ dash = (unsigned char *)malloc(pgcSrc->numInDashList *
sizeof(unsigned char));
if (dash)
{
if (pgcDst->dash != DefaultDash)
- xfree(pgcDst->dash);
+ free(pgcDst->dash);
pgcDst->numInDashList = pgcSrc->numInDashList;
pgcDst->dash = dash;
for (i=0; i<pgcSrc->numInDashList; i++)
@@ -904,8 +904,8 @@ FreeGC(void * value, XID gid)
(*pGC->funcs->DestroyGC) (pGC);
if (pGC->dash != DefaultDash)
- xfree(pGC->dash);
- xfree(pGC);
+ free(pGC->dash);
+ free(pGC);
return(Success);
}
@@ -1098,9 +1098,9 @@ SetDashes(register GCPtr pGC, unsigned offset, unsigned ndash, unsigned char *pd
}
if (ndash & 1)
- p = (unsigned char *)xalloc(2 * ndash * sizeof(unsigned char));
+ p = (unsigned char *)malloc(2 * ndash * sizeof(unsigned char));
else
- p = (unsigned char *)xalloc(ndash * sizeof(unsigned char));
+ p = (unsigned char *)malloc(ndash * sizeof(unsigned char));
if (!p)
return BadAlloc;
@@ -1113,7 +1113,7 @@ SetDashes(register GCPtr pGC, unsigned offset, unsigned ndash, unsigned char *pd
}
if (pGC->dash != DefaultDash)
- xfree(pGC->dash);
+ free(pGC->dash);
pGC->numInDashList = ndash;
pGC->dash = p;
if (ndash & 1)
@@ -1195,7 +1195,7 @@ SetClipRects(GCPtr pGC, int xOrigin, int yOrigin, int nrects,
if (newct < 0)
return(BadMatch);
size = nrects * sizeof(xRectangle);
- prectsNew = (xRectangle *) xalloc(size);
+ prectsNew = (xRectangle *) malloc(size);
if (!prectsNew && size)
return BadAlloc;
diff --git a/nx-X11/programs/Xserver/dix/glyphcurs.c b/nx-X11/programs/Xserver/dix/glyphcurs.c
index f715a327f..a1da68443 100644
--- a/nx-X11/programs/Xserver/dix/glyphcurs.c
+++ b/nx-X11/programs/Xserver/dix/glyphcurs.c
@@ -93,7 +93,7 @@ ServerBitsFromGlyph(FontPtr pfont, unsigned ch, register CursorMetricPtr cm, uns
pScreen = screenInfo.screens[0];
nby = BitmapBytePad(cm->width) * (long)cm->height;
- pbits = (char *)xalloc(nby);
+ pbits = (char *)malloc(nby);
if (!pbits)
return BadAlloc;
/* zeroing the (pad) bits seems to help some ddx cursor handling */
@@ -108,7 +108,7 @@ ServerBitsFromGlyph(FontPtr pfont, unsigned ch, register CursorMetricPtr cm, uns
(*pScreen->DestroyPixmap)(ppix);
if (pGC)
FreeScratchGC(pGC);
- xfree(pbits);
+ free(pbits);
return BadAlloc;
}
diff --git a/nx-X11/programs/Xserver/dix/grabs.c b/nx-X11/programs/Xserver/dix/grabs.c
index 839e930b1..d72ef3f6a 100644
--- a/nx-X11/programs/Xserver/dix/grabs.c
+++ b/nx-X11/programs/Xserver/dix/grabs.c
@@ -84,7 +84,7 @@ CreateGrab(
{
GrabPtr grab;
- grab = (GrabPtr)xalloc(sizeof(GrabRec));
+ grab = (GrabPtr)malloc(sizeof(GrabRec));
if (!grab)
return (GrabPtr)NULL;
grab->resource = FakeClientID(client);
@@ -116,15 +116,15 @@ static void
FreeGrab(GrabPtr pGrab)
{
if (pGrab->modifiersDetail.pMask != NULL)
- xfree(pGrab->modifiersDetail.pMask);
+ free(pGrab->modifiersDetail.pMask);
if (pGrab->detail.pMask != NULL)
- xfree(pGrab->detail.pMask);
+ free(pGrab->detail.pMask);
if (pGrab->cursor)
FreeCursor(pGrab->cursor, (Cursor)0);
- xfree(pGrab);
+ free(pGrab);
}
int
@@ -158,7 +158,7 @@ DeleteDetailFromMask(Mask *pDetailMask, unsigned short detail)
register Mask *mask;
register int i;
- mask = (Mask *)xalloc(sizeof(Mask) * MasksPerDetailMask);
+ mask = (Mask *)malloc(sizeof(Mask) * MasksPerDetailMask);
if (mask)
{
if (pDetailMask)
@@ -410,7 +410,7 @@ DeletePassiveGrabFromList(GrabPtr pMinuendGrab)
for (i = 0; i < nadds; i++)
FreeResource(adds[i]->resource, RT_NONE);
for (i = 0; i < nups; i++)
- xfree(details[i]);
+ free(details[i]);
}
else
{
@@ -424,7 +424,7 @@ DeletePassiveGrabFromList(GrabPtr pMinuendGrab)
}
for (i = 0; i < nups; i++)
{
- xfree(*updates[i]);
+ free(*updates[i]);
*updates[i] = details[i];
}
}
diff --git a/nx-X11/programs/Xserver/dix/main.c b/nx-X11/programs/Xserver/dix/main.c
index 25fbb8b65..de53a6593 100644
--- a/nx-X11/programs/Xserver/dix/main.c
+++ b/nx-X11/programs/Xserver/dix/main.c
@@ -310,12 +310,12 @@ main(int argc, char *argv[], char *envp[])
{
CreateWellKnownSockets();
InitProcVectors();
- clients = (ClientPtr *)xalloc(MAXCLIENTS * sizeof(ClientPtr));
+ clients = (ClientPtr *)malloc(MAXCLIENTS * sizeof(ClientPtr));
if (!clients)
FatalError("couldn't create client array");
for (i=1; i<MAXCLIENTS; i++)
clients[i] = NullClient;
- serverClient = (ClientPtr)xalloc(sizeof(ClientRec));
+ serverClient = (ClientPtr)malloc(sizeof(ClientRec));
if (!serverClient)
FatalError("couldn't create server client");
InitClient(serverClient, 0, (void *)NULL);
@@ -474,7 +474,7 @@ main(int argc, char *argv[], char *envp[])
#endif
FreeAuditTimer();
- xfree(serverClient->devPrivates);
+ free(serverClient->devPrivates);
serverClient->devPrivates = NULL;
if (dispatchException & DE_TERMINATE)
@@ -490,7 +490,7 @@ main(int argc, char *argv[], char *envp[])
break;
}
- xfree(ConnectionInfo);
+ free(ConnectionInfo);
ConnectionInfo = NULL;
}
return(0);
@@ -556,7 +556,7 @@ CreateConnectionBlock()
((setup.nbytesVendor + 3) & ~3) +
(setup.numFormats * sizeof(xPixmapFormat)) +
(setup.numRoots * sizeof(xWindowRoot));
- ConnectionInfo = (char *) xalloc(lenofblock);
+ ConnectionInfo = (char *) malloc(lenofblock);
if (!ConnectionInfo)
return FALSE;
@@ -618,10 +618,10 @@ CreateConnectionBlock()
{
lenofblock += sizeof(xDepth) +
(pDepth->numVids * sizeof(xVisualType));
- pBuf = (char *)xrealloc(ConnectionInfo, lenofblock);
+ pBuf = (char *)realloc(ConnectionInfo, lenofblock);
if (!pBuf)
{
- xfree(ConnectionInfo);
+ free(ConnectionInfo);
return FALSE;
}
ConnectionInfo = pBuf;
@@ -689,15 +689,15 @@ 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)
{
- xfree(pScreen);
+ free(pScreen);
return -1;
}
pScreen->myNum = i;
@@ -782,11 +782,11 @@ static void
FreeScreen(ScreenPtr pScreen)
{
pScreen->root = NullWindow;
- xfree(pScreen->WindowPrivateSizes);
- xfree(pScreen->GCPrivateSizes);
+ free(pScreen->WindowPrivateSizes);
+ free(pScreen->GCPrivateSizes);
#ifdef PIXPRIV
- xfree(pScreen->PixmapPrivateSizes);
+ free(pScreen->PixmapPrivateSizes);
#endif
- xfree(pScreen->devPrivates);
- xfree(pScreen);
+ free(pScreen->devPrivates);
+ free(pScreen);
}
diff --git a/nx-X11/programs/Xserver/dix/pixmap.c b/nx-X11/programs/Xserver/dix/pixmap.c
index 463e31598..246d26067 100644
--- a/nx-X11/programs/Xserver/dix/pixmap.c
+++ b/nx-X11/programs/Xserver/dix/pixmap.c
@@ -128,7 +128,7 @@ AllocatePixmap(ScreenPtr pScreen, int pixDataSize)
* the pixmap buffer. This may be a RENDER bug.
*/
- pPixmap = (PixmapPtr)xalloc(pScreen->totalPixmapSize + pixDataSize + 4);
+ pPixmap = (PixmapPtr)malloc(pScreen->totalPixmapSize + pixDataSize + 4);
if (!pPixmap)
return NullPixmap;
ppriv = (DevUnion *)(pPixmap + 1);
@@ -146,7 +146,7 @@ AllocatePixmap(ScreenPtr pScreen, int pixDataSize)
ppriv->ptr = (void *)NULL;
}
#else
- pPixmap = (PixmapPtr)xalloc(sizeof(PixmapRec) + pixDataSize);
+ pPixmap = (PixmapPtr)malloc(sizeof(PixmapRec) + pixDataSize);
#endif
return pPixmap;
}
diff --git a/nx-X11/programs/Xserver/dix/privates.c b/nx-X11/programs/Xserver/dix/privates.c
index d08883d1d..15a9dff4d 100644
--- a/nx-X11/programs/Xserver/dix/privates.c
+++ b/nx-X11/programs/Xserver/dix/privates.c
@@ -66,7 +66,7 @@ ResetClientPrivates()
{
clientPrivateCount = 0;
clientPrivateLen = 0;
- xfree(clientPrivateSizes);
+ free(clientPrivateSizes);
clientPrivateSizes = (unsigned *)NULL;
totalClientSize =
((sizeof(ClientRec) + sizeof(long) - 1) / sizeof(long)) * sizeof(long);
@@ -89,7 +89,7 @@ AllocateClientPrivate(int index2, unsigned amount)
if (index2 >= clientPrivateLen)
{
unsigned *nsizes;
- nsizes = (unsigned *)xrealloc(clientPrivateSizes,
+ nsizes = (unsigned *)realloc(clientPrivateSizes,
(index2 + 1) * sizeof(unsigned));
if (!nsizes)
return FALSE;
@@ -136,7 +136,7 @@ AllocateScreenPrivateIndex()
for (i = 0; i < screenInfo.numScreens; i++)
{
pScreen = screenInfo.screens[i];
- nprivs = (DevUnion *)xrealloc(pScreen->devPrivates,
+ nprivs = (DevUnion *)realloc(pScreen->devPrivates,
screenPrivateCount * sizeof(DevUnion));
if (!nprivs)
{
@@ -180,7 +180,7 @@ AllocateWindowPrivate(register ScreenPtr pScreen, int index2, unsigned amount)
if (index2 >= pScreen->WindowPrivateLen)
{
unsigned *nsizes;
- nsizes = (unsigned *)xrealloc(pScreen->WindowPrivateSizes,
+ nsizes = (unsigned *)realloc(pScreen->WindowPrivateSizes,
(index2 + 1) * sizeof(unsigned));
if (!nsizes)
return FALSE;
@@ -230,7 +230,7 @@ AllocateGCPrivate(register ScreenPtr pScreen, int index2, unsigned amount)
if (index2 >= pScreen->GCPrivateLen)
{
unsigned *nsizes;
- nsizes = (unsigned *)xrealloc(pScreen->GCPrivateSizes,
+ nsizes = (unsigned *)realloc(pScreen->GCPrivateSizes,
(index2 + 1) * sizeof(unsigned));
if (!nsizes)
return FALSE;
@@ -280,7 +280,7 @@ AllocatePixmapPrivate(register ScreenPtr pScreen, int index2, unsigned amount)
if (index2 >= pScreen->PixmapPrivateLen)
{
unsigned *nsizes;
- nsizes = (unsigned *)xrealloc(pScreen->PixmapPrivateSizes,
+ nsizes = (unsigned *)realloc(pScreen->PixmapPrivateSizes,
(index2 + 1) * sizeof(unsigned));
if (!nsizes)
return FALSE;
@@ -345,7 +345,7 @@ AllocateColormapPrivateIndex (InitCmapPrivFunc initPrivFunc)
if (pColormap)
{
- privs = (DevUnion *) xrealloc (pColormap->devPrivates,
+ privs = (DevUnion *) realloc (pColormap->devPrivates,
colormapPrivateCount * sizeof(DevUnion));
if (!privs) {
colormapPrivateCount--;
@@ -380,7 +380,7 @@ Bool
AllocateDevicePrivate(DeviceIntPtr device, int index)
{
if (device->nPrivates < ++index) {
- DevUnion *nprivs = (DevUnion *) xrealloc(device->devPrivates,
+ DevUnion *nprivs = (DevUnion *) realloc(device->devPrivates,
index * sizeof(DevUnion));
if (!nprivs)
return FALSE;
diff --git a/nx-X11/programs/Xserver/dix/property.c b/nx-X11/programs/Xserver/dix/property.c
index b3b650dda..7ed66b60a 100644
--- a/nx-X11/programs/Xserver/dix/property.c
+++ b/nx-X11/programs/Xserver/dix/property.c
@@ -284,13 +284,13 @@ ChangeWindowProperty(WindowPtr pWin, Atom property, Atom type, int format,
{
if (!pWin->optional && !MakeWindowOptional (pWin))
return(BadAlloc);
- pProp = (PropertyPtr)xalloc(sizeof(PropertyRec));
+ pProp = (PropertyPtr)malloc(sizeof(PropertyRec));
if (!pProp)
return(BadAlloc);
- data = (void *)xalloc(totalSize);
+ data = (void *)malloc(totalSize);
if (!data && len)
{
- xfree(pProp);
+ free(pProp);
return(BadAlloc);
}
pProp->propertyName = property;
@@ -318,7 +318,7 @@ ChangeWindowProperty(WindowPtr pWin, Atom property, Atom type, int format,
{
if (totalSize != pProp->size * (pProp->format >> 3))
{
- data = (void *)xrealloc(pProp->data, totalSize);
+ data = (void *)realloc(pProp->data, totalSize);
if (!data && len)
return(BadAlloc);
pProp->data = data;
@@ -335,7 +335,7 @@ ChangeWindowProperty(WindowPtr pWin, Atom property, Atom type, int format,
}
else if (mode == PropModeAppend)
{
- data = (void *)xrealloc(pProp->data,
+ data = (void *)realloc(pProp->data,
sizeInBytes * (len + pProp->size));
if (!data)
return(BadAlloc);
@@ -347,13 +347,13 @@ ChangeWindowProperty(WindowPtr pWin, Atom property, Atom type, int format,
}
else if (mode == PropModePrepend)
{
- data = (void *)xalloc(sizeInBytes * (len + pProp->size));
+ data = (void *)malloc(sizeInBytes * (len + pProp->size));
if (!data)
return(BadAlloc);
memmove(&((char *)data)[totalSize], (char *)pProp->data,
(int)(pProp->size * sizeInBytes));
memmove((char *)data, (char *)value, totalSize);
- xfree(pProp->data);
+ free(pProp->data);
pProp->data = data;
pProp->size += len;
}
@@ -404,8 +404,8 @@ DeleteProperty(WindowPtr pWin, Atom propName)
event.u.property.atom = pProp->propertyName;
event.u.property.time = currentTime.milliseconds;
DeliverEvents(pWin, &event, 1, (WindowPtr)NULL);
- xfree(pProp->data);
- xfree(pProp);
+ free(pProp->data);
+ free(pProp);
}
return(Success);
}
@@ -426,8 +426,8 @@ DeleteAllWindowProperties(WindowPtr pWin)
event.u.property.time = currentTime.milliseconds;
DeliverEvents(pWin, &event, 1, (WindowPtr)NULL);
pNextProp = pProp->next;
- xfree(pProp->data);
- xfree(pProp);
+ free(pProp->data);
+ free(pProp);
pProp = pNextProp;
}
}
@@ -599,8 +599,8 @@ ProcGetProperty(ClientPtr client)
}
else
prevProp->next = pProp->next;
- xfree(pProp->data);
- xfree(pProp);
+ free(pProp->data);
+ free(pProp);
}
return(client->noClientException);
}
diff --git a/nx-X11/programs/Xserver/dix/region.c b/nx-X11/programs/Xserver/dix/region.c
index e927b9fde..f2b7224f8 100644
--- a/nx-X11/programs/Xserver/dix/region.c
+++ b/nx-X11/programs/Xserver/dix/region.c
@@ -172,7 +172,7 @@ Equipment Corporation.
((r1)->y1 <= (r2)->y1) && \
((r1)->y2 >= (r2)->y2) )
-#define xfreeData(reg) if ((reg)->data && (reg)->data->size) xfree((reg)->data)
+#define xfreeData(reg) if ((reg)->data && (reg)->data->size) free((reg)->data)
#define RECTALLOC_BAIL(pReg,n,bail) \
if (!(pReg)->data || (((pReg)->data->numRects + (n)) > (pReg)->data->size)) \
@@ -210,7 +210,7 @@ if (((numRects) < ((reg)->data->size >> 1)) && ((reg)->data->size > 50)) \
{ \
size_t NewSize = RegionSizeof(numRects); \
RegDataPtr NewData = \
- (NewSize > 0) ? (RegDataPtr)xrealloc((reg)->data, NewSize) : NULL; \
+ (NewSize > 0) ? (RegDataPtr)realloc((reg)->data, NewSize) : NULL; \
if (NewData) \
{ \
NewData->size = (numRects); \
@@ -311,7 +311,7 @@ RegionCreate(rect, size)
{
register RegionPtr pReg;
size_t newSize;
- pReg = (RegionPtr)xalloc(sizeof(RegionRec));
+ pReg = (RegionPtr)malloc(sizeof(RegionRec));
if (!pReg)
return &RegionBrokenRegion;
if (rect)
@@ -324,7 +324,7 @@ RegionCreate(rect, size)
pReg->extents = RegionEmptyBox;
newSize = RegionSizeof(size);
if ((size > 1) && (newSize > 0) &&
- (pReg->data = xalloc(newSize)))
+ (pReg->data = malloc(newSize)))
{
pReg->data->size = size;
pReg->data->numRects = 0;
@@ -342,7 +342,7 @@ RegionDestroy(pReg)
good(pReg);
xfreeData(pReg);
if (pReg != &RegionBrokenRegion)
- xfree(pReg);
+ free(pReg);
}
Bool
@@ -367,7 +367,7 @@ RegionRectAlloc(
{
n++;
rgnSize = RegionSizeof(n);
- pRgn->data = (rgnSize > 0) ? xalloc(rgnSize) : NULL;
+ pRgn->data = (rgnSize > 0) ? malloc(rgnSize) : NULL;
if (!pRgn->data)
return RegionBreak (pRgn);
pRgn->data->numRects = 1;
@@ -376,7 +376,7 @@ RegionRectAlloc(
else if (!pRgn->data->size)
{
rgnSize = RegionSizeof(n);
- pRgn->data = (rgnSize > 0) ? xalloc(rgnSize) : NULL;
+ pRgn->data = (rgnSize > 0) ? malloc(rgnSize) : NULL;
if (!pRgn->data)
return RegionBreak (pRgn);
pRgn->data->numRects = 0;
@@ -391,7 +391,7 @@ RegionRectAlloc(
}
n += pRgn->data->numRects;
rgnSize = RegionSizeof(n);
- data = (rgnSize > 0) ? xrealloc(pRgn->data, rgnSize) : NULL;
+ data = (rgnSize > 0) ? realloc(pRgn->data, rgnSize) : NULL;
if (!data)
return RegionBreak (pRgn);
pRgn->data = data;
@@ -795,7 +795,7 @@ RegionOp(
}
if (oldData)
- xfree(oldData);
+ free(oldData);
if (!(numRects = newReg->data->numRects))
{
@@ -1235,7 +1235,7 @@ RegionValidate(badreg, pOverlap)
/* Set up the first region to be the first rectangle in badreg */
/* Note that step 2 code will never overflow the ri[0].reg rects array */
- ri = (RegionInfo *) xalloc(4 * sizeof(RegionInfo));
+ ri = (RegionInfo *) malloc(4 * sizeof(RegionInfo));
if (!ri)
return RegionBreak (badreg);
sizeRI = 4;
@@ -1299,7 +1299,7 @@ RegionValidate(badreg, pOverlap)
{
/* Oops, allocate space for new region information */
sizeRI <<= 1;
- rit = (RegionInfo *) xrealloc(ri, sizeRI * sizeof(RegionInfo));
+ rit = (RegionInfo *) realloc(ri, sizeRI * sizeof(RegionInfo));
if (!rit)
goto bail;
ri = rit;
@@ -1355,13 +1355,13 @@ NextRect: ;
numRI -= half;
}
*badreg = ri[0].reg;
- xfree(ri);
+ free(ri);
good(badreg);
return ret;
bail:
for (i = 0; i < numRI; i++)
xfreeData(&ri[i].reg);
- xfree (ri);
+ free (ri);
return RegionBreak (badreg);
}
@@ -1402,7 +1402,7 @@ RegionFromRects(nrects, prect, ctype)
return pRgn;
}
newSize = RegionSizeof(nrects);
- pData = newSize > 0 ? xalloc(newSize) : NULL;
+ pData = newSize > 0 ? malloc(newSize) : NULL;
if (!pData)
{
RegionBreak (pRgn);
@@ -1443,7 +1443,7 @@ RegionFromRects(nrects, prect, ctype)
}
else
{
- xfree (pData);
+ free (pData);
}
return pRgn;
}
@@ -1469,7 +1469,7 @@ miRegionDataCopy(
{
size_t newSize = RegionSizeof(src->data->numRects);
xfreeData(dst);
- dst->data = newSize > 0 ? xalloc(newSize) : NULL;
+ dst->data = newSize > 0 ? malloc(newSize) : NULL;
if (!dst->data)
return RegionBreak (dst);
}
diff --git a/nx-X11/programs/Xserver/dix/resource.c b/nx-X11/programs/Xserver/dix/resource.c
index b0edbb2aa..40a063891 100644
--- a/nx-X11/programs/Xserver/dix/resource.c
+++ b/nx-X11/programs/Xserver/dix/resource.c
@@ -178,7 +178,7 @@ CreateNewResourceType(DeleteType deleteFunc)
if (next & lastResourceClass)
return 0;
- funcs = (DeleteType *)xrealloc(DeleteFuncs,
+ funcs = (DeleteType *)realloc(DeleteFuncs,
(next + 1) * sizeof(DeleteType));
if (!funcs)
return 0;
@@ -186,7 +186,7 @@ CreateNewResourceType(DeleteType deleteFunc)
#ifdef XResExtension
{
Atom *newnames;
- newnames = xrealloc(ResourceNames, (next + 1) * sizeof(Atom));
+ newnames = realloc(ResourceNames, (next + 1) * sizeof(Atom));
if(!newnames)
return 0;
ResourceNames = newnames;
@@ -231,8 +231,8 @@ InitClientResources(ClientPtr client)
lastResourceClass = RC_LASTPREDEF;
TypeMask = RC_LASTPREDEF - 1;
if (DeleteFuncs)
- xfree(DeleteFuncs);
- DeleteFuncs = (DeleteType *)xalloc((lastResourceType + 1) *
+ free(DeleteFuncs);
+ DeleteFuncs = (DeleteType *)malloc((lastResourceType + 1) *
sizeof(DeleteType));
if (!DeleteFuncs)
return FALSE;
@@ -249,14 +249,14 @@ InitClientResources(ClientPtr client)
#ifdef XResExtension
if(ResourceNames)
- xfree(ResourceNames);
- ResourceNames = xalloc((lastResourceType + 1) * sizeof(Atom));
+ free(ResourceNames);
+ ResourceNames = malloc((lastResourceType + 1) * sizeof(Atom));
if(!ResourceNames)
return FALSE;
#endif
}
clientTable[i = client->index].resources =
- (ResourcePtr *)xalloc(INITBUCKETS*sizeof(ResourcePtr));
+ (ResourcePtr *)malloc(INITBUCKETS*sizeof(ResourcePtr));
if (!clientTable[i].resources)
return FALSE;
clientTable[i].buckets = INITBUCKETS;
@@ -442,7 +442,7 @@ AddResource(XID id, RESTYPE type, void * value)
(rrec->hashsize < MAXHASHSIZE))
RebuildTable(client);
head = &rrec->resources[Hash(client, id)];
- res = (ResourcePtr)xalloc(sizeof(ResourceRec));
+ res = (ResourcePtr)malloc(sizeof(ResourceRec));
if (!res)
{
(*DeleteFuncs[type & TypeMask])(value, id);
@@ -477,7 +477,7 @@ RebuildTable(int client)
tails = (ResourcePtr **)ALLOCATE_LOCAL(j * sizeof(ResourcePtr *));
if (!tails)
return;
- resources = (ResourcePtr *)xalloc(j * sizeof(ResourcePtr));
+ resources = (ResourcePtr *)malloc(j * sizeof(ResourcePtr));
if (!resources)
{
DEALLOCATE_LOCAL(tails);
@@ -505,7 +505,7 @@ RebuildTable(int client)
}
DEALLOCATE_LOCAL(tails);
clientTable[client].buckets *= 2;
- xfree(clientTable[client].resources);
+ free(clientTable[client].resources);
clientTable[client].resources = resources;
}
@@ -535,7 +535,7 @@ FreeResource(XID id, RESTYPE skipDeleteFuncType)
elements = --*eltptr;
if (rtype != skipDeleteFuncType)
(*DeleteFuncs[rtype & TypeMask])(res->value, res->id);
- xfree(res);
+ free(res);
if (*eltptr != elements)
prev = head; /* prev may no longer be valid */
gotOne = TRUE;
@@ -568,7 +568,7 @@ FreeResourceByType(XID id, RESTYPE type, Bool skipFree)
*prev = res->next;
if (!skipFree)
(*DeleteFuncs[type & TypeMask])(res->value, res->id);
- xfree(res);
+ free(res);
break;
}
else
@@ -723,7 +723,7 @@ FreeClientNeverRetainResources(ClientPtr client)
{
*prev = this->next;
(*DeleteFuncs[rtype & TypeMask])(this->value, this->id);
- xfree(this);
+ free(this);
}
else
prev = &this->next;
@@ -767,10 +767,10 @@ FreeClientResources(ClientPtr client)
RESTYPE rtype = this->type;
*head = this->next;
(*DeleteFuncs[rtype & TypeMask])(this->value, this->id);
- xfree(this);
+ free(this);
}
}
- xfree(clientTable[client->index].resources);
+ free(clientTable[client->index].resources);
clientTable[client->index].resources = NULL;
clientTable[client->index].buckets = 0;
}
diff --git a/nx-X11/programs/Xserver/dix/window.c b/nx-X11/programs/Xserver/dix/window.c
index 708b67aa1..f4c10f11d 100644
--- a/nx-X11/programs/Xserver/dix/window.c
+++ b/nx-X11/programs/Xserver/dix/window.c
@@ -344,7 +344,7 @@ AllocateWindow(ScreenPtr pScreen)
register unsigned size;
register int i;
- pWin = (WindowPtr)xalloc(pScreen->totalWindowSize);
+ pWin = (WindowPtr)malloc(pScreen->totalWindowSize);
if (pWin)
{
ppriv = (DevUnion *)(pWin + 1);
@@ -403,7 +403,7 @@ CreateRootWindow(ScreenPtr pScreen)
pWin->parent = NullWindow;
SetWindowToDefaults(pWin);
- pWin->optional = (WindowOptRec *) xalloc (sizeof (WindowOptRec));
+ pWin->optional = (WindowOptRec *) malloc (sizeof (WindowOptRec));
if (!pWin->optional)
return FALSE;
@@ -682,7 +682,7 @@ CreateWindow(Window wid, register WindowPtr pParent, int x, int y, unsigned w,
{
if (!MakeWindowOptional (pWin))
{
- xfree (pWin);
+ free (pWin);
*error = BadAlloc;
return NullWindow;
}
@@ -864,7 +864,7 @@ CrushTree(WindowPtr pWin)
(*UnrealizeWindow)(pChild);
}
FreeWindowResources(pChild);
- xfree(pChild);
+ free(pChild);
if ( (pChild = pSib) )
break;
pChild = pParent;
@@ -916,7 +916,7 @@ DeleteWindow(void * value, XID wid)
if (pWin->prevSib)
pWin->prevSib->nextSib = pWin->nextSib;
}
- xfree(pWin);
+ free(pWin);
return Success;
}
#endif /* NXAGENT_SERVER */
@@ -3147,7 +3147,7 @@ HandleSaveSet(register ClientPtr client)
MapWindow(pWin, client);
}
}
- xfree(client->saveSet);
+ free(client->saveSet);
client->numSaved = 0;
client->saveSet = (SaveSetElt *)NULL;
}
@@ -3445,12 +3445,12 @@ TileScreenSaver(int i, int kind)
cm.height=16;
cm.xhot=8;
cm.yhot=8;
- srcbits = (unsigned char *)xalloc( BitmapBytePad(32)*16);
- mskbits = (unsigned char *)xalloc( BitmapBytePad(32)*16);
+ srcbits = (unsigned char *)malloc( BitmapBytePad(32)*16);
+ mskbits = (unsigned char *)malloc( BitmapBytePad(32)*16);
if (!srcbits || !mskbits)
{
- xfree(srcbits);
- xfree(mskbits);
+ free(srcbits);
+ free(mskbits);
cursor = 0;
}
else
@@ -3471,8 +3471,8 @@ TileScreenSaver(int i, int kind)
}
else
{
- xfree (srcbits);
- xfree (mskbits);
+ free (srcbits);
+ free (mskbits);
}
}
@@ -3595,7 +3595,7 @@ MakeWindowOptional (register WindowPtr pWin)
if (pWin->optional)
return TRUE;
- optional = (WindowOptPtr) xalloc (sizeof (WindowOptRec));
+ optional = (WindowOptPtr) malloc (sizeof (WindowOptRec));
if (!optional)
return FALSE;
optional->dontPropagateMask = DontPropagateMasks[pWin->dontPropagate];
@@ -3660,7 +3660,7 @@ DisposeWindowOptional (register WindowPtr pWin)
}
else
pWin->cursorIsNone = TRUE;
- xfree (pWin->optional);
+ free (pWin->optional);
pWin->optional = NULL;
}