1 |
diff -up ghostscript-9.06/Resource/Init/gs_fonts.ps.runlibfileifexists ghostscript-9.06/Resource/Init/gs_fonts.ps |
2 |
--- ghostscript-9.06/Resource/Init/gs_fonts.ps.runlibfileifexists 2012-08-08 09:01:36.000000000 +0100 |
3 |
+++ ghostscript-9.06/Resource/Init/gs_fonts.ps 2012-08-09 08:23:46.750732348 +0100 |
4 |
@@ -95,10 +95,19 @@ userdict /Fontmap .FontDirectory maxleng |
5 |
% stack: dict file fontname filename|aliasname |
6 |
1 index type /stringtype eq |
7 |
1 index type /nametype eq and 1 index xcheck and |
8 |
- 1 index /run eq 2 index /.runlibfile eq or and { |
9 |
+ 1 index /run eq 2 index /.runlibfile eq 3 index /.runlibfileifexists eq or or and { |
10 |
% This is an inclusion entry. |
11 |
- pop findlibfile { exch pop } { file } ifelse |
12 |
- 2 index exch .readFontmap pop |
13 |
+ 0 index /.runlibfileifexists eq { |
14 |
+ pop findlibfile { |
15 |
+ exch pop |
16 |
+ 2 index exch .readFontmap pop |
17 |
+ } { |
18 |
+ pop |
19 |
+ } ifelse |
20 |
+ } { |
21 |
+ pop findlibfile { exch pop } { file } ifelse |
22 |
+ 2 index exch .readFontmap pop |
23 |
+ } ifelse |
24 |
} { |
25 |
% This is a real entry. |
26 |
% Read and pop tokens until a semicolon. |
27 |
diff -up ghostscript-9.06/Resource/Init/gs_init.ps.runlibfileifexists ghostscript-9.06/Resource/Init/gs_init.ps |
28 |
--- ghostscript-9.06/Resource/Init/gs_init.ps.runlibfileifexists 2012-08-08 09:01:36.000000000 +0100 |
29 |
+++ ghostscript-9.06/Resource/Init/gs_init.ps 2012-08-09 08:23:46.750732348 +0100 |
30 |
@@ -678,6 +678,14 @@ systemdict /internaldict dup .makeintern |
31 |
{ /undefinedfilename signalerror } |
32 |
ifelse |
33 |
} bind def |
34 |
+/runlibfileifexists |
35 |
+ { % We don't want to bind 'run' into this procedure, |
36 |
+ % since run may get redefined. |
37 |
+ findlibfile |
38 |
+ { exch pop /run .systemvar exec } |
39 |
+ { pop } |
40 |
+ ifelse |
41 |
+ } bind def |
42 |
/selectdevice |
43 |
{ finddevice setdevice .setdefaultscreen } bind def |
44 |
/signalerror % <object> <errorname> signalerror - |
45 |
@@ -846,6 +854,7 @@ userdict /.currentresourcefile //null pu |
46 |
} bind def |
47 |
% Temporarily substitute it for the real runlibfile. |
48 |
/.runlibfile /runlibfile load def |
49 |
+/.runlibfileifexists /runlibfileifexists load def |
50 |
/runlibfile /runlibfile0 load def |
51 |
|
52 |
% Create the error handling machinery. |