From f303279302a046baf7bd79d77986ec9ffd6c84d2 Mon Sep 17 00:00:00 2001 From: tomo Date: Fri, 27 Aug 1999 05:25:59 +0000 Subject: [PATCH] (charset_by_leading_byte): Use `NUM_LEADING_BYTES' instead of 128. (CHARSET_BY_LEADING_BYTE): Use `MIN_LEADING_BYTE' and `NUM_LEADING_BYTES' instead of 128. --- src/character.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/character.h b/src/character.h index 34f35ca..6bdc591 100644 --- a/src/character.h +++ b/src/character.h @@ -259,7 +259,7 @@ DECLARE_LRECORD (charset, struct Lisp_Charset); CHARSET_REVERSE_DIRECTION_CHARSET (XCHARSET (cs)) /* Table of charsets indexed by (leading byte - 128). */ -extern Lisp_Object charset_by_leading_byte[128]; +extern Lisp_Object charset_by_leading_byte[NUM_LEADING_BYTES]; /* Table of charsets indexed by type/final-byte/direction. */ extern Lisp_Object charset_by_attributes[4][128][2]; @@ -285,13 +285,15 @@ INLINE Lisp_Object CHARSET_BY_LEADING_BYTE (int lb); INLINE Lisp_Object CHARSET_BY_LEADING_BYTE (int lb) { - assert (lb >= 0x80 && lb <= 0xFF); - return charset_by_leading_byte[lb - 128]; + assert (lb >= MIN_LEADING_BYTE && + lb < (MIN_LEADING_BYTE + NUM_LEADING_BYTES)); + return charset_by_leading_byte[lb - MIN_LEADING_BYTE]; } #else -#define CHARSET_BY_LEADING_BYTE(lb) (charset_by_leading_byte[(lb) - 128]) +#define CHARSET_BY_LEADING_BYTE(lb) \ + (charset_by_leading_byte[(lb) - MIN_LEADING_BYTE]) #endif -- 1.7.10.4