|
|
1.1 root 1: /*
2: * fcvt.c
3: * Historical "f"-format floating point output conversion.
4: * Non-ANSI.
5: */
6:
7: #include <math.h>
8:
9: char *
10: fcvt(d, width, decp, signp) double d; int width; int *decp; int *signp;
11: {
12: static char buf[L10P+1];
13:
14: if (d < 0) {
15: *signp = 1;
16: d = -d;
17: } else
18: *signp = 0;
19: _dtoa('f', &d, width<=0 ? 0 : width, decp, buf);
20: ++*decp;
21: return buf;
22: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.