/
usr
/
share
/
ghostscript
/
Resource
/
Init
/
/usr/share/ghostscript/Resource/Init
mkdir
upload
Name
Size
Mode
Actions
cidfmap
2156
0644
edit
dl
rm
FAPIcidfmap
1483
0644
edit
dl
rm
FAPIconfig
815
0644
edit
dl
rm
FAPIfontmap
1468
0644
edit
dl
rm
FCOfontmap-PCLPS2
2857
0644
edit
dl
rm
Fontmap
109
0644
edit
dl
rm
Fontmap.GS
12929
0644
edit
dl
rm
gs_agl.ps
218021
0644
edit
dl
rm
gs_btokn.ps
12765
0644
edit
dl
rm
gs_cet.ps
4964
0644
edit
dl
rm
gs_cff.ps
6969
0644
edit
dl
rm
gs_cidcm.ps
16827
0644
edit
dl
rm
gs_ciddc.ps
8505
0644
edit
dl
rm
gs_cidfm.ps
8069
0644
edit
dl
rm
gs_cidfn.ps
14547
0644
edit
dl
rm
gs_cidtt.ps
5847
0644
edit
dl
rm
gs_cmap.ps
18444
0644
edit
dl
rm
gs_cspace.ps
4059
0644
edit
dl
rm
gs_dbt_e.ps
2134
0644
edit
dl
rm
gs_diskn.ps
6867
0644
edit
dl
rm
gs_dps1.ps
4756
0644
edit
dl
rm
gs_dps2.ps
8771
0644
edit
dl
rm
gs_dscp.ps
3938
0644
edit
dl
rm
gs_epsf.ps
12161
0644
edit
dl
rm
gs_fapi.ps
15611
0644
edit
dl
rm
gs_fntem.ps
11389
0644
edit
dl
rm
gs_fonts.ps
48531
0644
edit
dl
rm
gs_frsd.ps
3780
0644
edit
dl
rm
gs_icc.ps
3104
0644
edit
dl
rm
gs_il1_e.ps
2722
0644
edit
dl
rm
gs_img.ps
23998
0644
edit
dl
rm
gs_init.ps
94572
0644
edit
dl
rm
gs_lev2.ps
43850
0644
edit
dl
rm
gs_ll3.ps
19572
0644
edit
dl
rm
gs_mex_e.ps
3843
0644
edit
dl
rm
gs_mgl_e.ps
2181
0644
edit
dl
rm
gs_mro_e.ps
2506
0644
edit
dl
rm
gs_pdfwr.ps
32179
0644
edit
dl
rm
gs_pdf_e.ps
1556
0644
edit
dl
rm
gs_res.ps
42450
0644
edit
dl
rm
gs_resmp.ps
22482
0644
edit
dl
rm
gs_setpd.ps
38487
0644
edit
dl
rm
gs_statd.ps
17851
0644
edit
dl
rm
gs_std_e.ps
3143
0644
edit
dl
rm
gs_sym_e.ps
3104
0644
edit
dl
rm
gs_trap.ps
2946
0644
edit
dl
rm
gs_ttf.ps
66173
0644
edit
dl
rm
gs_typ32.ps
4560
0644
edit
dl
rm
gs_typ42.ps
2096
0644
edit
dl
rm
gs_type1.ps
12543
0644
edit
dl
rm
gs_wan_e.ps
1563
0644
edit
dl
rm
pdf_base.ps
60815
0644
edit
dl
rm
pdf_draw.ps
188723
0644
edit
dl
rm
pdf_font.ps
98378
0644
edit
dl
rm
pdf_main.ps
143907
0644
edit
dl
rm
pdf_ops.ps
75878
0644
edit
dl
rm
pdf_rbld.ps
20480
0644
edit
dl
rm
pdf_sec.ps
27865
0644
edit
dl
rm
xlatmap
1767
0644
edit
dl
rm
Edit:
/usr/share/ghostscript/Resource/Init/gs_dps2.ps
(8771B)
% Copyright (C) 2001-2021 Artifex Software, Inc. % All Rights Reserved. % % 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. % % Refer to licensing information at http://www.artifex.com or contact % Artifex Software, Inc., 1305 Grant Avenue - Suite 200, Novato, % CA 94945, U.S.A., +1(415)492-9861, for further information. % % Initialization file for basic Display PostScript functions % that are also included in Level 2. level2dict begin % ------ Errors ------ % % These errors are only defined in Level 2 and DPS. { /configurationerror /undefinedresource /unregistered } { .registererror } forall % ------ Halftones ------ % /.makestackdict { { counttomark -1 roll } forall .dicttomark } bind def /currenthalftone % - currenthalftone <dict> { mark .currenthalftone { { exch pop } % halftone { /HalftoneType 1 % screen { /Frequency /Angle /SpotFunction } //.makestackdict exec readonly } { /HalftoneType 2 % colorscreen { /RedFrequency /RedAngle /RedSpotFunction /GreenFrequency /GreenAngle /GreenSpotFunction /BlueFrequency /BlueAngle /BlueSpotFunction /GrayFrequency /GrayAngle /GraySpotFunction } //.makestackdict exec readonly } } exch get exec } odef currentdict /.makestackdict undef % Define sethalftone so it converts types 1-4 to type 5. /.makehalftoneRGBV { % <dict> <type> <keys> <keysRGBV> 4 -1 roll exch { 1 index exch get exch } forall 15 1 roll 14 -2 roll mark 15 1 roll { /Gray /Blue /Green /Red } { % stack: v0 v1 v2 type keys comp mark 2 index 0 get 8 -1 roll 4 index 1 get 9 -1 roll 6 index 2 get 10 -1 roll % stack: type keys comp mark k0 v0 k1 v1 k2 v2 /HalftoneType 10 index .dicttomark counttomark 2 roll } forall pop pop /Default 1 index .dicttomark exch pop { .sethalftone5 } } bind def % The value of each entry in .halftonetypes is a procedure: % <setdict> <htdict> <<proc>> <setdict'> <htdict'> <sethalftoneproc> % This allows us to use these procedures both for actually implementing % sethalftone and for converting subsidiary dictionaries of HalftoneType 5 % halftones. systemdict begin 15 dict /.halftonetypes 1 index def begin 1 { mark exch /Default exch .dicttomark { .sethalftone5 } } bind def 2 { 1 { /Frequency /Angle /SpotFunction } { /RedFrequency /RedAngle /RedSpotFunction /GreenFrequency /GreenAngle /GreenSpotFunction /BlueFrequency /BlueAngle /BlueSpotFunction /GrayFrequency /GrayAngle /GraySpotFunction } //.makehalftoneRGBV exec } bind def 3 { mark exch /Default exch .dicttomark { .sethalftone5 } } bind def 4 { 3 { /Width /Height /Thresholds } { /RedWidth /RedHeight /RedThresholds /GreenWidth /GreenHeight /GreenThresholds /BlueWidth /BlueHeight /BlueThresholds /GrayWidth /GrayHeight /GrayThresholds } //.makehalftoneRGBV exec } bind def 5 { pop dup length dict copy mark 1 index { % Even HalftoneType 5 dictionaries have entries other than % subsidiary halftone dictionaries. dup type /dicttype ne { 0 } { dup /HalftoneType .knownget not { 0 } if } ifelse dup 5 gt { % Stack: dict mark ... keyN dictN httypeN % Assume that all HalftoneTypes > 5 convert to 5. 1 index 3 1 roll //.halftonetypes exch get exec pop /Default get % Stack: dict mark ... keyN setdict'N htdict'N counttomark 1 add index 3 index 4 -1 roll put } { pop } ifelse } forall .dicttomark { .sethalftone5 } } bind def end end currentdict /.makehalftoneRGBV undef /sethalftone { % <dict> sethalftone - % We must create the new dictionary in the same VM as the % operand; otherwise, invalidaccess errors may occur. .currentglobal 1 .argindex dup gcheck .setglobal dup //.halftonetypes 1 index /HalftoneType get dup type /integertype ne { /sethalftone .systemvar /typecheck signalerror } if .knownget not { /sethalftone .systemvar /rangecheck signalerror } if exec exec .setglobal pop } .bind odef % Redefine setscreen and setcolorscreen to recognize halftone dictionaries, % and to insert the Frequency and Angle into Type 1 halftones, per % Adobe TN 5085. /.fixsethalftonescreen % <freq> <angle> <dict> .fix...screen % <freq> <angle> <dict> <dict'> { dup dup /HalftoneType get 1 eq { dup wcheck not { dup length dict .copydict } if dup /Frequency 5 index put dup /Angle 4 index put languagelevel 3 ge { dup /AccurateScreens dup getuserparam put } if } if } bind def /setscreen % <ignore*2> <dict> setscreen - { dup type /dicttype eq { //.fixsethalftonescreen exec sethalftone pop pop pop } { //setscreen } ifelse } .bind odef /setcolorscreen % <ignore*11> <dict> setcolorscreen - { dup type /dicttype eq { //.fixsethalftonescreen exec sethalftone 12 { pop } repeat } { //setcolorscreen } ifelse } .bind odef currentdict /.fixsethalftonescreen undef % Redefine currentscreen and currentcolorscreen to extract the Frequency % and Angle from Type 1 halftones, per Adobe TN 5085. /.fixcurrenthalftonescreen % <dict> .fix... <freq> <angle> <proc> { dup /HalftoneType get 1 eq { dup /Frequency get 1 index /Angle get } { 60.0 0.0 } % Adobe returns these as reals ifelse 3 2 roll } bind def /currentscreen % - currentscreen 60 0 <dict> { .currenthalftone { { //.fixcurrenthalftonescreen exec }% halftone { } % screen { 12 3 roll 9 { pop } repeat % colorscreen dup type /dicttype eq { //.fixcurrenthalftonescreen exec } if } } exch get exec } odef /currentcolorscreen % - currentcolorscreen (60 0 <dict>)*4 { .currenthalftone { { //.fixcurrenthalftonescreen exec 3 copy 6 copy } % halftone { % screen % The procedure might not be readable.... dup rcheck { dup length array copy cvx } if 3 copy 6 copy } { } % colorscreen } exch get exec } odef currentdict /.fixcurrenthalftonescreen undef % ------ User objects ------ % /.UserObjects { .userdict /UserObjects } bind executeonly odef % In order to get proper error recovery behavior, we need to be careful % not to pop any operands from the stack until we're done. % The code below faithfully duplicates the apparent array-growing % behavior of Adobe interpreters. /defineuserobject { % <index> <value> defineuserobject - 1 index 65535 gt { % .localvmarray throws limitcheck but CET 31-02 wants rangecheck /defineuserobject .systemvar /rangecheck signalerror } if .UserObjects .knownget { length dup 3 .argindex le { % Stack: index value len 2 index eq { 1 index 2 mul } { 1 index 1 add } ifelse .localvmarray .UserObjects get 1 index copy pop .UserObjects 3 -1 roll put } { pop } ifelse } { .UserObjects 3 .argindex 1 add 10 .max .localvmarray put } ifelse .UserObjects get 2 .argindex 2 index put pop pop } .bind odef /execuserobject { % <index> execuserobject - dup type /integertype ne { % Adobe validates the argument before accessing UserObjects - CET 31-03 /execuserobject .systemvar /typecheck signalerror } if .UserObjects get 1 .argindex get exch pop exec } .bind odef /undefineuserobject { % <index> undefineuserobject - dup type /integertype ne { % Adobe validates the argument before accessing UserObjects - CET 31-11 /undefineuserobject .systemvar /typecheck signalerror } if .UserObjects get 1 .argindex //null put pop } .bind odef currentdict /.UserObjects undef % ------ Cache control ------ % % Dummy definitions for cache control operators /ucachestatus { % - ucachestatus -mark- ? ? ? ? <size> mark 0 0 0 0 /MaxUPathItem getuserparam } odef /setucacheparams { % -mark- ... <size> setucacheparams - % Provoke an appropriate error if needed. counttomark 1 lt { () 0 get } if dup 0 or /MaxUPathItem getuserparam .max 1 dict dup /MaxUPathItem 4 -1 roll put setuserparams cleartomark } odef end % level2dict
Save
cmd:
run