sparse cleanups. s/0/NULL/ and mark a few things static.

This commit is contained in:
Adam Jackson 2005-09-30 02:03:45 +00:00
parent c65fde5343
commit aa74468aa5
12 changed files with 57 additions and 57 deletions

View File

@ -45,7 +45,7 @@
#define STRACE #define STRACE
#define TRACE #define TRACE
int exaGeneration; static int exaGeneration;
int exaScreenPrivateIndex; int exaScreenPrivateIndex;
int exaPixmapPrivateIndex; int exaPixmapPrivateIndex;
@ -746,7 +746,7 @@ exaCopyArea(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, GCPtr pGC,
return fbDoCopy (pSrcDrawable, pDstDrawable, pGC, return fbDoCopy (pSrcDrawable, pDstDrawable, pGC,
srcx, srcy, width, height, srcx, srcy, width, height,
dstx, dsty, exaCopyNtoN, 0, 0); dstx, dsty, exaCopyNtoN, 0, NULL);
} }
static void static void
@ -963,7 +963,7 @@ exaImageGlyphBlt (DrawablePtr pDrawable,
ExaCheckImageGlyphBlt(pDrawable, pGC, x, y, nglyph, ppciInit, pglyphBase); ExaCheckImageGlyphBlt(pDrawable, pGC, x, y, nglyph, ppciInit, pglyphBase);
return; return;
} }
glyph = 0; glyph = NULL;
fbGetDrawable (pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff); fbGetDrawable (pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff);
switch (dstBpp) { switch (dstBpp) {
case 8: glyph = fbGlyph8; break; case 8: glyph = fbGlyph8; break;
@ -1096,7 +1096,7 @@ exaValidateGC (GCPtr pGC, Mask changes, DrawablePtr pDrawable)
pGC->ops = (GCOps *) &exaAsyncPixmapGCOps; pGC->ops = (GCOps *) &exaAsyncPixmapGCOps;
} }
GCFuncs exaGCFuncs = { static GCFuncs exaGCFuncs = {
exaValidateGC, exaValidateGC,
miChangeGC, miChangeGC,
miCopyGC, miCopyGC,
@ -1149,8 +1149,8 @@ exaCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc)
#endif #endif
fbCopyRegion (&pPixmap->drawable, &pPixmap->drawable, fbCopyRegion (&pPixmap->drawable, &pPixmap->drawable,
0, NULL,
&rgnDst, dx, dy, exaCopyNtoN, 0, 0); &rgnDst, dx, dy, exaCopyNtoN, 0, NULL);
REGION_UNINIT(pWin->drawable.pScreen, &rgnDst); REGION_UNINIT(pWin->drawable.pScreen, &rgnDst);
} }

View File

@ -45,7 +45,7 @@
#define STRACE #define STRACE
#define TRACE #define TRACE
int exaGeneration; static int exaGeneration;
int exaScreenPrivateIndex; int exaScreenPrivateIndex;
int exaPixmapPrivateIndex; int exaPixmapPrivateIndex;
@ -746,7 +746,7 @@ exaCopyArea(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, GCPtr pGC,
return fbDoCopy (pSrcDrawable, pDstDrawable, pGC, return fbDoCopy (pSrcDrawable, pDstDrawable, pGC,
srcx, srcy, width, height, srcx, srcy, width, height,
dstx, dsty, exaCopyNtoN, 0, 0); dstx, dsty, exaCopyNtoN, 0, NULL);
} }
static void static void
@ -963,7 +963,7 @@ exaImageGlyphBlt (DrawablePtr pDrawable,
ExaCheckImageGlyphBlt(pDrawable, pGC, x, y, nglyph, ppciInit, pglyphBase); ExaCheckImageGlyphBlt(pDrawable, pGC, x, y, nglyph, ppciInit, pglyphBase);
return; return;
} }
glyph = 0; glyph = NULL;
fbGetDrawable (pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff); fbGetDrawable (pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff);
switch (dstBpp) { switch (dstBpp) {
case 8: glyph = fbGlyph8; break; case 8: glyph = fbGlyph8; break;
@ -1096,7 +1096,7 @@ exaValidateGC (GCPtr pGC, Mask changes, DrawablePtr pDrawable)
pGC->ops = (GCOps *) &exaAsyncPixmapGCOps; pGC->ops = (GCOps *) &exaAsyncPixmapGCOps;
} }
GCFuncs exaGCFuncs = { static GCFuncs exaGCFuncs = {
exaValidateGC, exaValidateGC,
miChangeGC, miChangeGC,
miCopyGC, miCopyGC,
@ -1149,8 +1149,8 @@ exaCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc)
#endif #endif
fbCopyRegion (&pPixmap->drawable, &pPixmap->drawable, fbCopyRegion (&pPixmap->drawable, &pPixmap->drawable,
0, NULL,
&rgnDst, dx, dy, exaCopyNtoN, 0, 0); &rgnDst, dx, dy, exaCopyNtoN, 0, NULL);
REGION_UNINIT(pWin->drawable.pScreen, &rgnDst); REGION_UNINIT(pWin->drawable.pScreen, &rgnDst);
} }

