48 |
|
|
49 |
#define SCM_CHARSET_SIZE 256 |
#define SCM_CHARSET_SIZE 256 |
50 |
|
|
51 |
/* 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 |
52 |
2001. */ |
2001. */ |
53 |
#ifndef SCM_BITS_PER_LONG |
#ifndef SCM_BITS_PER_LONG |
54 |
# define SCM_BITS_PER_LONG (sizeof (long) * 8) |
# define SCM_BITS_PER_LONG (sizeof (long) * 8) |
55 |
#endif |
#endif |
56 |
|
|
57 |
#define SCM_CHARSET_GET(cs, idx) (((long *) SCM_SMOB_DATA (cs))\ |
#define SCM_CHARSET_GET(cs, idx) (((long *) SCM_SMOB_DATA (cs))\ |
58 |
[(idx) / SCM_BITS_PER_LONG] &\ |
[((unsigned char) (idx)) / SCM_BITS_PER_LONG] &\ |
59 |
(1L << ((idx) % SCM_BITS_PER_LONG))) |
(1L << (((unsigned char) (idx)) % SCM_BITS_PER_LONG))) |
60 |
|
|
61 |
#define SCM_CHARSETP(x) (!SCM_IMP (x) && (SCM_TYP16 (x) == scm_tc16_charset)) |
#define SCM_CHARSETP(x) (!SCM_IMP (x) && (SCM_TYP16 (x) == scm_tc16_charset)) |
62 |
|
|