From 2534f5a9027c196f677923aaa38fa9ed9917f73d Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Fri, 16 Feb 2007 15:33:48 -0500 Subject: [PATCH] Remove nasty function pointer type from DevUnion, return to documented type. --- include/miscstruct.h | 13 +------------ mfb/mfbbitblt.c | 28 +++++++++++++++------------- 2 files changed, 16 insertions(+), 25 deletions(-) diff --git a/include/miscstruct.h b/include/miscstruct.h index c39f03ce8..f78458771 100644 --- a/include/miscstruct.h +++ b/include/miscstruct.h @@ -50,7 +50,6 @@ SOFTWARE. #include "misc.h" #include -#include "gc.h" typedef xPoint DDXPointRec; @@ -62,17 +61,7 @@ typedef union _DevUnion { pointer ptr; long val; unsigned long uval; - RegionPtr (*fptr)( - DrawablePtr /* pSrcDrawable */, - DrawablePtr /* pDstDrawable */, - GCPtr /* pGC */, - int /* srcx */, - int /* srcy */, - int /* width */, - int /* height */, - int /* dstx */, - int /* dsty */, - unsigned long /* bitPlane */); + pointer (*fptr)(void); } DevUnion; #endif /* MISCSTRUCT_H */ diff --git a/mfb/mfbbitblt.c b/mfb/mfbbitblt.c index 0f84df354..270fd96a7 100644 --- a/mfb/mfbbitblt.c +++ b/mfb/mfbbitblt.c @@ -400,20 +400,22 @@ int dstx, dsty; static unsigned long copyPlaneGeneration; static int copyPlaneScreenIndex = -1; +typedef RegionPtr (*CopyPlaneFuncPtr)( + DrawablePtr /* pSrcDrawable */, + DrawablePtr /* pDstDrawable */, + GCPtr /* pGC */, + int /* srcx */, + int /* srcy */, + int /* width */, + int /* height */, + int /* dstx */, + int /* dsty */, + unsigned long /* bitPlane */); + Bool mfbRegisterCopyPlaneProc (pScreen, proc) ScreenPtr pScreen; - RegionPtr (*proc)( - DrawablePtr /* pSrcDrawable */, - DrawablePtr /* pDstDrawable */, - GCPtr /* pGC */, - int /* srcx */, - int /* srcy */, - int /* width */, - int /* height */, - int /* dstx */, - int /* dsty */, - unsigned long /* bitPlane */); + CopyPlaneFuncPtr proc; { if (copyPlaneGeneration != serverGeneration) { @@ -422,7 +424,7 @@ mfbRegisterCopyPlaneProc (pScreen, proc) return FALSE; copyPlaneGeneration = serverGeneration; } - pScreen->devPrivates[copyPlaneScreenIndex].fptr = proc; + pScreen->devPrivates[copyPlaneScreenIndex].fptr = (CopyPlaneFuncPtr)proc; return TRUE; } @@ -468,7 +470,7 @@ unsigned long plane; if (pSrcDrawable->depth != 1) { if (copyPlaneScreenIndex >= 0 && - (copyPlane = + (copyPlane = (CopyPlaneFuncPtr) pSrcDrawable->pScreen->devPrivates[copyPlaneScreenIndex].fptr) ) {