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
fix unintended observability of SIGABRT disposition reset via sigaction
[musl.git]
/
src
/
ctype
/
wcswidth.c
blob
5c8a5a4dadc2bc7fb41dbdd68d8fb5debdabae6b
1
#include <wchar.h>
2
3
int
wcswidth
(
const wchar_t
*
wcs
,
size_t
n
)
4
{
5
int
l
=
0
,
k
=
0
;
6
for
(;
n
-- && *
wcs
&& (
k
=
wcwidth
(*
wcs
)) >=
0
;
l
+=
k
,
wcs
++);
7
return
(
k
<
0
) ?
k
:
l
;
8
}