[gs-cvs] rev 7907 - in branches/gs-reorg: . psi src

giles at ghostscript.com giles at ghostscript.com
Mon May 7 13:29:14 PDT 2007


Author: giles
Date: 2007-05-07 13:29:08 -0700 (Mon, 07 May 2007)
New Revision: 7907

Added:
   branches/gs-reorg/psi/
   branches/gs-reorg/psi/bfont.h
   branches/gs-reorg/psi/btoken.h
   branches/gs-reorg/psi/cfonts.mak
   branches/gs-reorg/psi/dscparse.c
   branches/gs-reorg/psi/dscparse.h
   branches/gs-reorg/psi/dstack.h
   branches/gs-reorg/psi/estack.h
   branches/gs-reorg/psi/files.h
   branches/gs-reorg/psi/ghost.h
   branches/gs-reorg/psi/gs.c
   branches/gs-reorg/psi/ialloc.c
   branches/gs-reorg/psi/ialloc.h
   branches/gs-reorg/psi/iapi.c
   branches/gs-reorg/psi/iapi.h
   branches/gs-reorg/psi/iastate.h
   branches/gs-reorg/psi/iastruct.h
   branches/gs-reorg/psi/ibnum.c
   branches/gs-reorg/psi/ibnum.h
   branches/gs-reorg/psi/iccfont.c
   branches/gs-reorg/psi/iccinit0.c
   branches/gs-reorg/psi/iccinit1.c
   branches/gs-reorg/psi/icfontab.c
   branches/gs-reorg/psi/ichar.h
   branches/gs-reorg/psi/ichar1.h
   branches/gs-reorg/psi/icharout.h
   branches/gs-reorg/psi/icid.h
   branches/gs-reorg/psi/icie.h
   branches/gs-reorg/psi/icolor.h
   branches/gs-reorg/psi/iconf.c
   branches/gs-reorg/psi/iconf.h
   branches/gs-reorg/psi/icontext.c
   branches/gs-reorg/psi/icontext.h
   branches/gs-reorg/psi/icremap.h
   branches/gs-reorg/psi/icsmap.h
   branches/gs-reorg/psi/icstate.h
   branches/gs-reorg/psi/iddict.h
   branches/gs-reorg/psi/iddstack.h
   branches/gs-reorg/psi/idebug.c
   branches/gs-reorg/psi/idebug.h
   branches/gs-reorg/psi/idict.c
   branches/gs-reorg/psi/idict.h
   branches/gs-reorg/psi/idictdef.h
   branches/gs-reorg/psi/idisp.c
   branches/gs-reorg/psi/idisp.h
   branches/gs-reorg/psi/idosave.h
   branches/gs-reorg/psi/idparam.c
   branches/gs-reorg/psi/idparam.h
   branches/gs-reorg/psi/idsdata.h
   branches/gs-reorg/psi/idstack.c
   branches/gs-reorg/psi/idstack.h
   branches/gs-reorg/psi/ierrors.h
   branches/gs-reorg/psi/iesdata.h
   branches/gs-reorg/psi/iestack.h
   branches/gs-reorg/psi/ifapi.h
   branches/gs-reorg/psi/ifcid.h
   branches/gs-reorg/psi/ifilter.h
   branches/gs-reorg/psi/ifilter2.h
   branches/gs-reorg/psi/ifont.h
   branches/gs-reorg/psi/ifont1.h
   branches/gs-reorg/psi/ifont2.h
   branches/gs-reorg/psi/ifont42.h
   branches/gs-reorg/psi/ifrpred.h
   branches/gs-reorg/psi/ifunc.h
   branches/gs-reorg/psi/ifwpred.h
   branches/gs-reorg/psi/igc.c
   branches/gs-reorg/psi/igc.h
   branches/gs-reorg/psi/igcref.c
   branches/gs-reorg/psi/igcstr.c
   branches/gs-reorg/psi/igcstr.h
   branches/gs-reorg/psi/igstate.h
   branches/gs-reorg/psi/iht.h
   branches/gs-reorg/psi/iimage.h
   branches/gs-reorg/psi/iimage2.h
   branches/gs-reorg/psi/iinit.c
   branches/gs-reorg/psi/iinit.h
   branches/gs-reorg/psi/ilevel.h
   branches/gs-reorg/psi/ilocate.c
   branches/gs-reorg/psi/imain.c
   branches/gs-reorg/psi/imain.h
   branches/gs-reorg/psi/imainarg.c
   branches/gs-reorg/psi/imainarg.h
   branches/gs-reorg/psi/imemory.h
   branches/gs-reorg/psi/iminst.h
   branches/gs-reorg/psi/iname.c
   branches/gs-reorg/psi/iname.h
   branches/gs-reorg/psi/inamedef.h
   branches/gs-reorg/psi/inameidx.h
   branches/gs-reorg/psi/inames.h
   branches/gs-reorg/psi/inamestr.h
   branches/gs-reorg/psi/inobtokn.c
   branches/gs-reorg/psi/inouparm.c
   branches/gs-reorg/psi/int.mak
   branches/gs-reorg/psi/interp.c
   branches/gs-reorg/psi/interp.h
   branches/gs-reorg/psi/iosdata.h
   branches/gs-reorg/psi/iostack.h
   branches/gs-reorg/psi/ipacked.h
   branches/gs-reorg/psi/iparam.c
   branches/gs-reorg/psi/iparam.h
   branches/gs-reorg/psi/iparray.h
   branches/gs-reorg/psi/ipcolor.h
   branches/gs-reorg/psi/iplugin.c
   branches/gs-reorg/psi/iplugin.h
   branches/gs-reorg/psi/ireclaim.c
   branches/gs-reorg/psi/iref.h
   branches/gs-reorg/psi/isave.c
   branches/gs-reorg/psi/isave.h
   branches/gs-reorg/psi/iscan.c
   branches/gs-reorg/psi/iscan.h
   branches/gs-reorg/psi/iscanbin.c
   branches/gs-reorg/psi/iscanbin.h
   branches/gs-reorg/psi/iscannum.c
   branches/gs-reorg/psi/iscannum.h
   branches/gs-reorg/psi/isdata.h
   branches/gs-reorg/psi/isstate.h
   branches/gs-reorg/psi/istack.c
   branches/gs-reorg/psi/istack.h
   branches/gs-reorg/psi/istkparm.h
   branches/gs-reorg/psi/istream.h
   branches/gs-reorg/psi/istruct.h
   branches/gs-reorg/psi/itoken.h
   branches/gs-reorg/psi/iutil.c
   branches/gs-reorg/psi/iutil.h
   branches/gs-reorg/psi/iutil2.c
   branches/gs-reorg/psi/iutil2.h
   branches/gs-reorg/psi/iutilasm.asm
   branches/gs-reorg/psi/ivmem2.h
   branches/gs-reorg/psi/ivmspace.h
   branches/gs-reorg/psi/main.h
   branches/gs-reorg/psi/oparc.h
   branches/gs-reorg/psi/opcheck.h
   branches/gs-reorg/psi/opdef.h
   branches/gs-reorg/psi/oper.h
   branches/gs-reorg/psi/opextern.h
   branches/gs-reorg/psi/ostack.h
   branches/gs-reorg/psi/sfilter1.c
   branches/gs-reorg/psi/store.h
   branches/gs-reorg/psi/winint.mak
   branches/gs-reorg/psi/zalg.c
   branches/gs-reorg/psi/zarith.c
   branches/gs-reorg/psi/zarray.c
   branches/gs-reorg/psi/zbfont.c
   branches/gs-reorg/psi/zbseq.c
   branches/gs-reorg/psi/zcfont.c
   branches/gs-reorg/psi/zchar.c
   branches/gs-reorg/psi/zchar1.c
   branches/gs-reorg/psi/zchar2.c
   branches/gs-reorg/psi/zchar32.c
   branches/gs-reorg/psi/zchar42.c
   branches/gs-reorg/psi/zchar42.h
   branches/gs-reorg/psi/zcharout.c
   branches/gs-reorg/psi/zcharx.c
   branches/gs-reorg/psi/zcid.c
   branches/gs-reorg/psi/zcidtest.c
   branches/gs-reorg/psi/zcie.c
   branches/gs-reorg/psi/zcolor.c
   branches/gs-reorg/psi/zcolor1.c
   branches/gs-reorg/psi/zcolor2.c
   branches/gs-reorg/psi/zcolor3.c
   branches/gs-reorg/psi/zcontext.c
   branches/gs-reorg/psi/zcontrol.c
   branches/gs-reorg/psi/zcrd.c
   branches/gs-reorg/psi/zcsdevn.c
   branches/gs-reorg/psi/zcsindex.c
   branches/gs-reorg/psi/zcspixel.c
   branches/gs-reorg/psi/zcssepr.c
   branches/gs-reorg/psi/zdevcal.c
   branches/gs-reorg/psi/zdevice.c
   branches/gs-reorg/psi/zdevice2.c
   branches/gs-reorg/psi/zdfilter.c
   branches/gs-reorg/psi/zdict.c
   branches/gs-reorg/psi/zdosio.c
   branches/gs-reorg/psi/zdouble.c
   branches/gs-reorg/psi/zdpnext.c
   branches/gs-reorg/psi/zdps.c
   branches/gs-reorg/psi/zdps1.c
   branches/gs-reorg/psi/zdscpars.c
   branches/gs-reorg/psi/zfapi.c
   branches/gs-reorg/psi/zfarc4.c
   branches/gs-reorg/psi/zfbcp.c
   branches/gs-reorg/psi/zfcid.c
   branches/gs-reorg/psi/zfcid0.c
   branches/gs-reorg/psi/zfcid1.c
   branches/gs-reorg/psi/zfcmap.c
   branches/gs-reorg/psi/zfdctd.c
   branches/gs-reorg/psi/zfdcte.c
   branches/gs-reorg/psi/zfdecode.c
   branches/gs-reorg/psi/zfile.c
   branches/gs-reorg/psi/zfile1.c
   branches/gs-reorg/psi/zfileio.c
   branches/gs-reorg/psi/zfilter.c
   branches/gs-reorg/psi/zfilter2.c
   branches/gs-reorg/psi/zfilterx.c
   branches/gs-reorg/psi/zfimscale.c
   branches/gs-reorg/psi/zfjbig2.c
   branches/gs-reorg/psi/zfjpx.c
   branches/gs-reorg/psi/zfmd5.c
   branches/gs-reorg/psi/zfont.c
   branches/gs-reorg/psi/zfont0.c
   branches/gs-reorg/psi/zfont1.c
   branches/gs-reorg/psi/zfont2.c
   branches/gs-reorg/psi/zfont32.c
   branches/gs-reorg/psi/zfont42.c
   branches/gs-reorg/psi/zfontenum.c
   branches/gs-reorg/psi/zfproc.c
   branches/gs-reorg/psi/zfrsd.c
   branches/gs-reorg/psi/zfsample.c
   branches/gs-reorg/psi/zfunc.c
   branches/gs-reorg/psi/zfunc0.c
   branches/gs-reorg/psi/zfunc3.c
   branches/gs-reorg/psi/zfunc4.c
   branches/gs-reorg/psi/zfzlib.c
   branches/gs-reorg/psi/zgeneric.c
   branches/gs-reorg/psi/zgstate.c
   branches/gs-reorg/psi/zhsb.c
   branches/gs-reorg/psi/zht.c
   branches/gs-reorg/psi/zht1.c
   branches/gs-reorg/psi/zht2.c
   branches/gs-reorg/psi/zht2.h
   branches/gs-reorg/psi/zicc.c
   branches/gs-reorg/psi/zimage.c
   branches/gs-reorg/psi/zimage2.c
   branches/gs-reorg/psi/zimage3.c
   branches/gs-reorg/psi/ziodev.c
   branches/gs-reorg/psi/ziodev2.c
   branches/gs-reorg/psi/ziodevs.c
   branches/gs-reorg/psi/ziodevsc.c
   branches/gs-reorg/psi/zmath.c
   branches/gs-reorg/psi/zmatrix.c
   branches/gs-reorg/psi/zmedia2.c
   branches/gs-reorg/psi/zmisc.c
   branches/gs-reorg/psi/zmisc1.c
   branches/gs-reorg/psi/zmisc2.c
   branches/gs-reorg/psi/zmisc3.c
   branches/gs-reorg/psi/zncdummy.c
   branches/gs-reorg/psi/zpacked.c
   branches/gs-reorg/psi/zpaint.c
   branches/gs-reorg/psi/zpath.c
   branches/gs-reorg/psi/zpath1.c
   branches/gs-reorg/psi/zpcolor.c
   branches/gs-reorg/psi/zrelbit.c
   branches/gs-reorg/psi/zrop.c
   branches/gs-reorg/psi/zshade.c
   branches/gs-reorg/psi/zstack.c
   branches/gs-reorg/psi/zstring.c
   branches/gs-reorg/psi/zsysvm.c
   branches/gs-reorg/psi/ztoken.c
   branches/gs-reorg/psi/ztrans.c
   branches/gs-reorg/psi/ztrap.c
   branches/gs-reorg/psi/ztype.c
   branches/gs-reorg/psi/zupath.c
   branches/gs-reorg/psi/zusparam.c
   branches/gs-reorg/psi/zvmem.c
   branches/gs-reorg/psi/zvmem2.c
Removed:
   branches/gs-reorg/src/bfont.h
   branches/gs-reorg/src/btoken.h
   branches/gs-reorg/src/cfonts.mak
   branches/gs-reorg/src/dscparse.c
   branches/gs-reorg/src/dscparse.h
   branches/gs-reorg/src/dstack.h
   branches/gs-reorg/src/estack.h
   branches/gs-reorg/src/files.h
   branches/gs-reorg/src/ghost.h
   branches/gs-reorg/src/gs.c
   branches/gs-reorg/src/ialloc.c
   branches/gs-reorg/src/ialloc.h
   branches/gs-reorg/src/iapi.c
   branches/gs-reorg/src/iapi.h
   branches/gs-reorg/src/iastate.h
   branches/gs-reorg/src/iastruct.h
   branches/gs-reorg/src/ibnum.c
   branches/gs-reorg/src/ibnum.h
   branches/gs-reorg/src/iccfont.c
   branches/gs-reorg/src/iccinit0.c
   branches/gs-reorg/src/iccinit1.c
   branches/gs-reorg/src/icfontab.c
   branches/gs-reorg/src/ichar.h
   branches/gs-reorg/src/ichar1.h
   branches/gs-reorg/src/icharout.h
   branches/gs-reorg/src/icid.h
   branches/gs-reorg/src/icie.h
   branches/gs-reorg/src/icolor.h
   branches/gs-reorg/src/iconf.c
   branches/gs-reorg/src/iconf.h
   branches/gs-reorg/src/icontext.c
   branches/gs-reorg/src/icontext.h
   branches/gs-reorg/src/icremap.h
   branches/gs-reorg/src/icsmap.h
   branches/gs-reorg/src/icstate.h
   branches/gs-reorg/src/iddict.h
   branches/gs-reorg/src/iddstack.h
   branches/gs-reorg/src/idebug.c
   branches/gs-reorg/src/idebug.h
   branches/gs-reorg/src/idict.c
   branches/gs-reorg/src/idict.h
   branches/gs-reorg/src/idictdef.h
   branches/gs-reorg/src/idisp.c
   branches/gs-reorg/src/idisp.h
   branches/gs-reorg/src/idosave.h
   branches/gs-reorg/src/idparam.c
   branches/gs-reorg/src/idparam.h
   branches/gs-reorg/src/idsdata.h
   branches/gs-reorg/src/idstack.c
   branches/gs-reorg/src/idstack.h
   branches/gs-reorg/src/ierrors.h
   branches/gs-reorg/src/iesdata.h
   branches/gs-reorg/src/iestack.h
   branches/gs-reorg/src/ifapi.h
   branches/gs-reorg/src/ifcid.h
   branches/gs-reorg/src/ifilter.h
   branches/gs-reorg/src/ifilter2.h
   branches/gs-reorg/src/ifont.h
   branches/gs-reorg/src/ifont1.h
   branches/gs-reorg/src/ifont2.h
   branches/gs-reorg/src/ifont42.h
   branches/gs-reorg/src/ifrpred.h
   branches/gs-reorg/src/ifunc.h
   branches/gs-reorg/src/ifwpred.h
   branches/gs-reorg/src/igc.c
   branches/gs-reorg/src/igc.h
   branches/gs-reorg/src/igcref.c
   branches/gs-reorg/src/igcstr.c
   branches/gs-reorg/src/igcstr.h
   branches/gs-reorg/src/igstate.h
   branches/gs-reorg/src/iht.h
   branches/gs-reorg/src/iimage.h
   branches/gs-reorg/src/iimage2.h
   branches/gs-reorg/src/iinit.c
   branches/gs-reorg/src/iinit.h
   branches/gs-reorg/src/ilevel.h
   branches/gs-reorg/src/ilocate.c
   branches/gs-reorg/src/imain.c
   branches/gs-reorg/src/imain.h
   branches/gs-reorg/src/imainarg.c
   branches/gs-reorg/src/imainarg.h
   branches/gs-reorg/src/imemory.h
   branches/gs-reorg/src/iminst.h
   branches/gs-reorg/src/iname.c
   branches/gs-reorg/src/iname.h
   branches/gs-reorg/src/inamedef.h
   branches/gs-reorg/src/inameidx.h
   branches/gs-reorg/src/inames.h
   branches/gs-reorg/src/inamestr.h
   branches/gs-reorg/src/inobtokn.c
   branches/gs-reorg/src/inouparm.c
   branches/gs-reorg/src/int.mak
   branches/gs-reorg/src/interp.c
   branches/gs-reorg/src/interp.h
   branches/gs-reorg/src/iosdata.h
   branches/gs-reorg/src/iostack.h
   branches/gs-reorg/src/ipacked.h
   branches/gs-reorg/src/iparam.c
   branches/gs-reorg/src/iparam.h
   branches/gs-reorg/src/iparray.h
   branches/gs-reorg/src/ipcolor.h
   branches/gs-reorg/src/iplugin.c
   branches/gs-reorg/src/iplugin.h
   branches/gs-reorg/src/ireclaim.c
   branches/gs-reorg/src/iref.h
   branches/gs-reorg/src/isave.c
   branches/gs-reorg/src/isave.h
   branches/gs-reorg/src/iscan.c
   branches/gs-reorg/src/iscan.h
   branches/gs-reorg/src/iscanbin.c
   branches/gs-reorg/src/iscanbin.h
   branches/gs-reorg/src/iscannum.c
   branches/gs-reorg/src/iscannum.h
   branches/gs-reorg/src/isdata.h
   branches/gs-reorg/src/isstate.h
   branches/gs-reorg/src/istack.c
   branches/gs-reorg/src/istack.h
   branches/gs-reorg/src/istkparm.h
   branches/gs-reorg/src/istream.h
   branches/gs-reorg/src/istruct.h
   branches/gs-reorg/src/itoken.h
   branches/gs-reorg/src/iutil.c
   branches/gs-reorg/src/iutil.h
   branches/gs-reorg/src/iutil2.c
   branches/gs-reorg/src/iutil2.h
   branches/gs-reorg/src/iutilasm.asm
   branches/gs-reorg/src/ivmem2.h
   branches/gs-reorg/src/ivmspace.h
   branches/gs-reorg/src/main.h
   branches/gs-reorg/src/oparc.h
   branches/gs-reorg/src/opcheck.h
   branches/gs-reorg/src/opdef.h
   branches/gs-reorg/src/oper.h
   branches/gs-reorg/src/opextern.h
   branches/gs-reorg/src/ostack.h
   branches/gs-reorg/src/sfilter1.c
   branches/gs-reorg/src/store.h
   branches/gs-reorg/src/winint.mak
   branches/gs-reorg/src/zalg.c
   branches/gs-reorg/src/zarith.c
   branches/gs-reorg/src/zarray.c
   branches/gs-reorg/src/zbfont.c
   branches/gs-reorg/src/zbseq.c
   branches/gs-reorg/src/zcfont.c
   branches/gs-reorg/src/zchar.c
   branches/gs-reorg/src/zchar1.c
   branches/gs-reorg/src/zchar2.c
   branches/gs-reorg/src/zchar32.c
   branches/gs-reorg/src/zchar42.c
   branches/gs-reorg/src/zchar42.h
   branches/gs-reorg/src/zcharout.c
   branches/gs-reorg/src/zcharx.c
   branches/gs-reorg/src/zcid.c
   branches/gs-reorg/src/zcidtest.c
   branches/gs-reorg/src/zcie.c
   branches/gs-reorg/src/zcolor.c
   branches/gs-reorg/src/zcolor1.c
   branches/gs-reorg/src/zcolor2.c
   branches/gs-reorg/src/zcolor3.c
   branches/gs-reorg/src/zcontext.c
   branches/gs-reorg/src/zcontrol.c
   branches/gs-reorg/src/zcrd.c
   branches/gs-reorg/src/zcsdevn.c
   branches/gs-reorg/src/zcsindex.c
   branches/gs-reorg/src/zcspixel.c
   branches/gs-reorg/src/zcssepr.c
   branches/gs-reorg/src/zdevcal.c
   branches/gs-reorg/src/zdevice.c
   branches/gs-reorg/src/zdevice2.c
   branches/gs-reorg/src/zdfilter.c
   branches/gs-reorg/src/zdict.c
   branches/gs-reorg/src/zdosio.c
   branches/gs-reorg/src/zdouble.c
   branches/gs-reorg/src/zdpnext.c
   branches/gs-reorg/src/zdps.c
   branches/gs-reorg/src/zdps1.c
   branches/gs-reorg/src/zdscpars.c
   branches/gs-reorg/src/zfapi.c
   branches/gs-reorg/src/zfarc4.c
   branches/gs-reorg/src/zfbcp.c
   branches/gs-reorg/src/zfcid.c
   branches/gs-reorg/src/zfcid0.c
   branches/gs-reorg/src/zfcid1.c
   branches/gs-reorg/src/zfcmap.c
   branches/gs-reorg/src/zfdctd.c
   branches/gs-reorg/src/zfdcte.c
   branches/gs-reorg/src/zfdecode.c
   branches/gs-reorg/src/zfile.c
   branches/gs-reorg/src/zfile1.c
   branches/gs-reorg/src/zfileio.c
   branches/gs-reorg/src/zfilter.c
   branches/gs-reorg/src/zfilter2.c
   branches/gs-reorg/src/zfilterx.c
   branches/gs-reorg/src/zfimscale.c
   branches/gs-reorg/src/zfjbig2.c
   branches/gs-reorg/src/zfjpx.c
   branches/gs-reorg/src/zfmd5.c
   branches/gs-reorg/src/zfont.c
   branches/gs-reorg/src/zfont0.c
   branches/gs-reorg/src/zfont1.c
   branches/gs-reorg/src/zfont2.c
   branches/gs-reorg/src/zfont32.c
   branches/gs-reorg/src/zfont42.c
   branches/gs-reorg/src/zfontenum.c
   branches/gs-reorg/src/zfproc.c
   branches/gs-reorg/src/zfrsd.c
   branches/gs-reorg/src/zfsample.c
   branches/gs-reorg/src/zfunc.c
   branches/gs-reorg/src/zfunc0.c
   branches/gs-reorg/src/zfunc3.c
   branches/gs-reorg/src/zfunc4.c
   branches/gs-reorg/src/zfzlib.c
   branches/gs-reorg/src/zgeneric.c
   branches/gs-reorg/src/zgstate.c
   branches/gs-reorg/src/zhsb.c
   branches/gs-reorg/src/zht.c
   branches/gs-reorg/src/zht1.c
   branches/gs-reorg/src/zht2.c
   branches/gs-reorg/src/zht2.h
   branches/gs-reorg/src/zicc.c
   branches/gs-reorg/src/zimage.c
   branches/gs-reorg/src/zimage2.c
   branches/gs-reorg/src/zimage3.c
   branches/gs-reorg/src/ziodev.c
   branches/gs-reorg/src/ziodev2.c
   branches/gs-reorg/src/ziodevs.c
   branches/gs-reorg/src/ziodevsc.c
   branches/gs-reorg/src/zmath.c
   branches/gs-reorg/src/zmatrix.c
   branches/gs-reorg/src/zmedia2.c
   branches/gs-reorg/src/zmisc.c
   branches/gs-reorg/src/zmisc1.c
   branches/gs-reorg/src/zmisc2.c
   branches/gs-reorg/src/zmisc3.c
   branches/gs-reorg/src/zncdummy.c
   branches/gs-reorg/src/zpacked.c
   branches/gs-reorg/src/zpaint.c
   branches/gs-reorg/src/zpath.c
   branches/gs-reorg/src/zpath1.c
   branches/gs-reorg/src/zpcolor.c
   branches/gs-reorg/src/zrelbit.c
   branches/gs-reorg/src/zrop.c
   branches/gs-reorg/src/zshade.c
   branches/gs-reorg/src/zstack.c
   branches/gs-reorg/src/zstring.c
   branches/gs-reorg/src/zsysvm.c
   branches/gs-reorg/src/ztoken.c
   branches/gs-reorg/src/ztrans.c
   branches/gs-reorg/src/ztrap.c
   branches/gs-reorg/src/ztype.c
   branches/gs-reorg/src/zupath.c
   branches/gs-reorg/src/zusparam.c
   branches/gs-reorg/src/zvmem.c
   branches/gs-reorg/src/zvmem2.c
