aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/page
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2007-05-05 13:08:06 +0000
committerrsc <devnull@localhost>2007-05-05 13:08:06 +0000
commite17c64a7cd5162ee586f4b1bdd797f64381859d9 (patch)
tree981da6d49b8cfbb6e89d73d0c24aaebb406eb468 /src/cmd/page
parentcd2bb6ce1de4f0769f4c2e570d8eeb49bfa320cc (diff)
downloadplan9port-e17c64a7cd5162ee586f4b1bdd797f64381859d9.tar.gz
plan9port-e17c64a7cd5162ee586f4b1bdd797f64381859d9.tar.bz2
plan9port-e17c64a7cd5162ee586f4b1bdd797f64381859d9.zip
fix troff input (Colin DeVilbiss)
Diffstat (limited to 'src/cmd/page')
-rw-r--r--src/cmd/page/filter.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/cmd/page/filter.c b/src/cmd/page/filter.c
index 415db038..2e0482fc 100644
--- a/src/cmd/page/filter.c
+++ b/src/cmd/page/filter.c
@@ -13,6 +13,7 @@ initfilt(Biobuf *b, int argc, char **argv, uchar *buf, int nbuf, char *type, cha
int p[2];
char xbuf[8192];
int n;
+ char template[] = "/tmp/pagecvtXXXXXXXXX";
if(argc > 1) {
fprint(2, "can only view one %s file at a time\n", type);
@@ -31,7 +32,7 @@ initfilt(Biobuf *b, int argc, char **argv, uchar *buf, int nbuf, char *type, cha
p[1] = open("/dev/null", ORDWR);
}
- ofd = opentemp("/tmp/pagecvtXXXXXXXXX");
+ ofd = opentemp(template);
switch(fork()){
case -1:
fprint(2, "fork fails: %r\n");
@@ -100,7 +101,7 @@ initdvi(Biobuf *b, int argc, char **argv, uchar *buf, int nbuf)
Document*
inittroff(Biobuf *b, int argc, char **argv, uchar *buf, int nbuf)
{
- return initfilt(b, argc, argv, buf, nbuf, "troff", "lp -dstdout", 1);
+ return initfilt(b, argc, argv, buf, nbuf, "troff", "9 tr2post | 9 psfonts", 1);
}
Document*