[gs-devel] Remove output filter pipeline "issue"
L. Peter Deutsch
ghost at aladdin.com
Mon Apr 8 23:14:40 PDT 2002
I was recently looking at doc/Issues.htm, and I ran across an "issue" that I
think is bogus and want to remove. It refers to bug # 224134. I have just
updated this bug on SourceForge. Here is the original report and my
I propose to remove the "issue" from doc/Issues.htm. Comments?
The following code fragment should output "3E>". It outputs nothing.
(%stdout) (w) file
%dup (hi) writestring
>Comment By: L. Peter Deutsch (lpd)
Date: 2002-04-08 23:08
Logged In: YES
The analysis is wrong. Ghostscript's behavior is correct
(consistent with both the PLRM and Adobe RIPs). Closing the
outer filter does not, and should not, flush and/or close
the inner filter. Because of buffering, clients cannot
assume that output is propagated through an output filter
unless the filter is closed or flushed. Since the inner
filter is not closed, its buffered output is never
propagated to stdout.
The above happens even if the entire code is bracketed in a
save/restore. Even though the restore closes all the
filters, both the PLRM and private correspondence from Adobe
state that when this happens, the order of closing is not
guaranteed and what happens to buffered output is undefined.
The following code prints "XXXXXXXX" rather than "3E>XXXXX"
on both Ghostscript and an Adobe Level 2 RIP:
/s (XXXXXXXX) def
/Times-Roman 20 selectfont
100 100 moveto s show showpage
L. Peter Deutsch | Aladdin Enterprises | 203 Santa Margarita Ave.
ghost at aladdin.com | http://www.aladdin.com | Menlo Park, CA 94025
No government censorship of software! Oppose the CBDTPA! www.eff.org
More information about the gs-devel