aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/dix
diff options
context:
space:
mode:
Diffstat (limited to 'nx-X11/programs/Xserver/dix')
-rw-r--r--nx-X11/programs/Xserver/dix/atom.c6
-rw-r--r--nx-X11/programs/Xserver/dix/colormap.c16
-rw-r--r--nx-X11/programs/Xserver/dix/cursor.c14
-rw-r--r--nx-X11/programs/Xserver/dix/devices.c36
-rw-r--r--nx-X11/programs/Xserver/dix/dispatch.c10
-rw-r--r--nx-X11/programs/Xserver/dix/dixfonts.c36
-rw-r--r--nx-X11/programs/Xserver/dix/dixutils.c8
-rw-r--r--nx-X11/programs/Xserver/dix/events.c6
-rw-r--r--nx-X11/programs/Xserver/dix/extension.c8
-rw-r--r--nx-X11/programs/Xserver/dix/gc.c12
-rw-r--r--nx-X11/programs/Xserver/dix/glyphcurs.c2
-rw-r--r--nx-X11/programs/Xserver/dix/grabs.c4
-rw-r--r--nx-X11/programs/Xserver/dix/main.c6
-rw-r--r--nx-X11/programs/Xserver/dix/pixmap.c4
-rw-r--r--nx-X11/programs/Xserver/dix/property.c6
-rw-r--r--nx-X11/programs/Xserver/dix/region.c14
-rw-r--r--nx-X11/programs/Xserver/dix/resource.c10
-rw-r--r--nx-X11/programs/Xserver/dix/window.c10
18 files changed, 104 insertions, 104 deletions
diff --git a/nx-X11/programs/Xserver/dix/atom.c b/nx-X11/programs/Xserver/dix/atom.c
index fdb1c18a2..227069bab 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,7 +118,7 @@ MakeAtom(const char *string, unsigned len, Bool makeit)
}
else
{
- nd->string = (char *) xalloc(len + 1);
+ nd->string = (char *) malloc(len + 1);
if (!nd->string) {
free(nd);
return BAD_RESOURCE;
@@ -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 39da0abd4..121877461 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,7 +303,7 @@ 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)
{
free(pmap);
@@ -349,7 +349,7 @@ 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)
{
free(pmap->clientPixelsRed[client]);
@@ -365,7 +365,7 @@ 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)
{
free(pmap->clientPixelsGreen[client]);
@@ -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);
@@ -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);
}
@@ -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);
}
@@ -2089,7 +2089,7 @@ 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++)
free(ppshared[z]);
diff --git a/nx-X11/programs/Xserver/dix/cursor.c b/nx-X11/programs/Xserver/dix/cursor.c
index 575ff1eb4..875e19480 100644
--- a/nx-X11/programs/Xserver/dix/cursor.c
+++ b/nx-X11/programs/Xserver/dix/cursor.c
@@ -174,7 +174,7 @@ 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)
{
free(psrcbits);
@@ -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)
@@ -334,7 +334,7 @@ AllocGlyphCursor(Font source, unsigned sourceChar, Font mask, unsigned maskChar,
}
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,9 +342,9 @@ 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;
}
@@ -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);
diff --git a/nx-X11/programs/Xserver/dix/devices.c b/nx-X11/programs/Xserver/dix/devices.c
index 314714152..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;
@@ -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);
@@ -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;
@@ -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,9 +716,9 @@ 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)
@@ -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,7 +997,7 @@ 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)
diff --git a/nx-X11/programs/Xserver/dix/dispatch.c b/nx-X11/programs/Xserver/dix/dispatch.c
index 9b9021d62..807fecd90 100644
--- a/nx-X11/programs/Xserver/dix/dispatch.c
+++ b/nx-X11/programs/Xserver/dix/dispatch.c
@@ -1021,7 +1021,7 @@ ProcSetSelectionOwner(register ClientPtr client)
Selection *newsels;
if (i == 0)
- newsels = (Selection *)xalloc(sizeof(Selection));
+ newsels = (Selection *)malloc(sizeof(Selection));
else
newsels = (Selection *)xrealloc(CurrentSelections,
(NumCurrentSelections + 1) * sizeof(Selection));
@@ -3084,10 +3084,10 @@ 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)
{
free(srcbits);
@@ -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,7 +3753,7 @@ 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);
diff --git a/nx-X11/programs/Xserver/dix/dixfonts.c b/nx-X11/programs/Xserver/dix/dixfonts.c
index 1a0352387..ef40c66f7 100644
--- a/nx-X11/programs/Xserver/dix/dixfonts.c
+++ b/nx-X11/programs/Xserver/dix/dixfonts.c
@@ -393,7 +393,7 @@ 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);
@@ -430,10 +430,10 @@ 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) {
@@ -445,7 +445,7 @@ 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) {
free(c->fontname);
free(c);
@@ -680,7 +680,7 @@ doListFontsAndAliases(ClientPtr client, LFclosurePtr c)
}
if (err == FontNameAlias) {
if (resolved) free(resolved);
- resolved = (char *) xalloc(resolvedlen + 1);
+ resolved = (char *) malloc(resolvedlen + 1);
if (resolved)
memmove(resolved, tmpname, resolvedlen + 1);
}
@@ -735,7 +735,7 @@ doListFontsAndAliases(ClientPtr client, LFclosurePtr c)
c->haveSaved = TRUE;
if (c->savedName)
free(c->savedName);
- c->savedName = (char *)xalloc(namelen + 1);
+ c->savedName = (char *)malloc(namelen + 1);
if (c->savedName)
memmove(c->savedName, name, namelen + 1);
c->savedNameLen = namelen;
@@ -853,10 +853,10 @@ 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) {
free(c);
return BadAlloc;
@@ -995,7 +995,7 @@ doListFontsWithInfo(ClientPtr client, LFWIclosurePtr c)
c->savedNumFonts = numFonts;
if (c->savedName)
free(c->savedName);
- c->savedName = (char *)xalloc(namelen + 1);
+ c->savedName = (char *)malloc(namelen + 1);
if (c->savedName)
memmove(c->savedName, name, namelen + 1);
aliascount = 20;
@@ -1127,10 +1127,10 @@ 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)
{
free(c);
@@ -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,7 +1327,7 @@ 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)
{
free(c);
@@ -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,7 +1527,7 @@ 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)
{
free(c);
@@ -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,13 +1745,13 @@ 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)
{
free(fpe);
diff --git a/nx-X11/programs/Xserver/dix/dixutils.c b/nx-X11/programs/Xserver/dix/dixutils.c
index 1c6305684..84eb63f14 100644
--- a/nx-X11/programs/Xserver/dix/dixutils.c
+++ b/nx-X11/programs/Xserver/dix/dixutils.c
@@ -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;
@@ -735,7 +735,7 @@ _AddCallback(
{
CallbackPtr cbr;
- cbr = (CallbackPtr) xalloc(sizeof(CallbackRec));
+ cbr = (CallbackPtr) malloc(sizeof(CallbackRec));
if (!cbr)
return FALSE;
cbr->proc = callback;
@@ -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;
diff --git a/nx-X11/programs/Xserver/dix/events.c b/nx-X11/programs/Xserver/dix/events.c
index ba0c5d847..97cd13b5e 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;
@@ -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;
@@ -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");
}
diff --git a/nx-X11/programs/Xserver/dix/extension.c b/nx-X11/programs/Xserver/dix/extension.c
index 4f06c0af4..9c25c3db8 100644
--- a/nx-X11/programs/Xserver/dix/extension.c
+++ b/nx-X11/programs/Xserver/dix/extension.c
@@ -95,10 +95,10 @@ 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)
@@ -164,7 +164,7 @@ Bool AddExtensionAlias(char *alias, ExtensionEntry *ext)
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);
@@ -438,7 +438,7 @@ 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)
diff --git a/nx-X11/programs/Xserver/dix/gc.c b/nx-X11/programs/Xserver/dix/gc.c
index 595d8ab74..9566bb8f7 100644
--- a/nx-X11/programs/Xserver/dix/gc.c
+++ b/nx-X11/programs/Xserver/dix/gc.c
@@ -466,7 +466,7 @@ 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)
@@ -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);
@@ -848,7 +848,7 @@ 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)
{
@@ -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;
@@ -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 c8b71db4e..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 */
diff --git a/nx-X11/programs/Xserver/dix/grabs.c b/nx-X11/programs/Xserver/dix/grabs.c
index 7fd9ad096..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);
@@ -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)
diff --git a/nx-X11/programs/Xserver/dix/main.c b/nx-X11/programs/Xserver/dix/main.c
index 9d0197e3d..05f6dd19b 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);
@@ -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;
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/property.c b/nx-X11/programs/Xserver/dix/property.c
index 4476141e5..28ce1355c 100644
--- a/nx-X11/programs/Xserver/dix/property.c
+++ b/nx-X11/programs/Xserver/dix/property.c
@@ -284,10 +284,10 @@ 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)
{
free(pProp);
@@ -347,7 +347,7 @@ 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,
diff --git a/nx-X11/programs/Xserver/dix/region.c b/nx-X11/programs/Xserver/dix/region.c
index 4c2bc4695..df7c1fc16 100644
--- a/nx-X11/programs/Xserver/dix/region.c
+++ b/nx-X11/programs/Xserver/dix/region.c
@@ -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;
@@ -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;
@@ -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;
@@ -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);
@@ -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 0c5b6dd29..905dafc24 100644
--- a/nx-X11/programs/Xserver/dix/resource.c
+++ b/nx-X11/programs/Xserver/dix/resource.c
@@ -232,7 +232,7 @@ InitClientResources(ClientPtr client)
TypeMask = RC_LASTPREDEF - 1;
if (DeleteFuncs)
free(DeleteFuncs);
- DeleteFuncs = (DeleteType *)xalloc((lastResourceType + 1) *
+ DeleteFuncs = (DeleteType *)malloc((lastResourceType + 1) *
sizeof(DeleteType));
if (!DeleteFuncs)
return FALSE;
@@ -250,13 +250,13 @@ InitClientResources(ClientPtr client)
#ifdef XResExtension
if(ResourceNames)
free(ResourceNames);
- ResourceNames = xalloc((lastResourceType + 1) * sizeof(Atom));
+ 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);
diff --git a/nx-X11/programs/Xserver/dix/window.c b/nx-X11/programs/Xserver/dix/window.c
index 945dde7cf..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;
@@ -3445,8 +3445,8 @@ 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)
{
free(srcbits);
@@ -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];