Modified:
   branches/gs-reorg/src/Makefile.in
   branches/gs-reorg/src/bcwin32.mak
   branches/gs-reorg/src/dvx-gcc.mak
   branches/gs-reorg/src/gsncdummy.c
   branches/gs-reorg/src/macos-mcp.mak
   branches/gs-reorg/src/macosx.mak
   branches/gs-reorg/src/msvc32.mak
   branches/gs-reorg/src/openvms.mak
   branches/gs-reorg/src/openvms.mmk
   branches/gs-reorg/src/os2.mak
   branches/gs-reorg/src/unix-gcc.mak
   branches/gs-reorg/src/unixansi.mak
   branches/gs-reorg/src/watcw32.mak
Log:
Move the ps interpreter to a separate source directory. This is 
relatively painless, as this distinction has always been supported
by the makefiles.


Copied: branches/gs-reorg/psi/bfont.h (from rev 7905, branches/gs-reorg/src/bfont.h)

Copied: branches/gs-reorg/psi/btoken.h (from rev 7905, branches/gs-reorg/src/btoken.h)

Copied: branches/gs-reorg/psi/cfonts.mak (from rev 7905, branches/gs-reorg/src/cfonts.mak)

Copied: branches/gs-reorg/psi/dscparse.c (from rev 7905, branches/gs-reorg/src/dscparse.c)

Copied: branches/gs-reorg/psi/dscparse.h (from rev 7905, branches/gs-reorg/src/dscparse.h)

Copied: branches/gs-reorg/psi/dstack.h (from rev 7905, branches/gs-reorg/src/dstack.h)

Copied: branches/gs-reorg/psi/estack.h (from rev 7905, branches/gs-reorg/src/estack.h)

Copied: branches/gs-reorg/psi/files.h (from rev 7905, branches/gs-reorg/src/files.h)

Copied: branches/gs-reorg/psi/ghost.h (from rev 7905, branches/gs-reorg/src/ghost.h)

Copied: branches/gs-reorg/psi/gs.c (from rev 7905, branches/gs-reorg/src/gs.c)

Copied: branches/gs-reorg/psi/ialloc.c (from rev 7905, branches/gs-reorg/src/ialloc.c)

Copied: branches/gs-reorg/psi/ialloc.h (from rev 7905, branches/gs-reorg/src/ialloc.h)

Copied: branches/gs-reorg/psi/iapi.c (from rev 7905, branches/gs-reorg/src/iapi.c)

Copied: branches/gs-reorg/psi/iapi.h (from rev 7905, branches/gs-reorg/src/iapi.h)

Copied: branches/gs-reorg/psi/iastate.h (from rev 7905, branches/gs-reorg/src/iastate.h)

Copied: branches/gs-reorg/psi/iastruct.h (from rev 7905, branches/gs-reorg/src/iastruct.h)

Copied: branches/gs-reorg/psi/ibnum.c (from rev 7905, branches/gs-reorg/src/ibnum.c)

Copied: branches/gs-reorg/psi/ibnum.h (from rev 7905, branches/gs-reorg/src/ibnum.h)

Copied: branches/gs-reorg/psi/iccfont.c (from rev 7905, branches/gs-reorg/src/iccfont.c)

Copied: branches/gs-reorg/psi/iccinit0.c (from rev 7905, branches/gs-reorg/src/iccinit0.c)

Copied: branches/gs-reorg/psi/iccinit1.c (from rev 7905, branches/gs-reorg/src/iccinit1.c)

Copied: branches/gs-reorg/psi/icfontab.c (from rev 7905, branches/gs-reorg/src/icfontab.c)

Copied: branches/gs-reorg/psi/ichar.h (from rev 7905, branches/gs-reorg/src/ichar.h)

Copied: branches/gs-reorg/psi/ichar1.h (from rev 7905, branches/gs-reorg/src/ichar1.h)

Copied: branches/gs-reorg/psi/icharout.h (from rev 7905, branches/gs-reorg/src/icharout.h)

Copied: branches/gs-reorg/psi/icid.h (from rev 7905, branches/gs-reorg/src/icid.h)

Copied: branches/gs-reorg/psi/icie.h (from rev 7905, branches/gs-reorg/src/icie.h)

Copied: branches/gs-reorg/psi/icolor.h (from rev 7905, branches/gs-reorg/src/icolor.h)

Copied: branches/gs-reorg/psi/iconf.c (from rev 7905, branches/gs-reorg/src/iconf.c)

Copied: branches/gs-reorg/psi/iconf.h (from rev 7905, branches/gs-reorg/src/iconf.h)

Copied: branches/gs-reorg/psi/icontext.c (from rev 7905, branches/gs-reorg/src/icontext.c)

Copied: branches/gs-reorg/psi/icontext.h (from rev 7905, branches/gs-reorg/src/icontext.h)

Copied: branches/gs-reorg/psi/icremap.h (from rev 7905, branches/gs-reorg/src/icremap.h)

Copied: branches/gs-reorg/psi/icsmap.h (from rev 7905, branches/gs-reorg/src/icsmap.h)

Copied: branches/gs-reorg/psi/icstate.h (from rev 7905, branches/gs-reorg/src/icstate.h)

Copied: branches/gs-reorg/psi/iddict.h (from rev 7905, branches/gs-reorg/src/iddict.h)

Copied: branches/gs-reorg/psi/iddstack.h (from rev 7905, branches/gs-reorg/src/iddstack.h)

Copied: branches/gs-reorg/psi/idebug.c (from rev 7905, branches/gs-reorg/src/idebug.c)

Copied: branches/gs-reorg/psi/idebug.h (from rev 7905, branches/gs-reorg/src/idebug.h)

Copied: branches/gs-reorg/psi/idict.c (from rev 7905, branches/gs-reorg/src/idict.c)

Copied: branches/gs-reorg/psi/idict.h (from rev 7905, branches/gs-reorg/src/idict.h)

Copied: branches/gs-reorg/psi/idictdef.h (from rev 7905, branches/gs-reorg/src/idictdef.h)

Copied: branches/gs-reorg/psi/idisp.c (from rev 7905, branches/gs-reorg/src/idisp.c)

Copied: branches/gs-reorg/psi/idisp.h (from rev 7905, branches/gs-reorg/src/idisp.h)

Copied: branches/gs-reorg/psi/idosave.h (from rev 7905, branches/gs-reorg/src/idosave.h)

Copied: branches/gs-reorg/psi/idparam.c (from rev 7905, branches/gs-reorg/src/idparam.c)

Copied: branches/gs-reorg/psi/idparam.h (from rev 7905, branches/gs-reorg/src/idparam.h)

Copied: branches/gs-reorg/psi/idsdata.h (from rev 7905, branches/gs-reorg/src/idsdata.h)

Copied: branches/gs-reorg/psi/idstack.c (from rev 7905, branches/gs-reorg/src/idstack.c)

Copied: branches/gs-reorg/psi/idstack.h (from rev 7905, branches/gs-reorg/src/idstack.h)

Copied: branches/gs-reorg/psi/ierrors.h (from rev 7905, branches/gs-reorg/src/ierrors.h)

Copied: branches/gs-reorg/psi/iesdata.h (from rev 7905, branches/gs-reorg/src/iesdata.h)

Copied: branches/gs-reorg/psi/iestack.h (from rev 7905, branches/gs-reorg/src/iestack.h)

Copied: branches/gs-reorg/psi/ifapi.h (from rev 7905, branches/gs-reorg/src/ifapi.h)

Copied: branches/gs-reorg/psi/ifcid.h (from rev 7905, branches/gs-reorg/src/ifcid.h)

Copied: branches/gs-reorg/psi/ifilter.h (from rev 7905, branches/gs-reorg/src/ifilter.h)

Copied: branches/gs-reorg/psi/ifilter2.h (from rev 7905, branches/gs-reorg/src/ifilter2.h)

Copied: branches/gs-reorg/psi/ifont.h (from rev 7905, branches/gs-reorg/src/ifont.h)

Copied: branches/gs-reorg/psi/ifont1.h (from rev 7905, branches/gs-reorg/src/ifont1.h)

Copied: branches/gs-reorg/psi/ifont2.h (from rev 7905, branches/gs-reorg/src/ifont2.h)

Copied: branches/gs-reorg/psi/ifont42.h (from rev 7905, branches/gs-reorg/src/ifont42.h)

Copied: branches/gs-reorg/psi/ifrpred.h (from rev 7905, branches/gs-reorg/src/ifrpred.h)

Copied: branches/gs-reorg/psi/ifunc.h (from rev 7905, branches/gs-reorg/src/ifunc.h)

Copied: branches/gs-reorg/psi/ifwpred.h (from rev 7905, branches/gs-reorg/src/ifwpred.h)

Copied: branches/gs-reorg/psi/igc.c (from rev 7905, branches/gs-reorg/src/igc.c)

Copied: branches/gs-reorg/psi/igc.h (from rev 7905, branches/gs-reorg/src/igc.h)

Copied: branches/gs-reorg/psi/igcref.c (from rev 7905, branches/gs-reorg/src/igcref.c)

Copied: branches/gs-reorg/psi/igcstr.c (from rev 7905, branches/gs-reorg/src/igcstr.c)

Copied: branches/gs-reorg/psi/igcstr.h (from rev 7905, branches/gs-reorg/src/igcstr.h)

Copied: branches/gs-reorg/psi/igstate.h (from rev 7905, branches/gs-reorg/src/igstate.h)

Copied: branches/gs-reorg/psi/iht.h (from rev 7905, branches/gs-reorg/src/iht.h)

Copied: branches/gs-reorg/psi/iimage.h (from rev 7905, branches/gs-reorg/src/iimage.h)

Copied: branches/gs-reorg/psi/iimage2.h (from rev 7905, branches/gs-reorg/src/iimage2.h)

Copied: branches/gs-reorg/psi/iinit.c (from rev 7905, branches/gs-reorg/src/iinit.c)

Copied: branches/gs-reorg/psi/iinit.h (from rev 7905, branches/gs-reorg/src/iinit.h)

Copied: branches/gs-reorg/psi/ilevel.h (from rev 7905, branches/gs-reorg/src/ilevel.h)

Copied: branches/gs-reorg/psi/ilocate.c (from rev 7905, branches/gs-reorg/src/ilocate.c)

Copied: branches/gs-reorg/psi/imain.c (from rev 7905, branches/gs-reorg/src/imain.c)

Copied: branches/gs-reorg/psi/imain.h (from rev 7905, branches/gs-reorg/src/imain.h)

Copied: branches/gs-reorg/psi/imainarg.c (from rev 7905, branches/gs-reorg/src/imainarg.c)

Copied: branches/gs-reorg/psi/imainarg.h (from rev 7905, branches/gs-reorg/src/imainarg.h)

Copied: branches/gs-reorg/psi/imemory.h (from rev 7905, branches/gs-reorg/src/imemory.h)

Copied: branches/gs-reorg/psi/iminst.h (from rev 7905, branches/gs-reorg/src/iminst.h)

Copied: branches/gs-reorg/psi/iname.c (from rev 7905, branches/gs-reorg/src/iname.c)

Copied: branches/gs-reorg/psi/iname.h (from rev 7905, branches/gs-reorg/src/iname.h)

Copied: branches/gs-reorg/psi/inamedef.h (from rev 7905, branches/gs-reorg/src/inamedef.h)

Copied: branches/gs-reorg/psi/inameidx.h (from rev 7905, branches/gs-reorg/src/inameidx.h)

Copied: branches/gs-reorg/psi/inames.h (from rev 7905, branches/gs-reorg/src/inames.h)

Copied: branches/gs-reorg/psi/inamestr.h (from rev 7905, branches/gs-reorg/src/inamestr.h)

Copied: branches/gs-reorg/psi/inobtokn.c (from rev 7905, branches/gs-reorg/src/inobtokn.c)

Copied: branches/gs-reorg/psi/inouparm.c (from rev 7905, branches/gs-reorg/src/inouparm.c)

Copied: branches/gs-reorg/psi/int.mak (from rev 7905, branches/gs-reorg/src/int.mak)

Copied: branches/gs-reorg/psi/interp.c (from rev 7905, branches/gs-reorg/src/interp.c)

Copied: branches/gs-reorg/psi/interp.h (from rev 7905, branches/gs-reorg/src/interp.h)

Copied: branches/gs-reorg/psi/iosdata.h (from rev 7905, branches/gs-reorg/src/iosdata.h)

Copied: branches/gs-reorg/psi/iostack.h (from rev 7905, branches/gs-reorg/src/iostack.h)

Copied: branches/gs-reorg/psi/ipacked.h (from rev 7905, branches/gs-reorg/src/ipacked.h)

Copied: branches/gs-reorg/psi/iparam.c (from rev 7905, branches/gs-reorg/src/iparam.c)

Copied: branches/gs-reorg/psi/iparam.h (from rev 7905, branches/gs-reorg/src/iparam.h)

Copied: branches/gs-reorg/psi/iparray.h (from rev 7905, branches/gs-reorg/src/iparray.h)

Copied: branches/gs-reorg/psi/ipcolor.h (from rev 7905, branches/gs-reorg/src/ipcolor.h)

Copied: branches/gs-reorg/psi/iplugin.c (from rev 7905, branches/gs-reorg/src/iplugin.c)

Copied: branches/gs-reorg/psi/iplugin.h (from rev 7905, branches/gs-reorg/src/iplugin.h)

Copied: branches/gs-reorg/psi/ireclaim.c (from rev 7905, branches/gs-reorg/src/ireclaim.c)

Copied: branches/gs-reorg/psi/iref.h (from rev 7905, branches/gs-reorg/src/iref.h)

Copied: branches/gs-reorg/psi/isave.c (from rev 7905, branches/gs-reorg/src/isave.c)

Copied: branches/gs-reorg/psi/isave.h (from rev 7905, branches/gs-reorg/src/isave.h)

Copied: branches/gs-reorg/psi/iscan.c (from rev 7905, branches/gs-reorg/src/iscan.c)

Copied: branches/gs-reorg/psi/iscan.h (from rev 7905, branches/gs-reorg/src/iscan.h)

Copied: branches/gs-reorg/psi/iscanbin.c (from rev 7905, branches/gs-reorg/src/iscanbin.c)

Copied: branches/gs-reorg/psi/iscanbin.h (from rev 7905, branches/gs-reorg/src/iscanbin.h)

Copied: branches/gs-reorg/psi/iscannum.c (from rev 7905, branches/gs-reorg/src/iscannum.c)

Copied: branches/gs-reorg/psi/iscannum.h (from rev 7905, branches/gs-reorg/src/iscannum.h)

Copied: branches/gs-reorg/psi/isdata.h (from rev 7905, branches/gs-reorg/src/isdata.h)

Copied: branches/gs-reorg/psi/isstate.h (from rev 7905, branches/gs-reorg/src/isstate.h)

Copied: branches/gs-reorg/psi/istack.c (from rev 7905, branches/gs-reorg/src/istack.c)

Copied: branches/gs-reorg/psi/istack.h (from rev 7905, branches/gs-reorg/src/istack.h)

Copied: branches/gs-reorg/psi/istkparm.h (from rev 7905, branches/gs-reorg/src/istkparm.h)

Copied: branches/gs-reorg/psi/istream.h (from rev 7905, branches/gs-reorg/src/istream.h)

Copied: branches/gs-reorg/psi/istruct.h (from rev 7905, branches/gs-reorg/src/istruct.h)

Copied: branches/gs-reorg/psi/itoken.h (from rev 7905, branches/gs-reorg/src/itoken.h)

Copied: branches/gs-reorg/psi/iutil.c (from rev 7905, branches/gs-reorg/src/iutil.c)

Copied: branches/gs-reorg/psi/iutil.h (from rev 7905, branches/gs-reorg/src/iutil.h)

Copied: branches/gs-reorg/psi/iutil2.c (from rev 7905, branches/gs-reorg/src/iutil2.c)

Copied: branches/gs-reorg/psi/iutil2.h (from rev 7905, branches/gs-reorg/src/iutil2.h)

Copied: branches/gs-reorg/psi/iutilasm.asm (from rev 7905, branches/gs-reorg/src/iutilasm.asm)

Copied: branches/gs-reorg/psi/ivmem2.h (from rev 7905, branches/gs-reorg/src/ivmem2.h)

Copied: branches/gs-reorg/psi/ivmspace.h (from rev 7905, branches/gs-reorg/src/ivmspace.h)

Copied: branches/gs-reorg/psi/main.h (from rev 7905, branches/gs-reorg/src/main.h)

Copied: branches/gs-reorg/psi/oparc.h (from rev 7905, branches/gs-reorg/src/oparc.h)

Copied: branches/gs-reorg/psi/opcheck.h (from rev 7905, branches/gs-reorg/src/opcheck.h)

Copied: branches/gs-reorg/psi/opdef.h (from rev 7905, branches/gs-reorg/src/opdef.h)

Copied: branches/gs-reorg/psi/oper.h (from rev 7905, branches/gs-reorg/src/oper.h)

Copied: branches/gs-reorg/psi/opextern.h (from rev 7905, branches/gs-reorg/src/opextern.h)

Copied: branches/gs-reorg/psi/ostack.h (from rev 7905, branches/gs-reorg/src/ostack.h)

Copied: branches/gs-reorg/psi/sfilter1.c (from rev 7905, branches/gs-reorg/src/sfilter1.c)

Copied: branches/gs-reorg/psi/store.h (from rev 7905, branches/gs-reorg/src/store.h)

Copied: branches/gs-reorg/psi/winint.mak (from rev 7905, branches/gs-reorg/src/winint.mak)

Copied: branches/gs-reorg/psi/zalg.c (from rev 7905, branches/gs-reorg/src/zalg.c)

Copied: branches/gs-reorg/psi/zarith.c (from rev 7905, branches/gs-reorg/src/zarith.c)

Copied: branches/gs-reorg/psi/zarray.c (from rev 7905, branches/gs-reorg/src/zarray.c)

Copied: branches/gs-reorg/psi/zbfont.c (from rev 7905, branches/gs-reorg/src/zbfont.c)

Copied: branches/gs-reorg/psi/zbseq.c (from rev 7905, branches/gs-reorg/src/zbseq.c)

Copied: branches/gs-reorg/psi/zcfont.c (from rev 7905, branches/gs-reorg/src/zcfont.c)

Copied: branches/gs-reorg/psi/zchar.c (from rev 7905, branches/gs-reorg/src/zchar.c)

Copied: branches/gs-reorg/psi/zchar1.c (from rev 7905, branches/gs-reorg/src/zchar1.c)

Copied: branches/gs-reorg/psi/zchar2.c (from rev 7905, branches/gs-reorg/src/zchar2.c)

Copied: branches/gs-reorg/psi/zchar32.c (from rev 7905, branches/gs-reorg/src/zchar32.c)

Copied: branches/gs-reorg/psi/zchar42.c (from rev 7905, branches/gs-reorg/src/zchar42.c)

Copied: branches/gs-reorg/psi/zchar42.h (from rev 7905, branches/gs-reorg/src/zchar42.h)

Copied: branches/gs-reorg/psi/zcharout.c (from rev 7905, branches/gs-reorg/src/zcharout.c)

Copied: branches/gs-reorg/psi/zcharx.c (from rev 7905, branches/gs-reorg/src/zcharx.c)

Copied: branches/gs-reorg/psi/zcid.c (from rev 7905, branches/gs-reorg/src/zcid.c)

Copied: branches/gs-reorg/psi/zcidtest.c (from rev 7905, branches/gs-reorg/src/zcidtest.c)

