projects
/
musl
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
98b992a1f77108e295405fae3b16495a8a6c8f8e
[musl]
/
src
/
stdlib
/
strtod.c
1
#include <stdlib.h>
2
#include "floatscan.h"
3
#include "stdio_impl.h"
4
5
double strtod(const char *s, char **p)
6
{
7
FILE f = {
8
.buf = (void *)s, .rpos = (void *)s,
9
.rend = (void *)-1, .lock = -1
10
};
11
off_t cnt;
12
double y = __floatscan(&f, -1, 1, 1, &cnt);
13
if (p) *p = (char *)s + cnt;
14
return y;
15
}