1 |
< |
/* Copyright (c) 1991 Regents of the University of California */ |
1 |
> |
/* Copyright (c) 1995 Regents of the University of California */ |
2 |
|
|
3 |
|
#ifndef lint |
4 |
|
static char SCCSid[] = "$SunId$ LBL"; |
26 |
|
#define S_ALL 3 /* select all */ |
27 |
|
|
28 |
|
/* rtrace command and defaults */ |
29 |
< |
char *rtargv[64] = { "rtrace", "-dj", ".25", "-dr", "3", "-di+", |
29 |
> |
char *rtargv[64] = { "rtrace", "-dj", ".25", "-dr", "3", "-dv-", |
30 |
|
"-ab", "2", "-ad", "256", "-as", "128", "-aa", ".15", }; |
31 |
|
int rtargc = 14; |
32 |
|
/* overriding rtrace options */ |
33 |
< |
char *myrtopts[] = { "-I-", "-i-", "-ov", "-h-", "-fff", NULL }; |
33 |
> |
char *myrtopts[] = { "-I-", "-i-", "-ov", "-h-", "-fff", "-y", "0", NULL }; |
34 |
|
|
35 |
|
struct rtproc rt; /* our rtrace process */ |
36 |
|
|
76 |
|
gargv = argv; |
77 |
|
/* set up rtrace command */ |
78 |
|
for (i = 1; i < argc; i++) { |
79 |
< |
if (argv[i][0] == '<' && !argv[i][1]) |
79 |
> |
if (argv[i][0] == '<' && argv[i][1] == '\0') |
80 |
|
break; |
81 |
|
rtargv[rtargc++] = argv[i]; |
82 |
|
if (argv[i][0] == '-' && argv[i][1] == 'w') |
83 |
< |
warnings = !warnings; |
83 |
> |
switch (argv[i][2]) { |
84 |
> |
case '\0': |
85 |
> |
warnings = !warnings; |
86 |
> |
break; |
87 |
> |
case '+': |
88 |
> |
case 'T': case 't': |
89 |
> |
case 'Y': case 'y': |
90 |
> |
case '1': |
91 |
> |
warnings = 1; |
92 |
> |
break; |
93 |
> |
case '-': |
94 |
> |
case 'F': case 'f': |
95 |
> |
case 'N': case 'n': |
96 |
> |
case '0': |
97 |
> |
warnings = 0; |
98 |
> |
break; |
99 |
> |
} |
100 |
|
} |
101 |
|
gargc = i; |
102 |
|
rtargc--; |
180 |
|
error(SYSTEM, "out of memory in init"); |
181 |
|
rt.nrays = 0; |
182 |
|
/* set up urand */ |
183 |
< |
initurand(2048); |
183 |
> |
initurand(16384); |
184 |
|
} |
185 |
|
|
186 |
|
|
263 |
|
case 'm': /* material name */ |
264 |
|
if (*++cp != '=') |
265 |
|
break; |
266 |
< |
if (!*++cp) |
266 |
> |
if (!*++cp || isspace(*cp)) |
267 |
|
break; |
268 |
|
atos(thisillum.matname, MAXSTR, cp); |
269 |
|
cp = sskip(cp); |
275 |
|
case 'f': /* data file name */ |
276 |
|
if (*++cp != '=') |
277 |
|
break; |
278 |
< |
if (!*++cp) { |
278 |
> |
if (!*++cp || isspace(*cp)) { |
279 |
|
strcpy(thisillum.datafile,thisillum.matname); |
280 |
|
thisillum.dfnum = 0; |
281 |
|
thisillum.flags &= ~IL_DATCLB; |
361 |
|
case 'o': /* output file */ |
362 |
|
if (*++cp != '=') |
363 |
|
break; |
364 |
< |
if (!*++cp) |
364 |
> |
if (!*++cp || isspace(*cp)) |
365 |
|
break; |
366 |
|
atos(buf, sizeof(buf), cp); |
367 |
|
cp = sskip(cp); |