diff options
Diffstat (limited to 'libntp/mfptoa.c')
-rw-r--r-- | libntp/mfptoa.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/libntp/mfptoa.c b/libntp/mfptoa.c new file mode 100644 index 0000000..6450b2c --- /dev/null +++ b/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, + short ndec + ) +{ + int isneg; + + if (M_ISNEG(fpi, fpf)) { + isneg = 1; + M_NEG(fpi, fpf); + } else + isneg = 0; + + return dolfptoa(fpi, fpf, isneg, ndec, 0); +} |