summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoland Mainz <roland.mainz@nrubsig.org>2005-03-23 19:58:45 +0000
committerRoland Mainz <roland.mainz@nrubsig.org>2005-03-23 19:58:45 +0000
commit26aec10adad51deb35a8398abb884d90be077a6b (patch)
treeb5864964b1193e604f56598e73b6a5fcec94915f
parentac18f8e308221af368fd4153b4eee7b89f8dd4bc (diff)
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 //bugs.freedesktop.org/show_bug.cgi?id=2792) attachment #2193 (https://bugs.freedesktop.org/attachment.cgi?id=2193) Fix build bustage when |PrintOnlyServer| is set to |NO|. Patch by Roland Mainz <roland.mainz@nrubsig.org> and Julien Lafon <julien.lafon@gmail.com>.
-rw-r--r--Xprint/DiPrint.h6
-rw-r--r--Xprint/Init.c28
-rw-r--r--Xprint/ddxInit.c14
-rw-r--r--dix/main.c9
-rw-r--r--dix/xpstubs.c18
-rw-r--r--os/utils.c7
6 files changed, 53 insertions, 29 deletions
diff --git a/Xprint/DiPrint.h b/Xprint/DiPrint.h
index 0b781f2fc..c1a8dcb45 100644
--- a/Xprint/DiPrint.h
+++ b/Xprint/DiPrint.h
@@ -62,7 +62,11 @@ 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);
diff --git a/Xprint/Init.c b/Xprint/Init.c
index 6e84d0346..e9cd8a208 100644
--- a/Xprint/Init.c
+++ b/Xprint/Init.c
@@ -296,12 +296,24 @@ static Bool xprintInitGlobalsCalled = FALSE;
* 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
@@ -327,9 +339,9 @@ void XprintInitGlobals(void)
}
/*
- * XprintUseMsg() prints usage for the Xprint-specific options
+ * PrinterUseMsg() prints usage for the Xprint-specific options
*/
-void XprintUseMsg()
+void PrinterUseMsg(void)
{
XpSpoolerTypePtr curr = xpstm;
@@ -354,12 +366,12 @@ void XprintUseMsg()
}
/*
- * 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)
@@ -1387,10 +1399,10 @@ PrinterInitOutput(
/* 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 )
{
@@ -1400,7 +1412,7 @@ PrinterInitOutput(
/* 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 )
{
diff --git a/Xprint/ddxInit.c b/Xprint/ddxInit.c
index 54f9b611a..6214c4ae5 100644
--- a/Xprint/ddxInit.c
+++ b/Xprint/ddxInit.c
@@ -81,9 +81,6 @@ InitOutput(
pScreenInfo->numPixmapFormats = 0; /* get them in PrinterInitOutput */
screenInfo.numVideoScreens = 0;
-#ifdef PRINT_ONLY_SERVER
- PrinterInitOutput(pScreenInfo, argc, argv);
-#endif
}
static void
@@ -253,7 +250,7 @@ GetTimeInMillis(void)
/* ddxInitGlobals - called by |InitGlobals| from os/util.c */
void ddxInitGlobals(void)
{
- XprintInitGlobals();
+ PrinterInitGlobals();
}
/****************************************
@@ -265,11 +262,6 @@ void ddxInitGlobals(void)
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)
@@ -286,11 +278,7 @@ ddxProcessArgument (
char *argv[],
int i)
{
-#ifdef PRINT_ONLY_SERVER
- return XprintOptions(argc, argv, i) - i;
-#else
return(0);
-#endif
}
#ifdef XINPUT
diff --git a/dix/main.c b/dix/main.c
index 5614c5dbb..504602ead 100644
--- a/dix/main.c
+++ b/dix/main.c
@@ -1,4 +1,4 @@
-/* $XdotOrg: xc/programs/Xserver/dix/main.c,v 1.4 2004/09/18 23:18:35 gisburn Exp $ */
+/* $XdotOrg: xc/programs/Xserver/dix/main.c,v 1.5 2005/03/07 23:02:58 gisburn Exp $ */
/* $XFree86: xc/programs/Xserver/dix/main.c,v 3.43 2003/10/30 21:21:02 herrb Exp $ */
/***********************************************************
@@ -100,6 +100,7 @@ Equipment Corporation.
#include "site.h"
#include "dixfont.h"
#include "extnsionst.h"
+#include "DiPrint.h"
#ifdef PANORAMIX
#include "panoramiXsrv.h"
#else
@@ -248,6 +249,7 @@ main(int argc, char *argv[], char *envp[])
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
@@ -359,13 +361,12 @@ main(int argc, char *argv[], char *envp[])
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");
diff --git a/dix/xpstubs.c b/dix/xpstubs.c
index dac3205fb..d04be0969 100644
--- a/dix/xpstubs.c
+++ b/dix/xpstubs.c
@@ -29,6 +29,7 @@ from The Open Group.
#include "misc.h"
#include "font.h"
+#include "DiPrint.h"
Bool
XpClientIsBitmapClient(
@@ -45,10 +46,25 @@ XpClientIsPrintClient(
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)
+{
+}
+
+
diff --git a/os/utils.c b/os/utils.c
index 8c69cb355..b7ef37ee5 100644
--- a/os/utils.c
+++ b/os/utils.c
@@ -1,4 +1,4 @@
-/* $XdotOrg: xc/programs/Xserver/os/utils.c,v 1.10 2004/11/15 15:06:50 ago Exp $ */
+/* $XdotOrg: xc/programs/Xserver/os/utils.c,v 1.11 2004/11/25 12:48:21 ago Exp $ */
/* $Xorg: utils.c,v 1.5 2001/02/09 02:05:24 xorgcvs Exp $ */
/*
@@ -123,6 +123,8 @@ OR PERFORMANCE OF THIS SOFTWARE.
#include "picture.h"
#endif
+#include "DiPrint.h"
+
Bool noTestExtensions;
#ifdef BEZIER
Bool noBezierExtension = FALSE;
@@ -653,6 +655,7 @@ void UseMsg(void)
#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");
@@ -1059,7 +1062,7 @@ ProcessCommandLine(int argc, char *argv[])
}
#endif
#ifdef XPRINT
- else if ((skip = XprintOptions(argc, argv, i)) != i)
+ else if ((skip = PrinterOptions(argc, argv, i)) != i)
{
i = skip - 1;
}