summaryrefslogtreecommitdiffstats
path: root/contrib/ntp/libntp/mfptoa.c
blob: 8257b6c2a6bc079f04ba8a3df7c66b8050b5940b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/*
 * mfptoa - Return an asciized representation of a signed long fp number
 */
#include "ntp_fp.h"
#include "ntp_stdlib.h"

char *
mfptoa(
	u_long fpi,
	u_long fpf,
	int ndec
	)
{
	int isneg;

	if (M_ISNEG(fpi, fpf)) {
		isneg = 1;
		M_NEG(fpi, fpf);
	} else
	    isneg = 0;

	return dolfptoa(fpi, fpf, isneg, ndec, 0);
}
OpenPOWER on IntegriCloud