diff options
Diffstat (limited to 'nx-X11/programs/Xserver/dix')
-rw-r--r-- | nx-X11/programs/Xserver/dix/atom.c | 2 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/dix/colormap.c | 24 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/dix/dispatch.c | 2 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/dix/dixfonts.c | 8 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/dix/dixutils.c | 6 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/dix/events.c | 8 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/dix/extension.c | 6 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/dix/main.c | 2 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/dix/privates.c | 14 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/dix/property.c | 4 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/dix/region.c | 6 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/dix/resource.c | 4 |
12 files changed, 43 insertions, 43 deletions
diff --git a/nx-X11/programs/Xserver/dix/atom.c b/nx-X11/programs/Xserver/dix/atom.c index 227069bab..6a1f17854 100644 --- a/nx-X11/programs/Xserver/dix/atom.c +++ b/nx-X11/programs/Xserver/dix/atom.c @@ -129,7 +129,7 @@ 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) diff --git a/nx-X11/programs/Xserver/dix/colormap.c b/nx-X11/programs/Xserver/dix/colormap.c index 121877461..8129e9c3d 100644 --- a/nx-X11/programs/Xserver/dix/colormap.c +++ b/nx-X11/programs/Xserver/dix/colormap.c @@ -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); @@ -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--; @@ -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) { @@ -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; @@ -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/dispatch.c b/nx-X11/programs/Xserver/dix/dispatch.c index 807fecd90..ed908d03f 100644 --- a/nx-X11/programs/Xserver/dix/dispatch.c +++ b/nx-X11/programs/Xserver/dix/dispatch.c @@ -1023,7 +1023,7 @@ ProcSetSelectionOwner(register ClientPtr client) if (i == 0) newsels = (Selection *)malloc(sizeof(Selection)); else - newsels = (Selection *)xrealloc(CurrentSelections, + newsels = (Selection *)realloc(CurrentSelections, (NumCurrentSelections + 1) * sizeof(Selection)); if (!newsels) return BadAlloc; diff --git a/nx-X11/programs/Xserver/dix/dixfonts.c b/nx-X11/programs/Xserver/dix/dixfonts.c index ef40c66f7..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; @@ -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; @@ -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; @@ -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; diff --git a/nx-X11/programs/Xserver/dix/dixutils.c b/nx-X11/programs/Xserver/dix/dixutils.c index 84eb63f14..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,7 +371,7 @@ 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; } @@ -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; diff --git a/nx-X11/programs/Xserver/dix/events.c b/nx-X11/programs/Xserver/dix/events.c index 97cd13b5e..676640f01 100644 --- a/nx-X11/programs/Xserver/dix/events.c +++ b/nx-X11/programs/Xserver/dix/events.c @@ -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 */ } @@ -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 */ diff --git a/nx-X11/programs/Xserver/dix/extension.c b/nx-X11/programs/Xserver/dix/extension.c index 9c25c3db8..b0859757b 100644 --- a/nx-X11/programs/Xserver/dix/extension.c +++ b/nx-X11/programs/Xserver/dix/extension.c @@ -108,7 +108,7 @@ AddExtension(char *name, int NumEvents, int NumErrors, } strcpy(ext->name, name); i = NumExtensions; - newexts = (ExtensionEntry **) xrealloc(extensions, + newexts = (ExtensionEntry **) realloc(extensions, (i + 1) * sizeof(ExtensionEntry *)); if (!newexts) { @@ -159,7 +159,7 @@ 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; @@ -442,7 +442,7 @@ RegisterScreenProc(char *name, ScreenPtr pScreen, ExtensionLookupProc proc) if (!newname) return FALSE; procEntry = (ProcEntryPtr) - xrealloc(spentry->procList, + realloc(spentry->procList, sizeof(ProcEntryRec) * (spentry->num+1)); if (!procEntry) { diff --git a/nx-X11/programs/Xserver/dix/main.c b/nx-X11/programs/Xserver/dix/main.c index 05f6dd19b..a95b8b4a9 100644 --- a/nx-X11/programs/Xserver/dix/main.c +++ b/nx-X11/programs/Xserver/dix/main.c @@ -618,7 +618,7 @@ CreateConnectionBlock() { lenofblock += sizeof(xDepth) + (pDepth->numVids * sizeof(xVisualType)); - pBuf = (char *)xrealloc(ConnectionInfo, lenofblock); + pBuf = (char *)realloc(ConnectionInfo, lenofblock); if (!pBuf) { free(ConnectionInfo); diff --git a/nx-X11/programs/Xserver/dix/privates.c b/nx-X11/programs/Xserver/dix/privates.c index 3455fb21c..15a9dff4d 100644 --- a/nx-X11/programs/Xserver/dix/privates.c +++ b/nx-X11/programs/Xserver/dix/privates.c @@ -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 28ce1355c..7ed66b60a 100644 --- a/nx-X11/programs/Xserver/dix/property.c +++ b/nx-X11/programs/Xserver/dix/property.c @@ -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); diff --git a/nx-X11/programs/Xserver/dix/region.c b/nx-X11/programs/Xserver/dix/region.c index df7c1fc16..f2b7224f8 100644 --- a/nx-X11/programs/Xserver/dix/region.c +++ b/nx-X11/programs/Xserver/dix/region.c @@ -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); \ @@ -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; @@ -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; diff --git a/nx-X11/programs/Xserver/dix/resource.c b/nx-X11/programs/Xserver/dix/resource.c index 905dafc24..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; |