More warning cleanup.

This commit is contained in:
Adam Jackson 2006-03-29 01:05:09 +00:00
parent 52d9ce7f4f
commit ff6f88348c
18 changed files with 82 additions and 241 deletions

View File

@ -1,3 +1,24 @@
2006-03-28 Adam Jackson <ajax@freedesktop.org>
* afb/afbbitblt.c:
* afb/afbcmap.c:
* afb/afbfillarc.c:
* afb/afbfillrct.c:
* afb/afbpushpxl.c:
* afb/afbscrinit.c:
* afb/afbzerarc.c:
* hw/dmx/input/usb-other.c:
* hw/xfree86/common/xf86xv.c:
* hw/xfree86/dri/dri.c:
* hw/xfree86/fbdevhw/fbdevhw.c:
* hw/xfree86/i2c/fi1236.c:
* hw/xfree86/i2c/msp3430.c:
* hw/xfree86/i2c/uda1380.c:
* hw/xfree86/xf4bpp/ppcGetSp.c:
* hw/xfree86/xf8_16bpp/cfbscrinit.c:
* hw/xfree86/xf8_32bpp/cfbimage.c:
More warning cleanup.
2006-03-28 Kristian Høgsberg <krh@redhat.com> 2006-03-28 Kristian Høgsberg <krh@redhat.com>
* configure.ac: Fix another typo. * configure.ac: Fix another typo.

View File

