+2008-08-27 Andreas Schwab <schwab@suse.de>
+
+ * search.c (search_buffer): Set char_base to zero only at the end.
+
2008-08-27 Kenichi Handa <handa@m17n.org>
* fileio.c (report_file_error): Fix handling of multibyte error
if (this_char_base > 0)
boyer_moore_ok = 0;
else
- {
- this_char_base = 0;
- if (char_base < 0)
- char_base = this_char_base;
- }
+ this_char_base = 0;
}
else if (CHAR_BYTE8_P (inverse))
/* Boyer-moore search can't handle a
this_char_base = inverse & ~0x3F;
if (char_base < 0)
char_base = this_char_base;
- else if (char_base > 0
- && this_char_base != char_base)
+ else if (this_char_base != char_base)
boyer_moore_ok = 0;
}
else if ((inverse & ~0x3F) != this_char_base)
}
}
}
- if (char_base < 0)
- char_base = 0;
/* Store this character into the translated pattern. */
bcopy (str, pat, charlen);
base_pat += in_charlen;
len_byte -= in_charlen;
}
+
+ /* If char_base is still negative we didn't find any translated
+ non-ASCII characters. */
+ if (char_base < 0)
+ char_base = 0;
}
else
{