GIF89a;
EcchiShell v1.0
/
/
proc/
self/
root/
usr/
share/
ghostscript/
cvn { } def
% Acquire the debugging flags.
currentdict /DEBUG known /DEBUG exch def
% if DEBUG is set, set ALL of the subset debugging flags
mark % '[' isn't defined yet
/CCFONTDEBUG % Compiled Fonts
/CFFDEBUG % CFF Fonts
/CMAPDEBUG % CMAP
/DOCIEDEBUG % CIE color
/EPSDEBUG % EPS handling
/FAPIDEBUG % Font API
/INITDEBUG % Initialization
/PDFDEBUG % PDF Interpreter
/PDFWRDEBUG % PDF Writer
/SETPDDEBUG % setpagedevice
/TTFDEBUG % TTF Fonts
/VGIFDEBUG % ViewGIF
/VJPGDEBUG % ViewJPEG
/RESMPDEBUG % Resource map
counttomark array astore exch pop % ']' isn't defined yet
{ dup currentdict exch known DEBUG or def } forall
currentdict /PDFSTEP known /PDFSTEP exch def
% if PDFSTEP is on, turn on PDFDEBUG
PDFSTEP { /PDFDEBUG //true def } if
currentdict /PDFSTOPONERROR known /PDFSTOPONERROR exch def
currentdict /PDFSTOPONWARNING known {/PDFSTOPONWARNING true def /PDFSTOPONERROR true def}{/PDFSTOPONWARNING false def} ifelse
currentdict /PDFNOCIDFALLBACK known /PDFNOCIDFALLBACK exch def
/.bind /bind load def
/VMDEBUG
INITDEBUG {{print mark
systemdict /level2dict known
{ .currentglobal dup //false .setglobal vmstatus
//true .setglobal vmstatus 3 -1 roll pop
6 -2 roll pop .setglobal
}
{ vmstatus 3 -1 roll pop
}
ifelse usertime 16#fffff and counttomark
{ ( ) print ( ) cvs print }
repeat pop
( ) print systemdict length ( ) cvs print
( ) print countdictstack ( ) cvs print
( <) print count ( ) cvs print (>\n) print flush
}}
{{pop
}}
ifelse
.bind def
% This was a debugging switch removed in 9.22, no other software
% should have had any regard for it, and even if testing its value
% should have checked its existence first. However pstotext, an
% ancient and no longer maintained piece of softare, did check
% its value unconditionally. So we retain this key in the dictionary
% purely for backward compatibility.
/NOBIND false def
currentdict /BATCH known /BATCH exch def
currentdict /DELAYBIND known /DELAYBIND exch def
currentdict /DOINTERPOLATE .knownget { { -1 } { 0 } ifelse /InterpolateControl exch def } if
currentdict /ESTACKPRINT known /ESTACKPRINT exch def
currentdict /FAKEFONTS known /FAKEFONTS exch def
currentdict /FIXEDMEDIA known /FIXEDMEDIA exch def
currentdict /FIXEDRESOLUTION known /FIXEDRESOLUTION exch def
currentdict /LOCALFONTS known /LOCALFONTS exch def
currentdict /JOBSERVER known /JOBSERVER exch def
currentdict /NOCACHE known /NOCACHE exch def
currentdict /NOCCFONTS known /NOCCFONTS exch def
currentdict /NOCIE known /NOCIE exch def
currentdict /NOPSICC known /NOPSICC exch def
currentdict /NODISPLAY known not /DISPLAYING exch def
currentdict /NOFONTMAP known /NOFONTMAP exch def
currentdict /NOFONTPATH known /NOFONTPATH exch def
currentdict /NOGC known /NOGC exch def
currentdict /NOINTERPOLATE .knownget { /InterpolateControl 0 def } if
currentdict /NOMEDIAATTRS known /NOMEDIAATTRS exch def
currentdict /NOOUTERSAVE known /NOOUTERSAVE exch def
currentdict /NOPAGEPROMPT known /NOPAGEPROMPT exch def
currentdict /NOPAUSE known /NOPAUSE exch def
currentdict /NOPLATFONTS known /NOPLATFONTS exch def
currentdict /NOPROMPT known /NOPROMPT exch def
currentdict /NOTRANSPARENCY known /NOTRANSPARENCY exch def
currentdict /DOPS known /DOPS exch def
currentdict /NOSUBSTDEVICECOLORS known /NOSUBSTDEVICECOLORS exch def
% The default value of ORIENT1 is true, not false.
currentdict /ORIENT1 known not { /ORIENT1 //true def } if
currentdict /OSTACKPRINT known /OSTACKPRINT exch def
currentdict /OUTPUTFILE known % obsolete
{ /OutputFile /OUTPUTFILE load def
currentdict /OUTPUTFILE .undef
} if
currentdict /QUIET known /QUIET exch def
% DELAYSAFER is effectively the same as newer NOSAFER
currentdict /DELAYSAFER known { /DELAYSAFER //true def /NOSAFER //true def } if
/SAFER currentdict /NOSAFER known {
//false
} {
currentdict /SAFER known
currentdict /PARANOIDSAFER known or % PARANOIDSAFER is equivalent
}
ifelse def
/SAFERERRORS
currentdict /NOSAFERERRORS known
{
//false
}
{
currentdict /SAFERERRORS known
} ifelse def
currentdict /SHORTERRORS known /SHORTERRORS exch def
currentdict /TTYPAUSE known /TTYPAUSE exch def
currentdict /WRITESYSTEMDICT known /WRITESYSTEMDICT exch def
currentdict /RENDERTTNOTDEF known /RENDERTTNOTDEF exch def
currentdict /SCANCONVERTERTYPE known
{
currentdict /SCANCONVERTERTYPE get .setscanconverter
} if
% We rely on PSFitPage to actually implement EPSFitPage
% But we need EPSCrop to be true, to actually issue a PageSize request, so set it here
% in case the user forgets.
currentdict /EPSFitPage known { /PSFitPage //true def /EPSCrop //true def} if
% This is a "convenience" option that sets a combination of EPSFitPage, PDFFitPage and PSFitPage
currentdict /FitPage known { /EPSFitPage //true def /EPSCrop //true def /PDFFitPage //true def /PSFitPage //true def } if
% Acquire environment variables.
currentdict /DEVICE known not
{ (GS_DEVICE) getenv { /DEVICE exch def } if } if
(START) VMDEBUG
% Open the standard files, so they will be open at the outermost save level.
(%stdin) (r) file pop
(%stdout) (w) file pop
(%stderr) (w) file pop
/.currentuserparams where {
pop mark
% The Adobe implementations appear to have very large maximum
% stack sizes. This turns out to actually make a difference,
% since some badly-behaved files include extremely long procedures,
% or construct huge arrays on the operand stack.
% We reset the stack sizes now so that we don't have to worry
% about overflowing the (rather small) built-in stack sizes
% during initialization.
/MaxDictStack 500
/MaxExecStack 5000
/MaxOpStack 300000
.dicttomark .setuserparams
} if
% Define a procedure for skipping over an unneeded section of code.
% This avoids allocating space for the skipped procedures.
% We can't use readline, because that imposes a line length limit.
/.skipeof % .skipeof -
{ currentfile exch 1 exch .subfiledecode flushfile
} .bind def
% Define procedures to assist users who don't read the documentation.
userdict begin
/help
{ (Enter PostScript commands. '(filename) run' runs a file, 'quit' exits.\n)
print flush
} .bind def
end
% Define =string, which is used by some PostScript programs even though
% it isn't documented anywhere.
% Put it in userdict so that each context can have its own copy.
userdict /=string 256 string put
% Print the greeting.
/printgreeting
{ mark
product (GPL Ghostscript) search
{ pop pop pop
(This software comes with NO WARRANTY: see the file PUBLIC for details.\n)
}
{ pop
}
ifelse
(\n) copyright
(\)\n) revisiondate 10 mod revisiondate 10 idiv 10 mod (-)
revisiondate 100 idiv 10 mod revisiondate 1000 idiv 10 mod (-)
revisiondate 10000 idiv ( \()
revision 10 mod
revision 100 mod 10 idiv (.)
revision 100 idiv ( )
product
counttomark
{ (%stdout) (w) file exch 0 .writecvp
} repeat pop
} .bind def
QUIET not { printgreeting flush } if
% Define a special version of def for making operator procedures.
/obind { % obind
1 index exch .makeoperator
} .bind def
/odef { % odef -
1 index exch .makeoperator def
} .bind def
% Define a special version of def for storing local objects into global
% dictionaries. Like .forceput, this exists only during initialization.
/.forcedef { % .forcedef -
1 .argindex pop % check # of args
currentdict 3 1 roll .forceput
} .bind odef
% Define procedures for accessing variables in systemdict and userdict
% regardless of the contents of the dictionary stack.
/.systemvar { % .systemvar
//systemdict exch get
} .bind odef
/.systemexec {
.systemvar exec
} .bind odef
/.userdict { % - .userdict
/userdict .systemvar
} .bind odef
/.uservar { % .uservar
.userdict exch get
} .bind odef
% If we're delaying binding, remember everything that needs to be bound later.
DELAYBIND
{
SAFER {
(\n *** WARNING - you have selected SAFER, indicating you want Ghostscript\n) print
( to execute in a safer environment, but at the same time\n) print
( have selected DELAYBIND. Unless you use this option with\n) print
( care \(and specifically, remember to call .bindnow\) it is\n) print
( possible that malicious code may be able to evade the\n) print
( limited security offered by the SAFER option.\n) print
} if
.currentglobal //false .setglobal
systemdict /.delaybind 2000 array .forceput
.setglobal
userdict /.delaycount 0 put
% When we've done the delayed bind, we want to stop saving.
% Detect this by the disappearance of .delaybind.
/bind
{ /.delaybind .systemvar dup length 0 ne
{ .delaycount 2 index put
.userdict /.delaycount .delaycount 1 add put
}
{ pop /.bind cvx exec
}
ifelse
} .bind def
} if
%**************** BACKWARD COMPATIBILITY ****************
/hwsizedict mark /HWSize //null .dicttomark readonly def
/copyscanlines { % copyscanlines
0 3 1 roll 3 index //hwsizedict .getdeviceparams
exch pop exch pop aload pop 3 2 roll
0 exch //null exch .getbitsrect exch pop
} bind odef
currentdict /hwsizedict .undef
/getdeviceprops
{ //null .getdeviceparams
} bind odef
/.putdeviceprops
{ //null //true counttomark 1 add 3 roll .putdeviceparams
dup type /booleantype ne
{ dup mark eq { /unknown /rangecheck } if
counttomark 4 add 1 roll cleartomark pop pop pop
/.putdeviceprops .systemvar exch signalerror
}
if
} bind odef
/.currentfilladjust { .currentfilladjust2 pop } bind odef
/.setfilladjust { dup .setfilladjust2 } bind odef
/.writecvs { 0 .writecvp } bind odef
%**************** DEPRECATED PROCEDURES ****************
%**************** DO NOT USE THESE IN NEW CODE ****************
/max { .max } bind def % use .max instead
/min { .min } bind def % use .min instead
/unread /.unread load def % use .peekstring instead
%**************** END OF BACKWARD COMPATIBILITY SECTION ****************
% Utility for removing all entries from a dictionary
/.PurgeDict % .PurgeDict -
{ { //true
1 index { pop exch pop //false exit
} forall
{ exit
} if
1 index exch undef
} loop
pop
} bind def
% Define predefined procedures substituting for operators,
% in alphabetical order.
userdict /#copies 1 put
% Adobe implementations don't accept /[ or /], so we don't either.
([) cvn
/mark load def
(]) cvn
{counttomark array astore exch pop} odef
% .beginpage is redefined if setpagedevice is present.
/.beginpage { } odef
% In LanguageLevel 3, copypage erases the page.
/copypage {
.languagelevel 3 ge
dup { 0 } { 1 } ifelse .endpage .doneshowpage {
.currentnumcopies 1 index .outputpage
(>>copypage, press to continue<<\n) .confirm
dup { erasepage } if
} if pop
systemdict /..page_default_spaces .knownget { //.PurgeDict exec } if
.beginpage
} odef
/currentmatrix {
dup type /arraytype ne
{ /currentmatrix load /typecheck signalerror } if
dup length 6 ne
{ /currentmatrix load /rangecheck signalerror } if
.currentmatrix 6 .argindex astore pop
} odef
% .currentnumcopies is redefined in Level 2.
/.currentnumcopies { #copies } odef
/setcolorscreen where { pop % not in all Level 1 configurations
/currentcolorscreen
{ .currenthalftone
{ { 60.0 exch 0.0 exch 3 copy 6 copy } % halftone - not possible
{ 3 copy 6 copy } % screen
{ } % colorscreen
}
exch get exec
} odef
} if
/currentscreen
{ .currenthalftone
{ { 60.0 exch 0.0 exch } % halftone - not possible
{ } % screen
{ 12 3 roll 9 { pop } repeat } % colorscreen
}
exch get exec
} odef
/.echo /echo load def
userdict /.echo.mode //true put
/echo {dup /.echo.mode exch store .echo} odef
/.eexec_param_dict mark
/eexec //true
/seed 55665
.dicttomark readonly def
/eexec {
% Rebind .currentresourcefile if it is the source for the eexec.
dup //.eexec_param_dict //filterdict /eexecDecode get exec
cvx exch .currentresourcefile eq
//systemdict begin { {exec} .execasresource } { exec } ifelse
% Only pop systemdict if it is still the top element,
% because this is apparently what Adobe interpreters do.
currentdict //systemdict eq { end } if
} odef
% .endpage is redefined if setpagedevice is present.
/.endpage { 2 ne } odef
% erasepage mustn't use gsave/grestore, because we call it before
% the graphics state stack has been fully initialized.
/erasepage
{ /currentcolor where
{ pop currentcolor currentcolorspace { setcolorspace setcolor } }
{ /currentcmykcolor where
{ pop currentcmykcolor { setcmykcolor } }
{ currentrgbcolor { setrgbcolor } }
ifelse
}
ifelse
currentoverprint //false setoverprint 1 setgray .fillpage setoverprint
exec
} odef
% To satisfy the Genoa FTS, executive must be a procedure, not an operator.
/executive
{ { prompt
{ (%statementedit) (r) .systemvmfile } stopped
{ pop pop $error /errorname get /undefinedfilename eq
{ .clearerror exit } if % EOF
/handleerror .systemvar exec //null % ioerror??
}
if
cvx { .runexec } .execute pop
} loop
} bind def
/filter
{ //filterdict 1 .argindex .knownget
{ exch pop exec }
{ /filter .systemvar /undefined signalerror }
ifelse
} odef
% handleerror procedure as mentioned in the "Operators" section of the PLRM Section 8.2
% This invokes the handleerror procedure from errordict (unless we are running under a
% JOBSERVER where we want to always use a defined error handler (many error handlers in
% 'wild' PostScript files are broken and don't indicate the error in any useful fashion).
%
% We run the handleerror procedure using .internalstopped so that broken error handlers
% won't cause nested errors (Unexpected Error conditions).
/handleerror
JOBSERVER {
{ /.GShandleerror .systemvar .internalstopped pop } bind % always use .GShandleerror.
} {
{ /errordict .systemvar /handleerror get .internalstopped pop } bind % PLRM standard errorhandling
} ifelse def
/identmatrix [1.0 0.0 0.0 1.0 0.0 0.0] readonly def
/identmatrix {
dup type /arraytype ne { /identmatrix load /typecheck signalerror } if
dup length 6 ne { /identmatrix load /rangecheck signalerror } if
dup 0 //identmatrix putinterval
} odef
/languagelevel 1 def % gs_lev2.ps may change this
/makeimagedevice { //false makewordimagedevice } odef
/matrix { 6 array identmatrix } odef
% .promptmsg is redefined if the interpreter includes readline support.
/.promptmsg {
(GS) print
count 0 ne { (<) print count =only } if
(>) print flush
} bind def
/prompt { flush flushpage NOPROMPT not { .promptmsg } if } bind def
/pstack { 0 1 count 3 sub { index == } for } bind def
/putdeviceprops
{ .putdeviceprops { erasepage } if } odef
/quit { /quit load 0 .quit } odef
/run { dup type /filetype ne { (r) .systemvmfile } if
% We must close the file when execution terminates,
% regardless of the state of the stack,
% and then propagate an error, if any.
cvx //null {.runexec} .errorexec
} odef
% Execute a file.
% Level 2 uses 2 .stop to clear the e-stack for a successful startjob:
% we detect that here, since we need to handle this even if we start out
% without job control in effect.
%
% What we push on the e-stack is the following to be executed in this order:
% .runexec1 .runexec2
/.runexec1 { % .runexec1 -
dup type /filetype ne { cvx exec } if
cvx //null 2 .stopped
% If we got back here from a startjob, just keep going.
% startjob replaces the null on the o-stack with a procedure
% to be executed when we get back here.
dup //null ne { exec //true } { pop //false } ifelse
} bind def
/.runexec2 { % .runexec2 -
exch {
.runexec
} {
dup type /filetype ne { cvx exec } if
closefile
} ifelse
} bind def
/.runexec { % .runexec -
cvlit /.runexec1 cvx 1 index /.runexec2 cvx 4 .execn
} bind def
% The following is only for compatibility with Adobe interpreters.
/setdash {
0 .argindex type dup /integertype eq exch /realtype eq or not {
/setdash .systemvar /typecheck signalerror
} if
//setdash
} odef
/setdevice
{
.setdevice
{
mark
{ % Reset the halftone since the device may differ
currenthalftone
dup type /dicttype eq
{ sethalftone }
{ pop }
ifelse
}
stopped
cleartomark
erasepage
}
if
}
odef
/setlinecap {
dup 2 gt { /setlinecap .systemvar /rangecheck signalerror } if
.setlinecap
} odef
/setlinejoin {
dup 2 gt { /setlinejoin .systemvar /rangecheck signalerror } if
.setlinejoin
} odef
/setmatrix {
dup type /arraytype ne {
dup type /packedarraytype ne {
/setmatrix load /typecheck signalerror
} if
} if
dup length 6 ne { /setmatrix load /rangecheck signalerror } if
dup aload pop .setmatrix pop
} odef
/showpage {
0 .endpage .doneshowpage {
.currentnumcopies //true .outputpage
(>>showpage, press to continue<<\n) .confirm
% Uncomment the following line, and use a Memento build to track
% blocks that are created and not destroyed between each successive
% page.
% 2 .vmreclaim .mementolistnewblocks
initgraphics
currentoverprint //false setoverprint 1 setcolor
.fillpage
setoverprint 0 setcolor
}
{ initgraphics } ifelse
systemdict /..page_default_spaces .knownget { //.PurgeDict exec } if
.beginpage
} odef
% Code output by Adobe Illustrator relies on the fact that
% `stack' is a procedure, not an operator!!!
/stack { 0 1 count 3 sub { index = } for } bind def
/start { BATCH { //null 0 .quit } { executive } ifelse } def
% Internal uses of stopped that aren't going to do a stop if an error occurs
% should use .internalstopped to avoid setting newerror et al.
/.internalstopped { //null 1 .stopped //null ne } bind def
/store { % Don't alter operands before completing.
1 .argindex where { 2 index 2 index put pop pop } { def } ifelse
} odef
/.typenames mark .typenames counttomark packedarray exch pop def
/type {
//.typenames .type
} odef
currentdict /.typenames .undef
% When running in Level 1 mode, this interpreter is supposed to be
% compatible with PostScript "version" 54.0 (I think).
/version (54.0) readonly def
/.wheredict 10 dict def
/.where /where load def
/where {
//.wheredict 1 .argindex .knownget { exec } { .where } ifelse
} odef
% internaldict is defined in systemdict, but the dictionary is allocated
% in local VM. However, the procedure must be global, since it is an
% "operator" and must be bind-able into global procedures.
% We make a procedure for creating it, since we must create a new one
% for each context with private local VM.
/.makeinternaldict {
.currentglobal //true .setglobal
[ /dup .systemvar 1183615869 /eq .systemvar
[ /pop .systemvar //null ] cvx
//false .setglobal
dup 1 10 dict .forceput % proc is global, dict is local
//true .setglobal
[ /internaldict /cvx .systemvar /invalidaccess /signalerror cvx ] cvx
/ifelse .systemvar
] cvx executeonly
exch .setglobal
} odef
systemdict /internaldict dup .makeinternaldict .makeoperator
.forceput % proc is local, systemdict is global
% Define some additional built-in procedures (beyond the ones defined by
% the PostScript Language Reference Manual).
% Warning: these are not guaranteed to stay the same from one release
% to the next!
/concatstrings % (str1) (str2) concatstrings (str1str2)
{ exch dup length 2 index length add string % str2 str1 new
dup dup 4 2 roll copy % str2 new new new1
length 4 -1 roll putinterval
} bind def
/copyarray
{ dup length array copy } bind def
% Copy a dictionary per the Level 2 spec even in Level 1.
/.copydict % .copydict
{ dup 3 -1 roll { put dup } forall pop } bind def
/copystring
{ dup length string copy } bind def
/findlibfile {
.systemvmlibfile { dup .filename pop exch //true } { //false } ifelse
} odef
/.growdictlength % get size for growing a dictionary
{ length 3 mul 2 idiv 1 add
} bind def
/.growdict % grow a dictionary
{ dup .growdictlength .setmaxlength
} bind def
/.growput % put, grow the dictionary if needed
{ 2 index length 3 index maxlength eq
{ 3 copy pop known not { 2 index .growdict } if
} if
put
} bind def
% .localvmarray may be an operator: see zsysvm.c.
/.localvmarray where {
pop
} {
/.localvmarray {
.currentglobal //false .setglobal
exch array exch .setglobal
} bind def
} ifelse
/.localvmdict where {
pop
} {
/.localvmdict {
.currentglobal //false .setglobal
exch dict exch .setglobal
} bind def
} ifelse
/.packtomark
{ counttomark packedarray exch pop } bind def
/ppstack
{ 0 1 count 3 sub { index === } for } bind def
/runlibfile
{ % We don't want to bind 'run' into this procedure,
% since run may get redefined.
findlibfile
{ exch pop /run .systemvar exec }
{ /undefinedfilename signalerror }
ifelse
} bind def
/selectdevice
{ finddevice setdevice .setdefaultscreen } bind def
/signalerror %