decoders writing control-1 chars?

Ilya N. Golubev gin
Thu Nov 9 09:05:02 EST 2006


> it seems I sent that to the
> list, and not to you explicitly.

Then thanks for resending, since I am not on any of the lists.


Adding `ccl-program-definition' did not directly fix the broken
conversion.  It was practically necessary to figure what C code to
look at, and will remain so until no CCL coding system is ever used.
Will post separate patches on request.

src/ChangeLog

2006-10-31

	* mule-ccl.c (ccl_driver): Fix implementation of
	`CCL_WriteMultibyteChar2' / `write-multibyte-character': when
	passed valid representations of `control-1' charset characters,
	write the desired emchar, not garbage.

2006-10-29

	* mule-ccl.c (Fccl_program_definition): New.

ChangeLog

2006-10-31

	* etc/NEWS: Document fix of writing `control-1' emchars in CCL.

2006-10-29

	* etc/NEWS: Document adding `ccl-program-definition'.


--- src/mule-ccl.c
+++ src/mule-ccl.c
@@ -1372,8 +1372,6 @@
	      i = reg[RRR]; /* charset */
 	      if (i == LEADING_BYTE_ASCII) 
 		i = reg[rrr] & 0xFF;
-	      else if (LEADING_BYTE_CONTROL_1 == i)
-		i = ((reg[rrr] & 0xFF) - 0xA0);
 	      else if (POSSIBLE_LEADING_BYTE_P(i) &&
 		       !NILP(CHARSET_BY_LEADING_BYTE(i)))
 		{
@@ -2257,6 +2255,18 @@
   return idx;
 }
 
+/* Unfortunately, can not avoid modifying core code with this
+   addition.  `ccl_get_compiled_code' is `static', so can not put this
+   function in dynamic module. */
+DEFUN ("ccl-program-definition", Fccl_program_definition, 1, 1, 0, /*
+Return CCL program registered as NAME.  Retrieves data set up with
+`register-ccl-program'.
+*/
+       (name))
+{
+  return ccl_get_compiled_code (name);
+}
+
 
 void
 syms_of_mule_ccl (void)
@@ -2266,6 +2276,7 @@
   DEFSUBR (Fccl_execute_on_string);
   DEFSUBR (Fregister_ccl_program);
   DEFSUBR (Fregister_code_conversion_map);
+  DEFSUBR (Fccl_program_definition);
 }
 
 void
--- etc/NEWS
+++ etc/NEWS
@@ -122,6 +122,8 @@
     - New file extensions recognized: .ss, .pdb, .psw.
   -- Fixed ldap libraries configuration.
   -- Fixed `LDAP_OPT_ON' libraries configuration.
+  -- Added `ccl-program-definition'.
+  -- Fixed writing `control-1' emchars in CCL.
 
 ** The delete key now deletes forward by default.
 
@@ -888,6 +890,22 @@
 evaluated expression.  This makes it parallel with other descriptors,
 which can also be expressions.
 
+** Added `ccl-program-definition'.
+
+It (along with `ccl-dump') is required to see what ccl code is
+actually used in current program state.  Thus, a debugging feature.
+
+** Fixed writing `control-1' emchars in CCL.
+
+Previously, if CCL program passed valid representations of such
+characters to `write-multibyte-character', it would write garbage, not
+the desired emchar.  Introduced in upstream revision 1.15.2.1
+(2005/11/28 02:10:19 +0), replaced with another garbage writing in
+upstream revision 1.15.2.2 (2005/12/07 01:17:03 +0).  One CCL
+programming task affected by this is extending `mule-ucs' coding
+system decoding programs to decode unicode code points from 0x80 to
+0x9f to these emchars.
+
 
 * Changes in XEmacs 21.0
 ========================



More information about the XEmacs-Beta mailing list