X-Git-Url: http://git.chise.org/gitweb/?p=chise%2Fxemacs-chise.git.1;a=blobdiff_plain;f=src%2Fmule-charset.h;h=d46ebac726bf209baa6cfc36ff3be177a2b290a7;hp=5ee90610aaf765afbfd9e8e70d9f15fc84dd253a;hb=ea1ea793fe6e244ef5555ed983423a204101af13;hpb=399b9f4466f37412410de8ec4a08e3dc5504ad10 diff --git a/src/mule-charset.h b/src/mule-charset.h index 5ee9061..d46ebac 100644 --- a/src/mule-charset.h +++ b/src/mule-charset.h @@ -486,7 +486,6 @@ DECLARE_LRECORD (charset, struct Lisp_Charset); #define XCHARSET(x) XRECORD (x, charset, struct Lisp_Charset) #define XSETCHARSET(x, p) XSETRECORD (x, p, charset) #define CHARSETP(x) RECORDP (x, charset) -#define GC_CHARSETP(x) GC_RECORDP (x, charset) #define CHECK_CHARSET(x) CHECK_RECORD (x, charset) #define CONCHECK_CHARSET(x) CONCHECK_RECORD (x, charset) @@ -500,7 +499,7 @@ DECLARE_LRECORD (charset, struct Lisp_Charset); /* Leading byte and id have been regrouped. -- OG */ #define CHARSET_ID(cs) ((cs)->id) -#define CHARSET_LEADING_BYTE(cs) ((Bufbyte)(CHARSET_ID(cs))) +#define CHARSET_LEADING_BYTE(cs) ((Bufbyte) CHARSET_ID(cs)) #define CHARSET_NAME(cs) ((cs)->name) #define CHARSET_SHORT_NAME(cs) ((cs)->short_name) #define CHARSET_LONG_NAME(cs) ((cs)->long_name) @@ -540,11 +539,15 @@ DECLARE_LRECORD (charset, struct Lisp_Charset); #define XCHARSET_REVERSE_DIRECTION_CHARSET(cs) \ CHARSET_REVERSE_DIRECTION_CHARSET (XCHARSET (cs)) -/* Table of charsets indexed by (leading byte - 128). */ -extern Lisp_Object charset_by_leading_byte[128]; +struct charset_lookup { + /* Table of charsets indexed by leading byte. */ + Lisp_Object charset_by_leading_byte[128]; + + /* Table of charsets indexed by type/final-byte/direction. */ + Lisp_Object charset_by_attributes[4][128][2]; +}; -/* Table of charsets indexed by type/final-byte/direction. */ -extern Lisp_Object charset_by_attributes[4][128][2]; +extern struct charset_lookup *chlook; /* Table of number of bytes in the string representation of a character indexed by the first byte of that representation. @@ -566,17 +569,17 @@ INLINE Lisp_Object CHARSET_BY_LEADING_BYTE (int lb) { assert (lb >= 0x80 && lb <= 0xFF); - return charset_by_leading_byte[lb - 128]; + return chlook->charset_by_leading_byte[lb - 128]; } #else -#define CHARSET_BY_LEADING_BYTE(lb) (charset_by_leading_byte[(lb) - 128]) +#define CHARSET_BY_LEADING_BYTE(lb) (chlook->charset_by_leading_byte[(lb) - 128]) #endif #define CHARSET_BY_ATTRIBUTES(type, final, dir) \ - (charset_by_attributes[type][final][dir]) + (chlook->charset_by_attributes[type][final][dir]) #ifdef ERROR_CHECK_TYPECHECK