Commit 1f3561e4 authored by Paul Eggert's avatar Paul Eggert

* search.c (boyer_moore): Rename locals to avoid shadowing.

* character.h (FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE): Likewise.
parent ded6f8f7
2011-03-15 Paul Eggert <eggert@cs.ucla.edu>
* search.c (boyer_moore): Rename locals to avoid shadowing.
* character.h (FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE): Likewise.
* search.c (simple_search): Remove unused var.
* dired.c (compile_pattern): Move decl from here ...
......@@ -377,10 +377,10 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
if (STRING_MULTIBYTE (STRING)) \
{ \
unsigned char *ptr = &SDATA (STRING)[BYTEIDX]; \
int len; \
int ptrlen; \
\
OUTPUT = STRING_CHAR_AND_LENGTH (ptr, len); \
BYTEIDX += len; \
OUTPUT = STRING_CHAR_AND_LENGTH (ptr, ptrlen); \
BYTEIDX += ptrlen; \
} \
else \
{ \
......
......@@ -1725,17 +1725,17 @@ boyer_moore (EMACS_INT n, unsigned char *base_pat,
/* Setup translate_prev_byte1/2/3/4 from CHAR_BASE. Only a
byte following them are the target of translation. */
unsigned char str[MAX_MULTIBYTE_LENGTH];
int len = CHAR_STRING (char_base, str);
int cblen = CHAR_STRING (char_base, str);
translate_prev_byte1 = str[len - 2];
if (len > 2)
translate_prev_byte1 = str[cblen - 2];
if (cblen > 2)
{
translate_prev_byte2 = str[len - 3];
if (len > 3)
translate_prev_byte2 = str[cblen - 3];
if (cblen > 3)
{
translate_prev_byte3 = str[len - 4];
if (len > 4)
translate_prev_byte4 = str[len - 5];
translate_prev_byte3 = str[cblen - 4];
if (cblen > 4)
translate_prev_byte4 = str[cblen - 5];
}
}
}
......
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