| 8 |
|
*/ |
| 9 |
|
|
| 10 |
|
#include "standard.h" |
| 11 |
< |
|
| 11 |
> |
#include "platform.h" |
| 12 |
|
#include "color.h" |
| 13 |
– |
|
| 13 |
|
#include "calcomp.h" |
| 15 |
– |
|
| 14 |
|
#include "view.h" |
| 15 |
|
|
| 16 |
|
#define MAXINP 32 /* maximum number of input files */ |
| 81 |
|
int original; |
| 82 |
|
double f; |
| 83 |
|
int a, i; |
| 84 |
< |
#ifdef MSDOS |
| 85 |
< |
extern int _fmode; |
| 86 |
< |
_fmode = O_BINARY; |
| 89 |
< |
setmode(fileno(stdin), O_BINARY); |
| 90 |
< |
setmode(fileno(stdout), O_BINARY); |
| 91 |
< |
#endif |
| 84 |
> |
SET_DEFAULT_BINARY(); |
| 85 |
> |
SET_FILE_BINARY(stdin); |
| 86 |
> |
SET_FILE_BINARY(stdout); |
| 87 |
|
progname = argv[0]; |
| 88 |
|
/* scan options */ |
| 89 |
|
for (a = 1; a < argc; a++) { |
| 109 |
|
for (nfiles = 0; nfiles < MAXINP; nfiles++) { |
| 110 |
|
setcolor(input[nfiles].coef, 1.0, 1.0, 1.0); |
| 111 |
|
setcolor(input[nfiles].expos, 1.0, 1.0, 1.0); |
| 112 |
< |
copystruct(&input[nfiles].vw, &stdview); |
| 112 |
> |
input[nfiles].vw = stdview; |
| 113 |
|
input[nfiles].pa = 1.0; |
| 114 |
|
} |
| 115 |
|
nfiles = 0; |
| 312 |
|
|
| 313 |
|
init() /* perform final setup */ |
| 314 |
|
{ |
| 315 |
< |
double l_colin(), l_expos(), l_pixaspect(), l_ray(), l_psize(); |
| 315 |
> |
double l_colin(char *), l_expos(char *), l_pixaspect(char *), |
| 316 |
> |
l_ray(char *), l_psize(char *); |
| 317 |
|
register int i; |
| 318 |
|
/* define constants */ |
| 319 |
|
varset("PI", ':', PI); |
| 447 |
|
|
| 448 |
|
|
| 449 |
|
double |
| 450 |
< |
l_pixaspect() /* return pixel aspect ratio */ |
| 450 |
> |
l_pixaspect(char *nm) /* return pixel aspect ratio */ |
| 451 |
|
{ |
| 452 |
|
register int fn; |
| 453 |
|
|
| 519 |
|
static unsigned long ltick[MAXINP]; |
| 520 |
|
static FVECT lorg[MAXINP], ldir[MAXINP]; |
| 521 |
|
static double ldist[MAXINP]; |
| 522 |
< |
FLOAT loc[2]; |
| 522 |
> |
RREAL loc[2]; |
| 523 |
|
int fn; |
| 524 |
|
register int i; |
| 525 |
|
|
| 552 |
|
|
| 553 |
|
|
| 554 |
|
double |
| 555 |
< |
l_psize() /* compute pixel size in steradians */ |
| 555 |
> |
l_psize(char *nm) /* compute pixel size in steradians */ |
| 556 |
|
{ |
| 557 |
|
static unsigned long ltick[MAXINP]; |
| 558 |
|
static double psize[MAXINP]; |
| 559 |
|
FVECT dir0, org, dirx, diry; |
| 560 |
< |
FLOAT locx[2], locy[2]; |
| 560 |
> |
RREAL locx[2], locy[2]; |
| 561 |
|
double d; |
| 562 |
|
int fn; |
| 563 |
|
register int i; |