Commit 76eb0881 authored by Kenichi Handa's avatar Kenichi Handa
Browse files

Include "character.h" instead of "charset.h".

(search_buffer, boyer_moore): Adjusted for the new multibyte form.
(Freplace_match): Adjusted for the change of
multibyte_char_to_unibyte.
parent 9117d724
...@@ -24,7 +24,7 @@ Boston, MA 02111-1307, USA. */ ...@@ -24,7 +24,7 @@ Boston, MA 02111-1307, USA. */
#include "syntax.h" #include "syntax.h"
#include "category.h" #include "category.h"
#include "buffer.h" #include "buffer.h"
#include "charset.h" #include "character.h"
#include "region-cache.h" #include "region-cache.h"
#include "commands.h" #include "commands.h"
#include "blockinput.h" #include "blockinput.h"
...@@ -1228,7 +1228,7 @@ search_buffer (string, pos, pos_byte, lim, lim_byte, n, ...@@ -1228,7 +1228,7 @@ search_buffer (string, pos, pos_byte, lim, lim_byte, n,
{ {
/* Keep track of which character set row /* Keep track of which character set row
contains the characters that need translation. */ contains the characters that need translation. */
int charset_base_code = c & ~CHAR_FIELD3_MASK; int charset_base_code = c & ~0x3F;
if (charset_base == -1) if (charset_base == -1)
charset_base = charset_base_code; charset_base = charset_base_code;
else if (charset_base != charset_base_code) else if (charset_base != charset_base_code)
...@@ -1615,7 +1615,7 @@ boyer_moore (n, base_pat, len, len_byte, trt, inverse_trt, ...@@ -1615,7 +1615,7 @@ boyer_moore (n, base_pat, len, len_byte, trt, inverse_trt,
while (! CHAR_HEAD_P (*charstart)) while (! CHAR_HEAD_P (*charstart))
charstart--; charstart--;
untranslated = STRING_CHAR (charstart, ptr - charstart + 1); untranslated = STRING_CHAR (charstart, ptr - charstart + 1);
if (charset_base == (untranslated & ~CHAR_FIELD3_MASK)) if (charset_base == (untranslated & ~0x3F))
{ {
TRANSLATE (ch, trt, untranslated); TRANSLATE (ch, trt, untranslated);
if (! CHAR_HEAD_P (*ptr)) if (! CHAR_HEAD_P (*ptr))
...@@ -2435,10 +2435,7 @@ since only regular expressions have distinguished subexpressions. */) ...@@ -2435,10 +2435,7 @@ since only regular expressions have distinguished subexpressions. */)
Lisp_Object rev_tbl; Lisp_Object rev_tbl;
int really_changed = 0; int really_changed = 0;
rev_tbl= (!buf_multibyte && CHAR_TABLE_P (Vnonascii_translation_table) rev_tbl= Qnil;
? Fchar_table_extra_slot (Vnonascii_translation_table,
make_number (0))
: Qnil);
substed_alloc_size = length * 2 + 100; substed_alloc_size = length * 2 + 100;
substed = (unsigned char *) xmalloc (substed_alloc_size + 1); substed = (unsigned char *) xmalloc (substed_alloc_size + 1);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment