From e8fb1d3efb114d1859f14fda2b6681d99df1f48a Mon Sep 17 00:00:00 2001 From: wkj Date: Mon, 17 May 2004 02:24:15 +0000 Subject: tr2post and aux/download; download is a shell script in $PLAN9/bin. --- src/cmd/postscript/common/common.c | 2 +- src/cmd/postscript/common/common.h | 4 +++- src/cmd/postscript/common/ext.h | 7 +++---- src/cmd/postscript/common/misc.c | 6 +++++- src/cmd/postscript/common/mkfile | 2 +- src/cmd/postscript/common/request.c | 3 +++ src/cmd/postscript/common/tempnam.c | 2 +- 7 files changed, 17 insertions(+), 9 deletions(-) (limited to 'src/cmd/postscript/common') diff --git a/src/cmd/postscript/common/common.c b/src/cmd/postscript/common/common.c index a58167a6..afcdb766 100644 --- a/src/cmd/postscript/common/common.c +++ b/src/cmd/postscript/common/common.c @@ -209,7 +209,7 @@ endpage(void) { int cat(char *filename) { Biobuf *bfile; - Biobufhdr *Bfile; + Biobuf *Bfile; int n; static char buf[Bsize]; diff --git a/src/cmd/postscript/common/common.h b/src/cmd/postscript/common/common.h index 2432fe12..7b267668 100644 --- a/src/cmd/postscript/common/common.h +++ b/src/cmd/postscript/common/common.h @@ -40,6 +40,8 @@ BOOLEAN isinstring(void); void startpage(void); void endpage(void); int cat(char *); -int Bgetfield(Biobufhdr *, int, void *, int); +int Bgetfield(Biobuf*, int, void *, int); void *galloc(void *, int, char *); void pagelist(char *); + +int safe_tmpnam(char*); diff --git a/src/cmd/postscript/common/ext.h b/src/cmd/postscript/common/ext.h index c0f7c7a5..86b98da5 100644 --- a/src/cmd/postscript/common/ext.h +++ b/src/cmd/postscript/common/ext.h @@ -27,10 +27,9 @@ extern int writing; /* and output encoding */ extern char *optarg; /* for getopt() */ extern int optind; -extern void interrupt(); -extern void error(); -extern int cat(); -extern void concat(); +extern void interrupt(int); +extern int cat(char*); +extern void concat(double*); /* * extern char *tempnam(char*,char*); diff --git a/src/cmd/postscript/common/misc.c b/src/cmd/postscript/common/misc.c index 198a9351..e965a6ee 100644 --- a/src/cmd/postscript/common/misc.c +++ b/src/cmd/postscript/common/misc.c @@ -18,6 +18,10 @@ int nolist = 0; /* number of specified ranges */ int olist[50]; /* processing range pairs */ +int str_convert(char **str, int err); +void error(int kind, char *mesg, unsigned int a1, unsigned int a2, unsigned int a3); +int cat(char *file); + /*****************************************************************************/ extern int str_convert(); @@ -44,7 +48,7 @@ out_list(str) stop = str_convert(&str, 9999); if ( start > stop ) - error(FATAL, "illegal range %d-%d", start, stop); + error(FATAL, "illegal range %d-%d", start, stop, 0); olist[nolist++] = start; olist[nolist++] = stop; diff --git a/src/cmd/postscript/common/mkfile b/src/cmd/postscript/common/mkfile index 09d43035..121b739e 100644 --- a/src/cmd/postscript/common/mkfile +++ b/src/cmd/postscript/common/mkfile @@ -2,7 +2,7 @@ <../config -LIB=com.a +LIB=libcom.a OFILES=bbox.$O\ glob.$O\ misc.$O\ diff --git a/src/cmd/postscript/common/request.c b/src/cmd/postscript/common/request.c index 7884b239..ba956d57 100644 --- a/src/cmd/postscript/common/request.c +++ b/src/cmd/postscript/common/request.c @@ -24,6 +24,9 @@ Request request[MAXREQUEST]; /* next page or global request */ int nextreq = 0; /* goes in request[nextreq] */ char *requestfile = REQUESTFILE; /* default lookup file */ +void dumprequest(char *want, char *file, FILE *fp_out); +extern void error(int errtype, char *fmt, ...); + /*****************************************************************************/ void diff --git a/src/cmd/postscript/common/tempnam.c b/src/cmd/postscript/common/tempnam.c index a759876e..b6b5fd1f 100644 --- a/src/cmd/postscript/common/tempnam.c +++ b/src/cmd/postscript/common/tempnam.c @@ -31,7 +31,7 @@ mkfname(char *tmpdir, char *prefix) return fname; } -extern int mkstemp(); +extern int mkstemp(char*); char* safe_tempnam(char *tmpdir, char *prefix) -- cgit v1.2.3