From 45b2947945e79cee3fd6c6e43b82cde28a42a7cf Mon Sep 17 00:00:00 2001 From: Marius Vollmer Date: Mon, 6 May 2002 18:43:06 +0000 Subject: [PATCH] =?UTF-8?q?(SCM=5FCHARSET=5FGET):=20Cast=20IDX=20to=20unsi?= =?UTF-8?q?gned=20char=20so=20that=20it=20works=20for=208-bit=20characters?= =?UTF-8?q?.=20=20Thanks=20to=20Matthias=20Koeppe!=20=20No,=20make=20that?= =?UTF-8?q?=20"K=C3=B6ppe".?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- srfi/srfi-14.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/srfi/srfi-14.h b/srfi/srfi-14.h index cef7e5089..120c5b73c 100644 --- a/srfi/srfi-14.h +++ b/srfi/srfi-14.h @@ -48,15 +48,15 @@ #define SCM_CHARSET_SIZE 256 -/* We expect 8-bit bytes here. Shoule be no problem in the year +/* We expect 8-bit bytes here. Should be no problem in the year 2001. */ #ifndef SCM_BITS_PER_LONG # define SCM_BITS_PER_LONG (sizeof (long) * 8) #endif #define SCM_CHARSET_GET(cs, idx) (((long *) SCM_SMOB_DATA (cs))\ - [(idx) / SCM_BITS_PER_LONG] &\ - (1L << ((idx) % SCM_BITS_PER_LONG))) + [((unsigned char) (idx)) / SCM_BITS_PER_LONG] &\ + (1L << (((unsigned char) (idx)) % SCM_BITS_PER_LONG))) #define SCM_CHARSETP(x) (!SCM_IMP (x) && (SCM_TYP16 (x) == scm_tc16_charset))