pull 'master'

This commit is contained in:
Dodji Seketeli 2007-11-05 17:52:33 +01:00
commit 632c33c5c1
172 changed files with 904 additions and 1227 deletions

View File

@ -2030,7 +2030,7 @@ static void GetSendColorCellsRep(ClientPtr client, xResourceReq *req)
} }
nmasks = creq->planes; nmasks = creq->planes;
length = ((long)npixels + (long)nmasks) * sizeof(Pixel); length = ((long)npixels + (long)nmasks) * sizeof(Pixel);
data = (XETrapDatum *)ALLOCATE_LOCAL(sizeof(XETrapDatum)+length); data = (XETrapDatum *)xalloc(sizeof(XETrapDatum)+length);
if (!data) if (!data)
{ {
SendErrorToClient(penv->client, XETrap_avail.data.major_opcode, SendErrorToClient(penv->client, XETrap_avail.data.major_opcode,
@ -2048,7 +2048,7 @@ static void GetSendColorCellsRep(ClientPtr client, xResourceReq *req)
{ {
SendErrorToClient(penv->client, XETrap_avail.data.major_opcode, SendErrorToClient(penv->client, XETrap_avail.data.major_opcode,
req->reqType, 0L, retval); req->reqType, 0L, retval);
DEALLOCATE_LOCAL(data); xfree(data);
return; return;
} }
crep = (xAllocColorCellsReply *)&(data->u.reply); crep = (xAllocColorCellsReply *)&(data->u.reply);
@ -2073,7 +2073,7 @@ static void GetSendColorCellsRep(ClientPtr client, xResourceReq *req)
SendErrorToClient(penv->client, XETrap_avail.data.major_opcode, SendErrorToClient(penv->client, XETrap_avail.data.major_opcode,
req->reqType, 0L, XETrapErrorBase + BadIO); req->reqType, 0L, XETrapErrorBase + BadIO);
} }
DEALLOCATE_LOCAL(data); xfree(data);
} }
static void GetSendColorPlanesRep(ClientPtr client, xResourceReq *req) static void GetSendColorPlanesRep(ClientPtr client, xResourceReq *req)
{ /* adapted from ProcAllocColorPlanes() in dispatch.c */ { /* adapted from ProcAllocColorPlanes() in dispatch.c */
@ -2101,7 +2101,7 @@ static void GetSendColorPlanesRep(ClientPtr client, xResourceReq *req)
return; return;
} }
length = (long)npixels * sizeof(Pixel); length = (long)npixels * sizeof(Pixel);
data = (XETrapDatum *)ALLOCATE_LOCAL(sizeof(XETrapDatum)+length); data = (XETrapDatum *)xalloc(sizeof(XETrapDatum)+length);
if (!data) if (!data)
{ {
SendErrorToClient(penv->client, XETrap_avail.data.major_opcode, SendErrorToClient(penv->client, XETrap_avail.data.major_opcode,
@ -2121,7 +2121,7 @@ static void GetSendColorPlanesRep(ClientPtr client, xResourceReq *req)
{ {
SendErrorToClient(penv->client, XETrap_avail.data.major_opcode, SendErrorToClient(penv->client, XETrap_avail.data.major_opcode,
req->reqType, 0L, retval); req->reqType, 0L, retval);
DEALLOCATE_LOCAL(data); xfree(data);
return; return;
} }
crep->nPixels = npixels; crep->nPixels = npixels;
@ -2146,6 +2146,6 @@ static void GetSendColorPlanesRep(ClientPtr client, xResourceReq *req)
SendErrorToClient(penv->client, XETrap_avail.data.major_opcode, SendErrorToClient(penv->client, XETrap_avail.data.major_opcode,
req->reqType, 0L, XETrapErrorBase + BadIO); req->reqType, 0L, XETrapErrorBase + BadIO);
} }
DEALLOCATE_LOCAL(data); xfree(data);
} }
#endif /* COLOR_REPLIES */ #endif /* COLOR_REPLIES */

View File

@ -524,12 +524,12 @@ ProcDisplayImageBuffers (client)
return Success; return Success;
minDelay = stuff->minDelay; minDelay = stuff->minDelay;
ids = (XID *) &stuff[1]; ids = (XID *) &stuff[1];
ppMultibuffers = (MultibuffersPtr *) ALLOCATE_LOCAL(nbuf * sizeof (MultibuffersPtr)); ppMultibuffers = (MultibuffersPtr *) xalloc(nbuf * sizeof (MultibuffersPtr));
pMultibuffer = (MultibufferPtr *) ALLOCATE_LOCAL(nbuf * sizeof (MultibufferPtr)); pMultibuffer = (MultibufferPtr *) xalloc(nbuf * sizeof (MultibufferPtr));
if (!ppMultibuffers || !pMultibuffer) if (!ppMultibuffers || !pMultibuffer)
{ {
if (ppMultibuffers) DEALLOCATE_LOCAL(ppMultibuffers); if (ppMultibuffers) xfree(ppMultibuffers);
if (pMultibuffer) DEALLOCATE_LOCAL(pMultibuffer); if (pMultibuffer) xfree(pMultibuffer);
client->errorValue = 0; client->errorValue = 0;
return BadAlloc; return BadAlloc;
} }
@ -541,8 +541,8 @@ ProcDisplayImageBuffers (client)
MultibufferResType); MultibufferResType);
if (!pMultibuffer[i]) if (!pMultibuffer[i])
{ {
DEALLOCATE_LOCAL(ppMultibuffers); xfree(ppMultibuffers);
DEALLOCATE_LOCAL(pMultibuffer); xfree(pMultibuffer);
client->errorValue = ids[i]; client->errorValue = ids[i];
return MultibufferErrorBase + MultibufferBadBuffer; return MultibufferErrorBase + MultibufferBadBuffer;
} }
@ -551,8 +551,8 @@ MultibufferResType);
{ {
if (ppMultibuffers[i] == ppMultibuffers[j]) if (ppMultibuffers[i] == ppMultibuffers[j])
{ {
DEALLOCATE_LOCAL(ppMultibuffers); xfree(ppMultibuffers);
DEALLOCATE_LOCAL(pMultibuffer); xfree(pMultibuffer);
client->errorValue = ids[i]; client->errorValue = ids[i];
return BadMatch; return BadMatch;
} }
@ -571,8 +571,8 @@ MultibufferResType);
else else
PerformDisplayRequest (ppMultibuffers, pMultibuffer, nbuf); PerformDisplayRequest (ppMultibuffers, pMultibuffer, nbuf);
DEALLOCATE_LOCAL(ppMultibuffers); xfree(ppMultibuffers);
DEALLOCATE_LOCAL(pMultibuffer); xfree(pMultibuffer);
return Success; return Success;
} }
@ -665,7 +665,7 @@ ProcGetMBufferAttributes (client)
pMultibuffers = (MultibuffersPtr)LookupIDByType (pWin->drawable.id, MultibuffersResType); pMultibuffers = (MultibuffersPtr)LookupIDByType (pWin->drawable.id, MultibuffersResType);
if (!pMultibuffers) if (!pMultibuffers)
return BadAccess; return BadAccess;
ids = (XID *) ALLOCATE_LOCAL (pMultibuffers->numMultibuffer * sizeof (XID)); ids = (XID *) xalloc (pMultibuffers->numMultibuffer * sizeof (XID));
if (!ids) if (!ids)
return BadAlloc; return BadAlloc;
for (i = 0; i < pMultibuffers->numMultibuffer; i++) for (i = 0; i < pMultibuffers->numMultibuffer; i++)
@ -688,7 +688,7 @@ ProcGetMBufferAttributes (client)
(char *)&rep); (char *)&rep);
WriteToClient (client, (int)(pMultibuffers->numMultibuffer * sizeof (XID)), WriteToClient (client, (int)(pMultibuffers->numMultibuffer * sizeof (XID)),
(char *)ids); (char *)ids);
DEALLOCATE_LOCAL((pointer) ids); xfree((pointer) ids);
return client->noClientException; return client->noClientException;
} }
@ -803,7 +803,7 @@ ProcGetBufferInfo (client)
nInfo += pDepth->numVids; nInfo += pDepth->numVids;
} }
pInfo = (xMbufBufferInfo *) pInfo = (xMbufBufferInfo *)
ALLOCATE_LOCAL (nInfo * sizeof (xMbufBufferInfo)); xalloc (nInfo * sizeof (xMbufBufferInfo));
if (!pInfo) if (!pInfo)
return BadAlloc; return BadAlloc;
@ -839,7 +839,7 @@ ProcGetBufferInfo (client)
} }
WriteToClient (client, sizeof (xMbufGetBufferInfoReply), (pointer) &rep); WriteToClient (client, sizeof (xMbufGetBufferInfoReply), (pointer) &rep);
WriteToClient (client, (int) nInfo * sizeof (xMbufBufferInfo), (pointer) pInfo); WriteToClient (client, (int) nInfo * sizeof (xMbufBufferInfo), (pointer) pInfo);
DEALLOCATE_LOCAL ((pointer) pInfo); xfree ((pointer) pInfo);
return client->noClientException; return client->noClientException;
} }
@ -1256,7 +1256,7 @@ DisplayImageBuffers (ids, nbuf)
MultibuffersPtr *pMultibuffers; MultibuffersPtr *pMultibuffers;
int i, j; int i, j;
pMultibuffer = (MultibufferPtr *) ALLOCATE_LOCAL (nbuf * sizeof *pMultibuffer + pMultibuffer = (MultibufferPtr *) xalloc (nbuf * sizeof *pMultibuffer +
nbuf * sizeof *pMultibuffers); nbuf * sizeof *pMultibuffers);
if (!pMultibuffer) if (!pMultibuffer)
return BadAlloc; return BadAlloc;
@ -1266,19 +1266,19 @@ DisplayImageBuffers (ids, nbuf)
pMultibuffer[i] = (MultibufferPtr) LookupIDByType (ids[i], MultibufferResType); pMultibuffer[i] = (MultibufferPtr) LookupIDByType (ids[i], MultibufferResType);
if (!pMultibuffer[i]) if (!pMultibuffer[i])
{ {
DEALLOCATE_LOCAL (pMultibuffer); xfree (pMultibuffer);
return MultibufferErrorBase + MultibufferBadBuffer; return MultibufferErrorBase + MultibufferBadBuffer;
} }
pMultibuffers[i] = pMultibuffer[i]->pMultibuffers; pMultibuffers[i] = pMultibuffer[i]->pMultibuffers;
for (j = 0; j < i; j++) for (j = 0; j < i; j++)
if (pMultibuffers[i] == pMultibuffers[j]) if (pMultibuffers[i] == pMultibuffers[j])
{ {
DEALLOCATE_LOCAL (pMultibuffer); xfree (pMultibuffer);
return BadMatch; return BadMatch;
} }
} }
PerformDisplayRequest (pMultibuffers, pMultibuffer, nbuf); PerformDisplayRequest (pMultibuffers, pMultibuffer, nbuf);
DEALLOCATE_LOCAL (pMultibuffer); xfree (pMultibuffer);
return Success; return Success;
} }
@ -1382,7 +1382,7 @@ MultibufferExpose (pMultibuffer, pRegion)
numRects = REGION_NUM_RECTS(pRegion); numRects = REGION_NUM_RECTS(pRegion);
pBox = REGION_RECTS(pRegion); pBox = REGION_RECTS(pRegion);
pEvent = (xEvent *) ALLOCATE_LOCAL(numRects * sizeof(xEvent)); pEvent = (xEvent *) xalloc(numRects * sizeof(xEvent));
if (pEvent) { if (pEvent) {
pe = pEvent; pe = pEvent;
@ -1398,7 +1398,7 @@ MultibufferExpose (pMultibuffer, pRegion)
} }
(void) DeliverEventsToMultibuffer (pMultibuffer, pEvent, numRects, (void) DeliverEventsToMultibuffer (pMultibuffer, pEvent, numRects,
ExposureMask); ExposureMask);
DEALLOCATE_LOCAL(pEvent); xfree(pEvent);
} }
} }
} }

View File

@ -614,7 +614,7 @@ bufDrawSelectPlane(pScreen, selectPlane, prgn, bufferNum)
if (!pGC) if (!pGC)
return; return;
prect = (xRectangle *)ALLOCATE_LOCAL(REGION_NUM_RECTS(prgn) * prect = (xRectangle *)xalloc(REGION_NUM_RECTS(prgn) *
sizeof(xRectangle)); sizeof(xRectangle));
if (!prect) if (!prect)
{ {
@ -638,7 +638,7 @@ bufDrawSelectPlane(pScreen, selectPlane, prgn, bufferNum)
prect -= numRects; prect -= numRects;
(* pGC->ops->PolyFillRect)(pDrawable, pGC, numRects, prect); (* pGC->ops->PolyFillRect)(pDrawable, pGC, numRects, prect);
DEALLOCATE_LOCAL(prect); xfree(prect);
FreeScratchGC (pGC); FreeScratchGC (pGC);
} }

View File

@ -263,7 +263,7 @@ MultibufferPaintBackgroundRegion(pWin, pDrawable, pRegion)
int nrects = REGION_NUM_RECTS(pRegion); int nrects = REGION_NUM_RECTS(pRegion);
BoxPtr pbox = REGION_RECTS(pRegion); BoxPtr pbox = REGION_RECTS(pRegion);
pRects = (xRectangle *)ALLOCATE_LOCAL(nrects * sizeof(xRectangle)); pRects = (xRectangle *)xalloc(nrects * sizeof(xRectangle));
if (pRects) if (pRects)
{ {
int i; int i;
@ -275,7 +275,7 @@ MultibufferPaintBackgroundRegion(pWin, pDrawable, pRegion)
pRects[i].height = pbox->y2 - pbox->y1; pRects[i].height = pbox->y2 - pbox->y1;
} }
MultibufferPaintBackgroundRectangles(pWin, pDrawable, nrects, pRects); MultibufferPaintBackgroundRectangles(pWin, pDrawable, nrects, pRects);
DEALLOCATE_LOCAL(pRects); xfree(pRects);
} }
} }

View File

@ -1272,7 +1272,7 @@ int PanoramiXPolyPoint(ClientPtr client)
isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root; isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root;
npoint = ((client->req_len << 2) - sizeof(xPolyPointReq)) >> 2; npoint = ((client->req_len << 2) - sizeof(xPolyPointReq)) >> 2;
if (npoint > 0) { if (npoint > 0) {
origPts = (xPoint *) ALLOCATE_LOCAL(npoint * sizeof(xPoint)); origPts = (xPoint *) xalloc(npoint * sizeof(xPoint));
memcpy((char *) origPts, (char *) &stuff[1], npoint * sizeof(xPoint)); memcpy((char *) origPts, (char *) &stuff[1], npoint * sizeof(xPoint));
FOR_NSCREENS_FORWARD(j){ FOR_NSCREENS_FORWARD(j){
@ -1299,7 +1299,7 @@ int PanoramiXPolyPoint(ClientPtr client)
result = (* SavedProcVector[X_PolyPoint])(client); result = (* SavedProcVector[X_PolyPoint])(client);
if(result != Success) break; if(result != Success) break;
} }
DEALLOCATE_LOCAL(origPts); xfree(origPts);
return (result); return (result);
} else } else
return (client->noClientException); return (client->noClientException);
@ -1330,7 +1330,7 @@ int PanoramiXPolyLine(ClientPtr client)
isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root; isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root;
npoint = ((client->req_len << 2) - sizeof(xPolyLineReq)) >> 2; npoint = ((client->req_len << 2) - sizeof(xPolyLineReq)) >> 2;
if (npoint > 0){ if (npoint > 0){
origPts = (xPoint *) ALLOCATE_LOCAL(npoint * sizeof(xPoint)); origPts = (xPoint *) xalloc(npoint * sizeof(xPoint));
memcpy((char *) origPts, (char *) &stuff[1], npoint * sizeof(xPoint)); memcpy((char *) origPts, (char *) &stuff[1], npoint * sizeof(xPoint));
FOR_NSCREENS_FORWARD(j){ FOR_NSCREENS_FORWARD(j){
@ -1357,7 +1357,7 @@ int PanoramiXPolyLine(ClientPtr client)
result = (* SavedProcVector[X_PolyLine])(client); result = (* SavedProcVector[X_PolyLine])(client);
if(result != Success) break; if(result != Success) break;
} }
DEALLOCATE_LOCAL(origPts); xfree(origPts);
return (result); return (result);
} else } else
return (client->noClientException); return (client->noClientException);
@ -1391,7 +1391,7 @@ int PanoramiXPolySegment(ClientPtr client)
if(nsegs & 4) return BadLength; if(nsegs & 4) return BadLength;
nsegs >>= 3; nsegs >>= 3;
if (nsegs > 0) { if (nsegs > 0) {
origSegs = (xSegment *) ALLOCATE_LOCAL(nsegs * sizeof(xSegment)); origSegs = (xSegment *) xalloc(nsegs * sizeof(xSegment));
memcpy((char *) origSegs, (char *) &stuff[1], nsegs * sizeof(xSegment)); memcpy((char *) origSegs, (char *) &stuff[1], nsegs * sizeof(xSegment));
FOR_NSCREENS_FORWARD(j){ FOR_NSCREENS_FORWARD(j){
@ -1418,7 +1418,7 @@ int PanoramiXPolySegment(ClientPtr client)
result = (* SavedProcVector[X_PolySegment])(client); result = (* SavedProcVector[X_PolySegment])(client);
if(result != Success) break; if(result != Success) break;
} }
DEALLOCATE_LOCAL(origSegs); xfree(origSegs);
return (result); return (result);
} else } else
return (client->noClientException); return (client->noClientException);
@ -1453,7 +1453,7 @@ int PanoramiXPolyRectangle(ClientPtr client)
if(nrects & 4) return BadLength; if(nrects & 4) return BadLength;
nrects >>= 3; nrects >>= 3;
if (nrects > 0){ if (nrects > 0){
origRecs = (xRectangle *) ALLOCATE_LOCAL(nrects * sizeof(xRectangle)); origRecs = (xRectangle *) xalloc(nrects * sizeof(xRectangle));
memcpy((char *)origRecs,(char *)&stuff[1],nrects * sizeof(xRectangle)); memcpy((char *)origRecs,(char *)&stuff[1],nrects * sizeof(xRectangle));
FOR_NSCREENS_FORWARD(j){ FOR_NSCREENS_FORWARD(j){
@ -1479,7 +1479,7 @@ int PanoramiXPolyRectangle(ClientPtr client)
result = (* SavedProcVector[X_PolyRectangle])(client); result = (* SavedProcVector[X_PolyRectangle])(client);
if(result != Success) break; if(result != Success) break;
} }
DEALLOCATE_LOCAL(origRecs); xfree(origRecs);
return (result); return (result);
} else } else
return (client->noClientException); return (client->noClientException);
@ -1513,7 +1513,7 @@ int PanoramiXPolyArc(ClientPtr client)
if(narcs % sizeof(xArc)) return BadLength; if(narcs % sizeof(xArc)) return BadLength;
narcs /= sizeof(xArc); narcs /= sizeof(xArc);
if (narcs > 0){ if (narcs > 0){
origArcs = (xArc *) ALLOCATE_LOCAL(narcs * sizeof(xArc)); origArcs = (xArc *) xalloc(narcs * sizeof(xArc));
memcpy((char *) origArcs, (char *) &stuff[1], narcs * sizeof(xArc)); memcpy((char *) origArcs, (char *) &stuff[1], narcs * sizeof(xArc));
FOR_NSCREENS_FORWARD(j){ FOR_NSCREENS_FORWARD(j){
@ -1537,7 +1537,7 @@ int PanoramiXPolyArc(ClientPtr client)
result = (* SavedProcVector[X_PolyArc])(client); result = (* SavedProcVector[X_PolyArc])(client);
if(result != Success) break; if(result != Success) break;
} }
DEALLOCATE_LOCAL(origArcs); xfree(origArcs);
return (result); return (result);
} else } else
return (client->noClientException); return (client->noClientException);
@ -1569,7 +1569,7 @@ int PanoramiXFillPoly(ClientPtr client)
count = ((client->req_len << 2) - sizeof(xFillPolyReq)) >> 2; count = ((client->req_len << 2) - sizeof(xFillPolyReq)) >> 2;
if (count > 0){ if (count > 0){
locPts = (DDXPointPtr) ALLOCATE_LOCAL(count * sizeof(DDXPointRec)); locPts = (DDXPointPtr) xalloc(count * sizeof(DDXPointRec));
memcpy((char *)locPts, (char *)&stuff[1], count * sizeof(DDXPointRec)); memcpy((char *)locPts, (char *)&stuff[1], count * sizeof(DDXPointRec));
FOR_NSCREENS_FORWARD(j){ FOR_NSCREENS_FORWARD(j){
@ -1596,7 +1596,7 @@ int PanoramiXFillPoly(ClientPtr client)
result = (* SavedProcVector[X_FillPoly])(client); result = (* SavedProcVector[X_FillPoly])(client);
if(result != Success) break; if(result != Success) break;
} }
DEALLOCATE_LOCAL(locPts); xfree(locPts);
return (result); return (result);
} else } else
return (client->noClientException); return (client->noClientException);
@ -1630,7 +1630,7 @@ int PanoramiXPolyFillRectangle(ClientPtr client)
if(things & 4) return BadLength; if(things & 4) return BadLength;
things >>= 3; things >>= 3;
if (things > 0){ if (things > 0){
origRects = (xRectangle *) ALLOCATE_LOCAL(things * sizeof(xRectangle)); origRects = (xRectangle *) xalloc(things * sizeof(xRectangle));
memcpy((char*)origRects,(char*)&stuff[1], things * sizeof(xRectangle)); memcpy((char*)origRects,(char*)&stuff[1], things * sizeof(xRectangle));
FOR_NSCREENS_FORWARD(j){ FOR_NSCREENS_FORWARD(j){
@ -1655,7 +1655,7 @@ int PanoramiXPolyFillRectangle(ClientPtr client)
result = (* SavedProcVector[X_PolyFillRectangle])(client); result = (* SavedProcVector[X_PolyFillRectangle])(client);
if(result != Success) break; if(result != Success) break;
} }
DEALLOCATE_LOCAL(origRects); xfree(origRects);
return (result); return (result);
} else } else
return (client->noClientException); return (client->noClientException);
@ -1689,7 +1689,7 @@ int PanoramiXPolyFillArc(ClientPtr client)
IF_RETURN((narcs % sizeof(xArc)), BadLength); IF_RETURN((narcs % sizeof(xArc)), BadLength);
narcs /= sizeof(xArc); narcs /= sizeof(xArc);
if (narcs > 0) { if (narcs > 0) {
origArcs = (xArc *) ALLOCATE_LOCAL(narcs * sizeof(xArc)); origArcs = (xArc *) xalloc(narcs * sizeof(xArc));
memcpy((char *) origArcs, (char *)&stuff[1], narcs * sizeof(xArc)); memcpy((char *) origArcs, (char *)&stuff[1], narcs * sizeof(xArc));
FOR_NSCREENS_FORWARD(j){ FOR_NSCREENS_FORWARD(j){
@ -1714,7 +1714,7 @@ int PanoramiXPolyFillArc(ClientPtr client)
result = (* SavedProcVector[X_PolyFillArc])(client); result = (* SavedProcVector[X_PolyFillArc])(client);
if(result != Success) break; if(result != Success) break;
} }
DEALLOCATE_LOCAL(origArcs); xfree(origArcs);
return (result); return (result);
} else } else
return (client->noClientException); return (client->noClientException);

