iswalpha.c 229 B

1234567891011121314
  1. #include <wctype.h>
  2. static const unsigned char table[] = {
  3. #include "alpha.h"
  4. };
  5. int iswalpha(wint_t wc)
  6. {
  7. if (wc<0x20000U)
  8. return (table[table[wc>>8]*32+((wc&255)>>3)]>>(wc&7))&1;
  9. if (wc<0x2fffeU)
  10. return 1;
  11. return 0;
  12. }