repo.or.cz
/
glibc
/
history.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Updated to fedora-glibc-20090424T1908
[glibc/history.git]
/
wcsmbs
/
tst-wcstof.c
blob
197cb5c77041ac9b97aa2ebb81a88c636fa2f60a
1
#define _GNU_SOURCE 1
2
#include <wchar.h>
3
#include <stdio.h>
4
#include <string.h>
5
#include <wctype.h>
6
7
int
8
main
(
void
)
9
{
10
int
result
=
0
;
11
char
buf
[
100
];
12
wchar_t
tmp
[
3
];
13
tmp
[
0
] =
'8'
;
14
tmp
[
1
] =
'1'
;
15
tmp
[
2
] =
0
;
16
17
snprintf
(
buf
,
100
,
"%S = %f"
,
tmp
,
wcstof
(
tmp
,
NULL
));
18
printf
(
"
\"
%s
\"
-> %s
\n
"
,
buf
,
19
strcmp
(
buf
,
"81 = 81.000000"
) ==
0
?
"okay"
:
"buggy"
);
20
result
|=
strcmp
(
buf
,
"81 = 81.000000"
) !=
0
;
21
22
return
result
;
23
}