View File

@ -45,7 +45,7 @@
#define STRACE #define STRACE
#define TRACE #define TRACE
int exaGeneration; static int exaGeneration;
int exaScreenPrivateIndex; int exaScreenPrivateIndex;
int exaPixmapPrivateIndex; int exaPixmapPrivateIndex;
@ -746,7 +746,7 @@ exaCopyArea(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, GCPtr pGC,
return fbDoCopy (pSrcDrawable, pDstDrawable, pGC, return fbDoCopy (pSrcDrawable, pDstDrawable, pGC,
srcx, srcy, width, height, srcx, srcy, width, height,
dstx, dsty, exaCopyNtoN, 0, 0); dstx, dsty, exaCopyNtoN, 0, NULL);
} }
static void static void
@ -963,7 +963,7 @@ exaImageGlyphBlt (DrawablePtr pDrawable,
ExaCheckImageGlyphBlt(pDrawable, pGC, x, y, nglyph, ppciInit, pglyphBase); ExaCheckImageGlyphBlt(pDrawable, pGC, x, y, nglyph, ppciInit, pglyphBase);
return; return;
} }
glyph = 0; glyph = NULL;
fbGetDrawable (pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff); fbGetDrawable (pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff);
switch (dstBpp) { switch (dstBpp) {
case 8: glyph = fbGlyph8; break; case 8: glyph = fbGlyph8; break;
@ -1096,7 +1096,7 @@ exaValidateGC (GCPtr pGC, Mask changes, DrawablePtr pDrawable)
pGC->ops = (GCOps *) &exaAsyncPixmapGCOps; pGC->ops = (GCOps *) &exaAsyncPixmapGCOps;
} }
GCFuncs exaGCFuncs = { static GCFuncs exaGCFuncs = {
exaValidateGC, exaValidateGC,
miChangeGC, miChangeGC,
miCopyGC, miCopyGC,
@ -1149,8 +1149,8 @@ exaCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc)
#endif #endif
fbCopyRegion (&pPixmap->drawable, &pPixmap->drawable, fbCopyRegion (&pPixmap->drawable, &pPixmap->drawable,
0, NULL,
&rgnDst, dx, dy, exaCopyNtoN, 0, 0); &rgnDst, dx, dy, exaCopyNtoN, 0, NULL);
REGION_UNINIT(pWin->drawable.pScreen, &rgnDst); REGION_UNINIT(pWin->drawable.pScreen, &rgnDst);
} }

View File

