repo.or.cz
/
glibc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
* stdlib/strtod_l.c (____STRTOF_INTERNAL): Parse thousand
[glibc.git]
/
stdlib
/
tst-strtod2.c
blob
925ea9cafab60f824814d927e16d997d842749c1
1
#include <stdio.h>
2
#include <stdlib.h>
3
4
static int
5
do_test
(
void
)
6
{
7
int
status
=
0
;
8
const char
s
[] =
"0x"
;
9
char
*
ep
;
10
double
r
=
strtod
(
s
, &
ep
);
11
if
(
r
!=
0
)
12
{
13
printf
(
"r = %g, expect 0
\n
"
,
r
);
14
status
=
1
;
15
}
16
if
(
ep
!=
s
+
1
)
17
{
18
printf
(
"strtod parsed %ju characters, expected 1
\n
"
,
ep
-
s
);
19
status
=
1
;
20
}
21
return
status
;
22
}
23
24
#define TEST_FUNCTION do_test ()
25
#include
"../test-skeleton.c"