Index: ChangeLog
===================================================================
RCS file: /cvs/xorg/xc/ChangeLog,v
retrieving revision 1.270
diff -u -p -r1.270 ChangeLog
--- ChangeLog	14 Aug 2004 07:12:36 -0000	1.270
+++ ChangeLog	14 Aug 2004 20:27:53 -0000
@@ -1,3 +1,36 @@
+2004-08-14  Kristian Høgsberg  <krh@redhat.com>
+
+	* lib/Xaw/Imakefile:
+	Back out Xprint changes.
+
+	* programs/xman: 
+	* programs/xlogo: 
+	* programs/xedit: 
+	Revert xman to CVS of June 5, revert xlogo to CVS of May 8, revert
+	xedit to CVS of April 25, to back out unconditional Xprint support.
+	
+	* config/cf/X11.tmpl: 
+	Fix up Xprint config logic to be like the rest of the extensions:
+	BuildXprint is a one-stop option for disabling everything Xprint
+	related.  XprtServer controls building Xprt, BuildXprintLib
+	controls building Xprint libs and BuildXprintClients controls
+	building clients related to Xprint.  BuiltXprint defaults to YES
+	and the other options respects relevant settings, i.e. BuildServer
+	and BuildServersOnly.
+
+	* lib/Imakefile: 
+	Build Xaw regardless of BuildXprintLib setting.
+	
+	* programs/Imakefile: 
+	Only build xphelloworld, xplsprinters and xprehashprinterlist when
+	BuildXprintClients it YES.  Disable building xmore, it has always
+	supported XawPrintShell.
+
+	* programs/xdpyinfo: 
+	* programs/xset: 
+	* programs/glxgears: 
+	Make Xprint support depend on BuildXprintLib.
+
 2004-08-14  Keith Packard  <keithp@keithp.com>
 
 	* lib/X11/OpenDis.c: (XOpenDisplay):
Index: config/cf/WinLib.tmpl
===================================================================
RCS file: /cvs/xorg/xc/config/cf/WinLib.tmpl,v
retrieving revision 1.2
diff -u -p -r1.2 WinLib.tmpl
--- config/cf/WinLib.tmpl	23 Apr 2004 18:41:58 -0000	1.2
+++ config/cf/WinLib.tmpl	14 Aug 2004 20:27:53 -0000
@@ -6,7 +6,7 @@ XCOMM $XFree86: xc/config/cf/WinLib.tmpl
 
 #define SharedOldXReqs $(LDPRELIBS) $(XONLYLIB)
 #define SharedXtReqs $(LDPRELIBS) $(XONLYLIB)
-#define SharedXawReqs $(LDPRELIBS) $(XMULIB) $(XTOOLLIB) $(XPLIB) $(XLIB)
+#define SharedXawReqs $(LDPRELIBS) $(XMULIB) $(XTOOLLIB) $(XLIB)
 #define SharedXmuReqs $(LDPRELIBS) $(XTOOLLIB) $(XLIB)
 #define SharedXextReqs $(LDPRELIBS) $(XONLYLIB)
 #define SharedXiReqs $(LDPRELIBS) $(XLIB)
Index: config/cf/X11.tmpl
===================================================================
RCS file: /cvs/xorg/xc/config/cf/X11.tmpl,v
retrieving revision 1.26
diff -u -p -r1.26 X11.tmpl
--- config/cf/X11.tmpl	13 Aug 2004 22:44:03 -0000	1.26
+++ config/cf/X11.tmpl	14 Aug 2004 20:27:55 -0000
@@ -472,13 +472,6 @@ XCOMM $XFree86: xc/config/cf/X11.tmpl,v 
 #ifndef BuildPlugin
 #define BuildPlugin		HasPlugin
 #endif
-#ifndef XprtServer
-# ifdef BuildXprint
-#  define XprtServer		(BuildServer && BuildXprint)
-# else
-#  define XprtServer		BuildServer
-# endif
-#endif
 #ifndef XpRasterDDX
 #define XpRasterDDX             YES
 #endif
@@ -497,16 +490,20 @@ XCOMM $XFree86: xc/config/cf/X11.tmpl,v 
 #ifndef XpSvgDDX
 #define XpSvgDDX                YES
 #endif
+
 #ifndef BuildXprint
-#if XprtServer
 #define BuildXprint		YES
-#else
-#define BuildXprint		NO
 #endif
+#ifndef XprtServer
+#define XprtServer		(BuildServer && BuildXprint)
 #endif
 #ifndef BuildXprintLib
-#define BuildXprintLib		!BuildServersOnly
+#define BuildXprintLib		(!BuildServersOnly && BuildXprint)
 #endif
+#ifndef BuildXprintClients
+#define BuildXprintClients	BuildXprintLib
+#endif
+
 #ifndef BuildScreenSaverExt
 #define BuildScreenSaverExt	NO
 #endif
