ack/lang/cem/libcc.ansi/core/stdlib/ecvt.c

31 lines
537 B
C
Raw Normal View History

1994-06-24 14:02:31 +00:00
/* $Id$ */
1989-05-30 13:34:25 +00:00
#include <math.h>
#include <ack/config.h>
#if ACKCONF_WANT_STDIO_FLOAT
1989-05-30 13:34:25 +00:00
#include "ext_fmt.h"
1989-12-18 15:04:14 +00:00
2018-06-21 20:33:47 +00:00
static char*
cvt(long double value, int ndigit, int* decpt, int* sign, int ecvtflag)
1989-12-18 15:04:14 +00:00
{
struct EXTEND e;
_dbl_ext_cvt(value, &e);
return _ext_str_cvt(&e, ndigit, decpt, sign, ecvtflag);
}
1989-05-30 13:34:25 +00:00
2018-06-21 20:33:47 +00:00
char* _ecvt(long double value, int ndigit, int* decpt, int* sign)
1989-05-30 13:34:25 +00:00
{
1989-12-18 15:04:14 +00:00
1989-05-30 13:34:25 +00:00
return cvt(value, ndigit, decpt, sign, 1);
}
2018-06-21 20:33:47 +00:00
char* _fcvt(long double value, int ndigit, int* decpt, int* sign)
1989-05-30 13:34:25 +00:00
{
return cvt(value, ndigit, decpt, sign, 0);
}
#endif