[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[help-gv] gv patch
From: |
Andrew . Hamilton |
Subject: |
[help-gv] gv patch |
Date: |
Fri, 31 Jul 2009 11:54:46 -0600 |
Markus,
> thanks for sending us your patch. I am testing it. If it works as
> expected, I'll include it in the next release of GNU gv.
Thanks. Warning: you will find that a PostScript file <file.ps>
containing Document Structuring Conventions (DSC) will NOT work in
cat <file.ps> | gv -
Currently only vanilla PostScript files work (e.g. a single PostScript graphic).
The reason for the failure is a bug in gs, the fix for which is
documented in the patch file:
+ if (gvw->ghostview.filename && !strcmp(gvw->ghostview.filename,"-")) {
+ /* The ghostscript documentation states that the "-" argument
+ tells gs that input is coming from a pipe rather than from stdin.
+ One of the side effects of the "-" argument is that gs does not
+ flush output at each line of input, but rather accumulates input
+ and flushes only when the buffer is full. Since we want gs to
+ flush output at each line of input, we therefore cannot send "-".
+ Unfortunately not sending "-" has the side effect that gs no
+ longer reads correctly through either multiple PostScript files
+ or PostScript files with multiple pages. Ah well.
+ Should gs ever acquire a -DFLUSH argument, then send gs that argument,
+ and uncomment the following line. */
+ /* argv[argc++] = "-"; */
So please don't reject the patch just because it fails in this case.
The problem is not with gv or the patch, but rather with gs.
Thanks, Andrew