summaryrefslogtreecommitdiff
path: root/afb
diff options
context:
space:
mode:
authorAdam Jackson <ajax@nwnk.net>2006-03-29 01:05:09 +0000
committerAdam Jackson <ajax@nwnk.net>2006-03-29 01:05:09 +0000
commitff6f88348c7498e83b0b143ef3737fd6eb0995e4 (patch)
treefbef3700d3e1230292cd814fc7f313613fb4b6ab /afb
parent52d9ce7f4fc599d30dec2e61fc1720597043d91c (diff)
More warning cleanup.
Diffstat (limited to 'afb')
-rw-r--r--afb/afbbitblt.c48
-rw-r--r--afb/afbcmap.c41
-rw-r--r--afb/afbfillarc.c17
-rw-r--r--afb/afbfillrct.c11
-rw-r--r--afb/afbpushpxl.c92
-rw-r--r--afb/afbscrinit.c36
-rw-r--r--afb/afbzerarc.c11
7 files changed, 44 insertions, 212 deletions
diff --git a/afb/afbbitblt.c b/afb/afbbitblt.c
index 93d4a2bf0..7c4502c93 100644
--- a/afb/afbbitblt.c
+++ b/afb/afbbitblt.c
@@ -104,12 +104,7 @@ destination. this is a simple translation.
*/
void
-afbDoBitblt(pSrc, pDst, alu, prgnDst, pptSrc, planemask)
- DrawablePtr pSrc, pDst;
- int alu;
- RegionPtr prgnDst;
- DDXPointPtr pptSrc;
- unsigned long planemask;
+afbDoBitblt(DrawablePtr pSrc, DrawablePtr pDst, int alu, RegionPtr prgnDst, DDXPointPtr pptSrc, long unsigned int planemask)
{
switch (alu) {
case GXcopy:
@@ -130,17 +125,13 @@ afbDoBitblt(pSrc, pDst, alu, prgnDst, pptSrc, planemask)
}
}
+typedef void (*afb_blit_func)
+ (DrawablePtr, DrawablePtr, int, RegionPtr, DDXPointPtr, unsigned long);
+
RegionPtr
-afbCopyArea(pSrcDrawable, pDstDrawable, pGC, srcx, srcy, width, height,
- dstx, dsty)
- DrawablePtr pSrcDrawable;
- DrawablePtr pDstDrawable;
- GC *pGC;
- int srcx, srcy;
- int width, height;
- int dstx, dsty;
+afbCopyArea(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, GC *pGC, int srcx, int srcy, int width, int height, int dstx, int dsty)
{
- void (*doBitBlt)();
+ afb_blit_func doBitBlt;
switch (pGC->alu) {
case GXcopy:
@@ -165,16 +156,7 @@ afbCopyArea(pSrcDrawable, pDstDrawable, pGC, srcx, srcy, width, height,
}
RegionPtr
-afbBitBlt(pSrcDrawable, pDstDrawable, pGC, srcx, srcy, width, height,
- dstx, dsty, doBitBlt, planemask)
- register DrawablePtr pSrcDrawable;
- register DrawablePtr pDstDrawable;
- register GC *pGC;
- int srcx, srcy;
- int width, height;
- int dstx, dsty;
- void (*doBitBlt)();
- unsigned long planemask;
+afbBitBlt(register DrawablePtr pSrcDrawable, register DrawablePtr pDstDrawable, register GC *pGC, int srcx, int srcy, int width, int height, int dstx, int dsty, afb_blit_func doBitBlt, long unsigned int planemask)
{
RegionPtr prgnSrcClip = NULL; /* may be a new region, or just a copy */
Bool freeSrcClip = FALSE;
@@ -366,14 +348,7 @@ afbBitBlt(pSrcDrawable, pDstDrawable, pGC, srcx, srcy, width, height,
}
RegionPtr
-afbCopyPlane(pSrcDrawable, pDstDrawable, pGC, srcx, srcy, width, height,
- dstx, dsty, plane)
-DrawablePtr pSrcDrawable, pDstDrawable;
-register GC *pGC;
-int srcx, srcy;
-int width, height;
-int dstx, dsty;
-unsigned long plane;
+afbCopyPlane(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, register GC *pGC, int srcx, int srcy, int width, int height, int dstx, int dsty, long unsigned int plane)
{
int alu;
RegionPtr prgnExposed = NULL;
@@ -454,12 +429,7 @@ unsigned long plane;
}
void
-afbCopy1ToN(pSrc, pDst, alu, prgnDst, pptSrc, planemask)
- DrawablePtr pSrc, pDst;
- int alu;
- RegionPtr prgnDst;
- DDXPointPtr pptSrc;
- unsigned long planemask;
+afbCopy1ToN(DrawablePtr pSrc, DrawablePtr pDst, int alu, RegionPtr prgnDst, DDXPointPtr pptSrc, long unsigned int planemask)
{
int numRects = REGION_NUM_RECTS(prgnDst);
BoxPtr pbox = REGION_RECTS(prgnDst);
diff --git a/afb/afbcmap.c b/afb/afbcmap.c
index 69b5d7ca4..5043d97a6 100644
--- a/afb/afbcmap.c
+++ b/afb/afbcmap.c
@@ -39,66 +39,53 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include "colormapst.h"
#include "resource.h"
#include "micmap.h"
+#include "afb.h"
int
-afbListInstalledColormaps(pScreen, pmaps)
- ScreenPtr pScreen;
- Colormap *pmaps;
+afbListInstalledColormaps(ScreenPtr pScreen, Colormap *pmaps)
{
return miListInstalledColormaps(pScreen, pmaps);
}
void
-afbInstallColormap(pmap)
- ColormapPtr pmap;
+afbInstallColormap(ColormapPtr pmap)
{
miInstallColormap(pmap);
}
void
-afbUninstallColormap(pmap)
- ColormapPtr pmap;
+afbUninstallColormap(ColormapPtr pmap)
{
miUninstallColormap(pmap);
}
void
-afbResolveColor(pred, pgreen, pblue, pVisual)
- unsigned short *pred, *pgreen, *pblue;
- register VisualPtr pVisual;
+afbResolveColor(short unsigned int *pred, short unsigned int *pgreen, short unsigned int *pblue, register VisualPtr pVisual)
{
miResolveColor(pred, pgreen, pblue, pVisual);
}
Bool
-afbInitializeColormap(pmap)
- register ColormapPtr pmap;
+afbInitializeColormap(register ColormapPtr pmap)
{
return miInitializeColormap(pmap);
}
int
-afbExpandDirectColors(pmap, ndef, indefs, outdefs)
- ColormapPtr pmap;
- int ndef;
- xColorItem *indefs, *outdefs;
+afbExpandDirectColors(ColormapPtr pmap, int ndef, xColorItem *indefs, xColorItem *outdefs)
{
return miExpandDirectColors(pmap, ndef, indefs, outdefs);
}
Bool
-afbCreateDefColormap(pScreen)
- ScreenPtr pScreen;
+afbCreateDefColormap(ScreenPtr pScreen)
{
return miCreateDefColormap(pScreen);
}
Bool
-afbSetVisualTypes(depth, visuals, bitsPerRGB)
- int depth;
- int visuals;
- int bitsPerRGB;
+afbSetVisualTypes(int depth, int visuals, int bitsPerRGB)
{
return miSetVisualTypes(depth, visuals, bitsPerRGB, -1);
}
@@ -110,15 +97,7 @@ afbSetVisualTypes(depth, visuals, bitsPerRGB)
*/
Bool
-afbInitVisuals(visualp, depthp, nvisualp, ndepthp, rootDepthp, defaultVisp,
- sizes, bitsPerRGB)
- VisualPtr *visualp;
- DepthPtr *depthp;
- int *nvisualp, *ndepthp;
- int *rootDepthp;
- VisualID *defaultVisp;
- unsigned long sizes;
- int bitsPerRGB;
+afbInitVisuals(VisualPtr *visualp, DepthPtr *depthp, int *nvisualp, int *ndepthp, int *rootDepthp, VisualID *defaultVisp, long unsigned int sizes, int bitsPerRGB)
{
return miInitVisuals(visualp, depthp, nvisualp, ndepthp, rootDepthp,
defaultVisp, sizes, bitsPerRGB, -1);
diff --git a/afb/afbfillarc.c b/afb/afbfillarc.c
index 17b4902d9..30e0bd3a5 100644
--- a/afb/afbfillarc.c
+++ b/afb/afbfillarc.c
@@ -44,10 +44,7 @@ in this Software without prior written authorization from the X Consortium.
#include "mi.h"
static void
-afbFillEllipseSolid(pDraw, arc, rrops)
- DrawablePtr pDraw;
- xArc *arc;
- register unsigned char *rrops;
+afbFillEllipseSolid(DrawablePtr pDraw, xArc *arc, register unsigned char *rrops)
{
int x, y, e;
int yk, xk, ym, xm, dx, dy, xorg, yorg;
@@ -268,11 +265,7 @@ afbFillEllipseSolid(pDraw, arc, rrops)
}
static void
-afbFillArcSliceSolidCopy(pDraw, pGC, arc, rrops)
- DrawablePtr pDraw;
- GCPtr pGC;
- xArc *arc;
- register unsigned char *rrops;
+afbFillArcSliceSolidCopy(DrawablePtr pDraw, GCPtr pGC, xArc *arc, register unsigned char *rrops)
{
PixelType *addrl;
register PixelType *pdst;
@@ -321,11 +314,7 @@ afbFillArcSliceSolidCopy(pDraw, pGC, arc, rrops)
}
void
-afbPolyFillArcSolid(pDraw, pGC, narcs, parcs)
- register DrawablePtr pDraw;
- GCPtr pGC;
- int narcs;
- xArc *parcs;
+afbPolyFillArcSolid(register DrawablePtr pDraw, GCPtr pGC, int narcs, xArc *parcs)
{
afbPrivGC *priv;
register xArc *arc;
diff --git a/afb/afbfillrct.c b/afb/afbfillrct.c
index 3646d78c6..ed2e6031e 100644
--- a/afb/afbfillrct.c
+++ b/afb/afbfillrct.c
@@ -65,7 +65,6 @@ SOFTWARE.
#include "maskbits.h"
#define MODEQ(a, b) ((a) %= (b))
-void afbPaintOddSize();
/*
filled rectangles.
@@ -76,11 +75,11 @@ helper function in the GC.
#define NUM_STACK_RECTS 1024
void
-afbPolyFillRect(pDrawable, pGC, nrectFill, prectInit)
- DrawablePtr pDrawable;
- GCPtr pGC;
- int nrectFill; /* number of rectangles to fill */
- xRectangle *prectInit; /* Pointer to first rectangle to fill */
+afbPolyFillRect(DrawablePtr pDrawable, GCPtr pGC, int nrectFill, xRectangle *prectInit)
+
+
+ /* number of rectangles to fill */
+ /* Pointer to first rectangle to fill */
{
xRectangle *prect;
RegionPtr prgnClip;
diff --git a/afb/afbpushpxl.c b/afb/afbpushpxl.c
index 0e428568b..c717f0e45 100644
--- a/afb/afbpushpxl.c
+++ b/afb/afbpushpxl.c
@@ -62,92 +62,6 @@ SOFTWARE.
#include "maskbits.h"
#include "afb.h"
-/* afbSolidPP is courtesy of xhacks@csri.toronto.edu
-
- For fillStyle==FillSolid, a monochrome PushPixels can be reduced to
- a ROP in the following way: (Note that the ROP is the same as the
- result of ROP(src=0x3,dst=0x5))
-
- src=0011 0000 0011
- dst=0101 0101 0101
- rop fg=0 fg=1
- GXclear 0x0 0000 0100 0100 0
- GXand 0x1 0001 0100 0101 s&d
- GXandReverse 0x2 0010 0100 0110 s&~d
- GXcopy 0x3 0011 0100 0111 s
- GXandInverted 0x4 0100 0101 0100 ~s&d
- GXnoop 0x5 0101 0101 0101 d
- GXxor 0x6 0110 0101 0110 s^d
- GXor 0x7 0111 0101 0111 s|d
- GXnor 0x8 1000 0110 0100 ~s&~d
- GXequiv 0x9 1001 0110 0101 ~s^d
- GXinvert 0xa 1010 0110 0110 ~d
- GXorReverse 0xb 1011 0110 0111 s|~d
- GXcopyInverted 0xc 1100 0111 0100 ~s
- GXorInverted 0xd 1101 0111 0101 ~s|d
- GXnand 0xe 1110 0111 0110 ~s|~d
- GXset 0xf 1111 0111 0111 1
-
-For src=0: newRop = 0x4|(rop>>2)
-For src=1: newRop = 0x4|(rop&3)
-*/
-
-/* afbSolidPP -- squeegees the forground color of pGC through pBitMap
- * into pDrawable. pBitMap is a stencil (dx by dy of it is used, it may
- * be bigger) which is placed on the drawable at xOrg, yOrg. Where a 1 bit
- * is set in the bitmap, the fill style is put onto the drawable using
- * the GC's logical function. The drawable is not changed where the bitmap
- * has a zero bit or outside the area covered by the stencil.
- */
-void
-afbSolidPP(pGC, pBitMap, pDrawable, dx, dy, xOrg, yOrg)
- GCPtr pGC;
- PixmapPtr pBitMap;
- DrawablePtr pDrawable;
- int dx, dy, xOrg, yOrg;
-{
- unsigned char alu;
- RegionRec rgnDst;
- DDXPointPtr pptSrc;
- BoxRec srcBox;
- register DDXPointPtr ppt;
- register BoxPtr pbox;
- int i;
-
- if (!pGC->planemask & 1) return;
-
- /* compute the reduced rop function */
- alu = pGC->alu;
- if (!(pGC->fgPixel&1)) alu >>= 2;
- alu = (alu & 0x3) | 0x4;
- if (alu == GXnoop) return;
-
- srcBox.x1 = xOrg;
- srcBox.y1 = yOrg;
- srcBox.x2 = xOrg + dx;
- srcBox.y2 = yOrg + dy;
- REGION_INIT(pGC->pScreen, &rgnDst, &srcBox, 1);
-
- /* clip the shape of the dst to the destination composite clip */
- REGION_INTERSECT(pGC->pScreen, &rgnDst, &rgnDst, pGC->pCompositeClip);
-
- if (!REGION_NIL(&rgnDst)) {
- i = REGION_NUM_RECTS(&rgnDst);
- pptSrc = (DDXPointPtr)ALLOCATE_LOCAL(i * sizeof(DDXPointRec));
- if(pptSrc) {
- for (pbox = REGION_RECTS(&rgnDst), ppt = pptSrc; --i >= 0;
- pbox++, ppt++) {
- ppt->x = pbox->x1 - xOrg;
- ppt->y = pbox->y1 - yOrg;
- }
- afbDoBitblt((DrawablePtr)pBitMap, pDrawable, alu, &rgnDst, pptSrc,
- pGC->planemask);
- DEALLOCATE_LOCAL(pptSrc);
- }
- }
- REGION_UNINIT(pGC->pScreen, &rgnDst);
-}
-
#define NPT 128
/* afbPushPixels -- squeegees the forground color of pGC through pBitMap
@@ -158,11 +72,7 @@ afbSolidPP(pGC, pBitMap, pDrawable, dx, dy, xOrg, yOrg)
* has a zero bit or outside the area covered by the stencil.
*/
void
-afbPushPixels(pGC, pBitMap, pDrawable, dx, dy, xOrg, yOrg)
- GCPtr pGC;
- PixmapPtr pBitMap;
- DrawablePtr pDrawable;
- int dx, dy, xOrg, yOrg;
+afbPushPixels(GCPtr pGC, PixmapPtr pBitMap, DrawablePtr pDrawable, int dx, int dy, int xOrg, int yOrg)
{
int h, dxDivPPW, ibEnd;
PixelType *pwLineStart;
diff --git a/afb/afbscrinit.c b/afb/afbscrinit.c
index 7b4c70311..b9e0ba94f 100644
--- a/afb/afbscrinit.c
+++ b/afb/afbscrinit.c
@@ -88,9 +88,7 @@ BSFuncRec afbBSFuncRec = {
};
Bool
-afbCloseScreen(index, pScreen)
- int index;
- ScreenPtr pScreen;
+afbCloseScreen(int index, ScreenPtr pScreen)
{
int d;
DepthPtr depths = pScreen->allowedDepths;
@@ -103,9 +101,8 @@ afbCloseScreen(index, pScreen)
return(TRUE);
}
-Bool
-afbCreateScreenResources(pScreen)
- ScreenPtr pScreen;
+static Bool
+afbCreateScreenResources(ScreenPtr pScreen)
{
Bool retval;
@@ -125,9 +122,7 @@ afbCreateScreenResources(pScreen)
}
Bool
-afbAllocatePrivates(pScreen, pWinIndex, pGCIndex)
- ScreenPtr pScreen;
- int *pWinIndex, *pGCIndex;
+afbAllocatePrivates(ScreenPtr pScreen, int *pWinIndex, int *pGCIndex)
{
if (afbGeneration != serverGeneration) {
#ifdef PIXMAP_PER_WINDOW
@@ -151,12 +146,12 @@ afbAllocatePrivates(pScreen, pWinIndex, pGCIndex)
/* dts * (inch/dot) * (25.4 mm / inch) = mm */
Bool
-afbScreenInit(pScreen, pbits, xsize, ysize, dpix, dpiy, width)
- register ScreenPtr pScreen;
- pointer pbits; /* pointer to screen bitmap */
- int xsize, ysize; /* in pixels */
- int dpix, dpiy; /* dots per inch */
- int width; /* pixel width of frame buffer */
+afbScreenInit(register ScreenPtr pScreen, pointer pbits, int xsize, int ysize, int dpix, int dpiy, int width)
+
+ /* pointer to screen bitmap */
+ /* in pixels */
+ /* dots per inch */
+ /* pixel width of frame buffer */
{
VisualPtr visuals;
DepthPtr depths;
@@ -200,11 +195,11 @@ afbScreenInit(pScreen, pbits, xsize, ysize, dpix, dpiy, width)
pScreen->UnrealizeFont = afbUnrealizeFont;
pScreen->CreateGC = afbCreateGC;
pScreen->CreateColormap = afbInitializeColormap;
- pScreen->DestroyColormap = (void (*)())NoopDDA;
+ pScreen->DestroyColormap = (DestroyColormapProcPtr)NoopDDA;
pScreen->InstallColormap = afbInstallColormap;
pScreen->UninstallColormap = afbUninstallColormap;
pScreen->ListInstalledColormaps = afbListInstalledColormaps;
- pScreen->StoreColors = (void (*)())NoopDDA;
+ pScreen->StoreColors = (StoreColorsProcPtr)NoopDDA;
pScreen->ResolveColor = afbResolveColor;
pScreen->BitmapToRegion = afbPixmapToRegion;
oldDevPrivate = pScreen->devPrivate;
@@ -225,8 +220,7 @@ afbScreenInit(pScreen, pbits, xsize, ysize, dpix, dpiy, width)
}
PixmapPtr
-afbGetWindowPixmap(pWin)
- WindowPtr pWin;
+afbGetWindowPixmap(WindowPtr pWin)
{
#ifdef PIXMAP_PER_WINDOW
return (PixmapPtr)(pWin->devPrivates[frameWindowPrivateIndex].ptr);
@@ -238,9 +232,7 @@ afbGetWindowPixmap(pWin)
}
void
-afbSetWindowPixmap(pWin, pPix)
- WindowPtr pWin;
- PixmapPtr pPix;
+afbSetWindowPixmap(WindowPtr pWin, PixmapPtr pPix)
{
#ifdef PIXMAP_PER_WINDOW
pWin->devPrivates[frameWindowPrivateIndex].ptr = (pointer)pPix;
diff --git a/afb/afbzerarc.c b/afb/afbzerarc.c
index ef62238db..0fe9244ad 100644
--- a/afb/afbzerarc.c
+++ b/afb/afbzerarc.c
@@ -83,10 +83,7 @@ in this Software without prior written authorization from the X Consortium.
#define DoPix(bit,base,yoff,xoff) if (mask & bit) Pixelate(base,yoff,xoff);
static void
-afbZeroArcSS(pDraw, pGC, arc)
- DrawablePtr pDraw;
- GCPtr pGC;
- xArc *arc;
+afbZeroArcSS(DrawablePtr pDraw, GCPtr pGC, xArc *arc)
{
miZeroArcRec info;
Bool do360;
@@ -182,11 +179,7 @@ afbZeroArcSS(pDraw, pGC, arc)
}
void
-afbZeroPolyArcSS(pDraw, pGC, narcs, parcs)
- DrawablePtr pDraw;
- GCPtr pGC;
- int narcs;
- xArc *parcs;
+afbZeroPolyArcSS(DrawablePtr pDraw, GCPtr pGC, int narcs, xArc *parcs)
{
register xArc *arc;
register int i;