aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPetter Rodhelind <petter.rodhelind@gmail.com>2019-03-29 20:34:32 +0100
committerPetter Rodhelind <petter.rodhelind@gmail.com>2019-03-29 20:34:32 +0100
commit1bd7a82536895d5f1955603630615fb49a07a0b7 (patch)
tree0a12400e3d812ceb6ca74cb3b42463af2a69f59d
parent892efcdacf40182a99cf7e8f65e9208b7f39ba2c (diff)
parent047fd921744f39a82a86d9370e03f7af511e6e84 (diff)
downloadplan9port-1bd7a82536895d5f1955603630615fb49a07a0b7.tar.gz
plan9port-1bd7a82536895d5f1955603630615fb49a07a0b7.tar.bz2
plan9port-1bd7a82536895d5f1955603630615fb49a07a0b7.zip
Merge remote-tracking branch 'upstream/master'
-rw-r--r--src/cmd/page/gs.c4
-rw-r--r--src/cmd/page/ps.c3
2 files changed, 6 insertions, 1 deletions
diff --git a/src/cmd/page/gs.c b/src/cmd/page/gs.c
index 7179429a..5c493b35 100644
--- a/src/cmd/page/gs.c
+++ b/src/cmd/page/gs.c
@@ -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");
diff --git a/src/cmd/page/ps.c b/src/cmd/page/ps.c
index e75a1477..7935f694 100644
--- a/src/cmd/page/ps.c
+++ b/src/cmd/page/ps.c
@@ -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");