xserver: Branch 'glucose-2' - 69 commits

Alan Hourihane alanh at kemper.freedesktop.org
Tue May 13 07:59:59 PDT 2008


 .gitignore                                                                                                       |    9 
 Xext/Makefile.am                                                                                                 |    7 
 Xext/panoramiX.c                                                                                                 |   33 
 Xext/panoramiXsrv.h                                                                                              |   10 
 Xext/xprint.c                                                                                                    | 2617 ------
 composite/Makefile.am                                                                                            |    1 
 composite/compext.c                                                                                              |  193 
 composite/compinit.c                                                                                             |   13 
 composite/compint.h                                                                                              |   24 
 composite/compoverlay.c                                                                                          |  159 
 composite/compwindow.c                                                                                           |   72 
 config/hal.c                                                                                                     |  163 
 configure.ac                                                                                                     |  228 
 dev/null                                                                                                         |binary
 dix/Makefile.am                                                                                                  |   10 
 dix/dispatch.c                                                                                                   |    6 
 dix/dixfonts.c                                                                                                   |   58 
 dix/getevents.c                                                                                                  |   12 
 dix/globals.c                                                                                                    |    3 
 dix/main.c                                                                                                       |    9 
 dix/xpstubs.c                                                                                                    |   28 
 exa/Makefile.am                                                                                                  |    1 
 exa/exa.c                                                                                                        |    9 
 exa/exa_glyphs.c                                                                                                 |  897 ++
 exa/exa_priv.h                                                                                                   |   58 
 exa/exa_render.c                                                                                                 |  225 
 hw/Makefile.am                                                                                                   |    9 
 hw/kdrive/ephyr/ephyr.c                                                                                          |   13 
 hw/kdrive/src/kdrive.c                                                                                           |    6 
 hw/xfree86/common/Makefile.am                                                                                    |    1 
 hw/xfree86/common/compiler.h                                                                                     |    4 
 hw/xfree86/common/xf86Bus.c                                                                                      |    4 
 hw/xfree86/common/xf86Init.c                                                                                     |    8 
 hw/xfree86/dri/dri.c                                                                                             |    2 
 hw/xfree86/fbdevhw/fbdevhw.c                                                                                     |    4 
 hw/xfree86/loader/xf86sym.c                                                                                      |    1 
 hw/xfree86/modes/xf86Crtc.h                                                                                      |    6 
 hw/xfree86/modes/xf86EdidModes.c                                                                                 |    2 
 hw/xfree86/modes/xf86Rotate.c                                                                                    |   21 
 hw/xfree86/os-support/bus/Pci.h                                                                                  |    6 
 hw/xfree86/os-support/linux/lnxResource.c                                                                        |    1 
 hw/xfree86/os-support/linux/lnx_video.c                                                                          |    4 
 hw/xfree86/utils/xorgcfg/expert.c                                                                                |   50 
 hw/xfree86/xaa/xaaInit.c                                                                                         |    4 
 hw/xfree86/xaa/xaaPict.c                                                                                         |  144 
 hw/xnest/Font.c                                                                                                  |    5 
 hw/xprint/AttrValid.c                                                                                            |  701 -
 hw/xprint/AttrValid.h                                                                                            |  219 
 hw/xprint/DiPrint.h                                                                                              |   85 
 hw/xprint/Init.c                                                                                                 | 1920 -----
 hw/xprint/Makefile.am                                                                                            |   58 
 hw/xprint/Oid.c                                                                                                  | 3181 --------
 hw/xprint/Oid.h                                                                                                  |  293 
 hw/xprint/OidDefs.h                                                                                              |  170 
 hw/xprint/OidStrs.h                                                                                              |  172 
 hw/xprint/Util.c                                                                                                 |  370 
 hw/xprint/ValTree.c                                                                                              |  191 
 hw/xprint/attributes.c                                                                                           | 1740 ----
 hw/xprint/attributes.h                                                                                           |  130 
 hw/xprint/config/C/Makefile.am                                                                                   |    1 
 hw/xprint/config/C/print/Makefile.am                                                                             |   14 
 hw/xprint/config/C/print/Xprinters                                                                               |   49 
 hw/xprint/config/C/print/attributes/Makefile.am                                                                  |    3 
 hw/xprint/config/C/print/attributes/document                                                                     |   49 
 hw/xprint/config/C/print/attributes/job                                                                          |   25 
 hw/xprint/config/C/print/attributes/printer                                                                      |   96 
 hw/xprint/config/C/print/ddx-config/Makefile.am                                                                  |    1 
 hw/xprint/config/C/print/ddx-config/raster/Makefile.am                                                           |    3 
 hw/xprint/config/C/print/ddx-config/raster/pcl                                                                   |   39 
 hw/xprint/config/C/print/models/CANONBJ10E-GS/Makefile.am                                                        |    3 
 hw/xprint/config/C/print/models/CANONBJ10E-GS/model-config                                                       |   23 
 hw/xprint/config/C/print/models/CANONC3200-PS/Makefile.am                                                        |    5 
 hw/xprint/config/C/print/models/CANONC3200-PS/fonts/Makefile.am                                                  |   54 
 hw/xprint/config/C/print/models/CANONC3200-PS/model-config                                                       |   40 
 hw/xprint/config/C/print/models/GSdefault/Makefile.am                                                            |    3 
 hw/xprint/config/C/print/models/GSdefault/model-config                                                           |  137 
 hw/xprint/config/C/print/models/HPDJ1600C/Makefile.am                                                            |    5 
 hw/xprint/config/C/print/models/HPDJ1600C/fonts/Makefile.am                                                      |   50 
 hw/xprint/config/C/print/models/HPDJ1600C/fonts/README                                                           |  197 
 hw/xprint/config/C/print/models/HPDJ1600C/fonts/fonts.dir                                                        |   45 
 hw/xprint/config/C/print/models/HPDJ1600C/model-config                                                           |   40 
 hw/xprint/config/C/print/models/HPLJ4050-PS/Makefile.am                                                          |    5 
 hw/xprint/config/C/print/models/HPLJ4050-PS/fonts/Makefile.am                                                    |   54 
 hw/xprint/config/C/print/models/HPLJ4050-PS/model-config                                                         |   36 
 hw/xprint/config/C/print/models/HPLJ4family/Makefile.am                                                          |    5 
 hw/xprint/config/C/print/models/HPLJ4family/fonts/Makefile.am                                                    |   50 
 hw/xprint/config/C/print/models/HPLJ4family/fonts/README                                                         |  203 
 hw/xprint/config/C/print/models/HPLJ4family/fonts/fonts.dir                                                      |   45 
 hw/xprint/config/C/print/models/HPLJ4family/model-config                                                         |   39 
 hw/xprint/config/C/print/models/Makefile.am                                                                      |   11 
 hw/xprint/config/C/print/models/PS2PDFspooldir-GS/Makefile.am                                                    |    4 
 hw/xprint/config/C/print/models/PS2PDFspooldir-GS/model-config                                                   |   72 
 hw/xprint/config/C/print/models/PS2PDFspooldir-GS/ps2pdf_spooltodir.sh                                           |  130 
 hw/xprint/config/C/print/models/PSdefault/Makefile.am                                                            |    5 
 hw/xprint/config/C/print/models/PSdefault/fonts/Makefile.am                                                      |   44 
 hw/xprint/config/C/print/models/PSdefault/model-config                                                           |  136 
 hw/xprint/config/C/print/models/PSspooldir/Makefile.am                                                           |    4 
 hw/xprint/config/C/print/models/PSspooldir/model-config                                                          |   71 
 hw/xprint/config/C/print/models/PSspooldir/spooltodir.sh                                                         |  127 
 hw/xprint/config/C/print/models/SPSPARC2/Makefile.am                                                             |    5 
 hw/xprint/config/C/print/models/SPSPARC2/fonts/Makefile.am                                                       |   37 
 hw/xprint/config/C/print/models/SPSPARC2/model-config                                                            |   18 
 hw/xprint/config/Makefile.am                                                                                     |  712 -
 hw/xprint/config/README                                                                                          |  318 
 hw/xprint/config/en_US/Makefile.am                                                                               |    1 
 hw/xprint/config/en_US/print/Makefile.am                                                                         |    1 
 hw/xprint/config/en_US/print/attributes/Makefile.am                                                              |    3 
 hw/xprint/config/en_US/print/attributes/document                                                                 |   13 
 hw/xprint/ddxInit.c                                                                                              |  384 -
 hw/xprint/doc/Makefile.am                                                                                        |   19 
 hw/xprint/doc/Xprt.html                                                                                          |  115 
 hw/xprint/doc/Xprt.man.pre                                                                                       |  196 
 hw/xprint/doc/Xprt.sgml                                                                                          |  371 
 hw/xprint/etc/Makefile.am                                                                                        |    1 
 hw/xprint/etc/Xsession.d/92xprint-xpserverlist                                                                   |   30 
 hw/xprint/etc/Xsession.d/Makefile.am                                                                             |    2 
 hw/xprint/etc/init.d/Makefile.am                                                                                 |   12 
 hw/xprint/etc/init.d/xprint.cpp                                                                                  | 1277 ---
 hw/xprint/etc/profile.d/Makefile.am                                                                              |    1 
 hw/xprint/etc/profile.d/xprint.csh                                                                               |   16 
 hw/xprint/etc/profile.d/xprint.sh                                                                                |   16 
 hw/xprint/mediaSizes.c                                                                                           |  782 --
 hw/xprint/pcl-mono/Makefile.am                                                                                   |    5 
 hw/xprint/pcl/Makefile.am                                                                                        |    6 
 hw/xprint/pcl/Makefile.am.inc                                                                                    |   27 
 hw/xprint/pcl/Pcl.h                                                                                              |  619 -
 hw/xprint/pcl/PclArc.c                                                                                           |  268 
 hw/xprint/pcl/PclArea.c                                                                                          |  436 -
 hw/xprint/pcl/PclAttVal.c                                                                                        |  206 
 hw/xprint/pcl/PclAttr.c                                                                                          |   86 
 hw/xprint/pcl/PclColor.c                                                                                         |  851 --
 hw/xprint/pcl/PclCursor.c                                                                                        |  113 
 hw/xprint/pcl/PclDef.h                                                                                           |   67 
 hw/xprint/pcl/PclFonts.c                                                                                         |   72 
 hw/xprint/pcl/PclGC.c                                                                                            |  971 --
 hw/xprint/pcl/PclInit.c                                                                                          |  575 -
 hw/xprint/pcl/PclLine.c                                                                                          |  314 
 hw/xprint/pcl/PclMisc.c                                                                                          |  301 
 hw/xprint/pcl/PclPixel.c                                                                                         |  159 
 hw/xprint/pcl/PclPolygon.c                                                                                       |  351 
 hw/xprint/pcl/PclPrint.c                                                                                         |  709 -
 hw/xprint/pcl/PclSFonts.c                                                                                        |  427 -
 hw/xprint/pcl/PclSFonts.h                                                                                        |  115 
 hw/xprint/pcl/PclSpans.c                                                                                         |  137 
 hw/xprint/pcl/PclText.c                                                                                          |  934 --
 hw/xprint/pcl/PclWindow.c                                                                                        |  209 
 hw/xprint/pcl/Pclmap.h                                                                                           |  210 
 hw/xprint/ps/Makefile.am                                                                                         |   42 
 hw/xprint/ps/Ps.h                                                                                                |  600 -
 hw/xprint/ps/PsArc.c                                                                                             |  181 
 hw/xprint/ps/PsArea.c                                                                                            |  390 -
 hw/xprint/ps/PsAttVal.c                                                                                          |  289 
 hw/xprint/ps/PsAttr.c                                                                                            |  116 
 hw/xprint/ps/PsCache.c                                                                                           |  328 
 hw/xprint/ps/PsColor.c                                                                                           |  257 
 hw/xprint/ps/PsDef.h                                                                                             |   96 
 hw/xprint/ps/PsFTFonts.c                                                                                         |   85 
 hw/xprint/ps/PsFonts.c                                                                                           |  873 --
 hw/xprint/ps/PsGC.c                                                                                              |  418 -
 hw/xprint/ps/PsImageUtil.c                                                                                       |  329 
 hw/xprint/ps/PsInit.c                                                                                            |  648 -
 hw/xprint/ps/PsLine.c                                                                                            |  191 
 hw/xprint/ps/PsMisc.c                                                                                            |  320 
 hw/xprint/ps/PsPixel.c                                                                                           |  156 
 hw/xprint/ps/PsPixmap.c                                                                                          |  623 -
 hw/xprint/ps/PsPolygon.c                                                                                         |  259 
 hw/xprint/ps/PsPrint.c                                                                                           |  459 -
 hw/xprint/ps/PsSpans.c                                                                                           |  164 
 hw/xprint/ps/PsText.c                                                                                            |  581 -
 hw/xprint/ps/PsWindow.c                                                                                          |  222 
 hw/xprint/ps/psout.c                                                                                             | 1789 ----
 hw/xprint/ps/psout.h                                                                                             |  335 
 hw/xprint/ps/psout_ft.c                                                                                          |  337 
 hw/xprint/ps/psout_ftpstype1.c                                                                                   |  185 
 hw/xprint/ps/psout_ftpstype3.c                                                                                   |  439 -
 hw/xprint/ps/ttf2pt1wrap.c                                                                                       |   14 
 hw/xprint/raster/Makefile.am                                                                                     |   10 
 hw/xprint/raster/Raster.c                                                                                        | 1563 ----
 hw/xprint/raster/Raster.h                                                                                        |  117 
 hw/xprint/raster/RasterAttVal.c                                                                                  |  267 
 hw/xprint/spooler.c                                                                                              |  202 
 hw/xprint/spooler.h                                                                                              |   75 
 hw/xquartz/Makefile.am                                                                                           |    8 
 hw/xquartz/X11Application.h                                                                                      |    2 
 hw/xquartz/X11Application.m                                                                                      |   50 
 hw/xquartz/X11Controller.h                                                                                       |    2 
 hw/xquartz/X11Controller.m                                                                                       |    5 
 hw/xquartz/bundle/English.lproj/main.nib/designable.nib                                                          | 3734 ---------
 hw/xquartz/bundle/Info.plist                                                                                     |    6 
 hw/xquartz/bundle/Makefile.am                                                                                    |  332 
 hw/xquartz/bundle/PkgInfo                                                                                        |    1 
 hw/xquartz/bundle/Resources/Dutch.lproj/InfoPlist.strings                                                        |binary
 hw/xquartz/bundle/Resources/Dutch.lproj/Localizable.strings                                                      |binary
 hw/xquartz/bundle/Resources/Dutch.lproj/main.nib/keyedobjects.nib                                                |binary
 hw/xquartz/bundle/Resources/English.lproj/InfoPlist.strings                                                      |binary
 hw/xquartz/bundle/Resources/English.lproj/Localizable.strings                                                    |binary
 hw/xquartz/bundle/Resources/English.lproj/main.nib/designable.nib                                                | 3753 ++++++++++
 hw/xquartz/bundle/Resources/English.lproj/main.nib/keyedobjects.nib                                              |binary
 hw/xquartz/bundle/Resources/French.lproj/InfoPlist.strings                                                       |binary
 hw/xquartz/bundle/Resources/French.lproj/Localizable.strings                                                     |binary
 hw/xquartz/bundle/Resources/French.lproj/main.nib/keyedobjects.nib                                               |binary
 hw/xquartz/bundle/Resources/German.lproj/InfoPlist.strings                                                       |binary
 hw/xquartz/bundle/Resources/German.lproj/Localizable.strings                                                     |binary
 hw/xquartz/bundle/Resources/German.lproj/main.nib/keyedobjects.nib                                               |binary
 hw/xquartz/bundle/Resources/Italian.lproj/InfoPlist.strings                                                      |binary
 hw/xquartz/bundle/Resources/Italian.lproj/Localizable.strings                                                    |binary
 hw/xquartz/bundle/Resources/Italian.lproj/main.nib/keyedobjects.nib                                              |binary
 hw/xquartz/bundle/Resources/Japanese.lproj/InfoPlist.strings                                                     |binary
 hw/xquartz/bundle/Resources/Japanese.lproj/Localizable.strings                                                   |binary
 hw/xquartz/bundle/Resources/Japanese.lproj/main.nib/keyedobjects.nib                                             |binary
 hw/xquartz/bundle/Resources/Spanish.lproj/InfoPlist.strings                                                      |binary
 hw/xquartz/bundle/Resources/Spanish.lproj/Localizable.strings                                                    |binary
 hw/xquartz/bundle/Resources/Spanish.lproj/main.nib/keyedobjects.nib                                              |binary
 hw/xquartz/bundle/Resources/X11.icns                                                                             |binary
 hw/xquartz/bundle/Resources/da.lproj/InfoPlist.strings                                                           |binary
 hw/xquartz/bundle/Resources/da.lproj/Localizable.strings                                                         |binary
 hw/xquartz/bundle/Resources/da.lproj/main.nib/keyedobjects.nib                                                   |binary
 hw/xquartz/bundle/Resources/fi.lproj/InfoPlist.strings                                                           |binary
 hw/xquartz/bundle/Resources/fi.lproj/Localizable.strings                                                         |binary
 hw/xquartz/bundle/Resources/fi.lproj/main.nib/keyedobjects.nib                                                   |binary
 hw/xquartz/bundle/Resources/ko.lproj/InfoPlist.strings                                                           |binary
 hw/xquartz/bundle/Resources/ko.lproj/Localizable.strings                                                         |binary
 hw/xquartz/bundle/Resources/ko.lproj/main.nib/keyedobjects.nib                                                   |binary
 hw/xquartz/bundle/Resources/no.lproj/InfoPlist.strings                                                           |binary
 hw/xquartz/bundle/Resources/no.lproj/Localizable.strings                                                         |binary
 hw/xquartz/bundle/Resources/no.lproj/main.nib/keyedobjects.nib                                                   |binary
 hw/xquartz/bundle/Resources/pl.lproj/InfoPlist.strings                                                           |binary
 hw/xquartz/bundle/Resources/pl.lproj/Localizable.strings                                                         |binary
 hw/xquartz/bundle/Resources/pl.lproj/main.nib/keyedobjects.nib                                                   |binary
 hw/xquartz/bundle/Resources/pt.lproj/InfoPlist.strings                                                           |binary
 hw/xquartz/bundle/Resources/pt.lproj/Localizable.strings                                                         |binary
 hw/xquartz/bundle/Resources/pt.lproj/main.nib/keyedobjects.nib                                                   |binary
 hw/xquartz/bundle/Resources/pt_PT.lproj/InfoPlist.strings                                                        |binary
 hw/xquartz/bundle/Resources/pt_PT.lproj/Localizable.strings                                                      |binary
 hw/xquartz/bundle/Resources/pt_PT.lproj/main.nib/keyedobjects.nib                                                |binary
 hw/xquartz/bundle/Resources/ru.lproj/InfoPlist.strings                                                           |binary
 hw/xquartz/bundle/Resources/ru.lproj/Localizable.strings                                                         |binary
 hw/xquartz/bundle/Resources/ru.lproj/main.nib/keyedobjects.nib                                                   |binary
 hw/xquartz/bundle/Resources/sv.lproj/InfoPlist.strings                                                           |binary
 hw/xquartz/bundle/Resources/sv.lproj/Localizable.strings                                                         |binary
 hw/xquartz/bundle/Resources/sv.lproj/main.nib/keyedobjects.nib                                                   |binary
 hw/xquartz/bundle/Resources/zh_CN.lproj/InfoPlist.strings                                                        |binary
 hw/xquartz/bundle/Resources/zh_CN.lproj/Localizable.strings                                                      |binary
 hw/xquartz/bundle/Resources/zh_CN.lproj/main.nib/keyedobjects.nib                                                |binary
 hw/xquartz/bundle/Resources/zh_TW.lproj/InfoPlist.strings                                                        |binary
 hw/xquartz/bundle/Resources/zh_TW.lproj/Localizable.strings                                                      |binary
 hw/xquartz/bundle/Resources/zh_TW.lproj/main.nib/keyedobjects.nib                                                |binary
 hw/xquartz/bundle/Sparkle.framework/Headers                                                                      |    1 
 hw/xquartz/bundle/Sparkle.framework/Resources                                                                    |    1 
 hw/xquartz/bundle/Sparkle.framework/Sparkle                                                                      |    1 
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/NSApplication+AppCopies.h                                 |   13 
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/NSFileManager+Authentication.h                            |   11 
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/NSFileManager+Verification.h                              |   15 
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/NSString+extras.h                                         |   61 
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/RSS.h                                                     |   98 
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/SUAppcast.h                                               |   27 
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/SUAppcastItem.h                                           |   57 
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/SUAutomaticUpdateAlert.h                                  |   21 
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/SUConstants.h                                             |   20 
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/SUStatusChecker.h                                         |   26 
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/SUStatusController.h                                      |   33 
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/SUUnarchiver.h                                            |   25 
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/SUUpdateAlert.h                                           |   40 
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/SUUpdater.h                                               |   55 
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/SUUtilities.h                                             |   20 
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/Sparkle.h                                                 |   22 
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/Info.plist                                              |   22 
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/SUStatus.nib/classes.nib                                |   12 
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/SUStatus.nib/info.nib                                   |   16 
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/SUStatus.nib/keyedobjects.nib                           |binary
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ca.lproj/SUAutomaticUpdateAlert.nib/classes.nib         |   12 
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ca.lproj/SUAutomaticUpdateAlert.nib/info.nib            |   12 
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ca.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib    |binary
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ca.lproj/SUUpdateAlert.nib/classes.nib                  |   21 
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ca.lproj/SUUpdateAlert.nib/info.nib                     |   16 
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ca.lproj/SUUpdateAlert.nib/keyedobjects.nib             |binary
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ca.lproj/Sparkle.strings                                |binary
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/cs.lproj/SUAutomaticUpdateAlert.nib/classes.nib         |   12 
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/cs.lproj/SUAutomaticUpdateAlert.nib/info.nib            |   12 
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/cs.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib    |binary
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/cs.lproj/SUUpdateAlert.nib/classes.nib                  |   21 
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/cs.lproj/SUUpdateAlert.nib/info.nib                     |   16 
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/cs.lproj/SUUpdateAlert.nib/keyedobjects.nib             |binary
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/cs.lproj/Sparkle.strings                                |binary
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/cy.lproj/SUAutomaticUpdateAlert.nib/classes.nib         |   12 
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/cy.lproj/SUAutomaticUpdateAlert.nib/info.nib            |   12 
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/cy.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib    |binary
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/cy.lproj/SUUpdateAlert.nib/classes.nib                  |   21 
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/cy.lproj/SUUpdateAlert.nib/info.nib                     |   16 
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/cy.lproj/SUUpdateAlert.nib/keyedobjects.nib             |binary
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/cy.lproj/Sparkle.strings                                |binary
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/da.lproj/SUAutomaticUpdateAlert.nib/classes.nib         |   12 
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/da.lproj/SUAutomaticUpdateAlert.nib/info.nib            |   12 
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/da.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib    |binary
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/da.lproj/SUUpdateAlert.nib/classes.nib                  |   21 
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/da.lproj/SUUpdateAlert.nib/info.nib                     |   16 
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/da.lproj/SUUpdateAlert.nib/keyedobjects.nib             |binary
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/da.lproj/Sparkle.strings                                |binary
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/de.lproj/SUAutomaticUpdateAlert.nib/classes.nib         |   12 
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/de.lproj/SUAutomaticUpdateAlert.nib/info.nib            |   12 
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/de.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib    |binary
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/de.lproj/SUUpdateAlert.nib/classes.nib                  |   21 
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/de.lproj/SUUpdateAlert.nib/info.nib                     |   16 
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/de.lproj/SUUpdateAlert.nib/keyedobjects.nib             |binary
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/de.lproj/Sparkle.strings                                |binary
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/en.lproj/SUAutomaticUpdateAlert.nib/classes.nib         |   12 
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/en.lproj/SUAutomaticUpdateAlert.nib/info.nib            |   16 
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/en.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib    |binary
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/en.lproj/SUUpdateAlert.nib/classes.nib                  |   21 
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/en.lproj/SUUpdateAlert.nib/info.nib                     |   16 
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/en.lproj/SUUpdateAlert.nib/keyedobjects.nib             |binary
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/en.lproj/Sparkle.strings                                |binary
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/es.lproj/SUAutomaticUpdateAlert.nib/classes.nib         |   12 
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/es.lproj/SUAutomaticUpdateAlert.nib/info.nib            |   12 
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/es.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib    |binary
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/es.lproj/SUUpdateAlert.nib/classes.nib                  |   21 
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/es.lproj/SUUpdateAlert.nib/info.nib                     |   16 
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/es.lproj/SUUpdateAlert.nib/keyedobjects.nib             |binary
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/es.lproj/Sparkle.strings                                |binary
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/fi.lproj/SUAutomaticUpdateAlert.nib/classes.nib         |   12 
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/fi.lproj/SUAutomaticUpdateAlert.nib/info.nib            |   12 
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/fi.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib    |binary
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/fi.lproj/SUUpdateAlert.nib/classes.nib                  |   21 
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/fi.lproj/SUUpdateAlert.nib/info.nib                     |   16 
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/fi.lproj/SUUpdateAlert.nib/keyedobjects.nib             |binary
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/fi.lproj/Sparkle.strings                                |binary
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/fr.lproj/SUAutomaticUpdateAlert.nib/classes.nib         |   12 
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/fr.lproj/SUAutomaticUpdateAlert.nib/info.nib            |   12 
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/fr.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib    |binary
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/fr.lproj/SUUpdateAlert.nib/classes.nib                  |   21 
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/fr.lproj/SUUpdateAlert.nib/info.nib                     |   16 
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/fr.lproj/SUUpdateAlert.nib/keyedobjects.nib             |binary
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/fr.lproj/Sparkle.strings                                |binary
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/he.lproj/SUAutomaticUpdateAlert.nib/classes.nib         |   12 
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/he.lproj/SUAutomaticUpdateAlert.nib/info.nib            |   12 
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/he.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib    |binary
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/he.lproj/SUUpdateAlert.nib/classes.nib                  |   21 
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/he.lproj/SUUpdateAlert.nib/info.nib                     |   16 
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/he.lproj/SUUpdateAlert.nib/keyedobjects.nib             |binary
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/he.lproj/Sparkle.strings                                |binary
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/hu.lproj/SUAutomaticUpdateAlert.nib/classes.nib         |   12 
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/hu.lproj/SUAutomaticUpdateAlert.nib/info.nib            |   12 
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/hu.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib    |binary
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/hu.lproj/SUUpdateAlert.nib/classes.nib                  |   21 
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/hu.lproj/SUUpdateAlert.nib/info.nib                     |   16 
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/hu.lproj/SUUpdateAlert.nib/keyedobjects.nib             |binary
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/hu.lproj/Sparkle.strings                                |binary
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/id.lproj/SUAutomaticUpdateAlert.nib/classes.nib         |   12 
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/id.lproj/SUAutomaticUpdateAlert.nib/info.nib            |   12 
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/id.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib    |binary
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/id.lproj/SUUpdateAlert.nib/classes.nib                  |   21 
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/id.lproj/SUUpdateAlert.nib/info.nib                     |   16 
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/id.lproj/SUUpdateAlert.nib/keyedobjects.nib             |binary
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/id.lproj/Sparkle.strings                                |binary
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/is.lproj/SUAutomaticUpdateAlert.nib/classes.nib         |   12 
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/is.lproj/SUAutomaticUpdateAlert.nib/info.nib            |   12 
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/is.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib    |binary
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/is.lproj/SUUpdateAlert.nib/classes.nib                  |   21 
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/is.lproj/SUUpdateAlert.nib/info.nib                     |   16 
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/is.lproj/SUUpdateAlert.nib/keyedobjects.nib             |binary
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/is.lproj/Sparkle.strings                                |binary
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/it.lproj/SUAutomaticUpdateAlert.nib/classes.nib         |   12 
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/it.lproj/SUAutomaticUpdateAlert.nib/info.nib            |   12 
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/it.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib    |binary
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/it.lproj/SUUpdateAlert.nib/classes.nib                  |   21 
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/it.lproj/SUUpdateAlert.nib/info.nib                     |   16 
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/it.lproj/SUUpdateAlert.nib/keyedobjects.nib             |binary
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/it.lproj/Sparkle.strings                                |binary
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ja.lproj/SUAutomaticUpdateAlert.nib/classes.nib         |   12 
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ja.lproj/SUAutomaticUpdateAlert.nib/info.nib            |   12 
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ja.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib    |binary
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ja.lproj/SUUpdateAlert.nib/classes.nib                  |   21 
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ja.lproj/SUUpdateAlert.nib/info.nib                     |   16 
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ja.lproj/SUUpdateAlert.nib/keyedobjects.nib             |binary
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ja.lproj/Sparkle.strings                                |binary
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ko.lproj/SUAutomaticUpdateAlert.nib/classes.nib         |   12 
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ko.lproj/SUAutomaticUpdateAlert.nib/info.nib            |   12 
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ko.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib    |binary
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ko.lproj/SUUpdateAlert.nib/classes.nib                  |   21 
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ko.lproj/SUUpdateAlert.nib/info.nib                     |   16 
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ko.lproj/SUUpdateAlert.nib/keyedobjects.nib             |binary
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ko.lproj/Sparkle.strings                                |binary
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/nl.lproj/SUAutomaticUpdateAlert.nib/classes.nib         |   12 
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/nl.lproj/SUAutomaticUpdateAlert.nib/info.nib            |   12 
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/nl.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib    |binary
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/nl.lproj/SUUpdateAlert.nib/classes.nib                  |   21 
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/nl.lproj/SUUpdateAlert.nib/info.nib                     |   16 
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/nl.lproj/SUUpdateAlert.nib/keyedobjects.nib             |binary
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/nl.lproj/Sparkle.strings                                |binary
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/no.lproj/SUAutomaticUpdateAlert.nib/classes.nib         |   12 
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/no.lproj/SUAutomaticUpdateAlert.nib/info.nib            |   12 
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/no.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib    |binary
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/no.lproj/SUUpdateAlert.nib/classes.nib                  |   21 
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/no.lproj/SUUpdateAlert.nib/info.nib                     |   16 
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/no.lproj/SUUpdateAlert.nib/keyedobjects.nib             |binary
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/no.lproj/Sparkle.strings                                |binary
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/pl.lproj/SUAutomaticUpdateAlert.nib/classes.nib         |   12 
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/pl.lproj/SUAutomaticUpdateAlert.nib/info.nib            |   12 
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/pl.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib    |binary
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/pl.lproj/SUUpdateAlert.nib/classes.nib                  |   21 
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/pl.lproj/SUUpdateAlert.nib/info.nib                     |   16 
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/pl.lproj/SUUpdateAlert.nib/keyedobjects.nib             |binary
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/pl.lproj/Sparkle.strings                                |binary
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ru.lproj/SUAutomaticUpdateAlert.nib/classes.nib         |   12 
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ru.lproj/SUAutomaticUpdateAlert.nib/info.nib            |   12 
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ru.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib    |binary
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ru.lproj/SUUpdateAlert.nib/classes.nib                  |   21 
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ru.lproj/SUUpdateAlert.nib/info.nib                     |   16 
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ru.lproj/SUUpdateAlert.nib/keyedobjects.nib             |binary
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ru.lproj/Sparkle.strings                                |binary
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/sk.lproj/SUAutomaticUpdateAlert.nib/classes.nib         |   12 
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/sk.lproj/SUAutomaticUpdateAlert.nib/info.nib            |   12 
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/sk.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib    |binary
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/sk.lproj/SUUpdateAlert.nib/classes.nib                  |   21 
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/sk.lproj/SUUpdateAlert.nib/info.nib                     |   16 
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/sk.lproj/SUUpdateAlert.nib/keyedobjects.nib             |binary
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/sk.lproj/Sparkle.strings                                |binary
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/sv.lproj/SUAutomaticUpdateAlert.nib/classes.nib         |   12 
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/sv.lproj/SUAutomaticUpdateAlert.nib/info.nib            |   12 
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/sv.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib    |binary
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/sv.lproj/SUUpdateAlert.nib/classes.nib                  |   21 
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/sv.lproj/SUUpdateAlert.nib/info.nib                     |   16 
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/sv.lproj/SUUpdateAlert.nib/keyedobjects.nib             |binary
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/sv.lproj/Sparkle.strings                                |binary
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/th.lproj/SUAutomaticUpdateAlert.nib/classes.nib         |   12 
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/th.lproj/SUAutomaticUpdateAlert.nib/info.nib            |   12 
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/th.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib    |binary
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/th.lproj/SUUpdateAlert.nib/classes.nib                  |   21 
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/th.lproj/SUUpdateAlert.nib/info.nib                     |   16 
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/th.lproj/SUUpdateAlert.nib/keyedobjects.nib             |binary
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/th.lproj/Sparkle.strings                                |binary
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/tr.lproj/SUAutomaticUpdateAlert.nib/classes.nib         |   12 
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/tr.lproj/SUAutomaticUpdateAlert.nib/info.nib            |   12 
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/tr.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib    |binary
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/tr.lproj/SUUpdateAlert.nib/classes.nib                  |   21 
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/tr.lproj/SUUpdateAlert.nib/info.nib                     |   16 
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/tr.lproj/SUUpdateAlert.nib/keyedobjects.nib             |binary
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/tr.lproj/Sparkle.strings                                |binary
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/zh_CN.lproj/SUAutomaticUpdateAlert.nib/classes.nib      |   12 
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/zh_CN.lproj/SUAutomaticUpdateAlert.nib/info.nib         |   12 
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/zh_CN.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib |binary
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/zh_CN.lproj/SUUpdateAlert.nib/classes.nib               |   21 
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/zh_CN.lproj/SUUpdateAlert.nib/info.nib                  |   16 
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/zh_CN.lproj/SUUpdateAlert.nib/keyedobjects.nib          |binary
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/zh_CN.lproj/Sparkle.strings                             |binary
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/zh_TW.lproj/SUAutomaticUpdateAlert.nib/classes.nib      |   12 
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/zh_TW.lproj/SUAutomaticUpdateAlert.nib/info.nib         |   12 
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/zh_TW.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib |binary
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/zh_TW.lproj/SUUpdateAlert.nib/classes.nib               |   21 
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/zh_TW.lproj/SUUpdateAlert.nib/info.nib                  |   16 
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/zh_TW.lproj/SUUpdateAlert.nib/keyedobjects.nib          |binary
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/zh_TW.lproj/Sparkle.strings                             |binary
 hw/xquartz/bundle/Sparkle.framework/Versions/A/Sparkle                                                           |binary
 hw/xquartz/bundle/Sparkle.framework/Versions/Current                                                             |    1 
 hw/xquartz/bundle/X11.xcodeproj/project.pbxproj                                                                  |  458 -
 hw/xquartz/bundle/bundle-main.c                                                                                  |  136 
 hw/xquartz/bundle/mk_bundke.sh                                                                                   |   25 
 hw/xquartz/darwin.c                                                                                              |   51 
 hw/xquartz/darwin.h                                                                                              |   33 
 hw/xquartz/darwinEvents.c                                                                                        |  132 
 hw/xquartz/darwinEvents.h                                                                                        |   37 
 hw/xquartz/doc/Makefile.am                                                                                       |   14 
 hw/xquartz/doc/Xquartz.man.pre                                                                                   |  156 
 hw/xquartz/mach-startup/Makefile.am                                                                              |   58 
 hw/xquartz/mach-startup/bundle-main.c                                                                            |  297 
 hw/xquartz/mach-startup/mach_startup.defs                                                                        |   41 
 hw/xquartz/mach-startup/mach_startup_types.h                                                                     |    8 
 hw/xquartz/mach-startup/stub.c                                                                                   |  118 
 hw/xquartz/quartz.h                                                                                              |    1 
 hw/xquartz/quartzStartup.c                                                                                       |   58 
 hw/xquartz/xpr/Makefile.am                                                                                       |   32 
 hw/xquartz/xpr/Xquartz.man.pre                                                                                   |  156 
 hw/xquartz/xpr/xprFrame.c                                                                                        |   41 
 hw/xquartz/xpr/xprScreen.c                                                                                       |    1 
 include/dix-config.h.in                                                                                          |    6 
 include/dix.h                                                                                                    |    3 
 include/servermd.h                                                                                               |   20 
 mi/miinitext.c                                                                                                   |   48 
 mi/mivaltree.c                                                                                                   |    4 
 miext/rootless/rootlessWindow.c                                                                                  |   71 
 os/utils.c                                                                                                       |   13 
 render/glyph.c                                                                                                   |   17 
 xkb/ddxLoad.c                                                                                                    |   54 
 483 files changed, 9108 insertions(+), 44813 deletions(-)

New commits:
commit d426f0ee6013665a8e0bce4b8b7df2c372ea3645
Merge: 957af73... ed65e8b...
Author: Alan Hourihane <alanh at tungstengraphics.com>
Date:   Tue May 13 15:59:45 2008 +0100

    Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into glucose-2

commit ed65e8b4f02a6da7f1c5d85984a9ccf6a94d0181
Author: Alan Coopersmith <alan.coopersmith at sun.com>
Date:   Mon May 12 18:49:34 2008 -0700

    Check for strcasestr and workaround it on systems without it

diff --git a/config/hal.c b/config/hal.c
index 67ffa03..e197cb1 100644
--- a/config/hal.c
+++ b/config/hal.c
@@ -260,7 +260,17 @@ device_added(LibHalContext *hal_ctx, const char *udi)
                      * Since we can't predict the order in which the keys
                      * arrive, we need to store them.
                      */
+#ifndef HAVE_STRCASESTR
+                    int psi_key_len = strlen(psi_key);
+                    char *lower_psi_key = xalloc(psi_key_len + 1);
+
+                    CopyISOLatin1Lowered((unsigned char *) lower_psi_key,
+                                         (unsigned char *) psi_key,
+                                         psi_key_len);
+                    if ((tmp = strstr(lower_psi_key, "xkb")))
+#else
                     if ((tmp = strcasestr(psi_key, "xkb")))
+#endif
                     {
                         if (!strcasecmp(&tmp[3], "layout"))
                         {
@@ -289,6 +299,9 @@ device_added(LibHalContext *hal_ctx, const char *udi)
                         add_option(&options, psi_key + sizeof(LIBHAL_PROP_KEY)-1, tmp_val);
                         xfree(tmp_val);
                     }
+#ifndef HAVE_STRCASESTR
+                    xfree(lower_psi_key);
+#endif
                 }
             } else if (!strncasecmp(psi_key, LIBHAL_XKB_PROP_KEY, sizeof(LIBHAL_XKB_PROP_KEY)-1)){
 
diff --git a/configure.ac b/configure.ac
index d78f122..8716ba5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -191,7 +191,7 @@ dnl Checks for library functions.
 AC_FUNC_VPRINTF
 AC_CHECK_FUNCS([geteuid getuid link memmove memset mkstemp strchr strrchr \
 		strtol getopt getopt_long vsnprintf walkcontext backtrace \
-		getisax getzoneid shmctl64])
+		getisax getzoneid shmctl64 strcasestr])
 AC_FUNC_ALLOCA
 dnl Old HAS_* names used in os/*.c.
 AC_CHECK_FUNC([getdtablesize],
diff --git a/include/dix-config.h.in b/include/dix-config.h.in
index 387f65a..914ce49 100644
--- a/include/dix-config.h.in
+++ b/include/dix-config.h.in
@@ -205,6 +205,9 @@
 /* Define to 1 if you have the <stdlib.h> header file. */
 #undef HAVE_STDLIB_H
 
+/* Define to 1 if you have the `strcasestr' function. */
+#undef HAVE_STRCASESTR
+
 /* Define to 1 if you have the `strchr' function. */
 #undef HAVE_STRCHR
 
commit c50b5d978981b13cdb22a9ad41c1b64f90cebe51
Author: Aaron Plattner <aplattner at nvidia.com>
Date:   Sun May 4 13:45:27 2008 -0700

    Bug #14692: Allow drivers to have a say in Xinerama visual consolidation.
    
    Create a new exported global variable, XineramaVisualsEqualPtr.  Use this
    pointer to decide whether two visuals are equal during visual consolidation.
    This pointer can be wrapped, which allows drivers and extensions to control
    which visuals are consolidated.  A wrapper can reject the visuals without
    calling down, but must call down and return that result if it deems the visuals
    equal.  This ensures that all layers agree that the visuals are equal.
    
    Pass the screen of the other visual into the VisualsEqual callchain.
    
    Don't free PanoramiXVisuals since we need it for PanoramiXTranslateVisualID.
    
    Don't skip the first visual on the other screen in PanoramiXMaybeAddVisual.
    
    Skip the loop in PanoramiXTranslateVisualID if screen is 0.

diff --git a/Xext/panoramiX.c b/Xext/panoramiX.c
index f924147..eb70689 100644
--- a/Xext/panoramiX.c
+++ b/Xext/panoramiX.c
@@ -87,6 +87,9 @@ _X_EXPORT unsigned long XRT_PIXMAP;
 _X_EXPORT unsigned long XRT_GC;
 _X_EXPORT unsigned long XRT_COLORMAP;
 
+static Bool VisualsEqual(VisualPtr, ScreenPtr, VisualPtr);
+_X_EXPORT XineramaVisualsEqualProcPtr XineramaVisualsEqualPtr = &VisualsEqual;
+
 /*
  *	Function prototypes
  */
@@ -668,10 +671,10 @@ Bool PanoramiXCreateConnectionBlock(void)
 
     connSetupPrefix.length = length >> 2;
 
-    xfree(PanoramiXVisuals);
     for (i = 0; i < PanoramiXNumDepths; i++)
 	xfree(PanoramiXDepths[i].vids);
     xfree(PanoramiXDepths);
+    PanoramiXDepths = NULL;
 
     /*
      *  OK, change some dimensions so it looks as if it were one big screen
@@ -709,7 +712,7 @@ Bool PanoramiXCreateConnectionBlock(void)
  * do their own back-mapping.
  */
 static Bool
-VisualsEqual(VisualPtr a, VisualPtr b)
+VisualsEqual(VisualPtr a, ScreenPtr pScreenB, VisualPtr b)
 {
     return ((a->class == b->class) &&
 	(a->ColormapEntries == b->ColormapEntries) &&
@@ -759,7 +762,6 @@ static void
 PanoramiXMaybeAddVisual(VisualPtr pVisual)
 {
     ScreenPtr pScreen;
-    VisualPtr candidate = NULL;
     int j, k;
     Bool found = FALSE;
 
@@ -767,10 +769,10 @@ PanoramiXMaybeAddVisual(VisualPtr pVisual)
 	pScreen = screenInfo.screens[j];
 	found = FALSE;
 
-	candidate = pScreen->visuals;
 	for (k = 0; k < pScreen->numVisuals; k++) {
-	    candidate++;
-	    if (VisualsEqual(pVisual, candidate)
+	    VisualPtr candidate = &pScreen->visuals[k];
+
+	    if ((*XineramaVisualsEqualPtr)(pVisual, pScreen, candidate)
 #ifdef GLXPROXY
 		&& glxMatchVisual(screenInfo.screens[0], pVisual, pScreen)
 #endif
@@ -844,8 +846,13 @@ PanoramiXConsolidate(void)
 _X_EXPORT VisualID
 PanoramiXTranslateVisualID(int screen, VisualID orig)
 {
+    ScreenPtr pOtherScreen = screenInfo.screens[screen];
     VisualPtr pVisual = NULL;
-    int i, j;
+    int i;
+
+    /* if screen is 0, orig is already the correct visual ID */
+    if (screen == 0)
+	return orig;
 
     for (i = 0; i < PanoramiXNumVisuals; i++) {
 	if (orig == PanoramiXVisuals[i].vid) {
@@ -858,11 +865,13 @@ PanoramiXTranslateVisualID(int screen, VisualID orig)
 	return 0;
 
     /* found the original, now translate it relative to the backend screen */
-    for (i = 0; i < PanoramiXNumScreens; i++)
-	for (j = 0; j < screenInfo.screens[i]->numVisuals; j++)
-	    if (VisualsEqual(pVisual, &screenInfo.screens[i]->visuals[j]))
-		return screenInfo.screens[i]->visuals[j].vid;
-    
+    for (i = 0; i < pOtherScreen->numVisuals; i++) {
+	VisualPtr pOtherVisual = &pOtherScreen->visuals[i];
+
+	if ((*XineramaVisualsEqualPtr)(pVisual, pOtherScreen, pOtherVisual))
+	    return pOtherVisual->vid;
+    }
+
     return 0;
 }
 
diff --git a/Xext/panoramiXsrv.h b/Xext/panoramiXsrv.h
index 6d556e9..d5c3d98 100644
--- a/Xext/panoramiXsrv.h
+++ b/Xext/panoramiXsrv.h
@@ -30,6 +30,16 @@ extern unsigned long XRT_PIXMAP;
 extern unsigned long XRT_GC;
 extern unsigned long XRT_COLORMAP;
 
+/*
+ * Drivers are allowed to wrap this function.  Each wrapper can decide that the
+ * two visuals are unequal, but if they are deemed equal, the wrapper must call
+ * down and return FALSE if the wrapped function does.  This ensures that all
+ * layers agree that the visuals are equal.  The first visual is always from
+ * screen 0.
+ */
+typedef Bool (*XineramaVisualsEqualProcPtr)(VisualPtr, ScreenPtr, VisualPtr);
+extern XineramaVisualsEqualProcPtr XineramaVisualsEqualPtr;
+
 extern void XineramaGetImageData(
     DrawablePtr *pDrawables,
     int left,
commit 86678e7cc2b021851ff508433fa160170f500c51
Author: Adam Jackson <ajax at redhat.com>
Date:   Mon May 12 14:53:37 2008 -0400

    Fix fbdevhw initialization for PCI drivers.
    
    graphics/fb%d, not graphics:fb%d.  Thanks sysfs.  Thysfs.

diff --git a/hw/xfree86/fbdevhw/fbdevhw.c b/hw/xfree86/fbdevhw/fbdevhw.c
index a1f6748..4d51422 100644
--- a/hw/xfree86/fbdevhw/fbdevhw.c
+++ b/hw/xfree86/fbdevhw/fbdevhw.c
@@ -310,12 +310,12 @@ fbdev_open_pci(struct pci_device * pPci, char **namep)
     /* There are two ways to that we can determine which fb device is
      * associated with this PCI device.  The more modern way is to look in
      * the sysfs directory for the PCI device for a file named
-     * "graphics:fb*"
+     * "graphics/fb*"
      */
 
     for (i = 0; i < 8; i++) {
 	sprintf(filename, 
-		"/sys/bus/pci/devices/%04x:%02x:%02x.%d/graphics:fb%d",
+		"/sys/bus/pci/devices/%04x:%02x:%02x.%d/graphics/fb%d",
 		pPci->domain, pPci->bus, pPci->dev, pPci->func, i);
 
 	fd = open(filename, O_RDONLY, 0);
commit 1c8bd318fbaf65890ef16fe26c76dd5e6f14dfde
Author: Adam Jackson <ajax at redhat.com>
Date:   Mon May 12 14:15:11 2008 -0400

    X n'est pas une print API.

diff --git a/Xext/Makefile.am b/Xext/Makefile.am
index b03feda..c5c5d2e 100644
--- a/Xext/Makefile.am
+++ b/Xext/Makefile.am
@@ -98,12 +98,6 @@ if XEVIE
 BUILTIN_SRCS += $(XEVIE_SRCS)
 endif
 
-# XPrint: Printing via X Protocol
-XPRINT_SRCS = xprint.c
-if XPRINT
-BUILTIN_SRCS += $(XPRINT_SRCS)
-endif
-
 # Multi-buffering extension
 MULTIBUFFER_SRCS = mbuf.c
 EXTRA_MULTIBUFFER_SRCS = mbufbf.c mbufpx.c
@@ -149,7 +143,6 @@ EXTRA_DIST = \
 	$(XCALIBRATE_SRCS) \
 	$(XINERAMA_SRCS) \
 	$(XEVIE_SRCS) \
-	$(XPRINT_SRCS) \
 	$(MULTIBUFFER_SRCS) \
 	$(EXTRA_MULTIBUFFER_SRCS) \
 	$(FONTCACHE_SRCS) \
diff --git a/Xext/xprint.c b/Xext/xprint.c
deleted file mode 100644
index a5d8fcc..0000000
--- a/Xext/xprint.c
+++ /dev/null
@@ -1,2617 +0,0 @@
-/*
-(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.
-**    *
-**    *********************************************************
-**
-********************************************************************/
-
-#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 "../hw/xprint/DiPrint.h"
-#include "../hw/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 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 DevPrivateKey XpClientPrivateKey = &XpClientPrivateKey;
-
-#define XP_GETPRIV(pClient) ((XpContextPtr) \
-    dixLookupPrivate(&(pClient)->devPrivates, XpClientPrivateKey))
-#define XP_SETPRIV(pClient, p) \
-    dixSetPrivate(&(pClient)->devPrivates, XpClientPrivateKey, p)
-
-/*
- * 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;
-    }
-
-    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;
-	}
-    }
-}
-
-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;
-
-    return (*CloseScreen)(index, pScreen);
-}
-
-/*
- * 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,
-						       DixReadAccess))
-       == (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,
-						       DixWriteAccess))
-       == (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,
-						       DixReadAccess))
-       == (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(sizeof(XpContextRec))) == 
-       (XpContextPtr) NULL)
-	return BadAlloc;
-
-    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->devPrivates = NULL;
-
-    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 = XP_GETPRIV(client)) != (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);
-        }
-
-	XP_SETPRIV(client, 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,
-						       DixWriteAccess))
-       == (XpContextPtr)NULL)
-    {
-	client->errorValue = stuff->printContext;
-        return XpErrorBase+XPBadContext;
-    }
-
-    if((pPrintClient = AcquireClient(pContext, client)) == (XpClientPtr)NULL)
-        return BadAlloc;
-
-    XP_SETPRIV(client, pContext);
-
-    XpSetFontResFunc(client);
-
-    if (client->noClientException != Success)
-        return client->noClientException;
-    else
-	return result;
-}
-
-XpContextPtr
-XpGetPrintContext(ClientPtr client)
-{
-    return XP_GETPRIV(client);
-}
-
-static int
-ProcXpGetContext(ClientPtr client)
-{
-    /* REQUEST(xPrintGetContextReq); */
-    xPrintGetContextReply rep;
-
-    XpContextPtr pContext;
-    register int n;
-    register long l;
-
-    REQUEST_SIZE_MATCH(xPrintGetContextReq);
-
-    if((pContext = XP_GETPRIV(client)) == (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,
-						       DixDestroyAccess))
-       == (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,
-						       DixReadAccess))
-       == (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);
-    dixFreePrivates(pContext->devPrivates);
-    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(XP_GETPRIV(pXpClient->client) == pXpClient->context)
-    {
-	XP_SETPRIV(pXpClient->client, 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;
-}
-
-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 = XP_GETPRIV(client)) == (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 = XP_GETPRIV(client)) == (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 = XP_GETPRIV(client)) == (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 = XP_GETPRIV(client)) == (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 = XP_GETPRIV(client)) == (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;
-
-    result = dixLookupWindow(&pWin, stuff->window, client, DixWriteAccess);
-    if (result != Success)
-	return result;
-    if (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 = XP_GETPRIV(client)) == (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 = XP_GETPRIV(client)) == (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;
-	result = dixLookupDrawable(&pDraw, stuff->drawable, client, 0,
-				   DixWriteAccess);
-	if (result != Success)
-	    return result;
-	if (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,
-							DixWriteAccess))
-       == (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,
-						DixReadAccess))
-	   == (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,
-					DixWriteAccess))
-       == (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,
-						DixReadAccess))
-	   == (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,
-						      DixWriteAccess))
-       == (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,
-						      DixReadAccess))
-       == (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 XP_GETPRIV(client);
-}
-
-
-/*******************************************************************************
- *
- * 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/configure.ac b/configure.ac
index 9da8a94..d78f122 100644
--- a/configure.ac
+++ b/configure.ac
@@ -566,7 +566,6 @@ AC_ARG_ENABLE(xvfb,    	      AS_HELP_STRING([--enable-xvfb], [Build Xvfb server
 AC_ARG_ENABLE(xnest,   	      AS_HELP_STRING([--enable-xnest], [Build Xnest server (default: auto)]), [XNEST=$enableval], [XNEST=auto])
 AC_ARG_ENABLE(xquartz,        AS_HELP_STRING([--enable-xquartz], [Build Xquartz server for OS-X (default: auto)]), [XQUARTZ=$enableval], [XQUARTZ=auto])
 AC_ARG_ENABLE(xwin,    	      AS_HELP_STRING([--enable-xwin], [Build XWin server (default: auto)]), [XWIN=$enableval], [XWIN=auto])
-AC_ARG_ENABLE(xprint,         AS_HELP_STRING([--enable-xprint], [Build Xprint extension and server (default: no)]), [XPRINT=$enableval], [XPRINT=no])
 AC_ARG_ENABLE(xgl,            AS_HELP_STRING([--enable-xgl], [Build Xgl server (default: no)]), [XGL=$enableval], [XGL=no])
 AC_ARG_ENABLE(xglx,           AS_HELP_STRING([--enable-xglx], [Build Xglx xgl module (default: no)]), [XGLX=$enableval], [XGLX=no])
 AC_ARG_ENABLE(xegl,           AS_HELP_STRING([--enable-xegl], [Build Xegl xgl module (default: no)]), [XEGL=$enableval], [XEGL=no])
@@ -979,15 +978,6 @@ if test "x$DPMSExtension" = xyes; then
 	AC_DEFINE(DPMSExtension, 1, [Support DPMS extension])
 fi
 
-if test "x$XPRINT" = xauto; then
-	PKG_CHECK_MODULES([XPRINTPROTO], [printproto], [XPRINT=yes], [XPRINT=no])
-fi
-AM_CONDITIONAL(XPRINT, [test "x$XPRINT" = xyes])
-if test "x$XPRINT" = xyes; then
-	AC_DEFINE(XPRINT, 1, [Build Print extension])
-	REQUIRED_MODULES="$REQUIRED_MODULES printproto"
-fi
-
 if test "x$BUILTIN_FONTS" = xyes; then
        AC_DEFINE(BUILTIN_FONTS, 1, [Use only built-in fonts])
        AC_DEFINE(NOFONTSERVERACCESS, 1, [Avoid using a font server])
@@ -1612,62 +1602,6 @@ if test "x$MFB" = xyes -o "x$AFB" = xyes; then
 	fi
 fi
 
-dnl Xprint DDX
-
-AC_MSG_CHECKING([whether to build Xprint DDX])
-AC_MSG_RESULT([$XPRINT])
-
-if test "x$XPRINT" = xyes; then
-	PKG_CHECK_MODULES([XPRINTMODULES], [printproto x11 xfont $XDMCP_MODULES xau])
-	XPRINT_CFLAGS="$XPRINTMODULES_CFLAGS -DXPRINT"
-	XPRINT_LIBS="$XEXT_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $RENDER_LIB $COMPOSITE_LIB $RANDR_LIB $XI_LIB $FIXES_LIB $DAMAGE_LIB $XI_LIB $GLX_LIBS $MIEXT_DAMAGE_LIB $XKB_LIB $XKB_STUB_LIB"
-	XPRINT_SYS_LIBS="$XPRINTMODULES_LIBS"
-
-	xpconfigdir=$libdir/X11/xserver
-	AC_SUBST([xpconfigdir])
-
-	AC_PATH_PROG(MKFONTSCALE, mkfontscale)
-	AC_PATH_PROG(MKFONTDIR, mkfontdir)
-	
-        # freetype support code borrowed from lib/XFont
-        if test x$XP_USE_FREETYPE = xyes; then
-            AC_DEFINE(XP_USE_FREETYPE,1,[Support FreeType rasterizer in Xprint for nearly all font file formats])
-
-            if test "$freetype_config" = "auto" ; then
-                PKG_CHECK_MODULES(FREETYPE, freetype2,
-                        freetype_config=no, freetype_config=yes)
-            fi
-
-            if test "$freetype_config" = "yes"; then
-                AC_PATH_PROG(ft_config,freetype-config,no)
-                if test "$ft_config" = "no"; then
-                        AC_MSG_ERROR([You must have freetype installed; see http://www.freetype.org/])
-                fi
-            else
-                ft_config="$freetype_config"
-            fi
-
-            if test "$freetype_config" != "no"; then
-                FREETYPE_CFLAGS="`$ft_config --cflags`"
-                FREETYPE_LIBS="`$ft_config --libs`"
-            fi
-            FREETYPE_REQUIRES="freetype2"
-        else
-            FREETYPE_CFLAGS=""
-            FREETYPE_LIBS=""
-            FREETYPE_REQUIRES=""
-        fi
-	XPRINT_CFLAGS="$XPRINT_CFLAGS $FREETYPE_CFLAGS"
-	XPRINT_SYS_LIBS="$XPRINT_SYS_LIBS $FREETYPE_LIBS"
-	# end freetype support
-
-	AC_SUBST([XPRINT_CFLAGS])
-	AC_SUBST([XPRINT_LIBS])
-	AC_SUBST([XPRINT_SYS_LIBS])
-fi
-AM_CONDITIONAL(XP_USE_FREETYPE, [test "x$XPRINT" = xyes && test "x$XP_USE_FREETYPE" = xyes])
-
-
 dnl XWin DDX
 
 AC_MSG_CHECKING([whether to build XWin DDX])
@@ -2188,41 +2122,5 @@ hw/kdrive/smi/Makefile
 hw/kdrive/src/Makefile
 hw/kdrive/vesa/Makefile
 hw/kdrive/via/Makefile
-hw/xprint/Makefile
-hw/xprint/doc/Makefile
-hw/xprint/pcl/Makefile
-hw/xprint/pcl-mono/Makefile
-hw/xprint/raster/Makefile
-hw/xprint/ps/Makefile
-hw/xprint/etc/Makefile
-hw/xprint/etc/Xsession.d/Makefile
-hw/xprint/etc/init.d/Makefile
-hw/xprint/etc/profile.d/Makefile
-hw/xprint/config/Makefile
-hw/xprint/config/C/print/attributes/Makefile
-hw/xprint/config/C/print/ddx-config/Makefile
-hw/xprint/config/C/print/ddx-config/raster/Makefile
-hw/xprint/config/C/print/models/CANONBJ10E-GS/Makefile
-hw/xprint/config/C/print/models/PSdefault/fonts/Makefile
-hw/xprint/config/C/print/models/PSdefault/Makefile
-hw/xprint/config/C/print/models/PSspooldir/Makefile
-hw/xprint/config/C/print/models/SPSPARC2/Makefile
-hw/xprint/config/C/print/models/SPSPARC2/fonts/Makefile
-hw/xprint/config/C/print/models/GSdefault/Makefile
-hw/xprint/config/C/print/models/HPLJ4050-PS/Makefile
-hw/xprint/config/C/print/models/HPLJ4050-PS/fonts/Makefile
-hw/xprint/config/C/print/models/Makefile
-hw/xprint/config/C/print/models/PS2PDFspooldir-GS/Makefile
-hw/xprint/config/C/print/models/CANONC3200-PS/Makefile
-hw/xprint/config/C/print/models/CANONC3200-PS/fonts/Makefile
-hw/xprint/config/C/print/models/HPLJ4family/fonts/Makefile
-hw/xprint/config/C/print/models/HPLJ4family/Makefile
-hw/xprint/config/C/print/models/HPDJ1600C/Makefile
-hw/xprint/config/C/print/models/HPDJ1600C/fonts/Makefile
-hw/xprint/config/C/print/Makefile
-hw/xprint/config/C/Makefile
-hw/xprint/config/en_US/print/attributes/Makefile
-hw/xprint/config/en_US/print/Makefile
-hw/xprint/config/en_US/Makefile
 xorg-server.pc
 ])
diff --git a/dix/Makefile.am b/dix/Makefile.am
index e44b510..ac5d344 100644
--- a/dix/Makefile.am
+++ b/dix/Makefile.am
@@ -1,10 +1,6 @@
 standard_dix_libs = libdix.la libxpstubs.la
 
-if XPRINT
-noinst_LTLIBRARIES = $(standard_dix_libs) libXpdix.la
-else
 noinst_LTLIBRARIES = $(standard_dix_libs)
-endif
 
 AM_CFLAGS = $(DIX_CFLAGS) \
 	-DVENDOR_NAME=\""@VENDOR_NAME@"\" \
@@ -45,12 +41,6 @@ libdix_la_SOURCES = 	\
 libxpstubs_la_SOURCES =	\
 	xpstubs.c
 
-if XPRINT
-libXpdix_la_SOURCES = $(libdix_la_SOURCES)
-libXpdix_la_CPPFLAGS = -I$(top_srcdir)/hw/xprint
-libXpdix_la_CFLAGS = $(AM_CFLAGS) $(XPRINT_CFLAGS)
-endif
-
 EXTRA_DIST = buildatoms BuiltInAtoms CHANGES Xserver.d Xserver-dtrace.h.in
 
 # Install list of protocol names
diff --git a/dix/dispatch.c b/dix/dispatch.c
index 5025953..1b81b81 100644
--- a/dix/dispatch.c
+++ b/dix/dispatch.c
@@ -399,9 +399,6 @@ Dispatch(void)
 	    }
 	    isItTimeToYield = FALSE;
  
-#ifdef XPRINT
-            requestingClient = client;
-#endif
 #ifdef SMART_SCHEDULE
 	    start_tick = SmartScheduleTime;
 #endif
@@ -473,9 +470,6 @@ Dispatch(void)
 	    if (client)
 		client->smart_stop_tick = SmartScheduleTime;
 #endif
-#ifdef XPRINT
-	    requestingClient = NULL;
-#endif
 	}
 	dispatchException &= ~DE_PRIORITYCHANGE;
     }
diff --git a/dix/dixfonts.c b/dix/dixfonts.c
index 6fb29de..0b08e9e 100644
--- a/dix/dixfonts.c
+++ b/dix/dixfonts.c
@@ -1937,37 +1937,27 @@ GetDefaultPointSize ()
 FontResolutionPtr
 GetClientResolutions (int *num)
 {
-#ifdef XPRINT
-    if (requestingClient && requestingClient->fontResFunc != NULL &&
-	!requestingClient->clientGone)
-    {
-	return (*requestingClient->fontResFunc)(requestingClient, num);
-    }
-    else
-#endif
-    {
-	static struct _FontResolution res;
-	ScreenPtr   pScreen;
+    static struct _FontResolution res;
+    ScreenPtr   pScreen;
 
-	pScreen = screenInfo.screens[0];
-	res.x_resolution = (pScreen->width * 25.4) / pScreen->mmWidth;
-	/*
-	 * XXX - we'll want this as long as bitmap instances are prevalent 
-	 so that we can match them from scalable fonts
-	 */
-	if (res.x_resolution < 88)
-	    res.x_resolution = 75;
-	else
-	    res.x_resolution = 100;
-	res.y_resolution = (pScreen->height * 25.4) / pScreen->mmHeight;
-	if (res.y_resolution < 88)
-	    res.y_resolution = 75;
-	else
-	    res.y_resolution = 100;
-	res.point_size = 120;
-	*num = 1;
-	return &res;
-    }
+    pScreen = screenInfo.screens[0];
+    res.x_resolution = (pScreen->width * 25.4) / pScreen->mmWidth;
+    /*
+     * XXX - we'll want this as long as bitmap instances are prevalent 
+     so that we can match them from scalable fonts
+     */
+    if (res.x_resolution < 88)
+	res.x_resolution = 75;
+    else
+	res.x_resolution = 100;
+    res.y_resolution = (pScreen->height * 25.4) / pScreen->mmHeight;
+    if (res.y_resolution < 88)
+	res.y_resolution = 75;
+    else
+	res.y_resolution = 100;
+    res.point_size = 120;
+    *num = 1;
+    return &res;
 }
 
 /*
diff --git a/dix/globals.c b/dix/globals.c
index 7f95eab..2fb7ba0 100644
--- a/dix/globals.c
+++ b/dix/globals.c
@@ -143,9 +143,6 @@ Bool loadableFonts = FALSE;
 CursorPtr rootCursor;
 Bool blackRoot=FALSE;
 Bool whiteRoot=FALSE;
-#ifdef XPRINT
-ClientPtr requestingClient;	/* XXX this should be obsolete now, remove? */
-#endif
 
 _X_EXPORT TimeStamp currentTime;
 _X_EXPORT TimeStamp lastDeviceEventTime;
diff --git a/dix/main.c b/dix/main.c
index fbd6413..8bdfb5b 100644
--- a/dix/main.c
+++ b/dix/main.c
@@ -103,9 +103,6 @@ Equipment Corporation.
 #include "extnsionst.h"
 #include "privates.h"
 #include "registry.h"
-#ifdef XPRINT
-#include "DiPrint.h"
-#endif
 #ifdef PANORAMIX
 #include "panoramiXsrv.h"
 #else
@@ -251,9 +248,6 @@ int main(int argc, char *argv[], char *envp[])
 
     InitGlobals();
     InitRegions();
-#ifdef XPRINT
-    PrinterInitGlobals();
-#endif
 
     CheckUserParameters(argc, argv, envp);
 
@@ -348,9 +342,6 @@ int 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/dix/xpstubs.c b/dix/xpstubs.c
index 59340ad..f8cd207 100644
--- a/dix/xpstubs.c
+++ b/dix/xpstubs.c
@@ -31,12 +31,8 @@ from The Open Group.
 
 #include "misc.h"
 #include <X11/fonts/font.h>
-#ifdef XPRINT
-#include "DiPrint.h"
-#else
 extern Bool XpClientIsBitmapClient(ClientPtr client);
 extern Bool XpClientIsPrintClient(ClientPtr client, FontPathElementPtr fpe);
-#endif
 
 Bool
 XpClientIsBitmapClient(
@@ -52,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/hw/Makefile.am b/hw/Makefile.am
index c2b9571..4589b7e 100644
--- a/hw/Makefile.am
+++ b/hw/Makefile.am
@@ -26,10 +26,6 @@ if KDRIVE
 KDRIVE_SUBDIRS = kdrive
 endif
 
-if XPRINT
-XPRINT_SUBDIRS = xprint
-endif
-
 if XQUARTZ
 XQUARTZ_SUBDIRS = xquartz
 endif
@@ -42,10 +38,9 @@ SUBDIRS =			\
 	$(XNEST_SUBDIRS)	\
 	$(DMX_SUBDIRS)		\
 	$(KDRIVE_SUBDIRS)	\
-	$(XQUARTZ_SUBDIRS)	\
-	$(XPRINT_SUBDIRS)
+	$(XQUARTZ_SUBDIRS)
 
-DIST_SUBDIRS = dmx xfree86 vfb xnest xwin xquartz kdrive xgl xprint
+DIST_SUBDIRS = dmx xfree86 vfb xnest xwin xquartz kdrive xgl
 
 relink:
 	for i in $(SUBDIRS) ; do $(MAKE) -C $$i relink ; done
diff --git a/hw/xnest/Font.c b/hw/xnest/Font.c
index 9f30085..26faf16 100644
--- a/hw/xnest/Font.c
+++ b/hw/xnest/Font.c
@@ -44,11 +44,6 @@ xnestRealizeFont(ScreenPtr pScreen, FontPtr pFont)
 
   FontSetPrivate(pFont, xnestFontPrivateIndex, NULL);
 
-#ifdef XPRINT
-  if (requestingClient && XpClientIsPrintClient(requestingClient, NULL))
-      return True;
-#endif
-
   name_atom = MakeAtom("FONT", 4, True);
   value_atom = 0L;
 
diff --git a/hw/xprint/AttrValid.c b/hw/xprint/AttrValid.c
deleted file mode 100644
index f8c292f..0000000
--- a/hw/xprint/AttrValid.c
+++ /dev/null
@@ -1,701 +0,0 @@
-/*
-(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.
-*/
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#include <scrnintstr.h>
-
-#include "attributes.h"
-
-/*
- * default medium-source-sizes supported = na-letter w/.25" margins
- */
-static XpOidMediumDiscreteSize DefaultMediumSize = {
-    xpoid_val_medium_size_na_letter, xFalse, {6.35, 209.55, 6.35, 273.05}
-};
-static XpOidMediumDiscreteSizeList DefaultMediumSizeList = {
-    &DefaultMediumSize, 1
-};
-static XpOidMediumSourceSize DefaultMediumSourceSize = {
-    xpoid_unspecified, XpOidMediumSS_DISCRETE, { &DefaultMediumSizeList }
-};
-static XpOidMediumSS DefaultMediumSS = {
-    &DefaultMediumSourceSize, 1
-};
-
-/*
- * if 'valid_oid_list' is NULL any oid found is considered valid
- */
-XpOid
-XpGetOidAttr(XpContextPtr pContext,
-	     XPAttributes pool,
-	     XpOid oid,
-	     const XpOidList* valid_oid_list)
-{
-    XpOid value_oid;
-
-    value_oid = XpOidFromString(XpGetStringAttr(pContext, pool, oid));
-    if((const XpOidList*)NULL == valid_oid_list
-       ||
-       XpOidListHasOid(valid_oid_list, value_oid))
-    {
-	return value_oid;
-    }
-    else
-    {
-	return xpoid_none;
-    }
-}
-
-void
-XpPutOidAttr(XpContextPtr pContext,
-	     XPAttributes pool,
-	     XpOid oid,
-	     XpOid value_oid)
-{
-    XpPutStringAttr(pContext, pool, oid, XpOidString(value_oid));
-}
-
-void
-XpValidateOidAttr(XpContextPtr pContext,
-		  XPAttributes pool,
-		  XpOid oid,
-		  const XpOidList* valid_oids,
-		  XpOid default_oid)
-{
-    XpOid value_oid;
-    value_oid = XpGetOidAttr(pContext, pool, oid, valid_oids);
-    XpPutOidAttr(pContext, pool, oid,
-		 value_oid == xpoid_none ? default_oid : value_oid);
-}
-
-/*
- * if 'valid_card_list' is NULL any cardinal found is considered valid
- */
-unsigned long
-XpGetCardAttr(XpContextPtr pContext,
-	      XPAttributes pool,
-	      XpOid oid,
-	      const XpOidCardList* valid_card_list)
-{
-    unsigned long value_card;
-
-    if(XpOidParseUnsignedValue(XpGetStringAttr(pContext, pool, oid),
-			       (const char**)NULL,
-			       &value_card))
-    {
-	if((const XpOidCardList*)NULL == valid_card_list
-	   ||
-	   XpOidCardListHasCard(valid_card_list, value_card))
-	{
-	    return value_card;
-	}
-    }
-    return 0;
-}
-
-void
-XpPutCardAttr(XpContextPtr pContext,
-	      XPAttributes pool,
-	      XpOid oid,
-	      unsigned long value_card)
-{
-    if(value_card > 0)
-    {
-	char value_out[16];
-	sprintf(value_out, "%lu", value_card);
-	XpPutStringAttr(pContext, pool, oid, value_out);
-    }
-    else
-	XpPutStringAttr(pContext, pool, oid, (const char*)NULL);
-}
-
-void
-XpValidateCardAttr(XpContextPtr pContext,
-		   XPAttributes pool,
-		   XpOid oid,
-		   const XpOidCardList* valid_cards,
-		   unsigned long default_card)
-{
-    unsigned long value_card;
-    value_card = XpGetCardAttr(pContext, pool, oid, valid_cards);
-    XpPutCardAttr(pContext, pool, oid,
-		  value_card == 0 ? default_card : value_card);
-}
-
-XpOidList*
-XpGetListAttr(XpContextPtr pContext,
-	      XPAttributes pool,
-	      XpOid oid,
-	      const XpOidList* valid_oid_list)
-{
-    return XpOidListNew(XpGetStringAttr(pContext, pool, oid), valid_oid_list);
-}
-
-void
-XpPutListAttr(XpContextPtr pContext,
-	      XPAttributes pool,
-	      XpOid oid,
-	      const XpOidList* list)
-{
-    char* value_out;
-
-    value_out = XpOidListString(list);
-    XpPutStringAttr(pContext, pool, oid, value_out);
-    XpOidFree(value_out);
-}
-
-void
-XpValidateListAttr(XpContextPtr pContext,
-		   XPAttributes pool,
-		   XpOid oid,
-		   const XpOidList* valid_oids,
-		   const XpOidList* default_oids)
-{
-    XpOidList* list = XpGetListAttr(pContext, pool, oid, valid_oids);
-    if(XpOidListCount(list) == 0)
-	XpPutListAttr(pContext, pool, oid, default_oids);
-    else
-	XpPutListAttr(pContext, pool, oid, list);
-    XpOidListDelete(list);
-}
-
-XpOidCardList*
-XpGetCardListAttr(XpContextPtr pContext,
-		  XPAttributes pool,
-		  XpOid oid,
-		  const XpOidCardList* valid_card_list)
-{
-    return XpOidCardListNew(XpGetStringAttr(pContext, pool, oid),
-			    valid_card_list);
-}
-
-void
-XpPutCardListAttr(XpContextPtr pContext,
-		  XPAttributes pool,
-		  XpOid oid,
-		  const XpOidCardList* list)
-{
-    char* value_out;
-
-    value_out = XpOidCardListString(list);
-    XpPutStringAttr(pContext, pool, oid, value_out);
-    XpOidFree(value_out);
-}
-
-void
-XpValidateCardListAttr(XpContextPtr pContext,
-		       XPAttributes pool,
-		       XpOid oid,
-		       const XpOidCardList* valid_cards,
-		       const XpOidCardList* default_cards)
-{
-    XpOidCardList* list = XpGetCardListAttr(pContext, pool, oid, valid_cards);
-    if(XpOidCardListCount(list) == 0 && (XpOidCardList*)NULL != default_cards)
-	XpPutCardListAttr(pContext, pool, oid, default_cards);
-    else
-	XpPutCardListAttr(pContext, pool, oid, list);
-    XpOidCardListDelete(list);
-}
-
-XpOidDocFmtList*
-XpGetDocFmtListAttr(XpContextPtr pContext,
-		    XPAttributes pool,
-		    XpOid oid,
-		    const XpOidDocFmtList* valid_fmt_list)
-{
-    return XpOidDocFmtListNew(XpGetStringAttr(pContext, pool, oid),
-			      valid_fmt_list);
-}
-
-void
-XpPutDocFmtListAttr(XpContextPtr pContext,
-		    XPAttributes pool,
-		    XpOid oid,
-		    const XpOidDocFmtList* list)
-{
-    char* value_out;
-
-    value_out = XpOidDocFmtListString(list);
-    XpPutStringAttr(pContext, pool, oid, value_out);
-    XpOidFree(value_out);
-}
-
-void
-XpValidateDocFmtListAttr(XpContextPtr pContext,
-			 XPAttributes pool,
-			 XpOid oid,
-			 const XpOidDocFmtList* valid_fmts,
-			 const XpOidDocFmtList* default_fmts)
-{
-    XpOidDocFmtList* list;
-
-    list = XpGetDocFmtListAttr(pContext, pool, oid, valid_fmts);
-    if(XpOidDocFmtListCount(list) == 0
-       &&
-       (XpOidDocFmtList*)NULL != default_fmts)
-    {
-	XpPutDocFmtListAttr(pContext, pool, oid, default_fmts);
-    }
-    else
-    {
-	XpPutDocFmtListAttr(pContext, pool, oid, list);
-    }
-    XpOidDocFmtListDelete(list);
-}
-
-XpOidMediumSS*
-XpGetMediumSSAttr(XpContextPtr pContext,
-		  XPAttributes pool,
-		  XpOid oid,
-		  const XpOidList* valid_trays,
-		  const XpOidList* valid_sizes)
-{
-    return XpOidMediumSSNew(XpGetStringAttr(pContext, pool, oid),
-			    valid_trays, valid_sizes);
-}
-
-void
-XpPutMediumSSAttr(XpContextPtr pContext,
-		  XPAttributes pool,
-		  XpOid oid,
-		  const XpOidMediumSS* msss)
-{
-    char* value_out;
-
-    value_out = XpOidMediumSSString(msss);
-    XpPutStringAttr(pContext, pool, oid, value_out);
-    XpOidFree(value_out);
-}
-
-const XpOidMediumSS*
-XpGetDefaultMediumSS()
-{
-    return &DefaultMediumSS;
-}
-
-XpOidTrayMediumList*
-XpGetTrayMediumListAttr(XpContextPtr pContext,
-			XPAttributes pool,
-			XpOid oid,
-			const XpOidList* valid_trays,
-			const XpOidMediumSS* msss)
-{
-    return XpOidTrayMediumListNew(XpGetStringAttr(pContext, pool, oid),
-				  valid_trays, msss);
-}
-
-void
-XpPutTrayMediumListAttr(XpContextPtr pContext,
-			XPAttributes pool,
-			XpOid oid,
-			const XpOidTrayMediumList* tm)
-{
-    char* value_out;
-
-    value_out = XpOidTrayMediumListString(tm);
-    XpPutStringAttr(pContext, pool, oid, value_out);
-    XpOidFree(value_out);
-}
-
-void
-XpValidatePrinterMediaAttrs(XpContextPtr pContext,
-			    const XpOidList* valid_trays,
-			    const XpOidList* valid_sizes)
-{
-    const XpOidMediumSS* msss;
-    XpOidMediumSS* pool_msss;
-    XpOidTrayMediumList* tm;
-
-    pool_msss = XpGetMediumSSAttr(pContext, XPPrinterAttr,
-				  xpoid_att_medium_source_sizes_supported,
-				  valid_trays, valid_sizes);
-    if(0 == XpOidMediumSSCount(pool_msss))
-	msss = XpGetDefaultMediumSS();
-    else
-	msss = pool_msss;
-    XpPutMediumSSAttr(pContext, XPPrinterAttr,
-		      xpoid_att_medium_source_sizes_supported, msss);
-
-    tm = XpGetTrayMediumListAttr(pContext, XPPrinterAttr,
-				 xpoid_att_input_trays_medium,
-				 valid_trays, msss);
-    XpPutTrayMediumListAttr(pContext, XPPrinterAttr,
-			    xpoid_att_input_trays_medium, tm);
-    
-    XpOidMediumSSDelete(pool_msss);
-    XpOidTrayMediumListDelete(tm);
-}
-
-
-void
-XpValidatePrinterPool(XpContextPtr pContext,
-		      const XpValidatePoolsRec* vpr)
-{
-    /*
-     * content-orientations-supported
-     */
-    XpValidateListAttr(pContext, XPPrinterAttr,
-		       xpoid_att_content_orientations_supported,
-		       vpr->valid_content_orientations_supported,
-		       vpr->default_content_orientations_supported);
-    /*
-     * document-formats-supported
-     */
-    XpValidateDocFmtListAttr(pContext, XPPrinterAttr,
-			     xpoid_att_document_formats_supported,
-			     vpr->valid_document_formats_supported,
-			     vpr->default_document_formats_supported);
-    /*
-     * plexes-supported
-     */
-    XpValidateListAttr(pContext, XPPrinterAttr, xpoid_att_plexes_supported,
-		       vpr->valid_plexes_supported,
-		       vpr->default_plexes_supported);
-    /*
-     * printer-resolutions-supported
-     */
-    XpValidateCardListAttr(pContext, XPPrinterAttr,
-			   xpoid_att_printer_resolutions_supported,
-			   vpr->valid_printer_resolutions_supported,
-			   vpr->default_printer_resolutions_supported);
-    /*
-     * xp-embedded-formats-supported
-     */
-    XpValidateDocFmtListAttr(pContext, XPPrinterAttr,
-			     xpoid_att_xp_embedded_formats_supported,
-			     vpr->valid_xp_embedded_formats_supported,
-			     vpr->default_xp_embedded_formats_supported);
-    /*
-     * xp-listfonts-modes-supported
-     */
-    XpValidateListAttr(pContext, XPPrinterAttr,
-		       xpoid_att_xp_listfonts_modes_supported,
-		       vpr->valid_xp_listfonts_modes_supported,
-		       vpr->default_xp_listfonts_modes_supported);
-    /*
-     * xp-raw-formats-supported
-     */
-    XpValidateDocFmtListAttr(pContext, XPPrinterAttr,
-			     xpoid_att_xp_raw_formats_supported,
-			     vpr->valid_xp_raw_formats_supported,
-			     vpr->default_xp_raw_formats_supported);
-    /*
-     * xp-setup-proviso
-     */
-    XpValidateOidAttr(pContext, XPPrinterAttr, xpoid_att_xp_setup_proviso,
-		      vpr->valid_xp_setup_proviso, xpoid_none);
-    /*
-     * medium-source-sizes-supported
-     * input-trays-mdeium
-     */
-    XpValidatePrinterMediaAttrs(pContext,
-				vpr->valid_input_trays,
-				vpr->valid_medium_sizes);
-    /*
-     * available-compressions-supported
-     */
-    XpValidateListAttr(pContext, XPPrinterAttr,
-		       xpoid_att_available_compressions_supported,
-		       vpr->valid_available_compressions_supported,
-		       vpr->default_available_compressions_supported);
-}
-
-
-void
-XpValidateNotificationProfile(XpContextPtr pContext)
-{
-    const char* value_in;
-    const char* value_out;
-    
-    value_in = XpGetStringAttr(pContext, XPJobAttr,
-			       xpoid_att_notification_profile);
-    value_out = XpOidNotifyString(XpOidNotifyParse(value_in));
-    XpPutStringAttr(pContext, XPJobAttr,
-		    xpoid_att_notification_profile, value_out);
-}
-
-void
-XpValidateJobPool(XpContextPtr pContext,
-		  const XpValidatePoolsRec* vpr)
-{
-    /*
-     * Note: the 'vpr' argument is unused in this
-     *       implementation; it is reserved for future use
-     */
-    XpOidList* job_attrs_supported;
-    /*
-     * only validate attributes found in job-attributes-supported
-     */
-    job_attrs_supported = XpGetListAttr(pContext, XPPrinterAttr,
-					xpoid_att_job_attributes_supported,
-					(const XpOidList*)NULL);
-    /*
-     * notification-profile
-     */
-    if(XpOidListHasOid(job_attrs_supported, xpoid_att_notification_profile))
-    {
-	XpValidateNotificationProfile(pContext);
-    }
-    /*
-     * clean up
-     */
-    XpOidListDelete(job_attrs_supported);
-}
-
-
-static void
-XpValidateDocOrPagePool(XpContextPtr pContext,
-			XPAttributes pool, /* XPDocAttr or XPPageAttr */
-			const XpOidList* attrs_supported,
-			const XpValidatePoolsRec* vpr)
-{
-    /*
-     * content-orientation
-     */
-    if(XpOidListHasOid(attrs_supported, xpoid_att_content_orientation))
-    {
-	XpOidList* content_orientations_supported;
-	content_orientations_supported =
-	    XpGetListAttr(pContext, XPPrinterAttr,
-			  xpoid_att_content_orientations_supported,
-			  vpr->valid_content_orientations_supported);
-	XpValidateOidAttr(pContext, pool, xpoid_att_content_orientation,
-			  content_orientations_supported, xpoid_none);
-	XpOidListDelete(content_orientations_supported);
-    }
-    /*
-     * copy-count
-     */
-    if(XpOidListHasOid(attrs_supported, xpoid_att_copy_count))
-	XpValidateCardAttr(pContext, pool, xpoid_att_copy_count,
-			   (const XpOidCardList*)NULL, 0);
-    /*
-     * default-printer-resolution
-     */
-    if(XpOidListHasOid(attrs_supported, xpoid_att_default_printer_resolution))
-    {
-	XpOidCardList* printer_resolutions_supported;
-	printer_resolutions_supported =
-	    XpGetCardListAttr(pContext, XPPrinterAttr,
-			      xpoid_att_printer_resolutions_supported,
-			      vpr->valid_printer_resolutions_supported);
-	XpValidateCardAttr(pContext, pool,
-			   xpoid_att_default_printer_resolution,
-			   printer_resolutions_supported, 0);
-	XpOidCardListDelete(printer_resolutions_supported);
-    }
-    /*
-     * default-input-tray
-     */
-    if(XpOidListHasOid(attrs_supported, xpoid_att_default_input_tray))
-    {
-	XpOidTrayMediumList* input_trays_medium;
-	const char* value_in;
-	XpOid value_tray;
-	
-	input_trays_medium =
-	    XpGetTrayMediumListAttr(pContext, XPPrinterAttr,
-				    xpoid_att_input_trays_medium,
-				    (const XpOidList*)NULL,
-				    (const XpOidMediumSS*)NULL);
-	value_in =
-	    XpGetStringAttr(pContext, pool, xpoid_att_default_input_tray);
-	value_tray = XpOidFromString(value_in);
-	if(!XpOidTrayMediumListHasTray(input_trays_medium, value_tray))
-	    value_tray = xpoid_none;
-	XpPutOidAttr(pContext, pool, xpoid_att_default_input_tray, value_tray);
-	XpOidTrayMediumListDelete(input_trays_medium);
-    }
-    /*
-     * default-medium
-     */
-    if(XpOidListHasOid(attrs_supported, xpoid_att_default_medium))
-    {
-	XpOidMediumSS* msss;
-	const char* value_in;
-	XpOid value_size;
-	
-	msss = XpGetMediumSSAttr(pContext, XPPrinterAttr,
-				 xpoid_att_medium_source_sizes_supported,
-				 (const XpOidList*)NULL,
-				 (const XpOidList*)NULL);
-	value_in = XpGetStringAttr(pContext, pool, xpoid_att_default_medium);
-	value_size = XpOidFromString(value_in);
-	if(!XpOidMediumSSHasSize(msss, value_size))
-	    value_size = xpoid_none;
-	XpPutOidAttr(pContext, pool, xpoid_att_default_medium, value_size);
-	XpOidMediumSSDelete(msss);
-    }
-    /*
-     * document-format
-     */
-    if(XpOidListHasOid(attrs_supported, xpoid_att_document_format))
-    {
-	XpOidDocFmtList* document_formats_supported;
-	const char* value_in;
-	XpOidDocFmt* document_format;
-	const char* value_out;
-	
-	document_formats_supported =
-	    XpGetDocFmtListAttr(pContext, XPPrinterAttr,
-				xpoid_att_document_formats_supported,
-				vpr->valid_document_formats_supported);
-	value_in = XpGetStringAttr(pContext, pool, xpoid_att_document_format);
-	document_format = XpOidDocFmtNew(value_in);
-	if(XpOidDocFmtListHasFmt(document_formats_supported, document_format))
-	    value_out = XpOidDocFmtString(document_format);
-	else
-	    value_out = XpOidDocFmtString(vpr->default_document_format);
-	XpOidDocFmtListDelete(document_formats_supported);
-	XpOidDocFmtDelete(document_format);
-	XpPutStringAttr(pContext, pool, xpoid_att_document_format, value_out);
-	XpOidFree(value_out);
-    }
-    /*
-     * plex
-     */
-    if(XpOidListHasOid(attrs_supported, xpoid_att_plex))
-    {
-	XpOidList* plexes_supported;
-	plexes_supported =
-	    XpGetListAttr(pContext, XPPrinterAttr, xpoid_att_plexes_supported,
-			  vpr->valid_plexes_supported);
-	XpValidateOidAttr(pContext, pool, xpoid_att_plex,
-			  plexes_supported, xpoid_none);
-	XpOidListDelete(plexes_supported);
-    }
-    /*
-     * xp-listfonts-modes
-     */
-    if(XpOidListHasOid(attrs_supported, xpoid_att_xp_listfonts_modes))
-    {
-	XpOidList* xp_listfonts_modes_supported;
-	xp_listfonts_modes_supported =
-	    XpGetListAttr(pContext, XPPrinterAttr,
-			  xpoid_att_xp_listfonts_modes_supported,
-			  vpr->valid_xp_listfonts_modes_supported);
-	XpValidateListAttr(pContext, pool, xpoid_att_xp_listfonts_modes,
-			   xp_listfonts_modes_supported,
-			   (const XpOidList*)NULL);
-	XpOidListDelete(xp_listfonts_modes_supported);
-    }
-    /*
-     * available-compressions
-     */
-    if(XpOidListHasOid(attrs_supported, xpoid_att_available_compression))
-    {
-	XpOidList* available_compressions_supported;
-	available_compressions_supported =
-	    XpGetListAttr(pContext, XPPrinterAttr,
-			  xpoid_att_available_compressions_supported,
-			  vpr->valid_available_compressions_supported);
-	XpValidateOidAttr(pContext, pool, xpoid_att_available_compression,
-			  available_compressions_supported, xpoid_none);
-	XpOidListDelete(available_compressions_supported);
-    }
-}
-
-void
-XpValidateDocumentPool(XpContextPtr pContext,
-		       const XpValidatePoolsRec* vpr)
-{
-    XpOidList* document_attrs_supported;
-    /*
-     * only validate attributes found in document-attributes-supported
-     */
-    document_attrs_supported =
-	XpGetListAttr(pContext, XPPrinterAttr,
-		      xpoid_att_document_attributes_supported,
-		      (const XpOidList*)NULL);
-    /*
-     * validate
-     */
-    XpValidateDocOrPagePool(pContext, XPDocAttr,
-			    document_attrs_supported, vpr);
-    /*
-     * clean up
-     */
-    XpOidListDelete(document_attrs_supported);
-}
-
-void
-XpValidatePagePool(XpContextPtr pContext,
-		   const XpValidatePoolsRec* vpr)
-{
-    XpOidList* page_attrs_supported;
-    /*
-     * only validate attributes found in xp-page-attributes-supported
-     */
-    page_attrs_supported =
-	XpGetListAttr(pContext, XPPrinterAttr,
-		      xpoid_att_xp_page_attributes_supported,
-		      (const XpOidList*)NULL);
-    /*
-     * validate
-     */
-    XpValidateDocOrPagePool(pContext, XPPageAttr,
-			    page_attrs_supported, vpr);
-    /*
-     * clean up
-     */
-    XpOidListDelete(page_attrs_supported);
-}
-
-void
-XpValidateAttributePool(XpContextPtr pContext,
-			XPAttributes pool,
-			const XpValidatePoolsRec* vpr)
-{
-    switch(pool)
-    {
-    case XPPrinterAttr:
-	XpValidatePrinterPool(pContext, vpr);
-	break;
-
-    case XPDocAttr:
-	XpValidateDocumentPool(pContext, vpr);
-	break;
-
-    case XPJobAttr:
-	XpValidateJobPool(pContext, vpr);
-	break;
-
-    case XPPageAttr:
-	XpValidatePagePool(pContext, vpr);
-	break;
-
-    default:
-	break;
-    }
-}
diff --git a/hw/xprint/AttrValid.h b/hw/xprint/AttrValid.h
deleted file mode 100644
index 7bb7ce1..0000000
--- a/hw/xprint/AttrValid.h
+++ /dev/null
@@ -1,219 +0,0 @@
-/*
-(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.
-*/
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#ifndef _Xp_AttrValid_h
-#define _Xp_AttrValid_h
-
-#include <X11/extensions/Printstr.h>
-#include "Oid.h"
-
-#define XpNumber(a) (sizeof(a) / sizeof(*(a)))
-
-/*
- * Attribute pool validation valid values and defaults
- */
-typedef struct
-{
-    XpOidList* valid_content_orientations_supported;
-    XpOidList* default_content_orientations_supported;
-
-    XpOidDocFmtList* valid_document_formats_supported;
-    XpOidDocFmtList* default_document_formats_supported;
-
-    XpOidList* valid_input_trays;
-    XpOidList* valid_medium_sizes;
-
-    XpOidList* valid_plexes_supported;
-    XpOidList* default_plexes_supported;
-
-    XpOidCardList* valid_printer_resolutions_supported;
-    XpOidCardList* default_printer_resolutions_supported;
-    
-    XpOidDocFmtList* valid_xp_embedded_formats_supported;
-    XpOidDocFmtList* default_xp_embedded_formats_supported;
-
-    XpOidList* valid_xp_listfonts_modes_supported;
-    XpOidList* default_xp_listfonts_modes_supported;
-
-    XpOidDocFmtList* valid_xp_raw_formats_supported;
-    XpOidDocFmtList* default_xp_raw_formats_supported;
-
-    XpOidList* valid_xp_setup_proviso;
-
-    XpOidDocFmt* default_document_format;
-    XpOidList* valid_available_compressions_supported;
-    XpOidList* default_available_compressions_supported;
-    
-} XpValidatePoolsRec;
-
-/*
- * XpOid resource access
- */
-#define XpGetStringAttr(pContext, pool, oid) \
-    (const char*)XpGetOneAttribute(pContext, pool, (char*)XpOidString(oid))
-#define XpPutStringAttr(pContext, pool, oid, value) \
-    XpPutOneAttribute(pContext, pool, XpOidString(oid), value)
-
-#ifdef _XP_PRINT_SERVER_       /* needed for XpContextPtr in Printstr.h */
-
-/*
- * XpOid-valued attribute access
- */
-XpOid XpGetOidAttr(XpContextPtr pContext,
-		   XPAttributes pool,
-		   XpOid oid,
-		   const XpOidList* valid_oid_list);
-void XpPutOidAttr(XpContextPtr pContext,
-		  XPAttributes pool,
-		  XpOid oid,
-		  XpOid value_oid);
-void XpValidateOidAttr(XpContextPtr pContext,
-		       XPAttributes pool,
-		       XpOid oid,
-		       const XpOidList* valid_oids,
-		       XpOid default_oid);
-/*
- * cardinal-valued attribute access
- */
-unsigned long XpGetCardAttr(XpContextPtr pContext,
-			    XPAttributes pool,
-			    XpOid oid,
-			    const XpOidCardList* valid_card_list);
-void XpPutCardAttr(XpContextPtr pContext,
-		   XPAttributes pool,
-		   XpOid oid,
-		   unsigned long value_card);
-void XpValidateCardAttr(XpContextPtr pContext,
-			XPAttributes pool,
-			XpOid oid,
-			const XpOidCardList* valid_cards,
-			unsigned long default_card);
-/*
- * XpOidList-valued attribute access
- */
-XpOidList* XpGetListAttr(XpContextPtr pContext,
-			 XPAttributes pool,
-			 XpOid oid,
-			 const XpOidList* valid_oid_list);
-void XpPutListAttr(XpContextPtr pContext,
-		   XPAttributes pool,
-		   XpOid oid,
-		   const XpOidList* list);
-void XpValidateListAttr(XpContextPtr pContext,
-			XPAttributes pool,
-			XpOid oid,
-			const XpOidList* valid_oids,
-			const XpOidList* default_oids);
-/*
- * XpOidCardList-valued attribute access
- */
-XpOidCardList* XpGetCardListAttr(XpContextPtr pContext,
-				 XPAttributes pool,
-				 XpOid oid,
-				 const XpOidCardList* valid_card_list);
-void XpPutCardListAttr(XpContextPtr pContext,
-		       XPAttributes pool,
-		       XpOid oid,
-		       const XpOidCardList* list);
-void XpValidateCardListAttr(XpContextPtr pContext,
-			    XPAttributes pool,
-			    XpOid oid,
-			    const XpOidCardList* valid_cards,
-			    const XpOidCardList* default_cards);
-/*
- * XpOidDocFmtList-valued attribute access
- */
-XpOidDocFmtList* XpGetDocFmtListAttr(XpContextPtr pContext,
-				     XPAttributes pool,
-				     XpOid oid,
-				     const XpOidDocFmtList* valid_fmt_list);
-void XpPutDocFmtListAttr(XpContextPtr pContext,
-			 XPAttributes pool,
-			 XpOid oid,
-			 const XpOidDocFmtList* list);
-void XpValidateDocFmtListAttr(XpContextPtr pContext,
-			      XPAttributes pool,
-			      XpOid oid,
-			      const XpOidDocFmtList* valid_fmts,
-			      const XpOidDocFmtList* default_fmts);
-/*
- * XpOidMediumSS-valued attribute access
- */
-XpOidMediumSS* XpGetMediumSSAttr(XpContextPtr pContext,
-				 XPAttributes pool,
-				 XpOid oid,
-				 const XpOidList* valid_trays,
-				 const XpOidList* valid_sizes);
-void XpPutMediumSSAttr(XpContextPtr pContext,
-		       XPAttributes pool,
-		       XpOid oid,
-		       const XpOidMediumSS* msss);
-const XpOidMediumSS* XpGetDefaultMediumSS(void);
-
-/*
- * XpOidTrayMediumList-valued attribute access
- */
-XpOidTrayMediumList* XpGetTrayMediumListAttr(XpContextPtr pContext,
-					     XPAttributes pool,
-					     XpOid oid,
-					     const XpOidList* valid_trays,
-					     const XpOidMediumSS* msss);
-void XpPutTrayMediumListAttr(XpContextPtr pContext,
-			     XPAttributes pool,
-			     XpOid oid,
-			     const XpOidTrayMediumList* tm);
-void XpValidatePrinterMediaAttrs(XpContextPtr pContext,
-				 const XpOidList* valid_trays,
-				 const XpOidList* valid_sizes);
-/*
- * Attribute pool validation
- */
-void XpValidateAttributePool(XpContextPtr pContext,
-			     XPAttributes pool,
-			     const XpValidatePoolsRec* vpr);
-void XpValidatePrinterPool(XpContextPtr pContext,
-			   const XpValidatePoolsRec* vpr);
-void XpValidateNotificationProfile(XpContextPtr pContext);
-void XpValidateJobPool(XpContextPtr pContext,
-		       const XpValidatePoolsRec* vpr);
-void XpValidateDocumentPool(XpContextPtr pContext,
-			    const XpValidatePoolsRec* vpr);
-void XpValidatePagePool(XpContextPtr pContext,
-			const XpValidatePoolsRec* vpr);
-
-#endif /* _XP_PRINT_SERVER_ */
-
-#endif /* _Xp_AttrValid_h - don't add anything after this line */
diff --git a/hw/xprint/DiPrint.h b/hw/xprint/DiPrint.h
deleted file mode 100644
index 22cbf0d..0000000
--- a/hw/xprint/DiPrint.h
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
-(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.
-*/
-/*
- * The XpDiListEntry struct is the type of each element of the array
- * handed back to the extension code to handle a GetPrinterList request.
- * We don't use the printerDb directly because of the desire to handle
- * multiple locales.  Creating this new array for each GetPrinterList
- * request will allow us to build it with the description in the locale of
- * the requesting client.
- */
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-#include <X11/fonts/fontstruct.h>
-
-#ifndef _XpDiPrint_H_
-#define _XpDiPrint_H_ 1
-
-#include "scrnintstr.h"
-
-typedef struct _diListEntry {
-    char *name;
-    char *description;
-    char *localeName;
-    unsigned long rootWinId;
-} XpDiListEntry;
-
-extern void XpDiFreePrinterList(XpDiListEntry **list);
-
-extern XpDiListEntry **XpDiGetPrinterList(
-    int nameLen,
-    char *name,
-    int localeLen,
-    char *locale);
-
-extern char * XpDiGetDriverName(int index, char *printerName);
-
-extern WindowPtr XpDiValidatePrinter(char *printerName, int printerNameLen);
-
-extern int PrinterOptions(int argc, char **argv, int i);
-
-extern void PrinterUseMsg(void);
-
-extern void PrinterInitGlobals(void);
-
-extern void PrinterInitOutput(ScreenInfo *pScreenInfo, int argc, char **argv);
-
-extern Bool XpClientIsPrintClient(ClientPtr client, FontPathElementPtr fpe);
-
-extern Bool XpClientIsBitmapClient(ClientPtr client);
-
-extern void _XpVoidNoop(void);
-
-extern Bool _XpBoolNoop(void);
-
-#endif /* _XpDiPrint_H_ */
diff --git a/hw/xprint/Init.c b/hw/xprint/Init.c
deleted file mode 100644
index 69100d3..0000000
--- a/hw/xprint/Init.c
+++ /dev/null
@@ -1,1920 +0,0 @@
-/*
-(c) Copyright 1996 Hewlett-Packard Company
-(c) Copyright 1996 International Business Machines Corp.
-(c) Copyright 1996-2004 Sun Microsystems, Inc.
-(c) Copyright 1996 Novell, Inc.
-(c) Copyright 1996 Digital Equipment Corp.
-(c) Copyright 1996 Fujitsu Limited
-(c) Copyright 1996 Hitachi, Ltd.
-(c) Copyright 2003-2004 Roland Mainz <roland.mainz at nrubsig.org>
-
-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:		printer/Init.c
-**    *
-**    *  Contents:
-**    *                 The InitOutput routine here would presumably
-**    *                 be called from the normal server's InitOutput
-**    *                 after all display screens have been added.
-**    *                 There is are ifdef'd routines suitable for
-**    *                 use in building a printer-only server.  Turn
-**    *                 on the "PRINTER_ONLY_SERVER" define if this is
-**    *                 to be the only ddx-level driver.
-**    *
-**    *  Copyright:	Copyright 1993,1995 Hewlett-Packard Company
-**    *
-**    *********************************************************
-** 
-********************************************************************/
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#include <unistd.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <ctype.h>
-#include <signal.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <string.h>
-#include <locale.h>
-#ifdef __hpux
-#include <sys/sysmacros.h>
-#endif
-
-#include <X11/X.h>
-#define NEED_EVENTS 1
-#include <X11/Xproto.h>
-#include <servermd.h>
-
-#include "screenint.h"
-#include "input.h"
-#include "cursor.h"
-#include "misc.h"
-#include "windowstr.h"
-#include "inputstr.h"
-
-#include "gcstruct.h"
-#include <X11/fonts/fontstruct.h>
-#include "errno.h"
-
-typedef char *XPointer;
-#define HAVE_XPointer 1
-
-#define Status int
-#include <X11/Xresource.h>
-
-#include "DiPrint.h"
-#include "attributes.h"
-
-#include "os.h"
-#include "spooler.h"
-
-static void GenericScreenInit(
-    int index,
-    ScreenPtr pScreen,
-    int argc,
-    char **argv);
-static Bool InitPrintDrivers(
-    int index,
-    ScreenPtr pScreen,
-    int argc,
-    char **argv);
-
-/*
- * The following two defines are used to build the name "X*printers", where
- * the "*" is replaced by the display number.  This is used to construct
- * the name of the default printers configuration file if the -XpFile
- * command line option was not specified.
- */
-#define XNPRINTERSFILEPREFIX "/X"
-#define XNPRINTERSFILESUFFIX "printers"
-#define XPRINTERSFILENAME "Xprinters"
-
-#define MODELDIRNAME "/models"
-#define FONTDIRNAME "/fonts"
-
-#ifdef XPRASTERDDX
-
-static
-PixmapFormatRec	RasterPixmapFormats[] = {
-    { 1, 1, BITMAP_SCANLINE_PAD }
-};
-#define NUMRASTFORMATS	(sizeof RasterPixmapFormats)/(sizeof RasterPixmapFormats[0])
-
-#include "raster/Raster.h"
-
-#endif
-
-#ifdef XPPCLDDX
-
-static
-PixmapFormatRec	ColorPclPixmapFormats[] = {
-    {  1,  1, BITMAP_SCANLINE_PAD },
-    {  8,  8, BITMAP_SCANLINE_PAD },
-    { 24, 32, BITMAP_SCANLINE_PAD }
-};
-
-#define NUMCPCLFORMATS	(sizeof ColorPclPixmapFormats)/(sizeof ColorPclPixmapFormats[0])
-
-#endif
-
-#ifdef XPMONOPCLDDX
-
-static
-PixmapFormatRec	MonoPclPixmapFormats[] = {
-    { 1, 1, BITMAP_SCANLINE_PAD }
-};
-
-#define NUMMPCLFORMATS	(sizeof MonoPclPixmapFormats)/(sizeof MonoPclPixmapFormats[0])
-
-#endif
-
-#if defined(XPPCLDDX) || defined(XPMONOPCLDDX)
-#include "pcl/Pcl.h"
-#endif
-
-#ifdef XPPSDDX
-
-static
-PixmapFormatRec	PSPixmapFormats[] = {
-    {  1,  1, BITMAP_SCANLINE_PAD },
-    {  8,  8, BITMAP_SCANLINE_PAD },
-    { 12, 16, BITMAP_SCANLINE_PAD },
-    { 14, 16, BITMAP_SCANLINE_PAD },
-    { 16, 16, BITMAP_SCANLINE_PAD },
-    { 24, 32, BITMAP_SCANLINE_PAD }
-};
-
-#define NUMPSFORMATS	(sizeof PSPixmapFormats)/(sizeof PSPixmapFormats[0])
-
-#include "ps/Ps.h"
-
-#endif
-
-/*
- * The driverInitArray contains an entry for each driver the
- * server knows about. Each element contains pointers to pixmap formats, the
- * driver's initialization routine, and pointers to the driver's
- * attribute validation rec, and/or a driver function which 
- * returns the maximum medium width&height, and maximum resolution
- * given a printer name.  Either the validation rec OR the dimension
- * function can be NULL.  If the function is non-NULL then it
- * will be called, and will be passed the (possibly NULL) validation rec.
- * If the function is NULL, then XpGetMaxWidthHeightRes() is called.
- */
-typedef struct _driverInitRec {
-    char *driverName;
-    pBFunc initFunc;
-    XpValidatePoolsRec *pValRec;
-    pVFunc dimensionsFunc;
-    PixmapFormatRec *pFmts;
-    int numFmts;
-} driverInitRec;
-
-static driverInitRec driverInits[] = {
-#ifdef XPRASTERDDX
-    {
-	"XP-RASTER",
-	InitializeRasterDriver,
-	&RasterValidatePoolsRec,
-	(pVFunc) NULL,
-	RasterPixmapFormats,
-	NUMRASTFORMATS
-    },
-#endif
-#ifdef XPPCLDDX
-    {
-	"XP-PCL-COLOR",
-	InitializeColorPclDriver,
-	&PclValidatePoolsRec,
-	(pVFunc) NULL,
-	ColorPclPixmapFormats,
-	NUMCPCLFORMATS
-    },
-#endif
-#ifdef XPMONOPCLDDX
-    {
-	"XP-PCL-MONO",
-	InitializeMonoPclDriver,
-	&PclValidatePoolsRec,
-	(pVFunc) NULL,
-	MonoPclPixmapFormats,
-	NUMMPCLFORMATS
-    },
-#endif
-#ifdef XPPSDDX
-    {
-	"XP-POSTSCRIPT",
-	InitializePsDriver,
-	&PsValidatePoolsRec,
-	(pVFunc) NULL,
-	PSPixmapFormats,
-	NUMPSFORMATS
-    },
-#endif
-};
-    
-
-/*
- * The printerDb variable points to a list of PrinterDbEntry structs
- * which map printer names with screen numbers and driver names.
- */
-typedef struct _printerDbEntry {
-    struct _printerDbEntry *next;
-    char *name;
-    char *qualifier;
-    int screenNum;
-    char *driverName;
-    char *desc;
-} PrinterDbEntry, *PrinterDbPtr;
-
-static PrinterDbPtr printerDb = (PrinterDbPtr)NULL;
-
-/*
- * The nameMap is a list used in initializing the attribute store
- * for each printer.  The list is freed once the printerDb is built
- * and the attribute stores for all printers have been initialized.
- */
-typedef struct _nameMapEntry {
-    struct _nameMapEntry *next;
-    char *name;
-    char *qualifier;
-} NameMapEntry, *NameMapPtr;
-
-static NameMapPtr nameMap = (NameMapPtr)NULL;
-
-/*
- * The driverMap is a list which provides the mapping between driver names
- * and screen numbers. It is built and used 
- * by RehashPrinterList to correctly fill in the screenNum field in the
- * printerDb entries. The list is freed before RehashPrinterList terminates.
- */
-typedef struct _driverMapping {
-    struct _driverMapping *next;
-    char *driverName;
-    int screenNum;
-} DriverMapEntry, *DriverMapPtr;
-
-static const char configFilePath[] =
-"/etc/dt/config/print:/usr/dt/config/print";
-
-static const char printServerConfigDir[] = "XPSERVERCONFIGDIR";
-
-static char *configFileName = (char *)NULL;
-static Bool freeDefaultFontPath = FALSE;
-static char *origFontPath = (char *)NULL;
-
-static Bool xprintInitGlobalsCalled = FALSE;
-/*
- * This function is responsible for doing initalisation of any global
- * variables at an very early point of server startup (even before
- * |ProcessCommandLine()|. 
- */
-void PrinterInitGlobals(void)
-{
-    xprintInitGlobalsCalled = TRUE;
-
-#ifdef DAMAGE
-    /* Disable DAMAGE extension for now as it does not work with
-     * the Postscript DDX yet (see
-     * https://bugs.freedesktop.org/show_bug.cgi?id=1660) ...
-     * (you can enable the DAMAGE extension explicitly via
-     * % X +extension DAMAGE ... #) ;-( */
-    noDamageExtension = TRUE;
-#endif /* DAMAGE */
-
-#ifdef SMART_SCHEDULE
-    /* Somehow the XF86 "smart scheduler" completely kills the Xprint DDX 
-     * (see http://xprint.freedesktop.org/cgi-bin/bugzilla/show_bug.cgi?id=467
-     * ("Xfree86's "smart scheduler" breaks Xprt") */
-    SmartScheduleDisable = TRUE;
-#endif /* SMART_SCHEDULE */
-
-    /* Disable internal screensaver for Xprint (workaround for
-     * http://pdx.freedesktop.org/cgi-bin/bugzilla/show_bug.cgi?id=567 ("Xorg
-     * Xprt starts to consume 100% CPU when being idle for some time")) */
-    defaultScreenSaverTime = 0;
-    
-    /* Ensure that the maximum request size for the BIGREQUESTS extension
-     * is at least 8MB (see 
-     * http://xprint.freedesktop.org/cgi-bin/bugzilla/show_bug.cgi?id=622 - "RFE:
-     * Xprt's default BIGREQUESTS extension buffer size should be 8MB")
-     */
-    maxBigRequestSize = (8*1048576)-1;
-    
-    /* Xprt should not reset by default when the last client exists
-     * (default for Xprt is |0|, video Xservers use |DE_RESET|) */
-    dispatchExceptionAtReset = 0;
-}
-
-/*
- * PrinterUseMsg() prints usage for the Xprint-specific options
- */
-void PrinterUseMsg(void)
-{
-    XpSpoolerTypePtr curr = xpstm;
-
-    /* Option '-XpFile' */
-    ErrorF("-XpFile file           specifies an alternate `Xprinters' file, rather\n");
-    ErrorF("                       than the default one (e.g.\n");
-    ErrorF("                       `${XPCONFIGDIR}/${LANG}/print/Xprinters') or\n");
-    ErrorF("                       `${XPCONFIGDIR}/C/print/Xprinters'.\n");
-    
-    /* Option '-XpSpoolerType' */
-    ErrorF("-XpSpoolerType string  specifies a spooler type.\n");
-    ErrorF("                       Supported values are:\n");
-  
-    while( curr->name != NULL )
-    {
-        ErrorF("                       - '%s'\n", curr->name);       
-        curr++;
-    }
-    ErrorF("                       (multiple values can be specified, seperated by ':',\n");
-    ErrorF("                       the first active spooler will be chosen).\n");
-    ErrorF("                       default is '%s'.\n", XPDEFAULTSPOOLERNAMELIST);
-}
-
-/*
- * PrinterOptions checks argv[i] to see if it is our command line
- * option specifying a configuration file name.  It returns the index
- * of the next option to process.
- */
-int
-PrinterOptions(
-    int argc,
-    char **argv,
-    int i)
-{
-    if(strcmp(argv[i], "-XpFile") == 0)
-    {
-	if ((i + 1) >= argc) {
-	    ddxUseMsg ();
-	    return i + 2;
-	}
-	configFileName = argv[i + 1];
-	return i + 2;
-    }
-    else if(strcmp(argv[i], "-XpSpoolerType") == 0)
-    {
-	if ((i + 1) >= argc) {
-	    ddxUseMsg ();
-	    return i + 2;
-	}
-        XpSetSpoolerTypeNameList(argv[i + 1]);
-	return i + 2;
-    }
-    else
-    {
-	return i;
-    }
-}
-
-/************************************************************
- * GetInitFunc --
- *
- *      This routine is called from the InitPrintDrivers function.
- *      Given the name of a driver, return a pointer to the driver's
- *	initialization function.
- *
- * Results:
- *	Returns a pointer to the initialization function for the driver.
- * 
- *
- ************************************************************/
-
-/*
-typedef Bool (*pIFunc)();
-static pIFunc
-GetInitFunc(driverName)
-*/
-
-static pBFunc GetInitFunc(char *driverName)
-{
-    driverInitRec *pInitRec;
-    int numDrivers = sizeof(driverInits)/sizeof(driverInitRec);
-    int i;
-
-    for(pInitRec = driverInits, i = 0; i < numDrivers; pInitRec++, i++)
-    {
-        if( !strcmp( driverName, pInitRec->driverName ) )
-          return pInitRec->initFunc;
-    }
-
-    return 0;
-}
-
-static void
-GetDimFuncAndRec(
-    char *driverName, 
-    XpValidatePoolsRec **pValRec,
-    pVFunc *dimensionsFunc)
-{
-    driverInitRec *pInitRec;
-    int numDrivers = sizeof(driverInits)/sizeof(driverInitRec);
-    int i;
-
-    for(pInitRec = driverInits, i = 0; i < numDrivers; pInitRec++, i++)
-    {
-        if( !strcmp( driverName, pInitRec->driverName ) )
-	{
-	  *dimensionsFunc = pInitRec->dimensionsFunc;
-	  *pValRec = pInitRec->pValRec;
-          return ;
-	}
-    }
-
-    *dimensionsFunc = 0;
-    *pValRec = 0;
-    return;
-}
-
-static void
-FreePrinterDb(void)
-{
-    PrinterDbPtr pCurEntry, pNextEntry;
-
-    for(pCurEntry = printerDb, pNextEntry = (PrinterDbPtr)NULL; 
-	pCurEntry != (PrinterDbPtr)NULL; pCurEntry = pNextEntry)
-    {
-	pNextEntry = pCurEntry->next;
-	if(pCurEntry->name != (char *)NULL)
-	    xfree(pCurEntry->name);
-        if(pCurEntry->desc != (char *)NULL)
-            xfree(pCurEntry->desc);
-	/*
-	 * We don't free the driver name, because it's expected to simply
-	 * be a pointer into the xrm database.
-	 */
-	xfree(pCurEntry);
-    }
-    printerDb = (PrinterDbPtr)NULL;
-}
-
-/*
- * AddPrinterDbName allocates an entry in the printerDb list, and
- * initializes the "name".  It returns TRUE if the element was 
- * successfully added, and FALSE if an allocation error ocurred.
- * XXX AddPrinterDbName needs to check for (and not add) duplicate names.
- */
-static Bool
-AddPrinterDbName(char *name, char *desc)
-{
-    PrinterDbPtr pEntry = (PrinterDbPtr)xalloc(sizeof(PrinterDbEntry));
-
-    if(pEntry == (PrinterDbPtr)NULL) return FALSE;
-    pEntry->name = (name != NULL) ? strdup(name) : NULL;
-    pEntry->desc = (desc != NULL) ? strdup(desc) : NULL;
-    pEntry->qualifier = (char *)NULL;
-
-    if(printerDb == (PrinterDbPtr)NULL)
-    {
-	pEntry->next = (PrinterDbPtr)NULL;
-	printerDb = pEntry;
-    }
-    else
-    {
-	pEntry->next = printerDb;
-	printerDb = pEntry;
-    }
-    return TRUE;
-}
-
-static int
-AugmentPrinterDb(const char *command)
-{
-    FILE *fp;
-    char name[256];
-    int  num_printers = 0; /* Number of printers we found */
-    size_t namelen;
-    char *desc = NULL;
-
-    fp = popen(command, "r");
-    /* XXX is a 256 character limit overly restrictive for printer names? */
-    while(fgets(name, 256, fp) != (char *)NULL && (namelen=strlen(name)))
-    {
-        char *option = name;
-
-        name[namelen-1] = (char)'\0'; /* strip the \n */
-
-#define XP_DESCRIPTOR     "xp-printerattr.descriptor="
-#define XP_DESCRIPTOR_LEN (sizeof(XP_DESCRIPTOR)-1)
-        while ((option = strchr(option, '\t'))) {
-           option++; /* Skip the '\t' */
-           if (!strncmp(option, XP_DESCRIPTOR, XP_DESCRIPTOR_LEN)) {
-               *(option-1) = '\0'; /* Kill the '\t' (only if we found a valid option) */
-               option += XP_DESCRIPTOR_LEN;
-               if (*option != '\0') {
-                   desc = option;
-               }
-           }
-           else
-           {
-               /* Unknown option */
-               ErrorF("AugmentPrinterDb: Unknown option '%s'\n", option);
-           }
-        }
-        AddPrinterDbName(name, desc);
-        num_printers++;
-    }
-    pclose(fp);
-    return num_printers;
-}
-
-/*
- * FreeNameMap frees all remaining memory associated with the nameMap.
- */
-static void
-FreeNameMap(void)
-{
-    NameMapPtr pEntry, pTmp;
-
-    for(pEntry = nameMap, pTmp = (NameMapPtr)NULL; 
-	pEntry != (NameMapPtr)NULL;
-	pEntry = pTmp)
-    {
-	if(pEntry->name != (char *)NULL)
-	    xfree(pEntry->name);
-	if(pEntry->qualifier != (char *)NULL)
-	    xfree(pEntry->qualifier);
-	pTmp = pEntry->next;
-	xfree(pEntry);
-    }
-    nameMap = (NameMapPtr)NULL;
-}
-
-/*
- * AddNameMap adds an element to the nameMap linked list.
- */
-static Bool
-AddNameMap(char *name, char *qualifier)
-{
-    NameMapPtr pEntry;
-
-    if((pEntry = (NameMapPtr)xalloc(sizeof(NameMapEntry))) == (NameMapPtr)NULL)
-	return FALSE;
-    pEntry->name = name;
-    pEntry->qualifier = qualifier;
-    pEntry->next = nameMap;
-    nameMap = pEntry;
-    return TRUE;
-}
-
-/*
- * MergeNameMap - puts the "map" names (aka qualifiers, aliases) into
- * the printerDb.  This should be called once, after both the printerDb
- * and nameMap lists are complete. When/if MergeNameMap finds a map for
- * an entry in the printerDb, the qualifier is _moved_ (not copied) to
- * the printerDb. This means that the qualifier pointer in the nameMap
- * is NULLed out.
- */
-static void
-MergeNameMap(void)
-{
-    NameMapPtr pMap;
-    PrinterDbPtr pDb;
-
-    for(pMap = nameMap; pMap != (NameMapPtr)NULL; pMap = pMap->next)
-    {
-	for(pDb = printerDb; pDb != (PrinterDbPtr)NULL; pDb = pDb->next)
-	{
-	    if(!strcmp(pMap->name, pDb->name))
-	    {
-		pDb->qualifier = pMap->qualifier;
-		pMap->qualifier = (char *)NULL;
-	    }
-	}
-    }
-}
-
-/*
- * CreatePrinterAttrs causes the attribute stores to be built for
- * each printer in the printerDb.
- */
-static void
-CreatePrinterAttrs(void)
-{
-    PrinterDbPtr pDb;
-
-    for(pDb = printerDb; pDb != (PrinterDbPtr)NULL; pDb = pDb->next)
-    {
-        XpBuildAttributeStore(pDb->name, (pDb->qualifier)? 
-			      pDb->qualifier : pDb->name);
-    }
-}
-
-#ifdef XPPSDDX
-#define defaultDriver "XP-POSTSCRIPT"
-#else
-#ifdef XPPCLDDX
-#define defaultDriver "XP-PCL-COLOR"
-#else
-#ifdef XPMONOPCLDDX
-#define defaultDriver "XP-PCL-MONO"
-#else
-#define defaultDriver "XP-RASTER"
-#endif
-#endif
-#endif
-
-/*
- * StoreDriverNames -  queries the attribute store for the ddx-identifier.
- * if the ddx-identifier is not in the attribute database, then a default
- * ddx-identifier is store in both the attribute store for the printer,
- * and in the printerDb.
- * The ddx-identifier is stored in the printerDb for use in initializing
- * the screens.
- */
-static void
-StoreDriverNames(void)
-{
-    PrinterDbPtr pEntry;
-
-    for(pEntry = printerDb; pEntry != (PrinterDbPtr)NULL; 
-	pEntry = pEntry->next)
-    {
-        pEntry->driverName = (char*)XpGetPrinterAttribute(pEntry->name, 
-							  "xp-ddx-identifier");
-	if(pEntry->driverName == (char *)NULL || 
-	   strlen(pEntry->driverName) == 0 ||
-	   GetInitFunc(pEntry->driverName) == (Bool(*)())NULL)
-	{
-	    if (pEntry->driverName && (strlen(pEntry->driverName) != 0)) {
-	        ErrorF("Xp Extension: Can't load driver %s\n", 
-		       pEntry->driverName);
-	        ErrorF("              init function missing\n"); 
-	    }
-
-	    pEntry->driverName = defaultDriver;
-	    XpAddPrinterAttribute(pEntry->name,
-			          (pEntry->qualifier != (char *)NULL)?
-				  pEntry->qualifier : pEntry->name,
-				  "*xp-ddx-identifier", pEntry->driverName);
-	}
-    }
-}
-
-/*
- * StoreDescriptors -  queries the attribute store for the descriptor.
- * if the descriptor is not in the attribute database, then the descriptor
- * from the printerDb is store in the attribute store for the printer.
- */
-static void
-StoreDescriptors(void)
-{
-    PrinterDbPtr pEntry;
-
-    for(pEntry = printerDb; pEntry != (PrinterDbPtr)NULL; 
-       pEntry = pEntry->next)
-    {
-       if (pEntry->desc != NULL)
-       {
-           XpAddPrinterAttribute(pEntry->name,
-                                 (pEntry->qualifier != (char *)NULL)?
-                                 pEntry->qualifier : pEntry->name,
-                                 "*descriptor", pEntry->desc);
-       }
-    }
-}
-
-static char *
-MbStrchr(
-    char *str,
-    int ch)
-{
-    size_t mbCurMax = MB_CUR_MAX;
-    wchar_t targetChar, curChar;
-    char tmpChar;
-    int i, numBytes, byteLen;
-
-    if(mbCurMax <= 1) return strchr(str, ch);
-
-    tmpChar = (char)ch;
-    mbtowc(&targetChar, &tmpChar, mbCurMax);
-    for(i = 0, numBytes = 0, byteLen = strlen(str); i < byteLen; i += numBytes)
-    {
-        numBytes = mbtowc(&curChar, &str[i], mbCurMax);
-        if(curChar == targetChar) return &str[i];
-    }
-    return (char *)NULL;
-}
-
-/*
- * GetConfigFileName - Looks for a "Xprinters" file in
- * $(XPRINTDIR)/$LANG/print, and then in $(XPRINTDIR)/C/print. If it
- * finds such a file, it returns the path to the file.  The returned
- * string must be freed by the caller.
- */
-static char *
-GetConfigFileName(void)
-{
-    /*
-     * We need to find the system-wide file, if one exists.  This
-     * file can be in either $(XPRINTDIR)/$LANG/print, or in
-     * $(PRINTDIR)/C/print, and the file itself is named "Xprinters".
-     */
-    char *dirName, *filePath;
-	
-    /*
-     * Check for a LANG-specific file.
-     */
-    if((dirName = XpGetConfigDir(TRUE)))
-    {
-        filePath = (char *)xalloc(strlen(dirName) +
-				  strlen(XPRINTERSFILENAME) + 2);
-
-	if(filePath == (char *)NULL)
-	{
-	    xfree(dirName);
-	    return (char *)NULL;
-	}
-
-	sprintf(filePath, "%s/%s", dirName, XPRINTERSFILENAME);
-	xfree(dirName);
-	if(access(filePath, R_OK) == 0)
-	    return filePath;
-
-	xfree(filePath);
-    }
-
-    if((dirName = XpGetConfigDir(FALSE)))
-    {
-	filePath = (char *)xalloc(strlen(dirName) +
-				  strlen(XPRINTERSFILENAME) + 2);
-	if(filePath == (char *)NULL)
-	{
-	    xfree(dirName);
-	    return (char *)NULL;
-	}
-	sprintf(filePath, "%s/%s", dirName, XPRINTERSFILENAME);
-	xfree(dirName);
-	if(access(filePath, R_OK) == 0)
-	    return filePath;
-	xfree(filePath);
-    }
-    return (char *)NULL;
-}
-
-/*
- * BuildPrinterDb - reads the config file if it exists, and if necessary
- * executes a command such as lpstat to generate a list of printers.
- * XXX
- * XXX BuildPrinterDb must be rewritten to allow 16-bit characters in 
- * XXX printer names.  The will involve replacing the use of strtok() and its
- * XXX related functions.
- * XXX At the same time, BuildPrinterDb and it's support routines should have
- * XXX allocation error checking added.
- * XXX
- */
-static PrinterDbPtr
-BuildPrinterDb(void)
-{
-    Bool defaultAugment = TRUE, freeConfigFileName;
-
-    if(configFileName && access(configFileName, R_OK) != 0)
-    {
-	ErrorF("Xp Extension: Can't open file %s\n", configFileName);
-    }
-    if(!configFileName && (configFileName = GetConfigFileName()))
-	freeConfigFileName = TRUE;
-    else
-	freeConfigFileName = FALSE;
-
-    if(configFileName != (char *)NULL && access(configFileName, R_OK) == 0)
-    {
-	char line[256];
-	FILE *fp = fopen(configFileName, "r");
-
-	while(fgets(line, 256, fp) != (char *)NULL)
-	{
-	    char *tok, *ptr;
-	    if((tok = strtok(line, " \t\012")) != (char *)NULL)
-	    {
-		if(tok[0] == (char)'#') continue;
-		if(strcmp(tok, "Printer") == 0)
-		{
-		    while((tok = strtok((char *)NULL, " \t")) != (char *)NULL)
-		    {
-		        if((ptr = MbStrchr(tok, '\012')))
-		            *ptr = (char)'\0';
-			AddPrinterDbName(tok, NULL);
-		    }
-		}
-		else if(strcmp(tok, "Map") == 0)
-		{
-		    char *name, *qualifier;
-
-		    if((tok = strtok((char *)NULL, " \t\012")) == (char *)NULL)
-			continue;
-		    name = strdup(tok);
-		    if((tok = strtok((char *)NULL, " \t\012")) == (char *)NULL)
-		    {
-			xfree(name);
-			continue;
-		    }
-		    qualifier = strdup(tok);
-		    AddNameMap(name, qualifier);
-		}
-		else if(strcmp(tok, "Augment_Printer_List") == 0)
-		{
-		    if((tok = strtok((char *)NULL, " \t\012")) == (char *)NULL)
-			continue;
-
-		    if(strcmp(tok, "%default%") == 0)
-			continue;
-		    defaultAugment = FALSE;
-		    if(strcmp(tok, "%none%") == 0)
-			continue;
-		    AugmentPrinterDb(tok);
-		}
-		else
-		    break; /* XXX Generate an error? */
-	    }
-	}
-	fclose(fp);
-    }
-
-    if(defaultAugment == TRUE)
-    {
-        XpSpoolerTypePtr curr_spooler_type;   /* spooler we are currently probing for queues */
-        int              num_printers_found;  /* number of printers found by |AugmentPrinterDb()| */
-        char            *tok_lasts;           /* strtok_r() position token */
-        char            *spnamelist;          /* list of spooler names, seperated by ":" */
-        char            *spname;              /* spooler name */
-        
-        spnamelist = strdup(XpGetSpoolerTypeNameList()); /* strtok_r() modifies string so dup' it first */
-        
-        for( spname = strtok_r(spnamelist, ":", &tok_lasts) ;
-             spname != NULL ;
-             spname = strtok_r(NULL, ":", &tok_lasts) )
-        {
-            curr_spooler_type = XpSpoolerNameToXpSpoolerType(spname);
-            if(!curr_spooler_type)
-            {
-                FatalError("BuildPrinterDb: No spooler type entry found for '%s'.\n", spname);
-            }
-            
-            if(curr_spooler_type->list_queues_command == NULL ||
-               strlen(curr_spooler_type->list_queues_command) == 0)
-            {
-                continue;
-            }
-        
-            num_printers_found = AugmentPrinterDb(curr_spooler_type->list_queues_command);
-            /* Did we found a spooler which works ? */
-            if(num_printers_found > 0)
-            {
-                spooler_type = curr_spooler_type;
-#ifdef DEBUG_gisburn
-                fprintf(stderr, "BuildPrinterDb: using '%s'.\n", spooler_type->name);
-#endif /* DEBUG_gisburn */
-                break;
-            }
-        }
-        
-        free(spnamelist);
-    }
-
-    MergeNameMap();
-    FreeNameMap();
-
-    /* Create the attribute stores for all printers */
-    CreatePrinterAttrs();
-
-    /*
-     * Find the drivers for each printers, and store the driver names
-     * in the printerDb
-     */
-    StoreDriverNames();
-    StoreDescriptors();
-
-    if(freeConfigFileName)
-    {
-	xfree(configFileName);
-	configFileName = (char *)NULL;
-    }
-
-    return printerDb;
-}
-
-static void
-FreeDriverMap(DriverMapPtr driverMap)
-{
-    DriverMapPtr pCurEntry, pNextEntry;
-
-    for(pCurEntry = driverMap, pNextEntry = (DriverMapPtr)NULL; 
-	pCurEntry != (DriverMapPtr)NULL; pCurEntry = pNextEntry)
-    {
-	pNextEntry = pCurEntry->next;
-	if(pCurEntry->driverName != (char *)NULL)
-	    xfree(pCurEntry->driverName);
-	xfree(pCurEntry);
-    }
-}
-
-/*
- * XpRehashPrinterList rebuilds the list of printers known to the
- * server.  It first walks the printerDb to build a table mapping
- * driver names and screen numbers, since this is not an easy mapping
- * to change in the sample server. The normal configuration files are
- * then read & parsed to create the new list of printers. Printers
- * which require drivers other than those already initialized are
- * deleted from the printerDb.  This leaves attribute stores in place
- * for inaccessible printers, but those stores will be cleaned up in
- * the next rehash or server recycle.
- */
-int
-XpRehashPrinterList(void)
-{
-    PrinterDbPtr pEntry, pPrev;
-    DriverMapPtr driverMap = (DriverMapPtr)NULL, pDrvEnt;
-    int result;
-
-    /* Build driverMap */
-    for(pEntry = printerDb; pEntry != (PrinterDbPtr)NULL; pEntry = pEntry->next)
-    {
-	for(pDrvEnt = driverMap; pDrvEnt != (DriverMapPtr)NULL; 
-	    pDrvEnt = pDrvEnt->next)
-	{
-	    if(!strcmp(pEntry->driverName, pDrvEnt->driverName))
-		break;
-	}
-
-	if(pDrvEnt != (DriverMapPtr)NULL) 
-	    continue;
-
-	if((pDrvEnt = (DriverMapPtr)xalloc(sizeof(DriverMapEntry))) == 
-	    (DriverMapPtr)NULL)
-	{
-	    FreeDriverMap(driverMap);
-	    return BadAlloc;
-	}
-	pDrvEnt->driverName = strdup(pEntry->driverName);
-	pDrvEnt->screenNum = pEntry->screenNum;
-	pDrvEnt->next = driverMap;
-	driverMap = pDrvEnt;
-    }
-
-    /* Free the old printerDb */
-    FreePrinterDb();
-
-    /* Free/Rehash attribute stores */
-    if((result = XpRehashAttributes()) != Success)
-	return result;
-
-    /* Build a new printerDb */
-    if(BuildPrinterDb() ==  (PrinterDbPtr)NULL)
-        return BadAlloc;
-
-    /* Walk PrinterDb & either store screenNum, or delete printerDb entry */
-    for(pEntry = printerDb, pPrev = (PrinterDbPtr)NULL;
-	pEntry != (PrinterDbPtr)NULL; pEntry = pEntry->next)
-    {
-	for(pDrvEnt = driverMap; pDrvEnt != (DriverMapPtr)NULL; 
-	    pDrvEnt = pDrvEnt->next)
-	{
-	    if(!strcmp(printerDb->driverName, pDrvEnt->driverName))
-		break;
-	}
-
-	/*
-	 * Either store the screen number, or delete the printerDb entry.
-	 * Deleting the entry leaves orphaned attribute stores, but they'll
-	 * get cleaned up at the next rehash or server recycle.
-	 */
-	if(pDrvEnt != (DriverMapPtr)NULL) 
-	{
-	    pEntry->screenNum = pDrvEnt->screenNum;
-	    pPrev = pEntry;
-	}
-	else {
-	    if(pPrev)
-	        pPrev->next = pEntry->next;
-	    else
-		pPrev = pEntry->next;
-	    if(pEntry->name != (char *)NULL)
-		xfree(pEntry->name);
-	    xfree(pEntry);
-	    pEntry = pPrev;
-	}
-    }
-
-    FreeDriverMap(driverMap);
-
-    return Success;
-}
-
-/*
- * ValidateFontDir looks for a valid font directory for the specified
- * printer model within the specified configuration directory. It returns
- * the directory name, or NULL if no valid font directory was found.
- * It is the caller's responsibility to free the returned font directory
- * name.
- */
-static char *
-ValidateFontDir(
-    char *configDir, 
-    char *modelName)
-{
-    char *pathName;
-
-    if(!configDir || !modelName)
-	return (char *)NULL;
-
-    pathName = (char *)xalloc(strlen(configDir) + strlen(MODELDIRNAME) +
-			      strlen(modelName) + strlen(FONTDIRNAME) + 
-			      strlen("fonts.dir") + 5);
-    if(!pathName)
-	return (char *)NULL;
-    sprintf(pathName, "%s/%s/%s/%s/%s", configDir, MODELDIRNAME, modelName,
-	    FONTDIRNAME, "fonts.dir");
-    if(access(pathName, R_OK) != 0)
-    {
-	xfree(pathName);
-	return (char *)NULL;
-    }
-    pathName[strlen(pathName) - 9] = (char)'\0'; /* erase fonts.dir */
-    return pathName;
-}
-
-/*
- * FindFontDir returns a pointer to the path name of the font directory
- * for the specified printer model name, if such a directory exists.
- * The directory contents are superficially checked for validity.
- * The caller must free the returned char *.
- *
- * We first look in the locale-specific model-config directory, and
- * then fall back to the C language model-config directory.
- */
-static char *
-FindFontDir(
-    char *modelName)
-{
-    char *configDir, *fontDir;
-
-    if(!modelName || !strlen(modelName))
-        return (char *)NULL;
-    
-    configDir = XpGetConfigDir(TRUE);
-    if((fontDir = ValidateFontDir(configDir, modelName)))
-    {
-	xfree(configDir);
-	return fontDir;
-    }
-
-    if(configDir) 
-	xfree(configDir);
-    configDir = XpGetConfigDir(FALSE);
-    fontDir = ValidateFontDir(configDir, modelName);
-
-    xfree(configDir);
-
-    return fontDir;
-}
-
-/*
- * AddToFontPath adds the specified font path element to the global
- * defaultFontPath string. It adds the keyword "PRINTER:" to the front
- * of the path to denote that this is a printer-specific font path
- * element.
- */
-static char PATH_PREFIX[] = "PRINTER:";
-static int PATH_PREFIX_LEN = sizeof(PATH_PREFIX) - 1; /* same as strlen() */
-
-static void
-AddToFontPath(
-    char *pathName)
-{
-    char *newPath;
-    Bool freeOldPath;
-
-    if(defaultFontPath == origFontPath)
-	freeOldPath = FALSE;
-    else
-	freeOldPath = TRUE;
-
-    newPath = (char *)xalloc(strlen(defaultFontPath) + strlen(pathName) + 
-			     PATH_PREFIX_LEN + 2);
-
-    sprintf(newPath, "%s%s,%s", PATH_PREFIX, pathName, defaultFontPath);
-
-    if(freeOldPath)
-	xfree(defaultFontPath);
-
-    defaultFontPath = newPath;
-    return;
-}
-
-/*
- * AugmentFontPath adds printer-model-specific font path elements to
- * the front of the font path global variable "defaultFontPath" (dix/globals.c).
- * We can't call SetFontPath() because the font code has not yet been 
- * initialized when InitOutput is called (from whence this routine is called).
- *
- * This utilizes the static variables origFontPath and 
- * freeDefaultFontPath to track the original contents of defaultFontPath,
- * and to properly free the modified version upon server recycle.
- */
-static void
-AugmentFontPath(void)
-{
-    char *modelID, **allIDs = (char **)NULL;
-    PrinterDbPtr pDbEntry;
-    int numModels, i;
-
-    if(!origFontPath)
-	origFontPath = defaultFontPath;
-
-    if(freeDefaultFontPath)
-    {
-	xfree(defaultFontPath);
-	defaultFontPath = origFontPath;
-	freeDefaultFontPath = FALSE;
-    }
-
-    /*
-     * Build a list of printer models to check for internal fonts.
-     */
-    for(pDbEntry = printerDb, numModels = 0; 
-	pDbEntry != (PrinterDbPtr)NULL; 
-	pDbEntry = pDbEntry->next)
-    {
-	modelID =
-	    (char*)XpGetPrinterAttribute(pDbEntry->name,
-					 "xp-model-identifier");
-
-	if(modelID && strlen(modelID) != 0)
-	{
-	    /* look for current model in the list of allIDs */
-	    for(i = 0; i < numModels; i++)
-	    {
-	        if(!strcmp(modelID, allIDs[i]))
-	        {
-		    modelID = (char *)NULL;
-		    break;
-	        }
-	    }
-	}
-
-	/*
-	 * If this printer's model-identifier isn't in the allIDs list,
-	 * then add it to allIDs.
-	 */
-	if(modelID && strlen(modelID) != 0)
-	{
-	    allIDs = (char **)xrealloc(allIDs, (numModels+2) * sizeof(char *));
-	    if(allIDs == (char **)NULL)
-	        return;
-	    allIDs[numModels] = modelID;
-	    allIDs[numModels + 1] = (char *)NULL;
-	    numModels++;
-	}
-    }
-
-    /* for each model, check for a valid font directory, and add it to
-     * the front of defaultFontPath.
-     */
-    for(i = 0; allIDs != (char **)NULL && allIDs[i] != (char *)NULL; i ++)
-    {
-	char *fontDir;
-	if((fontDir = FindFontDir(allIDs[i])))
-	{
-	    AddToFontPath(fontDir);
-	    xfree(fontDir);
-	    freeDefaultFontPath = TRUE;
-	}
-    }
-
-    if(allIDs)
-        xfree(allIDs);
-
-    return;
-}
-
-/*
- * XpClientIsBitmapClient is called by the font code to find out if
- * a particular client should be granted access to bitmap fonts.
- * This function works by
- * calling XpContextOfClient (in Xserver/Xext/xprint.c) to determine
- * the context associated with the client, and then queries the context's
- * attributes to determine whether the bitmap fonts should be visible.
- * It looks at the value of the xp-listfonts-modes document/page attribute to 
- * see if xp-list-glyph-fonts has been left out of the mode list. Only
- * if the xp-listfonts-modes attribute exists, and it does not contain
- * xp-list-glyph-fonts does this function return FALSE. In any other
- * case the funtion returns TRUE, indicating that the bitmap fonts 
- * should be visible to the client.
- */
-Bool
-XpClientIsBitmapClient(
-    ClientPtr client)
-{
-    XpContextPtr pContext;
-    char *mode;
-
-    if(!(pContext = XpContextOfClient(client)))
-	return TRUE;
-
-    /*
-     * Check the page attributes, and if it's not defined there, then
-     * check the document attributes.
-     */
-    mode = XpGetOneAttribute(pContext, XPPageAttr, "xp-listfonts-modes");
-    if(!mode || !strlen(mode))
-    {
-        mode = XpGetOneAttribute(pContext, XPDocAttr, "xp-listfonts-modes");
-        if(!mode || !strlen(mode))
-	    return TRUE;
-    }
-    
-    if(!strstr(mode, "xp-list-glyph-fonts"))
-	return FALSE;
-
-    return TRUE;
-}
-
-/*
- * XpClientIsPrintClient is called by the font code to find out if
- * a particular client has set a context which references a printer
- * which utilizes a particular font path.
- * This function works by calling XpContextOfClient
- * (in Xserver/Xext/xprint.c) to determine the context associated with
- * the client and then looks at the value of the xp-listfonts-modes
- * document/page attribute to see if xp-list-internal-printer-fonts has
- * been left out of the mode list.
- * If the xp-listfonts-modes attribute exists, and it does not contain
- * xp-list-internal-printer-fonts this function returns FALSE. 
- * Otherwise it looks up the font directory for the context.  The font
- * directory is then compared with the directory specified in the
- * FontPathElement which is passed in.
- */
-Bool
-XpClientIsPrintClient(
-    ClientPtr client,
-    FontPathElementPtr fpe)
-{
-    XpContextPtr pContext;
-    char *mode;
-    char *modelID, *fontDir;
-
-    if(!(pContext = XpContextOfClient(client)))
-	return FALSE;
-
-    /*
-     * Check the page attributes, and if it's not defined there, then
-     * check the document attributes.
-     */
-    mode = XpGetOneAttribute(pContext, XPPageAttr, "xp-listfonts-modes");
-    if(!mode || !strlen(mode))
-    {
-        mode = XpGetOneAttribute(pContext, XPDocAttr, "xp-listfonts-modes");
-    }
-    
-    if(mode && strlen(mode))
-    {
-        if(!strstr(mode, "xp-list-internal-printer-fonts"))
-            return FALSE;    
-    }
-
-    if (!fpe)
-	return TRUE;
-
-    modelID = XpGetOneAttribute(pContext, XPPrinterAttr, "xp-model-identifier");
-    if(!modelID || !strlen(modelID))
-	return FALSE;
-    
-    if(!(fontDir = FindFontDir(modelID)))
-	return FALSE;
-
-    /*
-     * The grunge here is to ignore the PATH_PREFIX at the front of the
-     * fpe->name.
-     */
-    if(fpe->name_length < PATH_PREFIX_LEN || 
-       (strlen(fontDir) != (fpe->name_length - PATH_PREFIX_LEN)) ||
-       strncmp(fontDir, fpe->name + PATH_PREFIX_LEN, 
-	       fpe->name_length - PATH_PREFIX_LEN))
-    {
-	xfree(fontDir);
-	return FALSE;
-    }
-    xfree(fontDir);
-    return TRUE;
-}
-
-static void
-AddFormats(ScreenInfo *pScreenInfo, char *driverName)
-{
-    int i, j;
-    driverInitRec *pInitRec;
-    int numDrivers = sizeof(driverInits)/sizeof(driverInitRec);
-    PixmapFormatRec *formats;
-    int numfmts;
-
-    for (pInitRec = driverInits, i = 0; i < numDrivers; pInitRec++, i++)
-    {
-        if ( !strcmp( driverName, pInitRec->driverName ) )
-	    break;
-    }
-    if (i >= numDrivers)
-	return;
-    formats = pInitRec->pFmts;
-    numfmts = pInitRec->numFmts;
-    for (i = 0; i < numfmts && pScreenInfo->numPixmapFormats < MAXFORMATS; i++)
-    {
-	for (j = 0; j < pScreenInfo->numPixmapFormats; j++) {
-	    if (pScreenInfo->formats[j].depth == formats[i].depth &&
-		pScreenInfo->formats[j].bitsPerPixel == formats[i].bitsPerPixel &&
-		pScreenInfo->formats[j].scanlinePad == formats[i].scanlinePad)
-		break;
-	}
-	if (j == pScreenInfo->numPixmapFormats) {
-	    pScreenInfo->formats[j] = formats[i];
-	    pScreenInfo->numPixmapFormats++;
-	}
-    }
-}
-
-/************************************************************
- * PrinterInitOutput --
- *	This routine is to be called from a ddx's InitOutput
- *      during the server startup initialization, and when
- *      the server is to be reset.  The routine creates the
- *      screens associated with configured printers by calling
- *	dix:AddScreen.  The configuration information comes from a
- *      database read from the X*printers file.
- *
- * Results:
- *	The array of ScreenRec pointers referenced by
- *      pScreenInfo->screen is increased by the addition
- *      of the printer screen(s), as is the value of
- *      pScreenInfo->numScreens.  This is done via calls
- *      to AddScreen() in dix.
- *
- ************************************************************/
-
-void
-PrinterInitOutput(
-     ScreenInfo *pScreenInfo,
-     int argc,
-     char **argv)
-{
-    PrinterDbPtr pDb, pDbEntry;
-    int driverCount = 0, i;
-    char **driverNames;
-    char *configDir;
-
-    /* This should NEVER happen, but... */
-    if( !xprintInitGlobalsCalled )
-    {
-      FatalError("Internal error: PrinterInitGlobals() not called.");
-    }
-#ifdef SMART_SCHEDULE
-    /* |PrinterInitGlobals| should have set |SmartScheduleDisable| to
-     * |TRUE| - if not we will trigger this safeguard. */
-    if( SmartScheduleDisable != TRUE )
-    {
-      FatalError("Internal error: XF86 smart scheduler incompatible to Xprint DDX.");
-    }
-#endif /* SMART_SCHEDULE */
-    /* Safeguard for
-     * http://pdx.freedesktop.org/cgi-bin/bugzilla/show_bug.cgi?id=567 ("Xorg
-     * Xprt starts to consume 100% CPU when being idle for some time")
-     * |PrinterInitGlobals| should have set |defaultScreenSaverTime| to
-     * |0| - if not we will trigger this trap. */
-    if( defaultScreenSaverTime != 0 )
-    {
-      FatalError("Internal screen saver must be OFF for printing.");
-    }
-    
-    /* Print a warnung when the maximum request size of the BIGREQUESTS
-     * extension is smaller than 8MB (see
-     * http://xprint.freedesktop.org/cgi-bin/bugzilla/show_bug.cgi?id=622)
-     */
-    if (maxBigRequestSize < (8*1048576)-1) {
-        ErrorF("Xp Extension: BIGREQUESTS max. request is currently %ld bytes "
-               ", recommemded minimum for Xprint is 8MB.\n", (long)maxBigRequestSize);
-    }
-
-    /* 
-     * this little test is just a warning at startup to make sure
-     * that the config directory exists.
-     *
-     * what this ugly looking if says is that if both ways of
-     * calling configDir works and both directories don't exist, 
-     * then print an error saying we can't find the non-lang one.
-     */
-    if (((configDir = XpGetConfigDir(TRUE)) != NULL) && 
-	(access(configDir, F_OK) == 0))
-    {
-        xfree(configDir);
-    }
-    else if (((configDir = XpGetConfigDir(FALSE)) != NULL) &&
-	     (access(configDir, F_OK) == 0))
-    {
-        xfree(configDir);
-    }
-    else {
-        /* Refuse to start when we do not have our config dir... */
-        FatalError("Xp Extension: could not find config dir %s\n",
-                   configDir ? configDir : XPRINTDIR);
-    }
-
-    if(printerDb != (PrinterDbPtr)NULL)
-	FreePrinterDb();
-	
-    /*
-     * Calling BuildPrinterDb serves to build the printer database,
-     * and to initialize the attribute store for each printer.
-     * The driver can, if it so desires, modify the attribute
-     * store at a later time.
-     */
-    if((pDb = BuildPrinterDb()) ==  (PrinterDbPtr)NULL) return;
-
-    /*
-     * We now have to decide how many screens to initialize, and call
-     * AddScreen for each one. The printerDb must be properly initialized
-     * for at least one screen's worth of printers prior to calling AddScreen
-     * because InitPrintDrivers reads the printerDb to determine which 
-     * driver(s) to init on a particular screen.
-     * We put each driver's printers on a different
-     * screen, and call AddScreen for each screen/driver pair.
-     */
-    /* count the number of printers */
-    for(pDbEntry = pDb, driverCount = 0; pDbEntry != (PrinterDbPtr)NULL; 
-	pDbEntry = pDbEntry->next, driverCount++)
-	    ;
-    /*
-     * Allocate memory for the worst case - a driver per printer
-     */
-    driverNames = (char **)xalloc(sizeof(char *) * driverCount);
-
-    /*
-     * Assign the driver for the first printer to the first screen
-     */
-    pDb->screenNum = screenInfo.numScreens;
-    driverNames[0] = pDb->driverName;
-    driverCount = 1;
-    AddFormats(pScreenInfo, pDb->driverName);
-
-    /*
-     * For each printer, look to see if its driver is already assigned
-     * to a screen, and if so copy that screen number into the printerDb.
-     * Otherwise, assign a new screen number to the driver for this
-     * printer.
-     */
-    for(pDbEntry = pDb; pDbEntry != (PrinterDbPtr)NULL; 
-	pDbEntry = pDbEntry->next)
-    {
-	Bool foundMatch;
-
-	for(i = 0, foundMatch = FALSE; i < driverCount; i++)
-	{
-	    if(!strcmp(driverNames[i], pDbEntry->driverName))
-	    {
-	        foundMatch = TRUE;
-	        pDbEntry->screenNum = screenInfo.numScreens + i;
-		break;
-	    }
-	}
-	if(foundMatch == FALSE)
-	{
-	    driverNames[driverCount] = pDbEntry->driverName;
-	    pDbEntry->screenNum = screenInfo.numScreens + driverCount;
-	    AddFormats(pScreenInfo, pDbEntry->driverName);
-	    driverCount++;
-	}
-    }
-       
-    for(i = 0; i < driverCount; i++)
-    {
-	int curScreen = screenInfo.numScreens;
-        if(AddScreen(InitPrintDrivers, argc, argv) < 0)
-	{
-            PrinterDbPtr pPrev;
-	    /* 
-	     * AddScreen failed, so we pull the associated printers 
-	     * from the list.
-	     */
-	    ErrorF("Xp Extension: Could not add screen for driver %s\n",
-		   driverNames[i]);
-            for(pPrev = pDbEntry = printerDb; pDbEntry != (PrinterDbPtr)NULL; 
-		pDbEntry = pDbEntry->next)
-            {
-		if(pDbEntry->screenNum == curScreen)
-		{
-		    if(pPrev == printerDb)
-		    {
-			printerDb = pDbEntry->next;
-			pPrev = printerDb;
-		    }
-		    else
-			pPrev->next = pDbEntry->next;
-
-		    xfree(pDbEntry->name);
-		    xfree(pDbEntry);
-		    pDbEntry = pPrev;
-		}
-		else 
-		{
-		    if(pDbEntry->screenNum > curScreen)
-		        pDbEntry->screenNum--;
-		    pPrev = pDbEntry;
-		}
-	    }
-	}
-    }
-
-    xfree(driverNames);
-
-    AugmentFontPath();
-
-    if(pScreenInfo->numScreens > MAXSCREENS)
-    {
-	ErrorF("The number of printer screens requested ");
-	ErrorF("exceeds the allowable limit of %d screens.\n", MAXSCREENS);
-	ErrorF("Please reduce the number of requested printers in your ");
-	ErrorF("\nX%sprinters file.", display);
-	ErrorF("Server exiting...\n");
-	exit(-1);
-    }
-}
-
-/*
- * InitPrintDrivers is called from dix:AddScreen.  It in turn calls the
- * driver initialization routine for any and all drivers which are
- * implicated in supporting printers on the particular screen number
- * specified by the "index" parameter.  The printerDb variable is used
- * to determine which printers are to be associated with a particular
- * screen.
- */
-static Bool
-InitPrintDrivers(
-    int index,
-    ScreenPtr pScreen,
-    int argc,
-    char **argv)
-{
-    PrinterDbPtr pDb, pDb2;
-
-    GenericScreenInit(index, pScreen, argc, argv);
-
-    for(pDb = printerDb; pDb != (PrinterDbPtr)NULL; pDb = pDb->next)
-    {
-	if(pDb->screenNum == index)
-	{
-	    Bool callInit = TRUE;
-	    for(pDb2 = printerDb; pDb2 != pDb; pDb2 = pDb2->next)
-	    {
-	        if(!strcmp(pDb->driverName, pDb2->driverName))
-	        {
-		    callInit = FALSE;
-		    break;
-	        }
-	    }
-	    if(callInit == TRUE)
-	    {
-	        Bool (*initFunc)(BFuncArgs);
-	        initFunc = GetInitFunc(pDb->driverName);
-	        if(initFunc(index, pScreen, argc, argv) == FALSE)
-	        {
-		    /* XXX - What do I do if the driver's init fails? */
-                }
-	    }
-	}
-    }
-    return TRUE;
-}
-
-void
-_XpVoidNoop(void)
-{
-    return;
-}
-
-Bool
-_XpBoolNoop(void)
-{
-    return TRUE;
-}
-
-/*
- * GenericScreenInit - The common initializations required by all
- * printer screens and drivers.  It sets the screen's cursor functions
- * to Noops, and computes the maximum screen (i.e. medium) dimensions.
- */
-
-static void
-GenericScreenInit(
-     int index,
-     ScreenPtr pScreen,
-     int argc,
-     char **argv)
-{
-    float fWidth, fHeight, maxWidth, maxHeight;
-    unsigned short width, height;
-    PrinterDbPtr pDb;
-    int res, maxRes;
-    
-    /*
-     * Set the cursor ops to no-op functions.
-     */
-    pScreen->DisplayCursor = (DisplayCursorProcPtr)_XpBoolNoop;
-    pScreen->RealizeCursor = (RealizeCursorProcPtr)_XpBoolNoop;
-    pScreen->UnrealizeCursor = (UnrealizeCursorProcPtr)_XpBoolNoop;
-    pScreen->SetCursorPosition = (SetCursorPositionProcPtr)_XpBoolNoop;
-    pScreen->ConstrainCursor = (ConstrainCursorProcPtr)_XpVoidNoop;
-    pScreen->CursorLimits = (CursorLimitsProcPtr)_XpVoidNoop;
-    pScreen->RecolorCursor = (RecolorCursorProcPtr)_XpVoidNoop;
-
-    /*
-     * Find the largest paper size for all the printers on the given
-     * screen.
-     */
-    maxRes = 0;
-    maxWidth = maxHeight = 0.0;
-    for( pDb = printerDb; pDb != (PrinterDbPtr)NULL; pDb = pDb->next)
-      {
-	if(pDb->screenNum == index)
-	{
-
-	    XpValidatePoolsRec *pValRec;
-	    pVFunc dimensionsFunc;
-
-	    GetDimFuncAndRec(pDb->driverName, &pValRec, &dimensionsFunc);
-	    if(dimensionsFunc != (pVFunc)NULL)
-		dimensionsFunc(pDb->name, pValRec, &fWidth, &fHeight, &res);
-	    else
-	        XpGetMaxWidthHeightRes(pDb->name, pValRec, &fWidth, 
-				       &fHeight, &res);
-	    if( res > maxRes )
-	      maxRes = res;
-	    if( fWidth > maxWidth )
-	      maxWidth = fWidth;
-	    if( fHeight > maxHeight )
-	      maxHeight = fHeight;
-	  }
-      }
-    
-    width = (unsigned short) (maxWidth * maxRes / 25.4);
-    height = (unsigned short) (maxHeight * maxRes / 25.4);
-    pScreen->width = pScreen->height = ( width > height ) ? width :
-      height;
-    
-    pScreen->mmWidth = pScreen->mmHeight = ( maxWidth > maxHeight ) ?
-                                           (unsigned short)(maxWidth + 0.5) : 
-					   (unsigned short)(maxHeight + 0.5);
-}
-
-#if 0   /* No one uses this anymore... */
-/*
- * QualifyName - takes an unqualified file name such as X6printers and
- * a colon-separated list of directory path names such as 
- * /etc/opt/dt:/opt/dt/config.
- * 
- * Returns a fully qualified file path name such as /etc/opt/dt/X6printers.
- * The returned value is malloc'd, and the caller is responsible for 
- * freeing the associated memory.
- */
-static char *
-QualifyName(char *fileName, char *searchPath)
-{
-    char * curPath = searchPath;
-    char * nextPath;
-    char * chance;
-    FILE *pFile;
-
-    if (fileName == NULL || searchPath == NULL)
-      return NULL;
-
-    while (1) {
-      if ((nextPath = strchr(curPath, ':')) != NULL)
-        *nextPath = 0;
-  
-      chance = (char *)xalloc(strlen(curPath) + strlen(fileName) + 2);
-      sprintf(chance,"%s/%s",curPath,fileName);
-  
-      /* see if we can read from the file */
-      if((pFile = fopen(chance, "r")) != (FILE *)NULL)
-      {
-	fclose(pFile);
-        /* ... restore the colon, .... */
-        if (nextPath)
-	  *nextPath = ':';
-  
-        return chance;
-      }
-  
-      xfree(chance);
-
-      if (nextPath == NULL) /* End of path list? */
-        break;
-  
-      /* try the next path */
-      curPath = nextPath + 1;
-    }
-    return NULL;
-}
-#endif
-
-/*
- * FillPrinterListEntry fills in a single XpDiListEntry element with data
- * derived from the supplied PrinterDbPtr element.
- *
- * XXX A smarter (i.e. future) version of this routine might inspect the
- * XXX "locale" parameter and attempt to match the "description" and
- * XXX "localeName" elements of the XpDiListEntry to the specified locale.
- */
-static void
-FillPrinterListEntry(
-    XpDiListEntry *pEntry,
-    PrinterDbPtr pDb,
-    int localeLen,
-    char *locale)
-{
-    static char *localeStr = (char *)NULL;
-
-    if(localeStr == (char *)NULL)
-	localeStr = strdup(setlocale(LC_ALL, (const char *)NULL));
-
-    pEntry->name = pDb->name;
-    pEntry->description =
-	(char*)XpGetPrinterAttribute(pDb->name, "descriptor");
-    pEntry->localeName = localeStr;
-    pEntry->rootWinId = WindowTable[pDb->screenNum]->drawable.id;
-}
-
-/*
- * GetPrinterListInfo fills in the XpDiListEntry struct pointed to by the
- * parameter pEntry with the information regarding the printer specified
- * by the name and nameLen parameters.  The pointers placed in the 
- * XpDiListEntry structure MUST NOT be freed by the caller.  They are
- * pointers into existing long-lived databases.
- *
- */
-static Bool
-GetPrinterListInfo(
-    XpDiListEntry *pEntry,
-    int nameLen,
-    char *name,
-    int localeLen,
-    char *locale)
-{
-    PrinterDbPtr pDb;
-
-    for(pDb = printerDb; pDb != (PrinterDbPtr)NULL; pDb = pDb->next)
-    {
-	if(strlen(pDb->name) == nameLen && !strncmp(pDb->name, name, nameLen))
-	{
-	    FillPrinterListEntry(pEntry, pDb, localeLen, locale);
-	    return TRUE;
-	}
-    }
-    return FALSE;
-}
-
-/*
- * XpDiFreePrinterList is the approved method of releasing memory used
- * for a printer list.
- */
-void
-XpDiFreePrinterList(XpDiListEntry **list)
-{
-    int i;
-
-    for(i = 0; list[i] != (XpDiListEntry *)NULL; i++)
-	xfree(list[i]);
-    xfree(list);
-}
-
-/*
- * XpDiGetPrinterList returns a pointer to a NULL-terminated array of
- * XpDiListEntry pointers.  Each entry structure contains the name, 
- * description, root window, and locale of a printer.  The call returns
- * either a list of all printers configured on the server, or it returns
- * the information for one specific printer depending on the values passed
- * in.  Non-NULL values passed in indicate that only the information for
- * the one specific printer is desired, while NULL values indicate that
- * the information for all printers is desired.
- */
-XpDiListEntry **
-XpDiGetPrinterList(
-    int nameLen,
-    char *name,
-    int localeLen,
-    char *locale)
-{
-    XpDiListEntry **pList;
-
-    if(!nameLen || name == (char *)NULL)
-    {
-	int i;
-        PrinterDbPtr pDb;
-
-        for(pDb = printerDb, i = 0; pDb != (PrinterDbPtr)NULL; 
-	    pDb = pDb->next, i++)
-	    ;
-
-	if((pList = (XpDiListEntry **)xalloc((i+1) * sizeof(XpDiListEntry *)))
-	   == (XpDiListEntry **)NULL)
-	    return pList;
-
-	pList[i] = (XpDiListEntry *)NULL;
-        for(pDb = printerDb, i = 0; pDb != (PrinterDbPtr)NULL; 
-	    pDb = pDb->next, i++)
-	{
-	    if((pList[i] = (XpDiListEntry *)xalloc(sizeof(XpDiListEntry)))==
-	       (XpDiListEntry *)NULL)
-	    {
-		XpDiFreePrinterList(pList);
-		return (XpDiListEntry **)NULL;
-	    }
-            FillPrinterListEntry(pList[i], pDb, localeLen, locale);
-	}
-    }
-    else
-    {
-	if((pList = (XpDiListEntry **)xalloc(2 * sizeof(XpDiListEntry *))) ==
-	   (XpDiListEntry **)NULL)
-	    return pList;
-
-	if((pList[0] = (XpDiListEntry *)xalloc(sizeof(XpDiListEntry))) ==
-           (XpDiListEntry *)NULL)
-        {
-	    xfree(pList);
-	    return (XpDiListEntry **)NULL;
-	}
-	pList[1] = (XpDiListEntry *)NULL;
-	if(GetPrinterListInfo(pList[0], nameLen, name, localeLen, locale) == 
-	   FALSE)
-	{
-	    xfree(pList[0]);
-	    pList[0] = (XpDiListEntry *)NULL;
-	}
-    }
-    return pList;
-}
-
-WindowPtr
-XpDiValidatePrinter(char *printerName, int printerNameLen)
-{
-    PrinterDbPtr pCurEntry;
-
-    for(pCurEntry = printerDb;
-	pCurEntry != (PrinterDbPtr)NULL; pCurEntry = pCurEntry->next)
-    {
-        if(strlen(pCurEntry->name) == printerNameLen &&
-	   !strncmp(pCurEntry->name, printerName, printerNameLen))
-	    return  WindowTable[pCurEntry->screenNum];
-    }
-    return (WindowPtr)NULL;
-}
-
-/*
- * XpDiGetDriverName takes a screen index and a printer name, and returns
- * a pointer to the name of the driver to be used for the specified printer
- * on the specified screen.
- */
-char *
-XpDiGetDriverName(int index, char *printerName)
-{
-
-    PrinterDbPtr pCurEntry;
-
-    for(pCurEntry = printerDb;
-	pCurEntry != (PrinterDbPtr)NULL; pCurEntry = pCurEntry->next)
-    {
-        if(pCurEntry->screenNum == index &&
-	   !strcmp(pCurEntry->name, printerName))
-	    return pCurEntry->driverName;
-    }
-
-    return (char *)NULL; /* XXX Should we supply a default driverName? */
-}
-
diff --git a/hw/xprint/Makefile.am b/hw/xprint/Makefile.am
deleted file mode 100644
index 2ed7aaf..0000000
--- a/hw/xprint/Makefile.am
+++ /dev/null
@@ -1,58 +0,0 @@
-SUBDIRS = doc pcl pcl-mono raster ps etc config
-
-bin_PROGRAMS = Xprt
-
-Xprt_CFLAGS = @DIX_CFLAGS@ @XPRINT_CFLAGS@ \
-	-DPRINT_ONLY_SERVER -D_XP_PRINT_SERVER_  \
-	-DXPRINTDIR=\"$(libdir)/X11/xserver\"    \
-	-DXPRASTERDDX -DXPPCLDDX -DXPMONOPCLDDX -DXPPSDDX \
-	-DXFree86Server
-
-Xprt_LDFLAGS = -L$(top_srcdir)
-XPRINT_LIBS = \
-	@XPRINT_LIBS@ \
-	ps/libps.la \
-	raster/libraster.la \
-	pcl/libpcl.la \
-	pcl-mono/libpcl.la \
-	$(top_builddir)/fb/libfb.la \
-	$(top_builddir)/render/librender.la \
-	$(top_builddir)/dix/libXpdix.la \
-	$(XSERVER_LIBS) \
-	$(top_builddir)/Xext/libXext.la \
-	$(top_builddir)/xkb/libxkb.la \
-	$(top_builddir)/xkb/libxkbstubs.la \
-	$(top_builddir)/os/libos.la # for Xprintf
-
-Xprt_DEPENDENCIES = $(XPRINT_LIBS)
-Xprt_LDADD = $(XPRINT_LIBS) $(XPRINT_SYS_LIBS) $(XSERVER_SYS_LIBS)
-
-miinitext-wrapper.c:
-	echo "#include \"$(top_srcdir)/mi/miinitext.c\"" >> $@
-
-dpmsstubs-wrapper.c:
-	echo "#include \"$(top_srcdir)/Xext/dpmsstubs.c\"" >> $@
-
-Xprt_SOURCES =			\
-	attributes.c		\
-	attributes.h		\
-	AttrValid.c		\
-	AttrValid.h		\
-	ddxInit.c		\
-	DiPrint.h		\
-	Init.c			\
-	mediaSizes.c		\
-	Oid.c			\
-	OidDefs.h		\
-	Oid.h			\
-	OidStrs.h		\
-	spooler.c		\
-	spooler.h		\
-	Util.c			\
-	miinitext-wrapper.c	\
-	dpmsstubs-wrapper.c     \
-        $(top_srcdir)/fb/fbcmap_mi.c
-
-EXTRA_DIST = ValTree.c
-
-CLEANFILES = miinitext-wrapper.c dpmsstubs-wrapper.c
diff --git a/hw/xprint/Oid.c b/hw/xprint/Oid.c
deleted file mode 100644
index a2af001..0000000
--- a/hw/xprint/Oid.c
+++ /dev/null
@@ -1,3181 +0,0 @@
-/*
-(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.
-*/
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#include "attributes.h"
-
-/*
- * XpOidNotify value strings
- */
-#define NOTIFY_EMAIL_STR "{{event-report-job-completed} electronic-mail}"
-#define NOTIFY_NONE_STR  "{}"
-
-#define SafeStrLen(s) ((s) ? strlen((s)) : 0)
-
-/*
- * entry type for the object identifier string map
- */
-typedef struct _XpOidStringMapEntry
-{
-    const char* string;
-    int length;
-    int msg_set;
-    int msg_number;
-    const char* default_message;
-    
-} XpOidStringMapEntry;
-
-/*
- * include the auto-generated static XpOidStringMap
- */
-#include "OidStrs.h"
-
-/*
- * XpOid static function declarations
- */
-static XpOid XpOidParse(const char* value_string,
-			const char** ptr_return);
-/*
- * XpOidList static function declarations
- */
-static XpOidList* XpOidListParse(const char* value_string,
-				 const XpOidList* valid_oids,
-				 const char** ptr_return, int i);
-
-/*
- * XpOidList static function declarations
- */
-static XpOidCardList* XpOidCardListParse(const char* value_string,
-					 const XpOidCardList* valid_cards,
-					 const char** ptr_return, int i);
-
-/*
- * XpOidMediumSourceSize static function declarations
- */
-static XpOidMediumSS* MediumSSParse(const char* value_string,
-				    const XpOidList* valid_trays,
-				    const XpOidList* valid_medium_sizes,
-				    const char** ptr_return, int i);
-static XpOidMediumContinuousSize* MediumContinuousSizeParse(const char*,
-							     const char**);
-static void MediumContinuousSizeDelete(XpOidMediumContinuousSize* me);
-static XpOidMediumDiscreteSizeList* MediumDiscreteSizeListParse(const char*,
-								const XpOidList*,
-								const char**,
-								int i);
-static void MediumDiscreteSizeListDelete(XpOidMediumDiscreteSizeList* list);
-
-static BOOL ParseArea(const char* value_string,
-		      const char** ptr_return,
-		      XpOidArea* area_return);
-static BOOL ParseRealRange(const char* value_string,
-			   const char** ptr_return,
-			   XpOidRealRange* range_return);
-
-/*
- * XpOidTrayMediumList static function declarations
- */
-static XpOidTrayMediumList* TrayMediumListParse(const char* value_string,
-						const XpOidList* valid_trays,
-						const char** ptr_return,
-						int i);
-static void TrayMediumListValidate(XpOidTrayMediumList* me,
-				   const XpOidMediumSS* msss);
-
-/*
- * XpOidDocFmt
- */
-static BOOL XpOidDocFmtNext(XpOidDocFmt* doc_fmt,
-			    const char* value_string,
-			    const char** ptr_return);
-
-/*
- * XpOidDocFmtListParse
- */
-static XpOidDocFmtList* XpOidDocFmtListParse(const char* value_string,
-					     const XpOidDocFmtList* valid_fmts,
-					     const char** ptr_return, int i);
-
-/*
- * misc. parsing static function declarations
- */
-static BOOL ParseBoolValue(const char* value_string,
-			   const char** ptr_return,
-			   BOOL* bool_return);
-static BOOL ParseRealValue(const char* value_string,
-			   const char** ptr_return,
-			   float* real_return);
-static BOOL ParseSeqEnd(
-			const char* value_string,
-			const char** ptr_return);
-static BOOL ParseSeqStart(
-			  const char* value_string,
-			  const char** ptr_return);
-static BOOL ParseUnspecifiedValue(
-				  const char* value_string,
-				  const char** ptr_return);
-static int SpanToken(
-		     const char* string);
-static int SpanWhitespace(
-			  const char* string);
-
-/*
- * String comparison function.
- */
-#ifdef HAVE_STRCASECMP
-# define StrnCaseCmp(s1, s2, len) strncasecmp(s1, s2, len)
-#else
-static int StrnCaseCmp(const char *s1, const char *s2, size_t len);
-#endif
-
-/*
- * ------------------------------------------------------------------------
- * Name: XpOidString
- *
- * Description:
- *
- *     Obtain the string representation of an XpOid.
- *
- *     Example: XpOidString(xpoid_copy_count) returns "copy-count".
- *
- * Return value:
- *
- *     A const pointer to the string.
- */
-const char*
-XpOidString(XpOid xp_oid)
-{
-    /*
-     * XpOid enum values are index values into the string map
-     */
-    return XpOidStringMap[xp_oid].string;
-}
-
-/*
- * ------------------------------------------------------------------------
- * Name: XpOidStringLength
- *
- * Description:
- *
- *     Obtain the length of the string representation for a given
- *     XpOid.
- *
- * Return value:
- *
- *     The string length in bytes.
- *
- */
-int
-XpOidStringLength(XpOid xp_oid)
-{
-    /*
-     * XpOid enum values are index values into the string map
-     */
-    return XpOidStringMap[xp_oid].length;
-}
-
-/*
- * ------------------------------------------------------------------------
- * Name: XpOidFromString
- *
- * Description:
- *
- *     Obtains the XpOid given a string representation of an XpOid.
- *
- *     Example: XpOidFromString("copy-count") returns 'xpoid_copy_count'.
- *
- * Return value:
- *
- *     The XpOid if successful. 'xpoid_none' if the string pointed to by
- *     'value is not recognized or if 'value' is NULL.
- */
-XpOid
-XpOidFromString(const char* value)
-{
-    if(value == (const char*)NULL)
-	return xpoid_none;
-    else
-	return XpOidParse(value, (const char**)NULL);
-}
-
-/*
- * ------------------------------------------------------------------------
- * Name: XpOidParse
- *
- * Description:
- *
- *     Parse the next whitespace-delimited string from 'value_string'
- *     updating 'ptr_return' to point to the next unparsed location in
- *     'value_string'. 'ptr_return' can be NULL.
- *
- * Return value:
- *
- *     The corresponding XpOid for the parsed name string.
- *     A return value of xpoid_none is returned if the parsed name
- *     was not a valid oid or if no name was found.
- *
- */
-static XpOid
-XpOidParse(const char* value_string,
-	   const char** ptr_return)
-{
-    const char* ptr;
-    int length;
-    int i;
-    /*
-     * skip leading whitespace
-     */
-    ptr = value_string + SpanWhitespace(value_string);
-    /*
-     * get the whitespace-delimited token length
-     */
-    length = SpanToken(ptr);
-    /*
-     * match the oid string in the map
-     */
-    for(i = 0; i < XpOidStringMapCount; i++)
-	if(length == XpOidStringMap[i].length)
-	    if(strncmp(ptr, XpOidStringMap[i].string, length) == 0)
-		break;
-    if(i == XpOidStringMapCount)
-	i =  xpoid_none;
-    /*
-     * update the return pointer and return
-     */
-    if(ptr_return != (const char**)NULL)
-	*ptr_return = ptr+length;
-    return i;
-}
-
-/*
- * ------------------------------------------------------------------------
- * Name: XpOidListNew
- *
- * Description:
- *
- *     Creates a new XpOidList initialized from a whitespace-delimited
- *     list of recognized string representations of oids. The returned
- *     list will contain only oids found within the passed 'valid_oids'
- *     XpOidList.
- *
- *     Note: One may notice that in order to create an XpOidList with
- * 	  this function, an XpOidList is needed; the 'valid_oids' list
- * 	  is often an statically initialized structure. XpOidListInit
- * 	  can also be used.
- *
- * Return value:
- *
- *     NULL if the passed 'value_string' is NULL.
- *     
- *     If the list indicated by 'value_string' is empty or contains only
- *     unrecognized oid string representations, a new XpOidList
- *     containing zero elements is returned.
- *
- *     If 'valid_oids' is NULL all oids are considered valid.
- *
- */
-XpOidList*
-XpOidListNew(const char* value_string,
-	     const XpOidList* valid_oids)
-{
-    if(value_string == (const char*)NULL)
-	return (XpOidList*)NULL;
-    else
-    {
-	const char* ptr;
-	return XpOidListParse(value_string, valid_oids, &ptr, 0);
-    }
-}
-
-/*
- * ------------------------------------------------------------------------
- * Name: XpOidListDelete
- *
- * Description:
- *
- *     Frees the memory allocated for 'list'.
- *
- * Return value:
- *
- *     None.
- *
- */
-void
-XpOidListDelete(XpOidList* list)
-{
-    if(list != (XpOidList*)NULL)
-    {
-	XpOidFree((char*)list->list);
-	XpOidFree((char*)list);
-    }
-}
-
-/*
- * ------------------------------------------------------------------------
- * Name: XpOidListParse
- *
- * Description:
- *
- *     This function recursively parses the whitespace-delimited list of
- *     oid string representations passed via 'value_string'. Oids are
- *     only added to the resulting list if they are found within the
- *     passed 'valid_oids' XpOidList.
- *
- *     'ptr_return' points to a char* variable allocated by the
- *     caller, and is really only of use during recursion (upon return to
- *     the original caller, it will point to the end of value_string).
- *
- *     'value_string' and 'ptr_return' *cannot* be NULL.
- *
- * Return value:
- *
- *     A newly allocated and initialized XpOidList.
- *
- *     If the list indicated by 'value_string' is empty or contains only
- *     unrecognized oid string representations, a new XpOidList
- *     containing zero elements is returned.
- *
- *     If 'valid_oids' is NULL all oids are considered valid.
- *
- */
-static XpOidList*
-XpOidListParse(const char* value_string,
-	       const XpOidList* valid_oids,
-	       const char** ptr_return,
-	       int i)
-{
-    XpOid oid;
-    XpOidList* list;
-    /*
-     * parse the next valid oid out of the value string
-     */
-    ptr_return = &value_string;
-    while(1)
-    {
-	if(**ptr_return == '\0')
-	{
-	    /*
-	     * end of value string; stop parsing
-	     */
-	    oid = xpoid_none;
-	    break;
-	}
-	/*
-	 * parse the next oid from the value
-	 */
-	oid = XpOidParse(*ptr_return, ptr_return);
-	if(xpoid_none == oid)
-	{
-	    /*
-	     * unrecognized oid; keep parsing
-	     */
-	    continue;
-	}
-	if((const XpOidList*)NULL == valid_oids
-	   ||
-	   XpOidListHasOid(valid_oids, oid))
-	{
-	    /*
-	     * valid oid found; stop parsing
-	     */
-	    break;
-	}
-    }
-    
-    if(oid == xpoid_none)
-    {
-	/*
-	 * end of value string; allocate the list structure
-	 */
-	list = (XpOidList*)XpOidCalloc(1, sizeof(XpOidList));
-	list->count = i;
-	list->list = (XpOid*)XpOidCalloc(i, sizeof(XpOid));
-    }
-    else
-    {
-	/*
-	 * recurse
-	 */
-	list = XpOidListParse(*ptr_return, valid_oids, ptr_return, i+1);
-	/*
-	 * set the oid in the list
-	 */
-	list->list[i] = oid;
-    }
-    /*
-     * return
-     */
-    return list;
-}
-
-/*
- * ------------------------------------------------------------------------
- * Name: XpOidListHasOid
- *
- * Description:
- *
- *     Determines if 'oid' is an element of 'list'.        
- *
- * Return value:
- *
- *     xTrue if the oid is found in the list.
- *
- *     xFalse if the oid is not in the list, or if 'list' is NULL.
- *
- */
-BOOL
-XpOidListHasOid(const XpOidList* list, XpOid oid)
-{
-    int i;
-    if(list != (XpOidList*)NULL)
-	for(i = 0; i < list->count; i++)
-	    if(list->list[i] == oid)
-		return xTrue;
-    return xFalse;
-}
-
-/*
- * ------------------------------------------------------------------------
- * Name: XpOidListGetIndex
- *
- * Description:
- *
- *     Returns the array index of 'oid' in 'list'    
- *
- * Return value:
- *
- *     The index of 'oid' in list.
- *
- *     -1 if the oid is not in the list, or if 'list' is NULL.
- *
- */
-int
-XpOidListGetIndex(const XpOidList* list, XpOid oid)
-{
-    int i;
-    if(list != (XpOidList*)NULL)
-	for(i = 0; i < list->count; i++)
-	    if(list->list[i] == oid)
-		return i;
-    return -1;
-}
-
-/*
- * ------------------------------------------------------------------------
- * Name: XpOidListString
- *
- * Description:
- *
- *     Creates a string representation of an XpOidList structure.
- *
- * Return value:
- *
- *     A newly allocated     
- *
- */
-char*
-XpOidListString(const XpOidList* me)
-{
-    int i;
-    int length;
-    char* str;
-    char* ptr;
-    /*
-     * allocate enough memory for the oid string representations,
-     * including intervening whitespace
-     */
-    for(i = 0, length = 0; i < XpOidListCount(me); i++)
-	length += XpOidStringLength(XpOidListGetOid(me, i)) + 1;
-    str = XpOidMalloc(length+1);
-    /*
-     * format the list
-     */
-    for(i = 0, ptr = str; i < XpOidListCount(me); i++)
-#if defined(sun) && !defined(SVR4)
-    {
-	sprintf(ptr, "%s ", XpOidString(XpOidListGetOid(me, i)));
-	ptr += strlen(ptr);
-    }
-#else
-	ptr += sprintf(ptr, "%s ", XpOidString(XpOidListGetOid(me, i)));
-#endif
-    /*
-     * chop trailing whitespace or terminate empty string
-     */
-    str[length] = '\0';
-    /*
-     * return
-     */
-    return str;
-}
-
-/*
- * ------------------------------------------------------------------------
- * Name: XpOidLinkedListNew
- *
- * Description:
- *
- *     Creates a new instance of an empty XpOidLinkedList.
- *
- * Return value:
- *
- *     The new XpOidLinkedList.
- *
- */
-XpOidLinkedList*
-XpOidLinkedListNew()
-{
-    return (XpOidLinkedList*)XpOidCalloc(1, sizeof(XpOidLinkedList));
-}
-
-/*
- * ------------------------------------------------------------------------
- * Name: XpOidLinkedListDelete
- *
- * Description:
- *
- *     Frees the memory allocated for a XpOidLinkedList.
- *
- * Return value:
- *
- *     None.
- *
- */
-void
-XpOidLinkedListDelete(XpOidLinkedList* me)
-{
-    if(me != (XpOidLinkedList*)NULL)
-    {
-	while(me->head)
-	{
-	    me->current = me->head;
-	    me->head = me->current->next;
-	    XpOidFree((char*)me->current);
-	}
-	XpOidFree((char*)me);
-    }
-}
-
-/*
- * ------------------------------------------------------------------------
- * Name: XpOidLinkedListGetOid
- *
- * Description:
- *
- *     Retrieves the oid at position 'i' (zero-based) in the
- *     XpOidLinkedList 'me'.
- *
- * Return value:
- *
- *     The oid at position 'i'.
- *
- *     xpoid_none if the oid was not found, or the list is empty (or if
- *     the list contains xpoid_none at position 'i').
- */
-XpOid
-XpOidLinkedListGetOid(XpOidLinkedList* me, int i)
-{
-    if(me == (XpOidLinkedList*)NULL || i < 0 || i >= me->count)
-    {
-	return xpoid_none;
-    }
-    else
-    {
-	me->current = me->head;
-	while(i--) me->current = me->current->next;
-	return me->current->oid;
-    }
-}
-
-/*
- * ------------------------------------------------------------------------
- * Name: XpOidLinkedListAddOid
- *
- * Description:
- *
- *     Adds an oid to the end of an XpOidLinkedList.
- *
- * Return value:
- *
- *     None.
- *
- */
-void
-XpOidLinkedListAddOid(XpOidLinkedList* me, XpOid oid)
-{
-    me->current = (XpOidNode)XpOidCalloc(1, sizeof(struct XpOidNodeStruct));
-    me->current->oid = oid;
-    ++me->count;
-    if(me->tail)
-    {
-	me->tail->next = me->current;
-	me->tail = me->current;
-    }
-    else
-	me->head = me->tail = me->current;
-}
-
-/*
- * ------------------------------------------------------------------------
- * Name: XpOidLinkedListGetIndex
- *
- * Description:
- *
- *     Returns the position of an oid in a XpOidLinkedList.
- *
- * Return value:
- *
- *     The zero-based position of 'oid' in the list.
- *
- *     -1 if the oid is not in the list, or if 'me' is NULL.
- *
- */
-int
-XpOidLinkedListGetIndex(XpOidLinkedList* me, XpOid oid)
-{
-    if((XpOidLinkedList*)NULL != me)
-    {
-	int i = 0;
-	me->current = me->head;
-	while(me->current)
-	    if(me->current->oid == oid)
-	    {
-		return i;
-	    }
-	    else
-	    {
-		++i;
-		me->current = me->current->next;
-	    }
-    }
-    return -1;
-}
-
-/*
- * ------------------------------------------------------------------------
- * Name: XpOidLinkedListHasOid
- *
- * Description:
- *
- *     Determines if an oid is an element of a XpOidLinkedList.
- *
- * Return value:
- *
- *     xTrue if the oid is found in the list.
- *
- *     xFalse if the oid is not in the list, or if 'me' is NULL.
- */
-BOOL
-XpOidLinkedListHasOid(XpOidLinkedList* me,
-		      XpOid oid)
-{
-    if((XpOidLinkedList*)NULL != me)
-    {
-	me->current = me->head;
-	while(me->current)
-	    if(me->current->oid == oid)
-		return xTrue;
-	    else
-		me->current = me->current->next;
-    }
-    return xFalse;
-}
-		       
-/*
- * ------------------------------------------------------------------------
- * Name: XpOidLinkedListFirstOid
- *
- * Description:
- *
- *     Positions the XpOidLinkedList 'current' pointer to the first entry
- *     in the list.
- *
- * Return value:
- *
- *     The first oid in the list, or xpoid_none if the list NULL or
- *     empty.
- */
-XpOid
-XpOidLinkedListFirstOid(XpOidLinkedList* me)
-{
-    if((XpOidLinkedList*)NULL != me && (me->current = me->head))
-	return me->current->oid;
-    else
-	return xpoid_none;
-}
-
-/*
- * ------------------------------------------------------------------------
- * Name: XpOidLinkedListNextOid
- *
- * Description:
- *
- *     Positions the XpOidLinkedList 'current' pointer to the next entry
- *     in the list.
- *
- * Return value:
- *
- *     The next oid, or xpoid_none if the end of the list has been
- *     reached.
- */
-XpOid
-XpOidLinkedListNextOid(XpOidLinkedList* me)
-{
-    if(me->current ? (me->current = me->current->next) : xFalse)
-	return me->current->oid;
-    else
-	return xpoid_none;
-}
-
-/*
- * ------------------------------------------------------------------------
- * Name: XpOidMediumSSNew
- *
- * Description:
- *
- *     Creates a new XpOidMediumSS initialized from a string value
- *     specified using the medium-source-sizes syntax. See
- *     MediumSSParse() below for parsing details.
- *
- * Return value:
- *
- *     NULL if the passed 'value_string' is NULL, or if a syntax error is
- *     encountered while parsing the medium-source-sizes value.
- *     
- */
-XpOidMediumSS*
-XpOidMediumSSNew(const char* value_string,
-		 const XpOidList* valid_trays,
-		 const XpOidList* valid_medium_sizes)
-{
-    if(value_string == (const char*)NULL)
-	return (XpOidMediumSS*)NULL;
-    else
-    {
-	const char* ptr = value_string + SpanWhitespace(value_string);
-	if(*ptr == '\0')
-	    return (XpOidMediumSS*)NULL;
-	else
-	    return MediumSSParse(ptr, valid_trays, valid_medium_sizes,
-				 &ptr, 0);
-    }
-}
-
-/*
- * ------------------------------------------------------------------------
- * Name: MediumSSParse
- *
- * Description:
- *
- *     'ptr_return' *cannot* be NULL.
- *     
- *
- * Return value:
- *
- *     
- *
- */
-static XpOidMediumSS*
-MediumSSParse(const char* value_string,
-	      const XpOidList* valid_trays,
-	      const XpOidList* valid_medium_sizes,
-	      const char** ptr_return,
-	      int i)
-{
-    XpOidMediumSS* medium_ss;
-    XpOidMediumSourceSize mss;
-    /*
-     * check for the start of a new MediumSourceSize sequence
-     */
-    if(ParseSeqStart(value_string, ptr_return))
-    {
-	/*
-	 * check for an unspecified tray value
-	 */
-	if(ParseUnspecifiedValue(*ptr_return, ptr_return))
-	    mss.input_tray = xpoid_unspecified;
-	else
-	{
-	    const char* tray_str;
-	    *ptr_return += SpanWhitespace(*ptr_return);
-	    tray_str = *ptr_return;
-	    /*
-	     * parse out the input tray
-	     */
-	    mss.input_tray = XpOidParse(*ptr_return, ptr_return);
-	    if((const XpOidList*)NULL != valid_trays
-	       &&
-	       !XpOidListHasOid(valid_trays, mss.input_tray)
-	       )
-		mss.input_tray = xpoid_none;
-	    if(xpoid_none == mss.input_tray)
-	    {
-		char* invalid_tray_str;
-		int len = *ptr_return - tray_str;
-		if(len > 0)
-		{
-		    invalid_tray_str = XpOidMalloc(len+1);
-		    strncpy(invalid_tray_str, tray_str, len);
-		    invalid_tray_str[len] = '\0';
-		    ErrorF("%s\nInvalid tray (%s) found. Will attempt to continue parsing.\n",
-			   XPMSG_WARN_MSS, invalid_tray_str);
-		    XpOidFree(invalid_tray_str);
-		}
-	    }
-	}
-	/*
-	 * attempt to parse a Continuous MediumSize sequence
-	 */
-	mss.ms.continuous_size =
-	    MediumContinuousSizeParse(*ptr_return, ptr_return);
-	if(mss.ms.continuous_size != (XpOidMediumContinuousSize*)NULL)
-	{
-	    mss.mstag = XpOidMediumSS_CONTINUOUS;
-	}
-	else
-	{
-	    /*
-	     * not continuous, try Discrete MediumSize
-	     */
-	    mss.ms.discrete =
-		MediumDiscreteSizeListParse(*ptr_return, valid_medium_sizes,
-					    ptr_return, 0);
-	    if(mss.ms.discrete == (XpOidMediumDiscreteSizeList*)NULL)
-	    {
-		const char* tray_str;
-		/*
-		 * syntax error (MediumDiscreteSizeListParse reports error)
-		 */
-		switch(mss.input_tray)
-		{
-		case xpoid_none:
-		    tray_str = "an invalid";
-		    break;
-		case xpoid_unspecified:
-		    tray_str = "default (tray specifier omitted)";
-		    break;
-		default:
-		    tray_str = XpOidString(mss.input_tray);
-		    break;
-		}
-		ErrorF("%s\nError occurred while parsing medium sizes for %s tray.\n",
-		       XPMSG_WARN_MSS, tray_str);
-		return NULL;
-	    }
-	    mss.mstag = XpOidMediumSS_DISCRETE;
-	}
-	/*
-	 * parse out the MediumSourceSize sequence end
-	 */
-	if(!ParseSeqEnd(*ptr_return, ptr_return))
-	{
-	    /*
-	     * syntax error
-	     */
-	    ErrorF("%s\nSequence End expected. Unparsed data: %s\n",
-		   XPMSG_WARN_MSS, *ptr_return);
-	    return NULL;
-	}
-	/*
-	 * recurse to parse the next MediumSourceSize sequence
-	 */
-	medium_ss = MediumSSParse(*ptr_return,
-				  valid_trays, valid_medium_sizes,
-				  ptr_return,
-				  xpoid_none == mss.input_tray ? i : i+1);
-	if(medium_ss == (XpOidMediumSS*)NULL
-	   ||
-	   xpoid_none == mss.input_tray)
-	{
-	    /*
-	     * syntax error or invalid tray - clean up
-	     */
-	    switch(mss.mstag)
-	    {
-	    case XpOidMediumSS_CONTINUOUS:
-		MediumContinuousSizeDelete(mss.ms.continuous_size);
-		break;
-	    case XpOidMediumSS_DISCRETE:
-		MediumDiscreteSizeListDelete(mss.ms.discrete);
-		break;
-	    }
-	    if(medium_ss == (XpOidMediumSS*)NULL)
-		/*
-		 * syntax error - return
-		 */
-		return NULL;
-	}
-	if(xpoid_none != mss.input_tray)
-	{
-	    /*
-	     * copy the current MediumSourceSize into the array
-	     */
-	    memmove((medium_ss->mss)+i, &mss, sizeof(XpOidMediumSourceSize));
-	}
-    }
-    else
-    {
-	/*
-	 * MediumSourceSize sequence start not found
-	 */
-	if(**ptr_return == '\0')
-	{
-	    if(0 == i)
-	    {
-		ErrorF("%s\nNo valid trays found.\n", XPMSG_WARN_MSS);
-		return NULL;
-	    }
-	    /*
-	     * end of value string; allocate the MediumSS structure
-	     */
-	    medium_ss = (XpOidMediumSS*)XpOidCalloc(1, sizeof(XpOidMediumSS));
-	    medium_ss->count = i;
-	    medium_ss->mss = (XpOidMediumSourceSize*)
-		XpOidCalloc(i, sizeof(XpOidMediumSourceSize));
-	}
-	else
-	{
-	    /*
-	     * syntax error
-	     */
-	    ErrorF("%s\nSequence Start expected.\nunparsed data: %s\n",
-		   XPMSG_WARN_MSS, *ptr_return);
-	    return NULL;
-	}
-    }
-    return medium_ss;
-}
-
-/*
- * ------------------------------------------------------------------------
- * Name: XpOidMediumSSDelete
- *
- * Description:
- *
- *     
- *
- * Return value:
- *
- *     
- *
- */
-void
-XpOidMediumSSDelete(XpOidMediumSS* me)
-{
-    if(me != (XpOidMediumSS*)NULL)
-    {
-	int i;
-	for(i = 0; i < me->count; i++)
-	{
-	    switch((me->mss)[i].mstag)
-	    {
-	    case XpOidMediumSS_CONTINUOUS:
-		MediumContinuousSizeDelete((me->mss)[i].ms.continuous_size);
-		break;
-	    case XpOidMediumSS_DISCRETE:
-		MediumDiscreteSizeListDelete((me->mss)[i].ms.discrete);
-		break;
-	    }
-	}
-	XpOidFree((char*)me);
-    }
-}
-
-/*
- * ------------------------------------------------------------------------
- * Name: XpOidMediumSSHasSize
- *
- * Description:
- *
- *     
- *
- * Return value:
- *
- *     
- *
- */
-BOOL
-XpOidMediumSSHasSize(XpOidMediumSS* me, XpOid page_size)
-{
-    int i_mss, i_ds;
-    XpOidMediumDiscreteSizeList* ds_list;
-
-    if(me != (XpOidMediumSS*)NULL && page_size != xpoid_none)
-	for(i_mss = 0; i_mss < me->count; i_mss++)
-	{
-	    switch((me->mss)[i_mss].mstag)
-	    {
-	    case XpOidMediumSS_DISCRETE:
-		ds_list =  (me->mss)[i_mss].ms.discrete;
-		for(i_ds = 0; i_ds < ds_list->count; i_ds++)
-		    if(page_size == (ds_list->list)[i_ds].page_size)
-			return xTrue;
-		break;
-
-	    case XpOidMediumSS_CONTINUOUS:
-		/*
-		 * unsupported
-		 */
-		break;
-	    }
-	}
-    /*
-     * return
-     */
-    return xFalse;
-}
-
-/*
- * ------------------------------------------------------------------------
- * Name: XpOidMediumSSString
- *
- * Description:
- *
- *     Creates a string representation of an XpOidMediumSS structure.
- *
- * Return value:
- *
- *     A newly allocated     
- *
- */
-char* XpOidMediumSSString(const XpOidMediumSS* me)
-{
-    int itray, isize;
-    int valid_size_count;
-    int length;
-    char* str;
-    char* ptr;
-    XpOidMediumDiscreteSize* ds;
-    char buf[128];
-    /*
-     * determine the size of the string representation
-     */
-    for(itray = 0, length = 0; itray < XpOidMediumSSCount(me); itray++)
-    {
-	if(xpoid_none == me->mss[itray].input_tray
-	   ||
-	   XpOidMediumSS_CONTINUOUS == me->mss[itray].mstag)
-	{
-	    /*
-	     * skip invalid tray or unsupported continuous size spec
-	     */
-	    continue;
-	}
-	for(isize = 0, valid_size_count = 0;
-	    isize < me->mss[itray].ms.discrete->count;
-	    isize++)
-	{
-	    ds = me->mss[itray].ms.discrete->list+isize;
-	    if(ds->page_size == xpoid_none)
-		continue;
-	    ++valid_size_count;
-	    length += XpOidStringLength(ds->page_size);
-	    length += ds->long_edge_feeds ? 4 : 5; /* "True" or "False" */
-#if defined(sun) && !defined(SVR4)
-	    sprintf(buf, "{%.4f %.4f %.4f %.4f}",
-			      ds->assured_reproduction_area.minimum_x,
-			      ds->assured_reproduction_area.maximum_x,
-			      ds->assured_reproduction_area.minimum_y,
-			      ds->assured_reproduction_area.maximum_y);
-	    length += strlen(buf);
-#else
-	    length += sprintf(buf, "{%.4f %.4f %.4f %.4f}",
-			      ds->assured_reproduction_area.minimum_x,
-			      ds->assured_reproduction_area.maximum_x,
-			      ds->assured_reproduction_area.minimum_y,
-			      ds->assured_reproduction_area.maximum_y);
-#endif
-	    length += 5; /* "{<size> <feed> <area>} " */
-	}
-	if(valid_size_count == 0)
-	{
-	    /*
-	     * no valid sizes, skip
-	     */
-	    continue;
-	}
-	if(xpoid_unspecified == me->mss[itray].input_tray)
-	    length += 2;	 /* "''" */
-	else
-	    length += XpOidStringLength(me->mss[itray].input_tray);
-	length += 4; /* "{<tray> <sizes>} " */
-    }
-    /*
-     * allocate
-     */
-    str = XpOidMalloc(length+1);
-    /*
-     * format
-     */
-    for(itray = 0, ptr = str; itray < XpOidMediumSSCount(me); itray++)
-    {
-	if(xpoid_none == me->mss[itray].input_tray
-	   ||
-	   XpOidMediumSS_CONTINUOUS == me->mss[itray].mstag)
-	{
-	    /*
-	     * skip invalid tray or unsupported continuous size spec
-	     */
-	    continue;
-	}
-	/*
-	 * check to ensure all of the specified sizes are valid
-	 */
-	for(isize = 0, valid_size_count = 0;
-	    isize < me->mss[itray].ms.discrete->count;
-	    isize++)
-	{
-	    ds = me->mss[itray].ms.discrete->list+isize;
-	    if(ds->page_size != xpoid_none)
-		++valid_size_count;
-	}
-	if(valid_size_count == 0)
-	{
-	    /*
-	     * no valid sizes, skip
-	     */
-	    continue;
-	}
-
-	if(xpoid_unspecified == me->mss[itray].input_tray)
-	{
-#if defined(sun) && !defined(SVR4)
-	    sprintf(ptr, "{'' ");
-	    ptr += strlen(ptr);
-#else
-	    ptr += sprintf(ptr, "{'' ");
-#endif
-	}
-	else
-	{
-#if defined(sun) && !defined(SVR4)
-	    sprintf(ptr, "{%s ", XpOidString(me->mss[itray].input_tray));
-	    ptr += strlen(ptr);
-#else
-	    ptr += sprintf(ptr, "{%s ",
-			   XpOidString(me->mss[itray].input_tray));
-#endif
-	}
-	for(isize = 0; isize < me->mss[itray].ms.discrete->count; isize++)
-	{
-	    ds = me->mss[itray].ms.discrete->list+isize;
-	    if(ds->page_size != xpoid_none)
-#if defined(sun) && !defined(SVR4)
-	    {
-		sprintf(ptr, "{%s %s {%.4f %.4f %.4f %.4f}} ",
-			       XpOidString(ds->page_size),
-			       ds->long_edge_feeds ? "True" : "False",
-			       ds->assured_reproduction_area.minimum_x,
-			       ds->assured_reproduction_area.maximum_x,
-			       ds->assured_reproduction_area.minimum_y,
-			       ds->assured_reproduction_area.maximum_y);
-		ptr += strlen(ptr);
-	    }
-#else
-		ptr += sprintf(ptr, "{%s %s {%.4f %.4f %.4f %.4f}} ",
-			       XpOidString(ds->page_size),
-			       ds->long_edge_feeds ? "True" : "False",
-			       ds->assured_reproduction_area.minimum_x,
-			       ds->assured_reproduction_area.maximum_x,
-			       ds->assured_reproduction_area.minimum_y,
-			       ds->assured_reproduction_area.maximum_y);
-#endif
-	}
-#if defined(sun) && !defined(SVR4)
-	sprintf(ptr, "} ");
-	ptr += strlen(ptr);
-#else
-	ptr += sprintf(ptr, "} ");
-#endif
-    }
-    /*
-     * chop trailing whitespace or terminate empty string
-     */
-    str[length] = '\0';
-    /*
-     * return
-     */
-    return str;
-}
-
-/*
- * ------------------------------------------------------------------------
- * Name: MediumContinuousSizeParse
- *
- * Description:
- *
- *     'ptr_return' *cannot* be NULL.
- *     
- *
- * Return value:
- *
- *     
- *
- */
-static XpOidMediumContinuousSize*
-MediumContinuousSizeParse(const char* value_string,
-			  const char** ptr_return)
-{
-    const char* first_nonws_ptr;
-    XpOidMediumContinuousSize* mcs = NULL;
-    /*
-     * skip leading whitespace
-     */
-    first_nonws_ptr = value_string + SpanWhitespace(value_string);
-    /*
-     * parse out the MediumSize sequence start char
-     */
-    if(!ParseSeqStart(first_nonws_ptr, ptr_return))
-	goto MediumContinuousSizeParse_error;
-    /*
-     * peek ahead to see if it looks like we actually have a continuous
-     * size spec (looking for the sequence start char on the 1st range spec)
-     */
-    if(!ParseSeqStart(*ptr_return, (const char**)NULL))
-	goto MediumContinuousSizeParse_error;
-    /*
-     * Ok, let's go for it
-     */
-    mcs = (XpOidMediumContinuousSize*)
-	XpOidCalloc(1, sizeof(XpOidMediumContinuousSize));
-    /*
-     * "range across the feed direction"
-     */
-    if(!ParseRealRange(*ptr_return, ptr_return, &mcs->range_across_feed))
-	goto MediumContinuousSizeParse_error;
-    /*
-     * "increment across the feed direction" (optional, default 0)
-     */
-    if(!ParseUnspecifiedValue(*ptr_return, ptr_return))
-	if(!ParseRealValue(*ptr_return, ptr_return,
-			   &mcs->increment_across_feed))
-	    goto MediumContinuousSizeParse_error;
-    /*
-     * "range in the feed direction"
-     */
-    if(!ParseRealRange(*ptr_return, ptr_return, &mcs->range_in_feed))
-	goto MediumContinuousSizeParse_error;
-    /*
-     * "increment in the feed direction" (optional, default 0)
-     */
-    if(!ParseUnspecifiedValue(*ptr_return, ptr_return))
-	if(!ParseRealValue(*ptr_return, ptr_return,
-			       &mcs->increment_in_feed))
-	    goto MediumContinuousSizeParse_error;
-    /*
-     * "long edge feeds" flag (default TRUE)
-     */
-    if(ParseUnspecifiedValue(*ptr_return, ptr_return))
-	mcs->long_edge_feeds = xTrue;
-    else
-	if(!ParseBoolValue(*ptr_return, ptr_return, &mcs->long_edge_feeds))
-	    goto MediumContinuousSizeParse_error;
-    /*
-     * "generic assured reproduction area"
-     */
-    if(!ParseArea(*ptr_return, ptr_return, &mcs->assured_reproduction_area))
-	goto MediumContinuousSizeParse_error;
-    /*
-     * parse out the MediumSize sequence end character
-     */
-    if(!ParseSeqEnd(*ptr_return, ptr_return))
-	goto MediumContinuousSizeParse_error;
-    /*
-     * return
-     */
-    return mcs;
-    
-
- MediumContinuousSizeParse_error:
-    /*
-     * syntax error - don't log since this function may be called
-     * as a lookahead
-     */
-    *ptr_return = first_nonws_ptr;
-    XpOidFree((char*)mcs);
-    return NULL;
-}
-
-/*
- * ------------------------------------------------------------------------
- * Name: MediumContinuousSizeDelete
- *
- * Description:
- *
- *     'ptr_return' *cannot* be NULL.
- *     
- *
- * Return value:
- *
- *     
- *
- */
-static void
-MediumContinuousSizeDelete(XpOidMediumContinuousSize* me)
-{
-    XpOidFree((char*)me);
-}
-
-/*
- * ------------------------------------------------------------------------
- * Name: MediumDiscreteSizeListParse
- *
- * Description:
- *
- *     'ptr_return' *cannot* be NULL.
- *
- * Return value:
- *
- *     
- *
- */
-static XpOidMediumDiscreteSizeList*
-MediumDiscreteSizeListParse(const char* value_string,
-			    const XpOidList* valid_medium_sizes,
-			    const char** ptr_return,
-			    int i)
-{
-    XpOidMediumDiscreteSizeList* list;
-    XpOidMediumDiscreteSize mds;
-    /*
-     * check for the start of a new MediumSize sequence
-     */
-    if(ParseSeqStart(value_string, ptr_return))
-    {
-	/*
-	 * "page size"
-	 */
-	mds.page_size = XpOidParse(*ptr_return, ptr_return);
-	if((const XpOidList*)NULL != valid_medium_sizes
-	   &&
-	   !XpOidListHasOid(valid_medium_sizes, mds.page_size)
-	   )
-	    mds.page_size = xpoid_none;
-	/*
-	 * "long edge feeds" flag (default TRUE)
-	 */
-	if(ParseUnspecifiedValue(*ptr_return, ptr_return))
-	    mds.long_edge_feeds = xTrue;
-	else
-	    if(!ParseBoolValue(*ptr_return, ptr_return,
-				  &mds.long_edge_feeds))
-	    {
-		/*
-		 * syntax error
-		 */
-		ErrorF("%s\nBoolean expected.\nunparsed data: %s\n",
-		       XPMSG_WARN_MSS, *ptr_return);
-		return (XpOidMediumDiscreteSizeList*)NULL;
-	    }
-	/*
-	 * "assured reproduction area"
-	 */
-	if(!ParseArea(*ptr_return, ptr_return,
-		      &mds.assured_reproduction_area))
-	{
-	    /*
-	     * syntax error
-	     */
-	    ErrorF("%s\nArea specification error.\nunparsed data: %s\n",
-		   XPMSG_WARN_MSS, *ptr_return);
-	    return (XpOidMediumDiscreteSizeList*)NULL;
-	}
-	/*
-	 * parse out the MediumSize sequence end character
-	 */
-	if(!ParseSeqEnd(*ptr_return, ptr_return))
-	{
-	    ErrorF("%s\nSequence End expected. Unparsed data: %s\n",
-		   XPMSG_WARN_MSS, *ptr_return);
-	    return (XpOidMediumDiscreteSizeList*)NULL;
-	}
-	/*
-	 * recurse to parse the next Discrete MediumSize sequence
-	 */
-	if(mds.page_size == xpoid_none)
-	{
-	    list = MediumDiscreteSizeListParse(*ptr_return, valid_medium_sizes,
-					       ptr_return, i);
-	}
-	else
-	{
-	    list = MediumDiscreteSizeListParse(*ptr_return, valid_medium_sizes,
-					       ptr_return, i+1);
-	    if(list != (XpOidMediumDiscreteSizeList*)NULL)
-	    {
-		/*
-		 * copy the current discrete MediumSize into the list
-		 */
-		memmove((list->list)+i, &mds, sizeof(XpOidMediumDiscreteSize));
-	    }
-	}
-    }
-    else
-    {
-	/*
-	 * MediumSize sequence start not found; end of the discrete sizes
-	 * list
-	 */
-	if(0 == i)
-	{
-	    ErrorF("%s\nNo valid medium sizes found for tray.\n",
-		   XPMSG_WARN_MSS);
-	    return (XpOidMediumDiscreteSizeList*)NULL;
-	}
-	list = (XpOidMediumDiscreteSizeList*)
-	    XpOidCalloc(1, sizeof(XpOidMediumDiscreteSizeList));
-	list->count = i;
-	list->list = (XpOidMediumDiscreteSize*)
-	    XpOidCalloc(i, sizeof(XpOidMediumDiscreteSize));
-    }
-    return list;
-}
-
-/*
- * ------------------------------------------------------------------------
- * Name: MediumDiscreteSizeListDelete
- *
- * Description:
- *
- *     
- *
- * Return value:
- *
- *     
- *
- */
-static void
-MediumDiscreteSizeListDelete(XpOidMediumDiscreteSizeList* list)
-{
-    if(list != (XpOidMediumDiscreteSizeList*)NULL)
-    {
-	XpOidFree((char*)list->list);
-	XpOidFree((char*)list);
-    }
-}
-
-/*
- * ------------------------------------------------------------------------
- * Name: XpOidTrayMediumListNew
- *
- * Description:
- *
- *     Only need the valid trays; validation requires bumping up against
- *     msss using TrayMediumListValidate; this needs valid trays
- *     because of unspecified trays ion msss, but
- *     TrayMediumListValidate will take care of invalid sizes...
- *
- * Return value:
- *
- *     
- *
- */
-XpOidTrayMediumList*
-XpOidTrayMediumListNew(const char* value_string,
-		       const XpOidList* valid_trays,
-		       const XpOidMediumSS* msss)
-{
-    if(value_string == (const char*)NULL)
-	return (XpOidTrayMediumList*)NULL;
-    else
-    {
-	const char* ptr;
-	XpOidTrayMediumList* me;
-	me = TrayMediumListParse(value_string, valid_trays, &ptr, 0);
-	if((XpOidTrayMediumList*)NULL != me)
-	    TrayMediumListValidate(me, msss);
-	return me;
-    }
-}
-
-/*
- * ------------------------------------------------------------------------
- * Name: XpOidTrayMediumListDelete
- *
- * Description:
- *
- *     
- *
- * Return value:
- *
- *     
- *
- */
-void
-XpOidTrayMediumListDelete(XpOidTrayMediumList* list)
-{
-    if(list != (XpOidTrayMediumList*)NULL)
-    {
-	XpOidFree((char*)list->list);
-	XpOidFree((char*)list);
-    }
-}
-
-/*
- * ------------------------------------------------------------------------
- * Name: TrayMediumListParse
- *
- * Description:
- *
- *     'ptr_return' *cannot* be NULL.
- *
- * Return value:
- *
- *     
- *
- */
-static XpOidTrayMediumList*
-TrayMediumListParse(const char* value_string,
-		    const XpOidList* valid_trays,
-		    const char** ptr_return, int i)
-{
-    XpOidTrayMedium tm;
-    XpOidTrayMediumList* list;
-    /*
-     * check for the start of a new InputTrayMedium sequence
-     */
-    if(ParseSeqStart(value_string, ptr_return))
-    {
-	/*
-	 * "input tray"
-	 */
-	tm.input_tray = XpOidParse(*ptr_return, ptr_return);
-	if((XpOidList*)NULL != valid_trays
-	   &&
-	   !XpOidListHasOid(valid_trays, tm.input_tray)
-	   )
-	    tm.input_tray = xpoid_none;
-	/*
-	 * "medium"
-	 */
-	tm.medium = XpOidParse(*ptr_return, ptr_return);
-	/*
-	 * parse out the InputTrayMedium sequence end character
-	 */
-	if(!ParseSeqEnd(*ptr_return, ptr_return))
-	{
-	    ErrorF("%s\n", XPMSG_WARN_ITM);
-	    return NULL;
-	}
-	/*
-	 * recurse to parse the next InputTrayMedium sequence
-	 */
-	list = TrayMediumListParse(*ptr_return, valid_trays, ptr_return, i+1);
-	if(list != (XpOidTrayMediumList*)NULL)
-	{
-	    /*
-	     * copy the current InputTrayMedium into the list
-	     */
-	    memmove((list->list)+i, &tm, sizeof(XpOidTrayMedium));
-	}
-    }
-    else
-    {
-	/*
-	 * InputTrayMedium sequence start not found
-	 */
-	if(**ptr_return == '\0')
-	{
-	    /*
-	     * end of the list
-	     */
-	    list = (XpOidTrayMediumList*)
-		XpOidCalloc(1, sizeof(XpOidTrayMediumList));
-	    list->count = i;
-	    list->list = (XpOidTrayMedium*)
-		XpOidCalloc(i, sizeof(XpOidTrayMedium));
-	}
-	else
-	{
-	    /*
-	     * syntax error
-	     */
-	    ErrorF("%s\n", XPMSG_WARN_ITM);
-	    return NULL;
-	}
-    }
-    /*
-     * return
-     */
-    return list;
-}
-
-/*
- * ------------------------------------------------------------------------
- * Name: TrayMediumListValidate
- *
- * Description:
- *
- *     Validate the input-trays-medium list based on a passed
- *     medium-source-sizes-supported structure. The validated
- *     input-trays-medium list will have the same number of entries upon
- *     return from this function. Invalid entries are indicated by
- *     setting the tray specification to xpoid_none.
- *
- * Return value:
- *
- *     None.
- *
- */
-static void
-TrayMediumListValidate(XpOidTrayMediumList* me,
-		       const XpOidMediumSS* msss)
-{
-    int i_mss, i_ds, i_itm;
-    XpOid current_tray, current_medium;
-    XpOidMediumDiscreteSizeList* unspecified_tray_ds;
-    XpOidMediumDiscreteSizeList* tray_ds;
-
-    if(msss == (XpOidMediumSS*)NULL
-       ||
-       me == (XpOidTrayMediumList*)NULL)
-    {
-	return;
-    }
-    /*
-     * loop through the input trays medium list
-     */
-    for(i_itm = 0; i_itm < XpOidTrayMediumListCount(me); i_itm++)
-    {
-	current_tray = XpOidTrayMediumListTray(me, i_itm);
-	if(current_tray == xpoid_none)
-	    continue;
-	current_medium = XpOidTrayMediumListMedium(me, i_itm);
-	if(current_medium == xpoid_none)
-	{
-	    /*
-	     * no medium; invalidate this entry
-	     */
-	    me->list[i_itm].input_tray = xpoid_none;
-	    continue;
-	}
-	/*
-	 * loop through the MediumSourceSizes, looking for an appropriate
-	 * discrete sizes spec for the current tray
-	 */
-	unspecified_tray_ds = (XpOidMediumDiscreteSizeList*)NULL;
-	tray_ds = (XpOidMediumDiscreteSizeList*)NULL;
-	for(i_mss = 0;
-	    i_mss < msss->count &&
-	    tray_ds == (XpOidMediumDiscreteSizeList*)NULL;
-	    i_mss++)
-	{
-	    switch((msss->mss)[i_mss].mstag)
-	    {
-	    case XpOidMediumSS_DISCRETE:
-		if((msss->mss)[i_mss].input_tray == current_tray)
-		    tray_ds = (msss->mss)[i_mss].ms.discrete;
-		else if((msss->mss)[i_mss].input_tray == xpoid_unspecified)
-		    unspecified_tray_ds = (msss->mss)[i_mss].ms.discrete;
-		break;
-		   
-	    case XpOidMediumSS_CONTINUOUS:
-		/*
-		 * unsupported
-		 */
-		break;
-	    }
-	}
-	/*
-	 * if the tray was not matched, use the unspecified tray size
-	 * list
-	 */
-	if(tray_ds == (XpOidMediumDiscreteSizeList*)NULL)
-	{
-	    if(unspecified_tray_ds == (XpOidMediumDiscreteSizeList*)NULL)
-	    {
-		/*
-		 * not even an unspecified tray, invalidate this
-		 * input-trays-medium entry.
-		 */
-		me->list[i_itm].input_tray = xpoid_none;
-		continue;
-	    }
-	    else
-		tray_ds = unspecified_tray_ds;
-	}
-	/*
-	 * loop through the discrete sizes list, looking for a size that
-	 * matches the medium for the current input tray
-	 */
-	for(i_ds = 0; i_ds < tray_ds->count; i_ds++)
-	{
-	    /*
-	     * check to see if the current input tray's medium size
-	     * matches the current discrete size
-	     *
-	     * Note: in the CDEnext SI, medium identifiers coincide with
-	     *       medium-size identifiers. If the DP-Medium object is
-	     *       ever implemented, this check would need to be
-	     *       changed so that the input tray's medium size is
-	     *       obtained from the indicated Medium object, and not
-	     *       inferred from the medium identifier itself.
-	     */
-	    if((tray_ds->list)[i_ds].page_size == current_medium)
-	    {
-		/*
-		 * The current input tray's medium size matches the
-		 * current discrete medium size.
-		 */
-		break;
-	    }
-	}
-	if(i_ds == tray_ds->count)
-	{
-	    /*
-	     * The current input tray's medium size was not found in the
-	     * discrete size list; mark the input tray medium entry
-	     * invalid
-	     */
-	    me->list[i_itm].input_tray = xpoid_none;
-	}
-	
-    }
-}
-
-/*
- * ------------------------------------------------------------------------
- * Name: XpOidTrayMediumListString
- *
- * Description:
- *
- *     Creates a string representation of an XpOidTrayMediumList structure.
- *
- * Return value:
- *
- *     A newly allocated     
- *
- */
-char* XpOidTrayMediumListString(const XpOidTrayMediumList* me)
-{
-    int i;
-    int length;
-    char* str;
-    char* ptr;
-    XpOid tray;
-    /*
-     * allocate enough memory for the string representation,
-     * including intervening delimiters and whitespace
-     */
-    for(i = 0, length = 0; i < XpOidTrayMediumListCount(me); i++)
-    {
-	tray = XpOidTrayMediumListTray(me, i);
-	if(xpoid_none != tray)
-	{
-	    length += XpOidStringLength(tray);
-	    length += XpOidStringLength(XpOidTrayMediumListMedium(me, i));
-	    length += 4;
-	}
-    }
-    str = XpOidMalloc(length+1);
-    /*
-     * format the list
-     */
-    for(i = 0, ptr = str; i < XpOidTrayMediumListCount(me); i++)
-    {
-	tray = XpOidTrayMediumListTray(me, i);
-	if(xpoid_none != tray)
-	{
-#if defined(sun) && !defined(SVR4)
-	    sprintf(ptr, "{%s %s} ",
-			   XpOidString(tray),
-			   XpOidString(XpOidTrayMediumListMedium(me, i)));
-	    ptr += strlen(ptr);
-#else
-	    ptr += sprintf(ptr, "{%s %s} ",
-			   XpOidString(tray),
-			   XpOidString(XpOidTrayMediumListMedium(me, i)));
-#endif
-	}
-    }
-    /*
-     * chop trailing whitespace or terminate empty string
-     */
-    str[length] = '\0';
-    /*
-     * return
-     */
-    return str;
-}
-
-/*
- * ------------------------------------------------------------------------
- * Name: XpOidTrayMediumListHasTray
- *
- * Description:
- *
- *     Determines if 'tray' is found in 'list'.
- *
- * Return value:
- *
- *     xTrue if the tray is found in the list.
- *
- *     xFalse if the tray is not in the list, or if 'list' is NULL.
- *
- */
-BOOL
-XpOidTrayMediumListHasTray(const XpOidTrayMediumList* list, XpOid tray)
-{
-    int i;
-    if(list != (XpOidTrayMediumList*)NULL && tray != xpoid_none)
-	for(i = 0; i < list->count; i++)
-	    if(XpOidTrayMediumListTray(list, i) == tray)
-		return xTrue;
-    return xFalse;
-}
-
-/*
- * ------------------------------------------------------------------------
- * Name: ParseArea
- *
- * Description:
- *
- *     Skips leading whitespace and parses out and returns a XpOidArea.
- *
- * Return value:
- *
- *     xTrue if the XpOidArea was successfully parsed. ptr_return is
- *     updated to point to location where the parsing ended.
- *
- *     xFalse if a XpOidArea was not found; ptr_return is updated
- *     to point to the first non-whitespace char in value_string.
- *
- */
-static BOOL
-ParseArea(const char* value_string,
-	  const char** ptr_return,
-	  XpOidArea* area_return)
-{
-    const char* first_nonws_ptr;
-    const char* ptr;
-    /*
-     * skip leading whitespace
-     */
-    first_nonws_ptr = value_string + SpanWhitespace(value_string);
-    /*
-     * parse out the area sequence start
-     */
-    if(!ParseSeqStart(first_nonws_ptr, &ptr))
-	goto ParseArea_error;
-    /*
-     * parse the minimum x value
-     */
-    if(!ParseRealValue(ptr, &ptr,
-		       area_return ? &area_return->minimum_x : NULL))
-	goto ParseArea_error;
-    /*
-     * parse the maximum x value
-     */
-    if(!ParseRealValue(ptr, &ptr,
-		       area_return ? &area_return->maximum_x : NULL))
-	goto ParseArea_error;
-    /*
-     * parse the minimum y value
-     */
-    if(!ParseRealValue(ptr, &ptr,
-		       area_return ? &area_return->minimum_y : NULL))
-	goto ParseArea_error;
-    /*
-     * parse the maximum y value
-     */
-    if(!ParseRealValue(ptr, &ptr,
-		       area_return ? &area_return->maximum_y : NULL))
-	goto ParseArea_error;
-    /*
-     * parse out the area sequence end
-     */
-    if(!ParseSeqEnd(ptr, &ptr))
-	goto ParseArea_error;
-    /*
-     * update the return pointer
-     */
-    if(ptr_return != (const char**)NULL)
-	*ptr_return = ptr;
-    /*
-     * return
-     */
-    return xTrue;
-    
-
- ParseArea_error:
-    /*
-     * syntax error
-     */
-    if(ptr_return != (const char**)NULL)
-	*ptr_return = first_nonws_ptr;
-    return xFalse;
-}
-
-/*
- * ------------------------------------------------------------------------
- * Name: ParseRealRange
- *
- * Description:
- *
- *     Skips leading whitespace and parses out and returns a
- *     XpOidRealRange.
- *
- * Return value:
- *
- *     xTrue if the XpOidRealRange was successfully
- *     parsed. ptr_return is updated to point to location where the
- *     parsing ended.
- *
- *     xFalse if a XpOidRealRange was not found; ptr_return is
- *     updated to point to the first non-whitespace char in value_string.
- *
- */
-static BOOL
-ParseRealRange(const char* value_string,
-	       const char** ptr_return,
-	       XpOidRealRange* range_return)
-{
-    const char* first_nonws_ptr;
-    const char* ptr;
-    /*
-     * skip leading whitespace
-     */
-    first_nonws_ptr = value_string + SpanWhitespace(value_string);
-    /*
-     * parse out the range sequence start
-     */
-    if(!ParseSeqStart(first_nonws_ptr, &ptr))
-	goto ParseRealRange_error;
-    /*
-     * parse the lower bound
-     */
-    if(!ParseRealValue(ptr, &ptr,
-		       range_return ? &range_return->lower_bound : NULL))
-	goto ParseRealRange_error;
-    /*
-     * parse the upper bound
-     */
-    if(!ParseRealValue(ptr, &ptr,
-		       range_return ? &range_return->upper_bound : NULL))
-	goto ParseRealRange_error;
-    /*
-     * parse out the range sequence end
-     */
-    if(!ParseSeqEnd(ptr, &ptr))
-	goto ParseRealRange_error;
-    /*
-     * update the return pointer
-     */
-    if(ptr_return != (const char**)NULL)
-	*ptr_return = ptr;
-    /*
-     * return
-     */
-    return xTrue;
-    
-
- ParseRealRange_error:
-    /*
-     * syntax error
-     */
-    if(ptr_return != (const char**)NULL)
-	*ptr_return = first_nonws_ptr;
-    return xFalse;
-}
-
-/*
- * ------------------------------------------------------------------------
- * Name: XpOidNotifyParse
- *
- * Description:
- *
- *
- * Return value:
- *
- *
- */
-XpOidNotify XpOidNotifyParse(const char* value_string)
-{
-    const char* ptr = value_string;
-
-    if(value_string == (const char*)NULL)
-	return XPOID_NOTIFY_NONE;
-    /*
-     * look for an event handling profile sequence start
-     */
-    if(!ParseSeqStart(value_string, &ptr))
-    {
-	if('\0' == *ptr)
-	    /*
-	     * empty value is valid
-	     */
-	    return XPOID_NOTIFY_NONE;
-	else
-	    return XPOID_NOTIFY_UNSUPPORTED;
-    }
-    /*
-     * look for an event set sequence start
-     */
-    if(!ParseSeqStart(ptr, &ptr))
-    {
-	/*
-	 * check for an empty event handling profile
-	 */
-	if(ParseSeqEnd(ptr, &ptr))
-	{
-	    ptr += SpanWhitespace(ptr);
-	    if(*ptr == '\0')
-		/*
-		 * valid empty event handling profile sequence
-		 */
-		return XPOID_NOTIFY_NONE;
-	}
-	return XPOID_NOTIFY_UNSUPPORTED;
-    }
-    /*
-     * the only event in the set should be report job completed
-     */
-    if(xpoid_val_event_report_job_completed != XpOidParse(ptr, &ptr))
-	return XPOID_NOTIFY_UNSUPPORTED;
-    /*
-     * event set sequence end
-     */
-    if(!ParseSeqEnd(ptr, &ptr))
-	return XPOID_NOTIFY_UNSUPPORTED;
-    /*
-     * delivery method of electronic mail
-     */
-    if(xpoid_val_delivery_method_electronic_mail != XpOidParse(ptr, &ptr))
-	return XPOID_NOTIFY_UNSUPPORTED;
-    /*
-     * event handling profile sequence end
-     */
-    if(!ParseSeqEnd(ptr, &ptr))
-	return XPOID_NOTIFY_UNSUPPORTED;
-    /*
-     * end of value
-     */
-    ptr += SpanWhitespace(ptr);
-    if('\0' == *ptr)
-	/*
-	 * valid supported notification profile
-	 */
-	return XPOID_NOTIFY_EMAIL;
-    else
-	return XPOID_NOTIFY_UNSUPPORTED;
-}
-
-/*
- * ------------------------------------------------------------------------
- * Name: XpOidNotifyString
- *
- * Description:
- *
- *
- * Return value:
- *
- *
- */
-const char* XpOidNotifyString(XpOidNotify notify)
-{
-    switch(notify)
-    {
-       case XPOID_NOTIFY_NONE:
-           return NOTIFY_NONE_STR;
-       case XPOID_NOTIFY_EMAIL:
-           return NOTIFY_EMAIL_STR;
-       case XPOID_NOTIFY_UNSUPPORTED:
-           return (const char *)NULL;
-    }
-
-    ErrorF("XpOidNotifyString: Unsupported notify=%ld\n", (long)notify);
-    return (const char *)NULL;
-}
-
-/*
- * ------------------------------------------------------------------------
- * Name: XpOidDocFmtNew
- *
- * Description:
- *
- *
- * Return value:
- *
- *
- */
-XpOidDocFmt*
-XpOidDocFmtNew(const char* value_string)
-{
-    XpOidDocFmt* doc_fmt;
-    const char* ptr;
-    
-    if((const char*)NULL == value_string)
-	return (XpOidDocFmt*)NULL;
-    ptr = value_string + SpanWhitespace(value_string);
-    if('\0' == *ptr)
-	return (XpOidDocFmt*)NULL;
-    /*
-     * get the document format from the value string
-     */
-    doc_fmt = (XpOidDocFmt*)XpOidCalloc(1, sizeof(XpOidDocFmt));
-    if(xTrue == XpOidDocFmtNext(doc_fmt, ptr, &ptr))
-    {
-	/*
-	 * verify that the document format is the only value specified
-	 */
-	ptr += SpanWhitespace(ptr);
-	if('\0' == *ptr)
-	    /*
-	     * valid document-format value
-	     */
-	    return doc_fmt;
-    }
-    /*
-     * invalid
-     */
-    XpOidDocFmtDelete(doc_fmt);
-    ErrorF("%s\n", XPMSG_WARN_DOC_FMT);
-    return (XpOidDocFmt*)NULL;
-}
-
-/*
- * ------------------------------------------------------------------------
- * Name: XpOidDocFmtDelete
- *
- * Description:
- *
- *
- * Return value:
- *
- *
- */
-void
-XpOidDocFmtDelete(XpOidDocFmt* doc_fmt)
-{
-    if((XpOidDocFmt*)NULL != doc_fmt)
-    {
-	XpOidFree(doc_fmt->format);
-	XpOidFree(doc_fmt->variant);
-	XpOidFree(doc_fmt->version);
-	XpOidFree(doc_fmt);
-    }
-}
-
-/*
- * ------------------------------------------------------------------------
- * Name: XpOidDocFmtString
- *
- * Description:
- *
- *
- * Return value:
- *
- *
- */
-char*
-XpOidDocFmtString(XpOidDocFmt* doc_fmt)
-{
-    if((XpOidDocFmt*)NULL != doc_fmt)
-    {
-	if((char*)NULL != doc_fmt->format)
-	{
-	    char* str = XpOidMalloc(1+SafeStrLen(doc_fmt->format)+
-				    1+SafeStrLen(doc_fmt->variant)+
-				    1+SafeStrLen(doc_fmt->version)+
-				    1+1);
-	    sprintf(str, "{%s %s %s}", doc_fmt->format,
-		    (char*)NULL != doc_fmt->variant ? doc_fmt->variant : "",
-		    (char*)NULL != doc_fmt->version ? doc_fmt->version : "");
-	    return str;
-	}
-    }
-    return (char*)NULL;
-}
-
-/*
- * ------------------------------------------------------------------------
- * Name: XpOidDocFmtNext
- *
- * Description:
- *
- *     Assumes non-NULL value string.
- *
- * Return value:
- *
- *
- */
-static BOOL
-XpOidDocFmtNext(XpOidDocFmt* doc_fmt,
-		const char* value_string,
-		const char** ptr_return)
-{
-    const char* ptr;
-    const char* first_nonws_ptr;
-    const char* format;
-    const char* variant;
-    const char* version;
-    int format_len;
-    int variant_len;
-    int version_len;
-    /*
-     * skip leading whitespace
-     */
-    ptr = value_string + SpanWhitespace(value_string);
-    first_nonws_ptr = ptr;
-    /*
-     * sequence start
-     */
-    if(!ParseSeqStart(ptr, &ptr))
-	goto XpOidDocFmtNext_error;
-    /*
-     * skip whitepace to the start of the document format, and save the
-     * location
-     */
-    ptr += SpanWhitespace(ptr);
-    format = ptr;
-    /*
-     * document format
-     */
-    if(0 == (format_len = SpanToken(ptr)))
-	goto XpOidDocFmtNext_error;
-    ptr += format_len;
-    /*
-     * optional variant
-     */
-    ptr += SpanWhitespace(ptr);
-    variant = ptr;
-    if(0 != (variant_len = SpanToken(ptr)))
-    {
-	ptr += variant_len;
-	/*
-	 * optional version
-	 */
-	ptr += SpanWhitespace(ptr);
-	version = ptr;
-	version_len = SpanToken(ptr);
-	ptr += version_len;
-    }
-    else
-	version_len = 0;
-    /*
-     * sequence end
-     */
-    if(!ParseSeqEnd(ptr, &ptr))
-	goto XpOidDocFmtNext_error;
-    /*
-     * update return pointer
-     */
-    if((const char**)NULL != ptr_return)
-	*ptr_return = ptr;
-    /*
-     * update the passed document format struct
-     */
-    memset(doc_fmt, 0, sizeof(XpOidDocFmt));
-    doc_fmt->format = XpOidMalloc(format_len+1);
-    strncpy(doc_fmt->format, format, format_len);
-    doc_fmt->format[format_len] = '\0';
-    if(0 < variant_len)
-    {
-	doc_fmt->variant = XpOidMalloc(variant_len+1);
-	strncpy(doc_fmt->variant, variant, variant_len);
-	doc_fmt->variant[variant_len] = '\0';
-	if(0 < version_len)
-	{
-	    doc_fmt->version = XpOidMalloc(version_len+1);
-	    strncpy(doc_fmt->version, version, version_len);
-	    doc_fmt->version[version_len] = '\0';
-	}
-    }
-    return xTrue;
-
- XpOidDocFmtNext_error:
-    if((const char**)NULL != ptr_return)
-	*ptr_return = first_nonws_ptr;
-    return xFalse;
-}
-
-/*
- * ------------------------------------------------------------------------
- * Name: XpOidDocFmtListNew
- *
- * Description:
- *
- *
- * Return value:
- *
- *
- */
-XpOidDocFmtList*
-XpOidDocFmtListNew(const char* value_string,
-		   const XpOidDocFmtList* valid_fmts)
-{
-    if((char*)NULL != value_string)
-    {
-	const char* ptr;
-	return XpOidDocFmtListParse(value_string, valid_fmts, &ptr, 0);
-    }
-    return (XpOidDocFmtList*)NULL;
-}
-
-/*
- * ------------------------------------------------------------------------
- * Name: XpOidDocFmtListDelete
- *
- * Description:
- *
- *
- * Return value:
- *
- *
- */
-void
-XpOidDocFmtListDelete(XpOidDocFmtList* list)
-{
-    if((XpOidDocFmtList*)NULL != list)
-    {
-	int i;
-	for(i = 0; i < list->count; i++)
-	{
-	    XpOidFree(list->list[i].format);
-	    XpOidFree(list->list[i].variant);
-	    XpOidFree(list->list[i].version);
-	}
-	XpOidFree(list->list);
-	XpOidFree(list);
-    }
-}
-
-/*
- * ------------------------------------------------------------------------
- * Name: XpOidDocFmtListString
- *
- * Description:
- *
- *     Assumes the passed structure is valid.
- *
- * Return value:
- *
- *
- */
-char*
-XpOidDocFmtListString(const XpOidDocFmtList* list)
-{
-    if((XpOidDocFmtList*)NULL != list)
-    {
-	if(0 < list->count)
-	{
-	    int i;
-	    int str_len;
-	    char* str;
-	    char* ptr;
-	    /*
-	     * allocate the return string
-	     */
-	    for(i = 0, str_len = 0; i < list->count; i++)
-	    {
-		str_len +=
-		    1 + SafeStrLen(list->list[i].format) +
-		    1 + SafeStrLen(list->list[i].variant) +
-		    1 + SafeStrLen(list->list[i].version) + 2;
-	    }
-	    str = XpOidMalloc(str_len+1);
-	    /*
-	     * print the list into the string and return it
-	     */
-	    ptr = str;
-	    for(i = 0; i < list->count; i++)
-	    {
-		XpOidDocFmt* df = &list->list[i];
-		
-#if defined(sun) && !defined(SVR4)
-		sprintf(ptr, "{%s %s %s} ",
-			    df->format,
-			    (char*)NULL != df->variant ? df->variant : "",
-			    (char*)NULL != df->version ? df->version : "");
-		ptr += strlen(ptr);
-#else
-		ptr +=
-		    sprintf(ptr, "{%s %s %s} ",
-			    df->format,
-			    (char*)NULL != df->variant ? df->variant : "",
-			    (char*)NULL != df->version ? df->version : "");
-#endif
-	    }
-	    return str;
-	}
-    }
-    return (char*)NULL;
-}
-
-/*
- * ------------------------------------------------------------------------
- * Name: XpOidDocFmtListParse
- *
- * Description:
- *
- *     Assumes the passed value_string and ptr_return are non-NULL.
- *
- * Return value:
- *
- *
- */
-static XpOidDocFmtList*
-XpOidDocFmtListParse(const char* value_string,
-		     const XpOidDocFmtList* valid_fmts,
-		     const char** ptr_return,
-		     int i)
-{
-    XpOidDocFmt doc_fmt;
-    XpOidDocFmtList* list;
-    BOOL status;
-    /*
-     * get the next document-format from the value string, skipping
-     * values not found in the passed list of valid formats
-     */
-    *ptr_return = value_string;
-    while((status = XpOidDocFmtNext(&doc_fmt, *ptr_return, ptr_return))
-	  &&
-	  (const XpOidDocFmtList*)NULL != valid_fmts
-	  &&
-	  !XpOidDocFmtListHasFmt(valid_fmts, &doc_fmt)
-	  );
-    
-    if(xFalse == status)
-    {
-	if('\0' == **ptr_return)
-	{
-	    if(0 == i)
-	    {
-		/*
-		 * empty value string
-		 */
-		return (XpOidDocFmtList*)NULL;
-	    }
-	    else
-	    {
-		/*
-		 * done parsing; allocate the list and return
-		 */
-		list =
-		    (XpOidDocFmtList*)XpOidCalloc(1, sizeof(XpOidDocFmtList));
-		list->count = i;
-		list->list = (XpOidDocFmt*)XpOidCalloc(i, sizeof(XpOidDocFmt));
-		return list;
-	    }
-	}
-	else
-	{
-	    /*
-	     * invalid document format
-	     */
-	    ErrorF("%s\n", XPMSG_WARN_DOCFMT_LIST);
-	    return (XpOidDocFmtList*)NULL;
-	}
-    }
-    else
-    {
-	/*
-	 * recurse to parse remaining document formats
-	 */
-	list = XpOidDocFmtListParse(*ptr_return, valid_fmts, ptr_return, i+1);
-	if((XpOidDocFmtList*)NULL != list)
-	{
-	    /*
-	     * add this doc fmt to the list
-	     */
-	    list->list[i].format = doc_fmt.format;
-	    list->list[i].variant = doc_fmt.variant;
-	    list->list[i].version = doc_fmt.version;
-	}
-	return list;
-    }
-}
-
-/*
- * ------------------------------------------------------------------------
- * Name: XpOidDocFmtListHasFmt
- *
- * Description:
- *
- *     Assumes the passed structure is valid.
- *
- * Return value:
- *
- *
- */
-BOOL
-XpOidDocFmtListHasFmt(const XpOidDocFmtList* list,
-		      const XpOidDocFmt* fmt)
-{
-    int i;
-    if(list != (XpOidDocFmtList*)NULL
-       &&
-       fmt != (XpOidDocFmt*)NULL
-       &&
-       fmt->format != (char*)NULL
-       )
-    {
-	for(i = 0; i < list->count; i++)
-	{
-	    /*
-	     * formats must match
-	     */
-	    if(strcmp(fmt->format, list->list[i].format) != 0)
-		continue;
-	    /*
-	     * variants must both be NULL or match
-	     */
-	    if(fmt->variant == (char*)NULL)
-	    {
-		if(list->list[i].variant == (char*)NULL)
-		    return xTrue;
-		else
-		    continue;
-	    }
-	    if(list->list[i].variant == (char*)NULL)
-		continue;
-	    if(strcmp(fmt->variant, list->list[i].variant) != 0)
-		continue;
-	    /*
-	     * versions must both be NULL or match
-	     */
-	    if(fmt->version == (char*)NULL)
-	    {
-		if(list->list[i].version == (char*)NULL)
-		    return xTrue;
-		else
-		    continue;
-	    }
-	    if(list->list[i].version == (char*)NULL)
-		continue;
-	    if(strcmp(fmt->version, list->list[i].version) == 0)
-		return xTrue;
-	}
-    }
-    return xFalse;
-}
-
-/*
- * ------------------------------------------------------------------------
- * Name: XpOidCardListNew
- *
- * Description:
- *
- *
- * Return value:
- *
- *
- */
-XpOidCardList*
-XpOidCardListNew(const char* value_string, const XpOidCardList* valid_cards)
-{
-    if((const char*)NULL != value_string)
-    {
-	const char* ptr;
-    
-	return XpOidCardListParse(value_string, valid_cards, &ptr, 0);
-    }
-    else
-	return (XpOidCardList*)NULL;
-}
-
-/*
- * ------------------------------------------------------------------------
- * Name: XpOidCardListDelete
- *
- * Description:
- *
- *
- * Return value:
- *
- *
- */
-void
-XpOidCardListDelete(XpOidCardList* list)
-{
-    if((XpOidCardList*)NULL != list)
-    {
-	XpOidFree(list->list);
-	XpOidFree(list);
-    }
-}
-
-/*
- * ------------------------------------------------------------------------
- * Name: XpOidCardListString
- *
- * Description:
- *
- *
- * Return value:
- *
- *
- */
-char*
-XpOidCardListString(const XpOidCardList* list)
-{
-    if((XpOidCardList*)NULL != list)
-    {
-	char buf[48];
-	int str_len;
-	char* str;
-	int i;
-	char* ptr;
-	/*
-	 * allocate the output string
-	 */
-	for(i = 0, str_len = 0; i < list->count; i++)
-#if defined(sun) && !defined(SVR4)
-	{
-	    sprintf(buf, "%lu", list->list[i]) + 1;
-	    str_len += strlen(buf);
-	}
-#else
-	    str_len += sprintf(buf, "%lu", list->list[i]) + 1;
-#endif
-	str = XpOidMalloc(str_len+1);
-	/*
-	 * write the list to the string
-	 */
-	for(i = 0, ptr = str; i < list->count; i++)
-#if defined(sun) && !defined(SVR4)
-	{
-	    sprintf(ptr, "%lu ", list->list[i]);
-	    ptr += strlen(ptr);
-	}
-#else
-	    ptr += sprintf(ptr, "%lu ", list->list[i]);
-#endif
-	return str;
-    }
-    else
-	return (char*)NULL;
-}
-
-/*
- * ------------------------------------------------------------------------
- * Name: XpOidCardListHasCard
- *
- * Description:
- *
- *     Determines if 'card' is an element of 'list'.
- *
- * Return value:
- *
- *     xTrue if the card is found in the list.
- *
- *     xFalse if the card is not in the list, or if 'list' is NULL.
- *
- */
-BOOL
-XpOidCardListHasCard(const XpOidCardList* list, unsigned long card)
-{
-    int i;
-    if(list != (XpOidCardList*)NULL)
-	for(i = 0; i < list->count; i++)
-	    if(list->list[i] == card)
-		return xTrue;
-    return xFalse;
-}
-
-/*
- * ------------------------------------------------------------------------
- * Name: XpOidCardListParse
- *
- * Description:
- *
- *     Assumes the passed value_string and ptr_return are non-NULL.
- *
- * Return value:
- *
- *
- */
-static XpOidCardList*
-XpOidCardListParse(const char* value_string,
-		   const XpOidCardList* valid_cards,
-		   const char** ptr_return,
-		   int i)
-{
-    unsigned long card;
-    XpOidCardList* list;
-    BOOL status;
-    
-    /*
-     * get the next card from the value string, skipping values not
-     * found in the passed list of valid cards
-     */
-    *ptr_return = value_string;
-    while((status = XpOidParseUnsignedValue(*ptr_return, ptr_return, &card))
-	  &&
-	  (const XpOidCardList*)NULL != valid_cards
-	  &&
-	  !XpOidCardListHasCard(valid_cards, card)
-	  );
-    
-    if(xFalse == status)
-    {
-	if('\0' == **ptr_return)
-	{
-	    if(0 == i)
-	    {
-		/*
-		 * empty value string
-		 */
-		return (XpOidCardList*)NULL;
-	    }
-	    else
-	    {
-		/*
-		 * done parsing; allocate the list and return
-		 */
-		list = (XpOidCardList*)XpOidCalloc(1, sizeof(XpOidCardList));
-		list->count = i;
-		list->list =
-		    (unsigned long*)XpOidCalloc(i, sizeof(unsigned long));
-		return list;
-	    }
-	}
-	else
-	{
-	    /*
-	     * parsing error
-	     */
-	    ErrorF("%s\n", XPMSG_WARN_CARD_LIST);
-	    return (XpOidCardList*)NULL;
-	}
-    }
-    else
-    {
-	/*
-	 * recurse to parse remaining cardinal values
-	 */
-	list = XpOidCardListParse(*ptr_return, valid_cards, ptr_return, i+1);
-	if((XpOidCardList*)NULL != list)
-	{
-	    /*
-	     * add this value to the list
-	     */
-	    list->list[i] = card;
-	}
-	return list;
-    }
-}
-
-/*
- * ------------------------------------------------------------------------
- * Name: ParseBoolValue
- *
- * Description:
- *
- *
- * Return value:
- *
- *
- */
-static BOOL
-ParseBoolValue(const char* value_string,
-		  const char** ptr_return,
-		  BOOL* bool_return)
-{
-    const char* ptr;
-    int length;
-    BOOL status;
-    /*
-     * skip leading whitespace
-     */
-    ptr = value_string + SpanWhitespace(value_string);
-    /*
-     * get the whitespace-delimited token length
-     */
-    length = SpanToken(ptr);
-    /*
-     * determine if true or false or bad
-     */
-    if(StrnCaseCmp(ptr, "TRUE", length) == 0)
-    {
-	if(bool_return != (BOOL*)NULL)
-	    *bool_return = xTrue;
-	status = xTrue;
-    }
-    else if(StrnCaseCmp(ptr, "FALSE", length) == 0)
-    {
-	if(bool_return != (BOOL*)NULL)
-	    *bool_return = xFalse;
-	status = xTrue;
-    }
-    else
-    {
-	/*
-	 * syntax error
-	 */
-	status = xFalse;
-    }
-    /*
-     * update the return pointer and return
-     */
-    if(ptr_return != (const char**)NULL)
-	*ptr_return = status ? ptr+length : ptr;
-    return status;
-}
-
-/*
- * ------------------------------------------------------------------------
- * Name: XpOidParseUnsignedValue
- *
- * Description:
- *
- *     Skips leading whitespace and parses out and returns a unsigned number.
- *
- * Return value:
- *
- *     xTrue if a unsigned number was successfully parsed. ptr_return is
- *     updated to point to location where the unsigned number parsing
- *     ended.
- *
- *     xFalse if a unsigned number was not found; ptr_return is updated
- *     to point to the first non-whitespace char in value_string.
- *
- */
-BOOL
-XpOidParseUnsignedValue(const char* value_string,
-			const char** ptr_return,
-			unsigned long* unsigned_return)
-{
-    long value;
-    BOOL status;
-    const char* first_nonws_ptr;
-    const char* ptr;
-    /*
-     * skip leading whitespace
-     */
-    first_nonws_ptr = value_string + SpanWhitespace(value_string);
-    value = strtol(first_nonws_ptr, (char**)(&ptr), 0);
-    if(ptr == first_nonws_ptr || value < 0)
-	status = xFalse;
-    else
-	status = xTrue;
-    /*
-     * update return parms
-     */
-    if(ptr_return != (const char**)NULL)
-	*ptr_return = ptr;
-    if(unsigned_return != (unsigned long*)NULL)
-	*unsigned_return = (unsigned long)value;
-    /*
-     * return
-     */
-    return status;
-}
-
-/*
- * ------------------------------------------------------------------------
- * Name: ParseRealValue
- *
- * Description:
- *
- *     Skips leading whitespace and parses out and returns a real number.
- *
- * Return value:
- *
- *     xTrue if a real number was successfully parsed. ptr_return is
- *     updated to point to location where the real number parsing
- *     ended.
- *
- *     xFalse if a real number was not found; ptr_return is updated
- *     to point to the first non-whitespace char in value_string.
- *
- */
-static BOOL
-ParseRealValue(const char* value_string,
-	       const char** ptr_return,
-	       float* real_return)
-{
-    float real_value;
-    BOOL status;
-    const char* first_nonws_ptr;
-    const char* ptr;
-    /*
-     * skip leading whitespace
-     */
-    first_nonws_ptr = value_string + SpanWhitespace(value_string);
-    real_value = (float)strtod(first_nonws_ptr, (char**)(&ptr));
-    if(ptr == first_nonws_ptr)
-	status = xFalse;
-    else
-	status = xTrue;
-    /*
-     * update return parms
-     */
-    if(ptr_return != (const char**)NULL)
-	*ptr_return = ptr;
-    if(real_return != (float*)NULL)
-	*real_return = real_value;
-    /*
-     * return
-     */
-    return status;
-}
-
-/*
- * ------------------------------------------------------------------------
- * Name: ParseSeqEnd
- *
- * Description:
- *
- * Description:
- *
- *     Skips leading whitespace and parses out the sequence end
- *     character '}'.
- *
- * Return value:
- *
- *     xTrue if the sequence end character was parsed; ptr_return is
- *     updated to point to the first char following the sequence end
- *     character.
- *
- *     xFalse if the sequence end character was not found; ptr_return is
- *     updated to point to the first non-whitespace char in value_string.
- *
- */
-static BOOL
-ParseSeqEnd(const char* value_string,
-	    const char** ptr_return)
-{
-    const char* ptr;
-    BOOL status;
-    /*
-     * skip leading whitespace
-     */
-    ptr = value_string + SpanWhitespace(value_string);
-    /*
-     * parse out the sequence end character
-     */
-    if(*ptr == '}')
-    {
-	status = xTrue;
-	++ptr;
-    }
-    else
-	status = xFalse;
-    /*
-     * update the return pointer
-     */
-    if(ptr_return != (const char**)NULL)
-	*ptr_return = ptr;
-    /*
-     * return
-     */
-    return status;
-}
-
-/*
- * ------------------------------------------------------------------------
- * Name: ParseSeqStart
- *
- * Description:
- *
- *     Skips leading whitespace and parses out the sequence start
- *     character '{'.
- *
- * Return value:
- *
- *     xTrue if the sequence start character was parsed; ptr_return is
- *     updated to point to the first char following the sequence start
- *     character.
- *
- *     xFalse if the sequence start character was not found; ptr_return is
- *     updated to point to the first non-whitespace char in value_string.
- *
- */
-static BOOL
-ParseSeqStart(const char* value_string,
-	      const char** ptr_return)
-{
-    const char* ptr;
-    BOOL status;
-    /*
-     * skip leading whitespace
-     */
-    ptr = value_string + SpanWhitespace(value_string);
-    /*
-     * parse out the sequence start character
-     */
-    if(*ptr == '{')
-    {
-	status = xTrue;
-	++ptr;
-    }
-    else
-	status = xFalse;
-    /*
-     * update the return pointer
-     */
-    if(ptr_return != (const char**)NULL)
-	*ptr_return = ptr;
-    /*
-     * return
-     */
-    return status;
-}
-
-/*
- * ------------------------------------------------------------------------
- * Name: ParseUnspecifiedValue
- *
- * Description:
- *
- *     Skips leading whitespace and parses out an unspecified optional
- *     value (i.e. matching '' or "" - skips all data between the set of
- *     quotes).
- *
- * Return value:
- *
- *     xTrue if an unspecified value was parsed; ptr_return is updated to
- *     point to the first char following the trailing quote.
- *
- *     xFalse if an unspecified value was not found; ptr_return is updated
- *     to point to the first non-whitespace char in value_string.
- *
- */
-static BOOL
-ParseUnspecifiedValue(const char* value_string,
-		      const char** ptr_return)
-{
-    BOOL status;
-    const char* ptr;
-    /*
-     * skip leading whitespace
-     */
-    ptr = value_string + SpanWhitespace(value_string);
-    /*
-     * parse out an unspecified optional value ('' or "")
-     */
-    if(*ptr == '\'' || *ptr == '"')
-    {
-	char delim[2];
-
-	if(ptr_return != (const char**)NULL)
-	{
-	    delim[0] = *ptr;
-	    delim[1] = '\0';
-	    /*
-	     * skip over the matching delimiter
-	     */
-	    ++ptr;
-	    ptr += strcspn(ptr, delim);
-	    if(*ptr != '\0')
-		++ptr;
-	}
-	status = xTrue;
-    }
-    else
-	status = xFalse;
-    /*
-     * update the return pointer
-     */
-    if(ptr_return != (const char**)NULL)
-	*ptr_return = ptr;
-    /*
-     * return
-     */
-    return status;
-}
-
-/*
- * ------------------------------------------------------------------------
- * Name: SpanToken
- *
- * Description:
- *
- *     Returns the length of the initial segment of the passed string
- *     that consists entirely of non-whitespace and non-sequence
- *     delimiter characters.
- *
- *
- */
-static int
-SpanToken(const char* string)
-{
-    const char* ptr;
-    for(ptr = string;
-	*ptr != '\0' && !isspace(*ptr) && *ptr != '{' && *ptr != '}';
-	++ptr);
-    return ptr - string;
-}
-
-/*
- * ------------------------------------------------------------------------
- * Name: SpanWhitespace
- *
- * Description:
- *
- *     Returns the length of the initial segment of the passed string
- *     that consists entirely of whitespace characters.
- *
- *
- */
-static int
-SpanWhitespace(const char* string)
-{
-    const char* ptr;
-    for(ptr = string; *ptr != '\0' && isspace(*ptr); ++ptr);
-    return ptr - string;
-}
-
-#ifndef HAVE_STRCASECMP
-/*
- * ------------------------------------------------------------------------
- * Name: StrnCaseCmp
- *
- * Description:
- *
- *	Implements strncasecmp() for those platforms that need it.
- *
- *
- */
-static int
-StrnCaseCmp(const char *s1, const char *s2, size_t len)
-{
-    char c1, c2;
-    int result;
-
-    while (len--)
-    {
-	c1 = *s1++;
-	c2 = *s2++;
-	result = tolower(c1) - tolower(c2);
-
-	if (result != 0)
-	    return result;
-    }
-
-    return 0;
-}
-#endif
diff --git a/hw/xprint/Oid.h b/hw/xprint/Oid.h
deleted file mode 100644
index 79e85ec..0000000
--- a/hw/xprint/Oid.h
+++ /dev/null
@@ -1,293 +0,0 @@
-/*
-(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.
-*/
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#ifndef _Xp_Oid_h
-#define _Xp_Oid_h
-
-#include <X11/Xproto.h>
-
-/*
- * include the auto-generated XpOid enum definition
- */
-#include "OidDefs.h"
-
-/*
- * messages
- */
-#define XPMSG_WARN_MSS "Syntax error parsing medium-source-sizes"
-#define XPMSG_WARN_ITM "Syntax error parsing input-trays-medium"
-#define XPMSG_WARN_DOC_FMT "Syntax error parsing document format"
-#define XPMSG_WARN_DOCFMT_LIST "Syntax error parsing document format list"
-#define XPMSG_WARN_CARD_LIST "Syntax error parsing cardinal list"
-
-/*
- * macros for memory allocation
- */
-#define XpOidMalloc(size) ((char*)Xalloc((unsigned long)(size)))
-#define XpOidCalloc(count, size) \
-	((char*)Xcalloc((unsigned long)((count)*(size))))
-#define XpOidFree(mem) (Xfree((unsigned long*)(mem)))
-
-/*
- * list of object identifiers
- */
-typedef struct _XpOidList
-{
-    XpOid* list;
-    int count;
-} XpOidList;
-
-/*
- * linked list of object identifiers
- */
-typedef struct XpOidNodeStruct
-{
-    XpOid oid;
-    struct XpOidNodeStruct* next;
-} *XpOidNode;
-
-typedef struct _XpOidLinkedList
-{
-    XpOidNode head;
-    XpOidNode tail;
-    XpOidNode current;
-    int count;
-} XpOidLinkedList;
-
-/*
- * XpOidMediumSourceSize and related definitions
- */
-typedef struct
-{
-    float minimum_x;
-    float maximum_x;
-    float minimum_y;
-    float maximum_y;
-} XpOidArea;
-
-typedef struct
-{
-    float lower_bound;
-    float upper_bound;
-} XpOidRealRange; 
-
-typedef struct
-{
-    XpOidRealRange range_across_feed;
-    float increment_across_feed;
-    XpOidRealRange range_in_feed;
-    float increment_in_feed;
-    BOOL long_edge_feeds;
-    XpOidArea assured_reproduction_area;
-} XpOidMediumContinuousSize;
-
-typedef struct
-{
-    XpOid page_size;
-    BOOL long_edge_feeds;
-    XpOidArea assured_reproduction_area;
-} XpOidMediumDiscreteSize;
-
-typedef struct 
-{
-    XpOidMediumDiscreteSize* list;
-    int count;
-} XpOidMediumDiscreteSizeList;
-
-typedef struct
-{
-    XpOid input_tray; /* may be set to xpoid_none or xpoid_unspecified */
-    enum { XpOidMediumSS_DISCRETE, XpOidMediumSS_CONTINUOUS } mstag;
-    union
-    {
-	XpOidMediumDiscreteSizeList* discrete;
-	XpOidMediumContinuousSize* continuous_size;
-    } ms; /* "ms" is short for medium-size */
-
-} XpOidMediumSourceSize;
-
-typedef struct
-{
-    XpOidMediumSourceSize* mss;
-    int count;
-} XpOidMediumSS;
-
-
-typedef struct
-{
-    XpOid input_tray; /* may be set to xpoid_none */
-    XpOid medium;
-} XpOidTrayMedium;
-
-typedef struct
-{
-    XpOidTrayMedium* list;
-    int count;
-} XpOidTrayMediumList;
-
-typedef enum {
-    XPOID_NOTIFY_UNSUPPORTED,
-    XPOID_NOTIFY_NONE,
-    XPOID_NOTIFY_EMAIL
-} XpOidNotify;
-
-typedef struct
-{
-    unsigned long *list;
-    int count;
-} XpOidCardList;
-
-typedef struct
-{
-    char* format;
-    char* variant;
-    char* version;
-} XpOidDocFmt;
-
-typedef struct
-{
-    XpOidDocFmt* list;
-    int count;
-} XpOidDocFmtList;
-
-
-/*
- * XpOid public methods
- */
-const char* XpOidString(XpOid);
-int XpOidStringLength(XpOid);
-XpOid XpOidFromString(const char* value);
-BOOL XpOidTrayMediumListHasTray(const XpOidTrayMediumList* list, XpOid tray);
-
-/*
- * XpOidList public methods
- */
-XpOidList* XpOidListNew(const char* value_string,
-			       const XpOidList* valid_oids);
-#define XpOidListInit(l, a, c) { (l)->list = (a); (l)->count = (c); }
-void XpOidListDelete(XpOidList*);
-#define XpOidListCount(l) ((l) ? (l)->count : 0)
-#define XpOidListGetOid(l, i) ((l) ? (l)->list[(i)] : xpoid_none)
-int XpOidListGetIndex(const XpOidList* list, XpOid oid);
-BOOL XpOidListHasOid(const XpOidList* list, XpOid oid);
-char* XpOidListString(const XpOidList*);
-
-
-/*
- * XpOidLinkedList public methods
- */
-XpOidLinkedList* XpOidLinkedListNew(void);
-void XpOidLinkedListDelete(XpOidLinkedList*);
-#define XpOidLinkedListCount(l) ((l) ? (l)->count : 0)
-XpOid XpOidLinkedListGetOid(XpOidLinkedList* list, int i);
-void XpOidLinkedListAddOid(XpOidLinkedList* list, XpOid oid);
-int XpOidLinkedListGetIndex(XpOidLinkedList* list, XpOid oid);
-BOOL XpOidLinkedListHasOid(XpOidLinkedList* list,
-				  XpOid oid);
-XpOid XpOidLinkedListFirstOid(XpOidLinkedList* list);
-XpOid XpOidLinkedListNextOid(XpOidLinkedList* list);
-
-/*
- * XpOidMediumSourceSize public methods
- */
-XpOidMediumSS* XpOidMediumSSNew(const char* value_string,
-				       const XpOidList* valid_trays,
-				       const XpOidList* valid_medium_sizes);
-void XpOidMediumSSDelete(XpOidMediumSS*);
-#define XpOidMediumSSCount(me) ((me) ? (me)->count : 0)
-BOOL XpOidMediumSSHasSize(XpOidMediumSS*, XpOid medium_size);
-char* XpOidMediumSSString(const XpOidMediumSS*);
-
-/*
- * XpOidTrayMediumList public methods
- */
-XpOidTrayMediumList* XpOidTrayMediumListNew(const char* value_string,
-					    const XpOidList* valid_trays,
-					    const XpOidMediumSS* msss);
-void XpOidTrayMediumListDelete(XpOidTrayMediumList* me);
-#define XpOidTrayMediumListCount(me) ((me) ? (me)->count : 0)
-#define XpOidTrayMediumListTray(me, i) \
-    ((me) ? (me)->list[(i)].input_tray : xpoid_none)
-#define XpOidTrayMediumListMedium(me, i) \
-    ((me) ? (me)->list[(i)].medium : xpoid_none)
-char* XpOidTrayMediumListString(const XpOidTrayMediumList*);
-
-/*
- * XpOidNotify public methods
- */
-XpOidNotify XpOidNotifyParse(const char* value_string);
-const char* XpOidNotifyString(XpOidNotify notify);
-
-/*
- * XpOidDocFmt public methods
- */
-XpOidDocFmt* XpOidDocFmtNew(const char* value_string);
-void XpOidDocFmtDelete(XpOidDocFmt*);
-char* XpOidDocFmtString(XpOidDocFmt*);
-
-/*
- * XpOidDocFmtList public methods
- */
-XpOidDocFmtList* XpOidDocFmtListNew(const char* value_string,
-				    const XpOidDocFmtList* valid_fmts);
-void XpOidDocFmtListDelete(XpOidDocFmtList*);
-char* XpOidDocFmtListString(const XpOidDocFmtList*);
-#define XpOidDocFmtListCount(me) ((me) ? (me)->count : 0)
-#define XpOidDocFmtListGetDocFmt(me, i) \
-    ((me) ? &(me)->list[(i)] : (XpDocFmt*)NULL)
-BOOL XpOidDocFmtListHasFmt(const XpOidDocFmtList* list,
-			   const XpOidDocFmt* fmt);
-/*
- * XpOidCardList public methods
- */
-XpOidCardList* XpOidCardListNew(const char* value_string,
-				       const XpOidCardList* valid_cards);
-#define XpOidCardListInit(l, a, c) { (l)->list = (a); (l)->count = (c); }
-void XpOidCardListDelete(XpOidCardList*);
-char* XpOidCardListString(const XpOidCardList*);
-#define XpOidCardListCount(me) ((me) ? (me)->count : 0)
-#define XpOidCardListGetCard(me, i) ((me) ? (me)->list[(i)] : 0)
-BOOL XpOidCardListHasCard(const XpOidCardList*, unsigned long);
-
-/*
- * misc parsing functions
- */
-BOOL XpOidParseUnsignedValue(const char* value_string,
-			     const char** ptr_return,
-			     unsigned long* unsigned_return);
-
-
-#endif /* _Xp_Oid_h - don't add anything after this line */
diff --git a/hw/xprint/OidDefs.h b/hw/xprint/OidDefs.h
deleted file mode 100644
index a3b37ea..0000000
--- a/hw/xprint/OidDefs.h
+++ /dev/null
@@ -1,170 +0,0 @@
-/*
-(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.
-*/
-/* This is an automatically-generated file. Do not edit. */
-
-typedef enum {
-    xpoid_none,
-    xpoid_unspecified,
-    xpoid_att_descriptor,
-    xpoid_att_content_orientation,
-    xpoid_att_copy_count,
-    xpoid_att_default_printer_resolution,
-    xpoid_att_default_input_tray,
-    xpoid_att_default_medium,
-    xpoid_att_document_format,
-    xpoid_att_plex,
-    xpoid_att_xp_listfonts_modes,
-    xpoid_att_job_name,
-    xpoid_att_job_owner,
-    xpoid_att_notification_profile,
-    xpoid_att_xp_setup_state,
-    xpoid_att_xp_spooler_command_options,
-    xpoid_att_content_orientations_supported,
-    xpoid_att_document_formats_supported,
-    xpoid_att_dt_pdm_command,
-    xpoid_att_input_trays_medium,
-    xpoid_att_medium_source_sizes_supported,
-    xpoid_att_plexes_supported,
-    xpoid_att_printer_model,
-    xpoid_att_printer_name,
-    xpoid_att_printer_resolutions_supported,
-    xpoid_att_xp_embedded_formats_supported,
-    xpoid_att_xp_listfonts_modes_supported,
-    xpoid_att_xp_page_attributes_supported,
-    xpoid_att_xp_raw_formats_supported,
-    xpoid_att_xp_setup_proviso,
-    xpoid_att_document_attributes_supported,
-    xpoid_att_job_attributes_supported,
-    xpoid_att_locale,
-    xpoid_att_multiple_documents_supported,
-    xpoid_att_available_compression,
-    xpoid_att_available_compressions_supported,
-    xpoid_val_content_orientation_portrait,
-    xpoid_val_content_orientation_landscape,
-    xpoid_val_content_orientation_reverse_portrait,
-    xpoid_val_content_orientation_reverse_landscape,
-    xpoid_val_medium_size_iso_a0,
-    xpoid_val_medium_size_iso_a1,
-    xpoid_val_medium_size_iso_a2,
-    xpoid_val_medium_size_iso_a3,
-    xpoid_val_medium_size_iso_a4,
-    xpoid_val_medium_size_iso_a5,
-    xpoid_val_medium_size_iso_a6,
-    xpoid_val_medium_size_iso_a7,
-    xpoid_val_medium_size_iso_a8,
-    xpoid_val_medium_size_iso_a9,
-    xpoid_val_medium_size_iso_a10,
-    xpoid_val_medium_size_iso_b0,
-    xpoid_val_medium_size_iso_b1,
-    xpoid_val_medium_size_iso_b2,
-    xpoid_val_medium_size_iso_b3,
-    xpoid_val_medium_size_iso_b4,
-    xpoid_val_medium_size_iso_b5,
-    xpoid_val_medium_size_iso_b6,
-    xpoid_val_medium_size_iso_b7,
-    xpoid_val_medium_size_iso_b8,
-    xpoid_val_medium_size_iso_b9,
-    xpoid_val_medium_size_iso_b10,
-    xpoid_val_medium_size_na_letter,
-    xpoid_val_medium_size_na_legal,
-    xpoid_val_medium_size_executive,
-    xpoid_val_medium_size_folio,
-    xpoid_val_medium_size_invoice,
-    xpoid_val_medium_size_ledger,
-    xpoid_val_medium_size_quarto,
-    xpoid_val_medium_size_iso_c3,
-    xpoid_val_medium_size_iso_c4,
-    xpoid_val_medium_size_iso_c5,
-    xpoid_val_medium_size_iso_c6,
-    xpoid_val_medium_size_iso_designated_long,
-    xpoid_val_medium_size_na_10x13_envelope,
-    xpoid_val_medium_size_na_9x12_envelope,
-    xpoid_val_medium_size_na_number_10_envelope,
-    xpoid_val_medium_size_na_7x9_envelope,
-    xpoid_val_medium_size_na_9x11_envelope,
-    xpoid_val_medium_size_na_10x14_envelope,
-    xpoid_val_medium_size_na_number_9_envelope,
-    xpoid_val_medium_size_na_6x9_envelope,
-    xpoid_val_medium_size_na_10x15_envelope,
-    xpoid_val_medium_size_monarch_envelope,
-    xpoid_val_medium_size_a,
-    xpoid_val_medium_size_b,
-    xpoid_val_medium_size_c,
-    xpoid_val_medium_size_d,
-    xpoid_val_medium_size_e,
-    xpoid_val_medium_size_jis_b0,
-    xpoid_val_medium_size_jis_b1,
-    xpoid_val_medium_size_jis_b2,
-    xpoid_val_medium_size_jis_b3,
-    xpoid_val_medium_size_jis_b4,
-    xpoid_val_medium_size_jis_b5,
-    xpoid_val_medium_size_jis_b6,
-    xpoid_val_medium_size_jis_b7,
-    xpoid_val_medium_size_jis_b8,
-    xpoid_val_medium_size_jis_b9,
-    xpoid_val_medium_size_jis_b10,
-    xpoid_val_medium_size_hp_2x_postcard,
-    xpoid_val_medium_size_hp_european_edp,
-    xpoid_val_medium_size_hp_mini,
-    xpoid_val_medium_size_hp_postcard,
-    xpoid_val_medium_size_hp_tabloid,
-    xpoid_val_medium_size_hp_us_edp,
-    xpoid_val_medium_size_hp_us_government_legal,
-    xpoid_val_medium_size_hp_us_government_letter,
-    xpoid_val_plex_simplex,
-    xpoid_val_plex_duplex,
-    xpoid_val_plex_tumble,
-    xpoid_val_input_tray_top,
-    xpoid_val_input_tray_middle,
-    xpoid_val_input_tray_bottom,
-    xpoid_val_input_tray_envelope,
-    xpoid_val_input_tray_manual,
-    xpoid_val_input_tray_large_capacity,
-    xpoid_val_input_tray_main,
-    xpoid_val_input_tray_side,
-    xpoid_val_event_report_job_completed,
-    xpoid_val_delivery_method_electronic_mail,
-    xpoid_val_xp_setup_mandatory,
-    xpoid_val_xp_setup_optional,
-    xpoid_val_xp_setup_ok,
-    xpoid_val_xp_setup_incomplete,
-    xpoid_val_xp_list_glyph_fonts,
-    xpoid_val_xp_list_internal_printer_fonts,
-    xpoid_val_available_compressions_0,
-    xpoid_val_available_compressions_01,
-    xpoid_val_available_compressions_02,
-    xpoid_val_available_compressions_03,
-    xpoid_val_available_compressions_012,
-    xpoid_val_available_compressions_013,
-    xpoid_val_available_compressions_023,
-    xpoid_val_available_compressions_0123
-} XpOid;
diff --git a/hw/xprint/OidStrs.h b/hw/xprint/OidStrs.h
deleted file mode 100644
index 5ed2089..0000000
--- a/hw/xprint/OidStrs.h
+++ /dev/null
@@ -1,172 +0,0 @@
-/*
-(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.
-*/
-/* This is an automatically-generated file. Do not edit. */
-
-static int XpOidStringMapCount = 127;
-
-static const XpOidStringMapEntry XpOidStringMap[] = {
-    { "", 0 },
-    { "", 0 },
-    { "descriptor", 10 },
-    { "content-orientation", 19 },
-    { "copy-count", 10 },
-    { "default-printer-resolution", 26 },
-    { "default-input-tray", 18 },
-    { "default-medium", 14 },
-    { "document-format", 15 },
-    { "plex", 4 },
-    { "xp-listfonts-modes", 18 },
-    { "job-name", 8 },
-    { "job-owner", 9 },
-    { "notification-profile", 20 },
-    { "xp-setup-state", 14 },
-    { "xp-spooler-command-options", 26 },
-    { "content-orientations-supported", 30 },
-    { "document-formats-supported", 26 },
-    { "dt-pdm-command", 14 },
-    { "input-trays-medium", 18 },
-    { "medium-source-sizes-supported", 29 },
-    { "plexes-supported", 16 },
-    { "printer-model", 13 },
-    { "printer-name", 12 },
-    { "printer-resolutions-supported", 29 },
-    { "xp-embedded-formats-supported", 29 },
-    { "xp-listfonts-modes-supported", 28 },
-    { "xp-page-attributes-supported", 28 },
-    { "xp-raw-formats-supported", 24 },
-    { "xp-setup-proviso", 16 },
-    { "document-attributes-supported", 29 },
-    { "job-attributes-supported", 24 },
-    { "locale", 6 },
-    { "multiple-documents-supported", 28 },
-    { "available-compression", 21 },
-    { "available-compressions-supported", 32 },
-    { "portrait", 8 },
-    { "landscape", 9 },
-    { "reverse-portrait", 16 },
-    { "reverse-landscape", 17 },
-    { "iso-a0", 6 },
-    { "iso-a1", 6 },
-    { "iso-a2", 6 },
-    { "iso-a3", 6 },
-    { "iso-a4", 6 },
-    { "iso-a5", 6 },
-    { "iso-a6", 6 },
-    { "iso-a7", 6 },
-    { "iso-a8", 6 },
-    { "iso-a9", 6 },
-    { "iso-a10", 7 },
-    { "iso-b0", 6 },
-    { "iso-b1", 6 },
-    { "iso-b2", 6 },
-    { "iso-b3", 6 },
-    { "iso-b4", 6 },
-    { "iso-b5", 6 },
-    { "iso-b6", 6 },
-    { "iso-b7", 6 },
-    { "iso-b8", 6 },
-    { "iso-b9", 6 },
-    { "iso-b10", 7 },
-    { "na-letter", 9 },
-    { "na-legal", 8 },
-    { "executive", 9 },
-    { "folio", 5 },
-    { "invoice", 7 },
-    { "ledger", 6 },
-    { "quarto", 6 },
-    { "iso-c3", 6 },
-    { "iso-c4", 6 },
-    { "iso-c5", 6 },
-    { "iso-c6", 6 },
-    { "iso-designated-long", 19 },
-    { "na-10x13-envelope", 17 },
-    { "na-9x12-envelope", 16 },
-    { "na-number-10-envelope", 21 },
-    { "na-7x9-envelope", 15 },
-    { "na-9x11-envelope", 16 },
-    { "na-10x14-envelope", 17 },
-    { "na-number-9-envelope", 20 },
-    { "na-6x9-envelope", 15 },
-    { "na-10x15-envelope", 17 },
-    { "monarch-envelope", 16 },
-    { "a", 1 },
-    { "b", 1 },
-    { "c", 1 },
-    { "d", 1 },
-    { "e", 1 },
-    { "jis-b0", 6 },
-    { "jis-b1", 6 },
-    { "jis-b2", 6 },
-    { "jis-b3", 6 },
-    { "jis-b4", 6 },
-    { "jis-b5", 6 },
-    { "jis-b6", 6 },
-    { "jis-b7", 6 },
-    { "jis-b8", 6 },
-    { "jis-b9", 6 },
-    { "jis-b10", 7 },
-    { "hp-2x-postcard", 14 },
-    { "hp-european-edp", 15 },
-    { "hp-mini", 7 },
-    { "hp-postcard", 11 },
-    { "hp-tabloid", 10 },
-    { "hp-us-edp", 9 },
-    { "hp-us-government-legal", 22 },
-    { "hp-us-government-letter", 23 },
-    { "simplex", 7 },
-    { "duplex", 6 },
-    { "tumble", 6 },
-    { "top", 3 },
-    { "middle", 6 },
-    { "bottom", 6 },
-    { "envelope", 8 },
-    { "manual", 6 },
-    { "large-capacity", 14 },
-    { "main", 4 },
-    { "side", 4 },
-    { "event-report-job-completed", 26 },
-    { "electronic-mail", 15 },
-    { "xp-setup-mandatory", 18 },
-    { "xp-setup-optional", 17 },
-    { "xp-setup-ok", 11 },
-    { "xp-setup-incomplete", 19 },
-    { "xp-list-glyph-fonts", 19 },
-    { "xp-list-internal-printer-fonts", 30 },
-    { "0", 1 },
-    { "01", 2 },
-    { "02", 2 },
-    { "03", 2 },
-    { "012", 3 },
-    { "013", 3 },
-    { "023", 3 },
-    { "0123", 4 }
-};
diff --git a/hw/xprint/Util.c b/hw/xprint/Util.c
deleted file mode 100644
index eb7f839..0000000
--- a/hw/xprint/Util.c
+++ /dev/null
@@ -1,370 +0,0 @@
-/*
-(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.
-*/
-
-/* To get the tempnam() prototype in <stdio.h> */
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#if defined(linux) && defined(__STRICT_ANSI__)
-#undef __STRICT_ANSI__
-#endif
-
-#include <X11/Xos.h>	/* for unistd.h and string.h */
-#include <stdio.h>
-#include <sys/wait.h>
-#include <sys/stat.h>
-#include "misc.h"
-#include "dixstruct.h"
-
-#include <X11/extensions/Print.h>
-
-#include "attributes.h"
-
-#define IN_FILE_STRING "%(InFile)%"
-#define OUT_FILE_STRING          "%(OutFile)%"
-
-/*
- * ReplaceAnyString returns a string combining the input strings.
- * It replaces all occurances of 'target' with the supplied
- * 'replacement'.
- * The original input string will generally be freed, 
- * and the caller is responsible for freeing whatever string is returned.
- */
-char *
-ReplaceAnyString(
-    char *string, 
-    char *target, 
-    char *replacement)
-{
-    char *pKeyString;
-
-    if(replacement != (char *)NULL)
-    {
-        while((pKeyString = strstr(string, target)) != (char *)NULL)
-        {
-	    char *newString;
-    
-	    newString = (char *)xalloc(strlen(string) + strlen(replacement) - 
-				       strlen(target) + 1);
-	    strncpy(newString, string, pKeyString - string);
-	    newString[pKeyString - string] = '\0';
-	    strcat(newString, replacement);
-	    strcat(newString, pKeyString + strlen(target));
-	    xfree(string);
-	    string = newString;
-        }
-    }
-
-    return string;
-}
-
-/*
- * ReplaceFileString returns a string combining the input strings.
- * It replaces all occurances of IN_FILE_STRING with the supplied
- * inFileName, and all occurances of OUT_FILE_STRING with the
- * supplied outFileName.  The original input string will generally be freed, 
- * and the caller is responsible for freeing whatever string is returned.
- */
-char *
-ReplaceFileString(
-    char *string,
-    char *inFileName,
-    char *outFileName)
-{
-    char *pKeyString,
-	 *pInFileString = IN_FILE_STRING,
-	 *pOutFileString = OUT_FILE_STRING;
-
-    if(inFileName != (char *)NULL)
-    {
-        while((pKeyString = strstr(string, pInFileString)) != 
-	      (char *)NULL)
-        {
-	    char *newString;
-    
-	    newString = (char *)xalloc(strlen(string) + 
-				        strlen(inFileName) + 1);
-	    strncpy(newString, string, pKeyString - string);
-	    newString[pKeyString - string] = '\0';
-	    strcat(newString, inFileName);
-	    strcat(newString, pKeyString + strlen(pInFileString));
-	    xfree(string);
-	    string = newString;
-        }
-    }
-
-    if(outFileName != (char *)NULL)
-    {
-        while((pKeyString = strstr(string, pOutFileString)) != 
-	      (char *)NULL)
-        {
-	    char *newString;
-    
-	    newString = (char *)xalloc(strlen(string) + 
-				        strlen(outFileName) + 1);
-	    strncpy(newString, string, pKeyString - string);
-	    newString[pKeyString - string] = '\0';
-	    strcat(newString, outFileName);
-	    strcat(newString, pKeyString + strlen(pOutFileString));
-	    xfree(string);
-	    string = newString;
-        }
-    }
-    return string;
-}
-
-
-/*
- * TransferBytes reads numBytes of data from pSrcFile and writes them
- * to pDstFile.  It returns the number of bytes actually transfered,
- * which will be numBytes if it's successful.  Neither pSrcFile nor
- * pDstFile are rewound or their pointers otherwise modified prior to
- * beginning the transfer.
- */
-int
-TransferBytes(
-    FILE *pSrcFile,
-    FILE *pDstFile,
-    int numBytes)
-{
-    char buf[10240];
-#define BUF_SIZE (sizeof(buf)*sizeof(char))
-    int bytesWritten = 0;
-    unsigned bytesToXfer;
-
-    for(bytesToXfer = min(BUF_SIZE, (unsigned)numBytes);
-        bytesToXfer > 0;
-	bytesToXfer = min(BUF_SIZE, (unsigned)(numBytes - bytesWritten)))
-    {
-	if(fread((void *)buf, (size_t) 1, bytesToXfer, pSrcFile) < bytesToXfer)
-	    return bytesWritten;
-	if(fwrite((void *)buf, (size_t) 1, bytesToXfer, pDstFile) < bytesToXfer)
-	    return bytesWritten;
-	bytesWritten += bytesToXfer;
-    }
-    return bytesWritten;
-}
-
-/*
- * CopyContentsAndDelete - does the work of copying and deleting the 
- * pre, no, and post raster files as well as the raster file itself.
- */
-Bool
-CopyContentsAndDelete(
-    FILE **ppSrcFile,
-    char **pSrcFileName,
-    FILE *pDstFile)
-{
-    struct stat statBuf;
-
-    if(stat(*pSrcFileName, &statBuf) < 0)
-        return FALSE;
-    rewind(*ppSrcFile);
-    if(TransferBytes(*ppSrcFile, pDstFile,
-       (int)statBuf.st_size) != (int)statBuf.st_size)
-        return FALSE;
-    fclose(*ppSrcFile);
-    *ppSrcFile = (FILE *)NULL;
-    unlink(*pSrcFileName);
-    xfree(*pSrcFileName);
-    *pSrcFileName = (char *)NULL;
-
-    return TRUE;
-}
-
-
-#define QUADPAD(x) ((((x)+3)>>2)<<2)
-
-int
-XpSendDocumentData(
-    ClientPtr client,
-    FILE *fp,
-    int fileLen,
-    int maxBufSize)
-{
-    xPrintGetDocumentDataReply *pRep;
-    int bytesWritten;
-    unsigned bytesToWrite;
-    int result = Success;
-
-    if(client->clientGone)
-	return Success;
-
-    pRep = (xPrintGetDocumentDataReply *)xalloc(sz_xPrintGetDocumentDataReply+ 
-	   QUADPAD(maxBufSize));
-
-    for(bytesToWrite = min(maxBufSize, fileLen),
-	bytesWritten = 0;
-	bytesToWrite > 0;
-        bytesToWrite = min(maxBufSize, fileLen - bytesWritten))
-    {
-        pRep->type = X_Reply;
-        pRep->sequenceNumber = client->sequence;
-        pRep->length = (QUADPAD(bytesToWrite)) >> 2;
-	pRep->dataLen = bytesToWrite;
-
-	if(fread((void *)(pRep + 1), 1, bytesToWrite, fp) < bytesToWrite)
-	{
-	    result = BadAlloc; /* XXX poor error choice? */
-	    pRep->statusCode = 2; /* XXX Is this the right value??? */
-	}
-	else
-	    pRep->statusCode = 0; /* XXX Ignored??? */
-
-        pRep->finishedFlag = FALSE;
-
-        if (client->swapped) {
-	    int n;
-	    long l;
-
-            swaps(&pRep->sequenceNumber, n);
-            swapl(&pRep->length, l);
-            swapl(&pRep->statusCode, l); /* XXX Why are these longs??? */
-            swapl(&pRep->finishedFlag, l); /* XXX Why are these longs??? */
-            swapl(&pRep->dataLen, l);
-	}
-
-	(void)WriteToClient(client,
-			    sz_xPrintGetDocumentDataReply + bytesToWrite, 
-			    (char *)pRep);
-	bytesWritten += bytesToWrite;
-    }
-
-    xfree(pRep);
-    return result;
-}
-
-/*
- * XpFinishDocData - send a DocumentData reply with the "finishedFlag"
- * field set to TRUE.  This routine should be called from the EndJob
- * function of a driver after the driver has sent all required
- * document data (presumably via XpSendDocumentData).
- */
-int
-XpFinishDocData(
-    ClientPtr client)
-{
-    xPrintGetDocumentDataReply rep;
-
-    if(client->clientGone)
-	return Success;
-
-    rep.type = X_Reply;
-    rep.sequenceNumber = client->sequence;
-    rep.length = 0;
-    rep.dataLen = 0;
-    rep.finishedFlag = TRUE;
-    rep.statusCode = 0;
-
-    if (client->swapped) {
-        int n;
-        long l;
-
-	swaps(&rep.sequenceNumber, n);
-	swapl(&rep.length, l);
-	swapl(&rep.statusCode, l); /* XXX Why are these longs??? */
-	swapl(&rep.finishedFlag, l); /* XXX Why are these longs??? */
-	swapl(&rep.dataLen, l);
-    }
-
-    (void)WriteToClient(client, sz_xPrintGetDocumentDataReply, (char *)&rep);
-    return Success;
-}
-
-#ifndef HAVE_MKSTEMP
-static
-char *XpDirName(char *fname)
-{
-    char *fn, *ptr;
-
-    fn = (char *)xalloc(strlen(fname) + 1);
-    if (fn) {
-	strcpy(fn, fname);
-	ptr = strrchr(fn, '/');
-	if (!ptr) {
-	    ptr = fn;
-	    *ptr++ = '.';
-	} else if (ptr == fn)
-	    ptr++;
-	*ptr = '\0';
-    }
-    return fn;
-}
-#endif
-
-Bool
-XpOpenTmpFile(
-    char *mode,
-    char **fname,
-    FILE **stream)
-{
-#ifndef HAVE_MKSTEMP
-    char *fn = NULL;
-
-    /* note that there is a small race condition here... */
-    if (!(*fname = tempnam(NULL, NULL)) || 
-	!(fn = XpDirName(*fname)) ||
-	access(fn, W_OK) ||
-	!(*stream = fopen(*fname, mode)))
-	
-    {
-	xfree(fn);
-	xfree(*fname);
-	*fname = NULL;
-	*stream = NULL;
-	return FALSE;
-    }
-    xfree(fn);
-#else
-    int fd;
-    
-    *stream = NULL;
-    *fname = (char *)xalloc(14);
-    if (*fname == NULL) 
-	return FALSE;
-    strcpy(*fname, "/tmp/xpXXXXXX");
-    fd = mkstemp(*fname);
-    if (fd < 0) {
-	xfree(*fname);
-	*fname = NULL;
-	return FALSE;
-    }
-    *stream = fdopen(fd, mode);
-    if (stream == NULL) {
-	xfree(*fname);
-	*fname = NULL;
-	return FALSE;
-    }
-#endif
-    return TRUE;
-}
diff --git a/hw/xprint/ValTree.c b/hw/xprint/ValTree.c
deleted file mode 100644
index 5f58de7..0000000
--- a/hw/xprint/ValTree.c
+++ /dev/null
@@ -1,191 +0,0 @@
-/*
-(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.
-*/
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#include    <X11/X.h>
-#include    "scrnintstr.h"
-#include    "validate.h"
-#include    "windowstr.h"
-#include    "mi.h"
-#include    "regionstr.h"
-#include    "mivalidate.h"
-
-/*
- * XpValidateTree - a validateTree routine which ignores overlapping
- * top-level windows when computing the clip lists for such windows.
- * This can be used by any driver which maintains a separate memory
- * store for each top-level window (with its respective children).
- * If the pParent is not the root window, then miValidateTree 
- * is used unmodified.
- *
- * The strategy if pParent is the root is to save off the 
- * current values of pParent->firstChild and pParent->lastChild,
- * replacing both with the single child of interest. We save off
- * pChild->prevSib and pChild->nextSib, and replace them with NullWindow.
- * We save off pParent->clipList, and replace it with 
- * pParent->winSize - pChild->winSize.  We then call miValidateTree
- * to do the needed ComputeClips on the pChild's heirarchy.
- * pParent's clipList is then recomputed based on the sizes
- * of its children, and the saved pointers are restored.
- * The trees associated with the siblings of pChild must be descended
- * and cleaned of any marks (i.e. the valdata pointer freed, and set to NULL),
- * and pParent' AfterValidate structure's exposed field must be updated.
- */
-/*ARGSUSED*/
-int
-XpValidateTree (pParent, pChild, kind)
-    WindowPtr	  	pParent;    /* Parent to validate */
-    WindowPtr	  	pChild;     /* First child of pParent that was
-				     * affected */
-    VTKind    	  	kind;       /* What kind of configuration caused call */
-{
-    RegionRec	  	origPrntClip;  /* orig clipList for parent */
-    RegionRec	  	childClip;  /* The new borderClip for the current
-				     * child */
-    RegionRec		tmpPrntClip; /* parent clipList - child borderClip */
-    RegionRec		exposed;    /* For intermediate calculations */
-    register ScreenPtr	pScreen;
-    register WindowPtr	pWin;
-    Bool		overlap;
-    int			viewvals;
-    Bool		forward;
-
-    WindowPtr	origFirstChild, origLastChild, origPrevSib, origNextSib;
-
-    /*
-     * If we're validating something other than a top-level window,
-     * then just invoke miValidateTree.
-     */
-    if(pParent->parent != NullWindow)
-	return miValidateTree(pParent, pChild, kind);
-
-    /*
-     * If it's a stack change of top levels then it's a no-op for
-     * this scheme, so we just clean up any marks on windows and return.
-     */
-    if(kind == VTStack)
-    {
-	CleanMarks(pParent);
-	return 1;
-    }
-
-    pScreen = pParent->drawable.pScreen;
-    if (pChild == NullWindow)
-	pChild = pParent->firstChild;
-    
-    /* Save off the existing window heirarchy */
-    origFirstChild = pParent->firstChild;
-    origLastChild = pParent->lastChild;
-    origPrevSib = pChild->prevSib;
-    origNextSib = pChild->nextSib;
-    pParent->firstChild = pChild;
-    pParent->lastChild = pChild;
-    pChild->prevSib = NullWindow;
-    pChild->nextSib = NullWindow;
-
-    /*
-     * Set pParent's clipList to be its winSize minus the pChild's
-     * borderSize.
-     */
-    origPrntClip = pParent->clipList;
-    REGION_NULL(pScreen, &tmpPrntClip);
-    REGION_SUBRACT(pScreen, &tmpPrntClip, &pParent->winSize,
-		   &pChild->borderSize);
-    pParent->clipList = tmpPrntClip;
-
-    /*
-     * Call miValidateTree on the pruned tree.
-     */
-    (void) miValidateTree(pParent, pChild, kind);
-
-    /* Restore the saved heirarchy */
-    pChild->prevSib = origPrevSib;
-    pChild->nextSib = origNextSib;
-    pParent->firstChild = origFirstChild;
-    pParent->lastChild = origLastChild;
-
-    /*
-     * Compute pParent's clipList by taking its winSize and subracting
-     * the borderSize of each of its children.
-     */
-    for(pWin = pParent->firstChild, 
-	REGION_COPY(pScreen, &pParent->clipList, &pParent->winSize); 
-	pWin != NullWindow; 
-	pWin = pWin->nextSib)
-    {
-	REGION_SUBTRACT(pScreen, &pParent->clipList, &pParent->clipList, 
-			&pWin->borderSize);
-    }
-
-    /*
-     * Compute pParent's AfterValidate structure by subracting the original
-     * clipList from the newly computed clipList.
-     */
-    REGION_NULL(pScreen, &pParent->valdata->after.exposed);
-    REGION_SUBTRACT(pScreen, &pParent->valdata->after.exposed, 
-		    &pParent->clipList, &origPrntClip);
-
-    /*
-     * Remove the marks from all but pParent and pChild's heirarchy.
-     * i.e. from all of pChild's siblings and their children.
-     */
-    for(pWin = pParent->firstChild; pWin != NullWindow; pWin = pWin->nextSib)
-    {
-	WindowPtr pCurChild = pWin;
-
-	if(pCurChild == pChild)
-	    continue;
-
-        while (1)
-        {
-	    if(pCurChild->valdata)
-	    {
-		xfree(pCurChild->valdata);
-		pCurChild->valdata = (ValidatePtr)NULL;
-	    }
-
-            if (pCurChild->firstChild)
-            {
-                pCurChild = pCurChild->firstChild;
-                continue;
-            }
-            while (!pCurChild->nextSib && (pCurChild != pWin))
-                pCurChild = pCurChild->parent;
-            if (pCurChild == pWin)
-                break;
-            pCurChild = pCurChild->nextSib;
-        }
-    }
-}
diff --git a/hw/xprint/attributes.c b/hw/xprint/attributes.c
deleted file mode 100644
index e793604..0000000
--- a/hw/xprint/attributes.c
+++ /dev/null
@@ -1,1740 +0,0 @@
-/*
-(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:		attributes.c
-**    *
-**    *  Contents:
-**    *                 Implementation of the attribute store for Xp.
-**    *
-**    *  Copyright:	Copyright 1995 Hewlett-Packard Company
-**    *
-**    *********************************************************
-** 
-********************************************************************/
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#include <X11/Xproto.h>
-#include <stdio.h>
-#include <ctype.h>
-#include <string.h>
-#include <stdlib.h>
-#include <sys/wait.h>
-#include <pwd.h>
-#include <grp.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <unistd.h>
-
-#if (defined(sun) && defined(SVR4)) || defined(__SCO__) || defined(__UNIXWARE__)
-#include <wchar.h>
-#endif
-#include "scrnintstr.h"
-
-#include <X11/extensions/Printstr.h>
-
-#include "attributes.h"
-
-#include <X11/Xlib.h>
-#include <X11/Xresource.h>
-
-#include "spooler.h"
-
-#ifndef MIN
-#define MIN(a,b) (((a)<(b))?(a):(b))
-#endif
-#ifndef MAX
-#define MAX(a,b) (((a)>(b))?(a):(b))
-#endif
-
-
-static XrmDatabase CopyDb(XrmDatabase inDb);
-
-extern XrmDatabase XpSpoolerGetServerAttributes(void);
-
-static int attrGeneration = 0;
-
-typedef struct {
-    XrmDatabase *pDb;
-    char *qualifier;
-    char *modelId;
-} DbEnumStruct;
-
-typedef struct {
-    char *stringDb;
-    int nextPos;
-    int space;
-} StringDbStruct;
-
-typedef struct _printerAttrs {
-    struct _printerAttrs *next;
-    char *name;
-    char *qualifier;
-    XrmDatabase printerAttrs;
-    XrmDatabase docAttrs;
-    XrmDatabase jobAttrs;
-} PrAttrs, *PrAttrPtr;
-
-static PrAttrPtr attrList = (PrAttrPtr)NULL;
-
-typedef struct _systemAttrs {
-    XrmDatabase doc;
-    XrmDatabase job;
-    XrmDatabase printers;
-    XrmDatabase server;
-} SysAttrs, *SysAttrsPtr;
-
-SysAttrs systemAttributes;
-
-/*
- * attrCtxtPrivIndex hold the attribute store's context private index.
- * This index is allocated at the time the attribute store is initialized.
- */
-static DevPrivateKey attrCtxtPrivKey = &attrCtxtPrivKey;
-
-/*
- * The ContextAttrs structure descibes the context private space reserved
- * by the attribute store.
- */
-typedef struct _contextAttrs {
-    XrmDatabase printerAttrs;
-    XrmDatabase docAttrs;
-    XrmDatabase jobAttrs;
-    XrmDatabase pageAttrs;
-} ContextAttrs, *ContextAttrPtr;
-
-/*
- * XPDIR is relative to (i.e. is a subdir of) XPRINTDIR/$LANG.
- */
-static const char XPDIR[] = "/print";
-/*
- * The following files/directories define or are within subdirectories of the 
- * above-defined XPDIR.
- */
-static const char XPPRINTERATTRFILE[] = "/attributes/printer";
-static const char XPJOBATTRFILE[] = "/attributes/job";
-static const char XPDOCATTRFILE[] = "/attributes/document";
-static const char XPMODELDIR[] = "/models";
-
-static char NULL_STRING[] = "\0";
-
-/*
- * XpGetConfigDirBase returns a string containing the path name of the base
- * where the print server configuration directory is localed.
- */
-static
-char *XpGetConfigDirBase(void)
-{
-    char *configDir;
-
-    /*
-     * If the XPCONFIGDIR environment variable is not set, then use the
-     * compile-time constant XPRINTDIR.  XPRINTDIR is passed in on the
-     * compile command line, and is defined in $(TOP)/config/cf/Project.tmpl.
-     */
-    if((configDir = getenv("XPCONFIGDIR")) == (char *)NULL)
-	configDir = XPRINTDIR;
-
-    return configDir;
-}
-
-/*
- * XpGetConfigDir returns a string containing the path name of the print
- * server configuration directory.  If the useLocale parameter is False
- * the it returns the path to the "/C" directory.  If the useLocale
- * parameter is True it returns the path to the directory associated with
- * $LANG.  It makes no attempt to ensure that the directory actually exists.
- */
-char *
-XpGetConfigDir(Bool useLocale)
-{ 
-    char *dirName, *langName, *langDir, *configDir;
-    Bool freeLangDir = False;
-
-    if(useLocale == False) langDir = "/C";
-    else 
-    {
-        langName = getenv("LC_ALL");
-        if (langName == NULL) {
-            langName = getenv("LANG");
-        }
-        
-	if(langName == (char *)NULL)
-	    return (char *)NULL;
-	else
-	{
-	    if(strcmp(langName, "C") == 0)
-		return (char *)NULL;
-	    langDir = (char *)xalloc(strlen(langName) + 2);
-	    sprintf(langDir, "/%s", langName);
-	    freeLangDir = True;
-	}
-    }
-    
-    configDir = XpGetConfigDirBase();
-
-    dirName = (char *)xalloc(strlen(configDir) + strlen(XPDIR) + 
-			      strlen(langDir) + 1);
-    sprintf(dirName, "%s%s%s", configDir, langDir, XPDIR);
-
-    if(freeLangDir == True)
-	xfree(langDir);
-
-    return dirName;
-}
-
-/*
- * GetMergedDatabase reads and merges xrmdb files from the top-level printer
- * config directory, and from the directory associated with the current
- * locale (if other than the top-level).
- */
-static XrmDatabase
-GetMergedDatabase(const char *attrName)
-{
-    char *dirName, *fileName;
-    XrmDatabase db;
-
-    if((dirName = XpGetConfigDir(False)) == (char *)NULL)
-	return (XrmDatabase)NULL;
-    if((fileName = (char *)xalloc(strlen(dirName) + strlen(attrName) + 1)) ==
-       (char *)NULL)
-	return (XrmDatabase)NULL;
-    sprintf(fileName, "%s%s", dirName, attrName);
-    db = XrmGetFileDatabase(fileName);
-    xfree(fileName);
-    xfree(dirName);
-
-    if((dirName = XpGetConfigDir(True)) == (char *)NULL) 
-	return db;
-    if((fileName = (char *)xalloc(strlen(dirName) + strlen(attrName) + 1)) ==
-       (char *)NULL)
-	return db;
-    sprintf(fileName, "%s%s", dirName, attrName);
-    (void)XrmCombineFileDatabase(fileName, &db, True);
-    xfree(fileName);
-    xfree(dirName);
-
-    return db;
-}
-
-/*
- * BuildSystemAttributes reads the on-disk configuration files for printers,
- * initial job, and initial document attributes.  The resulting xrm 
- * databases are then dissected as needed for each printer.
- * It also allocates a contextPrivate space for the attributes,
- * reserving space to store pointers to the attribute stores for
- * the context.
- */
-static void
-BuildSystemAttributes(void)
-{
-    if(systemAttributes.printers != (XrmDatabase)NULL)
-	XrmDestroyDatabase(systemAttributes.printers);
-    systemAttributes.printers = GetMergedDatabase(XPPRINTERATTRFILE);
-    if(systemAttributes.job != (XrmDatabase)NULL)
-	XrmDestroyDatabase(systemAttributes.job);
-    systemAttributes.job = GetMergedDatabase(XPJOBATTRFILE);
-    if(systemAttributes.doc != (XrmDatabase)NULL)
-	XrmDestroyDatabase(systemAttributes.doc);
-    systemAttributes.doc = GetMergedDatabase(XPDOCATTRFILE);
-    if(systemAttributes.server != (XrmDatabase)NULL)
-	XrmDestroyDatabase(systemAttributes.server);
-    systemAttributes.server = XpSpoolerGetServerAttributes();
-    return;
-}
-
-/*
- * AddDbEntry is called by XrmEnumerateDatabase, and adds the supplied
- * database entry to the database pointed to within the "DbEnumStruct"
- * passed as the client_data (aka "closure").
- */
-static Bool
-AddDbEntry(
-    XrmDatabase *sourceDB,
-    XrmBindingList bindings,
-    XrmQuarkList quarks,
-    XrmRepresentation *type,
-    XrmValue *value,
-    XPointer client_data)
-{
-    DbEnumStruct *pEnumStruct = (DbEnumStruct *)client_data;
-    XrmName xrm_name[5];
-    XrmClass xrm_class[5];
-    XrmBinding xrm_bind[3];
-    XrmValue realVal;
-    XrmRepresentation rep_type;
-
-    xrm_name[0] = XrmStringToQuark (pEnumStruct->qualifier);
-    xrm_class[0] = XrmStringToQuark (pEnumStruct->modelId);
-
-    for(;*quarks; quarks++)
-	xrm_name[1] = xrm_class[1] = *quarks;
-
-    xrm_name[2] = (XrmQuark)NULL;
-    xrm_class[2] = (XrmQuark)NULL;
-
-    if(XrmQGetResource (*sourceDB, xrm_name, xrm_class, &rep_type, &realVal))
-    {
-        xrm_bind[0] = XrmBindLoosely;
-
-	xrm_name[0] = xrm_name[1];
-	xrm_name[1] = NULLQUARK;
-
-        XrmQPutStringResource(pEnumStruct->pDb, xrm_bind, xrm_name, 
-			      (char *)realVal.addr);
-    }
-    
-    return FALSE;
-}
-
-/*
- * BuildPrinterAttrs - builds and returns an XrmDatabase for the printer
- * of the specified name/qualifier, if we have enough information.
- * If we don't have a model-config
- * file, then just enumerate the systemAttributes->printers database, 
- * otherwise read in the model-config database and merge into it the
- * systemAttributes->printers database.  This database is then enumerated
- * with the printer qualifier (and the model name as class if we have it), and
- * the resulting elements are stored into the database for this particular
- * printer.
- */
-static XrmDatabase
-BuildPrinterAttrs(
-    char *printerName,
-    char *qualifierName)
-{
-    XrmDatabase printerDB = (XrmDatabase)NULL;
-
-    if(systemAttributes.printers != (XrmDatabase)NULL)
-    {
-        char *fileName;
-        XrmDatabase modelDB = (XrmDatabase)NULL;
-        XrmName xrm_name[5], xrm_class[2];
-        XrmRepresentation rep_type;
-        XrmValue value;
-        DbEnumStruct enumStruct;
-        Bool freeModelDB = False;
-        /*
-         * Build the initial db based on the model-config files
-         */
-        xrm_name[0] = XrmStringToQuark (qualifierName);
-        xrm_name[1] = XrmStringToQuark ("xp-model-identifier");
-        xrm_name[2] = (XrmQuark)NULL;
-        XrmQGetResource (systemAttributes.printers, xrm_name, xrm_name, 
-			 &rep_type, &value);
-
-        if(value.addr != (XPointer)NULL)
-        {
-            fileName = (char *)xalloc(strlen(XPMODELDIR) + 
-				      strlen((char *)value.addr) + 
-				      strlen("model-config") + 3);
-	    sprintf(fileName, "%s/%s/%s", XPMODELDIR, value.addr,
-		    "model-config");
-	    modelDB = GetMergedDatabase(fileName);
-            xfree(fileName);
-	    if(modelDB != (XrmDatabase)NULL)
-	    {
-		XrmDatabase tempDB = (XrmDatabase)NULL;
-		/*
-		 * have to make a temp copy because MergeDatabase destroys
-		 * the "source" database. Merge in the printers DB
-		 */
-		tempDB = CopyDb(systemAttributes.printers);
-		XrmMergeDatabases(tempDB, &modelDB);
-		freeModelDB = True;
-	    }
-        }
-
-	/*
-	 * Check to see if we knew the name AND found a database file
-	 */
-	if(modelDB == (XrmDatabase)NULL)
-	     modelDB = systemAttributes.printers;
-
-        xrm_name[0] = XrmStringToQuark (qualifierName);
-	xrm_name[1] = (XrmQuark)NULL;
-	xrm_class[0] = XrmStringToQuark((char *)value.addr);
-	xrm_class[1] = (XrmQuark)NULL;
-	enumStruct.pDb = &printerDB;
-	enumStruct.qualifier = (char *)qualifierName;
-	enumStruct.modelId = (char *)value.addr;
-	XrmEnumerateDatabase(modelDB, xrm_name, xrm_class, XrmEnumAllLevels,
-			     AddDbEntry, (XPointer) &enumStruct);
-
-        if(freeModelDB == True) XrmDestroyDatabase(modelDB);
-    }
-    XrmPutStringResource(&printerDB, "*printer-name", printerName);
-    XrmPutStringResource(&printerDB, "*qualifier", qualifierName);
-    return printerDB;
-}
-
-/*
- * BuildABase - builds an XrmDatabase by enumerating the supplied sourceBase
- * database for elements relevant for the printer named by printerName,
- * and deriving a class for printerName from the model declared in the
- * systemAttributes.printers database.  If no model is defined for this
- * printer then the printerName is used as the class as well.
- * 
- * This is used to build the initial value document and initial value
- * job attribute databases for each printer by searching the system
- * level doc and job databases.
- */
-static XrmDatabase
-BuildABase(
-    char *printerName,
-    char *qualifierName,
-    XrmDatabase sourceBase)
-{
-    XrmDatabase builtDB = (XrmDatabase)NULL;
-
-    if(sourceBase != (XrmDatabase)NULL)
-    {
-        XrmName xrm_name[5], xrm_class[2];
-        XrmRepresentation rep_type;
-        XrmValue value;
-        DbEnumStruct enumStruct;
-
-        /*
-         * Retrieve the model name for use as the class.
-         */
-        xrm_name[0] = XrmStringToQuark (printerName);
-        xrm_name[1] = XrmStringToQuark ("xp-model-identifier");
-        xrm_name[2] = (XrmQuark)NULL;
-        XrmQGetResource (systemAttributes.printers, xrm_name, xrm_name, 
-			 &rep_type, &value);
-	/*
-	 * if we have a model name then use it as the class, otherwise
-	 * just use the printer name as the class as well as the name.
-	 */
-        if(value.addr != (XPointer)NULL)
-	    xrm_class[0] = XrmStringToQuark((char *)value.addr);
-	else
-	    xrm_class[0] = xrm_name[0];
-	xrm_class[1] = (XrmQuark)NULL;
-
-	xrm_name[1] = (XrmQuark)NULL;
-
-	enumStruct.pDb = &builtDB;
-	enumStruct.qualifier = (char *)qualifierName;
-	enumStruct.modelId = (char *)value.addr;
-	XrmEnumerateDatabase(sourceBase, xrm_name, xrm_class, XrmEnumAllLevels,
-			     AddDbEntry, (XPointer) &enumStruct);
-    }
-
-    XrmPutStringResource(&builtDB, "*qualifier", qualifierName);
-
-    return builtDB;
-}
-
-/*
- * FreeAttrList is called upon server recycle, and frees the printer
- * databases stored in the global attrList.
- */
-static void
-FreeAttrList(void)
-{
-    PrAttrPtr pAttr, pNext;
-
-    for(pAttr = attrList, pNext = attrList; 
-	pAttr != (PrAttrPtr)NULL; 
-	pAttr = pNext)
-    {
-	pNext = pAttr->next;
-	if(pAttr->printerAttrs != (XrmDatabase)NULL)
-	    XrmDestroyDatabase(pAttr->printerAttrs);
-	if(pAttr->docAttrs != (XrmDatabase)NULL)
-	    XrmDestroyDatabase(pAttr->docAttrs);
-	if(pAttr->jobAttrs != (XrmDatabase)NULL)
-	    XrmDestroyDatabase(pAttr->jobAttrs);
-	xfree(pAttr->name);
-	xfree(pAttr->qualifier);
-	xfree(pAttr);
-    }
-    attrList = (PrAttrPtr)NULL;
-}
-
-/*
- * XpRehashAttributes - frees the per-printer attribute list and
- * calls BuildSystemAttributes to rebuild the overall attribute
- * store.  It is expected that a caller of this will follow it
- * by calling XpBuildAttributeStore for a new list of printers.
- */
-int
-XpRehashAttributes(void)
-{
-    if(attrList != (PrAttrPtr)NULL)
-        FreeAttrList();
-    BuildSystemAttributes();
-    return Success;
-}
-
-/*
- * XpBuildAttributeStore - creates the attribute database associated
- * with the specified printer.  The first time this is called it
- * calls BuildSystemAttributes to create the system-level databases.
- */
-void
-XpBuildAttributeStore(
-    char *printerName,
-    char *qualifierName)
-{
-    PrAttrPtr pAttr;
-
-    if((pAttr = (PrAttrPtr)xalloc(sizeof(PrAttrs))) == (PrAttrPtr)NULL)
-	return;
-
-    if(attrGeneration != serverGeneration)
-    {
-	if(attrList != (PrAttrPtr)NULL)
-	    FreeAttrList();
-	dixRequestPrivate(attrCtxtPrivKey, sizeof(ContextAttrs));
-	BuildSystemAttributes();
-
-	attrGeneration = serverGeneration;
-    }
-
-    if(attrList == (PrAttrPtr)NULL)
-    {
-	pAttr->next = (PrAttrPtr)NULL;
-	attrList = pAttr;
-    }
-    else
-    {
-	pAttr->next = attrList;
-	attrList = pAttr;
-    }
-
-    pAttr->name = strdup(printerName);
-    pAttr->qualifier = strdup(qualifierName);
-    pAttr->printerAttrs = BuildPrinterAttrs(printerName, qualifierName);
-    pAttr->docAttrs = BuildABase(printerName, qualifierName, 
-				 systemAttributes.doc);
-    pAttr->jobAttrs = BuildABase(printerName, qualifierName,
-				 systemAttributes.job);
-}
-
-
-static Bool
-StoreEntry(
-    XrmDatabase *sourceDB,
-    XrmBindingList bindings,
-    XrmQuarkList quarks,
-    XrmRepresentation *type,
-    XrmValue *value,
-    XPointer client_data)
-{
-    XrmDatabase *outDb = (XrmDatabase *)client_data;
-
-    XrmQPutStringResource(outDb, bindings, quarks, (char *)value->addr);
-    
-    return FALSE;
-}
-
-/*
- * XpCopyDb - makes a copy of the specified XrmDatabase and returns
- * the copy.
- */
-static XrmDatabase
-CopyDb(XrmDatabase inDb)
-{
-    XrmDatabase outDb = (XrmDatabase)NULL;
-    XrmQuark empty = NULLQUARK;
-
-    (void)XrmEnumerateDatabase(inDb, &empty, &empty, XrmEnumAllLevels,
-			       StoreEntry, (XPointer) &outDb);
-    return outDb;
-}
-
-/* 
- * XpInitAttributes - initializes the attribute store for the specified
- * context.  It does this by making copies of the printer, doc, and job
- * attributes databases for the printer associated with the context.
- */
-void
-XpInitAttributes(XpContextPtr pContext)
-{
-    ContextAttrPtr pCtxtAttrs;
-    PrAttrPtr pPrAttr = attrList;
-
-    /* Initialize all the pointers to NULL */
-    pCtxtAttrs = (ContextAttrPtr)dixLookupPrivate(&pContext->devPrivates,
-						  attrCtxtPrivKey);
-    (void)memset((void *)pCtxtAttrs, 0, (size_t) sizeof(ContextAttrs));
-
-    for(pPrAttr = attrList; pPrAttr != (PrAttrPtr)NULL; pPrAttr = pPrAttr->next)
-	if(!strcmp(pPrAttr->name, pContext->printerName)) break;
-
-    if(pPrAttr != (PrAttrPtr)NULL)
-    {
-	pCtxtAttrs->printerAttrs = CopyDb(pPrAttr->printerAttrs);
-	pCtxtAttrs->docAttrs = CopyDb(pPrAttr->docAttrs);
-	pCtxtAttrs->jobAttrs = CopyDb(pPrAttr->jobAttrs);
-    }
-}
-
-void
-XpDestroyAttributes(
-    XpContextPtr pContext)
-{
-    ContextAttrPtr pCtxtAttrs;
-
-    pCtxtAttrs = (ContextAttrPtr)dixLookupPrivate(&pContext->devPrivates,
-						  attrCtxtPrivKey);
-    if(pCtxtAttrs->printerAttrs != (XrmDatabase)NULL)
-	XrmDestroyDatabase(pCtxtAttrs->printerAttrs);
-    if(pCtxtAttrs->docAttrs != (XrmDatabase)NULL)
-	XrmDestroyDatabase(pCtxtAttrs->docAttrs);
-    if(pCtxtAttrs->jobAttrs != (XrmDatabase)NULL)
-	XrmDestroyDatabase(pCtxtAttrs->jobAttrs);
-    if(pCtxtAttrs->pageAttrs != (XrmDatabase)NULL)
-	XrmDestroyDatabase(pCtxtAttrs->pageAttrs);
-}
-
-/*
- * XpGetOneAttribute returns the string value of the specified attribute
- * in the specified class for the specified print context.  If the attribute
- * doesn't exist in the database for this context, or if the class database
- * doesn't exist for this context, then NULL is returned.  The caller must
- * not free the returned string, as the returned pointer points into the
- * database.  This function can also return a value from the server attributes,
- * in which case the pContext parameter is ignored.
- */
-char *
-XpGetOneAttribute(
-     XpContextPtr pContext,
-     XPAttributes class,
-     char *attributeName)
-{
-    ContextAttrPtr pCtxtAttrs;
-    XrmDatabase db = (XrmDatabase)NULL;
-    XrmName xrm_name[3];
-    XrmRepresentation rep_type;
-    XrmValue value;
-
-    if(class == XPServerAttr)
-    {
-        if(systemAttributes.server == (XrmDatabase)NULL) 
-	    return NULL_STRING;
-
-        xrm_name[0] = XrmStringToQuark (attributeName);
-        xrm_name[1] = (XrmQuark)NULL;
-        XrmQGetResource(systemAttributes.server, xrm_name, xrm_name, 
-			&rep_type, &value);
-
-        if(value.addr == (char *)NULL) 
-	    return NULL_STRING;
-        return (char *)value.addr;
-    }
-    else
-    {
-        pCtxtAttrs=(ContextAttrPtr)dixLookupPrivate(&pContext->devPrivates,
-						    attrCtxtPrivKey);
-        switch(class)
-        {
-	    case XPPrinterAttr:
-	        db = pCtxtAttrs->printerAttrs;
-	        break;
-	    case XPDocAttr:
-	        db = pCtxtAttrs->docAttrs;
-	        break;
-	    case XPJobAttr:
-	        db = pCtxtAttrs->jobAttrs;
-	        break;
-	    case XPPageAttr:
-	        db = pCtxtAttrs->pageAttrs;
-	        break;
-	    default:
-	        break;
-        }
-    }
-    if(db == (XrmDatabase)NULL) 
-	return NULL_STRING;
-
-    xrm_name[0] = XrmStringToQuark ("qualifier");
-    xrm_name[1] = (XrmQuark)NULL;
-    XrmQGetResource(db, xrm_name, xrm_name, &rep_type, &value);
-
-    xrm_name[0] = XrmStringToQuark (value.addr);
-    xrm_name[1] = XrmStringToQuark (attributeName);
-    xrm_name[2] = (XrmQuark)NULL;
-    if(XrmQGetResource(db, xrm_name, xrm_name, &rep_type, &value))
-	return (char *)value.addr;
-    else
-        return NULL_STRING;
-}
-
-/*
- * XpPutOneAttribute updates one attribute for the specified
- * context and class. This function is intended for use by the attribute
- * validation module which updates the XrmDatabases directly. This
- * function does not recognize XPServerAttr.
- */
-void
-XpPutOneAttribute(
-       XpContextPtr pContext,
-       XPAttributes class,
-       const char* attributeName,
-       const char* value)
-{
-    ContextAttrPtr pCtxtAttrs;
-    XrmDatabase db;
-    XrmBinding bindings[1];
-    XrmQuark quarks[2];
-    
-    pCtxtAttrs = (ContextAttrPtr)dixLookupPrivate(&pContext->devPrivates,
-						  attrCtxtPrivKey);
-    switch(class)
-    {
-    case XPPrinterAttr:
-	db = pCtxtAttrs->printerAttrs;
-	break;
-    case XPDocAttr:
-	db = pCtxtAttrs->docAttrs;
-	break;
-    case XPJobAttr:
-	db = pCtxtAttrs->jobAttrs;
-	break;
-    case XPPageAttr:
-	db =  pCtxtAttrs->pageAttrs;
-	break;
-    default:
-	return;
-    }
-    bindings[0] = XrmBindLoosely;
-    quarks[0] = XrmStringToQuark(attributeName);
-    quarks[1] = (XrmQuark)NULL;
-    XrmQPutStringResource(&db, bindings, quarks, value ? value : "");
-}
-
-    
-
-/*******************************************************************************
- *
- * The following routines: ExpandSpace, PutString, PutByte, and AppendEntry
- * form the functional core of the GetAttributes routine.  Xrm does not
- * supply a routine to form a string database from an XrmDatabase, except
- * by writing the database to a file.  This code avoids the file system
- * overhead, but is a bit clunky in its memory management.
- *
- ******************************************************************************/
-
-/*
- * ExpandSpace expands the memory allocated for the string database in
- * the StringDbStruct passed in, and updates the "space" field of the
- * struct to indicate the new amount of space available.
- */
-static Bool
-ExpandSpace(
-    StringDbStruct *pStr)
-{
-    char *newSpace;
-
-    if((newSpace = (char *)xrealloc(pStr->stringDb, pStr->nextPos + pStr->space
-				    + 1024)) == (char *)NULL)
-	return False;
-    pStr->space += 1024;
-    pStr->stringDb = newSpace;
-    return True;
-}
-
-/*
- * PutString puts the contents of a null-terminated string into the string
- * database in the StringDbStruct passed in.  If there is insufficient room
- * for the string, ExpandSpace is called, and the nextPos and space fields
- * are updated.
- */
-static void
-PutString(
-    StringDbStruct *pStr,
-    char *pString)
-{
-    int len = strlen(pString);
-
-    if(len >= pStr->space)
-	if(!ExpandSpace(pStr))
-	    return;
-    strcpy(&pStr->stringDb[pStr->nextPos], pString);
-    pStr->nextPos += len;
-    pStr->space -= len;
-}
-
-/*
- * PutByte puts a single byte value in to the string database in the passed-in
- * StringDbStruct.  ExpandSpace is called if there is insufficient room for
- * the byte, and the nextPos and space fields are updated.
- */
-static void
-PutByte(
-    StringDbStruct *pStr,
-    char byte)
-{
-    if(pStr->space <= 1)
-	if(!ExpandSpace(pStr))
-	    return;
-    pStr->stringDb[pStr->nextPos] = byte;
-    pStr->nextPos++;
-    pStr->space--;
-}
-
-#define XrmQString XrmPermStringToQuark("String")
-
-/*
- * AppendEntry is called by XrmEnumerateDatabase, and serves to append
- * a database entry onto a string database.  The passed-in "closure"
- * struct contains a pointer to the string, and a count of the remaining
- * bytes.  If there are insufficient remaining bytes then the struct
- * is realloced, and the count of the space remaining is updated.
- * Database elements of types other than String are ignored!
- * This code is based directly on that in "DumpEntry" in Xrm.c.
- */
-static Bool
-AppendEntry(
-    XrmDatabase         *db,
-    XrmBindingList      bindings,
-    XrmQuarkList        quarks,
-    XrmRepresentation   *type,
-    XrmValuePtr         value,
-    XPointer            data)
-{
-    StringDbStruct *pEnumStr = (StringDbStruct *)data;
-    Bool        firstNameSeen;
-    unsigned int i;
-    char *s, c;
-
-    if (*type != XrmQString)
-	return False;
-
-    for (firstNameSeen = False; *quarks; bindings++, quarks++) {
-        if (*bindings == XrmBindLoosely) {
-	    PutString(pEnumStr, "*");
-        } else if (firstNameSeen) {
-	    PutString(pEnumStr, ".");
-        }
-        firstNameSeen = True;
-	PutString(pEnumStr, XrmQuarkToString(*quarks));
-    }
-    s = value->addr;
-    i = value->size;
-    PutString(pEnumStr, ":\t");
-    if(i) i--;
-
-    if (i && (*s == ' ' || *s == '\t'))
-        PutByte(pEnumStr, '\\'); /* preserve leading whitespace */
-
-    while (i--) {
-        c = *s++;
-        if (c == '\n') {
-            if (i)
-                PutString(pEnumStr, "\\n\\\n");
-            else
-                PutString(pEnumStr, "\\n");
-        } else if (c == '\\')
-            PutString(pEnumStr, "\\\\");
-        else if ((c < ' ' && c != '\t') ||
-                 ((unsigned char)c >= 0x7f && (unsigned char)c < 0xa0))
-	{
-	    char temp[4];
-            (void) sprintf(temp, "\\%03o", (unsigned char)c);
-	    PutString(pEnumStr, temp);
-	}
-        else
-            PutByte(pEnumStr, c);
-    }
-    PutByte(pEnumStr, '\n');
-    pEnumStr->stringDb[pEnumStr->nextPos] = (char)'\0';
-    return False;
-}
-
-/*
- * XpGetAttributes returns a string database version of the Xrm database
- * for the specified context and class.  This function can also return the
- * contents of the server attributes, in which case the pContext parameter
- * is ignored. 
- *
- * The caller is responsible for freeing the returned string, 
- * unlike XpGetOneAttribute, where the caller must not free the string.
- */
-char *
-XpGetAttributes(
-     XpContextPtr pContext,
-     XPAttributes class)
-{
-    ContextAttrPtr pCtxtAttrs;
-    XrmDatabase db = (XrmDatabase)NULL;
-    StringDbStruct enumStruct;
-    XrmQuark empty = NULLQUARK;
-
-    if(class == XPServerAttr)
-	db = systemAttributes.server;
-    else
-    {
-        pCtxtAttrs=(ContextAttrPtr)dixLookupPrivate(&pContext->devPrivates,
-						    attrCtxtPrivKey);
-        switch(class)
-        {
-	    case XPServerAttr:
-	        db = systemAttributes.server;
-	        break;
-	    case XPPrinterAttr:
-	        db = pCtxtAttrs->printerAttrs;
-	        break;
-	    case XPDocAttr:
-	        db = pCtxtAttrs->docAttrs;
-	        break;
-	    case XPJobAttr:
-	        db = pCtxtAttrs->jobAttrs;
-	        break;
-	    case XPPageAttr:
-	        db = pCtxtAttrs->pageAttrs;
-	        break;
-	    default:
-	        break;
-        }
-    }
-    if(db == (XrmDatabase)NULL) 
-    {
-	char *retval = (char *)xalloc(1);
-	retval[0] = (char)'\0';
-	return retval;
-    }
-
-    if((enumStruct.stringDb = (char *)xalloc(1024)) == (char *)NULL)
-	return (char *)NULL;
-    enumStruct.stringDb[0] = (char)'\0';
-    enumStruct.nextPos = 0;
-    enumStruct.space = 1024;
-    (void)XrmEnumerateDatabase(db, &empty, &empty, XrmEnumAllLevels,
-			       AppendEntry, (XPointer) &enumStruct);
-
-    return enumStruct.stringDb;
-}
-
-int
-XpAugmentAttributes(
-     XpContextPtr pContext,
-     XPAttributes class,
-     char *attributes)
-{
-    XrmDatabase db;
-    ContextAttrPtr pCtxtAttrs;
-
-    db = XrmGetStringDatabase(attributes);
-    if(db == (XrmDatabase)NULL) return BadAlloc;
-
-    pCtxtAttrs = (ContextAttrPtr)dixLookupPrivate(&pContext->devPrivates,
-						  attrCtxtPrivKey);
-    switch(class)
-    {
-	case XPPrinterAttr:
-	    XrmMergeDatabases(db, &pCtxtAttrs->printerAttrs);
-	    break;
-	case XPDocAttr:
-	    XrmMergeDatabases(db, &pCtxtAttrs->docAttrs);
-	    break;
-	case XPJobAttr:
-	    XrmMergeDatabases(db, &pCtxtAttrs->jobAttrs);
-	    break;
-	case XPPageAttr:
-	    XrmMergeDatabases(db, &pCtxtAttrs->pageAttrs);
-	    break;
-	default:
-	    break;
-    }
-    return Success;
-}
-
-/*
- * XpSetAttributes - sets the attribute stores for a specified context.
- */
-int
-XpSetAttributes(
-     XpContextPtr pContext,
-     XPAttributes class,
-     char *attributes)
-{
-    XrmDatabase db;
-    ContextAttrPtr pCtxtAttrs;
-
-    db = XrmGetStringDatabase(attributes);
-    if(db == (XrmDatabase)NULL) return BadAlloc;
-
-    pCtxtAttrs=(ContextAttrPtr)dixLookupPrivate(&pContext->devPrivates,
-						attrCtxtPrivKey);
-    switch(class)
-    {
-	case XPPrinterAttr:
-	    if(pCtxtAttrs->printerAttrs != (XrmDatabase)NULL)
-	        XrmDestroyDatabase(pCtxtAttrs->printerAttrs);
-	    pCtxtAttrs->printerAttrs = db;
-	    break;
-	case XPDocAttr:
-	    if(pCtxtAttrs->docAttrs != (XrmDatabase)NULL)
-	        XrmDestroyDatabase(pCtxtAttrs->docAttrs);
-	    pCtxtAttrs->docAttrs = db;
-	    break;
-	case XPJobAttr:
-	    if(pCtxtAttrs->jobAttrs != (XrmDatabase)NULL)
-	        XrmDestroyDatabase(pCtxtAttrs->jobAttrs);
-	    pCtxtAttrs->jobAttrs = db;
-	    break;
-	case XPPageAttr:
-	    if(pCtxtAttrs->pageAttrs != (XrmDatabase)NULL)
-	        XrmDestroyDatabase(pCtxtAttrs->pageAttrs);
-	    pCtxtAttrs->pageAttrs = db;
-	    break;
-	default:
-	    break;
-    }
-    return Success;
-}
-
-void
-XpAddPrinterAttribute(
-    char *printerName,
-    char *printerQualifier,
-    char *attributeName,
-    char *attributeValue)
-{
-    PrAttrPtr pAttr;
-
-    for(pAttr = attrList; pAttr != (PrAttrPtr)NULL; pAttr = pAttr->next)
-    {
-	if(!strcmp(printerQualifier, pAttr->qualifier))
-	{
-            XrmPutStringResource(&pAttr->printerAttrs, attributeName, 
-				 attributeValue);
-	    break;
-	}
-    }
-}
-
-const char *
-XpGetPrinterAttribute(const char *printerName,
-		      const char *attribute)
-{
-    PrAttrPtr pAttr;
-    XrmValue value;
-    char *type;
-
-    for(pAttr = attrList; pAttr != (PrAttrPtr)NULL; pAttr = pAttr->next)
-    {
-        if(!strcmp(printerName, pAttr->qualifier))
-        {
-	    char *attrStr;
-
-	    attrStr = (char *)xalloc(strlen(printerName) + strlen(attribute) +
-				     2);
-	    sprintf(attrStr, "%s.%s", printerName, attribute);
-            XrmGetResource(pAttr->printerAttrs, attrStr, attrStr,
-                           &type, &value);
-	    xfree(attrStr);
-            break;
-        }
-    }
-    if(value.addr != (XPointer)NULL && strlen(value.addr) != 0)
-	return value.addr;
-    else
-      return "";
-}
-
-/*******************************************************************************
- *
- * The following routines are not attribute routines, but are rather
- * spooler interface functions.  They should presumably move to 
- * a SpoolerIf.c of some similarly named file.
- *
- ******************************************************************************/
-#include <locale.h>
-
-static char serverAttrStr[] = "*document-attributes-supported:	copy-count\n\
-*job-attributes-supported:	job-name job-owner\
- notification-profile xp-spooler-command-options\n\
-*multiple-documents-supported:	False";
-
-XrmDatabase
-XpSpoolerGetServerAttributes(void)
-{
-    char *totalAttrs, *localeName;
-    XrmDatabase db;
-
-    localeName = setlocale(LC_CTYPE, (char *)NULL);
-    if(!localeName || strlen(localeName) == 0)
-	localeName = "C";
-
-    if((totalAttrs = (char *)xalloc(strlen(serverAttrStr) + strlen(localeName)
-				    + 11)) == (char *)NULL)
-	return (XrmDatabase)NULL;
-    sprintf(totalAttrs, "%s\n%s\t%s", serverAttrStr, "*locale:", localeName);
-
-    db =  XrmGetStringDatabase(totalAttrs);
-    xfree(totalAttrs);
-    return db;
-}
-
-/*
- * Tailf() works similar to "/bin/tail -f fd_in >fd_out" until
- * the process |child| terminates (the child status is
- * returned in |child_status|).
- * This function is used to copy the stdout/stderr output of a
- * child to fd_out until the child terminates.
- */
-static
-void Tailf(int fd_in, int fd_out, pid_t child, int *child_status)
-{
-    char           b[256];
-    ssize_t        sz;
-    Bool           childDone = FALSE;
-    struct timeval timeout;
-    long           fpos = 0; /* XXX: this is not correct for largefile support */
-
-    timeout.tv_sec  = 0;
-    timeout.tv_usec = 100000;
-
-    for(;;)
-    {
-        /* Check whether the child is still alive or not */
-        if (waitpid(child, child_status, WNOHANG) == child)
-            childDone = TRUE;
-
-        /* Copy traffic from |fd_in| to |fd_out|
-         * (Note we have to use |pread()| here to avoid race conditions
-         * between a child process writing to the same file using the
-         * same file pointer (|dup(2)| and |fork(2)| just duplicate the
-         * file handle but not the pointer)).
-         */
-        while ((sz = pread(fd_in, b, sizeof(b), fpos)) > 0)
-        {
-            fpos += sz;
-            write(fd_out, b, sz);
-        }
-
-        if (childDone)
-            break;
-
-        (void)select(0, NULL, NULL, NULL, &timeout);
-    }
-}
-
-/*
- * SendFileToCommand takes three character pointers - the file name,
- * the command to execute,
- * and the "argv" style NULL-terminated vector of arguments for the command.
- * The command is exec'd, and the file contents are sent to the command
- * via stdin.
- *
- * WARNING:  This function will try to adopt the userId of the supplied
- *           user name prior to exec'ing the supplied command.
- */
-static void
-SendFileToCommand(
-    XpContextPtr pContext,
-    char *fileName,
-    char *pCommand,
-    char **argVector,
-    char *userName)
-{
-    pid_t childPid;
-    int pipefd[2];
-    int status;
-    struct stat statBuf;
-    FILE *fp, *outPipe;
-    FILE *resFp; /* output from launched command */
-    int   resfd;
-    
-    resFp = tmpfile();
-    if (resFp == NULL)
-    {
-        ErrorF("SendFileToCommand: Cannot open temporary file for command output\n");
-        return;
-    }
-    resfd = fileno(resFp);
-
-    if(pipe(pipefd))
-    {
-        ErrorF("SendFileToCommand: Cannot open pipe\n");
-        fclose(resFp);
-        return;
-    }
-
-    if(stat(fileName, &statBuf) < 0 || (int)statBuf.st_size == 0)
-    {
-        close(pipefd[0]);
-        close(pipefd[1]);
-        fclose(resFp);
-        return;
-    }
-
-    fp = fopen(fileName, "r");
-    if(fp == (FILE *)NULL)
-    {
-        ErrorF("SendFileToCommand: Cannot open scratch spool file '%s'\n", fileName);
-        close(pipefd[0]);
-        close(pipefd[1]);
-        fclose(resFp);
-        return;
-    }
-    
-    if((childPid = fork()) == 0)
-    {
-        close(pipefd[1]);
-
-        /* Replace current stdin with input from the pipe */
-	close(STDIN_FILENO);
-	dup(pipefd[0]);
-	close(pipefd[0]);
-
-        /* Close current stdout and redirect it to resfd */
-        close(STDOUT_FILENO);
-        dup(resfd);
-
-        /* Close current stderr and redirect it to resfd
-         * (valgrind may not like that, in this case simply start it using
-         * % valgrind 50>/dev/tty --logfile-fd=50 <more-options> ./Xprt ... #)
-         */
-        close(STDERR_FILENO);
-        dup(resfd);
-
-        fclose(resFp);
-        
-	/*
-	 * If a user name is specified, try to set our uid to match that
-	 * user name.  This is to allow e.g. a banner page to show the
-	 * name of the printing user rather than the user who started
-	 * the print server.
-	 */
-	if(userName)
-	{
-	    uid_t myUid;
-
-	    if((myUid = geteuid()) == (uid_t)0)
-	    {
-	        struct passwd *pPasswd;
-
-	        if((pPasswd = getpwnam(userName)))
-	        {
-                    if (setgid((gid_t)pPasswd->pw_gid) != 0)
-                        perror("SendFileToCommand: setgid() failure.");
-
-                    if (initgroups(userName, (gid_t)pPasswd->pw_gid) != 0)
-                        perror("SendFileToCommand: initgroups() failure.");
-
-                    if (setuid((uid_t)pPasswd->pw_uid) != 0)
-                        perror("SendFileToCommand: setuid() failure.");
-	        }
-	    }
-	}
-	/* return BadAlloc? */
-	if (execv(pCommand, argVector) == -1) {
-	    FatalError("unable to exec '%s'", pCommand);
-	}
-    }
-    else
-    {
-	(void) close(pipefd[0]);
-
- 	outPipe = fdopen(pipefd[1], "w");
-	(void) TransferBytes(fp, outPipe, (int)statBuf.st_size);
-	
-	(void) fclose(outPipe);
-	(void) fclose(fp);
-
-        /* Wait for spooler child (and send all it's output to stderr) */
-        Tailf(resfd, STDERR_FILENO, childPid, &status);
-        
-        if (status != EXIT_SUCCESS)
-        {
-            ErrorF("SendFileToCommand: spooler command returned non-zero status %d.\n", status);
-        }
-
-        /* Store "xp-spooler-command-results" XPJobAttr that the
-         * client can fetch it on demand */
-        if ((fstat(resfd, &statBuf) >= 0) && (statBuf.st_size >= 0))
-        {
-            long  bufSize;
-            char *buf;
-
-            bufSize = statBuf.st_size;
-
-            /* Clamp buffer size to 4MB to prevent that we allocate giant 
-             * buffers if the spooler goes mad and spams it's stdout/stderr
-             * channel. */
-            bufSize = MIN(bufSize, 4*1024*1024);
-
-            buf = xalloc(bufSize+1);
-            if (buf != NULL)
-            {
-                bufSize = pread(resfd, buf, bufSize, 0);
-                buf[bufSize]='\0';
-
-                /* XXX: This should be converted from local multibyte encoding to
-                 * Compound Text encoding first */
-                XpPutOneAttribute(pContext, XPJobAttr, "xp-spooler-command-results", buf);
-
-                xfree(buf);
-            }
-        }
-        else
-        {
-            ErrorF("SendFileToCommand: fstat() failed.\n");
-        }
-
-        fclose(resFp);
-    }
-    return;
-}
-
-/*
- * ReplaceAllKeywords causes all the predefined keywords (e.g. %options%)
- * to be replaced with the appropriate values derived from the attribute
- * store for the supplied print context.  The ReplaceAnyString utility
- * routine is used to perform the actual replacements.
- */
-
-static char *
-ReplaceAllKeywords(
-    XpContextPtr pContext,
-    char *command)
-{
-    char *cmdOpt;
-
-    cmdOpt = XpGetOneAttribute(pContext, XPPrinterAttr, 
-			       "xp-spooler-printer-name");
-    if(cmdOpt != (char *)NULL && strlen(cmdOpt) != 0)
-        command = ReplaceAnyString(command, "%printer-name%", cmdOpt);
-    else
-        command = ReplaceAnyString(command, "%printer-name%", 
-			           pContext->printerName);
-
-    cmdOpt = XpGetOneAttribute(pContext, XPDocAttr, "copy-count");
-    if(cmdOpt != (char *)NULL && strlen(cmdOpt) != 0)
-        command = ReplaceAnyString(command, "%copy-count%", cmdOpt);
-    else
-        command = ReplaceAnyString(command, "%copy-count%", "1");
-
-    cmdOpt = XpGetOneAttribute(pContext, XPJobAttr, "job-name");
-    if(cmdOpt != (char *)NULL && strlen(cmdOpt) != 0)
-        command = ReplaceAnyString(command, "%job-name%", cmdOpt);
-    else
-        command = ReplaceAnyString(command, "%job-name%", "");
-
-    cmdOpt = XpGetOneAttribute(pContext, XPJobAttr, "job-owner");
-    if(cmdOpt != (char *)NULL && strlen(cmdOpt) != 0)
-        command = ReplaceAnyString(command, "%job-owner%", cmdOpt);
-    else
-        command = ReplaceAnyString(command, "%job-owner%", "");
-
-    cmdOpt = XpGetOneAttribute(pContext, XPJobAttr, 
-			       "xp-spooler-command-options");
-    if(cmdOpt != (char *)NULL && strlen(cmdOpt) != 0)
-        command = ReplaceAnyString(command, "%options%", cmdOpt);
-    else
-        command = ReplaceAnyString(command, "%options%", "");
-
-    /* New in xprint.mozdev.org release 007 - replace "%xpconfigdir%" with
-     * location of $XPCONFIGDIR */
-    command = ReplaceAnyString(command, "%xpconfigdir%", XpGetConfigDirBase());
-
-    return command;
-}
-
-#ifdef __QNX__
-#define toascii( c ) ((unsigned)(c) & 0x007f)
-#endif
-
-#if defined(CSRG_BASED) || \
-    defined(linux) || \
-    defined(__CYGWIN__) || \
-    (defined(sun) && !defined(SVR4)) || \
-    (defined(SVR4) && !defined(sun) && !defined(__UNIXWARE__)) || \
-    defined(ISC) || \
-    defined(Lynx) || \
-    defined(__QNX__) || \
-    defined(__APPLE__)
-#define iswspace(c) (isascii(c) && isspace(toascii(c)))
-#endif
-
-/*
- * GetToken - takes in a string and returns a malloc'd copy of the
- * first non-white-space sequence of characters in the string.
- * It returns the number of _bytes_ (NOT characters) parsed through 
- * the inStr to get to the end of the returned token.
- */
-static int
-GetToken(
-    char *inStr,
-    char **outStr)
-{
-    size_t mbCurMax = MB_CUR_MAX;
-    wchar_t curChar;
-    int i, numBytes, byteLen = strlen(inStr);
-    char *tok;
-
-    /*
-     * read through any leading white space.
-     */
-    for(i = 0, numBytes = 0; i < byteLen; i += numBytes)
-    {
-        numBytes = mbtowc(&curChar, &inStr[i], mbCurMax);
-        if(!iswspace(curChar))
-	    break;
-    }
-    tok = inStr + i;
-
-    /*
-     * find the end of the token.
-     */
-    byteLen = strlen(tok);
-    for(i = 0, numBytes = 0; i < byteLen; i += numBytes)
-    {
-        numBytes = mbtowc(&curChar, &tok[i], mbCurMax);
-        if(iswspace(curChar))
-	    break;
-    }
-
-    if((*outStr = (char *)xalloc(i + 1)) == (char *)NULL)
-	return 0;
-    strncpy(*outStr, tok, i);
-    (*outStr)[i] = (char)'\0';
-    return (tok + i) - inStr;
-}
-
-static void
-FreeVector(
-    char **vector)
-{
-    int i;
-
-    if(vector == (char **)NULL) return;
-
-    for(i = 0; vector[i] != (char *)NULL; i++)
-	xfree(vector[i]);
-    xfree(vector);
-}
-
-
-/*
- * AddVector appends the pAddition arg vector to the pTarget arg vector.
- * If the pTarget cannot be realloc'd, then pTarget is set to NULL.
- */
-static void
-AddVector(
-    char ***pTarget,
-    char **pAddition)
-{
-    int numTarget, numAdd, i;
-
-    for(numTarget = 0; (*pTarget)[numTarget] != (char *)NULL; numTarget++)
-	;
-    for(numAdd = 0; pAddition[numAdd] != (char *)NULL; numAdd++)
-	;
-
-    *pTarget = (char **)xrealloc((void *)*pTarget, (numTarget + numAdd + 1) * 
-	       sizeof(char *));
-    if(*pTarget == (char **)NULL)
-	return;
-    for(i = 0; i < numAdd; i++)
-	(*pTarget)[numTarget + i] = pAddition[i];
-
-    (*pTarget)[numTarget + numAdd] = (char *)NULL;
-}
-
-static char **
-BuildArgVector(
-    char *argString,
-    XpContextPtr pContext)
-{
-    char **pVector;
-    char *curTok;
-    int numChars, i;
-    static int beenHere = 0; /* prevent recursion on embedded %options%
-			     */
-
-    pVector = (char **)xalloc(sizeof(char *));
-    pVector[0] = (char *)NULL;
-    for(i = 0; (numChars = GetToken(argString, &curTok)) != 0; 
-	i++, argString += numChars)
-    {
-	if(beenHere || strcmp(curTok, "%options%"))
-	{
-	    if(curTok[0] == (char)'\0')
-	    {
-		xfree(curTok);
-	    }
-	    else
-	    {
-	        pVector = (char **)xrealloc((void *)pVector,
-					    (i + 2)*sizeof(char *));
-	        if(pVector == (char **)NULL)
-	            return (char **)NULL;
-	        pVector[i] = curTok;
-	        pVector[i + 1] = (char *)NULL;
-	    }
-	}
-	else if(!beenHere)
-	{
-	    char **optionsVec;
-
-	    curTok = ReplaceAllKeywords(pContext, curTok);
-	    beenHere = 1;
-	    optionsVec = BuildArgVector(curTok, pContext);
-	    xfree(curTok);
-	    beenHere = 0;
-	    AddVector(&pVector, optionsVec);
-	    xfree(optionsVec);
-	}
-    }
-    if(numChars == 0 && curTok != (char *)NULL)
-	xfree(curTok);
-    return pVector;
-}
-
-/*
- * VectorizeCommand takes a string and breaks it into a command name and
- * an array of character pointers suitable for handing to execv.  The
- * array is NULL-terminated.
- * The returned char * is the command name, and should be freed when no
- * longer needed.  The array elements returned in the pVector parameter 
- * should be individually freed, and the array itself should also be
- * freed when no longer needed.
- */
-static char *
-VectorizeCommand(
-    char *command,
-    char ***pVector,
-    XpContextPtr pContext)
-{
-    char *cmdName;
-    int numChars;
-
-    if(command == (char *)NULL)
-	return (char *)NULL;
-    
-    numChars = GetToken(command, &cmdName);
-
-    if(cmdName == (char *)NULL)
-	return (char *)NULL;
-
-    /* Mangle the command name, too... */
-    cmdName = ReplaceAllKeywords(pContext, cmdName);
-
-    if(cmdName == (char *)NULL)
-	return (char *)NULL;
-
-    *pVector = BuildArgVector(command, pContext);
-    
-    return cmdName;
-}
-
-int
-XpSubmitJob(fileName, pContext)
-     char *fileName;
-     XpContextPtr pContext;
-{
-    char **vector, *cmdNam, *command, *userName;
-    int i;
-
-    command = XpGetOneAttribute(pContext, XPPrinterAttr, "xp-spooler-command");
-    if(command == (char *)NULL || strlen(command) == 0)
-    {
-        if( spooler_type )
-        {
-	    command = strdup(spooler_type->spool_command);
-        }
-        else
-        {
-            ErrorF("XpSubmitJob: No default spool command defined.\n");
-        }
-    }
-    else
-    {
-	command = strdup(command);
-    }
-    if(command == (char *)NULL)
-    {
-        ErrorF("XpSubmitJob: No spooler command found, cannot submit job.\n");
-	return BadAlloc;
-    }
-    
-    cmdNam = VectorizeCommand(command, &vector, pContext);
-    xfree(command);
-
-    if(cmdNam == (char *)NULL)
-	return BadAlloc;
-
-    for(i = 0; vector[i] != (char *)NULL; i++)
-    {
-        vector[i] = ReplaceAllKeywords(pContext, vector[i]);
-	if(vector[i] == (char *)NULL)
-	{
-	    xfree(cmdNam);
-	    for(i = 0; vector[i] != (char *)NULL; i++)
-		xfree(vector[i]);
-	    xfree(vector);
-	    return BadAlloc;
-	}
-    }
-
-    userName = XpGetOneAttribute(pContext, XPJobAttr, "job-owner");
-    if(userName != (char *)NULL && strlen(userName) == 0)
-	userName = (char *)NULL;
-
-    SendFileToCommand(pContext, fileName, cmdNam, vector, userName);
-
-    FreeVector(vector);
-    xfree(cmdNam);
-    
-    return Success;
-}
-
-/*
- * SearchInputTrays()
- *
- * Given a tray, return the medium in the tray.  Conversely, given a
- * medium, return a tray in which it can be found.  In either case,
- * return NULL if the given tray or medium cannot be found.
- */
-#define TRAY 0
-#define MEDIUM 1
-
-static char *
-SearchInputTrays(XpContextPtr pCon,
-		 int which,
-		 char *val)
-{
-    char *inputTraysMedium, tray[80], medium[80], *copy;
-    char *pS, *pE, *pLast;
-    
-    inputTraysMedium = XpGetOneAttribute( pCon, XPPrinterAttr,
-					 "input-trays-medium" );
-    
-    copy = strdup( inputTraysMedium );
-    pS = copy;
-    pLast = copy + strlen( copy );
-    
-    while( pS < pLast )
-      {
-	  while( *pS && *pS != '{' )
-	    pS++;
-	  
-	  pE = ++pS;
-	  while( *pE && *pE != '}' )
-	    pE++;
-	  *pE = '\0';
-
-	  sscanf( pS, "%s %s", tray, medium );
-
-	  if( which == MEDIUM && !strcmp( val, medium ) )
-	    {
-		xfree( copy );
-		return strdup( tray );
-	    }
-
-	  if( which == TRAY && !strcmp( val, tray ) )
-	    {
-		xfree( copy );
-		return strdup( medium );
-	    }
-	  
-	  pS = pE + 1;
-      }
-
-    xfree( copy );
-    return strdup( NULL_STRING );
-}
-
-/*
- * XpGetTrayMediumFromContext()
- *
- * Given a print context, hit the input-trays-medium,
- * default-input-tray and default-medium attributes to find the
- * appropriate tray to use, and the medium in that tray.
- */
-void
-XpGetTrayMediumFromContext(XpContextPtr pCon,
-			   char **medium,
-			   char **tray)
-{
-    char *defMedium, *defTray;
-    char *t, *m;
-    
-    defMedium = XpGetOneAttribute( pCon, XPPageAttr, 
-				  "default-medium" );
-    if( *defMedium == '\0' )
-      defMedium = XpGetOneAttribute( pCon, XPDocAttr,
-				    "default-medium" );
-
-    defTray = XpGetOneAttribute( pCon, XPPageAttr,
-				"default-input-tray" );
-    if( *defTray == '\0' )
-      defTray = XpGetOneAttribute( pCon, XPDocAttr,
-				  "default-input-tray" );
-
-    /*
-     * First, check to see if the default tray has the default medium
-     * installed.  This is the ideal case.
-     */
-    m = SearchInputTrays( pCon, TRAY, defTray );
-    if( !strcmp( m, defMedium ) )
-      {
-	  xfree( m );
-	  *tray = strdup( defTray );
-	  *medium = strdup( defMedium );
-	  return;
-      }
-
-    /*
-     * If the default tray doesn't have the default medium, search for
-     * a tray which has the default medium.
-     */
-    t = SearchInputTrays( pCon, MEDIUM, defMedium );
-    if( t )
-      {
-	  *tray = t;
-	  *medium = strdup( defMedium );
-	  return;
-      }
-    
-    /*
-     * If all else fails, just return the default tray, and whatever
-     * medium happens to be there.  Note that we simply return
-     * whatever is in the attribute store.  Any further correction is
-     * left up to the DDX driver.
-     */
-    *tray = strdup( defTray );
-    *medium = m;
-    xfree( t );
-}
diff --git a/hw/xprint/attributes.h b/hw/xprint/attributes.h
deleted file mode 100644
index 26864a2..0000000
--- a/hw/xprint/attributes.h
+++ /dev/null
@@ -1,130 +0,0 @@
-/*
-(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.
-*/
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#ifndef _Xp_attributes_h
-#define _Xp_attributes_h 1
-
-#include "scrnintstr.h"
-#include "AttrValid.h"
-
-#define BFuncArgs int ndx, ScreenPtr pScreen, int argc, char **argv
-typedef Bool (*pBFunc)(BFuncArgs);
-
-#define VFuncArgs char *name, XpValidatePoolsRec *pValRec, float *width, float *height, int *res
-typedef void (*pVFunc)(VFuncArgs);
-
-/*
- * attributes.c
- */
-void XpInitAttributes(XpContextPtr pContext);
-void XpBuildAttributeStore(char *printerName,
-                          char *qualifierName);
-void XpAddPrinterAttribute(char *printerName,
-                          char *printerQualifier,
-                          char *attributeName,
-                          char *attributeValue);
-void XpDestroyAttributes(XpContextPtr pContext);
-char *XpGetConfigDir(Bool useLocale);
-char *XpGetOneAttribute(XpContextPtr pContext,
-			XPAttributes class,
-			char *attributeName);
-void XpPutOneAttribute(XpContextPtr pContext,
-		       XPAttributes class,
-		       const char* attributeName,
-		       const char* value);
-int XpRehashAttributes(void);
-char *XpGetAttributes(XpContextPtr pContext,
-		      XPAttributes class);
-int XpAugmentAttributes(XpContextPtr pContext,
-			 XPAttributes class,
-			 char *attributes);
-int XpSetAttributes(XpContextPtr pContext,
-		     XPAttributes class,
-		     char *attributes);
-const char *XpGetPrinterAttribute(const char *printerName,
-				  const char *attribute);
-void XpGetTrayMediumFromContext(XpContextPtr pCon,
-				char **medium,
-				char **tray);
-int XpSubmitJob(char *fileName, XpContextPtr pContext);
-
-/*
- * mediaSizes.c
- */
-int XpGetResolution(XpContextPtr pContext);
-XpOid XpGetContentOrientation(XpContextPtr pContext);
-XpOid XpGetAvailableCompression(XpContextPtr pContext);
-XpOid XpGetPlex(XpContextPtr pContext);
-XpOid XpGetPageSize(XpContextPtr pContext,
-		    XpOid* pTray,
-		    const XpOidMediumSS* msss);
-void XpGetMediumMillimeters(XpOid page_size,
-			    float *width,
-			    float *height);
-void XpGetMediumDimensions(XpContextPtr pContext,
-			   unsigned short *width,
-			   unsigned short *height);
-void XpGetReproductionArea(XpContextPtr pContext,
-			   xRectangle *pRect);
-void XpGetMaxWidthHeightRes(const char *printer_name,
-                          const XpValidatePoolsRec* vpr,
-                          float *width,
-                          float *height,
-                          int* resolution);
-
-/* Util.c */
-char *ReplaceAnyString(char *string, 
-                       char *target, 
-                       char *replacement);
-char *ReplaceFileString(char *string,
-                        char *inFileName,
-                        char *outFileName);
-int TransferBytes(FILE *pSrcFile,
-                 FILE *pDstFile,
-                 int numBytes);
-Bool CopyContentsAndDelete(FILE **ppSrcFile,
-                          char **pSrcFileName,
-                          FILE *pDstFile);
-int XpSendDocumentData(ClientPtr client,
-                      FILE *fp,
-                      int fileLen,
-                      int maxBufSize);
-int XpFinishDocData(ClientPtr client);
-Bool XpOpenTmpFile(char *mode,
-                  char **fname,
-                  FILE **stream);
-
-#endif /* _Xp_attributes_h */
diff --git a/hw/xprint/config/C/Makefile.am b/hw/xprint/config/C/Makefile.am
deleted file mode 100644
index 0390ed2..0000000
--- a/hw/xprint/config/C/Makefile.am
+++ /dev/null
@@ -1 +0,0 @@
-SUBDIRS = print
diff --git a/hw/xprint/config/C/print/Makefile.am b/hw/xprint/config/C/print/Makefile.am
deleted file mode 100644
index e3c01da..0000000
--- a/hw/xprint/config/C/print/Makefile.am
+++ /dev/null
@@ -1,14 +0,0 @@
-SUBDIRS = attributes ddx-config models
-
-xpcdir = @xpconfigdir@/C/print
-
-
-Xprinters.ghostscript: $(srcdir)/Xprinters
-	sed < $(srcdir)/Xprinters "s/#Printer xp_pdf_spooldir_tmp_Xprintjobs/Printer xp_pdf_spooldir_tmp_Xprintjobs/" > Xprinters.ghostscript
-
-
-
-dist_xpc_DATA = Xprinters
-xpc_DATA = Xprinters.ghostscript
-
-CLEANFILES = Xprinters.ghostscript
diff --git a/hw/xprint/config/C/print/Xprinters b/hw/xprint/config/C/print/Xprinters
deleted file mode 100644
index a32c02d..0000000
--- a/hw/xprint/config/C/print/Xprinters
+++ /dev/null
@@ -1,49 +0,0 @@
-########################################################################
-#
-# $Xorg: Xprinters,v 1.3 2000/08/17 19:48:02 cpqbld Exp $
-#
-# X*printers sample configuration file
-#
-#
-# This file belongs in /usr/lib/X11/X*printers, where the "*" is the
-# display number of the server.  For example, if the server is
-# invoked using the command X :0, then the X0printers file is used.
-########################################################################
-
-########################################################################
-# Use lpstat to augment the list of printers managed by the
-# server. (This is the default behavior if the X*printers file does
-# not exist, or if an "Augment_Printer_List" line is not specified.)
-########################################################################
-#Augment_Printer_List %(default)%
-
-########################################################################
-# Use the specified command pipeline to augment the list of printers
-# managed by the server.
-########################################################################
-#Augment_Printer_List lpstat -a | cut -d " " -f 1	# equivalent to default
-
-########################################################################
-# Do not augment the list of printers managed by the server.
-########################################################################
-#Augment_Printer_List %none%
-
-########################################################################
-# Preconfigured entry for the PSspooldir model
-# (which sends jobs to /tmp/Xprintjobs instead to a physical printer)
-########################################################################
-#Printer xp_pdf_spooldir_tmp_Xprintjobs
-Printer xp_ps_spooldir_tmp_Xprintjobs
-
-########################################################################
-# Add individual printers to the list of printers managed by the
-# server.  These are aliases, determined by driver name.
-########################################################################
-
-
-# EXAMPLES
-#
-# Printer xppspr
-# Printer xppclpr
-# Printer xppclmonopr
-# Printer xprasterpr
diff --git a/hw/xprint/config/C/print/attributes/Makefile.am b/hw/xprint/config/C/print/attributes/Makefile.am
deleted file mode 100644
index 0d2ccea..0000000
--- a/hw/xprint/config/C/print/attributes/Makefile.am
+++ /dev/null
@@ -1,3 +0,0 @@
-xpcdir = @xpconfigdir@/C/print/attributes
-
-dist_xpc_DATA = document job printer
diff --git a/hw/xprint/config/C/print/attributes/document b/hw/xprint/config/C/print/attributes/document
deleted file mode 100644
index b1651bd..0000000
--- a/hw/xprint/config/C/print/attributes/document
+++ /dev/null
@@ -1,49 +0,0 @@
-# $Xorg: document,v 1.3 2000/08/17 19:48:03 cpqbld Exp $
-# Document DPA-Object initial attribute values
-
-# Attribute IDs must be qualified by using one of the following
-# (listed in order of precedence):
-#
-#   printer-name
-#	Set this attribute for a specific printer.
-#	Example: "dj_1.plex: duplex"
-#
-#   printer-model
-#	Set this attribute for all printers of a specific model.
-#	Example: "HPDJ1600C.plex: duplex"
-#
-#   '*'
-#	Set this attribute for all printers.
-#	Example: "*.plex: duplex"
-
-
-*content-orientation: portrait
-*copy-count: 1
-*default-medium: iso-a4
-*default-printer-resolution: 600
-
-# "PSspooldir" jobs should always be 300 DPI
-# (to be compatible to DPS-based PostScript viewers such as sdtimage)
-PSspooldir.default-printer-resolution: 300
-
-# "PS2PDFspooldir-GS" jobs should always be 600 DPI
-PS2PDFspooldir-GS.default-printer-resolution: 600
-
-# Some resolution defaults to make applications happy which are too lazy
-# to pick an own default in absence of "default-printer-resolution"
-HPLJ4050-PS.default-printer-resolution: 600
-SPSPARC2.default-printer-resolution: 300
-CANONBJ10E-GS.default-printer-resolution: 360
-CANONC3200-PS.default-printer-resolution: 600
-
-# EXAMPLES
-#
-# *content-orientation: landscape
-# *copy-count: 3
-# *default-input-tray: main
-# *default-medium: iso-a4
-# *default-printer-resolution: 600
-# *document-format: {PCL 5}
-# *plex: simplex
-# *xp-listfonts-modes: xp-list-internal-printer-fonts
-
diff --git a/hw/xprint/config/C/print/attributes/job b/hw/xprint/config/C/print/attributes/job
deleted file mode 100644
index aa1911d..0000000
--- a/hw/xprint/config/C/print/attributes/job
+++ /dev/null
@@ -1,25 +0,0 @@
-# $Xorg: job,v 1.3 2000/08/17 19:48:03 cpqbld Exp $
-# Job DPA-Object initial attribute values
-
-# Attribute IDs must be qualified by using one of the following
-# (listed in order of precedence):
-#
-#   printer-name
-#	Set this attribute for a specific printer.
-#	Example: "laser_1.job-priority: 1"
-#
-#   printer-model
-#	Set this attribute for all printers of a specific model.
-#	Example: "HPDJ1600C.job-priority: 1"	
-#
-#   '*'
-#	Set this attribute for all printers.
-#	Example: "*.job-priority: 1"
-
-*notification-profile: {}
-
-# EXAMPLES
-#
-# *job-name: Example Job Name
-# *notification-profile: {{event-report-job-completed} electronic-mail}
-# *xp-spooler-command-options: -onb
diff --git a/hw/xprint/config/C/print/attributes/printer b/hw/xprint/config/C/print/attributes/printer
deleted file mode 100644
index 41e13b4..0000000
--- a/hw/xprint/config/C/print/attributes/printer
+++ /dev/null
@@ -1,96 +0,0 @@
-# $Xorg: printer,v 1.3 2000/08/17 19:48:03 cpqbld Exp $
-# Printer DPA-Object initial attribute values
-
-# Attribute IDs must be qualified by using one of the following
-# (listed in order of precedence):
-#
-#   printer-name
-#	Set this attribute for a specific printer.
-#	Example: "dj_1.document-formats-ready: {pcl 5}"
-#
-#   printer-model
-#	Set this attribute for all printers of a specific model.
-#	Example: "HPDJ1600C.document-formats-ready: {pcl 5}"
-#
-#   '*'
-#	Set this attribute for all printers.
-#	Example: "*.document-formats-ready: {pcl 5}"
-
-# Remove this line and replace them with per printer settings
-# if you want to use more than one DDX!!
-*xp-model-identifier: PSdefault
-
-
-# Sample entry for the "PSspooldir" model
-# Just add a printer called "xp_ps_spooldir_tmp_Xprintjobs" to "Xprinters"
-# and you will get an extra printer which files the PostScript jobs
-# in the "/tmp/Xprintjobs/" directory.
-xp_ps_spooldir_tmp_Xprintjobs.xp-model-identifier: PSspooldir
-
-# Sample entry for the "PS2PDFspooldir-GS" model
-# Just add a printer called "xp_pdf_spooldir_tmp_Xprintjobs" to "Xprinters"
-# and you will get an extra printer which convertes the PostScript jobs
-# to PDF using "ps2pdf" and files them into the "/tmp/Xprintjobs/" directory.
-# NOTE: Future versions of Xprint will use the PDF DDX instead directly
-# instead of relying on GhostScript/ps2pdf...
-xp_pdf_spooldir_tmp_Xprintjobs.xp-model-identifier: PS2PDFspooldir-GS
-
-
-# IMPORTANT EXAMPLES
-#
-# The following are examples of how a printer name is bound
-# to a model-config file and ddx driver.
-#
-# Warning: most X-Servers have a hard limit on the number of ddx
-# drivers (ie, screens) they can support at runtime (usually 3 or
-# 4).  Whatever the number of printers, they cannot create a
-# dependency for more than the limit on ddx drivers.  Assuming
-# "Xprinters" listed all four xp*pr printers below, X-Servers
-# with a limit of 3 would not work.
-#
-# xppspr.xp-model-identifier: HPDJ1600C
-# xppspr.xp-ddx-identifier: XP-POSTSCRIPT
-# xppspr.document-formats-ready: { PostScript 2 }
-#
-# xppclpr.xp-model-identifier: HPDJ1600C
-# xppclpr.xp-ddx-identifier: XP-PCL-COLOR
-# xppclpr.document-formats-ready: { PCL 5 }
-#
-# xppclmonopr.xp-model-identifier: HPDJ1600C
-# xppclmonopr.xp-ddx-identifier: XP-PCL-MONO
-# xppclmonopr.document-formats-ready: { PCL 5 }
-#
-# xprasterpr.xp-model-identifier: HPDJ1600C
-# xprasterpr.xp-ddx-identifier: XP-RASTER
-
-
-# MORE EXAMPLES of items often configured in this file
-#
-# *descriptor: This printer has not been given a name
-# *dt-pdm-command: dtpdm
-# *input-trays-medium: {top na-letter} {bottom iso-a4}
-# *xp-model-identifier: HPDJ1600C
-# *xp-spooler-command: /opt/mystuff/bin/mylp -p %printer-name% -c %copy-count% \
-#      -j %job-name% -o %options%
-
-
-# USUALLY SET BY THE ddx driver
-#
-# *content-orientations-supported: portrait landscape reverse-portrait reverse-landscape
-
-
-# USUALLY SET BY THE model-config FILE
-#
-# *document-formats-supported: {PCL 5}
-# *medium-source-sizes-supported: \
-#      { top {iso-a4 FALSE {10 200 10 287}} {iso-a5 FALSE {10 138 10 200}} } \
-#      { bottom {iso-a4 FALSE {10 200 10 287}} {iso-a5 FALSE {10 138 10 200}} }
-# *plexes-supported: simplex duplex tumble
-# *printer-model: Hewlett-Packard LaserJet IV
-# *printer-resolutions-supported: 300
-# *xp-ddx-identifier: XP-PCL-COLOR
-# *xp-embedded-formats-supported: {PCL 5} {HPGL 2}
-# *xp-listfonts-modes-supported: xp-list-internal-printer-fonts
-# *xp-raw-formats-supported: {PCL 5}
-# *xp-setup-proviso: xp-setup-optional
-
diff --git a/hw/xprint/config/C/print/ddx-config/Makefile.am b/hw/xprint/config/C/print/ddx-config/Makefile.am
deleted file mode 100644
index 907edca..0000000
--- a/hw/xprint/config/C/print/ddx-config/Makefile.am
+++ /dev/null
@@ -1 +0,0 @@
-SUBDIRS = raster
diff --git a/hw/xprint/config/C/print/ddx-config/raster/Makefile.am b/hw/xprint/config/C/print/ddx-config/raster/Makefile.am
deleted file mode 100644
index 79bfb59..0000000
--- a/hw/xprint/config/C/print/ddx-config/raster/Makefile.am
+++ /dev/null
@@ -1,3 +0,0 @@
-xpcdir = @xpconfigdir@/C/print/ddx-config/raster
-
-dist_xpc_DATA = pcl postscript
diff --git a/hw/xprint/config/C/print/ddx-config/raster/pcl b/hw/xprint/config/C/print/ddx-config/raster/pcl
deleted file mode 100644
index 15d33e7..0000000
--- a/hw/xprint/config/C/print/ddx-config/raster/pcl
+++ /dev/null
@@ -1,39 +0,0 @@
-# $Xorg: pcl,v 1.3 2000/08/17 19:48:03 cpqbld Exp $
-# This is the file which you should customize to include the printers that
-# will print through the raster driver.  The early part of this file 
-# specifies some commn useful defaults.  You can override them when
-# you list your printers in the second part of this file.  This file is
-# an X Resource file.  To learn more about this file format, consult
-# the functional specification.
-
-# Note that the reference printer for CDEnext is the HP DeskJet 1600C.
-# This driver may work for other printers, but the reference printer
-# is the only officially supported printer.
-
-
-# DEFAULTS
-# ========
-
-# The attributes below apply to all printers unless the section below 
-# specifies something different for the printer.  
-
-# Default printer attributes
-# --------------------------
-# Printer attributes control the choices that users will see in the 
-# setup dialog for those printers.
-
-# The attributes below apply to all printes unless the section below 
-# specifies something different for the printer.
-
-*.media-ready:	na-letter-white
-*.descriptor:	Printer supported by CDEnext DtPrint System.
-*.printer-model: HPDJ1600C
-
-# Printer Specifics
-
-# Use this section to override the defaults listed above or to override the
-# printer attributes described in the model file. 
-# The lines describing "laser" are just a sample to help you get started.
-
-# laser.printer-name:	laser
-# laser.spooler-name:	laser
diff --git a/hw/xprint/config/C/print/ddx-config/raster/postscript b/hw/xprint/config/C/print/ddx-config/raster/postscript
deleted file mode 100644
index e69de29..0000000
diff --git a/hw/xprint/config/C/print/models/CANONBJ10E-GS/Makefile.am b/hw/xprint/config/C/print/models/CANONBJ10E-GS/Makefile.am
deleted file mode 100644
index 951b9af..0000000
--- a/hw/xprint/config/C/print/models/CANONBJ10E-GS/Makefile.am
+++ /dev/null
@@ -1,3 +0,0 @@
-xpcdir = @xpconfigdir@/C/print/models/CANONBJ10E-GS
-
-dist_xpc_DATA = model-config
diff --git a/hw/xprint/config/C/print/models/CANONBJ10E-GS/model-config b/hw/xprint/config/C/print/models/CANONBJ10E-GS/model-config
deleted file mode 100644
index 97bfd81..0000000
--- a/hw/xprint/config/C/print/models/CANONBJ10E-GS/model-config
+++ /dev/null
@@ -1,23 +0,0 @@
-# $Xprint.org: CANONBJ10E-GS model-config,v 1.4 2003/02/10 14:48:04 gisburn Exp $
-
-*content-orientations-supported: portrait landscape
-*descriptor: Canon BJ-10e (GhostScript)
-*document-formats-supported: {POSTSCRIPT 2}
-*input-trays-supported:
-*medium-source-sizes-supported: \
-{ '' \
-    {iso-b5                     FALSE {6.35 169.65 6.35 243.65}}\
-    {iso-a4                     FALSE {6.35 203.65 6.35 290.65}}\
-    {na-letter                  FALSE {6.35 209.55 6.35 273.05}}\
-    {na-legal                   FALSE {6.35 209.55 6.35 349.25}}\
-}
-
-*plexes-supported: simplex
-*printer-model: "Canon BJ-10e (GhostScript)"
-*printer-resolutions-supported: 360
-*xp-ddx-identifier: XP-POSTSCRIPT
-*xp-listfonts-modes-supported: xp-list-internal-printer-fonts xp-list-glyph-fonts
-*xp-embedded-formats-supported: {POSTSCRIPT 2}
-*xp-raw-formats-supported: {POSTSCRIPT 2}
-*xp-setup-proviso: setup-optional
-# EOF.
diff --git a/hw/xprint/config/C/print/models/CANONC3200-PS/Makefile.am b/hw/xprint/config/C/print/models/CANONC3200-PS/Makefile.am
deleted file mode 100644
index 771b408..0000000
--- a/hw/xprint/config/C/print/models/CANONC3200-PS/Makefile.am
+++ /dev/null
@@ -1,5 +0,0 @@
-SUBDIRS = fonts
-
-xpcdir = @xpconfigdir@/C/print/models/CANONC3200-PS
-
-dist_xpc_DATA = model-config
diff --git a/hw/xprint/config/C/print/models/CANONC3200-PS/fonts/Makefile.am b/hw/xprint/config/C/print/models/CANONC3200-PS/fonts/Makefile.am
deleted file mode 100644
index 7a7ecc3..0000000
--- a/hw/xprint/config/C/print/models/CANONC3200-PS/fonts/Makefile.am
+++ /dev/null
@@ -1,54 +0,0 @@
-xpcdir = @xpconfigdir@/C/print/models/CANONC3200-PS/fonts
-
-parentdir = ../../PSdefault/fonts
-
-XPFONTS = \
-        AvantGarde-Book.pmf \
-        AvantGarde-BookOblique.pmf \
-        AvantGarde-Demi.pmf \
-        AvantGarde-DemiOblique.pmf \
-        Courier-Bold.pmf \
-        Courier-BoldOblique.pmf \
-        Courier-Oblique.pmf \
-        Courier.pmf \
-        Helvetica-Bold.pmf \
-        Helvetica-BoldOblique.pmf \
-        Helvetica-Oblique.pmf \
-        Helvetica.pmf \
-        LubalinGraph-Book.pmf \
-        LubalinGraph-BookOblique.pmf \
-        LubalinGraph-Demi.pmf \
-        LubalinGraph-DemiOblique.pmf \
-        NewCentSchlbk-Bold.pmf \
-        NewCentSchlbk-BoldItal.pmf \
-        NewCentSchlbk-Ital.pmf \
-        NewCentSchlbk-Roman.pmf \
-        Souvenir-Demi.pmf \
-        Souvenir-DemiItalic.pmf \
-        Souvenir-Light.pmf \
-        Souvenir-LightItalic.pmf \
-        Symbol.pmf \
-        Times-Bold.pmf \
-        Times-BoldItalic.pmf \
-        Times-Italic.pmf \
-        Times-Roman.pmf \
-        ZapfDingbats.pmf
-
-dest = $(DESTDIR)$(xpcdir)
-
-remove-stuff:
-	for x in $(XPFONTS) ; do			\
-		rm -f $(dest)/$$x	;		\
-	done
-
-	@rm -f $(dest)/fonts.dir
-
-install-data-hook: remove-stuff
-	mkdir -p $(dest) ;					\
-	for x in $(XPFONTS) ; do				\
-		ln -s $(parentdir)/$$x $(dest)/$$x	;	\
-	done
-
-	$(MKFONTSCALE) -b -s -l $(dest)
-
-uninstall-hook: remove-stuff
diff --git a/hw/xprint/config/C/print/models/CANONC3200-PS/model-config b/hw/xprint/config/C/print/models/CANONC3200-PS/model-config
deleted file mode 100644
index cdb3f49..0000000
--- a/hw/xprint/config/C/print/models/CANONC3200-PS/model-config
+++ /dev/null
@@ -1,40 +0,0 @@
-# $Xprint.org: CANONC3200-PS model-config,v 1.1 2004/06/24 09:18:04 gisburn Exp $
-# model-config for the PostScript DDX
-#
-# automatically generated by xpppdtomodelconfig V0.1
-#
-# DO NOT MODIFY THIS FILE!!
-#
-# Attributes supported for this printer model
-*content-orientations-supported: portrait landscape reverse-portrait reverse-landscape
-*descriptor: Canon iR C3200
-*document-formats-supported: {POSTSCRIPT 2}
-*input-trays-supported:
-*medium-source-sizes-supported: \
-{ '' \
-    {iso-a4 FALSE {4.002 206 4.002 293}}\
-    {na-letter FALSE {4.002 211.9 4.002 275.4}}\
-    {na-legal FALSE {4.002 211.9 4.002 351.6}}\
-    {iso-a3 FALSE {4.002 293 4.002 416}}\
-    {iso-a5 FALSE {4.002 144 4.002 206}}\
-    {iso-b4 FALSE {4.002 246 4.002 349}}\
-    {iso-b5 FALSE {4.002 172 4.002 246}}\
-    {executive FALSE {4.002 180.1 4.002 262.7}}\
-    {invoice FALSE {4.002 135.7 4.002 211.9}}\
-    {monarch-envelope FALSE {4.002 94.3 4.002 186.5}}\
-    {na-number-10-envelop FALSE {4.002 100.8 4.002 237.3}}\
-    {iso-c5 FALSE {4.002 158 4.002 225}}\
-}
-
-*plexes-supported: simplex duplex tumble
-*printer-model: "Canon iR C3200"
-*printer-resolutions-supported:  600
-*xp-ddx-identifier: XP-POSTSCRIPT
-*xp-listfonts-modes-supported: xp-list-internal-printer-fonts xp-list-glyph-fonts
-*xp-embedded-formats-supported: {POSTSCRIPT 2}
-*xp-raw-formats-supported: {POSTSCRIPT 2}
-*xp-setup-proviso: setup-optional
-# NOTE: xp-psddx-* attributes are EXPERIMENTAL for now.
-*xp-psddx-download-fonts: pfa pfb ttf ttc otf otc
-*xp-psddx-download-font-type: pstype1
-# EOF.
diff --git a/hw/xprint/config/C/print/models/GSdefault/Makefile.am b/hw/xprint/config/C/print/models/GSdefault/Makefile.am
deleted file mode 100644
index be0426c..0000000
--- a/hw/xprint/config/C/print/models/GSdefault/Makefile.am
+++ /dev/null
@@ -1,3 +0,0 @@
-xpcdir = @xpconfigdir@/C/print/models/GSdefault
-
-dist_xpc_DATA = model-config
diff --git a/hw/xprint/config/C/print/models/GSdefault/model-config b/hw/xprint/config/C/print/models/GSdefault/model-config
deleted file mode 100644
index 61dac18..0000000
--- a/hw/xprint/config/C/print/models/GSdefault/model-config
+++ /dev/null
@@ -1,137 +0,0 @@
-# $Xprint.org: GSdefault model-config,v 1.1 2003/02/10 14:48:04 gisburn Exp $
-# Generic default model-config for the PostScript DDX when using GhostScript
-# as printer driver
-#
-# DO NOT MODIFY THIS FILE!!
-#
-# If you want to make customisations for your printer create a copy
-# of this printer model.
-# Example (for creating a model config "MYCOMPANYlaserxx"):
-# 1. Create model config dir:
-#    % mkdir MYCOMPANYlaserxx
-# 2. Link (or copy) the PMF (printer font metrics) for the
-#    printer buildin fonts:
-#    % ln -s GSdefault/fonts MYCOMPANYlaserxx/.
-# 3. Copy the model config file:
-#    % cp GSdefault/model-config MYCOMPANYlaserxx/.
-# 4. Customize MYCOMPANYlaserxx/model-config to match your needs.
-#
-
-# Attributes supported for this printer model
-# You may want to cut the lists here down to the attributes supported
-# by your printer.
-*content-orientations-supported: portrait landscape reverse-portrait reverse-landscape
-*descriptor: GhostScript default model
-*document-formats-supported: {POSTSCRIPT 2}
-*input-trays-supported:
-*medium-source-sizes-supported: \
-{ '' \
-    {na-letter                  FALSE {6.35 209.55 6.35 273.05}}\
-    {na-legal                   FALSE {6.35 209.55 6.35 349.25}}\
-    {executive                  FALSE {6.35 177.80 6.35 260.35}}\
-    {folio                      FALSE {6.35 204.47 6.35 323.85}}\
-    {invoice                    FALSE {6.35 133.35 6.35 209.55}}\
-    {ledger                     FALSE {6.35 273.05 6.35 425.45}}\
-    {quarto                     FALSE {6.35 209.55 6.35 268.732}}\
-    {a                          FALSE {6.35 209.55 6.35 273.05}}\
-    {b                          FALSE {6.35 273.05 6.35 425.45}}\
-    {c                          FALSE {6.35 425.45 6.35 552.45}}\
-    {d                          FALSE {6.35 552.45 6.35 857.25}}\
-    {e                          FALSE {6.35 857.25 6.35 1111.25}}\
-    {na-6x9-envelope            FALSE {6.35 146.05 6.35 222.25}}\
-    {na-10x15-envelope          FALSE {6.35 247.65 6.35 374.65}}\
-    {monarch-envelope           FALSE {6.35 91.948 6.35 184.15}}\
-    {na-10x13-envelope          FALSE {6.35 247.65 6.35 323.85}}\
-    {na-9x12-envelope           FALSE {6.35 222.25 6.35 298.45}}\
-    {na-number-10-envelope      FALSE {6.35 98.425 6.35 234.95}}\
-    {na-7x9-envelope            FALSE {6.35 171.45 6.35 222.25}}\
-    {na-9x11-envelope           FALSE {6.35 222.25 6.35 273.05}}\
-    {na-10x14-envelope          FALSE {6.35 247.65 6.35 349.25}}\
-    {na-number-9-envelope       FALSE {6.35 92.075 6.35 219.075}}\
-    {iso-a0                     FALSE {6.35 834.65 6.35 1182.65}}\
-    {iso-a1                     FALSE {6.35 587.65 6.35 834.65}}\
-    {iso-a2                     FALSE {6.35 413.65 6.35 587.65}}\
-    {iso-a3                     FALSE {6.35 290.65 6.35 413.65}}\
-    {iso-a4                     FALSE {6.35 203.65 6.35 290.65}}\
-    {iso-a5                     FALSE {6.35 141.65 6.35 203.65}}\
-    {iso-a6                     FALSE {6.35 98.65 6.35 141.65}}\
-    {iso-a7                     FALSE {6.35 67.65 6.35 98.65}}\
-    {iso-a8                     FALSE {6.35 45.65 6.35 67.65}}\
-    {iso-a9                     FALSE {6.35 30.65 6.35 45.65}}\
-    {iso-a10                    FALSE {6.35 19.65 6.35 30.65}}\
-    {iso-b1                     FALSE {6.35 700.65 6.35 993.65}}\
-    {iso-b2                     FALSE {6.35 493.65 6.35 700.65}}\
-    {iso-b3                     FALSE {6.35 346.65 6.35 493.65}}\
-    {iso-b4                     FALSE {6.35 243.65 6.35 346.65}}\
-    {iso-b5                     FALSE {6.35 169.65 6.35 243.65}}\
-    {iso-b6                     FALSE {6.35 118.65 6.35 169.65}}\
-    {iso-b7                     FALSE {6.35 81.65 6.35 118.65}}\
-    {iso-b8                     FALSE {6.35 55.65 6.35 81.65}}\
-    {iso-b9                     FALSE {6.35 37.65 6.35 55.65}}\
-    {iso-b10                    FALSE {6.35 24.65 6.35 37.65}}\
-    {jis-b1                     FALSE {6.35 721.65 6.35 1023.65}}\
-    {jis-b2                     FALSE {6.35 508.65 6.35 721.65}}\
-    {jis-b3                     FALSE {6.35 357.65 6.35 508.65}}\
-    {jis-b4                     FALSE {6.35 250.65 6.35 357.65}}\
-    {jis-b5                     FALSE {6.35 175.65 6.35 250.65}}\
-    {jis-b6                     FALSE {6.35 121.65 6.35 175.65}}\
-    {jis-b7                     FALSE {6.35 84.65 6.35 121.65}}\
-    {jis-b8                     FALSE {6.35 57.65 6.35 84.65}}\
-    {jis-b9                     FALSE {6.35 38.65 6.35 57.65}}\
-    {jis-b10                    FALSE {6.35 25.65 6.35 38.65}}\
-    {iso-c3                     FALSE {6.35 317.65 6.35 451.65}}\
-    {iso-c4                     FALSE {6.35 222.65 6.35 317.65}}\
-    {iso-c5                     FALSE {6.35 155.65 6.35 222.65}}\
-    {iso-c6                     FALSE {6.35 107.65 6.35 155.65}}\
-    {iso-designated-long        FALSE {6.35 103.65 6.35 213.65}}\
-    {hp-2x-postcard             FALSE {6.35 141.65 6.35 193.65}}\
-    {hp-european-edp            FALSE {6.35 298.45 6.35 349.25}}\
-    {hp-mini                    FALSE {6.35 133.35 6.35 209.55}}\
-    {hp-postcard                FALSE {6.35 93.65  6.35 141.65}}\
-    {hp-tabloid                 FALSE {6.35 273.05 6.35 425.45}}\
-    {hp-us-edp                  FALSE {6.35 273.05 6.35 349.25}}\
-    {hp-us-government-legal     FALSE {6.35 196.85 6.35 323.85}}\
-    {hp-us-government-letter    FALSE {6.35 196.85 6.35 247.65}}\
-}
-# If you have more than one tray use the following example:
-# 1. List the supported trays
-#*input-trays-supported: main manual
-# 2. Define each tray and it's paper sizes
-#*medium-source-sizes-supported: \
-#{ main \
-#	{na-letter		FALSE	{6.35	209.55	6.35	273.05}} \
-#	{na-legal		FALSE	{6.35	209.55	6.35	349.25}} \
-#	{iso-a4			FALSE	{6.35	203.65	6.35	290.65}} \
-#} \
-#{ manual \
-#	{iso-a5			FALSE	{6.35	141.65	6.35	203.65}} \
-#	{iso-c5			FALSE	{6.35	155.65	6.35	222.65}} \
-#	{iso-designated-long	FALSE	{6.35	103.65	6.35	213.65}} \
-#	{jis-b5			FALSE	{6.35	175.65	6.35	250.65}} \
-#	{monarch-envelope	FALSE	{6.35	91.948	6.35	184.15}} \
-#	{na-legal		FALSE	{6.35	209.55	6.35	349.25}} \
-#	{na-number-10-envelope	FALSE	{6.35	98.425	6.35	234.95}} \
-#	{executive		FALSE	{6.35	177.8	6.35	260.35}} \
-#	{iso-a3			FALSE	{6.35   290.65  6.35    413.65}} \
-#       {iso-a0                 FALSE   {6.35   834.65  6.35   1182.65}} \
-#}
-*plexes-supported: simplex duplex tumble
-*printer-model: "GhostScript default model"
-# 75, 100, 120, 150, 180, 200, 240, 300, 360, 400, 600, 720,
-# 940, 1200 and 2440 are supported DPI values, we limit it here
-# to some common values:
-*printer-resolutions-supported: 300 360 400 600
-*xp-ddx-identifier: XP-POSTSCRIPT
-*xp-listfonts-modes-supported: xp-list-internal-printer-fonts xp-list-glyph-fonts
-*xp-embedded-formats-supported: {POSTSCRIPT 2}
-*xp-raw-formats-supported: {POSTSCRIPT 2}
-*xp-setup-proviso: setup-optional
-
-# NOTE: xp-psddx-* attributes are EXPERIMENTAL for now.
-# xp-psddx-download-fonts defines which fonts should be downloaded as outlines
-# (valid types are "pfa", "pfb", "ttf", "ttc", "otf", "otc")
-*xp-psddx-download-fonts: pfa pfb ttf ttc otf otc
-# xp-psddx-download-font-type defines which font type is used to download outlines 
-# (valid values are "bitmap", "pstype1" and "pstype3")
-*xp-psddx-download-font-type: pstype1
-# EOF.
diff --git a/hw/xprint/config/C/print/models/HPDJ1600C/Makefile.am b/hw/xprint/config/C/print/models/HPDJ1600C/Makefile.am
deleted file mode 100644
index 1c8b3b5..0000000
--- a/hw/xprint/config/C/print/models/HPDJ1600C/Makefile.am
+++ /dev/null
@@ -1,5 +0,0 @@
-SUBDIRS = fonts
-
-xpcdir = @xpconfigdir@/C/print/models/HPDJ1600C
-
-dist_xpc_DATA = model-config
diff --git a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00051.pmf b/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00051.pmf
deleted file mode 100644
index 09cc489..0000000
Binary files a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00051.pmf and /dev/null differ
diff --git a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00052.pmf b/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00052.pmf
deleted file mode 100644
index b21a9a2..0000000
Binary files a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00052.pmf and /dev/null differ
diff --git a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00053.pmf b/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00053.pmf
deleted file mode 100644
index 485b874..0000000
Binary files a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00053.pmf and /dev/null differ
diff --git a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00054.pmf b/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00054.pmf
deleted file mode 100644
index 524934c..0000000
Binary files a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00054.pmf and /dev/null differ
diff --git a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00055.pmf b/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00055.pmf
deleted file mode 100644
index 2ef9bc5..0000000
Binary files a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00055.pmf and /dev/null differ
diff --git a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00056.pmf b/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00056.pmf
deleted file mode 100644
index 3d69311..0000000
Binary files a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00056.pmf and /dev/null differ
diff --git a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00057.pmf b/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00057.pmf
deleted file mode 100644
index 3833d4f..0000000
Binary files a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00057.pmf and /dev/null differ
diff --git a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00058.pmf b/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00058.pmf
deleted file mode 100644
index 289a95e..0000000
Binary files a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00058.pmf and /dev/null differ
diff --git a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00059.pmf b/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00059.pmf
deleted file mode 100644
index a5984be..0000000
Binary files a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00059.pmf and /dev/null differ
diff --git a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00060.pmf b/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00060.pmf
deleted file mode 100644
index df27cd7..0000000
Binary files a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00060.pmf and /dev/null differ
diff --git a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00061.pmf b/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00061.pmf
deleted file mode 100644
index fb2b5a4..0000000
Binary files a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00061.pmf and /dev/null differ
diff --git a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00062.pmf b/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00062.pmf
deleted file mode 100644
index f0e58c4..0000000
Binary files a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00062.pmf and /dev/null differ
diff --git a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00063.pmf b/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00063.pmf
deleted file mode 100644
index 8821ff1..0000000
Binary files a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00063.pmf and /dev/null differ
diff --git a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00064.pmf b/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00064.pmf
deleted file mode 100644
index e5980fc..0000000
Binary files a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00064.pmf and /dev/null differ
diff --git a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00065.pmf b/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00065.pmf
deleted file mode 100644
index d9a151d..0000000
Binary files a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00065.pmf and /dev/null differ
diff --git a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00066.pmf b/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00066.pmf
deleted file mode 100644
index d14fca5..0000000
Binary files a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00066.pmf and /dev/null differ
diff --git a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00067.pmf b/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00067.pmf
deleted file mode 100644
index 7a34150..0000000
Binary files a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00067.pmf and /dev/null differ
diff --git a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00068.pmf b/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00068.pmf
deleted file mode 100644
index c20e39a..0000000
Binary files a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00068.pmf and /dev/null differ
diff --git a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00069.pmf b/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00069.pmf
deleted file mode 100644
index 4a4a352..0000000
Binary files a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00069.pmf and /dev/null differ
diff --git a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00070.pmf b/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00070.pmf
deleted file mode 100644
index 8d97d43..0000000
Binary files a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00070.pmf and /dev/null differ
diff --git a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00071.pmf b/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00071.pmf
deleted file mode 100644
index 19844c9..0000000
Binary files a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00071.pmf and /dev/null differ
diff --git a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00072.pmf b/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00072.pmf
deleted file mode 100644
index 5415c3f..0000000
Binary files a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00072.pmf and /dev/null differ
diff --git a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00073.pmf b/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00073.pmf
deleted file mode 100644
index 038dfdb..0000000
Binary files a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00073.pmf and /dev/null differ
diff --git a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00074.pmf b/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00074.pmf
deleted file mode 100644
index 382a785..0000000
Binary files a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00074.pmf and /dev/null differ
diff --git a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00075.pmf b/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00075.pmf
deleted file mode 100644
index 1c7edf6..0000000
Binary files a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00075.pmf and /dev/null differ
diff --git a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00076.pmf b/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00076.pmf
deleted file mode 100644
index 2f077f4..0000000
Binary files a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00076.pmf and /dev/null differ
diff --git a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00077.pmf b/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00077.pmf
deleted file mode 100644
index 1ce190d..0000000
Binary files a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00077.pmf and /dev/null differ
diff --git a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00079.pmf b/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00079.pmf
deleted file mode 100644
index 45d6906..0000000
Binary files a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00079.pmf and /dev/null differ
diff --git a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00080.pmf b/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00080.pmf
deleted file mode 100644
index b991b5e..0000000
Binary files a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00080.pmf and /dev/null differ
diff --git a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00081.pmf b/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00081.pmf
deleted file mode 100644
index 1935a9f..0000000
Binary files a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00081.pmf and /dev/null differ
diff --git a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00082.pmf b/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00082.pmf
deleted file mode 100644
index 2000dc0..0000000
Binary files a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00082.pmf and /dev/null differ
diff --git a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00083.pmf b/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00083.pmf
deleted file mode 100644
index 90f0e45..0000000
Binary files a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00083.pmf and /dev/null differ
diff --git a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00084.pmf b/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00084.pmf
deleted file mode 100644
index 52ba39b..0000000
Binary files a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00084.pmf and /dev/null differ
diff --git a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00085.pmf b/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00085.pmf
deleted file mode 100644
index f5c9053..0000000
Binary files a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00085.pmf and /dev/null differ
diff --git a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00086.pmf b/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00086.pmf
deleted file mode 100644
index b7586ca..0000000
Binary files a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00086.pmf and /dev/null differ
diff --git a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00087.pmf b/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00087.pmf
deleted file mode 100644
index 82f0549..0000000
Binary files a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00087.pmf and /dev/null differ
diff --git a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00088.pmf b/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00088.pmf
deleted file mode 100644
index 591c96b..0000000
Binary files a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00088.pmf and /dev/null differ
diff --git a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00089.pmf b/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00089.pmf
deleted file mode 100644
index c816095..0000000
Binary files a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00089.pmf and /dev/null differ
diff --git a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00090.pmf b/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00090.pmf
deleted file mode 100644
index 895cfe2..0000000
Binary files a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00090.pmf and /dev/null differ
diff --git a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00091.pmf b/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00091.pmf
deleted file mode 100644
index 3bdcae4..0000000
Binary files a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00091.pmf and /dev/null differ
diff --git a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00092.pmf b/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00092.pmf
deleted file mode 100644
index a56d475..0000000
Binary files a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00092.pmf and /dev/null differ
diff --git a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00093.pmf b/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00093.pmf
deleted file mode 100644
index c85f3b4..0000000
Binary files a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00093.pmf and /dev/null differ
diff --git a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00094.pmf b/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00094.pmf
deleted file mode 100644
index 875bf1d..0000000
Binary files a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00094.pmf and /dev/null differ
diff --git a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/Makefile.am b/hw/xprint/config/C/print/models/HPDJ1600C/fonts/Makefile.am
deleted file mode 100644
index b32079e..0000000
--- a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/Makefile.am
+++ /dev/null
@@ -1,50 +0,0 @@
-xpcdir = @xpconfigdir@/C/print/models/HPDJ1600C/fonts
-
-dist_xpc_DATA =			\
-	9nb00051.pmf		\
-	9nb00052.pmf		\
-	9nb00053.pmf		\
-	9nb00054.pmf		\
-	9nb00055.pmf		\
-	9nb00056.pmf		\
-	9nb00057.pmf		\
-	9nb00058.pmf		\
-	9nb00059.pmf		\
-	9nb00060.pmf		\
-	9nb00061.pmf		\
-	9nb00062.pmf		\
-	9nb00063.pmf		\
-	9nb00064.pmf		\
-	9nb00065.pmf		\
-	9nb00066.pmf		\
-	9nb00067.pmf		\
-	9nb00068.pmf		\
-	9nb00069.pmf		\
-	9nb00070.pmf		\
-	9nb00071.pmf		\
-	9nb00072.pmf		\
-	9nb00073.pmf		\
-	9nb00074.pmf		\
-	9nb00075.pmf		\
-	9nb00076.pmf		\
-	9nb00077.pmf		\
-	9nb00079.pmf		\
-	9nb00080.pmf		\
-	9nb00081.pmf		\
-	9nb00082.pmf		\
-	9nb00083.pmf		\
-	9nb00084.pmf		\
-	9nb00085.pmf		\
-	9nb00086.pmf		\
-	9nb00087.pmf		\
-	9nb00088.pmf		\
-	9nb00089.pmf		\
-	9nb00090.pmf		\
-	9nb00091.pmf		\
-	9nb00092.pmf		\
-	9nb00093.pmf		\
-	9nb00094.pmf		\
-	lpr0ye1a.pmf		\
-	fonts.alias		\
-	fonts.dir		\
-	README
diff --git a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/README b/hw/xprint/config/C/print/models/HPDJ1600C/fonts/README
deleted file mode 100644
index cccc2be..0000000
--- a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/README
+++ /dev/null
@@ -1,197 +0,0 @@
-$Xorg: README,v 1.3 2000/08/17 19:48:04 cpqbld Exp $
-
-This directory contains "printer metric files" for the X Print
-Server suitable for the DeskJet 1600C printer.  The following
-*.pmf files were generated by the Hewlett-Packard Company.
-
-     9nb00051.pmf
-     9nb00052.pmf
-     9nb00053.pmf
-     9nb00054.pmf
-     9nb00055.pmf
-     9nb00056.pmf
-     9nb00057.pmf
-     9nb00058.pmf
-     9nb00059.pmf
-     9nb00060.pmf
-     9nb00061.pmf
-     9nb00062.pmf
-     9nb00063.pmf
-     9nb00064.pmf
-     9nb00065.pmf
-     9nb00066.pmf
-     9nb00067.pmf
-     9nb00068.pmf
-     9nb00069.pmf
-     9nb00070.pmf
-     9nb00071.pmf
-     9nb00072.pmf
-     9nb00073.pmf
-     9nb00074.pmf
-     9nb00075.pmf
-     9nb00076.pmf
-     9nb00077.pmf
-     9nb00079.pmf
-     9nb00080.pmf
-     9nb00081.pmf
-     9nb00082.pmf
-     9nb00083.pmf
-     9nb00084.pmf
-     9nb00085.pmf
-     9nb00086.pmf
-     9nb00087.pmf
-     9nb00088.pmf
-     9nb00089.pmf
-     9nb00090.pmf
-     9nb00091.pmf
-     9nb00092.pmf
-     9nb00093.pmf
-     9nb00094.pmf
-     lpr0ye1a.pmf
-
-For reasons of not supporting iso8859.1 and hp-roman8, the following
-DeskJet 1600C printer fonts were not converted to *.pmf files.
-
-     9nb00078.pmf
-     9nb00095.pmf
-     lpr0ylga.pmf
-     lpr0ypca.pmf
-     lpr0ypda.pmf
-     lpr0ypma.pmf
-     lpr0yr8a.pmf
-
-Output from the conversion utility is as follows:
-
-     Creating iso8859 1 pmf for 9nb00051.tfm as iso8859.1/9nb00051.pmf
-     -COMPUGRAPHIC-Albertus-Extra Bold-r-Normal--8782-2500-2540-2540-P-42480-iso8859-1
-     ------------------------------------
-     Creating iso8859 1 pmf for 9nb00052.tfm as iso8859.1/9nb00052.pmf
-     -COMPUGRAPHIC-Albertus-Semi Bold-r-Normal--8782-2500-2540-2540-P-37640-iso8859-1
-     ------------------------------------
-     Creating iso8859 1 pmf for 9nb00053.tfm as iso8859.1/9nb00053.pmf
-     -COMPUGRAPHIC-Antique Olive-Bold-r-Normal--8782-2500-2540-2540-P-50490-iso8859-1
-     ------------------------------------
-     Creating iso8859 1 pmf for 9nb00054.tfm as iso8859.1/9nb00054.pmf
-     -COMPUGRAPHIC-Antique Olive-Medium-i-Normal--8782-2500-2540-2540-P-46140-iso8859-1
-     ------------------------------------
-     Creating iso8859 1 pmf for 9nb00055.tfm as iso8859.1/9nb00055.pmf
-     -COMPUGRAPHIC-Antique Olive-Medium-r-Normal--8782-2500-2540-2540-P-46380-iso8859-1
-     ------------------------------------
-     Creating iso8859 1 pmf for 9nb00056.tfm as iso8859.1/9nb00056.pmf
-     -Monotype-Arial-Bold-r-Normal--2048-2500-589-589-P-9800-iso8859-1
-     ------------------------------------
-     Creating iso8859 1 pmf for 9nb00057.tfm as iso8859.1/9nb00057.pmf
-     -Monotype-Arial-Medium-i-Normal--2048-2500-589-589-P-9040-iso8859-1
-     ------------------------------------
-     Creating iso8859 1 pmf for 9nb00058.tfm as iso8859.1/9nb00058.pmf
-     -Monotype-Arial-Bold-i-Normal--2048-2500-589-589-P-9800-iso8859-1
-     ------------------------------------
-     Creating iso8859 1 pmf for 9nb00059.tfm as iso8859.1/9nb00059.pmf
-     -Monotype-Arial-Medium-r-Normal--2048-2500-589-589-P-9040-iso8859-1
-     ------------------------------------
-     Creating iso8859 1 pmf for 9nb00060.tfm as iso8859.1/9nb00060.pmf
-     -COMPUGRAPHIC-Clarendon-Bold-r-Condensed--8782-2500-2540-2540-P-35080-iso8859-1
-     ------------------------------------
-     Creating iso8859 1 pmf for 9nb00061.tfm as iso8859.1/9nb00061.pmf
-     -COMPUGRAPHIC-Courier-Bold-r-Normal--8782-2500-2540-2540-M-52910-iso8859-1
-     ------------------------------------
-     Creating iso8859 1 pmf for 9nb00062.tfm as iso8859.1/9nb00062.pmf
-     -COMPUGRAPHIC-Courier-Medium-i-Normal--8782-2500-2540-2540-M-52910-iso8859-1
-     ------------------------------------
-     Creating iso8859 1 pmf for 9nb00063.tfm as iso8859.1/9nb00063.pmf
-     -COMPUGRAPHIC-Courier-Bold-i-Normal--8782-2500-2540-2540-M-52910-iso8859-1
-     ------------------------------------
-     Creating iso8859 1 pmf for 9nb00064.tfm as iso8859.1/9nb00064.pmf
-     -COMPUGRAPHIC-Courier-Medium-r-Normal--8782-2500-2540-2540-M-52910-iso8859-1
-     ------------------------------------
-     Creating iso8859 1 pmf for 9nb00065.tfm as iso8859.1/9nb00065.pmf
-     -COMPUGRAPHIC-Garamond-Bold-r-Normal--8782-2500-2540-2540-P-38730-iso8859-1
-     ------------------------------------
-     Creating iso8859 1 pmf for 9nb00066.tfm as iso8859.1/9nb00066.pmf
-     -COMPUGRAPHIC-Garamond-Medium-i-Normal--8782-2500-2540-2540-P-34280-iso8859-1
-     ------------------------------------
-     Creating iso8859 1 pmf for 9nb00067.tfm as iso8859.1/9nb00067.pmf
-     -COMPUGRAPHIC-Garamond-Bold-i-Normal--8782-2500-2540-2540-P-37020-iso8859-1
-     ------------------------------------
-     Creating iso8859 1 pmf for 9nb00068.tfm as iso8859.1/9nb00068.pmf
-     -COMPUGRAPHIC-Garamond-Medium-r-Normal--8782-2500-2540-2540-P-36560-iso8859-1
-     ------------------------------------
-     Creating iso8859 1 pmf for 9nb00069.tfm as iso8859.1/9nb00069.pmf
-     -COMPUGRAPHIC-Letter Gothic-Bold-r-Normal--8782-2500-2540-2540-M-44090-iso8859-1
-     ------------------------------------
-     Creating iso8859 1 pmf for 9nb00070.tfm as iso8859.1/9nb00070.pmf
-     -COMPUGRAPHIC-Letter Gothic-Medium-i-Normal--8782-2500-2540-2540-M-44090-iso8859-1
-     ------------------------------------
-     Creating iso8859 1 pmf for 9nb00071.tfm as iso8859.1/9nb00071.pmf
-     -COMPUGRAPHIC-Letter Gothic-Medium-r-Normal--8782-2500-2540-2540-M-44090-iso8859-1
-     ------------------------------------
-     Creating iso8859 1 pmf for 9nb00072.tfm as iso8859.1/9nb00072.pmf
-     -COMPUGRAPHIC-Marigold-Medium-r-Normal--8782-2500-2540-2540-P-21890-iso8859-1
-     ------------------------------------
-     Creating iso8859 1 pmf for 9nb00073.tfm as iso8859.1/9nb00073.pmf
-     -COMPUGRAPHIC-Omega-Bold-r-Normal--8782-2500-2540-2540-P-38600-iso8859-1
-     ------------------------------------
-     Creating iso8859 1 pmf for 9nb00074.tfm as iso8859.1/9nb00074.pmf
-     -COMPUGRAPHIC-Omega-Medium-i-Normal--8782-2500-2540-2540-P-37980-iso8859-1
-     ------------------------------------
-     Creating iso8859 1 pmf for 9nb00075.tfm as iso8859.1/9nb00075.pmf
-     -COMPUGRAPHIC-Omega-Bold-i-Normal--8782-2500-2540-2540-P-38560-iso8859-1
-     ------------------------------------
-     Creating iso8859 1 pmf for 9nb00076.tfm as iso8859.1/9nb00076.pmf
-     -COMPUGRAPHIC-Omega-Medium-r-Normal--8782-2500-2540-2540-P-37770-iso8859-1
-     ------------------------------------
-     Creating iso8859 1 pmf for 9nb00077.tfm as iso8859.1/9nb00077.pmf
-     -COMPUGRAPHIC-Coronet-Medium-i-Normal--8782-2500-2540-2540-P-22870-iso8859-1
-     ------------------------------------
-     Creating iso8859 1 pmf for 9nb00079.tfm as iso8859.1/9nb00079.pmf
-     -Monotype-Times New Roman-Bold-r-Normal--2048-2500-589-589-P-8740-iso8859-1
-     ------------------------------------
-     Creating iso8859 1 pmf for 9nb00080.tfm as iso8859.1/9nb00080.pmf
-     -Monotype-Times New Roman-Medium-i-Normal--2048-2500-589-589-P-8230-iso8859-1
-     ------------------------------------
-     Creating iso8859 1 pmf for 9nb00081.tfm as iso8859.1/9nb00081.pmf
-     -Monotype-Times New Roman-Bold-i-Normal--2048-2500-589-589-P-8440-iso8859-1
-     ------------------------------------
-     Creating iso8859 1 pmf for 9nb00082.tfm as iso8859.1/9nb00082.pmf
-     -Monotype-Times New Roman-Medium-r-Normal--2048-2500-589-589-P-8210-iso8859-1
-     ------------------------------------
-     Creating iso8859 1 pmf for 9nb00083.tfm as iso8859.1/9nb00083.pmf
-     -COMPUGRAPHIC-Times-Bold-r-Normal--8782-2500-2540-2540-P-38200-iso8859-1
-     ------------------------------------
-     Creating iso8859 1 pmf for 9nb00084.tfm as iso8859.1/9nb00084.pmf
-     -COMPUGRAPHIC-Times-Medium-i-Normal--8782-2500-2540-2540-P-36000-iso8859-1
-     ------------------------------------
-     Creating iso8859 1 pmf for 9nb00085.tfm as iso8859.1/9nb00085.pmf
-     -COMPUGRAPHIC-Times-Bold-i-Normal--8782-2500-2540-2540-P-36900-iso8859-1
-     ------------------------------------
-     Creating iso8859 1 pmf for 9nb00086.tfm as iso8859.1/9nb00086.pmf
-     -COMPUGRAPHIC-Times-Medium-r-Normal--8782-2500-2540-2540-P-36080-iso8859-1
-     ------------------------------------
-     Creating iso8859 1 pmf for 9nb00087.tfm as iso8859.1/9nb00087.pmf
-     -COMPUGRAPHIC-Univers-Medium-i-Condensed--8782-2500-2540-2540-P-29970-iso8859-1
-     ------------------------------------
-     Creating iso8859 1 pmf for 9nb00088.tfm as iso8859.1/9nb00088.pmf
-     -COMPUGRAPHIC-Univers-Bold-r-Normal--8782-2500-2540-2540-P-41280-iso8859-1
-     ------------------------------------
-     Creating iso8859 1 pmf for 9nb00089.tfm as iso8859.1/9nb00089.pmf
-     -COMPUGRAPHIC-Univers-Medium-r-Condensed--8782-2500-2540-2540-P-29970-iso8859-1
-     ------------------------------------
-     Creating iso8859 1 pmf for 9nb00090.tfm as iso8859.1/9nb00090.pmf
-     -COMPUGRAPHIC-Univers-Bold-r-Condensed--8782-2500-2540-2540-P-33030-iso8859-1
-     ------------------------------------
-     Creating iso8859 1 pmf for 9nb00091.tfm as iso8859.1/9nb00091.pmf
-     -COMPUGRAPHIC-Univers-Bold-i-Condensed--8782-2500-2540-2540-P-33030-iso8859-1
-     ------------------------------------
-     Creating iso8859 1 pmf for 9nb00092.tfm as iso8859.1/9nb00092.pmf
-     -COMPUGRAPHIC-Univers-Medium-i-Normal--8782-2500-2540-2540-P-41280-iso8859-1
-     ------------------------------------
-     Creating iso8859 1 pmf for 9nb00093.tfm as iso8859.1/9nb00093.pmf
-     -COMPUGRAPHIC-Univers-Bold-i-Normal--8782-2500-2540-2540-P-41280-iso8859-1
-     ------------------------------------
-     Creating iso8859 1 pmf for 9nb00094.tfm as iso8859.1/9nb00094.pmf
-     -COMPUGRAPHIC-Univers-Medium-r-Normal--8782-2500-2540-2540-P-41280-iso8859-1
-     ------------------------------------
-     Creating iso8859 1 pmf for lpr0ye1a.tfm as iso8859.1/lpr0ye1a.pmf
-     -HP-Line Printer-Medium-r-Normal--35-85-300-300-M-180-iso8859-1
-     ------------------------------------
-
diff --git a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/fonts.alias b/hw/xprint/config/C/print/models/HPDJ1600C/fonts/fonts.alias
deleted file mode 100644
index e69de29..0000000
diff --git a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/fonts.dir b/hw/xprint/config/C/print/models/HPDJ1600C/fonts/fonts.dir
deleted file mode 100644
index da702cc..0000000
--- a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/fonts.dir
+++ /dev/null
@@ -1,45 +0,0 @@
-44
-lpr0ye1a.pmf -hp-line printer-medium-r-normal--35-85-300-300-m-180-iso8859-1
-9nb00080.pmf -monotype-times new roman-medium-i-normal--2048-2500-589-589-p-8230-iso8859-1
-9nb00092.pmf -compugraphic-univers-medium-i-normal--8782-2500-2540-2540-p-41280-iso8859-1
-9nb00081.pmf -monotype-times new roman-bold-i-normal--2048-2500-589-589-p-8440-iso8859-1
-9nb00093.pmf -compugraphic-univers-bold-i-normal--8782-2500-2540-2540-p-41280-iso8859-1
-9nb00082.pmf -monotype-times new roman-medium-r-normal--2048-2500-589-589-p-8210-iso8859-1
-9nb00090.pmf -compugraphic-univers-bold-r-condensed--8782-2500-2540-2540-p-33030-iso8859-1
-9nb00083.pmf -compugraphic-times-bold-r-normal--8782-2500-2540-2540-p-38200-iso8859-1
-9nb00091.pmf -compugraphic-univers-bold-i-condensed--8782-2500-2540-2540-p-33030-iso8859-1
-9nb00084.pmf -compugraphic-times-medium-i-normal--8782-2500-2540-2540-p-36000-iso8859-1
-9nb00085.pmf -compugraphic-times-bold-i-normal--8782-2500-2540-2540-p-36900-iso8859-1
-9nb00086.pmf -compugraphic-times-medium-r-normal--8782-2500-2540-2540-p-36080-iso8859-1
-9nb00094.pmf -compugraphic-univers-medium-r-normal--8782-2500-2540-2540-p-41280-iso8859-1
-9nb00087.pmf -compugraphic-univers-medium-i-condensed--8782-2500-2540-2540-p-29970-iso8859-1
-9nb00088.pmf -compugraphic-univers-bold-r-normal--8782-2500-2540-2540-p-41280-iso8859-1
-9nb00089.pmf -compugraphic-univers-medium-r-condensed--8782-2500-2540-2540-p-29970-iso8859-1
-9nb00058.pmf -monotype-arial-bold-i-normal--2048-2500-589-589-p-9800-iso8859-1
-9nb00059.pmf -monotype-arial-medium-r-normal--2048-2500-589-589-p-9040-iso8859-1
-9nb00068.pmf -compugraphic-garamond-medium-r-normal--8782-2500-2540-2540-p-36560-iso8859-1
-9nb00069.pmf -compugraphic-letter gothic-bold-r-normal--8782-2500-2540-2540-m-44090-iso8859-1
-9nb00079.pmf -monotype-times new roman-bold-r-normal--2048-2500-589-589-p-8740-iso8859-1
-9nb00052.pmf -compugraphic-albertus-semi bold-r-normal--8782-2500-2540-2540-p-37640-iso8859-1
-9nb00064.pmf -compugraphic-courier-medium-r-normal--8782-2500-2540-2540-m-52910-iso8859-1
-9nb00076.pmf -compugraphic-omega-medium-r-normal--8782-2500-2540-2540-p-37770-iso8859-1
-9nb00053.pmf -compugraphic-antique olive-bold-r-normal--8782-2500-2540-2540-p-50490-iso8859-1
-9nb00065.pmf -compugraphic-garamond-bold-r-normal--8782-2500-2540-2540-p-38730-iso8859-1
-9nb00077.pmf -compugraphic-coronet-medium-i-normal--8782-2500-2540-2540-p-22870-iso8859-1
-9nb00066.pmf -compugraphic-garamond-medium-i-normal--8782-2500-2540-2540-p-34280-iso8859-1
-9nb00074.pmf -compugraphic-omega-medium-i-normal--8782-2500-2540-2540-p-37980-iso8859-1
-9nb00051.pmf -compugraphic-albertus-extra bold-r-normal--8782-2500-2540-2540-p-42480-iso8859-1
-9nb00067.pmf -compugraphic-garamond-bold-i-normal--8782-2500-2540-2540-p-37020-iso8859-1
-9nb00075.pmf -compugraphic-omega-bold-i-normal--8782-2500-2540-2540-p-38560-iso8859-1
-9nb00056.pmf -monotype-arial-bold-r-normal--2048-2500-589-589-p-9800-iso8859-1
-9nb00060.pmf -compugraphic-clarendon-bold-r-condensed--8782-2500-2540-2540-p-35080-iso8859-1
-9nb00072.pmf -compugraphic-marigold-medium-r-normal--8782-2500-2540-2540-p-21890-iso8859-1
-9nb00057.pmf -monotype-arial-medium-i-normal--2048-2500-589-589-p-9040-iso8859-1
-9nb00061.pmf -compugraphic-courier-bold-r-normal--8782-2500-2540-2540-m-52910-iso8859-1
-9nb00073.pmf -compugraphic-omega-bold-r-normal--8782-2500-2540-2540-p-38600-iso8859-1
-9nb00054.pmf -compugraphic-antique olive-medium-i-normal--8782-2500-2540-2540-p-46140-iso8859-1
-9nb00062.pmf -compugraphic-courier-medium-i-normal--8782-2500-2540-2540-m-52910-iso8859-1
-9nb00070.pmf -compugraphic-letter gothic-medium-i-normal--8782-2500-2540-2540-m-44090-iso8859-1
-9nb00055.pmf -compugraphic-antique olive-medium-r-normal--8782-2500-2540-2540-p-46380-iso8859-1
-9nb00063.pmf -compugraphic-courier-bold-i-normal--8782-2500-2540-2540-m-52910-iso8859-1
-9nb00071.pmf -compugraphic-letter gothic-medium-r-normal--8782-2500-2540-2540-m-44090-iso8859-1
diff --git a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/lpr0ye1a.pmf b/hw/xprint/config/C/print/models/HPDJ1600C/fonts/lpr0ye1a.pmf
deleted file mode 100644
index 4837488..0000000
Binary files a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/lpr0ye1a.pmf and /dev/null differ
diff --git a/hw/xprint/config/C/print/models/HPDJ1600C/model-config b/hw/xprint/config/C/print/models/HPDJ1600C/model-config
deleted file mode 100644
index 5d45d44..0000000
--- a/hw/xprint/config/C/print/models/HPDJ1600C/model-config
+++ /dev/null
@@ -1,40 +0,0 @@
-# $Xprint.org: HPDJ1600C model-config,v 1.4 2002/11/07 19:48:04 gisburn Exp $
-# This is the configuration file for the HP DeskJet 1600C printer.
-#
-# The CDEnext SI supports two 1600C drivers XP-PCL-MONO and
-# XP-PCL-COLOR, which work with this configuration file.
-#
-
-*content-orientations-supported: portrait landscape
-*descriptor: Hewlett-Packard DeskJet 1600C
-*document-formats-supported: {PCL 5} {PostScript 2}
-*input-trays-supported:
-# 1/4" unprintable margins
-*medium-source-sizes-supported:\
-{ '' \
-    {na-letter			FALSE {6.35 209.55 6.35 273.05}}\
-    {executive			FALSE {6.35 177.75 6.35 260.35}}\
-    {na-legal			FALSE {6.35 209.55 6.35 349.25}}\
-    {iso-a3			FALSE {6.35 290.65 6.35 413.35}}\
-    {iso-a4			FALSE {6.35 203.65 6.35 290.65}}\
-    {jis-b4			FALSE {6.35 251.65 6.35 367.65}}\
-    {jis-b5			FALSE {6.35 175.65 6.35 250.65}}\
-    {monarch-envelope		FALSE {6.35  91.94 6.35 184.15}}\
-    {iso-designated-long	FALSE {6.35 103.65 6.35 213.65}}\
-    {iso-c5			FALSE {6.35 155.65 6.35 222.65}}\
-    {na-number-10-envelope	FALSE {6.35  98.45 6.35 234.95}}\
-    {hp-tabloid			FALSE {6.35 273.05 6.35 425.45}}\
-    {ledger			FALSE {6.35 273.05 6.35 425.45}}\
-    {b				FALSE {6.35 273.05 6.35 425.45}}\
-    {hp-japanese-postcard	FALSE {6     94	   6	142   }}\
-    {hp-japanese-doublepostcard FALSE {6    142	   6	194   }}\
-}
-*plexes-supported: simplex duplex
-*printer-model: "Hewlett-Packard DeskJet 1600C"
-*printer-resolutions-supported: 300
-*xp-ddx-identifier: XP-PCL-COLOR
-*xp-listfonts-modes-supported: xp-list-internal-printer-fonts xp-list-glyph-fonts
-*xp-embedded-formats-supported: { PCL 5 } { PostScript 2 }
-*xp-raw-formats-supported: { PCL 5 }
-*xp-setup-proviso: setup-optional
-# EOF.
diff --git a/hw/xprint/config/C/print/models/HPLJ4050-PS/Makefile.am b/hw/xprint/config/C/print/models/HPLJ4050-PS/Makefile.am
deleted file mode 100644
index b8cdfa6..0000000
--- a/hw/xprint/config/C/print/models/HPLJ4050-PS/Makefile.am
+++ /dev/null
@@ -1,5 +0,0 @@
-SUBDIRS = fonts
-
-xpcdir = @xpconfigdir@/C/print/models/HPLJ4050-PS
-
-dist_xpc_DATA = model-config
diff --git a/hw/xprint/config/C/print/models/HPLJ4050-PS/fonts/Makefile.am b/hw/xprint/config/C/print/models/HPLJ4050-PS/fonts/Makefile.am
deleted file mode 100644
index f4f4243..0000000
--- a/hw/xprint/config/C/print/models/HPLJ4050-PS/fonts/Makefile.am
+++ /dev/null
@@ -1,54 +0,0 @@
-xpcdir = @xpconfigdir@/C/print/models/HPLJ4050-PS/fonts
-
-parentdir = ../../PSdefault/fonts
-
-XPFONTS = \
-        AvantGarde-Book.pmf \
-        AvantGarde-BookOblique.pmf \
-        AvantGarde-Demi.pmf \
-        AvantGarde-DemiOblique.pmf \
-        Courier-Bold.pmf \
-        Courier-BoldOblique.pmf \
-        Courier-Oblique.pmf \
-        Courier.pmf \
-        Helvetica-Bold.pmf \
-        Helvetica-BoldOblique.pmf \
-        Helvetica-Oblique.pmf \
-        Helvetica.pmf \
-        LubalinGraph-Book.pmf \
-        LubalinGraph-BookOblique.pmf \
-        LubalinGraph-Demi.pmf \
-        LubalinGraph-DemiOblique.pmf \
-        NewCentSchlbk-Bold.pmf \
-        NewCentSchlbk-BoldItal.pmf \
-        NewCentSchlbk-Ital.pmf \
-        NewCentSchlbk-Roman.pmf \
-        Souvenir-Demi.pmf \
-        Souvenir-DemiItalic.pmf \
-        Souvenir-Light.pmf \
-        Souvenir-LightItalic.pmf \
-        Symbol.pmf \
-        Times-Bold.pmf \
-        Times-BoldItalic.pmf \
-        Times-Italic.pmf \
-        Times-Roman.pmf \
-        ZapfDingbats.pmf
-
-dest = $(DESTDIR)$(xpcdir)
-
-remove-stuff:
-	for x in $(XPFONTS) ; do			\
-		rm -f $(dest)/$$x	;		\
-	done
-
-	@rm -f $(dest)/fonts.dir
-
-install-data-hook: remove-stuff
-	mkdir -p $(dest) ;					\
-	for x in $(XPFONTS) ; do				\
-		ln -s $(parentdir)/$$x $(dest)/$$x	;	\
-	done
-
-	$(MKFONTSCALE) -b -s -l $(dest)
-
-uninstall-hook: remove-stuff
diff --git a/hw/xprint/config/C/print/models/HPLJ4050-PS/model-config b/hw/xprint/config/C/print/models/HPLJ4050-PS/model-config
deleted file mode 100644
index 159206d..0000000
--- a/hw/xprint/config/C/print/models/HPLJ4050-PS/model-config
+++ /dev/null
@@ -1,36 +0,0 @@
-# $Xprint.org: HPLJ4050-PS model-config,v 1.1 2003/12/16 00:48:04 gisburn Exp $
-# model-config for the HP LaserJet 4050 PostScript printer series
-#
-*content-orientations-supported: portrait landscape reverse-portrait reverse-landscape
-*descriptor: Hewlett-Packard LaserJet 4050 PostScript printer
-*document-formats-supported: {POSTSCRIPT 2}
-*input-trays-supported:
-*medium-source-sizes-supported: \
-{ '' \
-    {na-letter                  FALSE {6.35 209.55 6.35 273.05}}\
-    {na-legal                   FALSE {6.35 209.55 6.35 349.25}}\
-    {executive                  FALSE {6.35 177.80 6.35 260.35}}\
-    {iso-a4                     FALSE {6.35 203.65 6.35 290.65}}\
-    {iso-a5                     FALSE {6.35 141.65 6.35 203.65}}\
-    {iso-b5                     FALSE {6.35 169.65 6.35 243.65}}\
-    {jis-b5                     FALSE {6.35 175.65 6.35 250.65}}\
-}
-
-# Duplex unit is optional for HPLJ4050 series
-*plexes-supported: simplex
-*printer-model: "Hewlett-Packard LaserJet 4050 PostScript printer"
-*printer-resolutions-supported: 600 1200
-*xp-ddx-identifier: XP-POSTSCRIPT
-*xp-listfonts-modes-supported: xp-list-internal-printer-fonts xp-list-glyph-fonts
-*xp-embedded-formats-supported: {POSTSCRIPT 2}
-*xp-raw-formats-supported: {POSTSCRIPT 2}
-*xp-setup-proviso: setup-optional
-
-# NOTE: xp-psddx-* attributes are EXPERIMENTAL for now.
-# xp-psddx-download-fonts defines which fonts should be downloaded as outlines
-# (valid types are "pfa", "pfb", "ttf", "ttc", "otf", "otc")
-*xp-psddx-download-fonts: pfa pfb ttf ttc otf otc
-# xp-psddx-download-font-type defines which font type is used to download outlines 
-# (valid values are "bitmap", "pstype1" and "pstype3")
-*xp-psddx-download-font-type: pstype1
-# EOF.
diff --git a/hw/xprint/config/C/print/models/HPLJ4family/Makefile.am b/hw/xprint/config/C/print/models/HPLJ4family/Makefile.am
deleted file mode 100644
index 2089737..0000000
--- a/hw/xprint/config/C/print/models/HPLJ4family/Makefile.am
+++ /dev/null
@@ -1,5 +0,0 @@
-SUBDIRS = fonts 
-
-xpcdir = @xpconfigdir@/C/print/models/HPLJ4family
-
-dist_xpc_DATA = model-config
diff --git a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00051.pmf b/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00051.pmf
deleted file mode 100644
index 09cc489..0000000
Binary files a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00051.pmf and /dev/null differ
diff --git a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00052.pmf b/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00052.pmf
deleted file mode 100644
index b21a9a2..0000000
Binary files a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00052.pmf and /dev/null differ
diff --git a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00053.pmf b/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00053.pmf
deleted file mode 100644
index 485b874..0000000
Binary files a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00053.pmf and /dev/null differ
diff --git a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00054.pmf b/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00054.pmf
deleted file mode 100644
index 524934c..0000000
Binary files a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00054.pmf and /dev/null differ
diff --git a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00055.pmf b/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00055.pmf
deleted file mode 100644
index 2ef9bc5..0000000
Binary files a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00055.pmf and /dev/null differ
diff --git a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00056.pmf b/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00056.pmf
deleted file mode 100644
index 3d69311..0000000
Binary files a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00056.pmf and /dev/null differ
diff --git a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00057.pmf b/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00057.pmf
deleted file mode 100644
index 3833d4f..0000000
Binary files a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00057.pmf and /dev/null differ
diff --git a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00058.pmf b/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00058.pmf
deleted file mode 100644
index 289a95e..0000000
Binary files a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00058.pmf and /dev/null differ
diff --git a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00059.pmf b/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00059.pmf
deleted file mode 100644
index a5984be..0000000
Binary files a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00059.pmf and /dev/null differ
diff --git a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00060.pmf b/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00060.pmf
deleted file mode 100644
index df27cd7..0000000
Binary files a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00060.pmf and /dev/null differ
diff --git a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00061.pmf b/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00061.pmf
deleted file mode 100644
index fb2b5a4..0000000
Binary files a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00061.pmf and /dev/null differ
diff --git a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00062.pmf b/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00062.pmf
deleted file mode 100644
index f0e58c4..0000000
Binary files a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00062.pmf and /dev/null differ
diff --git a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00063.pmf b/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00063.pmf
deleted file mode 100644
index 8821ff1..0000000
Binary files a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00063.pmf and /dev/null differ
diff --git a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00064.pmf b/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00064.pmf
deleted file mode 100644
index e5980fc..0000000
Binary files a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00064.pmf and /dev/null differ
diff --git a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00065.pmf b/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00065.pmf
deleted file mode 100644
index d9a151d..0000000
Binary files a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00065.pmf and /dev/null differ
diff --git a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00066.pmf b/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00066.pmf
deleted file mode 100644
index d14fca5..0000000
Binary files a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00066.pmf and /dev/null differ
diff --git a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00067.pmf b/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00067.pmf
deleted file mode 100644
index 7a34150..0000000
Binary files a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00067.pmf and /dev/null differ
diff --git a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00068.pmf b/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00068.pmf
deleted file mode 100644
index c20e39a..0000000
Binary files a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00068.pmf and /dev/null differ
diff --git a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00069.pmf b/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00069.pmf
deleted file mode 100644
index 4a4a352..0000000
Binary files a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00069.pmf and /dev/null differ
diff --git a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00070.pmf b/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00070.pmf
deleted file mode 100644
index 8d97d43..0000000
Binary files a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00070.pmf and /dev/null differ
diff --git a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00071.pmf b/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00071.pmf
deleted file mode 100644
index 19844c9..0000000
Binary files a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00071.pmf and /dev/null differ
diff --git a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00072.pmf b/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00072.pmf
deleted file mode 100644
index 5415c3f..0000000
Binary files a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00072.pmf and /dev/null differ
diff --git a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00073.pmf b/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00073.pmf
deleted file mode 100644
index 038dfdb..0000000
Binary files a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00073.pmf and /dev/null differ
diff --git a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00074.pmf b/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00074.pmf
deleted file mode 100644
index 382a785..0000000
Binary files a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00074.pmf and /dev/null differ
diff --git a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00075.pmf b/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00075.pmf
deleted file mode 100644
index 1c7edf6..0000000
Binary files a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00075.pmf and /dev/null differ
diff --git a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00076.pmf b/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00076.pmf
deleted file mode 100644
index 2f077f4..0000000
Binary files a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00076.pmf and /dev/null differ
diff --git a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00077.pmf b/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00077.pmf
deleted file mode 100644
index 1ce190d..0000000
Binary files a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00077.pmf and /dev/null differ
diff --git a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00079.pmf b/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00079.pmf
deleted file mode 100644
index 45d6906..0000000
Binary files a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00079.pmf and /dev/null differ
diff --git a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00080.pmf b/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00080.pmf
deleted file mode 100644
index b991b5e..0000000
Binary files a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00080.pmf and /dev/null differ
diff --git a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00081.pmf b/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00081.pmf
deleted file mode 100644
index 1935a9f..0000000
Binary files a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00081.pmf and /dev/null differ
diff --git a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00082.pmf b/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00082.pmf
deleted file mode 100644
index 2000dc0..0000000
Binary files a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00082.pmf and /dev/null differ
diff --git a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00083.pmf b/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00083.pmf
deleted file mode 100644
index 90f0e45..0000000
Binary files a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00083.pmf and /dev/null differ
diff --git a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00084.pmf b/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00084.pmf
deleted file mode 100644
index 52ba39b..0000000
Binary files a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00084.pmf and /dev/null differ
diff --git a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00085.pmf b/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00085.pmf
deleted file mode 100644
index f5c9053..0000000
Binary files a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00085.pmf and /dev/null differ
diff --git a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00086.pmf b/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00086.pmf
deleted file mode 100644
index b7586ca..0000000
Binary files a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00086.pmf and /dev/null differ
diff --git a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00087.pmf b/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00087.pmf
deleted file mode 100644
index 82f0549..0000000
Binary files a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00087.pmf and /dev/null differ
diff --git a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00088.pmf b/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00088.pmf
deleted file mode 100644
index 591c96b..0000000
Binary files a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00088.pmf and /dev/null differ
diff --git a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00089.pmf b/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00089.pmf
deleted file mode 100644
index c816095..0000000
Binary files a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00089.pmf and /dev/null differ
diff --git a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00090.pmf b/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00090.pmf
deleted file mode 100644
index 895cfe2..0000000
Binary files a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00090.pmf and /dev/null differ
diff --git a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00091.pmf b/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00091.pmf
deleted file mode 100644
index 3bdcae4..0000000
Binary files a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00091.pmf and /dev/null differ
diff --git a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00092.pmf b/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00092.pmf
deleted file mode 100644
index a56d475..0000000
Binary files a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00092.pmf and /dev/null differ
diff --git a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00093.pmf b/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00093.pmf
deleted file mode 100644
index c85f3b4..0000000
Binary files a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00093.pmf and /dev/null differ
diff --git a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00094.pmf b/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00094.pmf
deleted file mode 100644
index 875bf1d..0000000
Binary files a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00094.pmf and /dev/null differ
diff --git a/hw/xprint/config/C/print/models/HPLJ4family/fonts/Makefile.am b/hw/xprint/config/C/print/models/HPLJ4family/fonts/Makefile.am
deleted file mode 100644
index daec9d2..0000000
--- a/hw/xprint/config/C/print/models/HPLJ4family/fonts/Makefile.am
+++ /dev/null
@@ -1,50 +0,0 @@
-xpcdir = @xpconfigdir@/C/print/models/HPLJ4family/fonts
-
-dist_xpc_DATA =			\
-	9nb00051.pmf		\
-	9nb00052.pmf		\
-	9nb00053.pmf		\
-	9nb00054.pmf		\
-	9nb00055.pmf		\
-	9nb00056.pmf		\
-	9nb00057.pmf		\
-	9nb00058.pmf		\
-	9nb00059.pmf		\
-	9nb00060.pmf		\
-	9nb00061.pmf		\
-	9nb00062.pmf		\
-	9nb00063.pmf		\
-	9nb00064.pmf		\
-	9nb00065.pmf		\
-	9nb00066.pmf		\
-	9nb00067.pmf		\
-	9nb00068.pmf		\
-	9nb00069.pmf		\
-	9nb00070.pmf		\
-	9nb00071.pmf		\
-	9nb00072.pmf		\
-	9nb00073.pmf		\
-	9nb00074.pmf		\
-	9nb00075.pmf		\
-	9nb00076.pmf		\
-	9nb00077.pmf		\
-	9nb00079.pmf		\
-	9nb00080.pmf		\
-	9nb00081.pmf		\
-	9nb00082.pmf		\
-	9nb00083.pmf		\
-	9nb00084.pmf		\
-	9nb00085.pmf		\
-	9nb00086.pmf		\
-	9nb00087.pmf		\
-	9nb00088.pmf		\
-	9nb00089.pmf		\
-	9nb00090.pmf		\
-	9nb00091.pmf		\
-	9nb00092.pmf		\
-	9nb00093.pmf		\
-	9nb00094.pmf		\
-	fonts.alias		\
-	fonts.dir		\
-	lpr0ye1a.pmf		\
-	README
diff --git a/hw/xprint/config/C/print/models/HPLJ4family/fonts/README b/hw/xprint/config/C/print/models/HPLJ4family/fonts/README
deleted file mode 100644
index 2c98218..0000000
--- a/hw/xprint/config/C/print/models/HPLJ4family/fonts/README
+++ /dev/null
@@ -1,203 +0,0 @@
-$Xorg: README,v 1.3 2000/08/17 19:48:04 cpqbld Exp $
-
-This directory contains "printer metric files" for the X Print
-Server suitable for the LaserJet 4 family of printers - 4, 4L,
-4M, 4ML, 4MP, 4P, 4Si, 4Si-MX.  The following *.pmf files were
-generated by the Hewlett-Packard Company.
-
-     9nb00051.pmf
-     9nb00052.pmf
-     9nb00053.pmf
-     9nb00054.pmf
-     9nb00055.pmf
- *   9nb00056.pmf
- *   9nb00057.pmf
- *   9nb00058.pmf
- *   9nb00059.pmf
- *   9nb00060.pmf
-     9nb00061.pmf
-     9nb00062.pmf
-     9nb00063.pmf
-     9nb00064.pmf
- *   9nb00065.pmf
- *   9nb00066.pmf
- *   9nb00067.pmf
- *   9nb00068.pmf
-     9nb00069.pmf
-     9nb00070.pmf
-     9nb00071.pmf
- *   9nb00072.pmf
- *   9nb00073.pmf
- *   9nb00074.pmf
- *   9nb00075.pmf
- *   9nb00076.pmf
-     9nb00077.pmf
- *   9nb00079.pmf
- *   9nb00080.pmf
- *   9nb00081.pmf
- *   9nb00082.pmf
-     9nb00083.pmf
-     9nb00084.pmf
-     9nb00085.pmf
-     9nb00086.pmf
-     9nb00087.pmf
-     9nb00088.pmf
-     9nb00089.pmf
-     9nb00090.pmf
-     9nb00091.pmf
-     9nb00092.pmf
-     9nb00093.pmf
-     9nb00094.pmf
-     lpr0ye1a.pmf
-
-
-     * note - the marked fonts are NOT supported by the 4L printer.  If
-       making extensive use of the 4L, you may want to create a special
-       4L model-config area and exclude these fonts.
-
-For reasons of not supporting iso8859.1 and hp-roman8, the following
-Laserjet 4 printer fonts were not converted to *.pmf files.
-
-     9nb00078.pmf
-     9nb00095.pmf
-     lpr0ylga.pmf
-     lpr0ypca.pmf
-     lpr0ypda.pmf
-     lpr0ypma.pmf
-     lpr0yr8a.pmf
-
-Output from the conversion utility is as follows:
-
-     Creating iso8859 1 pmf for 9nb00051.tfm as iso8859.1/9nb00051.pmf
-     -COMPUGRAPHIC-Albertus-Extra Bold-r-Normal--8782-2500-2540-2540-P-42480-iso8859-1
-     ------------------------------------
-     Creating iso8859 1 pmf for 9nb00052.tfm as iso8859.1/9nb00052.pmf
-     -COMPUGRAPHIC-Albertus-Semi Bold-r-Normal--8782-2500-2540-2540-P-37640-iso8859-1
-     ------------------------------------
-     Creating iso8859 1 pmf for 9nb00053.tfm as iso8859.1/9nb00053.pmf
-     -COMPUGRAPHIC-Antique Olive-Bold-r-Normal--8782-2500-2540-2540-P-50490-iso8859-1
-     ------------------------------------
-     Creating iso8859 1 pmf for 9nb00054.tfm as iso8859.1/9nb00054.pmf
-     -COMPUGRAPHIC-Antique Olive-Medium-i-Normal--8782-2500-2540-2540-P-46140-iso8859-1
-     ------------------------------------
-     Creating iso8859 1 pmf for 9nb00055.tfm as iso8859.1/9nb00055.pmf
-     -COMPUGRAPHIC-Antique Olive-Medium-r-Normal--8782-2500-2540-2540-P-46380-iso8859-1
-     ------------------------------------
-     Creating iso8859 1 pmf for 9nb00056.tfm as iso8859.1/9nb00056.pmf
-     -Monotype-Arial-Bold-r-Normal--2048-2500-589-589-P-9800-iso8859-1
-     ------------------------------------
-     Creating iso8859 1 pmf for 9nb00057.tfm as iso8859.1/9nb00057.pmf
-     -Monotype-Arial-Medium-i-Normal--2048-2500-589-589-P-9040-iso8859-1
-     ------------------------------------
-     Creating iso8859 1 pmf for 9nb00058.tfm as iso8859.1/9nb00058.pmf
-     -Monotype-Arial-Bold-i-Normal--2048-2500-589-589-P-9800-iso8859-1
-     ------------------------------------
-     Creating iso8859 1 pmf for 9nb00059.tfm as iso8859.1/9nb00059.pmf
-     -Monotype-Arial-Medium-r-Normal--2048-2500-589-589-P-9040-iso8859-1
-     ------------------------------------
-     Creating iso8859 1 pmf for 9nb00060.tfm as iso8859.1/9nb00060.pmf
-     -COMPUGRAPHIC-Clarendon-Bold-r-Condensed--8782-2500-2540-2540-P-35080-iso8859-1
-     ------------------------------------
-     Creating iso8859 1 pmf for 9nb00061.tfm as iso8859.1/9nb00061.pmf
-     -COMPUGRAPHIC-Courier-Bold-r-Normal--8782-2500-2540-2540-M-52910-iso8859-1
-     ------------------------------------
-     Creating iso8859 1 pmf for 9nb00062.tfm as iso8859.1/9nb00062.pmf
-     -COMPUGRAPHIC-Courier-Medium-i-Normal--8782-2500-2540-2540-M-52910-iso8859-1
-     ------------------------------------
-     Creating iso8859 1 pmf for 9nb00063.tfm as iso8859.1/9nb00063.pmf
-     -COMPUGRAPHIC-Courier-Bold-i-Normal--8782-2500-2540-2540-M-52910-iso8859-1
-     ------------------------------------
-     Creating iso8859 1 pmf for 9nb00064.tfm as iso8859.1/9nb00064.pmf
-     -COMPUGRAPHIC-Courier-Medium-r-Normal--8782-2500-2540-2540-M-52910-iso8859-1
-     ------------------------------------
-     Creating iso8859 1 pmf for 9nb00065.tfm as iso8859.1/9nb00065.pmf
-     -COMPUGRAPHIC-Garamond-Bold-r-Normal--8782-2500-2540-2540-P-38730-iso8859-1
-     ------------------------------------
-     Creating iso8859 1 pmf for 9nb00066.tfm as iso8859.1/9nb00066.pmf
-     -COMPUGRAPHIC-Garamond-Medium-i-Normal--8782-2500-2540-2540-P-34280-iso8859-1
-     ------------------------------------
-     Creating iso8859 1 pmf for 9nb00067.tfm as iso8859.1/9nb00067.pmf
-     -COMPUGRAPHIC-Garamond-Bold-i-Normal--8782-2500-2540-2540-P-37020-iso8859-1
-     ------------------------------------
-     Creating iso8859 1 pmf for 9nb00068.tfm as iso8859.1/9nb00068.pmf
-     -COMPUGRAPHIC-Garamond-Medium-r-Normal--8782-2500-2540-2540-P-36560-iso8859-1
-     ------------------------------------
-     Creating iso8859 1 pmf for 9nb00069.tfm as iso8859.1/9nb00069.pmf
-     -COMPUGRAPHIC-Letter Gothic-Bold-r-Normal--8782-2500-2540-2540-M-44090-iso8859-1
-     ------------------------------------
-     Creating iso8859 1 pmf for 9nb00070.tfm as iso8859.1/9nb00070.pmf
-     -COMPUGRAPHIC-Letter Gothic-Medium-i-Normal--8782-2500-2540-2540-M-44090-iso8859-1
-     ------------------------------------
-     Creating iso8859 1 pmf for 9nb00071.tfm as iso8859.1/9nb00071.pmf
-     -COMPUGRAPHIC-Letter Gothic-Medium-r-Normal--8782-2500-2540-2540-M-44090-iso8859-1
-     ------------------------------------
-     Creating iso8859 1 pmf for 9nb00072.tfm as iso8859.1/9nb00072.pmf
-     -COMPUGRAPHIC-Marigold-Medium-r-Normal--8782-2500-2540-2540-P-21890-iso8859-1
-     ------------------------------------
-     Creating iso8859 1 pmf for 9nb00073.tfm as iso8859.1/9nb00073.pmf
-     -COMPUGRAPHIC-Omega-Bold-r-Normal--8782-2500-2540-2540-P-38600-iso8859-1
-     ------------------------------------
-     Creating iso8859 1 pmf for 9nb00074.tfm as iso8859.1/9nb00074.pmf
-     -COMPUGRAPHIC-Omega-Medium-i-Normal--8782-2500-2540-2540-P-37980-iso8859-1
-     ------------------------------------
-     Creating iso8859 1 pmf for 9nb00075.tfm as iso8859.1/9nb00075.pmf
-     -COMPUGRAPHIC-Omega-Bold-i-Normal--8782-2500-2540-2540-P-38560-iso8859-1
-     ------------------------------------
-     Creating iso8859 1 pmf for 9nb00076.tfm as iso8859.1/9nb00076.pmf
-     -COMPUGRAPHIC-Omega-Medium-r-Normal--8782-2500-2540-2540-P-37770-iso8859-1
-     ------------------------------------
-     Creating iso8859 1 pmf for 9nb00077.tfm as iso8859.1/9nb00077.pmf
-     -COMPUGRAPHIC-Coronet-Medium-i-Normal--8782-2500-2540-2540-P-22870-iso8859-1
-     ------------------------------------
-     Creating iso8859 1 pmf for 9nb00079.tfm as iso8859.1/9nb00079.pmf
-     -Monotype-Times New Roman-Bold-r-Normal--2048-2500-589-589-P-8740-iso8859-1
-     ------------------------------------
-     Creating iso8859 1 pmf for 9nb00080.tfm as iso8859.1/9nb00080.pmf
-     -Monotype-Times New Roman-Medium-i-Normal--2048-2500-589-589-P-8230-iso8859-1
-     ------------------------------------
-     Creating iso8859 1 pmf for 9nb00081.tfm as iso8859.1/9nb00081.pmf
-     -Monotype-Times New Roman-Bold-i-Normal--2048-2500-589-589-P-8440-iso8859-1
-     ------------------------------------
-     Creating iso8859 1 pmf for 9nb00082.tfm as iso8859.1/9nb00082.pmf
-     -Monotype-Times New Roman-Medium-r-Normal--2048-2500-589-589-P-8210-iso8859-1
-     ------------------------------------
-     Creating iso8859 1 pmf for 9nb00083.tfm as iso8859.1/9nb00083.pmf
-     -COMPUGRAPHIC-Times-Bold-r-Normal--8782-2500-2540-2540-P-38200-iso8859-1
-     ------------------------------------
-     Creating iso8859 1 pmf for 9nb00084.tfm as iso8859.1/9nb00084.pmf
-     -COMPUGRAPHIC-Times-Medium-i-Normal--8782-2500-2540-2540-P-36000-iso8859-1
-     ------------------------------------
-     Creating iso8859 1 pmf for 9nb00085.tfm as iso8859.1/9nb00085.pmf
-     -COMPUGRAPHIC-Times-Bold-i-Normal--8782-2500-2540-2540-P-36900-iso8859-1
-     ------------------------------------
-     Creating iso8859 1 pmf for 9nb00086.tfm as iso8859.1/9nb00086.pmf
-     -COMPUGRAPHIC-Times-Medium-r-Normal--8782-2500-2540-2540-P-36080-iso8859-1
-     ------------------------------------
-     Creating iso8859 1 pmf for 9nb00087.tfm as iso8859.1/9nb00087.pmf
-     -COMPUGRAPHIC-Univers-Medium-i-Condensed--8782-2500-2540-2540-P-29970-iso8859-1
-     ------------------------------------
-     Creating iso8859 1 pmf for 9nb00088.tfm as iso8859.1/9nb00088.pmf
-     -COMPUGRAPHIC-Univers-Bold-r-Normal--8782-2500-2540-2540-P-41280-iso8859-1
-     ------------------------------------
-     Creating iso8859 1 pmf for 9nb00089.tfm as iso8859.1/9nb00089.pmf
-     -COMPUGRAPHIC-Univers-Medium-r-Condensed--8782-2500-2540-2540-P-29970-iso8859-1
-     ------------------------------------
-     Creating iso8859 1 pmf for 9nb00090.tfm as iso8859.1/9nb00090.pmf
-     -COMPUGRAPHIC-Univers-Bold-r-Condensed--8782-2500-2540-2540-P-33030-iso8859-1
-     ------------------------------------
-     Creating iso8859 1 pmf for 9nb00091.tfm as iso8859.1/9nb00091.pmf
-     -COMPUGRAPHIC-Univers-Bold-i-Condensed--8782-2500-2540-2540-P-33030-iso8859-1
-     ------------------------------------
-     Creating iso8859 1 pmf for 9nb00092.tfm as iso8859.1/9nb00092.pmf
-     -COMPUGRAPHIC-Univers-Medium-i-Normal--8782-2500-2540-2540-P-41280-iso8859-1
-     ------------------------------------
-     Creating iso8859 1 pmf for 9nb00093.tfm as iso8859.1/9nb00093.pmf
-     -COMPUGRAPHIC-Univers-Bold-i-Normal--8782-2500-2540-2540-P-41280-iso8859-1
-     ------------------------------------
-     Creating iso8859 1 pmf for 9nb00094.tfm as iso8859.1/9nb00094.pmf
-     -COMPUGRAPHIC-Univers-Medium-r-Normal--8782-2500-2540-2540-P-41280-iso8859-1
-     ------------------------------------
-     Creating iso8859 1 pmf for lpr0ye1a.tfm as iso8859.1/lpr0ye1a.pmf
-     -HP-Line Printer-Medium-r-Normal--35-85-300-300-M-180-iso8859-1
-     ------------------------------------
-
diff --git a/hw/xprint/config/C/print/models/HPLJ4family/fonts/fonts.alias b/hw/xprint/config/C/print/models/HPLJ4family/fonts/fonts.alias
deleted file mode 100644
index e69de29..0000000
diff --git a/hw/xprint/config/C/print/models/HPLJ4family/fonts/fonts.dir b/hw/xprint/config/C/print/models/HPLJ4family/fonts/fonts.dir
deleted file mode 100644
index da702cc..0000000
--- a/hw/xprint/config/C/print/models/HPLJ4family/fonts/fonts.dir
+++ /dev/null
@@ -1,45 +0,0 @@
-44
-lpr0ye1a.pmf -hp-line printer-medium-r-normal--35-85-300-300-m-180-iso8859-1
-9nb00080.pmf -monotype-times new roman-medium-i-normal--2048-2500-589-589-p-8230-iso8859-1
-9nb00092.pmf -compugraphic-univers-medium-i-normal--8782-2500-2540-2540-p-41280-iso8859-1
-9nb00081.pmf -monotype-times new roman-bold-i-normal--2048-2500-589-589-p-8440-iso8859-1
-9nb00093.pmf -compugraphic-univers-bold-i-normal--8782-2500-2540-2540-p-41280-iso8859-1
-9nb00082.pmf -monotype-times new roman-medium-r-normal--2048-2500-589-589-p-8210-iso8859-1
-9nb00090.pmf -compugraphic-univers-bold-r-condensed--8782-2500-2540-2540-p-33030-iso8859-1
-9nb00083.pmf -compugraphic-times-bold-r-normal--8782-2500-2540-2540-p-38200-iso8859-1
-9nb00091.pmf -compugraphic-univers-bold-i-condensed--8782-2500-2540-2540-p-33030-iso8859-1
-9nb00084.pmf -compugraphic-times-medium-i-normal--8782-2500-2540-2540-p-36000-iso8859-1
-9nb00085.pmf -compugraphic-times-bold-i-normal--8782-2500-2540-2540-p-36900-iso8859-1
-9nb00086.pmf -compugraphic-times-medium-r-normal--8782-2500-2540-2540-p-36080-iso8859-1
-9nb00094.pmf -compugraphic-univers-medium-r-normal--8782-2500-2540-2540-p-41280-iso8859-1
-9nb00087.pmf -compugraphic-univers-medium-i-condensed--8782-2500-2540-2540-p-29970-iso8859-1
-9nb00088.pmf -compugraphic-univers-bold-r-normal--8782-2500-2540-2540-p-41280-iso8859-1
-9nb00089.pmf -compugraphic-univers-medium-r-condensed--8782-2500-2540-2540-p-29970-iso8859-1
-9nb00058.pmf -monotype-arial-bold-i-normal--2048-2500-589-589-p-9800-iso8859-1
-9nb00059.pmf -monotype-arial-medium-r-normal--2048-2500-589-589-p-9040-iso8859-1
-9nb00068.pmf -compugraphic-garamond-medium-r-normal--8782-2500-2540-2540-p-36560-iso8859-1
-9nb00069.pmf -compugraphic-letter gothic-bold-r-normal--8782-2500-2540-2540-m-44090-iso8859-1
-9nb00079.pmf -monotype-times new roman-bold-r-normal--2048-2500-589-589-p-8740-iso8859-1
-9nb00052.pmf -compugraphic-albertus-semi bold-r-normal--8782-2500-2540-2540-p-37640-iso8859-1
-9nb00064.pmf -compugraphic-courier-medium-r-normal--8782-2500-2540-2540-m-52910-iso8859-1
-9nb00076.pmf -compugraphic-omega-medium-r-normal--8782-2500-2540-2540-p-37770-iso8859-1
-9nb00053.pmf -compugraphic-antique olive-bold-r-normal--8782-2500-2540-2540-p-50490-iso8859-1
-9nb00065.pmf -compugraphic-garamond-bold-r-normal--8782-2500-2540-2540-p-38730-iso8859-1
-9nb00077.pmf -compugraphic-coronet-medium-i-normal--8782-2500-2540-2540-p-22870-iso8859-1
-9nb00066.pmf -compugraphic-garamond-medium-i-normal--8782-2500-2540-2540-p-34280-iso8859-1
-9nb00074.pmf -compugraphic-omega-medium-i-normal--8782-2500-2540-2540-p-37980-iso8859-1
-9nb00051.pmf -compugraphic-albertus-extra bold-r-normal--8782-2500-2540-2540-p-42480-iso8859-1
-9nb00067.pmf -compugraphic-garamond-bold-i-normal--8782-2500-2540-2540-p-37020-iso8859-1
-9nb00075.pmf -compugraphic-omega-bold-i-normal--8782-2500-2540-2540-p-38560-iso8859-1
-9nb00056.pmf -monotype-arial-bold-r-normal--2048-2500-589-589-p-9800-iso8859-1
-9nb00060.pmf -compugraphic-clarendon-bold-r-condensed--8782-2500-2540-2540-p-35080-iso8859-1
-9nb00072.pmf -compugraphic-marigold-medium-r-normal--8782-2500-2540-2540-p-21890-iso8859-1
-9nb00057.pmf -monotype-arial-medium-i-normal--2048-2500-589-589-p-9040-iso8859-1
-9nb00061.pmf -compugraphic-courier-bold-r-normal--8782-2500-2540-2540-m-52910-iso8859-1
-9nb00073.pmf -compugraphic-omega-bold-r-normal--8782-2500-2540-2540-p-38600-iso8859-1
-9nb00054.pmf -compugraphic-antique olive-medium-i-normal--8782-2500-2540-2540-p-46140-iso8859-1
-9nb00062.pmf -compugraphic-courier-medium-i-normal--8782-2500-2540-2540-m-52910-iso8859-1
-9nb00070.pmf -compugraphic-letter gothic-medium-i-normal--8782-2500-2540-2540-m-44090-iso8859-1
-9nb00055.pmf -compugraphic-antique olive-medium-r-normal--8782-2500-2540-2540-p-46380-iso8859-1
-9nb00063.pmf -compugraphic-courier-bold-i-normal--8782-2500-2540-2540-m-52910-iso8859-1
-9nb00071.pmf -compugraphic-letter gothic-medium-r-normal--8782-2500-2540-2540-m-44090-iso8859-1
diff --git a/hw/xprint/config/C/print/models/HPLJ4family/fonts/lpr0ye1a.pmf b/hw/xprint/config/C/print/models/HPLJ4family/fonts/lpr0ye1a.pmf
deleted file mode 100644
index 4837488..0000000
Binary files a/hw/xprint/config/C/print/models/HPLJ4family/fonts/lpr0ye1a.pmf and /dev/null differ
diff --git a/hw/xprint/config/C/print/models/HPLJ4family/model-config b/hw/xprint/config/C/print/models/HPLJ4family/model-config
deleted file mode 100644
index 1ac997e..0000000
--- a/hw/xprint/config/C/print/models/HPLJ4family/model-config
+++ /dev/null
@@ -1,39 +0,0 @@
-# $Xprint.org: HPLJ4family model-config,v 1.4 2002/11/07 19:48:04 gisburn Exp $
-# This is the configuration file for the HP LaserJet 4 Printers.
-#
-# Though not a deliverable for the CDEnext SI, the XP-PCL-MONO
-# driver should be able to support the LaserJet 4 printers.
-#
-*content-orientations-supported: portrait landscape
-*descriptor: Hewlett-Packard LaserJet 4 Series
-*document-formats-supported: {PCL 5} {PostScript 2}
-*input-trays-supported:
-# 1/4" unprintable margins
-*medium-source-sizes-supported:\
-{ '' \
-    {na-letter			FALSE {6.35 209.55 6.35 273.05}}\
-    {executive			FALSE {6.35 177.75 6.35 260.35}}\
-    {na-legal			FALSE {6.35 209.55 6.35 349.25}}\
-    {iso-a3			FALSE {6.35 290.65 6.35 413.35}}\
-    {iso-a4			FALSE {6.35 203.65 6.35 290.65}}\
-    {jis-b4			FALSE {6.35 251.65 6.35 367.65}}\
-    {jis-b5			FALSE {6.35 175.65 6.35 250.65}}\
-    {monarch-envelope		FALSE {6.35  91.94 6.35 184.15}}\
-    {iso-designated-long	FALSE {6.35 103.65 6.35 213.65}}\
-    {iso-c5			FALSE {6.35 155.65 6.35 222.65}}\
-    {na-number-10-envelope	FALSE {6.35  98.45 6.35 234.95}}\
-    {hp-tabloid			FALSE {6.35 273.05 6.35 425.45}}\
-    {ledger			FALSE {6.35 273.05 6.35 425.45}}\
-    {b				FALSE {6.35 273.05 6.35 425.45}}\
-    {hp-japanese-postcard	FALSE {6     94	   6	142   }}\
-    {hp-japanese-doublepostcard FALSE {6    142	   6	194   }}\
-}
-*plexes-supported: simplex duplex
-*printer-model: "Hewlett-Packard LaserJet 4 Series"
-*printer-resolutions-supported: 300 600
-*xp-ddx-identifier: XP-PCL-MONO
-*xp-listfonts-modes-supported: xp-list-internal-printer-fonts xp-list-glyph-fonts
-*xp-embedded-formats-supported: { PCL 5 } { PostScript 2 }
-*xp-raw-formats-supported: { PCL 5 }
-*xp-setup-proviso: setup-optional
-# EOF.
diff --git a/hw/xprint/config/C/print/models/Makefile.am b/hw/xprint/config/C/print/models/Makefile.am
deleted file mode 100644
index 488a06a..0000000
--- a/hw/xprint/config/C/print/models/Makefile.am
+++ /dev/null
@@ -1,11 +0,0 @@
-SUBDIRS = \
-	PSdefault		\
-	CANONBJ10E-GS		\
-	CANONC3200-PS		\
-	GSdefault		\
-	HPDJ1600C		\
-	HPLJ4050-PS		\
-	HPLJ4family		\
-	PS2PDFspooldir-GS	\
-	PSspooldir		\
-	SPSPARC2
diff --git a/hw/xprint/config/C/print/models/PS2PDFspooldir-GS/Makefile.am b/hw/xprint/config/C/print/models/PS2PDFspooldir-GS/Makefile.am
deleted file mode 100644
index 2b73b9d..0000000
--- a/hw/xprint/config/C/print/models/PS2PDFspooldir-GS/Makefile.am
+++ /dev/null
@@ -1,4 +0,0 @@
-xpcdir = @xpconfigdir@/C/print/models/PS2PDFspooldir-GS
-
-dist_xpc_DATA = model-config
-dist_xpc_SCRIPTS = ps2pdf_spooltodir.sh
diff --git a/hw/xprint/config/C/print/models/PS2PDFspooldir-GS/model-config b/hw/xprint/config/C/print/models/PS2PDFspooldir-GS/model-config
deleted file mode 100644
index 1d74b86..0000000
--- a/hw/xprint/config/C/print/models/PS2PDFspooldir-GS/model-config
+++ /dev/null
@@ -1,72 +0,0 @@
-# $Xprint.org: PS2PDFspooldir-GS model-config,v 1.1 2003/11/20 03:48:04 gisburn Exp $
-# PostScript DDX model-config which converts jobs to PDF via GhostScript's "ps2pdf"
-# and then sends them to a spool dir instead to a print queue
-#
-# This model is basically a cut-down GSdefault model with a custom *xp-spooler-command
-#
-# DO NOT MODIFY THIS FILE!!
-#
-# If you want to make customisations for your printer create a copy
-# of this printer model.
-# Example (for creating a model config "MYCOMPANYlaserxx"):
-# 1. Create model config dir:
-#    % mkdir MYCOMPANYlaserxx
-# 2. Link (or copy) the PMF (printer font metrics) for the
-#    printer buildin fonts:
-#    % ln -s PS2PDFspooldir-GS/fonts MYCOMPANYlaserxx/.
-# 3. Copy the model config file:
-#    % cp PS2PDFspooldir-GS/model-config MYCOMPANYlaserxx/.
-# 4. Customize MYCOMPANYlaserxx/model-config to match your needs.
-#
-# Attributes supported for this printer model
-*content-orientations-supported: portrait landscape reverse-portrait reverse-landscape
-*descriptor: PDF job spool dir /tmp/Xprintjobs
-*document-formats-supported: {POSTSCRIPT 2}
-*input-trays-supported:
-*medium-source-sizes-supported: \
-{ '' \
-    {na-letter                  FALSE {6.35 209.55 6.35 273.05}}\
-    {na-legal                   FALSE {6.35 209.55 6.35 349.25}}\
-    {executive                  FALSE {6.35 177.80 6.35 260.35}}\
-    {ledger                     FALSE {6.35 273.05 6.35 425.45}}\
-    {quarto                     FALSE {6.35 209.55 6.35 268.732}}\
-    {iso-a3                     FALSE {6.35 290.65 6.35 413.65}}\
-    {iso-a4                     FALSE {6.35 203.65 6.35 290.65}}\
-    {iso-a5                     FALSE {6.35 141.65 6.35 203.65}}\
-    {iso-b3                     FALSE {6.35 346.65 6.35 493.65}}\
-    {iso-b4                     FALSE {6.35 243.65 6.35 346.65}}\
-    {iso-b5                     FALSE {6.35 169.65 6.35 243.65}}\
-    {jis-b3                     FALSE {6.35 357.65 6.35 508.65}}\
-    {jis-b4                     FALSE {6.35 250.65 6.35 357.65}}\
-    {jis-b5                     FALSE {6.35 175.65 6.35 250.65}}\
-    {iso-c3                     FALSE {6.35 317.65 6.35 451.65}}\
-    {iso-c4                     FALSE {6.35 222.65 6.35 317.65}}\
-    {iso-c5                     FALSE {6.35 155.65 6.35 222.65}}\
-}
-
-*plexes-supported: simplex duplex tumble
-*printer-model: "PDF job spool dir /tmp/Xprintjobs"
-# 75, 100, 120, 150, 180, 200, 240, 300, 360, 400, 600, 720,
-# 940, 1200 and 2440 are supported DPI values, we limit it here
-# to some common values:
-*printer-resolutions-supported: 300 360 400 600
-*xp-ddx-identifier: XP-POSTSCRIPT
-*xp-listfonts-modes-supported: xp-list-internal-printer-fonts xp-list-glyph-fonts
-*xp-embedded-formats-supported: {POSTSCRIPT 2}
-*xp-raw-formats-supported: {POSTSCRIPT 2}
-*xp-setup-proviso: setup-optional
-
-# Use custom spooler script which sends the output to a dir instead to a printer queue
-# Note that "%xpconfigdir%" is currently only supported in Xprt servers build
-# from xprint.mozdev.org sources, other platforms have replace it with the
-# absolute path name to the script
-*xp-spooler-command: %xpconfigdir%/C/print/models/PS2PDFspooldir-GS/ps2pdf_spooltodir.sh -d /tmp/Xprintjobs -s .pdf -u 077 -p %printer-name% -c %copy-count% -t %job-name% -o "%options%"
-
-# NOTE: xp-psddx-* attributes are EXPERIMENTAL for now.
-# xp-psddx-download-fonts defines which fonts should be downloaded as outlines
-# (valid types are "pfa", "pfb", "ttf", "ttc", "otf", "otc")
-*xp-psddx-download-fonts: pfa pfb ttf ttc otf otc
-# xp-psddx-download-font-type defines which font type is used to download outlines 
-# (valid values are "bitmap", "pstype1" and "pstype3")
-*xp-psddx-download-font-type: pstype1
-# EOF.
diff --git a/hw/xprint/config/C/print/models/PS2PDFspooldir-GS/ps2pdf_spooltodir.sh b/hw/xprint/config/C/print/models/PS2PDFspooldir-GS/ps2pdf_spooltodir.sh
deleted file mode 100755
index 5739807..0000000
--- a/hw/xprint/config/C/print/models/PS2PDFspooldir-GS/ps2pdf_spooltodir.sh
+++ /dev/null
@@ -1,130 +0,0 @@
-#!/bin/sh
-PATH=/usr/bin:/usr/sbin:/bin:/sbin:/usr/local/bin
-export PATH
-
-verbose_msgs="false"
-DEFAULT_SPOOLDIR=/tmp/Xprintjobs
-
-usage()
-{
-    printf "Usage: ${0}: [options]\n"
-    printf "-v\tbe verbose\n"
-    printf "-d dirname\tdefine spool dir\n"
-    printf "-p string\tname of printer selected by user\n"
-    printf "-c integer\tnumber of copies\n"
-    printf "-t string\tjob title\n"
-    printf "-s string\tfile name suffix\n"
-    printf "-o string\tspooler options\n"
-    printf "-u mask\tpermission mask for new files (see umask)\n"
-    exit 2
-}
-
-verbose()
-{
-    if ${verbose_msgs} ; then
-        echo "$1"
-    fi
-}
-
-spooldir="${DEFAULT_SPOOLDIR}"
-printername=
-num_job_copies=
-job_title=
-filename_suffix=
-spooler_options=
-permmask=
-while getopts va:b:d:p:c:t:s:o:u: i
-do
-    case $i in
-        v)  
-            verbose_msgs="true"
-            ;;
-        d)  
-            spooldir="$OPTARG"
-            ;;
-        p)  
-            printername="$OPTARG"
-            ;;
-        c)  
-            num_job_copies="$OPTARG"
-            ;;
-        t)  
-            job_title="$OPTARG"
-            ;;
-        s)  
-            filename_suffix="$OPTARG"
-            ;;
-        o)  
-            spooler_options="$OPTARG"
-            ;;
-        u)  
-            permmask="$OPTARG"
-            ;;
-        ?)  usage
-            ;;
-    esac
-done
-
-verbose "# spooldir=\"$spooldir\""
-verbose "# printername=\"$printername\""
-verbose "# num_job_copies=\"$num_job_copies\""
-verbose "# job_title=\"$job_title\""
-verbose "# spooler_options=\"$spooler_options\""
-verbose "# umask=\"$permmask\""
-
-if [ ! -d "${DEFAULT_SPOOLDIR}" ] ; then 
-  mkdir "${DEFAULT_SPOOLDIR}"
-  chmod a+rwxt "${DEFAULT_SPOOLDIR}"
-fi
-
-if [ "${permmask}" != "" ] ; then
-    umask ${permmask}
-fi
-
-if [ ! -d "$spooldir" ] ; then
-    echo "$0: spooldir \"$spooldir\" does not exits." >&2
-    exit 1
-fi
-if [ ! -w "$spooldir" ] ; then
-    echo "$0: Cannot write to spooldir \"$spooldir\"." >&2
-    exit 1
-fi
-
-# Create first part of the output file name (prefix and an "unique"
-# id(=date and time))...
-filename="Xpjob_`date +%Y%m%d%H%M%S`"
-
-# ... then add options ...
-if [ "${printername}" != "" ] ; then
-    filename="${filename}_${printername}"
-fi
-if [ "${num_job_copies}" != "" -a "${num_job_copies}" != "1" ] ; then
-    filename="${filename}_copies_${num_job_copies}"
-fi
-if [ "${job_title}" != "" ] ; then
-    filename="${filename}_title_${job_title}"
-fi
-
-# ... mangle output file name and filter chars (like whitespaces)
-# which may screw-up further processing by other shell scripts ...
-filename="`echo \"${filename}\" | tr '[:blank:]' '_' | tr -c -d '[:alnum:]_.-'`"
-
-# ... add path and suffix ...
-filename="${spooldir}/${filename}${filename_suffix}"
-
-verbose "# File name is \"$filename\"."
-
-# ... and finally capture stdin to the file (we are using "gs" directly to
-# avoid the problem that "ps2pdf" is not available in all Linux
-# distributions by default).
-#ps2pdf - - | cat >"${filename}"
-gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite "-sOutputFile=-" -dCompatibilityLevel=1.2 -c .setpdfwrite -f - | cat >"${filename}"
-
-if ${verbose_msgs} ; then
-    printf "# File is " ; ls -l "${filename}"
-fi
-
-verbose "# Done."
-
-exit 0
-# EOF.
diff --git a/hw/xprint/config/C/print/models/PSdefault/Makefile.am b/hw/xprint/config/C/print/models/PSdefault/Makefile.am
deleted file mode 100644
index 040f260..0000000
--- a/hw/xprint/config/C/print/models/PSdefault/Makefile.am
+++ /dev/null
@@ -1,5 +0,0 @@
-SUBDIRS = fonts
-
-xpcdir = @xpconfigdir@/C/print/models/PSdefault
-
-dist_xpc_DATA = model-config
diff --git a/hw/xprint/config/C/print/models/PSdefault/fonts/AvantGarde-Book.pmf b/hw/xprint/config/C/print/models/PSdefault/fonts/AvantGarde-Book.pmf
deleted file mode 100644
index 3311789..0000000
Binary files a/hw/xprint/config/C/print/models/PSdefault/fonts/AvantGarde-Book.pmf and /dev/null differ
diff --git a/hw/xprint/config/C/print/models/PSdefault/fonts/AvantGarde-BookOblique.pmf b/hw/xprint/config/C/print/models/PSdefault/fonts/AvantGarde-BookOblique.pmf
deleted file mode 100644
index 61bcb22..0000000
Binary files a/hw/xprint/config/C/print/models/PSdefault/fonts/AvantGarde-BookOblique.pmf and /dev/null differ
diff --git a/hw/xprint/config/C/print/models/PSdefault/fonts/AvantGarde-Demi.pmf b/hw/xprint/config/C/print/models/PSdefault/fonts/AvantGarde-Demi.pmf
deleted file mode 100644
index 88ccf08..0000000
Binary files a/hw/xprint/config/C/print/models/PSdefault/fonts/AvantGarde-Demi.pmf and /dev/null differ
diff --git a/hw/xprint/config/C/print/models/PSdefault/fonts/AvantGarde-DemiOblique.pmf b/hw/xprint/config/C/print/models/PSdefault/fonts/AvantGarde-DemiOblique.pmf
deleted file mode 100644
index 45cc885..0000000
Binary files a/hw/xprint/config/C/print/models/PSdefault/fonts/AvantGarde-DemiOblique.pmf and /dev/null differ
diff --git a/hw/xprint/config/C/print/models/PSdefault/fonts/Courier-Bold.pmf b/hw/xprint/config/C/print/models/PSdefault/fonts/Courier-Bold.pmf
deleted file mode 100644
index ac760fd..0000000
Binary files a/hw/xprint/config/C/print/models/PSdefault/fonts/Courier-Bold.pmf and /dev/null differ
diff --git a/hw/xprint/config/C/print/models/PSdefault/fonts/Courier-BoldOblique.pmf b/hw/xprint/config/C/print/models/PSdefault/fonts/Courier-BoldOblique.pmf
deleted file mode 100644
index 8db9740..0000000
Binary files a/hw/xprint/config/C/print/models/PSdefault/fonts/Courier-BoldOblique.pmf and /dev/null differ
diff --git a/hw/xprint/config/C/print/models/PSdefault/fonts/Courier-Oblique.pmf b/hw/xprint/config/C/print/models/PSdefault/fonts/Courier-Oblique.pmf
deleted file mode 100644
index 87aee16..0000000
Binary files a/hw/xprint/config/C/print/models/PSdefault/fonts/Courier-Oblique.pmf and /dev/null differ
diff --git a/hw/xprint/config/C/print/models/PSdefault/fonts/Courier.pmf b/hw/xprint/config/C/print/models/PSdefault/fonts/Courier.pmf
deleted file mode 100644
index 6109c8c..0000000
Binary files a/hw/xprint/config/C/print/models/PSdefault/fonts/Courier.pmf and /dev/null differ
diff --git a/hw/xprint/config/C/print/models/PSdefault/fonts/Helvetica-Bold.pmf b/hw/xprint/config/C/print/models/PSdefault/fonts/Helvetica-Bold.pmf
deleted file mode 100644
index 30d462d..0000000
Binary files a/hw/xprint/config/C/print/models/PSdefault/fonts/Helvetica-Bold.pmf and /dev/null differ
diff --git a/hw/xprint/config/C/print/models/PSdefault/fonts/Helvetica-BoldOblique.pmf b/hw/xprint/config/C/print/models/PSdefault/fonts/Helvetica-BoldOblique.pmf
deleted file mode 100644
index 8961951..0000000
Binary files a/hw/xprint/config/C/print/models/PSdefault/fonts/Helvetica-BoldOblique.pmf and /dev/null differ
diff --git a/hw/xprint/config/C/print/models/PSdefault/fonts/Helvetica-Oblique.pmf b/hw/xprint/config/C/print/models/PSdefault/fonts/Helvetica-Oblique.pmf
deleted file mode 100644
index 2a0de8a..0000000
Binary files a/hw/xprint/config/C/print/models/PSdefault/fonts/Helvetica-Oblique.pmf and /dev/null differ
diff --git a/hw/xprint/config/C/print/models/PSdefault/fonts/Helvetica.pmf b/hw/xprint/config/C/print/models/PSdefault/fonts/Helvetica.pmf
deleted file mode 100644
index b1fd475..0000000
Binary files a/hw/xprint/config/C/print/models/PSdefault/fonts/Helvetica.pmf and /dev/null differ
diff --git a/hw/xprint/config/C/print/models/PSdefault/fonts/LubalinGraph-Book.pmf b/hw/xprint/config/C/print/models/PSdefault/fonts/LubalinGraph-Book.pmf
deleted file mode 100644
index aff4b49..0000000
Binary files a/hw/xprint/config/C/print/models/PSdefault/fonts/LubalinGraph-Book.pmf and /dev/null differ
diff --git a/hw/xprint/config/C/print/models/PSdefault/fonts/LubalinGraph-BookOblique.pmf b/hw/xprint/config/C/print/models/PSdefault/fonts/LubalinGraph-BookOblique.pmf
deleted file mode 100644
index b5b77f3..0000000
Binary files a/hw/xprint/config/C/print/models/PSdefault/fonts/LubalinGraph-BookOblique.pmf and /dev/null differ
diff --git a/hw/xprint/config/C/print/models/PSdefault/fonts/LubalinGraph-Demi.pmf b/hw/xprint/config/C/print/models/PSdefault/fonts/LubalinGraph-Demi.pmf
deleted file mode 100644
index 1003398..0000000
Binary files a/hw/xprint/config/C/print/models/PSdefault/fonts/LubalinGraph-Demi.pmf and /dev/null differ
diff --git a/hw/xprint/config/C/print/models/PSdefault/fonts/LubalinGraph-DemiOblique.pmf b/hw/xprint/config/C/print/models/PSdefault/fonts/LubalinGraph-DemiOblique.pmf
deleted file mode 100644
index a8550e7..0000000
Binary files a/hw/xprint/config/C/print/models/PSdefault/fonts/LubalinGraph-DemiOblique.pmf and /dev/null differ
diff --git a/hw/xprint/config/C/print/models/PSdefault/fonts/Makefile.am b/hw/xprint/config/C/print/models/PSdefault/fonts/Makefile.am
deleted file mode 100644
index 40f1e3d..0000000
--- a/hw/xprint/config/C/print/models/PSdefault/fonts/Makefile.am
+++ /dev/null
@@ -1,44 +0,0 @@
-xpcdir = @xpconfigdir@/C/print/models/PSdefault/fonts
-
-dist_xpc_DATA =				\
-	AvantGarde-BookOblique.pmf	\
-	AvantGarde-Book.pmf		\
-	AvantGarde-DemiOblique.pmf	\
-	AvantGarde-Demi.pmf		\
-	Courier-BoldOblique.pmf		\
-	Courier-Bold.pmf		\
-	Courier-Oblique.pmf		\
-	Courier.pmf			\
-	Helvetica-BoldOblique.pmf	\
-	Helvetica-Bold.pmf		\
-	Helvetica-Oblique.pmf		\
-	Helvetica.pmf			\
-	LubalinGraph-BookOblique.pmf	\
-	LubalinGraph-Book.pmf		\
-	LubalinGraph-DemiOblique.pmf	\
-	LubalinGraph-Demi.pmf		\
-	NewCentSchlbk-Bold.pmf		\
-	NewCentSchlbk-BoldItal.pmf 	\
-	NewCentSchlbk-Ital.pmf		\
-	NewCentSchlbk-Roman.pmf		\
-	Souvenir-DemiItalic.pmf		\
-	Souvenir-Demi.pmf		\
-	Souvenir-LightItalic.pmf	\
-	Souvenir-Light.pmf		\
-	Symbol.pmf			\
-	Times-BoldItalic.pmf		\
-	Times-Bold.pmf			\
-	Times-Italic.pmf		\
-	Times-Roman.pmf			\
-	ZapfDingbats.pmf
-
-
-dest = $(DESTDIR)$(xpcdir)
-
-remove-stuff:
-	@rm -f $(dest)/fonts.dir
-
-install-data-hook: remove-stuff
-	$(MKFONTSCALE) -b -s -l $(dest)
-
-uninstall-hook: remove-stuff
diff --git a/hw/xprint/config/C/print/models/PSdefault/fonts/NewCentSchlbk-Bold.pmf b/hw/xprint/config/C/print/models/PSdefault/fonts/NewCentSchlbk-Bold.pmf
deleted file mode 100644
index ab22aab..0000000
Binary files a/hw/xprint/config/C/print/models/PSdefault/fonts/NewCentSchlbk-Bold.pmf and /dev/null differ
diff --git a/hw/xprint/config/C/print/models/PSdefault/fonts/NewCentSchlbk-BoldItal.pmf b/hw/xprint/config/C/print/models/PSdefault/fonts/NewCentSchlbk-BoldItal.pmf
deleted file mode 100644
index e68811e..0000000
Binary files a/hw/xprint/config/C/print/models/PSdefault/fonts/NewCentSchlbk-BoldItal.pmf and /dev/null differ
diff --git a/hw/xprint/config/C/print/models/PSdefault/fonts/NewCentSchlbk-Ital.pmf b/hw/xprint/config/C/print/models/PSdefault/fonts/NewCentSchlbk-Ital.pmf
deleted file mode 100644
index 390f223..0000000
Binary files a/hw/xprint/config/C/print/models/PSdefault/fonts/NewCentSchlbk-Ital.pmf and /dev/null differ
diff --git a/hw/xprint/config/C/print/models/PSdefault/fonts/NewCentSchlbk-Roman.pmf b/hw/xprint/config/C/print/models/PSdefault/fonts/NewCentSchlbk-Roman.pmf
deleted file mode 100644
index 655b9b6..0000000
Binary files a/hw/xprint/config/C/print/models/PSdefault/fonts/NewCentSchlbk-Roman.pmf and /dev/null differ
diff --git a/hw/xprint/config/C/print/models/PSdefault/fonts/Souvenir-Demi.pmf b/hw/xprint/config/C/print/models/PSdefault/fonts/Souvenir-Demi.pmf
deleted file mode 100644
index 5e786ec..0000000
Binary files a/hw/xprint/config/C/print/models/PSdefault/fonts/Souvenir-Demi.pmf and /dev/null differ
diff --git a/hw/xprint/config/C/print/models/PSdefault/fonts/Souvenir-DemiItalic.pmf b/hw/xprint/config/C/print/models/PSdefault/fonts/Souvenir-DemiItalic.pmf
deleted file mode 100644
index 094b348..0000000
Binary files a/hw/xprint/config/C/print/models/PSdefault/fonts/Souvenir-DemiItalic.pmf and /dev/null differ
diff --git a/hw/xprint/config/C/print/models/PSdefault/fonts/Souvenir-Light.pmf b/hw/xprint/config/C/print/models/PSdefault/fonts/Souvenir-Light.pmf
deleted file mode 100644
index 0bb62bd..0000000
Binary files a/hw/xprint/config/C/print/models/PSdefault/fonts/Souvenir-Light.pmf and /dev/null differ
diff --git a/hw/xprint/config/C/print/models/PSdefault/fonts/Souvenir-LightItalic.pmf b/hw/xprint/config/C/print/models/PSdefault/fonts/Souvenir-LightItalic.pmf
deleted file mode 100644
index 3c19a7f..0000000
Binary files a/hw/xprint/config/C/print/models/PSdefault/fonts/Souvenir-LightItalic.pmf and /dev/null differ
diff --git a/hw/xprint/config/C/print/models/PSdefault/fonts/Symbol.pmf b/hw/xprint/config/C/print/models/PSdefault/fonts/Symbol.pmf
deleted file mode 100644
index 48925f8..0000000
Binary files a/hw/xprint/config/C/print/models/PSdefault/fonts/Symbol.pmf and /dev/null differ
diff --git a/hw/xprint/config/C/print/models/PSdefault/fonts/Times-Bold.pmf b/hw/xprint/config/C/print/models/PSdefault/fonts/Times-Bold.pmf
deleted file mode 100644
index cf46ca0..0000000
Binary files a/hw/xprint/config/C/print/models/PSdefault/fonts/Times-Bold.pmf and /dev/null differ
diff --git a/hw/xprint/config/C/print/models/PSdefault/fonts/Times-BoldItalic.pmf b/hw/xprint/config/C/print/models/PSdefault/fonts/Times-BoldItalic.pmf
deleted file mode 100644
index ffe51af..0000000
Binary files a/hw/xprint/config/C/print/models/PSdefault/fonts/Times-BoldItalic.pmf and /dev/null differ
diff --git a/hw/xprint/config/C/print/models/PSdefault/fonts/Times-Italic.pmf b/hw/xprint/config/C/print/models/PSdefault/fonts/Times-Italic.pmf
deleted file mode 100644
index 865433f..0000000
Binary files a/hw/xprint/config/C/print/models/PSdefault/fonts/Times-Italic.pmf and /dev/null differ
diff --git a/hw/xprint/config/C/print/models/PSdefault/fonts/Times-Roman.pmf b/hw/xprint/config/C/print/models/PSdefault/fonts/Times-Roman.pmf
deleted file mode 100644
index 625e0c4..0000000
Binary files a/hw/xprint/config/C/print/models/PSdefault/fonts/Times-Roman.pmf and /dev/null differ
diff --git a/hw/xprint/config/C/print/models/PSdefault/fonts/ZapfDingbats.pmf b/hw/xprint/config/C/print/models/PSdefault/fonts/ZapfDingbats.pmf
deleted file mode 100644
index 1ae9a76..0000000
Binary files a/hw/xprint/config/C/print/models/PSdefault/fonts/ZapfDingbats.pmf and /dev/null differ
diff --git a/hw/xprint/config/C/print/models/PSdefault/model-config b/hw/xprint/config/C/print/models/PSdefault/model-config
deleted file mode 100644
index 05a19d8..0000000
--- a/hw/xprint/config/C/print/models/PSdefault/model-config
+++ /dev/null
@@ -1,136 +0,0 @@
-# $Xprint.org: PSdefault model-config,v 1.2 2002/11/07 19:48:04 gisburn Exp $
-# Generic default model-config for the PostScript DDX
-#
-# DO NOT MODIFY THIS FILE!!
-#
-# If you want to make customisations for your printer create a copy
-# of this printer model.
-# Example (for creating a model config "MYCOMPANYlaserxx"):
-# 1. Create model config dir:
-#    % mkdir MYCOMPANYlaserxx
-# 2. Link (or copy) the PMF (printer font metrics) for the
-#    printer buildin fonts:
-#    % ln -s PSdefault/fonts MYCOMPANYlaserxx/.
-# 3. Copy the model config file:
-#    % cp PSdefault/model-config MYCOMPANYlaserxx/.
-# 4. Customize MYCOMPANYlaserxx/model-config to match your needs.
-#
-
-# Attributes supported for this printer model
-# You may want to cut the lists here down to the attributes supported
-# by your printer.
-*content-orientations-supported: portrait landscape reverse-portrait reverse-landscape
-*descriptor: PostScript default model
-*document-formats-supported: {POSTSCRIPT 2}
-*input-trays-supported:
-*medium-source-sizes-supported: \
-{ '' \
-    {na-letter                  FALSE {6.35 209.55 6.35 273.05}}\
-    {na-legal                   FALSE {6.35 209.55 6.35 349.25}}\
-    {executive                  FALSE {6.35 177.80 6.35 260.35}}\
-    {folio                      FALSE {6.35 204.47 6.35 323.85}}\
-    {invoice                    FALSE {6.35 133.35 6.35 209.55}}\
-    {ledger                     FALSE {6.35 273.05 6.35 425.45}}\
-    {quarto                     FALSE {6.35 209.55 6.35 268.732}}\
-    {a                          FALSE {6.35 209.55 6.35 273.05}}\
-    {b                          FALSE {6.35 273.05 6.35 425.45}}\
-    {c                          FALSE {6.35 425.45 6.35 552.45}}\
-    {d                          FALSE {6.35 552.45 6.35 857.25}}\
-    {e                          FALSE {6.35 857.25 6.35 1111.25}}\
-    {na-6x9-envelope            FALSE {6.35 146.05 6.35 222.25}}\
-    {na-10x15-envelope          FALSE {6.35 247.65 6.35 374.65}}\
-    {monarch-envelope           FALSE {6.35 91.948 6.35 184.15}}\
-    {na-10x13-envelope          FALSE {6.35 247.65 6.35 323.85}}\
-    {na-9x12-envelope           FALSE {6.35 222.25 6.35 298.45}}\
-    {na-number-10-envelope      FALSE {6.35 98.425 6.35 234.95}}\
-    {na-7x9-envelope            FALSE {6.35 171.45 6.35 222.25}}\
-    {na-9x11-envelope           FALSE {6.35 222.25 6.35 273.05}}\
-    {na-10x14-envelope          FALSE {6.35 247.65 6.35 349.25}}\
-    {na-number-9-envelope       FALSE {6.35 92.075 6.35 219.075}}\
-    {iso-a0                     FALSE {6.35 834.65 6.35 1182.65}}\
-    {iso-a1                     FALSE {6.35 587.65 6.35 834.65}}\
-    {iso-a2                     FALSE {6.35 413.65 6.35 587.65}}\
-    {iso-a3                     FALSE {6.35 290.65 6.35 413.65}}\
-    {iso-a4                     FALSE {6.35 203.65 6.35 290.65}}\
-    {iso-a5                     FALSE {6.35 141.65 6.35 203.65}}\
-    {iso-a6                     FALSE {6.35 98.65 6.35 141.65}}\
-    {iso-a7                     FALSE {6.35 67.65 6.35 98.65}}\
-    {iso-a8                     FALSE {6.35 45.65 6.35 67.65}}\
-    {iso-a9                     FALSE {6.35 30.65 6.35 45.65}}\
-    {iso-a10                    FALSE {6.35 19.65 6.35 30.65}}\
-    {iso-b1                     FALSE {6.35 700.65 6.35 993.65}}\
-    {iso-b2                     FALSE {6.35 493.65 6.35 700.65}}\
-    {iso-b3                     FALSE {6.35 346.65 6.35 493.65}}\
-    {iso-b4                     FALSE {6.35 243.65 6.35 346.65}}\
-    {iso-b5                     FALSE {6.35 169.65 6.35 243.65}}\
-    {iso-b6                     FALSE {6.35 118.65 6.35 169.65}}\
-    {iso-b7                     FALSE {6.35 81.65 6.35 118.65}}\
-    {iso-b8                     FALSE {6.35 55.65 6.35 81.65}}\
-    {iso-b9                     FALSE {6.35 37.65 6.35 55.65}}\
-    {iso-b10                    FALSE {6.35 24.65 6.35 37.65}}\
-    {jis-b1                     FALSE {6.35 721.65 6.35 1023.65}}\
-    {jis-b2                     FALSE {6.35 508.65 6.35 721.65}}\
-    {jis-b3                     FALSE {6.35 357.65 6.35 508.65}}\
-    {jis-b4                     FALSE {6.35 250.65 6.35 357.65}}\
-    {jis-b5                     FALSE {6.35 175.65 6.35 250.65}}\
-    {jis-b6                     FALSE {6.35 121.65 6.35 175.65}}\
-    {jis-b7                     FALSE {6.35 84.65 6.35 121.65}}\
-    {jis-b8                     FALSE {6.35 57.65 6.35 84.65}}\
-    {jis-b9                     FALSE {6.35 38.65 6.35 57.65}}\
-    {jis-b10                    FALSE {6.35 25.65 6.35 38.65}}\
-    {iso-c3                     FALSE {6.35 317.65 6.35 451.65}}\
-    {iso-c4                     FALSE {6.35 222.65 6.35 317.65}}\
-    {iso-c5                     FALSE {6.35 155.65 6.35 222.65}}\
-    {iso-c6                     FALSE {6.35 107.65 6.35 155.65}}\
-    {iso-designated-long        FALSE {6.35 103.65 6.35 213.65}}\
-    {hp-2x-postcard             FALSE {6.35 141.65 6.35 193.65}}\
-    {hp-european-edp            FALSE {6.35 298.45 6.35 349.25}}\
-    {hp-mini                    FALSE {6.35 133.35 6.35 209.55}}\
-    {hp-postcard                FALSE {6.35 93.65  6.35 141.65}}\
-    {hp-tabloid                 FALSE {6.35 273.05 6.35 425.45}}\
-    {hp-us-edp                  FALSE {6.35 273.05 6.35 349.25}}\
-    {hp-us-government-legal     FALSE {6.35 196.85 6.35 323.85}}\
-    {hp-us-government-letter    FALSE {6.35 196.85 6.35 247.65}}\
-}
-# If you have more than one tray use the following example:
-# 1. List the supported trays
-#*input-trays-supported: main manual
-# 2. Define each tray and it's paper sizes
-#*medium-source-sizes-supported: \
-#{ main \
-#	{na-letter		FALSE	{6.35	209.55	6.35	273.05}} \
-#	{na-legal		FALSE	{6.35	209.55	6.35	349.25}} \
-#	{iso-a4			FALSE	{6.35	203.65	6.35	290.65}} \
-#} \
-#{ manual \
-#	{iso-a5			FALSE	{6.35	141.65	6.35	203.65}} \
-#	{iso-c5			FALSE	{6.35	155.65	6.35	222.65}} \
-#	{iso-designated-long	FALSE	{6.35	103.65	6.35	213.65}} \
-#	{jis-b5			FALSE	{6.35	175.65	6.35	250.65}} \
-#	{monarch-envelope	FALSE	{6.35	91.948	6.35	184.15}} \
-#	{na-legal		FALSE	{6.35	209.55	6.35	349.25}} \
-#	{na-number-10-envelope	FALSE	{6.35	98.425	6.35	234.95}} \
-#	{executive		FALSE	{6.35	177.8	6.35	260.35}} \
-#	{iso-a3			FALSE	{6.35   290.65  6.35    413.65}} \
-#       {iso-a0                 FALSE   {6.35   834.65  6.35   1182.65}} \
-#}
-*plexes-supported: simplex duplex tumble
-*printer-model: "PostScript default model"
-# 75, 100, 120, 150, 180, 200, 240, 300, 360, 400, 600, 720,
-# 940, 1200 and 2440 are supported DPI values, we limit it here
-# to some common values:
-*printer-resolutions-supported: 300 360 400 600
-*xp-ddx-identifier: XP-POSTSCRIPT
-*xp-listfonts-modes-supported: xp-list-internal-printer-fonts xp-list-glyph-fonts
-*xp-embedded-formats-supported: {POSTSCRIPT 2}
-*xp-raw-formats-supported: {POSTSCRIPT 2}
-*xp-setup-proviso: setup-optional
-
-# NOTE: xp-psddx-* attributes are EXPERIMENTAL for now.
-# xp-psddx-download-fonts defines which fonts should be downloaded as outlines
-# (valid types are "pfa", "pfb", "ttf", "ttc", "otf", "otc")
-*xp-psddx-download-fonts: pfa pfb ttf ttc otf otc
-# xp-psddx-download-font-type defines which font type is used to download outlines 
-# (valid values are "bitmap", "pstype1" and "pstype3")
-*xp-psddx-download-font-type: pstype1
-# EOF.
diff --git a/hw/xprint/config/C/print/models/PSspooldir/Makefile.am b/hw/xprint/config/C/print/models/PSspooldir/Makefile.am
deleted file mode 100644
index 717cd2c..0000000
--- a/hw/xprint/config/C/print/models/PSspooldir/Makefile.am
+++ /dev/null
@@ -1,4 +0,0 @@
-xpcdir = @xpconfigdir@/C/print/models/PSspooldir
-
-dist_xpc_DATA = model-config
-dist_xpc_SCRIPTS = spooltodir.sh
diff --git a/hw/xprint/config/C/print/models/PSspooldir/model-config b/hw/xprint/config/C/print/models/PSspooldir/model-config
deleted file mode 100644
index 6bb4777..0000000
--- a/hw/xprint/config/C/print/models/PSspooldir/model-config
+++ /dev/null
@@ -1,71 +0,0 @@
-# $Xprint.org: PSspooldir model-config,v 1.1 2002/11/25 19:48:04 gisburn Exp $
-# PostScript DDX model-config which sends jobs to a spool dir instead to a print queue
-#
-# This model is basically a cut-down PSdefault model with a custom *xp-spooler-command
-#
-# DO NOT MODIFY THIS FILE!!
-#
-# If you want to make customisations for your printer create a copy
-# of this printer model.
-# Example (for creating a model config "MYCOMPANYlaserxx"):
-# 1. Create model config dir:
-#    % mkdir MYCOMPANYlaserxx
-# 2. Link (or copy) the PMF (printer font metrics) for the
-#    printer buildin fonts:
-#    % ln -s PSspooldir/fonts MYCOMPANYlaserxx/.
-# 3. Copy the model config file:
-#    % cp PSspooldir/model-config MYCOMPANYlaserxx/.
-# 4. Customize MYCOMPANYlaserxx/model-config to match your needs.
-#
-# Attributes supported for this printer model
-*content-orientations-supported: portrait landscape reverse-portrait reverse-landscape
-*descriptor: PostScript job spool dir /tmp/Xprintjobs
-*document-formats-supported: {POSTSCRIPT 2}
-*input-trays-supported:
-*medium-source-sizes-supported: \
-{ '' \
-    {na-letter                  FALSE {6.35 209.55 6.35 273.05}}\
-    {na-legal                   FALSE {6.35 209.55 6.35 349.25}}\
-    {executive                  FALSE {6.35 177.80 6.35 260.35}}\
-    {ledger                     FALSE {6.35 273.05 6.35 425.45}}\
-    {quarto                     FALSE {6.35 209.55 6.35 268.732}}\
-    {iso-a3                     FALSE {6.35 290.65 6.35 413.65}}\
-    {iso-a4                     FALSE {6.35 203.65 6.35 290.65}}\
-    {iso-a5                     FALSE {6.35 141.65 6.35 203.65}}\
-    {iso-b3                     FALSE {6.35 346.65 6.35 493.65}}\
-    {iso-b4                     FALSE {6.35 243.65 6.35 346.65}}\
-    {iso-b5                     FALSE {6.35 169.65 6.35 243.65}}\
-    {jis-b3                     FALSE {6.35 357.65 6.35 508.65}}\
-    {jis-b4                     FALSE {6.35 250.65 6.35 357.65}}\
-    {jis-b5                     FALSE {6.35 175.65 6.35 250.65}}\
-    {iso-c3                     FALSE {6.35 317.65 6.35 451.65}}\
-    {iso-c4                     FALSE {6.35 222.65 6.35 317.65}}\
-    {iso-c5                     FALSE {6.35 155.65 6.35 222.65}}\
-}
-
-*plexes-supported: simplex duplex tumble
-*printer-model: "PostScript job spool dir /tmp/Xprintjobs"
-# 75, 100, 120, 150, 180, 200, 240, 300, 360, 400, 600, 720,
-# 940, 1200 and 2440 are supported DPI values, we limit it here
-# to some common values:
-*printer-resolutions-supported: 300 360 400 600
-*xp-ddx-identifier: XP-POSTSCRIPT
-*xp-listfonts-modes-supported: xp-list-internal-printer-fonts xp-list-glyph-fonts
-*xp-embedded-formats-supported: {POSTSCRIPT 2}
-*xp-raw-formats-supported: {POSTSCRIPT 2}
-*xp-setup-proviso: setup-optional
-
-# Use custom spooler script which sends the output to a dir instead to a printer queue
-# Note that "%xpconfigdir%" is currently only supported in Xprt servers build
-# from xprint.mozdev.org sources, other platforms have replace it with the
-# absolute path name to the script
-*xp-spooler-command: %xpconfigdir%/C/print/models/PSspooldir/spooltodir.sh -d /tmp/Xprintjobs -s .ps -u 077 -p %printer-name% -c %copy-count% -t %job-name% -o "%options%"
-
-# NOTE: xp-psddx-* attributes are EXPERIMENTAL for now.
-# xp-psddx-download-fonts defines which fonts should be downloaded as outlines
-# (valid types are "pfa", "pfb", "ttf", "ttc", "otf", "otc")
-*xp-psddx-download-fonts: pfa pfb ttf ttc otf otc
-# xp-psddx-download-font-type defines which font type is used to download outlines 
-# (valid values are "bitmap", "pstype1" and "pstype3")
-*xp-psddx-download-font-type: pstype1
-# EOF.
diff --git a/hw/xprint/config/C/print/models/PSspooldir/spooltodir.sh b/hw/xprint/config/C/print/models/PSspooldir/spooltodir.sh
deleted file mode 100755
index aba14e1..0000000
--- a/hw/xprint/config/C/print/models/PSspooldir/spooltodir.sh
+++ /dev/null
@@ -1,127 +0,0 @@
-#!/bin/sh
-PATH=/usr/bin:/usr/sbin:/bin:/sbin
-export PATH
-
-verbose_msgs="false"
-DEFAULT_SPOOLDIR=/tmp/Xprintjobs
-
-usage()
-{
-    printf "Usage: ${0}: [options]\n"
-    printf "-v\tbe verbose\n"
-    printf "-d dirname\tdefine spool dir\n"
-    printf "-p string\tname of printer selected by user\n"
-    printf "-c integer\tnumber of copies\n"
-    printf "-t string\tjob title\n"
-    printf "-s string\tfile name suffix\n"
-    printf "-o string\tspooler options\n"
-    printf "-u mask\tpermission mask for new files (see umask)\n"
-    exit 2
-}
-
-verbose()
-{
-    if ${verbose_msgs} ; then
-        echo "$1"
-    fi
-}
-
-spooldir="${DEFAULT_SPOOLDIR}"
-printername=
-num_job_copies=
-job_title=
-filename_suffix=
-spooler_options=
-permmask=
-while getopts va:b:d:p:c:t:s:o:u: i
-do
-    case $i in
-        v)  
-            verbose_msgs="true"
-            ;;
-        d)  
-            spooldir="$OPTARG"
-            ;;
-        p)  
-            printername="$OPTARG"
-            ;;
-        c)  
-            num_job_copies="$OPTARG"
-            ;;
-        t)  
-            job_title="$OPTARG"
-            ;;
-        s)  
-            filename_suffix="$OPTARG"
-            ;;
-        o)  
-            spooler_options="$OPTARG"
-            ;;
-        u)  
-            permmask="$OPTARG"
-            ;;
-        ?)  usage
-            ;;
-    esac
-done
-
-verbose "# spooldir=\"$spooldir\""
-verbose "# printername=\"$printername\""
-verbose "# num_job_copies=\"$num_job_copies\""
-verbose "# job_title=\"$job_title\""
-verbose "# spooler_options=\"$spooler_options\""
-verbose "# umask=\"$permmask\""
-
-if [ ! -d "${DEFAULT_SPOOLDIR}" ] ; then 
-  mkdir "${DEFAULT_SPOOLDIR}"
-  chmod a+rwxt "${DEFAULT_SPOOLDIR}"
-fi
-
-if [ "${permmask}" != "" ] ; then
-    umask ${permmask}
-fi
-
-if [ ! -d "$spooldir" ] ; then
-    echo "$0: spooldir \"$spooldir\" does not exits." >&2
-    exit 1
-fi
-if [ ! -w "$spooldir" ] ; then
-    echo "$0: Cannot write to spooldir \"$spooldir\"." >&2
-    exit 1
-fi
-
-# Create first part of the output file name (prefix and an "unique"
-# id(=date and time))...
-filename="Xpjob_`date +%Y%m%d%H%M%S`"
-
-# ... then add options ...
-if [ "${printername}" != "" ] ; then
-    filename="${filename}_${printername}"
-fi
-if [ "${num_job_copies}" != "" -a "${num_job_copies}" != "1" ] ; then
-    filename="${filename}_copies_${num_job_copies}"
-fi
-if [ "${job_title}" != "" ] ; then
-    filename="${filename}_title_${job_title}"
-fi
-
-# ... mangle output file name and filter chars (like whitespaces)
-# which may screw-up further processing by other shell scripts ...
-filename="`echo \"${filename}\" | tr '[:blank:]' '_' | tr -c -d '[:alnum:]_.-'`"
-
-# ... add path and suffix ...
-filename="${spooldir}/${filename}${filename_suffix}"
-
-verbose "# File name is \"$filename\"."
-
-# ... and finally capture stdin to the file.
-cat >"${filename}"
-
-if ${verbose_msgs} ; then
-    printf "# File is " ; ls -l "${filename}"
-fi
-
-verbose "# Done."
-
-exit 0
-# EOF.
diff --git a/hw/xprint/config/C/print/models/SPSPARC2/Makefile.am b/hw/xprint/config/C/print/models/SPSPARC2/Makefile.am
deleted file mode 100644
index 5a56f90..0000000
--- a/hw/xprint/config/C/print/models/SPSPARC2/Makefile.am
+++ /dev/null
@@ -1,5 +0,0 @@
-SUBDIRS = fonts
-
-xpcdir = @xpconfigdir@/C/print/models/SPSPARC2
-
-dist_xpc_DATA = model-config
diff --git a/hw/xprint/config/C/print/models/SPSPARC2/fonts/Makefile.am b/hw/xprint/config/C/print/models/SPSPARC2/fonts/Makefile.am
deleted file mode 100644
index d1ee6cf..0000000
--- a/hw/xprint/config/C/print/models/SPSPARC2/fonts/Makefile.am
+++ /dev/null
@@ -1,37 +0,0 @@
-xpcdir = @xpconfigdir@/C/print/models/SPSPARC2/fonts
-
-parentdir = ../../PSdefault/fonts
-
-XPFONTS = \
-        Courier-Bold.pmf \
-        Courier-BoldOblique.pmf \
-        Courier-Oblique.pmf \
-        Courier.pmf \
-        Helvetica-Bold.pmf \
-        Helvetica-BoldOblique.pmf \
-        Helvetica-Oblique.pmf \
-        Helvetica.pmf \
-        Symbol.pmf \
-        Times-Bold.pmf \
-        Times-BoldItalic.pmf \
-        Times-Italic.pmf \
-        Times-Roman.pmf
-
-dest = $(DESTDIR)$(xpcdir)
-
-remove-stuff:
-	for x in $(XPFONTS) ; do			\
-		rm -f $(dest)/$$x	;		\
-	done
-
-	rm -f $(dest)/fonts.dir
-
-install-data-hook: remove-stuff
-	mkdir -p $(dest) ;								\
-	for x in $(XPFONTS) ; do							\
-		ln -s $(parentdir)/$$x $(dest)/$$x	;				\
-	done
-
-	$(MKFONTSCALE) -b -s -l $(dest)
-
-uninstall-hook: remove-stuff
diff --git a/hw/xprint/config/C/print/models/SPSPARC2/model-config b/hw/xprint/config/C/print/models/SPSPARC2/model-config
deleted file mode 100644
index 9f29b99..0000000
--- a/hw/xprint/config/C/print/models/SPSPARC2/model-config
+++ /dev/null
@@ -1,18 +0,0 @@
-# $Xprint.org: SPSPARC2 model-config,v 1.4 2002/11/07 19:48:04 gisburn Exp $
-*content-orientations-supported: portrait landscape
-*descriptor: SunPics SPARCprinter II
-*document-formats-supported: {POSTSCRIPT 2}
-*input-trays-supported:
-*medium-source-sizes-supported: \
-    { '' {na-letter FALSE {6.35 209.55 6.35 273.05}} \
-	 {na-legal  FALSE {6.35 209.55 6.35 349.25}} \
-	 {iso-a4    FALSE {6.35 203.65 6.35 290.65}}}
-*plexes-supported: simplex
-*printer-model: "SunPics SPARCprinter II"
-*printer-resolutions-supported: 300
-*xp-ddx-identifier: XP-POSTSCRIPT
-*xp-listfonts-modes-supported: xp-list-internal-printer-fonts xp-list-glyph-fonts
-*xp-embedded-formats-supported: {POSTSCRIPT 2}
-*xp-raw-formats-supported: {POSTSCRIPT 2}
-*xp-setup-proviso: setup-optional
-# EOF.
diff --git a/hw/xprint/config/Makefile.am b/hw/xprint/config/Makefile.am
deleted file mode 100644
index 197d19d..0000000
--- a/hw/xprint/config/Makefile.am
+++ /dev/null
@@ -1,712 +0,0 @@
-## Locale mappings
-## Notes:
-## - only ASCII chars are allowed
-## - "C" and "en_US" should not be used, they are real directories
-
-# List of locales which should be linked to the "C" locale
-
-SUBDIRS = C en_US
-
-xpconfigdir = @xpconfigdir@
-
-C_LOCALES= \
-	POSIX \
-        af_ZA \
-        af_ZA.iso88591 \
-        ar \
-        ar_AE \
-        ar_AE.iso88596 \
-        ar_AE.utf8 \
-        ar_BH \
-        ar_BH.iso88596 \
-        ar_BH.utf8 \
-        ar_DZ \
-        ar_DZ.iso88596 \
-        ar_DZ.utf8 \
-        ar_EG \
-        ar_EG.ISO8859-6 \
-        ar_EG.UTF-8 \
-        ar_EG.iso88596 \
-        ar_EG.utf8 \
-        ar_IN.utf8 \
-        ar_IQ \
-        ar_IQ.iso88596 \
-        ar_IQ.utf8 \
-        ar_JO \
-        ar_JO.iso88596 \
-        ar_JO.utf8 \
-        ar_KW \
-        ar_KW.iso88596 \
-        ar_KW.utf8 \
-        ar_LB \
-        ar_LB.iso88596 \
-        ar_LB.utf8 \
-        ar_LY \
-        ar_LY.iso88596 \
-        ar_LY.utf8 \
-        ar_MA \
-        ar_MA.iso88596 \
-        ar_MA.utf8 \
-        ar_OM \
-        ar_OM.iso88596 \
-        ar_OM.utf8 \
-        ar_QA \
-        ar_QA.iso88596 \
-        ar_QA.utf8 \
-        ar_SA \
-        ar_SA.iso88596 \
-        ar_SA.utf8 \
-        ar_SD \
-        ar_SD.iso88596 \
-        ar_SD.utf8 \
-        ar_SY \
-        ar_SY.iso88596 \
-        ar_SY.utf8 \
-        ar_TN \
-        ar_TN.iso88596 \
-        ar_TN.utf8 \
-        ar_YE \
-        ar_YE.iso88596 \
-        ar_YE.utf8 \
-        be_BY \
-        be_BY.cp1251 \
-        be_BY.utf8 \
-        bg_BG \
-        bg_BG.ISO8859-5 \
-        bg_BG.cp1251 \
-        bg_BG.utf8 \
-        bn_IN.UTF-8 \
-        bn_IN.utf8 \
-        br_FR \
-        br_FR.iso88591 \
-        bs \
-        bs_BA \
-        bs_BA.iso88592 \
-        bs_BA.ISO8859-2 \
-        bs_BA.ISO-8859-2 \
-        bs_BA.ISO_8859-2 \
-        bs_BA.UTF-8 \
-        bokmal \
-        ca \
-        ca.ISO8859-1 \
-        ca.ISO8859-15 \
-        ca_ES \
-        ca_ES.ISO8859-1 \
-        ca_ES.ISO8859-15 \
-        ca_ES.iso88591 \
-        ca_ES.iso885915 at euro \
-        ca_ES.utf8 \
-        ca_ES at euro \
-        catalan \
-        croatian \
-        cs_CZ \
-        cs_CZ.ISO8859-2 \
-        cs_CZ.iso88592 \
-        cs_CZ.utf8 \
-        cy_GB \
-        cy_GB.iso885914 \
-        cz \
-        cz.ISO8859-2 \
-        czech \
-        da \
-        da.ISO8859-1 \
-        da.ISO8859-15 \
-        danish \
-        dansk \
-        da_DK \
-        da_DK.ISO8859-1 \
-        da_DK.ISO8859-15 \
-        da_DK.iso88591 \
-        da_DK.iso885915 \
-        da_DK.utf8 \
-        de \
-        de.ISO8859-1 \
-        de.ISO8859-15 \
-        de.UTF-8 \
-        deutsch \
-        de_AT \
-        de_AT.ISO8859-1 \
-        de_AT.ISO8859-15 \
-        de_AT.iso88591 \
-        de_AT.iso885915 at euro \
-        de_AT.utf8 \
-        de_AT at euro \
-        de_BE \
-        de_BE.iso88591 \
-        de_BE.iso885915 at euro \
-        de_BE at euro \
-        de_CH \
-        de_CH.ISO8859-1 \
-        de_CH.iso88591 \
-        de_CH.utf8 \
-        de_DE \
-        de_DE.ISO8859-1 \
-        de_DE.ISO8859-15 \
-        de_DE.UTF-8 \
-        de_DE.iso88591 \
-        de_DE.iso885915 at euro \
-        de_DE.utf8 \
-        de_DE at euro \
-        de_LU \
-        de_LU.iso88591 \
-        de_LU.iso885915 at euro \
-        de_LU.utf8 \
-        de_LU at euro \
-        el_GR \
-        el_GR.ISO8859-7 \
-        el_GR.ISO8859-7 at euro \
-        el_GR.iso88597 \
-        el_GR.utf8 \
-        en_AU \
-        en_AU.ISO8859-1 \
-        en_AU.iso88591 \
-        en_AU.utf8 \
-        en_BW \
-        en_BW.iso88591 \
-        en_DK \
-        en_DK.iso88591 \
-        en_GB \
-        en_GB.ISO8859-1 \
-        en_GB.ISO8859-15 \
-        en_GB.iso88591 \
-        en_GB.iso885915 \
-        en_GB.utf8 \
-        en_HK \
-        en_HK.iso88591 \
-        en_IE \
-        en_IE.ISO8859-1 \
-        en_IE.ISO8859-15 \
-        en_IE.iso88591 \
-        en_IE.iso885915 at euro \
-        en_IE.utf8 \
-        en_IE at euro \
-        en_IN \
-        en_IN.utf8 \
-        en_NZ \
-        en_NZ.ISO8859-1 \
-        en_NZ.iso88591 \
-        en_NZ.utf8 \
-        en_PH \
-        en_PH.iso88591 \
-        en_SG \
-        en_SG.iso88591 \
-        en_ZA \
-        en_ZA.iso88591 \
-        en_ZA.utf8 \
-        en_ZW \
-        en_ZW.iso88591 \
-        es_AR \
-        es_AR.ISO8859-1 \
-        es_AR.iso88591 \
-        es_AR.utf8 \
-        es_BO \
-        es_BO.ISO8859-1 \
-        es_BO.iso88591 \
-        es_BO.utf8 \
-        es_CL \
-        es_CL.ISO8859-1 \
-        es_CL.iso88591 \
-        es_CL.utf8 \
-        es_CO \
-        es_CO.ISO8859-1 \
-        es_CO.iso88591 \
-        es_CO.utf8 \
-        es_CR \
-        es_CR.ISO8859-1 \
-        es_CR.iso88591 \
-        es_CR.utf8 \
-        es_DO \
-        es_DO.iso88591 \
-        es_DO.utf8 \
-        es_EC \
-        es_EC.ISO8859-1 \
-        es_EC.iso88591 \
-        es_EC.utf8 \
-        es_ES \
-        es_ES.ISO8859-1 \
-        es_ES.ISO8859-15 \
-        es_ES.UTF-8 \
-        es_ES.iso88591 \
-        es_ES.iso885915 at euro \
-        es_ES.utf8 \
-        es_ES at euro \
-        es_GT \
-        es_GT.ISO8859-1 \
-        es_GT.iso88591 \
-        es_GT.utf8 \
-        es_HN \
-        es_HN.iso88591 \
-        es_HN.utf8 \
-        es_MX \
-        es_MX.ISO8859-1 \
-        es_MX.iso88591 \
-        es_MX.utf8 \
-        es_NI \
-        es_NI.ISO8859-1 \
-        es_NI.iso88591 \
-        es_NI.utf8 \
-        es_PA \
-        es_PA.ISO8859-1 \
-        es_PA.iso88591 \
-        es_PA.utf8 \
-        es_PE \
-        es_PE.ISO8859-1 \
-        es_PE.iso88591 \
-        es_PE.utf8 \
-        es_PY \
-        es_PY.ISO8859-1 \
-        es_PY.iso88591 \
-        es_PY.utf8 \
-        es_SV \
-        es_SV.ISO8859-1 \
-        es_SV.iso88591 \
-        es_SV.utf8 \
-        es_UY \
-        es_UY.ISO8859-1 \
-        es_UY.iso88591 \
-        es_UY.utf8 \
-        es_VE \
-        es_VE.ISO8859-1 \
-        es_VE.iso88591 \
-        es_VE.utf8 \
-        et_EE \
-        et_EE.ISO8859-15 \
-        et_EE.iso88591 \
-        et_EE.utf8 \
-        eu_ES \
-        eu_ES.iso88591 \
-        eu_ES.iso885915 at euro \
-        eu_ES at euro \
-        fa_IR.utf8 \
-        fi_FI \
-        fi_FI.ISO8859-1 \
-        fi_FI.ISO8859-15 \
-        fi_FI.UTF-8 \
-        fi_FI.iso88591 \
-        fi_FI.iso885915 at euro \
-        fi_FI.utf8 \
-        fi_FI at euro \
-        fo_FO \
-        fo_FO.iso88591 \
-        fo_FO.utf8 \
-        fr_BE \
-        fr_BE.ISO8859-1 \
-        fr_BE.ISO8859-15 \
-        fr_BE.UTF-8 \
-        fr_BE.iso88591 \
-        fr_BE.iso885915 at euro \
-        fr_BE.utf8 \
-        fr_BE at euro \
-        fr_CH \
-        fr_CH.ISO8859-1 \
-        fr_CH.iso88591 \
-        fr_CH.utf8 \
-        fr_FR \
-        fr_FR.ISO8859-1 \
-        fr_FR.ISO8859-15 \
-        fr_FR.UTF-8 \
-        fr_FR.iso88591 \
-        fr_FR.iso885915 at euro \
-        fr_FR.utf8 \
-        fr_FR at euro \
-        fr_LU \
-        fr_LU.iso88591 \
-        fr_LU.iso885915 at euro \
-        fr_LU.utf8 \
-        fr_LU at euro \
-        ga_IE \
-        ga_IE.iso88591 \
-        ga_IE.iso885915 at euro \
-        ga_IE.utf8 \
-        ga_IE at euro \
-        gl_ES \
-        gl_ES.iso88591 \
-        gl_ES.iso885915 at euro \
-        gl_ES.utf8 \
-        gl_ES at euro \
-        gu_IN.UTF-8 \
-        gu_IN.utf8 \
-        gv_GB \
-        gv_GB.iso88591 \
-        hebrew \
-        he \
-        he_IL \
-        he_IL.ISO8859-8 \
-        he_IL.UTF-8 \
-        he_IL.iso88598 \
-        he_IL.utf8 \
-        hi_IN.UTF-8 \
-        hi_IN.utf8 \
-        hr_HR \
-        hr_HR.ISO8859-2 \
-        hr_HR.iso88592 \
-        hr_HR.utf8 \
-        hu_HU \
-        hu_HU.ISO8859-2 \
-        hu_HU.iso88592 \
-        hu_HU.utf8 \
-        id_ID \
-        id_ID.iso88591 \
-        id_ID.utf8 \
-        is_IS \
-        is_IS.ISO8859-1 \
-        is_IS.iso88591 \
-        is_IS.utf8 \
-        it \
-        it.ISO8859-1 \
-        it.ISO8859-15 \
-        it.UTF-8 \
-        italian \
-        it_CH \
-        it_CH.iso88591 \
-        it_CH.utf8 \
-        it_IT \
-        it_IT.ISO8859-1 \
-        it_IT.ISO8859-15 \
-        it_IT.UTF-8 \
-        it_IT.iso88591 \
-        it_IT.iso885915 at euro \
-        it_IT.utf8 \
-        it_IT at euro \
-        iw_IL \
-        iw_IL.iso88598 \
-        ja \
-        japan \
-        japanese \
-        japanese.euc \
-        japanese.sjis \
-        ja_JP \
-        ja_JP.EUC \
-        ja_JP.PCK \
-        ja_JP.UTF-8 \
-        ja_JP.eucJP \
-        ja_JP.eucjp \
-        ja_JP.sjis \
-        ja_JP.ujis \
-        ja_JP.utf8 \
-        ka_GE \
-        ka_GE.georgianps \
-        kl_GL \
-        kl_GL.iso88591 \
-        kl_GL.utf8 \
-        ko \
-        ko.UTF-8 \
-        korean \
-        korean.euc \
-        ko_KR \
-        ko_KR.EUC \
-        ko_KR.EUC at dict \
-        ko_KR.UTF-8 \
-        ko_KR.UTF-8 at dict \
-        ko_KR.euckr \
-        ko_KR.utf8 \
-        kw_GB \
-        kw_GB.iso88591 \
-        lt_LT \
-        lt_LT.ISO8859-13 \
-        lt_LT.iso885913 \
-        lt_LT.utf8 \
-        lithuanian \
-        lt \
-        lt.ISO8859-13 \
-        lv \
-        lv.ISO8859-13 \
-        lv_LV \
-        lv_LV.ISO8859-13 \
-        lv_LV.iso885913 \
-        lv_LV.utf8 \
-        mi_NZ \
-        mi_NZ.iso885913 \
-        mk_MK \
-        mk_MK.ISO8859-5 \
-        mk_MK.iso88595 \
-        mk_MK.utf8 \
-        mr_IN.utf8 \
-        ms_MY \
-        ms_MY.iso88591 \
-        mt_MT \
-        mt_MT.iso88593 \
-        nb_NO \
-        nb_NO.ISO-8859-1 \
-        nl \
-        nl.ISO8859-1 \
-        nl.ISO8859-15 \
-        nl_BE \
-        nl_BE.ISO8859-1 \
-        nl_BE.ISO8859-15 \
-        nl_BE.iso88591 \
-        nl_BE.iso885915 at euro \
-        nl_BE.utf8 \
-        nl_BE at euro \
-        nl_NL \
-        nl_NL.ISO8859-1 \
-        nl_NL.ISO8859-15 \
-        nl_NL.iso88591 \
-        nl_NL.iso885915 at euro \
-        nl_NL.utf8 \
-        nl_NL at euro \
-        nn_NO \
-        nn_NO.iso88591 \
-        no \
-        no.ISO8859-1 \
-        no_NO \
-        no_NO.ISO8859-1 at bokmal \
-        no_NO.ISO8859-1 at nynorsk \
-        no_NO.iso88591 \
-        no_NO.utf8 \
-        norwegian \
-        oc_FR \
-        oc_FR.iso88591 \
-        pa_IN.UTF-8 \
-        pa_IN.utf8 \
-        polish \
-        pl_PL \
-        pl_PL.ISO8859-2 \
-        pl_PL.UTF-8 \
-        pl_PL.iso88592 \
-        pl_PL.utf8 \
-        portuguese \
-        pt \
-        pt.ISO8859-1 \
-        pt.ISO8859-15 \
-        pt_BR \
-        pt_BR.ISO8859-1 \
-        pt_BR.ISO-8859-1 \
-        pt_BR.ISO_8859-1 \
-        pt_BR.iso88591 \
-        pt_BR.iso885915 \
-        pt_BR.88591 \
-        pt_BR.88591.en \
-        pt_BR.utf8 \
-        pt_BR.UTF-8 \
-        pt_PT \
-        pt_PT.ISO8859-1 \
-        pt_PT.ISO8859-15 \
-        pt_PT.iso88591 \
-        pt_PT.iso885915 at euro \
-        pt_PT.utf8 \
-        pt_PT at euro \
-        ro_RO \
-        ro_RO.ISO8859-2 \
-        ro_RO.iso88592 \
-        ro_RO.utf8 \
-        ru \
-        ru.ISO8859-5 \
-        ru.UTF-8 \
-        ru.ansi1251 \
-        ru.koi8-r \
-        ru_SU \
-        russian \
-        ru_RU \
-        ru_RU.ANSI1251 \
-        ru_RU.ISO8859-5 \
-        ru_RU.KOI8-R \
-        ru_RU.UTF-8 \
-        ru_RU.iso88595 \
-        ru_RU.koi8r \
-        ru_RU.utf8 \
-        ru_UA \
-        ru_UA.koi8u \
-        romanian \
-        se_NO \
-        se_NO.utf8 \
-        si \
-        sinhala \
-        si_LK \
-        si_LK.UTF8 \
-        sk \
-        sk.ISO8859-2 \
-        slovak \
-        slovene \
-        slovenian \
-        spanish \
-        sk_SK \
-        sk_SK.ISO8859-2 \
-        sk_SK.iso88592 \
-        sk_SK.utf8 \
-        sh \
-        sh.ISO8859-2 \
-        sh_BA.ISO8859-2 at bosnia \
-        sh_YU \
-        sh_YU.iso88592 \
-        sh_YU.utf8 \
-        sl_SI \
-        sl_SI.ISO8859-2 \
-        sl_SI.iso88592 \
-        sl_SI.utf8 \
-        su \
-        su.ISO8859-1 \
-        sq_AL \
-        sq_AL.ISO8859-2 \
-        sq_AL.iso88591 \
-        sq_AL.utf8 \
-        sr_SP \
-        sr_SP.ISO8859-5 \
-        sr_YU \
-        sr_YU.ISO8859-5 \
-        sr_YU.iso88592 \
-        sr_YU.iso88595 at cyrillic \
-        sr_YU.utf8 \
-        sr_YU at cyrillic \
-        sv \
-        sv.ISO8859-1 \
-        sv.ISO8859-15 \
-        sv.UTF-8 \
-        sv_FI \
-        sv_FI.iso88591 \
-        sv_FI.iso885915 at euro \
-        sv_FI.utf8 \
-        sv_FI at euro \
-        sv_SE \
-        sv_SE.ISO8859-1 \
-        sv_SE.ISO8859-15 \
-        sv_SE.UTF-8 \
-        sv_SE.iso88591 \
-        sv_SE.iso885915 \
-        sv_SE.utf8 \
-        swedish \
-        ta_IN \
-        ta_IN.utf8 \
-        te_IN \
-        te_IN.utf8 \
-        tg_TJ \
-        tg_TJ.koi8t \
-        th \
-        thai \
-        th_TH \
-        th_TH.ISO8859-11 \
-        th_TH.TIS620 \
-        th_TH.UTF-8 \
-        th_TH.tis620 \
-        th_TH.utf8 \
-        tl_PH \
-        tl_PH.iso88591 \
-        tr \
-        tr.ISO8859-9 \
-        turkish \
-        tr_TR \
-        tr_TR.ISO8859-9 \
-        tr_TR.UTF-8 \
-        tr_TR.iso88599 \
-        tr_TR.utf8 \
-        uk_UA \
-        uk_UA.koi8u \
-        uk_UA.utf8 \
-        ur_PK \
-        ur_PK.utf8 \
-        uz_UZ \
-        uz_UZ.iso88591 \
-        vi_VN \
-        vi_VN.tcvn \
-        vi_VN.utf8 \
-        wa_BE \
-        wa_BE.iso88591 \
-        wa_BE.iso885915 at euro \
-        wa_BE at euro \
-        zh \
-        zh.GBK \
-        zh.UTF-8 \
-        zh_CN \
-        zh_CN.EUC \
-        zh_CN.EUC at pinyin \
-        zh_CN.EUC at radical \
-        zh_CN.EUC at stroke \
-        zh_CN.GB18030 \
-        zh_CN.GB18030 at pinyin \
-        zh_CN.GB18030 at radical \
-        zh_CN.GB18030 at stroke \
-        zh_CN.GBK \
-        zh_CN.GBK at pinyin \
-        zh_CN.GBK at radical \
-        zh_CN.GBK at stroke \
-        zh_CN.UTF-8 \
-        zh_CN.UTF-8 at pinyin \
-        zh_CN.UTF-8 at radical \
-        zh_CN.UTF-8 at stroke \
-        zh_CN.gb18030 \
-        zh_CN.gb2312 \
-        zh_CN.gbk \
-        zh_CN.utf8 \
-        zh_HK \
-        zh_HK.BIG5HK \
-        zh_HK.BIG5HK at radical \
-        zh_HK.BIG5HK at stroke \
-        zh_HK.UTF-8 \
-        zh_HK.UTF-8 at radical \
-        zh_HK.UTF-8 at stroke \
-        zh_HK.big5hkscs \
-        zh_HK.utf8 \
-        zh_TW \
-        zh_TW.BIG5 \
-        zh_TW.BIG5 at pinyin \
-        zh_TW.BIG5 at radical \
-        zh_TW.BIG5 at stroke \
-        zh_TW.BIG5 at zhuyin \
-        zh_TW.EUC \
-        zh_TW.EUC at pinyin \
-        zh_TW.EUC at radical \
-        zh_TW.EUC at stroke \
-        zh_TW.EUC at zhuyin \
-        zh_TW.UTF-8 \
-        zh_TW.UTF-8 at pinyin \
-        zh_TW.UTF-8 at radical \
-        zh_TW.UTF-8 at stroke \
-        zh_TW.UTF-8 at zhuyin \
-        zh_TW.big5 \
-        zh_TW.euctw \
-        zh_TW.utf8
-
-
-# List of locales which should be linked to the "en_US" locale,
-# e.g. these locales should get the defaults (for example that
-# US-Letter is used as default papersize) mainly used in the USA
-US_LOCALES= \
-        en_CA \
-        en_CA.ISO8859-1 \
-        en_CA.iso88591 \
-        en_CA.utf8 \
-        en_US.ISO8859-1 \
-        en_US.ISO8859-15 \
-        en_US.UTF-8 \
-        en_US.iso88591 \
-        en_US.iso885915 \
-        en_US.utf8 \
-        es_PR \
-        es_PR.iso88591 \
-        es_PR.utf8 \
-        es_US \
-        es_US.iso88591 \
-        fr_CA \
-        fr_CA.ISO8859-1 \
-        fr_CA.iso88591 \
-        fr_CA.utf8 \
-        yi_US \
-        yi_US.cp1255
-
-dest = $(DESTDIR)$(xpconfigdir)
-
-remove-links:
-	for dir in $(US_LOCALES) ; do				\
-		rm -f $(dest)/$${dir} ;			\
-	done ;							\
-								\
-	for dir in $(C_LOCALES) ; do				\
-		rm -f $(dest)/$${dir} ;			\
-	done ;
-
-install-data-local: remove-links
-	mkdir -p $(dest) ;				\
-	mkdir -p $(dest)/C;				\
-	mkdir -p $(dest)/en_US;				\
-								\
-	for dir in $(US_LOCALES) ; do				\
-		ln -s en_US $(dest)/$${dir} ;		\
-	done ; 							\
-								\
-	for dir in $(C_LOCALES) ; do				\
-		ln -s C $(dest)/$${dir} ;		\
-	done ;
-
-uninstall-hook: remove-links
-
-dist_xpconfig_DATA = README
diff --git a/hw/xprint/config/README b/hw/xprint/config/README
deleted file mode 100644
index d744781..0000000
--- a/hw/xprint/config/README
+++ /dev/null
@@ -1,318 +0,0 @@
-
-                     --------------------------------------
-                        The X Print Service - The Basics
-                     --------------------------------------
-
-Index
-   - 1.0 X Print Service Overview
-
-   - 2.0 How the X Print Service Works
-
-   - 3.0 Using the X Print Service
-        - 3.1 X Print Server Configuration
-        - 3.2 Starting the X Print Service
-        - 3.3 Configuring the environment
-        - 3.4 General End-User Sequence
-
-
-1.0  X Print Service Overview
-=============================
-
-The "X Print Service" technology allows X rendering to devices such as
-printers and fax.  Most of the service is available in the X11
-technology stack as Xp, with the remainder in the CDE technology stack
-as DtPrint.  Modifications have also been made to the Motif technology
-stack to support Xp and DtPrint.
-
-The Xp portion consists of:
-   * Xp Extension for the X-Server (included in the X-Server Xprt)
-   * Xp Extension API for the client side (libXp)
-   * PCL ddx driver that converts core X to native PCL
-   * Postscript ddx driver that converts core X to native Postscript
-   * Raster ddx driver that generates xwd rasters which can be
-     converted to PCL or Postscript rasters
-
-The DtPrint portion consists of:
-   * A collection of print GUIs (libDtPrint)
-   * A Print Dialog Manager that can assist a client in
-     setting printing options (dtpdm, dtpdmd)
-
-From an X clients perspective, it can attach to one of two nearly
-identical X-Servers, a "Video" X-Server, and a "Print" X-Server
-which has the additional Xp capability but otherwise looks and
-behaves the same.
-
-
-
-2.0  How the X Print Service Works
-==================================
-
-The X Print Service expands on the traditional X-Server and Xlib world
-in four ways.
-
-1. Most obvious is the use of "print ddx drivers" instead of
-   "video ddx drivers".  While a video ddx driver modifies pixels
-   in a video frame buffer, a print ddx driver generates "page
-   description language (PDL)" output such as PCL or Postscript.
-
-   Once a print ddx driver generates PDL output, it can be sent to
-   a spooler such as lp(1) or retrieved by the client.
-
-   Though not currently done, a single X-Server can support both
-   print and video ddx drivers.
-
-2. Since printers support "paged" output, unlike video, a portion
-   of the Xp Extension supports APIs to delineate printed output.
-   For example, XpStartPage and XpEndPage tell the X-Server where
-   a physical page starts and ends in an otherwise continuous
-   stream of X rendering primitives.  Likewise, XpStartJob and
-   XpEndJob determine when a collection of pages starts and ends.
-   XpEndJob typically causes the generated PDL to be submitted to
-   a spooler, such as lp(1).
-
-3. Since printers have extensive capabilities, another portion of
-   the Xp Extension supports APIs to manipulate "print contexts".
-
-   Once a printer is selected using the Xp Extension API, a print
-   context to represent it can be created.  A print context
-   embodies the printer selected - it contains the printer's
-   default capabilities, selectable range of capabilities,
-   printer state, and generated output.  Some "attributes" within
-   the print context can be modified by the user, and the
-   X-Server and print ddx driver will react accordingly.  For
-   example, the attribute "content-orientation" can be set to
-   "landscape" or "portrait".
-
-4. Since printers can have "built in" fonts, the Xp Extension in
-   the X-Server works with the print ddx drivers to make
-   available (for printing only) additional fonts on a per print
-   context basis.
-
-   When a print context is created and set for a given printer,
-   the X font calls may be able to access additional printer
-   fonts.  To do this (typically), the X-Server must have access
-   to "printer metric files" (.pmf) that describe at minimum the
-   metrics of the built in fonts.
-
-
-
-3.0  Using the X Print Service
-==============================
-
-There are three tasks to start the X Print Service:  1) configuring the
-X Print Server, 2) starting the X Print Service, 3) configuring the user
-session so that clients can find the running X Print Service.
-
-The tasks are described in detail below.
-
-
-3.1  X Print Server Configuration
----------------------------------
-
-The X Print Server (Xprt) can read a number of configuration files which
-control its behavior and support for printers.  Each vendor platform has
-a default location for this information.  Xprt can also read the
-environment variable XPCONFIGDIR to locate alternate configuration
-directories.  Common settings include:
-
-   * export XPCONFIGDIR=/X11/lib/X11/XpConfig/
-
-   * export XPCONFIGDIR=/proj/x11/xc/programs/Xserver/XpConfig/
-
-Xprt has many built-in defaults, and lacking any configuration files,
-will immediately try to support all printers visible via lpstat(1).
-
-In order of importance for configuration by a system administrator, the
-configuration files for a "C" locale are as follows.
-
-   ${XPCONFIGDIR}/C/print/Xprinters
-
-	`Xprinters' is the top most configuration file.  It tells
-	Xprt which specific printer names (e.g.  mylaser) should
-	be supported, and whether lpstat(1) or other commands
-	should be used to automatically supplement the list of
-        printers.
-
-   ${XPCONFIGDIR}/C/print/attributes/printer
-
-	The `printer' file maps printer names to model
-	configurations (see `model-config' below).  For example,
-	"mylaser" could be mapped to a "HPDJ1600C", and all other
-	arbitrary printers could be mapped to a default, such as
-	"HPLJ4SI".  When depending on lpstat(1) in the Xprinters
-	file, setting up defaults in `printer' becomes all the
-        more important.
-
-   ${XPCONFIGDIR}/C/print/attributes/document
-
-	The `document' file specifies the initial document values
-	for any print jobs.  For example, which paper tray to
-	use, what default resolution, etc.
-
-   ${XPCONFIGDIR}/C/print/attributes/job
-
-	The `job' file specifies the initial job values for any
-	print jobs.  For example, "notification-profile" can be
-	set so that when a print job is successfully sent to a
-	printer, e-mail is sent to the user.
-
-   ${XPCONFIGDIR}/C/print/models/HPDJ1600C/model-config
-   ${XPCONFIGDIR}/C/print/models/HPDJ1600C/fonts/fonts.dir
-   ${XPCONFIGDIR}/C/print/models/HPDJ1600C/fonts/9nb00051.pmf
-   ${XPCONFIGDIR}/C/print/models/HPDJ1600C/fonts/9nb00093.pmf
-
-	The `model-config' file has attributes that describe the
-	printer model's capabilities and default settings.
-	Printer model fonts may also be present.  The model-config
-        file also identifies the print ddx driver to be used.
-
-	For each printer model supported, a complete hierarchy of
-	files should exist.  In most cases, these files do not
-	need to be modified.
-
-   ${XPCONFIGDIR}/C/print/ddx-config/raster/pcl
-   ${XPCONFIGDIR}/C/print/ddx-config/raster/postscript
-
-	The print ddx drivers can have highly specific
-	configuration files to control their behavior.  In most
-	cases, these files do not need to be modified.
-
-
-3.2  Starting the X Print Service
----------------------------------
-
-The summary checklist for starting the X Print Service is as follows:
-
-1. Choose an execution model for the X Print Service.  The X
-   Print Service can be run on a per-user session basis, per
-   machine basis, or can be run on a few machines globally
-   available to a number of users.
-
-2. If print jobs are to be submitted to a spooler (almost always
-   the case), make sure all needed printers are available to the
-   spooler subsystem (most often lp(1)) on the same machine
-   running the X Print Service.
-
-3. Configure the X Print Server.  See ``X Print Server
-   Configuration''.
-
-4. Depending on #1, start the X Print Server process "Xprt", and
-   then the Print Dialog Manager Daemon process "dtpdmd" at the
-   appropriate times.
-
-The details are described below.
-
-Because the X Print Service is based on X, it can be easily distributed.
-The most significant factors in which execution model to choose will be
-driven by:
-
-   * how many printers will be accessable through the printer
-     subsystem on any given machine.  A system administrator may
-     choose to cluster printers on a few given machines, or
-     scatter them across an organization and possibly make
-     extensive use of remote spoolers to make them globally
-     available.
-
-   * how many machines will need a copy of the X Print Server
-     configuration files.  The files have been architected so
-     that one super-set version of them can be maintained and
-     distributed (e.g.  via NFS), and a per-machine or per-user
-     version of the `Xprinters' is all that is needed to have the
-     appropriate information in them utilized or ignored.
-
-   * how many users can demand services from a given X Print
-     Service.
-
-With the above in mind, some obvious execution models include:
-
-   * Global - in this model, the system administrator is choosing
-     to run the X Print Service on a *few* select machines with
-     appropriate printers configured, and allow clients access to
-     the global resource.  This can centralize the administration
-     of printers and configuration files, but may have to be
-     monitored for performance loading.
-
-     Startup would likely be done by boot-up scripts.
-
-   * Per-machine - every machine with potential X Print Service
-     users would run the service.  Printer and configuration file
-     administration is decentralized, and usage would be limited
-     to the users on the machine.
-
-     Startup would likely be done by boot-up scripts.
-
-   * Per-user session - every user would run an entire X Print
-     Service for themselves.  In the future, the Video X Server
-     normally started may contain Print X Server capability, so
-     this model becomes very natural.
-
-     Startup would likely be done at session login or by
-     launching actions or processes manually once the user
-     logs in.  Note: the dtpdmd must be started after Xprt.
-
-Starting of the processes is straight forward.  In strict order:
-
-   [machineA] % Xprt [-XpFile <Xprinters file>] [:dispNum] &
-
-      Note that Xprt will look for configuration files in either
-      a default location or where XPCONFIGDIR points.
-
-      -XpFile specifies an alternate `Xprinters' file, rather
-      than the default one or `${XPCONFIGDIR}/C/print/Xprinters'.
-
-   [machineA] % dtpdmd -d machineA[:dispNum] [-l /tmp/dtpdmd.log] &
-
-      The dtpdmd will maintain an X-Selection on the X-Server,
-      and will start dtpdm's as required to service requests.
-
-In all but the per-user session model, the machine running the dtpdmd
-(thus dtpdm's) will need display authorization to the users video
-display.
-
-
-
-3.3  Configuring the environment
---------------------------------
-
-Once a X Print Server and dtpdmd have been started -- many of them
-in some cases -- clients will need to find and use them.  There are
-two mechanisms that allow clients to discover X Print Servers and
-printers.
-
-   * "X Print Specifier" - assuming usage of the DtPrint print
-     dialogs, the following notation is understood:
-
-          printer_name at machine[:dispNum]
-
-     For example:
-
-          colorlj7 at printhub:2
-
-     In the above example, the X Print Server running at `printhub:2'
-     is assumed to support the printer named `colorlj7'.
-
-   * "XPSERVERLIST" - assuming usage of the DtPrint print dialogs,
-     the environment variable "XPSERVERLIST" can contain a list
-     of X Print Servers.  For example:
-
-          XPSERVERLIST="printhub:2 printhub:3 otherdept:0"
-
-     Then in the dialogs, only a printer name needs to be entered.
-     The dialog will then search the X Print Servers in XPSERVERLIST
-     for a server than supports the printer, and then establish
-     contact.
-
-3.4  General End-User Sequence
-------------------------------
-
-From most CDEnext applications, printing is accomplished by bringing
-down the <File> menu and selecting <Print...>.  This will result in
-the DtPrintSetupBox dialog, which will request the name of a printer,
-and offer limited capability to configure print options (e.g. number
-of copies).  If the user wishes, they can select <Setup...>, which
-will start a dtpdm capable of modifying additional print options.
-Finally, the user should select <Print>.
-
-
-
-$Xorg: README,v 1.3 2000/08/17 19:48:02 cpqbld Exp $
diff --git a/hw/xprint/config/en_US/Makefile.am b/hw/xprint/config/en_US/Makefile.am
deleted file mode 100644
index 0390ed2..0000000
--- a/hw/xprint/config/en_US/Makefile.am
+++ /dev/null
@@ -1 +0,0 @@
-SUBDIRS = print
diff --git a/hw/xprint/config/en_US/print/Makefile.am b/hw/xprint/config/en_US/print/Makefile.am
deleted file mode 100644
index 0250033..0000000
--- a/hw/xprint/config/en_US/print/Makefile.am
+++ /dev/null
@@ -1 +0,0 @@
-SUBDIRS = attributes
diff --git a/hw/xprint/config/en_US/print/attributes/Makefile.am b/hw/xprint/config/en_US/print/attributes/Makefile.am
deleted file mode 100644
index 8a05004..0000000
--- a/hw/xprint/config/en_US/print/attributes/Makefile.am
+++ /dev/null
@@ -1,3 +0,0 @@
-xpcdir = @xpconfigdir@/en_US/print/attributes
-
-dist_xpc_DATA = document
diff --git a/hw/xprint/config/en_US/print/attributes/document b/hw/xprint/config/en_US/print/attributes/document
deleted file mode 100644
index 253c46b..0000000
--- a/hw/xprint/config/en_US/print/attributes/document
+++ /dev/null
@@ -1,13 +0,0 @@
-# $Xorg: document,v 1.2 2002/11/30 22:10:03 gisburn Exp $
-# Document DPA-Object initial attribute values for en_US(-like) locales
-#
-# Note that the defaults (for all locales) are set in
-# ${XPCONFIGDIR}/C/print/attributes/document
-# Values in ${XPCONFIGDIR}/${LANG}/print/attributes/document are used to
-# set/override these defaults for a specific locale on demand
-
-# US and some other countries use US-Letter as default paper size
-# ("C"-locale default is "ISO-A4")
-*default-medium: na-letter
-
-# EOF.
diff --git a/hw/xprint/ddxInit.c b/hw/xprint/ddxInit.c
deleted file mode 100644
index 7950521..0000000
--- a/hw/xprint/ddxInit.c
+++ /dev/null
@@ -1,390 +0,0 @@
-/*
-(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.
-*/
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#include <X11/X.h>
-#include <X11/Xos.h>
-#include <X11/Xproto.h>
-#include "windowstr.h"
-#include "servermd.h"
-#include "DiPrint.h"
-
-/*-
- *-----------------------------------------------------------------------
- * InitOutput --
- *	If this is built as a print-only server, then we must supply
- *      an InitOutput routine.  If a normal server's real ddx InitOutput
- *      is used, then it should call PrinterInitOutput if it so desires.
- *      The ddx-level hook is needed to allow the printer stuff to 
- *      create additional screens.  An extension can't reliably do
- *      this for two reasons:
- *
- *          1) If InitOutput doesn't create any screens, then main()
- *             exits before calling InitExtensions().
- *
- *          2) Other extensions may rely on knowing about all screens
- *             when they initialize, and we can't guarantee the order
- *             of extension initialization.
- *
- * Results:
- *	ScreenInfo filled in, and PrinterInitOutput is called to create
- *      the screens associated with printers.
- *
- * Side Effects:
- *	None
- *
- *-----------------------------------------------------------------------
- */
-
-void 
-InitOutput(
-    ScreenInfo   *pScreenInfo,
-    int          argc,
-    char         **argv)
-
-{
-    pScreenInfo->imageByteOrder = IMAGE_BYTE_ORDER;
-    pScreenInfo->bitmapScanlineUnit = BITMAP_SCANLINE_UNIT;
-    pScreenInfo->bitmapScanlinePad = BITMAP_SCANLINE_PAD;
-    pScreenInfo->bitmapBitOrder = BITMAP_BIT_ORDER;
-
-    pScreenInfo->numPixmapFormats = 0; /* get them in PrinterInitOutput */
-    screenInfo.numVideoScreens = 0;
-    
-#ifdef PRINT_ONLY_SERVER
-    PrinterInitOutput(pScreenInfo, argc, argv);
-#endif
-
-}
-
-void
-DDXRingBell(int volume, int pitch, int duration)
-{
-   /* dummy func; link fails without */
-}
-
-static void
-BellProc(
-    int volume,
-    DeviceIntPtr pDev)
-{
-    return;
-}
-
-static void
-KeyControlProc(
-    DeviceIntPtr pDev,
-    KeybdCtrl *ctrl)
-{
-    return;
-}
-
-static KeySym printKeyMap[256];
-static CARD8 printModMap[256];
-
-static int
-KeyboardProc(
-    DevicePtr pKbd,
-    int what,
-    int argc,
-    char *argv[])
-{
-    KeySymsRec keySyms;
-
-    keySyms.minKeyCode = 8;
-    keySyms.maxKeyCode = 8;
-    keySyms.mapWidth = 1;
-    keySyms.map = printKeyMap;
-
-    switch(what)
-    {
-	case DEVICE_INIT:
-	    InitKeyboardDeviceStruct(pKbd, &keySyms, printModMap, 
-				     (BellProcPtr)BellProc,
-				     KeyControlProc);
-	    break;
-	case DEVICE_ON:
-	    break;
-	case DEVICE_OFF:
-	    break;
-	case DEVICE_CLOSE:
-	    break;
-    }
-    return Success;
-}
-
-#include "../mi/mipointer.h"
-static int
-PointerProc(
-     DevicePtr pPtr,
-     int what,
-     int argc,
-     char *argv[])
-{
-#define NUM_BUTTONS 1
-    CARD8 map[NUM_BUTTONS];
-
-    switch(what)
-      {
-        case DEVICE_INIT:
-	  {
-	      map[0] = 0;
-	      InitPointerDeviceStruct(pPtr, map, NUM_BUTTONS, 
-				      GetMotionHistory,
-				      (PtrCtrlProcPtr)_XpVoidNoop,
-				      GetMotionHistorySize(), 2);
-	      break;
-	  }
-        case DEVICE_ON:
-	  break;
-        case DEVICE_OFF:
-	  break;
-        case DEVICE_CLOSE:
-	  break;
-      }
-    return Success;
-}
-
-void
-InitInput(
-     int       argc,
-     char **argv)
-{
-    DeviceIntPtr ptr, kbd;
-
-    ptr = AddInputDevice((DeviceProc)PointerProc, TRUE);
-    kbd = AddInputDevice((DeviceProc)KeyboardProc, TRUE);
-    RegisterPointerDevice(ptr);
-    RegisterKeyboardDevice(kbd);
-    return;
-}
-
-
-Bool
-LegalModifier(
-     unsigned int key,
-     DeviceIntPtr dev)
-{
-    return TRUE;
-}
-
-void
-ProcessInputEvents(void)
-{
-}
-
-#ifdef __APPLE__
-#include "micmap.h"
-
-void GlxExtensionInit(void);
-void GlxWrapInitVisuals(miInitVisualsProcPtr *procPtr);
-
-void
-DarwinHandleGUI(int argc, char *argv[])
-{
-}
-
-void DarwinGlxExtensionInit(void)
-{
-    GlxExtensionInit();
-}
-
-void DarwinGlxWrapInitVisuals(
-    miInitVisualsProcPtr *procPtr)
-{
-    GlxWrapInitVisuals(procPtr);
-}
-#endif
-
-#ifdef DDXOSINIT
-void
-OsVendorInit(void)
-{
-}
-#endif
-
-#ifdef DDXOSFATALERROR
-void
-OsVendorFatalError(void)
-{
-}
-#endif
-
-#ifdef DDXBEFORERESET
-void
-ddxBeforeReset(void)
-{
-    return;
-}
-#endif
-
-/* ddxInitGlobals - called by |InitGlobals| from os/util.c */
-void ddxInitGlobals(void)
-{
-    PrinterInitGlobals();
-}
-
-/****************************************
-* ddxUseMsg()
-*
-* Called my usemsg from os/utils/c
-*
-*****************************************/
-
-void ddxUseMsg(void)
-{
-}
-
-void AbortDDX (void)
-{
-}
-
-void ddxGiveUp(void)	/* Called by GiveUp() */
-{
-}
-
-int
-ddxProcessArgument (
-    int argc,
-    char *argv[],
-    int i)
-{
-    return(0);
-}
-
-#ifdef XINPUT
-
-#include <X11/extensions/XI.h>
-#include <X11/extensions/XIproto.h>
-#include "XIstubs.h"
-#include "exglobals.h"
-
-/* Place dummy config functions here instead of config/config.c, 
-   since Xprint does not use D-BUS */
-void config_init() { }
-void config_fini() { }
-
-
-int
-ChangePointerDevice (
-    DeviceIntPtr       old_dev,
-    DeviceIntPtr       new_dev,
-    unsigned char      x,
-    unsigned char      y)
-{
-        return (BadDevice);
-}
-
-int
-ChangeDeviceControl (
-    register    ClientPtr       client,
-    DeviceIntPtr dev,
-    xDeviceCtl  *control)
-{
-    return BadMatch;
-}
-
-int
-NewInputDeviceRequest(InputOption *options, DeviceIntPtr *pdev)
-{
-    return BadValue;
-}
-
-void
-DeleteInputDeviceRequest(DeviceIntPtr dev)
-{
-}
-
-void
-OpenInputDevice (
-    DeviceIntPtr dev,
-    ClientPtr client,
-    int *status)
-{
-    return;
-}
-
-void
-AddOtherInputDevices (void)
-{
-    return;
-}
-
-void
-CloseInputDevice (
-    DeviceIntPtr        dev,
-    ClientPtr           client)
-{
-    return;
-}
-
-int
-ChangeKeyboardDevice (
-    DeviceIntPtr        old_dev,
-    DeviceIntPtr        new_dev)
-{
-    return (Success);
-}
-
-int
-SetDeviceMode (
-    register    ClientPtr       client,
-    DeviceIntPtr dev,
-    int         mode)
-{
-    return BadMatch;
-}
-
-int
-SetDeviceValuators (
-    register    ClientPtr       client,
-    DeviceIntPtr dev,
-    int         *valuators,
-    int         first_valuator,
-    int         num_valuators)
-{
-    return BadMatch;
-}
-
-
-#endif /* XINPUT */
-
-#ifdef AIXV3
-/*
- * This is just to get the server to link on AIX, where some bits
- * that should be in os/ are instead in hw/ibm.
- */
-int SelectWaitTime = 10000; /* usec */
-#endif
diff --git a/hw/xprint/doc/Makefile.am b/hw/xprint/doc/Makefile.am
deleted file mode 100644
index c0cb9d3..0000000
--- a/hw/xprint/doc/Makefile.am
+++ /dev/null
@@ -1,19 +0,0 @@
-MAN_SRCS = Xprt.man.pre
-
-appmandir = $(APP_MAN_DIR)
-
-appman_PRE = Xprt.man
-appman_DATA = $(appman_PRE:man=@APP_MAN_SUFFIX@)
-
-include $(top_srcdir)/cpprules.in
-
-BUILT_SOURCES = $(appman_PRE)
-CLEANFILES = $(appman_PRE) $(appman_DATA)
-
-SUFFIXES += .$(APP_MAN_SUFFIX) .man
-
-.man.$(APP_MAN_SUFFIX):
-	-rm -f $@
-	$(LN_S) $< $@
-
-EXTRA_DIST = $(MAN_SRCS) Xprt.html Xprt.sgml
diff --git a/hw/xprint/doc/Xprt.html b/hw/xprint/doc/Xprt.html
deleted file mode 100644
index 2aa0c9e..0000000
--- a/hw/xprint/doc/Xprt.html
+++ /dev/null
@@ -1,115 +0,0 @@
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Xprt</title><meta name="generator" content="DocBook XSL Stylesheets V1.62.4"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" lang="en"><a name="Xprt"></a><div class="titlepage"><div></div><div></div></div><div class="refnamediv"><h2>Name</h2><p>Xprt &#8212; Print server for X Version 11</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><tt class="command">Xprt</tt>  [<tt class="option">-ac</tt>] [<tt class="option">-audit <i class="replaceable"><tt>level</tt></i></tt>] [<tt class="option">-pn</tt>] [<tt class="option">-fp <i class="replaceable"><tt>fontpath</tt></i></tt>] [<tt class="option">-XpFile <i class="replaceable"><tt>file</tt></i></tt>] [<tt class="option">-XpSpoolerType <i class="replaceable"><tt>spoolername</tt></i></tt>] [<tt class="option">:<i class="replaceable"><tt>display</tt></i></tt>]</p></div></div><div class="refsect1" lang="en"><a name="id2804962"></a><h2>DESCRIPTION</h2><p><span><b class="command">Xprt</b></span> is the Xprint print server
-      for version 11 of the X Window system for non display devices
-      such as printers and fax machines.</p><p>Xprint is an advanced printing system which enables X11
-      applications to use devices like printers, FAX or create
-      documents in formats like PostScript, PCL or PDF.  It may be used by
-      clients such as <span class="application">mozilla</span>.
-    </p><p>Xprint is a very flexible, extensible, scalable, client/server
-     print system based on ISO 10175 (and some other specs) and the X11        
-     rendering protocol.                                                       
-     Using Xprint an application can search, query and use devices like        
-     printers, FAX machines or create documents in formats like PDF.           
-     In particular, an application can seek a printer, query supported         
-     attributes (like paper size, trays, fonts etc.), configure the printer    
-     device to match it's needs and print on it like on any other X device     
-     reusing parts of the code which is used for the video card Xserver.
-    </p></div><div xmlns:ns1="" class="refsect1" lang="en"><a name="id2805117"></a><h2>USAGE</h2><p>
-      Although Xprt may be invoked from the command line, it is
-      preferable to run it as a daemon via the init script
-      <tt class="filename">/etc/init.d/xprint</tt> (where this script exists).
-    </p><p>Client programs such as mozilla will require environment
-      variable <tt class="envar">${XPSERVERLIST}</tt> to be set, identifying the
-      &quot;display&quot; on which Xprt is running.  This variable may be set
-      for all users via <tt class="filename">/etc/profile</tt> (or similar), using
-      <b class="userinput"><tt>/etc/init.d/xprint get_xpserverlist</tt></b>:
-      </p><div class="informalexample"><pre class="programlisting">export XPSERVERLIST=`/etc/init.d/xprint get_xpserverlist`</pre></div></div><div class="refsect1" lang="en"><a name="id2805150"></a><h2>OPTIONS</h2><p>Many of Xprt's command line options are shared in common
-    with the usual X servers (see <span class="citerefentry"><span class="refentrytitle">Xserver</span>(1x)</span>).
-    Commonly used options include:</p><div class="variablelist"><dl><dt><span class="term"><tt class="option">:<i class="replaceable"><tt>display</tt></i></tt></span></dt><dd><p> The X server runs on the given display. If multiple X
-               servers are to run simultaneously on a host, each must
-               have a unique display number.  Note that the standard X
-               server (for video displays) typically runs on display
-               :0.  If <tt class="filename">/etc/init.d/xprint</tt> is used
-               to invoke Xprt, it may be configured to automatically assign an available
-               display number.</p></dd><dt><span class="term"><tt class="option">-ac</tt></span></dt><dd><p>disables host-based access control mechanisms.  Enables  access
-               by  any host, and permits any host to modify the access control
-               list.  Use with extreme caution.  This option exists  primarily
-               for running test suites remotely.</p></dd><dt><span class="term"><tt class="option">-audit <i class="replaceable"><tt>level</tt></i></tt></span></dt><dd><p>sets  the  audit  trail level.  The default level is 1, meaning
-               only connection rejections are reported.  Level 2  additionally
-               reports  all  successful  connections and disconnects.  Level 4
-               enables messages  from  the  SECURITY  extension,  if  present,
-               including  generation  and  revocation  of  authorizations  and
-               violations of the security policy.  Level 0 turns off the audit
-               trail.  Audit lines are sent as standard error output.</p></dd><dt><span class="term"><tt class="option">-fp <i class="replaceable"><tt>fontpath</tt></i></tt></span></dt><dd><p>sets the search path for fonts.  This path is a comma
-               separated list of directories which Xprt searches for
-               font databases.</p></dd><dt><span class="term"><tt class="option">-pn</tt></span></dt><dd><p>permits the server to continue running if it fails to
-               establish all of its well-known sockets (connection
-               points for clients), but establishes at least
-               one.</p></dd><dt><span class="term"><tt class="option">-XpFile <i class="replaceable"><tt>file</tt></i></tt></span></dt><dd><p>Sets an alternate Xprinters file (see section FILES).</p></dd><dt><span class="term"><tt class="option">-XpSpoolerType <i class="replaceable"><tt>spoolername</tt></i></tt></span></dt><dd xmlns:ns2=""><p>
-            Defines the spooler system to be used for print job spooling.
-            Supported values in xprint.mozdev.org release 009 are:
-            </p><table class="simplelist" border="0" summary="Simple list"><tr><td>aix</td></tr><tr><td>aix4</td></tr><tr><td>bsd</td></tr><tr><td>osf</td></tr><tr><td>solaris</td></tr><tr><td>sysv</td></tr><tr><td>uxp</td></tr><tr><td>cups</td></tr><tr><td>lprng</td></tr><tr><td>other</td></tr><tr><td>none</td></tr></table><p>
-            (multiple values can be specified, separated by ':', the first active spooler will be chosen).
-            The default value is platform-specific and can be obtained via
-            </p><pre class="programlisting">Xprt -h</pre><p>.
-          </p></dd></dl></div></div><div xmlns:ns3="" class="refsect1" lang="en"><a name="id2805336"></a><h2>ENVIRONMENT</h2><p>
-      The following environment variables are recognized by the X print server
-      (environment variables recognized by Xprint clients are described in 
-      <span class="citerefentry"><span class="refentrytitle">Xprint</span>(7)</span>):
-
-      </p><div class="variablelist"><dl><dt><span class="term"><tt class="envar">${XPCONFIGDIR}</tt></span></dt><dd><p> This environment variable points to the  root
-	      of  the Xprint server configuration directory hierarchy.
-	      If the variable is not defined,  the  default
-	      path  is be assumed.  The default path may be
-              <tt class="filename">/usr/X11R6/lib/X11/xserver/</tt>, 
-              <tt class="filename">/usr/lib/X11/xserver/</tt>,
-              <tt class="filename">/usr/share/Xprint/xserver/</tt> or
-              <tt class="filename">/usr/openwin/server/etc/XpConfig</tt>, depending on the
-	      system, and may be configured in <tt class="filename">/etc/init.d/xprint</tt>.</p></dd><dt><span class="term"><tt class="envar">${LANG}</tt></span></dt><dd><p>
-              This environment variable selects the locale settings used by the Xprint server.
-              Xprt allows language-specific settings (stored in <tt class="filename">${XPCONFIGDIR}/${LANG}/print/</tt>)
-              which will override the default settings (stored in <tt class="filename">${XPCONFIGDIR}/C/print/</tt>).
-              If <tt class="envar">${LANG}</tt> is not set &quot;C&quot; is assumed.
-            </p></dd></dl></div></div><div class="refsect1" lang="en"><a name="id2805421"></a><h2>FILES</h2><div class="variablelist"><dl><dt><span class="term"><tt class="filename">${XPCONFIGDIR}/${LANG}/print/Xprinters</tt>, </span><span class="term"><tt class="filename">${XPCONFIGDIR}/C/print/Xprinters</tt></span></dt><dd><p>
-            `Xprinters' is the top most configuration file.  It tells
-            Xprt which specific printer names (e.g.  mylaser) should
-            be supported, and whether <span class="citerefentry"><span class="refentrytitle">lpstat</span>(1)</span> or other commands
-            should be used to automatically supplement the list of
-            printers.
-          </p></dd><dt><span class="term"><tt class="filename">${XPCONFIGDIR}/${LANG}/print/attributes/printer</tt>, </span><span class="term"><tt class="filename">${XPCONFIGDIR}/C/print/attributes/printer</tt></span></dt><dd><p>
-            The `printer' file maps printer names to model
-            configurations (see `model-config' below).  For example,
-            &quot;mylaser&quot; could be mapped to a &quot;HPDJ1600C&quot;, and all other
-            arbitrary printers could be mapped to a default, such as
-            &quot;HPLJ4SI&quot;.  When depending on <span class="citerefentry"><span class="refentrytitle">lpstat</span>(1)</span> in the Xprinters
-            file, setting up defaults in `printer' becomes all the
-            more important.
-          </p></dd><dt><span class="term"><tt class="filename">${XPCONFIGDIR}/${LANG}/print/attributes/document</tt>, </span><span class="term"><tt class="filename">${XPCONFIGDIR}/C/print/attributes/document</tt></span></dt><dd><p>
-            The `document' file specifies the initial document values
-            for any print jobs.  For example, which paper tray to
-            use, what default resolution, etc.
-          </p></dd><dt><span class="term"><tt class="filename">${XPCONFIGDIR}/${LANG}/print/attributes/job</tt>, </span><span class="term"><tt class="filename">${XPCONFIGDIR}/C/print/attributes/job</tt></span></dt><dd><p>
-            The `job' file specifies the initial job values for any
-            print jobs.  For example, &quot;notification-profile&quot; can be
-            set so that when a print job is successfully sent to a
-            printer, e-mail is sent to the user.
-          </p></dd><dt><span class="term"><tt class="filename">${XPCONFIGDIR}/C/print/models/PSdefault/model-config</tt>, </span><span class="term"><tt class="filename">${XPCONFIGDIR}/C/print/models/PSdefault/fonts/fonts.dir</tt>, </span><span class="term"><tt class="filename">${XPCONFIGDIR}/C/print/models/PSdefault/fonts/9nb00051.pmf</tt>, </span><span class="term"><tt class="filename">${XPCONFIGDIR}/C/print/models/PSdefault/fonts/9nb00093.pmf</tt></span></dt><dd><p>
-            The `model-config' file has attributes that describe the
-            printer model's capabilities and default settings.
-            Printer model fonts may also be present.  The model-config
-            file also identifies the print ddx driver to be used.
-
-            For each printer model supported, a complete hierarchy of
-            files should exist.  In most cases, these files do not
-            need to be modified.
-          </p></dd><dt><span class="term"><tt class="filename">${XPCONFIGDIR}/C/print/ddx-config/raster/pdf</tt>, </span><span class="term"><tt class="filename">${XPCONFIGDIR}/C/print/ddx-config/raster/pcl</tt>, </span><span class="term"><tt class="filename">${XPCONFIGDIR}/C/print/ddx-config/raster/postscript</tt></span></dt><dd><p>
-            The print ddx drivers can have highly specific
-            configuration files to control their behavior.  In most
-            cases, these files do not need to be modified.
-          </p></dd></dl></div></div><div class="refsect1" lang="en"><a name="id2805584"></a><h2>SEE ALSO</h2><p><span class="simplelist"><span class="citerefentry"><span class="refentrytitle">Xprint</span>(7)</span>, <span class="citerefentry"><span class="refentrytitle">X11</span>(7)</span>, <span class="citerefentry"><span class="refentrytitle">xplsprinters</span>(1x)</span>, <span class="citerefentry"><span class="refentrytitle">xprehashprinterlist</span>(1x)</span>, <span class="citerefentry"><span class="refentrytitle">xphelloworld</span>(1x)</span>, <span class="citerefentry"><span class="refentrytitle">xpxmhelloworld</span>(1x)</span>, <span class="citerefentry"><span class="refentrytitle">xpawhelloworld</span>(1x)</span>, <span class="citerefentry"><span class="refentrytitle">xpxthelloworld</span>(1x)</span>, <span class="citerefentry"><span class="refentrytitle">xpsimplehelloworld</span>(1x)</span>, <span class="citerefentry"><span class="refentrytitle">Xserver</span>(1x)</span>, <span class="citerefentry"><span class="refentrytitle">libXp</span>(3x)</span>, <span class="citerefentry"><span class="refentrytitle">libXprintUtils</span>(3x)</span>, <span class="citerefentry"><span class="refentrytitle">libXprintAppUtils</span>(3x)</span>, <span class="citerefentry"><span class="refentrytitle">XmPrintShell</span>(3x)</span>, <span class="citerefentry"><span class="refentrytitle">XawPrintShell</span>(3x)</span>, Xprint FAQ (<a href="http://xprint.mozdev.org/docs/Xprint_FAQ.html" target="_top">http://xprint.mozdev.org/docs/Xprint_FAQ.html</a>), Xprint main site (<a href="http://xprint.mozdev.org/" target="_top">http://xprint.mozdev.org/</a>)</span></p></div><div class="refsect1" lang="en"><a name="id2805757"></a><h2>AUTHORS</h2><p>
-      This manual page was written by 
-      Drew Parsons <tt class="email">&lt;<a href="mailto:dparsons at debian.org">dparsons at debian.org</a>&gt;</tt> and
-      Roland Mainz <tt class="email">&lt;<a href="mailto:roland.mainz at nrubsig.org">roland.mainz at nrubsig.org</a>&gt;</tt>,
-      with some help from the man page at
-      <a href="http://www.sins.com.au/unix/manpages/Xprt.html" target="_top">http://www.sins.com.au/unix/manpages/Xprt.html</a> and the XFree86
-      man page for <span class="citerefentry"><span class="refentrytitle">Xserver</span>(1)</span>.
-    </p></div></div></body></html>
diff --git a/hw/xprint/doc/Xprt.man.pre b/hw/xprint/doc/Xprt.man.pre
deleted file mode 100644
index 837619c..0000000
--- a/hw/xprint/doc/Xprt.man.pre
+++ /dev/null
@@ -1,196 +0,0 @@
-.\" -*- coding: us-ascii -*-
-.TH Xprt __appmansuffix__ "25 November 2004"  
-.SH NAME
-Xprt \- Print server for X Version 11
-.SH SYNOPSIS
-.ad l
-\fBXprt\fR \kx
-.if (\nxu > (\n(.lu / 2)) .nr x (\n(.lu / 5)
-'in \n(.iu+\nxu
-[\fB\-ac\fR] [\fB\-audit \fBlevel\fR\fR] [\fB\-pn\fR] [\fB\-fp \fBfontpath\fR\fR] [\fB\-XpFile \fBfile\fR\fR] [\fB\-XpSpoolerType \fBspoolername\fR\fR] [\fB:\fBdisplay\fR\fR]
-'in \n(.iu-\nxu
-.ad b
-.SH DESCRIPTION
-Xprt is the Xprint print server
-for version 11 of the X Window system for non display devices
-such as printers and fax machines.
-.PP
-Xprint is an advanced printing system which enables X11
-applications to use devices like printers, FAX or create
-documents in formats like PostScript, PCL or PDF. It may be used by
-clients such as mozilla.
-.PP
-Xprint is a very flexible, extensible, scalable, client/server
-print system based on ISO 10175 (and some other specs) and the X11 
-rendering protocol. 
-Using Xprint an application can search, query and use devices like 
-printers, FAX machines or create documents in formats like PDF. 
-In particular, an application can seek a printer, query supported 
-attributes (like paper size, trays, fonts etc.), configure the printer 
-device to match it's needs and print on it like on any other X device 
-reusing parts of the code which is used for the video card Xserver.
-.SH USAGE
-Although Xprt may be invoked from the command line, it is
-preferable to run it as a daemon via the init script
-\fB/etc/init.d/xprint\fR (where this script exists).
-.PP
-Client programs such as mozilla will require environment
-variable \fB${XPSERVERLIST}\fR to be set, identifying the
-"display" on which Xprt is running. This variable may be set
-for all users via \fB/etc/profile\fR (or similar), using
-\fB/etc/init.d/xprint get_xpserverlist\fR:
-
-.nf
-export XPSERVERLIST=`/etc/init.d/xprint get_xpserverlist`
-.fi
-
-.SH OPTIONS
-Many of Xprt's command line options are shared in common
-with the usual X servers (see \fBXserver\fR(__appmansuffix__)).
-Commonly used options include:
-.TP 
-\fB:\fIdisplay\fB\fR 
-The X server runs on the given display. If multiple X
-servers are to run simultaneously on a host, each must
-have a unique display number. Note that the standard X
-server (for video displays) typically runs on display
-:0. If \fB/etc/init.d/xprint\fR is used
-to invoke Xprt, it may be configured to automatically assign an available
-display number.
-.TP 
-\fB\-ac\fR 
-disables host-based access control mechanisms. Enables access
-by any host, and permits any host to modify the access control
-list. Use with extreme caution. This option exists primarily
-for running test suites remotely.
-.TP 
-\fB\-audit \fIlevel\fB\fR 
-sets the audit trail level. The default level is 1, meaning
-only connection rejections are reported. Level 2 additionally
-reports all successful connections and disconnects. Level 4
-enables messages from the SECURITY extension, if present,
-including generation and revocation of authorizations and
-violations of the security policy. Level 0 turns off the audit
-trail. Audit lines are sent as standard error output.
-.TP 
-\fB\-fp \fIfontpath\fB\fR 
-sets the search path for fonts. This path is a comma
-separated list of directories which Xprt searches for
-font databases.
-.TP 
-\fB\-pn\fR 
-permits the server to continue running if it fails to
-establish all of its well-known sockets (connection
-points for clients), but establishes at least
-one.
-.TP 
-\fB\-XpFile \fIfile\fB\fR 
-Sets an alternate Xprinters file (see section FILES).
-.TP 
-\fB\-XpSpoolerType \fIspoolername\fB\fR 
-Defines the spooler system to be used for print job spooling.
-Supported values in xprint.mozdev.org release 009 are:
-
-aix
-
-aix4
-
-bsd
-
-osf
-
-solaris
-
-sysv
-
-uxp
-
-cups
-
-lprng
-
-other
-
-none
-
-(multiple values can be specified, separated by ':', the first active spooler will be chosen).
-The default value is platform-specific and can be obtained via
-
-.nf
-Xprt \-h
-.fi
-
-\&.
-.SH ENVIRONMENT
-The following environment variables are recognized by the X print server
-(environment variables recognized by Xprint clients are described in 
-\fBXprint\fR(__miscmansuffix__)):
-.TP 
-\fB${XPCONFIGDIR}\fR
-This environment variable points to the root
-of the Xprint server configuration directory hierarchy.
-If the variable is not defined, the default
-path is be assumed. The default path may be
-\fB/usr/X11R6/lib/X11/xserver/\fR, 
-\fB/usr/lib/X11/xserver/\fR,
-\fB/usr/share/Xprint/xserver/\fR or
-\fB/usr/openwin/server/etc/XpConfig\fR, depending on the
-system, and may be configured in \fB/etc/init.d/xprint\fR.
-.TP 
-\fB${LANG}\fR
-This environment variable selects the locale settings used by the Xprint server.
-Xprt allows language-specific settings (stored in \fB${XPCONFIGDIR}/${LANG}/print/\fR)
-which will override the default settings (stored in \fB${XPCONFIGDIR}/C/print/\fR).
-If \fB${LANG}\fR is not set "C" is assumed.
-.PP
-.SH FILES
-.TP 
-\fB${XPCONFIGDIR}/${LANG}/print/Xprinters\fR, \fB${XPCONFIGDIR}/C/print/Xprinters\fR
-`Xprinters' is the top most configuration file. It tells
-Xprt which specific printer names (e.g. mylaser) should
-be supported, and whether \fBlpstat\fR(1) or other commands
-should be used to automatically supplement the list of
-printers.
-.TP 
-\fB${XPCONFIGDIR}/${LANG}/print/attributes/printer\fR, \fB${XPCONFIGDIR}/C/print/attributes/printer\fR
-The `printer' file maps printer names to model
-configurations (see `model-config' below). For example,
-"mylaser" could be mapped to a "HPDJ1600C", and all other
-arbitrary printers could be mapped to a default, such as
-"HPLJ4SI". When depending on \fBlpstat\fR(1) in the Xprinters
-file, setting up defaults in `printer' becomes all the
-more important.
-.TP 
-\fB${XPCONFIGDIR}/${LANG}/print/attributes/document\fR, \fB${XPCONFIGDIR}/C/print/attributes/document\fR
-The `document' file specifies the initial document values
-for any print jobs. For example, which paper tray to
-use, what default resolution, etc.
-.TP 
-\fB${XPCONFIGDIR}/${LANG}/print/attributes/job\fR, \fB${XPCONFIGDIR}/C/print/attributes/job\fR
-The `job' file specifies the initial job values for any
-print jobs. For example, "notification-profile" can be
-set so that when a print job is successfully sent to a
-printer, e-mail is sent to the user.
-.TP 
-\fB${XPCONFIGDIR}/C/print/models/PSdefault/model\-config\fR, \fB${XPCONFIGDIR}/C/print/models/PSdefault/fonts/fonts.dir\fR, \fB${XPCONFIGDIR}/C/print/models/PSdefault/fonts/9nb00051.pmf\fR, \fB${XPCONFIGDIR}/C/print/models/PSdefault/fonts/9nb00093.pmf\fR
-The `model-config' file has attributes that describe the
-printer model's capabilities and default settings.
-Printer model fonts may also be present. The model-config
-file also identifies the print ddx driver to be used.
-For each printer model supported, a complete hierarchy of
-files should exist. In most cases, these files do not
-need to be modified.
-.TP 
-\fB${XPCONFIGDIR}/C/print/ddx\-config/raster/pdf\fR, \fB${XPCONFIGDIR}/C/print/ddx\-config/raster/pcl\fR, \fB${XPCONFIGDIR}/C/print/ddx\-config/raster/postscript\fR
-The print ddx drivers can have highly specific
-configuration files to control their behavior. In most
-cases, these files do not need to be modified.
-.SH "SEE ALSO"
-\fBXprint\fR(__miscmansuffix__), \fBX11\fR(__miscmansuffix__), \fBxplsprinters\fR(__appmansuffix__), \fBxprehashprinterlist\fR(__appmansuffix__), \fBxphelloworld\fR(__appmansuffix__), \fBxpxmhelloworld\fR(__appmansuffix__), \fBxpawhelloworld\fR(__appmansuffix__), \fBxpxthelloworld\fR(__appmansuffix__), \fBxpsimplehelloworld\fR(__appmansuffix__), \fBXserver\fR(__appmansuffix__), \fBlibXp\fR(__libmansuffix__), \fBlibXprintUtils\fR(__libmansuffix__), \fBlibXprintAppUtils\fR(__libmansuffix__), \fBXmPrintShell\fR(__libmansuffix__), \fBXawPrintShell\fR(__libmansuffix__), Xprint FAQ (http://xprint.mozdev.org/docs/Xprint_FAQ.html), Xprint main site (http://xprint.mozdev.org/)
-.SH AUTHORS
-This manual page was written by 
-Drew Parsons <dparsons at debian.org> and
-Roland Mainz <roland.mainz at nrubsig.org>,
-with some help from the man page at
-http://www.sins.com.au/unix/manpages/Xprt.html and the XFree86
-man page for \fBXserver\fR(1).
diff --git a/hw/xprint/doc/Xprt.sgml b/hw/xprint/doc/Xprt.sgml
deleted file mode 100644
index a624992..0000000
--- a/hw/xprint/doc/Xprt.sgml
+++ /dev/null
@@ -1,371 +0,0 @@
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.2//EN" 'http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd'>
-
-<!-- Process this file with docbook-to-man to generate an nroff manual
-     page: 'docbook-to-man manpage.sgml > manpage.1'.  You may view
-     the manual page with: 'docbook-to-man manpage.sgml | nroff -man | less'. 
-     A typical entry in a Makefile or Makefile.am is:
-
-manpage.1: manpage.sgml
-        docbook-to-man $< > $@
-
-HTML generation can be done like this:
-% xsltproc ==docbook /usr/share/sgml/docbook/docbook-xsl-stylesheets-1.60.1/html/docbook.xsl Xprint.sgml >Xprint.html
-  -->
-
-<refentry id="Xprt">
-  <refmeta>
-    <refentrytitle>Xprt</refentrytitle>
-    <manvolnum>__appmansuffix__</manvolnum>
-  </refmeta>
-  <refnamediv>
-    <refname>Xprt</refname>
-
-    <refpurpose>Print server for X Version 11</refpurpose>
-  </refnamediv>
-  <refsynopsisdiv>
-    <cmdsynopsis>
-      <command>Xprt</command>
-
-      <arg><option>-ac</option></arg>
-
-      <arg><option>-audit <replaceable>level</replaceable></option></arg>
-
-      <arg><option>-pn</option></arg>
-
-      <arg><option>-fp <replaceable>fontpath</replaceable></option></arg>
-
-      <arg><option>-XpFile <replaceable>file</replaceable></option></arg>
-
-      <arg><option>-XpSpoolerType <replaceable>spoolername</replaceable></option></arg>
-
-      <arg><option>:<replaceable>display</replaceable></option></arg>
-
-    </cmdsynopsis>
-  </refsynopsisdiv>
-  <refsect1>
-    <title>DESCRIPTION</title>
-
-    <para><command>Xprt</command> is the Xprint print server
-      for version 11 of the X Window system for non display devices
-      such as printers and fax machines.</para>
-
-    <para>Xprint is an advanced printing system which enables X11
-      applications to use devices like printers, FAX or create
-      documents in formats like PostScript, PCL or PDF.  It may be used by
-      clients such as <application>mozilla</application>.
-    </para>
-
-    <para>Xprint is a very flexible, extensible, scalable, client/server
-     print system based on ISO 10175 (and some other specs) and the X11        
-     rendering protocol.                                                       
-     Using Xprint an application can search, query and use devices like        
-     printers, FAX machines or create documents in formats like PDF.           
-     In particular, an application can seek a printer, query supported         
-     attributes (like paper size, trays, fonts etc.), configure the printer    
-     device to match it's needs and print on it like on any other X device     
-     reusing parts of the code which is used for the video card Xserver.
-    </para>
-  </refsect1>
-
-  <refsect1>
-    <title>USAGE</title>
-
-    <para>
-      Although Xprt may be invoked from the command line, it is
-      preferable to run it as a daemon via the init script
-      <filename>/etc/init.d/xprint</filename> (where this script exists).
-    </para>
-
-    <para>Client programs such as mozilla will require environment
-      variable <envar>${XPSERVERLIST}</envar> to be set, identifying the
-      "display" on which Xprt is running.  This variable may be set
-      for all users via <filename>/etc/profile</filename> (or similar), using
-      <userinput>/etc/init.d/xprint get_xpserverlist</userinput>:
-      <informalexample>
-	<programlisting>export XPSERVERLIST=`/etc/init.d/xprint get_xpserverlist`</programlisting>
-      </informalexample>
-    </para>
-  </refsect1>
-
-  <refsect1>
-    <title>OPTIONS</title>
-
-    <para>Many of Xprt's command line options are shared in common
-    with the usual X servers (see <citerefentry><refentrytitle>Xserver</refentrytitle><manvolnum>__appmansuffix__</manvolnum></citerefentry>).
-    Commonly used options include:</para>
-
-    <variablelist>
-      <varlistentry>
-        <term><option>:<replaceable>display</replaceable></option>
-        </term>
-        <listitem>
-          <para> The X server runs on the given display. If multiple X
-               servers are to run simultaneously on a host, each must
-               have a unique display number.  Note that the standard X
-               server (for video displays) typically runs on display
-               :0.  If <filename>/etc/init.d/xprint</filename> is used
-               to invoke Xprt, it may be configured to automatically assign an available
-               display number.</para>
-        </listitem>
-      </varlistentry>
-      <varlistentry>
-        <term><option>-ac</option>
-        </term>
-        <listitem>
-          <para>disables host-based access control mechanisms.  Enables  access
-               by  any host, and permits any host to modify the access control
-               list.  Use with extreme caution.  This option exists  primarily
-               for running test suites remotely.</para>
-        </listitem>
-      </varlistentry>
-      <varlistentry>
-        <term><option>-audit <replaceable>level</replaceable></option>
-        </term>
-        <listitem>
-          <para>sets  the  audit  trail level.  The default level is 1, meaning
-               only connection rejections are reported.  Level 2  additionally
-               reports  all  successful  connections and disconnects.  Level 4
-               enables messages  from  the  SECURITY  extension,  if  present,
-               including  generation  and  revocation  of  authorizations  and
-               violations of the security policy.  Level 0 turns off the audit
-               trail.  Audit lines are sent as standard error output.</para>
-        </listitem>
-      </varlistentry>
-      <varlistentry>
-        <term><option>-fp <replaceable>fontpath</replaceable></option>
-        </term>
-        <listitem>
-          <para>sets the search path for fonts.  This path is a comma
-               separated list of directories which Xprt searches for
-               font databases.</para>
-        </listitem>
-      </varlistentry>
-      <varlistentry>
-        <term><option>-pn</option>
-        </term>
-        <listitem>
-          <para>permits the server to continue running if it fails to
-               establish all of its well-known sockets (connection
-               points for clients), but establishes at least
-               one.</para>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry>
-        <term><option>-XpFile <replaceable>file</replaceable></option>
-        </term>
-        <listitem>
-          <para>Sets an alternate Xprinters file (see section FILES).</para>
-        </listitem>
-      </varlistentry>
-      <varlistentry>
-        <term><option>-XpSpoolerType <replaceable>spoolername</replaceable></option>
-        </term>
-        <listitem>
-          <para>
-            Defines the spooler system to be used for print job spooling.
-            Supported values in xprint.mozdev.org release 009 are:
-            <simplelist type="vert">
-              <member>aix</member>
-              <member>aix4</member>
-              <member>bsd</member>
-              <member>osf</member>
-              <member>solaris</member>
-              <member>sysv</member>
-              <member>uxp</member>
-              <member>cups</member>
-              <member>lprng</member>
-              <member>other</member>
-              <member>none</member>
-            </simplelist>
-            (multiple values can be specified, separated by ':', the first active spooler will be chosen).
-            The default value is platform-specific and can be obtained via
-            <programlisting>Xprt -h</programlisting>.
-          </para>
-        </listitem>
-      </varlistentry>      
-    </variablelist>
-  </refsect1>
-
-  <refsect1>
-    <title>ENVIRONMENT</title>
-    <para>
-      The following environment variables are recognized by the X print server
-      (environment variables recognized by Xprint clients are described in 
-      <citerefentry><refentrytitle>Xprint</refentrytitle><manvolnum>__miscmansuffix__</manvolnum></citerefentry>):
-
-      <variablelist>
-        <varlistentry>
-          <term><envar>${XPCONFIGDIR}</envar></term>
-          <listitem>
-            <para> This environment variable points to the  root
-	      of  the Xprint server configuration directory hierarchy.
-	      If the variable is not defined,  the  default
-	      path  is be assumed.  The default path may be
-              <filename>/usr/X11R6/lib/X11/xserver/</filename>, 
-              <filename>/usr/lib/X11/xserver/</filename>,
-              <filename>/usr/share/Xprint/xserver/</filename> or
-              <filename>/usr/openwin/server/etc/XpConfig</filename>, depending on the
-	      system, and may be configured in <filename>/etc/init.d/xprint</filename>.</para>
-          </listitem>
-        </varlistentry>
-
-        <varlistentry>
-          <term><envar>${LANG}</envar></term>
-          <listitem>
-            <para>
-              This environment variable selects the locale settings used by the Xprint server.
-              Xprt allows language-specific settings (stored in <filename>${XPCONFIGDIR}/${LANG}/print/</filename>)
-              which will override the default settings (stored in <filename>${XPCONFIGDIR}/C/print/</filename>).
-              If <envar>${LANG}</envar> is not set "C" is assumed.
-            </para>
-          </listitem>
-        </varlistentry>
-      </variablelist>
-    </para>
-  </refsect1>
-
-  <refsect1>
-    <title>FILES</title>
-
-    <variablelist>
-      <varlistentry>
-        <term><filename>${XPCONFIGDIR}/${LANG}/print/Xprinters</filename></term>
-        <term><filename>${XPCONFIGDIR}/C/print/Xprinters</filename></term>
-        <listitem>
-          <para>
-            `Xprinters' is the top most configuration file.  It tells
-            Xprt which specific printer names (e.g.  mylaser) should
-            be supported, and whether <citerefentry><refentrytitle>lpstat</refentrytitle><manvolnum>1</manvolnum></citerefentry> or other commands
-            should be used to automatically supplement the list of
-            printers.
-          </para>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry>
-        <term><filename>${XPCONFIGDIR}/${LANG}/print/attributes/printer</filename></term>
-        <term><filename>${XPCONFIGDIR}/C/print/attributes/printer</filename></term>
-        <listitem>
-          <para>
-            The `printer' file maps printer names to model
-            configurations (see `model-config' below).  For example,
-            "mylaser" could be mapped to a "HPDJ1600C", and all other
-            arbitrary printers could be mapped to a default, such as
-            "HPLJ4SI".  When depending on <citerefentry><refentrytitle>lpstat</refentrytitle><manvolnum>1</manvolnum></citerefentry> in the Xprinters
-            file, setting up defaults in `printer' becomes all the
-            more important.
-          </para>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry>
-        <term><filename>${XPCONFIGDIR}/${LANG}/print/attributes/document</filename></term>
-        <term><filename>${XPCONFIGDIR}/C/print/attributes/document</filename></term>
-        <listitem>
-          <para>
-            The `document' file specifies the initial document values
-            for any print jobs.  For example, which paper tray to
-            use, what default resolution, etc.
-          </para>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry>
-        <term><filename>${XPCONFIGDIR}/${LANG}/print/attributes/job</filename></term>
-        <term><filename>${XPCONFIGDIR}/C/print/attributes/job</filename></term>
-        <listitem>
-          <para>
-            The `job' file specifies the initial job values for any
-            print jobs.  For example, "notification-profile" can be
-            set so that when a print job is successfully sent to a
-            printer, e-mail is sent to the user.
-          </para>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry>
-        <term><filename>${XPCONFIGDIR}/C/print/models/PSdefault/model-config</filename></term>
-        <term><filename>${XPCONFIGDIR}/C/print/models/PSdefault/fonts/fonts.dir</filename></term>
-        <term><filename>${XPCONFIGDIR}/C/print/models/PSdefault/fonts/9nb00051.pmf</filename></term>
-        <term><filename>${XPCONFIGDIR}/C/print/models/PSdefault/fonts/9nb00093.pmf</filename></term>
-
-        <listitem>
-          <para>
-            The `model-config' file has attributes that describe the
-            printer model's capabilities and default settings.
-            Printer model fonts may also be present.  The model-config
-            file also identifies the print ddx driver to be used.
-
-            For each printer model supported, a complete hierarchy of
-            files should exist.  In most cases, these files do not
-            need to be modified.
-          </para>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry>
-        <term><filename>${XPCONFIGDIR}/C/print/ddx-config/raster/pdf</filename></term>
-        <term><filename>${XPCONFIGDIR}/C/print/ddx-config/raster/pcl</filename></term>
-        <term><filename>${XPCONFIGDIR}/C/print/ddx-config/raster/postscript</filename></term>
-
-        <listitem>
-          <para>
-            The print ddx drivers can have highly specific
-            configuration files to control their behavior.  In most
-            cases, these files do not need to be modified.
-          </para>
-        </listitem>
-      </varlistentry>
-
-    </variablelist>
-  </refsect1>
-
-  <refsect1>
-    <title>SEE ALSO</title>
-    <para>
-      <simplelist type="inline">
-        <!-- specific references -->
-        <!-- none -->
-        
-        <!-- Xprint general references -->
-        <member><citerefentry><refentrytitle>Xprint</refentrytitle><manvolnum>__miscmansuffix__</manvolnum></citerefentry></member>
-        <member><citerefentry><refentrytitle>X11</refentrytitle><manvolnum>__miscmansuffix__</manvolnum></citerefentry></member>
-        <member><citerefentry><refentrytitle>xplsprinters</refentrytitle><manvolnum>__appmansuffix__</manvolnum></citerefentry></member>
-        <member><citerefentry><refentrytitle>xprehashprinterlist</refentrytitle><manvolnum>__appmansuffix__</manvolnum></citerefentry></member>
-        <member><citerefentry><refentrytitle>xphelloworld</refentrytitle><manvolnum>__appmansuffix__</manvolnum></citerefentry></member>
-        <member><citerefentry><refentrytitle>xpxmhelloworld</refentrytitle><manvolnum>__appmansuffix__</manvolnum></citerefentry></member>
-        <member><citerefentry><refentrytitle>xpawhelloworld</refentrytitle><manvolnum>__appmansuffix__</manvolnum></citerefentry></member>
-        <member><citerefentry><refentrytitle>xpxthelloworld</refentrytitle><manvolnum>__appmansuffix__</manvolnum></citerefentry></member>
-        <member><citerefentry><refentrytitle>xpsimplehelloworld</refentrytitle><manvolnum>__appmansuffix__</manvolnum></citerefentry></member>
-        <member><citerefentry><refentrytitle>Xserver</refentrytitle><manvolnum>__appmansuffix__</manvolnum></citerefentry></member>
-<!--
-        <member><citerefentry><refentrytitle>Xprt</refentrytitle><manvolnum>__appmansuffix__</manvolnum></citerefentry></member>
--->
-        <!-- ToDO: Add manual pages for the single Xprint DDX implementations (PostScript/PDF/PCL/PCL-MONO/Raster/etc.) -->
-        <member><citerefentry><refentrytitle>libXp</refentrytitle><manvolnum>__libmansuffix__</manvolnum></citerefentry></member>
-        <member><citerefentry><refentrytitle>libXprintUtils</refentrytitle><manvolnum>__libmansuffix__</manvolnum></citerefentry></member>
-        <member><citerefentry><refentrytitle>libXprintAppUtils</refentrytitle><manvolnum>__libmansuffix__</manvolnum></citerefentry></member>
-        <member><citerefentry><refentrytitle>XmPrintShell</refentrytitle><manvolnum>__libmansuffix__</manvolnum></citerefentry></member>
-        <member><citerefentry><refentrytitle>XawPrintShell</refentrytitle><manvolnum>__libmansuffix__</manvolnum></citerefentry></member>
-        <member>Xprint FAQ (<ulink url="http://xprint.mozdev.org/docs/Xprint_FAQ.html">http://xprint.mozdev.org/docs/Xprint_FAQ.html</ulink>)</member>
-        <member>Xprint main site (<ulink url="http://xprint.mozdev.org/">http://xprint.mozdev.org/</ulink>)</member>
-      </simplelist>
-    </para>
-  </refsect1>
-
-  <refsect1>
-    <title>AUTHORS</title>
-    <para>
-      This manual page was written by 
-      Drew Parsons <email>dparsons at debian.org</email> and
-      Roland Mainz <email>roland.mainz at nrubsig.org</email>,
-      with some help from the man page at
-      <ulink url="http://www.sins.com.au/unix/manpages/Xprt.html">http://www.sins.com.au/unix/manpages/Xprt.html</ulink> and the XFree86
-      man page for <citerefentry><refentrytitle>Xserver</refentrytitle><manvolnum>1</manvolnum></citerefentry>.
-    </para>
-  </refsect1>
-</refentry>
-
-
-
diff --git a/hw/xprint/etc/Makefile.am b/hw/xprint/etc/Makefile.am
deleted file mode 100644
index 0a960cd..0000000
--- a/hw/xprint/etc/Makefile.am
+++ /dev/null
@@ -1 +0,0 @@
-SUBDIRS = init.d profile.d Xsession.d
diff --git a/hw/xprint/etc/Xsession.d/92xprint-xpserverlist b/hw/xprint/etc/Xsession.d/92xprint-xpserverlist
deleted file mode 100644
index 60d964a..0000000
--- a/hw/xprint/etc/Xsession.d/92xprint-xpserverlist
+++ /dev/null
@@ -1,30 +0,0 @@
-#!/bin/sh 
-#####################################################################
-###  File:              92xprint-xpserverlist
-###
-###  Default Location:  /etc/X11/Xsession.d/
-###
-###  Purpose:           Setup Xprint env vars
-###                     
-###  Description:       This script is invoked by means of the Xsession file
-###                     at user login. 
-###
-###  Invoked by:        /etc/X11/Xsession
-###
-###  (c) Copyright 2003-2004 Roland Mainz <roland.mainz at nrubsig.org>
-###
-###  please send bugfixes or comments to https://bugs.freedesktop.org
-###
-#####################################################################
-
-
-#
-# Obtain list of Xprint servers
-#
-
-if [ -x "/etc/init.d/xprint" ] ; then
-  XPSERVERLIST="`/etc/init.d/xprint get_xpserverlist`"
-  export XPSERVERLIST
-fi
-
-##########################         eof       #####################
diff --git a/hw/xprint/etc/Xsession.d/Makefile.am b/hw/xprint/etc/Xsession.d/Makefile.am
deleted file mode 100644
index 96a5ee7..0000000
--- a/hw/xprint/etc/Xsession.d/Makefile.am
+++ /dev/null
@@ -1,2 +0,0 @@
-xpcdir = $(sysconfdir)/X11/Xsession.d
-dist_xpc_DATA = 92xprint-xpserverlist
diff --git a/hw/xprint/etc/init.d/Makefile.am b/hw/xprint/etc/init.d/Makefile.am
deleted file mode 100644
index 0cf1adc..0000000
--- a/hw/xprint/etc/init.d/Makefile.am
+++ /dev/null
@@ -1,12 +0,0 @@
-include $(top_srcdir)/cpprules.in
-
-noinst_PRE = xprint
-BUILT_SOURCES = $(noinst_PRE)
-CLEANFILES = $(noinst_PRE) xprint.pre
-
-CPP_FILES_FLAGS = -DProjectRoot='"$(PROJECTROOT)"' -DOS_LINUX
-
-xprint.pre: xprint.cpp
-	$(SED) -e 's/^\(\s\+\)#/\1XCOMM/' ${srcdir}/xprint.cpp > $@
-
-EXTRA_DIST = xprint.cpp
diff --git a/hw/xprint/etc/init.d/xprint.cpp b/hw/xprint/etc/init.d/xprint.cpp
deleted file mode 100644
index dbfd1e1..0000000
--- a/hw/xprint/etc/init.d/xprint.cpp
+++ /dev/null
@@ -1,1277 +0,0 @@
-XCOMM!/bin/sh
-XCOMM
-XCOMM Copyright 2002-2004 by Roland Mainz <roland.mainz at nrubsig.org>.
-XCOMM
-XCOMM This script manages the Xprint server side
-
-XCOMM Basic support for IRIX-style "chkconfig"
-XCOMM chkconfig: 2345 61 61
-XCOMM description: Startup/shutdown script for Xprint server(s)
-
-XCOMM Basic support for the Linux Standard Base Specification 1.0.0
-XCOMM (Note: The Should-Start/Stop lines are there so that this works in the
-XCOMM future, when the LSB adopts these. The X-UnitedLinux lines are there 
-XCOMM so that it works right now.)
-XCOMM## BEGIN INIT INFO
-XCOMM Provides: xprint
-XCOMM Required-Start: $local_fs $remote_fs $syslog $network
-XCOMM Required-Stop: $local_fs $remote_fs $syslog
-XCOMM Should-Start: cups lpd xfs
-XCOMM Should-Stop:  cups lpd xfs
-XCOMM X-UnitedLinux-Should-Start: cups lpd xfs
-XCOMM X-UnitedLinux-Should-Stop:  cups lpd xfs
-XCOMM Default-Start: 3 5
-XCOMM Default-Stop: 0 1 2 6
-XCOMM Description: Startup/shutdown script for Xprint server(s)
-XCOMM## END INIT INFO
-
-#undef sun
-#undef unix
-
-XCOMM###########################################################################
-XCOMM
-XCOMM This script has three main tasks:
-XCOMM 1. Start Xprint servers ("Xprt") at boot time.
-XCOMM 2. Shutdown Xprint servers when the machine is being shut down.
-XCOMM 3. Query the list of available printers.
-XCOMM
-XCOMM Additional tasks are:
-XCOMM 4. Restart ('restart'|'force-reload') and conditional restart
-XCOMM    ('condrestart'/'try-restart') for Linux support
-XCOMM 5. Wrapping of application call with setting XPSERVERLIST ('wrapper')
-XCOMM
-XCOMM Usage:
-XCOMM - Start Xprint server(s) manually:
-XCOMM   % /etc/init.d/xprint start
-XCOMM
-XCOMM - Stop Xprint server(s) manually:
-XCOMM   % /etc/init.d/xprint stop
-XCOMM
-XCOMM - Populate $XPSERVERLIST env var (for example as part of a global
-XCOMM   login script like /etc/profile or per-user login scripts like
-XCOMM   $HOME/.profile (sh/ksh/bash))
-XCOMM   % XPSERVERLIST="`/etc/init.d/xprint get_xpserverlist`"
-XCOMM   % export XPSERVERLIST
-XCOMM
-XCOMM Installation:
-XCOMM   Copy this script to /etc/init.d/xprint and make sure that it is
-XCOMM   executable. If your installation is LSB-compliant, then run
-XCOMM   % /usr/lib/lsb/install_initd /etc/init.d/xprint
-XCOMM   to start the service on startup. Otherwise, manually create links
-XCOMM   to the matching run levels.
-XCOMM   Examples:
-XCOMM     - Solaris 2.7/2.8/2.9:
-XCOMM       % cp xprint /etc/init.d/xprint
-XCOMM       % chmod a+rx /etc/init.d/xprint
-XCOMM       % ln /etc/init.d/xprint /etc/rc0.d/K38xprint
-XCOMM       % ln /etc/init.d/xprint /etc/rc1.d/K38xprint
-XCOMM       % ln /etc/init.d/xprint /etc/rc2.d/S81xprint
-XCOMM       % ln /etc/init.d/xprint /etc/rcS.d/K38xprint
-XCOMM
-XCOMM     - SuSE Linux 7.3
-XCOMM       % cp xprint /etc/init.d/xprint
-XCOMM       % chmod a+rx /etc/init.d/xprint
-XCOMM       % ln -s ../xprint /etc/init.d/rc3.d/K13xprint
-XCOMM       % ln -s ../xprint /etc/init.d/rc3.d/S12xprint
-XCOMM       % ln -s ../xprint /etc/init.d/rc5.d/K13xprint
-XCOMM       % ln -s ../xprint /etc/init.d/rc5.d/S12xprint
-XCOMM       % ln -s ../xprint /etc/init.d/rc2.d/K13xprint
-XCOMM       % ln -s ../xprint /etc/init.d/rc2.d/S12xprint
-XCOMM
-XCOMM     - SuSE Linux 6.4:
-XCOMM       % cp xprint /sbin/init.d/xprint
-XCOMM       % chmod a+rx /sbin/init.d/xprint
-XCOMM       % ln -s ../xprint /sbin/init.d/rc2.d/K20xprint
-XCOMM       % ln -s ../xprint /sbin/init.d/rc2.d/S20xprint
-XCOMM       % ln -s ../xprint /sbin/init.d/rc3.d/K20xprint
-XCOMM       % ln -s ../xprint /sbin/init.d/rc3.d/S20xprint
-XCOMM
-XCOMM   Notes: 
-XCOMM   - The Xprint servers must be started _after_ the print
-XCOMM     spooler or the server(s) may refuse to start
-XCOMM   - The script should be readable by all users to ensure that they
-XCOMM     can use the "get_xpserverlist"-option
-XCOMM
-XCOMM Custom configuration:
-XCOMM   - Edit the function setup_config() in this script to match your needs
-XCOMM
-XCOMM Known bugs/ToDo/Notes:
-XCOMM   - The shell script assumes that a Xserver can be reached via 
-XCOMM     "hostname:displaynum" where "hostname" is obtained from
-XCOMM     "/usr/bin/hostname". It may happen that a kernel firewall
-XCOMM     blocks an X connection on the same host (e.g. client && Xserver 
-XCOMM     are running on the same host).
-XCOMM     Suggested fix: Fix the firewall config.
-XCOMM     Suggested workaround: Edit this script and replace the use of 
-XCOMM     /usr/bin/hostname with "echo 'localhost'".
-XCOMM
-XCOMM###########################################################################
-XCOMM
-
-
-XCOMM###########################################################################
-
-fatal_error()
-{
-    echo "${0}: ## FATAL ERROR: ${1}" 1>&2
-    exit 1
-}
-
-error_echo()
-{
-    echo "${0}: ## ERROR: ${1}" 1>&2
-}
-
-warning_echo()
-{
-    echo "${0}: ## WARNING: ${1}" 1>&2
-}
-
-verbose_echo()
-{
-    echo "${0}: ${1}"
-}
-
-msg()
-{
-    echo "${1}"
-}
-
-XCOMM###########################################################################
-
-#ifndef OS_LINUX
-XCOMM Force use of a POSIX conformant sh 
-XCOMM (Solaris /sbin/sh is plain Bourne shell)
-[ "$1" != "posix_sh_forced" -a -x /bin/ksh  ]            && exec /bin/ksh  "$0" posix_sh_forced "$@"
-[ "$1" != "posix_sh_forced" -a -x /bin/bash ]            && exec /bin/bash --norc --noprofile "$0" posix_sh_forced "$@"
-[ "$1" != "posix_sh_forced" -a -x /usr/local/bin/ksh ]   && exec /usr/local/bin/ksh "$0" posix_sh_forced "$@"
-[ "$1" != "posix_sh_forced" -a -x /usr/local/bin/bash ]  && exec /usr/local/bin/bash --norc --noprofile "$0" posix_sh_forced "$@"
-if [ "$1" != "posix_sh_forced" ] ; then
-    echo "${0}: ## FATAL ERROR: No POSIX-shell found."  1>&2
-    exit 1
-fi
-
-shift # Drop "posix_sh_forced"
-#endif /* !OS_LINUX */
-
-XCOMM#debug
-XCOMM set -x
-
-XCOMM Change current dir to a location which is writeable by everyone
-cd /tmp
-
-XCOMM Clear some environment variables
-unset TEMP TMPDIR SCREENDIR
-
-XCOMM Set search path for commands
-export PATH=/usr/bin:/bin:/usr/sbin:/sbin
-#ifdef OS_SOLARIS
-export PATH=/usr/xpg4/bin:${PATH}
-#endif
-
-XCOMM# Try to figure-out where X11 was installed
-#if defined(OS_SOLARIS)
-XPROJECTROOT=/usr/openwin
-export OPENWINHOME=/usr/openwin
-#elif defined(OS_AIX)
-XPROJECTROOT=/usr/lpp/X11
-#else
-#if defined(ProjectRoot)
-[ -d ProjectRoot/bin ]	&& XPROJECTROOT=ProjectRoot
-#endif
-[ -d /usr/X11/bin ]     && XPROJECTROOT=/usr/X11
-[ -d /usr/X11R6/bin ]   && XPROJECTROOT=/usr/X11R6
-#endif
-XPCUSTOMGLUE=DEF_XPCUSTOMGLUE # This is used for customizing this script
-export XPROJECTROOT XPCUSTOMGLUE
-
-if [ -z "${XPROJECTROOT}" ] ; then
-    fatal_error "Unknown XProjectRoot."
-fi
-
-XCOMM Set the location of the Xprt binary we want to use.
-XPRT_BIN="${XPROJECTROOT}/bin/Xprt"
-
-XCOMM Set the location of the global file where we store the locations 
-XCOMM of the system-wide servers
-if [ -d /var/run ] ; then
-    XP_GLOBAL_SERVERS=/var/run/Xprint_servers
-else
-    XP_GLOBAL_SERVERS=/tmp/.Xprint_servers
-fi
-
-XCOMM ${LOGNAME} will not work if user su'ed into another account
-export CURRLOGNAME="$(id -u -n)"
-
-XCOMM Set location where we want to store the list of Xprint servers managed
-XCOMM by this user
-XCOMM - If we start as "root" use the global file
-XCOMM - If we start as normal user use a per-user file
-
-if [ "${CURRLOGNAME}" != "root" -a "${CURRLOGNAME}" != "" ] ; then
-    XP_PER_USER_SERVERS="/tmp/.Xprint_servers_${CURRLOGNAME}"
-    XP_SERVERS="${XP_PER_USER_SERVERS}"
-else
-    XP_SERVERS="${XP_GLOBAL_SERVERS}"
-fi
-
-XCOMM Set umask that owner can r/w all files and everyone else can read them
-umask 022
-
-XCOMM Bump limit for per-process open files to ensure that Xprt can open many many fonts
-ulimit -n 1024
-
-XCOMM###########################################################################
-
-XCOMM Get list of fonts for a given display
-get_fontlist_from_display()
-{
-    ${XPROJECTROOT}/bin/xset -display "${1}" q | 
-      awk "/Font Path:/ { i=1 ; next } i==1 { print \$0 ; i=0 }" | 
-        fontpath2fontlist
-}
-
-XCOMM Get list from a fontserver config
-get_fontlist_from_xfs_config()
-{
-    if [ ! -r "${1}" ] ; then
-        return 0
-    fi
-      
-    (        
-      cat "${1}" |
-      while read -r i ; do
-          for val in $i; do
-              case $val in
-                \#*)  break ;;
-                ?*=*) key="${val%%=*}" ;;
-                =*)   key="${tok}" ;;
-                *)    [ "${key}" = "catalogue" -a "${tok}" != "" ] && echo "${tok}" ;;
-              esac
-              tok="${val#*=}"
-          done
-      done
-    ) | tr "," "\n" | fontpath2fontlist
-}
-
-get_fontlist_from_all_xfs_configs()
-{
-    get_fontlist_from_xfs_config "/etc/openwin/fs/fontserver.cfg"
-    get_fontlist_from_xfs_config "/usr/openwin/lib/X11/fontserver.cfg"
-    get_fontlist_from_xfs_config "/etc/X11/fs-xtt/config"
-    get_fontlist_from_xfs_config "/etc/X11/fs/config"
-    get_fontlist_from_xfs_config "/etc/X11/xfs/config"
-    get_fontlist_from_xfs_config "${XPROJECTROOT}/lib/X11/fs/config"
-}
-
-get_fontlist_from_xf86config()
-{
-    srcxconf=""
-
-    XCOMM see xorg.conf(5x) manual page for the list of locations used here    
-    [ "${srcxconf}" = "" -a -f "/etc/X11/xorg.conf"  ]                      && srcxconf="/etc/X11/xorg.conf"
-    [ "${srcxconf}" = "" -a -f "/usr/X11R6/etc/X11/xorg.conf" ]             && srcxconf="/usr/X11R6/etc/X11/xorg.conf"
-    [ "${srcxconf}" = "" -a -f "/etc/X11/xorg.conf-4" ]                     && srcxconf="/etc/X11/xorg.conf-4"
-    [ "${srcxconf}" = "" -a -f "/etc/X11/xorg.conf" ]                       && srcxconf="/etc/X11/xorg.conf"
-    [ "${srcxconf}" = "" -a -f "/etc/xorg.conf" ]                           && srcxconf="/etc/xorg.conf"
-    [ "${srcxconf}" = "" -a -f "/usr/X11R6/etc/X11/xorg.conf.${hostname}" ] && srcxconf="/usr/X11R6/etc/X11/xorg.conf.${hostname}"
-    [ "${srcxconf}" = "" -a -f "/usr/X11R6/etc/X11/xorg.conf-4" ]           && srcxconf="/usr/X11R6/etc/X11/xorg.conf-4"
-    [ "${srcxconf}" = "" -a -f "/usr/X11R6/etc/X11/xorg.conf" ]             && srcxconf="/usr/X11R6/etc/X11/xorg.conf"
-    [ "${srcxconf}" = "" -a -f "/usr/X11R6/lib/X11/xorg.conf.${hostname}" ] && srcxconf="/usr/X11R6/lib/X11/xorg.conf.${hostname}"
-    [ "${srcxconf}" = "" -a -f "/usr/X11R6/lib/X11/xorg.conf-4" ]           && srcxconf="/usr/X11R6/lib/X11/xorg.conf-4"
-    [ "${srcxconf}" = "" -a -f "/usr/X11R6/lib/X11/xorg.conf" ]             && srcxconf="/usr/X11R6/lib/X11/xorg.conf"
-
-    XCOMM Xfree86 locations
-    [ "${srcxconf}" = "" -a -f "/etc/X11/XF86Config-4" ] && srcxconf="/etc/X11/XF86Config-4"
-    [ "${srcxconf}" = "" -a -f "/etc/X11/XF86Config" ]   && srcxconf="/etc/X11/XF86Config"
-
-
-    if [ "${srcxconf}" = "" ] ; then
-        return 0
-    fi
-
-    currsection=""
-    cat "${srcxconf}" |
-    while read i1 i2 i3 i4 ; do
-        # Strip "\"" from I2
-        i2="${i2#\"}" ; i2="${i2%\"}"
-
-        case "${i1}" in
-            \#*)
-                continue
-                ;;
-            'Section')
-                currsection="${i2}"
-                ;;
-            'EndSection')
-                currsection=""
-                ;;
-            'FontPath')
-                [ "$currsection" = "Files" ] && echo "${i2%:unscaled}"
-                ;;
-        esac  
-    done | egrep -v -i "tcp/|tcp4/|tcp6/|unix/"
-    
-    return 0
-}
-
-get_fontlist_from_defoma()
-{
-    # Include Debian defoma font directory where relevant
-    if [ -d "/var/lib/defoma/x-ttcidfont-conf.d/dirs" ] ; then        
-        find "/var/lib/defoma/x-ttcidfont-conf.d/dirs" -name fonts.dir |
-          while read i ; do echo "${i%/fonts.dir}" ; done
-    fi
-}
-
-XCOMM Get list of system fonts
-get_system_fontlist()
-{
-#if defined(OS_SOLARIS)
-          ## List the standard X11 fonts
-          # echo "${XPROJECTROOT}/lib/X11/fonts/F3/"
-          # echo "${XPROJECTROOT}/lib/X11/fonts/F3bitmaps/"
-          echo "${XPROJECTROOT}/lib/X11/fonts/Type1/"
-          echo "${XPROJECTROOT}/lib/X11/fonts/Type1/outline/"
-          # We cannot use /usr/openwin/lib/X11/fonts/Type1/sun/ - see
-          # http://xprint.mozdev.org/bugs/show_bug.cgi?id=5726
-          # ("Xprint doesn't start under Solaris 2.9 due *.ps files in /usr/openwin/lib/X11/fonts/Type1/sun/fonts.dir")
-          #echo "${XPROJECTROOT}/lib/X11/fonts/Type1/sun/"
-          echo "${XPROJECTROOT}/lib/X11/fonts/TrueType/"
-          echo "${XPROJECTROOT}/lib/X11/fonts/Speedo/"
-          echo "${XPROJECTROOT}/lib/X11/fonts/misc/"
-          echo "${XPROJECTROOT}/lib/X11/fonts/75dpi/"
-          echo "${XPROJECTROOT}/lib/X11/fonts/100dpi/"
-  
-          ## List all fonts in all locales installed on this machine
-          cat /usr/openwin/lib/locale/''*/OWfontpath | tr "," "\n" | sort -u
-#elif defined(OS_LINUX)
-          (
-            get_fontlist_from_defoma
-
-            get_fontlist_from_xf86config
-            
-            # Getting font paths from XFS is mainly required for compatibilty to RedHat
-            get_fontlist_from_all_xfs_configs
-                   
-            ## List all fonts in all locales installed on this machine
-            (
-              [ -d "/usr/share/fonts" ] && find /usr/share/fonts -name fonts.dir
-              find "${XPROJECTROOT}/lib/X11/fonts" -name fonts.dir 
-            ) | 
-              while read i ; do echo "${i%/fonts.dir}" ; done
-          ) | sort -u
-#else
-          ## List the standard X11 fonts
-          # (AIX should be handled like Solaris but I did not found a way to
-          # enumerate all fonts in all installed locales without scanning the
-          # dirs manually)
-          echo "${XPROJECTROOT}/lib/X11/fonts/Type1/"
-          echo "${XPROJECTROOT}/lib/X11/fonts/TrueType/"
-          echo "${XPROJECTROOT}/lib/X11/fonts/TTF/"
-          echo "${XPROJECTROOT}/lib/X11/fonts/Speedo/"
-          echo "${XPROJECTROOT}/lib/X11/fonts/misc/"
-          echo "${XPROJECTROOT}/lib/X11/fonts/75dpi/"
-          echo "${XPROJECTROOT}/lib/X11/fonts/100dpi/"
-          echo "${XPROJECTROOT}/lib/X11/fonts/"
-#endif
-}
-
-XCOMM Filter fonts per given extended regular expressions
-XCOMM (and make sure we filter any model-config fonts - they are managed by Xprt internally)
-filter_fontlist()
-{
-    egrep -- "${1}" | fgrep -v "/models/" | egrep -v -- "${2}"
-}
-
-XCOMM Filter font paths with unsupported font types
-XCOMM (such as CID fonts)
-filter_unsupported_fonts()
-{
-    egrep -v -i "/cid(/$|$)|/csl(/$|$)"
-}
-
-XCOMM Validate fontpath
-XCOMM Only return valid font path entries (note that these entries may
-XCOMM include non-file stuff like font server references)
-validate_fontlist()
-{
-    while read i ; do       
-        case "${i}" in
-            # Check if font path entry is a font server...
-            tcp/''*|tcp4/''*|tcp6/''*|unix/''*)
-                echo "${i}"
-                ;;
-            # ... if not check if the path is accessible
-            # and has a valid "fonts.dir" index
-            *)
-                [ -f "${i}/fonts.dir" ] && echo "${i}"
-                ;;
-        esac
-    done
-}
-
-XCOMM Build a comma-seperated list of fonts (font path) from a list of fonts
-fontlist2fontpath()
-{
-    fp=""
-    read fp;
-    while read i ; do
-        fp="${fp},${i}"
-    done
-    
-    echo "$fp"
-}
-
-XCOMM Build a list (one item per line) of fonts from a font path
-fontpath2fontlist()
-{
-    while read i ; do
-        echo "${i}" | tr "," "\n"
-    done
-}
-
-XCOMM Sort scaleable fonts (PS Type1 and TrueType) first in a font list
-sort_scaleable_fonts_first()
-{
-    i="$(fontlist2fontpath)"
-    # First list PS Type1 fonts...
-    echo "${i}" | fontpath2fontlist | fgrep "/Type1"
-    # ... then TrueType fonts ...
-    echo "${i}" | fontpath2fontlist | egrep -i "/TrueType|/TT(/$|$)|/TTF(/$|$)"
-    # ... then all others
-    echo "${i}" | fontpath2fontlist | egrep -v -i "/Type1|/TrueType|/TT(/$|$)|/TTF(/$|$)"
-}
-
-XCOMM Check if a X display is used by a Xserver or not
-XCOMM Known bugs:
-XCOMM - there is no way in plain bourne shell or bash (see comment about ksh93
-XCOMM   below) to test if a Xserver sits only on a socket and not on a pipe
-XCOMM - some Xserver's don't cleanup their stuff in /tmp on exit which may end
-XCOMM   in the problem that we don't detect possible free display numbers
-XCOMM   (one problem is that only ksh93 can do stuff like 
-XCOMM   "cat </dev/tcp/0.0.0.0/6001")
-CheckIfDisplayIsInUse()
-{
-    id=$1
-    
-    [ -r "/tmp/.X${id}-lock"     ] && return 0;
-    [ -r "/tmp/.X11-unix/X${id}" ] && return 0;
-    [ -r "/tmp/.X11-pipe/X${id}" ] && return 0;
-    
-    return 1;
-}
-
-lastdisplaynumreturned_store=/tmp/.Xp_last_display_returned_by_findfreexdisplaynum_${RANDOM}_${RANDOM}
-
-XCOMM Try to find a free display number
-FindFreeXDisplayNum()
-{
-    if [ -r "${lastdisplaynumreturned_store}" ] ; then
-      i="$(cat "${lastdisplaynumreturned_store}")"
-    else
-      i=32 # start at display 32
-    fi
-    
-    while [ $i -lt 127 ] ; do
-        i=$(($i + 1))
-
-        if CheckIfDisplayIsInUse $i ; then
-            true
-        else
-            echo "$i"
-            echo "$i" >"${lastdisplaynumreturned_store}"
-            return 0
-        fi
-    done
-
-    # Using "magic" value of 189 here due lack of a better solution
-    echo "189"
-    echo "189" >"${lastdisplaynumreturned_store}"    
-    return 0
-}
-
-XCOMM Check if a process exists or not
-pexists()
-{
-    [ "$1" = "" ] && return 1;
-
-    # Use of /proc would be better but not all platforms (like AIX) have procfs
-    [ "$(ps -p $1 | fgrep $1)" != "" ] && return 0;
-    return 1
-}
-
-XCOMM Check if there is a spooler running...
-is_spooler_running()
-{
-    # This covers Linux lpd, CUPS, Solaris and AIX 4.x - but what about
-    # AIX 5.x, HP-UX and IRIX ?
-
-    [ "$(ps -A | egrep 'lpd|lpsched|cupsd|qdaemon' | fgrep -v 'grep')" != "" ] && return 0;
-    return 1
-}
-
-XCOMM Wait until the spooler system has been started (but not more than 30secs)
-wait_for_print_spooler()
-{
-    for i in 1 2 3 4 5 6 7 8 9 10 ; do
-        is_spooler_running && return 0;
-        sleep 3
-    done
-    
-    return 0
-}
-
-lock_server_registry()
-{
-    lock_counter=0 # counts in 1/100s
-    waiting_for_lock_msg_send="false"
-    while ! mkdir "${XP_SERVERS}.lock" 2>/dev/null ; do
-        # print notice after 2 seconds
-        if [ ${lock_counter} -gt 200 -a "${waiting_for_lock_msg_send}" != "true" ] ; then
-            echo "${0}: waiting for lock(=${XP_SERVERS}.lock)..."
-            waiting_for_lock_msg_send="true"
-        fi
-
-        # tread the lock as "broken" after 20 seconds
-        if [ ${lock_counter} -gt 2000 ] ; then
-            echo "${0}: WARNING: lock timeout for lock(=${XP_SERVERS}.lock)."
-            return 0
-        fi
-                
-        if [ -x /bin/usleep ] ; then
-            /bin/usleep 200000
-            lock_counter=$((${lock_counter} + 20)) # 20/100s
-        else
-            sleep 1
-            lock_counter=$((${lock_counter} + 100)) # 100/100s
-        fi
-    done
-}
-
-unlock_server_registry()
-{
-    rmdir "${XP_SERVERS}.lock"
-}
-
-XCOMM Kill dead registry locks (silently!)
-kill_dead_registry_locks()
-{
-    rm -Rf "${XP_SERVERS}.lock"
-}
-
-XCOMM Start Xprint servers
-start_servers()
-{
-    # Write registry "intro" ...
-    lock_server_registry
-    echo "# Xprint server list"                               >>"${XP_SERVERS}"
-    echo "# File is for private use for ${0}."                >>"${XP_SERVERS}"
-    echo "# Do not edit, rely on the content or file format." >>"${XP_SERVERS}"
-    unlock_server_registry
-
-    hostname="$(hostname)"
-
-    default_fontpath="$(get_system_fontlist | fontlist2fontpath)"
-    default_fontpath_acceptpattern=".*";
-    default_fontpath_rejectpattern="_No_Match_"; # Match nothing   
-    
-    curr=0
-    while [ $curr -lt $num_xpstart ] ; do
-        if [ "${xpstart_remote_server[$curr]}" != "" ] ; then
-            # Remote Xprt, just put the entry into the registry
-            lock_server_registry
-            echo "display=${xpstart_remote_server[$curr]}" >>"${XP_SERVERS}"
-            unlock_server_registry
-        else
-            # Run block in seperate process to avoid that changes to the
-            # xpstart_* variables affect the next cycle
-            (
-              # Use defaults if there are no special options
-              [ "${xpstart_fontpath[$curr]}"               = "" ] &&               xpstart_fontpath[$curr]="${default_fontpath}";
-              [ "${xpstart_fontpath_acceptpattern[$curr]}" = "" ] && xpstart_fontpath_acceptpattern[$curr]="$default_fontpath_acceptpattern";
-              [ "${xpstart_fontpath_rejectpattern[$curr]}" = "" ] && xpstart_fontpath_rejectpattern[$curr]="$default_fontpath_rejectpattern";
-              [ "${xpstart_displayid[$curr]}"              = "" ] &&              xpstart_displayid[$curr]="$(FindFreeXDisplayNum)"       
-              [ "${xpstart_logger[$curr]}"                 = "" ] &&                 xpstart_logger[$curr]="logger -p lpr.notice -t Xprt_${xpstart_displayid[$curr]}";
-              [ "${xpstart_logfile[$curr]}"                = "" ] &&                xpstart_logfile[$curr]="/dev/null";
-              [ "${xpstart_xprt_binary[$curr]}"            = "" ] &&            xpstart_xprt_binary[$curr]="${XPRT_BIN}";
-              if [ "${xpstart_xprt_binary[$curr]}" = "/usr/openwin/bin/Xprt" -o "$(uname -s)" = "SunOS" ] ; then
-                  # Solaris /usr/openwin/bin/Xprt does not support "-nolisten tcp"
-                  # yet nor is it possible to run a Xserver on a unix socket only
-                  # in Solaris since access to the unix domain sockets in
-                  # /tmp/.X11-pipe and /tmp/.X11-unix is restricted to applications
-                  # with group-id "root" (e.g. the Xprt server would need to be
-                  # setgid "root" that plain users can start it listening on a unix
-                  # socket only)
-                  [ "${xpstart_options[$curr]}" = "" ] && xpstart_options[$curr]="-ac -pn"
-              else
-                  [ "${xpstart_options[$curr]}" = "" ] && xpstart_options[$curr]="-ac -pn -nolisten tcp"
-              fi
-
-              # Check if the Xprt binary is available                                     
-              if [ ! -x "${xpstart_xprt_binary[$curr]}" ] ; then                                            
-                  error_echo "Can't find \"${xpstart_xprt_binary[$curr]}\"."                                  
-                  exit 1 # exit block                                                               
-              fi                                                                          
-
-              # Verify and set location of font encodings directory file
-              if [ "${xpstart_font_encodings_dir[$curr]}" = "" ] ; then
-                  if [ -f "${XPROJECTROOT}/lib/X11/fonts/xf86encodings/encodings.dir" ] ; then
-                      xpstart_font_encodings_dir[$curr]="${XPROJECTROOT}/lib/X11/fonts/xf86encodings/encodings.dir"
-                  else
-                      xpstart_font_encodings_dir[$curr]="${XPROJECTROOT}/lib/X11/fonts/encodings/encodings.dir";
-                  fi
-              fi
-
-              unset FONT_ENCODINGS_DIRECTORY
-              if [ ! -f "${xpstart_font_encodings_dir[$curr]}" ] ; then
-                  warning_echo "Can't find \"${xpstart_font_encodings_dir[$curr]}\", TrueType font support may not work."
-              fi
-
-              export FONT_ENCODINGS_DIRECTORY="${xpstart_font_encodings_dir[$curr]}"
-
-              # Generate font path (containing only valid font path elements)
-              # from input font path and filter expressions
-              curr_fp=$(echo "${xpstart_fontpath[$curr]}" | 
-                        fontpath2fontlist |
-                        filter_fontlist "${xpstart_fontpath_acceptpattern[$curr]}" "${xpstart_fontpath_rejectpattern[$curr]}" | 
-                        filter_unsupported_fonts |
-                        sort_scaleable_fonts_first | 
-                        validate_fontlist | 
-                        fontlist2fontpath)
-
-              # Set Xserver auditing level option
-              unset curr_audit
-              if [ "${xpstart_auditlevel[$curr]}" != "" ] ; then
-                  curr_audit="-audit ${xpstart_auditlevel[$curr]}"
-              fi
-
-              # Set Xprt -XpFile option
-              unset curr_xpfile
-              if [ "${xpstart_xpfile[$curr]}" != "" ] ; then
-                  curr_xpfile="-XpFile ${xpstart_xpfile[$curr]}"
-              fi
-
-              # Set custom XPCONFIGDIR (if there is one)
-              unset XPCONFIGDIR
-              if [ "${xpstart_xpconfigdir[$curr]}" != "" ] ; then
-                  export XPCONFIGDIR="${xpstart_xpconfigdir[$curr]}"
-              fi
-
-              # If someone uses "-nolisten tcp" make sure we do not add a hostname to force local transport
-              if [ "$(echo "${xpstart_options[$curr]}" | egrep "nolisten.*tcp")" != "" ] ; then
-                  xp_display=":${xpstart_displayid[$curr]}"
-              else
-                  xp_display="${hostname}:${xpstart_displayid[$curr]}"
-              fi
-              
-              (
-                (
-                  "${xpstart_xprt_binary[$curr]}" \
-                      ${xpstart_options[$curr]} \
-                      ${curr_xpfile} ${curr_audit} \
-                      -fp ${curr_fp} \
-                      :${xpstart_displayid[$curr]} &
-                  server_pid="$!"
- 
-                  # Append the new server to the registry
-                  lock_server_registry
-                  echo "display=${xp_display} display_id=${xpstart_displayid[$curr]} pid=${server_pid}" >>"${XP_SERVERS}"
-                  unlock_server_registry
-                  
-                  wait
-                  echo "Xprint server pid=${server_pid} done, exitcode=$?."
-                  
-                  # Remove the dead server from the registry
-                  # (only if the registry still exists - if /etc/init.d/xprint stop" gets called the registry
-                  # will be removed - and we should not re-create it afterwards...)
-                  lock_server_registry
-                  if [ -f "${XP_SERVERS}" ] ; then
-                      x="$(cat "${XP_SERVERS}")" # Store content of file "${XP_SERVERS}" in var "x"
-                      echo "${x}" | fgrep -v "display_id=${xpstart_displayid[$curr]} pid=${server_pid}" >"${XP_SERVERS}"
-                  fi
-                  unlock_server_registry                 
-                ) 2>&1 | while read i ; do echo "$i" | tee -a "${xpstart_logfile[$curr]}" | ${xpstart_logger[$curr]} ; done
-              ) &
-            )
-        fi
-        
-        curr=$(($curr + 1))
-    done
-    
-    # Remove tmp. file created by |FindFreeXDisplayNum()|
-    rm -f "${lastdisplaynumreturned_store}"
-
-    # Done.
-    lock_server_registry
-    echo "# EOF." >>"${XP_SERVERS}"
-    unlock_server_registry
-    return 0
-}
-
-
-XCOMM Convenience function to check setup and start Xprt server(s)
-do_start()
-{
-    if [ -f "${XP_SERVERS}" ] ; then
-        numservers="$(do_get_xpserverlist | wc -l)"
-        if [ ${numservers} -gt 0 ] ; then
-            verbose_echo "Xprint servers are already running."
-            return 0
-        else
-            verbose_echo "Old server registry found, cleaning-up..."
-            do_stop
-        fi
-    fi
-    
-    # Check if we can write the registry file
-    touch "${XP_SERVERS}" 2>/dev/null
-    if [ ! -f "${XP_SERVERS}" ] ; then
-        error_echo "Cannot create \"${XP_SERVERS}\"."
-        # exit code 4 = user had insufficient privilege (LSB)
-        exit 4
-    fi
-
-    if ! setup_config ; then
-        error_echo "setup_config failed."
-        exit 1
-    fi
-
-    # Provide two paths here - one which simply starts the Xprt servers,
-    # assuming that there is a print spooler already running (or that 
-    # ${XPCONFIG}/C/print/Xprinters provides static print queue entries
-    # (like for the PSspooldir print model)) and a 2nd path which
-    # explicitly checks if the print queue daemons are running
-    if true ; then
-        msg "Starting Xprint servers: Xprt."
-        start_servers
-    else 
-        # Continue in the background if there is no spooler running yet (that
-        # we don't hold off the boot process nor run in a possible race-condition
-        # when /etc/init.d/lpd was not called yet but the runlevel script waits
-        # for us to finish first ...
-        if is_spooler_running ; then
-            msg "Starting Xprint servers: Xprt."
-            start_servers
-        else
-            msg "Starting Xprint servers (in the background): Xprt."
-            (wait_for_print_spooler ; start_servers) &
-            sleep 5
-        fi
-    fi
-    
-    if [ "${CURRLOGNAME}" = "root" -a -d /var/lock/subsys/ ] ; then
-        touch /var/lock/subsys/xprint
-    fi
-}
-
-XCOMM Convenience function to stop Xprt server(s)
-do_stop()
-{
-    msg "Stopping Xprint servers: Xprt."
-
-    lock_server_registry
-    if [ -f "${XP_SERVERS}" ] ; then       
-        reglist="$(cat "${XP_SERVERS}")"
-        rm -f "${XP_SERVERS}"
-    fi
-    unlock_server_registry
-    
-    if [ "${reglist}" != "" ] ; then
-        echo "${reglist}" |
-          grep "^display=.*:.* pid=[0-9]*$" |
-          while read i ; do
-              (
-                eval ${i}
-                if pexists ${pid} ; then 
-                    kill ${pid}
-                fi
-
-                # Remove the X sockets/pipes which are not in use anymore
-                # (It would be better if the Xservers would cleanup this
-                # automatically, but most Xservers do not do that... ;-(
-                # Note that this will not work on Solaris where applications
-                # must run with groupid="root" if they want to write into
-                # /tmp/.X11-unix/ and/or /tmp/.X11-pipe/)
-                if [ "${display_id}" != "" ] ; then
-                    rm -f "/tmp/.X${display_id}-lock"     2>/dev/null
-                    rm -f "/tmp/.X11-unix/X${display_id}" 2>/dev/null
-                    rm -f "/tmp/.X11-pipe/X${display_id}" 2>/dev/null
-                fi 
-              )
-          done
-    fi
-
-    if [ "${CURRLOGNAME}" = "root" -a -d /var/lock/subsys/ ] ; then
-        rm -f /var/lock/subsys/xprint
-    fi
-    
-    # Remove any outstanding (dead) locks and cleanup
-    rm -f "${XP_SERVERS}"
-    kill_dead_registry_locks
-}
-
-XCOMM Convenience function to obtain a list of available Xprint servers
-do_get_xpserverlist()
-{
-    if [ -f "${XP_PER_USER_SERVERS}" -o -f "${XP_GLOBAL_SERVERS}" ] ; then
-        xpserverlist=$(
-          # Enumerate both per-user and global servers (in that order)
-          (
-            [ -f "${XP_PER_USER_SERVERS}" ]  && cat "${XP_PER_USER_SERVERS}"
-            [ -f "${XP_GLOBAL_SERVERS}"   ]  && cat "${XP_GLOBAL_SERVERS}"
-          ) |
-            egrep "^display=.*:.* pid=[0-9]*$|^display=.*:[0-9]*$" |
-              while read i ; do
-                  (
-                    pid="none"
-                    eval ${i}
-                    # Check if the Xprt process exists (if possible)
-                    if [ "$pid" != "none" ] ; then
-                        if pexists ${pid} ; then
-                            echo ${display}
-                        fi
-                    else
-                        echo ${display}
-                    fi
-                  )
-              done | tr "\n" " "
-          )
-        # Only produce output if we have some entries...
-        [ "${xpserverlist}" != "" ] && echo "${xpserverlist}"
-    fi
-}
-
-do_restart()
-{
-    msg "Restarting Xprint server(s): Xprt."
-    do_stop
-    sleep 1
-    do_start
-}
-
-do_diag()
-{
-    echo "##### Diag start $(date)."
-    
-    # General info
-    echo "## General info start."
-    (
-      echo "PATH=\"${PATH}\""
-      echo "TZ=\"${TZ}\""
-      echo "LANG=\"${LANG}\""
-      echo "uname -a=\"$(uname -a)\""
-      echo "uname -s=\"$(uname -s)\""
-      echo "uname -p=\"$(uname -p)\""
-      echo "uname -i=\"$(uname -i)\""
-      echo "uname -m=\"$(uname -m)\""
-      echo "has /etc/SuSE-release ... $([ -f "/etc/SuSE-release" ] && echo "yes" || echo "no")"
-      echo "has /etc/redhat-release ... $([ -f "/etc/redhat-release" ] && echo "yes" || echo "no")"
-      echo "has /etc/debian_version ... $([ -f "/etc/debian_version" ] && echo "yes" || echo "no")"
-      echo "how many Xprt servers are running ...$(ps -ef | fgrep Xprt | fgrep -v "grep" | wc -l)"
-    ) 2>&1 | while read i ; do echo "  $i" ; done
-    echo "## General info end."
-    
-    # Testing font paths
-    echo "## Testing font paths start."
-    (
-      get_system_fontlist |
-          filter_unsupported_fonts |
-          sort_scaleable_fonts_first | 
-          validate_fontlist | while read d ; do
-          echo "#### Testing \"${d}\" ..."
-          if [ ! -d "$d" ] ; then
-              echo "# Error: $d does not exists."
-              continue
-          fi
-          if [ ! -r "$d" ] ; then
-              echo "# Error: $d not readable."
-              continue
-          fi
-          if [ ! -f "${d}/fonts.dir" ] ; then
-              echo "# Error: ${d}/fonts.dir not found."
-              continue
-          else
-              if [ ! -r "${d}/fonts.dir" ] ; then
-                  echo "# Error: ${d}/fonts.dir not readable."
-                  continue
-              fi
-          fi
-          if [ -f "${d}/fonts.alias" ] ; then
-              if [ ! -r "${d}/fonts.alias" ] ; then
-                  echo "# Error: ${d}/fonts.alias not readable."
-              fi
-          fi
-
-          if [ "$(cat "${d}/fonts.dir" | fgrep 'cursor')" != "" ] ; then
-              echo "${d}/fonts.dir has cursor font."
-          fi
-          if [ "$(cat "${d}/fonts.dir" | fgrep 'fixed')" != "" ] ; then
-              echo "${d}/fonts.dir has fixed font."
-          fi
-
-          if [ -r "${d}/fonts.alias" ] ; then 
-              if [ "$(cat "${d}/fonts.alias" | fgrep 'cursor')" != "" ] ; then
-                  echo "${d}/fonts.alias has cursor font."
-              fi
-              if [ "$(cat "${d}/fonts.alias" | fgrep 'fixed')" != "" ] ; then
-                  echo "${d}/fonts.alias has fixed font."
-              fi
-          fi
-
-          linenum=0
-          cat "${d}/fonts.dir" | while read i1 i2 i3 i4 ; do
-              linenum=$((${linenum} + 1))
-              [ ${linenum} -eq 1 ] && continue
-
-              if [ ! -f "${d}/${i1}" ] ; then
-                  echo "ERROR: ${d}/fonts.dir line ${linenum} has non-exististant font \"${i1}\" (=\"${i1} ${i2} ${i3} ${i4}\")"
-              fi
-          done
-      done
-    ) 2>&1 | while read i ; do echo "  $i" ; done
-    echo "## Testing font paths end."
-    
-    echo "##### Diag End $(date)."
-}
-
-XCOMM Set platform-defaults for setup_config()
-setup_config_defaults()
-{
-    curr_num_xpstart="${1}"
-    
-    #### Defaults for Linux/Solaris
-    # Start Xprt using builtin XPCONFIGDIR at a free display numer
-    # (Solaris(=SunOS5.x)'s /usr/openwin/bin/Xprt supports TrueType fonts,
-    # therefore we don't need to filter them)
-                      xpstart_fontpath[${curr_num_xpstart}]="";
-        xpstart_fontpath_acceptpattern[${curr_num_xpstart}]=".*";
-        xpstart_fontpath_rejectpattern[${curr_num_xpstart}]="/Speedo|/F3bitmaps|/F3";
-                     xpstart_displayid[${curr_num_xpstart}]="";
-                   xpstart_xpconfigdir[${curr_num_xpstart}]="";
-                        xpstart_xpfile[${curr_num_xpstart}]="";
-                    xpstart_auditlevel[${curr_num_xpstart}]="4";
-                       xpstart_options[${curr_num_xpstart}]="";
-                        xpstart_logger[${curr_num_xpstart}]="";
-    # Check whether we have /dev/stderr (needed for old AIX + old Debian)
-    if [ -w "/dev/stderr" ] ; then
-                       xpstart_logfile[${curr_num_xpstart}]="/dev/stderr";
-    else
-                       xpstart_logfile[${curr_num_xpstart}]="/dev/tty";
-    fi
-                   xpstart_xprt_binary[${curr_num_xpstart}]="";
-
-    # Custom rules for the GISWxprintglue package on Solaris
-    # (which uses Solaris's /usr/openwin/bin/Xprt but a custom config)
-    if [ "${XPCUSTOMGLUE}" = "GISWxprintglue" ] ; then
-        xpstart_xpconfigdir[${curr_num_xpstart}]="/opt/GISWxprintglue/server/etc/XpConfig"
-        xpstart_xprt_binary[${curr_num_xpstart}]="/usr/openwin/bin/Xprt"
-    fi
-    # Custom rules for the GISWxprint package on Solaris
-    # (which uses both it's own Xprt and a custom config)
-    if [ "${XPCUSTOMGLUE}" = "GISWxprint" ] ; then
-        xpstart_xpconfigdir[${curr_num_xpstart}]="/opt/GISWxprint/server/etc/XpConfig"
-        xpstart_xprt_binary[${curr_num_xpstart}]="/opt/GISWxprint/bin/Xprt"
-        xpstart_font_encodings_dir[${curr_num_xpstart}]="/opt/GISWxprint/lib/X11/fonts/encodings/encodings.dir"
-    fi
-    
-    #######################################################
-    ###
-    ### Debian Xprint package default configuration
-    ###
-    if [ "${XPCUSTOMGLUE}" = "DebianGlue" ] ; then
-        # Set XPCONFIGDIR=/usr/share/Xprint/xserver
-        xpstart_xpconfigdir[${curr_num_xpstart}]="/usr/share/Xprint/xserver";
-
-        # Use fixed display ID (":64"), or else all client programs will have to be
-        # restarted simply to update XPSERVERLIST to the latest ID when upgrading,
-        # which would be a nightmare.
-        xpstart_displayid[${curr_num_xpstart}]=64;
-
-        # Do not send any messages to console
-        xpstart_logfile[${curr_num_xpstart}]="/dev/null";
-
-        # By default use binary provided by Debian's "xprt-xprintorg" package
-        # (=/usr/bin/Xprt), otherwise leave blank (e.g. use script's default
-        # (=/usr/X11R6/bin/Xprt))
-        if [ -x "/usr/bin/Xprt" ] ; then
-            xpstart_xprt_binary[${curr_num_xpstart}]="/usr/bin/Xprt";
-        fi
-    fi
-    ###
-    ### End Debian default configuration
-    ###
-    #######################################################
-}
-
-fetch_etc_initd_xprint_envvars()
-{
-    curr_num_xpstart="${1}"
-
-    ## Process some $ETC_INITD_XPRINT_* vars after all which may be used by
-    # a user to override the hardcoded values here when starting Xprt per-user
-    # (a more flexible way is to provide an own setup config script in
-    # "~./Xprint_per_user_startup" - see above)
-    if [ "${ETC_INITD_XPRINT_XPRT_PATH}" != "" ] ; then
-        xpstart_xprt_binary[${curr_num_xpstart}]="${ETC_INITD_XPRINT_XPRT_PATH}"
-    fi
-    if [ "${ETC_INITD_XPRINT_XPCONFIGDIR}" != "" ] ; then
-        xpstart_xpconfigdir[${curr_num_xpstart}]="${ETC_INITD_XPRINT_XPCONFIGDIR}"
-    fi
-    if [ "${ETC_INITD_XPRINT_XPFILE}" != "" ] ; then
-        xpstart_xpfile[${curr_num_xpstart}]="${ETC_INITD_XPRINT_XPFILE}"
-    fi
-    if [ "${ETC_INITD_XPRINT_LOGFILE}" != "" ] ; then
-        xpstart_logfile[${curr_num_xpstart}]="${ETC_INITD_XPRINT_LOGFILE}"
-    fi
-    if [ "${ETC_INITD_XPRINT_DISPLAYID}" != "" ] ; then
-        xpstart_displayid[${curr_num_xpstart}]="${ETC_INITD_XPRINT_DISPLAYID}"
-    fi
-    if [ "${ETC_INITD_XPRINT_FONTPATH}" != "" ] ; then
-        xpstart_fontpath[${curr_num_xpstart}]="${ETC_INITD_XPRINT_FONTPATH}"
-    fi
-    if [ "${ETC_INITD_XPRINT_XPRT_OPTIONS}" != "" ] ; then
-        xpstart_options[${curr_num_xpstart}]="${ETC_INITD_XPRINT_XPRT_OPTIONS}"
-    fi
-    if [ "${ETC_INITD_XPRINT_AUDITLEVEL}" != "" ] ; then
-        xpstart_auditlevel[${curr_num_xpstart}]="${ETC_INITD_XPRINT_AUDITLEVEL}"
-    fi
-    if [ "${ETC_INITD_XPRINT_XF86ENCODINGSDIR}" != "" ] ; then
-        xpstart_font_encodings_dir[${curr_num_xpstart}]="${ETC_INITD_XPRINT_XF86ENCODINGSDIR}"
-    fi
-}
-
-XCOMM###########################################################################
-XCOMM setup_config() sets the configuration parameters used to start one
-XCOMM or more Xprint servers ("Xprt").
-XCOMM The following variables are used:
-XCOMM - "num_xpstart" - number of servers to start
-XCOMM - "xpstart_fontpath[index]" - custom font path. Leave blank if you want
-XCOMM   the platform-specific default
-XCOMM - "xpstart_fontpath_acceptpattern[index]" - extended regular expression
-XCOMM   (see egrep(1)) used to filter the font path - items only pass this
-XCOMM   filter if they match the pattern (leave blank if you want to filter
-XCOMM   nothing)
-XCOMM - "xpstart_fontpath_rejectpattern[index]" - extended regular expression
-XCOMM   (see egrep(1)) used to filter the font path - items only pass this
-XCOMM   filter if they do not match the pattern (leave blank if you want to
-XCOMM   filter nothing)
-XCOMM - "xpstart_font_encodings_dir[index]" - location of "encodings.dir".
-XCOMM   Leave blank to use the default.
-XCOMM - "xpstart_displayid[index]" - display id to use for the Xprint server
-XCOMM   (leave blank to choose the next available free display id)
-XCOMM - "xpstart_xpconfigdir[index]" - value for custom XPCONFIGDIR (leave blank
-XCOMM   if you don not want that that XPCONFIGDIR is set at Xprt startup)
-XCOMM - "xpstart_xpfile[index]" - value used for Xprt's "-XpFile" option (leave
-XCOMM   blank if you do not want to set this option)
-XCOMM - "xpstart_auditlevel[index]" - set Xserver auditing level (leave blank to
-XCOMM   use no auditing)
-XCOMM - "xpstart_options[index]" - set further Xprt options (leave blank to set
-XCOMM   no further options)
-XCOMM - "xpstart_logger[index]" - utility which gets stderr/stdout messages from
-XCOMM   Xprt and sends them to a logging daemon. Leave blank to use /usr/bin/logger
-XCOMM   to send such messages to the lpr.notice syslog)
-XCOMM - "xpstart_logfile[index]" - log file to append stderr/stdout messages from
-XCOMM   Xprt to. Leave blank to send messages to /dev/null
-XCOMM - "xpstart_xprt_binary[index]" - set custom Xprt binary (leave blank to use
-XCOMM   the platform-specifc default)
-setup_config()
-{
-    num_xpstart=0;
-    
-    if [ "${ETC_INITD_XPRINT_CUSTOM_SETUP_CONFIG}" != "" ] ; then
-        user_cfg="${ETC_INITD_XPRINT_CUSTOM_SETUP_CONFIG}"
-    else
-        user_cfg="${HOME}/.Xprint_per_user_startup"
-    fi
-    
-    # Source per-user ~/.Xprint_per_user_startup file if there is one
-    # (and do not use the script's defaults below)
-    if [ -r "${user_cfg}" ] ; then
-        # Define API version which should be checked by ${HOME}/.Xprint_per_user_startup
-        # ${HOME}/.Xprint_per_user_startup should bail-out if the version differ
-        etc_initd_xprint_api_version=2
-        
-        # Source per-user settings script
-        . "${user_cfg}"
-        
-        # done with setting the config for per-user Xprt instances
-        return 0;
-    else
-        # Use /etc/init.d/xprint's builtin config
-        # Each entry should start with |setup_config_defaults| to pull the
-        # platform defaults and finish with |num_xpstart=$(($num_xpstart + 1))|
-        # to end the entry
-        
-        # Set platform-defaults
-        setup_config_defaults "${num_xpstart}"
-
-        ## -- snip --
-
-        # Admins can put their stuff "in" here...
-
-        ## -- snip --
-
-        # Override script's builtin values with those a user may set via the
-        # $ETC_INIITD_XPRINT_* env vars
-        fetch_etc_initd_xprint_envvars "${num_xpstart}"
-
-        num_xpstart=$((${num_xpstart} + 1))
-
-        return 0;
-    fi
-
-    #### Sample 1:
-    # # Start Xprt on a free display ID with custom XPCONFIGDIR and without
-    # # Speedo and TrueType fonts
-    #    xpstart_fontpath_rejectpattern[$num_xpstart]="/Speedo|/TrueType|/TT(/$|$)|/TTF(/$|$)";
-    #               xpstart_xpconfigdir[$num_xpstart]="/home/gisburn/cwork/Xprint/Xprt_config/XpConfig";
-    #                xpstart_auditlevel[$num_xpstart]="4";
-    #                   xpstart_options[$num_xpstart]="-ac -pn";
-    #num_xpstart=$(($num_xpstart + 1))
-
-
-    #### Sample 2: 
-    # # Start Xprt without TrueType fonts on a display 55 with custom
-    # # XPCONFIGDIR
-    #    xpstart_fontpath_rejectpattern[$num_xpstart]="/TrueType|/TT(/$|$)|/TTF(/$|$)";
-    #                 xpstart_displayid[$num_xpstart]=55;
-    #               xpstart_xpconfigdir[$num_xpstart]="/home/gisburn/cwork/Xprint/Xprt_config/XpConfig";
-    #                xpstart_auditlevel[$num_xpstart]=4;
-    #                   xpstart_options[$num_xpstart]="-ac -pn";
-    #num_xpstart=$(($num_xpstart + 1))
-
-    #### Sample 3: 
-    # # Start Xprt without TrueType fonts on a display 56 with custom
-    # # XPCONFIGDIR and alternate "Xprinters" file
-    #    xpstart_fontpath_rejectpattern[$num_xpstart]="/TrueType|/TT(/$|$)|/TTF(/$|$)";
-    #                 xpstart_displayid[$num_xpstart]=56;
-    #               xpstart_xpconfigdir[$num_xpstart]="/etc/XpConfig/default";
-    #                    xpstart_xpfile[$num_xpstart]="/etc/XpConfig/default/Xprinters_test2"
-    #                xpstart_auditlevel[$num_xpstart]="4";
-    #                   xpstart_options[$num_xpstart]="-ac -pn";
-    #               xpstart_xprt_binary[$num_xpstart]="";
-    #num_xpstart=$(($num_xpstart + 1))
-
-    #### Sample 4:
-    # # Start Xprt with Solaris ISO-8859-7 (greek(="el") locale) fonts on
-    # # display 57
-    #                  xpstart_fontpath[$num_xpstart]="/usr/openwin/lib/locale/iso_8859_7/X11/fonts/75dpi,/usr/openwin/lib/locale/iso_8859_7/X11/fonts/Type1,/usr/openwin/lib/X11/fonts/misc/";
-    #    xpstart_fontpath_acceptpattern[$num_xpstart]="";
-    #    xpstart_fontpath_rejectpattern[$num_xpstart]="_No_Match_";
-    #                 xpstart_displayid[$num_xpstart]="57";
-    #                xpstart_auditlevel[$num_xpstart]="4";
-    #                   xpstart_options[$num_xpstart]="-ac -pn";
-    #num_xpstart=$(($num_xpstart + 1))
-
-    #### Sample 5:
-    # # Start Xprt with the font list of an existing Xserver (excluding Speedo fonts) on
-    # # display 58
-    # # Note that this only works within a X session. At system boot time
-    # # there will be no $DISPLAY to fetch the information from!!
-    #                  xpstart_fontpath[$num_xpstart]="$(get_fontlist_from_display ${DISPLAY} | fontlist2fontpath)";
-    #    xpstart_fontpath_acceptpattern[$num_xpstart]="";
-    #    xpstart_fontpath_rejectpattern[$num_xpstart]="";
-    #                 xpstart_displayid[$num_xpstart]="58";
-    #               xpstart_xpconfigdir[$num_xpstart]="";
-    #                xpstart_auditlevel[$num_xpstart]="4";
-    #                   xpstart_options[$num_xpstart]="-ac -pn";
-    #               xpstart_xprt_binary[$num_xpstart]="";
-    #num_xpstart=$(($num_xpstart + 1))
-
-    #### Sample 6:
-    # # List remote Xprt's here 
-    # # (note that there is no test to check whether these DISPLAYs are valid!)
-    #             xpstart_remote_server[$num_xpstart]="sera:12"    ; num_xpstart=$(($num_xpstart + 1))
-    #             xpstart_remote_server[$num_xpstart]="gandalf:19" ; num_xpstart=$(($num_xpstart + 1))   
-}
-
-XCOMM###########################################################################
-
-XCOMM Main
-case "$1" in
-    ## Start Xprint servers
-    'start')
-        do_start
-        ;;
-
-    ## Stop Xprint servers
-    # Note that this does _not_ kill Xprt instances started using this script 
-    # by non-root users
-    'stop')
-        do_stop
-        ;;
-
-    ## Restart Xprint servers
-    'restart'|'force-reload')
-        do_restart
-        ;;
-
-    ## Reload configuration without stopping and restarting
-    'reload')
-        # not supported
-        msg "reload not supported, use 'restart' or 'force-reload'"
-        exit 3
-        ;;
-
-    ## Restart Xprint only if it is already running
-    'condrestart'|'try-restart')
-        # only restart if it is already running
-        [ -f /var/lock/subsys/xprint ] && do_restart || :
-        ;;
-    
-    ## Get list of all Xprint servers for this user
-    # (incl. per-user and system-wide instances)    
-    'get_xpserverlist')
-        do_get_xpserverlist
-        ;;
-
-    ## Get status of Xprint servers, RedHat-style
-    'status')
-        x="$(do_get_xpserverlist)"
-        if [ "${x}" != "" ] ; then
-            msg "Xprint (${x}) is running..."
-            exit 0
-        else
-            msg "Xprint is stopped"
-            exit 3
-        fi 
-        ;;
-        
-    ## Wrapper
-    'wrapper')
-        cmd="${2}"
-        [ "${cmd}" = "" ] && fatal_error "No command given."
-        shift ; shift
-        export XPSERVERLIST="$(do_get_xpserverlist)"
-        [ "${XPSERVERLIST}" = "" ] && fatal_error "No Xprint servers found."
-        exec "${cmd}" "$@"
-        ;;
-
-    ## Wrapper for "xplsprinters"
-    'lsprinters')
-        [                  "${ETC_INITD_XPRINT_XPLSPRINTERS_PATH}" != "" ] && cmd="${ETC_INITD_XPRINT_XPLSPRINTERS_PATH}"
-        [ "${cmd}" = "" -a "${XPCUSTOMGLUE}" = "GISWxprintglue"          ] && cmd="/opt/GISWxprintglue/bin/xplsprinters"
-        [ "${cmd}" = "" -a "${XPCUSTOMGLUE}" = "GISWxprint"              ] && cmd="/opt/GISWxprint/bin/xplsprinters"
-        [ "${cmd}" = "" -a "${XPROJECTROOT}" != ""                       ] && cmd="${XPROJECTROOT}/bin/xplsprinters"
-        [ "${cmd}" = ""                                                  ] && cmd="xplsprinters"
-
-        shift
-        export XPSERVERLIST="$(do_get_xpserverlist)"
-        [ "${XPSERVERLIST}" = "" ] && fatal_error "No Xprint servers found."
-        exec "${cmd}" "$@"
-        ;;
-
-    ## Diagnostics
-    'diag')
-        do_diag
-        ;;
-    
-    ## Print usage
-    *)
-        msg "Usage: $0 { start | stop | restart | reload | force-reload | status | condrestart | try-restart | wrapper | lsprinters | get_xpserverlist | diag }"
-        exit 2
-esac
-exit 0
-
-XCOMM EOF.
diff --git a/hw/xprint/etc/profile.d/Makefile.am b/hw/xprint/etc/profile.d/Makefile.am
deleted file mode 100644
index b91a911..0000000
--- a/hw/xprint/etc/profile.d/Makefile.am
+++ /dev/null
@@ -1 +0,0 @@
-EXTRA_DIST = xprint.csh xprint.sh
diff --git a/hw/xprint/etc/profile.d/xprint.csh b/hw/xprint/etc/profile.d/xprint.csh
deleted file mode 100644
index 7cc6758..0000000
--- a/hw/xprint/etc/profile.d/xprint.csh
+++ /dev/null
@@ -1,16 +0,0 @@
-#
-# /etc/profile.d/xprint.csh
-#
-# Copyright (c) 2002-2004 by Roland Mainz <roland.mainz at nrubsig.org>
-# please send bugfixes or comments to http://xprint.mozdev.org/
-
-
-#
-# Obtain list of Xprint servers
-#
-
-if ( -f /etc/init.d/xprint ) then
-  setenv XPSERVERLIST "`/bin/sh /etc/init.d/xprint get_xpserverlist`"
-endif
-
-# /etc/profile.d/xprint.csh ends here.
diff --git a/hw/xprint/etc/profile.d/xprint.sh b/hw/xprint/etc/profile.d/xprint.sh
deleted file mode 100644
index b5b46c1..0000000
--- a/hw/xprint/etc/profile.d/xprint.sh
+++ /dev/null
@@ -1,16 +0,0 @@
-#
-# /etc/profile.d/xprint.sh
-#
-# Copyright (c) 2002-2004 by Roland Mainz <roland.mainz at nrubsig.org>
-# please send bugfixes or comments to http://xprint.mozdev.org/
-
-#
-# Obtain list of Xprint servers
-#
-
-if [ -f "/etc/init.d/xprint" ] ; then
-  XPSERVERLIST="`/bin/sh /etc/init.d/xprint get_xpserverlist`"
-  export XPSERVERLIST
-fi
-
-# /etc/profile.d/xprint.sh ends here.
diff --git a/hw/xprint/mediaSizes.c b/hw/xprint/mediaSizes.c
deleted file mode 100644
index 7acc706..0000000
--- a/hw/xprint/mediaSizes.c
+++ /dev/null
@@ -1,782 +0,0 @@
-/*
-(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:		mediaSizes.c
-**    *
-**    *  Contents:
-**    *                 Routines to return the sizes associated
-**    *                 with particular media and particular printers.
-**    *
-**    *  Created:	2/19/96
-**    *
-**    *  Copyright:	Copyright 1993,1995 Hewlett-Packard Company
-**    *
-**    *********************************************************
-** 
-********************************************************************/
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#include <unistd.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <ctype.h>
-#include <string.h>
-#include <locale.h>
-
-#include <X11/X.h>
-#include "dixstruct.h"
-#include "screenint.h"
-#include "misc.h"
-#include "scrnintstr.h"
-#include <X11/fonts/fontstruct.h>
-
-#include "DiPrint.h"
-#include "attributes.h"
-
-typedef struct {
-    XpOid page_size;
-    float width;
-    float height;
-} PageDimensionsRec;
-
-static PageDimensionsRec PageDimensions[] =
-{
-    {xpoid_val_medium_size_na_letter,		215.9,		279.4},
-    {xpoid_val_medium_size_na_legal,		215.9,		355.6},
-    {xpoid_val_medium_size_executive,		184.15,		266.7},
-    {xpoid_val_medium_size_folio,		210.82,		330.2},
-    {xpoid_val_medium_size_invoice,		139.7,		215.9},
-    {xpoid_val_medium_size_ledger,		279.4,		431.8},
-    {xpoid_val_medium_size_quarto,		215.9,		275.082},
-    {xpoid_val_medium_size_a,			215.9,		279.4},
-    {xpoid_val_medium_size_b,			279.4,		431.8},
-    {xpoid_val_medium_size_c,			431.8,		558.8},
-    {xpoid_val_medium_size_d,			558.8,		863.6},
-    {xpoid_val_medium_size_e,			863.6,		1117.6},
-    {xpoid_val_medium_size_na_6x9_envelope,	152.4,		228.6},
-    {xpoid_val_medium_size_na_10x15_envelope,	254,		381},
-    {xpoid_val_medium_size_monarch_envelope,	98.298,		190.5},
-    {xpoid_val_medium_size_na_10x13_envelope,	254,		330.2},
-    {xpoid_val_medium_size_na_9x12_envelope,	228.6,		304.8},
-    {xpoid_val_medium_size_na_number_10_envelope, 104.775,	241.3},
-    {xpoid_val_medium_size_na_7x9_envelope,	177.8,		228.6},
-    {xpoid_val_medium_size_na_9x11_envelope,	228.6,		279.4},
-    {xpoid_val_medium_size_na_10x14_envelope,	254,		355.6},
-    {xpoid_val_medium_size_na_number_9_envelope, 98.425,	225.425},
-    {xpoid_val_medium_size_iso_a0,		841,		1189},
-    {xpoid_val_medium_size_iso_a1,		594,		841},
-    {xpoid_val_medium_size_iso_a2,		420,		594},
-    {xpoid_val_medium_size_iso_a3,		297,		420},
-    {xpoid_val_medium_size_iso_a4,		210,		297},
-    {xpoid_val_medium_size_iso_a5,		148,		210},
-    {xpoid_val_medium_size_iso_a6,		105,		148},
-    {xpoid_val_medium_size_iso_a7,		74,		105},
-    {xpoid_val_medium_size_iso_a8,		52,		74},
-    {xpoid_val_medium_size_iso_a9,		37,		52},
-    {xpoid_val_medium_size_iso_a10,		26,		37},
-    {xpoid_val_medium_size_iso_b0,		1000,		1414},
-    {xpoid_val_medium_size_iso_b1,		707,		1000},
-    {xpoid_val_medium_size_iso_b2,		500,		707},
-    {xpoid_val_medium_size_iso_b3,		353,		500},
-    {xpoid_val_medium_size_iso_b4,		250,		353},
-    {xpoid_val_medium_size_iso_b5,		176,		250},
-    {xpoid_val_medium_size_iso_b6,		125,		176},
-    {xpoid_val_medium_size_iso_b7,		88,		125},
-    {xpoid_val_medium_size_iso_b8,		62,		88},
-    {xpoid_val_medium_size_iso_b9,		44,		62},
-    {xpoid_val_medium_size_iso_b10,		31,		44},
-    {xpoid_val_medium_size_jis_b0,		1030,		1456},
-    {xpoid_val_medium_size_jis_b1,		728,		1030},
-    {xpoid_val_medium_size_jis_b2,		515,		728},
-    {xpoid_val_medium_size_jis_b3,		364,		515},
-    {xpoid_val_medium_size_jis_b4,		257,		364},
-    {xpoid_val_medium_size_jis_b5,		182,		257},
-    {xpoid_val_medium_size_jis_b6,		128,		182},
-    {xpoid_val_medium_size_jis_b7,		91,		128},
-    {xpoid_val_medium_size_jis_b8,		64,		91},
-    {xpoid_val_medium_size_jis_b9,		45,		64},
-    {xpoid_val_medium_size_jis_b10,		32,		45},
-    {xpoid_val_medium_size_hp_2x_postcard,	148,		200},
-    {xpoid_val_medium_size_hp_european_edp,	304.8,		355.6},
-    {xpoid_val_medium_size_hp_mini,		139.7,		215.9},
-    {xpoid_val_medium_size_hp_postcard,		100,		148},
-    {xpoid_val_medium_size_hp_tabloid,		279.4,		431.8},
-    {xpoid_val_medium_size_hp_us_edp,		279.4,		355.6},
-    {xpoid_val_medium_size_hp_us_government_legal,	203.2,	330.2},
-    {xpoid_val_medium_size_hp_us_government_letter,	203.2,	254},
-    {xpoid_val_medium_size_iso_c3,		324,		458},
-    {xpoid_val_medium_size_iso_c4,		229,		324},
-    {xpoid_val_medium_size_iso_c5,		162,		229},
-    {xpoid_val_medium_size_iso_c6,		114,		162},
-    {xpoid_val_medium_size_iso_designated_long,	110,		220}
-};
-
-/*
- * XpGetResolution returns an integer representing the printer resolution
- * in dots-per-inch for the specified print context.
- *
- * Note: This routine assumes the values found in the passed context's
- *       attributes pools have been validated.
- */
-int
-XpGetResolution(
-		XpContextPtr pContext)
-{
-    unsigned long resolution;
-
-    resolution = XpGetCardAttr(pContext, XPPageAttr,
-			       xpoid_att_default_printer_resolution,
-			       (XpOidCardList*)NULL);
-    if(0 == resolution)
-	resolution = XpGetCardAttr(pContext, XPDocAttr,
-				   xpoid_att_default_printer_resolution,
-				   (XpOidCardList*)NULL);
-    if(0 == resolution)
-    {
-	XpOidCardList* resolutions_supported;
-	/*
-	 * default-printer-resolution not specified; default to 1st entry
-	 * in printer-resolutions-supported.
-	 */
-	resolutions_supported =
-	    XpGetCardListAttr(pContext, XPPrinterAttr,
-			      xpoid_att_printer_resolutions_supported,
-			      (XpOidCardList*)NULL);
-	resolution = XpOidCardListGetCard(resolutions_supported, 0);
-	XpOidCardListDelete(resolutions_supported);
-    }
-    return (int)resolution;
-}
-
-/*
- * XpGetContentOrientation determines the content-orientation as
- * determined by the passed context. The page and document pools are
- * queried in turn for a specified content-orientation attribute. If none
- * is found the first content-orientation in the
- * content-orientations-supported printer attribute is taken as the
- * default. 
- *
- * Note: This routine assumes the values found in the passed context's
- *       attributes pools have been validated.
- */
-XpOid
-XpGetContentOrientation(
-			XpContextPtr pContext)
-{
-    XpOid orientation;
-
-    orientation = XpGetOidAttr(pContext, XPPageAttr,
-			       xpoid_att_content_orientation,
-			       (XpOidList*)NULL);
-    if(xpoid_none == orientation)
-	orientation = XpGetOidAttr(pContext, XPDocAttr,
-				   xpoid_att_content_orientation,
-				   (XpOidList*)NULL);
-    if(xpoid_none == orientation)
-    {
-	XpOidList* content_orientations_supported;
-
-	content_orientations_supported =
-	    XpGetListAttr(pContext, XPPrinterAttr,
-			  xpoid_att_content_orientations_supported,
-			  (XpOidList*)NULL);
-	orientation = XpOidListGetOid(content_orientations_supported, 0);
-	XpOidListDelete(content_orientations_supported);
-    }
-    return orientation;
-}
-
-/*
- * XpGetAvailableCompression determines the available-compression as
- * determined by the passed context. The page and document pools are
- * queried in turn for a specified content-orientation attribute. If none
- * is found the first available-compression in the
- * avaiable-compressions-supported printer attribute is taken as the
- * default.
- *
- * Note: This routine assumes the values found in the passed context's
- *       attributes pools have been validated.
- */
-XpOid
-XpGetAvailableCompression(
-			XpContextPtr pContext)
-{
-    XpOid compression;
-
-    compression = XpGetOidAttr(pContext, XPPageAttr,
-			       xpoid_att_available_compression,
-			       (XpOidList*)NULL);
-    if(xpoid_none == compression)
-	compression = XpGetOidAttr(pContext, XPDocAttr,
-				   xpoid_att_available_compression,
-				   (XpOidList*)NULL);
-    if(xpoid_none == compression)
-    {
-	XpOidList* available_compressions_supported;
-
-	available_compressions_supported =
-	    XpGetListAttr(pContext, XPPrinterAttr,
-			  xpoid_att_available_compressions_supported,
-			  (XpOidList*)NULL);
-	compression = XpOidListGetOid(available_compressions_supported, 0);
-	XpOidListDelete(available_compressions_supported);
-    }
-    return compression;
-}
-
-/*
- * XpGetPlex determines the plex as determined by the passed context. The page
- * and document pools are queried in turn for a specified plex attribute. If
- * none is found the first plex in the plexes-supported printer attribute is
- * taken as the default.
- *
- * Note: This routine assumes the values found in the passed context's
- *       attributes pools have been validated.
- */
-XpOid
-XpGetPlex(
-	  XpContextPtr pContext)
-{
-    XpOid plex;
-
-    plex = XpGetOidAttr(pContext, XPPageAttr, xpoid_att_plex,
-			(XpOidList*)NULL);
-    if(xpoid_none == plex)
-	plex = XpGetOidAttr(pContext, XPDocAttr, xpoid_att_plex,
-			    (XpOidList*)NULL);
-    if(xpoid_none == plex)
-    {
-	XpOidList* plexes_supported;
-
-	plexes_supported =
-	    XpGetListAttr(pContext, XPPrinterAttr,
-			  xpoid_att_plexes_supported,
-			  (XpOidList*)NULL);
-	plex = XpOidListGetOid(plexes_supported, 0);
-	XpOidListDelete(plexes_supported);
-    }
-    return plex;
-}
-
-/*
- * XpGetPageSize returns the XpOid of the current page size (medium names
- * are page sizes in this implementation) as indicated by the passed
- * context.
- *
- * The relevant input-tray is returned in pTray. This parm must not be
- * NULL. If the input-tray is not indicated or irrelevant, xpoid_none
- * will be returned.
- *
- * This function optionally takes a XpOidMediumSS representation of the
- * medium-source-sizes-supported attribute in order to avoid parsing the
- * string value twice for calling functions that need to parse m-s-s-s
- * anyway (e.g. XpGetReproductionArea). If the caller has no other reason
- * to parse medium-source-sizes-supported, it is recommended that NULL be
- * passed.  This function will obtain medium-source-sizes-supported if it
- * needs to.
- *
- * Note: This routine assumes the values found in the passed context's
- *       attributes pools have been validated.
- */
-XpOid
-XpGetPageSize(XpContextPtr pContext,
-	    XpOid* pTray,
-	    const XpOidMediumSS* msss)
-{
-    XpOid medium;
-    /*
-     * check to see if default-medium is specified
-     */
-    medium = XpGetOidAttr(pContext, XPPageAttr, xpoid_att_default_medium,
-			  (const XpOidList*)NULL);
-    if(medium == xpoid_none)
-    {
-	/*
-	 * default-medium not in page pool; try the document pool
-	 */
-	medium = XpGetOidAttr(pContext, XPDocAttr, xpoid_att_default_medium,
-			      (const XpOidList*)NULL);
-    }
-    if(medium == xpoid_none)
-    {
-	/*
-	 * default-medium not specified; try default-input-tray
-	 */
-	*pTray = XpGetOidAttr(pContext, XPPageAttr,
-			      xpoid_att_default_input_tray,
-			      (const XpOidList*)NULL);
-	if(*pTray == xpoid_none)
-	{
-	    /*
-	     * default-input-tray not in page pool; try the document pool
-	     */
-	    *pTray = XpGetOidAttr(pContext, XPDocAttr,
-				  xpoid_att_default_input_tray,
-				  (const XpOidList*)NULL);
-	}
-	if(*pTray != xpoid_none)
-	{
-	    /*
-	     * default-input-tray found; get corresponding medium from
-	     * input-trays-medium
-	     */
-	    XpOidTrayMediumList* input_trays_medium;
-	    int i;
-	    
-	    input_trays_medium =
-		XpGetTrayMediumListAttr(pContext, XPPrinterAttr,
-					xpoid_att_input_trays_medium,
-					(const XpOidList*)NULL,
-					(const XpOidMediumSS*)NULL);
-	    for(i = 0; i < XpOidTrayMediumListCount(input_trays_medium); i++)
-	    {
-		if(*pTray == XpOidTrayMediumListTray(input_trays_medium, i))
-		{
-		    medium = XpOidTrayMediumListMedium(input_trays_medium, i);
-		    break;
-		}
-	    }
-	    XpOidTrayMediumListDelete(input_trays_medium);
-	}
-    }
-    else
-	*pTray = xpoid_none;
-    
-    if(medium == xpoid_none)
-    {
-	XpOidMediumSS* local_msss = (XpOidMediumSS*)NULL;
-	int i_mss, i_ds;
-	XpOidMediumDiscreteSizeList* ds_list;
-	/*
-	 * no medium specified; use 1st page size found in
-	 * medium-source-sizes-supported
-	 */
-	if((XpOidMediumSS*)NULL == msss)
-	    msss = local_msss =
-		XpGetMediumSSAttr(pContext, XPPrinterAttr,
-				  xpoid_att_medium_source_sizes_supported,
-				  (const XpOidList*)NULL,
-				  (const XpOidList*)NULL);
-	for(i_mss = 0;
-	    i_mss < XpOidMediumSSCount(msss) && xpoid_none == medium;
-	    i_mss++)
-	{
-	    if(XpOidMediumSS_DISCRETE == (msss->mss)[i_mss].mstag
-	       &&
-	       xpoid_none != (msss->mss)[i_mss].input_tray)
-	    {
-		ds_list =  (msss->mss)[i_mss].ms.discrete;
-		for(i_ds = 0; i_ds < ds_list->count; i_ds++)
-		{
-		    if(xpoid_none != (ds_list->list)[i_ds].page_size)
-		    {
-			medium = (ds_list->list)[i_ds].page_size;
-			break;
-		    }
-		}
-	    }
-	}
-	XpOidMediumSSDelete(local_msss);
-    }
-    return medium;
-}
-
-/*
- * XpGetMediumMillimeters returns into the supplied float pointers the
- * width and height in millimeters of the passed page size identifier.
- */
-void
-XpGetMediumMillimeters(
-		       XpOid page_size,
-		       float *width,  /* return */
-		       float *height) /* return */
-{
-    int i;
-
-    *width = *height = 0;
-    for(i = 0; i < XpNumber(PageDimensions); i++)
-    {
-	if(page_size == PageDimensions[i].page_size)
-	{
-	    *width = PageDimensions[i].width;
-	    *height = PageDimensions[i].height;
-	    return;
-	}
-    }
-}
-
-/*
- * Converts a millimeter specification into pixels given a resolution in
- * DPI.
- */
-static float
-MmToPixels(float mm, int resolution)
-{
-    float f;
-
-    f = mm * resolution;
-    f /= 25.4;
-    return f;
-}
-
-/*
- * XpGetMediumDimensions returns into the supplied short pointers the
- * width and height in pixels of the medium associated with the specified
- * print context. It obtains the page size associated with the current
- * medium by calling XpGetPageSize. It passes XpGetMediumMillimeters the
- * page size, and converts the returned millimeter dimensions into pixels
- * using the resolution returned by XpGetResolution.
- *
- * Note: This routine assumes the values found in the passed context's
- *       attributes pools have been validated.
- */
-void
-XpGetMediumDimensions(
-		      XpContextPtr pContext,
-		      unsigned short *width,  /* return */
-		      unsigned short *height) /* return */
-{
-    XpOid page_size;
-    XpOid tray;
-    XpOid orientation;
-    
-    int resolution;
-    float w_mm, h_mm;
-    
-    page_size = XpGetPageSize(pContext, &tray, (XpOidMediumSS*)NULL);
-    if(page_size == xpoid_none)
-    {
-	/*
-	 * fail-safe: if the pools have been validated, this defaulting logic
-	 *            isn't needed.
-	 */
-	page_size = xpoid_val_medium_size_na_letter;
-    }
-    XpGetMediumMillimeters(page_size, &w_mm, &h_mm);
-    resolution = XpGetResolution(pContext);
-    orientation = XpGetContentOrientation(pContext);
-    switch(orientation)
-    {
-    case xpoid_val_content_orientation_landscape:
-    case xpoid_val_content_orientation_reverse_landscape:
-	/*
-	 * transpose width and height
-	 */
-	*height = MmToPixels(w_mm, resolution);
-	*width = MmToPixels(h_mm, resolution);
-	break;
-
-    default:
-	*width = MmToPixels(w_mm, resolution);
-	*height = MmToPixels(h_mm, resolution);
-	break;
-    }
-}
-
-/*
- * XRectangleFromXpOidArea converts an XpOidArea area specification
- * into an XRectangle. The passed resolution is used to convert from
- * millimeters (XpOidArea) into pixels (XRectangle).
- */
-static void
-XRectangleFromXpOidArea(
-			xRectangle *pRect,
-			const XpOidArea* repro,
-			int resolution,
-			XpOid orientation)
-{
-    switch(orientation)
-    {
-    case xpoid_val_content_orientation_landscape:
-    case xpoid_val_content_orientation_reverse_landscape:
-	/*
-	 * transpose x and y, width and height
-	 */
-	pRect->y = MmToPixels(repro->minimum_x, resolution);
-	pRect->x = MmToPixels(repro->minimum_y, resolution);
-	pRect->height =
-	    MmToPixels(repro->maximum_x - repro->minimum_x, resolution);
-	pRect->width =
-	    MmToPixels(repro->maximum_y - repro->minimum_y, resolution);
-	break;
-
-    default:
-	pRect->x = MmToPixels(repro->minimum_x, resolution);
-	pRect->y = MmToPixels(repro->minimum_y, resolution);
-	pRect->width =
-	    MmToPixels(repro->maximum_x - repro->minimum_x, resolution);
-	pRect->height =
-	    MmToPixels(repro->maximum_y - repro->minimum_y, resolution);
-	break;
-    }
-}
-
-/*
- * XpGetReproductionArea queries the current pool attribute values in
- * order to determine the reproduction area for the currently selected
- * medium.
- *
- * First the current page size (equivalent to current medium) and tray
- * (if specified) is retrieved via XpGetPageSize. The value of the
- * medium-source-sizes-supported attribute is interrogated until a matching
- * entry for the current page size and tray is found. The reproduction
- * area defined for the current entry is converted into an XRectangle
- * using XRectangleFromXpOidArea and returned to the caller.
- *
- * Note: This routine assumes the values found in the passed context's
- *       attributes pools have been validated.
- */
-void
-XpGetReproductionArea(XpContextPtr pContext,
-		      xRectangle *pRect)
-{
-    XpOid page_size;
-    XpOid tray;
-    XpOidMediumSS* msss;
-    int i_mss, i_ds;
-    XpOidMediumDiscreteSizeList* ds_list;
-    XpOidArea* repro;
-    BOOL done;
-    int resolution;
-    XpOid orientation;
-    /*
-     * find the appropriate assured reproduction area for the current
-     * tray and page size in the medium-source-sizes-supported attribute.
-     */
-    msss = XpGetMediumSSAttr(pContext, XPPrinterAttr,
-			     xpoid_att_medium_source_sizes_supported,
-			     (const XpOidList*)NULL,
-			     (const XpOidList*)NULL);
-    page_size = XpGetPageSize(pContext, &tray, msss);
-    resolution = XpGetResolution(pContext);
-    orientation = XpGetContentOrientation(pContext);
-    
-    memset(pRect, 0, sizeof(xRectangle));
-
-    if(xpoid_none == tray)
-    {
-	/*
-	 * no tray specified; use 1st matching page size
-	 */
-	for(i_mss = 0, done = xFalse;
-	    i_mss < XpOidMediumSSCount(msss) && !done;
-	    i_mss++)
-	{
-	    if(XpOidMediumSS_DISCRETE == (msss->mss)[i_mss].mstag
-	       &&
-	       xpoid_none != (msss->mss)[i_mss].input_tray)
-	    {
-		ds_list =  (msss->mss)[i_mss].ms.discrete;
-		for(i_ds = 0; i_ds < ds_list->count; i_ds++)
-		{
-		    if(page_size == (ds_list->list)[i_ds].page_size)
-		    {
-			repro =
-			    &(ds_list->list)[i_ds].assured_reproduction_area;
-			XRectangleFromXpOidArea(pRect, repro,
-						resolution, orientation);
-			done = xTrue;
-			break;
-		    }
-		}
-	    }
-	}
-    }
-    else
-    {
-	/*
-	 * tray && page size specified; find matching entry
-	 */
-	for(i_mss = 0, done = xFalse;
-	    i_mss < XpOidMediumSSCount(msss) && !done;
-	    i_mss++)
-	{
-	    if(XpOidMediumSS_DISCRETE == (msss->mss)[i_mss].mstag
-	       &&
-	       xpoid_none != (msss->mss)[i_mss].input_tray
-	       &&
-	       (tray == (msss->mss)[i_mss].input_tray
-		||
-		xpoid_unspecified == (msss->mss)[i_mss].input_tray)
-	       )
-	    {
-		ds_list =  (msss->mss)[i_mss].ms.discrete;
-		for(i_ds = 0; i_ds < ds_list->count; i_ds++)
-		{
-		    if(page_size == (ds_list->list)[i_ds].page_size)
-		    {
-			repro =
-			    &(ds_list->list)[i_ds].assured_reproduction_area;
-			XRectangleFromXpOidArea(pRect, repro,
-						resolution, orientation);
-			if(xpoid_unspecified != (msss->mss)[i_mss].input_tray)
-			{
-			    /*
-			     * exact match on tray takes precendence over
-			     * unspecified tray entry in m-s-s-s
-			     */
-			    done = xTrue;
-			}
-			break;
-		    }
-		}
-	    }
-	}
-    }
-    XpOidMediumSSDelete(msss);
-}
-
-/*
- * XpGetMaxWidthHeightRes returns into the supplied width and height
- * unsigned short pointers the dimensions in millimeters of the largest
- * supported media for a specific printer.  It looks at the
- * medium-source-sizes-supported attribute (if it exists) to determine
- * the list of possible media, and calls XpGetMediumMillimeters to get the
- * dimensions for each medium.  If the m-s-s-s attribute is not defined,
- * then the dimensions for the na-letter medium is returned.
- *
- * This function also returns the largest resolution in DPI defined in
- * printer-resolutions-supported. If printer-resolutions-supported is not
- * specified, the default is obtained from the passed XpValidatePoolsRec.
- *
- * The passed XpValidatePoolsRec is also used to determine valid values
- * when parsing attribute values.
- */
-void
-XpGetMaxWidthHeightRes(
-		       const char *printer_name,
-		       const XpValidatePoolsRec* vpr,
-		       float *width,
-		       float *height,
-		       int* resolution)
-{
-    const char* value;
-    const char* attr_str;
-    XpOidMediumSS* pool_msss;
-    const XpOidMediumSS* msss;
-    int i_mss, i_ds;
-    XpOidMediumDiscreteSizeList* ds_list;
-    float w, h;
-    XpOidCardList* pool_resolutions_supported;
-    const XpOidCardList* resolutions_supported;
-    int i;
-    int res;
-    /*
-     * get the max medium width and height
-     */
-    attr_str = XpOidString(xpoid_att_medium_source_sizes_supported);
-    value = XpGetPrinterAttribute(printer_name, attr_str);
-    pool_msss = XpOidMediumSSNew(value,
-				 vpr->valid_input_trays,
-				 vpr->valid_medium_sizes);
-    if(0 == XpOidMediumSSCount(pool_msss))
-	msss = XpGetDefaultMediumSS();
-    else
-	msss = pool_msss;
-    *width = *height = 0;
-    for(i_mss = 0; i_mss < XpOidMediumSSCount(msss); i_mss++)
-    {
-	if(XpOidMediumSS_DISCRETE == (msss->mss)[i_mss].mstag
-	   &&
-	   xpoid_none != (msss->mss)[i_mss].input_tray)
-	{
-	    ds_list = (msss->mss)[i_mss].ms.discrete;
-	    for(i_ds = 0; i_ds < ds_list->count; i_ds++)
-	    {
-		if(xpoid_none != (ds_list->list)[i_ds].page_size)
-		{
-		    XpGetMediumMillimeters((ds_list->list)[i_ds].page_size,
-					   &w, &h);
-		    if(w > *width) *width = w;
-		    if(h > *height) *height = h;
-		}
-	    }
-	}
-    }
-    XpOidMediumSSDelete(pool_msss);
-    /*
-     * get the maximum resolution
-     */
-    attr_str = XpOidString(xpoid_att_printer_resolutions_supported);
-    value = XpGetPrinterAttribute(printer_name, attr_str);
-    pool_resolutions_supported =
-	XpOidCardListNew(value, vpr->valid_printer_resolutions_supported);
-    if(0 == XpOidCardListCount(pool_resolutions_supported))
-	resolutions_supported = vpr->default_printer_resolutions_supported;
-    else
-	resolutions_supported = pool_resolutions_supported;
-    *resolution = 0;
-    for(i = 0; i < XpOidCardListCount(resolutions_supported); i++)
-    {
-	res = XpOidCardListGetCard(resolutions_supported, i);
-	if(res > *resolution) *resolution = res;
-    }
-    XpOidCardListDelete(pool_resolutions_supported);
-}
-
-FontResolutionPtr
-XpGetClientResolutions(client, num)
-    ClientPtr client;
-    int *num;
-{
-    static struct _FontResolution res;
-    int resolution = XpGetResolution(XpContextOfClient(client)); 
-    
-    res.x_resolution = resolution;
-    res.y_resolution = resolution;
-
-    res.point_size = 120;
-
-    *num = 1;
-
-    return &res;
-}
-
-
-void XpSetFontResFunc(client)
-    ClientPtr client;
-{
-    client->fontResFunc = XpGetClientResolutions;
-}
-
-
-void XpUnsetFontResFunc(client)
-    ClientPtr client;
-{
-    client->fontResFunc = NULL;
-}
diff --git a/hw/xprint/pcl-mono/Makefile.am b/hw/xprint/pcl-mono/Makefile.am
deleted file mode 100644
index 4d8dfc6..0000000
--- a/hw/xprint/pcl-mono/Makefile.am
+++ /dev/null
@@ -1,5 +0,0 @@
-noinst_LTLIBRARIES = libpcl.la
-
-PCL_DRIVER = -DXP_PCL_MONO
-
-include ../pcl/Makefile.am.inc
diff --git a/hw/xprint/pcl/Makefile.am b/hw/xprint/pcl/Makefile.am
deleted file mode 100644
index 90133e8..0000000
--- a/hw/xprint/pcl/Makefile.am
+++ /dev/null
@@ -1,6 +0,0 @@
-noinst_LTLIBRARIES = libpcl.la
-
-PCL_DRIVER = -DXP_PCL_COLOR
-
-include ../pcl/Makefile.am.inc
-
diff --git a/hw/xprint/pcl/Makefile.am.inc b/hw/xprint/pcl/Makefile.am.inc
deleted file mode 100644
index c3af606..0000000
--- a/hw/xprint/pcl/Makefile.am.inc
+++ /dev/null
@@ -1,27 +0,0 @@
-INCLUDES = -I$(top_srcdir)/hw/xprint
- 
-AM_CFLAGS = @DIX_CFLAGS@ @XPRINT_CFLAGS@ -D_XP_PRINT_SERVER_ $(PCL_DRIVER)
- 
-libpcl_la_SOURCES =		\
-	$(srcdir)/../pcl/PclArc.c	\
-	$(srcdir)/../pcl/PclArea.c	\
-	$(srcdir)/../pcl/PclAttr.c	\
-	$(srcdir)/../pcl/PclAttVal.c	\
-	$(srcdir)/../pcl/PclColor.c	\
-	$(srcdir)/../pcl/PclCursor.c	\
-	$(srcdir)/../pcl/PclDef.h	\
-	$(srcdir)/../pcl/PclFonts.c	\
-	$(srcdir)/../pcl/PclGC.c	\
-	$(srcdir)/../pcl/Pcl.h		\
-	$(srcdir)/../pcl/PclInit.c	\
-	$(srcdir)/../pcl/PclLine.c	\
-	$(srcdir)/../pcl/Pclmap.h	\
-	$(srcdir)/../pcl/PclMisc.c	\
-	$(srcdir)/../pcl/PclPixel.c	\
-	$(srcdir)/../pcl/PclPolygon.c	\
-	$(srcdir)/../pcl/PclPrint.c	\
-	$(srcdir)/../pcl/PclSFonts.c	\
-	$(srcdir)/../pcl/PclSFonts.h	\
-	$(srcdir)/../pcl/PclSpans.c	\
-	$(srcdir)/../pcl/PclText.c	\
-	$(srcdir)/../pcl/PclWindow.c
diff --git a/hw/xprint/pcl/Pcl.h b/hw/xprint/pcl/Pcl.h
deleted file mode 100644
index d46a034..0000000
--- a/hw/xprint/pcl/Pcl.h
+++ /dev/null
@@ -1,619 +0,0 @@
-/*******************************************************************
-**
-**    *********************************************************
-**    *
-**    *  File:		Pcl.h
-**    *
-**    *  Contents:  defines and includes for the Pcl driver
-**    *             for a printing X server.
-**    *
-**    *  Created:	1/30/95
-**    *
-**    *********************************************************
-**
-********************************************************************/
-/*
-(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.
-*/
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#ifndef _PCL_H_
-#define _PCL_H_
-
-#include <stdio.h>
-#include "scrnintstr.h"
-
-#include "PclDef.h"
-#include "Pclmap.h"
-#include "PclSFonts.h"
-
-#include <X11/extensions/Print.h>
-#include <X11/extensions/Printstr.h>
-
-#include "regionstr.h"
-#include <X11/fonts/fontstruct.h>
-#include "dixfontstr.h"
-#include "gcstruct.h"
-
-/*
- * Some sleazes to force the XrmDB stuff into the server
- */
-#ifndef HAVE_XPointer
-typedef char *XPointer;
-#endif
-#define Status int
-#define True 1
-#define False 0
-#include "misc.h"
-#include <X11/Xfuncproto.h>
-#include <X11/Xresource.h>
-#include "attributes.h"
-
-/******
- * externally visible variables from PclInit.c
- ******/
-extern DevPrivateKey PclScreenPrivateKey, PclWindowPrivateKey;
-extern DevPrivateKey PclContextPrivateKey;
-extern DevPrivateKey PclPixmapPrivateKey;
-extern DevPrivateKey PclGCPrivateKey;
-
-/******
- * externally visible variables from PclAttVal.c
- ******/
-extern XpValidatePoolsRec PclValidatePoolsRec;
-
-/*
- * This structure defines a mapping from an X colormap ID to a list of
- * print contexts which use the colormap.
- */
-typedef struct _pclcontextlist {
-    XpContextPtr context;
-    struct _pclcontextlist *next;
-} PclContextList, *PclContextListPtr;
-
-typedef struct _pclcmaptocontexts {
-    long colormapId;
-    PclContextListPtr contexts;
-    struct _pclcmaptocontexts *next;
-} PclCmapToContexts;
-
-typedef struct {
-    PclCmapToContexts *colormaps;
-    CloseScreenProcPtr CloseScreen;
-} PclScreenPrivRec, *PclScreenPrivPtr;
-
-/*
- * This structure defines a mapping from an X colormap ID to a PCL
- * palette ID.
- */
-typedef struct _palettemap {
-    long colormapId;
-    int paletteId;
-    int downloaded;
-    struct _palettemap *next;
-} PclPaletteMap, *PclPaletteMapPtr;
-
-typedef struct {
-    char *jobFileName;
-    FILE *pJobFile;
-    char *pageFileName;
-    FILE *pPageFile;
-    GC lastGC;
-    unsigned char *dash;
-    int validGC;
-    ClientPtr getDocClient;
-    int getDocBufSize;
-    PclSoftFontInfoPtr pSoftFontInfo;
-    PclPaletteMapPtr palettes;
-    int currentPalette;
-    int nextPaletteId;
-    PclPaletteMap staticGrayPalette;
-    PclPaletteMap trueColorPalette;
-    PclPaletteMap specialTrueColorPalette;
-    unsigned char *ctbl;
-    int ctbldim;
-    int isRaw;
-#ifdef XP_PCL_LJ3
-    unsigned int fcount;
-    unsigned int fcount_max;
-    char *figures;
-#endif /* XP_PCL_LJ3 */
-} PclContextPrivRec, *PclContextPrivPtr;
-
-typedef struct {
-    int validContext;
-    XpContextPtr context;
-} PclWindowPrivRec, *PclWindowPrivPtr;
-
-typedef struct {
-    unsigned long stippleFg, stippleBg;
-} PclGCPrivRec, *PclGCPrivPtr;
-
-typedef struct {
-    XpContextPtr context;
-    char *tempFileName;
-    FILE *tempFile;
-    GC lastGC;
-    int validGC;
-} PclPixmapPrivRec, *PclPixmapPrivPtr;
-
-/******
- * Defined functions
- ******/
-#define SEND_PCL(f,c) fwrite( c, sizeof( char ), strlen( c ), f )
-#define SEND_PCL_COUNT(f,c,n) fwrite( c, sizeof( char ), n, f )
-
-#ifndef XP_PCL_LJ3
-#define SAVE_PCL(f,p,c) SEND_PCL(f,c)
-#define SAVE_PCL_COUNT(f,p,c,n) SEND_PCL_COUNT(f,c,n)
-#define MACRO_START(f,p) SEND_PCL(f, "\033&f1Y\033&f0X")
-#define MACRO_END(f) SEND_PCL(f, "\033&f1X")
-#else
-#define SAVE_PCL(f,p,c) PclSpoolFigs(p, c, strlen(c))
-#define SAVE_PCL_COUNT(f,p,c,n) PclSpoolFigs(p, c, n)
-#define MACRO_START(f,p) p->fcount = 0
-#define MACRO_END(f)	/* do nothing */
-#endif /* XP_PCL_LJ3 */
-
-#define MIN(a,b) (((a)<(b))?(a):(b))
-#ifndef MAX
-#define MAX(a,b) (((a)>(b))?(a):(b))
-#endif
-
-/******
- * Functions in PclArc.c
- ******/
-extern void PclPolyArc(
-    DrawablePtr pDrawable,
-    GCPtr pGC,
-    int nArcs,
-    xArc *pArcs);
-extern void PclPolyFillArc(
-    DrawablePtr pDrawable,
-    GCPtr pGC,
-    int nArcs,
-    xArc *pArcs);
-
-/******
- * Functions in PclArea.c
- ******/
-extern void PclPutImage(
-    DrawablePtr pDrawable,
-    GCPtr pGC,
-    int depth,
-    int x,
-    int y,
-    int w,
-    int h,
-    int leftPad,
-    int format,
-    char *pImage);
-extern RegionPtr PclCopyArea(
-    DrawablePtr pSrc,
-    DrawablePtr pDst,
-    GCPtr pGC,
-    int srcx,
-    int srcy,
-    int width,
-    int height,
-    int dstx,
-    int dsty);
-RegionPtr PclCopyPlane(
-    DrawablePtr pSrc,
-    DrawablePtr pDst,
-    GCPtr pGC,
-    int srcx,
-    int srcy,
-    int width,
-    int height,
-    int dstx,
-    int dsty,
-    unsigned long plane);
-
-
-/******
- * Functions in PclAttr.c
- ******/
-extern char *PclGetAttributes(
-    XpContextPtr pCon,
-    XPAttributes pool );
-extern char *PclGetOneAttribute(
-    XpContextPtr pCon,
-    XPAttributes pool,
-    char *attr );
-extern int PclAugmentAttributes(
-    XpContextPtr pCon,
-    XPAttributes pool,
-    char *attrs );
-extern int PclSetAttributes(
-    XpContextPtr pCon,
-    XPAttributes pool,
-    char *attrs );
-
-/******
- * Functions in PclColor.c
- ******/
-extern Bool PclCreateDefColormap(ScreenPtr pScreen);
-extern Bool PclCreateColormap(ColormapPtr pColor);
-extern void PclDestroyColormap(ColormapPtr pColor);
-extern void PclInstallColormap(ColormapPtr pColor);
-extern void PclUninstallColormap(ColormapPtr pColor);
-extern int PclListInstalledColormaps(ScreenPtr pScreen,
-				      XID *pCmapList);
-extern void PclStoreColors(ColormapPtr pColor,
-			   int ndef,
-			   xColorItem *pdefs);
-extern void PclResolveColor(unsigned short *pRed,
-			    unsigned short *pGreen,
-			    unsigned short *pBlue,
-			    VisualPtr pVisual);
-extern int PclUpdateColormap(DrawablePtr pDrawable,
-			     XpContextPtr pCon,
-			     GCPtr gc,
-			     FILE *outFile);
-extern void PclLookUp(ColormapPtr cmap,
-		      PclContextPrivPtr cPriv,
-		      unsigned short *r,
-		      unsigned short *g,
-		      unsigned short *b);
-extern PclPaletteMapPtr PclFindPaletteMap(PclContextPrivPtr cPriv,
-				   ColormapPtr cmap,
-				   GCPtr gc);
-extern unsigned char *PclReadMap(char *, int *);
-
-
-/******
- * Functions in PclCursor.c
- ******/
-extern void PclConstrainCursor(
-    ScreenPtr pScreen,
-    BoxPtr pBox);
-extern void PclCursorLimits(
-    ScreenPtr pScreen,
-    CursorPtr pCursor,
-    BoxPtr pHotBox,
-    BoxPtr pTopLeftbox);
-extern Bool PclDisplayCursor(
-    ScreenPtr pScreen,
-    CursorPtr pCursor);
-extern Bool PclRealizeCursor(
-    ScreenPtr pScreen,
-    CursorPtr pCursor);
-extern Bool PclUnrealizeCursor(
-    ScreenPtr pScreen,
-    CursorPtr pCursor);
-extern void PclRecolorCursor(
-    ScreenPtr pScreen,
-    CursorPtr pCursor,
-    Bool displayed);
-extern Bool PclSetCursorPosition(
-    ScreenPtr pScreen,
-    int x,
-    int y,
-    Bool generateEvent);
-
-/******
- * Functions in PclSFonts.c
- ******/
-extern void
-PclDownloadSoftFont8(
-    FILE *fp,
-    PclSoftFontInfoPtr pSoftFontInfo,
-    PclFontHead8Ptr pfh,
-    PclCharDataPtr pcd,
-    unsigned char *code);
-extern void PclDownloadSoftFont16(
-    FILE *fp,
-    PclSoftFontInfoPtr pSoftFontInfo,
-    PclFontHead16Ptr pfh,
-    PclCharDataPtr pcd,
-    unsigned char row,
-    unsigned char col);
-extern PclSoftFontInfoPtr PclCreateSoftFontInfo(void);
-extern void PclDestroySoftFontInfo(
-    PclSoftFontInfoPtr pSoftFontInfo );
-
-/******
- * Functions in PclGC.c
- ******/
-extern Bool PclCreateGC(GCPtr pGC);
-extern void PclDestroyGC(GCPtr pGC);
-extern int PclUpdateDrawableGC(
-    GCPtr pGC,
-    DrawablePtr pDrawable,
-    FILE **outFile);
-extern void PclValidateGC(
-    GCPtr pGC,
-    unsigned long changes,
-    DrawablePtr pDrawable);
-extern void PclSetDrawablePrivateStuff(
-    DrawablePtr pDrawable,
-    GC gc );
-extern int PclGetDrawablePrivateStuff(
-    DrawablePtr pDrawable,
-    GC *gc,
-    unsigned long *valid,
-    FILE **file );
-extern void PclSetDrawablePrivateGC(
-     DrawablePtr pDrawable,
-     GC gc);
-extern void PclComputeCompositeClip(
-    GCPtr pGC,
-    DrawablePtr pDrawable);
-
-/******
- * Functions in PclInit.c
- ******/
-extern Bool PclCloseScreen(
-    int index,
-    ScreenPtr pScreen);
-extern Bool InitializeColorPclDriver(
-    int ndx,
-    ScreenPtr pScreen,
-    int argc,
-    char **argv);
-extern Bool InitializeMonoPclDriver(
-    int ndx,
-    ScreenPtr pScreen,
-    int argc,
-    char **argv);
-extern Bool InitializeLj3PclDriver(
-    int ndx,
-    ScreenPtr pScreen,
-    int argc,
-    char **argv);
-extern XpContextPtr PclGetContextFromWindow( WindowPtr win );
-
-/******
- * Functions in PclLine.c
- ******/
-extern void PclPolyLine(
-    DrawablePtr pDrawable,
-    GCPtr pGC,
-    int mode,
-    int nPoints,
-    xPoint *pPoints);
-extern void PclPolySegment(
-    DrawablePtr pDrawable,
-    GCPtr pGC,
-    int nSegments,
-    xSegment *pSegments);
-
-/******
- * Functions in PclMisc.c
- ******/
-extern void PclQueryBestSize(
-    int class,
-    short *pwidth,
-    short *pheight,
-    ScreenPtr pScreen);
-extern char *GetPropString(WindowPtr pWin, char *propName);
-extern int SystemCmd(char *cmdStr);
-extern int PclGetMediumDimensions(
-    XpContextPtr pCon,
-    CARD16 *pWidth,
-    CARD16 *pHeight);
-extern int PclGetReproducibleArea(
-    XpContextPtr pCon,
-    xRectangle *pRect);
-extern void PclSendData(
-    FILE *outFile,
-    PclContextPrivPtr pConPriv,
-    BoxPtr pbox,
-    int nbox,
-    double ratio);
-
-/******
- * Functions in PclPixel.c
- ******/
-extern void PclPolyPoint(
-    DrawablePtr pDrawable,
-    GCPtr pGC,
-    int mode,
-    int nPoints,
-    xPoint *pPoints);
-extern void PclPushPixels(
-    GCPtr pGC,
-    PixmapPtr pBitmap,
-    DrawablePtr pDrawable,
-    int width,
-    int height,
-    int x,
-    int y);
-
-/******
- * Functions in PclPixmap.c
- ******/
-extern PixmapPtr PclCreatePixmap(
-    ScreenPtr pScreen,
-    int width,
-    int height,
-    int depth);
-extern Bool PclDestroyPixmap(PixmapPtr pPixmap);
-
-/******
- * Functions in PclPolygon.c
- ******/
-extern void PclPolyRectangle(
-    DrawablePtr pDrawable,
-    GCPtr pGC,
-    int nRects,
-    xRectangle *pRects);
-extern void PclFillPolygon(
-    DrawablePtr pDrawable,
-    GCPtr pGC,
-    int shape,
-    int mode,
-    int nPoints,
-    DDXPointPtr pPoints);
-extern void PclPolyFillRect(
-    DrawablePtr pDrawable,
-    GCPtr pGC,
-    int nRects,
-    xRectangle *pRects);
-
-/******
- * Functions in PclSpans.c
- ******/
-extern void PclFillSpans(
-    DrawablePtr pDrawable,
-    GCPtr pGC,
-    int nSpans,
-    DDXPointPtr pPoints,
-    int *pWidths,
-    int fSorted);
-extern void PclSetSpans(
-    DrawablePtr pDrawable,
-    GCPtr pGC,
-    char *pSrc,
-    DDXPointPtr pPoints,
-    int *pWidths,
-    int nSpans,
-    int fSorted);
-
-/******
- * Functions in PclText.c
- ******/
-extern int PclPolyText8(
-    DrawablePtr pDrawable,
-    GCPtr pGC,
-    int x,
-    int y,
-    int count,
-    char *string);
-extern int PclPolyText16(
-    DrawablePtr pDrawable,
-    GCPtr pGC,
-    int x,
-    int y,
-    int count,
-    unsigned short *string);
-extern void PclImageText8(
-    DrawablePtr pDrawable,
-    GCPtr pGC,
-    int x,
-    int y,
-    int count,
-    char *string);
-extern void PclImageText16(
-    DrawablePtr pDrawable,
-    GCPtr pGC,
-    int x,
-    int y,
-    int count,
-    unsigned short *string);
-extern void PclImageGlyphBlt(
-    DrawablePtr pDrawable,
-    GCPtr pGC,
-    int x,
-    int y,
-    unsigned int nGlyphs,
-    CharInfoPtr *pCharInfo,
-    pointer pGlyphBase);
-extern void PclPolyGlyphBlt(
-    DrawablePtr pDrawable,
-    GCPtr pGC,
-    int x,
-    int y,
-    unsigned int nGlyphs,
-    CharInfoPtr *pCharInfo,
-    pointer pGlyphBase);
-
-/******
- * Functions in PclWindow.c
- ******/
-extern Bool PclCreateWindow(register WindowPtr pWin);
-extern Bool PclDestroyWindow(WindowPtr pWin);
-extern Bool PclMapWindow(WindowPtr pWindow);
-extern Bool PclPositionWindow(
-    register WindowPtr pWin,
-    int x,
-    int y);
-extern Bool PclUnmapWindow(WindowPtr pWindow);
-extern void PclCopyWindow(
-    WindowPtr pWin,
-    DDXPointRec ptOldOrg,
-    RegionPtr prgnSrc);
-extern Bool PclChangeWindowAttributes(
-    register WindowPtr pWin,
-    register unsigned long mask);
-
-/******
- * Functions in PclFonts.c
- ******/
-extern Bool PclRealizeFont(
-    ScreenPtr   pscr,
-    FontPtr     pFont);
-extern Bool PclUnrealizeFont(
-    ScreenPtr   pscr,
-    FontPtr     pFont);
-
-/******
- * Functions in PclPrint.c
- ******/
-extern int PclStartJob(
-    XpContextPtr pCon,
-    Bool sendClientData,
-    ClientPtr client);
-extern int PclEndJob(
-    XpContextPtr pCon,
-    Bool cancel);
-extern int PclStartPage(
-    XpContextPtr pCon,
-    WindowPtr pWin);
-extern int PclEndPage(
-    XpContextPtr pCon,
-    WindowPtr pWin);
-extern int PclStartDoc(XpContextPtr pCon,
-		       XPDocumentType type);
-extern int PclEndDoc(
-    XpContextPtr pCon,
-    Bool cancel);
-extern int PclDocumentData(
-    XpContextPtr pCon,
-    DrawablePtr pDraw,
-    char *pData,
-    int len_data,
-    char *pFmt,
-    int len_fmt,
-    char *pOpt,
-    int len_opt,
-    ClientPtr client);
-extern int PclGetDocumentData(
-    XpContextPtr pCon,
-    ClientPtr client,
-    int maxBufferSize);
-
-
-#endif  /* _PCL_H_ */
diff --git a/hw/xprint/pcl/PclArc.c b/hw/xprint/pcl/PclArc.c
deleted file mode 100644
index 20d3f72..0000000
--- a/hw/xprint/pcl/PclArc.c
+++ /dev/null
@@ -1,268 +0,0 @@
-/*******************************************************************
-**
-**    *********************************************************
-**    *
-**    *  File:		PclArc.c
-**    *
-**    *  Contents:
-**    *                 Arc-drawing code for the PCL DDX driver
-**    *
-**    *  Created:	10/23/95
-**    *
-**    *********************************************************
-** 
-********************************************************************/
-/*
-(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.
-*/
-
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#include <stdio.h>
-#include <math.h>
-#include <errno.h>
-
-#include "Pcl.h"
-#include "gcstruct.h"
-#include "windowstr.h"
-#include "attributes.h"
-
-static void
-PclDoArc(
-     DrawablePtr pDrawable,
-     GCPtr pGC,
-     int nArcs,
-     xArc *pArcs,
-     void (*DoIt)(FILE *, PclContextPrivPtr, double, double, xArc))
-{
-    char t[80];
-    FILE *outFile;
-    int nbox, i;
-    BoxPtr pbox;
-    BoxRec r;
-    RegionPtr drawRegion, region, transClip;
-    short fudge;
-    int xoffset, yoffset;
-    XpContextPtr pCon;
-    PclContextPrivPtr pConPriv;
-    xRectangle repro;
-    
-    if( PclUpdateDrawableGC( pGC, pDrawable, &outFile ) == FALSE )
-      return;
-    
-    fudge = 3 * pGC->lineWidth;
-
-    pCon = PclGetContextFromWindow( (WindowPtr) pDrawable );
-    pConPriv = (PclContextPrivPtr)
-	dixLookupPrivate(&pCon->devPrivates, PclContextPrivateKey);
-    XpGetReproductionArea( pCon, &repro );
-    
-    /* 
-     * Generate the PCL code to draw the collection of arcs, by
-     * defining it as a macro which uses the HP-GL/2 arc drawing
-     * function.
-     */
-
-    xoffset = pDrawable->x;
-    yoffset = pDrawable->y;
-    
-    for( i = 0; i < nArcs; i++ )
-      {
-	  xArc Arc = pArcs[i];
-	  double b, X, Y, ratio;
-	  double angle1;
-
-	  MACRO_START( outFile, pConPriv );
-	  SAVE_PCL( outFile, pConPriv, "\033%0B" );
-
-	  /* Calculate the start of the arc */
-	  if( ( Arc.angle1 / 64 ) % 360 == 90 )
-	    {
-		X = 0;
-		Y = -Arc.height / 2.0;
-	    }
-	  else if( ( Arc.angle1 / 64 ) % 360 == 270 )
-	    {
-		X = 0;
-		Y = Arc.height / 2.0;
-	    }
-	  else
-	    {
-		/* Convert the angle to radians */
-		angle1 = ( Arc.angle1 / 64.0 ) * 3.141592654 / 180.0;
-	  
-		b = (Arc.height / 2.0);
-		X = b * cos( angle1 );
-		Y = -b * sin( angle1 );
-	    }
-	  
-	  /* Change the coordinate system to scale the ellipse */
-	  ratio = (double)Arc.height / (double)Arc.width;
-	  
-	  sprintf( t, "SC%.2f,%.2f,%d,%d;", 
-		  (repro.x - Arc.width / 2 - xoffset - Arc.x) * ratio,
-		  (repro.x - Arc.width / 2 - xoffset - Arc.x +
-		   repro.width) * ratio,
-		  repro.y - Arc.height / 2 - yoffset - Arc.y + repro.height,
-		  repro.y - Arc.height / 2 - yoffset - Arc.y);
-	  SAVE_PCL( outFile, pConPriv, t );
-
-	  DoIt( outFile, pConPriv, X, Y, Arc );
-	  
-	  /* Build the bounding box */
-	  r.x1 = -Arc.width / 2 - fudge;
-	  r.y1 = -Arc.height / 2 - fudge;
-	  r.x2 = Arc.width / 2 + fudge;
-	  r.y2 = Arc.height / 2 + fudge;
-	  drawRegion = REGION_CREATE( pGC->pScreen, &r, 0 );
-
-	  SAVE_PCL( outFile, pConPriv, "\033%0A" );
-	  MACRO_END( outFile );
-    
-	  /*
-	   * Intersect the bounding box with the clip region.
-	   */
-	  region = REGION_CREATE( pGC->pScreen, NULL, 0 );
-    	  transClip = REGION_CREATE( pGC->pScreen, NULL, 0 );
-	  REGION_COPY( pGC->pScreen, transClip, pGC->pCompositeClip );
-	  REGION_TRANSLATE( pGC->pScreen, transClip,
-			    -(xoffset + Arc.x + Arc.width / 2),
-			    -(yoffset + Arc.y + Arc.height / 2) );
-	  REGION_INTERSECT( pGC->pScreen, region, drawRegion, transClip );
-
-	  /*
-	   * For each rectangle in the clip region, set the HP-GL/2 "input
-	   * window" and render the collection of arcs to it.
-	   */
-	  pbox = REGION_RECTS( region );
-	  nbox = REGION_NUM_RECTS( region );
-    
-	  PclSendData(outFile, pConPriv, pbox, nbox, ratio);
-
-	  /*
-	   * Restore the coordinate system
-	   */
-	  sprintf( t, "\033%%0BSC%d,%d,%d,%d;\033%%0A", repro.x, 
-		  repro.x + repro.width, repro.y + repro.height, 
-		  repro.y );
-	  SEND_PCL( outFile, t );
-	  
-	  /*
-	   * Clean up the temporary regions
-	   */
-	  REGION_DESTROY( pGC->pScreen, drawRegion );
-	  REGION_DESTROY( pGC->pScreen, region );
-	  REGION_DESTROY( pGC->pScreen, transClip );
-      }
-}
-
-/*
- * Draw a simple non-filled arc, centered on the origin and starting
- * at the given point.
- */
-static void
-DrawArc(FILE *outFile,
-	PclContextPrivPtr pConPriv,
-	double X,
-	double Y,
-	xArc A)
-{
-    char t[80];
-
-    sprintf( t, "PU%d,%d;PD;AA0,0,%.2f;", (int)X, (int)Y,
-	    (float)A.angle2 / -64.0 );
-    SAVE_PCL(outFile, pConPriv, t);
-}
-
-void
-PclPolyArc(
-     DrawablePtr pDrawable,
-     GCPtr pGC,
-     int nArcs,
-     xArc *pArcs)
-{
-    PclDoArc( pDrawable, pGC, nArcs, pArcs, DrawArc );
-}
-
-/*
- * Draw a filled wedge, from the origin, to the given point, through
- * the appropriate angle, and back to the origin.
- */
-static void
-DoWedge(FILE *outFile,
-	PclContextPrivPtr pConPriv,
-	double X,
-	double Y,
-	xArc A)
-{
-    char t[80];
-    
-    sprintf( t, "PU0,0;WG%.2f,%.2f,%.2f;", sqrt( X * X + Y * Y ), 
-	    (float)A.angle1 / -64.0,
-	    (float)A.angle2 / -64.0 );
-    SAVE_PCL(outFile, pConPriv, t);
-}
-
-static void
-DoChord(FILE *outFile,
-	PclContextPrivPtr pConPriv,
-	double X,
-	double Y,
-	xArc A)
-{
-    char t[80];
-    
-    sprintf( t, "PU%d,%d;PM0;AA0,0,%.2f;PA%d,%d;PM2;FP;", (int)X, (int)Y, 
-	    (float)A.angle2 / -64.0 , (int)X, (int)Y );
-    SAVE_PCL(outFile, pConPriv, t);
-}
-
-
-void
-PclPolyFillArc(
-     DrawablePtr pDrawable,
-     GCPtr pGC,
-     int nArcs,
-     xArc *pArcs)
-{
-    switch( pGC->arcMode )
-      {
-	case ArcChord:
-	  PclDoArc( pDrawable, pGC, nArcs, pArcs, DoChord );
-	  break;
-	case ArcPieSlice:
-	  PclDoArc( pDrawable, pGC, nArcs, pArcs, DoWedge );
-	  break;
-      }
-}
diff --git a/hw/xprint/pcl/PclArea.c b/hw/xprint/pcl/PclArea.c
deleted file mode 100644
index a4e53da..0000000
--- a/hw/xprint/pcl/PclArea.c
+++ /dev/null
@@ -1,436 +0,0 @@
-/*******************************************************************
-**
-**    *********************************************************
-**    *
-**    *  File:		PclArea.c
-**    *
-**    *  Contents:
-**    *                 Image and Area functions for the PCL DDX driver
-**    *
-**    *  Created:	10/23/95
-**    *
-**    *********************************************************
-**
-********************************************************************/
-/*
-(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.
-*/
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include "Pcl.h"
-#include "pixmapstr.h"
-#include "region.h"
-
-#include "fb.h"
-
-void
-PclPutImage(DrawablePtr pDrawable,
-	    GCPtr pGC,
-	    int depth,
-	    int x,
-	    int y,
-	    int w,
-	    int h,
-	    int leftPad,
-	    int format,
-	    char *pImage)
-{
-    PixmapPtr pPixmap;
-    unsigned long oldFg, oldBg;
-    XID gcv[3];
-    unsigned long oldPlanemask;
-    unsigned long i;
-    long bytesPer;
-
-    if( ( w == 0 ) || ( h == 0 ) )
-      return;
-
-    if( format != XYPixmap )
-      {
-	  pPixmap = GetScratchPixmapHeader( pDrawable->pScreen,
-					   w+leftPad, h, depth,
-					   BitsPerPixel( depth ),
-					   PixmapBytePad( w + leftPad,
-					   depth ), (pointer)pImage );
-	  if( !pPixmap )
-	    return;
-
-	  if( format == ZPixmap )
-	    (void)(*pGC->ops->CopyArea)( (DrawablePtr)pPixmap, pDrawable, pGC,
-				  leftPad, 0, w, h, x, y );
-	  else
-	    (void)(*pGC->ops->CopyPlane)( (DrawablePtr)pPixmap, pDrawable, pGC,
-			 leftPad, 0, w, h, x, y, 1 );
-	  FreeScratchPixmapHeader( pPixmap );
-      }
-    else
-      {
-	  pPixmap = GetScratchPixmapHeader( pDrawable->pScreen,
-					   w+leftPad, h, depth,
-					   BitsPerPixel( depth ),
-					   PixmapBytePad( w + leftPad,
-					   depth ), (pointer)pImage );
-
-	  if( !pPixmap )
-	    return;
-
-	  depth = pGC->depth;
-	  oldPlanemask = pGC->planemask;
-	  oldFg = pGC->fgPixel;
-	  oldBg = pGC->bgPixel;
-	  gcv[0] = ~0L;
-	  gcv[1] = 0;
-	  DoChangeGC( pGC, GCForeground | GCBackground, gcv, 0 );
-	  bytesPer = (long)h * BitmapBytePad( w + leftPad );
-
-	  for( i = 1 << (depth-1); i != 0; i >>= 1, pImage += bytesPer )
-	    {
-		if( i & oldPlanemask )
-		  {
-		      gcv[0] = i;
-		      DoChangeGC( pGC, GCPlaneMask, gcv, 0 );
-		      ValidateGC( pDrawable, pGC );
-		      fbPutImage( (DrawablePtr)pPixmap, pGC, 1, x, y, w, h,
-				  leftPad, XYBitmap, pImage );
-		  }
-	    }
-	  gcv[0] = oldPlanemask;
-	  gcv[1] = oldFg;
-	  gcv[2] = oldBg;
-	  DoChangeGC( pGC, GCPlaneMask | GCForeground | GCBackground,
-		     gcv, 0 );
-
-	  PclCopyArea( (DrawablePtr)pPixmap, pDrawable, pGC, leftPad,
-		      0, w, h, x, y );
-	  FreeScratchPixmapHeader( pPixmap );
-      }
-}
-
-/*
- * PclMonoPixmapFragment()
- *
- * Given a 1-bit-deep pixmap, send the appropriate part of it to the
- * output file as a PCL raster graphics command.
- */
-static void
-PclMonoPixmapFragment(FILE *outFile,
-		      PixmapPtr pix,
-		      short x1,
-		      short y1,
-		      short x2,
-		      short y2,
-		      short dstx,
-		      short dsty)
-{
-    char *bits, t[80], *row;
-    int h, w, i;
-
-    /*
-     * Create a storage area large enough to hold the entire pixmap,
-     * then use fbGetImage to get the appropriate bits.
-     */
-    h = y2 - y1;
-    w = BitmapBytePad( x2 - x1 );
-
-    bits = (char *)xalloc( h * w );
-    fbGetImage( (DrawablePtr)pix, x1, y1, x2 - x1, h,
-		XYPixmap, ~0, bits );
-
-    /*
-     * Move the cursor to the appropriate place on the page.  We have
-     * to jump into HP-GL/2 to do this correctly, then go back to PCL
-     * for the actual drawing.
-     */
-    sprintf( t, "\033%%0BPU%d,%d;\033%%1A", dstx, dsty );
-    SEND_PCL( outFile, t );
-
-    /*
-     * Now, wrap the raster in the appropriate PCL code.  Right now,
-     * it's going to go down the wire without any compression.  That
-     * will have to be good enough for the sample implementation.
-     */
-    sprintf( t, "\033*t300R\033*r%dT\033*r%dS\033*r1A\033*b0M",
-	    h, x2 - x1 );
-    SEND_PCL( outFile, t );
-
-    sprintf( t, "\033*b%dW", w );
-    for( row = bits, i = 0; i <= h; i++, row += w )
-      {
-	  SEND_PCL( outFile, t );
-	  SEND_PCL_COUNT( outFile, row, w );
-      }
-
-    SEND_PCL( outFile, "\033*rC" );
-
-    /*
-     * Clean things up a bit
-     */
-    xfree( bits );
-}
-
-static void
-PclColorPixmapFragment(FILE *outFile,
-		       PixmapPtr pix,
-		       short x1,
-		       short y1,
-		       short x2,
-		       short y2,
-		       short dstx,
-		       short dsty)
-{
-    char *bits, t[80], *row;
-    int h, w, i;
-
-    /*
-     * Create a storage area large enough to hold the entire pixmap,
-     * then use fbGetImage to get the appropriate bits.
-     */
-    h = y2 - y1;
-    w = PixmapBytePad( x2 - x1, pix->drawable.depth );
-
-    bits = (char *)xalloc( h * w );
-    fbGetImage( (DrawablePtr)pix, x1, y1, x2 - x1, h, ZPixmap, ~0, bits );
-
-    /*
-     * Move the cursor to the appropriate place on the page.  We have
-     * to jump into HP-GL/2 to do this correctly, then go back to PCL
-     * for the actual drawing.
-     */
-    sprintf( t, "\033%%0BPU%d,%d;\033%%1A", dstx, dsty );
-    SEND_PCL( outFile, t );
-
-    /*
-     * Now, wrap the raster in the appropriate PCL code.  Right now,
-     * it's going to go down the wire without any compression.  That
-     * will have to be good enough for the sample implementation.
-     */
-    sprintf( t, "\033*t300R\033*r%dt%ds1A\033*b0M",
-	    h, x2 - x1 );
-    SEND_PCL( outFile, t );
-
-    sprintf( t, "\033*b%dW", w );
-    for( row = bits, i = 0; i < h; i++, row += w )
-      {
-	  SEND_PCL( outFile, t );
-	  SEND_PCL_COUNT( outFile, row, w );
-      }
-
-    SEND_PCL( outFile, "\033*rC" );
-
-    /*
-     * Clean things up a bit
-     */
-    xfree( bits );
-}
-
-RegionPtr
-PclCopyArea(DrawablePtr pSrc,
-	    DrawablePtr pDst,
-	    GCPtr pGC,
-	    int srcx,
-	    int srcy,
-	    int width,
-	    int height,
-	    int dstx,
-	    int dsty)
-{
-    PixmapPtr pixSrc = (PixmapPtr)pSrc;
-/*
-    FILE *srcFile;
-    GC srcGC;
-*/
-    FILE *dstFile;
-    GC dstGC;
-    unsigned long valid;
-    RegionPtr drawRegion, region, whole, ret;
-    BoxRec box;
-    BoxPtr prect;
-    int nrect;
-    void (*doFragment)(FILE *, PixmapPtr, short, short, short, short,
-		       short, short );
-
-    /*
-     * Since we don't store any information on a per-window basis, we
-     * can't copy from a window.
-     */
-    if( pSrc->type == DRAWABLE_WINDOW )
-      return NULL;
-
-    /*
-     * If we're copying from a pixmap to a pixmap, we just use the
-     * fb code to do the work.
-     */
-    if( pDst->type == DRAWABLE_PIXMAP )
-      fbCopyArea( pSrc, pDst, pGC, srcx, srcy, width, height, dstx, dsty );
-
-/*
-    PclGetDrawablePrivateStuff( pSrc, &srcGC, &valid, &srcFile );
-*/
-    PclGetDrawablePrivateStuff( pDst, &dstGC, &valid, &dstFile );
-
-    /*
-     * If we're copying to a window, we have to do some actual
-     * drawing, instead of just handing it off to fb.  Start
-     * by determining the region that will be drawn.
-     */
-    box.x1 = srcx;
-    box.y1 = srcy;
-    box.x2 = srcx + width;
-    box.y2 = srcy + height;
-    drawRegion = REGION_CREATE( pGC->pScreen, &box, 0 );
-    REGION_TRANSLATE( pGC->pScreen, drawRegion, dstx, dsty );
-
-    region = REGION_CREATE( pGC->pScreen, NULL, 0 );
-    REGION_INTERSECT( pGC->pScreen, region, drawRegion, pGC->pCompositeClip );
-
-    /*
-     * Now select the operation to be performed on each box in the
-     * region.
-     */
-    if( pSrc->depth == 1 )
-      doFragment = PclMonoPixmapFragment;
-    else
-      doFragment = PclColorPixmapFragment;
-
-    /*
-     * Actually draw each section of the bitmap.
-     */
-    nrect = REGION_NUM_RECTS( region );
-    prect = REGION_RECTS( region );
-
-    while( nrect )
-      {
-	  (*doFragment)( dstFile, (PixmapPtr)pSrc, prect->x1 - dstx,
-			prect->y1 - dsty, prect->x2 - dstx,
-			prect->y2 - dsty, prect->x1, prect->y1 );
-
-	  nrect--;
-	  prect++;
-      }
-
-    /*
-     * Update the destination's GC to the source's GC.
-     */
-/*
-    PclSetDrawablePrivateGC( pDst, srcGC );
-*/
-
-    /*
-     * Determine the region that needs to be returned.  This is the
-     * region of the source that falls outside the boundary of the
-     * pixmap.
-     */
-    box.x1 = 0;
-    box.y1 = 0;
-    box.x2 = pixSrc->drawable.width;
-    box.y2 = pixSrc->drawable.height;
-    whole = REGION_CREATE( pGC->pScreen, &box, 0 );
-    ret = REGION_CREATE( pGC->pScreen, NULL, 0 );
-
-    REGION_TRANSLATE( pGC->pScreen, drawRegion, -dstx, -dsty );
-    REGION_SUBTRACT( pGC->pScreen, ret, drawRegion, whole );
-
-    /*
-     * Clean up the regions
-     */
-    REGION_DESTROY( pGC->pScreen, drawRegion );
-    REGION_DESTROY( pGC->pScreen, region );
-    REGION_DESTROY( pGC->pScreen, whole );
-
-    if( REGION_NOTEMPTY( pGC->pScreen, ret ) )
-      return ret;
-    else
-      {
-	  REGION_DESTROY( pGC->pScreen, ret );
-	  return NULL;
-      }
-}
-
-RegionPtr
-PclCopyPlane(DrawablePtr pSrc,
-	     DrawablePtr pDst,
-	     GCPtr pGC,
-	     int srcx,
-	     int srcy,
-	     int width,
-	     int height,
-	     int dstx,
-	     int dsty,
-	     unsigned long plane)
-{
-    RegionPtr reg;
-    GCPtr scratchGC;
-    PixmapPtr scratchPix;
-
-    /*
-     * Since we don't store PCL on a per-window basis, there's no good
-     * way to copy from a window.
-     */
-    if( pSrc->type == DRAWABLE_WINDOW )
-      return NULL;
-
-    /* Copying from a pixmap to a pixmap is already implemented by fb. */
-    if( pSrc->type == DRAWABLE_PIXMAP &&
-       pDst->type == DRAWABLE_PIXMAP )
-      fbCopyPlane( pSrc, pDst, pGC, srcx, srcy, width, height,
-                   dstx, dsty, plane );
-
-    /*
-     * We can use fbCopyPlane to do the work of grabbing the plane and
-     * converting it to the desired visual.  Once that's done, we already
-     * know how to do a CopyArea.
-     */
-    scratchPix = (*pDst->pScreen->CreatePixmap)( pDst->pScreen, width,
-						height, pDst->depth,
-						CREATE_PIXMAP_USAGE_SCRATCH );
-
-    scratchGC = GetScratchGC( pDst->depth, pDst->pScreen );
-    CopyGC( pGC, scratchGC, ~0L );
-
-    fbValidateGC( scratchGC, ~0L, (DrawablePtr)scratchPix );
-    fbCopyPlane( pSrc, (DrawablePtr)scratchPix, scratchGC,
-		 srcx, srcy, width, height, 0, 0, plane );
-
-    reg = PclCopyArea( (DrawablePtr)scratchPix, pDst, pGC, 0, 0, width,
-		      height, dstx, dsty );
-
-    FreeScratchGC( scratchGC );
-
-    (*pDst->pScreen->DestroyPixmap)( scratchPix );
-
-    return reg;
-}
diff --git a/hw/xprint/pcl/PclAttVal.c b/hw/xprint/pcl/PclAttVal.c
deleted file mode 100644
index f0f2047..0000000
--- a/hw/xprint/pcl/PclAttVal.c
+++ /dev/null
@@ -1,206 +0,0 @@
-/*
- */
-/*
-(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.
-*/
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#include "Pcl.h"
-#include "AttrValid.h"
-
-/*
- * define valid values and defaults for Printer pool
- */
-static XpOid ValidContentOrientationsOids[] = {
-    xpoid_val_content_orientation_portrait,
-    xpoid_val_content_orientation_landscape,
-    xpoid_val_content_orientation_reverse_portrait,
-    xpoid_val_content_orientation_reverse_landscape 
-};
-static XpOidList ValidContentOrientations = {
-    ValidContentOrientationsOids, XpNumber(ValidContentOrientationsOids)
-};
-
-static XpOid DefaultContentOrientationsOids[] = {
-    xpoid_val_content_orientation_portrait,
-    xpoid_val_content_orientation_landscape
-};
-static XpOidList DefaultContentOrientations = {
-    DefaultContentOrientationsOids, XpNumber(DefaultContentOrientationsOids)
-};
-
-static XpOid ValidPlexesOids[] = {
-    xpoid_val_plex_simplex, xpoid_val_plex_duplex, xpoid_val_plex_tumble
-};
-static XpOidList ValidPlexes = {
-    ValidPlexesOids, XpNumber(ValidPlexesOids)
-};
-
-static XpOid DefaultPlexesOids[] = {
-    xpoid_val_plex_simplex
-};
-static XpOidList DefaultPlexes = {
-    DefaultPlexesOids, XpNumber(DefaultPlexesOids)
-};
-
-static unsigned long ValidPrinterResolutionsCards[] = {
-    300
-};
-static XpOidCardList ValidPrinterResolutions = {
-    ValidPrinterResolutionsCards, XpNumber(ValidPrinterResolutionsCards)
-};
-
-static unsigned long DefaultPrinterResolutionsCards[] = {
-    300
-};
-static XpOidCardList DefaultPrinterResolutions = {
-    DefaultPrinterResolutionsCards, XpNumber(DefaultPrinterResolutionsCards)
-};
-
-static XpOid ValidListfontsModesOids[] = {
-    xpoid_val_xp_list_internal_printer_fonts, xpoid_val_xp_list_glyph_fonts
-};
-static XpOidList ValidListfontsModes = {
-    ValidListfontsModesOids, XpNumber(ValidListfontsModesOids)
-};
-
-static XpOid DefaultListfontsModesOids[] = {
-    xpoid_val_xp_list_glyph_fonts
-};
-static XpOidList DefaultListfontsModes = {
-    DefaultListfontsModesOids, XpNumber(DefaultListfontsModesOids)
-};
-
-static XpOid ValidSetupProvisoOids[] = {
-    xpoid_val_xp_setup_mandatory, xpoid_val_xp_setup_optional
-};
-static XpOidList ValidSetupProviso = {
-
-
-    ValidSetupProvisoOids, XpNumber(ValidSetupProvisoOids)
-};
-
-static XpOidDocFmt ValidDocFormatsSupportedFmts[] = {
-    { "PCL", "5", NULL },
-};
-static XpOidDocFmtList ValidDocFormatsSupported = {
-    ValidDocFormatsSupportedFmts, XpNumber(ValidDocFormatsSupportedFmts)
-};
-
-static XpOidDocFmt DefaultDocFormatsSupportedFmts[] = {
-    { "PCL", "5", NULL }
-};
-static XpOidDocFmtList DefaultDocFormatsSupported = {
-    DefaultDocFormatsSupportedFmts, XpNumber(DefaultDocFormatsSupportedFmts)
-};
-
-static XpOidDocFmt ValidEmbeddedFormatsSupportedFmts[] = {
-    { "HPGL", "2", NULL },
-};
-static XpOidDocFmtList ValidEmbeddedFormatsSupported = {
-    ValidEmbeddedFormatsSupportedFmts, XpNumber(ValidEmbeddedFormatsSupportedFmts)
-};
-
-static XpOidDocFmt DefaultEmbeddedFormatsSupportedFmts[] = {
-    { "HPGL", "2", NULL }
-};
-static XpOidDocFmtList DefaultEmbeddedFormatsSupported = {
-    DefaultEmbeddedFormatsSupportedFmts, XpNumber(DefaultEmbeddedFormatsSupportedFmts)
-};
-
-static XpOidDocFmt ValidRawFormatsSupportedFmts[] = {
-    { "PCL", "5", NULL },
-    { "Postscript", "2", NULL },
-    { "ASCII", NULL, NULL }
-    
-};
-static XpOidDocFmtList ValidRawFormatsSupported = {
-    ValidRawFormatsSupportedFmts, XpNumber(ValidRawFormatsSupportedFmts)
-};
-
-static XpOidDocFmt DefaultRawFormatsSupportedFmts[] = {
-    { "PCL", "5", NULL }
-};
-static XpOidDocFmtList DefaultRawFormatsSupported = {
-    DefaultRawFormatsSupportedFmts, XpNumber(DefaultRawFormatsSupportedFmts)
-};
-
-static XpOid ValidInputTraysOids[] = {
-    xpoid_val_input_tray_manual,
-    xpoid_val_input_tray_main,
-    xpoid_val_input_tray_envelope,
-    xpoid_val_input_tray_large_capacity,
-    xpoid_val_input_tray_bottom
-};
-static XpOidList ValidInputTrays = {
-    ValidInputTraysOids, XpNumber(ValidInputTraysOids)
-};
-
-static XpOid ValidMediumSizesOids[] = {
-    xpoid_val_medium_size_iso_a3,
-    xpoid_val_medium_size_iso_a4,
-    xpoid_val_medium_size_na_letter,
-    xpoid_val_medium_size_na_legal,
-    xpoid_val_medium_size_executive,
-    xpoid_val_medium_size_ledger,
-    xpoid_val_medium_size_iso_c5,
-    xpoid_val_medium_size_iso_designated_long,
-    xpoid_val_medium_size_na_number_10_envelope,
-    xpoid_val_medium_size_monarch_envelope,
-    xpoid_val_medium_size_jis_b5,
-};
-static XpOidList ValidMediumSizes = {
-    ValidMediumSizesOids, XpNumber(ValidMediumSizesOids)
-};
-
-static XpOidDocFmt DefaultDocumentFormat = {
-    "PCL", "5", NULL
-};
-
-
-/*
- * init struct for XpValidate*Pool
- */
-XpValidatePoolsRec PclValidatePoolsRec = {
-    &ValidContentOrientations, &DefaultContentOrientations,
-    &ValidDocFormatsSupported, &DefaultDocFormatsSupported,
-    &ValidInputTrays, &ValidMediumSizes,
-    &ValidPlexes, &DefaultPlexes,
-    &ValidPrinterResolutions, &DefaultPrinterResolutions,
-    &ValidEmbeddedFormatsSupported, &DefaultEmbeddedFormatsSupported,
-    &ValidListfontsModes, &DefaultListfontsModes,
-    &ValidRawFormatsSupported, &DefaultRawFormatsSupported,
-    &ValidSetupProviso,
-    &DefaultDocumentFormat
-};
diff --git a/hw/xprint/pcl/PclAttr.c b/hw/xprint/pcl/PclAttr.c
deleted file mode 100644
index b27bf4f..0000000
--- a/hw/xprint/pcl/PclAttr.c
+++ /dev/null
@@ -1,86 +0,0 @@
-/*******************************************************************
-**
-**    *********************************************************
-**    *
-**    *  File:		PclAttr.c
-**    *
-**    *  Contents:
-**    *                 Attribute-handling functions for the PCL driver
-**    *
-**    *  Created:	2/2/96
-**    *
-**    *********************************************************
-** 
-********************************************************************/
-/*
-(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.
-*/
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#include "Pcl.h"
-#include "attributes.h"
-
-char *
-PclGetAttributes(
-    XpContextPtr pCon,
-    XPAttributes pool )
-{
-    return XpGetAttributes( pCon, pool );
-}
-
-char *
-PclGetOneAttribute(
-     XpContextPtr pCon,
-     XPAttributes pool,
-     char *attr )
-{
-    return XpGetOneAttribute( pCon, pool, attr );
-}
-int
-PclAugmentAttributes(
-     XpContextPtr pCon,
-     XPAttributes pool,
-     char *attrs )
-{
-    return XpAugmentAttributes( pCon, pool, attrs );
-}
-
-int
-PclSetAttributes( 
-     XpContextPtr pCon,
-     XPAttributes pool,
-     char *attrs )
-{
-    return XpSetAttributes( pCon, pool, attrs );
-}
diff --git a/hw/xprint/pcl/PclColor.c b/hw/xprint/pcl/PclColor.c
deleted file mode 100644
index 5e8ffa6..0000000
--- a/hw/xprint/pcl/PclColor.c
+++ /dev/null
@@ -1,851 +0,0 @@
-/*******************************************************************
-**
-**    *********************************************************
-**    *
-**    *  File:		PclColorInit.c
-**    *
-**    *  Contents:
-**    *                 Colormap handing code of Pcl driver for the 
-**    *                 print server.
-**    *
-**    *  Created:	4/8/96
-**    *
-**    *********************************************************
-** 
-********************************************************************/
-/*
-(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.
-*/
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <sys/types.h>
-#include <sys/wait.h>
-#include <unistd.h>
-#include <math.h>
-
-#include "colormapst.h"
-#include "windowstr.h"
-#include "resource.h"
-
-#include "Pcl.h"
-#include "fb.h"
-
-static void lookup(unsigned char *src,
-		unsigned char *dst,
-		int num,
-		unsigned char *map,
-		int dim);
-static void trilinear(unsigned char *p,
-		unsigned char *out,
-		unsigned char *d,
-		int dim,
-		unsigned char def);
-
-
-/*
- * This seems to be (and is) a duplication of effort; one would think
- * that fbCreateDefColormap would be sufficient.  It almost is.  The
- * only change made in this function is that the black and white pixels
- * are allocated with three separate variables for red, green and blue
- * values, instead of the single variable in fbCreateDefColormap.  The
- * single variable leads to the one value being corrected by
- * ResolveColor three times, which leads to incorrect colors.
- */
-
-Bool
-PclCreateDefColormap(ScreenPtr pScreen)
-{
-    unsigned short wp_red = ~0, wp_green = ~0, wp_blue = ~0;
-    unsigned short bp_red = 0, bp_green = 0, bp_blue = 0;
-    VisualPtr	pVisual;
-    ColormapPtr	cmap;
-    Pixel wp, bp;
-    
-    for (pVisual = pScreen->visuals;
-	 pVisual->vid != pScreen->rootVisual;
-	 pVisual++)
-	;
-
-    if (CreateColormap(pScreen->defColormap, pScreen, pVisual, &cmap,
-		       (pVisual->class & DynamicClass) ? AllocNone : AllocAll,
-		       0)
-	!= Success)
-	return FALSE;
-    wp = pScreen->whitePixel;
-    bp = pScreen->blackPixel;
-    if ((AllocColor(cmap, &wp_red, &wp_green, &wp_blue, &wp, 0) !=
-       	   Success) ||
-    	(AllocColor(cmap, &bp_red, &bp_green, &bp_blue, &bp, 0) !=
-       	   Success))
-    	return FALSE;
-
-	pScreen->whitePixel = wp;
-	pScreen->blackPixel = bp;
-    
-    (*pScreen->InstallColormap)(cmap);
-    return TRUE;
-}
-
-/*
- * Add colormap to list of colormaps on screen
- */
-Bool
-PclCreateColormap(ColormapPtr pColor)
-{
-    PclCmapToContexts *new;
-    PclScreenPrivPtr sPriv;
-
-    sPriv = (PclScreenPrivPtr)
-	dixLookupPrivate(&pColor->pScreen->devPrivates, PclScreenPrivateKey);
-
-	/*
-	 * Use existing code to initialize the values in the colormap
-	 */
-	fbInitializeColormap( pColor );
-
-	/*
-	 * Set up the mapping between the color map and the context
-	 */
-    new = (PclCmapToContexts *)xalloc( sizeof( PclCmapToContexts ) );
-
-    if( new )
-      {
-	  new->colormapId = pColor->mid;
-	  new->contexts = NULL;
-	  new->next = sPriv->colormaps;
-	  sPriv->colormaps = new;
-	  
-	  return TRUE;
-      }
-    else
-      return FALSE;
-}
-
-void
-PclDestroyColormap(ColormapPtr pColor)
-{
-    PclScreenPrivPtr sPriv;
-    PclCmapToContexts *pCmap, *tCmap = 0;
-    PclContextListPtr con, tCon;
-    PclContextPrivPtr cPriv;
-    PclPaletteMapPtr pPal;
-    char t[80];
-
-    /*
-     * At DestroyContext time, colormaps may be destroyed twice, so if the
-     * pointer is NULL, just crash out.
-     */
-    if( !pColor )
-      return;
-    
-    /*
-     * Find the colormap <-> contexts mapping 
-     */
-    sPriv = (PclScreenPrivPtr)
-	dixLookupPrivate(&pColor->pScreen->devPrivates, PclScreenPrivateKey);
-    pCmap = sPriv->colormaps;
-    while( pCmap )
-      {
-	  if( pCmap->colormapId == pColor->mid )
-	    break;
-	  tCmap = pCmap;
-	  pCmap = pCmap->next;
-      }
-
-    /*
-     * For each context, delete the palette in the printer and
-     * free the mapping.
-     */
-    if( pCmap )
-      {
-	  con = pCmap->contexts;
-	  while( con )
-	    {
-		cPriv = dixLookupPrivate(&con->context->devPrivates,
-					 PclContextPrivateKey);
-		pPal = cPriv->palettes;
-		while( pPal )
-		  {
-		      if( pPal->colormapId == pColor->mid )
-			break;
-		      pPal = pPal->next;
-		  }
-		
-		if( cPriv->pPageFile )
-		  {
-		      sprintf( t, "\033&p%dI\033*p2C", pPal->paletteId );
-		      SEND_PCL( cPriv->pPageFile, t );
-		  }
-		
-		tCon = con;
-		con = con->next;
-		xfree( tCon );
-	    }
-	  
-	  /*
-	   * Delete the colormap<->contexts mapping
-	   */
-	  if( sPriv->colormaps == pCmap )
-	    /* Delete from the front */
-	    sPriv->colormaps = pCmap->next;
-	  else
-	    /* Delete from the middle */
-	    tCmap->next = pCmap->next;
-	  free( pCmap );
-      }
-}
-
-void
-PclInstallColormap(ColormapPtr pColor)
-{
-}
-
-void
-PclUninstallColormap(ColormapPtr pColor)
-{
-}
-
-int
-PclListInstalledColormaps(ScreenPtr pScreen,
-			  XID *pCmapList)
-{
-    return 0;
-}
-
-void
-PclStoreColors(ColormapPtr pColor,
-	       int ndef,
-	       xColorItem *pdefs)
-{
-    PclCmapToContexts *p;
-    PclScreenPrivPtr sPriv;
-    PclContextListPtr con;
-    PclContextPrivPtr cPriv;
-    PclPaletteMapPtr pMap;
-    char t[80];
-    int i;
-
-    sPriv = (PclScreenPrivPtr)
-	dixLookupPrivate(&pColor->pScreen->devPrivates, PclScreenPrivateKey);
-    p = sPriv->colormaps;
-    while( p )
-      {
-	  if( p->colormapId == pColor->mid )
-	    break;
-	  p = p->next;
-      }
-
-    if( p )
-      {
-	  con = p->contexts;
-	  while( con )
-	    {
-		/*
-		 * For each context, get the palette ID and update the
-		 * appropriate palette.
-		 */
-		cPriv = dixLookupPrivate(&con->context->devPrivates,
-					 PclContextPrivateKey);
-		pMap = PclFindPaletteMap( cPriv, pColor, NULL );
-
-		/*
-		 * Update the palette
-		 */
-		sprintf( t, "\033&p%dS", pMap->paletteId );
-		SEND_PCL( cPriv->pPageFile, t );
-		
-		if( pColor->class == PseudoColor )
-		  {
-		      unsigned short r, g, b;
-		      unsigned int pID;
-		      for( i = 0; i < ndef; i++ )
-			{
-			    pID = pdefs[i].pixel;
-			    if ( pColor->red[i].fShared )
-			      {
-				  r = pColor->red[pID].co.shco.red->color;
-				  g = pColor->red[pID].co.shco.green->color;
-				  b = pColor->red[pID].co.shco.blue->color;
-			      }
-			    else
-			      {
-				  r = pColor->red[pID].co.local.red;
-				  g = pColor->red[pID].co.local.green;
-				  b = pColor->red[pID].co.local.blue;
-			      }
-
-			    if( pdefs[i].flags & DoRed )
-				  r = pdefs[i].red;
-			    if( pdefs[i].flags & DoGreen )
-				  g = pdefs[i].green;
-			    if( pdefs[i].flags & DoBlue )
-				  b = pdefs[i].blue;
-			    PclLookUp(pColor, cPriv, &r, &g, &b);
-			    sprintf( t, "\033*v%ua%ub%uc%dI", r, g, b, pID);
-			    SEND_PCL( cPriv->pPageFile, t );
-			}
-		  }    
-
-		sprintf( t, "\033&p%dS", cPriv->currentPalette );
-		SEND_PCL( cPriv->pPageFile, t );
-
-		con = con->next;
-	    }
-      }
-}
-
-void
-PclResolveColor(unsigned short *pRed,
-		unsigned short *pGreen,
-		unsigned short *pBlue,
-		VisualPtr pVisual)
-{
-    /*
-     * We need to map the X color range of [0,65535] to the PCL color
-     * range of [0,32767].
-     */
-    *pRed >>= 1;
-    *pGreen >>= 1;
-    *pBlue >>= 1;
-}
-
-PclPaletteMapPtr
-PclFindPaletteMap(PclContextPrivPtr cPriv,
-		  ColormapPtr cmap,
-		  GCPtr gc)
-{
-    PclPaletteMapPtr p = cPriv->palettes, new;
-
-    /*
-     * If the colormap is static, grab one of the special palettes.  If we come
-     * into this from StoreColors, there will be no GC, but by definition we're
-     * looking at a dynamic color map, so the special colors will not be
-     * needed.
-     */
-    if( gc )
-      {
-	  if( cmap->pVisual->class == StaticGray )
-	    return &( cPriv->staticGrayPalette );
-	  else if( cmap->pVisual->class == TrueColor )
-	    {
-		if( gc->fillStyle == FillTiled && !( gc->tileIsPixel ) )
-		  return &( cPriv->specialTrueColorPalette );
-		else
-		  return &( cPriv->trueColorPalette );
-	    }
-      }
-    
-    
-    /* Look for the colormap ID <-> palette ID mapping */
-    while( p )
-      {
-	  if( p->colormapId == cmap->mid )
-	    return p;
-	  p = p->next;
-      }
-
-    /* If the colormap isn't already there, make an entry for it */
-    new = (PclPaletteMapPtr)xalloc( sizeof( PclPaletteMap ) );
-    new->colormapId = cmap->mid;
-    new->paletteId = cPriv->nextPaletteId++;
-    new->downloaded = 0;
-    new->next = cPriv->palettes;
-    cPriv->palettes = new;
-    return new;
-}
-
-int
-PclUpdateColormap(DrawablePtr pDrawable,
-		  XpContextPtr pCon,
-		  GCPtr gc,
-		  FILE *outFile)
-{
-    PclScreenPrivPtr sPriv;
-    
-    PclContextPrivPtr cPriv;
-    PclPaletteMapPtr pMap;
-    PclCmapToContexts *pCmap;
-    PclContextListPtr new;
-    char t[80];
-    Colormap c;
-    ColormapPtr cmap;
-    WindowPtr win = (WindowPtr)pDrawable;
-    unsigned short r, g, b, rr, gg, bb;
-    int i;
-
-    cPriv = (PclContextPrivPtr)
-	dixLookupPrivate(&pCon->devPrivates, PclContextPrivateKey);
-    
-    c = wColormap( win );
-    cmap = (ColormapPtr)LookupIDByType( c, RT_COLORMAP );
-    pMap = PclFindPaletteMap( cPriv, cmap, gc );
-    
-    if( cPriv->currentPalette == pMap->paletteId )
-      /*
-       * If the requested colormap is already active, nothing needs to
-       * be done.
-       */
-      return FALSE;
-
-    /*
-     * Now we activate the palette in the printer
-     */
-    sprintf( t, "\033&p%dS", pMap->paletteId );
-    SEND_PCL( outFile, t );
-    cPriv->currentPalette = pMap->paletteId;
-
-    if( pMap->downloaded == 0 )
-      /*
-       * If the requested colormap has not been downloaded to the
-       * printer, we need to do that before activating it.
-       */
-      {
-	  /*
-	   * Add the colormap to the screen-level colormap<->context mapping.
-	   */
-	  sPriv = (PclScreenPrivPtr)
-	      dixLookupPrivate(&cmap->pScreen->devPrivates,
-			       PclScreenPrivateKey);
-	  pCmap = sPriv->colormaps;
-	  while( pCmap && ( pCmap->colormapId != cmap->mid ) )
-		pCmap = pCmap->next;
-	  new = (PclContextListPtr)xalloc( sizeof( PclContextList ) );
-	  new->context = pCon;
-	  new->next = pCmap->contexts;
-	  pCmap->contexts = new;
-
-	  /*
-	   * XXX Download the colormap
-	   */
-	  if( cmap->class == StaticGray )
-	    {
-#ifdef XP_PCL_COLOR
-		sprintf( t, "\033*v18W%c%c%c%c%c%c", 0, 1, 1, 1, 1, 1 );
-		SEND_PCL_COUNT( cPriv->pPageFile, t, 12 );
-		
-		/* Send the white reference point... */
-		sprintf( t, "%c%c%c%c%c%c", 0x7f, 0xff, 0x7f, 0xff,
-			0x7f, 0xff );
-		SEND_PCL_COUNT( cPriv->pPageFile, t, 6 );
-
-		/* ... and the black reference point */
-		sprintf( t, "%c%c%c%c%c%c", 0x00, 0x00, 0x00, 0x00,
-			0x00, 0x00 );
-		SEND_PCL_COUNT( cPriv->pPageFile, t, 6 );
-		
-		/* Now program the two colors */
-		sprintf( t, "\033*v0a0b0c%ldI", (long) cmap->pScreen->blackPixel );
-		SEND_PCL( cPriv->pPageFile, t );
-		sprintf( t, "\033*v32767a32767b32767c%ldI",
-			(long) cmap->pScreen->whitePixel );
-		SEND_PCL( cPriv->pPageFile, t );
-#endif /* XP_PCL_COLOR */
-	    }
-	  else if( cmap->class == PseudoColor )
-	    {
-		sprintf( t,
-			"\033*v18W%c%c%c%c%c%c",
-			0, 1, cmap->pVisual->nplanes, 16, 16, 16 );
-		SEND_PCL_COUNT( cPriv->pPageFile, t, 12 );
-		
-		/* Send the white reference point... */
-		if ( cPriv->ctbl != NULL )
-		    sprintf( t, "%c%c%c%c%c%c", 0x00, 0xff, 0x00, 0xff,
-			0x00, 0xff );
-		else
-		    sprintf( t, "%c%c%c%c%c%c", 0x7f, 0xff, 0x7f, 0xff,
-			0x7f, 0xff );
-		SEND_PCL_COUNT( cPriv->pPageFile, t, 6 );
-
-		/* ... and the black reference point */
-		sprintf( t, "%c%c%c%c%c%c", 0x00, 0x00, 0x00, 0x00,
-			0x00, 0x00 );
-		SEND_PCL_COUNT( cPriv->pPageFile, t, 6 );
-		
-		for(i = 0; i < cmap->pVisual->ColormapEntries; i++ )
-		  {
-		      if( cmap->red[i].fShared )
-			{
-			    r = cmap->red[i].co.shco.red->color;
-			    g = cmap->red[i].co.shco.green->color;
-			    b = cmap->red[i].co.shco.blue->color;
-			}
-		      else
-			{
-			    r = cmap->red[i].co.local.red;
-			    g = cmap->red[i].co.local.green;
-			    b = cmap->red[i].co.local.blue;
-			}
-		      PclLookUp(cmap, cPriv, &r, &g, &b);
-		      sprintf( t, "\033*v%ua%ub%uc%dI", r, g, b, i );
-		      SEND_PCL( outFile, t );
-		  }
-	    }
-	  else if( cmap->class == TrueColor )
-	    {
-		unsigned short lim;
-
-		if( gc->fillStyle == FillTiled && !( gc->tileIsPixel ) )
-		  {
-		      if( cPriv->ctbl != NULL )
-			{
-			   /* Send the "special" colormap for 24-bit fills */
-			   sprintf( t, "\033*v18W%c%c%c%c%c%c", 0, 1, 
-					8,
-					cmap->pVisual->bitsPerRGBValue,
-					cmap->pVisual->bitsPerRGBValue,
-					cmap->pVisual->bitsPerRGBValue );
-			   SEND_PCL_COUNT( cPriv->pPageFile, t, 12 );
-
-			   /* Send the white reference point... */
-			   sprintf( t, "%c%c%c%c%c%c",
-					0x00, 0xff,
-					0x00, 0xff,
-					0x00, 0xff );
-			   SEND_PCL_COUNT( cPriv->pPageFile, t, 6 );
-
-			   /* ... and the black reference point */
-			   sprintf( t, "%c%c%c%c%c%c",
-					0x00, 0x00,
-					0x00, 0x00,
-					0x00, 0x00 );
-			   SEND_PCL_COUNT( cPriv->pPageFile, t, 6 );
-
-			   /* Now send the color entries, RRRGGGBB */
-			   i=0;
-			   for( r = 0; r < 8; r++ )
-			     for( g = 0; g < 8; g ++ )
-			       for( b = 0; b < 4; b++ )
-				  {
-				      rr = (r * 0xff)/7;
-				      gg = (g * 0xff)/7;
-				      bb = (b * 0xff)/3;
-				      PclLookUp(cmap, cPriv, &rr, &gg, &bb);
-				      sprintf( t, "\033*v%ua%ub%uc%dI",
-								rr, gg, bb, i );
-				      SEND_PCL( outFile, t );
-				      i++;
-				   }
-			}
-		      else
-			{
-			   /* Send the "special" colormap for 24-bit fills */
-			   sprintf( t, "\033*v18W%c%c%c%c%c%c", 0, 1, 
-				8,
-				cmap->pVisual->bitsPerRGBValue,
-				cmap->pVisual->bitsPerRGBValue,
-				cmap->pVisual->bitsPerRGBValue );
-			   SEND_PCL_COUNT( cPriv->pPageFile, t, 12 );
-
-			   /* Send the white reference point... */
-			   sprintf( t, "%c%c%c%c%c%c",
-					0x00, 0x07,
-					0x00, 0x07,
-					0x00, 0x03 );
-			   SEND_PCL_COUNT( cPriv->pPageFile, t, 6 );
-
-			   /* ... and the black reference point */
-			   sprintf( t, "%c%c%c%c%c%c",
-					0x00, 0x00,
-					0x00, 0x00,
-					0x00, 0x00 );
-			   SEND_PCL_COUNT( cPriv->pPageFile, t, 6 );
-
-			   /* Now send the color entries, RRRGGGBB */
-			   i=0;
-			   for( r = 0; r < 8; r++ )
-			     for( g = 0; g < 8; g ++ )
-			       for( b = 0; b < 4; b++ )
-				  {
-				      sprintf( t, "\033*v%ua%ub%uc%dI",
-								r, g, b, i );
-				      SEND_PCL( outFile, t );
-				      i++;
-				   }
-			}
-
-		  }
-		else
-		  {
-		      lim = (1 << cmap->pVisual->bitsPerRGBValue) - 1;
-
-		      /* Send the "special" colormap for 24-bit fills */
-		      sprintf( t, "\033*v18W%c%c%c%c%c%c", 0, 3, 
-				cmap->pVisual->nplanes,
-				cmap->pVisual->bitsPerRGBValue,
-				cmap->pVisual->bitsPerRGBValue,
-				cmap->pVisual->bitsPerRGBValue );
-		      SEND_PCL_COUNT( cPriv->pPageFile, t, 12 );
-		     
-		      /* Send the white reference point... */
-		      sprintf( t, "%c%c%c%c%c%c",
-				(lim >> 8) & 0xff, lim & 0xff,
-				(lim >> 8) & 0xff, lim & 0xff,
-				(lim >> 8) & 0xff, lim & 0xff);
-		      SEND_PCL_COUNT( cPriv->pPageFile, t, 6 );
-
-		      /* ... and the black reference point */
-		      sprintf( t, "%c%c%c%c%c%c", 0x00, 0x00, 0x00, 0x00,
-			      0x00, 0x00 );
-		      SEND_PCL_COUNT( cPriv->pPageFile, t, 6 );
-		  }
-
-	    }
-	  pMap->downloaded = 1;
-      }
-      return TRUE;
-    
-}    
-
-void PclLookUp(
-    ColormapPtr cmap,
-    PclContextPrivPtr cPriv,
-    unsigned short *r, 
-    unsigned short *g, 
-    unsigned short *b
-)
-{
-    unsigned char cdata[3];
-
-    if( cmap->class == PseudoColor )
-      {
-	if( cPriv->ctbl != NULL )
-	  {
-	    cdata[0] = *r >> 8;
-	    cdata[1] = *g >> 8;
-	    cdata[2] = *b >> 8;
-	    lookup(cdata, cdata, 1, cPriv->ctbl, cPriv->ctbldim);
-	    *r = cdata[0];
-	    *g = cdata[1];
-	    *b = cdata[2];
-	  }
-	else
-	  {
-	    *r >>= 1;
-	    *g >>= 1;
-	    *b >>= 1;
-	  }
-      }
-    else if( cmap->class == TrueColor )
-      {
-	if( cPriv->ctbl != NULL )
-	  {
-	    cdata[0] = *r;
-	    cdata[1] = *g;
-	    cdata[2] = *b;
-	    lookup(cdata, cdata, 1, cPriv->ctbl, cPriv->ctbldim);
-	    *r = cdata[0];
-	    *g = cdata[1];
-	    *b = cdata[2];
-	  }
-      }
-    return;
-}
-
-unsigned char *PclReadMap(char *name, int *dim)
-{
-    FILE *fp;
-    unsigned char *data;
-    long size;
-
-    if ((fp=fopen(name, "r")) == NULL) {
-	return(NULL);
-    }
-
-    fseek(fp, 0, SEEK_END);
-    size = ftell(fp);
-    
-    /* Could do this with a lookup table, if the constraint is that the
-       3 map dimensions must be equal. */
-    switch (size) {
-    case 8*8*8*3:
-	*dim = 8;
-	break;
-    case 16*16*16*3:
-	*dim = 16;
-	break;
-    case 17*17*17*3:
-	*dim = 17;
-	break;
-    case 65*65*65*3:
-	*dim = 65;
-	break;
-    default:
-	fclose(fp);
-	return(NULL);
-    }
-    
-    if ((data = (unsigned char *) xalloc(sizeof(char) * size)) == NULL) {
-	fclose(fp);
-	return(NULL);
-    }
-
-    fseek(fp, 0, SEEK_SET);
-
-    if (fread(data, sizeof(char), size, fp) != (unsigned) size) {
-	fclose(fp);
-	free(data);
-	return(NULL);
-    }
-
-    fclose(fp);
-    return(data);
-}
-
-/************************************************************************
- *
- * Here is the mapper.
- *
- ************************************************************************/
-
-#define SCL(x) ((x)*(dim-1)/255)
-/* Interleaved-map lookup */
-static void lookup(unsigned char *src, unsigned char *dst, int num, unsigned char *map, int dim)
-{
-    int i;
-
-#define _INTERPOLATE
-#ifndef _INTERPOLATE
-    unsigned char *p1, *p2, *p3;
-
-    for (i=0; i<num; i++) {
-	p1 = map + (SCL(src[0])*dim*dim + SCL(src[1])*dim + SCL(src[2])) * 3;
-	*dst++ = *p1++;
-	*dst++ = *p1++;
-	*dst++ = *p1++;
-	src += 3;
-    }
-#else
-    for (i=0; i<num; i++) {
-	trilinear(src, dst, map, dim, 128);
-	src += 3;
-	dst += 3;
-    }
-#endif
-}
-
-/*
- * C code from the article
- * "Tri-linear Interpolation"
- * by Steve Hill, sah at ukc.ac.uk
- * in "Graphics Gems IV", Academic Press, 1994
- *
- * Fri Feb 16 14:12:43 PST 1996
- *	Modified to use for 8-bit color mapping -- A. Fitzhugh, 
- * 	HP Labs, Printing Technology Department
- */
-
-/* linear interpolation from l (when a=0) to h (when a=1)*/
-/* (equal to (a*h)+((1-a)*l) */
-#define LERP(a,l,h)	((l)+((((h)-(l))*(a))>>8))
-
-static void trilinear(unsigned char *p, unsigned char *out, unsigned char *d, int dim, unsigned char def)
-{
-#define DENS(X, Y, Z, ch) d[((X*dim+Y)*dim+Z)*3+ch]
-    
-    int	x0, y0, z0, 
-	x1, y1, z1,
-	i;
-    unsigned char *dp,
-	fx, fy, fz,
-	d000, d001, d010, d011,
-	d100, d101, d110, d111,
-	dx00, dx01, dx10, dx11,
-	dxy0, dxy1;
-    float scale;
-    
-    scale = 255.0 / (dim-1);
-
-    x0 = p[0] / scale;
-    y0 = p[1] / scale;
-    z0 = p[2] / scale;
-
-    /* Fractions should range from 0-1.0 (fixed point 8-256) */
-    fx = (((int) (p[0] - x0 * scale)) << 8) / 255;
-    fy = (((int) (p[1] - y0 * scale)) << 8) / 255;
-    fz = (((int) (p[2] - z0 * scale)) << 8) / 255;
-    
-    x1 = x0 + 1;
-    y1 = y0 + 1;
-    z1 = z0 + 1;
-    
-    for (i=0; i<3; i++) {
-	
-	if (x0 >= 0 && x1 < dim &&
-	    y0 >= 0 && y1 < dim &&
-	    z0 >= 0 && z1 < dim) {
-	    dp = &DENS(x0, y0, z0, i);
-	    d000 = dp[0];
-	    d100 = dp[3];
-	    dp += dim*3;
-	    d010 = dp[0];
-	    d110 = dp[3];
-	    dp += dim*dim*3;
-	    d011 = dp[0];
-	    d111 = dp[3];
-	    dp -= dim*3;
-	    d001 = dp[0];
-	    d101 = dp[3];
-	} else {
-#	define INRANGE(X, Y, Z) \
-	    ((X) >= 0 && (X) < dim && \
-	     (Y) >= 0 && (Y) < dim && \
-	     (Z) >= 0 && (Z) < dim)
-	    
-	    d000 = INRANGE(x0, y0, z0) ? DENS(x0, y0, z0, i) : def;
-	    d001 = INRANGE(x0, y0, z1) ? DENS(x0, y0, z1, i) : def;
-	    d010 = INRANGE(x0, y1, z0) ? DENS(x0, y1, z0, i) : def;
-	    d011 = INRANGE(x0, y1, z1) ? DENS(x0, y1, z1, i) : def;
-	    
-	    d100 = INRANGE(x1, y0, z0) ? DENS(x1, y0, z0, i) : def;
-	    d101 = INRANGE(x1, y0, z1) ? DENS(x1, y0, z1, i) : def;
-	    d110 = INRANGE(x1, y1, z0) ? DENS(x1, y1, z0, i) : def;
-	    d111 = INRANGE(x1, y1, z1) ? DENS(x1, y1, z1, i) : def;
-	}
-	
-	dx00 = LERP(fx, d000, d100);
-	dx01 = LERP(fx, d001, d101);
-	dx10 = LERP(fx, d010, d110);
-	dx11 = LERP(fx, d011, d111);
-	
-	dxy0 = LERP(fy, dx00, dx10);
-	dxy1 = LERP(fy, dx01, dx11);
-	
-	out[i] = LERP(fz, dxy0, dxy1);
-    }
-}
-    
diff --git a/hw/xprint/pcl/PclCursor.c b/hw/xprint/pcl/PclCursor.c
deleted file mode 100644
index a3eeb16..0000000
--- a/hw/xprint/pcl/PclCursor.c
+++ /dev/null
@@ -1,113 +0,0 @@
-/*******************************************************************
-**
-**    *********************************************************
-**    *
-**    *  File:		PclCursor.c
-**    *
-**    *  Contents:
-**    *                 Cursor-handling code for the PCL DDX driver
-**    *
-**    *  Created:	1/18/96
-**    *
-**    *********************************************************
-** 
-********************************************************************/
-/*
-(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.
-*/
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#include <stdio.h>
-
-#include "Pcl.h"
-#include "gcstruct.h"
-#include "windowstr.h"
-
-void
-PclConstrainCursor(
-     ScreenPtr pScreen,
-     BoxPtr pBox)
-{
-}
-
-void
-PclCursorLimits(
-     ScreenPtr pScreen,
-     CursorPtr pCursor,
-     BoxPtr pHotBox,
-     BoxPtr pTopLeftBox)
-{
-}
-
-Bool
-PclDisplayCursor(
-     ScreenPtr pScreen,
-     CursorPtr pCursor)
-{
-    return True;
-}
-
-Bool
-PclRealizeCursor(
-     ScreenPtr pScreen,
-     CursorPtr pCursor)
-{
-    return True;
-}
-
-Bool
-PclUnrealizeCursor(
-     ScreenPtr pScreen,
-     CursorPtr pCursor)
-{
-    return True;
-}
-
-void
-PclRecolorCursor(
-     ScreenPtr pScreen,
-     CursorPtr pCursor,
-     Bool displayed)
-{
-}
-
-Bool
-PclSetCursorPosition(
-     ScreenPtr pScreen,
-     int x,
-     int y,
-     Bool generateEvent)
-{
-    return True;
-}
diff --git a/hw/xprint/pcl/PclDef.h b/hw/xprint/pcl/PclDef.h
deleted file mode 100644
index dcd54c4..0000000
--- a/hw/xprint/pcl/PclDef.h
+++ /dev/null
@@ -1,67 +0,0 @@
-/*******************************************************************
-**
-**    *********************************************************
-**    *
-**    *  File:		PclDef.h
-**    *
-**    *  Contents:  extran defines and includes for the Pcl driver
-**    *             for a printing X server.
-**    *
-**    *  Created:	7/31/95
-**    *
-**    *********************************************************
-** 
-********************************************************************/
-/*
-(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.
-*/
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#ifndef _PCLDEF_H_
-#define _PCLDEF_H_
-
-#define DT_PRINT_JOB_HEADER "DT_PRINT_JOB_HEADER"
-#define DT_PRINT_JOB_TRAILER "DT_PRINT_JOB_TRAILER"
-#define DT_PRINT_JOB_COMMAND "DT_PRINT_JOB_COMMAND"
-#define DT_PRINT_JOB_EXEC_COMMAND "DT_PRINT_JOB_EXEC_COMMAND"
-#define DT_PRINT_JOB_EXEC_OPTIONS "DT_PRINT_JOB_EXEC_OPTION"
-#define DT_PRINT_PAGE_HEADER "DT_PRINT_PAGE_HEADER"
-#define DT_PRINT_PAGE_TRAILER "DT_PRINT_PAGE_TRAILER"
-#define DT_PRINT_PAGE_COMMAND "DT_PRINT_PAGE_COMMAND"
-
-#define DT_IN_FILE_STRING "%(InFile)%"
-#define DT_OUT_FILE_STRING "%(OutFile)%"
-#define DT_ALLOWED_COMMANDS_FILE "printCommands"
-
-#endif  /* _PCLDEF_H_ */
diff --git a/hw/xprint/pcl/PclFonts.c b/hw/xprint/pcl/PclFonts.c
deleted file mode 100644
index 9e993f7..0000000
--- a/hw/xprint/pcl/PclFonts.c
+++ /dev/null
@@ -1,72 +0,0 @@
-/*******************************************************************
-**
-**    *********************************************************
-**    *
-**    *  File:		PclFonts.c
-**    *
-**    *  Contents:
-**    *                 Font code for Pcl driver.
-**    *
-**    *  Created:	2/03/95
-**    *
-**    *********************************************************
-** 
-********************************************************************/
-/*
-(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.
-*/
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#include "regionstr.h"
-#include <X11/fonts/fontstruct.h>
-#include "dixfontstr.h"
-#include "scrnintstr.h"
-
-#include "Pcl.h"
-
-Bool
-PclRealizeFont(
-    ScreenPtr   pscr,
-    FontPtr     pFont)
-{
-    return TRUE;
-}
-
-Bool
-PclUnrealizeFont(
-    ScreenPtr   pscr,
-    FontPtr     pFont)
-{
-    return TRUE;
-}
diff --git a/hw/xprint/pcl/PclGC.c b/hw/xprint/pcl/PclGC.c
deleted file mode 100644
index fbadf5d..0000000
--- a/hw/xprint/pcl/PclGC.c
+++ /dev/null
@@ -1,971 +0,0 @@
-/*******************************************************************
-**
-**    *********************************************************
-**    *
-**    *  File:		PclGC.c
-**    *
-**    *  Contents:
-**    *                 Graphics Context handling for the PCL driver
-**    *
-**    *  Created:	10/11/95
-**    *
-**    *********************************************************
-** 
-********************************************************************/
-/*
-(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.
-*/
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#include "gcstruct.h"
-
-#include "Pcl.h"
-#include "pixmapstr.h"
-#include "colormapst.h"
-#include "windowstr.h"
-#include "fb.h"
-#include "scrnintstr.h"
-#include "resource.h"
-
-static GCOps PclGCOps = 
-{
-    PclFillSpans,
-    PclSetSpans,
-    PclPutImage,
-    PclCopyArea,
-    PclCopyPlane,
-    PclPolyPoint,
-    PclPolyLine,
-    PclPolySegment,
-    PclPolyRectangle,
-    PclPolyArc,
-    PclFillPolygon,
-    PclPolyFillRect,
-    PclPolyFillArc,
-    PclPolyText8,
-    PclPolyText16,
-    PclImageText8,
-    PclImageText16,
-    PclImageGlyphBlt,
-    PclPolyGlyphBlt,
-    PclPushPixels
-}
-;
-
-
-static GCFuncs PclGCFuncs = 
-{
-    PclValidateGC,
-    miChangeGC,
-    miCopyGC,
-    PclDestroyGC,
-    miChangeClip,
-    miDestroyClip,
-    miCopyClip,
-}
-;
-
-Bool
-PclCreateGC(GCPtr pGC)
-{
-    if (fbCreateGC(pGC) == FALSE)
-        return FALSE;
-
-    pGC->clientClip = NULL;
-    pGC->clientClipType = CT_NONE;
-
-    pGC->ops = &PclGCOps;
-    pGC->funcs = &PclGCFuncs;
-
-    return TRUE;
-}
-
-void
-PclDestroyGC(GCPtr pGC)
-{
-    /* fb doesn't specialize DestroyGC */
-    miDestroyGC( pGC );
-}
-
-
-int
-PclGetDrawablePrivateStuff(
-     DrawablePtr pDrawable,
-     GC *gc,
-     unsigned long *valid,
-     FILE **file)
-{
-    XpContextPtr pCon;
-    PclContextPrivPtr cPriv;
-    
-    switch( pDrawable->type )
-      {
-	case DRAWABLE_PIXMAP:
-	  /*
-	   * If we ever get here, something is wrong.
-	   */
-	  return FALSE;
-
-	case DRAWABLE_WINDOW:
-	  pCon = PclGetContextFromWindow( (WindowPtr)pDrawable );
-
-	  if( pCon == NULL )
-	    return FALSE;
-	  else
-	    {
-		cPriv = (PclContextPrivPtr)
-		    dixLookupPrivate(&pCon->devPrivates, PclContextPrivateKey);
-		*gc = cPriv->lastGC;
-		*valid = cPriv->validGC;
-		*file = cPriv->pPageFile;
-		return TRUE;
-	    }
-	  
-	default:
-	  return FALSE;
-      }
-}
-
-void
-PclSetDrawablePrivateGC(
-     DrawablePtr pDrawable,
-     GC gc)
-{
-    PixmapPtr pix;
-    XpContextPtr pCon;
-    PclPixmapPrivPtr pixPriv;
-    PclContextPrivPtr pPriv;
-    int i;
-    
-    switch( pDrawable->type )
-      {
-	case DRAWABLE_PIXMAP:
-	  pix = (PixmapPtr)pDrawable;
-	  pixPriv = (PclPixmapPrivPtr)
-	      dixLookupPrivate(&pix->devPrivates, PclPixmapPrivateKey);
-	  
-	  pixPriv->lastGC = gc;
-	  pixPriv->validGC = 1;
-	  break;
-
-	case DRAWABLE_WINDOW:
-	  pCon = PclGetContextFromWindow( (WindowPtr)pDrawable );
-	  pPriv = (PclContextPrivPtr)
-	      dixLookupPrivate(&pCon->devPrivates, PclContextPrivateKey);
-	  
-	  pPriv->validGC = 1;
-	  pPriv->lastGC = gc;
-
-	  /*
-	   * Store the dash list separately, to avoid having it freed
-	   * out from under us.
-	   */
-	  if( pPriv->dash != NULL )
-	    xfree( pPriv->dash );
-	  if( gc.numInDashList != 0 )
-	    {
-		pPriv->dash = (unsigned char *)xalloc( sizeof( unsigned char ) 
-						      * gc.numInDashList );
-		for( i = 0; i < gc.numInDashList; i++ )
-		  pPriv->dash[i] = gc.dash[i];
-	    }
-	  else
-	    pPriv->dash = NULL;
-	  
-
-	  /*
-	   * Store the dash list separately, to avoid having it freed
-	   * out from under us.
-	   */
-	  if( pPriv->dash != NULL )
-	    xfree( pPriv->dash );
-	  if( gc.numInDashList != 0 )
-	    {
-		pPriv->dash = (unsigned char *)xalloc( sizeof( unsigned char ) 
-						      * gc.numInDashList );
-		for( i = 0; i < gc.numInDashList; i++ )
-		  pPriv->dash[i] = gc.dash[i];
-	    }
-	  else
-	    pPriv->dash = NULL;
-	  
-	  break;
-      }
-}
-
-static void
-PclSendPattern(char *bits,
-	       int sz,
-	       int depth,
-	       int h,
-	       int w,
-	       int patNum,
-	       FILE *outFile)
-{
-    char t[80], *row, *mod;
-    int w2;
-    int i, j;
-    
-    SEND_PCL( outFile, "\033%0A" );
-
-    if( depth == 1 )
-      {
-	  /* Each row must be word-aligned */
-	  w2 = ( w / 8 ) + ( ( w%8 ) ? 1 : 0 );
-/*
-	  if( w2 % 2 )
-	    w2++;
-*/
-	  
-	  sprintf( t, "\033*c%dg%dW", patNum, h * w2 + 8 );
-	  SEND_PCL( outFile, t );
-	  
-	  sprintf( t, "%c%c%c%c%c%c%c%c", 0, 0, 1, 0, h>>8, h&0xff, w>>8,
-		  w&0xff );
-	  SEND_PCL_COUNT( outFile, t, 8 );
-	  
-	  for( row = bits, i = 0; i < h; i++, row += BitmapBytePad( w ) )
-	    SEND_PCL_COUNT( outFile, row, w2 );
-      }
-    else if( depth == 8 )
-      {
-	  w2 = ( w % 2 ) ? w + 1 : w;
-	  
-	  sprintf( t, "\033*c%dg%dW", patNum, h * w2 + 8 );
-	  SEND_PCL( outFile, t );
-	  
-	  sprintf( t, "%c%c%c%c%c%c%c%c", 1, 0, 8, 0, h>>8, h&0xff,
-		  w>>8, w&0xff );
-	  SEND_PCL_COUNT( outFile, t, 8 );
-	  
-	  for( row = bits, i = 0; i < h; i++, 
-	      row += PixmapBytePad( w, 8 ) )
-	    SEND_PCL_COUNT( outFile, row, w2 );
-      }
-    else
-      {
-	  w2 = ( w % 2 ) ? w + 1 : w;
-	  
-	  sprintf( t, "\033*c%dg%dW", patNum, h * w2 + 8 );
-	  SEND_PCL( outFile, t );
-	  
-	  sprintf( t, "%c%c%c%c%c%c%c%c", 1, 0, 8, 0, h>>8, h&0xff,
-		  w>>8, w&0xff );
-	  SEND_PCL_COUNT( outFile, t, 8 );
-	  
-	  mod = (char *)xalloc( w2 );
-	  
-	  for( row = bits, i = 0; i < h; i++, 
-	      row += PixmapBytePad( w, 24 ) )
-	    {
-		char r, g, b;
-		for( j = 0; j < w2; j++ ) {
-		  r = ((row[j*4+1] >> 5) & 0x7) << 5;
-		  g = ((row[j*4+2] >> 5) & 0x7) << 2;
-		  b = ((row[j*4+3] >> 6) & 0x3);
-		  mod[j] = r | g | b;
-		}
-		SEND_PCL_COUNT( outFile, mod, w2 );
-	    }
-	  
-	  xfree( mod );
-      }
-    
-    SEND_PCL( outFile, "\033%0B" );
-}
-
-int
-PclUpdateDrawableGC(
-     GCPtr pGC,
-     DrawablePtr pDrawable,
-     FILE **outFile)
-{
-    Mask changeMask = 0;
-    GC dGC;
-    unsigned long valid;
-    int i;
-    XpContextPtr pCon;
-    PclContextPrivPtr cPriv;
-    PclGCPrivPtr gcPriv = (PclGCPrivPtr)
-	dixLookupPrivate(&pGC->devPrivates, PclGCPrivateKey);
-    
-    if( !PclGetDrawablePrivateStuff( pDrawable, &dGC, &valid, outFile ) )
-      return FALSE;
-
-    pCon = PclGetContextFromWindow( (WindowPtr)pDrawable );
-    cPriv = (PclContextPrivPtr)
-	dixLookupPrivate(&pCon->devPrivates, PclContextPrivateKey);
-
-    /*
-     * Here's where we update the colormap.  Since there can be
-     * different colormaps installed on each window, we need to check
-     * before each drawing request that the correct palette is active in
-     * the printer.  This is as good a place as any.
-     */
-    if( !PclUpdateColormap( pDrawable, pCon, pGC, *outFile ) )
-      return FALSE;
-
-    /*
-     * If the drawable's last GC is NULL, this means that this is
-     * the first time the drawable is being used.  Therefore, we need
-     * to emit PCL for all the GC fields.
-     */
-    if( valid == 0 )
-      changeMask = ~0;
-
-    /*
-     * If we have two different GC structures, there is no alternative
-     * but to scan through them both to determine the changeMask.
-     */
-    else
-      {
-	  if( dGC.alu != pGC->alu )
-	    changeMask |= GCFunction;
-	  if( dGC.fgPixel != pGC->fgPixel )
-	    changeMask |= GCForeground;
-	  if( dGC.bgPixel != pGC->bgPixel )
-	    changeMask |= GCBackground;
-	  if( dGC.lineWidth != pGC->lineWidth )
-	    changeMask |= GCLineWidth;
-	  if( dGC.lineStyle != pGC->lineStyle )
-	    changeMask |= GCLineStyle;
-	  if( dGC.capStyle != pGC->capStyle )
-	    changeMask |= GCCapStyle;
-	  if( dGC.joinStyle != pGC->joinStyle )
-	    changeMask |= GCJoinStyle;
-	  if( dGC.fillStyle != pGC->fillStyle )
-	    changeMask |= GCFillStyle;
-	  if( dGC.tile.pixmap != pGC->tile.pixmap )
-	    changeMask |= GCTile;
-	  if( dGC.stipple != pGC->stipple )
-	    changeMask |= GCStipple;
-	  if( dGC.patOrg.x != pGC->patOrg.x )
-	    changeMask |= GCTileStipXOrigin;
-	  if( dGC.patOrg.y != pGC->patOrg.y )
-	    changeMask |= GCTileStipYOrigin;
-	  
-	  if( dGC.numInDashList == pGC->numInDashList )
-	  {
-	    for( i = 0; i < dGC.numInDashList; i++ )
-	      if( cPriv->dash[i] != pGC->dash[i] )
-		{
-		    changeMask |= GCDashList;
-		    break;
-		}
-	  }
-	  else
-	    changeMask |= GCDashList;
-      }
-
-    /*
-     * Once the changeMask has been determined, we scan it and emit
-     * the appropriate PCL code to set the drawing attributes.
-     */
-
-    /* Must be in HP-GL/2 mode to set attributes */
-    SEND_PCL( *outFile, "\033%0B" );
-
-    if( changeMask & GCFunction )
-      {
-#ifdef XP_PCL_COLOR
-
-	  if( pGC->alu == GXclear )
-	    SEND_PCL( *outFile, "SP0;" );
-	  else
-	    SEND_PCL( *outFile, "SP1;" );
-#else
-	  if( pGC->alu == GXclear )
-	    SEND_PCL( *outFile, "SP0;" );
-	  else
-	    SEND_PCL( *outFile, "SP1;" );
-#endif /* XP_PCL_COLOR */
-      }
-    
-#if 0
-    if( changeMask & GCFunction )
-      {
-	  int rop = -1;
-	  char t[10];
-	  
-	  switch( pGC->alu )
-	    {
-	      case GXclear:
-		rop = 1;
-		break;
-	      case GXand:
-		rop = 136;
-		break;
-	      case GXandReverse:
-		rop = 68;
-		break;
-	      case GXcopy:
-		rop = 204;
-		break;
-	      case GXandInverted:
-		rop = 34;
-		break;
-	      case GXnoop:
-		rop = 170;
-		break;
-	      case GXxor:
-		rop = 238;
-		break;
-	      case GXor:
-		rop = 238;
-		break;
-	      case GXnor:
-		rop = 17;
-		break;
-	      case GXequiv:
-		rop = 153;
-		break;
-	      case GXinvert:
-		rop = 85;
-		break;
-	      case GXorReverse:
-		rop = 221;
-		break;
-	      case GXcopyInverted:
-		rop = 51;
-		break;
-	      case GXorInverted:
-		rop = 187;
-		break;
-	      case GXnand:
-		rop = 119;
-		break;
-	      case GXset:
-		rop = 0;
-		break;
-	    }
-	  if( rop != -1 )
-	    {
-		sprintf( t, "MC1,%d;", rop );
-		SEND_PCL( *outFile, t );
-#endif
-
-    if( changeMask & GCForeground )
-      switch( pGC->fgPixel )
-	{
-	  case 1:
-	    SEND_PCL( *outFile, "SP1;" );
-	    break;
-	  default:
-	    SEND_PCL( *outFile, "SP0;" );
-	    break;
-	}
-    
-    if( changeMask & GCForeground )
-      {
-#ifdef XP_PCL_COLOR
-	  ColormapPtr cmap;
-	  Colormap c;
-	  char t[40];
-
-	  c = wColormap( ((WindowPtr)pDrawable) );
-	  cmap = (ColormapPtr)LookupIDByType( c, RT_COLORMAP );
-
-	  if( cmap->class == TrueColor )
-	    {
-	      if( pGC->fillStyle != FillTiled || pGC->tileIsPixel ) {
-		unsigned short r, g, b;
-	
-		r = (pGC->fgPixel & cmap->pVisual->redMask)
-						>> (cmap->pVisual->offsetRed );
-		g = (pGC->fgPixel & cmap->pVisual->greenMask)
-						>> (cmap->pVisual->offsetGreen);
-		b = (pGC->fgPixel & cmap->pVisual->blueMask)
-						>> (cmap->pVisual->offsetBlue);
-
-		PclLookUp(cmap, cPriv, &r, &g, &b);
-		sprintf( t, "\033%%0A\033*v%ua%ub%uc0I\033%%0B", r, g, b);
-		SEND_PCL( *outFile, t );
-	     }
-	    }
-	  else /* PseudoColor or StaticGray */
-	    {
-		sprintf( t, "SP%ld;", (long) pGC->fgPixel );
-		SEND_PCL( *outFile, t );
-	    }
-#else
-	  ScreenPtr screen;
-	  screen = pDrawable->pScreen;
-	  if ( pGC->fgPixel == screen->whitePixel )
-	    SEND_PCL( *outFile, "SP0;");
-	  else
-	    SEND_PCL( *outFile, "SP1;");
-#endif /* XP_PCL_COLOR */
-      }
-    
-    if( changeMask & GCJoinStyle )
-      switch( pGC->joinStyle )
-	{
-	  case JoinMiter:
-	    SEND_PCL( *outFile, "LA2,1;" );
-	    break;
-	  case JoinRound:
-	    SEND_PCL( *outFile, "LA2,4;" );
-	    break;
-	  case JoinBevel:
-	    SEND_PCL( *outFile, "LA2,5;" );
-	    break;
-	}
-    
-    if( changeMask & GCCapStyle )
-      switch( pGC->capStyle )
-	{
-	  case CapNotLast:
-	  case CapButt:
-	    SEND_PCL( *outFile, "LA1,1;" );
-	    break;
-	  case CapRound:
-	    SEND_PCL( *outFile, "LA1,4;" );
-	    break;
-	  case CapProjecting:
-	    SEND_PCL( *outFile, "LA1,2;" );
-	    break;
-	}
-
-    if( changeMask & GCLineWidth )
-      {
-	  float penWidth, pixelsPerMM;
-	  ScreenPtr screen;
-	  char temp[30];
-	  
-	  if( pGC->lineWidth == 0 || pGC->lineWidth == 1 )
-	    /* A pen width of 0.0 mm gives a one-pixel-wide line */
-	    penWidth = 0.0;
-	  else
-	    {
-		screen = pDrawable->pScreen;
-		pixelsPerMM = (float)screen->width / (float)screen->mmWidth;
-		
-		penWidth = pGC->lineWidth / pixelsPerMM;
-	    }
-	  sprintf( temp, "PW%g;", penWidth );
-	  SEND_PCL( *outFile, temp );
-      }
-    
-    if( changeMask & GCLineStyle )
-      {
-	  int i, num = pGC->numInDashList;
-	  double total;
-	  char t[30];
-	  
-	  switch( pGC->lineStyle )
-	    {
-	      case LineSolid:
-		SEND_PCL( *outFile, "LT;" );
-		break;
-	      case LineOnOffDash:
-		/*
-		 * Calculate the pattern length of the dashes, in pixels,
-		 * then convert to mm
-		 */
-		for( i = 0, total = 0.0; i < 20 && i < num; i++ )
-		  total += pGC->dash[i];
-		if( num % 2 )
-		  for( i = num; i < 20 && i < num + num; i++ )
-		    total += pGC->dash[i-num];
-
-		total *= ( (double)pDrawable->pScreen->mmWidth /
-			  (double)pDrawable->pScreen->width );
-
-		sprintf( t, "LT8,%f,1;", total );
-		SEND_PCL( *outFile, t );
-		break;
-	    }
-      }
-    
-
-    if( changeMask & GCFillStyle )
-      switch( pGC->fillStyle )
-	{
-	  case FillSolid:
-	    SEND_PCL( *outFile, "FT1;TR0;CF;" );
-	    break;
-	  case FillTiled:
-	    SEND_PCL( *outFile, "FT22,100;TR0;CF2,0;" );
-	    break;
-	  case FillOpaqueStippled:
-	    SEND_PCL( *outFile, "FT22,101;TR0;CF2,0;" );
-	    if( pGC->fgPixel != gcPriv->stippleFg ||
-	       pGC->bgPixel != gcPriv->stippleBg )
-	      changeMask |= GCStipple;
-	    break;
-	  case FillStippled:
-	    SEND_PCL( *outFile, "FT22,102;TR1;CF2,0;" );
-	    break;
-	}
-
-    if( changeMask & GCTile && !pGC->tileIsPixel )
-      {
-	  char *bits;
-	  int h, w, sz;
-
-	  h = pGC->tile.pixmap->drawable.height;
-	  w = pGC->tile.pixmap->drawable.width;
-
-          sz = h * PixmapBytePad(w, pGC->tile.pixmap->drawable.depth);
-          bits = (char *)xalloc(sz);
-          fbGetImage(&(pGC->tile.pixmap->drawable), 0, 0, w, h, XYPixmap, ~0,
-                     bits);
-          PclSendPattern( bits, sz, 1, h, w, 100, *outFile );
-	  xfree( bits );
-      }
-
-    if( changeMask & ( GCTileStipXOrigin | GCTileStipYOrigin ) )
-      {
-	  char t[30];
-	  
-	  sprintf( t, "AC%d,%d;", pGC->patOrg.x, pGC->patOrg.y );
-	  SEND_PCL( *outFile, t );
-      }
-
-    /*
-     * We have to resend the stipple pattern either when the stipple itself
-     * changes, or if we're in FillOpaqueStippled mode and either the
-     * foreground or the background color changes.
-     */
-    if( changeMask & GCStipple || 
-       ( pGC->fillStyle == FillOpaqueStippled &&
-	( pGC->fgPixel != gcPriv->stippleFg || 
-	 pGC->bgPixel != gcPriv->stippleBg ) ) )
-      {
-	  int h, w, i, sz, w2;
-	  char *bits, *row, t[30];
-	  PixmapPtr scratchPix;
-	  GCPtr scratchGC;
-	  
-	  if( pGC->stipple != NULL )
-	    {
-		SEND_PCL( *outFile, "\033%0A" );
-		
-		h = pGC->stipple->drawable.height;
-		w = pGC->stipple->drawable.width;
-		sz = h * BitmapBytePad( w );
-
-		bits = (char *)xalloc( sz );
-		fbGetImage( &(pGC->stipple->drawable), 0, 0, w, h, XYPixmap, ~0, bits );
-
-		w2 = ( w / 8 ) + ( ( w%8 ) ? 1 : 0 );
-		/*
-		 * XXX The PCL docs say that I need to word-align each
-		 * XXX row, but I get garbage when I do...
-		 */
-		/*
-		if( w2 % 2 )
-		  w2++;
-		*/
-                
-		sprintf( t, "\033*c102g%dW", h * w2 + 8 );
-		SEND_PCL( *outFile, t );
-		
-		sprintf( t, "%c%c%c%c%c%c%c%c", 0, 0, 1, 0, h>>8, h&0xff, w>>8,
-			w&0xff );
-		SEND_PCL_COUNT( *outFile, t, 8 );
-		
-		for( row = bits, i = 0; i < h; i++, row += BitmapBytePad( w ) )
-		  SEND_PCL_COUNT( *outFile, row, w2 );
-
-		SEND_PCL( *outFile, "\033%0B" );
-		
-		xfree( bits );
-
-		/*
-		 * Also do the opaque stipple, as a tile
-		 */
-		if( pGC->depth != 1 )
-		  sz = h * PixmapBytePad( w, pGC->depth );
-		bits = (char *)xalloc( sz );
-		
-		scratchPix = 
-		  (*pGC->pScreen->CreatePixmap)( pGC->pScreen,
-						w, h, pGC->depth,
-						CREATE_PIXMAP_USAGE_SCRATCH );
-		scratchGC = GetScratchGC( pGC->depth, pGC->pScreen );
-		CopyGC( pGC, scratchGC, ~0L );
-
-                fbValidateGC(scratchGC, ~0L, (DrawablePtr)scratchPix);
-		fbCopyPlane(&(pGC->stipple->drawable), (DrawablePtr)scratchPix,
-                            scratchGC, 0, 0, w, h, 0, 0, 1);
-		fbGetImage(&(scratchPix->drawable), 0, 0, w, h, XYPixmap, ~0,
-			   bits);
-		PclSendPattern( bits, sz, pGC->depth, h, w, 101, *outFile );
-		FreeScratchGC( scratchGC );
-		(*pGC->pScreen->DestroyPixmap)( scratchPix );
-		xfree( bits );
-	    }
-      }
-
-    if( changeMask & ( GCTileStipXOrigin | GCTileStipYOrigin ) )
-      {
-	  char t[30];
-	  
-	  sprintf( t, "AC%d,%d;", pGC->patOrg.x, pGC->patOrg.y );
-	  SEND_PCL( *outFile, t );
-      }
-    
-    if( changeMask & GCDashList )
-      {
-	  int num = pGC->numInDashList;
-	  double total;
-	  char dashes[20];
-	  char t[100], t2[20];
-
-	  /* Make up the doubled dash list, if necessary */
-	  for( i = 0; i < 20 && i < num; i++ )
-	    dashes[i] = pGC->dash[i];
-	  
-	  if( num % 2 )
-	    {
-		for( i = num; i < 20 && i < num + num; i++ )
-		  dashes[i] = dashes[i-num];
-		if( ( num *= 2 ) > 20 )
-		  num = 20;
-	    }
-	  
-	  /* Add up dash lengths to get percentage */
-	  for( i = 0, total = 0; i < num; i++ )
-	    total += dashes[i];
-	  
-	  /* Build up the HP-GL/2 for the dash list */
-	  strcpy( t, "UL8" );
-	  for( i = 0; i < num; i++ )
-	    {
-		sprintf( t2, ",%d", 
-			(int)( ( (double)dashes[i] / total * 100.0 ) + 0.5 ) );
-		strcat( t, t2 );
-	    }
-	  strcat( t, ";" );
-	  SEND_PCL( *outFile, t );
-      }
-   
-
-    /* Go back to PCL mode */
-    SEND_PCL( *outFile, "\033%0A" );
-    
-    /*
-     * Update the drawable's private information, which includes
-     * erasing the drawable's private changeMask, since all the
-     * changes have been made.
-     */
-    if( changeMask )
-      PclSetDrawablePrivateGC( pDrawable, *pGC );
-    
-    return TRUE;
-}
-
-/*
- * PclComputeCompositeClip()
- *
- * I'd like to use the miComputeCompositeClip function, but it sticks
- * things into the mi GC privates, where the PCL driver can't get at
- * it.  So, rather than mess around with the mi code, I ripped it out
- * and made the appropriate changes here.
- */
-
-
-void
-PclComputeCompositeClip(
-    GCPtr           pGC,
-    DrawablePtr     pDrawable)
-{
-    if (pDrawable->type == DRAWABLE_WINDOW)
-    {
-	WindowPtr       pWin = (WindowPtr) pDrawable;
-	RegionPtr       pregWin;
-	Bool            freeTmpClip, freeCompClip;
-
-	if (pGC->subWindowMode == IncludeInferiors)
-	{
-	    pregWin = NotClippedByChildren(pWin);
-	    freeTmpClip = TRUE;
-	}
-	else
-	{
-	    pregWin = &pWin->clipList;
-	    freeTmpClip = FALSE;
-	}
-	freeCompClip = pGC->freeCompClip;
-
-	/*
-	 * if there is no client clip, we can get by with just keeping the
-	 * pointer we got, and remembering whether or not should destroy (or
-	 * maybe re-use) it later.  this way, we avoid unnecessary copying of
-	 * regions.  (this wins especially if many clients clip by children
-	 * and have no client clip.)
-	 */
-	if (pGC->clientClipType == CT_NONE)
-	{
-	    if (freeCompClip)
-		REGION_DESTROY(pGC->pScreen, pGC->pCompositeClip);
-	    pGC->pCompositeClip = pregWin;
-	    pGC->freeCompClip = freeTmpClip;
-	}
-	else
-	{
-	    /*
-	     * we need one 'real' region to put into the composite clip. if
-	     * pregWin the current composite clip are real, we can get rid of
-	     * one. if pregWin is real and the current composite clip isn't,
-	     * use pregWin for the composite clip. if the current composite
-	     * clip is real and pregWin isn't, use the current composite
-	     * clip. if neither is real, create a new region.
-	     */
-
-	    REGION_TRANSLATE(pGC->pScreen, pGC->clientClip,
-					 pDrawable->x + pGC->clipOrg.x,
-					 pDrawable->y + pGC->clipOrg.y);
-
-	    if (freeCompClip)
-	    {
-		REGION_INTERSECT(pGC->pScreen, pGC->pCompositeClip,
-					    pregWin, pGC->clientClip);
-		if (freeTmpClip)
-		    REGION_DESTROY(pGC->pScreen, pregWin);
-	    }
-	    else if (freeTmpClip)
-	    {
-		REGION_INTERSECT(pGC->pScreen, pregWin, pregWin,
-				 pGC->clientClip);
-		pGC->pCompositeClip = pregWin;
-	    }
-	    else
-	    {
-		pGC->pCompositeClip = REGION_CREATE(pGC->pScreen, NullBox, 0);
-		REGION_INTERSECT(pGC->pScreen, pGC->pCompositeClip,
-				       pregWin, pGC->clientClip);
-	    }
-	    pGC->freeCompClip = TRUE;
-	    REGION_TRANSLATE(pGC->pScreen, pGC->clientClip,
-					 -(pDrawable->x + pGC->clipOrg.x),
-					 -(pDrawable->y + pGC->clipOrg.y));
-	}
-    }	/* end of composite clip for a window */
-    else
-    {
-	BoxRec          pixbounds;
-
-	/* XXX should we translate by drawable.x/y here ? */
-	pixbounds.x1 = 0;
-	pixbounds.y1 = 0;
-	pixbounds.x2 = pDrawable->width;
-	pixbounds.y2 = pDrawable->height;
-
-	if (pGC->freeCompClip)
-	{
-	    REGION_RESET(pGC->pScreen, pGC->pCompositeClip, &pixbounds);
-	}
-	else
-	{
-	    pGC->freeCompClip = TRUE;
-	    pGC->pCompositeClip = REGION_CREATE(pGC->pScreen, &pixbounds, 1);
-	}
-
-	if (pGC->clientClipType == CT_REGION)
-	{
-	    REGION_TRANSLATE(pGC->pScreen, pGC->pCompositeClip,
-					 -pGC->clipOrg.x, -pGC->clipOrg.y);
-	    REGION_INTERSECT(pGC->pScreen, pGC->pCompositeClip,
-				pGC->pCompositeClip, pGC->clientClip);
-	    REGION_TRANSLATE(pGC->pScreen, pGC->pCompositeClip,
-					 pGC->clipOrg.x, pGC->clipOrg.y);
-	}
-    }	/* end of composite clip for pixmap */
-} 
-
-/*
- * PclValidateGC()
- *
- * Unlike many screen GCValidate routines, this function should not need
- * to mess with setting the drawing functions.  Different drawing
- * functions are usually needed to optimize such things as drawing
- * wide or dashed lines; this functionality will be handled primarily
- * by the printer itself, while the necessary PCL code to set the
- * attributes will be done in PclUpdateDrawableGC().
- */
-
-/*ARGSUSED*/
-void
-PclValidateGC(
-     GCPtr pGC,
-     unsigned long changes,
-     DrawablePtr pDrawable)
-{
-    /*
-     * Pixmaps should be handled by their respective validation
-     * functions.
-     */
-    if( pDrawable->type == DRAWABLE_PIXMAP )
-      {
-          fbValidateGC(pGC, ~0, pDrawable);
-	  return;
-      }
-
-    /*
-     * Reset the drawing operations
-     */
-    pGC->ops = &PclGCOps;
-    
-    /*
-     * Validate the information, and correct it if necessary.
-     */
-
-    /*
-     * If necessary, compute the composite clip region.  (Code ripped
-     * from migc.c)
-     */
-    if ((changes & (GCClipXOrigin|GCClipYOrigin|GCClipMask|GCSubwindowMode)) ||
-	(pDrawable->serialNumber != (pGC->serialNumber & DRAWABLE_SERIAL_BITS))
-       )
-    {
-	PclComputeCompositeClip(pGC, pDrawable);
-    }
-
-    /*
-     * PCL does not directly support the DoubleDash line style, nor is
-     * there an easy way to simulate it, so we'll just change it to a
-     * LineOnOffDash, which is supported by PCL.
-     */
-    if( ( changes & GCLineStyle ) && ( pGC->lineStyle == LineDoubleDash ) )
-      pGC->lineStyle = LineOnOffDash;
-    
-    /*
-     * Update the drawable's changeMask to reflect the changes made to the GC.
-     */
-/*
-    PclSetDrawablePrivateGC( pDrawable, *pGC, changes );
-*/
-}
diff --git a/hw/xprint/pcl/PclInit.c b/hw/xprint/pcl/PclInit.c
deleted file mode 100644
index e738e3e..0000000
--- a/hw/xprint/pcl/PclInit.c
+++ /dev/null
@@ -1,575 +0,0 @@
-/*******************************************************************
-**
-**    *********************************************************
-**    *
-**    *  File:		PclInit.c
-**    *
-**    *  Contents:
-**    *                 Initialization code of Pcl driver for the print server.
-**    *
-**    *  Created:	1/30/95
-**    *
-**    *********************************************************
-** 
-********************************************************************/
-/*
-(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.
-*/
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#include <stdio.h>
-#include <string.h>
-#include <sys/types.h>
-#include <sys/wait.h>
-
-#include "Pcl.h"
-
-#include "fb.h"
-#include <X11/Xos.h>	/* for unlink() */
-
-#include "attributes.h"
-#include "DiPrint.h"
-
-#define MODELDIRNAME "/models"
-
-static void AllocatePclPrivates(ScreenPtr pScreen);
-static int PclInitContext(XpContextPtr pCon);
-static Bool PclDestroyContext(XpContextPtr pCon);
-
-DevPrivateKey PclScreenPrivateKey = &PclScreenPrivateKey;
-DevPrivateKey PclContextPrivateKey = &PclContextPrivateKey;
-DevPrivateKey PclPixmapPrivateKey = &PclPixmapPrivateKey;
-DevPrivateKey PclWindowPrivateKey = &PclWindowPrivateKey;
-DevPrivateKey PclGCPrivateKey = &PclGCPrivateKey;
-
-#ifdef XP_PCL_COLOR
-/*
- * The supported visuals on this screen
- */
-static VisualRec Visuals[] = 
-{
-    { 1, StaticGray, 1, 2, 1, 0, 0, 0, 0, 0, 0 },
-    { 2, PseudoColor, 8, 256, 8, 0, 0, 0, 0, 0, 0 },
-    { 3, TrueColor, 8, 256, 24, 0xFF0000, 0xFF00, 0xFF, 16, 8, 0 }
-};
-
-/*
- * The supported depths on this screen
- */
-static DepthRec Depths[] = 
-{
-    { 1, 1, NULL },
-    { 8, 1, NULL },
-    { 24, 1, NULL }
-};
-#else
-/*
- * The supported visuals on this screen
- */
-static VisualRec Visuals[] = 
-{
-    { 1, StaticGray, 1, 2, 1, 0, 0, 0, 0, 0, 0}
-};
-
-/*
- * The supported depths on this screen
- */
-static DepthRec Depths[] = 
-{
-    { 1, 1, NULL }
-};
-#endif /* XP_PCL_COLOR */
-
-
-#define NUM_VISUALS(visuals) (sizeof(visuals) / sizeof(VisualRec))
-#define NUM_DEPTHS(depths) (sizeof(depths) / sizeof(DepthRec))
-
-Bool
-PclCloseScreen(int index,
-	       ScreenPtr pScreen)
-{
-    PclScreenPrivPtr pPriv = (PclScreenPrivPtr)
-	dixLookupPrivate(&pScreen->devPrivates, PclScreenPrivateKey);
-
-    pScreen->CloseScreen = pPriv->CloseScreen;
-    xfree( pPriv );
-    
-    return (*pScreen->CloseScreen)(index, pScreen);
-}
-
-Bool
-InitializePclDriver(
-     int ndx,
-     ScreenPtr pScreen,
-     int argc,
-     char **argv)
-{
-    int maxRes, xRes, yRes, maxDim;
-    unsigned i;
-    PclScreenPrivPtr pPriv;
-    
-    /*
-     * Register this driver's InitContext function with the print
-     * extension.  This is a bit sleazy, as the extension hasn't yet
-     * been initialized, but the extensionneeds to know this, and this
-     * seems the best time to provide the information.
-     */
-#ifdef XP_PCL_COLOR
-    XpRegisterInitFunc( pScreen, "XP-PCL-COLOR", PclInitContext );
-#elif XP_PCL_MONO
-    XpRegisterInitFunc( pScreen, "XP-PCL-MONO", PclInitContext );
-#else
-    XpRegisterInitFunc( pScreen, "XP-PCL-LJ3", PclInitContext );
-#endif /* XP_PCL_MONO */
-    
-    /*
-     * Create and fill in the devPrivate for the PCL driver.
-     */
-    AllocatePclPrivates(pScreen);
-   
-    pPriv = (PclScreenPrivPtr)
-	dixLookupPrivate(&pScreen->devPrivates, PclScreenPrivateKey);
-
-    maxDim = MAX( pScreen->height, pScreen->width );
-    xRes = pScreen->width / ( pScreen->mmWidth / 25.4 );
-    yRes = pScreen->height / ( pScreen->mmHeight / 25.4 );
-    maxRes = MAX( xRes, yRes );
-
-#ifdef XP_PCL_COLOR
-    fbScreenInit( pScreen, NULL, maxDim, maxDim, maxRes, maxRes,
-		  maxRes, 8 ); /* XXX what's the depth here? */
-    /* Clean up the fields that we stomp (code taken from fbCloseScreen) */
-    for( i = 0; (int) i < pScreen->numDepths; i++ )
-      xfree( pScreen->allowedDepths[i].vids );
-    xfree( pScreen->allowedDepths );
-    xfree( pScreen->visuals );
-#else
-    fbScreenInit( pScreen, NULL, maxDim, maxDim, maxRes, maxRes,
-		  maxRes, 1 );
-#endif /* XP_PCL_COLOR */
-
-    miInitializeBackingStore ( pScreen );
-
-    pScreen->defColormap = FakeClientID(0);
-    pScreen->blackPixel = 1;
-    pScreen->whitePixel = 0;
-
-    pPriv->CloseScreen = pScreen->CloseScreen;
-    pScreen->CloseScreen = PclCloseScreen;
-    
-    pScreen->QueryBestSize = (QueryBestSizeProcPtr)PclQueryBestSize;
-    pScreen->SaveScreen = (SaveScreenProcPtr)_XpBoolNoop;
-    pScreen->GetImage = (GetImageProcPtr)_XpVoidNoop;
-    pScreen->GetSpans = (GetSpansProcPtr)_XpVoidNoop;
-    pScreen->CreateWindow = PclCreateWindow;
-    pScreen->DestroyWindow = PclDestroyWindow;
-/*
-    pScreen->PositionWindow = PclPositionWindow;
-*/
-    pScreen->ChangeWindowAttributes = PclChangeWindowAttributes;
-/*
-    pScreen->RealizeWindow = PclMapWindow;
-    pScreen->UnrealizeWindow = PclUnmapWindow;
-*/
-    pScreen->CopyWindow = PclCopyWindow; /* XXX Hard routine to write! */
-
-    pScreen->CreatePixmap = fbCreatePixmap;
-    pScreen->DestroyPixmap = fbDestroyPixmap;
-    pScreen->RealizeFont = PclRealizeFont;
-    pScreen->UnrealizeFont = PclUnrealizeFont;
-    pScreen->CreateGC = PclCreateGC;
-
-    pScreen->CreateColormap = PclCreateColormap;
-    pScreen->DestroyColormap = PclDestroyColormap;
-    pScreen->InstallColormap = (InstallColormapProcPtr)NoopDDA;
-    pScreen->UninstallColormap = (UninstallColormapProcPtr)NoopDDA;
-    pScreen->ListInstalledColormaps = PclListInstalledColormaps;
-    pScreen->StoreColors = PclStoreColors;
-/*
-    pScreen->ResolveColor = PclResolveColor;
-*/
-
-    pScreen->BitmapToRegion = fbPixmapToRegion;
-
-    pScreen->ConstrainCursor = PclConstrainCursor;
-    pScreen->CursorLimits = PclCursorLimits;
-    pScreen->DisplayCursor = PclDisplayCursor;
-    pScreen->RealizeCursor = PclRealizeCursor;
-    pScreen->UnrealizeCursor = PclUnrealizeCursor;
-    pScreen->RecolorCursor = PclRecolorCursor;
-    pScreen->SetCursorPosition = PclSetCursorPosition;
-
-    pScreen->visuals = Visuals;
-    pScreen->numVisuals = NUM_VISUALS( Visuals );
-    pScreen->allowedDepths = Depths;
-    pScreen->numDepths = NUM_DEPTHS( Depths );
-
-    for( i = 0; i < NUM_DEPTHS( Depths ); i++ )
-      {
-	  pScreen->allowedDepths[i].vids =
-	    (VisualID *)xalloc( sizeof(VisualID ) );
-	  pScreen->allowedDepths[i].vids[0] = i + 1;
-      }
-    
-#ifdef XP_PCL_COLOR
-    pScreen->rootVisual = 2;
-    pScreen->rootDepth = 8;
-#else
-    pScreen->rootVisual = 1;
-    pScreen->rootDepth = 1;
-#endif /* XP_PCL_COLOR */
-
-    pPriv->colormaps = NULL;
-    PclCreateDefColormap( pScreen );
-    
-    return TRUE;
-}
-
-static void
-AllocatePclPrivates(ScreenPtr pScreen)
-{
-    dixRequestPrivate(PclWindowPrivateKey, sizeof( PclWindowPrivRec ) );
-    dixRequestPrivate(PclContextPrivateKey, sizeof( PclContextPrivRec ) );
-    dixRequestPrivate(PclGCPrivateKey, sizeof( PclGCPrivRec ) );
-    dixRequestPrivate(PclPixmapPrivateKey, sizeof( PclPixmapPrivRec ) );
-
-    dixSetPrivate(&pScreen->devPrivates, PclScreenPrivateKey,
-		  xalloc(sizeof(PclScreenPrivRec)));
-}
-
-/*
- * PclInitContext
- *
- * Establish the appropriate values for a PrintContext used with the PCL
- * driver.
- */
-
-static char DOC_ATT_SUPP[]="document-attributes-supported";
-static char DOC_ATT_VAL[]="document-format xp-listfonts-modes";
-static char JOB_ATT_SUPP[]="job-attributes-supported";
-static char JOB_ATT_VAL[]="";
-static char PAGE_ATT_SUPP[]="xp-page-attributes-supported";
-static char PAGE_ATT_VAL[]="content-orientation default-printer-resolution \
-default-input-tray default-medium plex xp-listfonts-modes";
-
-static int
-PclInitContext(XpContextPtr pCon)
-{
-    XpDriverFuncsPtr pFuncs;
-    PclContextPrivPtr pConPriv;
-    char *server, *attrStr;
-    char *modelID;
-    char *configDir;
-    char *pathName;
-    int i, j;
-    float width, height;
-    XpOidMediumDiscreteSizeList* ds_list;
-    XpOidArea* repro;
-    XpOid page_size;
-    XpOidMediumSS* m;
-    
-    /*
-     * Initialize the attribute store for this printer.
-     */
-    XpInitAttributes( pCon );
-
-    /*
-     * Initialize the function pointers
-     */
-    pFuncs = &( pCon->funcs );
-    pFuncs->StartJob = PclStartJob;
-    pFuncs->EndJob = PclEndJob;
-    pFuncs->StartDoc = PclStartDoc;
-    pFuncs->EndDoc = PclEndDoc;
-    pFuncs->StartPage = PclStartPage;
-    pFuncs->EndPage = PclEndPage;
-    pFuncs->PutDocumentData = PclDocumentData;
-    pFuncs->GetDocumentData = PclGetDocumentData;
-    pFuncs->GetAttributes = PclGetAttributes;
-    pFuncs->SetAttributes = PclSetAttributes;
-    pFuncs->AugmentAttributes = PclAugmentAttributes;
-    pFuncs->GetOneAttribute = PclGetOneAttribute;
-    pFuncs->DestroyContext = PclDestroyContext;
-    pFuncs->GetMediumDimensions = PclGetMediumDimensions;
-    pFuncs->GetReproducibleArea = PclGetReproducibleArea;
-    
-
-    /*
-     * Set up the context privates
-     */
-    pConPriv = (PclContextPrivPtr)
-	dixLookupPrivate(&pCon->devPrivates, PclContextPrivateKey);
-    
-    pConPriv->jobFileName = (char *)NULL;
-    pConPriv->pageFileName = (char *)NULL;
-    pConPriv->pJobFile = (FILE *)NULL;
-    pConPriv->pPageFile = (FILE *)NULL;
-    pConPriv->dash = NULL;
-    pConPriv->validGC = 0;
-
-    pConPriv->getDocClient = (ClientPtr)NULL;
-    pConPriv->getDocBufSize = 0;
-    modelID = XpGetOneAttribute(pCon, XPPrinterAttr, "xp-model-identifier");
-    if ( (configDir = XpGetConfigDir(False)) != (char *) NULL ) {
-	pathName = (char *)xalloc(strlen(configDir) + strlen(MODELDIRNAME) +
-				strlen(modelID) + strlen("color.map") + 4);
-	if (pathName) {
-	    sprintf(pathName, "%s/%s/%s/%s", configDir, MODELDIRNAME, modelID,
-				"color.map");
-	    pConPriv->ctbl = PclReadMap(pathName, &pConPriv->ctbldim);
-	    xfree(pathName);
-
-	} else
-	    pConPriv->ctbl = NULL;
-    } else
-	pConPriv->ctbl = NULL;
-
-#ifdef XP_PCL_LJ3
-    /*
-     * Initialize the spooling buffer for saving the figures temporary
-     * (LaserJet IIIs printers don't support the macro function which
-     *  includes some HP-GL/2 commands.)
-     */
-    pConPriv->fcount = 0;
-    if ( !(pConPriv->figures = (char *)xalloc(1024)) )
-	pConPriv->fcount_max = 0;
-    else
-	pConPriv->fcount_max = 1024;
-#endif /* XP_PCL_LJ3 */
-    
-    /*
-     * document-attributes-supported
-     */
-    server = XpGetOneAttribute( pCon, XPServerAttr, DOC_ATT_SUPP );
-    if( ( attrStr = (char *)xalloc(strlen(server) + strlen(DOC_ATT_SUPP)
-				   + strlen(DOC_ATT_VAL) +
-				   strlen(PAGE_ATT_VAL) + 8 ) ) 
-       == (char *)NULL )
-      return BadAlloc;
-    sprintf( attrStr, "*%s:\t%s %s %s", DOC_ATT_SUPP, server,
-	    DOC_ATT_VAL, PAGE_ATT_VAL );
-    XpAugmentAttributes( pCon, XPPrinterAttr, attrStr );
-    xfree( attrStr );
-    
-    /*
-     * job-attributes-supported
-     */
-    server = XpGetOneAttribute( pCon, XPServerAttr, JOB_ATT_SUPP );
-    if( ( attrStr = (char *)xalloc(strlen(server) + strlen(JOB_ATT_SUPP)
-				   + strlen(JOB_ATT_VAL) + 8 ) ) 
-       == (char *)NULL )
-      return BadAlloc;
-    sprintf( attrStr, "*%s:\t%s %s", JOB_ATT_SUPP, server, JOB_ATT_VAL );
-    XpAugmentAttributes( pCon, XPPrinterAttr, attrStr );
-    xfree( attrStr );
-    
-    /*
-     * xp-page-attributes-supported
-     */
-    server = XpGetOneAttribute( pCon, XPServerAttr, PAGE_ATT_SUPP );
-    if( ( attrStr = (char *)xalloc(strlen(server) + strlen(PAGE_ATT_SUPP)
-				   + strlen(PAGE_ATT_VAL) + 8 ) ) 
-       == (char *)NULL )
-      return BadAlloc;
-    sprintf( attrStr, "*%s:\t%s %s", PAGE_ATT_SUPP, server, PAGE_ATT_VAL );
-    XpAugmentAttributes( pCon, XPPrinterAttr, attrStr );
-    xfree( attrStr );
-
-    /*
-     * Validate the attribute pools
-     */
-    XpValidateAttributePool( pCon, XPPrinterAttr, &PclValidatePoolsRec );
-
-    /*
-     * Munge the reproducible areas to reflect the fact that PCL will not let
-     * me move the right or left margins closer than .25" to the edge of the
-     * paper.
-     */
-    m = XpGetMediumSSAttr( pCon, XPPrinterAttr,
-			  xpoid_att_medium_source_sizes_supported, 
-			  (const XpOidList*) NULL,
-			  (const XpOidList*) NULL );
-    for( i = 0; i < XpOidMediumSSCount( m ); i++ )
-      {
-	  if( XpOidMediumSS_DISCRETE == (m->mss)[i].mstag )
-	    {
-		ds_list = (m->mss)[i].ms.discrete;
-		for( j = 0; j < ds_list->count; j++ )
-		  {
-		      repro = &(ds_list->list)[j].assured_reproduction_area;
-		      page_size = (ds_list->list)[j].page_size;
-		      XpGetMediumMillimeters( page_size, &width, &height );
-		      
-		      if( repro->minimum_x < 6.35 )
-			repro->minimum_x = 6.35;
-		      if( width - repro->maximum_x < 6.35 )
-			repro->maximum_x = width - 6.35;
-		  }
-	    }
-      }
-    XpPutMediumSSAttr( pCon, XPPrinterAttr,
-		      xpoid_att_medium_source_sizes_supported, m );
-    XpOidMediumSSDelete( m );
-
-    /*
-     * Finish validating the attribute pools
-     */
-
-    XpValidateAttributePool( pCon, XPDocAttr, &PclValidatePoolsRec );
-    XpValidateAttributePool( pCon, XPJobAttr, &PclValidatePoolsRec );
-    XpValidateAttributePool( pCon, XPPageAttr, &PclValidatePoolsRec );
-
-    /*
-     * Clear out the colormap storage
-     */
-    pConPriv->palettes = NULL;
-    
-    return Success;
-}
-
-static Bool
-PclDestroyContext(XpContextPtr pCon)
-{
-    PclContextPrivPtr pConPriv = (PclContextPrivPtr)
-	dixLookupPrivate(&pCon->devPrivates, PclContextPrivateKey);
-    PclPaletteMapPtr p, t;
-    PclCmapToContexts *pCmap;
-    ScreenPtr screen;
-    PclScreenPrivPtr sPriv;
-    PclContextListPtr con, prevCon, temp;
-    
-    
-    /*
-     * Clean up the temporary files
-     */
-    if( pConPriv->pPageFile != (FILE *)NULL )
-      {
-	  fclose( pConPriv->pPageFile );
-	  pConPriv->pPageFile = (FILE *)NULL;
-      }
-    if( pConPriv->pageFileName != (char *)NULL )
-      {
-	  unlink( pConPriv->pageFileName );
-	  xfree( pConPriv->pageFileName );
-	  pConPriv->pageFileName = (char *)NULL;
-      }
-    
-    if( pConPriv->pJobFile != (FILE *)NULL )
-      {
-	  fclose( pConPriv->pJobFile );
-	  pConPriv->pJobFile = NULL;
-      }
-    if( pConPriv->jobFileName != (char *)NULL )
-      {
-	  unlink( pConPriv->jobFileName );
-	  xfree( pConPriv->jobFileName );
-	  pConPriv->jobFileName = (char *)NULL;
-      }
-
-    xfree( pConPriv->dash );
-    xfree(pConPriv->ctbl);
-    pConPriv->ctbl = NULL;
-#ifdef XP_PCL_LJ3
-    xfree( pConPriv->figures );
-#endif /* XP_PCL_LJ3 */
-
-    /*
-     * Destroy the colormap<->palette mappings
-     */
-    p = pConPriv->palettes;
-    while( p )
-      {
-	  t = p;
-	  p = p->next;
-	  xfree( t );
-      }
-    pConPriv->palettes = NULL;
-
-    /*
-     * Remove the context from the screen-level colormap<->contexts mappings
-     */
-    screen = screenInfo.screens[pCon->screenNum];
-    sPriv = (PclScreenPrivPtr)
-	dixLookupPrivate(&screen->devPrivates, PclScreenPrivateKey);
-    pCmap = sPriv->colormaps;
-    while( pCmap )
-      {
-	  con = pCmap->contexts;
-	  prevCon = NULL;
-	  
-	  while( con )
-	    {
-		if( con->context->contextID == pCon->contextID )
-		  {
-		      if( prevCon )
-			{
-			    temp = con;
-			    prevCon->next = con = con->next;
-			}
-		      else
-			{
-			    temp = pCmap->contexts;
-			    pCmap->contexts = con = con->next;
-			}
-		      xfree( temp );
-		  }
-		else
-		  con = con->next;
-	    }
-
-	  pCmap = pCmap->next;
-      }
-    
-    XpDestroyAttributes(pCon);
-
-    return Success;
-}
-
-XpContextPtr
-PclGetContextFromWindow(WindowPtr win)
-{
-    PclWindowPrivPtr pPriv;
-    
-    while( win )
-      {
-	  pPriv = (PclWindowPrivPtr)
-	      dixLookupPrivate(&win->devPrivates, PclWindowPrivateKey);
-	  if( pPriv->validContext )
-	    return pPriv->context;
-      
-	  win = win->parent;
-      }
-    
-    return NULL;
-}
diff --git a/hw/xprint/pcl/PclLine.c b/hw/xprint/pcl/PclLine.c
deleted file mode 100644
index 68d55a5..0000000
--- a/hw/xprint/pcl/PclLine.c
+++ /dev/null
@@ -1,314 +0,0 @@
-/*******************************************************************
-**
-**    *********************************************************
-**    *
-**    *  File:		PclLine.c
-**    *
-**    *  Contents:
-**    *                 Line drawing routines for the PCL driver
-**    *
-**    *  Created:	10/11/95
-**    *
-**    *********************************************************
-**
-********************************************************************/
-/*
-(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.
-*/
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#include "Pcl.h"
-#include "gcstruct.h"
-#include "windowstr.h"
-
-/*
- * PclPolyLine()
- * PclPolySegment()
- *
- * Generates PCL code to draw a polyline, or a collection of distinct
- * line segments, clipped by the current clip region.  Since PCL
- * supports clipping to a rectangle, and the clip region is
- * represented as a collection of visible rectangles, we can draw and
- * clip the line by repeatedly drawing the complete line, clipped to
- * each rectangle in the clip region.
- *
- * Since each box in the clipping region generates approximately 30
- * bytes of PCL code, we have to have a way to avoid having a large
- * number of boxes.  The worst problem the case where the clipping
- * region is a collection of one-pixel-high boxes, perhaps arising
- * from a bitmap clip mask, or a region defined by a non-rectangular
- * polygon.
- *
- * To alleviate this problem, we create a second clipping region,
- * which consists of the union of the bounding boxes of each line
- * segment.  (Each bounding box is also increased by some amount
- * related to the current line width to allow for non-zero-width
- * lines, and for the various end and join styles.)  This region is
- * intersected with the "real" clipping region to get the region used
- * to actually clip the polyline.  This should result in a significant
- * reduction in the number of clip rectangles, as the region-handling
- * code should consolidate many of the fragments of one-pixel-high
- * rectangles into larger rectangles.
- */
-
-void
-PclPolyLine(
-     DrawablePtr pDrawable,
-     GCPtr pGC,
-     int mode,
-     int nPoints,
-     xPoint *pPoints)
-{
-    char t[80];
-    FILE *outFile;
-    int xoffset = 0, yoffset = 0;
-    int nbox;
-    BoxPtr pbox;
-    xRectangle *drawRects, *r;
-    RegionPtr drawRegion, region;
-    short fudge;
-    int i;
-    XpContextPtr pCon;
-    PclContextPrivPtr pConPriv;
-
-    if( PclUpdateDrawableGC( pGC, pDrawable, &outFile ) == FALSE )
-      return;
-
-    pCon = PclGetContextFromWindow( (WindowPtr) pDrawable );
-    pConPriv = (PclContextPrivPtr)
-	dixLookupPrivate(&pCon->devPrivates, PclContextPrivateKey);
-
-    /*
-     * Allocate the storage required to deal with the clipping
-     * regions.
-     */
-    region = REGION_CREATE( pGC->pScreen, NULL, 0 );
-    drawRects = (xRectangle *)
-      xalloc( ( nPoints - 1 ) * sizeof( xRectangle ) );
-
-    /*
-     * Calculate the "fudge factor" based on the line width.
-     * Multiplying by three seems to be a good first guess.
-     * XXX I need to think of a way to test this.
-     */
-    fudge = 3 * pGC->lineWidth + 1;
-
-    /*
-     * Generate the PCL code to draw the polyline, by defining it as a
-     * macro which uses the HP-GL/2 line drawing function.
-     */
-
-    MACRO_START( outFile, pConPriv );
-    SAVE_PCL( outFile, pConPriv, "\033%0B" );
-
-    sprintf( t, "PU%d,%dPD\n", pPoints[0].x + pDrawable->x,
-	    pPoints[0].y + pDrawable->y );
-    SAVE_PCL( outFile, pConPriv, t ); /* Move to the start of the polyline */
-
-    switch( mode )
-      {
-	case CoordModeOrigin:
-	  xoffset = pDrawable->x;
-	  yoffset = pDrawable->y;
-	  SAVE_PCL( outFile, pConPriv, "PA" );
-	  break;
-	case CoordModePrevious:
-	  xoffset = yoffset = 0;
-	  SAVE_PCL( outFile, pConPriv, "PR" );
-	  break;
-      }
-
-    /*
-     * Build the "drawing region" as we build the PCL to draw the
-     * line.
-     */
-    for(i = 1, r = drawRects; i < nPoints; i++, r++ )
-      {
-	  if( i != 1 )
-	    SAVE_PCL( outFile, pConPriv, "," );
-
-	  sprintf( t, "%d,%d", pPoints[i].x + xoffset,
-		  pPoints[i].y + yoffset );
-	  SAVE_PCL( outFile, pConPriv, t );
-
-	  r->x = MIN( pPoints[i-1].x, pPoints[i].x ) + xoffset - fudge;
-	  r->y = MIN( pPoints[i-1].y, pPoints[i].y ) + yoffset - fudge;
-	  r->width = abs( pPoints[i-1].x - pPoints[i].x ) + 2 * fudge;
-	  r->height = abs( pPoints[i-1].y - pPoints[i].y ) + 2 * fudge;
-      }
-    SAVE_PCL( outFile, pConPriv, ";\033%0A" ); /* End the macro */
-    MACRO_END( outFile );
-
-    /*
-     * Convert the collection of rectangles into a proper region, then
-     * intersect it with the clip region.
-     */
-    drawRegion = RECTS_TO_REGION( pGC->pScreen, nPoints - 1,
-				  drawRects, CT_UNSORTED );
-    if( mode == CoordModePrevious )
-      REGION_TRANSLATE( pGC->pScreen, drawRegion, pPoints[0].x, pPoints[0].y );
-    REGION_INTERSECT( pGC->pScreen, region, drawRegion, pGC->pCompositeClip );
-
-    /*
-     * For each rectangle in the clip region, set the HP-GL/2 "input
-     * window" and render the entire polyline to it.
-     */
-    pbox = REGION_RECTS( region );
-    nbox = REGION_NUM_RECTS( region );
-
-    PclSendData(outFile, pConPriv, pbox, nbox, 1.0);
-
-    /*
-     * Clean up the temporary regions
-     */
-    REGION_DESTROY( pGC->pScreen, drawRegion );
-    REGION_DESTROY( pGC->pScreen, region );
-    xfree( drawRects );
-}
-
-void
-PclPolySegment(
-     DrawablePtr pDrawable,
-     GCPtr pGC,
-     int nSegments,
-     xSegment *pSegments)
-{
-    FILE *outFile, *dummy;
-    char t[80];
-    int xoffset, yoffset;
-    int nbox, i;
-    unsigned long valid;
-    BoxPtr pbox;
-    xRectangle *drawRects, *r;
-    RegionPtr drawRegion, region;
-    short fudge;
-    XpContextPtr pCon;
-    PclContextPrivPtr pConPriv;
-    GC cacheGC;
-
-
-    if( PclUpdateDrawableGC( pGC, pDrawable, &outFile ) == FALSE )
-      return;
-
-    pCon = PclGetContextFromWindow( (WindowPtr) pDrawable );
-    pConPriv = (PclContextPrivPtr)
-	dixLookupPrivate(&pCon->devPrivates, PclContextPrivateKey);
-
-    /*
-     * Allocate the storage for the temporary regions.
-     */
-    region = REGION_CREATE( pGC->pScreen, NULL, 0 );
-    drawRects = (xRectangle *)
-      xalloc( nSegments * sizeof( xRectangle ) );
-
-    /*
-     * Calculate the fudge factor, based on the line width
-     */
-    fudge = pGC->lineWidth * 3 + 1;
-
-    /*
-     * Turn off line joining.
-     */
-    SEND_PCL( outFile, "\033%0BLA2,6;\033%0A" );
-
-    /*
-     * Generate the PCL code to draw the segments, by defining them as
-     * a macro which uses the HP-GL/2 line drawing function.
-     *
-     * XXX I wonder if this should be implemented using the Encoded
-     * XXX Polyline function.  Since I'm only sending it once, it's not
-     * XXX necessarily too important.
-     */
-
-    MACRO_START( outFile, pConPriv );
-    SAVE_PCL( outFile, pConPriv, "\033%0B" );
-
-    xoffset = pDrawable->x;
-    yoffset = pDrawable->y;
-
-    for( i = 0, r = drawRects; i < nSegments; i++, r++ )
-      {
-	  r->x = MIN( pSegments[i].x1, pSegments[i].x2 ) + xoffset;
-	  r->y = MIN( pSegments[i].y1, pSegments[i].y2 ) + yoffset;
-	  r->width = abs( pSegments[i].x1 - pSegments[i].x2 );
-	  r->height = abs( pSegments[i].y1 - pSegments[i].y2 );
-
-	  sprintf( t, "PU%d,%d;PD%d,%d;", pSegments[i].x1 + xoffset,
-		  pSegments[i].y1 + yoffset, pSegments[i].x2 +
-		  xoffset, pSegments[i].y2 + yoffset );
-	  SAVE_PCL( outFile, pConPriv, t );
-
-	  r->x -= fudge;
-	  r->y -= fudge;
-	  r->width += 2 * fudge;
-	  r->height += 2 * fudge;
-      }
-    SAVE_PCL( outFile, pConPriv, "\033%0A" );
-    MACRO_END ( outFile );
-
-    /*
-     * Convert the collection of rectangles into a proper region, then
-     * intersect it with the clip region.
-     */
-    drawRegion = RECTS_TO_REGION( pGC->pScreen, nSegments,
-				  drawRects, CT_UNSORTED );
-    REGION_INTERSECT( pGC->pScreen, region, drawRegion, pGC->pCompositeClip );
-
-    /*
-     * For each rectangle in the clip region, set the HP-GL/2 "input
-     * window" and render the entire set of segments to it.
-     */
-    pbox = REGION_RECTS( region );
-    nbox = REGION_NUM_RECTS( region );
-
-    PclSendData(outFile, pConPriv, pbox, nbox, 1.0);
-
-    /*
-     * Now we need to reset the line join mode to whatever it was at before.
-     * The easiest way is to force the cached GC's joinstyle to be different
-     * from the current GC's joinstyle, then re-update the GC.  This way, we
-     * don't have to duplicate code unnecessarily.
-     */
-    PclGetDrawablePrivateStuff( pDrawable, &cacheGC, &valid, &dummy );
-    cacheGC.joinStyle = !cacheGC.joinStyle;
-    PclSetDrawablePrivateGC( pDrawable, cacheGC );
-    PclUpdateDrawableGC( pGC, pDrawable, &outFile );
-
-    /*
-     * Clean up
-     */
-    REGION_DESTROY( pGC->pScreen, drawRegion );
-    REGION_DESTROY( pGC->pScreen, region );
-    xfree( drawRects );
-}
diff --git a/hw/xprint/pcl/PclMisc.c b/hw/xprint/pcl/PclMisc.c
deleted file mode 100644
index 0b37836..0000000
--- a/hw/xprint/pcl/PclMisc.c
+++ /dev/null
@@ -1,301 +0,0 @@
-/*******************************************************************
-**
-**    *********************************************************
-**    *
-**    *  File:		PclMisc.c
-**    *
-**    *  Contents:
-**    *                 Miscellaneous code for Pcl driver.
-**    *
-**    *  Created:	2/01/95
-**    *
-**    *********************************************************
-** 
-********************************************************************/
-/*
-(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.
-*/
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#include <stdlib.h>
-#include <signal.h>
-#include <sys/types.h>
-#include <sys/wait.h>
-#include <X11/Xos.h>	/* for SIGCLD on pre-POSIX systems */
-#include "Pcl.h"
-
-#include "cursor.h"
-#include "resource.h"
-
-#include "windowstr.h"
-#include "propertyst.h"
-#include "attributes.h"
-
-
-/*ARGSUSED*/
-void
-PclQueryBestSize(
-    int type,
-    short *pwidth,
-    short *pheight,
-    ScreenPtr pScreen)
-{
-    unsigned width, highBit;
-
-    switch(type)
-    {
-      case CursorShape:
-	*pwidth = 0;
-        *pheight = 0;
-	  break;
-      case TileShape:
-      case StippleShape:
-	  width = *pwidth;
-	  if (!width) break;
-	  /* Return the nearest power of two >= what they gave us */
-	  highBit = 0x80000000;
-	  /* Find the highest 1 bit in the given width */
-	  while(!(highBit & width))
-	     highBit >>= 1;
-	  /* If greater than that then return the next power of two */
-	  if((highBit - 1) & width)
-	     highBit <<= 1;
-	  *pwidth = highBit;
-	  /* height is a don't-care */
-	  break;
-    }
-}
-
-/*
- * GetPropString searches the window heirarchy from pWin up looking for
- * a property by the name of propName.  If found, returns the property's
- * value. If not, it returns NULL.
- */
-char *
-GetPropString(
-    WindowPtr pWin,
-    char *propName)
-{
-    Atom atom;
-    PropertyPtr pProp = (PropertyPtr)NULL;
-    char *retVal;
-
-    atom = MakeAtom(propName, strlen(propName), FALSE);
-    if(atom != BAD_RESOURCE)
-    {
-        WindowPtr pPropWin;
-	int rc, n;
-
-	/*
-	 * The atom has been defined, but it might only exist as a
-	 * property on an unrelated window.
-	 */
-        for(pPropWin = pWin; pPropWin != (WindowPtr)NULL; 
-	    pPropWin = pPropWin->parent)
-        {
-	    rc = dixLookupProperty(&pProp, pPropWin, atom,
-				   serverClient, DixReadAccess);
-	    if (rc == Success)
-		break;
-	    else
-		pProp = NULL;
-        }
-	if(pProp == (PropertyPtr)NULL)
-	    return (char *)NULL;
-
-	n = (pProp->format/8) * pProp->size; /* size (bytes) of prop */
-	retVal = (char *)xalloc(n + 1);
-	(void)memcpy((void *)retVal, (void *)pProp->data, n);
-	retVal[n] = '\0';
-
-	return retVal;
-    }
-
-    return (char *)NULL;
-}
-
-#include <signal.h>
-#include <errno.h>
-
-/* ARGSUSED */
-static void SigchldHndlr (
-    int dummy)
-{
-    int   status;
-    int olderrno = errno;
-    struct sigaction act;
-    sigfillset(&act.sa_mask);
-    act.sa_flags = 0;
-    act.sa_handler = SigchldHndlr;
-
-    (void) wait (&status);
-
-    /*
-     * Is this really necessary?
-     */
-    sigaction(SIGCHLD, &act, (struct sigaction *)NULL);
-    errno = olderrno;
-}
-
-/*
- * SystemCmd provides a wrapper for the 'system' library call.  The call
- * appears to be sensitive to the handling of SIGCHLD, so this wrapper
- * sets the status to SIG_DFL, and then resets the established handler
- * after system returns.
- */
-int
-SystemCmd(char *cmdStr)
-{
-    int status;
-    struct sigaction newAct, oldAct;
-    sigfillset(&newAct.sa_mask);
-    newAct.sa_flags = 0;
-    newAct.sa_handler = SIG_DFL;
-    sigfillset(&oldAct.sa_mask);
-    oldAct.sa_flags = 0;
-    oldAct.sa_handler = SigchldHndlr;
-
-    /*
-     * get the old handler, and set the action to IGN
-     */
-    sigaction(SIGCHLD, &newAct, &oldAct);
-
-    status = system (cmdStr);
-
-    sigaction(SIGCHLD, &oldAct, (struct sigaction *)NULL);
-    return status;
-}
-
-
-/*
- * PclGetMediumDimensions is installed in the GetMediumDimensions field
- * of each Pcl-initialized context.
- */
-int
-PclGetMediumDimensions(XpContextPtr pCon,
-                       CARD16 *width,
-                       CARD16 *height)
-{
-    XpGetMediumDimensions(pCon, width, height);
-    return Success;
-}
-
-/*
- * PclGetReproducibleArea is installed in the GetReproducibleArea field
- * of each Pcl-initialized context.
- */
-int
-PclGetReproducibleArea(XpContextPtr pCon,
-                       xRectangle *pRect)
-{
-    XpGetReproductionArea(pCon, pRect);
-    return Success;
-}
-
-#ifdef XP_PCL_LJ3
-/*
- * PclSpoolFigs spooled the rendering PCL/HP-GL2 commands into the
- * temporary buffer pointed by figures pointer in pcl private context.
- * LaserJet IIIs printers don't support the macro function which
- * includes some HP-GL/2 commands.
- */
-void
-PclSpoolFigs(PclContextPrivPtr pConPriv, char *t, int n)
-{
-char *ptr;
-
-    ptr = pConPriv->figures;
-    while ( ( pConPriv->fcount + n) > pConPriv->fcount_max ) {
-	ptr = (char *)xrealloc(ptr, 1024 + pConPriv->fcount_max);
-	if ( !ptr )
-	    return;
-	pConPriv->figures = ptr;
-	pConPriv->fcount_max += 1024;
-    }
-    ptr += pConPriv->fcount;
-    pConPriv->fcount += n;
-    memcpy(ptr, t, n);
-}
-#endif /* XP_PCL_LJ3 */
-
-/*
- * PclSendData:
- * For XP-PCL-COLOR/XP-PCL-MONO, it executes the macro stored before
- * in the clipped area.
- * For XP-PCL-LJ3, it draws the spooled figures in the clipped area.
- */
-void
-PclSendData(
-	FILE *outFile,
-	PclContextPrivPtr pConPriv,
-	BoxPtr pbox,
-	int nbox,
-	double ratio
-)
-{
-char *ptr;
-int n;
-char t[80];
-
-#ifdef XP_PCL_LJ3
-    ptr = pConPriv->figures;
-    n = pConPriv->fcount;
-#else
-    ptr = "\033&f3X";
-    n = 5;
-#endif /* XP_PCL_LJ3 */
-
-    while( nbox )
-      {
-	  /*
-	   * Set the HP-GL/2 input window to the current
-	   * rectangle in the clip region, then send the code to
-	   * execute the macro defined above.
-	   */
-	  if (ratio == 1.0)
-	    sprintf( t, "\033%%0BIW%d,%d,%d,%d;\033%%0A",
-			pbox->x1, pbox->y1,
-			pbox->x2, pbox->y2 );
-	  else
-	    sprintf( t, "\033%%0BIW%g,%d,%g,%d;\033%%0A",
-			ratio * pbox->x1, pbox->y1,
-			ratio * pbox->x2, pbox->y2 );
-
-	  SEND_PCL( outFile, t );
-	  SEND_PCL_COUNT( outFile, ptr, n);
-
-	  nbox--;
-	  pbox++;
-      }
-}
diff --git a/hw/xprint/pcl/PclPixel.c b/hw/xprint/pcl/PclPixel.c
deleted file mode 100644
index d219838..0000000
--- a/hw/xprint/pcl/PclPixel.c
+++ /dev/null
@@ -1,159 +0,0 @@
-/*******************************************************************
-**
-**    *********************************************************
-**    *
-**    *  File:		PclPixel.c
-**    *
-**    *  Contents:
-**    *                 Pixel-drawing code for the PCL DDX driver
-**    *
-**    *  Created:	10/23/95
-**    *
-**    *********************************************************
-** 
-********************************************************************/
-/*
-(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.
-*/
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#include <stdio.h>
-
-#include "windowstr.h"
-#include "gcstruct.h"
-
-#include "Pcl.h"
-
-void
-PclPolyPoint( pDrawable, pGC, mode, nPoints, pPoints )
-     DrawablePtr pDrawable;
-     GCPtr pGC;
-     int mode;
-     int nPoints;
-     xPoint *pPoints;
-{
-    char t[80];
-    FILE *outFile;
-    int xoffset, yoffset;
-    BoxRec box;
-    int xloc, yloc, i;
-#if 0
-    XpContextPtr pCon;
-    PclContextPrivPtr cPriv;
-    PclPixmapPrivPtr pPriv;
-#endif
-    
-    if( PclUpdateDrawableGC( pGC, pDrawable, &outFile ) == FALSE )
-      return;
-
-    xoffset = pDrawable->x;
-    yoffset = pDrawable->y;
-    
-    /*
-     * Enter HP-GL/2 and change the line style to one in which only
-     * the vertices of the specified polyline are drawn.  We must also
-     * temporarily change the line width so that only a single pixel
-     * is drawn.  Then move to the first possible location.
-     */
-    xloc = pPoints[0].x + pDrawable->x;
-    yloc = pPoints[0].y + pDrawable->y;
-
-    sprintf( t, "\27%%0BPW0,0;LT0;PU;PA%d,%d", xloc, yloc );
-    SEND_PCL( outFile, t );
-    
-    /*
-     * Check each point against the clip region.  If it is outside the
-     * region, don't send the PCL to the printer.
-     */
-    
-    for( i = 0; i < nPoints; i++ )
-      {
-	  if( POINT_IN_REGION( pGC->pScreen, pGC->clientClip, xloc, yloc, &box ) )
-	    {
-		sprintf( t, ",%d,%d", xloc, yloc );
-		SEND_PCL( outFile, t );
-	    }
-	  
-	  if( mode == CoordModeOrigin )
-	    {
-		xloc = pPoints[i+1].x + xoffset;
-		yloc = pPoints[i+1].y + yoffset;
-	    }
-	  else
-	    {
-		xloc += pPoints[i+1].x;
-		yloc += pPoints[i+1].y;
-	    }
-      }
-    
-#if 0
-    /*
-     * Change the line style and width back to what they were before
-     * this routine was called.  No, this isn't pretty...
-     */
-    if( pDrawable->type == DRAWABLE_WINDOW )
-      {
-	  pCon = PclGetContextFromWindow( (WindowPtr)pDrawable );
-	  cPriv = (PclContextPrivPtr)
-	      dixLookupPrivate(&pCon->devPrivates, PclContextPrivateKey);
-	  cPriv->changeMask = GCLineWidth | GCLineStyle;
-      }
-    else
-      {
-	  pPriv = (PclPixmapPrivPtr)
-	      dixLookupPrivate(&((PixmapPtr)pDrawable)->devPrivates,
-			       PclPixmapPrivateKey);
-	  pPriv->changeMask = GCLineWidth | GCLineStyle;
-      }
-#endif
-    
-    PclUpdateDrawableGC( pGC, pDrawable, &outFile );
-
-    /*
-     * Go back to PCL
-     */
-    SEND_PCL( outFile, "\27%0A" );
-}
-
-void
-PclPushPixels( pGC, pBitmap, pDrawable, width, height, x, y )
-     GCPtr pGC;
-     PixmapPtr pBitmap;
-     DrawablePtr pDrawable;
-     int width;
-     int height;
-     int x;
-     int y;
-{
-}
diff --git a/hw/xprint/pcl/PclPolygon.c b/hw/xprint/pcl/PclPolygon.c
deleted file mode 100644
index 7d95d64..0000000
--- a/hw/xprint/pcl/PclPolygon.c
+++ /dev/null
@@ -1,351 +0,0 @@
-/*******************************************************************
-**
-**    *********************************************************
-**    *
-**    *  File:		PclPolygon.c
-**    *
-**    *  Contents:
-**    *                 Draws Polygons and Rectangles for the PCL DDX
-**    *
-**    *  Created:	10/23/95
-**    *
-**    *********************************************************
-**
-********************************************************************/
-/*
-(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.
-*/
-
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#include "Pcl.h"
-#include "gcstruct.h"
-#include "windowstr.h"
-
-void
-PclPolyRectangle(
-     DrawablePtr pDrawable,
-     GCPtr pGC,
-     int nRects,
-     xRectangle *pRects)
-{
-    char t[80];
-    FILE *outFile;
-    int nbox, i;
-    BoxPtr pbox;
-    xRectangle *drawRects, *r;
-    RegionPtr drawRegion, region;
-    short fudge;
-    int xoffset, yoffset;
-    XpContextPtr pCon;
-    PclContextPrivPtr pConPriv;
-
-    if( PclUpdateDrawableGC( pGC, pDrawable, &outFile ) == FALSE )
-      return;
-
-    pCon = PclGetContextFromWindow( (WindowPtr) pDrawable );
-    pConPriv = (PclContextPrivPtr)
-	dixLookupPrivate(&pCon->devPrivates, PclContextPrivateKey);
-
-    /*
-     * Allocate the storage required to deal with the clipping
-     * regions.
-     */
-    region = REGION_CREATE( pGC->pScreen, NULL, 0 );
-    drawRects = (xRectangle *)xalloc( nRects * sizeof( xRectangle ) );
-
-    fudge = 3 * pGC->lineWidth + 1;
-
-    /*
-     * Generate the PCL code to draw the rectangles, by defining them
-     * as a macro which uses the HP-GL/2 rectangle drawing function.
-     */
-    MACRO_START( outFile, pConPriv );
-    SAVE_PCL( outFile, pConPriv, "\033%0B" );
-
-    xoffset = pDrawable->x;
-    yoffset = pDrawable->y;
-
-    for( i = 0, r = drawRects; i < nRects; i++, r++ )
-      {
-	  xRectangle rect = pRects[i];
-
-	  /* Draw the rectangle */
-	  sprintf( t, "PU%d,%d;ER%d,%d;", rect.x + xoffset,
-		  rect.y + yoffset, rect.width, rect.height );
-	  SAVE_PCL( outFile, pConPriv, t );
-
-	  /* Build the bounding box */
-	  r->x = MIN( rect.x, rect.x + rect.width ) + xoffset -
-	    fudge;
-	  r->y = MIN( rect.y, rect.y + rect.height ) + yoffset -
-	    fudge;
-	  r->width = rect.width + 2 * fudge;
-	  r->height = rect.height + 2 * fudge;
-      }
-    SAVE_PCL( outFile, pConPriv, ";\033%0A" ); /* End the macro */
-    MACRO_END( outFile );
-
-    /*
-     * Convert the collection of rectangles to a proper region, then
-     * intersect it with the clip region.
-     */
-    drawRegion = RECTS_TO_REGION( pGC->pScreen, nRects,
-				  drawRects, CT_UNSORTED );
-
-    REGION_INTERSECT( pGC->pScreen, region, drawRegion, pGC->pCompositeClip );
-
-    /*
-     * For each rectangle in the clip region, set the HP-GL/2 "input
-     * window" and render the set of rectangles to it.
-     */
-    pbox = REGION_RECTS( region );
-    nbox = REGION_NUM_RECTS( region );
-
-    PclSendData(outFile, pConPriv, pbox, nbox, 1.0);
-
-    /*
-     * Clean up the temporary regions
-     */
-    REGION_DESTROY( pGC->pScreen, drawRegion );
-    REGION_DESTROY( pGC->pScreen, region );
-    xfree( drawRects );
-}
-
-void
-PclFillPolygon(
-     DrawablePtr pDrawable,
-     GCPtr pGC,
-     int shape,
-     int mode,
-     int nPoints,
-     DDXPointPtr pPoints)
-{
-    char t[80];
-    FILE *outFile;
-    int nbox, i;
-    BoxPtr pbox;
-    BoxRec box;
-    RegionPtr drawRegion, region;
-    int xoffset, yoffset;
-    int xtop, xbottom, yleft, yright;
-    int fillRule;
-    XpContextPtr pCon;
-    PclContextPrivPtr pConPriv;
-    char *command;
-
-    if( PclUpdateDrawableGC( pGC, pDrawable, &outFile ) == FALSE )
-      return;
-
-    pCon = PclGetContextFromWindow( (WindowPtr) pDrawable );
-    pConPriv = (PclContextPrivPtr)
-	dixLookupPrivate(&pCon->devPrivates, PclContextPrivateKey);
-
-    /*
-     * Generate the PCL code to draw the filled polygon, by defining
-     * it as a macro which uses the HP-GL/2 polygon drawing function.
-     */
-    MACRO_START( outFile, pConPriv );
-    SAVE_PCL( outFile, pConPriv, "\033%0B" );
-
-    if( mode == CoordModeOrigin )
-      {
-	  xoffset = pDrawable->x;
-	  yoffset = pDrawable->y;
-	  command = "PA";
-      }
-    else
-      {
-	  xoffset = yoffset = 0;
-	  command = "PR";
-      }
-
-    /* Begin the polygon */
-    sprintf( t, "PU%d,%d;PM0;%s", pPoints[0].x + xoffset, pPoints[0].y
-	    + yoffset, command );
-    SAVE_PCL( outFile, pConPriv, t );
-
-    /* Seed the bounding box */
-    xtop = xbottom = pPoints[0].x + xoffset;
-    yleft = yright = pPoints[0].y + yoffset;
-
-    /* Add the rest of the points to the polygon */
-    for( i = 1; i < nPoints; i++ )
-      {
-	  if( i != 1 )
-	    SAVE_PCL( outFile, pConPriv, "," );
-
-	  sprintf( t, "%d,%d", pPoints[i].x + xoffset, pPoints[i].y +
-		  yoffset );
-	  SAVE_PCL( outFile, pConPriv, t );
-
-	  /* Update the bounding box */
-	  xtop = MIN( xtop, pPoints[i].x + xoffset );
-	  xbottom = MAX( xbottom, pPoints[i].x + xoffset );
-	  yleft = MIN( yleft, pPoints[i].y + yoffset );
-	  yright = MAX( yright, pPoints[i].y + yoffset );
-      }
-
-    /* Close the polygon and the macro */
-
-    if( pGC->fillRule == EvenOddRule )
-      fillRule = 0;
-    else
-      fillRule = 1;
-
-    sprintf( t, ";PM2;FP%d;\033%%0A", fillRule );
-    SAVE_PCL( outFile, pConPriv, t );
-    MACRO_END ( outFile );
-
-    /*
-     * Build the bounding region from the bounding box of the polygon
-     */
-    box.x1 = xtop;
-    box.y1 = yleft;
-    box.x2 = xbottom;
-    box.y2 = yright;
-    drawRegion = REGION_CREATE( pGC->pScreen, &box, 0 );
-
-    if( mode == CoordModePrevious )
-      REGION_TRANSLATE( pGC->pScreen, drawRegion, pPoints[0].x, pPoints[0].y );
-
-    region = REGION_CREATE( pGC->pScreen, NULL, 0 );
-
-    REGION_INTERSECT( pGC->pScreen, region, drawRegion, pGC->pCompositeClip );
-
-    /*
-     * For each rectangle in the clip region, set the HP-GL/2 "input
-     * window" and render the polygon to it.
-     */
-    pbox = REGION_RECTS( region );
-    nbox = REGION_NUM_RECTS( region );
-
-    PclSendData(outFile, pConPriv, pbox, nbox, 1.0);
-
-    /*
-     * Clean up the temporary regions
-     */
-    REGION_DESTROY( pGC->pScreen, drawRegion );
-    REGION_DESTROY( pGC->pScreen, region );
-}
-
-void
-PclPolyFillRect(
-     DrawablePtr pDrawable,
-     GCPtr pGC,
-     int nRects,
-     xRectangle *pRects)
-{
-    char t[80];
-    FILE *outFile;
-    int nbox, i;
-    BoxPtr pbox;
-    xRectangle *drawRects, *r;
-    RegionPtr drawRegion, region;
-    int xoffset, yoffset;
-    short fudge;
-    XpContextPtr pCon;
-    PclContextPrivPtr pConPriv;
-
-    if( PclUpdateDrawableGC( pGC, pDrawable, &outFile ) == FALSE )
-      return;
-
-    pCon = PclGetContextFromWindow( (WindowPtr) pDrawable );
-    pConPriv = (PclContextPrivPtr)
-	dixLookupPrivate(&pCon->devPrivates, PclContextPrivateKey);
-
-    /*
-     * Allocate the storage required to deal with the clipping
-     * regions.
-     */
-    region = REGION_CREATE( pGC->pScreen, NULL, 0 );
-    drawRects = (xRectangle *)xalloc( nRects * sizeof( xRectangle ) );
-
-
-    fudge = 3 * pGC->lineWidth + 1;
-
-    /*
-     * Generate the PCL code to draw the filled rectangles, by
-     * defining them as a macro which uses the HP-GL/2 rectangle
-     * drawing function.
-     */
-    MACRO_START( outFile, pConPriv );
-    SAVE_PCL( outFile, pConPriv, "\033%0B" );
-
-    xoffset = pDrawable->x;
-    yoffset = pDrawable->y;
-
-    for( i = 0, r = drawRects; i < nRects; i++, r++ )
-      {
-	  xRectangle rect = pRects[i];
-
-	  /* Draw the rectangle */
-	  sprintf( t, "PU%d,%d;RR%d,%d;", rect.x + xoffset, rect.y +
-		  yoffset, rect.width, rect.height );
-	  SAVE_PCL( outFile, pConPriv, t );
-
-	  /* Build the bounding box */
-	  r->x = MIN( rect.x, rect.x + rect.width ) + xoffset - fudge;
-	  r->y = MIN( rect.y, rect.y + rect.height ) + yoffset -
-	    fudge;
-	  r->width = rect.width + 2 * fudge;
-	  r->height = rect.height + 2 * fudge;
-      }
-    SAVE_PCL( outFile, pConPriv, ";\033%0A" ); /* End the macro */
-    MACRO_END( outFile );
-
-    /*
-     * Convert the collection of rectangles to a proper region, then
-     * intersect it with the clip region.
-     */
-    drawRegion = RECTS_TO_REGION( pGC->pScreen, nRects,
-				  drawRects, CT_UNSORTED );
-    REGION_INTERSECT( pGC->pScreen, region, drawRegion, pGC->pCompositeClip );
-
-    /*
-     * For each rectangle in the clip region, set the HP-GL/2 "input
-     * window" and render the set of rectangles to it.
-     */
-    pbox = REGION_RECTS( region );
-    nbox = REGION_NUM_RECTS( region );
-
-    PclSendData(outFile, pConPriv, pbox, nbox, 1.0);
-
-    /*
-     * Clean up the temporary regions
-     */
-    REGION_DESTROY( pGC->pScreen, drawRegion );
-    REGION_DESTROY( pGC->pScreen, region );
-    xfree( drawRects );
-}
diff --git a/hw/xprint/pcl/PclPrint.c b/hw/xprint/pcl/PclPrint.c
deleted file mode 100644
index ac8ea15..0000000
--- a/hw/xprint/pcl/PclPrint.c
+++ /dev/null
@@ -1,709 +0,0 @@
-/*******************************************************************
-**
-**    *********************************************************
-**    *
-**    *  File:		PclPrint.c
-**    *
-**    *  Contents:	Print extension code of Pcl driver
-**    *
-**    *  Created:	2/03/95
-**    *
-**    *********************************************************
-** 
-********************************************************************/
-/*
-(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.
-*/
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#include <stdio.h>
-#include <string.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/wait.h>
-#include <unistd.h>
-#include <X11/Xprotostr.h>
-
-#define NEED_EVENTS
-#include <X11/Xproto.h>
-#undef NEED_EVENTS
-
-#include "Pcl.h"
-
-#include "windowstr.h"
-#include "attributes.h"
-#include "AttrValid.h"
-#include "Oid.h"
-
-int
-PclStartJob(
-     XpContextPtr pCon,
-     Bool sendClientData,
-     ClientPtr client)
-{
-    PclContextPrivPtr pConPriv = (PclContextPrivPtr)
-	dixLookupPrivate(&pCon->devPrivates, PclContextPrivateKey);
-    PclPaletteMap *pal;
-    
-    /*
-     * Check for existing page file, and delete it if it exists.
-     */
-    if(pConPriv->pageFileName != (char *)NULL)
-    {
-	if(pConPriv->pPageFile != (FILE *)NULL)
-	{
-	    fclose(pConPriv->pPageFile);
-	    pConPriv->pPageFile = (FILE *)NULL;
-	}
-	unlink(pConPriv->pageFileName);
-	xfree(pConPriv->pageFileName);
-	pConPriv->pageFileName = (char *)NULL;
-    }
-
-    /* 
-     * Create a temporary file to store the printer output.
-     */
-    if (!XpOpenTmpFile("w+", &pConPriv->jobFileName, &pConPriv->pJobFile))
-	return BadAlloc;
-
-    /*
-     * Create/Initialize the SoftFontInfo structure
-     */
-    pConPriv->pSoftFontInfo = PclCreateSoftFontInfo();
-
-    /*
-     * Set up the colormap handling
-     */
-    pConPriv->palettes = NULL;
-    pConPriv->nextPaletteId = 4;
-    pConPriv->currentPalette = 0;
-
-    pal = &( pConPriv->staticGrayPalette );
-    pal->paletteId = 1;
-    pal->downloaded = 0;
-    
-    pal = &( pConPriv->trueColorPalette );
-    pal->paletteId = 2;
-    pal->downloaded = 0;
-    
-    pal = &( pConPriv->specialTrueColorPalette );
-    pal->paletteId = 3;
-    pal->downloaded = 0;
-
-    return Success;
-}
-
-int
-PclEndJob(
-     XpContextPtr pCon,
-     Bool cancel)
-{
-    PclContextPrivPtr priv = (PclContextPrivPtr)
-	dixLookupPrivate(&pCon->devPrivates, PclContextPrivateKey);
-
-#ifdef CCP_DEBUG
-    FILE *xpoutput;
-#endif
-    FILE *fp;
-    int retVal;
-    char *fileName, *trailer;
-    struct stat statBuf;
-    PclPaletteMapPtr p;
-
-    trailer = "\033%-12345X at PJL RESET\n";
-
-    if( cancel == True )
-      {
-	  if( priv->getDocClient != (ClientPtr)NULL ) {
-	      XpFinishDocData( priv->getDocClient );
-
-	      priv->getDocClient = NULL;
-	      priv->getDocBufSize = 0;
-	  }
-
-	  return Success;
-      }
-    
-    if( priv->getDocClient != (ClientPtr)NULL && priv->getDocBufSize > 0  )
-      {
-	  /*
-	   * We need to stash the trailer information somewhere...
-	   */
-	  if (!XpOpenTmpFile("w+", &fileName, &fp))
-	      return BadAlloc;
-
-#ifndef XP_PCL_LJ3
-	  SEND_PCL( fp, trailer );
-	  rewind( fp );
-
-	  retVal = XpSendDocumentData( priv->getDocClient, fp,
-				      strlen( trailer ),
-				      priv->getDocBufSize );
-#endif /* XP_PCL_LJ3 */
-
-	  fclose( fp );
-	  unlink( fileName );
-	  xfree( fileName );
-
-	  if( priv->getDocClient != (ClientPtr)NULL ) {
-	      XpFinishDocData( priv->getDocClient );
-
-	      priv->getDocClient = NULL;
-	      priv->getDocBufSize = 0;
-	  }
-
-	  return retVal;
-      }
-    
-#ifndef XP_PCL_LJ3
-    SEND_PCL( priv->pJobFile, trailer );
-#endif /* XP_PCL_LJ3 */
-    
-    /*
-     * Submit the job to the spooler
-     */
-    fflush( priv->pJobFile );
-    
-    /*
-     * Dump the job file to another output file, for testing
-     * purposes.
-     */
-    rewind( priv->pJobFile );
-    stat( priv->jobFileName, &statBuf );
-    
-#ifdef CCP_DEBUG
-    unlink( "/users/prince/XpOutput" );
-    xpoutput = fopen( "/users/prince/XpOutput", "w" );
-    
-    rewind( priv->pJobFile );
-    TransferBytes( priv->pJobFile, xpoutput,
-		      (int)statBuf.st_size );
-    fclose( xpoutput );
-#endif
-    
-    XpSubmitJob( priv->jobFileName, pCon );
-    fclose( priv->pJobFile );
-    unlink( priv->jobFileName );
-    xfree( priv->jobFileName );
-    priv->jobFileName = NULL;
-
-    PclDestroySoftFontInfo(priv->pSoftFontInfo);
-    priv->pSoftFontInfo = (PclSoftFontInfoPtr) NULL;
-
-    /*
-     * Clear out the colormap cache
-     */
-    p = priv->palettes;
-    while( p )
-      {
-	  p->downloaded = 0;
-	  p = p->next;
-      }
-
-    return Success;
-}
-
-/* StartPage 
- *
- * If page file exists
- *     close page file
- *     set page file pointer = NULL
- *     unlink page file
- * Create a new page file
- *     Send the page header information to the page file
- * ClearArea the window and all descendant windows
- */
-int
-PclStartPage(
-     XpContextPtr pCon,
-     WindowPtr pWin)
-{
-    PclContextPrivPtr pConPriv = (PclContextPrivPtr)
-	dixLookupPrivate(&pCon->devPrivates, PclContextPrivateKey);
-    PclWindowPrivPtr pWinPriv = (PclWindowPrivPtr)
-	dixLookupPrivate(&pWin->devPrivates, PclWindowPrivateKey);
-    xRectangle repro;
-    char t[80];
-    XpOid orient, plex, tray, medium;
-    int dir, plexNum, num;
-    
-    /*
-     * Put a pointer to the context in the window private structure
-     */
-    pWinPriv->validContext = 1;
-    pWinPriv->context = pCon;
-    
-    /*
-     * Clear out the old page file, if necessary
-     */
-    if(pConPriv->pPageFile != (FILE *)NULL)
-    {
-	fclose(pConPriv->pPageFile);
-	pConPriv->pPageFile = (FILE *)NULL;
-    }
-    if(pConPriv->pageFileName != (char *)NULL)
-    {
-	unlink(pConPriv->pageFileName);
-	pConPriv->pageFileName = (char *)NULL;
-    }
-
-    /*
-     * Make up a new page file.
-     */
-    if (!XpOpenTmpFile("w+", &pConPriv->pageFileName, &pConPriv->pPageFile))
-	return BadAlloc;
-
-    /*
-     * Reset the GC cached in the context private struct.
-     */
-    pConPriv->validGC = 0;
-
-    /*
-     * Set the page orientation
-     */
-    orient = XpGetContentOrientation( pCon );
-    switch( orient )
-      {
-	case xpoid_val_content_orientation_landscape:
-	  dir = 1;
-	  break;
-	case xpoid_val_content_orientation_reverse_portrait:
-	  dir = 2;
-	  break;
-	case xpoid_val_content_orientation_reverse_landscape:
-	  dir = 3;
-	  break;
-	case xpoid_val_content_orientation_portrait:
-	default:
-	  dir = 0;
-	  break;
-      }
-    sprintf( t, "\033&l%dO", dir );
-    SEND_PCL( pConPriv->pPageFile, t );
-    
-    /*
-     * Set the duplexing method.  Since PCL wants to think of it in
-     * terms of the "binding edge," and the attribute store thinks in
-     * "duplex/tumble," this is a little complicated.
-     *
-     * Actually, this has no bearing on the output, since the HP1600C
-     * will only print on one side of the paper, and ignore all
-     * requests to enable duplexing.  But, in an attempt to keep this
-     * driver somewhat generic, we'll enable it anyway.
-     */
-    plex = XpGetPlex( pCon );
-    
-    if( plex == xpoid_val_plex_duplex )
-      {
-	  if( dir == 0 || dir == 2 )
-	    plexNum = 1;
-	  else
-	    plexNum = 2;
-       }
-    else if( plex == xpoid_val_plex_tumble )
-      {
-	  if( dir == 0 || dir == 2 )
-	    plexNum = 2;
-	  else
-	    plexNum = 1;
-      }
-    else
-      plexNum = 0;
-    sprintf( t, "\033&l%dS", plexNum );
-    SEND_PCL( pConPriv->pPageFile, t );
-
-    /*
-     * Set the input tray or medium.  If XpGetPageSize gives us a valid medium,
-     * we can just send that to the printer, and let the printer handle the
-     * details.  Otherwise, we select the tray returned from XpGetPageSize,
-     * which will be either a tray that should contain the correct medium
-     * (possibly with operator intervention), or the default tray from the
-     * config files.
-     */
-    medium = XpGetPageSize( pCon, &tray, NULL );
-    if( medium != xpoid_none )
-      {
-	  switch( medium )
-	    {
-	      case xpoid_val_medium_size_na_legal:
-		num = 3;
-		break;
-	      case xpoid_val_medium_size_iso_a3:
-		num = 27;
-		break;
-	      case xpoid_val_medium_size_iso_a4:
-		num = 26;
-		break;
-	      case xpoid_val_medium_size_executive:
-		num = 1;
-		break;
-	      case xpoid_val_medium_size_ledger:
-		num = 6;
-		break;
-	      case xpoid_val_medium_size_monarch_envelope:
-		num = 80;
-		break;
-	      case xpoid_val_medium_size_na_number_10_envelope:
-		num = 81;
-		break;
-	      case xpoid_val_medium_size_iso_designated_long:
-		num = 90;
-		break;
-	      case xpoid_val_medium_size_iso_c5:
-		num = 91;
-		break;
-	      case xpoid_val_medium_size_iso_b5:
-		num = 100;
-		break;
-	      case xpoid_val_medium_size_jis_b5:
-		num = 45;
-		break;
-	      case xpoid_val_medium_size_na_letter:
-	      default:
-		num = 2;
-		break;
-	    }
-	  sprintf( t, "\033&l%dA", num );
-	  SEND_PCL( pConPriv->pPageFile, t );
-      }
-    else
-      {
-	  switch( tray )
-	    {
-	      case xpoid_val_input_tray_manual:
-		num = 2;
-		break;
-	      case xpoid_val_input_tray_envelope:
-		num = 3;
-		break;
-	      case xpoid_val_input_tray_large_capacity:
-		num = 5;
-		break;
-	      case xpoid_val_input_tray_bottom:
-		num = 4;
-		break;
-	      case xpoid_val_input_tray_main:
-	      default:
-		num = 1;
-		break;
-	    }
-	  sprintf( t, "\033&l%dH", num );
-	  SEND_PCL( pConPriv->pPageFile, t );
-      }
-    
-    /*
-     * Set the scaling factors so that the HP-GL/2 coordinate system
-     * matches the X coordinate system, both in axis orientation and
-     * in unit<->pixel conversion.
-     */
-    XpGetReproductionArea( pCon, &repro );
-
-    sprintf( t, "\033&l0E\033*p%dx%dY", repro.x - 75, repro.y );
-    SEND_PCL( pConPriv->pPageFile, t );
-
-    sprintf( t, "\033*c%dx%dY\033*c0T", (int)(repro.width / 300.0 * 720.0),
-	    (int)(repro.height / 300.0 * 720.0) );
-    SEND_PCL( pConPriv->pPageFile, t );
-    
-    sprintf( t, "\033%%0BSC%d,%d,%d,%d;\033%%0A", repro.x, repro.x +
-	    repro.width, repro.y + repro.height, repro.y );
-    SEND_PCL( pConPriv->pPageFile, t );
-
-    return Success;
-}
-
-/*
- * When sending the generated PCL code back to the client, we send everything
- * that we have generated so far for the job.  After sending the data, we clean
- * out the job file, to avoid repeatedly sending the same data.
- */
-
-static int
-SendDocData( PclContextPrivPtr pPriv )
-{
-    struct stat statBuf;
-    int ret;
-    
-    rewind( pPriv->pJobFile );
-    if( stat( pPriv->jobFileName, &statBuf ) < 0 )
-      return BadAlloc;
-    
-    ret = XpSendDocumentData( pPriv->getDocClient, pPriv->pJobFile,
-			     (int)statBuf.st_size, pPriv->getDocBufSize );
-
-    /*
-     * Clean out the job file
-     */
-    fclose( pPriv->pJobFile );
-    unlink( pPriv->jobFileName );
-
-    xfree(pPriv->jobFileName);
-
-    if (!XpOpenTmpFile("w+", &pPriv->jobFileName, &pPriv->pJobFile))
-	return BadAlloc;
-
-    return ret;
-}
-
-/*
- * EndPage:
- *
- * Write page trailer to page file
- * Write page file to job file
- */
-int
-PclEndPage(
-     XpContextPtr pCon,
-     WindowPtr pWin)
-{
-    PclContextPrivPtr pConPriv = (PclContextPrivPtr)
-	dixLookupPrivate(&pCon->devPrivates, PclContextPrivateKey);
-
-    struct stat statBuf;
-
-    /*
-     * Send the page trailer to the page file.
-     */
-    SEND_PCL( pConPriv->pPageFile, "\014" );
-    fflush( pConPriv->pPageFile );
-    
-    /*
-     * Write the page file contents to the job file, or to the
-     * whatever client has called GetDocumentData.
-     *
-     * pWinPriv->pPageFile must first be set to the start of the page file.
-     */
-    rewind(pConPriv->pPageFile);
-    if(stat(pConPriv->pageFileName, &statBuf) < 0)
-      return BadAlloc;
-
-    if(TransferBytes(pConPriv->pPageFile, pConPriv->pJobFile, 
-       (int)statBuf.st_size) != (int)statBuf.st_size)
-      return BadAlloc;
-
-    if( pConPriv->getDocClient != (ClientPtr)NULL &&
-       pConPriv->getDocBufSize > 0 )
-      {
-	  return SendDocData( pConPriv );
-      }
-    
-    return Success;
-}
-
-/*
- * The PclStartDoc() and PclEndDoc() functions serve basically as NOOP
- * placeholders.  This driver doesn't deal with the notion of multiple
- * documents per page.
- */
-
-int
-PclStartDoc(XpContextPtr pCon,
-	    XPDocumentType type)
-{
-    PclContextPrivPtr pConPriv = (PclContextPrivPtr)
-	dixLookupPrivate(&pCon->devPrivates, PclContextPrivateKey);
-    
-#ifndef XP_PCL_LJ3
-    /*
-     * Set the printer resolution for the page.  Since we can only
-     * render color at 300dpi, we just hard-code this.
-     */
-    SEND_PCL( pConPriv->pJobFile, 
-	     "\033%-12345X at PJL SET RESOLUTION = 300\r\n" );
-#endif /* XP_PCL_LJ3 */
-    
-    /*
-     * Initialize HP-GL/2
-     */
-    SEND_PCL( pConPriv->pJobFile, "\033E\033%0BIN,SP1,TR0;\033%0A" );
-
-    /*
-     * Stash the type of the document (used by PutDocumentData operation)
-     */
-    pConPriv->isRaw = (type == XPDocRaw);
-    
-    return Success;
-}
-
-int
-PclEndDoc(
-     XpContextPtr pCon,
-     Bool cancel)
-{
-    /*
-     * XXX What should I do if I get cancel == TRUE?
-     */
-    return Success;
-}
-
-/*
- * PclDocumentData()
- *
- * Hand any pre-generated PDL down to the spool files, formatting it
- * as necessary to fit the given window.
- *
- */
-
-#define DOC_PCL 1
-#define DOC_HPGL 2
-
-int
-PclDocumentData(
-     XpContextPtr pCon,
-     DrawablePtr pDraw,
-     char *pData,
-     int len_data,
-     char *pFmt,
-     int len_fmt,
-     char *pOpt,
-     int len_opt,
-     ClientPtr client)
-{
-    int type = 0;
-    PclContextPrivPtr pPriv = (PclContextPrivPtr)
-	dixLookupPrivate(&pCon->devPrivates, PclContextPrivateKey);
-    XpOidDocFmtList *formats;
-    XpOidDocFmt *f;
-    char t[80];
-    xRectangle repro;
-    
-    /*
-     * Verify the input format
-     */
-    formats = XpGetDocFmtListAttr( pCon, XPPrinterAttr,
-				  (pPriv->isRaw) ?
-				  xpoid_att_xp_raw_formats_supported :
-				  xpoid_att_xp_embedded_formats_supported, 
-				  NULL );
-    f = XpOidDocFmtNew( pFmt );
-    if( !XpOidDocFmtListHasFmt( formats, f ) )
-      {
-	  XpOidDocFmtListDelete( formats );
-	  XpOidDocFmtDelete( f );
-	  return BadMatch;
-      }
-    XpOidDocFmtListDelete( formats );
-    
-    if( !(pPriv->isRaw) )
-      {
-	  if( !strcmp( f->format, "PCL" ) )
-	    type = DOC_PCL;
-	  else if( !strcmp( f->format, "HPGL" ) )
-	    type = DOC_HPGL;
-	  else
-	    {
-		XpOidDocFmtDelete( f );
-		return BadMatch;
-	    }
-	  
-	  switch( type )
-	    {
-	      case DOC_HPGL:
-		/*
-		 * Move the picture frame to the appropriate place on the page,
-		 * then assume that the embedded code will scale it properly.
-		 */
-		sprintf( t, "\033&l0E\033*p%dx%dY", 
-			pDraw->x - 75,
-			pDraw->y );
-		SEND_PCL( pPriv->pPageFile, t );
-		
-		sprintf( t, "\033*c%dx%dY\033*coT",
-			(int)( pDraw->width / 300.0 * 720.0 ),
-			(int)( pDraw->height / 300.0 * 720.0 ) );
-		SEND_PCL( pPriv->pPageFile, t );
-		break;
-	    }
-      }
-    
-    
-    /*
-     * Send the data down the pipe
-     */
-    SEND_PCL_COUNT( pPriv->pPageFile, pData, len_data );
-    
-    /*
-     * If it's not a raw document, clean up the embedding
-     */
-    if( !(pPriv->isRaw) )
-      switch( type )
-	{
-	  case DOC_HPGL:
-	    /*
-	     * Reset the picture frame
-	     */
-	    XpGetReproductionArea( pCon, &repro );
-	    
-	    sprintf( t, "\033&l0E\033*p%dx%dY", repro.x - 75, repro.y );
-	    SEND_PCL( pPriv->pPageFile, t );
-	    
-	    sprintf( t, "\033*c%dx%dY\033*c0T",
-		    (int)(repro.width / 300.0 * 720.0),
-		    (int)(repro.height / 300.0 * 720.0) );
-	    SEND_PCL( pPriv->pPageFile, t );
-	    
-	    sprintf( t, "\033%%0BSC%d,%d,%d,%d;\033%%0A", repro.x, repro.x +
-		    repro.width, repro.y + repro.height, repro.y );
-	    SEND_PCL( pPriv->pPageFile, t );
-	    break;
-	}
-    
-    XpOidDocFmtDelete( f );
-    return Success;
-}
-
-/*
- * 
- * PclGetDocumentData()
- *
- * This function allows the driver to send the generated PCL back to
- * the client.
- *
- * XXX This function is barely spec'ed, much less implemented!
- */
-
-int
-PclGetDocumentData(
-     XpContextPtr pCon,
-     ClientPtr client,
-     int maxBufferSize)
-{
-    PclContextPrivPtr pPriv = (PclContextPrivPtr)
-	dixLookupPrivate(&pCon->devPrivates, PclContextPrivateKey);
-    
-    pPriv->getDocClient = client;
-    pPriv->getDocBufSize = maxBufferSize;
-    
-    return Success;
-}
diff --git a/hw/xprint/pcl/PclSFonts.c b/hw/xprint/pcl/PclSFonts.c
deleted file mode 100644
index 2474d90..0000000
--- a/hw/xprint/pcl/PclSFonts.c
+++ /dev/null
@@ -1,427 +0,0 @@
-/*******************************************************************
-**
-**    *********************************************************
-**    *
-**    *  File:          PclSFonts.c
-**    *
-**    *  Contents:
-**    *                 Send Soft Font Download data to the specified
-**    *                 file pointer.
-**    *
-**    *  Created:       3/4/96
-**    *
-**    *********************************************************
-**
-********************************************************************/
-/*
-(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.
-*/
-
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#include <stdio.h>
-#include "Pcl.h"
-
-static char tmp1;
-static short tmp2;
-#define Put1byte(fp, x)		tmp1=x; fwrite((char *)&tmp1, 1, 1, fp)
-#define Put2bytes(fp, x)	tmp2=x; fwrite((char *)&tmp2, 2, 1, fp)
-
-#define ESC 0x1b
-#define SYMBOL_SET 277
-
-static unsigned int PclDownloadChar(FILE *,PclCharDataPtr,unsigned short,unsigned char);
-static unsigned int PclDownloadHeader(FILE *, PclFontDescPtr, unsigned short);
-
-#ifdef PCL_FONT_COMPRESS
-static unsigned char *compress_bitmap_data(PclCharDataPtr, unsigned int *);
-#endif /* PCL_FONT_COMPRESS */
-
-/* -*- PclDownloadSoftFont8 -*-
- * Send the Character Definition Command for 8-bit font
- * **************************************************************************/
-void
-PclDownloadSoftFont8(
-    FILE *fp,
-    PclSoftFontInfoPtr pSoftFontInfo,
-    PclFontHead8Ptr pfh,
-    PclCharDataPtr pcd,
-    unsigned char *code
-)
-{
-    /*
-     * Check whether the font header has already been downloaded.
-     * If not, download it.
-     */
-
-    if ( !pfh->fid ) {
-	pfh->fid = pSoftFontInfo->cur_max_fid++;
-	PclDownloadHeader(fp, &(pfh->fd), pfh->fid);
-    }
-    pfh->index[*code] = *code;
-    PclDownloadChar(fp, pcd, pfh->fid, pfh->index[*code]);
-
-}
-
-/* -*- PclDownloadSoftFont16 -*-
- * Send the Character Definition Command for 16 bit font
- * **************************************************************************/
-void
-PclDownloadSoftFont16(
-    FILE *fp,
-    PclSoftFontInfoPtr pSoftFontInfo,
-    PclFontHead16Ptr pfh,
-    PclCharDataPtr pcd,
-    unsigned char row,
-    unsigned char col
-)
-{
-    /*
-     * Check whether the font header is already downloaded.
-     * If not, download it.
-     */
-
-    if ( !pfh->cur_cindex ) {
-	pfh->cur_fid = pSoftFontInfo->cur_max_fid++;
-	PclDownloadHeader(fp, &(pfh->fd), pfh->cur_fid);
-    }
-    pfh->index[row][col].fid = pfh->cur_fid;
-    pfh->index[row][col].cindex = pfh->cur_cindex++;
-
-    PclDownloadChar(fp, pcd, pfh->index[row][col].fid, pfh->index[row][col].cindex);
-}
-
-/* -*- PclCreateSoftFontInfo -*-
- * Create and Initialize the structure for storing the information
- * of the downloaded soft font.
- * **************************************************************************/
-PclSoftFontInfoPtr
-PclCreateSoftFontInfo(void)
-{
-PclSoftFontInfoPtr pSoftFontInfo;
-
-    pSoftFontInfo = (PclSoftFontInfoPtr)xalloc(sizeof(PclSoftFontInfoRec));
-    if ( pSoftFontInfo == (PclSoftFontInfoPtr) NULL)
-	return (PclSoftFontInfoPtr) NULL;
-    pSoftFontInfo->phead8 = (PclFontHead8Ptr)NULL;
-    pSoftFontInfo->phead16 = (PclFontHead16Ptr)NULL;
-    pSoftFontInfo->pinfont = (PclInternalFontPtr)NULL;
-    pSoftFontInfo->cur_max_fid = 1;
-    return pSoftFontInfo;
-}
-
-/* -*- PclDestroySoftFontInfo -*-
- * Destroy the soft font information structure
- * **************************************************************************/
-void
-PclDestroySoftFontInfo( PclSoftFontInfoPtr pSoftFontInfo )
-{
-PclFontHead8Ptr  pfh8,  pfh8_next;
-PclFontHead16Ptr pfh16, pfh16_next;
-PclInternalFontPtr pin, pin_next;
-unsigned char nindex_row;
-int i;
-
-    if ( pSoftFontInfo == (PclSoftFontInfoPtr) NULL )
-	return;
-
-    pfh8  = pSoftFontInfo->phead8;
-    while (pfh8 != (PclFontHead8Ptr) NULL) {
-	xfree(pfh8->fontname);
-	xfree(pfh8->index);
-	pfh8_next = pfh8->next;
-	xfree(pfh8);
-	pfh8 = pfh8_next;
-    }
-
-    pfh16 = pSoftFontInfo->phead16;
-    while (pfh16 != (PclFontHead16Ptr) NULL) {
-	xfree(pfh16->fontname);
-	nindex_row = pfh16->lastRow - pfh16->firstRow + 1;
-	for (i=0; i<nindex_row; i++)
-	    xfree(pfh16->index[i]);
-	xfree(pfh16->index);
-	pfh16_next = pfh16->next;
-	xfree(pfh16);
-	pfh16 = pfh16_next;
-    }
-
-    pin = pSoftFontInfo->pinfont;
-    while (pin != (PclInternalFontPtr) NULL) {
-	xfree(pin->fontname);
-	pin_next = pin->next;
-	xfree(pin);
-	pin = pin_next;
-    }
-
-    xfree(pSoftFontInfo);
-}
-
-/* -*- PclDownloadHeader -*-
- * Send the Font Header Commnad. 
- * 	Format 0  : Font Header for Pcl Bitmapped Fonts
- * 	Format 20 : Font Header for Resolution Specified Bitmapped Fonts
- * **************************************************************************/
-static unsigned int
-PclDownloadHeader(
-    FILE *fp,
-    PclFontDescPtr fd,
-    unsigned short fid
-)
-{
-int nbytes;
-
-#ifdef XP_PCL_LJ3
-    nbytes = 64;
-#else
-    nbytes = 68;
-#endif /* XP_PCL_LJ3 */
-    /*
-     * Font ID Command : Esc *c#D
-     *		(Default = 0, Range = 0 - 32767)
-     */
-    fprintf(fp, "%c*c%dD", ESC, fid);
-
-    /*
-     * Font Header Commnad : Esc )s#W[font header data]
-     *		(Default = 0, Range = 0 - 32767)
-     */
-    fprintf(fp, "%c)s%dW", ESC, nbytes);
-
-    Put2bytes(fp, nbytes);			/* Font Description Size */
-#ifdef XP_PCL_LJ3
-    Put1byte(fp, 0);				/* Header Format */
-#else
-    Put1byte(fp, 20);				/* Header Format */
-#endif /* XP_PCL_LJ3 */
-    Put1byte(fp, 2);				/* Font Type */
-    Put2bytes(fp, 0);				/* Style MSB */
-    Put2bytes(fp, fd->ascent);			/* BaseLine Position */
-    Put2bytes(fp, fd->cellwidth);		/* Cell Width */
-    Put2bytes(fp, fd->cellheight);		/* Cell Height */
-    Put1byte(fp, 0);				/* Orienation */
-    Put1byte(fp, fd->spacing);			/* Spacing */
-    Put2bytes(fp, SYMBOL_SET);			/* Symbol Set */
-    Put2bytes(fp, fd->pitch*4);			/* font pitch */
-    Put2bytes(fp, fd->cellheight * 4);		/* Height */
-    Put2bytes(fp, 0);				/* x-Height */
-    Put1byte(fp, 0);				/* width type (normal) */
-    Put1byte(fp, 0);				/* Style LSB */
-    Put1byte(fp, 0);				/* Stroke Weight */ 
-    Put1byte(fp, 5);				/* Typeface LSB */
-    Put1byte(fp, 0);				/* Typeface MSB */
-    Put1byte(fp, 0);				/* Serif Style */
-    Put1byte(fp, 0);				/* Quality */
-    Put1byte(fp, 0);				/* Placement */
-    Put1byte(fp, 0);				/* Underline Position */
-    Put1byte(fp, 0);				/* Underline Thickness */
-    Put2bytes(fp, fd->cellheight*1.2);		/* Text Height */
-    Put2bytes(fp, fd->cellwidth * 4);		/* Text Width */
-    Put2bytes(fp, 0);				/* First Code */
-    Put2bytes(fp, 255);				/* Last Code */
-    Put1byte(fp, 0);				/* Pitch Extend */
-    Put1byte(fp, 0);				/* Height Extend */
-    Put2bytes(fp, 0);				/* Cap Height */
-    Put2bytes(fp, 0);				/* Font Number 1 */
-    Put2bytes(fp, 0);				/* Font Number 2 */
-    Put2bytes(fp, 0);				/* Font Name */
-    Put2bytes(fp, 0);				/* Font Name */
-    Put2bytes(fp, 0);				/* Font Name */
-    Put2bytes(fp, 0);				/* Font Name */
-    Put2bytes(fp, 0);				/* Font Name */
-    Put2bytes(fp, 0);				/* Font Name */
-    Put2bytes(fp, 0);				/* Font Name */
-    Put2bytes(fp, 0);				/* Font Name */
-
-#ifdef XP_PCL_LJ3
-    return 64;
-#else
-    Put2bytes(fp, 300);				/* X Resolution */
-    Put2bytes(fp, 300);				/* Y Resolution */
-    return 68;
-#endif /* XP_PCL_LJ3 */
-
-}
-
-/* -*- PclDownloadCharacter -*-
- * Send the Character Definition Command.
- * **************************************************************************/
-static unsigned int
-PclDownloadChar(
-    FILE *fp,
-    PclCharDataPtr cd,
-    unsigned short fid,
-    unsigned char code
-)
-{
-unsigned int nbytes, n;
-unsigned char *raster;
-
-    /*
-     * Font ID Command : Esc *c#D
-     *		(Default = 0, Range = 0 - 32767)
-     * Character Code Command : Esc *c#E
-     *		(Default = 0, Range = 0 - 65535)
-     */
-    fprintf(fp, "%c*c%dd%dE", ESC, fid, code);
-
-    /*
-     * Character Definition Command : Esc (s#W[character descriptor and data]
-     *		(Default = N/A, Range = 0 - 32767)
-     */
-
-    nbytes = n = cd->height * ((cd->width + 7) / 8);
-#ifdef PCL_FONT_COMPRESS
-    raster = compress_bitmap_data(cd, &nbytes);
-#else
-    raster = (unsigned char *)NULL;
-#endif /* PCL_FONT_COMPRESS */
-    fprintf(fp, "%c(s%dW", ESC, nbytes + 16);
-
-    Put1byte(fp, 4);				/* Format */
-    Put1byte(fp, 0);				/* Continuation */
-    Put1byte(fp, 14);				/* Descriptor Size */
-    if (raster) {				/* Class */
-	Put1byte(fp, 2);
-    } else {
-	Put1byte(fp, 1);			/* Class */
-    }
-    Put2bytes(fp, 0);				/* Orientation */
-    Put2bytes(fp, cd->h_offset);		/* left offset */
-    Put2bytes(fp, cd->v_offset);		/* top offset */
-    Put2bytes(fp, cd->width);			/* character width */
-    Put2bytes(fp, cd->height);			/* character height */
-    Put2bytes(fp, cd->font_pitch*4);		/* delta X */
-
-    /*
-     * Raster Character Data
-     */
-    if (raster) {
-	fwrite(raster, nbytes, 1, fp);
-	xfree(raster);
-    } else
-	fwrite(cd->raster_top, nbytes, 1, fp);
-
-    return n + 16;
-}
-
-
-#ifdef PCL_FONT_COMPRESS
-/* -*- compress_bitmap_data -*-
- * Compress Bitmap data
- * **************************************************************************/
-static unsigned char *
-compress_bitmap_data(
-    PclCharDataPtr cd,
-    unsigned int *nbytes
-)
-{
-unsigned int  byte_width;
-unsigned char *raster, *rptr_s, *rptr_e, *rptr_end;
-unsigned char *tmp_s, *tmp_ptr;
-unsigned char *p;
-unsigned char cur, pixel;
-unsigned int num;
-
-int i, j, k, w;
-
-    byte_width = (cd->width + 7) / 8;
-    *nbytes = cd->height * byte_width;
-
-    /* Create buffer for storing compress bitmap glyph  */
-    raster = (unsigned char *)xalloc(*nbytes);
-    rptr_s = raster;
-    rptr_e = raster;
-    rptr_end = raster + *nbytes;
-
-    tmp_s = (unsigned char *)xalloc(cd->width * 8 + 2);
-
-    p = cd->raster_top;
-    for (i=0; i<cd->height; i++) {
-	tmp_ptr = tmp_s;
-	*tmp_ptr++ = 0;
-	if ( (*p>>7)&0x1 == 1 ) {
-	    *tmp_ptr++ = 0;
-	    cur = 1;
-	} else {
-	    cur = 0;
-	}
-	num = 0;
-	for (j=0, w=0; j<byte_width; j++, p++) {
-	    for (k=0; k<8 && w<cd->width; k++, w++) {
-		pixel = (*p>>(7-k))&0x1;
-		if ( pixel == cur ) {
-		    num++;
-		} else {
-		    cur = pixel;
-		    while (num > 255) {
-			*tmp_ptr++ = 255;
-			*tmp_ptr++ = 0;
-			num -= 255;
-		    }
-		    *tmp_ptr++ = num;
-		    num = 1;
-		}
-	    }
-	}
-	if ( pixel == cur ) {
-	    while (num > 255) {
-		*tmp_ptr++ = 255;
-		*tmp_ptr++ = 0;
-		num -= 255;
-	    }
-	    *tmp_ptr++ = num&0xff;
-	} else
-	    *tmp_ptr++ = num;
-
-	if ( ((rptr_e - rptr_s) == (tmp_ptr - tmp_s)) &&
-			!memcmp(rptr_s+1, tmp_s+1, (tmp_ptr - tmp_s) - 1) )
-	    *rptr_s += 1;
-	else {
-	    if ( rptr_e + (tmp_ptr - tmp_s) > rptr_end ) {
-		xfree(raster);
-		xfree(tmp_s);
-		return (unsigned char *)NULL;
-	    }
-	    memcpy (rptr_e, tmp_s, tmp_ptr - tmp_s);
-	    rptr_s = rptr_e;
-	    rptr_e = rptr_s + (tmp_ptr - tmp_s);
-	}
-    }
-    xfree(tmp_s);
-    *nbytes = rptr_e - raster;
-
-    return raster;
-}
-#endif /* PCL_FONT_COMPRESS */
diff --git a/hw/xprint/pcl/PclSFonts.h b/hw/xprint/pcl/PclSFonts.h
deleted file mode 100644
index c991263..0000000
--- a/hw/xprint/pcl/PclSFonts.h
+++ /dev/null
@@ -1,115 +0,0 @@
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#ifndef _PCLFONTS_H
-#define _PCLFONTS_H
-
-/* -*-H-*-
-******************************************************************************
-******************************************************************************
-*
-* File:         PclFonts.h
-* Description:  Send Soft Font Download data to the specified file pointer.
-*
-*
-******************************************************************************
-******************************************************************************
-*/
-/*
-(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.
-*/
-
-
-typedef struct {
-	unsigned char fid;		/* sfont font ID */
-	unsigned char cindex;		/* character indext */
-} PclFontMapRec, PclFontMapPtr;
-
-typedef struct {
-	int h_offset;
-	int v_offset;
-	unsigned int width;
-	unsigned int height;
-	int font_pitch;
-	unsigned char *raster_top;
-} PclCharDataRec, *PclCharDataPtr;
-
-typedef struct {
-	unsigned char spacing;
-	unsigned int pitch;
-	unsigned int cellheight;
-	unsigned int cellwidth;
-	int ascent;
-	int descent;
-} PclFontDescRec, *PclFontDescPtr;
-
-typedef struct _PclFontHead8Rec {
-	char *fontname;
-	PclFontDescRec fd;
-	unsigned short fid;
-	unsigned char *index;
-	struct _PclFontHead8Rec *next;
-} PclFontHead8Rec, *PclFontHead8Ptr;
-
-typedef struct _PclFontHead16Rec {
-	char *fontname;
-	PclFontDescRec fd;
-	unsigned short cur_fid;
-	unsigned char cur_cindex;
-	PclFontMapRec **index;
-	unsigned short firstCol;
-	unsigned short lastCol;
-	unsigned short firstRow;
-	unsigned short lastRow;
-	struct _PclFontHead16Rec *next;
-} PclFontHead16Rec, *PclFontHead16Ptr;
-
-typedef struct _PclInternalFontRec {
-	char *fontname;
-	float pitch;
-	float height;
-	char *pcl_font_name;
-	char *spacing;
-	struct _PclInternalFontRec *next;
-} PclInternalFontRec, *PclInternalFontPtr;
-
-typedef struct {
-	PclFontHead8Ptr phead8;
-	PclFontHead16Ptr phead16;
-	PclInternalFontPtr pinfont;
-	unsigned char cur_max_fid;
-} PclSoftFontInfoRec, *PclSoftFontInfoPtr;
-
-#define MONOSPACE 0
-#define PROPSPACE 1
-
-#endif /* _PCLFONTS_H */
diff --git a/hw/xprint/pcl/PclSpans.c b/hw/xprint/pcl/PclSpans.c
deleted file mode 100644
index 4951899..0000000
--- a/hw/xprint/pcl/PclSpans.c
+++ /dev/null
@@ -1,137 +0,0 @@
-/*******************************************************************
-**
-**    *********************************************************
-**    *
-**    *  File:		PclSpans.c
-**    *
-**    *  Contents:
-**    *                 Code to set and fill spans in the PCL DDX
-**    *
-**    *  Created:	10/23/95
-**    *
-**    *********************************************************
-**
-********************************************************************/
-/*
-(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.
-*/
-
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#include "Pcl.h"
-#include "gcstruct.h"
-#include "windowstr.h"
-
-void
-PclFillSpans(
-     DrawablePtr pDrawable,
-     GCPtr pGC,
-     int nSpans,
-     DDXPointPtr pPoints,
-     int *pWidths,
-     int fSorted)
-{
-    char t[80];
-    FILE *outFile;
-    int xoffset, yoffset;
-    xRectangle *rects, *r;
-    RegionPtr fillRegion, region = 0;
-    int i;
-    int nbox;
-    BoxPtr pbox;
-
-    if( PclUpdateDrawableGC( pGC, pDrawable, &outFile ) == FALSE )
-      return;
-
-    /*
-     * Build a region out of the spans
-     */
-    rects = (xRectangle *)xalloc( nSpans * sizeof( xRectangle ) );
-    xoffset = pDrawable->x;
-    yoffset = pDrawable->y;
-
-    for( i = 0, r = rects; i < nSpans; i++, r++ )
-      {
-	  r->x = pPoints[i].x + xoffset;
-	  r->y = pPoints[i].y + yoffset;
-	  r->width = pWidths[i];
-	  r->height = 1;
-      }
-    fillRegion = RECTS_TO_REGION( pGC->pScreen, nSpans, rects, ( fSorted ) ?
-				 CT_YSORTED : CT_UNSORTED );
-
-    /*
-     * Intersect this region with the clip region.  Whatever's left,
-     * should be filled.
-     */
-    REGION_INTERSECT( pGC->pScreen, region, fillRegion, pGC->clientClip );
-
-    pbox = REGION_RECTS( region );
-    nbox = REGION_NUM_RECTS( region );
-
-    /* Enter HP-GL/2 */
-    SEND_PCL( outFile, "\27%0B" );
-
-    while( nbox )
-      {
-	  sprintf( t, "PU%d,%d;RR%d,%d;", pbox->x1, pbox->y1,
-		  pbox->x2, pbox->y2 );
-	  SEND_PCL( outFile, t );
-
-	  nbox--;
-	  pbox++;
-      }
-
-    /* Go back to PCL */
-    SEND_PCL( outFile, "\27%0A" );
-
-    /*
-     * Clean up the temporary regions
-     */
-    REGION_DESTROY( pGC->pScreen, fillRegion );
-    REGION_DESTROY( pGC->pScreen, region );
-    xfree( rects );
-}
-
-void
-PclSetSpans(
-     DrawablePtr pDrawable,
-     GCPtr pGC,
-     char *pSrc,
-     DDXPointPtr pPoints,
-     int *pWidths,
-     int nSpans,
-     int fSorted)
-{
-}
diff --git a/hw/xprint/pcl/PclText.c b/hw/xprint/pcl/PclText.c
deleted file mode 100644
index 324de30..0000000
--- a/hw/xprint/pcl/PclText.c
+++ /dev/null
@@ -1,934 +0,0 @@
-/*******************************************************************
-**
-**    *********************************************************
-**    *
-**    *  File:		PclText.c
-**    *
-**    *  Contents:
-**    *                 Character-drawing routines for the PCL DDX
-**    *
-**    *  Created:	10/23/95
-**    *
-**    *********************************************************
-** 
-********************************************************************/
-/*
-(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.
-*/
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#ifdef DO_TWO_BYTE_PCL
-#include "iconv.h"
-#endif /* DO_TWO_BYTE_PCL */
-#include "gcstruct.h"
-#include "windowstr.h"
-
-#include "Pcl.h"
-#include "migc.h"
-#include <X11/Xatom.h>
-
-#include "PclSFonts.h"
-
-static PclFontHead8Ptr  makeFontHeader8 (FontPtr, PclSoftFontInfoPtr);
-static PclFontHead16Ptr makeFontHeader16(FontPtr, PclSoftFontInfoPtr);
-static PclInternalFontPtr makeInternalFont(FontPtr, PclSoftFontInfoPtr);
-static void             fillFontDescData(FontPtr, PclFontDescPtr, unsigned int);
-static PclCharDataPtr   fillCharDescData(PclCharDataPtr, CharInfoPtr);
-static void             output_text(FILE *, PclContextPrivPtr, unsigned char);
-static char *           getFontName(FontPtr);
-static char             isInternal(FontPtr);
-static void             selectInternalFont(FILE *, PclInternalFontPtr, int);
-static void             selectSize(FILE *, PclContextPrivPtr, PclInternalFontPtr);
-static char t[80];
-
-#ifdef DO_TWO_BYTE_PCL
-static void             code_conv(PclSoftFontInfoPtr, FontPtr, char *, char *);
-#endif /* DO_TWO_BYTE_PCL */
-
-#define ESC 0x1b
-#define PER 0x25
-#define ETX 0x3
-#define ETX_ALT 0x2a
-#define DOWNLOAD_FONT 0
-#define INTERNAL_FONT 1
-
-int
-PclPolyText8(
-     DrawablePtr pDrawable,
-     GCPtr pGC,
-     int x,
-     int y,
-     int count,
-     char *string)
-{
-XpContextPtr pCon;
-PclContextPrivPtr pConPriv;
-unsigned long n, i;
-int w;
-CharInfoPtr charinfo[255], *chinfo;
-
-FILE *outFile;
-PclSoftFontInfoPtr pSoftFontInfo;
-PclFontHead8Ptr pfh8 = (PclFontHead8Ptr)NULL;
-PclInternalFontPtr pin = (PclInternalFontPtr)NULL;
-PclCharDataRec cd;
-unsigned char *p;
-unsigned char last_fid;
-int max_ascent, max_descent;
-
-int nbox;
-BoxPtr pbox;
-BoxRec box;
-RegionPtr drawRegion, region;
-char font_type;
-
-    if( PclUpdateDrawableGC( pGC, pDrawable, &outFile ) == FALSE )
-	return x;
-
-    GetGlyphs(pGC->font, (unsigned long)count, (unsigned char *)string,
-						Linear8Bit, &n, charinfo);
-    if ( n == 0 )
-	return x;
-
-    pCon = PclGetContextFromWindow( (WindowPtr)pDrawable );
-    pConPriv = (PclContextPrivPtr)
-	dixLookupPrivate(&pCon->devPrivates, PclContextPrivateKey);
-    pSoftFontInfo = pConPriv->pSoftFontInfo;
-    font_type = isInternal(pGC->font);
-    if ( font_type == DOWNLOAD_FONT ) {
-	/*
- 	 * Create Soft Font Header Information
- 	 */
-	pfh8 = makeFontHeader8(pGC->font, pSoftFontInfo);
-	if (!pfh8)
-	    return x;
-
-	/*
-	 * exec Soft Font Downloading
-	 */
-	p = (unsigned char *)string;
-	for (i=0, chinfo=charinfo; i<n; i++, p++, chinfo++) {
-	    if ( !pfh8->index[*p] ) {
-		fillCharDescData(&cd, *chinfo);
-        	PclDownloadSoftFont8(pConPriv->pJobFile, pSoftFontInfo,
-					pfh8, &cd, p);
-        	xfree(cd.raster_top);
-	    }
-	}
-
-	/*
-	 * print characters
-	 */
-	MACRO_START( outFile, pConPriv );
-	sprintf(t, "\033%%0B;PU%d,%dPD;TD1;DT%c,1;",
-                x + pDrawable->x, y + pDrawable->y + pGC->font->info.fontAscent,
-		ETX);
-	SAVE_PCL( outFile, pConPriv, t );
-	SAVE_PCL_COUNT( outFile, pConPriv, "FI0;SS;LB", 9 );
-
-	last_fid = 0;
-	w = 0;
-	max_ascent = charinfo[0]->metrics.ascent;
-	max_descent = charinfo[0]->metrics.descent;
-	p = (unsigned char *)string;
-	for (i=0, chinfo=charinfo; i<n; i++, p++, chinfo++) {
-	    if  ( last_fid != pfh8->fid ) {
-		sprintf(t, "%c;FI%d;SS;LB", ETX, pfh8->fid);
-		SAVE_PCL( outFile, pConPriv, t );
-
-		last_fid = pfh8->fid;
-	    }
-
-	    output_text(outFile, pConPriv, pfh8->index[*p]);
-
-	    w += (*chinfo)->metrics.characterWidth;
-	    max_ascent = MAX(max_ascent, (*chinfo)->metrics.ascent);
-	    max_descent = MAX(max_descent, (*chinfo)->metrics.descent);
-	}
-
-	sprintf(t, "%c", ETX);
-	SAVE_PCL_COUNT( outFile, pConPriv, t, 1 );
-	sprintf(t, "TD0;\033%%1A");
-	SAVE_PCL( outFile, pConPriv, t );
-	MACRO_END( outFile );
-
-    } else {
-	int fid = 0;
-
-	pin = makeInternalFont(pGC->font, pSoftFontInfo);
-	if (!pin)
-	    return x;
-
-	selectInternalFont(outFile, pin, fid);
-
-	/*
-	 * print characters
-	 */
-	MACRO_START( outFile, pConPriv );
-	sprintf(t, "\033%%0B;PU%d,%dPD;TD1;DT%c,1;",
-		x + pDrawable->x, y + pDrawable->y + pGC->font->info.fontAscent,
-		ETX);
-	SAVE_PCL( outFile, pConPriv, t );
-	selectSize(outFile, pConPriv, pin);
-	SAVE_PCL_COUNT( outFile, pConPriv, "FI0;SS;LB", 9 );
-
-	w = 0;
-	max_ascent = charinfo[0]->metrics.ascent;
-	max_descent = charinfo[0]->metrics.descent;
-	p = (unsigned char *)string;
-	for (i=0, chinfo=charinfo; i<n; i++, p++, chinfo++) {
-	    output_text(outFile, pConPriv, *p);
-
-	    w += (*chinfo)->metrics.characterWidth;
-	    max_ascent = MAX(max_ascent, (*chinfo)->metrics.ascent);
-	    max_descent = MAX(max_descent, (*chinfo)->metrics.descent);
-	}
-	sprintf(t, "%c", ETX);
-	SAVE_PCL_COUNT( outFile, pConPriv, t, 1 );
-	sprintf(t, "TD0;\033%%1A");
-	SAVE_PCL( outFile, pConPriv, t );
-	MACRO_END( outFile );
-    }
-
-    /*
-     * Convert the collection of rectangles into a proper region, then
-     * intersect it with the clip region.
-     */
-    box.x1 = x +  pDrawable->x;
-    box.y1 = y - max_ascent + pDrawable->y + pGC->font->info.fontAscent;
-    box.x2 = x + w + pDrawable->x;
-    box.y2 = y + max_descent + pDrawable->y + pGC->font->info.fontAscent;
-
-    drawRegion = miRegionCreate( &box, 0 );
-    region = miRegionCreate( NULL, 0 );
-    miIntersect( region, drawRegion, pGC->pCompositeClip );
-
-    /*
-     * For each rectangle in the clip region, set the HP-GL/2 "input
-     * window" and render the entire polyline to it.
-     */
-    pbox = REGION_RECTS( region );
-    nbox = REGION_NUM_RECTS( region );
-
-    PclSendData(outFile, pConPriv, pbox, nbox, 1.0);
-
-    /*
-     * Clean up the temporary regions
-     */
-    REGION_DESTROY( pGC->pScreen, drawRegion );
-    REGION_DESTROY( pGC->pScreen, region );
-
-    return x+w;
-}
-
-int
-PclPolyText16(
-     DrawablePtr pDrawable,
-     GCPtr pGC,
-     int x,
-     int y,
-     int count,
-     unsigned short *string)
-{
-XpContextPtr pCon;
-PclContextPrivPtr pConPriv;
-unsigned long n, i;
-int w;
-CharInfoPtr charinfo[255], *chinfo;
-
-FILE *outFile;
-PclSoftFontInfoPtr pSoftFontInfo;
-PclFontHead16Ptr pfh16 = (PclFontHead16Ptr)NULL;
-PclCharDataRec cd;
-FontInfoPtr pfi;
-unsigned char row, col;
-char *p;
-unsigned char last_fid;
-int max_ascent, max_descent;
-unsigned short def;
-
-int nbox;
-BoxPtr pbox;
-BoxRec box;
-RegionPtr drawRegion, region;
-char font_type;
-
-    if( PclUpdateDrawableGC( pGC, pDrawable, &outFile ) == FALSE )
-	return x;
-
-    GetGlyphs(pGC->font, (unsigned long)count, (unsigned char *)string,
-		(FONTLASTROW(pGC->font) == 0) ? Linear16Bit : TwoD16Bit,
-		&n, charinfo);
-
-    pCon = PclGetContextFromWindow( (WindowPtr)pDrawable );
-    pConPriv = (PclContextPrivPtr)
-	dixLookupPrivate(&pCon->devPrivates, PclContextPrivateKey);
-    pSoftFontInfo = pConPriv->pSoftFontInfo;
-
-    font_type = isInternal(pGC->font);
-    if ( font_type == DOWNLOAD_FONT ) {
-	/*
-	 * Create Soft Font Header Information
-	 */
-	pfh16 = makeFontHeader16(pGC->font, pSoftFontInfo);
-	if (!pfh16)
-	    return x;
-
-	/*
-	 * exec Soft Font Downloading
-	 */
-	pfi = (FontInfoRec *)&pGC->font->info;
-	p = (char *)string;
-	for (i=0, p=(char *)string, chinfo=charinfo; i<n; i++, p+=2, chinfo++) {
-	    row = *p & 0xff;
-	    col = *(p+1) & 0xff;
-	    if ( (pfi->firstRow <= row) && (row <= pfi->lastRow)
-		&& (pfi->firstCol <= col) && (col <= pfi->lastCol) ) {
-		row = row - pfi->firstRow;
-		col = col - pfi->firstCol;
-	    } else {
-		def = pfi->defaultCh;
-		row = ((def>>8)&0xff) - pfi->firstRow;
-		col = (def&0xff) - pfi->firstCol;
-	    }
-	    if ( !pfh16->index[row][col].fid ) {
-		fillCharDescData(&cd, *chinfo);
-		PclDownloadSoftFont16(pConPriv->pJobFile, pSoftFontInfo,
-				pfh16, &cd, row, col);
-		xfree(cd.raster_top);
-	    }
-	}
-
-	/*
-	 * print characters
-	 */
-	MACRO_START( outFile, pConPriv );
-	sprintf(t, "\033%%0B;PU%d,%dPD;TD1;DT%c,1;",
-		x + pDrawable->x, y + pDrawable->y + pGC->font->info.fontAscent,
-		ETX);
-	SAVE_PCL( outFile, pConPriv, t );
-	SAVE_PCL_COUNT( outFile, pConPriv, "FI0;SS;LB", 9 );
-
-	last_fid = 0;
-
-	w = 0;
-	max_ascent = charinfo[0]->metrics.ascent;
-	max_descent = charinfo[0]->metrics.descent;
-	for (i=0, p=(char *)string, chinfo=charinfo; i<n; i++, p+=2, chinfo++) {
-	    row = *p & 0xff;
-	    col = *(p+1) & 0xff;
-	    if ( (pfi->firstRow <= row) && (row <= pfi->lastRow)
-		&& (pfi->firstCol <= col) && (col <= pfi->lastCol) ) {
-		row = row - pfi->firstRow;
-		col = col - pfi->firstCol;
-	    } else {
-		def = pfi->defaultCh;
-		row = ((def>>8)&0xff) - pfi->firstRow;
-		col = (def&0xff) - pfi->firstCol;
-	    }
-	    if ( last_fid != pfh16->index[row][col].fid ) {
-		sprintf(t, "%cFI%d;SS;LB",
-				ETX, pfh16->index[row][col].fid);
-		SAVE_PCL( outFile, pConPriv, t );
-		last_fid = pfh16->index[row][col].fid;
-	    }
-
-	    output_text(outFile, pConPriv, pfh16->index[row][col].cindex);
-
-	    w += (*chinfo)->metrics.characterWidth;
-	    max_ascent = MAX(max_ascent, (*chinfo)->metrics.ascent);
-	    max_descent = MAX(max_descent, (*chinfo)->metrics.descent);
-	}
-	sprintf(t, "%c", ETX);
-	SAVE_PCL_COUNT( outFile, pConPriv, t, 1 );
-	sprintf(t, "TD0;\033%%1A");
-	SAVE_PCL( outFile, pConPriv, t );
-	MACRO_END( outFile );
-
-    } else {
-#ifdef DO_TWO_BYTE_PCL
-	PclInternalFontPtr pin;
-	int fid = 0;
-
-	pin = makeInternalFont(pGC->font, pSoftFontInfo);
-	if (!pin)
-	    return x;
-
-	selectInternalFont(outFile, pin, fid);
-	fprintf(outFile, "%c&t31P", ESC);
-
-	/*
-	 * print characters
-	 */
-	MACRO_START( outFile, pConPriv );
-	sprintf(t, "\033%%0B;PU%d,%dPD;TD1;DT%c,1;",
-		x + pDrawable->x, y + pDrawable->y + pGC->font->info.fontAscent,
-		ETX);
-	SAVE_PCL( outFile, pConPriv, t );
-	sprintf(t, "TD0;\033%%1A");
-	SAVE_PCL( outFile, pConPriv, t );
-
-	w = 0;
-	last_fid = 0;
-	max_ascent = charinfo[0]->metrics.ascent;
-	max_descent = charinfo[0]->metrics.descent;
-	for (i=0, p=(char *)string, chinfo=charinfo; i<n; i++, p+=2, chinfo++) {
-	    char tobuf[3];
-	    code_conv(pSoftFontInfo, pGC->font, (char *)p, tobuf);
-	    fprintf(outFile, "%c%c", tobuf[0], tobuf[1]);
-
-	    w += (*chinfo)->metrics.characterWidth;
-	    max_ascent = MAX(max_ascent, (*chinfo)->metrics.ascent);
-	    max_descent = MAX(max_descent, (*chinfo)->metrics.descent);
-	}
-	MACRO_END( outFile );
-#else
-	return x;
-#endif /* DO_TWO_BYTE_PCL */
-    }
-
-    /*
-     * Convert the collection of rectangles into a proper region, then
-     * intersect it with the clip region.
-     */
-    box.x1 = x + pDrawable->x;
-    box.y1 = y - max_ascent + pDrawable->y + pGC->font->info.fontAscent;
-    box.x2 = x + w + pDrawable->x;
-    box.y2 = y + max_descent + pDrawable->y + pGC->font->info.fontAscent;
-
-    drawRegion = miRegionCreate( &box, 0 );
-    region = miRegionCreate( NULL, 0 );
-    miIntersect( region, drawRegion, pGC->pCompositeClip );
-
-    /*
-     * For each rectangle in the clip region, set the HP-GL/2 "input
-     * window" and render the entire polyline to it.
-     */
-    pbox = REGION_RECTS( region );
-    nbox = REGION_NUM_RECTS( region );
-
-    PclSendData(outFile, pConPriv, pbox, nbox, 1.0);
-
-    /*
-     * Clean up the temporary regions
-     */
-    REGION_DESTROY( pGC->pScreen, drawRegion );
-    REGION_DESTROY( pGC->pScreen, region );
-
-    return x+w;
-}
-
-void
-PclImageText8(
-     DrawablePtr pDrawable,
-     GCPtr pGC, 
-     int x, int y,
-     int count,
-     char *string)
-{
-}
-
-void
-PclImageText16(
-     DrawablePtr pDrawable,
-     GCPtr pGC,
-     int x,
-     int y,
-     int count,
-     unsigned short *string)
-{
-}
-
-void
-PclImageGlyphBlt(
-     DrawablePtr pDrawable,
-     GCPtr pGC,
-     int x, int y,
-     unsigned int nGlyphs,
-     CharInfoPtr *pCharInfo,
-     pointer pGlyphBase)
-{
-}
-
-void
-PclPolyGlyphBlt(
-     DrawablePtr pDrawable,
-     GCPtr pGC,
-     int x, int y,
-     unsigned int nGlyphs,
-     CharInfoPtr *pCharInfo,
-     pointer pGlyphBase)
-{
-}
-
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-static PclFontHead8Ptr
-makeFontHeader8(FontPtr pfont, PclSoftFontInfoPtr pSoftFontInfo)
-{
-PclFontHead8Ptr phead8 = pSoftFontInfo->phead8;
-PclFontHead8Ptr pfh8 = phead8;
-PclFontHead8Ptr prev = (PclFontHead8Ptr)NULL;
-FontInfoPtr pfi;
-char *fontname;
-unsigned char nindex;
-int i;
-unsigned long n;
-CharInfoPtr charinfo[1];
-unsigned int space_width;
-
-    if (pSoftFontInfo == (PclSoftFontInfoPtr) NULL)
-	return (PclFontHead8Ptr)NULL;
-
-    /*
-     * Verify it has already been created, if so, return it.
-     */
-    if ( (fontname = getFontName(pfont)) == (char *)NULL)
-	return (PclFontHead8Ptr)NULL;
-
-    while (pfh8 != (PclFontHead8Ptr) NULL) {
-	if (!strcmp(pfh8->fontname, fontname))
-	    return pfh8;
-	prev = pfh8;
-	pfh8 = pfh8->next;
-    }
-
-    /*
-     * Create Font Header Information
-     */
-    pfh8 = (PclFontHead8Ptr)xalloc(sizeof(PclFontHead8Rec));
-    if (pfh8 == (PclFontHead8Ptr)NULL)
-	return (PclFontHead8Ptr)NULL;
-
-    pfi = (FontInfoRec *)&pfont->info;
-    GetGlyphs(pfont, 1, (unsigned char *)&pfi->defaultCh,
-						Linear8Bit, &n, charinfo);
-    if ( n )
-	space_width = charinfo[0]->metrics.characterWidth;
-    else
-	space_width = FONTMAXBOUNDS(pfont,characterWidth);
-
-    fillFontDescData(pfont, &(pfh8->fd), space_width);
-    pfh8->fid = 0;
-    pfh8->fontname = (char *)xalloc(strlen(fontname) + 1);
-    if (pfh8->fontname == (char *)NULL) {
-	xfree(pfh8);
-	return (PclFontHead8Ptr) NULL;
-    }
-    strcpy(pfh8->fontname, fontname);
-
-    nindex = 0xff;
-    pfh8->index = (unsigned char *)xalloc(nindex);
-    if ( pfh8->index == (unsigned char *) NULL ) {
-	xfree(pfh8->fontname);
-	xfree(pfh8);
-	return (PclFontHead8Ptr) NULL;
-    }
-
-    for (i=0; i<=nindex; i++)
-        pfh8->index[i] = 0x0;
-
-    pfh8->next = (PclFontHead8Ptr)NULL;
-
-    if ( prev == (PclFontHead8Ptr) NULL)
-	pSoftFontInfo->phead8 = pfh8;
-    else
-	prev->next = pfh8;
-
-    return pfh8;
-}
-
-static PclFontHead16Ptr
-makeFontHeader16(FontPtr pfont, PclSoftFontInfoPtr pSoftFontInfo)
-{
-PclFontHead16Ptr phead16 = pSoftFontInfo->phead16;
-PclFontHead16Ptr pfh16 = phead16;
-PclFontHead16Ptr prev = (PclFontHead16Ptr)NULL;
-PclFontMapRec ** index;
-FontInfoPtr pfi;
-char *fontname;
-unsigned char nindex_row, nindex_col;
-int i, j;
-unsigned long n;
-CharInfoPtr charinfo[1];
-unsigned int space_width;
-
-    if (pSoftFontInfo == (PclSoftFontInfoPtr) NULL)
-	return (PclFontHead16Ptr)NULL;
-
-    /*
-     * Verify it has already been created, if so, return it.
-     */
-    if ( (fontname = getFontName(pfont)) == (char *)NULL)
-	return (PclFontHead16Ptr)NULL;
-
-    while (pfh16 != (PclFontHead16Ptr) NULL) {
-	if (!strcmp(pfh16->fontname, fontname))
-	    return pfh16;
-	prev = pfh16;
-	pfh16 = pfh16->next;
-    }
-
-    /*
-     * Create Font Header Information
-     */
-    pfh16 = (PclFontHead16Ptr)xalloc(sizeof(PclFontHead16Rec));
-    if (pfh16 == (PclFontHead16Ptr)NULL)
-	return (PclFontHead16Ptr)NULL;
-
-    pfi = (FontInfoRec *)&pfont->info;
-    GetGlyphs(pfont, 1, (unsigned char *)&pfi->defaultCh,
-		(FONTLASTROW(pfont) == 0) ? Linear16Bit : TwoD16Bit,
-		&n, charinfo);
-
-    if ( n )
-	space_width = charinfo[0]->metrics.characterWidth;
-    else
-	space_width = FONTMAXBOUNDS(pfont,characterWidth);
-
-    fillFontDescData(pfont, &(pfh16->fd), space_width);
-    pfh16->cur_fid = 0;
-    pfh16->cur_cindex = 0;
-    pfh16->fontname = (char *)xalloc(strlen(fontname) + 1);
-    if (pfh16->fontname == (char *)NULL) {
-	xfree(pfh16);
-	return (PclFontHead16Ptr) NULL;
-    }
-    strcpy(pfh16->fontname, fontname);
-
-    pfi = (FontInfoRec *)&pfont->info;
-    nindex_col = pfi->lastCol - pfi->firstCol + 1;
-    nindex_row = pfi->lastRow - pfi->firstRow + 1;
-    index = (PclFontMapRec **)xalloc(sizeof(PclFontMapRec *)*nindex_row);
-    if (index == (PclFontMapRec **)NULL) {
-	xfree(pfh16->fontname);
-	xfree(pfh16);
-	return (PclFontHead16Ptr) NULL;
-    }
-    for (i=0; i<nindex_row; i++) {
-	index[i] = (PclFontMapRec *)xalloc(sizeof(PclFontMapRec)*nindex_col);
-	if (index[i] == (PclFontMapRec *)NULL) {
-	    for(j=0; j<i; j++)
-		xfree(index[j]);
-	    xfree(pfh16->fontname);
-	    xfree(pfh16);
-	    return (PclFontHead16Ptr) NULL;
-	}
-        for (j=0; j<=nindex_col; j++)
-            index[i][j].fid = 0x0;
-    }
-
-    pfh16->index = index;
-    pfh16->firstCol = pfi->firstCol;
-    pfh16->lastCol = pfi->lastCol;
-    pfh16->firstRow = pfi->firstRow;
-    pfh16->lastRow = pfi->lastRow;
-    pfh16->next = (PclFontHead16Ptr)NULL;
-
-    if ( prev == (PclFontHead16Ptr) NULL)
-	pSoftFontInfo->phead16 = pfh16;
-    else
-	prev->next = pfh16;
-
-    return pfh16;
-}
-
-static PclInternalFontPtr
-makeInternalFont(FontPtr pfont, PclSoftFontInfoPtr pSoftFontInfo)
-{
-PclInternalFontPtr pinfont = pSoftFontInfo->pinfont;
-PclInternalFontPtr pin = pinfont;
-PclInternalFontPtr prev = (PclInternalFontPtr)NULL;
-FontPropPtr props;
-FontInfoPtr pfi;
-char *fontname;
-Atom xa_pcl_font_name, xa_res, xa_ave_width, xa_spacing;
-int width = 1;
-int mask;
-int i;
-
-    if (pSoftFontInfo == (PclSoftFontInfoPtr) NULL)
-	return (PclInternalFontPtr)NULL;
-
-    /*
-     * Verify it has already been created, if so, return it.
-     */
-    if ( (fontname = getFontName(pfont)) == (char *)NULL)
-	return (PclInternalFontPtr)NULL;
-
-    while (pin != (PclInternalFontPtr) NULL) {
-	if (!strcmp(pin->fontname, fontname))
-	    return pin;
-	prev = pin;
-	pin = pin->next;
-    }
-
-    /*
-     * Create Internal Font Information
-     */
-    pin = (PclInternalFontPtr)xalloc(sizeof(PclInternalFontRec));
-    if (pin == (PclInternalFontPtr)NULL)
-	return (PclInternalFontPtr)NULL;
-
-    pin->fontname = (char *)xalloc(strlen(fontname) + 1);
-    if (pin->fontname == (char *)NULL) {
-	xfree(pin);
-	return (PclInternalFontPtr) NULL;
-    }
-    strcpy(pin->fontname, fontname);
-
-    xa_pcl_font_name = MakeAtom("PCL_FONT_NAME", strlen("PCL_FONT_NAME"), TRUE);
-    xa_res = MakeAtom("RESOLUTION_X", strlen("RESOLUTION_X"), TRUE);
-    xa_ave_width = MakeAtom("AVERAGE_WIDTH", strlen("AVERAGE_WIDTH"), TRUE);
-    xa_spacing = MakeAtom("SPACING", strlen("SPACING"), TRUE);
-    pfi = (FontInfoRec *)&pfont->info;
-    props = pfi->props;
-
-    mask = 0;
-    for (i=0; i<pfi->nprops; i++, props++) {
-	if ( (Atom) props->name == xa_pcl_font_name ) {
-	    pin->pcl_font_name = NameForAtom(props->value);
-	    mask |= 0x1;
-	} else if ( props->name == XA_POINT_SIZE ) {
-	    pin->height = (float) props->value / 10.0;
-	    mask |= 0x2;
-	} else if ( (Atom) props->name == xa_res ) {
-	    mask |= 0x4;
-	} else if ( (Atom) props->name == xa_ave_width ) {
-	    width = (int) props->value / 10;
-	    mask |= 0x8;
-	} else if ( (Atom) props->name == xa_spacing ) {
-	    pin->spacing = NameForAtom(props->value);
-	    mask |= 0x10;
-	}
-    }
-    if ( mask != 0x1f ) {
-	xfree(pin->fontname);
-	xfree(pin);
-	return (PclInternalFontPtr) NULL;
-    }
-
-    if ( *pin->spacing != 'P' || *pin->spacing != 'p' ) {
-	if (width == 0)
-	    width = 1;
-	pin->pitch = (float) 300.0 / width;  /* Hard-Code: Resolution is 300 */
-    }
-
-    pin->next = (PclInternalFontPtr)NULL;
-    if ( prev == (PclInternalFontPtr) NULL)
-	pSoftFontInfo->pinfont = pin;
-    else
-	prev->next = pin;
-
-    return pin;
-}
-
-static void
-fillFontDescData(FontPtr pfont, PclFontDescPtr pfd, unsigned int space)
-{
-FontInfoPtr pfi;
-
-    pfi = (FontInfoRec *)&pfont->info;
-
-    if ( (pfi->maxbounds.leftSideBearing == pfi->minbounds.leftSideBearing)
-	&& (pfi->maxbounds.rightSideBearing == pfi->minbounds.rightSideBearing)
-	&& (pfi->maxbounds.characterWidth == pfi->minbounds.characterWidth)
-	&& (pfi->maxbounds.ascent == pfi->minbounds.ascent)
-	&& (pfi->maxbounds.descent == pfi->minbounds.descent)
-    )
-	pfd->spacing = MONOSPACE;
-    else
-	pfd->spacing = PROPSPACE;
-
-    pfd->pitch      = space;
-    pfd->cellheight = FONTMAXBOUNDS(pfont,ascent)
-				+ FONTMAXBOUNDS(pfont,descent);
-    pfd->cellwidth  = FONTMAXBOUNDS(pfont,rightSideBearing)
-				- FONTMINBOUNDS(pfont,leftSideBearing);
-    pfd->ascent     = FONTMAXBOUNDS(pfont,ascent);   /*FONTASCENT(pfont);*/
-    pfd->descent    = FONTMAXBOUNDS(pfont,descent); /*FONTDESCENT(pfont);*/
-}
-
-static PclCharDataPtr
-fillCharDescData(PclCharDataPtr pcd, CharInfoPtr pci)
-{
-unsigned int byte_width;
-unsigned char *p;
-register int nbyGlyphWidth;
-unsigned char *pglyph, *pg;
-unsigned int i, j;
-
-    pcd->h_offset   = pci->metrics.leftSideBearing;
-    pcd->v_offset   = pci->metrics.ascent;
-    pcd->width      = pci->metrics.rightSideBearing
-				- pci->metrics.leftSideBearing;
-    pcd->height     = pci->metrics.ascent + pci->metrics.descent;
-    pcd->font_pitch = pci->metrics.characterWidth;
-
-    byte_width = (pcd->width + 7)/8;
-    pcd->raster_top = (unsigned char *)xalloc(byte_width * pcd->height);
-    if (pcd->raster_top == (unsigned char *)NULL)
-	return (PclCharDataPtr)NULL;
-
-    p = pcd->raster_top;
-    nbyGlyphWidth = GLYPHWIDTHBYTESPADDED(pci);
-    pglyph = FONTGLYPHBITS(pglyphBase, pci);
-    for (i=0; i<pcd->height; i++) {
-	pg = pglyph + nbyGlyphWidth * i;
-	for (j=0; j<byte_width; j++) 
-	    *p++ = *pg++;
-    }
-    return pcd;
-}
-
-static void
-output_text(FILE *outFile,
-	PclContextPrivPtr pConPriv,
-	unsigned char index)
-{
-    if ( index == ETX ) {
-	sprintf(t, "%c;DT%c,1;LB%c%c;DT%c,1;LB",
-				ETX, ETX_ALT, ETX, ETX_ALT, ETX);
-	SAVE_PCL( outFile, pConPriv, t );
-    } else {
-	sprintf(t, "%c", index);
-	SAVE_PCL_COUNT( outFile, pConPriv, t, 1 );
-    }
-}
-
-static char *
-getFontName(FontPtr pfont)
-{
-int i;
-FontInfoPtr pfi;
-FontPropPtr props;
-char *fontname;
-
-    pfi = (FontInfoRec *)&pfont->info;
-    props = pfi->props;
-    fontname = (char *) NULL;
-    for (i=0; i<pfi->nprops; i++, props++) {
-        if ( props->name == XA_FONT ) {
-            fontname = (char *)NameForAtom(props->value);
-            break;
-        }
-    }
-    return fontname;
-}
-
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-/* Internal Font Selection                                               */
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-static char
-isInternal(FontPtr pfont)
-{
-int i;
-FontInfoPtr pfi;
-FontPropPtr props;
-Atom dest;
-
-    dest = MakeAtom("PRINTER_RESIDENT_FONT", strlen("PRINTER_RESIDENT_FONT"), TRUE);
-
-    pfi = (FontInfoRec *)&pfont->info;
-    props = pfi->props;
-    for (i=0; i<pfi->nprops; i++, props++) {
-        if ( (Atom) props->name == dest && props->value == 2 )
-		return INTERNAL_FONT;
-    }
-    return DOWNLOAD_FONT;
-}
-
-static void
-selectInternalFont(FILE *outFile, PclInternalFontPtr pin, int fid)
-{
-    fprintf(outFile, "%c*c%dD", ESC, fid);
-    if ( *pin->spacing == 'P' || *pin->spacing == 'p' )
-	fprintf(outFile, pin->pcl_font_name, pin->height);
-    else
-	fprintf(outFile, pin->pcl_font_name, pin->pitch);
-    fprintf(outFile, "%c*c6F", ESC);
-}
-
-static void
-selectSize(FILE *outFile,
-	PclContextPrivPtr pConPriv,
-	PclInternalFontPtr pin)
-{
-    if ( *pin->spacing == 'P' || *pin->spacing == 'p' ) {
-	sprintf(t, "SD4,%f;", pin->height);
-	SAVE_PCL( outFile, pConPriv, t );
-    } else {
-	sprintf(t, "SD3,%f;", pin->pitch);
-	SAVE_PCL( outFile, pConPriv, t );
-    }
-    return;
-}
-
-#ifdef DO_TWO_BYTE_PCL
-static void
-code_conv(
-    PclSoftFontInfoPtr pSoftFontInfo,
-    FontPtr pfont,
-    char *from,
-    char *to
-)
-{
-iconv_t cd;
-char frombuf[9], *fromptr;
-size_t inbyte = 5, outbyte=2;
-
-    fromptr = frombuf;
-    frombuf[0] = 0x1b; /* Esc */
-    frombuf[1] = 0x24; /* $ */
-    frombuf[2] = 0x42; /* B */
-    frombuf[3] = *from;
-    frombuf[4] = *(from+1);
-    frombuf[5] = 0x1b; /* Esc */
-    frombuf[6] = 0x28; /* ( */
-    frombuf[7] = 0x4a; /* J */
-    frombuf[8] = 0x0;
-    if ((cd = iconv_open("sjis", "jis")) == (iconv_t)(-1)) {
-	*to = (unsigned char)NULL;
-	return;
-    }
-
-    if ( iconv(cd, &fromptr, &inbyte, &to, &outbyte) == -1 )
-	*to = (unsigned char)NULL;
-
-    iconv_close(cd);
-    return;
-}
-#endif /* DO_TWO_BYTE_PCL */
diff --git a/hw/xprint/pcl/PclWindow.c b/hw/xprint/pcl/PclWindow.c
deleted file mode 100644
index 950933e..0000000
--- a/hw/xprint/pcl/PclWindow.c
+++ /dev/null
@@ -1,209 +0,0 @@
-/*******************************************************************
-**
-**    *********************************************************
-**    *
-**    *  File:		PclWindow.c
-**    *
-**    *  Contents:
-**    *                 Window code for Pcl driver.
-**    *
-**    *  Created:	2/02/95
-**    *
-**    *********************************************************
-** 
-********************************************************************/
-/*
-(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.
-*/
-
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#include <stdio.h>
-#include <string.h>
-#include <sys/types.h>
-#include <sys/wait.h>
-
-#include "mistruct.h"
-#include "regionstr.h"
-#include "windowstr.h"
-#include "gcstruct.h"
-
-#include "Pcl.h"
-
-#if 0
-/*
- * The following list of strings defines the properties which will be
- * placed on the screen's root window if the property was defined in
- * the start-up configuration resource database.
- */
-static /* const */ char *propStrings[] = {
-	DT_PRINT_JOB_HEADER,
-	DT_PRINT_JOB_TRAILER,
-	DT_PRINT_JOB_COMMAND, /* old-obsolete */
-	DT_PRINT_JOB_EXEC_COMMAND,
-	DT_PRINT_JOB_EXEC_OPTIONS,
-	DT_PRINT_PAGE_HEADER,
-	DT_PRINT_PAGE_TRAILER,
-	DT_PRINT_PAGE_COMMAND,
-	(char *)NULL
-};
-#endif
-
-/*
- * PclCreateWindow - watch for the creation of the root window.
- * When it's created, register the screen with the print extension,
- * and put the default command/header properties on it.
- */
-/*ARGSUSED*/
-
-Bool
-PclCreateWindow(
-    register WindowPtr pWin)
-{
-    PclWindowPrivPtr pPriv;
-    
-#if 0
-    Bool status = Success;
-    ScreenPtr pScreen = pWin->drawable.pScreen;
-    PclScreenPrivPtr pScreenPriv = (PclScreenPrivPtr) 
-	dixLookupPrivate(&pScreen->devPrivates, PclScreenPrivateKey);
-    PclWindowPrivPtr pWinPriv = (PclWindowPrivPtr)
-	dixLookupPrivate(&pWin->devPrivates, PclWindowPrivateKey);
-
-    /*
-     * Initialize this window's private struct.
-     */
-    pWinPriv->jobFileName = (char *)NULL;
-    pWinPriv->pJobFile = (FILE *)NULL;
-    pWinPriv->pageFileName = (char *)NULL;
-    pWinPriv->pPageFile = (FILE *)NULL;
-    
-    if(pWin->parent == (WindowPtr)NULL)  /* root window? */
-    {
-	Atom propName; /* type = XA_STRING */
-	char *propVal;
-	int i;
-        XrmDatabase rmdb = pScreenPriv->resDB;
-
-        /*
-         * Put the defaults spec'd in the config files in properties on this
-	 * screen's root window.
-         */
-	for(i = 0; propStrings[i] != (char *)NULL; i++)
-	{
-            if((propVal = _DtPrintGetPrinterResource(pWin, rmdb, 
-						     propStrings[i])) !=
-	       (char *)NULL)
-	    {
-                propName = MakeAtom(propStrings[i], strlen(propStrings[i]),
-				    TRUE);
-	        dixChangeWindowProperty(serverClient, pWin, propName, XA_STRING,
-					8, PropModeReplace, strlen(propVal),
-					(pointer)propVal, FALSE);
-	        xfree(propVal);
-	    }
-	}
-    }
-
-    return status;
-#endif
-
-    /*
-     * Invalidate the window's private print context.
-     */
-    pPriv = (PclWindowPrivPtr)
-	dixLookupPrivate(&pWin->devPrivates, PclWindowPrivateKey);
-    pPriv->validContext = 0;
-    
-    return TRUE;
-}
-
-
-/*ARGSUSED*/
-Bool PclMapWindow(
-    WindowPtr pWindow)
-{
-    return TRUE;
-}
-
-/*ARGSUSED*/
-Bool 
-PclPositionWindow(
-    register WindowPtr pWin,
-    int x,
-    int y)
-{
-    return TRUE;
-}
-
-/*ARGSUSED*/
-Bool 
-PclUnmapWindow(
-    WindowPtr pWindow)
-{
-    return TRUE;
-}
-
-/*ARGSUSED*/
-void 
-PclCopyWindow(
-    WindowPtr pWin,
-    DDXPointRec ptOldOrg,
-    RegionPtr prgnSrc)
-{
-}
-
-/*ARGSUSED*/
-Bool
-PclChangeWindowAttributes(
-    register WindowPtr pWin,
-    register unsigned long mask)
-{
-    if( pWin->backingStore != NotUseful )
-      {
-	  pWin->backingStore = NotUseful;
-	  mask |= CWBackingStore;
-      }
-    
-    return TRUE;
-}
-
-/*ARGSUSED*/
-Bool
-PclDestroyWindow(
-    WindowPtr pWin)
-{
-    return TRUE;
-}
-
diff --git a/hw/xprint/pcl/Pclmap.h b/hw/xprint/pcl/Pclmap.h
deleted file mode 100644
index 18ac31d..0000000
--- a/hw/xprint/pcl/Pclmap.h
+++ /dev/null
@@ -1,210 +0,0 @@
-/*
-(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.
-*/
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#ifndef _PCLMAP_H_
-#define _PCLMAP_H_
-
-#ifdef XP_PCL_COLOR
-#ifdef CATNAME
-#undef CATNAME
-#endif
-#if !defined(UNIXCPP) || defined(ANSICPP)
-#define PCLNAME(subname) PclCr##subname
-#define CATNAME(prefix,subname) prefix##Color##subname
-#else
-#define PCLNAME(subname) PclCr/**/subname
-#define CATNAME(prefix,subname) prefix/**/Color/**/subname
-#endif
-#endif /* XP_PCL_COLOR */
-
-#ifdef XP_PCL_MONO
-#ifdef CATNAME
-#undef CATNAME
-#endif
-#if !defined(UNIXCPP) || defined(ANSICPP)
-#define PCLNAME(subname) PclMn##subname
-#define CATNAME(prefix,subname) prefix##Mono##subname
-#else
-#define PCLNAME(subname) PclMn/**/subname
-#define CATNAME(prefix,subname) prefix/**/Mono/**/subname
-#endif
-#endif /* XP_PCL_MONO */
-
-#ifdef XP_PCL_LJ3
-#ifdef CATNAME
-#undef CATNAME
-#endif
-#if !defined(UNIXCPP) || defined(ANSICPP)
-#define PCLNAME(subname) PclLj3##subname
-#define CATNAME(prefix,subname) prefix##Lj3##subname
-#else
-#define PCLNAME(subname) PclLj3/**/subname
-#define CATNAME(prefix,subname) prefix/**/Lj3/**/subname
-#endif
-#endif /* XP_PCL_LJ3 */
-
-#ifdef PCLNAME
-
-/* PclInit.c */
-#define InitializePclDriver		CATNAME(Initialize, PclDriver)
-#define PclCloseScreen			PCLNAME(CloseScreen)
-#define PclGetContextFromWindow		PCLNAME(GetContextFromWindow)
-#define PclScreenPrivateKey	PCLNAME(ScreenPrivateKey)
-#define PclWindowPrivateKey	PCLNAME(WindowPrivateKey)
-#define PclContextPrivateKey	PCLNAME(ContextPrivateKey)
-#define PclPixmapPrivateKey	PCLNAME(PixmapPrivateKey)
-#define PclGCPrivateKey		PCLNAME(GCPrivateKey)
-
-/* PclPrint.c */
-#define PclStartJob			PCLNAME(StartJob)
-#define PclEndJob			PCLNAME(EndJob)
-#define PclStartPage			PCLNAME(StartPage)
-#define PclEndPage			PCLNAME(EndPage)
-#define PclStartDoc			PCLNAME(StartDoc)
-#define PclEndDoc			PCLNAME(EndDoc)
-#define PclDocumentData			PCLNAME(DocumentData)
-#define PclGetDocumentData		PCLNAME(GetDocumentData)
-
-/* PclWindow.c */
-#define PclCreateWindow			PCLNAME(CreateWindow)
-#define PclMapWindow			PCLNAME(MapWindow)
-#define PclPositionWindow		PCLNAME(PositionWindow)
-#define PclUnmapWindow			PCLNAME(UnmapWindow)
-#define PclCopyWindow			PCLNAME(CopyWindow)
-#define PclChangeWindowAttributes	PCLNAME(ChangeWindowAttributes)
-#define PclDestroyWindow		PCLNAME(DestroyWindow)
-
-/* PclGC.c */
-#define PclCreateGC			PCLNAME(CreateGC)
-#define PclDestroyGC			PCLNAME(DestroyGC)
-#define PclGetDrawablePrivateStuff	PCLNAME(GetDrawablePrivateStuff)
-#define PclSetDrawablePrivateGC		PCLNAME(SetDrawablePrivateGC)
-#define PclSendPattern			PCLNAME(SendPattern)
-#define PclUpdateDrawableGC		PCLNAME(UpdateDrawableGC)
-#define PclComputeCompositeClip		PCLNAME(ComputeCompositeClip)
-#define PclValidateGC			PCLNAME(ValidateGC)
-
-/* PclAttr.c */
-#define PclGetAttributes		PCLNAME(GetAttributes)
-#define PclGetOneAttribute		PCLNAME(GetOneAttribute)
-#define PclAugmentAttributes		PCLNAME(AugmentAttributes)
-#define PclSetAttributes		PCLNAME(SetAttributes)
-
-/* PclColor.c */
-#define PclLookUp			PCLNAME(LookUp)
-#define PclCreateDefColormap		PCLNAME(CreateDefColormap)
-#define PclCreateColormap		PCLNAME(CreateColormap)
-#define PclDestroyColormap		PCLNAME(DestroyColormap)
-#define PclInstallColormap		PCLNAME(InstallColormap)
-#define PclUninstallColormap		PCLNAME(UninstallColormap)
-#define PclListInstalledColormaps	PCLNAME(ListInstalledColormaps)
-#define PclStoreColors			PCLNAME(StoreColors)
-#define PclResolveColor			PCLNAME(ResolveColor)
-#define PclFindPaletteMap		PCLNAME(FindPaletteMap)
-#define PclUpdateColormap		PCLNAME(UpdateColormap)
-#define PclReadMap			PCLNAME(ReadMap)
-
-/* PclPixmap.c */
-#define PclCreatePixmap			PCLNAME(CreatePixmap)
-#define PclDestroyPixmap		PCLNAME(DestroyPixmap)
-
-/* PclArc.c */
-#define PclDoArc			PCLNAME(DoArc)
-#define PclPolyArc			PCLNAME(PolyArc)
-#define PclPolyFillArc			PCLNAME(PolyFillArc)
-
-/* PclArea.c */
-#define PclPutImage			PCLNAME(PutImage)
-#define PclCopyArea			PCLNAME(CopyArea)
-#define PclCopyPlane			PCLNAME(CopyPlane)
-
-/* PclLine */
-#define PclPolyLine			PCLNAME(PolyLine)
-#define PclPolySegment			PCLNAME(PolySegment)
-
-/* PclPixel.c */
-#define PclPolyPoint			PCLNAME(PolyPoint)
-#define PclPushPixels			PCLNAME(PushPixels)
-
-/* PclPolygon.c */
-#define PclPolyRectangle		PCLNAME(PolyRectangle)
-#define PclFillPolygon			PCLNAME(FillPolygon)
-#define PclPolyFillRect			PCLNAME(PolyFillRect)
-
-/* PclSpans.c */
-#define PclFillSpans			PCLNAME(FillSpans)
-#define PclSetSpans			PCLNAME(SetSpans)
-
-/* PclText.c */
-#define PclPolyText8			PCLNAME(PolyText8)
-#define PclPolyText16			PCLNAME(PolyText16)
-#define PclImageText8			PCLNAME(ImageText8)
-#define PclImageText16			PCLNAME(ImageText16)
-#define PclImageGlyphBlt		PCLNAME(ImageGlyphBlt)
-#define PclPolyGlyphBlt			PCLNAME(PolyGlyphBlt)
-#define PclPolyGlyphBlt			PCLNAME(PolyGlyphBlt)
-
-/* PclFonts.c */
-#define PclRealizeFont			PCLNAME(RealizeFont)
-#define PclUnrealizeFont		PCLNAME(UnrealizeFont)
-
-/* PclSFonts.c */
-#define PclDownloadSoftFont8		PCLNAME(DownloadSoftFont8)
-#define PclDownloadSoftFont16		PCLNAME(DownloadSoftFont16)
-#define PclCreateSoftFontInfo		PCLNAME(CreateSoftFontInfo)
-#define PclDestroySoftFontInfo		PCLNAME(DestroySoftFontInfo)
-
-/* PclMisc.c */
-#define PclQueryBestSize		PCLNAME(QueryBestSize)
-#define GetPropString			PCLNAME(GetPropString)
-#define SystemCmd			PCLNAME(SystemCmd)
-#define PclGetMediumDimensions		PCLNAME(GetMediumDimensions)
-#define PclGetReproducibleArea		PCLNAME(GetReproducibleArea)
-#define PclSpoolFigs			PCLNAME(SpoolFigs)
-#define PclSendData			PCLNAME(SendData)
-
-/* PclCursor.c */
-#define PclConstrainCursor		PCLNAME(ConstrainCursor)
-#define PclCursorLimits			PCLNAME(CursorLimits)
-#define PclDisplayCursor		PCLNAME(DisplayCursor)
-#define PclRealizeCursor		PCLNAME(RealizeCursor)
-#define PclUnrealizeCursor		PCLNAME(UnrealizeCursor)
-#define PclRecolorCursor		PCLNAME(RecolorCursor)
-#define PclSetCursorPosition		PCLNAME(SetCursorPosition)
-
-#endif
-
-#endif /* _PCLMAP_H_ */
diff --git a/hw/xprint/ps/Makefile.am b/hw/xprint/ps/Makefile.am
deleted file mode 100644
index 08638b1..0000000
--- a/hw/xprint/ps/Makefile.am
+++ /dev/null
@@ -1,42 +0,0 @@
-noinst_LTLIBRARIES = libps.la
-
-INCLUDES = -I$(top_srcdir)/hw/xprint
-
-AM_CFLAGS = @DIX_CFLAGS@ @XPRINT_CFLAGS@ @FREETYPE_CFLAGS@ \
-	    -D_XP_PRINT_SERVER_ -DXP_PSTEXT
-
-libps_la_SOURCES =		\
-	PsArc.c			\
-	PsArea.c		\
-	PsAttr.c		\
-	PsAttVal.c		\
-	PsCache.c		\
-	PsColor.c		\
-	PsDef.h			\
-	PsFonts.c		\
-	PsGC.c			\
-	Ps.h			\
-	PsImageUtil.c		\
-	PsInit.c		\
-	PsLine.c		\
-	PsMisc.c		\
-	psout.c			\
-	psout.h			\
-	PsPixel.c		\
-	PsPixmap.c		\
-	PsPolygon.c		\
-	PsPrint.c		\
-	PsSpans.c		\
-	PsText.c		\
-	PsWindow.c
-
-EXTRA_DIST = 	PsFTFonts.c	\
-	psout_ft.c		\
-	psout_ftpstype1.c	\
-	psout_ftpstype3.c	\
-	ttf2pt1wrap.c
-
-if XP_USE_FREETYPE
-    AM_CFLAGS += -DXP_USE_FREETYPE
-    libps_la_SOURCES += $(EXTRA_DIST)
-endif
diff --git a/hw/xprint/ps/Ps.h b/hw/xprint/ps/Ps.h
deleted file mode 100644
index a25e989..0000000
--- a/hw/xprint/ps/Ps.h
+++ /dev/null
@@ -1,600 +0,0 @@
-/*
-
-Copyright 1996, 1998  The Open Group
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-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
-OPEN GROUP 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 name of The Open Group shall not be
-used in advertising or otherwise to promote the sale, use or other dealings
-in this Software without prior written authorization from The Open Group.
-
-*/
-/*
- * (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:		Ps.h
-**    *
-**    *  Contents:  defines and includes for the Ps driver
-**    *             for a printing X server.
-**    *
-**    *  Created By:	Roger Helmendach (Liberty Systems)
-**    *
-**    *  Copyright:	Copyright 1996 The Open Group, Inc.
-**    *
-**    *********************************************************
-** 
-********************************************************************/
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#ifndef _PS_H_
-#define _PS_H_
-
-#include <stdio.h>
-
-#ifdef abs
-#undef abs   /* this is because of a non-Spec1170ness in misc.h */
-#endif
-#include <stdlib.h>
-#include "scrnintstr.h"
-#include "dix.h"
-
-#include "PsDef.h"
-#include "psout.h"
-
-#include <X11/extensions/Print.h>
-#include <X11/extensions/Printstr.h>
-
-#include "regionstr.h"
-#include <X11/fonts/fontstruct.h>
-#include "dixfontstr.h"
-#include "gcstruct.h"
-
-/*
- *  Some sleazes to force the XrmDB stuff into the server
- */
-#ifndef HAVE_XPointer
-typedef char *XPointer;
-#define Status int
-#define True 1
-#define False 0
-#endif
-
-#include "misc.h"
-#include <X11/Xfuncproto.h>
-#include <X11/Xresource.h>
-#include "attributes.h"
-
-
-/*
- *  Public index variables from PsInit.c
- */
-
-extern DevPrivateKey PsScreenPrivateKey;
-extern DevPrivateKey PsWindowPrivateKey;
-extern DevPrivateKey PsContextPrivateKey;
-extern DevPrivateKey PsPixmapPrivateKey;
-extern XpValidatePoolsRec PsValidatePoolsRec;
-
-/*
- *  Display list structures
- */
-
-#define DPY_BLOCKSIZE 4096
-
-typedef struct
-{
-  int      mode;
-  int      nPoints;
-  xPoint  *pPoints;
-} PsPolyPointsRec;
-
-typedef struct
-{
-  int        nSegments;
-  xSegment  *pSegments;
-} PsSegmentsRec;
-
-typedef struct
-{
-  int          nRects;
-  xRectangle  *pRects;
-} PsRectanglesRec;
-
-typedef struct
-{
-  int     nArcs;
-  xArc   *pArcs;
-} PsArcsRec;
-
-typedef struct
-{
-  int     x;
-  int     y;
-  int     count;
-  char   *string;
-} PsText8Rec;
-
-typedef struct
-{
-  int             x;
-  int             y;
-  int             count;
-  unsigned short *string;
-} PsText16Rec;
-
-typedef struct
-{
-  int     depth;
-  int     x;
-  int     y;
-  int     w;
-  int     h;
-  int     leftPad;
-  int     format;
-  int     res;		/* image resolution */
-  char   *pData;
-} PsImageRec;
-
-typedef struct
-{
-  int   x;
-  int   y;
-  int   w;
-  int   h;
-} PsFrameRec;
-
-typedef enum
-{
-  PolyPointCmd,
-  PolyLineCmd,
-  PolySegmentCmd,
-  PolyRectangleCmd,
-  FillPolygonCmd,
-  PolyFillRectCmd,
-  PolyArcCmd,
-  PolyFillArcCmd,
-  Text8Cmd,
-  Text16Cmd,
-  TextI8Cmd,
-  TextI16Cmd,
-  PutImageCmd,
-  BeginFrameCmd,
-  EndFrameCmd
-} DisplayElmType;
-
-typedef struct _DisplayElmRec
-{
-  DisplayElmType  type;
-  GCPtr           gc;
-  union
-  {
-    PsPolyPointsRec  polyPts;
-    PsSegmentsRec    segments;
-    PsRectanglesRec  rects;
-    PsArcsRec        arcs;
-    PsText8Rec       text8;
-    PsText16Rec      text16;
-    PsImageRec       image;
-    PsFrameRec       frame;
-  } c;
-} DisplayElmRec;
-
-typedef DisplayElmRec *DisplayElmPtr;
-
-typedef struct _DisplayListRec
-{
-  struct _DisplayListRec *next;
-  int                     nelms;
-  DisplayElmRec           elms[DPY_BLOCKSIZE];
-} DisplayListRec;
-
-typedef DisplayListRec *DisplayListPtr;
-
-/*
- *  Private structures
- */
-
-typedef struct
-{
-  XrmDatabase   resDB;
-  Bool        (*DestroyWindow)(WindowPtr);
-} PsScreenPrivRec, *PsScreenPrivPtr;
-
-typedef struct PsFontTypeInfoRec PsFontTypeInfoRec;
-
-/* Structure to hold information about one font on disk
- * Notes:
- * - multiple XLFD names can refer to the same |PsFontTypeInfoRec| (if
- *   they all use the same font on the disk)
- * - the FreeType font download code uses multiple |PsFontTypeInfoRec|
- *   records for one font on disk if they differ in the encoding being
- *   used (this is an exception from the
- *   'one-|PsFontTypeInfoRec|-per-font-on-disk'-design; maybe it it is better
- *   to rework that in a later step and add a new per-encoding structure). 
- */
-struct PsFontTypeInfoRec
-{
-  PsFontTypeInfoRec *next;                    /* Next record in list...         */
-  char              *adobe_ps_name;           /* PostScript font name (from the
-                                               * "_ADOBE_POSTSCRIPT_FONTNAME" atom) */
-  char              *download_ps_name;        /* PostScript font name used for font download */
-  char              *filename;                /* File name of font              */
-#ifdef XP_USE_FREETYPE
-  char              *ft_download_encoding;    /* encoding used for download     */
-  PsFTDownloadFontType ft_download_font_type; /* PS font type used for download (e.g. Type1/Type3/CID/etc.) */
-#endif /* XP_USE_FREETYPE */
-  int                is_iso_encoding;         /* Is this font encoded in ISO Latin 1 ? */
-  int                font_type;               /* See PSFTI_FONT_TYPE_* below... */
-  Bool               downloadableFont;        /* Font can be downloaded         */
-  Bool               alreadyDownloaded[256];  /* Font has been downloaded (for 256 8bit "sub"-font) */
-};
-
-#define PSFTI_FONT_TYPE_OTHER        (0)
-#define PSFTI_FONT_TYPE_PMF          (1)
-#define PSFTI_FONT_TYPE_PS_TYPE1_PFA (2)
-#define PSFTI_FONT_TYPE_PS_TYPE1_PFB (3)
-#define PSFTI_FONT_TYPE_TRUETYPE     (4)
-/* PSFTI_FONT_TYPE_FREETYPE is means the font is handled by the freetype engine */
-#define PSFTI_FONT_TYPE_FREETYPE     (5)
-
-typedef struct PsFontInfoRec PsFontInfoRec;
-
-/* Structure which represents our context info for a single XLFD font
- * Note that multiple |PsFontInfoRec| records can share the same
- * |PsFontTypeInfoRec| record - the |PsFontInfoRec| records represent
- * different appearances of the same font on disk(=|PsFontTypeInfoRec|)).
- */
-struct PsFontInfoRec
-{
-  PsFontInfoRec     *next;          /* Next record in list...             */
-  /* |font| and |font_fontPrivate| are used by |PsFindFontInfoRec()| to
-   * identify a font */
-  FontPtr            font;          /* The font this record is for        */
-  pointer            font_fontPrivate;
-  PsFontTypeInfoRec *ftir;          /* Record about the font file on disk */
-  const char        *dfl_name;      /* XLFD for this font                 */
-  int                size;          /* Font size. Use |mtx| if |size==0|  */
-  float              mtx[4];        /* Transformation matrix (see |size|) */
-};
-
-typedef struct
-{
-  char              *jobFileName;
-  FILE              *pJobFile;
-  GC                 lastGC;
-  unsigned char     *dash;
-  int                validGC;
-  ClientPtr          getDocClient;
-  int                getDocBufSize;
-  PsOutPtr           pPsOut;
-  PsFontTypeInfoRec *fontTypeInfoRecords;
-  PsFontInfoRec     *fontInfoRecords;
-} PsContextPrivRec, *PsContextPrivPtr;
-
-typedef struct
-{
-  int          validContext;
-  XpContextPtr context;
-} PsWindowPrivRec, *PsWindowPrivPtr;
-
-typedef struct
-{
-  XpContextPtr    context;
-  GC              lastGC;
-  int             validGC;
-  DisplayListPtr  dispList;
-} PsPixmapPrivRec, *PsPixmapPrivPtr;
-
-/*
- *  Macro functions
- */
-
-#define SEND_PS(f,c) fwrite( c, sizeof( char ), strlen( c ), f )
-#define MIN(a,b) (((a)<(b))?(a):(b))
-#ifndef MAX
-#define MAX(a,b) (((a)>(b))?(a):(b))
-#endif
-
-/*
- *  Functions in PsInit.c
- */
-
-extern Bool InitializePsDriver(int ndx, ScreenPtr pScreen, int argc,
-    char **argv);
-extern XpContextPtr PsGetContextFromWindow(WindowPtr win);
-
-/*
- *  Functions in PsCache.c
- */
-
-extern int PsBmIsImageCached(int gWidth, int gHeight, char *pBuffer);
-extern int PsBmPutImageInCache(int gWidth, int gHeight, char *pBuffer);
-extern void PsBmClearImageCache(void);
-
-/*
- *  Functions in PsPrint.c
- */
-
-extern int PsStartJob(XpContextPtr pCon, Bool sendClientData, ClientPtr client);
-extern int PsEndJob(XpContextPtr pCon, Bool cancel);
-extern int PsStartPage(XpContextPtr pCon, WindowPtr pWin);
-extern int PsEndPage(XpContextPtr pCon, WindowPtr pWin);
-extern int PsStartDoc(XpContextPtr pCon, XPDocumentType type);
-extern int PsEndDoc(XpContextPtr pCon, Bool cancel);
-extern int PsDocumentData(XpContextPtr pCon, DrawablePtr pDraw, char *pData,
-    int len_data, char *pFmt, int len_fmt, char *pOpt, int len_opt,
-    ClientPtr client);
-extern int PsGetDocumentData(XpContextPtr pCon, ClientPtr client,
-    int maxBufferSize);
-
-/*
- *  Functions in PsGC.c
- */
-
-extern Bool PsCreateGC(GCPtr pGC);
-extern PsContextPrivPtr PsGetPsContextPriv( DrawablePtr pDrawable );
-extern int  PsUpdateDrawableGC(GCPtr pGC, DrawablePtr pDrawable,
-                               PsOutPtr *psOut, ColormapPtr *cMap);
-extern void PsValidateGC(GCPtr pGC, unsigned long changes, DrawablePtr pDrawable);
-extern void PsChangeGC(GCPtr pGC, unsigned long changes);
-extern void PsCopyGC(GCPtr pGCSrc, unsigned long mask, GCPtr pGCDst);
-extern void PsDestroyGC(GCPtr pGC);
-extern void PsChangeClip(GCPtr pGC, int type, pointer pValue, int nrects);
-extern void PsDestroyClip(GCPtr pGC);
-extern void PsCopyClip(GCPtr pgcDst, GCPtr pgcSrc);
-
-extern GCPtr PsCreateAndCopyGC(DrawablePtr pDrawable, GCPtr pSrc);
-
-/*
- *  Functions in PsMisc.c
- */
-
-extern void PsQueryBestSize(int type, short *pwidth, short *pheight,
-                            ScreenPtr pScreen);
-extern Bool PsCloseScreen(int index, ScreenPtr pScreen);
-extern void PsLineAttrs(PsOutPtr psOut, GCPtr pGC, ColormapPtr cMap);
-extern int PsGetMediumDimensions(
-    XpContextPtr pCon,
-    CARD16 *pWidth,
-    CARD16 *pHeight);
-extern int PsGetReproducibleArea(
-    XpContextPtr pCon,
-    xRectangle *pRect);
-extern int PsSetImageResolution(
-    XpContextPtr pCon,
-    int imageRes,
-    Bool *status);
-
-/*
- *  Functions in PsSpans.c
- */
-
-extern void PsFillSpans(DrawablePtr pDrawable, GCPtr pGC, int nSpans,
-                        DDXPointPtr pPoints, int *pWidths, int fSorted);
-extern void PsSetSpans(DrawablePtr pDrawable, GCPtr pGC, char *pSrc,
-                       DDXPointPtr pPoints, int *pWidths, int nSpans,
-                       int fSorted);
-
-/*
- *  Functions in PsArea.c
- */
-
-extern void PsPutScaledImage(DrawablePtr pDrawable, GCPtr pGC, int depth,
-                       int x, int y, int w, int h, int leftPad, int format,
-                       int imageRes, char *pImage);
-extern void PsPutScaledImageIM(DrawablePtr pDrawable, GCPtr pGC, int depth,
-                               int x, int y, int w, int h, int leftPad,
-                               int format, int imageRes, char *pImage);
-extern void PsPutImage(DrawablePtr pDrawable, GCPtr pGC, int depth,
-                       int x, int y, int w, int h, int leftPad, int format,
-                       char *pImage);
-extern void PsPutImageMask(DrawablePtr pDrawable, GCPtr pGC, int depth, int x, int y,
-                           int w, int h, int leftPad, int format, char *pImage);
-extern RegionPtr PsCopyArea(DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC,
-                            int srcx, int srcy, int width, int height,
-                            int dstx, int dsty);
-extern RegionPtr PsCopyPlane(DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC,
-                             int srcx, int srcy, int width, int height,
-                             int dstx, int dsty, unsigned long plane);
-
-/*
- *  Functions in PsPixel.c
- */
-
-extern void PsPolyPoint(DrawablePtr pDrawable, GCPtr pGC, int mode,
-                       int nPoints, xPoint *pPoints);
-extern void PsPushPixels(GCPtr pGC, PixmapPtr pBitmap, DrawablePtr pDrawable,
-                         int width, int height, int x, int y);
-
-/*
- *  Functions in PsLine.c
- */
-
-extern void PsPolyLine(DrawablePtr pDrawable, GCPtr pGC, int mode,
-                       int nPoints, xPoint *pPoints);
-extern void PsPolySegment(DrawablePtr pDrawable, GCPtr pGC, int nSegments,
-                          xSegment *pSegments);
-
-/*
- *  Functions in PsPolygon.c
- */
-
-extern void PsPolyRectangle(DrawablePtr pDrawable, GCPtr pGC, int nRects,
-                            xRectangle *pRects);
-extern void PsFillPolygon(DrawablePtr pDrawable, GCPtr pGC, int shape,
-                          int mode, int nPoints, DDXPointPtr pPoints);
-extern void PsPolyFillRect(DrawablePtr pDrawable, GCPtr pGC, int nRects,
-                          xRectangle *pRects);
-
-/*
- *  Functions in PsPolygon.c
- */
-
-extern void PsPolyArc(DrawablePtr pDrawable, GCPtr pGC, int nArcs,
-                            xArc *pArcs);
-extern void PsPolyFillArc(DrawablePtr pDrawable, GCPtr pGC, int nArcs,
-                            xArc *pArcs);
-
-/*
- *  Functions in PsText.c
- */
-
-extern int  PsPolyText8(DrawablePtr pDrawable, GCPtr pGC, int x, int y,
-                        int count, char *string);
-extern int  PsPolyText16(DrawablePtr pDrawable, GCPtr pGC, int x, int y,
-                         int count, unsigned short *string);
-extern void PsImageText8(DrawablePtr pDrawable, GCPtr pGC, int x, int y,
-                         int count, char *string);
-extern void PsImageText16(DrawablePtr pDrawable, GCPtr pGC, int x, int y,
-                          int count, unsigned short *string);
-extern void PsImageGlyphBlt(DrawablePtr pDrawable, GCPtr pGC, int x, int y,
-                            unsigned int nGlyphs, CharInfoPtr *pCharInfo,
-                            pointer pGlyphBase);
-extern void PsPolyGlyphBlt(DrawablePtr pDrawable, GCPtr pGC, int x, int y,
-                           unsigned int nGlyphs, CharInfoPtr *pCharInfo,
-                           pointer pGlyphBase);
-
-/*
- *  Functions in PsWindow.c
- */
-
-extern Bool PsCreateWindow(WindowPtr pWin);
-extern Bool PsMapWindow(WindowPtr pWin);
-extern Bool PsPositionWindow(WindowPtr pWin, int x, int y);
-extern Bool PsUnmapWindow(WindowPtr pWin);
-extern void PsCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg,
-                         RegionPtr prgnSrc);
-extern Bool PsChangeWindowAttributes(WindowPtr pWin, unsigned long mask);
-extern Bool PsDestroyWindow(WindowPtr pWin);
-
-/*
- *  Functions in PsFonts.c
- */
-
-extern Bool PsRealizeFont(ScreenPtr pscr, FontPtr pFont);
-extern Bool PsUnrealizeFont(ScreenPtr pscr, FontPtr pFont);
-extern char *PsGetFontName(FontPtr pFont);
-extern int PsGetFontSize(FontPtr pFont, float *mtx);
-extern char *PsGetPSFontName(FontPtr pFont);
-extern char *PsGetPSFaceOrFontName(FontPtr pFont);
-extern int PsIsISOLatin1Encoding(FontPtr pFont);
-extern char *PsGetEncodingName(FontPtr pFont);
-extern PsFontInfoRec *PsGetFontInfoRec(DrawablePtr pDrawable, FontPtr pFont);
-extern void PsFreeFontInfoRecords(PsContextPrivPtr priv);
-extern PsFTDownloadFontType PsGetFTDownloadFontType(void);
-
-/*
- *  Functions in PsFTFonts.c
- */
- 
-extern char *PsGetFTFontFileName(FontPtr pFont);
-extern Bool  PsIsFreeTypeFont(FontPtr pFont);
-
-/*
- *  Functions in PsAttr.c
- */
-
-extern char *PsGetAttributes(XpContextPtr pCon, XPAttributes pool);
-extern char *PsGetOneAttribute(XpContextPtr pCon, XPAttributes pool,
-                               char *attr);
-extern int PsAugmentAttributes(XpContextPtr pCon, XPAttributes pool,
-                               char *attrs);
-extern int PsSetAttributes(XpContextPtr pCon, XPAttributes pool, char *attrs);
-
-/*
- *  Functions in PsColor.c
- */
-
-extern Bool PsCreateColormap(ColormapPtr pColor);
-extern void PsDestroyColormap(ColormapPtr pColor);
-extern void PsInstallColormap(ColormapPtr pColor);
-extern void PsUninstallColormap(ColormapPtr pColor);
-extern int  PsListInstalledColormaps(ScreenPtr pScreen, XID *pCmapList);
-extern void PsStoreColors(ColormapPtr pColor, int ndef, xColorItem *pdefs);
-extern void PsResolveColor(unsigned short *pRed, unsigned short *pGreen,
-                           unsigned short *pBlue, VisualPtr pVisual);
-extern PsOutColor PsGetPixelColor(ColormapPtr cMap, int pixval);
-extern void PsSetFillColor(DrawablePtr pDrawable, GCPtr pGC, PsOutPtr psOut,
-                           ColormapPtr cMap);
-
-/*
- *  Functions in PsPixmap.c
- */
-
-extern PixmapPtr PsCreatePixmap(ScreenPtr pScreen, int width, int height,
-                                int depth, unsigned usage_hint);
-extern void PsScrubPixmap(PixmapPtr pPixmap);
-extern Bool PsDestroyPixmap(PixmapPtr pPixmap);
-extern DisplayListPtr PsGetFreeDisplayBlock(PsPixmapPrivPtr priv);
-extern void PsReplay(DisplayElmPtr elm, DrawablePtr pDrawable);
-extern void PsReplayPixmap(PixmapPtr pix, DrawablePtr pDrawable);
-extern int PsCloneDisplayElm(PixmapPtr dst,
-			     DisplayElmPtr elm, DisplayElmPtr newElm,
-                             int xoff, int yoff);
-extern void PsCopyDisplayList(PixmapPtr src, PixmapPtr dst, int xoff,
-                              int yoff, int x, int y, int w, int h);
-extern PsElmPtr PsCreateFillElementList(PixmapPtr pix, int *nElms);
-extern PsElmPtr PsCloneFillElementList(int nElms, PsElmPtr elms);
-extern void PsDestroyFillElementList(int nElms, PsElmPtr elms);
-
-/*
- *  Functions in PsImageUtil.c
- */
-
-extern unsigned long
-PsGetImagePixel(char *pImage, int depth, int w, int h, int leftPad, int format,
-                int px, int py);
-
-#endif  /* _PS_H_ */
diff --git a/hw/xprint/ps/PsArc.c b/hw/xprint/ps/PsArc.c
deleted file mode 100644
index 0684307..0000000
--- a/hw/xprint/ps/PsArc.c
+++ /dev/null
@@ -1,181 +0,0 @@
-/*
-
-Copyright 1996, 1998  The Open Group
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-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
-OPEN GROUP 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 name of The Open Group shall not be
-used in advertising or otherwise to promote the sale, use or other dealings
-in this Software without prior written authorization from The Open Group.
-
-*/
-/*
- * (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:		PsArc.c
-**    *
-**    *  Contents:	Arc-drawing code for the PS DDX driver
-**    *
-**    *  Created By:	Roger Helmendach (Liberty Systems)
-**    *
-**    *  Copyright:	Copyright 1996 The Open Group, Inc.
-**    *
-**    *********************************************************
-** 
-********************************************************************/
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#include <stdio.h>
-
-#include "Ps.h"
-#include "gcstruct.h"
-#include "windowstr.h"
-
-void
-PsPolyArc(
-  DrawablePtr pDrawable,
-  GCPtr       pGC,
-  int         nArcs,
-  xArc       *pArcs)
-{
-  if( pDrawable->type==DRAWABLE_PIXMAP )
-  {
-    DisplayElmPtr   elm;
-    PixmapPtr       pix  = (PixmapPtr)pDrawable;
-    PsPixmapPrivPtr priv = (PsPixmapPrivPtr)pix->devPrivate.ptr;
-    DisplayListPtr  disp;
-    GCPtr           gc;
-
-    if ((gc = PsCreateAndCopyGC(pDrawable, pGC)) == NULL) return;
-
-    disp = PsGetFreeDisplayBlock(priv);
-
-    elm  = &disp->elms[disp->nelms];
-    elm->type = PolyArcCmd;
-    elm->gc   = gc;
-    elm->c.arcs.nArcs = nArcs;
-    elm->c.arcs.pArcs = (xArc *)xalloc(nArcs*sizeof(xArc));
-    memcpy(elm->c.arcs.pArcs, pArcs, nArcs*sizeof(xArc));
-    disp->nelms += 1;
-  }
-  else
-  {
-    int         i;
-    PsOutPtr    psOut;
-    ColormapPtr cMap;
-
-    if( PsUpdateDrawableGC(pGC, pDrawable, &psOut, &cMap)==FALSE ) return;
-    PsOut_Offset(psOut, pDrawable->x, pDrawable->y);
-    PsOut_Color(psOut, PsGetPixelColor(cMap, pGC->fgPixel));
-    PsLineAttrs(psOut, pGC, cMap);
-    for( i=0 ; i<nArcs ; i++ )
-    {
-      PsOut_DrawArc(psOut, (int)pArcs[i].x, (int)pArcs[i].y,
-                    (int)pArcs[i].width, (int)pArcs[i].height,
-                    (float)pArcs[i].angle1/64.,
-                    (float)pArcs[i].angle2/64.);
-    }
-  }
-}
-
-void
-PsPolyFillArc(
-  DrawablePtr pDrawable,
-  GCPtr       pGC,
-  int         nArcs,
-  xArc       *pArcs)
-{
-  if( pDrawable->type==DRAWABLE_PIXMAP )
-  {
-    DisplayElmPtr   elm;
-    PixmapPtr       pix  = (PixmapPtr)pDrawable;
-    PsPixmapPrivPtr priv = (PsPixmapPrivPtr)pix->devPrivate.ptr;
-    DisplayListPtr  disp;
-    GCPtr           gc;
-
-    if ((gc = PsCreateAndCopyGC(pDrawable, pGC)) == NULL) return;
-
-    disp = PsGetFreeDisplayBlock(priv);
-
-    elm  = &disp->elms[disp->nelms];
-    elm->type = PolyFillArcCmd;
-    elm->gc   = gc;
-    elm->c.arcs.nArcs = nArcs;
-    elm->c.arcs.pArcs = (xArc *)xalloc(nArcs*sizeof(xArc));
-    memcpy(elm->c.arcs.pArcs, pArcs, nArcs*sizeof(xArc));
-    disp->nelms += 1;
-  }
-  else
-  {
-    int         i;
-    PsOutPtr    psOut;
-    PsArcEnum   styl;
-    ColormapPtr cMap;
-
-    if( PsUpdateDrawableGC(pGC, pDrawable, &psOut, &cMap)==FALSE ) return;
-    PsOut_Offset(psOut, pDrawable->x, pDrawable->y);
-    PsSetFillColor(pDrawable, pGC, psOut, cMap);
-    PsLineAttrs(psOut, pGC, cMap);
-    if( pGC->arcMode==ArcChord ) styl = PsChord;
-    else                         styl = PsPieSlice;
-    for( i=0 ; i<nArcs ; i++ )
-    {
-      PsOut_FillArc(psOut, (int)pArcs[i].x, (int)pArcs[i].y,
-                    (int)pArcs[i].width, (int)pArcs[i].height,
-                    (float)pArcs[i].angle1/64.,
-                    (float)pArcs[i].angle2/64., styl);
-    }
-  }
-}
diff --git a/hw/xprint/ps/PsArea.c b/hw/xprint/ps/PsArea.c
deleted file mode 100644
index 6ab9fa2..0000000
--- a/hw/xprint/ps/PsArea.c
+++ /dev/null
@@ -1,390 +0,0 @@
-/*
-
-Copyright 1996, 1998  The Open Group
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-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
-OPEN GROUP 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 name of The Open Group shall not be
-used in advertising or otherwise to promote the sale, use or other dealings
-in this Software without prior written authorization from The Open Group.
-
-*/
-/*
- * (c) Copyright 1996 Hewlett-Packard Company
- * (c) Copyright 1996 International Business Machines Corp.
- * (c) Copyright 1996, 2000 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:		PsArea.c
-**    *
-**    *  Contents:	Image and Area functions for the PS DDX driver
-**    *
-**    *  Created By:	Roger Helmendach (Liberty Systems)
-**    *
-**    *  Copyright:	Copyright 1996 The Open Group, Inc.
-**    *
-**    *********************************************************
-** 
-********************************************************************/
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#include "Ps.h"
-#include "gcstruct.h"
-#include "windowstr.h"
-
-
-void
-PsPutScaledImage(DrawablePtr pDrawable, GCPtr pGC, int depth, int x, int y,
-           int w, int h, int leftPad, int format, int imageRes, char *pImage)
-{
-  if( pDrawable->type==DRAWABLE_PIXMAP )
-  {
-    int             size = PixmapBytePad(w, depth)*h;
-    DisplayElmPtr   elm;
-    PixmapPtr       pix  = (PixmapPtr)pDrawable;
-    PsPixmapPrivPtr priv = (PsPixmapPrivPtr)pix->devPrivate.ptr;
-    DisplayListPtr  disp;
-    GCPtr           gc;   
-
-    if ((gc = PsCreateAndCopyGC(pDrawable, pGC)) == NULL) return;
-
-    disp = PsGetFreeDisplayBlock(priv);
-    elm  = &disp->elms[disp->nelms];
-    elm->type = PutImageCmd;
-    elm->gc = gc;
-    elm->c.image.depth   = depth;
-    elm->c.image.x       = x;
-    elm->c.image.y       = y;
-    elm->c.image.w       = w;
-    elm->c.image.h       = h;
-    elm->c.image.leftPad = leftPad;
-    elm->c.image.format  = format;
-    elm->c.image.res     = imageRes;
-    elm->c.image.pData   = (char *)xalloc(size);
-    memcpy(elm->c.image.pData, pImage, size);
-    disp->nelms += 1;
-  }
-  else
-  {
-    int          i, j;
-    int          r, c;
-    PsOutPtr     psOut;
-    ColormapPtr  cMap;
-    int          pageRes, sw, sh;
-
-    if( PsUpdateDrawableGC(pGC, pDrawable, &psOut, &cMap)==FALSE ) return;
-    if (!imageRes) {
-	sw = w;
-	sh = h;
-    } else {
-	pageRes = XpGetResolution(XpGetPrintContext(requestingClient));
-	sw = (float)w * (float)pageRes / (float)imageRes + 0.5;
-	sh = (float)h * (float)pageRes / (float)imageRes + 0.5;
-    }
-    PsOut_Offset(psOut, pDrawable->x, pDrawable->y);
-
-    if( depth!=1 )
-    {
-      PsOut_BeginImage(psOut, 0, 0, x, y, w, h, sw, sh, 3);
-
-      for( r=0 ; r<h ; r++ )
-      {
-        for( c=0 ; c<w ; c++ )
-        {         
-          unsigned long pv = PsGetImagePixel(pImage, depth, w, h, leftPad, format, c, r);
-          PsOutColor clr = PsGetPixelColor(cMap, pv);
-          /* XXX: This needs to be fixed for endian swapping and to support
-           * depths deeper than 8bit per R-,G-,B-gun... */
-          unsigned long val = PSOUTCOLOR_TO_RGB24BIT(clr);
-          char      *ipt = (char *)&val;
-/* XXX: Is this the right way to detect the platform endianess ? */
-#if IMAGE_BYTE_ORDER == LSBFirst
-          {
-            long l;
-            swapl(&val, l);
-          }
-#elif IMAGE_BYTE_ORDER == MSBFirst
-#else
-#error Unsupported byte order
-#endif
-          PsOut_OutImageBytes(psOut, 3, &ipt[1]);
-        }
-      }
-
-      PsOut_EndImage(psOut);
-    }
-    else
-    {
-      int  rowsiz = BitmapBytePad(w);
-      int  psrsiz = (w+7)/8;
-      PsOut_BeginImage(psOut, PsGetPixelColor(cMap, pGC->bgPixel),
-                       PsGetPixelColor(cMap, pGC->fgPixel),
-                       x, y, w, h, sw, sh, 1);
-      for( r=0 ; r<h ; r++ )
-      {
-        char *pt = &pImage[rowsiz*r];
-        for( i=0 ; i<psrsiz ; i++ )
-        {
-          int  iv_, iv = (int)pt[i]&0xFF;
-          char c;
-/* XXX: Is this the right way to detect the platform endianess ? */
-#if IMAGE_BYTE_ORDER == LSBFirst
-          { for( j=0,iv_=0 ; j<8 ; j++ ) iv_ |= (((iv>>j)&1)<<(7-j)); }
-#elif IMAGE_BYTE_ORDER == MSBFirst
-          iv_ = iv;
-#else
-#error Unsupported byte order
-#endif
-          c = iv_;
-          PsOut_OutImageBytes(psOut, 1, &c);
-        }
-      }
-      PsOut_EndImage(psOut);
-    }
-  }
-}
-
-void
-PsPutScaledImageIM(DrawablePtr pDrawable, GCPtr pGC, int depth, int x, int y,
-           int w, int h, int leftPad, int format, int imageRes, char *pImage)
-{
-  if( pDrawable->type==DRAWABLE_PIXMAP )
-  {
-    int             size = PixmapBytePad(w, depth)*h;
-    DisplayElmPtr   elm;
-    PixmapPtr       pix  = (PixmapPtr)pDrawable;
-    PsPixmapPrivPtr priv = (PsPixmapPrivPtr)pix->devPrivate.ptr;
-    DisplayListPtr  disp;
-    GCPtr           gc;
-
-    if ((gc = PsCreateAndCopyGC(pDrawable, pGC)) == NULL) return;
-
-    disp = PsGetFreeDisplayBlock(priv);
-    elm  = &disp->elms[disp->nelms];
-    elm->type = PutImageCmd;
-    elm->gc = gc;
-    elm->c.image.depth   = depth;
-    elm->c.image.x       = x;
-    elm->c.image.y       = y;
-    elm->c.image.w       = w;
-    elm->c.image.h       = h;
-    elm->c.image.leftPad = leftPad;
-    elm->c.image.format  = format;
-    elm->c.image.res     = imageRes;
-    elm->c.image.pData   = (char *)xalloc(size);
-    memcpy(elm->c.image.pData, pImage, size);
-    disp->nelms += 1;
-  }
-  else
-  {
-    int          i, j;
-    int          r, c;
-    PsOutPtr     psOut;
-    ColormapPtr  cMap;
-    int          pageRes, sw, sh;
-#ifdef BM_CACHE
-    long	 cache_id = 0;
-#endif
-
-    if( PsUpdateDrawableGC(pGC, pDrawable, &psOut, &cMap)==FALSE ) return;
-    if (!imageRes) {
-        sw = w;
-        sh = h;
-    } else {
-        pageRes = XpGetResolution(XpGetPrintContext(requestingClient));
-        sw = (float)w * (float)pageRes / (float)imageRes + 0.5;
-        sh = (float)h * (float)pageRes / (float)imageRes + 0.5;
-    }
-    PsOut_Offset(psOut, pDrawable->x, pDrawable->y);
-
-#ifdef BM_CACHE
-    cache_id = PsBmIsImageCached(w, h, pImage);
-
-    if(!cache_id)
-    {
-      cache_id = PsBmPutImageInCache(w, h, pImage);
-
-      if(!cache_id)
-         return;
-
-      PsOut_BeginImageCache(psOut, cache_id);
-#endif
-      if( depth!=1 )
-      {
-        PsOut_BeginImageIM(psOut, 0, 0, x, y, w, h, sw, sh, 3);
-
-        for( r=0 ; r<h ; r++ )
-        {
-          for( c=0 ; c<w ; c++ )
-          {         
-            unsigned long pv = PsGetImagePixel(pImage, depth, w, h, leftPad, format, c, r);
-            PsOutColor clr = PsGetPixelColor(cMap, pv);
-            /* XXX: This needs to be fixed for endian swapping and to support
-             * depths deeper than 8bit per R-,G-,B-gun... */
-            unsigned long val = PSOUTCOLOR_TO_RGB24BIT(clr);
-            char      *ipt = (char *)&val;
-/* XXX: Is this the right way to detect the platform endianess ? */
-#if IMAGE_BYTE_ORDER == LSBFirst
-          {
-            long l;
-            swapl(&val, l);
-          }
-#elif IMAGE_BYTE_ORDER == MSBFirst
-#else
-#error Unsupported byte order
-#endif
-            PsOut_OutImageBytes(psOut, 3, &ipt[1]);
-          }
-        }
-
-        PsOut_EndImage(psOut);
-      }
-      else
-      {
-        int  rowsiz = BitmapBytePad(w);
-        int  psrsiz = (w+7)/8;
-        PsOut_BeginImageIM(psOut, PsGetPixelColor(cMap, pGC->bgPixel),
-                           PsGetPixelColor(cMap, pGC->fgPixel),
-                           x, y, w, h, sw, sh, 1);
-        for( r=0 ; r<h ; r++ )
-        {
-          char *pt = &pImage[rowsiz*r];
-          for( i=0 ; i<psrsiz ; i++ )
-          {
-            int  iv_, iv = (int)pt[i]&0xFF;
-            char c;
-/* XXX: Is this the right way to detect the platform endianess ? */
-#if IMAGE_BYTE_ORDER == LSBFirst
-            { for( j=0,iv_=0 ; j<8 ; j++ ) iv_ |= (((iv>>j)&1)<<(7-j)); }
-#elif IMAGE_BYTE_ORDER == MSBFirst
-            iv_ = iv;
-#else
-#error Unsupported byte order
-#endif
-            c = iv_;
-            PsOut_OutImageBytes(psOut, 1, &c);
-          }
-        }
-        PsOut_EndImage(psOut);
-      }
-#ifdef BM_CACHE
-      PsOut_EndImageCache(psOut);
-    }
-    PsOut_ImageCache(psOut, x, y, cache_id, PsGetPixelColor(cMap, pGC->bgPixel),
-                           PsGetPixelColor(cMap, pGC->fgPixel));
-#endif
-  }
-}
-void
-PsPutImage(DrawablePtr pDrawable, GCPtr pGC, int depth, int x, int y,
-           int w, int h, int leftPad, int format, char *pImage)
-{
-    XpContextPtr pcon;
-    if (requestingClient && (pcon = XpGetPrintContext(requestingClient)))
-	PsPutScaledImage(pDrawable, pGC, depth, x, y, w, h, leftPad, format,
-			 pcon->imageRes, pImage);
-}
-void
-PsPutImageMask(DrawablePtr pDrawable, GCPtr pGC, int depth, int x, int y,
-           int w, int h, int leftPad, int format, char *pImage)
-{
-    XpContextPtr pcon;
-    if (requestingClient && (pcon = XpGetPrintContext(requestingClient)))
-        PsPutScaledImageIM(pDrawable, pGC, depth, x, y, w, h, leftPad, format,
-                         pcon->imageRes, pImage);
-}
-
-RegionPtr
-PsCopyArea(DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC, int srcx, int srcy,
-           int width, int height, int dstx, int dsty)
-{
-  PixmapPtr  src = (PixmapPtr)pSrc;
-  PixmapPtr  dst = (PixmapPtr)pDst;
-
-  if( pSrc->type!=DRAWABLE_PIXMAP ) return NULL;
-  if( pDst->type!=DRAWABLE_PIXMAP )
-  {
-    PsOutPtr     psOut;
-    ColormapPtr  cMap;
-    if( PsUpdateDrawableGC(pGC, pDst, &psOut, &cMap)==FALSE ) return NULL;
-    PsOut_Offset(psOut, pDst->x, pDst->y);
-    PsOut_BeginFrame(psOut, dstx-srcx, dsty-srcy, dstx, dsty, width, height);
-    PsReplayPixmap(src, pDst);
-    PsOut_EndFrame(psOut);
-  }
-  else PsCopyDisplayList(src, dst, dstx-srcx, dsty-srcy, dstx, dsty,
-                         width, height);
-  return NULL;
-}
-
-RegionPtr
-PsCopyPlane(DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC, int srcx, int srcy,
-            int width, int height, int dstx, int dsty, unsigned long plane)
-{
-  PixmapPtr  src = (PixmapPtr)pSrc;
-  PixmapPtr  dst = (PixmapPtr)pDst;
-
-  if( pSrc->type!=DRAWABLE_PIXMAP ) return NULL;
-  if( pDst->type!=DRAWABLE_PIXMAP )
-  {
-    PsOutPtr     psOut;
-    ColormapPtr  cMap;
-    if( PsUpdateDrawableGC(pGC, pDst, &psOut, &cMap)==FALSE ) return NULL;
-    PsOut_Offset(psOut, pDst->x, pDst->y);
-    PsOut_BeginFrame(psOut, dstx-srcx, dsty-srcy, dstx, dsty, width, height);
-    PsReplayPixmap(src, pDst);
-    PsOut_EndFrame(psOut);
-  }
-  else PsCopyDisplayList(src, dst, dstx-srcx, dsty-srcy, dstx, dsty,
-                         width, height);
-  return NULL;
-}
diff --git a/hw/xprint/ps/PsAttVal.c b/hw/xprint/ps/PsAttVal.c
deleted file mode 100644
index de2e6c8..0000000
--- a/hw/xprint/ps/PsAttVal.c
+++ /dev/null
@@ -1,289 +0,0 @@
-/*
- */
-/*
-(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.
-*/
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#include "Ps.h"
-#include "AttrValid.h"
-
-/*
- * define valid values and defaults for Printer pool
- */
-static XpOid ValidContentOrientationsOids[] = {
-    xpoid_val_content_orientation_portrait,
-    xpoid_val_content_orientation_landscape,
-    xpoid_val_content_orientation_reverse_portrait,
-    xpoid_val_content_orientation_reverse_landscape 
-};
-static XpOidList ValidContentOrientations = {
-    ValidContentOrientationsOids, XpNumber(ValidContentOrientationsOids)
-};
-
-static XpOid DefaultContentOrientationsOids[] = {
-    xpoid_val_content_orientation_portrait,
-    xpoid_val_content_orientation_landscape
-};
-static XpOidList DefaultContentOrientations = {
-    DefaultContentOrientationsOids, XpNumber(DefaultContentOrientationsOids)
-};
-
-static XpOid ValidPlexesOids[] = {
-    xpoid_val_plex_simplex, xpoid_val_plex_duplex, xpoid_val_plex_tumble
-};
-static XpOidList ValidPlexes = {
-    ValidPlexesOids, XpNumber(ValidPlexesOids)
-};
-
-static XpOid DefaultPlexesOids[] = {
-    xpoid_val_plex_simplex
-};
-static XpOidList DefaultPlexes = {
-    DefaultPlexesOids, XpNumber(DefaultPlexesOids)
-};
-
-static unsigned long ValidPrinterResolutionsCards[] = {
-    75,
-    100,
-    120,
-    150,
-    180,
-    200,
-    240,
-    300,
-    360,
-    400,
-    600,
-    720,
-    940,
-    1200,
-    1440,
-    2400
-};
-static XpOidCardList ValidPrinterResolutions = {
-    ValidPrinterResolutionsCards, XpNumber(ValidPrinterResolutionsCards)
-};
-
-static unsigned long DefaultPrinterResolutionsCards[] = {
-     75,
-     100,
-     120,
-     150,
-     180,
-     200,
-     240,
-     300,
-     360,
-     400,
-     600,
-     720,
-     940,
-     1200
-};
-static XpOidCardList DefaultPrinterResolutions = {
-    DefaultPrinterResolutionsCards, XpNumber(DefaultPrinterResolutionsCards)
-};
-
-static XpOid ValidListfontsModesOids[] = {
-    xpoid_val_xp_list_internal_printer_fonts, xpoid_val_xp_list_glyph_fonts
-};
-static XpOidList ValidListfontsModes = {
-    ValidListfontsModesOids, XpNumber(ValidListfontsModesOids)
-};
-
-static XpOid DefaultListfontsModesOids[] = {
-    xpoid_val_xp_list_glyph_fonts
-};
-static XpOidList DefaultListfontsModes = {
-    DefaultListfontsModesOids, XpNumber(DefaultListfontsModesOids)
-};
-
-static XpOid ValidSetupProvisoOids[] = {
-    xpoid_val_xp_setup_mandatory, xpoid_val_xp_setup_optional
-};
-static XpOidList ValidSetupProviso = {
-
-
-    ValidSetupProvisoOids, XpNumber(ValidSetupProvisoOids)
-};
-
-static XpOidDocFmt ValidDocFormatsSupportedFmts[] = {
-    { "Postscript", "2", NULL }
-};
-static XpOidDocFmtList ValidDocFormatsSupported = {
-    ValidDocFormatsSupportedFmts, XpNumber(ValidDocFormatsSupportedFmts)
-};
-
-static XpOidDocFmt DefaultDocFormatsSupportedFmts[] = {
-    { "Postscript", "2", NULL }
-};
-static XpOidDocFmtList DefaultDocFormatsSupported = {
-    DefaultDocFormatsSupportedFmts, XpNumber(DefaultDocFormatsSupportedFmts)
-};
-
-static XpOidDocFmt ValidEmbeddedFormatsSupportedFmts[] = {
-    { "Postscript", "2", NULL }
-};
-static XpOidDocFmtList ValidEmbeddedFormatsSupported = {
-    ValidEmbeddedFormatsSupportedFmts, XpNumber(ValidEmbeddedFormatsSupportedFmts)
-};
-
-static XpOidDocFmt DefaultEmbeddedFormatsSupportedFmts[] = {
-    { "Postscript", "2", NULL }
-};
-static XpOidDocFmtList DefaultEmbeddedFormatsSupported = {
-    DefaultEmbeddedFormatsSupportedFmts, XpNumber(DefaultEmbeddedFormatsSupportedFmts)
-};
-
-static XpOidDocFmt ValidRawFormatsSupportedFmts[] = {
-    { "Postscript", "2", NULL }
-    
-};
-static XpOidDocFmtList ValidRawFormatsSupported = {
-    ValidRawFormatsSupportedFmts, XpNumber(ValidRawFormatsSupportedFmts)
-};
-
-static XpOidDocFmt DefaultRawFormatsSupportedFmts[] = {
-    { "Postscript", "2", NULL }
-};
-static XpOidDocFmtList DefaultRawFormatsSupported = {
-    DefaultRawFormatsSupportedFmts, XpNumber(DefaultRawFormatsSupportedFmts)
-};
-
-static XpOid ValidInputTraysOids[] = {
-    xpoid_val_input_tray_manual,
-    xpoid_val_input_tray_main,
-    xpoid_val_input_tray_envelope,
-    xpoid_val_input_tray_large_capacity,
-    xpoid_val_input_tray_bottom
-};
-static XpOidList ValidInputTrays = {
-    ValidInputTraysOids, XpNumber(ValidInputTraysOids)
-};
-
-static XpOid ValidMediumSizesOids[] = {
-    xpoid_val_medium_size_iso_a0,
-    xpoid_val_medium_size_iso_a1,
-    xpoid_val_medium_size_iso_a2,
-    xpoid_val_medium_size_iso_a3,
-    xpoid_val_medium_size_iso_a4,
-    xpoid_val_medium_size_iso_a5,
-    xpoid_val_medium_size_iso_a6,
-    xpoid_val_medium_size_iso_a7,
-    xpoid_val_medium_size_iso_a8,
-    xpoid_val_medium_size_iso_a9,
-    xpoid_val_medium_size_iso_a10,
-    xpoid_val_medium_size_iso_b0,
-    xpoid_val_medium_size_iso_b1,
-    xpoid_val_medium_size_iso_b2,
-    xpoid_val_medium_size_iso_b3,
-    xpoid_val_medium_size_iso_b4,
-    xpoid_val_medium_size_iso_b5,
-    xpoid_val_medium_size_iso_b6,
-    xpoid_val_medium_size_iso_b7,
-    xpoid_val_medium_size_iso_b8,
-    xpoid_val_medium_size_iso_b9,
-    xpoid_val_medium_size_iso_b10,
-    xpoid_val_medium_size_na_letter,
-    xpoid_val_medium_size_na_legal,
-    xpoid_val_medium_size_executive,
-    xpoid_val_medium_size_folio,
-    xpoid_val_medium_size_invoice,
-    xpoid_val_medium_size_ledger,
-    xpoid_val_medium_size_quarto,
-    xpoid_val_medium_size_iso_c3,
-    xpoid_val_medium_size_iso_c4,
-    xpoid_val_medium_size_iso_c5,
-    xpoid_val_medium_size_iso_c6,
-    xpoid_val_medium_size_iso_designated_long,
-    xpoid_val_medium_size_na_10x13_envelope,
-    xpoid_val_medium_size_na_9x12_envelope,
-    xpoid_val_medium_size_na_number_10_envelope,
-    xpoid_val_medium_size_na_7x9_envelope,
-    xpoid_val_medium_size_na_9x11_envelope,
-    xpoid_val_medium_size_na_10x14_envelope,
-    xpoid_val_medium_size_na_number_9_envelope,
-    xpoid_val_medium_size_na_6x9_envelope,
-    xpoid_val_medium_size_na_10x15_envelope,
-    xpoid_val_medium_size_monarch_envelope,
-    xpoid_val_medium_size_a,
-    xpoid_val_medium_size_b,
-    xpoid_val_medium_size_c,
-    xpoid_val_medium_size_d,
-    xpoid_val_medium_size_e,
-    xpoid_val_medium_size_jis_b0,
-    xpoid_val_medium_size_jis_b1,
-    xpoid_val_medium_size_jis_b2,
-    xpoid_val_medium_size_jis_b3,
-    xpoid_val_medium_size_jis_b4,
-    xpoid_val_medium_size_jis_b5,
-    xpoid_val_medium_size_jis_b6,
-    xpoid_val_medium_size_jis_b7,
-    xpoid_val_medium_size_jis_b8,
-    xpoid_val_medium_size_jis_b9,
-    xpoid_val_medium_size_jis_b10,
-    xpoid_val_medium_size_hp_2x_postcard,
-    xpoid_val_medium_size_hp_european_edp,
-    xpoid_val_medium_size_hp_mini,
-    xpoid_val_medium_size_hp_postcard,
-    xpoid_val_medium_size_hp_tabloid,
-    xpoid_val_medium_size_hp_us_edp,
-    xpoid_val_medium_size_hp_us_government_legal,
-    xpoid_val_medium_size_hp_us_government_letter,
-};
-static XpOidList ValidMediumSizes = {
-    ValidMediumSizesOids, XpNumber(ValidMediumSizesOids)
-};
-
-static XpOidDocFmt DefaultDocumentFormat = {
-    "Postscript", "2", NULL
-};
-
-
-/*
- * init struct for XpValidate*Pool
- */
-XpValidatePoolsRec PsValidatePoolsRec = {
-    &ValidContentOrientations, &DefaultContentOrientations,
-    &ValidDocFormatsSupported, &DefaultDocFormatsSupported,
-    &ValidInputTrays, &ValidMediumSizes,
-    &ValidPlexes, &DefaultPlexes,
-    &ValidPrinterResolutions, &DefaultPrinterResolutions,
-    &ValidEmbeddedFormatsSupported, &DefaultEmbeddedFormatsSupported,
-    &ValidListfontsModes, &DefaultListfontsModes,
-    &ValidRawFormatsSupported, &DefaultRawFormatsSupported,
-    &ValidSetupProviso,
-    &DefaultDocumentFormat
-};
diff --git a/hw/xprint/ps/PsAttr.c b/hw/xprint/ps/PsAttr.c
deleted file mode 100644
index 0925716..0000000
--- a/hw/xprint/ps/PsAttr.c
+++ /dev/null
@@ -1,116 +0,0 @@
-/*
-
-Copyright 1996, 1998  The Open Group
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-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
-OPEN GROUP 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 name of The Open Group shall not be
-used in advertising or otherwise to promote the sale, use or other dealings
-in this Software without prior written authorization from The Open Group.
-
-*/
-/*
- * (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:		PsAttr.c
-**    *
-**    *  Contents:	Attribute-handling functions for the PS driver
-**    *
-**    *  Created By:	Roger Helmendach (Liberty Systems)
-**    *
-**    *  Copyright:	Copyright 1996 The Open Group, Inc.
-**    *
-**    *********************************************************
-** 
-********************************************************************/
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#include "Ps.h"
-#include "attributes.h"
-
-char *
-PsGetAttributes(
-  XpContextPtr pCon,
-  XPAttributes pool)
-{
-  return XpGetAttributes(pCon, pool);
-}
-
-char *
-PsGetOneAttribute(
-  XpContextPtr  pCon,
-  XPAttributes  pool,
-  char         *attr)
-{
-  return XpGetOneAttribute(pCon, pool, attr);
-}
-
-int
-PsAugmentAttributes(
-  XpContextPtr  pCon,
-  XPAttributes  pool,
-  char         *attrs)
-{
-  return XpAugmentAttributes(pCon, pool, attrs);
-}
-
-int
-PsSetAttributes(
-  XpContextPtr  pCon,
-  XPAttributes  pool,
-  char         *attrs)
-{
-  return XpSetAttributes(pCon, pool, attrs);
-}
diff --git a/hw/xprint/ps/PsCache.c b/hw/xprint/ps/PsCache.c
deleted file mode 100644
index 5c823a1..0000000
--- a/hw/xprint/ps/PsCache.c
+++ /dev/null
@@ -1,328 +0,0 @@
-/*
-
-Copyright 1996, 1998  The Open Group
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-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
-OPEN GROUP 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 name of The Open Group shall not be
-used in advertising or otherwise to promote the sale, use or other dealings
-in this Software without prior written authorization from The Open Group.
-
-*/
-/*
- * (c) Copyright 1996 Hewlett-Packard Company
- * (c) Copyright 1996 International Business Machines Corp.
- * (c) Copyright 1996, 2000 Sun Microsystems, Inc.  All Rights Reserved.
- * (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:          PsCache.c
-**    *
-**    *  Contents:      Character-caching routines
-**    *
-**    *  Created By:    Jay Hobson (Sun MicroSystems)
-**    *
-**    *  Copyright:     Copyright 1996 The Open Group, Inc.
-**    *
-**    *********************************************************
-**
-********************************************************************/
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#include "Ps.h"
-#include "gcstruct.h"
-#include "windowstr.h"
-#include <X11/fonts/fntfil.h>
-#include <X11/fonts/fntfilst.h>
-
-#define  GET	0
-#define  RESET	1
-
-struct bm_cache_list {
-	struct bm_cache_list *next;
-	struct bm_cache_list *prev;
-        int                   height;
-	long	              id;
-        char                 *pBuffer;
-};
-
-struct bm_cache_head {
-	struct bm_cache_list *head;
-	int		      width;
-	struct bm_cache_head *next;
-        struct bm_cache_head *prev;
-};
-
-static struct bm_cache_head *bm_cache = NULL;
-
-static long
-PsBmUniqueId(int func)
-{
-    static long unique_id = 0;
-
-    if(func == RESET)
-    {
-	unique_id = 0;
-	return 0;
-    }
-    else
-	return ++unique_id;
-}
-
-int 
-PsBmIsImageCached(
-    int gWidth,
-    int gHeight,
-    char *pBuffer)
-{
-    int return_val = 0;
-    struct bm_cache_head *pList = bm_cache;
-
-    while(pList != NULL && !return_val)
-    {
-        if(pList->width == gWidth)
-        {
-	    struct bm_cache_list *pItem = pList->head;
-
-	    while(pItem != NULL)
-	    {
-	        if(pItem->height == gHeight)
-	        {
-		    int length = 4*(gWidth/32+(gWidth%32!=0))*gHeight;
-
-	            if(!memcmp(pItem->pBuffer, pBuffer, sizeof(char)*length))
-	            {
-		        return_val = pItem->id;
-		        break;
-	            }
-	        }
-		else if(pItem->height > gHeight)
-		    break;
-
-	        pItem = pItem->next;
-	    }
-        }
-	else if(pList->width > gWidth)
-	    break;
-
-        pList = pList->next;
-    }
-    return return_val;
-}
-
-int
-PsBmPutImageInCache(
-    int gWidth,
-    int gHeight,
-    char *pBuffer)
-{
-    int return_val = 0;
-    struct bm_cache_head *pList = bm_cache;
-    struct bm_cache_list *pNew;
-    int length = 4*(gWidth/32+(gWidth%32!=0))*gHeight;
-
-    if(gWidth == 1 && gHeight == 1 && pBuffer[0] == 0)
-        return return_val;
-
-    pNew = (struct bm_cache_list *)malloc(sizeof(struct bm_cache_list));
-    pNew->next    = NULL;
-    pNew->prev    = NULL;
-    pNew->height  = gHeight;
-    pNew->id      = PsBmUniqueId(GET);
-    pNew->pBuffer = (char *)malloc(sizeof(char)*length);
-
-    memcpy(pNew->pBuffer, pBuffer, length);
-
-    while(pList != NULL)
-    {
-        if(pList->width == gWidth)
-	{
-	    struct bm_cache_list *pItem = pList->head;
-
-	    while(pItem != NULL)
-	    {
-		if(pItem->height >= gHeight)
-		{
-		    pNew->next = pItem;
-		    pNew->prev = pItem->prev;
-		    if(pItem->prev != NULL)
-		       pItem->prev->next = pNew;
-                    else
-		       pList->head = pNew;
-                    pItem->prev = pNew;
-
-		    return_val = pNew->id;
-
-		    break;
-		}
-		else if(pItem->next == NULL)
-		{
-		    pNew->prev = pItem;
-		    pItem->next = pNew;
-
-		    return_val = pNew->id;
-
-		    break;
-		}
-
-		pItem = pItem->next;
-	    }
-
-	    break;
-        }
-
-        pList = pList->next;
-    }
-
-    if(pList == NULL)
-    {
-        struct bm_cache_head *pNewList;
-
-        pNewList = (struct bm_cache_head *)malloc(sizeof(struct bm_cache_head));
- 
-        pNewList->next  = NULL;
-        pNewList->prev  = NULL;
-        pNewList->width = gWidth;
-        pNewList->head  = pNew;
- 
-        if(bm_cache == NULL)
-        {
-	    bm_cache = pNewList;
-	    return_val = pNew->id;
-        }
-        else
-        {
- 	    pList = bm_cache;
-
-	    while(pList != NULL)
-	    {
-	        if(pList->width > gWidth)
-		{
-		    pNewList->next  = pList;
-		    pNewList->prev  = pList->prev;
-
-		    if(pList->prev != NULL)
-		       pList->prev->next = pNewList;
-                    else
-		       bm_cache = pNewList;
-		    pList->prev = pNewList;
-
-		    return_val = pNew->id;
-
-		    break;
-		}
-		else if(pList->next == NULL)
-                {
-		    pNewList->prev  = pList;
-		    pList->next = pNewList;
-
-		    return_val = pNew->id;
-
-		    break;
-		}
-
-		pList = pList->next;
-	    }
-        }
-    }
-
-    return return_val;
-}
-
-
-static void
-PsBmClearImageCacheItem(
-    struct bm_cache_list *pItem)
-{
-    if(pItem != NULL)
-    {
-	if(pItem->pBuffer != NULL)
-	   free(pItem->pBuffer);
-        pItem->pBuffer = NULL;
-
-	if(pItem->next)
-	   PsBmClearImageCacheItem(pItem->next);
-        pItem->next = NULL;
-
-	free(pItem);
-	pItem = NULL;
-    }
-}
-
-static void 
-PsBmClearImageCacheList(
-    struct bm_cache_head *pList)
-{
-    if(pList != NULL)
-    {
-	if(pList->head)
-	    PsBmClearImageCacheItem(pList->head);
-        pList->head = NULL;
-
-	if(pList->next)
-	    PsBmClearImageCacheList(pList->next);
-        pList->next = NULL;
-
-	free(pList);
-	pList = NULL;
-    }
-}
-
-void
-PsBmClearImageCache(void)
-{
-   PsBmClearImageCacheList(bm_cache);
-
-   bm_cache = NULL;
-
-   PsBmUniqueId(RESET);
-}
-
diff --git a/hw/xprint/ps/PsColor.c b/hw/xprint/ps/PsColor.c
deleted file mode 100644
index a91272d..0000000
--- a/hw/xprint/ps/PsColor.c
+++ /dev/null
@@ -1,257 +0,0 @@
-/*
-
-Copyright 1996, 1998  The Open Group
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-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
-OPEN GROUP 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 name of The Open Group shall not be
-used in advertising or otherwise to promote the sale, use or other dealings
-in this Software without prior written authorization from The Open Group.
-
-*/
-/*
- * (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:		PsColor.c
-**    *
-**    *  Contents:	Color routines for the PS driver
-**    *
-**    *  Created By:	Roger Helmendach (Liberty Systems)
-**    *
-**    *  Copyright:	Copyright 1996 The Open Group, Inc.
-**    *
-**    *********************************************************
-** 
-********************************************************************/
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#include "Ps.h"
-#include "mi.h"
-#include "micmap.h"
-#include "gcstruct.h"
-#include "windowstr.h"
-#include "colormapst.h"
-
-Bool
-PsCreateColormap(ColormapPtr pColor)
-{
-  return miInitializeColormap(pColor);
-}
-
-void
-PsDestroyColormap(ColormapPtr pColor)
-{
-  /* NO-OP */
-}
-
-void
-PsInstallColormap(ColormapPtr pColor)
-{
-  miInstallColormap(pColor);
-}
-
-void
-PsUninstallColormap(ColormapPtr pColor)
-{
-  miUninstallColormap(pColor);
-}
-
-int
-PsListInstalledColormaps(
-  ScreenPtr pScreen,
-  XID      *pCmapList)
-{
-  return miListInstalledColormaps(pScreen, pCmapList);
-}
-
-void
-PsStoreColors(
-  ColormapPtr  pColor,
-  int          ndef,
-  xColorItem  *pdefs)
-{
-  int  i;
-  for( i=0 ; i<ndef ; i++ )
-  {
-    if( pdefs[i].flags&DoRed )
-      pColor->red[pdefs[i].pixel].co.local.red   = pdefs[i].red;
-    if( pdefs[i].flags&DoGreen )
-      pColor->red[pdefs[i].pixel].co.local.green = pdefs[i].green;
-    if( pdefs[i].flags&DoBlue )
-      pColor->red[pdefs[i].pixel].co.local.blue  = pdefs[i].blue;
-  }
-}
-
-void
-PsResolveColor(
-  unsigned short *pRed,
-  unsigned short *pGreen,
-  unsigned short *pBlue,
-  VisualPtr       pVisual)
-{
-  miResolveColor(pRed, pGreen, pBlue, pVisual);
-}
-
-PsOutColor
-PsGetPixelColor(ColormapPtr cMap, int pixval)
-{
-  VisualPtr v = cMap->pVisual;
-  switch( v->class )
-  {
-    case TrueColor:
-    {
-        PsOutColor p = pixval;       
-        PsOutColor r, g, b;
-
-        r = (p & v->redMask)   >> v->offsetRed;
-        g = (p & v->greenMask) >> v->offsetGreen;
-        b = (p & v->blueMask)  >> v->offsetBlue;
-
-        r = cMap->red[r].co.local.red;
-        g = cMap->green[g].co.local.green;
-        b = cMap->blue[b].co.local.blue;
-                
-#ifdef PSOUT_USE_DEEPCOLOR
-        return((r<<32)|(g<<16)|b);
-#else
-        r >>= 8;
-        g >>= 8;
-        b >>= 8;
-
-        return((r<<16)|(g<<8)|b);
-#endif /* PSOUT_USE_DEEPCOLOR */
-    }
-    case PseudoColor:
-    case GrayScale:
-    case StaticGray:
-    {
-        PsOutColor r, g, b;
-                  
-        if( pixval < 0 || pixval > v->ColormapEntries)
-          return(0);
-
-        r = cMap->red[pixval].co.local.red;
-        g = cMap->red[pixval].co.local.green;
-        b = cMap->red[pixval].co.local.blue;
-
-        if ((v->class | DynamicClass) == GrayScale)
-        {
-          /* rescale to gray (see |miResolveColor()|) */
-          r = g = b = (30L*r + 59L*g + 11L*b) / 100L;
-        }
-        
-#ifdef PSOUT_USE_DEEPCOLOR
-        return((r<<32)|(g<<16)|b);
-#else
-        r >>= 8;
-        g >>= 8;
-        b >>= 8;
-
-        return((r<<16)|(g<<8)|b);
-#endif /* PSOUT_USE_DEEPCOLOR */
-    }
-    default:
-        FatalError("PsGetPixelColor: Unsupported visual %x\n",
-                   (int)cMap->pVisual->class);
-        break;
-  }
-  
-  return 0; /* NO-OP*/
-}
-
-void
-PsSetFillColor(DrawablePtr pDrawable, GCPtr pGC, PsOutPtr psOut,
-               ColormapPtr cMap)
-{
-  switch(pGC->fillStyle)
-  {
-    case FillSolid:
-      PsOut_Color(psOut, PsGetPixelColor(cMap, pGC->fgPixel));
-      break;
-    case FillTiled:
-      if( !PsOut_BeginPattern(psOut, pGC->tile.pixmap,
-             pGC->tile.pixmap->drawable.width,
-             pGC->tile.pixmap->drawable.height, PsTile, 0, 0) )
-      {
-        PsReplayPixmap(pGC->tile.pixmap, pDrawable);
-        PsOut_EndPattern(psOut);
-      }
-      PsOut_SetPattern(psOut, pGC->tile.pixmap, PsTile);
-      break;
-    case FillStippled:
-      if( !PsOut_BeginPattern(psOut, pGC->stipple,
-             pGC->stipple->drawable.width,
-             pGC->stipple->drawable.height, PsStip, 0,
-             PsGetPixelColor(cMap, pGC->fgPixel)) )
-      {
-        PsReplayPixmap(pGC->stipple, pDrawable);
-        PsOut_EndPattern(psOut);
-      }
-      PsOut_SetPattern(psOut, pGC->stipple, PsStip);
-      break;
-    case FillOpaqueStippled:
-      if( !PsOut_BeginPattern(psOut, pGC->stipple,
-             pGC->stipple->drawable.width,
-             pGC->stipple->drawable.height, PsOpStip,
-             PsGetPixelColor(cMap, pGC->bgPixel),
-             PsGetPixelColor(cMap, pGC->fgPixel)) )
-      {
-        PsReplayPixmap(pGC->stipple, pDrawable);
-        PsOut_EndPattern(psOut);
-      }
-      PsOut_SetPattern(psOut, pGC->stipple, PsOpStip);
-      break;
-  }
-}
diff --git a/hw/xprint/ps/PsDef.h b/hw/xprint/ps/PsDef.h
deleted file mode 100644
index 5af274d..0000000
--- a/hw/xprint/ps/PsDef.h
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
-
-Copyright 1996, 1998  The Open Group
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-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
-OPEN GROUP 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 name of The Open Group shall not be
-used in advertising or otherwise to promote the sale, use or other dealings
-in this Software without prior written authorization from The Open Group.
-
-*/
-/*
- * (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:		PsDef.h
-**    *
-**    *  Contents:  extran defines and includes for the Ps driver
-**    *             for a printing X server.
-**    *
-**    *  Created By:	Roger Helmendach (Liberty Systems)
-**    *
-**    *  Copyright:	Copyright 1996 The Open Group, Inc.
-**    *
-**    *********************************************************
-** 
-********************************************************************/
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#ifndef _PSDEF_H_
-#define _PSDEF_H_
-
-#define DT_PRINT_JOB_HEADER "DT_PRINT_JOB_HEADER"
-#define DT_PRINT_JOB_TRAILER "DT_PRINT_JOB_TRAILER"
-#define DT_PRINT_JOB_COMMAND "DT_PRINT_JOB_COMMAND"
-#define DT_PRINT_JOB_EXEC_COMMAND "DT_PRINT_JOB_EXEC_COMMAND"
-#define DT_PRINT_JOB_EXEC_OPTIONS "DT_PRINT_JOB_EXEC_OPTION"
-#define DT_PRINT_PAGE_HEADER "DT_PRINT_PAGE_HEADER"
-#define DT_PRINT_PAGE_TRAILER "DT_PRINT_PAGE_TRAILER"
-#define DT_PRINT_PAGE_COMMAND "DT_PRINT_PAGE_COMMAND"
-
-#define DT_IN_FILE_STRING "%(InFile)%"
-#define DT_OUT_FILE_STRING "%(OutFile)%"
-#define DT_ALLOWED_COMMANDS_FILE "printCommands"
-
-#endif  /* _PSDEF_H_ */
diff --git a/hw/xprint/ps/PsFTFonts.c b/hw/xprint/ps/PsFTFonts.c
deleted file mode 100644
index 8857ae4..0000000
--- a/hw/xprint/ps/PsFTFonts.c
+++ /dev/null
@@ -1,85 +0,0 @@
-
-/*
-Copyright (c) 2003-2004 Roland Mainz <roland.mainz at nrubsig.org>
-
-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
-AUTHORS OR 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.
-*/
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#include <ctype.h>
-#include <limits.h>
-#include <sys/stat.h>
-
-#include "regionstr.h"
-#include <X11/fonts/fontstruct.h>
-#include "dixfontstr.h"
-#include "scrnintstr.h"
-#include <X11/fonts/fontxlfd.h>
-#include <X11/fonts/fntfil.h>
-#include <X11/fonts/fntfilst.h>
-
-#include "Ps.h"
-
-#include <ft2build.h>
-#include FT_FREETYPE_H
-
-#include <X11/fonts/ft.h>
-#define NOT_IN_FTFUNCS
-#include <X11/fonts/ftfuncs.h>
-
-char *
-PsGetFTFontFileName(FontPtr pFont)
-{
-  FTFontPtr tf = (FTFontPtr)pFont->fontPrivate;
-  return tf->instance->face->filename;
-}
-   
-Bool
-PsIsFreeTypeFont(FontPtr pFont)
-{
-  int         i;
-  int         nprops = pFont->info.nprops;
-  FontPropPtr props  = pFont->info.props;
-  /* "RASTERIZER_NAME" must match the rasterizer name set in
-   * xc/lib/font/FreeType/ftfuncs.c */
-  Atom        name   = MakeAtom("RASTERIZER_NAME", 15, True); 
-  Atom        value  = (Atom)0;
-  char       *rv;
-
-  for( i=0 ; i<nprops ; i++ )
-  {
-    if( props[i].name==name )
-      { value = props[i].value; break; }
-  }
-  if( !value )
-    return False; 
-
-  rv = NameForAtom(value);
-  if( !rv )
-    return False; 
-
-  if( memcmp(rv, "FreeType", 8) == 0 )
-    return  True;
-
-  return False;
-}
-
diff --git a/hw/xprint/ps/PsFonts.c b/hw/xprint/ps/PsFonts.c
deleted file mode 100644
index 8ab6314..0000000
--- a/hw/xprint/ps/PsFonts.c
+++ /dev/null
@@ -1,873 +0,0 @@
-/*
-
-Copyright 1996, 1998  The Open Group
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-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
-OPEN GROUP 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 name of The Open Group shall not be
-used in advertising or otherwise to promote the sale, use or other dealings
-in this Software without prior written authorization from The Open Group.
-
-*/
-/*
- * (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:		PsFonts.c
-**    *
-**    *  Contents:	Font code for PS driver.
-**    *
-**    *  Created By:	Roger Helmendach (Liberty Systems)
-**    *
-**    *  Copyright:	Copyright 1996 The Open Group, Inc.
-**    *
-**    *********************************************************
-** 
-********************************************************************/
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#include "regionstr.h"
-#include <X11/fonts/fontstruct.h>
-#include "dixfontstr.h"
-#include "scrnintstr.h"
-#include <X11/fonts/fontxlfd.h>
-#include <X11/fonts/fntfil.h>
-#include <X11/fonts/fntfilst.h>
-
-#include "Ps.h"
-
-#include <ctype.h>
-#include <limits.h>
-#include <sys/stat.h>
-
-Bool
-PsRealizeFont(
-  ScreenPtr  pscr,
-  FontPtr    pFont)
-{
-  return TRUE;
-}
-
-Bool
-PsUnrealizeFont(
-  ScreenPtr  pscr,
-  FontPtr    pFont)
-{
-  return TRUE;
-}
-
-char *
-PsGetFontName(FontPtr pFont)
-{
-  int         i;
-  int         nprops = pFont->info.nprops;
-  FontPropPtr props  = pFont->info.props;
-  Atom        name   = MakeAtom("FONT", 4, True);
-  Atom        value  = (Atom)0;
-
-  for( i=0 ; i<nprops ; i++ )
-  {
-    if( (Atom)props[i].name==name )
-      { value = props[i].value; break; }
-  }
-  if( !value ) return (char *)0;
-  return NameForAtom(value);
-}
-
-int
-PsGetFontSize(FontPtr pFont, float *mtx)
-{
-  FontScalableRec   vals;
-  char             *name = PsGetFontName(pFont);
-  int               value = 0;
-
-  FontParseXLFDName(name, &vals, FONT_XLFD_REPLACE_NONE);
-  if( vals.values_supplied&PIXELSIZE_ARRAY )
-  {
-    int  i;
-    for( i=0 ; i<4 ; i++ )
-      mtx[i] = (float)vals.pixel_matrix[i];
-  }
-  else
-  {
-    value = vals.pixel;
-    if( !value ) value = 20;
-  }
-  return value;
-}
-
-char *
-PsGetPSFontName(FontPtr pFont)
-{
-  int         i;
-  int         nprops = pFont->info.nprops;
-  FontPropPtr props  = pFont->info.props;
-  /* "_ADOBE_POSTSCRIPT_FONTNAME" maps directly to a PMF OBJ_NAME attribute
-   * name - changing the name will break printer-builtin fonts. */
-  Atom        name   = MakeAtom("_ADOBE_POSTSCRIPT_FONTNAME", 26, True); 
-  Atom        value  = (Atom)0;
-
-  for( i=0 ; i<nprops ; i++ )
-  {
-    if( (Atom)props[i].name==name )
-      { value = props[i].value; break; }
-  }
-  if( !value ) return (char *)0; 
-  return NameForAtom(value);
-}
-
-int
-PsIsISOLatin1Encoding(FontPtr pFont)
-{
-  int          i;
-  int          nprops = pFont->info.nprops;
-  FontPropPtr  props  = pFont->info.props;
-  Atom         reg = MakeAtom("CHARSET_REGISTRY", 16, True);
-  Atom         enc = MakeAtom("CHARSET_ENCODING", 16, True);
-  Atom         rv = 0, ev = 0;
-  char        *rp = 0;
-  char        *ep = 0;
-
-  for( i=0 ; i<nprops ; i++ )
-  {
-    if( (Atom)props[i].name==reg ) rv = props[i].value;
-    if( (Atom)props[i].name==enc ) ev = props[i].value;
-  }
-  if( rv ) rp = NameForAtom(rv);
-  if( ev ) ep = NameForAtom(ev);
-  if( (!rp) || (!ep) ) return(0);
-  if( (char)tolower(rp[0])!='i' ||
-      (char)tolower(rp[1])!='s' ||
-      (char)tolower(rp[2])!='o' ||
-      memcmp(&rp[3], "8859", 4)!=0 ||
-      ep[0]!='1' ) return(0);
-  return(1);
-}
-
-/* Return the encoding part of the XLFD (e.g. "*-iso8859-6.8x" etc.)*/
-char *PsGetEncodingName(FontPtr pFont)
-{
-  int          i;
-  int          nprops = pFont->info.nprops;
-  FontPropPtr  props  = pFont->info.props;
-  Atom         fnt = MakeAtom("FONT",              4, True);
-  Atom         reg = MakeAtom("CHARSET_REGISTRY", 16, True);
-  Atom         enc = MakeAtom("CHARSET_ENCODING", 16, True);
-  Atom         fv = 0, rv = 0, ev = 0;
-  char        *fp = 0;
-  char        *rp = 0;
-  char        *ep = 0;
-  char        *encname;
-
-  for( i=0 ; i<nprops ; i++ )
-  {
-    if( props[i].name==fnt ) fv = props[i].value;
-    if( props[i].name==reg ) rv = props[i].value;
-    if( props[i].name==enc ) ev = props[i].value;
-  }
-  if( fv ) fp = NameForAtom(fv);
-  if( rv ) rp = NameForAtom(rv);
-  if( ev ) ep = NameForAtom(ev);
-
-  if( (!rp) || (!ep) || (!fp))
-    return(0);
-  
-  encname  = fp;
-  encname += strlen(encname) - (strlen(rp) + strlen(ep) + 1);
-  
-  return encname;
-}
-
-/* strstr(), case-insensitive */
-static 
-char *str_case_str(const char *s, const char *find)
-{
-  size_t len;
-  char   c, 
-         sc;
-
-  if ((c = tolower(*find++)) != '\0')
-  {
-    len = strlen(find);
-    do 
-    {
-      do
-      {
-        if ((sc = tolower(*s++)) == '\0')
-          return NULL;
-      } while (sc != c);
-    } while (strncasecmp(s, find, len) != 0);
-    s--;
-  }
-  return ((char *)s);
-}
-
-/* Check if the font path element is a directory which can be examined
- * (for example the font may be from a font server
- * (e.g. pFont->fpe->name == "tcp/:7100"))
- */
-static
-Bool IsFPEaReadableDir(FontPtr pFont)
-{
-  const char *fpe_name = pFont->fpe->name;
-  if (!fpe_name)
-    return False;
-
-#define MODEL_FONTPATH_PREFIX     "PRINTER:"
-#define MODEL_FONTPATH_PREFIX_LEN 8
-  /* Strip model-specific font path prefix if there is one... */
-  if (!strncmp(fpe_name, MODEL_FONTPATH_PREFIX, MODEL_FONTPATH_PREFIX_LEN))
-    fpe_name += MODEL_FONTPATH_PREFIX_LEN;
-    
-  if (access(fpe_name, F_OK) == 0)
-  {
-    return True;
-  }
-
-  return False;
-}
-
-static
-char *getFontFilename(FontPtr pFont)
-{
-  FontDirectoryPtr   dir;
-  const char        *dlfnam;
-  FILE              *file;
-  struct stat        statb;
-  char               buf[512];
-  char              *front, *fn;
-  char               font_dir_fname[PATH_MAX],  /* Full path of fonts.dir */
-                     font_file_fname[PATH_MAX]; /* Name of font file (excluding path) */
-
-#ifdef XP_USE_FREETYPE
-  if( PsIsFreeTypeFont(pFont) )
-  {
-    const char  *fontname = PsGetFTFontFileName(pFont);
-
-#ifdef DEBUG_gisburn
-    fprintf(stderr, "getFontFilename: freetype font, file='%s'\n", fontname?fontname:"<NULL>");
-#endif /* DEBUG_gisburn */  
-
-    if( !fontname )
-      return NULL;
-      
-    return strdup(fontname);
-  }
-#endif /* XP_USE_FREETYPE */
-
-  if (!IsFPEaReadableDir(pFont))
-  {
-#ifdef DEBUG_gisburn
-    fprintf(stderr, "getFontFilename: '%s' no valid font path on disk\n", pFont->fpe->name);
-#endif /* DEBUG_gisburn */  
-    return NULL;
-  }
-
-  dir = pFont->fpe->private;
-  sprintf(font_dir_fname, "%s%s", dir->directory, "fonts.dir");  
-  
-  if (!(dlfnam = PsGetFontName(pFont)))
-    return NULL;
-  
-  file = fopen(font_dir_fname, "r");
-  if (file)
-  {
-    if (fstat (fileno(file), &statb) == -1)
-      return NULL;
-
-    while( fgets(buf, sizeof(buf)-1, file) )
-    {             
-      if ((fn = strstr(buf, " -")))
-      {
-        strcpy(font_file_fname, buf);
-        font_file_fname[fn - buf] = '\0';
-        fn++;
-        if ((front = str_case_str(fn, "normal-")))
-        {
-          fn[front - fn] = '\0';
-          if (str_case_str(dlfnam, fn))        
-          {
-            char full_font_file_path[PATH_MAX];
-
-            fclose(file);
-            
-            sprintf(full_font_file_path, "%s%s", dir->directory, font_file_fname);
-
-#ifdef xDEBUG_gisburn
-            fprintf(stderr, "getFontFilename: returning '%s'\n", full_font_file_path);
-#endif /* DEBUG_gisburn */
-            return strdup(full_font_file_path); 
-          }
-        }
-      }
-    }
-  }
-  font_file_fname[0] = '\0';
-  fclose(file);
-
-#ifdef DEBUG_gisburn
-  fprintf(stderr, "getFontFilename: returning NULL\n");
-#endif /* DEBUG_gisburn */
-
-  return NULL;
-}
-
-static
-PsFontTypeInfoRec *PsFindFontTypeInfoRec(DrawablePtr pDrawable, FontPtr pFont)
-{
-  PsContextPrivRec  *cPriv = PsGetPsContextPriv(pDrawable);
-  PsFontTypeInfoRec *rec;
-  const char        *psname;
-  char              *font_filename;
-  char              *encname;
-#ifdef XP_USE_FREETYPE
-  Bool               is_freetypefont;
-#endif /* XP_USE_FREETYPE */
-  
-#ifdef XP_USE_FREETYPE
-  is_freetypefont = PsIsFreeTypeFont(pFont);
-#endif /* XP_USE_FREETYPE */
-  encname         = PsGetEncodingName(pFont);
-
-  /* First try: Search by PostScript font name */
-  psname = PsGetPSFontName(pFont);
-  if (psname)
-  {
-    for( rec = cPriv->fontTypeInfoRecords ; rec != NULL ; rec = rec->next )
-    {
-#ifdef XP_USE_FREETYPE
-      if (is_freetypefont)
-      {
-        if (rec->adobe_ps_name)
-        {
-          if ((rec->font_type == PSFTI_FONT_TYPE_FREETYPE) &&
-              (!strcmp(rec->adobe_ps_name, psname)) &&
-              (!strcmp(rec->ft_download_encoding, encname)))
-          {
-            return rec;
-          }
-        }
-      }
-      else
-#endif /* XP_USE_FREETYPE */
-      {
-        if (rec->adobe_ps_name)
-        {
-          if ((rec->font_type != PSFTI_FONT_TYPE_FREETYPE) &&
-              (!strcmp(rec->adobe_ps_name, psname)))
-          {
-            return rec;
-          }
-        }
-      }
-    }
-  }
-
-  /* Last attempt: Search by filename */
-  font_filename = getFontFilename(pFont);
-  if (font_filename)
-  {
-    for( rec = cPriv->fontTypeInfoRecords ; rec != NULL ; rec = rec->next )
-    {
-      if (rec->filename)
-      {
-#ifdef XP_USE_FREETYPE
-        if (is_freetypefont)
-        {
-          if ( (rec->font_type == PSFTI_FONT_TYPE_FREETYPE) &&
-               (!strcasecmp(rec->filename, font_filename)) && 
-               (!strcasecmp(rec->ft_download_encoding, encname)) )
-          {
-            free(font_filename);
-            return rec;
-          }
-        }
-        else
-#endif /* XP_USE_FREETYPE */
-        {
-          if ( (rec->font_type != PSFTI_FONT_TYPE_FREETYPE) &&
-               (!strcasecmp(rec->filename, font_filename)) )
-          {
-            free(font_filename);
-            return rec;
-          }
-        }
-      }
-    }
-    
-    free(font_filename);
-  }
-  
-  return NULL;
-}
-
-static
-void PsAddFontTypeInfoRec(DrawablePtr pDrawable, PsFontTypeInfoRec *add_rec)
-{ 
-  PsContextPrivRec *cPriv = PsGetPsContextPriv(pDrawable);
-
-  /* ToDO: Always move the last used entry to the top that the list get's
-   * sorted in an efficient order... :-) */
-  add_rec->next = cPriv->fontTypeInfoRecords;
-  cPriv->fontTypeInfoRecords = add_rec;
-}
-
-static
-Bool strcaseendswith(const char *str, const char *suffix)
-{
-  const char *s;
-
-  s = str + strlen(str) - strlen(suffix);
-
-  if (!strcasecmp(s, suffix))
-    return True;
-
-  return False;
-}
-
-
-static
-int getFontFileType( const char *filename )
-{
-  int type;
-
-  /* Is this a Adobe PostScript Type 1 binary font (PFB) ? */
-  if( strcaseendswith(filename, ".pfb") )
-  {
-    type = PSFTI_FONT_TYPE_PS_TYPE1_PFB;
-  }
-  /* Is this a Adobe PostScript ASCII font (PFA) ? */
-  else if( strcaseendswith(filename, ".pfa") )
-  {
-    type = PSFTI_FONT_TYPE_PS_TYPE1_PFA;
-  }
-  /* Is this a PMF(=Printer Metrics File) ? */
-  else if( strcaseendswith(filename, ".pmf") )
-  {
-    type = PSFTI_FONT_TYPE_PMF;
-  }
-  /* Is this a TrueType font file ? */
-  else if( strcaseendswith(filename, ".ttf") ||
-           strcaseendswith(filename, ".ttc") ||
-           strcaseendswith(filename, ".otf") ||
-           strcaseendswith(filename, ".otc") )
-  {
-    type = PSFTI_FONT_TYPE_TRUETYPE;
-  }
-  else
-  {
-    type = PSFTI_FONT_TYPE_OTHER;
-  }
-
-#ifdef XP_USE_FREETYPE
-  {
-    XpContextPtr  pCon;
-    char         *downloadfonts;
-    pCon = XpGetPrintContext(requestingClient);
-    downloadfonts = XpGetOneAttribute(pCon, XPPrinterAttr, "xp-psddx-download-fonts");
-    if( downloadfonts )
-    {
-      /* Should we download PS Type1 fonts as PS Type1||Type3 ? */
-      if( (type == PSFTI_FONT_TYPE_PS_TYPE1_PFA) &&
-          (strstr(downloadfonts, "pfa") != NULL) )
-      {
-        type = PSFTI_FONT_TYPE_FREETYPE;
-      }
-
-      if( (type == PSFTI_FONT_TYPE_PS_TYPE1_PFB) &&
-          (strstr(downloadfonts, "pfb") != NULL) )
-      {
-        type = PSFTI_FONT_TYPE_FREETYPE;
-      }
-
-      /* Should we download TrueType fonts as PS Type1||Type3 ? */
-      if( (type == PSFTI_FONT_TYPE_TRUETYPE) &&
-          ((strstr(downloadfonts, "ttf") != NULL) || 
-           (strstr(downloadfonts, "ttc") != NULL) || 
-           (strstr(downloadfonts, "otf") != NULL) || 
-           (strstr(downloadfonts, "otc") != NULL)) )
-      {
-        type = PSFTI_FONT_TYPE_FREETYPE;
-      }
-    }
-  }
-#endif /* XP_USE_FREETYPE */
-
-#ifdef DEBUG_gisburn
-  fprintf(stderr, "getFontFileType: '%s' is %d\n", filename, (int)type);
-#endif /* DEBUG_gisburn */
-  return type;
-}
-
-PsFTDownloadFontType PsGetFTDownloadFontType(void)
-{
-  PsFTDownloadFontType  downloadfonttype;
-  XpContextPtr          pCon;
-  char                 *psfonttype;
-
-  pCon       = XpGetPrintContext(requestingClient);
-  psfonttype = XpGetOneAttribute(pCon, XPPrinterAttr, "xp-psddx-download-font-type");
-
-  if( !psfonttype || !strlen(psfonttype) )
-  {
-    return PsFontType1; /* Default download font type is PS Type1 */
-  }
-
-  if( !strcmp(psfonttype, "bitmap") )
-  {
-    downloadfonttype = PsFontBitmap;
-  }
-  else if( !strcmp(psfonttype, "pstype3") )
-  {
-    downloadfonttype = PsFontType3;
-  }
-  else if( !strcmp(psfonttype, "pstype1") )
-  { 
-    downloadfonttype = PsFontType1;
-  }
-  else
-  {
-     FatalError("PS DDX: XPPrinterAttr/xp-psddx-download-freetype-font-type='%s' not implemented\n", psfonttype);
-     return 0; /* NO-OP, FatalError() will call |exit()| */
-  }
-  
-  return downloadfonttype;
-}
-
-static
-PsFontTypeInfoRec *PsCreateFontTypeInfoRec(DrawablePtr pDrawable, FontPtr pFont)
-{
-  char              *dlfnam;
-  PsFontTypeInfoRec *rec;
-  
-  if (!(dlfnam = PsGetFontName(pFont)))
-    return NULL;
-
-  if (!(rec = (PsFontTypeInfoRec *)xalloc(sizeof(PsFontTypeInfoRec))))
-    return NULL;
-  memset(rec, 0, sizeof(PsFontTypeInfoRec));
-
-  rec->next              = NULL;
-
-  if ((rec->filename = getFontFilename(pFont)))
-  {
-    rec->font_type = getFontFileType(rec->filename);   
-  }
-  else
-  {
-    rec->filename  = NULL;
-    rec->font_type = PSFTI_FONT_TYPE_OTHER;
-  }
-
-  rec->adobe_ps_name         = PsGetPSFontName(pFont);
-#ifdef XP_USE_FREETYPE
-  rec->ft_download_encoding  = PsGetEncodingName(pFont);
-  rec->ft_download_font_type = PsGetFTDownloadFontType();
-#endif /* XP_USE_FREETYPE */
-  rec->download_ps_name      = NULL;
-
-#define SET_FONT_DOWNLOAD_STATUS(rec, downloaded) { int i; for (i = 0 ; i < 256 ; i++) { (rec)->alreadyDownloaded[i]=(downloaded); } }
-
-  /* Set some flags based on the font type */
-  switch( rec->font_type )
-  {
-    case PSFTI_FONT_TYPE_PS_TYPE1_PFA:
-    case PSFTI_FONT_TYPE_PS_TYPE1_PFB:
-      rec->downloadableFont  = True;
-      SET_FONT_DOWNLOAD_STATUS(rec, False);
-      rec->is_iso_encoding = PsIsISOLatin1Encoding(pFont);
-      break;
-
-    case PSFTI_FONT_TYPE_PMF:
-      rec->downloadableFont  = True; /* This font is in printer's ROM */
-      SET_FONT_DOWNLOAD_STATUS(rec, True);
-      rec->is_iso_encoding = PsIsISOLatin1Encoding(pFont);
-      break;
-    
-    case PSFTI_FONT_TYPE_TRUETYPE:
-      /* Note: TrueType font download not implemented */
-      rec->downloadableFont  = False;
-      SET_FONT_DOWNLOAD_STATUS(rec, False);
-      rec->is_iso_encoding = PsIsISOLatin1Encoding(pFont);
-      break;
-
-#ifdef XP_USE_FREETYPE
-    case PSFTI_FONT_TYPE_FREETYPE:
-      if( rec->ft_download_font_type == PsFontType1 ||
-          rec->ft_download_font_type == PsFontType3 )
-      {
-        rec->downloadableFont = True;
-      }
-      else
-      {
-        rec->downloadableFont = False;
-      }
-
-      SET_FONT_DOWNLOAD_STATUS(rec, False);
-      rec->is_iso_encoding   = False; /* Freetype--->PS Type1/Type3 uses always non-iso PS encoding for now */
-      break;
-#endif /* XP_USE_FREETYPE */
-
-    case PSFTI_FONT_TYPE_OTHER:
-    default:
-      rec->downloadableFont  = False;
-      SET_FONT_DOWNLOAD_STATUS(rec, False);
-      rec->is_iso_encoding = PsIsISOLatin1Encoding(pFont);
-      break;
-  }
-  
-#ifdef XP_USE_FREETYPE
-  if( (rec->font_type == PSFTI_FONT_TYPE_FREETYPE) )
-  {
-    char *s;
-    register int c;
-
-    if( rec->adobe_ps_name )
-    {
-      rec->download_ps_name = malloc(strlen(rec->adobe_ps_name) + strlen(rec->ft_download_encoding) + 2);
-      sprintf(rec->download_ps_name, "%s_%s", rec->adobe_ps_name, rec->ft_download_encoding);
-    }
-    else
-    {
-      /* Unfortunately not all TTF fonts have a PostScript font name (like
-       * Solaris TTF fonts in /usr/openwin/lib/locale/ko.UTF-8/X11/fonts/TrueType,
-       * /usr/openwin/lib/locale/ko/X11/fonts/TrueType) - in this case we
-       * have to generate a font name
-       */
-      char        ftfontname[64];
-      static long myfontindex = 0L;
-      sprintf(ftfontname, "psfont_%lx", myfontindex++);
-      
-      rec->download_ps_name = malloc(strlen(ftfontname) + strlen(rec->ft_download_encoding) + 2);
-      sprintf(rec->download_ps_name, "%s_%s", ftfontname, rec->ft_download_encoding);
-      
-      fprintf(stderr, "PsCreateFontTypeInfoRec: Note: '%s' has no PS font name, using '%s' for now.\n", dlfnam, rec->download_ps_name);
-    }
-    
-    /* Make sure the font name we use for download is a valid PS font name */
-    for( s = rec->download_ps_name ; *s != '\0'; s++ )
-    {
-      c = *s;
-      
-      /* Check for allowed chars, invalid ones are replaced with a '_'
-       * (and check that the first char is not a digit) */
-      if( !(isalnum(c) || c == '.' || c == '_' || c == '-') || (s==rec->download_ps_name && isdigit(c)) )
-      {
-        *s = '_';
-      }
-    }
-  }
-  else
-#endif /* XP_USE_FREETYPE */
-  {
-    if( rec->adobe_ps_name )
-    {
-      rec->download_ps_name = strdup(rec->adobe_ps_name);
-    }
-    else
-    {
-      rec->download_ps_name = NULL;
-    }
-  }
-
-  /* Safeguard - only treat font as downloadable when we have a PS font name!! */
-  if (!rec->download_ps_name && rec->downloadableFont)
-  {
-    /* XXX: Log this message to the log when the logging service has been hook'ed up */
-    fprintf(stderr, "PsCreateFontTypeInfoRec: Safeguard: No PS font name for '%s'!\n", dlfnam);
-    rec->downloadableFont = False;
-  }
-
-#ifdef DEBUG_gisburn
-  fprintf(stderr, "PsCreateFontTypeInfoRec: Created PsFontTypeInfoRec '%s' ('%s'/'%s')\n",
-          ((rec->filename)        ?(rec->filename)     :("<null>")),
-          ((rec->adobe_ps_name)   ?(rec->adobe_ps_name):("<null>")),
-          ((rec->download_ps_name)?(rec->download_ps_name):("<null>")));
-#endif /* DEBUG_gisburn */
-
-  return rec;
-}
-
-static
-PsFontTypeInfoRec *PsGetFontTypeInfoRec(DrawablePtr pDrawable, FontPtr pFont)
-{
-  PsFontTypeInfoRec *rec;
-  char              *dlfnam;
-
-  if(!(dlfnam = PsGetFontName(pFont)))
-    return NULL;
-  
-  rec = PsFindFontTypeInfoRec(pDrawable, pFont);
-  if (rec)
-    return rec;
-    
-  rec = PsCreateFontTypeInfoRec(pDrawable, pFont);
-  if (!rec)
-    return NULL;
-  
-  PsAddFontTypeInfoRec(pDrawable, rec);
-
-  return rec;
-}
-
-static
-void PsFreeFontTypeInfoRecords( PsContextPrivPtr priv )
-{
-  PsFontTypeInfoRec *curr, *next;
-  curr = priv->fontTypeInfoRecords;
-  while( curr != NULL )
-  {
-    if (curr->filename)
-      free(curr->filename); /* Free memory allocated by |strdup()| */
-
-    if (curr->download_ps_name)
-      free(curr->download_ps_name);
-      
-    next = curr->next;
-    xfree(curr);
-    curr = next;
-  }
-}
-
-static
-PsFontInfoRec *PsFindFontInfoRec(DrawablePtr pDrawable, FontPtr pFont)
-{
-  PsContextPrivRec *cPriv = PsGetPsContextPriv(pDrawable);
-  PsFontInfoRec    *rec;
-
-  if (!pFont)
-    return NULL;
-
-  for( rec = cPriv->fontInfoRecords ; rec != NULL ; rec = rec->next )
-  {
-    if ((rec->font == pFont) && 
-        (rec->font_fontPrivate == pFont->fontPrivate))
-      return rec;
-  }
-  
-  return NULL;
-}
-
-static
-void PsAddFontInfoRec(DrawablePtr pDrawable, PsFontInfoRec *add_rec)
-{ 
-  PsContextPrivRec *cPriv = PsGetPsContextPriv(pDrawable);
-
-  /* ToDO: Always move the last used entry to the top that the list get's
-   * sorted in an efficient order... :-) */
-  add_rec->next = cPriv->fontInfoRecords;
-  cPriv->fontInfoRecords = add_rec;
-}
-
-static
-PsFontInfoRec *PsCreateFontInfoRec(DrawablePtr pDrawable, FontPtr pFont)
-{
-  PsFontInfoRec     *rec;
-  PsFontTypeInfoRec *ftir;
-  
-  if (!(ftir = PsGetFontTypeInfoRec(pDrawable, pFont)))
-    return NULL;
-
-  if (!(rec = (PsFontInfoRec *)xalloc(sizeof(PsFontInfoRec))))
-    return NULL;
-  memset(rec, 0, sizeof(PsFontInfoRec));
-
-  rec->font     = pFont;
-  rec->font_fontPrivate = pFont->fontPrivate;
-  rec->ftir     = ftir;
-  rec->next     = NULL;
-  rec->dfl_name = PsGetFontName(pFont);
-  rec->size     = PsGetFontSize(pFont, rec->mtx);
-
-#ifdef DEBUG_gisburn
-  fprintf(stderr, "PsCreateFontInfoRec: Created PsFontInfoRec '%s'\n",
-          ((rec->dfl_name)?(rec->dfl_name):("<null>")));
-#endif /* DEBUG_gisburn */
-
-  return rec;
-}
-
-PsFontInfoRec *PsGetFontInfoRec(DrawablePtr pDrawable, FontPtr pFont)
-{
-  PsFontInfoRec *rec;
-
-  rec = PsFindFontInfoRec(pDrawable, pFont);
-  if (rec)
-    return rec;
-    
-  rec = PsCreateFontInfoRec(pDrawable, pFont);
-  if (!rec)
-    return NULL;
-  
-  PsAddFontInfoRec(pDrawable, rec);
-
-  return rec;
-}
-
-void PsFreeFontInfoRecords( PsContextPrivPtr priv )
-{
-  PsFontInfoRec *curr, *next;
-  curr = priv->fontInfoRecords;
-  while( curr != NULL )
-  {  
-    next = curr->next;
-    xfree(curr);
-    curr = next;
-  }
-  
-  PsFreeFontTypeInfoRecords(priv);
-
-  priv->fontTypeInfoRecords = NULL;
-  priv->fontInfoRecords     = NULL;
-}
diff --git a/hw/xprint/ps/PsGC.c b/hw/xprint/ps/PsGC.c
deleted file mode 100644
index 19898c9..0000000
--- a/hw/xprint/ps/PsGC.c
+++ /dev/null
@@ -1,418 +0,0 @@
-/*
-
-Copyright 1996, 1998  The Open Group
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-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
-OPEN GROUP 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 name of The Open Group shall not be
-used in advertising or otherwise to promote the sale, use or other dealings
-in this Software without prior written authorization from The Open Group.
-
-*/
-/*
- * (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:		PsGC.c
-**    *
-**    *  Contents:	Graphics Context handling for the PS driver
-**    *
-**    *  Created By:	Roger Helmendach (Liberty Systems)
-**    *
-**    *  Copyright:	Copyright 1996 The Open Group, Inc.
-**    *
-**    *********************************************************
-** 
-********************************************************************/
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#include "Ps.h"
-#include "gcstruct.h"
-#include "pixmapstr.h"
-#include "windowstr.h"
-#include "migc.h"
-#include "scrnintstr.h"
-
-static GCOps PsGCOps = 
-{
-  PsFillSpans,
-  PsSetSpans,
-  PsPutImage,
-  PsCopyArea,
-  PsCopyPlane,
-  PsPolyPoint,
-  PsPolyLine,
-  PsPolySegment,
-  PsPolyRectangle,
-  PsPolyArc,
-  PsFillPolygon,
-  PsPolyFillRect,
-  PsPolyFillArc,
-  PsPolyText8,
-  PsPolyText16,
-  PsImageText8,
-  PsImageText16,
-  PsImageGlyphBlt,
-  PsPolyGlyphBlt,
-  PsPushPixels
-};
-
-
-static GCFuncs PsGCFuncs = 
-{
-  PsValidateGC,
-  PsChangeGC,
-  PsCopyGC,
-  PsDestroyGC,
-  PsChangeClip,
-  PsDestroyClip,
-  PsCopyClip
-};
-
-Bool
-PsCreateGC(pGC)
-  GCPtr pGC;
-{
-  pGC->clientClip     = NULL;
-  pGC->clientClipType = CT_NONE;
-
-  pGC->ops = &PsGCOps;
-  pGC->funcs = &PsGCFuncs;
-
-  pGC->clientClip = (pointer)xalloc(sizeof(PsClipRec));
-  memset(pGC->clientClip, 0, sizeof(PsClipRec));
-  return TRUE;
-}
-
-static int
-PsGetDrawablePrivateStuff(
-  DrawablePtr     pDrawable,
-  GC             *gc,
-  unsigned long  *valid,
-  PsOutPtr       *psOut,
-  ColormapPtr    *cMap)
-{
-  XpContextPtr     pCon;
-  PsContextPrivPtr cPriv;
-  PsScreenPrivPtr  sPriv;
-
-  switch(pDrawable->type)
-  {
-    case DRAWABLE_PIXMAP:
-      return FALSE;
-    case DRAWABLE_WINDOW:
-      pCon  = PsGetContextFromWindow((WindowPtr)pDrawable);
-      if( pCon==NULL ) return FALSE;
-      else
-      {
-        Colormap    c;
-        ColormapPtr cmap;
-
-        c = wColormap((WindowPtr)pDrawable);
-        cmap = (ColormapPtr)LookupIDByType(c, RT_COLORMAP);
-
-        cPriv = (PsContextPrivPtr)
-	    dixLookupPrivate(&pCon->devPrivates, PsContextPrivateKey);
-        sPriv = (PsScreenPrivPtr)
-	    dixLookupPrivate(&pDrawable->pScreen->devPrivates,
-			     PsScreenPrivateKey);
-        *gc     = cPriv->lastGC;
-        *valid  = cPriv->validGC;
-        *psOut  = cPriv->pPsOut;
-        *cMap   = cmap;
-        return TRUE;
-      }
-    default:
-      return FALSE;
-  }
-}
-
-PsContextPrivPtr
-PsGetPsContextPriv( DrawablePtr pDrawable )
-{
-  XpContextPtr     pCon;
-
-  switch(pDrawable->type)
-  {
-    case DRAWABLE_PIXMAP:
-      return FALSE;
-    case DRAWABLE_WINDOW:
-      pCon = PsGetContextFromWindow((WindowPtr)pDrawable);
-      if (pCon != NULL)
-      {
-	  return (PsContextPrivPtr)
-	      dixLookupPrivate(&pCon->devPrivates, PsContextPrivateKey);
-      }
-  }
-  return NULL;
-}
-
-int
-PsUpdateDrawableGC(
-  GCPtr        pGC,
-  DrawablePtr  pDrawable,
-  PsOutPtr    *psOut,
-  ColormapPtr *cMap)
-{
-  GC               dGC;
-  unsigned long    valid;
-  int              i;
-  PsContextPrivPtr cPriv;
-  BoxPtr           boxes;
-
-  if (!PsGetDrawablePrivateStuff(pDrawable, &dGC, &valid, psOut, cMap))
-    return FALSE;
-    
-  switch (pDrawable->type) {
-
-    case DRAWABLE_PIXMAP:
-      /* we don't support pixmaps yet! */
-      return FALSE;
-      break;
-    case DRAWABLE_WINDOW: 
-      if( pGC )
-      {
-        RegionPtr pReg;
-        WindowPtr pWin = (WindowPtr)pDrawable;
-        Bool      freeClip;
-        PsClipPtr clp = (PsClipPtr)pGC->clientClip;
-        if( clp->outterClips )
-          { xfree(clp->outterClips); clp->outterClips = 0; }
-        clp->nOutterClips = 0;
-        if( pGC->subWindowMode==IncludeInferiors )
-        {
-          pReg = NotClippedByChildren(pWin);
-          freeClip = TRUE;
-        }
-        else
-        {
-          pReg = &pWin->clipList;
-          freeClip = FALSE;
-        }
-
-        if( pReg->data )
-        {
-          boxes = (BoxPtr)((char *)pReg->data+sizeof(long)*2);
-          clp->nOutterClips = pReg->data->numRects;
-          clp->outterClips  =
-                      (PsRectPtr)xalloc(clp->nOutterClips*sizeof(PsRectRec));
-          for( i=0 ; i<clp->nOutterClips ; i++ )
-          {
-            clp->outterClips[i].x = boxes[i].x1;
-            clp->outterClips[i].y = boxes[i].y1;
-            clp->outterClips[i].w = (boxes[i].x2-boxes[i].x1)+1;
-            clp->outterClips[i].h = (boxes[i].y2-boxes[i].y1)+1;
-          }
-        }
-
-        if( freeClip ) REGION_DESTROY(pGC->pScreen, pReg);
-        PsOut_Offset(*psOut, pDrawable->x, pDrawable->y);
-        PsOut_Clip(*psOut, pGC->clientClipType, (PsClipPtr)pGC->clientClip);
-      }
-      cPriv = (PsContextPrivPtr)dixLookupPrivate(
-	  &PsGetContextFromWindow((WindowPtr)pDrawable)->devPrivates,
-	  PsContextPrivateKey);
-      break;
-  }
-  return TRUE;
-}
-
-void
-PsValidateGC(GCPtr pGC, unsigned long changes, DrawablePtr pDrawable)
-{
-  pGC->ops = &PsGCOps;
-}
-
-void
-PsChangeGC(GCPtr pGC, unsigned long changes)
-{
-}
-
-void
-PsCopyGC(GCPtr pGCSrc, unsigned long mask, GCPtr pGCDst)
-{
-}
-
-void
-PsDestroyGC(GCPtr pGC)
-{
-  PsDestroyClip(pGC);
-  xfree(pGC->clientClip);
-}
-
-void
-PsChangeClip(GCPtr pGC, int type, pointer pValue, int nrects)
-{
-  int         i;
-  PsClipPtr   clp = (PsClipPtr)pGC->clientClip;
-  RegionPtr   rgn;
-  BoxPtr      boxes;
-  xRectangle *rects;
-
-  PsDestroyClip(pGC);
-  pGC->clientClipType = type;
-  switch(type)
-  {
-    case CT_NONE: break;
-    case CT_PIXMAP:
-      clp->elms = PsCreateFillElementList((PixmapPtr)pValue, &clp->nElms);
-      (*pGC->pScreen->DestroyPixmap)((PixmapPtr)pValue);
-      break;
-    case CT_REGION:
-      rgn = (RegionPtr)pValue;
-      boxes = (BoxPtr)((char *)rgn->data+sizeof(long)*2);
-      clp->nRects = rgn->data->numRects;
-      clp->rects  = (PsRectPtr)xalloc(clp->nRects*sizeof(PsRectRec));
-      for( i=0 ; i<clp->nRects ; i++ )
-      {
-        clp->rects[i].x = boxes[i].x1;
-        clp->rects[i].y = boxes[i].y1;
-        clp->rects[i].w = (boxes[i].x2-boxes[i].x1)+1;
-        clp->rects[i].h = (boxes[i].y2-boxes[i].y1)+1;
-      }
-      REGION_DESTROY(pGC->pScreen, (RegionPtr)pValue);
-      break;
-    case CT_UNSORTED:
-    case CT_YSORTED:
-    case CT_YXSORTED:
-    case CT_YXBANDED:
-      rects = (xRectangle *)pValue;
-      clp->nRects = nrects;
-      clp->rects  = (PsRectPtr)xalloc(clp->nRects*sizeof(PsRectRec));
-      for( i=0 ; i<clp->nRects ; i++ )
-      {
-        clp->rects[i].x = rects[i].x;
-        clp->rects[i].y = rects[i].y;
-        clp->rects[i].w = rects[i].width;
-        clp->rects[i].h = rects[i].height;
-      }
-      xfree(pValue);
-      break;
-  }
-}
-
-void
-PsDestroyClip(GCPtr pGC)
-{
-  PsClipPtr clp = (PsClipPtr)pGC->clientClip;
-
-  if( clp->rects )       xfree(clp->rects);
-  if( clp->outterClips ) xfree(clp->outterClips);
-  clp->rects       = (PsRectPtr)0;
-  clp->outterClips = (PsRectPtr)0;
-  clp->nRects       = 0;
-  clp->nOutterClips = 0;
-  if( clp->elms ) PsDestroyFillElementList(clp->nElms, clp->elms);
-  clp->elms   = (PsElmPtr)0;
-  clp->nElms  = 0;
-  pGC->clientClipType = CT_NONE;
-}
-
-void
-PsCopyClip(GCPtr pDst, GCPtr pSrc)
-{
-  PsClipPtr src = (PsClipPtr)pSrc->clientClip;
-  PsClipPtr dst = (PsClipPtr)pDst->clientClip;
-
-  PsDestroyClip(pDst);
-  pDst->clientClipType = pSrc->clientClipType;
-  *dst = *src;
-  if( src->rects )
-  {
-    dst->rects = (PsRectPtr)xalloc(src->nRects*sizeof(PsRectRec));
-    memcpy(dst->rects, src->rects, src->nRects*sizeof(PsRectRec));
-  }
-  if( src->elms )
-    dst->elms = PsCloneFillElementList(src->nElms, src->elms);
-}
-
-
-GCPtr
-PsCreateAndCopyGC(DrawablePtr pDrawable, GCPtr pSrc)
-{
-    GCPtr pDst;
-    
-    if (pSrc == NULL) {
-        /* https://freedesktop.org/bugzilla/show_bug.cgi?id=1416 ("'x11perf
-         * -copypixpix500' crashes Xprt's PostScript DDX [PsCreateAndCopyGC"):
-         * I have no clue whether this is the real fix or just wallpapering
-         * over the crash (that's why we warn here loudly when this
-         * happens) ... */
-        fprintf(stderr, "PsCreateAndCopyGC: pSrc == NULL\n");
-        return NULL;
-    }
-    
-    if ((pDst =
-	 CreateScratchGC(pDrawable->pScreen, pDrawable->depth)) == NULL) 
-    {
-	return NULL;
-    }
-
-    if (CopyGC(pSrc, pDst, 
-	       GCFunction | GCPlaneMask | GCForeground | GCBackground |
-	       GCLineWidth | GCLineStyle | GCCapStyle | GCJoinStyle | 
-	       GCFillStyle | GCFillRule | GCTile | GCStipple |
-	       GCTileStipXOrigin | GCTileStipYOrigin | GCFont | 
-	       GCSubwindowMode | GCGraphicsExposures | GCClipXOrigin |
-	       GCClipYOrigin | GCClipMask | GCDashOffset | GCDashList |
-	       GCArcMode) != Success)
-    {
-	(void)FreeGC(pDst, (GContext)0);
-
-	return NULL;
-    }
-    
-    return pDst;
-}
-
diff --git a/hw/xprint/ps/PsImageUtil.c b/hw/xprint/ps/PsImageUtil.c
deleted file mode 100644
index 668a23f..0000000
--- a/hw/xprint/ps/PsImageUtil.c
+++ /dev/null
@@ -1,329 +0,0 @@
-
-/*
-Copyright (c) 2005 Roland Mainz <roland.mainz at nrubsig.org>
-
-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.
-*/
-
-/* Please do not beat me for this ugly code - most of it has been stolen from
- * xc/lib/X11/ImUtil.c */
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#include "Ps.h"
-#include "gcstruct.h"
-#include "windowstr.h"
-#include "servermd.h"
-#include "attributes.h"
-
-static unsigned char const _reverse_byte[0x100] = {
-        0x00, 0x80, 0x40, 0xc0, 0x20, 0xa0, 0x60, 0xe0,
-        0x10, 0x90, 0x50, 0xd0, 0x30, 0xb0, 0x70, 0xf0,
-        0x08, 0x88, 0x48, 0xc8, 0x28, 0xa8, 0x68, 0xe8,
-        0x18, 0x98, 0x58, 0xd8, 0x38, 0xb8, 0x78, 0xf8,
-        0x04, 0x84, 0x44, 0xc4, 0x24, 0xa4, 0x64, 0xe4,
-        0x14, 0x94, 0x54, 0xd4, 0x34, 0xb4, 0x74, 0xf4,
-        0x0c, 0x8c, 0x4c, 0xcc, 0x2c, 0xac, 0x6c, 0xec,
-        0x1c, 0x9c, 0x5c, 0xdc, 0x3c, 0xbc, 0x7c, 0xfc,
-        0x02, 0x82, 0x42, 0xc2, 0x22, 0xa2, 0x62, 0xe2,
-        0x12, 0x92, 0x52, 0xd2, 0x32, 0xb2, 0x72, 0xf2,
-        0x0a, 0x8a, 0x4a, 0xca, 0x2a, 0xaa, 0x6a, 0xea,
-        0x1a, 0x9a, 0x5a, 0xda, 0x3a, 0xba, 0x7a, 0xfa,
-        0x06, 0x86, 0x46, 0xc6, 0x26, 0xa6, 0x66, 0xe6,
-        0x16, 0x96, 0x56, 0xd6, 0x36, 0xb6, 0x76, 0xf6,
-        0x0e, 0x8e, 0x4e, 0xce, 0x2e, 0xae, 0x6e, 0xee,
-        0x1e, 0x9e, 0x5e, 0xde, 0x3e, 0xbe, 0x7e, 0xfe,
-        0x01, 0x81, 0x41, 0xc1, 0x21, 0xa1, 0x61, 0xe1,
-        0x11, 0x91, 0x51, 0xd1, 0x31, 0xb1, 0x71, 0xf1,
-        0x09, 0x89, 0x49, 0xc9, 0x29, 0xa9, 0x69, 0xe9,
-        0x19, 0x99, 0x59, 0xd9, 0x39, 0xb9, 0x79, 0xf9,
-        0x05, 0x85, 0x45, 0xc5, 0x25, 0xa5, 0x65, 0xe5,
-        0x15, 0x95, 0x55, 0xd5, 0x35, 0xb5, 0x75, 0xf5,
-        0x0d, 0x8d, 0x4d, 0xcd, 0x2d, 0xad, 0x6d, 0xed,
-        0x1d, 0x9d, 0x5d, 0xdd, 0x3d, 0xbd, 0x7d, 0xfd,
-        0x03, 0x83, 0x43, 0xc3, 0x23, 0xa3, 0x63, 0xe3,
-        0x13, 0x93, 0x53, 0xd3, 0x33, 0xb3, 0x73, 0xf3,
-        0x0b, 0x8b, 0x4b, 0xcb, 0x2b, 0xab, 0x6b, 0xeb,
-        0x1b, 0x9b, 0x5b, 0xdb, 0x3b, 0xbb, 0x7b, 0xfb,
-        0x07, 0x87, 0x47, 0xc7, 0x27, 0xa7, 0x67, 0xe7,
-        0x17, 0x97, 0x57, 0xd7, 0x37, 0xb7, 0x77, 0xf7,
-        0x0f, 0x8f, 0x4f, 0xcf, 0x2f, 0xaf, 0x6f, 0xef,
-        0x1f, 0x9f, 0x5f, 0xdf, 0x3f, 0xbf, 0x7f, 0xff
-};
-
-static
-int XReverse_Bytes(
-    register unsigned char *bpt,
-    register int nb)
-{
-    do {
-        *bpt = _reverse_byte[*bpt];
-        bpt++;
-    } while (--nb > 0);
-    return 0;
-}
-
-/*
- * Data structure for "image" data, used by image manipulation routines.
- */
-typedef struct {
-    int width, height;          /* size of image */
-    int xoffset;                /* number of pixels offset in X direction */
-    int format;                 /* XYBitmap, XYPixmap, ZPixmap */
-    char *data;                 /* pointer to image data */
-    int byte_order;             /* data byte order, LSBFirst, MSBFirst */
-    int bitmap_unit;            /* quant. of scanline 8, 16, 32 */
-    int bitmap_bit_order;       /* LSBFirst, MSBFirst */
-    int depth;                  /* depth of image */
-    int bytes_per_line;         /* accelarator to next line */
-    int bits_per_pixel;         /* bits per pixel (ZPixmap) */
-} TmpImage;
-
-
-static void xynormalizeimagebits (
-    register unsigned char *bp,
-    register TmpImage *img)
-{
-	register unsigned char c;
-
-	if (img->byte_order != img->bitmap_bit_order) {
-	    switch (img->bitmap_unit) {
-
-		case 16:
-		    c = *bp;
-		    *bp = *(bp + 1);
-		    *(bp + 1) = c;
-		    break;
-
-		case 32:
-		    c = *(bp + 3);
-		    *(bp + 3) = *bp;
-		    *bp = c;
-		    c = *(bp + 2);
-		    *(bp + 2) = *(bp + 1);
-		    *(bp + 1) = c;
-		    break;
-	    }
-	}
-	if (img->bitmap_bit_order == MSBFirst)
-	    XReverse_Bytes (bp, img->bitmap_unit >> 3);
-}
-
-static void znormalizeimagebits (
-    register unsigned char *bp,
-    register TmpImage *img)
-{
-	register unsigned char c;
-	switch (img->bits_per_pixel) {
-
-	    case 4:
-		*bp = ((*bp >> 4) & 0xF) | ((*bp << 4) & ~0xF);
-		break;
-
-	    case 16:
-		c = *bp;
-		*bp = *(bp + 1);
-		*(bp + 1) = c;
-		break;
-
-	    case 24:
-		c = *(bp + 2);
-		*(bp + 2) = *bp;
-		*bp = c;
-		break;
-
-	    case 32:
-		c = *(bp + 3);
-		*(bp + 3) = *bp;
-		*bp = c;
-		c = *(bp + 2);
-		*(bp + 2) = *(bp + 1);
-		*(bp + 1) = c;
-		break;
-	}
-}
-
-/*
- * Macros
- * 
- * The ROUNDUP macro rounds up a quantity to the specified boundary,
- * then truncates to bytes.
- *
- * The XYNORMALIZE macro determines whether XY format data requires 
- * normalization and calls a routine to do so if needed. The logic in
- * this module is designed for LSBFirst byte and bit order, so 
- * normalization is done as required to present the data in this order.
- *
- * The ZNORMALIZE macro performs byte and nibble order normalization if 
- * required for Z format data.
- *
- * The XYINDEX macro computes the index to the starting byte (char) boundary
- * for a bitmap_unit containing a pixel with coordinates x and y for image
- * data in XY format.
- * 
- * The ZINDEX macro computes the index to the starting byte (char) boundary 
- * for a pixel with coordinates x and y for image data in ZPixmap format.
- * 
- */
-
-#if defined(Lynx) && defined(ROUNDUP)
-#undef ROUNDUP
-#endif
-
-#define ROUNDUP(nbytes, pad) ((((nbytes) + ((pad)-1)) / (pad)) * ((pad)>>3))
-
-#define XYNORMALIZE(bp, img) \
-    if ((img->byte_order == MSBFirst) || (img->bitmap_bit_order == MSBFirst)) \
-	xynormalizeimagebits((unsigned char *)(bp), img)
-
-#define ZNORMALIZE(bp, img) \
-    if (img->byte_order == MSBFirst) \
-	znormalizeimagebits((unsigned char *)(bp), img)
-
-#define XYINDEX(x, y, img) \
-    ((y) * img->bytes_per_line) + \
-    (((x) + img->xoffset) / img->bitmap_unit) * (img->bitmap_unit >> 3)
-
-#define ZINDEX(x, y, img) ((y) * img->bytes_per_line) + \
-    (((x) * img->bits_per_pixel) >> 3)
-
-/*
- * GetPixel
- * 
- * Returns the specified pixel.  The X and Y coordinates are relative to 
- * the origin (upper left [0,0]) of the image.  The pixel value is returned
- * in normalized format, i.e. the LSB of the long is the LSB of the pixel.
- * The algorithm used is:
- *
- *	copy the source bitmap_unit or Zpixel into temp
- *	normalize temp if needed
- *	extract the pixel bits into return value
- *
- */
-
-static unsigned long const low_bits_table[] = {
-    0x00000000, 0x00000001, 0x00000003, 0x00000007,
-    0x0000000f, 0x0000001f, 0x0000003f, 0x0000007f,
-    0x000000ff, 0x000001ff, 0x000003ff, 0x000007ff,
-    0x00000fff, 0x00001fff, 0x00003fff, 0x00007fff,
-    0x0000ffff, 0x0001ffff, 0x0003ffff, 0x0007ffff,
-    0x000fffff, 0x001fffff, 0x003fffff, 0x007fffff,
-    0x00ffffff, 0x01ffffff, 0x03ffffff, 0x07ffffff,
-    0x0fffffff, 0x1fffffff, 0x3fffffff, 0x7fffffff,
-    0xffffffff
-};
-
-static unsigned long XGetPixel (TmpImage *ximage, int x, int y)
-{
-	unsigned long pixel, px;
-	register char *src;
-	register char *dst;
-	register int i, j;
-	int bits, nbytes;
-	long plane;
-     
-	if ((ximage->bits_per_pixel | ximage->depth) == 1) {
-		src = &ximage->data[XYINDEX(x, y, ximage)];
-		dst = (char *)&pixel;
-		pixel = 0;
-		for (i = ximage->bitmap_unit >> 3; --i >= 0; ) *dst++ = *src++;
-		XYNORMALIZE(&pixel, ximage);
-          	bits = (x + ximage->xoffset) % ximage->bitmap_unit;
-		pixel = ((((char *)&pixel)[bits>>3])>>(bits&7)) & 1;
-	} else if (ximage->format == XYPixmap) {
-		pixel = 0;
-		plane = 0;
-		nbytes = ximage->bitmap_unit >> 3;
-		for (i = ximage->depth; --i >= 0; ) {
-		    src = &ximage->data[XYINDEX(x, y, ximage)+ plane];
-		    dst = (char *)&px;
-		    px = 0;
-		    for (j = nbytes; --j >= 0; ) *dst++ = *src++;
-		    XYNORMALIZE(&px, ximage);
-		    bits = (x + ximage->xoffset) % ximage->bitmap_unit;
-		    pixel = (pixel << 1) |
-			    (((((char *)&px)[bits>>3])>>(bits&7)) & 1);
-		    plane = plane + (ximage->bytes_per_line * ximage->height);
-		}
-	} else if (ximage->format == ZPixmap) {
-		src = &ximage->data[ZINDEX(x, y, ximage)];
-		dst = (char *)&px;
-		px = 0;
-		for (i = (ximage->bits_per_pixel + 7) >> 3; --i >= 0; )
-		    *dst++ = *src++;		
-		ZNORMALIZE(&px, ximage);
-		pixel = 0;
-		for (i=sizeof(unsigned long); --i >= 0; )
-		    pixel = (pixel << 8) | ((unsigned char *)&px)[i];
-		if (ximage->bits_per_pixel == 4) {
-		    if (x & 1)
-			pixel >>= 4;
-		    else
-			pixel &= 0xf;
-		}
-	} else {
-		return 0; /* bad image */
-	}
-	if (ximage->bits_per_pixel == ximage->depth)
-	  return pixel;
-	else
-	  return (pixel & low_bits_table[ximage->depth]);
-}
-
-unsigned long
-PsGetImagePixel(char *pImage, int depth, int w, int h, int leftPad, int format,
-                int px, int py)
-{
-  TmpImage xi = {0};
-  
-  xi.width            = w;
-  xi.height           = h;
-  xi.xoffset          = 0/*leftPad*/;
-  xi.format           = format;
-  xi.data             = pImage;
-  xi.byte_order       = IMAGE_BYTE_ORDER;
-  xi.bitmap_bit_order = BITMAP_BIT_ORDER;
-  xi.bitmap_unit      = ((depth > 16)?(32):
-                        ((depth >  8)?(16):
-                        ((depth >  1)? (8):
-                                  (1))));
-  xi.depth            = depth;
-  xi.bits_per_pixel   = xi.bitmap_unit;
-
-  /*
-   * compute per line accelerator.
-   */
-  if (format == ZPixmap)
-      xi.bytes_per_line = 
-          ROUNDUP((xi.bits_per_pixel * xi.width), 32);
-  else
-      xi.bytes_per_line =
-          ROUNDUP((xi.width + xi.xoffset), 32); 
-
-  return XGetPixel(&xi, px, py);
-}
-
-
-
diff --git a/hw/xprint/ps/PsInit.c b/hw/xprint/ps/PsInit.c
deleted file mode 100644
index 72bd7bd..0000000
--- a/hw/xprint/ps/PsInit.c
+++ /dev/null
@@ -1,648 +0,0 @@
-/*
-
-Copyright 1996, 1998  The Open Group
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-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
-OPEN GROUP 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 name of The Open Group shall not be
-used in advertising or otherwise to promote the sale, use or other dealings
-in this Software without prior written authorization from The Open Group.
-
-*/
-/*
- * (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:		PsInit.c
-**    *
-**    *  Contents:      Initialization code of Ps driver for the print server.
-**    *
-**    *  Created By:	Roger Helmendach (Liberty Systems)
-**    *
-**    *  Copyright:	Copyright 1996 The Open Group, Inc.
-**    *
-**    *********************************************************
-** 
-********************************************************************/
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#include <stdio.h>
-#include <string.h>
-#include <unistd.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/wait.h>
-
-#include "Ps.h"
-#include "mi.h"
-#include "micmap.h"
-#include "AttrValid.h"
-#include "fb.h"
-
-#include "windowstr.h"
-#include "DiPrint.h"
-
-static void AllocatePsPrivates(ScreenPtr pScreen);
-static int PsInitContext(XpContextPtr pCon);
-static int PsDestroyContext(XpContextPtr pCon);
-
-DevPrivateKey PsScreenPrivateKey = &PsScreenPrivateKey;
-DevPrivateKey PsContextPrivateKey = &PsContextPrivateKey;
-DevPrivateKey PsPixmapPrivateKey = &PsPixmapPrivateKey;
-DevPrivateKey PsWindowPrivateKey = &PsWindowPrivateKey;
-
-#ifdef GLXEXT
-extern void GlxWrapInitVisuals(miInitVisualsProcPtr *);
-#endif /* GLXEXT */
-
-Bool
-InitializePsDriver(ndx, pScreen, argc, argv)
-  int         ndx;
-  ScreenPtr   pScreen;
-  int         argc;
-  char      **argv;
-{
-#if 0
-  int               maxXres, maxYres, maxWidth, maxHeight;
-  int               maxRes, maxDim, numBytes;
-  PsScreenPrivPtr   pPriv;
-#endif
-  int               nv,       /* total number of visuals */
-                    nv_1bit,  /* number of 8bit visuals */
-                    nv_8bit,  /* number of 8bit visuals */
-                    nv_12bit, /* number of 12bit visuals */
-                    nv_14bit, /* number of 14bit visuals */
-                    nv_16bit, /* number of 16bit visuals */
-                    nv_24bit, /* number of 24bit visuals*/
-                    nv_30bit; /* number of 30bit visuals*/
-  int               nd;       /* number of depths */
-  int               defaultVisualIndex = -1;
-  VisualID         *vids_1bit,
-                   *vids_8bit,
-                   *vids_12bit,
-                   *vids_14bit,
-                   *vids_16bit,
-                   *vids_24bit,
-                   *vids_30bit;
-  VisualPtr         visuals;
-  DepthPtr          depths;
-  VisualID          defaultVisual;
-  int               rootDepth;
-
-/*
- * Register this driver's InitContext function with the print
- * extension.
- */
-  XpRegisterInitFunc(pScreen, "XP-POSTSCRIPT", PsInitContext);
-
-/*
- * Create and fill in the devPrivate for the PS driver.
- */
-  AllocatePsPrivates(pScreen);
-
-#if 0
-  pPriv = (PsScreenPrivPtr)
-      dixLookupPrivate(&pScreen->devPrivates, PsScreenPrivateKey);
-  pPriv->resDB = rmdb;
-#endif
-
-  pScreen->defColormap            = (Colormap) FakeClientID(0);
-  pScreen->blackPixel             = 1;
-  pScreen->whitePixel             = 0;
-  pScreen->QueryBestSize          = (QueryBestSizeProcPtr)PsQueryBestSize;
-  pScreen->SaveScreen             = (SaveScreenProcPtr)_XpBoolNoop;
-  pScreen->GetImage               = (GetImageProcPtr)_XpVoidNoop;
-  pScreen->GetSpans               = (GetSpansProcPtr)_XpVoidNoop;
-  pScreen->CreateWindow           = PsCreateWindow;
-  pScreen->DestroyWindow          = PsDestroyWindow;
-  pScreen->PositionWindow         = PsPositionWindow;
-  pScreen->ChangeWindowAttributes = PsChangeWindowAttributes;
-  pScreen->RealizeWindow          = PsMapWindow;
-  pScreen->UnrealizeWindow        = PsUnmapWindow;
-  pScreen->CloseScreen            = PsCloseScreen;
-  pScreen->CopyWindow             = PsCopyWindow;
-       /* XXX Hard routine to write! */
-
-/*
- * These two are going to be VERY different...
- */
-  pScreen->CreatePixmap           = PsCreatePixmap;
-  pScreen->DestroyPixmap          = PsDestroyPixmap;
-  pScreen->RealizeFont            = PsRealizeFont;
-  pScreen->UnrealizeFont          = PsUnrealizeFont;
-  pScreen->CreateGC               = PsCreateGC;
-  pScreen->CreateColormap         = PsCreateColormap;
-  pScreen->DestroyColormap        = PsDestroyColormap;
-  pScreen->InstallColormap        = PsInstallColormap;
-  pScreen->UninstallColormap      = PsUninstallColormap;
-  pScreen->ListInstalledColormaps = PsListInstalledColormaps;
-  pScreen->StoreColors            = PsStoreColors;
-  pScreen->ResolveColor           = PsResolveColor;
-    /* Will BitmapToRegion make any difference at all? */
-  pScreen->BitmapToRegion         = fbPixmapToRegion;
-
-  visuals    = (VisualPtr) xalloc(16*sizeof(VisualRec));
-  depths     = (DepthPtr)  xalloc(16*sizeof(DepthRec));
-  vids_1bit  = (VisualID *)xalloc(16*sizeof(VisualID));
-  vids_8bit  = (VisualID *)xalloc(16*sizeof(VisualID));
-  vids_12bit = (VisualID *)xalloc(16*sizeof(VisualID));
-  vids_14bit = (VisualID *)xalloc(16*sizeof(VisualID));
-  vids_16bit = (VisualID *)xalloc(16*sizeof(VisualID));
-  vids_24bit = (VisualID *)xalloc(16*sizeof(VisualID));
-  vids_30bit = (VisualID *)xalloc(16*sizeof(VisualID));
-
-  nv = nv_1bit = nv_8bit = nv_12bit = nv_14bit = nv_16bit = nv_24bit = nv_30bit = nd = 0;
-
-#ifdef PSOUT_USE_DEEPCOLOR
-/* gisburn: 30bit TrueColor has been disabled for now since it causes problems
- * with GLX - see https://bugs.freedesktop.org/show_bug.cgi?id=2868 ("Mesa
- * seems to be unable to handle 30bit TrueColor visuals") for details... 
- */
-#ifdef DISABLED_FOR_NOW
-  /* TrueColor, 30bit, 10bit per R-,G-,B-gun */
-  visuals[nv].vid             = FakeClientID(0);
-  visuals[nv].class           = TrueColor;
-  visuals[nv].bitsPerRGBValue = 10;
-  visuals[nv].ColormapEntries = 1024;
-  visuals[nv].nplanes         = 30;
-  visuals[nv].redMask         = 0X3FF00000;
-  visuals[nv].greenMask       = 0X000FFC00;
-  visuals[nv].blueMask        = 0X000003FF;
-  visuals[nv].offsetRed       = 20;
-  visuals[nv].offsetGreen     = 10;
-  visuals[nv].offsetBlue      = 0;
-  vids_30bit[nv_30bit] = visuals[nv].vid;
-  nv++; nv_30bit++;
-#endif /* DISABLED_FOR_NOW */
-#endif /* PSOUT_USE_DEEPCOLOR */
-
-  /* TrueColor, 24bit */
-  visuals[nv].vid             = FakeClientID(0);
-  visuals[nv].class           = TrueColor;
-  visuals[nv].bitsPerRGBValue = 8;
-  visuals[nv].ColormapEntries = 256;
-  visuals[nv].nplanes         = 24;
-  visuals[nv].redMask         = 0X00FF0000;
-  visuals[nv].greenMask       = 0X0000FF00;
-  visuals[nv].blueMask        = 0X000000FF;
-  visuals[nv].offsetRed       = 16;
-  visuals[nv].offsetGreen     = 8;
-  visuals[nv].offsetBlue      = 0;
-  vids_24bit[nv_24bit] = visuals[nv].vid;
-  nv++; nv_24bit++;
-
-  /* TrueColor, 16bit */
-  visuals[nv].vid             = FakeClientID(0);
-  visuals[nv].class           = TrueColor;
-  visuals[nv].bitsPerRGBValue = 6;
-  visuals[nv].ColormapEntries = 64;
-  visuals[nv].nplanes         = 16;
-  visuals[nv].redMask         = 0x0000f800;
-  visuals[nv].greenMask       = 0x000007e0;
-  visuals[nv].blueMask        = 0x0000001f;
-  visuals[nv].offsetRed       = 11;
-  visuals[nv].offsetGreen     = 5;
-  visuals[nv].offsetBlue      = 0;
-  vids_16bit[nv_16bit] = visuals[nv].vid;
-  nv++; nv_16bit++;
-  
-#ifdef PSOUT_USE_DEEPCOLOR
-  /* PostScript Level 2 and above, colors can have 12 bits per component
-   * (36 bit for RGB) */
-
-  /* PseudoColor, 14bit (15bit won't work as |ColormapEntries==32768|
-   * is too large for a |signed short|... xx@@!!!... ;-( ) */
-  visuals[nv].vid             = FakeClientID(0);
-  visuals[nv].class           = PseudoColor;
-  visuals[nv].bitsPerRGBValue = 12;
-  visuals[nv].ColormapEntries = 16384;
-  visuals[nv].nplanes         = 14;
-  visuals[nv].redMask         = 0x0;
-  visuals[nv].greenMask       = 0x0;
-  visuals[nv].blueMask        = 0x0;
-  visuals[nv].offsetRed       = 0x0;
-  visuals[nv].offsetGreen     = 0x0;
-  visuals[nv].offsetBlue      = 0x0;
-  vids_14bit[nv_14bit] = visuals[nv].vid;
-  nv++; nv_14bit++;
-
-  /* PseudoColor, 12bit */
-  visuals[nv].vid             = FakeClientID(0);
-  visuals[nv].class           = PseudoColor;
-  visuals[nv].bitsPerRGBValue = 12;
-  visuals[nv].ColormapEntries = 4096;
-  visuals[nv].nplanes         = 12;
-  visuals[nv].redMask         = 0x0;
-  visuals[nv].greenMask       = 0x0;
-  visuals[nv].blueMask        = 0x0;
-  visuals[nv].offsetRed       = 0x0;
-  visuals[nv].offsetGreen     = 0x0;
-  visuals[nv].offsetBlue      = 0x0;
-  vids_12bit[nv_12bit] = visuals[nv].vid;
-  defaultVisualIndex = nv;
-  nv++; nv_12bit++;
-
-  /* GrayScale, 12bit, 12bit per R-,G-,B-gun */
-  visuals[nv].vid             = FakeClientID(0);
-  visuals[nv].class           = GrayScale;
-  visuals[nv].bitsPerRGBValue = 12;
-  visuals[nv].ColormapEntries = 4096;
-  visuals[nv].nplanes         = 12;
-  visuals[nv].redMask         = 0x0;
-  visuals[nv].greenMask       = 0x0;
-  visuals[nv].blueMask        = 0x0;
-  visuals[nv].offsetRed       = 0x0;
-  visuals[nv].offsetGreen     = 0x0;
-  visuals[nv].offsetBlue      = 0x0;
-  vids_12bit[nv_12bit] = visuals[nv].vid;
-  nv++; nv_12bit++;
-
-  /* StaticGray, 12bit, 12bit per R-,G-,B-gun */
-  visuals[nv].vid             = FakeClientID(0);
-  visuals[nv].class           = StaticGray;
-  visuals[nv].bitsPerRGBValue = 12;
-  visuals[nv].ColormapEntries = 4096;
-  visuals[nv].nplanes         = 12;
-  visuals[nv].redMask         = 0x0;
-  visuals[nv].greenMask       = 0x0;
-  visuals[nv].blueMask        = 0x0;
-  visuals[nv].offsetRed       = 0x0;
-  visuals[nv].offsetGreen     = 0x0;
-  visuals[nv].offsetBlue      = 0x0;
-  vids_12bit[nv_12bit] = visuals[nv].vid;
-  nv++; nv_12bit++;
-#endif /* PSOUT_USE_DEEPCOLOR */
-
-  /* PseudoColor, 8bit */
-  visuals[nv].vid             = FakeClientID(0);
-  visuals[nv].class           = PseudoColor;
-  visuals[nv].bitsPerRGBValue = 8;
-  visuals[nv].ColormapEntries = 256;
-  visuals[nv].nplanes         = 8;
-  visuals[nv].redMask         = 0x0;
-  visuals[nv].greenMask       = 0x0;
-  visuals[nv].blueMask        = 0x0;
-  visuals[nv].offsetRed       = 0x0;
-  visuals[nv].offsetGreen     = 0x0;
-  visuals[nv].offsetBlue      = 0x0;
-  vids_8bit[nv_8bit] = visuals[nv].vid;
-#ifndef PSOUT_USE_DEEPCOLOR
-  defaultVisualIndex = nv;
-#endif /* !PSOUT_USE_DEEPCOLOR */
-  nv++; nv_8bit++;
-
-  /* GrayScale, 8bit */
-  visuals[nv].vid             = FakeClientID(0);
-  visuals[nv].class           = GrayScale;
-  visuals[nv].bitsPerRGBValue = 8;
-  visuals[nv].ColormapEntries = 256;
-  visuals[nv].nplanes         = 8;
-  visuals[nv].redMask         = 0x0;
-  visuals[nv].greenMask       = 0x0;
-  visuals[nv].blueMask        = 0x0;
-  visuals[nv].offsetRed       = 0x0;
-  visuals[nv].offsetGreen     = 0x0;
-  visuals[nv].offsetBlue      = 0x0;
-  vids_8bit[nv_8bit] = visuals[nv].vid;
-  nv++; nv_8bit++;
-
-  /* StaticGray, 8bit */
-  visuals[nv].vid             = FakeClientID(0);
-  visuals[nv].class           = StaticGray;
-  visuals[nv].bitsPerRGBValue = 8;
-  visuals[nv].ColormapEntries = 256;
-  visuals[nv].nplanes         = 8;
-  visuals[nv].redMask         = 0x0;
-  visuals[nv].greenMask       = 0x0;
-  visuals[nv].blueMask        = 0x0;
-  visuals[nv].offsetRed       = 0x0;
-  visuals[nv].offsetGreen     = 0x0;
-  visuals[nv].offsetBlue      = 0x0;
-  vids_8bit[nv_8bit] = visuals[nv].vid;
-  nv++; nv_8bit++;
-
-  /* StaticGray, 1bit */
-  visuals[nv].vid             = FakeClientID(0);
-  visuals[nv].class           = StaticGray;
-  visuals[nv].bitsPerRGBValue = 1;
-  visuals[nv].ColormapEntries = 2;
-  visuals[nv].nplanes         = 1;
-  visuals[nv].redMask         = 0x0;
-  visuals[nv].greenMask       = 0x0;
-  visuals[nv].blueMask        = 0x0;
-  visuals[nv].offsetRed       = 0x0;
-  visuals[nv].offsetGreen     = 0x0;
-  visuals[nv].offsetBlue      = 0x0;
-  vids_1bit[nv_1bit] = visuals[nv].vid;
-  nv++; nv_1bit++;
-
-  if( nv_30bit > 0 )
-  {
-    depths[nd].depth   = 30;
-    depths[nd].numVids = nv_30bit;
-    depths[nd].vids    = vids_30bit;
-    nd++;
-  }
-
-  if( nv_24bit > 0 )
-  {
-    depths[nd].depth   = 24;
-    depths[nd].numVids = nv_24bit;
-    depths[nd].vids    = vids_24bit;
-    nd++;
-  }
-
-  if( nv_16bit > 0 )
-  {
-    depths[nd].depth   = 16;
-    depths[nd].numVids = nv_16bit;
-    depths[nd].vids    = vids_16bit;
-    nd++;
-  }
-
-  if( nv_14bit > 0 )
-  {
-    depths[nd].depth   = 14;
-    depths[nd].numVids = nv_14bit;
-    depths[nd].vids    = vids_14bit;
-    nd++;
-  }
-  
-  if( nv_12bit > 0 )
-  {
-    depths[nd].depth   = 12;
-    depths[nd].numVids = nv_12bit;
-    depths[nd].vids    = vids_12bit;
-    nd++;
-  }
-  
-  if( nv_8bit > 0 )
-  {
-    depths[nd].depth   = 8;
-    depths[nd].numVids = nv_8bit;
-    depths[nd].vids    = vids_8bit;
-    nd++;
-  }
-
-  if( nv_1bit > 0 )
-  {
-    depths[nd].depth   = 1;
-    depths[nd].numVids = nv_1bit;
-    depths[nd].vids    = vids_1bit;
-    nd++;
-  }
-
-  /* Defaul visual is 12bit PseudoColor */
-  defaultVisual = visuals[defaultVisualIndex].vid;
-  rootDepth = visuals[defaultVisualIndex].nplanes;
-
-#ifdef GLXEXT
-  {
-    miInitVisualsProcPtr proc = NULL;
-
-    GlxWrapInitVisuals(&proc);
-    /* GlxInitVisuals ignores the last three arguments. */
-    proc(&visuals, &depths, &nv, &nd,
-         &rootDepth, &defaultVisual, 0, 0, 0);
-  }
-#endif /* GLXEXT */
-
-  miScreenInit(pScreen, (pointer)0,
-               pScreen->width, pScreen->height,
-               (int) (pScreen->width / (pScreen->mmWidth / 25.40)), 
-               (int) (pScreen->height / (pScreen->mmHeight / 25.40)),
-               0, rootDepth, nd,
-               depths, defaultVisual, nv, visuals);
-
-  if( miCreateDefColormap(pScreen)==FALSE ) return FALSE;
-
-/*scalingScreenInit(pScreen);*/
-
-  return TRUE;
-}
-
-static void
-AllocatePsPrivates(ScreenPtr pScreen)
-{
-    dixRequestPrivate(PsWindowPrivateKey, sizeof(PsWindowPrivRec));
-    dixRequestPrivate(PsContextPrivateKey, sizeof(PsContextPrivRec));
-    dixRequestPrivate(PsPixmapPrivateKey, sizeof(PsPixmapPrivRec));
-
-    dixSetPrivate(&pScreen->devPrivates, PsScreenPrivateKey,
-		  xalloc(sizeof(PsScreenPrivRec)));
-}
-
-/*
- * PsInitContext
- *
- * Establish the appropriate values for a PrintContext used with the PS
- * driver.
- */
-
-static char DOC_ATT_SUPP[]="document-attributes-supported";
-static char DOC_ATT_VAL[]="document-format xp-listfonts-modes";
-static char JOB_ATT_SUPP[]="job-attributes-supported";
-static char JOB_ATT_VAL[]="";
-static char PAGE_ATT_SUPP[]="xp-page-attributes-supported";
-static char PAGE_ATT_VAL[]="content-orientation default-printer-resolution \
-default-input-tray default-medium plex xp-listfonts-modes";
-
-static int
-PsInitContext(pCon)
-  XpContextPtr pCon;
-{
-  XpDriverFuncsPtr pFuncs;
-  PsContextPrivPtr pConPriv;
-  char *server, *attrStr;
-    
-  /*
-   * Initialize the attribute store for this printer.
-   */
-  XpInitAttributes(pCon);
-
-  /*
-   * Initialize the function pointers
-   */
-  pFuncs = &(pCon->funcs);
-  pFuncs->StartJob          = PsStartJob;
-  pFuncs->EndJob            = PsEndJob;
-  pFuncs->StartDoc          = PsStartDoc;
-  pFuncs->EndDoc            = PsEndDoc;
-  pFuncs->StartPage         = PsStartPage;
-  pFuncs->EndPage           = PsEndPage;
-  pFuncs->PutDocumentData   = PsDocumentData;
-  pFuncs->GetDocumentData   = PsGetDocumentData;
-  pFuncs->GetAttributes     = PsGetAttributes;
-  pFuncs->SetAttributes     = PsSetAttributes;
-  pFuncs->AugmentAttributes = PsAugmentAttributes;
-  pFuncs->GetOneAttribute   = PsGetOneAttribute;
-  pFuncs->DestroyContext    = PsDestroyContext;
-  pFuncs->GetMediumDimensions = PsGetMediumDimensions;
-  pFuncs->GetReproducibleArea = PsGetReproducibleArea;
-  pFuncs->SetImageResolution = PsSetImageResolution;
-    
-  /*
-   * Set up the context privates
-   */
-  pConPriv = (PsContextPrivPtr)
-      dixLookupPrivate(&pCon->devPrivates, PsContextPrivateKey);
-
-  memset(pConPriv, 0, sizeof(PsContextPrivRec));
-  pConPriv->jobFileName         = (char *)NULL;
-  pConPriv->pJobFile            = (FILE *)NULL;
-  pConPriv->dash                = (unsigned char *)NULL;
-  pConPriv->validGC             = 0;
-  pConPriv->getDocClient        = (ClientPtr)NULL;
-  pConPriv->getDocBufSize       = 0;
-  pConPriv->pPsOut              = NULL;
-  pConPriv->fontInfoRecords     = NULL;
-  pConPriv->fontTypeInfoRecords = NULL;
-
-  /*
-   * document-attributes-supported
-   */
-  server = XpGetOneAttribute( pCon, XPServerAttr, DOC_ATT_SUPP );
-  if ((attrStr = (char *) xalloc(strlen(server) +
-				strlen(DOC_ATT_SUPP) + strlen(DOC_ATT_VAL)
-				+ strlen(PAGE_ATT_VAL) + 8)) == NULL) 
-  {
-      return BadAlloc;
-  }
-  sprintf(attrStr, "*%s:\t%s %s %s", 
-	  DOC_ATT_SUPP, server, DOC_ATT_VAL, PAGE_ATT_VAL);
-  XpAugmentAttributes( pCon, XPPrinterAttr, attrStr);
-  xfree(attrStr);
-    
-  /*
-   * job-attributes-supported
-   */
-  server = XpGetOneAttribute( pCon, XPServerAttr, JOB_ATT_SUPP );
-  if ((attrStr = (char *) xalloc(strlen(server) + strlen(JOB_ATT_SUPP) +
-				 strlen(JOB_ATT_VAL) + 8)) == NULL)
-  {
-      return BadAlloc;
-  }
-  sprintf(attrStr, "*%s:\t%s %s", JOB_ATT_SUPP, server, JOB_ATT_VAL);
-  XpAugmentAttributes(pCon, XPPrinterAttr, attrStr);
-  xfree(attrStr);
-    
-  /*
-   * xp-page-attributes-supported
-   */
-  server = XpGetOneAttribute( pCon, XPServerAttr, PAGE_ATT_SUPP );
-  if ((attrStr = (char *) xalloc(strlen(server) + strlen(PAGE_ATT_SUPP) +
-				 strlen(PAGE_ATT_VAL) + 8)) == NULL)
-  {
-      return BadAlloc;
-  }
-  sprintf(attrStr, "*%s:\t%s %s", PAGE_ATT_SUPP, server, PAGE_ATT_VAL);
-  XpAugmentAttributes(pCon, XPPrinterAttr, attrStr);
-  xfree(attrStr);
-
-  /*
-   * Validate the attribute pools
-   */
-  XpValidateAttributePool(pCon, XPPrinterAttr, &PsValidatePoolsRec);
-  XpValidateAttributePool(pCon, XPDocAttr, &PsValidatePoolsRec);
-  XpValidateAttributePool(pCon, XPJobAttr, &PsValidatePoolsRec);
-  XpValidateAttributePool(pCon, XPPageAttr, &PsValidatePoolsRec);
-
-  return Success;
-}
-
-static Bool
-PsDestroyContext(pCon)
-  XpContextPtr pCon;
-{
-  PsContextPrivPtr pConPriv = (PsContextPrivPtr)
-      dixLookupPrivate(&pCon->devPrivates, PsContextPrivateKey);
-    
-  if( pConPriv->pJobFile!=(FILE *)NULL )
-  {
-    fclose(pConPriv->pJobFile);
-    pConPriv->pJobFile = NULL;
-  }
-  if( pConPriv->jobFileName!=(char *)NULL )
-  {
-    unlink(pConPriv->jobFileName);
-    xfree(pConPriv->jobFileName);
-    pConPriv->jobFileName = (char *)NULL;
-  }
-
-  PsFreeFontInfoRecords(pConPriv);
-
-  /* Reset context to make sure we do not use any stale/invalid/obsolete data */
-  memset(pConPriv, 0, sizeof(PsContextPrivRec));
-
-/*### free up visuals/depths ###*/
-
-  return Success;
-}
-
-XpContextPtr
-PsGetContextFromWindow(win)
-  WindowPtr win;
-{
-  PsWindowPrivPtr pPriv;
-
-  while( win )
-  {
-    pPriv = (PsWindowPrivPtr)
-	dixLookupPrivate(&win->devPrivates, PsWindowPrivateKey);
-    if( pPriv->validContext ) return pPriv->context;
-    win = win->parent;
-  }
-
-  return NULL;
-}
diff --git a/hw/xprint/ps/PsLine.c b/hw/xprint/ps/PsLine.c
deleted file mode 100644
index aca1866..0000000
--- a/hw/xprint/ps/PsLine.c
+++ /dev/null
@@ -1,191 +0,0 @@
-/*
-
-Copyright 1996, 1998  The Open Group
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-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
-OPEN GROUP 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 name of The Open Group shall not be
-used in advertising or otherwise to promote the sale, use or other dealings
-in this Software without prior written authorization from The Open Group.
-
-*/
-/*
- * (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:		PsLine.c
-**    *
-**    *  Contents:	Line drawing routines for the PS driver
-**    *
-**    *  Created By:	Roger Helmendach (Liberty Systems)
-**    *
-**    *  Copyright:	Copyright 1996 The Open Group, Inc.
-**    *
-**    *********************************************************
-** 
-********************************************************************/
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#include "Ps.h"
-#include "gcstruct.h"
-#include "windowstr.h"
-
-void
-PsPolyLine(
-  DrawablePtr  pDrawable,
-  GCPtr        pGC,
-  int          mode,
-  int          nPoints,
-  xPoint      *pPoints)
-{
-  if( pDrawable->type==DRAWABLE_PIXMAP )
-  {
-    DisplayElmPtr   elm;
-    PixmapPtr       pix  = (PixmapPtr)pDrawable;
-    PsPixmapPrivPtr priv = (PsPixmapPrivPtr)pix->devPrivate.ptr;
-    DisplayListPtr  disp;
-    GCPtr           gc;
-
-    if ((gc = PsCreateAndCopyGC(pDrawable, pGC)) == NULL) return;
-
-    disp = PsGetFreeDisplayBlock(priv);
-
-    elm  = &disp->elms[disp->nelms];
-    elm->type = PolyLineCmd;
-    elm->gc   = gc;
-    elm->c.polyPts.mode    = mode;
-    elm->c.polyPts.nPoints = nPoints;
-    elm->c.polyPts.pPoints = (xPoint *)xalloc(nPoints*sizeof(xPoint));
-    memcpy(elm->c.polyPts.pPoints, pPoints, nPoints*sizeof(xPoint));
-    disp->nelms += 1;
-  }
-  else
-  {
-    int         i;
-    PsOutPtr    psOut;
-    PsPointPtr  pts;
-    ColormapPtr cMap;
-
-    if( PsUpdateDrawableGC(pGC, pDrawable, &psOut, &cMap)==FALSE ) return;
-    PsOut_Offset(psOut, pDrawable->x, pDrawable->y);
-    PsOut_Color(psOut, PsGetPixelColor(cMap, pGC->fgPixel));
-    PsLineAttrs(psOut, pGC, cMap);
-    pts = (PsPointPtr)xalloc(sizeof(PsPointRec)*nPoints);
-    if( mode==CoordModeOrigin )
-    {
-      for( i=0 ; i<nPoints ; i++ )
-        { pts[i].x = pPoints[i].x; pts[i].y = pPoints[i].y; }
-    }
-    else
-    {
-      pts[0].x = pPoints[0].x; pts[0].y = pPoints[0].y;
-      for( i=1 ; i<nPoints ;  i++ )
-      {
-        pts[i].x = pts[i-1].x+pPoints[i].x;
-        pts[i].y = pts[i-1].y+pPoints[i].y;
-      }
-    }
-    PsOut_Lines(psOut, nPoints, pts);
-    xfree(pts);
-  }
-}
-
-void
-PsPolySegment(
-  DrawablePtr  pDrawable,
-  GCPtr        pGC,
-  int          nSegments,
-  xSegment    *pSegments)
-{
-  if( pDrawable->type==DRAWABLE_PIXMAP )
-  {
-    DisplayElmPtr   elm;
-    PixmapPtr       pix  = (PixmapPtr)pDrawable;
-    PsPixmapPrivPtr priv = (PsPixmapPrivPtr)pix->devPrivate.ptr;
-    DisplayListPtr  disp;
-    GCPtr           gc;
-
-    if ((gc = PsCreateAndCopyGC(pDrawable, pGC)) == NULL) return;
-
-    disp = PsGetFreeDisplayBlock(priv);
-
-    elm  = &disp->elms[disp->nelms];
-    elm->type = PolySegmentCmd;
-    elm->gc   = gc;
-    elm->c.segments.nSegments = nSegments;
-    elm->c.segments.pSegments = (xSegment *)xalloc(nSegments*sizeof(xSegment));
-    memcpy(elm->c.segments.pSegments, pSegments, nSegments*sizeof(xSegment));
-    disp->nelms += 1;
-  }
-  else
-  {
-    int         i;
-    PsOutPtr    psOut;
-    PsPointRec  pts[2];
-    ColormapPtr cMap;
-
-    if( PsUpdateDrawableGC(pGC, pDrawable, &psOut, &cMap)==FALSE ) return;
-    PsOut_Offset(psOut, pDrawable->x, pDrawable->y);
-    PsOut_Color(psOut, PsGetPixelColor(cMap, pGC->fgPixel));
-    PsLineAttrs(psOut, pGC, cMap);
-    for( i=0 ; i<nSegments ; i++ )
-    {
-      pts[0].x = pSegments[i].x1;
-      pts[0].y = pSegments[i].y1;
-      pts[1].x = pSegments[i].x2;
-      pts[1].y = pSegments[i].y2;
-      PsOut_Lines(psOut, 2, pts);
-    }
-  }
-}
diff --git a/hw/xprint/ps/PsMisc.c b/hw/xprint/ps/PsMisc.c
deleted file mode 100644
index 8d5005f..0000000
--- a/hw/xprint/ps/PsMisc.c
+++ /dev/null
@@ -1,320 +0,0 @@
-/*
-
-Copyright 1996, 1998  The Open Group
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-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
-OPEN GROUP 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 name of The Open Group shall not be
-used in advertising or otherwise to promote the sale, use or other dealings
-in this Software without prior written authorization from The Open Group.
-
-*/
-/*
- * (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:		PsMisc.c
-**    *
-**    *  Contents:	Miscellaneous code for Ps driver.
-**    *
-**    *  Created By:	Roger Helmendach (Liberty Systems)
-**    *
-**    *  Copyright:	Copyright 1996 The Open Group, Inc.
-**    *
-**    *********************************************************
-** 
-********************************************************************/
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#include <X11/Xos.h>	/* for SIGCLD on pre-POSIX systems */
-#include <stdio.h>
-#include "Ps.h"
-
-#include "cursor.h"
-#include "resource.h"
-
-#include "windowstr.h"
-#include "propertyst.h"
-
-
-/*ARGSUSED*/
-void
-PsQueryBestSize(
-  int type,
-  short *pwidth,
-  short *pheight,
-  ScreenPtr pScreen)
-{
-  unsigned width, highBit;
-
-  switch(type)
-  {
-    case CursorShape:
-      *pwidth  = 0;
-      *pheight = 0;
-      break;
-    case TileShape:
-    case StippleShape:
-      width = *pwidth;
-      if (!width) break;
-      /* Return the nearest power of two >= what they gave us */
-      highBit = 0x80000000;
-      /* Find the highest 1 bit in the given width */
-      while(!(highBit & width))
-        highBit >>= 1;
-      /* If greater than that then return the next power of two */
-      if((highBit - 1) & width)
-        highBit <<= 1;
-      *pwidth = highBit;
-      /* height is a don't-care */
-        break;
-  }
-}
-
-/*
- * PsGetMediumDimensions is installed in the GetMediumDimensions field
- * of each Ps-initialized context.
- */
-int
-PsGetMediumDimensions(XpContextPtr pCon, CARD16 *width, CARD16 *height)
-{
-    XpGetMediumDimensions(pCon, width, height);
-    return Success;
-}
-
-/*
- * PsGetReproducibleArea is installed in the GetReproducibleArea field
- * of each Ps-initialized context.
- */
-int
-PsGetReproducibleArea(XpContextPtr pCon, xRectangle *pRect)
-{
-    XpGetReproductionArea(pCon, pRect);
-    return Success;
-}
-
-/*
- * PsSetImageResolution is installed in the SetImageResolution field
- * of each Ps-initialized context.
- */
-int
-PsSetImageResolution(XpContextPtr pCon, int imageRes, Bool *status)
-{
-    pCon->imageRes = imageRes;
-    *status = True;
-    return Success;
-}
-
-/*
- * GetPropString searches the window heirarchy from pWin up looking for
- * a property by the name of propName.  If found, returns the property's
- * value. If not, it returns NULL.
- */
-/*
-char *
-GetPropString(
-    WindowPtr pWin,
-    char *propName)
-{
-    Atom atom;
-    PropertyPtr pProp = (PropertyPtr)NULL;
-    char *retVal;
-
-    atom = MakeAtom(propName, strlen(propName), FALSE);
-    if(atom != BAD_RESOURCE)
-    {
-        WindowPtr pPropWin;
-	int rc, n;
-*/
-
-	/*
-	 * The atom has been defined, but it might only exist as a
-	 * property on an unrelated window.
-	 */
-/*
-        for(pPropWin = pWin; pPropWin != (WindowPtr)NULL; 
-	    pPropWin = pPropWin->parent)
-        {
-	    rc = dixLookupProperty(&pProp, pPropWin, atom,
-				   serverClient, DixReadAccess);
-	    if (rc == Success)
-		break;
-	    else
-		pProp = NULL;
-        }
-	if(pProp == (PropertyPtr)NULL)
-	    return (char *)NULL;
-
-	n = (pProp->format/8) * pProp->size; *//* size (bytes) of prop */
-/*
-	retVal = (char *)xalloc(n + 1);
-	(void)memcpy((void *)retVal, (void *)pProp->data, n);
-	retVal[n] = '\0';
-
-	return retVal;
-    }
-
-    return (char *)NULL;
-}
-
-#include <signal.h>
-
-*/
-/* ARGSUSED */
-/*
-static void SigchldHndlr (int dummy)
-{
-    int   status, w;
-    struct sigaction act;
-    sigfillset(&act.sa_mask);
-    act.sa_flags = 0;
-    act.sa_handler = SigchldHndlr;
-
-    w = wait (&status);
-
-*/
-    /*
-     * Is this really necessary?
-     */
-/*
-    sigaction(SIGCHLD, &act, (struct sigaction *)NULL);
-}
-*/
-
-/*
- * SystemCmd provides a wrapper for the 'system' library call.  The call
- * appears to be sensitive to the handling of SIGCHLD, so this wrapper
- * sets the status to SIG_DFL, and then resets the established handler
- * after system returns.
- */
-/*
-int
-SystemCmd(char *cmdStr)
-{
-    int status;
-    struct sigaction newAct, oldAct;
-    sigfillset(&newAct.sa_mask);
-    newAct.sa_flags = 0;
-    newAct.sa_handler = SIG_DFL;
-    sigfillset(&oldAct.sa_mask);
-    oldAct.sa_flags = 0;
-    oldAct.sa_handler = SigchldHndlr;
-
-*/
-    /*
-     * get the old handler, and set the action to IGN
-     */
-/*
-    sigaction(SIGCHLD, &newAct, &oldAct);
-
-    status = system (cmdStr);
-
-    sigaction(SIGCHLD, &oldAct, (struct sigaction *)NULL);
-    return status;
-}
-*/
-
-Bool
-PsCloseScreen(
-  int       index,
-  ScreenPtr pScreen)
-{
-  return TRUE;
-}
-
-void
-PsLineAttrs(
-  PsOutPtr    psOut,
-  GCPtr       pGC,
-  ColormapPtr cMap)
-{
-  int        i;
-  int        nDsh;
-  int        dshOff;
-  int       *dsh;
-  PsCapEnum  cap;
-  PsJoinEnum join;
-
-  switch(pGC->capStyle) {
-    case CapButt:       cap = PsCButt;   break;
-    case CapRound:      cap = PsCRound;  break;
-    case CapProjecting: cap = PsCSquare; break;
-    default:            cap = PsCButt;   break; }
-  switch(pGC->joinStyle) {
-    case JoinMiter:   join = PsJMiter; break;
-    case JoinRound:   join = PsJRound; break;
-    case JoinBevel:   join = PsJBevel; break;
-    default:          join = PsJBevel; break; }
-  if( pGC->lineStyle==LineSolid ) { nDsh = dshOff = 0; dsh = (int *)0; }
-  else
-  {
-    nDsh   = pGC->numInDashList;
-    dshOff = pGC->dashOffset;
-    if( !nDsh ) dsh = (int *)0;
-    else
-    {
-      dsh = (int *)xalloc(sizeof(int)*nDsh);
-      for( i=0 ; i<nDsh ; i++ ) dsh[i] = (int)pGC->dash[i]&0xFF;
-    }
-  }
-
-  if( pGC->lineStyle!=LineDoubleDash )
-    PsOut_LineAttrs(psOut, (int)pGC->lineWidth,
-                    cap, join, nDsh, dsh, dshOff, -1);
-  else
-    PsOut_LineAttrs(psOut, (int)pGC->lineWidth,
-                    cap, join, nDsh, dsh, dshOff,
-                    PsGetPixelColor(cMap, pGC->bgPixel));
-  if( nDsh && dsh ) xfree(dsh);
-}
diff --git a/hw/xprint/ps/PsPixel.c b/hw/xprint/ps/PsPixel.c
deleted file mode 100644
index d51cb6e..0000000
--- a/hw/xprint/ps/PsPixel.c
+++ /dev/null
@@ -1,156 +0,0 @@
-/*
-
-Copyright 1996, 1998  The Open Group
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-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
-OPEN GROUP 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 name of The Open Group shall not be
-used in advertising or otherwise to promote the sale, use or other dealings
-in this Software without prior written authorization from The Open Group.
-
-*/
-/*
- * (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:		PsPixel.c
-**    *
-**    *  Contents:	Pixel-drawing code for the PS DDX driver
-**    *
-**    *  Created By:	Roger Helmendach (Liberty Systems)
-**    *
-**    *  Copyright:	Copyright 1995 The Open Group, Inc.
-**    *
-**    *********************************************************
-** 
-********************************************************************/
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#include <stdio.h>
-
-#include "windowstr.h"
-#include "gcstruct.h"
-
-#include "Ps.h"
-
-void
-PsPolyPoint(
-  DrawablePtr  pDrawable,
-  GCPtr        pGC,
-  int          mode,
-  int          nPoints,
-  xPoint      *pPoints)
-{
-  if( pDrawable->type==DRAWABLE_PIXMAP )
-  {
-    DisplayElmPtr   elm;
-    PixmapPtr       pix  = (PixmapPtr)pDrawable;
-    PsPixmapPrivPtr priv = (PsPixmapPrivPtr)pix->devPrivate.ptr;
-    DisplayListPtr  disp;
-    GCPtr           gc;
-
-    if ((gc = PsCreateAndCopyGC(pDrawable, pGC)) == NULL) return;
-
-    disp = PsGetFreeDisplayBlock(priv);
-
-    elm  = &disp->elms[disp->nelms];
-    elm->type = PolyPointCmd;
-    elm->gc   = gc;
-    elm->c.polyPts.mode    = mode;
-    elm->c.polyPts.nPoints = nPoints;
-    elm->c.polyPts.pPoints = (xPoint *)xalloc(nPoints*sizeof(xPoint));
-    memcpy(elm->c.polyPts.pPoints, pPoints, nPoints*sizeof(xPoint));
-    disp->nelms += 1;
-  }
-  else
-  {
-    int         i;
-    PsOutPtr    psOut;
-    PsPointPtr  pts;
-    ColormapPtr cMap;
-
-    if( PsUpdateDrawableGC(pGC, pDrawable, &psOut, &cMap)==FALSE ) return;
-    PsOut_Offset(psOut, pDrawable->x, pDrawable->y);
-    PsOut_Color(psOut, PsGetPixelColor(cMap, pGC->fgPixel));
-    pts = (PsPointPtr)xalloc(sizeof(PsPointRec)*nPoints);
-    if( mode==CoordModeOrigin )
-    {
-      for( i=0 ; i<nPoints ; i++ )
-        { pts[i].x = pPoints[i].x; pts[i].y = pPoints[i].y; }
-    }
-    else
-    {
-      pts[0].x = pPoints[0].x; pts[0].y = pPoints[0].y;
-      for( i=1 ; i<nPoints ;  i++ )
-      {
-        pts[i].x = pts[i-1].x+pPoints[i].x;
-        pts[i].y = pts[i-1].y+pPoints[i].y;
-      }
-    }
-    PsOut_Points(psOut, nPoints, pts);
-    xfree(pts);
-  }
-}
-
-void
-PsPushPixels(
-  GCPtr       pGC,
-  PixmapPtr   pBitmap,
-  DrawablePtr pDrawable,
-  int         width,
-  int         height,
-  int         x,
-  int         y)
-{
-}
diff --git a/hw/xprint/ps/PsPixmap.c b/hw/xprint/ps/PsPixmap.c
deleted file mode 100644
index a588f42..0000000
--- a/hw/xprint/ps/PsPixmap.c
+++ /dev/null
@@ -1,623 +0,0 @@
-/*
-
-Copyright 1996, 1998  The Open Group
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-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
-OPEN GROUP 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 name of The Open Group shall not be
-used in advertising or otherwise to promote the sale, use or other dealings
-in this Software without prior written authorization from The Open Group.
-
-*/
-/*
- * (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:		PsPixmap.c
-**    *
-**    *  Contents:	Pixmap functions for the PS DDX driver
-**    *
-**    *  Created By:	Roger Helmendach (Liberty Systems)
-**    *
-**    *  Copyright:	Copyright 1995 The Open Group, Inc.
-**    *
-**    *********************************************************
-** 
-********************************************************************/
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#include "windowstr.h"
-#include "gcstruct.h"
-#include "privates.h"
-
-#include "Ps.h"
-
-#define _BitsPerPixel(d) (\
-  (1 << PixmapWidthPaddingInfo[d].padBytesLog2) * 8 / \
-  (PixmapWidthPaddingInfo[d].padRoundUp+1))
-
-PixmapPtr
-PsCreatePixmap(
-  ScreenPtr pScreen,
-  int       width,
-  int       height,
-  int       depth,
-  unsigned  usage_hint)
-{
-  PixmapPtr pPixmap;
-
-  pPixmap = (PixmapPtr)xcalloc(1, sizeof(PixmapRec));
-  if( !pPixmap)  return NullPixmap;
-  pPixmap->drawable.type         = DRAWABLE_PIXMAP;
-  pPixmap->drawable.class        = 0;
-  pPixmap->drawable.pScreen      = pScreen;
-  pPixmap->drawable.depth        = depth;
-  pPixmap->drawable.bitsPerPixel = _BitsPerPixel(depth);
-  pPixmap->drawable.id           = 0;
-  pPixmap->drawable.serialNumber = NEXT_SERIAL_NUMBER;
-  pPixmap->drawable.x            = 0;
-  pPixmap->drawable.y            = 0;
-  pPixmap->drawable.width        = width;
-  pPixmap->drawable.height       = height;
-  pPixmap->devKind               = 0;
-  pPixmap->refcnt                = 1;
-  pPixmap->devPrivates		 = NULL;
-
-  pPixmap->devPrivate.ptr = (PsPixmapPrivPtr)xcalloc(1, sizeof(PsPixmapPrivRec));
-  if( !pPixmap->devPrivate.ptr )
-    { xfree(pPixmap); return NullPixmap; }
-  return pPixmap;
-}
-
-/* PsScrubPixmap: Remove all content from a pixmap (used by
- * |PsPolyFillRect()| when the "solid fill" operation covers
- * the whole pixmap) */
-void
-PsScrubPixmap(PixmapPtr pPixmap)
-{
-  PsPixmapPrivPtr priv = (PsPixmapPrivPtr)pPixmap->devPrivate.ptr;
-  DisplayListPtr  disp = priv->dispList;
-
-  while( disp )
-  {
-    int            i;
-    DisplayListPtr oldDisp = disp;
-    disp = disp->next;
-    for( i=0 ; i<oldDisp->nelms ; i++ )
-    {
-      DisplayElmPtr elm = &oldDisp->elms[i];
-
-      switch(elm->type)
-      {
-        case PolyPointCmd:
-        case PolyLineCmd:
-          if( elm->c.polyPts.pPoints ) xfree(elm->c.polyPts.pPoints);
-          break;
-        case PolySegmentCmd:
-          if( elm->c.segments.pSegments ) xfree(elm->c.segments.pSegments);
-          break;
-        case PolyRectangleCmd:
-          if( elm->c.rects.pRects ) xfree(elm->c.rects.pRects);
-          break;
-        case FillPolygonCmd:
-          if( elm->c.polyPts.pPoints ) xfree(elm->c.polyPts.pPoints);
-          break;
-        case PolyFillRectCmd:
-          if( elm->c.rects.pRects ) xfree(elm->c.rects.pRects);
-          break;
-        case PolyArcCmd:
-          if( elm->c.arcs.pArcs ) xfree(elm->c.arcs.pArcs);
-          break;
-        case PolyFillArcCmd:
-          if( elm->c.arcs.pArcs ) xfree(elm->c.arcs.pArcs);
-          break;
-        case Text8Cmd:
-        case TextI8Cmd:
-          if( elm->c.text8.string ) xfree(elm->c.text8.string);
-          break;
-        case Text16Cmd:
-        case TextI16Cmd:
-          if( elm->c.text16.string ) xfree(elm->c.text16.string);
-          break;
-        case PutImageCmd:
-          if( elm->c.image.pData ) xfree(elm->c.image.pData);
-          break;
-        case BeginFrameCmd:
-          break;
-        case EndFrameCmd:
-          break;
-      }
-
-      if (elm->type != BeginFrameCmd && elm->type != EndFrameCmd) {
-	  (void) FreeGC(elm->gc, (GContext) 0);
-      }
-    }
-    xfree(oldDisp);
-  }
-
-  priv->dispList = NULL;
-}
-
-Bool
-PsDestroyPixmap(PixmapPtr pPixmap)
-{
-  PsPixmapPrivPtr priv = (PsPixmapPrivPtr)pPixmap->devPrivate.ptr;
-
-  if( --pPixmap->refcnt ) return TRUE;
-
-  PsScrubPixmap(pPixmap);
-
-  xfree(priv);
-  dixFreePrivates(pPixmap->devPrivates);
-  xfree(pPixmap);
-  return TRUE;
-}
-
-DisplayListPtr
-PsGetFreeDisplayBlock(PsPixmapPrivPtr priv)
-{
-  DisplayListPtr disp = priv->dispList;
-
-  for(; disp ; disp=disp->next )
-  {
-    if( disp->nelms>=DPY_BLOCKSIZE && disp->next ) continue;
-    if( disp->nelms<DPY_BLOCKSIZE ) return(disp);
-    disp->next = (DisplayListPtr)xcalloc(1, sizeof(DisplayListRec));
-    disp->next->next  = (DisplayListPtr)0;
-    disp->next->nelms = 0;
-  }
-  disp = (DisplayListPtr)xcalloc(1, sizeof(DisplayListRec));
-  disp->next     = (DisplayListPtr)0;
-  disp->nelms    = 0;
-  priv->dispList = disp;
-  return(disp);
-}
-
-void
-PsReplay(DisplayElmPtr elm, DrawablePtr pDrawable)
-{
-  switch(elm->type)
-  {
-    case PolyPointCmd:
-      PsPolyPoint(pDrawable, elm->gc, elm->c.polyPts.mode,
-                 elm->c.polyPts.nPoints, elm->c.polyPts.pPoints);
-      break;
-    case PolyLineCmd:
-      PsPolyLine(pDrawable, elm->gc, elm->c.polyPts.mode,
-                 elm->c.polyPts.nPoints, elm->c.polyPts.pPoints);
-      break;
-    case PolySegmentCmd:
-      PsPolySegment(pDrawable, elm->gc, elm->c.segments.nSegments,
-                    elm->c.segments.pSegments);
-      break;
-    case PolyRectangleCmd:
-      PsPolyRectangle(pDrawable, elm->gc, elm->c.rects.nRects,
-                      elm->c.rects.pRects);
-      break;
-    case FillPolygonCmd:
-      PsFillPolygon(pDrawable, elm->gc, 0, elm->c.polyPts.mode,
-                    elm->c.polyPts.nPoints, elm->c.polyPts.pPoints);
-      break;
-    case PolyFillRectCmd:
-      PsPolyFillRect(pDrawable, elm->gc, elm->c.rects.nRects,
-                     elm->c.rects.pRects);
-      break;
-    case PolyArcCmd:
-      PsPolyArc(pDrawable, elm->gc, elm->c.arcs.nArcs, elm->c.arcs.pArcs);
-      break;
-    case PolyFillArcCmd:
-      PsPolyFillArc(pDrawable, elm->gc, elm->c.arcs.nArcs, elm->c.arcs.pArcs);
-      break;
-    case Text8Cmd:
-      PsPolyText8(pDrawable, elm->gc, elm->c.text8.x, elm->c.text8.y,
-                  elm->c.text8.count, elm->c.text8.string);
-      break;
-    case Text16Cmd:
-      PsPolyText16(pDrawable, elm->gc, elm->c.text16.x, elm->c.text16.y,
-                   elm->c.text16.count, elm->c.text16.string);
-      break;
-    case TextI8Cmd:
-      PsImageText8(pDrawable, elm->gc, elm->c.text8.x, elm->c.text8.y,
-                   elm->c.text8.count, elm->c.text8.string);
-      break;
-    case TextI16Cmd:
-      PsImageText16(pDrawable, elm->gc, elm->c.text16.x, elm->c.text16.y,
-                    elm->c.text16.count, elm->c.text16.string);
-      break;
-    case PutImageCmd:
-      PsPutScaledImage(pDrawable, elm->gc, elm->c.image.depth,
-		       elm->c.image.x, elm->c.image.y,
-		       elm->c.image.w, elm->c.image.h, elm->c.image.leftPad,
-		       elm->c.image.format, elm->c.image.res,
-		       elm->c.image.pData);
-      break;
-    case BeginFrameCmd:
-      {
-        PsOutPtr     psOut;
-        ColormapPtr  cMap;
-        if( PsUpdateDrawableGC(NULL, pDrawable, &psOut, &cMap)==FALSE ) return;
-        PsOut_BeginFrame(psOut, 0, 0, elm->c.frame.x, elm->c.frame.y,
-                         elm->c.frame.w, elm->c.frame.h);
-      }
-      break;
-    case EndFrameCmd:
-      {
-        PsOutPtr     psOut;
-        ColormapPtr  cMap;
-        if( PsUpdateDrawableGC(NULL, pDrawable, &psOut, &cMap)==FALSE ) return;
-        PsOut_EndFrame(psOut);
-      }
-      break;
-  }
-}
-
-void
-PsReplayPixmap(PixmapPtr pix, DrawablePtr pDrawable)
-{
-  PsPixmapPrivPtr priv = (PsPixmapPrivPtr)pix->devPrivate.ptr;
-  DisplayListPtr  disp = priv->dispList;
-  DisplayElmPtr   elm;
-
-  for(; disp ; disp=disp->next )
-  {
-    int  i;
-    for( i=0,elm=disp->elms ; i<disp->nelms ; i++,elm++ )
-      PsReplay(elm, pDrawable);
-  }
-}
-
-int
-PsCloneDisplayElm(PixmapPtr dst, DisplayElmPtr elm, DisplayElmPtr newElm, 
-		  int xoff, int yoff)
-{
-  int           i;
-  int           size;
-  int           status = 0;
-
-  *newElm = *elm;
-
-  /* I think this is the correct return value */
-  if ((newElm->gc = PsCreateAndCopyGC(&dst->drawable, elm->gc)) == NULL) {
-      return 1;
-  }
-
-  switch(elm->type)
-  {
-    case PolyPointCmd:
-    case PolyLineCmd:
-      newElm->c.polyPts.pPoints =
-        (xPoint *)xalloc(elm->c.polyPts.nPoints*sizeof(xPoint));
-      for( i=0 ; i<elm->c.polyPts.nPoints ; i++ )
-      {
-        newElm->c.polyPts.pPoints[i].x = elm->c.polyPts.pPoints[i].x+xoff;
-        newElm->c.polyPts.pPoints[i].y = elm->c.polyPts.pPoints[i].y+yoff;
-      }
-      break;
-    case PolySegmentCmd:
-      newElm->c.segments.pSegments =
-        (xSegment *)xalloc(elm->c.segments.nSegments*sizeof(xSegment));
-      for( i=0 ; i<elm->c.segments.nSegments ; i++ )
-      {
-        newElm->c.segments.pSegments[i].x1 =
-           elm->c.segments.pSegments[i].x1+xoff;
-        newElm->c.segments.pSegments[i].y1 =
-           elm->c.segments.pSegments[i].y1+yoff;
-        newElm->c.segments.pSegments[i].x2 =
-           elm->c.segments.pSegments[i].x2+xoff;
-        newElm->c.segments.pSegments[i].y2 =
-           elm->c.segments.pSegments[i].y2+yoff;
-      }
-      break;
-    case PolyRectangleCmd:
-      newElm->c.rects.pRects =
-        (xRectangle *)xalloc(elm->c.rects.nRects*sizeof(xRectangle));
-      for( i=0 ; i<elm->c.rects.nRects ; i++ )
-      {
-        newElm->c.rects.pRects[i].x      = elm->c.rects.pRects[i].x+xoff;
-        newElm->c.rects.pRects[i].y      = elm->c.rects.pRects[i].y+yoff;
-        newElm->c.rects.pRects[i].width  = elm->c.rects.pRects[i].width;
-        newElm->c.rects.pRects[i].height = elm->c.rects.pRects[i].height;
-      }
-      break;
-    case FillPolygonCmd:
-      newElm->c.polyPts.pPoints =
-        (xPoint *)xalloc(elm->c.polyPts.nPoints*sizeof(xPoint));
-      for( i=0 ; i<elm->c.polyPts.nPoints ; i++ )
-      {
-        newElm->c.polyPts.pPoints[i].x = elm->c.polyPts.pPoints[i].x+xoff;
-        newElm->c.polyPts.pPoints[i].y = elm->c.polyPts.pPoints[i].y+yoff;
-      }
-      break;
-    case PolyFillRectCmd:
-      newElm->c.rects.pRects =
-        (xRectangle *)xalloc(elm->c.rects.nRects*sizeof(xRectangle));
-      for( i=0 ; i<elm->c.rects.nRects ; i++ )
-      {
-        newElm->c.rects.pRects[i].x      = elm->c.rects.pRects[i].x+xoff;
-        newElm->c.rects.pRects[i].y      = elm->c.rects.pRects[i].y+yoff;
-        newElm->c.rects.pRects[i].width  = elm->c.rects.pRects[i].width;
-        newElm->c.rects.pRects[i].height = elm->c.rects.pRects[i].height;
-      }
-      break;
-    case PolyArcCmd:
-      newElm->c.arcs.pArcs =
-        (xArc *)xalloc(elm->c.arcs.nArcs*sizeof(xArc));
-      for( i=0 ; i<elm->c.arcs.nArcs ; i++ )
-      {
-        newElm->c.arcs.pArcs[i].x      = elm->c.arcs.pArcs[i].x+xoff;
-        newElm->c.arcs.pArcs[i].y      = elm->c.arcs.pArcs[i].y+yoff;
-        newElm->c.arcs.pArcs[i].width  = elm->c.arcs.pArcs[i].width;
-        newElm->c.arcs.pArcs[i].height = elm->c.arcs.pArcs[i].height;
-        newElm->c.arcs.pArcs[i].angle1 = elm->c.arcs.pArcs[i].angle1;
-        newElm->c.arcs.pArcs[i].angle2 = elm->c.arcs.pArcs[i].angle2;
-      }
-      break;
-    case PolyFillArcCmd:
-      newElm->c.arcs.pArcs =
-        (xArc *)xalloc(elm->c.arcs.nArcs*sizeof(xArc));
-      for( i=0 ; i<elm->c.arcs.nArcs ; i++ )
-      {
-        newElm->c.arcs.pArcs[i].x      = elm->c.arcs.pArcs[i].x+xoff;
-        newElm->c.arcs.pArcs[i].y      = elm->c.arcs.pArcs[i].y+yoff;
-        newElm->c.arcs.pArcs[i].width  = elm->c.arcs.pArcs[i].width;
-        newElm->c.arcs.pArcs[i].height = elm->c.arcs.pArcs[i].height;
-        newElm->c.arcs.pArcs[i].angle1 = elm->c.arcs.pArcs[i].angle1;
-        newElm->c.arcs.pArcs[i].angle2 = elm->c.arcs.pArcs[i].angle2;
-      }
-      break;
-    case Text8Cmd:
-    case TextI8Cmd:
-      newElm->c.text8.string = (char *)xalloc(elm->c.text8.count);
-      memcpy(newElm->c.text8.string, elm->c.text8.string, elm->c.text8.count);
-      newElm->c.text8.x += xoff;
-      newElm->c.text8.y += yoff;
-      break;
-    case Text16Cmd:
-    case TextI16Cmd:
-      newElm->c.text16.string =
-        (unsigned short *)xalloc(elm->c.text16.count*sizeof(unsigned short));
-      memcpy(newElm->c.text16.string, elm->c.text16.string,
-             elm->c.text16.count*sizeof(unsigned short));
-      newElm->c.text16.x += xoff;
-      newElm->c.text16.y += yoff;
-      break;
-    case PutImageCmd:
-      size = PixmapBytePad(elm->c.image.w, elm->c.image.depth)*elm->c.image.h;
-      newElm->c.image.pData = (char *)xalloc(size);
-      memcpy(newElm->c.image.pData, elm->c.image.pData, size);
-      newElm->c.image.x += xoff;
-      newElm->c.image.y += yoff;
-      break;
-    case BeginFrameCmd:
-    case EndFrameCmd:
-      status = 1;
-      break;
-  }
-  return(status);
-}
-
-void
-PsCopyDisplayList(PixmapPtr src, PixmapPtr dst, int xoff, int yoff,
-                  int x, int y, int w, int h)
-{
-  PsPixmapPrivPtr sPriv = (PsPixmapPrivPtr)src->devPrivate.ptr;
-  PsPixmapPrivPtr dPriv = (PsPixmapPrivPtr)dst->devPrivate.ptr;
-  DisplayListPtr  sDisp;
-  DisplayListPtr  dDisp = PsGetFreeDisplayBlock(dPriv);
-  DisplayElmPtr   elm   = &dDisp->elms[dDisp->nelms];
-
-  elm->type = BeginFrameCmd;
-  elm->c.frame.x = x;
-  elm->c.frame.y = y;
-  elm->c.frame.w = w;
-  elm->c.frame.h = h;
-  dDisp->nelms += 1;
-
-  sDisp = sPriv->dispList;
-  for(; sDisp ; sDisp=sDisp->next )
-  {
-    int  i;
-    for( i=0,elm=sDisp->elms ; i<sDisp->nelms ; i++,elm++ )
-    {
-      dDisp = PsGetFreeDisplayBlock(dPriv);
-      if (PsCloneDisplayElm(dst, elm, &dDisp->elms[dDisp->nelms],
-			    xoff, yoff)==0)
-      {
-	  dDisp->nelms += 1;
-      }
-    }
-  }
-
-  dDisp = PsGetFreeDisplayBlock(dPriv);
-  elm   = &dDisp->elms[dDisp->nelms];
-  elm->type = EndFrameCmd;
-  dDisp->nelms += 1;
-}
-
-PsElmPtr
-PsCreateFillElementList(PixmapPtr pix, int *nElms)
-{
-  PsElmPtr        elms = (PsElmPtr)0;
-  PsPixmapPrivPtr priv = (PsPixmapPrivPtr)pix->devPrivate.ptr;
-  DisplayListPtr  disp = priv->dispList;
-  PsArcEnum       styl;
-
-  *nElms = 0;
-  for(; disp ; disp=disp->next )
-  {
-    int           i;
-    DisplayElmPtr elm = disp->elms;
-
-    for( i=0 ; i<disp->nelms ; i++,elm++ )
-    {
-      if( !elm->gc ) continue; /* workaround for https://freedesktop.org/bugzilla/show_bug.cgi?id=1416 */
-      if( !elm->gc->fgPixel ) continue;
-      switch(elm->type)
-      {
-        case FillPolygonCmd:
-          *nElms += 1;
-          break;
-        case PolyFillRectCmd:
-          *nElms += elm->c.rects.nRects;
-          break;
-        case PolyFillArcCmd:
-          *nElms += elm->c.arcs.nArcs;
-          break;
-        default: /* keep the compiler happy with unhandled enums */
-          break;
-      }
-    }
-  }
-
-  if( (*nElms) )
-  {
-    elms = (PsElmPtr)xcalloc(1, (*nElms)*sizeof(PsElmRec));
-    if( elms )
-    {
-      disp = priv->dispList;
-      *nElms = 0;
-      for(; disp ; disp=disp->next )
-      {
-        int           i, k;
-        DisplayElmPtr elm = disp->elms;
-
-        for( i=0 ; i<disp->nelms ; i++,elm++ )
-        {
-          if( !elm->gc->fgPixel ) continue;
-          switch(elm->type)
-          {
-            case FillPolygonCmd:
-              elms[*nElms].type     = PSOUT_POINTS;
-              elms[*nElms].nPoints  = elm->c.polyPts.nPoints;
-              elms[*nElms].c.points =
-                  (PsPointPtr)xalloc(elms[*nElms].nPoints*sizeof(PsPointRec));
-              for( k=0 ; k<elms[*nElms].nPoints ; k++ )
-              {
-                elms[*nElms].c.points[k].x = elm->c.polyPts.pPoints[k].x;
-                elms[*nElms].c.points[k].y = elm->c.polyPts.pPoints[k].y;
-              }
-              *nElms += 1;
-              break;
-            case PolyFillRectCmd:
-              for( k=0 ; k<elm->c.rects.nRects ; k++ )
-              {
-                elms[*nElms].type = PSOUT_RECT;
-                elms[*nElms].nPoints  = 0;
-                elms[*nElms].c.rect.x = elm->c.rects.pRects[k].x;
-                elms[*nElms].c.rect.y = elm->c.rects.pRects[k].y;
-                elms[*nElms].c.rect.w = elm->c.rects.pRects[k].width;
-                elms[*nElms].c.rect.h = elm->c.rects.pRects[k].height;
-                *nElms += 1;
-              }
-              break;
-            case PolyFillArcCmd:
-              if( elm->gc->arcMode==ArcChord ) styl = PsChord;
-              else                            styl = PsPieSlice;
-              for( k=0 ; k<elm->c.rects.nRects ; k++ )
-              {
-                elms[*nElms].type = PSOUT_ARC;
-                elms[*nElms].nPoints     = 0;
-                elms[*nElms].c.arc.x     = elm->c.arcs.pArcs[k].x;
-                elms[*nElms].c.arc.y     = elm->c.arcs.pArcs[k].y;
-                elms[*nElms].c.arc.w     = elm->c.arcs.pArcs[k].width;
-                elms[*nElms].c.arc.h     = elm->c.arcs.pArcs[k].height;
-                elms[*nElms].c.arc.a1    = elm->c.arcs.pArcs[k].angle1;
-                elms[*nElms].c.arc.a2    = elm->c.arcs.pArcs[k].angle2;
-                elms[*nElms].c.arc.style = styl;
-                *nElms += 1;
-              }
-              break;
-            default:  /* keep the compiler happy with unhandled enums */
-              break;
-          }
-        }
-      }
-    }
-  }
-  return(elms);
-}
-
-PsElmPtr
-PsCloneFillElementList(int nElms, PsElmPtr elms)
-{
-  int      i;
-  PsElmPtr newElms;
-
-  newElms = (PsElmPtr)xcalloc(1, nElms*sizeof(PsElmRec));
-  if( !newElms ) return(newElms);
-  for( i=0 ; i<nElms ; i++ )
-  {
-    newElms[i] = elms[i];
-
-    if( elms[i].type==PSOUT_POINTS )
-    {
-      newElms[i].c.points =
-             (PsPointPtr)xalloc(elms[i].nPoints*sizeof(PsElmRec));
-      memcpy(newElms[i].c.points, elms[i].c.points,
-             elms[i].nPoints*sizeof(PsPointRec));
-    }
-  }
-  return(newElms);
-}
-
-void
-PsDestroyFillElementList(int nElms, PsElmPtr elms)
-{
-  int  i;
-
-  for( i=0 ; i<nElms ; i++ )
-    { if( elms[i].type==PSOUT_POINTS ) xfree(elms[i].c.points); }
-
-  xfree(elms);
-}
diff --git a/hw/xprint/ps/PsPolygon.c b/hw/xprint/ps/PsPolygon.c
deleted file mode 100644
index fe46260..0000000
--- a/hw/xprint/ps/PsPolygon.c
+++ /dev/null
@@ -1,259 +0,0 @@
-/*
-
-Copyright 1996, 1998  The Open Group
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-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
-OPEN GROUP 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 name of The Open Group shall not be
-used in advertising or otherwise to promote the sale, use or other dealings
-in this Software without prior written authorization from The Open Group.
-
-*/
-/*
- * (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:		PsPolygon.c
-**    *
-**    *  Contents:	Draws Polygons and Rectangles for the PS DDX
-**    *
-**    *  Created By:	Roger Helmendach (Liberty Systems)
-**    *
-**    *  Copyright:	Copyright 1996 The Open Group, Inc.
-**    *
-**    *********************************************************
-** 
-********************************************************************/
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#include "Ps.h"
-#include "gcstruct.h"
-#include "windowstr.h"
-
-void
-PsPolyRectangle(
-  DrawablePtr pDrawable,
-  GCPtr       pGC,
-  int         nRects,
-  xRectangle *pRects)
-{
-  if( pDrawable->type==DRAWABLE_PIXMAP )
-  {
-    DisplayElmPtr   elm;
-    PixmapPtr       pix  = (PixmapPtr)pDrawable;
-    PsPixmapPrivPtr priv = (PsPixmapPrivPtr)pix->devPrivate.ptr;
-    DisplayListPtr  disp;
-    GCPtr           gc;
-
-    if ((gc = PsCreateAndCopyGC(pDrawable, pGC)) == NULL) return;
-
-    disp = PsGetFreeDisplayBlock(priv);
-
-    elm  = &disp->elms[disp->nelms];
-    elm->type = PolyRectangleCmd;
-    elm->gc   = gc;
-    elm->c.rects.nRects = nRects;
-    elm->c.rects.pRects = (xRectangle *)xalloc(nRects*sizeof(xRectangle));
-    memcpy(elm->c.rects.pRects, pRects, nRects*sizeof(xRectangle));
-    disp->nelms += 1;
-  }
-  else
-  {
-    int         i;
-    PsOutPtr    psOut;
-    ColormapPtr cMap;
-
-    if( PsUpdateDrawableGC(pGC, pDrawable, &psOut, &cMap)==FALSE ) return;
-    PsOut_Offset(psOut, pDrawable->x, pDrawable->y);
-    PsOut_Color(psOut, PsGetPixelColor(cMap, pGC->fgPixel));
-    PsLineAttrs(psOut, pGC, cMap);
-    for( i=0 ; i<nRects ; i++ )
-    {
-      PsOut_DrawRect(psOut, (int)pRects[i].x, (int)pRects[i].y,
-                     (int)pRects[i].width, (int)pRects[i].height);
-    }
-  }
-}
-
-void
-PsFillPolygon(
-  DrawablePtr   pDrawable,
-  GCPtr         pGC,
-  int           shape,
-  int           mode,
-  int           nPoints,
-  DDXPointPtr   pPoints)
-{
-  if( pDrawable->type==DRAWABLE_PIXMAP )
-  {
-    DisplayElmPtr   elm;
-    PixmapPtr       pix  = (PixmapPtr)pDrawable;
-    PsPixmapPrivPtr priv = (PsPixmapPrivPtr)pix->devPrivate.ptr;
-    DisplayListPtr  disp;
-    GCPtr           gc;
-
-    if ((gc = PsCreateAndCopyGC(pDrawable, pGC)) == NULL) return;
-
-    disp = PsGetFreeDisplayBlock(priv);
-
-    elm  = &disp->elms[disp->nelms];
-    elm->type = FillPolygonCmd;
-    elm->gc   = gc;
-    elm->c.polyPts.mode    = mode;
-    elm->c.polyPts.nPoints = nPoints;
-    elm->c.polyPts.pPoints = (xPoint *)xalloc(nPoints*sizeof(xPoint));
-    memcpy(elm->c.polyPts.pPoints, pPoints, nPoints*sizeof(xPoint));
-    disp->nelms += 1;
-  }
-  else
-  {
-    int           i;
-    PsOutPtr      psOut;
-    PsPointPtr    pts;
-    PsRuleEnum    rule;
-    ColormapPtr   cMap;
-
-    if( PsUpdateDrawableGC(pGC, pDrawable, &psOut, &cMap)==FALSE ) return;
-    PsOut_Offset(psOut, pDrawable->x, pDrawable->y);
-    PsSetFillColor(pDrawable, pGC, psOut, cMap);
-    if( pGC->fillRule==EvenOddRule ) rule = PsEvenOdd;
-    else                             rule = PsNZWinding;
-    PsOut_FillRule(psOut, rule);
-    pts = (PsPointPtr)xalloc(sizeof(PsPointRec)*nPoints);
-    if( mode==CoordModeOrigin )
-    {
-      for( i=0 ; i<nPoints ; i++ )
-        { pts[i].x = pPoints[i].x; pts[i].y = pPoints[i].y; }
-    }
-    else
-    {
-      i = 0;
-      pts[0].x = pPoints[i].x; pts[0].y = pPoints[i].y;
-      for( i=1 ; i<nPoints ;  i++ )
-      {
-        pts[i].x = pts[i-1].x+pPoints[i].x;
-        pts[i].y = pts[i-1].y+pPoints[i].y;
-      }
-    }
-    PsOut_Polygon(psOut, nPoints, pts);
-    xfree(pts);
-  }
-}
-
-void
-PsPolyFillRect(
-  DrawablePtr pDrawable,
-  GCPtr       pGC,
-  int         nRects,
-  xRectangle *pRects)
-{
-  if( pDrawable->type==DRAWABLE_PIXMAP )
-  {
-    DisplayElmPtr   elm;
-    PixmapPtr       pix  = (PixmapPtr)pDrawable;
-    PsPixmapPrivPtr priv = (PsPixmapPrivPtr)pix->devPrivate.ptr;
-    DisplayListPtr  disp;
-    GCPtr           gc;
-
-#ifdef DBE
-    /* Remove previous pixmap content if we render one single rect which
-     * covers the whole pixmap surface (this optimisation was added for
-     * the double-buffer extension ("DBE") which uses |PolyFillRect()|
-     * to clear the buffer - but it makes sense in other cases, too).
-     */    
-    if (nRects == 1)
-    {
-      if ( (pRects[0].x==0) && (pRects[0].y==0) &&
-           (pRects[0].width==pDrawable->width) && (pRects[0].height==pDrawable->height) &&
-           (pGC->fillStyle == FillSolid) &&
-           (noDbeExtension == False))
-      {
-#ifdef DEBUG_gismobile
-        ErrorF("PsPolyFillRect: scrubbing pixmap...\n");
-#endif /* DEBUG_gismobile */
-        /* Remove all content from the pixmap as it would be covered
-         * by the whole rect anyway */
-        PsScrubPixmap((PixmapPtr)pDrawable);
-      }
-    }
-#endif /* DBE */
-
-    if ((gc = PsCreateAndCopyGC(pDrawable, pGC)) == NULL) return;
-
-    disp = PsGetFreeDisplayBlock(priv);
-
-    elm  = &disp->elms[disp->nelms];
-    elm->type = PolyFillRectCmd;
-    elm->gc   = gc;
-    elm->c.rects.nRects = nRects;
-    elm->c.rects.pRects = (xRectangle *)xalloc(nRects*sizeof(xRectangle));
-    memcpy(elm->c.rects.pRects, pRects, nRects*sizeof(xRectangle));
-    disp->nelms += 1;
-  }
-  else
-  {
-    int         i;
-    PsOutPtr    psOut;
-    ColormapPtr cMap;
-
-    if( PsUpdateDrawableGC(pGC, pDrawable, &psOut, &cMap)==FALSE ) return;
-    PsOut_Offset(psOut, pDrawable->x, pDrawable->y);
-    PsSetFillColor(pDrawable, pGC, psOut, cMap);
-    for( i=0 ; i<nRects ; i++ )
-    {
-      PsOut_FillRect(psOut, (int)pRects[i].x, (int)pRects[i].y,
-                     (int)pRects[i].width, (int)pRects[i].height);
-    }
-  }
-}
diff --git a/hw/xprint/ps/PsPrint.c b/hw/xprint/ps/PsPrint.c
deleted file mode 100644
index 3866468..0000000
--- a/hw/xprint/ps/PsPrint.c
+++ /dev/null
@@ -1,459 +0,0 @@
-/*
-
-Copyright 1996, 1998  The Open Group
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-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
-OPEN GROUP 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 name of The Open Group shall not be
-used in advertising or otherwise to promote the sale, use or other dealings
-in this Software without prior written authorization from The Open Group.
-
-*/
-/*
- * (c) Copyright 1996 Hewlett-Packard Company
- * (c) Copyright 1996 International Business Machines Corp.
- * (c) Copyright 1996, 2000 Sun Microsystems, Inc.  All rights reserved.
- * (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:		PsPrint.c
-**    *
-**    *  Contents:	Print extension code of Ps driver
-**    *
-**    *  Created By:	Roger Helmendach (Liberty Systems)
-**    *
-**    *  Copyright:	Copyright 1996 The Open Group, Inc.
-**    *
-**    *********************************************************
-** 
-********************************************************************/
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#include <stdio.h>
-#include <string.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/wait.h>
-#include <unistd.h>
-#include <errno.h>
-#include <X11/Xprotostr.h>
-
-#define NEED_EVENTS
-#include <X11/Xproto.h>
-#undef NEED_EVENTS
-
-#include "Ps.h"
-
-#include "windowstr.h"
-#include "attributes.h"
-#include "Oid.h"
-
-/* static utility function to get document/page attributes */
-static void
-S_GetPageAttributes(XpContextPtr pCon,int *iorient,int *icount, int *iplex,
-                  int *ires, unsigned short *iwd, unsigned short *iht)
-{
-    char               *count;
-    XpOid              orient, plex;
-    /*
-     *  Get the orientation
-     */
-    orient = XpGetContentOrientation(pCon);
-    switch (orient) {
-    case xpoid_val_content_orientation_landscape:
-      *iorient = 1;
-      break;
-    case xpoid_val_content_orientation_reverse_portrait:
-      *iorient = 2;
-      break;
-    case xpoid_val_content_orientation_reverse_landscape:
-      *iorient = 3;
-      break;
-    case xpoid_val_content_orientation_portrait:
-    default:
-      *iorient = 0;
-      break;
-    }
-
-    /*
-     *  Get the count
-     */
-    count = XpGetOneAttribute(pCon, XPDocAttr, "copy-count");
-    if( count )
-    {
-      int ii = sscanf(count, "%d", icount);
-      if( ii!=1 ) *icount = 1;
-    }
-    else *icount = 1;
-
-    /*
-     * Get the plex
-     */
-    plex = XpGetPlex(pCon);
-    switch(plex)
-    {
-    case xpoid_val_plex_duplex:
-      *iplex = 1;
-      break;
-    case xpoid_val_plex_tumble:
-      *iplex = 2;
-      break;
-    default:
-      *iplex = 0;
-      break;
-    }
-
-  /*
-   *  Get the resolution and media size
-   */
-    *ires = XpGetResolution(pCon);
-    XpGetMediumDimensions(pCon, iwd, iht);
-}
-
-
-int
-PsStartJob(
-  XpContextPtr pCon,
-  Bool         sendClientData,
-  ClientPtr    client)
-{
-  PsContextPrivPtr  pConPriv = (PsContextPrivPtr)
-      dixLookupPrivate(&pCon->devPrivates, PsContextPrivateKey);
-
-  /* 
-   * Create a temporary file to store the printer output.
-   */
-  if (!XpOpenTmpFile("w", &pConPriv->jobFileName, &pConPriv->pJobFile))
-      return BadAlloc;
-
-  return Success;
-}
-
-
-
-/* I thought about making this following code into a set of routines
-   or using a goto, or something, but in the end decided not to,
-   because the plain old listing here makes the logic clearer. */
-int
-PsEndJob(
-  XpContextPtr pCon,
-  Bool         cancel)
-{
-  int r;
-  struct stat buffer;
-  int error;
-
-  PsContextPrivPtr priv = (PsContextPrivPtr)
-      dixLookupPrivate(&pCon->devPrivates, PsContextPrivateKey);
-
-  if (cancel == True) {
-    if (priv->getDocClient != (ClientPtr) NULL) {
-      (void) XpFinishDocData( priv->getDocClient );
-
-      priv->getDocClient = NULL;
-      priv->getDocBufSize = 0;
-    }
-
-    /* job is cancelled - do we really care if we're out of space? */
-    (void) fclose(priv->pJobFile);
-    priv->pJobFile = NULL;
-
-    unlink(priv->jobFileName);
-    xfree(priv->jobFileName);
-    priv->jobFileName = (char *)NULL;
-    
-    PsFreeFontInfoRecords(priv);
-
-    return Success;
-  }
-    
-  /*
-   * Append any trailing information here
-   */
-  PsOut_EndFile(priv->pPsOut, 0);
-  priv->pPsOut = NULL;
-  
-  /* this is where we find out if we're out of space */
-  error = (fclose(priv->pJobFile) == EOF);
-  priv->pJobFile = NULL;
-
-  /* status to the client if we have ran out of space on the disk or 
-     some other resource problem with the temporary file... */
-  if (error) {
-    if (priv->getDocClient != (ClientPtr) NULL) {
-      (void) XpFinishDocData( priv->getDocClient );
-
-      priv->getDocClient = NULL;
-      priv->getDocBufSize = 0;
-    }
-
-    unlink(priv->jobFileName);
-    xfree(priv->jobFileName);
-    priv->jobFileName = (char *)NULL;
-
-    PsFreeFontInfoRecords(priv);
-
-    return BadAlloc;
-  }
-    
-  /* we have finished without incident & no cancel */
-
-  if (priv->getDocClient != NULL && priv->getDocBufSize > 0) {
-    FILE *file;
-
-    file = fopen(priv->jobFileName, "r");
-    if (!file || (fstat(fileno(file), &buffer) < 0))
-	r = BadAlloc;
-    else
-	r = XpSendDocumentData(priv->getDocClient, file, buffer.st_size,
-			       priv->getDocBufSize);
-    if (file)
-	fclose(file);
-
-    (void) XpFinishDocData(priv->getDocClient);
-
-    priv->getDocClient = NULL;
-    priv->getDocBufSize = 0;
-  }
-  else {
-      XpSubmitJob(priv->jobFileName, pCon);
-
-      r = Success;
-  }
-
-  unlink(priv->jobFileName);
-  xfree(priv->jobFileName);
-  priv->jobFileName = (char *)NULL;
-
-  PsFreeFontInfoRecords(priv);
-    
-#ifdef BM_CACHE
-  PsBmClearImageCache();
-#endif
-
-  return r;
-}
-
-/* StartPage 
- */
-int
-PsStartPage(
-  XpContextPtr pCon,
-  WindowPtr    pWin)
-{
-  int                iorient, iplex, icount, ires;
-  unsigned short     iwd, iht;
-  PsContextPrivPtr   pConPriv = (PsContextPrivPtr)
-      dixLookupPrivate(&pCon->devPrivates, PsContextPrivateKey);
-  PsWindowPrivPtr    pWinPriv = (PsWindowPrivPtr)
-      dixLookupPrivate(&pWin->devPrivates, PsWindowPrivateKey);
-
-/*
- * Put a pointer to the context in the window private structure
- */
-  pWinPriv->validContext = 1;
-  pWinPriv->context      = pCon;
-
-  /* get page level attributes */
-  S_GetPageAttributes(pCon,&iorient,&icount,&iplex,&ires,&iwd,&iht);
-  /*
-   *  Start the page
-   */
-  if (pConPriv->pPsOut == NULL) {
-    char *title;
-    
-    /* get job level attributes */ 
-    title = XpGetOneAttribute(pCon, XPJobAttr, "job-name");
-
-    pConPriv->pPsOut = PsOut_BeginFile(pConPriv->pJobFile,
-                                       title, iorient, icount, iplex, ires,
-                                       (int)iwd, (int)iht, False);
-    pConPriv->fontInfoRecords     = NULL;
-    pConPriv->fontTypeInfoRecords = NULL;
-  }
-  PsOut_BeginPage(pConPriv->pPsOut, iorient, icount, iplex, ires,
-		  (int)iwd, (int)iht);
-
-  return Success;
-}
-
-
-/*
- * EndPage:
- *
- * Write page trailer to page file
- * Write page file to job file
- */
-int
-PsEndPage(
-  XpContextPtr pCon,
-  WindowPtr    pWin)
-{
-  PsWindowPrivPtr    pWinPriv = (PsWindowPrivPtr)
-      dixLookupPrivate(&pWin->devPrivates, PsWindowPrivateKey);
-  PsContextPrivPtr pConPriv = (PsContextPrivPtr)
-      dixLookupPrivate(&pCon->devPrivates, PsContextPrivateKey);
-
-  PsOut_EndPage(pConPriv->pPsOut);
-
-  pWinPriv->validContext = 0;
-  pWinPriv->context      = NULL;
-
-  /* status to the client if we have ran out of space on the disk or 
-     some other resource problem with the temporary file... */
-/*  if (ferror(pConPriv->pJobFile)) return BadAlloc; */
-
-  return Success;
-}
-
-/*
- * The PsStartDoc() and PsEndDoc() functions serve basically as NOOP
- * placeholders.  This driver doesn't deal with the notion of multiple
- * documents per page.
- */
-
-int
-PsStartDoc(XpContextPtr pCon, XPDocumentType type)
-{
-  int                iorient, iplex, icount, ires;
-  unsigned short     iwd, iht;
-  char              *title;
-  PsContextPrivPtr   pConPriv = (PsContextPrivPtr)
-      dixLookupPrivate(&pCon->devPrivates, PsContextPrivateKey);
-
-  /* get job level attributes */ 
-  title = XpGetOneAttribute(pCon, XPJobAttr, "job-name");
- 
-  /* get document level attributes */
-  S_GetPageAttributes(pCon,&iorient,&icount,&iplex,&ires,&iwd,&iht);
-
-  pConPriv->pPsOut = PsOut_BeginFile(pConPriv->pJobFile,
-                                     title, iorient, icount, iplex, ires,
-                                     (int)iwd, (int)iht, (Bool)(type == XPDocRaw));
-
-  pConPriv->fontInfoRecords     = NULL;
-  pConPriv->fontTypeInfoRecords = NULL;
-
-  return Success;
-}
-
-int
-PsEndDoc(
-  XpContextPtr pCon,
-  Bool         cancel)
-{
-  return Success;
-}
-
-/*
- * PsDocumentData()
- *
- * Hand any pre-generated PDL down to the spool files, formatting it
- * as necessary to fit the given window.
- */
-
-int
-PsDocumentData(
-  XpContextPtr  pCon,
-  DrawablePtr   pDraw,
-  char         *pData,
-  int           len_data,
-  char         *pFmt,
-  int		len_fmt,
-  char         *pOpt,
-  int		len_opt,
-  ClientPtr	client)
-{
-    PsContextPrivPtr cPriv;
-    PsOutPtr psOut;
-
-    if (len_fmt != 12 ||
-        strncasecmp(pFmt, "PostScript 2", len_fmt) != 0 ||
-        len_opt)
-	return BadValue;
-
-    cPriv = (PsContextPrivPtr)
-	dixLookupPrivate(&pCon->devPrivates, PsContextPrivateKey);
-    psOut = cPriv->pPsOut;
-
-    if (pDraw)
-	PsOut_BeginFrame(psOut, 0, 0, pDraw->x, pDraw->y,
-			 pDraw->width, pDraw->height);
-    PsOut_RawData(psOut, pData, len_data);
-    if (pDraw)
-	PsOut_EndFrame(psOut);
-
-    return Success;
-}
-
-/*
- *
- * PsGetDocumentData()
- *
- * This function allows the driver to send the generated PS back to
- * the client.
- */
-
-int
-PsGetDocumentData(
-  XpContextPtr pCon,
-  ClientPtr    client,
-  int          maxBufferSize)
-{
-  PsContextPrivPtr pPriv = (PsContextPrivPtr)
-    dixLookupPrivate(&pCon->devPrivates, PsContextPrivateKey);
-
-  pPriv->getDocClient = client;
-  pPriv->getDocBufSize = maxBufferSize;
-
-  return Success;
-}
-
diff --git a/hw/xprint/ps/PsSpans.c b/hw/xprint/ps/PsSpans.c
deleted file mode 100644
index c0e66ee..0000000
--- a/hw/xprint/ps/PsSpans.c
+++ /dev/null
@@ -1,164 +0,0 @@
-/*
-
-Copyright 1996, 1998  The Open Group
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-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
-OPEN GROUP 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 name of The Open Group shall not be
-used in advertising or otherwise to promote the sale, use or other dealings
-in this Software without prior written authorization from The Open Group.
-
-*/
-/*
- * (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:		PsSpans.c
-**    *
-**    *  Contents:	Code to set and fill spans in the PS DDX
-**    *
-**    *  Created By:	Roger Helmendach (Liberty Systems)
-**    *
-**    *  Copyright:	Copyright 1996 The Open Group, Inc.
-**    *
-**    *********************************************************
-** 
-********************************************************************/
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#include "Ps.h"
-#include "gcstruct.h"
-#include "windowstr.h"
-
-void
-PsFillSpans(
-  DrawablePtr  pDrawable,
-  GCPtr        pGC,
-  int          nSpans,
-  DDXPointPtr  pPoints,
-  int         *pWidths,
-  int          fSorted)
-{
-  PsOutPtr    psOut;
-  int         xoffset, yoffset;
-  xRectangle *rects, *r;
-  RegionPtr   fillRegion, region = 0;
-  int         i;
-  int         nbox;
-  BoxPtr      pbox;
-  ColormapPtr cMap;
-
-  if( PsUpdateDrawableGC(pGC, pDrawable, &psOut, &cMap)==FALSE ) return;
-
-  /*
-   * Build a region out of the spans
-   */
-  rects   = (xRectangle *)xalloc(nSpans*sizeof(xRectangle));
-  xoffset = pDrawable->x;
-  yoffset = pDrawable->y;
-
-  for( i = 0, r = rects; i < nSpans; i++, r++ )
-  {
-    r->x = pPoints[i].x + xoffset;
-    r->y = pPoints[i].y + yoffset;
-    r->width = pWidths[i];
-    r->height = 1;
-  }
-  fillRegion = RECTS_TO_REGION(pGC->pScreen, nSpans, rects,
-                               (fSorted)?CT_YSORTED:CT_UNSORTED);
-
-  /*
-   * Intersect this region with the clip region.  Whatever's left,
-   * should be filled.
-   */
-/*REGION_INTERSECT(pGC->pScreen, region, fillRegion, pGC->clientClip);*/
-
-  pbox = REGION_RECTS(region);
-  nbox = REGION_NUM_RECTS(region);
-
-  /* Enter HP-GL/2 */
-  /*###SEND_PCL( outFile, "\27%0B" );*/
-
-  while( nbox )
-  {
-/*###
-    sprintf( t, "PU%d,%d;RR%d,%d;", pbox->x1, pbox->y1, pbox->x2, pbox->y2);
-    SEND_PCL( outFile, t );
-*/
-    nbox--;
-    pbox++;
-  }
-
-  /* Go back to PCL */
-  /*###SEND_PCL( outFile, "\27%0A" );*/
-
-  /*
-   * Clean up the temporary regions
-   */
-  REGION_DESTROY(pGC->pScreen, fillRegion);
-  REGION_DESTROY(pGC->pScreen, region);
-  xfree(rects);
-}
-
-void
-PsSetSpans(
-  DrawablePtr  pDrawable,
-  GCPtr        pGC,
-  char        *pSrc,
-  DDXPointPtr  pPoints,
-  int         *pWidths,
-  int          nSpans,
-  int          fSorted)
-{
-}
diff --git a/hw/xprint/ps/PsText.c b/hw/xprint/ps/PsText.c
deleted file mode 100644
index 872c0f4..0000000
--- a/hw/xprint/ps/PsText.c
+++ /dev/null
@@ -1,581 +0,0 @@
-/*
-
-Copyright 1996, 1998  The Open Group
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-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
-OPEN GROUP 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 name of The Open Group shall not be
-used in advertising or otherwise to promote the sale, use or other dealings
-in this Software without prior written authorization from The Open Group.
-
-*/
-/*
- * (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:		PsText.c
-**    *
-**    *  Contents:	Character-drawing routines for the PS DDX
-**    *
-**    *  Created By:	Roger Helmendach (Liberty Systems)
-**    *
-**    *  Copyright:	Copyright 1996 The Open Group, Inc.
-**    *
-**    *********************************************************
-** 
-********************************************************************/
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#include "Ps.h"
-#include "gcstruct.h"
-#include "windowstr.h"
-#include <X11/fonts/fntfil.h>
-#include <X11/fonts/fntfilst.h>
-#include <limits.h>
-
-int
-PsPolyText8(
-  DrawablePtr pDrawable,
-  GCPtr       pGC,
-  int         x,
-  int         y,
-  int         count,
-  char       *string)
-{
-  if( pDrawable->type==DRAWABLE_PIXMAP )
-  {
-    DisplayElmPtr   elm;
-    PixmapPtr       pix  = (PixmapPtr)pDrawable;
-    PsPixmapPrivPtr priv = (PsPixmapPrivPtr)pix->devPrivate.ptr;
-    DisplayListPtr  disp;
-    GCPtr           gc;
-
-    if ((gc = PsCreateAndCopyGC(pDrawable, pGC)) == NULL) return x;
-
-    disp = PsGetFreeDisplayBlock(priv);
-
-    elm  = &disp->elms[disp->nelms];
-    elm->type = Text8Cmd;
-    elm->gc   = gc;
-    elm->c.text8.x      = x;
-    elm->c.text8.y      = y;
-    elm->c.text8.count  = count;
-    elm->c.text8.string = (char *)xalloc(count);
-    memcpy(elm->c.text8.string, string, count);
-    disp->nelms += 1;
-    
-    return x;
-  }
-  else
-  {
-    PsFontInfoRec *firec;
-
-    /* We need a context for rendering... */
-    if (PsGetPsContextPriv(pDrawable) == NULL)
-      return x;
-
-    firec = PsGetFontInfoRec(pDrawable, pGC->font);
-    if (!firec)
-        return x;
-
-#ifdef XP_USE_FREETYPE    
-    if (firec->ftir->downloadableFont && 
-        (firec->ftir->font_type == PSFTI_FONT_TYPE_FREETYPE))
-    {
-        PsOutPtr       psOut;
-        ColormapPtr    cMap;
-        
-	if( PsUpdateDrawableGC(pGC, pDrawable, &psOut, &cMap)==FALSE ) 
-	    return x; 
-
-        if (firec->ftir->alreadyDownloaded[0] == False)
-        {
-            PsOut_DownloadFreeType(psOut,
-                                   firec->ftir->ft_download_font_type,
-                                   firec->ftir->download_ps_name, pGC->font, 0);              
-            firec->ftir->alreadyDownloaded[0] = True;
-        }
-
-        PsOut_Offset(psOut, pDrawable->x, pDrawable->y);
-       	PsOut_Color(psOut, PsGetPixelColor(cMap, pGC->fgPixel)); 
-       	if (!firec->size)
-            PsOut_TextAttrsMtx(psOut, firec->ftir->download_ps_name, firec->mtx, firec->ftir->is_iso_encoding); 
-        else
-            PsOut_TextAttrs(psOut, firec->ftir->download_ps_name, firec->size, firec->ftir->is_iso_encoding); 
-        PsOut_FreeType_Text(pGC->font, psOut, x, y, string, count);
-
-	return x;	
-    }
-    else
-#endif /* XP_USE_FREETYPE */
-         if (firec->ftir->downloadableFont && 
-             (firec->ftir->font_type != PSFTI_FONT_TYPE_FREETYPE))
-    {
-        PsOutPtr       psOut;
-        ColormapPtr    cMap;
-        
-	if( PsUpdateDrawableGC(pGC, pDrawable, &psOut, &cMap)==FALSE ) 
-	    return x; 
-
-        if (firec->ftir->alreadyDownloaded[0] == False)
-        {
-            PsOut_DownloadType1(psOut, "PsPolyText8",
-                                firec->ftir->download_ps_name, firec->ftir->filename);
-            firec->ftir->alreadyDownloaded[0] = True;
-        }
-
-        PsOut_Offset(psOut, pDrawable->x, pDrawable->y);
-       	PsOut_Color(psOut, PsGetPixelColor(cMap, pGC->fgPixel)); 
-       	if (!firec->size)
-            PsOut_TextAttrsMtx(psOut, firec->ftir->download_ps_name, firec->mtx, firec->ftir->is_iso_encoding); 
-        else
-            PsOut_TextAttrs(psOut, firec->ftir->download_ps_name, firec->size, firec->ftir->is_iso_encoding); 
-        PsOut_Text(psOut, x, y, string, count, -1);
-
-	return x;	
-    }    
-    
-    /* Render glyphs as bitmaps */
-    {
-        unsigned long n, i;
-        int w;
-        CharInfoPtr charinfo[255];  
-
-        GetGlyphs(pGC->font, (unsigned long)count, 
-            (unsigned char *)string, Linear8Bit, &n, charinfo);
-        w = 0;
-        for (i=0; i < n; i++)
-          w += charinfo[i]->metrics.characterWidth;
-
-        if (n != 0)
-            PsPolyGlyphBlt(pDrawable, pGC, x, y, n, 
-                    charinfo, FONTGLYPHS(pGC->font));
-        x += w;
-        
-        return x;
-    }  
-  }
-  return x;
-}
-
-int
-PsPolyText16(
-  DrawablePtr     pDrawable,
-  GCPtr           pGC,
-  int             x,
-  int             y,
-  int             count,
-  unsigned short *string)
-{
-  if( pDrawable->type==DRAWABLE_PIXMAP )
-  {
-    DisplayElmPtr   elm;
-    PixmapPtr       pix  = (PixmapPtr)pDrawable;
-    PsPixmapPrivPtr priv = (PsPixmapPrivPtr)pix->devPrivate.ptr;
-    DisplayListPtr  disp;
-    GCPtr           gc;
-
-    if ((gc = PsCreateAndCopyGC(pDrawable, pGC)) == NULL) return x;
-
-    disp = PsGetFreeDisplayBlock(priv);
-
-    elm  = &disp->elms[disp->nelms];
-    elm->type = Text16Cmd;
-    elm->gc   = gc;
-    elm->c.text16.x      = x;
-    elm->c.text16.y      = y;
-    elm->c.text16.count  = count;
-    elm->c.text16.string =
-      (unsigned short *)xalloc(count*sizeof(unsigned short));
-    memcpy(elm->c.text16.string, string, count*sizeof(unsigned short));
-    disp->nelms += 1;
-
-    return x;
-  }
-  else
-  {
-    PsFontInfoRec *firec;
-
-    /* We need a context for rendering... */
-    if (PsGetPsContextPriv(pDrawable) == NULL)
-      return x;
-
-    firec = PsGetFontInfoRec(pDrawable, pGC->font);
-    if (!firec)
-        return x;
-
-#ifdef XP_USE_FREETYPE    
-    if (firec->ftir->downloadableFont &&
-        (firec->ftir->font_type == PSFTI_FONT_TYPE_FREETYPE))
-    {
-        PsOutPtr       psOut;
-        ColormapPtr    cMap;
-        unsigned short c,
-                       c_hiByte,
-                       c_lowByte,
-                       fontPage;
-        int            i;
-        
-	if( PsUpdateDrawableGC(pGC, pDrawable, &psOut, &cMap)==FALSE ) 
-	    return x; 
-
-        /* Scan the string we want to render and download all neccesary parts
-         * of the font (one part(="font page") has 256 glyphs)
-         */
-        for( i = 0 ; i < count ; i++ )
-        {
-            c = string[i];
-#if IMAGE_BYTE_ORDER == LSBFirst
-            c_hiByte = c & 0x00FF;
-            c_lowByte = (c >> 8) & 0x00FF;
-#elif IMAGE_BYTE_ORDER == MSBFirst
-            c_hiByte  = (c >> 8) & 0x00FF;
-            c_lowByte = c & 0x00FF;
-#else
-#error Unsupported byte order
-#endif
-            fontPage  = c_hiByte;
-          
-            if (firec->ftir->alreadyDownloaded[fontPage] == False)
-            {
-                char        buffer[256];
-                const char *ps_name;
-
-                if (fontPage > 0)
-                {
-                    sprintf(buffer, "%s_%x", firec->ftir->download_ps_name, (int)fontPage);
-                    ps_name = buffer;
-                }
-                else
-                {
-                    ps_name = firec->ftir->download_ps_name;
-                }
-
-                PsOut_DownloadFreeType(psOut,
-                                       firec->ftir->ft_download_font_type,
-                                       ps_name, pGC->font, (fontPage * 0x100)); /* same as (fontPage << 8) */    
-                                 
-                firec->ftir->alreadyDownloaded[fontPage] = True;
-            }
-        }
-
-
-        PsOut_Offset(psOut, pDrawable->x, pDrawable->y);
-       	PsOut_Color(psOut, PsGetPixelColor(cMap, pGC->fgPixel)); 
-       	if (!firec->size)
-            PsOut_FreeType_TextAttrsMtx16(psOut, firec->ftir->download_ps_name, firec->mtx, firec->ftir->is_iso_encoding); 
-        else
-            PsOut_FreeType_TextAttrs16(psOut, firec->ftir->download_ps_name, firec->size, firec->ftir->is_iso_encoding); 
-        PsOut_FreeType_Text16(pGC->font, psOut, x, y, string, count);
-        
-	return x;	
-    }
-    else
-#endif /* XP_USE_FREETYPE */
-         if (firec->ftir->downloadableFont &&
-             (firec->ftir->font_type != PSFTI_FONT_TYPE_FREETYPE))
-    {
-        PsOutPtr       psOut;
-        ColormapPtr    cMap;
-        unsigned short fontPage;
-        
-	if( PsUpdateDrawableGC(pGC, pDrawable, &psOut, &cMap)==FALSE ) 
-	    return x; 
-
-        PsOut_DownloadType1(psOut, "PsPolyText16",
-                            firec->ftir->download_ps_name, firec->ftir->filename);
-        firec->ftir->alreadyDownloaded[fontPage] = True;
-
-        PsOut_Offset(psOut, pDrawable->x, pDrawable->y);
-       	PsOut_Color(psOut, PsGetPixelColor(cMap, pGC->fgPixel)); 
-       	if (!firec->size)
-            PsOut_TextAttrsMtx(psOut, firec->ftir->download_ps_name, firec->mtx, firec->ftir->is_iso_encoding); 
-        else
-            PsOut_TextAttrs(psOut, firec->ftir->download_ps_name, firec->size, firec->ftir->is_iso_encoding); 
-        PsOut_Text16(psOut, x, y, string, count, -1);
-        
-	return x;	
-    }
-    
-    /* Render glyphs as bitmaps */
-    {
-        unsigned long n, i;
-        int w;
-        CharInfoPtr charinfo[255];  /* encoding only has 1 byte for count */
-
-        GetGlyphs(pGC->font, (unsigned long)count, (unsigned char *)string,
-                  (FONTLASTROW(pGC->font) == 0) ? Linear16Bit : TwoD16Bit,
-                  &n, charinfo);
-        w = 0;
-        for (i=0; i < n; i++)
-          w += charinfo[i]->metrics.characterWidth;
-        if (n != 0)
-	    PsPolyGlyphBlt(pDrawable, pGC, x, y, n, charinfo, FONTGLYPHS(pGC->font));
-        x += w;
-        
-        return x;
-    }  
-  }
-  return x;
-}
-
-void
-PsImageText8(
-  DrawablePtr pDrawable,
-  GCPtr       pGC,
-  int         x,
-  int         y,
-  int         count,
-  char       *string)
-{
-  if( pDrawable->type==DRAWABLE_PIXMAP )
-  {
-    DisplayElmPtr   elm;
-    PixmapPtr       pix  = (PixmapPtr)pDrawable;
-    PsPixmapPrivPtr priv = (PsPixmapPrivPtr)pix->devPrivate.ptr;
-    DisplayListPtr  disp;
-    GCPtr           gc;
-
-    if ((gc = PsCreateAndCopyGC(pDrawable, pGC)) == NULL) return;
-
-    disp = PsGetFreeDisplayBlock(priv);
-
-    elm  = &disp->elms[disp->nelms];
-    elm->type = TextI8Cmd;
-    elm->gc   = gc;
-    elm->c.text8.x      = x;
-    elm->c.text8.y      = y;
-    elm->c.text8.count  = count;
-    elm->c.text8.string = (char *)xalloc(count);
-    memcpy(elm->c.text8.string, string, count);
-    disp->nelms += 1;
-  }
-  else
-  {
-    int          iso;
-    int          siz;
-    float        mtx[4];
-    char        *fnam;
-    PsOutPtr     psOut;
-    ColormapPtr  cMap;
-
-    if( PsUpdateDrawableGC(pGC, pDrawable, &psOut, &cMap)==FALSE ) return;
-    PsOut_Offset(psOut, pDrawable->x, pDrawable->y);
-    PsOut_Color(psOut, PsGetPixelColor(cMap, pGC->fgPixel));
-    fnam = PsGetPSFontName(pGC->font);
-    if( !fnam ) fnam = "Times-Roman";
-    siz = PsGetFontSize(pGC->font, mtx);
-    iso = PsIsISOLatin1Encoding(pGC->font);
-    if( !siz ) PsOut_TextAttrsMtx(psOut, fnam, mtx, iso);
-    else       PsOut_TextAttrs(psOut, fnam, siz, iso);
-    PsOut_Text(psOut, x, y, string, count, PsGetPixelColor(cMap, pGC->bgPixel));
-  }
-}
-
-void
-PsImageText16(
-  DrawablePtr     pDrawable,
-  GCPtr           pGC,
-  int             x,
-  int             y,
-  int             count,
-  unsigned short *string)
-{
-  if( pDrawable->type==DRAWABLE_PIXMAP )
-  {
-    DisplayElmPtr   elm;
-    PixmapPtr       pix  = (PixmapPtr)pDrawable;
-    PsPixmapPrivPtr priv = (PsPixmapPrivPtr)pix->devPrivate.ptr;
-    DisplayListPtr  disp;
-    GCPtr           gc;
-
-    if ((gc = PsCreateAndCopyGC(pDrawable, pGC)) == NULL) return;
-
-    disp = PsGetFreeDisplayBlock(priv);
-
-    elm  = &disp->elms[disp->nelms];
-    elm->type = TextI16Cmd;
-    elm->gc   = gc;
-    elm->c.text16.x      = x;
-    elm->c.text16.y      = y;
-    elm->c.text16.count  = count;
-    elm->c.text16.string =
-      (unsigned short *)xalloc(count*sizeof(unsigned short));
-    memcpy(elm->c.text16.string, string, count*sizeof(unsigned short));
-    disp->nelms += 1;
-  }
-  else
-  {
-    int   i;
-    char *str;
-    if( !count ) return;
-    str = (char *)xalloc(count);
-    for( i=0 ; i<count ; i++ ) str[i] = string[i];
-    PsImageText8(pDrawable, pGC, x, y, count, str);
-    free(str);
-  }
-}
-
-void
-PsImageGlyphBlt(
-  DrawablePtr   pDrawable,
-  GCPtr         pGC,
-  int           x,
-  int           y,
-  unsigned int  nGlyphs,
-  CharInfoPtr  *pCharInfo,
-  pointer       pGlyphBase)
-{
-  /* NOT TO BE IMPLEMENTED */
-}
-
-void
-PsPolyGlyphBlt(
-  DrawablePtr   pDrawable,
-  GCPtr         pGC,
-  int           x,
-  int           y,
-  unsigned int  nGlyphs,
-  CharInfoPtr  *pCharInfo,
-  pointer       pGlyphBase)
-{
-    int width, height;
-    PixmapPtr pPixmap;
-    int nbyLine;                        /* bytes per line of padded pixmap */
-    FontPtr pfont;
-    GCPtr pGCtmp;
-    register int i;
-    register int j;
-    unsigned char *pbits;               /* buffer for PutImage */
-    register unsigned char *pb;         /* temp pointer into buffer */
-    register CharInfoPtr pci;           /* currect char info */
-    register unsigned char *pglyph;     /* pointer bits in glyph */
-    int gWidth, gHeight;                /* width and height of glyph */
-    register int nbyGlyphWidth;         /* bytes per scanline of glyph */
-    int nbyPadGlyph;                    /* server padded line of glyph */
-    int w, tmpx;
-    XID gcvals[3];
-
-    pfont = pGC->font;
-    width = FONTMAXBOUNDS(pfont,rightSideBearing) -
-            FONTMINBOUNDS(pfont,leftSideBearing);
-    height = FONTMAXBOUNDS(pfont,ascent) +
-             FONTMAXBOUNDS(pfont,descent);
-
-    if ((width == 0) || (height == 0) )
-        return;
-    {
-        int i;
-        w = 0;
-        for (i=0; i < nGlyphs; i++) w += pCharInfo[i]->metrics.characterWidth;
-    }
-    pGCtmp = GetScratchGC(1, pDrawable->pScreen);
-    if (!pGCtmp)
-    {
-        (*pDrawable->pScreen->DestroyPixmap)(pPixmap);
-        return;
-    }
-
-    gcvals[0] = GXcopy;
-    gcvals[1] = pGC->fgPixel;
-    gcvals[2] = pGC->bgPixel; 
-
-    DoChangeGC(pGCtmp, GCFunction|GCForeground|GCBackground, gcvals, 0);
-
-    
-    nbyLine = BitmapBytePad(width);
-    pbits = (unsigned char *)xalloc(height*nbyLine);
-    if (!pbits){
-        PsDestroyPixmap(pPixmap);
-        return;
-    }
-    tmpx = 0;
-    while(nGlyphs--)
-    {
-        pci = *pCharInfo++;
-        pglyph = FONTGLYPHBITS(pGlyphBase, pci);
-        gWidth = GLYPHWIDTHPIXELS(pci);
-        gHeight = GLYPHHEIGHTPIXELS(pci);
-        if (gWidth && gHeight)
-        {
-            nbyGlyphWidth = GLYPHWIDTHBYTESPADDED(pci);
-            nbyPadGlyph = BitmapBytePad(gWidth);
-
-            if (nbyGlyphWidth == nbyPadGlyph
-#if GLYPHPADBYTES != 4
-                && (((int) pglyph) & 3) == 0
-#endif
-                )
-            {
-                pb = pglyph;
-            }
-            else
-            {
-                for (i=0, pb = pbits; i<gHeight; i++, pb = pbits+(i*nbyPadGlyph))
-                    for (j = 0; j < nbyGlyphWidth; j++)
-                        *pb++ = *pglyph++;
-                pb = pbits;
-            }
-
-	    PsPutImageMask((DrawablePtr)pDrawable, pGCtmp, 
-		   1, x + pci->metrics.leftSideBearing, 
-		   y - pci->metrics.ascent, gWidth, gHeight,
-                   0, XYBitmap, (char *)pb);
-	}
-        
-        x  += pci->metrics.characterWidth;
-    }
-    xfree(pbits);
-    FreeScratchGC(pGCtmp);
-}
diff --git a/hw/xprint/ps/PsWindow.c b/hw/xprint/ps/PsWindow.c
deleted file mode 100644
index 8bfde4b..0000000
--- a/hw/xprint/ps/PsWindow.c
+++ /dev/null
@@ -1,222 +0,0 @@
-/*
-
-Copyright 1996, 1998  The Open Group
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-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
-OPEN GROUP 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 name of The Open Group shall not be
-used in advertising or otherwise to promote the sale, use or other dealings
-in this Software without prior written authorization from The Open Group.
-
-*/
-/*
- * (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:		PsWindow.c
-**    *
-**    *  Contents:	Window code for PS driver.
-**    *
-**    *  Created By:	Roger Helmendach (Liberty Systems)
-**    *
-**    *  Copyright:	Copyright 1996 The Open Group, Inc.
-**    *
-**    *********************************************************
-** 
-********************************************************************/
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#include <stdio.h>
-#include <string.h>
-#include <sys/wait.h>
-
-#include "mistruct.h"
-#include "regionstr.h"
-#include "windowstr.h"
-#include "gcstruct.h"
-
-#include "Ps.h"
-
-/*
- * The following list of strings defines the properties which will be
- * placed on the screen's root window if the property was defined in
- * the start-up configuration resource database.
- */
-#if 0
-static char *propStrings[] = {
-	DT_PRINT_JOB_HEADER,
-	DT_PRINT_JOB_TRAILER,
-	DT_PRINT_JOB_COMMAND,
-	DT_PRINT_JOB_EXEC_COMMAND,
-	DT_PRINT_JOB_EXEC_OPTIONS,
-	DT_PRINT_PAGE_HEADER,
-	DT_PRINT_PAGE_TRAILER,
-	DT_PRINT_PAGE_COMMAND,
-	(char *)NULL
-};
-#endif
-
-/*
- * PsCreateWindow - watch for the creation of the root window.
- * When it's created, register the screen with the print extension,
- * and put the default command/header properties on it.
- */
-/*ARGSUSED*/
-
-Bool
-PsCreateWindow(WindowPtr pWin)
-{
-  PsWindowPrivPtr pPriv;
-
-#if 0
-    Bool status = Success;
-    ScreenPtr pScreen = pWin->drawable.pScreen;
-    PsScreenPrivPtr pScreenPriv = (PsScreenPrivPtr) 
-	dixLookupPrivate(&pScreen->devPrivates, PsScreenPrivateKey);
-    PsWindowPrivPtr pWinPriv = (PsWindowPrivPtr)
-	dixLookupPrivate(&pWin->devPrivates, PsWindowPrivateKey);
-
-    /*
-     * Initialize this window's private struct.
-     */
-    pWinPriv->jobFileName = (char *)NULL;
-    pWinPriv->pJobFile = (FILE *)NULL;
-    pWinPriv->pageFileName = (char *)NULL;
-    pWinPriv->pPageFile = (FILE *)NULL;
-    
-    if(pWin->parent == (WindowPtr)NULL)  /* root window? */
-    {
-	Atom propName; /* type = XA_STRING */
-	char *propVal;
-	int i;
-        XrmDatabase rmdb = pScreenPriv->resDB;
-
-        /*
-         * Put the defaults spec'd in the config files in properties on this
-	 * screen's root window.
-         */
-	for(i = 0; propStrings[i] != (char *)NULL; i++)
-	{
-            if((propVal = _DtPrintGetPrinterResource(pWin, rmdb, 
-						     propStrings[i])) !=
-	       (char *)NULL)
-	    {
-                propName = MakeAtom(propStrings[i], strlen(propStrings[i]),
-				    TRUE);
-	        dixChangeWindowProperty(serverClient, pWin, propName, XA_STRING,
-					8, PropModeReplace, strlen(propVal),
-					(pointer)propVal, FALSE);
-	        xfree(propVal);
-	    }
-	}
-    }
-
-    return status;
-#endif
-
-  pPriv = (PsWindowPrivPtr)
-      dixLookupPrivate(&pWin->devPrivates, PsWindowPrivateKey);
-  pPriv->validContext = 0;
-
-  return TRUE;
-}
-
-
-/*ARGSUSED*/
-Bool PsMapWindow(WindowPtr pWindow)
-{
-  return TRUE;
-}
-
-/*ARGSUSED*/
-Bool 
-PsPositionWindow(
-  WindowPtr pWin,
-  int x,
-  int y)
-{
-  return TRUE;
-}
-
-/*ARGSUSED*/
-Bool 
-PsUnmapWindow(WindowPtr pWindow)
-{
-  return TRUE;
-}
-
-/*ARGSUSED*/
-void 
-PsCopyWindow(
-  WindowPtr   pWin,
-  DDXPointRec ptOldOrg,
-  RegionPtr   prgnSrc)
-{
-}
-
-/*ARGSUSED*/
-Bool
-PsChangeWindowAttributes(
-  WindowPtr     pWin,
-  unsigned long mask)
-{
-  return TRUE;
-}
-
-/*ARGSUSED*/
-Bool
-PsDestroyWindow(WindowPtr pWin)
-{
-  return TRUE;
-}
diff --git a/hw/xprint/ps/psout.c b/hw/xprint/ps/psout.c
deleted file mode 100644
index c24f88b..0000000
--- a/hw/xprint/ps/psout.c
+++ /dev/null
@@ -1,1789 +0,0 @@
-/*
-
-Copyright 1996, 1998  The Open Group
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-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
-OPEN GROUP 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 name of The Open Group shall not be
-used in advertising or otherwise to promote the sale, use or other dealings
-in this Software without prior written authorization from The Open Group.
-
-*/
-/*
- * (c) Copyright 1996 Hewlett-Packard Company
- * (c) Copyright 1996 International Business Machines Corp.
- * (c) Copyright 1996, 2000 Sun Microsystems, Inc.  All Rights Reserved.
- * (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:          psout.c
-**    *
-**    *  Contents:      Code to output PostScript to file
-**    *
-**    *  Created By:    Roger Helmendach (Liberty Systems)
-**    *
-**    *  Copyright:     Copyright 1996 The Open Group, Inc.
-**    *
-**    *********************************************************
-**
-********************************************************************/
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#include <stdlib.h>
-#include <stdio.h>
-#include "os.h"
-#define USE_PSOUT_PRIVATE 1
-#include "Ps.h"
-#include "psout.h"
-#ifdef XP_USE_FREETYPE
-#include <ft2build.h>
-#include FT_FREETYPE_H
-#endif /* XP_USE_FREETYPE */
-/* For VENDOR_STRING and VENDOR_RELEASE */
-#include "site.h"
-
-/*
- *  Standard definitions
- */
-
-static char *S_StandardDefs = "\
-/d{def}bind def\
-/b{bind}bind d\
-/bd{b d}b d\
-/x{exch}bd\
-/xd{x d}bd\
-/dp{dup}bd\
-/t{true}bd\
-/f{false}bd\
-/p{pop}bd\
-/r{roll}bd\
-/c{copy}bd\
-/i{index}bd\
-/rp{repeat}bd\
-/n{newpath}bd\
-/w{setlinewidth}bd\
-/lc{setlinecap}bd\
-/lj{setlinejoin}bd\
-/sml{setmiterlimit}bd\
-/ds{setdash}bd\
-/ie{ifelse}bd\
-/len{length}bd\
-/m{moveto}bd\
-/rm{rmoveto}bd\
-/l{lineto}bd\
-/rl{rlineto}bd\
-/a{arc}bd\
-/an{arcn}bd\
-/st{stroke}bd\
-/fl{fill}bd\
-/ef{eofill}bd\
-/sp{showpage}bd\
-/cp{closepath}bd\
-/clp{clippath}bd\
-/cl{clip}bd\
-/pb{pathbbox}bd\
-/tr{translate}bd\
-/rt{rotate}bd\
-/dv{div}bd\
-/ml{mul}bd\
-/ad{add}bd\
-/ng{neg}bd\
-/scl{scale}bd\
-/sc{setrgbcolor}bd\
-/g{setgray}bd\
-/gs{gsave}bd\
-/gr{grestore}bd\
-/sv{save}bd\
-/rs{restore}bd\
-/mx{matrix}bd\
-/cm{currentmatrix}bd\
-/sm{setmatrix}bd\
-/ccm{concatmatrix}bd\
-/cc{concat}bd\
-/ff{findfont}bd\
-/mf{makefont}bd\
-/sf{setfont}bd\
-/cft{currentfont}bd\
-/fd{FontDirectory}bd\
-/sh{show}bd\
-/stw{stringwidth}bd\
-/ci{colorimage}bd\
-/ig{image}bd\
-/im{imagemask}bd\
-/cf{currentfile}bd\
-/rh{readhexstring}bd\
-/str{string}bd\
-/al{aload}bd\
-/wh{where}bd\
-/kn{known}bd\
-/stp{stopped}bd\
-/bg{begin}bd\
-/ed{end}bd\
-/fa{forall}bd\
-/pi{putinterval}bd\
-/mk{mark}bd\
-/ctm{cleartomark}bd\
-/df{definefont}bd\
-/cd{currentdict}bd\
-/db{20 dict dp bg}bd\
-/de{ed}bd\
-/languagelevel wh{p languagelevel}{1}ie\
- 1 eq{/makepattern{p}bd/setpattern{p}bd/setpagedevice{p}bd}if\
-/mp{makepattern}bd\
-/spt{setpattern}bd\
-/spd{setpagedevice}bd\
-"
-#ifdef XP_USE_FREETYPE
-"/trmoveto{currentfont /FontMatrix get transform rm}d"
-#endif /* XP_USE_FREETYPE */
-;
-
-/*
- *  Composite definitions
- *
- *
- *    XYr  -  Return X/Y dpi for device
- *
- *      XYr <xdpi> <ydpi>
- *
- *    Cs  -  Coordinate setup (for origin upper left)
- *
- *      <orient(0,1,2,3)> Cs
- *
- *    P  -  Draw a point
- *
- *      <x> <y> P
- *
- *    R  -  Add rectangle to path
- *
- *      <x> <y> <w> <h> R
- *
- *    Ac  -  Add arc to path
- *
- *      <x> <y> <w> <h> <ang1> <ang2> Ac
- *
- *    An  -  Add arc to path (counterclockwise)
- *
- *      <x> <y> <w> <h> <ang1> <ang2> An
- *
- *    Tf  -  Set font
- *
- *      <font_name> <size> <iso> Tf
- *
- *    Tfm  -  Set font with matrix
- *
- *      <font_name> <matrix> <iso> Tfm
- *
- *    T  -  Draw text
- *
- *      <text> <x> <y> T
- *
- *    Tb  -  Draw text with background color
- *
- *      <text> <x> <y> <bg_red> <bg_green> <bg_blue> Tb
- *
- *    Im1  -  Image 1 bit monochrome imagemask
- *
- *      <x> <y> <w> <h> <sw> <sh> Im1
- *
- *    Im24  -  Image 24 bit RGB color
- *
- *      <x> <y> <w> <h> <sw> <sh> Im24
- *
- *    Im1t  -  Image 1 bit monochrome imagemask (in tile)
- *
- *      <data> <x> <y> <w> <h> <sw> <sh> Im1t
- *
- *    Im24t  -  Image 24 bit RGB color (in tile)
- *
- *      <data> <x> <y> <w> <h> <sw> <sh> Im24t
- */
-
-static char *S_CompositeDefs = "\
-/XYr{/currentpagedevice wh\
-  {p currentpagedevice dp /HWResolution kn\
-    {/HWResolution get al p}{p 300 300}ie}{300 300}ie}bd\
-/Cs{dp 0 eq{0 pHt tr XYr -1 x dv 72 ml x 1 x dv 72 ml x scl}if\
-  dp 1 eq{90 rt XYr -1 x dv 72 ml x 1 x dv 72 ml x scl}if\
-  dp 2 eq{pWd 0 tr XYr 1 x dv 72 ml x -1 x dv 72 ml x scl}if\
-  3 eq{pHt pWd tr 90 rt XYr 1 x dv 72 ml x -1 x dv 72 ml x scl}if}bd\
-/P{gs 1 w [] 0 ds 2 c m .1 ad x .1 ad x l st gr}bd\
-/R{4 2 r m 1 i 0 rl 0 x rl ng 0 rl cp}bd\
-/Ac{mx_ cm p 6 -2 r tr 4 2 r ng scl 0 0 .5 5 3 r a mx_ sm}bd\
-/An{mx_ cm p 6 -2 r tr 4 2 r ng scl 0 0 .5 5 3 r an mx_ sm}bd\
-/ISO{dp len dict bg{1 i/FID ne{d}{p p}ie}fa\
-  /Encoding ISOLatin1Encoding d cd ed df}bd\
-/iN{dp len str cvs dp len x 1 i 3 ad str 2 c c p x p dp 3 -1 r(ISO)pi}bd\
-/Tp{{x dp iN dp fd x kn{x p dp/f_ x d ff}{dp/f_ x d x ff ISO}ie x}\
-  {x dp/f_ x d ff x}ie}bd\
-/Tf{Tp[x 0 0 2 i ng 0 0] dp/fm_ x d mf sf}bd\
-/Tfm{Tp 1 -1 tm1_ scl tm2_ ccm dp/fm_ x d mf sf}bd\
-/T{m sh}bd\
-/Tb{gs sc f_ ff sf cft/FontMatrix get 3 get\
-  cft/FontBBox get dp 1 get x 3 get 2 i ml 3 1 r ml\
-  0 0 m 4 i stw p 4 i 4 i m fm_ cc\
-  0 2 i rl dp 0 rl 0 2 i ng rl 0 3 i rl ng 0 rl cp fl p p\
-  gr T}bd\
-/Im1{6 4 r tr scl t [3 i 0 0 5 i 0 0]{cf str1 rh p} im}bd\
-/Im1rev{6 4 r tr scl f [3 i 0 0 5 i 0 0]{cf str1 rh p} im}bd\
-/Im24{gs 6 4 r tr scl 8 [3 i 0 0 5 i 0 0]{cf str3 rh p} f 3 ci}bd\
-/Im1t{6 4 r tr scl t [3 i 0 0 5 i 0 0]{} im}bd\
-/Im24t{gs 6 4 r tr scl 8 [3 i 0 0 5 i 0 0]{} f 3 ci}bd\
-/ck2{/currentpagedevice wh \
-{p dp currentpagedevice dp 3 -1 r kn \
-{x get al p 3 -1 r eq 3 1 r eq and } \
-{p p p p t}ie} \
-{p p p t}ie}bd \
-/ck1{/currentpagedevice wh \
-{p dp currentpagedevice dp 3 -1 r kn \
-{x get eq} {p p p t}ie} \
-{p p t}ie}bd \
-/mtx{scl t [3 i 0 0 5 i 0 0]}bd \
-";
-
-char *pg_orient[] = {"Portrait","Landscape","Reverse Portrait","Reverse Landscape"};
-/*
- *  Setup definitions
- */
-
-static char *S_SetupDefs = "\
- /mx_ mx d\
- /im_ mx d\
- /tm1_ mx d\
- /tm2_ mx d\
- /str3 3 str d\
- /str1 1 str d\
-";
-
-/*******************************************************************
- *                       PRIVATE FUNCTIONS                         *
- *******************************************************************/
-
-void
-S_Flush(PsOutPtr self)
-{
-  int len;
-  
-  if( self->Buf[0] == '\0' )
-    return;
-  
-  len = strlen(self->Buf);
-
-  /* Append a newline char ('\n') if there isn't one there already */
-  if( self->Buf[len-1] != '\n' )
-  {
-    self->Buf[len++] = '\n';
-    self->Buf[len]   = '\0';
-  }
-
-  (void)fwrite(self->Buf, len, 1, self->Fp);
-
-  self->Buf[0] = '\0';
-}
-
-static void
-S_Comment(PsOutPtr self, char *comment)
-{
-  S_Flush(self);
-  strcpy(self->Buf, comment);
-  S_Flush(self);
-}
-
-static void
-S_OutDefs(PsOutPtr self, char *defs)
-{
-  int  i, k=0;
-  S_Flush(self);
-  memset(self->Buf, 0, sizeof(self->Buf));
-  for( i=0 ; defs[i]!='\0' ;)
-  {
-    if( k>70 && (i==0 || (i && defs[i-1]!='/')) &&
-        (defs[i]==' ' || defs[i]=='/' || defs[i]=='{') )
-    {
-      S_Flush(self);
-      k = 0;
-      memset(self->Buf, 0, sizeof(self->Buf));
-    }
-    if( k && self->Buf[k-1]==' ' && defs[i]==' ' ) { i++; continue; }
-    self->Buf[k] = defs[i];
-    k++; i++;
-  }
-  S_Flush(self);
-}
-
-void
-S_OutNum(PsOutPtr self, float num)
-{
-  int  i;
-  char buf[64];
-  int  len;
-
-  sprintf(buf, "%.3f", num);
-
-  /* Remove any zeros at the end */
-  for( i=strlen(buf)-1 ; buf[i]=='0' ; i-- ); buf[i+1] = '\0';
-  /* Remove '.' if it is the last character */
-  i = strlen(buf)-1; if( buf[i]=='.' ) buf[i] = '\0';
-
-  len = strlen(self->Buf);
-  if( len > 0 )
-  {
-    self->Buf[len++] = ' ';
-    self->Buf[len]   = '\0';
-  } 
-  strcpy(&self->Buf[len], buf);
-  if( (len+i)>70 ) S_Flush(self);
-}
-
-static void
-S_OutStr(PsOutPtr self, char *txt, int txtl)
-{
-  int  i, k;
-  char buf[1024];
-  for( i=0,k=0 ; i<txtl ; i++ )
-  {
-    if( (txt[i]>=' ' && txt[i]<='~') &&
-        txt[i]!='(' && txt[i]!=')' && txt[i]!='\\' )
-      { buf[k] = txt[i]; k++; continue; }
-    buf[k] = '\\'; k++;
-    sprintf(&buf[k], "%03o", txt[i]&0xFF);
-    /* Skip to the end of the buffer */
-    while( buf[k] != '\0' )
-      k++;
-  }
-  strcat(self->Buf, "(");
-  i = strlen(self->Buf);
-  memcpy(&self->Buf[i], buf, k);
-  self->Buf[i+k] = '\0';
-  strcat(self->Buf, ")");
-  if( strlen(self->Buf)>70 ) S_Flush(self);
-}
-
-/* Same as S_OutStr() but takes |short *| instead of |char *| */
-static void
-S_OutStr16(PsOutPtr self, unsigned short *txt, int txtl)
-{
-  int  i, k;
-  char buf[2048];
-  for( i=0,k=0 ; i<txtl ; i++ )
-  {
-    if( (txt[i]>=' ' && txt[i]<='~') &&
-        txt[i]!='(' && txt[i]!=')' && txt[i]!='\\' )
-      { buf[k] = txt[i]; k++; continue; }
-    buf[k] = '\\'; k++;
-    sprintf(&buf[k], "%03o", txt[i]&0xFFFF);
-    /* Skip to the end of the buffer */
-    while( buf[k] != '\0' )
-      k++;
-  }
-  strcat(self->Buf, "(");
-  i = strlen(self->Buf);
-  memcpy(&self->Buf[i], buf, k);
-  self->Buf[i+k] = '\0';
-  strcat(self->Buf, ")");
-  if( strlen(self->Buf)>70 ) S_Flush(self);
-}
-
-void
-S_OutTok(PsOutPtr self, char *tok, int cr)
-{
-  int len = strlen(self->Buf);
-  if( len > 0 )
-  {
-    self->Buf[len++] = ' ';
-    self->Buf[len]   = '\0';
-  } 
-  strcpy(&self->Buf[len], tok);
-  if( cr ) S_Flush(self);
-}
-
-static void
-S_Color(PsOutPtr self, PsOutColor clr)
-{
-  int   ir, ig, ib;
-  ir = PSOUTCOLOR_TO_REDBITS(clr);
-  ig = PSOUTCOLOR_TO_GREENBITS(clr);
-  ib = PSOUTCOLOR_TO_BLUEBITS(clr);
-  if( ir==ig && ig==ib )
-    { S_OutNum(self, PSOUTCOLOR_BITS_TO_PSFLOAT(ir)); S_OutTok(self, "g", 1); }
-  else
-  {
-    S_OutNum(self, PSOUTCOLOR_BITS_TO_PSFLOAT(ir));
-    S_OutNum(self, PSOUTCOLOR_BITS_TO_PSFLOAT(ig));
-    S_OutNum(self, PSOUTCOLOR_BITS_TO_PSFLOAT(ib));
-    S_OutTok(self, "sc", 1);
-  }
-}
-
-static void
-S_SetPageDevice(PsOutPtr self, int orient, int count, int plex, int res,
-                int wd, int ht, int isPage)
-{
-    float fwd = ((float)wd/(float)res)*72.;
-    float fht = ((float)ht/(float)res)*72.;
-
-#define USE_WORKAROUND_COPY_COUNT_BUG 1
-
-#ifdef USE_WORKAROUND_COPY_COUNT_BUG
-    /* Workaround (see http://xprint.mozdev.org/bugs/show_bug.cgi?id=1861 -
-     * 'Need workaround for bug 1378 ...') to avoid that we print n^2 copies
-     * instead of n copies.
-     * The problem is that we use both /NumCopies here but pass the
-     * %copy-count% to the spooler, too.
-     * But we only have to use _one_ way...
-     *
-     * The final fix for bug 1378 (http://xprint.mozdev.org/bugs/show_bug.cgi?id=1378 -
-     * "PS DDX creates n^2 copies of a job instead of n copies") will back this
-     * workaround out and replace it with a better solution.
-     * (see mozilla.org bug 140030
-     * (http://bugzilla.mozilla.org/show_bug.cgi?id=140030 - "Setting number
-     * of copies causes too many copies to print") for the initial report for
-     * this issue...)
-     */
-    count = 1;
-#endif /* USE_WORKAROUND_COPY_COUNT_BUG */
-
-    S_OutTok(self, "/pWd", 0);
-    S_OutNum(self, fwd);
-    S_OutTok(self, "d /pHt", 0);
-    S_OutNum(self, fht);
-    S_OutTok(self, "d", 1);
-
-  /*
-   * if these are page attributes, have PostScript check to see if they
-   * have changed.  If not, don't do setpagedevice, since it will cause
-   * a page flush and screw up duplex printing.  Having PostScript check
-   * means we don't have to keep track ourselves.
-   */
-    if(isPage) {
-      S_OutNum(self, (float) orient);
-      S_OutTok(self, "/Orientation ck1", 0);
-      S_OutTok(self, "pWd pHt /PageSize ck2 and not {", 1);
-    }
-    S_OutTok(self, "{db", 0);
-
-    S_OutTok(self, "/Orientation", 0);
-    S_OutNum(self, (float) orient);
-    S_OutTok(self, " d ", 0);
-    S_OutTok(self, "/PageSize [pWd pHt] d", 0);
-
-    S_OutTok(self, " de spd", 0);
-    /*
-   * save a flag to show if we failed to set orientation... determined
-   * by both/either Orientation and/or PageSize, use this
-   * later to set/not set orientation using Cs command.
-   */
-    S_OutTok(self,"}stp /orientationFailed x d", 1);
-    /*
-   * if these are page attributes, have PostScript check to see if they
-   * have changed.  If not, don't do setpagedevice, since it will cause
-   * a page flush and screw up duplex printing.  Having PostScript check
-   * means we don't have to keep track ourselves.
-   */
-    if(isPage)
-    {
-      S_OutTok(self,"}if",1);
-
-      S_OutTok(self, (plex==0)?"f":"t", 0);
-      S_OutTok(self, "/Duplex ck1 ", 0);
-
-      S_OutTok(self, (plex==2)?"t":"f", 0);
-      S_OutTok(self, "/Tumble ck1 and ", 0);
-
-
-      S_OutNum(self, (float)res);
-      S_OutNum(self, (float)res);
-      S_OutTok(self, " /HWResolution ck2 and", 0);
-      
-      if( count>1 )
-      {
-          S_OutNum(self, (float)count);
-          S_OutTok(self, " /NumCopies", 0);
-          S_OutTok(self, " ck1 and ", 0);
-      }
-      S_OutTok(self," not {",1);
-    }
-    S_OutTok(self, "{db", 0);
-
-    S_OutTok(self, "/Duplex ", 0);
-    S_OutTok(self, (plex==0)?"f":"t", 0);
-    S_OutTok(self, " d ", 0);
-
-    S_OutTok(self, "/Tumble ", 0);
-    S_OutTok(self, (plex==2)?"t":"f", 0);
-    S_OutTok(self, " d ", 0);
-  
-    S_OutTok(self, " /HWResolution [", 0);
-    S_OutNum(self, (float)res);
-    S_OutNum(self, (float)res);
-    S_OutTok(self, "] d ", 0);
-
-    if( count>1 )
-    {
-      S_OutTok(self, " /NumCopies", 0);
-      S_OutNum(self, (float)count);
-      S_OutTok(self, " d ", 0);
-    }
-    S_OutTok(self, " de spd}stp p", 1);
-
-    if(isPage)
-    {
-      S_OutTok(self, "}if", 1);
-    }
-}
-
-/*******************************************************************
- *                        PUBLIC FUNCTIONS                         *
- *******************************************************************/
-
-FILE *
-PsOut_ChangeFile(PsOutPtr self, FILE *fp)
-{
-  FILE *nfp;
-
-  nfp = self->Fp;
-
-  self->Fp = fp;
-
-  return nfp;
-}
-
-PsOutPtr
-PsOut_BeginFile(FILE *fp, char *title, int orient, int count, int plex, int res,
-                int wd, int ht, Bool raw)
-{
-  int  i;
-  char buffer[256+32]; /* enougth space for a title with 256 chars... */
-/*
- *  Get ready to output PostScript header
- */
-  PsOutPtr psout;
-  psout = (PsOutPtr)xalloc(sizeof(PsOutRec));
-  memset(psout, 0, sizeof(PsOutRec));
-  psout->Fp = fp;
-  psout->isRaw = raw;
-  psout->pagenum = 0;
-
-  if (!raw) {
-/*
- *  Output PostScript header
- */
-      /* GhostScript will rant about the missing BoundingBox if we use
-       * "%!PS-Adobe-3.0 EPSF-3.0" here... */
-      S_Comment(psout, "%!PS-Adobe-3.0");
-#ifdef XP_USE_FREETYPE
-      {
-        FT_Int ftmajor = 0,
-               ftminor = 0,
-               ftpatch = 0; 
-        extern FT_Library ftypeLibrary; /* defined in xc/lib/font/FreeType/ftfuncs.c */
-
-        FT_Library_Version(ftypeLibrary, &ftmajor, &ftminor, &ftpatch);
-        sprintf(buffer, 
-                "%%%%Creator: The X Print Server's PostScript DDX "
-                "(%s, release %d, FreeType version %d.%d.%d)",
-                VENDOR_STRING, VENDOR_RELEASE,
-                (int)ftmajor, (int)ftminor, (int)ftpatch);
-      }
-#else
-      sprintf(buffer, 
-              "%%%%Creator: The X Print Server's PostScript DDX (%s, release %d)",
-              VENDOR_STRING, VENDOR_RELEASE);
-#endif /* XP_USE_FREETYPE */
-      S_Comment(psout, buffer);
-
-      if (title)
-      {
-        sprintf(buffer, "%%%%Title: %.256s", title);
-        S_Comment(psout, buffer);
-      }
-      S_Comment(psout, "%%EndComments");
-      S_Comment(psout, "%%BeginProlog");
-      S_Comment(psout, "%%BeginProcSet: XServer_PS_Functions");
-      S_OutDefs(psout, S_StandardDefs);
-      S_OutDefs(psout, S_CompositeDefs);
-      S_Comment(psout, "%%EndProcSet");
-      S_Comment(psout, "%%EndProlog");
-      S_Comment(psout, "%%BeginSetup");
-      /* set document level page attributes */
-      S_SetPageDevice(psout, orient, count, plex, res, wd, ht, 0);
-      S_Comment(psout, "%%Pages: atend");
-      S_OutDefs(psout, S_SetupDefs);
-      S_Comment(psout, "%%EndSetup");
-  }
-/*
- *  Initialize the structure
- */
-  psout->CurColor    = PSOUTCOLOR_NOCOLOR;
-  psout->LineWidth   = 1;
-  psout->LineCap     = PsCButt;
-  psout->LineJoin    = PsJMiter;
-  psout->NDashes     = 0;
-  psout->Dashes      = (int *)0;
-  psout->FontName    = (char *)0;
-  psout->FontSize    = 0;
-  psout->start_image = 0;
-  for( i=0 ; i<4 ; i++ ) psout->FontMtx[i] = 0.;
-  psout->ImageFormat = 0;
-  return(psout);
-}
-
-void
-PsOut_EndFile(PsOutPtr self, int closeFile)
-{
-  char coms[50];
-  
-  if (!self)
-    return;
-
-  if (!self->isRaw) {
-      S_Comment(self,"%%Trailer");
-      sprintf(coms,"%%%%Pages: %d", self->pagenum);
-      S_Comment(self, coms);
-      S_Comment(self, "%%EOF");
-  }
-  if( self->NDashes && self->Dashes ) xfree(self->Dashes);
-  if( self->FontName ) xfree(self->FontName);
-  if( self->Patterns ) xfree(self->Patterns);
-  if( self->Clip.rects ) xfree(self->Clip.rects);
-  if( closeFile ) fclose(self->Fp);
-  xfree(self);
-}
-
-void
-PsOut_BeginPage(PsOutPtr self, int orient, int count, int plex, int res,
-                int wd, int ht)
-{
-  char coms[50];
-
-/*** comment for pagenumbers *****/
-
-  S_Comment(self,"%%PageHeader");
-  self->pagenum++;
-  sprintf(coms,"%%%%Page: %d %d", self->pagenum, self->pagenum);
-  S_Comment(self, coms);
-  sprintf(coms,"%%%%PageOrientation: %s",pg_orient[orient]);
-  S_Comment(self, coms);
-
-/*** end comment *****************/
-
-  /* set page level page attributes */
-  S_SetPageDevice(self, orient, count, plex, res, wd, ht, 1);
-  
-  S_OutTok(self, "gs ", 0);
-  /*
-   * check to see if we set orientation already; if it wasn't set,
-   * use Cs to set orientation here.
-   */
-  S_OutNum(self, (float)orient);
-  S_OutTok(self, "orientationFailed { ", 0);
-  S_OutNum(self, (float)orient);
-  S_OutTok(self, " } { 0 }ie Cs 100 sml gs", 1);
-}
-
-void
-PsOut_EndPage(PsOutPtr self)
-{
-  S_OutTok(self, "gr gr sp", 1);
-
-  /* did grestore: mark attributes 'dirty' so they will be re-sent */
-  PsOut_DirtyAttributes(self);
-
-/*** comment for pagenumbers *****/
-
-  S_Comment(self,"%%PageTrailer");
-
-/*** end comment *****************/
-}
-
-void
-PsOut_DirtyAttributes(PsOutPtr self)
-{
-  int  i;
-  self->CurColor    = PSOUTCOLOR_NOCOLOR;
-  self->LineWidth   = -1;
-  self->LineCap     = (PsCapEnum)-1;
-  self->LineJoin    = (PsJoinEnum)-1;
-  self->NDashes     = -1;
-  self->FontSize    = -1;
-  for( i=0 ; i<4 ; i++ ) self->FontMtx[i] = -1.;
-  if( self->Dashes   ) { xfree(self->Dashes);   self->Dashes   = (int *)0;  }
-  if( self->FontName ) { xfree(self->FontName); self->FontName = (char *)0; }
-}
-
-void
-PsOut_Comment(PsOutPtr self, char *comment)
-{
-  S_Comment(self, comment);
-}
-
-void
-PsOut_Offset(PsOutPtr self, int x, int y)
-{
-  self->XOff = x;
-  self->YOff = y;
-}
-
-void
-PsOut_Clip(PsOutPtr self, int clpTyp, PsClipPtr clpinf)
-{
-  int  i, k;
-  int  changed = 0;
-  int  xo = self->XOff;
-  int  yo = self->YOff;
-
-  if( self->InTile ) return;
-  if( self->InFrame ) xo = yo = 0;
-  if( clpTyp!=self->ClipType ) changed = 1;
-  else
-  {
-    if( clpinf->nRects!=self->Clip.nRects ) changed = 1;
-    else
-    {
-      if( clpinf->nOutterClips!=self->Clip.nOutterClips ) changed = 1;
-      else
-      {
-        for( i=0 ; i<clpinf->nOutterClips ; i++ )
-        {
-          if( memcmp(&clpinf->outterClips[i], &self->Clip.outterClips[i],
-                     sizeof(PsRectRec))!=0 ) break;
-        }
-        if( i<clpinf->nOutterClips ) changed = 1;
-        else
-        {
-          for( i=0 ; i<clpinf->nRects ; i++ )
-          {
-            if( memcmp(&clpinf->rects[i], &self->Clip.rects[i],
-                       sizeof(PsRectRec))!=0 ) { changed = 1; break; }
-          }
-        }
-      }
-    }
-    if( clpinf->nElms!=self->Clip.nElms ) changed = 1;
-    else
-    {
-      for( i=0 ; i<clpinf->nElms ; i++ )
-      {
-        if( clpinf->elms[i].type!=PSOUT_POINTS )
-        {
-          if( memcmp(&clpinf->elms[i], &self->Clip.elms[i],
-                     sizeof(PsElmRec))!=0 ) { changed = 1; break; }
-        }
-        else
-        {
-          if( clpinf->elms[i].type!=self->Clip.elms[i].type ||
-              clpinf->elms[i].nPoints!=self->Clip.elms[i].nPoints )
-            { changed = 1; break; }
-          else
-          {
-            for( k=0 ; k<clpinf->elms[i].nPoints ; k++ )
-            {
-              if( memcmp(&clpinf->elms[i].c.points[k],
-                         &self->Clip.elms[i].c.points[k], sizeof(PsPointRec)) )
-                { changed = 1; break; }
-            }
-            if( changed ) break;
-          }
-        }
-      }
-    }
-  }
-
-  if( self->Clip.rects )       xfree(self->Clip.rects);
-  if( self->Clip.outterClips ) xfree(self->Clip.outterClips);
-  if( self->Clip.elms )
-    PsDestroyFillElementList(self->Clip.nElms, self->Clip.elms);
-  self->ClipType          = clpTyp;
-  self->Clip.nRects       = clpinf->nRects;
-  self->Clip.nElms        = clpinf->nElms;
-  self->Clip.nOutterClips = clpinf->nOutterClips;
-  if( clpinf->nRects )
-  {
-    self->Clip.rects = (PsRectPtr)xalloc(clpinf->nRects*sizeof(PsRectRec));
-    memcpy(self->Clip.rects, clpinf->rects, clpinf->nRects*sizeof(PsRectRec));
-  }
-  else self->Clip.rects = 0;
-  if( clpinf->nOutterClips )
-  {
-    self->Clip.outterClips = (PsRectPtr)xalloc(clpinf->nOutterClips*
-					       sizeof(PsRectRec));
-    memcpy(self->Clip.outterClips, clpinf->outterClips,
-           clpinf->nOutterClips*sizeof(PsRectRec));
-  }
-  else self->Clip.outterClips = 0;
-  if( clpinf->nElms )
-    self->Clip.elms = PsCloneFillElementList(clpinf->nElms, clpinf->elms);
-  else self->Clip.elms = 0;
-
-  PsOut_DirtyAttributes(self);
-  S_OutTok(self, "gr gs", 1);
-  if( self->Clip.nOutterClips )
-  {
-    for( i=0 ; i<self->Clip.nOutterClips ; i++ )
-    {
-      S_OutNum(self, (float)(self->Clip.outterClips[i].x));
-      S_OutNum(self, (float)(self->Clip.outterClips[i].y));
-      S_OutNum(self, (float)self->Clip.outterClips[i].w);
-      S_OutNum(self, (float)self->Clip.outterClips[i].h);
-      S_OutTok(self, "R", 1);
-    }
-    S_OutTok(self, "cl n", 1);
-  }
-  if( self->Clip.nRects )
-  {
-    for( i=0 ; i<self->Clip.nRects ; i++ )
-    {
-      S_OutNum(self, (float)(self->Clip.rects[i].x+xo));
-      S_OutNum(self, (float)(self->Clip.rects[i].y+yo));
-      S_OutNum(self, (float)self->Clip.rects[i].w);
-      S_OutNum(self, (float)self->Clip.rects[i].h);
-      S_OutTok(self, "R", 1);
-    }
-    S_OutTok(self, "cl n", 1);
-  }
-  if( self->Clip.nElms )
-  {
-    PsElmPtr elm = self->Clip.elms;
-    for( i=0 ; i<self->Clip.nElms ; i++,elm++ )
-    {
-      switch(elm->type)
-      {
-        case PSOUT_POINTS:
-          for( k=0 ; k<elm->nPoints ; k++ )
-          {
-            S_OutNum(self, (float)elm->c.points[k].x+xo);
-            S_OutNum(self, (float)elm->c.points[k].y+yo);
-            if( k==0 ) S_OutTok(self, "m", 0);
-            else       S_OutTok(self, "l", 0);
-          }
-          S_OutTok(self, "cp", 1);
-          break;
-        case PSOUT_RECT:
-          S_OutNum(self, (float)elm->c.rect.x+xo);
-          S_OutNum(self, (float)elm->c.rect.y+yo);
-          S_OutNum(self, (float)elm->c.rect.w);
-          S_OutNum(self, (float)elm->c.rect.h);
-          S_OutTok(self, "R", 1);
-          break;
-        case PSOUT_ARC:
-          if( elm->c.arc.style==PsPieSlice )
-          {
-            S_OutNum(self, (float)elm->c.arc.x+xo+(float)elm->c.arc.w/2.);
-            S_OutNum(self, (float)elm->c.arc.y+yo+(float)elm->c.arc.h/2.);
-            S_OutTok(self, "m", 0);
-          }
-          S_OutNum(self, (float)elm->c.arc.x+xo+(float)elm->c.arc.w/2.);
-          S_OutNum(self, (float)elm->c.arc.y+yo+(float)elm->c.arc.h/2.);
-          S_OutNum(self, (float)elm->c.arc.w);
-          S_OutNum(self, (float)elm->c.arc.h);
-          S_OutNum(self, (float)elm->c.arc.a1/64.);
-          S_OutNum(self, (float)elm->c.arc.a1/64.+(float)elm->c.arc.a2/64.);
-          if( elm->c.arc.a2<0 ) S_OutTok(self, "An cp", 1);
-          else                  S_OutTok(self, "Ac cp", 1);
-          break;
-      }
-    }
-    S_OutTok(self, "cl n", 1);
-  }
-}
-
-void
-PsOut_Color(PsOutPtr self, PsOutColor clr)
-{
-  if( clr==self->CurColor || self->InTile>=PsStip ) return;
-  self->CurColor = clr;
-  S_Color(self, clr);
-}
-
-void
-PsOut_FillRule(PsOutPtr self, PsRuleEnum rule)
-{
-  self->FillRule = rule;
-}
-
-void
-PsOut_LineAttrs(PsOutPtr self, int wd, PsCapEnum cap, PsJoinEnum join,
-                int nDsh, int *dsh, int dshOff, PsOutColor bclr)
-{
-  int         i;
-  int         same = 1;
-
-  if( wd!=self->LineWidth && wd>=0 )
-  {
-    if( wd==0 ) wd = 1;
-    self->LineWidth = wd;
-    S_OutNum(self, (float)wd); S_OutTok(self, "w", 1);
-  }
-  if( cap!=self->LineCap )
-  {
-    self->LineCap = cap;
-    S_OutNum(self, (float)cap); S_OutTok(self, "lc", 1);
-  }
-  if( join!=self->LineJoin )
-  {
-    self->LineJoin = join;
-    S_OutNum(self, (float)join); S_OutTok(self, "lj", 1);
-  }
-  if( nDsh!=self->NDashes ) same = 0;
-  else if( dshOff!=self->DashOffset ) same = 0;
-  else if( nDsh )
-  {
-    for( i=0 ; i<nDsh ; i++ )
-      { if( dsh[i]!=self->Dashes[i] ) break; }
-    if( i<nDsh ) same = 0;
-  }
-  if( !same )
-  {
-    if( self->NDashes && self->Dashes )
-      { xfree(self->Dashes); self->Dashes = (int *)0; }
-    self->NDashes    = nDsh;
-    self->DashOffset = dshOff;
-    if( nDsh ) self->Dashes = (int *)xalloc(sizeof(int)*nDsh);
-    S_OutTok(self, "[", 0);
-    for( i=0 ; i<nDsh ; i++ )
-    {
-      self->Dashes[i] = dsh[i];
-      S_OutNum(self, (float)dsh[i]);
-    }
-    S_OutTok(self, "]", 0);
-    S_OutNum(self, (float)dshOff);
-    S_OutTok(self, "ds", 1);
-  }
-
-  if( nDsh )
-    self->LineBClr = bclr;
-  else
-    bclr = PSOUTCOLOR_NOCOLOR;
-}
-
-void
-PsOut_TextAttrs(PsOutPtr self, char *fnam, int siz, int iso)
-{
-  int       i;
-  char      buf[256];
-  if( self->FontName && strcmp(fnam, self->FontName)==0 &&
-      siz==self->FontSize ) return;
-  if( self->FontName ) xfree(self->FontName);
-  self->FontName = (char *)xalloc(strlen(fnam)+1);
-  strcpy(self->FontName, fnam);
-  self->FontSize = siz;
-  for( i=0 ; i<4 ; i++ ) self->FontMtx[i] = -1.;
-  strcpy(buf, "/"); strcat(buf, fnam);
-  S_OutTok(self, buf, 0);
-  S_OutNum(self, (float)siz);
-  if( iso ) S_OutTok(self, "t", 0);
-  else      S_OutTok(self, "f", 0);
-  S_OutTok(self, "Tf", 1);
-}
-
-void
-PsOut_TextAttrsMtx(PsOutPtr self, char *fnam, float *mtx, int iso)
-{
-  int       i;
-  char      buf[256];
-  if( self->FontName && strcmp(fnam, self->FontName)==0 &&
-      mtx[0]==self->FontMtx[0] && mtx[1]==self->FontMtx[1] &&
-      mtx[2]==self->FontMtx[2] && mtx[3]==self->FontMtx[3] ) return;
-  if( self->FontName ) xfree(self->FontName);
-  self->FontName = (char *)xalloc(strlen(fnam)+1);
-  strcpy(self->FontName, fnam);
-  for( i=0 ; i<4 ; i++ ) self->FontMtx[i] = mtx[i];
-  self->FontSize = -1;
-  strcpy(buf, "/"); strcat(buf, fnam); strcat(buf, " [");
-  S_OutTok(self, buf, 0);
-  for( i=0 ; i<4 ; i++ ) S_OutNum(self, mtx[i]);
-  S_OutTok(self, "0 0]", 0);
-  if( iso ) S_OutTok(self, "t", 0);
-  else      S_OutTok(self, "f", 0);
-  S_OutTok(self, "Tfm", 1);
-}
-
-void
-PsOut_Polygon(PsOutPtr self, int nPts, PsPointPtr pts)
-{
-  int  i;
-  int  xo = self->XOff;
-  int  yo = self->YOff;
-
-  if( self->InFrame || self->InTile ) xo = yo = 0;
-  if( nPts<=2 ) return;
-  for( i=0 ; i<nPts ; i++ )
-  {
-    S_OutNum(self, (float)(pts[i].x+xo));
-    S_OutNum(self, (float)(pts[i].y+yo));
-    if( i==0 ) S_OutTok(self, "m", 0);
-    else       S_OutTok(self, "l", 0);
-  }
-  if( self->FillRule==PsEvenOdd ) S_OutTok(self, "cp ef", 1);
-  else                            S_OutTok(self, "cp fl", 1);
-}
-
-void
-PsOut_FillRect(PsOutPtr self, int x, int y, int w, int h)
-{
-  int  xo = self->XOff;
-  int  yo = self->YOff;
-
-  if( self->InFrame || self->InTile ) xo = yo = 0;
-  x += xo; y += yo;
-  S_OutNum(self, (float)x);
-  S_OutNum(self, (float)y);
-  S_OutNum(self, (float)w);
-  S_OutNum(self, (float)h);
-  S_OutTok(self, "R fl", 1);
-}
-
-void
-PsOut_FillArc(PsOutPtr self, int x, int y, int w, int h,
-	      float ang1, float ang2, PsArcEnum style)
-{
-  int  xo = self->XOff;
-  int  yo = self->YOff;
-
-  if( self->InFrame || self->InTile ) xo = yo = 0;
-  x += xo; y += yo;
-  if( style==PsPieSlice )
-  {
-    S_OutNum(self, (float)x+(float)w/2.);
-    S_OutNum(self, (float)y+(float)h/2.);
-    S_OutTok(self, "m", 0);
-  }
-  S_OutNum(self, (float)x+(float)w/2.);
-  S_OutNum(self, (float)y+(float)h/2.);
-  S_OutNum(self, (float)w);
-  S_OutNum(self, (float)h);
-  S_OutNum(self, ang1);
-  S_OutNum(self, ang1+ang2);
-  if( ang2<0 ) S_OutTok(self, "An cp fl", 1);
-  else         S_OutTok(self, "Ac cp fl", 1);
-}
-
-void
-PsOut_Lines(PsOutPtr self, int nPts, PsPointPtr pts)
-{
-  int  i;
-  int  xo = self->XOff;
-  int  yo = self->YOff;
-
-  if( self->InFrame || self->InTile ) xo = yo = 0;
-  if( nPts<1 ) return;
-  for( i=0 ; i<nPts ; i++ )
-  {
-    S_OutNum(self, (float)(pts[i].x+xo));
-    S_OutNum(self, (float)(pts[i].y+yo));
-    if( i==0 ) S_OutTok(self, "m", 0);
-    else       S_OutTok(self, "l", 0);
-  }
-  if( self->LineBClr != PSOUTCOLOR_NOCOLOR )
-  {
-    S_OutTok(self, "gs", 0);
-    S_Color(self, self->LineBClr);
-    S_OutTok(self, "[] 0 ds st gr", 0);
-  }
-  S_OutTok(self, "st", 1);
-}
-
-void
-PsOut_Points(PsOutPtr self, int nPts, PsPointPtr pts)
-{
-  int  i;
-  int  xo = self->XOff;
-  int  yo = self->YOff;
-
-  if( self->InFrame || self->InTile ) xo = yo = 0;
-  if( nPts<1 ) return;
-  for( i=0 ; i<nPts ; i++ )
-  {
-    S_OutNum(self, (float)(pts[i].x+xo));
-    S_OutNum(self, (float)(pts[i].y+yo));
-    S_OutTok(self, "P", 1);
-  }
-}
-
-void
-PsOut_DrawRect(PsOutPtr self, int x, int y, int w, int h)
-{
-  int  xo = self->XOff;
-  int  yo = self->YOff;
-
-  if( self->InFrame || self->InTile ) xo = yo = 0;
-  x += xo; y += yo;
-  S_OutNum(self, (float)x);
-  S_OutNum(self, (float)y);
-  S_OutNum(self, (float)w);
-  S_OutNum(self, (float)h);
-  S_OutTok(self, "R", 0);
-  if( self->LineBClr != PSOUTCOLOR_NOCOLOR )
-  {
-    S_OutTok(self, "gs", 0);
-    S_Color(self, self->LineBClr);
-    S_OutTok(self, "[] 0 ds st gr", 0);
-  }
-  S_OutTok(self, "st", 1);
-}
-
-void
-PsOut_DrawArc(PsOutPtr self, int x, int y, int w, int h, 
-	      float ang1, float ang2)
-{
-  int  xo = self->XOff;
-  int  yo = self->YOff;
-
-  if( self->InFrame || self->InTile ) xo = yo = 0;
-  x += xo; y += yo;
-  S_OutNum(self, (float)x+(float)w/2.);
-  S_OutNum(self, (float)y+(float)h/2.);
-  S_OutNum(self, (float)w);
-  S_OutNum(self, (float)h);
-  S_OutNum(self, ang1);
-  S_OutNum(self, ang1+ang2);
-  if( ang2<0 ) S_OutTok(self, "An", 0);
-  else         S_OutTok(self, "Ac", 0);
-  if( self->LineBClr != PSOUTCOLOR_NOCOLOR )
-  {
-    S_OutTok(self, "gs", 0);
-    S_Color(self, self->LineBClr);
-    S_OutTok(self, "[] 0 ds st gr", 0);
-  }
-  S_OutTok(self, "st", 1);
-}
-
-void
-PsOut_Text(PsOutPtr self, int x, int y, char *text, int textl, PsOutColor bclr)
-{
-  int  xo = self->XOff;
-  int  yo = self->YOff;
-
-  if( self->InFrame || self->InTile ) xo = yo = 0;
-  x += xo; y += yo;
-  S_OutStr(self, text, textl);
-  S_OutNum(self, (float)x);
-  S_OutNum(self, (float)y);
-  if( bclr == PSOUTCOLOR_NOCOLOR )
-    S_OutTok(self, "T", 1);
-  else
-  {
-    int ir = PSOUTCOLOR_TO_REDBITS(bclr);
-    int ig = PSOUTCOLOR_TO_GREENBITS(bclr);
-    int ib = PSOUTCOLOR_TO_BLUEBITS(bclr);
-
-    S_OutNum(self, PSOUTCOLOR_BITS_TO_PSFLOAT(ir));
-    S_OutNum(self, PSOUTCOLOR_BITS_TO_PSFLOAT(ig));
-    S_OutNum(self, PSOUTCOLOR_BITS_TO_PSFLOAT(ib));
-    S_OutTok(self, "Tb", 1);
-  }
-}
-
-void
-PsOut_Text16(PsOutPtr self, int x, int y, unsigned short *text, int textl, PsOutColor bclr)
-{
-  int  xo = self->XOff;
-  int  yo = self->YOff;
-
-  if( self->InFrame || self->InTile ) xo = yo = 0;
-  x += xo; y += yo;
-  S_OutStr16(self, text, textl);
-  S_OutNum(self, (float)x);
-  S_OutNum(self, (float)y);
-  if( bclr == PSOUTCOLOR_NOCOLOR )
-    S_OutTok(self, "T", 1);
-  else
-  {
-    int ir = PSOUTCOLOR_TO_REDBITS(bclr);
-    int ig = PSOUTCOLOR_TO_GREENBITS(bclr);
-    int ib = PSOUTCOLOR_TO_BLUEBITS(bclr);
-    S_OutNum(self, PSOUTCOLOR_BITS_TO_PSFLOAT(ir));
-    S_OutNum(self, PSOUTCOLOR_BITS_TO_PSFLOAT(ig));
-    S_OutNum(self, PSOUTCOLOR_BITS_TO_PSFLOAT(ib));
-    S_OutTok(self, "Tb", 1);
-  }
-}
-
-#ifdef BM_CACHE
-void  /* new */
-PsOut_ImageCache(PsOutPtr self, int x, int y, long cache_id, PsOutColor bclr, PsOutColor fclr)
-{
-  char cacheID[10];
-  int xo = self->XOff;
-  int yo = self->YOff;
-
-  if( self->InFrame || self->InTile ) xo = yo = 0;
-  x += xo; y += yo;
-  sprintf(cacheID, "c%di", cache_id);
-
-  S_OutNum(self, (float)x);
-  S_OutNum(self, (float)y);
-
-  if( fclr==PSOUTCOLOR_WHITE )
-  {
-    int ir = PSOUTCOLOR_TO_REDBITS(bclr);
-    int ig = PSOUTCOLOR_TO_GREENBITS(bclr);
-    int ib = PSOUTCOLOR_TO_BLUEBITS(bclr);
-
-    if( ir==ig && ig==ib )
-      S_OutNum(self, PSOUTCOLOR_BITS_TO_PSFLOAT(ir));
-    else
-      S_OutNum(self, (float)0);
-      self->RevImage = 1;
-    }
-  else
-  {
-    int ir = PSOUTCOLOR_TO_REDBITS(fclr);
-    int ig = PSOUTCOLOR_TO_GREENBITS(fclr);
-    int ib = PSOUTCOLOR_TO_BLUEBITS(fclr);
-
-    if( ir==ig && ig==ib )
-      S_OutNum(self, PSOUTCOLOR_BITS_TO_PSFLOAT(ir));
-    else
-      S_OutNum(self, (float)0);
-  }
-
-  S_OutTok(self, cacheID, 1);
-}     /* new */
-
-void  /* new */
-PsOut_BeginImageCache(PsOutPtr self, long cache_id)
-{
-  char cacheID[10];
-
-  sprintf(cacheID, "/c%di {", cache_id);
-
-  S_OutTok(self, cacheID, 0);
-}     /* new */
-
-void  /* new */
-PsOut_EndImageCache(PsOutPtr self)
-{
-  S_OutTok(self, "}bd", 1);
-}     /* new */
-#endif
-
-void
-PsOut_BeginImage(PsOutPtr self, PsOutColor bclr, PsOutColor fclr, int x, int y,
-                 int w, int h, int sw, int sh, int format)
-{
-  PsOutColor savClr = self->CurColor;
-  int xo = self->XOff;
-  int yo = self->YOff;
-
-  if( self->InFrame || self->InTile ) xo = yo = 0;
-  x += xo; y += yo;
-  if( self->InTile )
-  {
-    if( self->InTile>=PsStip && format!=1 ) { self->ImgSkip = 1; return; }
-    self->ImgBClr = bclr; self->ImgFClr = fclr;
-    self->ImgX    = x;    self->ImgY    = y;
-    self->ImgW    = w;    self->ImgH    = h;
-    self->SclW    = sw;   self->SclH    = sh;
-    S_OutTok(self, "<", 0);
-    self->ImageFormat = format;
-    self->RevImage = 0;
-    if( self->InTile==PsTile && format==1 && fclr==PSOUTCOLOR_WHITE )
-      self->RevImage = 1;
-    return;
-  }
-
-  self->RevImage = 0;
-  if( format==1 )
-  {
-    S_OutTok(self, "gs", 0);
-    if( fclr==PSOUTCOLOR_WHITE )
-    {
-      PsOut_Color(self, fclr);
-      PsOut_FillRect(self, x, y, sw, sh);
-      PsOut_Color(self, bclr);
-      self->RevImage = 1;
-    }
-    else
-    {
-      PsOut_Color(self, bclr);
-      PsOut_FillRect(self, x, y, sw, sh);
-      PsOut_Color(self, fclr);
-    }
-  }
-  S_OutNum(self, (float)x);
-  S_OutNum(self, (float)y);
-  S_OutNum(self, (float)w);
-  S_OutNum(self, (float)h);
-  S_OutNum(self, (float)sw);
-  S_OutNum(self, (float)sh);
-  if( format==1 ) {
-	if(self->RevImage) 
-	    S_OutTok(self, "Im1rev", 1);
-	else
-	    S_OutTok(self, "Im1", 1);
-  }
-  else            S_OutTok(self, "Im24", 1);
-  self->ImageFormat = format;
-  self->CurColor    = savClr;
-}
-
-void
-PsOut_BeginImageIM(PsOutPtr self, PsOutColor bclr, PsOutColor fclr, int x, int y,
-                 int w, int h, int sw, int sh, int format)
-{
-  PsOutColor savClr = self->CurColor;
-  int xo = self->XOff;
-  int yo = self->YOff;
-
-  if( self->InFrame || self->InTile ) xo = yo = 0;
-  x += xo; y += yo;
-  if( self->InTile )
-  {
-    if( self->InTile>=PsStip && format!=1 ) { self->ImgSkip = 1; return; }
-    self->ImgBClr = bclr; self->ImgFClr = fclr;
-    self->ImgX    = x;    self->ImgY    = y;
-    self->ImgW    = w;    self->ImgH    = h;
-    self->SclW    = sw;   self->SclH    = sh;
-    S_OutTok(self, "<", 0);
-    self->ImageFormat = format;
-    self->RevImage = 0;
-    if( self->InTile==PsTile && format==1 && fclr==PSOUTCOLOR_WHITE )
-      self->RevImage = 1;
-    return;
-  }
-
-  self->RevImage = 0;
-  if( format==1 )
-  {
-    S_OutTok(self, "gs", 0);
-#ifdef BM_CACHE
-    S_OutTok(self, "g", 1);
-#else
-    if( fclr==PSOUTCOLOR_WHITE )
-    {
-      PsOut_Color(self, bclr);
-      self->RevImage = 1;
-    }
-    else
-    {
-      PsOut_Color(self, fclr);
-    }
-#endif
-  }
-
-#ifdef BM_CACHE
-  S_OutTok(self, "tr", 0);    /* new */
-#else
-  S_OutNum(self, (float)x);
-  S_OutNum(self, (float)y);
-#endif
-  S_OutNum(self, (float)w);
-  S_OutNum(self, (float)h);
-  S_OutNum(self, (float)sw);
-  S_OutNum(self, (float)sh);
-#ifdef BM_CACHE
-  S_OutTok(self, "mtx", 1);   /* new */
-  S_OutTok(self, "<", 0);     /* new */
-  self->start_image = 1;
-#else
-  if( format==1 ){
-        if(self->RevImage)
-            S_OutTok(self, "Im1rev", 1);
-        else
-            S_OutTok(self, "Im1", 1);
-  }
-  else      S_OutTok(self, "Im24", 1);
-#endif
-  self->ImageFormat = format;
-  self->CurColor    = savClr;
-}
-
-void
-PsOut_EndImage(PsOutPtr  self)
-{
-  if( self->ImgSkip ) { self->ImgSkip = 0; return; }
-  if( self->InTile )
-  {
-    S_OutTok(self, ">", 1);
-    if( self->ImageFormat==1 && self->InTile==PsTile )
-    {
-      if( self->ImgFClr==PSOUTCOLOR_WHITE )
-      {
-        PsOut_Color(self, self->ImgFClr);
-        PsOut_FillRect(self, self->ImgX, self->ImgY, self->SclW, self->SclH);
-        PsOut_Color(self, self->ImgBClr);
-      }
-      else
-      {
-        PsOut_Color(self, self->ImgBClr);
-        PsOut_FillRect(self, self->ImgX, self->ImgY, self->SclW, self->SclH);
-        PsOut_Color(self, self->ImgFClr);
-      }
-    }
-    S_OutNum(self, (float)self->ImgX);
-    S_OutNum(self, (float)self->ImgY);
-    S_OutNum(self, (float)self->ImgW);
-    S_OutNum(self, (float)self->ImgH);
-    S_OutNum(self, (float)self->SclW);
-    S_OutNum(self, (float)self->SclH);
-    if( self->ImageFormat==1 ) S_OutTok(self, "Im1t", 1);
-    else                       S_OutTok(self, "Im24t", 1);
-    self->ImageFormat = 0;
-    self->RevImage    = 0;
-    return;
-  }
-  /*
-   * Bug 4639307: Move flush before "> im" to get all of bitmap into ps file.
-   */
-  S_Flush(self);
-#ifdef BM_CACHE
-  if(self->start_image)
-    S_OutTok(self, "> im", 1);       /* new */
-#endif
-  self->ImageFormat = 0;
-  self->RevImage    = 0;
-#ifdef BM_CACHE
-  if(self->start_image)
-  {
-    self->start_image = 0;
-    S_OutTok(self, "gr", 0);
-  }
-  else
-    S_OutTok(self, "gr", 1);
-#else
-  S_OutTok(self, "gr", 1);
-#endif
-}
-
-void
-PsOut_OutImageBytes(PsOutPtr self, int nBytes, char *bytes)
-{
-  int   i;
-  int   b;
-  int   len;
-  const char hex[] = { '0', '1', '2', '3', '4', '5', '6', '7',
-                       '8', '9', 'a', 'b', 'c', 'd', 'e', 'f' };
-
-  if( (!self->ImageFormat) || self->ImgSkip ) return;
-
-  len = strlen(self->Buf);
-
-  for( i=0 ; i<nBytes ; i++ )
-  {
-    if( self->RevImage ) b = (int)((bytes[i]^0xFF)&0xFF);
-    else                 b = (int)(bytes[i]&0xFF);
-    
-    self->Buf[len++] = hex[(b&0xF0) >> 4];
-    self->Buf[len++] = hex[(b&0x0F)];
-    self->Buf[len] = '\0';
-
-    if( len>70 ) 
-    {
-      S_Flush(self);
-      len = 0;
-    }
-  }
-}
-
-void
-PsOut_BeginFrame(PsOutPtr self, int xoff, int yoff, int x, int y,
-                 int w, int h)
-{
-  int  xo = self->XOff;
-  int  yo = self->YOff;
-
-  if( self->InFrame ) xo = yo = 0;
-  S_OutTok(self, "gs", 0);
-  S_OutNum(self, (float)(x+xo));
-  S_OutNum(self, (float)(y+yo));
-  S_OutNum(self, (float)w);
-  S_OutNum(self, (float)h);
-  S_OutTok(self, "R cl n", 0);
-  xoff += xo; yoff += yo;
-  if( xoff || yoff )
-  {
-    S_OutNum(self, (float)xoff);
-    S_OutNum(self, (float)yoff);
-    S_OutTok(self, "tr", 0);
-  }
-  S_OutTok(self, "gs", 1);
-  self->InFrame += 1;
-}
-
-void
-PsOut_EndFrame(PsOutPtr self)
-{
-  self->InFrame -= 1;
-  if( self->InFrame<0 ) self->InFrame = 0;
-  S_OutTok(self, "gr gr", 1);
-  PsOut_DirtyAttributes(self);
-}
-
-int
-PsOut_BeginPattern(PsOutPtr self, void *tag, int w, int h, PsFillEnum type,
-                   PsOutColor bclr, PsOutColor fclr)
-{
-  int   i;
-  char  key[64];
-
-  for( i=0 ; i<self->NPatterns ; i++ )
-    { if( self->Patterns[i].tag==tag && self->Patterns[i].type==type ) break; }
-  if( i<self->NPatterns ) return(1);
-  if( (self->NPatterns+1)>self->MxPatterns )
-  {
-    if( self->Patterns )
-    {
-      self->MxPatterns *= 2;
-      self->Patterns =
-        (PsPatPtr)xrealloc(self->Patterns, sizeof(PsPatRec)*self->MxPatterns);
-    }
-    else
-    {
-      self->MxPatterns = 64;
-      self->Patterns = (PsPatPtr)xalloc(sizeof(PsPatRec)*self->MxPatterns);
-    }
-  }
-  self->Patterns[self->NPatterns].tag  = tag;
-  self->Patterns[self->NPatterns].type = type;
-  sprintf(key, "/ %d", (int)tag);
-  switch(type) {
-    case PsTile:   key[1] = 't'; break;
-    case PsStip:   key[1] = 's'; break;
-    case PsOpStip: key[1] = 'o'; break;
-    default: break; }
-  S_OutTok(self, key, 0);
-  S_OutTok(self, "db/PatternType 1 d/PaintType 1 d", 0);
-  S_OutTok(self, "/TilingType 1 d/BBox[0 0", 0);
-  S_OutNum(self, (float)w);
-  S_OutNum(self, (float)h);
-  S_OutTok(self, "]d/XStep", 0);
-  S_OutNum(self, (float)w);
-  S_OutTok(self, "d/YStep", 0);
-  S_OutNum(self, (float)h);
-  S_OutTok(self, "d/PaintProc{bg sv", 1);
-  if( type==PsOpStip )
-  {
-    S_Color(self, bclr);
-    S_OutTok(self, "0 0", 0);
-    S_OutNum(self, (float)w);
-    S_OutNum(self, (float)h);
-    S_OutTok(self, "R fl", 1);
-  }
-  if( type!=PsTile ) S_Color(self, fclr);
-  self->NPatterns += 1;
-  self->InTile = type;
-  return(0);
-}
-
-void
-PsOut_EndPattern(PsOutPtr self)
-{
-  self->InTile = PsSolid;
-  S_OutTok(self, "rs ed}d de im_ mp d", 1);
-}
-
-void
-PsOut_SetPattern(PsOutPtr self, void *tag, PsFillEnum type)
-{
-  int   i;
-  char  key[64];
-
-  for( i=0 ; i<self->NPatterns ; i++ )
-    { if( tag==self->Patterns[i].tag && type==self->Patterns[i].type ) break; }
-  if( i>=self->NPatterns ) return;
-  sprintf(key, " %d", (int)tag);
-  switch(type) {
-    case PsTile:   key[0] = 't'; break;
-    case PsStip:   key[0] = 's'; break;
-    case PsOpStip: key[0] = 'o'; break;
-    default: break; }
-  S_OutTok(self, key, 0);
-  S_OutTok(self, "spt", 1);
-  self->CurColor = PSOUTCOLOR_NOCOLOR;
-}
-
-void
-PsOut_RawData(PsOutPtr self, char *data, int len)
-{
-    S_Flush(self);
-    if (!ferror(self->Fp)) {
-	(void) fwrite(data, 1, len, self->Fp);
-    }
-}
-
-typedef enum PsDownfontFontType_  
-{ 
-  PsDFT_Type1PFA=0,
-  PsDFT_Type1PFB,
-  PsDFT_TrueType /* not implemented yet */
-} PsDownfontFontType;
-
-/* Download a PS Type1 font */
-int
-PsOut_DownloadType1(PsOutPtr self, const char *auditmsg, const char *name, const char *fname)
-{
-  int     stt;
-  char    buf[256];
-  FILE   *fp;
-  PsDownfontFontType type;
-
-  fp = fopen(fname, "r");
-  if( !fp )
-    return 0;
-
-#ifdef DEBUG_gisburn
-  /* This should be log-able! */
-  fprintf(stderr, "PsOut_DownloadType1: %s: Downloading '%s' from '%s'\n", auditmsg, name, fname);
-#endif /* DEBUG_gisburn */
-
-  fread(buf, 32, 1, fp);
-  fseek(fp, (long)0, 0);
-
-  /* Is this a Adobe PostScript Type 1 binary font (PFB) ? */
-  if( (buf[0]&0xFF)==0x80 && (buf[1]&0xFF)==0x01 )
-  {
-    type = PsDFT_Type1PFB;
-  }  
-  /* Is this a Adobe PostScript ASCII font (PFA) ? */
-  else if (!strncmp(buf, "%!PS-AdobeFont", 14))
-  {
-    type = PsDFT_Type1PFA;
-  }
-  else
-  {
-    /* This should be log-able! */
-    fprintf(stderr, "PsOut_DownloadType1: Unknown font type for '%s'\n", fname);
-    return 0;
-  }      
-
-  S_Flush(self);
-  sprintf(buf, "%%%%BeginFont: %s", name);
-  S_Comment(self, buf);
-
-  if( type == PsDFT_Type1PFB )
-  {
-    char *buf, 
-         *pt;
-    int   len, 
-          ch,
-          stype;
-
-    ch = fgetc(fp);  
-    /* Strip out the binary headers and de-binary it */
-    while( (ch&0xFF) == 0x80 ) 
-    {
-      stype = fgetc(fp);
-      if( stype==3 ) /* eof mark */
-        break;
-      len = fgetc(fp);
-      len |= fgetc(fp)<<8;
-      len |= fgetc(fp)<<16;
-      len |= fgetc(fp)<<24;
-      buf = (char *)xalloc(len+1);
-      if( stype==1 ) 
-      {
-        /* Process ASCII section */
-        len = fread(buf, 1, len, fp);
-        /* convert any lone CRs (ie Mac eol) to LFs */
-        for( pt = buf ; (pt = memchr(pt, '\r', len-(pt-buf))) != NULL ; pt++ ) 
-        {
-          if ( pt[1]!='\n' ) 
-            *pt = '\n';
-        }
-        fwrite(buf, 1, len, self->Fp);
-      } 
-      else if( stype==2 ) 
-      {
-        int i;
-        
-        /* Process binary section */
-        len = fread(buf, 1, len, fp);
-        for( i=0 ; i<len ; i++ ) 
-        {
-          ch = buf[i];
-          if( ((ch>>4)&0xf) <= 9 )
-            fputc('0'+((ch>>4)&0xf), self->Fp);
-          else
-            fputc('A'-10+((ch>>4)&0xf), self->Fp);
-          
-          if( (ch&0xf) <= 9 )
-            fputc('0'+(ch&0xf), self->Fp);
-          else
-            fputc('A'-10+(ch&0xf), self->Fp);
-          
-          if( (i&0x1f)==0x1f )
-              fputc('\n', self->Fp);
-        }
-      }
-      xfree(buf);
-      
-      /* Next block... */
-      ch = fgetc(fp);
-    }
-  }
-  /* Is this a Adobe PostScript ASCII font (PFA) ? */
-  else if (type == PsDFT_Type1PFA)
-  {
-    for(;;)
-    {
-      stt = fread(buf, 1, 256, fp);
-      if( stt<=0 ) break;
-      if (!ferror(self->Fp)) {
-        (void) fwrite(buf, 1, stt, self->Fp);
-      }
-      if( stt<256 )
-        break;
-    }
-  }
-  fclose(fp);
-  S_Flush(self);
-  S_Comment(self, "%%EndFont");
-  
-  /* Success... */
-  return 1;
-}
-
-
-
-
-
-
diff --git a/hw/xprint/ps/psout.h b/hw/xprint/ps/psout.h
deleted file mode 100644
index 1138e4a..0000000
--- a/hw/xprint/ps/psout.h
+++ /dev/null
@@ -1,335 +0,0 @@
-/*
-
-Copyright 1996, 1998  The Open Group
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-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
-OPEN GROUP 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 name of The Open Group shall not be
-used in advertising or otherwise to promote the sale, use or other dealings
-in this Software without prior written authorization from The Open Group.
-
-*/
-/*
- * (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:          psout.h
-**    *
-**    *  Contents:      Include file for psout.c
-**    *
-**    *  Created By:    Roger Helmendach (Liberty Systems)
-**    *
-**    *  Copyright:     Copyright 1996 The Open Group, Inc.
-**    *
-**    *********************************************************
-**
-********************************************************************/
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#ifndef _psout_
-#define _psout_
-
-#include <stdio.h>
-
-typedef enum PsCapEnum_  { PsCButt=0,   PsCRound, PsCSquare    } PsCapEnum;
-typedef enum PsJoinEnum_ { PsJMiter=0,  PsJRound, PsJBevel     } PsJoinEnum;
-typedef enum PsArcEnum_  { PsChord,     PsPieSlice             } PsArcEnum;
-typedef enum PsRuleEnum_ { PsEvenOdd,   PsNZWinding            } PsRuleEnum;
-typedef enum PsFillEnum_ { PsSolid=0, PsTile, PsStip, PsOpStip } PsFillEnum;
-
-typedef struct PsPointRec_
-{
-  int  x;
-  int  y;
-} PsPointRec;
-
-typedef PsPointRec *PsPointPtr;
-
-typedef struct PsRectRec_
-{
-  int  x;
-  int  y;
-  int  w;
-  int  h;
-} PsRectRec;
-
-typedef PsRectRec *PsRectPtr;
-
-typedef struct PsArcRec_
-{
-  int       x;
-  int       y;
-  int       w;
-  int       h;
-  int       a1;
-  int       a2;
-  PsArcEnum style;
-} PsArcRec;
-
-typedef PsArcRec *PsArcPtr;
-
-#define PSOUT_RECT    0
-#define PSOUT_ARC     1
-#define PSOUT_POINTS  2
-
-typedef struct PsElmRec_
-{
-  int  type;
-  int  nPoints;
-  union
-  {
-    PsRectRec  rect;
-    PsArcRec   arc;
-    PsPointPtr points;
-  } c;
-} PsElmRec;
-
-typedef PsElmRec *PsElmPtr;
-
-typedef struct PsClipRec_
-{
-  int        nRects;
-  PsRectPtr  rects;
-  int        nElms;
-  PsElmPtr   elms;
-  int        nOutterClips;
-  PsRectPtr  outterClips;
-} PsClipRec;
-
-typedef PsClipRec *PsClipPtr;
-
-typedef enum PsFTDownloadFontType_ 
-{ 
-  PsFontBitmap=0,
-  PsFontType1,
-  PsFontType3
-} PsFTDownloadFontType;
-
-/* Define |PsOutColor| color type which can hold one RGB value
- * (note: this needs to be |signed| long/long long to represent
- * special values such as |PSOUTCOLOR_NOCOLOR|)
- */
-#ifdef PSOUT_USE_DEEPCOLOR
-/* 64bit |PsOutColor| which can hold 16bit R-,G-,B-values */
-#ifdef WIN32
-typedef signed __int64    PsOutColor;
-#else
-# if defined(__alpha__) || defined(__alpha) || \
-     defined(ia64) || defined(__ia64__) || \
-     defined(__sparc64__) || defined(_LP64) || \
-     defined(__s390x__) || \
-     defined(amd64) || defined (__amd64__) || defined(__x86_64__) || \
-     defined (__powerpc64__) || \
-     (defined(sgi) && (_MIPS_SZLONG == 64))
-typedef signed long       PsOutColor;
-# else
-typedef signed long long  PsOutColor;
-# endif /* native 64bit platform */
-#endif /* WIN32 */
-
-#define PSOUTCOLOR_TO_REDBITS(clr)    ((clr) >> 32)
-#define PSOUTCOLOR_TO_GREENBITS(clr)  (((clr) >> 16) & 0xFFFF)
-#define PSOUTCOLOR_TO_BLUEBITS(clr)   ((clr) & 0xFFFF)
-#define PSOUTCOLOR_BITS_TO_PSFLOAT(b) ((float)(b) / 65535.)
-#define PSOUTCOLOR_WHITE              (0xFFFFFFFFFFFFLL)
-#define PSOUTCOLOR_NOCOLOR            (-1LL)
-#define PSOUTCOLOR_TO_RGB24BIT(clr)   (((PSOUTCOLOR_TO_REDBITS(clr)   >> 8) << 16) | \
-                                       ((PSOUTCOLOR_TO_GREENBITS(clr) >> 8) << 8)  | \
-                                       ((PSOUTCOLOR_TO_BLUEBITS(clr)  >> 8) << 0))
-#else
-/* 32bit |PsOutColor| which can hold 8bit R-,G-,B-values */
-typedef signed long PsOutColor;
-#define PSOUTCOLOR_TO_REDBITS(clr)    ((clr) >> 16)
-#define PSOUTCOLOR_TO_GREENBITS(clr)  (((clr) >> 8) & 0xFF)
-#define PSOUTCOLOR_TO_BLUEBITS(clr)   ((clr) & 0xFF)
-#define PSOUTCOLOR_BITS_TO_PSFLOAT(b) ((float)(b) / 255.)
-#define PSOUTCOLOR_WHITE              (0xFFFFFF)
-#define PSOUTCOLOR_NOCOLOR            (-1)
-#define PSOUTCOLOR_TO_RGB24BIT(clr)   ((PSOUTCOLOR_TO_REDBITS(clr)   << 16) | \
-                                       (PSOUTCOLOR_TO_GREENBITS(clr) << 8)  | \
-                                       (PSOUTCOLOR_TO_BLUEBITS(clr)  << 0))
-#endif /* PSOUT_USE_DEEPCOLOR */
-
-#ifdef USE_PSOUT_PRIVATE
-typedef void *voidPtr;
-
-typedef struct PsPatRec_
-{
-  PsFillEnum type;
-  voidPtr    tag;
-} PsPatRec;
-
-typedef PsPatRec *PsPatPtr;
-
-typedef struct PsOutRec_
-{
-  FILE       *Fp;
-  char        Buf[16384];
-  PsOutColor  CurColor;
-  int         LineWidth;
-  PsCapEnum   LineCap;
-  PsJoinEnum  LineJoin;
-  int         NDashes;
-  int        *Dashes;
-  int         DashOffset;
-  PsOutColor  LineBClr;
-  PsRuleEnum  FillRule;
-  char       *FontName;
-  int         FontSize;
-  float       FontMtx[4];
-  int         ImageFormat;
-  int         RevImage;
-  int         NPatterns;
-  int         MxPatterns;
-  PsPatPtr    Patterns;
-  int         ClipType;
-  PsClipRec   Clip;
-  int         InFrame;
-  int         XOff;
-  int         YOff;
-
-  PsFillEnum  InTile;
-  int         ImgSkip;
-  PsOutColor  ImgBClr;
-  PsOutColor  ImgFClr;
-  int         ImgX;
-  int         ImgY;
-  int         ImgW;
-  int         ImgH;
-  int         SclW;
-  int         SclH;
-
-  Bool        isRaw;
-  
-  int         pagenum;
-
-  int         start_image;
-} PsOutRec;
-
-typedef struct PsOutRec_ *PsOutPtr;
-
-extern void S_Flush(PsOutPtr self);
-extern void S_OutNum(PsOutPtr self, float num);
-extern void S_OutTok(PsOutPtr self, char *tok, int cr);
-#else
-typedef struct PsOutRec_ *PsOutPtr;
-#endif /* USE_PSOUT_PRIVATE */
-
-extern FILE * PsOut_ChangeFile(PsOutPtr self, FILE *fp);
-extern PsOutPtr PsOut_BeginFile(FILE *fp, char *title, int orient, int count, int plex,
-                                int res, int wd, int ht, Bool raw);
-extern void PsOut_EndFile(PsOutPtr self, int closeFile);
-extern void PsOut_BeginPage(PsOutPtr self, int orient, int count, int plex,
-                            int res, int wd, int ht);
-extern void PsOut_EndPage(PsOutPtr self);
-extern void PsOut_DirtyAttributes(PsOutPtr self);
-extern void PsOut_Comment(PsOutPtr self, char *comment);
-extern void PsOut_Offset(PsOutPtr self, int x, int y);
-
-extern void PsOut_Clip(PsOutPtr self, int clpTyp, PsClipPtr clpinf);
-
-extern void PsOut_Color(PsOutPtr self, PsOutColor clr);
-extern void PsOut_FillRule(PsOutPtr self, PsRuleEnum rule);
-extern void PsOut_LineAttrs(PsOutPtr self, int wd, PsCapEnum cap,
-                            PsJoinEnum join, int nDsh, int *dsh, int dshOff,
-                            PsOutColor bclr);
-extern void PsOut_TextAttrs(PsOutPtr self, char *fnam, int siz, int iso);
-extern void PsOut_TextAttrsMtx(PsOutPtr self, char *fnam, float *mtx, int iso);
-
-extern void PsOut_Polygon(PsOutPtr self, int nPts, PsPointPtr pts);
-extern void PsOut_FillRect(PsOutPtr self, int x, int y, int w, int h);
-extern void PsOut_FillArc(PsOutPtr self, int x, int y, int w, int h,
-                          float ang1, float ang2, PsArcEnum style);
-
-extern void PsOut_Lines(PsOutPtr self, int nPts, PsPointPtr pts);
-extern void PsOut_Points(PsOutPtr self, int nPts, PsPointPtr pts);
-extern void PsOut_DrawRect(PsOutPtr self, int x, int y, int w, int h);
-extern void PsOut_DrawArc(PsOutPtr self, int x, int y, int w, int h,
-                          float ang1, float ang2);
-
-extern void PsOut_Text(PsOutPtr self, int x, int y, char *text, int textl,
-                       PsOutColor bclr);
-extern void PsOut_Text16(PsOutPtr self, int x, int y, unsigned short *text, int textl, PsOutColor bclr);
-
-extern void PsOut_BeginImage(PsOutPtr self, PsOutColor bclr, PsOutColor fclr, int x, int y,
-                             int w, int h, int sw, int sh, int format);
-extern void PsOut_BeginImageIM(PsOutPtr self, PsOutColor bclr, PsOutColor fclr, int x, int y,
-                               int w, int h, int sw, int sh, int format);
-extern void PsOut_EndImage(PsOutPtr self);
-extern void PsOut_OutImageBytes(PsOutPtr self, int nBytes, char *bytes);
-
-extern void PsOut_BeginFrame(PsOutPtr self, int xoff, int yoff, int x, int y,
-                             int w, int h);
-extern void PsOut_EndFrame(PsOutPtr self);
-
-extern int  PsOut_BeginPattern(PsOutPtr self, void *tag, int w, int h,
-                               PsFillEnum type, PsOutColor bclr, PsOutColor fclr);
-extern void PsOut_EndPattern(PsOutPtr self);
-extern void PsOut_SetPattern(PsOutPtr self, void *tag, PsFillEnum type);
-
-extern void PsOut_RawData(PsOutPtr self, char *data, int len);
-
-extern int  PsOut_DownloadType1(PsOutPtr self, const char *auditmsg, const char *name, const char *fname);
-
-extern int  PsOut_DownloadFreeType1(PsOutPtr self, const char *psfontname, FontPtr pFont, long block_offset);
-extern int  PsOut_DownloadFreeType3(PsOutPtr self, const char *psfontname, FontPtr pFont, long block_offset);
-
-extern int  PsOut_DownloadFreeType(PsOutPtr self, PsFTDownloadFontType downloadfonttype, const char *psfontname, FontPtr pFont, long block_offset);
-extern void PsOut_Get_FreeType_Glyph_Name( char *destbuf, FontPtr pFont, unsigned long x11fontindex);
-extern void PsOut_FreeType_Text(FontPtr pFont, PsOutPtr self, int x, int y, char *text, int textl);
-extern void PsOut_FreeType_Text16(FontPtr pFont, PsOutPtr self, int x, int y, unsigned short *text, int textl);
-
-extern void PsOut_FreeType_TextAttrs16(PsOutPtr self, char *fnam, int siz, int iso);
-extern void PsOut_FreeType_TextAttrsMtx16(PsOutPtr self, char *fnam, float *mtx, int iso);
-#endif
diff --git a/hw/xprint/ps/psout_ft.c b/hw/xprint/ps/psout_ft.c
deleted file mode 100644
index 30939f9..0000000
--- a/hw/xprint/ps/psout_ft.c
+++ /dev/null
@@ -1,337 +0,0 @@
-
-/*
-Copyright (c) 2003-2004 Roland Mainz <roland.mainz at nrubsig.org>
-
-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
-AUTHORS OR 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.
-*/
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#include <stdlib.h>
-#include <stdio.h>
-#include "os.h"
-#define USE_PSOUT_PRIVATE 1
-#include "psout.h"
-
-#include <ft2build.h>
-#include FT_FREETYPE_H
-#include FT_TYPE1_TABLES_H
-
-#include <X11/Xproto.h>
-#include <X11/fonts/font.h>
-#include <X11/fonts/fontstruct.h>
-#include <X11/fonts/fntfilst.h>
-#include <X11/fonts/fontutil.h>
-#include <X11/fonts/fontenc.h>
-#include <X11/fonts/ft.h>
-#define NOT_IN_FTFUNCS
-#include <X11/fonts/ftfuncs.h>
-#include "servermd.h" /* needed for endian test (IMAGE_BYTE_ORDER) */
-
-#define USE_FT_PS_NAMES 1
-
-#ifdef USE_FT_PS_NAMES
-void PsOut_Get_FreeType_Glyph_Name( char *destbuf, FontPtr pFont, unsigned long x11fontindex)
-{
-  FTFontPtr      tf     = (FTFontPtr)pFont->fontPrivate;
-  FT_Face        ttface = tf->instance->face->face;
-  FT_Error       error;
-  char           buf[256];
-  unsigned long  ftindex;
-
-  /* Remap X11 font index to FreeType font index */
-  ftindex = FTRemap(ttface, &tf->mapping, x11fontindex);
-
-  if( FT_Has_PS_Glyph_Names(ttface) )
-  {
-    error = FT_Get_Glyph_Name(ttface, ftindex, buf, 64);
-  }
-  else
-  {
-    error = 1;
-  }
-  
-  if( error )
-  {
-    /* Check for unicode mapping
-     * See Adobe document "Unicode and Glyph Names"
-     * (http://partners.adobe.com/asn/tech/type/unicodegn.jsp)
-     */
-    if( (tf->mapping.mapping->type == FONT_ENCODING_UNICODE) &&
-        (ftindex < 0xFFFE) )
-    {
-      sprintf(buf, "uni%04lx", ftindex);
-    }
-    else
-    {
-      sprintf(buf, "ch%02lx", ftindex);
-    }
-  }
-  
-  strcpy(destbuf, buf);
-}
-#endif /* USE_FT_PS_NAMES */
-
-int PsOut_DownloadFreeType(PsOutPtr self, PsFTDownloadFontType downloadfonttype, const char *psfontname, FontPtr pFont, long block_offset)
-{
-  switch(downloadfonttype)
-  {
-    case PsFontType3:
-        return PsOut_DownloadFreeType3(self, psfontname, pFont, block_offset);
-    case PsFontType1:
-        return PsOut_DownloadFreeType1(self, psfontname, pFont, block_offset);
-    default:
-        FatalError("PS DDX: PsOut_DownloadFreeType(downloadfonttype='%d' not implemented\n",
-                   (int)downloadfonttype);
-        return 0; /* NO-OP, FatalError() will call |exit()| */
-  }
-}
-
-/* cloned from |PsOut_TextAttrs16| */
-void
-PsOut_FreeType_TextAttrs16(PsOutPtr self, char *fnam, int siz, int iso)
-{
-  int i;
-  if( self->FontName && strcmp(fnam, self->FontName)==0 &&
-      siz==self->FontSize ) return;
-  if( self->FontName ) xfree(self->FontName);
-  self->FontName = (char *)xalloc(strlen(fnam)+1);
-  strcpy(self->FontName, fnam);
-  self->FontSize = siz;
-  for( i=0 ; i<4 ; i++ ) self->FontMtx[i] = -1.;
-}
-
-/* cloned from |PsOut_TextAttrsMtx16| */
-void
-PsOut_FreeType_TextAttrsMtx16(PsOutPtr self, char *fnam, float *mtx, int iso)
-{
-  int i;
-  if( self->FontName && strcmp(fnam, self->FontName)==0 &&
-      mtx[0]==self->FontMtx[0] && mtx[1]==self->FontMtx[1] &&
-      mtx[2]==self->FontMtx[2] && mtx[3]==self->FontMtx[3] ) return;
-  if( self->FontName ) xfree(self->FontName);
-  self->FontName = (char *)xalloc(strlen(fnam)+1);
-  strcpy(self->FontName, fnam);
-  for( i=0 ; i<4 ; i++ ) self->FontMtx[i] = mtx[i];
-  self->FontSize = -1;
-}
-
-static
-int FT_Get_CharcellMetricsCharacterHeight(FontPtr pFont)
-{
-  FTFontPtr ftfont = (FTFontPtr)pFont->fontPrivate;
-
-  return ftfont->instance->charcellMetrics->ascent + 
-         ftfont->instance->charcellMetrics->descent;
-}
-
-static
-int FT_Get_CharcellMetricsCharacterWidth(FontPtr pFont)
-{
-  FTFontPtr ftfont = (FTFontPtr)pFont->fontPrivate;
-
-  if( ftfont->instance->spacing != FT_PROPORTIONAL )
-  {
-    int width = ftfont->instance->charcellMetrics->characterWidth;
-    
-    /* If the font uses a matrix make sure we transform the |characterWidth|
-     * back to it's original value since we download the untransformed font
-     * and use a PostScript transformation matrix to transform the font when
-     * rendering the text
-     */
-    if( ftfont->instance->transformation.nonIdentity )
-    {
-      FT_Vector v;
-    
-      FT_Matrix m = ftfont->instance->transformation.matrix;
-      (void)FT_Matrix_Invert(&m); /* FixMe: We should check the return code */
-      v.x = width;
-      v.y = FT_Get_CharcellMetricsCharacterHeight(pFont);
-      FT_Vector_Transform(&v, &m);
-      width = v.x;
-    }
-    
-    return width;
-  }
-
-  return 0;
-}
-
-void
-PsOut_FreeType_Text(FontPtr pFont, PsOutPtr self, int x, int y, char *text, int textl)
-{
-  int i;
-  int xo = self->XOff,
-      yo = self->YOff;
-  char buf[256];
-  int  cwidth = FT_Get_CharcellMetricsCharacterWidth(pFont);
-
-  if( self->InFrame || self->InTile ) xo = yo = 0;
-  x += xo; y += yo;
-
-  S_OutNum(self, (float)x);
-  S_OutNum(self, (float)y);
-  S_OutTok(self, "moveto", 1);
-  
-  S_OutTok(self, "[ ", 0);
-  
-  for( i = 0 ; i < textl ; i++ )
-  {
-#ifdef USE_FT_PS_NAMES
-    char namebuf[256];
-    unsigned int  ch           = text[i]&0xFF;
-    unsigned long block_offset = 0;
-    PsOut_Get_FreeType_Glyph_Name(namebuf, pFont, ch+block_offset);
-
-    sprintf(buf, "/%s ", namebuf);
-#else
-    sprintf(buf, "/ch%02x ", text[i]&0xFF);
-#endif /* USE_FT_PS_NAMES */
-    S_OutTok(self, buf, 0);
-  }
-
-  /* Check whether we have any special spacing requirements (e.g. non-proportional fonts) ... */
-  if( cwidth != 0 )
-  {
-    /* If the we use a matrix to render the font (instead of using |self->FontSize|)
-     * we must apply the matrix to the "rmoveto" which is used to force the exact
-     * character width. The "trmoveto" macro will do that for us...
-     */
-    if( self->FontSize == -1 )
-    {  
-      sprintf(buf, "]{gs glyphshow gr %d 0 trmoveto}fa",  cwidth);
-    }
-    else
-    {
-      sprintf(buf, "]{gs glyphshow gr %d 0 rm}fa", cwidth);
-    }
-  }
-  else
-  {
-    sprintf(buf, "]{glyphshow}fa");
-  }
-  S_OutTok(self, buf, 0);
-}
-
-/* XXX: |PsOut_FreeType_Text16| should be rewritten - currently it uses lame,
- * slow hacks and makes some risky assumtions about how |PsOut_Text16|
- * allocates memory */
-void
-PsOut_FreeType_Text16(FontPtr pFont, PsOutPtr self, int x, int y, unsigned short *text, int textl)
-{
-  int i;
-  int xo = self->XOff,
-      yo = self->YOff;
-  unsigned short c,
-                 c_hiByte,
-                 c_lowByte,
-                 fontPage;
-  long           lastFontPage = -1;
-  char           baseFontName[256];
-  char           buf[256];
-
-  if( self->InFrame || self->InTile ) xo = yo = 0;
-  x += xo; y += yo;
-
-  strcpy(baseFontName, self->FontName);
-
-  S_OutNum(self, (float)x);
-  S_OutNum(self, (float)y);
-  S_OutTok(self, "moveto", 1);
-  
-  for( i = 0 ; i < textl ; i++ )
-  {
-    c = text[i];
-#if IMAGE_BYTE_ORDER == LSBFirst
-    c_hiByte = c & 0x00FF;
-    c_lowByte = (c >> 8) & 0x00FF;
-#elif IMAGE_BYTE_ORDER == MSBFirst
-    c_hiByte  = (c >> 8) & 0x00FF;
-    c_lowByte = c & 0x00FF;
-#else
-#error Unsupported byte order
-#endif
-    fontPage  = c_hiByte;
-
-    if( fontPage != lastFontPage )
-    {
-      if( fontPage > 0 )
-      {
-        sprintf(buf, "%s_%x", baseFontName, fontPage);
-      }
-      else
-      {
-        sprintf(buf, "%s", baseFontName);
-        xfree(self->FontName);
-        self->FontName = NULL;
-      }
-
-      if( self->FontSize == -1 )
-      {
-        PsOut_TextAttrsMtx(self, buf, self->FontMtx, FALSE);
-      }
-      else
-      {
-        PsOut_TextAttrs(self, buf, self->FontSize, FALSE);
-      }
-      lastFontPage = fontPage;
-    }
-
-#ifdef USE_FT_PS_NAMES
-    {
-      char namebuf[256];
-      unsigned int  ch           = c_lowByte;
-      unsigned long block_offset = c_hiByte * 0x100 /* same as c_hiByte << 8 */;
-      int           cwidth       = FT_Get_CharcellMetricsCharacterWidth(pFont);
-      PsOut_Get_FreeType_Glyph_Name(namebuf, pFont, ch+block_offset);
-      
-      /* Check whether we have any special spacing requirements (e.g. non-proportional fonts) ... */
-      if( cwidth != 0 )
-      {
-        /* If the we use a matrix to render the font (instead of using |self->FontSize|)
-         * we must apply the matrix to the "rmoveto" which is used to force the exact
-         * character width. The "trmoveto" macro will do that for us...
-         */
-        if( self->FontSize == -1 )
-        {
-          sprintf(buf, "gs /%s glyphshow gr %d 0 trmoveto", namebuf, cwidth);
-        }
-        else
-        {
-          sprintf(buf, "gs /%s glyphshow gr %d 0 rm",  namebuf, cwidth);
-        }
-      }
-      else
-      {
-        sprintf(buf, "/%s glyphshow", namebuf);
-      }
-    }
-#else
-    sprintf(buf, "/ch%02x glyphshow", c_lowByte);
-#endif /* USE_FT_PS_NAMES */    
-    S_OutTok(self, buf, 1); 
-  }
-
-  if( self->FontName ) xfree(self->FontName);
-  self->FontName = (char *)xalloc(strlen(baseFontName)+1);
-  strcpy(self->FontName, baseFontName);
-}
-
diff --git a/hw/xprint/ps/psout_ftpstype1.c b/hw/xprint/ps/psout_ftpstype1.c
deleted file mode 100644
index 572e136..0000000
--- a/hw/xprint/ps/psout_ftpstype1.c
+++ /dev/null
@@ -1,185 +0,0 @@
-
-/*
-Copyright (c) 2003-2004 Roland Mainz <roland.mainz at nrubsig.org>
-
-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
-AUTHORS OR 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.
-*/
-
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <errno.h>
-#include <sys/wait.h>
-
-#include "os.h"
-#define USE_PSOUT_PRIVATE 1
-#include "psout.h"
-
-#include <ft2build.h>
-#include FT_FREETYPE_H
-
-#include <X11/Xproto.h>
-#include <X11/fonts/font.h>
-#include <X11/fonts/fontstruct.h>
-#include <X11/fonts/fntfilst.h>
-#include <X11/fonts/fontutil.h>
-#include <X11/fonts/fontenc.h>
-#include <X11/fonts/ft.h>
-#define NOT_IN_FTFUNCS
-#include <X11/fonts/ftfuncs.h>
-
-int do_debug_ft2pt1             = FALSE;
-int do_enable_ft2pt1_optimizer  = FALSE;
-
-/* Defined in ttf2pt1.c */
-int ft2pt1_main(int argc, char **argv,
-                FTFontPtr tf, const char *download_psfontname, unsigned long download_font_block_offset);
-
-/* Download FreeType outlines as PS Type1 font */
-int PsOut_DownloadFreeType1(PsOutPtr self, const char *psfontname, FontPtr pFont, long block_offset)
-{
-  FTFontPtr tf;
-  FT_Face   face;
-  int       ft2pt1_numargs = 0;
-  char     *ft2pt1_args[40];
-  char     *pstype1filename_prefix;
-  char      pstype1filename[PATH_MAX+1];
-  int       ft2pt1_main_retval;
-  pid_t     childpid;
-  
-  tf = (FTFontPtr)pFont->fontPrivate;
-  face = tf->instance->face->face;
-  
-  /* Set debugging flags */
-  do_debug_ft2pt1             = (getenv("XPRT_PSDDX_DO_DEBUG_FT2PT1") != NULL);
-  do_enable_ft2pt1_optimizer  = (getenv("XPRT_PSDDX_DO_ENABLE_FT2PT1_OPTIMIZER") != NULL);
-
-  if( do_debug_ft2pt1 )
-  {
-    fprintf(stderr, "# Converting FT2 font to PS Type1 filename='%s', ttface=%lx\n", tf->instance->face->filename, (long)face);
-  }
-
-  pstype1filename_prefix = tempnam(NULL, "Xprt_");
-
-  ft2pt1_args[ft2pt1_numargs] = "ft2pt1";                        ft2pt1_numargs++;
-  ft2pt1_args[ft2pt1_numargs] = "-Ob";                           ft2pt1_numargs++;
-  ft2pt1_args[ft2pt1_numargs] = "-e";                            ft2pt1_numargs++;
-  ft2pt1_args[ft2pt1_numargs] = "-a";                            ft2pt1_numargs++;
-  ft2pt1_args[ft2pt1_numargs] = "-Ga";                           ft2pt1_numargs++;
-  if( do_enable_ft2pt1_optimizer )
-  {
-    /* Scale fonts to a 1000x1000 matrix */
-    ft2pt1_args[ft2pt1_numargs] = "-Ot";                         ft2pt1_numargs++;
-  }
-  else
-  {
-    /* Disable the ttf2pt1 optimisations */
-    ft2pt1_args[ft2pt1_numargs] = "-Ou";                         ft2pt1_numargs++;
-    ft2pt1_args[ft2pt1_numargs] = "-Oo";                         ft2pt1_numargs++;
-    ft2pt1_args[ft2pt1_numargs] = "-Os";                         ft2pt1_numargs++;
-    ft2pt1_args[ft2pt1_numargs] = "-Oh";                         ft2pt1_numargs++;
-  }
-  
-  if( !do_debug_ft2pt1 )
-  {
-    ft2pt1_args[ft2pt1_numargs] = "-W 0";                        ft2pt1_numargs++;
-  }
-  ft2pt1_args[ft2pt1_numargs] = tf->instance->face->filename;    ft2pt1_numargs++;
-  ft2pt1_args[ft2pt1_numargs] = pstype1filename_prefix;          ft2pt1_numargs++;
-  ft2pt1_args[ft2pt1_numargs] = NULL;
-
-/* XXX: ttf2pt1 has lots of leaks and global vars which are not cleaned-up
- * As long this problem exists we will simply fork() and call the converter
- * from the child process (all resources are free'ed when the child process
- * exists) as a workaround.
- */
-#define FT2PT1_NEEDS_SEPERATE_PROCESS 1
-
-#ifdef FT2PT1_NEEDS_SEPERATE_PROCESS
-  /* Flush internal buffer and then the stdio stream before fork()! */
-  S_Flush(self);
-  fflush(self->Fp);
-
-  childpid = fork();
-  switch(childpid)
-  {
-    case -1:
-        FatalError("PS DDX internal error: Cannot fork() converter child process, %s\n", strerror(errno));
-        break;
-    case 0: /* child */
-        fclose(self->Fp);
-        self->Fp = NULL;
-            
-        ft2pt1_main_retval = ft2pt1_main(ft2pt1_numargs, ft2pt1_args, tf, psfontname, block_offset);
-        if( do_debug_ft2pt1 )
-        {
-          fprintf(stderr, "## ft2pt1_main returned %d (child)\n", ft2pt1_main_retval);
-        }
-        exit(ft2pt1_main_retval);
-        break;
-    default: /* parent */
-        waitpid(childpid, &ft2pt1_main_retval, 0);
-        break;
-  }
-
-  if( do_debug_ft2pt1 )
-  {
-    fprintf(stderr, "## ft2pt1_main returned %d (parent)\n", ft2pt1_main_retval);
-  }
-#else
-  S_Flush(self);
-
-  ft2pt1_main_retval = ft2pt1_main(ft2pt1_numargs, ft2pt1_args, tf, psfontname, block_offset);
-  if( do_debug_ft2pt1 )
-  {
-    fprintf(stderr, "## ft2pt1_main returned %d (child)\n", ft2pt1_main_retval);
-  }
-#endif /* FT2PT1_NEEDS_SEPERATE_PROCESS */
-
-  if( ft2pt1_main_retval != EXIT_SUCCESS )
-  {
-    FatalError("PS DDX internal error while converting FreeType font '%s' to PS Type1, error=%d\n",
-               tf->instance->face->filename, ft2pt1_main_retval);
-  }
-
-  sprintf(pstype1filename, "%s.pfa", pstype1filename_prefix);
-  if( do_debug_ft2pt1 )
-  {
-    fprintf(stderr, "# Downloading converted FT2/PS Type1 filename='%s'\n", pstype1filename);
-  }
-
-  PsOut_DownloadType1(self, "PsOut_DownloadFreeType1", psfontname, pstype1filename);
-  
-  if( !do_debug_ft2pt1 )
-  {
-    unlink(pstype1filename);
-  }
-  
-  free(pstype1filename_prefix);
-
-  S_Flush(self);
-
-  return 0;
-}
-
-
diff --git a/hw/xprint/ps/psout_ftpstype3.c b/hw/xprint/ps/psout_ftpstype3.c
deleted file mode 100644
index 733b538..0000000
--- a/hw/xprint/ps/psout_ftpstype3.c
+++ /dev/null
@@ -1,439 +0,0 @@
-
-/*
-Copyright (c) 2003-2004 Roland Mainz <roland.mainz at nrubsig.org>
-
-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
-AUTHORS OR 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.
-*/
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#include <stdlib.h>
-#include <stdio.h>
-#include "os.h"
-#define USE_PSOUT_PRIVATE 1
-#include "psout.h"
-
-#include <ft2build.h>
-#include FT_FREETYPE_H
-#include FT_TRUETYPE_TABLES_H
-#include FT_BBOX_H
-#include FT_GLYPH_H
-
-#include FT_CONFIG_CONFIG_H
-#include FT_CONFIG_OPTIONS_H
-#include FT_ERRORS_H
-#include FT_SYSTEM_H
-#include FT_IMAGE_H
-#include FT_TYPES_H
-#include FT_OUTLINE_H
-#include FT_MODULE_H
-#include FT_RENDER_H
-#include FT_TYPE1_TABLES_H
-#include FT_TRUETYPE_IDS_H
-#include FT_TRUETYPE_TAGS_H
-#include FT_CACHE_H
-#include FT_CACHE_IMAGE_H
-#include FT_CACHE_SMALL_BITMAPS_H
-#include FT_MULTIPLE_MASTERS_H
-#include FT_SFNT_NAMES_H
-
-#include <X11/Xproto.h>
-#include <X11/fonts/font.h>
-#include <X11/fonts/fontstruct.h>
-#include <X11/fonts/fntfilst.h>
-#include <X11/fonts/fontutil.h>
-#include <X11/fonts/fontenc.h>
-#include <X11/fonts/ft.h>
-#define NOT_IN_FTFUNCS
-#include <X11/fonts/ftfuncs.h>
-
-struct ft2info
-{
-  FontPtr         pFont;
-  FTFontPtr       tf;
-  FT_Face         ttface;
-  struct
-  {
-    char *full_name;
-    char *copyright;
-    char *family;
-    char *subfamily;
-    char *version;
-  } nameid;
-  TT_Postscript  *ttpostscript;
-  TT_Header      *ttheader;
-};
-
-/* Local prototypes */
-static FT_Error PSType3_createOutlineGlyphs(FILE *out, struct ft2info *ti, unsigned long unicode, const char *psglyphname);
-static int      PSType3_generateOutlineFont(FILE *out, const char *psfontname, struct ft2info *ti, long block_offset);
-
-extern FT_Library ftypeLibrary; /* defined in xc/lib/font/FreeType/ftfuncs.c */
-
-#define USE_FT_PS_NAMES 1
-
-static
-FT_Error PSType3_createOutlineGlyphs( FILE *out, struct ft2info *ti, unsigned long x11fontindex, const char *psglyphname )
-{
-  unsigned long  ftindex;
-  FT_BBox        bbox;
-  FT_Error       error;
-  FT_Outline     outline;
-
-  /* Remap X11 font index to FreeType font index */
-  ftindex = FTRemap(ti->ttface, &ti->tf->mapping, x11fontindex);
-
-  error = FT_Load_Glyph(ti->ttface, ftindex, (FT_LOAD_NO_BITMAP | FT_LOAD_NO_SCALE | FT_LOAD_NO_HINTING));
-  if( error )
-  {
-    fprintf(stderr, "PSType3_createOutlineGlyphs: FT_Load_Glyph() failure, error=%d\n", (int)error);
-    return error;
-  }
-
-  outline = ti->ttface->glyph->outline;
-
-  FT_Outline_Get_CBox(&outline, &bbox);
-
-  fprintf(out, "/%s {\n", psglyphname);
-  fprintf(out, "%ld 0 %ld %ld %ld %ld setcachedevice\n",
-          (signed long)ti->ttface->glyph->metrics.horiAdvance,
-          (long)bbox.xMin,
-          (long)bbox.yMin,
-          (long)bbox.xMax,
-          (long)bbox.yMax);
-
-  if( outline.n_contours > 0 )
-  {
-    long            i,
-                    j,
-                    k, k1,
-                    cs, ce,
-                    nguide,
-                    contour_start,
-                    contour_end,
-                    last_point;
-    Bool            first;
-    FT_Vector      *vec;
-
-    contour_start = ce = 0;
-
-    vec        = outline.points;
-    last_point = outline.n_points;
-
-    i = j = k = 0;
-    first = TRUE;
-
-    while( i <= outline.contours[outline.n_contours - 1] )
-    {
-      contour_end = outline.contours[j];
-
-      if( first )
-      {
-        fprintf(out, "%ld %ld moveto\n", vec[i].x, vec[i].y);
-        contour_start = i;
-        first = FALSE;
-      }
-      else if( outline.tags[i] & FT_CURVE_TAG_ON )
-      {
-        fprintf(out, "%ld %ld lineto\n", vec[i].x, vec[i].y);
-      }
-      else
-      {
-        Bool finished = FALSE;
-
-        cs       = i-1;
-        nguide   = 0;
-        while( !finished )
-        {
-          if( i == contour_end+1 )
-          {
-            ce = contour_start;
-            finished = TRUE;
-          }
-          else if( outline.tags[i] & FT_CURVE_TAG_ON )
-          {
-            ce = i;
-            finished = TRUE;
-          }
-          else
-          {
-            i++;
-            nguide++;
-          }
-        }
-
-        switch( nguide )
-        {
-          case 0: 
-              fprintf(out, "%ld %ld lineto\n", vec[ce].x, vec[ce].y);
-              break;
-
-          case 1:
-              fprintf(out, "%ld %ld %ld %ld %ld %ld curveto\n",
-                      (vec[cs].x+2*vec[cs+1].x)/3,
-                      (vec[cs].y+2*vec[cs+1].y)/3,
-                      (2*vec[cs+1].x+vec[ce].x)/3,
-                      (2*vec[cs+1].y+vec[ce].y)/3,
-                      vec[ce].x, vec[ce].y);
-              break;
-
-          case 2:
-              fprintf(out, "%ld %ld %ld %ld %ld %ld curveto\n",
-                      (-vec[cs].x+4*vec[cs+1].x)/3,
-                      (-vec[cs].y+4*vec[cs+1].y)/3,
-                      (4*vec[cs+2].x-vec[ce].x)/3,
-                      (4*vec[cs+2].y-vec[ce].y)/3,
-                      vec[ce].x, vec[ce].y);
-              break;
-
-          case 3:
-              fprintf(out, "%ld %ld %ld %ld %ld %ld curveto\n",
-                      (vec[cs].x+2*vec[cs+1].x)/3,
-                      (vec[cs].y+2*vec[cs+1].y)/3,
-                      (5*vec[cs+1].x+vec[cs+2].x)/6,
-                      (5*vec[cs+1].y+vec[cs+2].y)/6,
-                      (vec[cs+1].x+vec[cs+2].x)/2,
-                      (vec[cs+1].y+vec[cs+2].y)/2);
-
-              fprintf(out, "%ld %ld %ld %ld %ld %ld curveto\n",
-                      (vec[cs+1].x+5*vec[cs+2].x)/6,
-                      (vec[cs+1].y+5*vec[cs+2].y)/6,
-                      (5*vec[cs+2].x+vec[cs+3].x)/6,
-                      (5*vec[cs+2].y+vec[cs+3].y)/6,
-                      (vec[cs+3].x+vec[cs+2].x)/2,
-                      (vec[cs+3].y+vec[cs+2].y)/2);
-
-              fprintf(out, "%ld %ld %ld %ld %ld %ld curveto\n",
-                      (vec[cs+2].x+5*vec[cs+3].x)/6,
-                      (vec[cs+2].y+5*vec[cs+3].y)/6,
-                      (2*vec[cs+3].x+vec[ce].x)/3,
-                      (2*vec[cs+3].y+vec[ce].y)/3,
-                      vec[ce].x, vec[ce].y);
-              break;
-
-          default: /* anything |nguide > 3| */
-              k1 = cs + nguide;
-
-              fprintf(out, "%ld %ld %ld %ld %ld %ld curveto\n",
-                      (vec[cs].x+2*vec[cs+1].x)/3,
-                      (vec[cs].y+2*vec[cs+1].y)/3,
-                      (5*vec[cs+1].x+vec[cs+2].x)/6,
-                      (5*vec[cs+1].y+vec[cs+2].y)/6,
-                      (vec[cs+1].x+vec[cs+2].x)/2,
-                      (vec[cs+1].y+vec[cs+2].y)/2);
-
-              for( k = cs+2 ; k <= k1-1 ; k++ )
-              {
-                fprintf(out, "%ld %ld %ld %ld %ld %ld curveto\n",
-                        (vec[k-1].x+5*vec[k].x)/6,
-                        (vec[k-1].y+5*vec[k].y)/6,
-                        (5*vec[k].x+vec[k+1].x)/6,
-                        (5*vec[k].y+vec[k+1].y)/6,
-                        (vec[k].x+vec[k+1].x)/2,
-                        (vec[k].y+vec[k+1].y)/2);
-              }
-
-              fprintf(out, "%ld %ld %ld %ld %ld %ld curveto\n",
-                      (vec[k1-1].x+5*vec[k1].x)/6,
-                      (vec[k1-1].y+5*vec[k1].y)/6,
-                      (2*vec[k1].x+vec[ce].x)/3,
-                      (2*vec[k1].y+vec[ce].y)/3,
-                      vec[ce].x, vec[ce].y);
-              break;
-        }
-      }
-
-      if( i >= contour_end )
-      {
-        fprintf(out, "closepath\n");
-        first = TRUE;
-        i = contour_end + 1;
-        j++;
-      }
-      else
-      {
-        i++;
-      }
-    }
-  }
-
-  fprintf(out, "fill } bind def\n");
-
-  return 0;
-}
-
-static
-int PSType3_generateOutlineFont(FILE *out, const char *psfontname, struct ft2info *ti, long block_offset)
-{
-        long   i;
-        double scaler;
-  const int    numchars = 256;
-#ifdef USE_FT_PS_NAMES
-        int    linewidth = 0;
-#endif /* USE_FT_PS_NAMES */
-
-  fprintf(out, "%%%%BeginFont: %s\n", psfontname);
-  fprintf(out, "22 dict begin\n");
-  fprintf(out, "/FontType 3 def\n");
-  fprintf(out, "/StrokeWidth 0 def\n");
-  fprintf(out, "/PaintType 0 def\n");
-  fprintf(out, "/FontName (%s) def\n",     psfontname);
-  fprintf(out, "/FontInfo 9 dict dup begin\n");
-  fprintf(out, "  /FullName (%s) def\n",   ti->nameid.full_name?ti->nameid.full_name:psfontname);
-  fprintf(out, "  /Notice (%s) def\n",     ti->nameid.copyright?ti->nameid.copyright:"nothing here");
-  fprintf(out, "  /FamilyName (%s) def\n", ti->nameid.family?ti->nameid.family:psfontname);
-  fprintf(out, "  /Weight (%s) def\n",     ti->nameid.subfamily?ti->nameid.subfamily:"Regular");
-  fprintf(out, "  /version (%s) def\n",    ti->nameid.version?ti->nameid.version:"0.1");
-
-  if( ti->ttpostscript )
-  {
-    fprintf(out, "  /italicAngle %.9g def\n",     (double)ti->ttpostscript->italicAngle);
-    fprintf(out, "  /underlineThickness %d def\n", (int)ti->ttpostscript->underlineThickness);
-    fprintf(out, "  /underlinePosition %d def\n",  (int)ti->ttpostscript->underlinePosition);
-    fprintf(out, "  /isFixedPitch %s def\n",       ((ti->ttpostscript->isFixedPitch)?("true"):("false")));
-  }
-  else
-  {
-    fprintf(out, "  /italicAngle %.9g def\n",      0.0);
-    fprintf(out, "  /underlineThickness %d def\n", 100);
-    fprintf(out, "  /underlinePosition %d def\n",  0);
-    fprintf(out, "  /isFixedPitch false def\n");
-  }
-
-  fprintf(out, "end def\n");
-
-  scaler = (1000.0 / (double)ti->ttface->units_per_EM) / 1000.0;
-  fprintf(out, "/FontMatrix [%.9g 0 0 %.9g 0 0] def\n", scaler, scaler);
-
-  if( ti->ttheader )
-  {
-    fprintf(out, "/FontBBox [%d %d %d %d] def\n",
-            (int)ti->ttheader->xMin,
-            (int)ti->ttheader->yMin,
-            (int)ti->ttheader->xMax,
-            (int)ti->ttheader->yMax);
-  }
-  else
-  {
-    fprintf(out, "/FontBBox [%ld %ld %ld %ld] def\n",
-                 ti->ttface->bbox.xMin,
-                 ti->ttface->bbox.yMin,
-                 ti->ttface->bbox.xMax,
-                 ti->ttface->bbox.yMax);
-		 
-  }
-
-  fprintf(out, "/Encoding [\n");
-  for( i = 0 ; i < 256 ; i++ )
-  {
-#ifdef USE_FT_PS_NAMES
-    char namebuf[256];
-    PsOut_Get_FreeType_Glyph_Name(namebuf, ti->pFont, i+block_offset);
-    linewidth += strlen(namebuf) + 2;
-    fprintf(out, "/%s%s", namebuf, (linewidth > 70)?(linewidth = 0, "\n"):(" "));
-#else
-    fprintf(out, "/ch%02x%s", i, (((i % 10) == 9)?("\n"):(" ")));
-#endif /* USE_FT_PS_NAMES */
-  }
-  fprintf(out, "] def\n");
-
-  fprintf(out, "/CharProcs %d dict def CharProcs begin\n", (int)(numchars + 1));
-  fprintf(out, "/.notdef {\n"
-               "1000 0 0 0 0 0 setcachedevice\n"
-               "fill } bind def\n");
-  for( i = 0 ; i < numchars ; i++ )
-  {
-    char buf[32];
-#ifdef USE_FT_PS_NAMES
-    char namebuf[256];
-    PsOut_Get_FreeType_Glyph_Name(namebuf, ti->pFont, i+block_offset);
-    sprintf(buf, "%s ", namebuf);
-#else
-    sprintf(buf, "ch%02lx ", i);
-#endif /* USE_FT_PS_NAMES */
-    PSType3_createOutlineGlyphs(out, ti, i+block_offset, buf);
-  }
-  fprintf(out, "end\n"
-               "/BuildGlyph {\n"
-               "  exch /CharProcs get exch\n"
-               "  2 copy known not {pop /.notdef} if get exec } bind def\n"
-               "/BuildChar { 1 index /Encoding get exch get\n"
-               "  1 index /Encoding get exec } bind def\n");
-  fprintf(out, "currentdict end /%s exch definefont pop\n", psfontname);
-  fprintf(out, "%%EndFont\n");
-
-  return 0;
-}
-
-static
-char *FT_Get_TT_NAME_ID(FT_Face ttface, int index)
-{
-  FT_SfntName  name;
-  char        *s;
-
-  if( index >= FT_Get_Sfnt_Name_Count(ttface) )
-    return NULL;
-
-  FT_Get_Sfnt_Name(ttface, index, &name);
-  s = (char *)malloc(name.string_len+2);
-  if( !s )
-    return NULL;
-  memcpy(s, (char *)name.string, name.string_len);
-  s[name.string_len] = '\0';
-  return s;
-}
-
-int PsOut_DownloadFreeType3(PsOutPtr self, const char *psfontname, FontPtr pFont, long block_offset)
-{
-  struct ft2info  cft2info = { 0 };
-  struct ft2info *ti       = &cft2info;
-
-  S_Flush(self);
-
-  ti->tf     = (FTFontPtr)pFont->fontPrivate;
-  ti->ttface = ti->tf->instance->face->face;
-  ti->pFont  = pFont;
-#ifdef DEBUG_gisburn
-  fprintf(stderr, "# Downloading FT2 font filename='%s', ttface=%lx\n", ti->tf->instance->face->filename, (long)ti->ttface);
-#endif /* DEBUG_gisburn */
-
-  ti->nameid.full_name = FT_Get_TT_NAME_ID(ti->ttface, TT_NAME_ID_FULL_NAME);
-  ti->nameid.copyright = FT_Get_TT_NAME_ID(ti->ttface, TT_NAME_ID_COPYRIGHT);
-  ti->nameid.family    = FT_Get_TT_NAME_ID(ti->ttface, TT_NAME_ID_FONT_FAMILY);
-  ti->nameid.subfamily = FT_Get_TT_NAME_ID(ti->ttface, TT_NAME_ID_FONT_SUBFAMILY);
-  ti->nameid.version   = FT_Get_TT_NAME_ID(ti->ttface, TT_NAME_ID_VERSION_STRING);
-
-  ti->ttheader     =     (TT_Header *)FT_Get_Sfnt_Table(ti->ttface, ft_sfnt_head);
-  ti->ttpostscript = (TT_Postscript *)FT_Get_Sfnt_Table(ti->ttface, ft_sfnt_post);
-
-  PSType3_generateOutlineFont(self->Fp, psfontname, ti, block_offset);
-
-  free(ti->nameid.full_name);
-  free(ti->nameid.copyright);
-  free(ti->nameid.family);
-  free(ti->nameid.subfamily);
-  free(ti->nameid.version);
-
-  S_Flush(self);
-
-  return 0;
-}
-
diff --git a/hw/xprint/ps/ttf2pt1wrap.c b/hw/xprint/ps/ttf2pt1wrap.c
deleted file mode 100644
index 57bb777..0000000
--- a/hw/xprint/ps/ttf2pt1wrap.c
+++ /dev/null
@@ -1,14 +0,0 @@
-/*
- * Wrapper to add missing symbol to externally supplied code
- */
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#ifdef Lynx
-extern int optind;
-extern char *optarg;
-#endif
-
-#include "ttf2pt1.c"
diff --git a/hw/xprint/raster/Makefile.am b/hw/xprint/raster/Makefile.am
deleted file mode 100644
index 1ee1122..0000000
--- a/hw/xprint/raster/Makefile.am
+++ /dev/null
@@ -1,10 +0,0 @@
-noinst_LTLIBRARIES = libraster.la
-
-INCLUDES = -I$(top_srcdir)/hw/xprint
-
-AM_CFLAGS = @DIX_CFLAGS@ @XPRINT_CFLAGS@ -D_XP_PRINT_SERVER_
-
-libraster_la_SOURCES =		\
-	RasterAttVal.c		\
-	Raster.c		\
-	Raster.h
diff --git a/hw/xprint/raster/Raster.c b/hw/xprint/raster/Raster.c
deleted file mode 100644
index dccef61..0000000
--- a/hw/xprint/raster/Raster.c
+++ /dev/null
@@ -1,1563 +0,0 @@
-/*
-(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:		printer/Raster.c
-**    *
-**    *  Contents:
-**    *                 Raster driver for the print server.
-**    *
-**    *  Copyright:	Copyright 1993, 1995 Hewlett-Packard Company
-**    *
-**    *********************************************************
-** 
-********************************************************************/
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#include <errno.h>
-#include <stdio.h>
-#include <string.h>
-#include <sys/stat.h>
-#include <sys/wait.h>
-#include <unistd.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <X11/X.h>
-#include <X11/Xos.h>	/* for SIGCLD on pre-POSIX systems */
-#define NEED_EVENTS
-#include <X11/Xproto.h>
-#undef NEED_EVENTS
-#include <X11/Xatom.h>
-#include "misc.h"
-#include "dixstruct.h"
-#include "scrnintstr.h"
-#include "screenint.h"
-#include "colormapst.h"
-#include "windowstr.h"
-#include "propertyst.h"
-#include "servermd.h"	/* needed for IMAGE_BUFSIZE */
-#include "fb.h"
-#include "mi.h"
-
-#include <X11/extensions/Print.h>
-#include "Raster.h"
-
-#include "attributes.h"
-#include "AttrValid.h"
-#include "DiPrint.h"
-
-static void AllocateRasterPrivates(
-    ScreenPtr pScreen);
-static Bool RasterChangeWindowAttributes(
-    WindowPtr pWin,
-    unsigned long   mask);
-static int StartJob(
-    XpContextPtr pCon,
-    Bool sendClientData,
-    ClientPtr client);
-static int StartPage(
-    XpContextPtr pCon,
-    WindowPtr pWin);
-static int StartDoc(
-    XpContextPtr pCon,
-    XPDocumentType type);
-static int EndDoc(
-    XpContextPtr pCon,
-    Bool cancel);
-static int EndJob(
-    XpContextPtr pCon,
-    Bool cancel);
-static int EndPage(
-    XpContextPtr pCon,
-    WindowPtr pWin);
-static int DocumentData(
-    XpContextPtr pCon,
-    DrawablePtr pDraw,
-    char *pData,
-    int len_data,
-    char *pDoc_fmt,
-    int len_fmt,
-    char *pOptions,
-    int len_options,
-    ClientPtr client);
-static int GetDocumentData(
-    XpContextPtr pContext,
-    ClientPtr client,
-    int maxBufferSize);
-static void FreePageFiles(
-    RasterContextPrivPtr pWinPriv);
-static int SystemCmd(
-    char *pCommand);
-static Bool RasterCloseScreen(
-    int index,
-    ScreenPtr pScreen);
-static int RasterInitContext(XpContextPtr pCon);
-static Bool RasterDestroyContext(XpContextPtr pCon);
-static char *RasterGetAttributes(
-		XpContextPtr pContext,
-		XPAttributes class);
-static char *RasterGetOneAttribute(XpContextPtr pCon,
-			   XPAttributes class, 
-			   char *attribute);
-static int RasterSetAttributes(XpContextPtr pCon,
-			  XPAttributes class,
-			  char *attributes);
-static int RasterAugmentAttributes(XpContextPtr pCon,
-			      XPAttributes class,
-			      char *attributes);
-static int RasterMediumDimensions(XpContextPtr pCon,
-			      CARD16 *width,
-			      CARD16 *height);
-static int RasterReproducibleArea(XpContextPtr pCon,
-			      xRectangle *pRect);
-
-#define MAX(a,b) (((a) > (b)) ? (a) : (b))
-#define DOC_PCL		1
-#define DOC_RASTER	2
-
-static DevPrivateKey RasterScreenPrivateKey = &RasterScreenPrivateKey;
-static DevPrivateKey RasterContextPrivateKey = &RasterContextPrivateKey;
-static char RASTER_DRIV_NAME[] = "XP-RASTER";
-static int doc_type = DOC_RASTER;
-
-#define ABSOLUTE_PCLCOMP_PATH1 "/usr/openwin/bin/pclcomp"
-#define ABSOLUTE_PCLCOMP_PATH2 "/usr/X11/bin/pclcomp"
-
-static char *pcl3_output_cmds[] = {
-        "xpr -device ljet -rv -landscape < %(InFile)% | pclcomp -0 > %(OutFile)%",
-        "xpr -device ljet -rv -landscape < %(InFile)% | pclcomp -01 > %(OutFile)%",
-        "xpr -device ljet -rv -landscape < %(InFile)% | pclcomp -02 > %(OutFile)%",
-        "xpr -device ljet -rv -landscape < %(InFile)% | pclcomp -03 > %(OutFile)%",
-        "xpr -device ljet -rv -landscape < %(InFile)% | pclcomp -012 > %(OutFile)%",
-        "xpr -device ljet -rv -landscape < %(InFile)% | pclcomp -013 > %(OutFile)%",
-        "xpr -device ljet -rv -landscape < %(InFile)% | pclcomp -023 > %(OutFile)%",
-        "xpr -device ljet -rv -landscape < %(InFile)% | pclcomp -0123 > %(OutFile)%",
-        "xpr -device ljet -rv -landscape < %(InFile)% > %(OutFile)%",
-        "xpr -device ljet -rv < %(InFile)% | pclcomp -0 > %(OutFile)%",
-        "xpr -device ljet -rv < %(InFile)% | pclcomp -01 > %(OutFile)%",
-        "xpr -device ljet -rv < %(InFile)% | pclcomp -02 > %(OutFile)%",
-        "xpr -device ljet -rv < %(InFile)% | pclcomp -03 > %(OutFile)%",
-        "xpr -device ljet -rv < %(InFile)% | pclcomp -012 > %(OutFile)%",
-        "xpr -device ljet -rv < %(InFile)% | pclcomp -013 > %(OutFile)%",
-        "xpr -device ljet -rv < %(InFile)% | pclcomp -023 > %(OutFile)%",
-        "xpr -device ljet -rv < %(InFile)% | pclcomp -0123 > %(OutFile)%",
-        "xpr -device ljet -rv < %(InFile)% > %(OutFile)%"};
-
-Bool
-InitializeRasterDriver(
-     int ndx,
-     ScreenPtr pScreen,
-     int argc,
-     char **argv)
-{
-    int xRes, yRes;
-    int maxRes, maxDim, numBytes;
-    RasterScreenPrivPtr pPriv;
-    
-    /*
-     * Register this driver's InitContext function with the print extension.
-     * This is a bit
-     * sleazy, as the extension hasn't yet been initialized, but the
-     * extension needs to know this, and this seems the best time to
-     * provide the information.
-     */
-    XpRegisterInitFunc( pScreen, RASTER_DRIV_NAME, RasterInitContext );
-
-    /*
-     * Create and load the devPrivate for the printer layer.
-     */
-    AllocateRasterPrivates(pScreen);
-   
-    pPriv = (RasterScreenPrivPtr)
-	dixLookupPrivate(&pScreen->devPrivates, RasterScreenPrivateKey);
-
-    maxDim = MAX( pScreen->height, pScreen->width );
-    numBytes = maxDim + BITMAP_SCANLINE_PAD - 1; /* pixels per row */
-    numBytes *= maxDim;
-    numBytes /=  8; /* bytes per row */
-    xRes = pScreen->width / (pScreen->mmWidth / 25.4);
-    yRes = pScreen->height / (pScreen->mmHeight / 25.4);
-    maxRes = MAX( xRes, yRes );
-
-    pPriv->pBits = (char *)xalloc(numBytes);
-
-    /*
-     * Have to allocate maxDim X maxDim to allow for landscape mode.
-     */
-    fbScreenInit(pScreen, pPriv->pBits, maxDim, maxDim, maxRes,
-		 maxRes, maxDim, 1);
-    miInitializeBackingStore(pScreen);
-    pScreen->blackPixel = 1;
-    pScreen->whitePixel = 0;
-    if(fbCreateDefColormap(pScreen) == FALSE)
-	; /* XXX what do I do if it fails? */
-
-    pScreen->SaveScreen = (SaveScreenProcPtr)_XpBoolNoop;
-    pPriv->ChangeWindowAttributes = pScreen->ChangeWindowAttributes;
-    pScreen->ChangeWindowAttributes = RasterChangeWindowAttributes;
-    pPriv->CloseScreen = pScreen->CloseScreen;
-    pScreen->CloseScreen = RasterCloseScreen;
-
-    return TRUE;
-}
-
-/*
- * GetPropString searches the context's config database for a property
- * by the name of propName.  If found, it returns the property's
- * value, otherwise it returns NULL unless the requested attribute
- * is RASTER_PRINT_PAGE_COMMAND, in which case it returns a hard-coded
- * default string to invoke xpr to produce a PostScript(tm) formatted
- * raster.
- */
-
-static char *
-GetPropString(
-     XpContextPtr pCon,
-     char *propName)
-{
-    RasterContextPrivPtr pConPriv = (RasterContextPrivPtr)
-	dixLookupPrivate(&pCon->devPrivates, RasterContextPrivateKey);
-    char *type;
-    XrmValue val;
-    struct stat status;
-    int pclcomp_exists = 0;
-
-    if( XrmGetResource(pConPriv->config, propName, propName, &type, &val) == 
-       True )
-        return (char *)val.addr;
-
-    if( !strcmp( propName, RASTER_PRINT_PAGE_COMMAND ) )
-      if( doc_type == DOC_RASTER )
-        return "xpr -device ps %(InFile)% > %(OutFile)%";
-      else
-      {
-        XpOid orientation;
-        XpOid compression;
-        int   pcl3_output_index = 0;
-
-        orientation = XpGetContentOrientation(pCon);
-        compression = XpGetAvailableCompression(pCon);
-
-        switch(orientation) {
-        case xpoid_val_content_orientation_landscape:
-           pcl3_output_index = 0;
-           break;
-        default:
-           pcl3_output_index += 9;
-           break;
-        }
-
-        if(stat(ABSOLUTE_PCLCOMP_PATH1, &status) != -1)
-           pclcomp_exists = 1;
-        else if(stat(ABSOLUTE_PCLCOMP_PATH2, &status) != -1)
-           pclcomp_exists = 1;
-
-        if(pclcomp_exists)
-           switch(compression) {
-           case xpoid_val_available_compressions_0:
-              pcl3_output_index += 0;
-              break;
-           case xpoid_val_available_compressions_01:
-              pcl3_output_index += 1;
-              break;
-           case xpoid_val_available_compressions_02:
-              pcl3_output_index += 2;
-              break;
-           case xpoid_val_available_compressions_03:
-              pcl3_output_index += 3;
-              break;
-           case xpoid_val_available_compressions_012:
-              pcl3_output_index += 4;
-              break;
-           case xpoid_val_available_compressions_013:
-              pcl3_output_index += 5;
-              break;
-           case xpoid_val_available_compressions_023:
-              pcl3_output_index += 6;
-              break;
-           default:
-              pcl3_output_index += 7;
-              break;
-           }
-        else
-           pcl3_output_index += 8;
-
-        return pcl3_output_cmds[pcl3_output_index];
-      }
-    else
-      return NULL;
-}
-
-static void
-SetDocumentType(
-     XpContextPtr pCon)
-{
-    XpOidList* attrs_supported;
-
-    /*
-     * only validate attributes found in document-attributes-supported
-     */
-    attrs_supported =
-	XpGetListAttr(pCon, XPPrinterAttr,
-		      xpoid_att_document_attributes_supported,
-		      (const XpOidList*)NULL);
-
-    if(XpOidListHasOid(attrs_supported, xpoid_att_document_format))
-    {
-	const char* value_in;
-	XpOidDocFmt *f;
-
-	value_in = XpGetStringAttr(pCon, XPDocAttr, xpoid_att_document_format);
-
-	f = XpOidDocFmtNew( value_in );
-
-	if( f != NULL )
-	{
-	    if( !strcmp( f->format, "PCL" ) )
-		doc_type = DOC_PCL;
-	    else
-		doc_type = DOC_RASTER;
-
-	    XpOidDocFmtDelete( f );
-	}
-    }
-
-    /*
-     * clean up
-     */
-    XpOidListDelete(attrs_supported);
-}
-
-static int
-StartJob(
-     XpContextPtr pCon,
-     Bool sendClientData,
-     ClientPtr client)
-{
-    RasterContextPrivPtr pConPriv = (RasterContextPrivPtr)
-	dixLookupPrivate(&pCon->devPrivates, RasterContextPrivateKey);
-
-    SetDocumentType( pCon );
-
-    /*
-     * Check for existing page file, and delete it if it exists.
-     */
-    if(pConPriv->pageFileName != (char *)NULL)
-    {
-	if(pConPriv->pPageFile != (FILE *)NULL)
-	{
-	    fclose(pConPriv->pPageFile);
-	    pConPriv->pPageFile = (FILE *)NULL;
-	}
-	unlink(pConPriv->pageFileName);
-	Xfree(pConPriv->pageFileName);
-	pConPriv->pageFileName = (char *)NULL;
-    }
-
-    /* 
-     * Create a temporary file to store the printer output.
-     */
-    if(!sendClientData)
-    {
-	/* 
-	 * Create a temporary file to store the printer output.
-	 */
-	if (!XpOpenTmpFile("w", &pConPriv->jobFileName, &pConPriv->pJobFile))
-	    return BadAlloc;
-    }
-
-    return Success;
-}
-
-/*
- * StartDoc and EndDoc are just no-ops in this implementation, since
- * our view of the spooler really doesn't recognize documents.
- */
-
-static int 
-StartDoc(
-     XpContextPtr pCon,
-     XPDocumentType type)
-{
-    return Success;
-}
-
-static int EndDoc(
-     XpContextPtr pCon,
-     Bool cancel)
-{
-    return Success;
-}
-
-#if 0
-
-/* XXX Not used. */
-
-/*
- * BuidArgVector takes a pointer to a comma-separated list of command
- * options and splits it out into an array of argument pointers.  The
- * caller must not free the optionList after calling this function until
- * the returned arg vector is no longer needed, at which time the arg
- * vector should also be freed.
- */
-
-#define SEPARATOR_CHAR (char)','
-
-static char **
-BuildArgVector(
-    char *optionList,
-    char **argVector,
-    int argCount)
-{
-    char *curArg, *lastChar, *endArg;
-
-    curArg = optionList;
-    lastChar = optionList + strlen(optionList); /* includes final NULL */
-
-    while(curArg != (char *)NULL && curArg < lastChar)
-    {
-	/* strip leading white space */
-	while(curArg < lastChar && isascii((int)*curArg) && 
-	      isspace((int)*curArg))
-	    curArg++;
-
-	if(curArg < lastChar)
-	{
-	    argVector = (char **)Xrealloc(argVector, 
-					  sizeof(char *) * (argCount + 2));
-	    argVector[argCount] = curArg;
-	    argVector[++argCount] = (char *)NULL;
-
-	    endArg = strchr(curArg, SEPARATOR_CHAR);
-
-	    /* Should I strip trailing white space ??? */
-
-	    if(endArg != (char *)NULL)
-	    {
-	        *endArg = (char)'\0';
-	        curArg = endArg + 1;
-	    }
-	    else
-	        curArg = (char *)NULL;
-	}
-    }
-
-    return argVector;
-}
-#endif
-
-static int
-EndJob(
-     XpContextPtr pCon,
-     Bool cancel)
-{
-    RasterContextPrivPtr pConPriv = (RasterContextPrivPtr)
-	dixLookupPrivate(&pCon->devPrivates, RasterContextPrivateKey);
-
-    if( cancel == True )
-    {
-        if(pConPriv->getDocClient != (ClientPtr)NULL) {
-	    XpFinishDocData(pConPriv->getDocClient);
-	    
-	    pConPriv->getDocClient = (ClientPtr)NULL;
-	    pConPriv->getDocBufSize = 0;
-	}
-	    
-	if(pConPriv->jobFileName != (char *)NULL)
-	{
-	    unlink(pConPriv->jobFileName);
-	    Xfree(pConPriv->jobFileName);
-	    pConPriv->jobFileName = (char *)NULL;
-	}
-
-        return Success;
-    }
-
-    if(pConPriv->getDocClient != (ClientPtr)NULL&&pConPriv->getDocBufSize > 0)
-    {
-        XpFinishDocData(pConPriv->getDocClient);
-	    
-	pConPriv->getDocClient = (ClientPtr)NULL;
-	pConPriv->getDocBufSize = 0;
-
-        return Success;
-    }
-    
-    if(pConPriv->pJobFile != (FILE *)NULL)
-    {
-        fclose(pConPriv->pJobFile);
-        pConPriv->pJobFile = (FILE *)NULL;
-	
-	if(pConPriv->jobFileName != (char *)NULL)
-	{
-	      XpSubmitJob( pConPriv->jobFileName, pCon );
-	      unlink(pConPriv->jobFileName);
-	      Xfree(pConPriv->jobFileName);
-	      pConPriv->jobFileName = (char *)NULL;
-	}
-    }
-
-    return Success;
-}
-
-/* StartPage 
- *
- * If page file exists
- *     close page file
- *     set page file pointer = NULL
- *     unlink page file
- */
-static int
-StartPage(
-     XpContextPtr pCon,
-     WindowPtr pWin)
-{
-    RasterContextPrivPtr pConPriv = (RasterContextPrivPtr)
-	dixLookupPrivate(&pCon->devPrivates, RasterContextPrivateKey);
-
-    if(pConPriv->pPageFile != (FILE *)NULL)
-    {
-	fclose(pConPriv->pPageFile);
-	pConPriv->pPageFile = (FILE *)NULL;
-    }
-    if(pConPriv->pageFileName != (char *)NULL)
-    {
-	unlink(pConPriv->pageFileName);
-	pConPriv->pageFileName = (char *)NULL;
-    }
-
-    return Success;
-}
-
-#include "X11/XWDFile.h"
-
-
-#define lowbit(x) ((x) & (~(x) + 1))
-
-/*
- * Get the XWDColors of all pixels in colormap - returns # of colors
- */
-static XWDColor *
-Get_XWDColors(
-     ColormapPtr pCmap)
-{
-    int i, ncolors;
-    xrgb *prgbList;
-    Pixel *pPixels;
-    XWDColor *colors;
-
-    ncolors = pCmap->pVisual->ColormapEntries;
-    if (!(colors = (XWDColor *) malloc (sizeof(XWDColor) * ncolors)))
-        return (XWDColor *) NULL;
-    if (!(prgbList = (xrgb*) malloc(sizeof(xrgb) * ncolors)))
-    {
-	Xfree(colors);
-        return (XWDColor *) NULL;
-    }
-    if (!(pPixels = (Pixel*) malloc(sizeof(Pixel) * ncolors)))
-    {
-	Xfree(colors);
-	Xfree(prgbList);
-        return (XWDColor *) NULL;
-    }
-
-    if (pCmap->pVisual->class == DirectColor ||
-        pCmap->pVisual->class == TrueColor) {
-        Pixel red, green, blue, red1, green1, blue1;
-
-        red = green = blue = 0;
-        red1 = lowbit(pCmap->pVisual->redMask);
-        green1 = lowbit(pCmap->pVisual->greenMask);
-        blue1 = lowbit(pCmap->pVisual->blueMask);
-        for (i=0; i<ncolors; i++) {
-          colors[i].pixel = red|green|blue;
-          colors[i].pad = 0;
-          red += red1;
-          if (red > pCmap->pVisual->redMask)
-            red = 0;
-          green += green1;
-          if (green > pCmap->pVisual->greenMask)
-            green = 0;
-          blue += blue1;
-          if (blue > pCmap->pVisual->blueMask)
-            blue = 0;
-        }
-    } else {
-        for (i=0; i<ncolors; i++) {
-          colors[i].pixel = i;
-          colors[i].pad = 0;
-        }
-    }
-
-    for(i = 0; i < ncolors; i++)
-	pPixels[i] = colors[i].pixel;
-
-    QueryColors(pCmap, ncolors, pPixels, prgbList);
-    Xfree(pPixels);
-
-    for(i = 0; i < ncolors; i++)
-    {
-	colors[i].red = prgbList[i].red;
-	colors[i].green = prgbList[i].green;
-	colors[i].blue = prgbList[i].blue;
-    }
-    Xfree(prgbList);
-
-    return(colors);
-}
-
-static void
-_swapshort (
-    register char *bp,
-    register unsigned n)
-{
-    register char c;
-    register char *ep = bp + n;
-
-    while (bp < ep) {
-        c = *bp;
-        *bp = *(bp + 1);
-        bp++;
-        *bp++ = c;
-    }
-}
-
-static void
-_swaplong (
-    register char *bp,
-    register unsigned n)
-{
-    register char c;
-    register char *ep = bp + n;
-    register char *sp;
-
-    while (bp < ep) {
-        sp = bp + 3;
-        c = *sp;
-        *sp = *bp;
-        *bp++ = c;
-        sp = bp + 1;
-        c = *sp;
-        *sp = *bp;
-        *bp++ = c;
-        bp += 2;
-    }
-}
-static int
-WriteWindowRaster(
-    WindowPtr pWin,
-    FILE *pRasterFile)
-{
-    long widthBytesLine, length;
-    int nlines, linesPerBuf, height, linesDone;
-    char *pBuf;
-    DrawablePtr pDraw = &pWin->drawable;
-    XWDFileHeader header;
-    int win_name_size;
-    int header_size;
-    int ncolors, i;
-    char *win_name;
-    VisualPtr pVisual;
-    ColormapPtr pCmap;
-    XWDColor *pColors;
-    unsigned long swaptest = 1;
-
-    widthBytesLine = PixmapBytePad(pWin->drawable.width, pWin->drawable.depth);
-    length = widthBytesLine * pWin->drawable.height;
-    height = pWin->drawable.height;
-
-    if(length <= 0)
-        return Success;
-
-    if (widthBytesLine >= IMAGE_BUFSIZE)
-        linesPerBuf = 1;
-    else
-    {
-        linesPerBuf = IMAGE_BUFSIZE / widthBytesLine;
-        if (linesPerBuf > height)
-            linesPerBuf = height;
-    }
-    length = linesPerBuf * widthBytesLine;
-    if (linesPerBuf < height)
-    {
-        /* we have to make sure intermediate buffers don't need padding */
-        while ((linesPerBuf > 1) && (length & 3))
-        {
-            linesPerBuf--;
-            length -= widthBytesLine;
-        }
-        while (length & 3)
-        {
-            linesPerBuf++;
-            length += widthBytesLine;
-        }
-    }
-    if(!(pBuf = (char *) Xalloc(length)))
-        return (BadAlloc);
-
-    /*
-     * Start of Xwd header code.
-     */
-
-    /*
-     * XXX - Should we use the real window name???
-     */
-    win_name = "xwdump";
-    /* sizeof(char) is included for the null string terminator. */
-    win_name_size = strlen(win_name) + sizeof(char);
-    
-    pCmap = (ColormapPtr)LookupIDByType(wColormap (pWin), RT_COLORMAP);
-    pVisual = pCmap->pVisual;
-    if((pColors = Get_XWDColors(pCmap)) == (XWDColor *)NULL)
-    {
-	Xfree(pBuf);
-	return (BadAlloc);
-    }
-
-    /*
-     * Write out header information.
-     */
-    header_size = sizeof(header) + win_name_size;
-    header.header_size = (CARD32) header_size;
-    header.file_version = (CARD32) XWD_FILE_VERSION;
-    header.pixmap_format = (CARD32) ZPixmap; /* Must match GetImage below */
-    header.pixmap_depth = (CARD32) pDraw->depth;
-    header.pixmap_width = (CARD32) pDraw->width;
-    header.pixmap_height = (CARD32) pDraw->height;
-    header.xoffset = (CARD32) 0;
-    header.byte_order = (CARD32) screenInfo.imageByteOrder;
-    header.bitmap_unit = (CARD32) screenInfo.bitmapScanlineUnit;
-    header.bitmap_bit_order = (CARD32) screenInfo.bitmapBitOrder;
-    header.bitmap_pad = (CARD32) screenInfo.bitmapScanlinePad;
-    header.bits_per_pixel = (CARD32) pDraw->bitsPerPixel;
-    header.bytes_per_line = (CARD32) widthBytesLine;
-    header.visual_class = (CARD32) pVisual->class;
-    header.red_mask = (CARD32) pVisual->redMask;
-    header.green_mask = (CARD32) pVisual->greenMask;
-    header.blue_mask = (CARD32) pVisual->blueMask;
-    header.bits_per_rgb = (CARD32) pVisual->bitsPerRGBValue;
-    header.colormap_entries = (CARD32) pVisual->ColormapEntries;
-    header.ncolors = ncolors = (CARD32) pVisual->ColormapEntries;
-    header.window_width = (CARD32) pDraw->width;
-    header.window_height = (CARD32) pDraw->height;
-    header.window_x = 0;
-    header.window_y = 0;
-    header.window_bdrwidth = (CARD32) 0;
-
-    if (*(char *) &swaptest) {
-        _swaplong((char *) &header, sizeof(header));
-        for (i = 0; i < ncolors; i++) {
-            _swaplong((char *) &pColors[i].pixel, sizeof(long));
-            _swapshort((char *) &pColors[i].red, 3 * sizeof(short));
-        }
-    }
-
-    (void) fwrite((char *)&header, sizeof(header), 1, pRasterFile);
-    (void) fwrite(win_name, win_name_size, 1, pRasterFile);
-    (void) fwrite((char *) pColors, sizeof(XWDColor), ncolors, pRasterFile);
-
-    Xfree(pColors);
-
-    /*
-     * End of Xwd header code.
-     */
-
-    linesDone = 0;
-    while(height - linesDone > 0)
-    {
-        nlines = min(linesPerBuf, height - linesDone);
-        (*pDraw->pScreen->GetImage) (pDraw,
-                                     0,
-                                     linesDone,
-                                     pWin->drawable.width,
-                                     nlines,
-                                     ZPixmap,
-                                     ~0,
-                                     pBuf);
-
-        if(fwrite(pBuf, sizeof(char), (size_t)(nlines * widthBytesLine),
-	   pRasterFile) != 
-	   (size_t)(nlines * widthBytesLine))
-	{
-	    Xfree(pBuf);
-	    return BadAlloc;
-	}
-        linesDone += nlines;
-    }
-    Xfree(pBuf);
-    return Success;
-}
-
-
-static int
-SendPage( XpContextPtr pCon )
-{
-    struct stat statBuf;
-    RasterContextPrivPtr pConPriv = (RasterContextPrivPtr)
-	dixLookupPrivate(&pCon->devPrivates, RasterContextPrivateKey);
-
-    if(stat(pConPriv->pageFileName, &statBuf) < 0)
-        return BadAlloc;
-
-    return XpSendDocumentData(pConPriv->getDocClient, 
-		              pConPriv->pPageFile, (int)statBuf.st_size, 
-		              pConPriv->getDocBufSize);
-}
-
-/*
- * EndPage:
- *
- * If page file doesn't exist:
- * {
- *     Create page file
- *     Open page file
- *     Write page header to page file
- *     if(preRasterFile exists)
- *         copy preRasterFile contents to page file
- *     if(noRasterFile exists)
- *         write noRasterFile contents to page file
- *     else
- *         Create raster image file
- *         Open raster image file
- *         GetImage data
- *         Write Image data to raster image file
- *         invoke page_command on raster image file
- *         Write raster image file contents to page file
- *         Unlink tempPage file
- *     if(postRasterFile exists)
- *         write postRasterFile contents to page file
- *     Write page trailer to page file
- * }
- * Write page file to job file
- */
-static int
-EndPage(
-     XpContextPtr pCon,
-     WindowPtr pWin)
-{
-    RasterContextPrivPtr pConPriv = (RasterContextPrivPtr)
-	dixLookupPrivate(&pCon->devPrivates, RasterContextPrivateKey);
-    struct stat statBuf;
-    char *rasterFileName = (char *)NULL, *pCommand = (char *)NULL;
-    FILE *pRasterFile = (FILE *)NULL;
-
-    if(pConPriv->pageFileName == (char *)NULL)
-    {
-	/*
-	 * Open the page file.
-	 */
-	if (!XpOpenTmpFile("w+", &pConPriv->pageFileName,
-			   &pConPriv->pPageFile))
-	    goto BAD_PAGE_ALLOC;
-
-	/*
-	 * Copy any pre-raster document data to the page file.
-	 */
-	if(pConPriv->pPreRasterFile != (FILE *)NULL)
-	{
-	    if(CopyContentsAndDelete(&pConPriv->pPreRasterFile, 
-			             &pConPriv->preRasterFileName,
-			             pConPriv->pPageFile) == FALSE)
-		goto BAD_PAGE_ALLOC;
-	}
-
-	/*
-	 * Copy either the no-raster document data, or the raster 
-	 * data itself to the page file.
-	 * If the no-raster file exists, then we don't process the
-	 * actual window raster bits.
-	 */
-	if(pConPriv->pNoRasterFile != (FILE *)NULL)
-	{
-	    if(CopyContentsAndDelete(&pConPriv->pNoRasterFile, 
-			             &pConPriv->noRasterFileName,
-			             pConPriv->pPageFile) == FALSE)
-		goto BAD_PAGE_ALLOC;
-	}
-	else
-	{
-	    /*
-	     * Open the raster image file.
-	     */
-	    if (!XpOpenTmpFile("w", &rasterFileName, &pRasterFile))
-		goto BAD_PAGE_ALLOC;
-    
-	    /*
-	     * Write the page image data to the raster image file.
-	     */
-	    if(WriteWindowRaster(pWin, pRasterFile) != Success)
-	        goto BAD_PAGE_ALLOC;
-
-	    /*
-	     * Invoke the page_command on the raster image file.
-	     */
-	    if((pCommand = GetPropString(pCon, RASTER_PRINT_PAGE_COMMAND)) !=
-	       (char *)NULL)
-	    {
-	        char *outFileName;
-	        FILE *pOutFile;
-
-		if (!XpOpenTmpFile("w", &outFileName, &pOutFile))
-		    goto BAD_PAGE_ALLOC;
-	        fclose(pOutFile);
-
-	        pCommand = ReplaceFileString(strdup(pCommand), rasterFileName,
-					     outFileName);
-	        fclose(pRasterFile);
-	        SystemCmd(pCommand);
-		free(pCommand);
-	        /*
-	         * Delete the unprocessed raster file.
-	         */
-	        unlink(rasterFileName);
-	        Xfree(rasterFileName);
-	        rasterFileName = outFileName;
-                if((pRasterFile = fopen(rasterFileName, "r")) == (FILE *)NULL)
-	            goto BAD_PAGE_ALLOC;
-	    }
-	    else
-	    {
-	        fclose(pRasterFile);
-                if((pRasterFile = fopen(rasterFileName, "r")) == (FILE *)NULL)
-	            goto BAD_PAGE_ALLOC;
-	    }
-
-	    /*
-	     * Copy the raster image file contents to the page file.
-	     * Note that pRasterFile must be set to the start of the
-	     * raster file.
-	     */
-	    if(CopyContentsAndDelete(&pRasterFile,
-			             &rasterFileName,
-			             pConPriv->pPageFile) == FALSE)
-		goto BAD_PAGE_ALLOC;
-	}
-
-	/*
-	 * Copy any post-raster document data to the page file.
-	 */
-	if(pConPriv->pPostRasterFile != (FILE *)NULL)
-	{
-	    if(CopyContentsAndDelete(&pConPriv->pPostRasterFile, 
-			             &pConPriv->postRasterFileName,
-			             pConPriv->pPageFile) == FALSE)
-		goto BAD_PAGE_ALLOC;
-	}
-
-    }
-
-    /*
-     * Write the page file contents to the job file or to the client
-     * performing GetDocumentData.
-     * pConPriv->pPageFile must first be set to the start of the page file.
-     */
-    rewind(pConPriv->pPageFile);
-    if(stat(pConPriv->pageFileName, &statBuf) < 0)
-        goto BAD_PAGE_ALLOC;
-
-    /*
-     * Send the page data to whatever client has called GetDocumentData.
-     */
-    if(pConPriv->getDocClient != (ClientPtr)NULL&&pConPriv->getDocBufSize > 0)
-    {
-	int retval;
-        /*
-         * We should do something like the following: suspend the 
-         * caller until we can gracefully write all the data in small
-         * chunks to the receiver, but for now we'll just call WriteToClient
-         * on the huge chunk
-         */
-	retval = SendPage(pCon);
-        fclose(pConPriv->pPageFile);
-        pConPriv->pPageFile = (FILE *)NULL;
-        unlink(pConPriv->pageFileName);
-        free(pConPriv->pageFileName);
-        pConPriv->pageFileName = (char *)NULL;
-	return retval;
-    }
-
-    if(pConPriv->pJobFile == (FILE *)NULL)
-    {
-	/*
-	 * This shouldn't be necessary.  I believe we only get here if
-	 * someone calls "EndPage" prior to "StartJob".  This error 
-	 * condition should probably be trapped at a higher level.
-	 */
-
-	if(pConPriv->jobFileName != (char *)NULL)
-	    Xfree(pConPriv->jobFileName);
-        /*
-         * Create a temporary file to store the printer output.
-         */
-	if (!XpOpenTmpFile("w", &pConPriv->jobFileName, &pConPriv->pJobFile))
-	    goto BAD_PAGE_ALLOC;
-    }
-
-    if(TransferBytes(pConPriv->pPageFile, pConPriv->pJobFile, 
-       (int)statBuf.st_size) != (int)statBuf.st_size)
-        goto BAD_PAGE_ALLOC;
-
-    fclose(pConPriv->pPageFile);
-    pConPriv->pPageFile = (FILE *)NULL;
-    unlink(pConPriv->pageFileName);
-    free(pConPriv->pageFileName);
-    pConPriv->pageFileName = (char *)NULL;
-
-    return Success;
-
-  BAD_PAGE_ALLOC:
-
-    FreePageFiles(pConPriv);
-
-    if(pRasterFile != (FILE *)NULL)
-	fclose(pRasterFile);
-    if(rasterFileName != (char *)NULL)
-    {
-	unlink(rasterFileName);
-        Xfree(rasterFileName);
-    }
-    return BadAlloc;
-}
-
-static int
-DocumentData(
-     XpContextPtr pCon,
-     DrawablePtr pDraw,
-     char *pData,
-     int len_data,
-     char *pDoc_fmt,
-     int len_fmt,
-     char *pOptions,
-     int len_options,
-     ClientPtr client)
-{
-    RasterContextPrivPtr pConPriv = (RasterContextPrivPtr)
-	dixLookupPrivate(&pCon->devPrivates, RasterContextPrivateKey);
-    char *preRasterStr = PRE_RASTER, *postRasterStr = POST_RASTER,
-	 *noRasterStr = NO_RASTER;
-
-    /*
-     * Check that options equals either PRE_RASTER or POST_RASTER.
-     */
-    if(len_options == strlen(preRasterStr) &&
-       strncmp(pOptions, preRasterStr, strlen(preRasterStr)) == 0)
-    {
-	if(pConPriv->pPreRasterFile == (FILE *)NULL)
-	{
-	    if (!XpOpenTmpFile("w+", &pConPriv->preRasterFileName,
-			       &pConPriv->pPreRasterFile))
-		return BadAlloc;
-	}
-	if(fwrite(pData, sizeof(char), (size_t)len_data,
-	   pConPriv->pPreRasterFile) != (size_t)len_data)
-	    return BadAlloc;
-	fflush(pConPriv->pPreRasterFile);
-    }
-    else if(len_options == strlen(postRasterStr) &&
-	    strncmp(pOptions, postRasterStr, strlen(postRasterStr)) == 0)
-    {
-	if(pConPriv->pPostRasterFile == (FILE *)NULL)
-	{
-	    if (!XpOpenTmpFile("w+", &pConPriv->postRasterFileName,
-			       &pConPriv->pPostRasterFile))
-		return BadAlloc;
-	}
-	if(fwrite(pData, sizeof(char), (size_t)len_data,
-	   pConPriv->pPostRasterFile) != (size_t)len_data)
-	    return BadAlloc;
-	fflush(pConPriv->pPostRasterFile);
-    }
-    else if(len_options == strlen(noRasterStr) &&
-	    strncmp(pOptions, noRasterStr, strlen(noRasterStr)) == 0)
-    {
-	if(pConPriv->pNoRasterFile == (FILE *)NULL)
-	{
-	    if (!XpOpenTmpFile("w+", &pConPriv->noRasterFileName,
-			       &pConPriv->pNoRasterFile))
-		return BadAlloc;
-	}
-	if(fwrite(pData, sizeof(char), (size_t)len_data,
-	   pConPriv->pNoRasterFile) != (size_t)len_data)
-	    return BadAlloc;
-	fflush(pConPriv->pNoRasterFile);
-    }
-    else
-	return BadValue;
-
-    return Success;
-}
-
-/*
- * GetDocumentData notes which client is requesting the document data for
- * a particular context. The Raster driver's EndPage function causes the
- * data to be written to the proper client.
- */
-static int
-GetDocumentData(
-    XpContextPtr pContext, 
-    ClientPtr client,
-    int maxBufferSize)
-{
-    RasterContextPrivPtr pConPriv = (RasterContextPrivPtr)
-	dixLookupPrivate(&pContext->devPrivates, RasterContextPrivateKey);
-
-    pConPriv->getDocClient = client;
-    pConPriv->getDocBufSize = maxBufferSize;
-    return Success;
-}
-
-static void
-AllocateRasterPrivates(
-    ScreenPtr pScreen)
-{
-    dixRequestPrivate(RasterContextPrivateKey, sizeof( RasterContextPrivRec ) );
-    dixSetPrivate(&pScreen->devPrivates, RasterScreenPrivateKey,
-		  Xalloc(sizeof(RasterScreenPrivRec)));
-}
-
-/*
- * RasterChangeWindowAttributes - Make sure that the window's backing
- * store is turned on.
- */
-static Bool 
-RasterChangeWindowAttributes(
-    WindowPtr pWin,
-    unsigned long mask)
-{
-    Bool status = Success;
-    ScreenPtr pScreen = pWin->drawable.pScreen;
-    RasterScreenPrivPtr pScreenPriv = (RasterScreenPrivPtr) 
-	dixLookupPrivate(&pScreen->devPrivates, RasterScreenPrivateKey);
-
-    if(pWin->backingStore == NotUseful)
-    {
-	pWin->backingStore = WhenMapped;
-	mask |= CWBackingStore;
-    }
-
-    if(pScreenPriv->ChangeWindowAttributes != NULL)
-    {
-        pScreen->ChangeWindowAttributes = pScreenPriv->ChangeWindowAttributes;
-        status = pScreen->ChangeWindowAttributes(pWin, mask);
-        pScreen->ChangeWindowAttributes = RasterChangeWindowAttributes;
-    }
-    return status;
-}
-
-/*
- * RasterValidateDocFormats - Inspects the files available in the 
- * ddx-config/XP-RASTER directory to find the names of PDLs for which
- * we have processing commands.  These names are then intersected with
- * the contents of the printer's document-formats-supported attribute,
- * and the result is stored back into document-formats-supported.  
- * We have hard-coded knowledge of how to produce PS, so we always 
- * leave that in, if it's listed in document-formats-supported, 
- * even if we don't have a configuration file.  If there is a 
- * configuration file for PS, then its contents will override our default.
- */
-static void
-RasterValidateDocFormats(
-     XpContextPtr pCon)
-{
-}
-
-/*
- * RasterValidateAttrs - Inspects and Corrects the attribute values
- * in the specified context.
- */
-static void
-RasterValidateAttrs(
-     XpContextPtr pCon)
-{
-    RasterValidateDocFormats(pCon);
-    XpValidatePrinterPool(pCon, &RasterValidatePoolsRec);
-    XpValidateJobPool(pCon, &RasterValidatePoolsRec);
-    XpValidateDocumentPool(pCon, &RasterValidatePoolsRec);
-}
-    
-/*
- * RasterInitContext - Establish the appropriate values for a
- * PrintContext used with the Raster Driver.
- */
-static char DOC_ATT_SUPP[]="document-attributes-supported:\tdefault-medium document-format";
-static char JOB_ATT_SUPP[]="job-attributes-supported:\t";
-static char DDX_DIR[]="ddx-config";
-
-static int
-RasterInitContext(
-     XpContextPtr pCon)
-{
-    char *configFileName, *val, *attrStr;
-    RasterContextPrivPtr pConPriv;
-    XpDriverFuncsPtr pFuncs;
-    
-    /*
-     * Initialize the attribute store for this printer.
-     */
-    XpInitAttributes( pCon );
-
-    /*
-     * Validate the attributes
-     */
-    RasterValidateAttrs( pCon );
-
-
-    /*
-     * Initialize the function pointers
-     */
-    pFuncs = &( pCon->funcs );
-    pFuncs->StartJob = StartJob;
-    pFuncs->EndJob = EndJob;
-    pFuncs->StartDoc = StartDoc;
-    pFuncs->EndDoc = EndDoc;
-    pFuncs->StartPage = StartPage;
-    pFuncs->EndPage = EndPage;
-    pFuncs->PutDocumentData = DocumentData;
-    pFuncs->GetDocumentData = GetDocumentData;
-    pFuncs->DestroyContext = RasterDestroyContext;
-    pFuncs->GetAttributes = RasterGetAttributes;
-    pFuncs->GetOneAttribute = RasterGetOneAttribute;
-    pFuncs->SetAttributes = RasterSetAttributes;
-    pFuncs->AugmentAttributes = RasterAugmentAttributes;
-    pFuncs->GetMediumDimensions = RasterMediumDimensions;
-    pFuncs->GetReproducibleArea = RasterReproducibleArea;
-    
-    /*
-     * Set up the context privates
-     */
-    pConPriv = (RasterContextPrivPtr)
-	dixLookupPrivate(&pCon->devPrivates, RasterContextPrivateKey);
-    
-    pConPriv->jobFileName = (char *)NULL;
-    pConPriv->pageFileName = (char *)NULL;
-    pConPriv->preRasterFileName = (char *)NULL;
-    pConPriv->postRasterFileName = (char *)NULL;
-    pConPriv->noRasterFileName = (char *)NULL;
-    pConPriv->pJobFile = (FILE *)NULL;
-    pConPriv->pPageFile = (FILE *)NULL;
-    pConPriv->pPreRasterFile = (FILE *)NULL;
-    pConPriv->pPostRasterFile = (FILE *)NULL;
-    pConPriv->pNoRasterFile = (FILE *)NULL;
-
-    pConPriv->getDocClient = (ClientPtr)NULL;
-    pConPriv->getDocBufSize = 0;
-
-    /*
-     * Get the configuration information for the context's printer
-     */
-    configFileName = XpGetOneAttribute( pCon, XPPrinterAttr,
-				       "xp-ddx-config-file-name" );
-    if(configFileName && strlen(configFileName))
-    {
-        if( configFileName[0] == '/' )
-            pConPriv->config = XrmGetFileDatabase( configFileName );
-        else
-        {
-	    char *configDir, *configFilePath;
-
-	    configDir = XpGetConfigDir(FALSE);
-            configFilePath = (char *)malloc((strlen(configDir) +
-					     strlen(DDX_DIR) +
-					     strlen(RASTER_DRIV_NAME) +
-					     strlen(configFileName) +
-					     4)* sizeof(char));
-	    sprintf(configFilePath, "%s/%s/%s/%s", configDir, DDX_DIR,
-		    RASTER_DRIV_NAME, configFileName);
-	    pConPriv->config = XrmGetFileDatabase(configFilePath);
-	    free(configDir);
-	    free(configFilePath);
-        }
-    }
-    else
-	pConPriv->config = (XrmDatabase)NULL;
-
-    /*
-     * Add our own attribute initialization
-     */
-    /*
-     * document-attributes-supported
-     */
-    val = XpGetOneAttribute(pCon, XPServerAttr, "document-attributes-supported");
-    if((attrStr = (char *)xalloc(strlen(val) + strlen(DOC_ATT_SUPP) + 4)) == 
-       (char *)NULL)
-	return BadAlloc;
-    sprintf(attrStr, "*%s %s", DOC_ATT_SUPP, val);
-    XpAugmentAttributes(pCon, XPPrinterAttr, attrStr);
-    xfree(attrStr);
-
-    /*
-     * job-attributes-supported
-     */
-    val = XpGetOneAttribute(pCon, XPServerAttr, "job-attributes-supported");
-    if((attrStr = (char *)xalloc(strlen(val) + strlen(JOB_ATT_SUPP) + 4)) == 
-       (char *)NULL)
-	return BadAlloc;
-    sprintf(attrStr, "*%s %s", JOB_ATT_SUPP, val);
-    XpAugmentAttributes(pCon, XPPrinterAttr, attrStr);
-    xfree(attrStr);
-
-    /*
-     * PageAttributesSupported
-     */
-    XpAugmentAttributes(pCon, XPPrinterAttr, "*xp-page-attributes-supported:");
-    
-    return Success;
-}
-
-    
-
-static Bool
-RasterDestroyContext(
-     XpContextPtr pCon)
-{
-    RasterContextPrivPtr pConPriv = (RasterContextPrivPtr)
-	dixLookupPrivate(&pCon->devPrivates, RasterContextPrivateKey);
-    
-    /*
-     * Clean up the temporary files
-     */
-    FreePageFiles( pConPriv );
-    
-    if( pConPriv->pJobFile != (FILE *)NULL )
-      {
-	  fclose( pConPriv->pJobFile );
-	  pConPriv->pJobFile = (FILE *)NULL;
-      }
-    if( pConPriv->jobFileName != (char *)NULL )
-      {
-	  unlink( pConPriv->jobFileName );
-	  Xfree( pConPriv->jobFileName );
-      }
-    if(pConPriv->config)
-    {
-	XrmDestroyDatabase(pConPriv->config);
-	pConPriv->config = (XrmDatabase)NULL;
-    }
-
-    XpDestroyAttributes( pCon );
-    return Success;
-}
-
-static char *
-RasterGetAttributes(
-     XpContextPtr pContext,
-     XPAttributes class)
-{
-    return XpGetAttributes( pContext, class );
-}
-
-static char *
-RasterGetOneAttribute(
-     XpContextPtr pContext,
-     XPAttributes class,
-     char *attr)
-{
-    return XpGetOneAttribute( pContext, class, attr );
-}
-
-static int 
-RasterSetAttributes(XpContextPtr pCon,
-    XPAttributes class,
-    char *attributes)
-{
-    return XpSetAttributes( pCon, class, attributes );
-}
-
-static int
-RasterAugmentAttributes(
-     XpContextPtr pCon,
-     XPAttributes class,
-     char *attributes)
-{
-    return XpAugmentAttributes( pCon, class, attributes );
-}
-
-static void
-FreePageFiles(
-    RasterContextPrivPtr pConPriv)
-{
-    if(pConPriv->pPageFile != (FILE *)NULL)
-    {
-        fclose(pConPriv->pPageFile);
-        pConPriv->pPageFile = (FILE *)NULL;
-    }
-    if(pConPriv->pageFileName != (char *)NULL)
-    {
-	unlink(pConPriv->pageFileName);
-        Xfree(pConPriv->pageFileName);
-        pConPriv->pageFileName = (char *)NULL;
-    }
-    if(pConPriv->pPreRasterFile != (FILE *)NULL)
-    {
-        fclose(pConPriv->pPreRasterFile);
-        pConPriv->pPreRasterFile = (FILE *)NULL;
-    }
-    if(pConPriv->preRasterFileName != (char *)NULL)
-    {
-	unlink(pConPriv->preRasterFileName);
-	Xfree(pConPriv->preRasterFileName);
-	pConPriv->preRasterFileName = (char *)NULL;
-    }
-    if(pConPriv->pPostRasterFile != (FILE *)NULL)
-    {
-        fclose(pConPriv->pPostRasterFile);
-        pConPriv->pPostRasterFile = (FILE *)NULL;
-    }
-    if(pConPriv->postRasterFileName != (char *)NULL)
-    {
-	unlink(pConPriv->postRasterFileName);
-	Xfree(pConPriv->postRasterFileName);
-	pConPriv->postRasterFileName = (char *)NULL;
-    }
-    if(pConPriv->pNoRasterFile != (FILE *)NULL)
-    {
-        fclose(pConPriv->pNoRasterFile);
-        pConPriv->pNoRasterFile = (FILE *)NULL;
-    }
-    if(pConPriv->noRasterFileName != (char *)NULL)
-    {
-	unlink(pConPriv->noRasterFileName);
-	Xfree(pConPriv->noRasterFileName);
-	pConPriv->noRasterFileName = (char *)NULL;
-    }
-}
-
-/*
- * RasterCloseScreen - Call any wrapped CloseScreen function,
- * and free the screen memory.
- */
-static Bool 
-RasterCloseScreen(
-    int index,
-    ScreenPtr pScreen)
-{
-    Bool status = Success;
-    RasterScreenPrivPtr pScreenPriv = (RasterScreenPrivPtr) 
-	dixLookupPrivate(&pScreen->devPrivates, RasterScreenPrivateKey);
-    
-    /*
-     * Call any wrapped CloseScreen proc.
-     */
-    if(pScreenPriv->CloseScreen != NULL)
-    {
-        pScreen->CloseScreen = pScreenPriv->CloseScreen;
-        status = pScreen->CloseScreen(index, pScreen);
-        pScreen->CloseScreen = RasterCloseScreen;
-    }
-
-    Xfree(pScreenPriv->pBits);
-    Xfree(pScreenPriv);
-
-    return status;
-}
-
-#include <signal.h>
-
-/* ARGSUSED */
-static void SigchldHndlr (int dummy)
-{
-    int   status;
-    int   olderrno = errno;
-    struct sigaction act;
-    sigfillset(&act.sa_mask);
-    act.sa_flags = 0;
-    act.sa_handler = SigchldHndlr;
-
-    (void) wait (&status);
-
-    /*
-     * Is this really necessary?
-     */
-    sigaction(SIGCHLD, &act, (struct sigaction *)NULL);
-    errno = olderrno;
-}
-
-/*
- * SystemCmd provides a wrapper for the 'system' library call.  The call
- * appears to be sensitive to the handling of SIGCHLD, so this wrapper
- * sets the status to SIG_DFL, and then resets the established handler
- * after system returns.
- */
-static int
-SystemCmd(char *cmdStr)
-{
-    int status;
-    struct sigaction newAct, oldAct;
-    sigfillset(&newAct.sa_mask);
-    newAct.sa_flags = 0;
-    newAct.sa_handler = SIG_DFL;
-    sigfillset(&oldAct.sa_mask);
-    oldAct.sa_flags = 0;
-    oldAct.sa_handler = SigchldHndlr;
-
-    /*
-     * get the old handler, and set the action to IGN
-     */
-    sigaction(SIGCHLD, &newAct, &oldAct);
-
-    status = system (cmdStr);
-
-    sigaction(SIGCHLD, &oldAct, (struct sigaction *)NULL);
-    return status;
-}
-
-/*
- * RasterMediumDimensions is installed in the GetMediumDimensions field
- * of each raster-initialized context.
- */
-static int
-RasterMediumDimensions(XpContextPtr pCon, 
-		       CARD16 *width,
-		       CARD16 *height)
-{
-    XpGetMediumDimensions(pCon, width, height);
-    return Success;
-}
-
-/*
- * RasterReproducibleArea is installed in the GetReproducibleArea field
- * of each raster-initialized context.
- */
-static int 
-RasterReproducibleArea(XpContextPtr pCon, 
-		       xRectangle *pRect)
-{
-    XpGetReproductionArea(pCon, pRect);
-    return Success;
-}
diff --git a/hw/xprint/raster/Raster.h b/hw/xprint/raster/Raster.h
deleted file mode 100644
index 7a613f0..0000000
--- a/hw/xprint/raster/Raster.h
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
-(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:		printer/Raster.h
-**    *
-**    *  Contents:  defines and includes for the raster layer
-**    *             for a printing X server.
-**    *
-**    *  Copyright:	Copyright 1993 Hewlett-Packard Company
-**    *
-**    *********************************************************
-** 
-********************************************************************/
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#ifndef _RASTER_H_
-#define _RASTER_H_
-
-/*
- * Some sleazes to force the XrmDB stuff into the server
- */
-#ifndef HAVE_XPointer
-#define HAVE_XPointer 1
-typedef char *XPointer;
-#endif
-#define Status int
-#define True 1
-#define False 0
-#include "misc.h"
-#include <X11/Xfuncproto.h>
-#include <X11/Xresource.h>
-#include "attributes.h"
-
-#include <X11/extensions/Printstr.h>
-
-#define MAX_TOKEN_LEN 512
-
-#define RASTER_PRINT_PAGE_COMMAND	"_XP_RASTER_PAGE_PROC_COMMAND"
-
-#define RASTER_IN_FILE_STRING		"%(InFile)%"
-#define RASTER_OUT_FILE_STRING		"%(OutFile)%"
-
-#define RASTER_ALLOWED_COMMANDS_FILE	"printCommands"
-
-/*
- * Defines for the "options" in DtPrintDocumentData.
- */
-#define PRE_RASTER	"PRE-RASTER"
-#define POST_RASTER	"POST-RASTER"
-#define NO_RASTER	"NO-RASTER"
-
-
-typedef struct {
-    char *pBits;
-    CreateWindowProcPtr CreateWindow;
-    ChangeWindowAttributesProcPtr ChangeWindowAttributes;
-    DestroyWindowProcPtr DestroyWindow;
-    CloseScreenProcPtr CloseScreen;
-} RasterScreenPrivRec, *RasterScreenPrivPtr;
-
-typedef struct {
-    XrmDatabase config;
-    char *jobFileName;
-    FILE *pJobFile;
-    char *pageFileName;
-    FILE *pPageFile;
-    char *preRasterFileName; /* Pre-raster document data */
-    FILE *pPreRasterFile;
-    char *noRasterFileName; /* Raster replacement document data */
-    FILE *pNoRasterFile;
-    char *postRasterFileName; /* Post-raster document data */
-    FILE *pPostRasterFile;
-    ClientPtr getDocClient;
-    int getDocBufSize;
-} RasterContextPrivRec, *RasterContextPrivPtr;
-
-
-extern XpValidatePoolsRec RasterValidatePoolsRec;
-
-extern Bool InitializeRasterDriver(int ndx, ScreenPtr pScreen, int argc,
-                                  char **argv);
-
-#endif  /* _RASTER_H_ */
diff --git a/hw/xprint/raster/RasterAttVal.c b/hw/xprint/raster/RasterAttVal.c
deleted file mode 100644
index 8189be4..0000000
--- a/hw/xprint/raster/RasterAttVal.c
+++ /dev/null
@@ -1,267 +0,0 @@
-/*
-(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.
-*/
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#include <stdio.h>
-#include <X11/X.h>
-#include "misc.h"
-#include "dixstruct.h"
-#include "scrnintstr.h"
-#include "screenint.h"
-#include <X11/extensions/Print.h>
-#include "Raster.h"
-
-#include "attributes.h"
-#include "AttrValid.h"
-
-/*
- * define valid values and defaults for Printer pool
- */
-static XpOid ValidContentOrientationsOids[] = {
-    xpoid_val_content_orientation_portrait,
-    xpoid_val_content_orientation_landscape
-};
-static XpOidList ValidContentOrientations = {
-    ValidContentOrientationsOids, XpNumber(ValidContentOrientationsOids)
-};
-
-static XpOid DefaultContentOrientationsOids[] = {
-    xpoid_val_content_orientation_portrait,
-    xpoid_val_content_orientation_landscape
-};
-static XpOidList DefaultContentOrientations = {
-    DefaultContentOrientationsOids, XpNumber(DefaultContentOrientationsOids)
-};
-
-static XpOid ValidPlexesOids[] = {
-    xpoid_val_plex_simplex
-};
-static XpOidList ValidPlexes = {
-    ValidPlexesOids, XpNumber(ValidPlexesOids)
-};
-
-static XpOid DefaultPlexesOids[] = {
-    xpoid_val_plex_simplex
-};
-static XpOidList DefaultPlexes = {
-    DefaultPlexesOids, XpNumber(DefaultPlexesOids)
-};
-
-static unsigned long ValidPrinterResolutionsCards[] = {
-    150, 300, 600
-};
-static XpOidCardList ValidPrinterResolutions = {
-    ValidPrinterResolutionsCards, XpNumber(ValidPrinterResolutionsCards)
-};
-
-static unsigned long DefaultPrinterResolutionsCards[] = {
-    300
-};
-static XpOidCardList DefaultPrinterResolutions = {
-    DefaultPrinterResolutionsCards, XpNumber(DefaultPrinterResolutionsCards)
-};
-
-static XpOid ValidListfontsModesOids[] = {
-    xpoid_val_xp_list_glyph_fonts
-};
-static XpOidList ValidListfontsModes = {
-    ValidListfontsModesOids, XpNumber(ValidListfontsModesOids)
-};
-
-static XpOid DefaultListfontsModesOids[] = {
-    xpoid_val_xp_list_glyph_fonts
-};
-static XpOidList DefaultListfontsModes = {
-    DefaultListfontsModesOids, XpNumber(DefaultListfontsModesOids)
-};
-
-static XpOid ValidSetupProvisoOids[] = {
-    xpoid_val_xp_setup_mandatory, xpoid_val_xp_setup_optional
-};
-static XpOidList ValidSetupProviso = {
-    ValidSetupProvisoOids, XpNumber(ValidSetupProvisoOids)
-};
-
-static XpOidDocFmt ValidDocFormatsSupportedFmts[] = {
-    { "Postscript", "2", NULL },
-    { "PCL", "3", NULL }
-};
-static XpOidDocFmtList ValidDocFormatsSupported = {
-    ValidDocFormatsSupportedFmts, XpNumber(ValidDocFormatsSupportedFmts)
-};
-
-static XpOidDocFmt DefaultDocFormatsSupportedFmts[] = {
-    { "Postscript", "2", NULL }
-};
-static XpOidDocFmtList DefaultDocFormatsSupported = {
-    DefaultDocFormatsSupportedFmts, XpNumber(DefaultDocFormatsSupportedFmts)
-};
-
-static XpOidDocFmtList ValidEmbeddedFormatsSupported = {
-    (XpOidDocFmt *)NULL, 0
-};
-
-static XpOidDocFmtList DefaultEmbeddedFormatsSupported = {
-    (XpOidDocFmt *)NULL, 0
-};
-
-static XpOidDocFmt ValidRawFormatsSupportedFmts[] = {
-    { "Postscript", "2", NULL },
-    { "PCL", "3", NULL }
-};
-static XpOidDocFmtList ValidRawFormatsSupported = {
-    ValidRawFormatsSupportedFmts, XpNumber(ValidRawFormatsSupportedFmts)
-};
-
-static XpOidDocFmt DefaultRawFormatsSupportedFmts[] = {
-    { "Postscript", "2", NULL }
-};
-static XpOidDocFmtList DefaultRawFormatsSupported = {
-    DefaultRawFormatsSupportedFmts, XpNumber(DefaultRawFormatsSupportedFmts)
-};
-
-static XpOidList ValidInputTrays = {
-    (XpOid *)NULL, 0
-};
-
-static XpOid ValidMediumSizesOids[] = {
-    xpoid_val_medium_size_iso_a0,
-    xpoid_val_medium_size_iso_a1,
-    xpoid_val_medium_size_iso_a2,
-    xpoid_val_medium_size_iso_a3,
-    xpoid_val_medium_size_iso_a4,
-    xpoid_val_medium_size_iso_a5,
-    xpoid_val_medium_size_iso_a6,
-    xpoid_val_medium_size_iso_a7,
-    xpoid_val_medium_size_iso_a8,
-    xpoid_val_medium_size_iso_a9,
-    xpoid_val_medium_size_iso_a10,
-    xpoid_val_medium_size_iso_b0,
-    xpoid_val_medium_size_iso_b1,
-    xpoid_val_medium_size_iso_b2,
-    xpoid_val_medium_size_iso_b3,
-    xpoid_val_medium_size_iso_b4,
-    xpoid_val_medium_size_iso_b5,
-    xpoid_val_medium_size_iso_b6,
-    xpoid_val_medium_size_iso_b7,
-    xpoid_val_medium_size_iso_b8,
-    xpoid_val_medium_size_iso_b9,
-    xpoid_val_medium_size_iso_b10,
-    xpoid_val_medium_size_na_letter,
-    xpoid_val_medium_size_na_legal,
-    xpoid_val_medium_size_executive,
-    xpoid_val_medium_size_folio,
-    xpoid_val_medium_size_invoice,
-    xpoid_val_medium_size_ledger,
-    xpoid_val_medium_size_quarto,
-    xpoid_val_medium_size_iso_c3,
-    xpoid_val_medium_size_iso_c4,
-    xpoid_val_medium_size_iso_c5,
-    xpoid_val_medium_size_iso_c6,
-    xpoid_val_medium_size_iso_designated_long,
-    xpoid_val_medium_size_na_10x13_envelope,
-    xpoid_val_medium_size_na_9x12_envelope,
-    xpoid_val_medium_size_na_number_10_envelope,
-    xpoid_val_medium_size_na_7x9_envelope,
-    xpoid_val_medium_size_na_9x11_envelope,
-    xpoid_val_medium_size_na_10x14_envelope,
-    xpoid_val_medium_size_na_number_9_envelope,
-    xpoid_val_medium_size_monarch_envelope,
-    xpoid_val_medium_size_a,
-    xpoid_val_medium_size_b,
-    xpoid_val_medium_size_c,
-    xpoid_val_medium_size_d,
-    xpoid_val_medium_size_e,
-    xpoid_val_medium_size_jis_b0,
-    xpoid_val_medium_size_jis_b1,
-    xpoid_val_medium_size_jis_b2,
-    xpoid_val_medium_size_jis_b3,
-    xpoid_val_medium_size_jis_b4,
-    xpoid_val_medium_size_jis_b5,
-    xpoid_val_medium_size_jis_b6,
-    xpoid_val_medium_size_jis_b7,
-    xpoid_val_medium_size_jis_b8,
-    xpoid_val_medium_size_jis_b9,
-    xpoid_val_medium_size_jis_b10
-};
-static XpOidList ValidMediumSizes = {
-    ValidMediumSizesOids, XpNumber(ValidMediumSizesOids)
-};
-
-static XpOidDocFmt DefaultDocumentFormat = {
-    "Postscript", "2", NULL
-};
-
-static XpOid ValidAvailableCompressionsOids[] = {
-    xpoid_val_available_compressions_0,
-    xpoid_val_available_compressions_01,
-    xpoid_val_available_compressions_02,
-    xpoid_val_available_compressions_03,
-    xpoid_val_available_compressions_012,
-    xpoid_val_available_compressions_013,
-    xpoid_val_available_compressions_023,
-    xpoid_val_available_compressions_0123
-};
-
-static XpOidList ValidAvailableCompressions = {
-    ValidAvailableCompressionsOids, XpNumber(ValidAvailableCompressionsOids)
-};
-
-static XpOid DefaultAvailableCompressionsOids[] = {
-    xpoid_val_available_compressions_0123,
-    xpoid_val_available_compressions_0
-};
-
-static XpOidList DefaultAvailableCompressions = {
-    DefaultAvailableCompressionsOids, XpNumber(DefaultAvailableCompressionsOids)
-};
-
-
-/*
- * init struct for XpValidate*Pool
- */
-XpValidatePoolsRec RasterValidatePoolsRec = {
-    &ValidContentOrientations, &DefaultContentOrientations,
-    &ValidDocFormatsSupported, &DefaultDocFormatsSupported,
-    &ValidInputTrays, &ValidMediumSizes,
-    &ValidPlexes, &DefaultPlexes,
-    &ValidPrinterResolutions, &DefaultPrinterResolutions,
-    &ValidEmbeddedFormatsSupported, &DefaultEmbeddedFormatsSupported,
-    &ValidListfontsModes, &DefaultListfontsModes,
-    &ValidRawFormatsSupported, &DefaultRawFormatsSupported,
-    &ValidSetupProviso,
-    &DefaultDocumentFormat,
-    &ValidAvailableCompressions, &DefaultAvailableCompressions
-};
diff --git a/hw/xprint/spooler.c b/hw/xprint/spooler.c
deleted file mode 100644
index 69b5eed..0000000
--- a/hw/xprint/spooler.c
+++ /dev/null
@@ -1,202 +0,0 @@
-/*
-Copyright (c) 2003-2004 Roland Mainz <roland.mainz at nrubsig.org>
-Copyright (c) 2004      Sun Microsystems, Inc.
-
-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.
-*/
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#include <unistd.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <ctype.h>
-#include <signal.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <string.h>
-#ifdef __hpux
-#include <sys/sysmacros.h>
-#endif
-
-#include "spooler.h"
-
-/*
- * The string LIST_QUEUES_* is fed to a shell to generate an ordered
- * list of available printers on the system. These string definitions
- * are taken from the file PrintSubSys.C within the code for the 
- * dtprintinfo program.
- */
-#define LIST_QUEUES_AIX4 \
-  "lsallq | grep -v '^bsh$' | sort | uniq"
-
-#define LIST_QUEUES_HPUX \
-  "LANG=C lpstat -v | " \
-  "awk '" \
-  " $2 == \"for\" " \
-  "   { " \
-  "      x = match($3, /:/); " \
-  "      print substr($3, 1, x-1)" \
-  "   }' | sort | uniq"
-
-#define LIST_QUEUES_OSF \
-  "LANG=C lpstat -v | " \
-  "nawk '" \
-  " $2 == \"for\"    " \
-  "   { print $4 }' " \
-  "   | sort | uniq"
-
-#define LIST_QUEUES_UXP \
-  "LANG=C lpstat -v |" \
-  "nawk '" \
-  " $4 == \"for\" " \
-  "   { " \
-  "      x = match($5, /:/); " \
-  "      print substr($5, 1, x-1)" \
-  "   }' | sort | uniq"
-
-/* Support both normal and LPRng output of "lpc status" */
-#define LIST_QUEUES_BSD \
-  "PATH=\"${PATH}:/usr/bin:/usr/sbin:/bin:/sbin\"\n" \
-  "export PATH\n" \
-  \
-  "which_tool()\n" \
-  "{\n" \
-  "  echo \"${PATH}\" | tr \":\" \"\n\" | while read i ; do ls -1ad \"${i}/${1}\" 2>/dev/null ; done\n" \
-  "}\n" \
-  \
-  "(\n" \
-  "WHICH_LPC=\"`which_tool lpc`\"\n" \
-  \
-  "if [ \"`which_tool nawk`\" != \"\" ] ; then\n" \
-  "    NAWK=\"nawk\"\n" \
-  "else\n" \
-  "    NAWK=\"awk\"\n" \
-  "fi\n" \
-  \
-  "[ \"${WHICH_LPC}\"    != \"\" ] && (LANG=C lpc status    | ${NAWK} '/^[^ ]*:$/    && !/@/   && !/ / { print $1 }' | sed -e /:/s///)\n" \
-  "[ \"${WHICH_LPC}\"    != \"\" ] && (LANG=C lpc -a status | ${NAWK} '/^[^ ]*@[^ ]/ && !/:$/          { split( $1, name, \"@\" ); print name[1]; }')\n" \
-  ") | egrep -v -i \" |^all$\" | sort | uniq"
-
-#define LIST_QUEUES_SYSV \
-  "PATH=\"${PATH}:/usr/bin:/usr/sbin:/bin:/sbin\"\n" \
-  "export PATH\n" \
-  \
-  "which_tool()\n" \
-  "{\n" \
-  "  echo \"${PATH}\" | tr \":\" \"\n\" | while read i ; do ls -1ad \"${i}/${1}\" 2>/dev/null ; done\n" \
-  "}\n" \
-  \
-  "(\n" \
-  "WHICH_LPSTAT=\"`which_tool lpstat`\"\n" \
-  \
-  "if [ \"`which_tool nawk`\" != \"\" ] ; then\n" \
-  "    NAWK=\"nawk\"\n" \
-  "else\n" \
-  "    NAWK=\"awk\"\n" \
-  "fi\n" \
-  \
-  "[ \"${WHICH_LPSTAT}\" != \"\" ] && (LANG=C lpstat -v     | ${NAWK} ' $2 == \"for\" { x = match($3, /:/); print substr($3, 1, x-1)   }')\n" \
-  ") | egrep -v -i \" |^all$\" | sort | uniq"
-
-#define LIST_QUEUES_SOLARIS "LANG=C lpget -k description " \
-  "`lpstat -v " \
-    "| nawk '$2 == \"for\" { x = match($3, /:/); print substr($3, 1,x-1) }' " \
-    "| sort -u` " \
-  "| nawk -F: ' NF == 2 { name=$1 } " \
-             " NF == 1 { sub(\"^.*description\\( - undefined|=\\)\",\"\"); " \
-                        " printf \"%s\txp-printerattr.descriptor=%s\\n\",  name, $1 } '"
-
-#define LIST_QUEUES_OTHER \
-  "LANG=C lpstat -v | " \
-  "nawk '" \
-  " $2 == \"for\" " \
-  "   { " \
-  "      x = match($3, /:/); " \
-  "      print substr($3, 1, x-1)" \
-  "   }' | sort | uniq"
-  
-#define DEFAULT_SPOOL_COMMAND_HPUX      "/usr/bin/lp -d %printer-name% -o raw -n %copy-count% -t %job-name% %options%"
-#define DEFAULT_SPOOL_COMMAND_BSD       "/usr/bin/lpr -P %printer-name% -#%copy-count% -T %job-name% %options%"
-#define DEFAULT_SPOOL_COMMAND_SYSV      "/usr/bin/lp -d %printer-name% -n %copy-count% -t %job-name% %options%"
-#define DEFAULT_SPOOL_COMMAND_SOLARIS   "/usr/bin/lp -d %printer-name% -n %copy-count% -t %job-name% %options%"
-#define DEFAULT_SPOOL_COMMAND_OTHER     "/usr/bin/lp -d %printer-name% -n %copy-count% -t %job-name% %options%"
-
-
-/* List of spooler types and the commands used to enumerate
- * print queues and submit print jobs */
-XpSpoolerType xpstm[] =
-{
-  /* OS-specific spoolers */
-  { "aix",      LIST_QUEUES_AIX4,       DEFAULT_SPOOL_COMMAND_OTHER      },
-  { "aix4",     LIST_QUEUES_AIX4,       DEFAULT_SPOOL_COMMAND_OTHER      },
-  { "bsd",      LIST_QUEUES_BSD,        DEFAULT_SPOOL_COMMAND_BSD        },
-  { "osf",      LIST_QUEUES_OSF,        DEFAULT_SPOOL_COMMAND_OTHER      },
-  { "solaris",  LIST_QUEUES_SOLARIS,    DEFAULT_SPOOL_COMMAND_SOLARIS    },
-  { "sysv",     LIST_QUEUES_SYSV,       DEFAULT_SPOOL_COMMAND_SYSV       },
-  { "uxp",      LIST_QUEUES_UXP,        DEFAULT_SPOOL_COMMAND_OTHER      },
-  /* crossplatform spoolers */
-  { "cups",     LIST_QUEUES_SYSV,       DEFAULT_SPOOL_COMMAND_SYSV       },
-  { "lprng",    LIST_QUEUES_BSD,        DEFAULT_SPOOL_COMMAND_BSD        },
-  /* misc */
-  { "other",    LIST_QUEUES_OTHER,      DEFAULT_SPOOL_COMMAND_OTHER      },
-  { "none",     NULL,                   NULL                             },
-  { NULL,       NULL,                   NULL                             }
-};
-
-/* Used by Init.c and attributes.c */
-XpSpoolerTypePtr spooler_type = NULL;
-
-XpSpoolerTypePtr XpSpoolerNameToXpSpoolerType(char *name)
-{
-  XpSpoolerTypePtr curr = xpstm;
-  
-  while( curr->name != NULL )
-  {
-    if( !strcasecmp(name, curr->name) )
-      return curr;
-      
-    curr++;
-  }
-  
-  return NULL;
-}
-
-static char *spooler_namelist = NULL;
-
-char *XpGetSpoolerTypeNameList(void)
-{
-  if( spooler_namelist )
-    return spooler_namelist;
-  
-  return XPDEFAULTSPOOLERNAMELIST;
-}
-
-void XpSetSpoolerTypeNameList(char *namelist)
-{
-  spooler_namelist = namelist;
-}
-
-
diff --git a/hw/xprint/spooler.h b/hw/xprint/spooler.h
deleted file mode 100644
index 4e056ce..0000000
--- a/hw/xprint/spooler.h
+++ /dev/null
@@ -1,75 +0,0 @@
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#ifndef SPOOLER_H
-#define SPOOLER_H 1
-
-/*
-Copyright (c) 2003-2004 Roland Mainz <roland.mainz at nrubsig.org>
-
-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.
-*/
-
-/*
- * Define platform-specific default spooler type
- */
-#if defined(sun)
-#define XPDEFAULTSPOOLERNAMELIST "solaris"
-#elif defined(AIXV4)
-#define XPDEFAULTSPOOLERNAMELIST "aix4"
-#elif defined(hpux)
-#define XPDEFAULTSPOOLERNAMELIST "hpux"
-#elif defined(__osf__)
-#define XPDEFAULTSPOOLERNAMELIST "osf"
-#elif defined(__uxp__)
-#define XPDEFAULTSPOOLERNAMELIST "uxp"
-#elif defined(CSRG_BASED) || defined(linux)
-/* ToDo: This should be "cups:bsd" in the future, but for now
- * the search order first-bsd-then-cups is better for backwards
- * compatibility.
- */
-#define XPDEFAULTSPOOLERNAMELIST "bsd:cups"
-#else
-#define XPDEFAULTSPOOLERNAMELIST "other"
-#endif
-
-typedef struct
-{
-  const char  *name;
-  const char  *list_queues_command;
-  const char  *spool_command;
-} XpSpoolerType, *XpSpoolerTypePtr;
-
-/* prototypes */
-extern XpSpoolerTypePtr  XpSpoolerNameToXpSpoolerType(char *name);
-extern void              XpSetSpoolerTypeNameList(char *namelist);
-extern char             *XpGetSpoolerTypeNameList(void);
-
-/* global vars */
-extern XpSpoolerTypePtr  spooler_type;
-extern XpSpoolerType     xpstm[];
-
-#endif /* !SPOOLER_H */
-
diff --git a/include/dix.h b/include/dix.h
index 0790f58..8e79d4c 100644
--- a/include/dix.h
+++ b/include/dix.h
@@ -116,9 +116,6 @@ typedef struct _Client *ClientPtr; /* also in misc.h */
 
 typedef struct _WorkQueue	*WorkQueuePtr;
 
-#ifdef XPRINT
-extern ClientPtr requestingClient;
-#endif
 extern ClientPtr *clients;
 extern ClientPtr serverClient;
 extern int currentMaxClients;
diff --git a/mi/miinitext.c b/mi/miinitext.c
index 8689ee4..9a87360 100644
--- a/mi/miinitext.c
+++ b/mi/miinitext.c
@@ -88,34 +88,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 FONTCACHE
-#undef COMPOSITE
-#undef DAMAGE
-#undef XFIXES
-#undef XEVIE
-#else
-#ifndef LOADABLEPRINTDDX
-#undef XPRINT
-#endif /* LOADABLEPRINTDDX */
-#endif /* PRINT_ONLY_SERVER */
-
-
 extern Bool noTestExtensions;
 
 #ifdef BIGREQS
@@ -228,9 +200,6 @@ typedef void (*InitExtension)(INITARGS);
 #ifdef XKB
 #include <X11/extensions/XKB.h>
 #endif
-#ifdef XPRINT
-#include <X11/extensions/Print.h>
-#endif
 #ifdef XCSECURITY
 #include "securitysrv.h"
 #include <X11/extensions/securstr.h>
@@ -304,9 +273,6 @@ extern void SecurityExtensionInit(INITARGS);
 #ifdef XSELINUX
 extern void SELinuxExtensionInit(INITARGS);
 #endif
-#ifdef XPRINT
-extern void XpExtensionInit(INITARGS);
-#endif
 #ifdef XF86BIGFONT
 extern void XFree86BigfontExtensionInit(INITARGS);
 #endif
@@ -495,7 +461,7 @@ InitExtensions(argc, argv)
     char	*argv[];
 {
 #ifdef PANORAMIX
-# if !defined(PRINT_ONLY_SERVER) && !defined(NO_PANORAMIX)
+# if !defined(NO_PANORAMIX)
   if (!noPanoramiXExtension) PanoramiXExtensionInit();
 # endif
 #endif
@@ -526,7 +492,7 @@ InitExtensions(argc, argv)
 #ifdef XTRAP
     if (!noTestExtensions) DEC_XTRAPInit();
 #endif
-#if defined(SCREENSAVER) && !defined(PRINT_ONLY_SERVER)
+#if defined(SCREENSAVER)
     if (!noScreenSaverExtension) ScreenSaverExtensionInit ();
 #endif
 #ifdef XV
@@ -538,7 +504,7 @@ InitExtensions(argc, argv)
 #ifdef XSYNC
     if (!noSyncExtension) SyncExtensionInit();
 #endif
-#if defined(XKB) && !defined(PRINT_ONLY_SERVER)
+#if defined(XKB)
     if (!noXkbExtension) XkbExtensionInit();
 #endif
 #ifdef XCMISC
@@ -556,9 +522,6 @@ InitExtensions(argc, argv)
 #ifdef XSELINUX
     if (!noSELinuxExtension) SELinuxExtensionInit();
 #endif
-#ifdef XPRINT
-    XpExtensionInit(); /* server-specific extension, cannot be disabled */
-#endif
 #if defined(DPMSExtension) && !defined(NO_HW_ONLY_EXTS)
     if (!noDPMSExtension) DPMSExtensionInit();
 #endif
@@ -568,7 +531,7 @@ InitExtensions(argc, argv)
 #ifdef XF86BIGFONT
     if (!noXFree86BigfontExtension) XFree86BigfontExtensionInit();
 #endif
-#if !defined(PRINT_ONLY_SERVER) && !defined(NO_HW_ONLY_EXTS)
+#if !defined(NO_HW_ONLY_EXTS)
 #if defined(XF86VIDMODE)
     if (!noXFree86VidModeExtension) XFree86VidModeExtensionInit();
 #endif
@@ -641,9 +604,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/os/utils.c b/os/utils.c
index 07296df..9aa510b 100644
--- a/os/utils.c
+++ b/os/utils.c
@@ -128,10 +128,6 @@ OR PERFORMANCE OF THIS SOFTWARE.
 #include "picture.h"
 #endif
 
-#ifdef XPRINT
-#include "DiPrint.h"
-#endif
-
 _X_EXPORT Bool noTestExtensions;
 #ifdef BIGREQS
 _X_EXPORT Bool noBigReqExtension = FALSE;
@@ -613,9 +609,6 @@ void UseMsg(void)
     ErrorF("-render [default|mono|gray|color] set render color alloc policy\n");
 #endif
     ErrorF("-s #                   screen-saver timeout (minutes)\n");
-#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");
@@ -1027,12 +1020,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 AIXV3
         else if ( strcmp( argv[i], "-timeout") == 0)
         {
commit f9fae16456c30479b0cb9317e57200af36795785
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date:   Mon May 12 10:36:44 2008 -0700

    XQuartz: Added some version checking protection so we don't trigger an infinite exec loop with new /usr/X11/bin/Xquartz and older X11.app
    (cherry picked from commit 78032815aeb10c22ff45b49702e9c9df82ab471c)

diff --git a/hw/xquartz/bundle/Info.plist b/hw/xquartz/bundle/Info.plist
index 4b0830f..30bb3c8 100644
--- a/hw/xquartz/bundle/Info.plist
+++ b/hw/xquartz/bundle/Info.plist
@@ -20,6 +20,10 @@
 		<string>APPL</string>
 	<key>CFBundleShortVersionString</key>
 		<string>2.3.0</string>
+	<key>CFBundleVersion</key>
+		<string>2.3.0</string>
+	<key>CFBundleVersionString</key>
+		<string>2.3.0</string>
 	<key>CFBundleSignature</key>
 		<string>x11a</string>
 	<key>CSResourcesFileMapped</key>
diff --git a/hw/xquartz/mach-startup/stub.c b/hw/xquartz/mach-startup/stub.c
index 70f222c..3be5f65 100644
--- a/hw/xquartz/mach-startup/stub.c
+++ b/hw/xquartz/mach-startup/stub.c
@@ -43,33 +43,55 @@ static char x11_path[PATH_MAX + 1];
 
 static void set_x11_path() {
     CFURLRef appURL = NULL;
+    CFBundleRef bundle = NULL;
     OSStatus osstatus = LSFindApplicationForInfo(kLSUnknownCreator, CFSTR(kX11AppBundleId), nil, nil, &appURL);
-    
+    UInt32 ver;
+
     switch (osstatus) {
         case noErr:
             if (appURL == NULL) {
-                fprintf(stderr, "xinit: Invalid response from LSFindApplicationForInfo(%s)\n", 
+                fprintf(stderr, "Xquartz: Invalid response from LSFindApplicationForInfo(%s)\n", 
                         kX11AppBundleId);
                 exit(1);
             }
-            
+
+            bundle = CFBundleCreate(NULL, appURL);
+            if(!bundle) {
+                fprintf(stderr, "Xquartz: Null value returned from CFBundleCreate().\n");
+                exit(2);                
+            }
+
             if (!CFURLGetFileSystemRepresentation(appURL, true, (unsigned char *)x11_path, sizeof(x11_path))) {
-                fprintf(stderr, "xinit: Error resolving URL for %s\n", kX11AppBundleId);
-                exit(2);
+                fprintf(stderr, "Xquartz: Error resolving URL for %s\n", kX11AppBundleId);
+                exit(3);
             }
-            
+
+            ver = CFBundleGetVersionNumber(bundle);
+            if(ver < 0x02308000) {
+                CFStringRef versionStr = CFBundleGetValueForInfoDictionaryKey(bundle, kCFBundleVersionKey);
+                const char * versionCStr = "Unknown";
+
+                if(versionStr) 
+                    versionCStr = CFStringGetCStringPtr(versionStr, kCFStringEncodingMacRoman);
+
+                fprintf(stderr, "Xquartz: Could not find a new enough X11.app LSFindApplicationForInfo() returned\n");
+                fprintf(stderr, "         X11.app = %s\n", x11_path);
+                fprintf(stderr, "         Version = %s (%x), Expected Version > 2.3.0\n", versionCStr, (unsigned)ver);
+                exit(9);
+            }
+
             strlcat(x11_path, kX11AppBundlePath, sizeof(x11_path));
 #ifdef DEBUG
-            fprintf(stderr, "XQuartz: X11.app = %s\n", x11_path);
+            fprintf(stderr, "Xquartz: X11.app = %s\n", x11_path);
 #endif
             break;
         case kLSApplicationNotFoundErr:
-            fprintf(stderr, "XQuartz: Unable to find application for %s\n", kX11AppBundleId);
-            exit(4);
+            fprintf(stderr, "Xquartz: Unable to find application for %s\n", kX11AppBundleId);
+            exit(10);
         default:
-            fprintf(stderr, "XQuartz: Unable to find application for %s, error code = %d\n", 
+            fprintf(stderr, "Xquartz: Unable to find application for %s, error code = %d\n", 
                     kX11AppBundleId, (int)osstatus);
-            exit(5);
+            exit(11);
     }
 }
 
commit ac4e33a9cd0ca2f0ec76181d11d5b90b82690c05
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date:   Mon May 12 09:27:27 2008 -0700

    XQuartz: More startup work... listen if we're the actual server
    (cherry picked from commit 3b0afb47c3d8ad922cb2315ed8034f4d77d4a249)

diff --git a/hw/xquartz/mach-startup/bundle-main.c b/hw/xquartz/mach-startup/bundle-main.c
index 24b67d8..b0ff9df 100644
--- a/hw/xquartz/mach-startup/bundle-main.c
+++ b/hw/xquartz/mach-startup/bundle-main.c
@@ -139,6 +139,9 @@ static void startup_trigger_thread(void *arg) {
 int main(int argc, char **argv, char **envp) {
     BOOL listenOnly = FALSE;
     int i;
+    mach_msg_size_t mxmsgsz = sizeof(union MaxMsgSize) + MAX_TRAILER_SIZE;
+    mach_port_t mp;
+    kern_return_t kr;
 
     for(i=1; i < argc; i++) {
         if(!strcmp(argv[i], "--listenonly")) {
@@ -147,6 +150,11 @@ int main(int argc, char **argv, char **envp) {
         }
     }
 
+    /* TODO: This should be unconditional once we figure out fd passing */
+    if((argc > 1 && argv[1][0] == ':') || listenOnly) {
+        mp = checkin_or_register(SERVER_BOOTSTRAP_NAME);
+    }
+
     /* Check if we need to do something other than listen, and make another
      * thread handle it.
      */
@@ -154,23 +162,20 @@ int main(int argc, char **argv, char **envp) {
         struct arg *args = (struct arg*)malloc(sizeof(struct arg));
         if(!args)
             FatalError("Could not allocate memory.\n");
-        
+
         args->argc = argc;
         args->argv = argv;
         args->envp = envp;
 
         create_thread(startup_trigger_thread, args);
-    } else {
-        /* TODO: This should actually fall through rather than be the else
-         *       case once we figure out how to get the stub to pass the
-         *       file descriptor.  For now, we only listen if we are explicitly
-         *       told to.
-         */
-
-        mach_msg_size_t mxmsgsz = sizeof(union MaxMsgSize) + MAX_TRAILER_SIZE;
-        mach_port_t mp = checkin_or_register(SERVER_BOOTSTRAP_NAME);
-        kern_return_t kr;
-        
+    }
+
+    /* TODO: This should actually fall through rather than be the else
+     *       case once we figure out how to get the stub to pass the
+     *       file descriptor.  For now, we only listen if we are explicitly
+     *       told to.
+     */
+    if((argc > 1 && argv[1][0] == ':') || listenOnly) {
         /* Main event loop */
         kr = mach_msg_server(mach_startup_server, mxmsgsz, mp, 0);
         if (kr != KERN_SUCCESS) {
@@ -179,7 +184,7 @@ int main(int argc, char **argv, char **envp) {
             exit(EXIT_FAILURE);
         }
     }
-    
+
     return EXIT_SUCCESS;
 }
 
@@ -208,7 +213,7 @@ int main(int argc, char **argv, char **envp) {
         return server_main(argc, argv, envp);
 #endif
     }
-    
+
     /* If we have a process serial number and it's our only arg, act as if
      * the user double clicked the app bundle: launch app_to_run if possible
      */
@@ -227,7 +232,7 @@ int main(int argc, char **argv, char **envp) {
             return execute(command_from_prefs("app_to_run", DEFAULT_CLIENT));
         }
     }
-    
+
     /* Start the server */
     if((s = getenv("DISPLAY"))) {
         fprintf(stderr, "X11.app: Could not connect to server (DISPLAY=\"%s\", unsetting).  Starting X server.\n", s);
commit a7800d9355377ac02833613c2ffc2423beec9970
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date:   Fri May 9 16:44:31 2008 -0700

    XQuartz: Starting to work on the new Mach IPC startup stuff for better launchd, ApplicationServices, and Dock support
    (cherry picked from commit 9b67fca9b7d3050d3d5582a5210270db7eb2ed05)

diff --git a/.gitignore b/.gitignore
index d6d7adf..13d5de4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -278,6 +278,10 @@ hw/xprint/doc/Xprt.1x
 hw/xprint/doc/Xprt.man
 hw/xprint/dpmsstubs-wrapper.c
 hw/xprint/miinitext-wrapper.c
+hw/xquartz/mach-startup/mach_startup.h
+hw/xquartz/mach-startup/mach_startupServer.c
+hw/xquartz/mach-startup/mach_startupServer.h
+hw/xquartz/mach-startup/mach_startupUser.c
 hw/xquartz/mach-startup/X11
 hw/xquartz/mach-startup/Xquartz
 hw/xquartz/doc/Xquartz.1
diff --git a/hw/xquartz/mach-startup/Makefile.am b/hw/xquartz/mach-startup/Makefile.am
index 9668711..ee2cbfe 100644
--- a/hw/xquartz/mach-startup/Makefile.am
+++ b/hw/xquartz/mach-startup/Makefile.am
@@ -5,9 +5,13 @@ AM_CPPFLAGS = \
 x11appdir = $(APPLE_APPLICATIONS_DIR)/X11.app/Contents/MacOS
 x11app_PROGRAMS = X11
 
-X11_SOURCES = \
+dist_X11_SOURCES = \
 	bundle-main.c
 
+nodist_X11_SOURCES = \
+	mach_startupServer.c \
+	mach_startupUser.c
+
 X11_LDADD = \
 	$(top_builddir)/hw/xquartz/libXquartz.la \
 	$(top_builddir)/hw/xquartz/xpr/libXquartzXpr.la \
@@ -27,8 +31,28 @@ X11_LDFLAGS =  \
 
 bin_PROGRAMS = Xquartz
 
-Xquartz_SOURCES = \
+dist_Xquartz_SOURCES = \
 	stub.c
 
+nodist_Xquartz_SOURCES = \
+	mach_startupUser.c
+
 Xquartz_LDFLAGS =  \
 	-Wl,-framework,CoreServices
+
+BUILT_SOURCES = \
+	mach_startupServer.c \
+	mach_startupUser.c \
+	mach_startupServer.h \
+	mach_startup.h
+
+CLEANFILES = \
+	$(BUILT_SOURCES)
+
+$(BUILT_SOURCES): mach_startup.defs
+	mig -sheader mach_startupServer.h mach_startup.defs
+
+EXTRA_DIST = \
+	mach_startup.defs \
+	mach_startup_types.h
+
diff --git a/hw/xquartz/mach-startup/bundle-main.c b/hw/xquartz/mach-startup/bundle-main.c
index 042fa3a..24b67d8 100644
--- a/hw/xquartz/mach-startup/bundle-main.c
+++ b/hw/xquartz/mach-startup/bundle-main.c
@@ -33,9 +33,16 @@
 #include <stdio.h>
 #include <string.h>
 #include <stdlib.h>
+#include <pthread.h>
 
 #include <CoreFoundation/CoreFoundation.h>
 
+#include <mach/mach.h>
+#include <mach/mach_error.h>
+#include <servers/bootstrap.h>
+#include "mach_startup.h"
+#include "mach_startupServer.h"
+
 #define DEFAULT_CLIENT "/usr/X11/bin/xterm"
 #define DEFAULT_STARTX "/usr/X11/bin/startx"
 #define DEFAULT_SHELL  "/bin/sh"
@@ -43,12 +50,146 @@
 static int execute(const char *command);
 static char *command_from_prefs(const char *key, const char *default_value);
 
+/* This is in quartzStartup.c */
 int server_main(int argc, char **argv, char **envp);
 
+struct arg {
+    int argc;
+    char **argv;
+    char **envp;
+};
+
+/*** Mach-O IPC Stuffs ***/
+
+union MaxMsgSize {
+	union __RequestUnion__mach_startup_subsystem req;
+	union __ReplyUnion__mach_startup_subsystem rep; 
+};
+
+kern_return_t do_start_x11_server(mach_port_t port, string_array_t argv,
+                                  mach_msg_type_number_t argvCnt,
+                                  string_array_t envp,
+                                  mach_msg_type_number_t envpCnt) {
+    if(server_main(argvCnt, argv, envp) == 0)
+        return KERN_SUCCESS;
+    else
+        return KERN_FAILURE;
+}
+
+kern_return_t do_exit(mach_port_t port, int value) {
+    exit(value);
+}
+
+static mach_port_t checkin_or_register(char *bname) {
+    kern_return_t kr;
+    mach_port_t mp;
+
+    /* If we're started by launchd or the old mach_init */
+    kr = bootstrap_check_in(bootstrap_port, bname, &mp);
+    if (kr == KERN_SUCCESS)
+        return mp;
+
+    /* We probably were not started by launchd or the old mach_init */
+    kr = mach_port_allocate(mach_task_self(), MACH_PORT_RIGHT_RECEIVE, &mp);
+    if (kr != KERN_SUCCESS) {
+        fprintf(stderr, "mach_port_allocate(): %s\n", mach_error_string(kr));
+        exit(EXIT_FAILURE);
+    }
+
+    kr = mach_port_insert_right(mach_task_self(), mp, mp, MACH_MSG_TYPE_MAKE_SEND);
+    if (kr != KERN_SUCCESS) {
+        fprintf(stderr, "mach_port_insert_right(): %s\n", mach_error_string(kr));
+        exit(EXIT_FAILURE);
+    }
+
+    kr = bootstrap_register(bootstrap_port, bname, mp);
+    if (kr != KERN_SUCCESS) {
+        fprintf(stderr, "bootstrap_register(): %s\n", mach_error_string(kr));
+        exit(EXIT_FAILURE);
+    }
+
+    return mp;
+}
+
+/*** Pthread Magics ***/
+static pthread_t create_thread(void *func, void *arg) {
+    pthread_attr_t attr;
+    pthread_t tid;
+	
+    pthread_attr_init (&attr);
+    pthread_attr_setscope (&attr, PTHREAD_SCOPE_SYSTEM);
+    pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED);
+    pthread_create (&tid, &attr, func, arg);
+    pthread_attr_destroy (&attr);
+	
+    return tid;
+}
+
+/*** Main ***/
+static int execute(const char *command);
+static char *command_from_prefs(const char *key, const char *default_value);
+
+#ifdef NEW_LAUNCH_METHOD
+static void startup_trigger_thread(void *arg) {
+    struct arg args = *((struct arg *)arg);
+    free(arg);
+    startup_trigger(args.argc, args.argv, args.envp);
+}
+
 int main(int argc, char **argv, char **envp) {
+    BOOL listenOnly = FALSE;
+    int i;
+
+    for(i=1; i < argc; i++) {
+        if(!strcmp(argv[i], "--listenonly")) {
+            listenOnly = TRUE;
+            break;
+        }
+    }
+
+    /* Check if we need to do something other than listen, and make another
+     * thread handle it.
+     */
+    if(!listenOnly) {
+        struct arg *args = (struct arg*)malloc(sizeof(struct arg));
+        if(!args)
+            FatalError("Could not allocate memory.\n");
+        
+        args->argc = argc;
+        args->argv = argv;
+        args->envp = envp;
+
+        create_thread(startup_trigger_thread, args);
+    } else {
+        /* TODO: This should actually fall through rather than be the else
+         *       case once we figure out how to get the stub to pass the
+         *       file descriptor.  For now, we only listen if we are explicitly
+         *       told to.
+         */
+
+        mach_msg_size_t mxmsgsz = sizeof(union MaxMsgSize) + MAX_TRAILER_SIZE;
+        mach_port_t mp = checkin_or_register(SERVER_BOOTSTRAP_NAME);
+        kern_return_t kr;
+        
+        /* Main event loop */
+        kr = mach_msg_server(mach_startup_server, mxmsgsz, mp, 0);
+        if (kr != KERN_SUCCESS) {
+            asl_log(NULL, NULL, ASL_LEVEL_ERR,
+                    "org.x.X11(mp): %s\n", mach_error_string(kr));
+            exit(EXIT_FAILURE);
+        }
+    }
+    
+    return EXIT_SUCCESS;
+}
+
+int startup_trigger(int argc, char **argv, char **envp) {
+#else
+int main(int argc, char **argv, char **envp) {
+#endif
     Display *display;
     const char *s;
-
+    
     size_t i;
     fprintf(stderr, "X11.app: main(): argc=%d\n", argc);
     for(i=0; i < argc; i++) {
@@ -57,7 +198,15 @@ int main(int argc, char **argv, char **envp) {
     
     /* Take care of the case where we're called like a normal DDX */
     if(argc > 1 && argv[1][0] == ':') {
-        exit(server_main(argc, argv, envp));
+#ifdef NEW_LAUNCH_METHOD
+        /* We need to count envp */
+        int envpc;
+        for(envpc=0; envp[envpc]; envpc++);
+
+        return start_x11_server(argc, argv, envp, envpc);
+#else
+        return server_main(argc, argv, envp);
+#endif
     }
     
     /* If we have a process serial number and it's our only arg, act as if
@@ -70,7 +219,7 @@ int main(int argc, char **argv, char **envp) {
             fprintf(stderr, "X11.app: Closing the display and sleeping for 2s to allow the X server to start up.\n");
             /* Could open the display, start the launcher */
             XCloseDisplay(display);
-
+            
             /* Give 2 seconds for the server to start... 
              * TODO: *Really* fix this race condition
              */
@@ -78,7 +227,7 @@ int main(int argc, char **argv, char **envp) {
             return execute(command_from_prefs("app_to_run", DEFAULT_CLIENT));
         }
     }
-
+    
     /* Start the server */
     if((s = getenv("DISPLAY"))) {
         fprintf(stderr, "X11.app: Could not connect to server (DISPLAY=\"%s\", unsetting).  Starting X server.\n", s);
diff --git a/hw/xquartz/mach-startup/mach_startup.defs b/hw/xquartz/mach-startup/mach_startup.defs
new file mode 100644
index 0000000..83b31b7
--- /dev/null
+++ b/hw/xquartz/mach-startup/mach_startup.defs
@@ -0,0 +1,41 @@
+/* Copyright (c) 2008 Apple Inc.
+ *
+ * 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 ABOVE LISTED COPYRIGHT
+ * HOLDER(S) 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 name(s) of the above
+ * 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.
+ */
+
+#include <mach/std_types.defs>
+#include <mach/mach_types.defs>
+import "mach_startup_types.h";
+
+subsystem mach_startup 1000;
+serverprefix do_;
+
+type string_array_t = array[] of c_string[1024];
+
+routine start_x11_server(
+	port  : mach_port_t;
+    argv  : string_array_t;
+    envp  : string_array_t);
diff --git a/hw/xquartz/mach-startup/mach_startup_types.h b/hw/xquartz/mach-startup/mach_startup_types.h
new file mode 100644
index 0000000..03939af
--- /dev/null
+++ b/hw/xquartz/mach-startup/mach_startup_types.h
@@ -0,0 +1,8 @@
+#ifndef _MACH_STARTUP_TYPES_H_
+#define _MACH_STARTUP_TYPES_H_
+
+#define SERVER_BOOTSTRAP_NAME "org.x.X11"
+
+typedef char ** string_array_t;
+
+#endif
commit 04211c3532ca078420e3745a5eac3d9de120bc32
Author: James Cloos <cloos at jhcloos.com>
Date:   Mon May 12 03:03:13 2008 -0400

    Prevent the -wm command line option from causing a SEGV
    
    The -wm (when mapped) option for the BackingStore support has been
    causing the server to dereference a NULL pointer.
    
    This has probably been the case since backing store has been
    implemented on top of Composite.
    
    It looks like (some of?) Composite didn’t expect its WIndowPtr
    argument to be the root window.
    
    In Composite’s compCheckRedirect() function we now avoid calling
    compAllocPixmap() and compFreePixmap() when the pWin pointer’s
    parent member is NULL, as is it the case with a server’s root window.
    
    This addresses:
    
    https://bugs.freedesktop.org/show_bug.cgi?id=15878

diff --git a/composite/compwindow.c b/composite/compwindow.c
index 9c99917..c1657bd 100644
--- a/composite/compwindow.c
+++ b/composite/compwindow.c
@@ -146,7 +146,7 @@ compCheckRedirect (WindowPtr pWin)
     Bool	    should;
 
     should = pWin->realized && (pWin->drawable.class != InputOnly) &&
-	     (cw != NULL);
+	     (cw != NULL) && (pWin->parent != NULL);
 
     /* Never redirect the overlay window */
     if (cs->pOverlayWin != NULL) {
commit 7e768c08f7809b8dba4db1931e63314e2b6e1cfa
Author: James Cloos <cloos at jhcloos.com>
Date:   Mon May 12 02:53:59 2008 -0400

    Clean up whitespace

diff --git a/composite/compwindow.c b/composite/compwindow.c
index c022027..9c99917 100644
--- a/composite/compwindow.c
+++ b/composite/compwindow.c
@@ -54,7 +54,7 @@ compCheckWindow (WindowPtr pWin, pointer data)
     PixmapPtr	pWinPixmap = (*pScreen->GetWindowPixmap) (pWin);
     PixmapPtr	pParentPixmap = pWin->parent ? (*pScreen->GetWindowPixmap) (pWin->parent) : 0;
     PixmapPtr	pScreenPixmap = (*pScreen->GetScreenPixmap) (pScreen);
-    
+
     if (!pWin->parent)
     {
 	assert (pWin->redirectDraw == RedirectDrawNone);
@@ -122,7 +122,7 @@ compSetPixmapVisitWindow (WindowPtr pWindow, pointer data)
     SetWinSize (pWindow);
     SetBorderSize (pWindow);
     if (HasBorder (pWindow))
-	QueueWorkProc (compRepaintBorder, serverClient, 
+	QueueWorkProc (compRepaintBorder, serverClient,
 		       (pointer) pWindow->drawable.id);
     return WT_WALKCHILDREN;
 }
@@ -147,14 +147,14 @@ compCheckRedirect (WindowPtr pWin)
 
     should = pWin->realized && (pWin->drawable.class != InputOnly) &&
 	     (cw != NULL);
-    
+
     /* Never redirect the overlay window */
     if (cs->pOverlayWin != NULL) {
 	if (pWin == cs->pOverlayWin) {
 	    should = FALSE;
 	}
-    }	
-    
+    }
+
     if (should != (pWin->redirectDraw != RedirectDrawNone))
     {
 	if (should)
@@ -276,10 +276,10 @@ compClipNotify (WindowPtr pWin, int dx, int dy)
     ScreenPtr		pScreen = pWin->drawable.pScreen;
     CompScreenPtr	cs = GetCompScreen (pScreen);
     CompWindowPtr	cw = GetCompWindow (pWin);
-    
+
     if (cw)
     {
-	if (cw->borderClipX != pWin->drawable.x || 
+	if (cw->borderClipX != pWin->drawable.x ||
 	    cw->borderClipY != pWin->drawable.y)
 	{
 	    REGION_TRANSLATE (pScreen, &cw->borderClip,
@@ -324,7 +324,7 @@ compImplicitRedirect (WindowPtr pWin, WindowPtr pParent)
 	ScreenPtr	pScreen = pWin->drawable.pScreen;
 	XID		winVisual = wVisual (pWin);
 	XID		parentVisual = wVisual (pParent);
-    
+
 	if (winVisual != parentVisual &&
 	    (compIsAlternateVisual (pScreen, winVisual) ||
 	     compIsAlternateVisual (pScreen, parentVisual)))
@@ -345,11 +345,11 @@ compMoveWindow (WindowPtr pWin, int x, int y, WindowPtr pSib, VTKind kind)
 	WindowPtr		pParent;
 	int			draw_x, draw_y;
 	unsigned int		w, h, bw;
-	
+
 	/* if this is a root window, can't be moved */
 	if (!(pParent = pWin->parent))
 	   return;
-	
+
 	bw = wBorderWidth (pWin);
 	draw_x = pParent->drawable.x + x + (int)bw;
 	draw_y = pParent->drawable.y + y + (int)bw;
@@ -390,18 +390,18 @@ compResizeWindow (WindowPtr pWin, int x, int y,
 	WindowPtr		pParent;
 	int			draw_x, draw_y;
 	unsigned int		bw;
-	
+
 	/* if this is a root window, can't be moved */
 	if (!(pParent = pWin->parent))
 	   return;
-	
+
 	bw = wBorderWidth (pWin);
 	draw_x = pParent->drawable.x + x + (int)bw;
 	draw_y = pParent->drawable.y + y + (int)bw;
 	compReallocPixmap (pWin, draw_x, draw_y, w, h, bw);
     }
     compCheckTree (pScreen);
-    
+
     pScreen->ResizeWindow = cs->ResizeWindow;
     (*pScreen->ResizeWindow) (pWin, x, y, w, h, pSib);
     cs->ResizeWindow = pScreen->ResizeWindow;
@@ -430,11 +430,11 @@ compChangeBorderWidth (WindowPtr pWin, unsigned int bw)
 	WindowPtr		pParent;
 	int			draw_x, draw_y;
 	unsigned int		w, h;
-	
+
 	/* if this is a root window, can't be moved */
 	if (!(pParent = pWin->parent))
 	   return;
-	
+
 	draw_x = pWin->drawable.x;
 	draw_y = pWin->drawable.y;
 	w = pWin->drawable.width;
@@ -481,13 +481,13 @@ compReparentWindow (WindowPtr pWin, WindowPtr pPriorParent)
      */
     if (compImplicitRedirect (pWin, pWin->parent))
 	compRedirectWindow (serverClient, pWin, CompositeRedirectAutomatic);
-    
+
     /*
      * Allocate any necessary redirect pixmap
      * (this actually should never be true; pWin is always unmapped)
      */
     compCheckRedirect (pWin);
-    
+
     /*
      * Reset pixmap pointers as appropriate
      */
@@ -514,7 +514,7 @@ compCopyWindow (WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc)
     {
 	PixmapPtr	pPixmap = (*pScreen->GetWindowPixmap) (pWin);
 	CompWindowPtr	cw = GetCompWindow (pWin);
-	
+
 	assert (cw->oldx != COMP_ORIGIN_INVALID);
 	assert (cw->oldy != COMP_ORIGIN_INVALID);
 	if (cw->pOldPixmap)
@@ -526,7 +526,7 @@ compCopyWindow (WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc)
 	    RegionRec	rgnDst;
 	    PixmapPtr	pPixmap = (*pScreen->GetWindowPixmap) (pWin);
 	    GCPtr	pGC;
-	    
+
 	    dx = ptOldOrg.x - pWin->drawable.x;
 	    dy = ptOldOrg.y - pWin->drawable.y;
 	    REGION_TRANSLATE(pWin->drawable.pScreen, prgnSrc, -dx, -dy);
@@ -535,10 +535,10 @@ compCopyWindow (WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc)
 
 	    REGION_INTERSECT(pWin->drawable.pScreen, &rgnDst,
 			     &pWin->borderClip, prgnSrc);
-	    
-	    REGION_TRANSLATE (pWin->drawable.pScreen, &rgnDst, 
+
+	    REGION_TRANSLATE (pWin->drawable.pScreen, &rgnDst,
 			      -pPixmap->screen_x, -pPixmap->screen_y);
-	    
+
 	    dx = dx + pPixmap->screen_x - cw->oldx;
 	    dy = dy + pPixmap->screen_y - cw->oldy;
 	    pGC = GetScratchGC (pPixmap->drawable.depth, pScreen);
@@ -546,7 +546,7 @@ compCopyWindow (WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc)
 	    {
 		BoxPtr	pBox = REGION_RECTS (&rgnDst);
 		int	nBox = REGION_NUM_RECTS (&rgnDst);
-		
+
 		ValidateGC(&pPixmap->drawable, pGC);
 		while (nBox--)
 		{
@@ -568,7 +568,7 @@ compCopyWindow (WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc)
 	ptOldOrg.x += dx;
 	ptOldOrg.y += dy;
     }
-    
+
     pScreen->CopyWindow = cs->CopyWindow;
     if (ptOldOrg.x != pWin->drawable.x || ptOldOrg.y != pWin->drawable.y)
     {
@@ -634,7 +634,7 @@ compDestroyWindow (WindowPtr pWin)
 	FreeResource (cw->clients->id, RT_NONE);
     while ((csw = GetCompSubwindows (pWin)))
 	FreeResource (csw->clients->id, RT_NONE);
-    
+
     if (pWin->redirectDraw != RedirectDrawNone)
 	compFreePixmap (pWin);
     ret = (*pScreen->DestroyWindow) (pWin);
@@ -699,7 +699,7 @@ PictFormatPtr
 compWindowFormat (WindowPtr pWin)
 {
     ScreenPtr	pScreen = pWin->drawable.pScreen;
-    
+
     return PictureMatchVisual (pScreen, pWin->drawable.depth,
 			       compGetWindowVisual (pWin));
 }
@@ -716,24 +716,24 @@ compWindowUpdateAutomatic (WindowPtr pWin)
     int		    error;
     RegionPtr	    pRegion = DamageRegion (cw->damage);
     PicturePtr	    pSrcPicture = CreatePicture (0, &pSrcPixmap->drawable,
-						 pSrcFormat, 
+						 pSrcFormat,
 						 0, 0,
 						 serverClient,
 						 &error);
     XID		    subwindowMode = IncludeInferiors;
     PicturePtr	    pDstPicture = CreatePicture (0, &pParent->drawable,
 						 pDstFormat,
-						 CPSubwindowMode, 
+						 CPSubwindowMode,
 						 &subwindowMode,
 						 serverClient,
 						 &error);
-    
+
     /*
      * First move the region from window to screen coordinates
      */
-    REGION_TRANSLATE (pScreen, pRegion, 
+    REGION_TRANSLATE (pScreen, pRegion,
 		      pWin->drawable.x, pWin->drawable.y);
-    
+
     /*
      * Clip against the "real" border clip
      */
@@ -742,14 +742,14 @@ compWindowUpdateAutomatic (WindowPtr pWin)
     /*
      * Now translate from screen to dest coordinates
      */
-    REGION_TRANSLATE (pScreen, pRegion, 
+    REGION_TRANSLATE (pScreen, pRegion,
 		      -pParent->drawable.x, -pParent->drawable.y);
-    
+
     /*
      * Clip the picture
      */
     SetPictureClipRegion (pDstPicture, 0, 0, pRegion);
-    
+
     /*
      * And paint
      */
@@ -813,7 +813,7 @@ CompositeRealChildHead (WindowPtr pWin)
     if (!pChild) {
 	return NullWindow;
     }
-    
+
     cs = GetCompScreen(pWin->drawable.pScreen);
     if (pChild == cs->pOverlayWin) {
 	return pChild;
commit 3b6735528efc6d69ab7a7cd63dd09c87db7ef115
Author: Dave Airlie <airlied at redhat.com>
Date:   Mon May 12 16:36:42 2008 +1000

    pci: don't do this pci stuff when we don't have hw access

diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c
index 68dc387..851f4dc 100644
--- a/hw/xfree86/common/xf86Init.c
+++ b/hw/xfree86/common/xf86Init.c
@@ -632,10 +632,10 @@ InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv)
     /*
      * Locate bus slot that had register IO enabled at server startup
      */
-
-    xf86AccessInit();
-    xf86FindPrimaryDevice();
-
+    if (xorgHWAccess) {
+        xf86AccessInit();
+        xf86FindPrimaryDevice();
+    }
     /*
      * Now call each of the Probe functions.  Each successful probe will
      * result in an extra entry added to the xf86Screens[] list for each
commit 9dfb525f6c91acab5d1a65765a046bf9ee2aa082
Author: Julien Cristau <jcristau at debian.org>
Date:   Sun May 11 23:17:27 2008 +0200

    kdrive: allow disabling Composite
    
    KdInitOutput() used to enable Composite when it was disabled by default,
    but now this hack prevents ``-extension Composite'' from working.
    Remove it, as Composite is enabled by default anyway.

diff --git a/hw/kdrive/src/kdrive.c b/hw/kdrive/src/kdrive.c
index 50148c4..e2ee4ad 100644
--- a/hw/kdrive/src/kdrive.c
+++ b/hw/kdrive/src/kdrive.c
@@ -1353,12 +1353,6 @@ KdInitOutput (ScreenInfo    *pScreenInfo,
     KdCardInfo	    *card;
     KdScreenInfo    *screen;
 
-#ifdef COMPOSITE
-    /* kind of a hack: we want Composite enabled, but it's disabled per
-     * default. */
-    noCompositeExtension = FALSE;
-#endif
-    
     if (!kdCardInfo)
     {
 	InitCard (0);
commit 1a01e96c6d15ef17a8b5ab1afa361fb12476a25e
Author: Alan Coopersmith <alan.coopersmith at sun.com>
Date:   Fri May 9 15:38:44 2008 -0700

    Return a valid X error when stuck in font alias loop
    
    Part of fix for Sun bug 4258475
    <http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=4258475>

diff --git a/dix/dixfonts.c b/dix/dixfonts.c
index e9a3f39..6fb29de 100644
--- a/dix/dixfonts.c
+++ b/dix/dixfonts.c
@@ -302,8 +302,14 @@ doOpenFont(ClientPtr client, OFclosurePtr c)
 	    c->fontname = newname;
 	    c->fnamelen = newlen;
 	    c->current_fpe = 0;
-	    if (--aliascount <= 0)
+	    if (--aliascount <= 0) {
+		/* We've tried resolving this alias 20 times, we're
+ 		 * probably stuck in an infinite loop of aliases pointing
+ 		 * to each other - time to take emergency exit!
+ 		 */
+ 		err = BadImplementation;
 		break;
+	    }
 	    continue;
 	}
 	if (err == BadFontName) {
commit 7b3066d9b9099135d9c49e0682161d5568fc535b
Merge: 2a3d142... 315f089...
Author: Drew Parsons <drew at emerall.com>
Date:   Sat May 10 00:01:15 2008 +1000

    Merge branch 'master' of git://anongit.freedesktop.org/git/xorg/xserver into upstream-experimental

commit 2a3d1421e0cc18822ae8f478fcc272e16a9e9340
Author: Drew Parsons <dparsons at debian.org>
Date:   Fri May 9 23:20:11 2008 +1000

    Disable D-BUS from Xprint.
    
    Use dummy config functions to replace those from config/config.c, and
    therefore do not link Xprt with $CONFIG_LIB.
    
    Works around an endlessly spinning loop in dix/dispatch.c::Dispatch()
    (WaitForSomething() not waiting) when built with dbus, which was
    causing Xprt to use 95% cpu.

diff --git a/configure.ac b/configure.ac
index f695551..64fd946 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1610,7 +1610,7 @@ AC_MSG_RESULT([$XPRINT])
 if test "x$XPRINT" = xyes; then
 	PKG_CHECK_MODULES([XPRINTMODULES], [printproto x11 xfont $XDMCP_MODULES xau])
 	XPRINT_CFLAGS="$XPRINTMODULES_CFLAGS -DXPRINT"
-	XPRINT_LIBS="$XEXT_LIB $CONFIG_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $RENDER_LIB $COMPOSITE_LIB $RANDR_LIB $XI_LIB $FIXES_LIB $DAMAGE_LIB $XI_LIB $GLX_LIBS $MIEXT_DAMAGE_LIB $XKB_LIB $XKB_STUB_LIB"
+	XPRINT_LIBS="$XEXT_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $RENDER_LIB $COMPOSITE_LIB $RANDR_LIB $XI_LIB $FIXES_LIB $DAMAGE_LIB $XI_LIB $GLX_LIBS $MIEXT_DAMAGE_LIB $XKB_LIB $XKB_STUB_LIB"
 	XPRINT_SYS_LIBS="$XPRINTMODULES_LIBS"
 
 	xpconfigdir=$libdir/X11/xserver
diff --git a/hw/xprint/ddxInit.c b/hw/xprint/ddxInit.c
index d744121..7950521 100644
--- a/hw/xprint/ddxInit.c
+++ b/hw/xprint/ddxInit.c
@@ -291,6 +291,12 @@ ddxProcessArgument (
 #include "XIstubs.h"
 #include "exglobals.h"
 
+/* Place dummy config functions here instead of config/config.c, 
+   since Xprint does not use D-BUS */
+void config_init() { }
+void config_fini() { }
+
+
 int
 ChangePointerDevice (
     DeviceIntPtr       old_dev,
commit 315f089056da67d4c463ed002eb2b74e38493b49
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date:   Thu May 8 19:46:03 2008 -0700

    XQuartz: Reorganized some of the build system in prep for the Mach IPC startup work.
    (cherry picked from commit 2232c91d5c277673929eab2abb5e0495c00877cb)

diff --git a/configure.ac b/configure.ac
index 9671ada..99b10e3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2164,7 +2164,8 @@ hw/xwin/Makefile
 hw/xquartz/Makefile
 hw/xquartz/GL/Makefile
 hw/xquartz/bundle/Makefile
-hw/xquartz/stub/Makefile
+hw/xquartz/doc/Makefile
+hw/xquartz/mach-startup/Makefile
 hw/xquartz/xpr/Makefile
 hw/kdrive/Makefile
 hw/kdrive/ati/Makefile
diff --git a/hw/xquartz/Makefile.am b/hw/xquartz/Makefile.am
index bbd21f8..77d662f 100644
--- a/hw/xquartz/Makefile.am
+++ b/hw/xquartz/Makefile.am
@@ -9,12 +9,11 @@ AM_CPPFLAGS = \
 	-DXFree86Server \
 	-I$(top_srcdir)/miext/rootless
 
-SUBDIRS = bundle . GL xpr stub
+SUBDIRS = bundle . GL xpr mach-startup doc
 
 libXquartz_la_SOURCES = \
 	$(top_srcdir)/fb/fbcmap_mi.c \
 	$(top_srcdir)/mi/miinitext.c \
-	bundle/bundle-main.c \
 	X11Application.m \
 	X11Controller.m \
 	applewm.c \
diff --git a/hw/xquartz/bundle/Makefile.am b/hw/xquartz/bundle/Makefile.am
index c61b049..a8f45f8 100644
--- a/hw/xquartz/bundle/Makefile.am
+++ b/hw/xquartz/bundle/Makefile.am
@@ -7,7 +7,6 @@ resource_DATA = Xquartz.plist
 EXTRA_DIST = \
 	mk_bundke.sh \
 	$(resource_DATA) \
-	bundle-main.c \
 	Resources/da.lproj/InfoPlist.strings \
 	Resources/da.lproj/Localizable.strings \
 	Resources/da.lproj/main.nib/keyedobjects.nib \
diff --git a/hw/xquartz/bundle/bundle-main.c b/hw/xquartz/bundle/bundle-main.c
deleted file mode 100644
index 042fa3a..0000000
--- a/hw/xquartz/bundle/bundle-main.c
+++ /dev/null
@@ -1,143 +0,0 @@
-/* main.c -- X application launcher
- 
- Copyright (c) 2007 Jeremy Huddleston
- Copyright (c) 2007 Apple Inc
- 
- 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 ABOVE LISTED COPYRIGHT
- HOLDER(S) 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 name(s) of the above
- 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. */
-
-#include <X11/Xlib.h>
-#include <unistd.h>
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-
-#include <CoreFoundation/CoreFoundation.h>
-
-#define DEFAULT_CLIENT "/usr/X11/bin/xterm"
-#define DEFAULT_STARTX "/usr/X11/bin/startx"
-#define DEFAULT_SHELL  "/bin/sh"
-
-static int execute(const char *command);
-static char *command_from_prefs(const char *key, const char *default_value);
-
-int server_main(int argc, char **argv, char **envp);
-
-int main(int argc, char **argv, char **envp) {
-    Display *display;
-    const char *s;
-
-    size_t i;
-    fprintf(stderr, "X11.app: main(): argc=%d\n", argc);
-    for(i=0; i < argc; i++) {
-        fprintf(stderr, "\targv[%u] = %s\n", (unsigned)i, argv[i]);
-    }
-    
-    /* Take care of the case where we're called like a normal DDX */
-    if(argc > 1 && argv[1][0] == ':') {
-        exit(server_main(argc, argv, envp));
-    }
-    
-    /* If we have a process serial number and it's our only arg, act as if
-     * the user double clicked the app bundle: launch app_to_run if possible
-     */
-    if(argc == 1 || (argc == 2 && !strncmp(argv[1], "-psn_", 5))) {
-        /* Now, try to open a display, if so, run the launcher */
-        display = XOpenDisplay(NULL);
-        if(display) {
-            fprintf(stderr, "X11.app: Closing the display and sleeping for 2s to allow the X server to start up.\n");
-            /* Could open the display, start the launcher */
-            XCloseDisplay(display);
-
-            /* Give 2 seconds for the server to start... 
-             * TODO: *Really* fix this race condition
-             */
-            usleep(2000);
-            return execute(command_from_prefs("app_to_run", DEFAULT_CLIENT));
-        }
-    }
-
-    /* Start the server */
-    if((s = getenv("DISPLAY"))) {
-        fprintf(stderr, "X11.app: Could not connect to server (DISPLAY=\"%s\", unsetting).  Starting X server.\n", s);
-        unsetenv("DISPLAY");
-    } else {
-        fprintf(stderr, "X11.app: Could not connect to server (DISPLAY is not set).  Starting X server.\n");
-    }
-    return execute(command_from_prefs("startx_script", DEFAULT_STARTX));
-}
-
-static int execute(const char *command) {
-    const char *newargv[7];
-    const char **s;
-
-    newargv[0] = "/usr/bin/login";
-    newargv[1] = "-fp";
-    newargv[2] = getlogin();
-    newargv[3] = command_from_prefs("login_shell", DEFAULT_SHELL);
-    newargv[4] = "-c";
-    newargv[5] = command;
-    newargv[6] = NULL;
-    
-    fprintf(stderr, "X11.app: Launching %s:\n", command);
-    for(s=newargv; *s; s++) {
-        fprintf(stderr, "\targv[%d] = %s\n", s - newargv, *s);
-    }
-
-    execvp (newargv[0], (char * const *) newargv);
-    perror ("X11.app: Couldn't exec.");
-    return(1);
-}
-
-static char *command_from_prefs(const char *key, const char *default_value) {
-    char *command = NULL;
-    
-    CFStringRef cfKey = CFStringCreateWithCString(NULL, key, kCFStringEncodingASCII);
-    CFPropertyListRef PlistRef = CFPreferencesCopyAppValue(cfKey, kCFPreferencesCurrentApplication);
-    
-    if ((PlistRef == NULL) || (CFGetTypeID(PlistRef) != CFStringGetTypeID())) {
-        CFStringRef cfDefaultValue = CFStringCreateWithCString(NULL, default_value, kCFStringEncodingASCII);
-
-        CFPreferencesSetAppValue(cfKey, cfDefaultValue, kCFPreferencesCurrentApplication);
-        CFPreferencesAppSynchronize(kCFPreferencesCurrentApplication);
-        
-        int len = strlen(default_value) + 1;
-        command = (char *)malloc(len * sizeof(char));
-        if(!command)
-            return NULL;
-        strcpy(command, default_value);
-    } else {
-        int len = CFStringGetLength((CFStringRef)PlistRef) + 1;
-        command = (char *)malloc(len * sizeof(char));
-        if(!command)
-            return NULL;
-        CFStringGetCString((CFStringRef)PlistRef, command, len,  kCFStringEncodingASCII);
-	}
-    
-    if (PlistRef)
-        CFRelease(PlistRef);
-    
-    return command;
-}
diff --git a/hw/xquartz/doc/Makefile.am b/hw/xquartz/doc/Makefile.am
new file mode 100644
index 0000000..b812af1
--- /dev/null
+++ b/hw/xquartz/doc/Makefile.am
@@ -0,0 +1,14 @@
+appmandir = $(APP_MAN_DIR)
+appman_PRE = Xquartz.man.pre
+appman_PROCESSED = $(appman_PRE:man.pre=man)
+appman_DATA = $(appman_PRE:man.pre=@APP_MAN_SUFFIX@)
+
+CLEANFILES = $(appman_PROCESSED) $(appman_DATA)
+
+include $(top_srcdir)/cpprules.in
+
+.man.$(APP_MAN_SUFFIX):
+	cp $< $@
+
+EXTRA_DIST = \
+	Xquartz.man.pre
diff --git a/hw/xquartz/doc/Xquartz.man.pre b/hw/xquartz/doc/Xquartz.man.pre
new file mode 100644
index 0000000..315db1c
--- /dev/null
+++ b/hw/xquartz/doc/Xquartz.man.pre
@@ -0,0 +1,156 @@
+.TH XQUARTZ 1 __vendorversion__
+.SH NAME
+Xquartz \- X window system server for Quartz operating system
+.SH SYNOPSIS
+.B Xquartz
+[ options ] ...
+.SH DESCRIPTION
+.I Xquartz
+is the X window server for Mac OS X provided by Apple.
+.I Xquartz
+runs in parallel with Aqua in rootless mode. In rootless mode, the X
+window system and Mac OS X share your display.  The root window of the
+X11 display is the size of the screen and contains all the other
+windows. The X11 root window is not displayed in rootless mode as Mac
+OS X handles the desktop background.
+.SH OPTIONS
+.PP
+In addition to the normal server options described in the \fIXserver(1)\fP
+manual page, \fIXquartz\fP accepts the following command line switches:
+.TP 8
+.B \-fakebuttons
+Emulates a 3 button mouse using modifier keys. By default, the Command modifier
+is used to emulate button 2 and Option is used for button 3. Thus, clicking the
+first mouse button while holding down Command will act like clicking
+button 2. Holding down Option will simulate button 3.
+.TP 8
+.B \-nofakebuttons
+Do not emulate a 3 button mouse. This is the default.
+.TP 8
+.B "\-fakemouse2 \fImodifiers\fP"
+Change the modifier keys used to emulate the second mouse button. By default,
+Command is used to emulate the second button. Any combination of the following
+modifier names may be used: Shift, Option, Control, Command, Fn. For example,
+.B \-fakemouse2 """Option,Shift""
+will set holding Option, Shift and clicking on button one as equivalent to
+clicking the second mouse button.
+.TP 8
+.B "\-fakemouse3 \fImodifiers\fP"
+Change the modifier keys used to emulate the third mouse button. By default,
+Option is used to emulate the third button. Any combination of the following
+modifier names may be used: Shift, Option, Control, Command, Fn. For example,
+.B \-fakemouse3 """Control,Shift""
+will set holding Control, Shift and clicking on button one as equivalent to
+clicking the third mouse button.
+.TP 8
+.B "\-swapAltMeta"
+Swaps the meaning of the Alt and Meta modifier keys.
+.TP 8
+.B "\-keymap \fIfile\fP"
+On startup \fIXquartz\fP translates a Darwin keymapping into an X keymap.
+The default is to read this keymapping from USA.keymapping. With this option
+the keymapping will be read from \fIfile\fP instead. If the file's path is
+not specified, it will be searched for in Library/Keyboards/ underneath the
+following directories (in order): ~, /, /Network, /System.
+.TP 8
+.B \-nokeymap
+On startup \fIXquartz\fP translates a Darwin keymapping into an X keymap.
+With this option \fIXquartz\fP queries the kernel for the current keymapping
+instead of reading it from a file. This will often fail on newer kernels.
+.TP 8
+.B "\-depth \fIdepth\fP"
+Specifies the color bit depth to use. Currently only 15, and 24 color
+bits per pixel are supported. If not specified, defaults to the depth
+of the main display.
+.SH CUSTOMIZATION
+\fIXquartz\fP can also be customized using the defaults(1) command. The available options are:
+.TP 8
+.B defaults write org.x.X11 enable_fake_buttons -boolean true
+Equivalent to the \fB-fakebuttons\fP command line option.
+.TP 8
+.B defaults write org.x.X11 fake_button2 \fImodifiers\fP
+Equivalent to the \fB-fakemouse2\fP option.
+.TP 8
+.B defaults write org.x.X11 fake_button3 \fImodifiers\fP
+Equivalent to the \fB-fakemouse3\fP option.
+.TP 8
+.B defaults write org.x.X11 swap_alt_meta -boolean true
+Equivalent to the \fB-swapAltMeta\fP option.
+.TP 8
+.B defaults write org.x.X11 keymap_file \fIfilename\fP
+Equivalent to the \fB-keymap\fP option.
+.TP 8
+.B defaults write org.x.X11 no_quit_alert -boolean true
+Disables the alert dialog displayed when attempting to quit X11.
+.TP 8
+.B defaults write org.x.X11 no_auth -boolean true
+Stops the X server requiring that clients authenticate themselves when
+connecting. See Xsecurity(__miscmansuffix__).
+.TP 8
+.B defaults write org.x.X11 nolisten_tcp -boolean true
+Prevents the X server accepting remote connections.
+.TP 8
+.B defaults write org.x.X11 xinit_kills_server -boolean false
+Stops the X server exiting when the xinitrc script terminates.
+.TP 8
+.B defaults write org.x.X11 fullscreen_hotkeys -boolean false
+Allows system hotkeys to be handled while in X11 fullscreen mode.
+.TP 8
+.B defaults write org.x.X11 enable_system_beep -boolean false
+Don't use the standard system beep effect for X11 alerts.
+.TP 8
+.B defaults write org.x.X11 enable_key_equivalents -boolean false
+Disable menu keyboard equivalents while X11 windows are focused.
+.TP 8
+.B defaults write org.x.X11 depth \fIdepth\fP
+Equivalent to the \fB-depth\fP option.
+.SH "SEE ALSO"
+.PP
+X(__miscmansuffix__), Xserver(1), xdm(1), xinit(1)
+.PP
+.SH AUTHORS
+XFree86 was originally ported to Mac OS X Server by John Carmack. Dave
+Zarzycki used this as the basis of his port of XFree86 4.0 to Darwin 1.0.
+Torrey T. Lyons improved and integrated this code into the XFree86
+Project's mainline for the 4.0.2 release.
+.PP
+The following members of the XonX Team contributed to the following
+releases (in alphabetical order):
+.TP 4
+XFree86 4.1.0:
+.br
+Rob Braun - Darwin x86 support
+.br
+Torrey T. Lyons - Project Lead
+.br
+Andreas Monitzer - Cocoa version of XDarwin front end
+.br
+Gregory Robert Parker - Original Quartz implementation
+.br
+Christoph Pfisterer - Dynamic shared X libraries
+.br
+Toshimitsu Tanaka - Japanese localization
+.TP 4
+XFree86 4.2.0:
+.br
+Rob Braun - Darwin x86 support
+.br
+Pablo Di Noto - Spanish localization
+.br
+Paul Edens - Dutch localization
+.br
+Kyunghwan Kim - Korean localization
+.br
+Mario Klebsch - Non-US keyboard support
+.br
+Torrey T. Lyons - Project Lead
+.br
+Andreas Monitzer - German localization
+.br
+Patrik Montgomery - Swedish localization
+.br
+Greg Parker - Rootless support
+.br
+Toshimitsu Tanaka - Japanese localization
+.br
+Olivier Verdier - French localization
diff --git a/hw/xquartz/mach-startup/Makefile.am b/hw/xquartz/mach-startup/Makefile.am
new file mode 100644
index 0000000..9668711
--- /dev/null
+++ b/hw/xquartz/mach-startup/Makefile.am
@@ -0,0 +1,34 @@
+AM_CPPFLAGS = \
+	-DBUILD_DATE=\"$(BUILD_DATE)\" \
+	-DXSERVER_VERSION=\"$(VERSION)\"
+
+x11appdir = $(APPLE_APPLICATIONS_DIR)/X11.app/Contents/MacOS
+x11app_PROGRAMS = X11
+
+X11_SOURCES = \
+	bundle-main.c
+
+X11_LDADD = \
+	$(top_builddir)/hw/xquartz/libXquartz.la \
+	$(top_builddir)/hw/xquartz/xpr/libXquartzXpr.la \
+	$(top_builddir)/dix/dixfonts.lo \
+	$(top_builddir)/miext/rootless/librootless.la \
+	$(DARWIN_LIBS) $(XSERVER_LIBS) $(XSERVER_SYS_LIBS) -lXplugin -lX11
+
+X11_LDFLAGS =  \
+	-XCClinker -Objc \
+	-Wl,-u,_miDCInitialize \
+	-Wl,-framework,Carbon \
+	-L/System/Library/Frameworks/OpenGL.framework/Libraries -lGL \
+	-Wl,-framework,OpenGL \
+	-Wl,-framework,Cocoa \
+	-Wl,-framework,CoreAudio \
+	-Wl,-framework,IOKit
+
+bin_PROGRAMS = Xquartz
+
+Xquartz_SOURCES = \
+	stub.c
+
+Xquartz_LDFLAGS =  \
+	-Wl,-framework,CoreServices
diff --git a/hw/xquartz/mach-startup/bundle-main.c b/hw/xquartz/mach-startup/bundle-main.c
new file mode 100644
index 0000000..042fa3a
--- /dev/null
+++ b/hw/xquartz/mach-startup/bundle-main.c
@@ -0,0 +1,143 @@
+/* main.c -- X application launcher
+ 
+ Copyright (c) 2007 Jeremy Huddleston
+ Copyright (c) 2007 Apple Inc
+ 
+ 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 ABOVE LISTED COPYRIGHT
+ HOLDER(S) 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 name(s) of the above
+ 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. */
+
+#include <X11/Xlib.h>
+#include <unistd.h>
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+
+#include <CoreFoundation/CoreFoundation.h>
+
+#define DEFAULT_CLIENT "/usr/X11/bin/xterm"
+#define DEFAULT_STARTX "/usr/X11/bin/startx"
+#define DEFAULT_SHELL  "/bin/sh"
+
+static int execute(const char *command);
+static char *command_from_prefs(const char *key, const char *default_value);
+
+int server_main(int argc, char **argv, char **envp);
+
+int main(int argc, char **argv, char **envp) {
+    Display *display;
+    const char *s;
+
+    size_t i;
+    fprintf(stderr, "X11.app: main(): argc=%d\n", argc);
+    for(i=0; i < argc; i++) {
+        fprintf(stderr, "\targv[%u] = %s\n", (unsigned)i, argv[i]);
+    }
+    
+    /* Take care of the case where we're called like a normal DDX */
+    if(argc > 1 && argv[1][0] == ':') {
+        exit(server_main(argc, argv, envp));
+    }
+    
+    /* If we have a process serial number and it's our only arg, act as if
+     * the user double clicked the app bundle: launch app_to_run if possible
+     */
+    if(argc == 1 || (argc == 2 && !strncmp(argv[1], "-psn_", 5))) {
+        /* Now, try to open a display, if so, run the launcher */
+        display = XOpenDisplay(NULL);
+        if(display) {
+            fprintf(stderr, "X11.app: Closing the display and sleeping for 2s to allow the X server to start up.\n");
+            /* Could open the display, start the launcher */
+            XCloseDisplay(display);
+
+            /* Give 2 seconds for the server to start... 
+             * TODO: *Really* fix this race condition
+             */
+            usleep(2000);
+            return execute(command_from_prefs("app_to_run", DEFAULT_CLIENT));
+        }
+    }
+
+    /* Start the server */
+    if((s = getenv("DISPLAY"))) {
+        fprintf(stderr, "X11.app: Could not connect to server (DISPLAY=\"%s\", unsetting).  Starting X server.\n", s);
+        unsetenv("DISPLAY");
+    } else {
+        fprintf(stderr, "X11.app: Could not connect to server (DISPLAY is not set).  Starting X server.\n");
+    }
+    return execute(command_from_prefs("startx_script", DEFAULT_STARTX));
+}
+
+static int execute(const char *command) {
+    const char *newargv[7];
+    const char **s;
+
+    newargv[0] = "/usr/bin/login";
+    newargv[1] = "-fp";
+    newargv[2] = getlogin();
+    newargv[3] = command_from_prefs("login_shell", DEFAULT_SHELL);
+    newargv[4] = "-c";
+    newargv[5] = command;
+    newargv[6] = NULL;
+    
+    fprintf(stderr, "X11.app: Launching %s:\n", command);
+    for(s=newargv; *s; s++) {
+        fprintf(stderr, "\targv[%d] = %s\n", s - newargv, *s);
+    }
+
+    execvp (newargv[0], (char * const *) newargv);
+    perror ("X11.app: Couldn't exec.");
+    return(1);
+}
+
+static char *command_from_prefs(const char *key, const char *default_value) {
+    char *command = NULL;
+    
+    CFStringRef cfKey = CFStringCreateWithCString(NULL, key, kCFStringEncodingASCII);
+    CFPropertyListRef PlistRef = CFPreferencesCopyAppValue(cfKey, kCFPreferencesCurrentApplication);
+    
+    if ((PlistRef == NULL) || (CFGetTypeID(PlistRef) != CFStringGetTypeID())) {
+        CFStringRef cfDefaultValue = CFStringCreateWithCString(NULL, default_value, kCFStringEncodingASCII);
+
+        CFPreferencesSetAppValue(cfKey, cfDefaultValue, kCFPreferencesCurrentApplication);
+        CFPreferencesAppSynchronize(kCFPreferencesCurrentApplication);
+        
+        int len = strlen(default_value) + 1;
+        command = (char *)malloc(len * sizeof(char));
+        if(!command)
+            return NULL;
+        strcpy(command, default_value);
+    } else {
+        int len = CFStringGetLength((CFStringRef)PlistRef) + 1;
+        command = (char *)malloc(len * sizeof(char));
+        if(!command)
+            return NULL;
+        CFStringGetCString((CFStringRef)PlistRef, command, len,  kCFStringEncodingASCII);
+	}
+    
+    if (PlistRef)
+        CFRelease(PlistRef);
+    
+    return command;
+}
diff --git a/hw/xquartz/mach-startup/stub.c b/hw/xquartz/mach-startup/stub.c
new file mode 100644
index 0000000..70f222c
--- /dev/null
+++ b/hw/xquartz/mach-startup/stub.c
@@ -0,0 +1,96 @@
+/* Copyright (c) 2008 Apple Inc.
+ *
+ * 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 ABOVE LISTED COPYRIGHT
+ * HOLDER(S) 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 name(s) of the above
+ * 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.
+ */
+
+#include <CoreServices/CoreServices.h>
+
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#endif
+
+#include <string.h>
+#include <stdio.h>
+#include <unistd.h>
+
+#define kX11AppBundleId "org.x.X11"
+#define kX11AppBundlePath "/Contents/MacOS/X11"
+
+static char x11_path[PATH_MAX + 1];
+
+static void set_x11_path() {
+    CFURLRef appURL = NULL;
+    OSStatus osstatus = LSFindApplicationForInfo(kLSUnknownCreator, CFSTR(kX11AppBundleId), nil, nil, &appURL);
+    
+    switch (osstatus) {
+        case noErr:
+            if (appURL == NULL) {
+                fprintf(stderr, "xinit: Invalid response from LSFindApplicationForInfo(%s)\n", 
+                        kX11AppBundleId);
+                exit(1);
+            }
+            
+            if (!CFURLGetFileSystemRepresentation(appURL, true, (unsigned char *)x11_path, sizeof(x11_path))) {
+                fprintf(stderr, "xinit: Error resolving URL for %s\n", kX11AppBundleId);
+                exit(2);
+            }
+            
+            strlcat(x11_path, kX11AppBundlePath, sizeof(x11_path));
+#ifdef DEBUG
+            fprintf(stderr, "XQuartz: X11.app = %s\n", x11_path);
+#endif
+            break;
+        case kLSApplicationNotFoundErr:
+            fprintf(stderr, "XQuartz: Unable to find application for %s\n", kX11AppBundleId);
+            exit(4);
+        default:
+            fprintf(stderr, "XQuartz: Unable to find application for %s, error code = %d\n", 
+                    kX11AppBundleId, (int)osstatus);
+            exit(5);
+    }
+}
+
+#ifndef BUILD_DATE
+#define BUILD_DATE "?"
+#endif
+#ifndef XSERVER_VERSION
+#define XSERVER_VERSION "?"
+#endif
+
+int main(int argc, char **argv) {
+    
+    if(argc == 2 && !strcmp(argv[1], "-version")) {
+        fprintf(stderr, "X.org Release 7.3\n");
+        fprintf(stderr, "X.Org X Server %s\n", XSERVER_VERSION);
+        fprintf(stderr, "Build Date: %s\n", BUILD_DATE);
+        return 0;
+    }
+    
+    set_x11_path();
+    
+    argv[0] = x11_path;
+    return execvp(x11_path, argv);
+}
diff --git a/hw/xquartz/stub/Makefile.am b/hw/xquartz/stub/Makefile.am
deleted file mode 100644
index 3752dc1..0000000
--- a/hw/xquartz/stub/Makefile.am
+++ /dev/null
@@ -1,11 +0,0 @@
-AM_CPPFLAGS = \
-	-DBUILD_DATE=\"$(BUILD_DATE)\" \
-	-DXSERVER_VERSION=\"$(VERSION)\"
-
-bin_PROGRAMS = Xquartz
-
-Xquartz_SOURCES = \
-	stub.c
-
-Xquartz_LDFLAGS =  \
-	-framework CoreServices
diff --git a/hw/xquartz/stub/stub.c b/hw/xquartz/stub/stub.c
deleted file mode 100644
index 70f222c..0000000
--- a/hw/xquartz/stub/stub.c
+++ /dev/null
@@ -1,96 +0,0 @@
-/* Copyright (c) 2008 Apple Inc.
- *
- * 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 ABOVE LISTED COPYRIGHT
- * HOLDER(S) 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 name(s) of the above
- * 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.
- */
-
-#include <CoreServices/CoreServices.h>
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#include <string.h>
-#include <stdio.h>
-#include <unistd.h>
-
-#define kX11AppBundleId "org.x.X11"
-#define kX11AppBundlePath "/Contents/MacOS/X11"
-
-static char x11_path[PATH_MAX + 1];
-
-static void set_x11_path() {
-    CFURLRef appURL = NULL;
-    OSStatus osstatus = LSFindApplicationForInfo(kLSUnknownCreator, CFSTR(kX11AppBundleId), nil, nil, &appURL);
-    
-    switch (osstatus) {
-        case noErr:
-            if (appURL == NULL) {
-                fprintf(stderr, "xinit: Invalid response from LSFindApplicationForInfo(%s)\n", 
-                        kX11AppBundleId);
-                exit(1);
-            }
-            
-            if (!CFURLGetFileSystemRepresentation(appURL, true, (unsigned char *)x11_path, sizeof(x11_path))) {
-                fprintf(stderr, "xinit: Error resolving URL for %s\n", kX11AppBundleId);
-                exit(2);
-            }
-            
-            strlcat(x11_path, kX11AppBundlePath, sizeof(x11_path));
-#ifdef DEBUG
-            fprintf(stderr, "XQuartz: X11.app = %s\n", x11_path);
-#endif
-            break;
-        case kLSApplicationNotFoundErr:
-            fprintf(stderr, "XQuartz: Unable to find application for %s\n", kX11AppBundleId);
-            exit(4);
-        default:
-            fprintf(stderr, "XQuartz: Unable to find application for %s, error code = %d\n", 
-                    kX11AppBundleId, (int)osstatus);
-            exit(5);
-    }
-}
-
-#ifndef BUILD_DATE
-#define BUILD_DATE "?"
-#endif
-#ifndef XSERVER_VERSION
-#define XSERVER_VERSION "?"
-#endif
-
-int main(int argc, char **argv) {
-    
-    if(argc == 2 && !strcmp(argv[1], "-version")) {
-        fprintf(stderr, "X.org Release 7.3\n");
-        fprintf(stderr, "X.Org X Server %s\n", XSERVER_VERSION);
-        fprintf(stderr, "Build Date: %s\n", BUILD_DATE);
-        return 0;
-    }
-    
-    set_x11_path();
-    
-    argv[0] = x11_path;
-    return execvp(x11_path, argv);
-}
diff --git a/hw/xquartz/xpr/Makefile.am b/hw/xquartz/xpr/Makefile.am
index 6bf99a4..e74580f 100644
--- a/hw/xquartz/xpr/Makefile.am
+++ b/hw/xquartz/xpr/Makefile.am
@@ -1,5 +1,4 @@
-x11appdir = $(APPLE_APPLICATIONS_DIR)/X11.app/Contents/MacOS
-x11app_PROGRAMS = X11
+noinst_LTLIBRARIES = libXquartzXpr.la
 
 AM_CFLAGS =  $(XSERVER_CFLAGS) $(DIX_CFLAGS)
 AM_CPPFLAGS = \
@@ -7,7 +6,7 @@ AM_CPPFLAGS = \
 	-I$(top_srcdir)/miext \
 	-I$(top_srcdir)/miext/rootless
 
-X11_SOURCES = \
+libXquartzXpr_la_SOURCES = \
 	appledri.c \
 	dri.c \
 	xprAppleWM.c \
@@ -19,36 +18,7 @@ X11_SOURCES = \
 	x-hook.c \
 	x-list.c
 
-X11_LDADD = \
-	$(top_builddir)/hw/xquartz/libXquartz.la \
-	$(top_builddir)/dix/dixfonts.lo \
-	$(top_builddir)/miext/rootless/librootless.la \
-	$(DARWIN_LIBS) $(XSERVER_LIBS) $(XSERVER_SYS_LIBS) -lXplugin -lX11
-
-X11_LDFLAGS =  \
-	-XCClinker -Objc \
-	-Wl,-u,_miDCInitialize \
-	-Wl,-framework,Carbon \
-	-L/System/Library/Frameworks/OpenGL.framework/Libraries -lGL \
-	-Wl,-framework,OpenGL \
-	-Wl,-framework,Cocoa \
-	-Wl,-framework,CoreAudio \
-	-Wl,-framework,IOKit
-
-appmandir = $(APP_MAN_DIR)
-appman_PRE = Xquartz.man.pre
-appman_PROCESSED = $(appman_PRE:man.pre=man)
-appman_DATA = $(appman_PRE:man.pre=@APP_MAN_SUFFIX@)
-
-CLEANFILES = $(appman_PROCESSED) $(appman_DATA)
-
-include $(top_srcdir)/cpprules.in
-
-.man.$(APP_MAN_SUFFIX):
-	cp $< $@
-
 EXTRA_DIST = \
-	Xquartz.man.pre \
 	dri.h \
 	dristruct.h \
 	appledri.h \
diff --git a/hw/xquartz/xpr/Xquartz.man.pre b/hw/xquartz/xpr/Xquartz.man.pre
deleted file mode 100644
index 315db1c..0000000
--- a/hw/xquartz/xpr/Xquartz.man.pre
+++ /dev/null
@@ -1,156 +0,0 @@
-.TH XQUARTZ 1 __vendorversion__
-.SH NAME
-Xquartz \- X window system server for Quartz operating system
-.SH SYNOPSIS
-.B Xquartz
-[ options ] ...
-.SH DESCRIPTION
-.I Xquartz
-is the X window server for Mac OS X provided by Apple.
-.I Xquartz
-runs in parallel with Aqua in rootless mode. In rootless mode, the X
-window system and Mac OS X share your display.  The root window of the
-X11 display is the size of the screen and contains all the other
-windows. The X11 root window is not displayed in rootless mode as Mac
-OS X handles the desktop background.
-.SH OPTIONS
-.PP
-In addition to the normal server options described in the \fIXserver(1)\fP
-manual page, \fIXquartz\fP accepts the following command line switches:
-.TP 8
-.B \-fakebuttons
-Emulates a 3 button mouse using modifier keys. By default, the Command modifier
-is used to emulate button 2 and Option is used for button 3. Thus, clicking the
-first mouse button while holding down Command will act like clicking
-button 2. Holding down Option will simulate button 3.
-.TP 8
-.B \-nofakebuttons
-Do not emulate a 3 button mouse. This is the default.
-.TP 8
-.B "\-fakemouse2 \fImodifiers\fP"
-Change the modifier keys used to emulate the second mouse button. By default,
-Command is used to emulate the second button. Any combination of the following
-modifier names may be used: Shift, Option, Control, Command, Fn. For example,
-.B \-fakemouse2 """Option,Shift""
-will set holding Option, Shift and clicking on button one as equivalent to
-clicking the second mouse button.
-.TP 8
-.B "\-fakemouse3 \fImodifiers\fP"
-Change the modifier keys used to emulate the third mouse button. By default,
-Option is used to emulate the third button. Any combination of the following
-modifier names may be used: Shift, Option, Control, Command, Fn. For example,
-.B \-fakemouse3 """Control,Shift""
-will set holding Control, Shift and clicking on button one as equivalent to
-clicking the third mouse button.
-.TP 8
-.B "\-swapAltMeta"
-Swaps the meaning of the Alt and Meta modifier keys.
-.TP 8
-.B "\-keymap \fIfile\fP"
-On startup \fIXquartz\fP translates a Darwin keymapping into an X keymap.
-The default is to read this keymapping from USA.keymapping. With this option
-the keymapping will be read from \fIfile\fP instead. If the file's path is
-not specified, it will be searched for in Library/Keyboards/ underneath the
-following directories (in order): ~, /, /Network, /System.
-.TP 8
-.B \-nokeymap
-On startup \fIXquartz\fP translates a Darwin keymapping into an X keymap.
-With this option \fIXquartz\fP queries the kernel for the current keymapping
-instead of reading it from a file. This will often fail on newer kernels.
-.TP 8
-.B "\-depth \fIdepth\fP"
-Specifies the color bit depth to use. Currently only 15, and 24 color
-bits per pixel are supported. If not specified, defaults to the depth
-of the main display.
-.SH CUSTOMIZATION
-\fIXquartz\fP can also be customized using the defaults(1) command. The available options are:
-.TP 8
-.B defaults write org.x.X11 enable_fake_buttons -boolean true
-Equivalent to the \fB-fakebuttons\fP command line option.
-.TP 8
-.B defaults write org.x.X11 fake_button2 \fImodifiers\fP
-Equivalent to the \fB-fakemouse2\fP option.
-.TP 8
-.B defaults write org.x.X11 fake_button3 \fImodifiers\fP
-Equivalent to the \fB-fakemouse3\fP option.
-.TP 8
-.B defaults write org.x.X11 swap_alt_meta -boolean true
-Equivalent to the \fB-swapAltMeta\fP option.
-.TP 8
-.B defaults write org.x.X11 keymap_file \fIfilename\fP
-Equivalent to the \fB-keymap\fP option.
-.TP 8
-.B defaults write org.x.X11 no_quit_alert -boolean true
-Disables the alert dialog displayed when attempting to quit X11.
-.TP 8
-.B defaults write org.x.X11 no_auth -boolean true
-Stops the X server requiring that clients authenticate themselves when
-connecting. See Xsecurity(__miscmansuffix__).
-.TP 8
-.B defaults write org.x.X11 nolisten_tcp -boolean true
-Prevents the X server accepting remote connections.
-.TP 8
-.B defaults write org.x.X11 xinit_kills_server -boolean false
-Stops the X server exiting when the xinitrc script terminates.
-.TP 8
-.B defaults write org.x.X11 fullscreen_hotkeys -boolean false
-Allows system hotkeys to be handled while in X11 fullscreen mode.
-.TP 8
-.B defaults write org.x.X11 enable_system_beep -boolean false
-Don't use the standard system beep effect for X11 alerts.
-.TP 8
-.B defaults write org.x.X11 enable_key_equivalents -boolean false
-Disable menu keyboard equivalents while X11 windows are focused.
-.TP 8
-.B defaults write org.x.X11 depth \fIdepth\fP
-Equivalent to the \fB-depth\fP option.
-.SH "SEE ALSO"
-.PP
-X(__miscmansuffix__), Xserver(1), xdm(1), xinit(1)
-.PP
-.SH AUTHORS
-XFree86 was originally ported to Mac OS X Server by John Carmack. Dave
-Zarzycki used this as the basis of his port of XFree86 4.0 to Darwin 1.0.
-Torrey T. Lyons improved and integrated this code into the XFree86
-Project's mainline for the 4.0.2 release.
-.PP
-The following members of the XonX Team contributed to the following
-releases (in alphabetical order):
-.TP 4
-XFree86 4.1.0:
-.br
-Rob Braun - Darwin x86 support
-.br
-Torrey T. Lyons - Project Lead
-.br
-Andreas Monitzer - Cocoa version of XDarwin front end
-.br
-Gregory Robert Parker - Original Quartz implementation
-.br
-Christoph Pfisterer - Dynamic shared X libraries
-.br
-Toshimitsu Tanaka - Japanese localization
-.TP 4
-XFree86 4.2.0:
-.br
-Rob Braun - Darwin x86 support
-.br
-Pablo Di Noto - Spanish localization
-.br
-Paul Edens - Dutch localization
-.br
-Kyunghwan Kim - Korean localization
-.br
-Mario Klebsch - Non-US keyboard support
-.br
-Torrey T. Lyons - Project Lead
-.br
-Andreas Monitzer - German localization
-.br
-Patrik Montgomery - Swedish localization
-.br
-Greg Parker - Rootless support
-.br
-Toshimitsu Tanaka - Japanese localization
-.br
-Olivier Verdier - French localization
commit 28ac79450c69219dc501e072c6e5028e7136380d
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date:   Thu May 8 19:47:40 2008 -0700

    Updated .gitignore for new Xquartz layout
    (cherry picked from commit cd4d2355e227549a3410485a130549dd91ccdcfe)

diff --git a/.gitignore b/.gitignore
index a6925d9..d6d7adf 100644
--- a/.gitignore
+++ b/.gitignore
@@ -278,8 +278,9 @@ hw/xprint/doc/Xprt.1x
 hw/xprint/doc/Xprt.man
 hw/xprint/dpmsstubs-wrapper.c
 hw/xprint/miinitext-wrapper.c
-hw/xquartz/xpr/Xquartz
-hw/xquartz/xpr/Xquartz.1
+hw/xquartz/mach-startup/X11
+hw/xquartz/mach-startup/Xquartz
+hw/xquartz/doc/Xquartz.1
 include/dix-config.h
 include/kdrive-config.h
 include/xgl-config.h
commit a07c5ad172b343ef26d2b41ff25f143950441c23
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date:   Thu May 8 16:57:42 2008 -0700

    XQuartz: Set bundle version to 2.3.0
    (cherry picked from commit 8a0524b30e1e860f3ae35741c116fc8da28aef79)

diff --git a/hw/xquartz/bundle/Info.plist b/hw/xquartz/bundle/Info.plist
index 6ba02dd..4b0830f 100644
--- a/hw/xquartz/bundle/Info.plist
+++ b/hw/xquartz/bundle/Info.plist
@@ -19,7 +19,7 @@
 	<key>CFBundlePackageType</key>
 		<string>APPL</string>
 	<key>CFBundleShortVersionString</key>
-		<string>2.2.0</string>
+		<string>2.3.0</string>
 	<key>CFBundleSignature</key>
 		<string>x11a</string>
 	<key>CSResourcesFileMapped</key>
commit 05f23ed3ea6ee0f052aee41b6573325fe0063fd8
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date:   Tue May 6 16:12:41 2008 -0700

    XQuartz: Fixed some issue in our bundle creation
    (cherry picked from commit 330ffad5477e32c5ab9ed338bc628bd5ae9f4c98)

diff --git a/hw/xquartz/bundle/mk_bundke.sh b/hw/xquartz/bundle/mk_bundke.sh
index 750af9c..0b2a144 100755
--- a/hw/xquartz/bundle/mk_bundke.sh
+++ b/hw/xquartz/bundle/mk_bundke.sh
@@ -4,31 +4,22 @@
 
 BUNDLE_ROOT=$1
 
-mkdir -p ${BUNDLE_ROOT}/Contents/MacOS
-[ -d ${BUNDLE_ROOT}/Contents/MacOS ] || exit 1
-
-mkdir -p ${BUNDLE_ROOT}/Contents/Resources/English.lproj/main.nib
-[ -d ${BUNDLE_ROOT}/Contents/Resources/English.lproj/main.nib ] || exit 1
-
-if [[ $(id -u) == 0 ]] ; then
-	OWNERSHIP="-o root -g admin"
-else
-	OWNERSHIP=""
-fi
-
 localities="Dutch English French German Italian Japanese Spanish da fi ko no pl pt pt_PT ru sv zh_CN zh_TW"
 for lang in ${localities} ; do
+    mkdir -p ${BUNDLE_ROOT}/Contents/Resources/${lang}.lproj/main.nib
+    [ -d ${BUNDLE_ROOT}/Contents/Resources/${lang}.lproj/main.nib ] || exit 1
+
     for f in InfoPlist.strings Localizable.strings main.nib/keyedobjects.nib ; do
-	if [[ $(id -u) == 0 ]] ; then
-	        install ${OWNERSHIP} -m 644 Resources/${lang}.lproj/$f ${BUNDLE_ROOT}/Contents/Resources/${lang}.lproj/${f}
-	else
-	        install ${OWNERSHIP} -m 644 Resources/${lang}.lproj/$f ${BUNDLE_ROOT}/Contents/Resources/${lang}.lproj/${f}
-	fi
+        install -m 644 Resources/${lang}.lproj/$f ${BUNDLE_ROOT}/Contents/Resources/${lang}.lproj/${f}
     done
 done
 
-install ${OWNERSHIP} -m 644 Resources/English.lproj/main.nib//designable.nib ${BUNDLE_ROOT}/Contents/Resources/English.lproj/main.nib
-install ${OWNERSHIP} -m 644 Resources/X11.icns ${BUNDLE_ROOT}/Contents/Resources
+install -m 644 Resources/English.lproj/main.nib//designable.nib ${BUNDLE_ROOT}/Contents/Resources/English.lproj/main.nib
+install -m 644 Resources/X11.icns ${BUNDLE_ROOT}/Contents/Resources
+
+install -m 644 Info.plist ${BUNDLE_ROOT}/Contents
+install -m 644 PkgInfo ${BUNDLE_ROOT}/Contents
 
-install ${OWNERSHIP} -m 644 Info.plist ${BUNDLE_ROOT}/Contents
-install ${OWNERSHIP} -m 644 PkgInfo ${BUNDLE_ROOT}/Contents
+if [[ $(id -u) == 0 ]] ; then
+	chown -R root:admin ${BUNDLE_ROOT}
+fi
commit 90b963c0da2b33bdc21483f1a089b95c7e717333
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date:   Tue May 6 16:07:33 2008 -0700

    Set CSRG_BASED on OSX
    (cherry picked from commit ff085deba18682caa2f93d61a75b38db87d747b1)

diff --git a/configure.ac b/configure.ac
index beef3a2..9671ada 100644
--- a/configure.ac
+++ b/configure.ac
@@ -402,6 +402,9 @@ case $host_os in
   *solaris*)
 	PKG_CHECK_EXISTS(libdrm, DRI=yes, DRI=no)
 	;;
+  darwin*)
+	AC_DEFINE(CSRG_BASED, 1, [System is BSD-like])
+	;;
 esac
 AM_CONDITIONAL(KDRIVE_HW, test "x$KDRIVE_HW" = xyes)
 
commit ff013b0da4e6d33b2b69ce1212e9bd62050574e1
Author: Peter Hutterer <peter at cs.unisa.edu.au>
Date:   Thu May 8 16:58:31 2008 +0930

    config: override xkb_{r,m,l,v} with Xkb{r,m,l,v} if the latter is set.
    
    The HAL spec says that input.xkb.{rmlv}* can be sent, but if the user
    specifies a X-specific {rmlv}, then this is overridden through the use of
    input.x11_options.Xkb{RMLV}.
    However, the way how the server parses options--by ignoring capitalisation,
    underscores and spaces--the HAL and the x11_options would override each other.
    
    So we simply filter the options, letting Xkb{RMLV} override xkb_{rmlv} and
    only actually add them to the device after parsing _all_ options.
    
    * rmlv ... rules, model, layout, variant
    
    See Bug 13037 <http://bugs.freedesktop.org/show_bug.cgi?id=13037>
    (cherry picked from commit fc35d1e3be201e3821413bb2eeb8d43e1e56ba17)

diff --git a/config/hal.c b/config/hal.c
index 7794d8e..67ffa03 100644
--- a/config/hal.c
+++ b/config/hal.c
@@ -48,6 +48,15 @@ struct config_hal_info {
     LibHalContext *hal_ctx;
 };
 
+/* Used for special handling of xkb options. */
+struct xkb_options {
+    char* layout;
+    char* model;
+    char* rules;
+    char* variant;
+};
+
+
 static void
 remove_device(DeviceIntPtr dev)
 {
@@ -164,10 +173,11 @@ device_added(LibHalContext *hal_ctx, const char *udi)
     InputOption *options = NULL, *tmpo = NULL;
     DeviceIntPtr dev;
     DBusError error;
+    struct xkb_options xkb_opts = {0};
 
     LibHalPropertySet *set = NULL;
 	LibHalPropertySetIterator set_iter;
-    char *psi_key = NULL, *tmp_val, *tmp_key;
+    char *psi_key = NULL, *tmp_val;
 
 
     dbus_error_init(&error);
@@ -241,27 +251,71 @@ device_added(LibHalContext *hal_ctx, const char *udi)
                 tmp_val = get_prop_string(hal_ctx, udi, psi_key);
 
                 if (tmp_val){
-                    add_option(&options, psi_key + sizeof(LIBHAL_PROP_KEY)-1, tmp_val);
-                    xfree(tmp_val);
+                    char* tmp;
+
+                    /* xkb needs special handling. HAL specs include
+                     * input.xkb.xyz options, but the x11-input.fdi specifies
+                     * input.x11_options.Xkbxyz options. By default, we use
+                     * the former, unless the specific X11 ones are specified.
+                     * Since we can't predict the order in which the keys
+                     * arrive, we need to store them.
+                     */
+                    if ((tmp = strcasestr(psi_key, "xkb")))
+                    {
+                        if (!strcasecmp(&tmp[3], "layout"))
+                        {
+                            if (xkb_opts.layout)
+                                xfree(xkb_opts.layout);
+                            xkb_opts.layout = strdup(tmp_val);
+                        } else if (!strcasecmp(&tmp[3], "model"))
+                        {
+                            if (xkb_opts.model)
+                                xfree(xkb_opts.model);
+                            xkb_opts.model = strdup(tmp_val);
+                        } else if (!strcasecmp(&tmp[3], "rules"))
+                        {
+                            if (xkb_opts.rules)
+                                xfree(xkb_opts.rules);
+                            xkb_opts.rules = strdup(tmp_val);
+                        } else if (!strcasecmp(&tmp[3], "variant"))
+                        {
+                            if (xkb_opts.variant)
+                                xfree(xkb_opts.variant);
+                            xkb_opts.variant = strdup(tmp_val);
+                        }
+                    } else
+                    {
+                        /* all others */
+                        add_option(&options, psi_key + sizeof(LIBHAL_PROP_KEY)-1, tmp_val);
+                        xfree(tmp_val);
+                    }
                 }
-
-            /* evdev's XKB options... we should probably depreciate this usage */
             } else if (!strncasecmp(psi_key, LIBHAL_XKB_PROP_KEY, sizeof(LIBHAL_XKB_PROP_KEY)-1)){
 
                 /* only support strings for all values */
                 tmp_val = get_prop_string(hal_ctx, udi, psi_key);
 
                 if (tmp_val){
-                    /* add "xkb_" + NULL */
-		    tmp_key = xalloc(strlen(psi_key) - ( sizeof(LIBHAL_XKB_PROP_KEY) - 1) + 5);
-
-                    if (!tmp_key){
-                        LogMessage(X_ERROR, "config/hal: couldn't allocate memory for option %s\n", psi_key);
-                    } else {
-                        sprintf(tmp_key, "xkb_%s", psi_key + sizeof(LIBHAL_XKB_PROP_KEY)-1);
-                        add_option(&options, tmp_key, tmp_val);
-
-                        xfree(tmp_key);
+                    char* tmp;
+
+                    tmp = &psi_key[sizeof(LIBHAL_XKB_PROP_KEY) - 1];
+
+                    if (!strcasecmp(tmp, "layout"))
+                    {
+                        if (!xkb_opts.layout)
+                            xkb_opts.layout = strdup(tmp_val);
+                    } else if (!strcasecmp(tmp, "rules"))
+                    {
+                        if (!xkb_opts.rules)
+                            xkb_opts.rules = strdup(tmp_val);
+                    } else if (!strcasecmp(tmp, "variant"))
+                    {
+                        if (!xkb_opts.variant)
+                            xkb_opts.variant = strdup(tmp_val);
+                    } else if (!strcasecmp(tmp, "model"))
+                    {
+                        if (!xkb_opts.model)
+                            xkb_opts.model = strdup(tmp_val);
                     }
                     xfree(tmp_val);
                 }
@@ -272,6 +326,17 @@ device_added(LibHalContext *hal_ctx, const char *udi)
         libhal_psi_next(&set_iter);
     }
 
+
+    /* Now add xkb options */
+    if (xkb_opts.layout)
+        add_option(&options, "xkb_layout", xkb_opts.layout);
+    if (xkb_opts.rules)
+        add_option(&options, "xkb_rules", xkb_opts.rules);
+    if (xkb_opts.variant)
+        add_option(&options, "xkb_variant", xkb_opts.variant);
+    if (xkb_opts.model)
+        add_option(&options, "xkb_model", xkb_opts.model);
+
     /* this isn't an error, but how else do you output something that the user can see? */
     LogMessage(X_INFO, "config/hal: Adding input device %s\n", name);
     if (NewInputDeviceRequest(options, &dev) != Success) {
@@ -304,6 +369,15 @@ unwind:
         xfree(tmpo);
     }
 
+    if (xkb_opts.layout)
+        xfree(xkb_opts.layout);
+    if (xkb_opts.rules)
+        xfree(xkb_opts.rules);
+    if (xkb_opts.model)
+        xfree(xkb_opts.model);
+    if (xkb_opts.variant)
+        xfree(xkb_opts.variant);
+
     dbus_error_free(&error);
 
     return;
commit 901978ebe0f446532255701cd536e246e805a55b
Author: Peter Hutterer <peter at cs.unisa.edu.au>
Date:   Thu May 8 14:05:56 2008 +0930

    config: remove trailing whitespaces.
    
    It makes my vim look ugly. Put "let c_space_errors=1" into your .vimrc.
    (cherry picked from commit 1f54c05cf8a6b82e5fc6362f7f8e8fdc2444b9e8)

diff --git a/config/hal.c b/config/hal.c
index f150646..7794d8e 100644
--- a/config/hal.c
+++ b/config/hal.c
@@ -119,7 +119,7 @@ get_prop_string(LibHalContext *hal_ctx, const char *udi, const char *name)
     return ret;
 }
 
-/* this function is no longer used... keep it here in case its needed in 
+/* this function is no longer used... keep it here in case its needed in
  * the future. */
 #if 0
 static char *
@@ -155,7 +155,7 @@ get_prop_string_array(LibHalContext *hal_ctx, const char *udi, const char *prop)
 
     return ret;
 }
-#endif 
+#endif
 
 static void
 device_added(LibHalContext *hal_ctx, const char *udi)
@@ -164,12 +164,12 @@ device_added(LibHalContext *hal_ctx, const char *udi)
     InputOption *options = NULL, *tmpo = NULL;
     DeviceIntPtr dev;
     DBusError error;
-	
+
     LibHalPropertySet *set = NULL;
 	LibHalPropertySetIterator set_iter;
     char *psi_key = NULL, *tmp_val, *tmp_key;
-    
-    
+
+
     dbus_error_init(&error);
 
     driver = get_prop_string(hal_ctx, udi, "input.x11_driver");
@@ -178,13 +178,13 @@ device_added(LibHalContext *hal_ctx, const char *udi)
         LogMessageVerb(X_INFO,7,"config/hal: no driver specified for device %s\n", udi);
         goto unwind;
     }
-    
+
     path = get_prop_string(hal_ctx, udi, "input.device");
     if (!path) {
         LogMessage(X_WARNING,"config/hal: no driver or path specified for %s\n", udi);
         goto unwind;
     }
-    
+
     name = get_prop_string(hal_ctx, udi, "info.product");
     if (!name)
         name = xstrdup("(unnamed)");
@@ -194,7 +194,7 @@ device_added(LibHalContext *hal_ctx, const char *udi)
         LogMessage(X_ERROR, "config/hal: couldn't allocate space for input options!\n");
         goto unwind;
     }
-    
+
     options->key = xstrdup("_source");
     options->value = xstrdup("server/hal");
     if (!options->key || !options->value) {
@@ -202,14 +202,14 @@ device_added(LibHalContext *hal_ctx, const char *udi)
         goto unwind;
     }
 
-    /* most drivers use device.. not path. evdev uses both however, but the 
+    /* most drivers use device.. not path. evdev uses both however, but the
      * path version isn't documented apparently. support both for now. */
     add_option(&options, "path", path);
     add_option(&options, "device", path);
-    
+
     add_option(&options, "driver", driver);
     add_option(&options, "name", name);
-    
+
     config_info = xalloc(strlen(udi) + 5); /* "hal:" and NULL */
     if (!config_info) {
         LogMessage(X_ERROR, "config/hal: couldn't allocate name\n");
@@ -220,58 +220,58 @@ device_added(LibHalContext *hal_ctx, const char *udi)
     /* ok, grab options from hal.. iterate through all properties
     * and lets see if any of them are options that we can add */
     set = libhal_device_get_all_properties(hal_ctx, udi, &error);
-    
+
     if (!set) {
         LogMessage(X_ERROR, "config/hal: couldn't get property list for %s: %s (%s)\n",
                udi, error.name, error.message);
         goto unwind;
     }
-	
+
     libhal_psi_init(&set_iter,set);
     while (libhal_psi_has_more(&set_iter)) {
         /* we are looking for supported keys.. extract and add to options */
-        psi_key = libhal_psi_get_key(&set_iter);    
-        
+        psi_key = libhal_psi_get_key(&set_iter);
+
         if (psi_key){
 
             /* normal options first (input.x11_options.<propname>) */
             if (!strncasecmp(psi_key, LIBHAL_PROP_KEY, sizeof(LIBHAL_PROP_KEY)-1)){
-                
+
                 /* only support strings for all values */
                 tmp_val = get_prop_string(hal_ctx, udi, psi_key);
-                
+
                 if (tmp_val){
                     add_option(&options, psi_key + sizeof(LIBHAL_PROP_KEY)-1, tmp_val);
                     xfree(tmp_val);
                 }
-            
+
             /* evdev's XKB options... we should probably depreciate this usage */
             } else if (!strncasecmp(psi_key, LIBHAL_XKB_PROP_KEY, sizeof(LIBHAL_XKB_PROP_KEY)-1)){
-                
+
                 /* only support strings for all values */
                 tmp_val = get_prop_string(hal_ctx, udi, psi_key);
-                
+
                 if (tmp_val){
                     /* add "xkb_" + NULL */
 		    tmp_key = xalloc(strlen(psi_key) - ( sizeof(LIBHAL_XKB_PROP_KEY) - 1) + 5);
-                    
+
                     if (!tmp_key){
                         LogMessage(X_ERROR, "config/hal: couldn't allocate memory for option %s\n", psi_key);
                     } else {
                         sprintf(tmp_key, "xkb_%s", psi_key + sizeof(LIBHAL_XKB_PROP_KEY)-1);
                         add_option(&options, tmp_key, tmp_val);
-                        
+
                         xfree(tmp_key);
                     }
                     xfree(tmp_val);
-                }   
+                }
             }
         }
-        
+
         /* psi_key doesn't need to be freed */
         libhal_psi_next(&set_iter);
     }
-	
+
     /* this isn't an error, but how else do you output something that the user can see? */
     LogMessage(X_INFO, "config/hal: Adding input device %s\n", name);
     if (NewInputDeviceRequest(options, &dev) != Success) {
@@ -413,7 +413,7 @@ config_hal_init(void)
 
     /* verbose message */
     LogMessageVerb(X_INFO,7,"config/hal: initialized");
-    
+
     return 1;
 }
 
commit 1c54c148895225e4ab3c781fe57d09e5f64353aa
Author: Daniel Stone <daniel at fooishbar.org>
Date:   Fri May 9 00:26:16 2008 +0300

    Revert "GL: Make errors non-fatal"
    
    Turns out this just caused segfaults further down the line.  Oops.
    
    This reverts commit 268d61e00cf4bc52c05f19eda7ab4f6accce12c8.

diff --git a/GL/glx/glxext.c b/GL/glx/glxext.c
index 1cbc279..85d8deb 100644
--- a/GL/glx/glxext.c
+++ b/GL/glx/glxext.c
@@ -288,7 +288,7 @@ void GlxExtensionInit(void)
 			    __glXDispatch, ResetExtension,
 			    StandardMinorOpcode);
     if (!extEntry) {
-	ErrorF("__glXExtensionInit: AddExtensions failed\n");
+	FatalError("__glXExtensionInit: AddExtensions failed\n");
 	return;
     }
     if (!AddExtensionAlias(GLX_EXTENSION_ALIAS, extEntry)) {
diff --git a/GL/glx/glxglcore.c b/GL/glx/glxglcore.c
index 00279b7..dafa9bc 100644
--- a/GL/glx/glxglcore.c
+++ b/GL/glx/glxglcore.c
@@ -510,7 +510,7 @@ handle_error:
 
     xfree(screen);
 
-    ErrorF("GLX: could not load software renderer\n");
+    FatalError("GLX: could not load software renderer\n");
 
     return NULL;
 }
commit f17ba5d5849c92603f453195aca384844ca76d74
Author: Adam Jackson <ajax at redhat.com>
Date:   Thu May 8 16:04:24 2008 -0400

    Bug #13104: Remove broken XAA a1 glyph fast path.

diff --git a/hw/xfree86/xaa/xaaPict.c b/hw/xfree86/xaa/xaaPict.c
index 76fcf09..784c649 100644
--- a/hw/xfree86/xaa/xaaPict.c
+++ b/hw/xfree86/xaa/xaaPict.c
@@ -588,150 +588,6 @@ XAADoGlyphs (CARD8         op,
         IS_OFFSCREEN_PIXMAP(pSrc->pDrawable))
         return FALSE;
 
-    if(maskFormat && (maskFormat->depth == 1) && 
-       (pSrc->pDrawable->width == 1) && (pSrc->pDrawable->height == 1) &&
-       (op == PictOpOver) && infoRec->WriteBitmap &&
-       !(infoRec->WriteBitmapFlags & NO_TRANSPARENCY))
-    {
-	CARD16 red, green, blue, alpha;
-	CARD32 pixel =
-                *((CARD32*)(((PixmapPtr)(pSrc->pDrawable))->devPrivate.ptr));
-	CARD32 *bits, *pntr, *pnt;
-	int x, y, i, n, left, top, right, bottom, width, height, pitch;
-	int L, T, R, B, X, Y, h, w, dwords, row, column, nbox;
-	int leftEdge, rightEdge, topLine, botLine;
-	BoxPtr pbox;
-	GlyphPtr glyph;
-	
-	if(!XAAGetRGBAFromPixel(pixel,&red,&green,&blue,&alpha,pSrc->format))
-		return FALSE;
-
-	if(alpha != 0xffff) return FALSE;
-
-	XAAGetPixelFromRGBA(&pixel, red, green, blue, 0, pDst->format);
-
-	if((infoRec->WriteBitmapFlags & RGB_EQUAL) && !((red == green) && (green == blue)))
-	   return FALSE;
-
-	x = pDst->pDrawable->x;
-	y = pDst->pDrawable->y;
-
-	while(nlist--) {
-	    x += list->xOff;
-	    y += list->yOff;
-	    left = right = X = x;
-	    top = bottom = Y = y;
-	    for(i = 0; i < list->len; i++) {
-		glyph = glyphs[i];
-
-		L = X - glyph->info.x;
-		if(L < left) left = L;
-		R = L + glyph->info.width;
-		if(R > right) right = R;
-
-		T = Y - glyph->info.y;
-		if(T < top) top = T;
-		B = T + glyph->info.height;
-		if(B > bottom) bottom = B;
-
-		X += glyph->info.xOff;
-		Y += glyph->info.yOff;
-	    }
-
-	    width = right - left;
-	    height = bottom - top;
-
-	    if(width && height) {
-		pitch = (((width + 31) & ~31) >> 5) + 1;
-		pntr = (CARD32*)xalloc(sizeof(CARD32) * pitch * height);
-		if(!pntr) 
-		    return TRUE;
-		bzero(pntr, sizeof(CARD32) * pitch * height);
-		n = list->len;
-
-		X = x; Y = y;
-		while(n--) {
-		    glyph = *glyphs++;
-		    h = glyph->info.height;
-		    w = glyph->info.width;
-		    if(h && w) {
-			row = y - top - glyph->info.y;
-			column = x - left - glyph->info.x;
-			pnt = pntr + (row * pitch) + (column >> 5);
-			column &= 31;
-			dwords = ((w + 31) >> 5) - 1;
-			bits = (CARD32 *)GlyphPixmap(glyph)[pScreen->myNum]->devPrivate.ptr;
-			if(dwords) {
-			  while(h--) {
-			    for(i = 0; i <= dwords; i++) {
-				if(column) {
-				    pnt[i] |= SHIFT_L(*bits, column);
-				    pnt[i + 1] |= SHIFT_R(*bits, 32 - column);
-				} else
-				    pnt[i] |= *bits;
-
-				if(i != dwords) bits++;
-			    }
-			    bits++;
-			    pnt += pitch;
-			  } 
-			} else {
-			  if(column) {
-			     while(h--) {
-				pnt[0] |= SHIFT_L(*bits, column);
-				pnt[0 + 1] |= SHIFT_R(*bits, 32 - column);
-				bits++;
-				pnt += pitch;
-			     }
-			  } else {
-			     while(h--) {
-				*pnt |= *bits++;
-				pnt += pitch;
-			     }			  
-			  }	  
-			}
-		    }
-		    x += glyph->info.xOff;
-		    y += glyph->info.yOff;
-		}
-		
-		nbox = REGION_NUM_RECTS(pDst->pCompositeClip);
-		pbox = REGION_RECTS(pDst->pCompositeClip);
-		
-		while(nbox && (top >= pbox->y2)) {
-		    pbox++; nbox--;
-		}
-		
-		while(nbox && (bottom > pbox->y1)) {		
-		    leftEdge = max(left, pbox->x1);
-		    rightEdge = min(right, pbox->x2);
-		    
-		    if(rightEdge > leftEdge) {
-		    	column = leftEdge - left;
-			topLine = max(top, pbox->y1);
-			botLine = min(bottom, pbox->y2);
-			h = botLine - topLine;
-			
-			if(h > 0) {
-			  (*infoRec->WriteBitmap)(infoRec->pScrn, 
-			  	leftEdge, topLine, rightEdge - leftEdge, h,
-				(unsigned char*)(pntr + 
-				  ((topLine - top) * pitch) + (column >> 5)),
-				pitch << 2, column & 31, pixel, -1, GXcopy, ~0);
-			}
-		    }	
-		    nbox--; pbox++;
-	   	}
-		xfree(pntr);
-	    } else {
-		x = X; y = Y;
-	    }
-	    list++;
-	}
-
-	return TRUE;
-    }
-
     /*
      * If it looks like we have a chance of being able to draw these
      * glyphs with an accelerated Composite, do that now to avoid
commit ddaecfa13cefee7c66b39b606c8640c6544d4943
Merge: 9c2e087... cf20df3...
Author: Adam Jackson <ajax at redhat.com>
Date:   Thu May 8 14:33:58 2008 -0400

    Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver

commit cf20df39cc78203d17b99223908af388ecbf7d0e
Author: Daniel Stone <daniel at fooishbar.org>
Date:   Wed May 7 22:24:19 2008 +0300

    XKB: Actually explain keymap failures
    
    When something went wrong building a keymap, try to explain to the user
    what it actually was, instead of the dreaded 'Failed to load XKB keymap'
    catch-all.

diff --git a/xkb/ddxLoad.c b/xkb/ddxLoad.c
index d80ce62..1fb0979 100644
--- a/xkb/ddxLoad.c
+++ b/xkb/ddxLoad.c
@@ -274,7 +274,7 @@ char tmpname[PATH_MAX];
 	    return True;
 	}
 	else
-	    DebugF("Error compiling keymap (%s)\n",keymap);
+	    LogMessage(X_ERROR, "Error compiling keymap (%s)\n", keymap);
 #ifdef WIN32
         /* remove the temporary file */
         unlink(tmpname);
@@ -282,9 +282,9 @@ char tmpname[PATH_MAX];
     }
     else {
 #ifndef WIN32
-	DebugF("Could not invoke keymap compiler\n");
+	LogMessage(X_ERROR, "XKB: Could not invoke xkbcomp\n");
 #else
-	DebugF("Could not open file %s\n", tmpname);
+	LogMessage(X_ERROR, "Could not open file %s\n", tmpname);
 #endif
     }
     if (nameRtrn)
@@ -350,11 +350,13 @@ unsigned	missing;
     if ((names->keycodes==NULL)&&(names->types==NULL)&&
 	(names->compat==NULL)&&(names->symbols==NULL)&&
 	(names->geometry==NULL)) {
+        LogMessage(X_ERROR, "XKB: No components provided for device %s\n",
+                   keybd->name);
         return 0;
     }
     else if (!XkbDDXCompileKeymapByNames(xkb,names,want,need,
                                          nameRtrn,nameRtrnLen)){
-	DebugF("Couldn't compile keymap file\n");
+	LogMessage(X_ERROR, "XKB: Couldn't compile keymap\n");
 	return 0;
     }
     file= XkbDDXOpenConfigFile(nameRtrn,fileName,PATH_MAX);
@@ -369,7 +371,7 @@ unsigned	missing;
 	(void) unlink (fileName);
 	return 0;
     }
-    else if (xkbDebugFlags) {
+    else {
 	DebugF("Loaded XKB keymap %s, defined=0x%x\n",fileName,(*xkbRtrn)->defined);
     }
     fclose(file);
@@ -390,32 +392,40 @@ XkbRF_RulesPtr	rules;
 
     if (!rules_name)
 	return False;
-    if (XkbBaseDirectory==NULL) {
-	if (strlen(rules_name)+7 > PATH_MAX)
-	    return False;
-	sprintf(buf,"rules/%s",rules_name);
-    }
-    else {
-	if (strlen(XkbBaseDirectory)+strlen(rules_name)+8 > PATH_MAX)
-	    return False;
-        sprintf(buf,"%s/rules/%s",XkbBaseDirectory,rules_name);
+
+    if (strlen(XkbBaseDirectory) + strlen(rules_name) + 8 > PATH_MAX) {
+        LogMessage(X_ERROR, "XKB: Rules name is too long\n");
+        return False;
     }
-    if ((file= fopen(buf,"r"))==NULL)
+    sprintf(buf,"%s/rules/%s", XkbBaseDirectory, rules_name);
+
+    file = fopen(buf, "r");
+    if (!file) {
+        LogMessage(X_ERROR, "XKB: Couldn't open rules file %s\n", file);
 	return False;
-    if ((rules= XkbRF_Create(0,0))==NULL) {
+    }
+
+    rules = XkbRF_Create(0, 0);
+    if (!rules) {
+        LogMessage(X_ERROR, "XKB: Couldn't create rules struct\n");
 	fclose(file);
 	return False;
     }
-    if (!XkbRF_LoadRules(file,rules)) {
+
+    if (!XkbRF_LoadRules(file, rules)) {
+        LogMessage(X_ERROR, "XKB: Couldn't parse rules file %s\n", rules_name);
 	fclose(file);
 	XkbRF_Free(rules,True);
 	return False;
     }
-    bzero((char *)names,sizeof(XkbComponentNamesRec));
-    complete= XkbRF_GetComponents(rules,defs,names);
+
+    memset(names, 0, sizeof(*names));
+    complete = XkbRF_GetComponents(rules,defs,names);
     fclose(file);
-    XkbRF_Free(rules,True);
-    return complete;
-}
+    XkbRF_Free(rules, True);
 
+    if (!complete)
+        LogMessage(X_ERROR, "XKB: Rules returned no components\n");
 
+    return complete;
+}
commit 641a5f955b7b3ae04eeb6bc45fb30b0b531898e4
Author: Daniel Stone <daniel at fooishbar.org>
Date:   Wed May 7 22:29:04 2008 +0300

    Build: Ensure xf86DefModeSet.c ends in an empty line
    
    This shuts up a warning.

diff --git a/hw/xfree86/common/Makefile.am b/hw/xfree86/common/Makefile.am
index 0f44075..c4be599 100644
--- a/hw/xfree86/common/Makefile.am
+++ b/hw/xfree86/common/Makefile.am
@@ -25,6 +25,7 @@ MODEDEFSOURCES = $(srcdir)/vesamodes $(srcdir)/extramodes
 
 xf86DefModeSet.c: $(srcdir)/modeline2c.awk $(MODEDEFSOURCES)
 	cat $(MODEDEFSOURCES) | $(AWK) -f $(srcdir)/modeline2c.awk > $@
+	echo >> $@
 
 BUILT_SOURCES = xf86DefModeSet.c
 
commit 268d61e00cf4bc52c05f19eda7ab4f6accce12c8
Author: Daniel Stone <daniel at fooishbar.org>
Date:   Wed May 7 22:28:45 2008 +0300

    GL: Make errors non-fatal
    
    GLX, there's more to the world than just you.  If you fail to load the
    software renderer, don't bring the entire server down.
    
    The error path probably needs better testing on this one, but it seems
    mostly okay to me.

diff --git a/GL/glx/glxext.c b/GL/glx/glxext.c
index 85d8deb..1cbc279 100644
--- a/GL/glx/glxext.c
+++ b/GL/glx/glxext.c
@@ -288,7 +288,7 @@ void GlxExtensionInit(void)
 			    __glXDispatch, ResetExtension,
 			    StandardMinorOpcode);
     if (!extEntry) {
-	FatalError("__glXExtensionInit: AddExtensions failed\n");
+	ErrorF("__glXExtensionInit: AddExtensions failed\n");
 	return;
     }
     if (!AddExtensionAlias(GLX_EXTENSION_ALIAS, extEntry)) {
diff --git a/GL/glx/glxglcore.c b/GL/glx/glxglcore.c
index dafa9bc..00279b7 100644
--- a/GL/glx/glxglcore.c
+++ b/GL/glx/glxglcore.c
@@ -510,7 +510,7 @@ handle_error:
 
     xfree(screen);
 
-    FatalError("GLX: could not load software renderer\n");
+    ErrorF("GLX: could not load software renderer\n");
 
     return NULL;
 }
commit 9c2e0871cfbe54e73eec1f790a7e383d08555055
Author: Adam Jackson <ajax at redhat.com>
Date:   Wed May 7 13:21:26 2008 -0400

    Bug #13104: XAA: Adapt to glyph storage changes.
    
    Glyph bits are now stored in a proper pixmap, not just hanging off the
    end of a GlyphRec.

diff --git a/hw/xfree86/xaa/xaaPict.c b/hw/xfree86/xaa/xaaPict.c
index 74e90e3..76fcf09 100644
--- a/hw/xfree86/xaa/xaaPict.c
+++ b/hw/xfree86/xaa/xaaPict.c
@@ -660,7 +660,7 @@ XAADoGlyphs (CARD8         op,
 			pnt = pntr + (row * pitch) + (column >> 5);
 			column &= 31;
 			dwords = ((w + 31) >> 5) - 1;
-			bits = (CARD32*)(glyph + 1);
+			bits = (CARD32 *)GlyphPixmap(glyph)[pScreen->myNum]->devPrivate.ptr;
 			if(dwords) {
 			  while(h--) {
 			    for(i = 0; i <= dwords; i++) {
commit b6a0c6d4864f73a18beb841b16e9be56f2fcd77e
Author: Alan Coopersmith <alan.coopersmith at sun.com>
Date:   Tue May 6 17:06:34 2008 -0700

    Allow using libmd instead of libcrypto for SHA1 hashing in render/glyph.c
    
    Builders can force one or the other by passing SHA1_LIB & SHA1_CFLAGS
    to configure

diff --git a/configure.ac b/configure.ac
index 9b77534..beef3a2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1137,15 +1137,25 @@ PKG_CHECK_MODULES([XSERVERLIBS], [$REQUIRED_LIBS])
 
 # OpenSSL used for SHA1 hashing in render/glyph.c, but we don't need all of
 # the OpenSSL libraries, just libcrypto
-PKG_CHECK_EXISTS([openssl],
- [PKG_CHECK_MODULES([OPENSSL], [openssl],
+# Some systems have matching functionality in the smaller/simpler libmd
+# Builders who want to force a choice can set SHA1_LIB and SHA1_CFLAGS
+if test "x$SHA1_LIB" = "x" ; then
+ AC_CHECK_LIB([md], [SHA1Init], [SHA1_LIB="-lmd"
+	AC_DEFINE([HAVE_SHA1_IN_LIBMD], [1],
+	   [Define to use libmd SHA1 functions instead of OpenSSL libcrypto])])
+fi
+if test "x$SHA1_LIB" = "x" ; then
+ PKG_CHECK_EXISTS([openssl],
+  [PKG_CHECK_MODULES([OPENSSL], [openssl],
    [OPENSSL_LIB_FLAGS=`$PKG_CONFIG --libs-only-L --libs-only-other openssl`])])
-LIBCRYPTO="$OPENSSL_LIB_FLAGS -lcrypto"
+ SHA1_LIB="$OPENSSL_LIB_FLAGS -lcrypto"
+ SHA1_CFLAGS="$OPENSSL_CFLAGS"
+fi
 
 # Autotools has some unfortunate issues with library handling.  In order to
 # get a server to rebuild when a dependency in the tree is changed, it must
 # be listed in SERVERNAME_DEPENDENCIES.  However, no system libraries may be
-# listed there, or some versions of autotols will break (especially if a -L
+# listed there, or some versions of autotools will break (especially if a -L
 # is required to find the library).  So, we keep two sets of libraries
 # detected: NAMESPACE_LIBS for in-tree libraries to be linked against, which
 # will go into the _DEPENDENCIES and _LDADD of the server, and
@@ -1157,9 +1167,9 @@ LIBCRYPTO="$OPENSSL_LIB_FLAGS -lcrypto"
 # XSERVER_SYS_LIBS is the set of out-of-tree libraries which all servers
 # require.
 #
-XSERVER_CFLAGS="${XSERVERCFLAGS_CFLAGS} ${OPENSSL_CFLAGS}"
+XSERVER_CFLAGS="${XSERVERCFLAGS_CFLAGS} ${SHA1_CFLAGS}"
 XSERVER_LIBS="$DIX_LIB $CONFIG_LIB $MI_LIB $OS_LIB"
-XSERVER_SYS_LIBS="${XSERVERLIBS_LIBS} ${SYS_LIBS} ${LIBS} ${LIBCRYPTO}"
+XSERVER_SYS_LIBS="${XSERVERLIBS_LIBS} ${SYS_LIBS} ${LIBS} ${SHA1_LIB}"
 AC_SUBST([XSERVER_LIBS])
 AC_SUBST([XSERVER_SYS_LIBS])
 
diff --git a/include/dix-config.h.in b/include/dix-config.h.in
index fc1caa3..387f65a 100644
--- a/include/dix-config.h.in
+++ b/include/dix-config.h.in
@@ -193,6 +193,9 @@
 /* Define to 1 if you have the <rpcsvc/dbm.h> header file. */
 #undef HAVE_RPCSVC_DBM_H
 
+/* Define to use libmd SHA1 functions instead of OpenSSL libcrypto */
+#undef HAVE_SHA1_IN_LIBMD
+
 /* Define to 1 if you have the `shmctl64' function. */
 #undef HAVE_SHMCTL64
 
diff --git a/render/glyph.c b/render/glyph.c
index 286e39d..de01970 100644
--- a/render/glyph.c
+++ b/render/glyph.c
@@ -26,8 +26,12 @@
 #include <dix-config.h>
 #endif
 
-#include <stddef.h>  /* buggy openssl/sha.h wants size_t */
-#include <openssl/sha.h>
+#ifdef HAVE_SHA1_IN_LIBMD /* Use libmd for SHA1 */
+# include <sha1.h>
+#else /* Use OpenSSL's libcrypto */
+# include <stddef.h>  /* buggy openssl/sha.h wants size_t */
+# include <openssl/sha.h>
+#endif
 
 #include "misc.h"
 #include "scrnintstr.h"
@@ -202,6 +206,14 @@ HashGlyph (xGlyphInfo    *gi,
 	   unsigned long size,
 	   unsigned char sha1[20])
 {
+#ifdef HAVE_SHA1_IN_LIBMD /* Use libmd for SHA1 */
+    SHA1_CTX ctx;
+
+    SHA1Init (&ctx);
+    SHA1Update (&ctx, gi, sizeof (xGlyphInfo));
+    SHA1Update (&ctx, bits, size);
+    SHA1Final (sha1, &ctx);
+#else /* Use OpenSSL's libcrypto */
     SHA_CTX ctx;
     int success;
 
@@ -220,6 +232,7 @@ HashGlyph (xGlyphInfo    *gi,
     success = SHA1_Final (sha1, &ctx);
     if (! success)
 	return BadAlloc;
+#endif
 
     return Success;
 }
commit 718652eaf9221e0eeec2c971dd7baa97f827451b
Author: Adam Jackson <ajax at redhat.com>
Date:   Tue May 6 17:52:37 2008 -0400

    Bug #13104: Don't let XAA glyph pixmaps anywhere near video memory.
    
    Since glyphs are stored in pixmaps now, they can make their way into VRAM,
    which invalidates a bunch of fast-path assumptions in the XAA code.  Thus
    you end up doing color-expands or WriteBitmap from la-la land and your
    aliased glyphs go all funny.
    
    Since XAA isn't ever growing the ability to do sane glyph accel, just force
    glyph pixmaps into host memory by catching them at CreatePixmap time.

diff --git a/hw/xfree86/xaa/xaaInit.c b/hw/xfree86/xaa/xaaInit.c
index 892cbcf..22a35a0 100644
--- a/hw/xfree86/xaa/xaaInit.c
+++ b/hw/xfree86/xaa/xaaInit.c
@@ -342,7 +342,9 @@ XAACreatePixmap(ScreenPtr pScreen, int w, int h, int depth, unsigned usage_hint)
     if (!infoRec->offscreenDepthsInitialized)
 	XAAInitializeOffscreenDepths (pScreen);
 
-    if(pScrn->vtSema && (infoRec->offscreenDepths & (1 << (depth - 1))) &&
+    if(pScrn->vtSema &&
+	(usage_hint != CREATE_PIXMAP_USAGE_GLYPH_PICTURE) &&
+	(infoRec->offscreenDepths & (1 << (depth - 1))) &&
 	(size >= MIN_OFFPIX_SIZE) && !SwitchedOut &&
 	(!infoRec->maxOffPixWidth || (w <= infoRec->maxOffPixWidth)) &&
 	(!infoRec->maxOffPixHeight || (h <= infoRec->maxOffPixHeight)) )
commit a85d3ac87cc354093bb1e88697c44254e7721bb9
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date:   Tue May 6 02:59:13 2008 -0700

    XQuartz: Fixed typo
    (cherry picked from commit 56b7988d2662caa4d31094695b414080e4470ed4)

diff --git a/hw/xquartz/bundle/mk_bundke.sh b/hw/xquartz/bundle/mk_bundke.sh
index 4b79771..750af9c 100755
--- a/hw/xquartz/bundle/mk_bundke.sh
+++ b/hw/xquartz/bundle/mk_bundke.sh
@@ -20,16 +20,15 @@ localities="Dutch English French German Italian Japanese Spanish da fi ko no pl
 for lang in ${localities} ; do
     for f in InfoPlist.strings Localizable.strings main.nib/keyedobjects.nib ; do
 	if [[ $(id -u) == 0 ]] ; then
-	        install $(OWNERSHIP) -m 644 Resources/${lang}.lproj/$f ${BUNDLE_ROOT}/Contents/Resources/${lang}.lproj/${f}
+	        install ${OWNERSHIP} -m 644 Resources/${lang}.lproj/$f ${BUNDLE_ROOT}/Contents/Resources/${lang}.lproj/${f}
 	else
-	        install $(OWNERSHIP) -m 644 Resources/${lang}.lproj/$f ${BUNDLE_ROOT}/Contents/Resources/${lang}.lproj/${f}
+	        install ${OWNERSHIP} -m 644 Resources/${lang}.lproj/$f ${BUNDLE_ROOT}/Contents/Resources/${lang}.lproj/${f}
 	fi
     done
 done
 
-install $(OWNERSHIP) -m 644 Resources/English.lproj/main.nib//designable.nib ${BUNDLE_ROOT}/Contents/Resources/English.lproj/main.nib
-install $(OWNERSHIP) -m 644 Resources/X11.icns ${BUNDLE_ROOT}/Contents/Resources
-
-install $(OWNERSHIP) -m 644 Info.plist ${BUNDLE_ROOT}/Contents
-install $(OWNERSHIP) -m 644 PkgInfo ${BUNDLE_ROOT}/Contents
+install ${OWNERSHIP} -m 644 Resources/English.lproj/main.nib//designable.nib ${BUNDLE_ROOT}/Contents/Resources/English.lproj/main.nib
+install ${OWNERSHIP} -m 644 Resources/X11.icns ${BUNDLE_ROOT}/Contents/Resources
 
+install ${OWNERSHIP} -m 644 Info.plist ${BUNDLE_ROOT}/Contents
+install ${OWNERSHIP} -m 644 PkgInfo ${BUNDLE_ROOT}/Contents
commit 077ced6384abad78253e857091e78f3685965b9d
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date:   Tue May 6 02:47:03 2008 -0700

    XQuartz: Added uncommitted files
    (cherry picked from commit e414ec462cfc63f8eb7f504f526f5a2c73f51e69)

diff --git a/hw/xquartz/bundle/PkgInfo b/hw/xquartz/bundle/PkgInfo
new file mode 100644
index 0000000..b8e0aec
--- /dev/null
+++ b/hw/xquartz/bundle/PkgInfo
@@ -0,0 +1 @@
+APPLx11a
\ No newline at end of file
diff --git a/hw/xquartz/bundle/mk_bundke.sh b/hw/xquartz/bundle/mk_bundke.sh
new file mode 100755
index 0000000..4b79771
--- /dev/null
+++ b/hw/xquartz/bundle/mk_bundke.sh
@@ -0,0 +1,35 @@
+#!/bin/sh
+#
+# 'Cause xcodebuild is hard to deal with
+
+BUNDLE_ROOT=$1
+
+mkdir -p ${BUNDLE_ROOT}/Contents/MacOS
+[ -d ${BUNDLE_ROOT}/Contents/MacOS ] || exit 1
+
+mkdir -p ${BUNDLE_ROOT}/Contents/Resources/English.lproj/main.nib
+[ -d ${BUNDLE_ROOT}/Contents/Resources/English.lproj/main.nib ] || exit 1
+
+if [[ $(id -u) == 0 ]] ; then
+	OWNERSHIP="-o root -g admin"
+else
+	OWNERSHIP=""
+fi
+
+localities="Dutch English French German Italian Japanese Spanish da fi ko no pl pt pt_PT ru sv zh_CN zh_TW"
+for lang in ${localities} ; do
+    for f in InfoPlist.strings Localizable.strings main.nib/keyedobjects.nib ; do
+	if [[ $(id -u) == 0 ]] ; then
+	        install $(OWNERSHIP) -m 644 Resources/${lang}.lproj/$f ${BUNDLE_ROOT}/Contents/Resources/${lang}.lproj/${f}
+	else
+	        install $(OWNERSHIP) -m 644 Resources/${lang}.lproj/$f ${BUNDLE_ROOT}/Contents/Resources/${lang}.lproj/${f}
+	fi
+    done
+done
+
+install $(OWNERSHIP) -m 644 Resources/English.lproj/main.nib//designable.nib ${BUNDLE_ROOT}/Contents/Resources/English.lproj/main.nib
+install $(OWNERSHIP) -m 644 Resources/X11.icns ${BUNDLE_ROOT}/Contents/Resources
+
+install $(OWNERSHIP) -m 644 Info.plist ${BUNDLE_ROOT}/Contents
+install $(OWNERSHIP) -m 644 PkgInfo ${BUNDLE_ROOT}/Contents
+
commit 80e502c5d1f7e9221c6ae40716d6402fd28d8806
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date:   Tue May 6 02:28:36 2008 -0700

    Fixed up dist
    (cherry picked from commit f225222ba2bf4f03425107f258d60b73c88efaec)

diff --git a/hw/xquartz/bundle/Makefile.am b/hw/xquartz/bundle/Makefile.am
index b777696..c61b049 100644
--- a/hw/xquartz/bundle/Makefile.am
+++ b/hw/xquartz/bundle/Makefile.am
@@ -7,62 +7,264 @@ resource_DATA = Xquartz.plist
 EXTRA_DIST = \
 	mk_bundke.sh \
 	$(resource_DATA) \
-	Info.plist \
-	X11.icns \
 	bundle-main.c \
-	X11.xcodeproj/project.pbxproj \
-	Dutch.lproj/InfoPlist.strings \
-	Dutch.lproj/Localizable.strings \
-	Dutch.lproj/main.nib/keyedobjects.nib \
-	English.lproj/InfoPlist.strings \
-	English.lproj/Localizable.strings \
-	English.lproj/main.nib/designable.nib \
-	English.lproj/main.nib/keyedobjects.nib \
-	French.lproj/InfoPlist.strings \
-	French.lproj/Localizable.strings \
-	French.lproj/main.nib/keyedobjects.nib \
-	German.lproj/InfoPlist.strings \
-	German.lproj/Localizable.strings \
-	German.lproj/main.nib/keyedobjects.nib \
-	Italian.lproj/InfoPlist.strings \
-	Italian.lproj/Localizable.strings \
-	Italian.lproj/main.nib/keyedobjects.nib \
-	Japanese.lproj/InfoPlist.strings \
-	Japanese.lproj/Localizable.strings \
-	Japanese.lproj/main.nib/keyedobjects.nib \
-	Spanish.lproj/InfoPlist.strings \
-	Spanish.lproj/Localizable.strings \
-	Spanish.lproj/main.nib/keyedobjects.nib \
-	da.lproj/InfoPlist.strings \
-	da.lproj/Localizable.strings \
-	da.lproj/main.nib/keyedobjects.nib \
-	fi.lproj/InfoPlist.strings \
-	fi.lproj/Localizable.strings \
-	fi.lproj/main.nib/keyedobjects.nib \
-	ko.lproj/InfoPlist.strings \
-	ko.lproj/Localizable.strings \
-	ko.lproj/main.nib/keyedobjects.nib \
-	no.lproj/InfoPlist.strings \
-	no.lproj/Localizable.strings \
-	no.lproj/main.nib/keyedobjects.nib \
-	pl.lproj/InfoPlist.strings \
-	pl.lproj/Localizable.strings \
-	pl.lproj/main.nib/keyedobjects.nib \
-	pt.lproj/InfoPlist.strings \
-	pt.lproj/Localizable.strings \
-	pt.lproj/main.nib/keyedobjects.nib \
-	pt_PT.lproj/InfoPlist.strings \
-	pt_PT.lproj/Localizable.strings \
-	pt_PT.lproj/main.nib/keyedobjects.nib \
-	ru.lproj/InfoPlist.strings \
-	ru.lproj/Localizable.strings \
-	ru.lproj/main.nib/keyedobjects.nib \
-	sv.lproj/InfoPlist.strings \
-	sv.lproj/Localizable.strings \
-	sv.lproj/main.nib/keyedobjects.nib \
-	zh_CN.lproj/InfoPlist.strings \
-	zh_CN.lproj/Localizable.strings \
-	zh_CN.lproj/main.nib/keyedobjects.nib \
-	zh_TW.lproj/InfoPlist.strings \
-	zh_TW.lproj/Localizable.strings \
-	zh_TW.lproj/main.nib/keyedobjects.nib
+	Resources/da.lproj/InfoPlist.strings \
+	Resources/da.lproj/Localizable.strings \
+	Resources/da.lproj/main.nib/keyedobjects.nib \
+	Resources/Dutch.lproj/InfoPlist.strings \
+	Resources/Dutch.lproj/Localizable.strings \
+	Resources/Dutch.lproj/main.nib/keyedobjects.nib \
+	Resources/English.lproj/InfoPlist.strings \
+	Resources/English.lproj/Localizable.strings \
+	Resources/English.lproj/main.nib/designable.nib \
+	Resources/English.lproj/main.nib/keyedobjects.nib \
+	Resources/fi.lproj/InfoPlist.strings \
+	Resources/fi.lproj/Localizable.strings \
+	Resources/fi.lproj/main.nib/keyedobjects.nib \
+	Resources/French.lproj/InfoPlist.strings \
+	Resources/French.lproj/Localizable.strings \
+	Resources/French.lproj/main.nib/keyedobjects.nib \
+	Resources/German.lproj/InfoPlist.strings \
+	Resources/German.lproj/Localizable.strings \
+	Resources/German.lproj/main.nib/keyedobjects.nib \
+	Resources/Italian.lproj/InfoPlist.strings \
+	Resources/Italian.lproj/Localizable.strings \
+	Resources/Italian.lproj/main.nib/keyedobjects.nib \
+	Resources/Japanese.lproj/InfoPlist.strings \
+	Resources/Japanese.lproj/Localizable.strings \
+	Resources/Japanese.lproj/main.nib/keyedobjects.nib \
+	Resources/ko.lproj/InfoPlist.strings \
+	Resources/ko.lproj/Localizable.strings \
+	Resources/ko.lproj/main.nib/keyedobjects.nib \
+	Resources/no.lproj/InfoPlist.strings \
+	Resources/no.lproj/Localizable.strings \
+	Resources/no.lproj/main.nib/keyedobjects.nib \
+	Resources/pl.lproj/InfoPlist.strings \
+	Resources/pl.lproj/Localizable.strings \
+	Resources/pl.lproj/main.nib/keyedobjects.nib \
+	Resources/pt.lproj/InfoPlist.strings \
+	Resources/pt.lproj/Localizable.strings \
+	Resources/pt.lproj/main.nib/keyedobjects.nib \
+	Resources/pt_PT.lproj/InfoPlist.strings \
+	Resources/pt_PT.lproj/Localizable.strings \
+	Resources/pt_PT.lproj/main.nib/keyedobjects.nib \
+	Resources/ru.lproj/InfoPlist.strings \
+	Resources/ru.lproj/Localizable.strings \
+	Resources/ru.lproj/main.nib/keyedobjects.nib \
+	Resources/Spanish.lproj/InfoPlist.strings \
+	Resources/Spanish.lproj/Localizable.strings \
+	Resources/Spanish.lproj/main.nib/keyedobjects.nib \
+	Resources/sv.lproj/InfoPlist.strings \
+	Resources/sv.lproj/Localizable.strings \
+	Resources/sv.lproj/main.nib/keyedobjects.nib \
+	Resources/X11.icns \
+	Resources/zh_CN.lproj/InfoPlist.strings \
+	Resources/zh_CN.lproj/Localizable.strings \
+	Resources/zh_CN.lproj/main.nib/keyedobjects.nib \
+	Resources/zh_TW.lproj/InfoPlist.strings \
+	Resources/zh_TW.lproj/Localizable.strings \
+	Resources/zh_TW.lproj/main.nib/keyedobjects.nib \
+	Sparkle.framework/Versions/A/Headers/NSApplication+AppCopies.h \
+	Sparkle.framework/Versions/A/Headers/NSFileManager+Authentication.h \
+	Sparkle.framework/Versions/A/Headers/NSFileManager+Verification.h \
+	Sparkle.framework/Versions/A/Headers/NSString+extras.h \
+	Sparkle.framework/Versions/A/Headers/RSS.h \
+	Sparkle.framework/Versions/A/Headers/Sparkle.h \
+	Sparkle.framework/Versions/A/Headers/SUAppcast.h \
+	Sparkle.framework/Versions/A/Headers/SUAppcastItem.h \
+	Sparkle.framework/Versions/A/Headers/SUAutomaticUpdateAlert.h \
+	Sparkle.framework/Versions/A/Headers/SUConstants.h \
+	Sparkle.framework/Versions/A/Headers/SUStatusChecker.h \
+	Sparkle.framework/Versions/A/Headers/SUStatusController.h \
+	Sparkle.framework/Versions/A/Headers/SUUnarchiver.h \
+	Sparkle.framework/Versions/A/Headers/SUUpdateAlert.h \
+	Sparkle.framework/Versions/A/Headers/SUUpdater.h \
+	Sparkle.framework/Versions/A/Headers/SUUtilities.h \
+	Sparkle.framework/Versions/A/Resources/ca.lproj/Sparkle.strings \
+	Sparkle.framework/Versions/A/Resources/ca.lproj/SUAutomaticUpdateAlert.nib/classes.nib \
+	Sparkle.framework/Versions/A/Resources/ca.lproj/SUAutomaticUpdateAlert.nib/info.nib \
+	Sparkle.framework/Versions/A/Resources/ca.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib \
+	Sparkle.framework/Versions/A/Resources/ca.lproj/SUUpdateAlert.nib/classes.nib \
+	Sparkle.framework/Versions/A/Resources/ca.lproj/SUUpdateAlert.nib/info.nib \
+	Sparkle.framework/Versions/A/Resources/ca.lproj/SUUpdateAlert.nib/keyedobjects.nib \
+	Sparkle.framework/Versions/A/Resources/cs.lproj/Sparkle.strings \
+	Sparkle.framework/Versions/A/Resources/cs.lproj/SUAutomaticUpdateAlert.nib/classes.nib \
+	Sparkle.framework/Versions/A/Resources/cs.lproj/SUAutomaticUpdateAlert.nib/info.nib \
+	Sparkle.framework/Versions/A/Resources/cs.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib \
+	Sparkle.framework/Versions/A/Resources/cs.lproj/SUUpdateAlert.nib/classes.nib \
+	Sparkle.framework/Versions/A/Resources/cs.lproj/SUUpdateAlert.nib/info.nib \
+	Sparkle.framework/Versions/A/Resources/cs.lproj/SUUpdateAlert.nib/keyedobjects.nib \
+	Sparkle.framework/Versions/A/Resources/cy.lproj/Sparkle.strings \
+	Sparkle.framework/Versions/A/Resources/cy.lproj/SUAutomaticUpdateAlert.nib/classes.nib \
+	Sparkle.framework/Versions/A/Resources/cy.lproj/SUAutomaticUpdateAlert.nib/info.nib \
+	Sparkle.framework/Versions/A/Resources/cy.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib \
+	Sparkle.framework/Versions/A/Resources/cy.lproj/SUUpdateAlert.nib/classes.nib \
+	Sparkle.framework/Versions/A/Resources/cy.lproj/SUUpdateAlert.nib/info.nib \
+	Sparkle.framework/Versions/A/Resources/cy.lproj/SUUpdateAlert.nib/keyedobjects.nib \
+	Sparkle.framework/Versions/A/Resources/da.lproj/Sparkle.strings \
+	Sparkle.framework/Versions/A/Resources/da.lproj/SUAutomaticUpdateAlert.nib/classes.nib \
+	Sparkle.framework/Versions/A/Resources/da.lproj/SUAutomaticUpdateAlert.nib/info.nib \
+	Sparkle.framework/Versions/A/Resources/da.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib \
+	Sparkle.framework/Versions/A/Resources/da.lproj/SUUpdateAlert.nib/classes.nib \
+	Sparkle.framework/Versions/A/Resources/da.lproj/SUUpdateAlert.nib/info.nib \
+	Sparkle.framework/Versions/A/Resources/da.lproj/SUUpdateAlert.nib/keyedobjects.nib \
+	Sparkle.framework/Versions/A/Resources/de.lproj/Sparkle.strings \
+	Sparkle.framework/Versions/A/Resources/de.lproj/SUAutomaticUpdateAlert.nib/classes.nib \
+	Sparkle.framework/Versions/A/Resources/de.lproj/SUAutomaticUpdateAlert.nib/info.nib \
+	Sparkle.framework/Versions/A/Resources/de.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib \
+	Sparkle.framework/Versions/A/Resources/de.lproj/SUUpdateAlert.nib/classes.nib \
+	Sparkle.framework/Versions/A/Resources/de.lproj/SUUpdateAlert.nib/info.nib \
+	Sparkle.framework/Versions/A/Resources/de.lproj/SUUpdateAlert.nib/keyedobjects.nib \
+	Sparkle.framework/Versions/A/Resources/en.lproj/Sparkle.strings \
+	Sparkle.framework/Versions/A/Resources/en.lproj/SUAutomaticUpdateAlert.nib/classes.nib \
+	Sparkle.framework/Versions/A/Resources/en.lproj/SUAutomaticUpdateAlert.nib/info.nib \
+	Sparkle.framework/Versions/A/Resources/en.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib \
+	Sparkle.framework/Versions/A/Resources/en.lproj/SUUpdateAlert.nib/classes.nib \
+	Sparkle.framework/Versions/A/Resources/en.lproj/SUUpdateAlert.nib/info.nib \
+	Sparkle.framework/Versions/A/Resources/en.lproj/SUUpdateAlert.nib/keyedobjects.nib \
+	Sparkle.framework/Versions/A/Resources/es.lproj/Sparkle.strings \
+	Sparkle.framework/Versions/A/Resources/es.lproj/SUAutomaticUpdateAlert.nib/classes.nib \
+	Sparkle.framework/Versions/A/Resources/es.lproj/SUAutomaticUpdateAlert.nib/info.nib \
+	Sparkle.framework/Versions/A/Resources/es.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib \
+	Sparkle.framework/Versions/A/Resources/es.lproj/SUUpdateAlert.nib/classes.nib \
+	Sparkle.framework/Versions/A/Resources/es.lproj/SUUpdateAlert.nib/info.nib \
+	Sparkle.framework/Versions/A/Resources/es.lproj/SUUpdateAlert.nib/keyedobjects.nib \
+	Sparkle.framework/Versions/A/Resources/fi.lproj/Sparkle.strings \
+	Sparkle.framework/Versions/A/Resources/fi.lproj/SUAutomaticUpdateAlert.nib/classes.nib \
+	Sparkle.framework/Versions/A/Resources/fi.lproj/SUAutomaticUpdateAlert.nib/info.nib \
+	Sparkle.framework/Versions/A/Resources/fi.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib \
+	Sparkle.framework/Versions/A/Resources/fi.lproj/SUUpdateAlert.nib/classes.nib \
+	Sparkle.framework/Versions/A/Resources/fi.lproj/SUUpdateAlert.nib/info.nib \
+	Sparkle.framework/Versions/A/Resources/fi.lproj/SUUpdateAlert.nib/keyedobjects.nib \
+	Sparkle.framework/Versions/A/Resources/fr.lproj/Sparkle.strings \
+	Sparkle.framework/Versions/A/Resources/fr.lproj/SUAutomaticUpdateAlert.nib/classes.nib \
+	Sparkle.framework/Versions/A/Resources/fr.lproj/SUAutomaticUpdateAlert.nib/info.nib \
+	Sparkle.framework/Versions/A/Resources/fr.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib \
+	Sparkle.framework/Versions/A/Resources/fr.lproj/SUUpdateAlert.nib/classes.nib \
+	Sparkle.framework/Versions/A/Resources/fr.lproj/SUUpdateAlert.nib/info.nib \
+	Sparkle.framework/Versions/A/Resources/fr.lproj/SUUpdateAlert.nib/keyedobjects.nib \
+	Sparkle.framework/Versions/A/Resources/he.lproj/Sparkle.strings \
+	Sparkle.framework/Versions/A/Resources/he.lproj/SUAutomaticUpdateAlert.nib/classes.nib \
+	Sparkle.framework/Versions/A/Resources/he.lproj/SUAutomaticUpdateAlert.nib/info.nib \
+	Sparkle.framework/Versions/A/Resources/he.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib \
+	Sparkle.framework/Versions/A/Resources/he.lproj/SUUpdateAlert.nib/classes.nib \
+	Sparkle.framework/Versions/A/Resources/he.lproj/SUUpdateAlert.nib/info.nib \
+	Sparkle.framework/Versions/A/Resources/he.lproj/SUUpdateAlert.nib/keyedobjects.nib \
+	Sparkle.framework/Versions/A/Resources/hu.lproj/Sparkle.strings \
+	Sparkle.framework/Versions/A/Resources/hu.lproj/SUAutomaticUpdateAlert.nib/classes.nib \
+	Sparkle.framework/Versions/A/Resources/hu.lproj/SUAutomaticUpdateAlert.nib/info.nib \
+	Sparkle.framework/Versions/A/Resources/hu.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib \
+	Sparkle.framework/Versions/A/Resources/hu.lproj/SUUpdateAlert.nib/classes.nib \
+	Sparkle.framework/Versions/A/Resources/hu.lproj/SUUpdateAlert.nib/info.nib \
+	Sparkle.framework/Versions/A/Resources/hu.lproj/SUUpdateAlert.nib/keyedobjects.nib \
+	Sparkle.framework/Versions/A/Resources/id.lproj/Sparkle.strings \
+	Sparkle.framework/Versions/A/Resources/id.lproj/SUAutomaticUpdateAlert.nib/classes.nib \
+	Sparkle.framework/Versions/A/Resources/id.lproj/SUAutomaticUpdateAlert.nib/info.nib \
+	Sparkle.framework/Versions/A/Resources/id.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib \
+	Sparkle.framework/Versions/A/Resources/id.lproj/SUUpdateAlert.nib/classes.nib \
+	Sparkle.framework/Versions/A/Resources/id.lproj/SUUpdateAlert.nib/info.nib \
+	Sparkle.framework/Versions/A/Resources/id.lproj/SUUpdateAlert.nib/keyedobjects.nib \
+	Sparkle.framework/Versions/A/Resources/Info.plist \
+	Sparkle.framework/Versions/A/Resources/is.lproj/Sparkle.strings \
+	Sparkle.framework/Versions/A/Resources/is.lproj/SUAutomaticUpdateAlert.nib/classes.nib \
+	Sparkle.framework/Versions/A/Resources/is.lproj/SUAutomaticUpdateAlert.nib/info.nib \
+	Sparkle.framework/Versions/A/Resources/is.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib \
+	Sparkle.framework/Versions/A/Resources/is.lproj/SUUpdateAlert.nib/classes.nib \
+	Sparkle.framework/Versions/A/Resources/is.lproj/SUUpdateAlert.nib/info.nib \
+	Sparkle.framework/Versions/A/Resources/is.lproj/SUUpdateAlert.nib/keyedobjects.nib \
+	Sparkle.framework/Versions/A/Resources/it.lproj/Sparkle.strings \
+	Sparkle.framework/Versions/A/Resources/it.lproj/SUAutomaticUpdateAlert.nib/classes.nib \
+	Sparkle.framework/Versions/A/Resources/it.lproj/SUAutomaticUpdateAlert.nib/info.nib \
+	Sparkle.framework/Versions/A/Resources/it.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib \
+	Sparkle.framework/Versions/A/Resources/it.lproj/SUUpdateAlert.nib/classes.nib \
+	Sparkle.framework/Versions/A/Resources/it.lproj/SUUpdateAlert.nib/info.nib \
+	Sparkle.framework/Versions/A/Resources/it.lproj/SUUpdateAlert.nib/keyedobjects.nib \
+	Sparkle.framework/Versions/A/Resources/ja.lproj/Sparkle.strings \
+	Sparkle.framework/Versions/A/Resources/ja.lproj/SUAutomaticUpdateAlert.nib/classes.nib \
+	Sparkle.framework/Versions/A/Resources/ja.lproj/SUAutomaticUpdateAlert.nib/info.nib \
+	Sparkle.framework/Versions/A/Resources/ja.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib \
+	Sparkle.framework/Versions/A/Resources/ja.lproj/SUUpdateAlert.nib/classes.nib \
+	Sparkle.framework/Versions/A/Resources/ja.lproj/SUUpdateAlert.nib/info.nib \
+	Sparkle.framework/Versions/A/Resources/ja.lproj/SUUpdateAlert.nib/keyedobjects.nib \
+	Sparkle.framework/Versions/A/Resources/ko.lproj/Sparkle.strings \
+	Sparkle.framework/Versions/A/Resources/ko.lproj/SUAutomaticUpdateAlert.nib/classes.nib \
+	Sparkle.framework/Versions/A/Resources/ko.lproj/SUAutomaticUpdateAlert.nib/info.nib \
+	Sparkle.framework/Versions/A/Resources/ko.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib \
+	Sparkle.framework/Versions/A/Resources/ko.lproj/SUUpdateAlert.nib/classes.nib \
+	Sparkle.framework/Versions/A/Resources/ko.lproj/SUUpdateAlert.nib/info.nib \
+	Sparkle.framework/Versions/A/Resources/ko.lproj/SUUpdateAlert.nib/keyedobjects.nib \
+	Sparkle.framework/Versions/A/Resources/nl.lproj/Sparkle.strings \
+	Sparkle.framework/Versions/A/Resources/nl.lproj/SUAutomaticUpdateAlert.nib/classes.nib \
+	Sparkle.framework/Versions/A/Resources/nl.lproj/SUAutomaticUpdateAlert.nib/info.nib \
+	Sparkle.framework/Versions/A/Resources/nl.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib \
+	Sparkle.framework/Versions/A/Resources/nl.lproj/SUUpdateAlert.nib/classes.nib \
+	Sparkle.framework/Versions/A/Resources/nl.lproj/SUUpdateAlert.nib/info.nib \
+	Sparkle.framework/Versions/A/Resources/nl.lproj/SUUpdateAlert.nib/keyedobjects.nib \
+	Sparkle.framework/Versions/A/Resources/no.lproj/Sparkle.strings \
+	Sparkle.framework/Versions/A/Resources/no.lproj/SUAutomaticUpdateAlert.nib/classes.nib \
+	Sparkle.framework/Versions/A/Resources/no.lproj/SUAutomaticUpdateAlert.nib/info.nib \
+	Sparkle.framework/Versions/A/Resources/no.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib \
+	Sparkle.framework/Versions/A/Resources/no.lproj/SUUpdateAlert.nib/classes.nib \
+	Sparkle.framework/Versions/A/Resources/no.lproj/SUUpdateAlert.nib/info.nib \
+	Sparkle.framework/Versions/A/Resources/no.lproj/SUUpdateAlert.nib/keyedobjects.nib \
+	Sparkle.framework/Versions/A/Resources/pl.lproj/Sparkle.strings \
+	Sparkle.framework/Versions/A/Resources/pl.lproj/SUAutomaticUpdateAlert.nib/classes.nib \
+	Sparkle.framework/Versions/A/Resources/pl.lproj/SUAutomaticUpdateAlert.nib/info.nib \
+	Sparkle.framework/Versions/A/Resources/pl.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib \
+	Sparkle.framework/Versions/A/Resources/pl.lproj/SUUpdateAlert.nib/classes.nib \
+	Sparkle.framework/Versions/A/Resources/pl.lproj/SUUpdateAlert.nib/info.nib \
+	Sparkle.framework/Versions/A/Resources/pl.lproj/SUUpdateAlert.nib/keyedobjects.nib \
+	Sparkle.framework/Versions/A/Resources/ru.lproj/Sparkle.strings \
+	Sparkle.framework/Versions/A/Resources/ru.lproj/SUAutomaticUpdateAlert.nib/classes.nib \
+	Sparkle.framework/Versions/A/Resources/ru.lproj/SUAutomaticUpdateAlert.nib/info.nib \
+	Sparkle.framework/Versions/A/Resources/ru.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib \
+	Sparkle.framework/Versions/A/Resources/ru.lproj/SUUpdateAlert.nib/classes.nib \
+	Sparkle.framework/Versions/A/Resources/ru.lproj/SUUpdateAlert.nib/info.nib \
+	Sparkle.framework/Versions/A/Resources/ru.lproj/SUUpdateAlert.nib/keyedobjects.nib \
+	Sparkle.framework/Versions/A/Resources/sk.lproj/Sparkle.strings \
+	Sparkle.framework/Versions/A/Resources/sk.lproj/SUAutomaticUpdateAlert.nib/classes.nib \
+	Sparkle.framework/Versions/A/Resources/sk.lproj/SUAutomaticUpdateAlert.nib/info.nib \
+	Sparkle.framework/Versions/A/Resources/sk.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib \
+	Sparkle.framework/Versions/A/Resources/sk.lproj/SUUpdateAlert.nib/classes.nib \
+	Sparkle.framework/Versions/A/Resources/sk.lproj/SUUpdateAlert.nib/info.nib \
+	Sparkle.framework/Versions/A/Resources/sk.lproj/SUUpdateAlert.nib/keyedobjects.nib \
+	Sparkle.framework/Versions/A/Resources/SUStatus.nib/classes.nib \
+	Sparkle.framework/Versions/A/Resources/SUStatus.nib/info.nib \
+	Sparkle.framework/Versions/A/Resources/SUStatus.nib/keyedobjects.nib \
+	Sparkle.framework/Versions/A/Resources/sv.lproj/Sparkle.strings \
+	Sparkle.framework/Versions/A/Resources/sv.lproj/SUAutomaticUpdateAlert.nib/classes.nib \
+	Sparkle.framework/Versions/A/Resources/sv.lproj/SUAutomaticUpdateAlert.nib/info.nib \
+	Sparkle.framework/Versions/A/Resources/sv.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib \
+	Sparkle.framework/Versions/A/Resources/sv.lproj/SUUpdateAlert.nib/classes.nib \
+	Sparkle.framework/Versions/A/Resources/sv.lproj/SUUpdateAlert.nib/info.nib \
+	Sparkle.framework/Versions/A/Resources/sv.lproj/SUUpdateAlert.nib/keyedobjects.nib \
+	Sparkle.framework/Versions/A/Resources/th.lproj/Sparkle.strings \
+	Sparkle.framework/Versions/A/Resources/th.lproj/SUAutomaticUpdateAlert.nib/classes.nib \
+	Sparkle.framework/Versions/A/Resources/th.lproj/SUAutomaticUpdateAlert.nib/info.nib \
+	Sparkle.framework/Versions/A/Resources/th.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib \
+	Sparkle.framework/Versions/A/Resources/th.lproj/SUUpdateAlert.nib/classes.nib \
+	Sparkle.framework/Versions/A/Resources/th.lproj/SUUpdateAlert.nib/info.nib \
+	Sparkle.framework/Versions/A/Resources/th.lproj/SUUpdateAlert.nib/keyedobjects.nib \
+	Sparkle.framework/Versions/A/Resources/tr.lproj/Sparkle.strings \
+	Sparkle.framework/Versions/A/Resources/tr.lproj/SUAutomaticUpdateAlert.nib/classes.nib \
+	Sparkle.framework/Versions/A/Resources/tr.lproj/SUAutomaticUpdateAlert.nib/info.nib \
+	Sparkle.framework/Versions/A/Resources/tr.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib \
+	Sparkle.framework/Versions/A/Resources/tr.lproj/SUUpdateAlert.nib/classes.nib \
+	Sparkle.framework/Versions/A/Resources/tr.lproj/SUUpdateAlert.nib/info.nib \
+	Sparkle.framework/Versions/A/Resources/tr.lproj/SUUpdateAlert.nib/keyedobjects.nib \
+	Sparkle.framework/Versions/A/Resources/zh_CN.lproj/Sparkle.strings \
+	Sparkle.framework/Versions/A/Resources/zh_CN.lproj/SUAutomaticUpdateAlert.nib/classes.nib \
+	Sparkle.framework/Versions/A/Resources/zh_CN.lproj/SUAutomaticUpdateAlert.nib/info.nib \
+	Sparkle.framework/Versions/A/Resources/zh_CN.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib \
+	Sparkle.framework/Versions/A/Resources/zh_CN.lproj/SUUpdateAlert.nib/classes.nib \
+	Sparkle.framework/Versions/A/Resources/zh_CN.lproj/SUUpdateAlert.nib/info.nib \
+	Sparkle.framework/Versions/A/Resources/zh_CN.lproj/SUUpdateAlert.nib/keyedobjects.nib \
+	Sparkle.framework/Versions/A/Resources/zh_TW.lproj/Sparkle.strings \
+	Sparkle.framework/Versions/A/Resources/zh_TW.lproj/SUAutomaticUpdateAlert.nib/classes.nib \
+	Sparkle.framework/Versions/A/Resources/zh_TW.lproj/SUAutomaticUpdateAlert.nib/info.nib \
+	Sparkle.framework/Versions/A/Resources/zh_TW.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib \
+	Sparkle.framework/Versions/A/Resources/zh_TW.lproj/SUUpdateAlert.nib/classes.nib \
+	Sparkle.framework/Versions/A/Resources/zh_TW.lproj/SUUpdateAlert.nib/info.nib \
+	Sparkle.framework/Versions/A/Resources/zh_TW.lproj/SUUpdateAlert.nib/keyedobjects.nib \
+	Sparkle.framework/Versions/A/Sparkle
+
diff --git a/hw/xquartz/bundle/X11.xcodeproj/project.pbxproj b/hw/xquartz/bundle/X11.xcodeproj/project.pbxproj
deleted file mode 100644
index 711408d..0000000
--- a/hw/xquartz/bundle/X11.xcodeproj/project.pbxproj
+++ /dev/null
@@ -1,487 +0,0 @@
-// !$*UTF8*$!
-{
-	archiveVersion = 1;
-	classes = {
-	};
-	objectVersion = 42;
-	objects = {
-
-/* Begin PBXBuildFile section */
-		527F24190B5D938C007840A7 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 0867D6AAFE840B52C02AAC07 /* InfoPlist.strings */; };
-		527F241A0B5D938C007840A7 /* main.nib in Resources */ = {isa = PBXBuildFile; fileRef = 02345980000FD03B11CA0E72 /* main.nib */; };
-		527F241B0B5D938C007840A7 /* X11.icns in Resources */ = {isa = PBXBuildFile; fileRef = 50459C5F038587C60ECA21EC /* X11.icns */; };
-		527F241D0B5D938C007840A7 /* bundle-main.c in Sources */ = {isa = PBXBuildFile; fileRef = 50EE2AB703849F0B0ECA21EC /* bundle-main.c */; };
-		527F241F0B5D938C007840A7 /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 50F4F0A7039D6ACA0E82C0CB /* CoreFoundation.framework */; };
-		527F24200B5D938C007840A7 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 570C5748047186C400ACF82F /* SystemConfiguration.framework */; };
-		527F24370B5D9D89007840A7 /* Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 527F24260B5D938C007840A7 /* Info.plist */; };
-		52880C6F0DCFF906003407EC /* Sparkle.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 52880C6E0DCFF906003407EC /* Sparkle.framework */; };
-		52D9C0ED0BCDDF6B00CD2AFC /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 52D9C0EB0BCDDF6B00CD2AFC /* Localizable.strings */; };
-/* End PBXBuildFile section */
-
-/* Begin PBXCopyFilesBuildPhase section */
-		52880C8C0DCFF9FC003407EC /* CopyFiles */ = {
-			isa = PBXCopyFilesBuildPhase;
-			buildActionMask = 2147483647;
-			dstPath = "";
-			dstSubfolderSpec = 10;
-			files = (
-				52880C6F0DCFF906003407EC /* Sparkle.framework in CopyFiles */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXCopyFilesBuildPhase section */
-
-/* Begin PBXFileReference section */
-		0867D6ABFE840B52C02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = "<group>"; };
-		1870340FFE93FCAF11CA0CD7 /* English */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = English; path = English.lproj/main.nib; sourceTree = "<group>"; };
-		3FB03E460D1B6C05005958A5 /* da */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = da; path = da.lproj/Localizable.strings; sourceTree = "<group>"; };
-		3FB03E470D1B6C05005958A5 /* Dutch */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = Dutch; path = Dutch.lproj/Localizable.strings; sourceTree = "<group>"; };
-		3FB03E480D1B6C05005958A5 /* fi */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fi; path = fi.lproj/Localizable.strings; sourceTree = "<group>"; };
-		3FB03E490D1B6C05005958A5 /* French */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = French; path = French.lproj/Localizable.strings; sourceTree = "<group>"; };
-		3FB03E4A0D1B6C05005958A5 /* German */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = German; path = German.lproj/Localizable.strings; sourceTree = "<group>"; };
-		3FB03E4B0D1B6C05005958A5 /* Italian */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = Italian; path = Italian.lproj/Localizable.strings; sourceTree = "<group>"; };
-		3FB03E4C0D1B6C05005958A5 /* Japanese */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = Japanese; path = Japanese.lproj/Localizable.strings; sourceTree = "<group>"; };
-		3FB03E4D0D1B6C05005958A5 /* ko */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ko; path = ko.lproj/Localizable.strings; sourceTree = "<group>"; };
-		3FB03E4E0D1B6C05005958A5 /* no */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = no; path = no.lproj/Localizable.strings; sourceTree = "<group>"; };
-		3FB03E4F0D1B6C05005958A5 /* pl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pl; path = pl.lproj/Localizable.strings; sourceTree = "<group>"; };
-		3FB03E500D1B6C05005958A5 /* pt */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pt; path = pt.lproj/Localizable.strings; sourceTree = "<group>"; };
-		3FB03E510D1B6C05005958A5 /* pt_PT */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pt_PT; path = pt_PT.lproj/Localizable.strings; sourceTree = "<group>"; };
-		3FB03E520D1B6C05005958A5 /* ru */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ru; path = ru.lproj/Localizable.strings; sourceTree = "<group>"; };
-		3FB03E530D1B6C05005958A5 /* Spanish */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = Spanish; path = Spanish.lproj/Localizable.strings; sourceTree = "<group>"; };
-		3FB03E540D1B6C05005958A5 /* sv */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = sv; path = sv.lproj/Localizable.strings; sourceTree = "<group>"; };
-		3FB03E550D1B6C05005958A5 /* zh_CN */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = zh_CN; path = zh_CN.lproj/Localizable.strings; sourceTree = "<group>"; };
-		3FB03E560D1B6C05005958A5 /* zh_TW */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = zh_TW; path = zh_TW.lproj/Localizable.strings; sourceTree = "<group>"; };
-		3FB03E570D1B6C17005958A5 /* da */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = da; path = da.lproj/InfoPlist.strings; sourceTree = "<group>"; };
-		3FB03E580D1B6C17005958A5 /* Dutch */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = Dutch; path = Dutch.lproj/InfoPlist.strings; sourceTree = "<group>"; };
-		3FB03E590D1B6C17005958A5 /* fi */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fi; path = fi.lproj/InfoPlist.strings; sourceTree = "<group>"; };
-		3FB03E5A0D1B6C17005958A5 /* French */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = French; path = French.lproj/InfoPlist.strings; sourceTree = "<group>"; };
-		3FB03E5B0D1B6C17005958A5 /* German */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = German; path = German.lproj/InfoPlist.strings; sourceTree = "<group>"; };
-		3FB03E5C0D1B6C17005958A5 /* Italian */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = Italian; path = Italian.lproj/InfoPlist.strings; sourceTree = "<group>"; };
-		3FB03E5D0D1B6C17005958A5 /* Japanese */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = Japanese; path = Japanese.lproj/InfoPlist.strings; sourceTree = "<group>"; };
-		3FB03E5E0D1B6C17005958A5 /* ko */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ko; path = ko.lproj/InfoPlist.strings; sourceTree = "<group>"; };
-		3FB03E5F0D1B6C17005958A5 /* no */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = no; path = no.lproj/InfoPlist.strings; sourceTree = "<group>"; };
-		3FB03E600D1B6C17005958A5 /* pl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pl; path = pl.lproj/InfoPlist.strings; sourceTree = "<group>"; };
-		3FB03E610D1B6C17005958A5 /* pt */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pt; path = pt.lproj/InfoPlist.strings; sourceTree = "<group>"; };
-		3FB03E620D1B6C17005958A5 /* pt_PT */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pt_PT; path = pt_PT.lproj/InfoPlist.strings; sourceTree = "<group>"; };
-		3FB03E630D1B6C17005958A5 /* ru */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ru; path = ru.lproj/InfoPlist.strings; sourceTree = "<group>"; };
-		3FB03E640D1B6C17005958A5 /* Spanish */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = Spanish; path = Spanish.lproj/InfoPlist.strings; sourceTree = "<group>"; };
-		3FB03E650D1B6C17005958A5 /* sv */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = sv; path = sv.lproj/InfoPlist.strings; sourceTree = "<group>"; };
-		3FB03E660D1B6C17005958A5 /* zh_CN */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = zh_CN; path = zh_CN.lproj/InfoPlist.strings; sourceTree = "<group>"; };
-		3FB03E670D1B6C17005958A5 /* zh_TW */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = zh_TW; path = zh_TW.lproj/InfoPlist.strings; sourceTree = "<group>"; };
-		3FB03E680D1B6C34005958A5 /* da */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = da; path = da.lproj/main.nib; sourceTree = "<group>"; };
-		3FB03E690D1B6C34005958A5 /* Dutch */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = Dutch; path = Dutch.lproj/main.nib; sourceTree = "<group>"; };
-		3FB03E6A0D1B6C34005958A5 /* fi */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = fi; path = fi.lproj/main.nib; sourceTree = "<group>"; };
-		3FB03E6B0D1B6C34005958A5 /* French */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = French; path = French.lproj/main.nib; sourceTree = "<group>"; };
-		3FB03E6C0D1B6C34005958A5 /* German */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = German; path = German.lproj/main.nib; sourceTree = "<group>"; };
-		3FB03E6D0D1B6C34005958A5 /* Italian */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = Italian; path = Italian.lproj/main.nib; sourceTree = "<group>"; };
-		3FB03E6E0D1B6C34005958A5 /* Japanese */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = Japanese; path = Japanese.lproj/main.nib; sourceTree = "<group>"; };
-		3FB03E6F0D1B6C34005958A5 /* ko */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = ko; path = ko.lproj/main.nib; sourceTree = "<group>"; };
-		3FB03E700D1B6C34005958A5 /* no */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = no; path = no.lproj/main.nib; sourceTree = "<group>"; };
-		3FB03E710D1B6C34005958A5 /* pl */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = pl; path = pl.lproj/main.nib; sourceTree = "<group>"; };
-		3FB03E720D1B6C34005958A5 /* pt */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = pt; path = pt.lproj/main.nib; sourceTree = "<group>"; };
-		3FB03E730D1B6C34005958A5 /* pt_PT */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = pt_PT; path = pt_PT.lproj/main.nib; sourceTree = "<group>"; };
-		3FB03E740D1B6C34005958A5 /* ru */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = ru; path = ru.lproj/main.nib; sourceTree = "<group>"; };
-		3FB03E750D1B6C34005958A5 /* Spanish */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = Spanish; path = Spanish.lproj/main.nib; sourceTree = "<group>"; };
-		3FB03E760D1B6C34005958A5 /* sv */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = sv; path = sv.lproj/main.nib; sourceTree = "<group>"; };
-		3FB03E770D1B6C34005958A5 /* zh_CN */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = zh_CN; path = zh_CN.lproj/main.nib; sourceTree = "<group>"; };
-		3FB03E780D1B6C34005958A5 /* zh_TW */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = zh_TW; path = zh_TW.lproj/main.nib; sourceTree = "<group>"; };
-		50459C5F038587C60ECA21EC /* X11.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = X11.icns; sourceTree = "<group>"; };
-		50EE2AB703849F0B0ECA21EC /* bundle-main.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = "bundle-main.c"; sourceTree = "<group>"; };
-		50F4F0A7039D6ACA0E82C0CB /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = /System/Library/Frameworks/CoreFoundation.framework; sourceTree = "<absolute>"; };
-		527F24260B5D938C007840A7 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = Info.plist; sourceTree = "<group>"; };
-		527F24270B5D938C007840A7 /* X11.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = X11.app; sourceTree = BUILT_PRODUCTS_DIR; };
-		52880C6E0DCFF906003407EC /* Sparkle.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Sparkle.framework; sourceTree = "<group>"; };
-		52D9C0EC0BCDDF6B00CD2AFC /* English */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/Localizable.strings; sourceTree = "<group>"; };
-		570C5748047186C400ACF82F /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = /System/Library/Frameworks/SystemConfiguration.framework; sourceTree = "<absolute>"; };
-/* End PBXFileReference section */
-
-/* Begin PBXFrameworksBuildPhase section */
-		527F241E0B5D938C007840A7 /* Frameworks */ = {
-			isa = PBXFrameworksBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				527F241F0B5D938C007840A7 /* CoreFoundation.framework in Frameworks */,
-				527F24200B5D938C007840A7 /* SystemConfiguration.framework in Frameworks */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXFrameworksBuildPhase section */
-
-/* Begin PBXGroup section */
-		195DF8CFFE9D517E11CA2CBB /* Products */ = {
-			isa = PBXGroup;
-			children = (
-				527F24270B5D938C007840A7 /* X11.app */,
-			);
-			name = Products;
-			sourceTree = "<group>";
-		};
-		20286C29FDCF999611CA2CEA /* X11 */ = {
-			isa = PBXGroup;
-			children = (
-				20286C2AFDCF999611CA2CEA /* Sources */,
-				20286C2CFDCF999611CA2CEA /* Resources */,
-				20286C32FDCF999611CA2CEA /* External Frameworks and Libraries */,
-				195DF8CFFE9D517E11CA2CBB /* Products */,
-				527F24260B5D938C007840A7 /* Info.plist */,
-			);
-			name = X11;
-			sourceTree = "<group>";
-		};
-		20286C2AFDCF999611CA2CEA /* Sources */ = {
-			isa = PBXGroup;
-			children = (
-				50EE2AB703849F0B0ECA21EC /* bundle-main.c */,
-			);
-			name = Sources;
-			sourceTree = "<group>";
-		};
-		20286C2CFDCF999611CA2CEA /* Resources */ = {
-			isa = PBXGroup;
-			children = (
-				52D9C0EB0BCDDF6B00CD2AFC /* Localizable.strings */,
-				50459C5F038587C60ECA21EC /* X11.icns */,
-				0867D6AAFE840B52C02AAC07 /* InfoPlist.strings */,
-				02345980000FD03B11CA0E72 /* main.nib */,
-			);
-			name = Resources;
-			sourceTree = "<group>";
-		};
-		20286C32FDCF999611CA2CEA /* External Frameworks and Libraries */ = {
-			isa = PBXGroup;
-			children = (
-				52880C6E0DCFF906003407EC /* Sparkle.framework */,
-				50F4F0A7039D6ACA0E82C0CB /* CoreFoundation.framework */,
-				570C5748047186C400ACF82F /* SystemConfiguration.framework */,
-			);
-			name = "External Frameworks and Libraries";
-			sourceTree = "<group>";
-		};
-/* End PBXGroup section */
-
-/* Begin PBXHeadersBuildPhase section */
-		527F24170B5D938C007840A7 /* Headers */ = {
-			isa = PBXHeadersBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXHeadersBuildPhase section */
-
-/* Begin PBXNativeTarget section */
-		527F24160B5D938C007840A7 /* X11 */ = {
-			isa = PBXNativeTarget;
-			buildConfigurationList = 527F24220B5D938C007840A7 /* Build configuration list for PBXNativeTarget "X11" */;
-			buildPhases = (
-				527F24170B5D938C007840A7 /* Headers */,
-				52880C8C0DCFF9FC003407EC /* CopyFiles */,
-				527F24180B5D938C007840A7 /* Resources */,
-				527F241C0B5D938C007840A7 /* Sources */,
-				527F241E0B5D938C007840A7 /* Frameworks */,
-				527F24210B5D938C007840A7 /* Rez */,
-			);
-			buildRules = (
-			);
-			dependencies = (
-			);
-			name = X11;
-			productName = X11;
-			productReference = 527F24270B5D938C007840A7 /* X11.app */;
-			productType = "com.apple.product-type.application";
-		};
-/* End PBXNativeTarget section */
-
-/* Begin PBXProject section */
-		20286C28FDCF999611CA2CEA /* Project object */ = {
-			isa = PBXProject;
-			buildConfigurationList = 527F24080B5D8FFC007840A7 /* Build configuration list for PBXProject "X11" */;
-			compatibilityVersion = "Xcode 2.4";
-			hasScannedForEncodings = 1;
-			knownRegions = (
-				English,
-				Japanese,
-				French,
-				German,
-				da,
-				Dutch,
-				fi,
-				Italian,
-				ko,
-				no,
-				pl,
-				pt,
-				pt_PT,
-				ru,
-				Spanish,
-				sv,
-				zh_CN,
-				zh_TW,
-			);
-			mainGroup = 20286C29FDCF999611CA2CEA /* X11 */;
-			projectDirPath = "";
-			projectRoot = "";
-			targets = (
-				527F24160B5D938C007840A7 /* X11 */,
-			);
-		};
-/* End PBXProject section */
-
-/* Begin PBXResourcesBuildPhase section */
-		527F24180B5D938C007840A7 /* Resources */ = {
-			isa = PBXResourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				527F24370B5D9D89007840A7 /* Info.plist in Resources */,
-				527F24190B5D938C007840A7 /* InfoPlist.strings in Resources */,
-				527F241A0B5D938C007840A7 /* main.nib in Resources */,
-				527F241B0B5D938C007840A7 /* X11.icns in Resources */,
-				52D9C0ED0BCDDF6B00CD2AFC /* Localizable.strings in Resources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXResourcesBuildPhase section */
-
-/* Begin PBXRezBuildPhase section */
-		527F24210B5D938C007840A7 /* Rez */ = {
-			isa = PBXRezBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXRezBuildPhase section */
-
-/* Begin PBXSourcesBuildPhase section */
-		527F241C0B5D938C007840A7 /* Sources */ = {
-			isa = PBXSourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				527F241D0B5D938C007840A7 /* bundle-main.c in Sources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXSourcesBuildPhase section */
-
-/* Begin PBXVariantGroup section */
-		02345980000FD03B11CA0E72 /* main.nib */ = {
-			isa = PBXVariantGroup;
-			children = (
-				1870340FFE93FCAF11CA0CD7 /* English */,
-				3FB03E680D1B6C34005958A5 /* da */,
-				3FB03E690D1B6C34005958A5 /* Dutch */,
-				3FB03E6A0D1B6C34005958A5 /* fi */,
-				3FB03E6B0D1B6C34005958A5 /* French */,
-				3FB03E6C0D1B6C34005958A5 /* German */,
-				3FB03E6D0D1B6C34005958A5 /* Italian */,
-				3FB03E6E0D1B6C34005958A5 /* Japanese */,
-				3FB03E6F0D1B6C34005958A5 /* ko */,
-				3FB03E700D1B6C34005958A5 /* no */,
-				3FB03E710D1B6C34005958A5 /* pl */,
-				3FB03E720D1B6C34005958A5 /* pt */,
-				3FB03E730D1B6C34005958A5 /* pt_PT */,
-				3FB03E740D1B6C34005958A5 /* ru */,
-				3FB03E750D1B6C34005958A5 /* Spanish */,
-				3FB03E760D1B6C34005958A5 /* sv */,
-				3FB03E770D1B6C34005958A5 /* zh_CN */,
-				3FB03E780D1B6C34005958A5 /* zh_TW */,
-			);
-			name = main.nib;
-			sourceTree = "<group>";
-		};
-		0867D6AAFE840B52C02AAC07 /* InfoPlist.strings */ = {
-			isa = PBXVariantGroup;
-			children = (
-				0867D6ABFE840B52C02AAC07 /* English */,
-				3FB03E570D1B6C17005958A5 /* da */,
-				3FB03E580D1B6C17005958A5 /* Dutch */,
-				3FB03E590D1B6C17005958A5 /* fi */,
-				3FB03E5A0D1B6C17005958A5 /* French */,
-				3FB03E5B0D1B6C17005958A5 /* German */,
-				3FB03E5C0D1B6C17005958A5 /* Italian */,
-				3FB03E5D0D1B6C17005958A5 /* Japanese */,
-				3FB03E5E0D1B6C17005958A5 /* ko */,
-				3FB03E5F0D1B6C17005958A5 /* no */,
-				3FB03E600D1B6C17005958A5 /* pl */,
-				3FB03E610D1B6C17005958A5 /* pt */,
-				3FB03E620D1B6C17005958A5 /* pt_PT */,
-				3FB03E630D1B6C17005958A5 /* ru */,
-				3FB03E640D1B6C17005958A5 /* Spanish */,
-				3FB03E650D1B6C17005958A5 /* sv */,
-				3FB03E660D1B6C17005958A5 /* zh_CN */,
-				3FB03E670D1B6C17005958A5 /* zh_TW */,
-			);
-			name = InfoPlist.strings;
-			sourceTree = "<group>";
-		};
-		52D9C0EB0BCDDF6B00CD2AFC /* Localizable.strings */ = {
-			isa = PBXVariantGroup;
-			children = (
-				52D9C0EC0BCDDF6B00CD2AFC /* English */,
-				3FB03E460D1B6C05005958A5 /* da */,
-				3FB03E470D1B6C05005958A5 /* Dutch */,
-				3FB03E480D1B6C05005958A5 /* fi */,
-				3FB03E490D1B6C05005958A5 /* French */,
-				3FB03E4A0D1B6C05005958A5 /* German */,
-				3FB03E4B0D1B6C05005958A5 /* Italian */,
-				3FB03E4C0D1B6C05005958A5 /* Japanese */,
-				3FB03E4D0D1B6C05005958A5 /* ko */,
-				3FB03E4E0D1B6C05005958A5 /* no */,
-				3FB03E4F0D1B6C05005958A5 /* pl */,
-				3FB03E500D1B6C05005958A5 /* pt */,
-				3FB03E510D1B6C05005958A5 /* pt_PT */,
-				3FB03E520D1B6C05005958A5 /* ru */,
-				3FB03E530D1B6C05005958A5 /* Spanish */,
-				3FB03E540D1B6C05005958A5 /* sv */,
-				3FB03E550D1B6C05005958A5 /* zh_CN */,
-				3FB03E560D1B6C05005958A5 /* zh_TW */,
-			);
-			name = Localizable.strings;
-			sourceTree = "<group>";
-		};
-/* End PBXVariantGroup section */
-
-/* Begin XCBuildConfiguration section */
-		527F24090B5D8FFC007840A7 /* Development */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				INSTALL_MODE_FLAG = "a+rX";
-			};
-			name = Development;
-		};
-		527F240A0B5D8FFC007840A7 /* Deployment */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				INSTALL_MODE_FLAG = "a+rX";
-			};
-			name = Deployment;
-		};
-		527F240B0B5D8FFC007840A7 /* Default */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				INSTALL_MODE_FLAG = "a+rX";
-			};
-			name = Default;
-		};
-		527F24230B5D938C007840A7 /* Development */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				COPY_PHASE_STRIP = NO;
-				FRAMEWORK_SEARCH_PATHS = (
-					"$(inherited)",
-					"$(FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_1)",
-				);
-				FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_1 = "\"$(SRCROOT)\"";
-				GCC_SYMBOLS_PRIVATE_EXTERN = NO;
-				HEADER_SEARCH_PATHS = /usr/X11/include;
-				INFOPLIST_FILE = Info.plist;
-				INSTALL_PATH = /usr/X11;
-				LIBRARY_SEARCH_PATHS = /usr/X11/lib;
-				OTHER_CFLAGS = "";
-				OTHER_LDFLAGS = (
-					"-lXau",
-					"-lxcb",
-					"-lX11",
-				);
-				OTHER_REZFLAGS = "";
-				PRODUCT_NAME = X11;
-				SECTORDER_FLAGS = "";
-				WARNING_CFLAGS = (
-					"-Wmost",
-					"-Wno-four-char-constants",
-					"-Wno-unknown-pragmas",
-				);
-				WRAPPER_EXTENSION = app;
-			};
-			name = Development;
-		};
-		527F24240B5D938C007840A7 /* Deployment */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				COPY_PHASE_STRIP = YES;
-				FRAMEWORK_SEARCH_PATHS = (
-					"$(inherited)",
-					"$(FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_1)",
-				);
-				FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_1 = "\"$(SRCROOT)\"";
-				GCC_SYMBOLS_PRIVATE_EXTERN = NO;
-				HEADER_SEARCH_PATHS = /usr/X11/include;
-				INFOPLIST_FILE = Info.plist;
-				INSTALL_PATH = /usr/X11;
-				LIBRARY_SEARCH_PATHS = /usr/X11/lib;
-				OTHER_CFLAGS = "";
-				OTHER_LDFLAGS = (
-					"-lXau",
-					"-lxcb",
-					"-lX11",
-				);
-				OTHER_REZFLAGS = "";
-				PRODUCT_NAME = X11;
-				SECTORDER_FLAGS = "";
-				WARNING_CFLAGS = (
-					"-Wmost",
-					"-Wno-four-char-constants",
-					"-Wno-unknown-pragmas",
-				);
-				WRAPPER_EXTENSION = app;
-			};
-			name = Deployment;
-		};
-		527F24250B5D938C007840A7 /* Default */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				FRAMEWORK_SEARCH_PATHS = (
-					"$(inherited)",
-					"$(FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_1)",
-				);
-				FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_1 = "\"$(SRCROOT)\"";
-				GCC_SYMBOLS_PRIVATE_EXTERN = NO;
-				HEADER_SEARCH_PATHS = /usr/X11/include;
-				INFOPLIST_FILE = Info.plist;
-				INSTALL_PATH = /usr/X11;
-				LIBRARY_SEARCH_PATHS = /usr/X11/lib;
-				OTHER_CFLAGS = "";
-				OTHER_LDFLAGS = (
-					"-lXau",
-					"-lxcb",
-					"-lX11",
-				);
-				OTHER_REZFLAGS = "";
-				PRODUCT_NAME = X11;
-				SECTORDER_FLAGS = "";
-				WARNING_CFLAGS = (
-					"-Wmost",
-					"-Wno-four-char-constants",
-					"-Wno-unknown-pragmas",
-				);
-				WRAPPER_EXTENSION = app;
-			};
-			name = Default;
-		};
-/* End XCBuildConfiguration section */
-
-/* Begin XCConfigurationList section */
-		527F24080B5D8FFC007840A7 /* Build configuration list for PBXProject "X11" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				527F24090B5D8FFC007840A7 /* Development */,
-				527F240A0B5D8FFC007840A7 /* Deployment */,
-				527F240B0B5D8FFC007840A7 /* Default */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Default;
-		};
-		527F24220B5D938C007840A7 /* Build configuration list for PBXNativeTarget "X11" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				527F24230B5D938C007840A7 /* Development */,
-				527F24240B5D938C007840A7 /* Deployment */,
-				527F24250B5D938C007840A7 /* Default */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Default;
-		};
-/* End XCConfigurationList section */
-	};
-	rootObject = 20286C28FDCF999611CA2CEA /* Project object */;
-}
commit 7295e544332b0fa929f651304f9d4aca3db4a33e
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date:   Tue May 6 00:06:19 2008 -0700

    XQuartz: Move server bits into bundle and setup stub in /usr/X11/bin/Xquartz in prep for startup rewrite
    (cherry picked from commit 453a982e6382cff06ea27abba225440b07068f50)

diff --git a/configure.ac b/configure.ac
index f695551..9b77534 100644
--- a/configure.ac
+++ b/configure.ac
@@ -562,9 +562,6 @@ AC_ARG_ENABLE(dmx,    	      AS_HELP_STRING([--enable-dmx], [Build DMX server (d
 AC_ARG_ENABLE(xvfb,    	      AS_HELP_STRING([--enable-xvfb], [Build Xvfb server (default: yes)]), [XVFB=$enableval], [XVFB=yes])
 AC_ARG_ENABLE(xnest,   	      AS_HELP_STRING([--enable-xnest], [Build Xnest server (default: auto)]), [XNEST=$enableval], [XNEST=auto])
 AC_ARG_ENABLE(xquartz,        AS_HELP_STRING([--enable-xquartz], [Build Xquartz server for OS-X (default: auto)]), [XQUARTZ=$enableval], [XQUARTZ=auto])
-AC_ARG_ENABLE(x11app,         AS_HELP_STRING([--enable-x11app], [Build Apple's X11.app for Xquartz (default: auto)]), [X11APP=$enableval], [X11APP=auto])
-AC_ARG_WITH(x11app-archs,     AS_HELP_STRING([--with-x11app-archs=ARCHS], [Architectures to build X11.app for, space delimeted (default: "ppc i386")]), [X11APP_ARCHS=$enableval], [X11APP_ARCHS="ppc i386"])
-AC_SUBST([X11APP_ARCHS])
 AC_ARG_ENABLE(xwin,    	      AS_HELP_STRING([--enable-xwin], [Build XWin server (default: auto)]), [XWIN=$enableval], [XWIN=auto])
 AC_ARG_ENABLE(xprint,         AS_HELP_STRING([--enable-xprint], [Build Xprint extension and server (default: no)]), [XPRINT=$enableval], [XPRINT=no])
 AC_ARG_ENABLE(xgl,            AS_HELP_STRING([--enable-xgl], [Build Xgl server (default: no)]), [XGL=$enableval], [XGL=no])
@@ -1756,17 +1753,6 @@ AM_CONDITIONAL(HAVE_XPLUGIN, [test "x$ac_cv_lib_Xplugin_xp_init" = xyes])
 AM_CONDITIONAL(HAVE_AGL_FRAMEWORK, [test "x$xorg_cv_AGL_framework" = xyes])
 AM_CONDITIONAL(XQUARTZ, [test "x$XQUARTZ" = xyes])
 
-if test "x$X11APP" = xauto; then
-	AC_MSG_CHECKING([whether to build X11.app])
-	if test "x$XQUARTZ" = xyes ; then
-		X11APP=yes
-	else
-		X11APP=no
-	fi
-	AC_MSG_RESULT([$X11APP])
-fi
-AM_CONDITIONAL(X11APP,[test "X$X11APP" = Xyes]) 
-
 if test "x$LAUNCHD" = "xauto"; then
 	if test "x$XQUARTZ" = "xyes" ; then
 		LAUNCHD=yes
@@ -2165,6 +2151,7 @@ hw/xwin/Makefile
 hw/xquartz/Makefile
 hw/xquartz/GL/Makefile
 hw/xquartz/bundle/Makefile
+hw/xquartz/stub/Makefile
 hw/xquartz/xpr/Makefile
 hw/kdrive/Makefile
 hw/kdrive/ati/Makefile
diff --git a/hw/xquartz/Makefile.am b/hw/xquartz/Makefile.am
index b2674be..bbd21f8 100644
--- a/hw/xquartz/Makefile.am
+++ b/hw/xquartz/Makefile.am
@@ -9,16 +9,12 @@ AM_CPPFLAGS = \
 	-DXFree86Server \
 	-I$(top_srcdir)/miext/rootless
 
-if X11APP
-X11APP_SUBDIRS = bundle
-endif
-
-SUBDIRS = . GL xpr $(X11APP_SUBDIRS)
-DIST_SUBDIRS = GL xpr bundle
+SUBDIRS = bundle . GL xpr stub
 
 libXquartz_la_SOURCES = \
 	$(top_srcdir)/fb/fbcmap_mi.c \
 	$(top_srcdir)/mi/miinitext.c \
+	bundle/bundle-main.c \
 	X11Application.m \
 	X11Controller.m \
 	applewm.c \
diff --git a/hw/xquartz/bundle/Dutch.lproj/InfoPlist.strings b/hw/xquartz/bundle/Dutch.lproj/InfoPlist.strings
deleted file mode 100644
index 8f978d6..0000000
Binary files a/hw/xquartz/bundle/Dutch.lproj/InfoPlist.strings and /dev/null differ
diff --git a/hw/xquartz/bundle/Dutch.lproj/Localizable.strings b/hw/xquartz/bundle/Dutch.lproj/Localizable.strings
deleted file mode 100644
index 1ff39fe..0000000
Binary files a/hw/xquartz/bundle/Dutch.lproj/Localizable.strings and /dev/null differ
diff --git a/hw/xquartz/bundle/Dutch.lproj/main.nib/keyedobjects.nib b/hw/xquartz/bundle/Dutch.lproj/main.nib/keyedobjects.nib
deleted file mode 100644
index 95c26d7..0000000
Binary files a/hw/xquartz/bundle/Dutch.lproj/main.nib/keyedobjects.nib and /dev/null differ
diff --git a/hw/xquartz/bundle/English.lproj/InfoPlist.strings b/hw/xquartz/bundle/English.lproj/InfoPlist.strings
deleted file mode 100644
index 88e1f04..0000000
Binary files a/hw/xquartz/bundle/English.lproj/InfoPlist.strings and /dev/null differ
diff --git a/hw/xquartz/bundle/English.lproj/Localizable.strings b/hw/xquartz/bundle/English.lproj/Localizable.strings
deleted file mode 100644
index 63a1352..0000000
Binary files a/hw/xquartz/bundle/English.lproj/Localizable.strings and /dev/null differ
diff --git a/hw/xquartz/bundle/English.lproj/main.nib/designable.nib b/hw/xquartz/bundle/English.lproj/main.nib/designable.nib
deleted file mode 100644
index c93d023..0000000
--- a/hw/xquartz/bundle/English.lproj/main.nib/designable.nib
+++ /dev/null
@@ -1,3753 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="7.02">
-	<data>
-		<int key="IBDocument.SystemTarget">1050</int>
-		<string key="IBDocument.SystemVersion">9C7010</string>
-		<string key="IBDocument.InterfaceBuilderVersion">639</string>
-		<string key="IBDocument.AppKitVersion">949.26</string>
-		<string key="IBDocument.HIToolboxVersion">352.00</string>
-		<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
-			<bool key="EncodedWithXMLCoder">YES</bool>
-		</object>
-		<object class="NSArray" key="IBDocument.PluginDependencies">
-			<bool key="EncodedWithXMLCoder">YES</bool>
-			<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-		</object>
-		<object class="NSMutableArray" key="IBDocument.RootObjects" id="904585544">
-			<bool key="EncodedWithXMLCoder">YES</bool>
-			<object class="NSCustomObject" id="815810918">
-				<object class="NSMutableString" key="NSClassName">
-					<characters key="NS.bytes">NSApplication</characters>
-				</object>
-			</object>
-			<object class="NSCustomObject" id="941939442">
-				<string key="NSClassName">FirstResponder</string>
-			</object>
-			<object class="NSCustomObject" id="951368722">
-				<string key="NSClassName">NSApplication</string>
-			</object>
-			<object class="NSMenu" id="524015605">
-				<string key="NSTitle">MainMenu</string>
-				<object class="NSMutableArray" key="NSMenuItems">
-					<bool key="EncodedWithXMLCoder">YES</bool>
-					<object class="NSMenuItem" id="365880285">
-						<reference key="NSMenu" ref="524015605"/>
-						<string key="NSTitle">X11</string>
-						<string key="NSKeyEquiv"/>
-						<int key="NSKeyEquivModMask">1048576</int>
-						<int key="NSMnemonicLoc">2147483647</int>
-						<object class="NSCustomResource" key="NSOnImage" id="531645050">
-							<string key="NSClassName">NSImage</string>
-							<string key="NSResourceName">NSMenuCheckmark</string>
-						</object>
-						<object class="NSCustomResource" key="NSMixedImage" id="351811234">
-							<string key="NSClassName">NSImage</string>
-							<string key="NSResourceName">NSMenuMixedState</string>
-						</object>
-						<string key="NSAction">submenuAction:</string>
-						<object class="NSMenu" key="NSSubmenu" id="576521955">
-							<string key="NSTitle">X11</string>
-							<object class="NSMutableArray" key="NSMenuItems">
-								<bool key="EncodedWithXMLCoder">YES</bool>
-								<object class="NSMenuItem" id="139290918">
-									<reference key="NSMenu" ref="576521955"/>
-									<string key="NSTitle">About X11</string>
-									<string key="NSKeyEquiv"/>
-									<int key="NSMnemonicLoc">2147483647</int>
-									<reference key="NSOnImage" ref="531645050"/>
-									<reference key="NSMixedImage" ref="351811234"/>
-								</object>
-								<object class="NSMenuItem" id="386173216">
-									<reference key="NSMenu" ref="576521955"/>
-									<string key="NSTitle">Preferences...</string>
-									<string key="NSKeyEquiv">,</string>
-									<int key="NSKeyEquivModMask">1048576</int>
-									<int key="NSMnemonicLoc">2147483647</int>
-									<reference key="NSOnImage" ref="531645050"/>
-									<reference key="NSMixedImage" ref="351811234"/>
-								</object>
-								<object class="NSMenuItem" id="858487910">
-									<reference key="NSMenu" ref="576521955"/>
-									<string key="NSTitle">Check for updates...</string>
-									<string key="NSKeyEquiv"/>
-									<int key="NSMnemonicLoc">2147483647</int>
-									<reference key="NSOnImage" ref="531645050"/>
-									<reference key="NSMixedImage" ref="351811234"/>
-								</object>
-								<object class="NSMenuItem" id="272876017">
-									<reference key="NSMenu" ref="576521955"/>
-									<bool key="NSIsDisabled">YES</bool>
-									<bool key="NSIsSeparator">YES</bool>
-									<string key="NSTitle"/>
-									<string key="NSKeyEquiv"/>
-									<int key="NSKeyEquivModMask">1048576</int>
-									<int key="NSMnemonicLoc">2147483647</int>
-									<reference key="NSOnImage" ref="531645050"/>
-									<reference key="NSMixedImage" ref="351811234"/>
-								</object>
-								<object class="NSMenuItem" id="32285361">
-									<reference key="NSMenu" ref="576521955"/>
-									<string key="NSTitle">Services</string>
-									<string key="NSKeyEquiv"/>
-									<int key="NSKeyEquivModMask">1048576</int>
-									<int key="NSMnemonicLoc">2147483647</int>
-									<reference key="NSOnImage" ref="531645050"/>
-									<reference key="NSMixedImage" ref="351811234"/>
-									<string key="NSAction">submenuAction:</string>
-									<object class="NSMenu" key="NSSubmenu" id="821388474">
-										<object class="NSMutableString" key="NSTitle">
-											<characters key="NS.bytes">Services</characters>
-										</object>
-										<object class="NSMutableArray" key="NSMenuItems">
-											<bool key="EncodedWithXMLCoder">YES</bool>
-										</object>
-										<string key="NSName">_NSServicesMenu</string>
-									</object>
-								</object>
-								<object class="NSMenuItem" id="431301145">
-									<reference key="NSMenu" ref="576521955"/>
-									<bool key="NSIsDisabled">YES</bool>
-									<bool key="NSIsSeparator">YES</bool>
-									<string key="NSTitle"/>
-									<string key="NSKeyEquiv"/>
-									<int key="NSKeyEquivModMask">1048576</int>
-									<int key="NSMnemonicLoc">2147483647</int>
-									<reference key="NSOnImage" ref="531645050"/>
-									<reference key="NSMixedImage" ref="351811234"/>
-								</object>
-								<object class="NSMenuItem" id="6876565">
-									<reference key="NSMenu" ref="576521955"/>
-									<string key="NSTitle">Toggle Full Screen</string>
-									<string key="NSKeyEquiv">a</string>
-									<int key="NSKeyEquivModMask">1572864</int>
-									<int key="NSMnemonicLoc">2147483647</int>
-									<reference key="NSOnImage" ref="531645050"/>
-									<reference key="NSMixedImage" ref="351811234"/>
-								</object>
-								<object class="NSMenuItem" id="479677589">
-									<reference key="NSMenu" ref="576521955"/>
-									<bool key="NSIsDisabled">YES</bool>
-									<bool key="NSIsSeparator">YES</bool>
-									<string key="NSTitle"/>
-									<string key="NSKeyEquiv"/>
-									<int key="NSKeyEquivModMask">1048576</int>
-									<int key="NSMnemonicLoc">2147483647</int>
-									<reference key="NSOnImage" ref="531645050"/>
-									<reference key="NSMixedImage" ref="351811234"/>
-								</object>
-								<object class="NSMenuItem" id="301008465">
-									<reference key="NSMenu" ref="576521955"/>
-									<string key="NSTitle">Hide X11</string>
-									<string key="NSKeyEquiv">h</string>
-									<int key="NSKeyEquivModMask">1048576</int>
-									<int key="NSMnemonicLoc">2147483647</int>
-									<reference key="NSOnImage" ref="531645050"/>
-									<reference key="NSMixedImage" ref="351811234"/>
-									<int key="NSTag">42</int>
-								</object>
-								<object class="NSMenuItem" id="206802571">
-									<reference key="NSMenu" ref="576521955"/>
-									<string key="NSTitle">Hide Others</string>
-									<string key="NSKeyEquiv"/>
-									<int key="NSKeyEquivModMask">1048576</int>
-									<int key="NSMnemonicLoc">2147483647</int>
-									<reference key="NSOnImage" ref="531645050"/>
-									<reference key="NSMixedImage" ref="351811234"/>
-								</object>
-								<object class="NSMenuItem" id="1023546148">
-									<reference key="NSMenu" ref="576521955"/>
-									<string key="NSTitle">Show All</string>
-									<string key="NSKeyEquiv"/>
-									<int key="NSKeyEquivModMask">1048576</int>
-									<int key="NSMnemonicLoc">2147483647</int>
-									<reference key="NSOnImage" ref="531645050"/>
-									<reference key="NSMixedImage" ref="351811234"/>
-									<int key="NSTag">42</int>
-								</object>
-								<object class="NSMenuItem" id="848095279">
-									<reference key="NSMenu" ref="576521955"/>
-									<bool key="NSIsDisabled">YES</bool>
-									<bool key="NSIsSeparator">YES</bool>
-									<string key="NSTitle"/>
-									<string key="NSKeyEquiv"/>
-									<int key="NSKeyEquivModMask">1048576</int>
-									<int key="NSMnemonicLoc">2147483647</int>
-									<reference key="NSOnImage" ref="531645050"/>
-									<reference key="NSMixedImage" ref="351811234"/>
-								</object>
-								<object class="NSMenuItem" id="274138642">
-									<reference key="NSMenu" ref="576521955"/>
-									<string key="NSTitle">Quit X11</string>
-									<string key="NSKeyEquiv">q</string>
-									<int key="NSKeyEquivModMask">1048576</int>
-									<int key="NSMnemonicLoc">2147483647</int>
-									<reference key="NSOnImage" ref="531645050"/>
-									<reference key="NSMixedImage" ref="351811234"/>
-								</object>
-							</object>
-							<string key="NSName">_NSAppleMenu</string>
-						</object>
-					</object>
-					<object class="NSMenuItem" id="868031522">
-						<reference key="NSMenu" ref="524015605"/>
-						<string key="NSTitle">Applications</string>
-						<string key="NSKeyEquiv"/>
-						<int key="NSKeyEquivModMask">1048576</int>
-						<int key="NSMnemonicLoc">2147483647</int>
-						<reference key="NSOnImage" ref="531645050"/>
-						<reference key="NSMixedImage" ref="351811234"/>
-						<string key="NSAction">submenuAction:</string>
-						<object class="NSMenu" key="NSSubmenu" id="981161348">
-							<string key="NSTitle">Applications</string>
-							<object class="NSMutableArray" key="NSMenuItems">
-								<bool key="EncodedWithXMLCoder">YES</bool>
-								<object class="NSMenuItem" id="390088328">
-									<reference key="NSMenu" ref="981161348"/>
-									<bool key="NSIsDisabled">YES</bool>
-									<bool key="NSIsSeparator">YES</bool>
-									<string key="NSTitle"/>
-									<string key="NSKeyEquiv"/>
-									<int key="NSKeyEquivModMask">1048576</int>
-									<int key="NSMnemonicLoc">2147483647</int>
-									<reference key="NSOnImage" ref="531645050"/>
-									<reference key="NSMixedImage" ref="351811234"/>
-								</object>
-								<object class="NSMenuItem" id="1065386165">
-									<reference key="NSMenu" ref="981161348"/>
-									<string key="NSTitle">Customize...</string>
-									<string key="NSKeyEquiv"/>
-									<int key="NSKeyEquivModMask">1048576</int>
-									<int key="NSMnemonicLoc">2147483647</int>
-									<reference key="NSOnImage" ref="531645050"/>
-									<reference key="NSMixedImage" ref="351811234"/>
-								</object>
-							</object>
-						</object>
-					</object>
-					<object class="NSMenuItem" id="200491363">
-						<reference key="NSMenu" ref="524015605"/>
-						<string key="NSTitle">Edit</string>
-						<string key="NSKeyEquiv"/>
-						<int key="NSKeyEquivModMask">1048576</int>
-						<int key="NSMnemonicLoc">2147483647</int>
-						<reference key="NSOnImage" ref="531645050"/>
-						<reference key="NSMixedImage" ref="351811234"/>
-						<string key="NSAction">submenuAction:</string>
-						<object class="NSMenu" key="NSSubmenu" id="526778998">
-							<string key="NSTitle">Edit</string>
-							<object class="NSMutableArray" key="NSMenuItems">
-								<bool key="EncodedWithXMLCoder">YES</bool>
-								<object class="NSMenuItem" id="1010221707">
-									<reference key="NSMenu" ref="526778998"/>
-									<string key="NSTitle">Undo</string>
-									<string key="NSKeyEquiv">z</string>
-									<int key="NSKeyEquivModMask">1048576</int>
-									<int key="NSMnemonicLoc">2147483647</int>
-									<reference key="NSOnImage" ref="531645050"/>
-									<reference key="NSMixedImage" ref="351811234"/>
-								</object>
-								<object class="NSMenuItem" id="535038564">
-									<reference key="NSMenu" ref="526778998"/>
-									<string key="NSTitle">Redo</string>
-									<string key="NSKeyEquiv">Z</string>
-									<int key="NSKeyEquivModMask">1048576</int>
-									<int key="NSMnemonicLoc">2147483647</int>
-									<reference key="NSOnImage" ref="531645050"/>
-									<reference key="NSMixedImage" ref="351811234"/>
-								</object>
-								<object class="NSMenuItem" id="839739619">
-									<reference key="NSMenu" ref="526778998"/>
-									<bool key="NSIsDisabled">YES</bool>
-									<bool key="NSIsSeparator">YES</bool>
-									<string key="NSTitle"/>
-									<string key="NSKeyEquiv"/>
-									<int key="NSKeyEquivModMask">1048576</int>
-									<int key="NSMnemonicLoc">2147483647</int>
-									<reference key="NSOnImage" ref="531645050"/>
-									<reference key="NSMixedImage" ref="351811234"/>
-								</object>
-								<object class="NSMenuItem" id="581727829">
-									<reference key="NSMenu" ref="526778998"/>
-									<string key="NSTitle">Cut</string>
-									<string key="NSKeyEquiv">x</string>
-									<int key="NSKeyEquivModMask">1048576</int>
-									<int key="NSMnemonicLoc">2147483647</int>
-									<reference key="NSOnImage" ref="531645050"/>
-									<reference key="NSMixedImage" ref="351811234"/>
-								</object>
-								<object class="NSMenuItem" id="185296989">
-									<reference key="NSMenu" ref="526778998"/>
-									<string key="NSTitle">Copy</string>
-									<string key="NSKeyEquiv">c</string>
-									<int key="NSKeyEquivModMask">1048576</int>
-									<int key="NSMnemonicLoc">2147483647</int>
-									<reference key="NSOnImage" ref="531645050"/>
-									<reference key="NSMixedImage" ref="351811234"/>
-								</object>
-								<object class="NSMenuItem" id="924678073">
-									<reference key="NSMenu" ref="526778998"/>
-									<string key="NSTitle">Paste</string>
-									<string key="NSKeyEquiv">v</string>
-									<int key="NSKeyEquivModMask">1048576</int>
-									<int key="NSMnemonicLoc">2147483647</int>
-									<reference key="NSOnImage" ref="531645050"/>
-									<reference key="NSMixedImage" ref="351811234"/>
-								</object>
-								<object class="NSMenuItem" id="994817848">
-									<reference key="NSMenu" ref="526778998"/>
-									<string key="NSTitle">Delete</string>
-									<string key="NSKeyEquiv"/>
-									<int key="NSKeyEquivModMask">1048576</int>
-									<int key="NSMnemonicLoc">2147483647</int>
-									<reference key="NSOnImage" ref="531645050"/>
-									<reference key="NSMixedImage" ref="351811234"/>
-								</object>
-								<object class="NSMenuItem" id="322866464">
-									<reference key="NSMenu" ref="526778998"/>
-									<string key="NSTitle">Select All</string>
-									<string key="NSKeyEquiv">a</string>
-									<int key="NSKeyEquivModMask">1048576</int>
-									<int key="NSMnemonicLoc">2147483647</int>
-									<reference key="NSOnImage" ref="531645050"/>
-									<reference key="NSMixedImage" ref="351811234"/>
-								</object>
-							</object>
-						</object>
-					</object>
-					<object class="NSMenuItem" id="931553638">
-						<reference key="NSMenu" ref="524015605"/>
-						<string key="NSTitle">Window</string>
-						<string key="NSKeyEquiv"/>
-						<int key="NSKeyEquivModMask">1048576</int>
-						<int key="NSMnemonicLoc">2147483647</int>
-						<reference key="NSOnImage" ref="531645050"/>
-						<reference key="NSMixedImage" ref="351811234"/>
-						<string key="NSAction">submenuAction:</string>
-						<object class="NSMenu" key="NSSubmenu" id="96874957">
-							<object class="NSMutableString" key="NSTitle">
-								<characters key="NS.bytes">Window</characters>
-							</object>
-							<object class="NSMutableArray" key="NSMenuItems">
-								<bool key="EncodedWithXMLCoder">YES</bool>
-								<object class="NSMenuItem" id="677652931">
-									<reference key="NSMenu" ref="96874957"/>
-									<string key="NSTitle">Minimize</string>
-									<string key="NSKeyEquiv">m</string>
-									<int key="NSKeyEquivModMask">1048576</int>
-									<int key="NSMnemonicLoc">2147483647</int>
-									<reference key="NSOnImage" ref="531645050"/>
-									<reference key="NSMixedImage" ref="351811234"/>
-								</object>
-								<object class="NSMenuItem" id="1066447520">
-									<reference key="NSMenu" ref="96874957"/>
-									<string key="NSTitle">Zoom</string>
-									<string key="NSKeyEquiv"/>
-									<int key="NSKeyEquivModMask">1048576</int>
-									<int key="NSMnemonicLoc">2147483647</int>
-									<reference key="NSOnImage" ref="531645050"/>
-									<reference key="NSMixedImage" ref="351811234"/>
-								</object>
-								<object class="NSMenuItem" id="1036389925">
-									<reference key="NSMenu" ref="96874957"/>
-									<string key="NSTitle">Cycle Through Windows</string>
-									<string key="NSKeyEquiv">`</string>
-									<int key="NSKeyEquivModMask">1048840</int>
-									<int key="NSMnemonicLoc">2147483647</int>
-									<reference key="NSOnImage" ref="531645050"/>
-									<reference key="NSMixedImage" ref="351811234"/>
-								</object>
-								<object class="NSMenuItem" id="369641893">
-									<reference key="NSMenu" ref="96874957"/>
-									<string key="NSTitle">Reverse Cycle Through Windows</string>
-									<string key="NSKeyEquiv">~</string>
-									<int key="NSKeyEquivModMask">1179914</int>
-									<int key="NSMnemonicLoc">2147483647</int>
-									<reference key="NSOnImage" ref="531645050"/>
-									<reference key="NSMixedImage" ref="351811234"/>
-								</object>
-								<object class="NSMenuItem" id="280172320">
-									<reference key="NSMenu" ref="96874957"/>
-									<bool key="NSIsDisabled">YES</bool>
-									<bool key="NSIsSeparator">YES</bool>
-									<string key="NSTitle"/>
-									<string key="NSKeyEquiv"/>
-									<int key="NSKeyEquivModMask">1048576</int>
-									<int key="NSMnemonicLoc">2147483647</int>
-									<reference key="NSOnImage" ref="531645050"/>
-									<reference key="NSMixedImage" ref="351811234"/>
-								</object>
-								<object class="NSMenuItem" id="984461797">
-									<reference key="NSMenu" ref="96874957"/>
-									<string key="NSTitle">Close</string>
-									<string key="NSKeyEquiv">w</string>
-									<int key="NSKeyEquivModMask">1048576</int>
-									<int key="NSMnemonicLoc">2147483647</int>
-									<reference key="NSOnImage" ref="531645050"/>
-									<reference key="NSMixedImage" ref="351811234"/>
-								</object>
-								<object class="NSMenuItem" id="155085383">
-									<reference key="NSMenu" ref="96874957"/>
-									<bool key="NSIsDisabled">YES</bool>
-									<bool key="NSIsSeparator">YES</bool>
-									<string key="NSTitle"/>
-									<string key="NSKeyEquiv"/>
-									<int key="NSKeyEquivModMask">1048576</int>
-									<int key="NSMnemonicLoc">2147483647</int>
-									<reference key="NSOnImage" ref="531645050"/>
-									<reference key="NSMixedImage" ref="351811234"/>
-								</object>
-								<object class="NSMenuItem" id="276216762">
-									<reference key="NSMenu" ref="96874957"/>
-									<string key="NSTitle">Bring All to Front</string>
-									<string key="NSKeyEquiv"/>
-									<int key="NSKeyEquivModMask">1048576</int>
-									<int key="NSMnemonicLoc">2147483647</int>
-									<reference key="NSOnImage" ref="531645050"/>
-									<reference key="NSMixedImage" ref="351811234"/>
-								</object>
-								<object class="NSMenuItem" id="444952046">
-									<reference key="NSMenu" ref="96874957"/>
-									<bool key="NSIsDisabled">YES</bool>
-									<bool key="NSIsSeparator">YES</bool>
-									<string key="NSTitle"/>
-									<string key="NSKeyEquiv"/>
-									<int key="NSKeyEquivModMask">1048576</int>
-									<int key="NSMnemonicLoc">2147483647</int>
-									<reference key="NSOnImage" ref="531645050"/>
-									<reference key="NSMixedImage" ref="351811234"/>
-								</object>
-							</object>
-							<string key="NSName">_NSWindowsMenu</string>
-						</object>
-					</object>
-					<object class="NSMenuItem" id="551174276">
-						<reference key="NSMenu" ref="524015605"/>
-						<string key="NSTitle">Help</string>
-						<string key="NSKeyEquiv"/>
-						<int key="NSKeyEquivModMask">1048576</int>
-						<int key="NSMnemonicLoc">2147483647</int>
-						<reference key="NSOnImage" ref="531645050"/>
-						<reference key="NSMixedImage" ref="351811234"/>
-						<string key="NSAction">submenuAction:</string>
-						<object class="NSMenu" key="NSSubmenu" id="511848303">
-							<string key="NSTitle">Help</string>
-							<object class="NSMutableArray" key="NSMenuItems">
-								<bool key="EncodedWithXMLCoder">YES</bool>
-								<object class="NSMenuItem" id="504984881">
-									<reference key="NSMenu" ref="511848303"/>
-									<string key="NSTitle">X11 Help</string>
-									<string key="NSKeyEquiv"/>
-									<int key="NSKeyEquivModMask">1048576</int>
-									<int key="NSMnemonicLoc">2147483647</int>
-									<reference key="NSOnImage" ref="531645050"/>
-									<reference key="NSMixedImage" ref="351811234"/>
-								</object>
-							</object>
-						</object>
-					</object>
-				</object>
-				<string key="NSName">_NSMainMenu</string>
-			</object>
-			<object class="NSCustomObject" id="485884620">
-				<string key="NSClassName">X11Controller</string>
-			</object>
-			<object class="NSWindowTemplate" id="124913468">
-				<int key="NSWindowStyleMask">3</int>
-				<int key="NSWindowBacking">2</int>
-				<string key="NSWindowRect">{{266, 392}, {484, 280}}</string>
-				<int key="NSWTFlags">1350041600</int>
-				<string key="NSWindowTitle">X11 Preferences</string>
-				<string key="NSWindowClass">NSPanel</string>
-				<object class="NSMutableString" key="NSViewClass">
-					<characters key="NS.bytes">View</characters>
-				</object>
-				<string key="NSWindowContentMaxSize">{3.40282e+38, 3.40282e+38}</string>
-				<string key="NSWindowContentMinSize">{213, 107}</string>
-				<object class="NSView" key="NSWindowView" id="941366957">
-					<nil key="NSNextResponder"/>
-					<int key="NSvFlags">256</int>
-					<object class="NSMutableArray" key="NSSubviews">
-						<bool key="EncodedWithXMLCoder">YES</bool>
-						<object class="NSTabView" id="448510093">
-							<reference key="NSNextResponder" ref="941366957"/>
-							<int key="NSvFlags">256</int>
-							<string key="NSFrame">{{13, 10}, {458, 264}}</string>
-							<reference key="NSSuperview" ref="941366957"/>
-							<object class="NSMutableArray" key="NSTabViewItems">
-								<bool key="EncodedWithXMLCoder">YES</bool>
-								<object class="NSTabViewItem" id="287591690">
-									<object class="NSMutableString" key="NSIdentifier">
-										<characters key="NS.bytes">1</characters>
-									</object>
-									<object class="NSView" key="NSView" id="596750588">
-										<reference key="NSNextResponder" ref="448510093"/>
-										<int key="NSvFlags">256</int>
-										<object class="NSMutableArray" key="NSSubviews">
-											<bool key="EncodedWithXMLCoder">YES</bool>
-											<object class="NSButton" id="119157981">
-												<reference key="NSNextResponder" ref="596750588"/>
-												<int key="NSvFlags">256</int>
-												<string key="NSFrame">{{18, 182}, {402, 18}}</string>
-												<reference key="NSSuperview" ref="596750588"/>
-												<bool key="NSEnabled">YES</bool>
-												<object class="NSButtonCell" key="NSCell" id="990762273">
-													<int key="NSCellFlags">67239424</int>
-													<int key="NSCellFlags2">0</int>
-													<string key="NSContents">Emulate three button mouse</string>
-													<object class="NSFont" key="NSSupport" id="463863101">
-														<string key="NSName">LucidaGrande</string>
-														<double key="NSSize">1.300000e+01</double>
-														<int key="NSfFlags">1044</int>
-													</object>
-													<reference key="NSControlView" ref="119157981"/>
-													<int key="NSButtonFlags">1211912703</int>
-													<int key="NSButtonFlags2">2</int>
-													<object class="NSButtonImageSource" key="NSAlternateImage" id="391434389">
-														<string key="NSImageName">NSSwitch</string>
-													</object>
-													<string key="NSAlternateContents"/>
-													<string key="NSKeyEquivalent"/>
-													<int key="NSPeriodicDelay">200</int>
-													<int key="NSPeriodicInterval">25</int>
-												</object>
-											</object>
-											<object class="NSTextField" id="443008216">
-												<reference key="NSNextResponder" ref="596750588"/>
-												<int key="NSvFlags">256</int>
-												<string key="NSFrame">{{36, 32}, {385, 31}}</string>
-												<reference key="NSSuperview" ref="596750588"/>
-												<bool key="NSEnabled">YES</bool>
-												<object class="NSTextFieldCell" key="NSCell" id="391919450">
-													<int key="NSCellFlags">67239424</int>
-													<int key="NSCellFlags2">4194304</int>
-													<string key="NSContents">When enabled, menu bar key equivalents may interfere with X11 applications that use the Meta modifier.</string>
-													<object class="NSFont" key="NSSupport" id="26">
-														<string key="NSName">LucidaGrande</string>
-														<double key="NSSize">1.100000e+01</double>
-														<int key="NSfFlags">3100</int>
-													</object>
-													<reference key="NSControlView" ref="443008216"/>
-													<object class="NSColor" key="NSBackgroundColor" id="57160303">
-														<int key="NSColorSpace">6</int>
-														<string key="NSCatalogName">System</string>
-														<string key="NSColorName">controlColor</string>
-														<object class="NSColor" key="NSColor" id="590688762">
-															<int key="NSColorSpace">3</int>
-															<bytes key="NSWhite">MC42NjY2NjY2OQA</bytes>
-														</object>
-													</object>
-													<object class="NSColor" key="NSTextColor" id="930815747">
-														<int key="NSColorSpace">6</int>
-														<string key="NSCatalogName">System</string>
-														<string key="NSColorName">controlTextColor</string>
-														<object class="NSColor" key="NSColor" id="214098874">
-															<int key="NSColorSpace">3</int>
-															<bytes key="NSWhite">MAA</bytes>
-														</object>
-													</object>
-												</object>
-											</object>
-											<object class="NSTextField" id="282885445">
-												<reference key="NSNextResponder" ref="596750588"/>
-												<int key="NSvFlags">256</int>
-												<string key="NSFrame">{{36, 147}, {385, 29}}</string>
-												<reference key="NSSuperview" ref="596750588"/>
-												<bool key="NSEnabled">YES</bool>
-												<object class="NSTextFieldCell" key="NSCell" id="649334366">
-													<int key="NSCellFlags">67239424</int>
-													<int key="NSCellFlags2">4194304</int>
-													<string type="base64-UTF8" key="NSContents">SG9sZCBPcHRpb24gYW5kIENvbW1hbmQgd2hpbGUgY2xpY2tpbmcgdG8gYWN0aXZhdGUgdGhlIG1pZGRs
-ZSBhbmQgcmlnaHQgbW91c2UgYnV0dG9ucy4KA</string>
-													<reference key="NSSupport" ref="26"/>
-													<reference key="NSControlView" ref="282885445"/>
-													<reference key="NSBackgroundColor" ref="57160303"/>
-													<reference key="NSTextColor" ref="930815747"/>
-												</object>
-											</object>
-											<object class="NSButton" id="842100515">
-												<reference key="NSNextResponder" ref="596750588"/>
-												<int key="NSvFlags">256</int>
-												<string key="NSFrame">{{18, 69}, {402, 18}}</string>
-												<reference key="NSSuperview" ref="596750588"/>
-												<bool key="NSEnabled">YES</bool>
-												<object class="NSButtonCell" key="NSCell" id="940564599">
-													<int key="NSCellFlags">67239424</int>
-													<int key="NSCellFlags2">0</int>
-													<string key="NSContents">Enable key equivalents under X11</string>
-													<reference key="NSSupport" ref="463863101"/>
-													<reference key="NSControlView" ref="842100515"/>
-													<int key="NSButtonFlags">1211912703</int>
-													<int key="NSButtonFlags2">2</int>
-													<reference key="NSAlternateImage" ref="391434389"/>
-													<string key="NSAlternateContents"/>
-													<string key="NSKeyEquivalent"/>
-													<int key="NSPeriodicDelay">200</int>
-													<int key="NSPeriodicInterval">25</int>
-												</object>
-											</object>
-											<object class="NSTextField" id="31160162">
-												<reference key="NSNextResponder" ref="596750588"/>
-												<int key="NSvFlags">256</int>
-												<string key="NSFrame">{{36, 98}, {385, 14}}</string>
-												<reference key="NSSuperview" ref="596750588"/>
-												<bool key="NSEnabled">YES</bool>
-												<object class="NSTextFieldCell" key="NSCell" id="666057093">
-													<int key="NSCellFlags">67239424</int>
-													<int key="NSCellFlags2">4194304</int>
-													<string key="NSContents">Allows input menu changes to overwrite the current X11 keymap.</string>
-													<reference key="NSSupport" ref="26"/>
-													<reference key="NSControlView" ref="31160162"/>
-													<reference key="NSBackgroundColor" ref="57160303"/>
-													<reference key="NSTextColor" ref="930815747"/>
-												</object>
-											</object>
-											<object class="NSButton" id="179949713">
-												<reference key="NSNextResponder" ref="596750588"/>
-												<int key="NSvFlags">256</int>
-												<string key="NSFrame">{{18, 118}, {402, 18}}</string>
-												<reference key="NSSuperview" ref="596750588"/>
-												<bool key="NSEnabled">YES</bool>
-												<object class="NSButtonCell" key="NSCell" id="967619578">
-													<int key="NSCellFlags">67239424</int>
-													<int key="NSCellFlags2">0</int>
-													<string key="NSContents">Follow system keyboard layout</string>
-													<reference key="NSSupport" ref="463863101"/>
-													<reference key="NSControlView" ref="179949713"/>
-													<int key="NSButtonFlags">1211912703</int>
-													<int key="NSButtonFlags2">2</int>
-													<reference key="NSAlternateImage" ref="391434389"/>
-													<string key="NSAlternateContents"/>
-													<string key="NSKeyEquivalent"/>
-													<int key="NSPeriodicDelay">200</int>
-													<int key="NSPeriodicInterval">25</int>
-												</object>
-											</object>
-										</object>
-										<string key="NSFrame">{{10, 33}, {438, 218}}</string>
-										<reference key="NSSuperview" ref="448510093"/>
-									</object>
-									<string key="NSLabel">Input</string>
-									<reference key="NSColor" ref="57160303"/>
-									<reference key="NSTabView" ref="448510093"/>
-								</object>
-								<object class="NSTabViewItem" id="960678392">
-									<object class="NSMutableString" key="NSIdentifier">
-										<characters key="NS.bytes">2</characters>
-									</object>
-									<object class="NSView" key="NSView" id="515308735">
-										<nil key="NSNextResponder"/>
-										<int key="NSvFlags">256</int>
-										<object class="NSMutableArray" key="NSSubviews">
-											<bool key="EncodedWithXMLCoder">YES</bool>
-											<object class="NSButton" id="418227126">
-												<reference key="NSNextResponder" ref="515308735"/>
-												<int key="NSvFlags">256</int>
-												<string key="NSFrame">{{18, 55}, {402, 18}}</string>
-												<reference key="NSSuperview" ref="515308735"/>
-												<bool key="NSEnabled">YES</bool>
-												<object class="NSButtonCell" key="NSCell" id="1016069354">
-													<int key="NSCellFlags">67239424</int>
-													<int key="NSCellFlags2">0</int>
-													<string key="NSContents">Use system alert effect</string>
-													<reference key="NSSupport" ref="463863101"/>
-													<reference key="NSControlView" ref="418227126"/>
-													<int key="NSButtonFlags">1211912703</int>
-													<int key="NSButtonFlags2">2</int>
-													<reference key="NSAlternateImage" ref="391434389"/>
-													<string key="NSAlternateContents"/>
-													<string key="NSKeyEquivalent"/>
-													<int key="NSPeriodicDelay">200</int>
-													<int key="NSPeriodicInterval">25</int>
-												</object>
-											</object>
-											<object class="NSTextField" id="1039016593">
-												<reference key="NSNextResponder" ref="515308735"/>
-												<int key="NSvFlags">256</int>
-												<string key="NSFrame">{{36, 21}, {385, 28}}</string>
-												<reference key="NSSuperview" ref="515308735"/>
-												<bool key="NSEnabled">YES</bool>
-												<object class="NSTextFieldCell" key="NSCell" id="624655599">
-													<int key="NSCellFlags">67239424</int>
-													<int key="NSCellFlags2">4194304</int>
-													<string key="NSContents">X11 beeps will use the standard system alert, as defined in the Sound Effects system preferences panel.</string>
-													<reference key="NSSupport" ref="26"/>
-													<reference key="NSControlView" ref="1039016593"/>
-													<reference key="NSBackgroundColor" ref="57160303"/>
-													<reference key="NSTextColor" ref="930815747"/>
-												</object>
-											</object>
-											<object class="NSPopUpButton" id="709074847">
-												<reference key="NSNextResponder" ref="515308735"/>
-												<int key="NSvFlags">256</int>
-												<string key="NSFrame">{{74, 174}, {128, 26}}</string>
-												<reference key="NSSuperview" ref="515308735"/>
-												<bool key="NSEnabled">YES</bool>
-												<object class="NSPopUpButtonCell" key="NSCell" id="633115429">
-													<int key="NSCellFlags">-2076049856</int>
-													<int key="NSCellFlags2">1024</int>
-													<reference key="NSSupport" ref="463863101"/>
-													<reference key="NSControlView" ref="709074847"/>
-													<int key="NSButtonFlags">109199615</int>
-													<int key="NSButtonFlags2">1</int>
-													<object class="NSFont" key="NSAlternateImage">
-														<string key="NSName">LucidaGrande</string>
-														<double key="NSSize">1.300000e+01</double>
-														<int key="NSfFlags">16</int>
-													</object>
-													<object class="NSMutableString" key="NSAlternateContents">
-														<characters key="NS.bytes"/>
-													</object>
-													<object class="NSMutableString" key="NSKeyEquivalent">
-														<characters key="NS.bytes"/>
-													</object>
-													<int key="NSPeriodicDelay">400</int>
-													<int key="NSPeriodicInterval">75</int>
-													<object class="NSMenuItem" key="NSMenuItem" id="616492372">
-														<reference key="NSMenu" ref="341113515"/>
-														<string key="NSTitle">From Display</string>
-														<string key="NSKeyEquiv"/>
-														<int key="NSKeyEquivModMask">1048576</int>
-														<int key="NSMnemonicLoc">2147483647</int>
-														<int key="NSState">1</int>
-														<reference key="NSOnImage" ref="531645050"/>
-														<reference key="NSMixedImage" ref="351811234"/>
-														<string key="NSAction">_popUpItemAction:</string>
-														<int key="NSTag">-1</int>
-														<reference key="NSTarget" ref="633115429"/>
-													</object>
-													<bool key="NSMenuItemRespectAlignment">YES</bool>
-													<object class="NSMenu" key="NSMenu" id="341113515">
-														<object class="NSMutableString" key="NSTitle">
-															<characters key="NS.bytes">OtherViews</characters>
-														</object>
-														<object class="NSMutableArray" key="NSMenuItems">
-															<bool key="EncodedWithXMLCoder">YES</bool>
-															<reference ref="616492372"/>
-															<object class="NSMenuItem" id="759499526">
-																<reference key="NSMenu" ref="341113515"/>
-																<string key="NSTitle">256 Colors</string>
-																<string key="NSKeyEquiv"/>
-																<int key="NSKeyEquivModMask">1048576</int>
-																<int key="NSMnemonicLoc">2147483647</int>
-																<reference key="NSOnImage" ref="531645050"/>
-																<reference key="NSMixedImage" ref="351811234"/>
-																<string key="NSAction">_popUpItemAction:</string>
-																<int key="NSTag">8</int>
-																<reference key="NSTarget" ref="633115429"/>
-															</object>
-															<object class="NSMenuItem" id="543935434">
-																<reference key="NSMenu" ref="341113515"/>
-																<string key="NSTitle">Thousands</string>
-																<string key="NSKeyEquiv"/>
-																<int key="NSKeyEquivModMask">1048576</int>
-																<int key="NSMnemonicLoc">2147483647</int>
-																<reference key="NSOnImage" ref="531645050"/>
-																<reference key="NSMixedImage" ref="351811234"/>
-																<string key="NSAction">_popUpItemAction:</string>
-																<int key="NSTag">15</int>
-																<reference key="NSTarget" ref="633115429"/>
-															</object>
-															<object class="NSMenuItem" id="836673018">
-																<reference key="NSMenu" ref="341113515"/>
-																<string key="NSTitle">Millions</string>
-																<string key="NSKeyEquiv"/>
-																<int key="NSKeyEquivModMask">1048576</int>
-																<int key="NSMnemonicLoc">2147483647</int>
-																<reference key="NSOnImage" ref="531645050"/>
-																<reference key="NSMixedImage" ref="351811234"/>
-																<string key="NSAction">_popUpItemAction:</string>
-																<int key="NSTag">24</int>
-																<reference key="NSTarget" ref="633115429"/>
-															</object>
-														</object>
-													</object>
-													<int key="NSPreferredEdge">3</int>
-													<bool key="NSUsesItemFromMenu">YES</bool>
-													<bool key="NSAltersState">YES</bool>
-													<int key="NSArrowPosition">1</int>
-												</object>
-											</object>
-											<object class="NSTextField" id="201731424">
-												<reference key="NSNextResponder" ref="515308735"/>
-												<int key="NSvFlags">256</int>
-												<string key="NSFrame">{{17, 177}, {55, 20}}</string>
-												<reference key="NSSuperview" ref="515308735"/>
-												<bool key="NSEnabled">YES</bool>
-												<object class="NSTextFieldCell" key="NSCell" id="930265681">
-													<int key="NSCellFlags">67239424</int>
-													<int key="NSCellFlags2">4194304</int>
-													<string type="base64-UTF8" key="NSContents">Q29sb3JzOgo</string>
-													<reference key="NSSupport" ref="463863101"/>
-													<reference key="NSControlView" ref="201731424"/>
-													<reference key="NSBackgroundColor" ref="57160303"/>
-													<reference key="NSTextColor" ref="930815747"/>
-												</object>
-											</object>
-											<object class="NSTextField" id="86150604">
-												<reference key="NSNextResponder" ref="515308735"/>
-												<int key="NSvFlags">256</int>
-												<string key="NSFrame">{{36, 155}, {392, 14}}</string>
-												<reference key="NSSuperview" ref="515308735"/>
-												<bool key="NSEnabled">YES</bool>
-												<object class="NSTextFieldCell" key="NSCell" id="311969422">
-													<int key="NSCellFlags">67239424</int>
-													<int key="NSCellFlags2">4194304</int>
-													<string key="NSContents">This option takes effect when X11 is launched again.</string>
-													<reference key="NSSupport" ref="26"/>
-													<reference key="NSControlView" ref="86150604"/>
-													<reference key="NSBackgroundColor" ref="57160303"/>
-													<reference key="NSTextColor" ref="930815747"/>
-												</object>
-											</object>
-											<object class="NSButton" id="477203622">
-												<reference key="NSNextResponder" ref="515308735"/>
-												<int key="NSvFlags">256</int>
-												<string key="NSFrame">{{18, 121}, {409, 23}}</string>
-												<reference key="NSSuperview" ref="515308735"/>
-												<bool key="NSEnabled">YES</bool>
-												<object class="NSButtonCell" key="NSCell" id="631531164">
-													<int key="NSCellFlags">67239424</int>
-													<int key="NSCellFlags2">0</int>
-													<string key="NSContents">Full screen mode</string>
-													<reference key="NSSupport" ref="463863101"/>
-													<reference key="NSControlView" ref="477203622"/>
-													<int key="NSButtonFlags">1211912703</int>
-													<int key="NSButtonFlags2">2</int>
-													<reference key="NSAlternateImage" ref="391434389"/>
-													<string key="NSAlternateContents"/>
-													<string key="NSKeyEquivalent"/>
-													<int key="NSPeriodicDelay">200</int>
-													<int key="NSPeriodicInterval">25</int>
-												</object>
-											</object>
-											<object class="NSTextField" id="298603383">
-												<reference key="NSNextResponder" ref="515308735"/>
-												<int key="NSvFlags">256</int>
-												<string key="NSFrame">{{36, 84}, {385, 31}}</string>
-												<reference key="NSSuperview" ref="515308735"/>
-												<bool key="NSEnabled">YES</bool>
-												<object class="NSTextFieldCell" key="NSCell" id="761107402">
-													<int key="NSCellFlags">67239424</int>
-													<int key="NSCellFlags2">4194304</int>
-													<string key="NSContents">Enables the X11 root window. Use the Command-Option-A keystroke to enter and leave full screen mode.</string>
-													<reference key="NSSupport" ref="26"/>
-													<reference key="NSControlView" ref="298603383"/>
-													<reference key="NSBackgroundColor" ref="57160303"/>
-													<reference key="NSTextColor" ref="930815747"/>
-												</object>
-											</object>
-										</object>
-										<string key="NSFrame">{{10, 33}, {438, 218}}</string>
-									</object>
-									<string key="NSLabel">Output</string>
-									<reference key="NSColor" ref="57160303"/>
-									<reference key="NSTabView" ref="448510093"/>
-								</object>
-								<object class="NSTabViewItem" id="10973343">
-									<object class="NSMutableString" key="NSIdentifier">
-										<characters key="NS.bytes">2</characters>
-									</object>
-									<object class="NSView" key="NSView" id="184765684">
-										<nil key="NSNextResponder"/>
-										<int key="NSvFlags">256</int>
-										<object class="NSMutableArray" key="NSSubviews">
-											<bool key="EncodedWithXMLCoder">YES</bool>
-											<object class="NSButton" id="657659108">
-												<reference key="NSNextResponder" ref="184765684"/>
-												<int key="NSvFlags">256</int>
-												<string key="NSFrame">{{15, 184}, {402, 18}}</string>
-												<reference key="NSSuperview" ref="184765684"/>
-												<bool key="NSEnabled">YES</bool>
-												<object class="NSButtonCell" key="NSCell" id="259618205">
-													<int key="NSCellFlags">67239424</int>
-													<int key="NSCellFlags2">0</int>
-													<string key="NSContents">Click-through Inactive Windows</string>
-													<reference key="NSSupport" ref="463863101"/>
-													<reference key="NSControlView" ref="657659108"/>
-													<int key="NSButtonFlags">1211912703</int>
-													<int key="NSButtonFlags2">2</int>
-													<reference key="NSAlternateImage" ref="391434389"/>
-													<string key="NSAlternateContents"/>
-													<string key="NSKeyEquivalent"/>
-													<int key="NSPeriodicDelay">200</int>
-													<int key="NSPeriodicInterval">25</int>
-												</object>
-											</object>
-											<object class="NSTextField" id="290578835">
-												<reference key="NSNextResponder" ref="184765684"/>
-												<int key="NSvFlags">256</int>
-												<string key="NSFrame">{{23, 147}, {385, 31}}</string>
-												<reference key="NSSuperview" ref="184765684"/>
-												<bool key="NSEnabled">YES</bool>
-												<object class="NSTextFieldCell" key="NSCell" id="399127858">
-													<int key="NSCellFlags">67239424</int>
-													<int key="NSCellFlags2">4194304</int>
-													<string key="NSContents">When enabled, clicking on an inactive window will cause that mouse click to pass through to that window in addition to activating it.</string>
-													<reference key="NSSupport" ref="26"/>
-													<reference key="NSControlView" ref="290578835"/>
-													<reference key="NSBackgroundColor" ref="57160303"/>
-													<reference key="NSTextColor" ref="930815747"/>
-												</object>
-											</object>
-											<object class="NSButton" id="992839333">
-												<reference key="NSNextResponder" ref="184765684"/>
-												<int key="NSvFlags">256</int>
-												<string key="NSFrame">{{15, 123}, {402, 18}}</string>
-												<reference key="NSSuperview" ref="184765684"/>
-												<bool key="NSEnabled">YES</bool>
-												<object class="NSButtonCell" key="NSCell" id="959555182">
-													<int key="NSCellFlags">67239424</int>
-													<int key="NSCellFlags2">0</int>
-													<string key="NSContents">Focus Follows Mouse</string>
-													<reference key="NSSupport" ref="463863101"/>
-													<reference key="NSControlView" ref="992839333"/>
-													<int key="NSButtonFlags">1211912703</int>
-													<int key="NSButtonFlags2">2</int>
-													<reference key="NSAlternateImage" ref="391434389"/>
-													<string key="NSAlternateContents"/>
-													<string key="NSKeyEquivalent"/>
-													<int key="NSPeriodicDelay">200</int>
-													<int key="NSPeriodicInterval">25</int>
-												</object>
-											</object>
-											<object class="NSTextField" id="138261120">
-												<reference key="NSNextResponder" ref="184765684"/>
-												<int key="NSvFlags">256</int>
-												<string key="NSFrame">{{23, 100}, {385, 17}}</string>
-												<reference key="NSSuperview" ref="184765684"/>
-												<bool key="NSEnabled">YES</bool>
-												<object class="NSTextFieldCell" key="NSCell" id="183409141">
-													<int key="NSCellFlags">67239424</int>
-													<int key="NSCellFlags2">4194304</int>
-													<string key="NSContents">X11 window focus follows the cursor</string>
-													<reference key="NSSupport" ref="26"/>
-													<reference key="NSControlView" ref="138261120"/>
-													<reference key="NSBackgroundColor" ref="57160303"/>
-													<reference key="NSTextColor" ref="930815747"/>
-												</object>
-											</object>
-											<object class="NSButton" id="128352289">
-												<reference key="NSNextResponder" ref="184765684"/>
-												<int key="NSvFlags">256</int>
-												<string key="NSFrame">{{15, 79}, {402, 18}}</string>
-												<reference key="NSSuperview" ref="184765684"/>
-												<bool key="NSEnabled">YES</bool>
-												<object class="NSButtonCell" key="NSCell" id="556463187">
-													<int key="NSCellFlags">67239424</int>
-													<int key="NSCellFlags2">0</int>
-													<string key="NSContents">Focus On New Windows</string>
-													<reference key="NSSupport" ref="463863101"/>
-													<reference key="NSControlView" ref="128352289"/>
-													<int key="NSButtonFlags">1211912703</int>
-													<int key="NSButtonFlags2">2</int>
-													<reference key="NSAlternateImage" ref="391434389"/>
-													<string key="NSAlternateContents"/>
-													<string key="NSKeyEquivalent"/>
-													<int key="NSPeriodicDelay">200</int>
-													<int key="NSPeriodicInterval">25</int>
-												</object>
-											</object>
-											<object class="NSTextField" id="57161931">
-												<reference key="NSNextResponder" ref="184765684"/>
-												<int key="NSvFlags">256</int>
-												<string key="NSFrame">{{23, 45}, {385, 28}}</string>
-												<reference key="NSSuperview" ref="184765684"/>
-												<bool key="NSEnabled">YES</bool>
-												<object class="NSTextFieldCell" key="NSCell" id="989804990">
-													<int key="NSCellFlags">67239424</int>
-													<int key="NSCellFlags2">4194304</int>
-													<string key="NSContents">When enabled, creation of a new X11 window will cause X11.app to move to the foreground (instead of Finder.app, Terminal.app, etc.)</string>
-													<reference key="NSSupport" ref="26"/>
-													<reference key="NSControlView" ref="57161931"/>
-													<reference key="NSBackgroundColor" ref="57160303"/>
-													<reference key="NSTextColor" ref="930815747"/>
-												</object>
-											</object>
-										</object>
-										<string key="NSFrame">{{10, 33}, {438, 218}}</string>
-									</object>
-									<string key="NSLabel">Windows</string>
-									<reference key="NSColor" ref="57160303"/>
-									<reference key="NSTabView" ref="448510093"/>
-								</object>
-								<object class="NSTabViewItem" id="348328898">
-									<object class="NSView" key="NSView" id="300811574">
-										<nil key="NSNextResponder"/>
-										<int key="NSvFlags">256</int>
-										<object class="NSMutableArray" key="NSSubviews">
-											<bool key="EncodedWithXMLCoder">YES</bool>
-											<object class="NSButton" id="989050925">
-												<reference key="NSNextResponder" ref="300811574"/>
-												<int key="NSvFlags">256</int>
-												<string key="NSFrame">{{18, 182}, {402, 18}}</string>
-												<reference key="NSSuperview" ref="300811574"/>
-												<bool key="NSEnabled">YES</bool>
-												<object class="NSButtonCell" key="NSCell" id="189594322">
-													<int key="NSCellFlags">67239424</int>
-													<int key="NSCellFlags2">0</int>
-													<string key="NSContents">Authenticate connections</string>
-													<reference key="NSSupport" ref="463863101"/>
-													<reference key="NSControlView" ref="989050925"/>
-													<int key="NSButtonFlags">1211912703</int>
-													<int key="NSButtonFlags2">2</int>
-													<reference key="NSAlternateImage" ref="391434389"/>
-													<string key="NSAlternateContents"/>
-													<string key="NSKeyEquivalent"/>
-													<int key="NSPeriodicDelay">200</int>
-													<int key="NSPeriodicInterval">25</int>
-												</object>
-											</object>
-											<object class="NSButton" id="700826966">
-												<reference key="NSNextResponder" ref="300811574"/>
-												<int key="NSvFlags">256</int>
-												<string key="NSFrame">{{18, 105}, {402, 18}}</string>
-												<reference key="NSSuperview" ref="300811574"/>
-												<bool key="NSEnabled">YES</bool>
-												<object class="NSButtonCell" key="NSCell" id="489340979">
-													<int key="NSCellFlags">67239424</int>
-													<int key="NSCellFlags2">0</int>
-													<string key="NSContents">Allow connections from network clients</string>
-													<reference key="NSSupport" ref="463863101"/>
-													<reference key="NSControlView" ref="700826966"/>
-													<int key="NSButtonFlags">1211912703</int>
-													<int key="NSButtonFlags2">2</int>
-													<reference key="NSAlternateImage" ref="391434389"/>
-													<string key="NSAlternateContents"/>
-													<string key="NSKeyEquivalent"/>
-													<int key="NSPeriodicDelay">200</int>
-													<int key="NSPeriodicInterval">25</int>
-												</object>
-											</object>
-											<object class="NSTextField" id="168436707">
-												<reference key="NSNextResponder" ref="300811574"/>
-												<int key="NSvFlags">256</int>
-												<string key="NSFrame">{{36, 134}, {385, 42}}</string>
-												<reference key="NSSuperview" ref="300811574"/>
-												<bool key="NSEnabled">YES</bool>
-												<object class="NSTextFieldCell" key="NSCell" id="53243865">
-													<int key="NSCellFlags">67239424</int>
-													<int key="NSCellFlags2">4194304</int>
-													<string type="base64-UTF8" key="NSContents">TGF1bmNoaW5nIFgxMSB3aWxsIGNyZWF0ZSBYYXV0aG9yaXR5IGFjY2Vzcy1jb250cm9sIGtleXMuIElm
-IHRoZSBzeXN0ZW0ncyBJUCBhZGRyZXNzIGNoYW5nZXMsIHRoZXNlIGtleXMgYmVjb21lIGludmFsaWQg
-d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
-													<reference key="NSSupport" ref="26"/>
-													<reference key="NSControlView" ref="168436707"/>
-													<reference key="NSBackgroundColor" ref="57160303"/>
-													<reference key="NSTextColor" ref="930815747"/>
-												</object>
-											</object>
-											<object class="NSTextField" id="363817195">
-												<reference key="NSNextResponder" ref="300811574"/>
-												<int key="NSvFlags">256</int>
-												<string key="NSFrame">{{36, 57}, {385, 42}}</string>
-												<reference key="NSSuperview" ref="300811574"/>
-												<bool key="NSEnabled">YES</bool>
-												<object class="NSTextFieldCell" key="NSCell" id="390084685">
-													<int key="NSCellFlags">67239424</int>
-													<int key="NSCellFlags2">4194304</int>
-													<string key="NSContents">If enabled, Authenticate connections must also be enabled to ensure system security. When disabled, connections from remote applications are not allowed.</string>
-													<reference key="NSSupport" ref="26"/>
-													<reference key="NSControlView" ref="363817195"/>
-													<reference key="NSBackgroundColor" ref="57160303"/>
-													<reference key="NSTextColor" ref="930815747"/>
-												</object>
-											</object>
-											<object class="NSTextField" id="223835729">
-												<reference key="NSNextResponder" ref="300811574"/>
-												<int key="NSvFlags">256</int>
-												<string key="NSFrame">{{20, -44}, {404, 14}}</string>
-												<reference key="NSSuperview" ref="300811574"/>
-												<bool key="NSEnabled">YES</bool>
-												<object class="NSTextFieldCell" key="NSCell" id="283628678">
-													<int key="NSCellFlags">67239424</int>
-													<int key="NSCellFlags2">4194304</int>
-													<string key="NSContents">These options take effect when X11 is next launched.</string>
-													<reference key="NSSupport" ref="26"/>
-													<reference key="NSControlView" ref="223835729"/>
-													<reference key="NSBackgroundColor" ref="57160303"/>
-													<reference key="NSTextColor" ref="930815747"/>
-												</object>
-											</object>
-										</object>
-										<string key="NSFrame">{{10, 33}, {438, 218}}</string>
-									</object>
-									<string key="NSLabel">Security</string>
-									<reference key="NSColor" ref="57160303"/>
-									<reference key="NSTabView" ref="448510093"/>
-								</object>
-							</object>
-							<reference key="NSSelectedTabViewItem" ref="287591690"/>
-							<reference key="NSFont" ref="463863101"/>
-							<int key="NSTvFlags">0</int>
-							<bool key="NSAllowTruncatedLabels">YES</bool>
-							<bool key="NSDrawsBackground">YES</bool>
-							<object class="NSMutableArray" key="NSSubviews">
-								<bool key="EncodedWithXMLCoder">YES</bool>
-								<reference ref="596750588"/>
-							</object>
-						</object>
-					</object>
-					<string key="NSFrameSize">{484, 280}</string>
-				</object>
-				<string key="NSScreenRect">{{0, 0}, {1280, 938}}</string>
-				<string key="NSMinSize">{213, 129}</string>
-				<string key="NSMaxSize">{3.40282e+38, 3.40282e+38}</string>
-				<string key="NSFrameAutosaveName">x11_prefs</string>
-			</object>
-			<object class="NSWindowTemplate" id="604417141">
-				<int key="NSWindowStyleMask">11</int>
-				<int key="NSWindowBacking">2</int>
-				<string key="NSWindowRect">{{302, 400}, {454, 311}}</string>
-				<int key="NSWTFlags">1350041600</int>
-				<string key="NSWindowTitle">X11 Application Menu</string>
-				<string key="NSWindowClass">NSPanel</string>
-				<object class="NSMutableString" key="NSViewClass">
-					<characters key="NS.bytes">View</characters>
-				</object>
-				<string key="NSWindowContentMaxSize">{10000, 10000}</string>
-				<string key="NSWindowContentMinSize">{320, 240}</string>
-				<object class="NSView" key="NSWindowView" id="85544634">
-					<nil key="NSNextResponder"/>
-					<int key="NSvFlags">256</int>
-					<object class="NSMutableArray" key="NSSubviews">
-						<bool key="EncodedWithXMLCoder">YES</bool>
-						<object class="NSButton" id="671954382">
-							<reference key="NSNextResponder" ref="85544634"/>
-							<int key="NSvFlags">265</int>
-							<string key="NSFrame">{{340, 231}, {100, 32}}</string>
-							<reference key="NSSuperview" ref="85544634"/>
-							<bool key="NSEnabled">YES</bool>
-							<object class="NSButtonCell" key="NSCell" id="143554520">
-								<int key="NSCellFlags">67239424</int>
-								<int key="NSCellFlags2">137887744</int>
-								<string key="NSContents">Duplicate</string>
-								<reference key="NSSupport" ref="463863101"/>
-								<reference key="NSControlView" ref="671954382"/>
-								<int key="NSButtonFlags">-2038284033</int>
-								<int key="NSButtonFlags2">1</int>
-								<object class="NSFont" key="NSAlternateImage" id="549406736">
-									<string key="NSName">Helvetica</string>
-									<double key="NSSize">1.300000e+01</double>
-									<int key="NSfFlags">16</int>
-								</object>
-								<object class="NSMutableString" key="NSAlternateContents">
-									<characters key="NS.bytes"/>
-								</object>
-								<object class="NSMutableString" key="NSKeyEquivalent">
-									<characters key="NS.bytes"/>
-								</object>
-								<int key="NSPeriodicDelay">200</int>
-								<int key="NSPeriodicInterval">25</int>
-							</object>
-						</object>
-						<object class="NSButton" id="492358940">
-							<reference key="NSNextResponder" ref="85544634"/>
-							<int key="NSvFlags">265</int>
-							<string key="NSFrame">{{340, 199}, {100, 32}}</string>
-							<reference key="NSSuperview" ref="85544634"/>
-							<bool key="NSEnabled">YES</bool>
-							<object class="NSButtonCell" key="NSCell" id="8201128">
-								<int key="NSCellFlags">67239424</int>
-								<int key="NSCellFlags2">137887744</int>
-								<string key="NSContents">Remove</string>
-								<reference key="NSSupport" ref="463863101"/>
-								<reference key="NSControlView" ref="492358940"/>
-								<int key="NSButtonFlags">-2038284033</int>
-								<int key="NSButtonFlags2">1</int>
-								<reference key="NSAlternateImage" ref="549406736"/>
-								<object class="NSMutableString" key="NSAlternateContents">
-									<characters key="NS.bytes"/>
-								</object>
-								<object class="NSMutableString" key="NSKeyEquivalent">
-									<characters key="NS.bytes"/>
-								</object>
-								<int key="NSPeriodicDelay">200</int>
-								<int key="NSPeriodicInterval">25</int>
-							</object>
-						</object>
-						<object class="NSScrollView" id="1063387772">
-							<reference key="NSNextResponder" ref="85544634"/>
-							<int key="NSvFlags">274</int>
-							<object class="NSMutableArray" key="NSSubviews">
-								<bool key="EncodedWithXMLCoder">YES</bool>
-								<object class="NSClipView" id="580565898">
-									<reference key="NSNextResponder" ref="1063387772"/>
-									<int key="NSvFlags">2304</int>
-									<object class="NSMutableArray" key="NSSubviews">
-										<bool key="EncodedWithXMLCoder">YES</bool>
-										<object class="NSTableView" id="905092943">
-											<reference key="NSNextResponder" ref="580565898"/>
-											<int key="NSvFlags">256</int>
-											<string key="NSFrameSize">{301, 198}</string>
-											<reference key="NSSuperview" ref="580565898"/>
-											<bool key="NSEnabled">YES</bool>
-											<object class="NSTableHeaderView" key="NSHeaderView" id="792419186">
-												<reference key="NSNextResponder" ref="672307654"/>
-												<int key="NSvFlags">256</int>
-												<string key="NSFrameSize">{301, 17}</string>
-												<reference key="NSSuperview" ref="672307654"/>
-												<reference key="NSTableView" ref="905092943"/>
-											</object>
-											<object class="_NSCornerView" key="NSCornerView" id="898633680">
-												<reference key="NSNextResponder" ref="1063387772"/>
-												<int key="NSvFlags">256</int>
-												<string key="NSFrame">{{302, 0}, {16, 17}}</string>
-												<reference key="NSSuperview" ref="1063387772"/>
-											</object>
-											<object class="NSMutableArray" key="NSTableColumns">
-												<bool key="EncodedWithXMLCoder">YES</bool>
-												<object class="NSTableColumn" id="84282687">
-													<double key="NSWidth">9.900000e+01</double>
-													<double key="NSMinWidth">4.000000e+01</double>
-													<double key="NSMaxWidth">1.000000e+03</double>
-													<object class="NSTableHeaderCell" key="NSHeaderCell">
-														<int key="NSCellFlags">75628032</int>
-														<int key="NSCellFlags2">0</int>
-														<string key="NSContents">Name</string>
-														<reference key="NSSupport" ref="26"/>
-														<object class="NSColor" key="NSBackgroundColor" id="113872566">
-															<int key="NSColorSpace">3</int>
-															<bytes key="NSWhite">MC4zMzMzMzI5OQA</bytes>
-														</object>
-														<object class="NSColor" key="NSTextColor" id="249576247">
-															<int key="NSColorSpace">6</int>
-															<string key="NSCatalogName">System</string>
-															<string key="NSColorName">headerTextColor</string>
-															<reference key="NSColor" ref="214098874"/>
-														</object>
-													</object>
-													<object class="NSTextFieldCell" key="NSDataCell" id="432610585">
-														<int key="NSCellFlags">338820672</int>
-														<int key="NSCellFlags2">1024</int>
-														<string key="NSContents">Text Cell</string>
-														<reference key="NSSupport" ref="463863101"/>
-														<reference key="NSControlView" ref="905092943"/>
-														<object class="NSColor" key="NSBackgroundColor" id="822946413">
-															<int key="NSColorSpace">3</int>
-															<bytes key="NSWhite">MQA</bytes>
-														</object>
-														<reference key="NSTextColor" ref="930815747"/>
-													</object>
-													<int key="NSResizingMask">3</int>
-													<bool key="NSIsResizeable">YES</bool>
-													<bool key="NSIsEditable">YES</bool>
-													<reference key="NSTableView" ref="905092943"/>
-												</object>
-												<object class="NSTableColumn" id="938444323">
-													<double key="NSWidth">1.217310e+02</double>
-													<double key="NSMinWidth">6.273100e+01</double>
-													<double key="NSMaxWidth">1.000000e+03</double>
-													<object class="NSTableHeaderCell" key="NSHeaderCell">
-														<int key="NSCellFlags">75628032</int>
-														<int key="NSCellFlags2">0</int>
-														<string key="NSContents">Command</string>
-														<reference key="NSSupport" ref="26"/>
-														<reference key="NSBackgroundColor" ref="113872566"/>
-														<reference key="NSTextColor" ref="249576247"/>
-													</object>
-													<object class="NSTextFieldCell" key="NSDataCell" id="825378892">
-														<int key="NSCellFlags">338820672</int>
-														<int key="NSCellFlags2">1024</int>
-														<string key="NSContents">Text Cell</string>
-														<reference key="NSSupport" ref="463863101"/>
-														<reference key="NSControlView" ref="905092943"/>
-														<reference key="NSBackgroundColor" ref="822946413"/>
-														<reference key="NSTextColor" ref="930815747"/>
-													</object>
-													<int key="NSResizingMask">3</int>
-													<bool key="NSIsResizeable">YES</bool>
-													<bool key="NSIsEditable">YES</bool>
-													<reference key="NSTableView" ref="905092943"/>
-												</object>
-												<object class="NSTableColumn" id="242608782">
-													<double key="NSWidth">7.100000e+01</double>
-													<double key="NSMinWidth">1.000000e+01</double>
-													<double key="NSMaxWidth">1.000000e+03</double>
-													<object class="NSTableHeaderCell" key="NSHeaderCell">
-														<int key="NSCellFlags">67239424</int>
-														<int key="NSCellFlags2">0</int>
-														<string key="NSContents">Shortcut</string>
-														<reference key="NSSupport" ref="26"/>
-														<object class="NSColor" key="NSBackgroundColor">
-															<int key="NSColorSpace">6</int>
-															<string key="NSCatalogName">System</string>
-															<string key="NSColorName">headerColor</string>
-															<reference key="NSColor" ref="822946413"/>
-														</object>
-														<reference key="NSTextColor" ref="249576247"/>
-													</object>
-													<object class="NSTextFieldCell" key="NSDataCell" id="34714764">
-														<int key="NSCellFlags">338820672</int>
-														<int key="NSCellFlags2">1024</int>
-														<string key="NSContents">Text Cell</string>
-														<object class="NSFont" key="NSSupport">
-															<string key="NSName">LucidaGrande</string>
-															<double key="NSSize">1.200000e+01</double>
-															<int key="NSfFlags">16</int>
-														</object>
-														<reference key="NSControlView" ref="905092943"/>
-														<bool key="NSDrawsBackground">YES</bool>
-														<object class="NSColor" key="NSBackgroundColor" id="812484075">
-															<int key="NSColorSpace">6</int>
-															<string key="NSCatalogName">System</string>
-															<string key="NSColorName">controlBackgroundColor</string>
-															<reference key="NSColor" ref="590688762"/>
-														</object>
-														<reference key="NSTextColor" ref="930815747"/>
-													</object>
-													<int key="NSResizingMask">3</int>
-													<bool key="NSIsResizeable">YES</bool>
-													<bool key="NSIsEditable">YES</bool>
-													<reference key="NSTableView" ref="905092943"/>
-												</object>
-											</object>
-											<double key="NSIntercellSpacingWidth">3.000000e+00</double>
-											<double key="NSIntercellSpacingHeight">2.000000e+00</double>
-											<reference key="NSBackgroundColor" ref="822946413"/>
-											<object class="NSColor" key="NSGridColor">
-												<int key="NSColorSpace">6</int>
-												<string key="NSCatalogName">System</string>
-												<string key="NSColorName">gridColor</string>
-												<object class="NSColor" key="NSColor">
-													<int key="NSColorSpace">3</int>
-													<bytes key="NSWhite">MC41AA</bytes>
-												</object>
-											</object>
-											<double key="NSRowHeight">1.700000e+01</double>
-											<int key="NSTvFlags">1379958784</int>
-											<int key="NSColumnAutoresizingStyle">1</int>
-											<int key="NSDraggingSourceMaskForLocal">-1</int>
-											<int key="NSDraggingSourceMaskForNonLocal">0</int>
-											<bool key="NSAllowsTypeSelect">YES</bool>
-										</object>
-									</object>
-									<string key="NSFrame">{{1, 17}, {301, 198}}</string>
-									<reference key="NSSuperview" ref="1063387772"/>
-									<reference key="NSNextKeyView" ref="905092943"/>
-									<reference key="NSDocView" ref="905092943"/>
-									<reference key="NSBGColor" ref="812484075"/>
-									<int key="NScvFlags">4</int>
-								</object>
-								<object class="NSScroller" id="842897584">
-									<reference key="NSNextResponder" ref="1063387772"/>
-									<int key="NSvFlags">256</int>
-									<string key="NSFrame">{{302, 17}, {15, 198}}</string>
-									<reference key="NSSuperview" ref="1063387772"/>
-									<reference key="NSTarget" ref="1063387772"/>
-									<string key="NSAction">_doScroller:</string>
-									<double key="NSPercent">9.949238e-01</double>
-								</object>
-								<object class="NSScroller" id="17278747">
-									<reference key="NSNextResponder" ref="1063387772"/>
-									<int key="NSvFlags">256</int>
-									<string key="NSFrame">{{1, 215}, {301, 15}}</string>
-									<reference key="NSSuperview" ref="1063387772"/>
-									<int key="NSsFlags">1</int>
-									<reference key="NSTarget" ref="1063387772"/>
-									<string key="NSAction">_doScroller:</string>
-									<double key="NSPercent">6.885246e-01</double>
-								</object>
-								<object class="NSClipView" id="672307654">
-									<reference key="NSNextResponder" ref="1063387772"/>
-									<int key="NSvFlags">2304</int>
-									<object class="NSMutableArray" key="NSSubviews">
-										<bool key="EncodedWithXMLCoder">YES</bool>
-										<reference ref="792419186"/>
-									</object>
-									<string key="NSFrame">{{1, 0}, {301, 17}}</string>
-									<reference key="NSSuperview" ref="1063387772"/>
-									<reference key="NSNextKeyView" ref="792419186"/>
-									<reference key="NSDocView" ref="792419186"/>
-									<reference key="NSBGColor" ref="812484075"/>
-									<int key="NScvFlags">4</int>
-								</object>
-								<reference ref="898633680"/>
-							</object>
-							<string key="NSFrame">{{20, 60}, {318, 231}}</string>
-							<reference key="NSSuperview" ref="85544634"/>
-							<reference key="NSNextKeyView" ref="580565898"/>
-							<int key="NSsFlags">50</int>
-							<reference key="NSVScroller" ref="842897584"/>
-							<reference key="NSHScroller" ref="17278747"/>
-							<reference key="NSContentView" ref="580565898"/>
-							<reference key="NSHeaderClipView" ref="672307654"/>
-							<reference key="NSCornerView" ref="898633680"/>
-							<bytes key="NSScrollAmts">QSAAAEEgAABBmAAAQZgAAA</bytes>
-						</object>
-						<object class="NSButton" id="758204686">
-							<reference key="NSNextResponder" ref="85544634"/>
-							<int key="NSvFlags">265</int>
-							<string key="NSFrame">{{340, 263}, {100, 32}}</string>
-							<reference key="NSSuperview" ref="85544634"/>
-							<bool key="NSEnabled">YES</bool>
-							<object class="NSButtonCell" key="NSCell" id="1025474039">
-								<int key="NSCellFlags">-2080244224</int>
-								<int key="NSCellFlags2">137887744</int>
-								<string key="NSContents">Add Item</string>
-								<reference key="NSSupport" ref="463863101"/>
-								<reference key="NSControlView" ref="758204686"/>
-								<int key="NSButtonFlags">-2038284033</int>
-								<int key="NSButtonFlags2">1</int>
-								<reference key="NSAlternateImage" ref="549406736"/>
-								<object class="NSMutableString" key="NSAlternateContents">
-									<characters key="NS.bytes"/>
-								</object>
-								<object class="NSMutableString" key="NSKeyEquivalent">
-									<characters key="NS.bytes"/>
-								</object>
-								<int key="NSPeriodicDelay">200</int>
-								<int key="NSPeriodicInterval">25</int>
-							</object>
-						</object>
-						<object class="NSButton" id="125703429">
-							<reference key="NSNextResponder" ref="85544634"/>
-							<int key="NSvFlags">257</int>
-							<string key="NSFrame">{{356, 12}, {84, 32}}</string>
-							<reference key="NSSuperview" ref="85544634"/>
-							<bool key="NSEnabled">YES</bool>
-							<object class="NSButtonCell" key="NSCell" id="892296813">
-								<int key="NSCellFlags">-2080244224</int>
-								<int key="NSCellFlags2">137887744</int>
-								<string key="NSContents">Cancel</string>
-								<reference key="NSSupport" ref="463863101"/>
-								<reference key="NSControlView" ref="125703429"/>
-								<int key="NSButtonFlags">-2038284033</int>
-								<int key="NSButtonFlags2">1</int>
-								<reference key="NSAlternateImage" ref="549406736"/>
-								<object class="NSMutableString" key="NSAlternateContents">
-									<characters key="NS.bytes"/>
-								</object>
-								<object class="NSMutableString" key="NSKeyEquivalent">
-									<characters key="NS.bytes"/>
-								</object>
-								<int key="NSPeriodicDelay">200</int>
-								<int key="NSPeriodicInterval">25</int>
-							</object>
-						</object>
-						<object class="NSButton" id="724002248">
-							<reference key="NSNextResponder" ref="85544634"/>
-							<int key="NSvFlags">257</int>
-							<string key="NSFrame">{{272, 12}, {84, 32}}</string>
-							<reference key="NSSuperview" ref="85544634"/>
-							<bool key="NSEnabled">YES</bool>
-							<object class="NSButtonCell" key="NSCell" id="809610613">
-								<int key="NSCellFlags">-2080244224</int>
-								<int key="NSCellFlags2">137887744</int>
-								<string key="NSContents">Done</string>
-								<reference key="NSSupport" ref="463863101"/>
-								<reference key="NSControlView" ref="724002248"/>
-								<int key="NSButtonFlags">-2038284033</int>
-								<int key="NSButtonFlags2">1</int>
-								<reference key="NSAlternateImage" ref="549406736"/>
-								<string key="NSAlternateContents"/>
-								<object class="NSMutableString" key="NSKeyEquivalent">
-									<characters key="NS.bytes"/>
-								</object>
-								<int key="NSPeriodicDelay">200</int>
-								<int key="NSPeriodicInterval">25</int>
-							</object>
-						</object>
-					</object>
-					<string key="NSFrameSize">{454, 311}</string>
-				</object>
-				<string key="NSScreenRect">{{0, 0}, {1280, 938}}</string>
-				<string key="NSMinSize">{320, 262}</string>
-				<string key="NSFrameAutosaveName">x11_apps</string>
-			</object>
-			<object class="NSMenu" id="294137138">
-				<string key="NSTitle">Menu</string>
-				<object class="NSMutableArray" key="NSMenuItems">
-					<bool key="EncodedWithXMLCoder">YES</bool>
-					<object class="NSMenuItem" id="318286212">
-						<reference key="NSMenu" ref="294137138"/>
-						<bool key="NSIsDisabled">YES</bool>
-						<bool key="NSIsSeparator">YES</bool>
-						<string key="NSTitle"/>
-						<string key="NSKeyEquiv"/>
-						<int key="NSKeyEquivModMask">1048576</int>
-						<int key="NSMnemonicLoc">2147483647</int>
-						<reference key="NSOnImage" ref="531645050"/>
-						<reference key="NSMixedImage" ref="351811234"/>
-					</object>
-					<object class="NSMenuItem" id="511651072">
-						<reference key="NSMenu" ref="294137138"/>
-						<string key="NSTitle">Applications</string>
-						<string key="NSKeyEquiv"/>
-						<int key="NSKeyEquivModMask">1048576</int>
-						<int key="NSMnemonicLoc">2147483647</int>
-						<reference key="NSOnImage" ref="531645050"/>
-						<reference key="NSMixedImage" ref="351811234"/>
-						<string key="NSAction">submenuAction:</string>
-						<object class="NSMenu" key="NSSubmenu" id="48278059">
-							<string key="NSTitle">Applications</string>
-							<object class="NSMutableArray" key="NSMenuItems">
-								<bool key="EncodedWithXMLCoder">YES</bool>
-								<object class="NSMenuItem" id="563798000">
-									<reference key="NSMenu" ref="48278059"/>
-									<bool key="NSIsDisabled">YES</bool>
-									<bool key="NSIsSeparator">YES</bool>
-									<string key="NSTitle"/>
-									<string key="NSKeyEquiv"/>
-									<int key="NSKeyEquivModMask">1048576</int>
-									<int key="NSMnemonicLoc">2147483647</int>
-									<reference key="NSOnImage" ref="531645050"/>
-									<reference key="NSMixedImage" ref="351811234"/>
-								</object>
-								<object class="NSMenuItem" id="1032342329">
-									<reference key="NSMenu" ref="48278059"/>
-									<string type="base64-UTF8" key="NSTitle">Q3VzdG9taXpl4oCmA</string>
-									<string key="NSKeyEquiv"/>
-									<int key="NSKeyEquivModMask">1048576</int>
-									<int key="NSMnemonicLoc">2147483647</int>
-									<reference key="NSOnImage" ref="531645050"/>
-									<reference key="NSMixedImage" ref="351811234"/>
-								</object>
-							</object>
-						</object>
-					</object>
-				</object>
-				<string key="NSName"/>
-			</object>
-			<object class="NSCustomObject" id="556755705">
-				<string key="NSClassName">SUUpdater</string>
-			</object>
-		</object>
-		<object class="IBObjectContainer" key="IBDocument.Objects">
-			<object class="NSMutableArray" key="connectionRecords">
-				<bool key="EncodedWithXMLCoder">YES</bool>
-				<object class="IBConnectionRecord">
-					<object class="IBActionConnection" key="connection">
-						<string key="label">cut:</string>
-						<reference key="source" ref="941939442"/>
-						<reference key="destination" ref="581727829"/>
-					</object>
-					<int key="connectionID">175</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBActionConnection" key="connection">
-						<string key="label">paste:</string>
-						<reference key="source" ref="941939442"/>
-						<reference key="destination" ref="924678073"/>
-					</object>
-					<int key="connectionID">176</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBActionConnection" key="connection">
-						<string key="label">redo:</string>
-						<reference key="source" ref="941939442"/>
-						<reference key="destination" ref="535038564"/>
-					</object>
-					<int key="connectionID">178</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBActionConnection" key="connection">
-						<string key="label">selectAll:</string>
-						<reference key="source" ref="941939442"/>
-						<reference key="destination" ref="322866464"/>
-					</object>
-					<int key="connectionID">179</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBActionConnection" key="connection">
-						<string key="label">undo:</string>
-						<reference key="source" ref="941939442"/>
-						<reference key="destination" ref="1010221707"/>
-					</object>
-					<int key="connectionID">180</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBActionConnection" key="connection">
-						<string key="label">copy:</string>
-						<reference key="source" ref="941939442"/>
-						<reference key="destination" ref="185296989"/>
-					</object>
-					<int key="connectionID">181</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBActionConnection" key="connection">
-						<string key="label">delete:</string>
-						<reference key="source" ref="941939442"/>
-						<reference key="destination" ref="994817848"/>
-					</object>
-					<int key="connectionID">195</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBActionConnection" key="connection">
-						<string key="label">minimize_window:</string>
-						<reference key="source" ref="485884620"/>
-						<reference key="destination" ref="677652931"/>
-					</object>
-					<int key="connectionID">202</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBActionConnection" key="connection">
-						<string key="label">close_window:</string>
-						<reference key="source" ref="485884620"/>
-						<reference key="destination" ref="984461797"/>
-					</object>
-					<int key="connectionID">205</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBActionConnection" key="connection">
-						<string key="label">zoom_window:</string>
-						<reference key="source" ref="485884620"/>
-						<reference key="destination" ref="1066447520"/>
-					</object>
-					<int key="connectionID">206</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBActionConnection" key="connection">
-						<string key="label">bring_to_front:</string>
-						<reference key="source" ref="485884620"/>
-						<reference key="destination" ref="276216762"/>
-					</object>
-					<int key="connectionID">207</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBActionConnection" key="connection">
-						<string key="label">hideOtherApplications:</string>
-						<reference key="source" ref="815810918"/>
-						<reference key="destination" ref="206802571"/>
-					</object>
-					<int key="connectionID">263</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBOutletConnection" key="connection">
-						<string key="label">apps_separator</string>
-						<reference key="source" ref="485884620"/>
-						<reference key="destination" ref="390088328"/>
-					</object>
-					<int key="connectionID">273</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBOutletConnection" key="connection">
-						<string key="label">apps_table</string>
-						<reference key="source" ref="485884620"/>
-						<reference key="destination" ref="905092943"/>
-					</object>
-					<int key="connectionID">301</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBActionConnection" key="connection">
-						<string key="label">apps_table_done:</string>
-						<reference key="source" ref="485884620"/>
-						<reference key="destination" ref="724002248"/>
-					</object>
-					<int key="connectionID">302</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBActionConnection" key="connection">
-						<string key="label">apps_table_delete:</string>
-						<reference key="source" ref="485884620"/>
-						<reference key="destination" ref="492358940"/>
-					</object>
-					<int key="connectionID">303</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBActionConnection" key="connection">
-						<string key="label">apps_table_duplicate:</string>
-						<reference key="source" ref="485884620"/>
-						<reference key="destination" ref="671954382"/>
-					</object>
-					<int key="connectionID">304</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBActionConnection" key="connection">
-						<string key="label">apps_table_show:</string>
-						<reference key="source" ref="485884620"/>
-						<reference key="destination" ref="1065386165"/>
-					</object>
-					<int key="connectionID">308</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBActionConnection" key="connection">
-						<string key="label">apps_table_cancel:</string>
-						<reference key="source" ref="485884620"/>
-						<reference key="destination" ref="125703429"/>
-					</object>
-					<int key="connectionID">309</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBActionConnection" key="connection">
-						<string key="label">apps_table_new:</string>
-						<reference key="source" ref="485884620"/>
-						<reference key="destination" ref="758204686"/>
-					</object>
-					<int key="connectionID">311</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBActionConnection" key="connection">
-						<string key="label">prefs_show:</string>
-						<reference key="source" ref="485884620"/>
-						<reference key="destination" ref="386173216"/>
-					</object>
-					<int key="connectionID">318</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBOutletConnection" key="connection">
-						<string key="label">x11_about_item</string>
-						<reference key="source" ref="485884620"/>
-						<reference key="destination" ref="139290918"/>
-					</object>
-					<int key="connectionID">321</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBOutletConnection" key="connection">
-						<string key="label">enable_auth</string>
-						<reference key="source" ref="485884620"/>
-						<reference key="destination" ref="989050925"/>
-					</object>
-					<int key="connectionID">387</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBOutletConnection" key="connection">
-						<string key="label">enable_tcp</string>
-						<reference key="source" ref="485884620"/>
-						<reference key="destination" ref="700826966"/>
-					</object>
-					<int key="connectionID">388</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBOutletConnection" key="connection">
-						<string key="label">depth</string>
-						<reference key="source" ref="485884620"/>
-						<reference key="destination" ref="709074847"/>
-					</object>
-					<int key="connectionID">389</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBOutletConnection" key="connection">
-						<string key="label">use_sysbeep</string>
-						<reference key="source" ref="485884620"/>
-						<reference key="destination" ref="418227126"/>
-					</object>
-					<int key="connectionID">390</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBOutletConnection" key="connection">
-						<string key="label">fake_buttons</string>
-						<reference key="source" ref="485884620"/>
-						<reference key="destination" ref="119157981"/>
-					</object>
-					<int key="connectionID">391</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBOutletConnection" key="connection">
-						<string key="label">sync_keymap</string>
-						<reference key="source" ref="485884620"/>
-						<reference key="destination" ref="179949713"/>
-					</object>
-					<int key="connectionID">392</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBOutletConnection" key="connection">
-						<string key="label">enable_keyequivs</string>
-						<reference key="source" ref="485884620"/>
-						<reference key="destination" ref="842100515"/>
-					</object>
-					<int key="connectionID">393</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBActionConnection" key="connection">
-						<string key="label">prefs_changed:</string>
-						<reference key="source" ref="485884620"/>
-						<reference key="destination" ref="119157981"/>
-					</object>
-					<int key="connectionID">394</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBActionConnection" key="connection">
-						<string key="label">prefs_changed:</string>
-						<reference key="source" ref="485884620"/>
-						<reference key="destination" ref="179949713"/>
-					</object>
-					<int key="connectionID">395</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBActionConnection" key="connection">
-						<string key="label">prefs_changed:</string>
-						<reference key="source" ref="485884620"/>
-						<reference key="destination" ref="842100515"/>
-					</object>
-					<int key="connectionID">396</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBActionConnection" key="connection">
-						<string key="label">prefs_changed:</string>
-						<reference key="source" ref="485884620"/>
-						<reference key="destination" ref="418227126"/>
-					</object>
-					<int key="connectionID">397</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBActionConnection" key="connection">
-						<string key="label">prefs_changed:</string>
-						<reference key="source" ref="485884620"/>
-						<reference key="destination" ref="709074847"/>
-					</object>
-					<int key="connectionID">398</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBActionConnection" key="connection">
-						<string key="label">prefs_changed:</string>
-						<reference key="source" ref="485884620"/>
-						<reference key="destination" ref="989050925"/>
-					</object>
-					<int key="connectionID">399</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBActionConnection" key="connection">
-						<string key="label">prefs_changed:</string>
-						<reference key="source" ref="485884620"/>
-						<reference key="destination" ref="700826966"/>
-					</object>
-					<int key="connectionID">401</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBOutletConnection" key="connection">
-						<string key="label">prefs_panel</string>
-						<reference key="source" ref="485884620"/>
-						<reference key="destination" ref="124913468"/>
-					</object>
-					<int key="connectionID">402</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBActionConnection" key="connection">
-						<string key="label">x11_help:</string>
-						<reference key="source" ref="485884620"/>
-						<reference key="destination" ref="504984881"/>
-					</object>
-					<int key="connectionID">422</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBOutletConnection" key="connection">
-						<string key="label">dockMenu</string>
-						<reference key="source" ref="815810918"/>
-						<reference key="destination" ref="294137138"/>
-					</object>
-					<int key="connectionID">426</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBOutletConnection" key="connection">
-						<string key="label">dock_menu</string>
-						<reference key="source" ref="485884620"/>
-						<reference key="destination" ref="294137138"/>
-					</object>
-					<int key="connectionID">428</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBOutletConnection" key="connection">
-						<string key="label">delegate</string>
-						<reference key="source" ref="815810918"/>
-						<reference key="destination" ref="485884620"/>
-					</object>
-					<int key="connectionID">429</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBActionConnection" key="connection">
-						<string key="label">hide:</string>
-						<reference key="source" ref="815810918"/>
-						<reference key="destination" ref="301008465"/>
-					</object>
-					<int key="connectionID">430</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBActionConnection" key="connection">
-						<string key="label">unhideAllApplications:</string>
-						<reference key="source" ref="815810918"/>
-						<reference key="destination" ref="1023546148"/>
-					</object>
-					<int key="connectionID">431</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBActionConnection" key="connection">
-						<string key="label">orderFrontStandardAboutPanel:</string>
-						<reference key="source" ref="815810918"/>
-						<reference key="destination" ref="139290918"/>
-					</object>
-					<int key="connectionID">433</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBOutletConnection" key="connection">
-						<string key="label">dock_apps_menu</string>
-						<reference key="source" ref="485884620"/>
-						<reference key="destination" ref="48278059"/>
-					</object>
-					<int key="connectionID">530</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBOutletConnection" key="connection">
-						<string key="label">dock_window_separator</string>
-						<reference key="source" ref="485884620"/>
-						<reference key="destination" ref="318286212"/>
-					</object>
-					<int key="connectionID">531</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBActionConnection" key="connection">
-						<string key="label">apps_table_show:</string>
-						<reference key="source" ref="485884620"/>
-						<reference key="destination" ref="1032342329"/>
-					</object>
-					<int key="connectionID">534</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBActionConnection" key="connection">
-						<string key="label">next_window:</string>
-						<reference key="source" ref="485884620"/>
-						<reference key="destination" ref="1036389925"/>
-					</object>
-					<int key="connectionID">539</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBActionConnection" key="connection">
-						<string key="label">previous_window:</string>
-						<reference key="source" ref="485884620"/>
-						<reference key="destination" ref="369641893"/>
-					</object>
-					<int key="connectionID">540</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBOutletConnection" key="connection">
-						<string key="label">enable_fullscreen</string>
-						<reference key="source" ref="485884620"/>
-						<reference key="destination" ref="477203622"/>
-					</object>
-					<int key="connectionID">546</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBActionConnection" key="connection">
-						<string key="label">enable_fullscreen_changed:</string>
-						<reference key="source" ref="485884620"/>
-						<reference key="destination" ref="477203622"/>
-					</object>
-					<int key="connectionID">547</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBActionConnection" key="connection">
-						<string key="label">toggle_fullscreen:</string>
-						<reference key="source" ref="485884620"/>
-						<reference key="destination" ref="6876565"/>
-					</object>
-					<int key="connectionID">548</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBOutletConnection" key="connection">
-						<string key="label">toggle_fullscreen_item</string>
-						<reference key="source" ref="485884620"/>
-						<reference key="destination" ref="6876565"/>
-					</object>
-					<int key="connectionID">549</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBOutletConnection" key="connection">
-						<string key="label">window_separator</string>
-						<reference key="source" ref="485884620"/>
-						<reference key="destination" ref="444952046"/>
-					</object>
-					<int key="connectionID">300331</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBOutletConnection" key="connection">
-						<string key="label">menu</string>
-						<reference key="source" ref="815810918"/>
-						<reference key="destination" ref="524015605"/>
-					</object>
-					<int key="connectionID">300334</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBActionConnection" key="connection">
-						<string key="label">terminate:</string>
-						<reference key="source" ref="815810918"/>
-						<reference key="destination" ref="274138642"/>
-					</object>
-					<int key="connectionID">300336</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBActionConnection" key="connection">
-						<string key="label">prefs_changed:</string>
-						<reference key="source" ref="485884620"/>
-						<reference key="destination" ref="657659108"/>
-					</object>
-					<int key="connectionID">300389</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBActionConnection" key="connection">
-						<string key="label">prefs_changed:</string>
-						<reference key="source" ref="485884620"/>
-						<reference key="destination" ref="992839333"/>
-					</object>
-					<int key="connectionID">300390</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBActionConnection" key="connection">
-						<string key="label">prefs_changed:</string>
-						<reference key="source" ref="485884620"/>
-						<reference key="destination" ref="128352289"/>
-					</object>
-					<int key="connectionID">300391</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBOutletConnection" key="connection">
-						<string key="label">click_through</string>
-						<reference key="source" ref="485884620"/>
-						<reference key="destination" ref="657659108"/>
-					</object>
-					<int key="connectionID">300392</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBOutletConnection" key="connection">
-						<string key="label">focus_follows_mouse</string>
-						<reference key="source" ref="485884620"/>
-						<reference key="destination" ref="992839333"/>
-					</object>
-					<int key="connectionID">300393</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBOutletConnection" key="connection">
-						<string key="label">focus_on_new_window</string>
-						<reference key="source" ref="485884620"/>
-						<reference key="destination" ref="128352289"/>
-					</object>
-					<int key="connectionID">300394</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBActionConnection" key="connection">
-						<string key="label">checkForUpdates:</string>
-						<reference key="source" ref="556755705"/>
-						<reference key="destination" ref="858487910"/>
-					</object>
-					<int key="connectionID">300397</int>
-				</object>
-			</object>
-			<object class="IBMutableOrderedSet" key="objectRecords">
-				<object class="NSArray" key="orderedObjects">
-					<bool key="EncodedWithXMLCoder">YES</bool>
-					<object class="IBObjectRecord">
-						<int key="objectID">0</int>
-						<object class="NSArray" key="object" id="330408435">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-						</object>
-						<reference key="children" ref="904585544"/>
-						<nil key="parent"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">-2</int>
-						<reference key="object" ref="815810918"/>
-						<reference key="parent" ref="330408435"/>
-						<string type="base64-UTF8" key="objectName">RmlsZSdzIE93bmVyA</string>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">-1</int>
-						<reference key="object" ref="941939442"/>
-						<reference key="parent" ref="330408435"/>
-						<string key="objectName">First Responder</string>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">-3</int>
-						<reference key="object" ref="951368722"/>
-						<reference key="parent" ref="330408435"/>
-						<string key="objectName">Application</string>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">29</int>
-						<reference key="object" ref="524015605"/>
-						<object class="NSMutableArray" key="children">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="931553638"/>
-							<reference ref="365880285"/>
-							<reference ref="200491363"/>
-							<reference ref="868031522"/>
-							<reference ref="551174276"/>
-						</object>
-						<reference key="parent" ref="330408435"/>
-						<string key="objectName">MainMenu</string>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">19</int>
-						<reference key="object" ref="931553638"/>
-						<object class="NSMutableArray" key="children">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="96874957"/>
-						</object>
-						<reference key="parent" ref="524015605"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">24</int>
-						<reference key="object" ref="96874957"/>
-						<object class="NSMutableArray" key="children">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="677652931"/>
-							<reference ref="276216762"/>
-							<reference ref="1066447520"/>
-							<reference ref="1036389925"/>
-							<reference ref="280172320"/>
-							<reference ref="369641893"/>
-							<reference ref="984461797"/>
-							<reference ref="155085383"/>
-							<reference ref="444952046"/>
-						</object>
-						<reference key="parent" ref="931553638"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">5</int>
-						<reference key="object" ref="276216762"/>
-						<reference key="parent" ref="96874957"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">23</int>
-						<reference key="object" ref="677652931"/>
-						<reference key="parent" ref="96874957"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">92</int>
-						<reference key="object" ref="280172320"/>
-						<reference key="parent" ref="96874957"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">203</int>
-						<reference key="object" ref="984461797"/>
-						<reference key="parent" ref="96874957"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">204</int>
-						<reference key="object" ref="1066447520"/>
-						<reference key="parent" ref="96874957"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">536</int>
-						<reference key="object" ref="155085383"/>
-						<reference key="parent" ref="96874957"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">537</int>
-						<reference key="object" ref="1036389925"/>
-						<reference key="parent" ref="96874957"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">538</int>
-						<reference key="object" ref="369641893"/>
-						<reference key="parent" ref="96874957"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">56</int>
-						<reference key="object" ref="365880285"/>
-						<object class="NSMutableArray" key="children">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="576521955"/>
-						</object>
-						<reference key="parent" ref="524015605"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">57</int>
-						<reference key="object" ref="576521955"/>
-						<object class="NSMutableArray" key="children">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="139290918"/>
-							<reference ref="386173216"/>
-							<reference ref="32285361"/>
-							<reference ref="301008465"/>
-							<reference ref="274138642"/>
-							<reference ref="272876017"/>
-							<reference ref="431301145"/>
-							<reference ref="206802571"/>
-							<reference ref="848095279"/>
-							<reference ref="1023546148"/>
-							<reference ref="6876565"/>
-							<reference ref="479677589"/>
-							<reference ref="858487910"/>
-						</object>
-						<reference key="parent" ref="365880285"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">58</int>
-						<reference key="object" ref="139290918"/>
-						<reference key="parent" ref="576521955"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">129</int>
-						<reference key="object" ref="386173216"/>
-						<reference key="parent" ref="576521955"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">131</int>
-						<reference key="object" ref="32285361"/>
-						<object class="NSMutableArray" key="children">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="821388474"/>
-						</object>
-						<reference key="parent" ref="576521955"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">130</int>
-						<reference key="object" ref="821388474"/>
-						<reference key="parent" ref="32285361"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">134</int>
-						<reference key="object" ref="301008465"/>
-						<reference key="parent" ref="576521955"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">136</int>
-						<reference key="object" ref="274138642"/>
-						<reference key="parent" ref="576521955"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">143</int>
-						<reference key="object" ref="272876017"/>
-						<reference key="parent" ref="576521955"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">144</int>
-						<reference key="object" ref="431301145"/>
-						<reference key="parent" ref="576521955"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">145</int>
-						<reference key="object" ref="206802571"/>
-						<reference key="parent" ref="576521955"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">149</int>
-						<reference key="object" ref="848095279"/>
-						<reference key="parent" ref="576521955"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">150</int>
-						<reference key="object" ref="1023546148"/>
-						<reference key="parent" ref="576521955"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">544</int>
-						<reference key="object" ref="6876565"/>
-						<reference key="parent" ref="576521955"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">545</int>
-						<reference key="object" ref="479677589"/>
-						<reference key="parent" ref="576521955"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">163</int>
-						<reference key="object" ref="200491363"/>
-						<object class="NSMutableArray" key="children">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="526778998"/>
-						</object>
-						<reference key="parent" ref="524015605"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">169</int>
-						<reference key="object" ref="526778998"/>
-						<object class="NSMutableArray" key="children">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="839739619"/>
-							<reference ref="185296989"/>
-							<reference ref="1010221707"/>
-							<reference ref="581727829"/>
-							<reference ref="994817848"/>
-							<reference ref="924678073"/>
-							<reference ref="322866464"/>
-							<reference ref="535038564"/>
-						</object>
-						<reference key="parent" ref="200491363"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">156</int>
-						<reference key="object" ref="839739619"/>
-						<reference key="parent" ref="526778998"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">157</int>
-						<reference key="object" ref="185296989"/>
-						<reference key="parent" ref="526778998"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">158</int>
-						<reference key="object" ref="1010221707"/>
-						<reference key="parent" ref="526778998"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">160</int>
-						<reference key="object" ref="581727829"/>
-						<reference key="parent" ref="526778998"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">164</int>
-						<reference key="object" ref="994817848"/>
-						<reference key="parent" ref="526778998"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">171</int>
-						<reference key="object" ref="924678073"/>
-						<reference key="parent" ref="526778998"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">172</int>
-						<reference key="object" ref="322866464"/>
-						<reference key="parent" ref="526778998"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">173</int>
-						<reference key="object" ref="535038564"/>
-						<reference key="parent" ref="526778998"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">269</int>
-						<reference key="object" ref="868031522"/>
-						<object class="NSMutableArray" key="children">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="981161348"/>
-						</object>
-						<reference key="parent" ref="524015605"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">270</int>
-						<reference key="object" ref="981161348"/>
-						<object class="NSMutableArray" key="children">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="390088328"/>
-							<reference ref="1065386165"/>
-						</object>
-						<reference key="parent" ref="868031522"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">272</int>
-						<reference key="object" ref="390088328"/>
-						<reference key="parent" ref="981161348"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">305</int>
-						<reference key="object" ref="1065386165"/>
-						<reference key="parent" ref="981161348"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">419</int>
-						<reference key="object" ref="551174276"/>
-						<object class="NSMutableArray" key="children">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="511848303"/>
-						</object>
-						<reference key="parent" ref="524015605"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">420</int>
-						<reference key="object" ref="511848303"/>
-						<object class="NSMutableArray" key="children">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="504984881"/>
-						</object>
-						<reference key="parent" ref="551174276"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">421</int>
-						<reference key="object" ref="504984881"/>
-						<reference key="parent" ref="511848303"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">196</int>
-						<reference key="object" ref="485884620"/>
-						<reference key="parent" ref="330408435"/>
-						<string key="objectName">X11Controller</string>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">244</int>
-						<reference key="object" ref="124913468"/>
-						<object class="NSMutableArray" key="children">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="941366957"/>
-						</object>
-						<reference key="parent" ref="330408435"/>
-						<string key="objectName">PrefsPanel</string>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">245</int>
-						<reference key="object" ref="941366957"/>
-						<object class="NSMutableArray" key="children">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="448510093"/>
-						</object>
-						<reference key="parent" ref="124913468"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">348</int>
-						<reference key="object" ref="448510093"/>
-						<object class="NSMutableArray" key="children">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="287591690"/>
-							<reference ref="960678392"/>
-							<reference ref="348328898"/>
-							<reference ref="10973343"/>
-						</object>
-						<reference key="parent" ref="941366957"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">349</int>
-						<reference key="object" ref="287591690"/>
-						<object class="NSMutableArray" key="children">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="596750588"/>
-						</object>
-						<reference key="parent" ref="448510093"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">351</int>
-						<reference key="object" ref="596750588"/>
-						<object class="NSMutableArray" key="children">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="119157981"/>
-							<reference ref="443008216"/>
-							<reference ref="282885445"/>
-							<reference ref="842100515"/>
-							<reference ref="31160162"/>
-							<reference ref="179949713"/>
-						</object>
-						<reference key="parent" ref="287591690"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">363</int>
-						<reference key="object" ref="119157981"/>
-						<object class="NSMutableArray" key="children">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="990762273"/>
-						</object>
-						<reference key="parent" ref="596750588"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">364</int>
-						<reference key="object" ref="443008216"/>
-						<object class="NSMutableArray" key="children">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="391919450"/>
-						</object>
-						<reference key="parent" ref="596750588"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">365</int>
-						<reference key="object" ref="282885445"/>
-						<object class="NSMutableArray" key="children">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="649334366"/>
-						</object>
-						<reference key="parent" ref="596750588"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">368</int>
-						<reference key="object" ref="842100515"/>
-						<object class="NSMutableArray" key="children">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="940564599"/>
-						</object>
-						<reference key="parent" ref="596750588"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">369</int>
-						<reference key="object" ref="31160162"/>
-						<object class="NSMutableArray" key="children">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="666057093"/>
-						</object>
-						<reference key="parent" ref="596750588"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">370</int>
-						<reference key="object" ref="179949713"/>
-						<object class="NSMutableArray" key="children">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="967619578"/>
-						</object>
-						<reference key="parent" ref="596750588"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">352</int>
-						<reference key="object" ref="960678392"/>
-						<object class="NSMutableArray" key="children">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="515308735"/>
-						</object>
-						<reference key="parent" ref="448510093"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">350</int>
-						<reference key="object" ref="515308735"/>
-						<object class="NSMutableArray" key="children">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="418227126"/>
-							<reference ref="1039016593"/>
-							<reference ref="709074847"/>
-							<reference ref="201731424"/>
-							<reference ref="86150604"/>
-							<reference ref="477203622"/>
-							<reference ref="298603383"/>
-						</object>
-						<reference key="parent" ref="960678392"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">371</int>
-						<reference key="object" ref="418227126"/>
-						<object class="NSMutableArray" key="children">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="1016069354"/>
-						</object>
-						<reference key="parent" ref="515308735"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">372</int>
-						<reference key="object" ref="1039016593"/>
-						<object class="NSMutableArray" key="children">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="624655599"/>
-						</object>
-						<reference key="parent" ref="515308735"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">382</int>
-						<reference key="object" ref="709074847"/>
-						<object class="NSMutableArray" key="children">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="633115429"/>
-						</object>
-						<reference key="parent" ref="515308735"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">385</int>
-						<reference key="object" ref="201731424"/>
-						<object class="NSMutableArray" key="children">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="930265681"/>
-						</object>
-						<reference key="parent" ref="515308735"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">386</int>
-						<reference key="object" ref="86150604"/>
-						<object class="NSMutableArray" key="children">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="311969422"/>
-						</object>
-						<reference key="parent" ref="515308735"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">541</int>
-						<reference key="object" ref="477203622"/>
-						<object class="NSMutableArray" key="children">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="631531164"/>
-						</object>
-						<reference key="parent" ref="515308735"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">543</int>
-						<reference key="object" ref="298603383"/>
-						<object class="NSMutableArray" key="children">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="761107402"/>
-						</object>
-						<reference key="parent" ref="515308735"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">353</int>
-						<reference key="object" ref="348328898"/>
-						<object class="NSMutableArray" key="children">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="300811574"/>
-						</object>
-						<reference key="parent" ref="448510093"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">354</int>
-						<reference key="object" ref="300811574"/>
-						<object class="NSMutableArray" key="children">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="989050925"/>
-							<reference ref="700826966"/>
-							<reference ref="168436707"/>
-							<reference ref="363817195"/>
-							<reference ref="223835729"/>
-						</object>
-						<reference key="parent" ref="348328898"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">374</int>
-						<reference key="object" ref="989050925"/>
-						<object class="NSMutableArray" key="children">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="189594322"/>
-						</object>
-						<reference key="parent" ref="300811574"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">375</int>
-						<reference key="object" ref="700826966"/>
-						<object class="NSMutableArray" key="children">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="489340979"/>
-						</object>
-						<reference key="parent" ref="300811574"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">376</int>
-						<reference key="object" ref="168436707"/>
-						<object class="NSMutableArray" key="children">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="53243865"/>
-						</object>
-						<reference key="parent" ref="300811574"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">377</int>
-						<reference key="object" ref="363817195"/>
-						<object class="NSMutableArray" key="children">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="390084685"/>
-						</object>
-						<reference key="parent" ref="300811574"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">379</int>
-						<reference key="object" ref="223835729"/>
-						<object class="NSMutableArray" key="children">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="283628678"/>
-						</object>
-						<reference key="parent" ref="300811574"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">285</int>
-						<reference key="object" ref="604417141"/>
-						<object class="NSMutableArray" key="children">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="85544634"/>
-						</object>
-						<reference key="parent" ref="330408435"/>
-						<string key="objectName">EditPrograms</string>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">286</int>
-						<reference key="object" ref="85544634"/>
-						<object class="NSMutableArray" key="children">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="1063387772"/>
-							<reference ref="758204686"/>
-							<reference ref="671954382"/>
-							<reference ref="492358940"/>
-							<reference ref="125703429"/>
-							<reference ref="724002248"/>
-						</object>
-						<reference key="parent" ref="604417141"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">423</int>
-						<reference key="object" ref="294137138"/>
-						<object class="NSMutableArray" key="children">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="318286212"/>
-							<reference ref="511651072"/>
-						</object>
-						<reference key="parent" ref="330408435"/>
-						<string key="objectName">DockMenu</string>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">524</int>
-						<reference key="object" ref="318286212"/>
-						<reference key="parent" ref="294137138"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">526</int>
-						<reference key="object" ref="511651072"/>
-						<object class="NSMutableArray" key="children">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="48278059"/>
-						</object>
-						<reference key="parent" ref="294137138"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">527</int>
-						<reference key="object" ref="48278059"/>
-						<object class="NSMutableArray" key="children">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="1032342329"/>
-							<reference ref="563798000"/>
-						</object>
-						<reference key="parent" ref="511651072"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">532</int>
-						<reference key="object" ref="1032342329"/>
-						<reference key="parent" ref="48278059"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">533</int>
-						<reference key="object" ref="563798000"/>
-						<reference key="parent" ref="48278059"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">100363</int>
-						<reference key="object" ref="990762273"/>
-						<reference key="parent" ref="119157981"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">100364</int>
-						<reference key="object" ref="391919450"/>
-						<reference key="parent" ref="443008216"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">100365</int>
-						<reference key="object" ref="649334366"/>
-						<reference key="parent" ref="282885445"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">100368</int>
-						<reference key="object" ref="940564599"/>
-						<reference key="parent" ref="842100515"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">100369</int>
-						<reference key="object" ref="666057093"/>
-						<reference key="parent" ref="31160162"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">100370</int>
-						<reference key="object" ref="967619578"/>
-						<reference key="parent" ref="179949713"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">100371</int>
-						<reference key="object" ref="1016069354"/>
-						<reference key="parent" ref="418227126"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">100372</int>
-						<reference key="object" ref="624655599"/>
-						<reference key="parent" ref="1039016593"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">100382</int>
-						<reference key="object" ref="633115429"/>
-						<object class="NSMutableArray" key="children">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="341113515"/>
-						</object>
-						<reference key="parent" ref="709074847"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">100385</int>
-						<reference key="object" ref="930265681"/>
-						<reference key="parent" ref="201731424"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">100386</int>
-						<reference key="object" ref="311969422"/>
-						<reference key="parent" ref="86150604"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">100541</int>
-						<reference key="object" ref="631531164"/>
-						<reference key="parent" ref="477203622"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">100543</int>
-						<reference key="object" ref="761107402"/>
-						<reference key="parent" ref="298603383"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">100374</int>
-						<reference key="object" ref="189594322"/>
-						<reference key="parent" ref="989050925"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">100375</int>
-						<reference key="object" ref="489340979"/>
-						<reference key="parent" ref="700826966"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">100376</int>
-						<reference key="object" ref="53243865"/>
-						<reference key="parent" ref="168436707"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">100377</int>
-						<reference key="object" ref="390084685"/>
-						<reference key="parent" ref="363817195"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">100379</int>
-						<reference key="object" ref="283628678"/>
-						<reference key="parent" ref="223835729"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">380</int>
-						<reference key="object" ref="341113515"/>
-						<object class="NSMutableArray" key="children">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="759499526"/>
-							<reference ref="616492372"/>
-							<reference ref="543935434"/>
-							<reference ref="836673018"/>
-						</object>
-						<reference key="parent" ref="633115429"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">435</int>
-						<reference key="object" ref="759499526"/>
-						<reference key="parent" ref="341113515"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">384</int>
-						<reference key="object" ref="616492372"/>
-						<reference key="parent" ref="341113515"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">383</int>
-						<reference key="object" ref="543935434"/>
-						<reference key="parent" ref="341113515"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">381</int>
-						<reference key="object" ref="836673018"/>
-						<reference key="parent" ref="341113515"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">295</int>
-						<reference key="object" ref="1063387772"/>
-						<object class="NSMutableArray" key="children">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="792419186"/>
-							<reference ref="17278747"/>
-							<reference ref="842897584"/>
-							<reference ref="905092943"/>
-						</object>
-						<reference key="parent" ref="85544634"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">300295</int>
-						<reference key="object" ref="792419186"/>
-						<reference key="parent" ref="1063387772"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">200295</int>
-						<reference key="object" ref="17278747"/>
-						<reference key="parent" ref="1063387772"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">100295</int>
-						<reference key="object" ref="842897584"/>
-						<reference key="parent" ref="1063387772"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">296</int>
-						<reference key="object" ref="905092943"/>
-						<object class="NSMutableArray" key="children">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="242608782"/>
-							<reference ref="938444323"/>
-							<reference ref="84282687"/>
-						</object>
-						<reference key="parent" ref="1063387772"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">535</int>
-						<reference key="object" ref="242608782"/>
-						<object class="NSMutableArray" key="children">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="34714764"/>
-						</object>
-						<reference key="parent" ref="905092943"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">575</int>
-						<reference key="object" ref="34714764"/>
-						<reference key="parent" ref="242608782"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">298</int>
-						<reference key="object" ref="938444323"/>
-						<object class="NSMutableArray" key="children">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="825378892"/>
-						</object>
-						<reference key="parent" ref="905092943"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">573</int>
-						<reference key="object" ref="825378892"/>
-						<reference key="parent" ref="938444323"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">297</int>
-						<reference key="object" ref="84282687"/>
-						<object class="NSMutableArray" key="children">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="432610585"/>
-						</object>
-						<reference key="parent" ref="905092943"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">574</int>
-						<reference key="object" ref="432610585"/>
-						<reference key="parent" ref="84282687"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">310</int>
-						<reference key="object" ref="758204686"/>
-						<object class="NSMutableArray" key="children">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="1025474039"/>
-						</object>
-						<reference key="parent" ref="85544634"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">100310</int>
-						<reference key="object" ref="1025474039"/>
-						<reference key="parent" ref="758204686"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">292</int>
-						<reference key="object" ref="671954382"/>
-						<object class="NSMutableArray" key="children">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="143554520"/>
-						</object>
-						<reference key="parent" ref="85544634"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">100292</int>
-						<reference key="object" ref="143554520"/>
-						<reference key="parent" ref="671954382"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">293</int>
-						<reference key="object" ref="492358940"/>
-						<object class="NSMutableArray" key="children">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="8201128"/>
-						</object>
-						<reference key="parent" ref="85544634"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">100293</int>
-						<reference key="object" ref="8201128"/>
-						<reference key="parent" ref="492358940"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">299</int>
-						<reference key="object" ref="125703429"/>
-						<object class="NSMutableArray" key="children">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="892296813"/>
-						</object>
-						<reference key="parent" ref="85544634"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">100299</int>
-						<reference key="object" ref="892296813"/>
-						<reference key="parent" ref="125703429"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">291</int>
-						<reference key="object" ref="724002248"/>
-						<object class="NSMutableArray" key="children">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="809610613"/>
-						</object>
-						<reference key="parent" ref="85544634"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">100291</int>
-						<reference key="object" ref="809610613"/>
-						<reference key="parent" ref="724002248"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">300330</int>
-						<reference key="object" ref="444952046"/>
-						<reference key="parent" ref="96874957"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">300337</int>
-						<reference key="object" ref="10973343"/>
-						<object class="NSMutableArray" key="children">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="184765684"/>
-						</object>
-						<reference key="parent" ref="448510093"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">300338</int>
-						<reference key="object" ref="184765684"/>
-						<object class="NSMutableArray" key="children">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="657659108"/>
-							<reference ref="290578835"/>
-							<reference ref="992839333"/>
-							<reference ref="138261120"/>
-							<reference ref="128352289"/>
-							<reference ref="57161931"/>
-						</object>
-						<reference key="parent" ref="10973343"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">300358</int>
-						<reference key="object" ref="290578835"/>
-						<object class="NSMutableArray" key="children">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="399127858"/>
-						</object>
-						<reference key="parent" ref="184765684"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">300359</int>
-						<reference key="object" ref="657659108"/>
-						<object class="NSMutableArray" key="children">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="259618205"/>
-						</object>
-						<reference key="parent" ref="184765684"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">300360</int>
-						<reference key="object" ref="259618205"/>
-						<reference key="parent" ref="657659108"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">300361</int>
-						<reference key="object" ref="399127858"/>
-						<reference key="parent" ref="290578835"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">300362</int>
-						<reference key="object" ref="992839333"/>
-						<object class="NSMutableArray" key="children">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="959555182"/>
-						</object>
-						<reference key="parent" ref="184765684"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">300363</int>
-						<reference key="object" ref="959555182"/>
-						<reference key="parent" ref="992839333"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">300364</int>
-						<reference key="object" ref="138261120"/>
-						<object class="NSMutableArray" key="children">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="183409141"/>
-						</object>
-						<reference key="parent" ref="184765684"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">300365</int>
-						<reference key="object" ref="183409141"/>
-						<reference key="parent" ref="138261120"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">300368</int>
-						<reference key="object" ref="128352289"/>
-						<object class="NSMutableArray" key="children">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="556463187"/>
-						</object>
-						<reference key="parent" ref="184765684"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">300369</int>
-						<reference key="object" ref="556463187"/>
-						<reference key="parent" ref="128352289"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">300370</int>
-						<reference key="object" ref="57161931"/>
-						<object class="NSMutableArray" key="children">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="989804990"/>
-						</object>
-						<reference key="parent" ref="184765684"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">300371</int>
-						<reference key="object" ref="989804990"/>
-						<reference key="parent" ref="57161931"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">300395</int>
-						<reference key="object" ref="556755705"/>
-						<reference key="parent" ref="330408435"/>
-						<string key="objectName">Updater</string>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">300396</int>
-						<reference key="object" ref="858487910"/>
-						<reference key="parent" ref="576521955"/>
-					</object>
-				</object>
-			</object>
-			<object class="NSMutableDictionary" key="flattenedProperties">
-				<bool key="EncodedWithXMLCoder">YES</bool>
-				<object class="NSMutableArray" key="dict.sortedKeys">
-					<bool key="EncodedWithXMLCoder">YES</bool>
-					<string>-1.IBPluginDependency</string>
-					<string>-2.IBPluginDependency</string>
-					<string>-3.IBPluginDependency</string>
-					<string>-3.ImportedFromIB2</string>
-					<string>100295.IBShouldRemoveOnLegacySave</string>
-					<string>129.IBPluginDependency</string>
-					<string>129.ImportedFromIB2</string>
-					<string>130.IBPluginDependency</string>
-					<string>130.ImportedFromIB2</string>
-					<string>131.IBPluginDependency</string>
-					<string>131.ImportedFromIB2</string>
-					<string>134.IBPluginDependency</string>
-					<string>134.ImportedFromIB2</string>
-					<string>136.IBPluginDependency</string>
-					<string>136.ImportedFromIB2</string>
-					<string>143.IBPluginDependency</string>
-					<string>143.ImportedFromIB2</string>
-					<string>144.IBPluginDependency</string>
-					<string>144.ImportedFromIB2</string>
-					<string>145.IBPluginDependency</string>
-					<string>145.ImportedFromIB2</string>
-					<string>149.IBPluginDependency</string>
-					<string>149.ImportedFromIB2</string>
-					<string>150.IBPluginDependency</string>
-					<string>150.ImportedFromIB2</string>
-					<string>156.IBPluginDependency</string>
-					<string>156.ImportedFromIB2</string>
-					<string>157.IBPluginDependency</string>
-					<string>157.ImportedFromIB2</string>
-					<string>158.IBPluginDependency</string>
-					<string>158.ImportedFromIB2</string>
-					<string>160.IBPluginDependency</string>
-					<string>160.ImportedFromIB2</string>
-					<string>163.IBPluginDependency</string>
-					<string>163.ImportedFromIB2</string>
-					<string>164.IBPluginDependency</string>
-					<string>164.ImportedFromIB2</string>
-					<string>169.IBPluginDependency</string>
-					<string>169.ImportedFromIB2</string>
-					<string>169.editorWindowContentRectSynchronizationRect</string>
-					<string>171.IBPluginDependency</string>
-					<string>171.ImportedFromIB2</string>
-					<string>172.IBPluginDependency</string>
-					<string>172.ImportedFromIB2</string>
-					<string>173.IBPluginDependency</string>
-					<string>173.ImportedFromIB2</string>
-					<string>19.IBPluginDependency</string>
-					<string>19.ImportedFromIB2</string>
-					<string>196.IBPluginDependency</string>
-					<string>196.ImportedFromIB2</string>
-					<string>200295.IBShouldRemoveOnLegacySave</string>
-					<string>203.IBPluginDependency</string>
-					<string>203.ImportedFromIB2</string>
-					<string>204.IBPluginDependency</string>
-					<string>204.ImportedFromIB2</string>
-					<string>23.IBPluginDependency</string>
-					<string>23.ImportedFromIB2</string>
-					<string>24.IBPluginDependency</string>
-					<string>24.ImportedFromIB2</string>
-					<string>24.editorWindowContentRectSynchronizationRect</string>
-					<string>244.IBEditorWindowLastContentRect</string>
-					<string>244.IBPluginDependency</string>
-					<string>244.IBWindowTemplateEditedContentRect</string>
-					<string>244.ImportedFromIB2</string>
-					<string>244.editorWindowContentRectSynchronizationRect</string>
-					<string>244.windowTemplate.hasMaxSize</string>
-					<string>244.windowTemplate.hasMinSize</string>
-					<string>244.windowTemplate.maxSize</string>
-					<string>244.windowTemplate.minSize</string>
-					<string>245.IBPluginDependency</string>
-					<string>245.ImportedFromIB2</string>
-					<string>269.IBPluginDependency</string>
-					<string>269.ImportedFromIB2</string>
-					<string>270.IBPluginDependency</string>
-					<string>270.ImportedFromIB2</string>
-					<string>270.editorWindowContentRectSynchronizationRect</string>
-					<string>272.IBPluginDependency</string>
-					<string>272.ImportedFromIB2</string>
-					<string>285.IBEditorWindowLastContentRect</string>
-					<string>285.IBPluginDependency</string>
-					<string>285.IBViewEditorWindowController.showingBoundsRectangles</string>
-					<string>285.IBViewEditorWindowController.showingLayoutRectangles</string>
-					<string>285.IBWindowTemplateEditedContentRect</string>
-					<string>285.ImportedFromIB2</string>
-					<string>285.editorWindowContentRectSynchronizationRect</string>
-					<string>285.windowTemplate.hasMaxSize</string>
-					<string>285.windowTemplate.hasMinSize</string>
-					<string>285.windowTemplate.maxSize</string>
-					<string>285.windowTemplate.minSize</string>
-					<string>286.IBPluginDependency</string>
-					<string>286.ImportedFromIB2</string>
-					<string>29.IBEditorWindowLastContentRect</string>
-					<string>29.IBPluginDependency</string>
-					<string>29.ImportedFromIB2</string>
-					<string>29.editorWindowContentRectSynchronizationRect</string>
-					<string>291.IBPluginDependency</string>
-					<string>291.ImportedFromIB2</string>
-					<string>292.IBPluginDependency</string>
-					<string>292.ImportedFromIB2</string>
-					<string>293.IBPluginDependency</string>
-					<string>293.ImportedFromIB2</string>
-					<string>295.IBPluginDependency</string>
-					<string>295.ImportedFromIB2</string>
-					<string>296.IBPluginDependency</string>
-					<string>296.ImportedFromIB2</string>
-					<string>297.IBPluginDependency</string>
-					<string>297.ImportedFromIB2</string>
-					<string>298.IBPluginDependency</string>
-					<string>298.ImportedFromIB2</string>
-					<string>299.IBPluginDependency</string>
-					<string>299.ImportedFromIB2</string>
-					<string>300295.IBShouldRemoveOnLegacySave</string>
-					<string>300330.IBPluginDependency</string>
-					<string>300330.ImportedFromIB2</string>
-					<string>300337.IBPluginDependency</string>
-					<string>300337.ImportedFromIB2</string>
-					<string>300338.IBPluginDependency</string>
-					<string>300338.ImportedFromIB2</string>
-					<string>300358.IBPluginDependency</string>
-					<string>300358.ImportedFromIB2</string>
-					<string>300359.IBPluginDependency</string>
-					<string>300359.ImportedFromIB2</string>
-					<string>300362.IBPluginDependency</string>
-					<string>300362.ImportedFromIB2</string>
-					<string>300364.IBPluginDependency</string>
-					<string>300364.ImportedFromIB2</string>
-					<string>300368.IBPluginDependency</string>
-					<string>300368.ImportedFromIB2</string>
-					<string>300370.IBPluginDependency</string>
-					<string>300370.ImportedFromIB2</string>
-					<string>300395.IBPluginDependency</string>
-					<string>300396.IBPluginDependency</string>
-					<string>305.IBPluginDependency</string>
-					<string>305.ImportedFromIB2</string>
-					<string>310.IBPluginDependency</string>
-					<string>310.ImportedFromIB2</string>
-					<string>348.IBPluginDependency</string>
-					<string>348.ImportedFromIB2</string>
-					<string>349.IBPluginDependency</string>
-					<string>349.ImportedFromIB2</string>
-					<string>350.IBPluginDependency</string>
-					<string>350.ImportedFromIB2</string>
-					<string>351.IBPluginDependency</string>
-					<string>351.ImportedFromIB2</string>
-					<string>352.IBPluginDependency</string>
-					<string>352.ImportedFromIB2</string>
-					<string>353.IBPluginDependency</string>
-					<string>353.ImportedFromIB2</string>
-					<string>354.IBPluginDependency</string>
-					<string>354.ImportedFromIB2</string>
-					<string>363.IBPluginDependency</string>
-					<string>363.ImportedFromIB2</string>
-					<string>364.IBPluginDependency</string>
-					<string>364.ImportedFromIB2</string>
-					<string>365.IBPluginDependency</string>
-					<string>365.ImportedFromIB2</string>
-					<string>368.IBPluginDependency</string>
-					<string>368.ImportedFromIB2</string>
-					<string>369.IBPluginDependency</string>
-					<string>369.ImportedFromIB2</string>
-					<string>370.IBPluginDependency</string>
-					<string>370.ImportedFromIB2</string>
-					<string>371.IBPluginDependency</string>
-					<string>371.ImportedFromIB2</string>
-					<string>372.IBPluginDependency</string>
-					<string>372.ImportedFromIB2</string>
-					<string>374.IBPluginDependency</string>
-					<string>374.ImportedFromIB2</string>
-					<string>375.IBPluginDependency</string>
-					<string>375.ImportedFromIB2</string>
-					<string>376.IBPluginDependency</string>
-					<string>376.ImportedFromIB2</string>
-					<string>377.IBPluginDependency</string>
-					<string>377.ImportedFromIB2</string>
-					<string>379.IBPluginDependency</string>
-					<string>379.ImportedFromIB2</string>
-					<string>380.IBPluginDependency</string>
-					<string>380.ImportedFromIB2</string>
-					<string>381.IBPluginDependency</string>
-					<string>381.ImportedFromIB2</string>
-					<string>382.IBPluginDependency</string>
-					<string>382.ImportedFromIB2</string>
-					<string>383.IBPluginDependency</string>
-					<string>383.ImportedFromIB2</string>
-					<string>384.IBPluginDependency</string>
-					<string>384.ImportedFromIB2</string>
-					<string>385.IBPluginDependency</string>
-					<string>385.ImportedFromIB2</string>
-					<string>386.IBPluginDependency</string>
-					<string>386.ImportedFromIB2</string>
-					<string>419.IBPluginDependency</string>
-					<string>419.ImportedFromIB2</string>
-					<string>420.IBPluginDependency</string>
-					<string>420.ImportedFromIB2</string>
-					<string>421.IBPluginDependency</string>
-					<string>421.ImportedFromIB2</string>
-					<string>423.IBPluginDependency</string>
-					<string>423.ImportedFromIB2</string>
-					<string>435.IBPluginDependency</string>
-					<string>435.ImportedFromIB2</string>
-					<string>5.IBPluginDependency</string>
-					<string>5.ImportedFromIB2</string>
-					<string>524.IBPluginDependency</string>
-					<string>524.ImportedFromIB2</string>
-					<string>526.IBPluginDependency</string>
-					<string>526.ImportedFromIB2</string>
-					<string>527.IBPluginDependency</string>
-					<string>527.ImportedFromIB2</string>
-					<string>532.IBPluginDependency</string>
-					<string>532.ImportedFromIB2</string>
-					<string>533.IBPluginDependency</string>
-					<string>533.ImportedFromIB2</string>
-					<string>535.IBPluginDependency</string>
-					<string>535.ImportedFromIB2</string>
-					<string>536.IBPluginDependency</string>
-					<string>536.ImportedFromIB2</string>
-					<string>537.IBPluginDependency</string>
-					<string>537.ImportedFromIB2</string>
-					<string>538.IBPluginDependency</string>
-					<string>538.ImportedFromIB2</string>
-					<string>541.IBPluginDependency</string>
-					<string>541.ImportedFromIB2</string>
-					<string>543.IBPluginDependency</string>
-					<string>543.ImportedFromIB2</string>
-					<string>544.IBPluginDependency</string>
-					<string>544.ImportedFromIB2</string>
-					<string>545.IBPluginDependency</string>
-					<string>545.ImportedFromIB2</string>
-					<string>56.IBPluginDependency</string>
-					<string>56.ImportedFromIB2</string>
-					<string>57.IBEditorWindowLastContentRect</string>
-					<string>57.IBPluginDependency</string>
-					<string>57.ImportedFromIB2</string>
-					<string>57.editorWindowContentRectSynchronizationRect</string>
-					<string>573.IBPluginDependency</string>
-					<string>573.ImportedFromIB2</string>
-					<string>574.IBPluginDependency</string>
-					<string>574.ImportedFromIB2</string>
-					<string>575.IBPluginDependency</string>
-					<string>575.ImportedFromIB2</string>
-					<string>58.IBPluginDependency</string>
-					<string>58.ImportedFromIB2</string>
-					<string>92.IBPluginDependency</string>
-					<string>92.ImportedFromIB2</string>
-				</object>
-				<object class="NSMutableArray" key="dict.values">
-					<bool key="EncodedWithXMLCoder">YES</bool>
-					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-					<integer value="1" id="9"/>
-					<reference ref="9"/>
-					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-					<reference ref="9"/>
-					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-					<reference ref="9"/>
-					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-					<reference ref="9"/>
-					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-					<reference ref="9"/>
-					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-					<reference ref="9"/>
-					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-					<reference ref="9"/>
-					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-					<reference ref="9"/>
-					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-					<reference ref="9"/>
-					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-					<reference ref="9"/>
-					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-					<reference ref="9"/>
-					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-					<reference ref="9"/>
-					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-					<reference ref="9"/>
-					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-					<reference ref="9"/>
-					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-					<reference ref="9"/>
-					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-					<reference ref="9"/>
-					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-					<reference ref="9"/>
-					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-					<reference ref="9"/>
-					<string>{{202, 626}, {154, 153}}</string>
-					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-					<reference ref="9"/>
-					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-					<reference ref="9"/>
-					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-					<reference ref="9"/>
-					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-					<reference ref="9"/>
-					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-					<reference ref="9"/>
-					<reference ref="9"/>
-					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-					<reference ref="9"/>
-					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-					<reference ref="9"/>
-					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-					<reference ref="9"/>
-					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-					<reference ref="9"/>
-					<string>{{271, 666}, {301, 153}}</string>
-					<string>{{313, 353}, {484, 280}}</string>
-					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-					<string>{{313, 353}, {484, 280}}</string>
-					<reference ref="9"/>
-					<string>{{184, 290}, {481, 345}}</string>
-					<reference ref="9"/>
-					<reference ref="9"/>
-					<string>{3.40282e+38, 3.40282e+38}</string>
-					<string>{213, 107}</string>
-					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-					<reference ref="9"/>
-					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-					<reference ref="9"/>
-					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-					<reference ref="9"/>
-					<string>{{100, 746}, {155, 33}}</string>
-					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-					<reference ref="9"/>
-					<string>{{407, 545}, {454, 311}}</string>
-					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-					<reference ref="9"/>
-					<reference ref="9"/>
-					<string>{{407, 545}, {454, 311}}</string>
-					<reference ref="9"/>
-					<string>{{433, 406}, {486, 327}}</string>
-					<integer value="0"/>
-					<reference ref="9"/>
-					<string>{3.40282e+38, 3.40282e+38}</string>
-					<string>{320, 240}</string>
-					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-					<reference ref="9"/>
-					<string>{{0, 836}, {336, 20}}</string>
-					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-					<reference ref="9"/>
-					<string>{{67, 819}, {336, 20}}</string>
-					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-					<reference ref="9"/>
-					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-					<reference ref="9"/>
-					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-					<reference ref="9"/>
-					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-					<reference ref="9"/>
-					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-					<reference ref="9"/>
-					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-					<reference ref="9"/>
-					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-					<reference ref="9"/>
-					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-					<reference ref="9"/>
-					<reference ref="9"/>
-					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-					<reference ref="9"/>
-					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-					<reference ref="9"/>
-					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-					<reference ref="9"/>
-					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-					<reference ref="9"/>
-					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-					<reference ref="9"/>
-					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-					<reference ref="9"/>
-					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-					<reference ref="9"/>
-					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-					<reference ref="9"/>
-					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-					<reference ref="9"/>
-					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-					<reference ref="9"/>
-					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-					<reference ref="9"/>
-					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-					<reference ref="9"/>
-					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-					<reference ref="9"/>
-					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-					<reference ref="9"/>
-					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-					<reference ref="9"/>
-					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-					<reference ref="9"/>
-					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-					<reference ref="9"/>
-					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-					<reference ref="9"/>
-					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-					<reference ref="9"/>
-					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-					<reference ref="9"/>
-					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-					<reference ref="9"/>
-					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-					<reference ref="9"/>
-					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-					<reference ref="9"/>
-					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-					<reference ref="9"/>
-					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-					<reference ref="9"/>
-					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-					<reference ref="9"/>
-					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-					<reference ref="9"/>
-					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-					<reference ref="9"/>
-					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-					<reference ref="9"/>
-					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-					<reference ref="9"/>
-					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-					<reference ref="9"/>
-					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-					<reference ref="9"/>
-					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-					<reference ref="9"/>
-					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-					<reference ref="9"/>
-					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-					<reference ref="9"/>
-					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-					<reference ref="9"/>
-					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-					<reference ref="9"/>
-					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-					<reference ref="9"/>
-					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-					<reference ref="9"/>
-					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-					<reference ref="9"/>
-					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-					<reference ref="9"/>
-					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-					<reference ref="9"/>
-					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-					<reference ref="9"/>
-					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-					<reference ref="9"/>
-					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-					<reference ref="9"/>
-					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-					<reference ref="9"/>
-					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-					<reference ref="9"/>
-					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-					<reference ref="9"/>
-					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-					<reference ref="9"/>
-					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-					<reference ref="9"/>
-					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-					<reference ref="9"/>
-					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-					<reference ref="9"/>
-					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-					<reference ref="9"/>
-					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-					<reference ref="9"/>
-					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-					<reference ref="9"/>
-					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-					<reference ref="9"/>
-					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-					<reference ref="9"/>
-					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-					<reference ref="9"/>
-					<string>{{12, 633}, {218, 203}}</string>
-					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-					<reference ref="9"/>
-					<string>{{79, 616}, {218, 203}}</string>
-					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-					<reference ref="9"/>
-					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-					<reference ref="9"/>
-					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-					<reference ref="9"/>
-					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-					<reference ref="9"/>
-					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-					<reference ref="9"/>
-				</object>
-			</object>
-			<object class="NSMutableDictionary" key="unlocalizedProperties">
-				<bool key="EncodedWithXMLCoder">YES</bool>
-				<object class="NSArray" key="dict.sortedKeys">
-					<bool key="EncodedWithXMLCoder">YES</bool>
-				</object>
-				<object class="NSMutableArray" key="dict.values">
-					<bool key="EncodedWithXMLCoder">YES</bool>
-				</object>
-			</object>
-			<nil key="activeLocalization"/>
-			<object class="NSMutableDictionary" key="localizations">
-				<bool key="EncodedWithXMLCoder">YES</bool>
-				<object class="NSArray" key="dict.sortedKeys">
-					<bool key="EncodedWithXMLCoder">YES</bool>
-				</object>
-				<object class="NSMutableArray" key="dict.values">
-					<bool key="EncodedWithXMLCoder">YES</bool>
-				</object>
-			</object>
-			<nil key="sourceID"/>
-			<int key="maxID">300397</int>
-		</object>
-		<object class="IBClassDescriber" key="IBDocument.Classes">
-			<object class="NSMutableArray" key="referencedPartialClassDescriptions">
-				<bool key="EncodedWithXMLCoder">YES</bool>
-				<object class="IBPartialClassDescription">
-					<string key="className">FirstResponder</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBUserSource</string>
-						<string key="minorKey"/>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">NSFormatter</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBUserSource</string>
-						<string key="minorKey"/>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">X11Controller</string>
-					<string key="superclassName">NSObject</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBUserSource</string>
-						<string key="minorKey"/>
-					</object>
-				</object>
-			</object>
-			<object class="NSMutableArray" key="referencedPartialClassDescriptionsV3.1+">
-				<bool key="EncodedWithXMLCoder">YES</bool>
-				<object class="IBPartialClassDescription">
-					<string key="className">SUUpdater</string>
-					<string key="superclassName">NSObject</string>
-					<object class="NSMutableDictionary" key="actions">
-						<string key="NS.key.0">checkForUpdates:</string>
-						<string key="NS.object.0">id</string>
-					</object>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBDocumentRelativeSource</string>
-						<string key="minorKey">../Sparkle.framework/Versions/A/Headers/SUUpdater.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">X11Controller</string>
-					<string key="superclassName">NSObject</string>
-					<object class="NSMutableDictionary" key="actions">
-						<bool key="EncodedWithXMLCoder">YES</bool>
-						<object class="NSMutableArray" key="dict.sortedKeys">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<string>apps_table_cancel:</string>
-							<string>apps_table_delete:</string>
-							<string>apps_table_done:</string>
-							<string>apps_table_duplicate:</string>
-							<string>apps_table_new:</string>
-							<string>apps_table_show:</string>
-							<string>bring_to_front:</string>
-							<string>close_window:</string>
-							<string>enable_fullscreen_changed:</string>
-							<string>minimize_window:</string>
-							<string>next_window:</string>
-							<string>prefs_changed:</string>
-							<string>prefs_show:</string>
-							<string>previous_window:</string>
-							<string>quit:</string>
-							<string>toggle_fullscreen:</string>
-							<string>x11_help:</string>
-							<string>zoom_window:</string>
-						</object>
-						<object class="NSMutableArray" key="dict.values">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<string>id</string>
-							<string>id</string>
-							<string>id</string>
-							<string>id</string>
-							<string>id</string>
-							<string>id</string>
-							<string>id</string>
-							<string>id</string>
-							<string>id</string>
-							<string>id</string>
-							<string>id</string>
-							<string>id</string>
-							<string>id</string>
-							<string>id</string>
-							<string>id</string>
-							<string>id</string>
-							<string>id</string>
-							<string>id</string>
-						</object>
-					</object>
-					<object class="NSMutableDictionary" key="outlets">
-						<bool key="EncodedWithXMLCoder">YES</bool>
-						<object class="NSMutableArray" key="dict.sortedKeys">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<string>apps_separator</string>
-							<string>apps_table</string>
-							<string>click_through</string>
-							<string>depth</string>
-							<string>dock_apps_menu</string>
-							<string>dock_menu</string>
-							<string>dock_window_separator</string>
-							<string>enable_auth</string>
-							<string>enable_fullscreen</string>
-							<string>enable_keyequivs</string>
-							<string>enable_tcp</string>
-							<string>fake_buttons</string>
-							<string>focus_follows_mouse</string>
-							<string>focus_on_new_window</string>
-							<string>prefs_panel</string>
-							<string>sync_keymap</string>
-							<string>toggle_fullscreen_item</string>
-							<string>use_sysbeep</string>
-							<string>window_separator</string>
-							<string>x11_about_item</string>
-						</object>
-						<object class="NSMutableArray" key="dict.values">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<string>NSMenuItem</string>
-							<string>NSTableView</string>
-							<string>NSButton</string>
-							<string>NSPopUpButton</string>
-							<string>NSMenu</string>
-							<string>NSMenu</string>
-							<string>NSMenuItem</string>
-							<string>NSButton</string>
-							<string>NSButton</string>
-							<string>NSButton</string>
-							<string>NSButton</string>
-							<string>NSButton</string>
-							<string>NSButton</string>
-							<string>NSButton</string>
-							<string>NSPanel</string>
-							<string>NSButton</string>
-							<string>NSMenuItem</string>
-							<string>NSButton</string>
-							<string>NSMenuItem</string>
-							<string>NSMenuItem</string>
-						</object>
-					</object>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBDocumentRelativeSource</string>
-						<string key="minorKey">../../X11Controller.h</string>
-					</object>
-				</object>
-			</object>
-		</object>
-		<int key="IBDocument.localizationMode">0</int>
-		<string key="IBDocument.LastKnownRelativeProjectPath">../X11.xcodeproj</string>
-		<int key="IBDocument.defaultPropertyAccessControl">3</int>
-	</data>
-</archive>
diff --git a/hw/xquartz/bundle/English.lproj/main.nib/keyedobjects.nib b/hw/xquartz/bundle/English.lproj/main.nib/keyedobjects.nib
deleted file mode 100644
index 066fdbe..0000000
Binary files a/hw/xquartz/bundle/English.lproj/main.nib/keyedobjects.nib and /dev/null differ
diff --git a/hw/xquartz/bundle/French.lproj/InfoPlist.strings b/hw/xquartz/bundle/French.lproj/InfoPlist.strings
deleted file mode 100644
index 88e1f04..0000000
Binary files a/hw/xquartz/bundle/French.lproj/InfoPlist.strings and /dev/null differ
diff --git a/hw/xquartz/bundle/French.lproj/Localizable.strings b/hw/xquartz/bundle/French.lproj/Localizable.strings
deleted file mode 100644
index 2770dfb..0000000
Binary files a/hw/xquartz/bundle/French.lproj/Localizable.strings and /dev/null differ
diff --git a/hw/xquartz/bundle/French.lproj/main.nib/keyedobjects.nib b/hw/xquartz/bundle/French.lproj/main.nib/keyedobjects.nib
deleted file mode 100644
index 9f9a7da..0000000
Binary files a/hw/xquartz/bundle/French.lproj/main.nib/keyedobjects.nib and /dev/null differ
diff --git a/hw/xquartz/bundle/German.lproj/InfoPlist.strings b/hw/xquartz/bundle/German.lproj/InfoPlist.strings
deleted file mode 100644
index aa37e75..0000000
Binary files a/hw/xquartz/bundle/German.lproj/InfoPlist.strings and /dev/null differ
diff --git a/hw/xquartz/bundle/German.lproj/Localizable.strings b/hw/xquartz/bundle/German.lproj/Localizable.strings
deleted file mode 100644
index a5489ab..0000000
Binary files a/hw/xquartz/bundle/German.lproj/Localizable.strings and /dev/null differ
diff --git a/hw/xquartz/bundle/German.lproj/main.nib/keyedobjects.nib b/hw/xquartz/bundle/German.lproj/main.nib/keyedobjects.nib
deleted file mode 100644
index 19532a9..0000000
Binary files a/hw/xquartz/bundle/German.lproj/main.nib/keyedobjects.nib and /dev/null differ
diff --git a/hw/xquartz/bundle/Italian.lproj/InfoPlist.strings b/hw/xquartz/bundle/Italian.lproj/InfoPlist.strings
deleted file mode 100644
index 4121698..0000000
Binary files a/hw/xquartz/bundle/Italian.lproj/InfoPlist.strings and /dev/null differ
diff --git a/hw/xquartz/bundle/Italian.lproj/Localizable.strings b/hw/xquartz/bundle/Italian.lproj/Localizable.strings
deleted file mode 100644
index d05d73d..0000000
Binary files a/hw/xquartz/bundle/Italian.lproj/Localizable.strings and /dev/null differ
diff --git a/hw/xquartz/bundle/Italian.lproj/main.nib/keyedobjects.nib b/hw/xquartz/bundle/Italian.lproj/main.nib/keyedobjects.nib
deleted file mode 100644
index b6e2e1b..0000000
Binary files a/hw/xquartz/bundle/Italian.lproj/main.nib/keyedobjects.nib and /dev/null differ
diff --git a/hw/xquartz/bundle/Japanese.lproj/InfoPlist.strings b/hw/xquartz/bundle/Japanese.lproj/InfoPlist.strings
deleted file mode 100644
index 2d6330f..0000000
Binary files a/hw/xquartz/bundle/Japanese.lproj/InfoPlist.strings and /dev/null differ
diff --git a/hw/xquartz/bundle/Japanese.lproj/Localizable.strings b/hw/xquartz/bundle/Japanese.lproj/Localizable.strings
deleted file mode 100644
index 99821ea..0000000
Binary files a/hw/xquartz/bundle/Japanese.lproj/Localizable.strings and /dev/null differ
diff --git a/hw/xquartz/bundle/Japanese.lproj/main.nib/keyedobjects.nib b/hw/xquartz/bundle/Japanese.lproj/main.nib/keyedobjects.nib
deleted file mode 100644
index 523fd08..0000000
Binary files a/hw/xquartz/bundle/Japanese.lproj/main.nib/keyedobjects.nib and /dev/null differ
diff --git a/hw/xquartz/bundle/Makefile.am b/hw/xquartz/bundle/Makefile.am
index 801fdc7..b777696 100644
--- a/hw/xquartz/bundle/Makefile.am
+++ b/hw/xquartz/bundle/Makefile.am
@@ -1,20 +1,11 @@
-bin_SCRIPTS = x11app
-
-.PHONY: x11app
-
-x11app:
-	xcodebuild CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" ARCHS="$(X11APP_ARCHS)"
-
 install-data-hook:
-	xcodebuild install DSTROOT="/$(DESTDIR)" INSTALL_PATH="$(APPLE_APPLICATIONS_DIR)" DEPLOYMENT_LOCATION=YES SKIP_INSTALL=NO ARCHS="$(X11APP_ARCHS)"
-
-clean-local:
-	rm -rf build
+	./mk_bundke.sh $(DESTDIR)$(APPLE_APPLICATIONS_DIR)/X11.app
 
 resourcedir=$(libdir)/X11/xserver
 resource_DATA = Xquartz.plist
 
 EXTRA_DIST = \
+	mk_bundke.sh \
 	$(resource_DATA) \
 	Info.plist \
 	X11.icns \
diff --git a/hw/xquartz/bundle/Resources/Dutch.lproj/InfoPlist.strings b/hw/xquartz/bundle/Resources/Dutch.lproj/InfoPlist.strings
new file mode 100644
index 0000000..8f978d6
Binary files /dev/null and b/hw/xquartz/bundle/Resources/Dutch.lproj/InfoPlist.strings differ
diff --git a/hw/xquartz/bundle/Resources/Dutch.lproj/Localizable.strings b/hw/xquartz/bundle/Resources/Dutch.lproj/Localizable.strings
new file mode 100644
index 0000000..1ff39fe
Binary files /dev/null and b/hw/xquartz/bundle/Resources/Dutch.lproj/Localizable.strings differ
diff --git a/hw/xquartz/bundle/Resources/Dutch.lproj/main.nib/keyedobjects.nib b/hw/xquartz/bundle/Resources/Dutch.lproj/main.nib/keyedobjects.nib
new file mode 100644
index 0000000..95c26d7
Binary files /dev/null and b/hw/xquartz/bundle/Resources/Dutch.lproj/main.nib/keyedobjects.nib differ
diff --git a/hw/xquartz/bundle/Resources/English.lproj/InfoPlist.strings b/hw/xquartz/bundle/Resources/English.lproj/InfoPlist.strings
new file mode 100644
index 0000000..88e1f04
Binary files /dev/null and b/hw/xquartz/bundle/Resources/English.lproj/InfoPlist.strings differ
diff --git a/hw/xquartz/bundle/Resources/English.lproj/Localizable.strings b/hw/xquartz/bundle/Resources/English.lproj/Localizable.strings
new file mode 100644
index 0000000..63a1352
Binary files /dev/null and b/hw/xquartz/bundle/Resources/English.lproj/Localizable.strings differ
diff --git a/hw/xquartz/bundle/Resources/English.lproj/main.nib/designable.nib b/hw/xquartz/bundle/Resources/English.lproj/main.nib/designable.nib
new file mode 100644
index 0000000..c93d023
--- /dev/null
+++ b/hw/xquartz/bundle/Resources/English.lproj/main.nib/designable.nib
@@ -0,0 +1,3753 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="7.02">
+	<data>
+		<int key="IBDocument.SystemTarget">1050</int>
+		<string key="IBDocument.SystemVersion">9C7010</string>
+		<string key="IBDocument.InterfaceBuilderVersion">639</string>
+		<string key="IBDocument.AppKitVersion">949.26</string>
+		<string key="IBDocument.HIToolboxVersion">352.00</string>
+		<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
+			<bool key="EncodedWithXMLCoder">YES</bool>
+		</object>
+		<object class="NSArray" key="IBDocument.PluginDependencies">
+			<bool key="EncodedWithXMLCoder">YES</bool>
+			<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+		</object>
+		<object class="NSMutableArray" key="IBDocument.RootObjects" id="904585544">
+			<bool key="EncodedWithXMLCoder">YES</bool>
+			<object class="NSCustomObject" id="815810918">
+				<object class="NSMutableString" key="NSClassName">
+					<characters key="NS.bytes">NSApplication</characters>
+				</object>
+			</object>
+			<object class="NSCustomObject" id="941939442">
+				<string key="NSClassName">FirstResponder</string>
+			</object>
+			<object class="NSCustomObject" id="951368722">
+				<string key="NSClassName">NSApplication</string>
+			</object>
+			<object class="NSMenu" id="524015605">
+				<string key="NSTitle">MainMenu</string>
+				<object class="NSMutableArray" key="NSMenuItems">
+					<bool key="EncodedWithXMLCoder">YES</bool>
+					<object class="NSMenuItem" id="365880285">
+						<reference key="NSMenu" ref="524015605"/>
+						<string key="NSTitle">X11</string>
+						<string key="NSKeyEquiv"/>
+						<int key="NSKeyEquivModMask">1048576</int>
+						<int key="NSMnemonicLoc">2147483647</int>
+						<object class="NSCustomResource" key="NSOnImage" id="531645050">
+							<string key="NSClassName">NSImage</string>
+							<string key="NSResourceName">NSMenuCheckmark</string>
+						</object>
+						<object class="NSCustomResource" key="NSMixedImage" id="351811234">
+							<string key="NSClassName">NSImage</string>
+							<string key="NSResourceName">NSMenuMixedState</string>
+						</object>
+						<string key="NSAction">submenuAction:</string>
+						<object class="NSMenu" key="NSSubmenu" id="576521955">
+							<string key="NSTitle">X11</string>
+							<object class="NSMutableArray" key="NSMenuItems">
+								<bool key="EncodedWithXMLCoder">YES</bool>
+								<object class="NSMenuItem" id="139290918">
+									<reference key="NSMenu" ref="576521955"/>
+									<string key="NSTitle">About X11</string>
+									<string key="NSKeyEquiv"/>
+									<int key="NSMnemonicLoc">2147483647</int>
+									<reference key="NSOnImage" ref="531645050"/>
+									<reference key="NSMixedImage" ref="351811234"/>
+								</object>
+								<object class="NSMenuItem" id="386173216">
+									<reference key="NSMenu" ref="576521955"/>
+									<string key="NSTitle">Preferences...</string>
+									<string key="NSKeyEquiv">,</string>
+									<int key="NSKeyEquivModMask">1048576</int>
+									<int key="NSMnemonicLoc">2147483647</int>
+									<reference key="NSOnImage" ref="531645050"/>
+									<reference key="NSMixedImage" ref="351811234"/>
+								</object>
+								<object class="NSMenuItem" id="858487910">
+									<reference key="NSMenu" ref="576521955"/>
+									<string key="NSTitle">Check for updates...</string>
+									<string key="NSKeyEquiv"/>
+									<int key="NSMnemonicLoc">2147483647</int>
+									<reference key="NSOnImage" ref="531645050"/>
+									<reference key="NSMixedImage" ref="351811234"/>
+								</object>
+								<object class="NSMenuItem" id="272876017">
+									<reference key="NSMenu" ref="576521955"/>
+									<bool key="NSIsDisabled">YES</bool>
+									<bool key="NSIsSeparator">YES</bool>
+									<string key="NSTitle"/>
+									<string key="NSKeyEquiv"/>
+									<int key="NSKeyEquivModMask">1048576</int>
+									<int key="NSMnemonicLoc">2147483647</int>
+									<reference key="NSOnImage" ref="531645050"/>
+									<reference key="NSMixedImage" ref="351811234"/>
+								</object>
+								<object class="NSMenuItem" id="32285361">
+									<reference key="NSMenu" ref="576521955"/>
+									<string key="NSTitle">Services</string>
+									<string key="NSKeyEquiv"/>
+									<int key="NSKeyEquivModMask">1048576</int>
+									<int key="NSMnemonicLoc">2147483647</int>
+									<reference key="NSOnImage" ref="531645050"/>
+									<reference key="NSMixedImage" ref="351811234"/>
+									<string key="NSAction">submenuAction:</string>
+									<object class="NSMenu" key="NSSubmenu" id="821388474">
+										<object class="NSMutableString" key="NSTitle">
+											<characters key="NS.bytes">Services</characters>
+										</object>
+										<object class="NSMutableArray" key="NSMenuItems">
+											<bool key="EncodedWithXMLCoder">YES</bool>
+										</object>
+										<string key="NSName">_NSServicesMenu</string>
+									</object>
+								</object>
+								<object class="NSMenuItem" id="431301145">
+									<reference key="NSMenu" ref="576521955"/>
+									<bool key="NSIsDisabled">YES</bool>
+									<bool key="NSIsSeparator">YES</bool>
+									<string key="NSTitle"/>
+									<string key="NSKeyEquiv"/>
+									<int key="NSKeyEquivModMask">1048576</int>
+									<int key="NSMnemonicLoc">2147483647</int>
+									<reference key="NSOnImage" ref="531645050"/>
+									<reference key="NSMixedImage" ref="351811234"/>
+								</object>
+								<object class="NSMenuItem" id="6876565">
+									<reference key="NSMenu" ref="576521955"/>
+									<string key="NSTitle">Toggle Full Screen</string>
+									<string key="NSKeyEquiv">a</string>
+									<int key="NSKeyEquivModMask">1572864</int>
+									<int key="NSMnemonicLoc">2147483647</int>
+									<reference key="NSOnImage" ref="531645050"/>
+									<reference key="NSMixedImage" ref="351811234"/>
+								</object>
+								<object class="NSMenuItem" id="479677589">
+									<reference key="NSMenu" ref="576521955"/>
+									<bool key="NSIsDisabled">YES</bool>
+									<bool key="NSIsSeparator">YES</bool>
+									<string key="NSTitle"/>
+									<string key="NSKeyEquiv"/>
+									<int key="NSKeyEquivModMask">1048576</int>
+									<int key="NSMnemonicLoc">2147483647</int>
+									<reference key="NSOnImage" ref="531645050"/>
+									<reference key="NSMixedImage" ref="351811234"/>
+								</object>
+								<object class="NSMenuItem" id="301008465">
+									<reference key="NSMenu" ref="576521955"/>
+									<string key="NSTitle">Hide X11</string>
+									<string key="NSKeyEquiv">h</string>
+									<int key="NSKeyEquivModMask">1048576</int>
+									<int key="NSMnemonicLoc">2147483647</int>
+									<reference key="NSOnImage" ref="531645050"/>
+									<reference key="NSMixedImage" ref="351811234"/>
+									<int key="NSTag">42</int>
+								</object>
+								<object class="NSMenuItem" id="206802571">
+									<reference key="NSMenu" ref="576521955"/>
+									<string key="NSTitle">Hide Others</string>
+									<string key="NSKeyEquiv"/>
+									<int key="NSKeyEquivModMask">1048576</int>
+									<int key="NSMnemonicLoc">2147483647</int>
+									<reference key="NSOnImage" ref="531645050"/>
+									<reference key="NSMixedImage" ref="351811234"/>
+								</object>
+								<object class="NSMenuItem" id="1023546148">
+									<reference key="NSMenu" ref="576521955"/>
+									<string key="NSTitle">Show All</string>
+									<string key="NSKeyEquiv"/>
+									<int key="NSKeyEquivModMask">1048576</int>
+									<int key="NSMnemonicLoc">2147483647</int>
+									<reference key="NSOnImage" ref="531645050"/>
+									<reference key="NSMixedImage" ref="351811234"/>
+									<int key="NSTag">42</int>
+								</object>
+								<object class="NSMenuItem" id="848095279">
+									<reference key="NSMenu" ref="576521955"/>
+									<bool key="NSIsDisabled">YES</bool>
+									<bool key="NSIsSeparator">YES</bool>
+									<string key="NSTitle"/>
+									<string key="NSKeyEquiv"/>
+									<int key="NSKeyEquivModMask">1048576</int>
+									<int key="NSMnemonicLoc">2147483647</int>
+									<reference key="NSOnImage" ref="531645050"/>
+									<reference key="NSMixedImage" ref="351811234"/>
+								</object>
+								<object class="NSMenuItem" id="274138642">
+									<reference key="NSMenu" ref="576521955"/>
+									<string key="NSTitle">Quit X11</string>
+									<string key="NSKeyEquiv">q</string>
+									<int key="NSKeyEquivModMask">1048576</int>
+									<int key="NSMnemonicLoc">2147483647</int>
+									<reference key="NSOnImage" ref="531645050"/>
+									<reference key="NSMixedImage" ref="351811234"/>
+								</object>
+							</object>
+							<string key="NSName">_NSAppleMenu</string>
+						</object>
+					</object>
+					<object class="NSMenuItem" id="868031522">
+						<reference key="NSMenu" ref="524015605"/>
+						<string key="NSTitle">Applications</string>
+						<string key="NSKeyEquiv"/>
+						<int key="NSKeyEquivModMask">1048576</int>
+						<int key="NSMnemonicLoc">2147483647</int>
+						<reference key="NSOnImage" ref="531645050"/>
+						<reference key="NSMixedImage" ref="351811234"/>
+						<string key="NSAction">submenuAction:</string>
+						<object class="NSMenu" key="NSSubmenu" id="981161348">
+							<string key="NSTitle">Applications</string>
+							<object class="NSMutableArray" key="NSMenuItems">
+								<bool key="EncodedWithXMLCoder">YES</bool>
+								<object class="NSMenuItem" id="390088328">
+									<reference key="NSMenu" ref="981161348"/>
+									<bool key="NSIsDisabled">YES</bool>
+									<bool key="NSIsSeparator">YES</bool>
+									<string key="NSTitle"/>
+									<string key="NSKeyEquiv"/>
+									<int key="NSKeyEquivModMask">1048576</int>
+									<int key="NSMnemonicLoc">2147483647</int>
+									<reference key="NSOnImage" ref="531645050"/>
+									<reference key="NSMixedImage" ref="351811234"/>
+								</object>
+								<object class="NSMenuItem" id="1065386165">
+									<reference key="NSMenu" ref="981161348"/>
+									<string key="NSTitle">Customize...</string>
+									<string key="NSKeyEquiv"/>
+									<int key="NSKeyEquivModMask">1048576</int>
+									<int key="NSMnemonicLoc">2147483647</int>
+									<reference key="NSOnImage" ref="531645050"/>
+									<reference key="NSMixedImage" ref="351811234"/>
+								</object>
+							</object>
+						</object>
+					</object>
+					<object class="NSMenuItem" id="200491363">
+						<reference key="NSMenu" ref="524015605"/>
+						<string key="NSTitle">Edit</string>
+						<string key="NSKeyEquiv"/>
+						<int key="NSKeyEquivModMask">1048576</int>
+						<int key="NSMnemonicLoc">2147483647</int>
+						<reference key="NSOnImage" ref="531645050"/>
+						<reference key="NSMixedImage" ref="351811234"/>
+						<string key="NSAction">submenuAction:</string>
+						<object class="NSMenu" key="NSSubmenu" id="526778998">
+							<string key="NSTitle">Edit</string>
+							<object class="NSMutableArray" key="NSMenuItems">
+								<bool key="EncodedWithXMLCoder">YES</bool>
+								<object class="NSMenuItem" id="1010221707">
+									<reference key="NSMenu" ref="526778998"/>
+									<string key="NSTitle">Undo</string>
+									<string key="NSKeyEquiv">z</string>
+									<int key="NSKeyEquivModMask">1048576</int>
+									<int key="NSMnemonicLoc">2147483647</int>
+									<reference key="NSOnImage" ref="531645050"/>
+									<reference key="NSMixedImage" ref="351811234"/>
+								</object>
+								<object class="NSMenuItem" id="535038564">
+									<reference key="NSMenu" ref="526778998"/>
+									<string key="NSTitle">Redo</string>
+									<string key="NSKeyEquiv">Z</string>
+									<int key="NSKeyEquivModMask">1048576</int>
+									<int key="NSMnemonicLoc">2147483647</int>
+									<reference key="NSOnImage" ref="531645050"/>
+									<reference key="NSMixedImage" ref="351811234"/>
+								</object>
+								<object class="NSMenuItem" id="839739619">
+									<reference key="NSMenu" ref="526778998"/>
+									<bool key="NSIsDisabled">YES</bool>
+									<bool key="NSIsSeparator">YES</bool>
+									<string key="NSTitle"/>
+									<string key="NSKeyEquiv"/>
+									<int key="NSKeyEquivModMask">1048576</int>
+									<int key="NSMnemonicLoc">2147483647</int>
+									<reference key="NSOnImage" ref="531645050"/>
+									<reference key="NSMixedImage" ref="351811234"/>
+								</object>
+								<object class="NSMenuItem" id="581727829">
+									<reference key="NSMenu" ref="526778998"/>
+									<string key="NSTitle">Cut</string>
+									<string key="NSKeyEquiv">x</string>
+									<int key="NSKeyEquivModMask">1048576</int>
+									<int key="NSMnemonicLoc">2147483647</int>
+									<reference key="NSOnImage" ref="531645050"/>
+									<reference key="NSMixedImage" ref="351811234"/>
+								</object>
+								<object class="NSMenuItem" id="185296989">
+									<reference key="NSMenu" ref="526778998"/>
+									<string key="NSTitle">Copy</string>
+									<string key="NSKeyEquiv">c</string>
+									<int key="NSKeyEquivModMask">1048576</int>
+									<int key="NSMnemonicLoc">2147483647</int>
+									<reference key="NSOnImage" ref="531645050"/>
+									<reference key="NSMixedImage" ref="351811234"/>
+								</object>
+								<object class="NSMenuItem" id="924678073">
+									<reference key="NSMenu" ref="526778998"/>
+									<string key="NSTitle">Paste</string>
+									<string key="NSKeyEquiv">v</string>
+									<int key="NSKeyEquivModMask">1048576</int>
+									<int key="NSMnemonicLoc">2147483647</int>
+									<reference key="NSOnImage" ref="531645050"/>
+									<reference key="NSMixedImage" ref="351811234"/>
+								</object>
+								<object class="NSMenuItem" id="994817848">
+									<reference key="NSMenu" ref="526778998"/>
+									<string key="NSTitle">Delete</string>
+									<string key="NSKeyEquiv"/>
+									<int key="NSKeyEquivModMask">1048576</int>
+									<int key="NSMnemonicLoc">2147483647</int>
+									<reference key="NSOnImage" ref="531645050"/>
+									<reference key="NSMixedImage" ref="351811234"/>
+								</object>
+								<object class="NSMenuItem" id="322866464">
+									<reference key="NSMenu" ref="526778998"/>
+									<string key="NSTitle">Select All</string>
+									<string key="NSKeyEquiv">a</string>
+									<int key="NSKeyEquivModMask">1048576</int>
+									<int key="NSMnemonicLoc">2147483647</int>
+									<reference key="NSOnImage" ref="531645050"/>
+									<reference key="NSMixedImage" ref="351811234"/>
+								</object>
+							</object>
+						</object>
+					</object>
+					<object class="NSMenuItem" id="931553638">
+						<reference key="NSMenu" ref="524015605"/>
+						<string key="NSTitle">Window</string>
+						<string key="NSKeyEquiv"/>
+						<int key="NSKeyEquivModMask">1048576</int>
+						<int key="NSMnemonicLoc">2147483647</int>
+						<reference key="NSOnImage" ref="531645050"/>
+						<reference key="NSMixedImage" ref="351811234"/>
+						<string key="NSAction">submenuAction:</string>
+						<object class="NSMenu" key="NSSubmenu" id="96874957">
+							<object class="NSMutableString" key="NSTitle">
+								<characters key="NS.bytes">Window</characters>
+							</object>
+							<object class="NSMutableArray" key="NSMenuItems">
+								<bool key="EncodedWithXMLCoder">YES</bool>
+								<object class="NSMenuItem" id="677652931">
+									<reference key="NSMenu" ref="96874957"/>
+									<string key="NSTitle">Minimize</string>
+									<string key="NSKeyEquiv">m</string>
+									<int key="NSKeyEquivModMask">1048576</int>
+									<int key="NSMnemonicLoc">2147483647</int>
+									<reference key="NSOnImage" ref="531645050"/>
+									<reference key="NSMixedImage" ref="351811234"/>
+								</object>
+								<object class="NSMenuItem" id="1066447520">
+									<reference key="NSMenu" ref="96874957"/>
+									<string key="NSTitle">Zoom</string>
+									<string key="NSKeyEquiv"/>
+									<int key="NSKeyEquivModMask">1048576</int>
+									<int key="NSMnemonicLoc">2147483647</int>
+									<reference key="NSOnImage" ref="531645050"/>
+									<reference key="NSMixedImage" ref="351811234"/>
+								</object>
+								<object class="NSMenuItem" id="1036389925">
+									<reference key="NSMenu" ref="96874957"/>
+									<string key="NSTitle">Cycle Through Windows</string>
+									<string key="NSKeyEquiv">`</string>
+									<int key="NSKeyEquivModMask">1048840</int>
+									<int key="NSMnemonicLoc">2147483647</int>
+									<reference key="NSOnImage" ref="531645050"/>
+									<reference key="NSMixedImage" ref="351811234"/>
+								</object>
+								<object class="NSMenuItem" id="369641893">
+									<reference key="NSMenu" ref="96874957"/>
+									<string key="NSTitle">Reverse Cycle Through Windows</string>
+									<string key="NSKeyEquiv">~</string>
+									<int key="NSKeyEquivModMask">1179914</int>
+									<int key="NSMnemonicLoc">2147483647</int>
+									<reference key="NSOnImage" ref="531645050"/>
+									<reference key="NSMixedImage" ref="351811234"/>
+								</object>
+								<object class="NSMenuItem" id="280172320">
+									<reference key="NSMenu" ref="96874957"/>
+									<bool key="NSIsDisabled">YES</bool>
+									<bool key="NSIsSeparator">YES</bool>
+									<string key="NSTitle"/>
+									<string key="NSKeyEquiv"/>
+									<int key="NSKeyEquivModMask">1048576</int>
+									<int key="NSMnemonicLoc">2147483647</int>
+									<reference key="NSOnImage" ref="531645050"/>
+									<reference key="NSMixedImage" ref="351811234"/>
+								</object>
+								<object class="NSMenuItem" id="984461797">
+									<reference key="NSMenu" ref="96874957"/>
+									<string key="NSTitle">Close</string>
+									<string key="NSKeyEquiv">w</string>
+									<int key="NSKeyEquivModMask">1048576</int>
+									<int key="NSMnemonicLoc">2147483647</int>
+									<reference key="NSOnImage" ref="531645050"/>
+									<reference key="NSMixedImage" ref="351811234"/>
+								</object>
+								<object class="NSMenuItem" id="155085383">
+									<reference key="NSMenu" ref="96874957"/>
+									<bool key="NSIsDisabled">YES</bool>
+									<bool key="NSIsSeparator">YES</bool>
+									<string key="NSTitle"/>
+									<string key="NSKeyEquiv"/>
+									<int key="NSKeyEquivModMask">1048576</int>
+									<int key="NSMnemonicLoc">2147483647</int>
+									<reference key="NSOnImage" ref="531645050"/>
+									<reference key="NSMixedImage" ref="351811234"/>
+								</object>
+								<object class="NSMenuItem" id="276216762">
+									<reference key="NSMenu" ref="96874957"/>
+									<string key="NSTitle">Bring All to Front</string>
+									<string key="NSKeyEquiv"/>
+									<int key="NSKeyEquivModMask">1048576</int>
+									<int key="NSMnemonicLoc">2147483647</int>
+									<reference key="NSOnImage" ref="531645050"/>
+									<reference key="NSMixedImage" ref="351811234"/>
+								</object>
+								<object class="NSMenuItem" id="444952046">
+									<reference key="NSMenu" ref="96874957"/>
+									<bool key="NSIsDisabled">YES</bool>
+									<bool key="NSIsSeparator">YES</bool>
+									<string key="NSTitle"/>
+									<string key="NSKeyEquiv"/>
+									<int key="NSKeyEquivModMask">1048576</int>
+									<int key="NSMnemonicLoc">2147483647</int>
+									<reference key="NSOnImage" ref="531645050"/>
+									<reference key="NSMixedImage" ref="351811234"/>
+								</object>
+							</object>
+							<string key="NSName">_NSWindowsMenu</string>
+						</object>
+					</object>
+					<object class="NSMenuItem" id="551174276">
+						<reference key="NSMenu" ref="524015605"/>
+						<string key="NSTitle">Help</string>
+						<string key="NSKeyEquiv"/>
+						<int key="NSKeyEquivModMask">1048576</int>
+						<int key="NSMnemonicLoc">2147483647</int>
+						<reference key="NSOnImage" ref="531645050"/>
+						<reference key="NSMixedImage" ref="351811234"/>
+						<string key="NSAction">submenuAction:</string>
+						<object class="NSMenu" key="NSSubmenu" id="511848303">
+							<string key="NSTitle">Help</string>
+							<object class="NSMutableArray" key="NSMenuItems">
+								<bool key="EncodedWithXMLCoder">YES</bool>
+								<object class="NSMenuItem" id="504984881">
+									<reference key="NSMenu" ref="511848303"/>
+									<string key="NSTitle">X11 Help</string>
+									<string key="NSKeyEquiv"/>
+									<int key="NSKeyEquivModMask">1048576</int>
+									<int key="NSMnemonicLoc">2147483647</int>
+									<reference key="NSOnImage" ref="531645050"/>
+									<reference key="NSMixedImage" ref="351811234"/>
+								</object>
+							</object>
+						</object>
+					</object>
+				</object>
+				<string key="NSName">_NSMainMenu</string>
+			</object>
+			<object class="NSCustomObject" id="485884620">
+				<string key="NSClassName">X11Controller</string>
+			</object>
+			<object class="NSWindowTemplate" id="124913468">
+				<int key="NSWindowStyleMask">3</int>
+				<int key="NSWindowBacking">2</int>
+				<string key="NSWindowRect">{{266, 392}, {484, 280}}</string>
+				<int key="NSWTFlags">1350041600</int>
+				<string key="NSWindowTitle">X11 Preferences</string>
+				<string key="NSWindowClass">NSPanel</string>
+				<object class="NSMutableString" key="NSViewClass">
+					<characters key="NS.bytes">View</characters>
+				</object>
+				<string key="NSWindowContentMaxSize">{3.40282e+38, 3.40282e+38}</string>
+				<string key="NSWindowContentMinSize">{213, 107}</string>
+				<object class="NSView" key="NSWindowView" id="941366957">
+					<nil key="NSNextResponder"/>
+					<int key="NSvFlags">256</int>
+					<object class="NSMutableArray" key="NSSubviews">
+						<bool key="EncodedWithXMLCoder">YES</bool>
+						<object class="NSTabView" id="448510093">
+							<reference key="NSNextResponder" ref="941366957"/>
+							<int key="NSvFlags">256</int>
+							<string key="NSFrame">{{13, 10}, {458, 264}}</string>
+							<reference key="NSSuperview" ref="941366957"/>
+							<object class="NSMutableArray" key="NSTabViewItems">
+								<bool key="EncodedWithXMLCoder">YES</bool>
+								<object class="NSTabViewItem" id="287591690">
+									<object class="NSMutableString" key="NSIdentifier">
+										<characters key="NS.bytes">1</characters>
+									</object>
+									<object class="NSView" key="NSView" id="596750588">
+										<reference key="NSNextResponder" ref="448510093"/>
+										<int key="NSvFlags">256</int>
+										<object class="NSMutableArray" key="NSSubviews">
+											<bool key="EncodedWithXMLCoder">YES</bool>
+											<object class="NSButton" id="119157981">
+												<reference key="NSNextResponder" ref="596750588"/>
+												<int key="NSvFlags">256</int>
+												<string key="NSFrame">{{18, 182}, {402, 18}}</string>
+												<reference key="NSSuperview" ref="596750588"/>
+												<bool key="NSEnabled">YES</bool>
+												<object class="NSButtonCell" key="NSCell" id="990762273">
+													<int key="NSCellFlags">67239424</int>
+													<int key="NSCellFlags2">0</int>
+													<string key="NSContents">Emulate three button mouse</string>
+													<object class="NSFont" key="NSSupport" id="463863101">
+														<string key="NSName">LucidaGrande</string>
+														<double key="NSSize">1.300000e+01</double>
+														<int key="NSfFlags">1044</int>
+													</object>
+													<reference key="NSControlView" ref="119157981"/>
+													<int key="NSButtonFlags">1211912703</int>
+													<int key="NSButtonFlags2">2</int>
+													<object class="NSButtonImageSource" key="NSAlternateImage" id="391434389">
+														<string key="NSImageName">NSSwitch</string>
+													</object>
+													<string key="NSAlternateContents"/>
+													<string key="NSKeyEquivalent"/>
+													<int key="NSPeriodicDelay">200</int>
+													<int key="NSPeriodicInterval">25</int>
+												</object>
+											</object>
+											<object class="NSTextField" id="443008216">
+												<reference key="NSNextResponder" ref="596750588"/>
+												<int key="NSvFlags">256</int>
+												<string key="NSFrame">{{36, 32}, {385, 31}}</string>
+												<reference key="NSSuperview" ref="596750588"/>
+												<bool key="NSEnabled">YES</bool>
+												<object class="NSTextFieldCell" key="NSCell" id="391919450">
+													<int key="NSCellFlags">67239424</int>
+													<int key="NSCellFlags2">4194304</int>
+													<string key="NSContents">When enabled, menu bar key equivalents may interfere with X11 applications that use the Meta modifier.</string>
+													<object class="NSFont" key="NSSupport" id="26">
+														<string key="NSName">LucidaGrande</string>
+														<double key="NSSize">1.100000e+01</double>
+														<int key="NSfFlags">3100</int>
+													</object>
+													<reference key="NSControlView" ref="443008216"/>
+													<object class="NSColor" key="NSBackgroundColor" id="57160303">
+														<int key="NSColorSpace">6</int>
+														<string key="NSCatalogName">System</string>
+														<string key="NSColorName">controlColor</string>
+														<object class="NSColor" key="NSColor" id="590688762">
+															<int key="NSColorSpace">3</int>
+															<bytes key="NSWhite">MC42NjY2NjY2OQA</bytes>
+														</object>
+													</object>
+													<object class="NSColor" key="NSTextColor" id="930815747">
+														<int key="NSColorSpace">6</int>
+														<string key="NSCatalogName">System</string>
+														<string key="NSColorName">controlTextColor</string>
+														<object class="NSColor" key="NSColor" id="214098874">
+															<int key="NSColorSpace">3</int>
+															<bytes key="NSWhite">MAA</bytes>
+														</object>
+													</object>
+												</object>
+											</object>
+											<object class="NSTextField" id="282885445">
+												<reference key="NSNextResponder" ref="596750588"/>
+												<int key="NSvFlags">256</int>
+												<string key="NSFrame">{{36, 147}, {385, 29}}</string>
+												<reference key="NSSuperview" ref="596750588"/>
+												<bool key="NSEnabled">YES</bool>
+												<object class="NSTextFieldCell" key="NSCell" id="649334366">
+													<int key="NSCellFlags">67239424</int>
+													<int key="NSCellFlags2">4194304</int>
+													<string type="base64-UTF8" key="NSContents">SG9sZCBPcHRpb24gYW5kIENvbW1hbmQgd2hpbGUgY2xpY2tpbmcgdG8gYWN0aXZhdGUgdGhlIG1pZGRs
+ZSBhbmQgcmlnaHQgbW91c2UgYnV0dG9ucy4KA</string>
+													<reference key="NSSupport" ref="26"/>
+													<reference key="NSControlView" ref="282885445"/>
+													<reference key="NSBackgroundColor" ref="57160303"/>
+													<reference key="NSTextColor" ref="930815747"/>
+												</object>
+											</object>
+											<object class="NSButton" id="842100515">
+												<reference key="NSNextResponder" ref="596750588"/>
+												<int key="NSvFlags">256</int>
+												<string key="NSFrame">{{18, 69}, {402, 18}}</string>
+												<reference key="NSSuperview" ref="596750588"/>
+												<bool key="NSEnabled">YES</bool>
+												<object class="NSButtonCell" key="NSCell" id="940564599">
+													<int key="NSCellFlags">67239424</int>
+													<int key="NSCellFlags2">0</int>
+													<string key="NSContents">Enable key equivalents under X11</string>
+													<reference key="NSSupport" ref="463863101"/>
+													<reference key="NSControlView" ref="842100515"/>
+													<int key="NSButtonFlags">1211912703</int>
+													<int key="NSButtonFlags2">2</int>
+													<reference key="NSAlternateImage" ref="391434389"/>
+													<string key="NSAlternateContents"/>
+													<string key="NSKeyEquivalent"/>
+													<int key="NSPeriodicDelay">200</int>
+													<int key="NSPeriodicInterval">25</int>
+												</object>
+											</object>
+											<object class="NSTextField" id="31160162">
+												<reference key="NSNextResponder" ref="596750588"/>
+												<int key="NSvFlags">256</int>
+												<string key="NSFrame">{{36, 98}, {385, 14}}</string>
+												<reference key="NSSuperview" ref="596750588"/>
+												<bool key="NSEnabled">YES</bool>
+												<object class="NSTextFieldCell" key="NSCell" id="666057093">
+													<int key="NSCellFlags">67239424</int>
+													<int key="NSCellFlags2">4194304</int>
+													<string key="NSContents">Allows input menu changes to overwrite the current X11 keymap.</string>
+													<reference key="NSSupport" ref="26"/>
+													<reference key="NSControlView" ref="31160162"/>
+													<reference key="NSBackgroundColor" ref="57160303"/>
+													<reference key="NSTextColor" ref="930815747"/>
+												</object>
+											</object>
+											<object class="NSButton" id="179949713">
+												<reference key="NSNextResponder" ref="596750588"/>
+												<int key="NSvFlags">256</int>
+												<string key="NSFrame">{{18, 118}, {402, 18}}</string>
+												<reference key="NSSuperview" ref="596750588"/>
+												<bool key="NSEnabled">YES</bool>
+												<object class="NSButtonCell" key="NSCell" id="967619578">
+													<int key="NSCellFlags">67239424</int>
+													<int key="NSCellFlags2">0</int>
+													<string key="NSContents">Follow system keyboard layout</string>
+													<reference key="NSSupport" ref="463863101"/>
+													<reference key="NSControlView" ref="179949713"/>
+													<int key="NSButtonFlags">1211912703</int>
+													<int key="NSButtonFlags2">2</int>
+													<reference key="NSAlternateImage" ref="391434389"/>
+													<string key="NSAlternateContents"/>
+													<string key="NSKeyEquivalent"/>
+													<int key="NSPeriodicDelay">200</int>
+													<int key="NSPeriodicInterval">25</int>
+												</object>
+											</object>
+										</object>
+										<string key="NSFrame">{{10, 33}, {438, 218}}</string>
+										<reference key="NSSuperview" ref="448510093"/>
+									</object>
+									<string key="NSLabel">Input</string>
+									<reference key="NSColor" ref="57160303"/>
+									<reference key="NSTabView" ref="448510093"/>
+								</object>
+								<object class="NSTabViewItem" id="960678392">
+									<object class="NSMutableString" key="NSIdentifier">
+										<characters key="NS.bytes">2</characters>
+									</object>
+									<object class="NSView" key="NSView" id="515308735">
+										<nil key="NSNextResponder"/>
+										<int key="NSvFlags">256</int>
+										<object class="NSMutableArray" key="NSSubviews">
+											<bool key="EncodedWithXMLCoder">YES</bool>
+											<object class="NSButton" id="418227126">
+												<reference key="NSNextResponder" ref="515308735"/>
+												<int key="NSvFlags">256</int>
+												<string key="NSFrame">{{18, 55}, {402, 18}}</string>
+												<reference key="NSSuperview" ref="515308735"/>
+												<bool key="NSEnabled">YES</bool>
+												<object class="NSButtonCell" key="NSCell" id="1016069354">
+													<int key="NSCellFlags">67239424</int>
+													<int key="NSCellFlags2">0</int>
+													<string key="NSContents">Use system alert effect</string>
+													<reference key="NSSupport" ref="463863101"/>
+													<reference key="NSControlView" ref="418227126"/>
+													<int key="NSButtonFlags">1211912703</int>
+													<int key="NSButtonFlags2">2</int>
+													<reference key="NSAlternateImage" ref="391434389"/>
+													<string key="NSAlternateContents"/>
+													<string key="NSKeyEquivalent"/>
+													<int key="NSPeriodicDelay">200</int>
+													<int key="NSPeriodicInterval">25</int>
+												</object>
+											</object>
+											<object class="NSTextField" id="1039016593">
+												<reference key="NSNextResponder" ref="515308735"/>
+												<int key="NSvFlags">256</int>
+												<string key="NSFrame">{{36, 21}, {385, 28}}</string>
+												<reference key="NSSuperview" ref="515308735"/>
+												<bool key="NSEnabled">YES</bool>
+												<object class="NSTextFieldCell" key="NSCell" id="624655599">
+													<int key="NSCellFlags">67239424</int>
+													<int key="NSCellFlags2">4194304</int>
+													<string key="NSContents">X11 beeps will use the standard system alert, as defined in the Sound Effects system preferences panel.</string>
+													<reference key="NSSupport" ref="26"/>
+													<reference key="NSControlView" ref="1039016593"/>
+													<reference key="NSBackgroundColor" ref="57160303"/>
+													<reference key="NSTextColor" ref="930815747"/>
+												</object>
+											</object>
+											<object class="NSPopUpButton" id="709074847">
+												<reference key="NSNextResponder" ref="515308735"/>
+												<int key="NSvFlags">256</int>
+												<string key="NSFrame">{{74, 174}, {128, 26}}</string>
+												<reference key="NSSuperview" ref="515308735"/>
+												<bool key="NSEnabled">YES</bool>
+												<object class="NSPopUpButtonCell" key="NSCell" id="633115429">
+													<int key="NSCellFlags">-2076049856</int>
+													<int key="NSCellFlags2">1024</int>
+													<reference key="NSSupport" ref="463863101"/>
+													<reference key="NSControlView" ref="709074847"/>
+													<int key="NSButtonFlags">109199615</int>
+													<int key="NSButtonFlags2">1</int>
+													<object class="NSFont" key="NSAlternateImage">
+														<string key="NSName">LucidaGrande</string>
+														<double key="NSSize">1.300000e+01</double>
+														<int key="NSfFlags">16</int>
+													</object>
+													<object class="NSMutableString" key="NSAlternateContents">
+														<characters key="NS.bytes"/>
+													</object>
+													<object class="NSMutableString" key="NSKeyEquivalent">
+														<characters key="NS.bytes"/>
+													</object>
+													<int key="NSPeriodicDelay">400</int>
+													<int key="NSPeriodicInterval">75</int>
+													<object class="NSMenuItem" key="NSMenuItem" id="616492372">
+														<reference key="NSMenu" ref="341113515"/>
+														<string key="NSTitle">From Display</string>
+														<string key="NSKeyEquiv"/>
+														<int key="NSKeyEquivModMask">1048576</int>
+														<int key="NSMnemonicLoc">2147483647</int>
+														<int key="NSState">1</int>
+														<reference key="NSOnImage" ref="531645050"/>
+														<reference key="NSMixedImage" ref="351811234"/>
+														<string key="NSAction">_popUpItemAction:</string>
+														<int key="NSTag">-1</int>
+														<reference key="NSTarget" ref="633115429"/>
+													</object>
+													<bool key="NSMenuItemRespectAlignment">YES</bool>
+													<object class="NSMenu" key="NSMenu" id="341113515">
+														<object class="NSMutableString" key="NSTitle">
+															<characters key="NS.bytes">OtherViews</characters>
+														</object>
+														<object class="NSMutableArray" key="NSMenuItems">
+															<bool key="EncodedWithXMLCoder">YES</bool>
+															<reference ref="616492372"/>
+															<object class="NSMenuItem" id="759499526">
+																<reference key="NSMenu" ref="341113515"/>
+																<string key="NSTitle">256 Colors</string>
+																<string key="NSKeyEquiv"/>
+																<int key="NSKeyEquivModMask">1048576</int>
+																<int key="NSMnemonicLoc">2147483647</int>
+																<reference key="NSOnImage" ref="531645050"/>
+																<reference key="NSMixedImage" ref="351811234"/>
+																<string key="NSAction">_popUpItemAction:</string>
+																<int key="NSTag">8</int>
+																<reference key="NSTarget" ref="633115429"/>
+															</object>
+															<object class="NSMenuItem" id="543935434">
+																<reference key="NSMenu" ref="341113515"/>
+																<string key="NSTitle">Thousands</string>
+																<string key="NSKeyEquiv"/>
+																<int key="NSKeyEquivModMask">1048576</int>
+																<int key="NSMnemonicLoc">2147483647</int>
+																<reference key="NSOnImage" ref="531645050"/>
+																<reference key="NSMixedImage" ref="351811234"/>
+																<string key="NSAction">_popUpItemAction:</string>
+																<int key="NSTag">15</int>
+																<reference key="NSTarget" ref="633115429"/>
+															</object>
+															<object class="NSMenuItem" id="836673018">
+																<reference key="NSMenu" ref="341113515"/>
+																<string key="NSTitle">Millions</string>
+																<string key="NSKeyEquiv"/>
+																<int key="NSKeyEquivModMask">1048576</int>
+																<int key="NSMnemonicLoc">2147483647</int>
+																<reference key="NSOnImage" ref="531645050"/>
+																<reference key="NSMixedImage" ref="351811234"/>
+																<string key="NSAction">_popUpItemAction:</string>
+																<int key="NSTag">24</int>
+																<reference key="NSTarget" ref="633115429"/>
+															</object>
+														</object>
+													</object>
+													<int key="NSPreferredEdge">3</int>
+													<bool key="NSUsesItemFromMenu">YES</bool>
+													<bool key="NSAltersState">YES</bool>
+													<int key="NSArrowPosition">1</int>
+												</object>
+											</object>
+											<object class="NSTextField" id="201731424">
+												<reference key="NSNextResponder" ref="515308735"/>
+												<int key="NSvFlags">256</int>
+												<string key="NSFrame">{{17, 177}, {55, 20}}</string>
+												<reference key="NSSuperview" ref="515308735"/>
+												<bool key="NSEnabled">YES</bool>
+												<object class="NSTextFieldCell" key="NSCell" id="930265681">
+													<int key="NSCellFlags">67239424</int>
+													<int key="NSCellFlags2">4194304</int>
+													<string type="base64-UTF8" key="NSContents">Q29sb3JzOgo</string>
+													<reference key="NSSupport" ref="463863101"/>
+													<reference key="NSControlView" ref="201731424"/>
+													<reference key="NSBackgroundColor" ref="57160303"/>
+													<reference key="NSTextColor" ref="930815747"/>
+												</object>
+											</object>
+											<object class="NSTextField" id="86150604">
+												<reference key="NSNextResponder" ref="515308735"/>
+												<int key="NSvFlags">256</int>
+												<string key="NSFrame">{{36, 155}, {392, 14}}</string>
+												<reference key="NSSuperview" ref="515308735"/>
+												<bool key="NSEnabled">YES</bool>
+												<object class="NSTextFieldCell" key="NSCell" id="311969422">
+													<int key="NSCellFlags">67239424</int>
+													<int key="NSCellFlags2">4194304</int>
+													<string key="NSContents">This option takes effect when X11 is launched again.</string>
+													<reference key="NSSupport" ref="26"/>
+													<reference key="NSControlView" ref="86150604"/>
+													<reference key="NSBackgroundColor" ref="57160303"/>
+													<reference key="NSTextColor" ref="930815747"/>
+												</object>
+											</object>
+											<object class="NSButton" id="477203622">
+												<reference key="NSNextResponder" ref="515308735"/>
+												<int key="NSvFlags">256</int>
+												<string key="NSFrame">{{18, 121}, {409, 23}}</string>
+												<reference key="NSSuperview" ref="515308735"/>
+												<bool key="NSEnabled">YES</bool>
+												<object class="NSButtonCell" key="NSCell" id="631531164">
+													<int key="NSCellFlags">67239424</int>
+													<int key="NSCellFlags2">0</int>
+													<string key="NSContents">Full screen mode</string>
+													<reference key="NSSupport" ref="463863101"/>
+													<reference key="NSControlView" ref="477203622"/>
+													<int key="NSButtonFlags">1211912703</int>
+													<int key="NSButtonFlags2">2</int>
+													<reference key="NSAlternateImage" ref="391434389"/>
+													<string key="NSAlternateContents"/>
+													<string key="NSKeyEquivalent"/>
+													<int key="NSPeriodicDelay">200</int>
+													<int key="NSPeriodicInterval">25</int>
+												</object>
+											</object>
+											<object class="NSTextField" id="298603383">
+												<reference key="NSNextResponder" ref="515308735"/>
+												<int key="NSvFlags">256</int>
+												<string key="NSFrame">{{36, 84}, {385, 31}}</string>
+												<reference key="NSSuperview" ref="515308735"/>
+												<bool key="NSEnabled">YES</bool>
+												<object class="NSTextFieldCell" key="NSCell" id="761107402">
+													<int key="NSCellFlags">67239424</int>
+													<int key="NSCellFlags2">4194304</int>
+													<string key="NSContents">Enables the X11 root window. Use the Command-Option-A keystroke to enter and leave full screen mode.</string>
+													<reference key="NSSupport" ref="26"/>
+													<reference key="NSControlView" ref="298603383"/>
+													<reference key="NSBackgroundColor" ref="57160303"/>
+													<reference key="NSTextColor" ref="930815747"/>
+												</object>
+											</object>
+										</object>
+										<string key="NSFrame">{{10, 33}, {438, 218}}</string>
+									</object>
+									<string key="NSLabel">Output</string>
+									<reference key="NSColor" ref="57160303"/>
+									<reference key="NSTabView" ref="448510093"/>
+								</object>
+								<object class="NSTabViewItem" id="10973343">
+									<object class="NSMutableString" key="NSIdentifier">
+										<characters key="NS.bytes">2</characters>
+									</object>
+									<object class="NSView" key="NSView" id="184765684">
+										<nil key="NSNextResponder"/>
+										<int key="NSvFlags">256</int>
+										<object class="NSMutableArray" key="NSSubviews">
+											<bool key="EncodedWithXMLCoder">YES</bool>
+											<object class="NSButton" id="657659108">
+												<reference key="NSNextResponder" ref="184765684"/>
+												<int key="NSvFlags">256</int>
+												<string key="NSFrame">{{15, 184}, {402, 18}}</string>
+												<reference key="NSSuperview" ref="184765684"/>
+												<bool key="NSEnabled">YES</bool>
+												<object class="NSButtonCell" key="NSCell" id="259618205">
+													<int key="NSCellFlags">67239424</int>
+													<int key="NSCellFlags2">0</int>
+													<string key="NSContents">Click-through Inactive Windows</string>
+													<reference key="NSSupport" ref="463863101"/>
+													<reference key="NSControlView" ref="657659108"/>
+													<int key="NSButtonFlags">1211912703</int>
+													<int key="NSButtonFlags2">2</int>
+													<reference key="NSAlternateImage" ref="391434389"/>
+													<string key="NSAlternateContents"/>
+													<string key="NSKeyEquivalent"/>
+													<int key="NSPeriodicDelay">200</int>
+													<int key="NSPeriodicInterval">25</int>
+												</object>
+											</object>
+											<object class="NSTextField" id="290578835">
+												<reference key="NSNextResponder" ref="184765684"/>
+												<int key="NSvFlags">256</int>
+												<string key="NSFrame">{{23, 147}, {385, 31}}</string>
+												<reference key="NSSuperview" ref="184765684"/>
+												<bool key="NSEnabled">YES</bool>
+												<object class="NSTextFieldCell" key="NSCell" id="399127858">
+													<int key="NSCellFlags">67239424</int>
+													<int key="NSCellFlags2">4194304</int>
+													<string key="NSContents">When enabled, clicking on an inactive window will cause that mouse click to pass through to that window in addition to activating it.</string>
+													<reference key="NSSupport" ref="26"/>
+													<reference key="NSControlView" ref="290578835"/>
+													<reference key="NSBackgroundColor" ref="57160303"/>
+													<reference key="NSTextColor" ref="930815747"/>
+												</object>
+											</object>
+											<object class="NSButton" id="992839333">
+												<reference key="NSNextResponder" ref="184765684"/>
+												<int key="NSvFlags">256</int>
+												<string key="NSFrame">{{15, 123}, {402, 18}}</string>
+												<reference key="NSSuperview" ref="184765684"/>
+												<bool key="NSEnabled">YES</bool>
+												<object class="NSButtonCell" key="NSCell" id="959555182">
+													<int key="NSCellFlags">67239424</int>
+													<int key="NSCellFlags2">0</int>
+													<string key="NSContents">Focus Follows Mouse</string>
+													<reference key="NSSupport" ref="463863101"/>
+													<reference key="NSControlView" ref="992839333"/>
+													<int key="NSButtonFlags">1211912703</int>
+													<int key="NSButtonFlags2">2</int>
+													<reference key="NSAlternateImage" ref="391434389"/>
+													<string key="NSAlternateContents"/>
+													<string key="NSKeyEquivalent"/>
+													<int key="NSPeriodicDelay">200</int>
+													<int key="NSPeriodicInterval">25</int>
+												</object>
+											</object>
+											<object class="NSTextField" id="138261120">
+												<reference key="NSNextResponder" ref="184765684"/>
+												<int key="NSvFlags">256</int>
+												<string key="NSFrame">{{23, 100}, {385, 17}}</string>
+												<reference key="NSSuperview" ref="184765684"/>
+												<bool key="NSEnabled">YES</bool>
+												<object class="NSTextFieldCell" key="NSCell" id="183409141">
+													<int key="NSCellFlags">67239424</int>
+													<int key="NSCellFlags2">4194304</int>
+													<string key="NSContents">X11 window focus follows the cursor</string>
+													<reference key="NSSupport" ref="26"/>
+													<reference key="NSControlView" ref="138261120"/>
+													<reference key="NSBackgroundColor" ref="57160303"/>
+													<reference key="NSTextColor" ref="930815747"/>
+												</object>
+											</object>
+											<object class="NSButton" id="128352289">
+												<reference key="NSNextResponder" ref="184765684"/>
+												<int key="NSvFlags">256</int>
+												<string key="NSFrame">{{15, 79}, {402, 18}}</string>
+												<reference key="NSSuperview" ref="184765684"/>
+												<bool key="NSEnabled">YES</bool>
+												<object class="NSButtonCell" key="NSCell" id="556463187">
+													<int key="NSCellFlags">67239424</int>
+													<int key="NSCellFlags2">0</int>
+													<string key="NSContents">Focus On New Windows</string>
+													<reference key="NSSupport" ref="463863101"/>
+													<reference key="NSControlView" ref="128352289"/>
+													<int key="NSButtonFlags">1211912703</int>
+													<int key="NSButtonFlags2">2</int>
+													<reference key="NSAlternateImage" ref="391434389"/>
+													<string key="NSAlternateContents"/>
+													<string key="NSKeyEquivalent"/>
+													<int key="NSPeriodicDelay">200</int>
+													<int key="NSPeriodicInterval">25</int>
+												</object>
+											</object>
+											<object class="NSTextField" id="57161931">
+												<reference key="NSNextResponder" ref="184765684"/>
+												<int key="NSvFlags">256</int>
+												<string key="NSFrame">{{23, 45}, {385, 28}}</string>
+												<reference key="NSSuperview" ref="184765684"/>
+												<bool key="NSEnabled">YES</bool>
+												<object class="NSTextFieldCell" key="NSCell" id="989804990">
+													<int key="NSCellFlags">67239424</int>
+													<int key="NSCellFlags2">4194304</int>
+													<string key="NSContents">When enabled, creation of a new X11 window will cause X11.app to move to the foreground (instead of Finder.app, Terminal.app, etc.)</string>
+													<reference key="NSSupport" ref="26"/>
+													<reference key="NSControlView" ref="57161931"/>
+													<reference key="NSBackgroundColor" ref="57160303"/>
+													<reference key="NSTextColor" ref="930815747"/>
+												</object>
+											</object>
+										</object>
+										<string key="NSFrame">{{10, 33}, {438, 218}}</string>
+									</object>
+									<string key="NSLabel">Windows</string>
+									<reference key="NSColor" ref="57160303"/>
+									<reference key="NSTabView" ref="448510093"/>
+								</object>
+								<object class="NSTabViewItem" id="348328898">
+									<object class="NSView" key="NSView" id="300811574">
+										<nil key="NSNextResponder"/>
+										<int key="NSvFlags">256</int>
+										<object class="NSMutableArray" key="NSSubviews">
+											<bool key="EncodedWithXMLCoder">YES</bool>
+											<object class="NSButton" id="989050925">
+												<reference key="NSNextResponder" ref="300811574"/>
+												<int key="NSvFlags">256</int>
+												<string key="NSFrame">{{18, 182}, {402, 18}}</string>
+												<reference key="NSSuperview" ref="300811574"/>
+												<bool key="NSEnabled">YES</bool>
+												<object class="NSButtonCell" key="NSCell" id="189594322">
+													<int key="NSCellFlags">67239424</int>
+													<int key="NSCellFlags2">0</int>
+													<string key="NSContents">Authenticate connections</string>
+													<reference key="NSSupport" ref="463863101"/>
+													<reference key="NSControlView" ref="989050925"/>
+													<int key="NSButtonFlags">1211912703</int>
+													<int key="NSButtonFlags2">2</int>
+													<reference key="NSAlternateImage" ref="391434389"/>
+													<string key="NSAlternateContents"/>
+													<string key="NSKeyEquivalent"/>
+													<int key="NSPeriodicDelay">200</int>
+													<int key="NSPeriodicInterval">25</int>
+												</object>
+											</object>
+											<object class="NSButton" id="700826966">
+												<reference key="NSNextResponder" ref="300811574"/>
+												<int key="NSvFlags">256</int>
+												<string key="NSFrame">{{18, 105}, {402, 18}}</string>
+												<reference key="NSSuperview" ref="300811574"/>
+												<bool key="NSEnabled">YES</bool>
+												<object class="NSButtonCell" key="NSCell" id="489340979">
+													<int key="NSCellFlags">67239424</int>
+													<int key="NSCellFlags2">0</int>
+													<string key="NSContents">Allow connections from network clients</string>
+													<reference key="NSSupport" ref="463863101"/>
+													<reference key="NSControlView" ref="700826966"/>
+													<int key="NSButtonFlags">1211912703</int>
+													<int key="NSButtonFlags2">2</int>
+													<reference key="NSAlternateImage" ref="391434389"/>
+													<string key="NSAlternateContents"/>
+													<string key="NSKeyEquivalent"/>
+													<int key="NSPeriodicDelay">200</int>
+													<int key="NSPeriodicInterval">25</int>
+												</object>
+											</object>
+											<object class="NSTextField" id="168436707">
+												<reference key="NSNextResponder" ref="300811574"/>
+												<int key="NSvFlags">256</int>
+												<string key="NSFrame">{{36, 134}, {385, 42}}</string>
+												<reference key="NSSuperview" ref="300811574"/>
+												<bool key="NSEnabled">YES</bool>
+												<object class="NSTextFieldCell" key="NSCell" id="53243865">
+													<int key="NSCellFlags">67239424</int>
+													<int key="NSCellFlags2">4194304</int>
+													<string type="base64-UTF8" key="NSContents">TGF1bmNoaW5nIFgxMSB3aWxsIGNyZWF0ZSBYYXV0aG9yaXR5IGFjY2Vzcy1jb250cm9sIGtleXMuIElm
+IHRoZSBzeXN0ZW0ncyBJUCBhZGRyZXNzIGNoYW5nZXMsIHRoZXNlIGtleXMgYmVjb21lIGludmFsaWQg
+d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
+													<reference key="NSSupport" ref="26"/>
+													<reference key="NSControlView" ref="168436707"/>
+													<reference key="NSBackgroundColor" ref="57160303"/>
+													<reference key="NSTextColor" ref="930815747"/>
+												</object>
+											</object>
+											<object class="NSTextField" id="363817195">
+												<reference key="NSNextResponder" ref="300811574"/>
+												<int key="NSvFlags">256</int>
+												<string key="NSFrame">{{36, 57}, {385, 42}}</string>
+												<reference key="NSSuperview" ref="300811574"/>
+												<bool key="NSEnabled">YES</bool>
+												<object class="NSTextFieldCell" key="NSCell" id="390084685">
+													<int key="NSCellFlags">67239424</int>
+													<int key="NSCellFlags2">4194304</int>
+													<string key="NSContents">If enabled, Authenticate connections must also be enabled to ensure system security. When disabled, connections from remote applications are not allowed.</string>
+													<reference key="NSSupport" ref="26"/>
+													<reference key="NSControlView" ref="363817195"/>
+													<reference key="NSBackgroundColor" ref="57160303"/>
+													<reference key="NSTextColor" ref="930815747"/>
+												</object>
+											</object>
+											<object class="NSTextField" id="223835729">
+												<reference key="NSNextResponder" ref="300811574"/>
+												<int key="NSvFlags">256</int>
+												<string key="NSFrame">{{20, -44}, {404, 14}}</string>
+												<reference key="NSSuperview" ref="300811574"/>
+												<bool key="NSEnabled">YES</bool>
+												<object class="NSTextFieldCell" key="NSCell" id="283628678">
+													<int key="NSCellFlags">67239424</int>
+													<int key="NSCellFlags2">4194304</int>
+													<string key="NSContents">These options take effect when X11 is next launched.</string>
+													<reference key="NSSupport" ref="26"/>
+													<reference key="NSControlView" ref="223835729"/>
+													<reference key="NSBackgroundColor" ref="57160303"/>
+													<reference key="NSTextColor" ref="930815747"/>
+												</object>
+											</object>
+										</object>
+										<string key="NSFrame">{{10, 33}, {438, 218}}</string>
+									</object>
+									<string key="NSLabel">Security</string>
+									<reference key="NSColor" ref="57160303"/>
+									<reference key="NSTabView" ref="448510093"/>
+								</object>
+							</object>
+							<reference key="NSSelectedTabViewItem" ref="287591690"/>
+							<reference key="NSFont" ref="463863101"/>
+							<int key="NSTvFlags">0</int>
+							<bool key="NSAllowTruncatedLabels">YES</bool>
+							<bool key="NSDrawsBackground">YES</bool>
+							<object class="NSMutableArray" key="NSSubviews">
+								<bool key="EncodedWithXMLCoder">YES</bool>
+								<reference ref="596750588"/>
+							</object>
+						</object>
+					</object>
+					<string key="NSFrameSize">{484, 280}</string>
+				</object>
+				<string key="NSScreenRect">{{0, 0}, {1280, 938}}</string>
+				<string key="NSMinSize">{213, 129}</string>
+				<string key="NSMaxSize">{3.40282e+38, 3.40282e+38}</string>
+				<string key="NSFrameAutosaveName">x11_prefs</string>
+			</object>
+			<object class="NSWindowTemplate" id="604417141">
+				<int key="NSWindowStyleMask">11</int>
+				<int key="NSWindowBacking">2</int>
+				<string key="NSWindowRect">{{302, 400}, {454, 311}}</string>
+				<int key="NSWTFlags">1350041600</int>
+				<string key="NSWindowTitle">X11 Application Menu</string>
+				<string key="NSWindowClass">NSPanel</string>
+				<object class="NSMutableString" key="NSViewClass">
+					<characters key="NS.bytes">View</characters>
+				</object>
+				<string key="NSWindowContentMaxSize">{10000, 10000}</string>
+				<string key="NSWindowContentMinSize">{320, 240}</string>
+				<object class="NSView" key="NSWindowView" id="85544634">
+					<nil key="NSNextResponder"/>
+					<int key="NSvFlags">256</int>
+					<object class="NSMutableArray" key="NSSubviews">
+						<bool key="EncodedWithXMLCoder">YES</bool>
+						<object class="NSButton" id="671954382">
+							<reference key="NSNextResponder" ref="85544634"/>
+							<int key="NSvFlags">265</int>
+							<string key="NSFrame">{{340, 231}, {100, 32}}</string>
+							<reference key="NSSuperview" ref="85544634"/>
+							<bool key="NSEnabled">YES</bool>
+							<object class="NSButtonCell" key="NSCell" id="143554520">
+								<int key="NSCellFlags">67239424</int>
+								<int key="NSCellFlags2">137887744</int>
+								<string key="NSContents">Duplicate</string>
+								<reference key="NSSupport" ref="463863101"/>
+								<reference key="NSControlView" ref="671954382"/>
+								<int key="NSButtonFlags">-2038284033</int>
+								<int key="NSButtonFlags2">1</int>
+								<object class="NSFont" key="NSAlternateImage" id="549406736">
+									<string key="NSName">Helvetica</string>
+									<double key="NSSize">1.300000e+01</double>
+									<int key="NSfFlags">16</int>
+								</object>
+								<object class="NSMutableString" key="NSAlternateContents">
+									<characters key="NS.bytes"/>
+								</object>
+								<object class="NSMutableString" key="NSKeyEquivalent">
+									<characters key="NS.bytes"/>
+								</object>
+								<int key="NSPeriodicDelay">200</int>
+								<int key="NSPeriodicInterval">25</int>
+							</object>
+						</object>
+						<object class="NSButton" id="492358940">
+							<reference key="NSNextResponder" ref="85544634"/>
+							<int key="NSvFlags">265</int>
+							<string key="NSFrame">{{340, 199}, {100, 32}}</string>
+							<reference key="NSSuperview" ref="85544634"/>
+							<bool key="NSEnabled">YES</bool>
+							<object class="NSButtonCell" key="NSCell" id="8201128">
+								<int key="NSCellFlags">67239424</int>
+								<int key="NSCellFlags2">137887744</int>
+								<string key="NSContents">Remove</string>
+								<reference key="NSSupport" ref="463863101"/>
+								<reference key="NSControlView" ref="492358940"/>
+								<int key="NSButtonFlags">-2038284033</int>
+								<int key="NSButtonFlags2">1</int>
+								<reference key="NSAlternateImage" ref="549406736"/>
+								<object class="NSMutableString" key="NSAlternateContents">
+									<characters key="NS.bytes"/>
+								</object>
+								<object class="NSMutableString" key="NSKeyEquivalent">
+									<characters key="NS.bytes"/>
+								</object>
+								<int key="NSPeriodicDelay">200</int>
+								<int key="NSPeriodicInterval">25</int>
+							</object>
+						</object>
+						<object class="NSScrollView" id="1063387772">
+							<reference key="NSNextResponder" ref="85544634"/>
+							<int key="NSvFlags">274</int>
+							<object class="NSMutableArray" key="NSSubviews">
+								<bool key="EncodedWithXMLCoder">YES</bool>
+								<object class="NSClipView" id="580565898">
+									<reference key="NSNextResponder" ref="1063387772"/>
+									<int key="NSvFlags">2304</int>
+									<object class="NSMutableArray" key="NSSubviews">
+										<bool key="EncodedWithXMLCoder">YES</bool>
+										<object class="NSTableView" id="905092943">
+											<reference key="NSNextResponder" ref="580565898"/>
+											<int key="NSvFlags">256</int>
+											<string key="NSFrameSize">{301, 198}</string>
+											<reference key="NSSuperview" ref="580565898"/>
+											<bool key="NSEnabled">YES</bool>
+											<object class="NSTableHeaderView" key="NSHeaderView" id="792419186">
+												<reference key="NSNextResponder" ref="672307654"/>
+												<int key="NSvFlags">256</int>
+												<string key="NSFrameSize">{301, 17}</string>
+												<reference key="NSSuperview" ref="672307654"/>
+												<reference key="NSTableView" ref="905092943"/>
+											</object>
+											<object class="_NSCornerView" key="NSCornerView" id="898633680">
+												<reference key="NSNextResponder" ref="1063387772"/>
+												<int key="NSvFlags">256</int>
+												<string key="NSFrame">{{302, 0}, {16, 17}}</string>
+												<reference key="NSSuperview" ref="1063387772"/>
+											</object>
+											<object class="NSMutableArray" key="NSTableColumns">
+												<bool key="EncodedWithXMLCoder">YES</bool>
+												<object class="NSTableColumn" id="84282687">
+													<double key="NSWidth">9.900000e+01</double>
+													<double key="NSMinWidth">4.000000e+01</double>
+													<double key="NSMaxWidth">1.000000e+03</double>
+													<object class="NSTableHeaderCell" key="NSHeaderCell">
+														<int key="NSCellFlags">75628032</int>
+														<int key="NSCellFlags2">0</int>
+														<string key="NSContents">Name</string>
+														<reference key="NSSupport" ref="26"/>
+														<object class="NSColor" key="NSBackgroundColor" id="113872566">
+															<int key="NSColorSpace">3</int>
+															<bytes key="NSWhite">MC4zMzMzMzI5OQA</bytes>
+														</object>
+														<object class="NSColor" key="NSTextColor" id="249576247">
+															<int key="NSColorSpace">6</int>
+															<string key="NSCatalogName">System</string>
+															<string key="NSColorName">headerTextColor</string>
+															<reference key="NSColor" ref="214098874"/>
+														</object>
+													</object>
+													<object class="NSTextFieldCell" key="NSDataCell" id="432610585">
+														<int key="NSCellFlags">338820672</int>
+														<int key="NSCellFlags2">1024</int>
+														<string key="NSContents">Text Cell</string>
+														<reference key="NSSupport" ref="463863101"/>
+														<reference key="NSControlView" ref="905092943"/>
+														<object class="NSColor" key="NSBackgroundColor" id="822946413">
+															<int key="NSColorSpace">3</int>
+															<bytes key="NSWhite">MQA</bytes>
+														</object>
+														<reference key="NSTextColor" ref="930815747"/>
+													</object>
+													<int key="NSResizingMask">3</int>
+													<bool key="NSIsResizeable">YES</bool>
+													<bool key="NSIsEditable">YES</bool>
+													<reference key="NSTableView" ref="905092943"/>
+												</object>
+												<object class="NSTableColumn" id="938444323">
+													<double key="NSWidth">1.217310e+02</double>
+													<double key="NSMinWidth">6.273100e+01</double>
+													<double key="NSMaxWidth">1.000000e+03</double>
+													<object class="NSTableHeaderCell" key="NSHeaderCell">
+														<int key="NSCellFlags">75628032</int>
+														<int key="NSCellFlags2">0</int>
+														<string key="NSContents">Command</string>
+														<reference key="NSSupport" ref="26"/>
+														<reference key="NSBackgroundColor" ref="113872566"/>
+														<reference key="NSTextColor" ref="249576247"/>
+													</object>
+													<object class="NSTextFieldCell" key="NSDataCell" id="825378892">
+														<int key="NSCellFlags">338820672</int>
+														<int key="NSCellFlags2">1024</int>
+														<string key="NSContents">Text Cell</string>
+														<reference key="NSSupport" ref="463863101"/>
+														<reference key="NSControlView" ref="905092943"/>
+														<reference key="NSBackgroundColor" ref="822946413"/>
+														<reference key="NSTextColor" ref="930815747"/>
+													</object>
+													<int key="NSResizingMask">3</int>
+													<bool key="NSIsResizeable">YES</bool>
+													<bool key="NSIsEditable">YES</bool>
+													<reference key="NSTableView" ref="905092943"/>
+												</object>
+												<object class="NSTableColumn" id="242608782">
+													<double key="NSWidth">7.100000e+01</double>
+													<double key="NSMinWidth">1.000000e+01</double>
+													<double key="NSMaxWidth">1.000000e+03</double>
+													<object class="NSTableHeaderCell" key="NSHeaderCell">
+														<int key="NSCellFlags">67239424</int>
+														<int key="NSCellFlags2">0</int>
+														<string key="NSContents">Shortcut</string>
+														<reference key="NSSupport" ref="26"/>
+														<object class="NSColor" key="NSBackgroundColor">
+															<int key="NSColorSpace">6</int>
+															<string key="NSCatalogName">System</string>
+															<string key="NSColorName">headerColor</string>
+															<reference key="NSColor" ref="822946413"/>
+														</object>
+														<reference key="NSTextColor" ref="249576247"/>
+													</object>
+													<object class="NSTextFieldCell" key="NSDataCell" id="34714764">
+														<int key="NSCellFlags">338820672</int>
+														<int key="NSCellFlags2">1024</int>
+														<string key="NSContents">Text Cell</string>
+														<object class="NSFont" key="NSSupport">
+															<string key="NSName">LucidaGrande</string>
+															<double key="NSSize">1.200000e+01</double>
+															<int key="NSfFlags">16</int>
+														</object>
+														<reference key="NSControlView" ref="905092943"/>
+														<bool key="NSDrawsBackground">YES</bool>
+														<object class="NSColor" key="NSBackgroundColor" id="812484075">
+															<int key="NSColorSpace">6</int>
+															<string key="NSCatalogName">System</string>
+															<string key="NSColorName">controlBackgroundColor</string>
+															<reference key="NSColor" ref="590688762"/>
+														</object>
+														<reference key="NSTextColor" ref="930815747"/>
+													</object>
+													<int key="NSResizingMask">3</int>
+													<bool key="NSIsResizeable">YES</bool>
+													<bool key="NSIsEditable">YES</bool>
+													<reference key="NSTableView" ref="905092943"/>
+												</object>
+											</object>
+											<double key="NSIntercellSpacingWidth">3.000000e+00</double>
+											<double key="NSIntercellSpacingHeight">2.000000e+00</double>
+											<reference key="NSBackgroundColor" ref="822946413"/>
+											<object class="NSColor" key="NSGridColor">
+												<int key="NSColorSpace">6</int>
+												<string key="NSCatalogName">System</string>
+												<string key="NSColorName">gridColor</string>
+												<object class="NSColor" key="NSColor">
+													<int key="NSColorSpace">3</int>
+													<bytes key="NSWhite">MC41AA</bytes>
+												</object>
+											</object>
+											<double key="NSRowHeight">1.700000e+01</double>
+											<int key="NSTvFlags">1379958784</int>
+											<int key="NSColumnAutoresizingStyle">1</int>
+											<int key="NSDraggingSourceMaskForLocal">-1</int>
+											<int key="NSDraggingSourceMaskForNonLocal">0</int>
+											<bool key="NSAllowsTypeSelect">YES</bool>
+										</object>
+									</object>
+									<string key="NSFrame">{{1, 17}, {301, 198}}</string>
+									<reference key="NSSuperview" ref="1063387772"/>
+									<reference key="NSNextKeyView" ref="905092943"/>
+									<reference key="NSDocView" ref="905092943"/>
+									<reference key="NSBGColor" ref="812484075"/>
+									<int key="NScvFlags">4</int>
+								</object>
+								<object class="NSScroller" id="842897584">
+									<reference key="NSNextResponder" ref="1063387772"/>
+									<int key="NSvFlags">256</int>
+									<string key="NSFrame">{{302, 17}, {15, 198}}</string>
+									<reference key="NSSuperview" ref="1063387772"/>
+									<reference key="NSTarget" ref="1063387772"/>
+									<string key="NSAction">_doScroller:</string>
+									<double key="NSPercent">9.949238e-01</double>
+								</object>
+								<object class="NSScroller" id="17278747">
+									<reference key="NSNextResponder" ref="1063387772"/>
+									<int key="NSvFlags">256</int>
+									<string key="NSFrame">{{1, 215}, {301, 15}}</string>
+									<reference key="NSSuperview" ref="1063387772"/>
+									<int key="NSsFlags">1</int>
+									<reference key="NSTarget" ref="1063387772"/>
+									<string key="NSAction">_doScroller:</string>
+									<double key="NSPercent">6.885246e-01</double>
+								</object>
+								<object class="NSClipView" id="672307654">
+									<reference key="NSNextResponder" ref="1063387772"/>
+									<int key="NSvFlags">2304</int>
+									<object class="NSMutableArray" key="NSSubviews">
+										<bool key="EncodedWithXMLCoder">YES</bool>
+										<reference ref="792419186"/>
+									</object>
+									<string key="NSFrame">{{1, 0}, {301, 17}}</string>
+									<reference key="NSSuperview" ref="1063387772"/>
+									<reference key="NSNextKeyView" ref="792419186"/>
+									<reference key="NSDocView" ref="792419186"/>
+									<reference key="NSBGColor" ref="812484075"/>
+									<int key="NScvFlags">4</int>
+								</object>
+								<reference ref="898633680"/>
+							</object>
+							<string key="NSFrame">{{20, 60}, {318, 231}}</string>
+							<reference key="NSSuperview" ref="85544634"/>
+							<reference key="NSNextKeyView" ref="580565898"/>
+							<int key="NSsFlags">50</int>
+							<reference key="NSVScroller" ref="842897584"/>
+							<reference key="NSHScroller" ref="17278747"/>
+							<reference key="NSContentView" ref="580565898"/>
+							<reference key="NSHeaderClipView" ref="672307654"/>
+							<reference key="NSCornerView" ref="898633680"/>
+							<bytes key="NSScrollAmts">QSAAAEEgAABBmAAAQZgAAA</bytes>
+						</object>
+						<object class="NSButton" id="758204686">
+							<reference key="NSNextResponder" ref="85544634"/>
+							<int key="NSvFlags">265</int>
+							<string key="NSFrame">{{340, 263}, {100, 32}}</string>
+							<reference key="NSSuperview" ref="85544634"/>
+							<bool key="NSEnabled">YES</bool>
+							<object class="NSButtonCell" key="NSCell" id="1025474039">
+								<int key="NSCellFlags">-2080244224</int>
+								<int key="NSCellFlags2">137887744</int>
+								<string key="NSContents">Add Item</string>
+								<reference key="NSSupport" ref="463863101"/>
+								<reference key="NSControlView" ref="758204686"/>
+								<int key="NSButtonFlags">-2038284033</int>
+								<int key="NSButtonFlags2">1</int>
+								<reference key="NSAlternateImage" ref="549406736"/>
+								<object class="NSMutableString" key="NSAlternateContents">
+									<characters key="NS.bytes"/>
+								</object>
+								<object class="NSMutableString" key="NSKeyEquivalent">
+									<characters key="NS.bytes"/>
+								</object>
+								<int key="NSPeriodicDelay">200</int>
+								<int key="NSPeriodicInterval">25</int>
+							</object>
+						</object>
+						<object class="NSButton" id="125703429">
+							<reference key="NSNextResponder" ref="85544634"/>
+							<int key="NSvFlags">257</int>
+							<string key="NSFrame">{{356, 12}, {84, 32}}</string>
+							<reference key="NSSuperview" ref="85544634"/>
+							<bool key="NSEnabled">YES</bool>
+							<object class="NSButtonCell" key="NSCell" id="892296813">
+								<int key="NSCellFlags">-2080244224</int>
+								<int key="NSCellFlags2">137887744</int>
+								<string key="NSContents">Cancel</string>
+								<reference key="NSSupport" ref="463863101"/>
+								<reference key="NSControlView" ref="125703429"/>
+								<int key="NSButtonFlags">-2038284033</int>
+								<int key="NSButtonFlags2">1</int>
+								<reference key="NSAlternateImage" ref="549406736"/>
+								<object class="NSMutableString" key="NSAlternateContents">
+									<characters key="NS.bytes"/>
+								</object>
+								<object class="NSMutableString" key="NSKeyEquivalent">
+									<characters key="NS.bytes"/>
+								</object>
+								<int key="NSPeriodicDelay">200</int>
+								<int key="NSPeriodicInterval">25</int>
+							</object>
+						</object>
+						<object class="NSButton" id="724002248">
+							<reference key="NSNextResponder" ref="85544634"/>
+							<int key="NSvFlags">257</int>
+							<string key="NSFrame">{{272, 12}, {84, 32}}</string>
+							<reference key="NSSuperview" ref="85544634"/>
+							<bool key="NSEnabled">YES</bool>
+							<object class="NSButtonCell" key="NSCell" id="809610613">
+								<int key="NSCellFlags">-2080244224</int>
+								<int key="NSCellFlags2">137887744</int>
+								<string key="NSContents">Done</string>
+								<reference key="NSSupport" ref="463863101"/>
+								<reference key="NSControlView" ref="724002248"/>
+								<int key="NSButtonFlags">-2038284033</int>
+								<int key="NSButtonFlags2">1</int>
+								<reference key="NSAlternateImage" ref="549406736"/>
+								<string key="NSAlternateContents"/>
+								<object class="NSMutableString" key="NSKeyEquivalent">
+									<characters key="NS.bytes"/>
+								</object>
+								<int key="NSPeriodicDelay">200</int>
+								<int key="NSPeriodicInterval">25</int>
+							</object>
+						</object>
+					</object>
+					<string key="NSFrameSize">{454, 311}</string>
+				</object>
+				<string key="NSScreenRect">{{0, 0}, {1280, 938}}</string>
+				<string key="NSMinSize">{320, 262}</string>
+				<string key="NSFrameAutosaveName">x11_apps</string>
+			</object>
+			<object class="NSMenu" id="294137138">
+				<string key="NSTitle">Menu</string>
+				<object class="NSMutableArray" key="NSMenuItems">
+					<bool key="EncodedWithXMLCoder">YES</bool>
+					<object class="NSMenuItem" id="318286212">
+						<reference key="NSMenu" ref="294137138"/>
+						<bool key="NSIsDisabled">YES</bool>
+						<bool key="NSIsSeparator">YES</bool>
+						<string key="NSTitle"/>
+						<string key="NSKeyEquiv"/>
+						<int key="NSKeyEquivModMask">1048576</int>
+						<int key="NSMnemonicLoc">2147483647</int>
+						<reference key="NSOnImage" ref="531645050"/>
+						<reference key="NSMixedImage" ref="351811234"/>
+					</object>
+					<object class="NSMenuItem" id="511651072">
+						<reference key="NSMenu" ref="294137138"/>
+						<string key="NSTitle">Applications</string>
+						<string key="NSKeyEquiv"/>
+						<int key="NSKeyEquivModMask">1048576</int>
+						<int key="NSMnemonicLoc">2147483647</int>
+						<reference key="NSOnImage" ref="531645050"/>
+						<reference key="NSMixedImage" ref="351811234"/>
+						<string key="NSAction">submenuAction:</string>
+						<object class="NSMenu" key="NSSubmenu" id="48278059">
+							<string key="NSTitle">Applications</string>
+							<object class="NSMutableArray" key="NSMenuItems">
+								<bool key="EncodedWithXMLCoder">YES</bool>
+								<object class="NSMenuItem" id="563798000">
+									<reference key="NSMenu" ref="48278059"/>
+									<bool key="NSIsDisabled">YES</bool>
+									<bool key="NSIsSeparator">YES</bool>
+									<string key="NSTitle"/>
+									<string key="NSKeyEquiv"/>
+									<int key="NSKeyEquivModMask">1048576</int>
+									<int key="NSMnemonicLoc">2147483647</int>
+									<reference key="NSOnImage" ref="531645050"/>
+									<reference key="NSMixedImage" ref="351811234"/>
+								</object>
+								<object class="NSMenuItem" id="1032342329">
+									<reference key="NSMenu" ref="48278059"/>
+									<string type="base64-UTF8" key="NSTitle">Q3VzdG9taXpl4oCmA</string>
+									<string key="NSKeyEquiv"/>
+									<int key="NSKeyEquivModMask">1048576</int>
+									<int key="NSMnemonicLoc">2147483647</int>
+									<reference key="NSOnImage" ref="531645050"/>
+									<reference key="NSMixedImage" ref="351811234"/>
+								</object>
+							</object>
+						</object>
+					</object>
+				</object>
+				<string key="NSName"/>
+			</object>
+			<object class="NSCustomObject" id="556755705">
+				<string key="NSClassName">SUUpdater</string>
+			</object>
+		</object>
+		<object class="IBObjectContainer" key="IBDocument.Objects">
+			<object class="NSMutableArray" key="connectionRecords">
+				<bool key="EncodedWithXMLCoder">YES</bool>
+				<object class="IBConnectionRecord">
+					<object class="IBActionConnection" key="connection">
+						<string key="label">cut:</string>
+						<reference key="source" ref="941939442"/>
+						<reference key="destination" ref="581727829"/>
+					</object>
+					<int key="connectionID">175</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBActionConnection" key="connection">
+						<string key="label">paste:</string>
+						<reference key="source" ref="941939442"/>
+						<reference key="destination" ref="924678073"/>
+					</object>
+					<int key="connectionID">176</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBActionConnection" key="connection">
+						<string key="label">redo:</string>
+						<reference key="source" ref="941939442"/>
+						<reference key="destination" ref="535038564"/>
+					</object>
+					<int key="connectionID">178</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBActionConnection" key="connection">
+						<string key="label">selectAll:</string>
+						<reference key="source" ref="941939442"/>
+						<reference key="destination" ref="322866464"/>
+					</object>
+					<int key="connectionID">179</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBActionConnection" key="connection">
+						<string key="label">undo:</string>
+						<reference key="source" ref="941939442"/>
+						<reference key="destination" ref="1010221707"/>
+					</object>
+					<int key="connectionID">180</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBActionConnection" key="connection">
+						<string key="label">copy:</string>
+						<reference key="source" ref="941939442"/>
+						<reference key="destination" ref="185296989"/>
+					</object>
+					<int key="connectionID">181</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBActionConnection" key="connection">
+						<string key="label">delete:</string>
+						<reference key="source" ref="941939442"/>
+						<reference key="destination" ref="994817848"/>
+					</object>
+					<int key="connectionID">195</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBActionConnection" key="connection">
+						<string key="label">minimize_window:</string>
+						<reference key="source" ref="485884620"/>
+						<reference key="destination" ref="677652931"/>
+					</object>
+					<int key="connectionID">202</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBActionConnection" key="connection">
+						<string key="label">close_window:</string>
+						<reference key="source" ref="485884620"/>
+						<reference key="destination" ref="984461797"/>
+					</object>
+					<int key="connectionID">205</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBActionConnection" key="connection">
+						<string key="label">zoom_window:</string>
+						<reference key="source" ref="485884620"/>
+						<reference key="destination" ref="1066447520"/>
+					</object>
+					<int key="connectionID">206</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBActionConnection" key="connection">
+						<string key="label">bring_to_front:</string>
+						<reference key="source" ref="485884620"/>
+						<reference key="destination" ref="276216762"/>
+					</object>
+					<int key="connectionID">207</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBActionConnection" key="connection">
+						<string key="label">hideOtherApplications:</string>
+						<reference key="source" ref="815810918"/>
+						<reference key="destination" ref="206802571"/>
+					</object>
+					<int key="connectionID">263</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBOutletConnection" key="connection">
+						<string key="label">apps_separator</string>
+						<reference key="source" ref="485884620"/>
+						<reference key="destination" ref="390088328"/>
+					</object>
+					<int key="connectionID">273</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBOutletConnection" key="connection">
+						<string key="label">apps_table</string>
+						<reference key="source" ref="485884620"/>
+						<reference key="destination" ref="905092943"/>
+					</object>
+					<int key="connectionID">301</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBActionConnection" key="connection">
+						<string key="label">apps_table_done:</string>
+						<reference key="source" ref="485884620"/>
+						<reference key="destination" ref="724002248"/>
+					</object>
+					<int key="connectionID">302</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBActionConnection" key="connection">
+						<string key="label">apps_table_delete:</string>
+						<reference key="source" ref="485884620"/>
+						<reference key="destination" ref="492358940"/>
+					</object>
+					<int key="connectionID">303</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBActionConnection" key="connection">
+						<string key="label">apps_table_duplicate:</string>
+						<reference key="source" ref="485884620"/>
+						<reference key="destination" ref="671954382"/>
+					</object>
+					<int key="connectionID">304</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBActionConnection" key="connection">
+						<string key="label">apps_table_show:</string>
+						<reference key="source" ref="485884620"/>
+						<reference key="destination" ref="1065386165"/>
+					</object>
+					<int key="connectionID">308</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBActionConnection" key="connection">
+						<string key="label">apps_table_cancel:</string>
+						<reference key="source" ref="485884620"/>
+						<reference key="destination" ref="125703429"/>
+					</object>
+					<int key="connectionID">309</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBActionConnection" key="connection">
+						<string key="label">apps_table_new:</string>
+						<reference key="source" ref="485884620"/>
+						<reference key="destination" ref="758204686"/>
+					</object>
+					<int key="connectionID">311</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBActionConnection" key="connection">
+						<string key="label">prefs_show:</string>
+						<reference key="source" ref="485884620"/>
+						<reference key="destination" ref="386173216"/>
+					</object>
+					<int key="connectionID">318</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBOutletConnection" key="connection">
+						<string key="label">x11_about_item</string>
+						<reference key="source" ref="485884620"/>
+						<reference key="destination" ref="139290918"/>
+					</object>
+					<int key="connectionID">321</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBOutletConnection" key="connection">
+						<string key="label">enable_auth</string>
+						<reference key="source" ref="485884620"/>
+						<reference key="destination" ref="989050925"/>
+					</object>
+					<int key="connectionID">387</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBOutletConnection" key="connection">
+						<string key="label">enable_tcp</string>
+						<reference key="source" ref="485884620"/>
+						<reference key="destination" ref="700826966"/>
+					</object>
+					<int key="connectionID">388</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBOutletConnection" key="connection">
+						<string key="label">depth</string>
+						<reference key="source" ref="485884620"/>
+						<reference key="destination" ref="709074847"/>
+					</object>
+					<int key="connectionID">389</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBOutletConnection" key="connection">
+						<string key="label">use_sysbeep</string>
+						<reference key="source" ref="485884620"/>
+						<reference key="destination" ref="418227126"/>
+					</object>
+					<int key="connectionID">390</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBOutletConnection" key="connection">
+						<string key="label">fake_buttons</string>
+						<reference key="source" ref="485884620"/>
+						<reference key="destination" ref="119157981"/>
+					</object>
+					<int key="connectionID">391</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBOutletConnection" key="connection">
+						<string key="label">sync_keymap</string>
+						<reference key="source" ref="485884620"/>
+						<reference key="destination" ref="179949713"/>
+					</object>
+					<int key="connectionID">392</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBOutletConnection" key="connection">
+						<string key="label">enable_keyequivs</string>
+						<reference key="source" ref="485884620"/>
+						<reference key="destination" ref="842100515"/>
+					</object>
+					<int key="connectionID">393</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBActionConnection" key="connection">
+						<string key="label">prefs_changed:</string>
+						<reference key="source" ref="485884620"/>
+						<reference key="destination" ref="119157981"/>
+					</object>
+					<int key="connectionID">394</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBActionConnection" key="connection">
+						<string key="label">prefs_changed:</string>
+						<reference key="source" ref="485884620"/>
+						<reference key="destination" ref="179949713"/>
+					</object>
+					<int key="connectionID">395</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBActionConnection" key="connection">
+						<string key="label">prefs_changed:</string>
+						<reference key="source" ref="485884620"/>
+						<reference key="destination" ref="842100515"/>
+					</object>
+					<int key="connectionID">396</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBActionConnection" key="connection">
+						<string key="label">prefs_changed:</string>
+						<reference key="source" ref="485884620"/>
+						<reference key="destination" ref="418227126"/>
+					</object>
+					<int key="connectionID">397</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBActionConnection" key="connection">
+						<string key="label">prefs_changed:</string>
+						<reference key="source" ref="485884620"/>
+						<reference key="destination" ref="709074847"/>
+					</object>
+					<int key="connectionID">398</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBActionConnection" key="connection">
+						<string key="label">prefs_changed:</string>
+						<reference key="source" ref="485884620"/>
+						<reference key="destination" ref="989050925"/>
+					</object>
+					<int key="connectionID">399</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBActionConnection" key="connection">
+						<string key="label">prefs_changed:</string>
+						<reference key="source" ref="485884620"/>
+						<reference key="destination" ref="700826966"/>
+					</object>
+					<int key="connectionID">401</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBOutletConnection" key="connection">
+						<string key="label">prefs_panel</string>
+						<reference key="source" ref="485884620"/>
+						<reference key="destination" ref="124913468"/>
+					</object>
+					<int key="connectionID">402</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBActionConnection" key="connection">
+						<string key="label">x11_help:</string>
+						<reference key="source" ref="485884620"/>
+						<reference key="destination" ref="504984881"/>
+					</object>
+					<int key="connectionID">422</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBOutletConnection" key="connection">
+						<string key="label">dockMenu</string>
+						<reference key="source" ref="815810918"/>
+						<reference key="destination" ref="294137138"/>
+					</object>
+					<int key="connectionID">426</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBOutletConnection" key="connection">
+						<string key="label">dock_menu</string>
+						<reference key="source" ref="485884620"/>
+						<reference key="destination" ref="294137138"/>
+					</object>
+					<int key="connectionID">428</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBOutletConnection" key="connection">
+						<string key="label">delegate</string>
+						<reference key="source" ref="815810918"/>
+						<reference key="destination" ref="485884620"/>
+					</object>
+					<int key="connectionID">429</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBActionConnection" key="connection">
+						<string key="label">hide:</string>
+						<reference key="source" ref="815810918"/>
+						<reference key="destination" ref="301008465"/>
+					</object>
+					<int key="connectionID">430</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBActionConnection" key="connection">
+						<string key="label">unhideAllApplications:</string>
+						<reference key="source" ref="815810918"/>
+						<reference key="destination" ref="1023546148"/>
+					</object>
+					<int key="connectionID">431</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBActionConnection" key="connection">
+						<string key="label">orderFrontStandardAboutPanel:</string>
+						<reference key="source" ref="815810918"/>
+						<reference key="destination" ref="139290918"/>
+					</object>
+					<int key="connectionID">433</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBOutletConnection" key="connection">
+						<string key="label">dock_apps_menu</string>
+						<reference key="source" ref="485884620"/>
+						<reference key="destination" ref="48278059"/>
+					</object>
+					<int key="connectionID">530</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBOutletConnection" key="connection">
+						<string key="label">dock_window_separator</string>
+						<reference key="source" ref="485884620"/>
+						<reference key="destination" ref="318286212"/>
+					</object>
+					<int key="connectionID">531</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBActionConnection" key="connection">
+						<string key="label">apps_table_show:</string>
+						<reference key="source" ref="485884620"/>
+						<reference key="destination" ref="1032342329"/>
+					</object>
+					<int key="connectionID">534</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBActionConnection" key="connection">
+						<string key="label">next_window:</string>
+						<reference key="source" ref="485884620"/>
+						<reference key="destination" ref="1036389925"/>
+					</object>
+					<int key="connectionID">539</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBActionConnection" key="connection">
+						<string key="label">previous_window:</string>
+						<reference key="source" ref="485884620"/>
+						<reference key="destination" ref="369641893"/>
+					</object>
+					<int key="connectionID">540</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBOutletConnection" key="connection">
+						<string key="label">enable_fullscreen</string>
+						<reference key="source" ref="485884620"/>
+						<reference key="destination" ref="477203622"/>
+					</object>
+					<int key="connectionID">546</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBActionConnection" key="connection">
+						<string key="label">enable_fullscreen_changed:</string>
+						<reference key="source" ref="485884620"/>
+						<reference key="destination" ref="477203622"/>
+					</object>
+					<int key="connectionID">547</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBActionConnection" key="connection">
+						<string key="label">toggle_fullscreen:</string>
+						<reference key="source" ref="485884620"/>
+						<reference key="destination" ref="6876565"/>
+					</object>
+					<int key="connectionID">548</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBOutletConnection" key="connection">
+						<string key="label">toggle_fullscreen_item</string>
+						<reference key="source" ref="485884620"/>
+						<reference key="destination" ref="6876565"/>
+					</object>
+					<int key="connectionID">549</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBOutletConnection" key="connection">
+						<string key="label">window_separator</string>
+						<reference key="source" ref="485884620"/>
+						<reference key="destination" ref="444952046"/>
+					</object>
+					<int key="connectionID">300331</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBOutletConnection" key="connection">
+						<string key="label">menu</string>
+						<reference key="source" ref="815810918"/>
+						<reference key="destination" ref="524015605"/>
+					</object>
+					<int key="connectionID">300334</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBActionConnection" key="connection">
+						<string key="label">terminate:</string>
+						<reference key="source" ref="815810918"/>
+						<reference key="destination" ref="274138642"/>
+					</object>
+					<int key="connectionID">300336</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBActionConnection" key="connection">
+						<string key="label">prefs_changed:</string>
+						<reference key="source" ref="485884620"/>
+						<reference key="destination" ref="657659108"/>
+					</object>
+					<int key="connectionID">300389</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBActionConnection" key="connection">
+						<string key="label">prefs_changed:</string>
+						<reference key="source" ref="485884620"/>
+						<reference key="destination" ref="992839333"/>
+					</object>
+					<int key="connectionID">300390</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBActionConnection" key="connection">
+						<string key="label">prefs_changed:</string>
+						<reference key="source" ref="485884620"/>
+						<reference key="destination" ref="128352289"/>
+					</object>
+					<int key="connectionID">300391</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBOutletConnection" key="connection">
+						<string key="label">click_through</string>
+						<reference key="source" ref="485884620"/>
+						<reference key="destination" ref="657659108"/>
+					</object>
+					<int key="connectionID">300392</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBOutletConnection" key="connection">
+						<string key="label">focus_follows_mouse</string>
+						<reference key="source" ref="485884620"/>
+						<reference key="destination" ref="992839333"/>
+					</object>
+					<int key="connectionID">300393</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBOutletConnection" key="connection">
+						<string key="label">focus_on_new_window</string>
+						<reference key="source" ref="485884620"/>
+						<reference key="destination" ref="128352289"/>
+					</object>
+					<int key="connectionID">300394</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBActionConnection" key="connection">
+						<string key="label">checkForUpdates:</string>
+						<reference key="source" ref="556755705"/>
+						<reference key="destination" ref="858487910"/>
+					</object>
+					<int key="connectionID">300397</int>
+				</object>
+			</object>
+			<object class="IBMutableOrderedSet" key="objectRecords">
+				<object class="NSArray" key="orderedObjects">
+					<bool key="EncodedWithXMLCoder">YES</bool>
+					<object class="IBObjectRecord">
+						<int key="objectID">0</int>
+						<object class="NSArray" key="object" id="330408435">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+						</object>
+						<reference key="children" ref="904585544"/>
+						<nil key="parent"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">-2</int>
+						<reference key="object" ref="815810918"/>
+						<reference key="parent" ref="330408435"/>
+						<string type="base64-UTF8" key="objectName">RmlsZSdzIE93bmVyA</string>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">-1</int>
+						<reference key="object" ref="941939442"/>
+						<reference key="parent" ref="330408435"/>
+						<string key="objectName">First Responder</string>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">-3</int>
+						<reference key="object" ref="951368722"/>
+						<reference key="parent" ref="330408435"/>
+						<string key="objectName">Application</string>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">29</int>
+						<reference key="object" ref="524015605"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="931553638"/>
+							<reference ref="365880285"/>
+							<reference ref="200491363"/>
+							<reference ref="868031522"/>
+							<reference ref="551174276"/>
+						</object>
+						<reference key="parent" ref="330408435"/>
+						<string key="objectName">MainMenu</string>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">19</int>
+						<reference key="object" ref="931553638"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="96874957"/>
+						</object>
+						<reference key="parent" ref="524015605"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">24</int>
+						<reference key="object" ref="96874957"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="677652931"/>
+							<reference ref="276216762"/>
+							<reference ref="1066447520"/>
+							<reference ref="1036389925"/>
+							<reference ref="280172320"/>
+							<reference ref="369641893"/>
+							<reference ref="984461797"/>
+							<reference ref="155085383"/>
+							<reference ref="444952046"/>
+						</object>
+						<reference key="parent" ref="931553638"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">5</int>
+						<reference key="object" ref="276216762"/>
+						<reference key="parent" ref="96874957"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">23</int>
+						<reference key="object" ref="677652931"/>
+						<reference key="parent" ref="96874957"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">92</int>
+						<reference key="object" ref="280172320"/>
+						<reference key="parent" ref="96874957"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">203</int>
+						<reference key="object" ref="984461797"/>
+						<reference key="parent" ref="96874957"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">204</int>
+						<reference key="object" ref="1066447520"/>
+						<reference key="parent" ref="96874957"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">536</int>
+						<reference key="object" ref="155085383"/>
+						<reference key="parent" ref="96874957"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">537</int>
+						<reference key="object" ref="1036389925"/>
+						<reference key="parent" ref="96874957"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">538</int>
+						<reference key="object" ref="369641893"/>
+						<reference key="parent" ref="96874957"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">56</int>
+						<reference key="object" ref="365880285"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="576521955"/>
+						</object>
+						<reference key="parent" ref="524015605"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">57</int>
+						<reference key="object" ref="576521955"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="139290918"/>
+							<reference ref="386173216"/>
+							<reference ref="32285361"/>
+							<reference ref="301008465"/>
+							<reference ref="274138642"/>
+							<reference ref="272876017"/>
+							<reference ref="431301145"/>
+							<reference ref="206802571"/>
+							<reference ref="848095279"/>
+							<reference ref="1023546148"/>
+							<reference ref="6876565"/>
+							<reference ref="479677589"/>
+							<reference ref="858487910"/>
+						</object>
+						<reference key="parent" ref="365880285"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">58</int>
+						<reference key="object" ref="139290918"/>
+						<reference key="parent" ref="576521955"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">129</int>
+						<reference key="object" ref="386173216"/>
+						<reference key="parent" ref="576521955"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">131</int>
+						<reference key="object" ref="32285361"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="821388474"/>
+						</object>
+						<reference key="parent" ref="576521955"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">130</int>
+						<reference key="object" ref="821388474"/>
+						<reference key="parent" ref="32285361"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">134</int>
+						<reference key="object" ref="301008465"/>
+						<reference key="parent" ref="576521955"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">136</int>
+						<reference key="object" ref="274138642"/>
+						<reference key="parent" ref="576521955"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">143</int>
+						<reference key="object" ref="272876017"/>
+						<reference key="parent" ref="576521955"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">144</int>
+						<reference key="object" ref="431301145"/>
+						<reference key="parent" ref="576521955"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">145</int>
+						<reference key="object" ref="206802571"/>
+						<reference key="parent" ref="576521955"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">149</int>
+						<reference key="object" ref="848095279"/>
+						<reference key="parent" ref="576521955"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">150</int>
+						<reference key="object" ref="1023546148"/>
+						<reference key="parent" ref="576521955"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">544</int>
+						<reference key="object" ref="6876565"/>
+						<reference key="parent" ref="576521955"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">545</int>
+						<reference key="object" ref="479677589"/>
+						<reference key="parent" ref="576521955"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">163</int>
+						<reference key="object" ref="200491363"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="526778998"/>
+						</object>
+						<reference key="parent" ref="524015605"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">169</int>
+						<reference key="object" ref="526778998"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="839739619"/>
+							<reference ref="185296989"/>
+							<reference ref="1010221707"/>
+							<reference ref="581727829"/>
+							<reference ref="994817848"/>
+							<reference ref="924678073"/>
+							<reference ref="322866464"/>
+							<reference ref="535038564"/>
+						</object>
+						<reference key="parent" ref="200491363"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">156</int>
+						<reference key="object" ref="839739619"/>
+						<reference key="parent" ref="526778998"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">157</int>
+						<reference key="object" ref="185296989"/>
+						<reference key="parent" ref="526778998"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">158</int>
+						<reference key="object" ref="1010221707"/>
+						<reference key="parent" ref="526778998"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">160</int>
+						<reference key="object" ref="581727829"/>
+						<reference key="parent" ref="526778998"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">164</int>
+						<reference key="object" ref="994817848"/>
+						<reference key="parent" ref="526778998"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">171</int>
+						<reference key="object" ref="924678073"/>
+						<reference key="parent" ref="526778998"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">172</int>
+						<reference key="object" ref="322866464"/>
+						<reference key="parent" ref="526778998"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">173</int>
+						<reference key="object" ref="535038564"/>
+						<reference key="parent" ref="526778998"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">269</int>
+						<reference key="object" ref="868031522"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="981161348"/>
+						</object>
+						<reference key="parent" ref="524015605"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">270</int>
+						<reference key="object" ref="981161348"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="390088328"/>
+							<reference ref="1065386165"/>
+						</object>
+						<reference key="parent" ref="868031522"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">272</int>
+						<reference key="object" ref="390088328"/>
+						<reference key="parent" ref="981161348"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">305</int>
+						<reference key="object" ref="1065386165"/>
+						<reference key="parent" ref="981161348"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">419</int>
+						<reference key="object" ref="551174276"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="511848303"/>
+						</object>
+						<reference key="parent" ref="524015605"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">420</int>
+						<reference key="object" ref="511848303"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="504984881"/>
+						</object>
+						<reference key="parent" ref="551174276"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">421</int>
+						<reference key="object" ref="504984881"/>
+						<reference key="parent" ref="511848303"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">196</int>
+						<reference key="object" ref="485884620"/>
+						<reference key="parent" ref="330408435"/>
+						<string key="objectName">X11Controller</string>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">244</int>
+						<reference key="object" ref="124913468"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="941366957"/>
+						</object>
+						<reference key="parent" ref="330408435"/>
+						<string key="objectName">PrefsPanel</string>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">245</int>
+						<reference key="object" ref="941366957"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="448510093"/>
+						</object>
+						<reference key="parent" ref="124913468"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">348</int>
+						<reference key="object" ref="448510093"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="287591690"/>
+							<reference ref="960678392"/>
+							<reference ref="348328898"/>
+							<reference ref="10973343"/>
+						</object>
+						<reference key="parent" ref="941366957"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">349</int>
+						<reference key="object" ref="287591690"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="596750588"/>
+						</object>
+						<reference key="parent" ref="448510093"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">351</int>
+						<reference key="object" ref="596750588"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="119157981"/>
+							<reference ref="443008216"/>
+							<reference ref="282885445"/>
+							<reference ref="842100515"/>
+							<reference ref="31160162"/>
+							<reference ref="179949713"/>
+						</object>
+						<reference key="parent" ref="287591690"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">363</int>
+						<reference key="object" ref="119157981"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="990762273"/>
+						</object>
+						<reference key="parent" ref="596750588"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">364</int>
+						<reference key="object" ref="443008216"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="391919450"/>
+						</object>
+						<reference key="parent" ref="596750588"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">365</int>
+						<reference key="object" ref="282885445"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="649334366"/>
+						</object>
+						<reference key="parent" ref="596750588"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">368</int>
+						<reference key="object" ref="842100515"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="940564599"/>
+						</object>
+						<reference key="parent" ref="596750588"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">369</int>
+						<reference key="object" ref="31160162"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="666057093"/>
+						</object>
+						<reference key="parent" ref="596750588"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">370</int>
+						<reference key="object" ref="179949713"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="967619578"/>
+						</object>
+						<reference key="parent" ref="596750588"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">352</int>
+						<reference key="object" ref="960678392"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="515308735"/>
+						</object>
+						<reference key="parent" ref="448510093"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">350</int>
+						<reference key="object" ref="515308735"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="418227126"/>
+							<reference ref="1039016593"/>
+							<reference ref="709074847"/>
+							<reference ref="201731424"/>
+							<reference ref="86150604"/>
+							<reference ref="477203622"/>
+							<reference ref="298603383"/>
+						</object>
+						<reference key="parent" ref="960678392"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">371</int>
+						<reference key="object" ref="418227126"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="1016069354"/>
+						</object>
+						<reference key="parent" ref="515308735"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">372</int>
+						<reference key="object" ref="1039016593"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="624655599"/>
+						</object>
+						<reference key="parent" ref="515308735"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">382</int>
+						<reference key="object" ref="709074847"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="633115429"/>
+						</object>
+						<reference key="parent" ref="515308735"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">385</int>
+						<reference key="object" ref="201731424"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="930265681"/>
+						</object>
+						<reference key="parent" ref="515308735"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">386</int>
+						<reference key="object" ref="86150604"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="311969422"/>
+						</object>
+						<reference key="parent" ref="515308735"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">541</int>
+						<reference key="object" ref="477203622"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="631531164"/>
+						</object>
+						<reference key="parent" ref="515308735"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">543</int>
+						<reference key="object" ref="298603383"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="761107402"/>
+						</object>
+						<reference key="parent" ref="515308735"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">353</int>
+						<reference key="object" ref="348328898"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="300811574"/>
+						</object>
+						<reference key="parent" ref="448510093"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">354</int>
+						<reference key="object" ref="300811574"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="989050925"/>
+							<reference ref="700826966"/>
+							<reference ref="168436707"/>
+							<reference ref="363817195"/>
+							<reference ref="223835729"/>
+						</object>
+						<reference key="parent" ref="348328898"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">374</int>
+						<reference key="object" ref="989050925"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="189594322"/>
+						</object>
+						<reference key="parent" ref="300811574"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">375</int>
+						<reference key="object" ref="700826966"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="489340979"/>
+						</object>
+						<reference key="parent" ref="300811574"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">376</int>
+						<reference key="object" ref="168436707"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="53243865"/>
+						</object>
+						<reference key="parent" ref="300811574"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">377</int>
+						<reference key="object" ref="363817195"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="390084685"/>
+						</object>
+						<reference key="parent" ref="300811574"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">379</int>
+						<reference key="object" ref="223835729"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="283628678"/>
+						</object>
+						<reference key="parent" ref="300811574"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">285</int>
+						<reference key="object" ref="604417141"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="85544634"/>
+						</object>
+						<reference key="parent" ref="330408435"/>
+						<string key="objectName">EditPrograms</string>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">286</int>
+						<reference key="object" ref="85544634"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="1063387772"/>
+							<reference ref="758204686"/>
+							<reference ref="671954382"/>
+							<reference ref="492358940"/>
+							<reference ref="125703429"/>
+							<reference ref="724002248"/>
+						</object>
+						<reference key="parent" ref="604417141"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">423</int>
+						<reference key="object" ref="294137138"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="318286212"/>
+							<reference ref="511651072"/>
+						</object>
+						<reference key="parent" ref="330408435"/>
+						<string key="objectName">DockMenu</string>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">524</int>
+						<reference key="object" ref="318286212"/>
+						<reference key="parent" ref="294137138"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">526</int>
+						<reference key="object" ref="511651072"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="48278059"/>
+						</object>
+						<reference key="parent" ref="294137138"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">527</int>
+						<reference key="object" ref="48278059"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="1032342329"/>
+							<reference ref="563798000"/>
+						</object>
+						<reference key="parent" ref="511651072"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">532</int>
+						<reference key="object" ref="1032342329"/>
+						<reference key="parent" ref="48278059"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">533</int>
+						<reference key="object" ref="563798000"/>
+						<reference key="parent" ref="48278059"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">100363</int>
+						<reference key="object" ref="990762273"/>
+						<reference key="parent" ref="119157981"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">100364</int>
+						<reference key="object" ref="391919450"/>
+						<reference key="parent" ref="443008216"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">100365</int>
+						<reference key="object" ref="649334366"/>
+						<reference key="parent" ref="282885445"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">100368</int>
+						<reference key="object" ref="940564599"/>
+						<reference key="parent" ref="842100515"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">100369</int>
+						<reference key="object" ref="666057093"/>
+						<reference key="parent" ref="31160162"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">100370</int>
+						<reference key="object" ref="967619578"/>
+						<reference key="parent" ref="179949713"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">100371</int>
+						<reference key="object" ref="1016069354"/>
+						<reference key="parent" ref="418227126"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">100372</int>
+						<reference key="object" ref="624655599"/>
+						<reference key="parent" ref="1039016593"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">100382</int>
+						<reference key="object" ref="633115429"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="341113515"/>
+						</object>
+						<reference key="parent" ref="709074847"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">100385</int>
+						<reference key="object" ref="930265681"/>
+						<reference key="parent" ref="201731424"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">100386</int>
+						<reference key="object" ref="311969422"/>
+						<reference key="parent" ref="86150604"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">100541</int>
+						<reference key="object" ref="631531164"/>
+						<reference key="parent" ref="477203622"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">100543</int>
+						<reference key="object" ref="761107402"/>
+						<reference key="parent" ref="298603383"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">100374</int>
+						<reference key="object" ref="189594322"/>
+						<reference key="parent" ref="989050925"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">100375</int>
+						<reference key="object" ref="489340979"/>
+						<reference key="parent" ref="700826966"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">100376</int>
+						<reference key="object" ref="53243865"/>
+						<reference key="parent" ref="168436707"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">100377</int>
+						<reference key="object" ref="390084685"/>
+						<reference key="parent" ref="363817195"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">100379</int>
+						<reference key="object" ref="283628678"/>
+						<reference key="parent" ref="223835729"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">380</int>
+						<reference key="object" ref="341113515"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="759499526"/>
+							<reference ref="616492372"/>
+							<reference ref="543935434"/>
+							<reference ref="836673018"/>
+						</object>
+						<reference key="parent" ref="633115429"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">435</int>
+						<reference key="object" ref="759499526"/>
+						<reference key="parent" ref="341113515"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">384</int>
+						<reference key="object" ref="616492372"/>
+						<reference key="parent" ref="341113515"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">383</int>
+						<reference key="object" ref="543935434"/>
+						<reference key="parent" ref="341113515"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">381</int>
+						<reference key="object" ref="836673018"/>
+						<reference key="parent" ref="341113515"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">295</int>
+						<reference key="object" ref="1063387772"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="792419186"/>
+							<reference ref="17278747"/>
+							<reference ref="842897584"/>
+							<reference ref="905092943"/>
+						</object>
+						<reference key="parent" ref="85544634"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">300295</int>
+						<reference key="object" ref="792419186"/>
+						<reference key="parent" ref="1063387772"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">200295</int>
+						<reference key="object" ref="17278747"/>
+						<reference key="parent" ref="1063387772"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">100295</int>
+						<reference key="object" ref="842897584"/>
+						<reference key="parent" ref="1063387772"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">296</int>
+						<reference key="object" ref="905092943"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="242608782"/>
+							<reference ref="938444323"/>
+							<reference ref="84282687"/>
+						</object>
+						<reference key="parent" ref="1063387772"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">535</int>
+						<reference key="object" ref="242608782"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="34714764"/>
+						</object>
+						<reference key="parent" ref="905092943"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">575</int>
+						<reference key="object" ref="34714764"/>
+						<reference key="parent" ref="242608782"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">298</int>
+						<reference key="object" ref="938444323"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="825378892"/>
+						</object>
+						<reference key="parent" ref="905092943"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">573</int>
+						<reference key="object" ref="825378892"/>
+						<reference key="parent" ref="938444323"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">297</int>
+						<reference key="object" ref="84282687"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="432610585"/>
+						</object>
+						<reference key="parent" ref="905092943"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">574</int>
+						<reference key="object" ref="432610585"/>
+						<reference key="parent" ref="84282687"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">310</int>
+						<reference key="object" ref="758204686"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="1025474039"/>
+						</object>
+						<reference key="parent" ref="85544634"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">100310</int>
+						<reference key="object" ref="1025474039"/>
+						<reference key="parent" ref="758204686"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">292</int>
+						<reference key="object" ref="671954382"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="143554520"/>
+						</object>
+						<reference key="parent" ref="85544634"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">100292</int>
+						<reference key="object" ref="143554520"/>
+						<reference key="parent" ref="671954382"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">293</int>
+						<reference key="object" ref="492358940"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="8201128"/>
+						</object>
+						<reference key="parent" ref="85544634"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">100293</int>
+						<reference key="object" ref="8201128"/>
+						<reference key="parent" ref="492358940"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">299</int>
+						<reference key="object" ref="125703429"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="892296813"/>
+						</object>
+						<reference key="parent" ref="85544634"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">100299</int>
+						<reference key="object" ref="892296813"/>
+						<reference key="parent" ref="125703429"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">291</int>
+						<reference key="object" ref="724002248"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="809610613"/>
+						</object>
+						<reference key="parent" ref="85544634"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">100291</int>
+						<reference key="object" ref="809610613"/>
+						<reference key="parent" ref="724002248"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">300330</int>
+						<reference key="object" ref="444952046"/>
+						<reference key="parent" ref="96874957"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">300337</int>
+						<reference key="object" ref="10973343"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="184765684"/>
+						</object>
+						<reference key="parent" ref="448510093"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">300338</int>
+						<reference key="object" ref="184765684"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="657659108"/>
+							<reference ref="290578835"/>
+							<reference ref="992839333"/>
+							<reference ref="138261120"/>
+							<reference ref="128352289"/>
+							<reference ref="57161931"/>
+						</object>
+						<reference key="parent" ref="10973343"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">300358</int>
+						<reference key="object" ref="290578835"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="399127858"/>
+						</object>
+						<reference key="parent" ref="184765684"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">300359</int>
+						<reference key="object" ref="657659108"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="259618205"/>
+						</object>
+						<reference key="parent" ref="184765684"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">300360</int>
+						<reference key="object" ref="259618205"/>
+						<reference key="parent" ref="657659108"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">300361</int>
+						<reference key="object" ref="399127858"/>
+						<reference key="parent" ref="290578835"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">300362</int>
+						<reference key="object" ref="992839333"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="959555182"/>
+						</object>
+						<reference key="parent" ref="184765684"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">300363</int>
+						<reference key="object" ref="959555182"/>
+						<reference key="parent" ref="992839333"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">300364</int>
+						<reference key="object" ref="138261120"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="183409141"/>
+						</object>
+						<reference key="parent" ref="184765684"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">300365</int>
+						<reference key="object" ref="183409141"/>
+						<reference key="parent" ref="138261120"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">300368</int>
+						<reference key="object" ref="128352289"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="556463187"/>
+						</object>
+						<reference key="parent" ref="184765684"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">300369</int>
+						<reference key="object" ref="556463187"/>
+						<reference key="parent" ref="128352289"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">300370</int>
+						<reference key="object" ref="57161931"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="989804990"/>
+						</object>
+						<reference key="parent" ref="184765684"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">300371</int>
+						<reference key="object" ref="989804990"/>
+						<reference key="parent" ref="57161931"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">300395</int>
+						<reference key="object" ref="556755705"/>
+						<reference key="parent" ref="330408435"/>
+						<string key="objectName">Updater</string>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">300396</int>
+						<reference key="object" ref="858487910"/>
+						<reference key="parent" ref="576521955"/>
+					</object>
+				</object>
+			</object>
+			<object class="NSMutableDictionary" key="flattenedProperties">
+				<bool key="EncodedWithXMLCoder">YES</bool>
+				<object class="NSMutableArray" key="dict.sortedKeys">
+					<bool key="EncodedWithXMLCoder">YES</bool>
+					<string>-1.IBPluginDependency</string>
+					<string>-2.IBPluginDependency</string>
+					<string>-3.IBPluginDependency</string>
+					<string>-3.ImportedFromIB2</string>
+					<string>100295.IBShouldRemoveOnLegacySave</string>
+					<string>129.IBPluginDependency</string>
+					<string>129.ImportedFromIB2</string>
+					<string>130.IBPluginDependency</string>
+					<string>130.ImportedFromIB2</string>
+					<string>131.IBPluginDependency</string>
+					<string>131.ImportedFromIB2</string>
+					<string>134.IBPluginDependency</string>
+					<string>134.ImportedFromIB2</string>
+					<string>136.IBPluginDependency</string>
+					<string>136.ImportedFromIB2</string>
+					<string>143.IBPluginDependency</string>
+					<string>143.ImportedFromIB2</string>
+					<string>144.IBPluginDependency</string>
+					<string>144.ImportedFromIB2</string>
+					<string>145.IBPluginDependency</string>
+					<string>145.ImportedFromIB2</string>
+					<string>149.IBPluginDependency</string>
+					<string>149.ImportedFromIB2</string>
+					<string>150.IBPluginDependency</string>
+					<string>150.ImportedFromIB2</string>
+					<string>156.IBPluginDependency</string>
+					<string>156.ImportedFromIB2</string>
+					<string>157.IBPluginDependency</string>
+					<string>157.ImportedFromIB2</string>
+					<string>158.IBPluginDependency</string>
+					<string>158.ImportedFromIB2</string>
+					<string>160.IBPluginDependency</string>
+					<string>160.ImportedFromIB2</string>
+					<string>163.IBPluginDependency</string>
+					<string>163.ImportedFromIB2</string>
+					<string>164.IBPluginDependency</string>
+					<string>164.ImportedFromIB2</string>
+					<string>169.IBPluginDependency</string>
+					<string>169.ImportedFromIB2</string>
+					<string>169.editorWindowContentRectSynchronizationRect</string>
+					<string>171.IBPluginDependency</string>
+					<string>171.ImportedFromIB2</string>
+					<string>172.IBPluginDependency</string>
+					<string>172.ImportedFromIB2</string>
+					<string>173.IBPluginDependency</string>
+					<string>173.ImportedFromIB2</string>
+					<string>19.IBPluginDependency</string>
+					<string>19.ImportedFromIB2</string>
+					<string>196.IBPluginDependency</string>
+					<string>196.ImportedFromIB2</string>
+					<string>200295.IBShouldRemoveOnLegacySave</string>
+					<string>203.IBPluginDependency</string>
+					<string>203.ImportedFromIB2</string>
+					<string>204.IBPluginDependency</string>
+					<string>204.ImportedFromIB2</string>
+					<string>23.IBPluginDependency</string>
+					<string>23.ImportedFromIB2</string>
+					<string>24.IBPluginDependency</string>
+					<string>24.ImportedFromIB2</string>
+					<string>24.editorWindowContentRectSynchronizationRect</string>
+					<string>244.IBEditorWindowLastContentRect</string>
+					<string>244.IBPluginDependency</string>
+					<string>244.IBWindowTemplateEditedContentRect</string>
+					<string>244.ImportedFromIB2</string>
+					<string>244.editorWindowContentRectSynchronizationRect</string>
+					<string>244.windowTemplate.hasMaxSize</string>
+					<string>244.windowTemplate.hasMinSize</string>
+					<string>244.windowTemplate.maxSize</string>
+					<string>244.windowTemplate.minSize</string>
+					<string>245.IBPluginDependency</string>
+					<string>245.ImportedFromIB2</string>
+					<string>269.IBPluginDependency</string>
+					<string>269.ImportedFromIB2</string>
+					<string>270.IBPluginDependency</string>
+					<string>270.ImportedFromIB2</string>
+					<string>270.editorWindowContentRectSynchronizationRect</string>
+					<string>272.IBPluginDependency</string>
+					<string>272.ImportedFromIB2</string>
+					<string>285.IBEditorWindowLastContentRect</string>
+					<string>285.IBPluginDependency</string>
+					<string>285.IBViewEditorWindowController.showingBoundsRectangles</string>
+					<string>285.IBViewEditorWindowController.showingLayoutRectangles</string>
+					<string>285.IBWindowTemplateEditedContentRect</string>
+					<string>285.ImportedFromIB2</string>
+					<string>285.editorWindowContentRectSynchronizationRect</string>
+					<string>285.windowTemplate.hasMaxSize</string>
+					<string>285.windowTemplate.hasMinSize</string>
+					<string>285.windowTemplate.maxSize</string>
+					<string>285.windowTemplate.minSize</string>
+					<string>286.IBPluginDependency</string>
+					<string>286.ImportedFromIB2</string>
+					<string>29.IBEditorWindowLastContentRect</string>
+					<string>29.IBPluginDependency</string>
+					<string>29.ImportedFromIB2</string>
+					<string>29.editorWindowContentRectSynchronizationRect</string>
+					<string>291.IBPluginDependency</string>
+					<string>291.ImportedFromIB2</string>
+					<string>292.IBPluginDependency</string>
+					<string>292.ImportedFromIB2</string>
+					<string>293.IBPluginDependency</string>
+					<string>293.ImportedFromIB2</string>
+					<string>295.IBPluginDependency</string>
+					<string>295.ImportedFromIB2</string>
+					<string>296.IBPluginDependency</string>
+					<string>296.ImportedFromIB2</string>
+					<string>297.IBPluginDependency</string>
+					<string>297.ImportedFromIB2</string>
+					<string>298.IBPluginDependency</string>
+					<string>298.ImportedFromIB2</string>
+					<string>299.IBPluginDependency</string>
+					<string>299.ImportedFromIB2</string>
+					<string>300295.IBShouldRemoveOnLegacySave</string>
+					<string>300330.IBPluginDependency</string>
+					<string>300330.ImportedFromIB2</string>
+					<string>300337.IBPluginDependency</string>
+					<string>300337.ImportedFromIB2</string>
+					<string>300338.IBPluginDependency</string>
+					<string>300338.ImportedFromIB2</string>
+					<string>300358.IBPluginDependency</string>
+					<string>300358.ImportedFromIB2</string>
+					<string>300359.IBPluginDependency</string>
+					<string>300359.ImportedFromIB2</string>
+					<string>300362.IBPluginDependency</string>
+					<string>300362.ImportedFromIB2</string>
+					<string>300364.IBPluginDependency</string>
+					<string>300364.ImportedFromIB2</string>
+					<string>300368.IBPluginDependency</string>
+					<string>300368.ImportedFromIB2</string>
+					<string>300370.IBPluginDependency</string>
+					<string>300370.ImportedFromIB2</string>
+					<string>300395.IBPluginDependency</string>
+					<string>300396.IBPluginDependency</string>
+					<string>305.IBPluginDependency</string>
+					<string>305.ImportedFromIB2</string>
+					<string>310.IBPluginDependency</string>
+					<string>310.ImportedFromIB2</string>
+					<string>348.IBPluginDependency</string>
+					<string>348.ImportedFromIB2</string>
+					<string>349.IBPluginDependency</string>
+					<string>349.ImportedFromIB2</string>
+					<string>350.IBPluginDependency</string>
+					<string>350.ImportedFromIB2</string>
+					<string>351.IBPluginDependency</string>
+					<string>351.ImportedFromIB2</string>
+					<string>352.IBPluginDependency</string>
+					<string>352.ImportedFromIB2</string>
+					<string>353.IBPluginDependency</string>
+					<string>353.ImportedFromIB2</string>
+					<string>354.IBPluginDependency</string>
+					<string>354.ImportedFromIB2</string>
+					<string>363.IBPluginDependency</string>
+					<string>363.ImportedFromIB2</string>
+					<string>364.IBPluginDependency</string>
+					<string>364.ImportedFromIB2</string>
+					<string>365.IBPluginDependency</string>
+					<string>365.ImportedFromIB2</string>
+					<string>368.IBPluginDependency</string>
+					<string>368.ImportedFromIB2</string>
+					<string>369.IBPluginDependency</string>
+					<string>369.ImportedFromIB2</string>
+					<string>370.IBPluginDependency</string>
+					<string>370.ImportedFromIB2</string>
+					<string>371.IBPluginDependency</string>
+					<string>371.ImportedFromIB2</string>
+					<string>372.IBPluginDependency</string>
+					<string>372.ImportedFromIB2</string>
+					<string>374.IBPluginDependency</string>
+					<string>374.ImportedFromIB2</string>
+					<string>375.IBPluginDependency</string>
+					<string>375.ImportedFromIB2</string>
+					<string>376.IBPluginDependency</string>
+					<string>376.ImportedFromIB2</string>
+					<string>377.IBPluginDependency</string>
+					<string>377.ImportedFromIB2</string>
+					<string>379.IBPluginDependency</string>
+					<string>379.ImportedFromIB2</string>
+					<string>380.IBPluginDependency</string>
+					<string>380.ImportedFromIB2</string>
+					<string>381.IBPluginDependency</string>
+					<string>381.ImportedFromIB2</string>
+					<string>382.IBPluginDependency</string>
+					<string>382.ImportedFromIB2</string>
+					<string>383.IBPluginDependency</string>
+					<string>383.ImportedFromIB2</string>
+					<string>384.IBPluginDependency</string>
+					<string>384.ImportedFromIB2</string>
+					<string>385.IBPluginDependency</string>
+					<string>385.ImportedFromIB2</string>
+					<string>386.IBPluginDependency</string>
+					<string>386.ImportedFromIB2</string>
+					<string>419.IBPluginDependency</string>
+					<string>419.ImportedFromIB2</string>
+					<string>420.IBPluginDependency</string>
+					<string>420.ImportedFromIB2</string>
+					<string>421.IBPluginDependency</string>
+					<string>421.ImportedFromIB2</string>
+					<string>423.IBPluginDependency</string>
+					<string>423.ImportedFromIB2</string>
+					<string>435.IBPluginDependency</string>
+					<string>435.ImportedFromIB2</string>
+					<string>5.IBPluginDependency</string>
+					<string>5.ImportedFromIB2</string>
+					<string>524.IBPluginDependency</string>
+					<string>524.ImportedFromIB2</string>
+					<string>526.IBPluginDependency</string>
+					<string>526.ImportedFromIB2</string>
+					<string>527.IBPluginDependency</string>
+					<string>527.ImportedFromIB2</string>
+					<string>532.IBPluginDependency</string>
+					<string>532.ImportedFromIB2</string>
+					<string>533.IBPluginDependency</string>
+					<string>533.ImportedFromIB2</string>
+					<string>535.IBPluginDependency</string>
+					<string>535.ImportedFromIB2</string>
+					<string>536.IBPluginDependency</string>
+					<string>536.ImportedFromIB2</string>
+					<string>537.IBPluginDependency</string>
+					<string>537.ImportedFromIB2</string>
+					<string>538.IBPluginDependency</string>
+					<string>538.ImportedFromIB2</string>
+					<string>541.IBPluginDependency</string>
+					<string>541.ImportedFromIB2</string>
+					<string>543.IBPluginDependency</string>
+					<string>543.ImportedFromIB2</string>
+					<string>544.IBPluginDependency</string>
+					<string>544.ImportedFromIB2</string>
+					<string>545.IBPluginDependency</string>
+					<string>545.ImportedFromIB2</string>
+					<string>56.IBPluginDependency</string>
+					<string>56.ImportedFromIB2</string>
+					<string>57.IBEditorWindowLastContentRect</string>
+					<string>57.IBPluginDependency</string>
+					<string>57.ImportedFromIB2</string>
+					<string>57.editorWindowContentRectSynchronizationRect</string>
+					<string>573.IBPluginDependency</string>
+					<string>573.ImportedFromIB2</string>
+					<string>574.IBPluginDependency</string>
+					<string>574.ImportedFromIB2</string>
+					<string>575.IBPluginDependency</string>
+					<string>575.ImportedFromIB2</string>
+					<string>58.IBPluginDependency</string>
+					<string>58.ImportedFromIB2</string>
+					<string>92.IBPluginDependency</string>
+					<string>92.ImportedFromIB2</string>
+				</object>
+				<object class="NSMutableArray" key="dict.values">
+					<bool key="EncodedWithXMLCoder">YES</bool>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<integer value="1" id="9"/>
+					<reference ref="9"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<reference ref="9"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<reference ref="9"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<reference ref="9"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<reference ref="9"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<reference ref="9"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<reference ref="9"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<reference ref="9"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<reference ref="9"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<reference ref="9"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<reference ref="9"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<reference ref="9"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<reference ref="9"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<reference ref="9"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<reference ref="9"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<reference ref="9"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<reference ref="9"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<reference ref="9"/>
+					<string>{{202, 626}, {154, 153}}</string>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<reference ref="9"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<reference ref="9"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<reference ref="9"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<reference ref="9"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<reference ref="9"/>
+					<reference ref="9"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<reference ref="9"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<reference ref="9"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<reference ref="9"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<reference ref="9"/>
+					<string>{{271, 666}, {301, 153}}</string>
+					<string>{{313, 353}, {484, 280}}</string>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<string>{{313, 353}, {484, 280}}</string>
+					<reference ref="9"/>
+					<string>{{184, 290}, {481, 345}}</string>
+					<reference ref="9"/>
+					<reference ref="9"/>
+					<string>{3.40282e+38, 3.40282e+38}</string>
+					<string>{213, 107}</string>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<reference ref="9"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<reference ref="9"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<reference ref="9"/>
+					<string>{{100, 746}, {155, 33}}</string>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<reference ref="9"/>
+					<string>{{407, 545}, {454, 311}}</string>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<reference ref="9"/>
+					<reference ref="9"/>
+					<string>{{407, 545}, {454, 311}}</string>
+					<reference ref="9"/>
+					<string>{{433, 406}, {486, 327}}</string>
+					<integer value="0"/>
+					<reference ref="9"/>
+					<string>{3.40282e+38, 3.40282e+38}</string>
+					<string>{320, 240}</string>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<reference ref="9"/>
+					<string>{{0, 836}, {336, 20}}</string>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<reference ref="9"/>
+					<string>{{67, 819}, {336, 20}}</string>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<reference ref="9"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<reference ref="9"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<reference ref="9"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<reference ref="9"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<reference ref="9"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<reference ref="9"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<reference ref="9"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<reference ref="9"/>
+					<reference ref="9"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<reference ref="9"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<reference ref="9"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<reference ref="9"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<reference ref="9"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<reference ref="9"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<reference ref="9"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<reference ref="9"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<reference ref="9"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<reference ref="9"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<reference ref="9"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<reference ref="9"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<reference ref="9"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<reference ref="9"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<reference ref="9"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<reference ref="9"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<reference ref="9"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<reference ref="9"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<reference ref="9"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<reference ref="9"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<reference ref="9"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<reference ref="9"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<reference ref="9"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<reference ref="9"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<reference ref="9"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<reference ref="9"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<reference ref="9"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<reference ref="9"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<reference ref="9"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<reference ref="9"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<reference ref="9"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<reference ref="9"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<reference ref="9"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<reference ref="9"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<reference ref="9"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<reference ref="9"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<reference ref="9"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<reference ref="9"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<reference ref="9"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<reference ref="9"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<reference ref="9"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<reference ref="9"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<reference ref="9"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<reference ref="9"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<reference ref="9"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<reference ref="9"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<reference ref="9"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<reference ref="9"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<reference ref="9"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<reference ref="9"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<reference ref="9"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<reference ref="9"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<reference ref="9"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<reference ref="9"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<reference ref="9"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<reference ref="9"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<reference ref="9"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<reference ref="9"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<reference ref="9"/>
+					<string>{{12, 633}, {218, 203}}</string>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<reference ref="9"/>
+					<string>{{79, 616}, {218, 203}}</string>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<reference ref="9"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<reference ref="9"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<reference ref="9"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<reference ref="9"/>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<reference ref="9"/>
+				</object>
+			</object>
+			<object class="NSMutableDictionary" key="unlocalizedProperties">
+				<bool key="EncodedWithXMLCoder">YES</bool>
+				<object class="NSArray" key="dict.sortedKeys">
+					<bool key="EncodedWithXMLCoder">YES</bool>
+				</object>
+				<object class="NSMutableArray" key="dict.values">
+					<bool key="EncodedWithXMLCoder">YES</bool>
+				</object>
+			</object>
+			<nil key="activeLocalization"/>
+			<object class="NSMutableDictionary" key="localizations">
+				<bool key="EncodedWithXMLCoder">YES</bool>
+				<object class="NSArray" key="dict.sortedKeys">
+					<bool key="EncodedWithXMLCoder">YES</bool>
+				</object>
+				<object class="NSMutableArray" key="dict.values">
+					<bool key="EncodedWithXMLCoder">YES</bool>
+				</object>
+			</object>
+			<nil key="sourceID"/>
+			<int key="maxID">300397</int>
+		</object>
+		<object class="IBClassDescriber" key="IBDocument.Classes">
+			<object class="NSMutableArray" key="referencedPartialClassDescriptions">
+				<bool key="EncodedWithXMLCoder">YES</bool>
+				<object class="IBPartialClassDescription">
+					<string key="className">FirstResponder</string>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBUserSource</string>
+						<string key="minorKey"/>
+					</object>
+				</object>
+				<object class="IBPartialClassDescription">
+					<string key="className">NSFormatter</string>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBUserSource</string>
+						<string key="minorKey"/>
+					</object>
+				</object>
+				<object class="IBPartialClassDescription">
+					<string key="className">X11Controller</string>
+					<string key="superclassName">NSObject</string>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBUserSource</string>
+						<string key="minorKey"/>
+					</object>
+				</object>
+			</object>
+			<object class="NSMutableArray" key="referencedPartialClassDescriptionsV3.1+">
+				<bool key="EncodedWithXMLCoder">YES</bool>
+				<object class="IBPartialClassDescription">
+					<string key="className">SUUpdater</string>
+					<string key="superclassName">NSObject</string>
+					<object class="NSMutableDictionary" key="actions">
+						<string key="NS.key.0">checkForUpdates:</string>
+						<string key="NS.object.0">id</string>
+					</object>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBDocumentRelativeSource</string>
+						<string key="minorKey">../Sparkle.framework/Versions/A/Headers/SUUpdater.h</string>
+					</object>
+				</object>
+				<object class="IBPartialClassDescription">
+					<string key="className">X11Controller</string>
+					<string key="superclassName">NSObject</string>
+					<object class="NSMutableDictionary" key="actions">
+						<bool key="EncodedWithXMLCoder">YES</bool>
+						<object class="NSMutableArray" key="dict.sortedKeys">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<string>apps_table_cancel:</string>
+							<string>apps_table_delete:</string>
+							<string>apps_table_done:</string>
+							<string>apps_table_duplicate:</string>
+							<string>apps_table_new:</string>
+							<string>apps_table_show:</string>
+							<string>bring_to_front:</string>
+							<string>close_window:</string>
+							<string>enable_fullscreen_changed:</string>
+							<string>minimize_window:</string>
+							<string>next_window:</string>
+							<string>prefs_changed:</string>
+							<string>prefs_show:</string>
+							<string>previous_window:</string>
+							<string>quit:</string>
+							<string>toggle_fullscreen:</string>
+							<string>x11_help:</string>
+							<string>zoom_window:</string>
+						</object>
+						<object class="NSMutableArray" key="dict.values">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<string>id</string>
+							<string>id</string>
+							<string>id</string>
+							<string>id</string>
+							<string>id</string>
+							<string>id</string>
+							<string>id</string>
+							<string>id</string>
+							<string>id</string>
+							<string>id</string>
+							<string>id</string>
+							<string>id</string>
+							<string>id</string>
+							<string>id</string>
+							<string>id</string>
+							<string>id</string>
+							<string>id</string>
+							<string>id</string>
+						</object>
+					</object>
+					<object class="NSMutableDictionary" key="outlets">
+						<bool key="EncodedWithXMLCoder">YES</bool>
+						<object class="NSMutableArray" key="dict.sortedKeys">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<string>apps_separator</string>
+							<string>apps_table</string>
+							<string>click_through</string>
+							<string>depth</string>
+							<string>dock_apps_menu</string>
+							<string>dock_menu</string>
+							<string>dock_window_separator</string>
+							<string>enable_auth</string>
+							<string>enable_fullscreen</string>
+							<string>enable_keyequivs</string>
+							<string>enable_tcp</string>
+							<string>fake_buttons</string>
+							<string>focus_follows_mouse</string>
+							<string>focus_on_new_window</string>
+							<string>prefs_panel</string>
+							<string>sync_keymap</string>
+							<string>toggle_fullscreen_item</string>
+							<string>use_sysbeep</string>
+							<string>window_separator</string>
+							<string>x11_about_item</string>
+						</object>
+						<object class="NSMutableArray" key="dict.values">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<string>NSMenuItem</string>
+							<string>NSTableView</string>
+							<string>NSButton</string>
+							<string>NSPopUpButton</string>
+							<string>NSMenu</string>
+							<string>NSMenu</string>
+							<string>NSMenuItem</string>
+							<string>NSButton</string>
+							<string>NSButton</string>
+							<string>NSButton</string>
+							<string>NSButton</string>
+							<string>NSButton</string>
+							<string>NSButton</string>
+							<string>NSButton</string>
+							<string>NSPanel</string>
+							<string>NSButton</string>
+							<string>NSMenuItem</string>
+							<string>NSButton</string>
+							<string>NSMenuItem</string>
+							<string>NSMenuItem</string>
+						</object>
+					</object>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBDocumentRelativeSource</string>
+						<string key="minorKey">../../X11Controller.h</string>
+					</object>
+				</object>
+			</object>
+		</object>
+		<int key="IBDocument.localizationMode">0</int>
+		<string key="IBDocument.LastKnownRelativeProjectPath">../X11.xcodeproj</string>
+		<int key="IBDocument.defaultPropertyAccessControl">3</int>
+	</data>
+</archive>
diff --git a/hw/xquartz/bundle/Resources/English.lproj/main.nib/keyedobjects.nib b/hw/xquartz/bundle/Resources/English.lproj/main.nib/keyedobjects.nib
new file mode 100644
index 0000000..066fdbe
Binary files /dev/null and b/hw/xquartz/bundle/Resources/English.lproj/main.nib/keyedobjects.nib differ
diff --git a/hw/xquartz/bundle/Resources/French.lproj/InfoPlist.strings b/hw/xquartz/bundle/Resources/French.lproj/InfoPlist.strings
new file mode 100644
index 0000000..88e1f04
Binary files /dev/null and b/hw/xquartz/bundle/Resources/French.lproj/InfoPlist.strings differ
diff --git a/hw/xquartz/bundle/Resources/French.lproj/Localizable.strings b/hw/xquartz/bundle/Resources/French.lproj/Localizable.strings
new file mode 100644
index 0000000..2770dfb
Binary files /dev/null and b/hw/xquartz/bundle/Resources/French.lproj/Localizable.strings differ
diff --git a/hw/xquartz/bundle/Resources/French.lproj/main.nib/keyedobjects.nib b/hw/xquartz/bundle/Resources/French.lproj/main.nib/keyedobjects.nib
new file mode 100644
index 0000000..9f9a7da
Binary files /dev/null and b/hw/xquartz/bundle/Resources/French.lproj/main.nib/keyedobjects.nib differ
diff --git a/hw/xquartz/bundle/Resources/German.lproj/InfoPlist.strings b/hw/xquartz/bundle/Resources/German.lproj/InfoPlist.strings
new file mode 100644
index 0000000..aa37e75
Binary files /dev/null and b/hw/xquartz/bundle/Resources/German.lproj/InfoPlist.strings differ
diff --git a/hw/xquartz/bundle/Resources/German.lproj/Localizable.strings b/hw/xquartz/bundle/Resources/German.lproj/Localizable.strings
new file mode 100644
index 0000000..a5489ab
Binary files /dev/null and b/hw/xquartz/bundle/Resources/German.lproj/Localizable.strings differ
diff --git a/hw/xquartz/bundle/Resources/German.lproj/main.nib/keyedobjects.nib b/hw/xquartz/bundle/Resources/German.lproj/main.nib/keyedobjects.nib
new file mode 100644
index 0000000..19532a9
Binary files /dev/null and b/hw/xquartz/bundle/Resources/German.lproj/main.nib/keyedobjects.nib differ
diff --git a/hw/xquartz/bundle/Resources/Italian.lproj/InfoPlist.strings b/hw/xquartz/bundle/Resources/Italian.lproj/InfoPlist.strings
new file mode 100644
index 0000000..4121698
Binary files /dev/null and b/hw/xquartz/bundle/Resources/Italian.lproj/InfoPlist.strings differ
diff --git a/hw/xquartz/bundle/Resources/Italian.lproj/Localizable.strings b/hw/xquartz/bundle/Resources/Italian.lproj/Localizable.strings
new file mode 100644
index 0000000..d05d73d
Binary files /dev/null and b/hw/xquartz/bundle/Resources/Italian.lproj/Localizable.strings differ
diff --git a/hw/xquartz/bundle/Resources/Italian.lproj/main.nib/keyedobjects.nib b/hw/xquartz/bundle/Resources/Italian.lproj/main.nib/keyedobjects.nib
new file mode 100644
index 0000000..b6e2e1b
Binary files /dev/null and b/hw/xquartz/bundle/Resources/Italian.lproj/main.nib/keyedobjects.nib differ
diff --git a/hw/xquartz/bundle/Resources/Japanese.lproj/InfoPlist.strings b/hw/xquartz/bundle/Resources/Japanese.lproj/InfoPlist.strings
new file mode 100644
index 0000000..2d6330f
Binary files /dev/null and b/hw/xquartz/bundle/Resources/Japanese.lproj/InfoPlist.strings differ
diff --git a/hw/xquartz/bundle/Resources/Japanese.lproj/Localizable.strings b/hw/xquartz/bundle/Resources/Japanese.lproj/Localizable.strings
new file mode 100644
index 0000000..99821ea
Binary files /dev/null and b/hw/xquartz/bundle/Resources/Japanese.lproj/Localizable.strings differ
diff --git a/hw/xquartz/bundle/Resources/Japanese.lproj/main.nib/keyedobjects.nib b/hw/xquartz/bundle/Resources/Japanese.lproj/main.nib/keyedobjects.nib
new file mode 100644
index 0000000..523fd08
Binary files /dev/null and b/hw/xquartz/bundle/Resources/Japanese.lproj/main.nib/keyedobjects.nib differ
diff --git a/hw/xquartz/bundle/Resources/Spanish.lproj/InfoPlist.strings b/hw/xquartz/bundle/Resources/Spanish.lproj/InfoPlist.strings
new file mode 100644
index 0000000..0e4287d
Binary files /dev/null and b/hw/xquartz/bundle/Resources/Spanish.lproj/InfoPlist.strings differ
diff --git a/hw/xquartz/bundle/Resources/Spanish.lproj/Localizable.strings b/hw/xquartz/bundle/Resources/Spanish.lproj/Localizable.strings
new file mode 100644
index 0000000..652f432
Binary files /dev/null and b/hw/xquartz/bundle/Resources/Spanish.lproj/Localizable.strings differ
diff --git a/hw/xquartz/bundle/Resources/Spanish.lproj/main.nib/keyedobjects.nib b/hw/xquartz/bundle/Resources/Spanish.lproj/main.nib/keyedobjects.nib
new file mode 100644
index 0000000..029349d
Binary files /dev/null and b/hw/xquartz/bundle/Resources/Spanish.lproj/main.nib/keyedobjects.nib differ
diff --git a/hw/xquartz/bundle/Resources/X11.icns b/hw/xquartz/bundle/Resources/X11.icns
new file mode 100644
index 0000000..d770e61
Binary files /dev/null and b/hw/xquartz/bundle/Resources/X11.icns differ
diff --git a/hw/xquartz/bundle/Resources/da.lproj/InfoPlist.strings b/hw/xquartz/bundle/Resources/da.lproj/InfoPlist.strings
new file mode 100644
index 0000000..88e1f04
Binary files /dev/null and b/hw/xquartz/bundle/Resources/da.lproj/InfoPlist.strings differ
diff --git a/hw/xquartz/bundle/Resources/da.lproj/Localizable.strings b/hw/xquartz/bundle/Resources/da.lproj/Localizable.strings
new file mode 100644
index 0000000..9608a2e
Binary files /dev/null and b/hw/xquartz/bundle/Resources/da.lproj/Localizable.strings differ
diff --git a/hw/xquartz/bundle/Resources/da.lproj/main.nib/keyedobjects.nib b/hw/xquartz/bundle/Resources/da.lproj/main.nib/keyedobjects.nib
new file mode 100644
index 0000000..4a2bd4b
Binary files /dev/null and b/hw/xquartz/bundle/Resources/da.lproj/main.nib/keyedobjects.nib differ
diff --git a/hw/xquartz/bundle/Resources/fi.lproj/InfoPlist.strings b/hw/xquartz/bundle/Resources/fi.lproj/InfoPlist.strings
new file mode 100644
index 0000000..8e4f647
Binary files /dev/null and b/hw/xquartz/bundle/Resources/fi.lproj/InfoPlist.strings differ
diff --git a/hw/xquartz/bundle/Resources/fi.lproj/Localizable.strings b/hw/xquartz/bundle/Resources/fi.lproj/Localizable.strings
new file mode 100644
index 0000000..e8420fb
Binary files /dev/null and b/hw/xquartz/bundle/Resources/fi.lproj/Localizable.strings differ
diff --git a/hw/xquartz/bundle/Resources/fi.lproj/main.nib/keyedobjects.nib b/hw/xquartz/bundle/Resources/fi.lproj/main.nib/keyedobjects.nib
new file mode 100644
index 0000000..b5039fd
Binary files /dev/null and b/hw/xquartz/bundle/Resources/fi.lproj/main.nib/keyedobjects.nib differ
diff --git a/hw/xquartz/bundle/Resources/ko.lproj/InfoPlist.strings b/hw/xquartz/bundle/Resources/ko.lproj/InfoPlist.strings
new file mode 100644
index 0000000..4c738f8
Binary files /dev/null and b/hw/xquartz/bundle/Resources/ko.lproj/InfoPlist.strings differ
diff --git a/hw/xquartz/bundle/Resources/ko.lproj/Localizable.strings b/hw/xquartz/bundle/Resources/ko.lproj/Localizable.strings
new file mode 100644
index 0000000..56a3358
Binary files /dev/null and b/hw/xquartz/bundle/Resources/ko.lproj/Localizable.strings differ
diff --git a/hw/xquartz/bundle/Resources/ko.lproj/main.nib/keyedobjects.nib b/hw/xquartz/bundle/Resources/ko.lproj/main.nib/keyedobjects.nib
new file mode 100644
index 0000000..925945c
Binary files /dev/null and b/hw/xquartz/bundle/Resources/ko.lproj/main.nib/keyedobjects.nib differ
diff --git a/hw/xquartz/bundle/Resources/no.lproj/InfoPlist.strings b/hw/xquartz/bundle/Resources/no.lproj/InfoPlist.strings
new file mode 100644
index 0000000..eb1cfb0
Binary files /dev/null and b/hw/xquartz/bundle/Resources/no.lproj/InfoPlist.strings differ
diff --git a/hw/xquartz/bundle/Resources/no.lproj/Localizable.strings b/hw/xquartz/bundle/Resources/no.lproj/Localizable.strings
new file mode 100644
index 0000000..5157a67
Binary files /dev/null and b/hw/xquartz/bundle/Resources/no.lproj/Localizable.strings differ
diff --git a/hw/xquartz/bundle/Resources/no.lproj/main.nib/keyedobjects.nib b/hw/xquartz/bundle/Resources/no.lproj/main.nib/keyedobjects.nib
new file mode 100644
index 0000000..ca25327
Binary files /dev/null and b/hw/xquartz/bundle/Resources/no.lproj/main.nib/keyedobjects.nib differ
diff --git a/hw/xquartz/bundle/Resources/pl.lproj/InfoPlist.strings b/hw/xquartz/bundle/Resources/pl.lproj/InfoPlist.strings
new file mode 100644
index 0000000..b9c9502
Binary files /dev/null and b/hw/xquartz/bundle/Resources/pl.lproj/InfoPlist.strings differ
diff --git a/hw/xquartz/bundle/Resources/pl.lproj/Localizable.strings b/hw/xquartz/bundle/Resources/pl.lproj/Localizable.strings
new file mode 100644
index 0000000..4ae12d7
Binary files /dev/null and b/hw/xquartz/bundle/Resources/pl.lproj/Localizable.strings differ
diff --git a/hw/xquartz/bundle/Resources/pl.lproj/main.nib/keyedobjects.nib b/hw/xquartz/bundle/Resources/pl.lproj/main.nib/keyedobjects.nib
new file mode 100644
index 0000000..e9ca540
Binary files /dev/null and b/hw/xquartz/bundle/Resources/pl.lproj/main.nib/keyedobjects.nib differ
diff --git a/hw/xquartz/bundle/Resources/pt.lproj/InfoPlist.strings b/hw/xquartz/bundle/Resources/pt.lproj/InfoPlist.strings
new file mode 100644
index 0000000..33c6374
Binary files /dev/null and b/hw/xquartz/bundle/Resources/pt.lproj/InfoPlist.strings differ
diff --git a/hw/xquartz/bundle/Resources/pt.lproj/Localizable.strings b/hw/xquartz/bundle/Resources/pt.lproj/Localizable.strings
new file mode 100644
index 0000000..23ea968
Binary files /dev/null and b/hw/xquartz/bundle/Resources/pt.lproj/Localizable.strings differ
diff --git a/hw/xquartz/bundle/Resources/pt.lproj/main.nib/keyedobjects.nib b/hw/xquartz/bundle/Resources/pt.lproj/main.nib/keyedobjects.nib
new file mode 100644
index 0000000..e88cccd
Binary files /dev/null and b/hw/xquartz/bundle/Resources/pt.lproj/main.nib/keyedobjects.nib differ
diff --git a/hw/xquartz/bundle/Resources/pt_PT.lproj/InfoPlist.strings b/hw/xquartz/bundle/Resources/pt_PT.lproj/InfoPlist.strings
new file mode 100644
index 0000000..33c6374
Binary files /dev/null and b/hw/xquartz/bundle/Resources/pt_PT.lproj/InfoPlist.strings differ
diff --git a/hw/xquartz/bundle/Resources/pt_PT.lproj/Localizable.strings b/hw/xquartz/bundle/Resources/pt_PT.lproj/Localizable.strings
new file mode 100644
index 0000000..71c33ad
Binary files /dev/null and b/hw/xquartz/bundle/Resources/pt_PT.lproj/Localizable.strings differ
diff --git a/hw/xquartz/bundle/Resources/pt_PT.lproj/main.nib/keyedobjects.nib b/hw/xquartz/bundle/Resources/pt_PT.lproj/main.nib/keyedobjects.nib
new file mode 100644
index 0000000..a619334
Binary files /dev/null and b/hw/xquartz/bundle/Resources/pt_PT.lproj/main.nib/keyedobjects.nib differ
diff --git a/hw/xquartz/bundle/Resources/ru.lproj/InfoPlist.strings b/hw/xquartz/bundle/Resources/ru.lproj/InfoPlist.strings
new file mode 100644
index 0000000..7f722e4
Binary files /dev/null and b/hw/xquartz/bundle/Resources/ru.lproj/InfoPlist.strings differ
diff --git a/hw/xquartz/bundle/Resources/ru.lproj/Localizable.strings b/hw/xquartz/bundle/Resources/ru.lproj/Localizable.strings
new file mode 100644
index 0000000..3b38112
Binary files /dev/null and b/hw/xquartz/bundle/Resources/ru.lproj/Localizable.strings differ
diff --git a/hw/xquartz/bundle/Resources/ru.lproj/main.nib/keyedobjects.nib b/hw/xquartz/bundle/Resources/ru.lproj/main.nib/keyedobjects.nib
new file mode 100644
index 0000000..9354e02
Binary files /dev/null and b/hw/xquartz/bundle/Resources/ru.lproj/main.nib/keyedobjects.nib differ
diff --git a/hw/xquartz/bundle/Resources/sv.lproj/InfoPlist.strings b/hw/xquartz/bundle/Resources/sv.lproj/InfoPlist.strings
new file mode 100644
index 0000000..655d5ff
Binary files /dev/null and b/hw/xquartz/bundle/Resources/sv.lproj/InfoPlist.strings differ
diff --git a/hw/xquartz/bundle/Resources/sv.lproj/Localizable.strings b/hw/xquartz/bundle/Resources/sv.lproj/Localizable.strings
new file mode 100644
index 0000000..796f06c
Binary files /dev/null and b/hw/xquartz/bundle/Resources/sv.lproj/Localizable.strings differ
diff --git a/hw/xquartz/bundle/Resources/sv.lproj/main.nib/keyedobjects.nib b/hw/xquartz/bundle/Resources/sv.lproj/main.nib/keyedobjects.nib
new file mode 100644
index 0000000..bd01c2d
Binary files /dev/null and b/hw/xquartz/bundle/Resources/sv.lproj/main.nib/keyedobjects.nib differ
diff --git a/hw/xquartz/bundle/Resources/zh_CN.lproj/InfoPlist.strings b/hw/xquartz/bundle/Resources/zh_CN.lproj/InfoPlist.strings
new file mode 100644
index 0000000..b5df368
Binary files /dev/null and b/hw/xquartz/bundle/Resources/zh_CN.lproj/InfoPlist.strings differ
diff --git a/hw/xquartz/bundle/Resources/zh_CN.lproj/Localizable.strings b/hw/xquartz/bundle/Resources/zh_CN.lproj/Localizable.strings
new file mode 100644
index 0000000..f88a6da
Binary files /dev/null and b/hw/xquartz/bundle/Resources/zh_CN.lproj/Localizable.strings differ
diff --git a/hw/xquartz/bundle/Resources/zh_CN.lproj/main.nib/keyedobjects.nib b/hw/xquartz/bundle/Resources/zh_CN.lproj/main.nib/keyedobjects.nib
new file mode 100644
index 0000000..e36c15f
Binary files /dev/null and b/hw/xquartz/bundle/Resources/zh_CN.lproj/main.nib/keyedobjects.nib differ
diff --git a/hw/xquartz/bundle/Resources/zh_TW.lproj/InfoPlist.strings b/hw/xquartz/bundle/Resources/zh_TW.lproj/InfoPlist.strings
new file mode 100644
index 0000000..92d5473
Binary files /dev/null and b/hw/xquartz/bundle/Resources/zh_TW.lproj/InfoPlist.strings differ
diff --git a/hw/xquartz/bundle/Resources/zh_TW.lproj/Localizable.strings b/hw/xquartz/bundle/Resources/zh_TW.lproj/Localizable.strings
new file mode 100644
index 0000000..f009302
Binary files /dev/null and b/hw/xquartz/bundle/Resources/zh_TW.lproj/Localizable.strings differ
diff --git a/hw/xquartz/bundle/Resources/zh_TW.lproj/main.nib/keyedobjects.nib b/hw/xquartz/bundle/Resources/zh_TW.lproj/main.nib/keyedobjects.nib
new file mode 100644
index 0000000..36602c5
Binary files /dev/null and b/hw/xquartz/bundle/Resources/zh_TW.lproj/main.nib/keyedobjects.nib differ
diff --git a/hw/xquartz/bundle/Spanish.lproj/InfoPlist.strings b/hw/xquartz/bundle/Spanish.lproj/InfoPlist.strings
deleted file mode 100644
index 0e4287d..0000000
Binary files a/hw/xquartz/bundle/Spanish.lproj/InfoPlist.strings and /dev/null differ
diff --git a/hw/xquartz/bundle/Spanish.lproj/Localizable.strings b/hw/xquartz/bundle/Spanish.lproj/Localizable.strings
deleted file mode 100644
index 652f432..0000000
Binary files a/hw/xquartz/bundle/Spanish.lproj/Localizable.strings and /dev/null differ
diff --git a/hw/xquartz/bundle/Spanish.lproj/main.nib/keyedobjects.nib b/hw/xquartz/bundle/Spanish.lproj/main.nib/keyedobjects.nib
deleted file mode 100644
index 029349d..0000000
Binary files a/hw/xquartz/bundle/Spanish.lproj/main.nib/keyedobjects.nib and /dev/null differ
diff --git a/hw/xquartz/bundle/X11.icns b/hw/xquartz/bundle/X11.icns
deleted file mode 100644
index d770e61..0000000
Binary files a/hw/xquartz/bundle/X11.icns and /dev/null differ
diff --git a/hw/xquartz/bundle/bundle-main.c b/hw/xquartz/bundle/bundle-main.c
index e97770a..042fa3a 100644
--- a/hw/xquartz/bundle/bundle-main.c
+++ b/hw/xquartz/bundle/bundle-main.c
@@ -43,7 +43,9 @@
 static int execute(const char *command);
 static char *command_from_prefs(const char *key, const char *default_value);
 
-int main(int argc, char **argv) {
+int server_main(int argc, char **argv, char **envp);
+
+int main(int argc, char **argv, char **envp) {
     Display *display;
     const char *s;
 
@@ -52,7 +54,12 @@ int main(int argc, char **argv) {
     for(i=0; i < argc; i++) {
         fprintf(stderr, "\targv[%u] = %s\n", (unsigned)i, argv[i]);
     }
-
+    
+    /* Take care of the case where we're called like a normal DDX */
+    if(argc > 1 && argv[1][0] == ':') {
+        exit(server_main(argc, argv, envp));
+    }
+    
     /* If we have a process serial number and it's our only arg, act as if
      * the user double clicked the app bundle: launch app_to_run if possible
      */
@@ -73,7 +80,7 @@ int main(int argc, char **argv) {
     }
 
     /* Start the server */
-    if(s = getenv("DISPLAY")) {
+    if((s = getenv("DISPLAY"))) {
         fprintf(stderr, "X11.app: Could not connect to server (DISPLAY=\"%s\", unsetting).  Starting X server.\n", s);
         unsetenv("DISPLAY");
     } else {
diff --git a/hw/xquartz/bundle/da.lproj/InfoPlist.strings b/hw/xquartz/bundle/da.lproj/InfoPlist.strings
deleted file mode 100644
index 88e1f04..0000000
Binary files a/hw/xquartz/bundle/da.lproj/InfoPlist.strings and /dev/null differ
diff --git a/hw/xquartz/bundle/da.lproj/Localizable.strings b/hw/xquartz/bundle/da.lproj/Localizable.strings
deleted file mode 100644
index 9608a2e..0000000
Binary files a/hw/xquartz/bundle/da.lproj/Localizable.strings and /dev/null differ
diff --git a/hw/xquartz/bundle/da.lproj/main.nib/keyedobjects.nib b/hw/xquartz/bundle/da.lproj/main.nib/keyedobjects.nib
deleted file mode 100644
index 4a2bd4b..0000000
Binary files a/hw/xquartz/bundle/da.lproj/main.nib/keyedobjects.nib and /dev/null differ
diff --git a/hw/xquartz/bundle/fi.lproj/InfoPlist.strings b/hw/xquartz/bundle/fi.lproj/InfoPlist.strings
deleted file mode 100644
index 8e4f647..0000000
Binary files a/hw/xquartz/bundle/fi.lproj/InfoPlist.strings and /dev/null differ
diff --git a/hw/xquartz/bundle/fi.lproj/Localizable.strings b/hw/xquartz/bundle/fi.lproj/Localizable.strings
deleted file mode 100644
index e8420fb..0000000
Binary files a/hw/xquartz/bundle/fi.lproj/Localizable.strings and /dev/null differ
diff --git a/hw/xquartz/bundle/fi.lproj/main.nib/keyedobjects.nib b/hw/xquartz/bundle/fi.lproj/main.nib/keyedobjects.nib
deleted file mode 100644
index b5039fd..0000000
Binary files a/hw/xquartz/bundle/fi.lproj/main.nib/keyedobjects.nib and /dev/null differ
diff --git a/hw/xquartz/bundle/ko.lproj/InfoPlist.strings b/hw/xquartz/bundle/ko.lproj/InfoPlist.strings
deleted file mode 100644
index 4c738f8..0000000
Binary files a/hw/xquartz/bundle/ko.lproj/InfoPlist.strings and /dev/null differ
diff --git a/hw/xquartz/bundle/ko.lproj/Localizable.strings b/hw/xquartz/bundle/ko.lproj/Localizable.strings
deleted file mode 100644
index 56a3358..0000000
Binary files a/hw/xquartz/bundle/ko.lproj/Localizable.strings and /dev/null differ
diff --git a/hw/xquartz/bundle/ko.lproj/main.nib/keyedobjects.nib b/hw/xquartz/bundle/ko.lproj/main.nib/keyedobjects.nib
deleted file mode 100644
index 925945c..0000000
Binary files a/hw/xquartz/bundle/ko.lproj/main.nib/keyedobjects.nib and /dev/null differ
diff --git a/hw/xquartz/bundle/no.lproj/InfoPlist.strings b/hw/xquartz/bundle/no.lproj/InfoPlist.strings
deleted file mode 100644
index eb1cfb0..0000000
Binary files a/hw/xquartz/bundle/no.lproj/InfoPlist.strings and /dev/null differ
diff --git a/hw/xquartz/bundle/no.lproj/Localizable.strings b/hw/xquartz/bundle/no.lproj/Localizable.strings
deleted file mode 100644
index 5157a67..0000000
Binary files a/hw/xquartz/bundle/no.lproj/Localizable.strings and /dev/null differ
diff --git a/hw/xquartz/bundle/no.lproj/main.nib/keyedobjects.nib b/hw/xquartz/bundle/no.lproj/main.nib/keyedobjects.nib
deleted file mode 100644
index ca25327..0000000
Binary files a/hw/xquartz/bundle/no.lproj/main.nib/keyedobjects.nib and /dev/null differ
diff --git a/hw/xquartz/bundle/pl.lproj/InfoPlist.strings b/hw/xquartz/bundle/pl.lproj/InfoPlist.strings
deleted file mode 100644
index b9c9502..0000000
Binary files a/hw/xquartz/bundle/pl.lproj/InfoPlist.strings and /dev/null differ
diff --git a/hw/xquartz/bundle/pl.lproj/Localizable.strings b/hw/xquartz/bundle/pl.lproj/Localizable.strings
deleted file mode 100644
index 4ae12d7..0000000
Binary files a/hw/xquartz/bundle/pl.lproj/Localizable.strings and /dev/null differ
diff --git a/hw/xquartz/bundle/pl.lproj/main.nib/keyedobjects.nib b/hw/xquartz/bundle/pl.lproj/main.nib/keyedobjects.nib
deleted file mode 100644
index e9ca540..0000000
Binary files a/hw/xquartz/bundle/pl.lproj/main.nib/keyedobjects.nib and /dev/null differ
diff --git a/hw/xquartz/bundle/pt.lproj/InfoPlist.strings b/hw/xquartz/bundle/pt.lproj/InfoPlist.strings
deleted file mode 100644
index 33c6374..0000000
Binary files a/hw/xquartz/bundle/pt.lproj/InfoPlist.strings and /dev/null differ
diff --git a/hw/xquartz/bundle/pt.lproj/Localizable.strings b/hw/xquartz/bundle/pt.lproj/Localizable.strings
deleted file mode 100644
index 23ea968..0000000
Binary files a/hw/xquartz/bundle/pt.lproj/Localizable.strings and /dev/null differ
diff --git a/hw/xquartz/bundle/pt.lproj/main.nib/keyedobjects.nib b/hw/xquartz/bundle/pt.lproj/main.nib/keyedobjects.nib
deleted file mode 100644
index e88cccd..0000000
Binary files a/hw/xquartz/bundle/pt.lproj/main.nib/keyedobjects.nib and /dev/null differ
diff --git a/hw/xquartz/bundle/pt_PT.lproj/InfoPlist.strings b/hw/xquartz/bundle/pt_PT.lproj/InfoPlist.strings
deleted file mode 100644
index 33c6374..0000000
Binary files a/hw/xquartz/bundle/pt_PT.lproj/InfoPlist.strings and /dev/null differ
diff --git a/hw/xquartz/bundle/pt_PT.lproj/Localizable.strings b/hw/xquartz/bundle/pt_PT.lproj/Localizable.strings
deleted file mode 100644
index 71c33ad..0000000
Binary files a/hw/xquartz/bundle/pt_PT.lproj/Localizable.strings and /dev/null differ
diff --git a/hw/xquartz/bundle/pt_PT.lproj/main.nib/keyedobjects.nib b/hw/xquartz/bundle/pt_PT.lproj/main.nib/keyedobjects.nib
deleted file mode 100644
index a619334..0000000
Binary files a/hw/xquartz/bundle/pt_PT.lproj/main.nib/keyedobjects.nib and /dev/null differ
diff --git a/hw/xquartz/bundle/ru.lproj/InfoPlist.strings b/hw/xquartz/bundle/ru.lproj/InfoPlist.strings
deleted file mode 100644
index 7f722e4..0000000
Binary files a/hw/xquartz/bundle/ru.lproj/InfoPlist.strings and /dev/null differ
diff --git a/hw/xquartz/bundle/ru.lproj/Localizable.strings b/hw/xquartz/bundle/ru.lproj/Localizable.strings
deleted file mode 100644
index 3b38112..0000000
Binary files a/hw/xquartz/bundle/ru.lproj/Localizable.strings and /dev/null differ
diff --git a/hw/xquartz/bundle/ru.lproj/main.nib/keyedobjects.nib b/hw/xquartz/bundle/ru.lproj/main.nib/keyedobjects.nib
deleted file mode 100644
index 9354e02..0000000
Binary files a/hw/xquartz/bundle/ru.lproj/main.nib/keyedobjects.nib and /dev/null differ
diff --git a/hw/xquartz/bundle/sv.lproj/InfoPlist.strings b/hw/xquartz/bundle/sv.lproj/InfoPlist.strings
deleted file mode 100644
index 655d5ff..0000000
Binary files a/hw/xquartz/bundle/sv.lproj/InfoPlist.strings and /dev/null differ
diff --git a/hw/xquartz/bundle/sv.lproj/Localizable.strings b/hw/xquartz/bundle/sv.lproj/Localizable.strings
deleted file mode 100644
index 796f06c..0000000
Binary files a/hw/xquartz/bundle/sv.lproj/Localizable.strings and /dev/null differ
diff --git a/hw/xquartz/bundle/sv.lproj/main.nib/keyedobjects.nib b/hw/xquartz/bundle/sv.lproj/main.nib/keyedobjects.nib
deleted file mode 100644
index bd01c2d..0000000
Binary files a/hw/xquartz/bundle/sv.lproj/main.nib/keyedobjects.nib and /dev/null differ
diff --git a/hw/xquartz/bundle/zh_CN.lproj/InfoPlist.strings b/hw/xquartz/bundle/zh_CN.lproj/InfoPlist.strings
deleted file mode 100644
index b5df368..0000000
Binary files a/hw/xquartz/bundle/zh_CN.lproj/InfoPlist.strings and /dev/null differ
diff --git a/hw/xquartz/bundle/zh_CN.lproj/Localizable.strings b/hw/xquartz/bundle/zh_CN.lproj/Localizable.strings
deleted file mode 100644
index f88a6da..0000000
Binary files a/hw/xquartz/bundle/zh_CN.lproj/Localizable.strings and /dev/null differ
diff --git a/hw/xquartz/bundle/zh_CN.lproj/main.nib/keyedobjects.nib b/hw/xquartz/bundle/zh_CN.lproj/main.nib/keyedobjects.nib
deleted file mode 100644
index e36c15f..0000000
Binary files a/hw/xquartz/bundle/zh_CN.lproj/main.nib/keyedobjects.nib and /dev/null differ
diff --git a/hw/xquartz/bundle/zh_TW.lproj/InfoPlist.strings b/hw/xquartz/bundle/zh_TW.lproj/InfoPlist.strings
deleted file mode 100644
index 92d5473..0000000
Binary files a/hw/xquartz/bundle/zh_TW.lproj/InfoPlist.strings and /dev/null differ
diff --git a/hw/xquartz/bundle/zh_TW.lproj/Localizable.strings b/hw/xquartz/bundle/zh_TW.lproj/Localizable.strings
deleted file mode 100644
index f009302..0000000
Binary files a/hw/xquartz/bundle/zh_TW.lproj/Localizable.strings and /dev/null differ
diff --git a/hw/xquartz/bundle/zh_TW.lproj/main.nib/keyedobjects.nib b/hw/xquartz/bundle/zh_TW.lproj/main.nib/keyedobjects.nib
deleted file mode 100644
index 36602c5..0000000
Binary files a/hw/xquartz/bundle/zh_TW.lproj/main.nib/keyedobjects.nib and /dev/null differ
diff --git a/hw/xquartz/quartzStartup.c b/hw/xquartz/quartzStartup.c
index a4472e6..43f1502 100644
--- a/hw/xquartz/quartzStartup.c
+++ b/hw/xquartz/quartzStartup.c
@@ -94,7 +94,7 @@ void QuartzInitServer(int argc, char **argv, char **envp) {
     }
 }
 
-int main(int argc, char **argv, char **envp) {
+int server_main(int argc, char **argv, char **envp) {
     int         i;
     int         fd[2];
 
diff --git a/hw/xquartz/stub/Makefile.am b/hw/xquartz/stub/Makefile.am
new file mode 100644
index 0000000..3752dc1
--- /dev/null
+++ b/hw/xquartz/stub/Makefile.am
@@ -0,0 +1,11 @@
+AM_CPPFLAGS = \
+	-DBUILD_DATE=\"$(BUILD_DATE)\" \
+	-DXSERVER_VERSION=\"$(VERSION)\"
+
+bin_PROGRAMS = Xquartz
+
+Xquartz_SOURCES = \
+	stub.c
+
+Xquartz_LDFLAGS =  \
+	-framework CoreServices
diff --git a/hw/xquartz/stub/stub.c b/hw/xquartz/stub/stub.c
new file mode 100644
index 0000000..70f222c
--- /dev/null
+++ b/hw/xquartz/stub/stub.c
@@ -0,0 +1,96 @@
+/* Copyright (c) 2008 Apple Inc.
+ *
+ * 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 ABOVE LISTED COPYRIGHT
+ * HOLDER(S) 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 name(s) of the above
+ * 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.
+ */
+
+#include <CoreServices/CoreServices.h>
+
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#endif
+
+#include <string.h>
+#include <stdio.h>
+#include <unistd.h>
+
+#define kX11AppBundleId "org.x.X11"
+#define kX11AppBundlePath "/Contents/MacOS/X11"
+
+static char x11_path[PATH_MAX + 1];
+
+static void set_x11_path() {
+    CFURLRef appURL = NULL;
+    OSStatus osstatus = LSFindApplicationForInfo(kLSUnknownCreator, CFSTR(kX11AppBundleId), nil, nil, &appURL);
+    
+    switch (osstatus) {
+        case noErr:
+            if (appURL == NULL) {
+                fprintf(stderr, "xinit: Invalid response from LSFindApplicationForInfo(%s)\n", 
+                        kX11AppBundleId);
+                exit(1);
+            }
+            
+            if (!CFURLGetFileSystemRepresentation(appURL, true, (unsigned char *)x11_path, sizeof(x11_path))) {
+                fprintf(stderr, "xinit: Error resolving URL for %s\n", kX11AppBundleId);
+                exit(2);
+            }
+            
+            strlcat(x11_path, kX11AppBundlePath, sizeof(x11_path));
+#ifdef DEBUG
+            fprintf(stderr, "XQuartz: X11.app = %s\n", x11_path);
+#endif
+            break;
+        case kLSApplicationNotFoundErr:
+            fprintf(stderr, "XQuartz: Unable to find application for %s\n", kX11AppBundleId);
+            exit(4);
+        default:
+            fprintf(stderr, "XQuartz: Unable to find application for %s, error code = %d\n", 
+                    kX11AppBundleId, (int)osstatus);
+            exit(5);
+    }
+}
+
+#ifndef BUILD_DATE
+#define BUILD_DATE "?"
+#endif
+#ifndef XSERVER_VERSION
+#define XSERVER_VERSION "?"
+#endif
+
+int main(int argc, char **argv) {
+    
+    if(argc == 2 && !strcmp(argv[1], "-version")) {
+        fprintf(stderr, "X.org Release 7.3\n");
+        fprintf(stderr, "X.Org X Server %s\n", XSERVER_VERSION);
+        fprintf(stderr, "Build Date: %s\n", BUILD_DATE);
+        return 0;
+    }
+    
+    set_x11_path();
+    
+    argv[0] = x11_path;
+    return execvp(x11_path, argv);
+}
diff --git a/hw/xquartz/xpr/Makefile.am b/hw/xquartz/xpr/Makefile.am
index 41f2b86..6bf99a4 100644
--- a/hw/xquartz/xpr/Makefile.am
+++ b/hw/xquartz/xpr/Makefile.am
@@ -1,4 +1,5 @@
-bin_PROGRAMS = Xquartz
+x11appdir = $(APPLE_APPLICATIONS_DIR)/X11.app/Contents/MacOS
+x11app_PROGRAMS = X11
 
 AM_CFLAGS =  $(XSERVER_CFLAGS) $(DIX_CFLAGS)
 AM_CPPFLAGS = \
@@ -6,7 +7,7 @@ AM_CPPFLAGS = \
 	-I$(top_srcdir)/miext \
 	-I$(top_srcdir)/miext/rootless
 
-Xquartz_SOURCES = \
+X11_SOURCES = \
 	appledri.c \
 	dri.c \
 	xprAppleWM.c \
@@ -18,13 +19,13 @@ Xquartz_SOURCES = \
 	x-hook.c \
 	x-list.c
 
-Xquartz_LDADD = \
+X11_LDADD = \
 	$(top_builddir)/hw/xquartz/libXquartz.la \
 	$(top_builddir)/dix/dixfonts.lo \
 	$(top_builddir)/miext/rootless/librootless.la \
-	$(DARWIN_LIBS) $(XSERVER_LIBS) $(XSERVER_SYS_LIBS) -lXplugin
+	$(DARWIN_LIBS) $(XSERVER_LIBS) $(XSERVER_SYS_LIBS) -lXplugin -lX11
 
-Xquartz_LDFLAGS =  \
+X11_LDFLAGS =  \
 	-XCClinker -Objc \
 	-Wl,-u,_miDCInitialize \
 	-Wl,-framework,Carbon \
commit d41d677ab4118e73140ea2392e0d48eb361af1cf
Author: Ben Byer <bbyer at bushing.apple.com>
Date:   Mon May 5 20:55:08 2008 -0700

    Xquartz: experimental embedding of Sparkle.framework
    (cherry picked from commit b7a1a640cef8c69442859cbf89034ad362a19684)

diff --git a/hw/xquartz/bundle/English.lproj/main.nib/designable.nib b/hw/xquartz/bundle/English.lproj/main.nib/designable.nib
index c159d6e..c93d023 100644
--- a/hw/xquartz/bundle/English.lproj/main.nib/designable.nib
+++ b/hw/xquartz/bundle/English.lproj/main.nib/designable.nib
@@ -66,6 +66,14 @@
 									<reference key="NSOnImage" ref="531645050"/>
 									<reference key="NSMixedImage" ref="351811234"/>
 								</object>
+								<object class="NSMenuItem" id="858487910">
+									<reference key="NSMenu" ref="576521955"/>
+									<string key="NSTitle">Check for updates...</string>
+									<string key="NSKeyEquiv"/>
+									<int key="NSMnemonicLoc">2147483647</int>
+									<reference key="NSOnImage" ref="531645050"/>
+									<reference key="NSMixedImage" ref="351811234"/>
+								</object>
 								<object class="NSMenuItem" id="272876017">
 									<reference key="NSMenu" ref="576521955"/>
 									<bool key="NSIsDisabled">YES</bool>
@@ -1500,6 +1508,9 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 				</object>
 				<string key="NSName"/>
 			</object>
+			<object class="NSCustomObject" id="556755705">
+				<string key="NSClassName">SUUpdater</string>
+			</object>
 		</object>
 		<object class="IBObjectContainer" key="IBDocument.Objects">
 			<object class="NSMutableArray" key="connectionRecords">
@@ -2000,6 +2011,14 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 					</object>
 					<int key="connectionID">300394</int>
 				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBActionConnection" key="connection">
+						<string key="label">checkForUpdates:</string>
+						<reference key="source" ref="556755705"/>
+						<reference key="destination" ref="858487910"/>
+					</object>
+					<int key="connectionID">300397</int>
+				</object>
 			</object>
 			<object class="IBMutableOrderedSet" key="objectRecords">
 				<object class="NSArray" key="orderedObjects">
@@ -2136,6 +2155,7 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 							<reference ref="1023546148"/>
 							<reference ref="6876565"/>
 							<reference ref="479677589"/>
+							<reference ref="858487910"/>
 						</object>
 						<reference key="parent" ref="365880285"/>
 					</object>
@@ -3050,6 +3070,17 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 						<reference key="object" ref="989804990"/>
 						<reference key="parent" ref="57161931"/>
 					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">300395</int>
+						<reference key="object" ref="556755705"/>
+						<reference key="parent" ref="330408435"/>
+						<string key="objectName">Updater</string>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">300396</int>
+						<reference key="object" ref="858487910"/>
+						<reference key="parent" ref="576521955"/>
+					</object>
 				</object>
 			</object>
 			<object class="NSMutableDictionary" key="flattenedProperties">
@@ -3121,7 +3152,6 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 					<string>244.IBWindowTemplateEditedContentRect</string>
 					<string>244.ImportedFromIB2</string>
 					<string>244.editorWindowContentRectSynchronizationRect</string>
-					<string>244.lastResizeAction</string>
 					<string>244.windowTemplate.hasMaxSize</string>
 					<string>244.windowTemplate.hasMinSize</string>
 					<string>244.windowTemplate.maxSize</string>
@@ -3142,7 +3172,6 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 					<string>285.IBWindowTemplateEditedContentRect</string>
 					<string>285.ImportedFromIB2</string>
 					<string>285.editorWindowContentRectSynchronizationRect</string>
-					<string>285.lastResizeAction</string>
 					<string>285.windowTemplate.hasMaxSize</string>
 					<string>285.windowTemplate.hasMinSize</string>
 					<string>285.windowTemplate.maxSize</string>
@@ -3188,6 +3217,8 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 					<string>300368.ImportedFromIB2</string>
 					<string>300370.IBPluginDependency</string>
 					<string>300370.ImportedFromIB2</string>
+					<string>300395.IBPluginDependency</string>
+					<string>300396.IBPluginDependency</string>
 					<string>305.IBPluginDependency</string>
 					<string>305.ImportedFromIB2</string>
 					<string>310.IBPluginDependency</string>
@@ -3368,19 +3399,6 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 					<string>{{313, 353}, {484, 280}}</string>
 					<reference ref="9"/>
 					<string>{{184, 290}, {481, 345}}</string>
-					<object class="NSDictionary">
-						<bool key="EncodedWithXMLCoder">YES</bool>
-						<object class="NSMutableArray" key="dict.sortedKeys">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<string>IBResizeActionFinalFrame</string>
-							<string>IBResizeActionInitialFrame</string>
-						</object>
-						<object class="NSMutableArray" key="dict.values">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<string>{{182, 481}, {484, 280}}</string>
-							<string>{{182, 103}, {536, 658}}</string>
-						</object>
-					</object>
 					<reference ref="9"/>
 					<reference ref="9"/>
 					<string>{3.40282e+38, 3.40282e+38}</string>
@@ -3401,19 +3419,6 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 					<string>{{407, 545}, {454, 311}}</string>
 					<reference ref="9"/>
 					<string>{{433, 406}, {486, 327}}</string>
-					<object class="NSDictionary">
-						<bool key="EncodedWithXMLCoder">YES</bool>
-						<object class="NSMutableArray" key="dict.sortedKeys">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<string>IBResizeActionFinalFrame</string>
-							<string>IBResizeActionInitialFrame</string>
-						</object>
-						<object class="NSMutableArray" key="dict.values">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<string>{{537, 554}, {454, 311}}</string>
-							<string>{{537, 576}, {471, 289}}</string>
-						</object>
-					</object>
 					<integer value="0"/>
 					<reference ref="9"/>
 					<string>{3.40282e+38, 3.40282e+38}</string>
@@ -3460,6 +3465,8 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<reference ref="9"/>
 					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<reference ref="9"/>
 					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<reference ref="9"/>
@@ -3593,7 +3600,7 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 				</object>
 			</object>
 			<nil key="sourceID"/>
-			<int key="maxID">300394</int>
+			<int key="maxID">300397</int>
 		</object>
 		<object class="IBClassDescriber" key="IBDocument.Classes">
 			<object class="NSMutableArray" key="referencedPartialClassDescriptions">
@@ -3624,6 +3631,18 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 			<object class="NSMutableArray" key="referencedPartialClassDescriptionsV3.1+">
 				<bool key="EncodedWithXMLCoder">YES</bool>
 				<object class="IBPartialClassDescription">
+					<string key="className">SUUpdater</string>
+					<string key="superclassName">NSObject</string>
+					<object class="NSMutableDictionary" key="actions">
+						<string key="NS.key.0">checkForUpdates:</string>
+						<string key="NS.object.0">id</string>
+					</object>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBDocumentRelativeSource</string>
+						<string key="minorKey">../Sparkle.framework/Versions/A/Headers/SUUpdater.h</string>
+					</object>
+				</object>
+				<object class="IBPartialClassDescription">
 					<string key="className">X11Controller</string>
 					<string key="superclassName">NSObject</string>
 					<object class="NSMutableDictionary" key="actions">
@@ -3728,7 +3747,7 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 			</object>
 		</object>
 		<int key="IBDocument.localizationMode">0</int>
-		<nil key="IBDocument.LastKnownRelativeProjectPath"/>
+		<string key="IBDocument.LastKnownRelativeProjectPath">../X11.xcodeproj</string>
 		<int key="IBDocument.defaultPropertyAccessControl">3</int>
 	</data>
 </archive>
diff --git a/hw/xquartz/bundle/English.lproj/main.nib/keyedobjects.nib b/hw/xquartz/bundle/English.lproj/main.nib/keyedobjects.nib
index 95420e4..066fdbe 100644
Binary files a/hw/xquartz/bundle/English.lproj/main.nib/keyedobjects.nib and b/hw/xquartz/bundle/English.lproj/main.nib/keyedobjects.nib differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Headers b/hw/xquartz/bundle/Sparkle.framework/Headers
new file mode 120000
index 0000000..a177d2a
--- /dev/null
+++ b/hw/xquartz/bundle/Sparkle.framework/Headers
@@ -0,0 +1 @@
+Versions/Current/Headers
\ No newline at end of file
diff --git a/hw/xquartz/bundle/Sparkle.framework/Resources b/hw/xquartz/bundle/Sparkle.framework/Resources
new file mode 120000
index 0000000..953ee36
--- /dev/null
+++ b/hw/xquartz/bundle/Sparkle.framework/Resources
@@ -0,0 +1 @@
+Versions/Current/Resources
\ No newline at end of file
diff --git a/hw/xquartz/bundle/Sparkle.framework/Sparkle b/hw/xquartz/bundle/Sparkle.framework/Sparkle
new file mode 120000
index 0000000..b2c5273
--- /dev/null
+++ b/hw/xquartz/bundle/Sparkle.framework/Sparkle
@@ -0,0 +1 @@
+Versions/Current/Sparkle
\ No newline at end of file
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/NSApplication+AppCopies.h b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/NSApplication+AppCopies.h
new file mode 100644
index 0000000..ee901e6
--- /dev/null
+++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/NSApplication+AppCopies.h
@@ -0,0 +1,13 @@
+//
+//  NSApplication+AppCopies.h
+//  Sparkle
+//
+//  Created by Andy Matuschak on 3/16/06.
+//  Copyright 2006 Andy Matuschak. All rights reserved.
+//
+
+#import <Cocoa/Cocoa.h>
+
+ at interface NSApplication (SUAppCopies)
+- (int)copiesRunning;
+ at end
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/NSFileManager+Authentication.h b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/NSFileManager+Authentication.h
new file mode 100644
index 0000000..c995911
--- /dev/null
+++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/NSFileManager+Authentication.h
@@ -0,0 +1,11 @@
+//
+//  NSFileManager+Authentication.m
+//  Sparkle
+//
+//  Created by Andy Matuschak on 3/9/06.
+//  Copyright 2006 Andy Matuschak. All rights reserved.
+//
+
+ at interface NSFileManager (SUAuthenticationAdditions)
+- (BOOL)movePathWithAuthentication:(NSString *)src toPath:(NSString *)dst;
+ at end
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/NSFileManager+Verification.h b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/NSFileManager+Verification.h
new file mode 100644
index 0000000..f0ce7c2
--- /dev/null
+++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/NSFileManager+Verification.h
@@ -0,0 +1,15 @@
+//
+//  NSFileManager+Verification.h
+//  Sparkle
+//
+//  Created by Andy Matuschak on 3/16/06.
+//  Copyright 2006 Andy Matuschak. All rights reserved.
+//
+
+#import <Cocoa/Cocoa.h>
+
+// For the paranoid folks!
+ at interface NSFileManager (SUVerification)
+- (BOOL)validatePath:(NSString *)path withMD5Hash:(NSString *)hash;
+- (BOOL)validatePath:(NSString *)path withEncodedDSASignature:(NSString *)encodedSignature;
+ at end
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/NSString+extras.h b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/NSString+extras.h
new file mode 100755
index 0000000..498e4d0
--- /dev/null
+++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/NSString+extras.h
@@ -0,0 +1,61 @@
+/*
+
+BSD License
+
+Copyright (c) 2002, Brent Simmons
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+*	Redistributions of source code must retain the above copyright notice,
+	this list of conditions and the following disclaimer.
+*	Redistributions in binary form must reproduce the above copyright notice,
+	this list of conditions and the following disclaimer in the documentation
+	and/or other materials provided with the distribution.
+*	Neither the name of ranchero.com or Brent Simmons nor the names of its
+	contributors may be used to endorse or promote products derived
+	from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
+OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+*/
+
+
+/*
+	NSString+extras.h
+	NetNewsWire
+
+	Created by Brent Simmons on Fri Jun 14 2002.
+	Copyright (c) 2002 Brent Simmons. All rights reserved.
+*/
+
+
+#import <Foundation/Foundation.h>
+#import <CoreFoundation/CoreFoundation.h>
+
+
+ at interface NSString (extras)
+
+- (NSString *)stringWithSubstitute:(NSString *)subs forCharactersFromSet:(NSCharacterSet *)set;
+
+- (NSString *) trimWhiteSpace;
+
+- (NSString *) stripHTML;
+
+- (NSString *) ellipsizeAfterNWords: (int) n;
+
++ (BOOL) stringIsEmpty: (NSString *) s;
+
+
+ at end
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/RSS.h b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/RSS.h
new file mode 100755
index 0000000..82da04a
--- /dev/null
+++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/RSS.h
@@ -0,0 +1,98 @@
+/*
+
+BSD License
+
+Copyright (c) 2002, Brent Simmons
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+*	Redistributions of source code must retain the above copyright notice,
+	this list of conditions and the following disclaimer.
+*	Redistributions in binary form must reproduce the above copyright notice,
+	this list of conditions and the following disclaimer in the documentation
+	and/or other materials provided with the distribution.
+*	Neither the name of ranchero.com or Brent Simmons nor the names of its
+	contributors may be used to endorse or promote products derived
+	from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
+OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+*/
+
+/*
+	RSS.h
+	A class for reading RSS feeds.
+
+	Created by Brent Simmons on Wed Apr 17 2002.
+	Copyright (c) 2002 Brent Simmons. All rights reserved.
+*/
+
+
+#import <Cocoa/Cocoa.h>
+#import <CoreFoundation/CoreFoundation.h>
+#import "NSString+extras.h"
+
+
+ at interface RSS : NSObject {
+	
+	NSDictionary *headerItems;
+	NSMutableArray *newsItems;
+	NSString *version;
+	
+	BOOL flRdf;
+	BOOL normalize;
+	}
+
+
+/*Public*/
+
+- (RSS *) initWithTitle: (NSString *) title andDescription: (NSString *) description;
+
+- (RSS *) initWithData: (NSData *) rssData normalize: (BOOL) fl;
+
+- (RSS *) initWithURL: (NSURL *) url normalize: (BOOL) fl;
+- (RSS *) initWithURL: (NSURL *) url normalize: (BOOL) fl userAgent:(NSString *)userAgent;
+
+- (NSDictionary *) headerItems;
+
+- (NSMutableArray *) newsItems;
+
+- (NSString *) version;
+
+// AMM's extensions for Sparkle
+- (NSDictionary *)newestItem;
+
+
+/*Private*/
+
+- (void) createheaderdictionary: (CFXMLTreeRef) tree;
+
+- (void) createitemsarray: (CFXMLTreeRef) tree;
+
+- (void) setversionstring: (CFXMLTreeRef) tree;
+
+- (void) flattenimagechildren: (CFXMLTreeRef) tree into: (NSMutableDictionary *) dictionary;
+
+- (void) flattensourceattributes: (CFXMLNodeRef) node into: (NSMutableDictionary *) dictionary;
+
+- (CFXMLTreeRef) getchanneltree: (CFXMLTreeRef) tree;
+
+- (CFXMLTreeRef) getnamedtree: (CFXMLTreeRef) currentTree name: (NSString *) name;
+
+- (void) normalizeRSSItem: (NSMutableDictionary *) rssItem;
+
+- (NSString *) getelementvalue: (CFXMLTreeRef) tree;
+
+ at end
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/SUAppcast.h b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/SUAppcast.h
new file mode 100644
index 0000000..209fe20
--- /dev/null
+++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/SUAppcast.h
@@ -0,0 +1,27 @@
+//
+//  SUAppcast.h
+//  Sparkle
+//
+//  Created by Andy Matuschak on 3/12/06.
+//  Copyright 2006 Andy Matuschak. All rights reserved.
+//
+
+#import <Cocoa/Cocoa.h>
+
+ at class RSS, SUAppcastItem;
+ at interface SUAppcast : NSObject {
+	NSArray *items;
+	id delegate;
+}
+
+- (void)fetchAppcastFromURL:(NSURL *)url;
+- (void)setDelegate:delegate;
+
+- (SUAppcastItem *)newestItem;
+- (NSArray *)items;
+
+ at end
+
+ at interface NSObject (SUAppcastDelegate)
+- appcastDidFinishLoading:(SUAppcast *)appcast;
+ at end
\ No newline at end of file
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/SUAppcastItem.h b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/SUAppcastItem.h
new file mode 100644
index 0000000..c0202e3
--- /dev/null
+++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/SUAppcastItem.h
@@ -0,0 +1,57 @@
+//
+//  SUAppcastItem.h
+//  Sparkle
+//
+//  Created by Andy Matuschak on 3/12/06.
+//  Copyright 2006 Andy Matuschak. All rights reserved.
+//
+
+#import <Cocoa/Cocoa.h>
+
+
+ at interface SUAppcastItem : NSObject {
+	NSString *title;
+	NSDate *date;
+	NSString *description;
+	
+	NSURL *releaseNotesURL;
+	
+	NSString *DSASignature;
+	NSString *MD5Sum;
+	
+	NSURL *fileURL;
+	NSString *fileVersion;
+	NSString *versionString;
+}
+
+// Initializes with data from a dictionary provided by the RSS class.
+- initWithDictionary:(NSDictionary *)dict;
+
+- (NSString *)title;
+- (void)setTitle:(NSString *)aTitle;
+
+- (NSDate *)date;
+- (void)setDate:(NSDate *)aDate;
+
+- (NSString *)description;
+- (void)setDescription:(NSString *)aDescription;
+
+- (NSURL *)releaseNotesURL;
+- (void)setReleaseNotesURL:(NSURL *)aReleaseNotesURL;
+
+- (NSString *)DSASignature;
+- (void)setDSASignature:(NSString *)aDSASignature;
+
+- (NSString *)MD5Sum;
+- (void)setMD5Sum:(NSString *)aMd5Sum;
+
+- (NSURL *)fileURL;
+- (void)setFileURL:(NSURL *)aFileURL;
+
+- (NSString *)fileVersion;
+- (void)setFileVersion:(NSString *)aFileVersion;
+
+- (NSString *)versionString;
+- (void)setVersionString:(NSString *)versionString;
+
+ at end
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/SUAutomaticUpdateAlert.h b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/SUAutomaticUpdateAlert.h
new file mode 100644
index 0000000..fc0ac9f
--- /dev/null
+++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/SUAutomaticUpdateAlert.h
@@ -0,0 +1,21 @@
+//
+//  SUAutomaticUpdateAlert.h
+//  Sparkle
+//
+//  Created by Andy Matuschak on 3/18/06.
+//  Copyright 2006 Andy Matuschak. All rights reserved.
+//
+
+#import <Cocoa/Cocoa.h>
+
+ at class SUAppcastItem;
+ at interface SUAutomaticUpdateAlert : NSWindowController {
+	SUAppcastItem *updateItem;
+}
+
+- initWithAppcastItem:(SUAppcastItem *)item;
+
+- (IBAction)relaunchNow:sender;
+- (IBAction)relaunchLater:sender;
+
+ at end
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/SUConstants.h b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/SUConstants.h
new file mode 100644
index 0000000..bfbe625
--- /dev/null
+++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/SUConstants.h
@@ -0,0 +1,20 @@
+//
+//  SUConstants.h
+//  Sparkle
+//
+//  Created by Andy Matuschak on 3/16/06.
+//  Copyright 2006 Andy Matuschak. All rights reserved.
+//
+
+extern NSString *SUUpdaterWillRestartNotification;
+
+extern NSString *SUCheckAtStartupKey;
+extern NSString *SUFeedURLKey;
+extern NSString *SUShowReleaseNotesKey;
+extern NSString *SUSkippedVersionKey;
+extern NSString *SUScheduledCheckIntervalKey;
+extern NSString *SULastCheckTimeKey;
+extern NSString *SUExpectsDSASignatureKey;
+extern NSString *SUPublicDSAKeyKey;
+extern NSString *SUAutomaticallyUpdateKey;
+extern NSString *SUAllowsAutomaticUpdatesKey;
\ No newline at end of file
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/SUStatusChecker.h b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/SUStatusChecker.h
new file mode 100644
index 0000000..e83d152
--- /dev/null
+++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/SUStatusChecker.h
@@ -0,0 +1,26 @@
+//
+//  SUStatusChecker.h
+//  Sparkle
+//
+//  Created by Evan Schoenberg on 7/6/06.
+//
+
+#import <Cocoa/Cocoa.h>
+#import <Sparkle/SUUpdater.h>
+
+ at class SUStatusChecker;
+
+ at protocol SUStatusCheckerDelegate <NSObject>
+//versionString will be nil and isNewVersion will be NO if version checking fails.
+- (void)statusChecker:(SUStatusChecker *)statusChecker foundVersion:(NSString *)versionString isNewVersion:(BOOL)isNewVersion;
+ at end
+
+ at interface SUStatusChecker : SUUpdater {
+	id<SUStatusCheckerDelegate> scDelegate;
+}
+
+// Create a status checker which will notifiy delegate once the appcast version is determined.
+// Notification occurs via the method defined in the SUStatusCheckerDelegate informal protocol.
++ (SUStatusChecker *)statusCheckerForDelegate:(id<SUStatusCheckerDelegate>)delegate;
+
+ at end
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/SUStatusController.h b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/SUStatusController.h
new file mode 100644
index 0000000..19a3f89
--- /dev/null
+++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/SUStatusController.h
@@ -0,0 +1,33 @@
+//
+//  SUStatusController.h
+//  Sparkle
+//
+//  Created by Andy Matuschak on 3/14/06.
+//  Copyright 2006 Andy Matuschak. All rights reserved.
+//
+
+#import <Cocoa/Cocoa.h>
+
+
+ at interface SUStatusController : NSWindowController {
+	double progressValue, maxProgressValue;
+	NSString *title, *statusText, *buttonTitle;
+	IBOutlet NSButton *actionButton;
+}
+
+// Pass 0 for the max progress value to get an indeterminate progress bar.
+// Pass nil for the status text to not show it.
+- (void)beginActionWithTitle:(NSString *)title maxProgressValue:(double)maxProgressValue statusText:(NSString *)statusText;
+
+// If isDefault is YES, the button's key equivalent will be \r.
+- (void)setButtonTitle:(NSString *)buttonTitle target:target action:(SEL)action isDefault:(BOOL)isDefault;
+- (void)setButtonEnabled:(BOOL)enabled;
+
+- (double)progressValue;
+- (void)setProgressValue:(double)value;
+- (double)maxProgressValue;
+- (void)setMaxProgressValue:(double)value;
+
+- (void)setStatusText:(NSString *)statusText;
+
+ at end
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/SUUnarchiver.h b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/SUUnarchiver.h
new file mode 100644
index 0000000..da111c1
--- /dev/null
+++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/SUUnarchiver.h
@@ -0,0 +1,25 @@
+//
+//  SUUnarchiver.h
+//  Sparkle
+//
+//  Created by Andy Matuschak on 3/16/06.
+//  Copyright 2006 Andy Matuschak. All rights reserved.
+//
+
+#import <Cocoa/Cocoa.h>
+
+
+ at interface SUUnarchiver : NSObject {
+	id delegate;
+}
+
+- (void)unarchivePath:(NSString *)path;
+- (void)setDelegate:delegate;
+
+ at end
+
+ at interface NSObject (SUUnarchiverDelegate)
+- (void)unarchiver:(SUUnarchiver *)unarchiver extractedLength:(long)length;
+- (void)unarchiverDidFinish:(SUUnarchiver *)unarchiver;
+- (void)unarchiverDidFail:(SUUnarchiver *)unarchiver;
+ at end
\ No newline at end of file
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/SUUpdateAlert.h b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/SUUpdateAlert.h
new file mode 100644
index 0000000..69c2817
--- /dev/null
+++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/SUUpdateAlert.h
@@ -0,0 +1,40 @@
+//
+//  SUUpdateAlert.h
+//  Sparkle
+//
+//  Created by Andy Matuschak on 3/12/06.
+//  Copyright 2006 Andy Matuschak. All rights reserved.
+//
+
+#import <Cocoa/Cocoa.h>
+
+typedef enum
+{
+	SUInstallUpdateChoice,
+	SURemindMeLaterChoice,
+	SUSkipThisVersionChoice
+} SUUpdateAlertChoice;
+
+ at class WebView, SUAppcastItem;
+ at interface SUUpdateAlert : NSWindowController {
+	SUAppcastItem *updateItem;
+	id delegate;
+	
+	IBOutlet WebView *releaseNotesView;
+	IBOutlet NSTextField *description;
+	NSProgressIndicator *releaseNotesSpinner;
+	BOOL webViewFinishedLoading;
+}
+
+- initWithAppcastItem:(SUAppcastItem *)item;
+- (void)setDelegate:delegate;
+
+- (IBAction)installUpdate:sender;
+- (IBAction)skipThisVersion:sender;
+- (IBAction)remindMeLater:sender;
+
+ at end
+
+ at interface NSObject (SUUpdateAlertDelegate)
+- (void)updateAlert:(SUUpdateAlert *)updateAlert finishedWithChoice:(SUUpdateAlertChoice)updateChoice;
+ at end
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/SUUpdater.h b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/SUUpdater.h
new file mode 100644
index 0000000..5f82914
--- /dev/null
+++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/SUUpdater.h
@@ -0,0 +1,55 @@
+//
+//  SUUpdater.h
+//  Sparkle
+//
+//  Created by Andy Matuschak on 1/4/06.
+//  Copyright 2006 Andy Matuschak. All rights reserved.
+//
+
+#import <Cocoa/Cocoa.h>
+
+// Before you use Sparkle in your app, you must set SUFeedURL in Info.plist to the
+// address of the appcast on your webserver. If you don't already have an 
+// appcast, please see the Sparkle documentation to learn about how to set one up.
+
+// .zip, .dmg, .tar, .tbz, .tgz archives are supported at this time.
+
+// By default, Sparkle offers to show the user the release notes of the build they'll be
+// getting, which it assumes are in the description (or body) field of the relevant RSS item.
+// Set SUShowReleaseNotes to <false/> in Info.plist to hide the button.
+
+ at class SUAppcastItem, SUUpdateAlert, SUStatusController;
+ at interface SUUpdater : NSObject {
+	SUAppcastItem *updateItem;
+	
+	SUStatusController *statusController;
+	SUUpdateAlert *updateAlert;
+	
+	NSURLDownload *downloader;
+	NSString *downloadPath;
+			
+	NSTimer *checkTimer;
+	NSTimeInterval checkInterval;	
+	
+	BOOL verbose;
+	BOOL updateInProgress;
+}
+
+// This IBAction is meant for a main menu item. Hook up any menu item to this action,
+// and Sparkle will check for updates and report back its findings verbosely.
+- (IBAction)checkForUpdates:sender;
+
+// This method is similar to the above, but it's intended for updates initiated by
+// the computer instead of by the user. It does not alert the user when he is up to date,
+// and it remains silent about network errors in fetching the feed. This is what you
+// want to call to update programmatically; only use checkForUpdates: with buttons and menu items.
+- (void)checkForUpdatesInBackground;
+
+// This method allows you to schedule a check to run every time interval. You can
+// pass 0 to this method to cancel a previously scheduled timer. You probably don't want
+// to call this directly: if you set a SUScheduledCheckInterval key in Info.plist or
+// the user defaults, Sparkle will set this up for you automatically on startup. You might
+// just want to call this every time the user changes the setting in the preferences.
+- (void)scheduleCheckWithInterval:(NSTimeInterval)interval;
+
+ at end
\ No newline at end of file
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/SUUtilities.h b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/SUUtilities.h
new file mode 100644
index 0000000..5af3550
--- /dev/null
+++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/SUUtilities.h
@@ -0,0 +1,20 @@
+//
+//  SUUtilities.h
+//  Sparkle
+//
+//  Created by Andy Matuschak on 3/12/06.
+//  Copyright 2006 Andy Matuschak. All rights reserved.
+//
+
+#import <Cocoa/Cocoa.h>
+
+id SUInfoValueForKey(NSString *key);
+NSString *SUHostAppName();
+NSString *SUHostAppDisplayName();
+NSString *SUHostAppVersion();
+NSString *SUHostAppVersionString();
+
+NSComparisonResult SUStandardVersionComparison(NSString * versionA, NSString * versionB);
+
+// If running make localizable-strings for genstrings, ignore the error on this line.
+NSString *SULocalizedString(NSString *key, NSString *comment);
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/Sparkle.h b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/Sparkle.h
new file mode 100644
index 0000000..13e9b21
--- /dev/null
+++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/Sparkle.h
@@ -0,0 +1,22 @@
+//
+//  Sparkle.h
+//  Sparkle
+//
+//  Created by Andy Matuschak on 3/16/06.
+//  Copyright 2006 Andy Matuschak. All rights reserved.
+//
+
+#import "SUUpdater.h"
+#import "SUUtilities.h"
+#import "SUConstants.h"
+#import "SUAppcast.h"
+#import "SUAppcastItem.h"
+#import "SUUpdateAlert.h"
+#import "SUAutomaticUpdateAlert.h"
+#import "SUStatusController.h"
+#import "SUUnarchiver.h"
+#import "SUStatusChecker.h"
+
+#import "NSApplication+AppCopies.h"
+#import "NSFileManager+Authentication.h"
+#import "NSFileManager+Verification.h"
\ No newline at end of file
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/Info.plist b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/Info.plist
new file mode 100644
index 0000000..c154cb6
--- /dev/null
+++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/Info.plist
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>CFBundleDevelopmentRegion</key>
+	<string>English</string>
+	<key>CFBundleExecutable</key>
+	<string>Sparkle</string>
+	<key>CFBundleIdentifier</key>
+	<string>org.andymatuschak.Sparkle</string>
+	<key>CFBundleInfoDictionaryVersion</key>
+	<string>6.0</string>
+	<key>CFBundleName</key>
+	<string>Sparkle</string>
+	<key>CFBundlePackageType</key>
+	<string>FMWK</string>
+	<key>CFBundleSignature</key>
+	<string>????</string>
+	<key>CFBundleVersion</key>
+	<string>1.1</string>
+</dict>
+</plist>
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/SUStatus.nib/classes.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/SUStatus.nib/classes.nib
new file mode 100644
index 0000000..ff40c9d
--- /dev/null
+++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/SUStatus.nib/classes.nib
@@ -0,0 +1,12 @@
+{
+    IBClasses = (
+        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
+        {
+            CLASS = SUStatusController; 
+            LANGUAGE = ObjC; 
+            OUTLETS = {actionButton = id; }; 
+            SUPERCLASS = NSWindowController; 
+        }
+    ); 
+    IBVersion = 1; 
+}
\ No newline at end of file
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/SUStatus.nib/info.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/SUStatus.nib/info.nib
new file mode 100644
index 0000000..9918344
--- /dev/null
+++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/SUStatus.nib/info.nib
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>IBDocumentLocation</key>
+	<string>69 10 356 240 0 0 1280 832 </string>
+	<key>IBFramework Version</key>
+	<string>443.0</string>
+	<key>IBOpenObjects</key>
+	<array>
+		<integer>5</integer>
+	</array>
+	<key>IBSystem Version</key>
+	<string>8H14</string>
+</dict>
+</plist>
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/SUStatus.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/SUStatus.nib/keyedobjects.nib
new file mode 100644
index 0000000..378b22f
Binary files /dev/null and b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/SUStatus.nib/keyedobjects.nib differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ca.lproj/SUAutomaticUpdateAlert.nib/classes.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ca.lproj/SUAutomaticUpdateAlert.nib/classes.nib
new file mode 100644
index 0000000..3e65b1f
--- /dev/null
+++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ca.lproj/SUAutomaticUpdateAlert.nib/classes.nib
@@ -0,0 +1,12 @@
+{
+    IBClasses = (
+        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
+        {
+            ACTIONS = {relaunchLater = id; relaunchNow = id; }; 
+            CLASS = SUAutomaticUpdateAlert; 
+            LANGUAGE = ObjC; 
+            SUPERCLASS = NSWindowController; 
+        }
+    ); 
+    IBVersion = 1; 
+}
\ No newline at end of file
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ca.lproj/SUAutomaticUpdateAlert.nib/info.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ca.lproj/SUAutomaticUpdateAlert.nib/info.nib
new file mode 100644
index 0000000..5a75680
--- /dev/null
+++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ca.lproj/SUAutomaticUpdateAlert.nib/info.nib
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>IBDocumentLocation</key>
+	<string>188 142 356 240 0 0 1280 1002 </string>
+	<key>IBFramework Version</key>
+	<string>443.0</string>
+	<key>IBSystem Version</key>
+	<string>8I127</string>
+</dict>
+</plist>
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ca.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ca.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib
new file mode 100644
index 0000000..15daf30
Binary files /dev/null and b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ca.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ca.lproj/SUUpdateAlert.nib/classes.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ca.lproj/SUUpdateAlert.nib/classes.nib
new file mode 100644
index 0000000..0071ac0
--- /dev/null
+++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ca.lproj/SUUpdateAlert.nib/classes.nib
@@ -0,0 +1,21 @@
+{
+    IBClasses = (
+        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
+        {CLASS = NSObject; LANGUAGE = ObjC; }, 
+        {
+            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
+            CLASS = SUUpdateAlert; 
+            LANGUAGE = ObjC; 
+            OUTLETS = {description = NSTextField; releaseNotesView = WebView; }; 
+            SUPERCLASS = NSWindowController; 
+        }, 
+        {
+            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
+            CLASS = SUUpdateAlertController; 
+            LANGUAGE = ObjC; 
+            OUTLETS = {releaseNotesView = id; }; 
+            SUPERCLASS = NSWindowController; 
+        }
+    ); 
+    IBVersion = 1; 
+}
\ No newline at end of file
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ca.lproj/SUUpdateAlert.nib/info.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ca.lproj/SUUpdateAlert.nib/info.nib
new file mode 100644
index 0000000..2b25ad0
--- /dev/null
+++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ca.lproj/SUUpdateAlert.nib/info.nib
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>IBDocumentLocation</key>
+	<string>425 40 356 240 0 0 1280 832 </string>
+	<key>IBFramework Version</key>
+	<string>446.1</string>
+	<key>IBOpenObjects</key>
+	<array>
+		<integer>5</integer>
+	</array>
+	<key>IBSystem Version</key>
+	<string>8I127</string>
+</dict>
+</plist>
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ca.lproj/SUUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ca.lproj/SUUpdateAlert.nib/keyedobjects.nib
new file mode 100644
index 0000000..17f2f3d
Binary files /dev/null and b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ca.lproj/SUUpdateAlert.nib/keyedobjects.nib differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ca.lproj/Sparkle.strings b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ca.lproj/Sparkle.strings
new file mode 100644
index 0000000..329426c
Binary files /dev/null and b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ca.lproj/Sparkle.strings differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/cs.lproj/SUAutomaticUpdateAlert.nib/classes.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/cs.lproj/SUAutomaticUpdateAlert.nib/classes.nib
new file mode 100644
index 0000000..3e65b1f
--- /dev/null
+++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/cs.lproj/SUAutomaticUpdateAlert.nib/classes.nib
@@ -0,0 +1,12 @@
+{
+    IBClasses = (
+        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
+        {
+            ACTIONS = {relaunchLater = id; relaunchNow = id; }; 
+            CLASS = SUAutomaticUpdateAlert; 
+            LANGUAGE = ObjC; 
+            SUPERCLASS = NSWindowController; 
+        }
+    ); 
+    IBVersion = 1; 
+}
\ No newline at end of file
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/cs.lproj/SUAutomaticUpdateAlert.nib/info.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/cs.lproj/SUAutomaticUpdateAlert.nib/info.nib
new file mode 100644
index 0000000..0820302
--- /dev/null
+++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/cs.lproj/SUAutomaticUpdateAlert.nib/info.nib
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>IBDocumentLocation</key>
+	<string>136 94 356 240 0 0 1024 746 </string>
+	<key>IBFramework Version</key>
+	<string>443.0</string>
+	<key>IBSystem Version</key>
+	<string>8I127</string>
+</dict>
+</plist>
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/cs.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/cs.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib
new file mode 100644
index 0000000..ac43a0c
Binary files /dev/null and b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/cs.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/cs.lproj/SUUpdateAlert.nib/classes.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/cs.lproj/SUUpdateAlert.nib/classes.nib
new file mode 100644
index 0000000..0071ac0
--- /dev/null
+++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/cs.lproj/SUUpdateAlert.nib/classes.nib
@@ -0,0 +1,21 @@
+{
+    IBClasses = (
+        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
+        {CLASS = NSObject; LANGUAGE = ObjC; }, 
+        {
+            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
+            CLASS = SUUpdateAlert; 
+            LANGUAGE = ObjC; 
+            OUTLETS = {description = NSTextField; releaseNotesView = WebView; }; 
+            SUPERCLASS = NSWindowController; 
+        }, 
+        {
+            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
+            CLASS = SUUpdateAlertController; 
+            LANGUAGE = ObjC; 
+            OUTLETS = {releaseNotesView = id; }; 
+            SUPERCLASS = NSWindowController; 
+        }
+    ); 
+    IBVersion = 1; 
+}
\ No newline at end of file
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/cs.lproj/SUUpdateAlert.nib/info.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/cs.lproj/SUUpdateAlert.nib/info.nib
new file mode 100644
index 0000000..2b25ad0
--- /dev/null
+++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/cs.lproj/SUUpdateAlert.nib/info.nib
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>IBDocumentLocation</key>
+	<string>425 40 356 240 0 0 1280 832 </string>
+	<key>IBFramework Version</key>
+	<string>446.1</string>
+	<key>IBOpenObjects</key>
+	<array>
+		<integer>5</integer>
+	</array>
+	<key>IBSystem Version</key>
+	<string>8I127</string>
+</dict>
+</plist>
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/cs.lproj/SUUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/cs.lproj/SUUpdateAlert.nib/keyedobjects.nib
new file mode 100644
index 0000000..2084963
Binary files /dev/null and b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/cs.lproj/SUUpdateAlert.nib/keyedobjects.nib differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/cs.lproj/Sparkle.strings b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/cs.lproj/Sparkle.strings
new file mode 100644
index 0000000..232852c
Binary files /dev/null and b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/cs.lproj/Sparkle.strings differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/cy.lproj/SUAutomaticUpdateAlert.nib/classes.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/cy.lproj/SUAutomaticUpdateAlert.nib/classes.nib
new file mode 100644
index 0000000..3e65b1f
--- /dev/null
+++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/cy.lproj/SUAutomaticUpdateAlert.nib/classes.nib
@@ -0,0 +1,12 @@
+{
+    IBClasses = (
+        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
+        {
+            ACTIONS = {relaunchLater = id; relaunchNow = id; }; 
+            CLASS = SUAutomaticUpdateAlert; 
+            LANGUAGE = ObjC; 
+            SUPERCLASS = NSWindowController; 
+        }
+    ); 
+    IBVersion = 1; 
+}
\ No newline at end of file
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/cy.lproj/SUAutomaticUpdateAlert.nib/info.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/cy.lproj/SUAutomaticUpdateAlert.nib/info.nib
new file mode 100644
index 0000000..5a75680
--- /dev/null
+++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/cy.lproj/SUAutomaticUpdateAlert.nib/info.nib
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>IBDocumentLocation</key>
+	<string>188 142 356 240 0 0 1280 1002 </string>
+	<key>IBFramework Version</key>
+	<string>443.0</string>
+	<key>IBSystem Version</key>
+	<string>8I127</string>
+</dict>
+</plist>
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/cy.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/cy.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib
new file mode 100644
index 0000000..b619eb4
Binary files /dev/null and b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/cy.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/cy.lproj/SUUpdateAlert.nib/classes.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/cy.lproj/SUUpdateAlert.nib/classes.nib
new file mode 100644
index 0000000..0071ac0
--- /dev/null
+++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/cy.lproj/SUUpdateAlert.nib/classes.nib
@@ -0,0 +1,21 @@
+{
+    IBClasses = (
+        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
+        {CLASS = NSObject; LANGUAGE = ObjC; }, 
+        {
+            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
+            CLASS = SUUpdateAlert; 
+            LANGUAGE = ObjC; 
+            OUTLETS = {description = NSTextField; releaseNotesView = WebView; }; 
+            SUPERCLASS = NSWindowController; 
+        }, 
+        {
+            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
+            CLASS = SUUpdateAlertController; 
+            LANGUAGE = ObjC; 
+            OUTLETS = {releaseNotesView = id; }; 
+            SUPERCLASS = NSWindowController; 
+        }
+    ); 
+    IBVersion = 1; 
+}
\ No newline at end of file
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/cy.lproj/SUUpdateAlert.nib/info.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/cy.lproj/SUUpdateAlert.nib/info.nib
new file mode 100644
index 0000000..2b25ad0
--- /dev/null
+++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/cy.lproj/SUUpdateAlert.nib/info.nib
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>IBDocumentLocation</key>
+	<string>425 40 356 240 0 0 1280 832 </string>
+	<key>IBFramework Version</key>
+	<string>446.1</string>
+	<key>IBOpenObjects</key>
+	<array>
+		<integer>5</integer>
+	</array>
+	<key>IBSystem Version</key>
+	<string>8I127</string>
+</dict>
+</plist>
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/cy.lproj/SUUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/cy.lproj/SUUpdateAlert.nib/keyedobjects.nib
new file mode 100644
index 0000000..81c59b7
Binary files /dev/null and b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/cy.lproj/SUUpdateAlert.nib/keyedobjects.nib differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/cy.lproj/Sparkle.strings b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/cy.lproj/Sparkle.strings
new file mode 100644
index 0000000..08538d3
Binary files /dev/null and b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/cy.lproj/Sparkle.strings differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/da.lproj/SUAutomaticUpdateAlert.nib/classes.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/da.lproj/SUAutomaticUpdateAlert.nib/classes.nib
new file mode 100644
index 0000000..3e65b1f
--- /dev/null
+++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/da.lproj/SUAutomaticUpdateAlert.nib/classes.nib
@@ -0,0 +1,12 @@
+{
+    IBClasses = (
+        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
+        {
+            ACTIONS = {relaunchLater = id; relaunchNow = id; }; 
+            CLASS = SUAutomaticUpdateAlert; 
+            LANGUAGE = ObjC; 
+            SUPERCLASS = NSWindowController; 
+        }
+    ); 
+    IBVersion = 1; 
+}
\ No newline at end of file
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/da.lproj/SUAutomaticUpdateAlert.nib/info.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/da.lproj/SUAutomaticUpdateAlert.nib/info.nib
new file mode 100644
index 0000000..5a75680
--- /dev/null
+++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/da.lproj/SUAutomaticUpdateAlert.nib/info.nib
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>IBDocumentLocation</key>
+	<string>188 142 356 240 0 0 1280 1002 </string>
+	<key>IBFramework Version</key>
+	<string>443.0</string>
+	<key>IBSystem Version</key>
+	<string>8I127</string>
+</dict>
+</plist>
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/da.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/da.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib
new file mode 100644
index 0000000..d371ff2
Binary files /dev/null and b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/da.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/da.lproj/SUUpdateAlert.nib/classes.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/da.lproj/SUUpdateAlert.nib/classes.nib
new file mode 100644
index 0000000..0071ac0
--- /dev/null
+++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/da.lproj/SUUpdateAlert.nib/classes.nib
@@ -0,0 +1,21 @@
+{
+    IBClasses = (
+        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
+        {CLASS = NSObject; LANGUAGE = ObjC; }, 
+        {
+            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
+            CLASS = SUUpdateAlert; 
+            LANGUAGE = ObjC; 
+            OUTLETS = {description = NSTextField; releaseNotesView = WebView; }; 
+            SUPERCLASS = NSWindowController; 
+        }, 
+        {
+            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
+            CLASS = SUUpdateAlertController; 
+            LANGUAGE = ObjC; 
+            OUTLETS = {releaseNotesView = id; }; 
+            SUPERCLASS = NSWindowController; 
+        }
+    ); 
+    IBVersion = 1; 
+}
\ No newline at end of file
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/da.lproj/SUUpdateAlert.nib/info.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/da.lproj/SUUpdateAlert.nib/info.nib
new file mode 100644
index 0000000..2b25ad0
--- /dev/null
+++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/da.lproj/SUUpdateAlert.nib/info.nib
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>IBDocumentLocation</key>
+	<string>425 40 356 240 0 0 1280 832 </string>
+	<key>IBFramework Version</key>
+	<string>446.1</string>
+	<key>IBOpenObjects</key>
+	<array>
+		<integer>5</integer>
+	</array>
+	<key>IBSystem Version</key>
+	<string>8I127</string>
+</dict>
+</plist>
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/da.lproj/SUUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/da.lproj/SUUpdateAlert.nib/keyedobjects.nib
new file mode 100644
index 0000000..d51f9ad
Binary files /dev/null and b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/da.lproj/SUUpdateAlert.nib/keyedobjects.nib differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/da.lproj/Sparkle.strings b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/da.lproj/Sparkle.strings
new file mode 100644
index 0000000..f979099
Binary files /dev/null and b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/da.lproj/Sparkle.strings differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/de.lproj/SUAutomaticUpdateAlert.nib/classes.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/de.lproj/SUAutomaticUpdateAlert.nib/classes.nib
new file mode 100644
index 0000000..3e65b1f
--- /dev/null
+++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/de.lproj/SUAutomaticUpdateAlert.nib/classes.nib
@@ -0,0 +1,12 @@
+{
+    IBClasses = (
+        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
+        {
+            ACTIONS = {relaunchLater = id; relaunchNow = id; }; 
+            CLASS = SUAutomaticUpdateAlert; 
+            LANGUAGE = ObjC; 
+            SUPERCLASS = NSWindowController; 
+        }
+    ); 
+    IBVersion = 1; 
+}
\ No newline at end of file
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/de.lproj/SUAutomaticUpdateAlert.nib/info.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/de.lproj/SUAutomaticUpdateAlert.nib/info.nib
new file mode 100644
index 0000000..5a75680
--- /dev/null
+++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/de.lproj/SUAutomaticUpdateAlert.nib/info.nib
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>IBDocumentLocation</key>
+	<string>188 142 356 240 0 0 1280 1002 </string>
+	<key>IBFramework Version</key>
+	<string>443.0</string>
+	<key>IBSystem Version</key>
+	<string>8I127</string>
+</dict>
+</plist>
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/de.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/de.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib
new file mode 100644
index 0000000..0808fc6
Binary files /dev/null and b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/de.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/de.lproj/SUUpdateAlert.nib/classes.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/de.lproj/SUUpdateAlert.nib/classes.nib
new file mode 100644
index 0000000..0071ac0
--- /dev/null
+++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/de.lproj/SUUpdateAlert.nib/classes.nib
@@ -0,0 +1,21 @@
+{
+    IBClasses = (
+        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
+        {CLASS = NSObject; LANGUAGE = ObjC; }, 
+        {
+            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
+            CLASS = SUUpdateAlert; 
+            LANGUAGE = ObjC; 
+            OUTLETS = {description = NSTextField; releaseNotesView = WebView; }; 
+            SUPERCLASS = NSWindowController; 
+        }, 
+        {
+            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
+            CLASS = SUUpdateAlertController; 
+            LANGUAGE = ObjC; 
+            OUTLETS = {releaseNotesView = id; }; 
+            SUPERCLASS = NSWindowController; 
+        }
+    ); 
+    IBVersion = 1; 
+}
\ No newline at end of file
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/de.lproj/SUUpdateAlert.nib/info.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/de.lproj/SUUpdateAlert.nib/info.nib
new file mode 100644
index 0000000..2b25ad0
--- /dev/null
+++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/de.lproj/SUUpdateAlert.nib/info.nib
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>IBDocumentLocation</key>
+	<string>425 40 356 240 0 0 1280 832 </string>
+	<key>IBFramework Version</key>
+	<string>446.1</string>
+	<key>IBOpenObjects</key>
+	<array>
+		<integer>5</integer>
+	</array>
+	<key>IBSystem Version</key>
+	<string>8I127</string>
+</dict>
+</plist>
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/de.lproj/SUUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/de.lproj/SUUpdateAlert.nib/keyedobjects.nib
new file mode 100644
index 0000000..aeec008
Binary files /dev/null and b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/de.lproj/SUUpdateAlert.nib/keyedobjects.nib differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/de.lproj/Sparkle.strings b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/de.lproj/Sparkle.strings
new file mode 100644
index 0000000..92064db
Binary files /dev/null and b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/de.lproj/Sparkle.strings differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/en.lproj/SUAutomaticUpdateAlert.nib/classes.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/en.lproj/SUAutomaticUpdateAlert.nib/classes.nib
new file mode 100644
index 0000000..3e65b1f
--- /dev/null
+++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/en.lproj/SUAutomaticUpdateAlert.nib/classes.nib
@@ -0,0 +1,12 @@
+{
+    IBClasses = (
+        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
+        {
+            ACTIONS = {relaunchLater = id; relaunchNow = id; }; 
+            CLASS = SUAutomaticUpdateAlert; 
+            LANGUAGE = ObjC; 
+            SUPERCLASS = NSWindowController; 
+        }
+    ); 
+    IBVersion = 1; 
+}
\ No newline at end of file
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/en.lproj/SUAutomaticUpdateAlert.nib/info.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/en.lproj/SUAutomaticUpdateAlert.nib/info.nib
new file mode 100644
index 0000000..2f65f2f
--- /dev/null
+++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/en.lproj/SUAutomaticUpdateAlert.nib/info.nib
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>IBDocumentLocation</key>
+	<string>188 142 356 240 0 0 1280 1002 </string>
+	<key>IBFramework Version</key>
+	<string>443.0</string>
+	<key>IBOpenObjects</key>
+	<array>
+		<integer>5</integer>
+	</array>
+	<key>IBSystem Version</key>
+	<string>8H14</string>
+</dict>
+</plist>
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/en.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/en.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib
new file mode 100644
index 0000000..c4201cf
Binary files /dev/null and b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/en.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/en.lproj/SUUpdateAlert.nib/classes.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/en.lproj/SUUpdateAlert.nib/classes.nib
new file mode 100644
index 0000000..0071ac0
--- /dev/null
+++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/en.lproj/SUUpdateAlert.nib/classes.nib
@@ -0,0 +1,21 @@
+{
+    IBClasses = (
+        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
+        {CLASS = NSObject; LANGUAGE = ObjC; }, 
+        {
+            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
+            CLASS = SUUpdateAlert; 
+            LANGUAGE = ObjC; 
+            OUTLETS = {description = NSTextField; releaseNotesView = WebView; }; 
+            SUPERCLASS = NSWindowController; 
+        }, 
+        {
+            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
+            CLASS = SUUpdateAlertController; 
+            LANGUAGE = ObjC; 
+            OUTLETS = {releaseNotesView = id; }; 
+            SUPERCLASS = NSWindowController; 
+        }
+    ); 
+    IBVersion = 1; 
+}
\ No newline at end of file
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/en.lproj/SUUpdateAlert.nib/info.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/en.lproj/SUUpdateAlert.nib/info.nib
new file mode 100644
index 0000000..2b25ad0
--- /dev/null
+++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/en.lproj/SUUpdateAlert.nib/info.nib
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>IBDocumentLocation</key>
+	<string>425 40 356 240 0 0 1280 832 </string>
+	<key>IBFramework Version</key>
+	<string>446.1</string>
+	<key>IBOpenObjects</key>
+	<array>
+		<integer>5</integer>
+	</array>
+	<key>IBSystem Version</key>
+	<string>8I127</string>
+</dict>
+</plist>
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/en.lproj/SUUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/en.lproj/SUUpdateAlert.nib/keyedobjects.nib
new file mode 100644
index 0000000..be3dbd9
Binary files /dev/null and b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/en.lproj/SUUpdateAlert.nib/keyedobjects.nib differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/en.lproj/Sparkle.strings b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/en.lproj/Sparkle.strings
new file mode 100644
index 0000000..6bf42f7
Binary files /dev/null and b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/en.lproj/Sparkle.strings differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/es.lproj/SUAutomaticUpdateAlert.nib/classes.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/es.lproj/SUAutomaticUpdateAlert.nib/classes.nib
new file mode 100644
index 0000000..3e65b1f
--- /dev/null
+++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/es.lproj/SUAutomaticUpdateAlert.nib/classes.nib
@@ -0,0 +1,12 @@
+{
+    IBClasses = (
+        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
+        {
+            ACTIONS = {relaunchLater = id; relaunchNow = id; }; 
+            CLASS = SUAutomaticUpdateAlert; 
+            LANGUAGE = ObjC; 
+            SUPERCLASS = NSWindowController; 
+        }
+    ); 
+    IBVersion = 1; 
+}
\ No newline at end of file
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/es.lproj/SUAutomaticUpdateAlert.nib/info.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/es.lproj/SUAutomaticUpdateAlert.nib/info.nib
new file mode 100644
index 0000000..5a75680
--- /dev/null
+++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/es.lproj/SUAutomaticUpdateAlert.nib/info.nib
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>IBDocumentLocation</key>
+	<string>188 142 356 240 0 0 1280 1002 </string>
+	<key>IBFramework Version</key>
+	<string>443.0</string>
+	<key>IBSystem Version</key>
+	<string>8I127</string>
+</dict>
+</plist>
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/es.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/es.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib
new file mode 100644
index 0000000..b619eb4
Binary files /dev/null and b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/es.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/es.lproj/SUUpdateAlert.nib/classes.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/es.lproj/SUUpdateAlert.nib/classes.nib
new file mode 100644
index 0000000..0071ac0
--- /dev/null
+++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/es.lproj/SUUpdateAlert.nib/classes.nib
@@ -0,0 +1,21 @@
+{
+    IBClasses = (
+        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
+        {CLASS = NSObject; LANGUAGE = ObjC; }, 
+        {
+            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
+            CLASS = SUUpdateAlert; 
+            LANGUAGE = ObjC; 
+            OUTLETS = {description = NSTextField; releaseNotesView = WebView; }; 
+            SUPERCLASS = NSWindowController; 
+        }, 
+        {
+            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
+            CLASS = SUUpdateAlertController; 
+            LANGUAGE = ObjC; 
+            OUTLETS = {releaseNotesView = id; }; 
+            SUPERCLASS = NSWindowController; 
+        }
+    ); 
+    IBVersion = 1; 
+}
\ No newline at end of file
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/es.lproj/SUUpdateAlert.nib/info.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/es.lproj/SUUpdateAlert.nib/info.nib
new file mode 100644
index 0000000..2b25ad0
--- /dev/null
+++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/es.lproj/SUUpdateAlert.nib/info.nib
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>IBDocumentLocation</key>
+	<string>425 40 356 240 0 0 1280 832 </string>
+	<key>IBFramework Version</key>
+	<string>446.1</string>
+	<key>IBOpenObjects</key>
+	<array>
+		<integer>5</integer>
+	</array>
+	<key>IBSystem Version</key>
+	<string>8I127</string>
+</dict>
+</plist>
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/es.lproj/SUUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/es.lproj/SUUpdateAlert.nib/keyedobjects.nib
new file mode 100644
index 0000000..236c082
Binary files /dev/null and b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/es.lproj/SUUpdateAlert.nib/keyedobjects.nib differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/es.lproj/Sparkle.strings b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/es.lproj/Sparkle.strings
new file mode 100644
index 0000000..08538d3
Binary files /dev/null and b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/es.lproj/Sparkle.strings differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/fi.lproj/SUAutomaticUpdateAlert.nib/classes.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/fi.lproj/SUAutomaticUpdateAlert.nib/classes.nib
new file mode 100644
index 0000000..3e65b1f
--- /dev/null
+++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/fi.lproj/SUAutomaticUpdateAlert.nib/classes.nib
@@ -0,0 +1,12 @@
+{
+    IBClasses = (
+        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
+        {
+            ACTIONS = {relaunchLater = id; relaunchNow = id; }; 
+            CLASS = SUAutomaticUpdateAlert; 
+            LANGUAGE = ObjC; 
+            SUPERCLASS = NSWindowController; 
+        }
+    ); 
+    IBVersion = 1; 
+}
\ No newline at end of file
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/fi.lproj/SUAutomaticUpdateAlert.nib/info.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/fi.lproj/SUAutomaticUpdateAlert.nib/info.nib
new file mode 100644
index 0000000..5a75680
--- /dev/null
+++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/fi.lproj/SUAutomaticUpdateAlert.nib/info.nib
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>IBDocumentLocation</key>
+	<string>188 142 356 240 0 0 1280 1002 </string>
+	<key>IBFramework Version</key>
+	<string>443.0</string>
+	<key>IBSystem Version</key>
+	<string>8I127</string>
+</dict>
+</plist>
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/fi.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/fi.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib
new file mode 100644
index 0000000..e7f6143
Binary files /dev/null and b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/fi.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/fi.lproj/SUUpdateAlert.nib/classes.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/fi.lproj/SUUpdateAlert.nib/classes.nib
new file mode 100644
index 0000000..0071ac0
--- /dev/null
+++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/fi.lproj/SUUpdateAlert.nib/classes.nib
@@ -0,0 +1,21 @@
+{
+    IBClasses = (
+        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
+        {CLASS = NSObject; LANGUAGE = ObjC; }, 
+        {
+            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
+            CLASS = SUUpdateAlert; 
+            LANGUAGE = ObjC; 
+            OUTLETS = {description = NSTextField; releaseNotesView = WebView; }; 
+            SUPERCLASS = NSWindowController; 
+        }, 
+        {
+            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
+            CLASS = SUUpdateAlertController; 
+            LANGUAGE = ObjC; 
+            OUTLETS = {releaseNotesView = id; }; 
+            SUPERCLASS = NSWindowController; 
+        }
+    ); 
+    IBVersion = 1; 
+}
\ No newline at end of file
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/fi.lproj/SUUpdateAlert.nib/info.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/fi.lproj/SUUpdateAlert.nib/info.nib
new file mode 100644
index 0000000..2b25ad0
--- /dev/null
+++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/fi.lproj/SUUpdateAlert.nib/info.nib
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>IBDocumentLocation</key>
+	<string>425 40 356 240 0 0 1280 832 </string>
+	<key>IBFramework Version</key>
+	<string>446.1</string>
+	<key>IBOpenObjects</key>
+	<array>
+		<integer>5</integer>
+	</array>
+	<key>IBSystem Version</key>
+	<string>8I127</string>
+</dict>
+</plist>
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/fi.lproj/SUUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/fi.lproj/SUUpdateAlert.nib/keyedobjects.nib
new file mode 100644
index 0000000..ac21bcb
Binary files /dev/null and b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/fi.lproj/SUUpdateAlert.nib/keyedobjects.nib differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/fi.lproj/Sparkle.strings b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/fi.lproj/Sparkle.strings
new file mode 100644
index 0000000..c52cf30
Binary files /dev/null and b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/fi.lproj/Sparkle.strings differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/fr.lproj/SUAutomaticUpdateAlert.nib/classes.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/fr.lproj/SUAutomaticUpdateAlert.nib/classes.nib
new file mode 100644
index 0000000..3e65b1f
--- /dev/null
+++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/fr.lproj/SUAutomaticUpdateAlert.nib/classes.nib
@@ -0,0 +1,12 @@
+{
+    IBClasses = (
+        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
+        {
+            ACTIONS = {relaunchLater = id; relaunchNow = id; }; 
+            CLASS = SUAutomaticUpdateAlert; 
+            LANGUAGE = ObjC; 
+            SUPERCLASS = NSWindowController; 
+        }
+    ); 
+    IBVersion = 1; 
+}
\ No newline at end of file
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/fr.lproj/SUAutomaticUpdateAlert.nib/info.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/fr.lproj/SUAutomaticUpdateAlert.nib/info.nib
new file mode 100644
index 0000000..26ef484
--- /dev/null
+++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/fr.lproj/SUAutomaticUpdateAlert.nib/info.nib
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>IBDocumentLocation</key>
+	<string>188 142 356 240 0 0 1280 1002 </string>
+	<key>IBFramework Version</key>
+	<string>439.0</string>
+	<key>IBSystem Version</key>
+	<string>8J133</string>
+</dict>
+</plist>
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/fr.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/fr.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib
new file mode 100644
index 0000000..552a5bd
Binary files /dev/null and b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/fr.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/fr.lproj/SUUpdateAlert.nib/classes.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/fr.lproj/SUUpdateAlert.nib/classes.nib
new file mode 100644
index 0000000..0071ac0
--- /dev/null
+++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/fr.lproj/SUUpdateAlert.nib/classes.nib
@@ -0,0 +1,21 @@
+{
+    IBClasses = (
+        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
+        {CLASS = NSObject; LANGUAGE = ObjC; }, 
+        {
+            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
+            CLASS = SUUpdateAlert; 
+            LANGUAGE = ObjC; 
+            OUTLETS = {description = NSTextField; releaseNotesView = WebView; }; 
+            SUPERCLASS = NSWindowController; 
+        }, 
+        {
+            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
+            CLASS = SUUpdateAlertController; 
+            LANGUAGE = ObjC; 
+            OUTLETS = {releaseNotesView = id; }; 
+            SUPERCLASS = NSWindowController; 
+        }
+    ); 
+    IBVersion = 1; 
+}
\ No newline at end of file
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/fr.lproj/SUUpdateAlert.nib/info.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/fr.lproj/SUUpdateAlert.nib/info.nib
new file mode 100644
index 0000000..b0e7f7b
--- /dev/null
+++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/fr.lproj/SUUpdateAlert.nib/info.nib
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>IBDocumentLocation</key>
+	<string>425 51 356 240 0 0 1280 1002 </string>
+	<key>IBFramework Version</key>
+	<string>439.0</string>
+	<key>IBOpenObjects</key>
+	<array>
+		<integer>5</integer>
+	</array>
+	<key>IBSystem Version</key>
+	<string>8J133</string>
+</dict>
+</plist>
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/fr.lproj/SUUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/fr.lproj/SUUpdateAlert.nib/keyedobjects.nib
new file mode 100644
index 0000000..0cd65e6
Binary files /dev/null and b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/fr.lproj/SUUpdateAlert.nib/keyedobjects.nib differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/fr.lproj/Sparkle.strings b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/fr.lproj/Sparkle.strings
new file mode 100644
index 0000000..9cca1c3
Binary files /dev/null and b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/fr.lproj/Sparkle.strings differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/he.lproj/SUAutomaticUpdateAlert.nib/classes.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/he.lproj/SUAutomaticUpdateAlert.nib/classes.nib
new file mode 100644
index 0000000..3e65b1f
--- /dev/null
+++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/he.lproj/SUAutomaticUpdateAlert.nib/classes.nib
@@ -0,0 +1,12 @@
+{
+    IBClasses = (
+        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
+        {
+            ACTIONS = {relaunchLater = id; relaunchNow = id; }; 
+            CLASS = SUAutomaticUpdateAlert; 
+            LANGUAGE = ObjC; 
+            SUPERCLASS = NSWindowController; 
+        }
+    ); 
+    IBVersion = 1; 
+}
\ No newline at end of file
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/he.lproj/SUAutomaticUpdateAlert.nib/info.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/he.lproj/SUAutomaticUpdateAlert.nib/info.nib
new file mode 100644
index 0000000..0820302
--- /dev/null
+++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/he.lproj/SUAutomaticUpdateAlert.nib/info.nib
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>IBDocumentLocation</key>
+	<string>136 94 356 240 0 0 1024 746 </string>
+	<key>IBFramework Version</key>
+	<string>443.0</string>
+	<key>IBSystem Version</key>
+	<string>8I127</string>
+</dict>
+</plist>
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/he.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/he.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib
new file mode 100644
index 0000000..e4c7ba0
Binary files /dev/null and b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/he.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/he.lproj/SUUpdateAlert.nib/classes.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/he.lproj/SUUpdateAlert.nib/classes.nib
new file mode 100644
index 0000000..0071ac0
--- /dev/null
+++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/he.lproj/SUUpdateAlert.nib/classes.nib
@@ -0,0 +1,21 @@
+{
+    IBClasses = (
+        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
+        {CLASS = NSObject; LANGUAGE = ObjC; }, 
+        {
+            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
+            CLASS = SUUpdateAlert; 
+            LANGUAGE = ObjC; 
+            OUTLETS = {description = NSTextField; releaseNotesView = WebView; }; 
+            SUPERCLASS = NSWindowController; 
+        }, 
+        {
+            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
+            CLASS = SUUpdateAlertController; 
+            LANGUAGE = ObjC; 
+            OUTLETS = {releaseNotesView = id; }; 
+            SUPERCLASS = NSWindowController; 
+        }
+    ); 
+    IBVersion = 1; 
+}
\ No newline at end of file
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/he.lproj/SUUpdateAlert.nib/info.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/he.lproj/SUUpdateAlert.nib/info.nib
new file mode 100644
index 0000000..2b25ad0
--- /dev/null
+++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/he.lproj/SUUpdateAlert.nib/info.nib
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>IBDocumentLocation</key>
+	<string>425 40 356 240 0 0 1280 832 </string>
+	<key>IBFramework Version</key>
+	<string>446.1</string>
+	<key>IBOpenObjects</key>
+	<array>
+		<integer>5</integer>
+	</array>
+	<key>IBSystem Version</key>
+	<string>8I127</string>
+</dict>
+</plist>
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/he.lproj/SUUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/he.lproj/SUUpdateAlert.nib/keyedobjects.nib
new file mode 100644
index 0000000..af7bfbb
Binary files /dev/null and b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/he.lproj/SUUpdateAlert.nib/keyedobjects.nib differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/he.lproj/Sparkle.strings b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/he.lproj/Sparkle.strings
new file mode 100644
index 0000000..60da7d5
Binary files /dev/null and b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/he.lproj/Sparkle.strings differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/hu.lproj/SUAutomaticUpdateAlert.nib/classes.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/hu.lproj/SUAutomaticUpdateAlert.nib/classes.nib
new file mode 100644
index 0000000..3e65b1f
--- /dev/null
+++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/hu.lproj/SUAutomaticUpdateAlert.nib/classes.nib
@@ -0,0 +1,12 @@
+{
+    IBClasses = (
+        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
+        {
+            ACTIONS = {relaunchLater = id; relaunchNow = id; }; 
+            CLASS = SUAutomaticUpdateAlert; 
+            LANGUAGE = ObjC; 
+            SUPERCLASS = NSWindowController; 
+        }
+    ); 
+    IBVersion = 1; 
+}
\ No newline at end of file
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/hu.lproj/SUAutomaticUpdateAlert.nib/info.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/hu.lproj/SUAutomaticUpdateAlert.nib/info.nib
new file mode 100644
index 0000000..5a75680
--- /dev/null
+++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/hu.lproj/SUAutomaticUpdateAlert.nib/info.nib
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>IBDocumentLocation</key>
+	<string>188 142 356 240 0 0 1280 1002 </string>
+	<key>IBFramework Version</key>
+	<string>443.0</string>
+	<key>IBSystem Version</key>
+	<string>8I127</string>
+</dict>
+</plist>
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/hu.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/hu.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib
new file mode 100644
index 0000000..b619eb4
Binary files /dev/null and b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/hu.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/hu.lproj/SUUpdateAlert.nib/classes.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/hu.lproj/SUUpdateAlert.nib/classes.nib
new file mode 100644
index 0000000..0071ac0
--- /dev/null
+++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/hu.lproj/SUUpdateAlert.nib/classes.nib
@@ -0,0 +1,21 @@
+{
+    IBClasses = (
+        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
+        {CLASS = NSObject; LANGUAGE = ObjC; }, 
+        {
+            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
+            CLASS = SUUpdateAlert; 
+            LANGUAGE = ObjC; 
+            OUTLETS = {description = NSTextField; releaseNotesView = WebView; }; 
+            SUPERCLASS = NSWindowController; 
+        }, 
+        {
+            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
+            CLASS = SUUpdateAlertController; 
+            LANGUAGE = ObjC; 
+            OUTLETS = {releaseNotesView = id; }; 
+            SUPERCLASS = NSWindowController; 
+        }
+    ); 
+    IBVersion = 1; 
+}
\ No newline at end of file
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/hu.lproj/SUUpdateAlert.nib/info.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/hu.lproj/SUUpdateAlert.nib/info.nib
new file mode 100644
index 0000000..2b25ad0
--- /dev/null
+++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/hu.lproj/SUUpdateAlert.nib/info.nib
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>IBDocumentLocation</key>
+	<string>425 40 356 240 0 0 1280 832 </string>
+	<key>IBFramework Version</key>
+	<string>446.1</string>
+	<key>IBOpenObjects</key>
+	<array>
+		<integer>5</integer>
+	</array>
+	<key>IBSystem Version</key>
+	<string>8I127</string>
+</dict>
+</plist>
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/hu.lproj/SUUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/hu.lproj/SUUpdateAlert.nib/keyedobjects.nib
new file mode 100644
index 0000000..4fbd2d6
Binary files /dev/null and b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/hu.lproj/SUUpdateAlert.nib/keyedobjects.nib differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/hu.lproj/Sparkle.strings b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/hu.lproj/Sparkle.strings
new file mode 100644
index 0000000..08538d3
Binary files /dev/null and b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/hu.lproj/Sparkle.strings differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/id.lproj/SUAutomaticUpdateAlert.nib/classes.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/id.lproj/SUAutomaticUpdateAlert.nib/classes.nib
new file mode 100644
index 0000000..3e65b1f
--- /dev/null
+++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/id.lproj/SUAutomaticUpdateAlert.nib/classes.nib
@@ -0,0 +1,12 @@
+{
+    IBClasses = (
+        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
+        {
+            ACTIONS = {relaunchLater = id; relaunchNow = id; }; 
+            CLASS = SUAutomaticUpdateAlert; 
+            LANGUAGE = ObjC; 
+            SUPERCLASS = NSWindowController; 
+        }
+    ); 
+    IBVersion = 1; 
+}
\ No newline at end of file
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/id.lproj/SUAutomaticUpdateAlert.nib/info.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/id.lproj/SUAutomaticUpdateAlert.nib/info.nib
new file mode 100644
index 0000000..5a75680
--- /dev/null
+++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/id.lproj/SUAutomaticUpdateAlert.nib/info.nib
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>IBDocumentLocation</key>
+	<string>188 142 356 240 0 0 1280 1002 </string>
+	<key>IBFramework Version</key>
+	<string>443.0</string>
+	<key>IBSystem Version</key>
+	<string>8I127</string>
+</dict>
+</plist>
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/id.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/id.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib
new file mode 100644
index 0000000..b619eb4
Binary files /dev/null and b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/id.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/id.lproj/SUUpdateAlert.nib/classes.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/id.lproj/SUUpdateAlert.nib/classes.nib
new file mode 100644
index 0000000..0071ac0
--- /dev/null
+++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/id.lproj/SUUpdateAlert.nib/classes.nib
@@ -0,0 +1,21 @@
+{
+    IBClasses = (
+        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
+        {CLASS = NSObject; LANGUAGE = ObjC; }, 
+        {
+            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
+            CLASS = SUUpdateAlert; 
+            LANGUAGE = ObjC; 
+            OUTLETS = {description = NSTextField; releaseNotesView = WebView; }; 
+            SUPERCLASS = NSWindowController; 
+        }, 
+        {
+            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
+            CLASS = SUUpdateAlertController; 
+            LANGUAGE = ObjC; 
+            OUTLETS = {releaseNotesView = id; }; 
+            SUPERCLASS = NSWindowController; 
+        }
+    ); 
+    IBVersion = 1; 
+}
\ No newline at end of file
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/id.lproj/SUUpdateAlert.nib/info.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/id.lproj/SUUpdateAlert.nib/info.nib
new file mode 100644
index 0000000..2b25ad0
--- /dev/null
+++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/id.lproj/SUUpdateAlert.nib/info.nib
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>IBDocumentLocation</key>
+	<string>425 40 356 240 0 0 1280 832 </string>
+	<key>IBFramework Version</key>
+	<string>446.1</string>
+	<key>IBOpenObjects</key>
+	<array>
+		<integer>5</integer>
+	</array>
+	<key>IBSystem Version</key>
+	<string>8I127</string>
+</dict>
+</plist>
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/id.lproj/SUUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/id.lproj/SUUpdateAlert.nib/keyedobjects.nib
new file mode 100644
index 0000000..c815112
Binary files /dev/null and b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/id.lproj/SUUpdateAlert.nib/keyedobjects.nib differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/id.lproj/Sparkle.strings b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/id.lproj/Sparkle.strings
new file mode 100644
index 0000000..08538d3
Binary files /dev/null and b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/id.lproj/Sparkle.strings differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/is.lproj/SUAutomaticUpdateAlert.nib/classes.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/is.lproj/SUAutomaticUpdateAlert.nib/classes.nib
new file mode 100644
index 0000000..3e65b1f
--- /dev/null
+++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/is.lproj/SUAutomaticUpdateAlert.nib/classes.nib
@@ -0,0 +1,12 @@
+{
+    IBClasses = (
+        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
+        {
+            ACTIONS = {relaunchLater = id; relaunchNow = id; }; 
+            CLASS = SUAutomaticUpdateAlert; 
+            LANGUAGE = ObjC; 
+            SUPERCLASS = NSWindowController; 
+        }
+    ); 
+    IBVersion = 1; 
+}
\ No newline at end of file
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/is.lproj/SUAutomaticUpdateAlert.nib/info.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/is.lproj/SUAutomaticUpdateAlert.nib/info.nib
new file mode 100644
index 0000000..5a75680
--- /dev/null
+++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/is.lproj/SUAutomaticUpdateAlert.nib/info.nib
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>IBDocumentLocation</key>
+	<string>188 142 356 240 0 0 1280 1002 </string>
+	<key>IBFramework Version</key>
+	<string>443.0</string>
+	<key>IBSystem Version</key>
+	<string>8I127</string>
+</dict>
+</plist>
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/is.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/is.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib
new file mode 100644
index 0000000..b619eb4
Binary files /dev/null and b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/is.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/is.lproj/SUUpdateAlert.nib/classes.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/is.lproj/SUUpdateAlert.nib/classes.nib
new file mode 100644
index 0000000..0071ac0
--- /dev/null
+++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/is.lproj/SUUpdateAlert.nib/classes.nib
@@ -0,0 +1,21 @@
+{
+    IBClasses = (
+        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
+        {CLASS = NSObject; LANGUAGE = ObjC; }, 
+        {
+            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
+            CLASS = SUUpdateAlert; 
+            LANGUAGE = ObjC; 
+            OUTLETS = {description = NSTextField; releaseNotesView = WebView; }; 
+            SUPERCLASS = NSWindowController; 
+        }, 
+        {
+            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
+            CLASS = SUUpdateAlertController; 
+            LANGUAGE = ObjC; 
+            OUTLETS = {releaseNotesView = id; }; 
+            SUPERCLASS = NSWindowController; 
+        }
+    ); 
+    IBVersion = 1; 
+}
\ No newline at end of file
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/is.lproj/SUUpdateAlert.nib/info.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/is.lproj/SUUpdateAlert.nib/info.nib
new file mode 100644
index 0000000..2b25ad0
--- /dev/null
+++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/is.lproj/SUUpdateAlert.nib/info.nib
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>IBDocumentLocation</key>
+	<string>425 40 356 240 0 0 1280 832 </string>
+	<key>IBFramework Version</key>
+	<string>446.1</string>
+	<key>IBOpenObjects</key>
+	<array>
+		<integer>5</integer>
+	</array>
+	<key>IBSystem Version</key>
+	<string>8I127</string>
+</dict>
+</plist>
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/is.lproj/SUUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/is.lproj/SUUpdateAlert.nib/keyedobjects.nib
new file mode 100644
index 0000000..44b9da5
Binary files /dev/null and b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/is.lproj/SUUpdateAlert.nib/keyedobjects.nib differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/is.lproj/Sparkle.strings b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/is.lproj/Sparkle.strings
new file mode 100644
index 0000000..85c1567
Binary files /dev/null and b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/is.lproj/Sparkle.strings differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/it.lproj/SUAutomaticUpdateAlert.nib/classes.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/it.lproj/SUAutomaticUpdateAlert.nib/classes.nib
new file mode 100644
index 0000000..3e65b1f
--- /dev/null
+++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/it.lproj/SUAutomaticUpdateAlert.nib/classes.nib
@@ -0,0 +1,12 @@
+{
+    IBClasses = (
+        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
+        {
+            ACTIONS = {relaunchLater = id; relaunchNow = id; }; 
+            CLASS = SUAutomaticUpdateAlert; 
+            LANGUAGE = ObjC; 
+            SUPERCLASS = NSWindowController; 
+        }
+    ); 
+    IBVersion = 1; 
+}
\ No newline at end of file
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/it.lproj/SUAutomaticUpdateAlert.nib/info.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/it.lproj/SUAutomaticUpdateAlert.nib/info.nib
new file mode 100644
index 0000000..5a75680
--- /dev/null
+++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/it.lproj/SUAutomaticUpdateAlert.nib/info.nib
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>IBDocumentLocation</key>
+	<string>188 142 356 240 0 0 1280 1002 </string>
+	<key>IBFramework Version</key>
+	<string>443.0</string>
+	<key>IBSystem Version</key>
+	<string>8I127</string>
+</dict>
+</plist>
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/it.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/it.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib
new file mode 100644
index 0000000..53fa5b3
Binary files /dev/null and b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/it.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/it.lproj/SUUpdateAlert.nib/classes.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/it.lproj/SUUpdateAlert.nib/classes.nib
new file mode 100644
index 0000000..0071ac0
--- /dev/null
+++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/it.lproj/SUUpdateAlert.nib/classes.nib
@@ -0,0 +1,21 @@
+{
+    IBClasses = (
+        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
+        {CLASS = NSObject; LANGUAGE = ObjC; }, 
+        {
+            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
+            CLASS = SUUpdateAlert; 
+            LANGUAGE = ObjC; 
+            OUTLETS = {description = NSTextField; releaseNotesView = WebView; }; 
+            SUPERCLASS = NSWindowController; 
+        }, 
+        {
+            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
+            CLASS = SUUpdateAlertController; 
+            LANGUAGE = ObjC; 
+            OUTLETS = {releaseNotesView = id; }; 
+            SUPERCLASS = NSWindowController; 
+        }
+    ); 
+    IBVersion = 1; 
+}
\ No newline at end of file
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/it.lproj/SUUpdateAlert.nib/info.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/it.lproj/SUUpdateAlert.nib/info.nib
new file mode 100644
index 0000000..2b25ad0
--- /dev/null
+++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/it.lproj/SUUpdateAlert.nib/info.nib
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>IBDocumentLocation</key>
+	<string>425 40 356 240 0 0 1280 832 </string>
+	<key>IBFramework Version</key>
+	<string>446.1</string>
+	<key>IBOpenObjects</key>
+	<array>
+		<integer>5</integer>
+	</array>
+	<key>IBSystem Version</key>
+	<string>8I127</string>
+</dict>
+</plist>
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/it.lproj/SUUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/it.lproj/SUUpdateAlert.nib/keyedobjects.nib
new file mode 100644
index 0000000..0e8d6a6
Binary files /dev/null and b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/it.lproj/SUUpdateAlert.nib/keyedobjects.nib differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/it.lproj/Sparkle.strings b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/it.lproj/Sparkle.strings
new file mode 100644
index 0000000..7a5a384
Binary files /dev/null and b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/it.lproj/Sparkle.strings differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ja.lproj/SUAutomaticUpdateAlert.nib/classes.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ja.lproj/SUAutomaticUpdateAlert.nib/classes.nib
new file mode 100644
index 0000000..3e65b1f
--- /dev/null
+++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ja.lproj/SUAutomaticUpdateAlert.nib/classes.nib
@@ -0,0 +1,12 @@
+{
+    IBClasses = (
+        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
+        {
+            ACTIONS = {relaunchLater = id; relaunchNow = id; }; 
+            CLASS = SUAutomaticUpdateAlert; 
+            LANGUAGE = ObjC; 
+            SUPERCLASS = NSWindowController; 
+        }
+    ); 
+    IBVersion = 1; 
+}
\ No newline at end of file
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ja.lproj/SUAutomaticUpdateAlert.nib/info.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ja.lproj/SUAutomaticUpdateAlert.nib/info.nib
new file mode 100644
index 0000000..0820302
--- /dev/null
+++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ja.lproj/SUAutomaticUpdateAlert.nib/info.nib
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>IBDocumentLocation</key>
+	<string>136 94 356 240 0 0 1024 746 </string>
+	<key>IBFramework Version</key>
+	<string>443.0</string>
+	<key>IBSystem Version</key>
+	<string>8I127</string>
+</dict>
+</plist>
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ja.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ja.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib
new file mode 100644
index 0000000..d317046
Binary files /dev/null and b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ja.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ja.lproj/SUUpdateAlert.nib/classes.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ja.lproj/SUUpdateAlert.nib/classes.nib
new file mode 100644
index 0000000..0071ac0
--- /dev/null
+++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ja.lproj/SUUpdateAlert.nib/classes.nib
@@ -0,0 +1,21 @@
+{
+    IBClasses = (
+        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
+        {CLASS = NSObject; LANGUAGE = ObjC; }, 
+        {
+            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
+            CLASS = SUUpdateAlert; 
+            LANGUAGE = ObjC; 
+            OUTLETS = {description = NSTextField; releaseNotesView = WebView; }; 
+            SUPERCLASS = NSWindowController; 
+        }, 
+        {
+            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
+            CLASS = SUUpdateAlertController; 
+            LANGUAGE = ObjC; 
+            OUTLETS = {releaseNotesView = id; }; 
+            SUPERCLASS = NSWindowController; 
+        }
+    ); 
+    IBVersion = 1; 
+}
\ No newline at end of file
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ja.lproj/SUUpdateAlert.nib/info.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ja.lproj/SUUpdateAlert.nib/info.nib
new file mode 100644
index 0000000..f213cf3
--- /dev/null
+++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ja.lproj/SUUpdateAlert.nib/info.nib
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>IBDocumentLocation</key>
+	<string>531 94 356 240 0 0 1280 832 </string>
+	<key>IBFramework Version</key>
+	<string>446.1</string>
+	<key>IBOpenObjects</key>
+	<array>
+		<integer>5</integer>
+	</array>
+	<key>IBSystem Version</key>
+	<string>8I127</string>
+</dict>
+</plist>
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ja.lproj/SUUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ja.lproj/SUUpdateAlert.nib/keyedobjects.nib
new file mode 100644
index 0000000..00b088d
Binary files /dev/null and b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ja.lproj/SUUpdateAlert.nib/keyedobjects.nib differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ja.lproj/Sparkle.strings b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ja.lproj/Sparkle.strings
new file mode 100644
index 0000000..6c2e6ea
Binary files /dev/null and b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ja.lproj/Sparkle.strings differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ko.lproj/SUAutomaticUpdateAlert.nib/classes.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ko.lproj/SUAutomaticUpdateAlert.nib/classes.nib
new file mode 100644
index 0000000..3e65b1f
--- /dev/null
+++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ko.lproj/SUAutomaticUpdateAlert.nib/classes.nib
@@ -0,0 +1,12 @@
+{
+    IBClasses = (
+        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
+        {
+            ACTIONS = {relaunchLater = id; relaunchNow = id; }; 
+            CLASS = SUAutomaticUpdateAlert; 
+            LANGUAGE = ObjC; 
+            SUPERCLASS = NSWindowController; 
+        }
+    ); 
+    IBVersion = 1; 
+}
\ No newline at end of file
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ko.lproj/SUAutomaticUpdateAlert.nib/info.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ko.lproj/SUAutomaticUpdateAlert.nib/info.nib
new file mode 100644
index 0000000..5a75680
--- /dev/null
+++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ko.lproj/SUAutomaticUpdateAlert.nib/info.nib
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>IBDocumentLocation</key>
+	<string>188 142 356 240 0 0 1280 1002 </string>
+	<key>IBFramework Version</key>
+	<string>443.0</string>
+	<key>IBSystem Version</key>
+	<string>8I127</string>
+</dict>
+</plist>
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ko.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ko.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib
new file mode 100644
index 0000000..b619eb4
Binary files /dev/null and b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ko.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ko.lproj/SUUpdateAlert.nib/classes.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ko.lproj/SUUpdateAlert.nib/classes.nib
new file mode 100644
index 0000000..0071ac0
--- /dev/null
+++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ko.lproj/SUUpdateAlert.nib/classes.nib
@@ -0,0 +1,21 @@
+{
+    IBClasses = (
+        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
+        {CLASS = NSObject; LANGUAGE = ObjC; }, 
+        {
+            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
+            CLASS = SUUpdateAlert; 
+            LANGUAGE = ObjC; 
+            OUTLETS = {description = NSTextField; releaseNotesView = WebView; }; 
+            SUPERCLASS = NSWindowController; 
+        }, 
+        {
+            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
+            CLASS = SUUpdateAlertController; 
+            LANGUAGE = ObjC; 
+            OUTLETS = {releaseNotesView = id; }; 
+            SUPERCLASS = NSWindowController; 
+        }
+    ); 
+    IBVersion = 1; 
+}
\ No newline at end of file
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ko.lproj/SUUpdateAlert.nib/info.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ko.lproj/SUUpdateAlert.nib/info.nib
new file mode 100644
index 0000000..2b25ad0
--- /dev/null
+++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ko.lproj/SUUpdateAlert.nib/info.nib
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>IBDocumentLocation</key>
+	<string>425 40 356 240 0 0 1280 832 </string>
+	<key>IBFramework Version</key>
+	<string>446.1</string>
+	<key>IBOpenObjects</key>
+	<array>
+		<integer>5</integer>
+	</array>
+	<key>IBSystem Version</key>
+	<string>8I127</string>
+</dict>
+</plist>
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ko.lproj/SUUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ko.lproj/SUUpdateAlert.nib/keyedobjects.nib
new file mode 100644
index 0000000..aeb4628
Binary files /dev/null and b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ko.lproj/SUUpdateAlert.nib/keyedobjects.nib differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ko.lproj/Sparkle.strings b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ko.lproj/Sparkle.strings
new file mode 100644
index 0000000..08538d3
Binary files /dev/null and b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ko.lproj/Sparkle.strings differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/nl.lproj/SUAutomaticUpdateAlert.nib/classes.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/nl.lproj/SUAutomaticUpdateAlert.nib/classes.nib
new file mode 100644
index 0000000..3e65b1f
--- /dev/null
+++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/nl.lproj/SUAutomaticUpdateAlert.nib/classes.nib
@@ -0,0 +1,12 @@
+{
+    IBClasses = (
+        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
+        {
+            ACTIONS = {relaunchLater = id; relaunchNow = id; }; 
+            CLASS = SUAutomaticUpdateAlert; 
+            LANGUAGE = ObjC; 
+            SUPERCLASS = NSWindowController; 
+        }
+    ); 
+    IBVersion = 1; 
+}
\ No newline at end of file
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/nl.lproj/SUAutomaticUpdateAlert.nib/info.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/nl.lproj/SUAutomaticUpdateAlert.nib/info.nib
new file mode 100644
index 0000000..5a75680
--- /dev/null
+++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/nl.lproj/SUAutomaticUpdateAlert.nib/info.nib
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>IBDocumentLocation</key>
+	<string>188 142 356 240 0 0 1280 1002 </string>
+	<key>IBFramework Version</key>
+	<string>443.0</string>
+	<key>IBSystem Version</key>
+	<string>8I127</string>
+</dict>
+</plist>
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/nl.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/nl.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib
new file mode 100644
index 0000000..b619eb4
Binary files /dev/null and b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/nl.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/nl.lproj/SUUpdateAlert.nib/classes.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/nl.lproj/SUUpdateAlert.nib/classes.nib
new file mode 100644
index 0000000..0071ac0
--- /dev/null
+++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/nl.lproj/SUUpdateAlert.nib/classes.nib
@@ -0,0 +1,21 @@
+{
+    IBClasses = (
+        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
+        {CLASS = NSObject; LANGUAGE = ObjC; }, 
+        {
+            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
+            CLASS = SUUpdateAlert; 
+            LANGUAGE = ObjC; 
+            OUTLETS = {description = NSTextField; releaseNotesView = WebView; }; 
+            SUPERCLASS = NSWindowController; 
+        }, 
+        {
+            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
+            CLASS = SUUpdateAlertController; 
+            LANGUAGE = ObjC; 
+            OUTLETS = {releaseNotesView = id; }; 
+            SUPERCLASS = NSWindowController; 
+        }
+    ); 
+    IBVersion = 1; 
+}
\ No newline at end of file
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/nl.lproj/SUUpdateAlert.nib/info.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/nl.lproj/SUUpdateAlert.nib/info.nib
new file mode 100644
index 0000000..2b25ad0
--- /dev/null
+++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/nl.lproj/SUUpdateAlert.nib/info.nib
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>IBDocumentLocation</key>
+	<string>425 40 356 240 0 0 1280 832 </string>
+	<key>IBFramework Version</key>
+	<string>446.1</string>
+	<key>IBOpenObjects</key>
+	<array>
+		<integer>5</integer>
+	</array>
+	<key>IBSystem Version</key>
+	<string>8I127</string>
+</dict>
+</plist>
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/nl.lproj/SUUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/nl.lproj/SUUpdateAlert.nib/keyedobjects.nib
new file mode 100644
index 0000000..26b2e8a
Binary files /dev/null and b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/nl.lproj/SUUpdateAlert.nib/keyedobjects.nib differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/nl.lproj/Sparkle.strings b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/nl.lproj/Sparkle.strings
new file mode 100644
index 0000000..08538d3
Binary files /dev/null and b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/nl.lproj/Sparkle.strings differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/no.lproj/SUAutomaticUpdateAlert.nib/classes.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/no.lproj/SUAutomaticUpdateAlert.nib/classes.nib
new file mode 100644
index 0000000..3e65b1f
--- /dev/null
+++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/no.lproj/SUAutomaticUpdateAlert.nib/classes.nib
@@ -0,0 +1,12 @@
+{
+    IBClasses = (
+        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
+        {
+            ACTIONS = {relaunchLater = id; relaunchNow = id; }; 
+            CLASS = SUAutomaticUpdateAlert; 
+            LANGUAGE = ObjC; 
+            SUPERCLASS = NSWindowController; 
+        }
+    ); 
+    IBVersion = 1; 
+}
\ No newline at end of file
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/no.lproj/SUAutomaticUpdateAlert.nib/info.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/no.lproj/SUAutomaticUpdateAlert.nib/info.nib
new file mode 100644
index 0000000..5a75680
--- /dev/null
+++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/no.lproj/SUAutomaticUpdateAlert.nib/info.nib
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>IBDocumentLocation</key>
+	<string>188 142 356 240 0 0 1280 1002 </string>
+	<key>IBFramework Version</key>
+	<string>443.0</string>
+	<key>IBSystem Version</key>
+	<string>8I127</string>
+</dict>
+</plist>
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/no.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/no.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib
new file mode 100644
index 0000000..b619eb4
Binary files /dev/null and b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/no.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/no.lproj/SUUpdateAlert.nib/classes.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/no.lproj/SUUpdateAlert.nib/classes.nib
new file mode 100644
index 0000000..0071ac0
--- /dev/null
+++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/no.lproj/SUUpdateAlert.nib/classes.nib
@@ -0,0 +1,21 @@
+{
+    IBClasses = (
+        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
+        {CLASS = NSObject; LANGUAGE = ObjC; }, 
+        {
+            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
+            CLASS = SUUpdateAlert; 
+            LANGUAGE = ObjC; 
+            OUTLETS = {description = NSTextField; releaseNotesView = WebView; }; 
+            SUPERCLASS = NSWindowController; 
+        }, 
+        {
+            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
+            CLASS = SUUpdateAlertController; 
+            LANGUAGE = ObjC; 
+            OUTLETS = {releaseNotesView = id; }; 
+            SUPERCLASS = NSWindowController; 
+        }
+    ); 
+    IBVersion = 1; 
+}
\ No newline at end of file
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/no.lproj/SUUpdateAlert.nib/info.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/no.lproj/SUUpdateAlert.nib/info.nib
new file mode 100644
index 0000000..a28ff7a
--- /dev/null
+++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/no.lproj/SUUpdateAlert.nib/info.nib
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>IBDocumentLocation</key>
+	<string>528 61 356 240 0 0 1280 832 </string>
+	<key>IBFramework Version</key>
+	<string>446.1</string>
+	<key>IBOpenObjects</key>
+	<array>
+		<integer>5</integer>
+	</array>
+	<key>IBSystem Version</key>
+	<string>8I127</string>
+</dict>
+</plist>
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/no.lproj/SUUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/no.lproj/SUUpdateAlert.nib/keyedobjects.nib
new file mode 100644
index 0000000..36947a7
Binary files /dev/null and b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/no.lproj/SUUpdateAlert.nib/keyedobjects.nib differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/no.lproj/Sparkle.strings b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/no.lproj/Sparkle.strings
new file mode 100644
index 0000000..2c98929
Binary files /dev/null and b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/no.lproj/Sparkle.strings differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/pl.lproj/SUAutomaticUpdateAlert.nib/classes.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/pl.lproj/SUAutomaticUpdateAlert.nib/classes.nib
new file mode 100644
index 0000000..3e65b1f
--- /dev/null
+++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/pl.lproj/SUAutomaticUpdateAlert.nib/classes.nib
@@ -0,0 +1,12 @@
+{
+    IBClasses = (
+        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
+        {
+            ACTIONS = {relaunchLater = id; relaunchNow = id; }; 
+            CLASS = SUAutomaticUpdateAlert; 
+            LANGUAGE = ObjC; 
+            SUPERCLASS = NSWindowController; 
+        }
+    ); 
+    IBVersion = 1; 
+}
\ No newline at end of file
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/pl.lproj/SUAutomaticUpdateAlert.nib/info.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/pl.lproj/SUAutomaticUpdateAlert.nib/info.nib
new file mode 100644
index 0000000..0820302
--- /dev/null
+++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/pl.lproj/SUAutomaticUpdateAlert.nib/info.nib
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>IBDocumentLocation</key>
+	<string>136 94 356 240 0 0 1024 746 </string>
+	<key>IBFramework Version</key>
+	<string>443.0</string>
+	<key>IBSystem Version</key>
+	<string>8I127</string>
+</dict>
+</plist>
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/pl.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/pl.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib
new file mode 100644
index 0000000..6da4ab1
Binary files /dev/null and b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/pl.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/pl.lproj/SUUpdateAlert.nib/classes.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/pl.lproj/SUUpdateAlert.nib/classes.nib
new file mode 100644
index 0000000..0071ac0
--- /dev/null
+++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/pl.lproj/SUUpdateAlert.nib/classes.nib
@@ -0,0 +1,21 @@
+{
+    IBClasses = (
+        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
+        {CLASS = NSObject; LANGUAGE = ObjC; }, 
+        {
+            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
+            CLASS = SUUpdateAlert; 
+            LANGUAGE = ObjC; 
+            OUTLETS = {description = NSTextField; releaseNotesView = WebView; }; 
+            SUPERCLASS = NSWindowController; 
+        }, 
+        {
+            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
+            CLASS = SUUpdateAlertController; 
+            LANGUAGE = ObjC; 
+            OUTLETS = {releaseNotesView = id; }; 
+            SUPERCLASS = NSWindowController; 
+        }
+    ); 
+    IBVersion = 1; 
+}
\ No newline at end of file
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/pl.lproj/SUUpdateAlert.nib/info.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/pl.lproj/SUUpdateAlert.nib/info.nib
new file mode 100644
index 0000000..2b25ad0
--- /dev/null
+++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/pl.lproj/SUUpdateAlert.nib/info.nib
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>IBDocumentLocation</key>
+	<string>425 40 356 240 0 0 1280 832 </string>
+	<key>IBFramework Version</key>
+	<string>446.1</string>
+	<key>IBOpenObjects</key>
+	<array>
+		<integer>5</integer>
+	</array>
+	<key>IBSystem Version</key>
+	<string>8I127</string>
+</dict>
+</plist>
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/pl.lproj/SUUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/pl.lproj/SUUpdateAlert.nib/keyedobjects.nib
new file mode 100644
index 0000000..dc2fbf3
Binary files /dev/null and b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/pl.lproj/SUUpdateAlert.nib/keyedobjects.nib differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/pl.lproj/Sparkle.strings b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/pl.lproj/Sparkle.strings
new file mode 100644
index 0000000..32c7567
Binary files /dev/null and b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/pl.lproj/Sparkle.strings differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ru.lproj/SUAutomaticUpdateAlert.nib/classes.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ru.lproj/SUAutomaticUpdateAlert.nib/classes.nib
new file mode 100644
index 0000000..3e65b1f
--- /dev/null
+++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ru.lproj/SUAutomaticUpdateAlert.nib/classes.nib
@@ -0,0 +1,12 @@
+{
+    IBClasses = (
+        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
+        {
+            ACTIONS = {relaunchLater = id; relaunchNow = id; }; 
+            CLASS = SUAutomaticUpdateAlert; 
+            LANGUAGE = ObjC; 
+            SUPERCLASS = NSWindowController; 
+        }
+    ); 
+    IBVersion = 1; 
+}
\ No newline at end of file
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ru.lproj/SUAutomaticUpdateAlert.nib/info.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ru.lproj/SUAutomaticUpdateAlert.nib/info.nib
new file mode 100644
index 0000000..5a75680
--- /dev/null
+++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ru.lproj/SUAutomaticUpdateAlert.nib/info.nib
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>IBDocumentLocation</key>
+	<string>188 142 356 240 0 0 1280 1002 </string>
+	<key>IBFramework Version</key>
+	<string>443.0</string>
+	<key>IBSystem Version</key>
+	<string>8I127</string>
+</dict>
+</plist>
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ru.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ru.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib
new file mode 100644
index 0000000..b619eb4
Binary files /dev/null and b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ru.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ru.lproj/SUUpdateAlert.nib/classes.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ru.lproj/SUUpdateAlert.nib/classes.nib
new file mode 100644
index 0000000..0071ac0
--- /dev/null
+++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ru.lproj/SUUpdateAlert.nib/classes.nib
@@ -0,0 +1,21 @@
+{
+    IBClasses = (
+        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
+        {CLASS = NSObject; LANGUAGE = ObjC; }, 
+        {
+            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
+            CLASS = SUUpdateAlert; 
+            LANGUAGE = ObjC; 
+            OUTLETS = {description = NSTextField; releaseNotesView = WebView; }; 
+            SUPERCLASS = NSWindowController; 
+        }, 
+        {
+            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
+            CLASS = SUUpdateAlertController; 
+            LANGUAGE = ObjC; 
+            OUTLETS = {releaseNotesView = id; }; 
+            SUPERCLASS = NSWindowController; 
+        }
+    ); 
+    IBVersion = 1; 
+}
\ No newline at end of file
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ru.lproj/SUUpdateAlert.nib/info.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ru.lproj/SUUpdateAlert.nib/info.nib
new file mode 100644
index 0000000..2b25ad0
--- /dev/null
+++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ru.lproj/SUUpdateAlert.nib/info.nib
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>IBDocumentLocation</key>
+	<string>425 40 356 240 0 0 1280 832 </string>
+	<key>IBFramework Version</key>
+	<string>446.1</string>
+	<key>IBOpenObjects</key>
+	<array>
+		<integer>5</integer>
+	</array>
+	<key>IBSystem Version</key>
+	<string>8I127</string>
+</dict>
+</plist>
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ru.lproj/SUUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ru.lproj/SUUpdateAlert.nib/keyedobjects.nib
new file mode 100644
index 0000000..b2f8b50
Binary files /dev/null and b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ru.lproj/SUUpdateAlert.nib/keyedobjects.nib differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ru.lproj/Sparkle.strings b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ru.lproj/Sparkle.strings
new file mode 100644
index 0000000..7c8b8ea
Binary files /dev/null and b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ru.lproj/Sparkle.strings differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/sk.lproj/SUAutomaticUpdateAlert.nib/classes.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/sk.lproj/SUAutomaticUpdateAlert.nib/classes.nib
new file mode 100644
index 0000000..3e65b1f
--- /dev/null
+++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/sk.lproj/SUAutomaticUpdateAlert.nib/classes.nib
@@ -0,0 +1,12 @@
+{
+    IBClasses = (
+        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
+        {
+            ACTIONS = {relaunchLater = id; relaunchNow = id; }; 
+            CLASS = SUAutomaticUpdateAlert; 
+            LANGUAGE = ObjC; 
+            SUPERCLASS = NSWindowController; 
+        }
+    ); 
+    IBVersion = 1; 
+}
\ No newline at end of file
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/sk.lproj/SUAutomaticUpdateAlert.nib/info.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/sk.lproj/SUAutomaticUpdateAlert.nib/info.nib
new file mode 100644
index 0000000..0820302
--- /dev/null
+++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/sk.lproj/SUAutomaticUpdateAlert.nib/info.nib
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>IBDocumentLocation</key>
+	<string>136 94 356 240 0 0 1024 746 </string>
+	<key>IBFramework Version</key>
+	<string>443.0</string>
+	<key>IBSystem Version</key>
+	<string>8I127</string>
+</dict>
+</plist>
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/sk.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/sk.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib
new file mode 100644
index 0000000..7a79f4d
Binary files /dev/null and b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/sk.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/sk.lproj/SUUpdateAlert.nib/classes.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/sk.lproj/SUUpdateAlert.nib/classes.nib
new file mode 100644
index 0000000..0071ac0
--- /dev/null
+++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/sk.lproj/SUUpdateAlert.nib/classes.nib
@@ -0,0 +1,21 @@
+{
+    IBClasses = (
+        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
+        {CLASS = NSObject; LANGUAGE = ObjC; }, 
+        {
+            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
+            CLASS = SUUpdateAlert; 
+            LANGUAGE = ObjC; 
+            OUTLETS = {description = NSTextField; releaseNotesView = WebView; }; 
+            SUPERCLASS = NSWindowController; 
+        }, 
+        {
+            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
+            CLASS = SUUpdateAlertController; 
+            LANGUAGE = ObjC; 
+            OUTLETS = {releaseNotesView = id; }; 
+            SUPERCLASS = NSWindowController; 
+        }
+    ); 
+    IBVersion = 1; 
+}
\ No newline at end of file
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/sk.lproj/SUUpdateAlert.nib/info.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/sk.lproj/SUUpdateAlert.nib/info.nib
new file mode 100644
index 0000000..2b25ad0
--- /dev/null
+++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/sk.lproj/SUUpdateAlert.nib/info.nib
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>IBDocumentLocation</key>
+	<string>425 40 356 240 0 0 1280 832 </string>
+	<key>IBFramework Version</key>
+	<string>446.1</string>
+	<key>IBOpenObjects</key>
+	<array>
+		<integer>5</integer>
+	</array>
+	<key>IBSystem Version</key>
+	<string>8I127</string>
+</dict>
+</plist>
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/sk.lproj/SUUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/sk.lproj/SUUpdateAlert.nib/keyedobjects.nib
new file mode 100644
index 0000000..13cdb31
Binary files /dev/null and b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/sk.lproj/SUUpdateAlert.nib/keyedobjects.nib differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/sk.lproj/Sparkle.strings b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/sk.lproj/Sparkle.strings
new file mode 100644
index 0000000..fd3ec52
Binary files /dev/null and b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/sk.lproj/Sparkle.strings differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/sv.lproj/SUAutomaticUpdateAlert.nib/classes.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/sv.lproj/SUAutomaticUpdateAlert.nib/classes.nib
new file mode 100644
index 0000000..3e65b1f
--- /dev/null
+++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/sv.lproj/SUAutomaticUpdateAlert.nib/classes.nib
@@ -0,0 +1,12 @@
+{
+    IBClasses = (
+        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
+        {
+            ACTIONS = {relaunchLater = id; relaunchNow = id; }; 
+            CLASS = SUAutomaticUpdateAlert; 
+            LANGUAGE = ObjC; 
+            SUPERCLASS = NSWindowController; 
+        }
+    ); 
+    IBVersion = 1; 
+}
\ No newline at end of file
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/sv.lproj/SUAutomaticUpdateAlert.nib/info.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/sv.lproj/SUAutomaticUpdateAlert.nib/info.nib
new file mode 100644
index 0000000..5a75680
--- /dev/null
+++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/sv.lproj/SUAutomaticUpdateAlert.nib/info.nib
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>IBDocumentLocation</key>
+	<string>188 142 356 240 0 0 1280 1002 </string>
+	<key>IBFramework Version</key>
+	<string>443.0</string>
+	<key>IBSystem Version</key>
+	<string>8I127</string>
+</dict>
+</plist>
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/sv.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/sv.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib
new file mode 100644
index 0000000..b619eb4
Binary files /dev/null and b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/sv.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/sv.lproj/SUUpdateAlert.nib/classes.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/sv.lproj/SUUpdateAlert.nib/classes.nib
new file mode 100644
index 0000000..0071ac0
--- /dev/null
+++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/sv.lproj/SUUpdateAlert.nib/classes.nib
@@ -0,0 +1,21 @@
+{
+    IBClasses = (
+        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
+        {CLASS = NSObject; LANGUAGE = ObjC; }, 
+        {
+            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
+            CLASS = SUUpdateAlert; 
+            LANGUAGE = ObjC; 
+            OUTLETS = {description = NSTextField; releaseNotesView = WebView; }; 
+            SUPERCLASS = NSWindowController; 
+        }, 
+        {
+            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
+            CLASS = SUUpdateAlertController; 
+            LANGUAGE = ObjC; 
+            OUTLETS = {releaseNotesView = id; }; 
+            SUPERCLASS = NSWindowController; 
+        }
+    ); 
+    IBVersion = 1; 
+}
\ No newline at end of file
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/sv.lproj/SUUpdateAlert.nib/info.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/sv.lproj/SUUpdateAlert.nib/info.nib
new file mode 100644
index 0000000..2b25ad0
--- /dev/null
+++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/sv.lproj/SUUpdateAlert.nib/info.nib
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>IBDocumentLocation</key>
+	<string>425 40 356 240 0 0 1280 832 </string>
+	<key>IBFramework Version</key>
+	<string>446.1</string>
+	<key>IBOpenObjects</key>
+	<array>
+		<integer>5</integer>
+	</array>
+	<key>IBSystem Version</key>
+	<string>8I127</string>
+</dict>
+</plist>
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/sv.lproj/SUUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/sv.lproj/SUUpdateAlert.nib/keyedobjects.nib
new file mode 100644
index 0000000..c4116cc
Binary files /dev/null and b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/sv.lproj/SUUpdateAlert.nib/keyedobjects.nib differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/sv.lproj/Sparkle.strings b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/sv.lproj/Sparkle.strings
new file mode 100644
index 0000000..9d3a515
Binary files /dev/null and b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/sv.lproj/Sparkle.strings differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/th.lproj/SUAutomaticUpdateAlert.nib/classes.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/th.lproj/SUAutomaticUpdateAlert.nib/classes.nib
new file mode 100644
index 0000000..3e65b1f
--- /dev/null
+++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/th.lproj/SUAutomaticUpdateAlert.nib/classes.nib
@@ -0,0 +1,12 @@
+{
+    IBClasses = (
+        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
+        {
+            ACTIONS = {relaunchLater = id; relaunchNow = id; }; 
+            CLASS = SUAutomaticUpdateAlert; 
+            LANGUAGE = ObjC; 
+            SUPERCLASS = NSWindowController; 
+        }
+    ); 
+    IBVersion = 1; 
+}
\ No newline at end of file
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/th.lproj/SUAutomaticUpdateAlert.nib/info.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/th.lproj/SUAutomaticUpdateAlert.nib/info.nib
new file mode 100644
index 0000000..5a75680
--- /dev/null
+++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/th.lproj/SUAutomaticUpdateAlert.nib/info.nib
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>IBDocumentLocation</key>
+	<string>188 142 356 240 0 0 1280 1002 </string>
+	<key>IBFramework Version</key>
+	<string>443.0</string>
+	<key>IBSystem Version</key>
+	<string>8I127</string>
+</dict>
+</plist>
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/th.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/th.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib
new file mode 100644
index 0000000..b619eb4
Binary files /dev/null and b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/th.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/th.lproj/SUUpdateAlert.nib/classes.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/th.lproj/SUUpdateAlert.nib/classes.nib
new file mode 100644
index 0000000..0071ac0
--- /dev/null
+++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/th.lproj/SUUpdateAlert.nib/classes.nib
@@ -0,0 +1,21 @@
+{
+    IBClasses = (
+        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
+        {CLASS = NSObject; LANGUAGE = ObjC; }, 
+        {
+            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
+            CLASS = SUUpdateAlert; 
+            LANGUAGE = ObjC; 
+            OUTLETS = {description = NSTextField; releaseNotesView = WebView; }; 
+            SUPERCLASS = NSWindowController; 
+        }, 
+        {
+            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
+            CLASS = SUUpdateAlertController; 
+            LANGUAGE = ObjC; 
+            OUTLETS = {releaseNotesView = id; }; 
+            SUPERCLASS = NSWindowController; 
+        }
+    ); 
+    IBVersion = 1; 
+}
\ No newline at end of file
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/th.lproj/SUUpdateAlert.nib/info.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/th.lproj/SUUpdateAlert.nib/info.nib
new file mode 100644
index 0000000..2b25ad0
--- /dev/null
+++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/th.lproj/SUUpdateAlert.nib/info.nib
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>IBDocumentLocation</key>
+	<string>425 40 356 240 0 0 1280 832 </string>
+	<key>IBFramework Version</key>
+	<string>446.1</string>
+	<key>IBOpenObjects</key>
+	<array>
+		<integer>5</integer>
+	</array>
+	<key>IBSystem Version</key>
+	<string>8I127</string>
+</dict>
+</plist>
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/th.lproj/SUUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/th.lproj/SUUpdateAlert.nib/keyedobjects.nib
new file mode 100644
index 0000000..2b1c6e3
Binary files /dev/null and b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/th.lproj/SUUpdateAlert.nib/keyedobjects.nib differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/th.lproj/Sparkle.strings b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/th.lproj/Sparkle.strings
new file mode 100644
index 0000000..08538d3
Binary files /dev/null and b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/th.lproj/Sparkle.strings differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/tr.lproj/SUAutomaticUpdateAlert.nib/classes.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/tr.lproj/SUAutomaticUpdateAlert.nib/classes.nib
new file mode 100644
index 0000000..3e65b1f
--- /dev/null
+++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/tr.lproj/SUAutomaticUpdateAlert.nib/classes.nib
@@ -0,0 +1,12 @@
+{
+    IBClasses = (
+        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
+        {
+            ACTIONS = {relaunchLater = id; relaunchNow = id; }; 
+            CLASS = SUAutomaticUpdateAlert; 
+            LANGUAGE = ObjC; 
+            SUPERCLASS = NSWindowController; 
+        }
+    ); 
+    IBVersion = 1; 
+}
\ No newline at end of file
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/tr.lproj/SUAutomaticUpdateAlert.nib/info.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/tr.lproj/SUAutomaticUpdateAlert.nib/info.nib
new file mode 100644
index 0000000..0820302
--- /dev/null
+++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/tr.lproj/SUAutomaticUpdateAlert.nib/info.nib
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>IBDocumentLocation</key>
+	<string>136 94 356 240 0 0 1024 746 </string>
+	<key>IBFramework Version</key>
+	<string>443.0</string>
+	<key>IBSystem Version</key>
+	<string>8I127</string>
+</dict>
+</plist>
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/tr.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/tr.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib
new file mode 100644
index 0000000..6e20460
Binary files /dev/null and b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/tr.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/tr.lproj/SUUpdateAlert.nib/classes.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/tr.lproj/SUUpdateAlert.nib/classes.nib
new file mode 100644
index 0000000..0071ac0
--- /dev/null
+++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/tr.lproj/SUUpdateAlert.nib/classes.nib
@@ -0,0 +1,21 @@
+{
+    IBClasses = (
+        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
+        {CLASS = NSObject; LANGUAGE = ObjC; }, 
+        {
+            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
+            CLASS = SUUpdateAlert; 
+            LANGUAGE = ObjC; 
+            OUTLETS = {description = NSTextField; releaseNotesView = WebView; }; 
+            SUPERCLASS = NSWindowController; 
+        }, 
+        {
+            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
+            CLASS = SUUpdateAlertController; 
+            LANGUAGE = ObjC; 
+            OUTLETS = {releaseNotesView = id; }; 
+            SUPERCLASS = NSWindowController; 
+        }
+    ); 
+    IBVersion = 1; 
+}
\ No newline at end of file
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/tr.lproj/SUUpdateAlert.nib/info.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/tr.lproj/SUUpdateAlert.nib/info.nib
new file mode 100644
index 0000000..2b25ad0
--- /dev/null
+++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/tr.lproj/SUUpdateAlert.nib/info.nib
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>IBDocumentLocation</key>
+	<string>425 40 356 240 0 0 1280 832 </string>
+	<key>IBFramework Version</key>
+	<string>446.1</string>
+	<key>IBOpenObjects</key>
+	<array>
+		<integer>5</integer>
+	</array>
+	<key>IBSystem Version</key>
+	<string>8I127</string>
+</dict>
+</plist>
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/tr.lproj/SUUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/tr.lproj/SUUpdateAlert.nib/keyedobjects.nib
new file mode 100644
index 0000000..4f31fd7
Binary files /dev/null and b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/tr.lproj/SUUpdateAlert.nib/keyedobjects.nib differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/tr.lproj/Sparkle.strings b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/tr.lproj/Sparkle.strings
new file mode 100644
index 0000000..c15c890
Binary files /dev/null and b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/tr.lproj/Sparkle.strings differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/zh_CN.lproj/SUAutomaticUpdateAlert.nib/classes.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/zh_CN.lproj/SUAutomaticUpdateAlert.nib/classes.nib
new file mode 100644
index 0000000..3e65b1f
--- /dev/null
+++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/zh_CN.lproj/SUAutomaticUpdateAlert.nib/classes.nib
@@ -0,0 +1,12 @@
+{
+    IBClasses = (
+        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
+        {
+            ACTIONS = {relaunchLater = id; relaunchNow = id; }; 
+            CLASS = SUAutomaticUpdateAlert; 
+            LANGUAGE = ObjC; 
+            SUPERCLASS = NSWindowController; 
+        }
+    ); 
+    IBVersion = 1; 
+}
\ No newline at end of file
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/zh_CN.lproj/SUAutomaticUpdateAlert.nib/info.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/zh_CN.lproj/SUAutomaticUpdateAlert.nib/info.nib
new file mode 100644
index 0000000..0820302
--- /dev/null
+++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/zh_CN.lproj/SUAutomaticUpdateAlert.nib/info.nib
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>IBDocumentLocation</key>
+	<string>136 94 356 240 0 0 1024 746 </string>
+	<key>IBFramework Version</key>
+	<string>443.0</string>
+	<key>IBSystem Version</key>
+	<string>8I127</string>
+</dict>
+</plist>
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/zh_CN.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/zh_CN.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib
new file mode 100644
index 0000000..f165c1a
Binary files /dev/null and b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/zh_CN.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/zh_CN.lproj/SUUpdateAlert.nib/classes.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/zh_CN.lproj/SUUpdateAlert.nib/classes.nib
new file mode 100644
index 0000000..0071ac0
--- /dev/null
+++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/zh_CN.lproj/SUUpdateAlert.nib/classes.nib
@@ -0,0 +1,21 @@
+{
+    IBClasses = (
+        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
+        {CLASS = NSObject; LANGUAGE = ObjC; }, 
+        {
+            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
+            CLASS = SUUpdateAlert; 
+            LANGUAGE = ObjC; 
+            OUTLETS = {description = NSTextField; releaseNotesView = WebView; }; 
+            SUPERCLASS = NSWindowController; 
+        }, 
+        {
+            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
+            CLASS = SUUpdateAlertController; 
+            LANGUAGE = ObjC; 
+            OUTLETS = {releaseNotesView = id; }; 
+            SUPERCLASS = NSWindowController; 
+        }
+    ); 
+    IBVersion = 1; 
+}
\ No newline at end of file
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/zh_CN.lproj/SUUpdateAlert.nib/info.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/zh_CN.lproj/SUUpdateAlert.nib/info.nib
new file mode 100644
index 0000000..2b25ad0
--- /dev/null
+++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/zh_CN.lproj/SUUpdateAlert.nib/info.nib
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>IBDocumentLocation</key>
+	<string>425 40 356 240 0 0 1280 832 </string>
+	<key>IBFramework Version</key>
+	<string>446.1</string>
+	<key>IBOpenObjects</key>
+	<array>
+		<integer>5</integer>
+	</array>
+	<key>IBSystem Version</key>
+	<string>8I127</string>
+</dict>
+</plist>
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/zh_CN.lproj/SUUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/zh_CN.lproj/SUUpdateAlert.nib/keyedobjects.nib
new file mode 100644
index 0000000..0d56dd1
Binary files /dev/null and b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/zh_CN.lproj/SUUpdateAlert.nib/keyedobjects.nib differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/zh_CN.lproj/Sparkle.strings b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/zh_CN.lproj/Sparkle.strings
new file mode 100644
index 0000000..9f7b390
Binary files /dev/null and b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/zh_CN.lproj/Sparkle.strings differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/zh_TW.lproj/SUAutomaticUpdateAlert.nib/classes.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/zh_TW.lproj/SUAutomaticUpdateAlert.nib/classes.nib
new file mode 100644
index 0000000..3e65b1f
--- /dev/null
+++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/zh_TW.lproj/SUAutomaticUpdateAlert.nib/classes.nib
@@ -0,0 +1,12 @@
+{
+    IBClasses = (
+        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
+        {
+            ACTIONS = {relaunchLater = id; relaunchNow = id; }; 
+            CLASS = SUAutomaticUpdateAlert; 
+            LANGUAGE = ObjC; 
+            SUPERCLASS = NSWindowController; 
+        }
+    ); 
+    IBVersion = 1; 
+}
\ No newline at end of file
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/zh_TW.lproj/SUAutomaticUpdateAlert.nib/info.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/zh_TW.lproj/SUAutomaticUpdateAlert.nib/info.nib
new file mode 100644
index 0000000..5a75680
--- /dev/null
+++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/zh_TW.lproj/SUAutomaticUpdateAlert.nib/info.nib
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>IBDocumentLocation</key>
+	<string>188 142 356 240 0 0 1280 1002 </string>
+	<key>IBFramework Version</key>
+	<string>443.0</string>
+	<key>IBSystem Version</key>
+	<string>8I127</string>
+</dict>
+</plist>
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/zh_TW.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/zh_TW.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib
new file mode 100644
index 0000000..b619eb4
Binary files /dev/null and b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/zh_TW.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/zh_TW.lproj/SUUpdateAlert.nib/classes.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/zh_TW.lproj/SUUpdateAlert.nib/classes.nib
new file mode 100644
index 0000000..0ac32ad
--- /dev/null
+++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/zh_TW.lproj/SUUpdateAlert.nib/classes.nib
@@ -0,0 +1,21 @@
+{
+    IBClasses = (
+        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
+        {CLASS = NSObject; LANGUAGE = ObjC; }, 
+        {
+            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
+            CLASS = SUUpdateAlert; 
+            LANGUAGE = ObjC; 
+            OUTLETS = {delegate = id; description = id; releaseNotesView = WebView; }; 
+            SUPERCLASS = NSWindowController; 
+        }, 
+        {
+            ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; 
+            CLASS = SUUpdateAlertController; 
+            LANGUAGE = ObjC; 
+            OUTLETS = {releaseNotesView = id; }; 
+            SUPERCLASS = NSWindowController; 
+        }
+    ); 
+    IBVersion = 1; 
+}
\ No newline at end of file
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/zh_TW.lproj/SUUpdateAlert.nib/info.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/zh_TW.lproj/SUUpdateAlert.nib/info.nib
new file mode 100644
index 0000000..83a4377
--- /dev/null
+++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/zh_TW.lproj/SUUpdateAlert.nib/info.nib
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>IBDocumentLocation</key>
+	<string>62 61 356 240 0 0 1280 832 </string>
+	<key>IBFramework Version</key>
+	<string>443.0</string>
+	<key>IBOpenObjects</key>
+	<array>
+		<integer>5</integer>
+	</array>
+	<key>IBSystem Version</key>
+	<string>8I127</string>
+</dict>
+</plist>
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/zh_TW.lproj/SUUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/zh_TW.lproj/SUUpdateAlert.nib/keyedobjects.nib
new file mode 100644
index 0000000..9be9428
Binary files /dev/null and b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/zh_TW.lproj/SUUpdateAlert.nib/keyedobjects.nib differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/zh_TW.lproj/Sparkle.strings b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/zh_TW.lproj/Sparkle.strings
new file mode 100644
index 0000000..a548680
Binary files /dev/null and b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/zh_TW.lproj/Sparkle.strings differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Sparkle b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Sparkle
new file mode 100755
index 0000000..9dbf9e7
Binary files /dev/null and b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Sparkle differ
diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/Current b/hw/xquartz/bundle/Sparkle.framework/Versions/Current
new file mode 120000
index 0000000..8c7e5a6
--- /dev/null
+++ b/hw/xquartz/bundle/Sparkle.framework/Versions/Current
@@ -0,0 +1 @@
+A
\ No newline at end of file
diff --git a/hw/xquartz/bundle/X11.xcodeproj/project.pbxproj b/hw/xquartz/bundle/X11.xcodeproj/project.pbxproj
index ae8ec07..711408d 100644
--- a/hw/xquartz/bundle/X11.xcodeproj/project.pbxproj
+++ b/hw/xquartz/bundle/X11.xcodeproj/project.pbxproj
@@ -14,9 +14,23 @@
 		527F241F0B5D938C007840A7 /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 50F4F0A7039D6ACA0E82C0CB /* CoreFoundation.framework */; };
 		527F24200B5D938C007840A7 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 570C5748047186C400ACF82F /* SystemConfiguration.framework */; };
 		527F24370B5D9D89007840A7 /* Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 527F24260B5D938C007840A7 /* Info.plist */; };
+		52880C6F0DCFF906003407EC /* Sparkle.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 52880C6E0DCFF906003407EC /* Sparkle.framework */; };
 		52D9C0ED0BCDDF6B00CD2AFC /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 52D9C0EB0BCDDF6B00CD2AFC /* Localizable.strings */; };
 /* End PBXBuildFile section */
 
+/* Begin PBXCopyFilesBuildPhase section */
+		52880C8C0DCFF9FC003407EC /* CopyFiles */ = {
+			isa = PBXCopyFilesBuildPhase;
+			buildActionMask = 2147483647;
+			dstPath = "";
+			dstSubfolderSpec = 10;
+			files = (
+				52880C6F0DCFF906003407EC /* Sparkle.framework in CopyFiles */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXCopyFilesBuildPhase section */
+
 /* Begin PBXFileReference section */
 		0867D6ABFE840B52C02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = "<group>"; };
 		1870340FFE93FCAF11CA0CD7 /* English */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = English; path = English.lproj/main.nib; sourceTree = "<group>"; };
@@ -76,6 +90,7 @@
 		50F4F0A7039D6ACA0E82C0CB /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = /System/Library/Frameworks/CoreFoundation.framework; sourceTree = "<absolute>"; };
 		527F24260B5D938C007840A7 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = Info.plist; sourceTree = "<group>"; };
 		527F24270B5D938C007840A7 /* X11.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = X11.app; sourceTree = BUILT_PRODUCTS_DIR; };
+		52880C6E0DCFF906003407EC /* Sparkle.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Sparkle.framework; sourceTree = "<group>"; };
 		52D9C0EC0BCDDF6B00CD2AFC /* English */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/Localizable.strings; sourceTree = "<group>"; };
 		570C5748047186C400ACF82F /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = /System/Library/Frameworks/SystemConfiguration.framework; sourceTree = "<absolute>"; };
 /* End PBXFileReference section */
@@ -135,6 +150,7 @@
 		20286C32FDCF999611CA2CEA /* External Frameworks and Libraries */ = {
 			isa = PBXGroup;
 			children = (
+				52880C6E0DCFF906003407EC /* Sparkle.framework */,
 				50F4F0A7039D6ACA0E82C0CB /* CoreFoundation.framework */,
 				570C5748047186C400ACF82F /* SystemConfiguration.framework */,
 			);
@@ -159,6 +175,7 @@
 			buildConfigurationList = 527F24220B5D938C007840A7 /* Build configuration list for PBXNativeTarget "X11" */;
 			buildPhases = (
 				527F24170B5D938C007840A7 /* Headers */,
+				52880C8C0DCFF9FC003407EC /* CopyFiles */,
 				527F24180B5D938C007840A7 /* Resources */,
 				527F241C0B5D938C007840A7 /* Sources */,
 				527F241E0B5D938C007840A7 /* Frameworks */,
@@ -350,7 +367,11 @@
 			isa = XCBuildConfiguration;
 			buildSettings = {
 				COPY_PHASE_STRIP = NO;
-				FRAMEWORK_SEARCH_PATHS = "";
+				FRAMEWORK_SEARCH_PATHS = (
+					"$(inherited)",
+					"$(FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_1)",
+				);
+				FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_1 = "\"$(SRCROOT)\"";
 				GCC_SYMBOLS_PRIVATE_EXTERN = NO;
 				HEADER_SEARCH_PATHS = /usr/X11/include;
 				INFOPLIST_FILE = Info.plist;
@@ -378,7 +399,11 @@
 			isa = XCBuildConfiguration;
 			buildSettings = {
 				COPY_PHASE_STRIP = YES;
-				FRAMEWORK_SEARCH_PATHS = "";
+				FRAMEWORK_SEARCH_PATHS = (
+					"$(inherited)",
+					"$(FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_1)",
+				);
+				FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_1 = "\"$(SRCROOT)\"";
 				GCC_SYMBOLS_PRIVATE_EXTERN = NO;
 				HEADER_SEARCH_PATHS = /usr/X11/include;
 				INFOPLIST_FILE = Info.plist;
@@ -405,7 +430,11 @@
 		527F24250B5D938C007840A7 /* Default */ = {
 			isa = XCBuildConfiguration;
 			buildSettings = {
-				FRAMEWORK_SEARCH_PATHS = "";
+				FRAMEWORK_SEARCH_PATHS = (
+					"$(inherited)",
+					"$(FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_1)",
+				);
+				FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_1 = "\"$(SRCROOT)\"";
 				GCC_SYMBOLS_PRIVATE_EXTERN = NO;
 				HEADER_SEARCH_PATHS = /usr/X11/include;
 				INFOPLIST_FILE = Info.plist;
commit e4ebfed1785597b48b68e1bbdde3e5c4061b749f
Author: Dave Airlie <airlied at linux.ie>
Date:   Tue May 6 16:46:37 2008 +1000

    xf86edid: fix typo in debug output

diff --git a/hw/xfree86/modes/xf86EdidModes.c b/hw/xfree86/modes/xf86EdidModes.c
index 09d0039..057b93d 100644
--- a/hw/xfree86/modes/xf86EdidModes.c
+++ b/hw/xfree86/modes/xf86EdidModes.c
@@ -363,7 +363,7 @@ DDCModeFromDetailedTiming(int scrnIndex, struct detailed_timings *timing,
     /* We only do seperate sync currently */
     if (timing->sync != 0x03) {
          xf86DrvMsg(scrnIndex, X_INFO,
-		    "%s: %dx%d Warning: We only handle seperate"
+		    "%s: %dx%d Warning: We only handle separate"
                     " sync.\n", __func__, timing->h_active, timing->v_active);
     }
 
commit 6acc2acd0db2826add7c47e94e4061d169a41f88
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date:   Mon May 5 15:32:26 2008 -0700

    Rootless: mi doesn't let us resize root, so we need to do it ourselves...
    (cherry picked from commit c1ec36e28cff857664090cc8792db1ae93b783fa)

diff --git a/miext/rootless/rootlessWindow.c b/miext/rootless/rootlessWindow.c
index df1d3a8..0edafe7 100644
--- a/miext/rootless/rootlessWindow.c
+++ b/miext/rootless/rootlessWindow.c
@@ -1338,34 +1338,55 @@ RootlessResizeWindow(WindowPtr pWin, int x, int y,
     RegionRec saveRoot;
 
     RL_DEBUG_MSG("resizewindow start (win 0x%x) ", pWin);
+    
+    if(pWin->parent) {
+        if (winRec) {
+            oldBW = winRec->borderWidth;
+            oldX = winRec->x;
+            oldY = winRec->y;
+            oldW = winRec->width;
+            oldH = winRec->height;
 
-    if (winRec) {
-        oldBW = winRec->borderWidth;
-        oldX = winRec->x;
-        oldY = winRec->y;
-        oldW = winRec->width;
-        oldH = winRec->height;
-
-        newBW = oldBW;
-        newX = x;
-        newY = y;
-        newW = w + 2*newBW;
-        newH = h + 2*newBW;
-
-        resize_after = StartFrameResize(pWin, TRUE,
-                                        oldX, oldY, oldW, oldH, oldBW,
-                                        newX, newY, newW, newH, newBW);
-    }
+            newBW = oldBW;
+            newX = x;
+            newY = y;
+            newW = w + 2*newBW;
+            newH = h + 2*newBW;
 
-    HUGE_ROOT(pWin);
-    SCREEN_UNWRAP(pScreen, ResizeWindow);
-    pScreen->ResizeWindow(pWin, x, y, w, h, pSib);
-    SCREEN_WRAP(pScreen, ResizeWindow);
-    NORMAL_ROOT(pWin);
+            resize_after = StartFrameResize(pWin, TRUE,
+                                            oldX, oldY, oldW, oldH, oldBW,
+                                            newX, newY, newW, newH, newBW);
+        }
 
-    if (winRec) {
-        FinishFrameResize(pWin, TRUE, oldX, oldY, oldW, oldH, oldBW,
-                          newX, newY, newW, newH, newBW, resize_after);
+        HUGE_ROOT(pWin);
+        SCREEN_UNWRAP(pScreen, ResizeWindow);
+        pScreen->ResizeWindow(pWin, x, y, w, h, pSib);
+        SCREEN_WRAP(pScreen, ResizeWindow);
+        NORMAL_ROOT(pWin);
+
+        if (winRec) {
+            FinishFrameResize(pWin, TRUE, oldX, oldY, oldW, oldH, oldBW,
+                              newX, newY, newW, newH, newBW, resize_after);
+        }
+    } else {
+        /* Special case for resizing the root window */
+        BoxRec box;
+
+        pWin->drawable.x = x;
+        pWin->drawable.y = y;
+        pWin->drawable.width = w;
+        pWin->drawable.height = h;
+
+        box.x1 = x; box.y1 = y;
+        box.x2 = x + w; box.y2 = y + h;
+        REGION_UNINIT(pScreen, &pWin->winSize);
+        REGION_INIT(pScreen, &pWin->winSize, &box, 1);
+        REGION_COPY(pScreen, &pWin->borderSize, &pWin->winSize);
+        REGION_COPY(pScreen, &pWin->clipList, &pWin->winSize);
+        REGION_COPY(pScreen, &pWin->borderClip, &pWin->winSize);
+
+        miSendExposures(pWin, &pWin->borderClip,
+                        pWin->drawable.x, pWin->drawable.y);        
     }
 
     RL_DEBUG_MSG("resizewindow end\n");
commit efa65a0317e12c9ad34fa00fe90bf5eae9fa2670
Author: Keith Packard <keithp at keithp.com>
Date:   Sun May 4 21:52:58 2008 -0700

    Rework composite overlay window code to fix several resource management bugs.
    
    The composite overlay window code had several misunderstandings of the
    workings of the X server, in particular error handling paths would often
    double-free objects. Clean all of this up by using resource destruction as
    the sole mechanism for freeing resource-based objects.

diff --git a/composite/Makefile.am b/composite/Makefile.am
index 21504e6..d7bead1 100644
--- a/composite/Makefile.am
+++ b/composite/Makefile.am
@@ -7,4 +7,5 @@ libcomposite_la_SOURCES = 	\
 	compext.c		\
 	compint.h		\
 	compinit.c		\
+	compoverlay.c		\
 	compwindow.c		
diff --git a/composite/compext.c b/composite/compext.c
index b3433f7..e720f6c 100644
--- a/composite/compext.c
+++ b/composite/compext.c
@@ -54,10 +54,7 @@ static CARD8	CompositeReqCode;
 static DevPrivateKey CompositeClientPrivateKey = &CompositeClientPrivateKey;
 RESTYPE		CompositeClientWindowType;
 RESTYPE		CompositeClientSubwindowsType;
-static RESTYPE	CompositeClientOverlayType;
-
-static void deleteCompOverlayClient (CompOverlayClientPtr pOcToDel, 
-				     ScreenPtr pScreen);
+RESTYPE		CompositeClientOverlayType;
 
 typedef struct _CompositeClient {
     int	    major_version;
@@ -107,19 +104,8 @@ static int
 FreeCompositeClientOverlay (pointer value, XID ccwid)
 {
     CompOverlayClientPtr pOc = (CompOverlayClientPtr) value;
-    ScreenPtr pScreen = pOc->pScreen;
-    CompScreenPtr cs;
-
-    deleteCompOverlayClient(pOc, pScreen);
-
-    /* Unmap overlay window when there are no more clients using it */
-    cs = GetCompScreen(pScreen);
-    if (cs->pOverlayClients == NULL) {
-	if (cs->pOverlayWin != NULL) {
-	    UnmapWindow(cs->pOverlayWin, FALSE);
-	}
-    }
 
+    compFreeOverlayClient (pOc);
     return Success;
 }
 
@@ -304,137 +290,6 @@ ProcCompositeNameWindowPixmap (ClientPtr client)
 }
 
 
-/*
- * Routines for manipulating the per-screen overlay clients list.
- * This list indicates which clients have called GetOverlayWindow
- * for this screen.
- */
-
-/* Return the screen's overlay client list element for the given client */
-static CompOverlayClientPtr
-findCompOverlayClient (ClientPtr pClient, ScreenPtr pScreen) 
-{
-    CompScreenPtr    cs = GetCompScreen(pScreen);
-    CompOverlayClientPtr pOc;
-
-    for (pOc = cs->pOverlayClients; pOc != NULL; pOc = pOc->pNext) {
-	if (pOc->pClient == pClient) {
-	    return pOc;
-	}
-    }
-
-    return NULL;           
-}
-
-static int
-createCompOverlayClient (ClientPtr pClient, ScreenPtr pScreen)
-{
-    CompScreenPtr    cs = GetCompScreen(pScreen);
-    CompOverlayClientPtr pOc;
-
-    pOc = (CompOverlayClientPtr) xalloc(sizeof(CompOverlayClientRec));
-    if (pOc == NULL) {
-	return BadAlloc;
-    }
-    pOc->pClient = pClient;
-    pOc->pScreen = pScreen;
-    pOc->resource = FakeClientID(pClient->index);
-    pOc->pNext = cs->pOverlayClients;
-    cs->pOverlayClients = pOc;
-
-    /* 
-     * Create a resource for this element so it can be deleted
-     * when the client goes away.
-     */
-    if (!AddResource (pOc->resource, CompositeClientOverlayType, 
-		      (pointer) pOc)) {
-	xfree(pOc);
-	return BadAlloc;
-    }
-
-    return Success;
-}
-
-/* 
- * Delete the given overlay client list element from its screen list.
- */
-static void
-deleteCompOverlayClient (CompOverlayClientPtr pOcToDel, ScreenPtr pScreen)
-{
-    CompScreenPtr    cs = GetCompScreen(pScreen);
-    CompOverlayClientPtr pOc, pNext;
-    CompOverlayClientPtr pOcLast = NULL;
-
-    pOc = cs->pOverlayClients;
-    while (pOc != NULL) {
-	pNext = pOc->pNext;
-	if (pOc == pOcToDel) {
-	    xfree(pOc);
-	    if (pOcLast == NULL) {
-		cs->pOverlayClients = pNext;
-	    } else {
-		pOcLast->pNext = pNext;
-	    }
-	    break;
-	}
-	pOcLast = pOc;
-	pOc = pNext;
-    }
-}
-
-/* 
- * Delete all the hide-counts list elements for this screen.
- */
-void
-deleteCompOverlayClientsForScreen (ScreenPtr pScreen)
-{
-    CompScreenPtr    cs = GetCompScreen(pScreen);
-    CompOverlayClientPtr pOc, pTmp;
-
-    pOc = cs->pOverlayClients;
-    while (pOc != NULL) {
-	pTmp = pOc->pNext;
-	FreeResource(pOc->resource, 0);
-	pOc = pTmp;
-    }
-    cs->pOverlayClients = NULL;
-}
-
-/* 
-** If necessary, create the overlay window. And map it 
-** Note: I found it excessively difficult to destroy this window
-** during compCloseScreen; DeleteWindow can't be called because
-** the input devices are already shut down. So we are going to 
-** just allocate an overlay window once per screen per X server
-** invocation.
-*/
-
-static WindowPtr
-createOverlayWindow (ScreenPtr pScreen)
-{
-    int wid = FakeClientID(0);
-    WindowPtr pWin;
-    XID overrideRedirect = TRUE;
-    int result;
-
-    pWin = CreateWindow (
-	        wid, WindowTable[pScreen->myNum],
-    	        0, 0, pScreen->width, pScreen->height, 0, 
-	        InputOutput, CWOverrideRedirect, &overrideRedirect,
-	        WindowTable[pScreen->myNum]->drawable.depth, 
-	        serverClient, pScreen->rootVisual, &result);
-    if (pWin == NULL) {
-	return NULL;
-    }
-
-    if (!AddResource(wid, RT_WINDOW, (pointer)pWin)) {
-	DeleteWindow(pWin, None);
-	return NULL;
-    }
-
-    return pWin;
-}
-
 static int
 ProcCompositeGetOverlayWindow (ClientPtr client)
 {
@@ -456,28 +311,31 @@ ProcCompositeGetOverlayWindow (ClientPtr client)
     }
     pScreen = pWin->drawable.pScreen;
 
+    /* 
+     * Create an OverlayClient structure to mark this client's
+     * interest in the overlay window
+     */
+    pOc = compCreateOverlayClient(pScreen, client);
+    if (pOc == NULL)
+	return BadAlloc;
+
+    /*
+     * Make sure the overlay window exists
+     */
     cs = GetCompScreen(pScreen);
-    if (cs->pOverlayWin == NULL) {
-	cs->pOverlayWin = createOverlayWindow(pScreen);
-	if (cs->pOverlayWin == NULL) {
+    if (cs->pOverlayWin == NULL)
+	if (!compCreateOverlayWindow(pScreen))
+	{
+	    FreeResource (pOc->resource, RT_NONE);
 	    return BadAlloc;
 	}
-    }
 
     rc = XaceHook(XACE_RESOURCE_ACCESS, client, cs->pOverlayWin->drawable.id,
 		  RT_WINDOW, cs->pOverlayWin, RT_NONE, NULL, DixGetAttrAccess);
     if (rc != Success)
+    {
+	FreeResource (pOc->resource, RT_NONE);
 	return rc;
-
-    MapWindow(cs->pOverlayWin, serverClient);
-
-    /* Record that client is using this overlay window */
-    pOc = findCompOverlayClient(client, pScreen);
-    if (pOc == NULL) {
-	int ret = createCompOverlayClient(client, pScreen);
-	if (ret != Success) {
-	    return ret;
-	}
     }
 
     rep.type = X_Reply;
@@ -504,7 +362,6 @@ ProcCompositeReleaseOverlayWindow (ClientPtr client)
     WindowPtr pWin;
     ScreenPtr pScreen;
     CompOverlayClientPtr pOc;
-    CompScreenPtr cs;
 
     REQUEST_SIZE_MATCH(xCompositeReleaseOverlayWindowReq);
     pWin = (WindowPtr) LookupIDByType (stuff->window, RT_WINDOW);
@@ -519,18 +376,12 @@ ProcCompositeReleaseOverlayWindow (ClientPtr client)
      * Has client queried a reference to the overlay window
      * on this screen? If not, generate an error.
      */
-    pOc = findCompOverlayClient(client, pWin->drawable.pScreen);
-    if (pOc == NULL) {
+    pOc = compFindOverlayClient (pWin->drawable.pScreen, client);
+    if (pOc == NULL)
 	return BadMatch;
-    }
 
     /* The delete function will free the client structure */
-    FreeResource (pOc->resource, 0);
-
-    cs = GetCompScreen(pScreen);
-    if (cs->pOverlayClients == NULL) {
-	UnmapWindow(cs->pOverlayWin, FALSE);
-    }
+    FreeResource (pOc->resource, RT_NONE);
 
     return client->noClientException;
 }
diff --git a/composite/compinit.c b/composite/compinit.c
index 49b2044..7914a8d 100644
--- a/composite/compinit.c
+++ b/composite/compinit.c
@@ -76,14 +76,6 @@ compCloseScreen (int index, ScreenPtr pScreen)
     pScreen->CopyWindow = cs->CopyWindow;
     pScreen->PositionWindow = cs->PositionWindow;
 
-    deleteCompOverlayClientsForScreen(pScreen);
-
-    /* 
-    ** Note: no need to call DeleteWindow; the server has
-    ** already destroyed it.
-    */
-    cs->pOverlayWin = NULL;
-
     xfree (cs);
     dixSetPrivate(&pScreen->devPrivates, CompScreenPrivateKey, NULL);
     ret = (*pScreen->CloseScreen) (index, pScreen);
@@ -122,11 +114,11 @@ compChangeWindowAttributes(WindowPtr pWin, unsigned long mask)
     if (ret && (mask & CWBackingStore)) {
 	if (pWin->backingStore != NotUseful) {
 	    compRedirectWindow(serverClient, pWin, CompositeRedirectAutomatic);
-	    pWin->backStorage = TRUE;
+	    pWin->backStorage = (pointer) (intptr_t) 1;
 	} else {
 	    compUnredirectWindow(serverClient, pWin,
 				 CompositeRedirectAutomatic);
-	    pWin->backStorage = FALSE;
+	    pWin->backStorage = NULL;
 	}
     }
 
@@ -380,6 +372,7 @@ compScreenInit (ScreenPtr pScreen)
 	return FALSE;
 
     cs->damaged = FALSE;
+    cs->overlayWid = FakeClientID(0);
     cs->pOverlayWin = NULL;
     cs->pOverlayClients = NULL;
 
diff --git a/composite/compint.h b/composite/compint.h
index 4b0fe08..1c19ccd 100644
--- a/composite/compint.h
+++ b/composite/compint.h
@@ -155,6 +155,7 @@ typedef struct _CompScreen {
     VisualID			*alternateVisuals;
 
     WindowPtr                   pOverlayWin;
+    Window			overlayWid;
     CompOverlayClientPtr        pOverlayClients;
     
 } CompScreenRec, *CompScreenPtr;
@@ -172,6 +173,7 @@ extern DevPrivateKey CompSubwindowsPrivateKey;
 
 extern RESTYPE		CompositeClientWindowType;
 extern RESTYPE		CompositeClientSubwindowsType;
+extern RESTYPE		CompositeClientOverlayType;
 
 /*
  * compalloc.c
@@ -230,6 +232,25 @@ Bool
 compScreenInit (ScreenPtr pScreen);
 
 /*
+ * compoverlay.c
+ */
+
+void
+compFreeOverlayClient (CompOverlayClientPtr pOcToDel);
+
+CompOverlayClientPtr
+compFindOverlayClient (ScreenPtr pScreen, ClientPtr pClient);
+    
+CompOverlayClientPtr
+compCreateOverlayClient (ScreenPtr pScreen, ClientPtr pClient);
+
+Bool
+compCreateOverlayWindow (ScreenPtr pScreen);
+
+void
+compDestroyOverlayWindow (ScreenPtr pScreen);
+
+/*
  * compwindow.c
  */
 
@@ -292,9 +313,6 @@ compCopyWindow (WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc);
 void
 compWindowUpdate (WindowPtr pWin);
 
-void
-deleteCompOverlayClientsForScreen (ScreenPtr pScreen);
-
 WindowPtr
 CompositeRealChildHead (WindowPtr pWin);
 
diff --git a/composite/compoverlay.c b/composite/compoverlay.c
new file mode 100644
index 0000000..94e5b03
--- /dev/null
+++ b/composite/compoverlay.c
@@ -0,0 +1,159 @@
+/*
+ * Copyright © 2006 Sun Microsystems
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, 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 Sun Microsystems not be used in
+ * advertising or publicity pertaining to distribution of the software without
+ * specific, written prior permission.  Sun Microsystems makes no
+ * representations about the suitability of this software for any purpose.  It
+ * is provided "as is" without express or implied warranty.
+ *
+ * SUN MICROSYSTEMS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ * EVENT SHALL SUN MICROSYSTEMS BE LIABLE 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.
+ *
+ * Copyright © 2003 Keith Packard
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, 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 Keith Packard not be used in
+ * advertising or publicity pertaining to distribution of the software without
+ * specific, written prior permission.  Keith Packard makes no
+ * representations about the suitability of this software for any purpose.  It
+ * is provided "as is" without express or implied warranty.
+ *
+ * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ * EVENT SHALL KEITH PACKARD BE LIABLE 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.
+ */
+
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#endif
+
+#include "compint.h"
+#include "xace.h"
+
+/* 
+ * Delete the given overlay client list element from its screen list.
+ */
+void
+compFreeOverlayClient (CompOverlayClientPtr pOcToDel)
+{
+    ScreenPtr		    pScreen = pOcToDel->pScreen;
+    CompScreenPtr	    cs = GetCompScreen (pScreen);
+    CompOverlayClientPtr    *pPrev, pOc;
+
+    for (pPrev = &cs->pOverlayClients; (pOc = *pPrev); pPrev = &pOc->pNext)
+    {
+	if (pOc == pOcToDel) {
+	    *pPrev = pOc->pNext;
+	    xfree (pOc);
+	    break;
+	}
+    }
+    
+    /* Destroy overlay window when there are no more clients using it */
+    if (cs->pOverlayClients == NULL)
+	compDestroyOverlayWindow (pScreen);
+}
+
+/*
+ * Return the client's first overlay client rec from the given screen
+ */
+CompOverlayClientPtr
+compFindOverlayClient (ScreenPtr pScreen, ClientPtr pClient)
+{
+    CompScreenPtr	    cs = GetCompScreen(pScreen);
+    CompOverlayClientPtr    pOc;
+
+    for (pOc = cs->pOverlayClients; pOc != NULL; pOc = pOc->pNext)
+	if (pOc->pClient == pClient)
+	    return pOc;
+
+    return NULL;           
+}
+
+/*
+ * Create an overlay client object for the given client
+ */
+CompOverlayClientPtr
+compCreateOverlayClient (ScreenPtr pScreen, ClientPtr pClient)
+{
+    CompScreenPtr    cs = GetCompScreen(pScreen);
+    CompOverlayClientPtr pOc;
+
+    pOc = (CompOverlayClientPtr) xalloc(sizeof(CompOverlayClientRec));
+    if (pOc == NULL)
+	return NULL;
+
+    pOc->pClient = pClient;
+    pOc->pScreen = pScreen;
+    pOc->resource = FakeClientID(pClient->index);
+    pOc->pNext = cs->pOverlayClients;
+    cs->pOverlayClients = pOc;
+
+    /* 
+     * Create a resource for this element so it can be deleted
+     * when the client goes away.
+     */
+    if (!AddResource (pOc->resource, CompositeClientOverlayType, (pointer) pOc))
+	return NULL;
+
+    return pOc;
+}
+
+/*
+ * Create the overlay window and map it
+ */
+Bool
+compCreateOverlayWindow (ScreenPtr pScreen)
+{
+    CompScreenPtr   cs = GetCompScreen(pScreen);
+    WindowPtr	    pRoot = WindowTable[pScreen->myNum];
+    WindowPtr	    pWin;
+    XID		    overrideRedirect = TRUE;
+    int		    result;
+
+    pWin = cs->pOverlayWin = 
+	CreateWindow (cs->overlayWid, pRoot,
+		      0, 0, pScreen->width, pScreen->height, 0, 
+		      InputOutput, CWOverrideRedirect, &overrideRedirect,
+		      pRoot->drawable.depth, 
+		      serverClient, pScreen->rootVisual, &result);
+    if (pWin == NULL)
+	return FALSE;
+
+    if (!AddResource(pWin->drawable.id, RT_WINDOW, (pointer)pWin))
+	return FALSE;
+
+    MapWindow(pWin, serverClient);
+
+    return TRUE;
+}
+
+/*
+ * Destroy the overlay window
+ */
+void
+compDestroyOverlayWindow (ScreenPtr pScreen)
+{
+    CompScreenPtr cs = GetCompScreen(pScreen);
+
+    cs->pOverlayWin = NullWindow;
+    FreeResource (cs->overlayWid, RT_NONE);
+}
+
commit 6c1accce87c9bd640c1b4bbc49bae7d44b1cc97b
Author: Keith Packard <keithp at keithp.com>
Date:   Sun May 4 21:51:08 2008 -0700

    Empty the borderClip of manual redirect windows. (bug 15823)
    
    Thanks to Owen Taylor for root-causing this one.
    
    If a TreatAsTransparent window has any area in the borderClip, that will be
    added to the totalClip region for use by other windows. That's wrong.
    Instead, simply empty the borderClip for TreatAsTransparent windows right up
    front.

diff --git a/mi/mivaltree.c b/mi/mivaltree.c
index 74483e3..d9d07ca 100644
--- a/mi/mivaltree.c
+++ b/mi/mivaltree.c
@@ -255,7 +255,11 @@ miComputeClips (
     if (pParent->redirectDraw != RedirectDrawNone)
     {
 	if (miSetRedirectBorderClipProc)
+	{
+	    if (TreatAsTransparent (pParent))
+		REGION_EMPTY (pScreen, universe);
 	    (*miSetRedirectBorderClipProc) (pParent, universe);
+	}
 	REGION_COPY(pScreen, universe, &pParent->borderSize);
     }
 #endif
commit d500eeb9458336780d77baf8b7db96e1f7ff4f0d
Author: Aaron Plattner <aplattner at nvidia.com>
Date:   Sun May 4 10:26:25 2008 -0700

    Xephyr: Handle depth 30 and reject higher depths rather than crashing.

diff --git a/hw/kdrive/ephyr/ephyr.c b/hw/kdrive/ephyr/ephyr.c
index d69e148..3989d0d 100644
--- a/hw/kdrive/ephyr/ephyr.c
+++ b/hw/kdrive/ephyr/ephyr.c
@@ -150,11 +150,22 @@ ephyrScreenInitialize (KdScreenInfo *screen, EphyrScrPriv *scrpriv)
 	  screen->fb[0].depth = 16;
 	  screen->fb[0].bitsPerPixel = 16;
 	}
-      else
+      else if (screen->fb[0].depth <= 24)
 	{
 	  screen->fb[0].depth = 24;
 	  screen->fb[0].bitsPerPixel = 32;
 	}
+      else if (screen->fb[0].depth <= 30)
+	{
+	  screen->fb[0].depth = 30;
+	  screen->fb[0].bitsPerPixel = 32;
+	}
+      else
+	{
+	  ErrorF("\nXephyr: Unsupported screen depth %d\n",
+	         screen->fb[0].depth);
+	  return FALSE;
+	}
 
       hostx_get_visual_masks (screen, &redMask, &greenMask, &blueMask);
 
commit f4a68f3701889950d3b98842d021f357f3913fea
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date:   Fri May 2 17:35:57 2008 -0700

    XQuartz: Fix mouse input offsets earlier since GetPointerEvents does not like negative (x,y) values
    (cherry picked from commit 8d9eab3a2ec5955cc2698fdcb1fa6ed12b2aadb7)

diff --git a/hw/xquartz/X11Application.m b/hw/xquartz/X11Application.m
index 646b9ef..691725d 100644
--- a/hw/xquartz/X11Application.m
+++ b/hw/xquartz/X11Application.m
@@ -839,7 +839,7 @@ static void send_nsevent (NSEventType type, NSEvent *e) {
 	int pointer_x, pointer_y, ev_button, ev_type;
 	float pressure, tilt_x, tilt_y;
 
-	/* convert location to global top-left coordinates */
+	/* convert location to be relative to top-left of primary display */
 	location = [e locationInWindow];
 	window = [e window];
 	screen = [[[NSScreen screens] objectAtIndex:0] frame];
diff --git a/hw/xquartz/darwinEvents.c b/hw/xquartz/darwinEvents.c
index 2c95ed7..1547094 100644
--- a/hw/xquartz/darwinEvents.c
+++ b/hw/xquartz/darwinEvents.c
@@ -359,6 +359,28 @@ static void DarwinPokeEQ(void) {
 	write(darwinEventWriteFD, &nullbyte, 1);
 }
 
+/* Convert from Appkit pointer input values to X input values:
+ * Note: pointer_x and pointer_y are relative to the upper-left of primary
+ *       display.
+ */
+static void DarwinPrepareValuators(int *valuators, ScreenPtr screen,
+                                   int pointer_x, int pointer_y, 
+                                   float pressure, float tilt_x, float tilt_y) {
+    /* Fix offset between darwin and X screens */
+    pointer_x -= darwinMainScreenX + dixScreenOrigins[screen->myNum].x;
+    pointer_y -= darwinMainScreenY + dixScreenOrigins[screen->myNum].y;
+    
+    /* Setup our array of values */
+    valuators[0] = pointer_x;
+    valuators[1] = pointer_y;
+    valuators[2] = pressure * SCALEFACTOR_PRESSURE;
+    valuators[3] = tilt_x * SCALEFACTOR_TILT;
+    valuators[4] = tilt_y * SCALEFACTOR_TILT;
+    
+    DEBUG_LOG("Valuators: {%d,%d,%d,%d,%d}\n", 
+              valuators[0], valuators[1], valuators[2], valuators[3], valuators[4]);
+}
+
 void DarwinSendPointerEvents(int ev_type, int ev_button, int pointer_x, int pointer_y, 
 			     float pressure, float tilt_x, float tilt_y) {
 	static int darwinFakeMouseButtonDown = 0;
@@ -366,22 +388,26 @@ void DarwinSendPointerEvents(int ev_type, int ev_button, int pointer_x, int poin
 	int i, num_events;
 	DeviceIntPtr dev;
     ScreenPtr screen;
+    int valuators[5];
 	
-//    DEBUG_LOG("x=%d, y=%d, p=%f, tx=%f, ty=%f\n", pointer_x, pointer_y, pressure, tilt_x, tilt_y);
+    DEBUG_LOG("x=%d, y=%d, p=%f, tx=%f, ty=%f\n", pointer_x, pointer_y, pressure, tilt_x, tilt_y);
     
 	if(!darwinEvents) {
-		ErrorF("DarwinSendPointerEvents called before darwinEvents was initialized\n");
+		DEBUG_LOG("DarwinSendPointerEvents called before darwinEvents was initialized\n");
 		return;
 	}
 
-	int valuators[5] = {pointer_x, pointer_y, pressure * SCALEFACTOR_PRESSURE, 
-		      tilt_x * SCALEFACTOR_TILT, tilt_y * SCALEFACTOR_TILT};
-	
-	if (pressure == 0 && tilt_x == 0 && tilt_y == 0) dev = darwinPointer;
-	else dev = darwinTablet;
+	if (pressure == 0 && tilt_x == 0 && tilt_y == 0)
+        dev = darwinPointer;
+	else
+        dev = darwinTablet;
+
+    screen = miPointerGetScreen(dev);
+    if(!screen) {
+        DEBUG_LOG("DarwinSendPointerEvents called before screen was initialized\n");
+        return;
+    }
 
-	DEBUG_LOG("Valuators: {%d,%d,%d,%d,%d}\n", 
-			valuators[0], valuators[1], valuators[2], valuators[3], valuators[4]);
 	if (ev_type == ButtonPress && darwinFakeButtons && ev_button == 1) {
 		// Mimic multi-button mouse with modifier-clicks
 		// If both sets of modifiers are pressed,
@@ -411,19 +437,13 @@ void DarwinSendPointerEvents(int ev_type, int ev_button, int pointer_x, int poin
 		DarwinUpdateModifiers(KeyPress, darwinFakeMouseButtonMask & old_flags);
 		darwinFakeMouseButtonMask = 0;
 		return;
-	} 
+	}
 
+    DarwinPrepareValuators(valuators, screen, pointer_x, pointer_y, pressure, tilt_x, tilt_y);
     darwinEvents_lock(); {
         num_events = GetPointerEvents(darwinEvents, dev, ev_type, ev_button, 
                                       POINTER_ABSOLUTE, 0, dev==darwinTablet?5:2, valuators);
-        screen = miPointerGetScreen(dev);
-        for(i=0; i<num_events && screen; i++) {
-            darwinEvents[i].u.keyButtonPointer.rootX -= darwinMainScreenX +
-                dixScreenOrigins[screen->myNum].x;
-            darwinEvents[i].u.keyButtonPointer.rootY -= darwinMainScreenY +
-                dixScreenOrigins[screen->myNum].y;
-            mieqEnqueue (dev, &darwinEvents[i]);
-        }
+        for(i=0; i<num_events; i++) mieqEnqueue (dev, &darwinEvents[i]);
         DarwinPokeEQ();
 
     } darwinEvents_unlock();
@@ -433,7 +453,7 @@ void DarwinSendKeyboardEvents(int ev_type, int keycode) {
 	int i, num_events;
 
 	if(!darwinEvents) {
-		ErrorF("DarwinSendKeyboardEvents called before darwinEvents was initialized\n");
+		DEBUG_LOG("DarwinSendKeyboardEvents called before darwinEvents was initialized\n");
 		return;
 	}
 
@@ -459,21 +479,28 @@ void DarwinSendKeyboardEvents(int ev_type, int keycode) {
 
 void DarwinSendProximityEvents(int ev_type, int pointer_x, int pointer_y) {
 	int i, num_events;
-
-	// tilt and pressure have no meaning for a Prox event
-	int valuators[5] = {pointer_x, pointer_y, 0, 0, 0};  
+    ScreenPtr screen;
+    DeviceIntPtr dev = darwinTablet;
+    int valuators[5];
 
 	DEBUG_LOG("DarwinSendProximityEvents(%d, %d, %d)\n", ev_type, pointer_x, pointer_y);
-	
+
 	if(!darwinEvents) {
-		ErrorF("DarwinSendProximityEvents called before darwinEvents was initialized\n");
+		DEBUG_LOG("DarwinSendProximityEvents called before darwinEvents was initialized\n");
 		return;
 	}
+    
+    screen = miPointerGetScreen(dev);
+    if(!screen) {
+        DEBUG_LOG("DarwinSendPointerEvents called before screen was initialized\n");
+        return;
+    }    
 
+    DarwinPrepareValuators(valuators, screen, pointer_x, pointer_y, 0.0f, 0.0f, 0.0f);
     darwinEvents_lock(); {
-        num_events = GetProximityEvents(darwinEvents, darwinTablet, ev_type,
+        num_events = GetProximityEvents(darwinEvents, dev, ev_type,
                                         0, 5, valuators);
-        for(i=0; i<num_events; i++) mieqEnqueue (darwinTablet,&darwinEvents[i]);
+        for(i=0; i<num_events; i++) mieqEnqueue (dev,&darwinEvents[i]);
         DarwinPokeEQ();
     } darwinEvents_unlock();
 }
@@ -484,7 +511,7 @@ void DarwinSendScrollEvents(float count_x, float count_y,
 							int pointer_x, int pointer_y, 
 			    			float pressure, float tilt_x, float tilt_y) {
 	if(!darwinEvents) {
-		ErrorF("DarwinSendScrollEvents called before darwinEvents was initialized\n");
+		DEBUG_LOG("DarwinSendScrollEvents called before darwinEvents was initialized\n");
 		return;
 	}
 
commit 96fa7da3b87e2f9187ec13dad259beefdc17cd94
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date:   Fri May 2 16:53:45 2008 -0700

    XQuartz: Avoid a possible crash at startup due to unfavorable context switching.
    (cherry picked from commit ff10c37bdd09656cf2f7ee9577f5552caa1ffdb8)

diff --git a/hw/xquartz/darwinEvents.c b/hw/xquartz/darwinEvents.c
index 161fd9d..2c95ed7 100644
--- a/hw/xquartz/darwinEvents.c
+++ b/hw/xquartz/darwinEvents.c
@@ -365,6 +365,7 @@ void DarwinSendPointerEvents(int ev_type, int ev_button, int pointer_x, int poin
 	static int darwinFakeMouseButtonMask = 0;
 	int i, num_events;
 	DeviceIntPtr dev;
+    ScreenPtr screen;
 	
 //    DEBUG_LOG("x=%d, y=%d, p=%f, tx=%f, ty=%f\n", pointer_x, pointer_y, pressure, tilt_x, tilt_y);
     
@@ -415,11 +416,12 @@ void DarwinSendPointerEvents(int ev_type, int ev_button, int pointer_x, int poin
     darwinEvents_lock(); {
         num_events = GetPointerEvents(darwinEvents, dev, ev_type, ev_button, 
                                       POINTER_ABSOLUTE, 0, dev==darwinTablet?5:2, valuators);
-        for(i=0; i<num_events; i++) {
+        screen = miPointerGetScreen(dev);
+        for(i=0; i<num_events && screen; i++) {
             darwinEvents[i].u.keyButtonPointer.rootX -= darwinMainScreenX +
-                dixScreenOrigins[miPointerCurrentScreen()->myNum].x;
+                dixScreenOrigins[screen->myNum].x;
             darwinEvents[i].u.keyButtonPointer.rootY -= darwinMainScreenY +
-                dixScreenOrigins[miPointerCurrentScreen()->myNum].y;
+                dixScreenOrigins[screen->myNum].y;
             mieqEnqueue (dev, &darwinEvents[i]);
         }
         DarwinPokeEQ();
commit a338007be6fd4302af012109d959f43ac7eab2b1
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date:   Thu May 1 18:02:59 2008 -0700

    XQuartz: Adjust the screen origin offset properly for multimonitor setups
    (cherry picked from commit f2020b9836bacd0593ac0b4c8541e32714ab02a9)

diff --git a/hw/xquartz/X11Controller.m b/hw/xquartz/X11Controller.m
index df328f3..107d8ee 100644
--- a/hw/xquartz/X11Controller.m
+++ b/hw/xquartz/X11Controller.m
@@ -42,6 +42,7 @@
 
 #include "opaque.h"
 #include "darwin.h"
+#include "darwinEvents.h"
 #include "quartz.h"
 #define _APPLEWM_SERVER_
 #include "X11/extensions/applewm.h"
diff --git a/hw/xquartz/darwinEvents.c b/hw/xquartz/darwinEvents.c
index 7b3091d..161fd9d 100644
--- a/hw/xquartz/darwinEvents.c
+++ b/hw/xquartz/darwinEvents.c
@@ -81,22 +81,21 @@ int input_check_zero, input_check_flag;
 static int old_flags = 0;  // last known modifier state
 
 xEvent *darwinEvents = NULL;
+pthread_mutex_t darwinEvents_mutex = PTHREAD_MUTEX_INITIALIZER;
 
-pthread_mutex_t mieqEnqueue_mutex = PTHREAD_MUTEX_INITIALIZER;
-
-static inline void mieqEnqueue_lock(void) {
+static inline void darwinEvents_lock(void) {
     int err;
-    if((err = pthread_mutex_lock(&mieqEnqueue_mutex))) {
-        ErrorF("%s:%s:%d: Failed to lock mieqEnqueue_mutex: %d\n",
+    if((err = pthread_mutex_lock(&darwinEvents_mutex))) {
+        ErrorF("%s:%s:%d: Failed to lock darwinEvents_mutex: %d\n",
                __FILE__, __FUNCTION__, __LINE__, err);
         spewCallStack();
     }
 }
 
-static inline void mieqEnqueue_unlock(void) {
+static inline void darwinEvents_unlock(void) {
     int err;
-    if((err = pthread_mutex_unlock(&mieqEnqueue_mutex))) {
-        ErrorF("%s:%s:%d: Failed to unlock mieqEnqueue_mutex: %d\n",
+    if((err = pthread_mutex_unlock(&darwinEvents_mutex))) {
+        ErrorF("%s:%s:%d: Failed to unlock darwinEvents_mutex: %d\n",
                __FILE__, __FUNCTION__, __LINE__, err);
         spewCallStack();
     }
@@ -413,13 +412,19 @@ void DarwinSendPointerEvents(int ev_type, int ev_button, int pointer_x, int poin
 		return;
 	} 
 
-    mieqEnqueue_lock(); {
+    darwinEvents_lock(); {
         num_events = GetPointerEvents(darwinEvents, dev, ev_type, ev_button, 
                                       POINTER_ABSOLUTE, 0, dev==darwinTablet?5:2, valuators);
-        for(i=0; i<num_events; i++) mieqEnqueue (dev,&darwinEvents[i]);
+        for(i=0; i<num_events; i++) {
+            darwinEvents[i].u.keyButtonPointer.rootX -= darwinMainScreenX +
+                dixScreenOrigins[miPointerCurrentScreen()->myNum].x;
+            darwinEvents[i].u.keyButtonPointer.rootY -= darwinMainScreenY +
+                dixScreenOrigins[miPointerCurrentScreen()->myNum].y;
+            mieqEnqueue (dev, &darwinEvents[i]);
+        }
         DarwinPokeEQ();
 
-    } mieqEnqueue_unlock();
+    } darwinEvents_unlock();
 }
 
 void DarwinSendKeyboardEvents(int ev_type, int keycode) {
@@ -443,11 +448,11 @@ void DarwinSendKeyboardEvents(int ev_type, int keycode) {
 		}
 	}
 
-    mieqEnqueue_lock(); {
+    darwinEvents_lock(); {
         num_events = GetKeyboardEvents(darwinEvents, darwinKeyboard, ev_type, keycode + MIN_KEYCODE);
         for(i=0; i<num_events; i++) mieqEnqueue(darwinKeyboard,&darwinEvents[i]);
         DarwinPokeEQ();
-    } mieqEnqueue_unlock();
+    } darwinEvents_unlock();
 }
 
 void DarwinSendProximityEvents(int ev_type, int pointer_x, int pointer_y) {
@@ -463,12 +468,12 @@ void DarwinSendProximityEvents(int ev_type, int pointer_x, int pointer_y) {
 		return;
 	}
 
-    mieqEnqueue_lock(); {
+    darwinEvents_lock(); {
         num_events = GetProximityEvents(darwinEvents, darwinTablet, ev_type,
                                         0, 5, valuators);
         for(i=0; i<num_events; i++) mieqEnqueue (darwinTablet,&darwinEvents[i]);
         DarwinPokeEQ();
-    } mieqEnqueue_unlock();
+    } darwinEvents_unlock();
 }
 
 
@@ -533,8 +538,8 @@ void DarwinSendDDXEvent(int type, int argc, ...) {
         va_end (args);
     }
 
-    mieqEnqueue_lock();
+    darwinEvents_lock();
     mieqEnqueue(darwinPointer, &xe);
     DarwinPokeEQ();
-    mieqEnqueue_unlock();
+    darwinEvents_unlock();
 }
diff --git a/hw/xquartz/xpr/xprScreen.c b/hw/xquartz/xpr/xprScreen.c
index 7312226..d8eb72a 100644
--- a/hw/xquartz/xpr/xprScreen.c
+++ b/hw/xquartz/xpr/xprScreen.c
@@ -40,6 +40,7 @@
 #include "xprEvent.h"
 #include "pseudoramiX.h"
 #include "darwin.h"
+#include "darwinEvents.h"
 #include "rootless.h"
 #include "dri.h"
 #include "globals.h"
commit 3b8d53452cd6c74d32d7759964a7cd9ee775f161
Author: Michel Dänzer <michel at tungstengraphics.com>
Date:   Thu May 1 15:10:52 2008 +0200

    EXA: Fall back in CompositeRects if the driver can't accelerate Composite.
    
    Fixes http://bugs.freedesktop.org/show_bug.cgi?id=15780 .

diff --git a/exa/exa_render.c b/exa/exa_render.c
index 43b0029..b480c6d 100644
--- a/exa/exa_render.c
+++ b/exa/exa_render.c
@@ -345,6 +345,9 @@ exaTryDriverCompositeRects(CARD8	       op,
     struct _Pixmap scratch;
     ExaMigrationRec pixmaps[2];
 
+    if (!pExaScr->info->PrepareComposite)
+	return -1;
+
     pSrcPix = exaGetDrawablePixmap(pSrc->pDrawable);
     pSrcExaPix = ExaGetPixmapPriv(pSrcPix);
 
commit 01c61f3d972fc2f4e5bb536dd00d8b6bbeb0fb3d
Author: Paulo Cesar Pereira de Andrade <pcpa at mandriva.com.br>
Date:   Thu May 1 01:02:39 2008 -0300

    xorgcfg: Fix a crash if xorg.conf doesn't have a Files section.
    
    This patch only creates a Files section if required, so if no entries are
    added, an empty Files section will not be created.
    
    Signed-off-by: Peter Hutterer <peter at cs.unisa.edu.au>

diff --git a/hw/xfree86/utils/xorgcfg/expert.c b/hw/xfree86/utils/xorgcfg/expert.c
index bb6960c..484c2ec 100644
--- a/hw/xfree86/utils/xorgcfg/expert.c
+++ b/hw/xfree86/utils/xorgcfg/expert.c
@@ -465,7 +465,7 @@ CreateFiles(TreeNode *files)
     Widget w;
     char *value;
 
-    value = file->file_logfile ? file->file_logfile : "";
+    value = (file && file->file_logfile) ? file->file_logfile : "";
     node = NewNode(files, NULL, NULL, files->node, 
 		   (TreeData*)XtCalloc(1, sizeof(TreeData)));
     CreateFilesField(node, "LogFile", value);
@@ -509,10 +509,14 @@ UpdateFiles(TreeNode *files)
     /* LogFile */
     files = files->child;
     XtVaGetValues(files->data->files.text, XtNstring, &str, NULL);
-    XtFree(XF86Config->conf_files->file_logfile);
-    if (*str)
+    if (XF86Config->conf_files && XF86Config->conf_files->file_logfile)
+	XtFree(XF86Config->conf_files->file_logfile);
+    if (*str) {
+	if (XF86Config->conf_files == NULL)
+	    XF86Config->conf_files = XtCalloc(1, sizeof(XF86ConfFilesRec));
 	XF86Config->conf_files->file_logfile = XtNewString(str);
-    else
+    }
+    else if (XF86Config->conf_files)
 	XF86Config->conf_files->file_logfile = NULL;
 }
 
@@ -527,10 +531,11 @@ CreateFontPath(TreeNode *fontpath, char *path)
     if (path == NULL) {
 	if (XF86Font_path) {
 	    path = XtNewString(XF86Font_path);
-	    if (XF86Config->conf_files && XF86Config->conf_files->file_fontpath) {
+	    if (XF86Config->conf_files && XF86Config->conf_files->file_fontpath)
 		XtFree(XF86Config->conf_files->file_fontpath);
-		XF86Config->conf_files->file_fontpath = XtNewString(path);
-	    }
+	    if (XF86Config->conf_files == NULL)
+		XF86Config->conf_files = XtCalloc(1, sizeof(XF86ConfFilesRec));
+	    XF86Config->conf_files->file_fontpath = XtNewString(path);
 	}
 	else if (XF86Config->conf_files && XF86Config->conf_files->file_fontpath)
 	    path = XtNewString(XF86Config->conf_files->file_fontpath);
@@ -629,9 +634,14 @@ FontPathChanged(TreeNode *node)
 	pos += len - 2;
     }
 
-    if (XF86Config->conf_files->file_fontpath)
-	XtFree(XF86Config->conf_files->file_fontpath);
-    XF86Config->conf_files->file_fontpath = fontpath;
+    if (XF86Config->conf_files) {
+	if (XF86Config->conf_files->file_fontpath)
+	    XtFree(XF86Config->conf_files->file_fontpath);
+    }
+    else if (fontpath)
+	XF86Config->conf_files = XtCalloc(1, sizeof(XF86ConfFilesRec));
+    if (XF86Config->conf_files)
+	XF86Config->conf_files->file_fontpath = fontpath;
 }
 
 static void
@@ -703,10 +713,11 @@ CreateModulePath(TreeNode *modulepath, char *path)
     if (path == NULL) {
 	if (XF86Module_path) {
 	    path = XtNewString(XF86Module_path);
-	    if (XF86Config->conf_files && XF86Config->conf_files->file_modulepath) {
+	    if (XF86Config->conf_files == NULL)
+		XF86Config->conf_files = XtCalloc(1, sizeof(XF86ConfFilesRec));
+	    else if (XF86Config->conf_files->file_modulepath)
 		XtFree(XF86Config->conf_files->file_modulepath);
-		XF86Config->conf_files->file_modulepath = XtNewString(path);
-	    }
+	    XF86Config->conf_files->file_modulepath = XtNewString(path);
 	}
 	else if (XF86Config->conf_files && XF86Config->conf_files->file_modulepath)
 	    path = XtNewString(XF86Config->conf_files->file_modulepath);
@@ -799,9 +810,14 @@ ModulePathChanged(TreeNode *node)
 	pos += len - 2;
     }
 
-    if (XF86Config->conf_files->file_modulepath)
-	XtFree(XF86Config->conf_files->file_modulepath);
-    XF86Config->conf_files->file_modulepath = modulepath;
+    if (XF86Config->conf_files) {
+	if (XF86Config->conf_files->file_modulepath)
+	    XtFree(XF86Config->conf_files->file_modulepath);
+    }
+    else if (modulepath)
+	XF86Config->conf_files = XtCalloc(1, sizeof(XF86ConfFilesRec));
+    if (XF86Config->conf_files)
+	XF86Config->conf_files->file_modulepath = modulepath;
 }
 
 static void
@@ -921,6 +937,8 @@ NewModuleCallback(Widget unused, XtPointer user_data, XtPointer call_data)
     DeleteNode(node);
     load = (XF86LoadPtr)XtCalloc(1, sizeof(XF86LoadRec));
     load->load_name = XtNewString(label);
+    if (XF86Config->conf_modules == NULL)
+	XF86Config->conf_modules = XtCalloc(1, sizeof(XF86ConfModuleRec));
     XF86Config->conf_modules->mod_load_lst =
 	xf86addModule(XF86Config->conf_modules->mod_load_lst, load);
 
commit 6899ff81e8f668382e3e2f9afdd9cdf51d0e0f7d
Author: Paulo Cesar Pereira de Andrade <pcpa at mandriva.com.br>
Date:   Wed Apr 30 16:38:42 2008 -0300

    Fix an off by one read error in drmSIGIOHandler().
    
    Signed-off-by: Peter Hutterer <peter at cs.unisa.edu.au>

diff --git a/hw/xfree86/dri/dri.c b/hw/xfree86/dri/dri.c
index b736c6a..ef1a6ea 100644
--- a/hw/xfree86/dri/dri.c
+++ b/hw/xfree86/dri/dri.c
@@ -2436,7 +2436,7 @@ static void drmSIGIOHandler(int interrupt, void *closure)
 #if 0
 	    fprintf(stderr, "Trying %d\n", entry->fd);
 #endif
-	    if ((count = read(entry->fd, buf, sizeof(buf))) > 0) {
+	    if ((count = read(entry->fd, buf, sizeof(buf) - 1)) > 0) {
 		buf[count] = '\0';
 #if 0
 		fprintf(stderr, "Got %s\n", buf);
commit ec0419b50534006a272278b79ee51538193661cb
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date:   Wed Apr 30 17:30:57 2008 -0700

    XQuartz: Moved some relevant stuff from darwin.h to darwinEvents.h
    (cherry picked from commit 1fcf74a436f2e19cceb3f285b89859025d94c040)

diff --git a/hw/xquartz/darwin.h b/hw/xquartz/darwin.h
index 4300b9f..bdf0046 100644
--- a/hw/xquartz/darwin.h
+++ b/hw/xquartz/darwin.h
@@ -89,38 +89,6 @@ extern int              darwinDesiredRefresh;
 extern int              darwinMainScreenX;
 extern int              darwinMainScreenY;
 
-
-/*
- * Special ddx events understood by the X server
- */
-enum {
-    kXquartzReloadKeymap      // Reload system keymap
-            = LASTEvent+1,    // (from X.h list of event names)
-    kXquartzActivate,         // restore X drawing and cursor
-    kXquartzDeactivate,       // clip X drawing and switch to Aqua cursor
-    kXquartzSetRootClip,      // enable or disable drawing to the X screen
-    kXquartzQuit,             // kill the X server and release the display
-    kXquartzReadPasteboard,   // copy Mac OS X pasteboard into X cut buffer
-    kXquartzWritePasteboard,  // copy X cut buffer onto Mac OS X pasteboard
-    kXquartzBringAllToFront,  // bring all X windows to front
-    kXquartzToggleFullscreen, // Enable/Disable fullscreen mode
-    kXquartzSetRootless,      // Set rootless mode
-    kXquartzSpaceChanged,     // Spaces changed
-    /*
-     * AppleWM events
-     */
-    kXquartzControllerNotify, // send an AppleWMControllerNotify event
-    kXquartzPasteboardNotify, // notify the WM to copy or paste
-    /*
-     * Xplugin notification events
-     */
-    kXquartzDisplayChanged,   // display configuration has changed
-    kXquartzWindowState,      // window visibility state has changed
-    kXquartzWindowMoved,      // window has moved on screen
-};
-
-void DarwinSendDDXEvent(int type, int argc, ...);
-
 #define ENABLE_DEBUG_LOG 1
 
 #ifdef ENABLE_DEBUG_LOG
diff --git a/hw/xquartz/darwinEvents.h b/hw/xquartz/darwinEvents.h
index ef8bf39..a676aeb 100644
--- a/hw/xquartz/darwinEvents.h
+++ b/hw/xquartz/darwinEvents.h
@@ -40,4 +40,36 @@ void DarwinSendScrollEvents(float count_x, float count_y, int pointer_x, int poi
 			    float pressure, float tilt_x, float tilt_y);
 void DarwinUpdateModKeys(int flags);
 
+/*
+ * Special ddx events understood by the X server
+ */
+enum {
+    kXquartzReloadKeymap      // Reload system keymap
+    = LASTEvent+1,    // (from X.h list of event names)
+    kXquartzActivate,         // restore X drawing and cursor
+    kXquartzDeactivate,       // clip X drawing and switch to Aqua cursor
+    kXquartzSetRootClip,      // enable or disable drawing to the X screen
+    kXquartzQuit,             // kill the X server and release the display
+    kXquartzReadPasteboard,   // copy Mac OS X pasteboard into X cut buffer
+    kXquartzWritePasteboard,  // copy X cut buffer onto Mac OS X pasteboard
+    kXquartzBringAllToFront,  // bring all X windows to front
+    kXquartzToggleFullscreen, // Enable/Disable fullscreen mode
+    kXquartzSetRootless,      // Set rootless mode
+    kXquartzSpaceChanged,     // Spaces changed
+    /*
+     * AppleWM events
+     */
+    kXquartzControllerNotify, // send an AppleWMControllerNotify event
+    kXquartzPasteboardNotify, // notify the WM to copy or paste
+    /*
+     * Xplugin notification events
+     */
+    kXquartzDisplayChanged,   // display configuration has changed
+    kXquartzWindowState,      // window visibility state has changed
+    kXquartzWindowMoved,      // window has moved on screen
+};
+
+/* Send one of the above events to the server thread. */
+void DarwinSendDDXEvent(int type, int argc, ...);
+
 #endif  /* _DARWIN_EVENTS_H */
commit 28d1e21f1523d475cb757d3cfa33737ed62c534d
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date:   Wed Apr 30 17:30:32 2008 -0700

    Dix: Cleaned up sanity checking in Get{Pointer,Keyboard}Events
    
    XQuartz was crashing because the Appkit thread was trying to GetXXXEvents while the Xserver thread was exiting.
    This adds some more sanity checks and avoids that crash
    (cherry picked from commit 34ec4bd6acb834c0e3f9a5042a0cc3f52c6f3a68)

diff --git a/dix/getevents.c b/dix/getevents.c
index bf9331e..0229c0a 100644
--- a/dix/getevents.c
+++ b/dix/getevents.c
@@ -407,8 +407,8 @@ GetKeyboardValuatorEvents(xEvent *events, DeviceIntPtr pDev, int type,
                           int num_valuators, int *valuators) {
     int numEvents = 0;
     CARD32 ms = 0;
-    KeySym *map = pDev->key->curKeySyms.map;
-    KeySym sym = map[key_code * pDev->key->curKeySyms.mapWidth];
+    KeySym *map;
+    KeySym sym;
     deviceKeyButtonPointer *kbp = NULL;
 
     if (!events)
@@ -419,11 +419,14 @@ GetKeyboardValuatorEvents(xEvent *events, DeviceIntPtr pDev, int type,
         return 0;
 
     if (!pDev->key || !pDev->focus || !pDev->kbdfeed ||
-        (pDev->coreEvents && !inputInfo.keyboard->key))
+        (pDev->coreEvents && !(inputInfo.keyboard && inputInfo.keyboard->key)))
         return 0;
 
     if (key_code < 8 || key_code > 255)
         return 0;
+    
+    map = pDev->key->curKeySyms.map;
+    sym = map[key_code * pDev->key->curKeySyms.mapWidth];
 
     if (pDev->coreEvents)
         numEvents = 2;
@@ -539,6 +542,9 @@ GetPointerEvents(xEvent *events, DeviceIntPtr pDev, int type, int buttons,
 
     if ((type == ButtonPress || type == ButtonRelease) && !pDev->button)
         return 0;
+    
+    if(pDev->coreEvents && !cp)
+        return 0;
 
     /* FIXME: I guess it should, in theory, be possible to post button events
      *        from devices without valuators. */
commit ce36ae526d88d20ff67cd6cb429fb06f48d231f6
Author: Kazuhiro Inaoka <inaoka.kazuhiro at renesas.com>
Date:   Wed Apr 30 11:58:32 2008 +0300

    Add M32R architecture support (bug #10020)
    
    Still needs autotools support, so this won't actually _build_: it's just
    a starting point.

diff --git a/hw/xfree86/common/compiler.h b/hw/xfree86/common/compiler.h
index 7b65da8..9e7f821 100644
--- a/hw/xfree86/common/compiler.h
+++ b/hw/xfree86/common/compiler.h
@@ -1363,7 +1363,7 @@ do {									\
 #    define write_mem_barrier()   /* NOP */
 
 #    if !defined(__SUNPRO_C)
-#    if !defined(FAKEIT) && !defined(__mc68000__) && !defined(__arm__) && !defined(__sh__) && !defined(__hppa__) && !defined(__s390__)
+#    if !defined(FAKEIT) && !defined(__mc68000__) && !defined(__arm__) && !defined(__sh__) && !defined(__hppa__) && !defined(__s390__) && !defined(__m32r__)
 #     ifdef GCCUSESGAS
 
 /*
@@ -1472,7 +1472,7 @@ inl(unsigned short port)
 
 #     endif /* GCCUSESGAS */
 
-#    else /* !defined(FAKEIT) && !defined(__mc68000__)  && !defined(__arm__) && !defined(__sh__) && !defined(__hppa__)*/
+#    else /* !defined(FAKEIT) && !defined(__mc68000__)  && !defined(__arm__) && !defined(__sh__) && !defined(__hppa__) && !defined(__m32r__) */
 
 static __inline__ void
 outb(unsigned short port, unsigned char val)
diff --git a/hw/xfree86/common/xf86Bus.c b/hw/xfree86/common/xf86Bus.c
index f7ffac8..7e6b93a 100644
--- a/hw/xfree86/common/xf86Bus.c
+++ b/hw/xfree86/common/xf86Bus.c
@@ -2773,7 +2773,7 @@ xf86FindPrimaryDevice()
     }
 }
 
-#if !defined(__sparc) && !defined(__sparc__) && !defined(__powerpc__) && !defined(__mips__) && !defined(__arm__)
+#if !defined(__sparc) && !defined(__sparc__) && !defined(__powerpc__) && !defined(__mips__) && !defined(__arm__) && !defined(__m32r__)
 #include "vgaHW.h"
 #include "compiler.h"
 #endif
@@ -2785,7 +2785,7 @@ static void
 CheckGenericGA()
 {
 /* This needs to be changed for multiple domains */
-#if !defined(__sparc__) && !defined(__sparc) && !defined(__powerpc__) && !defined(__mips__) && !defined(__ia64__) && !defined(__arm__) && !defined(__s390__)
+#if !defined(__sparc__) && !defined(__sparc) && !defined(__powerpc__) && !defined(__mips__) && !defined(__ia64__) && !defined(__arm__) && !defined(__s390__) && !defined(__m32r__)
     IOADDRESS GenericIOBase = VGAHW_GET_IOBASE();
     CARD8 CurrentValue, TestValue;
 
diff --git a/hw/xfree86/os-support/bus/Pci.h b/hw/xfree86/os-support/bus/Pci.h
index b78d307..1385eee 100644
--- a/hw/xfree86/os-support/bus/Pci.h
+++ b/hw/xfree86/os-support/bus/Pci.h
@@ -237,6 +237,12 @@
 # if defined(linux)
 #  define ARCH_PCI_INIT linuxPciInit
 # endif
+#elif defined(__m32r__)
+# if defined(linux)
+#  define ARCH_PCI_INIT linuxPciInit
+#  define INCLUDE_XF86_MAP_PCI_MEM
+#  define INCLUDE_XF86_NO_DOMAIN
+# endif
 #elif defined(__sparc__) || defined(sparc)
 # if defined(linux)
 #  define ARCH_PCI_INIT linuxPciInit
diff --git a/hw/xfree86/os-support/linux/lnxResource.c b/hw/xfree86/os-support/linux/lnxResource.c
index 67af9db..734f4d6 100644
--- a/hw/xfree86/os-support/linux/lnxResource.c
+++ b/hw/xfree86/os-support/linux/lnxResource.c
@@ -65,6 +65,7 @@ xf86AccResFromOS(resPtr ret)
       defined(__sparc__) || \
       defined(__mips__) || \
       defined(__sh__) || \
+      defined(__m32r__) || \
       defined(__mc68000__) || \
       defined(__arm__) || \
       defined(__s390__) || \
diff --git a/hw/xfree86/os-support/linux/lnx_video.c b/hw/xfree86/os-support/linux/lnx_video.c
index 1bd2d57..4295937 100644
--- a/hw/xfree86/os-support/linux/lnx_video.c
+++ b/hw/xfree86/os-support/linux/lnx_video.c
@@ -558,7 +558,7 @@ xf86EnableIO(void)
 #endif
 	}
 	close(fd);
-#elif !defined(__mc68000__) && !defined(__sparc__) && !defined(__mips__) && !defined(__sh__) && !defined(__hppa__) && !defined(__s390__) && !defined(__arm__)
+#elif !defined(__mc68000__) && !defined(__sparc__) && !defined(__mips__) && !defined(__sh__) && !defined(__hppa__) && !defined(__s390__) && !defined(__arm__) && !defined(__m32r__)
         if (ioperm(0, 1024, 1) || iopl(3)) {
                 if (errno == ENODEV)
                         ErrorF("xf86EnableIOPorts: no I/O ports found\n");
@@ -585,7 +585,7 @@ xf86DisableIO(void)
 #if defined(__powerpc__)
 	munmap(ioBase, 0x20000);
 	ioBase = NULL;
-#elif !defined(__mc68000__) && !defined(__sparc__) && !defined(__mips__) && !defined(__sh__) && !defined(__hppa__) && !defined(__arm__) && !defined(__s390__)
+#elif !defined(__mc68000__) && !defined(__sparc__) && !defined(__mips__) && !defined(__sh__) && !defined(__hppa__) && !defined(__arm__) && !defined(__s390__) && !defined(__m32r__)
 	iopl(0);
 	ioperm(0, 1024, 0);
 #endif
diff --git a/include/servermd.h b/include/servermd.h
index 7b0a328..8e6de09 100644
--- a/include/servermd.h
+++ b/include/servermd.h
@@ -217,6 +217,26 @@ SOFTWARE.
 
 #endif /* SuperH */
 
+#if defined(__m32r__)
+
+#if defined(__BIG_ENDIAN__)
+# define IMAGE_BYTE_ORDER      MSBFirst
+# define BITMAP_BIT_ORDER      MSBFirst
+# define GLYPHPADBYTES         4
+# define GETLEFTBITS_ALIGNMENT 1
+#else
+# define IMAGE_BYTE_ORDER      LSBFirst
+# define BITMAP_BIT_ORDER      LSBFirst
+# define GLYPHPADBYTES         4
+# define GETLEFTBITS_ALIGNMENT 1
+#endif
+
+#define AVOID_MEMORY_READ
+#define FAST_CONSTANT_OFFSET_MODE
+#define LARGE_INSTRUCTION_CACHE
+#define PLENTIFUL_REGISTERS
+
+#endif /* __m32r__ */
 
 #if (defined(sun) && (defined(__sparc) || defined(sparc))) || \
     (defined(__uxp__) && (defined(sparc) || defined(mc68000))) || \
commit b71b51c982706501b6229532ce342752207426bb
Author: Ben Byer <bbyer at bushing.apple.com>
Date:   Tue Apr 29 23:37:58 2008 -0700

    xquartz: created darwinTablet, to represent tablet events
    (cherry picked from commit 50641bce730ee03738fa0c4beb8125b34fda556f)

diff --git a/hw/xquartz/darwin.c b/hw/xquartz/darwin.c
index 6f47194..f20cce1 100644
--- a/hw/xquartz/darwin.c
+++ b/hw/xquartz/darwin.c
@@ -1,10 +1,9 @@
 /**************************************************************
  *
- * Shared code for the Darwin X Server
- * running with Quartz or IOKit display mode
+ * Xquartz initialization code
  *
+ * Copyright (c) 2007-2008 Apple Inc.
  * Copyright (c) 2001-2004 Torrey T. Lyons. All Rights Reserved.
- * Copyright (c) 2007 Apple Inc.
  *
  * Permission is hereby granted, free of charge, to any person obtaining a
  * copy of this software and associated documentation files (the "Software"),
@@ -112,6 +111,7 @@ int                     darwinFakeMouse3Mask = NX_COMMANDMASK;
 
 // devices
 DeviceIntPtr            darwinPointer = NULL;
+DeviceIntPtr            darwinTablet = NULL;
 DeviceIntPtr            darwinKeyboard = NULL;
 
 // Common pixmap formats
@@ -332,14 +332,13 @@ static void DarwinChangePointerControl(
 #endif
 
 /*
- * DarwinMouseProc
- *  Handle the initialization, etc. of a mouse
+ * DarwinMouseProc: Handle the initialization, etc. of a mouse
  */
 static int DarwinMouseProc(DeviceIntPtr pPointer, int what) {
+	// 7 buttons: left, right, middle, then four scroll wheel "buttons"
     CARD8 map[8] = {0, 1, 2, 3, 4, 5, 6, 7};
     
     switch (what) {
-            
         case DEVICE_INIT:
             pPointer->public.on = FALSE;
             
@@ -347,15 +346,13 @@ static int DarwinMouseProc(DeviceIntPtr pPointer, int what) {
             InitPointerDeviceStruct((DevicePtr)pPointer, map, 7,
                                     GetMotionHistory,
                                     (PtrCtrlProcPtr)NoopDDA,
-                                    GetMotionHistorySize(), 7);
-            InitProximityClassDeviceStruct(pPointer);
+                                    GetMotionHistorySize(), 2);
+								pPointer->name = strdup("Quartz Pointing Device");
             break;
-            
         case DEVICE_ON:
             pPointer->public.on = TRUE;
             AddEnabledDevice( darwinEventReadFD );
             return Success;
-            
         case DEVICE_CLOSE:
         case DEVICE_OFF:
             pPointer->public.on = FALSE;
@@ -366,6 +363,34 @@ static int DarwinMouseProc(DeviceIntPtr pPointer, int what) {
     return Success;
 }
 
+static int DarwinTabletProc(DeviceIntPtr pPointer, int what) {
+    CARD8 map[4] = {0, 1, 2, 3};
+    
+    switch (what) {
+        case DEVICE_INIT:
+            pPointer->public.on = FALSE;
+            
+            // Set button map.
+            InitPointerDeviceStruct((DevicePtr)pPointer, map, 3,
+                                    GetMotionHistory,
+                                    (PtrCtrlProcPtr)NoopDDA,
+                                    GetMotionHistorySize(), 7);
+            InitProximityClassDeviceStruct(pPointer);
+//			InitAbsoluteClassDeviceStruct(pPointer);
+			pPointer->name = strdup("pen");			
+            break;
+        case DEVICE_ON:
+            pPointer->public.on = TRUE;
+            AddEnabledDevice( darwinEventReadFD );
+            return Success;
+        case DEVICE_CLOSE:
+        case DEVICE_OFF:
+            pPointer->public.on = FALSE;
+            RemoveEnabledDevice(darwinEventReadFD);
+            return Success;
+    }
+    return Success;
+}
 
 /*
  * DarwinKeybdProc
@@ -376,6 +401,7 @@ static int DarwinKeybdProc( DeviceIntPtr pDev, int onoff )
     switch ( onoff ) {
         case DEVICE_INIT:
             DarwinKeyboardInit( pDev );
+			pDev->name = strdup("Quartz Keyboard");
             break;
         case DEVICE_ON:
             pDev->public.on = TRUE;
@@ -499,9 +525,11 @@ int DarwinParseModifierList(
 void InitInput( int argc, char **argv )
 {
     darwinPointer = AddInputDevice(DarwinMouseProc, TRUE);
-	darwinPointer->name = strdup("tablet");
     RegisterPointerDevice( darwinPointer );
 
+    darwinTablet = AddInputDevice(DarwinTabletProc, TRUE);
+    RegisterPointerDevice( darwinTablet );
+
     darwinKeyboard = AddInputDevice(DarwinKeybdProc, TRUE);
     RegisterKeyboardDevice( darwinKeyboard );
 
diff --git a/hw/xquartz/darwin.h b/hw/xquartz/darwin.h
index 6d2fbd0..4300b9f 100644
--- a/hw/xquartz/darwin.h
+++ b/hw/xquartz/darwin.h
@@ -71,6 +71,7 @@ extern io_connect_t     darwinParamConnect;
 extern int              darwinEventReadFD;
 extern int              darwinEventWriteFD;
 extern DeviceIntPtr     darwinPointer;
+extern DeviceIntPtr     darwinTablet;
 extern DeviceIntPtr     darwinKeyboard;
 
 // User preferences
diff --git a/hw/xquartz/darwinEvents.c b/hw/xquartz/darwinEvents.c
index e25ae84..7b3091d 100644
--- a/hw/xquartz/darwinEvents.c
+++ b/hw/xquartz/darwinEvents.c
@@ -365,7 +365,8 @@ void DarwinSendPointerEvents(int ev_type, int ev_button, int pointer_x, int poin
 	static int darwinFakeMouseButtonDown = 0;
 	static int darwinFakeMouseButtonMask = 0;
 	int i, num_events;
-
+	DeviceIntPtr dev;
+	
 //    DEBUG_LOG("x=%d, y=%d, p=%f, tx=%f, ty=%f\n", pointer_x, pointer_y, pressure, tilt_x, tilt_y);
     
 	if(!darwinEvents) {
@@ -376,7 +377,10 @@ void DarwinSendPointerEvents(int ev_type, int ev_button, int pointer_x, int poin
 	int valuators[5] = {pointer_x, pointer_y, pressure * SCALEFACTOR_PRESSURE, 
 		      tilt_x * SCALEFACTOR_TILT, tilt_y * SCALEFACTOR_TILT};
 	
-		DEBUG_LOG("Valuators: {%d,%d,%d,%d,%d}\n", 
+	if (pressure == 0 && tilt_x == 0 && tilt_y == 0) dev = darwinPointer;
+	else dev = darwinTablet;
+
+	DEBUG_LOG("Valuators: {%d,%d,%d,%d,%d}\n", 
 			valuators[0], valuators[1], valuators[2], valuators[3], valuators[4]);
 	if (ev_type == ButtonPress && darwinFakeButtons && ev_button == 1) {
 		// Mimic multi-button mouse with modifier-clicks
@@ -410,9 +414,9 @@ void DarwinSendPointerEvents(int ev_type, int ev_button, int pointer_x, int poin
 	} 
 
     mieqEnqueue_lock(); {
-        num_events = GetPointerEvents(darwinEvents, darwinPointer, ev_type, ev_button, 
-                                      POINTER_ABSOLUTE, 0, 5, valuators);
-        for(i=0; i<num_events; i++) mieqEnqueue (darwinPointer,&darwinEvents[i]);
+        num_events = GetPointerEvents(darwinEvents, dev, ev_type, ev_button, 
+                                      POINTER_ABSOLUTE, 0, dev==darwinTablet?5:2, valuators);
+        for(i=0; i<num_events; i++) mieqEnqueue (dev,&darwinEvents[i]);
         DarwinPokeEQ();
 
     } mieqEnqueue_unlock();
@@ -460,9 +464,9 @@ void DarwinSendProximityEvents(int ev_type, int pointer_x, int pointer_y) {
 	}
 
     mieqEnqueue_lock(); {
-        num_events = GetProximityEvents(darwinEvents, darwinPointer, ev_type,
+        num_events = GetProximityEvents(darwinEvents, darwinTablet, ev_type,
                                         0, 5, valuators);
-        for(i=0; i<num_events; i++) mieqEnqueue (darwinPointer,&darwinEvents[i]);
+        for(i=0; i<num_events; i++) mieqEnqueue (darwinTablet,&darwinEvents[i]);
         DarwinPokeEQ();
     } mieqEnqueue_unlock();
 }
commit 519581b0bab5cc6dac397877da485745f18c2120
Author: Ben Byer <bbyer at bushing.apple.com>
Date:   Tue Apr 29 23:00:09 2008 -0700

    xquartz: remove unused params from DarwinEQInit
    (cherry picked from commit 299a056737168ca1faefd675dce6d6ab13176be9)

diff --git a/hw/xquartz/darwin.c b/hw/xquartz/darwin.c
index c18b575..6f47194 100644
--- a/hw/xquartz/darwin.c
+++ b/hw/xquartz/darwin.c
@@ -499,12 +499,13 @@ int DarwinParseModifierList(
 void InitInput( int argc, char **argv )
 {
     darwinPointer = AddInputDevice(DarwinMouseProc, TRUE);
+	darwinPointer->name = strdup("tablet");
     RegisterPointerDevice( darwinPointer );
 
     darwinKeyboard = AddInputDevice(DarwinKeybdProc, TRUE);
     RegisterKeyboardDevice( darwinKeyboard );
 
-    DarwinEQInit( (DevicePtr)darwinKeyboard, (DevicePtr)darwinPointer );
+    DarwinEQInit();
 
     QuartzInitInput(argc, argv);
 }
diff --git a/hw/xquartz/darwinEvents.c b/hw/xquartz/darwinEvents.c
index cd2b49a..e25ae84 100644
--- a/hw/xquartz/darwinEvents.c
+++ b/hw/xquartz/darwinEvents.c
@@ -307,7 +307,7 @@ static void DarwinEventHandler(int screenNum, xEventPtr xe, DeviceIntPtr dev, in
     }
 }
 
-Bool DarwinEQInit(DevicePtr pKbd, DevicePtr pPtr) { 
+Bool DarwinEQInit(void) { 
     if (!darwinEvents)
         darwinEvents = (xEvent *)xcalloc(sizeof(xEvent), GetMaximumEventsNum());
     if (!darwinEvents)
diff --git a/hw/xquartz/darwinEvents.h b/hw/xquartz/darwinEvents.h
index 4a619c9..ef8bf39 100644
--- a/hw/xquartz/darwinEvents.h
+++ b/hw/xquartz/darwinEvents.h
@@ -28,7 +28,7 @@
 #ifndef _DARWIN_EVENTS_H
 #define _DARWIN_EVENTS_H
 
-Bool DarwinEQInit(DevicePtr pKbd, DevicePtr pPtr);
+Bool DarwinEQInit(void);
 void DarwinEQEnqueue(const xEventPtr e);
 void DarwinEQPointerPost(DeviceIntPtr pDev, xEventPtr e);
 void DarwinEQSwitchScreen(ScreenPtr pScreen, Bool fromDIX);
commit d70487a4c09cfeb90d996ab40a23a74b2c15be6f
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date:   Tue Apr 29 23:59:26 2008 -0700

    XQuartz: Fix to tablet-event handling code; we now scale
    more conservatively (to match Linux's Wacom driver) and
    we now receive all tablet-related events.
    (cherry picked from commit 588683cecca2cfc65a28de035cd6ee3d64ff59d2)

diff --git a/hw/xquartz/X11Application.m b/hw/xquartz/X11Application.m
index e10e71e..646b9ef 100644
--- a/hw/xquartz/X11Application.m
+++ b/hw/xquartz/X11Application.m
@@ -49,6 +49,13 @@
 
 #define DEFAULTS_FILE "/usr/X11/lib/X11/xserver/Xquartz.plist"
 
+#ifndef XSERVER_VERSION
+#define XSERVER_VERSION "?"
+#endif
+
+#define ProximityIn    0
+#define ProximityOut   1
+
 int X11EnableKeyEquivalents = TRUE;
 int quartzHasRoot = FALSE, quartzEnableRootless = TRUE;
 
@@ -852,27 +859,37 @@ static void send_nsevent (NSEventType type, NSEvent *e) {
 	tilt_y = 0;
 
 	switch (type) {
-		case NSLeftMouseDown:    ev_button=1; ev_type=ButtonPress; goto handle_mouse;
-		case NSOtherMouseDown:   ev_button=2; ev_type=ButtonPress; goto handle_mouse;
-		case NSRightMouseDown:   ev_button=3; ev_type=ButtonPress; goto handle_mouse;
-		case NSLeftMouseUp:      ev_button=1; ev_type=ButtonRelease; goto handle_mouse;
-		case NSOtherMouseUp:     ev_button=2; ev_type=ButtonRelease; goto handle_mouse;
-		case NSRightMouseUp:     ev_button=3; ev_type=ButtonRelease; goto handle_mouse;
-		case NSLeftMouseDragged:  ev_button=1; ev_type=MotionNotify; goto handle_mouse;
-		case NSOtherMouseDragged: ev_button=2; ev_type=MotionNotify; goto handle_mouse;
-		case NSRightMouseDragged: ev_button=3; ev_type=MotionNotify; goto handle_mouse;
+		case NSLeftMouseDown:    ev_button=1; ev_type=ButtonPress; goto check_subtype;
+		case NSOtherMouseDown:   ev_button=2; ev_type=ButtonPress; goto check_subtype;
+		case NSRightMouseDown:   ev_button=3; ev_type=ButtonPress; goto check_subtype;
+		case NSLeftMouseUp:      ev_button=1; ev_type=ButtonRelease; goto check_subtype;
+		case NSOtherMouseUp:     ev_button=2; ev_type=ButtonRelease; goto check_subtype;
+		case NSRightMouseUp:     ev_button=3; ev_type=ButtonRelease; goto check_subtype;
+		case NSLeftMouseDragged:  ev_button=1; ev_type=MotionNotify; goto check_subtype;
+		case NSOtherMouseDragged: ev_button=2; ev_type=MotionNotify; goto check_subtype;
+		case NSRightMouseDragged: ev_button=3; ev_type=MotionNotify; goto check_subtype;
+		
+check_subtype:
+			if ([e subtype] != NSTabletPointEventSubtype) goto handle_mouse;
+			// fall through to get tablet data
 		case NSTabletPoint:
 			pressure = [e pressure];
 			tilt_x = [e tilt].x;
-			tilt_y = [e tilt].y; // fall through
+			tilt_y = [e tilt].y; 
+			// fall through to normal mouse handling
+
 		case NSMouseMoved: ev_button=0; ev_type=MotionNotify; goto handle_mouse;
-		handle_mouse:
 
-//      if ([e subtype] == NSTabletPointEventSubtype) pressure = [e pressure];
+handle_mouse:
 		DarwinSendPointerEvents(ev_type, ev_button, pointer_x, pointer_y,
 			pressure, tilt_x, tilt_y);
 		break;
 
+		case NSTabletProximity:
+			DarwinSendProximityEvents([e isEnteringProximity]?ProximityIn:ProximityOut,
+				pointer_x, pointer_y);
+		break;
+
 		case NSScrollWheel:
 			DarwinSendScrollEvents([e deltaX], [e deltaY], pointer_x, pointer_y,
 				pressure, tilt_x, tilt_y);
diff --git a/hw/xquartz/darwinEvents.c b/hw/xquartz/darwinEvents.c
index 86e7704..cd2b49a 100644
--- a/hw/xquartz/darwinEvents.c
+++ b/hw/xquartz/darwinEvents.c
@@ -65,6 +65,10 @@ in this Software without prior written authorization from The Open Group.
 #define SCROLLWHEELLEFTFAKE  6
 #define SCROLLWHEELRIGHTFAKE 7
 
+/* These values were chosen to match the output of xinput under Linux */
+#define SCALEFACTOR_TILT        64.0
+#define SCALEFACTOR_PRESSURE    1000.0
+
 #define _APPLEWM_SERVER_
 #include "applewmExt.h"
 #include <X11/extensions/applewm.h>
@@ -362,26 +366,18 @@ void DarwinSendPointerEvents(int ev_type, int ev_button, int pointer_x, int poin
 	static int darwinFakeMouseButtonMask = 0;
 	int i, num_events;
 
-    //DEBUG_LOG("x=%d, y=%d, p=%f, tx=%f, ty=%f\n", pointer_x, pointer_y, pressure, tilt_x, tilt_y);
+//    DEBUG_LOG("x=%d, y=%d, p=%f, tx=%f, ty=%f\n", pointer_x, pointer_y, pressure, tilt_x, tilt_y);
     
 	if(!darwinEvents) {
 		ErrorF("DarwinSendPointerEvents called before darwinEvents was initialized\n");
 		return;
 	}
-	/* I can't find a spec for this, but at least GTK expects that tablets are
-     just like mice, except they have either one or three extra valuators, in this
-     order:
-     
-     X coord, Y coord, pressure, X tilt, Y tilt
-     Pressure and tilt should be represented natively as floats; unfortunately,
-     we can't do that.  Again, GTK seems to record the min/max of each valuator,
-     and then perform scaling back to float itself using that info. Soo.... */
-
-	int valuators[5] = {pointer_x, pointer_y, 
-		      pressure * INT32_MAX * 1.0f, 
-		      tilt_x * INT32_MAX * 1.0f, 
-		      tilt_y * INT32_MAX * 1.0f};
 
+	int valuators[5] = {pointer_x, pointer_y, pressure * SCALEFACTOR_PRESSURE, 
+		      tilt_x * SCALEFACTOR_TILT, tilt_y * SCALEFACTOR_TILT};
+	
+		DEBUG_LOG("Valuators: {%d,%d,%d,%d,%d}\n", 
+			valuators[0], valuators[1], valuators[2], valuators[3], valuators[4]);
 	if (ev_type == ButtonPress && darwinFakeButtons && ev_button == 1) {
 		// Mimic multi-button mouse with modifier-clicks
 		// If both sets of modifiers are pressed,
@@ -450,16 +446,16 @@ void DarwinSendKeyboardEvents(int ev_type, int keycode) {
     } mieqEnqueue_unlock();
 }
 
-void DarwinSendProximityEvents(int ev_type, int pointer_x, int pointer_y, 
-			       float pressure, float tilt_x, float tilt_y) {
+void DarwinSendProximityEvents(int ev_type, int pointer_x, int pointer_y) {
 	int i, num_events;
-	int valuators[5] = {pointer_x, pointer_y, 
-		      pressure * INT32_MAX * 1.0f, 
-		      tilt_x * INT32_MAX * 1.0f, 
-		      tilt_y * INT32_MAX * 1.0f};
 
+	// tilt and pressure have no meaning for a Prox event
+	int valuators[5] = {pointer_x, pointer_y, 0, 0, 0};  
+
+	DEBUG_LOG("DarwinSendProximityEvents(%d, %d, %d)\n", ev_type, pointer_x, pointer_y);
+	
 	if(!darwinEvents) {
-		ErrorF("DarwinSendProximityvents called before darwinEvents was initialized\n");
+		ErrorF("DarwinSendProximityEvents called before darwinEvents was initialized\n");
 		return;
 	}
 
diff --git a/hw/xquartz/darwinEvents.h b/hw/xquartz/darwinEvents.h
index dd3f81c..4a619c9 100644
--- a/hw/xquartz/darwinEvents.h
+++ b/hw/xquartz/darwinEvents.h
@@ -34,8 +34,7 @@ void DarwinEQPointerPost(DeviceIntPtr pDev, xEventPtr e);
 void DarwinEQSwitchScreen(ScreenPtr pScreen, Bool fromDIX);
 void DarwinSendPointerEvents(int ev_type, int ev_button, int pointer_x, int pointer_y,
 			     float pressure, float tilt_x, float tilt_y);
-void DarwinSendProximityEvents(int ev_type, int pointer_x, int pointer_y, 
-			       float pressure, float tilt_x, float tilt_y);
+void DarwinSendProximityEvents(int ev_type, int pointer_x, int pointer_y);
 void DarwinSendKeyboardEvents(int ev_type, int keycode);
 void DarwinSendScrollEvents(float count_x, float count_y, int pointer_x, int pointer_y,
 			    float pressure, float tilt_x, float tilt_y);
commit f65a1a62f9eac2f6620d5d469dbf6c79b2eadab7
Author: Hong Liu <hong.liu at intel.com>
Date:   Tue Apr 29 09:00:11 2008 -0700

    Keep rotation wrappers in place while transforms are in use
    
    LeaveVT/EnterVT cycles will free/realloc shadow frame buffers. Because of
    this, the presense/absence of that data is insufficient to know whether
    the screen function wrappers are necessary. Instead, the 'transform_in_use'
    flag should be used.
    
    This patch also adds 'xf86RotateFreeShadow' for drivers to use at LeaveVT
    time to free the rotation data; it will be reallocated on EnterVT.

diff --git a/hw/xfree86/loader/xf86sym.c b/hw/xfree86/loader/xf86sym.c
index 24fc44c..9833d34 100644
--- a/hw/xfree86/loader/xf86sym.c
+++ b/hw/xfree86/loader/xf86sym.c
@@ -942,6 +942,7 @@ _X_HIDDEN void *xfree86LookupTab[] = {
     SYMFUNC(xf86CrtcDestroy)
     SYMFUNC(xf86CrtcInUse)
     SYMFUNC(xf86CrtcSetScreenSubpixelOrder)
+    SYMFUNC(xf86RotateFreeShadow)
     SYMFUNC(xf86RotateCloseScreen)
     SYMFUNC(xf86CrtcRotate)
     SYMFUNC(xf86CrtcSetMode)
diff --git a/hw/xfree86/modes/xf86Crtc.h b/hw/xfree86/modes/xf86Crtc.h
index 2d723a5..83b1f13 100644
--- a/hw/xfree86/modes/xf86Crtc.h
+++ b/hw/xfree86/modes/xf86Crtc.h
@@ -665,6 +665,12 @@ Bool
 xf86CrtcRotate (xf86CrtcPtr crtc, DisplayModePtr mode, Rotation rotation);
 
 /*
+ * free shadow memory allocated for all crtcs
+ */
+void
+xf86RotateFreeShadow(ScrnInfoPtr pScrn);
+
+/*
  * Clean up rotation during CloseScreen
  */
 void
diff --git a/hw/xfree86/modes/xf86Rotate.c b/hw/xfree86/modes/xf86Rotate.c
index e2d6295..8f34032 100644
--- a/hw/xfree86/modes/xf86Rotate.c
+++ b/hw/xfree86/modes/xf86Rotate.c
@@ -457,8 +457,7 @@ xf86RotateDestroy (xf86CrtcPtr crtc)
     }
 
     for (c = 0; c < xf86_config->num_crtc; c++)
-	if (xf86_config->crtc[c]->rotatedPixmap ||
-	    xf86_config->crtc[c]->rotatedData)
+	if (xf86_config->crtc[c]->transform_in_use)
 	    return;
 
     /*
@@ -479,6 +478,24 @@ xf86RotateDestroy (xf86CrtcPtr crtc)
 }
 
 _X_EXPORT void
+xf86RotateFreeShadow(ScrnInfoPtr pScrn)
+{
+    xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn);
+    int c;
+
+   for (c = 0; c < config->num_crtc; c++) {
+       xf86CrtcPtr crtc = config->crtc[c];
+
+       if (crtc->rotatedPixmap || crtc->rotatedData) {
+	   crtc->funcs->shadow_destroy(crtc, crtc->rotatedPixmap,
+				crtc->rotatedData);
+	   crtc->rotatedPixmap = NULL;
+	   crtc->rotatedData = NULL;
+       }
+   }
+}
+
+_X_EXPORT void
 xf86RotateCloseScreen (ScreenPtr screen)
 {
     ScrnInfoPtr		scrn = xf86Screens[screen->myNum];
commit d5ab89f4f1acbe2614036e8934122185ac0f81ee
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date:   Mon Apr 28 15:52:24 2008 -0700

    XQuartz: Unset CFProcessPath... blech
    (cherry picked from commit ce4fbfbc75c62a092214d140c7550279aebe69ef)

diff --git a/hw/xquartz/quartzStartup.c b/hw/xquartz/quartzStartup.c
index 7b6a1a6..a4472e6 100644
--- a/hw/xquartz/quartzStartup.c
+++ b/hw/xquartz/quartzStartup.c
@@ -98,6 +98,12 @@ int main(int argc, char **argv, char **envp) {
     int         i;
     int         fd[2];
 
+    /* Unset CFProcessPath, so our children don't inherit this kludge we need
+     * to load our nib.  If an xterm gets this set, then it fails to
+     * 'open hi.txt' properly.
+     */
+    unsetenv("CFProcessPath");
+    
     // Make a pipe to pass events
     assert( pipe(fd) == 0 );
     darwinEventReadFD = fd[0];
commit 0c2312b21b6700c1425baccaf9c26150b4f0fd6a
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date:   Mon Apr 28 15:28:21 2008 -0700

    XQuartz: xprIsX11Window can be called from the Appkit thread (see X11Application.m)
    (cherry picked from commit 22cf72437601c07b8a6c744b4f2f1f4cd6713e60)

diff --git a/hw/xquartz/xpr/xprFrame.c b/hw/xquartz/xpr/xprFrame.c
index edb4128..9fa9424 100644
--- a/hw/xquartz/xpr/xprFrame.c
+++ b/hw/xquartz/xpr/xprFrame.c
@@ -453,8 +453,6 @@ xprGetXWindow(xp_window_id wid)
 {
     RootlessWindowRec *winRec;
 
-    TA_SERVER();
-    
     if (window_hash == NULL)
         return NULL;
 
@@ -474,8 +472,6 @@ xprGetXWindowFromAppKit(int windowNumber)
     Bool ret;
     xp_window_id wid;
 
-    TA_SERVER();
-    
     if (window_hash == NULL)
         return FALSE;
 
@@ -507,8 +503,6 @@ xprIsX11Window(void *nsWindow, int windowNumber)
     Bool ret;
     xp_window_id wid;
 
-    TA_SERVER();
-    
     if (window_hash == NULL)
         return FALSE;
 
commit c3dc4bdbb018c0606d561e2dfb9a36e9297fa312
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date:   Mon Apr 28 15:42:02 2008 -0700

    XQuartz: Disabled DPMS extension
    (cherry picked from commit 1448fed9b6d484f471b9b2982c76ca921a9273b9)

diff --git a/configure.ac b/configure.ac
index 67606c7..f695551 100644
--- a/configure.ac
+++ b/configure.ac
@@ -524,11 +524,11 @@ AC_ARG_ENABLE(glx-tls,        AS_HELP_STRING([--enable-glx-tls], [Build GLX with
 
 dnl Extensions.
 AC_ARG_ENABLE(registry,       AS_HELP_STRING([--disable-registry], [Build string registry module (default: enabled)]), [XREGISTRY=$enableval], [XREGISTRY=yes])
-AC_ARG_ENABLE(composite,      AS_HELP_STRING([--disable-composite], [Build Composite extension (default: enabled)]), [COMPOSITE=$enableval], [COMPOSITE=auto])
+AC_ARG_ENABLE(composite,      AS_HELP_STRING([--disable-composite], [Build Composite extension (default: enabled)]), [COMPOSITE=$enableval], [COMPOSITE=yes])
 AC_ARG_ENABLE(mitshm,         AS_HELP_STRING([--disable-shm], [Build SHM extension (default: enabled)]), [MITSHM=$enableval], [MITSHM=yes])
 AC_ARG_ENABLE(xres,           AS_HELP_STRING([--disable-xres], [Build XRes extension (default: enabled)]), [RES=$enableval], [RES=yes])
 AC_ARG_ENABLE(xtrap,          AS_HELP_STRING([--disable-xtrap], [Build XTrap extension (default: enabled)]), [XTRAP=$enableval], [XTRAP=yes])
-AC_ARG_ENABLE(record,         AS_HELP_STRING([--disable-record], [Build Record extension (default: disabled)]), [RECORD=$enableval], [RECORD=no])
+AC_ARG_ENABLE(record,         AS_HELP_STRING([--enable-record], [Build Record extension (default: disabled)]), [RECORD=$enableval], [RECORD=no])
 AC_ARG_ENABLE(xv,             AS_HELP_STRING([--disable-xv], [Build Xv extension (default: enabled)]), [XV=$enableval], [XV=yes])
 AC_ARG_ENABLE(xvmc,           AS_HELP_STRING([--disable-xvmc], [Build XvMC extension (default: enabled)]), [XVMC=$enableval], [XVMC=yes])
 AC_ARG_ENABLE(dga,            AS_HELP_STRING([--disable-dga], [Build DGA extension (default: auto)]), [DGA=$enableval], [DGA=auto])
@@ -644,6 +644,40 @@ XORG_CHECK_LINUXDOC
 dnl Handle installing libxf86config
 AM_CONDITIONAL(INSTALL_LIBXF86CONFIG, [test "x$INSTALL_LIBXF86CONFIG" = xyes])
 
+dnl XQuartz DDX Detection... Yes, it's ugly to have it here... but we need to handle this early on
+case $host_os in
+	darwin*)
+		if test x$XQUARTZ = xauto; then
+			AC_CACHE_CHECK([whether to build Xquartz],xorg_cv_Carbon_framework,[
+		 		save_LDFLAGS=$LDFLAGS
+				LDFLAGS="$LDFLAGS -framework Carbon"
+				AC_LINK_IFELSE([char FSFindFolder(); int main() { FSFindFolder(); return 0;}],
+				[xorg_cv_Carbon_framework=yes],
+				[xorg_cv_Carbon_framework=no])
+			LDFLAGS=$save_LDFLAGS])
+                
+			if test "X$xorg_cv_Carbon_framework" = Xyes; then
+				XQUARTZ=yes
+			else
+				XQUARTZ=no
+			fi
+		fi
+
+		if test "x$XQUARTZ" = xyes ; then
+			XQUARTZ=yes
+			XVFB=no
+			XNEST=no
+
+			COMPOSITE=no
+			DGA=no
+			DPMSExtension=no
+			XF86BIGFONT=no
+			XF86MISC=no
+			XF86VIDMODE=no
+		fi
+		;;
+esac
+
 dnl ---------------------------------------------------------------------------
 dnl Extension section
 dnl ---------------------------------------------------------------------------
@@ -780,18 +814,6 @@ if test "x$XREGISTRY" = xyes; then
 	AC_DEFINE(XREGISTRY, 1, [Build registry module])
 fi
 
-dnl XQuartz DDX Detection... Yes, it's ugly to have it here... but we need to disable COMPOSITE for 
-if test "x$COMPOSITE" = xauto; then
-	case $host_os in
-		darwin*)
-			test "x$XQUARTZ" = xyes -o "x$XQUARTZ" = xauto && COMPOSITE=no
-			;;
-		*)
-			COMPOSITE=yes
-			;;
-	esac
-fi
-
 AM_CONDITIONAL(COMPOSITE, [test "x$COMPOSITE" = xyes])
 if test "x$COMPOSITE" = xyes; then
 	AC_DEFINE(COMPOSITE, 1, [Support Composite Extension])
@@ -1706,22 +1728,6 @@ AM_CONDITIONAL(XWIN_RANDR, [test "x$XWIN" = xyes])
 AM_CONDITIONAL(XWIN_XV, [test "x$XWIN" = xyes && test "x$XV" = xyes])
 
 dnl Darwin / OS X DDX
-if test "X$XQUARTZ" = Xauto; then
-	AC_CACHE_CHECK([whether to build Xquartz],xorg_cv_Carbon_framework,[
-	 	save_LDFLAGS=$LDFLAGS
-		LDFLAGS="$LDFLAGS -framework Carbon"
-		AC_LINK_IFELSE([char FSFindFolder(); int main() { FSFindFolder(); return 0;}],
-			[xorg_cv_Carbon_framework=yes],
-			[xorg_cv_Carbon_framework=no])
-		LDFLAGS=$save_LDFLAGS])
-                
-	if test "X$xorg_cv_Carbon_framework" = Xyes; then
-		XQUARTZ=yes
-	else
-		XQUARTZ=no
-	fi
-fi
-
 if test "x$XQUARTZ" = xyes; then
 	AC_DEFINE(XQUARTZ,1,[Have Quartz])
 	AC_DEFINE(ROOTLESS,1,[Build Rootless code])
@@ -1733,23 +1739,6 @@ if test "x$XQUARTZ" = xyes; then
 	AC_CHECK_LIB([Xplugin],[xp_init],[:])
 
 	CFLAGS="${CFLAGS} -DROOTLESS_WORKAROUND -DNO_ALLOCA"
-
-	if test "x$XF86MISC" = xyes || test "x$XF86MISC" = xauto; then
-		AC_MSG_NOTICE([Disabling XF86Misc extension])
-		XF86MISC=no
-	fi
-	if test "x$XF86VIDMODE" = xyes || test "x$XF86VIDMODE" = xauto; then
-		AC_MSG_NOTICE([Disabling XF86VidMode extension])
-		XF86VIDMODE=no
-	fi
-	if test "x$XF86BIGFONT" = xyes || test "x$XF86BIGFONT" = xauto; then
-		AC_MSG_NOTICE([Disabling XF86BigFont extension])
-		XF86BIGFONT=no
-	fi
-	if test "x$DGA" = xyes || test "x$DGA" = xauto; then
-		AC_MSG_NOTICE([Disabling DGA extension])
-		DGA=no
-	fi
 fi
 
 # Support for objc in autotools is minimal and not documented.
diff --git a/hw/xquartz/Makefile.am b/hw/xquartz/Makefile.am
index 1465a52..b2674be 100644
--- a/hw/xquartz/Makefile.am
+++ b/hw/xquartz/Makefile.am
@@ -19,7 +19,6 @@ DIST_SUBDIRS = GL xpr bundle
 libXquartz_la_SOURCES = \
 	$(top_srcdir)/fb/fbcmap_mi.c \
 	$(top_srcdir)/mi/miinitext.c \
-	$(top_srcdir)/Xext/dpmsstubs.c \
 	X11Application.m \
 	X11Controller.m \
 	applewm.c \
commit 07382a70c7ac9807dfb31821a4763bea2309bde6
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date:   Mon Apr 28 12:36:54 2008 -0700

    XQuartz: Added thread debugging to xprFrame.c
    (cherry picked from commit 41542502b321c697271c1752525b600872b6df96)

diff --git a/hw/xquartz/xpr/xprFrame.c b/hw/xquartz/xpr/xprFrame.c
index 901efca..edb4128 100644
--- a/hw/xquartz/xpr/xprFrame.c
+++ b/hw/xquartz/xpr/xprFrame.c
@@ -43,6 +43,8 @@
 #include <X11/Xatom.h>
 #include "windowstr.h"
 
+#include "threadSafety.h"
+
 #include <pthread.h>
 
 #define DEFINE_ATOM_HELPER(func,atom_name)                      \
@@ -69,7 +71,8 @@ static inline xp_error
 xprConfigureWindow(xp_window_id id, unsigned int mask,
                    const xp_window_changes *values)
 {
-  //  ErrorF("xprConfigureWindow()\n");
+    TA_SERVER();
+
     if (!no_configure_window)
         return xp_configure_window(id, mask, values);
     else
@@ -84,6 +87,8 @@ xprSetNativeProperty(RootlessWindowPtr pFrame)
     unsigned int native_id;
     long data;
 
+    TA_SERVER();
+    
     err = xp_get_native_window((xp_window_id) pFrame->wid, &native_id);
     if (err == Success)
     {
@@ -108,6 +113,8 @@ xprCreateFrame(RootlessWindowPtr pFrame, ScreenPtr pScreen,
     unsigned int mask = 0;
     xp_error err;
 
+    TA_SERVER();
+    
     wc.x = newX;
     wc.y = newY;
     wc.width = pFrame->width;
@@ -169,6 +176,8 @@ xprCreateFrame(RootlessWindowPtr pFrame, ScreenPtr pScreen,
 void
 xprDestroyFrame(RootlessFrameID wid)
 {
+    TA_SERVER();
+    
     pthread_mutex_lock(&window_hash_mutex);
     x_hash_table_remove(window_hash, wid);
     pthread_mutex_unlock(&window_hash_mutex);
@@ -183,6 +192,8 @@ xprDestroyFrame(RootlessFrameID wid)
 void
 xprMoveFrame(RootlessFrameID wid, ScreenPtr pScreen, int newX, int newY)
 {
+    TA_SERVER();
+    
     xp_window_changes wc;
 
     wc.x = newX;
@@ -202,6 +213,8 @@ xprResizeFrame(RootlessFrameID wid, ScreenPtr pScreen,
 {
     xp_window_changes wc;
 
+    TA_SERVER();
+    
     wc.x = newX;
     wc.y = newY;
     wc.width = newW;
@@ -223,7 +236,9 @@ xprRestackFrame(RootlessFrameID wid, RootlessFrameID nextWid)
 {
     xp_window_changes wc;
 
-    /* Stack frame below nextWid it if it exists, or raise
+    TA_SERVER();
+    
+   /* Stack frame below nextWid it if it exists, or raise
        frame above everything otherwise. */
 
     if (nextWid == NULL)
@@ -249,6 +264,8 @@ xprReshapeFrame(RootlessFrameID wid, RegionPtr pShape)
 {
     xp_window_changes wc;
 
+    TA_SERVER();
+    
     if (pShape != NULL)
     {
         wc.shape_nrects = REGION_NUM_RECTS(pShape);
@@ -274,6 +291,8 @@ xprUnmapFrame(RootlessFrameID wid)
 {
     xp_window_changes wc;
 
+    TA_SERVER();
+    
     wc.stack_mode = XP_UNMAPPED;
     wc.sibling = 0;
 
@@ -292,6 +311,8 @@ xprStartDrawing(RootlessFrameID wid, char **pixelData, int *bytesPerRow)
     unsigned int rowbytes[2];
     xp_error err;
 
+    TA_SERVER();
+    
     err = xp_lock_window((xp_window_id) wid, NULL, NULL, data, rowbytes, NULL);
     if (err != Success)
         FatalError("Could not lock window %i for drawing.", (int) wid);
@@ -307,6 +328,8 @@ xprStartDrawing(RootlessFrameID wid, char **pixelData, int *bytesPerRow)
 void
 xprStopDrawing(RootlessFrameID wid, Bool flush)
 {
+    TA_SERVER();
+    
     xp_unlock_window((xp_window_id) wid, flush);
 }
 
@@ -317,6 +340,8 @@ xprStopDrawing(RootlessFrameID wid, Bool flush)
 void
 xprUpdateRegion(RootlessFrameID wid, RegionPtr pDamage)
 {
+    TA_SERVER();
+    
     xp_flush_window((xp_window_id) wid);
 }
 
@@ -328,6 +353,8 @@ void
 xprDamageRects(RootlessFrameID wid, int nrects, const BoxRec *rects,
                int shift_x, int shift_y)
 {
+    TA_SERVER();
+    
     xp_mark_window((xp_window_id) wid, nrects, rects, shift_x, shift_y);
 }
 
@@ -341,6 +368,8 @@ xprSwitchWindow(RootlessWindowPtr pFrame, WindowPtr oldWin)
 {
     DeleteProperty(serverClient, oldWin, xa_native_window_id());
 
+    TA_SERVER();
+    
     xprSetNativeProperty(pFrame);
 }
 
@@ -352,6 +381,8 @@ Bool xprDoReorderWindow(RootlessWindowPtr pFrame)
 {
     WindowPtr pWin = pFrame->win;
 
+    TA_SERVER();
+    
     return AppleWMDoReorderWindow(pWin);
 }
 
@@ -364,6 +395,8 @@ void
 xprCopyWindow(RootlessFrameID wid, int dstNrects, const BoxRec *dstRects,
               int dx, int dy)
 {
+    TA_SERVER();
+    
     xp_copy_window((xp_window_id) wid, (xp_window_id) wid,
                    dstNrects, dstRects, dx, dy);
 }
@@ -398,6 +431,8 @@ xprInit(ScreenPtr pScreen)
 {
     RootlessInit(pScreen, &xprRootlessProcs);
 
+    TA_SERVER();
+    
     rootless_CopyBytes_threshold = xp_copy_bytes_threshold;
     rootless_FillBytes_threshold = xp_fill_bytes_threshold;
     rootless_CompositePixels_threshold = xp_composite_area_threshold;
@@ -418,6 +453,8 @@ xprGetXWindow(xp_window_id wid)
 {
     RootlessWindowRec *winRec;
 
+    TA_SERVER();
+    
     if (window_hash == NULL)
         return NULL;
 
@@ -437,6 +474,8 @@ xprGetXWindowFromAppKit(int windowNumber)
     Bool ret;
     xp_window_id wid;
 
+    TA_SERVER();
+    
     if (window_hash == NULL)
         return FALSE;
 
@@ -468,6 +507,8 @@ xprIsX11Window(void *nsWindow, int windowNumber)
     Bool ret;
     xp_window_id wid;
 
+    TA_SERVER();
+    
     if (window_hash == NULL)
         return FALSE;
 
@@ -498,6 +539,8 @@ xprHideWindows(Bool hide)
     int screen;
     WindowPtr pRoot, pWin;
 
+    TA_SERVER();
+    
     for (screen = 0; screen < screenInfo.numScreens; screen++) {
         pRoot = WindowTable[screenInfo.screens[screen]->myNum];
         RootlessFrameID prevWid = NULL;
commit 8349732a6720652bfbad7874a952be73a0e8e77b
Author: Michel Dänzer <michel at tungstengraphics.com>
Date:   Mon Apr 28 21:09:35 2008 +0200

    EXA: Try to accelerate non-antialiased text via the glyph cache as well.
    
    Treat 1 bit glyphs and masks as PICT_a8 in the glyph cache. We're not able to
    accelerate them otherwise.

diff --git a/exa/exa_glyphs.c b/exa/exa_glyphs.c
index 08ec097..ff665d5 100644
--- a/exa/exa_glyphs.c
+++ b/exa/exa_glyphs.c
@@ -374,6 +374,10 @@ exaGlyphCacheUploadGlyph(ScreenPtr         pScreen,
     if (exaPixmapIsOffscreen(pGlyphPixmap))
 	return FALSE;
 
+    /* UploadToScreen only works if bpp match */
+    if (pGlyphPixmap->drawable.bitsPerPixel != pCachePixmap->drawable.bitsPerPixel)
+	return FALSE;
+
     /* cache pixmap must be offscreen. */
     pixmaps[0].as_dst = TRUE;
     pixmaps[0].as_src = FALSE;
@@ -524,6 +528,9 @@ exaBufferGlyph(ScreenPtr         pScreen,
 
     if (buffer->count == GLYPH_BUFFER_SIZE)
 	return ExaGlyphNeedFlush;
+
+    if (PICT_FORMAT_BPP(format) == 1)
+	format = PICT_a8;
     
     for (i = 0; i < EXA_NUM_GLYPH_CACHES; i++) {
 	ExaGlyphCachePtr cache = &pExaScr->glyphCaches[i];
@@ -796,6 +803,14 @@ exaGlyphs (CARD8 	 op,
 	    return;
 	width = extents.x2 - extents.x1;
 	height = extents.y2 - extents.y1;
+
+	if (maskFormat->depth == 1) {
+	    PictFormatPtr a8Format = PictureMatchFormat (pScreen, 8, PICT_a8);
+
+	    if (a8Format)
+		maskFormat = a8Format;
+	}
+
 	pMaskPixmap = (*pScreen->CreatePixmap) (pScreen, width, height,
 						maskFormat->depth,
 						CREATE_PIXMAP_USAGE_SCRATCH);
commit a65d530040bb561ba88c5d8c71633a7c0bf11e89
Author: Michel Dänzer <michel at tungstengraphics.com>
Date:   Mon Apr 28 21:03:12 2008 +0200

    EXA: Accumulate glyphs whenever possible, for full benefits of the glyph cache.

diff --git a/exa/exa_glyphs.c b/exa/exa_glyphs.c
index b618365..08ec097 100644
--- a/exa/exa_glyphs.c
+++ b/exa/exa_glyphs.c
@@ -662,6 +662,79 @@ GlyphExtents (int		nlist,
     }
 }
 
+/**
+ * Returns TRUE if the glyphs in the lists intersect.  Only checks based on
+ * bounding box, which appears to be good enough to catch most cases at least.
+ */
+static Bool
+exaGlyphsIntersect(int nlist, GlyphListPtr list, GlyphPtr *glyphs)
+{
+    int x1, x2, y1, y2;
+    int n;
+    GlyphPtr glyph;
+    int x, y;
+    BoxRec extents;
+    Bool first = TRUE;
+
+    x = 0;
+    y = 0;
+    while (nlist--) {
+       x += list->xOff;
+       y += list->yOff;
+       n = list->len;
+       list++;
+       while (n--) {
+           glyph = *glyphs++;
+
+           if (glyph->info.width == 0 || glyph->info.height == 0) {
+               x += glyph->info.xOff;
+               y += glyph->info.yOff;
+               continue;
+           }
+
+           x1 = x - glyph->info.x;
+           if (x1 < MINSHORT)
+               x1 = MINSHORT;
+           y1 = y - glyph->info.y;
+           if (y1 < MINSHORT)
+               y1 = MINSHORT;
+           x2 = x1 + glyph->info.width;
+           if (x2 > MAXSHORT)
+               x2 = MAXSHORT;
+           y2 = y1 + glyph->info.height;
+           if (y2 > MAXSHORT)
+               y2 = MAXSHORT;
+
+           if (first) {
+               extents.x1 = x1;
+               extents.y1 = y1;
+               extents.x2 = x2;
+               extents.y2 = y2;
+               first = FALSE;
+           } else {
+               if (x1 < extents.x2 && x2 > extents.x1 &&
+                   y1 < extents.y2 && y2 > extents.y1)
+               {
+                   return TRUE;
+               }
+
+               if (x1 < extents.x1)
+                  extents.x1 = x1;
+               if (x2 > extents.x2)
+                   extents.x2 = x2;
+               if (y1 < extents.y1)
+                   extents.y1 = y1;
+               if (y2 > extents.y2)
+                   extents.y2 = y2;
+           }
+           x += glyph->info.xOff;
+           y += glyph->info.yOff;
+       }
+    }
+
+    return FALSE;
+}
+
 #define NeedsComponent(f) (PICT_FORMAT_A(f) != 0 && PICT_FORMAT_RGB(f) != 0)
 
 void
@@ -689,6 +762,29 @@ exaGlyphs (CARD8 	 op,
     CARD32	component_alpha;
     ExaGlyphBuffer buffer;
 
+    /* If we don't have a mask format but all the glyphs have the same format
+     * and don't intersect, use the glyph format as mask format for the full
+     * benefits of the glyph cache.
+     */
+    if (!maskFormat) {
+       Bool sameFormat = TRUE;
+       int i;
+
+       maskFormat = list[0].format;
+
+       for (i = 0; i < nlist; i++) {
+           if (maskFormat->format != list[i].format->format) {
+               sameFormat = FALSE;
+               break;
+           }
+       }
+
+       if (!sameFormat || (maskFormat->depth != 1 &&
+			   exaGlyphsIntersect(nlist, list, glyphs))) {
+	   maskFormat = NULL;
+       }
+    }
+
     if (maskFormat)
     {
 	GCPtr	    pGC;
commit e7eaac59c424a205dd106fc7d70734ff4b390f28
Author: Michel Dänzer <michel at tungstengraphics.com>
Date:   Mon Apr 28 21:00:55 2008 +0200

    EXA: Glyph cache upload tweaks.
    
    Track damage after using UploadToScreen directly.
    
    Don't waste any effort on empty glyphs.

diff --git a/exa/exa_glyphs.c b/exa/exa_glyphs.c
index 95ff4d8..b618365 100644
--- a/exa/exa_glyphs.c
+++ b/exa/exa_glyphs.c
@@ -394,6 +394,12 @@ exaGlyphCacheUploadGlyph(ScreenPtr         pScreen,
 				       pExaPixmap->sys_pitch))
 	return FALSE;
 
+    exaPixmapDirty (pCachePixmap,
+		    CACHE_X(pos) + cacheXoff,
+		    CACHE_Y(pos) + cacheYoff,
+		    CACHE_X(pos) + cacheXoff + pGlyph->info.width,
+		    CACHE_Y(pos) + cacheYoff + pGlyph->info.height);
+
     return TRUE;
 }
 
@@ -737,7 +743,8 @@ exaGlyphs (CARD8 	 op,
 	    glyph = *glyphs++;
 	    pPicture = GlyphPicture (glyph)[pScreen->myNum];
 
-	    if (exaBufferGlyph(pScreen, &buffer, glyph, x, y) == ExaGlyphNeedFlush)
+	    if (glyph->info.width > 0 && glyph->info.height > 0 &&
+		exaBufferGlyph(pScreen, &buffer, glyph, x, y) == ExaGlyphNeedFlush)
 	    {
 		if (maskFormat)
 		    exaGlyphsToMask(pMask, &buffer);
commit cc08c06665ffe29ad44d023d75d0f86e5338875d
Author: Owen Taylor <otaylor at huygens.home.fishsoup.net>
Date:   Mon Apr 28 21:00:55 2008 +0200

    EXA: Use UploadToScreen() for uploads to glyph cache
    
    When possible, use UploadToScreen() rather than CompositePicture()
    to upload glyphs onto the glyph cache pixmap. This avoids allocating
    offscreen memory for each glyph making management of offscreen
    areas much more efficient.

diff --git a/exa/exa_glyphs.c b/exa/exa_glyphs.c
index 27ecd4a..95ff4d8 100644
--- a/exa/exa_glyphs.c
+++ b/exa/exa_glyphs.c
@@ -347,6 +347,56 @@ exaGlyphCacheHashRemove(ExaGlyphCachePtr cache,
 #define CACHE_X(pos) (((pos) % cache->columns) * cache->glyphWidth)
 #define CACHE_Y(pos) (cache->yOffset + ((pos) / cache->columns) * cache->glyphHeight)
 
+/* The most efficient thing to way to upload the glyph to the screen
+ * is to use the UploadToScreen() driver hook; this allows us to
+ * pipeline glyph uploads and to avoid creating offscreen pixmaps for
+ * glyphs that we'll never use again.
+ */
+static Bool
+exaGlyphCacheUploadGlyph(ScreenPtr         pScreen,
+			 ExaGlyphCachePtr  cache,
+			 int               pos,
+			 GlyphPtr          pGlyph)
+{
+    ExaScreenPriv(pScreen);
+    PicturePtr pGlyphPicture = GlyphPicture(pGlyph)[pScreen->myNum];
+    PixmapPtr pGlyphPixmap = (PixmapPtr)pGlyphPicture->pDrawable;
+    ExaPixmapPriv(pGlyphPixmap);
+    PixmapPtr pCachePixmap = (PixmapPtr)cache->picture->pDrawable;
+    ExaMigrationRec pixmaps[1];
+    int cacheXoff, cacheYoff;
+
+    if (!pExaScr->info->UploadToScreen || pExaScr->swappedOut || pExaPixmap->accel_blocked)
+	return FALSE;
+
+    /* If the glyph pixmap is already uploaded, no point in doing
+     * things this way */
+    if (exaPixmapIsOffscreen(pGlyphPixmap))
+	return FALSE;
+
+    /* cache pixmap must be offscreen. */
+    pixmaps[0].as_dst = TRUE;
+    pixmaps[0].as_src = FALSE;
+    pixmaps[0].pPix = pCachePixmap;
+    pixmaps[0].pReg = NULL;
+    exaDoMigration (pixmaps, 1, TRUE);
+
+    pCachePixmap = exaGetOffscreenPixmap ((DrawablePtr)pCachePixmap, &cacheXoff, &cacheYoff);
+    if (!pCachePixmap)
+	return FALSE;
+
+    if (!pExaScr->info->UploadToScreen(pCachePixmap,
+				       CACHE_X(pos) + cacheXoff,
+				       CACHE_Y(pos) + cacheYoff,
+				       pGlyph->info.width,
+				       pGlyph->info.height,
+				       (char *)pExaPixmap->sys_ptr,
+				       pExaPixmap->sys_pitch))
+	return FALSE;
+
+    return TRUE;
+}
+
 static ExaGlyphCacheResult
 exaGlyphCacheBufferGlyph(ScreenPtr         pScreen,
 			 ExaGlyphCachePtr  cache,
@@ -413,18 +463,23 @@ exaGlyphCacheBufferGlyph(ScreenPtr         pScreen,
 	    cache->evictionPosition = rand() % cache->size;
 	}
 
-	/* Now actually upload the glyph into the cache picture */
+	/* Now actually upload the glyph into the cache picture; if
+	 * we can't do it with UploadToScreen (because the glyph is
+	 * offscreen, etc), we fall back to CompositePicture.
+	 */
+	if (!exaGlyphCacheUploadGlyph(pScreen, cache, pos, pGlyph)) {
+	    CompositePicture (PictOpSrc,
+			      GlyphPicture(pGlyph)[pScreen->myNum],
+			      None,
+			      cache->picture,
+			      0, 0,
+			      0, 0,
+			      CACHE_X(pos),
+			      CACHE_Y(pos),
+			      pGlyph->info.width,
+			      pGlyph->info.height);
+	}
 
-	CompositePicture (PictOpSrc,
-			  GlyphPicture(pGlyph)[pScreen->myNum],
-			  None,
-			  cache->picture,
-			  0, 0,
-			  0, 0,
-			  CACHE_X(pos),
-			  CACHE_Y(pos),
-			  pGlyph->info.width,
-			  pGlyph->info.height);
     }
     
 
commit 13fd2256300b61d88b840952d838f834523f5dd7
Author: Owen Taylor <otaylor at huygens.home.fishsoup.net>
Date:   Mon Apr 28 21:00:55 2008 +0200

    EXA: Clean up debug messages

diff --git a/exa/exa_glyphs.c b/exa/exa_glyphs.c
index 851e439..27ecd4a 100644
--- a/exa/exa_glyphs.c
+++ b/exa/exa_glyphs.c
@@ -260,11 +260,9 @@ exaGlyphCacheHashLookup(ExaGlyphCachePtr cache,
 	    return -1;
 
 	if (memcmp(pGlyph->sha1, cache->glyphs[entryPos].sha1, sizeof(pGlyph->sha1)) == 0){
-	    DBG_GLYPH_CACHE((" found entry at %d\n", slot));
 	    return entryPos;
 	}
 	    
-	DBG_GLYPH_CACHE((" lookup linear probe bumpalong\n"));
 	slot--;
 	if (slot < 0)
 	    slot = cache->hashSize - 1;
@@ -284,7 +282,6 @@ exaGlyphCacheHashInsert(ExaGlyphCachePtr cache,
     
     while (TRUE) { /* hash table can never be full */
 	if (cache->hashEntries[slot] == -1) {
-	    DBG_GLYPH_CACHE((" inserting entry at %d\n", slot));
 	    cache->hashEntries[slot] = pos;
 	    return;
 	}
diff --git a/exa/exa_priv.h b/exa/exa_priv.h
index 8a17f65..f3b72ae 100644
--- a/exa/exa_priv.h
+++ b/exa/exa_priv.h
@@ -61,7 +61,7 @@
 #define DEBUG_MIGRATE		0
 #define DEBUG_PIXMAP		0
 #define DEBUG_OFFSCREEN		0
-#define DEBUG_GLYPH_CACHE	1
+#define DEBUG_GLYPH_CACHE	0
 
 #if DEBUG_TRACE_FALL
 #define EXA_FALLBACK(x)     					\
commit fcb5949928f1c27f67f40c094c3c673786574422
Author: Owen Taylor <otaylor at huygens.home.fishsoup.net>
Date:   Mon Apr 28 21:00:54 2008 +0200

    EXA: Fix overlapping glyphs in glyph cache
    
    Allocate each cache at a different vertical position in the
    per-format pixmap. Fix width/height confusion when choosing
    the cache for a glyph.

diff --git a/exa/exa_glyphs.c b/exa/exa_glyphs.c
index 55fdb01..851e439 100644
--- a/exa/exa_glyphs.c
+++ b/exa/exa_glyphs.c
@@ -173,12 +173,13 @@ exaRealizeGlyphCaches(ScreenPtr    pScreen,
     for (i = 0; i < EXA_NUM_GLYPH_CACHES; i++) {
 	ExaGlyphCachePtr cache = &pExaScr->glyphCaches[i];
 	int rows;
-	
+
 	if (cache->format != format)
 	    continue;
 
-	rows = (cache->size + cache->columns - 1) / cache->columns;
+	cache->yOffset = height;
 
+	rows = (cache->size + cache->columns - 1) / cache->columns;
 	height += rows * cache->glyphHeight;
     }
 
@@ -346,6 +347,9 @@ exaGlyphCacheHashRemove(ExaGlyphCachePtr cache,
     }
 }
 
+#define CACHE_X(pos) (((pos) % cache->columns) * cache->glyphWidth)
+#define CACHE_Y(pos) (cache->yOffset + ((pos) / cache->columns) * cache->glyphHeight)
+
 static ExaGlyphCacheResult
 exaGlyphCacheBufferGlyph(ScreenPtr         pScreen,
 			 ExaGlyphCachePtr  cache,
@@ -393,8 +397,8 @@ exaGlyphCacheBufferGlyph(ScreenPtr         pScreen,
 		int x, y;
 		int i;
 		
-		x = (pos % cache->columns) * cache->glyphWidth;
-		y = (pos / cache->columns) * cache->glyphHeight;
+		x = CACHE_X(pos);
+		y = CACHE_Y(pos);
 
 		for (i = 0; i < buffer->count; i++) {
 		    if (buffer->rects[i].xSrc == x && buffer->rects[i].ySrc == y) {
@@ -420,8 +424,8 @@ exaGlyphCacheBufferGlyph(ScreenPtr         pScreen,
 			  cache->picture,
 			  0, 0,
 			  0, 0,
-			  (pos % cache->columns) * cache->glyphWidth,
-			  (pos / cache->columns) * cache->glyphHeight,
+			  CACHE_X(pos),
+			  CACHE_Y(pos),
 			  pGlyph->info.width,
 			  pGlyph->info.height);
     }
@@ -430,8 +434,8 @@ exaGlyphCacheBufferGlyph(ScreenPtr         pScreen,
     buffer->source = cache->picture;
 	    
     rect = &buffer->rects[buffer->count];
-    rect->xSrc = (pos % cache->columns) * cache->glyphWidth;
-    rect->ySrc = (pos / cache->columns) * cache->glyphHeight;
+    rect->xSrc = CACHE_X(pos);
+    rect->ySrc = CACHE_Y(pos);
     rect->xDst = xGlyph - pGlyph->info.x;
     rect->yDst = yGlyph - pGlyph->info.y;
     rect->width = pGlyph->info.width;
@@ -442,6 +446,9 @@ exaGlyphCacheBufferGlyph(ScreenPtr         pScreen,
     return ExaGlyphSuccess;
 }
 
+#undef CACHE_X
+#undef CACHE_Y
+
 static ExaGlyphCacheResult
 exaBufferGlyph(ScreenPtr         pScreen,
 	       ExaGlyphBufferPtr buffer,
@@ -452,7 +459,7 @@ exaBufferGlyph(ScreenPtr         pScreen,
     ExaScreenPriv(pScreen);
     unsigned int format = (GlyphPicture(pGlyph)[pScreen->myNum])->format;
     int width = pGlyph->info.width;
-    int height = pGlyph->info.width;
+    int height = pGlyph->info.height;
     ExaCompositeRectPtr rect;
     PicturePtr source;
     int i;
diff --git a/exa/exa_priv.h b/exa/exa_priv.h
index 0d5d0f5..8a17f65 100644
--- a/exa/exa_priv.h
+++ b/exa/exa_priv.h
@@ -61,7 +61,7 @@
 #define DEBUG_MIGRATE		0
 #define DEBUG_PIXMAP		0
 #define DEBUG_OFFSCREEN		0
-#define DEBUG_GLYPH_CACHE	0
+#define DEBUG_GLYPH_CACHE	1
 
 #if DEBUG_TRACE_FALL
 #define EXA_FALLBACK(x)     					\
@@ -121,6 +121,7 @@ typedef struct {
     int glyphCount; /* Current number of glyphs */
     
     PicturePtr picture;   /* Where the glyphs of the cache are stored */
+    int yOffset;          /* y location within the picture where the cache starts */
     int columns;          /* Number of columns the glyphs are layed out in */
     int evictionPosition; /* Next random position to evict a glyph */
 } ExaGlyphCacheRec, *ExaGlyphCachePtr;
commit 40eb14c9482457969e0bde97c49edad536285e02
Author: Owen Taylor <otaylor at huygens.home.fishsoup.net>
Date:   Mon Apr 28 21:00:54 2008 +0200

    EXA: Add exaCompositeRects()
    
    Add a function to composite multiple independent rectangles
    from the same source to the same destination in a single
    operation: this is useful for building a glyph mask.

diff --git a/exa/exa_glyphs.c b/exa/exa_glyphs.c
index 3fe433a..55fdb01 100644
--- a/exa/exa_glyphs.c
+++ b/exa/exa_glyphs.c
@@ -56,16 +56,6 @@
 #define DBG_GLYPH_CACHE(a)
 #endif
 
-/* Instructions for rendering a single glyph */
-typedef struct {
-    INT16 xSrc;
-    INT16 ySrc;
-    INT16 xDst;
-    INT16 yDst;
-    INT16 width;
-    INT16 height;
-} ExaGlyphRenderRec, *ExaGlyphRenderPtr;
-
 /* Width of the pixmaps we use for the caches; this should be less than
  * max texture size of the driver; this may need to actually come from
  * the driver.
@@ -79,7 +69,7 @@ typedef struct {
 
 typedef struct {
     PicturePtr source;
-    ExaGlyphRenderRec glyphs[GLYPH_BUFFER_SIZE];
+    ExaCompositeRectRec rects[GLYPH_BUFFER_SIZE];
     int count;
 } ExaGlyphBuffer, *ExaGlyphBufferPtr;
 
@@ -364,7 +354,7 @@ exaGlyphCacheBufferGlyph(ScreenPtr         pScreen,
 			 int               xGlyph,
 			 int               yGlyph)
 {
-    ExaGlyphRenderPtr glyphRec;
+    ExaCompositeRectPtr rect;
     int pos;
     
     if (buffer->source && buffer->source != cache->picture)
@@ -407,7 +397,7 @@ exaGlyphCacheBufferGlyph(ScreenPtr         pScreen,
 		y = (pos / cache->columns) * cache->glyphHeight;
 
 		for (i = 0; i < buffer->count; i++) {
-		    if (buffer->glyphs[i].xSrc == x && buffer->glyphs[i].ySrc == y) {
+		    if (buffer->rects[i].xSrc == x && buffer->rects[i].ySrc == y) {
 			DBG_GLYPH_CACHE(("  must flush buffer\n"));
 			return ExaGlyphNeedFlush;
 		    }
@@ -439,13 +429,13 @@ exaGlyphCacheBufferGlyph(ScreenPtr         pScreen,
 
     buffer->source = cache->picture;
 	    
-    glyphRec = &buffer->glyphs[buffer->count];
-    glyphRec->xSrc = (pos % cache->columns) * cache->glyphWidth;
-    glyphRec->ySrc = (pos / cache->columns) * cache->glyphHeight;
-    glyphRec->xDst = xGlyph - pGlyph->info.x;
-    glyphRec->yDst = yGlyph - pGlyph->info.y;
-    glyphRec->width = pGlyph->info.width;
-    glyphRec->height = pGlyph->info.height;
+    rect = &buffer->rects[buffer->count];
+    rect->xSrc = (pos % cache->columns) * cache->glyphWidth;
+    rect->ySrc = (pos / cache->columns) * cache->glyphHeight;
+    rect->xDst = xGlyph - pGlyph->info.x;
+    rect->yDst = yGlyph - pGlyph->info.y;
+    rect->width = pGlyph->info.width;
+    rect->height = pGlyph->info.height;
 	    
     buffer->count++;
 
@@ -463,7 +453,7 @@ exaBufferGlyph(ScreenPtr         pScreen,
     unsigned int format = (GlyphPicture(pGlyph)[pScreen->myNum])->format;
     int width = pGlyph->info.width;
     int height = pGlyph->info.width;
-    ExaGlyphRenderPtr glyphRec;
+    ExaCompositeRectPtr rect;
     PicturePtr source;
     int i;
 
@@ -497,13 +487,13 @@ exaBufferGlyph(ScreenPtr         pScreen,
 
     buffer->source = source;
     
-    glyphRec = &buffer->glyphs[buffer->count];
-    glyphRec->xSrc = 0;
-    glyphRec->ySrc = 0;
-    glyphRec->xDst = xGlyph - pGlyph->info.x;
-    glyphRec->yDst = yGlyph - pGlyph->info.y;
-    glyphRec->width = pGlyph->info.width;
-    glyphRec->height = pGlyph->info.height;
+    rect = &buffer->rects[buffer->count];
+    rect->xSrc = 0;
+    rect->ySrc = 0;
+    rect->xDst = xGlyph - pGlyph->info.x;
+    rect->yDst = yGlyph - pGlyph->info.y;
+    rect->width = pGlyph->info.width;
+    rect->height = pGlyph->info.height;
 
     buffer->count++;
 
@@ -514,23 +504,8 @@ static void
 exaGlyphsToMask(PicturePtr        pMask,
 		ExaGlyphBufferPtr buffer)
 {
-    int i;
-
-    for (i = 0; i < buffer->count; i++) {
-	ExaGlyphRenderPtr glyphRec = &buffer->glyphs[i];
-	
-	CompositePicture (PictOpAdd,
-			  buffer->source,
-			  None,
-			  pMask,
-			  glyphRec->xSrc,
-			  glyphRec->ySrc,
-			  0, 0,
-			  glyphRec->xDst,
-			  glyphRec->yDst,
-			  glyphRec->width,
-			  glyphRec->height);
-    }
+    exaCompositeRects(PictOpAdd, buffer->source, pMask,
+		      buffer->count, buffer->rects);
     
     buffer->count = 0;
     buffer->source = NULL;
@@ -549,20 +524,20 @@ exaGlyphsToDst(CARD8		 op,
     int i;
 
     for (i = 0; i < buffer->count; i++) {
-	ExaGlyphRenderPtr glyphRec = &buffer->glyphs[i];
+	ExaCompositeRectPtr rect = &buffer->rects[i];
 	
 	CompositePicture (op,
 			  pSrc,
 			  buffer->source,
 			  pDst,
-			  xSrc + glyphRec->xDst - xDst,
-			  ySrc + glyphRec->yDst - yDst,
-			  glyphRec->xSrc,
-			  glyphRec->ySrc,
-			  glyphRec->xDst,
-			  glyphRec->yDst,
-			  glyphRec->width,
-			  glyphRec->height);
+			  xSrc + rect->xDst - xDst,
+			  ySrc + rect->yDst - yDst,
+			  rect->xSrc,
+			  rect->ySrc,
+			  rect->xDst,
+			  rect->yDst,
+			  rect->width,
+			  rect->height);
     }
     
     buffer->count = 0;
diff --git a/exa/exa_priv.h b/exa/exa_priv.h
index aaceeb8..0d5d0f5 100644
--- a/exa/exa_priv.h
+++ b/exa/exa_priv.h
@@ -243,6 +243,15 @@ typedef struct _ExaMigrationRec {
     RegionPtr pReg;
 } ExaMigrationRec, *ExaMigrationPtr;
 
+typedef struct {
+    INT16 xSrc;
+    INT16 ySrc;
+    INT16 xDst;
+    INT16 yDst;
+    INT16 width;
+    INT16 height;
+} ExaCompositeRectRec, *ExaCompositeRectPtr;
+
 /**
  * exaDDXDriverInit must be implemented by the DDX using EXA, and is the place
  * to set EXA options or hook in screen functions to handle using EXA as the AA.
@@ -457,6 +466,13 @@ exaComposite(CARD8	op,
 	     CARD16	height);
 
 void
+exaCompositeRects(CARD8	              op,
+		  PicturePtr	      Src,
+		  PicturePtr	      pDst,
+		  int                 nrect,
+		  ExaCompositeRectPtr rects);
+
+void
 exaTrapezoids (CARD8 op, PicturePtr pSrc, PicturePtr pDst,
                PictFormatPtr maskFormat, INT16 xSrc, INT16 ySrc,
                int ntrap, xTrapezoid *traps);
diff --git a/exa/exa_render.c b/exa/exa_render.c
index 1d7b897..43b0029 100644
--- a/exa/exa_render.c
+++ b/exa/exa_render.c
@@ -332,6 +332,228 @@ exaTryDriverSolidFill(PicturePtr	pSrc,
 }
 
 static int
+exaTryDriverCompositeRects(CARD8	       op,
+			   PicturePtr	       pSrc,
+			   PicturePtr	       pDst,
+			   int                 nrect,
+			   ExaCompositeRectPtr rects)
+{
+    ExaScreenPriv (pDst->pDrawable->pScreen);
+    int src_off_x, src_off_y, dst_off_x, dst_off_y;
+    PixmapPtr pSrcPix, pDstPix;
+    ExaPixmapPrivPtr pSrcExaPix, pDstExaPix;
+    struct _Pixmap scratch;
+    ExaMigrationRec pixmaps[2];
+
+    pSrcPix = exaGetDrawablePixmap(pSrc->pDrawable);
+    pSrcExaPix = ExaGetPixmapPriv(pSrcPix);
+
+    pDstPix = exaGetDrawablePixmap(pDst->pDrawable);
+    pDstExaPix = ExaGetPixmapPriv(pDstPix);
+
+    /* Check whether the accelerator can use these pixmaps.
+     * FIXME: If it cannot, use temporary pixmaps so that the drawing
+     * happens within limits.
+     */
+    if (pSrcExaPix->accel_blocked ||
+	pDstExaPix->accel_blocked)
+    {
+	return -1;
+    }
+
+    if (pExaScr->info->CheckComposite &&
+	!(*pExaScr->info->CheckComposite) (op, pSrc, NULL, pDst))
+    {
+	return -1;
+    }
+    
+    exaGetDrawableDeltas (pDst->pDrawable, pDstPix, &dst_off_x, &dst_off_y);
+	
+    pixmaps[0].as_dst = TRUE;
+    pixmaps[0].as_src = exaOpReadsDestination(op);
+    pixmaps[0].pPix = pDstPix;
+    pixmaps[0].pReg = NULL;
+    pixmaps[1].as_dst = FALSE;
+    pixmaps[1].as_src = TRUE;
+    pixmaps[1].pPix = pSrcPix;
+    pixmaps[1].pReg = NULL;
+    exaDoMigration(pixmaps, 2, TRUE);
+
+    pSrcPix = exaGetOffscreenPixmap (pSrc->pDrawable, &src_off_x, &src_off_y);
+    if (!exaPixmapIsOffscreen(pDstPix))
+	return 0;
+    
+    if (!pSrcPix && pExaScr->info->UploadToScratch)
+    {
+	pSrcPix = exaGetDrawablePixmap (pSrc->pDrawable);
+	if ((*pExaScr->info->UploadToScratch) (pSrcPix, &scratch))
+	    pSrcPix = &scratch;
+    }
+
+    if (!pSrcPix)
+	return 0;
+
+    if (!(*pExaScr->info->PrepareComposite) (op, pSrc, NULL, pDst, pSrcPix,
+					     NULL, pDstPix))
+	return -1;
+
+    while (nrect--)
+    {
+	INT16 xDst = rects->xDst + pDst->pDrawable->x;
+	INT16 yDst = rects->yDst + pDst->pDrawable->y;
+	INT16 xSrc = rects->xSrc + pSrc->pDrawable->x;
+	INT16 ySrc = rects->ySrc + pSrc->pDrawable->y;
+	
+	RegionRec region;
+	BoxPtr pbox;
+	int nbox;
+	
+	if (!miComputeCompositeRegion (&region, pSrc, NULL, pDst,
+				       xSrc, ySrc, 0, 0, xDst, yDst,
+				       rects->width, rects->height))
+	    goto next_rect;
+	
+	REGION_TRANSLATE(pScreen, &region, dst_off_x, dst_off_y);
+	
+	nbox = REGION_NUM_RECTS(&region);
+	pbox = REGION_RECTS(&region);
+
+	xSrc = xSrc + src_off_x - xDst - dst_off_x;
+	ySrc = ySrc + src_off_y - yDst - dst_off_y;
+	
+	while (nbox--)
+	{
+	    (*pExaScr->info->Composite) (pDstPix,
+					 pbox->x1 + xSrc,
+					 pbox->y1 + ySrc,
+					 0, 0,
+					 pbox->x1,
+					 pbox->y1,
+					 pbox->x2 - pbox->x1,
+					 pbox->y2 - pbox->y1);
+	    pbox++;
+	}
+
+    next_rect:
+	REGION_UNINIT(pDst->pDrawable->pScreen, &region);
+
+	rects++;
+    }
+    
+    (*pExaScr->info->DoneComposite) (pDstPix);
+    exaMarkSync(pDst->pDrawable->pScreen);
+	
+    return 1;
+}
+
+/**
+ * Copy a number of rectangles from source to destination in a single
+ * operation. This is specialized for building a glyph mask: we don'y
+ * have a mask argument because we don't need it for that, and we
+ * don't have he special-case fallbacks found in exaComposite() - if the
+ * driver can support it, we use the driver functionality, otherwise we
+ * fallback straight to software.
+ */
+void
+exaCompositeRects(CARD8	              op,
+		  PicturePtr	      pSrc,
+		  PicturePtr	      pDst,
+		  int                 nrect,
+		  ExaCompositeRectPtr rects)
+{
+    PixmapPtr pPixmap = exaGetDrawablePixmap(pDst->pDrawable);
+    ExaPixmapPriv(pPixmap);
+    
+    int xoff, yoff;
+    int x1 = MAXSHORT;
+    int y1 = MAXSHORT;
+    int x2 = MINSHORT;
+    int y2 = MINSHORT;
+    RegionRec region;
+    RegionPtr pending_damage;
+    BoxRec box;
+    int n;
+    ExaCompositeRectPtr r;
+    
+    /* We have to manage the damage ourselves, since CompositeRects isn't
+     * something in the screen that can be managed by the damage extension,
+     * and EXA depends on damage to track what needs to be migrated between
+     * offscreen and onscreen.
+     */
+
+    /* Compute the overall extents of the composited region - we're making
+     * the assumption here that we are compositing a bunch of glyphs that
+     * cluster closely together and damaging each glyph individually would
+     * be a loss compared to damaging the bounding box.
+     */
+    n = nrect;
+    r = rects;
+    while (n--) {
+	int rect_x2 = r->xDst + r->width;
+	int rect_y2 = r->yDst + r->width;
+
+	if (r->xDst < x1) x1 = r->xDst;
+	if (r->xDst < y1) y1 = r->xDst;
+	if (rect_x2 > x2) x2 = rect_x2;
+	if (rect_y2 > y2) y2 = rect_y2;
+	
+	r++;
+    }
+
+    if (x2 <= x1 && y2 <= y1)
+	return;
+
+    box.x1 = x1;
+    box.x2 = x2 < MAXSHORT ? x2 : MAXSHORT;
+    box.y1 = y1;
+    box.y2 = y2 < MAXSHORT ? y2 : MAXSHORT;
+    
+    /* The pixmap migration code relies on pendingDamage indicating
+     * the bounds of the current rendering, so we need to force 
+     * the actual damage into that region before we do anything, and
+     * (see use of DamagePendingRegion in exaCopyDirty)
+     */
+    
+    REGION_INIT(pScreen, &region, &box, 1);
+    
+    exaGetDrawableDeltas(pDst->pDrawable, pPixmap, &xoff, &yoff);
+
+    REGION_TRANSLATE(pScreen, &region, xoff, yoff);
+    pending_damage = DamagePendingRegion(pExaPixmap->pDamage);
+    REGION_UNION(pScreen, pending_damage, pending_damage, &region);
+    REGION_TRANSLATE(pScreen, &region, -xoff, -yoff);
+    
+    /************************************************************/
+    
+    ValidatePicture (pSrc);
+    ValidatePicture (pDst);
+    
+    if (exaTryDriverCompositeRects(op, pSrc, pDst, nrect, rects) != 1) {
+	n = nrect;
+	r = rects;
+	while (n--) {
+	    ExaCheckComposite (op, pSrc, NULL, pDst,
+			       r->xSrc, r->ySrc,
+			       0, 0,
+			       r->xDst, r->yDst,
+			       r->width, r->height);
+	    r++;
+	}
+    }
+    
+    /************************************************************/
+
+    /* Now we have to flush the damage out from pendingDamage => damage 
+     * Calling DamageDamageRegion has that effect. (We could pass
+     * in an empty region here, but we pass in the same region we
+     * use above; the effect is the same.)
+     */
+
+    DamageDamageRegion(pDst->pDrawable, &region);
+    REGION_UNINIT(pScreen, &region);
+}
+
+static int
 exaTryDriverComposite(CARD8		op,
 		      PicturePtr	pSrc,
 		      PicturePtr	pMask,
commit 54184110f6f3e5d7276d5431e739a4fcf0c3523e
Author: Owen Taylor <otaylor at huygens.home.fishsoup.net>
Date:   Mon Apr 28 21:00:54 2008 +0200

    EXA: Use a single large glyph cache pixmap
    
    Add back exaGlyphs(); the new version copies the glyph images
    onto a single large glyph pixmap and draws from their to the
    destination surface. This reduces the management of small
    offscreen areas and will allow us to avoid texture unit setup
    between each glyph.

diff --git a/exa/Makefile.am b/exa/Makefile.am
index e2f7ed3..2b3f1e4 100644
--- a/exa/Makefile.am
+++ b/exa/Makefile.am
@@ -18,6 +18,7 @@ libexa_la_SOURCES = \
 	exa.c \
 	exa.h \
 	exa_accel.c \
+	exa_glyphs.c \
 	exa_migration.c \
 	exa_offscreen.c \
 	exa_render.c \
diff --git a/exa/exa.c b/exa/exa.c
index 3a6ad98..809fb4b 100644
--- a/exa/exa.c
+++ b/exa/exa.c
@@ -739,6 +739,8 @@ exaCloseScreen(int i, ScreenPtr pScreen)
     PictureScreenPtr	ps = GetPictureScreenIfSet(pScreen);
 #endif
 
+    exaGlyphsFini(pScreen);
+
     pScreen->CreateGC = pExaScr->SavedCreateGC;
     pScreen->CloseScreen = pExaScr->SavedCloseScreen;
     pScreen->GetImage = pExaScr->SavedGetImage;
@@ -752,7 +754,9 @@ exaCloseScreen(int i, ScreenPtr pScreen)
 #ifdef RENDER
     if (ps) {
 	ps->Composite = pExaScr->SavedComposite;
+	ps->Glyphs = pExaScr->SavedGlyphs;
 	ps->Trapezoids = pExaScr->SavedTrapezoids;
+	ps->Triangles = pExaScr->SavedTriangles;
     }
 #endif
 
@@ -914,6 +918,9 @@ exaDriverInit (ScreenPtr		pScreen,
         pExaScr->SavedComposite = ps->Composite;
 	ps->Composite = exaComposite;
 
+	pExaScr->SavedGlyphs = ps->Glyphs;
+	ps->Glyphs = exaGlyphs;
+	
 	pExaScr->SavedTriangles = ps->Triangles;
 	ps->Triangles = exaTriangles;
 
@@ -973,6 +980,8 @@ exaDriverInit (ScreenPtr		pScreen,
 	}
     }
 
+    exaGlyphsInit(pScreen);
+
     LogMessage(X_INFO, "EXA(%d): Driver registered support for the following"
 	       " operations:\n", pScreen->myNum);
     assert(pScreenInfo->PrepareSolid != NULL);
diff --git a/exa/exa_glyphs.c b/exa/exa_glyphs.c
new file mode 100644
index 0000000..3fe433a
--- /dev/null
+++ b/exa/exa_glyphs.c
@@ -0,0 +1,745 @@
+/*
+ * Copyright © 2008 Red Hat, Inc.
+ * Partly based on code Copyright © 2000 SuSE, Inc.
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, 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 Red Hat not be used in advertising or
+ * publicity pertaining to distribution of the software without specific,
+ * written prior permission.  Red Hat makes no representations about the
+ * suitability of this software for any purpose.  It is provided "as is"
+ * without express or implied warranty.
+ *
+ * Red Hat DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL Red Hat
+ * BE LIABLE 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.
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, 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 SuSE not be used in advertising or
+ * publicity pertaining to distribution of the software without specific,
+ * written prior permission.  SuSE makes no representations about the
+ * suitability of this software for any purpose.  It is provided "as is"
+ * without express or implied warranty.
+ *
+ * SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE
+ * BE LIABLE 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.
+ *
+ * Author: Owen Taylor <otaylor at fishsoup.net>
+ * Based on code by: Keith Packard
+ */
+
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#endif
+
+#include <stdlib.h>
+
+#include "exa_priv.h"
+
+#include "mipict.h"
+
+#if DEBUG_GLYPH_CACHE
+#define DBG_GLYPH_CACHE(a) ErrorF a
+#else
+#define DBG_GLYPH_CACHE(a)
+#endif
+
+/* Instructions for rendering a single glyph */
+typedef struct {
+    INT16 xSrc;
+    INT16 ySrc;
+    INT16 xDst;
+    INT16 yDst;
+    INT16 width;
+    INT16 height;
+} ExaGlyphRenderRec, *ExaGlyphRenderPtr;
+
+/* Width of the pixmaps we use for the caches; this should be less than
+ * max texture size of the driver; this may need to actually come from
+ * the driver.
+ */
+#define CACHE_PICTURE_WIDTH 1024
+
+/* Maximum number of glyphs we buffer on the stack before flushing
+ * rendering to the mask or destination surface.
+ */
+#define GLYPH_BUFFER_SIZE 256
+
+typedef struct {
+    PicturePtr source;
+    ExaGlyphRenderRec glyphs[GLYPH_BUFFER_SIZE];
+    int count;
+} ExaGlyphBuffer, *ExaGlyphBufferPtr;
+
+typedef enum {
+    ExaGlyphSuccess,    /* Glyph added to render buffer */
+    ExaGlyphFail,       /* out of memory, etc */
+    ExaGlyphNeedFlush,  /* would evict a glyph already in the buffer */
+} ExaGlyphCacheResult;
+
+void
+exaGlyphsInit(ScreenPtr pScreen)
+{
+    ExaScreenPriv(pScreen);
+    int i = 0;
+
+    memset(pExaScr->glyphCaches, 0, sizeof(pExaScr->glyphCaches));
+
+    pExaScr->glyphCaches[i].format = PICT_a8;
+    pExaScr->glyphCaches[i].glyphWidth = pExaScr->glyphCaches[i].glyphHeight = 16;
+    i++;
+    pExaScr->glyphCaches[i].format = PICT_a8;
+    pExaScr->glyphCaches[i].glyphWidth = pExaScr->glyphCaches[i].glyphHeight = 32;
+    i++;
+    pExaScr->glyphCaches[i].format = PICT_a8r8g8b8;
+    pExaScr->glyphCaches[i].glyphWidth = pExaScr->glyphCaches[i].glyphHeight = 16;
+    i++;
+    pExaScr->glyphCaches[i].format = PICT_a8r8g8b8;
+    pExaScr->glyphCaches[i].glyphWidth = pExaScr->glyphCaches[i].glyphHeight = 32;
+    i++;
+
+    assert(i == EXA_NUM_GLYPH_CACHES);
+    
+    for (i = 0; i < EXA_NUM_GLYPH_CACHES; i++) {
+	pExaScr->glyphCaches[i].columns = CACHE_PICTURE_WIDTH / pExaScr->glyphCaches[i].glyphWidth;
+	pExaScr->glyphCaches[i].size = 256;
+	pExaScr->glyphCaches[i].hashSize = 557;
+    }
+}
+
+static void
+exaUnrealizeGlyphCaches(ScreenPtr    pScreen,
+			unsigned int format)
+{
+    ExaScreenPriv(pScreen);
+    int i;
+
+    for (i = 0; i < EXA_NUM_GLYPH_CACHES; i++) {
+	ExaGlyphCachePtr cache = &pExaScr->glyphCaches[i];
+	
+	if (cache->format != format)
+	    continue;
+
+	if (cache->picture) {
+	    FreePicture ((pointer) cache->picture, (XID) 0);
+	    cache->picture = NULL;
+	}
+
+	if (cache->hashEntries) {
+	    xfree(cache->hashEntries);
+	    cache->hashEntries = NULL;
+	}
+	
+	if (cache->glyphs) {
+	    xfree(cache->glyphs);
+	    cache->glyphs = NULL;
+	}
+	cache->glyphCount = 0;
+    }
+}
+
+/* All caches for a single format share a single pixmap for glyph storage,
+ * allowing mixing glyphs of different sizes without paying a penalty
+ * for switching between source pixmaps. (Note that for a size of font
+ * right at the border between two sizes, we might be switching for almost
+ * every glyph.)
+ *
+ * This function allocates the storage pixmap, and then fills in the
+ * rest of the allocated structures for all caches with the given format.
+ */
+static Bool
+exaRealizeGlyphCaches(ScreenPtr    pScreen,
+		      unsigned int format)
+{
+    ExaScreenPriv(pScreen);
+
+    int depth = PIXMAN_FORMAT_DEPTH(format);
+    PictFormatPtr pPictFormat;
+    PixmapPtr pPixmap;
+    PicturePtr pPicture;
+    int height;
+    int i;
+    int	error;
+
+    pPictFormat = PictureMatchFormat(pScreen, depth, format);
+    if (!pPictFormat)
+	return FALSE;
+    
+    /* Compute the total vertical size needed for the format */
+
+    height = 0;
+    for (i = 0; i < EXA_NUM_GLYPH_CACHES; i++) {
+	ExaGlyphCachePtr cache = &pExaScr->glyphCaches[i];
+	int rows;
+	
+	if (cache->format != format)
+	    continue;
+
+	rows = (cache->size + cache->columns - 1) / cache->columns;
+
+	height += rows * cache->glyphHeight;
+    }
+
+    /* Now allocate the pixmap and picture */
+       
+    pPixmap = (*pScreen->CreatePixmap) (pScreen,
+					CACHE_PICTURE_WIDTH,
+					height, depth, 0);
+    if (!pPixmap)
+	return FALSE;
+
+    pPicture = CreatePicture(0, &pPixmap->drawable, pPictFormat,
+			     0, 0, serverClient, &error);
+
+    (*pScreen->DestroyPixmap) (pPixmap); /* picture holds a refcount */
+
+    if (!pPicture)
+	return FALSE;
+
+    /* And store the picture in all the caches for the format */
+    
+    for (i = 0; i < EXA_NUM_GLYPH_CACHES; i++) {
+	ExaGlyphCachePtr cache = &pExaScr->glyphCaches[i];
+	int j;
+
+	if (cache->format != format)
+	    continue;
+
+	cache->picture = pPicture;
+	cache->picture->refcnt++;
+	cache->hashEntries = xalloc(sizeof(int) * cache->hashSize);
+	cache->glyphs = xalloc(sizeof(ExaCachedGlyphRec) * cache->size);
+	cache->glyphCount = 0;
+
+	if (!cache->hashEntries || !cache->glyphs)
+	    goto bail;
+
+	for (j = 0; j < cache->hashSize; j++)
+	    cache->hashEntries[j] = -1;
+	
+	cache->evictionPosition = rand() % cache->size;
+    }
+
+    /* Each cache references the picture individually */
+    FreePicture ((pointer) pPicture, (XID) 0);
+    return TRUE;
+
+bail:
+    exaUnrealizeGlyphCaches(pScreen, format);
+    return FALSE;
+}
+
+void
+exaGlyphsFini (ScreenPtr pScreen)
+{
+    ExaScreenPriv(pScreen);
+    int i;
+
+    for (i = 0; i < EXA_NUM_GLYPH_CACHES; i++) {
+	ExaGlyphCachePtr cache = &pExaScr->glyphCaches[i];
+
+	if (cache->picture)
+	    exaUnrealizeGlyphCaches(pScreen, cache->format);
+    }
+}
+
+static int
+exaGlyphCacheHashLookup(ExaGlyphCachePtr cache,
+			GlyphPtr         pGlyph)
+{
+    int slot;
+
+    slot = (*(CARD32 *) pGlyph->sha1) % cache->hashSize;
+    
+    while (TRUE) { /* hash table can never be full */
+	int entryPos = cache->hashEntries[slot];
+	if (entryPos == -1)
+	    return -1;
+
+	if (memcmp(pGlyph->sha1, cache->glyphs[entryPos].sha1, sizeof(pGlyph->sha1)) == 0){
+	    DBG_GLYPH_CACHE((" found entry at %d\n", slot));
+	    return entryPos;
+	}
+	    
+	DBG_GLYPH_CACHE((" lookup linear probe bumpalong\n"));
+	slot--;
+	if (slot < 0)
+	    slot = cache->hashSize - 1;
+    }
+}
+
+static void
+exaGlyphCacheHashInsert(ExaGlyphCachePtr cache,
+			GlyphPtr         pGlyph,
+			int              pos)
+{
+    int slot;
+
+    memcpy(cache->glyphs[pos].sha1, pGlyph->sha1, sizeof(pGlyph->sha1));
+    
+    slot = (*(CARD32 *) pGlyph->sha1) % cache->hashSize;
+    
+    while (TRUE) { /* hash table can never be full */
+	if (cache->hashEntries[slot] == -1) {
+	    DBG_GLYPH_CACHE((" inserting entry at %d\n", slot));
+	    cache->hashEntries[slot] = pos;
+	    return;
+	}
+	    
+	slot--;
+	if (slot < 0)
+	    slot = cache->hashSize - 1;
+    }
+}
+
+static void
+exaGlyphCacheHashRemove(ExaGlyphCachePtr cache,
+			int              pos)
+{
+    int slot;
+    int emptiedSlot = -1;
+
+    slot = (*(CARD32 *) cache->glyphs[pos].sha1) % cache->hashSize;
+
+    while (TRUE) { /* hash table can never be full */
+	int entryPos = cache->hashEntries[slot];
+	
+	if (entryPos == -1)
+	    return;
+
+	if (entryPos == pos) {
+	    cache->hashEntries[slot] = -1;
+	    emptiedSlot = slot;
+	} else if (emptiedSlot != -1) {
+	    /* See if we can move this entry into the emptied slot, we can't
+	     * do that if if entry would have hashed between the current position
+	     * and the emptied slot. (taking wrapping into account). Bad positions
+	     * are:
+	     *
+	     * |   XXXXXXXXXX             |
+	     *     i         j            
+	     *                            
+	     * |XXX                   XXXX|
+	     *     j                  i
+	     *
+	     * i - slot, j - emptiedSlot
+	     *
+	     * (Knuth 6.4R)
+	     */
+	    
+	    int entrySlot = (*(CARD32 *) cache->glyphs[entryPos].sha1) % cache->hashSize;
+
+	    if (!((entrySlot >= slot && entrySlot < emptiedSlot) ||
+		  (emptiedSlot < slot && (entrySlot < emptiedSlot || entrySlot >= slot)))) 
+	    {
+		cache->hashEntries[emptiedSlot] = entryPos;
+		cache->hashEntries[slot] = -1;
+		emptiedSlot = slot;
+	    }
+	}
+	
+	slot--;
+	if (slot < 0)
+	    slot = cache->hashSize - 1;
+    }
+}
+
+static ExaGlyphCacheResult
+exaGlyphCacheBufferGlyph(ScreenPtr         pScreen,
+			 ExaGlyphCachePtr  cache,
+			 ExaGlyphBufferPtr buffer,
+			 GlyphPtr          pGlyph,
+			 int               xGlyph,
+			 int               yGlyph)
+{
+    ExaGlyphRenderPtr glyphRec;
+    int pos;
+    
+    if (buffer->source && buffer->source != cache->picture)
+	return ExaGlyphNeedFlush;
+
+    if (!cache->picture) {
+	if (!exaRealizeGlyphCaches(pScreen, cache->format))
+	    return ExaGlyphFail;
+    }
+
+    DBG_GLYPH_CACHE(("(%d,%d,%s): buffering glyph %lx\n",
+		     cache->glyphWidth, cache->glyphHeight, cache->format == PICT_a8 ? "A" : "ARGB",
+		     (long)*(CARD32 *) pGlyph->sha1));
+   
+    pos = exaGlyphCacheHashLookup(cache, pGlyph);
+    if (pos != -1) {
+	DBG_GLYPH_CACHE(("  found existing glyph at %d\n", pos));
+    } else {
+	if (cache->glyphCount < cache->size) {
+	    /* Space remaining; we fill from the start */
+	    pos = cache->glyphCount;
+	    cache->glyphCount++;
+	    DBG_GLYPH_CACHE(("  storing glyph in free space at %d\n", pos));
+
+	    exaGlyphCacheHashInsert(cache, pGlyph, pos);
+
+	} else {
+	    /* Need to evict an entry. We have to see if any glyphs
+	     * already in the output buffer were at this position in
+	     * the cache
+	     */
+	    
+	    pos = cache->evictionPosition;
+	    DBG_GLYPH_CACHE(("  evicting glyph at %d\n", pos));
+	    if (buffer->count) {
+		int x, y;
+		int i;
+		
+		x = (pos % cache->columns) * cache->glyphWidth;
+		y = (pos / cache->columns) * cache->glyphHeight;
+
+		for (i = 0; i < buffer->count; i++) {
+		    if (buffer->glyphs[i].xSrc == x && buffer->glyphs[i].ySrc == y) {
+			DBG_GLYPH_CACHE(("  must flush buffer\n"));
+			return ExaGlyphNeedFlush;
+		    }
+		}
+	    }
+
+	    /* OK, we're all set, swap in the new glyph */
+	    exaGlyphCacheHashRemove(cache, pos);
+	    exaGlyphCacheHashInsert(cache, pGlyph, pos);
+
+	    /* And pick a new eviction position */
+	    cache->evictionPosition = rand() % cache->size;
+	}
+
+	/* Now actually upload the glyph into the cache picture */
+
+	CompositePicture (PictOpSrc,
+			  GlyphPicture(pGlyph)[pScreen->myNum],
+			  None,
+			  cache->picture,
+			  0, 0,
+			  0, 0,
+			  (pos % cache->columns) * cache->glyphWidth,
+			  (pos / cache->columns) * cache->glyphHeight,
+			  pGlyph->info.width,
+			  pGlyph->info.height);
+    }
+    
+
+    buffer->source = cache->picture;
+	    
+    glyphRec = &buffer->glyphs[buffer->count];
+    glyphRec->xSrc = (pos % cache->columns) * cache->glyphWidth;
+    glyphRec->ySrc = (pos / cache->columns) * cache->glyphHeight;
+    glyphRec->xDst = xGlyph - pGlyph->info.x;
+    glyphRec->yDst = yGlyph - pGlyph->info.y;
+    glyphRec->width = pGlyph->info.width;
+    glyphRec->height = pGlyph->info.height;
+	    
+    buffer->count++;
+
+    return ExaGlyphSuccess;
+}
+
+static ExaGlyphCacheResult
+exaBufferGlyph(ScreenPtr         pScreen,
+	       ExaGlyphBufferPtr buffer,
+	       GlyphPtr          pGlyph,
+	       int               xGlyph,
+	       int               yGlyph)
+{
+    ExaScreenPriv(pScreen);
+    unsigned int format = (GlyphPicture(pGlyph)[pScreen->myNum])->format;
+    int width = pGlyph->info.width;
+    int height = pGlyph->info.width;
+    ExaGlyphRenderPtr glyphRec;
+    PicturePtr source;
+    int i;
+
+    if (buffer->count == GLYPH_BUFFER_SIZE)
+	return ExaGlyphNeedFlush;
+    
+    for (i = 0; i < EXA_NUM_GLYPH_CACHES; i++) {
+	ExaGlyphCachePtr cache = &pExaScr->glyphCaches[i];
+
+	if (format == cache->format &&
+	    width <= cache->glyphWidth &&
+	    height <= cache->glyphHeight) {
+	    ExaGlyphCacheResult result = exaGlyphCacheBufferGlyph(pScreen, &pExaScr->glyphCaches[i],
+								  buffer,
+								  pGlyph, xGlyph, yGlyph);
+	    switch (result) {
+	    case ExaGlyphFail:
+		break;
+	    case ExaGlyphSuccess:
+	    case ExaGlyphNeedFlush:
+		return result;
+	    }
+	}
+    }
+
+    /* Couldn't find the glyph in the cache, use the glyph picture directly */
+
+    source = GlyphPicture(pGlyph)[pScreen->myNum];
+    if (buffer->source && buffer->source != source)
+	return ExaGlyphNeedFlush;
+
+    buffer->source = source;
+    
+    glyphRec = &buffer->glyphs[buffer->count];
+    glyphRec->xSrc = 0;
+    glyphRec->ySrc = 0;
+    glyphRec->xDst = xGlyph - pGlyph->info.x;
+    glyphRec->yDst = yGlyph - pGlyph->info.y;
+    glyphRec->width = pGlyph->info.width;
+    glyphRec->height = pGlyph->info.height;
+
+    buffer->count++;
+
+    return ExaGlyphSuccess;
+}
+
+static void
+exaGlyphsToMask(PicturePtr        pMask,
+		ExaGlyphBufferPtr buffer)
+{
+    int i;
+
+    for (i = 0; i < buffer->count; i++) {
+	ExaGlyphRenderPtr glyphRec = &buffer->glyphs[i];
+	
+	CompositePicture (PictOpAdd,
+			  buffer->source,
+			  None,
+			  pMask,
+			  glyphRec->xSrc,
+			  glyphRec->ySrc,
+			  0, 0,
+			  glyphRec->xDst,
+			  glyphRec->yDst,
+			  glyphRec->width,
+			  glyphRec->height);
+    }
+    
+    buffer->count = 0;
+    buffer->source = NULL;
+}
+
+static void
+exaGlyphsToDst(CARD8		 op,
+	       PicturePtr	 pSrc,
+	       PicturePtr	 pDst,
+	       ExaGlyphBufferPtr buffer,
+	       INT16		 xSrc,
+	       INT16		 ySrc,
+	       INT16		 xDst,
+	       INT16		 yDst)
+{
+    int i;
+
+    for (i = 0; i < buffer->count; i++) {
+	ExaGlyphRenderPtr glyphRec = &buffer->glyphs[i];
+	
+	CompositePicture (op,
+			  pSrc,
+			  buffer->source,
+			  pDst,
+			  xSrc + glyphRec->xDst - xDst,
+			  ySrc + glyphRec->yDst - yDst,
+			  glyphRec->xSrc,
+			  glyphRec->ySrc,
+			  glyphRec->xDst,
+			  glyphRec->yDst,
+			  glyphRec->width,
+			  glyphRec->height);
+    }
+    
+    buffer->count = 0;
+    buffer->source = NULL;
+}
+
+/* Cut and paste from render/glyph.c - probably should export it instead */
+static void
+GlyphExtents (int		nlist,
+	      GlyphListPtr	list,
+	      GlyphPtr	       *glyphs,
+	      BoxPtr		extents)
+{
+    int		x1, x2, y1, y2;
+    int		n;
+    GlyphPtr	glyph;
+    int		x, y;
+    
+    x = 0;
+    y = 0;
+    extents->x1 = MAXSHORT;
+    extents->x2 = MINSHORT;
+    extents->y1 = MAXSHORT;
+    extents->y2 = MINSHORT;
+    while (nlist--)
+    {
+	x += list->xOff;
+	y += list->yOff;
+	n = list->len;
+	list++;
+	while (n--)
+	{
+	    glyph = *glyphs++;
+	    x1 = x - glyph->info.x;
+	    if (x1 < MINSHORT)
+		x1 = MINSHORT;
+	    y1 = y - glyph->info.y;
+	    if (y1 < MINSHORT)
+		y1 = MINSHORT;
+	    x2 = x1 + glyph->info.width;
+	    if (x2 > MAXSHORT)
+		x2 = MAXSHORT;
+	    y2 = y1 + glyph->info.height;
+	    if (y2 > MAXSHORT)
+		y2 = MAXSHORT;
+	    if (x1 < extents->x1)
+		extents->x1 = x1;
+	    if (x2 > extents->x2)
+		extents->x2 = x2;
+	    if (y1 < extents->y1)
+		extents->y1 = y1;
+	    if (y2 > extents->y2)
+		extents->y2 = y2;
+	    x += glyph->info.xOff;
+	    y += glyph->info.yOff;
+	}
+    }
+}
+
+#define NeedsComponent(f) (PICT_FORMAT_A(f) != 0 && PICT_FORMAT_RGB(f) != 0)
+
+void
+exaGlyphs (CARD8 	 op,
+	   PicturePtr	 pSrc,
+	   PicturePtr	 pDst,
+	   PictFormatPtr maskFormat,
+	   INT16	 xSrc,
+	   INT16	 ySrc,
+	   int		 nlist,
+	   GlyphListPtr	 list,
+	   GlyphPtr	*glyphs)
+{
+    PicturePtr	pPicture;
+    PixmapPtr   pMaskPixmap = 0;
+    PicturePtr  pMask;
+    ScreenPtr   pScreen = pDst->pDrawable->pScreen;
+    int		width = 0, height = 0;
+    int		x, y;
+    int		xDst = list->xOff, yDst = list->yOff;
+    int		n;
+    GlyphPtr	glyph;
+    int		error;
+    BoxRec	extents = {0, 0, 0, 0};
+    CARD32	component_alpha;
+    ExaGlyphBuffer buffer;
+
+    if (maskFormat)
+    {
+	GCPtr	    pGC;
+	xRectangle  rect;
+
+	GlyphExtents (nlist, list, glyphs, &extents);
+
+	if (extents.x2 <= extents.x1 || extents.y2 <= extents.y1)
+	    return;
+	width = extents.x2 - extents.x1;
+	height = extents.y2 - extents.y1;
+	pMaskPixmap = (*pScreen->CreatePixmap) (pScreen, width, height,
+						maskFormat->depth,
+						CREATE_PIXMAP_USAGE_SCRATCH);
+	if (!pMaskPixmap)
+	    return;
+	component_alpha = NeedsComponent(maskFormat->format);
+	pMask = CreatePicture (0, &pMaskPixmap->drawable,
+			       maskFormat, CPComponentAlpha, &component_alpha,
+			       serverClient, &error);
+	if (!pMask)
+	{
+	    (*pScreen->DestroyPixmap) (pMaskPixmap);
+	    return;
+	}
+	pGC = GetScratchGC (pMaskPixmap->drawable.depth, pScreen);
+	ValidateGC (&pMaskPixmap->drawable, pGC);
+	rect.x = 0;
+	rect.y = 0;
+	rect.width = width;
+	rect.height = height;
+	(*pGC->ops->PolyFillRect) (&pMaskPixmap->drawable, pGC, 1, &rect);
+	FreeScratchGC (pGC);
+	x = -extents.x1;
+	y = -extents.y1;
+    }
+    else
+    {
+	pMask = pDst;
+	x = 0;
+	y = 0;
+    }
+    buffer.count = 0;
+    buffer.source = NULL;
+    while (nlist--)
+    {
+	x += list->xOff;
+	y += list->yOff;
+	n = list->len;
+	while (n--)
+	{
+	    glyph = *glyphs++;
+	    pPicture = GlyphPicture (glyph)[pScreen->myNum];
+
+	    if (exaBufferGlyph(pScreen, &buffer, glyph, x, y) == ExaGlyphNeedFlush)
+	    {
+		if (maskFormat)
+		    exaGlyphsToMask(pMask, &buffer);
+		else
+		    exaGlyphsToDst(op, pSrc, pDst, &buffer,
+				   xSrc, ySrc, xDst, yDst);
+
+		exaBufferGlyph(pScreen, &buffer, glyph, x, y);
+	    }
+
+	    x += glyph->info.xOff;
+	    y += glyph->info.yOff;
+	}
+	list++;
+    }
+    
+    if (maskFormat)
+	exaGlyphsToMask(pMask, &buffer);
+    else
+	exaGlyphsToDst(op, pSrc, pDst, &buffer,
+		       xSrc, ySrc, xDst, yDst);
+    
+    if (maskFormat)
+    {
+	x = extents.x1;
+	y = extents.y1;
+	CompositePicture (op,
+			  pSrc,
+			  pMask,
+			  pDst,
+			  xSrc + x - xDst,
+			  ySrc + y - yDst,
+			  0, 0,
+			  x, y,
+			  width, height);
+	FreePicture ((pointer) pMask, (XID) 0);
+	(*pScreen->DestroyPixmap) (pMaskPixmap);
+    }
+}
diff --git a/exa/exa_priv.h b/exa/exa_priv.h
index 0138e4a..aaceeb8 100644
--- a/exa/exa_priv.h
+++ b/exa/exa_priv.h
@@ -61,6 +61,7 @@
 #define DEBUG_MIGRATE		0
 #define DEBUG_PIXMAP		0
 #define DEBUG_OFFSCREEN		0
+#define DEBUG_GLYPH_CACHE	0
 
 #if DEBUG_TRACE_FALL
 #define EXA_FALLBACK(x)     					\
@@ -95,6 +96,37 @@ enum ExaMigrationHeuristic {
     ExaMigrationSmart
 };
 
+typedef struct {
+    unsigned char sha1[20];
+} ExaCachedGlyphRec, *ExaCachedGlyphPtr;
+
+typedef struct {
+    /* The identity of the cache, statically configured at initialization */
+    unsigned int format;
+    int glyphWidth;
+    int glyphHeight;
+
+    int size; /* Size of cache; eventually this should be dynamically determined */
+
+    /* Hash table mapping from glyph sha1 to position in the glyph; we use
+     * open addressing with a hash table size determined based on size and large
+     * enough so that we always have a good amount of free space, so we can
+     * use linear probing. (Linear probing is preferrable to double hashing
+     * here because it allows us to easily remove entries.)
+     */
+    int *hashEntries;
+    int hashSize;
+    
+    ExaCachedGlyphPtr glyphs;
+    int glyphCount; /* Current number of glyphs */
+    
+    PicturePtr picture;   /* Where the glyphs of the cache are stored */
+    int columns;          /* Number of columns the glyphs are layed out in */
+    int evictionPosition; /* Next random position to evict a glyph */
+} ExaGlyphCacheRec, *ExaGlyphCachePtr;
+
+#define EXA_NUM_GLYPH_CACHES 4
+
 typedef void (*EnableDisableFBAccessProcPtr)(int, Bool);
 typedef struct {
     ExaDriverPtr info;
@@ -122,6 +154,8 @@ typedef struct {
     unsigned			 disableFbCount;
     Bool			 optimize_migration;
     unsigned			 offScreenCounter;
+
+    ExaGlyphCacheRec             glyphCaches[EXA_NUM_GLYPH_CACHES];
 } ExaScreenPrivRec, *ExaScreenPrivPtr;
 
 /*
@@ -432,6 +466,13 @@ exaTriangles (CARD8 op, PicturePtr pSrc, PicturePtr pDst,
 	      PictFormatPtr maskFormat, INT16 xSrc, INT16 ySrc,
 	      int ntri, xTriangle *tris);
 
+/* exa_glyph.c */
+void
+exaGlyphsInit(ScreenPtr pScreen);
+
+void
+exaGlyphsFini (ScreenPtr pScreen);
+
 void
 exaGlyphs (CARD8	op,
 	  PicturePtr	pSrc,
commit e9734306088e12f2cd68bf347ecf8415be4f0268
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date:   Mon Apr 28 11:47:49 2008 -0700

    XQuartz: More startup / threading house cleaning.
    (cherry picked from commit 72653c24c00dfba64ce35a3d400598bcd77defc1)

diff --git a/hw/xquartz/X11Application.h b/hw/xquartz/X11Application.h
index 3869df9..8e7fed2 100644
--- a/hw/xquartz/X11Application.h
+++ b/hw/xquartz/X11Application.h
@@ -71,7 +71,7 @@ void X11ApplicationSetCanQuit (int state);
 void X11ApplicationServerReady (void);
 void X11ApplicationShowHideMenubar (int state);
 
-void X11ApplicationMain(int argc, const char **argv);
+void X11ApplicationMain(int argc, char **argv, char **envp);
 
 extern int X11EnableKeyEquivalents;
 extern int quartzHasRoot, quartzEnableRootless;
diff --git a/hw/xquartz/X11Application.m b/hw/xquartz/X11Application.m
index 7680437..e10e71e 100644
--- a/hw/xquartz/X11Application.m
+++ b/hw/xquartz/X11Application.m
@@ -47,9 +47,6 @@
 #include <mach/mach.h>
 #include <unistd.h>
 
-#include <pthread.h>
-extern pthread_cond_t server_can_start_cond;
-
 #define DEFAULTS_FILE "/usr/X11/lib/X11/xserver/Xquartz.plist"
 
 int X11EnableKeyEquivalents = TRUE;
@@ -776,7 +773,7 @@ environment?", @"Startup xinitrc dialog");
     [X11App prefs_synchronize];
 }
 
-void X11ApplicationMain (int argc, const char **argv) {
+void X11ApplicationMain (int argc, char **argv, char **envp) {
     NSAutoreleasePool *pool;
 
 #ifdef DEBUG
@@ -804,7 +801,7 @@ void X11ApplicationMain (int argc, const char **argv) {
     NSMaxY([[NSScreen mainScreen] visibleFrame]);
 
     /* Tell the server thread that it can proceed */
-    pthread_cond_broadcast(&server_can_start_cond);
+    QuartzInitServer(argc, argv, envp);
 
     [NSApp run];
     /* not reached */
diff --git a/hw/xquartz/X11Controller.h b/hw/xquartz/X11Controller.h
index d33752e..7942bc4 100644
--- a/hw/xquartz/X11Controller.h
+++ b/hw/xquartz/X11Controller.h
@@ -100,6 +100,6 @@
 
 #endif /* __OBJC__ */
 
-void X11ControllerMain(int argc, const char **argv);
+void X11ControllerMain(int argc, char **argv, char **envp);
 
 #endif /* X11CONTROLLER_H */
diff --git a/hw/xquartz/X11Controller.m b/hw/xquartz/X11Controller.m
index 01470e5..df328f3 100644
--- a/hw/xquartz/X11Controller.m
+++ b/hw/xquartz/X11Controller.m
@@ -756,6 +756,6 @@ objectValueForTableColumn:(NSTableColumn *)tableColumn row:(int)row
 
 @end
 
-void X11ControllerMain(int argc, const char **argv) {
-    X11ApplicationMain (argc, argv);
+void X11ControllerMain(int argc, char **argv, char **envp) {
+    X11ApplicationMain (argc, argv, envp);
 }
diff --git a/hw/xquartz/quartz.h b/hw/xquartz/quartz.h
index e116023..1b6d71f 100644
--- a/hw/xquartz/quartz.h
+++ b/hw/xquartz/quartz.h
@@ -128,6 +128,7 @@ Bool QuartzAddScreen(int index, ScreenPtr pScreen);
 Bool QuartzSetupScreen(int index, ScreenPtr pScreen);
 void QuartzInitOutput(int argc,char **argv);
 void QuartzInitInput(int argc, char **argv);
+void QuartzInitServer(int argc, char **argv, char **envp);
 void QuartzGiveUp(void);
 void QuartzProcessEvent(xEvent *xe);
 void QuartzDisplayChangedHandler(int screenNum, xEventPtr xe, DeviceIntPtr dev, int nevents);
diff --git a/hw/xquartz/quartzStartup.c b/hw/xquartz/quartzStartup.c
index 34eaf8a..7b6a1a6 100644
--- a/hw/xquartz/quartzStartup.c
+++ b/hw/xquartz/quartzStartup.c
@@ -58,19 +58,10 @@ struct arg {
     char **envp;
 };
 
-pthread_cond_t server_can_start_cond = PTHREAD_COND_INITIALIZER;
-
 static void server_thread (void *arg) {
-    struct arg *args = (struct arg *)arg;
-
-    /* Wait to be told we can continue */
-    pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
-    pthread_mutex_lock(&mutex);
-    pthread_cond_wait(&server_can_start_cond, &mutex);
-    pthread_mutex_unlock(&mutex);
-    pthread_mutex_destroy(&mutex);
-
-    exit (dix_main(args->argc, args->argv, args->envp));
+    struct arg args = *((struct arg *)arg);
+    free(arg);
+    exit (dix_main(args.argc, args.argv, args.envp));
 }
 
 static pthread_t create_thread (void *func, void *arg) {
@@ -86,16 +77,27 @@ static pthread_t create_thread (void *func, void *arg) {
     return tid;
 }
 
+void QuartzInitServer(int argc, char **argv, char **envp) {
+    struct arg *args = (struct arg*)malloc(sizeof(struct arg));
+    if(!args)
+        FatalError("Could not allocate memory.\n");
+    
+    args->argc = argc;
+    args->argv = argv;
+    args->envp = envp;
+    
+    APPKIT_THREAD_ID = pthread_self();
+    SERVER_THREAD_ID = create_thread(server_thread, args);
+
+    if (!SERVER_THREAD_ID) {
+        FatalError("can't create secondary thread\n");
+    }
+}
+
 int main(int argc, char **argv, char **envp) {
     int         i;
     int         fd[2];
 
-    /* Store the args to pass to dix_main() */
-    struct arg  args;
-    args.argc = argc;
-    args.argv = argv;
-    args.envp = envp;
-
     // Make a pipe to pass events
     assert( pipe(fd) == 0 );
     darwinEventReadFD = fd[0];
@@ -112,18 +114,8 @@ int main(int argc, char **argv, char **envp) {
 
     /* Create the audio mutex */
     QuartzAudioInit();
-    
-    pthread_cond_init(&server_can_start_cond, NULL); 
-    
-    APPKIT_THREAD_ID = pthread_self();
-    SERVER_THREAD_ID = create_thread(server_thread, &args);
-
-    if (!SERVER_THREAD_ID) {
-        ErrorF("can't create secondary thread\n");
-        exit (1);
-    }
 
     QuartzMoveToForeground();
-    X11ControllerMain(argc, (const char **)argv);
+    X11ControllerMain(argc, argv, envp);
     exit(0);
 }
commit 4b46fc931e61bec0abd6a86062e46dd7a408e745
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date:   Mon Apr 28 10:50:51 2008 -0700

    XQuartz: Updated Localizable.strings
    (cherry picked from commit d8d9c866b90fb24c93bd6e25fa90f8f2bf58ad34)

diff --git a/hw/xquartz/bundle/English.lproj/Localizable.strings b/hw/xquartz/bundle/English.lproj/Localizable.strings
index c83b085..63a1352 100644
Binary files a/hw/xquartz/bundle/English.lproj/Localizable.strings and b/hw/xquartz/bundle/English.lproj/Localizable.strings differ
commit 4017ebe5bfa7a261cd1135801756c44e9fe93ca1
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date:   Sun Apr 27 00:01:14 2008 -0700

    XQuartz: Added missing Xquartz.man.pre to EXTRA_DIST
    (cherry picked from commit 03e707987f7f32e47dd0355c6d16bfb9169a379b)

diff --git a/hw/xquartz/xpr/Makefile.am b/hw/xquartz/xpr/Makefile.am
index 12009fb..41f2b86 100644
--- a/hw/xquartz/xpr/Makefile.am
+++ b/hw/xquartz/xpr/Makefile.am
@@ -47,6 +47,7 @@ include $(top_srcdir)/cpprules.in
 	cp $< $@
 
 EXTRA_DIST = \
+	Xquartz.man.pre \
 	dri.h \
 	dristruct.h \
 	appledri.h \


More information about the xorg-commit mailing list