From f4ad36c4bf23899a3164ebd40ff5781c152bcb01 Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Mon, 6 Feb 2012 01:14:23 -0500 Subject: add deprecated (removed from posix) [efg]cvt() functions these have not been heavily tested, but they should work as described in the old standards. probably broken for non-finite values... --- src/stdlib/gcvt.c | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 src/stdlib/gcvt.c (limited to 'src/stdlib/gcvt.c') diff --git a/src/stdlib/gcvt.c b/src/stdlib/gcvt.c new file mode 100644 index 00000000..6c075e25 --- /dev/null +++ b/src/stdlib/gcvt.c @@ -0,0 +1,8 @@ +#include +#include + +char *gcvt(double x, int n, char *b) +{ + sprintf(b, "%.*g", n, x); + return b; +} -- cgit 1.4.1