Copied: branches/gs-reorg/psi/zcie.c (from rev 7905, branches/gs-reorg/src/zcie.c)

Copied: branches/gs-reorg/psi/zcolor.c (from rev 7905, branches/gs-reorg/src/zcolor.c)

Copied: branches/gs-reorg/psi/zcolor1.c (from rev 7905, branches/gs-reorg/src/zcolor1.c)

Copied: branches/gs-reorg/psi/zcolor2.c (from rev 7905, branches/gs-reorg/src/zcolor2.c)

Copied: branches/gs-reorg/psi/zcolor3.c (from rev 7905, branches/gs-reorg/src/zcolor3.c)

Copied: branches/gs-reorg/psi/zcontext.c (from rev 7905, branches/gs-reorg/src/zcontext.c)

Copied: branches/gs-reorg/psi/zcontrol.c (from rev 7905, branches/gs-reorg/src/zcontrol.c)

Copied: branches/gs-reorg/psi/zcrd.c (from rev 7905, branches/gs-reorg/src/zcrd.c)

Copied: branches/gs-reorg/psi/zcsdevn.c (from rev 7905, branches/gs-reorg/src/zcsdevn.c)

Copied: branches/gs-reorg/psi/zcsindex.c (from rev 7905, branches/gs-reorg/src/zcsindex.c)

Copied: branches/gs-reorg/psi/zcspixel.c (from rev 7905, branches/gs-reorg/src/zcspixel.c)

Copied: branches/gs-reorg/psi/zcssepr.c (from rev 7905, branches/gs-reorg/src/zcssepr.c)

Copied: branches/gs-reorg/psi/zdevcal.c (from rev 7905, branches/gs-reorg/src/zdevcal.c)

Copied: branches/gs-reorg/psi/zdevice.c (from rev 7905, branches/gs-reorg/src/zdevice.c)

Copied: branches/gs-reorg/psi/zdevice2.c (from rev 7905, branches/gs-reorg/src/zdevice2.c)

Copied: branches/gs-reorg/psi/zdfilter.c (from rev 7905, branches/gs-reorg/src/zdfilter.c)

Copied: branches/gs-reorg/psi/zdict.c (from rev 7905, branches/gs-reorg/src/zdict.c)

Copied: branches/gs-reorg/psi/zdosio.c (from rev 7905, branches/gs-reorg/src/zdosio.c)

Copied: branches/gs-reorg/psi/zdouble.c (from rev 7905, branches/gs-reorg/src/zdouble.c)

Copied: branches/gs-reorg/psi/zdpnext.c (from rev 7905, branches/gs-reorg/src/zdpnext.c)

Copied: branches/gs-reorg/psi/zdps.c (from rev 7905, branches/gs-reorg/src/zdps.c)

Copied: branches/gs-reorg/psi/zdps1.c (from rev 7905, branches/gs-reorg/src/zdps1.c)

Copied: branches/gs-reorg/psi/zdscpars.c (from rev 7905, branches/gs-reorg/src/zdscpars.c)

Copied: branches/gs-reorg/psi/zfapi.c (from rev 7905, branches/gs-reorg/src/zfapi.c)

Copied: branches/gs-reorg/psi/zfarc4.c (from rev 7905, branches/gs-reorg/src/zfarc4.c)

Copied: branches/gs-reorg/psi/zfbcp.c (from rev 7905, branches/gs-reorg/src/zfbcp.c)

Copied: branches/gs-reorg/psi/zfcid.c (from rev 7905, branches/gs-reorg/src/zfcid.c)

Copied: branches/gs-reorg/psi/zfcid0.c (from rev 7905, branches/gs-reorg/src/zfcid0.c)

Copied: branches/gs-reorg/psi/zfcid1.c (from rev 7905, branches/gs-reorg/src/zfcid1.c)

Copied: branches/gs-reorg/psi/zfcmap.c (from rev 7905, branches/gs-reorg/src/zfcmap.c)

Copied: branches/gs-reorg/psi/zfdctd.c (from rev 7905, branches/gs-reorg/src/zfdctd.c)

Copied: branches/gs-reorg/psi/zfdcte.c (from rev 7905, branches/gs-reorg/src/zfdcte.c)

Copied: branches/gs-reorg/psi/zfdecode.c (from rev 7905, branches/gs-reorg/src/zfdecode.c)

Copied: branches/gs-reorg/psi/zfile.c (from rev 7905, branches/gs-reorg/src/zfile.c)

Copied: branches/gs-reorg/psi/zfile1.c (from rev 7905, branches/gs-reorg/src/zfile1.c)

Copied: branches/gs-reorg/psi/zfileio.c (from rev 7905, branches/gs-reorg/src/zfileio.c)

Copied: branches/gs-reorg/psi/zfilter.c (from rev 7905, branches/gs-reorg/src/zfilter.c)

Copied: branches/gs-reorg/psi/zfilter2.c (from rev 7905, branches/gs-reorg/src/zfilter2.c)

Copied: branches/gs-reorg/psi/zfilterx.c (from rev 7905, branches/gs-reorg/src/zfilterx.c)

Copied: branches/gs-reorg/psi/zfimscale.c (from rev 7905, branches/gs-reorg/src/zfimscale.c)

Copied: branches/gs-reorg/psi/zfjbig2.c (from rev 7905, branches/gs-reorg/src/zfjbig2.c)

Copied: branches/gs-reorg/psi/zfjpx.c (from rev 7905, branches/gs-reorg/src/zfjpx.c)

Copied: branches/gs-reorg/psi/zfmd5.c (from rev 7905, branches/gs-reorg/src/zfmd5.c)

Copied: branches/gs-reorg/psi/zfont.c (from rev 7905, branches/gs-reorg/src/zfont.c)

Copied: branches/gs-reorg/psi/zfont0.c (from rev 7905, branches/gs-reorg/src/zfont0.c)

Copied: branches/gs-reorg/psi/zfont1.c (from rev 7905, branches/gs-reorg/src/zfont1.c)

Copied: branches/gs-reorg/psi/zfont2.c (from rev 7905, branches/gs-reorg/src/zfont2.c)

Copied: branches/gs-reorg/psi/zfont32.c (from rev 7905, branches/gs-reorg/src/zfont32.c)

Copied: branches/gs-reorg/psi/zfont42.c (from rev 7905, branches/gs-reorg/src/zfont42.c)

Copied: branches/gs-reorg/psi/zfontenum.c (from rev 7905, branches/gs-reorg/src/zfontenum.c)

Copied: branches/gs-reorg/psi/zfproc.c (from rev 7905, branches/gs-reorg/src/zfproc.c)

Copied: branches/gs-reorg/psi/zfrsd.c (from rev 7905, branches/gs-reorg/src/zfrsd.c)

Copied: branches/gs-reorg/psi/zfsample.c (from rev 7905, branches/gs-reorg/src/zfsample.c)

Copied: branches/gs-reorg/psi/zfunc.c (from rev 7905, branches/gs-reorg/src/zfunc.c)

Copied: branches/gs-reorg/psi/zfunc0.c (from rev 7905, branches/gs-reorg/src/zfunc0.c)

Copied: branches/gs-reorg/psi/zfunc3.c (from rev 7905, branches/gs-reorg/src/zfunc3.c)

Copied: branches/gs-reorg/psi/zfunc4.c (from rev 7905, branches/gs-reorg/src/zfunc4.c)

Copied: branches/gs-reorg/psi/zfzlib.c (from rev 7905, branches/gs-reorg/src/zfzlib.c)

Copied: branches/gs-reorg/psi/zgeneric.c (from rev 7905, branches/gs-reorg/src/zgeneric.c)

Copied: branches/gs-reorg/psi/zgstate.c (from rev 7905, branches/gs-reorg/src/zgstate.c)

Copied: branches/gs-reorg/psi/zhsb.c (from rev 7905, branches/gs-reorg/src/zhsb.c)

Copied: branches/gs-reorg/psi/zht.c (from rev 7905, branches/gs-reorg/src/zht.c)

Copied: branches/gs-reorg/psi/zht1.c (from rev 7905, branches/gs-reorg/src/zht1.c)

Copied: branches/gs-reorg/psi/zht2.c (from rev 7905, branches/gs-reorg/src/zht2.c)

Copied: branches/gs-reorg/psi/zht2.h (from rev 7905, branches/gs-reorg/src/zht2.h)

Copied: branches/gs-reorg/psi/zicc.c (from rev 7905, branches/gs-reorg/src/zicc.c)

Copied: branches/gs-reorg/psi/zimage.c (from rev 7905, branches/gs-reorg/src/zimage.c)

Copied: branches/gs-reorg/psi/zimage2.c (from rev 7905, branches/gs-reorg/src/zimage2.c)

Copied: branches/gs-reorg/psi/zimage3.c (from rev 7905, branches/gs-reorg/src/zimage3.c)

Copied: branches/gs-reorg/psi/ziodev.c (from rev 7905, branches/gs-reorg/src/ziodev.c)

Copied: branches/gs-reorg/psi/ziodev2.c (from rev 7905, branches/gs-reorg/src/ziodev2.c)

Copied: branches/gs-reorg/psi/ziodevs.c (from rev 7905, branches/gs-reorg/src/ziodevs.c)

Copied: branches/gs-reorg/psi/ziodevsc.c (from rev 7905, branches/gs-reorg/src/ziodevsc.c)

Copied: branches/gs-reorg/psi/zmath.c (from rev 7905, branches/gs-reorg/src/zmath.c)

Copied: branches/gs-reorg/psi/zmatrix.c (from rev 7905, branches/gs-reorg/src/zmatrix.c)

Copied: branches/gs-reorg/psi/zmedia2.c (from rev 7905, branches/gs-reorg/src/zmedia2.c)

Copied: branches/gs-reorg/psi/zmisc.c (from rev 7905, branches/gs-reorg/src/zmisc.c)

Copied: branches/gs-reorg/psi/zmisc1.c (from rev 7905, branches/gs-reorg/src/zmisc1.c)

Copied: branches/gs-reorg/psi/zmisc2.c (from rev 7905, branches/gs-reorg/src/zmisc2.c)

Copied: branches/gs-reorg/psi/zmisc3.c (from rev 7905, branches/gs-reorg/src/zmisc3.c)

Copied: branches/gs-reorg/psi/zncdummy.c (from rev 7905, branches/gs-reorg/src/zncdummy.c)

Copied: branches/gs-reorg/psi/zpacked.c (from rev 7905, branches/gs-reorg/src/zpacked.c)

Copied: branches/gs-reorg/psi/zpaint.c (from rev 7905, branches/gs-reorg/src/zpaint.c)

Copied: branches/gs-reorg/psi/zpath.c (from rev 7905, branches/gs-reorg/src/zpath.c)

Copied: branches/gs-reorg/psi/zpath1.c (from rev 7905, branches/gs-reorg/src/zpath1.c)

Copied: branches/gs-reorg/psi/zpcolor.c (from rev 7905, branches/gs-reorg/src/zpcolor.c)

Copied: branches/gs-reorg/psi/zrelbit.c (from rev 7905, branches/gs-reorg/src/zrelbit.c)

Copied: branches/gs-reorg/psi/zrop.c (from rev 7905, branches/gs-reorg/src/zrop.c)

Copied: branches/gs-reorg/psi/zshade.c (from rev 7905, branches/gs-reorg/src/zshade.c)

Copied: branches/gs-reorg/psi/zstack.c (from rev 7905, branches/gs-reorg/src/zstack.c)

Copied: branches/gs-reorg/psi/zstring.c (from rev 7905, branches/gs-reorg/src/zstring.c)

Copied: branches/gs-reorg/psi/zsysvm.c (from rev 7905, branches/gs-reorg/src/zsysvm.c)

Copied: branches/gs-reorg/psi/ztoken.c (from rev 7905, branches/gs-reorg/src/ztoken.c)

Copied: branches/gs-reorg/psi/ztrans.c (from rev 7905, branches/gs-reorg/src/ztrans.c)

Copied: branches/gs-reorg/psi/ztrap.c (from rev 7905, branches/gs-reorg/src/ztrap.c)

Copied: branches/gs-reorg/psi/ztype.c (from rev 7905, branches/gs-reorg/src/ztype.c)

Copied: branches/gs-reorg/psi/zupath.c (from rev 7905, branches/gs-reorg/src/zupath.c)

Copied: branches/gs-reorg/psi/zusparam.c (from rev 7905, branches/gs-reorg/src/zusparam.c)

Copied: branches/gs-reorg/psi/zvmem.c (from rev 7905, branches/gs-reorg/src/zvmem.c)

Copied: branches/gs-reorg/psi/zvmem2.c (from rev 7905, branches/gs-reorg/src/zvmem2.c)

Modified: branches/gs-reorg/src/Makefile.in
===================================================================
--- branches/gs-reorg/src/Makefile.in	2007-05-07 19:45:03 UTC (rev 7906)
+++ branches/gs-reorg/src/Makefile.in	2007-05-07 20:29:08 UTC (rev 7907)
@@ -26,7 +26,7 @@
 GLSRCDIR=./src
 GLGENDIR=./obj
 GLOBJDIR=./obj
-PSSRCDIR=./src
+PSSRCDIR=./psi
 PSLIBDIR=./lib
 PSGENDIR=./obj
 PSOBJDIR=./obj

Modified: branches/gs-reorg/src/bcwin32.mak
===================================================================
--- branches/gs-reorg/src/bcwin32.mak	2007-05-07 19:45:03 UTC (rev 7906)
+++ branches/gs-reorg/src/bcwin32.mak	2007-05-07 20:29:08 UTC (rev 7907)
@@ -29,7 +29,7 @@
 GLSRCDIR=src
 GLGENDIR=obj
 GLOBJDIR=obj
-PSSRCDIR=src
+PSSRCDIR=psi
 PSLIBDIR=lib
 PSRESDIR=Resource
 PSGENDIR=obj

Deleted: branches/gs-reorg/src/bfont.h
===================================================================
--- branches/gs-reorg/src/bfont.h	2007-05-07 19:45:03 UTC (rev 7906)
+++ branches/gs-reorg/src/bfont.h	2007-05-07 20:29:08 UTC (rev 7907)
@@ -1,83 +0,0 @@
-/* Copyright (C) 2001-2006 artofcode LLC.
-   All Rights Reserved.
-  
-   This software is provided AS-IS with no warranty, either express or
-   implied.
-
-   This software is distributed under license and may not be copied, modified
-   or distributed except as expressly authorized under the terms of that
-   license.  Refer to licensing information at http://www.artifex.com/
-   or contact Artifex Software, Inc.,  7 Mt. Lassen Drive - Suite A-134,
-   San Rafael, CA  94903, U.S.A., +1(415)492-9861, for further information.
-*/
-
-/* $Id$ */
-/* Interpreter internal routines and data needed for building fonts */
-/* Requires gxfont.h */
-
-#ifndef bfont_INCLUDED
-#  define bfont_INCLUDED
-
-#include "ifont.h"
-
-/* In zfont.c */
-int add_FID(i_ctx_t *i_ctx_p, ref *pfdict, gs_font *pfont,
-	    gs_ref_memory_t *imem);
-
-font_proc_make_font(zdefault_make_font);
-font_proc_make_font(zbase_make_font);
-/* The global font directory */
-extern gs_font_dir *ifont_dir;
-
-/* Structure for passing BuildChar and BuildGlyph procedures. */
-typedef struct build_proc_refs_s {
-    ref BuildChar;
-    ref BuildGlyph;
-} build_proc_refs;
-
-/* Options for collecting parameters from a font dictionary. */
-/* The comment indicates where the option is tested. */
-typedef enum {
-    bf_options_none = 0,
-    bf_Encoding_optional = 1,	/* build_gs_font */
-    bf_UniqueID_ignored = 4,	/* build_gs_simple_font */
-    bf_CharStrings_optional = 8,	/* build_gs_primitive_font */
-    bf_notdef_required = 16	/* build_gs_primitive_font */
-} build_font_options_t;
-
-/* In zbfont.c */
-int build_proc_name_refs(const gs_memory_t *mem, 
-			 build_proc_refs * pbuild,
-			 const char *bcstr, const char *bgstr);
-int build_gs_font_procs(os_ptr, build_proc_refs *);
-#define BUILD_BASE_FONT_PROC(proc)\
-  int proc(i_ctx_t *, os_ptr, gs_font_base **, font_type,\
-	   gs_memory_type_ptr_t, const build_proc_refs *,\
-	   build_font_options_t)
-typedef BUILD_BASE_FONT_PROC((*build_base_font_proc_t));
-BUILD_BASE_FONT_PROC(build_gs_primitive_font);
-int build_gs_FDArray_font(i_ctx_t *, /*const*/ ref *, gs_font_base **,
-			  font_type, gs_memory_type_ptr_t,
-			  const build_proc_refs *);
-int build_gs_outline_font(i_ctx_t *, os_ptr, gs_font_base **, font_type,
-			  gs_memory_type_ptr_t, const build_proc_refs *,
-			  build_font_options_t, build_base_font_proc_t);
-BUILD_BASE_FONT_PROC(build_gs_simple_font);
-void init_gs_simple_font(gs_font_base *pfont, const double bbox[4],
-			 const gs_uid *puid);
-void lookup_gs_simple_font_encoding(gs_font_base *);
-int build_gs_font(i_ctx_t *, os_ptr, gs_font **, font_type,
-		  gs_memory_type_ptr_t, const build_proc_refs *,
-		  build_font_options_t);
-int build_gs_sub_font(i_ctx_t *, const ref *, gs_font **,
-		      font_type, gs_memory_type_ptr_t,
-		      const build_proc_refs *, const ref *, ref *);
-int define_gs_font(gs_font *);
-void get_font_name(const gs_memory_t *mem, ref *pfname, const ref *op);
-void copy_font_name(gs_font_name * pfstr, const ref * pfname);
-gs_glyph zfont_encode_char(gs_font *pfont, gs_char chr, gs_glyph_space_t ignored);
-gs_char gs_font_map_glyph_to_unicode(gs_font *font, gs_glyph glyph);
-const ref *zfont_get_to_unicode_map(gs_font_dir *dir);
-void get_GlyphNames2Unicode(i_ctx_t *i_ctx_p, gs_font *pfont, ref *pdref);
-
-#endif /* bfont_INCLUDED */

Deleted: branches/gs-reorg/src/btoken.h
===================================================================
--- branches/gs-reorg/src/btoken.h	2007-05-07 19:45:03 UTC (rev 7906)
+++ branches/gs-reorg/src/btoken.h	2007-05-07 20:29:08 UTC (rev 7907)
@@ -1,42 +0,0 @@
-/* Copyright (C) 2001-2006 artofcode LLC.
-   All Rights Reserved.
-  
-   This software is provided AS-IS with no warranty, either express or
-   implied.
-
-   This software is distributed under license and may not be copied, modified
-   or distributed except as expressly authorized under the terms of that
-   license.  Refer to licensing information at http://www.artifex.com/
-   or contact Artifex Software, Inc.,  7 Mt. Lassen Drive - Suite A-134,
-   San Rafael, CA  94903, U.S.A., +1(415)492-9861, for further information.
-*/
-
-/* $Id$ */
-/* Definitions for Level 2 binary tokens */
-
-#ifndef btoken_INCLUDED
-#  define btoken_INCLUDED
-
-/*
- * Define accessors for pointers to the system and user name tables
- * (arrays).  Note that these refer implicitly to i_ctx_p.  Note also
- * that these pointers may be NULL: clients must check this.
- */
-#define system_names_p (gs_imemory.space_global->names_array)
-#define user_names_p (gs_imemory.space_local->names_array)
-
-/* Create a system or user name table (in the stable memory of mem). */
-int create_names_array(ref **ppnames, gs_memory_t *mem,
-		       client_name_t cname); /* in zbseq.c */
-
-/* Convert an object to its representation in a binary object sequence. */
-int encode_binary_token(i_ctx_t *i_ctx_p, const ref *obj, long *ref_offset,
-			long *char_offset, byte *str); /* in iscanbin.c */
-
-/* Define the current binary object format for operators. */
-/* This is a ref so that it can be managed properly by save/restore. */
-#define ref_binary_object_format_container i_ctx_p
-#define ref_binary_object_format\
-  (ref_binary_object_format_container->binary_object_format)
-
-#endif /* btoken_INCLUDED */

