Annotation of /trunk/ghostscript-gpl/patches/ghostscript-gpl-9.04-runlibfileifexists.patch
Parent Directory | Revision Log
Revision 1569 -
(hide annotations)
(download)
Thu Nov 24 19:55:04 2011 UTC (12 years, 10 months ago) by niro
File size: 2364 byte(s)
Thu Nov 24 19:55:04 2011 UTC (12 years, 10 months ago) by niro
File size: 2364 byte(s)
rediffed
1 | niro | 1569 | diff -up ghostscript-9.04/Resource/Init/gs_fonts.ps.runlibfileifexists ghostscript-9.04/Resource/Init/gs_fonts.ps |
2 | --- ghostscript-9.04/Resource/Init/gs_fonts.ps.runlibfileifexists 2011-08-09 17:05:39.736485415 +0100 | ||
3 | +++ ghostscript-9.04/Resource/Init/gs_fonts.ps 2011-08-09 17:06:08.615943187 +0100 | ||
4 | @@ -96,10 +96,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.04/Resource/Init/gs_init.ps.runlibfileifexists ghostscript-9.04/Resource/Init/gs_init.ps | ||
28 | --- ghostscript-9.04/Resource/Init/gs_init.ps.runlibfileifexists 2011-08-09 17:05:44.395397937 +0100 | ||
29 | +++ ghostscript-9.04/Resource/Init/gs_init.ps 2011-08-09 17:06:15.238818843 +0100 | ||
30 | @@ -674,6 +674,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 | @@ -842,6 +850,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. |