@ -104,12 +104,7 @@ destination. this is a simple translation.
*/ */
void void
afbDoBitblt(pSrc, pDst, alu, prgnDst, pptSrc, planemask) afbDoBitblt(DrawablePtr pSrc, DrawablePtr pDst, int alu, RegionPtr prgnDst, DDXPointPtr pptSrc, long unsigned int planemask)
DrawablePtr pSrc, pDst;
int alu;
RegionPtr prgnDst;
DDXPointPtr pptSrc;
unsigned long planemask;
{ {
switch (alu) { switch (alu) {
case GXcopy: 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 RegionPtr
afbCopyArea(pSrcDrawable, pDstDrawable, pGC, srcx, srcy, width, height, afbCopyArea(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, GC *pGC, int srcx, int srcy, int width, int height, int dstx, int dsty)
dstx, dsty)
DrawablePtr pSrcDrawable;
DrawablePtr pDstDrawable;
GC *pGC;
int srcx, srcy;
int width, height;
int dstx, dsty;
{ {
void (*doBitBlt)(); afb_blit_func doBitBlt;
switch (pGC->alu) { switch (pGC->alu) {
case GXcopy: case GXcopy:
@ -165,16 +156,7 @@ afbCopyArea(pSrcDrawable, pDstDrawable, pGC, srcx, srcy, width, height,
} }
RegionPtr RegionPtr
afbBitBlt(pSrcDrawable, pDstDrawable, pGC, srcx, srcy, width, height, 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)
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;
{ {
RegionPtr prgnSrcClip = NULL; /* may be a new region, or just a copy */ RegionPtr prgnSrcClip = NULL; /* may be a new region, or just a copy */
Bool freeSrcClip = FALSE; Bool freeSrcClip = FALSE;
@ -366,14 +348,7 @@ afbBitBlt(pSrcDrawable, pDstDrawable, pGC, srcx, srcy, width, height,
} }
RegionPtr RegionPtr
afbCopyPlane(pSrcDrawable, pDstDrawable, pGC, srcx, srcy, width, height, afbCopyPlane(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, register GC *pGC, int srcx, int srcy, int width, int height, int dstx, int dsty, long unsigned int plane)
dstx, dsty, plane)
DrawablePtr pSrcDrawable, pDstDrawable;
register GC *pGC;
int srcx, srcy;
int width, height;
int dstx, dsty;
unsigned long plane;
{ {
int alu; int alu;
RegionPtr prgnExposed = NULL; RegionPtr prgnExposed = NULL;
@ -454,12 +429,7 @@ unsigned long plane;
} }
void void
afbCopy1ToN(pSrc, pDst, alu, prgnDst, pptSrc, planemask) afbCopy1ToN(DrawablePtr pSrc, DrawablePtr pDst, int alu, RegionPtr prgnDst, DDXPointPtr pptSrc, long unsigned int planemask)
DrawablePtr pSrc, pDst;
int alu;
RegionPtr prgnDst;
DDXPointPtr pptSrc;
unsigned long planemask;
{ {
int numRects = REGION_NUM_RECTS(prgnDst); int numRects = REGION_NUM_RECTS(prgnDst);
BoxPtr pbox = REGION_RECTS(prgnDst); BoxPtr pbox = REGION_RECTS(prgnDst);

View File

@ -39,66 +39,53 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include "colormapst.h" #include "colormapst.h"
#include "resource.h" #include "resource.h"
#include "micmap.h" #include "micmap.h"
#include "afb.h"
int int
afbListInstalledColormaps(pScreen, pmaps) afbListInstalledColormaps(ScreenPtr pScreen, Colormap *pmaps)
ScreenPtr pScreen;
Colormap *pmaps;
{ {
return miListInstalledColormaps(pScreen, pmaps); return miListInstalledColormaps(pScreen, pmaps);
} }
void void
afbInstallColormap(pmap) afbInstallColormap(ColormapPtr pmap)
ColormapPtr pmap;
{ {
miInstallColormap(pmap); miInstallColormap(pmap);
} }
void void
afbUninstallColormap(pmap) afbUninstallColormap(ColormapPtr pmap)
ColormapPtr pmap;
{ {
miUninstallColormap(pmap); miUninstallColormap(pmap);
} }
void void
afbResolveColor(pred, pgreen, pblue, pVisual) afbResolveColor(short unsigned int *pred, short unsigned int *pgreen, short unsigned int *pblue, register VisualPtr pVisual)
unsigned short *pred, *pgreen, *pblue;
register VisualPtr pVisual;
{ {
miResolveColor(pred, pgreen, pblue, pVisual); miResolveColor(pred, pgreen, pblue, pVisual);
} }
Bool Bool
afbInitializeColormap(pmap) afbInitializeColormap(register ColormapPtr pmap)
register ColormapPtr pmap;
{ {
return miInitializeColormap(pmap); return miInitializeColormap(pmap);
} }
int int
afbExpandDirectColors(pmap, ndef, indefs, outdefs) afbExpandDirectColors(ColormapPtr pmap, int ndef, xColorItem *indefs, xColorItem *outdefs)
ColormapPtr pmap;
int ndef;
xColorItem *indefs, *outdefs;
{ {
return miExpandDirectColors(pmap, ndef, indefs, outdefs); return miExpandDirectColors(pmap, ndef, indefs, outdefs);
} }
Bool Bool
afbCreateDefColormap(pScreen) afbCreateDefColormap(ScreenPtr pScreen)
ScreenPtr pScreen;
{ {
return miCreateDefColormap(pScreen); return miCreateDefColormap(pScreen);
} }
Bool Bool
afbSetVisualTypes(depth, visuals, bitsPerRGB) afbSetVisualTypes(int depth, int visuals, int bitsPerRGB)
int depth;
int visuals;
int bitsPerRGB;
{ {
return miSetVisualTypes(depth, visuals, bitsPerRGB, -1); return miSetVisualTypes(depth, visuals, bitsPerRGB, -1);
} }
@ -110,15 +97,7 @@ afbSetVisualTypes(depth, visuals, bitsPerRGB)
*/ */
Bool Bool
afbInitVisuals(visualp, depthp, nvisualp, ndepthp, rootDepthp, defaultVisp, afbInitVisuals(VisualPtr *visualp, DepthPtr *depthp, int *nvisualp, int *ndepthp, int *rootDepthp, VisualID *defaultVisp, long unsigned int sizes, int bitsPerRGB)
sizes, bitsPerRGB)
VisualPtr *visualp;
DepthPtr *depthp;
int *nvisualp, *ndepthp;
int *rootDepthp;
VisualID *defaultVisp;
unsigned long sizes;
int bitsPerRGB;
{ {
return miInitVisuals(visualp, depthp, nvisualp, ndepthp, rootDepthp, return miInitVisuals(visualp, depthp, nvisualp, ndepthp, rootDepthp,
defaultVisp, sizes, bitsPerRGB, -1); defaultVisp, sizes, bitsPerRGB, -1);

View File

@ -44,10 +44,7 @@ in this Software without prior written authorization from the X Consortium.
#include "mi.h" #include "mi.h"
static void static void
afbFillEllipseSolid(pDraw, arc, rrops) afbFillEllipseSolid(DrawablePtr pDraw, xArc *arc, register unsigned char *rrops)
DrawablePtr pDraw;
xArc *arc;
register unsigned char *rrops;
{ {
int x, y, e; int x, y, e;
int yk, xk, ym, xm, dx, dy, xorg, yorg; int yk, xk, ym, xm, dx, dy, xorg, yorg;
@ -268,11 +265,7 @@ afbFillEllipseSolid(pDraw, arc, rrops)
} }
static void static void
afbFillArcSliceSolidCopy(pDraw, pGC, arc, rrops) afbFillArcSliceSolidCopy(DrawablePtr pDraw, GCPtr pGC, xArc *arc, register unsigned char *rrops)
DrawablePtr pDraw;
GCPtr pGC;
xArc *arc;
register unsigned char *rrops;
{ {
PixelType *addrl; PixelType *addrl;
register PixelType *pdst; register PixelType *pdst;
@ -321,11 +314,7 @@ afbFillArcSliceSolidCopy(pDraw, pGC, arc, rrops)
} }
void void
afbPolyFillArcSolid(pDraw, pGC, narcs, parcs) afbPolyFillArcSolid(register DrawablePtr pDraw, GCPtr pGC, int narcs, xArc *parcs)
register DrawablePtr pDraw;
GCPtr pGC;
int narcs;
xArc *parcs;
{ {
afbPrivGC *priv; afbPrivGC *priv;
register xArc *arc; register xArc *arc;

View File

@ -65,7 +65,6 @@ SOFTWARE.
#include "maskbits.h" #include "maskbits.h"
#define MODEQ(a, b) ((a) %= (b)) #define MODEQ(a, b) ((a) %= (b))
void afbPaintOddSize();
/* /*
filled rectangles. filled rectangles.
@ -76,11 +75,11 @@ helper function in the GC.
#define NUM_STACK_RECTS 1024 #define NUM_STACK_RECTS 1024
void void
afbPolyFillRect(pDrawable, pGC, nrectFill, prectInit) afbPolyFillRect(DrawablePtr pDrawable, GCPtr pGC, int nrectFill, xRectangle *prectInit)
DrawablePtr pDrawable;
GCPtr pGC;
int nrectFill; /* number of rectangles to fill */ /* number of rectangles to fill */
xRectangle *prectInit; /* Pointer to first rectangle to fill */ /* Pointer to first rectangle to fill */
{ {
xRectangle *prect; xRectangle *prect;
RegionPtr prgnClip; RegionPtr prgnClip;

View File

@ -62,92 +62,6 @@ SOFTWARE.
#include "maskbits.h" #include "maskbits.h"
#include "afb.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 #define NPT 128
/* afbPushPixels -- squeegees the forground color of pGC through pBitMap /* 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. * has a zero bit or outside the area covered by the stencil.
*/ */
void void
afbPushPixels(pGC, pBitMap, pDrawable, dx, dy, xOrg, yOrg) afbPushPixels(GCPtr pGC, PixmapPtr pBitMap, DrawablePtr pDrawable, int dx, int dy, int xOrg, int yOrg)
GCPtr pGC;
PixmapPtr pBitMap;
DrawablePtr pDrawable;
int dx, dy, xOrg, yOrg;
{ {
int h, dxDivPPW, ibEnd; int h, dxDivPPW, ibEnd;
PixelType *pwLineStart; PixelType *pwLineStart;

View File

@ -88,9 +88,7 @@ BSFuncRec afbBSFuncRec = {
}; };
Bool Bool
afbCloseScreen(index, pScreen) afbCloseScreen(int index, ScreenPtr pScreen)
int index;
ScreenPtr pScreen;
{ {
int d; int d;
DepthPtr depths = pScreen->allowedDepths; DepthPtr depths = pScreen->allowedDepths;
@ -103,9 +101,8 @@ afbCloseScreen(index, pScreen)
return(TRUE); return(TRUE);
} }
Bool static Bool
afbCreateScreenResources(pScreen) afbCreateScreenResources(ScreenPtr pScreen)
ScreenPtr pScreen;
{ {
Bool retval; Bool retval;
@ -125,9 +122,7 @@ afbCreateScreenResources(pScreen)
} }
Bool Bool
afbAllocatePrivates(pScreen, pWinIndex, pGCIndex) afbAllocatePrivates(ScreenPtr pScreen, int *pWinIndex, int *pGCIndex)
ScreenPtr pScreen;
int *pWinIndex, *pGCIndex;
{ {
if (afbGeneration != serverGeneration) { if (afbGeneration != serverGeneration) {
#ifdef PIXMAP_PER_WINDOW #ifdef PIXMAP_PER_WINDOW
@ -151,12 +146,12 @@ afbAllocatePrivates(pScreen, pWinIndex, pGCIndex)
/* dts * (inch/dot) * (25.4 mm / inch) = mm */ /* dts * (inch/dot) * (25.4 mm / inch) = mm */
Bool Bool
afbScreenInit(pScreen, pbits, xsize, ysize, dpix, dpiy, width) afbScreenInit(register ScreenPtr pScreen, pointer pbits, int xsize, int ysize, int dpix, int dpiy, int width)
register ScreenPtr pScreen;
pointer pbits; /* pointer to screen bitmap */ /* pointer to screen bitmap */
int xsize, ysize; /* in pixels */ /* in pixels */
int dpix, dpiy; /* dots per inch */ /* dots per inch */
int width; /* pixel width of frame buffer */ /* pixel width of frame buffer */
{ {
VisualPtr visuals; VisualPtr visuals;
DepthPtr depths; DepthPtr depths;
@ -200,11 +195,11 @@ afbScreenInit(pScreen, pbits, xsize, ysize, dpix, dpiy, width)
pScreen->UnrealizeFont = afbUnrealizeFont; pScreen->UnrealizeFont = afbUnrealizeFont;
pScreen->CreateGC = afbCreateGC; pScreen->CreateGC = afbCreateGC;
pScreen->CreateColormap = afbInitializeColormap; pScreen->CreateColormap = afbInitializeColormap;
pScreen->DestroyColormap = (void (*)())NoopDDA; pScreen->DestroyColormap = (DestroyColormapProcPtr)NoopDDA;
pScreen->InstallColormap = afbInstallColormap; pScreen->InstallColormap = afbInstallColormap;
pScreen->UninstallColormap = afbUninstallColormap; pScreen->UninstallColormap = afbUninstallColormap;
pScreen->ListInstalledColormaps = afbListInstalledColormaps; pScreen->ListInstalledColormaps = afbListInstalledColormaps;
pScreen->StoreColors = (void (*)())NoopDDA; pScreen->StoreColors = (StoreColorsProcPtr)NoopDDA;
pScreen->ResolveColor = afbResolveColor; pScreen->ResolveColor = afbResolveColor;
pScreen->BitmapToRegion = afbPixmapToRegion; pScreen->BitmapToRegion = afbPixmapToRegion;
oldDevPrivate = pScreen->devPrivate; oldDevPrivate = pScreen->devPrivate;
@ -225,8 +220,7 @@ afbScreenInit(pScreen, pbits, xsize, ysize, dpix, dpiy, width)
} }
PixmapPtr PixmapPtr
afbGetWindowPixmap(pWin) afbGetWindowPixmap(WindowPtr pWin)
WindowPtr pWin;
{ {
#ifdef PIXMAP_PER_WINDOW #ifdef PIXMAP_PER_WINDOW
return (PixmapPtr)(pWin->devPrivates[frameWindowPrivateIndex].ptr); return (PixmapPtr)(pWin->devPrivates[frameWindowPrivateIndex].ptr);
@ -238,9 +232,7 @@ afbGetWindowPixmap(pWin)
} }
void void
afbSetWindowPixmap(pWin, pPix) afbSetWindowPixmap(WindowPtr pWin, PixmapPtr pPix)
WindowPtr pWin;
PixmapPtr pPix;
{ {
#ifdef PIXMAP_PER_WINDOW #ifdef PIXMAP_PER_WINDOW
pWin->devPrivates[frameWindowPrivateIndex].ptr = (pointer)pPix; pWin->devPrivates[frameWindowPrivateIndex].ptr = (pointer)pPix;

View File

@ -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); #define DoPix(bit,base,yoff,xoff) if (mask & bit) Pixelate(base,yoff,xoff);
static void static void
afbZeroArcSS(pDraw, pGC, arc) afbZeroArcSS(DrawablePtr pDraw, GCPtr pGC, xArc *arc)
DrawablePtr pDraw;
GCPtr pGC;
xArc *arc;
{ {
miZeroArcRec info; miZeroArcRec info;
Bool do360; Bool do360;
@ -182,11 +179,7 @@ afbZeroArcSS(pDraw, pGC, arc)
} }
void void
afbZeroPolyArcSS(pDraw, pGC, narcs, parcs) afbZeroPolyArcSS(DrawablePtr pDraw, GCPtr pGC, int narcs, xArc *parcs)
DrawablePtr pDraw;
GCPtr pGC;
int narcs;
xArc *parcs;
{ {
register xArc *arc; register xArc *arc;
register int i; register int i;

View File

@ -142,7 +142,7 @@ void othUSBGetInfo(DevicePtr pDev, DMXLocalInitInfoPtr info)
} else } else
info->numAbsAxes = priv->numAbs; info->numAbsAxes = priv->numAbs;
for (j = 0; j < info->numAbsAxes; j++) { for (j = 0; j < info->numAbsAxes; j++) {
ioctl(priv->fd, EVIOCGABS(j), abs); ioctl(priv->fd, EVIOCGABS(j), absolute);
info->minval[1+j] = absolute[1]; info->minval[1+j] = absolute[1];
info->maxval[1+j] = absolute[2]; info->maxval[1+j] = absolute[2];
info->res[1+j] = absolute[3]; info->res[1+j] = absolute[3];

View File

@ -687,8 +687,6 @@ xf86XVCopyClip(
XvPortRecPrivatePtr portPriv, XvPortRecPrivatePtr portPriv,
GCPtr pGC GCPtr pGC
){ ){
ScreenPtr pScreen = pGC->pScreen;
/* copy the new clip if it exists */ /* copy the new clip if it exists */
if((pGC->clientClipType == CT_REGION) && pGC->clientClip) { if((pGC->clientClipType == CT_REGION) && pGC->clientClip) {
if(!portPriv->clientClip) if(!portPriv->clientClip)

View File

@ -41,6 +41,8 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "xf86.h" #include "xf86.h"
#include <sys/time.h> #include <sys/time.h>
#include <unistd.h> #include <unistd.h>
#include <string.h>
#include <stdio.h>
#define NEED_REPLIES #define NEED_REPLIES
#define NEED_EVENTS #define NEED_EVENTS
@ -1135,7 +1137,9 @@ DRIGetDrawableInfo(ScreenPtr pScreen,
WindowPtr pWin, pOldWin; WindowPtr pWin, pOldWin;
int i; int i;
#if 0
printf("maxDrawableTableEntry = %d\n", pDRIPriv->pDriverInfo->maxDrawableTableEntry); printf("maxDrawableTableEntry = %d\n", pDRIPriv->pDriverInfo->maxDrawableTableEntry);
#endif
if (pDrawable->type == DRAWABLE_WINDOW) { if (pDrawable->type == DRAWABLE_WINDOW) {
pWin = (WindowPtr)pDrawable; pWin = (WindowPtr)pDrawable;

View File

@ -5,6 +5,8 @@
#include <xorg-config.h> #include <xorg-config.h>
#endif #endif
#include <string.h>
#include "xf86.h" #include "xf86.h"
#include "xf86_OSproc.h" #include "xf86_OSproc.h"

View File

@ -1,4 +1,4 @@
/* $XdotOrg: xserver/xorg/hw/xfree86/i2c/fi1236.c,v 1.8 2005/07/30 18:56:32 alanc Exp $ */ /* $XdotOrg: xserver/xorg/hw/xfree86/i2c/fi1236.c,v 1.9 2006/02/10 22:00:25 anholt Exp $ */
#ifdef HAVE_XORG_CONFIG_H #ifdef HAVE_XORG_CONFIG_H
#include <xorg-config.h> #include <xorg-config.h>
@ -102,7 +102,6 @@ xf86DrvMsg(f->d.pI2CBus->scrnIndex, X_INFO, "MT2032: Company code 0x%02x%02x, pa
static void MT2032_shutdown(FI1236Ptr f) static void MT2032_shutdown(FI1236Ptr f)
{ {
CARD8 data[10]; CARD8 data[10];
CARD8 value;
data[0]=0x00; /* start with register 0x00 */ data[0]=0x00; /* start with register 0x00 */
data[1]=0x1A; data[1]=0x1A;
@ -534,8 +533,6 @@ void FI1236_tune(FI1236Ptr f, CARD32 frequency)
void TUNER_set_frequency(FI1236Ptr f, CARD32 frequency) void TUNER_set_frequency(FI1236Ptr f, CARD32 frequency)
{ {
CARD16 divider;
if(frequency < f->parm.min_freq) frequency = f->parm.min_freq; if(frequency < f->parm.min_freq) frequency = f->parm.min_freq;
if(frequency > f->parm.max_freq) frequency = f->parm.max_freq; if(frequency > f->parm.max_freq) frequency = f->parm.max_freq;

View File

@ -82,6 +82,7 @@ static void GetMSP3430Data(MSP3430Ptr m, CARD8 RegAddress, CARD8 RegSubAddressHi
*RegValueLow = receive[1]; *RegValueLow = receive[1];
} }
#if __MSPDEBUG__ > 2
static void MSP3430DumpStatus(MSP3430Ptr m) static void MSP3430DumpStatus(MSP3430Ptr m)
{ {
CARD8 status_hi, status_lo; CARD8 status_hi, status_lo;
@ -102,6 +103,7 @@ I2C_WriteRead(&(m->d), &subaddr, 1, data, 2);
xf86DrvMsg(m->d.pI2CBus->scrnIndex, X_INFO, "MSP34xx: control=0x%02x%02x\n", xf86DrvMsg(m->d.pI2CBus->scrnIndex, X_INFO, "MSP34xx: control=0x%02x%02x\n",
data[1], data[0]); data[1], data[0]);
} }
#endif
/* wrapper */ /* wrapper */
void InitMSP3430(MSP3430Ptr m) void InitMSP3430(MSP3430Ptr m)
@ -263,9 +265,8 @@ void ResetMSP3430(MSP3430Ptr m)
void MSP3430SetVolume (MSP3430Ptr m, CARD8 value) void MSP3430SetVolume (MSP3430Ptr m, CARD8 value)
{ {
CARD8 result; CARD8 result;
CARD8 old_volume;
#if 0 #if 0
CARD8 old_volume;
GetMSP3430Data(m, RD_DSP, 0x00, 0x00, &old_volume, &result); GetMSP3430Data(m, RD_DSP, 0x00, 0x00, &old_volume, &result);
xf86DrvMsg(m->d.pI2CBus->scrnIndex, X_INFO, "MSP3430 result 0x%02x\n", result); xf86DrvMsg(m->d.pI2CBus->scrnIndex, X_INFO, "MSP3430 result 0x%02x\n", result);
#endif #endif
@ -608,7 +609,6 @@ void CheckModeMSP34x5D(MSP3430Ptr m) {
const char dual_off=-stereo_off; const char dual_off=-stereo_off;
char detect; char detect;
CARD8 matrix, fmmatrix, source, high, low; CARD8 matrix, fmmatrix, source, high, low;
char *msg;
fmmatrix=0; /*no matrix*/ fmmatrix=0; /*no matrix*/
source=0; /*FM*/ source=0; /*FM*/
@ -702,6 +702,7 @@ void CheckModeMSP34x5D(MSP3430Ptr m) {
SetMSP3430Data (m, WR_DEM, 0x00, 0x21, 0, 1); SetMSP3430Data (m, WR_DEM, 0x00, 0x21, 0, 1);
#if __MSPDEBUG__ > 0 #if __MSPDEBUG__ > 0
char *msg;
switch (matrix) { switch (matrix) {
case 0x30: /*MONO*/ case 0x30: /*MONO*/
msg="MONO"; msg="MONO";

View File

@ -22,22 +22,6 @@
* otherwise to promote the sale, use or other dealings in this Software without prior written * otherwise to promote the sale, use or other dealings in this Software without prior written
* authorization from the author. * authorization from the author.
* *
* $Log$
* Revision 1.5 2005/09/24 21:56:00 bogdand
* Changed the license to a X/MIT one
*
* Revision 1.4 2005/07/13 20:19:37 sandmann
* xc/programs/Xserver/hw/xfree86/drivers/i2c/*.c: include xorg-config.h
* instead of config.h
* xserver/xorg/hw/xfree86/i2c/Makefile.am: Add i2c drivers
*
* Revision 1.3 2005/07/11 02:29:50 ajax
* Prep for modular builds by adding guarded #include "config.h" everywhere.
*
* Revision 1.2 2005/07/01 22:43:11 daniels
* Change all misc.h and os.h references to <X11/foo.h>.
*
*
************************************************************************************/ ************************************************************************************/
#ifdef HAVE_XORG_CONFIG_H #ifdef HAVE_XORG_CONFIG_H

View File

@ -76,6 +76,7 @@ SOFTWARE.
#include <xorg-config.h> #include <xorg-config.h>
#endif #endif
#include <string.h>
#include "xf4bpp.h" #include "xf4bpp.h"
#include "OScompiler.h" #include "OScompiler.h"
#include "mfbmap.h" #include "mfbmap.h"

View File

@ -153,11 +153,11 @@ cfb8_16SetupScreen(
pScreen->UnrealizeFont = mfbUnrealizeFont; pScreen->UnrealizeFont = mfbUnrealizeFont;
pScreen->CreateGC = cfb8_16CreateGC; pScreen->CreateGC = cfb8_16CreateGC;
pScreen->CreateColormap = miInitializeColormap; pScreen->CreateColormap = miInitializeColormap;
pScreen->DestroyColormap = (void (*)())NoopDDA; pScreen->DestroyColormap = (DestroyColormapProcPtr)NoopDDA;
pScreen->InstallColormap = miInstallColormap; pScreen->InstallColormap = miInstallColormap;
pScreen->UninstallColormap = miUninstallColormap; pScreen->UninstallColormap = miUninstallColormap;
pScreen->ListInstalledColormaps = miListInstalledColormaps; pScreen->ListInstalledColormaps = miListInstalledColormaps;
pScreen->StoreColors = (void (*)())NoopDDA; pScreen->StoreColors = (StoreColorsProcPtr)NoopDDA;
pScreen->ResolveColor = miResolveColor; pScreen->ResolveColor = miResolveColor;
pScreen->BitmapToRegion = mfbPixmapToRegion; pScreen->BitmapToRegion = mfbPixmapToRegion;

View File

@ -5,6 +5,7 @@
#endif #endif
#include <stdlib.h> #include <stdlib.h>
#include <string.h>
#include <X11/X.h> #include <X11/X.h>
#include "windowstr.h" #include "windowstr.h"
@ -60,7 +61,7 @@ cfb8_32GetImage (
if (!pPixmap) if (!pPixmap)
return; return;
if ((planemask & 0xff) != 0xff) if ((planemask & 0xff) != 0xff)
bzero((char *)pdstLine, pPixmap->devKind * h); memset((char *)pdstLine, 0, pPixmap->devKind * h);
ptSrc.x = sx + pDraw->x; ptSrc.x = sx + pDraw->x;
ptSrc.y = sy + pDraw->y; ptSrc.y = sy + pDraw->y;
box.x1 = 0; box.x1 = 0;