View File

@ -673,7 +673,7 @@ CreateSaverWindow (pScreen)
wantMap = wColormap (pWin); wantMap = wColormap (pWin);
if (wantMap == None) if (wantMap == None)
return TRUE; return TRUE;
installedMaps = (Colormap *) ALLOCATE_LOCAL (pScreen->maxInstalledCmaps * installedMaps = (Colormap *) xalloc (pScreen->maxInstalledCmaps *
sizeof (Colormap)); sizeof (Colormap));
numInstalled = (*pWin->drawable.pScreen->ListInstalledColormaps) numInstalled = (*pWin->drawable.pScreen->ListInstalledColormaps)
(pScreen, installedMaps); (pScreen, installedMaps);
@ -681,7 +681,7 @@ CreateSaverWindow (pScreen)
if (installedMaps[i] == wantMap) if (installedMaps[i] == wantMap)
break; break;
DEALLOCATE_LOCAL ((char *) installedMaps); xfree ((char *) installedMaps);
if (i < numInstalled) if (i < numInstalled)
return TRUE; return TRUE;

View File

@ -1060,7 +1060,7 @@ ProcShapeGetRectangles (client)
} }
if (!region) { if (!region) {
nrects = 1; nrects = 1;
rects = (xRectangle *) ALLOCATE_LOCAL (sizeof (xRectangle)); rects = (xRectangle *) xalloc (sizeof (xRectangle));
if (!rects) if (!rects)
return BadAlloc; return BadAlloc;
switch (stuff->kind) { switch (stuff->kind) {
@ -1087,7 +1087,7 @@ ProcShapeGetRectangles (client)
BoxPtr box; BoxPtr box;
nrects = REGION_NUM_RECTS(region); nrects = REGION_NUM_RECTS(region);
box = REGION_RECTS(region); box = REGION_RECTS(region);
rects = (xRectangle *) ALLOCATE_LOCAL (nrects * sizeof (xRectangle)); rects = (xRectangle *) xalloc (nrects * sizeof (xRectangle));
if (!rects && nrects) if (!rects && nrects)
return BadAlloc; return BadAlloc;
for (i = 0; i < nrects; i++, box++) { for (i = 0; i < nrects; i++, box++) {
@ -1110,7 +1110,7 @@ ProcShapeGetRectangles (client)
} }
WriteToClient (client, sizeof (rep), (char *) &rep); WriteToClient (client, sizeof (rep), (char *) &rep);
WriteToClient (client, nrects * sizeof (xRectangle), (char *) rects); WriteToClient (client, nrects * sizeof (xRectangle), (char *) rects);
DEALLOCATE_LOCAL (rects); xfree (rects);
return client->noClientException; return client->noClientException;
} }

View File

@ -601,7 +601,7 @@ SyncSendCounterNotifyEvents(client, ppAwait, num_events)
if (client->clientGone) if (client->clientGone)
return; return;
pev = pEvents = (xSyncCounterNotifyEvent *) pev = pEvents = (xSyncCounterNotifyEvent *)
ALLOCATE_LOCAL(num_events * sizeof(xSyncCounterNotifyEvent)); xalloc(num_events * sizeof(xSyncCounterNotifyEvent));
if (!pEvents) if (!pEvents)
return; return;
UpdateCurrentTime(); UpdateCurrentTime();
@ -622,7 +622,7 @@ SyncSendCounterNotifyEvents(client, ppAwait, num_events)
} }
/* swapping will be taken care of by this */ /* swapping will be taken care of by this */
WriteEventsToClient(client, num_events, (xEvent *)pEvents); WriteEventsToClient(client, num_events, (xEvent *)pEvents);
DEALLOCATE_LOCAL(pEvents); xfree(pEvents);
} }
@ -732,7 +732,7 @@ SyncAwaitTriggerFired(pTrigger)
pAwaitUnion = (SyncAwaitUnion *)pAwait->pHeader; pAwaitUnion = (SyncAwaitUnion *)pAwait->pHeader;
numwaits = pAwaitUnion->header.num_waitconditions; numwaits = pAwaitUnion->header.num_waitconditions;
ppAwait = (SyncAwait **)ALLOCATE_LOCAL(numwaits * sizeof(SyncAwait *)); ppAwait = (SyncAwait **)xalloc(numwaits * sizeof(SyncAwait *));
if (!ppAwait) if (!ppAwait)
goto bail; goto bail;
@ -801,7 +801,7 @@ SyncAwaitTriggerFired(pTrigger)
if (num_events) if (num_events)
SyncSendCounterNotifyEvents(pAwaitUnion->header.client, ppAwait, SyncSendCounterNotifyEvents(pAwaitUnion->header.client, ppAwait,
num_events); num_events);
DEALLOCATE_LOCAL(ppAwait); xfree(ppAwait);
bail: bail:
/* unblock the client */ /* unblock the client */
@ -1396,7 +1396,7 @@ ProcSyncListSystemCounters(client)
if (len) if (len)
{ {
walklist = list = (xSyncSystemCounter *) ALLOCATE_LOCAL(len); walklist = list = (xSyncSystemCounter *) xalloc(len);
if (!list) if (!list)
return BadAlloc; return BadAlloc;
} }
@ -1442,7 +1442,7 @@ ProcSyncListSystemCounters(client)
if (len) if (len)
{ {
WriteToClient(client, len, (char *) list); WriteToClient(client, len, (char *) list);
DEALLOCATE_LOCAL(list); xfree(list);
} }
return (client->noClientException); return (client->noClientException);

View File

@ -437,7 +437,7 @@ XaceCensorImage(client, pVisibleRegion, widthBytesLine, pDraw, x, y, w, h,
/* convert region to list-of-rectangles for PolyFillRect */ /* convert region to list-of-rectangles for PolyFillRect */
pRects = (xRectangle *)ALLOCATE_LOCAL(nRects * sizeof(xRectangle *)); pRects = (xRectangle *)xalloc(nRects * sizeof(xRectangle *));
if (!pRects) if (!pRects)
{ {
failed = TRUE; failed = TRUE;
@ -489,7 +489,7 @@ XaceCensorImage(client, pVisibleRegion, widthBytesLine, pDraw, x, y, w, h,
*/ */
bzero(pBuf, (int)(widthBytesLine * h)); bzero(pBuf, (int)(widthBytesLine * h));
} }
if (pRects) DEALLOCATE_LOCAL(pRects); if (pRects) xfree(pRects);
if (pScratchGC) FreeScratchGC(pScratchGC); if (pScratchGC) FreeScratchGC(pScratchGC);
if (pPix) FreeScratchPixmapHeader(pPix); if (pPix) FreeScratchPixmapHeader(pPix);
} }

View File

@ -491,7 +491,7 @@ ProcXF86BigfontQueryFont(
} else { } else {
#endif #endif
pCI = (xCharInfo *) pCI = (xCharInfo *)
ALLOCATE_LOCAL(nCharInfos * sizeof(xCharInfo)); xalloc(nCharInfos * sizeof(xCharInfo));
if (!pCI) if (!pCI)
return BadAlloc; return BadAlloc;
#ifdef HAS_SHM #ifdef HAS_SHM
@ -554,9 +554,9 @@ ProcXF86BigfontQueryFont(
hashModulus = nCharInfos+1; hashModulus = nCharInfos+1;
tmp = (CARD16*) tmp = (CARD16*)
ALLOCATE_LOCAL((4*nCharInfos+1) * sizeof(CARD16)); xalloc((4*nCharInfos+1) * sizeof(CARD16));
if (!tmp) { if (!tmp) {
if (!pDesc) DEALLOCATE_LOCAL(pCI); if (!pDesc) xfree(pCI);
return BadAlloc; return BadAlloc;
} }
pIndex2UniqIndex = tmp; pIndex2UniqIndex = tmp;
@ -639,12 +639,12 @@ ProcXF86BigfontQueryFont(
+ (nCharInfos+1)/2 * 2 * sizeof(CARD16) + (nCharInfos+1)/2 * 2 * sizeof(CARD16)
: 0); : 0);
xXF86BigfontQueryFontReply* reply = xXF86BigfontQueryFontReply* reply =
(xXF86BigfontQueryFontReply *) ALLOCATE_LOCAL(rlength); (xXF86BigfontQueryFontReply *) xalloc(rlength);
char* p; char* p;
if (!reply) { if (!reply) {
if (nCharInfos > 0) { if (nCharInfos > 0) {
if (shmid == -1) DEALLOCATE_LOCAL(pIndex2UniqIndex); if (shmid == -1) xfree(pIndex2UniqIndex);
if (!pDesc) DEALLOCATE_LOCAL(pCI); if (!pDesc) xfree(pCI);
} }
return BadAlloc; return BadAlloc;
} }
@ -722,10 +722,10 @@ ProcXF86BigfontQueryFont(
} }
} }
WriteToClient(client, rlength, (char *)reply); WriteToClient(client, rlength, (char *)reply);
DEALLOCATE_LOCAL(reply); xfree(reply);
if (nCharInfos > 0) { if (nCharInfos > 0) {
if (shmid == -1) DEALLOCATE_LOCAL(pIndex2UniqIndex); if (shmid == -1) xfree(pIndex2UniqIndex);
if (!pDesc) DEALLOCATE_LOCAL(pCI); if (!pDesc) xfree(pCI);
} }
return (client->noClientException); return (client->noClientException);
} }

View File

@ -63,7 +63,7 @@ ProcXResQueryClients (ClientPtr client)
REQUEST_SIZE_MATCH(xXResQueryClientsReq); REQUEST_SIZE_MATCH(xXResQueryClientsReq);
current_clients = ALLOCATE_LOCAL((currentMaxClients - 1) * sizeof(int)); current_clients = xalloc((currentMaxClients - 1) * sizeof(int));
num_clients = 0; num_clients = 0;
for(i = 1; i < currentMaxClients; i++) { for(i = 1; i < currentMaxClients; i++) {
@ -101,7 +101,7 @@ ProcXResQueryClients (ClientPtr client)
} }
} }
DEALLOCATE_LOCAL(current_clients); xfree(current_clients);
return (client->noClientException); return (client->noClientException);
} }
@ -134,7 +134,7 @@ ProcXResQueryClientResources (ClientPtr client)
return BadValue; return BadValue;
} }
counts = ALLOCATE_LOCAL((lastResourceType + 1) * sizeof(int)); counts = xalloc((lastResourceType + 1) * sizeof(int));
memset(counts, 0, (lastResourceType + 1) * sizeof(int)); memset(counts, 0, (lastResourceType + 1) * sizeof(int));
@ -183,7 +183,7 @@ ProcXResQueryClientResources (ClientPtr client)
} }
} }
DEALLOCATE_LOCAL(counts); xfree(counts);
return (client->noClientException); return (client->noClientException);
} }

View File

@ -135,7 +135,7 @@ ProcXGetDeviceMotionEvents(ClientPtr client)
if (num_events) { if (num_events) {
size = sizeof(Time) + (axes * sizeof(INT32)); size = sizeof(Time) + (axes * sizeof(INT32));
tsize = num_events * size; tsize = num_events * size;
coords = (INT32 *) ALLOCATE_LOCAL(tsize); coords = (INT32 *) xalloc(tsize);
if (!coords) if (!coords)
return BadAlloc; return BadAlloc;
rep.nEvents = (v->GetMotionProc) (dev, (xTimecoord *) coords, /* XXX */ rep.nEvents = (v->GetMotionProc) (dev, (xTimecoord *) coords, /* XXX */
@ -161,7 +161,7 @@ ProcXGetDeviceMotionEvents(ClientPtr client)
WriteToClient(client, length * 4, (char *)coords); WriteToClient(client, length * 4, (char *)coords);
} }
if (coords) if (coords)
DEALLOCATE_LOCAL(coords); xfree(coords);
return Success; return Success;
} }

View File

@ -279,7 +279,7 @@ afbBitBlt(register DrawablePtr pSrcDrawable, register DrawablePtr pDstDrawable,
/* Do bit blitting */ /* Do bit blitting */
numRects = REGION_NUM_RECTS(&rgnDst); numRects = REGION_NUM_RECTS(&rgnDst);
if (numRects && width && height) { if (numRects && width && height) {
if(!(pptSrc = (DDXPointPtr)ALLOCATE_LOCAL(numRects * if(!(pptSrc = (DDXPointPtr)xalloc(numRects *
sizeof(DDXPointRec)))) { sizeof(DDXPointRec)))) {
REGION_UNINIT(pGC->pScreen, &rgnDst); REGION_UNINIT(pGC->pScreen, &rgnDst);
if (freeSrcClip) if (freeSrcClip)
@ -296,7 +296,7 @@ afbBitBlt(register DrawablePtr pSrcDrawable, register DrawablePtr pDstDrawable,
(*doBitBlt)(pSrcDrawable, pDstDrawable, pGC->alu, &rgnDst, pptSrc, (*doBitBlt)(pSrcDrawable, pDstDrawable, pGC->alu, &rgnDst, pptSrc,
planemask); planemask);
DEALLOCATE_LOCAL(pptSrc); xfree(pptSrc);
} }
prgnExposed = NULL; prgnExposed = NULL;

View File

@ -132,12 +132,12 @@ MROP_NAME(afbDoBitblt)(pSrc, pDst, alu, prgnDst, pptSrc, planemask)
if (nbox > 1) { if (nbox > 1) {
/* keep ordering in each band, reverse order of bands */ /* keep ordering in each band, reverse order of bands */
pboxNew1 = (BoxPtr)ALLOCATE_LOCAL(sizeof(BoxRec)*nbox); pboxNew1 = (BoxPtr)xalloc(sizeof(BoxRec)*nbox);
if(!pboxNew1) if(!pboxNew1)
return; return;
pptNew1 = (DDXPointPtr)ALLOCATE_LOCAL(sizeof(DDXPointRec)*nbox); pptNew1 = (DDXPointPtr)xalloc(sizeof(DDXPointRec)*nbox);
if(!pptNew1) { if(!pptNew1) {
DEALLOCATE_LOCAL(pboxNew1); xfree(pboxNew1);
return; return;
} }
pboxBase = pboxNext = pbox+nbox-1; pboxBase = pboxNext = pbox+nbox-1;
@ -169,16 +169,16 @@ MROP_NAME(afbDoBitblt)(pSrc, pDst, alu, prgnDst, pptSrc, planemask)
if (nbox > 1) { if (nbox > 1) {
/* reverse order of rects in each band */ /* reverse order of rects in each band */
pboxNew2 = (BoxPtr)ALLOCATE_LOCAL(sizeof(BoxRec) * nbox); pboxNew2 = (BoxPtr)xalloc(sizeof(BoxRec) * nbox);
pptNew2 = (DDXPointPtr)ALLOCATE_LOCAL(sizeof(DDXPointRec) * nbox); pptNew2 = (DDXPointPtr)xalloc(sizeof(DDXPointRec) * nbox);
if(!pboxNew2 || !pptNew2) { if(!pboxNew2 || !pptNew2) {
if (pptNew2) if (pptNew2)
DEALLOCATE_LOCAL(pptNew2); xfree(pptNew2);
if (pboxNew2) if (pboxNew2)
DEALLOCATE_LOCAL(pboxNew2); xfree(pboxNew2);
if (pboxNew1) { if (pboxNew1) {
DEALLOCATE_LOCAL(pptNew1); xfree(pptNew1);
DEALLOCATE_LOCAL(pboxNew1); xfree(pboxNew1);
} }
return; return;
} }
@ -553,11 +553,11 @@ bits1 = *--psrc; --pdst; \
pptSrc++; pptSrc++;
} }
if (pboxNew2) { if (pboxNew2) {
DEALLOCATE_LOCAL(pptNew2); xfree(pptNew2);
DEALLOCATE_LOCAL(pboxNew2); xfree(pboxNew2);
} }
if (pboxNew1) { if (pboxNew1) {
DEALLOCATE_LOCAL(pptNew1); xfree(pptNew1);
DEALLOCATE_LOCAL(pboxNew1); xfree(pboxNew1);
} }
} }

View File

@ -111,7 +111,7 @@ afbPolyFillRect(DrawablePtr pDrawable, GCPtr pGC, int nrectFill, xRectangle *pre
numRects = REGION_NUM_RECTS(prgnClip) * nrectFill; numRects = REGION_NUM_RECTS(prgnClip) * nrectFill;
if (numRects > NUM_STACK_RECTS) { if (numRects > NUM_STACK_RECTS) {
pboxClippedBase = (BoxPtr)ALLOCATE_LOCAL(numRects * sizeof(BoxRec)); pboxClippedBase = (BoxPtr)xalloc(numRects * sizeof(BoxRec));
if (!pboxClippedBase) if (!pboxClippedBase)
return; return;
} }
@ -287,5 +287,5 @@ afbPolyFillRect(DrawablePtr pDrawable, GCPtr pGC, int nrectFill, xRectangle *pre
} }
} }
if (pboxClippedBase != stackRects) if (pboxClippedBase != stackRects)
DEALLOCATE_LOCAL(pboxClippedBase); xfree(pboxClippedBase);
} }

View File

@ -109,11 +109,11 @@ afbSolidFS(pDrawable, pGC, nInit, pptInit, pwidthInit, fSorted)
unsigned char *rrops; unsigned char *rrops;
n = nInit * miFindMaxBand(pGC->pCompositeClip); n = nInit * miFindMaxBand(pGC->pCompositeClip);
pwidthFree = (int *)ALLOCATE_LOCAL(n * sizeof(int)); pwidthFree = (int *)xalloc(n * sizeof(int));
pptFree = (DDXPointRec *)ALLOCATE_LOCAL(n * sizeof(DDXPointRec)); pptFree = (DDXPointRec *)xalloc(n * sizeof(DDXPointRec));
if(!pptFree || !pwidthFree) { if(!pptFree || !pwidthFree) {
if (pptFree) DEALLOCATE_LOCAL(pptFree); if (pptFree) xfree(pptFree);
if (pwidthFree) DEALLOCATE_LOCAL(pwidthFree); if (pwidthFree) xfree(pwidthFree);
return; return;
} }
pwidth = pwidthFree; pwidth = pwidthFree;
@ -183,8 +183,8 @@ afbSolidFS(pDrawable, pGC, nInit, pptInit, pwidthInit, fSorted)
pwidth++; pwidth++;
ppt++; ppt++;
} }
DEALLOCATE_LOCAL(pptFree); xfree(pptFree);
DEALLOCATE_LOCAL(pwidthFree); xfree(pwidthFree);
} }
void void
@ -219,11 +219,11 @@ afbStippleFS(pDrawable, pGC, nInit, pptInit, pwidthInit, fSorted)
unsigned char *rrops; unsigned char *rrops;
n = nInit * miFindMaxBand(pGC->pCompositeClip); n = nInit * miFindMaxBand(pGC->pCompositeClip);
pwidthFree = (int *)ALLOCATE_LOCAL(n * sizeof(int)); pwidthFree = (int *)xalloc(n * sizeof(int));
pptFree = (DDXPointRec *)ALLOCATE_LOCAL(n * sizeof(DDXPointRec)); pptFree = (DDXPointRec *)xalloc(n * sizeof(DDXPointRec));
if(!pptFree || !pwidthFree) { if(!pptFree || !pwidthFree) {
if (pptFree) DEALLOCATE_LOCAL(pptFree); if (pptFree) xfree(pptFree);
if (pwidthFree) DEALLOCATE_LOCAL(pwidthFree); if (pwidthFree) xfree(pwidthFree);
return; return;
} }
pwidth = pwidthFree; pwidth = pwidthFree;
@ -297,8 +297,8 @@ afbStippleFS(pDrawable, pGC, nInit, pptInit, pwidthInit, fSorted)
pwidth++; pwidth++;
ppt++; ppt++;
} }
DEALLOCATE_LOCAL(pptFree); xfree(pptFree);
DEALLOCATE_LOCAL(pwidthFree); xfree(pwidthFree);
} }
void void
@ -333,11 +333,11 @@ afbTileFS(pDrawable, pGC, nInit, pptInit, pwidthInit, fSorted)
int d; int d;
n = nInit * miFindMaxBand(pGC->pCompositeClip); n = nInit * miFindMaxBand(pGC->pCompositeClip);
pwidthFree = (int *)ALLOCATE_LOCAL(n * sizeof(int)); pwidthFree = (int *)xalloc(n * sizeof(int));
pptFree = (DDXPointRec *)ALLOCATE_LOCAL(n * sizeof(DDXPointRec)); pptFree = (DDXPointRec *)xalloc(n * sizeof(DDXPointRec));
if(!pptFree || !pwidthFree) { if(!pptFree || !pwidthFree) {
if (pptFree) DEALLOCATE_LOCAL(pptFree); if (pptFree) xfree(pptFree);
if (pwidthFree) DEALLOCATE_LOCAL(pwidthFree); if (pwidthFree) xfree(pwidthFree);
return; return;
} }
pwidth = pwidthFree; pwidth = pwidthFree;
@ -428,8 +428,8 @@ afbTileFS(pDrawable, pGC, nInit, pptInit, pwidthInit, fSorted)
break; break;
} }
} }
DEALLOCATE_LOCAL(pptFree); xfree(pptFree);
DEALLOCATE_LOCAL(pwidthFree); xfree(pwidthFree);
} }
void void
@ -465,11 +465,11 @@ afbOpaqueStippleFS(pDrawable, pGC, nInit, pptInit, pwidthInit, fSorted)
int d; int d;
n = nInit * miFindMaxBand(pGC->pCompositeClip); n = nInit * miFindMaxBand(pGC->pCompositeClip);
pwidthFree = (int *)ALLOCATE_LOCAL(n * sizeof(int)); pwidthFree = (int *)xalloc(n * sizeof(int));
pptFree = (DDXPointRec *)ALLOCATE_LOCAL(n * sizeof(DDXPointRec)); pptFree = (DDXPointRec *)xalloc(n * sizeof(DDXPointRec));
if(!pptFree || !pwidthFree) { if(!pptFree || !pwidthFree) {
if (pptFree) DEALLOCATE_LOCAL(pptFree); if (pptFree) xfree(pptFree);
if (pwidthFree) DEALLOCATE_LOCAL(pwidthFree); if (pwidthFree) xfree(pwidthFree);
return; return;
} }
pwidth = pwidthFree; pwidth = pwidthFree;
@ -587,8 +587,8 @@ afbOpaqueStippleFS(pDrawable, pGC, nInit, pptInit, pwidthInit, fSorted)
break; break;
} }
} /* switch (rop) */ } /* switch (rop) */
DEALLOCATE_LOCAL(pptFree); xfree(pptFree);
DEALLOCATE_LOCAL(pwidthFree); xfree(pwidthFree);
} }
/* Fill spans with tiles that aren't PPW bits wide */ /* Fill spans with tiles that aren't PPW bits wide */
@ -626,11 +626,11 @@ afbUnnaturalTileFS(pDrawable, pGC, nInit, pptInit, pwidthInit, fSorted)
register int d; register int d;
n = nInit * miFindMaxBand(pGC->pCompositeClip); n = nInit * miFindMaxBand(pGC->pCompositeClip);
pwidthFree = (int *)ALLOCATE_LOCAL(n * sizeof(int)); pwidthFree = (int *)xalloc(n * sizeof(int));
pptFree = (DDXPointRec *)ALLOCATE_LOCAL(n * sizeof(DDXPointRec)); pptFree = (DDXPointRec *)xalloc(n * sizeof(DDXPointRec));
if(!pptFree || !pwidthFree) { if(!pptFree || !pwidthFree) {
if (pptFree) DEALLOCATE_LOCAL(pptFree); if (pptFree) xfree(pptFree);
if (pwidthFree) DEALLOCATE_LOCAL(pwidthFree); if (pwidthFree) xfree(pwidthFree);
return; return;
} }
pwidth = pwidthFree; pwidth = pwidthFree;
@ -732,8 +732,8 @@ afbUnnaturalTileFS(pDrawable, pGC, nInit, pptInit, pwidthInit, fSorted)
ppt++; ppt++;
pwidth++; pwidth++;
} }
DEALLOCATE_LOCAL(pptFree); xfree(pptFree);
DEALLOCATE_LOCAL(pwidthFree); xfree(pwidthFree);
} }
/* Fill spans with stipples that aren't PPW bits wide */ /* Fill spans with stipples that aren't PPW bits wide */
@ -772,11 +772,11 @@ afbUnnaturalStippleFS(pDrawable, pGC, nInit, pptInit, pwidthInit, fSorted)
int depthDst; int depthDst;
n = nInit * miFindMaxBand(pGC->pCompositeClip); n = nInit * miFindMaxBand(pGC->pCompositeClip);
pwidthFree = (int *)ALLOCATE_LOCAL(n * sizeof(int)); pwidthFree = (int *)xalloc(n * sizeof(int));
pptFree = (DDXPointRec *)ALLOCATE_LOCAL(n * sizeof(DDXPointRec)); pptFree = (DDXPointRec *)xalloc(n * sizeof(DDXPointRec));
if(!pptFree || !pwidthFree) { if(!pptFree || !pwidthFree) {
if (pptFree) DEALLOCATE_LOCAL(pptFree); if (pptFree) xfree(pptFree);
if (pwidthFree) DEALLOCATE_LOCAL(pwidthFree); if (pwidthFree) xfree(pwidthFree);
return; return;
} }
pwidth = pwidthFree; pwidth = pwidthFree;
@ -877,8 +877,8 @@ afbUnnaturalStippleFS(pDrawable, pGC, nInit, pptInit, pwidthInit, fSorted)
ppt++; ppt++;
pwidth++; pwidth++;
} }
DEALLOCATE_LOCAL(pptFree); xfree(pptFree);
DEALLOCATE_LOCAL(pwidthFree); xfree(pwidthFree);
} }
/* Fill spans with OpaqueStipples that aren't PPW bits wide */ /* Fill spans with OpaqueStipples that aren't PPW bits wide */
@ -918,11 +918,11 @@ afbUnnaturalOpaqueStippleFS(pDrawable, pGC, nInit, pptInit, pwidthInit, fSorted)
int depthDst; int depthDst;
n = nInit * miFindMaxBand(pGC->pCompositeClip); n = nInit * miFindMaxBand(pGC->pCompositeClip);
pwidthFree = (int *)ALLOCATE_LOCAL(n * sizeof(int)); pwidthFree = (int *)xalloc(n * sizeof(int));
pptFree = (DDXPointRec *)ALLOCATE_LOCAL(n * sizeof(DDXPointRec)); pptFree = (DDXPointRec *)xalloc(n * sizeof(DDXPointRec));
if(!pptFree || !pwidthFree) { if(!pptFree || !pwidthFree) {
if (pptFree) DEALLOCATE_LOCAL(pptFree); if (pptFree) xfree(pptFree);
if (pwidthFree) DEALLOCATE_LOCAL(pwidthFree); if (pwidthFree) xfree(pwidthFree);
return; return;
} }
pwidth = pwidthFree; pwidth = pwidthFree;
@ -1124,6 +1124,6 @@ afbUnnaturalOpaqueStippleFS(pDrawable, pGC, nInit, pptInit, pwidthInit, fSorted)
ppt++; ppt++;
pwidth++; pwidth++;
} }
DEALLOCATE_LOCAL(pptFree); xfree(pptFree);
DEALLOCATE_LOCAL(pwidthFree); xfree(pwidthFree);
} }

