53 |
|
|
54 |
|
static RAY thisray; /* for our convenience */ |
55 |
|
|
56 |
< |
extern int oputo(), oputd(), oputv(), oputl(), |
56 |
> |
static int oputo(), oputd(), oputv(), oputl(), |
57 |
|
oputp(), oputn(), oputs(), oputw(), oputm(); |
58 |
|
|
59 |
|
static int (*ray_out[10])(), (*every_out[10])(); |
60 |
|
|
61 |
< |
extern int puta(), putf(), putd(); |
61 |
> |
static int puta(), putf(), putd(); |
62 |
|
|
63 |
|
static int (*putreal)(); |
64 |
|
|
226 |
|
return(-1); |
227 |
|
break; |
228 |
|
case 'f': /* binary float */ |
229 |
< |
if (fread(vf, sizeof(float), 3, fp) != 3) |
229 |
> |
if (fread((char *)vf, sizeof(float), 3, fp) != 3) |
230 |
|
return(-1); |
231 |
|
vec[0] = vf[0]; vec[1] = vf[1]; vec[2] = vf[2]; |
232 |
|
break; |
233 |
|
case 'd': /* binary double */ |
234 |
< |
if (fread(vec, sizeof(double), 3, fp) != 3) |
234 |
> |
if (fread((char *)vec, sizeof(double), 3, fp) != 3) |
235 |
|
return(-1); |
236 |
|
break; |
237 |
|
} |
299 |
|
oputl(r) /* print length */ |
300 |
|
register RAY *r; |
301 |
|
{ |
302 |
< |
if (r->rot < FHUGE) |
303 |
< |
(*putreal)(r->rot); |
304 |
< |
else |
305 |
< |
(*putreal)(0.0); |
302 |
> |
(*putreal)(r->rt); |
303 |
|
} |
304 |
|
|
305 |
|
|
379 |
|
putd(v) /* print binary double */ |
380 |
|
double v; |
381 |
|
{ |
382 |
< |
fwrite(&v, sizeof(v), 1, stdout); |
382 |
> |
fwrite((char *)&v, sizeof(v), 1, stdout); |
383 |
|
} |
384 |
|
|
385 |
|
|
389 |
|
{ |
390 |
|
float f = v; |
391 |
|
|
392 |
< |
fwrite(&f, sizeof(f), 1, stdout); |
392 |
> |
fwrite((char *)&f, sizeof(f), 1, stdout); |
393 |
|
} |