Index: xc/ChangeLog =================================================================== RCS file: /cvs/xorg/xc/ChangeLog,v retrieving revision 1.655 diff -u -2 -0 -r1.655 ChangeLog --- xc/ChangeLog 10 Jan 2005 12:20:33 -0000 1.655 +++ xc/ChangeLog 10 Jan 2005 14:10:25 -0000 @@ -1,20 +1,30 @@ +2005-01-10 Roland Mainz + * xc/programs/Xserver/Xprint/Util.c + * xc/programs/Xserver/Xprint/attributes.h + * xc/programs/Xserver/Xprint/ps/Ps.h + Bugzilla #2254 (https://bugs.freedesktop.org/show_bug.cgi?id=2254) + attachment #xxx (https://bugs.freedesktop.org/attachment.cgi?id=xxx): + Fix gcc4.0 build failure. + Patch by Egbert Eich and Roland Mainz + + 2005-01-10 Egbert Eich * programs/Xserver/hw/xfree86/os-support/linux/lnx_kbd.c: (SpecialKey): Make option 'DontVTSwitch' work again with kbd driver under Linux. The kbd driver now calls the OS layer to handle special keys. Possibly other special keys and other OSes need to be looked at also. (Helmut Fahrion). 2005-01-10 Alan Hourihane * xc/programs/Xserver/hw/xfree86/drivers/i810/i830_driver.c Revert some changes to TweakMemorySize 2005-01-09 Alexander Gottwald * xc/config/cf/mingw.cf: Adjust XVendorManNameString, XVendorContact, OSName and OSVendor Index: xc/programs/Xserver/Xprint/Util.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/Xprint/Util.c,v retrieving revision 1.2 diff -u -2 -0 -r1.2 Util.c --- xc/programs/Xserver/Xprint/Util.c 23 Apr 2004 18:57:32 -0000 1.2 +++ xc/programs/Xserver/Xprint/Util.c 10 Jan 2005 14:10:57 -0000 @@ -124,64 +124,40 @@ if(outFileName != (char *)NULL) { while((pKeyString = strstr(string, pOutFileString)) != (char *)NULL) { char *newString; newString = (char *)xalloc(strlen(string) + strlen(outFileName) + 1); strncpy(newString, string, pKeyString - string); newString[pKeyString - string] = '\0'; strcat(newString, outFileName); strcat(newString, pKeyString + strlen(pOutFileString)); xfree(string); string = newString; } } return string; } -/* - * ExecCommand takes two character pointers - the command to execute, - * and the "argv" style NULL-terminated vector of arguments for the command. - * We wait for the command to terminate before continuing to ensure that - * we don't delete the job file before the spooler has made a copy. - */ -void -ExecCommand( - char *pCommand, - char **argVector) -{ - pid_t childPid; - int status; - - if((childPid = fork()) == 0) - { - execv(pCommand, argVector); - } - else - { - (void) waitpid(childPid, &status, 0); - } - return; -} /* * TransferBytes reads numBytes of data from pSrcFile and writes them * to pDstFile. It returns the number of bytes actually transfered, * which will be numBytes if it's successful. Neither pSrcFile nor * pDstFile are rewound or their pointers otherwise modified prior to * beginning the transfer. */ int TransferBytes( FILE *pSrcFile, FILE *pDstFile, int numBytes) { char buf[10240]; #define BUF_SIZE (sizeof(buf)*sizeof(char)) int bytesWritten = 0; unsigned bytesToXfer; for(bytesToXfer = min(BUF_SIZE, (unsigned)numBytes); Index: xc/programs/Xserver/Xprint/attributes.h =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/Xprint/attributes.h,v retrieving revision 1.2 diff -u -2 -0 -r1.2 attributes.h --- xc/programs/Xserver/Xprint/attributes.h 23 Apr 2004 18:57:32 -0000 1.2 +++ xc/programs/Xserver/Xprint/attributes.h 10 Jan 2005 14:10:57 -0000 @@ -92,38 +92,36 @@ float *width, float *height); void XpGetMediumDimensions(XpContextPtr pContext, unsigned short *width, unsigned short *height); void XpGetReproductionArea(XpContextPtr pContext, xRectangle *pRect); void XpGetMaxWidthHeightRes(const char *printer_name, const XpValidatePoolsRec* vpr, float *width, float *height, int* resolution); /* Util.c */ char *ReplaceAnyString(char *string, char *target, char *replacement); char *ReplaceFileString(char *string, char *inFileName, char *outFileName); -void ExecCommand(char *pCommand, - char **argVector); int TransferBytes(FILE *pSrcFile, FILE *pDstFile, int numBytes); Bool CopyContentsAndDelete(FILE **ppSrcFile, char **pSrcFileName, FILE *pDstFile); int XpSendDocumentData(ClientPtr client, FILE *fp, int fileLen, int maxBufSize); int XpFinishDocData(ClientPtr client); Bool XpOpenTmpFile(char *mode, char **fname, FILE **stream); #endif /* _Xp_attributes_h */ Index: xc/programs/Xserver/Xprint/ps/Ps.h =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/Xprint/ps/Ps.h,v retrieving revision 1.5 diff -u -2 -0 -r1.5 Ps.h --- xc/programs/Xserver/Xprint/ps/Ps.h 25 Oct 2004 07:12:21 -0000 1.5 +++ xc/programs/Xserver/Xprint/ps/Ps.h 10 Jan 2005 14:10:58 -0000 @@ -333,67 +333,63 @@ int validGC; DisplayListPtr dispList; } PsPixmapPrivRec, *PsPixmapPrivPtr; /* * Macro functions */ #define SEND_PS(f,c) fwrite( c, sizeof( char ), strlen( c ), f ) #define MIN(a,b) (((a)<(b))?(a):(b)) #ifndef MAX #define MAX(a,b) (((a)>(b))?(a):(b)) #endif /* * Functions in PsInit.c */ extern Bool InitializePsDriver(int ndx, ScreenPtr pScreen, int argc, char **argv); -static Bool PsDestroyContext(XpContextPtr pCon); extern XpContextPtr PsGetContextFromWindow(WindowPtr win); /* * Functions in PsPrint.c */ extern int PsStartJob(XpContextPtr pCon, Bool sendClientData, ClientPtr client); extern int PsEndJob(XpContextPtr pCon, Bool cancel); extern int PsStartPage(XpContextPtr pCon, WindowPtr pWin); extern int PsEndPage(XpContextPtr pCon, WindowPtr pWin); extern int PsStartDoc(XpContextPtr pCon, XPDocumentType type); extern int PsEndDoc(XpContextPtr pCon, Bool cancel); extern int PsDocumentData(XpContextPtr pCon, DrawablePtr pDraw, char *pData, int len_data, char *pFmt, int len_fmt, char *pOpt, int len_opt, ClientPtr client); extern int PsGetDocumentData(XpContextPtr pCon, ClientPtr client, int maxBufferSize); /* * Functions in PsGC.c */ extern Bool PsCreateGC(GCPtr pGC); -static int PsGetDrawablePrivateStuff(DrawablePtr pDrawable, GC *gc, - unsigned long *valid, PsOutPtr *psOut, - ColormapPtr *cMap); extern PsContextPrivPtr PsGetPsContextPriv( DrawablePtr pDrawable ); extern int PsUpdateDrawableGC(GCPtr pGC, DrawablePtr pDrawable, PsOutPtr *psOut, ColormapPtr *cMap); extern void PsValidateGC(GCPtr pGC, unsigned long changes, DrawablePtr pDrawable); extern void PsChangeGC(GCPtr pGC, unsigned long changes); extern void PsCopyGC(GCPtr pGCSrc, unsigned long mask, GCPtr pGCDst); extern void PsDestroyGC(GCPtr pGC); extern void PsChangeClip(GCPtr pGC, int type, pointer pValue, int nrects); extern void PsDestroyClip(GCPtr pGC); extern void PsCopyClip(GCPtr pgcDst, GCPtr pgcSrc); extern GCPtr PsCreateAndCopyGC(DrawablePtr pDrawable, GCPtr pSrc); /* * Functions in PsMisc.c */ extern void PsQueryBestSize(int type, short *pwidth, short *pheight, ScreenPtr pScreen); extern Bool PsCloseScreen(int index, ScreenPtr pScreen);