View File

@ -298,7 +298,7 @@ afbImageGlyphBlt(pDrawable, pGC, x, y, nglyph, ppci, pglyphBase)
int getWidth; /* bits to get from glyph */ int getWidth; /* bits to get from glyph */
#endif #endif
if(!(ppos = (afbTEXTPOS *)ALLOCATE_LOCAL(nglyph * sizeof(afbTEXTPOS)))) if(!(ppos = (afbTEXTPOS *)xalloc(nglyph * sizeof(afbTEXTPOS))))
return; return;
pdstBase = afbScanlineNoBankSwitch(pdstBase, x, y, widthDst); pdstBase = afbScanlineNoBankSwitch(pdstBase, x, y, widthDst);
@ -462,7 +462,7 @@ afbImageGlyphBlt(pDrawable, pGC, x, y, nglyph, ppci, pglyphBase)
} /* depth */ } /* depth */
} /* for each glyph */ } /* for each glyph */
} /* while nbox-- */ } /* while nbox-- */
DEALLOCATE_LOCAL(ppos); xfree(ppos);
break; break;
} }

View File

@ -251,7 +251,7 @@ afbYRotatePixmap(pPix, rh)
nbyDown = rh * pPix->devKind; nbyDown = rh * pPix->devKind;
nbyUp = (pPix->devKind * height) - nbyDown; nbyUp = (pPix->devKind * height) - nbyDown;
if(!(ptmp = (char *)ALLOCATE_LOCAL(nbyUp))) if(!(ptmp = (char *)xalloc(nbyUp)))
return; return;
for (d = 0; d < pPix->drawable.depth; d++) { for (d = 0; d < pPix->drawable.depth; d++) {
@ -261,7 +261,7 @@ afbYRotatePixmap(pPix, rh)
memmove(pbase, pbase+nbyUp, nbyDown); /* slide the top rows down */ memmove(pbase, pbase+nbyUp, nbyDown); /* slide the top rows down */
memmove(pbase+nbyDown, ptmp, nbyUp); /* move lower rows up to row rh */ memmove(pbase+nbyDown, ptmp, nbyUp); /* move lower rows up to row rh */
} }
DEALLOCATE_LOCAL(ptmp); xfree(ptmp);
} }
void void

View File

@ -278,7 +278,7 @@ afbPolyGlyphBlt (pDrawable, pGC, x, y, nglyph, ppci, pglyphBase)
int getWidth; /* bits to get from glyph */ int getWidth; /* bits to get from glyph */
#endif #endif
if(!(ppos = (afbTEXTPOS *)ALLOCATE_LOCAL(nglyph * sizeof(afbTEXTPOS)))) if(!(ppos = (afbTEXTPOS *)xalloc(nglyph * sizeof(afbTEXTPOS))))
return; return;
pdstBase = afbScanlineNoBankSwitch(pdstBase, x, y, widthDst); pdstBase = afbScanlineNoBankSwitch(pdstBase, x, y, widthDst);
@ -453,7 +453,7 @@ afbPolyGlyphBlt (pDrawable, pGC, x, y, nglyph, ppci, pglyphBase)
} /* depth */ } /* depth */
} /* for each glyph */ } /* for each glyph */
} /* while nbox-- */ } /* while nbox-- */
DEALLOCATE_LOCAL(ppos); xfree(ppos);
break; break;
} }

View File

@ -141,7 +141,7 @@ afbCopyWindow(pWin, ptOldOrg, prgnSrc)
pbox = REGION_RECTS(prgnDst); pbox = REGION_RECTS(prgnDst);
nbox = REGION_NUM_RECTS(prgnDst); nbox = REGION_NUM_RECTS(prgnDst);
if(!(pptSrc = (DDXPointPtr )ALLOCATE_LOCAL(nbox * sizeof(DDXPointRec)))) if(!(pptSrc = (DDXPointPtr )xalloc(nbox * sizeof(DDXPointRec))))
return; return;
ppt = pptSrc; ppt = pptSrc;
@ -152,7 +152,7 @@ afbCopyWindow(pWin, ptOldOrg, prgnSrc)
afbDoBitblt((DrawablePtr)pwinRoot, (DrawablePtr)pwinRoot, GXcopy, prgnDst, afbDoBitblt((DrawablePtr)pwinRoot, (DrawablePtr)pwinRoot, GXcopy, prgnDst,
pptSrc, ~0); pptSrc, ~0);
DEALLOCATE_LOCAL(pptSrc); xfree(pptSrc);
REGION_DESTROY(pWin->drawable.pScreen, prgnDst); REGION_DESTROY(pWin->drawable.pScreen, prgnDst);
} }

View File

@ -296,7 +296,7 @@ cfbBitBlt (
numRects = REGION_NUM_RECTS(&rgnDst); numRects = REGION_NUM_RECTS(&rgnDst);
if (numRects && width && height) if (numRects && width && height)
{ {
if(!(pptSrc = (DDXPointPtr)ALLOCATE_LOCAL(numRects * if(!(pptSrc = (DDXPointPtr)xalloc(numRects *
sizeof(DDXPointRec)))) sizeof(DDXPointRec))))
{ {
REGION_UNINIT(pGC->pScreen, &rgnDst); REGION_UNINIT(pGC->pScreen, &rgnDst);
@ -313,7 +313,7 @@ cfbBitBlt (
} }
(*doBitBlt) (pSrcDrawable, pDstDrawable, pGC->alu, &rgnDst, pptSrc, pGC->planemask); (*doBitBlt) (pSrcDrawable, pDstDrawable, pGC->alu, &rgnDst, pptSrc, pGC->planemask);
DEALLOCATE_LOCAL(pptSrc); xfree(pptSrc);
} }
prgnExposed = NULL; prgnExposed = NULL;
@ -559,7 +559,7 @@ cfbCopyPlaneReduce (
numRects = REGION_NUM_RECTS(&rgnDst); numRects = REGION_NUM_RECTS(&rgnDst);
if (numRects && width && height) if (numRects && width && height)
{ {
if(!(pptSrc = (DDXPointPtr)ALLOCATE_LOCAL(numRects * if(!(pptSrc = (DDXPointPtr)xalloc(numRects *
sizeof(DDXPointRec)))) sizeof(DDXPointRec))))
{ {
REGION_UNINIT(pGC->pScreen, &rgnDst); REGION_UNINIT(pGC->pScreen, &rgnDst);
@ -576,7 +576,7 @@ cfbCopyPlaneReduce (
} }
(*doCopyPlane) (pSrcDrawable, pDstDrawable, pGC->alu, &rgnDst, pptSrc, pGC->planemask, bitPlane); (*doCopyPlane) (pSrcDrawable, pDstDrawable, pGC->alu, &rgnDst, pptSrc, pGC->planemask, bitPlane);
DEALLOCATE_LOCAL(pptSrc); xfree(pptSrc);
} }
prgnExposed = NULL; prgnExposed = NULL;

View File

@ -207,13 +207,13 @@ MROP_NAME(cfbDoBitblt)(
if (nbox > 1) if (nbox > 1)
{ {
/* keep ordering in each band, reverse order of bands */ /* keep ordering in each band, reverse order of bands */
pboxNew1 = (BoxPtr)ALLOCATE_LOCAL(sizeof(BoxRec) * nbox); pboxNew1 = (BoxPtr)xalloc(sizeof(BoxRec) * nbox);
if(!pboxNew1) if(!pboxNew1)
return; return;
pptNew1 = (DDXPointPtr)ALLOCATE_LOCAL(sizeof(DDXPointRec) * nbox); pptNew1 = (DDXPointPtr)xalloc(sizeof(DDXPointRec) * nbox);
if(!pptNew1) if(!pptNew1)
{ {
DEALLOCATE_LOCAL(pboxNew1); xfree(pboxNew1);
return; return;
} }
pboxBase = pboxNext = pbox+nbox-1; pboxBase = pboxNext = pbox+nbox-1;
@ -251,16 +251,16 @@ MROP_NAME(cfbDoBitblt)(
if (nbox > 1) if (nbox > 1)
{ {
/* reverse order of rects in each band */ /* reverse order of rects in each band */
pboxNew2 = (BoxPtr)ALLOCATE_LOCAL(sizeof(BoxRec) * nbox); pboxNew2 = (BoxPtr)xalloc(sizeof(BoxRec) * nbox);
pptNew2 = (DDXPointPtr)ALLOCATE_LOCAL(sizeof(DDXPointRec) * nbox); pptNew2 = (DDXPointPtr)xalloc(sizeof(DDXPointRec) * nbox);
if(!pboxNew2 || !pptNew2) if(!pboxNew2 || !pptNew2)
{ {
if (pptNew2) DEALLOCATE_LOCAL(pptNew2); if (pptNew2) xfree(pptNew2);
if (pboxNew2) DEALLOCATE_LOCAL(pboxNew2); if (pboxNew2) xfree(pboxNew2);
if (pboxNew1) if (pboxNew1)
{ {
DEALLOCATE_LOCAL(pptNew1); xfree(pptNew1);
DEALLOCATE_LOCAL(pboxNew1); xfree(pboxNew1);
} }
return; return;
} }
@ -922,12 +922,12 @@ bits1 = *--psrc; --pdst; \
} }
if (pboxNew2) if (pboxNew2)
{ {
DEALLOCATE_LOCAL(pptNew2); xfree(pptNew2);
DEALLOCATE_LOCAL(pboxNew2); xfree(pboxNew2);
} }
if (pboxNew1) if (pboxNew1)
{ {
DEALLOCATE_LOCAL(pptNew1); xfree(pptNew1);
DEALLOCATE_LOCAL(pboxNew1); xfree(pboxNew1);
} }
} }

View File

@ -196,7 +196,7 @@ cfbPolyFillRect(pDrawable, pGC, nrectFill, prectInit)
numRects = REGION_NUM_RECTS(prgnClip) * nrectFill; numRects = REGION_NUM_RECTS(prgnClip) * nrectFill;
if (numRects > NUM_STACK_RECTS) if (numRects > NUM_STACK_RECTS)
{ {
pboxClippedBase = (BoxPtr)ALLOCATE_LOCAL(numRects * sizeof(BoxRec)); pboxClippedBase = (BoxPtr)xalloc(numRects * sizeof(BoxRec));
if (!pboxClippedBase) if (!pboxClippedBase)
return; return;
} }
@ -301,5 +301,5 @@ cfbPolyFillRect(pDrawable, pGC, nrectFill, prectInit)
(*BoxFill) (pDrawable, pGC, (*BoxFill) (pDrawable, pGC,
pboxClipped-pboxClippedBase, pboxClippedBase); pboxClipped-pboxClippedBase, pboxClippedBase);
if (pboxClippedBase != stackRects) if (pboxClippedBase != stackRects)
DEALLOCATE_LOCAL(pboxClippedBase); xfree(pboxClippedBase);
} }

View File

@ -186,12 +186,12 @@ int fSorted;
n = nInit * miFindMaxBand( cfbGetCompositeClip(pGC) ); n = nInit * miFindMaxBand( cfbGetCompositeClip(pGC) );
if ( n == 0 ) if ( n == 0 )
return; return;
pwidth = (int *)ALLOCATE_LOCAL(n * sizeof(int)); pwidth = (int *)xalloc(n * sizeof(int));
ppt = (DDXPointRec *)ALLOCATE_LOCAL(n * sizeof(DDXPointRec)); ppt = (DDXPointRec *)xalloc(n * sizeof(DDXPointRec));
if(!ppt || !pwidth) if(!ppt || !pwidth)
{ {
if (ppt) DEALLOCATE_LOCAL(ppt); if (ppt) xfree(ppt);
if (pwidth) DEALLOCATE_LOCAL(pwidth); if (pwidth) xfree(pwidth);
return; return;
} }
n = miClipSpans( cfbGetCompositeClip(pGC), n = miClipSpans( cfbGetCompositeClip(pGC),
@ -203,8 +203,8 @@ int fSorted;
(*fill) (pDrawable, n, ppt, pwidth, pGC->tile.pixmap, xrot, yrot, pGC->alu, pGC->planemask); (*fill) (pDrawable, n, ppt, pwidth, pGC->tile.pixmap, xrot, yrot, pGC->alu, pGC->planemask);
DEALLOCATE_LOCAL(ppt); xfree(ppt);
DEALLOCATE_LOCAL(pwidth); xfree(pwidth);
} }
#if PSZ == 8 #if PSZ == 8
@ -251,12 +251,12 @@ int fSorted;
n = nInit * miFindMaxBand( cfbGetCompositeClip(pGC) ); n = nInit * miFindMaxBand( cfbGetCompositeClip(pGC) );
if ( n == 0 ) if ( n == 0 )
return; return;
pwidthFree = (int *)ALLOCATE_LOCAL(n * sizeof(int)); pwidthFree = (int *)xalloc(n * sizeof(int));
pptFree = (DDXPointRec *)ALLOCATE_LOCAL(n * sizeof(DDXPointRec)); pptFree = (DDXPointRec *)xalloc(n * sizeof(DDXPointRec));
if(!pptFree || !pwidthFree) if(!pptFree || !pwidthFree)
{ {
if (pptFree) DEALLOCATE_LOCAL(pptFree); if (pptFree) xfree(pptFree);
if (pwidthFree) DEALLOCATE_LOCAL(pwidthFree); if (pwidthFree) xfree(pwidthFree);
return; return;
} }
@ -392,8 +392,8 @@ int fSorted;
} }
} }
} }
DEALLOCATE_LOCAL(pptFree); xfree(pptFree);
DEALLOCATE_LOCAL(pwidthFree); xfree(pwidthFree);
} }
#else /* PSZ != 8 */ #else /* PSZ != 8 */
@ -434,12 +434,12 @@ int fSorted;
n = nInit * miFindMaxBand( cfbGetCompositeClip(pGC) ); n = nInit * miFindMaxBand( cfbGetCompositeClip(pGC) );
if ( n == 0 ) if ( n == 0 )
return; return;
pwidthFree = (int *)ALLOCATE_LOCAL(n * sizeof(int)); pwidthFree = (int *)xalloc(n * sizeof(int));
pptFree = (DDXPointRec *)ALLOCATE_LOCAL(n * sizeof(DDXPointRec)); pptFree = (DDXPointRec *)xalloc(n * sizeof(DDXPointRec));
if(!pptFree || !pwidthFree) if(!pptFree || !pwidthFree)
{ {
if (pptFree) DEALLOCATE_LOCAL(pptFree); if (pptFree) xfree(pptFree);
if (pwidthFree) DEALLOCATE_LOCAL(pwidthFree); if (pwidthFree) xfree(pwidthFree);
return; return;
} }
pwidth = pwidthFree; pwidth = pwidthFree;
@ -599,8 +599,8 @@ int fSorted;
ppt++; ppt++;
pwidth++; pwidth++;
} }
DEALLOCATE_LOCAL(pptFree); xfree(pptFree);
DEALLOCATE_LOCAL(pwidthFree); xfree(pwidthFree);
} }
#endif /* PSZ == 8 */ #endif /* PSZ == 8 */
@ -648,12 +648,12 @@ cfb8Stipple32FS (pDrawable, pGC, nInit, pptInit, pwidthInit, fSorted)
n = nInit * miFindMaxBand(pGC->pCompositeClip); n = nInit * miFindMaxBand(pGC->pCompositeClip);
if ( n == 0 ) if ( n == 0 )
return; return;
pwidthFree = (int *)ALLOCATE_LOCAL(n * sizeof(int)); pwidthFree = (int *)xalloc(n * sizeof(int));
pptFree = (DDXPointRec *)ALLOCATE_LOCAL(n * sizeof(DDXPointRec)); pptFree = (DDXPointRec *)xalloc(n * sizeof(DDXPointRec));
if(!pptFree || !pwidthFree) if(!pptFree || !pwidthFree)
{ {
if (pptFree) DEALLOCATE_LOCAL(pptFree); if (pptFree) xfree(pptFree);
if (pwidthFree) DEALLOCATE_LOCAL(pwidthFree); if (pwidthFree) xfree(pwidthFree);
return; return;
} }
pwidth = pwidthFree; pwidth = pwidthFree;
@ -816,8 +816,8 @@ cfb8Stipple32FS (pDrawable, pGC, nInit, pptInit, pwidthInit, fSorted)
} }
} }
} }
DEALLOCATE_LOCAL(pptFree); xfree(pptFree);
DEALLOCATE_LOCAL(pwidthFree); xfree(pwidthFree);
} }
void void
@ -862,12 +862,12 @@ cfb8OpaqueStipple32FS (pDrawable, pGC, nInit, pptInit, pwidthInit, fSorted)
n = nInit * miFindMaxBand(pGC->pCompositeClip); n = nInit * miFindMaxBand(pGC->pCompositeClip);
if ( n == 0 ) if ( n == 0 )
return; return;
pwidthFree = (int *)ALLOCATE_LOCAL(n * sizeof(int)); pwidthFree = (int *)xalloc(n * sizeof(int));
pptFree = (DDXPointRec *)ALLOCATE_LOCAL(n * sizeof(DDXPointRec)); pptFree = (DDXPointRec *)xalloc(n * sizeof(DDXPointRec));
if(!pptFree || !pwidthFree) if(!pptFree || !pwidthFree)
{ {
if (pptFree) DEALLOCATE_LOCAL(pptFree); if (pptFree) xfree(pptFree);
if (pwidthFree) DEALLOCATE_LOCAL(pwidthFree); if (pwidthFree) xfree(pwidthFree);
return; return;
} }
pwidth = pwidthFree; pwidth = pwidthFree;
@ -997,8 +997,8 @@ cfb8OpaqueStipple32FS (pDrawable, pGC, nInit, pptInit, pwidthInit, fSorted)
} }
} }
} }
DEALLOCATE_LOCAL(pptFree); xfree(pptFree);
DEALLOCATE_LOCAL(pwidthFree); xfree(pwidthFree);
} }
#endif /* PSZ == 8 */ #endif /* PSZ == 8 */

View File

@ -355,7 +355,7 @@ cfbPolyGlyphBlt8Clipped(
} }
if (!numRects) if (!numRects)
return; return;
clips = (CARD32 *)ALLOCATE_LOCAL ((maxAscent + maxDescent) * clips = (CARD32 *)xalloc ((maxAscent + maxDescent) *
sizeof (CARD32)); sizeof (CARD32));
while (nglyph--) while (nglyph--)
{ {
@ -471,7 +471,7 @@ cfbPolyGlyphBlt8Clipped(
} }
} }
} }
DEALLOCATE_LOCAL (clips); xfree (clips);
} }
#endif /* FOUR_BIT_CODE */ #endif /* FOUR_BIT_CODE */

View File

