]> CyberLeo.Net >> Repos - FreeBSD/releng/9.2.git/blob - contrib/ntp/libntp/fptoms.c
- Copy stable/9 to releng/9.2 as part of the 9.2-RELEASE cycle.
[FreeBSD/releng/9.2.git] / contrib / ntp / libntp / fptoms.c
1 /*
2  * fptoms - return an asciized s_fp number in milliseconds
3  */
4 #include "ntp_fp.h"
5
6 char *
7 fptoms(
8         s_fp fpv,
9         short ndec
10         )
11 {
12         u_fp plusfp;
13         int neg;
14
15         if (fpv < 0) {
16                 plusfp = (u_fp)(-fpv);
17                 neg = 1;
18         } else {
19                 plusfp = (u_fp)fpv;
20                 neg = 0;
21         }
22
23         return dofptoa(plusfp, neg, ndec, 1);
24 }