| 15 |
|
|
| 16 |
|
#define MAXDEPTH 32 /* ridiculous ray tree depth */ |
| 17 |
|
|
| 18 |
< |
#ifdef SMLFLT |
| 19 |
< |
#define sscanvec(s,v) (sscanf(s,"%f %f %f",v,v+1,v+2)==3) |
| 20 |
< |
#else |
| 21 |
< |
#define sscanvec(s,v) (sscanf(s,"%lf %lf %lf",v,v+1,v+2)==3) |
| 22 |
< |
#endif |
| 18 |
> |
#define sscanvec(s,v) (sscanf(s,FVFORMAT,v,v+1,v+2)==3) |
| 19 |
|
|
| 20 |
|
char rtcom[64] = "rtrace -h- -otp -fa -x 1"; |
| 21 |
|
char xicom[] = "ximage -c 256"; |
| 23 |
|
VIEW ourview = STDVIEW; /* view for picture */ |
| 24 |
|
RESOLU ourres; /* picture resolution */ |
| 25 |
|
|
| 30 |
– |
char *progname; /* program name */ |
| 31 |
– |
|
| 26 |
|
char *picture; /* picture name */ |
| 27 |
|
|
| 28 |
|
FILE *pin; /* input stream */ |
| 56 |
|
int i; |
| 57 |
|
char combuf[PATH_MAX]; |
| 58 |
|
|
| 59 |
< |
progname = argv[0]; |
| 59 |
> |
fixargv0(argv[0]); /* sets global progname */ |
| 60 |
|
for (i = 1; i < argc-2; i++) |
| 61 |
|
if (!strcmp(argv[i], "-s")) |
| 62 |
|
slow++; |