@ -270,7 +270,7 @@ cfbXRotatePixmap(pPix, rw)
int size, tsize; int size, tsize;
tsize = PixmapBytePad(pPix->drawable.width - rot, pPix->drawable.depth); tsize = PixmapBytePad(pPix->drawable.width - rot, pPix->drawable.depth);
pwTmp = (CfbBits *) ALLOCATE_LOCAL(pPix->drawable.height * tsize); pwTmp = (CfbBits *) xalloc(pPix->drawable.height * tsize);
if (!pwTmp) if (!pwTmp)
return; return;
/* divide pw (the pixmap) in two vertically at (w - rot) and swap */ /* divide pw (the pixmap) in two vertically at (w - rot) and swap */
@ -288,7 +288,7 @@ cfbXRotatePixmap(pPix, rw)
0, 0, rot, 0, 0, 0, rot, 0,
(int)pPix->drawable.width - rot, (int)pPix->drawable.height, (int)pPix->drawable.width - rot, (int)pPix->drawable.height,
tsize, size); tsize, size);
DEALLOCATE_LOCAL(pwTmp); xfree(pwTmp);
#endif #endif
} }
} }
@ -328,13 +328,13 @@ cfbYRotatePixmap(pPix, rh)
nbyDown = rot * pPix->devKind; nbyDown = rot * pPix->devKind;
nbyUp = (pPix->devKind * pPix->drawable.height) - nbyDown; nbyUp = (pPix->devKind * pPix->drawable.height) - nbyDown;
if(!(ptmp = (char *)ALLOCATE_LOCAL(nbyUp))) if(!(ptmp = (char *)xalloc(nbyUp)))
return; return;
memmove(ptmp, pbase, nbyUp); /* save the low rows */ memmove(ptmp, pbase, nbyUp); /* save the low rows */
memmove(pbase, pbase+nbyUp, nbyDown); /* slide the top rows down */ memmove(pbase, pbase+nbyUp, nbyDown); /* slide the top rows down */
memmove(pbase+nbyDown, ptmp, nbyUp); /* move lower rows up to row rot */ memmove(pbase+nbyDown, ptmp, nbyUp); /* move lower rows up to row rot */
DEALLOCATE_LOCAL(ptmp); xfree(ptmp);
} }
void void

View File

@ -811,12 +811,12 @@ RROP_NAME(cfbSolidSpans) (pDrawable, pGC, nInit, pptInit, pwidthInit, fSorted)
devPriv = cfbGetGCPrivate(pGC); devPriv = cfbGetGCPrivate(pGC);
RROP_FETCH_GCPRIV(devPriv) RROP_FETCH_GCPRIV(devPriv)
n = nInit * miFindMaxBand(pGC->pCompositeClip); n = nInit * miFindMaxBand(pGC->pCompositeClip);
pwidthFree = (int *)ALLOCATE_LOCAL(n * sizeof(int)); pwidthFree = (int *)xalloc(n * sizeof(int));
pptFree = (DDXPointRec *)ALLOCATE_LOCAL(n * sizeof(DDXPointRec)); pptFree = (DDXPointRec *)xalloc(n * sizeof(DDXPointRec));
if(!pptFree || !pwidthFree) if(!pptFree || !pwidthFree)
{ {
if (pptFree) DEALLOCATE_LOCAL(pptFree); if (pptFree) xfree(pptFree);
if (pwidthFree) DEALLOCATE_LOCAL(pwidthFree); if (pwidthFree) xfree(pwidthFree);
return; return;
} }
pwidth = pwidthFree; pwidth = pwidthFree;
@ -1359,7 +1359,7 @@ RROP_NAME(cfbSolidSpans) (pDrawable, pGC, nInit, pptInit, pwidthInit, fSorted)
} }
#endif #endif
} }
DEALLOCATE_LOCAL(pptFree); xfree(pptFree);
DEALLOCATE_LOCAL(pwidthFree); xfree(pwidthFree);
RROP_UNDECLARE RROP_UNDECLARE
} }

View File

@ -367,12 +367,12 @@ MROP_NAME(cfbTile32FS)(pDrawable, pGC, nInit, pptInit, pwidthInit, fSorted)
#endif #endif
n = nInit * miFindMaxBand( cfbGetCompositeClip(pGC) ); n = nInit * miFindMaxBand( cfbGetCompositeClip(pGC) );
pwidthFree = (int *)ALLOCATE_LOCAL(n * sizeof(int)); pwidthFree = (int *)xalloc(n * sizeof(int));
pptFree = (DDXPointRec *)ALLOCATE_LOCAL(n * sizeof(DDXPointRec)); pptFree = (DDXPointRec *)xalloc(n * sizeof(DDXPointRec));
if(!pptFree || !pwidthFree) if(!pptFree || !pwidthFree)
{ {
if (pptFree) DEALLOCATE_LOCAL(pptFree); if (pptFree) xfree(pptFree);
if (pwidthFree) DEALLOCATE_LOCAL(pwidthFree); if (pwidthFree) xfree(pwidthFree);
return; return;
} }
pwidth = pwidthFree; pwidth = pwidthFree;
@ -512,6 +512,6 @@ MROP_NAME(cfbTile32FS)(pDrawable, pGC, nInit, pptInit, pwidthInit, fSorted)
} }
} }
} }
DEALLOCATE_LOCAL(pptFree); xfree(pptFree);
DEALLOCATE_LOCAL(pwidthFree); xfree(pwidthFree);
} }

View File

@ -133,7 +133,7 @@ cfbCopyWindow(pWin, ptOldOrg, prgnSrc)
pbox = REGION_RECTS(&rgnDst); pbox = REGION_RECTS(&rgnDst);
nbox = REGION_NUM_RECTS(&rgnDst); nbox = REGION_NUM_RECTS(&rgnDst);
if(!nbox || !(pptSrc = (DDXPointPtr )ALLOCATE_LOCAL(nbox * sizeof(DDXPointRec)))) if(!nbox || !(pptSrc = (DDXPointPtr )xalloc(nbox * sizeof(DDXPointRec))))
{ {
REGION_UNINIT(pWin->drawable.pScreen, &rgnDst); REGION_UNINIT(pWin->drawable.pScreen, &rgnDst);
return; return;
@ -148,7 +148,7 @@ cfbCopyWindow(pWin, ptOldOrg, prgnSrc)
cfbDoBitbltCopy((DrawablePtr)pwinRoot, (DrawablePtr)pwinRoot, cfbDoBitbltCopy((DrawablePtr)pwinRoot, (DrawablePtr)pwinRoot,
GXcopy, &rgnDst, pptSrc, ~0L); GXcopy, &rgnDst, pptSrc, ~0L);
DEALLOCATE_LOCAL(pptSrc); xfree(pptSrc);
REGION_UNINIT(pWin->drawable.pScreen, &rgnDst); REGION_UNINIT(pWin->drawable.pScreen, &rgnDst);
} }

View File

@ -454,9 +454,6 @@ AC_ARG_WITH(xkb-path, AS_HELP_STRING([--with-xkb-path=PATH], [Path to XK
AC_ARG_WITH(xkb-output, AS_HELP_STRING([--with-xkb-output=PATH], [Path to XKB output dir (default: ${datadir}/X11/xkb/compiled)]), AC_ARG_WITH(xkb-output, AS_HELP_STRING([--with-xkb-output=PATH], [Path to XKB output dir (default: ${datadir}/X11/xkb/compiled)]),
[ XKBOUTPUT="$withval" ], [ XKBOUTPUT="$withval" ],
[ XKBOUTPUT="compiled" ]) [ XKBOUTPUT="compiled" ])
AC_ARG_WITH(rgb-path, AS_HELP_STRING([--with-rgb-path=PATH], [Path to RGB database (default: ${datadir}/X11/rgb)]),
[ RGBPATH="$withval" ],
[ RGBPATH="${datadir}/X11/rgb" ])
AC_ARG_WITH(serverconfig-path, AS_HELP_STRING([--with-serverconfig-path=PATH], [Path to server config (default: ${libdir}/xserver)]), AC_ARG_WITH(serverconfig-path, AS_HELP_STRING([--with-serverconfig-path=PATH], [Path to server config (default: ${libdir}/xserver)]),
[ SERVERCONFIG="$withval" ], [ SERVERCONFIG="$withval" ],
[ SERVERCONFIG="${libdir}/xserver" ]) [ SERVERCONFIG="${libdir}/xserver" ])
@ -1000,13 +997,7 @@ if test "x$XDMAUTH" = xyes; then
fi fi
fi fi
AM_CONDITIONAL(USE_RGB_BUILTIN, [test "x$USE_RGB_BUILTIN" = xyes])
if test "x$USE_RGB_BUILTIN" = xyes; then
AC_DEFINE(USE_RGB_BUILTIN, 1, [Use built-in RGB color database])
fi
AC_DEFINE_DIR(COMPILEDDEFAULTFONTPATH, FONTPATH, [Default font path]) AC_DEFINE_DIR(COMPILEDDEFAULTFONTPATH, FONTPATH, [Default font path])
AC_DEFINE_DIR(RGB_DB, RGBPATH, [Default RGB path])
AC_DEFINE_DIR(PCI_TXT_IDS_PATH, PCI_TXT_IDS_DIR, [Default PCI text file ID path]) AC_DEFINE_DIR(PCI_TXT_IDS_PATH, PCI_TXT_IDS_DIR, [Default PCI text file ID path])
AC_DEFINE_DIR(SERVERCONFIGdir, SERVERCONFIG, [Server config path]) AC_DEFINE_DIR(SERVERCONFIGdir, SERVERCONFIG, [Server config path])
AC_DEFINE_DIR(BASE_FONT_PATH, FONTDIR, [Default base font path]) AC_DEFINE_DIR(BASE_FONT_PATH, FONTDIR, [Default base font path])
@ -1042,7 +1033,6 @@ else
fi fi
AM_CONDITIONAL(DEBUG, [test "x$DEBUGGING" = xyes]) AM_CONDITIONAL(DEBUG, [test "x$DEBUGGING" = xyes])
AC_DEFINE(USE_RGB_TXT, 1, [Use rgb.txt directly])
AC_DEFINE(MITMISC, 1, [Support MIT Misc extension]) AC_DEFINE(MITMISC, 1, [Support MIT Misc extension])
AC_DEFINE(XTEST, 1, [Support XTest extension]) AC_DEFINE(XTEST, 1, [Support XTest extension])
AC_DEFINE(XSYNC, 1, [Support XSync extension]) AC_DEFINE(XSYNC, 1, [Support XSync extension])

View File

@ -751,7 +751,7 @@ UpdateColors (ColormapPtr pmap)
pVisual = pmap->pVisual; pVisual = pmap->pVisual;
size = pVisual->ColormapEntries; size = pVisual->ColormapEntries;
defs = (xColorItem *)ALLOCATE_LOCAL(size * sizeof(xColorItem)); defs = (xColorItem *)xalloc(size * sizeof(xColorItem));
if (!defs) if (!defs)
return; return;
n = 0; n = 0;
@ -801,7 +801,7 @@ UpdateColors (ColormapPtr pmap)
} }
if (n) if (n)
(*pmap->pScreen->StoreColors)(pmap, n, defs); (*pmap->pScreen->StoreColors)(pmap, n, defs);
DEALLOCATE_LOCAL(defs); xfree(defs);
} }
/* Get a read-only color from a ColorMap (probably slow for large maps) /* Get a read-only color from a ColorMap (probably slow for large maps)
@ -1752,14 +1752,14 @@ AllocDirect (int client, ColormapPtr pmap, int c, int r, int g, int b, Bool cont
for(p = pixels; p < pixels + c; p++) for(p = pixels; p < pixels + c; p++)
*p = 0; *p = 0;
ppixRed = (Pixel *)ALLOCATE_LOCAL(npixR * sizeof(Pixel)); ppixRed = (Pixel *)xalloc(npixR * sizeof(Pixel));
ppixGreen = (Pixel *)ALLOCATE_LOCAL(npixG * sizeof(Pixel)); ppixGreen = (Pixel *)xalloc(npixG * sizeof(Pixel));
ppixBlue = (Pixel *)ALLOCATE_LOCAL(npixB * sizeof(Pixel)); ppixBlue = (Pixel *)xalloc(npixB * sizeof(Pixel));
if (!ppixRed || !ppixGreen || !ppixBlue) if (!ppixRed || !ppixGreen || !ppixBlue)
{ {
if (ppixBlue) DEALLOCATE_LOCAL(ppixBlue); if (ppixBlue) xfree(ppixBlue);
if (ppixGreen) DEALLOCATE_LOCAL(ppixGreen); if (ppixGreen) xfree(ppixGreen);
if (ppixRed) DEALLOCATE_LOCAL(ppixRed); if (ppixRed) xfree(ppixRed);
return(BadAlloc); return(BadAlloc);
} }
@ -1797,9 +1797,9 @@ AllocDirect (int client, ColormapPtr pmap, int c, int r, int g, int b, Bool cont
if (okB) if (okB)
for(ppix = ppixBlue, npix = npixB; --npix >= 0; ppix++) for(ppix = ppixBlue, npix = npixB; --npix >= 0; ppix++)
pmap->blue[*ppix].refcnt = 0; pmap->blue[*ppix].refcnt = 0;
DEALLOCATE_LOCAL(ppixBlue); xfree(ppixBlue);
DEALLOCATE_LOCAL(ppixGreen); xfree(ppixGreen);
DEALLOCATE_LOCAL(ppixRed); xfree(ppixRed);
return(BadAlloc); return(BadAlloc);
} }
@ -1841,9 +1841,9 @@ AllocDirect (int client, ColormapPtr pmap, int c, int r, int g, int b, Bool cont
for (pDst = pixels; pDst < pixels + c; pDst++) for (pDst = pixels; pDst < pixels + c; pDst++)
*pDst |= ALPHAMASK(pmap->pVisual); *pDst |= ALPHAMASK(pmap->pVisual);
DEALLOCATE_LOCAL(ppixBlue); xfree(ppixBlue);
DEALLOCATE_LOCAL(ppixGreen); xfree(ppixGreen);
DEALLOCATE_LOCAL(ppixRed); xfree(ppixRed);
return (Success); return (Success);
} }
@ -1859,7 +1859,7 @@ AllocPseudo (int client, ColormapPtr pmap, int c, int r, Bool contig,
npix = c << r; npix = c << r;
if ((r >= 32) || (npix > pmap->freeRed) || (npix < c)) if ((r >= 32) || (npix > pmap->freeRed) || (npix < c))
return(BadAlloc); return(BadAlloc);
if(!(ppixTemp = (Pixel *)ALLOCATE_LOCAL(npix * sizeof(Pixel)))) if(!(ppixTemp = (Pixel *)xalloc(npix * sizeof(Pixel))))
return(BadAlloc); return(BadAlloc);
ok = AllocCP(pmap, pmap->red, c, r, contig, ppixTemp, pmask); ok = AllocCP(pmap, pmap->red, c, r, contig, ppixTemp, pmask);
@ -1889,7 +1889,7 @@ AllocPseudo (int client, ColormapPtr pmap, int c, int r, Bool contig,
pmap->numPixelsRed[client] += npix; pmap->numPixelsRed[client] += npix;
pmap->freeRed -= npix; pmap->freeRed -= npix;
} }
DEALLOCATE_LOCAL(ppixTemp); xfree(ppixTemp);
return (ok ? Success : BadAlloc); return (ok ? Success : BadAlloc);
} }
@ -2089,7 +2089,7 @@ AllocShared (ColormapPtr pmap, Pixel *ppix, int c, int r, int g, int b,
npixClientNew = c << (r + g + b); npixClientNew = c << (r + g + b);
npixShared = (c << r) + (c << g) + (c << b); npixShared = (c << r) + (c << g) + (c << b);
psharedList = (SHAREDCOLOR **)ALLOCATE_LOCAL(npixShared * psharedList = (SHAREDCOLOR **)xalloc(npixShared *
sizeof(SHAREDCOLOR *)); sizeof(SHAREDCOLOR *));
if (!psharedList) if (!psharedList)
return FALSE; return FALSE;
@ -2204,7 +2204,7 @@ AllocShared (ColormapPtr pmap, Pixel *ppix, int c, int r, int g, int b,
} }
} }
} }
DEALLOCATE_LOCAL(psharedList); xfree(psharedList);
return TRUE; return TRUE;
} }
@ -2679,7 +2679,7 @@ IsMapInstalled(Colormap map, WindowPtr pWin)
Colormap *pmaps; Colormap *pmaps;
int imap, nummaps, found; int imap, nummaps, found;
pmaps = (Colormap *) ALLOCATE_LOCAL( pmaps = (Colormap *) xalloc(
pWin->drawable.pScreen->maxInstalledCmaps * sizeof(Colormap)); pWin->drawable.pScreen->maxInstalledCmaps * sizeof(Colormap));
if(!pmaps) if(!pmaps)
return(FALSE); return(FALSE);
@ -2694,6 +2694,6 @@ IsMapInstalled(Colormap map, WindowPtr pWin)
break; break;
} }
} }
DEALLOCATE_LOCAL(pmaps); xfree(pmaps);
return (found); return (found);
} }

View File

@ -1997,7 +1997,7 @@ ProcGetMotionEvents(ClientPtr client)
{ {
if (CompareTimeStamps(stop, currentTime) == LATER) if (CompareTimeStamps(stop, currentTime) == LATER)
stop = currentTime; stop = currentTime;
coords = (xTimecoord *)ALLOCATE_LOCAL(mouse->valuator->numMotionEvents coords = (xTimecoord *)xalloc(mouse->valuator->numMotionEvents
* sizeof(xTimecoord)); * sizeof(xTimecoord));
if (!coords) if (!coords)
return BadAlloc; return BadAlloc;
@ -2031,7 +2031,7 @@ ProcGetMotionEvents(ClientPtr client)
(char *)coords); (char *)coords);
} }
if (coords) if (coords)
DEALLOCATE_LOCAL(coords); xfree(coords);
return Success; return Success;
} }

View File

@ -406,7 +406,7 @@ Dispatch(void)
InitSelections(); InitSelections();
nClients = 0; nClients = 0;
clientReady = (int *) ALLOCATE_LOCAL(sizeof(int) * MaxClients); clientReady = (int *) xalloc(sizeof(int) * MaxClients);
if (!clientReady) if (!clientReady)
return; return;
@ -535,7 +535,7 @@ Dispatch(void)
ddxBeforeReset (); ddxBeforeReset ();
#endif #endif
KillAllClients(); KillAllClients();
DEALLOCATE_LOCAL(clientReady); xfree(clientReady);
dispatchException &= ~DE_RESET; dispatchException &= ~DE_RESET;
#ifdef XSERVER_DTRACE #ifdef XSERVER_DTRACE
FreeRequestNames(); FreeRequestNames();
@ -919,7 +919,7 @@ ProcQueryTree(ClientPtr client)
{ {
int curChild = 0; int curChild = 0;
childIDs = (Window *) ALLOCATE_LOCAL(numChildren * sizeof(Window)); childIDs = (Window *) xalloc(numChildren * sizeof(Window));
if (!childIDs) if (!childIDs)
return BadAlloc; return BadAlloc;
for (pChild = pWin->lastChild; pChild != pHead; pChild = pChild->prevSib) for (pChild = pWin->lastChild; pChild != pHead; pChild = pChild->prevSib)
@ -934,7 +934,7 @@ ProcQueryTree(ClientPtr client)
{ {
client->pSwapReplyFunc = (ReplySwapPtr) Swap32Write; client->pSwapReplyFunc = (ReplySwapPtr) Swap32Write;
WriteSwappedDataToClient(client, numChildren * sizeof(Window), childIDs); WriteSwappedDataToClient(client, numChildren * sizeof(Window), childIDs);
DEALLOCATE_LOCAL(childIDs); xfree(childIDs);
} }
return(client->noClientException); return(client->noClientException);
@ -1402,7 +1402,7 @@ ProcQueryFont(ClientPtr client)
rlength = sizeof(xQueryFontReply) + rlength = sizeof(xQueryFontReply) +
FONTINFONPROPS(FONTCHARSET(pFont)) * sizeof(xFontProp) + FONTINFONPROPS(FONTCHARSET(pFont)) * sizeof(xFontProp) +
nprotoxcistructs * sizeof(xCharInfo); nprotoxcistructs * sizeof(xCharInfo);
reply = (xQueryFontReply *)ALLOCATE_LOCAL(rlength); reply = (xQueryFontReply *)xalloc(rlength);
if(!reply) if(!reply)
{ {
return(BadAlloc); return(BadAlloc);
@ -1414,7 +1414,7 @@ ProcQueryFont(ClientPtr client)
QueryFont( pFont, reply, nprotoxcistructs); QueryFont( pFont, reply, nprotoxcistructs);
WriteReplyToClient(client, rlength, reply); WriteReplyToClient(client, rlength, reply);
DEALLOCATE_LOCAL(reply); xfree(reply);
return(client->noClientException); return(client->noClientException);
} }
} }
@ -2260,7 +2260,7 @@ DoGetImage(ClientPtr client, int format, Drawable drawable,
length += widthBytesLine; length += widthBytesLine;
} }
} }
if(!(pBuf = (char *) ALLOCATE_LOCAL(length))) if(!(pBuf = (char *) xalloc(length)))
return (BadAlloc); return (BadAlloc);
WriteReplyToClient(client, sizeof (xGetImageReply), &xgi); WriteReplyToClient(client, sizeof (xGetImageReply), &xgi);
} }
@ -2362,7 +2362,7 @@ DoGetImage(ClientPtr client, int format, Drawable drawable,
if (pVisibleRegion) if (pVisibleRegion)
REGION_DESTROY(pDraw->pScreen, pVisibleRegion); REGION_DESTROY(pDraw->pScreen, pVisibleRegion);
if (!im_return) if (!im_return)
DEALLOCATE_LOCAL(pBuf); xfree(pBuf);
return (client->noClientException); return (client->noClientException);
} }
@ -2619,7 +2619,7 @@ ProcListInstalledColormaps(ClientPtr client)
return rc; return rc;
preply = (xListInstalledColormapsReply *) preply = (xListInstalledColormapsReply *)
ALLOCATE_LOCAL(sizeof(xListInstalledColormapsReply) + xalloc(sizeof(xListInstalledColormapsReply) +
pWin->drawable.pScreen->maxInstalledCmaps * pWin->drawable.pScreen->maxInstalledCmaps *
sizeof(Colormap)); sizeof(Colormap));
if(!preply) if(!preply)
@ -2634,7 +2634,7 @@ ProcListInstalledColormaps(ClientPtr client)
WriteReplyToClient(client, sizeof (xListInstalledColormapsReply), preply); WriteReplyToClient(client, sizeof (xListInstalledColormapsReply), preply);
client->pSwapReplyFunc = (ReplySwapPtr) Swap32Write; client->pSwapReplyFunc = (ReplySwapPtr) Swap32Write;
WriteSwappedDataToClient(client, nummaps * sizeof(Colormap), &preply[1]); WriteSwappedDataToClient(client, nummaps * sizeof(Colormap), &preply[1]);
DEALLOCATE_LOCAL(preply); xfree(preply);
return(client->noClientException); return(client->noClientException);
} }
@ -2761,7 +2761,7 @@ ProcAllocColorCells (ClientPtr client)
} }
nmasks = stuff->planes; nmasks = stuff->planes;
length = ((long)npixels + (long)nmasks) * sizeof(Pixel); length = ((long)npixels + (long)nmasks) * sizeof(Pixel);
ppixels = (Pixel *)ALLOCATE_LOCAL(length); ppixels = (Pixel *)xalloc(length);
if(!ppixels) if(!ppixels)
return(BadAlloc); return(BadAlloc);
pmasks = ppixels + npixels; pmasks = ppixels + npixels;
@ -2769,7 +2769,7 @@ ProcAllocColorCells (ClientPtr client)
if( (retval = AllocColorCells(client->index, pcmp, npixels, nmasks, if( (retval = AllocColorCells(client->index, pcmp, npixels, nmasks,
(Bool)stuff->contiguous, ppixels, pmasks)) ) (Bool)stuff->contiguous, ppixels, pmasks)) )
{ {
DEALLOCATE_LOCAL(ppixels); xfree(ppixels);
if (client->noClientException != Success) if (client->noClientException != Success)
return(client->noClientException); return(client->noClientException);
else else
@ -2788,7 +2788,7 @@ ProcAllocColorCells (ClientPtr client)
client->pSwapReplyFunc = (ReplySwapPtr) Swap32Write; client->pSwapReplyFunc = (ReplySwapPtr) Swap32Write;
WriteSwappedDataToClient(client, length, ppixels); WriteSwappedDataToClient(client, length, ppixels);
} }
DEALLOCATE_LOCAL(ppixels); xfree(ppixels);
return (client->noClientException); return (client->noClientException);
} }
else else
@ -2829,7 +2829,7 @@ ProcAllocColorPlanes(ClientPtr client)
acpr.sequenceNumber = client->sequence; acpr.sequenceNumber = client->sequence;
acpr.nPixels = npixels; acpr.nPixels = npixels;
length = (long)npixels * sizeof(Pixel); length = (long)npixels * sizeof(Pixel);
ppixels = (Pixel *)ALLOCATE_LOCAL(length); ppixels = (Pixel *)xalloc(length);
if(!ppixels) if(!ppixels)
return(BadAlloc); return(BadAlloc);
if( (retval = AllocColorPlanes(client->index, pcmp, npixels, if( (retval = AllocColorPlanes(client->index, pcmp, npixels,
@ -2837,7 +2837,7 @@ ProcAllocColorPlanes(ClientPtr client)
(Bool)stuff->contiguous, ppixels, (Bool)stuff->contiguous, ppixels,
&acpr.redMask, &acpr.greenMask, &acpr.blueMask)) ) &acpr.redMask, &acpr.greenMask, &acpr.blueMask)) )
{ {
DEALLOCATE_LOCAL(ppixels); xfree(ppixels);
if (client->noClientException != Success) if (client->noClientException != Success)
return(client->noClientException); return(client->noClientException);
else else
@ -2852,7 +2852,7 @@ ProcAllocColorPlanes(ClientPtr client)
client->pSwapReplyFunc = (ReplySwapPtr) Swap32Write; client->pSwapReplyFunc = (ReplySwapPtr) Swap32Write;
WriteSwappedDataToClient(client, length, ppixels); WriteSwappedDataToClient(client, length, ppixels);
} }
DEALLOCATE_LOCAL(ppixels); xfree(ppixels);
return (client->noClientException); return (client->noClientException);
} }
else else
@ -2981,12 +2981,12 @@ ProcQueryColors(ClientPtr client)
xQueryColorsReply qcr; xQueryColorsReply qcr;
count = ((client->req_len << 2) - sizeof(xQueryColorsReq)) >> 2; count = ((client->req_len << 2) - sizeof(xQueryColorsReq)) >> 2;
prgbs = (xrgb *)ALLOCATE_LOCAL(count * sizeof(xrgb)); prgbs = (xrgb *)xalloc(count * sizeof(xrgb));
if(!prgbs && count) if(!prgbs && count)
return(BadAlloc); return(BadAlloc);
if( (retval = QueryColors(pcmp, count, (Pixel *)&stuff[1], prgbs)) ) if( (retval = QueryColors(pcmp, count, (Pixel *)&stuff[1], prgbs)) )
{ {
if (prgbs) DEALLOCATE_LOCAL(prgbs); if (prgbs) xfree(prgbs);
if (client->noClientException != Success) if (client->noClientException != Success)
return(client->noClientException); return(client->noClientException);
else else
@ -3005,7 +3005,7 @@ ProcQueryColors(ClientPtr client)
client->pSwapReplyFunc = (ReplySwapPtr) SQColorsExtend; client->pSwapReplyFunc = (ReplySwapPtr) SQColorsExtend;
WriteSwappedDataToClient(client, count * sizeof(xrgb), prgbs); WriteSwappedDataToClient(client, count * sizeof(xrgb), prgbs);
} }
if (prgbs) DEALLOCATE_LOCAL(prgbs); if (prgbs) xfree(prgbs);
return(client->noClientException); return(client->noClientException);
} }

View File

@ -777,7 +777,7 @@ finish:
reply.nFonts = nnames; reply.nFonts = nnames;
reply.sequenceNumber = client->sequence; reply.sequenceNumber = client->sequence;
bufptr = bufferStart = (char *) ALLOCATE_LOCAL(reply.length << 2); bufptr = bufferStart = (char *) xalloc(reply.length << 2);
if (!bufptr && reply.length) { if (!bufptr && reply.length) {
SendErrorToClient(client, X_ListFonts, 0, 0, BadAlloc); SendErrorToClient(client, X_ListFonts, 0, 0, BadAlloc);
@ -802,7 +802,7 @@ finish:
client->pSwapReplyFunc = ReplySwapVector[X_ListFonts]; client->pSwapReplyFunc = ReplySwapVector[X_ListFonts];
WriteSwappedDataToClient(client, sizeof(xListFontsReply), &reply); WriteSwappedDataToClient(client, sizeof(xListFontsReply), &reply);
(void) WriteToClient(client, stringLens + nnames, bufferStart); (void) WriteToClient(client, stringLens + nnames, bufferStart);
DEALLOCATE_LOCAL(bufferStart); xfree(bufferStart);
bail: bail:
if (c->slept) if (c->slept)
@ -1797,7 +1797,7 @@ SetDefaultFontPath(char *path)
/* get enough for string, plus values -- use up commas */ /* get enough for string, plus values -- use up commas */
len = strlen(path) + 1; len = strlen(path) + 1;
nump = cp = newpath = (unsigned char *) ALLOCATE_LOCAL(len); nump = cp = newpath = (unsigned char *) xalloc(len);
if (!newpath) if (!newpath)
return BadAlloc; return BadAlloc;
pp = (unsigned char *) path; pp = (unsigned char *) path;
@ -1818,7 +1818,7 @@ SetDefaultFontPath(char *path)
err = SetFontPathElements(num, newpath, &bad, TRUE); err = SetFontPathElements(num, newpath, &bad, TRUE);
DEALLOCATE_LOCAL(newpath); xfree(newpath);
return err; return err;
} }

