| 7 |
|
* 1/4/89 |
| 8 |
|
*/ |
| 9 |
|
|
| 10 |
– |
#include "standard.h" |
| 10 |
|
#include "platform.h" |
| 11 |
+ |
#include "rtprocess.h" |
| 12 |
+ |
#include "rterror.h" |
| 13 |
|
#include "color.h" |
| 14 |
|
#include "calcomp.h" |
| 15 |
|
#include "view.h" |
| 33 |
|
|
| 34 |
|
char ourfmt[LPICFMT+1] = PICFMT; /* input picture format */ |
| 35 |
|
|
| 36 |
+ |
char StandardInput[] = "<stdin>"; |
| 37 |
|
char Command[] = "<Command>"; |
| 38 |
|
char vcolin[3][4] = {"ri", "gi", "bi"}; |
| 39 |
|
char vcolout[3][4] = {"ro", "go", "bo"}; |
| 71 |
|
int wrongformat = 0; |
| 72 |
|
int gotview; |
| 73 |
|
|
| 72 |
– |
FILE *popen(); |
| 74 |
|
|
| 75 |
|
extern char *emalloc(); |
| 76 |
|
|
| 77 |
+ |
static gethfunc tabputs; |
| 78 |
|
|
| 79 |
|
main(argc, argv) |
| 80 |
|
int argc; |
| 111 |
|
for (nfiles = 0; nfiles < MAXINP; nfiles++) { |
| 112 |
|
setcolor(input[nfiles].coef, 1.0, 1.0, 1.0); |
| 113 |
|
setcolor(input[nfiles].expos, 1.0, 1.0, 1.0); |
| 114 |
< |
copystruct(&input[nfiles].vw, &stdview); |
| 114 |
> |
input[nfiles].vw = stdview; |
| 115 |
|
input[nfiles].pa = 1.0; |
| 116 |
|
} |
| 117 |
|
nfiles = 0; |
| 125 |
|
if (argv[a][0] == '-') |
| 126 |
|
switch (argv[a][1]) { |
| 127 |
|
case '\0': |
| 128 |
< |
input[nfiles].name = "<stdin>"; |
| 128 |
> |
input[nfiles].name = StandardInput; |
| 129 |
|
input[nfiles].fp = stdin; |
| 130 |
|
break; |
| 131 |
|
case 'o': |
| 221 |
|
} |
| 222 |
|
|
| 223 |
|
|
| 224 |
< |
tabputs(s) /* put out string preceded by a tab */ |
| 225 |
< |
char *s; |
| 224 |
> |
static int |
| 225 |
> |
tabputs( /* put out string preceded by a tab */ |
| 226 |
> |
char *s, |
| 227 |
> |
void *p |
| 228 |
> |
) |
| 229 |
|
{ |
| 230 |
|
char fmt[32]; |
| 231 |
|
double d; |
| 317 |
|
|
| 318 |
|
init() /* perform final setup */ |
| 319 |
|
{ |
| 320 |
< |
double l_colin(), l_expos(), l_pixaspect(), l_ray(), l_psize(); |
| 320 |
> |
double l_colin(char *), l_expos(char *), l_pixaspect(char *), |
| 321 |
> |
l_ray(char *), l_psize(char *); |
| 322 |
|
register int i; |
| 323 |
|
/* define constants */ |
| 324 |
|
varset("PI", ':', PI); |
| 452 |
|
|
| 453 |
|
|
| 454 |
|
double |
| 455 |
< |
l_pixaspect() /* return pixel aspect ratio */ |
| 455 |
> |
l_pixaspect(char *nm) /* return pixel aspect ratio */ |
| 456 |
|
{ |
| 457 |
|
register int fn; |
| 458 |
|
|
| 557 |
|
|
| 558 |
|
|
| 559 |
|
double |
| 560 |
< |
l_psize() /* compute pixel size in steradians */ |
| 560 |
> |
l_psize(char *nm) /* compute pixel size in steradians */ |
| 561 |
|
{ |
| 562 |
|
static unsigned long ltick[MAXINP]; |
| 563 |
|
static double psize[MAXINP]; |
| 602 |
|
} |
| 603 |
|
|
| 604 |
|
|
| 605 |
< |
void |
| 606 |
< |
wputs(msg) |
| 601 |
< |
char *msg; |
| 605 |
> |
extern void |
| 606 |
> |
wputs(char *msg) |
| 607 |
|
{ |
| 608 |
|
if (!nowarn) |
| 609 |
|
eputs(msg); |
| 610 |
|
} |
| 611 |
|
|
| 612 |
|
|
| 613 |
< |
void |
| 614 |
< |
eputs(msg) |
| 610 |
< |
char *msg; |
| 613 |
> |
extern void |
| 614 |
> |
eputs(char *msg) |
| 615 |
|
{ |
| 616 |
|
fputs(msg, stderr); |
| 617 |
|
} |
| 618 |
|
|
| 619 |
|
|
| 620 |
< |
void |
| 621 |
< |
quit(code) /* exit gracefully */ |
| 618 |
< |
int code; |
| 620 |
> |
extern void |
| 621 |
> |
quit(int code) /* exit gracefully */ |
| 622 |
|
{ |
| 623 |
|
register int i; |
| 624 |
|
/* close input files */ |