freebsd-skq/contrib/ntp/libntp/fptoa.c

26 lines
322 B
C
Raw Normal View History

1999-12-09 13:01:21 +00:00
/*
* fptoa - return an asciized representation of an s_fp number
*/
#include "ntp_fp.h"
#include "ntp_stdlib.h"
char *
fptoa(
s_fp fpv,
2004-07-20 15:01:56 +00:00
short ndec
1999-12-09 13:01:21 +00:00
)
{
u_fp plusfp;
int neg;
if (fpv < 0) {
plusfp = (u_fp)(-fpv);
neg = 1;
} else {
plusfp = (u_fp)fpv;
neg = 0;
}
return dofptoa(plusfp, neg, ndec, 0);
}