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
This commit is contained in:
Eamon Walsh 2007-11-05 19:08:36 -05:00 • committed by Eamon Walsh
commit a52c9b2a59
270 changed files with 1593 additions and 1827 deletions

View file

@ -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);
}