File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / ntp / libntp / fptoa.c
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Tue May 29 12:08:38 2012 UTC (12 years, 1 month ago) by misho
Branches: ntp, MAIN
CVS tags: v4_2_6p5p0, v4_2_6p5, HEAD
ntp 4.2.6p5

    1: /*
    2:  * fptoa - return an asciized representation of an s_fp number
    3:  */
    4: #include "ntp_fp.h"
    5: #include "ntp_stdlib.h"
    6: 
    7: char *
    8: fptoa(
    9: 	s_fp fpv,
   10: 	short ndec
   11: 	)
   12: {
   13: 	u_fp plusfp;
   14: 	int neg;
   15: 
   16: 	if (fpv < 0) {
   17: 		plusfp = (u_fp)(-fpv);
   18: 		neg = 1;
   19: 	} else {
   20: 		plusfp = (u_fp)fpv;
   21: 		neg = 0;
   22: 	}
   23: 
   24: 	return dofptoa(plusfp, neg, ndec, 0);
   25: }

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>