From: tomo Date: Wed, 7 Jun 2000 09:25:18 +0000 (+0000) Subject: (struct charset_lookup): Use `Charset_ID' instead of `Bufbyte'. X-Git-Tag: r21-2-34-tomo-Charset_ID~7 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=a11c90cbb487063f91df560d458395e4e8055310;p=chise%2Fxemacs-chise.git- (struct charset_lookup): Use `Charset_ID' instead of `Bufbyte'. (CHARSET_BY_LEADING_BYTE): Use `Charset_ID' instead of `int'; Use `MIN_LEADING_BYTE' instead of 128; use `MIN_LEADING_BYTE + NUM_LEADING_BYTES' instead of 0xFF. --- diff --git a/src/mule-charset.h b/src/mule-charset.h index 4733004..87fca1e 100644 --- a/src/mule-charset.h +++ b/src/mule-charset.h @@ -557,8 +557,8 @@ struct charset_lookup { /* Table of charsets indexed by type/final-byte/direction. */ Lisp_Object charset_by_attributes[4][128][2]; - Bufbyte next_allocated_1_byte_leading_byte; - Bufbyte next_allocated_2_byte_leading_byte; + Charset_ID next_allocated_1_byte_leading_byte; + Charset_ID next_allocated_2_byte_leading_byte; }; extern struct charset_lookup *chlook; @@ -567,17 +567,19 @@ extern struct charset_lookup *chlook; /* int not Bufbyte even though that is the actual type of a leading byte. This way, out-ot-range values will get caught rather than automatically truncated. */ -INLINE_HEADER Lisp_Object CHARSET_BY_LEADING_BYTE (int lb); +INLINE_HEADER Lisp_Object CHARSET_BY_LEADING_BYTE (Charset_ID lb); INLINE_HEADER Lisp_Object -CHARSET_BY_LEADING_BYTE (int lb) +CHARSET_BY_LEADING_BYTE (Charset_ID lb) { - assert (lb >= 0x80 && lb <= 0xFF); - return chlook->charset_by_leading_byte[lb - 128]; + assert (lb >= MIN_LEADING_BYTE && + lb < MIN_LEADING_BYTE + NUM_LEADING_BYTES); + return chlook->charset_by_leading_byte[lb - MIN_LEADING_BYTE]; } #else -#define CHARSET_BY_LEADING_BYTE(lb) (chlook->charset_by_leading_byte[(lb) - 128]) +#define CHARSET_BY_LEADING_BYTE(lb) \ + (chlook->charset_by_leading_byte[(lb) - MIN_LEADING_BYTE]) #endif