repo.or.cz
/
musl.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
support clang internal assembler when building for arm as thumb2 code
[musl.git]
/
src
/
stdio
/
fwide.c
blob
8bab634ae0b50ad4245d38b52c00c8e1762c6ab5
1
#include <wchar.h>
2
#include
"stdio_impl.h"
3
#include
"locale_impl.h"
4
5
int
fwide
(
FILE
*
f
,
int
mode
)
6
{
7
FLOCK
(
f
);
8
if
(
mode
) {
9
if
(!
f
->
locale
)
f
->
locale
=
MB_CUR_MAX
==
1
10
?
C_LOCALE
:
UTF8_LOCALE
;
11
if
(!
f
->
mode
)
f
->
mode
=
mode
>
0
?
1
: -
1
;
12
}
13
mode
=
f
->
mode
;
14
FUNLOCK
(
f
);
15
return
mode
;
16
}