summaryrefslogtreecommitdiff
path: root/Xprint
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 /Xprint
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>.
Diffstat (limited to 'Xprint')
-rw-r--r--Xprint/DiPrint.h6
-rw-r--r--Xprint/Init.c28
-rw-r--r--Xprint/ddxInit.c14
3 files changed, 26 insertions, 22 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