16 |
|
#include <string.h> |
17 |
|
#include <math.h> |
18 |
|
|
19 |
+ |
#include "rtio.h" |
20 |
|
#include "rterror.h" |
21 |
|
#include "resolu.h" |
22 |
|
#include "calcomp.h" |
113 |
|
for (i = 6; i < argc; i++) |
114 |
|
if (!strcmp(argv[i], "-e")) |
115 |
|
scompile(argv[++i], NULL, 0); |
116 |
< |
else if (!strcmp(argv[i], "-f")) |
117 |
< |
fcompile(argv[++i]); |
118 |
< |
else if (!strcmp(argv[i], "-s")) |
116 |
> |
else if (!strcmp(argv[i], "-f")) { |
117 |
> |
char *fpath = getpath(argv[++i], getrlibpath(), 0); |
118 |
> |
if (fpath == NULL) { |
119 |
> |
fprintf(stderr, "%s: cannot find file '%s'\n", |
120 |
> |
argv[0], argv[i]); |
121 |
> |
quit(1); |
122 |
> |
} |
123 |
> |
fcompile(fpath); |
124 |
> |
} else if (!strcmp(argv[i], "-s")) |
125 |
|
smooth = 1; |
126 |
|
else |
127 |
|
goto userror; |
130 |
|
scompile(stmp, NULL, 0); |
131 |
|
sprintf(stmp, "%s(t)=%s;", RNAME, argv[4]); |
132 |
|
scompile(stmp, NULL, 0); |
133 |
< |
nseg = atoi(argv[5]); |
133 |
> |
nseg = eval(argv[5]) + .5; |
134 |
|
if (nseg <= 0) |
135 |
|
goto userror; |
136 |
|
modname = smooth ? "Phong" : argv[1]; |