aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/hw/nxagent/Colormap.c
diff options
context:
space:
mode:
Diffstat (limited to 'nx-X11/programs/Xserver/hw/nxagent/Colormap.c')
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Colormap.c36
1 files changed, 18 insertions, 18 deletions
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),