| 134 |
|
char *expcomp = NULL; |
| 135 |
|
int i, an, rval; |
| 136 |
|
|
| 137 |
+ |
SET_DEFAULT_BINARY(); |
| 138 |
+ |
SET_FILE_BINARY(stdout); |
| 139 |
+ |
|
| 140 |
|
progname = argv[0]; |
| 141 |
|
|
| 142 |
|
for (an = 1; an < argc && argv[an][0] == '-'; an++) { |
| 394 |
|
{ |
| 395 |
|
char linebuf[256]; |
| 396 |
|
char *err; |
| 397 |
< |
register int i; |
| 397 |
> |
int i; |
| 398 |
|
|
| 399 |
|
if (fp != NULL) { |
| 400 |
|
do /* get new view */ |
| 431 |
|
static void |
| 432 |
|
compavgview(void) /* compute average view */ |
| 433 |
|
{ |
| 434 |
< |
register int i; |
| 434 |
> |
int i; |
| 435 |
|
double f; |
| 436 |
|
|
| 437 |
|
if (nvavg < 2) |
| 499 |
|
syserror(progname); |
| 500 |
|
if ((zfd = open(zspec, O_RDONLY)) == -1) { |
| 501 |
|
double zvalue; |
| 502 |
< |
register int x; |
| 502 |
> |
int x; |
| 503 |
|
if (!isflt(zspec) || (zvalue = atof(zspec)) <= 0.0) |
| 504 |
|
syserror(zspec); |
| 505 |
|
for (x = scanlen(&tresolu); x-- > 0; ) |
| 558 |
|
|
| 559 |
|
static int |
| 560 |
|
pixform( /* compute view1 to view2 matrix */ |
| 561 |
< |
register MAT4 xfmat, |
| 562 |
< |
register VIEW *vw1, |
| 563 |
< |
register VIEW *vw2 |
| 561 |
> |
MAT4 xfmat, |
| 562 |
> |
VIEW *vw1, |
| 563 |
> |
VIEW *vw2 |
| 564 |
|
) |
| 565 |
|
{ |
| 566 |
< |
double m4t[4][4]; |
| 566 |
> |
MAT4 m4t; |
| 567 |
|
|
| 568 |
|
if ((vw1->type != VT_PER) & (vw1->type != VT_PAR)) |
| 569 |
|
return(0); |
| 612 |
|
FVECT pos; |
| 613 |
|
struct position lastx, newpos; |
| 614 |
|
double wt; |
| 615 |
< |
register int x; |
| 615 |
> |
int x; |
| 616 |
|
|
| 617 |
|
lastx.z = 0; |
| 618 |
|
for (x = xl->max; x >= xl->min; x--) { |
| 650 |
|
int l1, l2, c1, c2; /* side lengths and counters */ |
| 651 |
|
int p1isy; /* p0p1 along y? */ |
| 652 |
|
int x1, y1; /* p1 position */ |
| 653 |
< |
register int x, y; /* final position */ |
| 653 |
> |
int x, y; /* final position */ |
| 654 |
|
|
| 655 |
|
/* compute vector p0p1 */ |
| 656 |
|
if (fillo&F_FORE && ABS(p1->z-p0->z) <= zt) { |
| 717 |
|
|
| 718 |
|
static double |
| 719 |
|
movepixel( /* reposition image point */ |
| 720 |
< |
register FVECT pos |
| 720 |
> |
FVECT pos |
| 721 |
|
) |
| 722 |
|
{ |
| 723 |
|
FVECT pt, tdir, odir; |
| 753 |
|
if (viewray(pt, tdir, &theirview, pos[0], pos[1]) < -FTINY) |
| 754 |
|
return(0); |
| 755 |
|
if ((!normdist) & (theirview.type == VT_PER)) /* adjust */ |
| 756 |
< |
pos[2] *= sqrt(1. + pos[0]*pos[0]*theirview.hn2 |
| 754 |
< |
+ pos[1]*pos[1]*theirview.vn2); |
| 756 |
> |
pos[2] /= DOT(theirview.vdir, tdir); |
| 757 |
|
pt[0] += tdir[0]*pos[2]; |
| 758 |
|
pt[1] += tdir[1]*pos[2]; |
| 759 |
|
pt[2] += tdir[2]*pos[2]; |
| 760 |
< |
viewloc(pos, &ourview, pt); |
| 759 |
< |
if (pos[2] <= 0) |
| 760 |
> |
if (viewloc(pos, &ourview, pt) <= 0) |
| 761 |
|
return(0); |
| 762 |
|
} |
| 763 |
|
if ((pos[0] < 0) | (pos[0] >= 1-FTINY) | (pos[1] < 0) | (pos[1] >= 1-FTINY)) |
| 781 |
|
|
| 782 |
|
static int |
| 783 |
|
getperim( /* compute overlapping image area */ |
| 784 |
< |
register struct bound *xl, |
| 784 |
> |
struct bound *xl, |
| 785 |
|
struct bound *yl, |
| 786 |
|
float *zline, |
| 787 |
|
int zfd |
| 789 |
|
{ |
| 790 |
|
int step; |
| 791 |
|
FVECT pos; |
| 792 |
< |
register int x, y; |
| 792 |
> |
int x, y; |
| 793 |
|
/* set up step size */ |
| 794 |
|
if (scanlen(&tresolu) < numscans(&tresolu)) |
| 795 |
|
step = scanlen(&tresolu)/NSTEPS; |
| 873 |
|
{ |
| 874 |
|
int *yback, xback; |
| 875 |
|
int y; |
| 876 |
< |
register int x, i; |
| 876 |
> |
int x, i; |
| 877 |
|
/* get back buffer */ |
| 878 |
|
yback = (int *)malloc(hresolu*sizeof(int)); |
| 879 |
|
if (yback == NULL) |
| 980 |
|
fillfunc_t *fill |
| 981 |
|
) |
| 982 |
|
{ |
| 983 |
< |
register int x, y; |
| 983 |
> |
int x, y; |
| 984 |
|
|
| 985 |
|
for (y = 0; y < vresolu; y++) |
| 986 |
|
for (x = 0; x < hresolu; x++) |
| 994 |
|
static int |
| 995 |
|
clipaft(void) /* perform aft clipping as indicated */ |
| 996 |
|
{ |
| 997 |
< |
register int x, y; |
| 997 |
> |
int x, y; |
| 998 |
|
int adjtest = (ourview.type == VT_PER) & zisnorm; |
| 999 |
|
double tstdist; |
| 1000 |
|
double yzn2, vx; |
| 1033 |
|
{ |
| 1034 |
|
COLOR cval; |
| 1035 |
|
double d; |
| 1036 |
< |
register int i; |
| 1036 |
> |
int i; |
| 1037 |
|
|
| 1038 |
|
if (!blurring) |
| 1039 |
|
return(0); |
| 1073 |
|
writepicture(void) /* write out picture (alters buffer) */ |
| 1074 |
|
{ |
| 1075 |
|
int y; |
| 1076 |
< |
register int x; |
| 1076 |
> |
int x; |
| 1077 |
|
double d; |
| 1078 |
|
|
| 1079 |
|
fprtresolu(hresolu, vresolu, stdout); |
| 1116 |
|
for (y = vresolu-1; y >= 0; y--) { |
| 1117 |
|
if (donorm) { |
| 1118 |
|
double vx, yzn2, d; |
| 1119 |
< |
register int x; |
| 1119 |
> |
int x; |
| 1120 |
|
yzn2 = (y+.5)/vresolu + ourview.voff - .5; |
| 1121 |
|
yzn2 = 1. + yzn2*yzn2*ourview.vn2; |
| 1122 |
|
for (x = 0; x < hresolu; x++) { |
| 1160 |
|
char combuf[512]; |
| 1161 |
|
char *argv[64]; |
| 1162 |
|
int rval; |
| 1163 |
< |
register char **wp, *cp; |
| 1163 |
> |
char **wp, *cp; |
| 1164 |
|
|
| 1165 |
|
if (PDesc.running) { |
| 1166 |
|
fprintf(stderr, "%s: too many calculations\n", progname); |
| 1224 |
|
{ |
| 1225 |
|
FVECT orig, dir; |
| 1226 |
|
float fbuf[6*(PACKSIZ+1)]; |
| 1227 |
< |
register float *fbp; |
| 1228 |
< |
register int i; |
| 1227 |
> |
float *fbp; |
| 1228 |
> |
int i; |
| 1229 |
|
double vx, vy; |
| 1230 |
|
|
| 1231 |
|
if (queuesiz == 0) |