diff options
author | rsc <devnull@localhost> | 2007-03-26 20:55:26 +0000 |
---|---|---|
committer | rsc <devnull@localhost> | 2007-03-26 20:55:26 +0000 |
commit | 05a4d855f167ae2d0d2c0ba0e386d933172b71ea (patch) | |
tree | 8a1c64cf67479d8cab98b70fd25a12929f566634 /src/cmd/page/ps.c | |
parent | 6c4c5c5b959ec8a2e85510bdf85339582f638f36 (diff) | |
download | plan9port-05a4d855f167ae2d0d2c0ba0e386d933172b71ea.tar.gz plan9port-05a4d855f167ae2d0d2c0ba0e386d933172b71ea.tar.bz2 plan9port-05a4d855f167ae2d0d2c0ba0e386d933172b71ea.zip |
add page (Kris Maglione)
Diffstat (limited to 'src/cmd/page/ps.c')
-rw-r--r-- | src/cmd/page/ps.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/cmd/page/ps.c b/src/cmd/page/ps.c index cc6f3c51..4b678dc3 100644 --- a/src/cmd/page/ps.c +++ b/src/cmd/page/ps.c @@ -8,7 +8,7 @@ #include <libc.h> #include <draw.h> #include <cursor.h> -#include <event.h> +#include <thread.h> #include <bio.h> #include <ctype.h> #include "page.h" @@ -158,7 +158,7 @@ initps(Biobuf *b, int argc, char **argv, uchar *buf, int nbuf) fprint(2, "reading through postscript...\n"); if(b == nil){ /* standard input; spool to disk (ouch) */ fd = spooltodisk(buf, nbuf, nil); - sprint(fdbuf, "/fd/%d", fd); + sprint(fdbuf, "/dev/fd/%d", fd); b = Bopen(fdbuf, OREAD); if(b == nil){ fprint(2, "cannot open disk spool file\n"); @@ -367,7 +367,7 @@ Keepreading: if(dumb) { fprint(ps->gs.gsfd, "(%s) run\n", argv[0]); - fprint(ps->gs.gsfd, "(/fd/3) (w) file dup (THIS IS NOT A PLAN9 BITMAP 01234567890123456789012345678901234567890123456789\\n) writestring flushfile\n"); + fprint(ps->gs.gsfd, "(/dev/fd/3) (w) file dup (THIS IS NOT A PLAN9 BITMAP 01234567890123456789012345678901234567890123456789\\n) writestring flushfile\n"); } ps->bbox = bbox; @@ -417,7 +417,7 @@ psdrawpage(Document *d, int page) Image *im; if(ps->clueless) - return readimage(display, ps->gs.gsdfd, 0); + return convert(&ps->gs.g); waitgs(&ps->gs); @@ -433,7 +433,7 @@ psdrawpage(Document *d, int page) * so send one to avoid deadlock. */ write(ps->gs.gsfd, "\n", 1); - im = readimage(display, ps->gs.gsdfd, 0); + im = convert(&ps->gs.g); if(im == nil) { fprint(2, "fatal: readimage error %r\n"); wexits("readimage"); |