www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/12/06/00:18:02

Date: Fri, 6 Dec 1996 13:12:46 +0800 (GMT)
From: Orlando Andico <orly AT gibson DOT eee DOT upd DOT edu DOT ph>
To: Michael Gierhake <urubu AT mailmasher DOT com>
cc: djgpp AT delorie DOT com
Subject: Re: ecvt() - where?
In-Reply-To: <199612042105.NAA24663@mailmasher.com>
Message-ID: <Pine.SGI.3.93.961206130939.1131B-100000@gibson.eee.upd.edu.ph>
MIME-Version: 1.0

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019