Deleted: branches/gs-reorg/src/cfonts.mak
===================================================================
--- branches/gs-reorg/src/cfonts.mak	2007-05-07 19:45:03 UTC (rev 7906)
+++ branches/gs-reorg/src/cfonts.mak	2007-05-07 20:29:08 UTC (rev 7907)
@@ -1,486 +0,0 @@
-#  Copyright (C) 2001-2006 artofcode LLC.
-#  All Rights Reserved.
-#
-#  This software is provided AS-IS with no warranty, either express or
-#  implied.
-#
-#  This software is distributed under license and may not be copied, modified
-#  or distributed except as expressly authorized under the terms of that
-#  license.  Refer to licensing information at http://www.artifex.com/
-#  or contact Artifex Software, Inc.,  7 Mt. Lassen Drive - Suite A-134,
-#  San Rafael, CA  94903, U.S.A., +1(415)492-9861, for further information.
-#
-# $Id$
-# Makefile for compiling PostScript Type 1 fonts into C.
-# For more information about fonts, consult the Fontmap file,
-# and also Fonts.htm.
-# Users of this makefile must define the following:
-#	PSSRCDIR - the source directory holding ccfont.h
-#	PSGENDIR - the directory for files generated during building
-#	PSOBJDIR - the object code directory
-
-# Define the name of this makefile.
-CFONTS_MAK=$(PSSRC)cfonts.mak
-
-# ---------------- End of editable definitions ---------------- #
-
-#CCFONT is defined in int.mak
-
-CFGENDIR=$(PSGENDIR)
-CFOBJDIR=$(PSOBJDIR)
-
-CFGEN=$(CFGENDIR)$(D)
-CFOBJ=$(CFOBJDIR)$(D)
-
-CFCC=$(CC_) $(I_)$(PSSRCDIR)$(_I) $(I_)$(PSOBJDIR)$(_I)
-CFO_=$(O_)$(CFOBJ)
-
-# Define how to invoke the font2c program.
-F2CTMP=$(PSGEN)font2c.tmp
-F2CDEP=$(MAKEFILE) $(F2CTMP)
-
-$(F2CTMP) : $(MAKEFILE) $(CFONTS_MAK) $(ECHOGS_XE)
-	$(EXP)$(ECHOGS_XE) -w $(F2CTMP) -l -q -u -DNODISPLAY -s -u -DWRITESYSTEMDICT
-	$(EXP)$(ECHOGS_XE) -a $(F2CTMP) - -- $(PSLIBDIR)$(D)font2c.ps
-
-FONT2C=$(BUILD_TIME_GS) @$(F2CTMP)
-
-# ---------------------------------------------------------------- #
-
-# This file supports two slightly different font sets:
-# the de facto commercial standard set of 35 PostScript fonts, and a slightly
-# larger set distributed with the free version of the software.
-
-fonts_standard_o : \
-AvantGarde_o Bookman_o Courier_o \
-Helvetica_o NewCenturySchlbk_o Palatino_o \
-TimesRoman_o Symbol_o ZapfChancery_o ZapfDingbats_o
-	$(NO_OP)
-
-fonts_standard_c : \
-AvantGarde_c Bookman_c Courier_c \
-Helvetica_c NewCenturySchlbk_c Palatino_c \
-TimesRoman_c Symbol_c ZapfChancery_c ZapfDingbats_c
-	$(NO_OP)
-
-fonts_free_o : fonts_standard_o \
-CharterBT_o Cyrillic_o Kana_o Utopia_o
-	$(NO_OP)
-
-fonts_free_c : fonts_standard_c \
-CharterBT_c Cyrillic_c Kana_c Utopia_c
-	$(NO_OP)
-
-# ---------------------------------------------------------------- #
-#                                                                  #
-#                         Standard 35 fonts                        #
-#                                                                  #
-# ---------------------------------------------------------------- #
-
-# By convention, the names of the 35 standard compiled fonts use '0' for
-# the foundry name.  This allows users to substitute different foundries
-# without having to change this makefile.
-
-# ---------------- Avant Garde ----------------
-
-AvantGarde_c : $(CFGEN)0agk.c $(CFGEN)0agko.c $(CFGEN)0agd.c $(CFGEN)0agdo.c
-	$(NO_OP)
-
-$(CFGEN)0agk.c : $(F2CDEP)
-	$(FONT2C) $(Q)AvantGarde-Book$(Q) $(CFGEN)0agk.c agk
-
-$(CFGEN)0agko.c : $(F2CDEP)
-	$(FONT2C) $(Q)AvantGarde-BookOblique$(Q) $(CFGEN)0agko.c agko
-
-$(CFGEN)0agd.c : $(F2CDEP)
-	$(FONT2C) $(Q)AvantGarde-Demi$(Q) $(CFGEN)0agd.c agd
-
-$(CFGEN)0agdo.c : $(F2CDEP)
-	$(FONT2C) $(Q)AvantGarde-DemiOblique$(Q) $(CFGEN)0agdo.c agdo
-
-AvantGarde_o : $(CFOBJ)0agk.$(OBJ) $(CFOBJ)0agko.$(OBJ) $(CFOBJ)0agd.$(OBJ) $(CFOBJ)0agdo.$(OBJ)
-	$(NO_OP)
-
-$(CFOBJ)0agk.$(OBJ) : $(CFGEN)0agk.c $(CCFONT)
-	$(CFCC) $(CFO_)0agk.$(OBJ) $(C_) $(CFGEN)0agk.c
-
-$(CFOBJ)0agko.$(OBJ) : $(CFGEN)0agko.c $(CCFONT)
-	$(CFCC) $(CFO_)0agko.$(OBJ) $(C_) $(CFGEN)0agko.c
-
-$(CFOBJ)0agd.$(OBJ) : $(CFGEN)0agd.c $(CCFONT)
-	$(CFCC) $(CFO_)0agd.$(OBJ) $(C_) $(CFGEN)0agd.c
-
-$(CFOBJ)0agdo.$(OBJ) : $(CFGEN)0agdo.c $(CCFONT)
-	$(CFCC) $(CFO_)0agdo.$(OBJ) $(C_) $(CFGEN)0agdo.c
-
-# ---------------- Bookman ----------------
-
-Bookman_c : $(CFGEN)0bkl.c $(CFGEN)0bkli.c $(CFGEN)0bkd.c $(CFGEN)0bkdi.c
-	$(NO_OP)
-
-$(CFGEN)0bkl.c : $(F2CDEP)
-	$(FONT2C) $(Q)Bookman-Light$(Q) $(CFGEN)0bkl.c bkl
-
-$(CFGEN)0bkli.c : $(F2CDEP)
-	$(FONT2C) $(Q)Bookman-LightItalic$(Q) $(CFGEN)0bkli.c bkli
-
-$(CFGEN)0bkd.c : $(F2CDEP)
-	$(FONT2C) $(Q)Bookman-Demi$(Q) $(CFGEN)0bkd.c bkd
-
-$(CFGEN)0bkdi.c : $(F2CDEP)
-	$(FONT2C) $(Q)Bookman-DemiItalic$(Q) $(CFGEN)0bkdi.c bkdi
-
-Bookman_o : $(CFOBJ)0bkl.$(OBJ) $(CFOBJ)0bkli.$(OBJ) $(CFOBJ)0bkd.$(OBJ) $(CFOBJ)0bkdi.$(OBJ)
-	$(NO_OP)
-
-$(CFOBJ)0bkl.$(OBJ) : $(CFGEN)0bkl.c $(CCFONT)
-	$(CFCC) $(CFO_)0bkl.$(OBJ) $(C_) $(CFGEN)0bkl.c
-
-$(CFOBJ)0bkli.$(OBJ) : $(CFGEN)0bkli.c $(CCFONT)
-	$(CFCC) $(CFO_)0bkli.$(OBJ) $(C_) $(CFGEN)0bkli.c
-
-$(CFOBJ)0bkd.$(OBJ) : $(CFGEN)0bkd.c $(CCFONT)
-	$(CFCC) $(CFO_)0bkd.$(OBJ) $(C_) $(CFGEN)0bkd.c
-
-$(CFOBJ)0bkdi.$(OBJ) : $(CFGEN)0bkdi.c $(CCFONT)
-	$(CFCC) $(CFO_)0bkdi.$(OBJ) $(C_) $(CFGEN)0bkdi.c
-
-# ---------------- Courier ----------------
-
-Courier_c : $(CFGEN)0crr.c $(CFGEN)0cri.c $(CFGEN)0crb.c $(CFGEN)0crbi.c
-	$(NO_OP)
-
-$(CFGEN)0crr.c : $(F2CDEP)
-	$(FONT2C) $(Q)Courier$(Q) $(CFGEN)0crr.c crr
-
-$(CFGEN)0cri.c : $(F2CDEP)
-	$(FONT2C) $(Q)Courier-Italic$(Q) $(CFGEN)0cri.c cri
-
-$(CFGEN)0crb.c : $(F2CDEP)
-	$(FONT2C) $(Q)Courier-Bold$(Q) $(CFGEN)0crb.c crb
-
-$(CFGEN)0crbi.c : $(F2CDEP)
-	$(FONT2C) $(Q)Courier-BoldItalic$(Q) $(CFGEN)0crbi.c crbi
-
-Courier_o : $(CFOBJ)0crr.$(OBJ) $(CFOBJ)0cri.$(OBJ) $(CFOBJ)0crb.$(OBJ) $(CFOBJ)0crbi.$(OBJ)
-	$(NO_OP)
-
-$(CFOBJ)0crr.$(OBJ) : $(CFGEN)0crr.c $(CCFONT)
-	$(CFCC) $(CFO_)0crr.$(OBJ) $(C_) $(CFGEN)0crr.c
-
-$(CFOBJ)0cri.$(OBJ) : $(CFGEN)0cri.c $(CCFONT)
-	$(CFCC) $(CFO_)0cri.$(OBJ) $(C_) $(CFGEN)0cri.c
-
-$(CFOBJ)0crb.$(OBJ) : $(CFGEN)0crb.c $(CCFONT)
-	$(CFCC) $(CFO_)0crb.$(OBJ) $(C_) $(CFGEN)0crb.c
-
-$(CFOBJ)0crbi.$(OBJ) : $(CFGEN)0crbi.c $(CCFONT)
-	$(CFCC) $(CFO_)0crbi.$(OBJ) $(C_) $(CFGEN)0crbi.c
-
-# ---------------- Helvetica ----------------
-
-Helvetica_c : $(CFGEN)0hvr.c $(CFGEN)0hvro.c \
-$(CFGEN)0hvb.c $(CFGEN)0hvbo.c $(CFGEN)0hvrrn.c \
-$(CFGEN)0hvrorn.c $(CFGEN)0hvbrn.c $(CFGEN)0hvborn.c
-	$(NO_OP)
-
-$(CFGEN)0hvr.c : $(F2CDEP)
-	$(FONT2C) $(Q)Helvetica$(Q) $(CFGEN)0hvr.c hvr
-
-$(CFGEN)0hvro.c : $(F2CDEP)
-	$(FONT2C) $(Q)Helvetica-Oblique$(Q) $(CFGEN)0hvro.c hvro
-
-$(CFGEN)0hvb.c : $(F2CDEP)
-	$(FONT2C) $(Q)Helvetica-Bold$(Q) $(CFGEN)0hvb.c hvb
-
-$(CFGEN)0hvbo.c : $(F2CDEP)
-	$(FONT2C) $(Q)Helvetica-BoldOblique$(Q) $(CFGEN)0hvbo.c hvbo
-
-$(CFGEN)0hvrrn.c : $(F2CDEP)
-	$(FONT2C) $(Q)Helvetica-Narrow$(Q) $(CFGEN)0hvrrn.c hvrrn
-
-$(CFGEN)0hvrorn.c : $(F2CDEP)
-	$(FONT2C) $(Q)Helvetica-Narrow-Oblique$(Q) $(CFGEN)0hvrorn.c hvrorn
-
-$(CFGEN)0hvbrn.c : $(F2CDEP)
-	$(FONT2C) $(Q)Helvetica-Narrow-Bold$(Q) $(CFGEN)0hvbrn.c hvbrn
-
-$(CFGEN)0hvborn.c : $(F2CDEP)
-	$(FONT2C) $(Q)Helvetica-Narrow-BoldOblique$(Q) $(CFGEN)0hvborn.c hvborn
-
-Helvetica_o : $(CFOBJ)0hvr.$(OBJ) $(CFOBJ)0hvro.$(OBJ) $(CFOBJ)0hvb.$(OBJ) $(CFOBJ)0hvbo.$(OBJ) \
-$(CFOBJ)0hvrrn.$(OBJ) $(CFOBJ)0hvrorn.$(OBJ) $(CFOBJ)0hvbrn.$(OBJ) $(CFOBJ)0hvborn.$(OBJ)
-	$(NO_OP)
-
-$(CFOBJ)0hvr.$(OBJ) : $(CFGEN)0hvr.c $(CCFONT)
-	$(CFCC) $(CFO_)0hvr.$(OBJ) $(C_) $(CFGEN)0hvr.c
-
-$(CFOBJ)0hvro.$(OBJ) : $(CFGEN)0hvro.c $(CCFONT)
-	$(CFCC) $(CFO_)0hvro.$(OBJ) $(C_) $(CFGEN)0hvro.c
-
-$(CFOBJ)0hvb.$(OBJ) : $(CFGEN)0hvb.c $(CCFONT)
-	$(CFCC) $(CFO_)0hvb.$(OBJ) $(C_) $(CFGEN)0hvb.c
-
-$(CFOBJ)0hvbo.$(OBJ) : $(CFGEN)0hvbo.c $(CCFONT)
-	$(CFCC) $(CFO_)0hvbo.$(OBJ) $(C_) $(CFGEN)0hvbo.c
-
-$(CFOBJ)0hvrrn.$(OBJ) : $(CFGEN)0hvrrn.c $(CCFONT)
-	$(CFCC) $(CFO_)0hvrrn.$(OBJ) $(C_) $(CFGEN)0hvrrn.c
-
-$(CFOBJ)0hvrorn.$(OBJ) : $(CFGEN)0hvrorn.c $(CCFONT)
-	$(CFCC) $(CFO_)0hvrorn.$(OBJ) $(C_) $(CFGEN)0hvrorn.c
-
-$(CFOBJ)0hvbrn.$(OBJ) : $(CFGEN)0hvbrn.c $(CCFONT)
-	$(CFCC) $(CFO_)0hvbrn.$(OBJ) $(C_) $(CFGEN)0hvbrn.c
-
-$(CFOBJ)0hvborn.$(OBJ) : $(CFGEN)0hvborn.c $(CCFONT)
-	$(CFCC) $(CFO_)0hvborn.$(OBJ) $(C_) $(CFGEN)0hvborn.c
-
-# ---------------- New Century Schoolbook ----------------
-
-NewCenturySchlbk_c : $(CFGEN)0ncr.c $(CFGEN)0ncri.c $(CFGEN)0ncb.c \
-$(CFGEN)0ncbi.c
-	$(NO_OP)
-
-$(CFGEN)0ncr.c : $(F2CDEP)
-	$(FONT2C) $(Q)NewCenturySchlbk-Roman$(Q) $(CFGEN)0ncr.c ncr
-
-$(CFGEN)0ncri.c : $(F2CDEP)
-	$(FONT2C) $(Q)NewCenturySchlbk-Italic$(Q) $(CFGEN)0ncri.c ncri
-
-$(CFGEN)0ncb.c : $(F2CDEP)
-	$(FONT2C) $(Q)NewCenturySchlbk-Bold$(Q) $(CFGEN)0ncb.c ncb
-
-$(CFGEN)0ncbi.c : $(F2CDEP)
-	$(FONT2C) $(Q)NewCenturySchlbk-BoldItalic$(Q) $(CFGEN)0ncbi.c ncbi
-
-NewCenturySchlbk_o : $(CFOBJ)0ncr.$(OBJ) $(CFOBJ)0ncri.$(OBJ) $(CFOBJ)0ncb.$(OBJ) $(CFOBJ)0ncbi.$(OBJ)
-	$(NO_OP)
-
-$(CFOBJ)0ncr.$(OBJ) : $(CFGEN)0ncr.c $(CCFONT)
-	$(CFCC) $(CFO_)0ncr.$(OBJ) $(C_) $(CFGEN)0ncr.c
-
-$(CFOBJ)0ncri.$(OBJ) : $(CFGEN)0ncri.c $(CCFONT)
-	$(CFCC) $(CFO_)0ncri.$(OBJ) $(C_) $(CFGEN)0ncri.c
-
-$(CFOBJ)0ncb.$(OBJ) : $(CFGEN)0ncb.c $(CCFONT)
-	$(CFCC) $(CFO_)0ncb.$(OBJ) $(C_) $(CFGEN)0ncb.c
-
-$(CFOBJ)0ncbi.$(OBJ) : $(CFGEN)0ncbi.c $(CCFONT)
-	$(CFCC) $(CFO_)0ncbi.$(OBJ) $(C_) $(CFGEN)0ncbi.c
-
-# ---------------- Palatino ----------------
-
-Palatino_c : $(CFGEN)0plr.c $(CFGEN)0plri.c $(CFGEN)0plb.c $(CFGEN)0plbi.c
-	$(NO_OP)
-
-$(CFGEN)0plr.c : $(F2CDEP)
-	$(FONT2C) $(Q)Palatino-Roman$(Q) $(CFGEN)0plr.c plr
-
-$(CFGEN)0plri.c : $(F2CDEP)
-	$(FONT2C) $(Q)Palatino-Italic$(Q) $(CFGEN)0plri.c plri
-
-$(CFGEN)0plb.c : $(F2CDEP)
-	$(FONT2C) $(Q)Palatino-Bold$(Q) $(CFGEN)0plb.c plb
-
-$(CFGEN)0plbi.c : $(F2CDEP)
-	$(FONT2C) $(Q)Palatino-BoldItalic$(Q) $(CFGEN)0plbi.c plbi
-
-Palatino_o : $(CFOBJ)0plr.$(OBJ) $(CFOBJ)0plri.$(OBJ) $(CFOBJ)0plb.$(OBJ) $(CFOBJ)0plbi.$(OBJ)
-	$(NO_OP)
-
-$(CFOBJ)0plr.$(OBJ) : $(CFGEN)0plr.c $(CCFONT)
-	$(CFCC) $(CFO_)0plr.$(OBJ) $(C_) $(CFGEN)0plr.c
-
-$(CFOBJ)0plri.$(OBJ) : $(CFGEN)0plri.c $(CCFONT)
-	$(CFCC) $(CFO_)0plri.$(OBJ) $(C_) $(CFGEN)0plri.c
-
-$(CFOBJ)0plb.$(OBJ) : $(CFGEN)0plb.c $(CCFONT)
-	$(CFCC) $(CFO_)0plb.$(OBJ) $(C_) $(CFGEN)0plb.c
-
-$(CFOBJ)0plbi.$(OBJ) : $(CFGEN)0plbi.c $(CCFONT)
-	$(CFCC) $(CFO_)0plbi.$(OBJ) $(C_) $(CFGEN)0plbi.c
-
-# ---------------- Times Roman ----------------
-
-TimesRoman_c : $(CFGEN)0tmr.c $(CFGEN)0tmri.c $(CFGEN)0tmb.c $(CFGEN)0tmbi.c
-	$(NO_OP)
-
-$(CFGEN)0tmr.c : $(F2CDEP)
-	$(FONT2C) $(Q)Times-Roman$(Q) $(CFGEN)0tmr.c tmr
-
-$(CFGEN)0tmri.c : $(F2CDEP)
-	$(FONT2C) $(Q)Times-Italic$(Q) $(CFGEN)0tmri.c tmri
-
-$(CFGEN)0tmb.c : $(F2CDEP)
-	$(FONT2C) $(Q)Times-Bold$(Q) $(CFGEN)0tmb.c tmb
-
-$(CFGEN)0tmbi.c : $(F2CDEP)
-	$(FONT2C) $(Q)Times-BoldItalic$(Q) $(CFGEN)0tmbi.c tmbi
-
-TimesRoman_o : $(CFOBJ)0tmr.$(OBJ) $(CFOBJ)0tmri.$(OBJ) $(CFOBJ)0tmb.$(OBJ) $(CFOBJ)0tmbi.$(OBJ)
-	$(NO_OP)
-
-$(CFOBJ)0tmr.$(OBJ) : $(CFGEN)0tmr.c $(CCFONT)
-	$(CFCC) $(CFO_)0tmr.$(OBJ) $(C_) $(CFGEN)0tmr.c
-
-$(CFOBJ)0tmri.$(OBJ) : $(CFGEN)0tmri.c $(CCFONT)
-	$(CFCC) $(CFO_)0tmri.$(OBJ) $(C_) $(CFGEN)0tmri.c
-
-$(CFOBJ)0tmb.$(OBJ) : $(CFGEN)0tmb.c $(CCFONT)
-	$(CFCC) $(CFO_)0tmb.$(OBJ) $(C_) $(CFGEN)0tmb.c
-
-$(CFOBJ)0tmbi.$(OBJ) : $(CFGEN)0tmbi.c $(CCFONT)
-	$(CFCC) $(CFO_)0tmbi.$(OBJ) $(C_) $(CFGEN)0tmbi.c
-
-# ---------------- Symbol ----------------
-
-Symbol_c : $(CFGEN)0syr.c
-	$(NO_OP)
-
-$(CFGEN)0syr.c : $(F2CDEP)
-	$(FONT2C) $(Q)Symbol$(Q) $(CFGEN)0syr.c syr
-
-Symbol_o : $(CFOBJ)0syr.$(OBJ)
-	$(NO_OP)
-
-$(CFOBJ)0syr.$(OBJ) : $(CFGEN)0syr.c $(CCFONT)
-	$(CFCC) $(CFO_)0syr.$(OBJ) $(C_) $(CFGEN)0syr.c
-
-# ---------------- Zapf Chancery ----------------
-
-ZapfChancery_c : $(CFGEN)0zcmi.c
-	$(NO_OP)
-
-$(CFGEN)0zcmi.c : $(F2CDEP)
-	$(FONT2C) $(Q)ZapfChancery-MediumItalic$(Q) $(CFGEN)0zcmi.c zcmi
-
-ZapfChancery_o : $(CFOBJ)0zcmi.$(OBJ)
-	$(NO_OP)
-
-$(CFOBJ)0zcmi.$(OBJ) : $(CFGEN)0zcmi.c $(CCFONT)
-	$(CFCC) $(CFO_)0zcmi.$(OBJ) $(C_) $(CFGEN)0zcmi.c
-
-# ---------------- Zapf Dingbats ----------------
-
-ZapfDingbats_c : $(CFGEN)0zdr.c
-	$(NO_OP)
-
-$(CFGEN)0zdr.c : $(F2CDEP)
-	$(FONT2C) $(Q)ZapfDingbats$(Q) $(CFGEN)0zdr.c zdr
-
-ZapfDingbats_o : $(CFOBJ)0zdr.$(OBJ)
-	$(NO_OP)
-
-$(CFOBJ)0zdr.$(OBJ) : $(CFGEN)0zdr.c $(CCFONT)
-	$(CFCC) $(CFO_)0zdr.$(OBJ) $(C_) $(CFGEN)0zdr.c
-
-# ---------------------------------------------------------------- #
-#                                                                  #
-#                         Additional fonts                         #
-#                                                                  #
-# ---------------------------------------------------------------- #
-
-# ---------------- Bitstream Charter ----------------
-
-CharterBT_c : $(CFGEN)bchr.c $(CFGEN)bchri.c $(CFGEN)bchb.c $(CFGEN)bchbi.c
-	$(NO_OP)
-
-$(CFGEN)bchr.c : $(F2CDEP)
-	$(FONT2C) $(Q)Charter-Roman$(Q) $(CFGEN)bchr.c chr
-
-$(CFGEN)bchri.c : $(F2CDEP)
-	$(FONT2C) $(Q)Charter-Italic$(Q) $(CFGEN)bchri.c chri
-
-$(CFGEN)bchb.c : $(F2CDEP)
-	$(FONT2C) $(Q)Charter-Bold$(Q) $(CFGEN)bchb.c chb
-
-$(CFGEN)bchbi.c : $(F2CDEP)
-	$(FONT2C) $(Q)Charter-BoldItalic$(Q) $(CFGEN)bchbi.c chbi
-
-CharterBT_o : $(CFOBJ)bchr.$(OBJ) $(CFOBJ)bchri.$(OBJ) $(CFOBJ)bchb.$(OBJ) $(CFOBJ)bchbi.$(OBJ)
-	$(NO_OP)
-
-$(CFOBJ)bchr.$(OBJ) : $(CFGEN)bchr.c $(CCFONT)
-	$(CFCC) $(CFO_)bchr.$(OBJ) $(C_) $(CFGEN)bchr.c
-
-$(CFOBJ)bchri.$(OBJ) : $(CFGEN)bchri.c $(CCFONT)
-	$(CFCC) $(CFO_)bchri.$(OBJ) $(C_) $(CFGEN)bchri.c
-
-$(CFOBJ)bchb.$(OBJ) : $(CFGEN)bchb.c $(CCFONT)
-	$(CFCC) $(CFO_)bchb.$(OBJ) $(C_) $(CFGEN)bchb.c
-
-$(CFOBJ)bchbi.$(OBJ) : $(CFGEN)bchbi.c $(CCFONT)
-	$(CFCC) $(CFO_)bchbi.$(OBJ) $(C_) $(CFGEN)bchbi.c
-
-# ---------------- Cyrillic ----------------
-
-Cyrillic_c : $(CFGEN)fcyr.c $(CFGEN)fcyri.c
-	$(NO_OP)
-
-$(CFGEN)fcyr.c : $(F2CDEP)
-	$(FONT2C) $(Q)Cyrillic$(Q) $(CFGEN)fcyr.c fcyr
-
-$(CFGEN)fcyri.c : $(F2CDEP)
-	$(FONT2C) $(Q)Cyrillic-Italic$(Q) $(CFGEN)fcyri.c fcyri
-
-Cyrillic_o : $(CFOBJ)fcyr.$(OBJ) $(CFOBJ)fcyri.$(OBJ)
-	$(NO_OP)
-
-$(CFOBJ)fcyr.$(OBJ) : $(CFGEN)fcyr.c $(CCFONT)
-	$(CFCC) $(CFO_)fcyr.$(OBJ) $(C_) $(CFGEN)fcyr.c
-
-$(CFOBJ)fcyri.$(OBJ) : $(CFGEN)fcyri.c $(CCFONT)
-	$(CFCC) $(CFO_)fcyri.$(OBJ) $(C_) $(CFGEN)fcyri.c
-
-# ---------------- Kana ----------------
-
-Kana_c : $(CFGEN)fhirw.c $(CFGEN)fkarw.c
-	$(NO_OP)
-
-$(CFGEN)fhirw.c : $(F2CDEP)
-	$(FONT2C) $(Q)Calligraphic-Hiragana$(Q) $(CFGEN)fhirw.c fhirw
-
-$(CFGEN)fkarw.c : $(F2CDEP)
-	$(FONT2C) $(Q)Calligraphic-Katakana$(Q) $(CFGEN)fkarw.c fkarw
-
-Kana_o : $(CFOBJ)fhirw.$(OBJ) $(CFOBJ)fkarw.$(OBJ)
-	$(NO_OP)
-
-$(CFOBJ)fhirw.$(OBJ) : $(CFGEN)fhirw.c $(CCFONT)
-	$(CFCC) $(CFO_)fhirw.$(OBJ) $(C_) $(CFGEN)fhirw.c
-
-$(CFOBJ)fkarw.$(OBJ) : $(CFGEN)fkarw.c $(CCFONT)
-	$(CFCC) $(CFO_)fkarw.$(OBJ) $(C_) $(CFGEN)fkarw.c
-
-# ---------------- Utopia ----------------
-
-Utopia_c : $(CFGEN)putr.c $(CFGEN)putri.c $(CFGEN)putb.c $(CFGEN)putbi.c
-	$(NO_OP)
-
-$(CFGEN)putr.c : $(F2CDEP)
-	$(FONT2C) $(Q)Utopia-Regular$(Q) $(CFGEN)putr.c utr
-
-$(CFGEN)putri.c : $(F2CDEP)
-	$(FONT2C) $(Q)Utopia-Italic$(Q) $(CFGEN)putri.c utri
-
-$(CFGEN)putb.c : $(F2CDEP)
-	$(FONT2C) $(Q)Utopia-Bold$(Q) $(CFGEN)putb.c utb
-
-$(CFGEN)putbi.c : $(F2CDEP)
-	$(FONT2C) $(Q)Utopia-BoldItalic$(Q) $(CFGEN)putbi.c utbi
-
-Utopia_o : $(CFOBJ)putr.$(OBJ) $(CFOBJ)putri.$(OBJ) $(CFOBJ)putb.$(OBJ) $(CFOBJ)putbi.$(OBJ)
-	$(NO_OP)
-
-$(CFOBJ)putr.$(OBJ) : $(CFGEN)putr.c $(CCFONT)
-	$(CFCC) $(CFO_)putr.$(OBJ) $(C_) $(CFGEN)putr.c
-
-$(CFOBJ)putri.$(OBJ) : $(CFGEN)putri.c $(CCFONT)
-	$(CFCC) $(CFO_)putri.$(OBJ) $(C_) $(CFGEN)putri.c
-
-$(CFOBJ)putb.$(OBJ) : $(CFGEN)putb.c $(CCFONT)
-	$(CFCC) $(CFO_)putb.$(OBJ) $(C_) $(CFGEN)putb.c
-
-$(CFOBJ)putbi.$(OBJ) : $(CFGEN)putbi.c $(CCFONT)
-	$(CFCC) $(CFO_)putbi.$(OBJ) $(C_) $(CFGEN)putbi.c

