Mail Archives: djgpp/1996/12/06/00:18:02
On Wed, 4 Dec 1996, Michael Gierhake wrote:
> Hi!
>
> According to the GCC info files there's supposed to be a function
> called ecvt() inside libc.a. It doesn't seem to be included in the
> DJGPP libc.a, however.
>
> Any ideas on how to remedy this?
>
> Regards, Michael
from the IRIX 5.3 man page:
NAME
ecvt, fcvt, gcvt, ecvt_r, fcvt_r - convert floating-point number to
string
SYNOPSIS
#include <stdlib.h>
char *ecvt (double value, int ndigit, int *decpt, int *sign);
DESCRIPTION
ecvt converts value to a null-terminated string of ndigit digits and
returns a pointer thereto. The high-order digit is non-zero, unless the
value is zero. The low-order digit is rounded. The position of the
decimal point relative to the beginning of the string is stored
indirectly through decpt (negative means to the left of the returned
digits). The decimal point is not included in the returned string. If
the sign of the result is negative, the word pointed to by sign is
non-zero, otherwise it is zero.
I'm sure you can write a trivial implementation using sprintf() ;)))
(actually, I was half a mind to post one right here, but unfortunately my
C coding skills don't lend themselves very well to on-the-fly typing into
an email message)
.-----------------------------------------------------------------.
| Orlando Andico email: orly AT gibson DOT eee DOT upd DOT edu DOT ph |
| IRC Lab/EE Dept/UP Diliman http://gibson.eee.upd.edu.ph/~orly |
| "through adventure we are not adventuresome" -- 10000 Maniacs |
`-----------------------------------------------------------------'
- Raw text -