/contrib/ntp/libntp/mfptoa.c

https://bitbucket.org/freebsd/freebsd-head/ · C · 23 lines · 17 code · 3 blank · 3 comment · 1 complexity · 7821ea17ff28dc35fcfcd4aae3878404 MD5 · raw file

  1. /*
  2. * mfptoa - Return an asciized representation of a signed long fp number
  3. */
  4. #include "ntp_fp.h"
  5. #include "ntp_stdlib.h"
  6. char *
  7. mfptoa(
  8. u_long fpi,
  9. u_long fpf,
  10. short ndec
  11. )
  12. {
  13. int isneg;
  14. if (M_ISNEG(fpi, fpf)) {
  15. isneg = 1;
  16. M_NEG(fpi, fpf);
  17. } else
  18. isneg = 0;
  19. return dolfptoa(fpi, fpf, isneg, ndec, 0);
  20. }