@@ -3823,10 +3820,10 @@ ProjectUnsharedLibReferences(XKBUI,xkbui
 #endif
 
 #ifndef XawClientDepLibs
-#define XawClientDepLibs $(DEPXAWLIB) $(DEPXMULIB) $(DEPXTOOLLIB) $(DEPXPMLIB) $(DEPXPLIB) $(DEPXLIB)
+#define XawClientDepLibs $(DEPXAWLIB) $(DEPXMULIB) $(DEPXTOOLLIB) $(DEPXPMLIB) $(DEPXLIB)
 #endif
 #ifndef XawClientLibs
-#define XawClientLibs $(XAWLIB) $(XMULIB) $(XTOOLLIB) $(XPMLIB) $(XPLIB) $(XLIB)
+#define XawClientLibs $(XAWLIB) $(XMULIB) $(XTOOLLIB) $(XPMLIB) $(XLIB)
 #endif
 
 #ifndef SharedLibXTrap
Index: config/cf/bsdLib.tmpl
===================================================================
RCS file: /cvs/xorg/xc/config/cf/bsdLib.tmpl,v
retrieving revision 1.3
diff -u -p -r1.3 bsdLib.tmpl
--- config/cf/bsdLib.tmpl	31 Jul 2004 16:14:02 -0000	1.3
+++ config/cf/bsdLib.tmpl	14 Aug 2004 20:27:55 -0000
@@ -43,7 +43,7 @@ XMULIB = $(XMULIBONLY) $(XTOOLLIB) $(XLI
 #endif
 
 #ifndef XawClientLibs
-#define XawClientLibs $(XAWLIB) $(XMULIBONLY) $(XTOOLLIB) $(XPMLIB) $(XPLIB) $(XLIB)
+#define XawClientLibs $(XAWLIB) $(XMULIBONLY) $(XTOOLLIB) $(XPMLIB) $(XLIB)
 #endif
 
 /* Allow for libpthread, as overridden by OS definitions */
@@ -56,8 +56,8 @@ XMULIB = $(XMULIBONLY) $(XTOOLLIB) $(XLI
 #ifndef SharedXtReqs
 #define SharedXtReqs	$(LDPRELIBS) $(XONLYLIB) $(SMLIB) $(ICELIB)
 #endif
-#define SharedXawReqs	$(LDPRELIBS) $(XMULIB) $(XTOOLLIB) $(XPMLIB) $(XPLIB) $(XLIB)
-#define SharedXaw6Reqs	$(LDPRELIBS) $(XMULIB) $(XTOOLLIB) $(XPLIB) $(XLIB)
+#define SharedXawReqs	$(LDPRELIBS) $(XMULIB) $(XTOOLLIB) $(XPMLIB) $(XLIB)
+#define SharedXaw6Reqs	$(LDPRELIBS) $(XMULIB) $(XTOOLLIB) $(XLIB)
 #define SharedXmuReqs	$(LDPRELIBS) $(XTOOLLIB) $(XLIB)
 #define SharedXmuuReqs	$(LDPRELIB)  $(XONLYLIB)
 #define SharedXextReqs	$(LDPRELIBS) $(XONLYLIB)
Index: config/cf/bsdiLib.tmpl
===================================================================
RCS file: /cvs/xorg/xc/config/cf/bsdiLib.tmpl,v
retrieving revision 1.2
diff -u -p -r1.2 bsdiLib.tmpl
--- config/cf/bsdiLib.tmpl	23 Apr 2004 18:41:58 -0000	1.2
+++ config/cf/bsdiLib.tmpl	14 Aug 2004 20:27:55 -0000
@@ -16,7 +16,7 @@ XMULIB = $(XMULIBONLY) $(XTOOLLIB) $(XLI
 #endif
 
 #ifndef XawClientLibs
-#define XawClientLibs $(XAWLIB) $(XMULIBONLY) $(XTOOLLIB) $(XPMLIB) $(XPLIB) $(XLIB)
+#define XawClientLibs $(XAWLIB) $(XMULIBONLY) $(XTOOLLIB) $(XPMLIB) $(XLIB)
 #endif
 
 #define FrescoSysLibs	CplusplusLibC MathLibrary
@@ -25,8 +25,8 @@ XMULIB = $(XMULIBONLY) $(XTOOLLIB) $(XLI
 #define SharedXlibi18nReqs $(LDPRELIB) $(XONLYLIB)
 #define SharedOldXReqs	$(LDPRELIB) $(XONLYLIB)
 #define SharedXtReqs	$(LDPRELIB) $(XONLYLIB) $(SMLIB) $(ICELIB)
-#define SharedXawReqs	$(LDPRELIB) $(XMULIB) $(XTOOLLIB) $(XPMLIB) $(XPLIB) $(XLIB)
-#define SharedXaw6Reqs	$(LDPRELIB) $(XMULIB) $(XTOOLLIB) $(XPLIB) $(XLIB)
+#define SharedXawReqs	$(LDPRELIB) $(XMULIB) $(XTOOLLIB) $(XPMLIB) $(XLIB)
+#define SharedXaw6Reqs	$(LDPRELIB) $(XMULIB) $(XTOOLLIB) $(XLIB)
 #define SharedXmuReqs	$(LDPRELIB) $(XTOOLLIB) $(XLIB)
 #define SharedXextReqs	$(LDPRELIB) $(XONLYLIB)
 #define SharedXiReqs	$(LDPRELIB) $(XLIB)
Index: config/cf/cygwin.tmpl
===================================================================
RCS file: /cvs/xorg/xc/config/cf/cygwin.tmpl,v
retrieving revision 1.4
diff -u -p -r1.4 cygwin.tmpl
--- config/cf/cygwin.tmpl	31 Jul 2004 12:29:52 -0000	1.4
+++ config/cf/cygwin.tmpl	14 Aug 2004 20:27:55 -0000
@@ -5,7 +5,7 @@ XCOMM $XFree86: xc/config/cf/cygwin.tmpl
 #define SharedOldXReqs		$(LDPRELIB) $(XONLYLIB)
 #define SharedXReqs		$(XTOOLLIB) $(XPLIB) $(XLIB) $(LDPOSTLIBS)
 #define SharedXtReqs		$(LDPRELIB) $(SMLIB) $(ICELIB) $(XONLYLIB)
-#define SharedXawReqs		$(LDPRELIB) $(XMULIB) $(XTOOLLIB) $(XPMLIB) $(XPLIB) $(XLIB)
+#define SharedXawReqs		$(LDPRELIB) $(XMULIB) $(XTOOLLIB) $(XPMLIB) $(XLIB)
 #define SharedXaw6Reqs		$(LDPRELIB) $(XMULIB) $(XTOOLLIB) $(XPMLIB) $(XLIB)
 #define SharedXmuReqs 		$(LDPRELIB) $(XTOOLLIB) $(XLIB)
 #define SharedXextReqs		$(LDPRELIB) $(XONLYLIB)
Index: config/cf/darwinLib.tmpl
===================================================================
RCS file: /cvs/xorg/xc/config/cf/darwinLib.tmpl,v
retrieving revision 1.3
diff -u -p -r1.3 darwinLib.tmpl
--- config/cf/darwinLib.tmpl	31 Jul 2004 16:14:02 -0000	1.3
+++ config/cf/darwinLib.tmpl	14 Aug 2004 20:27:55 -0000
@@ -10,7 +10,7 @@ XMULIB = $(XMULIBONLY) $(XTOOLLIB) $(XLI
 #endif
 
 #ifndef XawClientLibs
-#define XawClientLibs $(XAWLIB) $(XMULIBONLY) $(XTOOLLIB) $(XPMLIB) $(XPLIB) $(XLIB)
+#define XawClientLibs $(XAWLIB) $(XMULIBONLY) $(XTOOLLIB) $(XPMLIB) $(XLIB)
 #endif
 
 /* Allow for libpthread, as overridden by OS definitions */
@@ -27,8 +27,8 @@ XMULIB = $(XMULIBONLY) $(XTOOLLIB) $(XLI
 #define SharedGLUReqs       $(LDPRELIB) $(XLIB) $(GLXLIB)
 #define SharedOSMesaReqs    $(LDPRELIB) $(XLIB) $(GLXLIB)
 #define SharedSMReqs        $(LDPRELIB) $(ICELIB)
-#define SharedXawReqs       $(LDPRELIB) $(XMULIB) $(XTOOLLIB) $(XPMLIB) $(XPLIB) $(XLIB)
-#define SharedXaw6Reqs      $(LDPRELIB) $(XMULIB) $(XTOOLLIB) $(XPLIB) $(XLIB)
+#define SharedXawReqs       $(LDPRELIB) $(XMULIB) $(XTOOLLIB) $(XPMLIB) $(XLIB)
+#define SharedXaw6Reqs      $(LDPRELIB) $(XMULIB) $(XTOOLLIB) $(XLIB)
 #define SharedXcursorReqs   $(LDPRELIB) $(XRENDERLIB) $(XLIB)
 #define SharedXextReqs      $(LDPRELIB) $(XONLYLIB)
 #define SharedXiReqs        $(LDPRELIB) $(XLIB)
Index: config/cf/gnuLib.tmpl
===================================================================
RCS file: /cvs/xorg/xc/config/cf/gnuLib.tmpl,v
retrieving revision 1.2
diff -u -p -r1.2 gnuLib.tmpl
--- config/cf/gnuLib.tmpl	23 Apr 2004 18:41:58 -0000	1.2
+++ config/cf/gnuLib.tmpl	14 Aug 2004 20:27:55 -0000
@@ -11,15 +11,15 @@ XMULIB = $(XMULIBONLY) $(XTOOLLIB) $(XLI
 #endif
 
 #ifndef XawClientLibs
-#define XawClientLibs $(XAWLIB) $(XMULIBONLY) $(XTOOLLIB) $(XPMLIB) $(XPLIB) $(XLIB)
+#define XawClientLibs $(XAWLIB) $(XMULIBONLY) $(XTOOLLIB) $(XPMLIB) $(XLIB)
 #endif
 
 #define SharedX11Reqs
 #define SharedXlibi18nReqs $(LDPRELIB) $(XONLYLIB)
 #define SharedOldXReqs	$(LDPRELIB) $(XONLYLIB)
 #define SharedXtReqs	$(LDPRELIB) $(XONLYLIB) $(SMLIB) $(ICELIB)
-#define SharedXaw6Reqs	$(LDPRELIB) $(XMULIB) $(XTOOLLIB) $(XPLIB) $(XLIB)
-#define SharedXawReqs	$(LDPRELIB) $(XMULIB) $(XTOOLLIB) $(XPMLIB) $(XPLIB) $(XLIB)
+#define SharedXaw6Reqs	$(LDPRELIB) $(XMULIB) $(XTOOLLIB) $(XLIB)
+#define SharedXawReqs	$(LDPRELIB) $(XMULIB) $(XTOOLLIB) $(XPMLIB) $(XLIB)
 #define SharedXmuReqs	$(LDPRELIB) $(XTOOLLIB) $(XLIB)
 #define SharedXextReqs	$(LDPRELIB) $(XONLYLIB)
 #define SharedXiReqs	$(LDPRELIB) $(XLIB)
Index: config/cf/hpLib.tmpl
===================================================================
RCS file: /cvs/xorg/xc/config/cf/hpLib.tmpl,v
retrieving revision 1.2
diff -u -p -r1.2 hpLib.tmpl
--- config/cf/hpLib.tmpl	23 Apr 2004 18:41:58 -0000	1.2
+++ config/cf/hpLib.tmpl	14 Aug 2004 20:27:55 -0000
@@ -12,7 +12,7 @@ XCOMM $XFree86$
 #define SharedOldXReqs		$(XONLYLIB)
 #define SharedX11Reqs		SharedThreadReqs
 #define SharedXtReqs		$(XONLYLIB) $(SMLIB) $(ICELIB) SharedThreadReqs
-#define SharedXawReqs		$(XMULIB) $(XTOOLLIB) $(XPLIB) $(XLIB)
+#define SharedXawReqs		$(XMULIB) $(XTOOLLIB) $(XLIB)
 #define SharedXmuReqs		$(XTOOLLIB) $(XLIB)
 #define SharedXextReqs		$(XONLYLIB)
 #define SharedXiReqs		$(XLIB)
Index: config/cf/ibmLib.tmpl
===================================================================
RCS file: /cvs/xorg/xc/config/cf/ibmLib.tmpl,v
retrieving revision 1.2
diff -u -p -r1.2 ibmLib.tmpl
--- config/cf/ibmLib.tmpl	23 Apr 2004 18:41:58 -0000	1.2
+++ config/cf/ibmLib.tmpl	14 Aug 2004 20:27:55 -0000
@@ -35,8 +35,8 @@ XCOMM $XFree86: xc/config/cf/ibmLib.tmpl
 #define SharedXmuuReqs	$(XLIBONLY)
 #define SharedOldXReqs	$(XLIBONLY)
 #define SharedXtReqs	$(XLIBONLY) $(SMLIB) $(ICELIB) SharedThreadReqs
-#define SharedXawReqs	$(XMULIB) $(XTOOLLIB) $(XPLIB) $(XLIB) $(XPMLIB)
-#define SharedXaw6Reqs	$(XMULIB) $(XTOOLLIB) $(XPLIB) $(XLIB)
+#define SharedXawReqs	$(XMULIB) $(XTOOLLIB) $(XLIB) $(XPMLIB)
+#define SharedXaw6Reqs	$(XMULIB) $(XTOOLLIB) $(XLIB)
 #define SharedXiReqs	$(XLIB)
 #define SharedXtstReqs	$(XLIB)
 #define SharedPexReqs	$(XONLYLIB)
Index: config/cf/lnxLib.tmpl
===================================================================
RCS file: /cvs/xorg/xc/config/cf/lnxLib.tmpl,v
retrieving revision 1.3
diff -u -p -r1.3 lnxLib.tmpl
--- config/cf/lnxLib.tmpl	9 Aug 2004 22:37:21 -0000	1.3
+++ config/cf/lnxLib.tmpl	14 Aug 2004 20:27:55 -0000
@@ -14,15 +14,15 @@ XMULIB = $(XMULIBONLY) $(XTOOLLIB) $(XLI
 #endif
 
 #ifndef XawClientLibs
-#define XawClientLibs $(XAWLIB) $(XMULIBONLY) $(XTOOLLIB) $(XPMLIB) $(XPLIB) $(XLIB)
+#define XawClientLibs $(XAWLIB) $(XMULIBONLY) $(XTOOLLIB) $(XPMLIB) $(XLIB)
 #endif
 
 #define SharedX11Reqs
 #define SharedXlibi18nReqs $(LDPRELIB) $(XONLYLIB)
 #define SharedOldXReqs	  $(LDPRELIB) $(XONLYLIB)
 #define SharedXtReqs	  $(LDPRELIB) $(XONLYLIB) $(SMLIB) $(ICELIB)
-#define SharedXaw6Reqs	  $(LDPRELIB) $(XMULIB) $(XTOOLLIB) $(XPLIB) $(XLIB)
-#define SharedXawReqs	  $(LDPRELIB) $(XMULIB) $(XTOOLLIB) $(XPMLIB) $(XPLIB) $(XLIB)
+#define SharedXaw6Reqs	  $(LDPRELIB) $(XMULIB) $(XTOOLLIB) $(XLIB)
+#define SharedXawReqs	  $(LDPRELIB) $(XMULIB) $(XTOOLLIB) $(XPMLIB) $(XLIB)
 #define SharedXmuReqs	  $(LDPRELIB) $(XTOOLLIB) $(XLIB)
 #define SharedXmuuReqs	  $(LDPRELIB) $(XONLYLIB)
 #define SharedXextReqs	  $(LDPRELIB) $(XONLYLIB)
Index: config/cf/os2Lib.tmpl
===================================================================
RCS file: /cvs/xorg/xc/config/cf/os2Lib.tmpl,v
retrieving revision 1.3
diff -u -p -r1.3 os2Lib.tmpl
--- config/cf/os2Lib.tmpl	28 May 2004 23:34:53 -0000	1.3
+++ config/cf/os2Lib.tmpl	14 Aug 2004 20:27:55 -0000
@@ -17,8 +17,8 @@ XCOMM $XFree86: xc/config/cf/os2Lib.tmpl
 #define SharedX11Reqs $(LDPRELIB) -lshm
 #define SharedOldXReqs $(LDPRELIB) $(XONLYLIB)
 #define SharedXtReqs $(LDPRELIB) $(XONLYLIB) $(SMLIB) $(ICELIB)
-#define SharedXaw6Reqs $(LDPRELIB) $(XMULIB) $(XTOOLLIB) $(XPLIB) $(XLIB)
-#define SharedXawReqs $(LDPRELIB) $(XMULIB) $(XTOOLLIB) $(XPMLIB) $(XPLIB) $(XLIB)
+#define SharedXaw6Reqs $(LDPRELIB) $(XMULIB) $(XTOOLLIB) $(XLIB)
+#define SharedXawReqs $(LDPRELIB) $(XMULIB) $(XTOOLLIB) $(XPMLIB) $(XLIB)
 #define SharedXmuReqs $(LDPRELIB) $(XTOOLLIB) $(XLIB)
 #define SharedXmuuReqs $(LDPRELIB) $(XTOOLLIB) $(XLIB)
 #define SharedXextReqs $(LDPRELIB) $(XONLYLIB)
@@ -150,7 +150,7 @@ XCOMM $XFree86: xc/config/cf/os2Lib.tmpl
        DEPXMULIB = 
           XMULIB = _Use(SDlibXmu,-L$(XMUSRC) SDlibXmu) $(XLIB)
 #ifndef XawClientLibs
-#define XawClientLibs $(XAWLIB) $(XMULIB) $(XTOOLLIB) $(XPMLIB) $(XPLIB) $(XLIB)
+#define XawClientLibs $(XAWLIB) $(XMULIB) $(XTOOLLIB) $(XPMLIB) $(XLIB)
 #endif
 #endif
 #if SharedOldX
Index: config/cf/osfLib.tmpl
===================================================================
RCS file: /cvs/xorg/xc/config/cf/osfLib.tmpl,v
retrieving revision 1.2
diff -u -p -r1.2 osfLib.tmpl
--- config/cf/osfLib.tmpl	23 Apr 2004 18:41:58 -0000	1.2
+++ config/cf/osfLib.tmpl	14 Aug 2004 20:27:55 -0000
@@ -20,7 +20,7 @@ XCOMM $XFree86: xc/config/cf/osfLib.tmpl
 #endif
 #define SharedXtReqs $(LDPRELIBS) $(XONLYLIB) $(SMLIB) $(ICELIB) SharedThreadReqs
 #if ModernOSF1
-#define SharedXawReqs $(LDPRELIBS) $(XMULIB) $(XTOOLLIB) $(XPLIB) $(XLIB)
+#define SharedXawReqs $(LDPRELIBS) $(XMULIB) $(XTOOLLIB) $(XLIB)
 #else
 #define SharedXawReqs $(LDPRELIBS) $(XMULIB) $(XTOOLLIB) $(XLIB) -init _XawFixupVendorShell
 #endif
Index: config/cf/sco5.cf
===================================================================
RCS file: /cvs/xorg/xc/config/cf/sco5.cf,v
retrieving revision 1.2
diff -u -p -r1.2 sco5.cf
--- config/cf/sco5.cf	23 Apr 2004 18:41:58 -0000	1.2
+++ config/cf/sco5.cf	14 Aug 2004 20:27:56 -0000
@@ -212,7 +212,7 @@ XMULIB = $(XMULIBONLY) $(XTOOLLIB) $(XLI
 #endif
 
 #ifndef XawClientLibs
-#define XawClientLibs $(XAWLIB) $(XMULIBONLY) $(XTOOLLIB) $(XPMLIB) $(XPLIB) $(XLIB)
+#define XawClientLibs $(XAWLIB) $(XMULIBONLY) $(XTOOLLIB) $(XPMLIB) $(XLIB)
 #endif
 
 #define SharedXlibi18nReqs $(LDPRELIB) $(XLIBONLY)
@@ -225,8 +225,8 @@ XMULIB = $(XMULIBONLY) $(XTOOLLIB) $(XLI
 #define SharedPexReqs       $(LDPRELIB) $(XONLYLIB) MathLibrary
 #define SharedSMReqs        $(LDPRELIB) $(ICELIB)
 #define SharedX11Reqs       $(LDPRELIB) -lsocket
-#define SharedXawReqs       $(LDPRELIB) $(XMULIB) $(XTOOLLIB) $(XPMLIB) $(XPLIB) $(XLIB)
-#define SharedXaw6Reqs      $(LDPRELIB) $(XMULIB) $(XTOOLLIB) $(XPLIB) $(XLIB)
+#define SharedXawReqs       $(LDPRELIB) $(XMULIB) $(XTOOLLIB) $(XPMLIB) $(XLIB)
+#define SharedXaw6Reqs      $(LDPRELIB) $(XMULIB) $(XTOOLLIB) $(XLIB)
 #define SharedXcursorReqs   $(LDPRELIB) $(XRENDERLIB) $(XLIB)
 #define SharedXextReqs      $(LDPRELIB) $(XONLYLIB)
 #define SharedXiReqs        $(LDPRELIB) $(XLIB)
Index: config/cf/sunLib.tmpl
===================================================================
RCS file: /cvs/xorg/xc/config/cf/sunLib.tmpl,v
retrieving revision 1.4
diff -u -p -r1.4 sunLib.tmpl
--- config/cf/sunLib.tmpl	28 Jul 2004 03:57:19 -0000	1.4
+++ config/cf/sunLib.tmpl	14 Aug 2004 20:27:56 -0000
@@ -58,7 +58,7 @@ XCOMM $XFree86: xc/config/cf/sunLib.tmpl
 # define SharedXlibi18nReqs $(LDPRELIB) $(XLIBONLY) -lc
 # define SharedOldXReqs $(LDPRELIB) $(XLIBONLY) -lc
 # define SharedXtReqs $(LDPRELIB) $(XLIBONLY) $(SMLIB) $(ICELIB) -lc
-# define SharedXawReqs $(LDPRELIB) $(XMULIB) $(XTOOLLIB) $(XPMLIB) $(XPLIB) $(XLIB) -lc
+# define SharedXawReqs $(LDPRELIB) $(XMULIB) $(XTOOLLIB) $(XPMLIB) $(XLIB) -lc
 # define SharedXaw6Reqs $(LDPRELIB) $(XMULIB) $(XTOOLLIB) $(XLIB) -lc
 # define SharedXmuReqs $(LDPRELIB) $(XTOOLLIB) $(XLIB) -lnsl -lc
 # define SharedXmuuReqs $(LDPRELIB) $(XLIBONLY) -lc
Index: config/cf/sv4Lib.tmpl
===================================================================
RCS file: /cvs/xorg/xc/config/cf/sv4Lib.tmpl,v
retrieving revision 1.2
diff -u -p -r1.2 sv4Lib.tmpl
--- config/cf/sv4Lib.tmpl	23 Apr 2004 18:41:58 -0000	1.2
+++ config/cf/sv4Lib.tmpl	14 Aug 2004 20:27:56 -0000
@@ -13,7 +13,7 @@ XMULIBONLY = -lXmu
 XMULIB = $(XMULIBONLY) -z nodefs
 #endif
 #ifndef XawClientLibs
-# define XawClientLibs $(XAWLIB) $(XMULIBONLY) $(XTOOLLIB) $(XPMLIB) $(XPLIB) $(XLIB)
+# define XawClientLibs $(XAWLIB) $(XMULIBONLY) $(XTOOLLIB) $(XPMLIB) $(XLIB)
 #endif
 
 #if 0
Index: lib/Imakefile
===================================================================
RCS file: /cvs/xorg/xc/lib/Imakefile,v
retrieving revision 1.7
diff -u -p -r1.7 Imakefile
--- lib/Imakefile	31 Jul 2004 05:50:39 -0000	1.7
+++ lib/Imakefile	14 Aug 2004 20:28:03 -0000
@@ -8,7 +8,7 @@ XCOMM $XFree86: xc/lib/Imakefile,v 3.74 
 #define IHaveSubdirs
 #define PassCDebugFlags
 
-#if BuildXaw6 && BuildXprintLib && BuildLibraries
+#if BuildXaw6 && BuildLibraries
 XAW6LIBDIR = Xaw6
 #endif
 
@@ -206,9 +206,7 @@ XTLIBDIR = Xt
 XMULIBDIR = Xmu
 XMUULIBDIR = Xmuu
 XPMLIBDIR = Xpm
-#if BuildXprintLib
 XAWLIBDIR = Xaw
-#endif
 XTSTLIBDIR = Xtst
 FSLIBDIR = FS
 #endif
Index: lib/Xaw/AllWidgets.c
===================================================================
RCS file: /cvs/xorg/xc/lib/Xaw/AllWidgets.c,v
retrieving revision 1.3
diff -u -p -r1.3 AllWidgets.c
--- lib/Xaw/AllWidgets.c	29 Jun 2004 15:53:10 -0000	1.3
+++ lib/Xaw/AllWidgets.c	14 Aug 2004 20:28:04 -0000
@@ -68,8 +68,10 @@ extern WidgetClass vendorShellWidgetClas
 extern WidgetClass viewportWidgetClass;
 extern WidgetClass wmShellWidgetClass;
 #ifndef OLDXAW
+#ifdef XPRINT_IN_XAW
 extern WidgetClass xawPrintShellWidgetClass;
 #endif
+#endif
 
 XmuWidgetNode XawWidgetArray[] = {
 { "applicationShell", &applicationShellWidgetClass },
@@ -115,8 +117,10 @@ XmuWidgetNode XawWidgetArray[] = {
 { "viewport", &viewportWidgetClass },
 { "wmShell", &wmShellWidgetClass },
 #ifndef OLDXAW
+#ifdef XPRINT_IN_XAW
 { "printShell", &xawPrintShellWidgetClass },
 #endif
+#endif
 };
 
 int XawWidgetCount = XtNumber(XawWidgetArray);
Index: lib/Xaw/Imakefile
===================================================================
RCS file: /cvs/xorg/xc/lib/Xaw/Imakefile,v
retrieving revision 1.3
diff -u -p -r1.3 Imakefile
--- lib/Xaw/Imakefile	21 Jul 2004 07:31:10 -0000	1.3
+++ lib/Xaw/Imakefile	14 Aug 2004 20:28:04 -0000
@@ -94,8 +94,6 @@ HEADERS = \
 	VendorEP.h \
 	Viewport.h \
 	ViewportP.h \
-        Print.h \
-        PrintSP.h \
 	XawImP.h \
 	XawInit.h
 
@@ -141,7 +139,6 @@ SRCS = \
 	Tree.c \
 	Vendor.c \
 	Viewport.c \
-        PrintShell.c \
 	XawIm.c \
 	XawInit.c \
 	XawI18n.c \
@@ -193,7 +190,6 @@ OBJS = \
 	Tree.o \
 	Vendor.o \
 	Viewport.o \
-        PrintShell.o \
 	XawIm.o \
 	XawI18n.o \
 	XawInit.o
Index: programs/Imakefile
===================================================================
RCS file: /cvs/xorg/xc/programs/Imakefile,v
retrieving revision 1.6
diff -u -p -r1.6 Imakefile
--- programs/Imakefile	29 Jun 2004 17:10:13 -0000	1.6
+++ programs/Imakefile	14 Aug 2004 20:28:05 -0000
@@ -38,7 +38,9 @@ SCREENSAVESRCDIR = beforelight
 #if BuildLBX
   LBXPROXYSRCDIR = lbxproxy
 #endif
+#if BuildXprintClients
   XPSRCDIRS = xplsprinters xprehashprinterlist xphelloworld
+#endif
   PROXYMGRSRCDIR = proxymngr
     RSTARTSRCDIR = rstart
    SMPROXYSRCDIR = smproxy
@@ -133,7 +135,7 @@ SUBDIRS = \
 	$(XF86DGASRCDIR) xedit xev xeyes xfd xfontsel $(XFSSRCDIR) xfsinfo \
 	$(XFINDPROXYSRCDIR) $(XFWPSRCDIR) $(XGAMMASRCDIR) xgc $(XHOSTSRCDIR) \
 	$(XINITSRCDIR) $(XKBSRCDIRS) xkill $(XLOADDIR) xlogo xlsatoms \
-	xlsclients xlsfonts xmag xman xmore xmessage xmh xmodmap xprop xrdb \
+	xlsclients xlsfonts xmag xman xmessage xmh xmodmap xprop xrdb \
 	xrefresh $(XRXSRCDIR) xset \
 	xsetroot $(XSMSRCDIR) xstdcmap $(XINPUTCLIENTDIRS) \
 	$(XTERMSRCDIR) $(XTRAPCLIENTDIRS) $(XVIDTUNESRCDIR) xwd xwininfo xwud \
Index: programs/glxgears/Imakefile
===================================================================
RCS file: /cvs/xorg/xc/programs/glxgears/Imakefile,v
retrieving revision 1.4
diff -u -p -r1.4 Imakefile
--- programs/glxgears/Imakefile	21 Jun 2004 14:32:45 -0000	1.4
+++ programs/glxgears/Imakefile	14 Aug 2004 20:28:10 -0000
@@ -1,8 +1,15 @@
 XCOMM $XConsortium: Imakefile /main/7 1995/12/04 15:10:00 dpw $
 XCOMM $XFree86: xc/programs/glxinfo/Imakefile,v 1.3 2001/03/21 20:56:32 dawes Exp $
 #include <Threads.tmpl>
+
+#if BuildXprintLib
+     XPRINTLIBS = $(XPLIB) -lXprintUtil
+  XPRINTDEFINES = -DXPRINT
+#endif
+
         DEPLIBS = $(DEPGLXLIB) $(DEPXPLIB) $(DEPXLIB)
-LOCAL_LIBRARIES = $(GLXLIB) -lXprintUtil $(XPLIB) $(XLIB)
+LOCAL_LIBRARIES = $(GLXLIB) $(XPRINTLIBS) $(XLIB)
+        DEFINES = $(XPRINTDEFINES)
   SYS_LIBRARIES = MathLibrary
 
 SimpleProgramTarget(glxgears)
Index: programs/glxgears/glxgears.c
===================================================================
RCS file: /cvs/xorg/xc/programs/glxgears/glxgears.c,v
retrieving revision 1.3
diff -u -p -r1.3 glxgears.c
--- programs/glxgears/glxgears.c	29 Apr 2004 23:00:06 -0000	1.3
+++ programs/glxgears/glxgears.c	14 Aug 2004 20:28:11 -0000
@@ -31,7 +31,9 @@
 
 #include <X11/Xlib.h>
 #include <X11/Xutil.h>
+#ifdef XPRINT
 #include <X11/XprintUtil/xprintutil.h>
+#endif
 #include <X11/keysym.h>
 #include <GL/gl.h>
 #include <GL/glx.h>
@@ -467,14 +469,17 @@ event_loop(Display *dpy, Window win, int
       /* next frame */
       angle += 2.0;
 
+#ifdef XPRINT
       if (numPages > 0) {
          XpStartPage(dpy, win);
          XpuWaitForPrintNotify(dpy, xp_event_base, XPStartPageNotify);      
       }
+#endif
 
       draw();
       glXSwapBuffers(dpy, win);
 
+#ifdef XPRINT
       if (numPages > 0) {
          XpEndPage(dpy);
          XpuWaitForPrintNotify(dpy, xp_event_base, XPEndPageNotify);
@@ -483,6 +488,7 @@ event_loop(Display *dpy, Window win, int
          if( --numPages == 0 )
             return;
       }
+#endif
            
       /* calc framerate */
       {
@@ -513,13 +519,16 @@ main(int argc, char *argv[])
 {
    Display       *dpy;
    Window         win;
-   XPContext      pcontext           = None; /* Xprint context */
-   void          *printtofile_handle = NULL; /* "context" when printing to file */
-   long           dpi;
    Screen        *screen;
    GLXContext     ctx;
    char          *dpyName            = NULL;
    int            i;
+   XRectangle     winrect;
+
+#ifdef XPRINT
+   long           dpi;
+   XPContext      pcontext           = None; /* Xprint context */
+   void          *printtofile_handle = NULL; /* "context" when printing to file */
    Bool           doPrint            = FALSE; /* Print to printer ? */
    const char    *printername        = NULL;  /* printer to query */
    const char    *toFile             = NULL;  /* output file (instead of printer) */
@@ -527,7 +536,7 @@ main(int argc, char *argv[])
    XPPrinterList  plist              = NULL;  /* list of printers */
    int            plist_count;                /* number of entries in |plist|-array */
    unsigned short dummy;
-   XRectangle     winrect;
+#endif 
 
    ProgramName = argv[0];
     
@@ -543,6 +552,7 @@ main(int argc, char *argv[])
       else if (strcmp(argv[i], "-info") == 0) {
          printInfo = GL_TRUE;
       }
+#ifdef XPRINT
       else if (strcmp(argv[i], "-print") == 0) {
          doPrint = True;
       }
@@ -566,6 +576,7 @@ main(int argc, char *argv[])
          if (numPages <= 0)
             usage();
       }
+#endif
       else if (!strncmp("-v", arg, len)) {
          verbose   = True;
          printInfo = GL_TRUE;
@@ -580,6 +591,7 @@ main(int argc, char *argv[])
       }
    }
    
+#ifdef XPRINT
    /* Display and printing at the same time not implemented */
    if (doPrint && dpyName) {
       usage();
@@ -666,6 +678,7 @@ main(int argc, char *argv[])
       winrect.y += winrect.height / 2;
    }
    else
+#endif
    {
       dpy = XOpenDisplay(dpyName);
       if (!dpy) {
@@ -696,10 +709,15 @@ main(int argc, char *argv[])
 
    init();
 
+#ifdef XPRINT
    event_loop(dpy, win, doPrint?numPages:0);
+#else
+   event_loop(dpy, win, 0);
+#endif
 
    glXDestroyContext(dpy, ctx);
 
+#ifdef XPRINT
    if (doPrint) {
       /* End the print job - the final results are sent by the X print
        * server to the spooler sub system.
@@ -722,6 +740,7 @@ main(int argc, char *argv[])
       XpuFreePrinterList(plist);
    }
    else 
+#endif
    {
       XDestroyWindow(dpy, win);
       XCloseDisplay(dpy);
Index: programs/xdpyinfo/Imakefile
===================================================================
RCS file: /cvs/xorg/xc/programs/xdpyinfo/Imakefile,v
retrieving revision 1.4
diff -u -p -r1.4 Imakefile
--- programs/xdpyinfo/Imakefile	30 Jun 2004 20:06:56 -0000	1.4
+++ programs/xdpyinfo/Imakefile	14 Aug 2004 20:28:12 -0000
@@ -62,17 +62,22 @@ XCOMM $XFree86: xc/programs/xdpyinfo/Ima
            DMXLIBS = $(DMXLIB)
 #endif
 
+#if BuildXprintLib
+     XPRINTDEFINES = -DXPRINT
+        XPRINTLIBS = $(XPLIB)
+#endif
+
       OTHERDEFINES = $(SHMDEFINES) $(XKBDEFINES) $(XINPUTDEFINES) \
 			$(MULTIBUFDEFINES) $(XIEDEFINES) $(XRENDERDEFINES) \
-			$(XINERAMADEFINES) $(DMXDEFINES)
+			$(XINERAMADEFINES) $(DMXDEFINES) $(XPRINTDEFINES)
       OTHERDEPLIBS = $(XINPUTDEPLIBS) $(XIEDEPLIBS) $(XRENDERDEPLIBS)
          OTHERLIBS = $(XINPUTLIBS) $(XIELIBS) $(XRENDERLIBS) $(XINERAMALIBS) \
-		     $(DMXLIBS)
+		     $(DMXLIBS) $(XPRINTLIBS)
 
         DEFINES = $(OTHERDEFINES) $(XF86DEFINES)
         DEPLIBS = $(DEPXTESTLIB) XkbClientDepLibs $(OTHERDEPLIBS) \
 		  $(DEPXF86LIBS) $(DEPXPLIB) $(DEPXLIB)
 LOCAL_LIBRARIES = $(XTESTLIB) XkbClientLibs $(OTHERLIBS) \
-		  $(XF86LIBS) $(XPLIB) $(XLIB)
+		  $(XF86LIBS) $(XLIB)
 
 SimpleProgramTarget(xdpyinfo)
Index: programs/xdpyinfo/xdpyinfo.c
===================================================================
RCS file: /cvs/xorg/xc/programs/xdpyinfo/xdpyinfo.c,v
retrieving revision 1.5
diff -u -p -r1.5 xdpyinfo.c
--- programs/xdpyinfo/xdpyinfo.c	30 Jun 2004 20:06:56 -0000	1.5
+++ programs/xdpyinfo/xdpyinfo.c	14 Aug 2004 20:28:13 -0000
@@ -73,7 +73,9 @@ in this Software without prior written a
 #ifdef DMX
 #include <X11/extensions/dmxext.h>
 #endif
+#ifdef XPRINT
 #include <X11/extensions/Print.h>
+#endif
 #include <X11/Xos.h>
 #include <stdio.h>
 #include <stdlib.h>
@@ -386,6 +388,7 @@ print_screen_info(Display *dpy, int scr)
     printf ("\n");
     printf ("screen #%d:\n", scr);
 
+#ifdef XPRINT
     /* Check whether this is a screen of a print DDX */
     if (hasExtension(dpy, XP_PRINTNAME)) {
         Screen **pscreens;
@@ -401,6 +404,7 @@ print_screen_info(Display *dpy, int scr)
         XFree(pscreens);		      
     }
     printf ("  print screen:    %s\n", isPrintScreen?"yes":"no");
+#endif
 
     if (isPrintScreen) {
         /* Print resolution is set on a per-printer basis (per-document
@@ -1196,6 +1200,7 @@ static int print_dmx_info(Display *dpy, 
 
 #endif /* DMX */
 
+#ifdef XPRINT
 static
 void print_xprint_attrpool(const char *name, const char *attrpool)
 {
@@ -1220,6 +1225,7 @@ void print_xprint_attrpool(const char *n
 static int
 print_xprint_info(Display *dpy, char *extname)
 {  
+
   short           majorrev,
                   minorrev;
   int             xp_event_base,
@@ -1286,9 +1292,10 @@ print_xprint_info(Display *dpy, char *ex
   }
   
   XpFreePrinterList(printerlist);
- 
+
   return 1;
 }
+#endif 
 
 /* utilities to manage the list of recognized extensions */
 
@@ -1340,7 +1347,9 @@ ExtensionPrintInfo known_extensions[] =
 #ifdef DMX
     {"DMX", print_dmx_info, False},
 #endif
+#ifdef XPRINT
     {XP_PRINTNAME, print_xprint_info, False},
+#endif
     /* add new extensions here */
 };
 
Index: programs/xedit/Imakefile
===================================================================
RCS file: /cvs/xorg/xc/programs/xedit/Imakefile,v
retrieving revision 1.4
diff -u -p -r1.4 Imakefile
--- programs/xedit/Imakefile	21 Jun 2004 14:32:45 -0000	1.4
+++ programs/xedit/Imakefile	14 Aug 2004 20:28:13 -0000
@@ -18,7 +18,7 @@ LOCAL_LDFLAGS	= -Xlinker -E
        LISP_OBJ = lisp.o
 
         DEPLIBS = XawClientDepLibs $(SUBDIRS)
-LOCAL_LIBRARIES = $(LISPLIBS) -lXprintUtil $(XPLIB) XawClientLibs $(DLLIB)
+LOCAL_LIBRARIES = $(LISPLIBS) XawClientLibs $(DLLIB)
   SYS_LIBRARIES = MathLibrary
 #if defined(LynxOSArchitecture) || defined(SVR3Architecture) || defined(LinuxArchitecture)
         RP_SRCS = realpath.c
@@ -37,15 +37,9 @@ STRCCMP_DEFINES = -DNEED_STRCASECMP
        INCLUDES = -I. -Ilisp/re $(MISC_INCLUDES)
 
            SRCS = xedit.c commands.c util.c $(SYS_SRCS) ispell.c options.c \
-		  hook.c printdialog.c print.c $(LISP_SRC)
+		  hook.c $(LISP_SRC)
            OBJS = xedit.o commands.o util.o $(SYS_OBJS) ispell.o options.o \
-		  hook.o printdialog.o print.o $(LISP_OBJ)
-
-LinkSourceFile(printdialog.c,../xmore)
-LinkSourceFile(printdialog.h,../xmore)
-LinkSourceFile(printdialogprivates.h,../xmore)
-LinkSourceFile(print.c,../xmore)
-LinkSourceFile(print.h,../xmore)
+		  hook.o $(LISP_OBJ)
 
 #ifdef IHaveSubdirs
 ForceSubdirs($(SUBDIRS))
Index: programs/xedit/Xedit.ad
===================================================================
RCS file: /cvs/xorg/xc/programs/xedit/Xedit.ad,v
retrieving revision 1.4
diff -u -p -r1.4 Xedit.ad
--- programs/xedit/Xedit.ad	8 Jun 2004 02:44:34 -0000	1.4
+++ programs/xedit/Xedit.ad	14 Aug 2004 20:28:13 -0000
@@ -5,7 +5,6 @@
 *enableBackups:				True
 *backupNameSuffix:			~
 *changedBitmap:				xlogo11
-*international:                         True
 
 *hints:\
 Use Control-S and Control-R to Search.\n\
@@ -64,8 +63,6 @@ Use Control-G to interrupt the lisp subp
 *save.tip:				Save current file
 *load.label:				Load
 *load.tip:				Load a new file
-*print.label:				Print
-*print.tip:				Print current file
 
 *buttons*orientation:			horizontal
 *buttons*showGrip:			False
@@ -246,7 +243,6 @@ c<Key>R:	no-op(r)\n\
 m<Key>I:	no-op(r)\n\
 c<Key>G:	cancel-find-file()\n\
 <Key>Return:	load-file()\n\
-<Key>P:	        print-file()\n\
 <Key>Tab:	file-completion(h)\n\
 <Key>Escape:	cancel-find-file()\n\
 <Enter>:	no-op()\n\
@@ -461,99 +457,3 @@ c<Key>G:	set-columns(cancel)\n\
 
 *columns.translations:	#override \
 <Message>WM_PROTOCOLS:	set-columns(cancel)
-
-! Use "white" as background for printing
-*printshell*background:   white
-
-! Print dialog
-*printdialogshell*geometry:                       600x120
-*printdialogshell*title:                          Print
-*printdialogshell*main*ok.fromVert:               innerform
-*printdialogshell*main*ok.label:                  Print
-*printdialogshell*main*ok.tip:                    Print
-*printdialogshell*main*setup.fromHoriz:           ok
-*printdialogshell*main*setup.fromVert:            innerform
-*printdialogshell*main*setup.label:               Setup...
-*printdialogshell*main*setup.tip:                 Configure print job options (page size, orientation, etc.)
-*printdialogshell*main*cancel.fromHoriz:          setup
-*printdialogshell*main*cancel.fromVert:           innerform
-*printdialogshell*main*cancel.label:              Cancel
-*printdialogshell*main*cancel.tip:                Cancel printing
-*printdialogshell*main*desclabel.label:           Printer Description:
-*printdialogshell*main*desclabel.tip:             Short description of printer
-*printdialogshell*main*desc.fromHoriz:            desclabel
-*printdialogshell*main*desc.tip:                  Short description of printer
-*printdialogshell*main*info.fromHoriz:            desc
-*printdialogshell*main*info.label:                Printer info...
-*printdialogshell*main*info.tip:                  Display additional information about this printer
-*printdialogshell*main*namelabel.fromVert:        desclabel
-*printdialogshell*main*namelabel.label:           Printer Name:
-*printdialogshell*main*namelabel.tip:             Name of selected printer
-*printdialogshell*main*name.fromHoriz:            namelabel
-*printdialogshell*main*name.fromVert:             desclabel
-*printdialogshell*main*name.tip:                  Name of selected printer
-*printdialogshell*main*selectprinter.fromHoriz:   name
-*printdialogshell*main*selectprinter.fromVert:    desclabel
-*printdialogshell*main*selectprinter.label:       Select Printer...
-*printdialogshell*main*selectprinter.label:       Select Printer...
-*printdialogshell*main*selectprinter.tip:         Select a different printer
-*printdialogshell*main*filenamelabel.fromVert:    namelabel
-*printdialogshell*main*filenamelabel.label:       File Name:
-*printdialogshell*main*filenamelabel.tip:         File where the output should be stored
-*printdialogshell*main*filename.fromHoriz:        filenamelabel
-*printdialogshell*main*filename.fromVert:         namelabel
-*printdialogshell*main*filename.tip:              File where the output should be stored
-*printdialogshell*main*selectfile.fromHoriz:      filename
-*printdialogshell*main*selectfile.fromVert:       namelabel
-*printdialogshell*main*selectfile.label:          Select File...
-*printdialogshell*main*selectfile.tip:            Select file where the output should be stored
-*printdialogshell*main*printtoprinter.fromVert:   filenamelabel
-*printdialogshell*main*printtoprinter.label:      Print to Printer
-*printdialogshell*main*printtoprinter.tip:        Send print job to printer
-*printdialogshell*main*printtofile.fromVert:      filenamelabel
-*printdialogshell*main*printtofile.fromHoriz:     printtoprinter
-*printdialogshell*main*printtofile.label:         Print to File
-*printdialogshell*main*printtofile.tip:           Save print job in a file
-
-! Print job options dialog
-*printdialogshell*setup*geometry:                     600x400
-*printdialogshell*setup*title:                        Print: Print job options
-*printdialogshell*setup*ok.fromVert:                  list
-*printdialogshell*setup*ok.label:                     OK
-*printdialogshell*setup*ok.tip:                       Commit changes
-*printdialogshell*setup*cancel.fromHoriz:             ok
-*printdialogshell*setup*cancel.fromVert:              list
-*printdialogshell*setup*cancel.label:                 Cancel
-*printdialogshell*setup*cancel.tip:                   Cancel and reset to defaults
-*printdialogshell*setup*paperlist.tip:                Select paper size
-*printdialogshell*setup*resolutionlist.fromHoriz:     paperlist
-*printdialogshell*setup*resolutionlist.tip:           Select page resolution
-*printdialogshell*setup*orientationlist.fromHoriz:    resolutionlist
-*printdialogshell*setup*orientationlist.tip:          Select page orientation
-*printdialogshell*setup*plexlist.fromHoriz:           orientationlist
-*printdialogshell*setup*plexlist.tip:                 Select page plex mode (simplex, duplex, etc.)
-*printdialogshell*setup*jobcopieslabel.fromVert:      paperlist
-*printdialogshell*setup*jobcopieslabel.tip:           Set number of job copies
-*printdialogshell*setup*jobcopieslabel.label:         Job Copies:
-*printdialogshell*setup*jobcopies.fromHoriz:          jobcopieslabel
-*printdialogshell*setup*jobcopies.fromVert:           paperlist
-*printdialogshell*setup*jobcopies.tip:                Set number of job copies
-
-! Printer selection
-*printdialogshell*printerselection*geometry:          400x150
-*printdialogshell*printerselection*title:             Print: Select printer
-*printdialogshell*printerselection*ok.fromVert:       list
-*printdialogshell*printerselection*ok.label:          OK
-*printdialogshell*printerselection*ok.tip:            Switch printer
-*printdialogshell*printerselection*cancel.fromHoriz:  ok
-*printdialogshell*printerselection*cancel.fromVert:   list
-*printdialogshell*printerselection*cancel.label:      Cancel
-*printdialogshell*printerselection*cancel.tip:        Cancel printer selection
-*printdialogshell*printerselection*list.tip:          Select printer name from list
-
-! Select job file
-*printdialogshell*selectfile*geometry:          400x80
-*printdialogshell*selectfile*title:             Print: Select job file
-*printdialogshell*selectfile*dialog.label:      Select Filename:
-
-! EOF.
Index: programs/xedit/commands.c
===================================================================
RCS file: /cvs/xorg/xc/programs/xedit/commands.c,v
retrieving revision 1.3
diff -u -p -r1.3 commands.c
--- programs/xedit/commands.c	30 May 2004 22:44:00 -0000	1.3
+++ programs/xedit/commands.c	14 Aug 2004 20:28:14 -0000
@@ -29,14 +29,10 @@
 #include <X11/Xfuncs.h>
 #include <X11/Xos.h>
 #include "xedit.h"
-#include "printdialog.h"
-#include "print.h"
 #ifdef CRAY
 #include <unistd.h>
 #endif
 #include <stdlib.h>
-#include <stdio.h>
-#include <limits.h>
 #include <string.h>
 #include <dirent.h>
 #include <pwd.h>
@@ -45,17 +41,6 @@
 #include <X11/IntrinsicP.h>
 #include <X11/Xaw/TextSrcP.h>
 
-/* Turn a NULL pointer string into an empty string */
-#define NULLSTR(x) (((x)!=NULL)?(x):(""))
-
-#define Error(x) { printf x ; exit(EXIT_FAILURE); }
-#define Assertion(expr, msg) { if (!(expr)) { Error msg } }
-#define Log(x)   { if (True) printf x; }
-
-static Widget printdialog_shell = NULL;
-static Widget printdialog       = NULL;
-static char   printJobNameBuffer[PATH_MAX+256];
-
 void ResetSourceChanged(xedit_flist_item*);
 static void ResetDC(Widget, XtPointer, XtPointer);
 
@@ -353,8 +338,8 @@ DoSave(Widget w, XtPointer client_data, 
 	      XtRemoveCallback(scratch, XtNcallback, SourceChanged,
 			       (XtPointer)item);
 	      item->source = scratch =
-		  XtVaCreateWidget("textSource",
-				   multiSrcObjectClass,
+		  XtVaCreateWidget("textSource", international ?
+				   multiSrcObjectClass : asciiSrcObjectClass,
 				   topwindow,
 				   XtNtype, XawAsciiFile,
 				   XtNeditType, XawtextEdit,
@@ -491,8 +476,8 @@ ReallyDoLoad(char *name, char *filename)
 	    XtSetArg(args[num_args], XtNstring, NULL); num_args++;
 	}
 
-	source = XtVaCreateWidget("textSource",
-				  multiSrcObjectClass,
+	source = XtVaCreateWidget("textSource", international ?
+				  multiSrcObjectClass : asciiSrcObjectClass,
 				  topwindow,
 				  XtNtype, XawAsciiFile,
 				  XtNeditType, XawtextEdit,
@@ -515,107 +500,6 @@ ReallyDoLoad(char *name, char *filename)
     return (True);
 }
 
-static void
-printshellDestroyXtProc(Widget w, XtPointer client_data, XtPointer callData)
-{
-    XawPrintDialogClosePrinterConnection(printdialog, False);
-}
-
-static void
-printOKXtProc(Widget w, XtPointer client_data, XtPointer callData)
-{
-    XawPrintDialogCallbackStruct *pdcs = (XawPrintDialogCallbackStruct *)callData;
-    Cardinal                      n;
-    Arg                           args[2];
-    Widget                        textsource;
-
-    Log(("printOKXtProc: OK.\n"));
-    
-    /* Get TextSource object */
-    n = 0;
-    XtSetArg(args[n], XtNtextSource, &textsource); n++;
-    XtGetValues(textwindow, args, n);
-    
-    Assertion(textsource != NULL, (("printOKXtProc: textsource == NULL.\n")));
-   
-    /* ||printJobNameBuffer| must live as long the print job prints
-     * because it is used for the job title AND the page headers... */
-    sprintf(printJobNameBuffer, "Xedit print job");
-
-    DoPrintTextSource("Xedit",
-                      textsource, topwindow,
-                      pdcs->pdpy, pdcs->pcontext, printshellDestroyXtProc,
-                      printJobNameBuffer,
-                      pdcs->printToFile?pdcs->printToFileName:NULL);
-
-    XtPopdown(printdialog_shell);
-}
-
-static void
-printCancelXtProc(Widget w, XtPointer client_data, XtPointer callData)
-{
-    Log(("printCancelXtProc: cancel.\n"));
-    XtPopdown(printdialog_shell);
-    
-    Log(("destroying print dialog shell...\n"));
-    XtDestroyWidget(printdialog_shell);
-    printdialog_shell = NULL;
-    printdialog       = NULL;
-    Log(("... done\n"));
-}
-
-
-/*ARGSUSED*/
-void
-PrintFile(Widget w, XEvent *event, String *params, Cardinal *num_params)
-{
-    DoPrint(w, NULL, NULL);
-}
-
-/*ARGSUSED*/
-void
-DoPrint(Widget w, XtPointer client_data, XtPointer call_data)
-{
-  Dimension   width, height;
-  Position    x, y;
-  Widget      parent = topwindow;
-  Log(("print!\n"));
-  
-  if (!printdialog) {
-    int n;
-    Arg args[20];
-
-    n = 0;
-    XtSetArg(args[n], XtNallowShellResize, True); n++;
-    printdialog_shell = XtCreatePopupShell("printdialogshell",
-                                           transientShellWidgetClass,
-                                           topwindow, args, n);
-    n = 0;
-    printdialog = XtCreateManagedWidget("printdialog", printDialogWidgetClass,
-                                        printdialog_shell, args, n);
-    XtAddCallback(printdialog, XawNOkCallback,     printOKXtProc,     NULL);
-    XtAddCallback(printdialog, XawNCancelCallback, printCancelXtProc, NULL);
-
-    XtRealizeWidget(printdialog_shell);
-  }
-
-  /* Center dialog */
-  XtVaGetValues(printdialog_shell,
-      XtNwidth,  &width,
-      XtNheight, &height,
-      NULL);
-
-  x = (Position)(XWidthOfScreen( XtScreen(parent)) - width)  / 2;
-  y = (Position)(XHeightOfScreen(XtScreen(parent)) - height) / 3;
-
-  XtVaSetValues(printdialog_shell,
-      XtNx, x,
-      XtNy, y,
-      NULL);
-        
-  XtPopup(printdialog_shell, XtGrabNonexclusive);
-}
-
 /*	Function Name: SourceChanged
  *	Description: A callback routine called when the source has changed.
  *	Arguments: w - the text source that has changed.
Index: programs/xedit/hook.c
===================================================================
RCS file: /cvs/xorg/xc/programs/xedit/hook.c,v
retrieving revision 1.3
diff -u -p -r1.3 hook.c
--- programs/xedit/hook.c	30 May 2004 22:44:00 -0000	1.3
+++ programs/xedit/hook.c	14 Aug 2004 20:28:21 -0000
@@ -388,11 +388,9 @@ LineEditAction(Widget w, XEvent *event, 
 {
     XawTextBlock block;
 
-    if (True) {
+    if (international)
 	/* XXX FIXME */
-        fprintf(stderr, "LineEditAction: Not working in international mode.\n");
 	return;
-    }
 
     block.firstPos = 0;
     block.format = FMT8BIT;
Index: programs/xedit/ispell.c
===================================================================
RCS file: /cvs/xorg/xc/programs/xedit/ispell.c,v
retrieving revision 1.3
diff -u -p -r1.3 ispell.c
--- programs/xedit/ispell.c	30 May 2004 22:44:00 -0000	1.3
+++ programs/xedit/ispell.c	14 Aug 2004 20:28:21 -0000
@@ -27,7 +27,7 @@
  * Author: Paulo César Pereira de Andrade
  */
 
-/* $XdotOrg: xc/programs/xedit/ispell.c,v 1.3 2004/05/30 22:44:00 gisburn Exp $ */
+/* $XdotOrg: xc/programs/xedit/ispell.c,v 1.2 2004/04/23 19:54:43 eich Exp $ */
 /* $XFree86: xc/programs/xedit/ispell.c,v 1.19 2002/10/19 20:04:20 herrb Exp $ */
 
 #include "xedit.h"
@@ -938,7 +938,10 @@ IspellSend(void)
 	    return (-1);
 	}
 	for (i = 0; i < block.length; i++) {
-  	    wctomb(mb, ((wchar_t*)block.ptr)[i]);
+	    if (international)
+		wctomb(mb, ((wchar_t*)block.ptr)[i]);
+	    else
+		*mb = block.ptr[i];
 	    if (amplen) {
 		if (amplen + 2 >= sizeof(ampbuf)) {
 		    if (!ispell.terse_mode)
@@ -1036,7 +1039,10 @@ IspellSend(void)
 	    return (-1);
 	}
 	for (i = 0; i < block.length; i++) {
-	    wctomb(mb, ((wchar_t*)block.ptr)[i]);
+	    if (international)
+		wctomb(mb, ((wchar_t*)block.ptr)[i]);
+	    else
+		*mb = block.ptr[i];
 	    if (amplen) {
 		if (amplen + 2 >= sizeof(ampbuf)) {
 		    if (!ispell.terse_mode)
@@ -1560,12 +1566,18 @@ ReplaceIspell(Widget w, XtPointer client
 		char mb[sizeof(wchar_t)];
 
 		if (XawTextSourceRead(ispell.source, pos - 1, &check, 1) > 0) {
-		    wctomb(mb, *(wchar_t*)check.ptr);
+		    if (international)
+			wctomb(mb, *(wchar_t*)check.ptr);
+		    else
+			*mb = *check.ptr;
 		    do_replace = !isalpha(*mb) && *mb && !strchr(ispell.wchars, *mb);
 		}
 		if (do_replace &&
 		    XawTextSourceRead(ispell.source, pos + search.length, &check, 1) > 0) {
-		    wctomb(mb, *(wchar_t*)check.ptr);
+		    if (international)
+			wctomb(mb, *(wchar_t*)check.ptr);
+		    else
+			*mb = *check.ptr;
 		    do_replace = !isalpha(*mb) && *mb && !strchr(ispell.wchars, *mb);
 		}
 		if (do_replace) {
Index: programs/xedit/xedit.c
===================================================================
RCS file: /cvs/xorg/xc/programs/xedit/xedit.c,v
retrieving revision 1.3
diff -u -p -r1.3 xedit.c
--- programs/xedit/xedit.c	30 May 2004 22:44:00 -0000	1.3
+++ programs/xedit/xedit.c	14 Aug 2004 20:28:22 -0000
@@ -41,7 +41,6 @@ static XtActionsRec actions[] = {
 {"quit", QuitAction},
 {"save-file", SaveFile},
 {"load-file", LoadFile},
-{"print-file", PrintFile},
 {"find-file", FindFile},
 {"cancel-find-file", CancelFindFile},
 {"file-completion", FileCompletion},
@@ -72,6 +71,7 @@ static XawTextPositionInfo infos[3];
 Widget topwindow, textwindow, messwidget, labelwindow, filenamewindow;
 Widget scratch, hpane, vpanes[2], labels[3], texts[3], forms[3], positions[3];
 Widget options_popup, dirlabel, dirwindow;
+Boolean international;
 Boolean line_edit;
 XawTextWrapMode wrapmodes[3];
 
@@ -111,11 +111,6 @@ static XtResource resources[] = {
 
 #undef Offset
 
-String fallback_resources[] = {
-    "*international:     True", /* set this globally for ALL widgets to avoid wiered crashes */
-    NULL
-};
-
 int
 main(int argc, char *argv[])
 {
@@ -123,7 +118,7 @@ main(int argc, char *argv[])
   unsigned num_loaded = 0;
 
   XtSetLanguageProc(NULL, NULL, NULL);
-  topwindow = XtAppInitialize(&appcon, "Xedit", NULL, 0, &argc, argv, fallback_resources, NULL, 0);
+  topwindow = XtAppInitialize(&appcon, "Xedit", NULL, 0, &argc, argv, NULL, NULL, 0);
 
   XtAppAddActions(appcon, actions, XtNumber(actions));
   XtOverrideTranslations
@@ -245,8 +240,9 @@ main(int argc, char *argv[])
 		  flags = 0;
 		  XtSetArg(args[num_args], XtNstring, NULL);	num_args++;
 	      }
-	      source = XtVaCreateWidget("textSource",
-					multiSrcObjectClass, topwindow,
+	      source = XtVaCreateWidget("textSource", international ?
+					multiSrcObjectClass
+					: asciiSrcObjectClass, topwindow,
 					XtNtype, XawAsciiFile,
 					XtNeditType, XawtextEdit,
 					NULL, NULL);
@@ -306,7 +302,6 @@ makeButtonsAndBoxes(Widget parent)
 	MakeCommandButton(b_row, "quit", DoQuit);
 	MakeCommandButton(b_row, "save", DoSave);
 	MakeCommandButton(b_row, "load", DoLoad);
-	MakeCommandButton(b_row, "print", DoPrint);
 	filenamewindow = MakeStringBox(b_row, "filename", NULL);
     }
     hintswindow = XtCreateManagedWidget("bc_label", labelWidgetClass,
@@ -352,10 +347,15 @@ makeButtonsAndBoxes(Widget parent)
     textwindow =  XtCreateManagedWidget(editWindow, asciiTextWidgetClass,
 					vpanes[0], arglist, num_args);
     num_args = 0;
+    XtSetArg(arglist[num_args], XtNinternational, &international);	++num_args;
+    XtGetValues(textwindow, arglist, num_args);
+
+    num_args = 0;
     XtSetArg(arglist[num_args], XtNtype, XawAsciiFile);			++num_args;
     XtSetArg(arglist[num_args], XtNeditType, XawtextEdit);		++num_args;
-    scratch = XtVaCreateWidget("textSource",
-			       multiSrcObjectClass, topwindow,
+    scratch = XtVaCreateWidget("textSource", international ?
+			       multiSrcObjectClass
+			       : asciiSrcObjectClass, topwindow,
 			       XtNtype, XawAsciiFile,
 			       XtNeditType, XawtextEdit,
 			       NULL, NULL);
Index: programs/xedit/xedit.h
===================================================================
RCS file: /cvs/xorg/xc/programs/xedit/xedit.h,v
retrieving revision 1.3
diff -u -p -r1.3 xedit.h
--- programs/xedit/xedit.h	30 May 2004 22:44:00 -0000	1.3
+++ programs/xedit/xedit.h	14 Aug 2004 20:28:22 -0000
@@ -100,6 +100,7 @@ extern struct _app_resources {
 
 extern Widget topwindow, textwindow, labelwindow, filenamewindow, messwidget;
 extern Widget dirlabel, dirwindow;
+extern Boolean international;
 extern Boolean line_edit;
 
 /*	externals in xedit.c 	*/
@@ -131,11 +132,9 @@ void QuitAction(Widget, XEvent*, String*
 void DoSave(Widget, XtPointer, XtPointer);
 void SaveFile(Widget, XEvent*, String*, Cardinal*);
 void DoLoad(Widget, XtPointer, XtPointer);
-void DoPrint(Widget, XtPointer, XtPointer);
 void CancelFindFile(Widget, XEvent*, String*, Cardinal*);
 void FindFile(Widget, XEvent*, String*, Cardinal*);
 void LoadFile(Widget, XEvent*, String*, Cardinal*);
-void PrintFile(Widget, XEvent*, String*, Cardinal*);
 void FileCompletion(Widget, XEvent*, String*, Cardinal*);
 void KillFile(Widget, XEvent*, String*, Cardinal*);
 void DirWindowCB(Widget, XtPointer, XtPointer);
Index: programs/xedit/lisp/Imakefile
===================================================================
RCS file: /cvs/xorg/xc/programs/xedit/lisp/Imakefile,v
retrieving revision 1.3
diff -u -p -r1.3 Imakefile
--- programs/xedit/lisp/Imakefile	24 May 2004 19:07:00 -0000	1.3
+++ programs/xedit/lisp/Imakefile	14 Aug 2004 20:28:22 -0000
@@ -21,13 +21,17 @@ LinkSourceFile(snprintf.c, $(LIBSRC)/mis
 #endif
 
 #if defined(LynxOSArchitecture) || defined(SVR3Architecture) || defined(LinuxArchitecture)
-LinkSourceFile(realpath.c, ../)
+#ifndef UseInstalled
+LinkSourceFile(realpath.c, $(TOP)/programs/xedit)
+#endif
         RP_SRCS = realpath.c
         RP_OBJS = realpath.o
      RP_DEFINES = -DNEED_REALPATH
 #endif
 #if !HasStrcasecmp
-LinkSourceFile(strcasecmp.c, ../)
+#ifndef UseInstalled
+LinkSourceFile(strcasecmp.c, $(TOP)/programs/xedit)
+#endif
    STRCCMP_SRCS = strcasecmp.c
    STRCCMP_OBJS = strcasecmp.o
 STRCCMP_DEFINES = -DNEED_STRCASECMP
Index: programs/xedit/lisp/lisp.c
===================================================================
RCS file: /cvs/xorg/xc/programs/xedit/lisp/lisp.c,v
retrieving revision 1.3
diff -u -p -r1.3 lisp.c
--- programs/xedit/lisp/lisp.c	6 May 2004 17:31:17 -0000	1.3
+++ programs/xedit/lisp/lisp.c	14 Aug 2004 20:28:25 -0000
@@ -46,8 +46,7 @@
 #endif
 
 #if defined(linux)
-/* kernel header doesn't work with -ansi */
-/* #include <asm/page.h> */	/* for PAGE_SIZE */
+#include <asm/page.h>	/* for PAGE_SIZE */
 #define HAS_GETPAGESIZE
 #define HAS_SC_PAGESIZE	/* _SC_PAGESIZE may be an enum for Linux */
 #endif
Index: programs/xlogo/Imakefile
===================================================================
RCS file: /cvs/xorg/xc/programs/xlogo/Imakefile,v
retrieving revision 1.4
diff -u -p -r1.4 Imakefile
--- programs/xlogo/Imakefile	21 Jun 2004 14:32:46 -0000	1.4
+++ programs/xlogo/Imakefile	14 Aug 2004 20:28:25 -0000
@@ -19,10 +19,10 @@ XCOMM $XFree86: xc/programs/xlogo/Imakef
 #endif
 
         DEPLIBS = $(XRENDERDEPS) XawClientDepLibs XkbClientDepLibs
-LOCAL_LIBRARIES = $(XRENDERLIBS) -lXprintUtil $(XPLIB) XawClientLibs XkbClientLibs
-           SRCS = xlogo.c Logo.c print.c $(RENDER_SRCS)
-           OBJS = xlogo.o Logo.o print.o $(RENDER_OBJS)
-        HEADERS = LogoP.h Logo.h print.h RenderLogo.h
+LOCAL_LIBRARIES = $(XRENDERLIBS) XawClientLibs XkbClientLibs
+           SRCS = xlogo.c Logo.c $(RENDER_SRCS)
+           OBJS = xlogo.o Logo.o $(RENDER_OBJS)
+        HEADERS = LogoP.h Logo.h RenderLogo.h
        INCLUDES = $(XRENDERINCS)
         DEFINES = $(XRENDERDEFS) XkbClientDefines
     CDEBUGFLAGS = -g
Index: programs/xlogo/XLogo.ad
===================================================================
RCS file: /cvs/xorg/xc/programs/xlogo/XLogo.ad,v
retrieving revision 1.2
diff -u -p -r1.2 XLogo.ad
--- programs/xlogo/XLogo.ad	9 May 2004 00:36:41 -0000	1.2
+++ programs/xlogo/XLogo.ad	14 Aug 2004 20:28:25 -0000
@@ -1,5 +1 @@
-XLogo*iconPixmap:    xlogo32
-XLogo*iconMask:      xlogo32
-XLogo*baseTranslations: #override \
-<Key>q,<Key>Escape: quit()\n\
-<Key>p:             print()
+XLogo.input: false
Index: programs/xlogo/xlogo.c
===================================================================
RCS file: /cvs/xorg/xc/programs/xlogo/xlogo.c,v
retrieving revision 1.3
diff -u -p -r1.3 xlogo.c
--- programs/xlogo/xlogo.c	9 May 2004 00:36:41 -0000	1.3
+++ programs/xlogo/xlogo.c	14 Aug 2004 20:28:25 -0000
@@ -1,5 +1,5 @@
 /*
- * $Xorg: xlogo.c,v 1.5 2004/05/09 02:05:54 gisburn Exp $
+ * $Xorg: xlogo.c,v 1.4 2001/02/09 02:05:54 xorgcvs Exp $
  *
 Copyright 1989, 1998  The Open Group
 
@@ -27,22 +27,18 @@ in this Software without prior written a
 
 /* $XFree86: xc/programs/xlogo/xlogo.c,v 3.7 2001/07/25 15:05:26 dawes Exp $ */
 
+#include <stdio.h>
 #include <X11/Intrinsic.h>
 #include <X11/Shell.h>
-#include "xlogo.h"
 #include "Logo.h"
-#include "print.h"
+#include <X11/Xaw/Cardinals.h>
 #ifdef XKB
 #include <X11/extensions/XKBbells.h>
 #endif
-#include <stdio.h>
 #include <stdlib.h>
 
-/* Global vars*/
-const char *ProgramName;    /* program name (from argv[0]) */
-
-static void quit(Widget w,  XEvent *event, String *params, Cardinal *num_params);
-static void print(Widget w, XEvent *event, String *params, Cardinal *num_params);
+static void quit(Widget w, XEvent *event, String *params, 
+		 Cardinal *num_params);
 
 static XrmOptionDescRec options[] = {
 { "-shape", "*shapeWindow", XrmoptionNoArg, (XPointer) "on" },
@@ -50,45 +46,25 @@ static XrmOptionDescRec options[] = {
 {"-render", "*render",XrmoptionNoArg, "TRUE"},
 {"-sharp", "*sharp", XrmoptionNoArg, "TRUE"},
 #endif
-{"-v",         "Verbose",     XrmoptionNoArg,  "TRUE"},
-{"-print",     "Print",       XrmoptionNoArg,  "TRUE"},
-{"-printer",   "printer",     XrmoptionSepArg, NULL},
-{"-printfile", "printFile",   XrmoptionSepArg, NULL},
 };
 
 static XtActionsRec actions[] = {
-    {"quit",	quit },
-    {"print",	print}
+    {"quit",	quit}
 };
 
 static Atom wm_delete_window;
 
-/* See xlogo.h */
-XLogoResourceData userOptions;
-
-#define Offset(field) XtOffsetOf(XLogoResourceData, field)
-
-XtResource resources[] = {
-  {"verbose",   "Verbose",   XtRBoolean, sizeof(Boolean), Offset(verbose),      XtRImmediate, (XtPointer)False},
-  {"print",     "Print",     XtRBoolean, sizeof(Boolean), Offset(printAndExit), XtRImmediate, (XtPointer)False},
-  {"printer",   "Printer",   XtRString,  sizeof(String),  Offset(printername),  XtRImmediate, (XtPointer)NULL},
-  {"printFile", "PrintFile", XtRString,  sizeof(String),  Offset(printfile),    XtRImmediate, (XtPointer)NULL}
-};
-
-
 String fallback_resources[] = {
     "*iconPixmap:    xlogo32",
     "*iconMask:      xlogo32",
-    "*baseTranslations: #override \\"
-                        "\t<Key>q: quit()\\n\\"
-                        "\t<Key>p: print()",
     NULL,
 };
 
 static void 
 die(Widget w, XtPointer client_data, XtPointer call_data)
 {
-    XtAppSetExitFlag(XtWidgetToApplicationContext(w));
+    XCloseDisplay(XtDisplay(w));
+    exit(0);
 }
 
 static void 
@@ -102,33 +78,34 @@ save(Widget w, XtPointer client_data, Xt
  */
 
 static void 
-Syntax(Widget toplevel)
+Syntax(Widget toplevel, char *call)
 {
     Arg arg;
     SmcConn connection;
-    String reasons[10];
-    int i, n = 0;
+    String reasons[7];
+    int i, num_reasons = 7;
 
-    reasons[n++] = "Usage: ";
-    reasons[n++] = (String)ProgramName;
-    reasons[n++] = " [-fg <color>] [-bg <color>] [-rv] [-bw <pixels>] [-bd <color>]\n";
-    reasons[n++] = "             [-d [<host>]:[<vs>]]\n";
-    reasons[n++] = "             [-g [<width>][x<height>][<+-><xoff>[<+-><yoff>]]]\n";
-    reasons[n++] = "             [-print] [-printname <name>] [-printfile <file>]\n";
+    reasons[0] = "Usage: ";
+    reasons[1] = call;
+    reasons[2] = " [-fg <color>] [-bg <color>] [-rv] [-bw <pixels>] [-bd <color>]\n";
+    reasons[3] = "             [-d [<host>]:[<vs>]]\n";
+    reasons[4] = "             [-g [<width>][x<height>][<+-><xoff>[<+-><yoff>]]]\n";
 #ifdef XRENDER
-    reasons[n++] = "             [-render] [-sharp]\n";
-#endif /* XRENDER */
-    reasons[n++] = "             [-shape]\n\n";
+    reasons[5] = "             [-render] [-sharp]\n";
+#else
+    reasons[5] = "";
+#endif
+    reasons[6] = "             [-shape]\n\n";
 
     XtSetArg(arg, XtNconnection, &connection);
     XtGetValues(toplevel, &arg, (Cardinal)1);
     if (connection) 
-	SmcCloseConnection(connection, n, reasons);
+	SmcCloseConnection(connection, num_reasons, reasons);
     else {
-	for (i=0; i < n; i++)
+	for (i=0; i < num_reasons; i++)
 	    printf(reasons[i]);
     }
-    exit(EXIT_FAILURE);
+    exit(1);
 }
 
 int 
@@ -137,40 +114,27 @@ main(int argc, char *argv[])
     Widget toplevel;
     XtAppContext app_con;
 
-    ProgramName = argv[0];
-
     toplevel = XtOpenApplication(&app_con, "XLogo",
 				 options, XtNumber(options), 
 				 &argc, argv, fallback_resources,
 				 sessionShellWidgetClass, NULL, ZERO);
     if (argc != 1)
-	Syntax(toplevel);
-
-    XtGetApplicationResources(toplevel, (XtPointer)&userOptions, resources, 
-                              XtNumber(resources), NULL, 0);
-
-    XtAppAddActions(app_con, actions, XtNumber(actions));
-
-    if (userOptions.printAndExit) {
-        XtCallActionProc(toplevel, "print", NULL, NULL, 0);
-    }
-    else
-    {
-        XtAddCallback(toplevel, XtNsaveCallback, save, NULL);
-        XtAddCallback(toplevel, XtNdieCallback,  die,  NULL);
-        XtOverrideTranslations
-          (toplevel, XtParseTranslationTable ("<Message>WM_PROTOCOLS: quit()"));
-        XtCreateManagedWidget("xlogo", logoWidgetClass, toplevel, NULL, ZERO);
-        XtRealizeWidget(toplevel);
-        wm_delete_window = XInternAtom(XtDisplay(toplevel), "WM_DELETE_WINDOW",
-                                       False);
-        (void) XSetWMProtocols (XtDisplay(toplevel), XtWindow(toplevel),
-                                &wm_delete_window, 1);
-    }
+	Syntax(toplevel, argv[0]);
 
+    XtAddCallback(toplevel, XtNsaveCallback, save, NULL);
+    XtAddCallback(toplevel, XtNdieCallback, die, NULL);
+    XtAppAddActions
+	(XtWidgetToApplicationContext(toplevel), actions, XtNumber(actions));
+    XtOverrideTranslations
+	(toplevel, XtParseTranslationTable ("<Message>WM_PROTOCOLS: quit()"));
+    XtCreateManagedWidget("xlogo", logoWidgetClass, toplevel, NULL, ZERO);
+    XtRealizeWidget(toplevel);
+    wm_delete_window = XInternAtom(XtDisplay(toplevel), "WM_DELETE_WINDOW",
+				   False);
+    (void) XSetWMProtocols (XtDisplay(toplevel), XtWindow(toplevel),
+                            &wm_delete_window, 1);
     XtAppMainLoop(app_con);
-
-    return EXIT_SUCCESS;
+    exit(0);
 }
 
 /*ARGSUSED*/
@@ -178,9 +142,9 @@ static void 
 quit(Widget w, XEvent *event, String *params, Cardinal *num_params)
 {
     Arg arg;
-    
+
     if (event->type == ClientMessage && 
-	(Atom)event->xclient.data.l[0] != wm_delete_window) {
+	event->xclient.data.l[0] != wm_delete_window) {
 #ifdef XKB
 	XkbStdBell(XtDisplay(w), XtWindow(w), 0, XkbBI_BadValue);
 #else
@@ -194,11 +158,3 @@ quit(Widget w, XEvent *event, String *pa
     }
 }
 
-/*ARGSUSED*/
-static void 
-print(Widget w, XEvent *event, String *params, Cardinal *num_params)
-{
-    DoPrint(w, userOptions.printername, userOptions.printfile);
-}
-
-
Index: programs/xman/Imakefile
===================================================================
RCS file: /cvs/xorg/xc/programs/xman/Imakefile,v
retrieving revision 1.4
diff -u -p -r1.4 Imakefile
--- programs/xman/Imakefile	21 Jun 2004 14:32:46 -0000	1.4
+++ programs/xman/Imakefile	14 Aug 2004 20:28:26 -0000
@@ -54,17 +54,11 @@ SNPDEFINES = -Dsnprintf=XmuSnprintf
 		  $(SNPDEFINES) $(HELPFILE) $(MANPATHS) $(MKSTEMP) $(GROFF) \
 		  $(MANCONFIGSTYLE) $(MANCONF)
         DEPLIBS = XawClientDepLibs
-LOCAL_LIBRARIES = -lXprintUtil $(XPLIB) XawClientLibs
+LOCAL_LIBRARIES = XawClientLibs
            SRCS = ScrollByL.c handler.c man.c buttons.c help.c \
-                  printdialog.c print.c search.c globals.c main.c \
-                  misc.c tkfuncs.c vendor.c
+                  search.c globals.c main.c misc.c tkfuncs.c vendor.c
            OBJS = ScrollByL.o handler.o man.o buttons.o help.o \
-                  printdialog.o print.o search.o globals.o main.o \
-                  misc.o tkfuncs.o vendor.o
-
-LinkSourceFile(printdialog.c,../xmore)
-LinkSourceFile(printdialog.h,../xmore)
-LinkSourceFile(printdialogprivates.h,../xmore)
+                  search.o globals.o main.o misc.o tkfuncs.o vendor.o
 
 ComplexProgramTarget(xman)
 
Index: programs/xman/ScrollByL.c
===================================================================
RCS file: /cvs/xorg/xc/programs/xman/ScrollByL.c,v
retrieving revision 1.3
diff -u -p -r1.3 ScrollByL.c
--- programs/xman/ScrollByL.c	8 Jun 2004 02:44:34 -0000	1.3
+++ programs/xman/ScrollByL.c	14 Aug 2004 20:28:26 -0000
@@ -93,10 +93,6 @@ static XtResource resources[] = {
        Offset(symbol_font), XtRString, MANPAGE_SYMBOL},
     {XtNfile, XtCFile, XtRFile, sizeof(FILE *),
        Offset(file), XtRImmediate, (caddr_t) NULL},
-    {XtNNumTotalLines, XtCNumTotalLines, XtRInt, sizeof(int),
-       Offset(lines), XtRImmediate, (caddr_t) 0},
-    {XtNNumVisibleLines, XtCNumVisibleLines, XtRInt, sizeof(int),
-       Offset(num_visible_lines), XtRImmediate, (caddr_t) 0},
 };
 
 #undef Offset
@@ -108,7 +104,6 @@ static XtResource resources[] = {
  *
  ****************************************************************/
 
-static void CreateScrollbar(Widget w);
 static Boolean ScrollVerticalText(Widget w, int new_line, Boolean force_redisp);
 static void Layout(Widget w);
 static void LoadFile(Widget w);
@@ -202,8 +197,6 @@ Layout(Widget w)
   Widget bar;
   Position bar_bw;
 
-  CreateScrollbar(w);
-
 /* 
  * For now always show the bar.
  */
@@ -229,8 +222,6 @@ Layout(Widget w)
   XtResizeWidget(bar, bar->core.width, height, bar->core.border_width);
 
   SetThumbHeight(w);
-  
-  sblw->scroll.num_visible_lines = height / sblw->scroll.font_height + 1;
 }
 
 /* ARGSUSED */
@@ -286,20 +277,22 @@ static void
 PaintText(Widget w, int y_loc, int height)
 {
   ScrollByLineWidget sblw = (ScrollByLineWidget) w;
-  int start_line, location;
+  int start_line, num_lines, location;
 
   start_line = y_loc / sblw->scroll.font_height + sblw->scroll.line_pointer;
 
   if (start_line >= sblw->scroll.lines)
     return;
   
+  num_lines = height / sblw->scroll.font_height + 1;
+
 /*
  * Only integer arithmetic makes this possible. 
  */
 
   location =  y_loc / sblw->scroll.font_height * sblw->scroll.font_height;
 
-  PrintText(w, start_line, sblw->scroll.num_visible_lines, location);
+  PrintText(w, start_line, num_lines, location);
 } 
 
 /*	Function Name: Page
@@ -391,7 +384,7 @@ int new_line,
 Boolean force_redisp)
 {
   ScrollByLineWidget sblw = (ScrollByLineWidget) w;
-  int num_lines = sblw->scroll.num_visible_lines;
+  int num_lines = (int)w->core.height / sblw->scroll.font_height + 1;
   int max_lines, old_line;
   Boolean move_thumb = FALSE;
 
@@ -605,6 +598,8 @@ VerticalScroll(Widget w, XtPointer clien
   SetThumb( (Widget) sblw);
 }
 
+int h_width;			/* main font width */
+
 /* ARGSUSED */
 static void 
 Initialize(Widget req, Widget new, ArgList args, Cardinal *num_args)
@@ -624,9 +619,12 @@ Initialize(Widget req, Widget new, ArgLi
   atomNum = XInternAtom(XtDisplay(req), "FIGURE_WIDTH", False);
 
   if (XGetFontProperty(sblw->scroll.normal_font, atomNum, &figWidth))
-    sblw->scroll.h_width = figWidth;
+      h_width = figWidth;
   else
-    sblw->scroll.h_width = XTextWidth(sblw->scroll.normal_font, "$", 1);
+    h_width = XTextWidth(sblw->scroll.normal_font, "$", 1);
+
+
+
 } /* Initialize. */
 
 /*	Function Name: CreateGCs
@@ -723,7 +721,7 @@ static Boolean 
 SetValuesHook(Widget w, ArgList args, Cardinal *num_args)
 {
   Boolean ret = TRUE;
-  Cardinal i;
+  int i;
 
   for (i = 0; i < *num_args; i++) {
     if (strcmp(XtNfile, args[i].name) == 0) {
@@ -821,7 +819,6 @@ LoadFile(Widget w)
  * Copy the file into memory. 
  */
 
-  fseek(file, 0L, SEEK_SET);
   if (fread(page, sizeof(char), fileinfo.st_size, file) == 0)
     XtAppError(XtWidgetToApplicationContext(w), 
 	       "SBLW LoadFile: Failure in fread.");
@@ -1024,7 +1021,7 @@ PrintText(Widget w, int start_line, int 
       italicflag = FALSE;
       x_loc = sblw->scroll.offset + sblw->scroll.indent;
       h_col = h_col + 8 - (h_col%8);
-      x_loc += sblw->scroll.h_width * h_col;
+      x_loc += h_width * h_col;
       break;
 
     case ' ':
@@ -1045,7 +1042,7 @@ PrintText(Widget w, int start_line, int 
 
       x_loc = sblw->scroll.offset + sblw->scroll.indent; 
       h_col += (h_c - c);
-      x_loc += sblw->scroll.h_width * h_col; 
+      x_loc += h_width * h_col; 
       c = h_c - 1;
       break;
 
Index: programs/xman/ScrollByL.h
===================================================================
RCS file: /cvs/xorg/xc/programs/xman/ScrollByL.h,v
retrieving revision 1.3
diff -u -p -r1.3 ScrollByL.h
--- programs/xman/ScrollByL.h	8 Jun 2004 02:44:35 -0000	1.3
+++ programs/xman/ScrollByL.h	14 Aug 2004 20:28:26 -0000
@@ -60,12 +60,8 @@ from the X Consortium.
 #define XtNmanualFontBold   "manualFontBold"
 #define XtNmanualFontItalic "manualFontItalic"
 #define XtNmanualFontSymbol "manualFontSymbol"
-#define XtNNumTotalLines    "numTotalLines"
-#define XtNNumVisibleLines  "numVisibleLines"
 
 #define XtCIndent           "Indent"
-#define XtCNumTotalLines    "NumTotalLines"
-#define XtCNumVisibleLines  "NumVisibleLines"
 
 /* Class record constants */
 
Index: programs/xman/ScrollByLP.h
===================================================================
RCS file: /cvs/xorg/xc/programs/xman/ScrollByLP.h,v
retrieving revision 1.3
diff -u -p -r1.3 ScrollByLP.h
--- programs/xman/ScrollByLP.h	8 Jun 2004 02:44:35 -0000	1.3
+++ programs/xman/ScrollByLP.h	14 Aug 2004 20:28:26 -0000
@@ -68,7 +68,6 @@ typedef struct _ScrollByLinePart {
     * normal_font,
     * italic_font,
     * symbol_font;
-  int h_width;			/* Main font width */
   
 /* variables not in resource list. */
 
@@ -81,8 +80,7 @@ typedef struct _ScrollByLinePart {
   GC bold_gc, normal_gc, italic_gc, symbol_gc; /* gc for drawing. */
 
   char ** top_line;		/* The top line of the file. */
-  int lines;		/* Total number of line in the file. */
-  int num_visible_lines;  /* Number of lines visible */
+  int lines;			/* number of line in the file. */
 } ScrollByLinePart;
 
 /****************************************************************
Index: programs/xman/Xman.ad
===================================================================
RCS file: /cvs/xorg/xc/programs/xman/Xman.ad,v
retrieving revision 1.3
diff -u -p -r1.3 Xman.ad
--- programs/xman/Xman.ad	8 Jun 2004 02:44:35 -0000	1.3
+++ programs/xman/Xman.ad	14 Aug 2004 20:28:26 -0000
@@ -35,13 +35,10 @@
 *horizPane*sections.Label:	Sections
 
 *helpButton.Label:		Help
-*helpButton.Tip:		Open help browser
 
 *quitButton.Label:		Quit
-*quitButton.Tip:		Quit Xman
 
 *manpageButton.Label:		Manual Page
-*manpageButton.Tip:		Open new manpage browser
 
 *topLabel.Label:		Manual Browser
 
@@ -56,7 +53,6 @@
 *removeThisManpage.Label:	Remove This Manpage
 *help*removeThisManpage.Label:	Remove Help
 *openNewManpage.Label:		Open New Manpage
-*printManualPage.Label:		Print This Manpage
 *showVersion.Label:		Show Version
 *quit.Label:			Quit
 
@@ -192,99 +188,3 @@
 
 *manpageButton.translations: #augment \
 		<Btn1Down>,<Btn1Up>: CreateNewManpage() reset()
-
-! Use "white" as background for printing
-*printshell*background:   white
-
-! Print dialog
-*printdialogshell*geometry:                       600x120
-*printdialogshell*title:                          Print
-*printdialogshell*main*ok.fromVert:               innerform
-*printdialogshell*main*ok.label:                  Print
-*printdialogshell*main*ok.tip:                    Print
-*printdialogshell*main*setup.fromHoriz:           ok
-*printdialogshell*main*setup.fromVert:            innerform
-*printdialogshell*main*setup.label:               Setup...
-*printdialogshell*main*setup.tip:                 Configure print job options (page size, orientation, etc.)
-*printdialogshell*main*cancel.fromHoriz:          setup
-*printdialogshell*main*cancel.fromVert:           innerform
-*printdialogshell*main*cancel.label:              Cancel
-*printdialogshell*main*cancel.tip:                Cancel printing
-*printdialogshell*main*desclabel.label:           Printer Description:
-*printdialogshell*main*desclabel.tip:             Short description of printer
-*printdialogshell*main*desc.fromHoriz:            desclabel
-*printdialogshell*main*desc.tip:                  Short description of printer
-*printdialogshell*main*info.fromHoriz:            desc
-*printdialogshell*main*info.label:                Printer info...
-*printdialogshell*main*info.tip:                  Display additional information about this printer
-*printdialogshell*main*namelabel.fromVert:        desclabel
-*printdialogshell*main*namelabel.label:           Printer Name:
-*printdialogshell*main*namelabel.tip:             Name of selected printer
-*printdialogshell*main*name.fromHoriz:            namelabel
-*printdialogshell*main*name.fromVert:             desclabel
-*printdialogshell*main*name.tip:                  Name of selected printer
-*printdialogshell*main*selectprinter.fromHoriz:   name
-*printdialogshell*main*selectprinter.fromVert:    desclabel
-*printdialogshell*main*selectprinter.label:       Select Printer...
-*printdialogshell*main*selectprinter.label:       Select Printer...
-*printdialogshell*main*selectprinter.tip:         Select a different printer
-*printdialogshell*main*filenamelabel.fromVert:    namelabel
-*printdialogshell*main*filenamelabel.label:       File Name:
-*printdialogshell*main*filenamelabel.tip:         File where the output should be stored
-*printdialogshell*main*filename.fromHoriz:        filenamelabel
-*printdialogshell*main*filename.fromVert:         namelabel
-*printdialogshell*main*filename.tip:              File where the output should be stored
-*printdialogshell*main*selectfile.fromHoriz:      filename
-*printdialogshell*main*selectfile.fromVert:       namelabel
-*printdialogshell*main*selectfile.label:          Select File...
-*printdialogshell*main*selectfile.tip:            Select file where the output should be stored
-*printdialogshell*main*printtoprinter.fromVert:   filenamelabel
-*printdialogshell*main*printtoprinter.label:      Print to Printer
-*printdialogshell*main*printtoprinter.tip:        Send print job to printer
-*printdialogshell*main*printtofile.fromVert:      filenamelabel
-*printdialogshell*main*printtofile.fromHoriz:     printtoprinter
-*printdialogshell*main*printtofile.label:         Print to File
-*printdialogshell*main*printtofile.tip:           Save print job in a file
-
-! Print job options dialog
-*printdialogshell*setup*geometry:                     600x400
-*printdialogshell*setup*title:                        Print: Print job options
-*printdialogshell*setup*ok.fromVert:                  list
-*printdialogshell*setup*ok.label:                     OK
-*printdialogshell*setup*ok.tip:                       Commit changes
-*printdialogshell*setup*cancel.fromHoriz:             ok
-*printdialogshell*setup*cancel.fromVert:              list
-*printdialogshell*setup*cancel.label:                 Cancel
-*printdialogshell*setup*cancel.tip:                   Cancel and reset to defaults
-*printdialogshell*setup*paperlist.tip:                Select paper size
-*printdialogshell*setup*resolutionlist.fromHoriz:     paperlist
-*printdialogshell*setup*resolutionlist.tip:           Select page resolution
-*printdialogshell*setup*orientationlist.fromHoriz:    resolutionlist
-*printdialogshell*setup*orientationlist.tip:          Select page orientation
-*printdialogshell*setup*plexlist.fromHoriz:           orientationlist
-*printdialogshell*setup*plexlist.tip:                 Select page plex mode (simplex, duplex, etc.)
-*printdialogshell*setup*jobcopieslabel.fromVert:      paperlist
-*printdialogshell*setup*jobcopieslabel.tip:           Set number of job copies
-*printdialogshell*setup*jobcopieslabel.label:         Job Copies:
-*printdialogshell*setup*jobcopies.fromHoriz:          jobcopieslabel
-*printdialogshell*setup*jobcopies.fromVert:           paperlist
-*printdialogshell*setup*jobcopies.tip:                Set number of job copies
-
-! Printer selection
-*printdialogshell*printerselection*geometry:          400x150
-*printdialogshell*printerselection*title:             Print: Select printer
-*printdialogshell*printerselection*ok.fromVert:       list
-*printdialogshell*printerselection*ok.label:          OK
-*printdialogshell*printerselection*ok.tip:            Switch printer
-*printdialogshell*printerselection*cancel.fromHoriz:  ok
-*printdialogshell*printerselection*cancel.fromVert:   list
-*printdialogshell*printerselection*cancel.label:      Cancel
-*printdialogshell*printerselection*cancel.tip:        Cancel printer selection
-*printdialogshell*printerselection*list.tip:          Select printer name from list
-
-! Select job file
-*printdialogshell*selectfile*geometry:          400x80
-*printdialogshell*selectfile*title:             Print: Select job file
-*printdialogshell*selectfile*dialog.label:      Select Filename:
-
-! EOF.
Index: programs/xman/buttons.c
===================================================================
RCS file: /cvs/xorg/xc/programs/xman/buttons.c,v
retrieving revision 1.3
diff -u -p -r1.3 buttons.c
--- programs/xman/buttons.c	8 Jun 2004 02:44:35 -0000	1.3
+++ programs/xman/buttons.c	14 Aug 2004 20:28:27 -0000
@@ -121,7 +121,13 @@ MakeTopBox(void)
 				/* add WM_COMMAND property */
   XSetCommand(XtDisplay(top), XtWindow(top), saved_argv, saved_argc);
 
-  man_globals = (ManpageGlobals*) XtCalloc(ONE, (Cardinal) sizeof(ManpageGlobals));
+  man_globals = (ManpageGlobals*) XtMalloc( (Cardinal) sizeof(ManpageGlobals));
+  man_globals->label = NULL;
+  man_globals->search_widget = NULL;
+  man_globals->manpagewidgets.directory = NULL;
+  man_globals->manpagewidgets.manpage = NULL;
+  man_globals->manpagewidgets.box = NULL;
+  man_globals->current_directory = 0;
   MakeSearchWidget(man_globals, top);
   MakeSaveWidgets(man_globals, top);
 
@@ -429,7 +435,6 @@ CreateOptionMenu(ManpageGlobals * man_gl
     BOTH_SCREENS, 
     REMOVE_MANPAGE,
     OPEN_MANPAGE,
-    PRINT_MANPAGE,
     SHOW_VERSION,
     QUIT
   };
@@ -465,16 +470,12 @@ CreateOptionMenu(ManpageGlobals * man_gl
 	man_globals->open_entry = entry;
 	break;
     case 7:
-	man_globals->print_entry = entry;
-	break;
-    case 8:
 	man_globals->version_entry = entry;
 	break;
-    case 9:
+    case 8:
 	man_globals->quit_entry = entry;
 	break;
     default:
-        Error(("CreateOptionMenu: Unknown id=%d\n", i));
 	break;
     }
   }
Index: programs/xman/defs.h
===================================================================
RCS file: /cvs/xorg/xc/programs/xman/defs.h,v
retrieving revision 1.3
diff -u -p -r1.3 defs.h
--- programs/xman/defs.h	8 Jun 2004 02:44:35 -0000	1.3
+++ programs/xman/defs.h	14 Aug 2004 20:28:27 -0000
@@ -67,7 +67,7 @@ from the X Consortium.
 
 /* Names of the menu buttons */
 
-#define NUM_OPTIONS 10		/* Number of menu options. */
+#define NUM_OPTIONS 9		/* Number of menu options. */
 
 #define DIRECTORY      "displayDirectory"
 #define MANPAGE        "displayManualPage"
@@ -76,7 +76,6 @@ from the X Consortium.
 #define BOTH_SCREENS   "showBothScreens"
 #define REMOVE_MANPAGE "removeThisManpage"
 #define OPEN_MANPAGE   "openNewManpage"
-#define PRINT_MANPAGE  "printManualPage"
 #define SHOW_VERSION   "showVersion"
 #define QUIT           "quit"
 
Index: programs/xman/handler.c
===================================================================
RCS file: /cvs/xorg/xc/programs/xman/handler.c,v
retrieving revision 1.3
diff -u -p -r1.3 handler.c
--- programs/xman/handler.c	8 Jun 2004 02:44:35 -0000	1.3
+++ programs/xman/handler.c	14 Aug 2004 20:28:27 -0000
@@ -40,8 +40,6 @@ from the X Consortium.
 #include <sys/stat.h>
 #include "globals.h"
 #include "vendor.h"
-#include "printdialog.h"
-#include "print.h"
 
 static void PutUpManpage(ManpageGlobals * man_globals, FILE * file);
 static void ToggleBothShownState(ManpageGlobals * man_globals);
@@ -81,8 +79,6 @@ OptionCallback(Widget w, XtPointer point
     RemoveThisManpage(XtParent(w), NULL, NULL, NULL);
   else if ( w == man_globals->open_entry)       /* Open new manpage */
     CreateNewManpage(XtParent(w), NULL, NULL, NULL);
-  else if ( w == man_globals->print_entry)    /* Print current manpage */
-    PrintThisManpage(man_globals);
   else if ( w == man_globals->version_entry)    /* Get version */
     ShowVersion(XtParent(w), NULL, NULL, NULL);
   else if ( w == man_globals->quit_entry)      /* Quit. */
@@ -219,9 +215,7 @@ DirectoryHandler(Widget w, XtPointer glo
   file = FindManualFile(man_globals, man_globals->current_directory,
 			ret_struct->list_index);
   PutUpManpage(man_globals, file);
-  if ((file != NULL) && (file != man_globals->curr_file)) {
-    fclose(file);
-  }
+  fclose(file);
 }
 
 /*	Function Name: DirPopupCallback
@@ -595,112 +589,10 @@ Search(Widget w, XEvent * event, String 
   else {
     PutUpManpage(man_globals, file);
   }
-  if ((file != NULL) && (file != man_globals->curr_file)) {
-    fclose(file);
-  }
-}
-
-static void
-printshellDestroyXtProc(Widget w, XtPointer client_data, XtPointer callData)
-{
-  ManpageGlobals *mg = GetGlobals(w);
-  XawPrintDialogClosePrinterConnection(mg->printdialog, False);
-}
-
-static void
-printOKXtProc(Widget w, XtPointer client_data, XtPointer callData)
-{
-  XawPrintDialogCallbackStruct *pdcs = (XawPrintDialogCallbackStruct *)callData;
-  Cardinal                      n;
-  Arg                           args[2];
-  ManpageGlobals               *mg = GetGlobals(w);
-  Widget                        topwindow = mg->This_Manpage;
-  FILE                         *file;
-
-  Log(("printOKXtProc: OK.\n"));
-  
-  /* Get file object */
-  n = 0;
-  XtSetArg(args[n], XtNfile, &file); n++;
-  XtGetValues(mg->manpagewidgets.manpage, args, n);
-  Assertion(file != NULL, (("printOKXtProc: file == NULL.\n")));
-  
-  DoPrintManpage("Xman",
-                 file, topwindow,
-                 pdcs->pdpy, pdcs->pcontext, printshellDestroyXtProc,
-                 mg->manpage_title,
-                 pdcs->printToFile?pdcs->printToFileName:NULL);
-
-  XtPopdown(mg->printdialog_shell);
-}
-
-static void
-printCancelXtProc(Widget w, XtPointer client_data, XtPointer callData)
-{
-    ManpageGlobals * mg = GetGlobals(w);
-
-    Log(("printCancelXtProc: cancel.\n"));
-    XtPopdown(mg->printdialog_shell);
-    
-    Log(("destroying print dialog shell...\n"));
-    XtDestroyWidget(mg->printdialog_shell);
-    mg->printdialog_shell = NULL;
-    mg->printdialog       = NULL;
-    Log(("... done\n"));
+  if (file != NULL)
+	  fclose(file);
 }
 
-/*      Function Name: PrintThisManpage
- *      Description: Print the current manual page.
- *      Arguments: mg - manpage globals
- *      Returns: none.
- */
-
-/*ARGSUSED*/
-void 
-PrintThisManpage(ManpageGlobals *mg)
-{
-  Dimension   width, height;
-  Position    x, y;
-  Widget      parent    = mg->This_Manpage;
-  Widget      topwindow = mg->This_Manpage;
-  Log(("print!\n"));
-  
-  if (!mg->printdialog) {
-    int n;
-    Arg args[20];
-
-    n = 0;
-    XtSetArg(args[n], XtNallowShellResize, True); n++;
-    mg->printdialog_shell = XtCreatePopupShell("printdialogshell",
-                                               transientShellWidgetClass,
-                                               topwindow, args, n);
-    n = 0;
-    mg->printdialog = XtCreateManagedWidget("printdialog", printDialogWidgetClass,
-                                            mg->printdialog_shell, args, n);
-    XtAddCallback(mg->printdialog, XawNOkCallback,     printOKXtProc,     NULL);
-    XtAddCallback(mg->printdialog, XawNCancelCallback, printCancelXtProc, NULL);
-
-    XtRealizeWidget(mg->printdialog_shell);
-  }
-
-  /* Center dialog */
-  XtVaGetValues(mg->printdialog_shell,
-      XtNwidth,  &width,
-      XtNheight, &height,
-      NULL);
-
-  x = (Position)(XWidthOfScreen( XtScreen(parent)) - width)  / 2;
-  y = (Position)(XHeightOfScreen(XtScreen(parent)) - height) / 3;
-
-  XtVaSetValues(mg->printdialog_shell,
-      XtNx, x,
-      XtNy, y,
-      NULL);
-        
-  XtPopup(mg->printdialog_shell, XtGrabNonexclusive);
-}
-
-
 /*      Function Name: ShowVersion
  *      Description: Show current version.
  *      Arguments: w - any widget in the manpage.
Index: programs/xman/man.h
===================================================================
RCS file: /cvs/xorg/xc/programs/xman/man.h,v
retrieving revision 1.6
diff -u -p -r1.6 man.h
--- programs/xman/man.h	29 Jul 2004 00:40:35 -0000	1.6
+++ programs/xman/man.h	14 Aug 2004 20:28:28 -0000
@@ -1,5 +1,5 @@
 /* $XConsortium: man.h,v 1.31 94/12/16 21:36:53 gildea Exp $ */
-/* $XdotOrg: xc/programs/xman/man.h,v 1.6 2004/07/29 00:40:35 gisburn Exp $ */
+/* $XdotOrg: xc/programs/xman/man.h,v 1.3 2004/05/22 19:20:06 alanc Exp $ */
 /*
 
 Copyright (c) 1987, 1988  X Consortium
@@ -43,7 +43,6 @@ from the X Consortium.
 /* Std system and C header files */
 
 #include <stdio.h>
-#include <limits.h>
 
 #include <X11/Xfuncs.h>
 #include <X11/Xos.h>
@@ -73,17 +72,6 @@ from the X Consortium.
 #include "version.h"
 #include "defs.h"
 
-/* Turn a NULL pointer string into an empty string */
-#define NULLSTR(x) (((x)!=NULL)?(x):(""))
-
-#define Error(x) { printf x ; exit(EXIT_FAILURE); }
-#define Assertion(expr, msg) { if (!(expr)) { Error msg } }
-#ifdef DEBUG
-#  define Log(x)   { if(True)  printf x; }
-#else
-#  define Log(x)   { if(False) printf x; }
-#endif /* DEBUG */
-
 /* 
  * Assigning values here allows the user of Bitwise Or.
  */
@@ -149,13 +137,7 @@ typedef struct _ManpageGlobals{
 
   Widget dir_entry, manpage_entry, help_entry,
     search_entry, both_screens_entry, remove_entry, open_entry,
-    print_entry, version_entry, quit_entry;
-
-  /* Print objects and data */
-  Widget printdialog_shell;     /* Shell for the print dialog */
-  Widget printdialog;           /* Print dialog */
-
-  /* Misc. */
+    version_entry, quit_entry;
 
   char manpage_title[80];       /* The label to use for the current manpage. */
 
@@ -175,7 +157,6 @@ typedef struct _ManpageGlobals{
   Widget This_Manpage;		/* a pointer to the root of
 				   this manpage. */
 
-  FILE  *curr_file;             /* Current file shown in manpage widget */
 } ManpageGlobals;
 
 
@@ -240,7 +221,6 @@ void Quit(Widget w, XEvent * event, Stri
 void RemoveThisManpage(Widget w, XEvent * event, String * params, Cardinal * num_params);
 void SaveFormattedPage(Widget w, XEvent * event, String * params, Cardinal * num_params);
 void Search(Widget w, XEvent * event, String * params, Cardinal * num_params);
-void PrintThisManpage(ManpageGlobals *mg);
 void ShowVersion(Widget w, XEvent * event, String * params, Cardinal * num_params);
 
 /* help.c */
@@ -253,6 +233,7 @@ Bool ReadManConfig(char manpath[]);
 int Man(void);
 
 /* misc.c */
+FILE * DoSearch(ManpageGlobals * man_globals, int type);
 FILE * FindManualFile(ManpageGlobals * man_globals, int section_num, int entry_num);
 ManpageGlobals * GetGlobals(Widget w);
 void AddCursor(Widget w, Cursor cursor);
@@ -267,7 +248,6 @@ void ParseEntry(char *entry, char *path,
 FILE * Format(ManpageGlobals * man_globals, char * entry);
 
 /* search */
-FILE * DoSearch(ManpageGlobals * man_globals, int type);
 void MakeSearchWidget(ManpageGlobals * man_globals, Widget parent);
 
 /* tkfunctions.c */
Index: programs/xman/misc.c
===================================================================
RCS file: /cvs/xorg/xc/programs/xman/misc.c,v
retrieving revision 1.4
diff -u -p -r1.4 misc.c
--- programs/xman/misc.c	8 Jun 2004 02:44:35 -0000	1.4
+++ programs/xman/misc.c	14 Aug 2004 20:28:28 -0000
@@ -1,5 +1,5 @@
 /* $XConsortium: misc.c,v 1.31 94/12/16 21:36:53 gildea Exp $ */
-/* $XdotOrg: xc/programs/xman/misc.c,v 1.4 2004/06/08 02:44:35 gisburn Exp $ */
+/* $XdotOrg: xc/programs/xman/misc.c,v 1.3 2004/05/22 19:20:06 alanc Exp $ */
 /*
 
 Copyright (c) 1987, 1988  X Consortium
@@ -153,15 +153,8 @@ OpenFile(ManpageGlobals * man_globals, F
 {
   Arg arglist[1];
   Cardinal num_args = 0;
-  
-  if (man_globals->curr_file) {
-#if 0 /* Ownership rules need to be fixed first */
-    fclose(man_globals->curr_file);
-#endif
-  }
-  man_globals->curr_file = file;
 
-  XtSetArg(arglist[num_args], XtNfile, man_globals->curr_file); num_args++;
+  XtSetArg(arglist[num_args], XtNfile, file); num_args++;
   XtSetValues(man_globals->manpagewidgets.manpage, arglist, num_args);
 }
 
Index: programs/xman/search.c
===================================================================
RCS file: /cvs/xorg/xc/programs/xman/search.c,v
retrieving revision 1.3
diff -u -p -r1.3 search.c
--- programs/xman/search.c	8 Jun 2004 02:44:35 -0000	1.3
+++ programs/xman/search.c	14 Aug 2004 20:28:28 -0000
@@ -265,7 +265,7 @@ DoSearch(ManpageGlobals * man_globals, i
   
     strcpy(man_globals->manpage_title,label);
     ChangeLabel(man_globals->label,label);
-    fseek(file, 0L, SEEK_SET);		/* reset file to point at top. */
+    fseek(file, 0L, 0);		/* reset file to point at top. */
   }
   else {			/* MANUAL SEACH */
     file = DoManualSearch(man_globals, search_string);
Index: programs/xset/Imakefile
===================================================================
RCS file: /cvs/xorg/xc/programs/xset/Imakefile,v
retrieving revision 1.3
diff -u -p -r1.3 Imakefile
--- programs/xset/Imakefile	5 May 2004 01:49:05 -0000	1.3
+++ programs/xset/Imakefile	14 Aug 2004 20:28:29 -0000
@@ -9,7 +9,7 @@ XCOMM $XFree86: xc/programs/xset/Imakefi
 		  FontCacheExtensionDefines \
 		  XkbDefines
         DEPLIBS = $(DEPXMUULIB) $(DEPXLIB) $(DEPXF86LIBS) $(DEPFONTLIBS)
-LOCAL_LIBRARIES = $(XMUULIB) $(XF86LIBS) $(FONTLIBS) $(XPLIB) $(XLIB)
+LOCAL_LIBRARIES = $(XMUULIB) $(XF86LIBS) $(FONTLIBS) $(XPRINTLIBS) $(XLIB)
 
 #if BuildXF86MiscLibrary
        DEPXF86LIBS = $(DEPXXF86MISCLIB)
@@ -19,5 +19,10 @@ LOCAL_LIBRARIES = $(XMUULIB) $(XF86LIBS)
       DEPFONTLIBS = $(DEPXFONTCACHELIB)
          FONTLIBS = $(XFONTCACHELIB)
 #endif
+#if BuildXprintLib
+    DEPXPRINTLIBS = $(DEPXPRINTLIB)
+       XPRINTLIBS = $(XPLIB)
+    XPRINTDEFINES = -DXPRINT
+#endif
 
 SimpleProgramTarget(xset)
Index: programs/xset/xset.c
===================================================================
RCS file: /cvs/xorg/xc/programs/xset/xset.c,v
retrieving revision 1.3
diff -u -p -r1.3 xset.c
--- programs/xset/xset.c	5 May 2004 01:49:05 -0000	1.3
+++ programs/xset/xset.c	14 Aug 2004 20:28:29 -0000
@@ -88,7 +88,9 @@ in this Software without prior written a
 static Status set_font_cache(Display *, long, long, long);
 static void query_cache_status(Display *dpy);
 #endif
+#ifdef XPRINT
 #include <X11/extensions/Print.h>
+#endif
 
 #define ON 1
 #define OFF 0
@@ -354,6 +356,7 @@ for (i = 1; i < argc; ) {
       }
   }
 #endif
+#ifdef XPRINT
   else if (strcmp(arg, "rehashprinterlist") == 0) { /* rehash list of printers */
       short dummy;
       if (XpQueryVersion(dpy, &dummy, &dummy)) {
@@ -362,6 +365,7 @@ for (i = 1; i < argc; ) {
           fprintf(stderr, "server does not have extension for rehashprinterlist option\n");
       }
   }
+#endif
   else if (strcmp(arg, "fp") == 0) {	       /* set font path */
     if (i >= argc) {
 	arg = "default";
@@ -1509,8 +1513,10 @@ usage(char *fmt, ...)
     fprintf (stderr, "    Show font cache statistics:\n");
     fprintf (stderr, "\t fc s\n");
 #endif
+#ifdef XPRINT
     fprintf (stderr, "    To control Xprint features:\n");
     fprintf (stderr, "\t rehashprinterlist      Recomputes the list of available printers\n");
+#endif
     fprintf (stderr, "    To set the font path:\n" );
     fprintf (stderr, "\t fp= path[,path...]\n" );
     fprintf (stderr, "    To restore the default font path:\n");