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