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>.
This commit is contained in:
parent
ac18f8e308
commit
26aec10ada
|
@ -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);
|
||||
|
||||
|
|
|
@ -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 )
|
||||
{
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user