69 |
|
{ |
70 |
|
if (!str) return false; |
71 |
|
int len = strlen(str); |
72 |
< |
while (len && str[len-1] == '\n') |
72 |
> |
while (len && (str[len-1] == '\n') | (str[len-1] == '\r')) |
73 |
|
--len; // don't copy EOL(s) |
74 |
|
if (!len) |
75 |
|
return false; |
106 |
|
|
107 |
|
// Append program line to header |
108 |
|
bool |
109 |
< |
RadSimulManager::AddHeader(int ac, const char *av[]) |
109 |
> |
RadSimulManager::AddHeader(int ac, char *av[]) |
110 |
|
{ |
111 |
|
if ((ac <= 0) | !av) return false; |
112 |
|
int len = 0; |
341 |
|
while (n-- > 0) { // queue each ray |
342 |
|
VCOPY(res.rorg, orig_direc[0]); |
343 |
|
VCOPY(res.rdir, orig_direc[1]); |
344 |
+ |
res.rmax = .0; |
345 |
|
orig_direc += 2; |
346 |
|
rayorigin(&res, PRIMARY, NULL, NULL); |
347 |
|
res.rno = rID0 ? (lastRayID = rID0++) : ++lastRayID; |