Index: xc/ChangeLog =================================================================== RCS file: /cvs/xorg/xc/ChangeLog,v retrieving revision 1.830 diff -u -2 -0 -r1.830 ChangeLog --- xc/ChangeLog 23 Mar 2005 00:32:49 -0000 1.830 +++ xc/ChangeLog 23 Mar 2005 19:45:32 -0000 @@ -1,20 +1,37 @@ +2005-03-23 Roland Mainz + * xc/programs/Xserver/Imakefile + * xc/programs/Xserver/Xprint/DiPrint.h + * xc/programs/Xserver/Xprint/Imakefile + * xc/programs/Xserver/Xprint/Init.c + * xc/programs/Xserver/Xprint/ddxInit.c + * xc/programs/Xserver/dix/Imakefile + * xc/programs/Xserver/dix/main.c + * xc/programs/Xserver/dix/xpstubs.c + * xc/programs/Xserver/os/Imakefile + * xc/programs/Xserver/os/utils.c + bugzilla #2792 (https://bugs.freedesktop.org/show_bug.cgi?id=2792) + attachment #xxx (https://bugs.freedesktop.org/attachment.cgi?id=xxx) + Fix build bustage when |PrintOnlyServer| is set to |NO|. + Patch by Roland Mainz and Julien + Lafon . + 2005-03-22 Roland Mainz * xc/programs/Xserver/hw/vfb/InitOutput.c bugzilla #2789 (https://bugs.freedesktop.org/show_bug.cgi?id=2789) attachment #2187 (https://bugs.freedesktop.org/attachment.cgi?id=2187) Fix Xvfb to honor the "-dpi" option (instead of using a hardcoded value of 100DPI). 2005-03-22 Adam Jackson * programs/Xserver/hw/xfree86/xorg.conf.man: Bug #1821: Typo fix in xorg.conf man page (Jens Schweikhardt) Tue Mar 22 12:47:16 2005 Søren Sandmann * programs/Xserver/miext/damage/damage.c (damageCopyPlane): Only validate the source if it is a viewable window. Stops the cursor flickering when it is above an unviewable window. 2005-03-21 Alan Hourihane * programs/Xserver/hw/xfree86/drivers/i810/i830_memory.c Index: xc/programs/Xserver/Imakefile =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/Imakefile,v retrieving revision 1.29 diff -u -2 -0 -r1.29 Imakefile --- xc/programs/Xserver/Imakefile 5 Mar 2005 21:38:29 -0000 1.29 +++ xc/programs/Xserver/Imakefile 23 Mar 2005 19:45:47 -0000 @@ -821,48 +821,44 @@ SetUIDServerTarget(Xorg,$(XF86SERVERSUBDIRS),$(XF86SERVEROBJS) $(SERVERDEFFILE), \ $(XF86SERVERLIBS),$(XF86SERVERSYSLIBS)) #if DoLoadableServer ServerDriverSDKTarget(Xorg) #endif #ifndef ServerToInstall #define ServerToInstall Xorg #endif #endif /* XorgServer */ #if defined(XprtServer) && XprtServer XCOMM XCOMM Print Server XCOMM MFBSUBDIR = mfb CFB8SUBDIR = cfb CFB32SUBDIR = cfb32 MIDAMAGEDIR = miext/damage XPSUBDIRS = $(STDDIRS) $(MFBDIR) $(CFB8DIR) $(CFB32DIR) $(DEPDIRS) \ $(MIDAMAGEDIR) +XPOBJS = Xprint/ddxInit.o Xprint/dpmsstubs.o Xprint/miinitext.o #if PrintOnlyServer -#if BuildDPMS -XPDPMSSTUBOBJS = Xprint/dpmsstubs.o -#endif -XPOBJS = Xprint/ddxInit.o Xprint/miinitext.o $(XPDPMSSTUBOBJS) XPLIBS = PreFbLibs $(XPDDXLIBS) $(XPDDXFBLIBS) PostFbLibs #else -XPOBJS = Xprint/ddxInit.o XPLIBS = PreFbLibs PostFbLibs #endif #if (defined(SunArchitecture) || defined(SparcArchitecture)) && \ defined(SVR4Architecture) XPSYSLIBS = $(FONTLIBS) $(CBRT) $(SYSLIBS) -lw #else XPSYSLIBS = $(FONTLIBS) $(CBRT) $(SYSLIBS) #endif #if HasParallelMake MakeMutex($(XPSUBDIRS) $(XPOBJS) $(XPLIBS) $(XPSYSLIBS)) #endif #if ForceServerRemake $(XPOBJS) $(XPLIBS) $(XPSYSLIBS):: $(XPSUBDIRS) @if [ -f $@ ]; then touch $@ >/dev/null 2>&1 || exit 0; fi #endif ServerTarget(Xprt,$(XPSUBDIRS),$(XPOBJS), \ $(LIBCWRAPPER) $(XPLIBS) $(LOADABLEEXTS),$(XPSYSLIBS)) #endif /* XprtServer */ #if defined(XnestServer) && XnestServer Index: xc/programs/Xserver/Xprint/DiPrint.h =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/Xprint/DiPrint.h,v retrieving revision 1.2 diff -u -2 -0 -r1.2 DiPrint.h --- xc/programs/Xserver/Xprint/DiPrint.h 23 Apr 2004 18:57:32 -0000 1.2 +++ xc/programs/Xserver/Xprint/DiPrint.h 23 Mar 2005 19:45:47 -0000 @@ -45,29 +45,33 @@ typedef struct _diListEntry { char *name; char *description; char *localeName; unsigned long rootWinId; } XpDiListEntry; extern void XpDiFreePrinterList(XpDiListEntry **list); extern XpDiListEntry **XpDiGetPrinterList( int nameLen, char *name, int localeLen, char *locale); extern char * XpDiGetDriverName(int index, char *printerName); extern WindowPtr XpDiValidatePrinter(char *printerName, int printerNameLen); -extern int XprintOptions(int argc, char **argv, int i); +extern int PrinterOptions(int argc, char **argv, int i); + +extern void PrinterUseMsg(void); + +extern void PrinterInitGlobals(void); extern void PrinterInitOutput(ScreenInfo *pScreenInfo, int argc, char **argv); extern void _XpVoidNoop(void); extern Bool _XpBoolNoop(void); #endif /* _XpDiPrint_H_ */ Index: xc/programs/Xserver/Xprint/Imakefile =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/Xprint/Imakefile,v retrieving revision 1.5 diff -u -2 -0 -r1.5 Imakefile --- xc/programs/Xserver/Xprint/Imakefile 26 Nov 2004 09:00:08 -0000 1.5 +++ xc/programs/Xserver/Xprint/Imakefile 23 Mar 2005 19:45:47 -0000 @@ -13,52 +13,53 @@ #ifndef XpPostScriptDDX #define XpPostScriptDDX YES #endif SRCS1 = Init.c Quarks.c spooler.c attributes.c Util.c mediaSizes.c \ Oid.c AttrValid.c OBJS1 = Init.o Quarks.o spooler.o attributes.o Util.o mediaSizes.o \ Oid.o AttrValid.o #ifdef OS2Architecture SRCS_OS2 = os2_stubs.c OBJS_OS2 = os2_stubs.o #endif #if XprtServer #if PrintOnlyServer || defined(PrintServerExtensions) #if PrintOnlyServer PO_DEFINES = -DPRINT_ONLY_SERVER #endif +#endif #ifdef PrintServerExtensions XPEXT_DEFINES = PrintServerExtensions #else XPEXT_DEFINES = $(EXT_DEFINES) #endif -SRCS3 = miinitext.c dpmsstubs.c -OBJS3 = miinitext.o dpmsstubs.o -#endif SRCS2 = ddxInit.c OBJS2 = ddxInit.o #endif +SRCS3 = miinitext.c dpmsstubs.c +OBJS3 = miinitext.o dpmsstubs.o + SRCS = $(SRCS1) $(SRCS2) $(SRCS3) $(SRCS_OS2) OBJS = $(OBJS1) $(OBJS_OS2) #if XpRasterDDX RASTDIR = raster RASTDEF = -DXPRASTERDDX #endif #if XpColorPclDDX PCLDIR = pcl PCLDEF = -DXPPCLDDX #endif #if XpMonoPclDDX MPCLDIR = pcl-mono MPCLDEF = -DXPMONOPCLDDX #endif #if XpPostScriptDDX PSDIR = ps PSDEF = -DXPPSDDX #endif @@ -79,56 +80,54 @@ -I$(EXTINCSRC) -I$(FONTINCSRC) -I$(XLIBSRC) LINTLIBS = $(TOP)/server/dix/llib-ldix.ln $(TOP)/server/os/llib-los.ln \ $(TOP)/server/ddx/mfb/llib-lmfb.ln \ $(TOP)/server/ddx/mi/llib-lmi.ln \ $(TOP)/server/ddx/cfb/llib-lcfb.ln DEFINES = -DXPRINTDIR=\"$(XPRINTDIR)\" $(RASTDEF) $(PCLDEF) $(MPCLDEF) \ $(PSDEF) $(MKTMP_DEFINES) -UXFree86LOADER -D_XP_PRINT_SERVER_ /* Go ahead: Call me paranoid ... */ Makefiles:: RemoveFiles(Quark.c Xlcint.h Xresource.h Xrm.c XrmI.h) LinkSourceFile(Quarks.c,$(XLIBSRC)) NormalLibraryObjectRule() #if XprtServer -all:: $(OBJS2) $(OBJS3) $(OBJS_OS2) +all:: $(OBJS2) $(OBJS_OS2) $(OBJS3) #endif NormalLibraryTarget(printer,$(OBJS)) NormalLintTarget($(SRCS)) SpecialCObjectRule(ddxInit,$(ICONFIGFILES),$(PO_DEFINES) $(OS_DEFINES) $(EXT_DEFINES)) -#if XprtServer && (PrintOnlyServer || defined(PrintServerExtensions)) +#if XprtServer LinkSourceFile(miinitext.c,$(SERVERSRC)/mi) -SpecialCObjectRule(miinitext,$(ICONFIGFILES),$(PO_DEFINES) $(OS_DEFINES) $(XPEXT_DEFINES) -DXPRINT) -#if PrintOnlyServer +SpecialCObjectRule(miinitext,$(ICONFIGFILES), -DPRINT_ONLY_SERVER $(OS_DEFINES) $(XPEXT_DEFINES) -DXPRINT) LinkSourceFile(dpmsstubs.c,$(SERVERSRC)/Xext) LinkSourceFile(dpmsproc.h,$(SERVERSRC)/Xext) SpecialCObjectRule(dpmsstubs,$(ICONFIGFILES),$(PO_DEFINES) $(OS_DEFINES) $(XPEXT_DEFINES) -DXPRINT) #endif -#endif #ifdef OS2Architecture LinkSourceFile(os2_stubs.c,../hw/xfree86/os-support/os2) SpecialCObjectRule(os2_stubs,$(ICONFIGFILES),-DOS2NULLSELECT) #endif #ifdef IHaveSubdirs MakeSubdirs($(SUBDIRS)) DependSubdirs($(SUBDIRS)) MakeLintLibSubdirs($(SUBDIRS)) #endif DependTarget() InstallManPage(Xprt,$(MANDIR)) #ifdef HasDocBookTools all:: Xprt.man Xprt.html ConvertDocBookToManPage(Xprt.sgml, Xprt.man) Index: xc/programs/Xserver/Xprint/Init.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/Xprint/Init.c,v retrieving revision 1.9 diff -u -2 -0 -r1.9 Init.c --- xc/programs/Xserver/Xprint/Init.c 4 Dec 2004 00:42:50 -0000 1.9 +++ xc/programs/Xserver/Xprint/Init.c 23 Mar 2005 19:45:48 -0000 @@ -279,104 +279,116 @@ static const char configFilePath[] = "/etc/dt/config/print:/usr/dt/config/print"; static const char printServerConfigDir[] = "XPSERVERCONFIGDIR"; static int printScreenPrivIndex, printWindowPrivIndex, printGCPrivIndex; static unsigned long printGeneration = 0; static char *configFileName = (char *)NULL; static Bool freeDefaultFontPath = FALSE; static char *origFontPath = (char *)NULL; static Bool xprintInitGlobalsCalled = FALSE; /* * This function is responsible for doing initalisation of any global * variables at an very early point of server startup (even before * |ProcessCommandLine()|. */ -void XprintInitGlobals(void) +void PrinterInitGlobals(void) { extern char dispatchExceptionAtReset; /* defined in Xserver/dix/dispatch.c */ xprintInitGlobalsCalled = TRUE; +#ifdef DAMAGE + /* Disable DAMAGE extension for now as it does not work with + * the Postscript DDX yet (see + * https://bugs.freedesktop.org/show_bug.cgi?id=1660) ... + * (you can enable the DAMAGE extension explicitly via + * % X +extension DAMAGE ... #) ;-( */ + { + extern Bool noDamageExtension; + noDamageExtension = TRUE; + } +#endif /* DAMAGE */ + #ifdef SMART_SCHEDULE /* Somehow the XF86 "smart scheduler" completely kills the Xprint DDX * (see http://xprint.freedesktop.org/cgi-bin/bugzilla/show_bug.cgi?id=467 * ("Xfree86's "smart scheduler" breaks Xprt") */ SmartScheduleDisable = TRUE; #endif /* SMART_SCHEDULE */ /* Disable internal screensaver for Xprint (workaround for * http://pdx.freedesktop.org/cgi-bin/bugzilla/show_bug.cgi?id=567 ("Xorg * Xprt starts to consume 100% CPU when being idle for some time")) */ defaultScreenSaverTime = 0; /* Ensure that the maximum request size for the BIGREQUESTS extension * is at least 8MB (see * http://xprint.freedesktop.org/cgi-bin/bugzilla/show_bug.cgi?id=622 - "RFE: * Xprt's default BIGREQUESTS extension buffer size should be 8MB") */ maxBigRequestSize = (8*1048576)-1; /* Xprt should not reset by default when the last client exists * (default for Xprt is |0|, video Xservers use |DE_RESET|) */ dispatchExceptionAtReset = 0; } /* - * XprintUseMsg() prints usage for the Xprint-specific options + * PrinterUseMsg() prints usage for the Xprint-specific options */ -void XprintUseMsg() +void PrinterUseMsg(void) { XpSpoolerTypePtr curr = xpstm; /* Option '-XpFile' */ ErrorF("-XpFile file specifies an alternate `Xprinters' file, rather\n"); ErrorF(" than the default one (e.g.\n"); ErrorF(" `${XPCONFIGDIR}/${LANG}/print/Xprinters') or\n"); ErrorF(" `${XPCONFIGDIR}/C/print/Xprinters'.\n"); /* Option '-XpSpoolerType' */ ErrorF("-XpSpoolerType string specifies a spooler type.\n"); ErrorF(" Supported values are:\n"); while( curr->name != NULL ) { ErrorF(" - '%s'\n", curr->name); curr++; } ErrorF(" (multiple values can be specified, seperated by ':',\n"); ErrorF(" the first active spooler will be chosen).\n"); ErrorF(" default is '%s'.\n", XPDEFAULTSPOOLERNAMELIST); } /* - * XprintOptions checks argv[i] to see if it is our command line + * PrinterOptions checks argv[i] to see if it is our command line * option specifying a configuration file name. It returns the index * of the next option to process. */ int -XprintOptions( +PrinterOptions( int argc, char **argv, int i) { extern void ddxUseMsg(); if(strcmp(argv[i], "-XpFile") == 0) { if ((i + 1) >= argc) { ddxUseMsg (); return i + 2; } configFileName = argv[i + 1]; return i + 2; } else if(strcmp(argv[i], "-XpSpoolerType") == 0) { if ((i + 1) >= argc) { ddxUseMsg (); return i + 2; } @@ -1370,54 +1382,54 @@ * of the printer screen(s), as is the value of * pScreenInfo->numScreens. This is done via calls * to AddScreen() in dix. * ************************************************************/ void PrinterInitOutput( ScreenInfo *pScreenInfo, int argc, char **argv) { PrinterDbPtr pDb, pDbEntry; int driverCount = 0, i; char **driverNames; char *configDir; /* This should NEVER happen, but... */ if( !xprintInitGlobalsCalled ) { - FatalError("Internal error: XprintInitGlobals() not called."); + FatalError("Internal error: PrinterInitGlobals() not called."); } #ifdef SMART_SCHEDULE - /* |XprintInitGlobals| should have set |SmartScheduleDisable| to + /* |PrinterInitGlobals| should have set |SmartScheduleDisable| to * |TRUE| - if not we will trigger this safeguard. */ if( SmartScheduleDisable != TRUE ) { FatalError("Internal error: XF86 smart scheduler incompatible to Xprint DDX."); } #endif /* SMART_SCHEDULE */ /* Safeguard for * http://pdx.freedesktop.org/cgi-bin/bugzilla/show_bug.cgi?id=567 ("Xorg * Xprt starts to consume 100% CPU when being idle for some time") - * |XprintInitGlobals| should have set |defaultScreenSaverTime| to + * |PrinterInitGlobals| should have set |defaultScreenSaverTime| to * |0| - if not we will trigger this trap. */ if( defaultScreenSaverTime != 0 ) { FatalError("Internal screen saver must be OFF for printing."); } /* Print a warnung when the maximum request size of the BIGREQUESTS * extension is smaller than 8MB (see * http://xprint.freedesktop.org/cgi-bin/bugzilla/show_bug.cgi?id=622) */ if (maxBigRequestSize < (8*1048576)-1) { ErrorF("Xp Extension: BIGREQUESTS max. request is currently %ld bytes " ", recommemded minimum for Xprint is 8MB.\n", (long)maxBigRequestSize); } /* * this little test is just a warning at startup to make sure * that the config directory exists. * * what this ugly looking if says is that if both ways of Index: xc/programs/Xserver/Xprint/ddxInit.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/Xprint/ddxInit.c,v retrieving revision 1.4 diff -u -2 -0 -r1.4 ddxInit.c --- xc/programs/Xserver/Xprint/ddxInit.c 27 Jul 2004 20:26:47 -0000 1.4 +++ xc/programs/Xserver/Xprint/ddxInit.c 23 Mar 2005 19:45:49 -0000 @@ -64,43 +64,40 @@ * *----------------------------------------------------------------------- */ void InitOutput( ScreenInfo *pScreenInfo, int argc, char **argv) { int i; pScreenInfo->imageByteOrder = IMAGE_BYTE_ORDER; pScreenInfo->bitmapScanlineUnit = BITMAP_SCANLINE_UNIT; pScreenInfo->bitmapScanlinePad = BITMAP_SCANLINE_PAD; pScreenInfo->bitmapBitOrder = BITMAP_BIT_ORDER; pScreenInfo->numPixmapFormats = 0; /* get them in PrinterInitOutput */ screenInfo.numVideoScreens = 0; -#ifdef PRINT_ONLY_SERVER - PrinterInitOutput(pScreenInfo, argc, argv); -#endif } static void BellProc( int volume, DeviceIntPtr pDev) { return; } static void KeyControlProc( DeviceIntPtr pDev, KeybdCtrl *ctrl) { return; } static KeySym printKeyMap[256]; static CARD8 printModMap[256]; @@ -236,78 +233,69 @@ void ddxBeforeReset(void) { return; } #ifdef DDXTIME CARD32 GetTimeInMillis(void) { struct timeval tp; X_GETTIMEOFDAY(&tp); return(tp.tv_sec * 1000) + (tp.tv_usec / 1000); } #endif /* ddxInitGlobals - called by |InitGlobals| from os/util.c */ void ddxInitGlobals(void) { - XprintInitGlobals(); + PrinterInitGlobals(); } /**************************************** * ddxUseMsg() * * Called my usemsg from os/utils/c * *****************************************/ void ddxUseMsg(void) { -/* Enable |XprintUseMsg()| only if |XprintOptions()| is called - * by |ddxProcessArgument|, too (see below...) */ -#ifdef PRINT_ONLY_SERVER - XprintUseMsg(); -#endif /* PRINT_ONLY_SERVER */ } void AbortDDX (void) { } void ddxGiveUp(void) /* Called by GiveUp() */ { } int ddxProcessArgument ( int argc, char *argv[], int i) { -#ifdef PRINT_ONLY_SERVER - return XprintOptions(argc, argv, i) - i; -#else return(0); -#endif } #ifdef XINPUT #include "XI.h" #include "XIproto.h" #include "XIstubs.h" extern int BadDevice; int ChangePointerDevice ( DeviceIntPtr old_dev, DeviceIntPtr new_dev, unsigned char x, unsigned char y) { return (BadDevice); } Index: xc/programs/Xserver/dix/Imakefile =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/dix/Imakefile,v retrieving revision 1.4 diff -u -2 -0 -r1.4 Imakefile --- xc/programs/Xserver/dix/Imakefile 30 Oct 2004 01:41:45 -0000 1.4 +++ xc/programs/Xserver/dix/Imakefile 23 Mar 2005 19:45:49 -0000 @@ -10,41 +10,41 @@ #if PrintOnlyServer XPSRC = xpstubs.c XPOBJ = xpstubs.o #endif #if !HasFfs FFS_SRC = ffs.c FFS_OBJ = ffs.o #endif SRCS = atom.c colormap.c cursor.c devices.c dispatch.c dixutils.c events.c \ extension.c gc.c globals.c glyphcurs.c grabs.c \ main.c property.c resource.c swaprep.c swapreq.c \ tables.c window.c initatoms.c dixfonts.c privates.c pixmap.c $(FFS_SRC) OBJS = atom.o colormap.o cursor.o devices.o dispatch.o dixutils.o events.o \ extension.o gc.o globals.o glyphcurs.o grabs.o \ main.o property.o resource.o swaprep.o swapreq.o \ tables.o window.o initatoms.o dixfonts.o privates.o pixmap.o $(FFS_OBJ) INCLUDES = -I../include -I$(XINCLUDESRC) -I$(FONTINCSRC) -I$(EXTINCSRC) \ - -I$(SERVERSRC)/Xext -I$(SERVERSRC)/lbx + -I$(SERVERSRC)/Xext -I$(SERVERSRC)/lbx -I../Xprint LINTLIBS = ../os/llib-los.ln /* * The following configuration parameters may be set in the appropriate * .macros files or site.def in the directory util/imake.includes/: * * DefaultFontPath COMPILEDDEFAULTFONTPATH * DefaultRGBDatabase RGB_DB * * The sample util/imake.includes/Imake.tmpl will provide generic defaults. * The values in site.h are simply a last line of defense and should not be * changed. */ #ifdef DefaultFontPath DEFAULTFONTPATH = DefaultFontPath SITE_FONT_PATH = -DCOMPILEDDEFAULTFONTPATH=\"$(DEFAULTFONTPATH)\" #endif #ifdef DefaultRGBDatabase Index: xc/programs/Xserver/dix/main.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/dix/main.c,v retrieving revision 1.5 diff -u -2 -0 -r1.5 main.c --- xc/programs/Xserver/dix/main.c 7 Mar 2005 23:02:58 -0000 1.5 +++ xc/programs/Xserver/dix/main.c 23 Mar 2005 19:45:49 -0000 @@ -83,40 +83,41 @@ #include "X.h" #include "Xos.h" /* for unistd.h */ #include "Xproto.h" #include "scrnintstr.h" #include "misc.h" #include "os.h" #include "windowstr.h" #include "resource.h" #include "dixstruct.h" #include "gcstruct.h" #include "extension.h" #include "colormap.h" #include "colormapst.h" #include "cursorstr.h" #include "font.h" #include "opaque.h" #include "servermd.h" #include "site.h" #include "dixfont.h" #include "extnsionst.h" +#include "DiPrint.h" #ifdef PANORAMIX #include "panoramiXsrv.h" #else #include "dixevents.h" /* InitEvents() */ #include "dispatch.h" /* InitProcVectors() */ #endif #ifdef DPMSExtension #define DPMS_SERVER #include "dpms.h" #include "dpmsproc.h" #endif extern int InitClientPrivates(ClientPtr client); extern void Dispatch(void); char *ConnectionInfo; xConnSetupPrefix connSetupPrefix; @@ -231,40 +232,41 @@ ~0, ~0, ~0, ~0, ~0, ~0, ~0, ~0, ~0, ~0, ~0, ~0, 3 /* 64 bits per scanline pad unit */ }; #ifndef MIN #define MIN(a,b) (((a) < (b)) ? (a) : (b)) #endif int main(int argc, char *argv[], char *envp[]) { int i, j, k, error; char *xauthfile; HWEventQueueType alwaysCheckForInput[2]; display = "0"; InitGlobals(); + PrinterInitGlobals(); /* Quartz support on Mac OS X requires that the Cocoa event loop be in * the main thread. This allows the X server main to be called again * from another thread. */ #if defined(__DARWIN__) && defined(DARWIN_WITH_QUARTZ) DarwinHandleGUI(argc, argv, envp); #endif /* Notice if we're restarted. Probably this is because we jumped through * an uninitialized pointer */ if (restart) FatalError("server restarted. Jumped through uninitialized pointer?\n"); else restart = 1; CheckUserParameters(argc, argv, envp); CheckUserAuthorization(); #ifdef COMMANDLINE_CHALLENGED_OPERATING_SYSTEMS @@ -342,47 +344,46 @@ PixmapWidthPaddingInfo[1].padPixelsLog2 = answer[j][k]; j = indexForBitsPerPixel[8]; /* bits per byte */ PixmapWidthPaddingInfo[1].padBytesLog2 = answer[j][k]; PixmapWidthPaddingInfo[1].bitsPerPixel = 1; InitAtoms(); InitEvents(); InitGlyphCaching(); ResetClientPrivates(); ResetScreenPrivates(); ResetWindowPrivates(); ResetGCPrivates(); #ifdef PIXPRIV ResetPixmapPrivates(); #endif ResetColormapPrivates(); ResetFontPrivateIndex(); InitCallbackManager(); InitVisualWrap(); InitOutput(&screenInfo, argc, argv); + PrinterInitOutput(&screenInfo, argc, argv); + if (screenInfo.numScreens < 1) FatalError("no screens found"); if (screenInfo.numVideoScreens < 0) screenInfo.numVideoScreens = screenInfo.numScreens; -#ifdef XPRINT - PrinterInitOutput(&screenInfo, argc, argv); -#endif InitExtensions(argc, argv); if (!InitClientPrivates(serverClient)) FatalError("failed to allocate serverClient devprivates"); for (i = 0; i < screenInfo.numScreens; i++) { ScreenPtr pScreen = screenInfo.screens[i]; if (!CreateScratchPixmapsForScreen(i)) FatalError("failed to create scratch pixmaps"); if (pScreen->CreateScreenResources && !(*pScreen->CreateScreenResources)(pScreen)) FatalError("failed to create screen resources"); if (!CreateGCperDepth(i)) FatalError("failed to create scratch GCs"); if (!CreateDefaultStipple(i)) FatalError("failed to create default stipple"); if (!CreateRootWindow(pScreen)) FatalError("failed to create root window"); } InitInput(argc, argv); if (InitAndStartDevices() != Success) Index: xc/programs/Xserver/dix/xpstubs.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/dix/xpstubs.c,v retrieving revision 1.2 diff -u -2 -0 -r1.2 xpstubs.c --- xc/programs/Xserver/dix/xpstubs.c 23 Apr 2004 19:04:44 -0000 1.2 +++ xc/programs/Xserver/dix/xpstubs.c 23 Mar 2005 19:45:49 -0000 @@ -12,43 +12,59 @@ in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Except as contained in this notice, the name of The Open Group shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. */ /* $Xorg: xpstubs.c,v 1.5 2001/03/08 17:52:08 pookie Exp $ */ #include "misc.h" #include "font.h" +#include "DiPrint.h" Bool XpClientIsBitmapClient( ClientPtr client) { return TRUE; } Bool XpClientIsPrintClient( ClientPtr client, FontPathElementPtr fpe) { return FALSE; } int -XprintOptions( +PrinterOptions( int argc, char **argv, int i) { return i; } +void +PrinterInitOutput( + ScreenInfo *pScreenInfo, + int argc, + char **argv) +{ +} +void PrinterUseMsg(void) +{ +} +void PrinterInitGlobals(void) +{ +} + + Index: xc/programs/Xserver/os/Imakefile =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/os/Imakefile,v retrieving revision 1.7 diff -u -2 -0 -r1.7 Imakefile --- xc/programs/Xserver/os/Imakefile 3 Dec 2004 11:57:42 -0000 1.7 +++ xc/programs/Xserver/os/Imakefile 23 Mar 2005 19:45:52 -0000 @@ -114,41 +114,41 @@ MEM_DEFINES = -DMEMBUG #endif #if UseRgbTxt RGB_DEFINES = -DUSE_RGB_TXT #endif DBM_DEFINES = NdbmDefines ADM_DEFINES = -DADMPATH=\"$(ADMDIR)/X\%smsgs\" XDMCP_DEFINES = ServerXdmcpDefines KRB5_DEFINES = Krb5Defines XALLOC_DEFINES = XallocDefines ERROR_DEFINES = ServerErrorDefines #if HasPam && HasPamMisc PAM_DEFINES = -DUSE_PAM #endif DEFINES = -DXSERV_t -DTRANS_SERVER $(CONNECTION_FLAGS) $(MEM_DEFINES) \ $(XDMAUTHDEFS) $(RPCDEFS) $(SIGNAL_DEFINES) $(OS_DEFINES) \ $(KRB5_DEFINES) $(RGB_DEFINES) $(GETPEER_DEFINES) \ $(RANDOM_DEFINES) $(BUGMSG) $(XTRANS_FAILDEFINES) INCLUDES = -I. -I../include -I$(XINCLUDESRC) -I$(EXTINCSRC) \ -I$(SERVERSRC)/Xext -I$(FONTINCSRC) -I$(SERVERSRC)/render \ - -I$(TOP)/lib/Xau -I../lbx Krb5Includes + -I$(TOP)/lib/Xau -I../lbx -I../Xprint Krb5Includes DEPEND_DEFINES = $(DBM_DEFINES) $(XDMCP_DEFINES) $(EXT_DEFINES) \ $(TRANS_INCLUDES) $(CONNECTION_FLAGS) $(GETPEER_DEFINES) \ DependDefines LINTLIBS = ../dix/llib-ldix.ln #ifdef NEED_ALLOCA_FROM_LIBPW PWLIB = /lib/libPW.a #endif /* NEED_ALLOCA_FROM_LIBPW */ NormalLibraryObjectRule() NormalLibraryTarget(os,$(OBJS)) LintLibraryTarget(os,$(SRCS)) NormalLintTarget($(SRCS)) #ifdef NEED_ALLOCA_FROM_LIBPW XCOMM XCOMM And this one is to get the version of alloca that lives in /lib/libPW.a XCOMM without getting all of the rest of the stuff in there. XCOMM alloca.o: $(PWLIB) Index: xc/programs/Xserver/os/utils.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/os/utils.c,v retrieving revision 1.11 diff -u -2 -0 -r1.11 utils.c --- xc/programs/Xserver/os/utils.c 25 Nov 2004 12:48:21 -0000 1.11 +++ xc/programs/Xserver/os/utils.c 23 Mar 2005 19:45:53 -0000 @@ -106,40 +106,42 @@ #endif #include "opaque.h" #ifdef SMART_SCHEDULE #include "dixstruct.h" #endif #ifdef XKB #include "XKBsrv.h" #endif #ifdef XCSECURITY #define _SECURITY_SERVER #include "security.h" #endif #ifdef RENDER #include "picture.h" #endif +#include "DiPrint.h" + Bool noTestExtensions; #ifdef BEZIER Bool noBezierExtension = FALSE; #endif #ifdef BIGREQS Bool noBigReqExtension = FALSE; #endif #ifdef COMPOSITE /* COMPOSITE is disabled by default for now until the * interface is stable */ Bool noCompositeExtension = TRUE; #endif #ifdef DAMAGE Bool noDamageExtension = FALSE; #endif #ifdef DBE Bool noDbeExtension = FALSE; #endif #ifdef DPSEXT Bool noDPSExtension = FALSE; @@ -636,40 +638,41 @@ #endif #ifndef NOLOGOHACK ErrorF("-logo enable logo in screen saver\n"); ErrorF("nologo disable logo in screen saver\n"); #endif ErrorF("-nolisten string don't listen on protocol\n"); ErrorF("-noreset don't reset after last client exists\n"); ErrorF("-reset reset after last client exists\n"); ErrorF("-p # screen-saver pattern duration (minutes)\n"); ErrorF("-pn accept failure to listen on all ports\n"); ErrorF("-nopn reject failure to listen on all ports\n"); ErrorF("-r turns off auto-repeat\n"); ErrorF("r turns on auto-repeat \n"); #ifdef RENDER ErrorF("-render [default|mono|gray|color] set render color alloc policy\n"); #endif ErrorF("-s # screen-saver timeout (minutes)\n"); #ifdef XCSECURITY ErrorF("-sp file security policy file\n"); #endif + PrinterUseMsg(); ErrorF("-su disable any save under support\n"); ErrorF("-t # mouse threshold (pixels)\n"); ErrorF("-terminate terminate at server reset\n"); ErrorF("-to # connection time out\n"); ErrorF("-tst disable testing extensions\n"); ErrorF("ttyxx server started from init on /dev/ttyxx\n"); ErrorF("v video blanking for screen-saver\n"); ErrorF("-v screen-saver without video blanking\n"); ErrorF("-wm WhenMapped default backing-store\n"); ErrorF("-x string loads named extension at init time \n"); ErrorF("-maxbigreqsize set maximal bigrequest size \n"); #ifdef PANORAMIX ErrorF("+xinerama Enable XINERAMA extension\n"); ErrorF("-xinerama Disable XINERAMA extension\n"); #endif #ifdef SMART_SCHEDULE ErrorF("-dumbSched Disable smart scheduling, enable old behavior\n"); ErrorF("-schedInterval int Set scheduler interval in msec\n"); #endif ErrorF("+extension name Enable extension\n"); @@ -1042,41 +1045,41 @@ * to do when we see a -x. Either the extension is linked in or * it isn't */ } else if ( strcmp( argv[i], "-I") == 0) { /* ignore all remaining arguments */ break; } else if (strncmp (argv[i], "tty", 3) == 0) { /* just in case any body is interested */ dev_tty_from_init = argv[i]; } #ifdef XDMCP else if ((skip = XdmcpOptions(argc, argv, i)) != i) { i = skip - 1; } #endif #ifdef XPRINT - else if ((skip = XprintOptions(argc, argv, i)) != i) + else if ((skip = PrinterOptions(argc, argv, i)) != i) { i = skip - 1; } #endif #ifdef XCSECURITY else if ((skip = XSecurityOptions(argc, argv, i)) != i) { i = skip - 1; } #endif #ifdef AIXV3 else if ( strcmp( argv[i], "-timeout") == 0) { if(++i < argc) SelectWaitTime = atoi(argv[i]); else UseMsg(); } else if ( strcmp( argv[i], "-sync") == 0) {