@ -195,7 +195,7 @@ exaOffscreenAlloc (ScreenPtr pScreen, int size, int align,
new_area->offset = area->offset + real_size; new_area->offset = area->offset + real_size;
new_area->size = area->size - real_size; new_area->size = area->size - real_size;
new_area->state = ExaOffscreenAvail; new_area->state = ExaOffscreenAvail;
new_area->save = 0; new_area->save = NULL;
new_area->score = 0; new_area->score = 0;
new_area->next = area->next; new_area->next = area->next;
area->next = new_area; area->next = new_area;
@ -299,14 +299,14 @@ exaOffscreenFree (ScreenPtr pScreen, ExaOffscreenArea *area)
ExaOffscreenValidate (pScreen); ExaOffscreenValidate (pScreen);
area->state = ExaOffscreenAvail; area->state = ExaOffscreenAvail;
area->save = 0; area->save = NULL;
area->offset = area->save_offset; area->offset = area->save_offset;
area->score = 0; area->score = 0;
/* /*
* Find previous area * Find previous area
*/ */
if (area == pExaScr->info->card.offScreenAreas) if (area == pExaScr->info->card.offScreenAreas)
prev = 0; prev = NULL;
else else
for (prev = pExaScr->info->card.offScreenAreas; prev; prev = prev->next) for (prev = pExaScr->info->card.offScreenAreas; prev; prev = prev->next)
if (prev->next == area) if (prev->next == area)
@ -367,7 +367,7 @@ exaOffscreenInit (ScreenPtr pScreen)
area->state = ExaOffscreenAvail; area->state = ExaOffscreenAvail;
area->offset = pExaScr->info->card.offScreenBase; area->offset = pExaScr->info->card.offScreenBase;
area->size = pExaScr->info->card.memorySize - area->offset; area->size = pExaScr->info->card.memorySize - area->offset;
area->save = 0; area->save = NULL;
area->next = NULL; area->next = NULL;
area->score = 0; area->score = 0;

View File

@ -507,10 +507,10 @@ exaComposite(CARD8 op,
return; return;
exaCopyNtoN (pSrc->pDrawable, pDst->pDrawable, 0, exaCopyNtoN (pSrc->pDrawable, pDst->pDrawable, NULL,
REGION_RECTS(&region), REGION_NUM_RECTS(&region), REGION_RECTS(&region), REGION_NUM_RECTS(&region),
xSrc - xDst, ySrc - yDst, xSrc - xDst, ySrc - yDst,
FALSE, FALSE, 0, 0); FALSE, FALSE, 0, NULL);
return; return;
} }
} }
@ -724,7 +724,7 @@ exaGlyphs (CARD8 op,
{ {
CompositePicture (PictOpAdd, CompositePicture (PictOpAdd,
pPicture, pPicture,
None, NULL,
pMask, pMask,
0, 0, 0, 0,
0, 0, 0, 0,

View File

@ -45,7 +45,7 @@
#define STRACE #define STRACE
#define TRACE #define TRACE
int exaGeneration; static int exaGeneration;
int exaScreenPrivateIndex; int exaScreenPrivateIndex;
int exaPixmapPrivateIndex; int exaPixmapPrivateIndex;
@ -746,7 +746,7 @@ exaCopyArea(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, GCPtr pGC,
return fbDoCopy (pSrcDrawable, pDstDrawable, pGC, return fbDoCopy (pSrcDrawable, pDstDrawable, pGC,
srcx, srcy, width, height, srcx, srcy, width, height,
dstx, dsty, exaCopyNtoN, 0, 0); dstx, dsty, exaCopyNtoN, 0, NULL);
} }
static void static void
@ -963,7 +963,7 @@ exaImageGlyphBlt (DrawablePtr pDrawable,
ExaCheckImageGlyphBlt(pDrawable, pGC, x, y, nglyph, ppciInit, pglyphBase); ExaCheckImageGlyphBlt(pDrawable, pGC, x, y, nglyph, ppciInit, pglyphBase);
return; return;
} }
glyph = 0; glyph = NULL;
fbGetDrawable (pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff); fbGetDrawable (pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff);
switch (dstBpp) { switch (dstBpp) {
case 8: glyph = fbGlyph8; break; case 8: glyph = fbGlyph8; break;
@ -1096,7 +1096,7 @@ exaValidateGC (GCPtr pGC, Mask changes, DrawablePtr pDrawable)
pGC->ops = (GCOps *) &exaAsyncPixmapGCOps; pGC->ops = (GCOps *) &exaAsyncPixmapGCOps;
} }
GCFuncs exaGCFuncs = { static GCFuncs exaGCFuncs = {
exaValidateGC, exaValidateGC,
miChangeGC, miChangeGC,
miCopyGC, miCopyGC,
@ -1149,8 +1149,8 @@ exaCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc)
#endif #endif
fbCopyRegion (&pPixmap->drawable, &pPixmap->drawable, fbCopyRegion (&pPixmap->drawable, &pPixmap->drawable,
0, NULL,
&rgnDst, dx, dy, exaCopyNtoN, 0, 0); &rgnDst, dx, dy, exaCopyNtoN, 0, NULL);
REGION_UNINIT(pWin->drawable.pScreen, &rgnDst); REGION_UNINIT(pWin->drawable.pScreen, &rgnDst);
} }

View File

@ -45,7 +45,7 @@
#define STRACE #define STRACE
#define TRACE #define TRACE
int exaGeneration; static int exaGeneration;
int exaScreenPrivateIndex; int exaScreenPrivateIndex;
int exaPixmapPrivateIndex; int exaPixmapPrivateIndex;
@ -746,7 +746,7 @@ exaCopyArea(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, GCPtr pGC,
return fbDoCopy (pSrcDrawable, pDstDrawable, pGC, return fbDoCopy (pSrcDrawable, pDstDrawable, pGC,
srcx, srcy, width, height, srcx, srcy, width, height,
dstx, dsty, exaCopyNtoN, 0, 0); dstx, dsty, exaCopyNtoN, 0, NULL);
} }
static void static void
@ -963,7 +963,7 @@ exaImageGlyphBlt (DrawablePtr pDrawable,
ExaCheckImageGlyphBlt(pDrawable, pGC, x, y, nglyph, ppciInit, pglyphBase); ExaCheckImageGlyphBlt(pDrawable, pGC, x, y, nglyph, ppciInit, pglyphBase);
return; return;
} }
glyph = 0; glyph = NULL;
fbGetDrawable (pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff); fbGetDrawable (pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff);
switch (dstBpp) { switch (dstBpp) {
case 8: glyph = fbGlyph8; break; case 8: glyph = fbGlyph8; break;
@ -1096,7 +1096,7 @@ exaValidateGC (GCPtr pGC, Mask changes, DrawablePtr pDrawable)
pGC->ops = (GCOps *) &exaAsyncPixmapGCOps; pGC->ops = (GCOps *) &exaAsyncPixmapGCOps;
} }
GCFuncs exaGCFuncs = { static GCFuncs exaGCFuncs = {
exaValidateGC, exaValidateGC,
miChangeGC, miChangeGC,
miCopyGC, miCopyGC,
@ -1149,8 +1149,8 @@ exaCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc)
#endif #endif
fbCopyRegion (&pPixmap->drawable, &pPixmap->drawable, fbCopyRegion (&pPixmap->drawable, &pPixmap->drawable,
0, NULL,
&rgnDst, dx, dy, exaCopyNtoN, 0, 0); &rgnDst, dx, dy, exaCopyNtoN, 0, NULL);
REGION_UNINIT(pWin->drawable.pScreen, &rgnDst); REGION_UNINIT(pWin->drawable.pScreen, &rgnDst);
} }

