9 |
|
*/ |
10 |
|
|
11 |
|
#include "ray.h" |
12 |
+ |
#include "platform.h" |
13 |
|
#include "source.h" |
14 |
|
#include "view.h" |
15 |
|
#include "random.h" |
78 |
|
int ec; |
79 |
|
{ |
80 |
|
if (ray_pnprocs > 0) /* close children if any */ |
81 |
< |
ray_pclose(0); |
81 |
> |
ray_pclose(0); |
82 |
> |
else if (ray_pnprocs < 0) |
83 |
> |
_exit(ec); /* avoid flush in child */ |
84 |
|
exit(ec); |
85 |
|
} |
86 |
|
|
240 |
|
cp = fskip(cp); |
241 |
|
if (cp == NULL) |
242 |
|
break; |
243 |
< |
if (ntp[1] > 1 && sarr[ntp[1]+1] <= sarr[ntp[1]]) { |
243 |
> |
if (ntp[1] > 1 && sarr[ntp[1]+1] <= sarr[ntp[1]]+FTINY) { |
244 |
|
sprintf(errmsg, |
245 |
|
"Phi values not monotinically increasing in sensor file '%s'", |
246 |
|
sfile); |
306 |
|
else if (fabs(sarr[1]) > FTINY) |
307 |
|
sprintf(errmsg, "minimum phi must be 0 in sensor file '%s'", |
308 |
|
sfile); |
309 |
< |
else if (sarr[ntp[1]] <= FTINY) |
309 |
> |
else if (sarr[ntp[1]] < 270.-FTINY) |
310 |
|
sprintf(errmsg, |
311 |
< |
"maximum phi must be positive in sensor file '%s'", |
311 |
> |
"maximum phi must be 270 or greater in sensor file '%s'", |
312 |
> |
sfile); |
313 |
> |
else if (sarr[ntp[1]] >= 360.-FTINY) |
314 |
> |
sprintf(errmsg, |
315 |
> |
"maximum phi must be less than 360 in sensor file '%s'", |
316 |
|
sfile); |
317 |
|
if (errmsg[0]) |
318 |
|
error(USER, errmsg); |