Deleted: branches/gs-reorg/src/dscparse.c
===================================================================
--- branches/gs-reorg/src/dscparse.c	2007-05-07 19:45:03 UTC (rev 7906)
+++ branches/gs-reorg/src/dscparse.c	2007-05-07 20:29:08 UTC (rev 7907)
@@ -1,4489 +0,0 @@
-/* Copyright (C) 2001-2006 artofcode LLC.
-   All Rights Reserved.
-  
-   This software is provided AS-IS with no warranty, either express or
-   implied.
-
-   This software is distributed under license and may not be copied, modified
-   or distributed except as expressly authorized under the terms of that
-   license.  Refer to licensing information at http://www.artifex.com/
-   or contact Artifex Software, Inc.,  7 Mt. Lassen Drive - Suite A-134,
-   San Rafael, CA  94903, U.S.A., +1(415)492-9861, for further information.
-*/
-
-/* $Id$ */
-
-/*
- * This is a DSC parser, based on the DSC 3.0 spec, 
- * with a few DSC 2.1 additions for page size.
- *
- * Current limitations:
- * %%+ may be used after any comment in the comment or trailer, 
- * but is currently only supported by
- *   %%DocumentMedia
- *
- * DSC 2.1 additions (discontinued in DSC 3.0):
- * %%DocumentPaperColors: 
- * %%DocumentPaperForms: 
- * %%DocumentPaperSizes: 
- * %%DocumentPaperWeights: 
- * %%PaperColor:   (ignored)
- * %%PaperForm:    (ignored)
- * %%PaperSize: 
- * %%PaperWeight:  (ignored)
- *
- * Other additions for defaults or page section
- % %%ViewingOrientation: xx xy yx yy
-*/
-
-#include <stdio.h>	/* for sprintf(), not file I/O */
-#include <stdlib.h>
-#include <string.h>
-#include <ctype.h>
-
-#define MAXSTR 256
-
-#include "dscparse.h"
-
-/* Macros for comparing string literals
- * For maximum speed, the length of the second macro argument is
- * computed at compile time.
- * THE SECOND MACRO ARGUMENT MUST BE A STRING LITERAL.
- */
-#define COMPARE(p,str) (strncmp((const char *)(p), (str), sizeof(str)-1)==0)
-#define IS_DSC(line, str) (COMPARE((line), (str)))
-
-/* Macros for comparing the first one or two characters */
-#define IS_WHITE(ch) (((ch)==' ') || ((ch)=='\t'))
-#define IS_EOL(ch) (((ch)=='\r') || ((ch)=='\n'))
-#define IS_WHITE_OR_EOL(ch) (IS_WHITE(ch) || IS_EOL(ch))
-#define IS_BLANK(str) (IS_EOL(str[0]))
-#define NOT_DSC_LINE(str) (((str)[0]!='%') || ((str)[1]!='%'))
-
-/* Macros for document offset to start and end of line */
-#define DSC_START(dsc)  ((dsc)->data_offset + (dsc)->data_index - (dsc)->line_length)
-#define DSC_END(dsc)  ((dsc)->data_offset + (dsc)->data_index)
-
-/* dsc_scan_SECTION() functions return one of 
- * CDSC_ERROR, CDSC_OK, CDSC_NOTDSC 
- * or one of the following
- */
-/* The line should be passed on to the next section parser. */
-#define CDSC_PROPAGATE	10
-
-/* If document is DOS EPS and we haven't read 30 bytes, ask for more. */
-#define CDSC_NEEDMORE 11
-
-/* local prototypes */
-dsc_private void * dsc_memalloc(CDSC *dsc, size_t size);
-dsc_private void dsc_memfree(CDSC*dsc, void *ptr);
-dsc_private CDSC * dsc_init2(CDSC *dsc);
-dsc_private void dsc_reset(CDSC *dsc);
-dsc_private void dsc_section_join(DSC_OFFSET begin, DSC_OFFSET *pend, DSC_OFFSET **pplast);
-dsc_private int dsc_read_line(CDSC *dsc);
-dsc_private int dsc_read_doseps(CDSC *dsc);
-dsc_private int dsc_read_macbin(CDSC *dsc);
-dsc_private int dsc_read_applesingle(CDSC *dsc);
-dsc_private char * dsc_alloc_string(CDSC *dsc, const char *str, int len);
-dsc_private char * dsc_add_line(CDSC *dsc, const char *line, unsigned int len);
-dsc_private char * dsc_copy_string(char *str, unsigned int slen, 
-    char *line, unsigned int len, unsigned int *offset);
-dsc_private GSDWORD dsc_get_dword(const unsigned char *buf);
-dsc_private GSWORD dsc_get_word(const unsigned char *buf);
-dsc_private GSDWORD dsc_get_bigendian_dword(const unsigned char *buf);
-dsc_private GSWORD dsc_get_bigendian_word(const unsigned char *buf);
-dsc_private int dsc_get_int(const char *line, unsigned int len, unsigned int *offset);
-dsc_private float dsc_get_real(const char *line, unsigned int len, 
-    unsigned int *offset);
-dsc_private void dsc_unknown(CDSC *dsc); 
-dsc_private GSBOOL dsc_is_section(char *line);
-dsc_private int dsc_parse_pages(CDSC *dsc);
-dsc_private int dsc_parse_bounding_box(CDSC *dsc, CDSCBBOX** pbbox, int offset);
-dsc_private int dsc_parse_float_bounding_box(CDSC *dsc, CDSCFBBOX** pfbbox, int offset);
-dsc_private int dsc_parse_orientation(CDSC *dsc, unsigned int *porientation, 
-    int offset);
-dsc_private int dsc_parse_order(CDSC *dsc);
-dsc_private int dsc_parse_media(CDSC *dsc, const CDSCMEDIA **page_media);
-dsc_private int dsc_parse_document_media(CDSC *dsc);
-dsc_private int dsc_parse_viewing_orientation(CDSC *dsc, CDSCCTM **pctm);
-dsc_private int dsc_parse_page(CDSC *dsc);
-dsc_private void dsc_save_line(CDSC *dsc);
-dsc_private int dsc_scan_type(CDSC *dsc);
-dsc_private int dsc_scan_comments(CDSC *dsc);
-dsc_private int dsc_scan_preview(CDSC *dsc);
-dsc_private int dsc_scan_defaults(CDSC *dsc);
-dsc_private int dsc_scan_prolog(CDSC *dsc);
-dsc_private int dsc_scan_setup(CDSC *dsc);
-dsc_private int dsc_scan_page(CDSC *dsc);
-dsc_private int dsc_scan_trailer(CDSC *dsc);
-dsc_private int dsc_error(CDSC *dsc, unsigned int explanation, 
-    char *line, unsigned int line_len);
-dsc_private int dsc_dcs2_fixup(CDSC *dsc);
-dsc_private int dsc_parse_platefile(CDSC *dsc);
-dsc_private int dsc_parse_dcs1plate(CDSC *dsc);
-dsc_private CDSCCOLOUR * dsc_find_colour(CDSC *dsc, const char *colourname);
-dsc_private int dsc_parse_process_colours(CDSC *dsc);
-dsc_private int dsc_parse_custom_colours(CDSC *dsc);
-dsc_private int dsc_parse_cmyk_custom_colour(CDSC *dsc);
-dsc_private int dsc_parse_rgb_custom_colour(CDSC *dsc);
-
-/* DSC error reporting */
-dsc_private const int dsc_severity[] = {
-    CDSC_ERROR_WARN, 	/* CDSC_MESSAGE_BBOX */
-    CDSC_ERROR_WARN, 	/* CDSC_MESSAGE_EARLY_TRAILER */
-    CDSC_ERROR_WARN, 	/* CDSC_MESSAGE_EARLY_EOF */
-    CDSC_ERROR_ERROR, 	/* CDSC_MESSAGE_PAGE_IN_TRAILER */
-    CDSC_ERROR_ERROR, 	/* CDSC_MESSAGE_PAGE_ORDINAL */
-    CDSC_ERROR_ERROR, 	/* CDSC_MESSAGE_PAGES_WRONG */
-    CDSC_ERROR_ERROR, 	/* CDSC_MESSAGE_EPS_NO_BBOX */
-    CDSC_ERROR_ERROR, 	/* CDSC_MESSAGE_EPS_PAGES */
-    CDSC_ERROR_WARN, 	/* CDSC_MESSAGE_NO_MEDIA */
-    CDSC_ERROR_WARN, 	/* CDSC_MESSAGE_ATEND */
-    CDSC_ERROR_INFORM, 	/* CDSC_MESSAGE_DUP_COMMENT */
-    CDSC_ERROR_INFORM, 	/* CDSC_MESSAGE_DUP_TRAILER */
-    CDSC_ERROR_WARN, 	/* CDSC_MESSAGE_BEGIN_END */
-    CDSC_ERROR_INFORM, 	/* CDSC_MESSAGE_BAD_SECTION */
-    CDSC_ERROR_INFORM,  /* CDSC_MESSAGE_LONG_LINE */
-    CDSC_ERROR_WARN, 	/* CDSC_MESSAGE_INCORRECT_USAGE */
-    0
-};
-
-#define DSC_MAX_ERROR ((sizeof(dsc_severity) / sizeof(int))-2)
-
-const CDSCMEDIA dsc_known_media[CDSC_KNOWN_MEDIA] = {
-    /* These sizes taken from Ghostscript gs_statd.ps */
-    {"11x17", 792, 1224, 0, NULL, NULL},
-    {"A3", 842, 1190, 0, NULL, NULL},
-    {"A4", 595, 842, 0, NULL, NULL},
-    {"A5", 421, 595, 0, NULL, NULL},
-    {"B4", 709, 1002, 0, NULL, NULL}, /* ISO, but not Adobe standard */
-    {"B5", 501, 709, 0, NULL, NULL},  /* ISO, but not Adobe standard */
-    {"Ledger", 1224, 792, 0, NULL, NULL},
-    {"Legal", 612, 1008, 0, NULL, NULL},
-    {"Letter", 612, 792, 0, NULL, NULL},
-    {"Note", 612, 792, 0, NULL, NULL},
-    {NULL, 0, 0, 0, NULL, NULL}
-};
-
-/* parser state */
-enum CDSC_SCAN_SECTION {
-    scan_none = 0,
-    scan_comments = 1,
-    scan_pre_preview = 2,
-    scan_preview = 3,
-    scan_pre_defaults = 4,
-    scan_defaults = 5,
-    scan_pre_prolog = 6,
-    scan_prolog = 7,
-    scan_pre_setup = 8,
-    scan_setup = 9,
-    scan_pre_pages = 10,
-    scan_pages = 11,
-    scan_pre_trailer = 12,
-    scan_trailer = 13,
-    scan_eof = 14
-};
-
-static const char * const dsc_scan_section_name[15] = {
- "Type", "Comments", 
- "pre-Preview", "Preview",
- "pre-Defaults", "Defaults",
- "pre-Prolog", "Prolog",
- "pre-Setup", "Setup",
- "pre-Page", "Page",
- "pre-Trailer", "Trailer",
- "EOF"
-};
-
-
-/******************************************************************/
-/* Public functions                                               */
-/******************************************************************/
-
-/* constructor */
-CDSC *
-dsc_init(void *caller_data)
-{
-    CDSC *dsc = (CDSC *)malloc(sizeof(CDSC));
-    if (dsc == NULL)
-	return NULL;
-    memset(dsc, 0, sizeof(CDSC));
-    dsc->caller_data = caller_data;
-    dsc->ref_count = 0;
-    dsc_ref(dsc);
-
-    return dsc_init2(dsc);
-}
-
-/* constructor, with caller supplied memalloc */
-CDSC *
-dsc_init_with_alloc(
-    void *caller_data,
-    void *(*memalloc)(size_t size, void *closure_data),
-    void (*memfree)(void *ptr, void *closure_data),
-    void *closure_data)
-{
-    CDSC *dsc = (CDSC *)memalloc(sizeof(CDSC), closure_data);
-    if (dsc == NULL)
-	return NULL;
-    memset(dsc, 0, sizeof(CDSC));
-    dsc->caller_data = caller_data;
-
-    dsc->memalloc = memalloc;
-    dsc->memfree = memfree;
-    dsc->mem_closure_data = closure_data;
-    dsc->ref_count = 0;
-    dsc_ref(dsc);
-    
-    return dsc_init2(dsc);
-}
-
-
-
-/* destructor */
-void 
-dsc_free(CDSC *dsc)
-{
-    if (dsc == NULL)
-	return;
-    dsc_reset(dsc);
-    dsc_memfree(dsc, dsc);
-}
-
-
-CDSC *
-dsc_new(void *caller_data)
-{
-    return dsc_init(caller_data);
-}
-
-int
-dsc_ref(CDSC *dsc)
-{
-    return ++(dsc->ref_count);
-}
-
-int 
-dsc_unref(CDSC *dsc)
-{
-    if (dsc->ref_count <= 0)
-	return -1;
-    dsc->ref_count--;
-    if (dsc->ref_count == 0) {
-	dsc_free(dsc);
-	return 0;
-    }
-    return dsc->ref_count;
-}
-
-
-/* Tell DSC parser how long document will be, to allow ignoring
- * of early %%Trailer and %%EOF.  This is optional.
- */
-void 
-dsc_set_length(CDSC *dsc, DSC_OFFSET len)
-{
-    dsc->file_length = len;
-}
-
-/* Process a buffer containing DSC comments and PostScript */
-/* Return value is < 0 for error, >=0 for OK.
- *  CDSC_ERROR
- *  CDSC_OK
- *  CDSC_NOTDSC (DSC will be ignored)
- *  other values indicate the last DSC comment read
- */ 
-int
-dsc_scan_data(CDSC *dsc, const char *data, int length)
-{
-    int bytes_read;
-    int code = 0;
-
-    if (dsc == NULL)
-	return CDSC_ERROR;
-
-    if (dsc->id == CDSC_NOTDSC)
-	return CDSC_NOTDSC;
-    dsc->id = CDSC_OK;
-    if (dsc->eof)
-	return CDSC_OK;	/* ignore */
-
-    if (length == 0) {
-	/* EOF, so process what remains */
-	dsc->eof = TRUE;
-    }
-
-    do {
-	if (dsc->id == CDSC_NOTDSC)
-	    break;
-
-	if (length != 0) {
-	    /* move existing data if needed */
-	    if (dsc->data_length > CDSC_DATA_LENGTH/2) {
-		memmove(dsc->data, dsc->data + dsc->data_index,
-		    dsc->data_length - dsc->data_index);
-		dsc->data_offset += dsc->data_index;
-		dsc->data_length -= dsc->data_index;
-		dsc->data_index = 0;
-	    }
-	    /* append to buffer */
-	    bytes_read = min(length, (int)(CDSC_DATA_LENGTH - dsc->data_length));
-	    memcpy(dsc->data + dsc->data_length, data, bytes_read);
-	    dsc->data_length += bytes_read;
-	    data += bytes_read;
-	    length -= bytes_read;
-	}
-	if (dsc->scan_section == scan_none) {
-	    code = dsc_scan_type(dsc);
-	    if (code == CDSC_NEEDMORE) {
-		/* need more characters before we can identify type */
-		code = CDSC_OK;
-		break;
-	    }
-	    dsc->id = code;
-	}
-
-        if (code == CDSC_NOTDSC) {
-	    dsc->id = CDSC_NOTDSC;
-	    break;
-	}
-
-	while ((code = dsc_read_line(dsc)) > 0) {
-	    if (dsc->id == CDSC_NOTDSC)
-		break;
-	    if (dsc->file_length && 
-		(dsc->data_offset + dsc->data_index > dsc->file_length)) {
-		/* have read past end of where we need to parse. */
-		return CDSC_OK;	/* ignore */
-	    }
-	    if (dsc->doseps_end && 
-		(dsc->data_offset + dsc->data_index > dsc->doseps_end)) {
-		/* have read past end of DOS EPS or Mac Binary 
-		 * PostScript section
-		 */
-		return CDSC_OK;	/* ignore */
-	    }
-	    if (dsc->eof)
-		return CDSC_OK;
-	    if (dsc->skip_document)
-		continue;	/* embedded document */
-	    if (dsc->skip_lines)
-		continue;	/* embedded lines */
-	    if (IS_DSC(dsc->line, "%%BeginData:"))
-		continue;
-	    if (IS_DSC(dsc->line, "%%BeginBinary:"))
-		continue;
-	    if (IS_DSC(dsc->line, "%%EndDocument"))
-		continue;
-	    if (IS_DSC(dsc->line, "%%EndData"))
-		continue;
-	    if (IS_DSC(dsc->line, "%%EndBinary"))
-		continue;
-
-	    do {
-		switch (dsc->scan_section) {
-		    case scan_comments:
-			code = dsc_scan_comments(dsc);
-			break;
-		    case scan_pre_preview:
-		    case scan_preview:
-			code = dsc_scan_preview(dsc);
-			break;
-		    case scan_pre_defaults:
-		    case scan_defaults:
-			code = dsc_scan_defaults(dsc);
-			break;
-		    case scan_pre_prolog:
-		    case scan_prolog:
-			code = dsc_scan_prolog(dsc);
-			break;
-		    case scan_pre_setup:
-		    case scan_setup:
-			code = dsc_scan_setup(dsc);
-			break;
-		    case scan_pre_pages:
-		    case scan_pages:
-			code = dsc_scan_page(dsc);
-			break;
-		    case scan_pre_trailer:
-		    case scan_trailer:
-			code = dsc_scan_trailer(dsc);
-			break;
-		    case scan_eof:
-			code = CDSC_OK;
-			break;
-		    default:
-			/* invalid state */
-			code = CDSC_ERROR;
-		}
-		/* repeat if line is start of next section */
-	    } while (code == CDSC_PROPAGATE);
-
-	    /* if DOS EPS header not complete, ask for more */
-	    if (code == CDSC_NEEDMORE) {
-		code = CDSC_OK;
-		break;
-	    }
-	    if (code == CDSC_NOTDSC) {
-		dsc->id = CDSC_NOTDSC;
-		break;
-	    }
-	}
-    } while (length != 0);
-
-    return (code < 0) ? code : dsc->id;
-}
-
-/* Tidy up from incorrect DSC comments */
-int 
-dsc_fixup(CDSC *dsc)
-{
-    unsigned int i;
-    char buf[32];
-    DSC_OFFSET *last;
-
-    if (dsc->id == CDSC_NOTDSC)
-	return 0;
-
-    /* flush last partial line */
-    dsc_scan_data(dsc, NULL, 0);
-
-
-    /* Fix DSC error: EOF before end of %%BeginData */
-    if (dsc->eof && 
-	(dsc->skip_lines || dsc->skip_bytes || dsc->skip_document)) {
-	switch (dsc->scan_section) {
-	    case scan_comments:
-		dsc->endcomments = DSC_END(dsc);
-		break;
-	    case scan_preview:
-		dsc->endpreview = DSC_END(dsc);
-		break;
-	    case scan_defaults:
-		dsc->enddefaults = DSC_END(dsc);
-		break;
-	    case scan_prolog:
-		dsc->endprolog = DSC_END(dsc);
-		break;
-	    case scan_setup:
-		dsc->endsetup = DSC_END(dsc);
-		break;
-	    case scan_pages:
-		if (dsc->page_count)
-		    dsc->page[dsc->page_count-1].end = DSC_END(dsc);
-		break;
-	    case scan_trailer:
-	    case scan_eof:
-		dsc->endtrailer = DSC_END(dsc);
-		break;
-	}
-    }
-    
-    /* Fix DSC error: code between %%EndSetup and %%Page */
-    if (dsc->page_count && (dsc->page[0].begin != dsc->endsetup)
-		&& (dsc->endsetup != dsc->beginsetup)) {
-	dsc->endsetup = dsc->page[0].begin;
-	dsc_debug_print(dsc, "Warning: code included between setup and first page\n");
-    }
-
-    /* Last page contained a false trailer, */
-    /* so extend last page to start of trailer */
-    if (dsc->page_count && (dsc->begintrailer != 0) &&
-	(dsc->page[dsc->page_count-1].end != dsc->begintrailer)) {
-	dsc_debug_print(dsc, "Ignoring earlier misplaced trailer\n");
-	dsc_debug_print(dsc, "and extending last page to start of trailer\n"); 
-	dsc->page[dsc->page_count-1].end = dsc->begintrailer;
-    }
-
-    /* 
-     * Join up all sections.
-     * There might be extra code between them, or we might have
-     * missed including the \n which followed \r.
-     */
-    last = &dsc->endcomments;
-    dsc_section_join(dsc->beginpreview, &dsc->endpreview, &last);
-    dsc_section_join(dsc->begindefaults, &dsc->enddefaults, &last);
-    dsc_section_join(dsc->beginprolog, &dsc->endprolog, &last);
-    dsc_section_join(dsc->beginsetup, &dsc->endsetup, &last);
-    for (i=0; i<dsc->page_count; i++)
-	dsc_section_join(dsc->page[i].begin, &dsc->page[i].end, &last);
-    if (dsc->begintrailer)
-	*last = dsc->begintrailer;
-	
-    if ((dsc->page_pages == 0) && (dsc->page_count == 1)) {
-	/* don't flag an error if %%Pages absent but one %%Page found */
-	/* adjust incorrect page count */
-	dsc->page_pages = dsc->page_count;
-    }
-
-    /* Warnings and Errors that we can now identify */
-    if ((dsc->page_count != dsc->page_pages)) {
-	int rc = dsc_error(dsc, CDSC_MESSAGE_PAGES_WRONG, NULL, 0);
-	switch (rc) {
-	    case CDSC_RESPONSE_OK:
-		/* adjust incorrect page count */
-		dsc->page_pages = dsc->page_count;
-		break;
-	    case CDSC_RESPONSE_CANCEL:
-		break;;
-	    case CDSC_RESPONSE_IGNORE_ALL:
-		return CDSC_NOTDSC;
-	}
-    }
-
-    if (dsc->epsf && (dsc->bbox == (CDSCBBOX *)NULL)) {
-	/* EPS files MUST include a BoundingBox */
-	int rc = dsc_error(dsc, CDSC_MESSAGE_EPS_NO_BBOX, NULL, 0);
-	switch (rc) {
-	    case CDSC_RESPONSE_OK:
-		/* Assume that it is EPS */
-		break;
-	    case CDSC_RESPONSE_CANCEL:
-		/* Is NOT an EPS file */
-		dsc->epsf = FALSE;
-	    case CDSC_RESPONSE_IGNORE_ALL:
-		return CDSC_NOTDSC;
-	}
-    }
-
-    if (dsc->epsf && ((dsc->page_count > 1) || (dsc->page_pages > 1))) {
-	int rc = dsc_error(dsc, CDSC_MESSAGE_EPS_PAGES, NULL, 0);
-	switch (rc) {
-	    case CDSC_RESPONSE_OK:
-		/* Is an EPS file */
-		break;
-	    case CDSC_RESPONSE_CANCEL:
-		/* Is NOT an EPS file */
-		dsc->epsf = FALSE;
-		break;
-	    case CDSC_RESPONSE_IGNORE_ALL:
-		return CDSC_NOTDSC;
-	}
-    }
-
-    /* convert single file DSC 2.0 into multiple pages */
-    dsc_dcs2_fixup(dsc);
-
-    if ((dsc->media_count == 1) && (dsc->page_media == NULL)) {
-	/* if one only media was specified, and default page media */
-	/* was not specified, assume that default is the only media. */
-	dsc->page_media = dsc->media[0];
-    }
-
-    if ((dsc->media_count != 0) && (dsc->page_media == NULL)) {
-	int rc = dsc_error(dsc, CDSC_MESSAGE_NO_MEDIA, NULL, 0);
-	switch (rc) {
-	    case CDSC_RESPONSE_OK:
-		/* default media is first listed */
-		dsc->page_media = dsc->media[0];
-		break;
-	    case CDSC_RESPONSE_CANCEL:
-		/* No default media */
-		break;
-	    case CDSC_RESPONSE_IGNORE_ALL:
-		return CDSC_NOTDSC;
-	}
-    }
-
-    /* make sure all pages have a label */
-    for (i=0; i<dsc->page_count; i++) {
-	if (strlen(dsc->page[i].label) == 0) {
-	    sprintf(buf, "%d", i+1);
-	    if ((dsc->page[i].label = dsc_alloc_string(dsc, buf, (int)strlen(buf))) 
-		== (char *)NULL)
-		return CDSC_ERROR;	/* no memory */
-	}
-    }
-    return CDSC_OK;
-}
-
-/* Install a function to be used for displaying messages about 
- * DSC errors and warnings, and to request advice from user.
- * Installing an error function is optional.
- */
-void 
-dsc_set_error_function(CDSC *dsc, 
-	int (*fn)(void *caller_data, CDSC *dsc, 
-	unsigned int explanation, const char *line, unsigned int line_len))
-{
-    dsc->dsc_error_fn = fn;
-}
-
-
-/* Install a function for printing debug messages */
-/* This is optional */
-void 
-dsc_set_debug_function(CDSC *dsc, 
-	void (*debug_fn)(void *caller_data, const char *str))
-{
-    dsc->debug_print_fn = debug_fn;
-}
-
-/* Doesn't need to be public for PostScript documents */
-/* Made public so GSview can add pages when processing PDF files */
-int 
-dsc_add_page(CDSC *dsc, int ordinal, char *label)
-{
-    dsc->page[dsc->page_count].ordinal = ordinal;
-    dsc->page[dsc->page_count].label = 
-	dsc_alloc_string(dsc, label, (int)strlen(label)+1);
-    dsc->page[dsc->page_count].begin = 0;
-    dsc->page[dsc->page_count].end = 0;
-    dsc->page[dsc->page_count].orientation = CDSC_ORIENT_UNKNOWN;
-    dsc->page[dsc->page_count].media = NULL;
-    dsc->page[dsc->page_count].bbox = NULL;
-    dsc->page[dsc->page_count].viewing_orientation = NULL;
-    dsc->page[dsc->page_count].crop_box = NULL;
-
-    dsc->page_count++;
-    if (dsc->page_count >= dsc->page_chunk_length) {
-	CDSCPAGE *new_page = (CDSCPAGE *)dsc_memalloc(dsc, 
-	    (CDSC_PAGE_CHUNK+dsc->page_count) * sizeof(CDSCPAGE));
-	if (new_page == NULL)
-	    return CDSC_ERROR;	/* out of memory */
-	memcpy(new_page, dsc->page, 
-	    dsc->page_count * sizeof(CDSCPAGE));
-	dsc_memfree(dsc, dsc->page);
-	dsc->page= new_page;
-	dsc->page_chunk_length = CDSC_PAGE_CHUNK+dsc->page_count;
-    }
-    return CDSC_OK;
-}
-
-/* Doesn't need to be public for PostScript documents */
-/* Made public so GSview can store PDF MediaBox */
-int
-dsc_add_media(CDSC *dsc, CDSCMEDIA *media)
-{
-    CDSCMEDIA **newmedia_array;
-    CDSCMEDIA *newmedia;
-
-    /* extend media array  */
-    newmedia_array = (CDSCMEDIA **)dsc_memalloc(dsc, 
-	(dsc->media_count + 1) * sizeof(CDSCMEDIA *));
-    if (newmedia_array == NULL)
-	return CDSC_ERROR;	/* out of memory */
-    if (dsc->media != NULL) {
-	memcpy(newmedia_array, dsc->media, 
-	    dsc->media_count * sizeof(CDSCMEDIA *));
-	dsc_memfree(dsc, dsc->media);
-    }
-    dsc->media = newmedia_array;
-
-    /* allocate new media */
-    newmedia = dsc->media[dsc->media_count] =
-	(CDSCMEDIA *)dsc_memalloc(dsc, sizeof(CDSCMEDIA));
-    if (newmedia == NULL)
-	return CDSC_ERROR;	/* out of memory */
-    newmedia->name = NULL;
-    newmedia->width = 595.0;
-    newmedia->height = 842.0;
-    newmedia->weight = 80.0;
-    newmedia->colour = NULL;
-    newmedia->type = NULL;
-    newmedia->mediabox = NULL;
-
-    dsc->media_count++;
-
-    if (media->name) {
-	newmedia->name = dsc_alloc_string(dsc, media->name,
-	    (int)strlen(media->name));
-	if (newmedia->name == NULL)
-	    return CDSC_ERROR;	/* no memory */
-    }
-    newmedia->width = media->width;
-    newmedia->height = media->height;
-    newmedia->weight = media->weight;
-    if (media->colour) {
-	newmedia->colour = dsc_alloc_string(dsc, media->colour, 
-	    (int)strlen(media->colour));
-        if (newmedia->colour == NULL)
-	    return CDSC_ERROR;	/* no memory */
-    }
-    if (media->type) {
-	newmedia->type = dsc_alloc_string(dsc, media->type, 
-	    (int)strlen(media->type));
-	if (newmedia->type == NULL)
-	    return CDSC_ERROR;	/* no memory */
-    }
-    newmedia->mediabox = NULL;
-
-    if (media->mediabox) {
-	newmedia->mediabox = (CDSCBBOX *)dsc_memalloc(dsc, sizeof(CDSCBBOX));
-	if (newmedia->mediabox == NULL)
-	    return CDSC_ERROR;	/* no memory */
-	*newmedia->mediabox = *media->mediabox;
-    }
-    return CDSC_OK;
-}
-
-/* Doesn't need to be public for PostScript documents */
-/* Made public so GSview can store PDF CropBox */
-int
-dsc_set_page_bbox(CDSC *dsc, unsigned int page_number, 
-    int llx, int lly, int urx, int ury)
-{
-    CDSCBBOX *bbox;
-    if (page_number >= dsc->page_count)
-	return CDSC_ERROR;
-    bbox = dsc->page[page_number].bbox;
-    if (bbox == NULL)
-	dsc->page[page_number].bbox = bbox = 
-	    (CDSCBBOX *)dsc_memalloc(dsc, sizeof(CDSCBBOX));
-    if (bbox == NULL)
-	return CDSC_ERROR;
-    bbox->llx = llx;
-    bbox->lly = lly;
-    bbox->urx = urx;
-    bbox->ury = ury;
-    return CDSC_OK;
-}
-
-
-/******************************************************************/
-/* Private functions below here.                                  */
-/******************************************************************/
-
-dsc_private void *
-dsc_memalloc(CDSC *dsc, size_t size)
-{
-    if (dsc->memalloc)
-	return dsc->memalloc(size, dsc->mem_closure_data);
-    return malloc(size);
-}
-
-dsc_private void
-dsc_memfree(CDSC*dsc, void *ptr)
-{
-    if (dsc->memfree) 
-	dsc->memfree(ptr, dsc->mem_closure_data);
-    else
-	free(ptr);
-}
-
-/* private constructor */
-dsc_private CDSC *
-dsc_init2(CDSC *dsc)
-{
-    dsc_reset(dsc);
-
-    dsc->string_head = (CDSCSTRING *)dsc_memalloc(dsc, sizeof(CDSCSTRING));
-    if (dsc->string_head == NULL) {
-	dsc_free(dsc);
-	return NULL;	/* no memory */
-    }
-    dsc->string = dsc->string_head;
-    dsc->string->next = NULL;
-    dsc->string->data = (char *)dsc_memalloc(dsc, CDSC_STRING_CHUNK);
-    if (dsc->string->data == NULL) {
-	dsc_free(dsc);
-	return NULL;	/* no memory */
-    }
-    dsc->string->index = 0;
-    dsc->string->length = CDSC_STRING_CHUNK;
-	
-    dsc->page = (CDSCPAGE *)dsc_memalloc(dsc, CDSC_PAGE_CHUNK * sizeof(CDSCPAGE));
-    if (dsc->page == NULL) {
-	dsc_free(dsc);
-	return NULL;	/* no memory */
-    }
-    dsc->page_chunk_length = CDSC_PAGE_CHUNK;
-    dsc->page_count = 0;
-	
-    dsc->line = NULL;
-    dsc->data_length = 0;
-    dsc->data_index = dsc->data_length;
-
-    return dsc;
-}
-
-
-dsc_private void 
-dsc_reset(CDSC *dsc)
-{
-    unsigned int i;
-    /* Clear public members */
-    dsc->dsc = FALSE;
-    dsc->ctrld = FALSE;
-    dsc->pjl = FALSE;
-    dsc->epsf = FALSE;
-    dsc->pdf = FALSE;
-    dsc->epsf = FALSE;
-    dsc->preview = CDSC_NOPREVIEW;
-    dsc->dsc_version = NULL;	/* stored in dsc->string */
-    dsc->language_level = 0;
-    dsc->document_data = CDSC_DATA_UNKNOWN;
-    dsc->begincomments = 0;
-    dsc->endcomments = 0;
-    dsc->beginpreview = 0;
-    dsc->endpreview = 0;
-    dsc->begindefaults = 0;
-    dsc->enddefaults = 0;
-    dsc->beginprolog = 0;
-    dsc->endprolog = 0;
-    dsc->beginsetup = 0;
-    dsc->endsetup = 0;
-    dsc->begintrailer = 0;
-    dsc->endtrailer = 0;
-	
-    for (i=0; i<dsc->page_count; i++) {
-	/* page media is pointer to an element of media or dsc_known_media */
-	/* do not free it. */
-
-	if (dsc->page[i].bbox)
-	    dsc_memfree(dsc, dsc->page[i].bbox);
-	if (dsc->page[i].viewing_orientation)
-	    dsc_memfree(dsc, dsc->page[i].viewing_orientation);
-	if (dsc->page[i].crop_box)
-	    dsc_memfree(dsc, dsc->page[i].crop_box);
-    }
-    if (dsc->page)
-	dsc_memfree(dsc, dsc->page);
-    dsc->page = NULL;
-	
-    dsc->page_count = 0;
-    dsc->page_pages = 0;
-    dsc->page_order = CDSC_ORDER_UNKNOWN;
-    dsc->page_orientation = CDSC_ORIENT_UNKNOWN;
-    if (dsc->viewing_orientation)
-	dsc_memfree(dsc, dsc->viewing_orientation);
-    dsc->viewing_orientation = NULL;
-	
-    if (dsc->media) {
-	for (i=0; i<dsc->media_count; i++) {
-	    if (dsc->media[i]) {
-		if (dsc->media[i]->mediabox)
-		    dsc_memfree(dsc, dsc->media[i]->mediabox);
-		dsc_memfree(dsc, dsc->media[i]);
-	    }
-	}
-	dsc_memfree(dsc, dsc->media);
-    }
-    dsc->media_count = 0;
-    dsc->media = NULL;
-
-    /* page_media is pointer to an element of media or dsc_known_media */
-    /* do not free it. */
-    dsc->page_media = NULL;
-
-    if (dsc->bbox)
-	dsc_memfree(dsc, dsc->bbox);
-    dsc->bbox = NULL;
-    if (dsc->page_bbox)
-	dsc_memfree(dsc, dsc->page_bbox);
-    dsc->page_bbox = NULL;
-    if (dsc->doseps)
-	dsc_memfree(dsc, dsc->doseps);
-    dsc->doseps = NULL;
-	
-    dsc->dsc_title = NULL;
-    dsc->dsc_creator = NULL;
-    dsc->dsc_date = NULL;
-    dsc->dsc_for = NULL;
-	
-
-    dsc->max_error = DSC_MAX_ERROR;
-    dsc->severity = dsc_severity;
-
-    /* Clear private members */
-    /* Don't touch dsc->caller_data */
-    dsc->id = CDSC_OK;
-    dsc->scan_section = scan_none;
-    dsc->doseps_end = 0;
-    dsc->page_chunk_length = 0;
-    dsc->file_length = 0;
-    dsc->skip_document = 0;
-    dsc->skip_bytes = 0;
-    dsc->skip_lines = 0;
-    dsc->skip_pjl = 0;
-    dsc->begin_font_count = 0;
-    dsc->begin_feature_count = 0;
-    dsc->begin_resource_count = 0;
-    dsc->begin_procset_count = 0;
-
-    dsc->data_length = 0;
-    dsc->data_index = 0;
-    dsc->data_offset = 0;
-
-    dsc->eof = 0;
-	
-    dsc->line = 0;
-    dsc->line_length = 0;
-    dsc->eol = 0;
-    dsc->last_cr = FALSE;
-    dsc->line_count = 1;
-    dsc->long_line = FALSE;
-    memset(dsc->last_line, 0, sizeof(dsc->last_line));
-
-    dsc->string = dsc->string_head;
-    while (dsc->string != (CDSCSTRING *)NULL) {
-	if (dsc->string->data)
-	    dsc_memfree(dsc, dsc->string->data);
-	dsc->string_head = dsc->string;
-	dsc->string = dsc->string->next;
-	dsc_memfree(dsc, dsc->string_head);
-    }
-    dsc->string_head = NULL;
-    dsc->string = NULL;
-
-    /* don't touch caller functions */
-
-    /* public data */
-    if (dsc->hires_bbox)
-	dsc_memfree(dsc, dsc->hires_bbox);
-    dsc->hires_bbox = NULL;
-    if (dsc->crop_box)
-	dsc_memfree(dsc, dsc->crop_box);
-    dsc->crop_box = NULL;
-
-    if (dsc->dcs2) {
-	CDCS2 *this_dcs, *next_dcs;
-	this_dcs = dsc->dcs2;
-	while (this_dcs) {
-	    next_dcs = this_dcs->next;
-	    /* strings have already been freed */
-	    dsc_memfree(dsc, this_dcs);
-	    this_dcs = next_dcs;
-	}
-	dsc->dcs2 = NULL;
-    }
-    if (dsc->colours) {
-	CDSCCOLOUR *this_colour, *next_colour;
-	this_colour = dsc->colours;
-	while (this_colour) {
-	    next_colour = this_colour->next;
-	    /* strings have already been freed */
-	    dsc_memfree(dsc, this_colour);
-	    this_colour = next_colour;
-	}
-	dsc->colours = NULL;
-    }
-
-    if (dsc->macbin)
-	dsc_memfree(dsc, dsc->macbin);
-    dsc->macbin = NULL;
-}
-
-/* 
-* Join up all sections.
-* There might be extra code between them, or we might have
-* missed including the \n which followed \r.
-* begin is the start of this section
-* pend is a pointer to the end of this section
-* pplast is a pointer to a pointer of the end of the previous section
-*/
-dsc_private void 
-dsc_section_join(DSC_OFFSET begin, DSC_OFFSET *pend, DSC_OFFSET **pplast)
-{
-    if (begin)
-	**pplast = begin;
-    if (*pend > begin)
-	*pplast = pend;
-}
-
-
-/* return value is 0 if no line available, or length of line */
-dsc_private int
-dsc_read_line(CDSC *dsc)
-{
-    char *p, *last;
-    dsc->line = NULL;
-
-    if (dsc->eof) {
-	/* return all that remains, even if line incomplete */
-	dsc->line = dsc->data + dsc->data_index;
-	dsc->line_length = dsc->data_length - dsc->data_index;
-	dsc->data_index = dsc->data_length;
-	return dsc->line_length;
-    }
-
-    if (dsc->file_length && 
-	(dsc->data_offset + dsc->data_index >= dsc->file_length)) {
-	/* Have read past where we need to parse. */
-	/* Ignore all that remains. */
-	dsc->line = dsc->data + dsc->data_index;
-	dsc->line_length = dsc->data_length - dsc->data_index;
-	dsc->data_index = dsc->data_length;
-	return dsc->line_length;
-
-    }
-    if (dsc->doseps_end && 
-	(dsc->data_offset + dsc->data_index >= dsc->doseps_end)) {
-	/* Have read past end of DOS EPS PostScript section. */
-	/* Ignore all that remains. */
-	dsc->line = dsc->data + dsc->data_index;
-	dsc->line_length = dsc->data_length - dsc->data_index;
-	dsc->data_index = dsc->data_length;
-	return dsc->line_length;
-    }
-
-    /* ignore embedded bytes */
-    if (dsc->skip_bytes) {
-	int cnt = min(dsc->skip_bytes,
-		     (int)(dsc->data_length - dsc->data_index));
-	dsc->skip_bytes -= cnt;
-	dsc->data_index += cnt;
-	if (dsc->skip_bytes != 0)
-	    return 0;
-    }
-
-    do {
-	dsc->line = dsc->data + dsc->data_index;
-	last = dsc->data + dsc->data_length;
-	if (dsc->data_index == dsc->data_length) {
-	    dsc->line_length = 0;
-	    return 0;
-	}
-	if (dsc->eol) {
-	    /* if previous line was complete, increment line count */
-	    dsc->line_count++;
-	    if (dsc->skip_lines)
-		dsc->skip_lines--;
-	}
-	    
-	/* skip over \n which followed \r */
-	if (dsc->last_cr && dsc->line[0] == '\n') {
-	    dsc->data_index++;
-	    dsc->line++;
-	}
-	dsc->last_cr = FALSE;
-
-	/* look for EOL */
-	dsc->eol = FALSE;
-	for (p = dsc->line; p < last; p++) {
-	    if (*p == '\r') {
-		p++;
-		if ((p<last) && (*p == '\n'))
-		    p++;	/* include line feed also */
-		else
-		    dsc->last_cr = TRUE; /* we might need to skip \n */
-		dsc->eol = TRUE;	/* dsc->line is a complete line */
-		break;
-	    }
-	    if (*p == '\n') {
-		p++;
-		dsc->eol = TRUE;	/* dsc->line is a complete line */
-		break;
-	    }
-	    if (*p == '\032') {		/* MS-DOS Ctrl+Z */
-		dsc->eol = TRUE;
-	    }
-	}
-	if (dsc->eol == FALSE) {
-	    /* we haven't got a complete line yet */
-	    if (dsc->data_length - dsc->data_index < sizeof(dsc->data)/2) {
-		/* buffer is less than half full, ask for some more */
-		dsc->line_length = 0;
-		return 0;
-	    }
-	}
-	dsc->data_index += dsc->line_length = (int)(p - dsc->line);
-    } while (dsc->skip_lines && dsc->line_length);
-
-    if (dsc->line_length == 0)
-	return 0;
-	
-    if ((dsc->line[0]=='%') && (dsc->line[1]=='%'))  {
-	/* handle recursive %%BeginDocument */
-	if ((dsc->skip_document) && dsc->line_length &&
-		COMPARE(dsc->line, "%%EndDocument")) {
-	    dsc->skip_document--;
-	}
-
-	/* handle embedded lines or binary data */
-	if (COMPARE(dsc->line, "%%BeginData:")) {
-	    /* %%BeginData: <numberof>[ <type> [ <bytesorlines> ] ] 
-	     * <numberof> ::= <uint> (Lines or physical bytes) 
-	     * <type> ::= Hex | Binary | ASCII (Type of data) 
-	     * <bytesorlines> ::= Bytes | Lines (Read in bytes or lines) 
-	     */
-	    char begindata[MAXSTR+1];
-	    int cnt;
-	    const char *numberof, *bytesorlines;
-	    cnt = dsc->line_length;
-	    if (dsc->line_length > sizeof(begindata)-1)
-		cnt = sizeof(begindata)-1;
-	    memcpy(begindata, dsc->line, cnt);
-	    begindata[cnt] = '\0';
-	    numberof = strtok(begindata+12, " \r\n");
-	    strtok(NULL, " \r\n");	/* dump type */
-	    bytesorlines = strtok(NULL, " \r\n");
-	    if (bytesorlines == NULL)
-		bytesorlines = "Bytes";
-	   
-	    if ( (numberof == NULL) || (bytesorlines == NULL) ) {
-		/* invalid usage of %%BeginData */
-		/* ignore that we ever saw it */
-		int rc = dsc_error(dsc, CDSC_MESSAGE_INCORRECT_USAGE, 
-			    dsc->line, dsc->line_length);
-		switch (rc) {
-		    case CDSC_RESPONSE_OK:
-		    case CDSC_RESPONSE_CANCEL:
-			break;
-		    case CDSC_RESPONSE_IGNORE_ALL:
-			return 0;
-		}
-	    }
-	    else {
-		cnt = atoi(numberof);
-		if (cnt) {
-		    if (bytesorlines && (dsc_stricmp(bytesorlines, "Lines")==0)) {
-			/* skip cnt lines */
-			if (dsc->skip_lines == 0) {
-			    /* we are not already skipping lines */
-			    dsc->skip_lines = cnt+1;
-			}
-		    }
-		    else {
-			/* byte count doesn't includes \n or \r\n  */
-			/* or \r of %%BeginData: */
-			/* skip cnt bytes */
-			if (dsc->skip_bytes == 0) {
-			    /* we are not already skipping lines */
-			    dsc->skip_bytes = cnt;
-			}
-
-		    }
-		}
-	    }
-	}
-	else if (COMPARE(dsc->line, "%%BeginBinary:")) {
-	    /* byte count doesn't includes \n or \r\n or \r of %%BeginBinary:*/
-	    int cnt = dsc_get_int(dsc->line + 14,
-		dsc->line_length - 14, NULL);
-	    if (dsc->skip_bytes == 0) {
-		/* we are not already skipping lines */
-		dsc->skip_bytes = cnt;
-	    }
-	}
-    }
-	
-    if ((dsc->line[0]=='%') && (dsc->line[1]=='%') &&
-	COMPARE(dsc->line, "%%BeginDocument:") ) {
-	/* Skip over embedded document, recursively */
-	dsc->skip_document++;
-    }
-
-    if (!dsc->long_line && (dsc->line_length > DSC_LINE_LENGTH)) {
-	dsc_error(dsc, CDSC_MESSAGE_LONG_LINE, dsc->line, dsc->line_length);
-        dsc->long_line = TRUE;
-    }
-	
-    return dsc->line_length;
-}
-
-
-/* Save last DSC line, for use with %%+ */
-dsc_private void 
-dsc_save_line(CDSC *dsc)
-{
-    int len = min(sizeof(dsc->last_line), dsc->line_length);
-    memcpy(dsc->last_line, dsc->line, len);
-}
-
-/* display unknown DSC line */
-dsc_private void 
-dsc_unknown(CDSC *dsc)
-{
-    if (dsc->debug_print_fn) {
-	char line[DSC_LINE_LENGTH];
-	unsigned int length = min(DSC_LINE_LENGTH-1, dsc->line_length);
-	sprintf(line, "Unknown in %s section at line %d:\n  ", 
-	    dsc_scan_section_name[dsc->scan_section], dsc->line_count);
-	dsc_debug_print(dsc, line);
-	strncpy(line, dsc->line, length);
-	line[length] = '\0';
-	dsc_debug_print(dsc, line);
-	dsc_debug_print(dsc, "\n");
-    }
-}
-
-
-dsc_private GSBOOL
-dsc_is_section(char *line)
-{
-    if ( !((line[0]=='%') && (line[1]=='%')) )
-	return FALSE;
-    if (IS_DSC(line, "%%BeginPreview"))
-	return TRUE;
-    if (IS_DSC(line, "%%BeginDefaults"))
-	return TRUE;
-    if (IS_DSC(line, "%%BeginProlog"))
-	return TRUE;
-    if (IS_DSC(line, "%%BeginSetup"))
-	return TRUE;
-    if (IS_DSC(line, "%%Page:"))
-	return TRUE;
-    if (IS_DSC(line, "%%Trailer"))
-	return TRUE;
-    if (IS_DSC(line, "%%EOF"))
-	return TRUE;
-    return FALSE;
-}
-
-/* Get little-endian DWORD, used for DOS EPS files */
-dsc_private GSDWORD
-dsc_get_dword(const unsigned char *buf)
-{
-    GSDWORD dw;
-    dw = (GSDWORD)buf[0];
-    dw += ((GSDWORD)buf[1])<<8;
-    dw += ((GSDWORD)buf[2])<<16;
-    dw += ((GSDWORD)buf[3])<<24;
-    return dw;
-}
-
-dsc_private GSWORD
-dsc_get_word(const unsigned char *buf)
-{
-    GSWORD w;
-    w = (GSWORD)buf[0];
-    w |= (GSWORD)(buf[1]<<8);
-    return w;
-}
-
-/* Get big-endian DWORD, used for Mac Binary files */
-dsc_private GSDWORD
-dsc_get_bigendian_dword(const unsigned char *buf)
-{
-    GSDWORD dw;
-    dw = (GSDWORD)buf[3];
-    dw += ((GSDWORD)buf[2])<<8;
-    dw += ((GSDWORD)buf[1])<<16;
-    dw += ((GSDWORD)buf[0])<<24;
-    return dw;
-}
-
-dsc_private GSWORD
-dsc_get_bigendian_word(const unsigned char *buf)
-{
-    GSWORD w;
-    w = (GSWORD)buf[1];
-    w |= (GSWORD)(buf[0]<<8);
-    return w;
-}
-
-dsc_private int
-dsc_read_doseps(CDSC *dsc)
-{
-    unsigned char *line = (unsigned char *)dsc->line;
-    if ((dsc->doseps = (CDSCDOSEPS *)dsc_memalloc(dsc, sizeof(CDSCDOSEPS))) == NULL)
-	return CDSC_ERROR;	/* no memory */
-	
-    dsc->doseps->ps_begin = dsc_get_dword(line+4);
-    dsc->doseps->ps_length = dsc_get_dword(line+8);
-    dsc->doseps->wmf_begin = dsc_get_dword(line+12);
-    dsc->doseps->wmf_length = dsc_get_dword(line+16);
-    dsc->doseps->tiff_begin = dsc_get_dword(line+20);
-    dsc->doseps->tiff_length = dsc_get_dword(line+24);
-    dsc->doseps->checksum = dsc_get_word(line+28);
-
-    if (dsc->file_length && 
-	(dsc->doseps->ps_begin + dsc->doseps->ps_length > dsc->file_length)) {
-	/* Error in DOS EPS header.
-	 * Some files have been seen with a fixed large value as 
-	 * the length of the PostScript section.
-	 * Correct for these erroneous files.
-	 */
-	 dsc->doseps->ps_length = 
-	    (GSDWORD)(dsc->file_length - dsc->doseps->ps_begin);
-    }
-
-    dsc->doseps_end = dsc->doseps->ps_begin + dsc->doseps->ps_length;
-
-    /* move data_index backwards to byte after doseps header */
-    dsc->data_index -= dsc->line_length - 30;
-    /* we haven't read a line of PostScript code yet */
-    dsc->line_count = 0;
-    /* skip from current position to start of PostScript section */
-    dsc->skip_bytes = dsc->doseps->ps_begin - 30;
-
-    if (dsc->doseps->tiff_begin)
-	dsc->preview = CDSC_TIFF;
-    if (dsc->doseps->wmf_begin)
-	dsc->preview = CDSC_WMF;
-
-    return CDSC_OK;
-}
-
-
-dsc_private int
-dsc_read_macbin(CDSC *dsc)
-{
-    unsigned char *line = (unsigned char *)dsc->line;
-    if ((dsc->macbin = 
-	(CDSCMACBIN *)dsc_memalloc(dsc, sizeof(CDSCMACBIN))) == NULL)
-	return CDSC_ERROR;	/* no memory */
-	
-    dsc->macbin->data_begin = 128;
-    dsc->macbin->data_length = dsc_get_bigendian_dword(line+83);
-    dsc->macbin->resource_begin = 
-	(dsc->macbin->data_begin + dsc->macbin->data_length + 127 ) & ~127;
-    dsc->macbin->resource_length = dsc_get_bigendian_dword(line+87);
-
-    if (dsc->file_length && 
-	(((dsc->macbin->resource_begin + dsc->macbin->resource_length 
-	  + 127) & ~127) > dsc->file_length)) {
-	return CDSC_ERROR;
-    }
-
-    dsc->doseps_end = dsc->macbin->data_begin + dsc->macbin->data_length;
-
-    /* move data_index to byte after Mac Binary header */
-    dsc->data_index -= dsc->line_length - 128;
-    /* we haven't read a line of PostScript code yet */
-    dsc->line_count = 0;
-
-    dsc->preview = CDSC_PICT;
-
-    return CDSC_OK;
-}
-
-
-dsc_private int
-dsc_read_applesingle(CDSC *dsc)
-{
-    GSDWORD EntryID;
-    GSDWORD Offset;
-    GSDWORD Length;
-    GSWORD entries;
-    int index;
-    int header;
-    int i;
-
-    unsigned char *line = (unsigned char *)dsc->line;
-    if ((dsc->macbin = 
-	(CDSCMACBIN *)dsc_memalloc(dsc, sizeof(CDSCMACBIN))) == NULL)
-	return CDSC_ERROR;	/* no memory */
-    entries = dsc_get_bigendian_word(line+24);
-    for (i=0; i<(int)entries; i++) {
-	index = 26 + i * 12;
-	EntryID = dsc_get_bigendian_dword(line+index);
-	Offset = dsc_get_bigendian_dword(line+index+4);
-	Length = dsc_get_bigendian_dword(line+index+8);
-	if (EntryID == 1) {
-	    /* data fork */
-	    dsc->macbin->data_begin = Offset;
-	    dsc->macbin->data_length = Length;
-	}
-	else if (EntryID == 2) {
-	    /* resource fork */
-	    dsc->macbin->resource_begin = Offset;
-	    dsc->macbin->resource_length = Length;
-	}
-    }
-	
-    if (dsc->file_length && 
-	(dsc->macbin->resource_begin + dsc->macbin->resource_length
-	  > dsc->file_length)) {
-	return CDSC_ERROR;
-    }
-    if (dsc->file_length && 
-	(dsc->macbin->data_begin + dsc->macbin->data_length 
-	  > dsc->file_length)) {
-	return CDSC_ERROR;
-    }
-
-    dsc->doseps_end = dsc->macbin->data_begin + dsc->macbin->data_length;
-
-    header = 26 + entries * 12;
-    /* move data_index to byte after AppleSingle/AppleDouble header */
-    dsc->data_index -= dsc->line_length - header;
-    /* we haven't read a line of PostScript code yet */
-    dsc->line_count = 0;
-    /* skip from current position to start of PostScript section */
-    dsc->skip_bytes = dsc->macbin->data_begin - header;
-
-    dsc->preview = CDSC_PICT;
-
-    return CDSC_OK;
-}
-
-dsc_private int 
-dsc_parse_pages(CDSC *dsc)
-{
-    int ip, io; 
-    unsigned int i;
-    char *p;
-    int n;
-    if ((dsc->page_pages != 0) && (dsc->scan_section == scan_comments)) {
-	int rc = dsc_error(dsc, CDSC_MESSAGE_DUP_COMMENT, dsc->line, 
-		dsc->line_length);
-	switch (rc) {
-	    case CDSC_RESPONSE_OK:
-	    case CDSC_RESPONSE_CANCEL:
-		return CDSC_OK;	/* ignore duplicate comments in header */
-	    case CDSC_RESPONSE_IGNORE_ALL:
-		return CDSC_NOTDSC;
-	}
-    }
-    if ((dsc->page_pages != 0) && (dsc->scan_section == scan_trailer)) {
-	int rc = dsc_error(dsc, CDSC_MESSAGE_DUP_TRAILER, dsc->line, 
-		dsc->line_length);
-	switch (rc) {
-	    case CDSC_RESPONSE_OK:
-	    case CDSC_RESPONSE_CANCEL:
-		break;		/* use duplicate comments in header */
-	    case CDSC_RESPONSE_IGNORE_ALL:
-		return CDSC_NOTDSC;
-	}
-    }
-
-    n = IS_DSC(dsc->line, "%%+") ? 3 : 8;
-    while (IS_WHITE(dsc->line[n]))
-	n++;
-    p = dsc->line + n;
-    if (COMPARE(p, "atend")) {
-	if (dsc->scan_section != scan_comments)
-	    dsc_unknown(dsc);
-	else {
-	    int rc = dsc_error(dsc, CDSC_MESSAGE_ATEND, 
-		dsc->line, dsc->line_length);
-	    switch (rc) {
-		case CDSC_RESPONSE_OK:
-		    /* assume (atend) */
-		    /* we should mark it as deferred */
-		    break;
-		case CDSC_RESPONSE_CANCEL:
-		    /* ignore it */
-		    break;
-		case CDSC_RESPONSE_IGNORE_ALL:
-		    return CDSC_NOTDSC;
-	    }
-	}
-    }
-    else if (COMPARE(p, "(atend)")) {
-	if (dsc->scan_section != scan_comments)
-	    dsc_unknown(dsc);
-	/* do nothing */
-	/* we should mark it as deferred */
-    }
-    else {
-	ip = dsc_get_int(dsc->line+n, dsc->line_length-n, &i);
-        if (i) {
-	    n+=i;
-	    dsc->page_pages = ip;
-	    io = dsc_get_int(dsc->line+n, dsc->line_length-n, &i);
-	    if (i) {
-		/* DSC 2 uses extra integer to indicate page order */
-		/* DSC 3 uses %%PageOrder: */
-		if (dsc->page_order == CDSC_ORDER_UNKNOWN)
-		    switch (io) {
-			case -1:
-			    dsc->page_order = CDSC_DESCEND;
-			    break;
-			case 0:
-			    dsc->page_order = CDSC_SPECIAL;
-			    break;
-			case 1:
-			    dsc->page_order = CDSC_ASCEND;
-			    break;
-		    }
-	    }
-	}
-	else {
-	    int rc = dsc_error(dsc, CDSC_MESSAGE_INCORRECT_USAGE, dsc->line, 
-		dsc->line_length);
-	    switch (rc) {
-		case CDSC_RESPONSE_OK:
-		case CDSC_RESPONSE_CANCEL:
-		    /* ignore it */
-		    break;
-		case CDSC_RESPONSE_IGNORE_ALL:
-		    return CDSC_NOTDSC;
-	    }
-	}
-    }
-    return CDSC_OK;
-}
-
-dsc_private int 
-dsc_parse_bounding_box(CDSC *dsc, CDSCBBOX** pbbox, int offset)
-{
-    unsigned int i, n;
-    int llx, lly, urx, ury;
-    float fllx, flly, furx, fury;
-    char *p;
-    /* Process first %%BoundingBox: in comments, and last in trailer */
-    if ((*pbbox != NULL) && (dsc->scan_section == scan_comments)) {
-	int rc = dsc_error(dsc, CDSC_MESSAGE_DUP_COMMENT, dsc->line, 
-		dsc->line_length);
-	switch (rc) {
-	    case CDSC_RESPONSE_OK:
-	    case CDSC_RESPONSE_CANCEL:
-		return CDSC_OK;	/* ignore duplicate comments in header */
-	    case CDSC_RESPONSE_IGNORE_ALL:
-		return CDSC_NOTDSC;
-	}
-    }
-    if ((*pbbox != NULL) && (dsc->scan_section == scan_pages)) {
-	int rc = dsc_error(dsc, CDSC_MESSAGE_DUP_COMMENT, dsc->line, 
-		dsc->line_length);
-	switch (rc) {
-	    case CDSC_RESPONSE_OK:
-	    case CDSC_RESPONSE_CANCEL:
-		return CDSC_OK;	/* ignore duplicate comments in header */
-	    case CDSC_RESPONSE_IGNORE_ALL:
-		return CDSC_NOTDSC;
-	}
-    }
-    if ((*pbbox != NULL) && (dsc->scan_section == scan_trailer)) {
-	int rc = dsc_error(dsc, CDSC_MESSAGE_DUP_TRAILER, dsc->line, 
-		dsc->line_length);
-	switch (rc) {
-	    case CDSC_RESPONSE_OK:
-	    case CDSC_RESPONSE_CANCEL:
-		break;		/* use duplicate comments in trailer */
-	    case CDSC_RESPONSE_IGNORE_ALL:
-		return CDSC_NOTDSC;
-	}
-    }
-    if (*pbbox != NULL) {
-	dsc_memfree(dsc, *pbbox);
-	*pbbox = NULL;
-    }
-
-    /* should only process first %%BoundingBox: */
-
-    while (IS_WHITE(dsc->line[offset]))
-	offset++;
-    p = dsc->line + offset;
-    
-    if (COMPARE(p, "atend")) {
-	if (dsc->scan_section == scan_trailer)
-	    dsc_unknown(dsc);
-	else {
-	    int rc = dsc_error(dsc, CDSC_MESSAGE_ATEND, dsc->line, 
-		    dsc->line_length);
-	    switch (rc) {
-		case CDSC_RESPONSE_OK:
-		    /* assume (atend) */
-		    /* we should mark it as deferred */
-		    break;
-		case CDSC_RESPONSE_CANCEL:
-		    /* ignore it */
-		    break;
-		case CDSC_RESPONSE_IGNORE_ALL:
-		    return CDSC_NOTDSC;
-	    }
-	}
-    }
-    else if (COMPARE(p, "(atend)")) {
-	if (dsc->scan_section == scan_trailer)
-	    dsc_unknown(dsc);
-	/* do nothing */
-	/* we should mark it as deferred */
-    }
-    else {
-        /* llx = */ lly = urx = ury = 0;
-	n = offset;
-	llx = dsc_get_int(dsc->line+n, dsc->line_length-n, &i);
-	n += i;
-	if (i)
-	    lly = dsc_get_int(dsc->line+n, dsc->line_length-n, &i);
-	n += i;
-	if (i)
-	    urx = dsc_get_int(dsc->line+n, dsc->line_length-n, &i);
-	n += i;
-	if (i)
-	    ury = dsc_get_int(dsc->line+n, dsc->line_length-n, &i);
-	if (i) {
-	    *pbbox = (CDSCBBOX *)dsc_memalloc(dsc, sizeof(CDSCBBOX));
-	    if (*pbbox == NULL)
-		return CDSC_ERROR;	/* no memory */
-	    (*pbbox)->llx = llx;
-	    (*pbbox)->lly = lly;
-	    (*pbbox)->urx = urx;
-	    (*pbbox)->ury = ury;
-	}
-	else {
-	    int rc = dsc_error(dsc, CDSC_MESSAGE_BBOX, dsc->line, 
-		dsc->line_length);
-	    switch (rc) {
-	      case CDSC_RESPONSE_OK:
-		/* fllx = */ flly = furx = fury = 0.0;
-		n = offset;
-		n += i;
-		fllx = dsc_get_real(dsc->line+n, dsc->line_length-n, &i);
-		n += i;
-		if (i)
-		    flly = dsc_get_real(dsc->line+n, dsc->line_length-n, &i);
-		n += i;
-		if (i)
-		    furx = dsc_get_real(dsc->line+n, dsc->line_length-n, &i);
-		n += i;
-		if (i)
-		    fury = dsc_get_real(dsc->line+n, dsc->line_length-n, &i);
-		if (i) {
-		    *pbbox = (CDSCBBOX *)dsc_memalloc(dsc, sizeof(CDSCBBOX));
-		    if (*pbbox == NULL)
-			return CDSC_ERROR;	/* no memory */
-			(*pbbox)->llx = (int)fllx;
-			(*pbbox)->lly = (int)flly;
-			(*pbbox)->urx = (int)(furx+0.999);
-			(*pbbox)->ury = (int)(fury+0.999);
-		}
-		return CDSC_OK;
-	    case CDSC_RESPONSE_CANCEL:
-		return CDSC_OK;
-	    case CDSC_RESPONSE_IGNORE_ALL:
-		return CDSC_NOTDSC;
-	  }
-	}
-    }
-    return CDSC_OK;
-}
-
-dsc_private int 
-dsc_parse_float_bounding_box(CDSC *dsc, CDSCFBBOX** pbbox, int offset)
-{
-    unsigned int i, n;
-    float fllx, flly, furx, fury;
-    char *p;
-    /* Process first %%HiResBoundingBox: or %%CropBox: in comments, 
-     * and last in trailer.
-     */
-    if ((*pbbox != NULL) && (dsc->scan_section == scan_comments)) {
-	int rc = dsc_error(dsc, CDSC_MESSAGE_DUP_COMMENT, dsc->line, 
-		dsc->line_length);
-	switch (rc) {
-	    case CDSC_RESPONSE_OK:
-	    case CDSC_RESPONSE_CANCEL:
-		return CDSC_OK;	/* ignore duplicate comments in header */
-	    case CDSC_RESPONSE_IGNORE_ALL:
-		return CDSC_NOTDSC;
-	}
-    }
-    if ((*pbbox != NULL) && (dsc->scan_section == scan_pages)) {
-	int rc = dsc_error(dsc, CDSC_MESSAGE_DUP_COMMENT, dsc->line, 
-		dsc->line_length);
-	switch (rc) {
-	    case CDSC_RESPONSE_OK:
-	    case CDSC_RESPONSE_CANCEL:
-		return CDSC_OK;	/* ignore duplicate comments in header */
-	    case CDSC_RESPONSE_IGNORE_ALL:
-		return CDSC_NOTDSC;
-	}
-    }
-    if ((*pbbox != NULL) && (dsc->scan_section == scan_trailer)) {
-	int rc = dsc_error(dsc, CDSC_MESSAGE_DUP_TRAILER, dsc->line, 
-		dsc->line_length);
-	switch (rc) {
-	    case CDSC_RESPONSE_OK:
-	    case CDSC_RESPONSE_CANCEL:
-		break;		/* use duplicate comments in trailer */
-	    case CDSC_RESPONSE_IGNORE_ALL:
-		return CDSC_NOTDSC;
-	}
-    }
-    if (*pbbox != NULL) {
-	dsc_memfree(dsc, *pbbox);
-	*pbbox = NULL;
-    }
-
-    /* should only process first %%BoundingBox: */
-
-    while (IS_WHITE(dsc->line[offset]))
-	offset++;
-    p = dsc->line + offset;
-    
-    if (COMPARE(p, "atend")) {
-	if (dsc->scan_section == scan_trailer)
-	    dsc_unknown(dsc);
-	else {
-	    int rc = dsc_error(dsc, CDSC_MESSAGE_ATEND, dsc->line, 
-		    dsc->line_length);
-	    switch (rc) {
-		case CDSC_RESPONSE_OK:
-		    /* assume (atend) */
-		    /* we should mark it as deferred */
-		    break;
-		case CDSC_RESPONSE_CANCEL:
-		    /* ignore it */
-		    break;
-		case CDSC_RESPONSE_IGNORE_ALL:
-		    return CDSC_NOTDSC;
-	    }
-	}
-    }
-    else if (COMPARE(p, "(atend)")) {
-	if (dsc->scan_section == scan_trailer)
-	    dsc_unknown(dsc);
-	/* do nothing */
-	/* we should mark it as deferred */
-    }
-    else {
-	/* fllx = */ flly = furx = fury = 0.0;
-	n = offset;
-	fllx = dsc_get_real(dsc->line+n, dsc->line_length-n, &i);
-	n += i;
-	if (i)
-	    flly = dsc_get_real(dsc->line+n, dsc->line_length-n, &i);
-	n += i;
-	if (i)
-	    furx = dsc_get_real(dsc->line+n, dsc->line_length-n, &i);
-	n += i;
-	if (i)
-	    fury = dsc_get_real(dsc->line+n, dsc->line_length-n, &i);
-	if (i) {
-	    *pbbox = (CDSCFBBOX *)dsc_memalloc(dsc, sizeof(CDSCFBBOX));
-	    if (*pbbox == NULL)
-		return CDSC_ERROR;	/* no memory */
-	    (*pbbox)->fllx = fllx;
-	    (*pbbox)->flly = flly;
-	    (*pbbox)->furx = furx;
-	    (*pbbox)->fury = fury;
-	}
-    }
-    return CDSC_OK;
-}
-
-dsc_private int 
-dsc_parse_orientation(CDSC *dsc, unsigned int *porientation, int offset)
-{
-    char *p;
-    if ((dsc->page_orientation != CDSC_ORIENT_UNKNOWN) && 
-	(dsc->scan_section == scan_comments)) {
-	int rc = dsc_error(dsc, CDSC_MESSAGE_DUP_COMMENT, dsc->line, 
-		dsc->line_length);
-	switch (rc) {
-	    case CDSC_RESPONSE_OK:
-	    case CDSC_RESPONSE_CANCEL:
-		return CDSC_OK;	/* ignore duplicate comments in header */
-	    case CDSC_RESPONSE_IGNORE_ALL:
-		return CDSC_NOTDSC;
-	}
-    }
-    if ((dsc->page_orientation != CDSC_ORIENT_UNKNOWN) && 
-	(dsc->scan_section == scan_trailer)) {
-	int rc = dsc_error(dsc, CDSC_MESSAGE_DUP_TRAILER, dsc->line, 
-		dsc->line_length);
-	switch (rc) {
-	    case CDSC_RESPONSE_OK:
-	    case CDSC_RESPONSE_CANCEL:
-		break;		/* use duplicate comments in header; */
-	    case CDSC_RESPONSE_IGNORE_ALL:
-		return CDSC_NOTDSC;
-	}
-    }
-    p = dsc->line + offset;
-    while (IS_WHITE(*p))
-	p++;
-    if (COMPARE(p, "atend")) {
-	if (dsc->scan_section == scan_trailer)
-	    dsc_unknown(dsc);
-	else {
-	    int rc = dsc_error(dsc, CDSC_MESSAGE_ATEND, 
-		dsc->line, dsc->line_length);
-	    switch (rc) {
-		case CDSC_RESPONSE_OK:
-		    /* assume (atend) */
-		    /* we should mark it as deferred */
-		    break;
-		case CDSC_RESPONSE_CANCEL:
-		    /* ignore it */
-		    break;
-		case CDSC_RESPONSE_IGNORE_ALL:
-		    return CDSC_NOTDSC;
-	    }
-	}
-    }
-    else if (COMPARE(p, "(atend)")) {
-	if (dsc->scan_section == scan_trailer)
-	    dsc_unknown(dsc);
-	/* do nothing */
-	/* we should mark it as deferred */
-    }
-    else if (COMPARE(p, "Portrait")) {
-	*porientation = CDSC_PORTRAIT;
-    }
-    else if (COMPARE(p, "Landscape")) {
-	*porientation = CDSC_LANDSCAPE;
-    }
-    else {
-	dsc_unknown(dsc);
-    }
-    return CDSC_OK;
-}
-
-dsc_private int 
-dsc_parse_order(CDSC *dsc)
-{
-    char *p;
-    if ((dsc->page_order != CDSC_ORDER_UNKNOWN) && 
-	(dsc->scan_section == scan_comments)) {
-	int rc = dsc_error(dsc, CDSC_MESSAGE_DUP_COMMENT, dsc->line, 
-		dsc->line_length);
-	switch (rc) {
-	    case CDSC_RESPONSE_OK:
-	    case CDSC_RESPONSE_CANCEL:
-		return CDSC_OK;	/* ignore duplicate comments in header */
-	    case CDSC_RESPONSE_IGNORE_ALL:
-		return CDSC_NOTDSC;
-	}
-    }
-    if ((dsc->page_order != CDSC_ORDER_UNKNOWN) && 
-	(dsc->scan_section == scan_trailer)) {
-	int rc = dsc_error(dsc, CDSC_MESSAGE_DUP_TRAILER, dsc->line, 
-		dsc->line_length);
-	switch (rc) {
-	    case CDSC_RESPONSE_OK:
-	    case CDSC_RESPONSE_CANCEL:
-		break;		/* use duplicate comments in trailer */
-	    case CDSC_RESPONSE_IGNORE_ALL:
-		return CDSC_NOTDSC;
-	}
-    }
-
-    p = dsc->line + (IS_DSC(dsc->line, "%%+") ? 3 : 13);
-    while (IS_WHITE(*p))
-	p++;
-    if (COMPARE(p, "atend")) {
-	if (dsc->scan_section == scan_trailer)
-	    dsc_unknown(dsc);
-	else {
-	    int rc = dsc_error(dsc, CDSC_MESSAGE_ATEND, dsc->line, 
-		    dsc->line_length);
-	    switch (rc) {
-		case CDSC_RESPONSE_OK:
-		    /* assume (atend) */
-		    /* we should mark it as deferred */
-		    break;
-		case CDSC_RESPONSE_CANCEL:
-		    /* ignore it */
-		    break;
-		case CDSC_RESPONSE_IGNORE_ALL:
-		    return CDSC_NOTDSC;
-	    }
-	}
-    }
-    else if (COMPARE(p, "(atend)")) {
-	if (dsc->scan_section == scan_trailer)
-	    dsc_unknown(dsc);
-	/* do nothing */
-	/* we should mark it as deferred */
-    }
-    else if (COMPARE(p, "Ascend")) {
-	dsc->page_order = CDSC_ASCEND;
-    }
-    else if (COMPARE(p, "Descend")) {
-	dsc->page_order = CDSC_DESCEND;
-    }
-    else if (COMPARE(p, "Special")) {
-	dsc->page_order = CDSC_SPECIAL;
-    }
-    else {
-	dsc_unknown(dsc);
-    }
-    return CDSC_OK;
-}
-
-
-dsc_private int 
-dsc_parse_media(CDSC *dsc, const CDSCMEDIA **page_media)
-{
-    char media_name[MAXSTR];
-    int n = IS_DSC(dsc->line, "%%+") ? 3 : 12; /* %%PageMedia: */
-    unsigned int i;
-
-    if (dsc_copy_string(media_name, sizeof(media_name)-1, 
-	dsc->line+n, dsc->line_length-n, NULL)) {
-	for (i=0; i<dsc->media_count; i++) {
-	    if (dsc->media[i]->name && 
-		(dsc_stricmp(media_name, dsc->media[i]->name) == 0)) {
-		*page_media = dsc->media[i];
-		return CDSC_OK;
-	    }
-	}
-    }
-    dsc_unknown(dsc);
-    
-    return CDSC_OK;
-}
-
-
-dsc_private int 
-dsc_parse_document_media(CDSC *dsc)
-{
-    unsigned int i, n;
-    CDSCMEDIA lmedia;
-    GSBOOL blank_line;
-
-    if (IS_DSC(dsc->line, "%%DocumentMedia:"))
-	n = 16;
-    else if (IS_DSC(dsc->line, "%%+"))
-	n = 3;
-    else
-	return CDSC_ERROR;	/* error */
-
-    /* check for blank remainder of line */
-    blank_line = TRUE;
-    for (i=n; i<dsc->line_length; i++) {
-	if (!IS_WHITE_OR_EOL(dsc->line[i])) {
-	    blank_line = FALSE;
-	    break;
-	}
-    }
-
-    if (!blank_line) {
-	char name[MAXSTR];
-	char colour[MAXSTR];
-	char type[MAXSTR];
-	lmedia.name = lmedia.colour = lmedia.type = (char *)NULL;
-	lmedia.width = lmedia.height = lmedia.weight = 0;
-	lmedia.mediabox = (CDSCBBOX *)NULL;
-	lmedia.name = dsc_copy_string(name, sizeof(name),
-		dsc->line+n, dsc->line_length-n, &i);
-	n+=i;
-	if (i)
-	    lmedia.width = dsc_get_real(dsc->line+n, dsc->line_length-n, &i);
-	n+=i;
-	if (i)
-	    lmedia.height = dsc_get_real(dsc->line+n, dsc->line_length-n, &i);
-	n+=i;
-	if (i)
-	    lmedia.weight = dsc_get_real(dsc->line+n, dsc->line_length-n, &i);
-	n+=i;
-	if (i)
-	    lmedia.colour = dsc_copy_string(colour, sizeof(colour),
-		dsc->line+n, dsc->line_length-n, &i);
-	n+=i;
-	if (i)
-	    lmedia.type = dsc_copy_string(type, sizeof(type),
-		dsc->line+n, dsc->line_length-n, &i);
-
-	if (i==0)
-	    dsc_unknown(dsc); /* we didn't get all fields */
-	else {
-	    if (dsc_add_media(dsc, &lmedia))
-		return CDSC_ERROR;	/* out of memory */
-	}
-    }
-    return CDSC_OK;
-}
-
-/* viewing orientation is believed to be the first four elements of
- * a CTM matrix
- */
-dsc_private int 
-dsc_parse_viewing_orientation(CDSC *dsc, CDSCCTM **pctm)
-{
-    CDSCCTM ctm;
-    unsigned int i, n;
-
-    if (*pctm != NULL) {
-	dsc_memfree(dsc, *pctm);
-	*pctm = NULL;
-    }
-
-    n = IS_DSC(dsc->line, "%%+") ? 3 : 21;  /* %%ViewingOrientation: */
-    while (IS_WHITE(dsc->line[n]))
-	n++;
-
-    /* ctm.xx = */ ctm.xy = ctm.yx = ctm.yy = 0.0;
-    ctm.xx = dsc_get_real(dsc->line+n, dsc->line_length-n, &i);
-    n += i;
-    if (i)
-        ctm.xy = dsc_get_real(dsc->line+n, dsc->line_length-n, &i);
-    n += i;
-    if (i)
-        ctm.yx = dsc_get_real(dsc->line+n, dsc->line_length-n, &i);
-    n += i;
-    if (i)
-        ctm.yy = dsc_get_real(dsc->line+n, dsc->line_length-n, &i);
-    if (i==0) {
-	dsc_unknown(dsc); /* we didn't get all fields */
-    }
-    else {
-	*pctm = (CDSCCTM *)dsc_memalloc(dsc, sizeof(CDSCCTM));
-	if (*pctm == NULL)
-	    return CDSC_ERROR;	/* no memory */
-	**pctm = ctm;
-    }
-    return CDSC_OK;
-}
-   
-
-/* This is called before dsc_read_line(), since we may
- * need to skip a binary header which contains a new line
- * character
- */
-dsc_private int 
-dsc_scan_type(CDSC *dsc)
-{
-    unsigned char *p;
-    unsigned char *line = (unsigned char *)(dsc->data + dsc->data_index);
-    int length = dsc->data_length - dsc->data_index;
-
-    /* Types that should be known:
-     *   DSC
-     *   EPSF
-     *   PJL + any of above
-     *   ^D + any of above
-     *   DOS EPS
-     *   PDF
-     *   non-DSC
-     */
-
-    /* First process any non PostScript headers */
-    /* At this stage we do not have a complete line */
-
-    if (length == 0)
-	return CDSC_NEEDMORE;
-
-    /* If we have already found a DOS EPS header, */
-    /* ignore all until the PostScript section */
-    if (dsc->skip_bytes) {
-	int cnt = min(dsc->skip_bytes,
-		     (int)(dsc->data_length - dsc->data_index));
-	dsc->skip_bytes -= cnt;
-	dsc->data_index += cnt;
-	length -= cnt;
-	line += cnt;
-	if (dsc->skip_bytes != 0)
-	    return CDSC_NEEDMORE;
-    }
-
-    if (dsc->skip_pjl) {
-	/* skip until first PostScript comment */
-	while (length >= 2) {
-	    while (length && !IS_EOL(line[0])) {
-		/* skip until EOL character */
-		line++;
-		dsc->data_index++;
-		length--;
-	    }
-	    while ((length >= 2) && IS_EOL(line[0]) && IS_EOL(line[1])) {
-		/* skip until EOL followed by non-EOL */
-		line++;
-		dsc->data_index++;
-		length--;
-	    }
-	    if (length < 2)
-		return CDSC_NEEDMORE;
-
-	    if (IS_EOL(line[0]) && line[1]=='%') {
-		line++;
-		dsc->data_index++;
-		length--;
-		dsc->skip_pjl = FALSE;
-		break;
-	    }
-	    else {
-		line++;
-		dsc->data_index++;
-		length--;
-	    }
-	}
-	if (dsc->skip_pjl)
-	    return CDSC_NEEDMORE;
-    }
-
-    if (length == 0)
-	return CDSC_NEEDMORE;
-
-    if (line[0] == '\004') {
-	line++;
-	dsc->data_index++;
-	length--;
-	dsc->ctrld = TRUE;
-    }
-
-    if (line[0] == '\033') {
-	/* possibly PJL */
-	if (length < 9)
-	    return CDSC_NEEDMORE;
-	if (COMPARE(line, "\033%-12345X")) {
-	    dsc->skip_pjl = TRUE;  /* skip until first PostScript comment */
-	    dsc->pjl = TRUE;
-	    dsc->data_index += 9;
-	    return dsc_scan_type(dsc);
-	}
-    }
-
-    if ((line[0]==0x0) && (length < 2))
-	return CDSC_NEEDMORE;	/* Could be Mac Binary EPSF */
-    if ((line[0]==0x0) && (line[1] >= 1) && (line[1] <= 63) && (length < 128))
-	return CDSC_NEEDMORE;	/* Could be Mac Binary EPSF */
-    if ((line[0]==0x0) && (line[1] == 0x5) && (length < 4))
-	return CDSC_NEEDMORE;	/* Could be Mac AppleSingle/AppleDouble */
-    if ((line[0]==0xc5) && (length < 4))
-	return CDSC_NEEDMORE;	/* Could be DOS EPS */
-
-    if ((line[0]==0xc5) && (line[1]==0xd0) && 
-	 (line[2]==0xd3) && (line[3]==0xc6) ) {
-	/* id is "EPSF" with bit 7 set */
-	/* read DOS EPS header, then ignore all bytes until the PS section */
-	if (length < 30)
-	    return CDSC_NEEDMORE;
-	dsc->line = (char *)line;
-	if (dsc_read_doseps(dsc))
-	    return CDSC_ERROR;
-    }
-    else if ((line[0]==0x0) && (line[1]==0x05) && 
-	 (line[2]==0x16) && ((line[3]==0x0) || (line[3] == 0x07))) {
-	/* Mac AppleSingle or AppleDouble */
-	GSDWORD version;
-	GSWORD entries;
-	if (length < 26)
-	    return CDSC_NEEDMORE;
-	version = dsc_get_bigendian_dword(line+4);
-	entries = dsc_get_bigendian_word(line+24);
-	if ((version == 0x00010000) || (version == 0x00020000)) {
-	    if (length < (int)(26 + entries * 12))
-		return CDSC_NEEDMORE;
-	    dsc->line = (char *)line;
-	    if (dsc_read_applesingle(dsc))
-		return CDSC_ERROR;
-	}
-    }
-    else if ((line[0]==0x0) && 
-	(line[1] >= 1) && (line[1] <= 63) && 
-        (line[74]==0x0) && 
-        (line[65]=='E') && (line[66]=='P') && 
-        (line[67]=='S') && (line[68]=='F')) {
-	/* Mac Binary EPSF */
-	dsc->line = (char *)line;
-	if (dsc_read_macbin(dsc))
-	    return CDSC_ERROR;
-    }
-    else {
-	if (length < 2)
-	    return CDSC_NEEDMORE;
-	if ((line[0] == '%') && (line[1] == 'P')) {
-	    if (length < 5)
-	        return CDSC_NEEDMORE;
-	    if (COMPARE(line, "%PDF-")) {
-		dsc->pdf = TRUE;
-		dsc->scan_section = scan_comments;
-		return CDSC_OK;
-	    }
-	}
-    }
-
-    /* Finally process PostScript headers */
-
-    if (dsc_read_line(dsc) <= 0)
-	return CDSC_NEEDMORE;
-	
-    dsc->dsc_version = dsc_add_line(dsc, dsc->line, dsc->line_length);
-    if (COMPARE(dsc->line, "%!PS-Adobe")) {
-	dsc->dsc = TRUE;
-	dsc->begincomments = DSC_START(dsc);
-	if (dsc->dsc_version == NULL)
-	    return CDSC_ERROR;	/* no memory */
-	p = (unsigned char *)dsc->line + 14;
-	while (IS_WHITE(*p))
-	    p++;
-	if (COMPARE(p, "EPSF-"))
-	    dsc->epsf = TRUE;
-	dsc->scan_section = scan_comments;
-	return CDSC_PSADOBE;
-    }
-    if (COMPARE(dsc->line, "%!")) {
-	dsc->scan_section = scan_comments;
-	return CDSC_NOTDSC;
-    }
-
-    dsc->scan_section = scan_comments;
-    return CDSC_NOTDSC;	/* unrecognised */
-}
-
-
-
-dsc_private int 
-dsc_scan_comments(CDSC *dsc)
-{
-    /* Comments section ends at */
-    /*  %%EndComments */
-    /*  another section */
-    /*  line that does not start with %% */
-    /* Save a few important lines */
-
-    char *line = dsc->line;
-    GSBOOL continued = FALSE;
-    dsc->id = CDSC_OK;
-    if (IS_DSC(line, "%%EndComments")) {
-	dsc->id = CDSC_ENDCOMMENTS;
-	dsc->endcomments = DSC_END(dsc);
-	dsc->scan_section = scan_p