mirror of
https://github.com/9fans/plan9port.git
synced 2025-01-12 11:10:07 +00:00
page: handle EPS without showpage
This commit is contained in:
parent
3ad4afbe82
commit
047fd92174
2 changed files with 6 additions and 1 deletions
|
@ -186,6 +186,10 @@ spawngs(GSInfo *g, char *safer)
|
|||
|
||||
Binit(&g->gsrd, stdoutp[0], OREAD);
|
||||
|
||||
gscmd(g, "/PAGEDIDSHOWPAGE false def\n");
|
||||
gscmd(g, "/showpage { /PAGEDIDSHOWPAGE true def showpage } bind def\n");
|
||||
gscmd(g, "/PAGEFLUSH { PAGEDIDSHOWPAGE not {showpage} if /PAGEDIDSHOWPAGE false def } def\n");
|
||||
|
||||
gscmd(g, "/PAGEOUT (/dev/fd/4) (w) file def\n");
|
||||
if(!strcmp(safer, "-dSAFER"))
|
||||
gscmd(g, ".setsafe\n");
|
||||
|
|
|
@ -353,7 +353,7 @@ Keepreading:
|
|||
}
|
||||
|
||||
if(dumb) {
|
||||
fprint(ps->gs.gsfd, "(%s) run\n", argv[0]);
|
||||
fprint(ps->gs.gsfd, "(%s) run PAGEFLUSH\n", argv[0]);
|
||||
fprint(ps->gs.gsfd, "(/dev/fd/3) (w) file dup (THIS IS NOT A PLAN9 BITMAP 01234567890123456789012345678901234567890123456789\\n) writestring flushfile\n");
|
||||
}
|
||||
|
||||
|
@ -420,6 +420,7 @@ psdrawpage(Document *d, int page)
|
|||
* so send one to avoid deadlock.
|
||||
*/
|
||||
write(ps->gs.gsfd, "\n", 1);
|
||||
fprint(ps->gs.gsfd, "\nPAGEFLUSH\n");
|
||||
im = convert(&ps->gs.g);
|
||||
if(im == nil) {
|
||||
fprint(2, "fatal: readimage error %r\n");
|
||||
|
|
Loading…
Reference in a new issue