diff options
author | Eamon Walsh <ewalsh@tycho.nsa.gov> | 2007-11-05 19:08:36 -0500 |
---|---|---|
committer | Eamon Walsh <ewalsh@moss-charon.epoch.ncsc.mil> | 2007-11-05 19:08:36 -0500 |
commit | a52c9b2a59f27266557ff9d5d2c08492e04135a6 (patch) | |
tree | 705f11c54e8a31a07dde9ab6835032e2849e132b /dix/colormap.c | |
parent | c7e18beb3c87eb1ada9b21c4ffacd11c1939c087 (diff) | |
parent | 58332894c061ae96d6a457f65266660f5f65e88b (diff) |
Merge branch 'master' into XACE-SELINUX
Conflicts:
dix/dispatch.c
dix/property.c
hw/xfree86/common/xf86VidMode.c
include/xkbsrv.h
render/glyph.c
xkb/xkbActions.c
Diffstat (limited to 'dix/colormap.c')
-rw-r--r-- | dix/colormap.c | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/dix/colormap.c b/dix/colormap.c index d07cff7db..c4c8c8bfe 100644 --- a/dix/colormap.c +++ b/dix/colormap.c @@ -744,7 +744,7 @@ UpdateColors (ColormapPtr pmap) pVisual = pmap->pVisual; size = pVisual->ColormapEntries; - defs = (xColorItem *)ALLOCATE_LOCAL(size * sizeof(xColorItem)); + defs = (xColorItem *)xalloc(size * sizeof(xColorItem)); if (!defs) return; n = 0; @@ -794,7 +794,7 @@ UpdateColors (ColormapPtr pmap) } if (n) (*pmap->pScreen->StoreColors)(pmap, n, defs); - DEALLOCATE_LOCAL(defs); + xfree(defs); } /* Get a read-only color from a ColorMap (probably slow for large maps) @@ -1745,14 +1745,14 @@ AllocDirect (int client, ColormapPtr pmap, int c, int r, int g, int b, Bool cont for(p = pixels; p < pixels + c; p++) *p = 0; - ppixRed = (Pixel *)ALLOCATE_LOCAL(npixR * sizeof(Pixel)); - ppixGreen = (Pixel *)ALLOCATE_LOCAL(npixG * sizeof(Pixel)); - ppixBlue = (Pixel *)ALLOCATE_LOCAL(npixB * sizeof(Pixel)); + ppixRed = (Pixel *)xalloc(npixR * sizeof(Pixel)); + ppixGreen = (Pixel *)xalloc(npixG * sizeof(Pixel)); + ppixBlue = (Pixel *)xalloc(npixB * sizeof(Pixel)); if (!ppixRed || !ppixGreen || !ppixBlue) { - if (ppixBlue) DEALLOCATE_LOCAL(ppixBlue); - if (ppixGreen) DEALLOCATE_LOCAL(ppixGreen); - if (ppixRed) DEALLOCATE_LOCAL(ppixRed); + if (ppixBlue) xfree(ppixBlue); + if (ppixGreen) xfree(ppixGreen); + if (ppixRed) xfree(ppixRed); return(BadAlloc); } @@ -1790,9 +1790,9 @@ AllocDirect (int client, ColormapPtr pmap, int c, int r, int g, int b, Bool cont if (okB) for(ppix = ppixBlue, npix = npixB; --npix >= 0; ppix++) pmap->blue[*ppix].refcnt = 0; - DEALLOCATE_LOCAL(ppixBlue); - DEALLOCATE_LOCAL(ppixGreen); - DEALLOCATE_LOCAL(ppixRed); + xfree(ppixBlue); + xfree(ppixGreen); + xfree(ppixRed); return(BadAlloc); } @@ -1834,9 +1834,9 @@ AllocDirect (int client, ColormapPtr pmap, int c, int r, int g, int b, Bool cont for (pDst = pixels; pDst < pixels + c; pDst++) *pDst |= ALPHAMASK(pmap->pVisual); - DEALLOCATE_LOCAL(ppixBlue); - DEALLOCATE_LOCAL(ppixGreen); - DEALLOCATE_LOCAL(ppixRed); + xfree(ppixBlue); + xfree(ppixGreen); + xfree(ppixRed); return (Success); } @@ -1852,7 +1852,7 @@ AllocPseudo (int client, ColormapPtr pmap, int c, int r, Bool contig, npix = c << r; if ((r >= 32) || (npix > pmap->freeRed) || (npix < c)) return(BadAlloc); - if(!(ppixTemp = (Pixel *)ALLOCATE_LOCAL(npix * sizeof(Pixel)))) + if(!(ppixTemp = (Pixel *)xalloc(npix * sizeof(Pixel)))) return(BadAlloc); ok = AllocCP(pmap, pmap->red, c, r, contig, ppixTemp, pmask); @@ -1882,7 +1882,7 @@ AllocPseudo (int client, ColormapPtr pmap, int c, int r, Bool contig, pmap->numPixelsRed[client] += npix; pmap->freeRed -= npix; } - DEALLOCATE_LOCAL(ppixTemp); + xfree(ppixTemp); return (ok ? Success : BadAlloc); } @@ -2082,7 +2082,7 @@ AllocShared (ColormapPtr pmap, Pixel *ppix, int c, int r, int g, int b, npixClientNew = c << (r + g + b); npixShared = (c << r) + (c << g) + (c << b); - psharedList = (SHAREDCOLOR **)ALLOCATE_LOCAL(npixShared * + psharedList = (SHAREDCOLOR **)xalloc(npixShared * sizeof(SHAREDCOLOR *)); if (!psharedList) return FALSE; @@ -2197,7 +2197,7 @@ AllocShared (ColormapPtr pmap, Pixel *ppix, int c, int r, int g, int b, } } } - DEALLOCATE_LOCAL(psharedList); + xfree(psharedList); return TRUE; } @@ -2672,7 +2672,7 @@ IsMapInstalled(Colormap map, WindowPtr pWin) Colormap *pmaps; int imap, nummaps, found; - pmaps = (Colormap *) ALLOCATE_LOCAL( + pmaps = (Colormap *) xalloc( pWin->drawable.pScreen->maxInstalledCmaps * sizeof(Colormap)); if(!pmaps) return(FALSE); @@ -2687,6 +2687,6 @@ IsMapInstalled(Colormap map, WindowPtr pWin) break; } } - DEALLOCATE_LOCAL(pmaps); + xfree(pmaps); return (found); } |