From: tomo Date: Mon, 11 Dec 2000 03:31:30 +0000 (+0000) Subject: (search_buffer): Make `charset_base_code' as character-id >> 6 to X-Git-Tag: r21-2-38-utf-2000-0_17-1~952 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=11319eaafc78f46e3e386ae62c9f05ce1ab32ae6;p=chise%2Fxemacs-chise.git (search_buffer): Make `charset_base_code' as character-id >> 6 to eliminate the corresponding last byte in UTF-8 representation [I'm not sure it is right thing]. (boyer_moore): Likewise. --- diff --git a/src/search.c b/src/search.c index b686c51..49c4c8d 100644 --- a/src/search.c +++ b/src/search.c @@ -1278,11 +1278,7 @@ search_buffer (struct buffer *buf, Lisp_Object string, Bufpos bufpos, /* Keep track of which character set row contains the characters that need translation. */ #ifdef UTF2000 - Lisp_Object ccs; - int charset_base_code; - - ENCODE_CHAR (c, ccs); - charset_base_code = XCHARSET_ID (ccs); + int charset_base_code = c >> 6; #else int charset_base_code = c & ~CHAR_FIELD3_MASK; #endif @@ -1580,16 +1576,12 @@ boyer_moore (struct buffer *buf, Bufbyte *base_pat, Bytecount len, /* Is *PTR the last byte of a character? */ if (pat_end - ptr == 1 || BUFBYTE_FIRST_BYTE_P (ptr[1])) { -#ifdef UTF2000 - Lisp_Object ccs; -#endif Bufbyte *charstart = ptr; while (!BUFBYTE_FIRST_BYTE_P (*charstart)) charstart--; untranslated = charptr_emchar (charstart); #ifdef UTF2000 - ENCODE_CHAR (untranslated, ccs); - if (charset_base == XCHARSET_ID (ccs)) + if (charset_base == (untranslated >> 6)) #else if (charset_base == (untranslated & ~CHAR_FIELD3_MASK)) #endif