summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNancy Durgin <nancy.durgin@artifex.com>2019-03-06 13:57:56 -0800
committerNancy Durgin <nancy.durgin@artifex.com>2019-03-07 07:46:47 -0800
commitb5a3721b36da0a1a28cb6d132d2c6ae11e1592c0 (patch)
tree734f5175fe511c69a021f2378d943a484142f079
parentf6ddc968966327f3bc24d1edc6a25c0f7ef82cd4 (diff)
downloadghostpdl-b5a3721b36da0a1a28cb6d132d2c6ae11e1592c0.tar.gz
Undef .confirm, .confirmread
There was a reference in doc/SavedPages.htm to .confirmread which has been changed in 314c6b9026efbcada4e48b11c9a173a5e91d779c to use standard postscript. 1) Rearranged code so things are defined before use. 2) Change all references to immediate evaluation. 3) undef
-rw-r--r--Resource/Init/gs_init.ps54
-rw-r--r--Resource/Init/gs_setpd.ps2
2 files changed, 30 insertions, 26 deletions
diff --git a/Resource/Init/gs_init.ps b/Resource/Init/gs_init.ps
index f986a0dde..a8f33efed 100644
--- a/Resource/Init/gs_init.ps
+++ b/Resource/Init/gs_init.ps
@@ -654,12 +654,38 @@ odef
dup length 6 ne { /setmatrix load /rangecheck signalerror } if
dup aload pop .setmatrix pop
} odef
+
+/.confirmread {
+ TTYPAUSE {
+ (/dev/tty) (r) file dup read pop pop closefile
+ } {
+ .echo.mode //false echo
+ (%stdin) (r) file dup read {
+ dup (\n) 0 get eq { pop pop } { .unread } ifelse
+ } {
+ pop
+ } ifelse echo
+ } ifelse
+} bind executeonly def
+
+/.confirm {
+ DISPLAYING NOPAUSE not TTYPAUSE or and {
+ % Print a message (unless NOPAGEPROMPT or NOPROMPT is true)
+ % and wait for the user to type something.
+ % If the user just types a newline, flush it.
+ NOPAGEPROMPT NOPROMPT or { pop } { print flush } ifelse
+ //.confirmread exec
+ } {
+ pop
+ } ifelse
+} bind executeonly def
+
% In LanguageLevel 3, copypage erases the page.
/copypage {
.languagelevel 3 ge
dup { 0 } { 1 } ifelse .endpage .doneshowpage {
.currentnumcopies 1 index .outputpage
- (>>copypage, press <return> to continue<<\n) .confirm
+ (>>copypage, press <return> to continue<<\n) //.confirm exec
dup { erasepage } if
} if pop
systemdict /..page_default_spaces .knownget { //.PurgeDict exec } if
@@ -669,7 +695,7 @@ odef
/showpage {
0 .endpage .doneshowpage {
.currentnumcopies //true .outputpage
- (>>showpage, press <return> to continue<<\n) .confirm
+ (>>showpage, press <return> to continue<<\n) //.confirm exec
% Uncomment the following line, and use a Memento build to track
% blocks that are created and not destroyed between each successive
% page.
@@ -852,29 +878,6 @@ userdict /.currentresourcefile //null put
ifelse }
{ //false } ifelse
} bind def
-/.confirm {
- DISPLAYING NOPAUSE not TTYPAUSE or and {
- % Print a message (unless NOPAGEPROMPT or NOPROMPT is true)
- % and wait for the user to type something.
- % If the user just types a newline, flush it.
- NOPAGEPROMPT NOPROMPT or { pop } { print flush } ifelse
- .confirmread
- } {
- pop
- } ifelse
-} bind executeonly def
-/.confirmread {
- TTYPAUSE {
- (/dev/tty) (r) file dup read pop pop closefile
- } {
- .echo.mode //false echo
- (%stdin) (r) file dup read {
- dup (\n) 0 get eq { pop pop } { .unread } ifelse
- } {
- pop
- } ifelse echo
- } ifelse
-} bind executeonly def
% Define the procedure that the C code uses for running files
% named on the command line.
@@ -2378,6 +2381,7 @@ SAFER {
/.clearerror
/.beginpage /.endpage
/.getpath
+ /.confirm /.confirmread
% 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
diff --git a/Resource/Init/gs_setpd.ps b/Resource/Init/gs_setpd.ps
index be335a017..f84a495e3 100644
--- a/Resource/Init/gs_setpd.ps
+++ b/Resource/Init/gs_setpd.ps
@@ -763,7 +763,7 @@ SETPDDEBUG { (Finishing.) = pstack flush } if
%% Bug 690667.
2 .endpage
{ 1 //true .outputpage
- (>>setpagedevice, press <return> to continue<<\n) .confirm
+ (>>setpagedevice, press <return> to continue<<\n) //.confirm exec
}
if
% We mustn't pop the argument until the very end,