summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNancy Durgin <nancy.durgin@artifex.com>2019-03-07 08:30:38 -0800
committerNancy Durgin <nancy.durgin@artifex.com>2019-03-07 08:30:38 -0800
commitccf0be61013372c4c449f0b760fa00ac0b20245f (patch)
tree36dbaf34988b769f28df658f12837f699f766f58
parentb5a3721b36da0a1a28cb6d132d2c6ae11e1592c0 (diff)
downloadghostpdl-ccf0be61013372c4c449f0b760fa00ac0b20245f.tar.gz
Change shellarguments to .shellarguments and document it.
-rw-r--r--Resource/Init/gs_init.ps4
-rw-r--r--doc/Language.htm7
-rw-r--r--lib/gslp.ps2
-rw-r--r--lib/pf2afm.ps2
-rw-r--r--lib/pfbtopfa.ps2
-rw-r--r--lib/pphs.ps2
-rw-r--r--lib/printafm.ps4
-rw-r--r--lib/rollconv.ps2
-rw-r--r--lib/viewcmyk.ps2
-rw-r--r--lib/viewpbm.ps2
-rw-r--r--lib/viewpcx.ps2
-rw-r--r--lib/viewraw.ps2
-rw-r--r--lib/viewrgb.ps2
-rw-r--r--toolbin/pdf_info.ps17
14 files changed, 29 insertions, 23 deletions
diff --git a/Resource/Init/gs_init.ps b/Resource/Init/gs_init.ps
index a8f33efed..484e3790e 100644
--- a/Resource/Init/gs_init.ps
+++ b/Resource/Init/gs_init.ps
@@ -869,8 +869,8 @@ userdict /.currentresourcefile //null put
{ /run .systemvar exec } .execasresource
} bind def
-% Define auxiliary procedures needed for the above.
-/shellarguments % -> shell_arguments true (or) false
+% Convenience function (documented extension)
+/.shellarguments % -> shell_arguments true (or) false
{ /ARGUMENTS where
{ /ARGUMENTS get dup type /arraytype eq
{ aload pop /ARGUMENTS //null store //true }
diff --git a/doc/Language.htm b/doc/Language.htm
index 21cc4926f..7deb534b1 100644
--- a/doc/Language.htm
+++ b/doc/Language.htm
@@ -937,6 +937,13 @@ threshold array bytes (same as /Thresholds of the Type3 dictionary).</dt>
</dl>
</dl>
+<dl>
+<dt><a name=".shellarguments"></a>
+<code>.shellarguments</code></dt>
+<dd>This operator is used to access the ARGUMENTS command line option. See examples in lib for more information.</dd>
+</dl>
+
+
<h4><a name="Device"></a>Device operators</h4>
<dl>
diff --git a/lib/gslp.ps b/lib/gslp.ps
index 9702dc7d8..002dc9783 100644
--- a/lib/gslp.ps
+++ b/lib/gslp.ps
@@ -699,7 +699,7 @@ end
end
} def
-[ shellarguments
+[ .shellarguments
{ ] dup length 0 ne { lpcommand } { false } ifelse not
{ (%stderr) (w) file
[ (Usage: )
diff --git a/lib/pf2afm.ps b/lib/pf2afm.ps
index 02fede9ed..57b1842f0 100644
--- a/lib/pf2afm.ps
+++ b/lib/pf2afm.ps
@@ -523,7 +523,7 @@
} def
% Check for command line arguments.
-[ shellarguments
+[ .shellarguments
{ ] dup length 1 eq {
0 get makeafm
}{
diff --git a/lib/pfbtopfa.ps b/lib/pfbtopfa.ps
index 430ec073e..0e6301c2e 100644
--- a/lib/pfbtopfa.ps
+++ b/lib/pfbtopfa.ps
@@ -16,7 +16,7 @@
% pfbtopfa.ps
% Convert a .pfb font to .pfa format.
-[ shellarguments {
+[ .shellarguments {
counttomark 2 eq {
/pfa exch def /pfb exch def pop
/in1 pfb (r) file def
diff --git a/lib/pphs.ps b/lib/pphs.ps
index 7ed299896..84fd99f4d 100644
--- a/lib/pphs.ps
+++ b/lib/pphs.ps
@@ -210,7 +210,7 @@
} bind def
% Check for command line arguments.
-[ shellarguments
+[ .shellarguments
{ ] dup length 1 eq
{ 0 get (r) file dup pphs closefile }
{ (Usage: pphs filename.pdf\n) print flush }
diff --git a/lib/printafm.ps b/lib/printafm.ps
index f687feb24..f69f2975f 100644
--- a/lib/printafm.ps
+++ b/lib/printafm.ps
@@ -14,7 +14,7 @@
% Modified by L. Peter Deutsch 9/14/93:
% uses Ghostscript's =only procedure to replace 'buf cvs print'.
% Modified by L. Peter Deutsch 9/6/95:
-% uses Ghostscript's shellarguments facility to accept the font name
+% uses Ghostscript's .shellarguments facility to accept the font name
% on the command line.
% Altered my master@iaas.msu.ru to work with fonts of more than 256 glyphs
@@ -163,7 +163,7 @@
} bind def
% Check for command line arguments.
-[ shellarguments
+[ .shellarguments
{ ] dup length 1 eq
{ 0 get printafm }
{ (Usage: printafm fontname\n) print flush }
diff --git a/lib/rollconv.ps b/lib/rollconv.ps
index f705b1656..031747f14 100644
--- a/lib/rollconv.ps
+++ b/lib/rollconv.ps
@@ -368,7 +368,7 @@ forall
} bind def
% If the program was invoked from the command line, run it now.
-[ shellarguments
+[ .shellarguments
{ counttomark 5 eq
{ convert
QUIET not { (Done.\n) print flush } if
diff --git a/lib/viewcmyk.ps b/lib/viewcmyk.ps
index d2e1d85b3..5cc76981b 100644
--- a/lib/viewcmyk.ps
+++ b/lib/viewcmyk.ps
@@ -49,7 +49,7 @@
} bind def
% If the program was invoked from the command line, run it now.
-[ shellarguments {
+[ .shellarguments {
counttomark 2 eq {
cvi viewcmyk
} {
diff --git a/lib/viewpbm.ps b/lib/viewpbm.ps
index d31c96113..ab4ede668 100644
--- a/lib/viewpbm.ps
+++ b/lib/viewpbm.ps
@@ -318,7 +318,7 @@
} def
% If the program was invoked from the command line, run it now.
-[ shellarguments
+[ .shellarguments
{ counttomark 1 ge
{ ] { viewpbm } forall
}
diff --git a/lib/viewpcx.ps b/lib/viewpcx.ps
index 7d130bf44..81531aff9 100644
--- a/lib/viewpcx.ps
+++ b/lib/viewpcx.ps
@@ -176,7 +176,7 @@
} bind def
% If the program was invoked from the command line, run it now.
-[ shellarguments
+[ .shellarguments
{ counttomark 1 ge
{ ] { viewpcx } forall
}
diff --git a/lib/viewraw.ps b/lib/viewraw.ps
index 2aa0f2553..ec1e1d7a6 100644
--- a/lib/viewraw.ps
+++ b/lib/viewraw.ps
@@ -174,7 +174,7 @@
} bind def
% If the program was invoked from the command line, run it now.
-[ shellarguments {
+[ .shellarguments {
counttomark 2 eq {
cvi viewraw
} {
diff --git a/lib/viewrgb.ps b/lib/viewrgb.ps
index 1fb38d84e..8b77dd2dd 100644
--- a/lib/viewrgb.ps
+++ b/lib/viewrgb.ps
@@ -134,7 +134,7 @@
} bind def
% If the program was invoked from the command line, run it now.
-[ shellarguments {
+[ .shellarguments {
counttomark 2 eq {
cvi viewrgb
} {
diff --git a/toolbin/pdf_info.ps b/toolbin/pdf_info.ps
index e3d5ae7d6..6af5f58c2 100644
--- a/toolbin/pdf_info.ps
+++ b/toolbin/pdf_info.ps
@@ -40,7 +40,7 @@
/DumpMediaSizes where { pop } { /DumpMediaSizes true def } ifelse
/DumpFontsNeeded where { pop } { /DumpFontsNeeded true def } ifelse
-[ shellarguments
+[ .shellarguments
{ counttomark 1 eq {
dup 0 get (-) 0 get ne {
% File specified on the command line using: -- toolbin/pdf_info.ps infile.pdf
@@ -105,7 +105,7 @@ cleartomark % discard the dict from --where--
} bind def
/dump-pdf-info { % (fname) -> -
- () = ( ) print print ( has ) print
+ () = ( ) print print ( has ) print
PDFPageCount dup =print 10 mod 1 eq { ( page.\n) } { ( pages\n) } ifelse = flush
Trailer /Root oget /AcroForm knownoget {
@@ -193,7 +193,7 @@ cleartomark % discard the dict from --where--
/res-type-dict 10 dict begin
/Font {
- {
+ {
exch pop oforce_no_circular
dup //null ne {
dup /DescendantFonts knownoget {
@@ -224,7 +224,7 @@ cleartomark % discard the dict from --where--
} bind def
/XObject {
- {
+ {
exch pop oforce_no_circular
dup //null ne {
dup /Subtype knownoget {
@@ -243,9 +243,9 @@ cleartomark % discard the dict from --where--
} ifelse
} forall
} bind def
-
+
/Pattern {
- {
+ {
exch pop oforce_no_circular
dup //null ne {
/Resources knownoget {
@@ -262,10 +262,10 @@ currentdict end readonly def
/get-fonts-from-res {
oforce_no_circular
dup //null ne {
- {
+ {
oforce_no_circular
dup //null ne {
- //res-type-dict 3 -1 roll
+ //res-type-dict 3 -1 roll
.knownget {
exec
} {
@@ -426,4 +426,3 @@ currentdict /res-type-dict undef
enum-pdfs
end
quit
-