freebsd-dev/contrib/ntp/libntp/fptoms.c

25 lines
293 B
C
Raw Normal View History

1999-12-09 13:01:21 +00:00
/*
* fptoms - return an asciized s_fp number in milliseconds
*/
#include "ntp_fp.h"
char *
fptoms(
s_fp fpv,
int 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);
}