diff options
Diffstat (limited to 'usr.sbin/xntpd/lib/fptoms.c')
-rw-r--r-- | usr.sbin/xntpd/lib/fptoms.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/usr.sbin/xntpd/lib/fptoms.c b/usr.sbin/xntpd/lib/fptoms.c new file mode 100644 index 0000000..fb850c5 --- /dev/null +++ b/usr.sbin/xntpd/lib/fptoms.c @@ -0,0 +1,23 @@ +/* fptoms.c,v 3.1 1993/07/06 01:08:17 jbj Exp + * fptoms - return an asciized s_fp number in milliseconds + */ +#include "ntp_fp.h" + +char * +fptoms(fpv, ndec) + 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); +} |