View File

@ -364,7 +364,7 @@ ProcListExtensions(ClientPtr client)
total_length += strlen(extensions[i]->aliases[j]) + 1; total_length += strlen(extensions[i]->aliases[j]) + 1;
} }
reply.length = (total_length + 3) >> 2; reply.length = (total_length + 3) >> 2;
buffer = bufptr = (char *)ALLOCATE_LOCAL(total_length); buffer = bufptr = (char *)xalloc(total_length);
if (!buffer) if (!buffer)
return(BadAlloc); return(BadAlloc);
for (i=0; i<NumExtensions; i++) for (i=0; i<NumExtensions; i++)
@ -388,7 +388,7 @@ ProcListExtensions(ClientPtr client)
if (reply.length) if (reply.length)
{ {
WriteToClient(client, total_length, buffer); WriteToClient(client, total_length, buffer);
DEALLOCATE_LOCAL(buffer); xfree(buffer);
} }
return(client->noClientException); return(client->noClientException);
} }

View File

@ -136,7 +136,6 @@ Bool screenSaverSuspended = FALSE;
char *defaultFontPath = COMPILEDDEFAULTFONTPATH; char *defaultFontPath = COMPILEDDEFAULTFONTPATH;
char *defaultTextFont = COMPILEDDEFAULTFONT; char *defaultTextFont = COMPILEDDEFAULTFONT;
char *defaultCursorFont = COMPILEDCURSORFONT; char *defaultCursorFont = COMPILEDCURSORFONT;
char *rgbPath = RGB_DB;
char *defaultDisplayClass = COMPILEDDISPLAYCLASS; char *defaultDisplayClass = COMPILEDDISPLAYCLASS;
FontPtr defaultFont; /* not declared in dix.h to avoid including font.h in FontPtr defaultFont; /* not declared in dix.h to avoid including font.h in
every compilation of dix code */ every compilation of dix code */

View File

@ -369,16 +369,16 @@ DeletePassiveGrabFromList(GrabPtr pMinuendGrab)
i++; i++;
if (!i) if (!i)
return TRUE; return TRUE;
deletes = (GrabPtr *)ALLOCATE_LOCAL(i * sizeof(GrabPtr)); deletes = (GrabPtr *)xalloc(i * sizeof(GrabPtr));
adds = (GrabPtr *)ALLOCATE_LOCAL(i * sizeof(GrabPtr)); adds = (GrabPtr *)xalloc(i * sizeof(GrabPtr));
updates = (Mask ***)ALLOCATE_LOCAL(i * sizeof(Mask **)); updates = (Mask ***)xalloc(i * sizeof(Mask **));
details = (Mask **)ALLOCATE_LOCAL(i * sizeof(Mask *)); details = (Mask **)xalloc(i * sizeof(Mask *));
if (!deletes || !adds || !updates || !details) if (!deletes || !adds || !updates || !details)
{ {
if (details) DEALLOCATE_LOCAL(details); if (details) xfree(details);
if (updates) DEALLOCATE_LOCAL(updates); if (updates) xfree(updates);
if (adds) DEALLOCATE_LOCAL(adds); if (adds) xfree(adds);
if (deletes) DEALLOCATE_LOCAL(deletes); if (deletes) xfree(deletes);
return FALSE; return FALSE;
} }
ndels = nadds = nups = 0; ndels = nadds = nups = 0;
@ -473,10 +473,10 @@ DeletePassiveGrabFromList(GrabPtr pMinuendGrab)
*updates[i] = details[i]; *updates[i] = details[i];
} }
} }
DEALLOCATE_LOCAL(details); xfree(details);
DEALLOCATE_LOCAL(updates); xfree(updates);
DEALLOCATE_LOCAL(adds); xfree(adds);
DEALLOCATE_LOCAL(deletes); xfree(deletes);
return ok; return ok;
#undef UPDATE #undef UPDATE

View File

@ -122,7 +122,7 @@ ProcRotateProperties(ClientPtr client)
if (!stuff->nAtoms) if (!stuff->nAtoms)
return(Success); return(Success);
atoms = (Atom *) & stuff[1]; atoms = (Atom *) & stuff[1];
props = (PropertyPtr *)ALLOCATE_LOCAL(stuff->nAtoms * sizeof(PropertyPtr)); props = (PropertyPtr *)xalloc(stuff->nAtoms * sizeof(PropertyPtr));
if (!props) if (!props)
return(BadAlloc); return(BadAlloc);
for (i = 0; i < stuff->nAtoms; i++) for (i = 0; i < stuff->nAtoms; i++)
@ -131,19 +131,19 @@ ProcRotateProperties(ClientPtr client)
DixReadAccess|DixWriteAccess); DixReadAccess|DixWriteAccess);
if (!ValidAtom(atoms[i]) || (XaceErrorOperation == action)) { if (!ValidAtom(atoms[i]) || (XaceErrorOperation == action)) {
DEALLOCATE_LOCAL(props); xfree(props);
client->errorValue = atoms[i]; client->errorValue = atoms[i];
return BadAtom; return BadAtom;
} }
if (XaceIgnoreOperation == action) { if (XaceIgnoreOperation == action) {
DEALLOCATE_LOCAL(props); xfree(props);
return Success; return Success;
} }
for (j = i + 1; j < stuff->nAtoms; j++) for (j = i + 1; j < stuff->nAtoms; j++)
if (atoms[j] == atoms[i]) if (atoms[j] == atoms[i])
{ {
DEALLOCATE_LOCAL(props); xfree(props);
return BadMatch; return BadMatch;
} }
pProp = wUserProps (pWin); pProp = wUserProps (pWin);
@ -153,7 +153,7 @@ ProcRotateProperties(ClientPtr client)
goto found; goto found;
pProp = pProp->next; pProp = pProp->next;
} }
DEALLOCATE_LOCAL(props); xfree(props);
return BadMatch; return BadMatch;
found: found:
props[i] = pProp; props[i] = pProp;
@ -175,7 +175,7 @@ found:
props[i]->propertyName = atoms[(i + delta) % stuff->nAtoms]; props[i]->propertyName = atoms[(i + delta) % stuff->nAtoms];
} }
} }
DEALLOCATE_LOCAL(props); xfree(props);
return Success; return Success;
} }
@ -575,7 +575,7 @@ ProcListProperties(ClientPtr client)
numProps++; numProps++;
} }
if (numProps) if (numProps)
if(!(pAtoms = (Atom *)ALLOCATE_LOCAL(numProps * sizeof(Atom)))) if(!(pAtoms = (Atom *)xalloc(numProps * sizeof(Atom))))
return(BadAlloc); return(BadAlloc);
xlpr.type = X_Reply; xlpr.type = X_Reply;
@ -594,7 +594,7 @@ ProcListProperties(ClientPtr client)
{ {
client->pSwapReplyFunc = (ReplySwapPtr)Swap32Write; client->pSwapReplyFunc = (ReplySwapPtr)Swap32Write;
WriteSwappedDataToClient(client, numProps * sizeof(Atom), pAtoms); WriteSwappedDataToClient(client, numProps * sizeof(Atom), pAtoms);
DEALLOCATE_LOCAL(pAtoms); xfree(pAtoms);
} }
return(client->noClientException); return(client->noClientException);
} }

View File

@ -507,13 +507,13 @@ RebuildTable(int client)
*/ */
j = 2 * clientTable[client].buckets; j = 2 * clientTable[client].buckets;
tails = (ResourcePtr **)ALLOCATE_LOCAL(j * sizeof(ResourcePtr *)); tails = (ResourcePtr **)xalloc(j * sizeof(ResourcePtr *));
if (!tails) if (!tails)
return; return;
resources = (ResourcePtr *)xalloc(j * sizeof(ResourcePtr)); resources = (ResourcePtr *)xalloc(j * sizeof(ResourcePtr));
if (!resources) if (!resources)
{ {
DEALLOCATE_LOCAL(tails); xfree(tails);
return; return;
} }
for (rptr = resources, tptr = tails; --j >= 0; rptr++, tptr++) for (rptr = resources, tptr = tails; --j >= 0; rptr++, tptr++)
@ -536,7 +536,7 @@ RebuildTable(int client)
*tptr = &res->next; *tptr = &res->next;
} }
} }
DEALLOCATE_LOCAL(tails); xfree(tails);
clientTable[client].buckets *= 2; clientTable[client].buckets *= 2;
xfree(clientTable[client].resources); xfree(clientTable[client].resources);
clientTable[client].resources = resources; clientTable[client].resources = resources;

View File

@ -101,7 +101,7 @@ CopySwap32Write(ClientPtr pClient, int size, CARD32 *pbuf)
CARD32 tmpbuf[1]; CARD32 tmpbuf[1];
/* Allocate as big a buffer as we can... */ /* Allocate as big a buffer as we can... */
while (!(pbufT = (CARD32 *) ALLOCATE_LOCAL(bufsize))) while (!(pbufT = (CARD32 *) xalloc(bufsize)))
{ {
bufsize >>= 1; bufsize >>= 1;
if (bufsize == 4) if (bufsize == 4)
@ -133,7 +133,7 @@ CopySwap32Write(ClientPtr pClient, int size, CARD32 *pbuf)
} }
if (pbufT != tmpbuf) if (pbufT != tmpbuf)
DEALLOCATE_LOCAL ((char *) pbufT); xfree ((char *) pbufT);
} }
/** /**
@ -149,7 +149,7 @@ CopySwap16Write(ClientPtr pClient, int size, short *pbuf)
short tmpbuf[2]; short tmpbuf[2];
/* Allocate as big a buffer as we can... */ /* Allocate as big a buffer as we can... */
while (!(pbufT = (short *) ALLOCATE_LOCAL(bufsize))) while (!(pbufT = (short *) xalloc(bufsize)))
{ {
bufsize >>= 1; bufsize >>= 1;
if (bufsize == 4) if (bufsize == 4)
@ -181,7 +181,7 @@ CopySwap16Write(ClientPtr pClient, int size, short *pbuf)
} }
if (pbufT != tmpbuf) if (pbufT != tmpbuf)
DEALLOCATE_LOCAL ((char *) pbufT); xfree ((char *) pbufT);
} }
@ -1267,7 +1267,7 @@ WriteSConnectionInfo(ClientPtr pClient, unsigned long size, char *pInfo)
{ {
char *pInfoTBase; char *pInfoTBase;
pInfoTBase = (char *) ALLOCATE_LOCAL(size); pInfoTBase = (char *) xalloc(size);
if (!pInfoTBase) if (!pInfoTBase)
{ {
pClient->noClientException = -1; pClient->noClientException = -1;
@ -1275,7 +1275,7 @@ WriteSConnectionInfo(ClientPtr pClient, unsigned long size, char *pInfo)
} }
SwapConnSetupInfo(pInfo, pInfoTBase); SwapConnSetupInfo(pInfo, pInfoTBase);
(void)WriteToClient(pClient, (int)size, (char *) pInfoTBase); (void)WriteToClient(pClient, (int)size, (char *) pInfoTBase);
DEALLOCATE_LOCAL(pInfoTBase); xfree(pInfoTBase);
} }
_X_EXPORT void _X_EXPORT void

View File

@ -497,7 +497,7 @@ exaCopyNtoN (DrawablePtr pSrcDrawable,
if (!pGC || !exaGCReadsDestination(pDstDrawable, pGC->planemask, if (!pGC || !exaGCReadsDestination(pDstDrawable, pGC->planemask,
pGC->fillStyle, pGC->alu)) { pGC->fillStyle, pGC->alu)) {
xRectangle *rects = ALLOCATE_LOCAL(nbox * sizeof(xRectangle)); xRectangle *rects = xalloc(nbox * sizeof(xRectangle));
if (rects) { if (rects) {
int i; int i;
@ -510,7 +510,7 @@ exaCopyNtoN (DrawablePtr pSrcDrawable,
} }
region = RECTS_TO_REGION(pScreen, nbox, rects, CT_YXBANDED); region = RECTS_TO_REGION(pScreen, nbox, rects, CT_YXBANDED);
DEALLOCATE_LOCAL(rects); xfree(rects);
} }
} }
@ -619,7 +619,7 @@ exaPolyPoint(DrawablePtr pDrawable, GCPtr pGC, int mode, int npt,
return; return;
} }
prect = ALLOCATE_LOCAL(sizeof(xRectangle) * npt); prect = xalloc(sizeof(xRectangle) * npt);
for (i = 0; i < npt; i++) { for (i = 0; i < npt; i++) {
prect[i].x = ppt[i].x; prect[i].x = ppt[i].x;
prect[i].y = ppt[i].y; prect[i].y = ppt[i].y;
@ -631,7 +631,7 @@ exaPolyPoint(DrawablePtr pDrawable, GCPtr pGC, int mode, int npt,
prect[i].height = 1; prect[i].height = 1;
} }
pGC->ops->PolyFillRect(pDrawable, pGC, npt, prect); pGC->ops->PolyFillRect(pDrawable, pGC, npt, prect);
DEALLOCATE_LOCAL(prect); xfree(prect);
} }
/** /**
@ -654,7 +654,7 @@ exaPolylines(DrawablePtr pDrawable, GCPtr pGC, int mode, int npt,
return; return;
} }
prect = ALLOCATE_LOCAL(sizeof(xRectangle) * (npt - 1)); prect = xalloc(sizeof(xRectangle) * (npt - 1));
x1 = ppt[0].x; x1 = ppt[0].x;
y1 = ppt[0].y; y1 = ppt[0].y;
/* If we have any non-horizontal/vertical, fall back. */ /* If we have any non-horizontal/vertical, fall back. */
@ -668,7 +668,7 @@ exaPolylines(DrawablePtr pDrawable, GCPtr pGC, int mode, int npt,
} }
if (x1 != x2 && y1 != y2) { if (x1 != x2 && y1 != y2) {
DEALLOCATE_LOCAL(prect); xfree(prect);
ExaCheckPolylines(pDrawable, pGC, mode, npt, ppt); ExaCheckPolylines(pDrawable, pGC, mode, npt, ppt);
return; return;
} }
@ -692,7 +692,7 @@ exaPolylines(DrawablePtr pDrawable, GCPtr pGC, int mode, int npt,
y1 = y2; y1 = y2;
} }
pGC->ops->PolyFillRect(pDrawable, pGC, npt - 1, prect); pGC->ops->PolyFillRect(pDrawable, pGC, npt - 1, prect);
DEALLOCATE_LOCAL(prect); xfree(prect);
} }
/** /**
@ -723,7 +723,7 @@ exaPolySegment (DrawablePtr pDrawable, GCPtr pGC, int nseg,
} }
} }
prect = ALLOCATE_LOCAL(sizeof(xRectangle) * nseg); prect = xalloc(sizeof(xRectangle) * nseg);
for (i = 0; i < nseg; i++) { for (i = 0; i < nseg; i++) {
if (pSeg[i].x1 < pSeg[i].x2) { if (pSeg[i].x1 < pSeg[i].x2) {
prect[i].x = pSeg[i].x1; prect[i].x = pSeg[i].x1;
@ -741,7 +741,7 @@ exaPolySegment (DrawablePtr pDrawable, GCPtr pGC, int nseg,
} }
} }
pGC->ops->PolyFillRect(pDrawable, pGC, nseg, prect); pGC->ops->PolyFillRect(pDrawable, pGC, nseg, prect);
DEALLOCATE_LOCAL(prect); xfree(prect);
} }
static Bool exaFillRegionSolid (DrawablePtr pDrawable, RegionPtr pRegion, static Bool exaFillRegionSolid (DrawablePtr pDrawable, RegionPtr pRegion,

View File

@ -326,7 +326,7 @@ fbCopyRegion (DrawablePtr pSrcDrawable,
if (nbox > 1) if (nbox > 1)
{ {
/* keep ordering in each band, reverse order of bands */ /* keep ordering in each band, reverse order of bands */
pboxNew1 = (BoxPtr)ALLOCATE_LOCAL(sizeof(BoxRec) * nbox); pboxNew1 = (BoxPtr)xalloc(sizeof(BoxRec) * nbox);
if(!pboxNew1) if(!pboxNew1)
return; return;
pboxBase = pboxNext = pbox+nbox-1; pboxBase = pboxNext = pbox+nbox-1;
@ -363,11 +363,11 @@ fbCopyRegion (DrawablePtr pSrcDrawable,
if (nbox > 1) if (nbox > 1)
{ {
/* reverse order of rects in each band */ /* reverse order of rects in each band */
pboxNew2 = (BoxPtr)ALLOCATE_LOCAL(sizeof(BoxRec) * nbox); pboxNew2 = (BoxPtr)xalloc(sizeof(BoxRec) * nbox);
if(!pboxNew2) if(!pboxNew2)
{ {
if (pboxNew1) if (pboxNew1)
DEALLOCATE_LOCAL(pboxNew1); xfree(pboxNew1);
return; return;
} }
pboxBase = pboxNext = pbox; pboxBase = pboxNext = pbox;
@ -402,9 +402,9 @@ fbCopyRegion (DrawablePtr pSrcDrawable,
reverse, upsidedown, bitPlane, closure); reverse, upsidedown, bitPlane, closure);
if (pboxNew1) if (pboxNew1)
DEALLOCATE_LOCAL (pboxNew1); xfree (pboxNew1);
if (pboxNew2) if (pboxNew2)
DEALLOCATE_LOCAL (pboxNew2); xfree (pboxNew2);
} }
RegionPtr RegionPtr

View File

