Martin Buchholz <martin(a)xemacs.org> writes:
I can confirm that this is broken in current CVS, but works in CVS
as
of Nov.9. Whoever introduced this, please fix.
That's my fault. Two occurence of RE_TRANSLATE without
range checking just slipped my eyes. This patch is a bit
ugly, but it does the job until properly MULEized.
2000-11-16 Yoshiki Hayashi <yoshiki(a)xemacs.org>
* regex.c (RE_TR_ASCII): New function.
(RE_TRANSLATE): Call it.
Index: regex.c
===================================================================
RCS file: /usr/CVSroot/XEmacs/xemacs/src/regex.c,v
retrieving revision 1.22.2.9
diff -u -r1.22.2.9 regex.c
--- regex.c 2000/11/15 10:39:44 1.22.2.9
+++ regex.c 2000/11/16 10:10:41
@@ -106,7 +106,16 @@
#endif /* MULE */
-#define RE_TRANSLATE(c) TRT_TABLE_OF (translate, (Emchar) c)
+static inline Emchar RE_TR_ASCII (unsigned char c, Lisp_Object trt);
+static inline Emchar
+RE_TR_ASCII (unsigned char c, Lisp_Object trt)
+{
+ if (c >= 0x80)
+ return (Emchar) c;
+ else
+ return TRT_TABLE_OF (trt, (Emchar) c);
+}
+#define RE_TRANSLATE(ch) ((char) RE_TR_ASCII(ch, translate))
#define TRANSLATE_P(tr) (!NILP (tr))
#else /* not emacs */
--
Yoshiki Hayashi