aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xdebian/rules3
-rw-r--r--nx-X11/config/cf/README12
-rw-r--r--nx-X11/config/cf/X11.tmpl105
-rw-r--r--nx-X11/config/cf/host.def105
-rw-r--r--nx-X11/config/cf/xf86site.def30
-rw-r--r--nx-X11/config/cf/xfree86.cf17
-rw-r--r--nx-X11/config/cf/xorg.cf14
-rw-r--r--nx-X11/config/cf/xorgsite.def30
-rw-r--r--nx-X11/include/extensions/Imakefile6
-rw-r--r--nx-X11/include/extensions/Print.h552
-rw-r--r--nx-X11/include/extensions/Printstr.h783
-rw-r--r--nx-X11/include/extensions/dmxext.h190
-rw-r--r--nx-X11/include/extensions/dmxproto.h446
-rw-r--r--nx-X11/lib/Imakefile6
-rw-r--r--nx-X11/lib/X11/Imakefile2
-rw-r--r--nx-X11/programs/Imakefile146
-rw-r--r--nx-X11/programs/Xserver/Imakefile590
-rw-r--r--nx-X11/programs/Xserver/Xext/Imakefile16
-rw-r--r--nx-X11/programs/Xserver/Xext/dmx.c1133
-rw-r--r--nx-X11/programs/Xserver/Xext/xprint.c2760
-rw-r--r--nx-X11/programs/Xserver/dix/Imakefile6
-rw-r--r--nx-X11/programs/Xserver/dix/main.c9
-rw-r--r--nx-X11/programs/Xserver/dix/xpstubs.c27
-rw-r--r--nx-X11/programs/Xserver/hw/Imakefile26
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Imakefile3
-rw-r--r--nx-X11/programs/Xserver/mi/miinitext.c45
-rw-r--r--nx-X11/programs/Xserver/os/Imakefile2
-rw-r--r--nx-X11/programs/Xserver/os/utils.c13
-rw-r--r--nx-libs.spec4
29 files changed, 23 insertions, 7058 deletions
diff --git a/debian/rules b/debian/rules
index 2375b46ac..445f015cf 100755
--- a/debian/rules
+++ b/debian/rules
@@ -48,7 +48,6 @@ override_dh_install:
rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx/X11/extensions/XK*.h
rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx/X11/extensions/*Xv*.h
rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx/X11/extensions/xtrap*.h
- rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx/X11/extensions/Print*.h
rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx/X11/extensions/XRes*.h
rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx/X11/extensions/record*.h
rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx/X11/extensions/xf86vmode.h
@@ -59,8 +58,6 @@ override_dh_install:
rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx/X11/extensions/xf86dga.h
rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx/X11/extensions/xf86dga1str.h
rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx/X11/extensions/xf86mscstr.h
- rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx/X11/extensions/dmxext.h
- rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx/X11/extensions/dmxproto.h
rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx/X11/extensions/bigreqstr.h
rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx/X11/extensions/xcmiscstr.h
rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx/X11/extensions/XIproto.h
diff --git a/nx-X11/config/cf/README b/nx-X11/config/cf/README
index c4c5f59ab..a31490377 100644
--- a/nx-X11/config/cf/README
+++ b/nx-X11/config/cf/README
@@ -178,7 +178,6 @@ X11.tmpl provides defaults for the following variables:
BuildDBE build DOUBLE-BUFFER extension
BuildDmx build Distributed Multihead X server and extension
BuildDPMS build Display Power Management Signaling extension
- BuildFontServer build font server
BuildFonts build pcf fonts
BuildIncRoot relative path to location of headers in build
BuildIncTop path from build includes directory to top
@@ -325,14 +324,6 @@ X11.tmpl provides defaults for the following variables:
XdmDir directory in which to install xdm files
XdmServersType type of xdm Xservers file to install
XinitDir directory in which to install xinit files
- XPrintDir parent of X Print server config directory
- XprtServer build the X Print server
- XpRasterDDX include the raster print ddx driver
- XpColorPclDDX include the color PCL print ddx driver
- XpMonoPclDDX include the monochrome PCL print ddx driver
- XpPostScriptDDX include the PostScript print ddx driver
- XpPdfDDX include the PDF print ddx driver
- XpSvgDDX include the SVG print ddx driver
XmanLocalSearchPath non-standard path for man pages
XtErrorPrefix leading text in XtError() msg; eg. 'X Toolkit '
XtWarningPrefix leading text in XtWarning()msg, same as above
@@ -461,13 +452,10 @@ The following variables are used by some part of the tree:
SvgaConfig default SVGA configuration
HasGetReturnAddress util/memleak
HasShadowPasswd system has getspnam() function
- XnestServer build X server with Xlib-based ddx
- XVirtualFramebufferServer build X server with virtual memory framebuffer
WebServer host:port of your Web server (see programs/xrx)
HtmlDir path used by Web server for HTML and RX docs
CgiBinDir path used by Web server for CGI programs
ProxyManager ICE network ID to contact a running proxymngr
- XdmxServer build Distributed Multihead X server
Make Variables
diff --git a/nx-X11/config/cf/X11.tmpl b/nx-X11/config/cf/X11.tmpl
index 4600f1824..b6ff72e1f 100644
--- a/nx-X11/config/cf/X11.tmpl
+++ b/nx-X11/config/cf/X11.tmpl
@@ -138,25 +138,12 @@ XORGRELSTRING = XorgManVersionString
#ifndef BuildDocs
#define BuildDocs !BuildServersOnly
#endif
-#ifndef BuildDmx
-#define BuildDmx NO
-#endif
-#ifndef XdmxServer
-#define XdmxServer BuildDmx
-#endif
-#ifndef BuildLibrariesForDmx
-#define BuildLibrariesForDmx XdmxServer
-#endif
#ifndef BuildLibraries
-#define BuildLibraries (!BuildServersOnly || BuildClients || \
- BuildLibrariesForDmx)
+#define BuildLibraries (!BuildServersOnly || BuildClients)
#endif
#ifndef BuildLibrariesForXServers
#define BuildLibrariesForXServers BuildServer
#endif
-#ifndef BuildFontServer
-#define BuildFontServer YES
-#endif
#ifndef XserverStaticFontLib
#define XserverStaticFontLib YES
#endif
@@ -176,7 +163,7 @@ XORGRELSTRING = XorgManVersionString
#define BuildBuiltinFonts NO
#endif
#ifndef BuildFonts
-#define BuildFonts (BuildServer | BuildFontServer)
+#define BuildFonts BuildServer
#endif
#ifndef Build75DpiFonts
#define Build75DpiFonts YES
@@ -362,8 +349,7 @@ XORGRELSTRING = XorgManVersionString
#define BuildXInputExt NO
#endif
#ifndef BuildXInputLib
-#define BuildXInputLib (BuildXInputExt && \
- (!BuildServersOnly || BuildLibrariesForDmx))
+#define BuildXInputLib (BuildXInputExt && !BuildServersOnly)
#endif
#ifndef BuildEVI
#define BuildEVI YES
@@ -384,10 +370,7 @@ XORGRELSTRING = XorgManVersionString
#if (!defined(XF86Server) || !XF86Server) && (!defined (XorgServer) || !XorgServer)
#define BuildFontLib (BuildLibraries || BuildServer)
#else
-#define BuildFontLib (BuildLibraries || \
- (BuildServer && !DoLoadableServer) || \
- XnestServer || XVirtualFramebufferServer || \
- XprtServer || XdmxServer)
+#define BuildFontLib (BuildLibraries || (BuildServer && !DoLoadableServer))
#endif
#endif
#ifndef BuildFontCache
@@ -420,7 +403,6 @@ XORGRELSTRING = XorgManVersionString
#endif
#ifndef BuildXKBlib
#define BuildXKBlib (BuildXKB && (!BuildServersOnly || \
- XnestServer || XdmxServer || \
BuildXkbcomp ))
#endif
#ifndef BuildXKBuilib
@@ -460,13 +442,6 @@ XORGRELSTRING = XorgManVersionString
#ifndef BuildXineramaLibrary
#define BuildXineramaLibrary (BuildXinerama)
#endif
-#ifndef BuildDmxDevelTools
-#define BuildDmxDevelTools NO
-#endif
-#ifndef BuildDmxLibrary
-#define BuildDmxLibrary (BuildDmx && \
- (!BuildServersOnly || BuildDmxDevelTools))
-#endif
#ifndef BuildXCSecurity
#define BuildXCSecurity YES
#endif
@@ -507,19 +482,6 @@ XORGRELSTRING = XorgManVersionString
#define XpSvgDDX YES
#endif
-#ifndef BuildXprint
-#define BuildXprint YES
-#endif
-#ifndef XprtServer
-#define XprtServer (BuildServer && BuildXprint)
-#endif
-#ifndef BuildXprintLib
-#define BuildXprintLib (!BuildServersOnly && BuildXprint)
-#endif
-#ifndef BuildXprintClients
-#define BuildXprintClients BuildXprintLib
-#endif
-
#ifndef BuildScreenSaverExt
#define BuildScreenSaverExt NO
#endif
@@ -551,8 +513,7 @@ XORGRELSTRING = XorgManVersionString
#define BuildXResExt NO
#endif
#ifndef BuildXResLibrary
-#define BuildXResLibrary (BuildXResExt && \
- (!BuildServersOnly || BuildDmxDevelTools))
+#define BuildXResLibrary (BuildXResExt && !BuildServersOnly)
#endif
#ifndef BuildXvExt
#define BuildXvExt NO
@@ -617,7 +578,7 @@ XORGRELSTRING = XorgManVersionString
#define BuildRender YES
#endif
#ifndef BuildRenderLibrary
-#define BuildRenderLibrary (XdmxServer || !BuildServersOnly)
+#define BuildRenderLibrary !BuildServersOnly
#endif
#ifndef BuildXftLibrary
#define BuildXftLibrary BuildRenderLibrary
@@ -1000,17 +961,6 @@ FCHOWN_DEFINES = -DHAS_FCHOWN
#ifndef PrintOnlyServer
#define PrintOnlyServer YES
#endif
-#ifndef XprintDefines
-#if BuildXprint
-#if PrintOnlyServer
-#define XprintDefines -DXPRINT -DPIXPRIV
-#else
-#define XprintDefines -DXPRINT -DLOADABLEPRINTDDX -DPIXPRIV
-#endif
-#else
-#define XprintDefines /**/
-#endif
-#endif
#ifndef XkbDefines
#if BuildXKB
#define XkbDefines -DXKB
@@ -1243,7 +1193,7 @@ FCHOWN_DEFINES = -DHAS_FCHOWN
ShapeDefines XInputDefines XkbDefines LbxDefines AppgroupDefines \
XCSecurityDefines CupDefines PervasiveDBEDefines \
XF86BigfontExtensionDefines DPMSDefines \
- XprintDefines XineramaDefines \
+ XineramaDefines \
SitePervasiveExtensionDefines RenderDefines RandRDefines \
XfixesDefines XDamageDefines CompositeDefines XevieDefines \
RootlessDefines
@@ -1544,9 +1494,6 @@ FCHOWN_DEFINES = -DHAS_FCHOWN
#ifndef ServerConfigDir
#define ServerConfigDir $(LIBDIR)/xserver
#endif
-#ifndef XPrintDir
-#define XPrintDir ServerConfigDir
-#endif
#ifndef EtcX11Directory
#define EtcX11Directory /etc/X11
#endif
@@ -1679,7 +1626,6 @@ XCOMM X Window System make variables; these need to be coordinated with rules
XLOCALEDIR = XLocaleDir /* locale files */
LBXPROXYDIR = LbxproxyDir /* lbxproxy files */
PROXYMANAGERDIR = ProxyManagerDir /* proxy manager config files */
- XPRINTDIR = XPrintDir /* print config file root */
XAPPLOADDIR = XAppLoadDir /* application default resource dir */
FONTCFLAGS = FontCompilerFlags
@@ -1739,7 +1685,6 @@ XCOMM X Window System make variables; these need to be coordinated with rules
RGBSRC = $(XTOP)/programs/rgb
BDFTOPCFSRC = $(PROGRAMSRC)/bdftopcf
MKFONTDIRSRC = $(PROGRAMSRC)/mkfontdir
- FONTSERVERSRC = $(PROGRAMSRC)/xfs
FONTINCSRC = $(XTOP)/include/fonts
EXTINCSRC = $(XTOP)/include/extensions
FTSOURCEDIR = FreeTypeSrcDir
@@ -2517,30 +2462,6 @@ SharedLibReferences(XXF86DGA,NX_Xxf86dga,$(XXF86DGALIBSRC),SOXXF86DGAREV,SharedX
ProjectUnsharedLibReferences(XXF86DGA,NX_Xxf86dga,$(XXF86DGALIBSRC),XBuildLibDir)
#endif
-#if BuildDmxLibrary
-#ifndef SharedLibDmx
-#define SharedLibDmx NO
-#endif
-#ifndef NormalLibDmx
-#define NormalLibDmx YES
-#endif
-#ifndef DebugLibDmx
-#define DebugLibDmx NO
-#endif
-#ifndef ProfileLibDmx
-#define ProfileLibDmx NO
-#endif
-#else /* BuildDmxLibrary */
-#undef SharedLibDmx
-#define SharedLibDmx NO
-#undef NormalLibDmx
-#define NormalLibDmx NO
-#undef DebugLibDmx
-#define DebugLibDmx NO
-#undef ProfileLibDmx
-#define ProfileLibDmx NO
-#endif /* BuildDmxLibrary */
-
XXF86RUSHLIBSRC = $(LIBSRC)/Xxf86rush
#if SharedLibXxf86rush
#ifndef SharedXxf86rushRev
@@ -2593,16 +2514,6 @@ SharedLibReferences(XRES,NX_XRes,$(XRESLIBSRC),SOXRESREV,SharedXResRev)
ProjectUnsharedLibReferences(XRES,NX_XRes,$(XRESLIBSRC),XBuildLibDir)
#endif
- DMXLIBSRC = $(LIBSRC)/dmx
-#if SharedLibDmx
-#ifndef SharedDmxRev
-#define SharedDmxRev 1.0
-#endif
-SharedLibReferences(DMX,NX_dmx,$(DMXLIBSRC),SODMXREV,SharedDmxRev)
-#else
-ProjectUnsharedLibReferences(DMX,NX_dmx,$(DMXLIBSRC),XBuildLibDir)
-#endif
-
DPSLIBSRC = $(LIBSRC)/dps
#if SharedLibDps
#ifndef SharedDpsRev
@@ -2964,7 +2875,7 @@ UnsharedLibReferences(XA,NX_Xa,$(XALIBSRC))
#endif
#ifndef BuildXaw
-#define BuildXaw (BuildXprintLib && !BuildServersOnly)
+#define BuildXaw !BuildServersOnly
#endif
/* AWIDGETSRC is needed by libXaw6 and libXaw7 */
diff --git a/nx-X11/config/cf/host.def b/nx-X11/config/cf/host.def
index 9b482c620..a7ae46431 100644
--- a/nx-X11/config/cf/host.def
+++ b/nx-X11/config/cf/host.def
@@ -46,8 +46,6 @@ XCOMM $XFree86: xc/config/cf/xf86site.def,v 3.186 2003/06/25 18:06:22 eich Exp $
/* */
/**************************************************************************/
-#if !defined(NXZaurusXServer) && !defined(NXiPAQXServer) && !defined(DarwinArchitecture)
-
#if defined(SunArchitecture)
#define ProjectRoot /usr/openwin
#endif
@@ -76,42 +74,6 @@ XCOMM $XFree86: xc/config/cf/xf86site.def,v 3.186 2003/06/25 18:06:22 eich Exp $
#define XorgServer NO
/*
- * To disable building the Xnest server, uncomment this.
- *
-#define XnestServer NO
- */
-#define XnestServer NO
-
-/*
- * To disable building Xvfb, uncomment this.
- *
-#define XVirtualFramebufferServer NO
- */
-#define XVirtualFramebufferServer NO
-
-/*
- * To enable building Xdmx, uncomment this.
- *
-#define XdmxServer YES
- */
-#define XdmxServer NO
-
-/*
- * To disable building Xprt, uncomment this.
- *
-#define XprtServer NO
- */
-#define XprtServer NO
-
-/*
- * Xprint is needed by Xprt. You can disable it if
- * you are not going to build Xprt.
- *
-#define BuildXprint NO
- */
-#define BuildXprint NO
-
-/*
* Building libraries with NX enhancements is disabled
* by default. You should enable this in your host.def.
*
@@ -149,7 +111,6 @@ XCOMM $XFree86: xc/config/cf/xf86site.def,v 3.186 2003/06/25 18:06:22 eich Exp $
*/
#if defined(cygwinArchitecture)
#define NXWinServer NO
-#define XWinServer NO
#endif
/*
@@ -168,7 +129,7 @@ XCOMM $XFree86: xc/config/cf/xf86site.def,v 3.186 2003/06/25 18:06:22 eich Exp $
*
#define BuildLibrariesForXServers YES
*/
-#if XnestServer || NXAgentServer
+#if NXAgentServer
#define BuildLibraries YES
#endif
@@ -287,13 +248,6 @@ XCOMM $XFree86: xc/config/cf/xf86site.def,v 3.186 2003/06/25 18:06:22 eich Exp $
*/
/*
- * To disable building the font server, uncomment this.
- *
-#define BuildFontServer NO
- */
-#define BuildFontServer NO
-
-/*
* Speedo fonts have been disabled by default in this release.
* To re-enable support for Speedo fonts, uncomment this.
*
@@ -964,63 +918,6 @@ XCOMM $XFree86: xc/config/cf/xf86site.def,v 3.186 2003/06/25 18:06:22 eich Exp $
#define BuildXaw7 NO
-#else /* #if !defined(NXZaurusXServer) && !defined(NXiPAQXServer) && !defined(DarwinArchitecture) */
-
-#if defined(DarwinArchitecture) && !defined(NXZaurusXServer) && !defined(NXiPAQXServer)
-#define NXDarwinServer NO
-#define BuildServersOnly YES
-#define DefaultFontPath /usr/NX/share/fonts/misc/,/usr/NX/share/fonts/TTF/
-#define DefaultRGBDatabase /usr/NX/share/rgb
-#define XprtServer NO
-#define BuildXprint NO
-#define XnestServer NO
-#define XVirtualFramebufferServer NO
-#define BuildFontServer NO
-#define BuildFreeType NO
-#define BuildXTrueType NO
-#define FontLibSharedFreeType YES
-#endif
-
-#if !defined(NXZaurusXServer) && defined(NXiPAQXServer)
-#define KDriveXServer YES
-#define XiPAQH3500Server YES
-#define BuildServersOnly YES
-#define NXEmbeddedXServer YES
-#define KdriveServerExtraDefines -DITSY -DMAXSCREENS=1
-#define TinyXServer YES
-#define CrossCompiling YES
-#define TouchScreen YES
-#define ItsyCompilerBug YES
-#undef BuildRandR
-#define BuildRandR YES
-#define BuildXInputLib YES
-#define BuildXTrueType YES
-#define ServerXdmcpDefines
-#define XipaqServer YES
-#endif
-
-#if !defined(NXiPAQXServer) && defined(NXZaurusXServer)
-#define KDriveXServer YES
-#define XiPAQH3500Server YES
-#define BuildServersOnly YES
-#define ZaurusXServer YES
-#define NXEmbeddedXServer YES
-#define KdriveServerExtraDefines -DITSY -DMAXSCREENS=1
-#define TinyXServer YES
-#define CrossCompiling YES
-#define TouchScreen YES
-#define ItsyCompilerBug YES
-#undef BuildRandR
-#define BuildRandR YES
-#define BuildXInputLib YES
-#define BuildXTrueType YES
-#define ServerXdmcpDefines
-#define XipaqServer YES
-#define XfbdevServer YES
-#endif
-
-#endif /* #if !defined(NXZaurusXServer) && !defined(NXiPAQXServer) && !defined(DarwinArchitecture) */
-
#define BuildRman NO
#define BuildFontEncLib NO
#define BuildXcursorLibrary NO
diff --git a/nx-X11/config/cf/xf86site.def b/nx-X11/config/cf/xf86site.def
index d445c1c72..39d8980b6 100644
--- a/nx-X11/config/cf/xf86site.def
+++ b/nx-X11/config/cf/xf86site.def
@@ -45,30 +45,6 @@ XCOMM $XFree86: xc/config/cf/xf86site.def,v 3.186 2003/06/25 18:06:22 eich Exp $
*/
/*
- * To disable building the Xnest server, uncomment this.
- *
-#define XnestServer NO
- */
-
-/*
- * To disable building Xvfb, uncomment this.
- *
-#define XVirtualFramebufferServer NO
- */
-
-/*
- * To enable building Xdmx, uncomment this.
- *
-#define XdmxServer YES
- */
-
-/*
- * To disable building Xprt, uncomment this.
- *
-#define XprtServer NO
- */
-
-/*
* Set the default server (ie the one that gets the sym-link to "X")
*
#define ServerToInstall XFree86
@@ -163,12 +139,6 @@ XCOMM $XFree86: xc/config/cf/xf86site.def,v 3.186 2003/06/25 18:06:22 eich Exp $
*/
/*
- * To disable building the font server, uncomment this.
- *
-#define BuildFontServer NO
- */
-
-/*
* To disable support for Speedo fonts, uncomment this.
*
#define BuildSpeedo NO
diff --git a/nx-X11/config/cf/xfree86.cf b/nx-X11/config/cf/xfree86.cf
index f7c151c41..0348c0302 100644
--- a/nx-X11/config/cf/xfree86.cf
+++ b/nx-X11/config/cf/xfree86.cf
@@ -1684,13 +1684,6 @@ IPLAN2P8_DEFS = -DUSE_IPLAN2P8
#endif
/*
- * Build the font server
- */
-#ifndef BuildFontServer
-# define BuildFontServer YES
-#endif
-
-/*
* Include fonts support
*/
#ifndef BuildSpeedo
@@ -1876,16 +1869,6 @@ IPLAN2P8_DEFS = -DUSE_IPLAN2P8
# define UseServerLock YES
#endif
-#ifndef XnestServer
-# define XnestServer YES
-#endif
-#ifndef XVirtualFramebufferServer
-# define XVirtualFramebufferServer YES
-#endif
-#ifndef XprtServer
-# define XprtServer YES
-#endif
-
#ifndef ServerExtraDefines
# define ServerExtraDefines XFree86ServerDefines
#endif
diff --git a/nx-X11/config/cf/xorg.cf b/nx-X11/config/cf/xorg.cf
index 71dab5631..3f922359e 100644
--- a/nx-X11/config/cf/xorg.cf
+++ b/nx-X11/config/cf/xorg.cf
@@ -1248,13 +1248,6 @@ IPLAN2P8_DEFS = -DUSE_IPLAN2P8
#endif
/*
- * Build the font server
- */
-#ifndef BuildFontServer
-# define BuildFontServer YES
-#endif
-
-/*
* Include fonts support
*/
#ifndef BuildSpeedo
@@ -1441,13 +1434,6 @@ IPLAN2P8_DEFS = -DUSE_IPLAN2P8
# define UseServerLock YES
#endif
-#ifndef XnestServer
-# define XnestServer YES
-#endif
-#ifndef XVirtualFramebufferServer
-# define XVirtualFramebufferServer YES
-#endif
-
#ifndef ServerExtraDefines
# define ServerExtraDefines XFree86ServerDefines
#endif
diff --git a/nx-X11/config/cf/xorgsite.def b/nx-X11/config/cf/xorgsite.def
index dea5ceb92..eeaffa496 100644
--- a/nx-X11/config/cf/xorgsite.def
+++ b/nx-X11/config/cf/xorgsite.def
@@ -45,30 +45,6 @@ XCOMM $XFree86: xc/config/cf/xf86site.def,v 3.186 2003/06/25 18:06:22 eich Exp $
*/
/*
- * To disable building the Xnest server, uncomment this.
- *
-#define XnestServer NO
- */
-
-/*
- * To disable building Xvfb, uncomment this.
- *
-#define XVirtualFramebufferServer NO
- */
-
-/*
- * To enable building Xdmx, uncomment this.
- *
-#define XdmxServer YES
- */
-
-/*
- * To disable building Xprt, uncomment this.
- *
-#define XprtServer NO
- */
-
-/*
* Set the default server (ie the one that gets the sym-link to "X")
*
#define ServerToInstall Xorg
@@ -177,12 +153,6 @@ XCOMM $XFree86: xc/config/cf/xf86site.def,v 3.186 2003/06/25 18:06:22 eich Exp $
*/
/*
- * To disable building the font server, uncomment this.
- *
-#define BuildFontServer NO
- */
-
-/*
* Speedo fonts have been disabled by default in this release.
* To re-enable support for Speedo fonts, uncomment this.
*
diff --git a/nx-X11/include/extensions/Imakefile b/nx-X11/include/extensions/Imakefile
index 65c78adcf..63b9365dc 100644
--- a/nx-X11/include/extensions/Imakefile
+++ b/nx-X11/include/extensions/Imakefile
@@ -64,9 +64,6 @@ XRESHEADERS = XRes.h XResproto.h
#if BuildXevie || BuildXevieLibrary
XEVIEHEADERS = Xevie.h Xeviestr.h
#endif
-#if BuildDmx || BuildDmxLibrary
-XDMXHEADERS = dmxext.h dmxproto.h
-#endif
EXTRAHEADERS = $(SCREENSAVERHEADERS) $(XF86MISCHEADERS) $(XF86BIGFONTHEADERS) \
$(XF86VIDMODEHEADERS) $(XF86DGAHEADERS) $(XINERAMAHEADERS) \
@@ -74,7 +71,7 @@ EXTRAHEADERS = $(SCREENSAVERHEADERS) $(XF86MISCHEADERS) $(XF86BIGFONTHEADERS) \
$(FONTCACHEHEADERS) $(RENDERHEADERS) $(RANDRHEADERS) \
$(XFIXESHEADERS) $(DAMAGEHEADERS) $(COMPOSITEHEADERS) \
$(XEVIEHEADERS) \
- $(XTRAPHEADERS) $(XRESHEADERS) $(XDMXHEADERS)
+ $(XTRAPHEADERS) $(XRESHEADERS)
@@ -95,7 +92,6 @@ HEADERS = Xext.h \
security.h securstr.h \
shape.h shapestr.h \
sync.h syncstr.h \
- Print.h Printstr.h \
Xcup.h Xcupstr.h \
dpms.h dpmsstr.h \
XEVI.h XEVIstr.h
diff --git a/nx-X11/include/extensions/Print.h b/nx-X11/include/extensions/Print.h
deleted file mode 100644
index 2d45082c5..000000000
--- a/nx-X11/include/extensions/Print.h
+++ /dev/null
@@ -1,552 +0,0 @@
-/* $Xorg: Print.h,v 1.3 2000/08/18 04:05:44 coskrey Exp $ */
-/******************************************************************************
- ******************************************************************************
- **
- ** File: Print.h
- **
- ** Description: Definitions needed by the server, library, and
- ** clients. Subportion restricted to library and
- ** clients.
- **
- ** Server, Library, Client portion has:
- ** o All sz_* defines
- ** o Revision and Name defines
- ** o Common defines and constants (e.g. Keywords, Masks)
- ** o Extension version structure
- **
- ** Library and client subportion has:
- ** o Convience Marcos
- ** o Client side data structures
- ** o Client side event structures (non wire)
- ** o Library function prototypes
- ** o some private stuff denoted with _whatever
- **
- ** Printstr.h for server and library, but NOT clients.
- **
- ******************************************************************************
- **
- ** (c) Copyright 1996 Hewlett-Packard Company
- ** (c) Copyright 1996 International Business Machines Corp.
- ** (c) Copyright 1996 Sun Microsystems, Inc.
- ** (c) Copyright 1996 Novell, Inc.
- ** (c) Copyright 1996 Digital Equipment Corp.
- ** (c) Copyright 1996 Fujitsu Limited
- ** (c) Copyright 1996 Hitachi, Ltd.
- **
- ** Permission is hereby granted, free of charge, to any person obtaining a copy
- ** of this software and associated documentation files (the "Software"), to deal
- ** in the Software without restriction, including without limitation the rights
- ** to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- ** copies of the Software, and to permit persons to whom the Software is
- ** furnished to do so, subject to the following conditions:
- **
- ** The above copyright notice and this permission notice shall be included 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
- ** COPYRIGHT HOLDERS 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 names of the copyright holders shall
- ** not be used in advertising or otherwise to promote the sale, use or other
- ** dealings in this Software without prior written authorization from said
- ** copyright holders.
- **
- ******************************************************************************
- *****************************************************************************/
-/* $XFree86: xc/include/extensions/Print.h,v 1.4 2000/01/25 18:37:31 dawes Exp $ */
-
-#ifndef _XpPrint_H_
-#define _XpPrint_H_
-
-#ifndef _XP_PRINT_SERVER_
-#include <X11/Xlib.h>
-#include <X11/Xresource.h>
-#include <X11/Xauth.h>
-#endif /* _XP_PRINT_SERVER_ */
-
-#include <X11/Xfuncproto.h>
-
-_XFUNCPROTOBEGIN
-
-/******************************************************************************
- *
- * Definitions used by the server, library and client.
- */
-
-/********************************************************************
- *
- * Naming and versioning information.
- */
-#define XP_PRINTNAME "XpExtension"
-
-/*
- * Add a define below for each major extension release.
- */
-#define XP_DONT_CHECK 0
-#define XP_INITIAL_RELEASE 1
-
-/*
- * For each single entry above, create one major/minor pair.
- */
-#define XP_PROTO_MAJOR 1
-#define XP_PROTO_MINOR 0
-
-/*
- * Identify current version.
- */
-#define XP_MAJOR_VERSION XP_PROTO_MAJOR
-#define XP_MINOR_VERSION XP_PROTO_MINOR
-
-/*
- * Misc version defines.
- */
-#define XP_ABSENT 0 /* Prior to XP Print support */
-#define XP_PRESENT 1 /* With XP Print support */
-
-/********************************************************************
- *
- * Xp Print Error codes.
- */
-#define XP_ERRORS 3 /* number of error types */
-
-#define XPBadContext 0 /* Print Context invalid or missing */
-#define XPBadSequence 1 /* Illegal sequence of XP operations */
-#define XPBadResourceID 2 /* X-resource not valid */
-
-/********************************************************************
- *
- * Xp Print Event masks and codes.
- *
- */
-#define XP_EVENTS 2 /* number of event types */
-
-#define XPNoEventMask 0 /* not an event - just a null mask */
-#define XPPrintMask (1L<<0)
-#define XPAttributeMask (1L<<1)
-
-#define XPPrintNotify 0 /* contains "detail" - see below */
-#define XPAttributeNotify 1 /* contains "detail" - see below */
-
-#define XPStartJobNotify 0 /* value for "detail" in XPPrintNotify*/
-#define XPEndJobNotify 1
-#define XPStartDocNotify 2
-#define XPEndDocNotify 3
-#define XPStartPageNotify 4
-#define XPEndPageNotify 5
-
-/********************************************************************
- *
- * Xp Print Attribute Object codes (subset of ISO DPA 10175). The
- * Xp Server can get and set any of the values, while the Xp Library
- * may only be able to set a subset of the attribute objects.
- *
- * note: the codes are also used as "detail" for XPAttributeNotify
- *
- * note: XPPageAttr is not defined in ISO DPA 10175. It is unique
- * to Xp, and its attributes are a proper subset of XPDocAttr.
- */
-typedef unsigned char XPAttributes; /* type of Xp*Attr codes */
-
-#define XP_ATTRIBUTES 5 /* those attrs currently supported */
-
-#define XPJobAttr 1 /* get/set */
-#define XPDocAttr 2 /* get/set */
-#define XPPageAttr 3 /* get/set - subset of XPDocAttr */
-#define XPPrinterAttr 4 /* get only (library) */
-#define XPServerAttr 5 /* get only (library), no
- context needed */
-
-/*
- * note: ISO DPA 10175 defines a number of "attribute objects", of
- * which POSIX 1387.4 and the SI Xp will only support a
- * subset.
- */
-#define XPMediumAttr 6 /* DPA-Object Medium */
-#define XPFontAttr 7 /* DPA-Object Font */
-#define XPResAttr 8 /* DPA-Object Resource */
-#define XPTransAttr 9 /* DPA-Object Transfer method */
-#define XPDelAttr 10 /* DPA-Object Delivery method */
-#define XPAuxSPkg 11 /* DPA-Object Auxiliary sheet package */
-#define XPAuxS 12 /* DPA-Object Auxiliary sheet */
-#define XPFinishAttr 13 /* DPA-Object Finishing */
-#define XPOutputAttr 14 /* DPA-Object Output method */
-#define XPImpAttr 15 /* DPA-Object Imposition */
-#define XPSchedAttr 16 /* DPA-Object Scheduler */
-#define XPIntJobAttr 17 /* DPA-Object Initial value job */
-#define XPIntDocAttr 18 /* DPA-Object Initial value document */
-#define XPResConAttr 19 /* DPA-Object Resource context */
-
-
-/*
- * Replacement rules for XpSetAttributes
- */
-typedef unsigned char XPAttrReplacement;
-#define XPAttrReplace 1
-#define XPAttrMerge 2
-
-
-/*
- * Return codes for XpGetDocumentData
- */
-typedef unsigned char XPGetDocStatus;
-#define XPGetDocFinished 0 /* normal termination */
-#define XPGetDocSecondConsumer 1 /* setup error */
-#define XPGetDocError 2 /* runtime error, see generated error */
-
-
-/*
- * Save data types for XpStartJob.
- */
-typedef unsigned char XPSaveData;
-#define XPSpool 1 /* Job data sent to spooler */
-#define XPGetData 2 /* Job data via XpGetDocumentData */
-
-
-/*
- * Document types for XpStartDoc.
- */
-typedef unsigned char XPDocumentType;
-#define XPDocNormal 1 /* Doc data handled by Xserver */
-#define XPDocRaw 2 /* Doc data passed through Xserver */
-
-
-/********************************************************************
- *
- * Xp Print Property Names
- */
-
-
-#ifndef _XP_PRINT_SERVER_
-
-/******************************************************************************
- *
- * Definitions used by the library and clients only.
- */
-
-/*******************************************************************
- *
- * General API defines and such.
- */
-
-/*
- * Print Context for XpInitContext and related calls.
- */
-typedef XID XPContext;
-
-/*
- * Struct for XpGetPrinterList.
- */
-typedef struct {
- char *name; /* name */
- char *desc; /* localized description */
-} XPPrinterRec, *XPPrinterList;
-
-/*
- * Typedefs for XpGetDocumentData
- */
-typedef void (*XPSaveProc)( Display *display,
- XPContext context,
- unsigned char *data,
- unsigned int data_len,
- XPointer client_data);
-
-typedef void (*XPFinishProc)( Display *display,
- XPContext context,
- XPGetDocStatus status,
- XPointer client_data);
-
-/*
- * Typedefs for XpSetLocaleHinter and XpGetLocaleHinter
- */
-typedef char * (*XPHinterProc)(void);
-
-#if 0
-/*******************************************************************
- *
- * Extension version structures.
- *
- **** this structure is now defined localy in the one file that uses it
- **** in order to avoid clashes with its definition in XI.h
- */
-typedef struct {
- int present;
- short major_version;
- short minor_version;
-} XExtensionVersion;
-#endif
-
-/********************************************************************
- *
- * Event structs for clients.
- *
- * note: these events are relative to a print context, and
- * not to a window as in core X.
- */
-typedef struct {
- int type; /* base + XPPrintNotify */
- unsigned long serial; /* # of last request processed by server */
- Bool send_event; /* true if from a SendEvent request */
- Display *display; /* Display the event was read from */
- XPContext context; /* print context where operation was requested */
- Bool cancel; /* was detailed event canceled */
- int detail; /* XPStartJobNotify, XPEndJobNotify,
- XPStartDocNotify, XPEndDocNotify,
- XPStartPageNotify, XPEndPageNotify */
-} XPPrintEvent;
-
-typedef struct {
- int type; /* base + XPAttributeNotify */
- unsigned long serial; /* # of last request processed by server */
- Bool send_event; /* true if from a SendEvent request */
- Display *display; /* Display the event was read from */
- XPContext context; /* print context where operation was requested */
- int detail; /* XPJobAttr, XPDocAttr, XPPageAttr,
- XPPrinterAttr, XPSpoolerAttr,
- XPMediumAttr, XPServerAttr */
-} XPAttributeEvent;
-
-typedef struct {
- int type; /* base + XPDataReadyNotify */
- unsigned long serial; /* # of last request processed by server */
- Bool send_event; /* true if from a SendEvent request */
- Display *display; /* Display the event was read from */
- XPContext context; /* print context where operation was requested */
- unsigned long available; /* bytes available for retrieval */
-} XPDataReadyEvent;
-
-
-/**********************************************************
- *
- * Function prototypes for library side.
- */
-
-extern XPContext XpCreateContext (
- Display *display,
- char *printer_name
-);
-
-extern void XpSetContext (
- Display *display,
- XPContext print_context
-);
-
-extern XPContext XpGetContext (
- Display *display
-);
-
-extern void XpDestroyContext (
- Display *display,
- XPContext print_context
-);
-
-extern Screen *XpGetScreenOfContext (
- Display *display,
- XPContext print_context
-);
-
-extern Status XpGetPageDimensions (
- Display *display,
- XPContext print_context,
- unsigned short *width, /* return value */
- unsigned short *height, /* return value */
- XRectangle *reproducible_area /* return value */
-);
-
-extern void XpStartJob (
- Display *display,
- XPSaveData save_data
-);
-
-extern void XpEndJob (
- Display *display
-);
-
-extern void XpCancelJob (
- Display *display,
- Bool discard
-);
-
-extern void XpStartDoc (
- Display *display,
- XPDocumentType type
-);
-
-extern void XpEndDoc (
- Display *display
-);
-
-extern void XpCancelDoc (
- Display *display,
- Bool discard
-);
-
-extern void XpPutDocumentData (
- Display *display,
- Drawable drawable,
- unsigned char *data,
- int data_len,
- char *doc_fmt,
- char *options
-);
-
-extern Status XpGetDocumentData (
- Display *display,
- XPContext context,
- XPSaveProc save_proc,
- XPFinishProc finish_proc,
- XPointer client_data
-);
-
-extern void XpStartPage (
- Display *display,
- Window window
-);
-
-extern void XpEndPage (
- Display *display
-);
-
-extern void XpCancelPage (
- Display *display,
- Bool discard
-);
-
-extern void XpSelectInput (
- Display *display,
- XPContext print_context,
- unsigned long event_mask
-);
-
-extern unsigned long XpInputSelected (
- Display *display,
- XPContext print_context,
- unsigned long *all_events_mask
-);
-
-extern Bool XpSetImageResolution (
- Display *display,
- XPContext print_context,
- int image_res,
- int *prev_res
-);
-
-extern int XpGetImageResolution (
- Display *display,
- XPContext print_context
-);
-
-extern char *XpGetAttributes (
- Display *display,
- XPContext print_context,
- XPAttributes type
-);
-
-extern void XpSetAttributes (
- Display *display,
- XPContext print_context,
- XPAttributes type,
- char *pool,
- XPAttrReplacement replacement_rule
-);
-
-extern char *XpGetOneAttribute (
- Display *display,
- XPContext print_context,
- XPAttributes type,
- char *attribute_name
-);
-
-extern XPPrinterList XpGetPrinterList (
- Display *display,
- char *printer_name,
- int *list_count /* return value */
-);
-
-extern void XpFreePrinterList (
- XPPrinterList printer_list
-);
-
-extern void XpRehashPrinterList (
- Display *display
-);
-
-extern Status XpQueryVersion (
- Display *display,
- short *major_version, /* return value */
- short *minor_version /* return value */
-);
-
-extern Bool XpQueryExtension (
- Display *display,
- int *event_base_return, /* return value */
- int *error_base_return /* return value */
-);
-
-extern Screen **XpQueryScreens (
- Display *display,
- int *list_count /* return value */
-);
-
-extern Status XpGetPdmStartParams (
- Display *print_display,
- Window print_window,
- XPContext print_context,
- Display *video_display,
- Window video_window,
- Display **selection_display, /* return value */
- Atom *selection, /* return value */
- Atom *type, /* return value */
- int *format, /* return value */
- unsigned char **data, /* return value */
- int *nelements /* return value */
-);
-
-extern Status XpGetAuthParams (
- Display *print_display,
- Display *video_display,
- Display **selection_display, /* return value */
- Atom *selection, /* return value */
- Atom *target /* return value */
-);
-
-extern Status XpSendAuth (
- Display *display,
- Window window
-);
-
-extern Status XpSendOneTicket (
- Display *display,
- Window window,
- Xauth *ticket,
- Bool more
-);
-
-extern void XpSetLocaleHinter (
- XPHinterProc hinter_proc,
- char *hinter_desc
-);
-
-extern char *XpGetLocaleHinter (
- XPHinterProc *hinter_proc
-);
-
-extern char *XpGetLocaleNetString(void);
-
-extern char *XpNotifyPdm (
- Display *print_display,
- Window print_window,
- XPContext print_context,
- Display *video_display,
- Window video_window,
- Bool auth_flag
-);
-
-#endif /* _XP_PRINT_SERVER_ */
-
-_XFUNCPROTOEND
-
-#endif /* _XpPrint_H_ */
diff --git a/nx-X11/include/extensions/Printstr.h b/nx-X11/include/extensions/Printstr.h
deleted file mode 100644
index 45ac7a596..000000000
--- a/nx-X11/include/extensions/Printstr.h
+++ /dev/null
@@ -1,783 +0,0 @@
-/* $Xorg: Printstr.h,v 1.3 2000/08/18 04:05:44 coskrey Exp $ */
-/******************************************************************************
- ******************************************************************************
- **
- ** File: Printstr.h
- **
- ** Description: Definitions needed by the server and library, but
- ** not clients.
- **
- ** Print.h for server, library and clients.
- **
- ******************************************************************************
- **
- ** (c) Copyright 1996 Hewlett-Packard Company
- ** (c) Copyright 1996 International Business Machines Corp.
- ** (c) Copyright 1996 Sun Microsystems, Inc.
- ** (c) Copyright 1996 Novell, Inc.
- ** (c) Copyright 1996 Digital Equipment Corp.
- ** (c) Copyright 1996 Fujitsu Limited
- ** (c) Copyright 1996 Hitachi, Ltd.
- **
- ** Permission is hereby granted, free of charge, to any person obtaining a copy
- ** of this software and associated documentation files (the "Software"), to deal
- ** in the Software without restriction, including without limitation the rights
- ** to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- ** copies of the Software, and to permit persons to whom the Software is
- ** furnished to do so, subject to the following conditions:
- **
- ** The above copyright notice and this permission notice shall be included 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
- ** COPYRIGHT HOLDERS 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 names of the copyright holders shall
- ** not be used in advertising or otherwise to promote the sale, use or other
- ** dealings in this Software without prior written authorization from said
- ** copyright holders.
- **
- ******************************************************************************
- *****************************************************************************/
-/* $XFree86: xc/include/extensions/Printstr.h,v 1.5 2001/08/01 00:44:35 tsi Exp $ */
-
-
-#ifndef _XpPrintstr_H_
-#define _XpPrintstr_H_
-
-/*
- * NEED_EVENTS and NEED_REPLIES are hacks to limit the linker symbol-table
- * size. When function prototypes are needed from Print.h, this sets up
- * a cascading dependency on Printstr.h and eventually Xproto.h to provide
- * the event and reply struct definitions.
- */
-#ifndef NEED_EVENTS
-#define NEED_EVENTS
-#endif /* NEED_EVENTS */
-
-#define NEED_REPLIES
-
-#include <X11/Xproto.h>
-#ifndef _XP_PRINT_SERVER_
-#include <X11/Xlib.h>
-#endif /* _XP_PRINT_SERVER_ */
-
-/*
- * Pull in other definitions. Print.h will hide some things if we're
- * doing server side work.
- */
-#include <X11/extensions/Print.h>
-
-#include <X11/Xfuncproto.h>
-
-_XFUNCPROTOBEGIN
-
-/******************************************************************************
- *
- * Protocol requests constants and alignment values
- *
- * Note: Xlib macro's expect X_ABC where ABC is the name of the
- * protocol request.
- */
-#define X_PrintQueryVersion 0
-#define X_PrintGetPrinterList 1
-#define X_PrintCreateContext 2
-#define X_PrintSetContext 3
-#define X_PrintGetContext 4
-#define X_PrintDestroyContext 5
-#define X_PrintGetContextScreen 6
-#define X_PrintStartJob 7
-#define X_PrintEndJob 8
-#define X_PrintStartDoc 9
-#define X_PrintEndDoc 10
-#define X_PrintPutDocumentData 11
-#define X_PrintGetDocumentData 12
-#define X_PrintStartPage 13
-#define X_PrintEndPage 14
-#define X_PrintSelectInput 15
-#define X_PrintInputSelected 16
-#define X_PrintGetAttributes 17
-#define X_PrintSetAttributes 18
-#define X_PrintGetOneAttribute 19
-#define X_PrintRehashPrinterList 20
-#define X_PrintGetPageDimensions 21
-#define X_PrintQueryScreens 22
-#define X_PrintSetImageResolution 23
-#define X_PrintGetImageResolution 24
-
-/********************************************************************
- *
- * Protocol data types
- */
-#define PCONTEXT CARD32
-#define WINDOW CARD32
-#define DRAWABLE CARD32
-#define BITMASK CARD32
-
-/******************************************************************************
- *
- * Event wire struct definitions
- *
- * Note: Xlib macro's expect xABC struct names and sz_xABC size
- * constants where ABC is the name of the protocol request.
- */
-
-
-/*********************************************************************
- *
- * Events.
- *
- * See Print.h for the protocol "type" values.
- */
-typedef struct _xPrintPrintEvent {
- BYTE type; /* XPPrintNotify + extEntry->eventBase */
- BYTE detail; /* XPStartJobNotify, XPEndJobNotify,
- XPStartDocNotify, XPEndDocNotify,
- XPStartPageNotify, XPEndPageNotify */
- CARD16 sequenceNumber B16;
- PCONTEXT printContext B32; /* print context */
- BOOL cancel; /* canceled flag */
- CARD8 pad1; /* rest is unused */
- CARD16 pad2 B16;
- CARD32 pad3 B32;
- CARD32 pad4 B32;
- CARD32 pad5 B32;
- CARD32 pad6 B32;
- CARD32 pad7 B32;
-} xPrintPrintEvent;
-#define sz_xPrintPrintEvent 32;
-
-typedef struct _xPrintAttributeEvent {
- BYTE type; /* XPAttributeNotify + extEntry->eventBase */
- BYTE detail; /* XPJobAttr, XPDocAttr, XPPageAttr,
- XPPrinterAttr, XPSpoolerAttr,
- XPMediumAttr, XPServerAttr */
- CARD16 sequenceNumber B16;
- PCONTEXT printContext B32; /* print context */
- CARD32 pad1 B32;
- CARD32 pad2 B32;
- CARD32 pad3 B32;
- CARD32 pad4 B32;
- CARD32 pad5 B32;
- CARD32 pad6 B32;
-} xPrintAttributeEvent;
-#define sz_xPrintAttributeEvent 32;
-
-
-/*********************************************************************
- *
- * Requests
- */
-typedef struct _PrintQueryVersion {
- CARD8 reqType; /* always PrintReqCode */
- CARD8 printReqType; /* always X_PrintQueryVersion */
- CARD16 length B16;
-} xPrintQueryVersionReq;
-#define sz_xPrintQueryVersionReq 4
-
-typedef struct {
- BYTE type; /* X_Reply */
- CARD8 unused; /* not used */
- CARD16 sequenceNumber B16;
- CARD32 length B32;
- CARD16 majorVersion B16; /* major version of Xp protocol */
- CARD16 minorVersion B16; /* minor version of Xp protocol */
- CARD32 pad1 B32;
- CARD32 pad2 B32;
- CARD32 pad3 B32;
- CARD32 pad4 B32;
- CARD32 pad5 B32;
-} xPrintQueryVersionReply;
-#define sz_xPrintQueryVersionReply 32
-
-
-typedef struct _PrintGetPrinterList {
- CARD8 reqType; /* always PrintReqCode */
- CARD8 printReqType; /* always X_PrintGetPrinterList */
- CARD16 length B16;
- CARD32 printerNameLen B32; /* length of printer name */
- CARD32 localeLen B32; /* length of locale string */
-
- /* variable portion *****************************************
- STRING8 printerName; * printer name *
- BYTE pad(printerNameLen) * unused *
- STRING8 locale; * locale *
- BYTE pad(localeLen) * unused *
- ************************************************************/
-} xPrintGetPrinterListReq;
-#define sz_xPrintGetPrinterListReq 12
-
-typedef struct {
- BYTE type; /* X_Reply */
- CARD8 unused; /* not used */
- CARD16 sequenceNumber B16;
- CARD32 length B32;
- CARD32 listCount B32; /* of PRINTER recs below */
- CARD32 pad1 B32;
- CARD32 pad2 B32;
- CARD32 pad3 B32;
- CARD32 pad4 B32;
- CARD32 pad5 B32;
-
- /* variable portion *****************************************
- CARD32 nameLen B32; * length of name in bytes *
- STRING8 name; * name *
- BYTE pad(nameLen) * unused *
-
- CARD32 descLen B32; * length of desc in bytes *
- STRING8 desc; * localized description *
- BYTE pad(descLen) * unused *
- ************************************************************/
-} xPrintGetPrinterListReply;
-#define sz_xPrintGetPrinterListReply 32
-
-
-typedef struct _PrintRehashPrinterList {
- CARD8 reqType; /* always PrintReqCode */
- CARD8 printReqType; /* always X_PrintRehashPrinterList */
- CARD16 length B16;
-} xPrintRehashPrinterListReq;
-#define sz_xPrintRehashPrinterListReq 4
-
-
-typedef struct _PrintCreateContext {
- CARD8 reqType; /* always PrintReqCode */
- CARD8 printReqType; /* always X_PrintInitSetContext */
- CARD16 length B16;
- CARD32 contextID B32; /* ID for context */
- CARD32 printerNameLen B32; /* length of printerName in bytes */
- CARD32 localeLen B32; /* length of locale in bytes */
-
- /* variable portion *****************************************
- STRING8 printerName * printer name *
- BYTE pad(printerNameLen) * unused *
- STRING8 locale * locale *
- BYTE pad(locale) * unused *
- ************************************************************/
-} xPrintCreateContextReq;
-#define sz_xPrintCreateContextReq 16
-
-
-typedef struct _PrintSetContext {
- CARD8 reqType; /* always PrintReqCode */
- CARD8 printReqType; /* always X_PrintSetContext */
- CARD16 length B16;
- PCONTEXT printContext B32; /* print context */
-} xPrintSetContextReq;
-#define sz_xPrintSetContextReq 8
-
-
-typedef struct _PrintGetContext {
- CARD8 reqType; /* always PrintReqCode */
- CARD8 printReqType; /* always X_PrintGetContext */
- CARD16 length B16;
-} xPrintGetContextReq;
-#define sz_xPrintGetContextReq 4
-
-typedef struct {
- BYTE type; /* X_Reply */
- CARD8 unused; /* not used */
- CARD16 sequenceNumber B16;
- CARD32 length B32;
- PCONTEXT printContext B32; /* print context */
- CARD32 pad1 B32;
- CARD32 pad2 B32;
- CARD32 pad3 B32;
- CARD32 pad4 B32;
- CARD32 pad5 B32;
-} xPrintGetContextReply;
-#define sz_xPrintGetContextReply 32
-
-
-typedef struct _PrintDestroyContext {
- CARD8 reqType; /* always PrintReqCode */
- CARD8 printReqType; /* always X_PrintDestroyContext */
- CARD16 length B16;
- PCONTEXT printContext B32; /* print context */
-} xPrintDestroyContextReq;
-#define sz_xPrintDestroyContextReq 8
-
-
-typedef struct _PrintGetContextScreen {
- CARD8 reqType; /* always PrintReqCode */
- CARD8 printReqType; /* always X_PrintGetContextScreen */
- CARD16 length B16;
- PCONTEXT printContext B32; /* print context */
-} xPrintGetContextScreenReq;
-#define sz_xPrintGetContextScreenReq 8
-
-typedef struct {
- BYTE type; /* X_Reply */
- CARD8 unused; /* not used */
- CARD16 sequenceNumber B16;
- CARD32 length B32;
- WINDOW rootWindow; /* screenPtr represented as rootWin */
- CARD32 pad1 B32;
- CARD32 pad2 B32;
- CARD32 pad3 B32;
- CARD32 pad4 B32;
- CARD32 pad5 B32;
-} xPrintGetContextScreenReply;
-#define sz_xPrintGetContextScreenReply 32
-
-
-typedef struct _PrintStartJob {
- CARD8 reqType; /* always PrintReqCode */
- CARD8 printReqType; /* always X_PrintStartJob */
- CARD16 length B16;
- CARD8 saveData; /* save data boolean */
- CARD8 pad1;
- CARD16 pad2 B16;
-} xPrintStartJobReq;
-#define sz_xPrintStartJobReq 8
-
-typedef struct _PrintEndJob {
- CARD8 reqType; /* always PrintReqCode */
- CARD8 printReqType; /* always X_PrintEndJob */
- CARD16 length B16;
- BOOL cancel; /* cancel boolean */
- CARD8 pad1;
- CARD16 pad2 B16;
-} xPrintEndJobReq;
-#define sz_xPrintEndJobReq 8
-
-
-typedef struct _PrintStartDoc {
- CARD8 reqType; /* always PrintReqCode */
- CARD8 printReqType; /* always X_PrintStartDoc */
- CARD16 length B16;
- CARD8 type; /* type for document */
- CARD8 pad1;
- CARD16 pad2 B16;
-} xPrintStartDocReq;
-#define sz_xPrintStartDocReq 8
-
-typedef struct _PrintEndDoc {
- CARD8 reqType; /* always PrintReqCode */
- CARD8 printReqType; /* always X_PrintEndDoc */
- CARD16 length B16;
- BOOL cancel; /* cancel boolean */
- CARD8 pad1;
- CARD16 pad2 B16;
-} xPrintEndDocReq;
-#define sz_xPrintEndDocReq 8
-
-
-typedef struct _PrintPutDocumentData {
- CARD8 reqType; /* always PrintReqCode */
- CARD8 printReqType; /* always X_PrintPutDocumentData */
- CARD16 length B16;
- DRAWABLE drawable B32; /* target drawable */
- CARD32 len_data B32; /* big len in bytes */
- CARD16 len_fmt; /* len in bytes */
- CARD16 len_options; /* len in bytes */
-
- /* variable portion *****************************************
- LISTofBYTE data; * data *
- BYTE pad(len_data) * unused *
- STRING8 doc_fmt; * ISO compliant desc of data type *
- BYTE pad(len_fmt) * unused *
- STRING8 options; * additional device-dependent desc *
- BYTE pad(len_options) * unused *
- ************************************************************/
-} xPrintPutDocumentDataReq;
-#define sz_xPrintPutDocumentDataReq 16
-
-
-typedef struct _PrintGetDocumentData {
- CARD8 reqType; /* always PrintReqCode */
- CARD8 printReqType; /* always X_PrintGetDocumentData */
- CARD16 length B16;
- PCONTEXT printContext B32; /* print context */
- CARD32 maxBufferSize B32; /* maximum buffer size requested */
-} xPrintGetDocumentDataReq;
-#define sz_xPrintGetDocumentDataReq 12
-
-typedef struct {
- BYTE type; /* X_Reply */
- CARD8 unused; /* not used */
- CARD16 sequenceNumber B16;
- CARD32 length B32;
- CARD32 statusCode B32; /* status code for reply */
- CARD32 finishedFlag B32; /* is this the last reply */
- CARD32 dataLen B32; /* data length */
- CARD32 pad1 B32;
- CARD32 pad2 B32;
- CARD32 pad3 B32;
-
- /* variable portion *****************************************
- LISTofBYTE data; * data *
- BYTE pad(count) * unused *
- ************************************************************/
-} xPrintGetDocumentDataReply;
-#define sz_xPrintGetDocumentDataReply 32
-
-
-typedef struct _PrintStartPage {
- CARD8 reqType; /* always PrintReqCode */
- CARD8 printReqType; /* always X_PrintStartPage */
- CARD16 length B16;
- WINDOW window B32; /* window */
-} xPrintStartPageReq;
-#define sz_xPrintStartPageReq 8
-
-typedef struct _PrintEndPage {
- CARD8 reqType; /* always PrintReqCode */
- CARD8 printReqType; /* always X_PrintEndPage */
- CARD16 length B16;
- BOOL cancel; /* cancel boolean */
- CARD8 pad1;
- CARD16 pad2 B16;
-} xPrintEndPageReq;
-#define sz_xPrintEndPageReq 8
-
-
-typedef struct _PrintSelectInput {
- CARD8 reqType; /* always PrintReqCode */
- CARD8 printReqType; /* always X_PrintSelectInput */
- CARD16 length B16;
- PCONTEXT printContext B32; /* print context */
- BITMASK eventMask B32;
-} xPrintSelectInputReq;
-#define sz_xPrintSelectInputReq 12
-
-
-typedef struct _PrintInputSelected {
- CARD8 reqType; /* always PrintReqCode */
- CARD8 printReqType; /* always X_PrintInputSelected */
- CARD16 length B16;
- PCONTEXT printContext B32; /* print context */
-} xPrintInputSelectedReq;
-#define sz_xPrintInputSelectedReq 8
-
-typedef struct {
- BYTE type; /* X_Reply */
- CARD8 unused; /* not used */
- CARD16 sequenceNumber B16;
- CARD32 length B32;
- BITMASK eventMask B32; /* your event mask */
- BITMASK allEventsMask B32; /* all event mask */
- CARD32 pad1 B32;
- CARD32 pad2 B32;
- CARD32 pad3 B32;
- CARD32 pad4 B32;
-} xPrintInputSelectedReply;
-#define sz_xPrintInputSelectedReply 32
-
-typedef struct _PrintGetAttributes {
- CARD8 reqType; /* always PrintReqCode */
- CARD8 printReqType; /* always X_PrintGetAttributes */
- CARD16 length B16;
- PCONTEXT printContext B32; /* print context */
- CARD8 type; /* type */
- CARD8 pad1; /* unused */
- CARD16 pad2 B16; /* unused */
-} xPrintGetAttributesReq;
-#define sz_xPrintGetAttributesReq 12
-
-typedef struct {
- BYTE type; /* X_Reply */
- CARD8 unused; /* not used */
- CARD16 sequenceNumber B16;
- CARD32 length B32;
- CARD32 stringLen B32; /* length of xrm db string */
- CARD32 pad1 B32;
- CARD32 pad2 B32;
- CARD32 pad3 B32;
- CARD32 pad4 B32;
- CARD32 pad5 B32;
-
- /* variable portion *****************************************
- STRING8 string; * xrm db as a string *
- BYTE pad(stringLen) * unused *
- ************************************************************/
-} xPrintGetAttributesReply;
-#define sz_xPrintGetAttributesReply 32
-
-
-typedef struct _PrintSetAttributes {
- CARD8 reqType; /* always PrintReqCode */
- CARD8 printReqType; /* always X_PrintSetAttributes */
- CARD16 length B16;
- PCONTEXT printContext B32; /* print context */
- CARD32 stringLen B32; /* length of xrm db string */
- CARD8 type; /* type */
- CARD8 rule; /* replacement rule */
- CARD16 pad1 B16; /* unused */
-
- /* variable portion *****************************************
- STRING8 string; * xrm db as a string *
- BYTE pad(stringLen) * unused *
- ************************************************************/
-} xPrintSetAttributesReq;
-#define sz_xPrintSetAttributesReq 16
-
-
-typedef struct _PrintGetOneAttribute {
- CARD8 reqType; /* always PrintReqCode */
- CARD8 printReqType; /* always X_PrintGetOneAttribute */
- CARD16 length B16;
- PCONTEXT printContext B32; /* print context */
- CARD32 nameLen; /* length of name string */
- CARD8 type; /* type */
- CARD8 pad1; /* unused */
- CARD16 pad2 B16; /* unused */
-
- /* variable portion *****************************************
- STRING8 name; * name as a string *
- BYTE pad(name) * unused *
- ************************************************************/
-} xPrintGetOneAttributeReq;
-#define sz_xPrintGetOneAttributeReq 16
-
-typedef struct {
- BYTE type; /* X_Reply */
- CARD8 unused; /* not used */
- CARD16 sequenceNumber B16;
- CARD32 length B32;
- CARD32 valueLen B32; /* length of value string */
- CARD32 pad1 B32;
- CARD32 pad2 B32;
- CARD32 pad3 B32;
- CARD32 pad4 B32;
- CARD32 pad5 B32;
-
- /* variable portion *****************************************
- STRING8 value; * value as a string *
- BYTE pad(value) * unused *
- ************************************************************/
-} xPrintGetOneAttributeReply;
-#define sz_xPrintGetOneAttributeReply 32
-
-
-typedef struct _PrintGetPageDimensions {
- CARD8 reqType; /* always PrintReqCode */
- CARD8 printReqType; /* always X_PrintGetPageDimensions */
- CARD16 length B16;
- PCONTEXT printContext B32; /* print context */
-} xPrintGetPageDimensionsReq;
-#define sz_xPrintGetPageDimensionsReq 8
-
-typedef struct {
- BYTE type; /* X_Reply */
- CARD8 unused; /* not used */
- CARD16 sequenceNumber B16;
- CARD32 length B32;
- CARD16 width; /* total pixel width */
- CARD16 height; /* total pixel height */
- CARD16 rx; /* reproducable x pixel offset */
- CARD16 ry; /* reproducable y pixel offset */
- CARD16 rwidth; /* reproducable x pixel width */
- CARD16 rheight; /* reproducable y pixel width */
- CARD32 pad1 B32;
- CARD32 pad2 B32;
- CARD32 pad3 B32;
-} xPrintGetPageDimensionsReply;
-#define sz_xPrintGetPageDimensionsReply 32
-
-
-typedef struct _PrintQueryScreens {
- CARD8 reqType; /* always PrintReqCode */
- CARD8 printReqType; /* always X_PrintQueryScreens */
- CARD16 length B16;
-} xPrintQueryScreensReq;
-#define sz_xPrintQueryScreensReq 4
-
-typedef struct {
- BYTE type; /* X_Reply */
- CARD8 unused; /* not used */
- CARD16 sequenceNumber B16;
- CARD32 length B32;
- CARD32 listCount; /* number of screens following */
- CARD32 pad1 B32;
- CARD32 pad2 B32;
- CARD32 pad3 B32;
- CARD32 pad4 B32;
- CARD32 pad5 B32;
-
- /* variable portion *****************************************
- WINDOW rootWindow; * root window of screen *
- ************************************************************/
-} xPrintQueryScreensReply;
-#define sz_xPrintQueryScreensReply 32
-
-typedef struct _PrintSetImageResolution {
- CARD8 reqType; /* always PrintReqCode */
- CARD8 printReqType; /* always X_PrintSetImageResolution */
- CARD16 length B16;
- PCONTEXT printContext B32; /* print context */
- CARD16 imageRes B16; /* image resolution */
- CARD16 pad1 B16;
-} xPrintSetImageResolutionReq;
-#define sz_xPrintSetImageResolutionReq 12
-
-typedef struct {
- BYTE type; /* X_Reply */
- BOOL status; /* accepted or not */
- CARD16 sequenceNumber B16;
- CARD32 length B32;
- CARD16 prevRes B16; /* previous resolution */
- CARD16 pad1 B32;
- CARD32 pad2 B32;
- CARD32 pad3 B32;
- CARD32 pad4 B32;
- CARD32 pad5 B32;
- CARD32 pad6 B32;
-} xPrintSetImageResolutionReply;
-#define sz_xPrintSetImageResolutionReply 32
-
-typedef struct _PrintGetImageResolution {
- CARD8 reqType; /* always PrintReqCode */
- CARD8 printReqType; /* always X_PrintGetImageResolution */
- CARD16 length B16;
- PCONTEXT printContext B32; /* print context */
-} xPrintGetImageResolutionReq;
-#define sz_xPrintGetImageResolutionReq 8
-
-typedef struct {
- BYTE type; /* X_Reply */
- CARD8 unused;
- CARD16 sequenceNumber B16;
- CARD32 length B32;
- CARD16 imageRes B16; /* image resolution */
- CARD16 pad1 B32;
- CARD32 pad2 B32;
- CARD32 pad3 B32;
- CARD32 pad4 B32;
- CARD32 pad5 B32;
- CARD32 pad6 B32;
-} xPrintGetImageResolutionReply;
-#define sz_xPrintGetImageResolutionReply 32
-
-#ifndef _XP_PRINT_SERVER_
-/***********************************************************************
- *
- * Library-only definitions.
- */
-extern XPHinterProc _xp_hinter_proc;
-extern char *_xp_hinter_desc;
-extern int _xp_hinter_init;
-
-#else /* _XP_PRINT_SERVER_ */
-
-/***********************************************************************
- *
- * Server-only definitions shared between the extension and DDX layers.
- *
- */
-
-/*
- * Internal return code used to indicate that the requesting
- * client has been suspended.
- */
-#define Suspended 84
-
-struct _XpContext;
-
-extern void XpRegisterPrinterScreen(
- ScreenPtr pScreen,
- int (*CreateContext)(struct _XpContext *));
-
-typedef struct _xpprintFuncs {
- int (*StartJob)(
- struct _XpContext * /* pContext */,
- Bool /* sendClientData */,
- ClientPtr /* client */);
- int (*EndJob)(struct _XpContext *, int);
- int (*StartDoc)(
- struct _XpContext * /* pContext */,
- XPDocumentType /* type */);
- int (*EndDoc)(struct _XpContext *, int);
- int (*StartPage)(
- struct _XpContext * /* pContext */,
- WindowPtr /* pWin */);
- int (*EndPage)(
- struct _XpContext * /* pContext */,
- WindowPtr /* pWin */);
- int (*PutDocumentData)(
- struct _XpContext * /* pContext */,
- DrawablePtr /* pDraw */,
- char * /* pData */,
- int /* len_data */,
- char * /* pDoc_fmt */,
- int /* len_fmt */,
- char * /* pOptions */,
- int /* len_options */,
- ClientPtr /* client */);
- int (*GetDocumentData)(
- struct _XpContext * /* pContext */,
- ClientPtr /* client */,
- int /* maxBufferSize */);
- int (*DestroyContext)(
- struct _XpContext *); /* pContext */
- char *(*GetAttributes)(
- struct _XpContext *,
- XPAttributes /* pool */);
- char *(*GetOneAttribute)(
- struct _XpContext * /* pContext */,
- XPAttributes /* pool */,
- char * /* attrs */);
- int (*SetAttributes)(
- struct _XpContext * /* pContext */,
- XPAttributes /* pool */,
- char * /* attrs */);
- int (*AugmentAttributes)(
- struct _XpContext * /* pContext */,
- XPAttributes /* pool */,
- char * /* attrs */);
- int (*GetMediumDimensions)(
- struct _XpContext * /* pPrintContext */,
- CARD16 * /* pWidth */,
- CARD16 * /* pHeight */);
- int (*GetReproducibleArea)(
- struct _XpContext * /* pPrintContext */,
- xRectangle * /* pRect */);
- int (*SetImageResolution)(
- struct _XpContext * /* pPrintContext */,
- int /* imageRes */,
- Bool * /* pStatus */);
-} XpDriverFuncs, *XpDriverFuncsPtr;
-
-/*
- * Each print context is represented by one of the following structs
- * associated with a resource ID of type RTcontext . A pointer to
- * the context is placed in the Xp extension's devPrivates
- * element in each client * which establishes a context via
- * either initContext or setContext.
- * The context pointer is also placed in the struct indicated by the
- * RTpage resource associated with each StartPage'd window.
- */
-typedef struct _XpContext {
- XID contextID;
- char *printerName;
- int screenNum; /* screen containing the printer */
- struct _XpClient *clientHead; /* list of clients */
- CARD32 state;
- VisualID pageWin;
- DevUnion *devPrivates;
- XpDriverFuncs funcs;
- ClientPtr clientSlept;
- int imageRes;
-} XpContextRec, *XpContextPtr;
-
-#include <X11/fonts/fontstruct.h> /* FontResolutionPtr */
-
-extern Bool XpAllocateContextPrivate(int, unsigned);
-extern FontResolutionPtr XpGetClientResolutions(ClientPtr, int *);
-extern XpContextPtr XpContextOfClient(ClientPtr);
-extern XpContextPtr XpGetPrintContext(ClientPtr);
-extern int XpAllocateContextPrivateIndex(void);
-extern int XpRehashPrinterList(void);
-extern void XpSetFontResFunc(ClientPtr);
-extern void XpUnsetFontResFunc(ClientPtr);
-extern void XpRegisterInitFunc(ScreenPtr, char *, int (*)(struct _XpContext *));
-
-#endif /* _XP_PRINT_SERVER_ */
-
-_XFUNCPROTOEND
-
-#endif /* _XpPrintstr_H_ */
diff --git a/nx-X11/include/extensions/dmxext.h b/nx-X11/include/extensions/dmxext.h
deleted file mode 100644
index c554232e4..000000000
--- a/nx-X11/include/extensions/dmxext.h
+++ /dev/null
@@ -1,190 +0,0 @@
-/* $XFree86$ */
-/*
- * Copyright 2002-2004 Red Hat Inc., Durham, North Carolina.
- *
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation on the rights to use, copy, modify, merge,
- * publish, distribute, sublicense, and/or sell copies of the Software,
- * and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included 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
- * NON-INFRINGEMENT. IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
- * 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.
- */
-
-/*
- * Authors:
- * Rickard E. (Rik) Faith <faith@redhat.com>
- *
- */
-
-/** \file
- * This file describes the interface to the client-side libdmx.a
- * library. All DMX-aware client-side applications should include this
- * file. */
-
-#ifndef _DMXEXT_H_
-#define _DMXEXT_H_
-
-/* These values must be larger than LastExtensionError.
- The values in dmxext.h and dmxproto.h *MUST* match. */
-#define DmxBadXinerama 1001
-#define DmxBadValue 1002
-#define DmxBadReply 1003
-
-#define DMXScreenWindowWidth (1L<<0)
-#define DMXScreenWindowHeight (1L<<1)
-#define DMXScreenWindowXoffset (1L<<2)
-#define DMXScreenWindowYoffset (1L<<3)
-#define DMXRootWindowWidth (1L<<4)
-#define DMXRootWindowHeight (1L<<5)
-#define DMXRootWindowXoffset (1L<<6)
-#define DMXRootWindowYoffset (1L<<7)
-#define DMXRootWindowXorigin (1L<<8)
-#define DMXRootWindowYorigin (1L<<9)
-
-#define DMXDesktopWidth (1L<<0)
-#define DMXDesktopHeight (1L<<1)
-#define DMXDesktopShiftX (1L<<2)
-#define DMXDesktopShiftY (1L<<3)
-
-#define DMXInputType (1L<<0)
-#define DMXInputPhysicalScreen (1L<<1)
-#define DMXInputSendsCore (1L<<2)
-
-#ifndef _DMX_SERVER_
-
-/** Client-library screen information structure, returned by
- * #DMXGetScreenAttributes. */
-typedef struct {
- char *displayName;
- int logicalScreen;
-
- unsigned int screenWindowWidth; /* displayName's coordinate system */
- unsigned int screenWindowHeight; /* displayName's coordinate system */
- int screenWindowXoffset; /* displayName's coordinate system */
- int screenWindowYoffset; /* displayName's coordinate system */
-
- unsigned int rootWindowWidth; /* screenWindow's coordinate system */
- unsigned int rootWindowHeight; /* screenWindow's coordinate system */
- int rootWindowXoffset; /* screenWindow's coordinate system */
- int rootWindowYoffset; /* screenWindow's coordinate system */
-
- int rootWindowXorigin; /* global coordinate system */
- int rootWindowYorigin; /* global coordinate system */
-} DMXScreenAttributes;
-
-/** Client-library window information structure, returned by
- * #DMXGetWindowAttributes. */
-typedef struct {
- int screen;
- Window window;
- XRectangle pos, vis;
-} DMXWindowAttributes;
-
-/** Client-library desktop information structure, returned by
- * #DMXGetDesktopAttributes. */
-typedef struct {
- unsigned int width; /* global coordinate system */
- unsigned int height; /* global coordinate system */
- int shiftX; /* global coordinate system */
- int shiftY; /* global coordinate system */
-} DMXDesktopAttributes;
-
-/** Enumeration for the #inputType field in the #DMXInputAttributes
- * structure. */
-typedef enum {
- DMXLocalInputType,
- DMXConsoleInputType,
- DMXBackendInputType
-} DMXInputEnum;
-
-/** Client-library input information structure, returned by
- * #DMXGetInputAttributes. */
-typedef struct {
- DMXInputEnum inputType;
- int physicalScreen;
- int physicalId;
- Bool isCore;
- Bool sendsCore;
- const char *name;
- Bool detached;
-} DMXInputAttributes;
-
-_XFUNCPROTOBEGIN
-
-extern Bool DMXQueryExtension(Display *dpy,
- int *event_basep, int *error_basep);
-extern Bool DMXQueryVersion(Display *dpy, int *major_version,
- int *minor_version, int *patch_version);
-extern Bool DMXSync(Display *dpy);
-extern Bool DMXForceWindowCreation(Display *dpy, Window window);
-
-
-extern Bool DMXGetScreenCount(Display *dpy, int *screen_count);
-extern Bool DMXGetScreenAttributes(Display *dpy,
- int screen,
- DMXScreenAttributes *attr);
-extern int DMXChangeScreensAttributes(Display *dpy,
- int screen_count,
- int *screens,
- int mask_count,
- unsigned int *masks,
- DMXScreenAttributes *attr, /* vector */
- int *error_screen);
-
-extern Bool DMXAddScreen(Display *dpy,
- const char *displayName,
- unsigned int mask,
- DMXScreenAttributes *attr,
- int *screen);
-extern Bool DMXRemoveScreen(Display *dpy, int screen);
-
-/* Call DMXGetScreenWindowCount and allocate info to that size. Pass
- * the size in available_count. This call can generate a large amount
- * of wire traffic and should not be used called with available_count=0
- * just to determine the screen_count value -- use DMXGetScreenCount
- * instead. NOTE: Also see DMX protocol specification (DMXSpec.txt) for
- * usage of DMXSync to flush pending commands. */
-extern Bool DMXGetWindowAttributes(Display *dpy, Window window,
- int *screen_count, int available_count,
- DMXWindowAttributes *attr);
-
-extern Bool DMXGetDesktopAttributes(Display *dpy, DMXDesktopAttributes *attr);
-extern int DMXChangeDesktopAttributes(Display *dpy,
- unsigned int mask,
- DMXDesktopAttributes *attr);
-
-extern Bool DMXGetInputCount(Display *dpy, int *input_count);
-extern Bool DMXGetInputAttributes(Display *dpy, int id,
- DMXInputAttributes *attr);
-
-extern Bool DMXAddInput(Display *dpy,
- unsigned int mask,
- DMXInputAttributes *attr,
- int *id);
-extern Bool DMXRemoveInput(Display *dpy, int id);
-
-/* These are helper functions that call DMXAddInput. */
-extern Bool DMXAddBackendInput(Display *dpy, int screen, int sendsCore,
- int *newId);
-extern Bool DMXAddConsoleInput(Display *dpy, const char *name, int sendsCore,
- int *newId);
-
-_XFUNCPROTOEND
-#endif
-#endif
diff --git a/nx-X11/include/extensions/dmxproto.h b/nx-X11/include/extensions/dmxproto.h
deleted file mode 100644
index b6b11f4d2..000000000
--- a/nx-X11/include/extensions/dmxproto.h
+++ /dev/null
@@ -1,446 +0,0 @@
-/* $XFree86$ */
-/*
- * Copyright 2002-2004 Red Hat Inc., Durham, North Carolina.
- *
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation on the rights to use, copy, modify, merge,
- * publish, distribute, sublicense, and/or sell copies of the Software,
- * and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included 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
- * NON-INFRINGEMENT. IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
- * 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.
- */
-
-/*
- * Authors:
- * Rickard E. (Rik) Faith <faith@redhat.com>
- *
- */
-
-/** \file
- * This file describes the structures necessary to implement the wire
- * protocol for the DMX protocol extension. It should be included only
- * in files that implement the client-side (or server-side) part of the
- * protocol (i.e., client-side applications should \b not include this
- * file). */
-
-#ifndef _DMXSTR_H_
-#define _DMXSTR_H_
-
-#define DMX_EXTENSION_NAME "DMX"
-#define DMX_EXTENSION_MAJOR 2
-#define DMX_EXTENSION_MINOR 2
-#define DMX_EXTENSION_PATCH 20040604
-
-/* These values must be larger than LastExtensionError.
- The values in dmxext.h and dmxproto.h *MUST* match. */
-#define DMX_BAD_XINERAMA 1001
-#define DMX_BAD_VALUE 1002
-
-#define X_DMXQueryVersion 0
-#define X_DMXGetScreenCount 1
-#define X_DMXGetScreenInformationDEPRECATED 2
-#define X_DMXGetWindowAttributes 3
-#define X_DMXGetInputCount 4
-#define X_DMXGetInputAttributes 5
-#define X_DMXForceWindowCreationDEPRECATED 6
-#define X_DMXReconfigureScreenDEPRECATED 7
-#define X_DMXSync 8
-#define X_DMXForceWindowCreation 9
-#define X_DMXGetScreenAttributes 10
-#define X_DMXChangeScreensAttributes 11
-#define X_DMXAddScreen 12
-#define X_DMXRemoveScreen 13
-#define X_DMXGetDesktopAttributes 14
-#define X_DMXChangeDesktopAttributes 15
-#define X_DMXAddInput 16
-#define X_DMXRemoveInput 17
-
-/** Wire-level description of DMXQueryVersion protocol request. */
-typedef struct {
- CARD8 reqType; /* dmxcode */
- CARD8 dmxReqType; /* X_DMXQueryVersion */
- CARD16 length B16;
-} xDMXQueryVersionReq;
-#define sz_xDMXQueryVersionReq 4
-
-/** Wire-level description of DMXQueryVersion protocol reply. */
-typedef struct {
- BYTE type; /* X_Reply */
- CARD8 ununsed;
- CARD16 sequenceNumber B16;
- CARD32 length B32;
- CARD32 majorVersion B32;
- CARD32 minorVersion B32;
- CARD32 patchVersion B32;
- CARD32 pad0 B32;
- CARD32 pad1 B32;
- CARD32 pad2 B32;
-} xDMXQueryVersionReply;
-#define sz_xDMXQueryVersionReply 32
-
-/** Wire-level description of DMXSync protocol request. */
-typedef struct {
- CARD8 reqType; /* DMXCode */
- CARD8 dmxReqType; /* X_DMXSync */
- CARD16 length B16;
-} xDMXSyncReq;
-#define sz_xDMXSyncReq 4
-
-/** Wire-level description of DMXSync protocol reply. */
-typedef struct {
- BYTE type; /* X_Reply */
- CARD8 unused;
- CARD16 sequenceNumber B16;
- CARD32 length B32;
- CARD32 status B32;
- CARD32 pad0 B32;
- CARD32 pad1 B32;
- CARD32 pad2 B32;
- CARD32 pad3 B32;
- CARD32 pad4 B32;
-} xDMXSyncReply;
-#define sz_xDMXSyncReply 32
-
-/** Wire-level description of DMXForceWindowCreation protocol request. */
-typedef struct {
- CARD8 reqType; /* DMXCode */
- CARD8 dmxReqType; /* X_DMXForceWindowCreation */
- CARD16 length B16;
- CARD32 window B32;
-} xDMXForceWindowCreationReq;
-#define sz_xDMXForceWindowCreationReq 8
-
-/** Wire-level description of DMXForceWindowCreation protocol reply. */
-typedef struct {
- BYTE type; /* X_Reply */
- CARD8 unused;
- CARD16 sequenceNumber B16;
- CARD32 length B32;
- CARD32 status B32;
- CARD32 pad0 B32;
- CARD32 pad1 B32;
- CARD32 pad2 B32;
- CARD32 pad3 B32;
- CARD32 pad4 B32;
-} xDMXForceWindowCreationReply;
-#define sz_xDMXForceWindowCreationReply 32
-
-/** Wire-level description of DMXGetScreenCount protocol request. */
-typedef struct {
- CARD8 reqType; /* DMXCode */
- CARD8 dmxReqType; /* X_DMXGetScreenCount */
- CARD16 length B16;
-} xDMXGetScreenCountReq;
-#define sz_xDMXGetScreenCountReq 4
-
-/** Wire-level description of DMXGetScreenCount protocol reply. */
-typedef struct {
- BYTE type; /* X_Reply */
- CARD8 unused;
- CARD16 sequenceNumber B16;
- CARD32 length B32;
- CARD32 screenCount B32;
- CARD32 pad0 B32;
- CARD32 pad1 B32;
- CARD32 pad2 B32;
- CARD32 pad3 B32;
- CARD32 pad4 B32;
-} xDMXGetScreenCountReply;
-#define sz_xDMXGetScreenCountReply 32
-
-/** Wire-level description of DMXGetScreenAttributes protocol request. */
-typedef struct {
- CARD8 reqType; /* DMXCode */
- CARD8 dmxReqType; /* X_DMXGetScreenAttributes */
- CARD16 length B16;
- CARD32 physicalScreen B32;
-} xDMXGetScreenAttributesReq;
-#define sz_xDMXGetScreenAttributesReq 8
-
-/** Wire-level description of DMXGetScreenAttributes protocol reply. */
-typedef struct {
- BYTE type; /* X_Reply */
- CARD8 unused;
- CARD16 sequenceNumber B16;
- CARD32 length B32;
- CARD32 displayNameLength B32;
- CARD32 logicalScreen B32;
-
- CARD16 screenWindowWidth B16;
- CARD16 screenWindowHeight B16;
- INT16 screenWindowXoffset B16;
- INT16 screenWindowYoffset B16;
-
- CARD16 rootWindowWidth B16;
- CARD16 rootWindowHeight B16;
- INT16 rootWindowXoffset B16;
- INT16 rootWindowYoffset B16;
- INT16 rootWindowXorigin B16;
- INT16 rootWindowYorigin B16;
-} xDMXGetScreenAttributesReply;
-#define sz_xDMXGetScreenAttributesReply 36
-
-/** Wire-level description of DMXChangeScreensAttributes protocol request. */
-typedef struct {
- CARD8 reqType; /* DMXCode */
- CARD8 dmxReqType; /* X_DMXChangeScreensAttributes */
- CARD16 length B16;
- CARD32 screenCount B32;
- CARD32 maskCount B32;
-} xDMXChangeScreensAttributesReq;
-#define sz_xDMXChangeScreensAttributesReq 12
-
-/** Wire-level description of DMXChangeScreensAttributes protocol reply. */
-typedef struct {
- BYTE type; /* X_Reply */
- CARD8 unused;
- CARD16 sequenceNumber B16;
- CARD32 length B32;
- CARD32 status B32;
- CARD32 errorScreen B32;
- CARD32 pad0 B32;
- CARD32 pad1 B32;
- CARD32 pad2 B32;
- CARD32 pad3 B32;
-} xDMXChangeScreensAttributesReply;
-#define sz_xDMXChangeScreensAttributesReply 32
-
-/** Wire-level description of DMXAddScreen protocol request. */
-typedef struct {
- CARD8 reqType; /* DMXCode */
- CARD8 dmxReqType; /* X_DMXAddScreen */
- CARD16 length B16;
- CARD32 displayNameLength B32;
- CARD32 physicalScreen B32;
- CARD32 valueMask B32;
-} xDMXAddScreenReq;
-#define sz_xDMXAddScreenReq 16
-
-/** Wire-level description of DMXAddScreen protocol reply. */
-typedef struct {
- BYTE type; /* X_Reply */
- CARD8 unused;
- CARD16 sequenceNumber B16;
- CARD32 length B32;
- CARD32 status B32;
- CARD32 physicalScreen B32;
- CARD32 pad0 B32;
- CARD32 pad1 B32;
- CARD32 pad2 B32;
- CARD32 pad3 B32;
-} xDMXAddScreenReply;
-#define sz_xDMXAddScreenReply 32
-
-/** Wire-level description of DMXRemoveScreen protocol request. */
-typedef struct {
- CARD8 reqType; /* DMXCode */
- CARD8 dmxReqType; /* X_DMXRemoveScreen */
- CARD16 length B16;
- CARD32 physicalScreen B32;
-} xDMXRemoveScreenReq;
-#define sz_xDMXRemoveScreenReq 8
-
-/** Wire-level description of DMXRemoveScreen protocol reply. */
-typedef struct {
- BYTE type; /* X_Reply */
- CARD8 unused;
- CARD16 sequenceNumber B16;
- CARD32 length B32;
- CARD32 status B32;
- CARD32 pad0 B32;
- CARD32 pad1 B32;
- CARD32 pad2 B32;
- CARD32 pad3 B32;
- CARD32 pad4 B32;
-} xDMXRemoveScreenReply;
-#define sz_xDMXRemoveScreenReply 32
-
-/** Wire-level description of DMXGetWindowAttributes protocol request. */
-typedef struct {
- CARD8 reqType; /* DMXCode */
- CARD8 dmxReqType; /* X_DMXGetWindowAttributes */
- CARD16 length B16;
- CARD32 window B32;
-} xDMXGetWindowAttributesReq;
-#define sz_xDMXGetWindowAttributesReq 8
-
-/** Wire-level description of DMXGetWindowAttributes protocol reply. */
-typedef struct {
- BYTE type; /* X_Reply */
- CARD8 unused;
- CARD16 sequenceNumber B16;
- CARD32 length B32;
- CARD32 screenCount B32;
- CARD32 pad0 B32;
- CARD32 pad1 B32;
- CARD32 pad2 B32;
- CARD32 pad3 B32;
- CARD32 pad4 B32;
-} xDMXGetWindowAttributesReply;
-#define sz_xDMXGetWindowAttributesReply 32
-
-/** Wire-level description of DMXGetDesktopAttributes protocol request. */
-typedef struct {
- CARD8 reqType; /* DMXCode */
- CARD8 dmxReqType; /* X_DMXGetDesktopAttributes */
- CARD16 length B16;
-} xDMXGetDesktopAttributesReq;
-#define sz_xDMXGetDesktopAttributesReq 4
-
-/** Wire-level description of DMXGetDesktopAttributes protocol reply. */
-typedef struct {
- BYTE type; /* X_Reply */
- CARD8 unused;
- CARD16 sequenceNumber B16;
- CARD32 length B32;
- INT16 width;
- INT16 height;
- INT16 shiftX;
- INT16 shiftY;
- CARD32 pad0 B32;
- CARD32 pad1 B32;
- CARD32 pad2 B32;
- CARD32 pad3 B32;
-} xDMXGetDesktopAttributesReply;
-#define sz_xDMXGetDesktopAttributesReply 32
-
-/** Wire-level description of DMXChangeDesktopAttributes protocol request. */
-typedef struct {
- CARD8 reqType; /* DMXCode */
- CARD8 dmxReqType; /* X_DMXChangeDesktopAttributes */
- CARD16 length B16;
- CARD32 valueMask B32;
-} xDMXChangeDesktopAttributesReq;
-#define sz_xDMXChangeDesktopAttributesReq 8
-
-/** Wire-level description of DMXChangeDesktopAttributes protocol reply. */
-typedef struct {
- BYTE type; /* X_Reply */
- CARD8 unused;
- CARD16 sequenceNumber B16;
- CARD32 length B32;
- CARD32 status B32;
- CARD32 pad0 B32;
- CARD32 pad1 B32;
- CARD32 pad2 B32;
- CARD32 pad3 B32;
- CARD32 pad4 B32;
-} xDMXChangeDesktopAttributesReply;
-#define sz_xDMXChangeDesktopAttributesReply 32
-
-/** Wire-level description of DMXGetInputCount protocol request. */
-typedef struct {
- CARD8 reqType; /* DMXCode */
- CARD8 dmxReqType; /* X_DMXGetInputCount */
- CARD16 length B16;
-} xDMXGetInputCountReq;
-#define sz_xDMXGetInputCountReq 4
-
-/** Wire-level description of DMXGetInputCount protocol reply. */
-typedef struct {
- BYTE type; /* X_Reply */
- CARD8 unused;
- CARD16 sequenceNumber B16;
- CARD32 length B32;
- CARD32 inputCount B32;
- CARD32 pad0 B32;
- CARD32 pad1 B32;
- CARD32 pad2 B32;
- CARD32 pad3 B32;
- CARD32 pad4 B32;
-} xDMXGetInputCountReply;
-#define sz_xDMXGetInputCountReply 32
-
-/** Wire-level description of DMXGetInputAttributes protocol request. */
-typedef struct {
- CARD8 reqType; /* DMXCode */
- CARD8 dmxReqType; /* X_DMXGetInputAttributes */
- CARD16 length B16;
- CARD32 deviceId B32;
-} xDMXGetInputAttributesReq;
-#define sz_xDMXGetInputAttributesReq 8
-
-/** Wire-level description of DMXGetInputAttributes protocol reply. */
-typedef struct {
- BYTE type; /* X_Reply */
- CARD8 unused;
- CARD16 sequenceNumber B16;
- CARD32 length B32;
- CARD32 inputType B32;
- CARD32 physicalScreen B32;
- CARD32 physicalId B32;
- CARD32 nameLength B32;
- BOOL isCore;
- BOOL sendsCore;
- BOOL detached;
- CARD8 pad0;
- CARD32 pad1 B32;
-} xDMXGetInputAttributesReply;
-#define sz_xDMXGetInputAttributesReply 32
-
-/** Wire-level description of DMXAddInput protocol request. */
-typedef struct {
- CARD8 reqType; /* DMXCode */
- CARD8 dmxReqType; /* X_DMXAddInput */
- CARD16 length B16;
- CARD32 displayNameLength B32;
- CARD32 valueMask;
-} xDMXAddInputReq;
-#define sz_xDMXAddInputReq 12
-
-/** Wire-level description of DMXAddInput protocol reply. */
-typedef struct {
- BYTE type; /* X_Reply */
- CARD8 unused;
- CARD16 sequenceNumber B16;
- CARD32 length B32;
- CARD32 status B32;
- CARD32 physicalId B32;
- CARD32 pad0 B32;
- CARD32 pad1 B32;
- CARD32 pad2 B32;
- CARD32 pad3 B32;
-} xDMXAddInputReply;
-#define sz_xDMXAddInputReply 32
-
-/** Wire-level description of DMXRemoveInput protocol request. */
-typedef struct {
- CARD8 reqType; /* DMXCode */
- CARD8 dmxReqType; /* X_DMXRemoveInput */
- CARD16 length B16;
- CARD32 physicalId B32;
-} xDMXRemoveInputReq;
-#define sz_xDMXRemoveInputReq 8
-
-/** Wire-level description of DMXRemoveInput protocol reply. */
-typedef struct {
- BYTE type;
- CARD8 unused;
- CARD16 sequenceNumber B16;
- CARD32 length B32;
- CARD32 status B32;
- CARD32 pad0 B32;
- CARD32 pad1 B32;
- CARD32 pad2 B32;
- CARD32 pad3 B32;
- CARD32 pad4 B32;
-} xDMXRemoveInputReply;
-#define sz_xDMXRemoveInputReply 32
-
-#endif
diff --git a/nx-X11/lib/Imakefile b/nx-X11/lib/Imakefile
index 1266724c7..721d3fff4 100644
--- a/nx-X11/lib/Imakefile
+++ b/nx-X11/lib/Imakefile
@@ -181,10 +181,6 @@ REGEXDIR = regex
XALIBDIR = Xa
#endif
-#if BuildXprintLib
-XPRINTLIBDIRS = Xp XprintUtil XprintAppUtil
-#endif
-
#if BuildFontCacheLib
FONTCACHELIBDIR = Xfontcache
#endif
@@ -221,7 +217,7 @@ LINTSUBDIRS = $(XAULIBDIR) $(XDMCPLIBDIR) $(X11LIBDIR) \
$(OLDXLIBDIR) $(ICELIBDIR) $(SMLIBDIR) $(XEXTLIBDIR) $(XTLIBDIR) \
$(SSLIBDIR) $(XF86MISCLIBDIR) $(XF86VMLIBDIR) $(XF86DGALIBDIR) \
$(XF86RUSHLIBDIR) $(XMULIBDIR) $(XMUULIBDIR) $(XPMLIBDIR) \
- $(XPRINTLIBDIRS) $(XAW6LIBDIR) $(XAW7LIBDIR) $(XAWLIBDIR) \
+ $(XAW6LIBDIR) $(XAW7LIBDIR) $(XAWLIBDIR) \
$(XINPUTLIBDIR) $(XTSTLIBDIR) $(FSLIBDIR) $(XKBLIBDIR) \
$(XKBUILIBDIR) $(LBXUTILDIR) $(XALIBDIR) $(EXPATBUILDDIR) \
$(XVLIBDIR) $(GLXLIBDIR) $(GLULIBDIR) $(GLWLIBDIR) \
diff --git a/nx-X11/lib/X11/Imakefile b/nx-X11/lib/X11/Imakefile
index 9f0b682b3..4e781f59c 100644
--- a/nx-X11/lib/X11/Imakefile
+++ b/nx-X11/lib/X11/Imakefile
@@ -27,7 +27,7 @@ XCOMM $XFree86: xc/lib/X11/Imakefile,v 3.52 2003/05/27 16:53:15 tsi Exp $
HEADERS = Xlib.h Xresource.h Xutil.h cursorfont.h Xlibint.h \
Xcms.h Xlocale.h XKBlib.h XlibConf.h Xregion.h ImUtil.h
-#if BuildServersOnly && !XWinServer && !XnestServer && !BuildGLXLibrary && !BuildClients && !XdmxServer && !NXAgentServer
+#if BuildServersOnly && !BuildGLXLibrary && !BuildClients && !NXAgentServer
all::
BuildIncludes($(HEADERS),IncSubdir,..)
diff --git a/nx-X11/programs/Imakefile b/nx-X11/programs/Imakefile
index 9480baf6e..77a84a65f 100644
--- a/nx-X11/programs/Imakefile
+++ b/nx-X11/programs/Imakefile
@@ -1,8 +1,3 @@
-XCOMM $Xorg: Imakefile,v 1.4 2000/08/17 19:47:01 cpqbld Exp $
-
-
-
-XCOMM $XFree86: xc/programs/Imakefile,v 3.54 2003/04/14 20:37:16 herrb Exp $
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
@@ -23,156 +18,15 @@ XCOMM $XFree86: xc/programs/Imakefile,v 3.54 2003/04/14 20:37:16 herrb Exp $
#define IHaveSubdirs
#define PassCDebugFlags CDEBUGFLAGS="$(CDEBUGFLAGS)"
-#if BuildServer || UseRgbTxt
- RGBSRCDIR = rgb
-#endif
#if BuildServer
XSSRCDIR = Xserver
#endif
-#if BuildXkbcomp
- XKBCOMPDIR = xkbcomp
-#endif
-#ifndef Win32Architecture
-#if HasXServer
- XINITSRCDIR = xinit
-#endif
-#if BuildFontServer
- XFSSRCDIR = xfs
-#endif
-#if BuildXKBlib
- XKBSRCDIRS = setxkbmap $(XKBCOMPDIR) xkbevd xkbprint xkbutils
-#endif
-#if BuildScreenSaverLibrary
-SCREENSAVESRCDIR = beforelight
-#endif
-#if BuildXF86VidModeLibrary
- XVIDTUNESRCDIR = xvidtune
-#endif
-#if BuildXF86DGALibrary
- XF86DGASRCDIR = xf86dga
-#endif
-#if BuildXAServer
- XASSRCDIR = Xaserver
-#endif
-#if BuildLBX
- LBXPROXYSRCDIR = lbxproxy
-#endif
-#if BuildXprintClients
- XPSRCDIRS = xplsprinters xprehashprinterlist xphelloworld xpr
-#endif
- PROXYMGRSRCDIR = proxymngr
- RSTARTSRCDIR = rstart
- SMPROXYSRCDIR = smproxy
- TWMSRCDIR = twm
- XCONSOLESRCDIR = xconsole
- XDMSRCDIR = xdm
-XFINDPROXYSRCDIR = xfindproxy
- XFWPSRCDIR = xfwp
-#if BuildXF86VidModeLibrary
- XGAMMASRCDIR = xgamma
-#endif
-#if BuildXvLibrary
- XVINFOSRCDIR = xvinfo
-#endif
- XHOSTSRCDIR = xhost
-#if BuildPlugin && BuildXaw
- XRXSRCDIR = xrx
-#endif
- XSMSRCDIR = xsm
-#if BuildXterm
- XTERMSRCDIR = xterm
-#endif
- SCRIPTSDIR = scripts
-#endif /* Win32Architecture */
-#if BuildCID
- MKCFMSRCDIR = mkcfm
-#endif
-
-#if (HasFreetype2 || BuildFreetype2Library) && BuildFontEncLib
- MKFONTSCALEDIR = mkfontscale
-#endif
-#if BuildXInputLib
-XINPUTCLIENTDIRS = xsetmode xsetpointer
-#endif
-
-#if BuildXTrapLibrary
-XTRAPCLIENTDIRS = xtrap
-#endif
-
-/* makepsres should be considered as part of the DPS libraries */
-#if BuildDPSLibraries
- MAKEPSRESDIR = makepsres
-#endif
-
-/* on the other hand, the following are independent clients */
-#if BuildDPSClients
- DPSCLIENTDIRS = dpsinfo dpsexec texteroids
-#endif
-#if BuildDBElib && BuildXprintClients
- DBECLIENTDIRS = xdbedizzy
-#endif
-
- XPMCLIENTDIRS = cxpm sxpm
-
-#if BuildGLXLibrary
- GLXCLIENTDIRS = glxinfo glxgears
-#endif
-
- XLOADDIR = xload
-
-#if BuildRandRLibrary
- XRANDRDIR = xrandr
-#endif
-
-#if BuildXcursorgen
- XCURSORGENDIR = xcursorgen
-#endif
-
-#if BuildFontconfigLibrary
- FCDIRS = fc-cache fc-list
-#endif
-#if 0
- FCLANGDIR = fc-lang
-#endif
-
-#if BuildXDriInfo
- XDRIINFO = xdriinfo
-#endif
-
-#if BuildXaw
- XMORE = xmore
-#endif
-
-#if BuildServersOnly || !BuildClients
#if defined(NXEmbeddedXServer)
SUBDIRS = $(XSSRCDIR)
#else
SUBDIRS = $(XSSRCDIR) nxauth
#endif
-#else
-SUBDIRS = \
- appres bdftopcf bitmap \
- $(SCREENSAVESRCDIR) editres $(FCDIRS) $(FCLANGDIR) fslsfonts fstobdf \
- iceauth ico listres luit \
- $(MAKEPSRESDIR) $(DPSCLIENTDIRS) $(DBECLIENTDIRS) \
- $(MKCFMSRCDIR) \
- mkfontdir $(MKFONTSCALEDIR) oclock $(PROXYMGRSRCDIR) \
- $(RGBSRCDIR) $(RSTARTSRCDIR) showfont \
- $(SMPROXYSRCDIR) $(TWMSRCDIR) viewres x11perf xauth xbiff xcalc \
- xclipboard xclock \
- xcmsdb $(XCONSOLESRCDIR) xditview $(XDMSRCDIR) xdpyinfo \
- $(XF86DGASRCDIR) xedit xev xeyes xfd xfontsel $(XFSSRCDIR) xfsinfo \
- $(XFINDPROXYSRCDIR) $(XFWPSRCDIR) $(XGAMMASRCDIR) xgc $(XHOSTSRCDIR) \
- $(XINITSRCDIR) $(XKBSRCDIRS) xkill $(XLOADDIR) xlogo xlsatoms \
- xlsclients xlsfonts xmag xman xmessage xmh xmodmap $(XMORE) xprop \
- xrdb xrefresh $(XRXSRCDIR) xset \
- xsetroot $(XSMSRCDIR) xstdcmap $(XINPUTCLIENTDIRS) \
- $(XTERMSRCDIR) $(XTRAPCLIENTDIRS) $(XVIDTUNESRCDIR) xwd xwininfo xwud \
- $(XPMCLIENTDIRS) $(XVINFOSRCDIR) \
- $(XSSRCDIR) $(XASSRCDIR) $(LBXPROXYSRCDIR) $(XPSRCDIRS) $(SCRIPTSDIR) \
- $(GLXCLIENTDIRS) $(XRANDRDIR) $(XCURSORGENDIR) $(XDRIINFO)
-#endif
MakeSubdirs($(SUBDIRS))
DependSubdirs($(SUBDIRS))
diff --git a/nx-X11/programs/Xserver/Imakefile b/nx-X11/programs/Xserver/Imakefile
index d18364b23..d6e67d864 100644
--- a/nx-X11/programs/Xserver/Imakefile
+++ b/nx-X11/programs/Xserver/Imakefile
@@ -158,49 +158,6 @@ INSTPGMFLAGS =
LIBCWRAPPER = os/libcwrapper.o
#endif
-#if BuildXprint
-
-XPCONFIGDIR = XpConfig
-
-#ifndef XpRasterDDX
-#define XpRasterDDX YES
-#endif
-#ifndef XpColorPclDDX
-#define XpColorPclDDX YES
-#endif
-#ifndef XpMonoPclDDX
-#define XpMonoPclDDX NO
-#endif
-#ifndef XpPostScriptDDX
-#define XpPostScriptDDX YES
-#endif
-
-#if XpRasterDDX
-XPRASTLIB = Xprint/raster/LibraryTargetName(raster)
-#endif
-#if XpColorPclDDX
-XPPCLLIB = Xprint/pcl/LibraryTargetName(pcl)
-#endif
-#if XpMonoPclDDX
-XPMPCLLIB = Xprint/pcl-mono/LibraryTargetName(pcl)
-#endif
-#if XpPostScriptDDX
-XPPSLIB = Xprint/ps/LibraryTargetName(ps)
-#endif
-
-XPDDXLIBS = Xprint/LibraryTargetName(printer) \
- $(XPRASTLIB) $(XPPCLLIB) $(XPMPCLLIB) $(XPPSLIB)
-XPDDXFBLIBS = $(MFB) $(CFB32)
-#if !PrintOnlyServer
- XPFBLIBS = $(XPDDXFBLIBS)
- XPDDX = $(XPDDXLIBS)
-#endif
- XPDDXDIR = Xprint
-#endif
-#if !BuildXprint || PrintOnlyServer
-XPFBLIBS = dix/LibraryTargetName(xpstubs)
-#endif
-
#if BuildRender
RENDERDIR = render
RENDERLIB = $(RENDERDIR)/librender.a
@@ -377,161 +334,6 @@ XCOMM
* even if multiple servers that share subdirectories are being built.
*/
-#if defined(XdecServer) && XdecServer
-XCOMM
-XCOMM Digital MIPS based WS server (ultrix 4.2 and beyond)
-XCOMM
-MFBSUBDIR = mfb
-CFB8SUBDIR = cfb
-DECWSDDXDIR = hw/dec/ws
-DECDIRS = $(STDDIRS) $(MFBDIR) $(CFB8DIR) $(DECWSDDXDIR) $(DEPDIRS)
-DECOBJS = hw/dec/ws/init.o hw/dec/ws/sdepthinit.o
-DECLIBS = hw/dec/ws/LibraryTargetName(dec) CFB8Libs
-ServerTarget(Xdec,$(DECDIRS),$(DECOBJS), \
- $(DECLIBS),$(FONTLIBS) $(SYSLIBS))
-#ifndef ServerToInstall
-#define ServerToInstall Xdec
-#endif
-#endif /* XdecServer */
-
-
-#if defined(XdecMultiDepthServer) && XdecMultiDepthServer
-XCOMM
-XCOMM Digital MIPS based WS server (ultrix 4.2 and beyond)
-XCOMM Supports 8, 12, and 24 bit pixmaps
-XCOMM
-MFBSUBDIR = mfb
-CFB8SUBDIR = cfb
-CFB16SUBDIR = cfb16
-CFB24SUBDIR = cfb24
-CFB32SUBDIR = cfb32
-DECWSDDXDIR = hw/dec/ws
-DECDIRS1 = $(STDDIRS) $(MFBDIR) \
- $(CFB8DIR) $(CFB16DIR) $(CFB24DIR) $(CFB32DIR) \
- $(DECWSDDXDIR) $(DEPDIRS)
-DECOBJS1 = hw/dec/ws/init.o hw/dec/ws/mdepthinit.o
-DECLIBS1 = hw/dec/ws/LibraryTargetName(dec) CFBLibs
-ServerTarget(Xdec_md,$(DECDIRS1),$(DECOBJS1), \
- $(DECLIBS1),$(FONTLIBS) $(SYSLIBS))
-#ifndef ServerToInstall
-#define ServerToInstall Xdec_md
-#endif
-#endif /* XdecMultiDepthServer */
-
-
-#if defined(XsunServer) && XsunServer
-XCOMM
-XCOMM Sun server
-XCOMM
-MFBSUBDIR = mfb
-CFB8SUBDIR = cfb
-SUNDDXDIR = hw/sun
-#if DoLoadableServer
-SUNOBJS = hw/sun/sunInit.o hw/sun/sunInitExt.o hw/sun/stubs.o
-#elif (defined(XF86Server) && XF86Server) \
- || (defined(XorgServer) && XorgServer)
-SUNOBJS = hw/sun/sunInit.o hw/sun/stubs.o
-#else
-SUNOBJS = hw/sun/sunInit.o
-#endif
-SUNDIRS = $(STDDIRS) $(MFBDIR) $(CFB8DIR) $(SUNDDXDIR) $(DEPDIRS)
-SUNLIBS = hw/sun/LibraryTargetName(sun) CFB8Libs
-SUNSYSLIBS = $(FONTLIBS) $(WIDECHARSYSLIB) $(SYSLIBS)
-SetUIDServerTarget(Xsun,$(SUNDIRS),$(SUNOBJS), \
- $(LIBCWRAPPER) $(SUNLIBS) $(LOADABLEEXTS),$(SUNSYSLIBS))
-#ifndef ServerToInstall
-#define ServerToInstall Xsun
-#endif
-#endif /* XsunServer */
-
-
-#if defined(Xsun24Server) && Xsun24Server
-XCOMM
-XCOMM Sun multiple pixmap depth (8, 12, 24) server
-XCOMM
-MFBSUBDIR = mfb
-CFB8SUBDIR = cfb
-CFB16SUBDIR = cfb16
-CFB24SUBDIR = cfb24
-CFB32SUBDIR = cfb32
-SUNDDXDIR = hw/sun
-SUN24DIRS = $(STDDIRS) $(MFBDIR) \
- $(CFB8DIR) $(CFB16DIR) $(CFB24DIR) $(CFB32DIR) \
- $(SUNDDXDIR) $(DEPDIRS)
-#if DoLoadableServer
-SUN24OBJS = hw/sun/sunInitMulti.o hw/sun/sunInitExt.o hw/sun/stubs.o
-#elif defined(XF86Server) && XF86Server \
- || (defined(XorgServer) && XorgServer)
-SUN24OBJS = hw/sun/sunInitMulti.o hw/sun/stubs.o
-#else
-SUN24OBJS = hw/sun/sunInitMulti.o
-#endif
-SUN24LIBS = hw/sun/LibraryTargetName(sun) CFBLibs
-SetUIDServerTarget(Xsun24,$(SUN24DIRS),$(SUN24OBJS), \
- $(LIBCWRAPPER) $(SUN24LIBS) $(LOADABLEEXTS),$(FONTLIBS) $(SYSLIBS))
-#ifndef ServerToInstall
-#define ServerToInstall Xsun24
-#endif
-#endif /* Xsun24Server */
-
-
-#if defined(XsunMonoServer) && XsunMonoServer
-XCOMM
-XCOMM Sun monochrome server
-XCOMM
-MFBSUBDIR = mfb
-SUNDDXDIR = hw/sun
-SUNMDIRS = $(STDDIRS) $(MFBDIR) $(SUNDDXDIR) $(DEPDIRS)
-#if defined(XF86Server) && XF86Server \
- || (defined(XorgServer) && XorgServer)
-SUNMOBJS = hw/sun/sunInitMono.o hw/sun/sunInExMono.o hw/sun/stubs.o
-#else
-SUNMOBJS = hw/sun/sunInitMono.o hw/sun/sunInExMono.o
-#endif
-SUNMLIBS = hw/sun/LibraryTargetName(sun) MFBBareLibs $(EXTENSIONS)
-SetUIDServerTarget(XsunMono,$(SUNMDIRS),$(SUNMOBJS), \
- $(LIBCWRAPPER) $(SUNMLIBS) $(LOADABLEEXTS),$(FONTLIBS) $(SYSLIBS))
-#ifndef ServerToInstall
-#define ServerToInstall XsunMono
-#endif
-#endif /* XsunMonoServer */
-
-
-#if defined(XsunLynxServer) && XsunLynxServer
-XCOMM
-XCOMM Sun server for LynxOS microSPARC 2.4.0
-XCOMM
-MFBSUBDIR = mfb
-CFB8SUBDIR = cfb
-LYNXDDXDIR = hw/sunLynx
-SUNDIRS = $(STDDIRS) $(MFBDIR) $(CFB8DIR) $(LYNXDDXDIR) $(DEPDIRS)
-SUNOBJS = hw/sunLynx/sunLyInit.o
-SUNLIBS = hw/sunLynx/libsun.a CFB8Libs
-ServerTarget(Xsun,$(SUNDIRS),$(SUNOBJS), \
- $(SUNLIBS),$(FONTLIBS) $(SYSLIBS))
-#ifndef ServerToInstall
-#define ServerToInstall Xsun
-#endif
-#endif /* XsunLynxServer */
-
-
-#if defined(XsunLynxMonoServer) && XsunLynxMonoServer
-XCOMM
-XCOMM Sun monochrome server for LynxOS microSPARC 2.4.0
-XCOMM
-MFBSUBDIR = mfb
-LYNXDDXDIR = hw/sunLynx
-SUNMDIRS = $(STDDIRS) $(MFBDIR) $(LYNXDDXDIR) $(DEPDIRS)
-SUNMOBJS = hw/sunLynx/sunInitMono.o hw/sunLynx/sunInExMono.o
-SUNMLIBS = hw/sunLynx/libsun.a MFBBareLibs $(OTHEREXTS)
-ServerTarget(XsunMono,$(SUNMDIRS),$(SUNMOBJS), \
- $(SUNMLIBS),$(FONTLIBS) $(SYSLIBS))
-#ifndef ServerToInstall
-#define ServerToInstall XsunMono
-#endif
-#endif /* XsunLynxMonoServer */
-
-
#if HasParallelMake
XCOMM
XCOMM force non-parallel build of XF86 servers to prevent MUTEX overrides
@@ -542,18 +344,6 @@ XF86SERVER = XFree86
#if defined(XorgServer) && XorgServer
XF86SERVER = Xorg
#endif
-#if defined(XnestServer) && XnestServer
-XNEST = Xnext
-#endif
-#if defined(XVirtualFramebufferServer) && XVirtualFramebufferServer
-XVFB = Xvfb
-#endif
-#if XdmxServer
-XDMX = Xdmx
-#endif
-#if defined(XWinServer) && XWinServer && !MakeDllModules
-XWIN = XWin
-#endif
#if defined(NXAgentServer) && NXAgentServer
NXAGENT = nxagent
#endif
@@ -562,13 +352,9 @@ NXWIN = NXWin
#endif
#if (defined(XF86Server) && XF86Server) || \
(defined(XorgServer) && XorgServer) || \
- (defined(XnestServer) && XnestServer) || \
(defined(NXAgentServer) && NXAgentServer) || \
- (defined(XVirtualFramebufferServer) && XVirtualFramebufferServer) || \
- (defined(XdmxServer) && XdmxServer) || \
- (!MakeDllModules && defined(XWinServer) && XWinServer) || \
(!MakeDllModules && defined(NXWinServer) && NXWinServer)
-MakeMutex($(XF86SERVER) $(XNEST) $(XVFB) $(XWIN) $(NXAGENT) $(NXWIN))
+MakeMutex($(XF86SERVER) $(NXAGENT) $(NXWIN))
#endif
MakeMutex($(STDDIRS) mfb fb cfb cfb16 cfb24 cfb32)
#endif
@@ -850,73 +636,6 @@ ServerDriverSDKTarget(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
-XPLIBS = PreFbLibs $(XPDDXLIBS) $(XPDDXFBLIBS) PostFbLibs
-#else
-XPLIBS = PreFbLibs PostFbLibs
-#endif
-#if (defined(SunArchitecture) || defined(SparcArchitecture)) && \
- defined(SVR4Architecture)
-XPSYSLIBS = $(FONTLIBS) $(CBRT) $(SYSLIBS) $(XONLYLIB) -lw
-#else
-XPSYSLIBS = $(FONTLIBS) $(CBRT) $(SYSLIBS) $(XONLYLIB)
-#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
-XCOMM
-XCOMM Server with Xlib-based ddx
-XCOMM
-#ifndef Win32Architecture
-XNESTDDXDIR = hw/xnest
-#else
-XNESTDDXDIR = hw
-#endif
-#if BuildDPMS
-XNESTDPMSSTUBOBJS = $(XNESTDDXDIR)/dpmsstubs.o
-#endif
-XNESTDIRS = $(STDDIRS) $(XNESTDDXDIR) $(DEPDIRS)
-#if !defined(LynxOSArchitecture) && \
- !defined(Win32Architecture) && \
- !defined(QNX4Architecture)
-XNESTOBJS = hw/xnest/miinitext.o $(XNESTDPMSSTUBOBJS)
-#else
-XNESTOBJS = hw/xnest/miinitext.o dix/main.o $(XNESTDPMSSTUBOBJS)
-#endif
-XNEST = hw/xnest/LibraryTargetName(xnest)
-XNESTLIBS = PreFbLibs $(XNEST) NoMfbPostFbLibs $(XNEST)
-XNESTSYSLIBS = $(FONTLIBS) $(LDPRELIBS) $(XLIB) $(SYSLIBS)
-#if HasParallelMake
-MakeMutex($(XNESTDIRS) $(XNESTOBJS) $(XNESTLIBS) $(XNESTSYSLIBS))
-#endif
-#if ForceServerRemake
-$(XNESTOBJS) $(XNESTLIBS) $(XNESTSYSLIBS):: $(XNESTDIRS)
- @if [ -f $@ ]; then touch $@ >/dev/null 2>&1 || exit 0; fi
-#endif
-ServerTarget(Xnest,$(XNESTDIRS),$(XNESTOBJS) $(XNESTDEFFILE), \
- $(LIBCWRAPPER) $(XNESTLIBS) $(LOADABLEEXTS),$(XNESTSYSLIBS))
-#endif /* XnestServer */
-
#if defined(NXAgentServer) && NXAgentServer
XCOMM
XCOMM Nested server with NXlib-based ddx and compressed transport.
@@ -1081,194 +800,6 @@ nxagent_static_nolibs: nxagent
$(LDPRELIBS) $(SYSLIBS) -Wl,-Bdynamic -lNX_Xext -lNX_X11 $(EXTRA_LOAD_FLAGS)
#endif /* NXAgentServer */
-#if defined(XnonServer) && XnonServer
-XCOMM
-XCOMM non server, just compile sources for build test
-XCOMM
-MFBSUBDIR = mfb
-CFB8SUBDIR = cfb
-CFB16SUBDIR = cfb16
-CFB32SUBDIR = cfb32
-#if HasParallelMake
-MakeMutex($(STDDIRS) $(MFBDIR) $(CFB8DIR) $(CFB16DIR) $(CFB32DIR) $(DEPDIRS))
-#endif
-Xnon: $(STDDIRS) $(MFBDIR) $(CFB8DIR) $(CFB16DIR) $(CFB32DIR) $(DEPDIRS)
-#endif /* XnonServer */
-
-
-#if defined(XVirtualFramebufferServer) && XVirtualFramebufferServer
-XCOMM
-XCOMM server with Virtual (malloced) framebuffer
-XCOMM
-MFBSUBDIR = mfb
-FBSUBDIR = fb
-#if defined(Win32Architecture)
-XVFBDDXDIR = hw
-#else
-XVFBDDXDIR = hw/vfb
-#endif
-XVFBDIRS = $(STDDIRS) $(MFBDIR) $(FBDIR) $(XVFBDDXDIR) $(DEPDIRS)
-#ifndef Win32Architecture
-#if BuildDPMS
-XVFBDPMSSTUBOBJS = $(XVFBDDXDIR)/dpmsstubs.o
-#endif
-XVFBOBJS = $(XVFBDDXDIR)/stubs.o $(XVFBDDXDIR)/miinitext.o $(XVFBDPMSSTUBOBJS)
-#else
-XVFBOBJS = dix/main.o hw/vfb/stubs.o hw/vfb/miinitext.o
-#endif
-XVFB = $(XVFBDDXDIR)/LibraryTargetName(vfb)
-XVFBLIBS = PreFbLibs $(XVFB) $(FB) PostFbLibs $(MI)
-XVFBSYSLIBS = $(FONTLIBS) $(SYSLIBS)
-#if HasParallelMake
-MakeMutex($(XVFBDIRS) $(XVFBOBJS) $(XVFB) $(XVFBLIBS) $(XVFBSYSLIBS))
-#endif
-#if ForceServerRemake
-$(XVFBOBJS) $(XVFB) $(XVFBLIBS) $(XVFBSYSLIBS):: $(XVFBDIRS)
- @if [ -f $@ ]; then touch $@ >/dev/null 2>&1 || exit 0; fi
-#endif
-ServerTarget(Xvfb,$(XVFBDIRS),$(XVFBOBJS) $(XVFBDEFFILE), \
- $(LIBCWRAPPER) $(XVFBLIBS) $(LOADABLEEXTS),$(XVFBSYSLIBS))
-#endif /* XVirtualFramebufferServer */
-
-#if defined(XdmxServer) && XdmxServer
-XCOMM
-XCOMM distribued multihead Server
-XCOMM
-#ifndef Win32Architecture
-XDMXDDXDIR = hw/dmx
-#else
-XDMXDDXDIR = hw
-#endif
-FBDIR = fb
-FBSUBDIR = fb
-MIDAMAGEDIR = miext/damage
-SHADOWDIR = miext/shadow
-XDMXDIRS = $(STDDIRS) $(XDMXDDXDIR) $(SHADOWDIR) $(DEPDIRS) $(FBDIR) $(MIDAMAGEDIR)
-#if BuildGlxExt
-#if BuildXinerama
-GLXPROXY_EXTRAOBJS = hw/dmx/panoramiX.o
-#endif
-GLXPROXYLIB = hw/dmx/glxProxy/LibraryTargetName(glxProxy)
-#endif
-#if !defined(LynxOSArchitecture) && \
- !defined(Win32Architecture) && \
- !defined(QNX4Architecture)
-XDMXOBJS = hw/dmx/miinitext.o $(GLXPROXY_EXTRAOBJS)
-#else
-XDMXOBJS = hw/dmx/miinitext.o $(GLXPROXY_EXTRAOBJS) dix/main.o
-#endif
-XDMX = hw/dmx/LibraryTargetName(dmx) \
- hw/dmx/input/LibraryTargetName(dmxinput) \
- hw/dmx/config/LibraryTargetName(dmxconfig) \
- $(GLXPROXYLIB)
-XDMXLIBS = PreFbLibs $(XDMX) MiExtLibs FbPostFbLibs $(XDMX)
-#if BuildRender
-XDMXRENDERLIB = $(XRENDERLIB)
-#endif
-XDMXSYSLIBS = $(FONTLIBS) $(LDPRELIBS) $(XILIB) $(XLIB) $(SYSLIBS) $(XMULIB) $(XDMXRENDERLIB)
-#if HasParallelMake
-MakeMutex($(XDMXDIRS) $(XDMXOBJS) $(XDMXLIBS) $(XDMXSYSLIBS))
-#endif
-#if ForceServerRemake
-$(XDMXOBJS) $(XDMXLIBS) $(XDMXSYSLIBS):: $(XDMXDIRS)
- @if [ -f $@ ]; then touch $@ >/dev/null 2>&1 || exit 0; fi
-#endif
-ServerTarget(Xdmx,$(XDMXDIRS),$(XDMXOBJS), \
- $(LIBCWRAPPER) $(XDMXLIBS) $(LOADABLEEXTS),$(XDMXSYSLIBS))
-#endif /* XdmxServer */
-
-#if defined(XWinServer) && XWinServer
-XCOMM
-XCOMM X Server for MS Windows
-XCOMM
-FBSUBDIR = fb
-MIDAMAGEDIR = miext/damage
-SHADOWDIR = miext/shadow
-#if BuildXWinLayer
-LAYERDIR = miext/layer
-XWINLAYERLIB = $(LAYER)
-#else
-LAYERDIR =
-XWINLAYERLIB =
-#endif
-#if BuildXWinMultiWindowExtWM
-ROOTLESSDIR = miext/rootless
-ROOTLESSLIB = $(ROOTLESSDIR)/LibraryTargetName(rootless) \
- $(ROOTLESSDIR)/safeAlpha/LibraryTargetName(safeAlpha) \
- $(ROOTLESSDIR)/accel/LibraryTargetName(rlAccel)
-#else
-ROOTLESSDIR =
-ROOTLESSLIB =
-#endif
-XWINDDXDIR = hw/xwin
-#if BuildXWinXF86Config
-XWINPARSERDIR = hw/xfree86/parser
-XWINPARSERLIB = $(XWINPARSERDIR)/LibraryTargetName(xf86config)
-#else
-XWINPARSERDIR =
-XWINPARSERLIB =
-#endif
-#if defined(GlxUseWindows) && GlxUseWindows
-XWINOPENGLLIB = -lopengl32
-#else
-XWINOPENGLLIB =
-#endif
-
-XWINLIB = $(XWINDDXDIR)/LibraryTargetName(XWin)
-XWINDIRS = $(STDDIRS) $(FBDIR) $(SHADOWDIR) $(LAYERDIR) $(XWINDDXDIR) \
- $(DEPDIRS) $(XWINPARSERDIR) $(ROOTLESSDIR) $(MIDAMAGEDIR)
-XWINOBJS = $(XWINDDXDIR)/stubs.o $(XWINDDXDIR)/XWin.res
-XWINLIBS = PreFbLibs $(XWINLIB) FbPostFbLibs $(XWINLIB) $(XWINLAYERLIB) \
- $(SHADOW) $(XWINPARSERLIB) $(ROOTLESSLIB) $(OS)
-#if BuildXWinMultiWindow || BuildXWinClipboard
-XWINX11 = $(XONLYLIB)
-# if defined(Win32Architecture)
-PTHREADLIB = -lpthreadGC2
-# endif
-#endif
-#if defined(Win32Architecture)
-# if defined(GlxUseWindows) && GlxUseWindows
-XWINGL32 = -lopengl32
-# endif
-XWINW32 = -lgdi32 -lwsock32 $(XWINGL32) $(PTHREADLIB)
-#else
-XWINW32 = -lgdi32
-#endif
-XWINSYSLIBS = $(FONTLIBS) $(LDPRELIBS) $(XWINX11) $(SYSLIBS) $(XWINW32)
-
-EXTRA_LDOPTIONS = -e _mainCRTStartup
-
-#if HasParallelMake
-MakeMutex($(XWINDIRS) $(XWINOBJS) $(XWINLIB) $(XWINLIBS) $(XWINSYSLIBS))
-#endif
-
-#if ForceServerRemake
-$(XWINOBJS) $(XWINLIB) $(XWINLIBS) $(XWINSYSLIBS):: $(XWINDIRS)
- @if [ -f $@ ]; then touch $@ >/dev/null 2>&1 || exit 0; fi
-#endif
-
-#ifdef mingwArchitecture
-XWINSERVERNAME=Xming
-XWINGLSERVERNAME=XmingGL
-#else
-XWINSERVERNAME=XWin
-XWINGLSERVERNAME=XWin_GL
-#endif
-ServerTarget($(XWINSERVERNAME),$(XWINDIRS),$(XWINOBJS), \
- $(LIBCWRAPPER) $(XWINLIBS) $(LOADABLEEXTS),$(XWINSYSLIBS))
-#if defined(cygwinArchitecture) && defined(GlxUseWindows) && GlxUseWindows
-ServerTarget($(XWINGLSERVERNAME),$(XWINDIRS),$(XWINOBJS), \
- $(LIBCWRAPPER) $(XWINLIBS) $(LOADABLEEXTS),$(XWINSYSLIBS) \
- $(XWINOPENGLLIB))
-#endif
-
-#ifndef ServerToInstall
-# define ServerToInstall $(XWINSERVERNAME)
-#endif
-
-#endif /* XWinServer */
-
-
#if defined(NXWinServer) && NXWinServer
XCOMM
XCOMM X Server for MS Windows
@@ -1423,127 +954,12 @@ ServerTarget(NXWin,$(NXWINDIRS),$(NXWINOBJS), \
#endif /* NXWinServer */
#endif
-#ifdef DarwinArchitecture
-/*
- * To allow building even when building the client-side libraries is turned
- * off, libraries in ProjectRoot are listed as dependencies for some targets.
- * This causes problems unless we tell make where to find these dependencies.
- */
-VPATH = $(BUILDLIBDIR):$(USRLIBDIR)
-#endif
-
-#if defined(XDarwinServer) && XDarwinServer
-XCOMM
-XCOMM X Darwin server for Mac OS X / Darwin
-XCOMM
-FBSUBDIR = fb
-MIDAMAGEDIR = miext/damage
-SHADOWDIR = miext/shadow
-ROOTLESSDIR = miext/rootless
-DARWINDDXDIR = hw/darwin
-DARWINDIRS = $(STDDIRS) $(FBDIR) $(SHADOWDIR) $(DARWINDDXDIR) $(DEPDIRS)
-DARWINOBJS = $(DARWINDDXDIR)/miinitext.o
-DARWINLIBS = PreFbLibs $(DARWINDDXDIR)/LibraryTargetName(darwin)
-DARWINEXTLIBS = MiExtLibs FbPostFbLibs $(DARWINDDXDIR)/LibraryTargetName(darwin)
-DARWINSYSLIBS = $(FONTLIBS) $(SYSLIBS) -framework IOKit
-IOKITLIB = $(DARWINDDXDIR)/iokit/LibraryTargetName(iokit)
-
-/*
- * IOKit X server
- */
-SetUIDServerTarget(XDarwin,$(DARWINDIRS),$(DARWINOBJS), \
- $(DARWINLIBS) $(IOKITLIB) $(DARWINEXTLIBS),$(DARWINSYSLIBS))
-
-#if DarwinQuartzSupport
-
-QUARTZDIR = $(DARWINDDXDIR)/quartz
-QUARTZLIB = $(QUARTZDIR)/LibraryTargetName(XQuartz)
-QUARTZSYSLIBS = -framework ApplicationServices -framework Cocoa \
- -framework CoreAudio -framework Carbon -ObjC
-ROOTLESSLIB = $(ROOTLESSDIR)/LibraryTargetName(rootless) \
- $(ROOTLESSDIR)/safeAlpha/LibraryTargetName(safeAlpha) \
- $(ROOTLESSDIR)/accel/LibraryTargetName(rlAccel)
-XPLUGINLIB = XpluginLibrary
-
-#if NothingOutsideProjectRoot
-XDARWINAPPDIR = $(BINDIR)/XDarwin.app/Contents
-#else
-XDARWINAPPDIR = /Applications/XDarwin.app/Contents
-#endif
-
-/*
- * Quartz X server (installed in its application bundle)
- */
-SetUIDServerTarget(XDarwinApp,$(DARWINDIRS),$(DARWINOBJS), \
- $(DARWINLIBS) $(QUARTZLIB) $(DARWINEXTLIBS), \
- $(DARWINSYSLIBS) $(QUARTZSYSLIBS) -u _miDCInitialize)
-
-install::
- $(MKDIRHIER) $(DESTDIR)$(XDARWINAPPDIR)/MacOS
- $(MV) $(DESTDIR)$(BINDIR)/XDarwinApp \
- $(DESTDIR)$(XDARWINAPPDIR)/MacOS/XDarwin
- -(cd $(DESTDIR)$(BINDIR); $(RM) XDarwinQuartz; \
- $(LN) $(XDARWINAPPDIR)/MacOS/XDarwin XDarwinQuartz)
-
-/*
- * Display mode bundles for Quartz
- * (installed in their own bundles inside XDarwin's)
- */
-#if HasXplugin
-XPRDIRS = $(QUARTZDIR)/xpr $(ROOTLESSDIR) $(ROOTLESSDIR)/safeAlpha
-XPRLIBS = $(QUARTZDIR)/xpr/LibraryTargetName(xpr) $(ROOTLESSLIB)
-
-BundleProgramTarget(xpr,XDarwinApp,$(XPRDIRS),$(QUARTZDIR)/xpr/xprScreen.o, \
- $(XPRLIBS),-framework ApplicationServices \
- $(XPLUGINLIB),$(XDARWINAPPDIR)/Resources)
-#endif
-
-CRDIRS = $(QUARTZDIR)/cr $(ROOTLESSDIR) $(ROOTLESSDIR)/safeAlpha
-CRLIBS = $(QUARTZDIR)/cr/LibraryTargetName(cr) $(ROOTLESSLIB)
-
-BundleProgramTarget(cr,XDarwinApp,$(CRDIRS),$(QUARTZDIR)/cr/crScreen.o, \
- $(CRLIBS),-framework ApplicationServices -framework Cocoa \
- -framework Carbon -ObjC,$(XDARWINAPPDIR)/Resources)
-
-FSDIRS = $(QUARTZDIR)/fullscreen $(SHADOWDIR)
-FSLIBS = $(QUARTZDIR)/fullscreen/LibraryTargetName(fullscreen) $(SHADOW)
-
-BundleProgramTarget(fullscreen,XDarwinApp,$(FSDIRS), \
- $(QUARTZDIR)/fullscreen/fullscreen.o,$(FSLIBS), \
- -framework ApplicationServices,$(XDARWINAPPDIR)/Resources)
-
-/*
- * GLX bundles for Quartz
- * (installed in their own bundles inside XDarwin's)
- */
-BundleProgramTarget(glxAGL,XDarwinApp,GL,GL/glx/glxext.o,GL/glx/libglx.a \
- GL/apple/libAGLcore.a, \
- -framework AGL -framework OpenGL,$(XDARWINAPPDIR)/Resources)
-
-#if BuildAppleDRI
-BundleProgramTarget(glxCGL,XDarwinApp,GL,GL/glx/glxext.o,GL/glx/libglx.a \
- GL/apple/libCGLcore.a, \
- -framework OpenGL $(XPLUGINLIB),$(XDARWINAPPDIR)/Resources)
-#endif
-
-BundleProgramTarget(glxMesa,XDarwinApp,GL,GL/glx/glxext.o,GL/glx/libglx.a \
- GL/mesa/GLcore/libGLcore.a,NullParameter,$(XDARWINAPPDIR)/Resources)
-
-#else /* !DarwinQuartzSupport */
-
-#define ServerToInstall XDarwin
-
-#endif /* DarwinQuartzSupport */
-
-#endif /* XDarwinServer */
-
-
CFBSUBDIRS = $(CFB8SUBDIR) $(CFB16SUBDIR) $(CFB24SUBDIR) $(CFB32SUBDIR)
MIEXTDIRS = $(SHADOWDIR) $(LAYERDIR) $(ROOTLESSDIR) $(MIDAMAGEDIR)
IPLANDIRS = $(IPLAN2P2DIR) $(IPLAN2P4DIR) $(IPLAN2P8DIR)
DDXDIRS = $(DECWSDDXDIR) $(SUNDDXDIR) $(LYNXDDXDIR) \
- $(HPDDXDIR) $(XFREE86DDXDIR) $(XWINDDXDIR) $(DARWINDDXDIR) \
- $(XVFBDDXDIR) $(XNESTDDXDIR) $(XDMXDDXDIR) $(NXAGENTDDXDIR) $(NXWINDDXDIR)
+ $(HPDDXDIR) $(XFREE86DDXDIR) \
+ $(NXAGENTDDXDIR) $(NXWINDDXDIR)
SUBDIRS = $(STDDIRS) $(MFBSUBDIR) $(CFBSUBDIRS) \
$(IPLANDIRS) $(ILBMDIR) $(AFBSUBDIR) \
$(DDXDIRS) $(FBSUBDIR) $(KDRIVEDIRS) $(MIEXTDIRS)
diff --git a/nx-X11/programs/Xserver/Xext/Imakefile b/nx-X11/programs/Xserver/Xext/Imakefile
index b75f8913b..6c2c060f8 100644
--- a/nx-X11/programs/Xserver/Xext/Imakefile
+++ b/nx-X11/programs/Xserver/Xext/Imakefile
@@ -113,11 +113,6 @@ XF86BIGFOBJS = xf86bigfont.o
PNRXOBJS = panoramiX.o panoramiXSwap.o panoramiXprocs.o
PNRXINCLUDES = -I$(FONTINCSRC) -I../mi -I../render
#endif
-#if XdmxServer
- DMXSRCS = dmx.c
- DMXOBJS = dmx.o
- DMXINCLUDES = -I../hw/dmx
-#endif
#if BuildDPMS
DPMSSRCS = dpms.c
DPMSOBJS = dpms.o
@@ -136,16 +131,11 @@ XF86BIGFOBJS = xf86bigfont.o
XEVIEOBJS = xevie.o
#endif
-#if BuildXprint
- XPRINTSRCS = xprint.c
- XPRINTOBJS = xprint.o
-#endif
-
SRCS = shape.c $(SHMSRCS) $(MULTIBUFSRC) \
mitmisc.c xtest.c xtest1di.c xtest1dd.c sleepuntil.c \
bigreq.c sync.c $(SCRNSAVSRC) xcmisc.c $(VIDMODESRCS) \
$(XF86MISCSRCS) $(XF86BIGFSRCS) $(XF86DGASRCS) $(SECURITYSRCS) \
- $(APPGROUPSRCS) $(XPRINTSRCS) $(CUPSRCS) $(PNRXSRCS) $(DPMSSRCS) \
+ $(APPGROUPSRCS) $(CUPSRCS) $(PNRXSRCS) $(DPMSSRCS) \
$(XEVIESRCS) \
$(EVISRCS) $(XVSRCS) $(FONTCACHESRCS) $(XRESSRCS) $(DMXSRCS)
@@ -153,11 +143,11 @@ XF86BIGFOBJS = xf86bigfont.o
mitmisc.o xtest.o xtest1di.o xtest1dd.o sleepuntil.o \
bigreq.o sync.o $(SCRNSAVOBJ) xcmisc.o $(VIDMODEOBJS) \
$(XF86MISCOBJS) $(XF86BIGFOBJS) $(XF86DGAOBJS) $(SECURITYOBJS) \
- $(APPGROUPOBJS) $(XPRINTOBJS) $(CUPOBJS) $(PNRXOBJS) $(DPMSOBJS) \
+ $(APPGROUPOBJS) $(CUPOBJS) $(PNRXOBJS) $(DPMSOBJS) \
$(XEVIEOBJS) \
$(EVIOBJS) $(XVOBJS) $(FONTCACHEOBJS) $(XRESOBJS) $(DMXOBJS)
- SOBJS = $(SHMOBJS) $(APPGROUPOBJS) $(SECURITYOBJS) $(XPRINTOBJS) \
+ SOBJS = $(SHMOBJS) $(APPGROUPOBJS) $(SECURITYOBJS) \
shape.o xtest.o xtest1di.o xtest1dd.o sleepuntil.o $(PNRXOBJS) \
$(XEVIEOBJS) \
$(XF86BIGFOBJS)
diff --git a/nx-X11/programs/Xserver/Xext/dmx.c b/nx-X11/programs/Xserver/Xext/dmx.c
deleted file mode 100644
index 75623e696..000000000
--- a/nx-X11/programs/Xserver/Xext/dmx.c
+++ /dev/null
@@ -1,1133 +0,0 @@
-/* $XFree86$ */
-/*
- * Copyright 2002-2004 Red Hat Inc., Durham, North Carolina.
- *
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation on the rights to use, copy, modify, merge,
- * publish, distribute, sublicense, and/or sell copies of the Software,
- * and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included 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
- * NON-INFRINGEMENT. IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
- * 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.
- */
-
-/*
- * Authors:
- * Rickard E. (Rik) Faith <faith@redhat.com>
- *
- */
-
-/** \file
- * This file implements the server-side part of the DMX protocol. A
- * vector of fucntions is provided at extension initialization time, so
- * most all of the useful functions in this file are declared static and
- * do not appear in the doxygen documentation.
- *
- * Much of the low-level work is done by functions in #dmxextension.c
- *
- * Please see the Client-to-Server DMX Extension to the X Protocol
- * document for details about the protocol. */
-
-#ifdef HAVE_DMX_CONFIG_H
-#include <dmx-config.h>
-#endif
-
-#include <X11/X.h>
-#include <X11/Xproto.h>
-#include "misc.h"
-#include "os.h"
-#include "dixstruct.h"
-#define EXTENSION_PROC_ARGS void *
-#include "extnsionst.h"
-#include "opaque.h"
-
-#include "dmxextension.h"
-#include <X11/extensions/dmxproto.h>
-
-#define _DMX_SERVER_
-#include <X11/extensions/dmxext.h>
-
-#ifdef PANORAMIX
-#include "panoramiX.h"
-extern unsigned long XRT_WINDOW;
-extern int PanoramiXNumScreens;
-#endif
-
-extern void DMXExtensionInit(void);
-
-static unsigned char DMXCode;
-
-static DISPATCH_PROC(ProcDMXDispatch);
-static DISPATCH_PROC(ProcDMXQueryVersion);
-static DISPATCH_PROC(ProcDMXSync);
-static DISPATCH_PROC(ProcDMXForceWindowCreation);
-static DISPATCH_PROC(ProcDMXGetScreenCount);
-static DISPATCH_PROC(ProcDMXGetScreenAttributes);
-static DISPATCH_PROC(ProcDMXChangeScreensAttributes);
-static DISPATCH_PROC(ProcDMXAddScreen);
-static DISPATCH_PROC(ProcDMXRemoveScreen);
-static DISPATCH_PROC(ProcDMXGetWindowAttributes);
-static DISPATCH_PROC(ProcDMXGetDesktopAttributes);
-static DISPATCH_PROC(ProcDMXChangeDesktopAttributes);
-static DISPATCH_PROC(ProcDMXGetInputCount);
-static DISPATCH_PROC(ProcDMXGetInputAttributes);
-static DISPATCH_PROC(ProcDMXAddInput);
-static DISPATCH_PROC(ProcDMXRemoveInput);
-
-static DISPATCH_PROC(SProcDMXDispatch);
-static DISPATCH_PROC(SProcDMXQueryVersion);
-static DISPATCH_PROC(SProcDMXSync);
-static DISPATCH_PROC(SProcDMXForceWindowCreation);
-static DISPATCH_PROC(SProcDMXGetScreenCount);
-static DISPATCH_PROC(SProcDMXGetScreenAttributes);
-static DISPATCH_PROC(SProcDMXChangeScreensAttributes);
-static DISPATCH_PROC(SProcDMXAddScreen);
-static DISPATCH_PROC(SProcDMXRemoveScreen);
-static DISPATCH_PROC(SProcDMXGetWindowAttributes);
-static DISPATCH_PROC(SProcDMXGetDesktopAttributes);
-static DISPATCH_PROC(SProcDMXChangeDesktopAttributes);
-static DISPATCH_PROC(SProcDMXGetInputCount);
-static DISPATCH_PROC(SProcDMXGetInputAttributes);
-static DISPATCH_PROC(SProcDMXAddInput);
-static DISPATCH_PROC(SProcDMXRemoveInput);
-
-static int _DMXXineramaActive(void)
-{
-#ifdef PANORAMIX
- return !noPanoramiXExtension;
-#endif
- return 0;
-}
-
-static void DMXResetProc(ExtensionEntry *extEntry)
-{
-}
-
-/** Initialize the extension. */
-void DMXExtensionInit(void)
-{
- ExtensionEntry *extEntry;
-
- if ((extEntry = AddExtension(DMX_EXTENSION_NAME, 0, 0,
- ProcDMXDispatch, SProcDMXDispatch,
- DMXResetProc, StandardMinorOpcode)))
- DMXCode = extEntry->base;
-}
-
-static void dmxSetScreenAttribute(int bit, DMXScreenAttributesPtr attr,
- CARD32 value)
-{
- switch (1 << bit) {
- case DMXScreenWindowWidth: attr->screenWindowWidth = value; break;
- case DMXScreenWindowHeight: attr->screenWindowHeight = value; break;
- case DMXScreenWindowXoffset: attr->screenWindowXoffset = value; break;
- case DMXScreenWindowYoffset: attr->screenWindowYoffset = value; break;
- case DMXRootWindowWidth: attr->rootWindowWidth = value; break;
- case DMXRootWindowHeight: attr->rootWindowHeight = value; break;
- case DMXRootWindowXoffset: attr->rootWindowXoffset = value; break;
- case DMXRootWindowYoffset: attr->rootWindowYoffset = value; break;
- case DMXRootWindowXorigin: attr->rootWindowXorigin = value; break;
- case DMXRootWindowYorigin: attr->rootWindowYorigin = value; break;
- }
-}
-
-static int dmxFetchScreenAttributes(unsigned int mask,
- DMXScreenAttributesPtr attr,
- CARD32 *value_list)
-{
- int i;
- CARD32 *value = value_list;
- int count = 0;
-
- for (i = 0; i < 32; i++) {
- if (mask & (1 << i)) {
- dmxSetScreenAttribute(i, attr, *value);
- ++value;
- ++count;
- }
- }
- return count;
-}
-
-static void dmxSetDesktopAttribute(int bit, DMXDesktopAttributesPtr attr,
- CARD32 value)
-{
- switch (1 << bit) {
- case DMXDesktopWidth: attr->width = value; break;
- case DMXDesktopHeight: attr->height = value; break;
- case DMXDesktopShiftX: attr->shiftX = value; break;
- case DMXDesktopShiftY: attr->shiftY = value; break;
- }
-}
-
-static int dmxFetchDesktopAttributes(unsigned int mask,
- DMXDesktopAttributesPtr attr,
- CARD32 *value_list)
-{
- int i;
- CARD32 *value = value_list;
- int count = 0;
-
- for (i = 0; i < 32; i++) {
- if (mask & (1 << i)) {
- dmxSetDesktopAttribute(i, attr, *value);
- ++value;
- ++count;
- }
- }
- return count;
-}
-
-static void dmxSetInputAttribute(int bit, DMXInputAttributesPtr attr,
- CARD32 value)
-{
- switch (1 << bit) {
- case DMXInputType: attr->inputType = value; break;
- case DMXInputPhysicalScreen: attr->physicalScreen = value; break;
- case DMXInputSendsCore: attr->sendsCore = !!value; break;
- }
-}
-
-static int dmxFetchInputAttributes(unsigned int mask,
- DMXInputAttributesPtr attr,
- CARD32 *value_list)
-{
- int i;
- CARD32 *value = value_list;
- int count = 0;
-
- for (i = 0; i < 32; i++) {
- if (mask & (1 << i)) {
- dmxSetInputAttribute(i, attr, *value);
- ++value;
- ++count;
- }
- }
- return count;
-}
-
-static int ProcDMXQueryVersion(ClientPtr client)
-{
- xDMXQueryVersionReply rep;
- int n;
-
- REQUEST_SIZE_MATCH(xDMXQueryVersionReq);
-
- rep.type = X_Reply;
- rep.sequenceNumber = client->sequence;
- rep.length = 0;
- rep.majorVersion = DMX_EXTENSION_MAJOR;
- rep.minorVersion = DMX_EXTENSION_MINOR;
- rep.patchVersion = DMX_EXTENSION_PATCH;
- if (client->swapped) {
- swaps(&rep.sequenceNumber, n);
- swapl(&rep.length, n);
- swapl(&rep.majorVersion, n);
- swapl(&rep.minorVersion, n);
- swapl(&rep.patchVersion, n);
- }
- WriteToClient(client, sizeof(xDMXQueryVersionReply), (char *)&rep);
- return client->noClientException;
-}
-
-static int ProcDMXSync(ClientPtr client)
-{
- xDMXSyncReply rep;
- int n;
-
- REQUEST_SIZE_MATCH(xDMXSyncReq);
-
- dmxFlushPendingSyncs();
-
- rep.type = X_Reply;
- rep.sequenceNumber = client->sequence;
- rep.length = 0;
- rep.status = 0;
- if (client->swapped) {
- swaps(&rep.sequenceNumber, n);
- swapl(&rep.length, n);
- swapl(&rep.status, n);
- }
- WriteToClient(client, sizeof(xDMXSyncReply), (char *)&rep);
- return client->noClientException;
-}
-
-static int ProcDMXForceWindowCreation(ClientPtr client)
-{
- xDMXForceWindowCreationReply rep;
- REQUEST(xDMXForceWindowCreationReq);
- WindowPtr pWin;
- int n;
-
- REQUEST_SIZE_MATCH(xDMXForceWindowCreationReq);
-
-#ifdef PANORAMIX
- if (!noPanoramiXExtension) {
- PanoramiXRes *win;
- int i;
-
- if (!(win = SecurityLookupIDByType(client, stuff->window, XRT_WINDOW,
- SecurityReadAccess)))
- return -1; /* BadWindow */
-
- FOR_NSCREENS(i) {
- if (!(pWin = SecurityLookupWindow(win->info[i].id, client,
- SecurityReadAccess)))
- return -1; /* BadWindow */
-
- dmxForceWindowCreation(pWin);
- }
- goto doreply;
- }
-#endif
-
- if (!(pWin = SecurityLookupWindow(stuff->window, client,
- SecurityReadAccess)))
- return -1; /* BadWindow */
-
- dmxForceWindowCreation(pWin);
- doreply:
- dmxFlushPendingSyncs();
- rep.type = X_Reply;
- rep.sequenceNumber = client->sequence;
- rep.length = 0;
- rep.status = 0;
- if (client->swapped) {
- swaps(&rep.sequenceNumber, n);
- swapl(&rep.length, n);
- swapl(&rep.status, n);
- }
- WriteToClient(client, sizeof(xDMXForceWindowCreationReply), (char *)&rep);
- return Success;
-}
-
-static int ProcDMXGetScreenCount(ClientPtr client)
-{
- xDMXGetScreenCountReply rep;
- int n;
-
- REQUEST_SIZE_MATCH(xDMXGetScreenCountReq);
-
- rep.type = X_Reply;
- rep.sequenceNumber = client->sequence;
- rep.length = 0;
- rep.screenCount = dmxGetNumScreens();
- if (client->swapped) {
- swaps(&rep.sequenceNumber, n);
- swapl(&rep.length, n);
- swapl(&rep.screenCount, n);
- }
- WriteToClient(client, sizeof(xDMXGetScreenCountReply), (char *)&rep);
- return client->noClientException;
-}
-
-static int ProcDMXGetScreenAttributes(ClientPtr client)
-{
- REQUEST(xDMXGetScreenAttributesReq);
- xDMXGetScreenAttributesReply rep;
- int n;
- int length;
- int paddedLength;
- DMXScreenAttributesRec attr;
-
- REQUEST_SIZE_MATCH(xDMXGetScreenAttributesReq);
-
- if (stuff->physicalScreen < 0
- || stuff->physicalScreen >= dmxGetNumScreens()) return BadValue;
-
- if (!dmxGetScreenAttributes(stuff->physicalScreen, &attr))
- return BadValue;
-
- rep.logicalScreen = attr.logicalScreen;
- rep.screenWindowWidth = attr.screenWindowWidth;
- rep.screenWindowHeight = attr.screenWindowHeight;
- rep.screenWindowXoffset = attr.screenWindowXoffset;
- rep.screenWindowYoffset = attr.screenWindowYoffset;
- rep.rootWindowWidth = attr.rootWindowWidth;
- rep.rootWindowHeight = attr.rootWindowHeight;
- rep.rootWindowXoffset = attr.rootWindowXoffset;
- rep.rootWindowYoffset = attr.rootWindowYoffset;
- rep.rootWindowXorigin = attr.rootWindowXorigin;
- rep.rootWindowYorigin = attr.rootWindowYorigin;
-
- length = attr.displayName ? strlen(attr.displayName) : 0;
- paddedLength = (length + 3) & ~3;
- rep.type = X_Reply;
- rep.sequenceNumber = client->sequence;
- rep.length = paddedLength >> 2;
- rep.displayNameLength = length;
-
- if (client->swapped) {
- swaps(&rep.sequenceNumber, n);
- swapl(&rep.length, n);
- swapl(&rep.displayNameLength, n);
- swapl(&rep.logicalScreen, n);
- swaps(&rep.screenWindowWidth, n);
- swaps(&rep.screenWindowHeight, n);
- swaps(&rep.screenWindowXoffset, n);
- swaps(&rep.screenWindowYoffset, n);
- swaps(&rep.rootWindowWidth, n);
- swaps(&rep.rootWindowHeight, n);
- swaps(&rep.rootWindowXoffset, n);
- swaps(&rep.rootWindowYoffset, n);
- swaps(&rep.rootWindowXorigin, n);
- swaps(&rep.rootWindowYorigin, n);
- }
- WriteToClient(client, sizeof(xDMXGetScreenAttributesReply), (char *)&rep);
- if (length) WriteToClient(client, length, (char *)attr.displayName);
- return client->noClientException;
-}
-
-static int ProcDMXChangeScreensAttributes(ClientPtr client)
-{
- REQUEST(xDMXChangeScreensAttributesReq);
- xDMXChangeScreensAttributesReply rep;
- int n;
- int status = DMX_BAD_XINERAMA;
- unsigned int mask = 0;
- unsigned int i;
- CARD32 *screen_list;
- CARD32 *mask_list;
- CARD32 *value_list;
- DMXScreenAttributesPtr attribs;
- int errorScreen = 0;
- unsigned int len;
- int ones = 0;
-
-
- REQUEST_AT_LEAST_SIZE(xDMXChangeScreensAttributesReq);
- len = client->req_len - (sizeof(xDMXChangeScreensAttributesReq) >> 2);
- if (len < stuff->screenCount + stuff->maskCount)
- return BadLength;
-
- screen_list = (CARD32 *)(stuff + 1);
- mask_list = &screen_list[stuff->screenCount];
- value_list = &mask_list[stuff->maskCount];
-
- for (i = 0; i < stuff->maskCount; i++) ones += Ones(mask_list[i]);
- if (len != stuff->screenCount + stuff->maskCount + ones)
- return BadLength;
-
- if (!_DMXXineramaActive()) goto noxinerama;
-
- if (!(attribs = ALLOCATE_LOCAL(stuff->screenCount * sizeof(*attribs))))
- return BadAlloc;
-
- for (i = 0; i < stuff->screenCount; i++) {
- int count;
-
- if (i < stuff->maskCount) mask = mask_list[i];
- dmxGetScreenAttributes(screen_list[i], &attribs[i]);
- count = dmxFetchScreenAttributes(mask, &attribs[i], value_list);
- value_list += count;
- }
-
-#if PANORAMIX
- status = dmxConfigureScreenWindows(stuff->screenCount,
- screen_list,
- attribs,
- &errorScreen);
-#endif
-
- DEALLOCATE_LOCAL(attribs);
-
- if (status == BadValue) return status;
-
- noxinerama:
- rep.type = X_Reply;
- rep.sequenceNumber = client->sequence;
- rep.length = 0;
- rep.status = status;
- rep.errorScreen = errorScreen;
- if (client->swapped) {
- swaps(&rep.sequenceNumber, n);
- swapl(&rep.length, n);
- swapl(&rep.status, n);
- swapl(&rep.errorScreen, n);
- }
- WriteToClient(client,
- sizeof(xDMXChangeScreensAttributesReply),
- (char *)&rep);
- return client->noClientException;
-}
-
-static int ProcDMXAddScreen(ClientPtr client)
-{
- REQUEST(xDMXAddScreenReq);
- xDMXAddScreenReply rep;
- int n;
- int status = 0;
- CARD32 *value_list;
- DMXScreenAttributesRec attr;
- int count;
- char *name;
- int len;
- int paddedLength;
-
- REQUEST_AT_LEAST_SIZE(xDMXAddScreenReq);
- paddedLength = (stuff->displayNameLength + 3) & ~3;
- len = client->req_len - (sizeof(xDMXAddScreenReq) >> 2);
- if (len != Ones(stuff->valueMask) + paddedLength/4)
- return BadLength;
-
- memset(&attr, 0, sizeof(attr));
- dmxGetScreenAttributes(stuff->physicalScreen, &attr);
- value_list = (CARD32 *)(stuff + 1);
- count = dmxFetchScreenAttributes(stuff->valueMask, &attr, value_list);
-
- if (!(name = ALLOCATE_LOCAL(stuff->displayNameLength + 1 + 4)))
- return BadAlloc;
- memcpy(name, &value_list[count], stuff->displayNameLength);
- name[stuff->displayNameLength] = '\0';
- attr.displayName = name;
-
- status = dmxAttachScreen(stuff->physicalScreen, &attr);
-
- DEALLOCATE_LOCAL(name);
-
- rep.type = X_Reply;
- rep.sequenceNumber = client->sequence;
- rep.length = 0;
- rep.status = status;
- rep.physicalScreen = stuff->physicalScreen;
- if (client->swapped) {
- swaps(&rep.sequenceNumber, n);
- swapl(&rep.length, n);
- swapl(&rep.status, n);
- swapl(&rep.physicalScreen, n);
- }
- WriteToClient(client,
- sizeof(xDMXAddScreenReply),
- (char *)&rep);
- return client->noClientException;
-}
-
-static int ProcDMXRemoveScreen(ClientPtr client)
-{
- REQUEST(xDMXRemoveScreenReq);
- xDMXRemoveScreenReply rep;
- int n;
- int status = 0;
-
- REQUEST_SIZE_MATCH(xDMXRemoveScreenReq);
-
- status = dmxDetachScreen(stuff->physicalScreen);
-
- rep.type = X_Reply;
- rep.sequenceNumber = client->sequence;
- rep.length = 0;
- rep.status = status;
- if (client->swapped) {
- swaps(&rep.sequenceNumber, n);
- swapl(&rep.length, n);
- swapl(&rep.status, n);
- }
- WriteToClient(client,
- sizeof(xDMXRemoveScreenReply),
- (char *)&rep);
- return client->noClientException;
-}
-
-
-#ifdef PANORAMIX
-static int dmxPopulatePanoramiX(ClientPtr client, Window window,
- CARD32 *screens, CARD32 *windows,
- xRectangle *pos, xRectangle *vis)
-{
- WindowPtr pWin;
- PanoramiXRes *win;
- int i;
- int count = 0;
- DMXWindowAttributesRec attr;
-
- if (!(win = SecurityLookupIDByType(client, window, XRT_WINDOW,
- SecurityReadAccess)))
- return -1; /* BadWindow */
-
- FOR_NSCREENS(i) {
- if (!(pWin = SecurityLookupWindow(win->info[i].id, client,
- SecurityReadAccess)))
- return -1; /* BadWindow */
- if (dmxGetWindowAttributes(pWin, &attr)) {
- screens[count] = attr.screen;
- windows[count] = attr.window;
- pos[count] = attr.pos;
- vis[count] = attr.vis;
- ++count; /* Only count existing windows */
- }
- }
- return count;
-}
-#endif
-
-static int dmxPopulate(ClientPtr client, Window window, CARD32 *screens,
- CARD32 *windows, xRectangle *pos, xRectangle *vis)
-{
- WindowPtr pWin;
- DMXWindowAttributesRec attr;
-
-#ifdef PANORAMIX
- if (!noPanoramiXExtension)
- return dmxPopulatePanoramiX(client, window, screens, windows,
- pos, vis);
-#endif
-
- if (!(pWin = SecurityLookupWindow(window, client, SecurityReadAccess)))
- return -1; /* BadWindow */
-
- dmxGetWindowAttributes(pWin, &attr);
- *screens = attr.screen;
- *windows = attr.window;
- *pos = attr.pos;
- *vis = attr.vis;
- return 1;
-}
-
-static int dmxMaxNumScreens(void)
-{
-#ifdef PANORAMIX
- if (!noPanoramiXExtension) return PanoramiXNumScreens;
-#endif
- return 1;
-}
-
-static int ProcDMXGetWindowAttributes(ClientPtr client)
-{
- REQUEST(xDMXGetWindowAttributesReq);
- xDMXGetWindowAttributesReply rep;
- int i, n;
- CARD32 *screens;
- CARD32 *windows;
- xRectangle *pos, *vis;
- int count = dmxMaxNumScreens();
-
- REQUEST_SIZE_MATCH(xDMXGetWindowAttributesReq);
-
- if (!(screens = ALLOCATE_LOCAL(count * sizeof(*screens))))
- return BadAlloc;
- if (!(windows = ALLOCATE_LOCAL(count * sizeof(*windows)))) {
- DEALLOCATE_LOCAL(screens);
- return BadAlloc;
- }
- if (!(pos = ALLOCATE_LOCAL(count * sizeof(*pos)))) {
- DEALLOCATE_LOCAL(windows);
- DEALLOCATE_LOCAL(screens);
- return BadAlloc;
- }
- if (!(vis = ALLOCATE_LOCAL(count * sizeof(*vis)))) {
- DEALLOCATE_LOCAL(pos);
- DEALLOCATE_LOCAL(windows);
- DEALLOCATE_LOCAL(screens);
- return BadAlloc;
- }
-
- if ((count = dmxPopulate(client, stuff->window, screens, windows,
- pos, vis)) < 0) {
- DEALLOCATE_LOCAL(vis);
- DEALLOCATE_LOCAL(pos);
- DEALLOCATE_LOCAL(windows);
- DEALLOCATE_LOCAL(screens);
- return BadWindow;
- }
-
- rep.type = X_Reply;
- rep.sequenceNumber = client->sequence;
- rep.length = count * 6;
- rep.screenCount = count;
- if (client->swapped) {
- swaps(&rep.sequenceNumber, n);
- swapl(&rep.length, n);
- swapl(&rep.screenCount, n);
- for (i = 0; i < count; i++) {
- swapl(&screens[i], n);
- swapl(&windows[i], n);
-
- swaps(&pos[i].x, n);
- swaps(&pos[i].y, n);
- swaps(&pos[i].width, n);
- swaps(&pos[i].height, n);
-
- swaps(&vis[i].x, n);
- swaps(&vis[i].y, n);
- swaps(&vis[i].width, n);
- swaps(&vis[i].height, n);
- }
- }
-
- dmxFlushPendingSyncs();
-
- WriteToClient(client, sizeof(xDMXGetWindowAttributesReply), (char *)&rep);
- if (count) {
- WriteToClient(client, count * sizeof(*screens), (char *)screens);
- WriteToClient(client, count * sizeof(*windows), (char *)windows);
- WriteToClient(client, count * sizeof(*pos), (char *)pos);
- WriteToClient(client, count * sizeof(*vis), (char *)vis);
- }
-
- DEALLOCATE_LOCAL(vis);
- DEALLOCATE_LOCAL(pos);
- DEALLOCATE_LOCAL(windows);
- DEALLOCATE_LOCAL(screens);
-
- return client->noClientException;
-}
-
-static int ProcDMXGetDesktopAttributes(ClientPtr client)
-{
- xDMXGetDesktopAttributesReply rep;
- int n;
- DMXDesktopAttributesRec attr;
-
- REQUEST_SIZE_MATCH(xDMXGetDesktopAttributesReq);
-
- dmxGetDesktopAttributes(&attr);
-
- rep.width = attr.width;
- rep.height = attr.height;
- rep.shiftX = attr.shiftX;
- rep.shiftY = attr.shiftY;
-
- rep.type = X_Reply;
- rep.sequenceNumber = client->sequence;
- rep.length = 0;
-
- if (client->swapped) {
- swaps(&rep.sequenceNumber, n);
- swapl(&rep.length, n);
- swapl(&rep.width, n);
- swapl(&rep.height, n);
- swapl(&rep.shiftX, n);
- swapl(&rep.shiftY, n);
- }
- WriteToClient(client, sizeof(xDMXGetDesktopAttributesReply), (char *)&rep);
- return client->noClientException;
-}
-
-static int ProcDMXChangeDesktopAttributes(ClientPtr client)
-{
- REQUEST(xDMXChangeDesktopAttributesReq);
- xDMXChangeDesktopAttributesReply rep;
- int n;
- int status = DMX_BAD_XINERAMA;
- CARD32 *value_list;
- DMXDesktopAttributesRec attr;
- int len;
-
- REQUEST_AT_LEAST_SIZE(xDMXChangeDesktopAttributesReq);
- len = client->req_len - (sizeof(xDMXChangeDesktopAttributesReq) >> 2);
- if (len != Ones(stuff->valueMask))
- return BadLength;
-
- if (!_DMXXineramaActive()) goto noxinerama;
-
- value_list = (CARD32 *)(stuff + 1);
-
- dmxGetDesktopAttributes(&attr);
- dmxFetchDesktopAttributes(stuff->valueMask, &attr, value_list);
-
-#if PANORAMIX
- status = dmxConfigureDesktop(&attr);
-#endif
- if (status == BadValue) return status;
-
- noxinerama:
- rep.type = X_Reply;
- rep.sequenceNumber = client->sequence;
- rep.length = 0;
- rep.status = status;
- if (client->swapped) {
- swaps(&rep.sequenceNumber, n);
- swapl(&rep.length, n);
- swapl(&rep.status, n);
- }
- WriteToClient(client,
- sizeof(xDMXChangeDesktopAttributesReply),
- (char *)&rep);
- return client->noClientException;
-}
-
-static int ProcDMXGetInputCount(ClientPtr client)
-{
- xDMXGetInputCountReply rep;
- int n;
-
- REQUEST_SIZE_MATCH(xDMXGetInputCountReq);
-
- rep.type = X_Reply;
- rep.sequenceNumber = client->sequence;
- rep.length = 0;
- rep.inputCount = dmxGetInputCount();
- if (client->swapped) {
- swaps(&rep.sequenceNumber, n);
- swapl(&rep.length, n);
- swapl(&rep.inputCount, n);
- }
- WriteToClient(client, sizeof(xDMXGetInputCountReply), (char *)&rep);
- return client->noClientException;
-}
-
-static int ProcDMXGetInputAttributes(ClientPtr client)
-{
- REQUEST(xDMXGetInputAttributesReq);
- xDMXGetInputAttributesReply rep;
- int n;
- int length;
- int paddedLength;
- DMXInputAttributesRec attr;
-
- REQUEST_SIZE_MATCH(xDMXGetInputAttributesReq);
-
- if (dmxGetInputAttributes(stuff->deviceId, &attr)) return BadValue;
- rep.inputType = attr.inputType;
- rep.physicalScreen = attr.physicalScreen;
- rep.physicalId = attr.physicalId;
- rep.isCore = attr.isCore;
- rep.sendsCore = attr.sendsCore;
- rep.detached = attr.detached;
-
- length = attr.name ? strlen(attr.name) : 0;
- paddedLength = (length + 3) & ~3;
- rep.type = X_Reply;
- rep.sequenceNumber = client->sequence;
- rep.length = paddedLength >> 2;
- rep.nameLength = length;
- if (client->swapped) {
- swaps(&rep.sequenceNumber, n);
- swapl(&rep.length, n);
- swapl(&rep.inputType, n);
- swapl(&rep.physicalScreen, n);
- swapl(&rep.physicalId, n);
- swapl(&rep.nameLength, n);
- }
- WriteToClient(client, sizeof(xDMXGetInputAttributesReply), (char *)&rep);
- if (length) WriteToClient(client, length, (char *)attr.name);
- return client->noClientException;
-}
-
-static int ProcDMXAddInput(ClientPtr client)
-{
- REQUEST(xDMXAddInputReq);
- xDMXAddInputReply rep;
- int n;
- int status = 0;
- CARD32 *value_list;
- DMXInputAttributesRec attr;
- int count;
- char *name;
- int len;
- int paddedLength;
- int id = -1;
-
- REQUEST_AT_LEAST_SIZE(xDMXAddInputReq);
- paddedLength = (stuff->displayNameLength + 3) & ~3;
- len = client->req_len - (sizeof(xDMXAddInputReq) >> 2);
- if (len != Ones(stuff->valueMask) + paddedLength/4)
- return BadLength;
-
- memset(&attr, 0, sizeof(attr));
- value_list = (CARD32 *)(stuff + 1);
- count = dmxFetchInputAttributes(stuff->valueMask, &attr, value_list);
-
- if (!(name = ALLOCATE_LOCAL(stuff->displayNameLength + 1 + 4)))
- return BadAlloc;
- memcpy(name, &value_list[count], stuff->displayNameLength);
- name[stuff->displayNameLength] = '\0';
- attr.name = name;
-
- status = dmxAddInput(&attr, &id);
-
- DEALLOCATE_LOCAL(name);
-
- if (status) return status;
-
- rep.type = X_Reply;
- rep.sequenceNumber = client->sequence;
- rep.length = 0;
- rep.status = status;
- rep.physicalId = id;
- if (client->swapped) {
- swaps(&rep.sequenceNumber, n);
- swapl(&rep.length, n);
- swapl(&rep.status, n);
- swapl(&rep.physicalId, n);
- }
- WriteToClient(client, sizeof(xDMXAddInputReply), (char *)&rep);
- return client->noClientException;
-}
-
-static int ProcDMXRemoveInput(ClientPtr client)
-{
- REQUEST(xDMXRemoveInputReq);
- xDMXRemoveInputReply rep;
- int n;
- int status = 0;
-
- REQUEST_SIZE_MATCH(xDMXRemoveInputReq);
-
- status = dmxRemoveInput(stuff->physicalId);
-
- if (status) return status;
-
- rep.type = X_Reply;
- rep.sequenceNumber = client->sequence;
- rep.length = 0;
- rep.status = status;
- if (client->swapped) {
- swaps(&rep.sequenceNumber, n);
- swapl(&rep.length, n);
- swapl(&rep.status, n);
- }
- WriteToClient(client, sizeof(xDMXRemoveInputReply), (char *)&rep);
- return client->noClientException;
-}
-
-static int ProcDMXDispatch(ClientPtr client)
-{
- REQUEST(xReq);
-
- switch (stuff->data) {
- case X_DMXQueryVersion: return ProcDMXQueryVersion(client);
- case X_DMXSync: return ProcDMXSync(client);
- case X_DMXForceWindowCreation: return ProcDMXForceWindowCreation(client);
- case X_DMXGetScreenCount: return ProcDMXGetScreenCount(client);
- case X_DMXGetScreenAttributes: return ProcDMXGetScreenAttributes(client);
- case X_DMXChangeScreensAttributes:
- return ProcDMXChangeScreensAttributes(client);
- case X_DMXAddScreen: return ProcDMXAddScreen(client);
- case X_DMXRemoveScreen: return ProcDMXRemoveScreen(client);
- case X_DMXGetWindowAttributes: return ProcDMXGetWindowAttributes(client);
- case X_DMXGetDesktopAttributes: return ProcDMXGetDesktopAttributes(client);
- case X_DMXChangeDesktopAttributes:
- return ProcDMXChangeDesktopAttributes(client);
- case X_DMXGetInputCount: return ProcDMXGetInputCount(client);
- case X_DMXGetInputAttributes: return ProcDMXGetInputAttributes(client);
- case X_DMXAddInput: return ProcDMXAddInput(client);
- case X_DMXRemoveInput: return ProcDMXRemoveInput(client);
-
- case X_DMXGetScreenInformationDEPRECATED:
- case X_DMXForceWindowCreationDEPRECATED:
- case X_DMXReconfigureScreenDEPRECATED:
- return BadImplementation;
-
- default: return BadRequest;
- }
-}
-
-static int SProcDMXQueryVersion(ClientPtr client)
-{
- int n;
- REQUEST(xDMXQueryVersionReq);
-
- swaps(&stuff->length, n);
- REQUEST_SIZE_MATCH(xDMXQueryVersionReq);
- return ProcDMXQueryVersion(client);
-}
-
-static int SProcDMXSync(ClientPtr client)
-{
- int n;
- REQUEST(xDMXSyncReq);
-
- swaps(&stuff->length, n);
- REQUEST_SIZE_MATCH(xDMXSyncReq);
- return ProcDMXSync(client);
-}
-
-static int SProcDMXForceWindowCreation(ClientPtr client)
-{
- int n;
- REQUEST(xDMXForceWindowCreationReq);
-
- swaps(&stuff->length, n);
- REQUEST_SIZE_MATCH(xDMXForceWindowCreationReq);
- swaps(&stuff->window, n);
- return ProcDMXForceWindowCreation(client);
-}
-
-static int SProcDMXGetScreenCount(ClientPtr client)
-{
- int n;
- REQUEST(xDMXGetScreenCountReq);
-
- swaps(&stuff->length, n);
- REQUEST_SIZE_MATCH(xDMXGetScreenCountReq);
- return ProcDMXGetScreenCount(client);
-}
-
-static int SProcDMXGetScreenAttributes(ClientPtr client)
-{
- int n;
- REQUEST(xDMXGetScreenAttributesReq);
-
- swaps(&stuff->length, n);
- REQUEST_SIZE_MATCH(xDMXGetScreenAttributesReq);
- swapl(&stuff->physicalScreen, n);
- return ProcDMXGetScreenAttributes(client);
-}
-
-static int SProcDMXChangeScreensAttributes(ClientPtr client)
-{
- int n;
- REQUEST(xDMXChangeScreensAttributesReq);
-
- swaps(&stuff->length, n);
- REQUEST_AT_LEAST_SIZE(xDMXGetScreenAttributesReq);
- swapl(&stuff->screenCount, n);
- swapl(&stuff->maskCount, n);
- SwapRestL(stuff);
- return ProcDMXGetScreenAttributes(client);
-}
-
-static int SProcDMXAddScreen(ClientPtr client)
-{
- int n;
- int paddedLength;
- REQUEST(xDMXAddScreenReq);
-
- swaps(&stuff->length, n);
- REQUEST_AT_LEAST_SIZE(xDMXAddScreenReq);
- swapl(&stuff->displayNameLength, n);
- swapl(&stuff->valueMask, n);
- paddedLength = (stuff->displayNameLength + 3) & ~3;
- SwapLongs((CARD32 *)(stuff+1), LengthRestL(stuff) - paddedLength/4);
- return ProcDMXAddScreen(client);
-}
-
-static int SProcDMXRemoveScreen(ClientPtr client)
-{
- int n;
- REQUEST(xDMXRemoveScreenReq);
-
- swaps(&stuff->length, n);
- REQUEST_SIZE_MATCH(xDMXRemoveScreenReq);
- swapl(&stuff->physicalScreen, n);
- return ProcDMXRemoveScreen(client);
-}
-
-static int SProcDMXGetWindowAttributes(ClientPtr client)
-{
- int n;
- REQUEST(xDMXGetWindowAttributesReq);
-
- swaps(&stuff->length, n);
- REQUEST_SIZE_MATCH(xDMXGetWindowAttributesReq);
- swapl(&stuff->window, n);
- return ProcDMXGetWindowAttributes(client);
-}
-
-static int SProcDMXGetDesktopAttributes(ClientPtr client)
-{
- int n;
- REQUEST(xDMXGetDesktopAttributesReq);
-
- swaps(&stuff->length, n);
- REQUEST_SIZE_MATCH(xDMXGetDesktopAttributesReq);
- return ProcDMXGetDesktopAttributes(client);
-}
-
-static int SProcDMXChangeDesktopAttributes(ClientPtr client)
-{
- int n;
- REQUEST(xDMXChangeDesktopAttributesReq);
-
- swaps(&stuff->length, n);
- REQUEST_AT_LEAST_SIZE(xDMXChangeDesktopAttributesReq);
- swapl(&stuff->valueMask, n);
- SwapRestL(stuff);
- return ProcDMXChangeDesktopAttributes(client);
-}
-
-static int SProcDMXGetInputCount(ClientPtr client)
-{
- int n;
- REQUEST(xDMXGetInputCountReq);
-
- swaps(&stuff->length, n);
- REQUEST_SIZE_MATCH(xDMXGetInputCountReq);
- return ProcDMXGetInputCount(client);
-}
-
-static int SProcDMXGetInputAttributes(ClientPtr client)
-{
- int n;
- REQUEST(xDMXGetInputAttributesReq);
-
- swaps(&stuff->length, n);
- REQUEST_SIZE_MATCH(xDMXGetInputAttributesReq);
- swapl(&stuff->deviceId, n);
- return ProcDMXGetInputAttributes(client);
-}
-
-static int SProcDMXAddInput(ClientPtr client)
-{
- int n;
- int paddedLength;
- REQUEST(xDMXAddInputReq);
-
- swaps(&stuff->length, n);
- REQUEST_AT_LEAST_SIZE(xDMXAddInputReq);
- swapl(&stuff->displayNameLength, n);
- swapl(&stuff->valueMask, n);
- paddedLength = (stuff->displayNameLength + 3) & ~3;
- SwapLongs((CARD32 *)(stuff+1), LengthRestL(stuff) - paddedLength/4);
- return ProcDMXAddInput(client);
-}
-
-static int SProcDMXRemoveInput(ClientPtr client)
-{
- int n;
- REQUEST(xDMXRemoveInputReq);
-
- swaps(&stuff->length, n);
- REQUEST_SIZE_MATCH(xDMXRemoveInputReq);
- swapl(&stuff->physicalId, n);
- return ProcDMXRemoveInput(client);
-}
-
-static int SProcDMXDispatch (ClientPtr client)
-{
- REQUEST(xReq);
-
- switch (stuff->data) {
- case X_DMXQueryVersion: return SProcDMXQueryVersion(client);
- case X_DMXSync: return SProcDMXSync(client);
- case X_DMXForceWindowCreation: return SProcDMXForceWindowCreation(client);
- case X_DMXGetScreenCount: return SProcDMXGetScreenCount(client);
- case X_DMXGetScreenAttributes: return SProcDMXGetScreenAttributes(client);
- case X_DMXChangeScreensAttributes:
- return SProcDMXChangeScreensAttributes(client);
- case X_DMXAddScreen: return SProcDMXAddScreen(client);
- case X_DMXRemoveScreen: return SProcDMXRemoveScreen(client);
- case X_DMXGetWindowAttributes: return SProcDMXGetWindowAttributes(client);
- case X_DMXGetDesktopAttributes:
- return SProcDMXGetDesktopAttributes(client);
- case X_DMXChangeDesktopAttributes:
- return SProcDMXChangeDesktopAttributes(client);
- case X_DMXGetInputCount: return SProcDMXGetInputCount(client);
- case X_DMXGetInputAttributes: return SProcDMXGetInputAttributes(client);
- case X_DMXAddInput: return SProcDMXAddInput(client);
- case X_DMXRemoveInput: return SProcDMXRemoveInput(client);
-
- case X_DMXGetScreenInformationDEPRECATED:
- case X_DMXForceWindowCreationDEPRECATED:
- case X_DMXReconfigureScreenDEPRECATED:
- return BadImplementation;
-
- default: return BadRequest;
- }
-}
diff --git a/nx-X11/programs/Xserver/Xext/xprint.c b/nx-X11/programs/Xserver/Xext/xprint.c
deleted file mode 100644
index 60512d372..000000000
--- a/nx-X11/programs/Xserver/Xext/xprint.c
+++ /dev/null
@@ -1,2760 +0,0 @@
-/* $Xorg: xprint.c,v 1.5 2001/03/05 20:42:26 pookie Exp $ */
-/*
-(c) Copyright 1996 Hewlett-Packard Company
-(c) Copyright 1996 International Business Machines Corp.
-(c) Copyright 1996 Sun Microsystems, Inc.
-(c) Copyright 1996 Novell, Inc.
-(c) Copyright 1996 Digital Equipment Corp.
-(c) Copyright 1996 Fujitsu Limited
-(c) Copyright 1996 Hitachi, Ltd.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included 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
-COPYRIGHT HOLDERS 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 names of the copyright holders shall
-not be used in advertising or otherwise to promote the sale, use or other
-dealings in this Software without prior written authorization from said
-copyright holders.
-*/
-/*******************************************************************
-**
-** *********************************************************
-** *
-** * File: xprint.c
-** *
-** * Copyright: Copyright 1993, 1995 Hewlett-Packard Company
-** *
-** * Copyright 1989 by The Massachusetts Institute of Technology
-** *
-** * Permission to use, copy, modify, and distribute this
-** * software and its documentation for any purpose and without
-** * fee is hereby granted, provided that the above copyright
-** * notice appear in all copies and that both that copyright
-** * notice and this permission notice appear in supporting
-** * documentation, and that the name of MIT not be used in
-** * advertising or publicity pertaining to distribution of the
-** * software without specific prior written permission.
-** * M.I.T. makes no representation about the suitability of
-** * this software for any purpose. It is provided "as is"
-** * without any express or implied warranty.
-** *
-** * MIT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
-** * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FIT-
-** * NESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MIT BE LI-
-** * ABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
-** * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
-** * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
-** * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
-** * THE USE OR PERFORMANCE OF THIS SOFTWARE.
-** *
-** *********************************************************
-**
-********************************************************************/
-/* $XFree86: xc/programs/Xserver/Xext/xprint.c,v 1.14tsi Exp $ */
-
-#define _XP_PRINT_SERVER_
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#include <X11/X.h>
-#include <X11/Xos.h>
-#define NEED_EVENTS
-#include <X11/Xproto.h>
-#undef NEED_EVENTS
-#include "misc.h"
-#include "windowstr.h"
-#include "scrnintstr.h"
-#include "pixmapstr.h"
-#include "extnsionst.h"
-#include "dixstruct.h"
-#include <X11/Xatom.h>
-#include <X11/extensions/Print.h>
-#include <X11/extensions/Printstr.h>
-#include "../Xprint/DiPrint.h"
-#include "../Xprint/attributes.h"
-#include "modinit.h"
-
-static void XpResetProc(ExtensionEntry *);
-
-static int ProcXpDispatch(ClientPtr);
-static int ProcXpSwappedDispatch(ClientPtr);
-
-static int ProcXpQueryVersion(ClientPtr);
-static int ProcXpGetPrinterList(ClientPtr);
-static int ProcXpCreateContext(ClientPtr);
-static int ProcXpSetContext(ClientPtr);
-static int ProcXpGetContext(ClientPtr);
-static int ProcXpDestroyContext(ClientPtr);
-static int ProcXpGetContextScreen(ClientPtr);
-static int ProcXpStartJob(ClientPtr);
-static int ProcXpEndJob(ClientPtr);
-static int ProcXpStartDoc(ClientPtr);
-static int ProcXpEndDoc(ClientPtr);
-static int ProcXpStartPage(ClientPtr);
-static int ProcXpEndPage(ClientPtr);
-static int ProcXpSelectInput(ClientPtr);
-static int ProcXpInputSelected(ClientPtr);
-static int ProcXpPutDocumentData(ClientPtr);
-static int ProcXpGetDocumentData(ClientPtr);
-static int ProcXpGetAttributes(ClientPtr);
-static int ProcXpGetOneAttribute(ClientPtr);
-static int ProcXpSetAttributes(ClientPtr);
-static int ProcXpRehashPrinterList(ClientPtr);
-static int ProcXpQueryScreens(ClientPtr);
-static int ProcXpGetPageDimensions(ClientPtr);
-static int ProcXpSetImageResolution(ClientPtr);
-static int ProcXpGetImageResolution(ClientPtr);
-
-static void SwapXpNotifyEvent(xPrintPrintEvent *, xPrintPrintEvent *);
-static void SwapXpAttributeEvent(xPrintAttributeEvent *, xPrintAttributeEvent *);
-
-static int SProcXpGetPrinterList(ClientPtr);
-static int SProcXpCreateContext(ClientPtr);
-static int SProcXpSetContext(ClientPtr);
-static int SProcXpGetContext(ClientPtr);
-static int SProcXpDestroyContext(ClientPtr);
-static int SProcXpGetContextScreen(ClientPtr);
-static int SProcXpStartJob(ClientPtr);
-static int SProcXpEndJob(ClientPtr);
-static int SProcXpStartDoc(ClientPtr);
-static int SProcXpEndDoc(ClientPtr);
-static int SProcXpStartPage(ClientPtr);
-static int SProcXpEndPage(ClientPtr);
-static int SProcXpSelectInput(ClientPtr);
-static int SProcXpInputSelected(ClientPtr);
-static int SProcXpPutDocumentData(ClientPtr);
-static int SProcXpGetDocumentData(ClientPtr);
-static int SProcXpGetAttributes(ClientPtr);
-static int SProcXpGetOneAttribute(ClientPtr);
-static int SProcXpSetAttributes(ClientPtr);
-static int SProcXpRehashPrinterList(ClientPtr);
-static int SProcXpGetPageDimensions(ClientPtr);
-static int SProcXpSetImageResolution(ClientPtr);
-static int SProcXpGetImageResolution(ClientPtr);
-
-static void SendXpNotify(XpContextPtr, int, int);
-static void SendAttributeNotify(XpContextPtr, int);
-static int XpFreeClient(pointer, XID);
-static int XpFreeContext(pointer, XID);
-static int XpFreePage(pointer, XID);
-static Bool XpCloseScreen(int, ScreenPtr);
-static CARD32 GetAllEventMasks(XpContextPtr);
-static struct _XpClient *CreateXpClient(ClientPtr);
-static void InitContextPrivates(XpContextPtr);
-static void ResetContextPrivates(void);
-static struct _XpClient *FindClient(XpContextPtr, ClientPtr);
-static struct _XpClient *AcquireClient(XpContextPtr, ClientPtr);
-
-typedef struct _driver {
- struct _driver *next;
- char *name;
- int (* CreateContext)(XpContextPtr);
-} XpDriverRec, *XpDriverPtr;
-
-typedef struct _xpScreen {
- Bool (* CloseScreen)(int, ScreenPtr);
- struct _driver *drivers;
-} XpScreenRec, *XpScreenPtr;
-
-/*
- * Each context has a list of XpClients indicating which clients have
- * associated this context with their connection.
- * Each such client has a RTclient resource allocated for it,
- * and this per-client
- * resource is used to delete the XpClientRec if/when the client closes
- * its connection.
- * The list of XpClients is also walked if/when the context is destroyed
- * so that the ContextPtr can be removed from the client's devPrivates.
- */
-typedef struct _XpClient {
- struct _XpClient *pNext;
- ClientPtr client;
- XpContextPtr context;
- CARD32 eventMask;
- XID contextClientID; /* unneeded sanity check? */
-} XpClientRec, *XpClientPtr;
-
-static void FreeXpClient(XpClientPtr, Bool);
-
-/*
- * Each StartPage request specifies a window which forms the top level
- * window of the page. One of the following structs is created as a
- * RTpage resource with the same ID as the window itself. This enables
- * us to clean up when/if the window is destroyed, and to prevent the
- * same window from being simultaneously referenced in multiple contexts.
- * The page resource is created at the first StartPage on a given window,
- * and is only destroyed when/if the window is destroyed. When the
- * EndPage is recieved (or an EndDoc or EndJob) the context field is
- * set to NULL, but the resource remains alive.
- */
-typedef struct _XpPage {
- XpContextPtr context;
-} XpPageRec, *XpPagePtr;
-
-typedef struct _XpStPageRec {
- XpContextPtr pContext;
- Bool slept;
- XpPagePtr pPage;
- WindowPtr pWin;
-} XpStPageRec, *XpStPagePtr;
-
-typedef struct _XpStDocRec {
- XpContextPtr pContext;
- Bool slept;
- CARD8 type;
-} XpStDocRec, *XpStDocPtr;
-
-#define QUADPAD(x) ((((x)+3)>>2)<<2)
-
-/*
- * Possible bit-mask values in the "state" field of a XpContextRec.
- */
-#define JOB_STARTED (1 << 0)
-#define DOC_RAW_STARTED (1 << 1)
-#define DOC_COOKED_STARTED (1 << 2)
-#define PAGE_STARTED (1 << 3)
-#define GET_DOC_DATA_STARTED (1 << 4)
-#define JOB_GET_DATA (1 << 5)
-
-static XpScreenPtr XpScreens[MAXSCREENS];
-static unsigned char XpReqCode;
-static int XpEventBase;
-static int XpErrorBase;
-static unsigned long XpGeneration = 0;
-static int XpClientPrivateIndex;
-
-/* Variables for the context private machinery.
- * These must be initialized at compile time because
- * main() calls InitOutput before InitExtensions, and the
- * output drivers are likely to call AllocateContextPrivate.
- * These variables are reset at CloseScreen time. CloseScreen
- * is used because it occurs after FreeAllResources, and before
- * the next InitOutput cycle.
- */
-static int contextPrivateCount = 0;
-static int contextPrivateLen = 0;
-static unsigned *contextPrivateSizes = (unsigned *)NULL;
-static unsigned totalContextSize = sizeof(XpContextRec);
-
-/*
- * There are three types of resources involved. One is the resource associated
- * with the context itself, with an ID specified by a printing client. The
- * next is a resource created by us on the client's behalf (and unknown to
- * the client) when a client inits or sets a context which allows us to
- * track each client's interest in events
- * on a particular context, and also allows us to clean up this interest
- * record when/if the client's connection is closed. Finally, there is
- * a resource created for each window that's specified in a StartPage. This
- * resource carries the same ID as the window itself, and enables us to
- * easily prevent the same window being referenced in multiple contexts
- * simultaneously, and enables us to clean up if the window is destroyed
- * before the EndPage.
- */
-static RESTYPE RTclient, RTcontext, RTpage;
-
-/*
- * allEvents is the OR of all the legal event mask bits.
- */
-static CARD32 allEvents = XPPrintMask | XPAttributeMask;
-
-
-/*******************************************************************************
- *
- * ExtensionInit, Driver Init functions, QueryVersion, and Dispatch procs
- *
- ******************************************************************************/
-
-/*
- * XpExtensionInit
- *
- * Called from InitExtensions in main() usually through miinitextension
- *
- */
-
-void
-XpExtensionInit(INITARGS)
-{
- ExtensionEntry *extEntry;
- int i;
-
- RTclient = CreateNewResourceType(XpFreeClient);
- RTcontext = CreateNewResourceType(XpFreeContext);
- RTpage = CreateNewResourceType(XpFreePage);
- if (RTclient && RTcontext && RTpage &&
- (extEntry = AddExtension(XP_PRINTNAME, XP_EVENTS, XP_ERRORS,
- ProcXpDispatch, ProcXpSwappedDispatch,
- XpResetProc, StandardMinorOpcode)))
- {
- XpReqCode = (unsigned char)extEntry->base;
- XpEventBase = extEntry->eventBase;
- XpErrorBase = extEntry->errorBase;
- EventSwapVector[XpEventBase] = (EventSwapPtr) SwapXpNotifyEvent;
- EventSwapVector[XpEventBase+1] = (EventSwapPtr) SwapXpAttributeEvent;
- }
-
- if(XpGeneration != serverGeneration)
- {
- XpClientPrivateIndex = AllocateClientPrivateIndex();
- /*
- * We allocate 0 length & simply stuff a pointer to the
- * ContextRec in the DevUnion.
- */
- if(AllocateClientPrivate(XpClientPrivateIndex, 0) != TRUE)
- {
- /* we can't alloc a client private, should we bail??? XXX */
- }
- XpGeneration = serverGeneration;
- }
-
- for(i = 0; i < MAXSCREENS; i++)
- {
- /*
- * If a screen has registered with our extension, then we
- * wrap the screen's CloseScreen function to allow us to
- * reset our ContextPrivate stuff. Note that this
- * requires a printing DDX to call XpRegisterInitFunc
- * _before_ this extension is initialized - i.e. at screen init
- * time, _not_ at root window creation time.
- */
- if(XpScreens[i] != (XpScreenPtr)NULL)
- {
- XpScreens[i]->CloseScreen = screenInfo.screens[i]->CloseScreen;
- screenInfo.screens[i]->CloseScreen = XpCloseScreen;
- }
- }
- DeclareExtensionSecurity(XP_PRINTNAME, TRUE);
-}
-
-static void
-XpResetProc(ExtensionEntry *extEntry)
-{
- /*
- * We can't free up the XpScreens recs here, because extensions are
- * closed before screens, and our CloseScreen function uses the XpScreens
- * recs.
-
- int i;
-
- for(i = 0; i < MAXSCREENS; i++)
- {
- if(XpScreens[i] != (XpScreenPtr)NULL)
- Xfree(XpScreens[i]);
- XpScreens[i] = (XpScreenPtr)NULL;
- }
- */
-}
-
-static Bool
-XpCloseScreen(int index, ScreenPtr pScreen)
-{
- Bool (* CloseScreen)(int, ScreenPtr);
-
- CloseScreen = XpScreens[index]->CloseScreen;
- if(XpScreens[index] != (XpScreenPtr)NULL)
- {
- XpDriverPtr pDriv, nextDriv;
-
- pDriv = XpScreens[index]->drivers;
- while(pDriv != (XpDriverPtr)NULL)
- {
- nextDriv = pDriv->next;
- Xfree(pDriv);
- pDriv = nextDriv;
- }
- Xfree(XpScreens[index]);
- }
- XpScreens[index] = (XpScreenPtr)NULL;
-
- /*
- * It's wasteful to call ResetContextPrivates() at every CloseScreen,
- * but it's the best we know how to do for now. We do this because we
- * have to wait until after all resources have been freed (so we know
- * how to free the ContextRecs), and before the next InitOutput cycle.
- * See dix/main.c for the order of initialization and reset.
- */
- ResetContextPrivates();
- return (*CloseScreen)(index, pScreen);
-}
-
-#if 0 /* NOT USED */
-static void
-FreeScreenEntry(XpScreenPtr pScreenEntry)
-{
- XpDriverPtr pDriver;
-
- pDriver = pScreenEntry->drivers;
- while(pDriver != (XpDriverPtr)NULL)
- {
- XpDriverPtr tmp;
-
- tmp = pDriver->next;
- xfree(pDriver);
- pDriver = tmp;
- }
- xfree(pScreenEntry);
-}
-#endif
-
-/*
- * XpRegisterInitFunc tells the print extension which screens
- * are printers as opposed to displays, and what drivers are
- * supported on each screen. This eliminates the need of
- * allocating print-related private structures on windows on _all_ screens.
- * It also hands the extension a pointer to the routine to be called
- * whenever a context gets created for a particular driver on this screen.
- */
-void
-XpRegisterInitFunc(ScreenPtr pScreen, char *driverName, int (*initContext)(struct _XpContext *))
-{
- XpDriverPtr pDriver;
-
- if(XpScreens[pScreen->myNum] == 0)
- {
- if((XpScreens[pScreen->myNum] =
- (XpScreenPtr) Xalloc(sizeof(XpScreenRec))) == 0)
- return;
- XpScreens[pScreen->myNum]->CloseScreen = 0;
- XpScreens[pScreen->myNum]->drivers = 0;
- }
-
- if((pDriver = (XpDriverPtr)Xalloc(sizeof(XpDriverRec))) == 0)
- return;
- pDriver->next = XpScreens[pScreen->myNum]->drivers;
- pDriver->name = driverName;
- pDriver->CreateContext = initContext;
- XpScreens[pScreen->myNum]->drivers = pDriver;
-}
-
-static int
-ProcXpDispatch(ClientPtr client)
-{
- REQUEST(xReq);
-
- switch(stuff->data)
- {
- case X_PrintQueryVersion:
- return ProcXpQueryVersion(client);
- case X_PrintGetPrinterList:
- return ProcXpGetPrinterList(client);
- case X_PrintCreateContext:
- return ProcXpCreateContext(client);
- case X_PrintSetContext:
- return ProcXpSetContext(client);
- case X_PrintGetContext:
- return ProcXpGetContext(client);
- case X_PrintDestroyContext:
- return ProcXpDestroyContext(client);
- case X_PrintGetContextScreen:
- return ProcXpGetContextScreen(client);
- case X_PrintStartJob:
- return ProcXpStartJob(client);
- case X_PrintEndJob:
- return ProcXpEndJob(client);
- case X_PrintStartDoc:
- return ProcXpStartDoc(client);
- case X_PrintEndDoc:
- return ProcXpEndDoc(client);
- case X_PrintStartPage:
- return ProcXpStartPage(client);
- case X_PrintEndPage:
- return ProcXpEndPage(client);
- case X_PrintSelectInput:
- return ProcXpSelectInput(client);
- case X_PrintInputSelected:
- return ProcXpInputSelected(client);
- case X_PrintPutDocumentData:
- return ProcXpPutDocumentData(client);
- case X_PrintGetDocumentData:
- return ProcXpGetDocumentData(client);
- case X_PrintSetAttributes:
- return ProcXpSetAttributes(client);
- case X_PrintGetAttributes:
- return ProcXpGetAttributes(client);
- case X_PrintGetOneAttribute:
- return ProcXpGetOneAttribute(client);
- case X_PrintRehashPrinterList:
- return ProcXpRehashPrinterList(client);
- case X_PrintQueryScreens:
- return ProcXpQueryScreens(client);
- case X_PrintGetPageDimensions:
- return ProcXpGetPageDimensions(client);
- case X_PrintSetImageResolution:
- return ProcXpSetImageResolution(client);
- case X_PrintGetImageResolution:
- return ProcXpGetImageResolution(client);
- default:
- return BadRequest;
- }
-}
-
-static int
-ProcXpSwappedDispatch(ClientPtr client)
-{
- int temp;
- REQUEST(xReq);
-
- switch(stuff->data)
- {
- case X_PrintQueryVersion:
- swaps(&stuff->length, temp);
- return ProcXpQueryVersion(client);
- case X_PrintGetPrinterList:
- return SProcXpGetPrinterList(client);
- case X_PrintCreateContext:
- return SProcXpCreateContext(client);
- case X_PrintSetContext:
- return SProcXpSetContext(client);
- case X_PrintGetContext:
- return SProcXpGetContext(client);
- case X_PrintDestroyContext:
- return SProcXpDestroyContext(client);
- case X_PrintGetContextScreen:
- return SProcXpGetContextScreen(client);
- case X_PrintStartJob:
- return SProcXpStartJob(client);
- case X_PrintEndJob:
- return SProcXpEndJob(client);
- case X_PrintStartDoc:
- return SProcXpStartDoc(client);
- case X_PrintEndDoc:
- return SProcXpEndDoc(client);
- case X_PrintStartPage:
- return SProcXpStartPage(client);
- case X_PrintEndPage:
- return SProcXpEndPage(client);
- case X_PrintSelectInput:
- return SProcXpSelectInput(client);
- case X_PrintInputSelected:
- return SProcXpInputSelected(client);
- case X_PrintPutDocumentData:
- return SProcXpPutDocumentData(client);
- case X_PrintGetDocumentData:
- return SProcXpGetDocumentData(client);
- case X_PrintSetAttributes:
- return SProcXpSetAttributes(client);
- case X_PrintGetAttributes:
- return SProcXpGetAttributes(client);
- case X_PrintGetOneAttribute:
- return SProcXpGetOneAttribute(client);
- case X_PrintRehashPrinterList:
- return SProcXpRehashPrinterList(client);
- case X_PrintQueryScreens:
- swaps(&stuff->length, temp);
- return ProcXpQueryScreens(client);
- case X_PrintGetPageDimensions:
- return SProcXpGetPageDimensions(client);
- case X_PrintSetImageResolution:
- return SProcXpSetImageResolution(client);
- case X_PrintGetImageResolution:
- return SProcXpGetImageResolution(client);
- default:
- return BadRequest;
- }
-}
-
-static int
-ProcXpQueryVersion(ClientPtr client)
-{
- /* REQUEST(xPrintQueryVersionReq); */
- xPrintQueryVersionReply rep;
- register int n;
- long l;
-
- REQUEST_SIZE_MATCH(xPrintQueryVersionReq);
- rep.type = X_Reply;
- rep.length = 0;
- rep.sequenceNumber = client->sequence;
- rep.majorVersion = XP_MAJOR_VERSION;
- rep.minorVersion = XP_MINOR_VERSION;
- if (client->swapped) {
- swaps(&rep.sequenceNumber, n);
- swapl(&rep.length, l);
- swaps(&rep.majorVersion, n);
- swaps(&rep.minorVersion, n);
- }
- WriteToClient(client, sz_xPrintQueryVersionReply, (char *)&rep);
- return client->noClientException;
-}
-
-/*******************************************************************************
- *
- * GetPrinterList : Return a list of all printers associated with this
- * server. Calls XpDiGetPrinterList, which is defined in
- * the device-independent code in Xserver/Xprint.
- *
- ******************************************************************************/
-
-static int
-ProcXpGetPrinterList(ClientPtr client)
-{
- REQUEST(xPrintGetPrinterListReq);
- int totalSize;
- int numEntries;
- XpDiListEntry **pList;
- xPrintGetPrinterListReply *rep;
- int n, i, totalBytes;
- long l;
- char *curByte;
-
- REQUEST_AT_LEAST_SIZE(xPrintGetPrinterListReq);
-
- totalSize = ((sz_xPrintGetPrinterListReq) >> 2) +
- ((stuff->printerNameLen + 3) >> 2) +
- ((stuff->localeLen + 3) >> 2);
- if(totalSize != client->req_len)
- return BadLength;
-
- pList = XpDiGetPrinterList(stuff->printerNameLen, (char *)(stuff + 1),
- stuff->localeLen, (char *)((stuff + 1) +
- QUADPAD(stuff->printerNameLen)));
-
- for(numEntries = 0, totalBytes = sz_xPrintGetPrinterListReply;
- pList[numEntries] != (XpDiListEntry *)NULL;
- numEntries++)
- {
- totalBytes += 2 * sizeof(CARD32);
- totalBytes += QUADPAD(strlen(pList[numEntries]->name));
- totalBytes += QUADPAD(strlen(pList[numEntries]->description));
- }
-
- if((rep = (xPrintGetPrinterListReply *)xalloc(totalBytes)) ==
- (xPrintGetPrinterListReply *)NULL)
- return BadAlloc;
-
- rep->type = X_Reply;
- rep->length = (totalBytes - sz_xPrintGetPrinterListReply) >> 2;
- rep->sequenceNumber = client->sequence;
- rep->listCount = numEntries;
- if (client->swapped) {
- swaps(&rep->sequenceNumber, n);
- swapl(&rep->length, l);
- swapl(&rep->listCount, l);
- }
-
- for(i = 0, curByte = (char *)(rep + 1); i < numEntries; i++)
- {
- CARD32 *pCrd;
- int len;
-
- pCrd = (CARD32 *)curByte;
- len = strlen(pList[i]->name);
- *pCrd = len;
- if (client->swapped)
- swapl((long *)curByte, l);
- curByte += sizeof(CARD32);
- strncpy(curByte, pList[i]->name, len);
- curByte += QUADPAD(len);
-
- pCrd = (CARD32 *)curByte;
- len = strlen(pList[i]->description);
- *pCrd = len;
- if (client->swapped)
- swapl((long *)curByte, l);
- curByte += sizeof(CARD32);
- strncpy(curByte, pList[i]->description, len);
- curByte += QUADPAD(len);
- }
-
- XpDiFreePrinterList(pList);
-
- WriteToClient(client, totalBytes, (char *)rep);
- xfree(rep);
- return client->noClientException;
-}
-
-/*******************************************************************************
- *
- * QueryScreens: Returns the list of screens which are associated with
- * print drivers.
- *
- ******************************************************************************/
-
-static int
-ProcXpQueryScreens(ClientPtr client)
-{
- /* REQUEST(xPrintQueryScreensReq); */
- int i, numPrintScreens, totalSize;
- WINDOW *pWinId;
- xPrintQueryScreensReply *rep;
- long l;
-
- REQUEST_SIZE_MATCH(xPrintQueryScreensReq);
-
- rep = (xPrintQueryScreensReply *)xalloc(sz_xPrintQueryScreensReply);
- pWinId = (WINDOW *)(rep + 1);
-
- for(i = 0, numPrintScreens = 0, totalSize = sz_xPrintQueryScreensReply;
- i < MAXSCREENS; i++)
- {
- /*
- * If a screen has registered with our extension, then it's
- * a printer screen.
- */
- if(XpScreens[i] != (XpScreenPtr)NULL)
- {
- numPrintScreens++;
- totalSize += sizeof(WINDOW);
- rep = (xPrintQueryScreensReply *)xrealloc(rep, totalSize);
- /* fix of bug: pWinId should be set again after reallocate rep */
- pWinId = (WINDOW *)(rep + 1);
- *pWinId = WindowTable[i]->drawable.id;
- if (client->swapped)
- swapl((long *)pWinId, l);
- }
- }
-
- rep->type = X_Reply;
- rep->sequenceNumber = client->sequence;
- rep->length = (totalSize - sz_xPrintQueryScreensReply) >> 2;
- rep->listCount = numPrintScreens;
- if (client->swapped)
- {
- int n;
-
- swaps(&rep->sequenceNumber, n);
- swapl(&rep->length, l);
- swapl(&rep->listCount, l);
- }
-
- WriteToClient(client, totalSize, (char *)rep);
- xfree(rep);
- return client->noClientException;
-}
-
-static int
-ProcXpGetPageDimensions(ClientPtr client)
-{
- REQUEST(xPrintGetPageDimensionsReq);
- CARD16 width, height;
- xRectangle rect;
- xPrintGetPageDimensionsReply rep;
- XpContextPtr pContext;
- int result;
-
- REQUEST_SIZE_MATCH(xPrintGetPageDimensionsReq);
-
- if((pContext =(XpContextPtr)SecurityLookupIDByType(client,
- stuff->printContext,
- RTcontext,
- SecurityReadAccess))
- == (XpContextPtr)NULL)
- {
- client->errorValue = stuff->printContext;
- return XpErrorBase+XPBadContext;
- }
-
- if((pContext->funcs.GetMediumDimensions == 0) ||
- (pContext->funcs.GetReproducibleArea == 0))
- return BadImplementation;
-
- result = pContext->funcs.GetMediumDimensions(pContext, &width, &height);
- if(result != Success)
- return result;
-
- result = pContext->funcs.GetReproducibleArea(pContext, &rect);
- if(result != Success)
- return result;
-
- rep.type = X_Reply;
- rep.sequenceNumber = client->sequence;
- rep.length = 0;
- rep.width = width;
- rep.height = height;
- rep.rx = rect.x;
- rep.ry = rect.y;
- rep.rwidth = rect.width;
- rep.rheight = rect.height;
-
- if(client->swapped)
- {
- int n;
- long l;
-
- swaps(&rep.sequenceNumber, n);
- swapl(&rep.length, l);
- swaps(&rep.width, n);
- swaps(&rep.height, n);
- swaps(&rep.rx, n);
- swaps(&rep.ry, n);
- swaps(&rep.rwidth, n);
- swaps(&rep.rheight, n);
- }
-
- WriteToClient(client, sz_xPrintGetPageDimensionsReply, (char *)&rep);
- return client->noClientException;
-}
-
-static int
-ProcXpSetImageResolution(ClientPtr client)
-{
- REQUEST(xPrintSetImageResolutionReq);
- xPrintSetImageResolutionReply rep;
- XpContextPtr pContext;
- Bool status;
- int result;
-
- REQUEST_SIZE_MATCH(xPrintSetImageResolutionReq);
-
- if((pContext =(XpContextPtr)SecurityLookupIDByType(client,
- stuff->printContext,
- RTcontext,
- SecurityWriteAccess))
- == (XpContextPtr)NULL)
- {
- client->errorValue = stuff->printContext;
- return XpErrorBase+XPBadContext;
- }
-
- rep.prevRes = pContext->imageRes;
- if(pContext->funcs.SetImageResolution != 0) {
- result = pContext->funcs.SetImageResolution(pContext,
- (int)stuff->imageRes,
- &status);
- if(result != Success)
- status = FALSE;
- } else
- status = FALSE;
-
- rep.type = X_Reply;
- rep.sequenceNumber = client->sequence;
- rep.length = 0;
- rep.status = status;
-
- if(client->swapped)
- {
- int n;
- long l;
-
- swaps(&rep.sequenceNumber, n);
- swapl(&rep.length, l);
- swaps(&rep.prevRes, n);
- }
-
- WriteToClient(client, sz_xPrintSetImageResolutionReply, (char *)&rep);
- return client->noClientException;
-}
-
-static int
-ProcXpGetImageResolution(ClientPtr client)
-{
- REQUEST(xPrintGetImageResolutionReq);
- xPrintGetImageResolutionReply rep;
- XpContextPtr pContext;
-
- REQUEST_SIZE_MATCH(xPrintGetImageResolutionReq);
-
- if((pContext =(XpContextPtr)SecurityLookupIDByType(client,
- stuff->printContext,
- RTcontext,
- SecurityReadAccess))
- == (XpContextPtr)NULL)
- {
- client->errorValue = stuff->printContext;
- return XpErrorBase+XPBadContext;
- }
-
- rep.type = X_Reply;
- rep.sequenceNumber = client->sequence;
- rep.length = 0;
- rep.imageRes = pContext->imageRes;
-
- if(client->swapped)
- {
- int n;
- long l;
-
- swaps(&rep.sequenceNumber, n);
- swapl(&rep.length, l);
- swaps(&rep.imageRes, n);
- }
-
- WriteToClient(client, sz_xPrintGetImageResolutionReply, (char *)&rep);
- return client->noClientException;
-}
-
-/*******************************************************************************
- *
- * RehashPrinterList : Cause the server's list of printers to be rebuilt.
- * This allows new printers to be added, or old ones
- * deleted without needing to restart the server.
- *
- ******************************************************************************/
-
-static int
-ProcXpRehashPrinterList(ClientPtr client)
-{
- /* REQUEST(xPrintRehashPrinterListReq); */
-
- REQUEST_SIZE_MATCH(xPrintRehashPrinterListReq);
-
- return XpRehashPrinterList();
-}
-
-/******************************************************************************
- *
- * Context functions: Init, Set, Destroy, FreeContext
- * AllocateContextPrivateIndex, AllocateContextPrivate
- * and supporting functions.
- *
- * Init creates a context, creates a XpClientRec for the calling
- * client, and stores the contextPtr in the client's devPrivates.
- *
- * Set creates a XpClientRec for the calling client, and stores the
- * contextPtr in the client's devPrivates unless the context is None.
- * If the context is None, then the client's connection association
- * with any context is removed.
- *
- * Destroy frees any and all XpClientRecs associated with the context,
- * frees the context itself, and removes the contextPtr from any
- * relevant client devPrivates.
- *
- * FreeContext is called by FreeResource to free up a context.
- *
- ******************************************************************************/
-
-/*
- * CreateContext creates and initializes the memory for the context itself.
- * The driver's CreateContext function
- * is then called.
- */
-static int
-ProcXpCreateContext(ClientPtr client)
-{
- REQUEST(xPrintCreateContextReq);
- XpScreenPtr pPrintScreen;
- WindowPtr pRoot;
- char *driverName;
- XpContextPtr pContext;
- int result = Success;
- XpDriverPtr pDriver;
-
- REQUEST_AT_LEAST_SIZE(xPrintCreateContextReq);
-
- LEGAL_NEW_RESOURCE(stuff->contextID, client);
-
- /*
- * Check to see if the printer name is valid.
- */
- if((pRoot = XpDiValidatePrinter((char *)(stuff + 1), stuff->printerNameLen)) ==
- (WindowPtr)NULL)
- return BadMatch;
-
- pPrintScreen = XpScreens[pRoot->drawable.pScreen->myNum];
-
- /*
- * Allocate and add the context resource.
- */
- if((pContext = (XpContextPtr) xalloc(totalContextSize)) ==
- (XpContextPtr) NULL)
- return BadAlloc;
-
- InitContextPrivates(pContext);
-
- if(AddResource(stuff->contextID, RTcontext, (pointer) pContext)
- != TRUE)
- {
- xfree(pContext);
- return BadAlloc;
- }
-
- pContext->contextID = stuff->contextID;
- pContext->clientHead = (XpClientPtr)NULL;
- pContext->screenNum = pRoot->drawable.pScreen->myNum;
- pContext->state = 0;
- pContext->clientSlept = (ClientPtr)NULL;
- pContext->imageRes = 0;
-
- pContext->funcs.DestroyContext = 0;
- pContext->funcs.StartJob = 0;
- pContext->funcs.EndJob = 0;
- pContext->funcs.StartDoc = 0;
- pContext->funcs.EndDoc = 0;
- pContext->funcs.StartPage = 0;
- pContext->funcs.EndPage = 0;
- pContext->funcs.PutDocumentData = 0;
- pContext->funcs.GetDocumentData = 0;
- pContext->funcs.GetAttributes = 0;
- pContext->funcs.GetOneAttribute = 0;
- pContext->funcs.SetAttributes = 0;
- pContext->funcs.AugmentAttributes = 0;
- pContext->funcs.GetMediumDimensions = 0;
- pContext->funcs.GetReproducibleArea = 0;
- pContext->funcs.SetImageResolution = 0;
-
- if((pContext->printerName = (char *)xalloc(stuff->printerNameLen + 1)) ==
- (char *)NULL)
- {
- /* Freeing the context also causes the XpClients to be freed. */
- FreeResource(stuff->contextID, RT_NONE);
- return BadAlloc;
- }
- strncpy(pContext->printerName, (char *)(stuff + 1), stuff->printerNameLen);
- pContext->printerName[stuff->printerNameLen] = (char)'\0';
-
- driverName = XpDiGetDriverName(pRoot->drawable.pScreen->myNum,
- pContext->printerName);
-
- for(pDriver = pPrintScreen->drivers;
- pDriver != (XpDriverPtr)NULL;
- pDriver = pDriver->next)
- {
- if(!strcmp(driverName, pDriver->name))
- {
- if(pDriver->CreateContext != 0)
- pDriver->CreateContext(pContext);
- else
- return BadImplementation;
- break;
- }
- }
-
- if (client->noClientException != Success)
- return client->noClientException;
- else
- return result;
-}
-
-/*
- * SetContext creates the calling client's contextClient resource,
- * and stashes the contextID in the client's devPrivate.
- */
-static int
-ProcXpSetContext(ClientPtr client)
-{
- REQUEST(xPrintSetContextReq);
-
- XpContextPtr pContext;
- XpClientPtr pPrintClient;
- int result = Success;
-
- REQUEST_AT_LEAST_SIZE(xPrintSetContextReq);
-
- if((pContext = client->devPrivates[XpClientPrivateIndex].ptr) !=
- (pointer)NULL)
- {
- /*
- * Erase this client's knowledge of its old context, if any.
- */
- if((pPrintClient = FindClient(pContext, client)) != (XpClientPtr)NULL)
- {
- XpUnsetFontResFunc(client);
-
- if(pPrintClient->eventMask == 0)
- FreeXpClient(pPrintClient, TRUE);
- }
-
- client->devPrivates[XpClientPrivateIndex].ptr = (pointer)NULL;
- }
- if(stuff->printContext == None)
- return Success;
-
- /*
- * Check to see that the supplied XID is really a valid print context
- * in this server.
- */
- if((pContext =(XpContextPtr)SecurityLookupIDByType(client,
- stuff->printContext,
- RTcontext,
- SecurityWriteAccess))
- == (XpContextPtr)NULL)
- {
- client->errorValue = stuff->printContext;
- return XpErrorBase+XPBadContext;
- }
-
- if((pPrintClient = AcquireClient(pContext, client)) == (XpClientPtr)NULL)
- return BadAlloc;
-
- client->devPrivates[XpClientPrivateIndex].ptr = pContext;
-
- XpSetFontResFunc(client);
-
- if (client->noClientException != Success)
- return client->noClientException;
- else
- return result;
-}
-
-XpContextPtr
-XpGetPrintContext(ClientPtr client)
-{
- return (client->devPrivates[XpClientPrivateIndex].ptr);
-}
-
-static int
-ProcXpGetContext(ClientPtr client)
-{
- /* REQUEST(xPrintGetContextReq); */
- xPrintGetContextReply rep;
-
- XpContextPtr pContext;
- register int n;
- register long l;
-
- REQUEST_SIZE_MATCH(xPrintGetContextReq);
-
- if((pContext = client->devPrivates[XpClientPrivateIndex].ptr) ==
- (pointer)NULL)
- rep.printContext = None;
- else
- rep.printContext = pContext->contextID;
- rep.type = X_Reply;
- rep.length = 0;
- rep.sequenceNumber = client->sequence;
- if (client->swapped) {
- swaps(&rep.sequenceNumber, n);
- swapl(&rep.length, l);
- swapl(&rep.printContext, l);
- }
- WriteToClient(client, sz_xPrintGetContextReply, (char *)&rep);
- return client->noClientException;
-}
-
-
-/*
- * DestroyContext frees the context associated with the calling client.
- * It operates by freeing the context resource ID, thus causing XpFreeContext
- * to be called.
- */
-static int
-ProcXpDestroyContext(ClientPtr client)
-{
- REQUEST(xPrintDestroyContextReq);
-
- XpContextPtr pContext;
-
- REQUEST_SIZE_MATCH(xPrintDestroyContextReq);
-
- if((pContext =(XpContextPtr)SecurityLookupIDByType(client,
- stuff->printContext,
- RTcontext,
- SecurityDestroyAccess))
- == (XpContextPtr)NULL)
- {
- client->errorValue = stuff->printContext;
- return XpErrorBase+XPBadContext;
- }
-
- XpUnsetFontResFunc(client);
-
- FreeResource(pContext->contextID, RT_NONE);
-
- return Success;
-}
-
-static int
-ProcXpGetContextScreen(ClientPtr client)
-{
- REQUEST(xPrintGetContextScreenReq);
- xPrintGetContextScreenReply rep;
- XpContextPtr pContext;
- int n;
- long l;
-
- if((pContext =(XpContextPtr)SecurityLookupIDByType(client,
- stuff->printContext,
- RTcontext,
- SecurityReadAccess))
- == (XpContextPtr)NULL)
- return XpErrorBase+XPBadContext;
-
- rep.type = X_Reply;
- rep.sequenceNumber = client->sequence;
- rep.length = 0;
- rep.rootWindow = WindowTable[pContext->screenNum]->drawable.id;
-
- if (client->swapped) {
- swaps(&rep.sequenceNumber, n);
- swapl(&rep.length, l);
- swapl(&rep.rootWindow, l);
- }
-
- WriteToClient(client, sz_xPrintGetContextScreenReply, (char *)&rep);
- return client->noClientException;
-}
-
-/*
- * XpFreeContext is the routine called by dix:FreeResource when a context
- * resource ID is freed.
- * It checks to see if there's a partial job pending on the context, and
- * if so it calls the appropriate End procs with the cancel flag set.
- * It calls the driver's DestroyContext routine to allow the driver to clean
- * up any context-related memory or state.
- * It calls FreeXpClient to free all the
- * associated XpClientRecs and to set all the client->devPrivates to NULL.
- * It frees the printer name string, and frees the context
- * itself.
- */
-static int
-XpFreeContext(pointer data, XID id)
-{
- XpContextPtr pContext = (XpContextPtr)data;
-
- /* Clean up any pending job on this context */
- if(pContext->state != 0)
- {
- if(pContext->state & PAGE_STARTED)
- {
- WindowPtr pWin = (WindowPtr )LookupIDByType(
- pContext->pageWin, RT_WINDOW);
- XpPagePtr pPage = (XpPagePtr)LookupIDByType(
- pContext->pageWin, RTpage);
-
- pContext->funcs.EndPage(pContext, pWin);
- SendXpNotify(pContext, XPEndPageNotify, TRUE);
- pContext->state &= ~PAGE_STARTED;
- if(pPage)
- pPage->context = (XpContextPtr)NULL;
- }
- if((pContext->state & DOC_RAW_STARTED) ||
- (pContext->state & DOC_COOKED_STARTED))
- {
- pContext->funcs.EndDoc(pContext, TRUE);
- SendXpNotify(pContext, XPEndDocNotify, TRUE);
- pContext->state &= ~DOC_RAW_STARTED;
- pContext->state &= ~DOC_COOKED_STARTED;
- }
- if(pContext->funcs.EndJob != 0)
- {
- pContext->funcs.EndJob(pContext, TRUE);
- SendXpNotify(pContext, XPEndJobNotify, TRUE);
- pContext->state &= ~JOB_STARTED;
- pContext->state &= ~GET_DOC_DATA_STARTED;
- }
- }
-
- /*
- * Tell the driver we're destroying the context
- * This allows the driver to free and ContextPrivate data
- */
- if(pContext->funcs.DestroyContext != 0)
- pContext->funcs.DestroyContext(pContext);
-
- /* Free up all the XpClientRecs */
- while(pContext->clientHead != (XpClientPtr)NULL)
- {
- FreeXpClient(pContext->clientHead, TRUE);
- }
-
- xfree(pContext->printerName);
- xfree(pContext);
- return Success; /* ??? */
-}
-
-/*
- * XpFreeClient is the routine called by dix:FreeResource when a RTclient
- * is freed. It simply calls the FreeXpClient routine to do the work.
- */
-static int
-XpFreeClient(pointer data, XID id)
-{
- FreeXpClient((XpClientPtr)data, TRUE);
- return Success;
-}
-
-/*
- * FreeXpClient
- * frees the ClientRec passed in, and sets the client->devPrivates to NULL
- * if the client->devPrivates points to the same context as the XpClient.
- * Called from XpFreeContext(from FreeResource), and
- * XpFreeClient. The boolean freeResource specifies whether or not to call
- * FreeResource for the XpClientRec's XID. We should free it except if we're
- * called from XpFreeClient (which is itself called from FreeResource for the
- * XpClientRec's XID).
- */
-static void
-FreeXpClient(XpClientPtr pXpClient, Bool freeResource)
-{
- XpClientPtr pCurrent, pPrev;
- XpContextPtr pContext = pXpClient->context;
-
- /*
- * If we're freeing the clientRec associated with the context tied
- * to the client's devPrivates, then we need to clear the devPrivates.
- */
- if(pXpClient->client->devPrivates[XpClientPrivateIndex].ptr ==
- pXpClient->context)
- {
- pXpClient->client->devPrivates[XpClientPrivateIndex].ptr =
- (pointer)NULL;
- }
-
- for(pPrev = (XpClientPtr)NULL, pCurrent = pContext->clientHead;
- pCurrent != (XpClientPtr)NULL;
- pCurrent = pCurrent->pNext)
- {
- if(pCurrent == pXpClient)
- {
- if(freeResource == TRUE)
- FreeResource (pCurrent->contextClientID, RTclient);
-
- if (pPrev != (XpClientPtr)NULL)
- pPrev->pNext = pCurrent->pNext;
- else
- pContext->clientHead = pCurrent->pNext;
-
- xfree (pCurrent);
- break;
- }
- pPrev = pCurrent;
- }
-}
-
-/*
- * CreateXpClient takes a ClientPtr and returns a pointer to a
- * XpClientRec which it allocates. It also initializes the Rec,
- * including adding a resource on behalf of the client to enable the
- * freeing of the Rec when the client's connection is closed.
- */
-static XpClientPtr
-CreateXpClient(ClientPtr client)
-{
- XpClientPtr pNewPrintClient;
- XID clientResource;
-
- if((pNewPrintClient = (XpClientPtr)xalloc(sizeof(XpClientRec))) ==
- (XpClientPtr)NULL)
- return (XpClientPtr)NULL;
-
- clientResource = FakeClientID(client->index);
- if(!AddResource(clientResource, RTclient, (pointer)pNewPrintClient))
- {
- xfree (pNewPrintClient);
- return (XpClientPtr)NULL;
- }
-
- pNewPrintClient->pNext = (XpClientPtr)NULL;
- pNewPrintClient->client = client;
- pNewPrintClient->context = (XpContextPtr)NULL;
- pNewPrintClient->eventMask = 0;
- pNewPrintClient->contextClientID = clientResource;
-
- return pNewPrintClient;
-}
-
-/*
- * XpFreePage is the routine called by dix:FreeResource to free the page
- * resource built with the same ID as a page window. It checks to see
- * if we're in the middle of a page, and if so calls the driver's EndPage
- * function with 'cancel' set TRUE. It frees the memory associated with
- * the page resource.
- */
-static int
-XpFreePage(pointer data, XID id)
-{
- XpPagePtr page = (XpPagePtr)data;
- int result = Success;
- WindowPtr pWin = (WindowPtr )LookupIDByType(id, RT_WINDOW);
-
- /* Check to see if the window's being deleted in the middle of a page */
- if(page->context != (XpContextPtr)NULL &&
- page->context->state & PAGE_STARTED)
- {
- if(page->context->funcs.EndPage != 0)
- result = page->context->funcs.EndPage(page->context, pWin);
- SendXpNotify(page->context, XPEndPageNotify, (int)TRUE);
- page->context->pageWin = 0; /* None, NULL??? XXX */
- }
-
- xfree(page);
- return result;
-}
-
-/*
- * ContextPrivate machinery.
- * Context privates are intended for use by the drivers, allowing the
- * drivers to maintain context-specific data. The driver should free
- * the associated data at DestroyContext time.
- */
-
-static void
-InitContextPrivates(XpContextPtr context)
-{
- register char *ptr;
- DevUnion *ppriv;
- register unsigned *sizes;
- register unsigned size;
- register int i;
-
- if (totalContextSize == sizeof(XpContextRec))
- ppriv = (DevUnion *)NULL;
- else
- ppriv = (DevUnion *)(context + 1);
-
- context->devPrivates = ppriv;
- sizes = contextPrivateSizes;
- ptr = (char *)(ppriv + contextPrivateLen);
- for (i = contextPrivateLen; --i >= 0; ppriv++, sizes++)
- {
- if ( (size = *sizes) )
- {
- ppriv->ptr = (pointer)ptr;
- ptr += size;
- }
- else
- ppriv->ptr = (pointer)NULL;
- }
-}
-
-static void
-ResetContextPrivates(void)
-{
- contextPrivateCount = 0;
- contextPrivateLen = 0;
- xfree(contextPrivateSizes);
- contextPrivateSizes = (unsigned *)NULL;
- totalContextSize = sizeof(XpContextRec);
-
-}
-
-int
-XpAllocateContextPrivateIndex(void)
-{
- return contextPrivateCount++;
-}
-
-Bool
-XpAllocateContextPrivate(int index, unsigned amount)
-{
- unsigned oldamount;
-
- if (index >= contextPrivateLen)
- {
- unsigned *nsizes;
- nsizes = (unsigned *)xrealloc(contextPrivateSizes,
- (index + 1) * sizeof(unsigned));
- if (!nsizes)
- return FALSE;
- while (contextPrivateLen <= index)
- {
- nsizes[contextPrivateLen++] = 0;
- totalContextSize += sizeof(DevUnion);
- }
- contextPrivateSizes = nsizes;
- }
- oldamount = contextPrivateSizes[index];
- if (amount > oldamount)
- {
- contextPrivateSizes[index] = amount;
- totalContextSize += (amount - oldamount);
- }
- return TRUE;
-}
-
-static XpClientPtr
-AcquireClient(XpContextPtr pContext, ClientPtr client)
-{
- XpClientPtr pXpClient;
-
- if((pXpClient = FindClient(pContext, client)) != (XpClientPtr)NULL)
- return pXpClient;
-
- if((pXpClient = CreateXpClient(client)) == (XpClientPtr)NULL)
- return (XpClientPtr)NULL;
-
- pXpClient->context = pContext;
- pXpClient->pNext = pContext->clientHead;
- pContext->clientHead = pXpClient;
-
- return pXpClient;
-}
-
-static XpClientPtr
-FindClient(XpContextPtr pContext, ClientPtr client)
-{
- XpClientPtr pXpClient;
-
- for(pXpClient = pContext->clientHead; pXpClient != (XpClientPtr)NULL;
- pXpClient = pXpClient->pNext)
- {
- if(pXpClient->client == client) return pXpClient;
- }
- return (XpClientPtr)NULL;
-}
-
-
-/******************************************************************************
- *
- * Start/End Functions: StartJob, EndJob, StartDoc, EndDoc, StartPage, EndPage
- *
- ******************************************************************************/
-
-static int
-ProcXpStartJob(ClientPtr client)
-{
- REQUEST(xPrintStartJobReq);
- XpContextPtr pContext;
- int result = Success;
-
- REQUEST_SIZE_MATCH(xPrintStartJobReq);
-
- /* Check to see that a context has been established by this client. */
- if((pContext = (XpContextPtr)client->devPrivates[XpClientPrivateIndex].ptr)
- == (XpContextPtr)NULL)
- return XpErrorBase+XPBadContext;
-
- if(pContext->state != 0)
- return XpErrorBase+XPBadSequence;
-
- if(stuff->saveData != XPSpool && stuff->saveData != XPGetData)
- {
- client->errorValue = stuff->saveData;
- return BadValue;
- }
-
- if(pContext->funcs.StartJob != 0)
- result = pContext->funcs.StartJob(pContext,
- (stuff->saveData == XPGetData)? TRUE:FALSE,
- client);
- else
- return BadImplementation;
-
- pContext->state = JOB_STARTED;
- if(stuff->saveData == XPGetData)
- pContext->state |= JOB_GET_DATA;
-
- SendXpNotify(pContext, XPStartJobNotify, FALSE);
-
- if (client->noClientException != Success)
- return client->noClientException;
- else
- return result;
-}
-
-static int
-ProcXpEndJob(ClientPtr client)
-{
- REQUEST(xPrintEndJobReq);
- int result = Success;
- XpContextPtr pContext;
-
- REQUEST_SIZE_MATCH(xPrintEndJobReq);
-
- if((pContext = (XpContextPtr)client->devPrivates[XpClientPrivateIndex].ptr)
- == (XpContextPtr)NULL)
- return XpErrorBase+XPBadSequence;
-
- if(!(pContext->state & JOB_STARTED))
- return XpErrorBase+XPBadSequence;
-
- /* Check for missing EndDoc */
- if((pContext->state & DOC_RAW_STARTED) ||
- (pContext->state & DOC_COOKED_STARTED))
- {
- if(pContext->state & PAGE_STARTED)
- {
- WindowPtr pWin = (WindowPtr )LookupIDByType(
- pContext->pageWin, RT_WINDOW);
- XpPagePtr pPage = (XpPagePtr)LookupIDByType(
- pContext->pageWin, RTpage);
-
- if(stuff->cancel != TRUE)
- return XpErrorBase+XPBadSequence;
-
- if(pContext->funcs.EndPage != 0)
- result = pContext->funcs.EndPage(pContext, pWin);
- else
- return BadImplementation;
-
- SendXpNotify(pContext, XPEndPageNotify, TRUE);
-
- pContext->state &= ~PAGE_STARTED;
-
- if(pPage)
- pPage->context = (XpContextPtr)NULL;
-
- if(result != Success) return result;
- }
-
- if(pContext->funcs.EndDoc != 0)
- result = pContext->funcs.EndDoc(pContext, stuff->cancel);
- else
- return BadImplementation;
-
- SendXpNotify(pContext, XPEndDocNotify, stuff->cancel);
- }
-
- if(pContext->funcs.EndJob != 0)
- result = pContext->funcs.EndJob(pContext, stuff->cancel);
- else
- return BadImplementation;
-
- pContext->state = 0;
-
- SendXpNotify(pContext, XPEndJobNotify, stuff->cancel);
-
- if (client->noClientException != Success)
- return client->noClientException;
- else
- return result;
-}
-
-static Bool
-DoStartDoc(ClientPtr client, XpStDocPtr c)
-{
- XpContextPtr pContext = c->pContext;
-
- if(c->pContext->state & JOB_GET_DATA &&
- !(c->pContext->state & GET_DOC_DATA_STARTED))
- {
- if(!c->slept)
- {
- c->slept = TRUE;
- ClientSleep(client, (ClientSleepProcPtr)DoStartDoc, (pointer) c);
- c->pContext->clientSlept = client;
- }
- return TRUE;
- }
-
- if(pContext->funcs.StartDoc != 0)
- (void) pContext->funcs.StartDoc(pContext, c->type);
- else
- {
- SendErrorToClient(client, XpReqCode, X_PrintStartPage, 0,
- BadImplementation);
- return TRUE;
- }
-
- if(c->type == XPDocNormal)
- pContext->state |= DOC_COOKED_STARTED;
- else
- pContext->state |= DOC_RAW_STARTED;
-
- SendXpNotify(pContext, XPStartDocNotify, (int)FALSE);
-
- xfree(c);
- return TRUE;
-}
-
-static int
-ProcXpStartDoc(ClientPtr client)
-{
- REQUEST(xPrintStartDocReq);
- int result = Success;
- XpContextPtr pContext;
- XpStDocPtr c;
-
- REQUEST_SIZE_MATCH(xPrintStartDocReq);
-
- if((pContext = (XpContextPtr)client->devPrivates[XpClientPrivateIndex].ptr)
- == (XpContextPtr)NULL)
- return XpErrorBase+XPBadSequence;
-
- if(!(pContext->state & JOB_STARTED) ||
- pContext->state & DOC_RAW_STARTED ||
- pContext->state & DOC_COOKED_STARTED)
- return XpErrorBase+XPBadSequence;
-
- if(stuff->type != XPDocNormal && stuff->type != XPDocRaw)
- {
- client->errorValue = stuff->type;
- return BadValue;
- }
-
- c = (XpStDocPtr)xalloc(sizeof(XpStDocRec));
- c->pContext = pContext;
- c->type = stuff->type;
- c->slept = FALSE;
- (void)DoStartDoc(client, c);
-
- if (client->noClientException != Success)
- return client->noClientException;
- else
- return result;
-}
-
-static int
-ProcXpEndDoc(ClientPtr client)
-{
- REQUEST(xPrintEndDocReq);
- XpContextPtr pContext;
- int result = Success;
-
- REQUEST_SIZE_MATCH(xPrintEndDocReq);
-
- if((pContext = (XpContextPtr)client->devPrivates[XpClientPrivateIndex].ptr)
- == (XpContextPtr)NULL)
- return XpErrorBase+XPBadSequence;
-
- if(!(pContext->state & DOC_RAW_STARTED) &&
- !(pContext->state & DOC_COOKED_STARTED))
- return XpErrorBase+XPBadSequence;
-
- if(pContext->state & PAGE_STARTED)
- {
- if(stuff->cancel == TRUE)
- {
- WindowPtr pWin = (WindowPtr )LookupIDByType(
- pContext->pageWin, RT_WINDOW);
- XpPagePtr pPage = (XpPagePtr)LookupIDByType(
- pContext->pageWin, RTpage);
-
- if(pContext->funcs.EndPage != 0)
- result = pContext->funcs.EndPage(pContext, pWin);
- else
- return BadImplementation;
-
- SendXpNotify(pContext, XPEndPageNotify, TRUE);
-
- if(pPage)
- pPage->context = (XpContextPtr)NULL;
- }
- else
- return XpErrorBase+XPBadSequence;
- if(result != Success)
- return result;
- }
-
- if(pContext->funcs.EndDoc != 0)
- result = pContext->funcs.EndDoc(pContext, stuff->cancel);
- else
- return BadImplementation;
-
- pContext->state &= ~DOC_RAW_STARTED;
- pContext->state &= ~DOC_COOKED_STARTED;
-
- SendXpNotify(pContext, XPEndDocNotify, stuff->cancel);
-
- if (client->noClientException != Success)
- return client->noClientException;
- else
- return result;
-}
-
-static Bool
-DoStartPage(
- ClientPtr client,
- XpStPagePtr c)
-{
- WindowPtr pWin = c->pWin;
- int result = Success;
- XpContextPtr pContext = c->pContext;
- XpPagePtr pPage;
-
- if(c->pContext->state & JOB_GET_DATA &&
- !(c->pContext->state & GET_DOC_DATA_STARTED))
- {
- if(!c->slept)
- {
- c->slept = TRUE;
- ClientSleep(client, (ClientSleepProcPtr)DoStartPage, (pointer) c);
- c->pContext->clientSlept = client;
- }
- return TRUE;
- }
-
- if(!(pContext->state & DOC_COOKED_STARTED))
- {
- /* Implied StartDoc if it was omitted */
- if(pContext->funcs.StartDoc != 0)
- result = pContext->funcs.StartDoc(pContext, XPDocNormal);
- else
- {
- SendErrorToClient(client, XpReqCode, X_PrintStartPage, 0,
- BadImplementation);
- return TRUE;
- }
-
- if(result != Success)
- {
- SendErrorToClient(client, XpReqCode, X_PrintStartPage, 0, result);
- return TRUE;
- }
-
- pContext->state |= DOC_COOKED_STARTED;
- SendXpNotify(pContext, XPStartDocNotify, (int)FALSE);
- }
-
- /* ensure the window's not already being used as a page */
- if((pPage = (XpPagePtr)LookupIDByType(c->pWin->drawable.id, RTpage)) !=
- (XpPagePtr)NULL)
- {
- if(pPage->context != (XpContextPtr)NULL)
- {
- SendErrorToClient(client, XpReqCode, X_PrintStartPage, 0,
- BadWindow);
- return TRUE;
- }
- }
- else
- {
- if((pPage = (XpPagePtr)xalloc(sizeof(XpPageRec))) == (XpPagePtr)NULL)
- {
- SendErrorToClient(client, XpReqCode, X_PrintStartPage, 0,
- BadAlloc);
- return TRUE;
- }
- if(AddResource(c->pWin->drawable.id, RTpage, pPage) == FALSE)
- {
- xfree(pPage);
- SendErrorToClient(client, XpReqCode, X_PrintStartPage, 0,
- BadAlloc);
- return TRUE;
- }
- }
-
- pPage->context = pContext;
- pContext->pageWin = c->pWin->drawable.id;
-
- if(pContext->funcs.StartPage != 0)
- result = pContext->funcs.StartPage(pContext, pWin);
- else
- {
- SendErrorToClient(client, XpReqCode, X_PrintStartPage, 0,
- BadImplementation);
- return TRUE;
- }
-
- pContext->state |= PAGE_STARTED;
-
- (void)MapWindow(pWin, client);
-
- SendXpNotify(pContext, XPStartPageNotify, (int)FALSE);
-
- return TRUE;
-}
-
-static int
-ProcXpStartPage(ClientPtr client)
-{
- REQUEST(xPrintStartPageReq);
- WindowPtr pWin;
- int result = Success;
- XpContextPtr pContext;
- XpStPagePtr c;
-
- REQUEST_SIZE_MATCH(xPrintStartPageReq);
-
- if((pContext = (XpContextPtr)client->devPrivates[XpClientPrivateIndex].ptr)
- == (XpContextPtr)NULL)
- return XpErrorBase+XPBadSequence;
-
- if(!(pContext->state & JOB_STARTED))
- return XpErrorBase+XPBadSequence;
-
- /* can't have pages in a raw documented */
- if(pContext->state & DOC_RAW_STARTED)
- return XpErrorBase+XPBadSequence;
-
- if(pContext->state & PAGE_STARTED)
- return XpErrorBase+XPBadSequence;
-
- pWin = (WindowPtr)SecurityLookupWindow(stuff->window, client,
- SecurityWriteAccess);
- if (!pWin || pWin->drawable.pScreen->myNum != pContext->screenNum)
- return BadWindow;
-
- if((c = (XpStPagePtr)xalloc(sizeof(XpStPageRec))) == (XpStPagePtr)NULL)
- return BadAlloc;
- c->pContext = pContext;
- c->slept = FALSE;
- c->pWin = pWin;
-
- (void)DoStartPage(client, c);
-
- if (client->noClientException != Success)
- return client->noClientException;
- else
- return result;
-}
-
-static int
-ProcXpEndPage(ClientPtr client)
-{
- REQUEST(xPrintEndPageReq);
- int result = Success;
- XpContextPtr pContext;
- XpPagePtr page;
- WindowPtr pWin;
-
- REQUEST_SIZE_MATCH(xPrintEndPageReq);
-
- if((pContext = (XpContextPtr)client->devPrivates[XpClientPrivateIndex].ptr)
- == (XpContextPtr)NULL)
- return XpErrorBase+XPBadSequence;
-
- if(!(pContext->state & PAGE_STARTED))
- return XpErrorBase+XPBadSequence;
-
- pWin = (WindowPtr )LookupIDByType(pContext->pageWin, RT_WINDOW);
-
- /* Call the ddx's EndPage proc. */
- if(pContext->funcs.EndPage != 0)
- result = pContext->funcs.EndPage(pContext, pWin);
- else
- return BadImplementation;
-
- if((page = (XpPagePtr)LookupIDByType(pContext->pageWin, RTpage)) !=
- (XpPagePtr)NULL)
- page->context = (XpContextPtr)NULL;
-
- pContext->state &= ~PAGE_STARTED;
- pContext->pageWin = 0; /* None, NULL??? XXX */
-
- (void)UnmapWindow(pWin, FALSE);
-
- SendXpNotify(pContext, XPEndPageNotify, stuff->cancel);
-
- if (client->noClientException != Success)
- return client->noClientException;
- else
- return result;
-}
-
-/*******************************************************************************
- *
- * Document Data Functions: PutDocumentData, GetDocumentData
- *
- ******************************************************************************/
-
-static int
-ProcXpPutDocumentData(ClientPtr client)
-{
- REQUEST(xPrintPutDocumentDataReq);
- XpContextPtr pContext;
- DrawablePtr pDraw;
- int result = Success;
- unsigned totalSize;
- char *pData, *pDoc_fmt, *pOptions;
-
- REQUEST_AT_LEAST_SIZE(xPrintPutDocumentDataReq);
-
- if((pContext = (XpContextPtr)client->devPrivates[XpClientPrivateIndex].ptr)
- == (XpContextPtr)NULL)
- return XpErrorBase+XPBadSequence;
-
- if(!(pContext->state & DOC_RAW_STARTED) &&
- !(pContext->state & DOC_COOKED_STARTED))
- return XpErrorBase+XPBadSequence;
-
- if (stuff->drawable) {
- if (pContext->state & DOC_RAW_STARTED)
- return BadDrawable;
- pDraw = (DrawablePtr)LookupDrawable(stuff->drawable, client);
- if (!pDraw || pDraw->pScreen->myNum != pContext->screenNum)
- return BadDrawable;
- } else {
- if (pContext->state & DOC_COOKED_STARTED)
- return BadDrawable;
- pDraw = NULL;
- }
-
- pData = (char *)(&stuff[1]);
-
- totalSize = (stuff->len_data + 3) >> 2;
- pDoc_fmt = pData + (totalSize << 2);
-
- totalSize += (stuff->len_fmt + 3) >> 2;
- pOptions = pData + (totalSize << 2);
-
- totalSize += (stuff->len_options + 3) >> 2;
- if((totalSize + (sz_xPrintPutDocumentDataReq >> 2)) != client->req_len)
- return BadLength;
-
- if(pContext->funcs.PutDocumentData != 0)
- {
- result = (*pContext->funcs.PutDocumentData)(pContext, pDraw,
- pData, stuff->len_data,
- pDoc_fmt, stuff->len_fmt,
- pOptions, stuff->len_options,
- client);
- }
- else
- return BadImplementation;
-
- if (client->noClientException != Success)
- return client->noClientException;
- else
- return result;
-}
-
-static int
-ProcXpGetDocumentData(ClientPtr client)
-{
- REQUEST(xPrintGetDocumentDataReq);
- xPrintGetDocumentDataReply rep;
- XpContextPtr pContext;
- int result = Success;
-
- REQUEST_SIZE_MATCH(xPrintGetDocumentDataReq);
-
- if((pContext = (XpContextPtr)SecurityLookupIDByType(client,
- stuff->printContext,
- RTcontext,
- SecurityWriteAccess))
- == (XpContextPtr)NULL)
- {
- client->errorValue = stuff->printContext;
- return XpErrorBase+XPBadContext;
- }
-
- if(pContext->funcs.GetDocumentData == 0)
- return BadImplementation;
-
- if(!(pContext->state & JOB_GET_DATA) ||
- pContext->state & GET_DOC_DATA_STARTED)
- return XpErrorBase+XPBadSequence;
-
- if(stuff->maxBufferSize <= 0)
- {
- client->errorValue = stuff->maxBufferSize;
- return BadValue; /* gotta have a positive buffer size */
- }
-
- result = (*pContext->funcs.GetDocumentData)(pContext, client,
- stuff->maxBufferSize);
- if(result != Success)
- {
- rep.type = X_Reply;
- rep.sequenceNumber = client->sequence;
- rep.length = 0;
- rep.dataLen = 0;
- rep.statusCode = 1;
- rep.finishedFlag = TRUE;
- if (client->swapped) {
- int n;
- long l;
-
- swaps(&rep.sequenceNumber, n);
- swapl(&rep.statusCode, l); /* XXX Why are these longs??? */
- swapl(&rep.finishedFlag, l); /* XXX Why are these longs??? */
- }
- (void)WriteToClient(client,sz_xPrintGetDocumentDataReply,(char *)&rep);
- }
- else
- pContext->state |= GET_DOC_DATA_STARTED;
-
- if(pContext->clientSlept != (ClientPtr)NULL)
- {
- ClientSignal(pContext->clientSlept);
- ClientWakeup(pContext->clientSlept);
- pContext->clientSlept = (ClientPtr)NULL;
- }
-
- return result;
-}
-
-/*******************************************************************************
- *
- * Attribute requests: GetAttributes, SetAttributes, GetOneAttribute
- *
- ******************************************************************************/
-
-static int
-ProcXpGetAttributes(ClientPtr client)
-{
- REQUEST(xPrintGetAttributesReq);
- XpContextPtr pContext;
- char *attrs;
- xPrintGetAttributesReply *pRep;
- int totalSize, n;
- unsigned long l;
-
- REQUEST_SIZE_MATCH(xPrintGetAttributesReq);
-
- if(stuff->type < XPJobAttr || stuff->type > XPServerAttr)
- {
- client->errorValue = stuff->type;
- return BadValue;
- }
-
- if(stuff->type != XPServerAttr)
- {
- if((pContext = (XpContextPtr)SecurityLookupIDByType(
- client,
- stuff->printContext,
- RTcontext,
- SecurityReadAccess))
- == (XpContextPtr)NULL)
- {
- client->errorValue = stuff->printContext;
- return XpErrorBase+XPBadContext;
- }
-
- if(pContext->funcs.GetAttributes == 0)
- return BadImplementation;
- if((attrs = (*pContext->funcs.GetAttributes)(pContext, stuff->type)) ==
- (char *)NULL)
- return BadAlloc;
- }
- else
- {
- if((attrs = XpGetAttributes((XpContextPtr)NULL, XPServerAttr)) ==
- (char *)NULL)
- return BadAlloc;
- }
-
- totalSize = sz_xPrintGetAttributesReply + QUADPAD(strlen(attrs));
- if((pRep = (xPrintGetAttributesReply *)malloc(totalSize)) ==
- (xPrintGetAttributesReply *)NULL)
- return BadAlloc;
-
- pRep->type = X_Reply;
- pRep->length = (totalSize - sz_xPrintGetAttributesReply) >> 2;
- pRep->sequenceNumber = client->sequence;
- pRep->stringLen = strlen(attrs);
-
- if (client->swapped) {
- swaps(&pRep->sequenceNumber, n);
- swapl(&pRep->length, l);
- swapl(&pRep->stringLen, l);
- }
-
- strncpy((char*)(pRep + 1), attrs, strlen(attrs));
- xfree(attrs);
-
- WriteToClient(client, totalSize, (char *)pRep);
-
- xfree(pRep);
-
- return client->noClientException;
-}
-
-static int
-ProcXpSetAttributes(ClientPtr client)
-{
- REQUEST(xPrintSetAttributesReq);
- int result = Success;
- XpContextPtr pContext;
- char *attr;
-
- REQUEST_AT_LEAST_SIZE(xPrintSetAttributesReq);
-
- if(stuff->type < XPJobAttr || stuff->type > XPServerAttr)
- {
- client->errorValue = stuff->type;
- return BadValue;
- }
-
- /*
- * Disallow changing of read-only attribute pools
- */
- if(stuff->type == XPPrinterAttr || stuff->type == XPServerAttr)
- return BadMatch;
-
- if((pContext = (XpContextPtr)SecurityLookupIDByType(
- client,
- stuff->printContext,
- RTcontext,
- SecurityWriteAccess))
- == (XpContextPtr)NULL)
- {
- client->errorValue = stuff->printContext;
- return XpErrorBase+XPBadContext;
- }
-
- if(pContext->funcs.SetAttributes == 0)
- return BadImplementation;
-
- /*
- * Check for attributes being set after their relevant phase
- * has already begun (e.g. Job attributes set after StartJob).
- */
- if((pContext->state & JOB_STARTED) && stuff->type == XPJobAttr)
- return XpErrorBase+XPBadSequence;
- if(((pContext->state & DOC_RAW_STARTED) ||
- (pContext->state & DOC_COOKED_STARTED)) && stuff->type == XPDocAttr)
- return XpErrorBase+XPBadSequence;
- if((pContext->state & PAGE_STARTED) && stuff->type == XPPageAttr)
- return XpErrorBase+XPBadSequence;
-
- if((attr = (char *)malloc(stuff->stringLen + 1)) == (char *)NULL)
- return BadAlloc;
-
- strncpy(attr, (char *)(stuff + 1), stuff->stringLen);
- attr[stuff->stringLen] = (char)'\0';
-
- if(stuff->rule == XPAttrReplace)
- (*pContext->funcs.SetAttributes)(pContext, stuff->type, attr);
- else if(stuff->rule == XPAttrMerge)
- (*pContext->funcs.AugmentAttributes)(pContext, stuff->type, attr);
- else
- {
- client->errorValue = stuff->rule;
- result = BadValue;
- }
-
- xfree(attr);
-
- SendAttributeNotify(pContext, stuff->type);
-
- return result;
-}
-
-static int
-ProcXpGetOneAttribute(ClientPtr client)
-{
- REQUEST(xPrintGetOneAttributeReq);
- XpContextPtr pContext;
- char *value, *attrName;
- xPrintGetOneAttributeReply *pRep;
- int totalSize;
- int n;
- unsigned long l;
-
- REQUEST_AT_LEAST_SIZE(xPrintGetOneAttributeReq);
-
- totalSize = ((sz_xPrintGetOneAttributeReq) >> 2) +
- ((stuff->nameLen + 3) >> 2);
- if(totalSize != client->req_len)
- return BadLength;
-
- if(stuff->type < XPJobAttr || stuff->type > XPServerAttr)
- {
- client->errorValue = stuff->type;
- return BadValue;
- }
-
- if((attrName = (char *)malloc(stuff->nameLen + 1)) == (char *)NULL)
- return BadAlloc;
- strncpy(attrName, (char *)(stuff+1), stuff->nameLen);
- attrName[stuff->nameLen] = (char)'\0';
-
- if(stuff->type != XPServerAttr)
- {
- if((pContext = (XpContextPtr)SecurityLookupIDByType(
- client,
- stuff->printContext,
- RTcontext,
- SecurityReadAccess))
- == (XpContextPtr)NULL)
- {
- client->errorValue = stuff->printContext;
- return XpErrorBase+XPBadContext;
- }
-
- if(pContext->funcs.GetOneAttribute == 0)
- return BadImplementation;
- if((value = (*pContext->funcs.GetOneAttribute)(pContext, stuff->type,
- attrName)) == (char *)NULL)
- return BadAlloc;
- }
- else
- {
- if((value = XpGetOneAttribute((XpContextPtr)NULL, XPServerAttr,
- attrName)) == (char *)NULL)
- return BadAlloc;
- }
-
- free(attrName);
-
- totalSize = sz_xPrintGetOneAttributeReply + QUADPAD(strlen(value));
- if((pRep = (xPrintGetOneAttributeReply *)malloc(totalSize)) ==
- (xPrintGetOneAttributeReply *)NULL)
- return BadAlloc;
-
- pRep->type = X_Reply;
- pRep->length = (totalSize - sz_xPrintGetOneAttributeReply) >> 2;
- pRep->sequenceNumber = client->sequence;
- pRep->valueLen = strlen(value);
-
- if (client->swapped) {
- swaps(&pRep->sequenceNumber, n);
- swapl(&pRep->length, l);
- swapl(&pRep->valueLen, l);
- }
-
- strncpy((char*)(pRep + 1), value, strlen(value));
-
- WriteToClient(client, totalSize, (char *)pRep);
-
- xfree(pRep);
-
- return client->noClientException;
-}
-
-/*******************************************************************************
- *
- * Print Event requests: SelectInput InputSelected, SendXpNotify
- *
- ******************************************************************************/
-
-
-static int
-ProcXpSelectInput(ClientPtr client)
-{
- REQUEST(xPrintSelectInputReq);
- int result = Success;
- XpContextPtr pContext;
- XpClientPtr pPrintClient;
-
- REQUEST_SIZE_MATCH(xPrintSelectInputReq);
-
- /*
- * Check to see that the supplied XID is really a valid print context
- * in this server.
- */
- if((pContext=(XpContextPtr)SecurityLookupIDByType(client,
- stuff->printContext,
- RTcontext,
- SecurityWriteAccess))
- == (XpContextPtr)NULL)
- {
- client->errorValue = stuff->printContext;
- return XpErrorBase+XPBadContext;
- }
-
- if(stuff->eventMask & ~allEvents)
- {
- client->errorValue = stuff->eventMask;
- return BadValue; /* bogus event mask bits */
- }
-
- if((pPrintClient = AcquireClient(pContext, client)) == (XpClientPtr)NULL)
- return BadAlloc;
-
- pPrintClient->eventMask = stuff->eventMask;
-
- return result;
-}
-
-static int
-ProcXpInputSelected(ClientPtr client)
-{
- REQUEST(xPrintInputSelectedReq);
- xPrintInputSelectedReply rep;
- register int n;
- long l;
- XpClientPtr pXpClient;
- XpContextPtr pContext;
-
- REQUEST_SIZE_MATCH(xPrintInputSelectedReq);
-
- if((pContext=(XpContextPtr)SecurityLookupIDByType(client,
- stuff->printContext,
- RTcontext,
- SecurityReadAccess))
- == (XpContextPtr)NULL)
- {
- client->errorValue = stuff->printContext;
- return XpErrorBase+XPBadContext;
- }
-
- pXpClient = FindClient(pContext, client);
-
- rep.type = X_Reply;
- rep.length = 0;
- rep.sequenceNumber = client->sequence;
- rep.eventMask = (pXpClient != (XpClientPtr)NULL)? pXpClient->eventMask : 0;
- rep.allEventsMask = GetAllEventMasks(pContext);
-
- if (client->swapped) {
- swaps(&rep.sequenceNumber, n);
- swapl(&rep.length, l);
- swapl(&rep.eventMask, l);
- swapl(&rep.allEventsMask, l);
- }
-
- WriteToClient(client, sz_xPrintInputSelectedReply, (char *)&rep);
- return client->noClientException;
-}
-
-static void
-SendAttributeNotify(XpContextPtr pContext, int which)
-{
- XpClientPtr pXpClient;
- xPrintAttributeEvent ae;
- ClientPtr client;
-
- pXpClient = pContext->clientHead;
- if(pXpClient == (XpClientPtr)NULL)
- return; /* Nobody's interested in the events (or this context). */
-
- for (pXpClient = pContext->clientHead;
- pXpClient != (XpClientPtr)NULL;
- pXpClient = pXpClient->pNext)
- {
- client = pXpClient->client;
- if (client == serverClient || client->clientGone ||
- !(pXpClient->eventMask & XPAttributeMask))
- continue;
- ae.type = XPAttributeNotify + XpEventBase;
- ae.detail = which;
- ae.printContext = pContext->contextID;
- ae.sequenceNumber = client->sequence;
- WriteEventsToClient (client, 1, (xEvent *) &ae);
- }
-}
-
-static void
-SendXpNotify(XpContextPtr pContext, int which, int val)
-{
- XpClientPtr pXpClient;
- xPrintPrintEvent pe;
- ClientPtr client;
-
- pXpClient = pContext->clientHead;
- if(pXpClient == (XpClientPtr)NULL)
- return; /* Nobody's interested in the events (or this context). */
-
- for (pXpClient = pContext->clientHead;
- pXpClient != (XpClientPtr)NULL;
- pXpClient = pXpClient->pNext)
- {
- client = pXpClient->client;
- if (client == serverClient || client->clientGone ||
- !(pXpClient->eventMask & XPPrintMask))
- continue;
- pe.type = XPPrintNotify + XpEventBase;
- pe.detail = which;
- pe.printContext = pContext->contextID;
- pe.cancel = (Bool)val;
- pe.sequenceNumber = client->sequence;
- WriteEventsToClient (client, 1, (xEvent *) &pe);
- }
-}
-
-static CARD32
-GetAllEventMasks(XpContextPtr pContext)
-{
- XpClientPtr pPrintClient;
- CARD32 totalMask = (CARD32)0;
-
- for (pPrintClient = pContext->clientHead;
- pPrintClient != (XpClientPtr)NULL;
- pPrintClient = pPrintClient->pNext)
- {
- totalMask |= pPrintClient->eventMask;
- }
- return totalMask;
-}
-
-/*
- * XpContextOfClient - returns the XpContextPtr to the context
- * associated with the specified client, or NULL if the client
- * does not currently have a context set.
- */
-XpContextPtr
-XpContextOfClient(ClientPtr client)
-{
- return (XpContextPtr)client->devPrivates[XpClientPrivateIndex].ptr;
-}
-
-
-/*******************************************************************************
- *
- * Swap-request functions
- *
- ******************************************************************************/
-
-static int
-SProcXpCreateContext(ClientPtr client)
-{
- int i;
- long n;
-
- REQUEST(xPrintCreateContextReq);
-
- swaps(&stuff->length, i);
- swapl(&stuff->contextID, n);
- swapl(&stuff->printerNameLen, n);
- swapl(&stuff->localeLen, n);
- return ProcXpCreateContext(client);
-}
-
-static int
-SProcXpGetPrinterList(ClientPtr client)
-{
- int i;
- long n;
-
- REQUEST(xPrintGetPrinterListReq);
-
- swaps(&stuff->length, i);
- swapl(&stuff->printerNameLen, n);
- swapl(&stuff->localeLen, n);
- return ProcXpGetPrinterList(client);
-}
-
-static int
-SProcXpRehashPrinterList(ClientPtr client)
-{
- int i;
-
- REQUEST(xPrintRehashPrinterListReq);
- swaps(&stuff->length, i);
- return ProcXpRehashPrinterList(client);
-}
-
-static int
-SProcXpSetContext(ClientPtr client)
-{
- int i;
-
- REQUEST(xPrintSetContextReq);
- swaps(&stuff->length, i);
- swapl(&stuff->printContext, i);
- return ProcXpSetContext(client);
-}
-
-static int
-SProcXpGetContext(ClientPtr client)
-{
- int i;
-
- REQUEST(xPrintGetContextReq);
- swaps(&stuff->length, i);
- return ProcXpGetContext(client);
-}
-
-static int
-SProcXpDestroyContext(ClientPtr client)
-{
- int i;
- long n;
-
- REQUEST(xPrintDestroyContextReq);
- swaps(&stuff->length, i);
- swapl(&stuff->printContext, n);
- return ProcXpDestroyContext(client);
-}
-
-static int
-SProcXpGetContextScreen(ClientPtr client)
-{
- int i;
- long n;
-
- REQUEST(xPrintGetContextScreenReq);
- swaps(&stuff->length, i);
- swapl(&stuff->printContext, n);
- return ProcXpGetContextScreen(client);
-}
-
-static int
-SProcXpInputSelected(ClientPtr client)
-{
- int i;
- long n;
-
- REQUEST(xPrintInputSelectedReq);
- swaps(&stuff->length, i);
- swapl(&stuff->printContext, n);
- return ProcXpInputSelected(client);
-}
-
-static int
-SProcXpStartJob(ClientPtr client)
-{
- int i;
-
- REQUEST(xPrintStartJobReq);
- swaps(&stuff->length, i);
- return ProcXpStartJob(client);
-}
-
-static int
-SProcXpEndJob(ClientPtr client)
-{
- int i;
-
- REQUEST(xPrintEndJobReq);
- swaps(&stuff->length, i);
- return ProcXpEndJob(client);
-}
-
-static int
-SProcXpStartDoc(ClientPtr client)
-{
- int i;
-
- REQUEST(xPrintStartDocReq);
- swaps(&stuff->length, i);
- return ProcXpStartDoc(client);
-}
-
-static int
-SProcXpEndDoc(ClientPtr client)
-{
- int i;
-
- REQUEST(xPrintEndDocReq);
- swaps(&stuff->length, i);
- return ProcXpEndDoc(client);
-}
-
-static int
-SProcXpStartPage(ClientPtr client)
-{
- int i;
- long n;
-
- REQUEST(xPrintStartPageReq);
- swaps(&stuff->length, i);
- swapl(&stuff->window, n);
- return ProcXpStartPage(client);
-}
-
-static int
-SProcXpEndPage(ClientPtr client)
-{
- int i;
-
- REQUEST(xPrintEndPageReq);
- swaps(&stuff->length, i);
- return ProcXpEndPage(client);
-}
-
-static int
-SProcXpPutDocumentData(ClientPtr client)
-{
- long n;
- int i;
-
- REQUEST(xPrintPutDocumentDataReq);
- swaps(&stuff->length, i);
- swapl(&stuff->drawable, n);
- swapl(&stuff->len_data, n);
- swaps(&stuff->len_fmt, i);
- swaps(&stuff->len_options, i);
- return ProcXpPutDocumentData(client);
-}
-
-static int
-SProcXpGetDocumentData(ClientPtr client)
-{
- long n;
- int i;
-
- REQUEST(xPrintGetDocumentDataReq);
- swaps(&stuff->length, i);
- swapl(&stuff->printContext, n);
- swapl(&stuff->maxBufferSize, n);
- return ProcXpGetDocumentData(client);
-}
-
-static int
-SProcXpGetAttributes(ClientPtr client)
-{
- long n;
- int i;
-
- REQUEST(xPrintGetAttributesReq);
- swaps(&stuff->length, i);
- swapl(&stuff->printContext, n);
- return ProcXpGetAttributes(client);
-}
-
-static int
-SProcXpSetAttributes(ClientPtr client)
-{
- long n;
- int i;
-
- REQUEST(xPrintSetAttributesReq);
- swaps(&stuff->length, i);
- swapl(&stuff->printContext, n);
- swapl(&stuff->stringLen, n);
- return ProcXpSetAttributes(client);
-}
-
-static int
-SProcXpGetOneAttribute(ClientPtr client)
-{
- long n;
- int i;
-
- REQUEST(xPrintGetOneAttributeReq);
- swaps(&stuff->length, i);
- swapl(&stuff->printContext, n);
- swapl(&stuff->nameLen, n);
- return ProcXpGetOneAttribute(client);
-}
-
-static int
-SProcXpSelectInput(ClientPtr client)
-{
- long n;
- int i;
-
- REQUEST(xPrintSelectInputReq);
- swaps(&stuff->length, i);
- swapl(&stuff->eventMask, n);
- swapl(&stuff->printContext, n);
- return ProcXpSelectInput(client);
-}
-
-static int
-SProcXpGetPageDimensions(ClientPtr client)
-{
- long n;
- int i;
-
- REQUEST(xPrintGetPageDimensionsReq);
- swaps(&stuff->length, i);
- swapl(&stuff->printContext, n);
- return ProcXpGetPageDimensions(client);
-}
-
-static int
-SProcXpSetImageResolution(ClientPtr client)
-{
- long n;
- int i;
-
- REQUEST(xPrintSetImageResolutionReq);
- swaps(&stuff->length, i);
- swapl(&stuff->printContext, n);
- swaps(&stuff->imageRes, i);
- return ProcXpSetImageResolution(client);
-}
-
-static int
-SProcXpGetImageResolution(ClientPtr client)
-{
- long n;
- int i;
-
- REQUEST(xPrintGetImageResolutionReq);
- swaps(&stuff->length, i);
- swapl(&stuff->printContext, n);
- return ProcXpGetImageResolution(client);
-}
-
-static void
-SwapXpNotifyEvent(xPrintPrintEvent *src, xPrintPrintEvent *dst)
-{
- /*
- * Swap the sequence number and context fields.
- */
- cpswaps(src->sequenceNumber, dst->sequenceNumber);
- cpswapl(src->printContext, dst->printContext);
-
- /*
- * Copy the byte-long fields.
- */
- dst->type = src->type;
- dst->detail = src->detail;
- dst->cancel = src->cancel;
-}
-
-static void
-SwapXpAttributeEvent(xPrintAttributeEvent *src, xPrintAttributeEvent *dst)
-{
- /*
- * Swap the sequence number and context fields.
- */
- cpswaps(src->sequenceNumber, dst->sequenceNumber);
- cpswapl(src->printContext, dst->printContext);
-
- /*
- * Copy the byte-long fields.
- */
- dst->type = src->type;
- dst->detail = src->detail;
-}
diff --git a/nx-X11/programs/Xserver/dix/Imakefile b/nx-X11/programs/Xserver/dix/Imakefile
index 529e5623e..a0d420851 100644
--- a/nx-X11/programs/Xserver/dix/Imakefile
+++ b/nx-X11/programs/Xserver/dix/Imakefile
@@ -7,10 +7,8 @@ XCOMM $XFree86: xc/programs/Xserver/dix/Imakefile,v 3.17 2003/04/15 18:30:43 ala
#include <Server.tmpl>
-#if !BuildXprint || PrintOnlyServer
XPSRC = xpstubs.c
XPOBJ = xpstubs.o
-#endif
#if !HasFfs
FFS_SRC = ffs.c
@@ -27,7 +25,7 @@ OBJS = atom.o colormap.o cursor.o devices.o dispatch.o dixutils.o events.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../Xprint
+ -I$(SERVERSRC)/Xext -I$(SERVERSRC)/lbx
LINTLIBS = ../os/llib-los.ln
/*
@@ -94,8 +92,6 @@ SpecialCObjectRule(pixmap,$(ICONFIGFILES),$(_NOOP_))
SpecialCObjectRule(privates,$(ICONFIGFILES),$(_NOOP_))
SpecialCObjectRule(window,$(ICONFIGFILES),$(QUARTZ_DEFINES))
-#if !BuildXprint || PrintOnlyServer
NormalLibraryTarget(xpstubs,$(XPOBJ))
-#endif
DependTarget()
diff --git a/nx-X11/programs/Xserver/dix/main.c b/nx-X11/programs/Xserver/dix/main.c
index 6a8f79a96..270de6ced 100644
--- a/nx-X11/programs/Xserver/dix/main.c
+++ b/nx-X11/programs/Xserver/dix/main.c
@@ -104,9 +104,6 @@ Equipment Corporation.
#include "site.h"
#include "dixfont.h"
#include "extnsionst.h"
-#ifdef XPRINT
-#include "DiPrint.h"
-#endif
#ifdef PANORAMIX
#include "panoramiXsrv.h"
#else
@@ -255,9 +252,6 @@ main(int argc, char *argv[], char *envp[])
display = "0";
InitGlobals();
-#ifdef XPRINT
- PrinterInitGlobals();
-#endif
/* 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
@@ -370,9 +364,6 @@ main(int argc, char *argv[], char *envp[])
InitCallbackManager();
InitVisualWrap();
InitOutput(&screenInfo, argc, argv);
-#ifdef XPRINT
- PrinterInitOutput(&screenInfo, argc, argv);
-#endif
if (screenInfo.numScreens < 1)
FatalError("no screens found");
diff --git a/nx-X11/programs/Xserver/dix/xpstubs.c b/nx-X11/programs/Xserver/dix/xpstubs.c
index 5135cc398..89481c601 100644
--- a/nx-X11/programs/Xserver/dix/xpstubs.c
+++ b/nx-X11/programs/Xserver/dix/xpstubs.c
@@ -33,9 +33,6 @@ from The Open Group.
#include "misc.h"
#include <X11/fonts/font.h>
-#ifdef XPRINT
-#include "DiPrint.h"
-#endif
Bool
XpClientIsBitmapClient(
@@ -51,27 +48,3 @@ XpClientIsPrintClient(
{
return FALSE;
}
-#ifdef XPRINT
-int
-PrinterOptions(
- int argc,
- char **argv,
- int i)
-{
- return i;
-}
-void
-PrinterInitOutput(
- ScreenInfo *pScreenInfo,
- int argc,
- char **argv)
-{
-}
-void PrinterUseMsg(void)
-{
-}
-void PrinterInitGlobals(void)
-{
-}
-#endif /* XPRINT */
-
diff --git a/nx-X11/programs/Xserver/hw/Imakefile b/nx-X11/programs/Xserver/hw/Imakefile
deleted file mode 100644
index 6ea7f00a1..000000000
--- a/nx-X11/programs/Xserver/hw/Imakefile
+++ /dev/null
@@ -1,26 +0,0 @@
-XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:48:20 cpqbld Exp $
-XCOMM This is only used on NT where we do not know how to jump over this dir
-
-#ifdef Win32Architecture
-
-#define IHaveSubdirs
-#define PassCDebugFlags CDEBUGFLAGS="$(CDEBUGFLAGS)"
-
-#if XnestServer
-XNESTDIR = xnest
-#endif
-
-#if XVirtualFramebufferServer
-XVFBDIR = vfb
-#endif
-
-#if XdmxServer
-XDMXDIR = dmx
-#endif
-
-SUBDIRS= $(XNESTDIR) $(XVFBDIR) $(XDMXDIR)
-
-MakeSubdirs($(SUBDIRS))
-DependSubdirs($(SUBDIRS))
-
-#endif
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Imakefile b/nx-X11/programs/Xserver/hw/nxagent/Imakefile
index 6c075fa9f..874e82565 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Imakefile
+++ b/nx-X11/programs/Xserver/hw/nxagent/Imakefile
@@ -66,6 +66,7 @@ SRCS = NXwindow.c \
Composite.c \
Pixels.c \
stubs.c \
+ xpstubs.c \
miinitext.c \
$(SRCS1)
@@ -128,6 +129,7 @@ OBJS = NXwindow.o \
Composite.o \
Pixels.o \
stubs.o \
+ xpstubs.o \
miinitext.o \
$(OBJS1)
@@ -220,6 +222,7 @@ DEFINES = -g $(OS_DEFINES) $(EXT_DEFINES) $(UPG_DEFINES) $(NX_DEFINES) \
all:: $(OBJS)
LinkSourceFile(stubs.c,$(SERVERSRC)/Xi)
+LinkSourceFile(xpstubs.c,$(SERVERSRC)/dix)
SpecialCObjectRule(Init,$(ICONFIGFILES),$(_NOOP_))
LinkSourceFile(miinitext.c,$(SERVERSRC)/mi)
SpecialCObjectRule(miinitext,$(ICONFIGFILES), $(_NOOP_))
diff --git a/nx-X11/programs/Xserver/mi/miinitext.c b/nx-X11/programs/Xserver/mi/miinitext.c
index f3be9da5d..b70a6a67e 100644
--- a/nx-X11/programs/Xserver/mi/miinitext.c
+++ b/nx-X11/programs/Xserver/mi/miinitext.c
@@ -73,34 +73,6 @@ SOFTWARE.
#undef GLXEXT
#endif
-/* Make sure Xprt only announces extensions it supports */
-#ifdef PRINT_ONLY_SERVER
-#undef MITSHM /* this is incompatible to the vector-based Xprint DDX */
-#undef XKB
-#undef PANORAMIX
-#undef RES
-#undef XINPUT
-#undef XV
-#undef SCREENSAVER
-#undef XIDLE
-#undef XRECORD
-#undef XF86VIDMODE
-#undef XF86MISC
-#undef XFreeXDGA
-#undef XF86DRI
-#undef DPMSExtension
-#undef DPSEXT
-#undef FONTCACHE
-#undef DAMAGE
-#undef XFIXES
-#undef XEVIE
-#else
-#ifndef LOADABLEPRINTDDX
-#undef XPRINT
-#endif /* LOADABLEPRINTDDX */
-#endif /* PRINT_ONLY_SERVER */
-
-
extern Bool noTestExtensions;
#ifdef BIGREQS
@@ -232,9 +204,6 @@ typedef void (*InitExtension)(INITARGS);
#define _XLBX_SERVER_
#include <X11/extensions/lbxstr.h>
#endif
-#ifdef XPRINT
-#include "Print.h"
-#endif
#ifdef XAPPGROUP
#define _XAG_SERVER_
#include <X11/extensions/Xagstr.h>
@@ -321,9 +290,6 @@ extern void XagExtensionInit(INITARGS);
#ifdef XCSECURITY
extern void SecurityExtensionInit(INITARGS);
#endif
-#ifdef XPRINT
-extern void XpExtensionInit(INITARGS);
-#endif
#ifdef XF86BIGFONT
extern void XFree86BigfontExtensionInit(INITARGS);
#endif
@@ -606,9 +572,6 @@ InitExtensions(argc, argv)
#ifdef XCSECURITY
if (!noSecurityExtension) SecurityExtensionInit();
#endif
-#ifdef XPRINT
- XpExtensionInit(); /* server-specific extension, cannot be disabled */
-#endif
#ifdef TOGCUP
if (!noXcupExtension) XcupExtensionInit();
#endif
@@ -642,11 +605,6 @@ InitExtensions(argc, argv)
if (!noGlxExtension) DarwinGlxExtensionInit();
#endif
#endif
-#ifdef DPSEXT
-#ifndef XPRINT
- if (!noDPSExtension) DPSExtensionInit();
-#endif
-#endif
#ifdef XFIXES
/* must be before Render to layer DisplayCursor correctly */
if (!noXFixesExtension) XFixesExtensionInit();
@@ -717,9 +675,6 @@ static ExtensionModule staticExtensions[] = {
#ifdef XCSECURITY
{ SecurityExtensionInit, SECURITY_EXTENSION_NAME, &noSecurityExtension, NULL, NULL },
#endif
-#ifdef XPRINT
- { XpExtensionInit, XP_PRINTNAME, NULL, NULL, NULL },
-#endif
#ifdef PANORAMIX
{ PanoramiXExtensionInit, PANORAMIX_PROTOCOL_NAME, &noPanoramiXExtension, NULL, NULL },
#endif
diff --git a/nx-X11/programs/Xserver/os/Imakefile b/nx-X11/programs/Xserver/os/Imakefile
index 22be06074..55f8e41fb 100644
--- a/nx-X11/programs/Xserver/os/Imakefile
+++ b/nx-X11/programs/Xserver/os/Imakefile
@@ -166,7 +166,7 @@ BOOTSTRAPCFLAGS =
$(RANDOM_DEFINES) $(BUGMSG) $(XTRANS_FAILDEFINES) $(NX_DEFINES)
INCLUDES = -I. -I../include -I$(XINCLUDESRC) -I$(EXTINCSRC) \
-I$(SERVERSRC)/Xext -I$(FONTINCSRC) -I$(SERVERSRC)/render \
- -I$(TOP)/lib/Xau -I../lbx -I../Xprint Krb5Includes $(NX_INCLUDES)
+ -I$(TOP)/lib/Xau -I../lbx Krb5Includes $(NX_INCLUDES)
DEPEND_DEFINES = $(DBM_DEFINES) $(XDMCP_DEFINES) $(EXT_DEFINES) \
$(TRANS_INCLUDES) $(CONNECTION_FLAGS) $(GETPEER_DEFINES) \
DependDefines
diff --git a/nx-X11/programs/Xserver/os/utils.c b/nx-X11/programs/Xserver/os/utils.c
index 79e49d5b1..5f189c949 100644
--- a/nx-X11/programs/Xserver/os/utils.c
+++ b/nx-X11/programs/Xserver/os/utils.c
@@ -147,10 +147,6 @@ OR PERFORMANCE OF THIS SOFTWARE.
#include "picture.h"
#endif
-#ifdef XPRINT
-#include "DiPrint.h"
-#endif
-
Bool noTestExtensions;
#ifdef BIGREQS
Bool noBigReqExtension = FALSE;
@@ -691,9 +687,6 @@ void UseMsg(void)
#ifdef XCSECURITY
ErrorF("-sp file security policy file\n");
#endif
-#ifdef XPRINT
- PrinterUseMsg();
-#endif
ErrorF("-su disable any save under support\n");
ErrorF("-t # mouse threshold (pixels)\n");
ErrorF("-terminate terminate at server reset\n");
@@ -1102,12 +1095,6 @@ ProcessCommandLine(int argc, char *argv[])
i = skip - 1;
}
#endif
-#ifdef XPRINT
- else if ((skip = PrinterOptions(argc, argv, i)) != i)
- {
- i = skip - 1;
- }
-#endif
#ifdef XCSECURITY
else if ((skip = XSecurityOptions(argc, argv, i)) != i)
{
diff --git a/nx-libs.spec b/nx-libs.spec
index 7c594cc20..2e6c5da4c 100644
--- a/nx-libs.spec
+++ b/nx-libs.spec
@@ -952,7 +952,6 @@ ln -s -f ../../../../%{_lib}/libXext.so.6 %{buildroot}%{_libdir}/nx/X11/Xinerama
%{_includedir}/nx/X11/extensions/Xevie.h
%{_includedir}/nx/X11/extensions/Xinerama.h
%{_includedir}/nx/X11/extensions/Xrandr.h
-%{_includedir}/nx/X11/extensions/dmxext.h
%{_includedir}/nx/X11/extensions/lbxbuf.h
%{_includedir}/nx/X11/extensions/lbxbufstr.h
%{_includedir}/nx/X11/extensions/lbxdeltastr.h
@@ -1006,8 +1005,6 @@ ln -s -f ../../../../%{_lib}/libXext.so.6 %{buildroot}%{_libdir}/nx/X11/Xinerama
%{_includedir}/nx/X11/ap_keysym.h
%{_includedir}/nx/X11/keysym.h
%{_includedir}/nx/X11/keysymdef.h
-%{_includedir}/nx/X11/extensions/Print.h
-%{_includedir}/nx/X11/extensions/Printstr.h
%{_includedir}/nx/X11/extensions/XI.h
%{_includedir}/nx/X11/extensions/XIproto.h
%{_includedir}/nx/X11/extensions/XResproto.h
@@ -1017,7 +1014,6 @@ ln -s -f ../../../../%{_lib}/libXext.so.6 %{buildroot}%{_libdir}/nx/X11/Xinerama
%{_includedir}/nx/X11/extensions/compositeproto.h
%{_includedir}/nx/X11/extensions/damageproto.h
%{_includedir}/nx/X11/extensions/damagewire.h
-%{_includedir}/nx/X11/extensions/dmxproto.h
%{_includedir}/nx/X11/extensions/panoramiXproto.h
%{_includedir}/nx/X11/extensions/randr.h
%{_includedir}/nx/X11/extensions/randrproto.h