summaryrefslogtreecommitdiff
path: root/src/ctype/iswalpha.c
blob: 00f9d81f5a7899d4748d35457928e5d2a342d5c8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#include <wctype.h>
#include "libc.h"

static const unsigned char table[] = {
#include "alpha.h"
};

int iswalpha(wint_t wc)
{
	if (wc<0x20000U)
		return (table[table[wc>>8]*32+((wc&255)>>3)]>>(wc&7))&1;
	if (wc<0x2fffeU)
		return 1;
	return 0;
}

int __iswalpha_l(wint_t c, locale_t l)
{
	return iswalpha(c);
}

weak_alias(__iswalpha_l, iswalpha_l);