14 |
|
|
15 |
|
#include "platform.h" |
16 |
|
#include "rtio.h" |
17 |
< |
#include "rtprocess.h" |
17 |
> |
#include "paths.h" |
18 |
|
#include "fvect.h" |
19 |
|
|
20 |
|
#ifdef M_PI |
23 |
|
#define PI 3.14159265358979323846 |
24 |
|
#endif |
25 |
|
|
26 |
– |
#define FEQ(a,b) ((a)-(b) <= 1e-7 && (b)-(a) <= 1e-7) |
27 |
– |
|
26 |
|
#define MAXVERT 6 /* maximum number of vertices for markers */ |
27 |
|
#define MAXMARK 128 /* maximum number of markers */ |
28 |
|
|
183 |
|
exit(1); |
184 |
|
} |
185 |
|
convert(buf, pin); |
186 |
< |
pclose(pin); |
186 |
> |
if (pclose(pin) != 0) |
187 |
> |
fprintf(stderr, |
188 |
> |
"%s: (%s): warning - bad status from \"%s\"\n", |
189 |
> |
progname, fname, buf); |
190 |
|
} else |
191 |
|
printf("\n%s\n", buf); |
192 |
|
} |
402 |
|
} |
403 |
|
n = 0; |
404 |
|
theta = atan2(yp[2], zp[2]); |
405 |
< |
if (!FEQ(theta,0.0)) { |
405 |
> |
if (!FABSEQ(theta,0.0)) { |
406 |
|
sprintf(xf, " -rx %f", theta*(180./PI)); |
407 |
|
while (*xf) ++xf; |
408 |
|
n += 2; |
409 |
|
} |
410 |
< |
theta = asin(-xp[2]); |
411 |
< |
if (!FEQ(theta,0.0)) { |
410 |
> |
theta = Asin(-xp[2]); |
411 |
> |
if (!FABSEQ(theta,0.0)) { |
412 |
|
sprintf(xf, " -ry %f", theta*(180./PI)); |
413 |
|
while (*xf) ++xf; |
414 |
|
n += 2; |
415 |
|
} |
416 |
|
theta = atan2(xp[1], xp[0]); |
417 |
< |
if (!FEQ(theta,0.0)) { |
417 |
> |
if (!FABSEQ(theta,0.0)) { |
418 |
|
sprintf(xf, " -rz %f", theta*(180./PI)); |
419 |
|
/* while (*xf) ++xf; */ |
420 |
|
n += 2; |