/* @(#)ecvt.c 4.1 (Berkeley) %G% */
* ecvt converts to decimal
* the number of digits is specified by ndigit
* decpt is set to the position of the decimal point
* sign is set to 0 for positive, 1 for negative
ecvt(arg
, ndigits
, decpt
, sign
)
int ndigits
, *decpt
, *sign
;
return(cvt(arg
, ndigits
, decpt
, sign
, 1));
fcvt(arg
, ndigits
, decpt
, sign
)
int ndigits
, *decpt
, *sign
;
return(cvt(arg
, ndigits
, decpt
, sign
, 0));
cvt(arg
, ndigits
, decpt
, sign
, eflag
)
int ndigits
, *decpt
, *sign
;
*--p1
= (int)((fj
+.03)*10) + '0';
while ((fj
= arg
*10) < 1) {
while (p
<=p1
&& p
<&buf
[NDIG
]) {