From 4fac709e358a67f9d9e8b4ff2d1715b11837066a Mon Sep 17 00:00:00 2001 From: tomo Date: Mon, 11 Oct 1999 21:46:06 +0000 Subject: [PATCH] (find_charsets_in_bufbyte_string): Use `CHAR_CHARSET_ID' instead of `CHAR_LEADING_BYTE' in UTF-2000. (find_charsets_in_emchar_string): Likewise. --- src/insdel.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/insdel.c b/src/insdel.c index 95e59dc..b54678a 100644 --- a/src/insdel.c +++ b/src/insdel.c @@ -3119,8 +3119,14 @@ find_charsets_in_bufbyte_string (Charset_ID *charsets, CONST Bufbyte *str, while (str < strend) { +#ifdef UTF2000 + charsets[CHAR_CHARSET_ID (charptr_emchar (str)) + - MIN_LEADING_BYTE] = 1; +#else /* I'm not sure the definition for UTF2000 works with leading-byte + representation. */ charsets[CHAR_LEADING_BYTE (charptr_emchar (str)) - MIN_LEADING_BYTE] = 1; +#endif INC_CHARPTR (str); } #endif @@ -3139,7 +3145,12 @@ find_charsets_in_emchar_string (Charset_ID *charsets, CONST Emchar *str, memset (charsets, 0, NUM_LEADING_BYTES * sizeof(Charset_ID)); for (i = 0; i < len; i++) { +#ifdef UTF2000 + charsets[CHAR_CHARSET_ID (str[i]) - MIN_LEADING_BYTE] = 1; +#else /* I'm not sure the definition for UTF2000 works with leading-byte + representation. */ charsets[CHAR_LEADING_BYTE (str[i]) - MIN_LEADING_BYTE] = 1; +#endif } #endif } -- 1.7.10.4