diff options
author | wkj <devnull@localhost> | 2004-05-17 02:24:15 +0000 |
---|---|---|
committer | wkj <devnull@localhost> | 2004-05-17 02:24:15 +0000 |
commit | e8fb1d3efb114d1859f14fda2b6681d99df1f48a (patch) | |
tree | a3b437370521c9eff6cab00dd77fd2d95a3dc090 /src/cmd/postscript/tr2post/tr2post.c | |
parent | 8a3cbc157981485adc947c0477dc3e4907acc9a3 (diff) | |
download | plan9port-e8fb1d3efb114d1859f14fda2b6681d99df1f48a.tar.gz plan9port-e8fb1d3efb114d1859f14fda2b6681d99df1f48a.tar.bz2 plan9port-e8fb1d3efb114d1859f14fda2b6681d99df1f48a.zip |
tr2post and aux/download; download is a shell script in $PLAN9/bin.
Diffstat (limited to 'src/cmd/postscript/tr2post/tr2post.c')
-rw-r--r-- | src/cmd/postscript/tr2post/tr2post.c | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/src/cmd/postscript/tr2post/tr2post.c b/src/cmd/postscript/tr2post/tr2post.c index acfe604d..5a22ac72 100644 --- a/src/cmd/postscript/tr2post/tr2post.c +++ b/src/cmd/postscript/tr2post/tr2post.c @@ -23,6 +23,10 @@ Biobuf binp, *bstdout, bstderr; Biobuf *Bstdin, *Bstdout, *Bstderr; int debug = 0; +#ifndef MAXPATHLEN +#define MAXPATHLEN 255 +#endif + char tmpfilename[MAXPATHLEN+1]; char copybuf[BUFSIZ]; @@ -41,20 +45,20 @@ prologues(void) { Bprint(Bstdout, "%s %s\n", PAGES, ATEND); Bprint(Bstdout, "%s", ENDCOMMENTS); - if (cat(DPOST)) { + if (cat(unsharp(DPOST))) { Bprint(Bstderr, "can't read %s\n", DPOST); exits("dpost prologue"); } if (drawflag) { - if (cat(DRAW)) { + if (cat(unsharp(DRAW))) { Bprint(Bstderr, "can't read %s\n", DRAW); exits("draw prologue"); } } if (DOROUND) - cat(ROUNDPAGE); + cat(unsharp(ROUNDPAGE)); Bprint(Bstdout, "%s", ENDPROLOG); Bprint(Bstdout, "%s", BEGINSETUP); @@ -70,19 +74,19 @@ prologues(void) { if (pointsize != 10) Bprint(Bstdout, "/pointsize %d def\n", pointsize); if (xoffset != .25) Bprint(Bstdout, "/xoffset %g def\n", xoffset); if (yoffset != .25) Bprint(Bstdout, "/yoffset %g def\n", yoffset); - cat(ENCODINGDIR"/Latin1.enc"); + cat(unsharp(ENCODINGDIR"/Latin1.enc")); if (passthrough != 0) Bprint(Bstdout, "%s\n", passthrough); Bprint(Bstdout, "setup\n"); if (formsperpage > 1) { - cat(FORMFILE); + cat(unsharp(FORMFILE)); Bprint(Bstdout, "%d setupforms \n", formsperpage); } /* output Build character info from charlib if necessary. */ for (i=0; i<build_char_cnt; i++) { sprint(charlibname, "%s/%s", CHARLIB, build_char_list[i]->name); - if (cat(charlibname)) + if (cat(unsharp(charlibname))) Bprint(Bstderr, "cannot open %s\n", charlibname); } @@ -94,10 +98,11 @@ cleanup(void) { remove(tmpfilename); } +int main(int argc, char *argv[]) { Biobuf btmp; Biobuf *binp; - Biobufhdr *Binp; + Biobuf *Binp; int i, tot, ifd, fd; char *t; @@ -217,4 +222,5 @@ main(int argc, char *argv[]) { finish(); exits(""); + return 0; } |