diff options
Diffstat (limited to 'nx-X11/programs/Xserver/hw/nxagent')
29 files changed, 301 insertions, 301 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Args.c b/nx-X11/programs/Xserver/hw/nxagent/Args.c index 6e6d61772..895de1ef8 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Args.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Args.c @@ -355,14 +355,14 @@ int ddxProcessArgument(int argc, char *argv[], int i) if (nxagentOptionFile != NULL) { - xfree(nxagentOptionFile); + free(nxagentOptionFile); nxagentOptionFile = NULL; } if ((size = strlen(argv[i])) < 1024) { - if ((nxagentOptionFile = xalloc(size + 1)) == NULL) + if ((nxagentOptionFile = malloc(size + 1)) == NULL) { FatalError("malloc failed"); } @@ -719,14 +719,14 @@ int ddxProcessArgument(int argc, char *argv[], int i) if (nxagentKeyboard != NULL) { - xfree(nxagentKeyboard); + free(nxagentKeyboard); nxagentKeyboard = NULL; } if ((size = strlen(argv[i])) < 256) { - if ((nxagentKeyboard = xalloc(size + 1)) == NULL) + if ((nxagentKeyboard = malloc(size + 1)) == NULL) { FatalError("malloc failed"); } @@ -1537,7 +1537,7 @@ void nxagentProcessOptionsFile() goto nxagentProcessOptionsFileClose; } - if ((data = xalloc(sizeOfFile + 1)) == NULL) + if ((data = malloc(sizeOfFile + 1)) == NULL) { fprintf(stderr, "Warning: Memory allocation failed processing file '%s'.\n", validateString(nxagentOptionFile)); @@ -1591,7 +1591,7 @@ nxagentProcessOptionsFileFree: if (data != NULL) { - Xfree(data); + free(data); } nxagentProcessOptionsFileClose: diff --git a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c index a0dfbf602..2fb53d440 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c @@ -745,7 +745,7 @@ void nxagentCollectPropertyEvent(int resource) if (pszReturnData != NULL) { - Xfree(pszReturnData); + free(pszReturnData); } return; @@ -787,7 +787,7 @@ void nxagentCollectPropertyEvent(int resource) if (pszReturnData != NULL) { - Xfree(pszReturnData); + free(pszReturnData); } return; @@ -1487,11 +1487,11 @@ int nxagentInitClipboard(WindowPtr pWin) if (lastSelectionOwner != NULL) { - xfree(lastSelectionOwner); + free(lastSelectionOwner); lastSelectionOwner = NULL; } - lastSelectionOwner = (SelectionOwner *) xalloc(2 * sizeof(SelectionOwner)); + lastSelectionOwner = (SelectionOwner *) malloc(2 * sizeof(SelectionOwner)); if (lastSelectionOwner == NULL) { diff --git a/nx-X11/programs/Xserver/hw/nxagent/Colormap.c b/nx-X11/programs/Xserver/hw/nxagent/Colormap.c index fe3b6ce1d..3905e289b 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Colormap.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Colormap.c @@ -77,7 +77,7 @@ Bool nxagentCreateColormap(ColormapPtr pCmap) pVisual = pCmap->pVisual; ncolors = pVisual->ColormapEntries; - pCmap->devPriv = (void *)xalloc(sizeof(nxagentPrivColormap)); + pCmap->devPriv = (void *)malloc(sizeof(nxagentPrivColormap)); if (((visual = nxagentVisual(pVisual))) == NULL) { @@ -103,7 +103,7 @@ Bool nxagentCreateColormap(ColormapPtr pCmap) switch (class) { case StaticGray: /* read only */ - colors = (XColor *)xalloc(ncolors * sizeof(XColor)); + colors = (XColor *)malloc(ncolors * sizeof(XColor)); for (i = 0; i < ncolors; i++) colors[i].pixel = i; XQueryColors(nxagentDisplay, nxagentColormap(pCmap), colors, ncolors); @@ -112,11 +112,11 @@ Bool nxagentCreateColormap(ColormapPtr pCmap) pCmap->red[i].co.local.green = colors[i].red; pCmap->red[i].co.local.blue = colors[i].red; } - xfree(colors); + free(colors); break; case StaticColor: /* read only */ - colors = (XColor *)xalloc(ncolors * sizeof(XColor)); + colors = (XColor *)malloc(ncolors * sizeof(XColor)); for (i = 0; i < ncolors; i++) colors[i].pixel = i; XQueryColors(nxagentDisplay, nxagentColormap(pCmap), colors, ncolors); @@ -125,11 +125,11 @@ Bool nxagentCreateColormap(ColormapPtr pCmap) pCmap->red[i].co.local.green = colors[i].green; pCmap->red[i].co.local.blue = colors[i].blue; } - xfree(colors); + free(colors); break; case TrueColor: /* read only */ - colors = (XColor *)xalloc(ncolors * sizeof(XColor)); + colors = (XColor *)malloc(ncolors * sizeof(XColor)); red = green = blue = 0L; redInc = lowbit(pVisual->redMask); greenInc = lowbit(pVisual->greenMask); @@ -149,7 +149,7 @@ Bool nxagentCreateColormap(ColormapPtr pCmap) pCmap->green[i].co.local.green = colors[i].green; pCmap->blue[i].co.local.blue = colors[i].blue; } - xfree(colors); + free(colors); break; case GrayScale: /* read and write */ @@ -168,7 +168,7 @@ Bool nxagentCreateColormap(ColormapPtr pCmap) void nxagentDestroyColormap(ColormapPtr pCmap) { XFreeColormap(nxagentDisplay, nxagentColormap(pCmap)); - xfree(pCmap->devPriv); + free(pCmap->devPriv); } #define SEARCH_PREDICATE \ @@ -229,13 +229,13 @@ void nxagentSetInstalledColormapWindows(ScreenPtr pScreen) nxagentInstalledColormapWindows icws; int numWindows; - icws.cmapIDs = (Colormap *)xalloc(pScreen->maxInstalledCmaps * + icws.cmapIDs = (Colormap *)malloc(pScreen->maxInstalledCmaps * sizeof(Colormap)); icws.numCmapIDs = nxagentListInstalledColormaps(pScreen, icws.cmapIDs); icws.numWindows = 0; WalkTree(pScreen, nxagentCountInstalledColormapWindows, (void *)&icws); if (icws.numWindows) { - icws.windows = (Window *)xalloc((icws.numWindows + 1) * sizeof(Window)); + icws.windows = (Window *)malloc((icws.numWindows + 1) * sizeof(Window)); icws.index = 0; WalkTree(pScreen, nxagentGetInstalledColormapWindows, (void *)&icws); icws.windows[icws.numWindows] = nxagentDefaultWindows[pScreen->myNum]; @@ -246,22 +246,22 @@ void nxagentSetInstalledColormapWindows(ScreenPtr pScreen) numWindows = 0; } - xfree(icws.cmapIDs); + free(icws.cmapIDs); if (!nxagentSameInstalledColormapWindows(icws.windows, icws.numWindows)) { if (nxagentOldInstalledColormapWindows) - xfree(nxagentOldInstalledColormapWindows); + free(nxagentOldInstalledColormapWindows); #ifdef _XSERVER64 { int i; - Window64 *windows = (Window64 *)xalloc(numWindows * sizeof(Window64)); + Window64 *windows = (Window64 *)malloc(numWindows * sizeof(Window64)); for(i = 0; i < numWindows; ++i) windows[i] = icws.windows[i]; XSetWMColormapWindows(nxagentDisplay, nxagentDefaultWindows[pScreen->myNum], windows, numWindows); - xfree(windows); + free(windows); } #else XSetWMColormapWindows(nxagentDisplay, nxagentDefaultWindows[pScreen->myNum], @@ -310,13 +310,13 @@ void nxagentSetInstalledColormapWindows(ScreenPtr pScreen) #endif /* DUMB_WINDOW_MANAGERS */ } else - if (icws.windows) xfree(icws.windows); + if (icws.windows) free(icws.windows); } void nxagentSetScreenSaverColormapWindow(ScreenPtr pScreen) { if (nxagentOldInstalledColormapWindows) - xfree(nxagentOldInstalledColormapWindows); + free(nxagentOldInstalledColormapWindows); #ifdef _XSERVER64 { @@ -437,7 +437,7 @@ void nxagentStoreColors(ColormapPtr pCmap, int nColors, xColorItem *pColors) #ifdef _XSERVER64 { int i; - XColor *pColors64 = (XColor *)xalloc(nColors * sizeof(XColor) ); + XColor *pColors64 = (XColor *)malloc(nColors * sizeof(XColor) ); for(i = 0; i < nColors; ++i) { @@ -448,7 +448,7 @@ void nxagentStoreColors(ColormapPtr pCmap, int nColors, xColorItem *pColors) pColors64[i].flags = pColors[i].flags; } XStoreColors(nxagentDisplay, nxagentColormap(pCmap), pColors64, nColors); - xfree(pColors64); + free(pColors64); } #else XStoreColors(nxagentDisplay, nxagentColormap(pCmap), diff --git a/nx-X11/programs/Xserver/hw/nxagent/Cursor.c b/nx-X11/programs/Xserver/hw/nxagent/Cursor.c index 62095d5b3..932f7495f 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Cursor.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Cursor.c @@ -231,7 +231,7 @@ Bool nxagentRealizeCursor(ScreenPtr pScreen, CursorPtr pCursor) bg_color.green = pCursor->backGreen; bg_color.blue = pCursor->backBlue; - pCursor->devPriv[pScreen->myNum] = (void *) xalloc(sizeof(nxagentPrivCursor)); + pCursor->devPriv[pScreen->myNum] = (void *) malloc(sizeof(nxagentPrivCursor)); nxagentCursorPriv(pCursor, pScreen)->cursor = XCreatePixmapCursor(nxagentDisplay, source, mask, &fg_color, @@ -267,7 +267,7 @@ Bool nxagentUnrealizeCursor(ScreenPtr pScreen, CursorPtr pCursor) nxagentCursor(pCursor, pScreen) = None; } - xfree(nxagentCursorPriv(pCursor, pScreen)); + free(nxagentCursorPriv(pCursor, pScreen)); return True; } @@ -366,7 +366,7 @@ void nxagentReconnectCursor(void * p0, XID x1, void * p2) } else { - xfree(nxagentCursorPriv(pCursor, nxagentDefaultScreen)); + free(nxagentCursorPriv(pCursor, nxagentDefaultScreen)); if (!nxagentRealizeCursor(nxagentDefaultScreen, pCursor)) { fprintf(stderr, "nxagentReconnectCursor: nxagentRealizeCursor failed\n"); diff --git a/nx-X11/programs/Xserver/hw/nxagent/Display.c b/nx-X11/programs/Xserver/hw/nxagent/Display.c index 31ea7c2a0..15d1d2206 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Display.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Display.c @@ -1272,7 +1272,7 @@ Reply Total Cached Bits In Bits Out Bits/Reply Ratio nxagentInitVisuals(); nxagentNumDefaultColormaps = nxagentNumVisuals; - nxagentDefaultColormaps = (Colormap *)xalloc(nxagentNumDefaultColormaps * + nxagentDefaultColormaps = (Colormap *)malloc(nxagentNumDefaultColormaps * sizeof(Colormap)); for (i = 0; i < nxagentNumDefaultColormaps; i++) @@ -1651,7 +1651,7 @@ void nxagentInitPixmapFormats() XXX: Some X server doesn't list 1 among available depths... */ - nxagentPixmapFormats = xalloc((nxagentNumDepths + 1) * sizeof(XPixmapFormatValues)); + nxagentPixmapFormats = malloc((nxagentNumDepths + 1) * sizeof(XPixmapFormatValues)); for (i = 1; i <= MAXDEPTH; i++) { @@ -1814,13 +1814,13 @@ void nxagentCloseDisplay() * traffic */ - xfree(nxagentDefaultColormaps); + free(nxagentDefaultColormaps); nxagentDefaultColormaps = NULL; XFree(nxagentVisuals); nxagentVisuals = NULL; - xfree(nxagentDepths); + free(nxagentDepths); nxagentDepths = NULL; XFree(nxagentPixmapFormats); @@ -2060,10 +2060,10 @@ void nxagentBackupDisplayInfo(void) nxagentNumVisualsRecBackup = nxagentNumVisuals; if (nxagentVisualHasBeenIgnored) { - xfree(nxagentVisualHasBeenIgnored); + free(nxagentVisualHasBeenIgnored); nxagentVisualHasBeenIgnored = NULL; } - nxagentVisualHasBeenIgnored = xalloc(nxagentNumVisuals * sizeof(Bool)); + nxagentVisualHasBeenIgnored = malloc(nxagentNumVisuals * sizeof(Bool)); nxagentDefaultDepthRecBackup = DefaultDepth(nxagentDisplay, DefaultScreen(nxagentDisplay)); nxagentDisplayWidthRecBackup = DisplayWidth(nxagentDisplay, DefaultScreen(nxagentDisplay)); nxagentDisplayHeightRecBackup = DisplayHeight(nxagentDisplay, DefaultScreen(nxagentDisplay)); @@ -2074,17 +2074,17 @@ void nxagentBackupDisplayInfo(void) void nxagentCleanupBackupDisplayInfo(void) { - xfree(nxagentDepthsRecBackup); + free(nxagentDepthsRecBackup); nxagentNumDepthsRecBackup = 0; nxagentNumDefaultColormapsRecBackup = 0; - xfree(nxagentVisualsRecBackup); + free(nxagentVisualsRecBackup); nxagentNumVisualsRecBackup = 0; if (nxagentVisualHasBeenIgnored) { - xfree(nxagentVisualHasBeenIgnored); + free(nxagentVisualHasBeenIgnored); nxagentVisualHasBeenIgnored = NULL; } @@ -2107,7 +2107,7 @@ void nxagentCleanupBackupDisplayInfo(void) } else { - xfree(nxagentBitmapGCBackup); + free(nxagentBitmapGCBackup); } nxagentBitmapGCBackup = NULL; @@ -2549,7 +2549,7 @@ Bool nxagentReconnectDisplay(void *p0) nxagentNumDefaultColormaps = nxagentNumVisuals; - nxagentDefaultColormaps = (Colormap *) xrealloc(nxagentDefaultColormaps, + nxagentDefaultColormaps = (Colormap *) realloc(nxagentDefaultColormaps, nxagentNumDefaultColormaps * sizeof(Colormap)); if (nxagentDefaultColormaps == NULL) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Drawable.c b/nx-X11/programs/Xserver/hw/nxagent/Drawable.c index 377e119ab..bf88db38c 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Drawable.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Drawable.c @@ -223,7 +223,7 @@ int nxagentSynchronizeDrawableData(DrawablePtr pDrawable, unsigned int breakMask length = nxagentImageLength(width, height, format, leftPad, depth); - if ((data = xalloc(length)) == NULL) + if ((data = malloc(length)) == NULL) { #ifdef WARNING fprintf(stderr, "nxagentSynchronizeDrawableData: WARNING! Failed to allocate memory for the operation.\n"); @@ -359,7 +359,7 @@ nxagentSynchronizeDrawableDataFree: if (data != NULL) { - xfree(data); + free(data); } nxagentSynchronizeDrawableDataEnd: @@ -860,7 +860,7 @@ int nxagentSynchronizeRegion(DrawablePtr pDrawable, RegionPtr pRegion, unsigned if (cmpData != NULL) { - xfree(cmpData); + free(cmpData); } } } @@ -1060,7 +1060,7 @@ nxagentSynchronizeRegionFree: if (data != NULL) { - xfree(data); + free(data); } RegionUninit(&exposeRegion); @@ -2129,7 +2129,7 @@ unsigned long nxagentGetColor(DrawablePtr pDrawable, int xPixel, int yPixel) format = (depth == 1) ? XYPixmap : ZPixmap; length = nxagentImageLength(1, 1, format, leftPad, depth); - if ((data = xalloc(length)) == NULL) + if ((data = malloc(length)) == NULL) { #ifdef WARNING fprintf(stderr, "nxagentGetColor: WARNING! Failed to allocate memory for the operation.\n"); @@ -2161,7 +2161,7 @@ unsigned long nxagentGetColor(DrawablePtr pDrawable, int xPixel, int yPixel) fprintf(stderr, "nxagentGetColor: WARNING! Failed to create the XImage.\n"); #endif - xfree(data); + free(data); return -1; } @@ -2374,7 +2374,7 @@ void nxagentFillRemoteRegion(DrawablePtr pDrawable, RegionPtr pRegion) { pBox = RegionRects(pRegion); - pRects = xalloc(nrects * sizeof(XRectangle)); + pRects = malloc(nrects * sizeof(XRectangle)); for (i = 0; i < nrects; i++) { @@ -2387,7 +2387,7 @@ void nxagentFillRemoteRegion(DrawablePtr pDrawable, RegionPtr pRegion) XFillRectangles(nxagentDisplay, nxagentDrawable(pDrawable), nxagentGC(pGC), pRects, nrects); - xfree(pRects); + free(pRects); } } diff --git a/nx-X11/programs/Xserver/hw/nxagent/Font.c b/nx-X11/programs/Xserver/hw/nxagent/Font.c index 8f692eb85..2ef471ab1 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Font.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Font.c @@ -196,11 +196,11 @@ void nxagentFreeFontCache(void) nxagentFreeFont(CACHE_FSTRUCT(i)); } - xfree(CACHE_NAME(i)); - xfree(CACHE_ENTRY(i)); + free(CACHE_NAME(i)); + free(CACHE_ENTRY(i)); } - xfree(CACHE_ENTRY_PTR); + free(CACHE_ENTRY_PTR); CACHE_ENTRY_PTR = NULL; CACHE_INDEX = 0; CACHE_SIZE = 0; @@ -306,7 +306,7 @@ void nxagentListRemoteAddName(const char *name, int status) if (nxagentRemoteFontList.length == nxagentRemoteFontList.listSize) { - nxagentRemoteFontList.list = xrealloc(nxagentRemoteFontList.list, sizeof(nxagentFontRecPtr) + nxagentRemoteFontList.list = realloc(nxagentRemoteFontList.list, sizeof(nxagentFontRecPtr) * (nxagentRemoteFontList.listSize + 1000)); if (nxagentRemoteFontList.list == NULL) @@ -330,9 +330,9 @@ void nxagentListRemoteAddName(const char *name, int status) (nxagentRemoteFontList.length - pos) * sizeof(nxagentFontRecPtr)); } - if ((nxagentRemoteFontList.list[pos] = xalloc(sizeof(nxagentFontRec)))) + if ((nxagentRemoteFontList.list[pos] = malloc(sizeof(nxagentFontRec)))) { - nxagentRemoteFontList.list[pos]->name = xalloc(strlen(name) +1); + nxagentRemoteFontList.list[pos]->name = malloc(strlen(name) +1); if (nxagentRemoteFontList.list[pos]->name == NULL) { fprintf(stderr, "Font: remote list name memory allocation failed!.\n"); @@ -364,10 +364,10 @@ static void nxagentFreeRemoteFontList(nxagentFontList *listRec) { if (listRec -> list[l]) { - xfree(listRec -> list[l] -> name); + free(listRec -> list[l] -> name); listRec -> list[l] -> name = NULL; - xfree(listRec -> list[l]); + free(listRec -> list[l]); listRec -> list[l] = NULL; } } @@ -538,7 +538,7 @@ Bool nxagentRealizeFont(ScreenPtr pScreen, FontPtr pFont) name = origName; } - priv = (void *)xalloc(sizeof(nxagentPrivFont)); + priv = (void *)malloc(sizeof(nxagentPrivFont)); FontSetPrivate(pFont, nxagentFontPrivateIndex, priv); nxagentFontPriv(pFont) -> mirrorID = 0; @@ -569,7 +569,7 @@ Bool nxagentRealizeFont(ScreenPtr pScreen, FontPtr pFont) if (CACHE_INDEX == CACHE_SIZE) { - CACHE_ENTRY_PTR = xrealloc(CACHE_ENTRY_PTR, sizeof(nxCacheFontEntryRecPtr) * (CACHE_SIZE + 100)); + CACHE_ENTRY_PTR = realloc(CACHE_ENTRY_PTR, sizeof(nxCacheFontEntryRecPtr) * (CACHE_SIZE + 100)); if (CACHE_ENTRY_PTR == NULL) { @@ -579,14 +579,14 @@ Bool nxagentRealizeFont(ScreenPtr pScreen, FontPtr pFont) CACHE_SIZE += 100; } - CACHE_ENTRY(CACHE_INDEX) = xalloc(sizeof(nxCacheFontEntryRec)); + CACHE_ENTRY(CACHE_INDEX) = malloc(sizeof(nxCacheFontEntryRec)); if (CACHE_ENTRY(CACHE_INDEX) == NULL) { return False; } - CACHE_NAME(CACHE_INDEX) = xalloc(strlen(name) + 1); + CACHE_NAME(CACHE_INDEX) = malloc(strlen(name) + 1); if (CACHE_NAME(CACHE_INDEX) == NULL) { @@ -686,7 +686,7 @@ Bool nxagentUnrealizeFont(ScreenPtr pScreen, FontPtr pFont) if (nxagentFontPriv(pFont) -> mirrorID) FreeResource(nxagentFontPriv(pFont) -> mirrorID, RT_NONE); - xfree(nxagentFontPriv(pFont)); + free(nxagentFontPriv(pFont)); FontSetPrivate(pFont, nxagentFontPrivateIndex, NULL); } @@ -753,7 +753,7 @@ static XFontStruct *nxagentLoadBestQueryFont(Display* dpy, char *fontName, FontP fprintf(stderr, "nxagentLoadBestQueryFont: Searching font '%s' .\n", fontName); #endif - substFontBuf = (char *) xalloc(sizeof(char) * 512); + substFontBuf = (char *) malloc(sizeof(char) * 512); numFontFields = nxagentSplitString(fontName, fontNameFields, FIELDS + 1, "-"); @@ -1640,7 +1640,7 @@ XFontStruct* nxagentLoadQueryFont(register Display *dpy, char *name, FontPtr pFo fprintf(stderr, "nxagentLoadQueryFont: WARNING! Font not found '%s'.\n", name); #endif - Xfree(fs); + free(fs); return (XFontStruct *) NULL; } @@ -1666,7 +1666,7 @@ XFontStruct* nxagentLoadQueryFont(register Display *dpy, char *name, FontPtr pFo register long nbytes; nbytes = pFont -> info.nprops * sizeof(XFontProp); - fs -> properties = (XFontProp *) Xalloc((unsigned) nbytes); + fs -> properties = (XFontProp *) malloc((unsigned) nbytes); if (fs -> properties == NULL) { @@ -1674,7 +1674,7 @@ XFontStruct* nxagentLoadQueryFont(register Display *dpy, char *name, FontPtr pFo fprintf(stderr, "nxagentLoadQueryFont: WARNING! Failed allocation of XFontProp."); #endif - Xfree((char *) fs); + free((char *) fs); return (XFontStruct *) NULL; } @@ -1714,13 +1714,13 @@ int nxagentFreeFont(XFontStruct *fs) #ifdef USE_XF86BIGFONT _XF86BigfontFreeFontMetrics(fs); #else - Xfree ((char *) fs->per_char); + free ((char *) fs->per_char); #endif } if (fs -> properties) { - Xfree (fs->properties); + free (fs->properties); } XFree(fs); diff --git a/nx-X11/programs/Xserver/hw/nxagent/GC.c b/nx-X11/programs/Xserver/hw/nxagent/GC.c index 7450c1e6c..1c1a77f37 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/GC.c +++ b/nx-X11/programs/Xserver/hw/nxagent/GC.c @@ -673,7 +673,7 @@ void nxagentChangeClip(GCPtr pGC, int type, void * pValue, int nRects) { nRects = RegionNumRects((RegionPtr)pValue); size = nRects * sizeof(*pRects); - pRects = (XRectangle *) xalloc(size); + pRects = (XRectangle *) malloc(size); pBox = RegionRects((RegionPtr)pValue); for (i = nRects; i-- > 0;) @@ -686,7 +686,7 @@ void nxagentChangeClip(GCPtr pGC, int type, void * pValue, int nRects) XSetClipRectangles(nxagentDisplay, nxagentGC(pGC), pGC -> clipOrg.x, pGC -> clipOrg.y, pRects, nRects, Unsorted); - xfree((char *) pRects); + free((char *) pRects); } break; @@ -770,7 +770,7 @@ void nxagentChangeClip(GCPtr pGC, int type, void * pValue, int nRects) pGC->clientClip = (void *) RegionFromRects(nRects, (xRectangle *)pValue, type); - xfree(pValue); + free(pValue); pValue = pGC->clientClip; @@ -904,7 +904,7 @@ static void nxagentFreeGCRec(struct nxagentGCRec *t) (void *) t, (void *) t -> gc); #endif - xfree(t -> gc); + free(t -> gc); free(t); } @@ -918,7 +918,7 @@ static void nxagentRestoreGCRec(struct nxagentGCRec *t) if (nxagentGC(t -> pGC)) { - xfree(nxagentGC(t -> pGC)); + free(nxagentGC(t -> pGC)); } nxagentGC(t -> pGC) = t -> gc; @@ -1280,7 +1280,7 @@ static void nxagentReconnectClip(GCPtr pGC, int type, void * pValue, int nRects) { nRects = RegionNumRects((RegionPtr)pValue); size = nRects * sizeof(*pRects); - pRects = (XRectangle *) xalloc(size); + pRects = (XRectangle *) malloc(size); pBox = RegionRects((RegionPtr)pValue); for (i = nRects; i-- > 0;) { pRects[i].x = pBox[i].x1; @@ -1298,7 +1298,7 @@ static void nxagentReconnectClip(GCPtr pGC, int type, void * pValue, int nRects) XSetClipRectangles(nxagentDisplay, nxagentGC(pGC), pGC -> clipOrg.x, pGC -> clipOrg.y, pRects, nRects, Unsorted); - xfree((char *) pRects); + free((char *) pRects); } else { @@ -1369,7 +1369,7 @@ static void nxagentReconnectClip(GCPtr pGC, int type, void * pValue, int nRects) pGC->clientClip = (void *) RegionFromRects(nRects, (xRectangle *)pValue, type); - xfree(pValue); + free(pValue); pValue = pGC->clientClip; type = CT_REGION; @@ -1613,7 +1613,7 @@ GCPtr nxagentCreateGraphicContext(int depth) * to spread the list and add a new GC. */ - nxagentGCs = xrealloc(nxagentGraphicContexts, (nxagentGraphicContextsSize + 1) * sizeof(nxagentGraphicContextsRec)); + nxagentGCs = realloc(nxagentGraphicContexts, (nxagentGraphicContextsSize + 1) * sizeof(nxagentGraphicContextsRec)); if (nxagentGCs == NULL) { diff --git a/nx-X11/programs/Xserver/hw/nxagent/GCOps.c b/nx-X11/programs/Xserver/hw/nxagent/GCOps.c index 634bbf2ce..a50a830f9 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/GCOps.c +++ b/nx-X11/programs/Xserver/hw/nxagent/GCOps.c @@ -754,7 +754,7 @@ RegionPtr nxagentCopyArea(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, length = nxagentImageLength(width, height, format, leftPad, depth); - if ((data = xalloc(length)) == NULL) + if ((data = malloc(length)) == NULL) { #ifdef WARNING fprintf(stderr, "nxagentCopyArea: WARNING! Failed to allocate memory for the operation.\n"); @@ -779,7 +779,7 @@ RegionPtr nxagentCopyArea(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, srcx, srcy, width, height); #endif - xfree(data); + free(data); /* * If the source is a shared memory pixmap, the @@ -974,7 +974,7 @@ RegionPtr nxagentCopyPlane(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, length = nxagentImageLength(width, height, format, leftPad, depth); - if ((data = xalloc(length)) == NULL) + if ((data = malloc(length)) == NULL) { #ifdef DEBUG fprintf(stderr, "nxagentCopyPlane: WARNING! Failed to allocate memory for the operation.\n"); @@ -999,7 +999,7 @@ RegionPtr nxagentCopyPlane(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, srcx, srcy, width, height); #endif - xfree(data); + free(data); /* * If the source is a shared memory pixmap, the @@ -1467,7 +1467,7 @@ void nxagentFillPolygon(DrawablePtr pDrawable, GCPtr pGC, int shape, mode = CoordModePrevious; - newPoints = xalloc(nPoints * sizeof(xPoint)); + newPoints = malloc(nPoints * sizeof(xPoint)); /* * The first point is always relative @@ -1539,7 +1539,7 @@ void nxagentFillPolygon(DrawablePtr pDrawable, GCPtr pGC, int shape, if (newPoints != NULL) { - xfree(newPoints); + free(newPoints); } } diff --git a/nx-X11/programs/Xserver/hw/nxagent/Image.c b/nx-X11/programs/Xserver/hw/nxagent/Image.c index a158a11db..8cc8962cc 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Image.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Image.c @@ -447,7 +447,7 @@ FIXME: Here the split trap is always set and so the caching of if (nxagentUnpackAlpha[resource] != NULL) { - Xfree(nxagentUnpackAlpha[resource] -> data); + free(nxagentUnpackAlpha[resource] -> data); } else if ((nxagentUnpackAlpha[resource] = Xmalloc(sizeof(UnpackAlphaRec))) == NULL) { @@ -455,7 +455,7 @@ FIXME: Here the split trap is always set and so the caching of fprintf(stderr, "nxagentSetUnpackAlpha: PANIC! Can't allocate data for the alpha structure.\n"); #endif - Xfree(data); + free(data); return; } @@ -475,7 +475,7 @@ FIXME: Here the split trap is always set and so the caching of resource, size); #endif - Xfree(data); + free(data); } } @@ -1561,7 +1561,7 @@ nxagentPutSubImageEnd: if (packedChecksum != NULL) { - Xfree(packedChecksum); + free(packedChecksum); } if (packedImage != NULL) @@ -1569,13 +1569,13 @@ nxagentPutSubImageEnd: if (packedImage -> data != NULL && packedImage -> data != plainImage -> data) { - Xfree(packedImage -> data); + free(packedImage -> data); } - Xfree(packedImage); + free(packedImage); } - Xfree(plainImage); + free(plainImage); } void nxagentGetImage(DrawablePtr pDrawable, int x, int y, int w, int h, @@ -1629,9 +1629,9 @@ void nxagentResetAlphaCache() { if (nxagentUnpackAlpha[i]) { - Xfree(nxagentUnpackAlpha[i] -> data); + free(nxagentUnpackAlpha[i] -> data); - Xfree(nxagentUnpackAlpha[i]); + free(nxagentUnpackAlpha[i]); nxagentUnpackAlpha[i] = NULL; } @@ -1711,7 +1711,7 @@ int nxagentScaleImage(int x, int y, unsigned xRatio, unsigned yRatio, if (newImage -> data == NULL) { - Xfree(newImage); + free(newImage); #ifdef PANIC fprintf(stderr, "nxagentScaleImage: PANIC! Failed to create the target image data.\n"); @@ -1781,10 +1781,10 @@ int nxagentScaleImage(int x, int y, unsigned xRatio, unsigned yRatio, if (image -> obdata != NULL) { - Xfree((char *) image -> obdata); + free((char *) image -> obdata); } - Xfree((char *) image); + free((char *) image); *pImage = newImage; @@ -1808,7 +1808,7 @@ char *nxagentAllocateImageData(int width, int height, int depth, int *length, in data = NULL; - if ((data = xalloc(*length)) == NULL) + if ((data = malloc(*length)) == NULL) { #ifdef WARNING fprintf(stderr, "nxagentAllocateImageData: WARNING! Failed to allocate [%d] bytes of memory.\n", *length); diff --git a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c index 852771492..e85cdfdb6 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c @@ -757,7 +757,7 @@ N/A } len = (max_keycode - min_keycode + 1) * mapWidth; - keymap = (KeySym *)xalloc(len * sizeof(KeySym)); + keymap = (KeySym *)malloc(len * sizeof(KeySym)); for(i = 0; i < len; ++i) keymap[i] = keymap64[i]; XFree(keymap64); @@ -1138,7 +1138,7 @@ Reply Total Cached Bits In Bits Out Bits/Reply Ratio #endif #ifdef _XSERVER64 - xfree(keymap); + free(keymap); #else XFree(keymap); #endif @@ -1296,7 +1296,7 @@ int nxagentResetKeyboard(void) savedBellPercent, savedBellPitch, savedBellDuration); #endif - devBackup = xalloc(sizeof(DeviceIntRec)); + devBackup = malloc(sizeof(DeviceIntRec)); if (devBackup == NULL) { @@ -1473,17 +1473,17 @@ static int nxagentFreeKeyboardDeviceData(DeviceIntPtr dev) } #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); dev->key=NULL; } if (dev->focus) { - xfree(dev->focus->trace); - xfree(dev->focus); + free(dev->focus->trace); + free(dev->focus); dev->focus=NULL; } @@ -1494,7 +1494,7 @@ static int nxagentFreeKeyboardDeviceData(DeviceIntPtr dev) if (k->xkb_sli) XkbFreeSrvLedInfo(k->xkb_sli); #endif - xfree(k); + free(k); } #ifdef DEBUG diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c b/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c index b68f01b8d..215d06b53 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c +++ b/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c @@ -197,14 +197,14 @@ void InitSelections() { if (CurrentSelections) - xfree(CurrentSelections); + free(CurrentSelections); CurrentSelections = (Selection *)NULL; NumCurrentSelections = 0; #ifdef NXAGENT_CLIPBOARD { Selection *newsels; - newsels = (Selection *)xalloc(2 * sizeof(Selection)); + newsels = (Selection *)malloc(2 * sizeof(Selection)); if (!newsels) return; NumCurrentSelections += 2; @@ -750,9 +750,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; @@ -1316,7 +1316,7 @@ CloseDownClient(register ClientPtr client) #ifdef SMART_SCHEDULE SmartLastClient = NullClient; #endif - xfree(client); + free(client); while (!clients[currentMaxClients-1]) currentMaxClients--; @@ -1338,7 +1338,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; } diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXdixfonts.c b/nx-X11/programs/Xserver/hw/nxagent/NXdixfonts.c index 77f21e495..2603988b2 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/NXdixfonts.c +++ b/nx-X11/programs/Xserver/hw/nxagent/NXdixfonts.c @@ -227,7 +227,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; @@ -326,9 +326,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; } @@ -441,8 +441,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); } @@ -496,8 +496,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; @@ -614,11 +614,11 @@ bail: } 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; } @@ -638,19 +638,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 < nxagentMaxFontNames ? max_names : nxagentMaxFontNames); if (!c->names) { - xfree(c->fpe_list); - xfree(c); + free(c->fpe_list); + free(c); return BadAlloc; } memmove( c->current.pattern, pattern, length); @@ -785,8 +785,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; @@ -846,7 +846,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; @@ -886,8 +886,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; } @@ -910,10 +910,10 @@ bail: } 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; } @@ -1085,8 +1085,8 @@ nxdoListFontsAndAliases(client, fss) 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); @@ -1154,8 +1154,8 @@ nxdoListFontsAndAliases(client, fss) 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); @@ -1249,12 +1249,12 @@ finish: } 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(c->names); - xfree(c); - xfree(fss); - if (resolved) xfree(resolved); + free(c); + free(fss); + if (resolved) free(resolved); return doOpenFont(client, oc); } @@ -1275,11 +1275,11 @@ nxOpenFont(client, fid, flags, lenfname, pfontname) #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; @@ -1312,27 +1312,27 @@ nxOpenFont(client, fid, flags, lenfname, pfontname) return Success; } } - if (!(fss = (nxFsPtr) xalloc(sizeof(nxFs)))) + if (!(fss = (nxFsPtr) malloc(sizeof(nxFs)))) return BadAlloc; - if (!(c = (LFclosurePtr) xalloc(sizeof *c))) + if (!(c = (LFclosurePtr) malloc(sizeof *c))) { - xfree(fss); + free(fss); return BadAlloc; } c->fpe_list = (FontPathElementPtr *) - xalloc(sizeof(FontPathElementPtr) * num_fpes); + malloc(sizeof(FontPathElementPtr) * num_fpes); if (!c->fpe_list) { - xfree(c); - xfree(fss); + free(c); + free(fss); return BadAlloc; } c->names = MakeFontNamesRecord(100); if (!c->names) { - xfree(c->fpe_list); - xfree(c); - xfree(fss); + free(c->fpe_list); + free(c); + free(fss); return BadAlloc; } memmove( c->current.pattern, pfontname, lenfname); @@ -1351,26 +1351,26 @@ nxOpenFont(client, fid, flags, lenfname, pfontname) c->slept = FALSE; c->savedName = 0; - oc = (OFclosurePtr) xalloc(sizeof(OFclosureRec)); + oc = (OFclosurePtr) malloc(sizeof(OFclosureRec)); if (!oc) { for (i = 0; i < c->num_fpes; i++) FreeFPE(c->fpe_list[i]); - xfree(c->fpe_list); - xfree(c); - xfree(fss); + free(c->fpe_list); + free(c); + free(fss); return BadAlloc; } - oc->fontname = (char *) xalloc(256);/* I don't want to deal with future reallocs errors */ + oc->fontname = (char *) malloc(256);/* I don't want to deal with future reallocs errors */ oc->origFontName = pfontname; oc->origFontNameLen = lenfname; if (!oc->fontname) { for (i = 0; i < c->num_fpes; i++) FreeFPE(c->fpe_list[i]); - xfree(c->fpe_list); - xfree(c); - xfree(oc); - xfree(fss); + free(c->fpe_list); + free(c); + free(oc); + free(fss); return BadAlloc; } /* @@ -1378,15 +1378,15 @@ nxOpenFont(client, fid, flags, lenfname, pfontname) * while we're blocking, the request still appears atomic */ oc->fpe_list = (FontPathElementPtr *) - xalloc(sizeof(FontPathElementPtr) * num_fpes); + malloc(sizeof(FontPathElementPtr) * num_fpes); if (!oc->fpe_list) { - xfree(oc->fontname); - xfree(oc); + free(oc->fontname); + free(oc); for (i = 0; i < c->num_fpes; i++) FreeFPE(c->fpe_list[i]); - xfree(c->fpe_list); - xfree(c); - xfree(fss); + free(c->fpe_list); + free(c); + free(fss); return BadAlloc; } memmove(oc->fontname, pfontname, lenfname); diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXevents.c b/nx-X11/programs/Xserver/hw/nxagent/NXevents.c index be42ea110..d19e161ac 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/NXevents.c +++ b/nx-X11/programs/Xserver/hw/nxagent/NXevents.c @@ -363,7 +363,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 */ } diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXglyph.c b/nx-X11/programs/Xserver/hw/nxagent/NXglyph.c index 4359a552b..f2885d39c 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/NXglyph.c +++ b/nx-X11/programs/Xserver/hw/nxagent/NXglyph.c @@ -65,7 +65,7 @@ AddGlyph (GlyphSetPtr glyphSet, GlyphPtr glyph, Glyph id) gr = FindGlyphRef (&globalGlyphs[glyphSet->fdepth], hash, TRUE, glyph); if (gr->glyph && gr->glyph != DeletedGlyph) { - xfree (glyph); + free (glyph); glyph = gr->glyph; } else @@ -175,7 +175,7 @@ ResizeGlyphHash (GlyphHashPtr hash, CARD32 change, Bool global) ++newHash.tableEntries; } } - xfree (hash->table); + free (hash->table); } *hash = newHash; if (global) diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXglyphcurs.c b/nx-X11/programs/Xserver/hw/nxagent/NXglyphcurs.c index 33492a6d6..430fb6baf 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/NXglyphcurs.c +++ b/nx-X11/programs/Xserver/hw/nxagent/NXglyphcurs.c @@ -101,7 +101,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 */ @@ -115,7 +115,7 @@ ServerBitsFromGlyph(FontPtr pfont, unsigned ch, register CursorMetricPtr cm, uns fbDestroyPixmap(ppix); if (pGC) FreeScratchGC(pGC); - xfree(pbits); + free(pbits); return BadAlloc; } diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXmiglyph.c b/nx-X11/programs/Xserver/hw/nxagent/NXmiglyph.c index bdc0bc316..15798bc77 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/NXmiglyph.c +++ b/nx-X11/programs/Xserver/hw/nxagent/NXmiglyph.c @@ -87,7 +87,7 @@ miGlyphs (CARD8 op, } else { - nxagentGlyphsExtents = (BoxPtr) xalloc(sizeof(BoxRec)); + nxagentGlyphsExtents = (BoxPtr) malloc(sizeof(BoxRec)); miGlyphExtents (nlist, list, glyphs, &extents); diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXmitrap.c b/nx-X11/programs/Xserver/hw/nxagent/NXmitrap.c index 1ef445af5..8db856d0a 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/NXmitrap.c +++ b/nx-X11/programs/Xserver/hw/nxagent/NXmitrap.c @@ -80,7 +80,7 @@ miTrapezoids (CARD8 op, } else { - nxagentTrapezoidExtents = (BoxPtr) xalloc(sizeof(BoxRec)); + nxagentTrapezoidExtents = (BoxPtr) malloc(sizeof(BoxRec)); miTrapezoidBounds (ntrap, traps, &bounds); diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXpicture.c b/nx-X11/programs/Xserver/hw/nxagent/NXpicture.c index a47e158df..83133cb36 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/NXpicture.c +++ b/nx-X11/programs/Xserver/hw/nxagent/NXpicture.c @@ -87,7 +87,7 @@ PictureCreateDefaultFormats (ScreenPtr pScreen, int *nformatp) nxagentPictureCreateDefaultFormats(pScreen, formats, &nformats); - pFormats = (PictFormatPtr) xalloc (nformats * sizeof (PictFormatRec)); + pFormats = (PictFormatPtr) malloc (nformats * sizeof (PictFormatRec)); if (!pFormats) return 0; memset (pFormats, '\0', nformats * sizeof (PictFormatRec)); @@ -190,7 +190,7 @@ AllocatePicture (ScreenPtr pScreen) unsigned int size; int i; - pPicture = (PicturePtr) xalloc (ps->totalPictureSize); + pPicture = (PicturePtr) malloc (ps->totalPictureSize); if (!pPicture) return 0; ppriv = (DevUnion *)(pPicture + 1); @@ -281,10 +281,10 @@ CreateSolidPicture (Picture pid, xRenderColor *color, int *error) } pPicture->id = pid; - pPicture->pSourcePict = (SourcePictPtr) xalloc(sizeof(PictSolidFill)); + pPicture->pSourcePict = (SourcePictPtr) malloc(sizeof(PictSolidFill)); if (!pPicture->pSourcePict) { *error = BadAlloc; - xfree(pPicture); + free(pPicture); return 0; } pPicture->pSourcePict->type = SourcePictTypeSolidFill; @@ -318,7 +318,7 @@ static PicturePtr createSourcePicture(void) picturePrivateCount * sizeof(DevUnion) + sizeof(nxagentPrivPictureRec); - pPicture = (PicturePtr) xalloc(totalPictureSize); + pPicture = (PicturePtr) malloc(totalPictureSize); if (pPicture != NULL) { @@ -361,12 +361,12 @@ FreePicture (void * value, nxagentDestroyPicture(pPicture); if (pPicture->transform) - xfree (pPicture->transform); + free (pPicture->transform); if (!pPicture->pDrawable) { if (pPicture->pSourcePict) { if (pPicture->pSourcePict->type != SourcePictTypeSolidFill) - xfree(pPicture->pSourcePict->linear.stops); - xfree(pPicture->pSourcePict); + free(pPicture->pSourcePict->linear.stops); + free(pPicture->pSourcePict); } } else { ScreenPtr pScreen = pPicture->pDrawable->pScreen; @@ -397,7 +397,7 @@ FreePicture (void * value, (*pScreen->DestroyPixmap) ((PixmapPtr)pPicture->pDrawable); } } - xfree (pPicture); + free (pPicture); } return Success; } @@ -502,7 +502,7 @@ Bool nxagentReconnectAllPictFormat(void *p) } } - xfree(formats); + free(formats); /* TODO: Perhaps do i have to do PictureFinishInit ?. */ /* TODO: We have to check for new Render protocol version. */ diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXproperty.c b/nx-X11/programs/Xserver/hw/nxagent/NXproperty.c index 2458c12d0..154d85b41 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/NXproperty.c +++ b/nx-X11/programs/Xserver/hw/nxagent/NXproperty.c @@ -227,13 +227,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; @@ -261,7 +261,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; @@ -278,7 +278,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); @@ -290,13 +290,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; } @@ -521,8 +521,8 @@ ProcGetProperty(ClientPtr client) } else prevProp->next = pProp->next; - xfree(pProp->data); - xfree(pProp); + free(pProp->data); + free(pProp); } return(client->noClientException); } @@ -636,8 +636,8 @@ GetWindowProperty(pWin, property, longOffset, longLength, delete, } else prevProp->next = pProp->next; - xfree(pProp->data); - xfree(pProp); + free(pProp->data); + free(pProp); } return(Success); } diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXrender.c b/nx-X11/programs/Xserver/hw/nxagent/NXrender.c index 93760f482..d14b47866 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/NXrender.c +++ b/nx-X11/programs/Xserver/hw/nxagent/NXrender.c @@ -224,7 +224,7 @@ ProcRenderQueryPictFormats (ClientPtr client) ndepth * sizeof (xPictDepth) + nvisual * sizeof (xPictVisual) + numSubpixel * sizeof (CARD32)); - reply = (xRenderQueryPictFormatsReply *) xalloc (rlength); + reply = (xRenderQueryPictFormatsReply *) malloc (rlength); if (!reply) return BadAlloc; memset(reply, 0, rlength); @@ -362,7 +362,7 @@ ProcRenderQueryPictFormats (ClientPtr client) swapl (&reply->numSubpixel, n); } WriteToClient(client, rlength, (char *) reply); - xfree (reply); + free (reply); return client->noClientException; } @@ -712,7 +712,7 @@ ProcRenderTrapezoids (ClientPtr client) { if (pFormat != NULL) { - nxagentTrapezoidExtents = (BoxPtr) xalloc(sizeof(BoxRec)); + nxagentTrapezoidExtents = (BoxPtr) malloc(sizeof(BoxRec)); miTrapezoidBounds (ntraps, (xTrapezoid *) &stuff[1], nxagentTrapezoidExtents); } @@ -730,7 +730,7 @@ ProcRenderTrapezoids (ClientPtr client) if (nxagentTrapezoidExtents != NullBox) { - xfree(nxagentTrapezoidExtents); + free(nxagentTrapezoidExtents); nxagentTrapezoidExtents = NullBox; } @@ -996,7 +996,7 @@ ProcRenderCompositeGlyphs (ClientPtr client) return BadAlloc; } - elementsBase = xalloc(nlist * sizeof(XGlyphElt8)); + elementsBase = malloc(nlist * sizeof(XGlyphElt8)); if (!elementsBase) return BadAlloc; @@ -1098,7 +1098,7 @@ ProcRenderCompositeGlyphs (ClientPtr client) * after the X requests. */ - nxagentGlyphsExtents = (BoxPtr) xalloc(sizeof(BoxRec)); + nxagentGlyphsExtents = (BoxPtr) malloc(sizeof(BoxRec)); miGlyphExtents(nlist, listsBase, glyphsBase, nxagentGlyphsExtents); @@ -1132,7 +1132,7 @@ ProcRenderCompositeGlyphs (ClientPtr client) glyphsBase); } - xfree(nxagentGlyphsExtents); + free(nxagentGlyphsExtents); nxagentGlyphsExtents = NullBox; if (glyphsBase != glyphsLocal) @@ -1140,7 +1140,7 @@ ProcRenderCompositeGlyphs (ClientPtr client) if (listsBase != listsLocal) DEALLOCATE_LOCAL (listsBase); - xfree(elementsBase); + free(elementsBase); return client->noClientException; } @@ -1219,23 +1219,23 @@ ProcRenderCreateCursor (ClientPtr client) if ( stuff->x > width || stuff->y > height ) return (BadMatch); - argbbits = xalloc (width * height * sizeof (CARD32)); + argbbits = malloc (width * height * sizeof (CARD32)); if (!argbbits) return (BadAlloc); stride = BitmapBytePad(width); nbytes_mono = stride*height; - srcbits = (unsigned char *)xalloc(nbytes_mono); + srcbits = (unsigned char *)malloc(nbytes_mono); if (!srcbits) { - xfree (argbbits); + free (argbbits); return (BadAlloc); } - mskbits = (unsigned char *)xalloc(nbytes_mono); + mskbits = (unsigned char *)malloc(nbytes_mono); if (!mskbits) { - xfree(argbbits); - xfree(srcbits); + free(argbbits); + free(srcbits); return (BadAlloc); } bzero ((char *) mskbits, nbytes_mono); @@ -1257,26 +1257,26 @@ ProcRenderCreateCursor (ClientPtr client) pFormat = PictureMatchFormat (pScreen, 32, PICT_a8r8g8b8); if (!pFormat) { - xfree (argbbits); - xfree (srcbits); - xfree (mskbits); + free (argbbits); + free (srcbits); + free (mskbits); return (BadImplementation); } pPixmap = (*pScreen->CreatePixmap) (pScreen, width, height, 32); if (!pPixmap) { - xfree (argbbits); - xfree (srcbits); - xfree (mskbits); + free (argbbits); + free (srcbits); + free (mskbits); return (BadAlloc); } pPicture = CreatePicture (0, &pPixmap->drawable, pFormat, 0, 0, client, &error); if (!pPicture) { - xfree (argbbits); - xfree (srcbits); - xfree (mskbits); + free (argbbits); + free (srcbits); + free (mskbits); return error; } (*pScreen->DestroyPixmap) (pPixmap); @@ -1360,7 +1360,7 @@ ProcRenderCreateCursor (ClientPtr client) } else { - xfree (argbbits); + free (argbbits); argbbits = 0; } @@ -1477,7 +1477,7 @@ ProcRenderCreateAnimCursor (ClientPtr client) if (client->req_len & 1) return BadLength; ncursor = (client->req_len - (SIZEOF(xRenderCreateAnimCursorReq) >> 2)) >> 1; - cursors = xalloc (ncursor * (sizeof (CursorPtr) + sizeof (CARD32))); + cursors = malloc (ncursor * (sizeof (CursorPtr) + sizeof (CARD32))); if (!cursors) return BadAlloc; deltas = (CARD32 *) (cursors + ncursor); @@ -1488,7 +1488,7 @@ ProcRenderCreateAnimCursor (ClientPtr client) RT_CURSOR, SecurityReadAccess); if (!cursors[i]) { - xfree (cursors); + free (cursors); client->errorValue = elt->cursor; return BadCursor; } @@ -1496,7 +1496,7 @@ ProcRenderCreateAnimCursor (ClientPtr client) elt++; } ret = AnimCursorCreate (cursors, deltas, ncursor, &pCursor); - xfree (cursors); + free (cursors); if (ret != Success) return ret; diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXresource.c b/nx-X11/programs/Xserver/hw/nxagent/NXresource.c index 38bc05e51..eb48c5094 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/NXresource.c +++ b/nx-X11/programs/Xserver/hw/nxagent/NXresource.c @@ -257,7 +257,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); @@ -313,7 +313,7 @@ FreeResource(XID id, RESTYPE skipDeleteFuncType) #endif 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; @@ -349,7 +349,7 @@ FreeResourceByType(XID id, RESTYPE type, Bool skipFree) #endif if (!skipFree) (*DeleteFuncs[type & TypeMask])(res->value, res->id); - xfree(res); + free(res); break; } else diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXshm.c b/nx-X11/programs/Xserver/hw/nxagent/NXshm.c index 1ce72cbbe..86b9e0d24 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/NXshm.c +++ b/nx-X11/programs/Xserver/hw/nxagent/NXshm.c @@ -234,12 +234,12 @@ fbShmPutImage(dst, pGC, depth, format, w, h, sx, sy, sw, sh, dx, dy, data) length = nxagentImageLength(sw, sh, format, 0, depth); - if ((newdata = xalloc(length)) != NULL) + if ((newdata = malloc(length)) != NULL) { fbGetImage((DrawablePtr) pPixmap, sx, sy, sw, sh, format, AllPlanes, newdata); (*pGC->ops->PutImage)(dst, pGC, depth, dx, dy, sw, sh, 0, format, newdata); - xfree(newdata); + free(newdata); } else { diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXwindow.c b/nx-X11/programs/Xserver/hw/nxagent/NXwindow.c index 28aafd644..0071a15d0 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/NXwindow.c +++ b/nx-X11/programs/Xserver/hw/nxagent/NXwindow.c @@ -336,7 +336,7 @@ DeleteWindow(void * value, XID wid) nxagentSetInstalledColormapWindows(pWin -> drawable.pScreen); } - xfree(pWin); + free(pWin); return Success; } diff --git a/nx-X11/programs/Xserver/hw/nxagent/Pixmap.c b/nx-X11/programs/Xserver/hw/nxagent/Pixmap.c index f429f1499..931c564dc 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Pixmap.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Pixmap.c @@ -487,7 +487,7 @@ Bool nxagentDestroyPixmap(PixmapPtr pPixmap) FreeResource(pPixmapPriv -> mid, RT_NONE); } - xfree(pPixmap); + free(pPixmap); return True; } @@ -1251,7 +1251,7 @@ void nxagentSynchronizeShmPixmap(DrawablePtr pDrawable, int xPict, int yPict, nxagentFBTrap = 1; - if ((data = xalloc(length)) != NULL) + if ((data = malloc(length)) != NULL) { fbGetImage(nxagentVirtualDrawable(pDrawable), xPict, yPict, width, height, format, 0xffffffff, data); @@ -1259,7 +1259,7 @@ void nxagentSynchronizeShmPixmap(DrawablePtr pDrawable, int xPict, int yPict, nxagentPutImage(pDrawable, pGC, depth, xPict, yPict, width, height, 0, format, data); - xfree(data); + free(data); } #ifdef WARNING else @@ -1373,7 +1373,7 @@ FIXME: If the pixmap has a different depth from the window, the length = nxagentImageLength(width, height, format, 0, depth); - if ((data = xalloc(length)) == NULL) + if ((data = malloc(length)) == NULL) { #ifdef WARNING fprintf(stderr, "nxagentPixmapOnShadowDisplay: WARNING! Failed to allocate memory for the operation.\n"); @@ -1409,7 +1409,7 @@ FIXME: If the pixmap has a different depth from the window, the if (data != NULL) { - xfree(data); + free(data); } return False; @@ -1535,7 +1535,7 @@ Bool nxagentFbOnShadowDisplay() length = nxagentImageLength(width, height, format, 0, depth); - if ((data = xalloc(length)) == NULL) + if ((data = malloc(length)) == NULL) { #ifdef WARNING fprintf(stderr, "nxagentFbOnShadowDisplay: WARNING! Failed to allocate memory for the operation.\n"); @@ -1571,7 +1571,7 @@ Bool nxagentFbOnShadowDisplay() if (data) { - xfree(data); + free(data); } return False; diff --git a/nx-X11/programs/Xserver/hw/nxagent/Reconnect.c b/nx-X11/programs/Xserver/hw/nxagent/Reconnect.c index 00d434bf4..74c7587c7 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Reconnect.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Reconnect.c @@ -329,17 +329,17 @@ void nxagentInitReconnector(void) { nxagentReconnectTrap = 0; - reconnectLossyLevel[DISPLAY_STEP] = xalloc(sizeof(int)); - reconnectLossyLevel[SCREEN_STEP] = xalloc(sizeof(int)); - reconnectLossyLevel[FONT_STEP] = xalloc(sizeof(int)); - reconnectLossyLevel[PIXMAP_STEP] = xalloc(sizeof(int)); - reconnectLossyLevel[GC_STEP] = xalloc(sizeof(int)); - reconnectLossyLevel[CURSOR_STEP] = xalloc(sizeof(int)); - reconnectLossyLevel[COLORMAP_STEP] = xalloc(sizeof(int)); - reconnectLossyLevel[WINDOW_STEP] = xalloc(sizeof(int)); - reconnectLossyLevel[GLYPHSET_STEP] = xalloc(sizeof(int)); - reconnectLossyLevel[PICTFORMAT_STEP] = xalloc(sizeof(int)); - reconnectLossyLevel[PICTURE_STEP] = xalloc(sizeof(int)); + reconnectLossyLevel[DISPLAY_STEP] = malloc(sizeof(int)); + reconnectLossyLevel[SCREEN_STEP] = malloc(sizeof(int)); + reconnectLossyLevel[FONT_STEP] = malloc(sizeof(int)); + reconnectLossyLevel[PIXMAP_STEP] = malloc(sizeof(int)); + reconnectLossyLevel[GC_STEP] = malloc(sizeof(int)); + reconnectLossyLevel[CURSOR_STEP] = malloc(sizeof(int)); + reconnectLossyLevel[COLORMAP_STEP] = malloc(sizeof(int)); + reconnectLossyLevel[WINDOW_STEP] = malloc(sizeof(int)); + reconnectLossyLevel[GLYPHSET_STEP] = malloc(sizeof(int)); + reconnectLossyLevel[PICTFORMAT_STEP] = malloc(sizeof(int)); + reconnectLossyLevel[PICTURE_STEP] = malloc(sizeof(int)); } void nxagentDisconnectSession(void) @@ -434,7 +434,7 @@ Bool nxagentReconnectSession(void) size = strlen(nxagentKeyboard); - if ((nxagentOldKeyboard = xalloc(size + 1)) != NULL) + if ((nxagentOldKeyboard = malloc(size + 1)) != NULL) { strncpy(nxagentOldKeyboard, nxagentKeyboard, size); @@ -444,7 +444,7 @@ Bool nxagentReconnectSession(void) if (nxagentKeyboard) { - xfree(nxagentKeyboard); + free(nxagentKeyboard); nxagentKeyboard = NULL; } @@ -609,7 +609,7 @@ Bool nxagentReconnectSession(void) if (nxagentOldKeyboard != NULL) { - xfree(nxagentOldKeyboard); + free(nxagentOldKeyboard); nxagentOldKeyboard = NULL; } @@ -734,7 +734,7 @@ nxagentReconnectError: if (nxagentOldKeyboard != NULL) { - xfree(nxagentOldKeyboard); + free(nxagentOldKeyboard); nxagentOldKeyboard = NULL; } diff --git a/nx-X11/programs/Xserver/hw/nxagent/Render.c b/nx-X11/programs/Xserver/hw/nxagent/Render.c index 8c822319d..4c9edb849 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Render.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Render.c @@ -270,11 +270,11 @@ void nxagentRenderExtensionInit() int nxagentCursorSaveRenderInfo(ScreenPtr pScreen, CursorPtr pCursor) { - pCursor -> devPriv[pScreen -> myNum] = xalloc(sizeof(nxagentPrivCursor)); + pCursor -> devPriv[pScreen -> myNum] = malloc(sizeof(nxagentPrivCursor)); if (nxagentCursorPriv(pCursor, pScreen) == NULL) { - FatalError("xalloc failed"); + FatalError("malloc failed"); } nxagentCursorUsesRender(pCursor, pScreen) = 1; @@ -2249,7 +2249,7 @@ void nxagentAddGlyphs(GlyphSetPtr glyphSet, Glyph *gids, xGlyphInfo *gi, if (sizeImages > 0) { - normalizedImages = xalloc(sizeImages); + normalizedImages = malloc(sizeImages); if (normalizedImages != NULL) { @@ -2284,7 +2284,7 @@ void nxagentAddGlyphs(GlyphSetPtr glyphSet, Glyph *gids, xGlyphInfo *gi, if (normalizedImages != images) { - xfree(normalizedImages); + free(normalizedImages); } #ifdef DEBUG @@ -2392,7 +2392,7 @@ FIXME: Is this useful or just a waste of bandwidth? nparams); #endif - Xfree(szFilter); + free(szFilter); } diff --git a/nx-X11/programs/Xserver/hw/nxagent/Rootless.c b/nx-X11/programs/Xserver/hw/nxagent/Rootless.c index 49877f9d7..d5c6e71c9 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Rootless.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Rootless.c @@ -305,7 +305,7 @@ void nxagentRootlessRestack(unsigned long children[], unsigned int nchildren) XID values[2]; Mask mask; - toplevel = xalloc(sizeof(WindowPtr) * nchildren); + toplevel = malloc(sizeof(WindowPtr) * nchildren); ntoplevel = 0; for(i = 0; i < nchildren; i++) @@ -389,7 +389,7 @@ void nxagentRootlessRestack(unsigned long children[], unsigned int nchildren) #endif - xfree(toplevel); + free(toplevel); return; } @@ -797,7 +797,7 @@ int nxagentExportProperty(pWin, property, type, format, mode, nUnits, value) if (freeMem) { - xfree(output); + free(output); } return export; @@ -1104,7 +1104,7 @@ void nxagentImportProperty(Window window, if (freeMem) { - xfree(output); + free(output); } return; @@ -1156,7 +1156,7 @@ void nxagentRemovePropertyFromList() nxagentPropertyList.last = NULL; } - xfree(tmp); + free(tmp); } } diff --git a/nx-X11/programs/Xserver/hw/nxagent/Screen.c b/nx-X11/programs/Xserver/hw/nxagent/Screen.c index de8c97532..152040fbd 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Screen.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Screen.c @@ -1149,13 +1149,13 @@ Bool nxagentOpenScreen(int index, ScreenPtr pScreen, * Initialize the depths. */ - depths = (DepthPtr) xalloc(nxagentNumDepths * sizeof(DepthRec)); + depths = (DepthPtr) malloc(nxagentNumDepths * sizeof(DepthRec)); for (i = 0; i < nxagentNumDepths; i++) { depths[i].depth = nxagentDepths[i]; depths[i].numVids = 0; - depths[i].vids = (VisualID *) xalloc(MAXVISUALSPERDEPTH * sizeof(VisualID)); + depths[i].vids = (VisualID *) malloc(MAXVISUALSPERDEPTH * sizeof(VisualID)); } /* @@ -1170,7 +1170,7 @@ Bool nxagentOpenScreen(int index, ScreenPtr pScreen, numVisuals = 0; numDepths = nxagentNumDepths; - visuals = (VisualPtr) xalloc(nxagentNumVisuals * sizeof(VisualRec)); + visuals = (VisualPtr) malloc(nxagentNumVisuals * sizeof(VisualRec)); for (i = 0; i < nxagentNumVisuals; i++) { @@ -1250,7 +1250,7 @@ Bool nxagentOpenScreen(int index, ScreenPtr pScreen, depths[depthIndex].depth = nxagentVisuals[i].depth; depths[depthIndex].numVids = 0; - depths[depthIndex].vids = (VisualID *) xalloc(MAXVISUALSPERDEPTH * sizeof(VisualID)); + depths[depthIndex].vids = (VisualID *) malloc(MAXVISUALSPERDEPTH * sizeof(VisualID)); numDepths++; } @@ -1302,7 +1302,7 @@ Bool nxagentOpenScreen(int index, ScreenPtr pScreen, "[%d] bitsPerPixel [%d] sizeInBytes [%d]\n", rootDepth, bitsPerPixel, sizeInBytes); #endif - pFrameBufferBits = (char *) Xalloc(sizeInBytes); + pFrameBufferBits = (char *) malloc(sizeInBytes); if (!pFrameBufferBits) { @@ -1358,8 +1358,8 @@ Bool nxagentOpenScreen(int index, ScreenPtr pScreen, * by fbScreenInit with our own. */ - xfree(pScreen -> visuals); - xfree(pScreen -> allowedDepths); + free(pScreen -> visuals); + free(pScreen -> allowedDepths); pScreen -> visuals = visuals; pScreen -> allowedDepths = depths; @@ -2079,18 +2079,18 @@ Bool nxagentCloseScreen(int index, ScreenPtr pScreen) for (i = 0; i < pScreen->numDepths; i++) { - xfree(pScreen->allowedDepths[i].vids); + free(pScreen->allowedDepths[i].vids); } /* * Free the frame buffer. */ - xfree(((PixmapPtr)pScreen -> devPrivate) -> devPrivate.ptr); + free(((PixmapPtr)pScreen -> devPrivate) -> devPrivate.ptr); - xfree(pScreen->allowedDepths); - xfree(pScreen->visuals); - xfree(pScreen->devPrivate); + free(pScreen->allowedDepths); + free(pScreen->visuals); + free(pScreen->devPrivate); /* * Reset the geometry and alpha information @@ -3065,15 +3065,15 @@ int nxagentShadowPoll(PixmapPtr nxagentShadowPixmapPtr, GCPtr nxagentShadowGCPtr if (tBuffer) { - xfree(tBuffer); + free(tBuffer); } - tBuffer = xalloc(length); + tBuffer = malloc(length); if (tBuffer == NULL) { #ifdef PANIC - fprintf(stderr, "nxagentShadowPoll: xalloc failed.\n"); + fprintf(stderr, "nxagentShadowPoll: malloc failed.\n"); #endif return -1; @@ -3125,7 +3125,7 @@ int nxagentShadowPoll(PixmapPtr nxagentShadowPixmapPtr, GCPtr nxagentShadowGCPtr if (tBuffer) { - xfree(tBuffer); + free(tBuffer); } RegionUninit(&updateRegion); @@ -3166,7 +3166,7 @@ void nxagentShadowAdaptDepth(unsigned int width, unsigned int height, length = nxagentImageLength(width, height, ZPixmap, 0, nxagentShadowDepth); - cBuffer = xalloc(length); + cBuffer = malloc(length); icBuffer = cBuffer; pVisual = nxagentImageVisual((DrawablePtr) nxagentShadowPixmapPtr, nxagentShadowDepth); @@ -3346,7 +3346,7 @@ void nxagentShadowAdaptDepth(unsigned int width, unsigned int height, if (cBuffer != NULL) { - xfree(cBuffer); + free(cBuffer); } } @@ -3423,7 +3423,7 @@ FIXME: The port information is not used at the moment and produces a #endif - local_buf = (char *) xalloc(strlen((char*)pszReturnData) + 100); + local_buf = (char *) malloc(strlen((char*)pszReturnData) + 100); if (local_buf) { @@ -3529,7 +3529,7 @@ FIXME: The port information is not used at the moment and produces a strlen(local_buf), local_buf, 1); } - xfree(local_buf); + free(local_buf); } } } @@ -3769,9 +3769,9 @@ int nxagentAdjustRandRXinerama(ScreenPtr pScreen) number = 1; if (screeninfo) { - xfree(screeninfo); + free(screeninfo); } - if (!(screeninfo = xalloc(sizeof(XineramaScreenInfo)))) { + if (!(screeninfo = malloc(sizeof(XineramaScreenInfo)))) { return FALSE; } @@ -4061,7 +4061,7 @@ int nxagentAdjustRandRXinerama(ScreenPtr pScreen) /* release allocated memory */ if (screeninfo) { - xfree(screeninfo); + free(screeninfo); screeninfo = NULL; } @@ -4157,7 +4157,7 @@ void nxagentSaveAreas(PixmapPtr pPixmap, RegionPtr prgnSave, int xorg, int yorg, nRects = RegionNumRects(&cleanRegion); size = nRects * sizeof(*pRects); - pRects = (XRectangle *) xalloc(size); + pRects = (XRectangle *) malloc(size); pBox = RegionRects(&cleanRegion); for (i = nRects; i-- > 0;) @@ -4170,7 +4170,7 @@ void nxagentSaveAreas(PixmapPtr pPixmap, RegionPtr prgnSave, int xorg, int yorg, XSetClipRectangles(nxagentDisplay, gc, 0, 0, pRects, nRects, Unsorted); - xfree((char *) pRects); + free((char *) pRects); extents = *RegionExtents(&cleanRegion); @@ -4303,7 +4303,7 @@ void nxagentRestoreAreas(PixmapPtr pPixmap, RegionPtr prgnRestore, int xorg, nRects = RegionNumRects(clipRegion); size = nRects * sizeof(*pRects); - pRects = (XRectangle *) xalloc(size); + pRects = (XRectangle *) malloc(size); pBox = RegionRects(clipRegion); for (i = nRects; i-- > 0;) @@ -4316,7 +4316,7 @@ void nxagentRestoreAreas(PixmapPtr pPixmap, RegionPtr prgnRestore, int xorg, XSetClipRectangles(nxagentDisplay, gc, 0, 0, pRects, nRects, Unsorted); - xfree(pRects); + free(pRects); extents = *RegionExtents(clipRegion); @@ -4511,10 +4511,10 @@ void nxagentShowPixmap(PixmapPtr pPixmap, int x, int y, int width, int height) length = nxagentImageLength(width, height, format, 0, depth); - if ((data = xalloc(length)) == NULL) + if ((data = malloc(length)) == NULL) { #ifdef WARNING - fprintf(stderr, "nxagentShowPixmap: xalloc failed.\n"); + fprintf(stderr, "nxagentShowPixmap: malloc failed.\n"); #endif return; @@ -4537,7 +4537,7 @@ FIXME if (data) { - xfree(data); + free(data); } return; @@ -4573,7 +4573,7 @@ FIXME if (data != NULL) { - xfree(data); + free(data); } /* @@ -4607,10 +4607,10 @@ void nxagentFbRestoreArea(PixmapPtr pPixmap, WindowPtr pWin, int xSrc, int ySrc, length = nxagentImageLength(width, height, format, 0, depth); - if ((data = xalloc(length)) == NULL) + if ((data = malloc(length)) == NULL) { #ifdef WARNING - fprintf(stderr, "nxagentFbRestoreArea: xalloc failed.\n"); + fprintf(stderr, "nxagentFbRestoreArea: malloc failed.\n"); #endif return; @@ -4628,7 +4628,7 @@ void nxagentFbRestoreArea(PixmapPtr pPixmap, WindowPtr pWin, int xSrc, int ySrc, if (data) { - xfree(data); + free(data); } return; @@ -4691,7 +4691,7 @@ FIXME FIXME if (data) { - xfree(data); + free(data); } */ } |