Blame SOURCES/ghostscript-restore-flushpage.patch

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