--- ray/src/common/portio.c 1992/09/21 12:02:23 2.2 +++ ray/src/common/portio.c 1996/11/15 16:17:05 2.4 @@ -10,7 +10,14 @@ static char SCCSid[] = "$SunId$ LBL"; #include +#ifndef frexp +extern double frexp(); +#endif +#ifndef ldexp +extern double ldexp(); +#endif + putstr(s, fp) /* write null-terminated string to fp */ register char *s; register FILE *fp; @@ -35,7 +42,6 @@ putflt(f, fp) /* put out floating point number */ double f; FILE *fp; { - extern double frexp(); int e; putint((long)(frexp(f,&e)*0x7fffffff), 4, fp); @@ -85,9 +91,8 @@ double getflt(fp) /* get a floating point number */ FILE *fp; { - extern double ldexp(); double d; - d = (double)getint(4, fp)/0x7fffffff; + d = (getint(4, fp) + .5) / 0x7fffffff; return(ldexp(d, (int)getint(1, fp))); }