OSDN Git Service
(root)
/
uclinux-h8
/
uClibc.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Add in gcvt()
[uclinux-h8/uClibc.git]
/
libc
/
stdlib
/
gcvt.c
1
2
#include <stdlib.h>
3
4
#ifdef __UCLIBC_HAS_FLOATS__
5
#define MAX_NDIGIT 17
6
char * gcvt(double number, size_t ndigit, char* buf)
7
{
8
sprintf(buf, "%.*g", (ndigit > MAX_NDIGIT)? MAX_NDIGIT : ndigit, number);
9
return buf;
10
}
11
#endif