View File

@ -45,7 +45,7 @@
#define STRACE #define STRACE
#define TRACE #define TRACE
int exaGeneration; static int exaGeneration;
int exaScreenPrivateIndex; int exaScreenPrivateIndex;
int exaPixmapPrivateIndex; int exaPixmapPrivateIndex;
@ -746,7 +746,7 @@ exaCopyArea(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, GCPtr pGC,
return fbDoCopy (pSrcDrawable, pDstDrawable, pGC, return fbDoCopy (pSrcDrawable, pDstDrawable, pGC,
srcx, srcy, width, height, srcx, srcy, width, height,
dstx, dsty, exaCopyNtoN, 0, 0); dstx, dsty, exaCopyNtoN, 0, NULL);
} }
static void static void
@ -963,7 +963,7 @@ exaImageGlyphBlt (DrawablePtr pDrawable,
ExaCheckImageGlyphBlt(pDrawable, pGC, x, y, nglyph, ppciInit, pglyphBase); ExaCheckImageGlyphBlt(pDrawable, pGC, x, y, nglyph, ppciInit, pglyphBase);
return; return;
} }
glyph = 0; glyph = NULL;
fbGetDrawable (pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff); fbGetDrawable (pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff);
switch (dstBpp) { switch (dstBpp) {
case 8: glyph = fbGlyph8; break; case 8: glyph = fbGlyph8; break;
@ -1096,7 +1096,7 @@ exaValidateGC (GCPtr pGC, Mask changes, DrawablePtr pDrawable)
pGC->ops = (GCOps *) &exaAsyncPixmapGCOps; pGC->ops = (GCOps *) &exaAsyncPixmapGCOps;
} }
GCFuncs exaGCFuncs = { static GCFuncs exaGCFuncs = {
exaValidateGC, exaValidateGC,
miChangeGC, miChangeGC,
miCopyGC, miCopyGC,
@ -1149,8 +1149,8 @@ exaCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc)
#endif #endif
fbCopyRegion (&pPixmap->drawable, &pPixmap->drawable, fbCopyRegion (&pPixmap->drawable, &pPixmap->drawable,
0, NULL,
&rgnDst, dx, dy, exaCopyNtoN, 0, 0); &rgnDst, dx, dy, exaCopyNtoN, 0, NULL);
REGION_UNINIT(pWin->drawable.pScreen, &rgnDst); REGION_UNINIT(pWin->drawable.pScreen, &rgnDst);
} }

