File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / ntp / libntp / fptoms.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:  * fptoms - return an asciized s_fp number in milliseconds
    3:  */
    4: #include "ntp_fp.h"
    5: 
    6: char *
    7: fptoms(
    8: 	s_fp fpv,
    9: 	short ndec
   10: 	)
   11: {
   12: 	u_fp plusfp;
   13: 	int neg;
   14: 
   15: 	if (fpv < 0) {
   16: 		plusfp = (u_fp)(-fpv);
   17: 		neg = 1;
   18: 	} else {
   19: 		plusfp = (u_fp)fpv;
   20: 		neg = 0;
   21: 	}
   22: 
   23: 	return dofptoa(plusfp, neg, ndec, 1);
   24: }

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