changeset 2712:cf4a5f5e87ea

[xemacs-hg @ 2005-04-05 17:42:48 by aidan] Mule-CCL couldn't handle control-1 characters either.
author aidan
date Tue, 05 Apr 2005 17:42:59 +0000
parents 879b927c8a9f
children d438c2289647
files src/ChangeLog src/mule-ccl.c
diffstat 2 files changed, 14 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Mon Apr 04 21:51:30 2005 +0000
+++ b/src/ChangeLog	Tue Apr 05 17:42:59 2005 +0000
@@ -1,3 +1,9 @@
+2005-04-05  Aidan Kehoe  <kehoea@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@parhasard.net>
 
 	* unicode.c (set_unicode_conversion): Don't try to write to the
--- a/src/mule-ccl.c	Mon Apr 04 21:51:30 2005 +0000
+++ b/src/mule-ccl.c	Tue Apr 05 17:42:59 2005 +0000
@@ -1302,6 +1302,13 @@
 		    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 @@
 
 	    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)