View File

@ -195,7 +195,7 @@ exaOffscreenAlloc (ScreenPtr pScreen, int size, int align,
new_area->offset = area->offset + real_size; new_area->offset = area->offset + real_size;
new_area->size = area->size - real_size; new_area->size = area->size - real_size;
new_area->state = ExaOffscreenAvail; new_area->state = ExaOffscreenAvail;
new_area->save = 0; new_area->save = NULL;
new_area->score = 0; new_area->score = 0;
new_area->next = area->next; new_area->next = area->next;
area->next = new_area; area->next = new_area;
@ -299,14 +299,14 @@ exaOffscreenFree (ScreenPtr pScreen, ExaOffscreenArea *area)
ExaOffscreenValidate (pScreen); ExaOffscreenValidate (pScreen);
area->state = ExaOffscreenAvail; area->state = ExaOffscreenAvail;
area->save = 0; area->save = NULL;
area->offset = area->save_offset; area->offset = area->save_offset;
area->score = 0; area->score = 0;
/* /*
* Find previous area * Find previous area
*/ */
if (area == pExaScr->info->card.offScreenAreas) if (area == pExaScr->info->card.offScreenAreas)
prev = 0; prev = NULL;
else else
for (prev = pExaScr->info->card.offScreenAreas; prev; prev = prev->next) for (prev = pExaScr->info->card.offScreenAreas; prev; prev = prev->next)
if (prev->next == area) if (prev->next == area)
@ -367,7 +367,7 @@ exaOffscreenInit (ScreenPtr pScreen)
area->state = ExaOffscreenAvail; area->state = ExaOffscreenAvail;
area->offset = pExaScr->info->card.offScreenBase; area->offset = pExaScr->info->card.offScreenBase;
area->size = pExaScr->info->card.memorySize - area->offset; area->size = pExaScr->info->card.memorySize - area->offset;
area->save = 0; area->save = NULL;
area->next = NULL; area->next = NULL;
area->score = 0; area->score = 0;

View File

@ -507,10 +507,10 @@ exaComposite(CARD8 op,
return; return;
exaCopyNtoN (pSrc->pDrawable, pDst->pDrawable, 0, exaCopyNtoN (pSrc->pDrawable, pDst->pDrawable, NULL,
REGION_RECTS(&region), REGION_NUM_RECTS(&region), REGION_RECTS(&region), REGION_NUM_RECTS(&region),
xSrc - xDst, ySrc - yDst, xSrc - xDst, ySrc - yDst,
FALSE, FALSE, 0, 0); FALSE, FALSE, 0, NULL);
return; return;
} }
} }
@ -724,7 +724,7 @@ exaGlyphs (CARD8 op,
{ {
CompositePicture (PictOpAdd, CompositePicture (PictOpAdd,
pPicture, pPicture,
None, NULL,
pMask, pMask,
0, 0, 0, 0,
0, 0, 0, 0,

View File

@ -195,7 +195,7 @@ exaOffscreenAlloc (ScreenPtr pScreen, int size, int align,
new_area->offset = area->offset + real_size; new_area->offset = area->offset + real_size;
new_area->size = area->size - real_size; new_area->size = area->size - real_size;
new_area->state = ExaOffscreenAvail; new_area->state = ExaOffscreenAvail;
new_area->save = 0; new_area->save = NULL;
new_area->score = 0; new_area->score = 0;
new_area->next = area->next; new_area->next = area->next;
area->next = new_area; area->next = new_area;
@ -299,14 +299,14 @@ exaOffscreenFree (ScreenPtr pScreen, ExaOffscreenArea *area)
ExaOffscreenValidate (pScreen); ExaOffscreenValidate (pScreen);
area->state = ExaOffscreenAvail; area->state = ExaOffscreenAvail;
area->save = 0; area->save = NULL;
area->offset = area->save_offset; area->offset = area->save_offset;
area->score = 0; area->score = 0;
/* /*
* Find previous area * Find previous area
*/ */
if (area == pExaScr->info->card.offScreenAreas) if (area == pExaScr->info->card.offScreenAreas)
prev = 0; prev = NULL;
else else
for (prev = pExaScr->info->card.offScreenAreas; prev; prev = prev->next) for (prev = pExaScr->info->card.offScreenAreas; prev; prev = prev->next)
if (prev->next == area) if (prev->next == area)
@ -367,7 +367,7 @@ exaOffscreenInit (ScreenPtr pScreen)
area->state = ExaOffscreenAvail; area->state = ExaOffscreenAvail;
area->offset = pExaScr->info->card.offScreenBase; area->offset = pExaScr->info->card.offScreenBase;
area->size = pExaScr->info->card.memorySize - area->offset; area->size = pExaScr->info->card.memorySize - area->offset;
area->save = 0; area->save = NULL;
area->next = NULL; area->next = NULL;
area->score = 0; area->score = 0;

View File

@ -507,10 +507,10 @@ exaComposite(CARD8 op,
return; return;
exaCopyNtoN (pSrc->pDrawable, pDst->pDrawable, 0, exaCopyNtoN (pSrc->pDrawable, pDst->pDrawable, NULL,
REGION_RECTS(&region), REGION_NUM_RECTS(&region), REGION_RECTS(&region), REGION_NUM_RECTS(&region),
xSrc - xDst, ySrc - yDst, xSrc - xDst, ySrc - yDst,
FALSE, FALSE, 0, 0); FALSE, FALSE, 0, NULL);
return; return;
} }
} }
@ -724,7 +724,7 @@ exaGlyphs (CARD8 op,
{ {
CompositePicture (PictOpAdd, CompositePicture (PictOpAdd,
pPicture, pPicture,
None, NULL,
pMask, pMask,
0, 0, 0, 0,
0, 0, 0, 0,