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
iconv: fix missing bounds checking for shift_jis decoding
[musl.git]
/
src
/
ctype
/
iswalpha.c
blob
1c5485d2bfb418feed5911bd2292d4acd3278e7b
1
#include <wctype.h>
2
3
static const unsigned char
table
[] = {
4
#include
"alpha.h"
5
};
6
7
int
iswalpha
(
wint_t
wc
)
8
{
9
if
(
wc
<
0x20000
U
)
10
return
(
table
[
table
[
wc
>>
8
]*
32
+((
wc
&
255
)>>
3
)]>>(
wc
&
7
))&
1
;
11
if
(
wc
<
0x2fffe
U
)
12
return
1
;
13
return
0
;
14
}
15
16
int
__iswalpha_l
(
wint_t
c
,
locale_t l
)
17
{
18
return
iswalpha
(
c
);
19
}
20
21
weak_alias
(
__iswalpha_l
,
iswalpha_l
);