diff --git a/Xprint/ps/Ps.h b/Xprint/ps/Ps.h index 781161d8a..4effc2066 100644 --- a/Xprint/ps/Ps.h +++ b/Xprint/ps/Ps.h @@ -356,6 +356,14 @@ extern Bool InitializePsDriver(int ndx, ScreenPtr pScreen, int argc, char **argv); extern XpContextPtr PsGetContextFromWindow(WindowPtr win); +/* + * Functions in PsCache.c + */ + +extern int PsBmIsImageCached(int gWidth, int gHeight, char *pBuffer); +extern int PsBmPutImageInCache(int gWidth, int gHeight, char *pBuffer); +extern void PsBmClearImageCache(void); + /* * Functions in PsPrint.c */ @@ -427,6 +435,9 @@ extern void PsSetSpans(DrawablePtr pDrawable, GCPtr pGC, char *pSrc, extern void PsPutScaledImage(DrawablePtr pDrawable, GCPtr pGC, int depth, int x, int y, int w, int h, int leftPad, int format, int imageRes, char *pImage); +extern void PsPutScaledImageIM(DrawablePtr pDrawable, GCPtr pGC, int depth, + int x, int y, int w, int h, int leftPad, + int format, int imageRes, char *pImage); extern void PsPutImage(DrawablePtr pDrawable, GCPtr pGC, int depth, int x, int y, int w, int h, int leftPad, int format, char *pImage); @@ -569,6 +580,7 @@ extern PixmapPtr PsCreatePixmap(ScreenPtr pScreen, int width, int height, extern void PsScrubPixmap(PixmapPtr pPixmap); extern Bool PsDestroyPixmap(PixmapPtr pPixmap); extern DisplayListPtr PsGetFreeDisplayBlock(PsPixmapPrivPtr priv); +extern void PsReplay(DisplayElmPtr elm, DrawablePtr pDrawable); extern void PsReplayPixmap(PixmapPtr pix, DrawablePtr pDrawable); extern int PsCloneDisplayElm(PixmapPtr dst, DisplayElmPtr elm, DisplayElmPtr newElm, diff --git a/Xprint/ps/PsArea.c b/Xprint/ps/PsArea.c index 32a4d5cf4..bf6f8f42a 100644 --- a/Xprint/ps/PsArea.c +++ b/Xprint/ps/PsArea.c @@ -118,7 +118,6 @@ PsPutScaledImage(DrawablePtr pDrawable, GCPtr pGC, int depth, int x, int y, { int i, j; int r, c; - char *pt; PsOutPtr psOut; ColormapPtr cMap; int pageRes, sw, sh; @@ -230,7 +229,6 @@ PsPutScaledImageIM(DrawablePtr pDrawable, GCPtr pGC, int depth, int x, int y, { int i, j; int r, c; - char *pt; PsOutPtr psOut; ColormapPtr cMap; int pageRes, sw, sh; diff --git a/Xprint/ps/PsCache.c b/Xprint/ps/PsCache.c index e69aa2eb7..5c823a13e 100644 --- a/Xprint/ps/PsCache.c +++ b/Xprint/ps/PsCache.c @@ -317,7 +317,7 @@ PsBmClearImageCacheList( } void -PsBmClearImageCache() +PsBmClearImageCache(void) { PsBmClearImageCacheList(bm_cache); diff --git a/Xprint/ps/PsFonts.c b/Xprint/ps/PsFonts.c index 515a31884..c4d5b03e2 100644 --- a/Xprint/ps/PsFonts.c +++ b/Xprint/ps/PsFonts.c @@ -286,9 +286,8 @@ char *getFontFilename(FontPtr pFont) const char *dlfnam; FILE *file; struct stat statb; - int count, i, status; char buf[512]; - char *front, *end, *fn; + char *front, *fn; char font_dir_fname[PATH_MAX], /* Full path of fonts.dir */ font_file_fname[PATH_MAX]; /* Name of font file (excluding path) */ @@ -592,7 +591,6 @@ PsFontTypeInfoRec *PsCreateFontTypeInfoRec(DrawablePtr pDrawable, FontPtr pFont) { char *dlfnam; PsFontTypeInfoRec *rec; - char *psname; if (!(dlfnam = PsGetFontName(pFont))) return NULL; diff --git a/Xprint/ps/PsGC.c b/Xprint/ps/PsGC.c index 61a2a2813..ada0b8c65 100644 --- a/Xprint/ps/PsGC.c +++ b/Xprint/ps/PsGC.c @@ -181,7 +181,6 @@ PsContextPrivPtr PsGetPsContextPriv( DrawablePtr pDrawable ) { XpContextPtr pCon; - PsContextPrivPtr cPriv; switch(pDrawable->type) { diff --git a/Xprint/ps/PsImageUtil.c b/Xprint/ps/PsImageUtil.c index 282786564..f3052bebb 100644 --- a/Xprint/ps/PsImageUtil.c +++ b/Xprint/ps/PsImageUtil.c @@ -33,6 +33,7 @@ copyright holders. #include #endif +#include "Ps.h" #include "gcstruct.h" #include "windowstr.h" #include "servermd.h" diff --git a/Xprint/ps/PsInit.c b/Xprint/ps/PsInit.c index e663fa3a3..06c5d11a8 100644 --- a/Xprint/ps/PsInit.c +++ b/Xprint/ps/PsInit.c @@ -119,8 +119,6 @@ InitializePsDriver(ndx, pScreen, argc, argv) int maxRes, maxDim, numBytes; PsScreenPrivPtr pPriv; #endif - char **printerNames; - int numPrinters; int nv, /* total number of visuals */ nv_1bit, /* number of 8bit visuals */ nv_8bit, /* number of 8bit visuals */ diff --git a/Xprint/ps/PsPixmap.c b/Xprint/ps/PsPixmap.c index a698b375e..f2d05d023 100644 --- a/Xprint/ps/PsPixmap.c +++ b/Xprint/ps/PsPixmap.c @@ -191,7 +191,6 @@ Bool PsDestroyPixmap(PixmapPtr pPixmap) { PsPixmapPrivPtr priv = (PsPixmapPrivPtr)pPixmap->devPrivate.ptr; - DisplayListPtr disp = priv->dispList; if( --pPixmap->refcnt ) return TRUE; @@ -512,6 +511,8 @@ PsCreateFillElementList(PixmapPtr pix, int *nElms) case PolyFillArcCmd: *nElms += elm->c.arcs.nArcs; break; + default: /* keep the compiler happy with unhandled enums */ + break; } } } @@ -574,6 +575,8 @@ PsCreateFillElementList(PixmapPtr pix, int *nElms) *nElms += 1; } break; + default: /* keep the compiler happy with unhandled enums */ + break; } } } diff --git a/Xprint/ps/PsPolygon.c b/Xprint/ps/PsPolygon.c index a1ae67f8d..c4c30bc79 100644 --- a/Xprint/ps/PsPolygon.c +++ b/Xprint/ps/PsPolygon.c @@ -215,8 +215,6 @@ PsPolyFillRect( */ if (nRects == 1) { - extern Bool noDbeExtension; - if ( (pRects[0].x==0) && (pRects[0].y==0) && (pRects[0].width==pDrawable->width) && (pRects[0].height==pDrawable->height) && (pGC->fillStyle == FillSolid) && @@ -227,7 +225,7 @@ PsPolyFillRect( #endif /* DEBUG_gismobile */ /* Remove all content from the pixmap as it would be covered * by the whole rect anyway */ - PsScrubPixmap(pDrawable); + PsScrubPixmap((PixmapPtr)pDrawable); } } #endif /* DBE */ diff --git a/Xprint/ps/PsPrint.c b/Xprint/ps/PsPrint.c index 05e8e2588..8a4f0ade8 100644 --- a/Xprint/ps/PsPrint.c +++ b/Xprint/ps/PsPrint.c @@ -292,13 +292,10 @@ PsStartPage( { int iorient, iplex, icount, ires; unsigned short iwd, iht; - register WindowPtr pChild; PsContextPrivPtr pConPriv = (PsContextPrivPtr)pCon->devPrivates[PsContextPrivateIndex].ptr; PsWindowPrivPtr pWinPriv = (PsWindowPrivPtr)pWin->devPrivates[PsWindowPrivateIndex].ptr; - char s[80]; - xEvent event; /* * Put a pointer to the context in the window private structure diff --git a/Xprint/ps/PsText.c b/Xprint/ps/PsText.c index 228e407dc..37463ba1a 100644 --- a/Xprint/ps/PsText.c +++ b/Xprint/ps/PsText.c @@ -329,11 +329,7 @@ PsPolyText16( { PsOutPtr psOut; ColormapPtr cMap; - unsigned short c, - c_hiByte, - c_lowByte, - fontPage; - int i; + unsigned short fontPage; if( PsUpdateDrawableGC(pGC, pDrawable, &psOut, &cMap)==FALSE ) return x; diff --git a/Xprint/ps/PsWindow.c b/Xprint/ps/PsWindow.c index 313e51f31..415e97efb 100644 --- a/Xprint/ps/PsWindow.c +++ b/Xprint/ps/PsWindow.c @@ -96,6 +96,7 @@ extern WindowPtr *WindowTable; * placed on the screen's root window if the property was defined in * the start-up configuration resource database. */ +#if 0 static char *propStrings[] = { DT_PRINT_JOB_HEADER, DT_PRINT_JOB_TRAILER, @@ -107,7 +108,7 @@ static char *propStrings[] = { DT_PRINT_PAGE_COMMAND, (char *)NULL }; - +#endif /* * PsCreateWindow - watch for the creation of the root window. @@ -222,7 +223,6 @@ PsPaintWindow( RegionPtr pRegion, int what) { - int status; WindowPtr pRoot; #define FUNCTION 0 diff --git a/Xprint/ps/psout.c b/Xprint/ps/psout.c index 376feec03..d7f45b16c 100644 --- a/Xprint/ps/psout.c +++ b/Xprint/ps/psout.c @@ -683,7 +683,6 @@ void PsOut_EndFile(PsOutPtr self, int closeFile) { char coms[50]; - int i; if (!self) return; @@ -1592,7 +1591,8 @@ PsOut_BeginPattern(PsOutPtr self, void *tag, int w, int h, PsFillEnum type, switch(type) { case PsTile: key[1] = 't'; break; case PsStip: key[1] = 's'; break; - case PsOpStip: key[1] = 'o'; break; } + case PsOpStip: key[1] = 'o'; break; + default: break; } S_OutTok(self, key, 0); S_OutTok(self, "db/PatternType 1 d/PaintType 1 d", 0); S_OutTok(self, "/TilingType 1 d/BBox[0 0", 0); @@ -1637,7 +1637,8 @@ PsOut_SetPattern(PsOutPtr self, void *tag, PsFillEnum type) switch(type) { case PsTile: key[0] = 't'; break; case PsStip: key[0] = 's'; break; - case PsOpStip: key[0] = 'o'; break; } + case PsOpStip: key[0] = 'o'; break; + default: break; } S_OutTok(self, key, 0); S_OutTok(self, "spt", 1); self->CurColor = PSOUTCOLOR_NOCOLOR; @@ -1663,7 +1664,6 @@ typedef enum PsDownfontFontType_ int PsOut_DownloadType1(PsOutPtr self, const char *auditmsg, const char *name, const char *fname) { - int i; int stt; char buf[256]; FILE *fp; diff --git a/Xprint/ps/psout.h b/Xprint/ps/psout.h index 8441d8d07..d998e2a09 100644 --- a/Xprint/ps/psout.h +++ b/Xprint/ps/psout.h @@ -267,6 +267,7 @@ extern void S_OutTok(PsOutPtr self, char *tok, int cr); typedef struct PsOutRec_ *PsOutPtr; #endif /* USE_PSOUT_PRIVATE */ +extern FILE * PsOut_ChangeFile(PsOutPtr self, FILE *fp); extern PsOutPtr PsOut_BeginFile(FILE *fp, char *title, int orient, int count, int plex, int res, int wd, int ht, Bool raw); extern void PsOut_EndFile(PsOutPtr self, int closeFile);