From 67af69f184ead5a5b767be857fb45c420c738308 Mon Sep 17 00:00:00 2001 From: Vincent Hanquez Date: Wed, 7 Jan 2009 18:19:28 +0000 Subject: [PATCH] temporarily fix the is_printable version. we got some issue with locales from the ocaml environment, and since we don't need locale support, and probably never will, we just provide a ascii version of the function. --- byterun/str.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/byterun/str.c b/byterun/str.c index 1d8506b..84484a7 100644 --- a/byterun/str.c +++ b/byterun/str.c @@ -137,6 +137,7 @@ CAMLprim value caml_is_printable(value chr) { int c; +#if 0 #ifdef HAS_LOCALE static int locale_is_set = 0; if (! locale_is_set) { @@ -146,6 +147,9 @@ CAMLprim value caml_is_printable(value chr) #endif c = Int_val(chr); return Val_bool(isprint(c)); +#endif + c = Int_val(chr); + return (c >= 32 && c <= 126) ? Val_bool(1) : Val_bool(0); } CAMLprim value caml_bitvect_test(value bv, value n) -- 2.39.5