summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Deutschmann <whissi@gentoo.org>2020-09-10 18:10:49 +0200
committerThomas Deutschmann <whissi@gentoo.org>2020-09-11 20:06:36 +0200
commitacfc02c1747065fe450c7cfeb6f1844b62335f08 (patch)
tree5887806a2e6b99bbb0255e013a9028810e230a7f
parentImport Ghostscript 9.52 (diff)
downloadghostscript-gpl-patches-acfc02c1747065fe450c7cfeb6f1844b62335f08.tar.gz
ghostscript-gpl-patches-acfc02c1747065fe450c7cfeb6f1844b62335f08.tar.bz2
ghostscript-gpl-patches-acfc02c1747065fe450c7cfeb6f1844b62335f08.zip
Import Ghostscript 9.53ghostscript-9.53
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
-rw-r--r--.lgtm.yml33
-rw-r--r--Makefile.in23
-rw-r--r--Resource/CIDFont/ArtifexBulletbin2659 -> 2659 bytes
-rw-r--r--Resource/ColorSpace/DefaultCMYK2
-rw-r--r--Resource/ColorSpace/DefaultGray2
-rw-r--r--Resource/ColorSpace/DefaultRGB2
-rw-r--r--Resource/ColorSpace/TrivialCMYK2
-rw-r--r--Resource/ColorSpace/sGray2
-rw-r--r--Resource/ColorSpace/sRGB2
-rw-r--r--Resource/Decoding/FCO_Dingbats2
-rw-r--r--Resource/Decoding/FCO_Symbol2
-rw-r--r--Resource/Decoding/FCO_Unicode2
-rw-r--r--Resource/Decoding/FCO_Wingdings2
-rw-r--r--Resource/Decoding/Latin12
-rw-r--r--Resource/Decoding/StandardEncoding2
-rw-r--r--Resource/Decoding/Unicode2
-rw-r--r--Resource/Encoding/CEEncoding2
-rw-r--r--Resource/Encoding/ExpertEncoding2
-rw-r--r--Resource/Encoding/ExpertSubsetEncoding2
-rw-r--r--Resource/Encoding/NotDefEncoding2
-rw-r--r--Resource/Encoding/Wingdings2
-rw-r--r--Resource/Font/NimbusSans-BoldItalicbin112011 -> 123308 bytes
-rw-r--r--Resource/Font/NimbusSans-Italicbin109766 -> 120927 bytes
-rw-r--r--Resource/Init/FCOfontmap-PCLPS22
-rw-r--r--Resource/Init/Fontmap.GS2
-rw-r--r--Resource/Init/gs_agl.ps2
-rw-r--r--Resource/Init/gs_btokn.ps159
-rw-r--r--Resource/Init/gs_cff.ps2
-rw-r--r--Resource/Init/gs_cidcm.ps2
-rw-r--r--Resource/Init/gs_ciddc.ps2
-rw-r--r--Resource/Init/gs_cidfm.ps2
-rw-r--r--Resource/Init/gs_cidfn.ps2
-rw-r--r--Resource/Init/gs_cidtt.ps2
-rw-r--r--Resource/Init/gs_cmap.ps2
-rw-r--r--Resource/Init/gs_cspace.ps2
-rw-r--r--Resource/Init/gs_dbt_e.ps2
-rw-r--r--Resource/Init/gs_diskn.ps2
-rw-r--r--Resource/Init/gs_dps1.ps2
-rw-r--r--Resource/Init/gs_dps2.ps2
-rw-r--r--Resource/Init/gs_dscp.ps2
-rw-r--r--Resource/Init/gs_epsf.ps67
-rw-r--r--Resource/Init/gs_fapi.ps2
-rw-r--r--Resource/Init/gs_fntem.ps2
-rw-r--r--Resource/Init/gs_fonts.ps2
-rw-r--r--Resource/Init/gs_frsd.ps2
-rw-r--r--Resource/Init/gs_icc.ps2
-rw-r--r--Resource/Init/gs_il1_e.ps2
-rw-r--r--Resource/Init/gs_init.ps10
-rw-r--r--Resource/Init/gs_lev2.ps2
-rw-r--r--Resource/Init/gs_ll3.ps2
-rw-r--r--Resource/Init/gs_mex_e.ps2
-rw-r--r--Resource/Init/gs_mgl_e.ps2
-rw-r--r--Resource/Init/gs_mro_e.ps2
-rw-r--r--Resource/Init/gs_pdf_e.ps2
-rw-r--r--Resource/Init/gs_pdfwr.ps2
-rw-r--r--Resource/Init/gs_res.ps2
-rw-r--r--Resource/Init/gs_resmp.ps2
-rw-r--r--Resource/Init/gs_setpd.ps2
-rw-r--r--Resource/Init/gs_statd.ps2
-rw-r--r--Resource/Init/gs_std_e.ps2
-rw-r--r--Resource/Init/gs_sym_e.ps2
-rw-r--r--Resource/Init/gs_trap.ps2
-rw-r--r--Resource/Init/gs_ttf.ps13
-rw-r--r--Resource/Init/gs_typ32.ps2
-rw-r--r--Resource/Init/gs_typ42.ps2
-rw-r--r--Resource/Init/gs_type1.ps2
-rw-r--r--Resource/Init/gs_wan_e.ps2
-rw-r--r--Resource/Init/pdf_base.ps17
-rw-r--r--Resource/Init/pdf_draw.ps132
-rw-r--r--Resource/Init/pdf_font.ps24
-rw-r--r--Resource/Init/pdf_main.ps236
-rw-r--r--Resource/Init/pdf_ops.ps153
-rw-r--r--Resource/Init/pdf_rbld.ps4
-rw-r--r--Resource/Init/pdf_sec.ps73
-rw-r--r--Resource/SubstCID/CNS1-WMode2
-rw-r--r--Resource/SubstCID/GB1-WMode2
-rw-r--r--Resource/SubstCID/Japan1-WMode2
-rw-r--r--Resource/SubstCID/Korea1-WMode2
-rw-r--r--arch/arch_autoconf.h.in2
-rw-r--r--arch/windows-arm-msvc.h2
-rw-r--r--arch/windows-x64-msvc.h2
-rw-r--r--arch/windows-x86-msvc.h2
-rw-r--r--base/all-arch.mak2
-rw-r--r--base/assert_.h2
-rw-r--r--base/bench.c2
-rw-r--r--base/bobbin.c2
-rw-r--r--base/bobbin.h2
-rw-r--r--base/cal.mak8
-rw-r--r--base/claptrap-impl.h2
-rw-r--r--base/claptrap-init.c4
-rw-r--r--base/claptrap-planar.c4
-rw-r--r--base/claptrap.c2
-rw-r--r--base/claptrap.h2
-rw-r--r--base/ctype_.h2
-rw-r--r--base/dirent_.h2
-rw-r--r--base/dos_.h2
-rw-r--r--base/echogs.c2
-rw-r--r--base/endianness.h17
-rw-r--r--base/errno_.h2
-rw-r--r--base/ets.c19
-rw-r--r--base/ets.h37
-rw-r--r--base/ets_tm.h37
-rw-r--r--base/expat.mak2
-rw-r--r--base/fapi_bs.mak2
-rw-r--r--base/fapi_ft.c42
-rw-r--r--base/fapibstm.c7
-rw-r--r--base/fapiufst.c253
-rw-r--r--base/fcntl_.h2
-rw-r--r--base/freetype.mak2
-rw-r--r--base/gconf.c2
-rw-r--r--base/gconf.h2
-rw-r--r--base/gdbflags.h2
-rw-r--r--base/gdebug.h2
-rw-r--r--base/gdevabuf.c63
-rw-r--r--base/gdevbbox.c2
-rw-r--r--base/gdevbbox.h2
-rw-r--r--base/gdevdbit.c2
-rw-r--r--base/gdevdcrd.c2
-rw-r--r--base/gdevdcrd.h2
-rw-r--r--base/gdevddrw.c2
-rw-r--r--base/gdevddrw.h2
-rw-r--r--base/gdevdevn.c2
-rw-r--r--base/gdevdevn.h2
-rw-r--r--base/gdevdevnprn.h2
-rw-r--r--base/gdevdflt.c9
-rw-r--r--base/gdevdgbr.c8
-rw-r--r--base/gdevdrop.c16
-rw-r--r--base/gdevdsha.c2
-rw-r--r--base/gdevemap.c2
-rw-r--r--base/gdevepo.c2
-rw-r--r--base/gdevepo.h2
-rw-r--r--base/gdevflp.c103
-rw-r--r--base/gdevflp.h2
-rw-r--r--base/gdevhit.c2
-rw-r--r--base/gdevkrnlsclass.c2
-rw-r--r--base/gdevkrnlsclass.h2
-rw-r--r--base/gdevm1.c2
-rw-r--r--base/gdevm16.c2
-rw-r--r--base/gdevm2.c2
-rw-r--r--base/gdevm24.c2
-rw-r--r--base/gdevm32.c2
-rw-r--r--base/gdevm4.c2
-rw-r--r--base/gdevm40.c2
-rw-r--r--base/gdevm48.c2
-rw-r--r--base/gdevm56.c2
-rw-r--r--base/gdevm64.c2
-rw-r--r--base/gdevm8.c2
-rw-r--r--base/gdevmem.c65
-rw-r--r--base/gdevmem.h2
-rw-r--r--base/gdevmpla.c82
-rw-r--r--base/gdevmpla.h7
-rw-r--r--base/gdevmplt.c2
-rw-r--r--base/gdevmplt.h2
-rw-r--r--base/gdevmr1.c2
-rw-r--r--base/gdevmr2n.c2
-rw-r--r--base/gdevmr8n.c2
-rw-r--r--base/gdevmrop.h2
-rw-r--r--base/gdevmrun.c2
-rw-r--r--base/gdevmrun.h2
-rw-r--r--base/gdevmx.c2
-rw-r--r--base/gdevnfwd.c29
-rw-r--r--base/gdevoflt.c2
-rw-r--r--base/gdevoflt.h2
-rw-r--r--base/gdevp14.c2921
-rw-r--r--base/gdevp14.h42
-rw-r--r--base/gdevpccm.c2
-rw-r--r--base/gdevpccm.h2
-rw-r--r--base/gdevpipe.c19
-rw-r--r--base/gdevplnx.c10
-rw-r--r--base/gdevplnx.h2
-rw-r--r--base/gdevppla.c2
-rw-r--r--base/gdevppla.h2
-rw-r--r--base/gdevprn.c87
-rw-r--r--base/gdevprn.h32
-rw-r--r--base/gdevpxat.h2
-rw-r--r--base/gdevpxen.h2
-rw-r--r--base/gdevpxop.h2
-rw-r--r--base/gdevrops.c2
-rw-r--r--base/gdevsclass.c2
-rw-r--r--base/gdevsclass.h2
-rw-r--r--base/gdevvec.c2
-rw-r--r--base/gdevvec.h2
-rw-r--r--base/gen_ordered.c31
-rw-r--r--base/gen_ordered.h2
-rw-r--r--base/genarch.c2
-rw-r--r--base/genconf.c2
-rw-r--r--base/gendev.c2
-rw-r--r--base/genht.c2
-rw-r--r--base/gp.h21
-rw-r--r--base/gp_dosfe.c2
-rw-r--r--base/gp_dosfs.c2
-rw-r--r--base/gp_dvx.c2
-rw-r--r--base/gp_getnv.c2
-rw-r--r--base/gp_mktmp.c2
-rw-r--r--base/gp_msdll.c2
-rw-r--r--base/gp_msdos.c2
-rw-r--r--base/gp_mshdl.c2
-rw-r--r--base/gp_mslib.c2
-rw-r--r--base/gp_mspol.c4
-rw-r--r--base/gp_msprn.c16
-rw-r--r--base/gp_mswin.c8
-rw-r--r--base/gp_mswin.h2
-rw-r--r--base/gp_nsync.c2
-rw-r--r--base/gp_ntfs.c2
-rw-r--r--base/gp_nxpsprn.c2
-rw-r--r--base/gp_os2.c8
-rw-r--r--base/gp_os2.h2
-rw-r--r--base/gp_os2fs.c14
-rw-r--r--base/gp_os2pr.c4
-rw-r--r--base/gp_os9.c2
-rw-r--r--base/gp_paper.c2
-rw-r--r--base/gp_psync.c2
-rw-r--r--base/gp_stdia.c2
-rw-r--r--base/gp_stdin.c2
-rw-r--r--base/gp_strdl.c2
-rw-r--r--base/gp_unifn.c2
-rw-r--r--base/gp_unifs.c16
-rw-r--r--base/gp_unix.c76
-rw-r--r--base/gp_upapr.c2
-rw-r--r--base/gp_vms.c18
-rw-r--r--base/gp_wgetv.c8
-rw-r--r--base/gp_win32.c2
-rw-r--r--base/gp_winfs.c58
-rw-r--r--base/gp_winfs2.c2
-rw-r--r--base/gp_wpapr.c2
-rw-r--r--base/gp_wsync.c2
-rw-r--r--base/gp_wutf8.c2
-rw-r--r--base/gp_wxpsprn.cpp2
-rw-r--r--base/gpcheck.h2
-rw-r--r--base/gpgetenv.h2
-rw-r--r--base/gpmisc.c159
-rw-r--r--base/gpmisc.h2
-rw-r--r--base/gpsync.h2
-rw-r--r--base/gs.mak2
-rw-r--r--base/gs_dll_call.h2
-rw-r--r--base/gs_mgl_e.h2
-rw-r--r--base/gs_mro_e.h2
-rw-r--r--base/gsalloc.c165
-rw-r--r--base/gsalloc.h19
-rw-r--r--base/gsalpha.c39
-rw-r--r--base/gsalphac.c842
-rw-r--r--base/gsalphac.h63
-rw-r--r--base/gsargs.c2
-rw-r--r--base/gsargs.h2
-rw-r--r--base/gsbitcom.c2
-rw-r--r--base/gsbitmap.h2
-rw-r--r--base/gsbitops.c2
-rw-r--r--base/gsbitops.h2
-rw-r--r--base/gsbittab.c2
-rw-r--r--base/gsbittab.h2
-rw-r--r--base/gsccode.h13
-rw-r--r--base/gsccolor.h2
-rw-r--r--base/gscdef.c2
-rw-r--r--base/gscdefs.h2
-rw-r--r--base/gscdevn.c4
-rw-r--r--base/gscdevn.h2
-rw-r--r--base/gscedata.c2
-rw-r--r--base/gscedata.h2
-rw-r--r--base/gscencs.c2
-rw-r--r--base/gscencs.h2
-rw-r--r--base/gschar.c2
-rw-r--r--base/gschar.h2
-rw-r--r--base/gschar0.c30
-rw-r--r--base/gscicach.c2
-rw-r--r--base/gscicach.h2
-rw-r--r--base/gscie.c16
-rw-r--r--base/gscie.h2
-rw-r--r--base/gsciemap.c6
-rw-r--r--base/gscindex.h2
-rw-r--r--base/gsclipsr.c2
-rw-r--r--base/gsclipsr.h2
-rw-r--r--base/gscms.h6
-rw-r--r--base/gscolor.c2
-rw-r--r--base/gscolor.h2
-rw-r--r--base/gscolor1.c2
-rw-r--r--base/gscolor1.h2
-rw-r--r--base/gscolor2.c2
-rw-r--r--base/gscolor2.h2
-rw-r--r--base/gscolor3.c2
-rw-r--r--base/gscolor3.h2
-rw-r--r--base/gscompt.h2
-rw-r--r--base/gscoord.c2
-rw-r--r--base/gscoord.h2
-rw-r--r--base/gscparam.c3
-rw-r--r--base/gscpixel.c2
-rw-r--r--base/gscpixel.h2
-rw-r--r--base/gscpm.h2
-rw-r--r--base/gscrd.c2
-rw-r--r--base/gscrd.h2
-rw-r--r--base/gscrdp.c2
-rw-r--r--base/gscrdp.h2
-rw-r--r--base/gscrypt1.c2
-rw-r--r--base/gscrypt1.h2
-rw-r--r--base/gscscie.c2
-rw-r--r--base/gscsel.h2
-rw-r--r--base/gscsepr.c10
-rw-r--r--base/gscsepr.h2
-rw-r--r--base/gscspace.c57
-rw-r--r--base/gscspace.h13
-rw-r--r--base/gscssub.c2
-rw-r--r--base/gscssub.h2
-rw-r--r--base/gsdcolor.h2
-rw-r--r--base/gsdevice.c39
-rw-r--r--base/gsdevice.h2
-rw-r--r--base/gsdevmem.c2
-rw-r--r--base/gsdll.h2
-rw-r--r--base/gsdllwin.h2
-rw-r--r--base/gsdparam.c41
-rw-r--r--base/gsdps1.c2
-rw-r--r--base/gsdsrc.c2
-rw-r--r--base/gsdsrc.h2
-rw-r--r--base/gsequivc.c10
-rw-r--r--base/gsequivc.h2
-rw-r--r--base/gserrors.h8
-rw-r--r--base/gsexit.h2
-rw-r--r--base/gsfcid.c2
-rw-r--r--base/gsfcid2.c2
-rw-r--r--base/gsfcmap.c15
-rw-r--r--base/gsfcmap.h2
-rw-r--r--base/gsfcmap1.c13
-rw-r--r--base/gsflip.c2
-rw-r--r--base/gsflip.h2
-rw-r--r--base/gsfname.c5
-rw-r--r--base/gsfname.h2
-rw-r--r--base/gsfont.c26
-rw-r--r--base/gsfont.h2
-rw-r--r--base/gsfont0.c2
-rw-r--r--base/gsfont0c.c2
-rw-r--r--base/gsform1.h2
-rw-r--r--base/gsftopts.h2
-rw-r--r--base/gsfunc.c4
-rw-r--r--base/gsfunc.h2
-rw-r--r--base/gsfunc0.c10
-rw-r--r--base/gsfunc0.h2
-rw-r--r--base/gsfunc3.c2
-rw-r--r--base/gsfunc3.h2
-rw-r--r--base/gsfunc4.c2
-rw-r--r--base/gsfunc4.h2
-rw-r--r--base/gsgc.h2
-rw-r--r--base/gsgcache.c2
-rw-r--r--base/gsgcache.h2
-rw-r--r--base/gsgdata.c2
-rw-r--r--base/gsgdata.h2
-rw-r--r--base/gsgstate.c20
-rw-r--r--base/gsgstate.h2
-rw-r--r--base/gshsb.c2
-rw-r--r--base/gshsb.h2
-rw-r--r--base/gsht.c8
-rw-r--r--base/gsht.h2
-rw-r--r--base/gsht1.c2
-rw-r--r--base/gsht1.h2
-rw-r--r--base/gshtscr.c12
-rw-r--r--base/gshtx.c2
-rw-r--r--base/gshtx.h2
-rw-r--r--base/gsicc.c18
-rw-r--r--base/gsicc.h2
-rw-r--r--base/gsicc_cache.c81
-rw-r--r--base/gsicc_cache.h2
-rw-r--r--base/gsicc_cms.h2
-rw-r--r--base/gsicc_create.c14
-rw-r--r--base/gsicc_create.h2
-rw-r--r--base/gsicc_lcms2.c2
-rw-r--r--base/gsicc_lcms2mt.c2
-rw-r--r--base/gsicc_manage.c80
-rw-r--r--base/gsicc_manage.h2
-rw-r--r--base/gsicc_monitorcm.c4
-rw-r--r--base/gsicc_nocm.c2
-rw-r--r--base/gsicc_profilecache.c14
-rw-r--r--base/gsicc_profilecache.h2
-rw-r--r--base/gsicc_replacecm.c2
-rw-r--r--base/gsimage.c18
-rw-r--r--base/gsimage.h2
-rw-r--r--base/gsimpath.c2
-rw-r--r--base/gsinit.c2
-rw-r--r--base/gsio.h2
-rw-r--r--base/gsiodev.c6
-rw-r--r--base/gsiodevs.c2
-rw-r--r--base/gsiodisk.c2
-rw-r--r--base/gsioram.c2
-rw-r--r--base/gsiorom.c39
-rw-r--r--base/gsiorom.h2
-rw-r--r--base/gsipar3x.h2
-rw-r--r--base/gsiparam.h2
-rw-r--r--base/gsiparm3.h2
-rw-r--r--base/gsiparm4.h2
-rw-r--r--base/gsjconf.h2
-rw-r--r--base/gsjmorec.h2
-rw-r--r--base/gslib.c14
-rw-r--r--base/gslib.h2
-rw-r--r--base/gslibctx.c238
-rw-r--r--base/gslibctx.h66
-rw-r--r--base/gsline.c2
-rw-r--r--base/gsline.h2
-rw-r--r--base/gslparam.h2
-rw-r--r--base/gsmalloc.c41
-rw-r--r--base/gsmalloc.h2
-rw-r--r--base/gsmatrix.c2
-rw-r--r--base/gsmatrix.h2
-rw-r--r--base/gsmchunk.c38
-rw-r--r--base/gsmchunk.h2
-rw-r--r--base/gsmd5.c2
-rw-r--r--base/gsmd5.h2
-rw-r--r--base/gsmdebug.h2
-rw-r--r--base/gsmemory.c33
-rw-r--r--base/gsmemory.h2
-rw-r--r--base/gsmemraw.h2
-rw-r--r--base/gsmemret.c2
-rw-r--r--base/gsmemret.h2
-rw-r--r--base/gsmisc.c31
-rw-r--r--base/gsnamecl.c2
-rw-r--r--base/gsnamecl.h2
-rw-r--r--base/gsncdummy.c6
-rw-r--r--base/gsncdummy.h2
-rw-r--r--base/gsnogc.c2
-rw-r--r--base/gsnogc.h2
-rw-r--r--base/gsnotify.c2
-rw-r--r--base/gsnotify.h2
-rw-r--r--base/gsovrc.c2
-rw-r--r--base/gsovrc.h2
-rw-r--r--base/gspaint.c64
-rw-r--r--base/gspaint.h2
-rw-r--r--base/gsparam.c148
-rw-r--r--base/gsparam.h41
-rw-r--r--base/gsparam2.c10
-rw-r--r--base/gsparaml.c1048
-rw-r--r--base/gsparams.c6
-rw-r--r--base/gsparams.h2
-rw-r--r--base/gsparamx.c2
-rw-r--r--base/gsparamx.h2
-rw-r--r--base/gspath.c2
-rw-r--r--base/gspath.h2
-rw-r--r--base/gspath1.c2
-rw-r--r--base/gspath2.h2
-rw-r--r--base/gspcolor.c8
-rw-r--r--base/gspcolor.h17
-rw-r--r--base/gspenum.h2
-rw-r--r--base/gspmdrv.c2
-rw-r--r--base/gspmdrv.h2
-rw-r--r--base/gspmdrv.rc4
-rw-r--r--base/gsptype1.c78
-rw-r--r--base/gsptype1.h3
-rw-r--r--base/gsptype2.c2
-rw-r--r--base/gsptype2.h2
-rw-r--r--base/gsrect.h2
-rw-r--r--base/gsrefct.h4
-rw-r--r--base/gsromfs0.c2
-rw-r--r--base/gsrop.c2
-rw-r--r--base/gsrop.h2
-rw-r--r--base/gsroprun.c6
-rw-r--r--base/gsroprun1.h2
-rw-r--r--base/gsroprun24.h2
-rw-r--r--base/gsroprun8.h2
-rw-r--r--base/gsropt.h2
-rw-r--r--base/gsroptab.c2
-rw-r--r--base/gsserial.c2
-rw-r--r--base/gsserial.h2
-rw-r--r--base/gsshade.c2
-rw-r--r--base/gsshade.h2
-rw-r--r--base/gssprintf.h2
-rw-r--r--base/gsstate.c100
-rw-r--r--base/gsstate.h2
-rw-r--r--base/gsstrl.h2
-rw-r--r--base/gsstrtok.h2
-rw-r--r--base/gsstruct.h6
-rw-r--r--base/gsstype.h2
-rw-r--r--base/gstext.c6
-rw-r--r--base/gstext.h2
-rw-r--r--base/gstiffio.c48
-rw-r--r--base/gstiffio.h2
-rw-r--r--base/gstparam.h10
-rw-r--r--base/gstrans.c117
-rw-r--r--base/gstrans.h24
-rw-r--r--base/gstrap.c2
-rw-r--r--base/gstrap.h2
-rw-r--r--base/gstype1.c14
-rw-r--r--base/gstype1.h2
-rw-r--r--base/gstype2.c18
-rw-r--r--base/gstype42.c34
-rw-r--r--base/gstypes.h2
-rw-r--r--base/gsuid.h2
-rw-r--r--base/gsutil.c2
-rw-r--r--base/gsutil.h2
-rw-r--r--base/gswin.rc2
-rw-r--r--base/gsxfont.h2
-rw-r--r--base/gx.h2
-rw-r--r--base/gxacpath.c30
-rw-r--r--base/gxalloc.h16
-rw-r--r--base/gxalpha.h2
-rw-r--r--base/gxarith.h2
-rw-r--r--base/gxband.h2
-rw-r--r--base/gxbcache.c11
-rw-r--r--base/gxbcache.h2
-rw-r--r--base/gxbitfmt.h2
-rw-r--r--base/gxbitmap.h2
-rw-r--r--base/gxbitops.h2
-rw-r--r--base/gxblend.c262
-rw-r--r--base/gxblend.h6
-rw-r--r--base/gxblend1.c271
-rw-r--r--base/gxccache.c27
-rw-r--r--base/gxccman.c38
-rw-r--r--base/gxcdevn.h2
-rw-r--r--base/gxchar.c2
-rw-r--r--base/gxchar.h2
-rw-r--r--base/gxchrout.c2
-rw-r--r--base/gxchrout.h2
-rw-r--r--base/gxcht.c2
-rw-r--r--base/gxcid.h2
-rw-r--r--base/gxcie.h2
-rw-r--r--base/gxcindex.h2
-rw-r--r--base/gxclbits.c5
-rw-r--r--base/gxcldev.h2
-rw-r--r--base/gxclfile.c2
-rw-r--r--base/gxclimag.c54
-rw-r--r--base/gxclio.h2
-rw-r--r--base/gxclip.c2
-rw-r--r--base/gxclip.h2
-rw-r--r--base/gxclip2.c4
-rw-r--r--base/gxclip2.h2
-rw-r--r--base/gxclipm.c4
-rw-r--r--base/gxclipm.h2
-rw-r--r--base/gxclipsr.h2
-rw-r--r--base/gxclist.c64
-rw-r--r--base/gxclist.h58
-rw-r--r--base/gxcllzw.c2
-rw-r--r--base/gxclmem.c10
-rw-r--r--base/gxclmem.h2
-rw-r--r--base/gxclpage.c2
-rw-r--r--base/gxclpage.h2
-rw-r--r--base/gxclpath.c52
-rw-r--r--base/gxclpath.h8
-rw-r--r--base/gxclrast.c96
-rw-r--r--base/gxclread.c8
-rw-r--r--base/gxclrect.c11
-rw-r--r--base/gxclthrd.c30
-rw-r--r--base/gxclthrd.h2
-rw-r--r--base/gxclutil.c28
-rw-r--r--base/gxclzlib.c2
-rw-r--r--base/gxcmap.c52
-rw-r--r--base/gxcmap.h2
-rw-r--r--base/gxcolor2.h2
-rw-r--r--base/gxcomp.h2
-rw-r--r--base/gxcoord.h2
-rw-r--r--base/gxcpath.c20
-rw-r--r--base/gxcpath.h4
-rw-r--r--base/gxcspace.h2
-rw-r--r--base/gxctable.c2
-rw-r--r--base/gxctable.h2
-rw-r--r--base/gxcvalue.h2
-rw-r--r--base/gxdcconv.c2
-rw-r--r--base/gxdcconv.h2
-rw-r--r--base/gxdcolor.c2
-rw-r--r--base/gxdcolor.h2
-rw-r--r--base/gxdda.h2
-rw-r--r--base/gxdevbuf.h2
-rw-r--r--base/gxdevcli.h26
-rw-r--r--base/gxdevice.h2
-rw-r--r--base/gxdevmem.h10
-rw-r--r--base/gxdevndi.c2
-rw-r--r--base/gxdevrop.h2
-rw-r--r--base/gxdevsop.h25
-rw-r--r--base/gxdht.h2
-rw-r--r--base/gxdhtres.h2
-rw-r--r--base/gxdhtserial.c2
-rw-r--r--base/gxdhtserial.h2
-rw-r--r--base/gxdither.h2
-rw-r--r--base/gxdownscale.c937
-rw-r--r--base/gxdownscale.h245
-rw-r--r--base/gxdtfill.h2
-rw-r--r--base/gxfapi.c8
-rw-r--r--base/gxfapi.h64
-rw-r--r--base/gxfapiu.c2
-rw-r--r--base/gxfapiu.h2
-rw-r--r--base/gxfarith.h2
-rw-r--r--base/gxfcache.h2
-rw-r--r--base/gxfcid.h2
-rw-r--r--base/gxfcmap.h2
-rw-r--r--base/gxfcmap1.h2
-rw-r--r--base/gxfill.c38
-rw-r--r--base/gxfill.h2
-rw-r--r--base/gxfillsl.h6
-rw-r--r--base/gxfilltr.h2
-rw-r--r--base/gxfillts.h2
-rw-r--r--base/gxfixed.h2
-rw-r--r--base/gxfmap.h2
-rw-r--r--base/gxfont.h2
-rw-r--r--base/gxfont0.h2
-rw-r--r--base/gxfont0c.h2
-rw-r--r--base/gxfont1.h2
-rw-r--r--base/gxfont42.h4
-rw-r--r--base/gxfrac.h2
-rw-r--r--base/gxftype.h2
-rw-r--r--base/gxfunc.h2
-rw-r--r--base/gxgetbit.h2
-rw-r--r--base/gxgstate.h25
-rw-r--r--base/gxhintn.c6
-rw-r--r--base/gxhintn.h2
-rw-r--r--base/gxhintn1.c2
-rw-r--r--base/gxhldevc.c2
-rw-r--r--base/gxhldevc.h2
-rw-r--r--base/gxht.c6
-rw-r--r--base/gxht.h4
-rw-r--r--base/gxht_thresh.c6
-rw-r--r--base/gxht_thresh.h2
-rw-r--r--base/gxhtbit.c4
-rw-r--r--base/gxhttile.h2
-rw-r--r--base/gxhttype.h2
-rw-r--r--base/gxi12bit.c10
-rw-r--r--base/gxi16bit.c2
-rw-r--r--base/gxiclass.h2
-rw-r--r--base/gxicolor.c14
-rw-r--r--base/gxidata.c4
-rw-r--r--base/gxifast.c2
-rw-r--r--base/gximag3x.c2
-rw-r--r--base/gximag3x.h2
-rw-r--r--base/gximage.c2
-rw-r--r--base/gximage.h2
-rw-r--r--base/gximage1.c2
-rw-r--r--base/gximage3.c2
-rw-r--r--base/gximage3.h2
-rw-r--r--base/gximage4.c2
-rw-r--r--base/gximask.c2
-rw-r--r--base/gximask.h2
-rw-r--r--base/gximdecode.c2
-rw-r--r--base/gximdecode.h5
-rw-r--r--base/gximono.c8
-rw-r--r--base/gxiodev.h9
-rw-r--r--base/gxiparam.h2
-rw-r--r--base/gxipixel.c4
-rw-r--r--base/gxiscale.c18
-rw-r--r--base/gxline.h2
-rw-r--r--base/gxlum.h2
-rw-r--r--base/gxmatrix.h2
-rw-r--r--base/gxmclip.c2
-rw-r--r--base/gxmclip.h2
-rw-r--r--base/gxobj.h2
-rw-r--r--base/gxoprect.c2
-rw-r--r--base/gxoprect.h2
-rw-r--r--base/gxp1fill.c2
-rw-r--r--base/gxp1impl.h2
-rw-r--r--base/gxpaint.c2
-rw-r--r--base/gxpaint.h2
-rw-r--r--base/gxpath.c52
-rw-r--r--base/gxpath.h2
-rw-r--r--base/gxpath2.c2
-rw-r--r--base/gxpcache.h6
-rw-r--r--base/gxpcmap.c48
-rw-r--r--base/gxpcolor.h8
-rw-r--r--base/gxpcopy.c2
-rw-r--r--base/gxpdash.c2
-rw-r--r--base/gxpflat.c2
-rw-r--r--base/gxrplane.h2
-rw-r--r--base/gxsample.c2
-rw-r--r--base/gxsample.h2
-rw-r--r--base/gxsamplp.h2
-rw-r--r--base/gxscanc.c2
-rw-r--r--base/gxscanc.h2
-rw-r--r--base/gxshade.c34
-rw-r--r--base/gxshade.h2
-rw-r--r--base/gxshade1.c2
-rw-r--r--base/gxshade4.c6
-rw-r--r--base/gxshade4.h2
-rw-r--r--base/gxshade6.c4
-rw-r--r--base/gxstate.h4
-rw-r--r--base/gxstdio.h2
-rw-r--r--base/gxstroke.c582
-rw-r--r--base/gxsync.c2
-rw-r--r--base/gxsync.h2
-rw-r--r--base/gxtext.h2
-rw-r--r--base/gxtmap.h2
-rw-r--r--base/gxttf.h2
-rw-r--r--base/gxttfb.c2
-rw-r--r--base/gxttfb.h2
-rw-r--r--base/gxtype1.c2
-rw-r--r--base/gxtype1.h2
-rw-r--r--base/gxxfont.h2
-rw-r--r--base/gzacpath.h2
-rw-r--r--base/gzcpath.h2
-rw-r--r--base/gzht.h2
-rw-r--r--base/gzline.h2
-rw-r--r--base/gzpath.h2
-rw-r--r--base/gzspotan.c2
-rw-r--r--base/gzspotan.h2
-rw-r--r--base/gzstate.h2
-rw-r--r--base/ijs.mak2
-rwxr-xr-xbase/instcopy2
-rw-r--r--base/jbig2.mak2
-rw-r--r--base/jerror_.h2
-rw-r--r--base/jmemcust.c2
-rw-r--r--base/jmemcust.h2
-rw-r--r--base/jpeg.mak70
-rw-r--r--base/jpegxr.mak2
-rw-r--r--base/lcms2.mak2
-rw-r--r--base/lcms2mt.mak4
-rw-r--r--base/lcups.mak2
-rw-r--r--base/lcupsi.mak2
-rw-r--r--base/ldf_jb2.mak2
-rw-r--r--base/leptonica.mak644
-rw-r--r--base/lib.mak7347
-rw-r--r--base/locale_.h2
-rw-r--r--base/lwf_jp2.mak2
-rw-r--r--base/malloc_.h28
-rw-r--r--base/math_.h2
-rw-r--r--base/memento.c2
-rw-r--r--base/memento.h2
-rw-r--r--base/memory_.h81
-rw-r--r--base/mkromfs.c28
-rw-r--r--base/msvccmd.mak3
-rw-r--r--base/msvclib.mak31
-rw-r--r--base/msvctail.mak2
-rw-r--r--base/ocr.mak46
-rw-r--r--base/openjpeg.mak2
-rw-r--r--base/openvms.mak2
-rw-r--r--base/openvms.mmk2
-rw-r--r--base/pack_ps.c2
-rw-r--r--base/pcwin.mak2
-rw-r--r--base/pipe_.h2
-rw-r--r--base/png.mak2
-rw-r--r--base/png_.h2
-rw-r--r--base/ramfs.c2
-rw-r--r--base/ramfs.h2
-rw-r--r--base/sa85d.c2
-rw-r--r--base/sa85d.h11
-rw-r--r--base/sa85x.h2
-rw-r--r--base/saes.c2
-rw-r--r--base/saes.h2
-rw-r--r--base/sarc4.c2
-rw-r--r--base/sarc4.h2
-rw-r--r--base/sbcp.c2
-rw-r--r--base/sbcp.h2
-rw-r--r--base/sbtx.h2
-rw-r--r--base/scanchar.h2
-rw-r--r--base/scantab.c2
-rw-r--r--base/scf.h2
-rw-r--r--base/scfd.c6
-rw-r--r--base/scfdgen.c2
-rw-r--r--base/scfdtab.c2
-rw-r--r--base/scfe.c15
-rw-r--r--base/scfetab.c2
-rw-r--r--base/scfparam.c2
-rw-r--r--base/scfx.h2
-rw-r--r--base/scommon.h2
-rw-r--r--base/sdcparam.c2
-rw-r--r--base/sdcparam.h2
-rw-r--r--base/sdct.h2
-rw-r--r--base/sdctc.c2
-rw-r--r--base/sdctd.c2
-rw-r--r--base/sdcte.c2
-rw-r--r--base/sddparam.c2
-rw-r--r--base/sdeparam.c2
-rw-r--r--base/seexec.c4
-rw-r--r--base/setjmp_.h2
-rw-r--r--base/sfilter.h2
-rw-r--r--base/sfilter1.c2
-rw-r--r--base/sfilter2.c2
-rw-r--r--base/sfxboth.c2
-rw-r--r--base/sfxcommon.c2
-rw-r--r--base/sfxfd.c18
-rw-r--r--base/sfxstdio.c6
-rw-r--r--base/shc.c2
-rw-r--r--base/shc.h2
-rw-r--r--base/sidscale.c8
-rw-r--r--base/sidscale.h2
-rw-r--r--base/siinterp.c2
-rw-r--r--base/siinterp.h2
-rw-r--r--base/simscale.c8402
-rw-r--r--base/simscale.h8
-rw-r--r--base/simscale_foo.c2507
-rw-r--r--base/simscale_foo.h (renamed from base/gsalpha.h)22
-rw-r--r--base/siscale.c6
-rw-r--r--base/siscale.h2
-rw-r--r--base/siscale_cal.c2
-rw-r--r--base/sisparam.h2
-rw-r--r--base/sjbig2.c18
-rw-r--r--base/sjbig2.h4
-rw-r--r--base/sjbig2_luratech.c2
-rw-r--r--base/sjbig2_luratech.h2
-rw-r--r--base/sjpeg.h2
-rw-r--r--base/sjpegc.c2
-rw-r--r--base/sjpegd.c2
-rw-r--r--base/sjpege.c2
-rw-r--r--base/sjpx_luratech.c2
-rw-r--r--base/sjpx_luratech.h2
-rw-r--r--base/sjpx_none.c2
-rw-r--r--base/sjpx_openjpeg.c17
-rw-r--r--base/sjpx_openjpeg.h2
-rw-r--r--base/slzwc.c2
-rw-r--r--base/slzwd.c2
-rw-r--r--base/slzwe.c2
-rw-r--r--base/slzwx.h2
-rw-r--r--base/smd5.c2
-rw-r--r--base/smd5.h2
-rw-r--r--base/smtf.h2
-rw-r--r--base/spdiff.c2
-rw-r--r--base/spdiffx.h2
-rw-r--r--base/spngp.c2
-rw-r--r--base/spngpx.h2
-rw-r--r--base/spprint.c72
-rw-r--r--base/spprint.h14
-rw-r--r--base/spsdf.c10
-rw-r--r--base/spsdf.h2
-rw-r--r--base/srdline.h2
-rw-r--r--base/srld.c2
-rw-r--r--base/srle.c2
-rw-r--r--base/srlx.h2
-rw-r--r--base/ssha2.c2
-rw-r--r--base/ssha2.h2
-rw-r--r--base/sstring.c2
-rw-r--r--base/sstring.h2
-rw-r--r--base/stat_.h2
-rw-r--r--base/std.h3
-rw-r--r--base/stdint_.h18
-rw-r--r--base/stdio_.h2
-rw-r--r--base/stdpre.h22
-rw-r--r--base/stream.c36
-rw-r--r--base/stream.h4
-rw-r--r--base/strimpl.h2
-rw-r--r--base/string_.h2
-rw-r--r--base/strmio.c4
-rw-r--r--base/strmio.h2
-rw-r--r--base/stub.mak2
-rw-r--r--base/szlibc.c4
-rw-r--r--base/szlibd.c2
-rw-r--r--base/szlibe.c2
-rw-r--r--base/szlibx.h2
-rw-r--r--base/szlibxx.h2
-rw-r--r--base/tess_version.h30
-rw-r--r--base/tesseract.mak1173
-rw-r--r--base/tessocr.cpp443
-rw-r--r--base/tessocr.h45
-rw-r--r--base/tiff.mak116
-rw-r--r--base/time_.h2
-rw-r--r--base/ttcalc.c2
-rw-r--r--base/ttcalc.h2
-rw-r--r--base/ttcommon.h2
-rw-r--r--base/ttconf.h2
-rw-r--r--base/ttconfig.h2
-rw-r--r--base/ttfinp.c2
-rw-r--r--base/ttfinp.h2
-rw-r--r--base/ttfmain.c11
-rw-r--r--base/ttfmemd.c2
-rw-r--r--base/ttfmemd.h2
-rw-r--r--base/ttfoutl.h2
-rw-r--r--base/ttfsfnt.h2
-rw-r--r--base/ttinterp.c2
-rw-r--r--base/ttinterp.h2
-rw-r--r--base/ttload.c2
-rw-r--r--base/ttload.h2
-rw-r--r--base/ttmisc.h2
-rw-r--r--base/ttobjs.c2
-rw-r--r--base/ttobjs.h2
-rw-r--r--base/tttables.h2
-rw-r--r--base/tttype.h2
-rw-r--r--base/tttypes.h2
-rw-r--r--base/ugcclib.mak2
-rw-r--r--base/unistd_.h2
-rw-r--r--base/unix-aux.mak2
-rw-r--r--base/unix-dll.mak2
-rw-r--r--base/unix-end.mak2
-rw-r--r--base/unix-gcc.mak7
-rw-r--r--base/unixansi.mak2
-rw-r--r--base/unixhead.mak2
-rw-r--r--base/unixinst.mak2
-rw-r--r--base/unixlink.mak2
-rw-r--r--base/valgrind.h2
-rw-r--r--base/version.mak15
-rw-r--r--base/vms_x_fix.h2
-rw-r--r--base/vmsmath.h2
-rw-r--r--base/windows_.h2
-rw-r--r--base/winlib.mak13
-rw-r--r--base/winplat.mak2
-rw-r--r--base/winrtsup.cpp2
-rw-r--r--base/winrtsup.h2
-rw-r--r--base/wrfont.c2
-rw-r--r--base/wrfont.h2
-rw-r--r--base/write_t1.c662
-rw-r--r--base/write_t1.h2
-rw-r--r--base/write_t2.c209
-rw-r--r--base/write_t2.h2
-rw-r--r--base/x_.h2
-rw-r--r--base/zlib.mak2
-rwxr-xr-xconfigure829
-rw-r--r--configure.ac334
-rw-r--r--contrib/contrib.mak314
-rw-r--r--contrib/gdevadmp.c2
-rw-r--r--contrib/gdevbjc_.h6
-rw-r--r--contrib/japanese/dmp_init.ps206
-rw-r--r--contrib/japanese/dmp_site.ps14
-rw-r--r--contrib/japanese/doc/gdevdmpr.txt545
-rw-r--r--contrib/japanese/dviprlib.c2823
-rw-r--r--contrib/japanese/escp_24.src12
-rw-r--r--contrib/japanese/gdevdmpr.c888
-rw-r--r--contrib/lips4/gdevlips.h5
-rw-r--r--contrib/lips4/gdevlprn.h5
-rw-r--r--cups/gdevcups.c24
-rw-r--r--cups/libs/cups/globals.c8
-rw-r--r--demos/c/ReadMe.txt31
-rw-r--r--demos/c/api_test.c1157
-rw-r--r--demos/c/api_test.vcxproj239
-rw-r--r--demos/c/api_test.vcxproj.filters14
-rw-r--r--demos/csharp/README.txt32
-rw-r--r--demos/csharp/api/ghostapi.cs199
-rw-r--r--demos/csharp/api/ghostmono.cs1088
-rw-r--r--demos/csharp/api/ghostnet.cs1198
-rw-r--r--demos/csharp/linux/gs_mono.sln17
-rw-r--r--demos/csharp/linux/gtk_viewer/Properties/AssemblyInfo.cs26
-rw-r--r--demos/csharp/linux/gtk_viewer/gtk-gui/generated.cs30
-rw-r--r--demos/csharp/linux/gtk_viewer/gtk-gui/gtk_viewer.src.gsOutput.cs10
-rw-r--r--demos/csharp/linux/gtk_viewer/gtk-gui/gui.stetic18
-rw-r--r--demos/csharp/linux/gtk_viewer/gtk_viewer.csproj73
-rw-r--r--demos/csharp/linux/gtk_viewer/gtk_viewer.sln17
-rw-r--r--demos/csharp/linux/gtk_viewer/src/DocPage.cs108
-rw-r--r--demos/csharp/linux/gtk_viewer/src/MainRender.cs136
-rw-r--r--demos/csharp/linux/gtk_viewer/src/MainThumbRendering.cs91
-rw-r--r--demos/csharp/linux/gtk_viewer/src/MainWindow.cs713
-rw-r--r--demos/csharp/linux/gtk_viewer/src/MainZoom.cs203
-rw-r--r--demos/csharp/linux/gtk_viewer/src/Program.cs25
-rw-r--r--demos/csharp/linux/gtk_viewer/src/TempFile.cs34
-rw-r--r--demos/csharp/linux/gtk_viewer/src/gsOutput.cs41
-rw-r--r--demos/csharp/windows/ghostnet.sln37
-rw-r--r--demos/csharp/windows/ghostnet_wpf_example/About.xaml94
-rw-r--r--demos/csharp/windows/ghostnet_wpf_example/About.xaml.cs254
-rw-r--r--demos/csharp/windows/ghostnet_wpf_example/App.config6
-rw-r--r--demos/csharp/windows/ghostnet_wpf_example/App.xaml9
-rw-r--r--demos/csharp/windows/ghostnet_wpf_example/App.xaml.cs17
-rw-r--r--demos/csharp/windows/ghostnet_wpf_example/DocPage.cs109
-rw-r--r--demos/csharp/windows/ghostnet_wpf_example/MainPrint.cs187
-rw-r--r--demos/csharp/windows/ghostnet_wpf_example/MainRender.cs135
-rw-r--r--demos/csharp/windows/ghostnet_wpf_example/MainThumbRendering.cs116
-rw-r--r--demos/csharp/windows/ghostnet_wpf_example/MainWindow.xaml214
-rw-r--r--demos/csharp/windows/ghostnet_wpf_example/MainWindow.xaml.cs739
-rw-r--r--demos/csharp/windows/ghostnet_wpf_example/MainZoom.cs168
-rw-r--r--demos/csharp/windows/ghostnet_wpf_example/PrintControl.xaml148
-rw-r--r--demos/csharp/windows/ghostnet_wpf_example/PrintControl.xaml.cs517
-rw-r--r--demos/csharp/windows/ghostnet_wpf_example/Properties/AssemblyInfo.cs55
-rw-r--r--demos/csharp/windows/ghostnet_wpf_example/Properties/Resources.Designer.cs71
-rw-r--r--demos/csharp/windows/ghostnet_wpf_example/Properties/Resources.resx117
-rw-r--r--demos/csharp/windows/ghostnet_wpf_example/Properties/Settings.Designer.cs30
-rw-r--r--demos/csharp/windows/ghostnet_wpf_example/Properties/Settings.settings7
-rw-r--r--demos/csharp/windows/ghostnet_wpf_example/TempFile.cs34
-rw-r--r--demos/csharp/windows/ghostnet_wpf_example/XPSprint.cs587
-rw-r--r--demos/csharp/windows/ghostnet_wpf_example/ghostnet_simple_viewer.csproj194
-rw-r--r--demos/csharp/windows/ghostnet_wpf_example/gsIO.cs29
-rw-r--r--demos/csharp/windows/ghostnet_wpf_example/gsOutput.xaml28
-rw-r--r--demos/csharp/windows/ghostnet_wpf_example/gsOutput.xaml.cs49
-rw-r--r--demos/python/README.txt17
-rwxr-xr-xdemos/python/examples.py171
-rwxr-xr-xdemos/python/gsapi.py1049
-rwxr-xr-xdemos/python/gsapiwrap.py699
-rw-r--r--demos/python/jlib.py1355
-rw-r--r--devices/dcontrib.mak (renamed from devices/contrib.mak)312
-rw-r--r--devices/devs.mak2611
-rw-r--r--devices/gdev3852.c2
-rw-r--r--devices/gdev4081.c2
-rw-r--r--devices/gdev8510.c2
-rw-r--r--devices/gdev8bcm.c2
-rw-r--r--devices/gdev8bcm.h2
-rw-r--r--devices/gdevatx.c2
-rw-r--r--devices/gdevbit.c12
-rw-r--r--devices/gdevbj10.c2
-rw-r--r--devices/gdevbjc.h2
-rw-r--r--devices/gdevbjcl.c2
-rw-r--r--devices/gdevbjcl.h2
-rw-r--r--devices/gdevbmp.c2
-rw-r--r--devices/gdevbmp.h2
-rw-r--r--devices/gdevbmpc.c2
-rw-r--r--devices/gdevccr.c2
-rw-r--r--devices/gdevcdj.c8
-rw-r--r--devices/gdevcfax.c2
-rw-r--r--devices/gdevchameleon.c25
-rw-r--r--devices/gdevcif.c2
-rw-r--r--devices/gdevclj.c2
-rw-r--r--devices/gdevcljc.c2
-rw-r--r--devices/gdevcmykog.c4
-rw-r--r--devices/gdevcslw.c2
-rw-r--r--devices/gdevdfax.c2
-rw-r--r--devices/gdevdjet.c2
-rw-r--r--devices/gdevdjtc.c2
-rw-r--r--devices/gdevdljm.c2
-rw-r--r--devices/gdevdljm.h2
-rw-r--r--devices/gdevdm24.c6
-rw-r--r--devices/gdevdsp.c854
-rw-r--r--devices/gdevdsp.h182
-rw-r--r--devices/gdevdsp2.h11
-rw-r--r--devices/gdevepsc.c2
-rw-r--r--devices/gdevepsn.c2
-rw-r--r--devices/gdevescp.c2
-rw-r--r--devices/gdevfax.c14
-rw-r--r--devices/gdevfax.h2
-rw-r--r--devices/gdevfpng.c2
-rw-r--r--devices/gdevhl7x.c2
-rw-r--r--devices/gdevicov.c2
-rw-r--r--devices/gdevijs.c4
-rw-r--r--devices/gdevimgn.c2
-rw-r--r--devices/gdevjbig2.c2
-rw-r--r--devices/gdevjpeg.c10
-rw-r--r--devices/gdevjpx.c2
-rw-r--r--devices/gdevl31s.c2
-rw-r--r--devices/gdevlbp8.c2
-rw-r--r--devices/gdevlj56.c2
-rw-r--r--devices/gdevlp8k.c2
-rw-r--r--devices/gdevlxm.c2
-rw-r--r--devices/gdevmeds.c2
-rw-r--r--devices/gdevmeds.h2
-rw-r--r--devices/gdevmgr.c9
-rw-r--r--devices/gdevmgr.h2
-rw-r--r--devices/gdevmiff.c2
-rw-r--r--devices/gdevn533.c2
-rw-r--r--devices/gdevo182.c2
-rw-r--r--devices/gdevocr.c265
-rw-r--r--devices/gdevokii.c2
-rw-r--r--devices/gdevpbm.c2
-rw-r--r--devices/gdevpcl.c2
-rw-r--r--devices/gdevpcl.h2
-rw-r--r--devices/gdevpcx.c2
-rw-r--r--devices/gdevpdfimg.c241
-rw-r--r--devices/gdevpdfimg.h105
-rw-r--r--devices/gdevpdfocr.c727
-rw-r--r--devices/gdevpe.c2
-rw-r--r--devices/gdevperm.c2
-rw-r--r--devices/gdevphex.c2
-rw-r--r--devices/gdevpjet.c2
-rw-r--r--devices/gdevplan.c2
-rw-r--r--devices/gdevplib.c2
-rw-r--r--devices/gdevplib.h2
-rw-r--r--devices/gdevpm.h2
-rw-r--r--devices/gdevpng.c65
-rw-r--r--devices/gdevpsd.c13
-rw-r--r--devices/gdevpsd.h2
-rw-r--r--devices/gdevpsim.c2
-rw-r--r--devices/gdevpxut.c2
-rw-r--r--devices/gdevpxut.h2
-rw-r--r--devices/gdevrinkj.c2
-rw-r--r--devices/gdevsj48.c2
-rw-r--r--devices/gdevsnfb.c2
-rw-r--r--devices/gdevsppr.c2
-rw-r--r--devices/gdevstc.c2
-rw-r--r--devices/gdevstc.h2
-rw-r--r--devices/gdevstc1.c2
-rw-r--r--devices/gdevstc2.c2
-rw-r--r--devices/gdevstc3.c2
-rw-r--r--devices/gdevstc4.c2
-rw-r--r--devices/gdevtfax.c2
-rw-r--r--devices/gdevtfax.h2
-rw-r--r--devices/gdevtfnx.c4
-rw-r--r--devices/gdevtifs.c56
-rw-r--r--devices/gdevtifs.h8
-rw-r--r--devices/gdevtknk.c2
-rw-r--r--devices/gdevtrac.c2
-rw-r--r--devices/gdevtsep.c71
-rw-r--r--devices/gdevupd.c6
-rw-r--r--devices/gdevwpr2.c2
-rw-r--r--devices/gdevx.c6
-rw-r--r--devices/gdevx.h2
-rw-r--r--devices/gdevxalt.c2
-rw-r--r--devices/gdevxcf.c2
-rw-r--r--devices/gdevxcmp.c2
-rw-r--r--devices/gdevxcmp.h2
-rw-r--r--devices/gdevxini.c2
-rw-r--r--devices/gdevxres.c2
-rw-r--r--devices/gxfcopy.c39
-rw-r--r--devices/gxfcopy.h2
-rw-r--r--devices/minftrsz.c2
-rw-r--r--devices/minftrsz.h2
-rw-r--r--devices/rinkj/evenbetter-rll.c2
-rw-r--r--devices/rinkj/evenbetter-rll.h7
-rw-r--r--devices/rinkj/rinkj-byte-stream.c2
-rw-r--r--devices/rinkj/rinkj-byte-stream.h7
-rw-r--r--devices/rinkj/rinkj-config.c2
-rw-r--r--devices/rinkj/rinkj-config.h7
-rw-r--r--devices/rinkj/rinkj-device.c2
-rw-r--r--devices/rinkj/rinkj-device.h6
-rw-r--r--devices/rinkj/rinkj-dither.c2
-rw-r--r--devices/rinkj/rinkj-dither.h6
-rw-r--r--devices/rinkj/rinkj-epson870.c2
-rw-r--r--devices/rinkj/rinkj-epson870.h6
-rw-r--r--devices/rinkj/rinkj-screen-eb.c2
-rw-r--r--devices/rinkj/rinkj-screen-eb.h7
-rw-r--r--devices/vector/gdevagl.c2
-rw-r--r--devices/vector/gdevagl.h7
-rw-r--r--devices/vector/gdevpdf.c56
-rw-r--r--devices/vector/gdevpdfb.c2
-rw-r--r--devices/vector/gdevpdfb.h2
-rw-r--r--devices/vector/gdevpdfc.c11
-rw-r--r--devices/vector/gdevpdfc.h2
-rw-r--r--devices/vector/gdevpdfd.c146
-rw-r--r--devices/vector/gdevpdfe.c2
-rw-r--r--devices/vector/gdevpdfg.c13
-rw-r--r--devices/vector/gdevpdfg.h6
-rw-r--r--devices/vector/gdevpdfi.c20
-rw-r--r--devices/vector/gdevpdfj.c2
-rw-r--r--devices/vector/gdevpdfk.c24
-rw-r--r--devices/vector/gdevpdfm.c2
-rw-r--r--devices/vector/gdevpdfo.c6
-rw-r--r--devices/vector/gdevpdfo.h2
-rw-r--r--devices/vector/gdevpdfp.c2
-rw-r--r--devices/vector/gdevpdfr.c2
-rw-r--r--devices/vector/gdevpdft.c13
-rw-r--r--devices/vector/gdevpdfu.c67
-rw-r--r--devices/vector/gdevpdfv.c2
-rw-r--r--devices/vector/gdevpdfx.h15
-rw-r--r--devices/vector/gdevpdt.c2
-rw-r--r--devices/vector/gdevpdt.h2
-rw-r--r--devices/vector/gdevpdtb.c4
-rw-r--r--devices/vector/gdevpdtb.h2
-rw-r--r--devices/vector/gdevpdtc.c2
-rw-r--r--devices/vector/gdevpdtd.c2
-rw-r--r--devices/vector/gdevpdtd.h2
-rw-r--r--devices/vector/gdevpdte.c4
-rw-r--r--devices/vector/gdevpdtf.c3
-rw-r--r--devices/vector/gdevpdtf.h12
-rw-r--r--devices/vector/gdevpdti.c6
-rw-r--r--devices/vector/gdevpdti.h2
-rw-r--r--devices/vector/gdevpdts.c47
-rw-r--r--devices/vector/gdevpdts.h2
-rw-r--r--devices/vector/gdevpdtt.c2
-rw-r--r--devices/vector/gdevpdtt.h2
-rw-r--r--devices/vector/gdevpdtv.c2
-rw-r--r--devices/vector/gdevpdtv.h2
-rw-r--r--devices/vector/gdevpdtw.c6
-rw-r--r--devices/vector/gdevpdtw.h2
-rw-r--r--devices/vector/gdevpdtx.h2
-rw-r--r--devices/vector/gdevpsdf.h7
-rw-r--r--devices/vector/gdevpsdi.c8
-rw-r--r--devices/vector/gdevpsdp.c93
-rw-r--r--devices/vector/gdevpsds.c8
-rw-r--r--devices/vector/gdevpsds.h2
-rw-r--r--devices/vector/gdevpsdu.c2
-rw-r--r--devices/vector/gdevpsf.h2
-rw-r--r--devices/vector/gdevpsf1.c2
-rw-r--r--devices/vector/gdevpsf2.c4
-rw-r--r--devices/vector/gdevpsfm.c2
-rw-r--r--devices/vector/gdevpsft.c2
-rw-r--r--devices/vector/gdevpsfu.c2
-rw-r--r--devices/vector/gdevpsfx.c2
-rw-r--r--devices/vector/gdevpsu.c2
-rw-r--r--devices/vector/gdevpsu.h2
-rw-r--r--devices/vector/gdevpx.c2
-rw-r--r--devices/vector/gdevtxtw.c199
-rw-r--r--devices/vector/gdevxps.c4
-rw-r--r--devices/vector/opdfread.ps202
-rw-r--r--devices/vector/whitelst.c2
-rw-r--r--devices/vector/whitelst.h2
-rw-r--r--doc/API.htm733
-rw-r--r--doc/C-style.htm11
-rw-r--r--doc/Commprod.htm11
-rw-r--r--doc/DLL.htm13
-rw-r--r--doc/Deprecated.htm13
-rw-r--r--doc/Develop.htm13
-rw-r--r--doc/Devices.htm103
-rw-r--r--doc/Drivers.htm13
-rw-r--r--doc/Fonts.htm13
-rw-r--r--doc/GPDL.htm618
-rw-r--r--doc/History9.htm13453
-rw-r--r--doc/Install.htm13
-rw-r--r--doc/Internal.htm13
-rw-r--r--doc/Language.htm104
-rw-r--r--doc/Lib.htm13
-rw-r--r--doc/Make.htm13
-rw-r--r--doc/News.htm83
-rw-r--r--doc/Ps-style.htm13
-rw-r--r--doc/Ps2epsi.htm13
-rw-r--r--doc/Psfiles.htm13
-rw-r--r--doc/Readme.htm13
-rw-r--r--doc/Release.htm13
-rw-r--r--doc/SavedPages.htm11
-rw-r--r--doc/Source.htm13
-rw-r--r--doc/Unix-lpr.htm13
-rw-r--r--doc/Use.htm62
-rw-r--r--doc/VectorDevices.htm15
-rw-r--r--doc/WhatIsGS.htm13
-rw-r--r--doc/gdevds32.c21
-rw-r--r--doc/gs-vms.hlp2
-rw-r--r--doc/sample_downscale_device.htm11
-rw-r--r--doc/subclass.htm11
-rw-r--r--doc/thirdparty.htm11
-rw-r--r--examples/spots.ps79
-rw-r--r--examples/transparency_example.ps8
-rw-r--r--ijs/Makefile.am2
-rw-r--r--ijs/configure.ac2
-rw-r--r--ijs/ijs.c2
-rw-r--r--ijs/ijs.h7
-rw-r--r--ijs/ijs_client.c2
-rw-r--r--ijs/ijs_client.h7
-rw-r--r--ijs/ijs_client_example.c2
-rw-r--r--ijs/ijs_exec_unix.c2
-rw-r--r--ijs/ijs_exec_win.c6
-rw-r--r--ijs/ijs_server.c2
-rw-r--r--ijs/ijs_server_example.c2
-rw-r--r--ijs/unistd_.h2
-rwxr-xr-xinstall-sh36
-rw-r--r--ios/ios_arch-arm.h2
-rw-r--r--ios/ios_arch-x86.h2
-rw-r--r--jbig2dec/CHANGES23
-rwxr-xr-xjbig2dec/autogen.sh2
-rw-r--r--jbig2dec/config_win32.h2
-rw-r--r--jbig2dec/configure.ac.in13
-rw-r--r--jbig2dec/jbig2.c116
-rw-r--r--jbig2dec/jbig2.h17
-rw-r--r--jbig2dec/jbig2_arith.c152
-rw-r--r--jbig2dec/jbig2_arith.h4
-rw-r--r--jbig2dec/jbig2_arith_iaid.c30
-rw-r--r--jbig2dec/jbig2_arith_iaid.h4
-rw-r--r--jbig2dec/jbig2_arith_int.c46
-rw-r--r--jbig2dec/jbig2_arith_int.h2
-rw-r--r--jbig2dec/jbig2_generic.c83
-rw-r--r--jbig2dec/jbig2_generic.h2
-rw-r--r--jbig2dec/jbig2_halftone.c28
-rw-r--r--jbig2dec/jbig2_halftone.h4
-rw-r--r--jbig2dec/jbig2_huffman.c48
-rw-r--r--jbig2dec/jbig2_huffman.h2
-rw-r--r--jbig2dec/jbig2_hufftab.c2
-rw-r--r--jbig2dec/jbig2_hufftab.h2
-rw-r--r--jbig2dec/jbig2_image.c31
-rw-r--r--jbig2dec/jbig2_image.h2
-rw-r--r--jbig2dec/jbig2_image_pbm.c2
-rw-r--r--jbig2dec/jbig2_image_png.c2
-rw-r--r--jbig2dec/jbig2_image_rw.h2
-rw-r--r--jbig2dec/jbig2_mmr.c69
-rw-r--r--jbig2dec/jbig2_mmr.h2
-rw-r--r--jbig2dec/jbig2_page.c45
-rw-r--r--jbig2dec/jbig2_page.h2
-rw-r--r--jbig2dec/jbig2_priv.h30
-rw-r--r--jbig2dec/jbig2_refinement.c28
-rw-r--r--jbig2dec/jbig2_refinement.h2
-rw-r--r--jbig2dec/jbig2_segment.c16
-rw-r--r--jbig2dec/jbig2_segment.h2
-rw-r--r--jbig2dec/jbig2_symbol_dict.c35
-rw-r--r--jbig2dec/jbig2_symbol_dict.h2
-rw-r--r--jbig2dec/jbig2_text.c68
-rw-r--r--jbig2dec/jbig2_text.h2
-rw-r--r--jbig2dec/jbig2dec.121
-rw-r--r--jbig2dec/jbig2dec.c348
-rw-r--r--jbig2dec/memcmp.c2
-rw-r--r--jbig2dec/msvc.mak4
-rw-r--r--jbig2dec/os_types.h2
-rw-r--r--jbig2dec/pbm2png.c2
-rw-r--r--jbig2dec/snprintf.c163
-rw-r--r--lcms2mt/AUTHORS1
-rw-r--r--lcms2mt/COPYING2
-rw-r--r--lcms2mt/ChangeLog30
-rw-r--r--lcms2mt/Makefile.am13
-rw-r--r--lcms2mt/Makefile.in37
-rw-r--r--lcms2mt/Projects/BorlandC_5.5/lcms2mt.rc30
-rw-r--r--lcms2mt/Projects/BorlandC_5.5/lcmsdll.lk4
-rw-r--r--lcms2mt/Projects/VC2013/lcms2mt.rc12
-rw-r--r--lcms2mt/Projects/VC2013/lcms2mt.slnbin15008 -> 15220 bytes
-rw-r--r--lcms2mt/Projects/VC2013/lcms2mt_DLL/lcms2mt_DLL.vcxproj22
-rw-r--r--lcms2mt/Projects/VC2015/lcms2mt.rc12
-rw-r--r--lcms2mt/Projects/VC2015/lcms2mt.slnbin15004 -> 15216 bytes
-rw-r--r--lcms2mt/Projects/VC2015/lcms2mt_DLL/lcms2mt_DLL.vcxproj2
-rw-r--r--lcms2mt/Projects/VC2015/lcms2mt_DLL/lcms2mt_DLL.vcxproj.filters2
-rw-r--r--lcms2mt/Projects/VC2015/lcms2mt_static/lcms2mt_static.vcxproj2
-rw-r--r--lcms2mt/Projects/VC2015/lcms2mt_static/lcms2mt_static.vcxproj.filters2
-rw-r--r--lcms2mt/Projects/VC2017/lcms2mt.rc12
-rw-r--r--lcms2mt/Projects/VC2017/lcms2mt.slnbin15004 -> 15216 bytes
-rw-r--r--lcms2mt/Projects/VC2017/lcms2mt_DLL/lcms2mt_DLL.vcxproj2
-rw-r--r--lcms2mt/Projects/VC2017/lcms2mt_DLL/lcms2mt_DLL.vcxproj.filters2
-rw-r--r--lcms2mt/Projects/VC2017/lcms2mt_static/lcms2mt_static.vcxproj2
-rw-r--r--lcms2mt/Projects/VC2017/lcms2mt_static/lcms2mt_static.vcxproj.filters2
-rw-r--r--lcms2mt/Projects/VC2019/jpegicc/jpegicc.vcxproj215
-rw-r--r--lcms2mt/Projects/VC2019/jpegicc/jpegicc.vcxproj.filters31
-rw-r--r--lcms2mt/Projects/VC2019/lcms2mt.rc104
-rw-r--r--lcms2mt/Projects/VC2019/lcms2mt.slnbin0 -> 20088 bytes
-rw-r--r--lcms2mt/Projects/VC2019/lcms2mt_DLL/lcms2mt_DLL.vcxproj252
-rw-r--r--lcms2mt/Projects/VC2019/lcms2mt_DLL/lcms2mt_DLL.vcxproj.filters121
-rw-r--r--lcms2mt/Projects/VC2019/lcms2mt_static/lcms2mt_static.vcxproj208
-rw-r--r--lcms2mt/Projects/VC2019/lcms2mt_static/lcms2mt_static.vcxproj.filters108
-rw-r--r--lcms2mt/Projects/VC2019/linkicc/linkicc.vcxproj192
-rw-r--r--lcms2mt/Projects/VC2019/linkicc/linkicc.vcxproj.filters28
-rw-r--r--lcms2mt/Projects/VC2019/psicc/psicc.vcxproj192
-rw-r--r--lcms2mt/Projects/VC2019/psicc/psicc.vcxproj.filters28
-rw-r--r--lcms2mt/Projects/VC2019/resource.h16
-rw-r--r--lcms2mt/Projects/VC2019/testbed/testbed.vcxproj208
-rw-r--r--lcms2mt/Projects/VC2019/testbed/testbed.vcxproj.filters28
-rw-r--r--lcms2mt/Projects/VC2019/tiffdiff/tiffdiff.vcxproj210
-rw-r--r--lcms2mt/Projects/VC2019/tiffdiff/tiffdiff.vcxproj.filters28
-rw-r--r--lcms2mt/Projects/VC2019/tifficc/tifficc.vcxproj211
-rw-r--r--lcms2mt/Projects/VC2019/tifficc/tifficc.vcxproj.filters33
-rw-r--r--lcms2mt/Projects/VC2019/transicc/transicc.vcxproj197
-rw-r--r--lcms2mt/Projects/VC2019/transicc/transicc.vcxproj.filters33
-rw-r--r--lcms2mt/Projects/cppcheck/lcms2mt.cppcheck9
-rwxr-xr-xlcms2mt/Projects/mac/LittleCMS/LittleCMS.xcodeproj/project.pbxproj16
-rw-r--r--lcms2mt/README.1ST18
-rw-r--r--lcms2mt/aclocal.m4191
-rwxr-xr-xlcms2mt/config.guess1
-rw-r--r--lcms2mt/configure232
-rw-r--r--lcms2mt/configure.ac16
-rw-r--r--lcms2mt/doc/LittleCMS2.10 API.pdfbin0 -> 3043432 bytes
-rw-r--r--lcms2mt/doc/LittleCMS2.10 Plugin API.pdfbin0 -> 1984290 bytes
-rw-r--r--lcms2mt/doc/LittleCMS2.10 tutorial.pdfbin0 -> 2201264 bytes
-rw-r--r--lcms2mt/doc/LittleCMS2.9 API.pdfbin4049350 -> 0 bytes
-rw-r--r--lcms2mt/doc/LittleCMS2.9 Plugin API.pdfbin1899759 -> 0 bytes
-rw-r--r--lcms2mt/doc/LittleCMS2.9 tutorial.pdfbin2125096 -> 0 bytes
-rw-r--r--lcms2mt/doc/WhyThisFork.txt4
-rw-r--r--lcms2mt/include/Makefile.in13
-rw-r--r--lcms2mt/include/lcms2mt.h46
-rw-r--r--lcms2mt/include/lcms2mt_plugin.h31
-rw-r--r--lcms2mt/plugins/README.1ST6
-rw-r--r--lcms2mt/plugins/fast_float/COPYING.GPL3674
-rw-r--r--lcms2mt/plugins/fast_float/Makefile12
-rw-r--r--lcms2mt/plugins/fast_float/Projects/VC2019/lcms2mt_fast_float_plugin.vcxproj201
-rw-r--r--lcms2mt/plugins/fast_float/Projects/VC2019/lcms2mt_fast_float_plugin.vcxproj.filters69
-rw-r--r--lcms2mt/plugins/fast_float/Projects/VC2019/lcms2mt_fast_float_plugin.vcxproj.user4
-rw-r--r--lcms2mt/plugins/fast_float/Projects/VC2019/lcms2mt_fast_float_plugin_testbed.vcxproj170
-rw-r--r--lcms2mt/plugins/fast_float/Projects/VC2019/lcms2mt_fast_float_plugin_testbed.vcxproj.filters22
-rw-r--r--lcms2mt/plugins/fast_float/Projects/VC2019/lcms2mt_fast_float_plugin_testbed.vcxproj.user4
-rw-r--r--lcms2mt/plugins/fast_float/doc/LittleCMS fast float extensions 1.0.pdfbin0 -> 1345153 bytes
-rw-r--r--lcms2mt/plugins/fast_float/include/Makefile.am6
-rw-r--r--lcms2mt/plugins/fast_float/include/lcms2mt_fast_float.h139
-rw-r--r--lcms2mt/plugins/fast_float/src/Makefile.am27
-rw-r--r--lcms2mt/plugins/fast_float/src/fast_16_tethra.c370
-rw-r--r--lcms2mt/plugins/fast_float/src/fast_8_curves.c409
-rw-r--r--lcms2mt/plugins/fast_float/src/fast_8_matsh.c399
-rw-r--r--lcms2mt/plugins/fast_float/src/fast_8_tethra.c501
-rw-r--r--lcms2mt/plugins/fast_float/src/fast_float_15bits.c603
-rw-r--r--lcms2mt/plugins/fast_float/src/fast_float_15mats.c347
-rw-r--r--lcms2mt/plugins/fast_float/src/fast_float_cmyk.c379
-rw-r--r--lcms2mt/plugins/fast_float/src/fast_float_curves.c384
-rw-r--r--lcms2mt/plugins/fast_float/src/fast_float_internal.h249
-rw-r--r--lcms2mt/plugins/fast_float/src/fast_float_matsh.c323
-rw-r--r--lcms2mt/plugins/fast_float/src/fast_float_separate.c199
-rw-r--r--lcms2mt/plugins/fast_float/src/fast_float_sup.c90
-rw-r--r--lcms2mt/plugins/fast_float/src/fast_float_tethra.c292
-rw-r--r--lcms2mt/plugins/fast_float/testbed/Makefile.am22
-rw-r--r--lcms2mt/plugins/fast_float/testbed/fast_float_testbed.c1782
-rw-r--r--lcms2mt/plugins/fast_float/testbed/test0.iccbin0 -> 560 bytes
-rw-r--r--lcms2mt/plugins/fast_float/testbed/test1.iccbin0 -> 557536 bytes
-rw-r--r--lcms2mt/plugins/fast_float/testbed/test2.iccbin0 -> 654496 bytes
-rw-r--r--lcms2mt/plugins/fast_float/testbed/test3.iccbin0 -> 28484 bytes
-rw-r--r--lcms2mt/plugins/fast_float/testbed/test5.iccbin0 -> 3240 bytes
-rw-r--r--lcms2mt/src/Makefile.am8
-rw-r--r--lcms2mt/src/Makefile.in173
-rw-r--r--lcms2mt/src/cmsalpha.c14
-rw-r--r--lcms2mt/src/cmscam02.c2
-rw-r--r--lcms2mt/src/cmscgats.c68
-rw-r--r--lcms2mt/src/cmscnvrt.c31
-rw-r--r--lcms2mt/src/cmserr.c4
-rw-r--r--lcms2mt/src/cmsgamma.c4
-rw-r--r--lcms2mt/src/cmsgmt.c6
-rw-r--r--lcms2mt/src/cmshalf.c10
-rw-r--r--lcms2mt/src/cmsintrp.c1076
-rw-r--r--lcms2mt/src/cmsio0.c2
-rw-r--r--lcms2mt/src/cmsio1.c15
-rw-r--r--lcms2mt/src/cmslut.c10
-rw-r--r--lcms2mt/src/cmsmd5.c33
-rw-r--r--lcms2mt/src/cmsmtrx.c2
-rw-r--r--lcms2mt/src/cmsnamed.c10
-rw-r--r--lcms2mt/src/cmsopt.c60
-rw-r--r--lcms2mt/src/cmspack.c884
-rw-r--r--lcms2mt/src/cmspcs.c2
-rw-r--r--lcms2mt/src/cmsplugin.c4
-rw-r--r--lcms2mt/src/cmsps2.c202
-rw-r--r--lcms2mt/src/cmssamp.c2
-rw-r--r--lcms2mt/src/cmssm.c2
-rw-r--r--lcms2mt/src/cmstypes.c86
-rw-r--r--lcms2mt/src/cmsvirt.c9
-rw-r--r--lcms2mt/src/cmswtpnt.c2
-rw-r--r--lcms2mt/src/cmsxform.c54
-rw-r--r--lcms2mt/src/lcms2_internal.h13
-rw-r--r--lcms2mt/src/lcms2mt.def30
-rw-r--r--lcms2mt/testbed/Makefile.am2
-rw-r--r--lcms2mt/testbed/Makefile.in43
-rw-r--r--lcms2mt/testbed/new.iccbin25244 -> 25244 bytes
-rw-r--r--lcms2mt/testbed/testcms2.c3981
-rwxr-xr-xlcms2mt/testbed/testcms2.h44
-rwxr-xr-xlcms2mt/testbed/testplugin.c209
-rwxr-xr-xlcms2mt/testbed/zoo_icc.c2
-rw-r--r--lcms2mt/utils/common/utils.h2
-rw-r--r--lcms2mt/utils/common/vprf.c2
-rw-r--r--lcms2mt/utils/jpgicc/Makefile.am2
-rw-r--r--lcms2mt/utils/jpgicc/Makefile.in19
-rw-r--r--lcms2mt/utils/jpgicc/jpgicc.c54
-rw-r--r--lcms2mt/utils/linkicc/Makefile.am4
-rw-r--r--lcms2mt/utils/linkicc/Makefile.in121
-rw-r--r--lcms2mt/utils/linkicc/linkicc.c2
-rw-r--r--lcms2mt/utils/psicc/Makefile.am4
-rw-r--r--lcms2mt/utils/psicc/Makefile.in121
-rw-r--r--lcms2mt/utils/psicc/psicc.c2
-rw-r--r--lcms2mt/utils/samples/Makefile.am4
-rw-r--r--lcms2mt/utils/tificc/Makefile.am2
-rw-r--r--lcms2mt/utils/tificc/Makefile.in19
-rw-r--r--lcms2mt/utils/tificc/tifdiff.c2
-rw-r--r--lcms2mt/utils/tificc/tificc.c100
-rw-r--r--lcms2mt/utils/transicc/Makefile.am4
-rw-r--r--lcms2mt/utils/transicc/Makefile.in121
-rw-r--r--lcms2mt/utils/transicc/transicc.c2
-rw-r--r--lib/FCOfontmap-PCLPS32
-rw-r--r--lib/FCOfontmap-PS32
-rw-r--r--lib/Fontmap.ATB2
-rw-r--r--lib/Fontmap.ATM2
-rw-r--r--lib/Fontmap.OS22
-rw-r--r--lib/Fontmap.SGI2
-rw-r--r--lib/Fontmap.Sol2
-rw-r--r--lib/Fontmap.Ult2
-rw-r--r--lib/Fontmap.VMS2
-rw-r--r--lib/align.ps2
-rw-r--r--lib/caption.ps2
-rw-r--r--lib/cat.ps2
-rw-r--r--lib/cid2code.ps2
-rw-r--r--lib/docie.ps2
-rw-r--r--lib/font2pcl.ps2
-rw-r--r--lib/gs_ce_e.ps2
-rw-r--r--lib/gs_il2_e.ps2
-rw-r--r--lib/gs_kanji.ps2
-rw-r--r--lib/gs_ksb_e.ps2
-rw-r--r--lib/gs_lgo_e.ps2
-rw-r--r--lib/gs_lgx_e.ps2
-rw-r--r--lib/gs_wl1_e.ps2
-rw-r--r--lib/gs_wl2_e.ps2
-rw-r--r--lib/gs_wl5_e.ps2
-rw-r--r--lib/gslp.ps2
-rw-r--r--lib/gsnup.ps2
-rw-r--r--lib/gssetgs.bat3
-rw-r--r--lib/image-qa.ps2
-rw-r--r--lib/jispaper.ps2
-rw-r--r--lib/lines.ps2
-rw-r--r--lib/mkcidfm.ps2
-rw-r--r--lib/pdf2dsc.ps2
-rw-r--r--lib/pdf_info.ps2
-rw-r--r--lib/pfbtopfa.ps2
-rw-r--r--lib/ppath.ps2
-rw-r--r--lib/pphs.ps2
-rw-r--r--lib/prfont.ps2
-rw-r--r--lib/ps2ai.ps2
-rwxr-xr-xlib/ps2epsi103
-rwxr-xr-xlib/ps2epsi.bat26
-rwxr-xr-xlib/ps2epsi.cmd26
-rw-r--r--lib/ps2epsi.ps385
-rw-r--r--lib/rollconv.ps2
-rw-r--r--lib/stcinfo.ps2
-rw-r--r--lib/stcolor.ps2
-rw-r--r--lib/stocht.ps2
-rw-r--r--lib/traceimg.ps2
-rw-r--r--lib/traceop.ps2
-rw-r--r--lib/uninfo.ps2
-rw-r--r--lib/viewcmyk.ps2
-rw-r--r--lib/viewgif.ps2
-rw-r--r--lib/viewmiff.ps2
-rw-r--r--lib/viewpbm.ps2
-rw-r--r--lib/viewpcx.ps2
-rw-r--r--lib/viewps2a.ps2
-rw-r--r--lib/viewraw.ps2
-rw-r--r--lib/viewrgb.ps2
-rw-r--r--lib/winmaps.ps2
-rw-r--r--lib/zeroline.ps2
-rw-r--r--man/dvipdf.14
-rw-r--r--man/gs.14
-rw-r--r--man/gslp.14
-rw-r--r--man/gsnd.14
-rw-r--r--man/pdf2dsc.14
-rw-r--r--man/pdf2ps.14
-rw-r--r--man/pf2afm.14
-rw-r--r--man/pfbtopfa.14
-rw-r--r--man/printafm.14
-rw-r--r--man/ps2ascii.14
-rw-r--r--man/ps2epsi.14
-rw-r--r--man/ps2pdf.16
-rw-r--r--man/ps2pdfwr.14
-rw-r--r--man/ps2ps.14
-rw-r--r--psi/bfont.h2
-rw-r--r--psi/btoken.h2
-rw-r--r--psi/dmmain.c2
-rw-r--r--psi/dmmain.r2
-rw-r--r--psi/dpmain.c2
-rw-r--r--psi/dscparse.c2
-rw-r--r--psi/dscparse.h2
-rw-r--r--psi/dstack.h2
-rw-r--r--psi/dw32c.def2
-rw-r--r--psi/dw64c.def2
-rw-r--r--psi/dwdll.c2
-rw-r--r--psi/dwdll.h2
-rw-r--r--psi/dwimg.c2
-rw-r--r--psi/dwimg.h2
-rw-r--r--psi/dwmain.c2
-rw-r--r--psi/dwmain.rc2
-rw-r--r--psi/dwmain32.def2
-rw-r--r--psi/dwmain64.def2
-rw-r--r--psi/dwmainc.c4
-rw-r--r--psi/dwnodll.c2
-rw-r--r--psi/dwreg.c2
-rw-r--r--psi/dwreg.h2
-rw-r--r--psi/dwres.h2
-rw-r--r--psi/dwsetup.def2
-rw-r--r--psi/dwtext.c2
-rw-r--r--psi/dwtext.h2
-rw-r--r--psi/dwtrace.c2
-rw-r--r--psi/dwtrace.h2
-rw-r--r--psi/dwuninst.def2
-rw-r--r--psi/dxmain.c2
-rw-r--r--psi/dxmainc.c2
-rw-r--r--psi/estack.h2
-rw-r--r--psi/files.h2
-rw-r--r--psi/ghost.h2
-rw-r--r--psi/gs.c2
-rw-r--r--psi/gsdll.c2
-rw-r--r--psi/gsdll2.def14
-rw-r--r--psi/gsdll2.rc2
-rw-r--r--psi/gsdll32.def66
-rw-r--r--psi/gsdll32.rc2
-rw-r--r--psi/gsdll32metro.def67
-rw-r--r--psi/gsdll64.def66
-rw-r--r--psi/gsdll64metro.def66
-rw-r--r--psi/gsdllARM32metro.def65
-rw-r--r--psi/gserver.c2
-rw-r--r--psi/gsos2.def2
-rw-r--r--psi/gsos2.rc2
-rw-r--r--psi/ialloc.c30
-rw-r--r--psi/ialloc.h2
-rw-r--r--psi/iapi.c465
-rw-r--r--psi/iapi.h109
-rw-r--r--psi/iastate.h2
-rw-r--r--psi/iastruct.h2
-rw-r--r--psi/ibnum.c2
-rw-r--r--psi/ibnum.h2
-rw-r--r--psi/ichar.h2
-rw-r--r--psi/ichar1.h2
-rw-r--r--psi/icharout.h2
-rw-r--r--psi/icid.h2
-rw-r--r--psi/icie.h2
-rw-r--r--psi/icolor.h2
-rw-r--r--psi/iconf.c2
-rw-r--r--psi/iconf.h2
-rw-r--r--psi/icontext.c2
-rw-r--r--psi/icontext.h2
-rw-r--r--psi/icremap.h2
-rw-r--r--psi/icsmap.h2
-rw-r--r--psi/icstate.h2
-rw-r--r--psi/iddict.h2
-rw-r--r--psi/iddstack.h2
-rw-r--r--psi/idebug.c50
-rw-r--r--psi/idebug.h2
-rw-r--r--psi/idict.c26
-rw-r--r--psi/idict.h2
-rw-r--r--psi/idictdef.h2
-rw-r--r--psi/idicttpl.h4
-rw-r--r--psi/idisp.c72
-rw-r--r--psi/idisp.h7
-rw-r--r--psi/idosave.h2
-rw-r--r--psi/idparam.c2
-rw-r--r--psi/idparam.h2
-rw-r--r--psi/idsdata.h2
-rw-r--r--psi/idstack.c10
-rw-r--r--psi/idstack.h2
-rw-r--r--psi/ierrors.h2
-rw-r--r--psi/iesdata.h2
-rw-r--r--psi/iestack.h2
-rw-r--r--psi/ifapi.h2
-rw-r--r--psi/ifcid.h2
-rw-r--r--psi/ifilter.h2
-rw-r--r--psi/ifilter2.h2
-rw-r--r--psi/ifont.h2
-rw-r--r--psi/ifont1.h2
-rw-r--r--psi/ifont2.h2
-rw-r--r--psi/ifont42.h2
-rw-r--r--psi/ifrpred.h2
-rw-r--r--psi/ifunc.h2
-rw-r--r--psi/ifwpred.h2
-rw-r--r--psi/igc.c76
-rw-r--r--psi/igc.h2
-rw-r--r--psi/igcref.c68
-rw-r--r--psi/igcstr.c32
-rw-r--r--psi/igcstr.h2
-rw-r--r--psi/igstate.h2
-rw-r--r--psi/iht.h2
-rw-r--r--psi/iimage.h2
-rw-r--r--psi/iinit.c6
-rw-r--r--psi/iinit.h2
-rw-r--r--psi/ilevel.h2
-rw-r--r--psi/ilocate.c94
-rw-r--r--psi/imain.c172
-rw-r--r--psi/imain.h6
-rw-r--r--psi/imainarg.c59
-rw-r--r--psi/imainarg.h2
-rw-r--r--psi/imemory.h2
-rw-r--r--psi/iminst.h13
-rw-r--r--psi/iname.c6
-rw-r--r--psi/iname.h2
-rw-r--r--psi/inamedef.h4
-rw-r--r--psi/inameidx.h2
-rw-r--r--psi/inames.h2
-rw-r--r--psi/inamestr.h2
-rw-r--r--psi/inobtokn.c2
-rw-r--r--psi/inouparm.c2
-rw-r--r--psi/int.mak2997
-rw-r--r--psi/interp.c6
-rw-r--r--psi/interp.h2
-rw-r--r--psi/iosdata.h2
-rw-r--r--psi/iostack.h2
-rw-r--r--psi/ipacked.h2
-rw-r--r--psi/iparam.c15
-rw-r--r--psi/iparam.h2
-rw-r--r--psi/iparray.h2
-rw-r--r--psi/ipcolor.h2
-rw-r--r--psi/iplugin.c2
-rw-r--r--psi/iplugin.h2
-rw-r--r--psi/ireclaim.c8
-rw-r--r--psi/iref.h2
-rw-r--r--psi/isave.c60
-rw-r--r--psi/isave.h2
-rw-r--r--psi/iscan.c16
-rw-r--r--psi/iscan.h2
-rw-r--r--psi/iscanbin.c2
-rw-r--r--psi/iscanbin.h2
-rw-r--r--psi/iscannum.c8
-rw-r--r--psi/iscannum.h2
-rw-r--r--psi/isdata.h2
-rw-r--r--psi/isstate.h2
-rw-r--r--psi/istack.c2
-rw-r--r--psi/istack.h2
-rw-r--r--psi/istkparm.h2
-rw-r--r--psi/istream.h2
-rw-r--r--psi/istruct.h2
-rw-r--r--psi/itoken.h2
-rw-r--r--psi/iutil.c4
-rw-r--r--psi/iutil.h2
-rw-r--r--psi/iutil2.c2
-rw-r--r--psi/iutil2.h2
-rw-r--r--psi/ivmem2.h4
-rw-r--r--psi/ivmspace.h2
-rw-r--r--psi/main.h2
-rw-r--r--psi/mkfilelt.cpp2
-rw-r--r--psi/msvc.mak51
-rw-r--r--psi/msvc32.mak2
-rw-r--r--psi/msvc64.mak2
-rw-r--r--psi/nsisinst.nsi2
-rw-r--r--psi/oparc.h2
-rw-r--r--psi/opcheck.h2
-rw-r--r--psi/opdef.h2
-rw-r--r--psi/oper.h2
-rw-r--r--psi/opextern.h2
-rw-r--r--psi/os2.mak2
-rw-r--r--psi/ostack.h2
-rw-r--r--psi/psapi.c144
-rw-r--r--psi/psapi.h23
-rw-r--r--psi/psromfs.mak2
-rw-r--r--psi/store.h25
-rw-r--r--psi/zalg.c2
-rw-r--r--psi/zarith.c10
-rw-r--r--psi/zarray.c2
-rw-r--r--psi/zbfont.c2
-rw-r--r--psi/zbseq.c2
-rw-r--r--psi/zcfont.c2
-rw-r--r--psi/zchar.c3
-rw-r--r--psi/zchar1.c2
-rw-r--r--psi/zchar2.c2
-rw-r--r--psi/zchar32.c2
-rw-r--r--psi/zchar42.c2
-rw-r--r--psi/zchar42.h2
-rw-r--r--psi/zcharout.c2
-rw-r--r--psi/zcharx.c2
-rw-r--r--psi/zcid.c2
-rw-r--r--psi/zcie.c10
-rw-r--r--psi/zcie.h2
-rw-r--r--psi/zcolor.c22
-rw-r--r--psi/zcolor.h2
-rw-r--r--psi/zcolor1.c2
-rw-r--r--psi/zcolor2.c2
-rw-r--r--psi/zcolor3.c2
-rw-r--r--psi/zcontrol.c12
-rw-r--r--psi/zcrd.c2
-rw-r--r--psi/zcsindex.c2
-rw-r--r--psi/zcspixel.c2
-rw-r--r--psi/zcssepr.c2
-rw-r--r--psi/zdevcal.c2
-rw-r--r--psi/zdevice.c2
-rw-r--r--psi/zdevice2.c2
-rw-r--r--psi/zdfilter.c2
-rw-r--r--psi/zdict.c2
-rw-r--r--psi/zdouble.c2
-rw-r--r--psi/zdps1.c2
-rw-r--r--psi/zdscpars.c2
-rw-r--r--psi/zfaes.c2
-rw-r--r--psi/zfapi.c1466
-rw-r--r--psi/zfarc4.c2
-rw-r--r--psi/zfbcp.c2
-rw-r--r--psi/zfcid.c2
-rw-r--r--psi/zfcid0.c2
-rw-r--r--psi/zfcid1.c2
-rw-r--r--psi/zfcmap.c2
-rw-r--r--psi/zfdctd.c2
-rw-r--r--psi/zfdcte.c2
-rw-r--r--psi/zfdecode.c2
-rw-r--r--psi/zfile.c3
-rw-r--r--psi/zfile.h2
-rw-r--r--psi/zfile1.c2
-rw-r--r--psi/zfileio.c2
-rw-r--r--psi/zfilter.c2
-rw-r--r--psi/zfilter2.c2
-rw-r--r--psi/zfimscale.c2
-rw-r--r--psi/zfjbig2.c2
-rw-r--r--psi/zfjpx.c2
-rw-r--r--psi/zfmd5.c2
-rw-r--r--psi/zfont.c9
-rw-r--r--psi/zfont0.c2
-rw-r--r--psi/zfont1.c2
-rw-r--r--psi/zfont2.c2
-rw-r--r--psi/zfont32.c2
-rw-r--r--psi/zfont42.c2
-rw-r--r--psi/zfontenum.c2
-rw-r--r--psi/zform.c2
-rw-r--r--psi/zfproc.c2
-rw-r--r--psi/zfrsd.c2
-rw-r--r--psi/zfrsd.h2
-rw-r--r--psi/zfsample.c4
-rw-r--r--psi/zfsha2.c2
-rw-r--r--psi/zfunc.c2
-rw-r--r--psi/zfunc.h2
-rw-r--r--psi/zfunc0.c2
-rw-r--r--psi/zfunc3.c2
-rw-r--r--psi/zfunc4.c4
-rw-r--r--psi/zfzlib.c2
-rw-r--r--psi/zgeneric.c2
-rw-r--r--psi/zgstate.c9
-rw-r--r--psi/zht.c2
-rw-r--r--psi/zht1.c2
-rw-r--r--psi/zht2.c16
-rw-r--r--psi/zht2.h4
-rw-r--r--psi/zicc.c8
-rw-r--r--psi/zicc.h2
-rw-r--r--psi/zimage.c2
-rw-r--r--psi/zimage3.c2
-rw-r--r--psi/ziodev.c9
-rw-r--r--psi/ziodev2.c2
-rw-r--r--psi/ziodevsc.c6
-rw-r--r--psi/zmath.c4
-rw-r--r--psi/zmatrix.c2
-rw-r--r--psi/zmedia2.c2
-rw-r--r--psi/zmisc.c2
-rw-r--r--psi/zmisc1.c2
-rw-r--r--psi/zmisc2.c2
-rw-r--r--psi/zmisc3.c2
-rw-r--r--psi/zncdummy.c2
-rw-r--r--psi/zpacked.c2
-rw-r--r--psi/zpaint.c2
-rw-r--r--psi/zpath.c2
-rw-r--r--psi/zpath1.c2
-rw-r--r--psi/zpcolor.c6
-rw-r--r--psi/zpdf_r6.c10
-rw-r--r--psi/zpdfops.c2
-rw-r--r--psi/zrelbit.c2
-rw-r--r--psi/zshade.c4
-rw-r--r--psi/zstack.c2
-rw-r--r--psi/zstring.c19
-rw-r--r--psi/zsysvm.c2
-rw-r--r--psi/ztoken.c2
-rw-r--r--psi/ztrans.c64
-rw-r--r--psi/ztrap.c2
-rw-r--r--psi/ztype.c23
-rw-r--r--psi/zupath.c2
-rw-r--r--psi/zusparam.c155
-rw-r--r--psi/zutf8.c2
-rw-r--r--psi/zvmem.c10
-rw-r--r--psi/zvmem2.c14
-rw-r--r--psi/zwinutf8.c2
-rw-r--r--toolbin/Acrobat2Tiff/Acrobat2Tiff.sln9
-rw-r--r--toolbin/Acrobat2Tiff/Acrobat2Tiff/Acrobat2Tiff.vb43
-rw-r--r--toolbin/Acrobat2Tiff/Acrobat2Tiff/Acrobat2Tiff.vbproj15
-rw-r--r--toolbin/Acrobat2Tiff/Acrobat2Tiff/Acrobat2Tiff/Application.Designer.vb2
-rw-r--r--toolbin/Acrobat2Tiff/Acrobat2Tiff/Acrobat2Tiff/Resources.Designer.vb27
-rw-r--r--toolbin/Acrobat2Tiff/Acrobat2Tiff/Acrobat2Tiff/Settings.Designer.vb55
-rw-r--r--toolbin/GenSubstCID.psbin5702 -> 5702 bytes
-rwxr-xr-xtoolbin/afmutil.py2
-rw-r--r--toolbin/bmpcmp.c456
-rw-r--r--toolbin/bmpcmp.sln15
-rw-r--r--toolbin/bmpcmp.vcproj454
-rw-r--r--toolbin/bmpcmp.vcxproj267
-rw-r--r--toolbin/build_bmpcmp.sh116
-rw-r--r--toolbin/color/icc_creator/ICC_Creator/CIELAB.h2
-rw-r--r--toolbin/color/icc_creator/ICC_Creator/ICC_Creator.cpp2
-rw-r--r--toolbin/color/icc_creator/ICC_Creator/ICC_Creator.h2
-rw-r--r--toolbin/color/icc_creator/ICC_Creator/ICC_CreatorDlg.cpp2
-rw-r--r--toolbin/color/icc_creator/ICC_Creator/ICC_CreatorDlg.h2
-rw-r--r--toolbin/color/icc_creator/ICC_Creator/icc_create.cpp2
-rw-r--r--toolbin/color/icc_creator/ICC_Creator/icc_create.h2
-rw-r--r--toolbin/color/icc_creator/README.txt2
-rw-r--r--toolbin/encs2c.ps4
-rwxr-xr-xtoolbin/errlist.tcl2
-rw-r--r--toolbin/extractFonts.ps2
-rw-r--r--toolbin/extractICCprofiles.ps2
-rw-r--r--toolbin/gen_ldf_jb2.py2
-rw-r--r--toolbin/genfontmap.ps2
-rwxr-xr-xtoolbin/gitlog2changelog.py6
-rwxr-xr-xtoolbin/gsmake.tcl2
-rw-r--r--toolbin/halftone/ETS/ipview.html8
-rw-r--r--toolbin/halftone/gen_ordered/gen_ordered_main.c2
-rw-r--r--toolbin/halftone/gen_stochastic/gen_stochastic.c2
-rwxr-xr-xtoolbin/headercompile.pl2
-rwxr-xr-xtoolbin/headers.tcl2
-rw-r--r--toolbin/jpxtopdf.c2
-rwxr-xr-xtoolbin/leaks.tcl2
-rwxr-xr-xtoolbin/localcluster/clusterpush.pl21
-rwxr-xr-xtoolbin/makehist.tcl2
-rwxr-xr-xtoolbin/memory.py2
-rwxr-xr-xtoolbin/ocheck.py13
-rwxr-xr-xtoolbin/pre.tcl2
-rwxr-xr-xtoolbin/precheck.tcl2
-rwxr-xr-xtoolbin/split_changelog.py2
-rwxr-xr-xtoolbin/squeeze2text.py1
-rwxr-xr-xtoolbin/suite.tcl2
-rwxr-xr-xtoolbin/tests/build_revision.py2
-rwxr-xr-xtoolbin/tests/check_all.py2
-rwxr-xr-xtoolbin/tests/check_comments.py2
-rwxr-xr-xtoolbin/tests/check_dirs.py2
-rwxr-xr-xtoolbin/tests/check_docrefs.py2
-rw-r--r--toolbin/tests/cmpi.py2
-rwxr-xr-xtoolbin/tests/compare_checksumdb.py2
-rwxr-xr-xtoolbin/tests/compare_checksums.py2
-rwxr-xr-xtoolbin/tests/dump_checksum.py2
-rwxr-xr-xtoolbin/tests/dump_checksum_plus.py2
-rwxr-xr-xtoolbin/tests/dump_checksum_raw.py2
-rw-r--r--toolbin/tests/fuzzy.c17
-rwxr-xr-xtoolbin/tests/get_baseline_log.py2
-rwxr-xr-xtoolbin/tests/get_baselines.py2
-rwxr-xr-xtoolbin/tests/gscheck_all.py2
-rwxr-xr-xtoolbin/tests/gscheck_fuzzypdf.py2
-rwxr-xr-xtoolbin/tests/gscheck_pdfwrite.py2
-rwxr-xr-xtoolbin/tests/gscheck_raster.py2
-rwxr-xr-xtoolbin/tests/gscheck_testfiles.py2
-rw-r--r--toolbin/tests/gsconf.py2
-rw-r--r--toolbin/tests/gsparamsets.py2
-rw-r--r--toolbin/tests/gssum.py2
-rw-r--r--toolbin/tests/gstestgs.py2
-rw-r--r--toolbin/tests/gstestutils.py2
-rw-r--r--toolbin/tests/gsutil.py2
-rwxr-xr-xtoolbin/tests/make_baselinedb.py2
-rwxr-xr-xtoolbin/tests/make_testdb.py2
-rwxr-xr-xtoolbin/tests/make_two_pdfversions2
-rwxr-xr-xtoolbin/tests/make_two_versions2
-rwxr-xr-xtoolbin/tests/myoptparse.py2
-rw-r--r--toolbin/tests/rasterdb.py2
-rwxr-xr-xtoolbin/tests/revert_baseline2
-rwxr-xr-xtoolbin/tests/revert_pdfbaseline2
-rwxr-xr-xtoolbin/tests/run_nightly.py2
-rwxr-xr-xtoolbin/tests/run_parallel2
-rwxr-xr-xtoolbin/tests/run_regression.py2
-rwxr-xr-xtoolbin/tests/testdiff.py2
-rwxr-xr-xtoolbin/tests/update_baseline.py2
-rwxr-xr-xtoolbin/tests/update_specific2
-rwxr-xr-xtoolbin/tmake.tcl2
-rw-r--r--windows/GhostPDL.sln1
-rw-r--r--windows/ghostscript.vcproj8
-rw-r--r--windows/ghostscript.vcxproj666
-rw-r--r--windows/ghostscript.vcxproj.filters2037
-rw-r--r--windows/ghostscript_rt.vcxproj2
1844 files changed, 75557 insertions, 34633 deletions
diff --git a/.lgtm.yml b/.lgtm.yml
new file mode 100644
index 00000000..97d679ef
--- /dev/null
+++ b/.lgtm.yml
@@ -0,0 +1,33 @@
+path_classifiers:
+ docs:
+ - docs
+ - examples
+
+ # Libraries that we maintain are explicitly given their own groups
+ # They will be checked, and will contribute to our error/warning counts,
+ # but we can easily enable/disable them in the web frontend.
+ openjpeg:
+ - openjpeg
+ lcms2mt:
+ - lcms2mt
+ jbig2dec:
+ - jbig2dec
+
+ # Other libraries that we take unchanged are listed here. These will
+ # be scanned, but won't contribute to our counts.
+ library:
+ - expat
+ - freetype
+ - jpeg
+ - jpegxr
+ - libpng
+ - tiff
+ - zlib
+
+ devices:
+ - devices
+ contrib:
+ - contrib
+ tools:
+ - toolbin
+ - pcl/tools
diff --git a/Makefile.in b/Makefile.in
index 0e5bd094..8fc446d6 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -418,7 +418,7 @@ CCAUXLD=$(CCAUX)
# Define the default gcc flags.
GCFLAGS=@CPPFLAGS@ @GCFLAGS@ @CFLAGS@ @HAVE_POPEN_PROTO@
-GCFLAGSAUX=@GCFLAGSAUX@ @HAVE_POPEN_PROTO@
+GCFLAGSAUX=@GCFLAGSAUX@ @CFLAGSAUX@ @HAVE_POPEN_PROTO@
# Define the added flags for standard, debugging, profiling
# and shared object builds.
@@ -462,6 +462,8 @@ DBUS_LIBS=@DBUS_LIBS@
# defines from autoconf; note that we don't use all of these at present.
ACDEFS=@DEFS@
+CFLAGS_VISIBILITY=@CFLAGS_VISIBILITY@
+
CFLAGS=$(CFLAGS_STANDARD) $(GCFLAGS) $(AC_CFLAGS) $(XCFLAGS) @CLUSTER_CFLAGS@
CFLAGSAUX=$(CFLAGSAUX_STANDARD) $(GCFLAGSAUX) $(XCFLAGSAUX)
@@ -506,7 +508,7 @@ AUXEXTRALIBS=@AUXEXTRALIBS@ @AUX_SHARED_ZLIB@
# All reasonable platforms require -lm, but Rhapsody and perhaps one or
# two others fold libm into libc and don't require any additional library.
-STDLIBS=@PTHREAD_LIBS@ -lm
+STDLIBS=@PTHREAD_LIBS@ -lm @TESSERACT_LIBS@
# Define the include switch(es) for the X11 header files.
# This can be null if handled in some other way (e.g., the files are
@@ -665,7 +667,7 @@ DEVICE_DEVS12=
DEVICE_DEVS13=
DEVICE_DEVS14=
DEVICE_DEVS15=
-DEVICE_DEVS16=
+DEVICE_DEVS16=@OCR_DEVS@
DEVICE_DEVS17=
DEVICE_DEVS18=
DEVICE_DEVS19=
@@ -718,6 +720,16 @@ LD_SET_DT_SONAME=@SET_DT_SONAME@
MAKEDIRS=@ORDER_ONLY@ directories
MAKEDIRSTOP=
+OCR_VERSION=@OCR_VERSION@
+LEPTONICADIR=@LEPTONICADIR@
+TESSAVX=@TESS_AVX@
+TESSAVX2=@TESS_AVX2@
+TESSFMA=@TESS_FMA@
+TESSSSE41=@TESS_SSE4_1@
+TESSNEON=@TESS_NEON@
+TESSCXXFLAGS=@TESS_CXXFLAGS@
+TESSERACTDIR=@TESSERACTDIR@
+
# ---------------- End of platform-specific section ---------------- #
INSTALL_CONTRIB=@INSTALL_CONTRIB@
@@ -752,6 +764,9 @@ include $(GLSRCDIR)/ldf_jb2.mak
include $(GLSRCDIR)/lwf_jp2.mak
include $(GLSRCDIR)/openjpeg.mak
include $(GLSRCDIR)/cal.mak
+@LEPTONICAINCLUDE@
+@TESSERACTINCLUDE@
+include $(GLSRCDIR)/ocr.mak
include $(GLSRCDIR)/jpegxr.mak
include $(GLSRCDIR)/expat.mak
@@ -761,7 +776,7 @@ include $(GLSRCDIR)/ijs.mak
@LCUPSINCLUDE@
@LCUPSIINCLUDE@
include $(DEVSRCDIR)/devs.mak
-include $(DEVSRCDIR)/contrib.mak
+include $(DEVSRCDIR)/dcontrib.mak
include $(GLSRCDIR)/unix-aux.mak
include $(GLSRCDIR)/unixlink.mak
include $(GLSRCDIR)/unix-dll.mak
diff --git a/Resource/CIDFont/ArtifexBullet b/Resource/CIDFont/ArtifexBullet
index ce579f06..18c98f16 100644
--- a/Resource/CIDFont/ArtifexBullet
+++ b/Resource/CIDFont/ArtifexBullet
Binary files differ
diff --git a/Resource/ColorSpace/DefaultCMYK b/Resource/ColorSpace/DefaultCMYK
index 44d6daba..cba9326c 100644
--- a/Resource/ColorSpace/DefaultCMYK
+++ b/Resource/ColorSpace/DefaultCMYK
@@ -1,4 +1,4 @@
-% Copyright (C) 2001-2019 Artifex Software, Inc.
+% Copyright (C) 2001-2020 Artifex Software, Inc.
% All Rights Reserved.
%
% This software is provided AS-IS with no warranty, either express or
diff --git a/Resource/ColorSpace/DefaultGray b/Resource/ColorSpace/DefaultGray
index d7b74f84..95c9ef41 100644
--- a/Resource/ColorSpace/DefaultGray
+++ b/Resource/ColorSpace/DefaultGray
@@ -1,4 +1,4 @@
-% Copyright (C) 2001-2019 Artifex Software, Inc.
+% Copyright (C) 2001-2020 Artifex Software, Inc.
% All Rights Reserved.
%
% This software is provided AS-IS with no warranty, either express or
diff --git a/Resource/ColorSpace/DefaultRGB b/Resource/ColorSpace/DefaultRGB
index 6e8808f8..53ddf3ea 100644
--- a/Resource/ColorSpace/DefaultRGB
+++ b/Resource/ColorSpace/DefaultRGB
@@ -1,4 +1,4 @@
-% Copyright (C) 2001-2019 Artifex Software, Inc.
+% Copyright (C) 2001-2020 Artifex Software, Inc.
% All Rights Reserved.
%
% This software is provided AS-IS with no warranty, either express or
diff --git a/Resource/ColorSpace/TrivialCMYK b/Resource/ColorSpace/TrivialCMYK
index 16794983..b3dec8b8 100644
--- a/Resource/ColorSpace/TrivialCMYK
+++ b/Resource/ColorSpace/TrivialCMYK
@@ -1,4 +1,4 @@
-% Copyright (C) 2001-2019 Artifex Software, Inc.
+% Copyright (C) 2001-2020 Artifex Software, Inc.
% All Rights Reserved.
%
% This software is provided AS-IS with no warranty, either express or
diff --git a/Resource/ColorSpace/sGray b/Resource/ColorSpace/sGray
index b8217357..a0997d0b 100644
--- a/Resource/ColorSpace/sGray
+++ b/Resource/ColorSpace/sGray
@@ -1,4 +1,4 @@
-% Copyright (C) 2001-2019 Artifex Software, Inc.
+% Copyright (C) 2001-2020 Artifex Software, Inc.
% All Rights Reserved.
%
% This software is provided AS-IS with no warranty, either express or
diff --git a/Resource/ColorSpace/sRGB b/Resource/ColorSpace/sRGB
index 95c6be73..16f3ecfa 100644
--- a/Resource/ColorSpace/sRGB
+++ b/Resource/ColorSpace/sRGB
@@ -1,4 +1,4 @@
-% Copyright (C) 2001-2019 Artifex Software, Inc.
+% Copyright (C) 2001-2020 Artifex Software, Inc.
% All Rights Reserved.
%
% This software is provided AS-IS with no warranty, either express or
diff --git a/Resource/Decoding/FCO_Dingbats b/Resource/Decoding/FCO_Dingbats
index 412b6bc0..8da04509 100644
--- a/Resource/Decoding/FCO_Dingbats
+++ b/Resource/Decoding/FCO_Dingbats
@@ -1,4 +1,4 @@
-% Copyright (C) 2001-2019 Artifex Software, Inc.
+% Copyright (C) 2001-2020 Artifex Software, Inc.
% All Rights Reserved.
%
% This software is provided AS-IS with no warranty, either express or
diff --git a/Resource/Decoding/FCO_Symbol b/Resource/Decoding/FCO_Symbol
index d12c81ed..c9411a03 100644
--- a/Resource/Decoding/FCO_Symbol
+++ b/Resource/Decoding/FCO_Symbol
@@ -1,4 +1,4 @@
-% Copyright (C) 2001-2019 Artifex Software, Inc.
+% Copyright (C) 2001-2020 Artifex Software, Inc.
% All Rights Reserved.
%
% This software is provided AS-IS with no warranty, either express or
diff --git a/Resource/Decoding/FCO_Unicode b/Resource/Decoding/FCO_Unicode
index 5dd38cc2..4cdf58a5 100644
--- a/Resource/Decoding/FCO_Unicode
+++ b/Resource/Decoding/FCO_Unicode
@@ -1,4 +1,4 @@
-% Copyright (C) 2001-2019 Artifex Software, Inc.
+% Copyright (C) 2001-2020 Artifex Software, Inc.
% All Rights Reserved.
%
% This software is provided AS-IS with no warranty, either express or
diff --git a/Resource/Decoding/FCO_Wingdings b/Resource/Decoding/FCO_Wingdings
index e3b7acb4..a31cefd8 100644
--- a/Resource/Decoding/FCO_Wingdings
+++ b/Resource/Decoding/FCO_Wingdings
@@ -1,4 +1,4 @@
-% Copyright (C) 2001-2019 Artifex Software, Inc.
+% Copyright (C) 2001-2020 Artifex Software, Inc.
% All Rights Reserved.
%
% This software is provided AS-IS with no warranty, either express or
diff --git a/Resource/Decoding/Latin1 b/Resource/Decoding/Latin1
index eec0fbfd..8960ab4f 100644
--- a/Resource/Decoding/Latin1
+++ b/Resource/Decoding/Latin1
@@ -1,4 +1,4 @@
-% Copyright (C) 2001-2019 Artifex Software, Inc.
+% Copyright (C) 2001-2020 Artifex Software, Inc.
% All Rights Reserved.
%
% This software is provided AS-IS with no warranty, either express or
diff --git a/Resource/Decoding/StandardEncoding b/Resource/Decoding/StandardEncoding
index c7775a25..f2b27a56 100644
--- a/Resource/Decoding/StandardEncoding
+++ b/Resource/Decoding/StandardEncoding
@@ -1,4 +1,4 @@
-% Copyright (C) 2001-2019 Artifex Software, Inc.
+% Copyright (C) 2001-2020 Artifex Software, Inc.
% All Rights Reserved.
%
% This software is provided AS-IS with no warranty, either express or
diff --git a/Resource/Decoding/Unicode b/Resource/Decoding/Unicode
index 0e2e185f..7ecd3069 100644
--- a/Resource/Decoding/Unicode
+++ b/Resource/Decoding/Unicode
@@ -1,4 +1,4 @@
-% Copyright (C) 2001-2019 Artifex Software, Inc.
+% Copyright (C) 2001-2020 Artifex Software, Inc.
% All Rights Reserved.
%
% This software is provided AS-IS with no warranty, either express or
diff --git a/Resource/Encoding/CEEncoding b/Resource/Encoding/CEEncoding
index b5d2cb8b..bd3f8abb 100644
--- a/Resource/Encoding/CEEncoding
+++ b/Resource/Encoding/CEEncoding
@@ -1,4 +1,4 @@
-% Copyright (C) 2001-2019 Artifex Software, Inc.
+% Copyright (C) 2001-2020 Artifex Software, Inc.
% All Rights Reserved.
%
% This software is provided AS-IS with no warranty, either express or
diff --git a/Resource/Encoding/ExpertEncoding b/Resource/Encoding/ExpertEncoding
index ed6484db..fe879bda 100644
--- a/Resource/Encoding/ExpertEncoding
+++ b/Resource/Encoding/ExpertEncoding
@@ -1,4 +1,4 @@
-% Copyright (C) 2001-2019 Artifex Software, Inc.
+% Copyright (C) 2001-2020 Artifex Software, Inc.
% All Rights Reserved.
%
% This software is provided AS-IS with no warranty, either express or
diff --git a/Resource/Encoding/ExpertSubsetEncoding b/Resource/Encoding/ExpertSubsetEncoding
index 836f79e1..6f789bc5 100644
--- a/Resource/Encoding/ExpertSubsetEncoding
+++ b/Resource/Encoding/ExpertSubsetEncoding
@@ -1,4 +1,4 @@
-% Copyright (C) 2001-2019 Artifex Software, Inc.
+% Copyright (C) 2001-2020 Artifex Software, Inc.
% All Rights Reserved.
%
% This software is provided AS-IS with no warranty, either express or
diff --git a/Resource/Encoding/NotDefEncoding b/Resource/Encoding/NotDefEncoding
index aeb0de47..a5e0b8d3 100644
--- a/Resource/Encoding/NotDefEncoding
+++ b/Resource/Encoding/NotDefEncoding
@@ -1,4 +1,4 @@
-% Copyright (C) 2001-2019 Artifex Software, Inc.
+% Copyright (C) 2001-2020 Artifex Software, Inc.
% All Rights Reserved.
%
% This software is provided AS-IS with no warranty, either express or
diff --git a/Resource/Encoding/Wingdings b/Resource/Encoding/Wingdings
index accbb48e..4a245571 100644
--- a/Resource/Encoding/Wingdings
+++ b/Resource/Encoding/Wingdings
@@ -1,4 +1,4 @@
-% Copyright (C) 2001-2019 Artifex Software, Inc.
+% Copyright (C) 2001-2020 Artifex Software, Inc.
% All Rights Reserved.
%
% This software is provided AS-IS with no warranty, either express or
diff --git a/Resource/Font/NimbusSans-BoldItalic b/Resource/Font/NimbusSans-BoldItalic
index a031ac9c..dc1dad0a 100644
--- a/Resource/Font/NimbusSans-BoldItalic
+++ b/Resource/Font/NimbusSans-BoldItalic
Binary files differ
diff --git a/Resource/Font/NimbusSans-Italic b/Resource/Font/NimbusSans-Italic
index 989210f6..2fcec067 100644
--- a/Resource/Font/NimbusSans-Italic
+++ b/Resource/Font/NimbusSans-Italic
Binary files differ
diff --git a/Resource/Init/FCOfontmap-PCLPS2 b/Resource/Init/FCOfontmap-PCLPS2
index c54e61d1..91bd8f7f 100644
--- a/Resource/Init/FCOfontmap-PCLPS2
+++ b/Resource/Init/FCOfontmap-PCLPS2
@@ -1,4 +1,4 @@
-% Copyright (C) 2001-2019 Artifex Software, Inc.
+% Copyright (C) 2001-2020 Artifex Software, Inc.
% All Rights Reserved.
%
% This software is provided AS-IS with no warranty, either express or
diff --git a/Resource/Init/Fontmap.GS b/Resource/Init/Fontmap.GS
index 9f6b6297..5f47b6b4 100644
--- a/Resource/Init/Fontmap.GS
+++ b/Resource/Init/Fontmap.GS
@@ -1,4 +1,4 @@
-% Copyright (C) 2001-2019 Artifex Software, Inc.
+% Copyright (C) 2001-2020 Artifex Software, Inc.
% All Rights Reserved.
%
% This software is provided AS-IS with no warranty, either express or
diff --git a/Resource/Init/gs_agl.ps b/Resource/Init/gs_agl.ps
index c30b631f..9c1c52d2 100644
--- a/Resource/Init/gs_agl.ps
+++ b/Resource/Init/gs_agl.ps
@@ -1,4 +1,4 @@
-% Copyright (C) 2001-2019 Artifex Software, Inc.
+% Copyright (C) 2001-2020 Artifex Software, Inc.
% All Rights Reserved.
%
% This software is provided AS-IS with no warranty, either express or
diff --git a/Resource/Init/gs_btokn.ps b/Resource/Init/gs_btokn.ps
index b9add383..410b8419 100644
--- a/Resource/Init/gs_btokn.ps
+++ b/Resource/Init/gs_btokn.ps
@@ -1,4 +1,4 @@
-% Copyright (C) 2001-2019 Artifex Software, Inc.
+% Copyright (C) 2001-2020 Artifex Software, Inc.
% All Rights Reserved.
%
% This software is provided AS-IS with no warranty, either express or
@@ -148,46 +148,36 @@ mark
% worry about interrupts or callbacks when writing to the output file.
% Define procedures for accumulating the space required to represent
-% an object in binary form. The procedures for composite objects (arrays
-% and dictionaries) leave different results on the stack:
-% <#refs> <#chars> <simple_obj> -proc- <#refs> <#chars>
-% <#refs> <#chars> <array|dict> -proc- <array|dict> <#refs> <#chars>
-% This is required so that .writeobjects can also accumulate the actual
-% list of composite objects to write in the binary object sequence.
+% an object in binary form.
+% <#refs> <#chars> <obj> -proc- <#refs'> <#chars'>
/cntdict mark
/integertype /pop load
/realtype 1 index
/marktype 1 index
/nulltype 1 index
/booleantype 1 index
- /nametype { length add } bind
+ /nametype { length add } .bind
/stringtype 1 index
- /arraytype //null
- /dicttype //null
+ /arraytype 0 % replaced below
+ /dicttype 0 % replaced below
.dicttomark def
-/.cntobj { % <<arguments and results as for procedures in cntdict>>
+/.cntobj {
dup type //cntdict exch get exec
} .bind def
cntdict /arraytype {
- dup dup length 5 -1 roll add 4 2 roll { //.cntobj exec } forall
-} bind put
+ dup length % #refs #chars array len
+ 4 -1 roll add % #chars array #refs+len
+ dup 65536 gt {
+ /writeobject .systemvar /limitcheck signalerror
+ } if
+ 3 1 roll % #refs+len #chars array
+ //.cntobj forall
+} .bind put % replace arraytype in cntdict
+
cntdict /dicttype {
- WRITEDICTS {
- dup dup length 2 mul 5 -1 roll add 4 2 roll {
- % We have to use .execn here, rather than simply rolling the
- % value under the top elements, because key might involve arrays
- % or dictionaries.
- cvlit {//.cntobj exec} exch 2 .execn //.cntobj exec
- } forall
- } {
- /writeobject .systemvar /typecheck signalerror
- } ifelse
+ /writeobject .systemvar /typecheck signalerror
} bind put
-/w2dict mark
- /nametype { 2 copy .writecvs pop } bind
- /stringtype 1 index
-.dicttomark def
/.bosheader { % <top_length> <total_length> <string8> .bosheader
% <string4|8>
@@ -211,70 +201,74 @@ cntdict /dicttype {
} .bind def
/.writeobjects { % <file> <tag> <array> .writeobjects -
- mark exch
-
- % Count the space required for refs and strings.
+ % Apply the tag early and forget about it.
+ (12345678) dup 1 5 -1 roll % file array (...) (...) 1 tag
+ put exch % file (.t.) array
- dup length 0 3 -1 roll
- % Stack: file tag -mark- #refs #chars array
- dup 4 1 roll { //.cntobj exec } forall
+ % Calculate the space required for refs and strings.
+ % Reject excessively large graphs or graphs with loops.
+ 0 0 % file (.t.) array #refs #chars
+ 2 index //.cntobj exec % file (.t.) array #refs #chars
- % Write the header.
+ % Write the header.
+ 1 index 8 mul add % file (.t.) array #refs #refs*8+#chars
+ 2 index length exch (12345678) % file (.t.) array #refs len(array) #refs*8+#chars (...)
+ //.bosheader exec % file (.t.) array #refs (...)
+ 4 index exch writestring % file (.t.) array #refs
- % Stack: file tag -mark- array1 ... (array|dict)N #refs #chars
- counttomark 3 add -2 roll 4 1 roll
- % Stack: -mark- array1 ... (array|dict)N tag #refs #chars file
- dup counttomark 1 sub index length
- 4 index 3 bitshift 4 index add
- (xxxxxxxx) //.bosheader exec writestring
-
- % Write the objects per se.
-
- 3 1 roll pop
- counttomark 1 sub index length 3 bitshift exch
- 3 bitshift
- % Stack: -mark- array1 ... (array|dict)N tag file ref# char#
- counttomark 4 sub {
- counttomark -1 roll dup 6 1 roll
- % Stack: ... objN tag file ref# char# objN
- dup type /dicttype eq { % can't be first object
- { 5 1 roll (x\000xxxxxx) .bosobject
- 3 index exch writestring
- 4 -1 roll (x\000xxxxxx) .bosobject
- 3 index exch writestring
+ % Traverse an array tree in width-first order and place all the
+ % arrays that are found on the operand stack. Acyclic graphs are
+ % expanded to trees. The top parameter K indicates the number
+ % of arrays on a given depth level. At the root level, K is equal to 1.
+ mark 2 index 1 % file (.t.) array #refs -mark- array K
+ { dup 0 le { pop exit } if
+ dup {
+ dup index {
+ dup type /arraytype eq {
+ exch 1 add
+ } {
+ pop
+ } ifelse
} forall
- } {
- { (x\000xxxxxx) .bosobject
- dup 1 6 index put
- 3 index exch writestring
- 4 -1 roll pop 0 4 1 roll % clear tag
- } forall
- } ifelse
- } repeat
+ 1 sub
+ } repeat
+ } loop % file (.t.) array #refs -mark- array1 ... arrayN
+ counttomark 5 add -4 roll % -mark- array1 ... arrayN file (.t.) array #refs
- % Write the strings and names.
+ % Write the content of the root array
+ 8 mul % -mark- array1 ... arrayN file (.t.) array #refs*8
+ exch dup length 8 mul % -mark- array1 ... arrayN file (.t.) #refs*8 array len(array)*8
+ 3 1 roll % -mark- array1 ... arrayN file (.t.) len(array)*8 #refs*8 array
+ { 3 index % -mark- array1 ... arrayN file (.t.) len(array)*8 #refs*8 obj (.t.)
+ .bosobject % -mark- array1 ... arrayN file (.t.) len(array)*8 #refs*8 (.t.)
+ 4 index exch writestring % -mark- array1 ... arrayN file (.t.) len(array)*8 #refs*8
+ } forall
+ 3 -1 roll pop % -mark- array1 ... arrayN file len(array)*8 #refs*8
- pop pop exch pop
- % Stack: -mark- array1 ... array|dictN file
- counttomark 1 sub {
- counttomark -1 roll {
- % The counting pass ensured that the keys and values
- % of any dictionary must be writable objects.
- % Hence, we are processing a dictionary iff
- % the next-to-top stack element is not a file.
- 1 index type /filetype ne {
- exch 2 index exch dup type //w2dict exch .knownget
- { exec } { pop } ifelse pop
- } if
- dup type //w2dict exch .knownget { exec } { pop } ifelse
+ % Write the remaining arrays
+ counttomark 2 sub -1 3 {
+ index { % ... file #refs #str obj
+ (1\000345678) .bosobject % ... file #refs #str (...)
+ 3 index exch writestring % ... file #refs #str
} forall
- } repeat
+ } for
+ pop pop % -mark- array1 ... arrayN file
- % Clean up.
-
- % Stack: -mark- file
- pop pop
+ % Write strings and names.
+ counttomark 1 sub -1 1 {
+ index {
+ dup type /nametype eq {
+ .namestring
+ } if
+ dup type /stringtype eq {
+ 1 index exch writestring
+ } {
+ pop
+ } ifelse
+ } forall
+ } for
+ cleartomark % Clean up
} .bind def
/.writeobject {
@@ -324,7 +318,6 @@ cntdict /dicttype {
} bind def
currentdict /cntdict .undef
-currentdict /w2dict .undef
% End of level2dict
diff --git a/Resource/Init/gs_cff.ps b/Resource/Init/gs_cff.ps
index 99d214a6..6cfa1ec1 100644
--- a/Resource/Init/gs_cff.ps
+++ b/Resource/Init/gs_cff.ps
@@ -1,4 +1,4 @@
-% Copyright (C) 2001-2019 Artifex Software, Inc.
+% Copyright (C) 2001-2020 Artifex Software, Inc.
% All Rights Reserved.
%
% This software is provided AS-IS with no warranty, either express or
diff --git a/Resource/Init/gs_cidcm.ps b/Resource/Init/gs_cidcm.ps
index 5ec2fa34..503ec867 100644
--- a/Resource/Init/gs_cidcm.ps
+++ b/Resource/Init/gs_cidcm.ps
@@ -1,4 +1,4 @@
-% Copyright (C) 2001-2019 Artifex Software, Inc.
+% Copyright (C) 2001-2020 Artifex Software, Inc.
% All Rights Reserved.
%
% This software is provided AS-IS with no warranty, either express or
diff --git a/Resource/Init/gs_ciddc.ps b/Resource/Init/gs_ciddc.ps
index f0fb5d81..6cdba039 100644
--- a/Resource/Init/gs_ciddc.ps
+++ b/Resource/Init/gs_ciddc.ps
@@ -1,4 +1,4 @@
-% Copyright (C) 2001-2019 Artifex Software, Inc.
+% Copyright (C) 2001-2020 Artifex Software, Inc.
% All Rights Reserved.
%
% This software is provided AS-IS with no warranty, either express or
diff --git a/Resource/Init/gs_cidfm.ps b/Resource/Init/gs_cidfm.ps
index e123bfc1..f22e45d6 100644
--- a/Resource/Init/gs_cidfm.ps
+++ b/Resource/Init/gs_cidfm.ps
@@ -1,4 +1,4 @@
-% Copyright (C) 2001-2019 Artifex Software, Inc.
+% Copyright (C) 2001-2020 Artifex Software, Inc.
% All Rights Reserved.
%
% This software is provided AS-IS with no warranty, either express or
diff --git a/Resource/Init/gs_cidfn.ps b/Resource/Init/gs_cidfn.ps
index ca2a5a7c..20af1c87 100644
--- a/Resource/Init/gs_cidfn.ps
+++ b/Resource/Init/gs_cidfn.ps
@@ -1,4 +1,4 @@
-% Copyright (C) 2001-2019 Artifex Software, Inc.
+% Copyright (C) 2001-2020 Artifex Software, Inc.
% All Rights Reserved.
%
% This software is provided AS-IS with no warranty, either express or
diff --git a/Resource/Init/gs_cidtt.ps b/Resource/Init/gs_cidtt.ps
index 12ade5e5..e045cfdd 100644
--- a/Resource/Init/gs_cidtt.ps
+++ b/Resource/Init/gs_cidtt.ps
@@ -1,4 +1,4 @@
-% Copyright (C) 2001-2019 Artifex Software, Inc.
+% Copyright (C) 2001-2020 Artifex Software, Inc.
% All Rights Reserved.
%
% This software is provided AS-IS with no warranty, either express or
diff --git a/Resource/Init/gs_cmap.ps b/Resource/Init/gs_cmap.ps
index 2733ea3b..3252089a 100644
--- a/Resource/Init/gs_cmap.ps
+++ b/Resource/Init/gs_cmap.ps
@@ -1,4 +1,4 @@
-% Copyright (C) 2001-2019 Artifex Software, Inc.
+% Copyright (C) 2001-2020 Artifex Software, Inc.
% All Rights Reserved.
%
% This software is provided AS-IS with no warranty, either express or
diff --git a/Resource/Init/gs_cspace.ps b/Resource/Init/gs_cspace.ps
index ff5955a9..8aaf6b74 100644
--- a/Resource/Init/gs_cspace.ps
+++ b/Resource/Init/gs_cspace.ps
@@ -1,4 +1,4 @@
-% Copyright (C) 2001-2019 Artifex Software, Inc.
+% Copyright (C) 2001-2020 Artifex Software, Inc.
% All Rights Reserved.
%
% This software is provided AS-IS with no warranty, either express or
diff --git a/Resource/Init/gs_dbt_e.ps b/Resource/Init/gs_dbt_e.ps
index 01e3c824..2aca0c68 100644
--- a/Resource/Init/gs_dbt_e.ps
+++ b/Resource/Init/gs_dbt_e.ps
@@ -1,4 +1,4 @@
-% Copyright (C) 2001-2019 Artifex Software, Inc.
+% Copyright (C) 2001-2020 Artifex Software, Inc.
% All Rights Reserved.
%
% This software is provided AS-IS with no warranty, either express or
diff --git a/Resource/Init/gs_diskn.ps b/Resource/Init/gs_diskn.ps
index d3402782..85ff07e3 100644
--- a/Resource/Init/gs_diskn.ps
+++ b/Resource/Init/gs_diskn.ps
@@ -1,4 +1,4 @@
-% Copyright (C) 2001-2019 Artifex Software, Inc.
+% Copyright (C) 2001-2020 Artifex Software, Inc.
% All Rights Reserved.
%
% This software is provided AS-IS with no warranty, either express or
diff --git a/Resource/Init/gs_dps1.ps b/Resource/Init/gs_dps1.ps
index 7cf29b46..14cc5d6d 100644
--- a/Resource/Init/gs_dps1.ps
+++ b/Resource/Init/gs_dps1.ps
@@ -1,4 +1,4 @@
-% Copyright (C) 2001-2019 Artifex Software, Inc.
+% Copyright (C) 2001-2020 Artifex Software, Inc.
% All Rights Reserved.
%
% This software is provided AS-IS with no warranty, either express or
diff --git a/Resource/Init/gs_dps2.ps b/Resource/Init/gs_dps2.ps
index 619984f2..2dfaaa49 100644
--- a/Resource/Init/gs_dps2.ps
+++ b/Resource/Init/gs_dps2.ps
@@ -1,4 +1,4 @@
-% Copyright (C) 2001-2019 Artifex Software, Inc.
+% Copyright (C) 2001-2020 Artifex Software, Inc.
% All Rights Reserved.
%
% This software is provided AS-IS with no warranty, either express or
diff --git a/Resource/Init/gs_dscp.ps b/Resource/Init/gs_dscp.ps
index dad0ec30..15764b17 100644
--- a/Resource/Init/gs_dscp.ps
+++ b/Resource/Init/gs_dscp.ps
@@ -1,4 +1,4 @@
-% Copyright (C) 2001-2019 Artifex Software, Inc.
+% Copyright (C) 2001-2020 Artifex Software, Inc.
% All Rights Reserved.
%
% This software is provided AS-IS with no warranty, either express or
diff --git a/Resource/Init/gs_epsf.ps b/Resource/Init/gs_epsf.ps
index b28f742e..cf020751 100644
--- a/Resource/Init/gs_epsf.ps
+++ b/Resource/Init/gs_epsf.ps
@@ -1,4 +1,4 @@
-% Copyright (C) 2001-2019 Artifex Software, Inc.
+% Copyright (C) 2001-2020 Artifex Software, Inc.
% All Rights Reserved.
%
% This software is provided AS-IS with no warranty, either express or
@@ -59,41 +59,44 @@
% Rescale, translate and rotate to fit the BoundingBox on the page
/EPSBoundingBoxFitPage { % llx lly urx ury --
EPSDEBUG { (gs_epsf.ps: Rescaling EPS to fit page\n) print flush } if
- clippath pathbbox newpath
- % translate to new origin at lower left of clippath
- 3 index 3 index translate
- % Figure out if rotate is needed.
+ clippath pathbbox newpath % ellx elly eurx eury pllx plly purx pury
- 1 index 4 index sub 1 index 4 index sub eq not {
- 1 index 4 index sub 1 index 4 index sub gt % bbox page-clipbox page-is-landscape
- 6 index 10 index sub 6 index 10 index sub gt % bbox page-clipbox page-is-landscape bbox-is-landscape
- xor
- }{
- //false
- }ifelse
- dup 10 1 roll % need-rotate compute need-rotate.
-
- % if we are rotating the contents, we need to also rotate the
- % bounding box of the content!
- {
- 8 -4 roll
- exch 4 -2 roll exch 4 2 roll
+ % Convert box corners to coordinates of the center and box sizes
+ 2 { % loop doing the page coordinates, the the EPS bbox coordinates
+ 3 -1 roll exch % ... llx urx lly ury
+ 2 { % loop doing Y then X coordnates
+ 2 copy exch sub % ... llx urx lly ury ury-lly
+ 3 1 roll % ... llx urx ury-lly lly ury
+ add 2 div % ... llx urx ury-lly (lly+ury)/2
+ 4 2 roll % ... ury-lly (lly+ury)/2 llx urx
+ } repeat
8 4 roll
+ } repeat
+ % edx, edy = EPS dimension X and Y, ecx, ecy = EPS Center X and Y.
+ % pdx and pcx, etc, are for the Page values.
+ % edx ecx edy ecy pdx pcx pdy pcy
+
+ % Move the origin to the center of the printable area.
+ 3 -1 roll exch % edx ecx edy ecy pdx pdy pcx pcy
+ translate % edx ecx edy ecy pdx pdy
+
+ % Find orientation of the best fit. Square pages or files don't rotate.
+ 2 copy sub % edx ecx edy ecy pdx pdy pdx-pdy
+ 6 index 5 index sub mul % edx ecx edy ecy pdx pdy (pdx-pdy)*(edx-edy)
+ 0 lt {
+ 90 rotate
+ exch
} if
- % stack: rotate-needed bbox page-clipbox
- % calculate scale to fit smaller of width or height
- exch 4 -1 roll sub 3 1 roll exch sub
- 4 2 roll 5 index 5 index 4 2 roll
- exch 4 -1 roll sub 3 1 roll exch sub
- 4 2 roll
- exch 4 -1 roll div 3 1 roll exch div
- 1 index 1 index lt {pop}{exch pop} ifelse
- dup scale
- % translate to EPS -llx,-lly
- exch neg exch neg translate
- % Finally perform the rotate if needed.
- { clippath pathbbox pop 0 translate 90 rotate pop pop } if
+ % Scale to fit in the most restricting direction.
+ 4 -1 roll div % edx ecx ecy pdx pdy/edy
+ exch 5 -1 roll div % ecx ecy pdy/edy pdx/edx
+ //.min exec
+ dup scale % ecx ecy
+
+ % Center the document
+ neg exch neg exch translate
+
} bind executeonly odef
/EPSBoundingBoxProcess { % (llx lly urx ury) state --
diff --git a/Resource/Init/gs_fapi.ps b/Resource/Init/gs_fapi.ps
index 1ca3dff7..0b493c6a 100644
--- a/Resource/Init/gs_fapi.ps
+++ b/Resource/Init/gs_fapi.ps
@@ -1,4 +1,4 @@
-% Copyright (C) 2001-2019 Artifex Software, Inc.
+% Copyright (C) 2001-2020 Artifex Software, Inc.
% All Rights Reserved.
%
% This software is provided AS-IS with no warranty, either express or
diff --git a/Resource/Init/gs_fntem.ps b/Resource/Init/gs_fntem.ps
index 66432e11..d5ac0bfa 100644
--- a/Resource/Init/gs_fntem.ps
+++ b/Resource/Init/gs_fntem.ps
@@ -1,4 +1,4 @@
-% Copyright (C) 2001-2019 Artifex Software, Inc.
+% Copyright (C) 2001-2020 Artifex Software, Inc.
% All Rights Reserved.
%
% This software is provided AS-IS with no warranty, either express or
diff --git a/Resource/Init/gs_fonts.ps b/Resource/Init/gs_fonts.ps
index 204e2832..3f4f4af8 100644
--- a/Resource/Init/gs_fonts.ps
+++ b/Resource/Init/gs_fonts.ps
@@ -1,4 +1,4 @@
-% Copyright (C) 2001-2019 Artifex Software, Inc.
+% Copyright (C) 2001-2020 Artifex Software, Inc.
% All Rights Reserved.
%
% This software is provided AS-IS with no warranty, either express or
diff --git a/Resource/Init/gs_frsd.ps b/Resource/Init/gs_frsd.ps
index c4ed1cb0..74c1dd27 100644
--- a/Resource/Init/gs_frsd.ps
+++ b/Resource/Init/gs_frsd.ps
@@ -1,4 +1,4 @@
-% Copyright (C) 2001-2019 Artifex Software, Inc.
+% Copyright (C) 2001-2020 Artifex Software, Inc.
% All Rights Reserved.
%
% This software is provided AS-IS with no warranty, either express or
diff --git a/Resource/Init/gs_icc.ps b/Resource/Init/gs_icc.ps
index 6a4e88a0..fac0cb25 100644
--- a/Resource/Init/gs_icc.ps
+++ b/Resource/Init/gs_icc.ps
@@ -1,4 +1,4 @@
-% Copyright (C) 2001-2019 Artifex Software, Inc.
+% Copyright (C) 2001-2020 Artifex Software, Inc.
% All Rights Reserved.
%
% This software is provided AS-IS with no warranty, either express or
diff --git a/Resource/Init/gs_il1_e.ps b/Resource/Init/gs_il1_e.ps
index 3de6ab5c..f8cfff04 100644
--- a/Resource/Init/gs_il1_e.ps
+++ b/Resource/Init/gs_il1_e.ps
@@ -1,4 +1,4 @@
-% Copyright (C) 2001-2019 Artifex Software, Inc.
+% Copyright (C) 2001-2020 Artifex Software, Inc.
% All Rights Reserved.
%
% This software is provided AS-IS with no warranty, either express or
diff --git a/Resource/Init/gs_init.ps b/Resource/Init/gs_init.ps
index 05d01c21..849e24ef 100644
--- a/Resource/Init/gs_init.ps
+++ b/Resource/Init/gs_init.ps
@@ -1,4 +1,4 @@
-% Copyright (C) 2001-2019 Artifex Software, Inc.
+% Copyright (C) 2001-2020 Artifex Software, Inc.
% All Rights Reserved.
%
% This software is provided AS-IS with no warranty, either express or
@@ -34,7 +34,7 @@
% Interpreter library version number
% NOTE: the interpreter code requires that the first non-comment token
% in this file be an integer, and that it match the compiled-in version!
-952
+9530
% Check the interpreter revision.
dup revision ne
@@ -276,9 +276,9 @@ userdict /=string 256 string put
(\)\n) revisiondate 10 mod revisiondate 10 idiv 10 mod (-)
revisiondate 100 idiv 10 mod revisiondate 1000 idiv 10 mod (-)
revisiondate 10000 idiv ( \()
- revision 10 mod
- revision 100 mod 10 idiv (.)
- revision 100 idiv ( )
+ revision 10 mod (.)
+ revision 1000 mod 10 idiv (.)
+ revision 1000 idiv ( )
product
counttomark
{ (%stdout) (w) file exch 0 .writecvp
diff --git a/Resource/Init/gs_lev2.ps b/Resource/Init/gs_lev2.ps
index 8c41aba0..fefa732b 100644
--- a/Resource/Init/gs_lev2.ps
+++ b/Resource/Init/gs_lev2.ps
@@ -1,4 +1,4 @@
-% Copyright (C) 2001-2019 Artifex Software, Inc.
+% Copyright (C) 2001-2020 Artifex Software, Inc.
% All Rights Reserved.
%
% This software is provided AS-IS with no warranty, either express or
diff --git a/Resource/Init/gs_ll3.ps b/Resource/Init/gs_ll3.ps
index 6caa93f8..f6d98482 100644
--- a/Resource/Init/gs_ll3.ps
+++ b/Resource/Init/gs_ll3.ps
@@ -1,4 +1,4 @@
-% Copyright (C) 2001-2019 Artifex Software, Inc.
+% Copyright (C) 2001-2020 Artifex Software, Inc.
% All Rights Reserved.
%
% This software is provided AS-IS with no warranty, either express or
diff --git a/Resource/Init/gs_mex_e.ps b/Resource/Init/gs_mex_e.ps
index 7b28360f..dda0675c 100644
--- a/Resource/Init/gs_mex_e.ps
+++ b/Resource/Init/gs_mex_e.ps
@@ -1,4 +1,4 @@
-% Copyright (C) 2001-2019 Artifex Software, Inc.
+% Copyright (C) 2001-2020 Artifex Software, Inc.
% All Rights Reserved.
%
% This software is provided AS-IS with no warranty, either express or
diff --git a/Resource/Init/gs_mgl_e.ps b/Resource/Init/gs_mgl_e.ps
index 7c97efb9..e02729b1 100644
--- a/Resource/Init/gs_mgl_e.ps
+++ b/Resource/Init/gs_mgl_e.ps
@@ -1,4 +1,4 @@
-% Copyright (C) 2001-2019 Artifex Software, Inc.
+% Copyright (C) 2001-2020 Artifex Software, Inc.
% All Rights Reserved.
%
% This software is provided AS-IS with no warranty, either express or
diff --git a/Resource/Init/gs_mro_e.ps b/Resource/Init/gs_mro_e.ps
index f3f15430..7d0e3b7c 100644
--- a/Resource/Init/gs_mro_e.ps
+++ b/Resource/Init/gs_mro_e.ps
@@ -1,4 +1,4 @@
-% Copyright (C) 2001-2019 Artifex Software, Inc.
+% Copyright (C) 2001-2020 Artifex Software, Inc.
% All Rights Reserved.
%
% This software is provided AS-IS with no warranty, either express or
diff --git a/Resource/Init/gs_pdf_e.ps b/Resource/Init/gs_pdf_e.ps
index 382542ad..172cd72c 100644
--- a/Resource/Init/gs_pdf_e.ps
+++ b/Resource/Init/gs_pdf_e.ps
@@ -1,4 +1,4 @@
-% Copyright (C) 2001-2019 Artifex Software, Inc.
+% Copyright (C) 2001-2020 Artifex Software, Inc.
% All Rights Reserved.
%
% This software is provided AS-IS with no warranty, either express or
diff --git a/Resource/Init/gs_pdfwr.ps b/Resource/Init/gs_pdfwr.ps
index ed691b9d..a53b8c3f 100644
--- a/Resource/Init/gs_pdfwr.ps
+++ b/Resource/Init/gs_pdfwr.ps
@@ -1,4 +1,4 @@
-% Copyright (C) 2001-2019 Artifex Software, Inc.
+% Copyright (C) 2001-2020 Artifex Software, Inc.
% All Rights Reserved.
%
% This software is provided AS-IS with no warranty, either express or
diff --git a/Resource/Init/gs_res.ps b/Resource/Init/gs_res.ps
index 5559e6a9..18f63a30 100644
--- a/Resource/Init/gs_res.ps
+++ b/Resource/Init/gs_res.ps
@@ -1,4 +1,4 @@
-% Copyright (C) 2001-2019 Artifex Software, Inc.
+% Copyright (C) 2001-2020 Artifex Software, Inc.
% All Rights Reserved.
%
% This software is provided AS-IS with no warranty, either express or
diff --git a/Resource/Init/gs_resmp.ps b/Resource/Init/gs_resmp.ps
index ba17df60..5ba4f43e 100644
--- a/Resource/Init/gs_resmp.ps
+++ b/Resource/Init/gs_resmp.ps
@@ -1,4 +1,4 @@
-% Copyright (C) 2001-2019 Artifex Software, Inc.
+% Copyright (C) 2001-2020 Artifex Software, Inc.
% All Rights Reserved.
%
% This software is provided AS-IS with no warranty, either express or
diff --git a/Resource/Init/gs_setpd.ps b/Resource/Init/gs_setpd.ps
index 0733af0f..51b26899 100644
--- a/Resource/Init/gs_setpd.ps
+++ b/Resource/Init/gs_setpd.ps
@@ -1,4 +1,4 @@
-% Copyright (C) 2001-2019 Artifex Software, Inc.
+% Copyright (C) 2001-2020 Artifex Software, Inc.
% All Rights Reserved.
%
% This software is provided AS-IS with no warranty, either express or
diff --git a/Resource/Init/gs_statd.ps b/Resource/Init/gs_statd.ps
index 3ea50eee..7b85ef0f 100644
--- a/Resource/Init/gs_statd.ps
+++ b/Resource/Init/gs_statd.ps
@@ -1,4 +1,4 @@
-% Copyright (C) 2001-2019 Artifex Software, Inc.
+% Copyright (C) 2001-2020 Artifex Software, Inc.
% All Rights Reserved.
%
% This software is provided AS-IS with no warranty, either express or
diff --git a/Resource/Init/gs_std_e.ps b/Resource/Init/gs_std_e.ps
index f4ea79e3..4bfa6c5b 100644
--- a/Resource/Init/gs_std_e.ps
+++ b/Resource/Init/gs_std_e.ps
@@ -1,4 +1,4 @@
-% Copyright (C) 2001-2019 Artifex Software, Inc.
+% Copyright (C) 2001-2020 Artifex Software, Inc.
% All Rights Reserved.
%
% This software is provided AS-IS with no warranty, either express or
diff --git a/Resource/Init/gs_sym_e.ps b/Resource/Init/gs_sym_e.ps
index b9abc86f..fb92a299 100644
--- a/Resource/Init/gs_sym_e.ps
+++ b/Resource/Init/gs_sym_e.ps
@@ -1,4 +1,4 @@
-% Copyright (C) 2001-2019 Artifex Software, Inc.
+% Copyright (C) 2001-2020 Artifex Software, Inc.
% All Rights Reserved.
%
% This software is provided AS-IS with no warranty, either express or
diff --git a/Resource/Init/gs_trap.ps b/Resource/Init/gs_trap.ps
index 58c5888a..e4d6cafe 100644
--- a/Resource/Init/gs_trap.ps
+++ b/Resource/Init/gs_trap.ps
@@ -1,4 +1,4 @@
-% Copyright (C) 2001-2019 Artifex Software, Inc.
+% Copyright (C) 2001-2020 Artifex Software, Inc.
% All Rights Reserved.
%
% This software is provided AS-IS with no warranty, either express or
diff --git a/Resource/Init/gs_ttf.ps b/Resource/Init/gs_ttf.ps
index 6be8fe99..394cba28 100644
--- a/Resource/Init/gs_ttf.ps
+++ b/Resource/Init/gs_ttf.ps
@@ -1,4 +1,4 @@
-% Copyright (C) 2001-2019 Artifex Software, Inc.
+% Copyright (C) 2001-2020 Artifex Software, Inc.
% All Rights Reserved.
%
% This software is provided AS-IS with no warranty, either express or
@@ -1657,7 +1657,13 @@ currentdict /.pickcmap_with_no_xlatmap .undef
/CharStrings currentdict end
} .bind def
-% - .pdfcharkeys /CharStrings <charstrings> /Encoding <encoding>
+% If we're using a 1,0 cmap table, we need to store the table for the heuristic
+% to know whether to image or elide GID 0. See zfapi.c ps_get_glyphname_or_cid().
+% For other cmap types, we don't. Since this just pushes key/value pairs onto the
+% stack for a later dicttomark op, it doesn't matter that different branches can push
+% different numbers of objects.
+%
+% - .pdfcharkeys [/TT_cmap cmapdict] /CharStrings <charstrings> /Encoding <encoding>
/.pdfcharkeys {
% The following algorithms are per the PDF 1.7 Reference.
TTFDEBUG { (.pdfcharkeys beg) = } if
@@ -1736,12 +1742,13 @@ currentdict /.pickcmap_with_no_xlatmap .undef
} ifelse
} {
<00010000> //.findcmap exec {
+ /TT_cmap 1 index cmapdict 3 -1 roll
TTFDEBUG { (Using cmap 1.0 for non-symbolic.) = } if
prebuilt_encoding //null ne {
prebuilt_encoding .invert_encoding exch .romanmacdict //.pdfmapchars exec
prebuilt_encoding
} {
- 0 dict exch
+ 0 dict exch .romanmacdict //.pdfmapchars exec
/MacRomanEncodingForTrueType .findencoding
} ifelse
/Encoding exch
diff --git a/Resource/Init/gs_typ32.ps b/Resource/Init/gs_typ32.ps
index 9799a0be..2d5fc814 100644
--- a/Resource/Init/gs_typ32.ps
+++ b/Resource/Init/gs_typ32.ps
@@ -1,4 +1,4 @@
-% Copyright (C) 2001-2019 Artifex Software, Inc.
+% Copyright (C) 2001-2020 Artifex Software, Inc.
% All Rights Reserved.
%
% This software is provided AS-IS with no warranty, either express or
diff --git a/Resource/Init/gs_typ42.ps b/Resource/Init/gs_typ42.ps
index ba5074ce..654a268c 100644
--- a/Resource/Init/gs_typ42.ps
+++ b/Resource/Init/gs_typ42.ps
@@ -1,4 +1,4 @@
-% Copyright (C) 2001-2019 Artifex Software, Inc.
+% Copyright (C) 2001-2020 Artifex Software, Inc.
% All Rights Reserved.
%
% This software is provided AS-IS with no warranty, either express or
diff --git a/Resource/Init/gs_type1.ps b/Resource/Init/gs_type1.ps
index a039ccee..18488ebe 100644
--- a/Resource/Init/gs_type1.ps
+++ b/Resource/Init/gs_type1.ps
@@ -1,4 +1,4 @@
-% Copyright (C) 2001-2019 Artifex Software, Inc.
+% Copyright (C) 2001-2020 Artifex Software, Inc.
% All Rights Reserved.
%
% This software is provided AS-IS with no warranty, either express or
diff --git a/Resource/Init/gs_wan_e.ps b/Resource/Init/gs_wan_e.ps
index 406c7fae..5d3673cc 100644
--- a/Resource/Init/gs_wan_e.ps
+++ b/Resource/Init/gs_wan_e.ps
@@ -1,4 +1,4 @@
-% Copyright (C) 2001-2019 Artifex Software, Inc.
+% Copyright (C) 2001-2020 Artifex Software, Inc.
% All Rights Reserved.
%
% This software is provided AS-IS with no warranty, either express or
diff --git a/Resource/Init/pdf_base.ps b/Resource/Init/pdf_base.ps
index 618e5e51..2cc18270 100644
--- a/Resource/Init/pdf_base.ps
+++ b/Resource/Init/pdf_base.ps
@@ -1,4 +1,4 @@
-% Copyright (C) 2001-2019 Artifex Software, Inc.
+% Copyright (C) 2001-2020 Artifex Software, Inc.
% All Rights Reserved.
%
% This software is provided AS-IS with no warranty, either express or
@@ -288,9 +288,11 @@ currentdict /num-chars-dict .undef
% Execute a file, like .pdfrun, for a marking context.
% This temporarily rebinds LocalResources and DefaultQstate.
/.pdfruncontext { % <resdict> <file> <opdict> .pdfruncontext -
- /.pdfrun load LocalResources DefaultQstate
- /LocalResources 7 -1 roll
- dup /ParentResources LocalResources put % save the parent LocalResources
+ /.pdfrun load LocalResources DefaultQstate % res file op .pdfrun Loc Qst
+ /LocalResources 7 -1 roll % file op .pdfrun Loc Qst /Loc res
+ dup 4 index ne { % Ensure Loc != res to avoid self-referencing /ParentResources
+ dup /ParentResources 5 index put % save the parent LocalResources
+ } if
store % store new LocalResources
/DefaultQstate qstate store
3 .execn
@@ -487,7 +489,12 @@ currentdict /token_nofail_dict .undef
} if
oforce % but dereference {1 0 R}
dup type dup /arraytype eq exch /packedarraytype eq or {
- [ exch 2 index <<>> copy exch { safe_recursive exch } forall pop]
+ [ exch {
+ counttomark 1 add index <<>> copy % create a copy for the recursion
+ exch safe_recursive exch
+ pop % pop the dictionary created for this level
+ } forall
+ ]
} {
dup type /dicttype eq {
<< exch 2 index <<>> copy exch { 3 -1 roll exch safe_recursive 3 -1 roll oforce 3 1 roll exch } forall pop>>
diff --git a/Resource/Init/pdf_draw.ps b/Resource/Init/pdf_draw.ps
index 1deb0526..a93a526c 100644
--- a/Resource/Init/pdf_draw.ps
+++ b/Resource/Init/pdf_draw.ps
@@ -1,4 +1,4 @@
-% Copyright (C) 2001-2019 Artifex Software, Inc.
+% Copyright (C) 2001-2020 Artifex Software, Inc.
% All Rights Reserved.
%
% This software is provided AS-IS with no warranty, either express or
@@ -749,7 +749,6 @@ def
/GroupGState .knownget { setgstate } if
newpath //null SMask
- 1 .setopacityalpha 1 .setshapealpha
1 CA 1 ca
/Compatible .setblendmode
% Execute the body of the Form, similar to DoForm.
@@ -874,7 +873,15 @@ currentdict /csncompdict undef
dup dup 1 oget
mark exch { oforce } forall .dicttomark
dup dup //true resolvestream
- /ReusableStreamDecode filter /DataSource exch put
+ {
+ /ReusableStreamDecode filter
+ } stopped
+ {
+ pop null
+% ( **** Error: Failed to read ICC profile for an ICCBased colour space.\n) pdfformaterror
+% ( Falling back to a colour space determined by the /N value.\n) pdfformaterror
+ }if
+ /DataSource exch put
dup /.hash 0 put % placeholder for use by seticc icc_profile_cache key
% Check that the number of components (/N) defined in the ICCBased
% dictionry matches the actual profile. Bug #696120
@@ -1470,7 +1477,7 @@ drawopdict begin
/sh {
OFFlevels length 0 eq {
- setfillstate resolvesh
+ setsmaskstate resolvesh
//sh_save 0 save put
PDFusingtransparency {
gsave
@@ -2284,7 +2291,6 @@ currentdict /last-ditch-bpc-csp undef
PDFfile fileposition exch
gsave //nodict begin
//null .setSMask
- 1 .setopacityalpha 1 .setshapealpha
1 CA 1 ca
/Compatible .setblendmode
DoImage
@@ -2303,11 +2309,10 @@ currentdict /last-ditch-bpc-csp undef
currentdict /SMask get /Matte known {/CS currentdict /ColorSpace get dup pdfopdict /cs get exec } if
>> 0 0 1 1
.begintransparencygroup
- .currentstrokeconstantalpha .currentfillconstantalpha .currentshapealpha .currentopacityalpha 5 -1 roll
+ .currentstrokeconstantalpha .currentfillconstantalpha 3 -1 roll
1 .setfillconstantalpha 1 .setstrokeconstantalpha
- 1 .setopacityalpha 1 .setshapealpha
doimage
- .setopacityalpha .setshapealpha .setfillconstantalpha .setstrokeconstantalpha
+ .setfillconstantalpha .setstrokeconstantalpha
.endtransparencygroup
% tell the compositor we're done with the SMask.
% Note that any SMask in the ExtGState should be reapplied
@@ -2320,10 +2325,10 @@ currentdict /last-ditch-bpc-csp undef
% the image doesn't have an SMask, but the ExtGState does, force a group.
<< /Subtype /Group /Isolated //true >> 0 0 1 1
.begintransparencygroup
- .currentstrokeconstantalpha .currentfillconstantalpha .currentshapealpha .currentopacityalpha 5 -1 roll
- 1 .setopacityalpha 1 .setshapealpha
+ .currentstrokeconstantalpha .currentfillconstantalpha 3 -1 roll
+ 1 .setfillconstantalpha 1 .setstrokeconstantalpha
doimage
- .setopacityalpha .setshapealpha .setfillconstantalpha .setstrokeconstantalpha
+ .setfillconstantalpha .setstrokeconstantalpha
.endtransparencygroup
} {
doimage
@@ -2410,8 +2415,8 @@ currentdict /last-ditch-bpc-csp undef
4 array astore grestore
/image
setup_trans
- { currentdict end setfillstate //true ValidateDecode { imagemask } }
- { ColorSpace setgcolorspace currentdict end setfillblend //false ValidateDecode { image } }
+ { currentdict end setsmaskstate //true ValidateDecode { imagemask } }
+ { ColorSpace setgcolorspace currentdict end setsmaskstate //false ValidateDecode { image } }
ifelse
PDFSTOPONERROR { exec //false } { stopped } ifelse {
dup type /dicttype eq { pop } if % Sometimes image fails to restore the stack
@@ -2446,7 +2451,7 @@ currentdict /last-ditch-bpc-csp undef
/.paintform { % <formdict> <resdict> <stream> .paintform -
1 index /FormResDict gput % For broken forms that inherit resources from the context.
- 3 -1 roll dup /Group known PDFusingtransparency and {
+ 3 -1 roll dup /Group oknown PDFusingtransparency and {
.paintgroupform
} {
pop pdfopdict .pdfruncontext
@@ -2630,7 +2635,27 @@ pdfdict
} forall
} if
- 3 index //false /resolvestream cvx
+ 3 index
+ % /Contents for the stream is not per the spec, but Acrobat handles it
+ dup /Contents knownoget
+ {
+ % We want to make it's a dictionary, and represents a stream
+ dup type /dicttype eq
+ {
+ dup /FilePosition known
+ {
+ PDFSTOPONERROR { /DoForm cvx /undefinedresource signalerror } if
+ ( **** Error: Invalid Form definition. Output may be incorrect.\n) pdfformaterror
+ exch pop
+ }
+ {pop} ifelse
+ }
+ {
+ pop
+ }
+ ifelse
+ }if
+ //false /resolvestream cvx
/.paintform cvx
] cvx /PaintProc exch put
% Adjust pdfemptycount since we have an extra dictionary on the stack
@@ -2668,6 +2693,38 @@ pdfdict
pop
/pdfemptycount exch store
+ % We've now seen Form XObjects leaving junk on the stack, so we
+ % can't assume that when we finish the form the stack will be restored
+ % nor can we assume that the junk won't include a 'mark' so we an't
+ % simply do a cleartomark. Instead clear the stack until we get back
+ % to a dictionary which contains /saved_DG. We can still get errors;
+ % if the stream removes too many objects from the stack we will end
+ % up with a stackunderflow, but there's nothing we can do about that.
+ dup type /dicttype eq not {
+ //true
+ } {
+ dup /saved_DG known {
+ //false
+ } {
+ //true
+ } ifelse
+ } ifelse
+ {
+ ( **** Error: Form stream left garbage on the stack, attempting to recover.\n) pdfformaterror
+ ( Output may be incorrect.\n) pdfformaterror
+ {
+ dup type /dicttype eq not {
+ pop
+ } {
+ dup /saved_DG known {
+ exit
+ } {
+ pop
+ } ifelse
+ } ifelse
+ } loop
+ } if
+
%% Put back pre-existing Default* ColorSpace definitions.
dup type /dicttype eq {
begin
@@ -2816,7 +2873,7 @@ drawopdict begin
( Output may be incorrect.\n) pdfformaterror
currentdict /qTextSaveMatrix get setmatrix
} if
- setfillblend
+ setsmaskstate
PDFfile fileposition exch % pos /Name
% Bug #698226, Acrobat signals an error for recursive XObjects in a PDF file
@@ -3234,7 +3291,7 @@ end
{} 2 index /S knownoget {
/D eq { 2 index /D knownoget not { {3} } if exch pop } if
} if
- 3 index /CA knownoget {.setopacityalpha} if
+ 3 index /CA knownoget {dup .setstrokeconstantalpha .setfillconstantalpha} if
3 -1 roll pop
% 2 index annotsetcolor {
0 setdash setlinewidth stroke
@@ -3244,7 +3301,7 @@ end
% If element 3 of the /Border array is 0, then don't draw the border
dup 0 ne {
exch dup length 3 gt { 3 get } { pop {} } ifelse
- 3 index /CA knownoget {.setopacityalpha} if
+ 3 index /CA knownoget {dup .setstrokeconstantalpha .setfillconstantalpha} if
% 2 index annotsetcolor {
0 setdash setlinewidth stroke
% } if
@@ -3253,7 +3310,7 @@ end
} ifelse
} ifelse
} {
- 3 index /CA knownoget {.setopacityalpha} if
+ dup /CA knownoget {dup .setstrokeconstantalpha .setfillconstantalpha} if
1 {}
% 2 index annotsetcolor {
0 setdash setlinewidth stroke
@@ -3265,7 +3322,7 @@ end
/fillborderpath { % <annot> fillborderpath -
gsave
- dup /ca knownoget {.setopacityalpha} if
+ dup /ca knownoget {dup .setstrokeconstantalpha .setfillconstantalpha} if
annotsetinteriorcolor
{fill} if
grestore
@@ -3742,14 +3799,14 @@ currentdict /set_bc_color undef
annotsetinteriorcolor
{
gsave
- dup /ca knownoget {.setopacityalpha} if
+ dup /ca knownoget {dup .setstrokeconstantalpha .setfillconstantalpha} if
dup annotrect
5 index /RD knownoget {
applyRD
} if
rectfill
grestore
- dup /CA knownoget {.setopacityalpha} if
+ dup /CA knownoget {dup .setstrokeconstantalpha .setfillconstantalpha} if
dup annotsetcolor {
drawborder
} if
@@ -3851,10 +3908,10 @@ currentdict /set_bc_color undef
{
gsave
- dup /ca knownoget {.setopacityalpha} if
+ dup /ca knownoget {dup .setstrokeconstantalpha .setfillconstantalpha} if
fill
grestore
- dup /CA knownoget {.setopacityalpha} if
+ dup /CA knownoget {dup .setstrokeconstantalpha .setfillconstantalpha} if
dup annotsetcolor {
strokeborderpath
} if
@@ -3890,7 +3947,7 @@ currentdict /set_bc_color undef
dup 1 index exch lineto
dup neg lineto
closepath
- 1 index /CA knownoget {.setopacityalpha} if
+ 1 index /CA knownoget {dup .setstrokeconstantalpha .setfillconstantalpha} if
1 index fillborderpath
grestore
3 mul
@@ -3916,7 +3973,7 @@ currentdict /set_bc_color undef
2.5 mul dup
0 moveto
0 0 3 -1 roll 0 360 arc
- 1 index /CA knownoget {.setopacityalpha} if
+ 1 index /CA knownoget {dup .setstrokeconstantalpha .setfillconstantalpha} if
1 index fillborderpath
grestore
3 mul dup
@@ -3941,7 +3998,7 @@ currentdict /set_bc_color undef
dup 0 exch lineto
0 lineto
closepath
- 1 index /CA knownoget {.setopacityalpha} if
+ 1 index /CA knownoget {dup .setstrokeconstantalpha .setfillconstantalpha} if
1 index fillborderpath
grestore
3 mul
@@ -3991,7 +4048,7 @@ currentdict /set_bc_color undef
dup 2 div sub
dup 8.4 mul neg 1 index 5.9 mul neg moveto dup 1.2 div neg 0 lineto
dup 8.4 mul neg exch 5.9 mul lineto closepath
- dup /CA knownoget {.setopacityalpha} if
+ dup /CA knownoget {dup .setstrokeconstantalpha .setfillconstantalpha} if
fillborderpath
grestore
} bind executeonly def
@@ -4050,7 +4107,7 @@ currentdict /set_bc_color undef
dup 2 div sub
dup 8.4 mul neg 1 index 5.9 mul neg moveto dup 1.2 div neg 0 lineto
dup 8.4 mul neg exch 5.9 mul lineto closepath
- dup /CA knownoget {.setopacityalpha} if
+ dup /CA knownoget {dup .setstrokeconstantalpha .setfillconstantalpha} if
fillborderpath
grestore
} bind executeonly def
@@ -4090,7 +4147,7 @@ currentdict /set_bc_color undef
3 index aload pop 4 2 roll pop pop
translate
0 0 moveto
- atan % <annot> [x1 y1 x2 y2] [LE1 LE2]
+ {atan} stopped {pop pop 0} if % <annot> [x1 y1 x2 y2] [LE1 LE2]
rotate
dup 1 get % <annot> [x1 y1 x2 y2] [LE1 LE2] LE1
dup //LineEnd_dict exch known not
@@ -4109,7 +4166,7 @@ currentdict /set_bc_color undef
3 index aload pop pop pop
translate
0 0 moveto
- atan 180 add
+ {atan} stopped {pop pop 0} if 180 add
rotate
0 get dup //LineEnd_dict exch known not {pop /None} if //LineEnd_dict exch get 3 index exch exec
grestore
@@ -4137,15 +4194,16 @@ currentdict /set_bc_color undef
} {
gsave
//startannottransparency exec
+ dup annotsetcolor pop
dup /Vertices knownoget {
1 index /LE knownoget {
gsave
1 index 0 4 getinterval aload pop
4 2 roll
2 copy translate 4 2 roll
- 3 -1 roll sub % x1 x2 dy
- 3 1 roll exch sub % dy dx
- atan
+ 3 -1 roll exch sub % x1 x2 dy
+ 3 1 roll sub % dy dx
+ {atan} stopped {pop pop 0} if
rotate
dup 0 get dup //LineEnd_dict exch known not {pop /None} if //LineEnd_dict exch get 3 index exch exec
grestore
@@ -4155,7 +4213,7 @@ currentdict /set_bc_color undef
2 copy translate
3 -1 roll sub % x1 x2 dy
3 1 roll exch sub % dy dx
- atan
+ {atan} stopped {pop pop 0} if
rotate
1 get dup //LineEnd_dict exch known not {pop /None} if //LineEnd_dict exch get 3 index exch exec
grestore
@@ -4514,11 +4572,11 @@ currentdict /set_bc_color undef
dup annotrect rectclip
dup /CA knownoget {
- .setopacityalpha
+ dup .setstrokeconstantalpha .setfillconstantalpha
} if
dup /ca knownoget {
- .setopacityalpha
+ dup .setstrokeconstantalpha .setfillconstantalpha
} if
dup /C knownoget {
diff --git a/Resource/Init/pdf_font.ps b/Resource/Init/pdf_font.ps
index 60deb64e..98a9e3d4 100644
--- a/Resource/Init/pdf_font.ps
+++ b/Resource/Init/pdf_font.ps
@@ -1,4 +1,4 @@
-% Copyright (C) 2001-2019 Artifex Software, Inc.
+% Copyright (C) 2001-2020 Artifex Software, Inc.
% All Rights Reserved.
%
% This software is provided AS-IS with no warranty, either express or
@@ -2422,9 +2422,25 @@ currentdict /CMap_read_dict undef
} 2 bndef
<01000401> % Type 1C
- { exch pop
- 1 index /Subtype knownoget dup { pop /CIDFontType0 eq } if {
- readCIDFontType0C
+ {
+ exch pop
+
+ 1 index /Subtype knownoget {
+ dup /CIDFontType2 eq{
+ pop
+ ( **** Error: Subtype of a Type 1 CID font is not /CIDFontType0\n) pdfformaterror
+ ( Output may be incorrect.\n) pdfformaterror
+ 1 index /Subtype /CIDFontType0 put
+ readCIDFontType0C
+ }
+ {
+ /CIDFontType0 eq {
+ readCIDFontType0C
+ }
+ {
+ readType1C
+ } ifelse
+ } ifelse
} {
readType1C
} ifelse
diff --git a/Resource/Init/pdf_main.ps b/Resource/Init/pdf_main.ps
index 5cd90556..d7933700 100644
--- a/Resource/Init/pdf_main.ps
+++ b/Resource/Init/pdf_main.ps
@@ -1,4 +1,4 @@
-% Copyright (C) 2001-2019 Artifex Software, Inc.
+% Copyright (C) 2001-2020 Artifex Software, Inc.
% All Rights Reserved.
%
% This software is provided AS-IS with no warranty, either express or
@@ -278,6 +278,16 @@ systemdict begin
} bind odef
currentdict /runpdfstring .undef
+/DisablePageHandlerDevice
+{
+ systemdict /FirstPage known
+ systemdict /LastPage known or
+ systemdict /Pagelist known or
+ {
+ <</DisablePageHandler //true>> setpagedevice
+ } if
+} bind def
+
/runpdfbegin { % <file> runpdfbegin -
userdict begin
% It turns out that the PDF interpreter uses memory more
@@ -300,6 +310,8 @@ currentdict /runpdfstring .undef
%% resources and needs this definition in place.
<</MaxOpStack -1>> setuserparams
+ //DisablePageHandlerDevice exec
+
0 setobjectformat
/Page# //null def
/Page //null def
@@ -311,8 +323,9 @@ currentdict /runpdfstring .undef
/CumulativePageCount currentpagedevice /PageCount get def
} bind executeonly def
+currentdict /DisablePageHandlerDevice undef
+
/runpdfpagerange { % - runpdfpagerange <firstpage#> <lastpage#>
-<</DisablePageHandler //true>> setpagedevice
/PortfolioPage where {
pop
PortfolioPage cvi dup pdfpagecount add % a b+1
@@ -321,8 +334,8 @@ currentdict /runpdfstring .undef
dup 3 index exch cvs pop % a b+1 /P (b+1)
store
1 sub % a b
- /FirstPage where { pop FirstPage <</DisablePageHandler //true>> setpagedevice} { 1 } ifelse
- /LastPage where { pop LastPage <</DisablePageHandler //true>> setpagedevice} {2000000000} ifelse % a b fp lp
+ /FirstPage where { pop FirstPage} { 1 } ifelse
+ /LastPage where { pop LastPage} {2000000000} ifelse % a b fp lp
2 index 2 index lt { % b < fp
1e10
} {
@@ -395,7 +408,6 @@ currentdict /runpdfstring .undef
pop
}
forall
- <</DisablePageHandler //true>> setpagedevice
/PDFPageList pdfpagecount 1 add array def
{
(,) search {
@@ -477,7 +489,6 @@ currentdict /runpdfstring .undef
1 pdfpagecount
}{
/FirstPage where {
- <</DisablePageHandler //true>> setpagedevice
pop FirstPage dup pdfpagecount gt {
(\nRequested FirstPage is greater than the number of pages in the file: ) print
pdfpagecount = flush
@@ -485,7 +496,7 @@ currentdict /runpdfstring .undef
} {
1
} ifelse
- /LastPage where {<</DisablePageHandler //true>> setpagedevice pop LastPage pdfpagecount .min } { pdfpagecount } ifelse
+ /LastPage where {pop LastPage pdfpagecount .min } { pdfpagecount } ifelse
1 index 1 index gt {
( No pages will be processed \(FirstPage > LastPage\).) = flush
} {
@@ -513,7 +524,12 @@ currentdict /runpdfstring .undef
{
dup /Page# exch store
QUIET not { (Page ) print dup //== exec flush } if
- pdfgetpage pdfshowpage
+ pdfgetpage
+ dup //null ne { pdfshowpage } {
+ ( **** Error: Page #) pdfformaterror Page# 10 string cvs pdfformaterror
+ ( not found.\n) pdfformaterror
+ /dopdfpages cvx /syntaxerror signalerror
+ } ifelse
}{
pop
}ifelse
@@ -538,6 +554,7 @@ currentdict /runpdfstring .undef
PDFTopSave restore
end % userdict
2 vmreclaim % couldn't hurt
+ <</DisablePageHandler //false>> setpagedevice
} bind executeonly def
% Copy stream to an external temporary file and
@@ -1879,7 +1896,7 @@ currentdict /xref-char-dict undef
parent_obj_get % not found -- check it's parent.
} ifelse
} {
- pop pop pop 0
+ pop pop 0
} ifelse
} bind executeonly def
@@ -2076,14 +2093,19 @@ currentdict /xref-char-dict undef
/pdffindpageref { % <int> pdffindpage <objref>
dup pdffindpage?
% Stack: index countleft noderef
- 1 index 1 ne { pop pop /pdffindpage cvx /rangecheck signalerror } if
- exch pop
- PageIndex 2 index 1 sub 65533 .min 2 index oforce put
- PageNumbers 1 index oforce 3 index dup 65534 le
- { put }
- { pop pop pop } % don't store more than 65534 pagenumbers
+ dup //null ne {
+ 1 index 1 ne { pop pop /pdffindpage cvx /rangecheck signalerror } if
+ exch pop
+ PageIndex 2 index 1 sub 65533 .min 2 index oforce put
+ PageNumbers 1 index oforce 3 index dup 65534 le
+ { put }
+ { pop pop pop } % don't store more than 65534 pagenumbers
+ ifelse
+ } {
+ exch pop % return the //null
+ }
ifelse
- exch pop
+ exch pop % pop the page number, return the object or null
} bind executeonly def
/pdffindpage { % <int> pdffindpage <pagedict>
pdffindpageref oforce
@@ -2751,7 +2773,7 @@ currentdict /PDF2PS_matrix_key undef
dup /PDFusingtransparency exch def {
% If the current device isn't CMYK, or if it is a device that (currently) supports transparency
% we don't need the special handling of Overprint transparency, so disable the checking.
- currentpagedevice dup /Colors get 4 lt
+ currentpagedevice dup /Colors get 4 lt 1 index /SimulateOverprint get not or
exch /HaveTransparency .knownget not { //false } if or
% device needs special Oveprint handling
/setup_trans exch
@@ -2900,6 +2922,7 @@ currentdict /PDF2PS_matrix_key undef
% Draw the annotations
//systemdict /ShowAnnots .knownget not { //true } if {
/Annots knownoget {
+ dup type /arraytype eq {
{
/AnnotDrawCheck exch % marker to clean up stack on error
{oforce} stopped
@@ -2936,6 +2959,12 @@ currentdict /PDF2PS_matrix_key undef
} ifelse
} ifelse
} forall
+ }
+ {
+ ( **** Error: Annotation array is not an array, ignoring it.\n) pdfformaterror
+ ( Output may be incorrect.\n) pdfformaterror
+ pop
+ } ifelse
} if
} if
//systemdict /ShowAcroForm .knownget { //true eq } { //false } ifelse {
@@ -3119,48 +3148,56 @@ currentdict /PDF2PS_matrix_key undef
/annotsusetransparency { % <page dict> annotsusetransparency <bool>
//false exch % Assume no transparency
/Annots knownoget { % Get Annots array
+ dup type /arraytype eq {
+ {
+ /AnnotTransparencyCheck exch % marker to clean up stack on error
+ {oforce} stopped
+ {
+ ( **** Error: Unable to check an annotation for use of transparency.\n) pdfformaterror
+ ( Output may be incorrect.\n) pdfformaterror
+ count -1 0 { % make sure we don't go past the top of the stack
+ pop % remove the counter
+ /AnnotTransparencyCheck eq {exit} if % remove object and check if its the marker, exit if it is
+ } for
+ }
+ {
+ exch pop % remove the 'on error' marker
+ dup //null ne {
+ dup /Subtype knownoget {
+ /Highlight eq { % Highlight annotation is always implemented
+ pop pop //true exit % as transparency.
+ } if
+ } if
+ dup /AP knownoget { % Get appearance dict for the annoation
+ /N knownogetdict { % Get the /N (i.e. normal) appearance stream
+ 4 dict exch resourceusestransparency { pop pop //true exit } if
+ } if
+ } if % If AP dict known
+ dup /BM knownoget {
+ pop pop pop //true exit
+ } if
+ dup /CA knownoget {
+ 1 le {
+ pop pop //true exit
+ } if
+ } if
+ /ca knownoget {
+ 1 le {
+ pop //true exit
+ } if
+ } if
+ } {
+ pop
+ } ifelse
+ } ifelse
+ } forall % For all annots on the page
+ }
{
- /AnnotTransparencyCheck exch % marker to clean up stack on error
- {oforce} stopped
- {
- ( **** Error: Unable to check an annotation for use of transparency.\n) pdfformaterror
- ( Output may be incorrect.\n) pdfformaterror
- count -1 0 { % make sure we don't go past the top of the stack
- pop % remove the counter
- /AnnotTransparencyCheck eq {exit} if % remove object and check if its the marker, exit if it is
- } for
- }
- {
- exch pop % remove the 'on error' marker
- dup //null ne {
- dup /Subtype knownoget {
- /Highlight eq { % Highlight annotation is always implemented
- pop pop //true exit % as transparency.
- } if
- } if
- dup /AP knownoget { % Get appearance dict for the annoation
- /N knownogetdict { % Get the /N (i.e. normal) appearance stream
- 4 dict exch resourceusestransparency { pop pop //true exit } if
- } if
- } if % If AP dict known
- dup /BM knownoget {
- //true exit
- } if
- dup /CA knownoget {
- 1 le {
- pop pop //true exit
- } if
- } if
- /ca knownoget {
- 1 le {
- pop //true exit
- } if
- } if
- } {
- pop
- } ifelse
- } ifelse
- } forall % For all annots on the page
+ ( **** Error: Annotation array is not an array, ignoring it.\n) pdfformaterror
+ ( Output may be incorrect.\n) pdfformaterror
+ pop
+ }
+ ifelse
} if
} bind executeonly def
@@ -3277,17 +3314,24 @@ currentdict /PDF2PS_matrix_key undef
% <spotcolordict> <loopdict> <annotsarray>
% annotsspotcolors <spotcolordict> <loopdict>
/annotsspotcolors {
- { oforce
- dup //null ne {
- /AP knownoget { % Get appearance dict for the annoation
- /N knownogetdict { % Get the /N (i.e. normal) appearance stream
- resourcespotcolors
- } if % If normal appearance streamknown
- } if % If AP dict known
- } {
- pop
- } ifelse
- } forall
+ dup type /arraytype eq {
+ { oforce
+ dup //null ne {
+ /AP knownoget { % Get appearance dict for the annoation
+ /N knownogetdict { % Get the /N (i.e. normal) appearance stream
+ resourcespotcolors
+ } if % If normal appearance streamknown
+ } if % If AP dict known
+ } {
+ pop
+ } ifelse
+ } forall
+ }
+ {
+ ( **** Error: Annotation array is not an array, ignoring it.\n) pdfformaterror
+ ( Output may be incorrect.\n) pdfformaterror
+ pop
+ } ifelse
} bind executeonly def
% Determine spot colors are used within a page. We are creating a dict to
@@ -3311,6 +3355,7 @@ currentdict /PDF2PS_matrix_key undef
{
/Parent knownoget
{
+ dup /Pages known not { pop exit } if % not a valid Page Tree ancestor
dup 4 1 roll
resourcespotcolors
3 -1 roll
@@ -3603,6 +3648,43 @@ currentdict /PDF2PS_matrix_key undef
} bind executeonly def
end % pdfdict
+
+
+systemdict /ALLOWPSTRANSPARENCY get
+{
+ /.setopacityalpha
+ {
+ /.setfillconstantalpha where
+ {
+ pop
+ ( **** WARNING: .setopacityalpha is deprecated (as of 9.53.0) and will be removed in a future release\n) print
+ ( **** See .setfillconstantalpha/.setalphaisshape for the improved solution\n) print flush
+ false .setalphaisshape
+ dup .setfillconstantalpha
+ .setstrokeconstantalpha
+ }
+ {
+ /.setopacityalpha /undefined cvx signalerror
+ } ifelse
+ } bind def
+
+ /.setshapealpha
+ {
+ /.setfillconstantalpha where
+ {
+ pop
+ ( **** WARNING: .setshapealpha is deprecated (as of 9.53.0) and will be removed in a future release.\n) print
+ ( **** See .setfillconstantalpha/.setalphaisshape for the improved solution\n) print flush
+ true .setalphaisshape
+ dup .setfillconstantalpha
+ .setstrokeconstantalpha
+ }
+ {
+ /.setshapealpha /undefined cvx signalerror
+ } ifelse
+ } bind def
+} if
+
.setglobal
%% This list of operators are used internally by various parts of the Ghostscript PDF interpreter.
@@ -3626,21 +3708,15 @@ end % pdfdict
] systemdict .undefinternalnames
% The following are split out allowing control via ALLOWPSTRANSPARENCY command line param
+% The examples/transparency_example.ps uses some of these (on the first line).
[
- /.currentblendmode /.currentopacityalpha /.currentshapealpha /.currenttextknockout /.begintransparencytextgroup
+ /.pushpdf14devicefilter /.poppdf14devicefilter /.setstrokeconstantalpha /.setfillconstantalpha /.endtransparencygroup
+ /.currentblendmode /.currenttextknockout /.begintransparencytextgroup
/.endtransparencytextgroup /.begintransparencymaskgroup /.begintransparencymaskimage /.begintransparencypagegroup
- /.endtransparencymask /.image3x /.abortpdf14devicefilter /.setfillconstantalpha /.setalphaisshape /.currentalphaisshape
-
- % Used by our own test suite files
- %/.pushpdf14devicefilter % transparency-example.ps
- %/.poppdf14devicefilter % transparency-example.ps
- %/.setopacityalpha % transparency-example.ps
- %/.setshapealpha % transparency-example.ps
- %/.endtransparencygroup % transparency-example.ps
-
+ /.endtransparencymask /.image3x /.abortpdf14devicefilter /.setstrokeconstantalpha /.setfillconstantalpha /.setalphaisshape /.currentalphaisshape
% undefining these causes errors/incorrect output
%/.setblendmode /.begintransparencygroup /.settextknockout /.setstrokeoverprint /.setfilloverprint
%/.currentstrokeoverprint /.currentfilloverprint /.currentfillconstantalpha /.currentstrokeconstantalpha
- %/.setstrokeconstantalpha /.setfillconstantalpha /.setSMask /.currentSMask
+ %/.setSMask /.currentSMask
] systemdict dup /ALLOWPSTRANSPARENCY get {pop pop}{.undefinternalnames}ifelse
diff --git a/Resource/Init/pdf_ops.ps b/Resource/Init/pdf_ops.ps
index eb2168a5..47ff512d 100644
--- a/Resource/Init/pdf_ops.ps
+++ b/Resource/Init/pdf_ops.ps
@@ -1,4 +1,4 @@
-% Copyright (C) 2001-2019 Artifex Software, Inc.
+% Copyright (C) 2001-2020 Artifex Software, Inc.
% All Rights Reserved.
%
% This software is provided AS-IS with no warranty, either express or
@@ -304,7 +304,6 @@ currentdict /gput_always_allow .undef
4 2 roll
//CSdict exch get exec exch .setfillcolorspace exec {.setfillcolor} stopped
{
- (error) == flush
cleartomark
[//null /DeviceGray //null /DeviceRGB /DeviceCMYK] exch
{get} stopped
@@ -483,19 +482,19 @@ currentdict /gput_always_allow .undef
% ---------------- Color installation ---------------- %
% Establish a given color (and color space) as current.
-/.settransparencyparams { % <alpha> <smask> .settransparencyparams -
+/.settransparencyparams { % <smask> .settransparencyparams -
PDFusingtransparency {
.currentalphaisshape
{
- 1 .setopacityalpha exch .setshapealpha 1
+ 1
} {
- 1 .setshapealpha exch .setopacityalpha 0
+ 0
} ifelse
% Set the soft mask by rendering the XObject. Doing this every time
% is obviously very inefficient; we'll improve it later.
.settransparencymask
} {
- pop pop
+ pop
} ifelse
} bind executeonly def
/.settransparencymask { % <paramdict> <masknum> .settransparencymask -
@@ -517,16 +516,7 @@ currentdict /gput_always_allow .undef
} ifelse
} ifelse
} bind executeonly def
-% (Non-mask) images must execute setfillblend.
-/setfillblend {
- .currentfillconstantalpha
- .currentSMask .settransparencyparams
-} bind executeonly def
-/setfillstate {
- setfillblend
-} bind executeonly def
-/setstrokestate {
- .currentstrokeconstantalpha
+/setsmaskstate {
.currentSMask .settransparencyparams
} bind executeonly def
/Cdict 15 dict dup begin % <color...> <colorspace> -proc- -
@@ -673,12 +663,12 @@ end def
} ifelse
} bind executeonly def
-/OPsaveDstack 6 dict def % for GroupPushed, saveOP, saveSA, saveBM
+/OPsaveDstack 6 dict def % for GroupPushed, saveOP, saveFillAlpha, saveBM
//OPsaveDstack begin
/GroupPushed //false def
/ChangeBM //false def
- /saveOA 1 def
- /saveSA 1 def
+ /saveStrokeAlpha 1 def
+ /saveFillAlpha 1 def
/saveBM /Normal def
/previous 1 dict def % for nested setup_trans levels
end
@@ -694,7 +684,7 @@ end
/okOPcs mark /DeviceGray 0 /DeviceCMYK 1 /DeviceN 2 /Separation 3 .dicttomark def
% Take care of pushing a transparency group if we need it for SMask or for Overprint..
-% After pushing the group, we save the opacityalpha and shapealpha and change them
+% After pushing the group, we save the ca and CA and change them
% both to 1. For overprint if the colorspace is acceptable, also change to
% CompatibleOverprint if the device needs it.
@@ -721,10 +711,10 @@ end
mark /Subtype /Group /Isolated .currentSMask //null ne .dicttomark
2 index aload pop % pathbbox
.begintransparencygroup
- % After group pushed, set opacityalpha, shapealpha and blendmode
- /saveOA .currentopacityalpha def
- /saveSA .currentshapealpha def
- 1 .setopacityalpha 1 .setshapealpha
+ % After group pushed, set alphas and blendmode
+ /saveStrokeAlpha .currentstrokeconstantalpha def
+ /saveFillAlpha .currentfillconstantalpha def
+ 1 .setfillconstantalpha 1 .setstrokeconstantalpha
/GroupPushed //true def
} {
/GroupPushed //false def
@@ -748,10 +738,10 @@ end
mark /Subtype /Group /Isolated //true .dicttomark
2 index aload pop % pathbbox
.begintransparencygroup
- % After group pushed, set opacityalpha, shapealpha and blendmode
- /saveOA .currentopacityalpha def
- /saveSA .currentshapealpha def
- 1 .setopacityalpha 1 .setshapealpha
+ % After group pushed, set alphas and blendmode
+ /saveStrokeAlpha .currentstrokeconstantalpha def
+ /saveFillAlpha .currentfillconstantalpha def
+ 1 .setfillconstantalpha 1 .setstrokeconstantalpha
/GroupPushed //true def
} {
/GroupPushed //false def
@@ -766,9 +756,9 @@ end
/teardown_trans {
//OPsaveDstack begin
GroupPushed {
- % pop the group, then restore the opacityalpha and shapealpha
+ % pop the group, then restore the alphas
.endtransparencygroup % end the group
- saveOA .setopacityalpha saveSA .setshapealpha
+ saveStrokeAlpha .setstrokeconstantalpha saveFillAlpha .setfillconstantalpha
} if
% Also, if we changed the BM, restore it (AFTER the group was popped)
.currentblendmode /CompatibleOverprint eq {
@@ -904,7 +894,7 @@ currentdict dup /Dpush .undef /Dpop .undef
/S {
OFFlevels length 0 eq {
- setstrokestate .swapcolors /stroke fsexec .swapcolors
+ setsmaskstate .swapcolors /stroke fsexec .swapcolors
} {
newpath
} ifelse
@@ -912,7 +902,7 @@ currentdict dup /Dpush .undef /Dpop .undef
/f {
OFFlevels length 0 eq {
- setfillstate /fill fsexec
+ setsmaskstate /fill fsexec
} {
newpath
} ifelse
@@ -920,7 +910,7 @@ currentdict dup /Dpush .undef /Dpop .undef
/f* {
OFFlevels length 0 eq {
- setfillstate /eofill fsexec
+ setsmaskstate /eofill fsexec
} {
newpath
} ifelse
@@ -932,7 +922,7 @@ currentdict dup /Dpush .undef /Dpop .undef
/B {
OFFlevels length 0 eq {
- setstrokestate setfillstate /.fillstroke fsexec
+ setsmaskstate /.fillstroke fsexec
} {
newpath
} ifelse
@@ -942,7 +932,7 @@ currentdict dup /Dpush .undef /Dpop .undef
/B* {
OFFlevels length 0 eq {
- setstrokestate setfillstate /.eofillstroke fsexec
+ setsmaskstate /.eofillstroke fsexec
} {
newpath
} ifelse
@@ -953,9 +943,9 @@ currentdict dup /Dpush .undef /Dpop .undef
% Clipping:
/Wdict 8 dict dup begin
-/S { OFFlevels length 0 eq { gsave setstrokestate .swapcolors stroke .swapcolors grestore } if n } bind executeonly def
-/f { OFFlevels length 0 eq { gsave setfillstate fill grestore } if n } bind executeonly def
-/f* { OFFlevels length 0 eq { gsave setfillstate eofill grestore } if n } bind executeonly def
+/S { OFFlevels length 0 eq { gsave setsmaskstate .swapcolors stroke .swapcolors grestore } if n } bind executeonly def
+/f { OFFlevels length 0 eq { gsave setsmaskstate fill grestore } if n } bind executeonly def
+/f* { OFFlevels length 0 eq { gsave setsmaskstate eofill grestore } if n } bind executeonly def
/B {
OFFlevels length 0 eq {
.fillstroke
@@ -1154,7 +1144,7 @@ end readonly def
%% can come into pdf_text_begin with an opacity not equal to 1.
PDFusingtransparency .currenttextknockout and
currentdict /illegal_BT get not and
-{
+ {
.begintransparencytextgroup
} if
@@ -1205,7 +1195,17 @@ currentdict /clip_if_required .undef
} if
} bind executeonly def
-/Tc { .settextspacing { showfirst } /Show gput } bind executeonly def
+/Tc {
+ {.settextspacing} stopped
+ {
+ (\n **** Error: A ) pdfformaterror
+ $error /errorname get 256 string cvs pdfformaterror
+ ( error occured while setting the Text Character spacing to ) pdfformaterror
+ 256 string cvs pdfformaterror
+ (\n Output may be incorrect.\n) pdfformaterror
+ } if
+ { showfirst } /Show gput
+} bind executeonly def
/TL { .settextleading } bind executeonly def
/Tr { .settextrenderingmode { showfirst } /Show gput } bind executeonly def
/Ts { .settextrise settextstate } bind executeonly def
@@ -1328,10 +1328,10 @@ currentdict /clip_if_required .undef
{ % We add 1 to the length just in case the original
% didn't have a FID.
exch dup length 1 add dict exch
- { % Stack: changed newfont key value
- 1 index /FID eq
- not { 3 copy put } if pop pop
- }
+ { % Stack: changed newfont key value
+ 1 index /FID eq
+ not { 3 copy put } if pop pop
+ }
forall exch
}
if pop
@@ -1471,9 +1471,9 @@ currentdict /clip_if_required .undef
/pdfwrite_textrenderingprocs [
% Tr 0 - Fill
- { setfillstate show } bind executeonly
+ { setsmaskstate show } bind executeonly
% Tr 1 - Stroke
- { currentlinewidth exch setstrokestate
+ { currentlinewidth exch setsmaskstate
% Need to set the stroke width to a value which gives the correct
% width under pdfwrite. Pdfwrite uses (in text mode) an identity
% CTM, so we need to calculate the stroke width which would result
@@ -1493,7 +1493,7 @@ currentdict /clip_if_required .undef
}ifelse setlinewidth
show setlinewidth} bind executeonly
% Tr 2 - Fill then Stroke
- { currentlinewidth exch setstrokestate
+ { currentlinewidth exch setsmaskstate
% Need to set the stroke width to a value which gives the correct
% width under pdfwrite. Pdfwrite uses (in text mode) an identity
% CTM, so we need to calculate the stroke width which would result
@@ -1511,9 +1511,9 @@ currentdict /clip_if_required .undef
% we can ignore it. (wrong answer, but consistent)
pop pop currentlinewidth
}ifelse setlinewidth
- setfillstate show setlinewidth} bind executeonly
+ setsmaskstate show setlinewidth} bind executeonly
% Tr 3 - Neither fill nor stroke
- { setfillstate show } bind executeonly
+ { setsmaskstate show } bind executeonly
%
% pdfwrite emits all text inside a gsave/grestore pair. As
% a result we can't preserve any of the 'clip' modes, as the
@@ -1522,7 +1522,7 @@ currentdict /clip_if_required .undef
%
% Tr 4 - Fill, add to clip
{ gsave 0 .settextrenderingmode
- setfillstate dup show grestore //true charpath } bind executeonly
+ setsmaskstate dup show grestore //true charpath } bind executeonly
% Tr 5 - Stroke, add to clip
{ gsave 1 .settextrenderingmode
currentlinewidth dup
@@ -1534,7 +1534,7 @@ currentdict /clip_if_required .undef
% we can ignore it. (wrong answer, but consistent)
pop pop currentlinewidth
}ifelse setlinewidth
- setstrokestate dup show grestore
+ setsmaskstate dup show grestore
//true charpath} bind executeonly
% Tr 6 - Fill, stroke, add to clip
{ gsave 2 .settextrenderingmode
@@ -1551,7 +1551,7 @@ currentdict /clip_if_required .undef
% we can ignore it. (wrong answer, but consistent)
pop pop currentlinewidth
}ifelse setlinewidth
- setstrokestate setfillstate dup show grestore
+ setsmaskstate dup show grestore
//true charpath} bind executeonly
% Tr 7 - Add to clip
{ //true charpath} bind executeonly
@@ -1567,7 +1567,7 @@ currentdict /clip_if_required .undef
{
.currenttextrenderingmode 1 eq .currenttextrenderingmode 2 eq or
.currenttextrenderingmode 5 eq .currenttextrenderingmode 6 eq or or {
- setstrokestate
+ setsmaskstate
% Need to set the stroke width to a value which gives the correct
% width under pdfwrite. Pdfwrite uses (in text mode) an identity
% CTM, so we need to calculate the stroke width which would result
@@ -1589,7 +1589,7 @@ currentdict /clip_if_required .undef
% conditionally set fillstate to avoid multiple operations during text operators
/settextfillstate {
- TextFillStateNeeded { setfillstate //false /TextFillStateNeeded gput } if
+ TextFillStateNeeded { setsmaskstate //false /TextFillStateNeeded gput } if
} bind executeonly def
% If current path is not known to be valid, use the clip path
@@ -1786,7 +1786,7 @@ currentdict /clip_if_required .undef
% correctly.
gsave .currenttextrenderingmode 4 sub .settextrenderingmode
setstrokeforTrpreservation
- setstrokestate settextfillstate //false TextTransSetup dup show grestore TextTransTeardown } if
+ setsmaskstate settextfillstate //false TextTransSetup dup show grestore TextTransTeardown } if
//false charpath
3 copy 32 eq { add } { exch pop } ifelse
% Stack: str wthis xorig yorig wword wchar ccode wextra
@@ -1873,7 +1873,7 @@ currentdict /clip_if_required .undef
}
{
.currentPDFfontsize 0 eq not {
- setstrokestate //true TextTransSetup
+ setsmaskstate //true TextTransSetup
currentpoint //Tmatrix currentmatrix TextSaveMatrix setmatrix
currentdict /qTextSaveMatrix known {qTextSaveMatrix setmatrix} if
.swapcolors stroke TextTransTeardown .swapcolors
@@ -1885,24 +1885,29 @@ currentdict /clip_if_required .undef
% Handle transparency the same as /B operator
/tB {
- PDFusingtransparency {
- % knockout trans group around the filled and stroked object
- mark
- /Isolated //true /Knockout //true
- .dicttomark
- 1 .setopacityalpha
- % While text will always have a currentpoint, strokepath seems to mess with it.
- % we get the currentpoint, then use moveto to restore it for pathbbox
- { gsave currentpoint strokepath moveto pathbbox } stopped grestore {
- /tB cvx /undefinedresult signalerror
- } if
- .begintransparencygroup
- gsave tf grestore tS
- .endtransparencygroup
- } {
- gsave tf grestore tS
- } ifelse
- //true /TextFillStateNeeded gput
+ % Type 3 fonts don't honour text rendering modes, see note on p401 of the 1.7 PDF Reference
+ currentfont /FontType get 3 eq
+ {
+ settextfillstate //true TextTransSetup currentpoint fill TextTransTeardown moveto
+ }
+ {
+ % Don't try to draw text when the point size is 0
+ .currentPDFfontsize 0 eq not {
+ setsmaskstate settextfillstate
+ % While text will always have a currentpoint, strokepath seems to mess with it.
+ % we get the currentpoint, then use moveto to restore it.
+ currentpoint
+
+ % For stroking characters, temporarily restore the graphics CTM so that
+ % the line width will be transformed properly.
+ //Tmatrix currentmatrix TextSaveMatrix setmatrix
+ currentdict /qTextSaveMatrix known {qTextSaveMatrix setmatrix} if
+ B
+ setmatrix
+ moveto
+ } if
+ } ifelse
+ //true /TextFillStateNeeded gput
} bind executeonly def
% This does the wrong thing if there have been multiple text operations
diff --git a/Resource/Init/pdf_rbld.ps b/Resource/Init/pdf_rbld.ps
index b018c5c7..037f10b7 100644
--- a/Resource/Init/pdf_rbld.ps
+++ b/Resource/Init/pdf_rbld.ps
@@ -1,4 +1,4 @@
-% Copyright (C) 2001-2019 Artifex Software, Inc.
+% Copyright (C) 2001-2020 Artifex Software, Inc.
% All Rights Reserved.
%
% This software is provided AS-IS with no warranty, either express or
@@ -444,7 +444,7 @@
pdfformaterror
( **** The file has been damaged. This may have been caused\n)
pdfformaterror
- ( **** by a problem while converting or transfering the file.\n)
+ ( **** by a problem while converting or transferring the file.\n)
pdfformaterror
( **** Ghostscript will attempt to recover the data.\n)
pdfformaterror
diff --git a/Resource/Init/pdf_sec.ps b/Resource/Init/pdf_sec.ps
index 0f77e556..b6f2bfce 100644
--- a/Resource/Init/pdf_sec.ps
+++ b/Resource/Init/pdf_sec.ps
@@ -1,4 +1,4 @@
-% Copyright (C) 2001-2019 Artifex Software, Inc.
+% Copyright (C) 2001-2020 Artifex Software, Inc.
% All Rights Reserved.
%
% This software is provided AS-IS with no warranty, either express or
@@ -454,6 +454,63 @@ systemdict /check_r6_password .forceundef
printProducer
/pdf_process_Encrypt cvx /undefined signalerror
} if
+
+ % Bug 702598: We can have a trailer dictionary with an /Encrypt entry, and if the
+ % Encrypt dictionary is V 4 or greater we can (should ?) have StrF and stmF entries.
+ %
+ % The code below checks for the existence of StmF and StrF entries. Its possible
+ % that both may be /Identity (which means no encryption) in which case we don't need to check
+ % the password, as we won't need to decrypt any streams or strings. Note that the dict may still
+ % have a non-Identity /EFF (embedded files) key, but Ghostscript doesn't process embedded
+ % files so we don't have to worry about that.
+ Trailer /Encrypt oget dup
+ /V get 4 ge {
+ % NB: Entries in the Encrypt dictionary cannot be indirect references
+ dup /StmF .knownget {
+ /Identity eq not
+ } {
+ false % default StmF is Identity
+ }ifelse
+ 1 index /StrF .knownget {
+ /Identity eq not
+ } {
+ false % default StrF is Identity
+ }ifelse
+ or
+ % ...still in the V4 or above checking...
+ % Even if StmF and StrF are Identity, if the StdCF is missing AuthEvent
+ % or it is DocOpen, we require the password. Check for that.
+ 1 index /CF .knownget {
+ /StdCF .knownget {
+ /AuthEvent .knownget {
+ /DocOpen eq
+ or
+ } {
+ pop true % no AuthEvent, default is DocOpen, require password
+ } ifelse
+ } {
+ pop true % no StdCF, require password
+ } ifelse
+ } {
+ pop true % no CF, require password
+ } ifelse
+ exch pop % discard Encrypt dict
+ }{
+ % Not V4 or later
+ pop true % discard Encrypt dict, require password
+ } ifelse
+ % If we were given a PDFPassword, check it anyway, even if the
+ % code above said we didn't need one. This will allow us to process
+ % PDF files with an initial CryptFilter which has StrF=StmF=Identity,
+ % but contains streams which themselves have non-Identity StmF or StrF.
+ /PDFPassword where {
+ pop true
+ }
+ {
+ false
+ } ifelse
+ or
+ {
() pdf_check_password
{
/FileKey exch def
@@ -504,13 +561,13 @@ systemdict /check_r6_password .forceundef
/pdf_process_Encrypt cvx /invalidfileaccess signalerror
} ifelse
} ifelse
-
-% Trailer /Encrypt oget /P oget 4 and 0 eq #? and
-% { ( ****This owner of this file has requested you do not print it.\n)
-% pdfformaterror printProducer
-% /pdf_process_Encrypt cvx /invalidfileaccess signalerror
-% }
-% if
+ }
+ {
+ ( **** This file has an Encryption dictionary, but both the StmF and StrF entries\n) pdfformatwarning
+ ( **** are /Identity, and AuthEvent allows the document to be opened. It is possible\n) pdfformatwarning
+ ( **** that embedded streams may still use encryption, if the file fails to process\n) pdfformatwarning
+ ( **** you may need to supply a User or Owner password by setting -sPDFPassword=\n) pdfformatwarning
+ } ifelse
} bind executeonly def
% Calculate the key used to decrypt an object (to pass to .decpdfrun or
diff --git a/Resource/SubstCID/CNS1-WMode b/Resource/SubstCID/CNS1-WMode
index 2ff67d52..cc0e9bbd 100644
--- a/Resource/SubstCID/CNS1-WMode
+++ b/Resource/SubstCID/CNS1-WMode
@@ -1,4 +1,4 @@
-% Copyright (C) 2001-2019 Artifex Software, Inc.
+% Copyright (C) 2001-2020 Artifex Software, Inc.
% All Rights Reserved.
%
% This software is provided AS-IS with no warranty, either express or
diff --git a/Resource/SubstCID/GB1-WMode b/Resource/SubstCID/GB1-WMode
index bc82cc99..22da0829 100644
--- a/Resource/SubstCID/GB1-WMode
+++ b/Resource/SubstCID/GB1-WMode
@@ -1,4 +1,4 @@
-% Copyright (C) 2001-2019 Artifex Software, Inc.
+% Copyright (C) 2001-2020 Artifex Software, Inc.
% All Rights Reserved.
%
% This software is provided AS-IS with no warranty, either express or
diff --git a/Resource/SubstCID/Japan1-WMode b/Resource/SubstCID/Japan1-WMode
index bfdbe321..9f85a86e 100644
--- a/Resource/SubstCID/Japan1-WMode
+++ b/Resource/SubstCID/Japan1-WMode
@@ -1,4 +1,4 @@
-% Copyright (C) 2001-2019 Artifex Software, Inc.
+% Copyright (C) 2001-2020 Artifex Software, Inc.
% All Rights Reserved.
%
% This software is provided AS-IS with no warranty, either express or
diff --git a/Resource/SubstCID/Korea1-WMode b/Resource/SubstCID/Korea1-WMode
index 472a5738..ff59b9dc 100644
--- a/Resource/SubstCID/Korea1-WMode
+++ b/Resource/SubstCID/Korea1-WMode
@@ -1,4 +1,4 @@
-% Copyright (C) 2001-2019 Artifex Software, Inc.
+% Copyright (C) 2001-2020 Artifex Software, Inc.
% All Rights Reserved.
%
% This software is provided AS-IS with no warranty, either express or
diff --git a/arch/arch_autoconf.h.in b/arch/arch_autoconf.h.in
index 34ec8678..87fa50b9 100644
--- a/arch/arch_autoconf.h.in
+++ b/arch/arch_autoconf.h.in
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001-2019 Artifex Software, Inc.
+/* Copyright (C) 2001-2020 Artifex Software, Inc.
All Rights Reserved.
This software is provided AS-IS with no warranty, either express or
diff --git a/arch/windows-arm-msvc.h b/arch/windows-arm-msvc.h
index a814f753..b347381e 100644
--- a/arch/windows-arm-msvc.h
+++ b/arch/windows-arm-msvc.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001-2019 Artifex Software, Inc.
+/* Copyright (C) 2001-2020 Artifex Software, Inc.
All Rights Reserved.
This software is provided AS-IS with no warranty, either express or
diff --git a/arch/windows-x64-msvc.h b/arch/windows-x64-msvc.h
index 934d60cc..3be724f3 100644
--- a/arch/windows-x64-msvc.h
+++ b/arch/windows-x64-msvc.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001-2019 Artifex Software, Inc.
+/* Copyright (C) 2001-2020 Artifex Software, Inc.
All Rights Reserved.
This software is provided AS-IS with no warranty, either express or
diff --git a/arch/windows-x86-msvc.h b/arch/windows-x86-msvc.h
index 23b8d618..76b6e806 100644
--- a/arch/windows-x86-msvc.h
+++ b/arch/windows-x86-msvc.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001-2019 Artifex Software, Inc.
+/* Copyright (C) 2001-2020 Artifex Software, Inc.
All Rights Reserved.
This software is provided AS-IS with no warranty, either express or
diff --git a/base/all-arch.mak b/base/all-arch.mak
index 4263d01b..cb9b56b5 100644
--- a/base/all-arch.mak
+++ b/base/all-arch.mak
@@ -1,4 +1,4 @@
-# Copyright (C) 2001-2019 Artifex Software, Inc.
+# Copyright (C) 2001-2020 Artifex Software, Inc.
# All Rights Reserved.
#
# This software is provided AS-IS with no warranty, either express or
diff --git a/base/assert_.h b/base/assert_.h
index a00007f9..6be404ed 100644
--- a/base/assert_.h
+++ b/base/assert_.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001-2019 Artifex Software, Inc.
+/* Copyright (C) 2001-2020 Artifex Software, Inc.
All Rights Reserved.
This software is provided AS-IS with no warranty, either express or
diff --git a/base/bench.c b/base/bench.c
index 170c8d9b..6ff8aca9 100644
--- a/base/bench.c
+++ b/base/bench.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001-2019 Artifex Software, Inc.
+/* Copyright (C) 2001-2020 Artifex Software, Inc.
All Rights Reserved.
This software is provided AS-IS with no warranty, either express or
diff --git a/base/bobbin.c b/base/bobbin.c
index 2994bd46..63720f3e 100644
--- a/base/bobbin.c
+++ b/base/bobbin.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2016-2018 Artifex Software, Inc.
+/* Copyright (C) 2016-2020 Artifex Software, Inc.
All Rights Reserved.
This software is provided AS-IS with no warranty, either express or
diff --git a/base/bobbin.h b/base/bobbin.h
index 01863c5a..04c6d9aa 100644
--- a/base/bobbin.h
+++ b/base/bobbin.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2016-2018 Artifex Software, Inc.
+/* Copyright (C) 2016-2020 Artifex Software, Inc.
All Rights Reserved.
This software is provided AS-IS with no warranty, either express or
diff --git a/base/cal.mak b/base/cal.mak
index 2e18077b..8a718a29 100644
--- a/base/cal.mak
+++ b/base/cal.mak
@@ -56,6 +56,8 @@ cal_OBJS = \
$(CAL_OBJ)$(CAL_PREFIX)blendavx2.$(OBJ) \
$(CAL_OBJ)$(CAL_PREFIX)blendsse42.$(OBJ)\
$(CAL_OBJ)$(CAL_PREFIX)blend.$(OBJ) \
+ $(CAL_OBJ)$(CAL_PREFIX)skew.$(OBJ) \
+ $(CAL_OBJ)$(CAL_PREFIX)deskew.$(OBJ) \
$(CAL_OBJ)$(CAL_PREFIX)cmsavx2.$(OBJ) \
$(CAL_OBJ)$(CAL_PREFIX)cmssse42.$(OBJ) \
$(CAL_OBJ)$(CAL_PREFIX)cmsneon.$(OBJ) \
@@ -121,6 +123,12 @@ $(CAL_OBJ)$(CAL_PREFIX)blendsse42.$(OBJ) : $(CAL_SRC)blendsse42.c $(cal_HDRS) $(
$(CAL_OBJ)$(CAL_PREFIX)blend.$(OBJ) : $(CAL_SRC)blend.c $(cal_HDRS) $(CAL_DEP) $(gsmemory_h)
$(CAL_CC) $(I_)$(GLSRC) $(CAL_O)blend.$(OBJ) $(C_) $(CAL_SRC)blend.c
+$(CAL_OBJ)$(CAL_PREFIX)skew.$(OBJ) : $(CAL_SRC)skew.c $(cal_HDRS) $(CAL_DEP) $(gsmemory_h)
+ $(CAL_CC) $(CAL_SSE4_2_CFLAGS) $(I_)$(GLSRC) $(CAL_O)skew.$(OBJ) $(C_) $(CAL_SRC)skew.c
+
+$(CAL_OBJ)$(CAL_PREFIX)deskew.$(OBJ) : $(CAL_SRC)deskew.c $(cal_HDRS) $(CAL_DEP) $(gsmemory_h)
+ $(CAL_CC) $(CAL_SSE4_2_CFLAGS) $(CAL_NEON_CFLAGS) $(I_)$(GLSRC) $(CAL_O)deskew.$(OBJ) $(C_) $(CAL_SRC)deskew.c
+
cal_ets_h=$(CAL_SRC)cal_ets.h
ca_ets_tm_h=$(CAL_SRC)cal_ets_tm.h
$(GLOBJ)ets_1.$(OBJ) : $(CAL_SRC)cal_ets.c $(CAL_SRC)ets_template.c \
diff --git a/base/claptrap-impl.h b/base/claptrap-impl.h
index dc9cca30..f758d5e0 100644
--- a/base/claptrap-impl.h
+++ b/base/claptrap-impl.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001-2019 Artifex Software, Inc.
+/* Copyright (C) 2001-2020 Artifex Software, Inc.
All Rights Reserved.
This software is provided AS-IS with no warranty, either express or
diff --git a/base/claptrap-init.c b/base/claptrap-init.c
index f32e2712..3e20d3ed 100644
--- a/base/claptrap-init.c
+++ b/base/claptrap-init.c
@@ -45,8 +45,8 @@ ClapTrap *ClapTrap_Init(gs_memory_t *mem,
ct->y = 0;
ct->span = width * num_comps;
- ct->linebuf = gs_alloc_bytes(mem, ct->span * ct->lines_in_buf, "ClapTrap linebuf");
- ct->process = gs_alloc_bytes(mem, ct->width * ct->lines_in_buf, "ClapTrap process");
+ ct->linebuf = gs_alloc_bytes(mem, (size_t)ct->span * ct->lines_in_buf, "ClapTrap linebuf");
+ ct->process = gs_alloc_bytes(mem, (size_t)ct->width * ct->lines_in_buf, "ClapTrap process");
if (ct->linebuf == NULL || ct->process == NULL)
{
gs_free_object(mem, ct->linebuf, "ClapTrap linebuf");
diff --git a/base/claptrap-planar.c b/base/claptrap-planar.c
index 9b06b184..e77233ae 100644
--- a/base/claptrap-planar.c
+++ b/base/claptrap-planar.c
@@ -44,7 +44,7 @@ inline static void process_at_pixel(ClapTrap * gs_restrict ct,
int width = ct->width;
int height = ct->height;
#ifndef NDEBUG
- int num_comp_lim = ct->num_comps;
+ int num_comp_lim = ct->num_comps-1;
#endif
int max_x_offset = ct->max_x_offset;
int max_y_offset = ct->max_y_offset;
@@ -152,7 +152,7 @@ int ClapTrap_GetLinePlanar(ClapTrap * gs_restrict ct,
int x;
int line_offset;
unsigned char *process;
- int num_comp_lim = ct->num_comps;
+ int num_comp_lim = ct->num_comps-1;
/* Read in as many lines as we need */
max_y = ct->y + ct->max_y_offset;
diff --git a/base/claptrap.c b/base/claptrap.c
index 1ca57370..5829f09e 100644
--- a/base/claptrap.c
+++ b/base/claptrap.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2015-2018 Artifex Software, Inc.
+/* Copyright (C) 2015-2020 Artifex Software, Inc.
All Rights Reserved.
This software is provided AS-IS with no warranty, either express or
diff --git a/base/claptrap.h b/base/claptrap.h
index 64902fee..2b28c04f 100644
--- a/base/claptrap.h
+++ b/base/claptrap.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001-2019 Artifex Software, Inc.
+/* Copyright (C) 2015-2020 Artifex Software, Inc.
All Rights Reserved.
This software is provided AS-IS with no warranty, either express or
diff --git a/base/ctype_.h b/base/ctype_.h
index 0123c6b9..32e8f9a6 100644
--- a/base/ctype_.h
+++ b/base/ctype_.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001-2019 Artifex Software, Inc.
+/* Copyright (C) 2001-2020 Artifex Software, Inc.
All Rights Reserved.
This software is provided AS-IS with no warranty, either express or
diff --git a/base/dirent_.h b/base/dirent_.h
index dc1e8b40..6eae53d2 100644
--- a/base/dirent_.h
+++ b/base/dirent_.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001-2019 Artifex Software, Inc.
+/* Copyright (C) 2001-2020 Artifex Software, Inc.
All Rights Reserved.
This software is provided AS-IS with no warranty, either express or
diff --git a/base/dos_.h b/base/dos_.h
index ffc8b05e..29f92aa5 100644
--- a/base/dos_.h
+++ b/base/dos_.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001-2019 Artifex Software, Inc.
+/* Copyright (C) 2001-2020 Artifex Software, Inc.
All Rights Reserved.
This software is provided AS-IS with no warranty, either express or
diff --git a/base/echogs.c b/base/echogs.c
index ae68402c..b8e93d9f 100644
--- a/base/echogs.c
+++ b/base/echogs.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001-2019 Artifex Software, Inc.
+/* Copyright (C) 2001-2020 Artifex Software, Inc.
All Rights Reserved.
This software is provided AS-IS with no warranty, either express or
diff --git a/base/endianness.h b/base/endianness.h
new file mode 100644
index 00000000..a609e622
--- /dev/null
+++ b/base/endianness.h
@@ -0,0 +1,17 @@
+#ifndef LEPTONICA_ENDIANNESS_H
+#define LEPTONICA_ENDIANNESS_H
+
+#include "arch.h"
+
+#if ARCH_IS_BIG_ENDIAN
+#define L_BIG_ENDIAN
+#endif
+
+#ifdef L_BIG_ENDIAN
+#else
+# ifndef L_LITTLE_ENDIAN
+# define L_LITTLE_ENDIAN
+# endif
+#endif
+
+#endif
diff --git a/base/errno_.h b/base/errno_.h
index f7ed62dc..5f05c616 100644
--- a/base/errno_.h
+++ b/base/errno_.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001-2019 Artifex Software, Inc.
+/* Copyright (C) 2001-2020 Artifex Software, Inc.
All Rights Reserved.
This software is provided AS-IS with no warranty, either express or
diff --git a/base/ets.c b/base/ets.c
index 598ebbda..2b6a073f 100644
--- a/base/ets.c
+++ b/base/ets.c
@@ -1,4 +1,4 @@
- /*
+/*
* Testbed implementation of Even Better Screening. Please see
* http://www.artofcode.com/eventone/ for more details.
*
@@ -9,7 +9,18 @@
* of ETS is for commercial licensees and is governed by the licensing
* agreement between artofcode LLC and the licensee. Please see
* http://www.artofcode.com/eventone/ for information on licensing.
-*/
+ *
+ * Subsequent Changes: Copyright (C) 2013-2020 Artifex Software, Inc.
+ *
+ * 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 the license contained in the file LICENSE in this distribution.
+ */
#include <stdlib.h>
#include <string.h>
@@ -101,7 +112,7 @@ typedef struct {
* on an input line. Called to generate optimised versions.
*/
static inline void
-ets_line_template(unsigned char * gs_restrict * gs_restrict dest, const ETS_SrcPixel * const gs_restrict * gs_restrict src, int n_planes, int levels, int aspect_x, int aspect_y, int elo, int ehi, int ets_bias, int r_style, int old_quant, int fancy_coupling, int * gs_restrict c_line,
+ets_line_template(unsigned char * gs_restrict * gs_restrict dest, const ETS_SrcPixel * const gs_restrict * gs_restrict src, int n_planes, int levels, int aspect_x, int aspect_y, int elo, int ehi, int ets_biasing_mode, int r_style, int old_quant, int fancy_coupling, int * gs_restrict c_line,
const signed char * gs_restrict tmmat, unsigned int tmwidth, unsigned int tmheight, unsigned int y, int xd, ETS_PlaneCtx * gs_restrict * gs_restrict planes, uint32 *seeds, int in_plane_step, int out_plane_step)
{
ETS_PixelInternals pi[M];
@@ -260,7 +271,7 @@ ets_line_template(unsigned char * gs_restrict * gs_restrict dest, const ETS_SrcP
* 3 like 1, but same shift either side of 0.
* 4+ scale the modulation down.
*/
- switch (ets_bias)
+ switch (ets_biasing_mode)
{
case ETS_BIAS_ZERO:
ets_bias = 0;
diff --git a/base/ets.h b/base/ets.h
index 4b009b8a..a57bef52 100644
--- a/base/ets.h
+++ b/base/ets.h
@@ -1,17 +1,26 @@
-/* Copyright (C) 2001-2019 Artifex Software, Inc.
- 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 the license contained in the file LICENSE in this distribution.
-
- Refer to licensing information at http://www.artifex.com or contact
- Artifex Software, Inc., 1305 Grant Avenue - Suite 200, Novato,
- CA 94945, U.S.A., +1(415)492-9861, for further information.
-*/
+/*
+ * Testbed implementation of Even Better Screening. Please see
+ * http://www.artofcode.com/eventone/ for more details.
+ *
+ * Copyright 2001-2004 Raph Levien <raph@acm.org>
+ *
+ * Code in this module is covered by US Patents 5,055,942 and
+ * 5,917,614, and corresponding international patents. This version
+ * of ETS is for commercial licensees and is governed by the licensing
+ * agreement between artofcode LLC and the licensee. Please see
+ * http://www.artofcode.com/eventone/ for information on licensing.
+ *
+ * Subsequent Changes: Copyright (C) 2013-2020 Artifex Software, Inc.
+ *
+ * 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 the license contained in the file LICENSE in this distribution.
+ */
#ifndef ets_h_INCLUDED
# define ets_h_INCLUDED
diff --git a/base/ets_tm.h b/base/ets_tm.h
index 62e13e95..5decb9c3 100644
--- a/base/ets_tm.h
+++ b/base/ets_tm.h
@@ -1,17 +1,26 @@
-/* Copyright (C) 2001-2019 Artifex Software, Inc.
- 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 the license contained in the file LICENSE in this distribution.
-
- Refer to licensing information at http://www.artifex.com or contact
- Artifex Software, Inc., 1305 Grant Avenue - Suite 200, Novato,
- CA 94945, U.S.A., +1(415)492-9861, for further information.
-*/
+/*
+ * Testbed implementation of Even Better Screening. Please see
+ * http://www.artofcode.com/eventone/ for more details.
+ *
+ * Copyright 2001-2004 Raph Levien <raph@acm.org>
+ *
+ * Code in this module is covered by US Patents 5,055,942 and
+ * 5,917,614, and corresponding international patents. This version
+ * of ETS is for commercial licensees and is governed by the licensing
+ * agreement between artofcode LLC and the licensee. Please see
+ * http://www.artofcode.com/eventone/ for information on licensing.
+ *
+ * Subsequent Changes: Copyright (C) 2013-2020 Artifex Software, Inc.
+ *
+ * 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 the license contained in the file LICENSE in this distribution.
+ */
#ifndef ets_tm_h_INCLUDED
diff --git a/base/expat.mak b/base/expat.mak
index 3cb3c3c8..08db2a1d 100644
--- a/base/expat.mak
+++ b/base/expat.mak
@@ -1,4 +1,4 @@
-# Copyright (C) 2001-2019 Artifex Software, Inc.
+# Copyright (C) 2001-2020 Artifex Software, Inc.
# All Rights Reserved.
#
# This software is provided AS-IS with no warranty, either express or
diff --git a/base/fapi_bs.mak b/base/fapi_bs.mak
index afc0fa2f..894bcb82 100644
--- a/base/fapi_bs.mak
+++ b/base/fapi_bs.mak
@@ -1,4 +1,4 @@
-# Copyright (C) 2001-2019 Artifex Software, Inc.
+# Copyright (C) 2001-2020 Artifex Software, Inc.
# All Rights Reserved.
#
# This software is provided AS-IS with no warranty, either express or
diff --git a/base/fapi_ft.c b/base/fapi_ft.c
index 60f69f64..46f865ef 100644
--- a/base/fapi_ft.c
+++ b/base/fapi_ft.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001-2019 Artifex Software, Inc.
+/* Copyright (C) 2001-2020 Artifex Software, Inc.
All Rights Reserved.
This software is provided AS-IS with no warranty, either express or
@@ -1114,7 +1114,7 @@ gs_fapi_ft_get_scaled_font(gs_fapi_server * a_server, gs_fapi_font * a_font,
ff_server *s = (ff_server *) a_server;
ff_face *face = (ff_face *) a_font->server_font_data;
FT_Error ft_error = 0;
- int i, j;
+ int i, j, code;
FT_CharMap cmap = NULL;
bool data_owned = true;
@@ -1183,7 +1183,6 @@ gs_fapi_ft_get_scaled_font(gs_fapi_server * a_server, gs_fapi_font * a_font,
/* Load a typeface from a file. */
else if (a_font->font_file_path) {
FT_Open_Args args;
- int code;
memset(&args, 0x00, sizeof(args));
@@ -1215,9 +1214,12 @@ gs_fapi_ft_get_scaled_font(gs_fapi_server * a_server, gs_fapi_font * a_font,
if (a_font->is_type1) {
long length;
- int type =
- a_font->get_word(a_font, gs_fapi_font_feature_FontType,
- 0);
+ unsigned short type = 0;
+
+ code = a_font->get_word(a_font, gs_fapi_font_feature_FontType, 0, &type);
+ if (code < 0) {
+ return code;
+ }
/* Tell the FAPI interface that we need to decrypt the /Subrs data. */
a_font->need_decrypt = true;
@@ -1230,6 +1232,7 @@ gs_fapi_ft_get_scaled_font(gs_fapi_server * a_server, gs_fapi_font * a_font,
length = gs_fapi_serialize_type1_font(a_font, NULL, 0);
else
length = gs_fapi_serialize_type2_font(a_font, NULL, 0);
+
open_args.memory_base = own_font_data =
FF_alloc(s->ftmemory, length);
if (!open_args.memory_base)
@@ -1237,14 +1240,14 @@ gs_fapi_ft_get_scaled_font(gs_fapi_server * a_server, gs_fapi_font * a_font,
own_font_data_len = length;
if (type == 1)
open_args.memory_size =
- gs_fapi_serialize_type1_font(a_font, own_font_data,
- length);
+ gs_fapi_serialize_type1_font(a_font, own_font_data, length);
else
open_args.memory_size =
- gs_fapi_serialize_type2_font(a_font, own_font_data,
- length);
+ gs_fapi_serialize_type2_font(a_font, own_font_data, length);
+
if (open_args.memory_size != length)
return_error(gs_error_unregistered); /* Must not happen. */
+
ft_inc_int = new_inc_int(a_server, a_font);
if (!ft_inc_int) {
FF_free(s->ftmemory, own_font_data);
@@ -1255,11 +1258,16 @@ gs_fapi_ft_get_scaled_font(gs_fapi_server * a_server, gs_fapi_font * a_font,
/* It must be type 42 (see code in FAPI_FF_get_glyph in zfapi.c). */
else {
/* Get the length of the TrueType data. */
- open_args.memory_size =
- a_font->get_long(a_font, gs_fapi_font_feature_TT_size, 0);
- if (open_args.memory_size == 0)
+ unsigned long ms;
+
+ code = a_font->get_long(a_font, gs_fapi_font_feature_TT_size, 0, &ms);
+ if (code < 0)
+ return code;
+ if (ms == 0)
return_error(gs_error_invalidfont);
+ open_args.memory_size = (FT_Long)ms;
+
/* Load the TrueType data into a single buffer. */
open_args.memory_base = own_font_data =
FF_alloc(s->ftmemory, open_args.memory_size);
@@ -1268,10 +1276,10 @@ gs_fapi_ft_get_scaled_font(gs_fapi_server * a_server, gs_fapi_font * a_font,
own_font_data_len = open_args.memory_size;
- if (a_font->
- serialize_tt_font(a_font, own_font_data,
- open_args.memory_size))
- return_error(gs_error_invalidfont);
+ code = a_font->serialize_tt_font(a_font, own_font_data,
+ open_args.memory_size);
+ if (code < 0)
+ return code;
/* We always load incrementally. */
ft_inc_int = new_inc_int(a_server, a_font);
diff --git a/base/fapibstm.c b/base/fapibstm.c
index 73c1d08f..0eb120c2 100644
--- a/base/fapibstm.c
+++ b/base/fapibstm.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001-2019 Artifex Software, Inc.
+/* Copyright (C) 2001-2020 Artifex Software, Inc.
All Rights Reserved.
This software is provided AS-IS with no warranty, either express or
@@ -103,8 +103,9 @@ InitFont(Bitstream_server * server, FAPI_font * ff)
own_font_data = gs_malloc(mem, 1, length, "Type 42 fotn copy");
if (!own_font_data)
return_error(gs_error_VMerror);
- if (ff->serialize_tt_font(ff, own_font_data, length))
- return_error(gs_error_invalidfont);
+ error = ff->serialize_tt_font(ff, own_font_data, length);
+ if (error < 0)
+ return error;
}
}
face->font_data = own_font_data;
diff --git a/base/fapiufst.c b/base/fapiufst.c
index 59aeb134..4089e905 100644
--- a/base/fapiufst.c
+++ b/base/fapiufst.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001-2019 Artifex Software, Inc.
+/* Copyright (C) 2001-2020 Artifex Software, Inc.
All Rights Reserved.
This software is provided AS-IS with no warranty, either express or
@@ -79,14 +79,14 @@
#include "gxfapiu.h"
-#if UFST_VERSION_MAJOR >= 6 && UFST_VERSION_MINOR >= 2
+#if (UFST_VERSION_MAJOR >= 6 && UFST_VERSION_MINOR >= 2) || UFST_VERSION_MAJOR >= 7
#include "t1itype1.h"
#endif
#define ufst_emprintf(m,s) { outflush(m); emprintf(m, s); outflush(m); }
#define ufst_emprintf1(m,s,d) { outflush(m); emprintf1(m, s, d); outflush(m); }
-#if UFST_VERSION_MAJOR >= 6 && UFST_VERSION_MINOR >= 2
+#if (UFST_VERSION_MAJOR >= 6 && UFST_VERSION_MINOR >= 2) || UFST_VERSION_MAJOR >= 7
#undef true
#undef false
@@ -720,74 +720,170 @@ pack_float(LPUB8 * p, float v)
#define PACK_ZERO(p) *(p++) = 0
#define PACK_BYTE(p, c) *(p++) = c
-#define PACK_WORD(p, i, var) pack_word(&p, ff->get_word(ff, var, i))
-#define PACK_LONG(p, i, var) pack_long(&p, ff->get_long(ff, var, i))
-static void
+static inline int
+pack_feature_word(gs_fapi_font * ff, LPUB8 * p, gs_fapi_font_feature var, int ind)
+{
+ UW16 val;
+ int code = ff->get_word(ff, var, ind, (unsigned short *)&val);
+ if (code < 0)
+ return code;
+ pack_word(p, val);
+
+ return code;
+}
+
+static inline int
+pack_feature_long(gs_fapi_font * ff, LPUB8 * p, gs_fapi_font_feature var, int ind)
+{
+ UL32 val;
+ unsigned long lv;
+ int code = ff->get_long(ff, var, ind, &lv);
+ if (code < 0)
+ return code;
+ val = (UL32)lv;
+ pack_word(p, val);
+
+ return code;
+}
+
+static int
pack_pseo_word_array(fapi_ufst_server * r, gs_fapi_font * ff, UB8 ** p,
UW16 max_count, gs_fapi_font_feature count_id,
gs_fapi_font_feature array_id)
{
- UW16 k = min(ff->get_word(ff, count_id, 0), max_count), j;
+ UW16 k, k2, j;
+ int code;
+
+ code = ff->get_word(ff, count_id, 0, (unsigned short *)&k2);
+ if (code < 0)
+ return code;
+ k = min(k2, max_count);
pack_word(p, k);
for (j = 0; j < k; j++)
- PACK_WORD(*p, j, array_id);
+ code = pack_feature_word(ff, p, j, array_id);
for (; j < max_count; j++)
pack_word(p, 0);
+
+ return code;
}
-static void
+static int
pack_pseo_fhdr(fapi_ufst_server * r, gs_fapi_font * ff, UB8 * p)
{
ushort j, n, skip = 0;
+ int code;
while (((uint64_t) p) & 0x03) /* align to QUADWORD */
PACK_ZERO(p);
pack_long(&p, 1); /* format = 1 */
- for (j = 0; j < 6; j++)
- pack_float(&p, ff->get_float(ff, gs_fapi_font_feature_FontMatrix, j));
+ for (j = 0; j < 6; j++) {
+ float f;
+ code = ff->get_float(ff, gs_fapi_font_feature_FontMatrix, j, &f);
+ if (code < 0)
+ return code;
+ pack_float(&p, f);
+ }
while (((uint64_t) p) & 0x03) /* align to QUADWORD */
PACK_ZERO(p);
/* UFST has no definition for PSEO structure, so implement serialization : */
- PACK_LONG(p, 0, gs_fapi_font_feature_UniqueID);