Blame SOURCES/ghostscript-restore-flushpage.patch

2796d4
From: Ken Sharp <ken.sharp@artifex.com>
2796d4
Date: Tue, 21 Nov 2017 16:46:18 +0000 (+0000)
2796d4
Subject: PS interpreter - restore the flushpage operator
2796d4
2796d4
PS interpreter - restore the flushpage operator
2796d4
2796d4
Michael Katzmann, working at the Library of Congress, is using
2796d4
Ghostscript in a custom application, which also involves a barcode
2796d4
reader and an SQL database.
2796d4
2796d4
Currently this resides in an RPM at:
2796d4
2796d4
http://engineering.nlsbph.org/repo/fedora/fedora/updates/27/SRPMS/AddressCard-3.17-LoC.fc27.src.rpm
2796d4
2796d4
but its not usable without the barcode reader and SQL database....
2796d4
For reasons which are not completely clear to me, he wants to use
2796d4
flushpage to update the display part way through the operation.
2796d4
2796d4
We suspect that it would be possible to avoid this, but it would
2796d4
probably require some programming effort on the users part, and since
2796d4
flushpage doesn't look like a likely candidate for abuse, we've decided
2796d4
just to restore it.
2796d4
2796d4
https://git.ghostscript.com/?p=ghostpdl.git;a=commit;h=19ebb5f1f497b6f2d50fe13d17d3e627dfb6c868
2796d4
---
2796d4
2796d4
diff -up ghostscript-9.07/Resource/Init/gs_init.ps.restore_flushpage ghostscript-9.07/Resource/Init/gs_init.ps
2796d4
--- ghostscript-9.07/Resource/Init/gs_init.ps.restore_flushpage	2018-11-28 14:07:09.976249454 +0100
2796d4
+++ ghostscript-9.07/Resource/Init/gs_init.ps	2018-11-28 14:08:41.225078430 +0100
2796d4
@@ -2144,7 +2144,7 @@ SAFER { .setsafe } if
2796d4
 /.type1execchar /.type2execchar /.type42execchar /.setweightvector /.getuseciecolor /processcolors /.includecolorspace
2796d4
 /.execn /.instopped /.stop /.stopped /.setcolorrendering /.setdevicecolorrendering /.buildcolorrendering1 /.builddevicecolorrendering1
2796d4
 /.TransformPQR_scale_WB0 /.TransformPQR_scale_WB1 /.TransformPQR_scale_WB2 /.currentoverprintmode /.copydevice2
2796d4
-/.devicename /.doneshowpage /flushpage /.getbitsrect /.getdevice /.getdefaultdevice /.getdeviceparams /.gethardwareparams
2796d4
+/.devicename /.doneshowpage /.getbitsrect /.getdevice /.getdefaultdevice /.getdeviceparams /.gethardwareparams
2796d4
 /makewordimagedevice /.outputpage /.putdeviceparams /.setdevice /.currentshowpagecount
2796d4
 /.setpagedevice /.currentpagedevice /.knownundef /.setmaxlength /.rectappend /.initialize_dsc_parser /.parse_dsc_comments
2796d4
 /.fillCIDMap /.fillIdentityCIDMap /.buildcmap /.filenamelistseparator /.libfile /.getfilename
2796d4
@@ -2162,6 +2162,15 @@ SAFER { .setsafe } if
2796d4
 /.systemvmSFD /.settrapparams /.currentsystemparams /.currentuserparams /.getsystemparam /.getuserparam /.setsystemparams /.setuserparams
2796d4
 /.checkpassword /.locale_to_utf8 /.currentglobal /.gcheck /.imagepath
2796d4
 
2796d4
+% Used by a free user in the Library of Congress. Apparently this is used to
2796d4
+% draw a partial page, which is then filled in by the results of a barcode
2796d4
+% scanner and SQL database lookup. Its not clear to us exactly why this needs to be
2796d4
+% done as a partial page, but its easiest to restore the operator, and it seems like
2796d4
+% its a reasonably safe operator to restore, for the *very* few devices on which
2796d4
+% it will have any effect. Currently this uses the 'sync_outptu' device method
2796d4
+% to transfer the partial page, in future we may use a spec_op instead.
2796d4
+%/flushpage
2796d4
+
2796d4
 % Used by our own test suite files
2796d4
 %/.fileposition %image-qa.ps
2796d4
 %/.makeoperator /.setCPSImode % gs_cet.ps