143 |
|
#define check(c,n) if ((av[0][c]&&av[0][c]!=' ') || n>=ac) return(-1) |
144 |
|
extern double atof(); |
145 |
|
|
146 |
< |
if (av[0][0] != '-' || av[0][1] != 'v') |
146 |
> |
if (ac <= 0 || av[0][0] != '-' || av[0][1] != 'v') |
147 |
|
return(-1); |
148 |
|
switch (av[0][2]) { |
149 |
|
case 't': /* type */ |
205 |
|
|
206 |
|
while (*s == ' ') |
207 |
|
s++; |
208 |
< |
do { |
208 |
> |
while (*s) { |
209 |
|
ac = 0; |
210 |
|
do { |
211 |
|
av[ac++] = s; |
218 |
|
if (na+1 < ac) |
219 |
|
s = av[na+1]; |
220 |
|
nvopts++; |
221 |
< |
} |
222 |
< |
} while (*s); |
221 |
> |
} else if (ac > 1) |
222 |
> |
s = av[1]; |
223 |
> |
} |
224 |
|
return(nvopts); |
225 |
|
} |
226 |
|
|
234 |
|
fprintf(fp, " -vd %.6g %.6g %.6g", vp->vdir[0], vp->vdir[1], vp->vdir[2]); |
235 |
|
fprintf(fp, " -vu %.6g %.6g %.6g", vp->vup[0], vp->vup[1], vp->vup[2]); |
236 |
|
fprintf(fp, " -vh %.6g -vv %.6g", vp->horiz, vp->vert); |
237 |
< |
fprintf(fp, " -vs %d -vl %d", vp->hoff, vp->voff); |
237 |
> |
fprintf(fp, " -vs %.6g -vl %.6g", vp->hoff, vp->voff); |
238 |
|
} |
239 |
|
|
240 |
|
|