diff options
author | Eamon Walsh <ewalsh@tycho.nsa.gov> | 2007-02-16 15:33:48 -0500 |
---|---|---|
committer | Eamon Walsh <ewalsh@moss-uranus.epoch.ncsc.mil> | 2007-02-16 15:33:48 -0500 |
commit | 2534f5a9027c196f677923aaa38fa9ed9917f73d (patch) | |
tree | 315081dad18bbe6e5c60545b97098f88e55de67f | |
parent | f452507ca9209598401d15da0039aaa4e1fed1a3 (diff) |
Remove nasty function pointer type from DevUnion, return to documented type.
-rw-r--r-- | include/miscstruct.h | 13 | ||||
-rw-r--r-- | 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 <X11/Xprotostr.h> -#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) ) { |