Possible fix for 687066, issue with open (font) file descriptors
Alex Cherepanov <[email protected]>
| Newsgroups | gmane.comp.printing.ghostscript.patches |
|---|---|
| Organization | Coscript Software |
| Message-ID | <[email protected]> |
Close font files of PFB fonts. Fix bug 687066 This patch, definitely, corrects a problem in Ghostscript but I'm not sure whether it fixes this bug, because inaccessible files are closed by the garbage collector or restore. So the files don't have to be closed. _______________________________________________ gs-code-review mailing list [email protected] http://www.ghostscript.com/mailman/listinfo/gs-code-review
gs_type1.ps.diff
(text/plain, 1.2 KB)
Index: gs/lib/gs_type1.ps
===================================================================
RCS file: /cvs/ghostscript/gs/lib/gs_type1.ps,v
retrieving revision 1.14
diff -b -u -r1.14 gs_type1.ps
--- gs/lib/gs_type1.ps 11 Mar 2003 11:13:01 -0000 1.14
+++ gs/lib/gs_type1.ps 8 Oct 2003 21:57:50 -0000
@@ -79,6 +79,11 @@
DISKFONTS { end } if
cleartomark
} bind def
+
+/closesourcedict mark
+ /CloseSource true
+.dicttomark readonly def
+
/.loadfont1 { % <file> .loadfont1 <errorflag>
{ % We would like to use `false /PFBDecode filter',
% but this occasionally produces a whitespace character as
@@ -90,7 +95,7 @@
% we have to create a procedure to close the file reliably.
dup read not { -1 } if
2 copy unread 16#80 eq {
- dup true /PFBDecode filter cvx
+ dup //closesourcedict //true /PFBDecode filter cvx
exch .currentresourcefile eq {
dup /.execasresource .systemvar
} {
@@ -104,6 +109,8 @@
} stopped
} bind def
+currentdict /closesourcedict .undef
+
% Here are the BuildChar and BuildGlyph implementation for Type 1 fonts.
% The names %Type1BuildChar and %Type1BuildGlyph are known to the interpreter.
% The real work is done in an operator: