107 |
|
char *myrtopts[] = { "-h-", "-x", "1", "-y", "0", |
108 |
|
"-dt", "0", "-as", "0", "-aa", "0", NULL }; |
109 |
|
|
110 |
< |
#define RTCOEFF "-o~~~~TmWdp" /* compute coefficients only */ |
111 |
< |
#define RTCONTRIB "-o~~~~TmVdp" /* compute ray contributions */ |
110 |
> |
#define RTCOEFF "-o~~~TmWdp" /* compute coefficients only */ |
111 |
> |
#define RTCONTRIB "-o~~~TmVdp" /* compute ray contributions */ |
112 |
|
|
113 |
|
struct rtproc rt0; /* head of rtrace process list */ |
114 |
|
|
1106 |
|
continue; |
1107 |
|
if (rt->buf == NULL) { |
1108 |
|
rt->bsiz = treebufsiz; |
1109 |
< |
rt->buf = (char *)malloc(treebufsiz); |
1109 |
> |
rt->buf = (char *)malloc(rt->bsiz); |
1110 |
|
} else if (rt->nbr + BUFSIZ > rt->bsiz) { |
1111 |
|
if (rt->bsiz + BUFSIZ <= treebufsiz) |
1112 |
|
rt->bsiz = treebufsiz; |
1120 |
|
if (nr <= 0) |
1121 |
|
error(USER, "rtrace process died"); |
1122 |
|
rt->nbr += nr; /* advance & check */ |
1123 |
< |
if (rt->nbr >= 8 && !memcmp(rt->buf+rt->nbr-8, |
1124 |
< |
"~\t~\t~\t~\t", 8)) { |
1125 |
< |
rt->nbr -= 8; /* elide terminator */ |
1123 |
> |
if (rt->nbr >= 6 && !memcmp(rt->buf+rt->nbr-6, |
1124 |
> |
"~\t~\t~\t", 6)) { |
1125 |
> |
rt->nbr -= 6; /* elide terminator */ |
1126 |
|
queue_raytree(rt); |
1127 |
|
rtfree = rt; /* ready for next ray */ |
1128 |
|
} |
1164 |
|
lastray+1 < lastray) { |
1165 |
|
while (wait_rproc() != NULL) |
1166 |
|
process_queue(); |
1167 |
< |
if (lastray+1 < lastray) |
1168 |
< |
lastdone = lastray = 0; |
1167 |
> |
lastdone = lastray = 0; |
1168 |
|
} |
1169 |
|
rtp = get_rproc(); /* get avail. rtrace process */ |
1170 |
|
rtp->raynum = ++lastray; /* assign ray */ |