| 9 |
|
|
| 10 |
|
#include "platform.h" |
| 11 |
|
#include "standard.h" |
| 12 |
< |
#include "rtprocess.h" |
| 12 |
> |
#include "paths.h" |
| 13 |
|
#include "color.h" |
| 14 |
|
#include "calcomp.h" |
| 15 |
|
#include "view.h" |
| 16 |
|
|
| 17 |
< |
#define MAXINP 512 /* maximum number of input files */ |
| 18 |
< |
#define WINSIZ 64 /* scanline window size */ |
| 17 |
> |
#define MAXINP 1024 /* maximum number of input files */ |
| 18 |
> |
#define WINSIZ 127 /* scanline window size */ |
| 19 |
|
#define MIDSCN ((WINSIZ-1)/2+1) |
| 20 |
|
|
| 21 |
|
struct { |
| 96 |
|
int original; |
| 97 |
|
double f; |
| 98 |
|
int a; |
| 99 |
+ |
|
| 100 |
|
SET_DEFAULT_BINARY(); |
| 101 |
|
SET_FILE_BINARY(stdin); |
| 102 |
|
SET_FILE_BINARY(stdout); |
| 103 |
|
progname = argv[0]; |
| 104 |
+ |
esupport |= E_VARIABLE|E_FUNCTION|E_RCONST; |
| 105 |
+ |
esupport &= ~(E_OUTCHAN|E_INCHAN); |
| 106 |
|
/* scan options */ |
| 107 |
|
for (a = 1; a < argc; a++) { |
| 108 |
|
if (argv[a][0] == '-') |
| 237 |
|
eputs("Usage: "); |
| 238 |
|
eputs(argv[0]); |
| 239 |
|
eputs( |
| 240 |
< |
" [-w][-h][-x xr][-y yr][-e expr][-f file] [ [-o][-s f][-c r g b] pic ..]\n"); |
| 240 |
> |
" [-w][-h][-x xr][-y yr][-e expr][-f file] [ [-o][-s f][-c r g b] hdr ..]\n"); |
| 241 |
|
quit(1); |
| 242 |
|
return 1; /* pro forma return */ |
| 243 |
|
} |
| 285 |
|
static void |
| 286 |
|
checkfile(void) /* ready a file */ |
| 287 |
|
{ |
| 288 |
< |
register int i; |
| 288 |
> |
int i; |
| 289 |
|
/* process header */ |
| 290 |
|
gotview = 0; |
| 291 |
|
if (echoheader) { |
| 348 |
|
static void |
| 349 |
|
init(void) /* perform final setup */ |
| 350 |
|
{ |
| 351 |
< |
register int i; |
| 351 |
> |
int i; |
| 352 |
|
/* define constants */ |
| 353 |
|
varset("PI", ':', PI); |
| 354 |
|
varset(vnfiles, ':', (double)nfiles); |
| 380 |
|
EPNODE *coldef[3], *brtdef; |
| 381 |
|
COLOR *scanout; |
| 382 |
|
double d; |
| 383 |
< |
register int i, j; |
| 383 |
> |
int i, j; |
| 384 |
|
/* check defined variables */ |
| 385 |
|
for (j = 0; j < 3; j++) { |
| 386 |
|
if (vardefined(vcolout[j])) |
| 437 |
|
advance(void) /* read in data for next scanline */ |
| 438 |
|
{ |
| 439 |
|
int ytarget; |
| 440 |
< |
register COLOR *st; |
| 441 |
< |
register int i, j; |
| 440 |
> |
COLOR *st; |
| 441 |
> |
int i, j; |
| 442 |
|
|
| 443 |
|
for (ytarget = (ypos+.5)*ymax/yres; yscan > ytarget; yscan--) |
| 444 |
|
for (i = 0; i < nfiles; i++) { |
| 507 |
|
|
| 508 |
|
static double |
| 509 |
|
l_colin( /* return color value for picture */ |
| 510 |
< |
register char *nam |
| 510 |
> |
char *nam |
| 511 |
|
) |
| 512 |
|
{ |
| 513 |
|
int fn; |
| 514 |
< |
register int n, xoff, yoff; |
| 514 |
> |
int n, xoff, yoff; |
| 515 |
|
double d; |
| 516 |
|
|
| 517 |
|
d = argument(1); |
| 566 |
|
|
| 567 |
|
static double |
| 568 |
|
l_ray( /* return ray origin or direction */ |
| 569 |
< |
register char *nam |
| 569 |
> |
char *nam |
| 570 |
|
) |
| 571 |
|
{ |
| 572 |
|
static unsigned long ltick[MAXINP]; |
| 575 |
|
RREAL loc[2]; |
| 576 |
|
double d; |
| 577 |
|
int fn; |
| 578 |
< |
register int i; |
| 578 |
> |
int i; |
| 579 |
|
|
| 580 |
|
d = argument(1); |
| 581 |
|
if (d <= -0.5 || d >= nfiles+0.5) { |
| 618 |
|
RREAL locx[2], locy[2]; |
| 619 |
|
double d; |
| 620 |
|
int fn; |
| 621 |
< |
register int i; |
| 621 |
> |
int i; |
| 622 |
|
|
| 623 |
|
d = argument(1); |
| 624 |
|
if (d <= -0.5 || d >= nfiles+0.5) { |
| 675 |
|
extern void |
| 676 |
|
quit(int code) /* exit gracefully */ |
| 677 |
|
{ |
| 678 |
< |
register int i; |
| 678 |
> |
int i; |
| 679 |
|
/* close input files */ |
| 680 |
|
for (i = 0; i < nfiles; i++) |
| 681 |
|
if (input[i].name == Command) |