changeset 21664:4097e558fa19

(setup_coding_system): For a type 4 coding system, FLAGS member of coding spec is a cons of CCL program symbols.
author Kenichi Handa <handa@m17n.org>
date Mon, 20 Apr 1998 02:14:57 +0000
parents a03ddc4a728b
children 2f6a8ae78e88
files src/coding.c
diffstat 1 files changed, 10 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/coding.c	Mon Apr 20 02:14:20 1998 +0000
+++ b/src/coding.c	Mon Apr 20 02:14:57 1998 +0000
@@ -3045,12 +3045,18 @@
 	|= CODING_REQUIRE_DECODING_MASK | CODING_REQUIRE_ENCODING_MASK;
       {
 	Lisp_Object val = XVECTOR (coding_spec)->contents[4];
+	Lisp_Object decoder, encoder;
+
 	if (CONSP  (val)
-	    && VECTORP (XCONS (val)->car)
-	    && VECTORP (XCONS (val)->cdr))
+	    && SYMBOLP (XCONS (val)->car)
+	    && !NILP (decoder = Fget (XCONS (val)->car, Qccl_program_idx))
+	    && (decoder = Fcdr (Faref (Vccl_program_table, decoder)))
+	    && SYMBOLP (XCONS (val)->cdr)
+	    && !NILP (encoder = Fget (XCONS (val)->cdr, Qccl_program_idx))
+	    && (encoder = Fcdr (Faref (Vccl_program_table, encoder))))
 	  {
-	    setup_ccl_program (&(coding->spec.ccl.decoder), XCONS (val)->car);
-	    setup_ccl_program (&(coding->spec.ccl.encoder), XCONS (val)->cdr);
+	    setup_ccl_program (&(coding->spec.ccl.decoder), decoder);
+	    setup_ccl_program (&(coding->spec.ccl.encoder), encoder);
 	  }
 	else
 	  goto label_invalid_coding_system;