summaryrefslogtreecommitdiff
authorAdam Jackson <ajax@redhat.com>2008-05-12 18:15:11 (GMT)
committer Adam Jackson <ajax@redhat.com>2008-05-12 18:15:11 (GMT)
commit1c8bd318fbaf65890ef16fe26c76dd5e6f14dfde (patch) (side-by-side diff)
tree6a8f0d7c2d119ba69c84827c819f36eb7181e936
parentf9fae16456c30479b0cb9317e57200af36795785 (diff)
downloadxserver-1c8bd318fbaf65890ef16fe26c76dd5e6f14dfde.zip
xserver-1c8bd318fbaf65890ef16fe26c76dd5e6f14dfde.tar.gz
X n'est pas une print API.
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--Xext/Makefile.am7
-rw-r--r--Xext/xprint.c2617
-rw-r--r--configure.ac102
-rw-r--r--dix/Makefile.am10
-rw-r--r--dix/dispatch.c6
-rw-r--r--dix/dixfonts.c50
-rw-r--r--dix/globals.c3
-rw-r--r--dix/main.c9
-rw-r--r--dix/xpstubs.c28
-rw-r--r--hw/Makefile.am9
-rw-r--r--hw/xnest/Font.c5
-rw-r--r--hw/xprint/AttrValid.c701
-rw-r--r--hw/xprint/AttrValid.h219
-rw-r--r--hw/xprint/DiPrint.h85
-rw-r--r--hw/xprint/Init.c1920
-rw-r--r--hw/xprint/Makefile.am58
-rw-r--r--hw/xprint/Oid.c3181
-rw-r--r--hw/xprint/Oid.h293
-rw-r--r--hw/xprint/OidDefs.h170
-rw-r--r--hw/xprint/OidStrs.h172
-rw-r--r--hw/xprint/Util.c370
-rw-r--r--hw/xprint/ValTree.c191
-rw-r--r--hw/xprint/attributes.c1740
-rw-r--r--hw/xprint/attributes.h130
-rw-r--r--hw/xprint/config/C/Makefile.am1
-rw-r--r--hw/xprint/config/C/print/Makefile.am14
-rw-r--r--hw/xprint/config/C/print/Xprinters49
-rw-r--r--hw/xprint/config/C/print/attributes/Makefile.am3
-rw-r--r--hw/xprint/config/C/print/attributes/document49
-rw-r--r--hw/xprint/config/C/print/attributes/job25
-rw-r--r--hw/xprint/config/C/print/attributes/printer96
-rw-r--r--hw/xprint/config/C/print/ddx-config/Makefile.am1
-rw-r--r--hw/xprint/config/C/print/ddx-config/raster/Makefile.am3
-rw-r--r--hw/xprint/config/C/print/ddx-config/raster/pcl39
-rw-r--r--hw/xprint/config/C/print/ddx-config/raster/postscript0
-rw-r--r--hw/xprint/config/C/print/models/CANONBJ10E-GS/Makefile.am3
-rw-r--r--hw/xprint/config/C/print/models/CANONBJ10E-GS/model-config23
-rw-r--r--hw/xprint/config/C/print/models/CANONC3200-PS/Makefile.am5
-rw-r--r--hw/xprint/config/C/print/models/CANONC3200-PS/fonts/Makefile.am54
-rw-r--r--hw/xprint/config/C/print/models/CANONC3200-PS/model-config40
-rw-r--r--hw/xprint/config/C/print/models/GSdefault/Makefile.am3
-rw-r--r--hw/xprint/config/C/print/models/GSdefault/model-config137
-rw-r--r--hw/xprint/config/C/print/models/HPDJ1600C/Makefile.am5
-rw-r--r--hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00051.pmfbin5740 -> 0 bytes
-rw-r--r--hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00052.pmfbin5736 -> 0 bytes
-rw-r--r--hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00053.pmfbin5740 -> 0 bytes
-rw-r--r--hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00054.pmfbin5744 -> 0 bytes
-rw-r--r--hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00055.pmfbin5740 -> 0 bytes
-rw-r--r--hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00056.pmfbin5724 -> 0 bytes
-rw-r--r--hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00057.pmfbin5632 -> 0 bytes
-rw-r--r--hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00058.pmfbin5740 -> 0 bytes
-rw-r--r--hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00059.pmfbin5720 -> 0 bytes
-rw-r--r--hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00060.pmfbin5740 -> 0 bytes
-rw-r--r--hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00061.pmfbin5720 -> 0 bytes
-rw-r--r--hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00062.pmfbin5728 -> 0 bytes
-rw-r--r--hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00063.pmfbin5728 -> 0 bytes
-rw-r--r--hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00064.pmfbin5720 -> 0 bytes
-rw-r--r--hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00065.pmfbin5728 -> 0 bytes
-rw-r--r--hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00066.pmfbin5732 -> 0 bytes
-rw-r--r--hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00067.pmfbin5736 -> 0 bytes
-rw-r--r--hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00068.pmfbin5732 -> 0 bytes
-rw-r--r--hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00069.pmfbin5740 -> 0 bytes
-rw-r--r--hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00070.pmfbin5744 -> 0 bytes
-rw-r--r--hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00071.pmfbin5740 -> 0 bytes
-rw-r--r--hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00072.pmfbin5724 -> 0 bytes
-rw-r--r--hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00073.pmfbin5720 -> 0 bytes
-rw-r--r--hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00074.pmfbin5724 -> 0 bytes
-rw-r--r--hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00075.pmfbin5724 -> 0 bytes
-rw-r--r--hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00076.pmfbin5716 -> 0 bytes
-rw-r--r--hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00077.pmfbin5720 -> 0 bytes
-rw-r--r--hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00079.pmfbin5656 -> 0 bytes
-rw-r--r--hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00080.pmfbin5664 -> 0 bytes
-rw-r--r--hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00081.pmfbin5672 -> 0 bytes
-rw-r--r--hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00082.pmfbin5660 -> 0 bytes
-rw-r--r--hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00083.pmfbin5720 -> 0 bytes
-rw-r--r--hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00084.pmfbin5724 -> 0 bytes
-rw-r--r--hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00085.pmfbin5724 -> 0 bytes
-rw-r--r--hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00086.pmfbin5716 -> 0 bytes
-rw-r--r--hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00087.pmfbin5752 -> 0 bytes
-rw-r--r--hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00088.pmfbin5720 -> 0 bytes
-rw-r--r--hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00089.pmfbin5744 -> 0 bytes
-rw-r--r--hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00090.pmfbin5736 -> 0 bytes
-rw-r--r--hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00091.pmfbin5744 -> 0 bytes
-rw-r--r--hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00092.pmfbin5736 -> 0 bytes
-rw-r--r--hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00093.pmfbin5728 -> 0 bytes
-rw-r--r--hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00094.pmfbin5728 -> 0 bytes
-rw-r--r--hw/xprint/config/C/print/models/HPDJ1600C/fonts/Makefile.am50
-rw-r--r--hw/xprint/config/C/print/models/HPDJ1600C/fonts/README197
-rw-r--r--hw/xprint/config/C/print/models/HPDJ1600C/fonts/fonts.alias0
-rw-r--r--hw/xprint/config/C/print/models/HPDJ1600C/fonts/fonts.dir45
-rw-r--r--hw/xprint/config/C/print/models/HPDJ1600C/fonts/lpr0ye1a.pmfbin4296 -> 0 bytes
-rw-r--r--hw/xprint/config/C/print/models/HPDJ1600C/model-config40
-rw-r--r--hw/xprint/config/C/print/models/HPLJ4050-PS/Makefile.am5
-rw-r--r--hw/xprint/config/C/print/models/HPLJ4050-PS/fonts/Makefile.am54
-rw-r--r--hw/xprint/config/C/print/models/HPLJ4050-PS/model-config36
-rw-r--r--hw/xprint/config/C/print/models/HPLJ4family/Makefile.am5
-rw-r--r--hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00051.pmfbin5740 -> 0 bytes
-rw-r--r--hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00052.pmfbin5736 -> 0 bytes
-rw-r--r--hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00053.pmfbin5740 -> 0 bytes
-rw-r--r--hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00054.pmfbin5744 -> 0 bytes
-rw-r--r--hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00055.pmfbin5740 -> 0 bytes
-rw-r--r--hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00056.pmfbin5724 -> 0 bytes
-rw-r--r--hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00057.pmfbin5632 -> 0 bytes
-rw-r--r--hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00058.pmfbin5740 -> 0 bytes
-rw-r--r--hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00059.pmfbin5720 -> 0 bytes
-rw-r--r--hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00060.pmfbin5740 -> 0 bytes
-rw-r--r--hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00061.pmfbin5720 -> 0 bytes
-rw-r--r--hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00062.pmfbin5728 -> 0 bytes
-rw-r--r--hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00063.pmfbin5728 -> 0 bytes
-rw-r--r--hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00064.pmfbin5720 -> 0 bytes
-rw-r--r--hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00065.pmfbin5728 -> 0 bytes
-rw-r--r--hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00066.pmfbin5732 -> 0 bytes
-rw-r--r--hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00067.pmfbin5736 -> 0 bytes
-rw-r--r--hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00068.pmfbin5732 -> 0 bytes
-rw-r--r--hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00069.pmfbin5740 -> 0 bytes
-rw-r--r--hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00070.pmfbin5744 -> 0 bytes
-rw-r--r--hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00071.pmfbin5740 -> 0 bytes
-rw-r--r--hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00072.pmfbin5724 -> 0 bytes
-rw-r--r--hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00073.pmfbin5720 -> 0 bytes
-rw-r--r--hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00074.pmfbin5724 -> 0 bytes
-rw-r--r--hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00075.pmfbin5724 -> 0 bytes
-rw-r--r--hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00076.pmfbin5716 -> 0 bytes
-rw-r--r--hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00077.pmfbin5720 -> 0 bytes
-rw-r--r--hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00079.pmfbin5656 -> 0 bytes
-rw-r--r--hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00080.pmfbin5664 -> 0 bytes
-rw-r--r--hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00081.pmfbin5672 -> 0 bytes
-rw-r--r--hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00082.pmfbin5660 -> 0 bytes
-rw-r--r--hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00083.pmfbin5720 -> 0 bytes
-rw-r--r--hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00084.pmfbin5724 -> 0 bytes
-rw-r--r--hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00085.pmfbin5724 -> 0 bytes
-rw-r--r--hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00086.pmfbin5716 -> 0 bytes
-rw-r--r--hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00087.pmfbin5752 -> 0 bytes
-rw-r--r--hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00088.pmfbin5720 -> 0 bytes
-rw-r--r--hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00089.pmfbin5744 -> 0 bytes
-rw-r--r--hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00090.pmfbin5736 -> 0 bytes
-rw-r--r--hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00091.pmfbin5744 -> 0 bytes
-rw-r--r--hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00092.pmfbin5736 -> 0 bytes
-rw-r--r--hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00093.pmfbin5728 -> 0 bytes
-rw-r--r--hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00094.pmfbin5728 -> 0 bytes
-rw-r--r--hw/xprint/config/C/print/models/HPLJ4family/fonts/Makefile.am50
-rw-r--r--hw/xprint/config/C/print/models/HPLJ4family/fonts/README203
-rw-r--r--hw/xprint/config/C/print/models/HPLJ4family/fonts/fonts.alias0
-rw-r--r--hw/xprint/config/C/print/models/HPLJ4family/fonts/fonts.dir45
-rw-r--r--hw/xprint/config/C/print/models/HPLJ4family/fonts/lpr0ye1a.pmfbin4296 -> 0 bytes
-rw-r--r--hw/xprint/config/C/print/models/HPLJ4family/model-config39
-rw-r--r--hw/xprint/config/C/print/models/Makefile.am11
-rw-r--r--hw/xprint/config/C/print/models/PS2PDFspooldir-GS/Makefile.am4
-rw-r--r--hw/xprint/config/C/print/models/PS2PDFspooldir-GS/model-config72
-rwxr-xr-xhw/xprint/config/C/print/models/PS2PDFspooldir-GS/ps2pdf_spooltodir.sh130
-rw-r--r--hw/xprint/config/C/print/models/PSdefault/Makefile.am5
-rw-r--r--hw/xprint/config/C/print/models/PSdefault/fonts/AvantGarde-Book.pmfbin6716 -> 0 bytes
-rw-r--r--hw/xprint/config/C/print/models/PSdefault/fonts/AvantGarde-BookOblique.pmfbin6728 -> 0 bytes
-rw-r--r--hw/xprint/config/C/print/models/PSdefault/fonts/AvantGarde-Demi.pmfbin6712 -> 0 bytes
-rw-r--r--hw/xprint/config/C/print/models/PSdefault/fonts/AvantGarde-DemiOblique.pmfbin6724 -> 0 bytes
-rw-r--r--hw/xprint/config/C/print/models/PSdefault/fonts/Courier-Bold.pmfbin6612 -> 0 bytes
-rw-r--r--hw/xprint/config/C/print/models/PSdefault/fonts/Courier-BoldOblique.pmfbin6636 -> 0 bytes
-rw-r--r--hw/xprint/config/C/print/models/PSdefault/fonts/Courier-Oblique.pmfbin6608 -> 0 bytes
-rw-r--r--hw/xprint/config/C/print/models/PSdefault/fonts/Courier.pmfbin6592 -> 0 bytes
-rw-r--r--hw/xprint/config/C/print/models/PSdefault/fonts/Helvetica-Bold.pmfbin6680 -> 0 bytes
-rw-r--r--hw/xprint/config/C/print/models/PSdefault/fonts/Helvetica-BoldOblique.pmfbin6692 -> 0 bytes
-rw-r--r--hw/xprint/config/C/print/models/PSdefault/fonts/Helvetica-Oblique.pmfbin6688 -> 0 bytes
-rw-r--r--hw/xprint/config/C/print/models/PSdefault/fonts/Helvetica.pmfbin6672 -> 0 bytes
-rw-r--r--hw/xprint/config/C/print/models/PSdefault/fonts/LubalinGraph-Book.pmfbin6628 -> 0 bytes
-rw-r--r--hw/xprint/config/C/print/models/PSdefault/fonts/LubalinGraph-BookOblique.pmfbin6640 -> 0 bytes
-rw-r--r--hw/xprint/config/C/print/models/PSdefault/fonts/LubalinGraph-Demi.pmfbin6624 -> 0 bytes
-rw-r--r--hw/xprint/config/C/print/models/PSdefault/fonts/LubalinGraph-DemiOblique.pmfbin6636 -> 0 bytes
-rw-r--r--hw/xprint/config/C/print/models/PSdefault/fonts/Makefile.am44
-rw-r--r--hw/xprint/config/C/print/models/PSdefault/fonts/NewCentSchlbk-Bold.pmfbin6644 -> 0 bytes
-rw-r--r--hw/xprint/config/C/print/models/PSdefault/fonts/NewCentSchlbk-BoldItal.pmfbin6656 -> 0 bytes
-rw-r--r--hw/xprint/config/C/print/models/PSdefault/fonts/NewCentSchlbk-Ital.pmfbin6652 -> 0 bytes
-rw-r--r--hw/xprint/config/C/print/models/PSdefault/fonts/NewCentSchlbk-Roman.pmfbin6648 -> 0 bytes
-rw-r--r--hw/xprint/config/C/print/models/PSdefault/fonts/Souvenir-Demi.pmfbin6680 -> 0 bytes
-rw-r--r--hw/xprint/config/C/print/models/PSdefault/fonts/Souvenir-DemiItalic.pmfbin6692 -> 0 bytes
-rw-r--r--hw/xprint/config/C/print/models/PSdefault/fonts/Souvenir-Light.pmfbin6684 -> 0 bytes
-rw-r--r--hw/xprint/config/C/print/models/PSdefault/fonts/Souvenir-LightItalic.pmfbin6696 -> 0 bytes
-rw-r--r--hw/xprint/config/C/print/models/PSdefault/fonts/Symbol.pmfbin6556 -> 0 bytes
-rw-r--r--hw/xprint/config/C/print/models/PSdefault/fonts/Times-Bold.pmfbin6660 -> 0 bytes
-rw-r--r--hw/xprint/config/C/print/models/PSdefault/fonts/Times-BoldItalic.pmfbin6672 -> 0 bytes
-rw-r--r--hw/xprint/config/C/print/models/PSdefault/fonts/Times-Italic.pmfbin6668 -> 0 bytes
-rw-r--r--hw/xprint/config/C/print/models/PSdefault/fonts/Times-Roman.pmfbin6664 -> 0 bytes
-rw-r--r--hw/xprint/config/C/print/models/PSdefault/fonts/ZapfDingbats.pmfbin6676 -> 0 bytes
-rw-r--r--hw/xprint/config/C/print/models/PSdefault/model-config136
-rw-r--r--hw/xprint/config/C/print/models/PSspooldir/Makefile.am4
-rw-r--r--hw/xprint/config/C/print/models/PSspooldir/model-config71
-rwxr-xr-xhw/xprint/config/C/print/models/PSspooldir/spooltodir.sh127
-rw-r--r--hw/xprint/config/C/print/models/SPSPARC2/Makefile.am5
-rw-r--r--hw/xprint/config/C/print/models/SPSPARC2/fonts/Makefile.am37
-rw-r--r--hw/xprint/config/C/print/models/SPSPARC2/model-config18
-rw-r--r--hw/xprint/config/Makefile.am712
-rw-r--r--hw/xprint/config/README318
-rw-r--r--hw/xprint/config/en_US/Makefile.am1
-rw-r--r--hw/xprint/config/en_US/print/Makefile.am1
-rw-r--r--hw/xprint/config/en_US/print/attributes/Makefile.am3
-rw-r--r--hw/xprint/config/en_US/print/attributes/document13
-rw-r--r--hw/xprint/ddxInit.c390
-rw-r--r--hw/xprint/doc/Makefile.am19
-rw-r--r--hw/xprint/doc/Xprt.html115
-rw-r--r--hw/xprint/doc/Xprt.man.pre196
-rw-r--r--hw/xprint/doc/Xprt.sgml371
-rw-r--r--hw/xprint/etc/Makefile.am1
-rw-r--r--hw/xprint/etc/Xsession.d/92xprint-xpserverlist30
-rw-r--r--hw/xprint/etc/Xsession.d/Makefile.am2
-rw-r--r--hw/xprint/etc/init.d/Makefile.am12
-rw-r--r--hw/xprint/etc/init.d/xprint.cpp1277
-rw-r--r--hw/xprint/etc/profile.d/Makefile.am1
-rw-r--r--hw/xprint/etc/profile.d/xprint.csh16
-rw-r--r--hw/xprint/etc/profile.d/xprint.sh16
-rw-r--r--hw/xprint/mediaSizes.c782
-rw-r--r--hw/xprint/pcl-mono/Makefile.am5
-rw-r--r--hw/xprint/pcl/Makefile.am6
-rw-r--r--hw/xprint/pcl/Makefile.am.inc27
-rw-r--r--hw/xprint/pcl/Pcl.h619
-rw-r--r--hw/xprint/pcl/PclArc.c268
-rw-r--r--hw/xprint/pcl/PclArea.c436
-rw-r--r--hw/xprint/pcl/PclAttVal.c206
-rw-r--r--hw/xprint/pcl/PclAttr.c86
-rw-r--r--hw/xprint/pcl/PclColor.c851
-rw-r--r--hw/xprint/pcl/PclCursor.c113
-rw-r--r--hw/xprint/pcl/PclDef.h67
-rw-r--r--hw/xprint/pcl/PclFonts.c72
-rw-r--r--hw/xprint/pcl/PclGC.c971
-rw-r--r--hw/xprint/pcl/PclInit.c575
-rw-r--r--hw/xprint/pcl/PclLine.c314
-rw-r--r--hw/xprint/pcl/PclMisc.c301
-rw-r--r--hw/xprint/pcl/PclPixel.c159
-rw-r--r--hw/xprint/pcl/PclPolygon.c351
-rw-r--r--hw/xprint/pcl/PclPrint.c709
-rw-r--r--hw/xprint/pcl/PclSFonts.c427
-rw-r--r--hw/xprint/pcl/PclSFonts.h115
-rw-r--r--hw/xprint/pcl/PclSpans.c137
-rw-r--r--hw/xprint/pcl/PclText.c934
-rw-r--r--hw/xprint/pcl/PclWindow.c209
-rw-r--r--hw/xprint/pcl/Pclmap.h210
-rw-r--r--hw/xprint/ps/Makefile.am42
-rw-r--r--hw/xprint/ps/Ps.h600
-rw-r--r--hw/xprint/ps/PsArc.c181
-rw-r--r--hw/xprint/ps/PsArea.c390
-rw-r--r--hw/xprint/ps/PsAttVal.c289
-rw-r--r--hw/xprint/ps/PsAttr.c116
-rw-r--r--hw/xprint/ps/PsCache.c328
-rw-r--r--hw/xprint/ps/PsColor.c257
-rw-r--r--hw/xprint/ps/PsDef.h96
-rw-r--r--hw/xprint/ps/PsFTFonts.c85
-rw-r--r--hw/xprint/ps/PsFonts.c873
-rw-r--r--hw/xprint/ps/PsGC.c418
-rw-r--r--hw/xprint/ps/PsImageUtil.c329
-rw-r--r--hw/xprint/ps/PsInit.c648
-rw-r--r--hw/xprint/ps/PsLine.c191
-rw-r--r--hw/xprint/ps/PsMisc.c320
-rw-r--r--hw/xprint/ps/PsPixel.c156
-rw-r--r--hw/xprint/ps/PsPixmap.c623
-rw-r--r--hw/xprint/ps/PsPolygon.c259
-rw-r--r--hw/xprint/ps/PsPrint.c459
-rw-r--r--hw/xprint/ps/PsSpans.c164
-rw-r--r--hw/xprint/ps/PsText.c581
-rw-r--r--hw/xprint/ps/PsWindow.c222
-rw-r--r--hw/xprint/ps/psout.c1789
-rw-r--r--hw/xprint/ps/psout.h335
-rw-r--r--hw/xprint/ps/psout_ft.c337
-rw-r--r--hw/xprint/ps/psout_ftpstype1.c185
-rw-r--r--hw/xprint/ps/psout_ftpstype3.c439
-rw-r--r--hw/xprint/ps/ttf2pt1wrap.c14
-rw-r--r--hw/xprint/raster/Makefile.am10
-rw-r--r--hw/xprint/raster/Raster.c1563
-rw-r--r--hw/xprint/raster/Raster.h117
-rw-r--r--hw/xprint/raster/RasterAttVal.c267
-rw-r--r--hw/xprint/spooler.c202
-rw-r--r--hw/xprint/spooler.h75
-rw-r--r--include/dix.h3
-rw-r--r--mi/miinitext.c48
-rw-r--r--os/utils.c13
271 files changed, 26 insertions, 39501 deletions
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
+++ b/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
+++ b/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
+++ b/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
+++ b/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
+++ b/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@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
+++ b/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
+++ b/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
+++ b/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
+++ b/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
+++ b/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
+++ b/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
+++ b/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
+++ b/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
+++ b/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
+++ b/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
+++ b/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
+++ b/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
+++ b/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
+++ b/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
+++ b/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
+++ b/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
+++ b/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
+++ b/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
+++ b/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
--- a/hw/xprint/config/C/print/ddx-config/raster/postscript
+++ b/dev/null
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
+++ b/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
+++ b/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
+++ b/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
+++ b/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
+++ b/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
+++ b/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
+++ b/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
+++ b/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
--- a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00051.pmf
+++ b/dev/null
Binary files 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
--- a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00052.pmf
+++ b/dev/null
Binary files 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
--- a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00053.pmf
+++ b/dev/null
Binary files 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
--- a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00054.pmf
+++ b/dev/null
Binary files 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
--- a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00055.pmf
+++ b/dev/null
Binary files 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
--- a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00056.pmf
+++ b/dev/null
Binary files 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
--- a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00057.pmf
+++ b/dev/null
Binary files 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
--- a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00058.pmf
+++ b/dev/null
Binary files 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
--- a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00059.pmf
+++ b/dev/null
Binary files 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
--- a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00060.pmf
+++ b/dev/null
Binary files 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
--- a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00061.pmf
+++ b/dev/null
Binary files 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
--- a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00062.pmf
+++ b/dev/null
Binary files 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
--- a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00063.pmf
+++ b/dev/null
Binary files 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
--- a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00064.pmf
+++ b/dev/null
Binary files 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
--- a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00065.pmf
+++ b/dev/null
Binary files 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
--- a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00066.pmf
+++ b/dev/null
Binary files 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
--- a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00067.pmf
+++ b/dev/null
Binary files 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
--- a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00068.pmf
+++ b/dev/null
Binary files 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
--- a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00069.pmf
+++ b/dev/null
Binary files 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
--- a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00070.pmf
+++ b/dev/null
Binary files 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
--- a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00071.pmf
+++ b/dev/null
Binary files 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
--- a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00072.pmf
+++ b/dev/null
Binary files 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
--- a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00073.pmf
+++ b/dev/null
Binary files 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
--- a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00074.pmf
+++ b/dev/null
Binary files 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
--- a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00075.pmf
+++ b/dev/null
Binary files 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
--- a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00076.pmf
+++ b/dev/null
Binary files 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
--- a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00077.pmf
+++ b/dev/null
Binary files 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
--- a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00079.pmf
+++ b/dev/null
Binary files 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
--- a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00080.pmf
+++ b/dev/null
Binary files 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
--- a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00081.pmf
+++ b/dev/null
Binary files 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
--- a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00082.pmf
+++ b/dev/null
Binary files 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
--- a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00083.pmf
+++ b/dev/null
Binary files 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
--- a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00084.pmf
+++ b/dev/null
Binary files 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
--- a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00085.pmf
+++ b/dev/null
Binary files 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
--- a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00086.pmf
+++ b/dev/null
Binary files 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
--- a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00087.pmf
+++ b/dev/null
Binary files 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
--- a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00088.pmf
+++ b/dev/null
Binary files 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
--- a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00089.pmf
+++ b/dev/null
Binary files 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
--- a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00090.pmf
+++ b/dev/null
Binary files 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
--- a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00091.pmf
+++ b/dev/null
Binary files 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
--- a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00092.pmf
+++ b/dev/null
Binary files 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
--- a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00093.pmf
+++ b/dev/null
Binary files 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
--- a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00094.pmf
+++ b/dev/null
Binary files 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
+++ b/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
+++ b/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
--- a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/fonts.alias
+++ b/dev/null
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
+++ b/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
--- a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/lpr0ye1a.pmf
+++ b/dev/null
Binary files 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
+++ b/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
+++ b/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
+++ b/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
+++ b/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
+++ b/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
--- a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00051.pmf
+++ b/dev/null
Binary files 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
--- a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00052.pmf
+++ b/dev/null
Binary files 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
--- a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00053.pmf
+++ b/dev/null
Binary files 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
--- a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00054.pmf
+++ b/dev/null
Binary files 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
--- a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00055.pmf
+++ b/dev/null
Binary files 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
--- a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00056.pmf
+++ b/dev/null
Binary files 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
--- a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00057.pmf
+++ b/dev/null
Binary files 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
--- a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00058.pmf
+++ b/dev/null
Binary files 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
--- a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00059.pmf
+++ b/dev/null
Binary files 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
--- a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00060.pmf
+++ b/dev/null
Binary files 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
--- a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00061.pmf
+++ b/dev/null
Binary files 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
--- a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00062.pmf
+++ b/dev/null
Binary files 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
--- a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00063.pmf
+++ b/dev/null
Binary files 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
--- a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00064.pmf
+++ b/dev/null
Binary files 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
--- a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00065.pmf
+++ b/dev/null
Binary files 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
--- a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00066.pmf
+++ b/dev/null
Binary files 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
--- a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00067.pmf
+++ b/dev/null
Binary files 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
--- a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00068.pmf
+++ b/dev/null
Binary files 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
--- a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00069.pmf
+++ b/dev/null
Binary files 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
--- a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00070.pmf
+++ b/dev/null
Binary files 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
--- a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00071.pmf
+++ b/dev/null
Binary files 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
--- a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00072.pmf
+++ b/dev/null
Binary files 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
--- a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00073.pmf
+++ b/dev/null
Binary files 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
--- a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00074.pmf
+++ b/dev/null
Binary files 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
--- a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00075.pmf
+++ b/dev/null
Binary files 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
--- a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00076.pmf
+++ b/dev/null
Binary files 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
--- a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00077.pmf
+++ b/dev/null
Binary files 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
--- a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00079.pmf
+++ b/dev/null
Binary files 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
--- a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00080.pmf
+++ b/dev/null
Binary files 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
--- a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00081.pmf
+++ b/dev/null
Binary files 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
--- a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00082.pmf
+++ b/dev/null
Binary files 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
--- a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00083.pmf
+++ b/dev/null
Binary files 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
--- a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00084.pmf
+++ b/dev/null
Binary files 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
--- a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00085.pmf
+++ b/dev/null
Binary files 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
--- a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00086.pmf
+++ b/dev/null
Binary files 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
--- a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00087.pmf
+++ b/dev/null
Binary files 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
--- a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00088.pmf
+++ b/dev/null
Binary files 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
--- a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00089.pmf
+++ b/dev/null
Binary files 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
--- a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00090.pmf
+++ b/dev/null
Binary files 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
--- a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00091.pmf
+++ b/dev/null
Binary files 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
--- a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00092.pmf
+++ b/dev/null
Binary files 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
--- a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00093.pmf
+++ b/dev/null
Binary files 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
--- a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00094.pmf
+++ b/dev/null
Binary files 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
+++ b/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
+++ b/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
--- a/hw/xprint/config/C/print/models/HPLJ4family/fonts/fonts.alias
+++ b/dev/null
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
+++ b/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
--- a/hw/xprint/config/C/print/models/HPLJ4family/fonts/lpr0ye1a.pmf
+++ b/dev/null
Binary files 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
+++ b/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
+++ b/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
+++ b/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
+++ b/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
+++ b/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
+++ b/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
--- a/hw/xprint/config/C/print/models/PSdefault/fonts/AvantGarde-Book.pmf
+++ b/dev/null
Binary files 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 61bcb22b..0000000
--- a/hw/xprint/config/C/print/models/PSdefault/fonts/AvantGarde-BookOblique.pmf
+++ b/dev/null
Binary files 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
--- a/hw/xprint/config/C/print/models/PSdefault/fonts/AvantGarde-Demi.pmf
+++ b/dev/null
Binary files 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
--- a/hw/xprint/config/C/print/models/PSdefault/fonts/AvantGarde-DemiOblique.pmf
+++ b/dev/null
Binary files 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
--- a/hw/xprint/config/C/print/models/PSdefault/fonts/Courier-Bold.pmf
+++ b/dev/null
Binary files 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
--- a/hw/xprint/config/C/print/models/PSdefault/fonts/Courier-BoldOblique.pmf
+++ b/dev/null
Binary files 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
--- a/hw/xprint/config/C/print/models/PSdefault/fonts/Courier-Oblique.pmf
+++ b/dev/null
Binary files 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
--- a/hw/xprint/config/C/print/models/PSdefault/fonts/Courier.pmf
+++ b/dev/null
Binary files 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
--- a/hw/xprint/config/C/print/models/PSdefault/fonts/Helvetica-Bold.pmf
+++ b/dev/null
Binary files 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
--- a/hw/xprint/config/C/print/models/PSdefault/fonts/Helvetica-BoldOblique.pmf
+++ b/dev/null
Binary files 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
--- a/hw/xprint/config/C/print/models/PSdefault/fonts/Helvetica-Oblique.pmf
+++ b/dev/null
Binary files 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
--- a/hw/xprint/config/C/print/models/PSdefault/fonts/Helvetica.pmf
+++ b/dev/null
Binary files 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
--- a/hw/xprint/config/C/print/models/PSdefault/fonts/LubalinGraph-Book.pmf
+++ b/dev/null
Binary files 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
--- a/hw/xprint/config/C/print/models/PSdefault/fonts/LubalinGraph-BookOblique.pmf
+++ b/dev/null
Binary files 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
--- a/hw/xprint/config/C/print/models/PSdefault/fonts/LubalinGraph-Demi.pmf
+++ b/dev/null
Binary files 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
--- a/hw/xprint/config/C/print/models/PSdefault/fonts/LubalinGraph-DemiOblique.pmf
+++ b/dev/null
Binary files 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
+++ b/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
--- a/hw/xprint/config/C/print/models/PSdefault/fonts/NewCentSchlbk-Bold.pmf
+++ b/dev/null
Binary files 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
--- a/hw/xprint/config/C/print/models/PSdefault/fonts/NewCentSchlbk-BoldItal.pmf
+++ b/dev/null
Binary files 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
--- a/hw/xprint/config/C/print/models/PSdefault/fonts/NewCentSchlbk-Ital.pmf
+++ b/dev/null
Binary files 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
--- a/hw/xprint/config/C/print/models/PSdefault/fonts/NewCentSchlbk-Roman.pmf
+++ b/dev/null
Binary files 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
--- a/hw/xprint/config/C/print/models/PSdefault/fonts/Souvenir-Demi.pmf
+++ b/dev/null
Binary files 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
--- a/hw/xprint/config/C/print/models/PSdefault/fonts/Souvenir-DemiItalic.pmf
+++ b/dev/null
Binary files 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
--- a/hw/xprint/config/C/print/models/PSdefault/fonts/Souvenir-Light.pmf
+++ b/dev/null
Binary files 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
--- a/hw/xprint/config/C/print/models/PSdefault/fonts/Souvenir-LightItalic.pmf
+++ b/dev/null
Binary files 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
--- a/hw/xprint/config/C/print/models/PSdefault/fonts/Symbol.pmf
+++ b/dev/null
Binary files 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
--- a/hw/xprint/config/C/print/models/PSdefault/fonts/Times-Bold.pmf
+++ b/dev/null
Binary files 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
--- a/hw/xprint/config/C/print/models/PSdefault/fonts/Times-BoldItalic.pmf
+++ b/dev/null
Binary files 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
--- a/hw/xprint/config/C/print/models/PSdefault/fonts/Times-Italic.pmf
+++ b/dev/null
Binary files 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
--- a/hw/xprint/config/C/print/models/PSdefault/fonts/Times-Roman.pmf
+++ b/dev/null
Binary files 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
--- a/hw/xprint/config/C/print/models/PSdefault/fonts/ZapfDingbats.pmf
+++ b/dev/null
Binary files 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
+++ b/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
+++ b/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
+++ b/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
+++ b/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
+++ b/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
+++ b/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
+++ b/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
+++ b/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@euro \
- ca_ES.utf8 \
- ca_ES@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@euro \
- de_AT.utf8 \
- de_AT@euro \
- de_BE \
- de_BE.iso88591 \
- de_BE.iso885915@euro \
- de_BE@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@euro \
- de_DE.utf8 \
- de_DE@euro \
- de_LU \
- de_LU.iso88591 \
- de_LU.iso885915@euro \
- de_LU.utf8 \
- de_LU@euro \
- el_GR \
- el_GR.ISO8859-7 \
- el_GR.ISO8859-7@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@euro \
- en_IE.utf8 \
- en_IE@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@euro \
- es_ES.utf8 \
- es_ES@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@euro \
- eu_ES@euro \
- fa_IR.utf8 \
- fi_FI \
- fi_FI.ISO8859-1 \
- fi_FI.ISO8859-15 \
- fi_FI.UTF-8 \
- fi_FI.iso88591 \
- fi_FI.iso885915@euro \
- fi_FI.utf8 \
- fi_FI@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@euro \
- fr_BE.utf8 \
- fr_BE@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@euro \
- fr_FR.utf8 \
- fr_FR@euro \
- fr_LU \
- fr_LU.iso88591 \
- fr_LU.iso885915@euro \
- fr_LU.utf8 \
- fr_LU@euro \
- ga_IE \
- ga_IE.iso88591 \
- ga_IE.iso885915@euro \
- ga_IE.utf8 \
- ga_IE@euro \
- gl_ES \
- gl_ES.iso88591 \
- gl_ES.iso885915@euro \
- gl_ES.utf8 \
- gl_ES@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@euro \
- it_IT.utf8 \
- it_IT@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@dict \
- ko_KR.UTF-8 \
- ko_KR.UTF-8@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@euro \
- nl_BE.utf8 \
- nl_BE@euro \
- nl_NL \
- nl_NL.ISO8859-1 \
- nl_NL.ISO8859-15 \
- nl_NL.iso88591 \
- nl_NL.iso885915@euro \
- nl_NL.utf8 \
- nl_NL@euro \
- nn_NO \
- nn_NO.iso88591 \
- no \
- no.ISO8859-1 \
- no_NO \
- no_NO.ISO8859-1@bokmal \
- no_NO.ISO8859-1@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@euro \
- pt_PT.utf8 \
- pt_PT@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@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@cyrillic \
- sr_YU.utf8 \
- sr_YU@cyrillic \
- sv \
- sv.ISO8859-1 \
- sv.ISO8859-15 \
- sv.UTF-8 \
- sv_FI \
- sv_FI.iso88591 \
- sv_FI.iso885915@euro \
- sv_FI.utf8 \
- sv_FI@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@euro \
- wa_BE@euro \
- zh \
- zh.GBK \
- zh.UTF-8 \
- zh_CN \
- zh_CN.EUC \
- zh_CN.EUC@pinyin \
- zh_CN.EUC@radical \
- zh_CN.EUC@stroke \
- zh_CN.GB18030 \
- zh_CN.GB18030@pinyin \
- zh_CN.GB18030@radical \
- zh_CN.GB18030@stroke \
- zh_CN.GBK \
- zh_CN.GBK@pinyin \
- zh_CN.GBK@radical \
- zh_CN.GBK@stroke \
- zh_CN.UTF-8 \
- zh_CN.UTF-8@pinyin \
- zh_CN.UTF-8@radical \
- zh_CN.UTF-8@stroke \
- zh_CN.gb18030 \
- zh_CN.gb2312 \
- zh_CN.gbk \
- zh_CN.utf8 \
- zh_HK \
- zh_HK.BIG5HK \
- zh_HK.BIG5HK@radical \
- zh_HK.BIG5HK@stroke \
- zh_HK.UTF-8 \
- zh_HK.UTF-8@radical \
- zh_HK.UTF-8@stroke \
- zh_HK.big5hkscs \
- zh_HK.utf8 \
- zh_TW \
- zh_TW.BIG5 \
- zh_TW.BIG5@pinyin \
- zh_TW.BIG5@radical \
- zh_TW.BIG5@stroke \
- zh_TW.BIG5@zhuyin \
- zh_TW.EUC \
- zh_TW.EUC@pinyin \
- zh_TW.EUC@radical \
- zh_TW.EUC@stroke \
- zh_TW.EUC@zhuyin \
- zh_TW.UTF-8 \
- zh_TW.UTF-8@pinyin \
- zh_TW.UTF-8@radical \
- zh_TW.UTF-8@stroke \
- zh_TW.UTF-8@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
+++ b/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@machine[:dispNum]
-
- For example:
-
- colorlj7@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
+++ b/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
+++ b/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
+++ b/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
+++ b/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
+++ b/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
+++ b/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
+++ b/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@debian.org">dparsons@debian.org</a>&gt;</tt> and
- Roland Mainz <tt class="email">&lt;<a href="mailto:roland.mainz@nrubsig.org">roland.mainz@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
+++ b/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@debian.org> and
-Roland Mainz <roland.mainz@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
+++ b/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>