@ -500,7 +500,7 @@ xxStoreColors(ColormapPtr pmap, int nColors, xColorItem *pColors)
DBG("StoreColors\n"); DBG("StoreColors\n");
expanddefs = ALLOCATE_LOCAL(sizeof(xColorItem) expanddefs = xalloc(sizeof(xColorItem)
* (1 << pScrPriv->myDepth)); * (1 << pScrPriv->myDepth));
if (!expanddefs) return; if (!expanddefs) return;
@ -527,7 +527,7 @@ xxStoreColors(ColormapPtr pmap, int nColors, xColorItem *pColors)
pColors++; pColors++;
} }
DEALLOCATE_LOCAL(expanddefs); xfree(expanddefs);
pCmapPriv->dirty = TRUE; pCmapPriv->dirty = TRUE;
pScrPriv->colormapDirty = TRUE; pScrPriv->colormapDirty = TRUE;
@ -565,9 +565,9 @@ xxInstallColormap(ColormapPtr pmap)
wrap(pScrPriv,pmap->pScreen,InstallColormap,xxInstallColormap); wrap(pScrPriv,pmap->pScreen,InstallColormap,xxInstallColormap);
} }
pixels = ALLOCATE_LOCAL(sizeof(Pixel) * (1 << pScrPriv->myDepth)); pixels = xalloc(sizeof(Pixel) * (1 << pScrPriv->myDepth));
colors = ALLOCATE_LOCAL(sizeof(xrgb) * (1 << pScrPriv->myDepth)); colors = xalloc(sizeof(xrgb) * (1 << pScrPriv->myDepth));
defs = ALLOCATE_LOCAL(sizeof(xColorItem) * (1 << pScrPriv->myDepth)); defs = xalloc(sizeof(xColorItem) * (1 << pScrPriv->myDepth));
if (!pixels || !colors) if (!pixels || !colors)
return; return;
@ -595,9 +595,9 @@ xxInstallColormap(ColormapPtr pmap)
} }
xxStoreColors(pmap,(1 << pScrPriv->myDepth),defs); xxStoreColors(pmap,(1 << pScrPriv->myDepth),defs);
DEALLOCATE_LOCAL(pixels); xfree(pixels);
DEALLOCATE_LOCAL(colors); xfree(colors);
DEALLOCATE_LOCAL(defs); xfree(defs);
return; return;
} }

View File

@ -1,5 +1,3 @@
.\" $XFree86: xc/programs/Xserver/hw/darwin/XDarwin.man,v 1.3 2001/09/23 23:02:37 torrey Exp $
.\"
.TH XDARWIN 1 __vendorversion__ .TH XDARWIN 1 __vendorversion__
.SH NAME .SH NAME
XDarwin \- X window system server for Darwin operating system XDarwin \- X window system server for Darwin operating system

View File

@ -1,5 +1,3 @@
<!-- $XFree86: xc/programs/Xserver/hw/darwin/bundle/English.lproj/XDarwinHelp.html.cpp,v 1.2 2001/11/04 07:02:28 torrey Exp $ -->
<html> <html>
<head> <head>
<title>XDarwin Help</title> <title>XDarwin Help</title>

View File

@ -1,5 +1,4 @@
/* English versions of the Info.plist keys; used by most localizations. */ /* English versions of the Info.plist keys; used by most localizations. */
/* Most of these are set in the target application settings. */ /* Most of these are set in the target application settings. */
/* $XFree86: xc/programs/Xserver/hw/darwin/bundle/English.lproj/InfoPlist.strings.cpp,v 1.3 2002/07/17 01:24:55 torrey Exp $ */
NSHumanReadableCopyright = __quote__ X_VENDOR_NAME X_VERSION __quote__; NSHumanReadableCopyright = __quote__ X_VENDOR_NAME X_VERSION __quote__;

View File

@ -1,5 +1,4 @@
/* English localized versions of strings used by the Mac OS X front end. */ /* English localized versions of strings used by the Mac OS X front end. */
/* $XFree86: xc/programs/Xserver/hw/darwin/bundle/English.lproj/Localizable.strings,v 1.3 2002/01/30 06:50:46 torrey Exp $ */
/* Title of alert panel */ /* Title of alert panel */
"Quit X server?" = "Quit X server?"; "Quit X server?" = "Quit X server?";

View File

@ -1,5 +1,3 @@
<!-- $XFree86: xc/programs/Xserver/hw/darwin/bundle/English.lproj/XDarwinHelp.html.cpp,v 1.1 2001/05/21 01:42:17 torrey Exp $ -->
<html> <html>
<head> <head>
<title>XDarwin Help</title> <title>XDarwin Help</title>

View File

@ -1,5 +1,3 @@
<!-- $XFree86: xc/programs/Xserver/hw/darwin/bundle/English.lproj/XDarwinHelp.html.cpp,v 1.2 2001/11/04 07:02:28 torrey Exp $ -->
<html> <html>
<head><META HTTP-EQUIV="content-type" CONTENT="text/html; charset=iso-8859-1"> <head><META HTTP-EQUIV="content-type" CONTENT="text/html; charset=iso-8859-1">
<title>XDarwin Help</title> <title>XDarwin Help</title>

View File

@ -1,5 +1,3 @@
<!-- $XFree86: xc/programs/Xserver/hw/darwin/bundle/English.lproj/XDarwinHelp.html.cpp,v 1.1 2001/05/21 01:42:17 torrey Exp $ -->
<html> <html>
<head> <head>
<title>XDarwin Help</title> <title>XDarwin Help</title>

View File

@ -1,5 +1,3 @@
<!-- $XFree86: xc/programs/Xserver/hw/darwin/bundle/English.lproj/XDarwinHelp.html.cpp,v 1.2 2001/11/04 07:02:28 torrey Exp $ --><html><body>
<head> <head>
<title>XDarwin Help</title> <title>XDarwin Help</title>
</head> </head>

View File

@ -1,5 +1,3 @@
<!-- $XFree86: xc/programs/Xserver/hw/darwin/bundle/English.lproj/XDarwinHelp.html.cpp,v 1.2 2001/11/04 07:02:28 torrey Exp $ -->
<html> <html>
<head> <head>
<title>XDarwin Ayuda</title> <title>XDarwin Ayuda</title>

View File

@ -1,5 +1,3 @@
<!-- $XFree86: xc/programs/Xserver/hw/darwin/bundle/English.lproj/XDarwinHelp.html.cpp,v 1.2 2001/11/04 07:02:28 torrey Exp $ -->
<html> <html>
<head> <head>
<title>XDarwin Help</title> <title>XDarwin Help</title>

View File

@ -1,5 +1,3 @@
<!-- $XFree86: xc/programs/Xserver/hw/darwin/bundle/English.lproj/XDarwinHelp.html.cpp,v 1.1 2001/05/21 01:42:17 torrey Exp $ -->
<html> <html>
<head> <head>
<title>XDarwin Help</title> <title>XDarwin Help</title>

View File

@ -2,8 +2,6 @@ XCOMM!/bin/sh
XCOMM This script is used by XDarwin to start X clients when XDarwin is XCOMM This script is used by XDarwin to start X clients when XDarwin is
XCOMM launched from the Finder. XCOMM launched from the Finder.
XCOMM
XCOMM $XFree86: $
userclientrc=$HOME/.xinitrc userclientrc=$HOME/.xinitrc
sysclientrc=XINITDIR/xinitrc sysclientrc=XINITDIR/xinitrc

View File

@ -3,8 +3,6 @@
* Shared code for the Darwin X Server * Shared code for the Darwin X Server
* running with Quartz or IOKit display mode * running with Quartz or IOKit display mode
* *
**************************************************************/
/*
* Copyright (c) 2001-2004 Torrey T. Lyons. All Rights Reserved. * Copyright (c) 2001-2004 Torrey T. Lyons. All Rights Reserved.
* Copyright (c) 2007 Apple Inc. * Copyright (c) 2007 Apple Inc.
* *

View File

@ -141,6 +141,7 @@ enum {
kXDarwinQuit, // kill the X server and release the display kXDarwinQuit, // kill the X server and release the display
kXDarwinReadPasteboard, // copy Mac OS X pasteboard into X cut buffer kXDarwinReadPasteboard, // copy Mac OS X pasteboard into X cut buffer
kXDarwinWritePasteboard, // copy X cut buffer onto Mac OS X pasteboard kXDarwinWritePasteboard, // copy X cut buffer onto Mac OS X pasteboard
kXDarwinBringAllToFront, // bring all X windows to front
/* /*
* AppleWM events * AppleWM events
*/ */

View File

@ -30,7 +30,6 @@
* sale, use or other dealings in this Software without prior written * sale, use or other dealings in this Software without prior written
* authorization. * authorization.
*/ */
/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/Preferences.m,v 1.5 2004/06/08 22:58:10 torrey Exp $ */
#include <dix-config.h> #include <dix-config.h>

View File

@ -2,7 +2,7 @@
// XApplication.m // XApplication.m
// //
// Created by Andreas Monitzer on January 6, 2001. // Created by Andreas Monitzer on January 6, 2001.
//
/* /*
* Copyright (c) 2001 Andreas Monitzer. All Rights Reserved. * Copyright (c) 2001 Andreas Monitzer. All Rights Reserved.
* *
@ -30,7 +30,6 @@
* sale, use or other dealings in this Software without prior written * sale, use or other dealings in this Software without prior written
* authorization. * authorization.
*/ */
/* $XFree86: $ */
#import "XApplication.h" #import "XApplication.h"

View File

@ -1,4 +1,3 @@
.\" $XFree86: xc/programs/Xserver/hw/darwin/bundle/XDarwinStartup.man,v 1.1 2002/02/05 19:16:14 torrey Exp $
.TH XDarwinStartup 1 .TH XDarwinStartup 1
.SH NAME .SH NAME
XDarwinStartup - Startup program for the XDarwin X window server XDarwinStartup - Startup program for the XDarwin X window server

View File

@ -34,7 +34,6 @@
* sale, use or other dealings in this Software without prior written * sale, use or other dealings in this Software without prior written
* authorization. * authorization.
*/ */
/* $XdotOrg: xc/programs/Xserver/hw/darwin/quartz/XServer.m,v 1.3 2004/07/30 19:12:17 torrey Exp $ */
#include <dix-config.h> #include <dix-config.h>
#include "quartzCommon.h" #include "quartzCommon.h"

View File

@ -1,6 +1,6 @@
/************************************************************************** /**************************************************************************
Copyright (c) 2002 Apple Computer, Inc. All Rights Reserved. Copyright (c) 2002-2007 Apple Inc. All Rights Reserved.
Copyright (c) 2003 Torrey T. Lyons. All Rights Reserved. Copyright (c) 2003 Torrey T. Lyons. All Rights Reserved.
Permission is hereby granted, free of charge, to any person obtaining a Permission is hereby granted, free of charge, to any person obtaining a

View File

@ -29,7 +29,6 @@
* holders shall not be used in advertising or otherwise to promote the sale, * holders shall not be used in advertising or otherwise to promote the sale,
* use or other dealings in this Software without prior written authorization. * use or other dealings in this Software without prior written authorization.
*/ */
/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/cr/XView.m,v 1.1 2003/06/07 05:49:07 torrey Exp $ */
#include <dix-config.h> #include <dix-config.h>

View File

@ -1,7 +1,6 @@
/* /*
* Cocoa rootless implementation functions for AppleWM extension * Cocoa rootless implementation functions for AppleWM extension
*/ *
/*
* Copyright (c) 2003 Torrey T. Lyons. All Rights Reserved. * Copyright (c) 2003 Torrey T. Lyons. All Rights Reserved.
* *
* Permission is hereby granted, free of charge, to any person obtaining a * Permission is hereby granted, free of charge, to any person obtaining a
@ -26,7 +25,6 @@
* holders shall not be used in advertising or otherwise to promote the sale, * holders shall not be used in advertising or otherwise to promote the sale,
* use or other dealings in this Software without prior written authorization. * use or other dealings in this Software without prior written authorization.
*/ */
/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/xpr/xprFrame.c,v 1.2 2003/06/30 01:45:13 torrey Exp $ */
#include <dix-config.h> #include <dix-config.h>

View File

@ -1,7 +1,6 @@
/* /*
* Cocoa rootless implementation frame functions * Cocoa rootless implementation frame functions
*/ *
/*
* Copyright (c) 2001 Greg Parker. All Rights Reserved. * Copyright (c) 2001 Greg Parker. All Rights Reserved.
* Copyright (c) 2002-2003 Torrey T. Lyons. All Rights Reserved. * Copyright (c) 2002-2003 Torrey T. Lyons. All Rights Reserved.
* *
@ -27,7 +26,6 @@
* holders shall not be used in advertising or otherwise to promote the sale, * holders shall not be used in advertising or otherwise to promote the sale,
* use or other dealings in this Software without prior written authorization. * use or other dealings in this Software without prior written authorization.
*/ */
/* $XdotOrg: xc/programs/Xserver/hw/darwin/quartz/cr/crFrame.m,v 1.2 2004/04/23 19:15:51 eich Exp $ */
#include <dix-config.h> #include <dix-config.h>

View File

@ -1,8 +1,6 @@
/* $XdotOrg: xc/programs/Xserver/hw/darwin/quartz/cr/crScreen.m,v 1.4 2004/08/12 20:24:36 torrey Exp $ */
/* /*
* Cocoa rootless implementation initialization * Cocoa rootless implementation initialization
*/ *
/*
* Copyright (c) 2001 Greg Parker. All Rights Reserved. * Copyright (c) 2001 Greg Parker. All Rights Reserved.
* Copyright (c) 2002-2004 Torrey T. Lyons. All Rights Reserved. * Copyright (c) 2002-2004 Torrey T. Lyons. All Rights Reserved.
* *
@ -28,7 +26,6 @@
* holders shall not be used in advertising or otherwise to promote the sale, * holders shall not be used in advertising or otherwise to promote the sale,
* use or other dealings in this Software without prior written authorization. * use or other dealings in this Software without prior written authorization.
*/ */
/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/cr/crScreen.m,v 1.5 2003/11/12 20:21:52 torrey Exp $ */
#include <dix-config.h> #include <dix-config.h>

View File

