>>>> "Y" == Yoshiki Hayashi
<yoshiki(a)xemacs.org> writes:
Y> The original code of TRT_TABLE_OF was:
Y> INLINE Emchar TRT_TABLE_OF (Lisp_Object trt, Emchar c);
Y> INLINE Emchar
Y> TRT_TABLE_OF (Lisp_Object trt, Emchar c)
Y> {
Y> return IN_TRT_TABLE_DOMAIN (c) ? TRT_TABLE_CHAR_1 (trt, c) : c;
Y> }
Y> This code was intended to translate character only in ASCII
Y> and Latin-1 range. Now I changed TRT_TABLE, that check
Y> becomes unnecessary for MULE. But I doubted
Y> IN_TRT_TABLE_DOMAIN doing the right thing, so I added assert
Y> to see whether it is right or not without MULE. Now I know
Y> it was wrong, we can fix XEmacs 21.1 as well. My intention
Y> was not to trigger assert so if you are saying I should just
Y> remove the call to assert, you're right.
I'm not saying that - I still don't understand this code.
But the patch below looks better.
Y> 2000-11-16 Yoshiki Hayashi <yoshiki(a)xemacs.org>
Y> * buffer.h (TRT_TABLE_OF): Remove assert.
Y> (IN_TRT_TABLE_DOMAIN): Removed.
Y> Index: buffer.h
Y> ===================================================================
Y> RCS file: /usr/CVSroot/XEmacs/xemacs/src/buffer.h,v
Y> retrieving revision 1.13.2.25
Y> diff -u -r1.13.2.25 buffer.h
Y> --- buffer.h 2000/11/15 10:39:42 1.13.2.25
Y> +++ buffer.h 2000/11/16 09:48:05
Y> @@ -1702,15 +1702,11 @@
Y> }
Y> #define SET_TRT_TABLE_CHAR_1(table, ch1, ch2) \
Y> Fput_char_table (make_char (ch1), make_char (ch2), table);
Y> -#define IN_TRT_TABLE_DOMAIN(c) (((EMACS_UINT) (c)) <= 255)
Y> INLINE_HEADER Emchar TRT_TABLE_OF (Lisp_Object trt, Emchar c);
Y> INLINE_HEADER Emchar
Y> TRT_TABLE_OF (Lisp_Object trt, Emchar c)
Y> {
Y> -#ifndef MULE
Y> - assert (IN_TRT_TABLE_DOMAIN (c));
Y> -#endif
Y> return TRT_TABLE_CHAR_1 (trt, c);
Y> }