Documente Academic
Documente Profesional
Documente Cultură
%
% This software is provided AS-IS with no warranty, either express or
% implied.
%
% This software is distributed under license and may not be copied,
% modified or distributed except as expressly authorized under the terms
% of the license contained in the file LICENSE in this distribution.
%
% For more information about licensing, please refer to
% http://www.ghostscript.com/licensing/. For information on
% commercial licensing, go to http://www.artifex.com/licensing/ or
% contact Artifex Software, Inc., 101 Lucas Valley Road #110,
% San Rafael, CA 94903, U.S.A., +1(415)492-9861.
% Check whether the currently installed parser is the one defined in this file.
/.using_parse_dsc { % - .using_parse_dsc <proc> <using?>
currentuserparams /ProcessDSCComment get
dup null eq { pop {{//null} //parse_dsc exec} } if
dup length 3 eq {
dup dup length 1 sub get /parse_dsc load eq
} {
false
} ifelse
} bind def
% - dsc_init -
/dsc_init { % Initialize DSC parser
currentglobal true setglobal
/dsc_dict 50 dict store % Size must be large enough for all DSC values
dsc_dict .initialize_dsc_parser
.using_parse_dsc {
% Already using this parser.
pop
} {
% Encapsulate the previous parser. We know it is in global VM:
% allocate the new one in global VM as well.
1 array astore
/parse_dsc load /exec load 3 array astore cvx readonly
<< /ProcessDSCComment 3 -1 roll >>
setuserparams
} ifelse
setglobal
/do_parse_dsc true def
} bind def