diff --git a/C/scanner.c b/C/scanner.c index 84e2081b9..0d5ab1cc4 100644 --- a/C/scanner.c +++ b/C/scanner.c @@ -48,6 +48,9 @@ #if HAVE_STRING_H #include #endif +#if HAVE_WCTYPE_H +#include +#endif /* You just can't trust some machines */ #define my_isxdigit(C,SU,SL) (chtype(C) == NU || (C >= 'A' && \ @@ -124,12 +127,14 @@ char *Yap_chtype = chtype0+1; int Yap_wide_chtype(Int ch) { +#if HAVE_WCTYPE_H if (iswalnum(ch)) { if (iswlower(ch)) return LC; if (iswdigit(ch)) return NU; return UC; } if (iswpunct(ch)) return SY; +#endif return BS; } diff --git a/H/yapio.h b/H/yapio.h index df80471a8..428817a96 100644 --- a/H/yapio.h +++ b/H/yapio.h @@ -275,7 +275,6 @@ chtype(Int ch) { if (ch < NUMBER_OF_CHARS) return Yap_chtype[ch]; - printf("type=%d\n",Yap_wide_chtype(ch)); return Yap_wide_chtype(ch); }