freebsd-dev/contrib/ntp/libntp/fptoms.c
2004-07-20 15:01:56 +00:00

25 lines
295 B
C

/*
* fptoms - return an asciized s_fp number in milliseconds
*/
#include "ntp_fp.h"
char *
fptoms(
s_fp fpv,
short ndec
)
{
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, 1);
}