GIF89a; EcchiShell v1.0
//proc/self/root/usr/share/ghostscript/ ..nosubstdevicetest false % [space] true % % If the boolean is true then the C code must set the additional colour space % and execute .includecolorspace before finally setting a DeviceGray space. % /..nosubstdevicetest { //false mark 3 -1 roll % If we have already recorded this space, don't repeat it. systemdict /..page_default_spaces get 1 index known { cleartomark } { { % Check to see if this space was defined by defineresource, if so then % the job defined it, otherwise its the usual default, so ignore it. dup /ColorSpace resourcestatus { pop 0 eq { % Default* defined by defineresource systemdict /..page_default_spaces get 1 index //true put dup /ColorSpace findresource 4 2 roll pop pop //true }{ cleartomark } ifelse }{ cleartomark } ifelse } stopped {cleartomark}if } ifelse }bind def % % ..includecolorspace - % /..includecolorspace { % If we have already recorded this space, don't repeat it. systemdict /..page_default_spaces get 1 index known { pop } { mark exch { % Check to see if this space was defined by defineresource, if so then % the job defined it, otherwise its the usual default, so ignore it. dup /ColorSpace resourcestatus { pop 0 eq { % Job defined /Default*, so record it and allow the device access to it systemdict /..page_default_spaces get 1 index //true put gsave { dup /ColorSpace findresource //setcolorspace exec .includecolorspace } stopped pop grestore } if } if } stopped pop cleartomark } ifelse } bind def % % cs_substitute_generic % /cs_substitute_generic { .getuseciecolor {NOSUBSTDEVICECOLORS { //..includecolorspace exec dup } { /ColorSpace findresource } ifelse } { pop dup } ifelse } bind def % % cs_substitute_DeviceRGB_for_PDFX_or_PDFA % /cs_substitute_DeviceRGB_for_PDFX_or_PDFA { systemdict /PDFX .knownget not { //false } if systemdict /PDFA .knownget not { //false } {0 eq {//false}{//true} ifelse} ifelse or { dup /ColorSpace resourcestatus { pop pop } { (Error: Need a /DefaultRGB /ColorSpace resource for generating a PDF/X or PDF/A document.) = /cs_substitute_DeviceRGB_for_PDFX_or_PDFA cvx /undefined signalerror } ifelse /ColorSpace findresource } { //cs_substitute_generic exec } ifelse } bind def end % % Set the initial device space % systemdict /DeviceGray_array get setcolorspace .setglobal