summaryrefslogtreecommitdiffstats
path: root/usr.sbin/xntpd/lib/fptoa.c
blob: d245e9fa6917e0d71eb64b484c3aceb92834aec6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/* fptoa.c,v 3.1 1993/07/06 01:08:16 jbj Exp
 * fptoa - return an asciized representation of an s_fp number
 */
#include "ntp_fp.h"
#include "ntp_stdlib.h"

char *
fptoa(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, 0);
}
OpenPOWER on IntegriCloud