Hrvoje Niksic <hniksic(a)arsdigita.com> writes:
> -#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)
As a point of style, shouldn't this be either Bufbyte or Emchar?
`unsigned char' doesn't have a real meaning for most of XEmacs.
Thanks. It's actually Bufbyte and eventually should be
converted to Emchar. There're many unsigned char lurking
around in regex.c but there's no need I should add another
bogus unsigned char. I'll commit this version shortly.
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/17 09:22:55
@@ -106,7 +106,17 @@
#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 (Bufbyte b, Lisp_Object trt)
+{
+ if (b >= 0x80)
+ return (Emchar) b;
+ else
+ return TRT_TABLE_OF (trt, (Emchar) b);
+}
+#define RE_TRANSLATE(ch) ((char) RE_TR_ASCII (ch, translate))
#define TRANSLATE_P(tr) (!NILP (tr))
#else /* not emacs */
--
Yoshiki Hayashi