NetBSD/dist/ntp/libntp/fptoms.c

27 lines
361 B
C
Raw Normal View History

/* $NetBSD: fptoms.c,v 1.2 2003/12/04 16:23:36 drochner Exp $ */
2000-03-29 16:38:44 +04:00
/*
* fptoms - return an asciized s_fp number in milliseconds
*/
#include "ntp_fp.h"
char *
fptoms(
s_fp fpv,
2003-12-04 19:05:14 +03:00
short ndec
2000-03-29 16:38:44 +04: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, 1);
}