From: Vincent Hanquez Date: Wed, 7 Jan 2009 18:19:28 +0000 (+0000) Subject: temporarily fix the is_printable version. X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=67af69f184ead5a5b767be857fb45c420c738308;p=xenclient%2Focaml.git 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. --- 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)