fix some obscure header type size/alignment issues
[musl] / src / ctype / iswalpha.c
index 0f031ea..d558fae 100644 (file)
@@ -1,6 +1,14 @@
 #include <wctype.h>
 
+static const unsigned char table[] = {
+#include "alpha.h"
+};
+
 int iswalpha(wint_t wc)
 {
-       return (32U|wc)-'a'<26;
+       if (wc<0x20000U)
+               return (table[table[wc>>8]*32+((wc&255)>>3)]>>(wc&7))&1;
+       if (wc<0x2fffeU)
+               return 1;
+       return 0;
 }