+2003-01-16 Kenichi Handa <handa@m17n.org>
+
+ * regex.c (GET_CHAR_BEFORE_2): Fix for the case that the previous
+ char is eight-bit-graphic.
+ (re_search_2): Likewise.
+
2003-01-15 Kenichi Handa <handa@m17n.org>
* xdisp.c (message_dolog): Fix bug of the case that *Message*
{ \
re_char *dtemp = (p) == (str2) ? (end1) : (p); \
re_char *dlimit = ((p) > (str2) && (p) <= (end2)) ? (str2) : (str1); \
+ re_char *d0 = dtemp; \
while (dtemp-- > dlimit && !CHAR_HEAD_P (*dtemp)); \
- c = STRING_CHAR (dtemp, (p) - dtemp); \
+ if (MULTIBYTE_FORM_LENGTH (dtemp, d0 - dtemp) == d0 - dtemp) \
+ c = STRING_CHAR (dtemp, d0 - dtemp); \
+ else \
+ c = d0[-1]; \
} \
else \
(c = ((p) == (str2) ? (end1) : (p))[-1]); \
p--, len++;
/* Adjust it. */
-#if 0 /* XXX */
if (MULTIBYTE_FORM_LENGTH (p, len + 1) != (len + 1))
- ;
- else
-#endif
- {
- range += len;
- if (range > 0)
- break;
+ /* The previous character is eight-bit-graphic which
+ is represented by one byte even in a multibyte
+ buffer/string. */
+ len = 0;
+ range += len;
+ if (range > 0)
+ break;
- startpos -= len;
- }
+ startpos -= len;
}
}
}