@ -2,8 +2,7 @@
* quartzCursor.h * quartzCursor.h
* *
* External interface for Quartz hardware cursor * External interface for Quartz hardware cursor
*/ *
/*
* Copyright (c) 2001 Torrey T. Lyons and Greg Parker. * Copyright (c) 2001 Torrey T. Lyons and Greg Parker.
* All Rights Reserved. * All Rights Reserved.
* *

View File

@ -1,4 +1,5 @@
/* /*
*
* This module converts keysym values into the corresponding ISO 10646 * This module converts keysym values into the corresponding ISO 10646
* (UCS, Unicode) values. * (UCS, Unicode) values.
* *

View File

@ -1,9 +1,7 @@
/************************************************************** /*
* *
* Quartz-specific support for the Darwin X Server * Quartz-specific support for the Darwin X Server
* *
**************************************************************/
/*
* Copyright (c) 2001-2004 Greg Parker and Torrey T. Lyons. * Copyright (c) 2001-2004 Greg Parker and Torrey T. Lyons.
* All Rights Reserved. * All Rights Reserved.
* *
@ -64,7 +62,7 @@ int quartzServerVisible = TRUE;
int quartzServerQuitting = FALSE; int quartzServerQuitting = FALSE;
int quartzScreenIndex = 0; int quartzScreenIndex = 0;
int aquaMenuBarHeight = 0; int aquaMenuBarHeight = 0;
int noPseudoramiXExtension = TRUE; int noPseudoramiXExtension = FALSE;
QuartzModeProcsPtr quartzProcs = NULL; QuartzModeProcsPtr quartzProcs = NULL;
const char *quartzOpenGLBundle = NULL; const char *quartzOpenGLBundle = NULL;
@ -397,11 +395,22 @@ void DarwinModeProcessEvent(
QuartzUpdateScreens(); QuartzUpdateScreens();
break; break;
case kXDarwinWindowState: case kXDarwinBringAllToFront:
case kXDarwinWindowMoved: RootlessOrderAllWindows();
// FIXME: Not implemented yet
break; break;
case kXDarwinWindowState:
ErrorF("kXDarwinWindowState\n");
break;
case kXDarwinWindowMoved: {
WindowPtr pWin = (WindowPtr)xe->u.clientMessage.u.l.longs0;
short x = xe->u.clientMessage.u.l.longs1,
y = xe->u.clientMessage.u.l.longs2;
ErrorF("kXDarwinWindowMoved(%p, %hd, %hd)\n", pWin, x, y);
RootlessMoveWindow(pWin, x, y, pWin->nextSib, VTMove);
}
break;
default: default:
ErrorF("Unknown application defined event type %d.\n", ErrorF("Unknown application defined event type %d.\n",
xe->u.u.type); xe->u.u.type);

View File

@ -3,8 +3,7 @@
* *
* External interface of the Quartz display modes seen by the generic, mode * External interface of the Quartz display modes seen by the generic, mode
* independent parts of the Darwin X server. * independent parts of the Darwin X server.
*/ *
/*
* Copyright (c) 2001-2003 Greg Parker and Torrey T. Lyons. * Copyright (c) 2001-2003 Greg Parker and Torrey T. Lyons.
* All Rights Reserved. * All Rights Reserved.
* *

View File

@ -1,4 +1,3 @@
/* $XdotOrg: xc/programs/Xserver/hw/darwin/quartz/quartzCocoa.m,v 1.2 2004/04/23 19:15:17 eich Exp $ */
/************************************************************** /**************************************************************
* *
* Quartz-specific support for the Darwin X Server * Quartz-specific support for the Darwin X Server
@ -7,8 +6,6 @@
* This file is separate from the parts of Quartz support * This file is separate from the parts of Quartz support
* that use X include files to avoid symbol collisions. * that use X include files to avoid symbol collisions.
* *
**************************************************************/
/*
* Copyright (c) 2001-2004 Torrey T. Lyons and Greg Parker. * Copyright (c) 2001-2004 Torrey T. Lyons and Greg Parker.
* All Rights Reserved. * All Rights Reserved.
* *
@ -34,7 +31,7 @@
* holders shall not be used in advertising or otherwise to promote the sale, * holders shall not be used in advertising or otherwise to promote the sale,
* use or other dealings in this Software without prior written authorization. * use or other dealings in this Software without prior written authorization.
*/ */
/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/quartzCocoa.m,v 1.5 2004/06/08 22:58:10 torrey Exp $ */
#include <dix-config.h> #include <dix-config.h>
#include "quartzCommon.h" #include "quartzCommon.h"
@ -45,14 +42,16 @@
#include <Cocoa/Cocoa.h> #include <Cocoa/Cocoa.h>
#ifndef INXQUARTZ
#import "Preferences.h" #import "Preferences.h"
#endif
#include "pseudoramiX.h" #include "pseudoramiX.h"
extern void FatalError(const char *, ...); extern void FatalError(const char *, ...);
extern char *display; extern char *display;
extern int noPanoramiXExtension; extern int noPanoramiXExtension;
#ifndef INXQUARTZ
/* /*
* QuartzReadPreferences * QuartzReadPreferences
* Read the user preferences from the Cocoa front end. * Read the user preferences from the Cocoa front end.
@ -98,7 +97,7 @@ void QuartzReadPreferences(void)
darwinDesiredDepth = [Preferences depth] - 1; darwinDesiredDepth = [Preferences depth] - 1;
} }
#endif
/* /*
* QuartzWriteCocoaPasteboard * QuartzWriteCocoaPasteboard
@ -163,6 +162,7 @@ char *QuartzReadCocoaPasteboard(void)
int QuartzFSUseQDCursor( int QuartzFSUseQDCursor(
int depth) // screen depth int depth) // screen depth
{ {
#ifndef INXQUARTZ
switch ([Preferences useQDCursor]) { switch ([Preferences useQDCursor]) {
case qdCursor_Always: case qdCursor_Always:
return TRUE; return TRUE;
@ -174,6 +174,7 @@ int QuartzFSUseQDCursor(
else else
return FALSE; return FALSE;
} }
#endif
return TRUE; return TRUE;
} }

View File

@ -2,8 +2,7 @@
* quartzCursor.h * quartzCursor.h
* *
* External interface for Quartz hardware cursor * External interface for Quartz hardware cursor
*/ *
/*
* Copyright (c) 2001 Torrey T. Lyons and Greg Parker. * Copyright (c) 2001 Torrey T. Lyons and Greg Parker.
* All Rights Reserved. * All Rights Reserved.
* *

View File

@ -217,42 +217,41 @@ DarwinModeReadSystemKeymap (darwinKeyboardInfo *info)
const void *chr_data = NULL; const void *chr_data = NULL;
int num_keycodes = NUM_KEYCODES; int num_keycodes = NUM_KEYCODES;
UInt32 keyboard_type = 0; UInt32 keyboard_type = 0;
int is_uchr, i, j; int is_uchr = 1, i, j;
OSStatus err; OSStatus err;
KeySym *k; KeySym *k;
TISInputSourceRef currentKeyLayoutRef = TISCopyCurrentKeyboardLayoutInputSource(); TISInputSourceRef currentKeyLayoutRef = TISCopyCurrentKeyboardLayoutInputSource();
if (currentKeyLayoutRef) if (currentKeyLayoutRef)
{
CFDataRef currentKeyLayoutDataRef = (CFDataRef )TISGetInputSourceProperty(currentKeyLayoutRef, kTISPropertyUnicodeKeyLayoutData);
if (currentKeyLayoutDataRef)
chr_data = CFDataGetBytePtr(currentKeyLayoutDataRef);
}
if (chr_data != NULL)
{
KLGetCurrentKeyboardLayout (&key_layout);
KLGetKeyboardLayoutProperty (key_layout, kKLuchrData, &chr_data);
if (chr_data != NULL)
{ {
is_uchr = 1; CFDataRef currentKeyLayoutDataRef = (CFDataRef )TISGetInputSourceProperty(currentKeyLayoutRef, kTISPropertyUnicodeKeyLayoutData);
keyboard_type = LMGetKbdType (); if (currentKeyLayoutDataRef)
chr_data = CFDataGetBytePtr(currentKeyLayoutDataRef);
}
if(chr_data == NULL) {
KLGetCurrentKeyboardLayout (&key_layout);
KLGetKeyboardLayoutProperty (key_layout, kKLuchrData, &chr_data);
if (chr_data != NULL)
{
is_uchr = 1;
keyboard_type = LMGetKbdType ();
}
else
{
KLGetKeyboardLayoutProperty (key_layout, kKLKCHRData, &chr_data);
if (chr_data == NULL)
{
ErrorF ( "Couldn't get uchr or kchr resource\n");
return FALSE;
}
is_uchr = 0;
num_keycodes = 128;
}
} }
else
{
KLGetKeyboardLayoutProperty (key_layout, kKLKCHRData, &chr_data);
if (chr_data == NULL)
{
ErrorF ( "Couldn't get uchr or kchr resource\n");
return FALSE;
}
is_uchr = 0;
num_keycodes = 128;
}
}
/* Scan the keycode range for the Unicode character that each /* Scan the keycode range for the Unicode character that each
key produces in the four shift states. Then convert that to key produces in the four shift states. Then convert that to
@ -376,8 +375,7 @@ DarwinModeReadSystemKeymap (darwinKeyboardInfo *info)
} }
} }
} }
if(currentKeyLayoutRef) CFRelease(currentKeyLayoutRef);
if(currentKeyLayoutRef) CFRelease(currentKeyLayoutRef);
return TRUE; return TRUE;
} }

View File

@ -236,7 +236,7 @@ DRIFinishScreenInit(ScreenPtr pScreen)
pDRIPriv->wrap.ClipNotify = pScreen->ClipNotify; pDRIPriv->wrap.ClipNotify = pScreen->ClipNotify;
pScreen->ClipNotify = DRIClipNotify; pScreen->ClipNotify = DRIClipNotify;
ErrorF("[DRI] screen %d installation complete\n", pScreen->myNum); // ErrorF("[DRI] screen %d installation complete\n", pScreen->myNum);
return TRUE; return TRUE;
} }

View File

@ -45,6 +45,10 @@
# include "damage.h" # include "damage.h"
#endif #endif
/* 10.4's deferred update makes X slower.. have to live with the tearing
for now.. */
#define XP_NO_DEFERRED_UPDATES 8
// Name of GLX bundle for native OpenGL // Name of GLX bundle for native OpenGL
static const char *xprOpenGLBundle = "glxCGL.bundle"; static const char *xprOpenGLBundle = "glxCGL.bundle";
@ -59,10 +63,12 @@ eventHandler(unsigned int type, const void *arg,
switch (type) switch (type)
{ {
case XP_EVENT_DISPLAY_CHANGED: case XP_EVENT_DISPLAY_CHANGED:
// ErrorF("XP_EVENT_DISPLAY_MOVED\n");
QuartzMessageServerThread(kXDarwinDisplayChanged, 0); QuartzMessageServerThread(kXDarwinDisplayChanged, 0);
break; break;
case XP_EVENT_WINDOW_STATE_CHANGED: case XP_EVENT_WINDOW_STATE_CHANGED:
// ErrorF("XP_EVENT_WINDOW_STATE_CHANGED\n");
if (arg_size >= sizeof(xp_window_state_event)) if (arg_size >= sizeof(xp_window_state_event))
{ {
const xp_window_state_event *ws_arg = arg; const xp_window_state_event *ws_arg = arg;
@ -73,6 +79,7 @@ eventHandler(unsigned int type, const void *arg,
break; break;
case XP_EVENT_WINDOW_MOVED: case XP_EVENT_WINDOW_MOVED:
// ErrorF("XP_EVENT_WINDOW_MOVED\n");
if (arg_size == sizeof(xp_window_id)) if (arg_size == sizeof(xp_window_id))
{ {
xp_window_id id = * (xp_window_id *) arg; xp_window_id id = * (xp_window_id *) arg;
@ -89,6 +96,7 @@ eventHandler(unsigned int type, const void *arg,
case XP_EVENT_SURFACE_DESTROYED: case XP_EVENT_SURFACE_DESTROYED:
case XP_EVENT_SURFACE_CHANGED: case XP_EVENT_SURFACE_CHANGED:
// ErrorF("XP_EVENT_SURFACE_MOVED\n");
if (arg_size == sizeof(xp_surface_id)) if (arg_size == sizeof(xp_surface_id))
{ {
int kind; int kind;

View File

@ -424,7 +424,7 @@ static int ProcDMXChangeScreensAttributes(ClientPtr client)
if (!_DMXXineramaActive()) goto noxinerama; if (!_DMXXineramaActive()) goto noxinerama;
if (!(attribs = ALLOCATE_LOCAL(stuff->screenCount * sizeof(*attribs)))) if (!(attribs = xalloc(stuff->screenCount * sizeof(*attribs))))
return BadAlloc; return BadAlloc;
for (i = 0; i < stuff->screenCount; i++) { for (i = 0; i < stuff->screenCount; i++) {
@ -443,7 +443,7 @@ static int ProcDMXChangeScreensAttributes(ClientPtr client)
&errorScreen); &errorScreen);
#endif #endif
DEALLOCATE_LOCAL(attribs); xfree(attribs);
if (status == BadValue) return status; if (status == BadValue) return status;
@ -489,7 +489,7 @@ static int ProcDMXAddScreen(ClientPtr client)
value_list = (CARD32 *)(stuff + 1); value_list = (CARD32 *)(stuff + 1);
count = dmxFetchScreenAttributes(stuff->valueMask, &attr, value_list); count = dmxFetchScreenAttributes(stuff->valueMask, &attr, value_list);
if (!(name = ALLOCATE_LOCAL(stuff->displayNameLength + 1 + 4))) if (!(name = xalloc(stuff->displayNameLength + 1 + 4)))
return BadAlloc; return BadAlloc;
memcpy(name, &value_list[count], stuff->displayNameLength); memcpy(name, &value_list[count], stuff->displayNameLength);
name[stuff->displayNameLength] = '\0'; name[stuff->displayNameLength] = '\0';
@ -497,7 +497,7 @@ static int ProcDMXAddScreen(ClientPtr client)
status = dmxAttachScreen(stuff->physicalScreen, &attr); status = dmxAttachScreen(stuff->physicalScreen, &attr);
DEALLOCATE_LOCAL(name); xfree(name);
rep.type = X_Reply; rep.type = X_Reply;
rep.sequenceNumber = client->sequence; rep.sequenceNumber = client->sequence;
@ -617,30 +617,30 @@ static int ProcDMXGetWindowAttributes(ClientPtr client)
REQUEST_SIZE_MATCH(xDMXGetWindowAttributesReq); REQUEST_SIZE_MATCH(xDMXGetWindowAttributesReq);
if (!(screens = ALLOCATE_LOCAL(count * sizeof(*screens)))) if (!(screens = xalloc(count * sizeof(*screens))))
return BadAlloc; return BadAlloc;
if (!(windows = ALLOCATE_LOCAL(count * sizeof(*windows)))) { if (!(windows = xalloc(count * sizeof(*windows)))) {
DEALLOCATE_LOCAL(screens); xfree(screens);
return BadAlloc; return BadAlloc;
} }
if (!(pos = ALLOCATE_LOCAL(count * sizeof(*pos)))) { if (!(pos = xalloc(count * sizeof(*pos)))) {
DEALLOCATE_LOCAL(windows); xfree(windows);
DEALLOCATE_LOCAL(screens); xfree(screens);
return BadAlloc; return BadAlloc;
} }
if (!(vis = ALLOCATE_LOCAL(count * sizeof(*vis)))) { if (!(vis = xalloc(count * sizeof(*vis)))) {
DEALLOCATE_LOCAL(pos); xfree(pos);
DEALLOCATE_LOCAL(windows); xfree(windows);
DEALLOCATE_LOCAL(screens); xfree(screens);
return BadAlloc; return BadAlloc;
} }
if ((count = dmxPopulate(client, stuff->window, screens, windows, if ((count = dmxPopulate(client, stuff->window, screens, windows,
pos, vis)) < 0) { pos, vis)) < 0) {
DEALLOCATE_LOCAL(vis); xfree(vis);
DEALLOCATE_LOCAL(pos); xfree(pos);
DEALLOCATE_LOCAL(windows); xfree(windows);
DEALLOCATE_LOCAL(screens); xfree(screens);
return BadWindow; return BadWindow;
} }
@ -678,10 +678,10 @@ static int ProcDMXGetWindowAttributes(ClientPtr client)
WriteToClient(client, count * sizeof(*vis), (char *)vis); WriteToClient(client, count * sizeof(*vis), (char *)vis);
} }
DEALLOCATE_LOCAL(vis); xfree(vis);
DEALLOCATE_LOCAL(pos); xfree(pos);
DEALLOCATE_LOCAL(windows); xfree(windows);
DEALLOCATE_LOCAL(screens); xfree(screens);
return client->noClientException; return client->noClientException;
} }
@ -842,7 +842,7 @@ static int ProcDMXAddInput(ClientPtr client)
value_list = (CARD32 *)(stuff + 1); value_list = (CARD32 *)(stuff + 1);
count = dmxFetchInputAttributes(stuff->valueMask, &attr, value_list); count = dmxFetchInputAttributes(stuff->valueMask, &attr, value_list);
if (!(name = ALLOCATE_LOCAL(stuff->displayNameLength + 1 + 4))) if (!(name = xalloc(stuff->displayNameLength + 1 + 4)))
return BadAlloc; return BadAlloc;
memcpy(name, &value_list[count], stuff->displayNameLength); memcpy(name, &value_list[count], stuff->displayNameLength);
name[stuff->displayNameLength] = '\0'; name[stuff->displayNameLength] = '\0';
@ -850,7 +850,7 @@ static int ProcDMXAddInput(ClientPtr client)
status = dmxAddInput(&attr, &id); status = dmxAddInput(&attr, &id);
DEALLOCATE_LOCAL(name); xfree(name);
if (status) return status; if (status) return status;

View File

@ -1121,9 +1121,9 @@ static void dmxBERestoreRenderGlyph(pointer value, XID id, pointer n)
} }
/* Now allocate the memory we need */ /* Now allocate the memory we need */
images = ALLOCATE_LOCAL(len_images*sizeof(char)); images = xalloc(len_images*sizeof(char));
gids = ALLOCATE_LOCAL(glyphSet->hash.tableEntries*sizeof(Glyph)); gids = xalloc(glyphSet->hash.tableEntries*sizeof(Glyph));
glyphs = ALLOCATE_LOCAL(glyphSet->hash.tableEntries*sizeof(XGlyphInfo)); glyphs = xalloc(glyphSet->hash.tableEntries*sizeof(XGlyphInfo));
memset(images, 0, len_images * sizeof(char)); memset(images, 0, len_images * sizeof(char));
pos = images; pos = images;
@ -1159,9 +1159,9 @@ static void dmxBERestoreRenderGlyph(pointer value, XID id, pointer n)
len_images); len_images);
/* Clean up */ /* Clean up */
DEALLOCATE_LOCAL(len_images); xfree(len_images);
DEALLOCATE_LOCAL(gids); xfree(gids);
DEALLOCATE_LOCAL(glyphs); xfree(glyphs);
} }
#endif #endif

View File

@ -531,13 +531,13 @@ static int dmxProcRenderCompositeGlyphs(ClientPtr client)
/* The following only works for Render version > 0.2 */ /* The following only works for Render version > 0.2 */
/* All of the XGlyphElt* structure sizes are identical */ /* All of the XGlyphElt* structure sizes are identical */
elts = ALLOCATE_LOCAL(nelt * sizeof(XGlyphElt8)); elts = xalloc(nelt * sizeof(XGlyphElt8));
if (!elts) if (!elts)
return BadAlloc; return BadAlloc;
glyphs = ALLOCATE_LOCAL(nglyph * size); glyphs = xalloc(nglyph * size);
if (!glyphs) { if (!glyphs) {
DEALLOCATE_LOCAL(elts); xfree(elts);
return BadAlloc; return BadAlloc;
} }
@ -605,8 +605,8 @@ static int dmxProcRenderCompositeGlyphs(ClientPtr client)
dmxSync(dmxScreen, FALSE); dmxSync(dmxScreen, FALSE);
DEALLOCATE_LOCAL(elts); xfree(elts);
DEALLOCATE_LOCAL(glyphs); xfree(glyphs);
} }
return ret; return ret;

View File

@ -331,7 +331,7 @@ epsonCreateColormap (ColormapPtr pmap)
case FB_VISUAL_STATIC_PSEUDOCOLOR: case FB_VISUAL_STATIC_PSEUDOCOLOR:
pVisual = pmap->pVisual; pVisual = pmap->pVisual;
nent = pVisual->ColormapEntries; nent = pVisual->ColormapEntries;
pdefs = ALLOCATE_LOCAL (nent * sizeof (xColorItem)); pdefs = xalloc (nent * sizeof (xColorItem));
if (!pdefs) if (!pdefs)
return FALSE; return FALSE;
for (i = 0; i < nent; i++) for (i = 0; i < nent; i++)
@ -343,7 +343,7 @@ epsonCreateColormap (ColormapPtr pmap)
pmap->red[i].co.local.green = pdefs[i].green; pmap->red[i].co.local.green = pdefs[i].green;
pmap->red[i].co.local.blue = pdefs[i].blue; pmap->red[i].co.local.blue = pdefs[i].blue;
} }
DEALLOCATE_LOCAL (pdefs); xfree (pdefs);
return TRUE; return TRUE;
default: default:

View File

@ -598,7 +598,7 @@ fbdevCreateColormap (ColormapPtr pmap)
case FB_VISUAL_STATIC_PSEUDOCOLOR: case FB_VISUAL_STATIC_PSEUDOCOLOR:
pVisual = pmap->pVisual; pVisual = pmap->pVisual;
nent = pVisual->ColormapEntries; nent = pVisual->ColormapEntries;
pdefs = ALLOCATE_LOCAL (nent * sizeof (xColorItem)); pdefs = xalloc (nent * sizeof (xColorItem));
if (!pdefs) if (!pdefs)
return FALSE; return FALSE;
for (i = 0; i < nent; i++) for (i = 0; i < nent; i++)
@ -610,7 +610,7 @@ fbdevCreateColormap (ColormapPtr pmap)
pmap->red[i].co.local.green = pdefs[i].green; pmap->red[i].co.local.green = pdefs[i].green;
pmap->red[i].co.local.blue = pdefs[i].blue; pmap->red[i].co.local.blue = pdefs[i].blue;
} }
DEALLOCATE_LOCAL (pdefs); xfree (pdefs);
return TRUE; return TRUE;
default: default:
return fbInitializeColormap (pmap); return fbInitializeColormap (pmap);

View File

@ -553,12 +553,12 @@ igsFillSpans (DrawablePtr pDrawable, GCPtr pGC, int n,
return; return;
} }
nTmp = n * miFindMaxBand(fbGetCompositeClip(pGC)); nTmp = n * miFindMaxBand(fbGetCompositeClip(pGC));
pwidthFree = (int *)ALLOCATE_LOCAL(nTmp * sizeof(int)); pwidthFree = (int *)xalloc(nTmp * sizeof(int));
pptFree = (DDXPointRec *)ALLOCATE_LOCAL(nTmp * sizeof(DDXPointRec)); pptFree = (DDXPointRec *)xalloc(nTmp * sizeof(DDXPointRec));
if(!pptFree || !pwidthFree) if(!pptFree || !pwidthFree)
{ {
if (pptFree) DEALLOCATE_LOCAL(pptFree); if (pptFree) xfree(pptFree);
if (pwidthFree) DEALLOCATE_LOCAL(pwidthFree); if (pwidthFree) xfree(pwidthFree);
return; return;
} }
n = miClipSpans(fbGetCompositeClip(pGC), n = miClipSpans(fbGetCompositeClip(pGC),
@ -607,8 +607,8 @@ igsFillSpans (DrawablePtr pDrawable, GCPtr pGC, int n,
_igsPatRect(cop,x,y,width,1,cmd); _igsPatRect(cop,x,y,width,1,cmd);
} }
} }
DEALLOCATE_LOCAL(pptFree); xfree(pptFree);
DEALLOCATE_LOCAL(pwidthFree); xfree(pwidthFree);
KdMarkSync (pDrawable->pScreen); KdMarkSync (pDrawable->pScreen);
} }

View File

@ -343,7 +343,7 @@ nvidiaPaintRegion (ScreenPtr pScreen, RegionPtr pRgn, Pixel fg)
BoxPtr pBox = REGION_RECTS (pRgn); BoxPtr pBox = REGION_RECTS (pRgn);
int nBox = REGION_NUM_RECTS (pRgn); int nBox = REGION_NUM_RECTS (pRgn);
rects = ALLOCATE_LOCAL (nBox * sizeof (xRectangle)); rects = xalloc (nBox * sizeof (xRectangle));
if (!rects) if (!rects)
goto bail0; goto bail0;
r = rects; r = rects;
@ -372,7 +372,7 @@ nvidiaPaintRegion (ScreenPtr pScreen, RegionPtr pRgn, Pixel fg)
FreeScratchGC (pGC); FreeScratchGC (pGC);
bail1: bail1:
DEALLOCATE_LOCAL (rects); xfree (rects);
bail0: bail0:
; ;
} }

View File

@ -519,7 +519,7 @@ s3PolyFillRect (DrawablePtr pDrawable, GCPtr pGC,
numRects = REGION_NUM_RECTS(prgnClip) * nrectFill; numRects = REGION_NUM_RECTS(prgnClip) * nrectFill;
if (numRects > NUM_STACK_RECTS) if (numRects > NUM_STACK_RECTS)
{ {
pboxClippedBase = (BoxPtr)ALLOCATE_LOCAL(numRects * sizeof(BoxRec)); pboxClippedBase = (BoxPtr)xalloc(numRects * sizeof(BoxRec));
if (!pboxClippedBase) if (!pboxClippedBase)
return; return;
} }
@ -637,7 +637,7 @@ s3PolyFillRect (DrawablePtr pDrawable, GCPtr pGC,
pboxClippedBase); pboxClippedBase);
} }
if (pboxClippedBase != stackRects) if (pboxClippedBase != stackRects)
DEALLOCATE_LOCAL(pboxClippedBase); xfree(pboxClippedBase);
} }
void void
@ -771,12 +771,12 @@ s3FillSpans (DrawablePtr pDrawable, GCPtr pGC, int n,
else else
{ {
nTmp = n * miFindMaxBand(pClip); nTmp = n * miFindMaxBand(pClip);
pwidthFree = (int *)ALLOCATE_LOCAL(nTmp * sizeof(int)); pwidthFree = (int *)xalloc(nTmp * sizeof(int));
pptFree = (DDXPointRec *)ALLOCATE_LOCAL(nTmp * sizeof(DDXPointRec)); pptFree = (DDXPointRec *)xalloc(nTmp * sizeof(DDXPointRec));
if(!pptFree || !pwidthFree) if(!pptFree || !pwidthFree)
{ {
if (pptFree) DEALLOCATE_LOCAL(pptFree); if (pptFree) xfree(pptFree);
if (pwidthFree) DEALLOCATE_LOCAL(pwidthFree); if (pwidthFree) xfree(pwidthFree);
return; return;
} }
n = miClipSpans(fbGetCompositeClip(pGC), n = miClipSpans(fbGetCompositeClip(pGC),
@ -820,8 +820,8 @@ s3FillSpans (DrawablePtr pDrawable, GCPtr pGC, int n,
{ {
_s3FillSpanLargeStipple (pDrawable, pGC, n, ppt, pwidth); _s3FillSpanLargeStipple (pDrawable, pGC, n, ppt, pwidth);
} }
DEALLOCATE_LOCAL(pptFree); xfree(pptFree);
DEALLOCATE_LOCAL(pwidthFree); xfree(pwidthFree);
} }
MarkSyncS3 (pDrawable->pScreen); MarkSyncS3 (pDrawable->pScreen);
} }
@ -2449,12 +2449,12 @@ s3_24FillSpans (DrawablePtr pDrawable, GCPtr pGC, int n,
else else
{ {
nTmp = n * miFindMaxBand(pClip); nTmp = n * miFindMaxBand(pClip);
pwidthFree = (int *)ALLOCATE_LOCAL(nTmp * sizeof(int)); pwidthFree = (int *)xalloc(nTmp * sizeof(int));
pptFree = (DDXPointRec *)ALLOCATE_LOCAL(nTmp * sizeof(DDXPointRec)); pptFree = (DDXPointRec *)xalloc(nTmp * sizeof(DDXPointRec));
if(!pptFree || !pwidthFree) if(!pptFree || !pwidthFree)
{ {
if (pptFree) DEALLOCATE_LOCAL(pptFree); if (pptFree) xfree(pptFree);
if (pwidthFree) DEALLOCATE_LOCAL(pwidthFree); if (pwidthFree) xfree(pwidthFree);
return; return;
} }
n = miClipSpans(fbGetCompositeClip(pGC), n = miClipSpans(fbGetCompositeClip(pGC),
@ -2474,8 +2474,8 @@ s3_24FillSpans (DrawablePtr pDrawable, GCPtr pGC, int n,
_s3SolidRect(s3,x*3,y,width*3,1); _s3SolidRect(s3,x*3,y,width*3,1);
} }
} }
DEALLOCATE_LOCAL(pptFree); xfree(pptFree);
DEALLOCATE_LOCAL(pwidthFree); xfree(pwidthFree);
} }
MarkSyncS3 (pDrawable->pScreen); MarkSyncS3 (pDrawable->pScreen);
} }
@ -2610,7 +2610,7 @@ s3_24PolyFillRect (DrawablePtr pDrawable, GCPtr pGC,
numRects = REGION_NUM_RECTS(prgnClip) * nrectFill; numRects = REGION_NUM_RECTS(prgnClip) * nrectFill;
if (numRects > NUM_STACK_RECTS) if (numRects > NUM_STACK_RECTS)
{ {
pboxClippedBase = (BoxPtr)ALLOCATE_LOCAL(numRects * sizeof(BoxRec)); pboxClippedBase = (BoxPtr)xalloc(numRects * sizeof(BoxRec));
if (!pboxClippedBase) if (!pboxClippedBase)
return; return;
} }
@ -2718,7 +2718,7 @@ s3_24PolyFillRect (DrawablePtr pDrawable, GCPtr pGC,
pGC->fgPixel, pGC->alu, pGC->planemask); pGC->fgPixel, pGC->alu, pGC->planemask);
} }
if (pboxClippedBase != stackRects) if (pboxClippedBase != stackRects)
DEALLOCATE_LOCAL(pboxClippedBase); xfree(pboxClippedBase);
} }
void void

View File

@ -1234,12 +1234,12 @@ sisFillSpans (DrawablePtr pDrawable, GCPtr pGC, int n,
return; return;
} }
nTmp = n * miFindMaxBand(fbGetCompositeClip(pGC)); nTmp = n * miFindMaxBand(fbGetCompositeClip(pGC));
pwidthFree = (int *)ALLOCATE_LOCAL(nTmp * sizeof(int)); pwidthFree = (int *)xalloc(nTmp * sizeof(int));
pptFree = (DDXPointRec *)ALLOCATE_LOCAL(nTmp * sizeof(DDXPointRec)); pptFree = (DDXPointRec *)xalloc(nTmp * sizeof(DDXPointRec));
if(!pptFree || !pwidthFree) if(!pptFree || !pwidthFree)
{ {
if (pptFree) DEALLOCATE_LOCAL(pptFree); if (pptFree) xfree(pptFree);
if (pwidthFree) DEALLOCATE_LOCAL(pwidthFree); if (pwidthFree) xfree(pwidthFree);
return; return;
} }
n = miClipSpans(fbGetCompositeClip(pGC), n = miClipSpans(fbGetCompositeClip(pGC),
@ -1273,8 +1273,8 @@ sisFillSpans (DrawablePtr pDrawable, GCPtr pGC, int n,
} }
} }
KdMarkSync (pDrawable->pScreen); KdMarkSync (pDrawable->pScreen);
DEALLOCATE_LOCAL(pptFree); xfree(pptFree);
DEALLOCATE_LOCAL(pwidthFree); xfree(pwidthFree);
} }
#define NUM_STACK_RECTS 1024 #define NUM_STACK_RECTS 1024
@ -1323,7 +1323,7 @@ sisPolyFillRect (DrawablePtr pDrawable, GCPtr pGC,
numRects = REGION_NUM_RECTS(prgnClip) * nrectFill; numRects = REGION_NUM_RECTS(prgnClip) * nrectFill;
if (numRects > NUM_STACK_RECTS) if (numRects > NUM_STACK_RECTS)
{ {
pboxClippedBase = (BoxPtr)ALLOCATE_LOCAL(numRects * sizeof(BoxRec)); pboxClippedBase = (BoxPtr)xalloc(numRects * sizeof(BoxRec));
if (!pboxClippedBase) if (!pboxClippedBase)
return; return;
} }
@ -1448,7 +1448,7 @@ sisPolyFillRect (DrawablePtr pDrawable, GCPtr pGC,
} }
} }
if (pboxClippedBase != stackRects) if (pboxClippedBase != stackRects)
DEALLOCATE_LOCAL(pboxClippedBase); xfree(pboxClippedBase);
} }
static const GCOps sisOps = { static const GCOps sisOps = {

View File

@ -342,7 +342,7 @@ mach64PaintRegion (ScreenPtr pScreen, RegionPtr pRgn, Pixel fg)
BoxPtr pBox = REGION_RECTS (pRgn); BoxPtr pBox = REGION_RECTS (pRgn);
int nBox = REGION_NUM_RECTS (pRgn); int nBox = REGION_NUM_RECTS (pRgn);
rects = ALLOCATE_LOCAL (nBox * sizeof (xRectangle)); rects = xalloc (nBox * sizeof (xRectangle));
if (!rects) if (!rects)
goto bail0; goto bail0;
r = rects; r = rects;
@ -371,7 +371,7 @@ mach64PaintRegion (ScreenPtr pScreen, RegionPtr pRgn, Pixel fg)
FreeScratchGC (pGC); FreeScratchGC (pGC);
bail1: bail1:
DEALLOCATE_LOCAL (rects); xfree (rects);
bail0: bail0:
; ;
} }

