diff options
author | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2016-06-26 01:38:22 +0200 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2016-07-02 14:05:30 +0200 |
commit | acf87144d019f18e646501657d9082c6eba77f54 (patch) | |
tree | dadb838cd54010836230358a4a5805bb0696b5bb /nx-X11/programs/Xserver/dix | |
parent | 279d37127db241a9ee685f6b671f51aa21a972ea (diff) | |
download | nx-libs-acf87144d019f18e646501657d9082c6eba77f54.tar.gz nx-libs-acf87144d019f18e646501657d9082c6eba77f54.tar.bz2 nx-libs-acf87144d019f18e646501657d9082c6eba77f54.zip |
nx-X11/programs/Xserver: Drop {X,x}free() macros, use free() instead.
Fixes ArcticaProject/nx-libs#105
Diffstat (limited to 'nx-X11/programs/Xserver/dix')
-rw-r--r-- | nx-X11/programs/Xserver/dix/atom.c | 12 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/dix/colormap.c | 50 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/dix/cursor.c | 28 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/dix/devices.c | 56 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/dix/dispatch.c | 12 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/dix/dixfonts.c | 92 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/dix/dixutils.c | 22 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/dix/events.c | 8 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/dix/extension.c | 22 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/dix/gc.c | 14 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/dix/glyphcurs.c | 2 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/dix/grabs.c | 10 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/dix/main.c | 18 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/dix/privates.c | 2 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/dix/property.c | 16 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/dix/region.c | 12 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/dix/resource.c | 16 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/dix/window.c | 18 |
18 files changed, 205 insertions, 205 deletions
diff --git a/nx-X11/programs/Xserver/dix/atom.c b/nx-X11/programs/Xserver/dix/atom.c index 29e60be03..fdb1c18a2 100644 --- a/nx-X11/programs/Xserver/dix/atom.c +++ b/nx-X11/programs/Xserver/dix/atom.c @@ -120,7 +120,7 @@ MakeAtom(const char *string, unsigned len, Bool makeit) { nd->string = (char *) xalloc(len + 1); if (!nd->string) { - xfree(nd); + free(nd); return BAD_RESOURCE; } strncpy(nd->string, string, (int)len); @@ -133,8 +133,8 @@ MakeAtom(const char *string, unsigned len, Bool makeit) 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; } diff --git a/nx-X11/programs/Xserver/dix/colormap.c b/nx-X11/programs/Xserver/dix/colormap.c index 4acfdc1bb..39da0abd4 100644 --- a/nx-X11/programs/Xserver/dix/colormap.c +++ b/nx-X11/programs/Xserver/dix/colormap.c @@ -306,7 +306,7 @@ CreateColormap (Colormap mid, ScreenPtr pScreen, VisualPtr pVisual, ppix = (Pixel *)xalloc(size * sizeof(Pixel)); if (!ppix) { - xfree(pmap); + free(pmap); return (BadAlloc); } pmap->clientPixelsRed[client] = ppix; @@ -352,8 +352,8 @@ CreateColormap (Colormap mid, ScreenPtr pScreen, VisualPtr pVisual, ppix = (Pixel *) xalloc(size * sizeof(Pixel)); if (!ppix) { - xfree(pmap->clientPixelsRed[client]); - xfree(pmap); + free(pmap->clientPixelsRed[client]); + free(pmap); return(BadAlloc); } pmap->clientPixelsGreen[client] = ppix; @@ -368,9 +368,9 @@ CreateColormap (Colormap mid, ScreenPtr pScreen, VisualPtr pVisual, ppix = (Pixel *) xalloc(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; @@ -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; @@ -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; } @@ -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); } @@ -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); } @@ -2092,7 +2092,7 @@ AllocShared (ColormapPtr pmap, Pixel *ppix, int c, int r, int g, int b, if (!(ppshared[z] = (SHAREDCOLOR *)xalloc(sizeof(SHAREDCOLOR)))) { for (z++ ; z < npixShared; z++) - xfree(ppshared[z]); + free(ppshared[z]); return FALSE; } } @@ -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) diff --git a/nx-X11/programs/Xserver/dix/cursor.c b/nx-X11/programs/Xserver/dix/cursor.c index 1e1dba36b..575ff1eb4 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); } @@ -177,8 +177,8 @@ AllocCursorARGB(unsigned char *psrcbits, unsigned char *pmaskbits, CARD32 *argb, pCurs = (CursorPtr)xalloc(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; } } @@ -329,7 +329,7 @@ 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) @@ -350,9 +350,9 @@ AllocGlyphCursor(Font source, unsigned sourceChar, Font mask, unsigned maskChar, } if (!bits) { - xfree(pCurs); - xfree(mskbits); - xfree(srcbits); + free(pCurs); + free(mskbits); + free(srcbits); return BadAlloc; } bits->source = srcbits; @@ -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..314714152 100644 --- a/nx-X11/programs/Xserver/dix/devices.c +++ b/nx-X11/programs/Xserver/dix/devices.c @@ -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 @@ -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; @@ -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; @@ -722,10 +722,10 @@ InitStringFeedbackClassDeviceStruct ( 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++) @@ -1001,7 +1001,7 @@ ProcSetModifierMapping(ClientPtr client) 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..9b9021d62 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; } @@ -3090,7 +3090,7 @@ ProcCreateCursor (register ClientPtr client) mskbits = (unsigned char *)xalloc(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--; @@ -3760,7 +3760,7 @@ ClientPtr NextAvailableClient(void * 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..1a0352387 100644 --- a/nx-X11/programs/Xserver/dix/dixfonts.c +++ b/nx-X11/programs/Xserver/dix/dixfonts.c @@ -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); } } @@ -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 */ @@ -397,7 +397,7 @@ OpenFont(ClientPtr client, XID fid, Mask flags, unsigned lenfname, char *pfontna 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; @@ -437,7 +437,7 @@ OpenFont(ClientPtr client, XID fid, Mask flags, unsigned lenfname, char *pfontna c->origFontName = pfontname; c->origFontNameLen = lenfname; if (!c->fontname) { - xfree(c); + free(c); return BadAlloc; } /* @@ -447,8 +447,8 @@ OpenFont(ClientPtr client, XID fid, Mask flags, unsigned lenfname, char *pfontna c->fpe_list = (FontPathElementPtr *) xalloc(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,7 +679,7 @@ doListFontsAndAliases(ClientPtr client, LFclosurePtr c) return TRUE; } if (err == FontNameAlias) { - if (resolved) xfree(resolved); + if (resolved) free(resolved); resolved = (char *) xalloc(resolvedlen + 1); if (resolved) memmove(resolved, tmpname, resolvedlen + 1); @@ -734,7 +734,7 @@ doListFontsAndAliases(ClientPtr client, LFclosurePtr c) c->saved = c->current; c->haveSaved = TRUE; if (c->savedName) - xfree(c->savedName); + free(c->savedName); c->savedName = (char *)xalloc(namelen + 1); if (c->savedName) memmove(c->savedName, name, namelen + 1); @@ -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; } @@ -858,14 +858,14 @@ ListFonts(ClientPtr client, unsigned char *pattern, unsigned length, c->fpe_list = (FontPathElementPtr *) xalloc(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,7 +994,7 @@ doListFontsWithInfo(ClientPtr client, LFWIclosurePtr c) c->haveSaved = TRUE; c->savedNumFonts = numFonts; if (c->savedName) - xfree(c->savedName); + free(c->savedName); c->savedName = (char *)xalloc(namelen + 1); if (c->savedName) memmove(c->savedName, name, namelen + 1); @@ -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 */ @@ -1133,7 +1133,7 @@ StartListFontsWithInfo(ClientPtr client, int length, unsigned char *pattern, xalloc(sizeof(FontPathElementPtr) * num_fpes); if (!c->fpe_list) { - xfree(c); + free(c); goto badAlloc; } memmove(c->current.pattern, pattern, length); @@ -1330,7 +1330,7 @@ doPolyText(ClientPtr client, register PTclosurePtr c) c->data = (unsigned char *)xalloc(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; } @@ -1530,7 +1530,7 @@ doImageText(ClientPtr client, register ITclosurePtr c) data = (unsigned char *)xalloc(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 @@ -1754,7 +1754,7 @@ SetFontPathElements(int npaths, unsigned char *paths, int *bad, Bool persist) fpe->name = (char *) xalloc(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); } @@ -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..1c6305684 100644 --- a/nx-X11/programs/Xserver/dix/dixutils.c +++ b/nx-X11/programs/Xserver/dix/dixutils.c @@ -377,7 +377,7 @@ AlterSaveSetForClient(ClientPtr client, WindowPtr pWin, unsigned mode, } else { - xfree(client->saveSet); + free(client->saveSet); client->saveSet = (SaveSetElt *)NULL; } client->numSaved = numnow; @@ -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 { @@ -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 @@ -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; } @@ -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..ba0c5d847 100644 --- a/nx-X11/programs/Xserver/dix/events.c +++ b/nx-X11/programs/Xserver/dix/events.c @@ -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) @@ -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); } @@ -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..4f06c0af4 100644 --- a/nx-X11/programs/Xserver/dix/extension.c +++ b/nx-X11/programs/Xserver/dix/extension.c @@ -103,7 +103,7 @@ AddExtension(char *name, int NumEvents, int NumErrors, ext->aliases = (char **)NULL; if (!ext->name) { - xfree(ext); + free(ext); return((ExtensionEntry *) NULL); } strcpy(ext->name, name); @@ -112,8 +112,8 @@ AddExtension(char *name, int NumEvents, int NumErrors, (i + 1) * sizeof(ExtensionEntry *)); if (!newexts) { - xfree(ext->name); - xfree(ext); + free(ext->name); + free(ext); return((ExtensionEntry *) NULL); } NumExtensions++; @@ -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; } } @@ -446,7 +446,7 @@ RegisterScreenProc(char *name, ScreenPtr pScreen, ExtensionLookupProc proc) 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..595d8ab74 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; } @@ -470,7 +470,7 @@ dixChangeGC(ClientPtr client, register GC *pGC, register BITS32 mask, CARD32 *pC if (dash) { if (pGC->dash != DefaultDash) - xfree(pGC->dash); + free(pGC->dash); pGC->numInDashList = 2; pGC->dash = dash; dash[0] = newdash; @@ -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; } @@ -853,7 +853,7 @@ CopyGC(register GC *pgcSrc, register GC *pgcDst, register BITS32 mask) 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); } @@ -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) diff --git a/nx-X11/programs/Xserver/dix/glyphcurs.c b/nx-X11/programs/Xserver/dix/glyphcurs.c index f715a327f..c8b71db4e 100644 --- a/nx-X11/programs/Xserver/dix/glyphcurs.c +++ b/nx-X11/programs/Xserver/dix/glyphcurs.c @@ -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..7fd9ad096 100644 --- a/nx-X11/programs/Xserver/dix/grabs.c +++ b/nx-X11/programs/Xserver/dix/grabs.c @@ -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 @@ -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..9d0197e3d 100644 --- a/nx-X11/programs/Xserver/dix/main.c +++ b/nx-X11/programs/Xserver/dix/main.c @@ -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); @@ -621,7 +621,7 @@ CreateConnectionBlock() pBuf = (char *)xrealloc(ConnectionInfo, lenofblock); if (!pBuf) { - xfree(ConnectionInfo); + free(ConnectionInfo); return FALSE; } ConnectionInfo = pBuf; @@ -697,7 +697,7 @@ AddScreen( 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/privates.c b/nx-X11/programs/Xserver/dix/privates.c index d08883d1d..3455fb21c 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); diff --git a/nx-X11/programs/Xserver/dix/property.c b/nx-X11/programs/Xserver/dix/property.c index b3b650dda..4476141e5 100644 --- a/nx-X11/programs/Xserver/dix/property.c +++ b/nx-X11/programs/Xserver/dix/property.c @@ -290,7 +290,7 @@ ChangeWindowProperty(WindowPtr pWin, Atom property, Atom type, int format, data = (void *)xalloc(totalSize); if (!data && len) { - xfree(pProp); + free(pProp); return(BadAlloc); } pProp->propertyName = property; @@ -353,7 +353,7 @@ ChangeWindowProperty(WindowPtr pWin, Atom property, Atom type, int format, 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..4c2bc4695 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)) \ @@ -342,7 +342,7 @@ RegionDestroy(pReg) good(pReg); xfreeData(pReg); if (pReg != &RegionBrokenRegion) - xfree(pReg); + free(pReg); } Bool @@ -795,7 +795,7 @@ RegionOp( } if (oldData) - xfree(oldData); + free(oldData); if (!(numRects = newReg->data->numRects)) { @@ -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); } @@ -1443,7 +1443,7 @@ RegionFromRects(nrects, prect, ctype) } else { - xfree (pData); + free (pData); } return pRgn; } diff --git a/nx-X11/programs/Xserver/dix/resource.c b/nx-X11/programs/Xserver/dix/resource.c index b0edbb2aa..0c5b6dd29 100644 --- a/nx-X11/programs/Xserver/dix/resource.c +++ b/nx-X11/programs/Xserver/dix/resource.c @@ -231,7 +231,7 @@ InitClientResources(ClientPtr client) lastResourceClass = RC_LASTPREDEF; TypeMask = RC_LASTPREDEF - 1; if (DeleteFuncs) - xfree(DeleteFuncs); + free(DeleteFuncs); DeleteFuncs = (DeleteType *)xalloc((lastResourceType + 1) * sizeof(DeleteType)); if (!DeleteFuncs) @@ -249,7 +249,7 @@ InitClientResources(ClientPtr client) #ifdef XResExtension if(ResourceNames) - xfree(ResourceNames); + free(ResourceNames); ResourceNames = xalloc((lastResourceType + 1) * sizeof(Atom)); if(!ResourceNames) return FALSE; @@ -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..945dde7cf 100644 --- a/nx-X11/programs/Xserver/dix/window.c +++ b/nx-X11/programs/Xserver/dix/window.c @@ -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; } @@ -3449,8 +3449,8 @@ TileScreenSaver(int i, int kind) mskbits = (unsigned char *)xalloc( 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); } } @@ -3660,7 +3660,7 @@ DisposeWindowOptional (register WindowPtr pWin) } else pWin->cursorIsNone = TRUE; - xfree (pWin->optional); + free (pWin->optional); pWin->optional = NULL; } |