d5e6f1b80b
(in this case, throw away all local modifications; I'll start patching from scratch)
28 lines
387 B
C
28 lines
387 B
C
/* $NetBSD: fptoa.c,v 1.2 2003/12/04 16:23:36 drochner Exp $ */
|
|
|
|
/*
|
|
* fptoa - return an asciized representation of an s_fp number
|
|
*/
|
|
#include "ntp_fp.h"
|
|
#include "ntp_stdlib.h"
|
|
|
|
char *
|
|
fptoa(
|
|
s_fp fpv,
|
|
short ndec
|
|
)
|
|
{
|
|
u_fp plusfp;
|
|
int neg;
|
|
|
|
if (fpv < 0) {
|
|
plusfp = (u_fp)(-fpv);
|
|
neg = 1;
|
|
} else {
|
|
plusfp = (u_fp)fpv;
|
|
neg = 0;
|
|
}
|
|
|
|
return dofptoa(plusfp, neg, ndec, 0);
|
|
}
|