summaryrefslogtreecommitdiffstats
path: root/contrib/ntp/libntp/mfptoa.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/ntp/libntp/mfptoa.c')
-rw-r--r--contrib/ntp/libntp/mfptoa.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/contrib/ntp/libntp/mfptoa.c b/contrib/ntp/libntp/mfptoa.c
new file mode 100644
index 0000000..8257b6c
--- /dev/null
+++ b/contrib/ntp/libntp/mfptoa.c
@@ -0,0 +1,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