View File

@ -1927,7 +1927,7 @@ KXVPaintRegion (DrawablePtr pDraw, RegionPtr pRgn, Pixel fg)
BoxPtr pBox = REGION_RECTS (pRgn); BoxPtr pBox = REGION_RECTS (pRgn);
int nBox = REGION_NUM_RECTS (pRgn); int nBox = REGION_NUM_RECTS (pRgn);
rects = ALLOCATE_LOCAL (nBox * sizeof (xRectangle)); rects = xalloc (nBox * sizeof (xRectangle));
if (!rects) if (!rects)
goto bail0; goto bail0;
r = rects; r = rects;
@ -1956,7 +1956,7 @@ KXVPaintRegion (DrawablePtr pDraw, RegionPtr pRgn, Pixel fg)
FreeScratchGC (pGC); FreeScratchGC (pGC);
bail1: bail1:
DEALLOCATE_LOCAL (rects); xfree (rects);
bail0: bail0:
; ;
} }

View File

@ -482,9 +482,9 @@ vfbInstallColormap(ColormapPtr pmap)
swapcopy32(pXWDHeader->bits_per_rgb, pVisual->bitsPerRGBValue); swapcopy32(pXWDHeader->bits_per_rgb, pVisual->bitsPerRGBValue);
swapcopy32(pXWDHeader->colormap_entries, pVisual->ColormapEntries); swapcopy32(pXWDHeader->colormap_entries, pVisual->ColormapEntries);
ppix = (Pixel *)ALLOCATE_LOCAL(entries * sizeof(Pixel)); ppix = (Pixel *)xalloc(entries * sizeof(Pixel));
prgb = (xrgb *)ALLOCATE_LOCAL(entries * sizeof(xrgb)); prgb = (xrgb *)xalloc(entries * sizeof(xrgb));
defs = (xColorItem *)ALLOCATE_LOCAL(entries * sizeof(xColorItem)); defs = (xColorItem *)xalloc(entries * sizeof(xColorItem));
for (i = 0; i < entries; i++) ppix[i] = i; for (i = 0; i < entries; i++) ppix[i] = i;
/* XXX truecolor */ /* XXX truecolor */
@ -499,9 +499,9 @@ vfbInstallColormap(ColormapPtr pmap)
} }
(*pmap->pScreen->StoreColors)(pmap, entries, defs); (*pmap->pScreen->StoreColors)(pmap, entries, defs);
DEALLOCATE_LOCAL(ppix); xfree(ppix);
DEALLOCATE_LOCAL(prgb); xfree(prgb);
DEALLOCATE_LOCAL(defs); xfree(defs);
} }
} }

View File

@ -100,7 +100,6 @@ optionsdir = $(libdir)/X11
dist_options_DATA = Options dist_options_DATA = Options
CPP_FILES_FLAGS = \ CPP_FILES_FLAGS = \
-DRGBPATH=\"$(RGB_DB)\" \
-DLOCALFONTPATH="\"$(BASE_FONT_PATH)/local\"" \ -DLOCALFONTPATH="\"$(BASE_FONT_PATH)/local\"" \
-DMISCFONTPATH="\"$(BASE_FONT_PATH)/misc\"" \ -DMISCFONTPATH="\"$(BASE_FONT_PATH)/misc\"" \
-DT1FONTPATH="\"$(BASE_FONT_PATH)/Type1\"" \ -DT1FONTPATH="\"$(BASE_FONT_PATH)/Type1\"" \

View File

@ -699,21 +699,6 @@ configFiles(XF86ConfFilesPtr fileconf)
} }
/* RgbPath */
pathFrom = X_DEFAULT;
if (xf86coFlag)
pathFrom = X_CMDLINE;
else if (fileconf) {
if (fileconf->file_rgbpath) {
rgbPath = fileconf->file_rgbpath;
pathFrom = X_CONFIG;
}
}
xf86Msg(pathFrom, "RgbPath set to \"%s\"\n", rgbPath);
if (fileconf && fileconf->file_inputdevs) { if (fileconf && fileconf->file_inputdevs) {
xf86InputDeviceList = fileconf->file_inputdevs; xf86InputDeviceList = fileconf->file_inputdevs;
xf86Msg(X_CONFIG, "Input device list set to \"%s\"\n", xf86Msg(X_CONFIG, "Input device list set to \"%s\"\n",

View File

@ -605,8 +605,6 @@ configureFilesSection (void)
ptr->file_modulepath = strdup(xf86ModulePath); ptr->file_modulepath = strdup(xf86ModulePath);
if (defaultFontPath) if (defaultFontPath)
ptr->file_fontpath = strdup(defaultFontPath); ptr->file_fontpath = strdup(defaultFontPath);
if (rgbPath)
ptr->file_rgbpath = strdup(rgbPath);
return ptr; return ptr;
} }
@ -823,7 +821,7 @@ DoConfigure()
homebuf[PATH_MAX-1] = '\0'; homebuf[PATH_MAX-1] = '\0';
home = homebuf; home = homebuf;
if (!(filename = if (!(filename =
(char *)ALLOCATE_LOCAL(strlen(home) + (char *)xalloc(strlen(home) +
strlen(configfile) + 3))) strlen(configfile) + 3)))
if (home[0] == '/' && home[1] == '\0') if (home[0] == '/' && home[1] == '\0')

View File

@ -622,7 +622,7 @@ xf86SbusCmapLoadPalette(ScrnInfoPtr pScrn, int numColors, int *indices,
int i, index; int i, index;
sbusCmapPtr cmap; sbusCmapPtr cmap;
struct fbcmap fbcmap; struct fbcmap fbcmap;
unsigned char *data = ALLOCATE_LOCAL(numColors*3); unsigned char *data = xalloc(numColors*3);
cmap = SBUSCMAPPTR(pScrn->pScreen); cmap = SBUSCMAPPTR(pScrn->pScreen);
if (!cmap) return; if (!cmap) return;
@ -643,7 +643,7 @@ xf86SbusCmapLoadPalette(ScrnInfoPtr pScrn, int numColors, int *indices,
fbcmap.blue[fbcmap.count++] = colors[index].blue; fbcmap.blue[fbcmap.count++] = colors[index].blue;
} }
ioctl (cmap->psdp->fd, FBIOPUTCMAP, &fbcmap); ioctl (cmap->psdp->fd, FBIOPUTCMAP, &fbcmap);
DEALLOCATE_LOCAL(data); xfree(data);
} }
static Bool static Bool

View File

@ -1856,7 +1856,7 @@ xf86XVFillKeyHelperDrawable (DrawablePtr pDraw, CARD32 key, RegionPtr clipboxes)
REGION_TRANSLATE(pDraw->pScreen, clipboxes, -pDraw->x, -pDraw->y); REGION_TRANSLATE(pDraw->pScreen, clipboxes, -pDraw->x, -pDraw->y);
rects = ALLOCATE_LOCAL(nbox * sizeof(xRectangle)); rects = xalloc(nbox * sizeof(xRectangle));
for(i = 0; i < nbox; i++, pbox++) { for(i = 0; i < nbox; i++, pbox++) {
rects[i].x = pbox->x1; rects[i].x = pbox->x1;
@ -1869,7 +1869,7 @@ xf86XVFillKeyHelperDrawable (DrawablePtr pDraw, CARD32 key, RegionPtr clipboxes)
if (!pPriv) FreeGC(pGC, 0); if (!pPriv) FreeGC(pGC, 0);
DEALLOCATE_LOCAL(rects); xfree(rects);
} }
_X_EXPORT void _X_EXPORT void

View File

@ -1323,14 +1323,14 @@ ProcXF86VidModeGetMonitor(ClientPtr client)
rep.sequenceNumber = client->sequence; rep.sequenceNumber = client->sequence;
rep.nhsync = nHsync; rep.nhsync = nHsync;
rep.nvsync = nVrefresh; rep.nvsync = nVrefresh;
hsyncdata = ALLOCATE_LOCAL(nHsync * sizeof(CARD32)); hsyncdata = xalloc(nHsync * sizeof(CARD32));
if (!hsyncdata) { if (!hsyncdata) {
return BadAlloc; return BadAlloc;
} }
vsyncdata = ALLOCATE_LOCAL(nVrefresh * sizeof(CARD32)); vsyncdata = xalloc(nVrefresh * sizeof(CARD32));
if (!vsyncdata) { if (!vsyncdata) {
DEALLOCATE_LOCAL(hsyncdata); xfree(hsyncdata);
return BadAlloc; return BadAlloc;
} }
@ -1363,8 +1363,8 @@ ProcXF86VidModeGetMonitor(ClientPtr client)
if (rep.modelLength) if (rep.modelLength)
WriteToClient(client, rep.modelLength, (char *)(VidModeGetMonitorValue(monitor, VIDMODE_MON_MODEL, 0)).ptr); WriteToClient(client, rep.modelLength, (char *)(VidModeGetMonitorValue(monitor, VIDMODE_MON_MODEL, 0)).ptr);
DEALLOCATE_LOCAL(hsyncdata); xfree(hsyncdata);
DEALLOCATE_LOCAL(vsyncdata); xfree(vsyncdata);
return (client->noClientException); return (client->noClientException);
} }
@ -1448,11 +1448,11 @@ ProcXF86VidModeGetDotClocks(ClientPtr client)
rep.flags = 0; rep.flags = 0;
if (!ClockProg) { if (!ClockProg) {
Clocks = ALLOCATE_LOCAL(numClocks * sizeof(int)); Clocks = xalloc(numClocks * sizeof(int));
if (!Clocks) if (!Clocks)
return BadValue; return BadValue;
if (!VidModeGetClocks(stuff->screen, Clocks)) { if (!VidModeGetClocks(stuff->screen, Clocks)) {
DEALLOCATE_LOCAL(Clocks); xfree(Clocks);
return BadValue; return BadValue;
} }
} }
@ -1479,7 +1479,7 @@ ProcXF86VidModeGetDotClocks(ClientPtr client)
} }
} }
DEALLOCATE_LOCAL(Clocks); xfree(Clocks);
return (client->noClientException); return (client->noClientException);
} }

View File

@ -373,7 +373,6 @@ The recommended font path contains the following font path elements:
.I __projectroot__/lib/X11/fonts/75dpi/:unscaled .I __projectroot__/lib/X11/fonts/75dpi/:unscaled
.I __projectroot__/lib/X11/fonts/100dpi/:unscaled .I __projectroot__/lib/X11/fonts/100dpi/:unscaled
.I __projectroot__/lib/X11/fonts/Type1/ .I __projectroot__/lib/X11/fonts/Type1/
.I __projectroot__/lib/X11/fonts/Speedo/
.I __projectroot__/lib/X11/fonts/75dpi/ .I __projectroot__/lib/X11/fonts/75dpi/
.I __projectroot__/lib/X11/fonts/100dpi/ .I __projectroot__/lib/X11/fonts/100dpi/
.fi .fi
@ -383,20 +382,6 @@ Font path elements that are found to be invalid are removed from the
font path when the server starts up. font path when the server starts up.
.RE .RE
.TP 7 .TP 7
.BI "RGBPath \*q" path \*q
sets the path name for the RGB color database.
When this entry is not specified in the config file, the server falls back
to the compiled\-in default RGB path, which is:
.PP
.RS 11
.I __projectroot__/share/X11/rgb
.RE
.PP
Note that an implicit
.I .txt
is added to this path if the server was compiled to use text rather than
binary format RGB color databases.
.TP 7
.BI "ModulePath \*q" path \*q .BI "ModulePath \*q" path \*q
sets the search path for loadable __xservername__ server modules. sets the search path for loadable __xservername__ server modules.
This path is a comma separated list of directories which the __xservername__ server This path is a comma separated list of directories which the __xservername__ server

View File

@ -636,7 +636,7 @@ xf86RandR12CrtcNotify (RRCrtcPtr randr_crtc)
DisplayModePtr mode = &crtc->mode; DisplayModePtr mode = &crtc->mode;
Bool ret; Bool ret;
randr_outputs = ALLOCATE_LOCAL(config->num_output * sizeof (RROutputPtr)); randr_outputs = xalloc(config->num_output * sizeof (RROutputPtr));
if (!randr_outputs) if (!randr_outputs)
return FALSE; return FALSE;
x = crtc->x; x = crtc->x;
@ -671,7 +671,7 @@ xf86RandR12CrtcNotify (RRCrtcPtr randr_crtc)
} }
ret = RRCrtcNotify (randr_crtc, randr_mode, x, y, ret = RRCrtcNotify (randr_crtc, randr_mode, x, y,
rotation, numOutputs, randr_outputs); rotation, numOutputs, randr_outputs);
DEALLOCATE_LOCAL(randr_outputs); xfree(randr_outputs);
return ret; return ret;
} }
@ -726,7 +726,7 @@ xf86RandR12CrtcSet (ScreenPtr pScreen,
xf86CrtcPtr *save_crtcs; xf86CrtcPtr *save_crtcs;
Bool save_enabled = crtc->enabled; Bool save_enabled = crtc->enabled;
save_crtcs = ALLOCATE_LOCAL(config->num_output * sizeof (xf86CrtcPtr)); save_crtcs = xalloc(config->num_output * sizeof (xf86CrtcPtr));
if ((randr_mode != NULL) != crtc->enabled) if ((randr_mode != NULL) != crtc->enabled)
changed = TRUE; changed = TRUE;
else if (randr_mode && !xf86RandRModeMatches (randr_mode, &crtc->mode)) else if (randr_mode && !xf86RandRModeMatches (randr_mode, &crtc->mode))
@ -782,7 +782,7 @@ xf86RandR12CrtcSet (ScreenPtr pScreen,
xf86OutputPtr output = config->output[o]; xf86OutputPtr output = config->output[o];
output->crtc = save_crtcs[o]; output->crtc = save_crtcs[o];
} }
DEALLOCATE_LOCAL(save_crtcs); xfree(save_crtcs);
return FALSE; return FALSE;
} }
/* /*
@ -795,7 +795,7 @@ xf86RandR12CrtcSet (ScreenPtr pScreen,
} }
xf86DisableUnusedFunctions (pScrn); xf86DisableUnusedFunctions (pScrn);
} }
DEALLOCATE_LOCAL(save_crtcs); xfree(save_crtcs);
return xf86RandR12CrtcNotify (randr_crtc); return xf86RandR12CrtcNotify (randr_crtc);
} }
@ -938,8 +938,8 @@ xf86RandR12SetInfo12 (ScreenPtr pScreen)
RRCrtcPtr randr_crtc; RRCrtcPtr randr_crtc;
int nclone; int nclone;
clones = ALLOCATE_LOCAL(config->num_output * sizeof (RROutputPtr)); clones = xalloc(config->num_output * sizeof (RROutputPtr));
crtcs = ALLOCATE_LOCAL (config->num_crtc * sizeof (RRCrtcPtr)); crtcs = xalloc (config->num_crtc * sizeof (RRCrtcPtr));
for (o = 0; o < config->num_output; o++) for (o = 0; o < config->num_output; o++)
{ {
xf86OutputPtr output = config->output[o]; xf86OutputPtr output = config->output[o];
@ -956,8 +956,8 @@ xf86RandR12SetInfo12 (ScreenPtr pScreen)
if (!RROutputSetCrtcs (output->randr_output, crtcs, ncrtc)) if (!RROutputSetCrtcs (output->randr_output, crtcs, ncrtc))
{ {
DEALLOCATE_LOCAL (crtcs); xfree (crtcs);
DEALLOCATE_LOCAL (clones); xfree (clones);
return FALSE; return FALSE;
} }
@ -993,13 +993,13 @@ xf86RandR12SetInfo12 (ScreenPtr pScreen)
} }
if (!RROutputSetClones (output->randr_output, clones, nclone)) if (!RROutputSetClones (output->randr_output, clones, nclone))
{ {
DEALLOCATE_LOCAL (crtcs); xfree (crtcs);
DEALLOCATE_LOCAL (clones); xfree (clones);
return FALSE; return FALSE;
} }
} }
DEALLOCATE_LOCAL (crtcs); xfree (crtcs);
DEALLOCATE_LOCAL (clones); xfree (clones);
return TRUE; return TRUE;
} }

View File

@ -69,7 +69,6 @@ static xf86ConfigSymTabRec FilesTab[] =
{ {
{ENDSECTION, "endsection"}, {ENDSECTION, "endsection"},
{FONTPATH, "fontpath"}, {FONTPATH, "fontpath"},
{RGBPATH, "rgbpath"},
{MODULEPATH, "modulepath"}, {MODULEPATH, "modulepath"},
{INPUTDEVICES, "inputdevices"}, {INPUTDEVICES, "inputdevices"},
{LOGFILEPATH, "logfile"}, {LOGFILEPATH, "logfile"},
@ -122,11 +121,6 @@ xf86parseFilesSection (void)
strcat (ptr->file_fontpath, str); strcat (ptr->file_fontpath, str);
xf86conffree (val.str); xf86conffree (val.str);
break; break;
case RGBPATH:
if (xf86getSubToken (&(ptr->file_comment)) != STRING)
Error (QUOTE_MSG, "RGBPath");
ptr->file_rgbpath = val.str;
break;
case MODULEPATH: case MODULEPATH:
if (xf86getSubToken (&(ptr->file_comment)) != STRING) if (xf86getSubToken (&(ptr->file_comment)) != STRING)
Error (QUOTE_MSG, "ModulePath"); Error (QUOTE_MSG, "ModulePath");
@ -216,8 +210,6 @@ xf86printFileSection (FILE * cf, XF86ConfFilesPtr ptr)
fprintf (cf, "%s", ptr->file_comment); fprintf (cf, "%s", ptr->file_comment);
if (ptr->file_logfile) if (ptr->file_logfile)
fprintf (cf, "\tLogFile \"%s\"\n", ptr->file_logfile); fprintf (cf, "\tLogFile \"%s\"\n", ptr->file_logfile);
if (ptr->file_rgbpath)
fprintf (cf, "\tRgbPath \"%s\"\n", ptr->file_rgbpath);
if (ptr->file_modulepath) if (ptr->file_modulepath)
{ {
s = ptr->file_modulepath; s = ptr->file_modulepath;
@ -272,7 +264,6 @@ xf86freeFiles (XF86ConfFilesPtr p)
return; return;
TestFree (p->file_logfile); TestFree (p->file_logfile);
TestFree (p->file_rgbpath);
TestFree (p->file_modulepath); TestFree (p->file_modulepath);
TestFree (p->file_inputdevs); TestFree (p->file_inputdevs);
TestFree (p->file_fontpath); TestFree (p->file_fontpath);

View File

@ -71,7 +71,6 @@
typedef struct typedef struct
{ {
char *file_logfile; char *file_logfile;
char *file_rgbpath;
char *file_modulepath; char *file_modulepath;
char *file_inputdevs; char *file_inputdevs;
char *file_fontpath; char *file_fontpath;

View File

@ -97,7 +97,6 @@ typedef enum {
/* File tokens */ /* File tokens */
FONTPATH, FONTPATH,
RGBPATH,
MODULEPATH, MODULEPATH,
INPUTDEVICES, INPUTDEVICES,
LOGFILEPATH, LOGFILEPATH,

View File

@ -1035,7 +1035,7 @@ ShadowPolyRectangle(
offset1 = offset2 >> 1; offset1 = offset2 >> 1;
offset3 = offset2 - offset1; offset3 = offset2 - offset1;
pBoxInit = (BoxPtr)ALLOCATE_LOCAL(nRects * 4 * sizeof(BoxRec)); pBoxInit = (BoxPtr)xalloc(nRects * 4 * sizeof(BoxRec));
pbox = pBoxInit; pbox = pBoxInit;
while(nRects--) { while(nRects--) {
@ -1086,7 +1086,7 @@ ShadowPolyRectangle(
if(pPriv->preRefresh) if(pPriv->preRefresh)
(*pPriv->preRefresh)(pPriv->pScrn, num, pBoxInit); (*pPriv->preRefresh)(pPriv->pScrn, num, pBoxInit);
} else { } else {
DEALLOCATE_LOCAL(pBoxInit); xfree(pBoxInit);
} }
} }
} }
@ -1098,7 +1098,7 @@ ShadowPolyRectangle(
} else if(num) { } else if(num) {
if(pPriv->postRefresh) if(pPriv->postRefresh)
(*pPriv->postRefresh)(pPriv->pScrn, num, pBoxInit); (*pPriv->postRefresh)(pPriv->pScrn, num, pBoxInit);
DEALLOCATE_LOCAL(pBoxInit); xfree(pBoxInit);
} }
SHADOW_GC_OP_EPILOGUE(pGC); SHADOW_GC_OP_EPILOGUE(pGC);

View File

@ -472,15 +472,6 @@ CreateFiles(TreeNode *files)
files->child = node; files->child = node;
files->update = UpdateFiles; files->update = UpdateFiles;
if (XF86RGB_path)
value = XF86RGB_path;
else
value = file->file_rgbpath ? file->file_rgbpath : "";
node->next = NewNode(files, NULL, NULL, files->node,
(TreeData*)XtCalloc(1, sizeof(TreeData)));
node = node->next;
CreateFilesField(node, "RgbPath", value);
w = XtVaCreateManagedWidget("ModulePath", toggleWidgetClass, tree, w = XtVaCreateManagedWidget("ModulePath", toggleWidgetClass, tree,
XtNtreeParent, files->node, NULL); XtNtreeParent, files->node, NULL);
node->next = modulepath = NewNode(files, w, w, files->node, NULL); node->next = modulepath = NewNode(files, w, w, files->node, NULL);
@ -523,15 +514,6 @@ UpdateFiles(TreeNode *files)
XF86Config->conf_files->file_logfile = XtNewString(str); XF86Config->conf_files->file_logfile = XtNewString(str);
else else
XF86Config->conf_files->file_logfile = NULL; XF86Config->conf_files->file_logfile = NULL;
/* LogFile */
files = files->next;
XtVaGetValues(files->data->files.text, XtNstring, &str, NULL);
XtFree(XF86Config->conf_files->file_rgbpath);
if (*str)
XF86Config->conf_files->file_rgbpath = XtNewString(str);
else
XF86Config->conf_files->file_rgbpath = NULL;
} }
/* FontPath */ /* FontPath */

Some files were not shown because too many files have changed in this diff Show More