User: aidan
Date: 05/04/05 19:43:18
Modified: xemacs/src ChangeLog mule-ccl.c
Log:
Mule-CCL couldn't handle control-1 characters either.
Revision Changes Path
1.820 +6 -0 XEmacs/xemacs/src/ChangeLog
Index: ChangeLog
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/ChangeLog,v
retrieving revision 1.819
retrieving revision 1.820
diff -u -p -r1.819 -r1.820
--- ChangeLog 2005/03/31 14:56:37 1.819
+++ ChangeLog 2005/04/05 17:42:48 1.820
@@ -1,3 +1,9 @@
+2005-04-05 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * mule-ccl.c (ccl_driver): Calculate the charset and position code
+ for control-1 characters properly, both when reading multibyte
+ characters and writing them.
+
2005-03-31 Aidan Kehoe <kehoea(a)parhasard.net>
* unicode.c (set_unicode_conversion): Don't try to write to the
1.26 +8 -1 XEmacs/xemacs/src/mule-ccl.c
Index: mule-ccl.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/mule-ccl.c,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -p -r1.25 -r1.26
--- mule-ccl.c 2004/09/20 19:19:52 1.25
+++ mule-ccl.c 2005/04/05 17:42:59 1.26
@@ -1302,6 +1302,13 @@ ccl_driver (struct ccl_program *ccl,
reg[RRR] = i;
reg[rrr] = (*src++ & 0x7F);
}
+ else if (LEADING_BYTE_CONTROL_1 == i)
+ {
+ if (src >= src_end)
+ goto ccl_read_multibyte_character_suspend;
+ reg[RRR] = i;
+ reg[rrr] = (*src++ - 0xA0);
+ }
else if (i <= MAX_LEADING_BYTE_OFFICIAL_2)
{
if ((src + 1) >= src_end)
@@ -1349,7 +1356,7 @@ ccl_driver (struct ccl_program *ccl,
case CCL_WriteMultibyteChar2:
i = reg[RRR]; /* charset */
- if (i == LEADING_BYTE_ASCII)
+ if (i == LEADING_BYTE_ASCII || i == LEADING_BYTE_CONTROL_1)
i = reg[rrr] & 0xFF;
else if (XCHARSET_DIMENSION (charset_by_leading_byte (i)) == 1)
i = (((i - FIELD2_TO_OFFICIAL_LEADING_BYTE) << 7)
Show replies by date